Index: EcnlProtoTool/trunk/asp3_dcre/.cproject
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/.cproject	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/.cproject	(revision 270)
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+	<storageModule moduleId="org.eclipse.cdt.core.settings">
+		<cconfiguration id="com.renesas.cdt.rz.debug.win32.configuration.Id.2092268252">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.renesas.cdt.rz.debug.win32.configuration.Id.2092268252" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+				<externalSettings/>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="asp3_dcre" buildArtefactType="com.renesas.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=com.renesas.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf *.lst *.lis *.lpp *.map libgcc.a" description="" id="com.renesas.cdt.rz.debug.win32.configuration.Id.2092268252" name="Debug" parent="com.renesas.cdt.rz.debug.win32.configuration.Id">
+					<folderInfo id="com.renesas.cdt.rz.debug.win32.configuration.Id.2092268252." name="/" resourcePath="">
+						<toolChain id="com.renesas.cdt.rz.debug.win32.toolchain.Id.1330656554" name="KPIT GNUARM-NONE-EABI Toolchain" superClass="com.renesas.cdt.rz.debug.win32.toolchain.Id">
+							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE" id="com.renesas.cdt.rz.debug.win32.targetplatform.Id.2000849951" name="Target Platform" osList="all" superClass="com.renesas.cdt.rz.debug.win32.targetplatform.Id"/>
+							<builder buildPath="${workspace_loc:/asp3_dcre}/Debug" id="com.renesas.cdt.rz.debug.win32.builder.Id.1316838534" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Builder" superClass="com.renesas.cdt.rz.debug.win32.builder.Id"/>
+							<tool id="com.renesas.cdt.rz.debug.win32.tool.libgen.Id.549450220" name="Library Generator" superClass="com.renesas.cdt.rz.debug.win32.tool.libgen.Id">
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.ctype.169331272" name="ctype.h : æå­ãæ±ããã§ãã¯ãã¾ã" superClass="com.renesas.cdt.core.LibraryGenerator.option.ctype" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.math.2060617615" name="math.h : ä¸è§é¢æ°ãªã©æ°å¤ã®è¨ç®ãè¡ãã¾ã" superClass="com.renesas.cdt.core.LibraryGenerator.option.math" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.stdio.1276105827" name="stdio.h : å
+¥å/åºåãè¡ãã¾ã" superClass="com.renesas.cdt.core.LibraryGenerator.option.stdio" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.stdlib.1471847177" name="stdlib.h : æ ¼ç´é åã®ç®¡çãªã© C ãã­ã°ã©ã ã®æ¨æºå¦çãè¡ãã¾ã" superClass="com.renesas.cdt.core.LibraryGenerator.option.stdlib" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.string.1340704445" name="string.h : æå­åã®æ¯è¼ã¨ã³ãã¼ãè¡ãã¾ã" superClass="com.renesas.cdt.core.LibraryGenerator.option.string" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.selectLibrary.336514305" name="ã©ã¤ãã©ãªã¼ã®é¸æ" superClass="com.renesas.cdt.core.LibraryGenerator.option.selectLibrary" value="com.renesas.core.LibraryGenerator.option.selectLibrary.newLib" valueType="enumerated"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.libraryType.2042178815" name="ã©ã¤ãã©ãªã¼å" superClass="com.renesas.cdt.core.LibraryGenerator.option.libraryType" value="com.renesas.cdt.core.LibraryGenerator.option.libraryType.projectBuilt" valueType="enumerated"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.misc9.103678875" name="åé¢æ°ããåºåãã¡ã¤ã«å
+ã®å¯¾å¿ããã»ã¯ã·ã§ã³ã«é
+ç½®ãã (-ffunction-sections)" superClass="com.renesas.cdt.core.LibraryGenerator.option.misc9" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.misc14.1646102274" name="é¢æ°ã®ã¢ãã¬ã¹ãã¬ã¸ã¹ã¿ã¼ã«ç½®ããªã (-fno-function-cse)" superClass="com.renesas.cdt.core.LibraryGenerator.option.misc14" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.misc36.1245833341" name="Parse the whole compilation unit before starting to produce code ( -funit-at-a-time)" superClass="com.renesas.cdt.core.LibraryGenerator.option.misc36" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.misc10.186332838" name="åãã¼ã¿ããåºåãã¡ã¤ã«å
+ã®å¯¾å¿ããã»ã¯ã·ã§ã³ã«é
+ç½®ãã (-fdata-sections)" superClass="com.renesas.cdt.core.LibraryGenerator.option.misc10" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.misc37.611438064" name="Align branch targets to a power-of-two boundary (-falign-jumps)" superClass="com.renesas.cdt.core.LibraryGenerator.option.misc37" value="true" valueType="boolean"/>
+							</tool>
+							<tool id="com.renesas.cdt.rz.debug.win32.tool.compiler.Id.2129676447" name="Compiler" superClass="com.renesas.cdt.rz.debug.win32.tool.compiler.Id">
+								<option defaultValue="true" id="com.renesas.cdt.core.Compiler.option.misc2.474910942" name="æ¨æºã·ã¹ãã ã»ãã£ã¬ã¯ããªã¼ã§ãããã¼ã»ãã¡ã¤ã«ãæ¤ç´¢ããªã (-nostdinc)" superClass="com.renesas.cdt.core.Compiler.option.misc2" value="false" valueType="boolean"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.architecture.283267340" name="ã¢ã¼ã­ãã¯ãã£ã¼" superClass="com.renesas.cdt.rz.Debug.Compiler.option.architecture" value="com.renesas.cdt.rz.Debug.Compiler.option.architecture.armv7a" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.cpuType.730461588" name="CPU ã¿ã¤ã" superClass="com.renesas.cdt.rz.Debug.Compiler.option.cpuType" value="com.renesas.cdt.rz.Debug.Compiler.option.cpuType.rza" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.dataEndian.1575628028" name="ã¨ã³ãã£ã¢ã³" superClass="com.renesas.cdt.rz.Debug.Compiler.option.dataEndian" value="com.renesas.cdt.rz.Debug.Compiler.option.dataEndian.little" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.instructionset.1078258171" name="å½ä»¤ã»ãã" superClass="com.renesas.cdt.rz.Debug.Compiler.option.instructionset" value="com.renesas.cdt.rz.Debug.Compiler.option.instructionset.arm" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.interworking.2143686662" name="ã¤ã³ã¿ã¼ã»ã¯ã¼ã­ã³ã° (-mthumb-interwork)" superClass="com.renesas.cdt.rz.Debug.Compiler.option.interworking" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.targetfpu.615392605" name="ã¿ã¼ã²ãã FPU (-mfpu)" superClass="com.renesas.cdt.rz.Debug.Compiler.option.targetfpu" value="com.renesas.cdt.rz.Debug.Compiler.option.targetfpu.vfp" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.floatingpointabi.753205564" name="æµ®åå°æ°ç¹ ABI (-mfloat-abi=name)" superClass="com.renesas.cdt.rz.Debug.Compiler.option.floatingpointabi" value="com.renesas.cdt.rz.Debug.Compiler.option.floatingpointabi.soft" valueType="enumerated"/>
+								<option id="com.renesas.cdt.core.Compiler.option.warnStackSize.1447419982" name="Warn if stack size exceeds the limit (-Wstack-usage) (H')" superClass="com.renesas.cdt.core.Compiler.option.warnStackSize" value="100" valueType="string"/>
+								<option id="com.renesas.cdt.core.Compiler.option.CPUSeries.938541441" name="CPU ã·ãªã¼ãº" superClass="com.renesas.cdt.core.Compiler.option.CPUSeries" value="RZ/A" valueType="string"/>
+								<option id="com.renesas.cdt.core.Compiler.option.device.175730635" name="Device" superClass="com.renesas.cdt.core.Compiler.option.device" value="R7S721001" valueType="string"/>
+								<option id="com.renesas.cdt.core.Compiler.option.deviceShortName.195768597" name="DeviceShortName" superClass="com.renesas.cdt.core.Compiler.option.deviceShortName" value="R7S721001" valueType="string"/>
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.rz.Debug.Compiler.option.macroDefines.681399750" name="ãã¯ã­å®ç¾©" superClass="com.renesas.cdt.rz.Debug.Compiler.option.macroDefines" valueType="definedSymbols">
+									<listOptionValue builtIn="false" value="SIMULATOR_DEBUG"/>
+									<listOptionValue builtIn="false" value="CPPAPP"/>
+									<listOptionValue builtIn="false" value="TOPPERS_EXECUTE_ON_ROM"/>
+									<listOptionValue builtIn="false" value="__TARGET_ARCH_ARM=7"/>
+									<listOptionValue builtIn="false" value="TARGET_RZ_A1H"/>
+									<listOptionValue builtIn="false" value="TARGET_MBRZA1H"/>
+									<listOptionValue builtIn="false" value="TOOLCHAIN_GCC_ARM"/>
+									<listOptionValue builtIn="false" value="TOOLCHAIN_GCC"/>
+									<listOptionValue builtIn="false" value="TARGET_CORTEX_A"/>
+									<listOptionValue builtIn="false" value="MBED_BUILD_TIMESTAMP=1460441486.52"/>
+									<listOptionValue builtIn="false" value="TARGET_RENESAS"/>
+									<listOptionValue builtIn="false" value="__FPU_PRESENT"/>
+									<listOptionValue builtIn="false" value="TARGET_KERNEL_ASP"/>
+									<listOptionValue builtIn="false" value="SUPPORT_INET4"/>
+									<listOptionValue builtIn="false" value="SUPPORT_ETHER"/>
+									<listOptionValue builtIn="false" value="SUPPORT_TCP"/>
+									<listOptionValue builtIn="false" value="SUPPORT_UDP"/>
+								</option>
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.core.Compiler.option.includeFileDir.1965153703" name="ã¤ã³ã¯ã«ã¼ãã»ãã¡ã¤ã«ã»ãã£ã¬ã¯ããªã¼" superClass="com.renesas.cdt.core.Compiler.option.includeFileDir" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/include}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/target/gr_peach_gcc}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/arch/arm_gcc/rza1}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/arch/arm_gcc/common}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/arch/gcc}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/mbed/api}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/mbed/hal}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/mbed/targets/cmsis}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/TARGET_MBED_MBRZA1H}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/mruby-1.2.0/include}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/prototool/src}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/tinet/netdev/if_mbed}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/tinet}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/tecs_kernel}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/prototool/Debug}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/prototool/Debug/gen}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../webserver&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../gr_peach&quot;"/>
+								</option>
+								<inputType id="%Base.Compiler.C.InputType.Id.479471606" name="C å
+¥å" superClass="%Base.Compiler.C.InputType.Id"/>
+								<inputType id="Base.Compiler.CPP.InputType.Id.1684974226" name="C++ å
+¥å" superClass="Base.Compiler.CPP.InputType.Id"/>
+							</tool>
+							<tool id="com.renesas.cdt.rz.debug.win32.tool.assembler.Id.30934973" name="Assembler" superClass="com.renesas.cdt.rz.debug.win32.tool.assembler.Id">
+								<option id="com.renesas.cdt.rz.Debug.Assembler.option.architecture.1967834551" name="ã¢ã¼ã­ãã¯ãã£ã¼" superClass="com.renesas.cdt.rz.Debug.Assembler.option.architecture" value="com.renesas.cdt.rz.Debug.Assembler.option.architecture.armv7a" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Assembler.option.cpuType.907440326" name="CPU ã¿ã¤ã" superClass="com.renesas.cdt.rz.Debug.Assembler.option.cpuType" value="com.renesas.cdt.rz.Debug.Assembler.option.cpuType.rza" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Assembler.option.dataEndian.408491063" name="ã¨ã³ãã£ã¢ã³" superClass="com.renesas.cdt.rz.Debug.Assembler.option.dataEndian" value="com.renesas.cdt.rz.Debug.Assembler.option.dataEndian.little" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Assembler.option.instructionset.1476398350" name="å½ä»¤ã»ãã" superClass="com.renesas.cdt.rz.Debug.Assembler.option.instructionset" value="com.renesas.cdt.rz.Debug.Assembler.option.instructionset.arm" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Assembler.option.targetfpu.1561922685" name="ã¿ã¼ã²ãã FPU (-mfpu)" superClass="com.renesas.cdt.rz.Debug.Assembler.option.targetfpu" value="com.renesas.cdt.rz.Debug.Assembler.option.targetfpu.vfp" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Assembler.option.floatingpointabi.2104392911" name="æµ®åå°æ°ç¹ ABI (-mfloat-abi=name)" superClass="com.renesas.cdt.rz.Debug.Assembler.option.floatingpointabi" value="com.renesas.cdt.rz.Debug.Assembler.option.floatingpointabi.soft" valueType="enumerated"/>
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.core.Assembler.option.includeFileDirectories.355394960" name="ã¤ã³ã¯ã«ã¼ãã»ãã¡ã¤ã«ã»ãã£ã¬ã¯ããªã¼" superClass="com.renesas.cdt.core.Assembler.option.includeFileDirectories" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/src&quot;"/>
+								</option>
+								<inputType id="%Base.Assembler.inputType.Id.63454341" name="ã¢ã»ã³ãã©ã¼å
+¥åã¿ã¤ã" superClass="%Base.Assembler.inputType.Id"/>
+							</tool>
+							<tool id="com.renesas.cdt.rz.debug.win32.tool.linker.Id.606735805" name="Linker" superClass="com.renesas.cdt.rz.debug.win32.tool.linker.Id">
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.rz.Debug.Linker.option.archiveSearchDirectories.1968268518" name="ã¢ã¼ã«ã¤ãæ¤ç´¢ãã£ã¬ã¯ããªã¼" superClass="com.renesas.cdt.rz.Debug.Linker.option.archiveSearchDirectories" valueType="stringList">
+									<listOptionValue builtIn="false" value="&quot;${CONFIGDIR}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${TCINSTALL}/lib/gcc/arm-none-eabi/${GCC_VERSION}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${TCINSTALL}/arm-none-eabi/lib&quot;"/>
+								</option>
+								<option id="com.renesas.cdt.rz.Debug.Linker.option.dataEndian.326979634" name="ã¨ã³ãã£ã¢ã³" superClass="com.renesas.cdt.rz.Debug.Linker.option.dataEndian" value="com.renesas.cdt.rz.Debug.Linker.option.dataEndian.little" valueType="enumerated"/>
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.rz.Debug.Linker.option.archiveLibraryFiles.420087168" name="ã¢ã¼ã«ã¤ã ( ã©ã¤ãã©ãªã¼ ) ãã¡ã¤ã«" superClass="com.renesas.cdt.rz.Debug.Linker.option.archiveLibraryFiles" valueType="stringList">
+									<listOptionValue builtIn="false" value="${BuildArtifactFileBaseName}"/>
+									<listOptionValue builtIn="false" value="gcc"/>
+									<listOptionValue builtIn="false" value="stdc++"/>
+								</option>
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.core.Linker.option.userDefinedOptions.1635961165" name="ã¦ã¼ã¶ã¼å®ç¾©ãªãã·ã§ã³" superClass="com.renesas.cdt.core.Linker.option.userDefinedOptions" valueType="stringList">
+									<listOptionValue builtIn="false" value="-e_PowerON_Reset"/>
+								</option>
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.core.Linker.option.linkOrderList.662931274" name="" superClass="com.renesas.cdt.core.Linker.option.linkOrderList" valueType="stringList">
+									<listOptionValue builtIn="false" value="&quot;.\src\asp3_dcre.o&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;.\src\hardware_setup.o&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;.\src\interrupt_handlers.o&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;.\src\reset_program.o&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;.\src\vector_table.o&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;.\libasp3_dcre.a&quot;"/>
+								</option>
+							</tool>
+							<tool id="com.renesas.cdt.rz.debug.win32.tool.objcopy.Id.106287146" name="Objcopy" superClass="com.renesas.cdt.rz.debug.win32.tool.objcopy.Id"/>
+						</toolChain>
+					</folderInfo>
+					<sourceEntries>
+						<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+					</sourceEntries>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+	</storageModule>
+	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+		<project id="asp3_dcre.com.renesas.cdt.rz.projectType.win32.Id.712445337" name="Executable (Renesas)" projectType="com.renesas.cdt.rz.projectType.win32.Id"/>
+	</storageModule>
+	<storageModule moduleId="scannerConfiguration">
+		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+	</storageModule>
+	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+	<storageModule moduleId="refreshScope" versionNumber="2">
+		<configuration configurationName="HardwareDebug">
+			<resource resourceType="PROJECT" workspacePath="/asp3_dcre"/>
+		</configuration>
+		<configuration configurationName="Debug">
+			<resource resourceType="PROJECT" workspacePath="/asp3_dcre"/>
+		</configuration>
+	</storageModule>
+</cproject>
Index: EcnlProtoTool/trunk/asp3_dcre/.info
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/.info	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/.info	(revision 270)
@@ -0,0 +1,7 @@
+TOOL_CHAIN=KPIT GNUARM-NONE-EABI Toolchain
+VERSION=v16.01
+TC_INSTALL=C:\Program Files (x86)\KPIT\GNUARM-NONEv16.01-EABI\arm-none-eabi\arm-none-eabi\
+GCC_STRING=5.2-GNUARM-NONE_v16.01
+VERSION_IDE=
+E2STUDIO_VERSION=5.3.0.023
+ACTIVE_CONFIGURATION=Debug
Index: EcnlProtoTool/trunk/asp3_dcre/.project
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/.project	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/.project	(revision 270)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>asp3_dcre</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.renesas.cdt.core.genmakebuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.cdt.core.cnature</nature>
+		<nature>com.renesas.cdt.core.kpitccnature</nature>
+		<nature>com.renesas.cdt.core.kpitcnature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+	</natures>
+</projectDescription>
Index: EcnlProtoTool/trunk/asp3_dcre/.settings/org.eclipse.cdt.core.prefs
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/.settings/org.eclipse.cdt.core.prefs	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/.settings/org.eclipse.cdt.core.prefs	(revision 270)
@@ -0,0 +1,9 @@
+eclipse.preferences.version=1
+environment/project/com.renesas.cdt.library.rz.debug.win32.toolchain.Id.1841388882/GCC_VERSION/delimiter=;
+environment/project/com.renesas.cdt.library.rz.debug.win32.toolchain.Id.1841388882/GCC_VERSION/operation=replace
+environment/project/com.renesas.cdt.library.rz.debug.win32.toolchain.Id.1841388882/GCC_VERSION/value=5.2-GNUARM-NONE_v16.01
+environment/project/com.renesas.cdt.library.rz.debug.win32.toolchain.Id.1841388882/PATH/delimiter=;
+environment/project/com.renesas.cdt.library.rz.debug.win32.toolchain.Id.1841388882/PATH/operation=replace
+environment/project/com.renesas.cdt.library.rz.debug.win32.toolchain.Id.1841388882/PATH/value=C\:/Renesas/e2_studio/Utilities;C\:/Renesas/e2_studio/eclipse//features/com.renesas.jre.win32.win32.x86_1.8.0.40/jre/bin/client;C\:/Renesas/e2_studio/eclipse//features/com.renesas.jre.win32.win32.x86_1.8.0.40/jre/bin;C\:/Renesas/e2_studio/eclipse//features/com.renesas.jre.win32.win32.x86_1.8.0.40/jre/lib/i386;C\:\\ProgramData\\Oracle\\Java\\javapath;C\:\\Program Files\\Common Files\\Microsoft Shared\\Microsoft Online Services;C\:\\Program Files (x86)\\Common Files\\Microsoft Shared\\Microsoft Online Services;C\:\\Program Files\\Common Files\\Microsoft Shared\\Windows Live;C\:\\Program Files (x86)\\Common Files\\Microsoft Shared\\Windows Live;C\:\\Program Files (x86)\\Intel\\iCLS Client\\;C\:\\Program Files\\Intel\\iCLS Client\\;C\:\\Windows\\system32;C\:\\Windows;C\:\\Windows\\System32\\Wbem;C\:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C\:\\Program Files (x86)\\Intel\\OpenCL SDK\\2.0\\bin\\x86;C\:\\Program Files (x86)\\Intel\\OpenCL SDK\\2.0\\bin\\x64;C\:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C\:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C\:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C\:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C\:\\Program Files\\Common Files\\Lenovo;C\:\\Program Files (x86)\\Windows Live\\Shared;C\:\\Program Files (x86)\\Symantec\\VIP Access Client\\;C\:\\SWTOOLS\\ReadyApps;C\:\\Program Files (x86)\\Common Files\\Lenovo;C\:\\Program Files (x86)\\Microsoft ASP.NET\\ASP.NET Web Pages\\v1.0\\;C\:\\Program Files\\Microsoft SQL Server\\110\\Tools\\Binn\\;C\:\\Program Files (x86)\\GitExtensions\\;C\:\\Program Files\\gs\\gs9.18\\bin;C\:\\Program Files\\gs\\gs9.18\\lib;C\:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C\:\\Program Files\\Microsoft SQL Server\\120\\Tools\\Binn\\;C\:\\Windows\\system32\\config\\systemprofile\\.dnx\\bin;C\:\\Program Files\\Microsoft DNX\\Dnvm\\;C\:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\;C\:\\Program Files (x86)\\Skype\\Phone\\;C\:\\Program Files\\Microsoft\\Web Platform Installer\\;C\:\\Program Files\\Git\\cmd;C\:\\Program Files (x86)\\nodejs\\;C\:\\Program Files\\TortoiseSVN\\bin;C\:\\Program Files\\It's Freetime Software\\Ruby-2.0.0-x64\\bin;C\:\\Users\\nagasima\\.dnx\\bin;C\:\\Users\\nagasima\\AppData\\Roaming\\npm;C\:\\Renesas\\e2_studio\\eclipse;C\:\\Program Files (x86)\\KPIT\\GNUARM-NONEv16.01-EABI\\arm-none-eabi\\arm-none-eabi\\bin;${workspace_loc}/tools/bin
+environment/project/com.renesas.cdt.library.rz.debug.win32.toolchain.Id.1841388882/append=true
+environment/project/com.renesas.cdt.library.rz.debug.win32.toolchain.Id.1841388882/appendContributed=true
Index: EcnlProtoTool/trunk/asp3_dcre/Debug/Makefile
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/Debug/Makefile	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/Debug/Makefile	(revision 270)
@@ -0,0 +1,625 @@
+#
+#  TOPPERS/ASP Kernel
+#      Toyohashi Open Platform for Embedded Real-Time Systems/
+#      Advanced Standard Profile Kernel
+# 
+#  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+# 
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+# 
+#  $Id: Makefile 735 2016-04-03 14:11:07Z ertl-hiro $
+# 
+
+#
+#  ã¿ã¼ã²ããã®æå®ï¼Makefile.targetã§ä¸æ¸ããããã®ãé²ãããï¼
+#
+all:
+
+#
+#  ã¿ã¼ã²ããç¥ç§°ã®å®ç¾©
+#
+TARGET = gr_peach_gcc
+
+#
+#  ãã­ã°ã©ãã³ã°è¨èªã®å®ç¾©
+#
+SRCLANG = c
+ifeq ($(SRCLANG),c)
+	LIBS = -lc
+endif
+ifeq ($(SRCLANG),c++)
+	USE_CXX = true
+	CXXLIBS = -lstdc++ -lm -lc
+	CXXRTS = cxxrt.o newlibrt.o
+endif
+
+#
+#  ã½ã¼ã¹ãã¡ã¤ã«ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+SRCDIR = ..
+
+#
+#  ãªãã¸ã§ã¯ããã¡ã¤ã«åã®æ¡å¼µå­ã®è¨­å®
+#
+OBJEXT = elf
+
+#
+#  ã«ã¼ãã«ã©ã¤ãã©ãªï¼libkernel.aï¼ã®ãã£ã¬ã¯ããªå
+#  ï¼ã«ã¼ãã«ã©ã¤ãã©ãªãmakeå¯¾è±¡ã«ããæã¯ï¼ç©ºã«å®ç¾©ããï¼
+#
+KERNEL_LIB = 
+
+#
+#  ã«ã¼ãã«ãé¢æ°åä½ã§ã³ã³ãã¤ã«ãããã©ããã®å®ç¾©
+#
+KERNEL_FUNCOBJS = 
+
+#
+#  TECSãå¤ããã©ããã®å®ç¾©
+#
+OMIT_TECS = 
+
+#
+#  ãã¬ã¼ã¹ã­ã°ãåå¾ãããã©ããã®å®ç¾©
+#
+ENABLE_TRACE = 
+
+#
+#  éçºãã¼ã«ï¼ã³ã³ãã¤ã©ç­ï¼ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+DEVTOOLDIR = 
+
+#
+#  ã¦ã¼ãã£ãªãã£ãã­ã°ã©ã ã®åç§°
+#
+CFG = ruby -Eutf-8 $(SRCDIR)/cfg/cfg.rb
+TECSGEN = ruby -Eutf-8 $(SRCDIR)/tecsgen/tecsgen.rb
+
+#
+#  ãªãã¸ã§ã¯ããã¡ã¤ã«åã®å®ç¾©
+#
+OBJNAME = asp
+ifdef OBJEXT
+	OBJFILE = $(OBJNAME).$(OBJEXT)
+	CFG1_OUT = cfg1_out.$(OBJEXT)
+else
+	OBJFILE = $(OBJNAME)
+	CFG1_OUT = cfg1_out
+endif
+
+#
+#  ä¾å­é¢ä¿ãã¡ã¤ã«ãç½®ããã£ã¬ã¯ããªã®å®ç¾©
+#
+DEPDIR = deps
+
+#
+#  ã¿ã¼ã²ããä¾å­é¨ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+TARGETDIR = $(SRCDIR)/target/$(TARGET)
+
+#
+#  ã¿ã¼ã²ããä¾å­ã®å®ç¾©ã®ã¤ã³ã¯ã«ã¼ã
+#
+include $(TARGETDIR)/Makefile.target
+
+#
+#  TECSçæãã¡ã¤ã«ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+TECSGENDIR = ./gen
+ifndef OMIT_TECS
+	TECSGEN_TIMESTAMP = $(TECSGENDIR)/tecsgen.timestamp
+	INIT_TECS_COBJ = init_tecs.o
+endif
+
+#
+#  TECSãçæããå®ç¾©ã®ã¤ã³ã¯ã«ã¼ã
+#
+ifndef OMIT_TECS
+	GEN_DIR = $(TECSGENDIR)
+	-include $(TECSGENDIR)/Makefile.tecsgen
+endif
+
+#
+#  mbedãµã¼ãã¹ã®å®ç¾©
+#
+
+include $(SRCDIR)/mbed/Makefile.mbed
+
+#
+#  å
+±éã³ã³ãã¤ã«ãªãã·ã§ã³ã®å®ç¾©
+#
+COPTS := -g -std=gnu99 $(COPTS)
+ifndef OMIT_WARNING_ALL
+	COPTS := -Wall $(COPTS)
+endif
+ifndef OMIT_OPTIMIZATION
+	COPTS := -Og $(COPTS)
+endif
+ifdef OMIT_TECS
+	CDEFS := -DTOPPERS_OMIT_TECS $(CDEFS)
+endif
+CDEFS := $(CDEFS) 
+INCLUDES := -I. -I$(SRCDIR)/include $(INCLUDES) -I$(SRCDIR)
+LDFLAGS := $(LDFLAGS) -Wl,-Map=$(OBJNAME).map,--cref
+LIBS := $(LIBS) $(CXXLIBS)
+CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
+
+#
+#  ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ã«é¢ããå®ç¾©
+#
+APPLNAME = sample1n
+APPLDIRS = $(SRCDIR)/sample
+APPL_CFG = sample1n.cfg
+APPL_CDL = sample1n.cdl
+
+APPL_DIRS := $(APPLDIRS) $(SRCDIR)/library
+APPL_ASMOBJS :=
+ifdef USE_CXX
+	APPL_CXXOBJS := sample1n.o sample1.o
+	APPL_COBJS :=
+else
+	APPL_COBJS := sample1n.o sample1.o
+endif
+APPL_COBJS := $(APPL_COBJS) log_output.o vasyslog.o t_perror.o strerror.o
+APPL_CFLAGS := $(APPL_CFLAGS)
+ifdef APPLDIRS
+	INCLUDES := $(INCLUDES) $(foreach dir,$(APPLDIRS),-I$(dir))
+endif
+
+#
+#  ãããã¯ã¼ã¯ãµã¼ãã¹ã®å®ç¾©
+#
+
+NO_USE_TINET_LIBRARY = true
+
+#  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®é¸æãä½ããä¸ã¤é¸æããã
+
+NET_IF = ether
+
+#  ã¤ã¼ãµãããã»ãã£ãã¤ã¹ãã©ã¤ãã®é¸æ
+
+NET_DEV = if_mbed
+
+#  ãããã¯ã¼ã¯å±¤ã®é¸æ
+
+#SUPPORT_INET6 = true
+SUPPORT_INET4 = true
+
+#  API ã«çµè¾¼ãæ©è½ã®é¸æ
+
+#API_CFG_IP4MAPPED_ADDR = true
+
+#  ãã©ã³ã¹ãã¼ãå±¤ã®é¸æ
+
+SUPPORT_TCP = true
+#SUPPORT_UDP = true
+
+#
+#  ã·ã¹ãã ãµã¼ãã¹ã® Makefile ã®ã¤ã³ã¯ã«ã¼ã
+#
+include $(SRCDIR)/tinet/Makefile.tinet
+
+#
+#  ã·ã¹ãã ãµã¼ãã¹ã«é¢ããå®ç¾©
+#
+SYSSVC_DIRS := $(TECSGENDIR) $(SRCDIR)/tecs_kernel \
+				$(SYSSVC_DIRS) $(SRCDIR)/syssvc
+SYSSVC_ASMOBJS := $(SYSSVC_ASMOBJS)
+SYSSVC_COBJS := $(INIT_TECS_COBJ) $(TECS_COBJS) $(SYSSVC_COBJS) \
+				 $(CXXRTS)
+SYSSVC_CFLAGS := $(SYSSVC_CFLAGS)
+INCLUDES := $(INCLUDES) -I$(TECSGENDIR) -I$(SRCDIR)/tecs_kernel
+
+#
+#  ã¿ã¼ã²ãããã¡ã¤ã«
+#
+.PHONY: all
+ifndef OMIT_TECS
+all: tecs
+#	@$(MAKE) check
+	@$(MAKE) check $(OBJNAME).bin
+#	@$(MAKE) check $(OBJNAME).srec
+else
+#all: check
+all: check $(OBJNAME).bin
+#all: check $(OBJNAME).srec
+endif
+
+##### ä»¥ä¸ã¯ç·¨éããªããã¨ #####
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«é¢ããå®ç¾©
+#
+CFG_TABS := --api-table $(SRCDIR)/tinet/tcpip_api.def:tcpip \
+			--api-table $(SRCDIR)/kernel/kernel_api.def:kernel \
+			--symval-table $(SRCDIR)/tinet/tcpip_sym.def \
+			--symval-table $(SRCDIR)/kernel/kernel_sym.def $(CFG_TABS)
+CFG_ASMOBJS := $(CFG_ASMOBJS)
+CFG_COBJS := kernel_cfg.o $(CFG_COBJS)
+CFG_OBJS := $(CFG_ASMOBJS) $(CFG_COBJS)
+CFG2_OUT_SRCS := kernel_cfg.h kernel_cfg.c $(CFG2_OUT_SRCS)
+CFG_CFLAGS := -DTOPPERS_CB_TYPE_ONLY $(CFG_CFLAGS)
+
+#
+#  ã«ã¼ãã«ã«é¢ããå®ç¾©
+#
+#  KERNEL_ASMOBJS: ã«ã¼ãã«ã©ã¤ãã©ãªã«å«ããï¼ã½ã¼ã¹ãã¢ã»ã³ããªè¨èªã®
+#				   ãªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#  KERNEL_COBJS: ã«ã¼ãã«ã®ã©ã¤ãã©ãªã«å«ããï¼ã½ã¼ã¹ãCè¨èªã§ï¼ã½ã¼ã¹
+#				 ãã¡ã¤ã«ã¨1å¯¾1ã«å¯¾å¿ãããªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#  KERNEL_LCSRCS: ã«ã¼ãã«ã®ã©ã¤ãã©ãªã«å«ããCè¨èªã®ã½ã¼ã¹ãã¡ã¤ã«ã§ï¼
+#				  1ã¤ã®ã½ã¼ã¹ãã¡ã¤ã«ããè¤æ°ã®ãªãã¸ã§ã¯ããã¡ã¤ã«ãç
+#				  æãããã®ï¼
+#  KERNEL_LCOBJS: ä¸ã®ã½ã¼ã¹ãã¡ã¤ã«ããçæããããªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#
+KERNEL_DIRS := $(KERNEL_DIRS) $(SRCDIR)/kernel
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS)
+KERNEL_COBJS := $(KERNEL_COBJS)
+KERNEL_CFLAGS := $(KERNEL_CFLAGS) -I$(SRCDIR)/kernel
+
+#
+#  ã«ã¼ãã«ã®ãã¡ã¤ã«æ§æã®å®ç¾©
+#
+include $(SRCDIR)/kernel/Makefile.kernel
+ifdef KERNEL_FUNCOBJS
+	KERNEL_LCSRCS := $(KERNEL_FCSRCS)
+	KERNEL_LCOBJS := $(foreach file,$(KERNEL_FCSRCS),$($(file:.c=)))
+else
+	KERNEL_CFLAGS := -DALLFUNC $(KERNEL_CFLAGS)
+	KERNEL_COBJS := $(KERNEL_COBJS) \
+					$(foreach file,$(KERNEL_FCSRCS),$(file:.c=.o))
+endif
+ifdef OMIT_OFFSET_H
+	OFFSET_H =
+else
+	OFFSET_H = offset.h
+endif
+ifndef TARGET_OFFSET_TRB
+	TARGET_OFFSET_TRB := $(TARGETDIR)/target_offset.trb
+endif
+ifndef TARGET_KERNEL_TRB
+	TARGET_KERNEL_TRB := $(TARGETDIR)/target_kernel.trb
+endif
+ifndef TARGET_CHECK_TRB
+	TARGET_CHECK_TRB := $(TARGETDIR)/target_check.trb
+endif
+ifndef TARGET_KERNEL_CFG
+	TARGET_KERNEL_CFG := $(TARGETDIR)/target_kernel.cfg
+endif
+ifndef TARGET_TCPIP_TRB
+	TARGET_TCPIP_TRB := $(SRCDIR)/tinet/tinet.trb
+endif
+
+#
+#  ã½ã¼ã¹ãã¡ã¤ã«ã®ãããã£ã¬ã¯ããªã«é¢ããå®ç¾©
+#
+vpath %.c $(KERNEL_DIRS) $(SYSSVC_DIRS) $(APPL_DIRS)
+vpath %.S $(KERNEL_DIRS) $(SYSSVC_DIRS) $(APPL_DIRS)
+vpath %.cfg $(APPL_DIRS)
+vpath %.cdl $(APPL_DIRS)
+
+#
+#  ã³ã³ãã¤ã«ã®ããã®å¤æ°ã®å®ç¾©
+#
+KERNEL_LIB_OBJS = $(KERNEL_ASMOBJS) $(KERNEL_COBJS) $(KERNEL_LCOBJS)
+SYSSVC_OBJS = $(SYSSVC_ASMOBJS) $(SYSSVC_COBJS)
+APPL_OBJS = $(APPL_ASMOBJS) $(APPL_COBJS) $(APPL_CXXOBJS)
+ALL_OBJS = $(START_OBJS) $(APPL_OBJS) $(SYSSVC_OBJS) $(CFG_OBJS) \
+											$(END_OBJS) $(HIDDEN_OBJS)
+ALL_LIBS = -lkernel $(LIBS)
+ifdef KERNEL_LIB
+	LIBS_DEP = $(KERNEL_LIB)/libkernel.a $(filter %.a,$(LIBS))
+	OBJ_LDFLAGS := $(OBJ_LDFLAGS) -L$(KERNEL_LIB)
+	REALCLEAN_FILES := libkernel.a $(REALCLEAN_FILES)
+else
+	LIBS_DEP = libkernel.a $(filter %.a,$(LIBS))
+	OBJ_LDFLAGS := $(OBJ_LDFLAGS) -L.
+endif
+
+ifdef TEXT_START_ADDRESS
+	LDFLAGS := $(LDFLAGS) -Wl,-Ttext,$(TEXT_START_ADDRESS)
+endif
+ifdef DATA_START_ADDRESS
+	LDFLAGS := $(LDFLAGS) -Wl,-Tdata,$(DATA_START_ADDRESS)
+endif
+ifdef LDSCRIPT
+	LDFLAGS := $(LDFLAGS) -T $(LDSCRIPT)
+endif
+
+#
+#  tecsgenããCããªãã­ã»ããµãå¼ã³åºãéã®ãªãã·ã§ã³ã®å®ç¾©
+#
+TECS_CPP = $(CC) $(CDEFS) $(INCLUDES) $(SYSSVC_CFLAGS) -D TECSGEN -E
+
+#
+#  tecsgenã®å¼åºã
+#
+.PHONY: tecs
+tecs $(TECSGEN_SRCS) $(TECS_HEADERS): $(TECSGEN_TIMESTAMP) ;
+$(TECSGEN_TIMESTAMP): $(APPL_CDL) $(TECS_IMPORTS)
+	$(TECSGEN) $< -R $(INCLUDES) --cpp "$(TECS_CPP)" -g $(TECSGENDIR)
+
+#
+#  ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®çæ
+#
+cfg1_out.c cfg1_out.db: cfg1_out.timestamp ;
+cfg1_out.timestamp: $(APPL_CFG) $(TECSGEN_TIMESTAMP)
+	$(CFG) --pass 1 --kernel asp $(INCLUDES) $(CFG_TABS) \
+						-M $(DEPDIR)/cfg1_out_c.d $(TARGET_KERNEL_CFG) $<
+
+$(CFG1_OUT): $(START_OBJS) cfg1_out.o $(CFG_DMY) $(END_OBJS) $(HIDDEN_OBJS)
+	$(LINK) $(CFLAGS) $(LDFLAGS) $(CFG1_OUT_LDFLAGS) -o $(CFG1_OUT) \
+						$(START_OBJS) cfg1_out.o $(CFG_DMY) $(END_OBJS)
+
+cfg1_out.syms: $(CFG1_OUT)
+	$(NM) -n $(CFG1_OUT) > cfg1_out.syms
+
+cfg1_out.srec: $(CFG1_OUT)
+	$(OBJCOPY) -O srec -S $(CFG1_OUT) cfg1_out.srec
+
+$(CFG2_OUT_SRCS) cfg2_out.db: kernel_cfg.timestamp ;
+kernel_cfg.timestamp: cfg1_out.db cfg1_out.syms cfg1_out.srec
+	$(CFG) --pass 2 --kernel asp $(INCLUDES) -T $(TARGET_TCPIP_TRB):tcpip -T $(TARGET_KERNEL_TRB):kernel
+
+#
+#  ãªãã»ãããã¡ã¤ã«ï¼offset.hï¼ã®çæè¦å
+#
+$(OFFSET_H): offset.timestamp ;
+offset.timestamp: cfg1_out.db cfg1_out.syms cfg1_out.srec
+	$(CFG) --pass 2 -O --kernel asp $(INCLUDES) -T $(TARGET_OFFSET_TRB) \
+				--rom-symbol cfg1_out.syms --rom-image cfg1_out.srec
+
+#
+#  ã«ã¼ãã«ã©ã¤ãã©ãªãã¡ã¤ã«ã®çæ
+#
+libkernel.a: $(OFFSET_H) $(KERNEL_LIB_OBJS)
+	rm -f libkernel.a
+	$(AR) -rcs libkernel.a $(KERNEL_LIB_OBJS)
+	$(RANLIB) libkernel.a
+
+#
+#  ç¹å¥ãªä¾å­é¢ä¿ã®å®ç¾©
+#
+tBannerMain.o: $(filter-out tBannerMain.o,$(ALL_OBJS)) $(LIBS_DEP)
+
+#
+#  å
+¨ä½ã®ãªã³ã¯
+#
+$(OBJFILE): $(ALL_OBJS) $(LIBS_DEP)
+	$(LINK) $(CFLAGS) $(LDFLAGS) $(OBJ_LDFLAGS) -o $(OBJFILE) \
+			$(START_OBJS) $(APPL_OBJS) $(SYSSVC_OBJS) $(CFG_OBJS) \
+			$(ALL_LIBS) $(END_OBJS)
+
+#
+#  ã·ã³ãã«ãã¡ã¤ã«ã®çæ
+#
+$(OBJNAME).syms: $(OBJFILE)
+	$(NM) -n $(OBJFILE) > $(OBJNAME).syms
+
+#
+#  ãã¤ããªãã¡ã¤ã«ã®çæ
+#
+$(OBJNAME).bin: $(OBJFILE)
+	$(OBJCOPY) -O binary -S $(OBJFILE) $(OBJNAME).bin
+	$(OBJDUMP) -h $(OBJFILE)
+	$(SIZE) $(OBJFILE)
+
+#
+#  Sã¬ã³ã¼ããã¡ã¤ã«ã®çæ
+#
+$(OBJNAME).srec: $(OBJFILE)
+	$(OBJCOPY) -O srec -S $(OBJFILE) $(OBJNAME).srec
+
+#
+#  ã¨ã©ã¼ãã§ãã¯å¦ç
+#
+.PHONY: check
+check: check.timestamp ;
+check.timestamp: cfg2_out.db $(OBJNAME).syms $(OBJNAME).srec
+	$(CFG) --pass 3 --kernel asp -O $(INCLUDES) -T $(TARGET_CHECK_TRB) \
+				--rom-symbol $(OBJNAME).syms --rom-image $(OBJNAME).srec
+	@echo "configuration check passed"
+
+#
+#  ã³ã³ãã¤ã«çµæã®æ¶å»
+#
+.PHONY: clean
+clean:
+	rm -f \#* *~ *.o $(DEPDIR)/*.d $(CLEAN_FILES) check.timestamp
+	rm -f $(OBJFILE) $(OBJNAME).syms $(OBJNAME).srec $(OBJNAME).bin
+	rm -f kernel_cfg.timestamp $(CFG2_OUT_SRCS) cfg2_out.db
+	rm -f offset.timestamp $(OFFSET_H)
+	rm -f cfg1_out.syms cfg1_out.srec $(CFG1_OUT)
+	rm -f cfg1_out.timestamp cfg1_out.c cfg1_out.db
+#	rm -rf $(TECSGENDIR)
+ifndef KERNEL_LIB
+	rm -f libkernel.a
+endif
+
+.PHONY: cleankernel
+cleankernel:
+	rm -f $(OFFSET_H) $(KERNEL_LIB_OBJS)
+	rm -f $(KERNEL_LIB_OBJS:%.o=$(DEPDIR)/%.d)
+
+.PHONY: realclean
+realclean: clean
+	rm -f $(REALCLEAN_FILES)
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãçæãããã¡ã¤ã«ã®ã³ã³ãã¤ã«ã«ã¼ã«ã®å®ç¾©
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãçæãããã¡ã¤ã«ã¯ï¼å
+±éã®ã³ã³ãã¤ã«ãªãã·ã§ã³
+#  ã®ã¿ãä»ãã¦ã³ã³ãã¤ã«ããï¼
+#
+ALL_CFG_COBJS = $(CFG_COBJS) cfg1_out.o
+ALL_CFG_ASMOBJS = $(CFG_ASMOBJS)
+
+$(ALL_CFG_COBJS): %.o: %.c
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(CFG_CFLAGS) $<
+
+$(ALL_CFG_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(CFG_CFLAGS) $<
+
+$(ALL_CFG_ASMOBJS): %.o: %.S
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(CFG_CFLAGS) $<
+
+#
+#  ä¾å­é¢ä¿ãã¡ã¤ã«ã®ã¤ã³ã¯ã«ã¼ã
+#
+-include $(DEPDIR)/*.d
+
+#
+#  éçºãã¼ã«ã®ã³ãã³ãåã®å®ç¾©
+#
+ifeq ($(TOOL),gcc)
+	#
+	#  GNUéçºç°å¢ç¨
+	#
+	ifdef GCC_TARGET
+		GCC_TARGET_PREFIX = $(GCC_TARGET)-
+	else
+		GCC_TARGET_PREFIX =
+	endif
+	CC := $(GCC_TARGET_PREFIX)gcc
+	CXX := $(GCC_TARGET_PREFIX)g++
+	AS := $(GCC_TARGET_PREFIX)as
+	LD := $(GCC_TARGET_PREFIX)ld
+	AR := $(GCC_TARGET_PREFIX)ar
+	NM := $(GCC_TARGET_PREFIX)nm
+	RANLIB := $(GCC_TARGET_PREFIX)ranlib
+	OBJCOPY := $(GCC_TARGET_PREFIX)objcopy
+	OBJDUMP := $(GCC_TARGET_PREFIX)objdump
+	SIZE := $(GCC_TARGET_PREFIX)size
+endif
+
+ifdef DEVTOOLDIR
+	CC := $(DEVTOOLDIR)/$(CC)
+	CXX := $(DEVTOOLDIR)/$(CXX)
+	AS := $(DEVTOOLDIR)/$(AS)
+	LD := $(DEVTOOLDIR)/$(LD)
+	AR := $(DEVTOOLDIR)/$(AR)
+	NM := $(DEVTOOLDIR)/$(NM)
+	RANLIB := $(DEVTOOLDIR)/$(RANLIB)
+	OBJCOPY := $(DEVTOOLDIR)/$(OBJCOPY)
+	OBJDUMP := $(DEVTOOLDIR)/$(OBJDUMP)
+endif
+
+ifdef USE_CXX
+	LINK = $(CXX)
+else
+	LINK = $(CC)
+endif
+
+#
+#  ã³ã³ãã¤ã«ã«ã¼ã«ã®å®ç¾©
+#
+$(KERNEL_COBJS): %.o: %.c
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_LCOBJS): %.o:
+	$(CC) -DTOPPERS_$(*F) -o $@ -c -MD -MP -MF $(DEPDIR)/$*.d \
+									$(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_LCOBJS:.o=.s): %.s:
+	$(CC) -DTOPPERS_$(*F) -o $@ -S $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_ASMOBJS): %.o: %.S
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(SYSSVC_COBJS): %.o: %.c
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(SYSSVC_CFLAGS) $<
+
+$(SYSSVC_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(SYSSVC_CFLAGS) $<
+
+$(SYSSVC_ASMOBJS): %.o: %.S
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(SYSSVC_CFLAGS) $<
+
+$(APPL_COBJS): %.o: %.c
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_CXXOBJS): %.o: %.cpp
+	$(CXX) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_CXXOBJS:.o=.s): %.s: %.cpp
+	$(CXX) -S $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_ASMOBJS): %.o: %.S
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(APPL_CFLAGS) $<
+
+#
+#  ããã©ã«ãã³ã³ãã¤ã«ã«ã¼ã«ãä¸æ¸ã
+#
+%.o: %.c
+	@echo "*** Default compile rules should not be used."
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $<
+
+%.s: %.c
+	@echo "*** Default compile rules should not be used."
+	$(CC) -S $(CFLAGS) $<
+
+%.o: %.cpp
+	@echo "*** Default compile rules should not be used."
+	$(CXX) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $<
+
+%.s: %.cpp
+	@echo "*** Default compile rules should not be used."
+	$(CXX) -S $(CFLAGS) $<
+
+%.o: %.S
+	@echo "*** Default compile rules should not be used."
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $<
Index: EcnlProtoTool/trunk/asp3_dcre/MANIFEST
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/MANIFEST	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/MANIFEST	(revision 270)
@@ -0,0 +1,162 @@
+PACKAGE asp3
+VERSION 3.1.0
+
+configure.rb
+MANIFEST
+README.txt
+
+doc/asp_spec.txt
+doc/configurator.txt
+doc/design.txt
+doc/extension.txt
+doc/migration.txt
+doc/porting.txt
+doc/user.txt
+doc/version.txt
+
+include/itron.h
+include/kernel.h
+include/log_output.h
+include/queue.h
+include/sil.h
+include/t_stddef.h
+include/t_stdlib.h
+include/t_syslog.h
+
+kernel/Makefile.kernel
+kernel/alarm.c
+kernel/alarm.h
+kernel/alarm.trb
+kernel/allfunc.h
+kernel/check.h
+kernel/cyclic.c
+kernel/cyclic.h
+kernel/cyclic.trb
+kernel/dataqueue.c
+kernel/dataqueue.h
+kernel/dataqueue.trb
+kernel/eventflag.c
+kernel/eventflag.h
+kernel/eventflag.trb
+kernel/exception.c
+kernel/exception.h
+kernel/exception.trb
+kernel/genoffset.trb
+kernel/interrupt.c
+kernel/interrupt.h
+kernel/interrupt.trb
+kernel/kernel.trb
+kernel/kernel_api.def
+kernel/kernel_check.trb
+kernel/kernel_impl.h
+kernel/kernel_int.h
+kernel/kernel_rename.def
+kernel/kernel_rename.h
+kernel/kernel_sym.def
+kernel/kernel_unrename.h
+kernel/mempfix.c
+kernel/mempfix.h
+kernel/mempfix.trb
+kernel/mutex.c
+kernel/mutex.h
+kernel/mutex.trb
+kernel/pridataq.c
+kernel/pridataq.h
+kernel/pridataq.trb
+kernel/semaphore.c
+kernel/semaphore.h
+kernel/semaphore.trb
+kernel/startup.c
+kernel/sys_manage.c
+kernel/task.c
+kernel/task.h
+kernel/task.trb
+kernel/task_manage.c
+kernel/task_refer.c
+kernel/task_sync.c
+kernel/task_term.c
+kernel/taskhook.c
+kernel/taskhook.h
+kernel/time_event.c
+kernel/time_event.h
+kernel/time_manage.c
+kernel/wait.c
+kernel/wait.h
+
+tecs_kernel/init_tecs.c
+tecs_kernel/kernel.cdl
+tecs_kernel/tAlarmNotifier.c
+tecs_kernel/tAlarmNotifier_inline.h
+tecs_kernel/tCpuExceptionHandler.c
+tecs_kernel/tCyclicNotifier.c
+tecs_kernel/tCyclicNotifier_inline.h
+tecs_kernel/tDataqueue_inline.h
+tecs_kernel/tEventflag_inline.h
+tecs_kernel/tFixedSizeMemoryPool_inline.h
+tecs_kernel/tISR.c
+tecs_kernel/tInitializeRoutine.c
+tecs_kernel/tInterruptHandler.c
+tecs_kernel/tInterruptRequest_inline.h
+tecs_kernel/tKernel_inline.h
+tecs_kernel/tMutex_inline.h
+tecs_kernel/tPriorityDataqueue_inline.h
+tecs_kernel/tSemaphore_inline.h
+tecs_kernel/tTask.c
+tecs_kernel/tTask_inline.h
+tecs_kernel/tTerminateRoutine.c
+tecs_kernel/tecs_kernel.h
+
+syssvc/histogram.h
+syssvc/serial.h
+syssvc/syslog.h
+syssvc/tHistogram.c
+syssvc/tHistogram.cdl
+syssvc/tHistogram.h
+syssvc/tHistogramAdapter.c
+syssvc/tHistogramAdapter.cdl
+syssvc/tBanner.cdl
+syssvc/tBannerMain.c
+syssvc/tLogTask.cdl
+syssvc/tLogTaskMain.c
+syssvc/tSerialAdapter.c
+syssvc/tSerialAdapter.cdl
+syssvc/tSerialPort.cdl
+syssvc/tSerialPortMain.c
+syssvc/tSysLog.c
+syssvc/tSysLog.cdl
+syssvc/tSysLogAdapter.c
+syssvc/tSysLogAdapter.cdl
+syssvc/tTestService.c
+syssvc/tTestService.cdl
+syssvc/test_svc.h
+
+library/log_output.c
+library/strerror.c
+library/t_perror.c
+library/vasyslog.c
+
+arch/gcc/tool_stddef.h
+
+arch/tracelog/trace_log.h
+arch/tracelog/tTraceLog.c
+arch/tracelog/tTraceLog.cdl
+
+utils/applyrename.rb
+utils/genrename.rb
+utils/gentest.rb
+utils/makerelease.rb
+
+sample/Makefile
+sample/sample1.c
+sample/sample1.cdl
+sample/sample1.cfg
+sample/sample1.h
+sample/tSample2.c
+sample/tSample2.cdl
+sample/tSample2.cfg
+sample/tSample2.h
+
+INCLUDE cfg/MANIFEST
+INCLUDE test/MANIFEST
+INCLUDE extension/MANIFEST
+INCLUDE target/dummy_gcc/MANIFEST
Index: EcnlProtoTool/trunk/asp3_dcre/README.txt
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/README.txt	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/README.txt	(revision 270)
@@ -0,0 +1,56 @@
+
+	TOPPERS/ASP3 Kernelï¼Release 3.1ï¼
+		Toyohashi Open Platform for Embedded Real-Time Systems/
+		Advanced Standard Profile Kernel
+
+TOPPERS/ASP3ã«ã¼ãã«ï¼TOPPERS/ASPã«ã¼ãã« Release 3.Xï¼ä»¥ä¸ï¼ASP3ã«ã¼ã
+ã«ï¼ã¯ï¼TOPPERS/ASPã«ã¼ãã«ãæ¡å¼µã»æ¹è¯ãããã®ã§ï¼TOPPERSç¬¬3ä¸ä»£ã«ã¼ã
+ã«ï¼ITRONç³»ï¼ã®åºç¤ã¨ãªããã®ã¨ãã¦éçºãããªã¢ã«ã¿ã¤ã ã«ã¼ãã«ã§ãï¼
+
+TOPPERS/ASPã«ã¼ãã«ã¯ï¼Î¼ITRON4.0ä»æ§ã®ã¹ã¿ã³ãã¼ããã­ãã¡ã¤ã«æºæ ã®ãª
+ã¢ã«ã¿ã¤ã ã«ã¼ãã«ã§ããTOPPERS/JSPã«ã¼ãã«ãæ¡å¼µã»æ¹è¯ããå½¢ã§éçºãã
+ãã®ã§ãï¼
+
+ãæåã«èª­ãã¹ããã­ã¥ã¡ã³ãã
+
+ASP3ã«ã¼ãã«ã®ä»æ§æ¦è¦ãdoc/asp_spec.txtã«ï¼ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«ã
+doc/user.txtã«ããã¾ãï¼ã¾ãï¼å¾æ¥ã®TOPPERSã«ã¼ãã«ããASP3ã«ã¼ãã«ã¸ç§»
+è¡ããããã®æ¹æ³ãè¨è¿°ãããã¤ã°ã¬ã¼ã·ã§ã³ã¬ã¤ããdoc/migration.txtã«ã
+ãã¾ãï¼ASP3ã«ã¼ãã«ãä½¿ç¨ããå ´åã«ã¯ï¼ã¾ãã¯ãããã®ãã­ã¥ã¡ã³ããã
+èª­ã¿ä¸ããï¼
+
+ããã¡ã¤ã«ã®é²è¦§ã«ããã£ã¦ã
+
+ASP3ã«ã¼ãã«ã®ãã­ã¥ã¡ã³ãï¼ãã¬ã¼ã³ãã­ã¹ããã¡ã¤ã«ï¼ããã³ã½ã¼ã¹ãã¡
+ã¤ã«ãèª­ãéã«ã¯ï¼TABã4ã«è¨­å®ãã¦ãã ããï¼
+
+ãå©ç¨æ¡ä»¶ã
+
+ASP3ã«ã¼ãã«ã®å©ç¨æ¡ä»¶ã¯ï¼åãã¡ã¤ã«ã®å
+é ­ã«è¡¨ç¤ºããã¦ããTOPPERSã©ã¤ã»
+ã³ã¹ã§ãï¼TOPPERSã©ã¤ã»ã³ã¹ã«é¢ããFAQãï¼ä»¥ä¸ã®ãã¼ã¸ã«ããã¾ãï¼
+
+	http://www.toppers.jp/faq/faq_ct12.html
+
+ãè³ªåã»ãã°ã¬ãã¼ãã»æè¦ç­ã®éä»å
+ã
+
+ASP3ã«ã¼ãã«ãããè¯ããã®ã«ããããã®ãæè¦ç­ãæ­è¿ãã¾ãï¼ASP3ã«ã¼ã
+ã«ã«é¢ããè³ªåããã°ã¬ãã¼ãï¼ãæè¦ç­ã¯ï¼TOPPERSãã­ã¸ã§ã¯ãã®ä¼å¡ã¯
+TOPPERSéçºè
+ã¡ã¼ãªã³ã°ãªã¹ãï¼dev@toppers.jpï¼å®ã¾ãã¯ASP3ã«ã¼ãã«ã®ã
+ã°ãã©ãã­ã³ã°ã·ã¹ãã ï¼Tracï¼ã«ï¼ãã®ä»ã®æ¹ã¯TOPPERSã¦ã¼ã¶ã¼ãºã¡ã¼ãªã³
+ã°ãªã¹ãï¼users@toppers.jpï¼å®ã«ãé¡ããã¾ãï¼
+
+TOPPERSã¦ã¼ã¶ã¼ãºã¡ã¼ãªã³ã°ãªã¹ãã¸ã®ç»é²æ¹æ³ã«ã¤ãã¦ã¯ï¼ä»¥ä¸ã®ãã¼ã¸ã«
+èª¬æãããã¾ãï¼
+
+	http://www.toppers.jp/community.html
+
+ããã¼ãã£ã³ã°ã«ããã£ã¦ã
+
+ASP3ã«ã¼ãã«ãï¼TOPPERSãã­ã¸ã§ã¯ããããªã¼ãã³ã½ã¼ã¹ã«ãããã¨ãåæã«ï¼
+æªãµãã¼ãã®ã¿ã¼ã²ããã«ãã¼ãã£ã³ã°ãããå ´åã«ã¯ï¼ããããããç¸è«ã
+ã ããã¨å¹¸ãã§ãï¼
+
+ä»¥ä¸
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/MANIFEST
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/MANIFEST	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/MANIFEST	(revision 270)
@@ -0,0 +1,46 @@
+PACKAGE asp3_arch_arm_gcc
+VERSION 3.1.0
+
+MANIFEST
+
+doc/arm_design.txt
+doc/arm_user.txt
+doc/gic_design.txt
+
+common/Makefile.core
+common/arm.c
+common/arm.h
+common/arm_insn.h
+common/core_asm.inc
+common/core_cfg1_out.h
+common/core_check.trb
+common/core_kernel.h
+common/core_kernel.trb
+common/core_kernel_impl.c
+common/core_kernel_impl.h
+common/core_offset.trb
+common/core_rename.def
+common/core_rename.h
+common/core_sil.h
+common/core_stddef.h
+common/core_support.S
+common/core_sym.def
+common/core_syssvc.h
+common/core_test.h
+common/core_unrename.h
+common/gic_kernel_impl.c
+common/gic_kernel_impl.h
+common/gic_support.S
+common/pl310.c
+common/pl310.h
+common/sp804.h
+common/start.S
+common/tUartPL011.c
+common/tUartPL011.cdl
+common/uart_pl011.h
+
+INCLUDE mpcore/MANIFEST
+INCLUDE rza1/MANIFEST
+
+INCLUDE ../../target/ct11mpcore_gcc/MANIFEST
+INCLUDE ../../target/gr_peach_gcc/MANIFEST
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/Makefile.core
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/Makefile.core	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/Makefile.core	(revision 270)
@@ -0,0 +1,57 @@
+#
+#		Makefileã®ã³ã¢ä¾å­é¨ï¼ARMç¨ï¼
+#
+#  $Id: Makefile.core 572 2016-02-01 14:40:09Z ertl-hiro $
+#
+
+#
+#  ã³ã¢ä¾å­é¨ãã£ã¬ã¯ããªåã®å®ç¾©
+#
+COREDIR = $(SRCDIR)/arch/$(CORE)_$(TOOL)/common
+
+#
+#  ãã¼ã«ä¾å­é¨ãã£ã¬ã¯ããªåã®å®ç¾© 
+#
+TOOLDIR = $(SRCDIR)/arch/$(TOOL)
+
+#
+#  GNUéçºç°å¢ã®ã¿ã¼ã²ããã¢ã¼ã­ãã¯ãã£ã®å®ç¾©
+#
+ifndef GCC_TARGET
+	GCC_TARGET = arm-none-eabi
+endif
+
+#
+#  ã³ã³ãã¤ã«ãªãã·ã§ã³
+#
+INCLUDES := $(INCLUDES) -I$(COREDIR) -I$(TOOLDIR)
+LIBS := $(LIBS) -lgcc
+
+#
+#  ã«ã¼ãã«ã«é¢ããå®ç¾©
+#
+KERNEL_DIRS := $(KERNEL_DIRS) $(COREDIR)
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS) core_support.o
+KERNEL_COBJS := $(KERNEL_COBJS) core_kernel_impl.o arm.o
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿é¢ä¿ã®å¤æ°ã®å®ç¾©
+#
+CFG_TABS := $(CFG_TABS) --symval-table $(COREDIR)/core_sym.def
+
+#
+#  ãªãã»ãããã¡ã¤ã«çæã®ããã®å®ç¾©
+#
+TARGET_OFFSET_TRB = $(COREDIR)/core_offset.trb
+
+#
+#  ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼ã«ã«é¢ããå®ç¾©
+#
+#  START_OBJSãstart.oã«è¨­å®ãï¼LDFLAGSã«-nostdlibãè¿½å ããï¼
+#
+START_OBJS = start.o
+
+$(START_OBJS): %.o: %.S
+	$(CC) -c $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+LDFLAGS := -nostdlib $(LDFLAGS)
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/arm.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/arm.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/arm.c	(revision 270)
@@ -0,0 +1,213 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *
+ *  Copyright (C) 2006-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ARMã³ã¢ãµãã¼ãã¢ã¸ã¥ã¼ã«
+ */
+
+#include "arm.h"
+
+/*
+ *  ã­ã£ãã·ã¥ã®æä½
+ */
+
+/*
+ *  ãã¼ã¿ã­ã£ãã·ã¥ã®ã¤ãã¼ãã«
+ */
+void
+arm_enable_dcache(void)
+{
+	uint32_t	reg;
+
+	CP15_READ_SCTLR(reg);
+	if ((reg & CP15_SCTLR_DCACHE) == 0U) {
+		arm_invalidate_dcache();
+
+		reg |= CP15_SCTLR_DCACHE;
+		CP15_WRITE_SCTLR(reg);
+	}
+}
+
+/*
+ *  ãã¼ã¿ã­ã£ãã·ã¥ã®ãã£ã¹ã¨ã¼ãã«
+ *
+ *  ãã¼ã¿ã­ã£ãã·ã¥ãç¡å¹ãªç¶æ
+ã§clean_and_invalidateãå®è¡ããã¨æ´èµ°
+ *  ããå ´åãããããï¼ãã¼ã¿ã­ã£ãã·ã¥ã®ç¶æ
+ãå¤æ­ãã¦ï¼ç¡å¹ãªå ´åã¯ï¼
+ *  ç¡å¹åã®ã¿ãè¡ãï¼
+ */
+void
+arm_disable_dcache(void)
+{
+	uint32_t	reg;
+
+	CP15_READ_SCTLR(reg);
+	if ((reg & CP15_SCTLR_DCACHE) == 0U) {
+		arm_invalidate_dcache();
+	}
+	else {
+		reg &= ~CP15_SCTLR_DCACHE;
+		CP15_WRITE_SCTLR(reg);
+
+		arm_clean_and_invalidate_dcache();
+	}
+}
+
+/*
+ *  å½ä»¤ã­ã£ãã·ã¥ã®ã¤ãã¼ãã«
+ */
+void
+arm_enable_icache(void)
+{
+	uint32_t	reg;
+
+	CP15_READ_SCTLR(reg);
+	if ((reg & CP15_SCTLR_ICACHE) == 0U) {
+		arm_invalidate_icache();
+
+		reg |= CP15_SCTLR_ICACHE;
+		CP15_WRITE_SCTLR(reg);
+	}
+}
+
+/*
+ *  å½ä»¤ã­ã£ãã·ã¥ã®ãã£ã¹ã¨ã¼ãã«
+ */
+void
+arm_disable_icache(void)
+{
+	uint32_t	reg;
+
+	CP15_READ_SCTLR(reg);
+	reg &= ~CP15_SCTLR_ICACHE;
+	CP15_WRITE_SCTLR(reg);
+
+	arm_invalidate_icache();
+}
+
+/*
+ *  ARMv5ã«ããããã¼ã¿ã­ã£ãã·ã¥ã®ã¯ãªã¼ã³ã¨ç¡å¹å
+ */
+#if __TARGET_ARCH_ARM <= 5
+
+void
+armv5_clean_and_invalidate_dcache(void)
+{
+	ARMV5_CLEAN_AND_INVALIDATE_DCACHE();
+}
+
+#endif /* __TARGET_ARCH_ARM <= 5 */
+
+/*
+ *  ARMv7ã«ããããã¼ã¿ã­ã£ãã·ã¥ã®ç¡å¹å
+ *
+ *  ã¬ãã«0ã®ã­ã£ãã·ã¥ã®ã¿ãç¡å¹åããï¼
+ */
+#if __TARGET_ARCH_ARM == 7
+
+void
+armv7_invalidate_dcache(void)
+{
+	uint32_t	reg;
+	uint32_t	way, no_ways, shift_way;
+	uint32_t	set, no_sets, shift_set;
+
+	CP15_WRITE_CSSELR(0U);
+	CP15_READ_CCSIDR(reg);
+	no_sets = ((reg >> 13) & 0x7fffU) + 1;
+	shift_set = (reg & 0x07U) + 4;
+	no_ways = ((reg >> 3) & 0x3ffU) + 1;
+	shift_way = count_leading_zero(no_ways);
+
+	for (way = 0; way < no_ways; way++){
+		for (set = 0; set < no_sets; set++) {
+			reg = (way << shift_way) | (set << shift_set);
+			CP15_WRITE_DCISW(reg);
+		}
+	}
+}
+
+#endif /* __TARGET_ARCH_ARM == 7 */
+
+/*
+ *  ARMv7ã«ããããã¼ã¿ã­ã£ãã·ã¥ã®ã¯ãªã¼ã³ã¨ç¡å¹å
+ *
+ *  ã¬ãã«0ã®ã­ã£ãã·ã¥ã®ã¿ãã¯ãªã¼ã³ã¨ç¡å¹åããï¼
+ */
+#if __TARGET_ARCH_ARM == 7
+
+void
+armv7_clean_and_invalidate_dcache(void)
+{
+	uint32_t	reg;
+	uint32_t	way, no_ways, shift_way;
+	uint32_t	set, no_sets, shift_set;
+
+	CP15_WRITE_CSSELR(0U);
+	CP15_READ_CCSIDR(reg);
+	no_sets = ((reg >> 13) & 0x7fffU) + 1;
+	shift_set = (reg & 0x07U) + 4;
+	no_ways = ((reg >> 3) & 0x3ffU) + 1;
+	shift_way = count_leading_zero(no_ways);
+
+	for (way = 0; way < no_ways; way++){
+		for (set = 0; set < no_sets; set++) {
+			reg = (way << shift_way) | (set << shift_set);
+			CP15_WRITE_DCCISW(reg);
+		}
+	}
+}
+
+#endif /* __TARGET_ARCH_ARM == 7 */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/arm.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/arm.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/arm.h	(revision 270)
@@ -0,0 +1,465 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ARMã³ã¢ãµãã¼ãã¢ã¸ã¥ã¼ã«
+ */
+
+#ifndef TOPPERS_ARM_H
+#define TOPPERS_ARM_H
+
+#include <t_stddef.h>
+
+/*
+ *  ARMã³ã¢ã®ç¹æ®å½ä»¤ã®ã¤ã³ã©ã¤ã³é¢æ°å®ç¾©
+ */
+#ifndef TOPPERS_MACRO_ONLY
+#ifndef TECSGEN
+#include "arm_insn.h"				/* tecsgenãè§£éã§ããªãããã¹ã­ãã */
+#endif /* TECSGEN */
+#endif /*  TOPPERS_MACRO_ONLY */
+
+/*
+ *  ARMä¾å¤ãã¯ã¿
+ */
+#define RESET_VECTOR	UINT_C(0x00)
+#define UNDEF_VECTOR	UINT_C(0x04)
+#define SVC_VECTOR		UINT_C(0x08)
+#define PABORT_VECTOR	UINT_C(0x0c)
+#define DABORT_VECTOR	UINT_C(0x10)
+#define IRQ_VECTOR		UINT_C(0x18)
+#define FIQ_VECTOR		UINT_C(0x1c)
+
+/*
+ *  ARMä¾å¤ãã¯ã¿çªå·
+ */
+#define RESET_NUMBER	UINT_C(0)
+#define UNDEF_NUMBER	UINT_C(1)
+#define SVC_NUMBER		UINT_C(2)
+#define PABORT_NUMBER	UINT_C(3)
+#define DABORT_NUMBER	UINT_C(4)
+#define IRQ_NUMBER		UINT_C(6)
+#define FIQ_NUMBER		UINT_C(7)
+
+/*
+ *  CPSRã®å²è¾¼ã¿ç¦æ­¢ããã
+ */
+#define CPSR_INT_MASK	UINT_C(0xc0)
+#define CPSR_IRQ_BIT	UINT_C(0x80)
+#define CPSR_FIQ_BIT	UINT_C(0x40)
+
+/*
+ *  CPSRã®Thumbããã
+ */
+#define CPSR_THUMB_BIT	UINT_C(0x20)
+
+/*
+ *  CPSRã®ã¢ã¼ãããã
+ */
+#define CPSR_MODE_MASK	UINT_C(0x1f)
+#define CPSR_USER_MODE	UINT_C(0x10)
+#define CPSR_FIQ_MODE	UINT_C(0x11)
+#define CPSR_IRQ_MODE	UINT_C(0x12)
+#define CPSR_SVC_MODE	UINT_C(0x13)
+#define CPSR_ABT_MODE	UINT_C(0x17)
+#define CPSR_UND_MODE	UINT_C(0x1b)
+#define CPSR_SYS_MODE	UINT_C(0x1f)
+
+/*
+ *  CP15ã®ã·ã¹ãã å¶å¾¡ã¬ã¸ã¹ã¿ï¼SCTLRï¼ã®è¨­å®å¤
+ *
+ *  ARMv7ã§ã¯ï¼CP15_SCTLR_EXTPAGEã¯å¸¸ã«1ã«ãªã£ã¦ããï¼
+ */
+#if __TARGET_ARCH_ARM == 6
+#define CP15_SCTLR_EXTPAGE		UINT_C(0x00800000)
+#endif /* __TARGET_ARCH_ARM == 6 */
+#define CP15_SCTLR_VECTOR		UINT_C(0x00002000)
+#define CP15_SCTLR_ICACHE		UINT_C(0x00001000)
+#define CP15_SCTLR_BP			UINT_C(0x00000800)
+#define CP15_SCTLR_DCACHE		UINT_C(0x00000004)
+#define CP15_SCTLR_MMU			UINT_C(0x00000001)
+
+/*
+ *  CP15ã®ãã©ã¼ã«ãç¶æ
+ã¬ã¸ã¹ã¿ã®åç
+§å¤
+ */
+#define CP15_FSR_FS_MASK			UINT_C(0x0000040f)
+#define CP15_FSR_FS_ALIGNMENT		UINT_C(0x00000001)
+#define CP15_FSR_FS_TRANSLATION1	UINT_C(0x00000005)
+#define CP15_FSR_FS_TRANSLATION2	UINT_C(0x00000007)
+#define CP15_FSR_FS_PERMISSION1		UINT_C(0x0000000d)
+#define CP15_FSR_FS_PERMISSION2		UINT_C(0x0000000f)
+
+/*
+ *  CP15ã®ããã©ã¼ãã³ã¹ã¢ãã¿å¶å¾¡ã¬ã¸ã¹ã¿ï¼PMCRï¼ã®è¨­å®å¤
+ */
+#define CP15_PMCR_ALLCNTR_ENABLE		UINT_C(0x01)
+#define CP15_PMCR_PMCCNTR_DIVIDER		UINT_C(0x08)
+
+/*
+ *  CP15ã®ããã©ã¼ãã³ã¹ã¢ãã¿ã«ã¦ã³ãã¤ãã¼ãã«ã»ããã¬ã¸ã¹ã¿ï¼PMCNTENSETï¼
+ *  ã®è¨­å®å¤
+ */
+#define CP15_PMCNTENSET_CCNTR_ENABLE	UINT_C(0x80000000)
+
+/*
+ *  CP15ã®å¤æãã¼ãã«ãã¼ã¹ã¬ã¸ã¹ã¿ï¼TTBRï¼ã®è¨­å®å¤
+ */
+#define CP15_TTBR_RGN_SHAREABLE		UINT_C(0x00000002)
+#if __TARGET_ARCH_ARM == 7
+#define CP15_TTBR_RGN_WBWA			UINT_C(0x00000008)
+#endif /* __TARGET_ARCH_ARM == 7 */
+#define CP15_TTBR_RGN_WTHROUGH		UINT_C(0x00000010)
+#define CP15_TTBR_RGN_WBACK			UINT_C(0x00000018)
+#if __TARGET_ARCH_ARM < 7
+#define CP15_TTBR_RGN_CACHEABLE		UINT_C(0x00000001)
+#else /* __TARGET_ARCH_ARM < 7 */
+#define CP15_TTBR_IRGN_WBWA			UINT_C(0x00000040)
+#define CP15_TTBR_IRGN_WTHROUGH		UINT_C(0x00000001)
+#define CP15_TTBR_IRGN_WBACK		UINT_C(0x00000041)
+#endif /* __TARGET_ARCH_ARM < 7 */
+
+/*
+ *  MMUé¢é£ã®å®ç¾©ï¼VMSAï¼
+ */
+
+/*
+ *  ã»ã¯ã·ã§ã³ã¨ãã¼ã¸ã®ãµã¤ãº
+ */
+#define ARM_SSECTION_SIZE			UINT_C(0x1000000)
+#define ARM_SECTION_SIZE			UINT_C(0x0100000)
+#define ARM_LPAGE_SIZE				UINT_C(0x0010000)
+#define ARM_PAGE_SIZE				UINT_C(0x0001000)
+
+/*
+ *  ã»ã¯ã·ã§ã³ãã¼ãã«ã¨ãã¼ã¸ãã¼ãã«ã®ãµã¤ãº
+ */
+#define ARM_SECTION_TABLE_SIZE		UINT_C(0x4000)
+#define ARM_SECTION_TABLE_ALIGN		UINT_C(0x4000)
+#define ARM_SECTION_TABLE_ENTRY		(ARM_SECTION_TABLE_SIZE / sizeof(uint32_t))
+
+#define ARM_PAGE_TABLE_SIZE			UINT_C(0x0400)
+#define ARM_PAGE_TABLE_ALIGN		UINT_C(0x0400)
+#define ARM_PAGE_TABLE_ENTRY		(ARM_PAGE_TABLE_SIZE / sizeof(uint32_t))
+
+/*
+ *  ç¬¬1ã¬ãã«ãã£ã¹ã¯ãªãã¿ã®è¨­å®å¤
+ */
+#define ARM_MMU_DSCR1_FAULT			0x00000U	/* ãã©ã«ã */
+#define ARM_MMU_DSCR1_PAGETABLE		0x00001U	/* ã³ã¢ã¼ã¹ãã¼ã¸ãã¼ãã« */
+#define ARM_MMU_DSCR1_SECTION		0x00002U	/* ã»ã¯ã·ã§ã³ */
+#define ARM_MMU_DSCR1_SSECTION		0x40002U	/* ã¹ã¼ãã¼ã»ã¯ã·ã§ã³ */
+
+#define ARM_MMU_DSCR1_SHARED		0x10000U	/* ãã­ã»ããµéã§å
+±æ */
+#define ARM_MMU_DSCR1_TEX000		0x00000U	/* TEXãããã000 */
+#define ARM_MMU_DSCR1_TEX001		0x01000U	/* TEXãããã001 */
+#define ARM_MMU_DSCR1_TEX010		0x02000U	/* TEXãããã010 */
+#define ARM_MMU_DSCR1_TEX100		0x04000U	/* TEXãããã100 */
+#define ARM_MMU_DSCR1_AP01			0x00400U	/* APãããã01 */
+#define ARM_MMU_DSCR1_AP10			0x00800U	/* APãããã10 */
+#define ARM_MMU_DSCR1_AP11			0x00c00U	/* APãããã11 */
+#define ARM_MMU_DSCR1_CB00			0x00000U	/* Cãããã0ï¼Bãããã0 */
+#define ARM_MMU_DSCR1_CB01			0x00004U	/* Cãããã0ï¼Bãããã1 */
+#define ARM_MMU_DSCR1_CB10			0x00008U	/* Cãããã1ï¼Bãããã0 */
+#define ARM_MMU_DSCR1_CB11			0x0000cU	/* Cãããã1ï¼Bãããã1 */
+
+#if __TARGET_ARCH_ARM >= 6
+#define ARMV6_MMU_DSCR1_NONGLOBAL	0x20000U	/* ã°ã­ã¼ãã«ã§ãªã */
+#define ARMV6_MMU_DSCR1_APX0		0x00000U	/* APXãããã0 */
+#define ARMV6_MMU_DSCR1_APX1		0x08000U	/* APXãããã1 */
+#define ARMV6_MMU_DSCR1_ECC			0x00200U	/* ECCãæå¹ï¼MPCoreï¼*/
+#define ARMV6_MMU_DSCR1_NOEXEC		0x00010U	/* å®è¡ä¸å¯ */
+#endif /* __TARGET_ARCH_ARM >= 6 */
+
+/*
+ *  ç¬¬2ã¬ãã«ãã£ã¹ã¯ãªãã¿ã®è¨­å®å¤
+ */
+#define ARM_MMU_DSCR2_FAULT			0x0000U		/* ãã©ã«ã */
+#define ARM_MMU_DSCR2_LARGE			0x0001U		/* ã©ã¼ã¸ãã¼ã¸ */
+#define ARM_MMU_DSCR2_SMALL			0x0002U		/* ã¹ã¢ã¼ã«ãã¼ã¸ */
+
+#define ARM_MMU_DSCR2_CB00			0x0000U		/* Cãããã0ï¼Bãããã0 */
+#define ARM_MMU_DSCR2_CB01			0x0004U		/* Cãããã0ï¼Bãããã1 */
+#define ARM_MMU_DSCR2_CB10			0x0008U		/* Cãããã1ï¼Bãããã0 */
+#define ARM_MMU_DSCR2_CB11			0x000cU		/* Cãããã1ï¼Bãããã1 */
+
+#if __TARGET_ARCH_ARM < 6
+
+#define ARMV5_MMU_DSCR2_AP01		0x0550U		/* AP[0-3]ãããã01 */
+#define ARMV5_MMU_DSCR2_AP10		0x0aa0U		/* AP[0-3]ãããã10 */
+#define ARMV5_MMU_DSCR2_AP11		0x0ff0U		/* AP[0-3]ãããã11 */
+
+/* ã©ã¼ã¸ãã¼ã¸ã®ãã£ã¹ã¯ãªãã¿ç¨ */
+#define ARMV5_MMU_DSCR2L_TEX000		0x0000U		/* TEXãããã000 */
+#define ARMV5_MMU_DSCR2L_TEX001		0x1000U		/* TEXãããã001 */
+#define ARMV5_MMU_DSCR2L_TEX010		0x2000U		/* TEXãããã010 */
+#define ARMV5_MMU_DSCR2L_TEX100		0x4000U		/* TEXãããã100 */
+
+#else /* __TARGET_ARCH_ARM < 6 */
+
+#define ARMV6_MMU_DSCR2_NONGLOBAL	0x0800U		/* ã°ã­ã¼ãã«ã§ãªã */
+#define ARMV6_MMU_DSCR2_SHARED		0x0400U		/* ãã­ã»ããµéã§å
+±æ */
+#define ARMV6_MMU_DSCR2_APX0		0x0000U		/* APXãããã0 */
+#define ARMV6_MMU_DSCR2_APX1		0x0200U		/* APXãããã1 */
+#define ARMV6_MMU_DSCR2_AP01		0x0010U		/* APãããã01 */
+#define ARMV6_MMU_DSCR2_AP10		0x0020U		/* APãããã10 */
+#define ARMV6_MMU_DSCR2_AP11		0x0030U		/* APãããã11 */
+
+/* ã©ã¼ã¸ãã¼ã¸ã®ãã£ã¹ã¯ãªãã¿ç¨ */
+#define ARMV6_MMU_DSCR2L_TEX000		0x0000U		/* TEXãããã000 */
+#define ARMV6_MMU_DSCR2L_TEX001		0x1000U		/* TEXãããã001 */
+#define ARMV6_MMU_DSCR2L_TEX010		0x2000U		/* TEXãããã010 */
+#define ARMV6_MMU_DSCR2L_TEX100		0x4000U		/* TEXãããã100 */
+#define ARMV6_MMU_DSCR2L_NOEXEC		0x8000U		/* å®è¡ä¸å¯ */
+
+/* ã¹ã¢ã¼ã«ãã¼ã¸ã®ãã£ã¹ã¯ãªãã¿ç¨ */
+#define ARMV6_MMU_DSCR2S_TEX000		0x0000U		/* TEXãããã000 */
+#define ARMV6_MMU_DSCR2S_TEX001		0x0040U		/* TEXãããã001 */
+#define ARMV6_MMU_DSCR2S_TEX010		0x0080U		/* TEXãããã010 */
+#define ARMV6_MMU_DSCR2S_TEX100		0x0100U		/* TEXãããã100 */
+#define ARMV6_MMU_DSCR2S_NOEXEC		0x0001U		/* å®è¡ä¸å¯ */
+
+#endif /* __TARGET_ARCH_ARM < 6 */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *	ã³ãã­ã»ããµ15ã®æä½é¢æ°
+ */
+
+/*
+ *  High exception vectorsãä½¿ãããã«è¨­å®
+ */
+Inline void
+arm_set_high_vectors(void)
+{
+	uint32_t	reg;
+
+	CP15_READ_SCTLR(reg);
+	reg |= CP15_SCTLR_VECTOR;
+	CP15_WRITE_SCTLR(reg);
+}
+
+/*
+ *  Low exception vectorsãä½¿ãããã«è¨­å®
+ */
+Inline void
+arm_set_low_vectors(void)
+{
+	uint32_t	reg;
+
+	CP15_READ_SCTLR(reg);
+	reg &= ~CP15_SCTLR_VECTOR;
+	CP15_WRITE_SCTLR(reg);
+}
+
+/*
+ *  åå²äºæ¸¬ãã¤ãã¼ãã«
+ */
+Inline void
+arm_enable_bp(void)
+{
+	uint32_t	reg;
+
+	CP15_READ_SCTLR(reg);
+	reg |= CP15_SCTLR_BP;
+	CP15_WRITE_SCTLR(reg);
+}
+
+/*
+ *  åå²äºæ¸¬ããã£ã¹ã¨ã¼ãã«
+ */
+Inline void
+arm_disable_bp(void)
+{
+	uint32_t	reg;
+
+	CP15_READ_SCTLR(reg);
+	reg &= ~CP15_SCTLR_BP;
+	CP15_WRITE_SCTLR(reg);
+}
+
+/*
+ *  ãã­ã»ããµçªå·ã®åå¾
+ *
+ *  ãã«ããã­ã»ããµã¢ãã£ããã£ã¬ã¸ã¹ã¿ãèª­ãã§ï¼ãã®ä¸ä½8ããããè¿ãï¼
+ *  ARMv6ã§ã¯ï¼ãã«ããã­ã»ããµããµãã¼ããã¦ããå ´åã«ã®ã¿ä½¿ç¨ã§ããï¼
+ */
+#if __TARGET_ARCH_ARM >= 6
+
+Inline uint32_t
+arm_prc_index(void)
+{
+	uint32_t	reg;
+
+	CP15_READ_MPIDR(reg);
+	return(reg & 0xffU);
+}
+
+#endif /* __TARGET_ARCH_ARM >= 6 */
+
+/*
+ *  ã­ã£ãã·ã¥ã®æä½
+ */
+
+/*
+ *  å½ä»¤ï¼ãã¼ã¿ã­ã£ãã·ã¥ã®ã¤ãã¼ãã«ï¼ãã£ã¹ã¨ã¼ãã«
+ */
+extern void arm_enable_icache(void);
+extern void arm_disable_icache(void);
+extern void arm_enable_dcache(void);
+extern void arm_disable_dcache(void);
+
+/*
+ *  ã­ã£ãã·ã¥ã®ã¤ãã¼ãã«
+ */
+Inline void
+arm_enable_cache(void)
+{
+	arm_enable_icache();
+	arm_enable_dcache();
+}
+
+/*
+ *  ã­ã£ãã·ã¥ã®ãã£ã¹ã¨ã¼ãã«
+ */
+Inline void
+arm_disable_cache(void)
+{
+	arm_disable_icache();
+	arm_disable_dcache();
+}
+
+/*
+ *  ARMv5ã«ããããã¼ã¿ã­ã£ãã·ã¥ã®ç¡å¹åï¼ã¯ãªã¼ã³
+ */
+#if __TARGET_ARCH_ARM <= 5
+extern void armv5_clean_and_invalidate_dcache(void);
+#endif /* __TARGET_ARCH_ARM <= 5 */
+
+/*
+ *  ARMv7ã«ããããã¼ã¿ã­ã£ãã·ã¥ã®ç¡å¹åï¼ã¯ãªã¼ã³
+ */
+#if __TARGET_ARCH_ARM == 7
+extern void armv7_invalidate_dcache(void);
+extern void armv7_clean_and_invalidate_dcache(void);
+#endif /* __TARGET_ARCH_ARM == 7 */
+
+/*
+ *  ãã¼ã¿ã­ã£ãã·ã¥ã¨çµ±åã­ã£ãã·ã¥ã®ç¡å¹å
+ */
+Inline void
+arm_invalidate_dcache(void)
+{
+#if __TARGET_ARCH_ARM <= 6
+	CP15_INVALIDATE_DCACHE();
+	CP15_INVALIDATE_UCACHE();
+#else /* __TARGET_ARCH_ARM <= 6 */
+	armv7_invalidate_dcache();
+#endif /* __TARGET_ARCH_ARM <= 6 */
+}
+
+/*
+ *  ãã¼ã¿ã­ã£ãã·ã¥ã¨çµ±åã­ã£ãã·ã¥ã®ã¯ãªã¼ã³ã¨ç¡å¹å
+ */
+Inline void
+arm_clean_and_invalidate_dcache(void)
+{
+#if __TARGET_ARCH_ARM <= 5
+	armv5_clean_and_invalidate_dcache();
+#elif __TARGET_ARCH_ARM == 6
+	CP15_CLEAN_AND_INVALIDATE_DCACHE();
+	CP15_CLEAN_AND_INVALIDATE_UCACHE();
+#else
+	armv7_clean_and_invalidate_dcache();
+#endif
+}
+
+/*
+ *  å½ä»¤ã­ã£ãã·ã¥ã®ç¡å¹å
+ */
+Inline void
+arm_invalidate_icache(void)
+{
+	CP15_INVALIDATE_ICACHE();
+}
+
+/*
+ *  åå²äºæ¸¬ã®ç¡å¹å
+ */
+Inline void
+arm_invalidate_bp(void)
+{
+	CP15_INVALIDATE_BP();
+	data_sync_barrier();
+	inst_sync_barrier();
+}
+
+/*
+ *  TLBã®ç¡å¹å
+ */
+Inline void
+arm_invalidate_tlb(void)
+{
+	CP15_INVALIDATE_TLB();
+	data_sync_barrier();
+}
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_ARM_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/arm_insn.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/arm_insn.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/arm_insn.h	(revision 270)
@@ -0,0 +1,451 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ARMã³ã¢ã®ç¹æ®å½ä»¤ã®ã¤ã³ã©ã¤ã³é¢æ°å®ç¾©
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼arm.hããã¤ã³ã¯ã«ã¼ããããï¼arm.hããåé¢ã
+ *  ã¦ããã®ã¯ï¼ã³ã³ãã¤ã©ã«ããã¤ã³ã©ã¤ã³ã¢ã»ã³ãã©ã®è¨è¿°æ¹æ³ã®éãã
+ *  å¸åããããã«ï¼ãã®ãã¡ã¤ã«ã®ã¿ãç½®ãæããã°ããããã«ããããã§
+ *  ããï¼
+ */
+
+#ifndef TOPPERS_ARM_INSN_H
+#define TOPPERS_ARM_INSN_H
+
+#include <t_stddef.h>
+
+/*
+ *  CLZï¼Count Leading Zeroï¼å½ä»¤
+ */
+#if __TARGET_ARCH_ARM >= 6
+
+Inline uint32_t
+count_leading_zero(uint32_t val)
+{
+	uint32_t	count;
+
+	Asm("clz %0, %1" : "=r"(count) : "r"(val));
+	return(count);
+}
+
+#endif /* __TARGET_ARCH_ARM >= 6 */
+
+/*
+ *  ã¡ã¢ãªãå¤æ´ããããã¨ãã³ã³ãã¤ã©ã«ä¼ããããã®ãã¯ã­
+ */
+#define ARM_MEMORY_CHANGED	Asm("":::"memory")
+
+/*
+ *  ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿ã®æä½é¢æ°
+ */
+#ifndef __thumb__
+
+/*
+ *  ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿ï¼CPSRï¼ã®ç¾å¨å¤ã®èª­åºã
+ */
+Inline uint32_t
+current_cpsr(void)
+{
+	uint32_t	cpsr;
+
+	Asm("mrs %0, cpsr" : "=r"(cpsr));
+	return(cpsr);
+}
+
+/*
+ *  ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿ï¼CPSRï¼ã®ç¾å¨å¤ã®å¤æ´
+ */
+Inline void
+set_cpsr(uint32_t cpsr)
+{
+	Asm("msr cpsr_cxsf, %0" : : "r"(cpsr) : "memory","cc");
+}
+
+#else /* __thumb__ */
+/*
+ *  Thumbã¢ã¼ãã§ã¯mrs/msrå½ä»¤ãä½¿ç¨ã§ããªãããï¼é¢æ°ã¨ãã¦å®ç¾ãã¦ï¼
+ *  ARMã¢ã¼ãã«ç§»è¡ãã¦å®è¡ããï¼
+ */
+
+/*
+ *  ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿ï¼CPSRï¼ã®ç¾å¨å¤ã®èª­åºã
+ */
+extern uint32_t current_cpsr(void);
+
+/*
+ *  ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿ï¼CPSRï¼ã®ç¾å¨å¤ã®å¤æ´
+ */
+extern void set_cpsr(uint32_t cpsr);
+
+#endif /* __thumb__ */
+
+/*
+ *  å²è¾¼ã¿ç¦æ­¢ï¼è¨±å¯é¢æ°
+ *
+ *  ARMv6ããè¿½å ãããã·ã¹ãã ç¶æ
+ãå¤æ´ããå½ä»¤ãä½¿ã£ãå²è¾¼ã¿ç¦æ­¢ï¼è¨±
+ *  å¯ã®ããã®é¢æ°ï¼
+ */
+#if __TARGET_ARCH_ARM >= 6
+
+/*
+ *  IRQã®ç¦æ­¢
+ */
+Inline void
+disable_irq(void)
+{
+	Asm("cpsid i");
+}
+
+/*
+ *  IRQã®è¨±å¯
+ */
+Inline void
+enable_irq(void)
+{
+	Asm("cpsie i");
+}
+
+/*
+ *  FIQã®ç¦æ­¢
+ */
+Inline void
+disable_fiq(void)
+{
+	Asm("cpsid f");
+}
+
+/*
+ *  FIQã®è¨±å¯
+ */
+Inline void
+enable_fiq(void)
+{
+	Asm("cpsie f");
+}
+
+/*
+ *  FIQã¨IRQã®ç¦æ­¢
+ */
+Inline void
+disable_fiq_irq(void)
+{
+	Asm("cpsid fi");
+}
+
+/*
+ *  FIQã¨IRQã®è¨±å¯
+ */
+Inline void
+enable_fiq_irq(void)
+{
+	Asm("cpsie fi");
+}
+
+#endif /* __TARGET_ARCH_ARM >= 6 */
+
+/*
+ *  CP15ã®IDã¬ã¸ã¹ã¿æä½ãã¯ã­
+ */
+
+/* ã¡ã¤ã³IDã¬ã¸ã¹ã¿ */
+#define CP15_READ_MIDR(reg)		Asm("mrc p15, 0, %0, c0, c0, 0":"=r"(reg))
+
+/* ãã«ããã­ã»ããµã¢ãã£ããã£ã¬ã¸ã¹ã¿ï¼ARMv6ä»¥éï¼*/
+#if __TARGET_ARCH_ARM >= 6
+#define CP15_READ_MPIDR(reg)	Asm("mrc p15, 0, %0, c0, c0, 5":"=r"(reg))
+#endif /* __TARGET_ARCH_ARM >= 6 */
+
+/* ã­ã£ãã·ã¥ã¿ã¤ãã¬ã¸ã¹ã¿ */
+#define CP15_READ_CTR(reg)		Asm("mrc p15, 0, %0, c0, c0, 1":"=r"(reg))
+
+#if __TARGET_ARCH_ARM == 7
+/* ã­ã£ãã·ã¥ã¬ãã«IDã¬ã¸ã¹ã¿ï¼ARMv7ï¼ */
+#define CP15_READ_CLIDR(reg)	Asm("mrc p15, 1, %0, c0, c0, 1":"=r"(reg))
+
+/* ã­ã£ãã·ã¥ãµã¤ãºé¸æã¬ã¸ã¹ã¿ï¼ARMv7ï¼*/
+#define CP15_WRITE_CSSELR(reg)	Asm("mcr p15, 2, %0, c0, c0, 0"::"r"(reg))
+
+/* ã­ã£ãã·ã¥ãµã¤ãºIDã¬ã¸ã¹ã¿ï¼ARMv7ï¼*/
+#define CP15_READ_CCSIDR(reg)	Asm("mrc p15, 1, %0, c0, c0, 0":"=r"(reg))
+#endif /* __TARGET_ARCH_ARM == 7 */
+
+/*
+ *  CP15ã®ã·ã¹ãã å¶å¾¡ã¬ã¸ã¹ã¿æä½ãã¯ã­
+ */
+
+/* ã·ã¹ãã å¶å¾¡ã¬ã¸ã¹ã¿ */
+#define CP15_READ_SCTLR(reg)	Asm("mrc p15, 0, %0, c1, c0, 0":"=r"(reg))
+#define CP15_WRITE_SCTLR(reg)	Asm("mcr p15, 0, %0, c1, c0, 0"::"r"(reg))
+
+/* è£å©å¶å¾¡ã¬ã¸ã¹ã¿ï¼æ©è½ã¯ãããä¾å­ï¼*/
+#define CP15_READ_ACTLR(reg)	Asm("mrc p15, 0, %0, c1, c0, 1":"=r"(reg))
+#define CP15_WRITE_ACTLR(reg)	Asm("mcr p15, 0, %0, c1, c0, 1"::"r"(reg))
+
+/*
+ *  CP15ã«ããã­ã£ãã·ã¥æä½ãã¯ã­
+ */
+
+/* å½ä»¤ã­ã£ãã·ã¥å
+¨ä½ã®ç¡å¹å */
+#define CP15_INVALIDATE_ICACHE() \
+								Asm("mcr p15, 0, %0, c7, c5, 0"::"r"(0))
+
+/* åå²äºæ¸¬å
+¨ä½ã®ç¡å¹å */
+#define CP15_INVALIDATE_BP()	Asm("mcr p15, 0, %0, c7, c5, 6"::"r"(0))
+
+/* ãã¼ã¿ã­ã£ãã·ã¥å
+¨ä½ã®ç¡å¹åï¼ARMv6ä»¥åï¼*/
+#if __TARGET_ARCH_ARM <= 6
+#define CP15_INVALIDATE_DCACHE() Asm("mcr p15, 0, %0, c7, c6, 0"::"r"(0))
+#endif /* __TARGET_ARCH_ARM <= 6 */
+
+/* çµ±åã­ã£ãã·ã¥å
+¨ä½ã®ç¡å¹åï¼ARMv6ä»¥åï¼*/
+#if __TARGET_ARCH_ARM <= 6
+#define CP15_INVALIDATE_UCACHE() Asm("mcr p15, 0, %0, c7, c7, 0"::"r"(0))
+#endif /* __TARGET_ARCH_ARM <= 6 */
+
+/* ãã¼ã¿ã­ã£ãã·ã¥å
+¨ä½ã®ã¯ãªã¼ã³ã¨ç¡å¹åï¼ARMv5ã®ã¿ï¼*/
+#if __TARGET_ARCH_ARM <= 5
+#define ARMV5_CLEAN_AND_INVALIDATE_DCACHE() \
+						Asm("1: mrc p15, 0, apsr_nzcv, c7, c14, 3; bne 1b")
+#endif /* __TARGET_ARCH_ARM <= 5 */
+
+/* ãã¼ã¿ã­ã£ãã·ã¥å
+¨ä½ã®ã¯ãªã¼ã³ã¨ç¡å¹åï¼ARMv6ã®ã¿ï¼*/
+#if __TARGET_ARCH_ARM == 6
+#define CP15_CLEAN_AND_INVALIDATE_DCACHE() \
+								Asm("mcr p15, 0, %0, c7, c14, 0"::"r"(0))
+#endif /* __TARGET_ARCH_ARM == 6 */
+
+/* çµ±åã­ã£ãã·ã¥å
+¨ä½ã®ã¯ãªã¼ã³ã¨ç¡å¹åï¼ARMv6ã®ã¿ï¼*/
+#if __TARGET_ARCH_ARM == 6
+#define CP15_CLEAN_AND_INVALIDATE_UCACHE() \
+								Asm("mcr p15, 0, %0, c7, c15, 0"::"r"(0))
+#endif /* __TARGET_ARCH_ARM == 6 */
+
+/* ãã¼ã¿ã­ã£ãã·ã¥ã®ã»ããï¼ã¦ã§ã¤åä½ã®ç¡å¹å */
+#define CP15_WRITE_DCISW(reg)	Asm("mcr p15, 0, %0, c7, c6, 2"::"r"(reg))
+
+/* ãã¼ã¿ã­ã£ãã·ã¥ã®ã»ããï¼ã¦ã§ã¤åä½ã®ã¯ãªã¼ã³ã¨ç¡å¹å */
+#define CP15_WRITE_DCCISW(reg)	Asm("mcr p15, 0, %0, c7, c14, 2"::"r"(reg))
+
+/*
+ *  CP15ã®ãã©ã¼ã«ãç¶æ
+ï¼ã¢ãã¬ã¹ã®æä½ãã¯ã­
+ */
+#if __TARGET_ARCH_ARM >= 6
+#define CP15_READ_DFSR(reg)		Asm("mrc p15, 0, %0, c5, c0, 0":"=r"(reg))
+#define CP15_READ_DFAR(reg)		Asm("mrc p15, 0, %0, c6, c0, 0":"=r"(reg))
+#define CP15_READ_IFSR(reg)		Asm("mrc p15, 0, %0, c5, c0, 1":"=r"(reg))
+#define CP15_READ_IFAR(reg)		Asm("mrc p15, 0, %0, c6, c0, 2":"=r"(reg))
+#else /* __TARGET_ARCH_ARM >= 6 */
+#define CP15_READ_FSR(reg)		Asm("mrc p15, 0, %0, c5, c0, 0":"=r"(reg))
+#define CP15_READ_FAR(reg)		Asm("mrc p15, 0, %0, c6, c0, 0":"=r"(reg))
+#endif /* __TARGET_ARCH_ARM >= 6 */
+
+/*
+ *  CP15ã«ããMMUã®æä½ãã¯ã­ï¼VMSAï¼
+ */
+
+/* å¤æãã¼ãã«ãã¼ã¹å¶å¾¡ã¬ã¸ã¹ã¿ï¼ARMv6ä»¥éï¼*/
+#if __TARGET_ARCH_ARM >= 6
+#define CP15_WRITE_TTBCR(reg)	Asm("mcr p15, 0, %0, c2, c0, 2"::"r"(reg))
+#endif /* __TARGET_ARCH_ARM >= 6 */
+
+/* å¤æãã¼ãã«ãã¼ã¹ã¬ã¸ã¹ã¿0 */
+#define CP15_READ_TTBR0(reg)	Asm("mrc p15, 0, %0, c2, c0, 0":"=r"(reg))
+#define CP15_WRITE_TTBR0(reg)	Asm("mcr p15, 0, %0, c2, c0, 0"::"r"(reg))
+
+/* ãã¡ã¤ã³ã¢ã¯ã»ã¹å¶å¾¡ã¬ã¸ã¹ã¿ */
+#define CP15_WRITE_DACR(reg)	Asm("mcr p15, 0, %0, c3, c0, 0":: "r"(reg))
+
+/* ã³ã³ãã­ã¹ãIDã¬ã¸ã¹ã¿ï¼ARMv6ä»¥éï¼*/
+#if __TARGET_ARCH_ARM >= 6
+#define CP15_WRITE_CONTEXTIDR(reg) Asm("mcr p15, 0, %0, c13, c0, 1" ::"r"(reg))
+#endif /* __TARGET_ARCH_ARM >= 6 */
+
+/*
+ *  CP15ã«ããTLBæä½ãã¯ã­ï¼VMSAï¼
+ */
+
+/* TLBå
+¨ä½ã®ç¡å¹å */
+#define CP15_INVALIDATE_TLB()	Asm("mcr p15, 0, %0, c8, c7, 0"::"r"(0))
+
+/*
+ *  CP15ã®ããã©ã¼ãã³ã¹ã¢ãã¿æä½ãã¯ã­ï¼ARMv7ã®ã¿ï¼
+ */
+#if __TARGET_ARCH_ARM == 7
+
+/* ããã©ã¼ãã³ã¹ã¢ãã¿å¶å¾¡ã¬ã¸ã¹ã¿ */
+#define CP15_READ_PMCR(reg)		Asm("mrc p15, 0, %0, c9, c12, 0":"=r"(reg))
+#define CP15_WRITE_PMCR(reg)	Asm("mcr p15, 0, %0, c9, c12, 0"::"r"(reg))
+
+/* ããã©ã¼ãã³ã¹ã¢ãã¿ã«ã¦ã³ãã¤ãã¼ãã«ã»ããã¬ã¸ã¹ã¿ */
+#define CP15_READ_PMCNTENSET(reg)  Asm("mrc p15, 0, %0, c9, c12, 1":"=r"(reg))
+#define CP15_WRITE_PMCNTENSET(reg) Asm("mcr p15, 0, %0, c9, c12, 1"::"r"(reg))
+
+/* ããã©ã¼ãã³ã¹ã¢ãã¿ã«ã¦ã³ã¿ãµã¤ã¯ã«ã¬ã¸ã¹ã¿ */
+#define CP15_READ_PMCCNTR(reg)	Asm("mrc p15, 0, %0, c9, c13, 0":"=r"(reg))
+#define CP15_WRITE_PMCCNTR(reg)	Asm("mcr p15, 0, %0, c9, c13, 0"::"r"(reg))
+
+#endif /* __TARGET_ARCH_ARM == 7 */
+
+/*
+ *  CP15ã«ããã¡ã¢ãªããªã¢æä½ãã¯ã­
+ */
+#define CP15_INST_SYNC_BARRIER() \
+						Asm("mcr p15, 0, %0, c7, c5, 4"::"r"(0):"memory")
+#define CP15_DATA_SYNC_BARRIER() \
+						Asm("mcr p15, 0, %0, c7, c10, 4"::"r"(0):"memory")
+#define CP15_DATA_MEMORY_BARRIER() \
+						Asm("mcr p15, 0, %0, c7, c10, 5"::"r"(0):"memory")
+
+/*
+ *  ã¡ã¢ãªããªã¢
+ *
+ *  ARMv6ã¨ARMv7ãæã¤3ã¤ã®ã¡ã¢ãªããªã¢æ©è½ãä½¿ç¨ããããã®é¢æ°ï¼ã¡ã¢ãª
+ *  ããªã¢ã¯ï¼ARMv7ã§ã¯å°ç¨å½ä»¤ï¼ARMv6ã§ã¯CP15ã¸ã®æ¸è¾¼ã¿ã§å®ç¾ãããï¼
+ *  ARMv7ã®ã¡ã¢ãªããªã¢å½ä»¤ã¯ï¼åæãåãç¯å²ãæå®ã§ãããï¼ä»¥ä¸ã®é¢æ°
+ *  ã§ã¯æå¤§ç¯å²ï¼ã·ã¹ãã å
+¨ä½ï¼ãªã¼ãï¼ã©ã¤ãã®ä¸¡æ¹ï¼ã§åæãåãï¼
+ *
+ *  ARMv5ä»¥åã§ã¯ï¼ã¡ã¢ãªããªã¢æ©è½ã¯å®è£
+ä¾å­ã§ããããï¼ããããï¼
+ *  DATA_MEMORY_BARRIERï¼DATA_SYNC_BARRIERï¼INST_SYNC_BARRIERãå®ç¾©ãã
+ *  ãã¨ã«ãã£ã¦ï¼é¢æ°ã®å
+å®¹ãå
+¥ãæããããããã«ãã¦ããï¼
+ */
+
+/*
+ *  ãã¼ã¿ã¡ã¢ãªããªã¢
+ *
+ *  ãã®ããªã¢ã®åå¾ã§ï¼ã¡ã¢ãªã¢ã¯ã»ã¹ã®é åºãå
+¥ãæãããªãããã«ããï¼
+ *  ãã«ãã³ã¢ï¼å³å¯ã«ã¯ãã«ããã¹ã¿ï¼ã§ã®ä½¿ç¨ãæ³å®ããå½ä»¤ï¼
+ */
+Inline void
+data_memory_barrier(void)
+{
+#ifdef DATA_MEMORY_BARRIER
+	DATA_MEMORY_BARRIER();
+#elif __TARGET_ARCH_ARM <= 6
+	CP15_DATA_MEMORY_BARRIER();
+#else /* __TARGET_ARCH_ARM <= 6 */
+	Asm("dmb":::"memory");
+#endif
+}
+
+/*
+ *  ãã¼ã¿åæããªã¢
+ *
+ *  å
+è¡ããã¡ã¢ãªã¢ã¯ã»ã¹ãå®äºããã®ãå¾
+ã¤ï¼ã¡ã¢ãªã¢ã¯ã»ã¹ãå¯ä½ç¨ã
+ *  æã¤æã«ï¼ãã®å¯ä½ç¨ãèµ·ããã®ãå¾
+ã¤ããã®ä½¿ç¨ãæ³å®ããå½ä»¤ï¼
+ */
+Inline void
+data_sync_barrier(void)
+{
+#ifdef DATA_SYNC_BARRIER
+	DATA_SYNC_BARRIER();
+#elif __TARGET_ARCH_ARM <= 6
+	CP15_DATA_SYNC_BARRIER();
+#else /* __TARGET_ARCH_ARM <= 6 */
+	Asm("dsb":::"memory");
+#endif
+}
+
+/*
+ *  å½ä»¤åæããªã¢
+ *
+ *  ãã­ã°ã©ã ãæ¸ãæããããï¼ã¾ãã¯ï¼ã·ã¹ãã ç¶æ
+ã®å¤åã«ããå®è¡ã
+ *  ã¹ããã­ã°ã©ã ãå¤ãã£ãï¼æã«ï¼ãã¤ãã©ã¤ã³ããã©ãã·ã¥ãããªã©ï¼
+ *  æ°ãããã­ã°ã©ã ãèª­ã¿è¾¼ãããã«ããï¼ARMv6ã§ã¯ï¼ããªãã§ãããã©ã
+ *  ã·ã¥ã¨å¼ã°ãã¦ããï¼
+ */
+Inline void
+inst_sync_barrier(void)
+{
+#ifdef INST_SYNC_BARRIER
+	INST_SYNC_BARRIER();
+#elif __TARGET_ARCH_ARM <= 6
+	CP15_INST_SYNC_BARRIER();
+#else /* __TARGET_ARCH_ARM <= 6 */
+	Asm("isb":::"memory");
+#endif
+}
+
+/*
+ *  CP15ã®ã»ã­ã¥ãªãã£æ¡å¼µã¬ã¸ã¹ã¿æä½ãã¯ã­ï¼ARMv7ã®ã¿ï¼
+ */
+#if __TARGET_ARCH_ARM == 7
+
+/* ãã¯ã¿ãã¼ã¹ã¢ãã¬ã¹ã¬ã¸ã¹ã¿ */
+#define CP15_READ_VBAR(reg)		Asm("mrc p15, 0, %0, c12, c0, 0":"=r"(reg))
+#define CP15_WRITE_VBAR(reg)	Asm("mcr p15, 0, %0, c12, c0, 0"::"r"(reg))
+
+#endif /* __TARGET_ARCH_ARM == 7 */
+#endif /* TOPPERS_ARM_INSN_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_asm.inc
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_asm.inc	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_asm.inc	(revision 270)
@@ -0,0 +1,126 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2011-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã¢ã»ã³ããªè¨èªç¨ãã¯ã­å®ç¾©ï¼ARM GNUéçºç°å¢ç¨ï¼
+ */
+
+#ifndef TOPPERS_CORE_ASM_INC
+#define TOPPERS_CORE_ASM_INC
+
+/*
+ *  ãã£ã¬ã¯ãã£ãã®ãã¯ã­å®ç¾©
+ */
+#define ASECTION(name)	.section name, "a"
+#define ATEXT			.text
+#define AGLOBAL(name)	.global name
+#define AALIGN(size)	.align size
+#define ALONG			.long
+#define ALABEL(label)	label:
+#define AOR				|
+#define AWEAK(name)		.weak name
+
+/*
+ *  ã»ã¯ã·ã§ã³æ
+å ±
+ */
+#define DATA_START		__start_data
+#define DATA_END		__end_data
+#define IDATA_START		__start_idata
+#define BSS_START		__start_bss
+#define BSS_END			__end_bss
+
+/*
+ *  ãã¼ã¿ã¡ã¢ãªããªã¢
+ */
+	.macro	asm_data_memory_barrier reg1
+#ifdef ASM_DATA_MEMORY_BARRIER
+	ASM_DATA_MEMORY_BARRIER(reg1)
+#elif __TARGET_ARCH_ARM <= 6
+	mov		\reg1, #0
+	mcr		p15, 0, \reg1, c7, c10, 5
+#else /* __TARGET_ARCH_ARM <= 6 */
+	dmb
+#endif
+	.endm
+
+/*
+ *  ãã¼ã¿åæããªã¢
+ */
+	.macro	asm_data_sync_barrier reg1
+#ifdef ASM_DATA_SYNC_BARRIER
+	ASM_DATA_SYNC_BARRIER(reg1)
+#elif __TARGET_ARCH_ARM <= 6
+	mov		\reg1, #0
+	mcr		p15, 0, \reg1, c7, c10, 4
+#else /* __TARGET_ARCH_ARM <= 6 */
+	dsb
+#endif
+	.endm
+
+/*
+ *  å½ä»¤åæããªã¢
+ */
+	.macro	asm_inst_sync_barrier reg1
+#ifdef ASM_INST_SYNC_BARRIER
+	ASM_INST_SYNC_BARRIER(reg1)
+#elif __TARGET_ARCH_ARM <= 6
+	mov		\reg1, #0
+	mcr		p15, 0, \reg1, c7, c5, 4
+#else /* __TARGET_ARCH_ARM <= 6 */
+	isb
+#endif
+	.endm
+
+#endif /* TOPPERS_CORE_ASM_INC */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_cfg1_out.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_cfg1_out.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_cfg1_out.h	(revision 270)
@@ -0,0 +1,23 @@
+/*
+ *		cfg1_out.cã®ãªã³ã¯ã«å¿
+è¦ãªã¹ã¿ãã®å®ç¾©
+ *
+ *  $Id$
+ */
+
+/*
+ *  cfg1_out.cã®ãªã³ã¯ã«å¿
+è¦ãªå®ç¾©
+ */
+
+#include <kernel.h>
+
+void sta_ker(void){}
+STK_T *const	_kernel_istkpt;
+
+/*
+ *  offset.hãçæããããã®å®ç¾©
+ */
+const uint8_t	MAGIC_1 = 0x12;
+const uint16_t	MAGIC_2 = 0x1234;
+const uint32_t	MAGIC_4 = 0x12345678;
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_check.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_check.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_check.trb	(revision 270)
@@ -0,0 +1,53 @@
+# -*- coding: utf-8 -*-
+# 
+#		ãã¹3ã®çæã¹ã¯ãªããã®ã³ã¢ä¾å­é¨ï¼ARMç¨ï¼
+# 
+#  $Id: core_check.trb 730 2016-04-03 02:04:52Z ertl-hiro $
+#
+
+#
+#  ã¿ã¼ã²ããéä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ã
+#
+IncludeTrb("kernel/kernel_check.trb")
+
+#
+#  å²è¾¼ã¿ãã³ãã©ãã¼ãã«ã«é¢ãããã§ãã¯
+#
+# DEF_INHã§ç»é²ããå²è¾¼ã¿ãã³ãã©ã®ã¿ãã§ãã¯ããï¼éã«è¨ãã¨ï¼ã³ã³ãã£
+# ã®ã¥ã¬ã¼ã¿ã§çæããå²è¾¼ã¿ãã³ãã©ãï¼default_int_handlerã®ãã§ãã¯ã¯
+# è¡ããªãï¼
+#
+inhTable = SYMBOL("_kernel_inh_table")
+offset = SYMBOL("__etext") - SYMBOL("__data_start__")
+$cfgData[:DEF_INH].each do |key, params|
+  inthdr = PEEK(inhTable + offset + params[:inhno] * $sizeof_FP, $sizeof_FP)
+
+  #	å²è¾¼ã¿ãã³ãã©ã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI3056ï¼½
+  if (inthdr & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :inthdr, :inhno, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && inthdr == 0
+    error_wrong_id("E_PAR", params, :inthdr, :inhno, "null")
+  end
+end
+
+#
+#  CPUä¾å¤ãã³ãã©ãã¼ãã«ã«é¢ãããã§ãã¯
+#
+# DEF_EXCã§ç»é²ããCPUä¾å¤ãã³ãã©ã®ã¿ãã§ãã¯ããï¼éã«è¨ãã¨ï¼
+# default_exc_handlerã®ãã§ãã¯ã¯è¡ããªãï¼
+#
+excTable = SYMBOL("_kernel_exc_table")
+$cfgData[:DEF_EXC].each do |key, params|
+  exchdr = PEEK(excTable + params[:excno] * $sizeof_FP, $sizeof_FP)
+
+  # CPUä¾å¤ãã³ãã©ã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI3135ï¼½
+  if (exchdr & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :exchdr, :excno, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && exchdr == 0
+    error_wrong_id("E_PAR", params, :exchdr, :excno, "null")
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_kernel.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_kernel.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_kernel.h	(revision 270)
@@ -0,0 +1,138 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		kernel.hã®ã³ã¢ä¾å­é¨ï¼ARMç¨ï¼
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼target_kernel.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯ã«ã¼ã
+ *  ããããã¡ã¤ã«ï¼ã®ã¿ããã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡ã¤ã«ããç´æ¥ã¤
+ *  ã³ã¯ã«ã¼ããã¦ã¯ãªããªãï¼
+ */
+
+#ifndef TOPPERS_CORE_KERNEL_H
+#define TOPPERS_CORE_KERNEL_H
+
+/*
+ *  ã¹ã¿ãã¯ã®å
+ *
+ *  ARMã§ã¯ï¼ã¹ã¿ãã¯ã8ãã¤ãå¢çã«é
+ç½®ããå¿
+è¦ãããï¼
+ */
+#define TOPPERS_STK_T	long long
+
+/*
+ *  CPUä¾å¤ãã³ãã©çªå·ã®æ°
+ */  
+#define TNUM_EXCNO		6
+
+/*
+ *  CPUä¾å¤ãã³ãã©çªå·ã®å®ç¾©
+ */
+#define EXCNO_UNDEF		0
+#define EXCNO_SVC		1
+#define EXCNO_PABORT	2
+#define EXCNO_DABORT	3
+#define EXCNO_IRQ		4
+#define EXCNO_FIQ		5
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  CPUä¾å¤ã®æ
+å ±ãè¨æ¶ãã¦ããã¡ã¢ãªé åã®æ§é 
+ */
+#if __TARGET_ARCH_ARM < 6
+
+typedef struct t_excinf {
+	uint32_t	nest_count;				/* ä¾å¤ãã¹ãã«ã¦ã³ã */
+	uint32_t	intpri;					/* å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ */
+	uint32_t	cpsr;					/* CPUä¾å¤çºçæã®CPSR */
+	uint32_t	r0;
+	uint32_t	r1;
+	uint32_t	r2;
+	uint32_t	r3;
+	uint32_t	r4;
+	uint32_t	r5;
+	uint32_t	r12;
+	uint32_t	lr;
+	uint32_t	pc;						/* æ»ãçªå° */
+} T_EXCINF;
+
+#else /* __TARGET_ARCH_ARM < 6 */
+
+typedef struct t_excinf {
+	uint32_t	nest_count;				/* ä¾å¤ãã¹ãã«ã¦ã³ã */
+	uint32_t	intpri;					/* å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ */
+	uint32_t	r0;
+	uint32_t	r1;
+	uint32_t	r2;
+	uint32_t	r3;
+	uint32_t	r4;
+	uint32_t	r5;
+	uint32_t	r12;
+	uint32_t	lr;
+	uint32_t	pc;						/* æ»ãçªå° */
+	uint32_t	cpsr;					/* CPUä¾å¤çºçæã®CPSR */
+} T_EXCINF;
+
+#endif /* __TARGET_ARCH_ARM < 6 */
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_CORE_KERNEL_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_kernel.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_kernel.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_kernel.trb	(revision 270)
@@ -0,0 +1,131 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: core_kernel.trb 662 2016-02-27 02:33:51Z ertl-hiro $
+# 
+
+#
+#		ãã¹2ã®çæã¹ã¯ãªããã®ã³ã¢ä¾å­é¨ï¼ARMç¨ï¼
+#
+
+#
+#  æå¹ãªCPUä¾å¤ãã³ãã©çªå·
+#
+$EXCNO_VALID = [ 0, 1, 2, 3, 4, 5 ]
+
+#
+#  DEF_EXCã§ä½¿ç¨ã§ããCPUä¾å¤ãã³ãã©çªå·
+#
+$EXCNO_DEFEXC_VALID = [ 0, 1, 2, 3, 5 ]
+
+#
+#  ã¿ã¼ã²ããéä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ã
+#
+IncludeTrb("kernel/kernel.trb")
+
+#
+#  å²è¾¼ã¿ãã³ãã©ãã¼ãã«
+#
+$kernelCfgC.comment_header("Interrupt Handler Table")
+
+$kernelCfgC.add("FP _kernel_inh_table[TNUM_INHNO] = {")
+$INHNO_VALID.each_with_index do |inhnoVal, index|
+  $kernelCfgC.add(",") if index > 0
+  $kernelCfgC.append("\t/* 0x#{sprintf("%03x", inhnoVal)} */ ")
+  if $cfgData[:DEF_INH].has_key?(inhnoVal)
+    $kernelCfgC.append("(FP)(#{$cfgData[:DEF_INH][inhnoVal][:inthdr]})")
+  else
+    $kernelCfgC.append("(FP)(_kernel_default_int_handler)")
+  end
+end
+$kernelCfgC.add
+$kernelCfgC.add2("};")
+
+#
+#  å²è¾¼ã¿è¦æ±ã©ã¤ã³è¨­å®ãã¼ãã«
+#
+if $USE_INTCFG_TABLE
+  $kernelCfgC.comment_header("Interrupt Configuration Table")
+
+  $kernelCfgC.add("const uint8_t _kernel_intcfg_table[TNUM_INTNO] = {")
+  $INTNO_VALID.each_with_index do |intnoVal, index|
+    $kernelCfgC.add(",") if index > 0
+    $kernelCfgC.append("\t/* 0x#{sprintf("%03x", intnoVal)} */ ")
+    if $cfgData[:CFG_INT].has_key?(intnoVal)
+      $kernelCfgC.append("1U")
+    else
+      $kernelCfgC.append("0U")
+    end
+  end
+  $kernelCfgC.add
+  $kernelCfgC.add2("};")
+end
+
+#
+#  CPUä¾å¤ãã³ãã©ãã¼ãã«
+#
+$kernelCfgC.comment_header("CPU Exception Handler Table")
+
+$kernelCfgC.add("const FP _kernel_exc_table[TNUM_EXCNO] = {")
+$EXCNO_VALID.each_with_index do |excnoVal, index|
+  $kernelCfgC.add(",") if index > 0
+  $kernelCfgC.append("\t/* #{excnoVal} */ ")
+  if $cfgData[:DEF_EXC].has_key?(excnoVal)
+    $kernelCfgC.append("(FP)(#{$cfgData[:DEF_EXC][excnoVal][:exchdr]})")
+  else
+    $kernelCfgC.append("(FP)(_kernel_default_exc_handler)")
+  end
+end
+$kernelCfgC.add
+$kernelCfgC.add2("};")
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_kernel_impl.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_kernel_impl.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_kernel_impl.c	(revision 270)
@@ -0,0 +1,355 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã«ã¼ãã«ã®ã³ã¢ä¾å­é¨ï¼ARMç¨ï¼
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+#include "arm.h"
+
+/*
+ *  ã³ã³ãã­ã¹ãåç
+§ã®ããã®å¤æ°
+ */
+uint32_t	excpt_nest_count;		/* ä¾å¤ãã¹ãã«ã¦ã³ã */
+
+/*
+ *  MMUé¢é£ã®æä½ï¼VMSAï¼
+ */
+#ifdef USE_ARM_MMU
+
+#define CP15_DACR_D0_CLIENT	0x01U	/* å¤æãã¼ãã«ã«å¾ããã¡ã¤ã³0ã«ã¢ã¯ã»ã¹ */
+#define DEFAULT_ASID		1		/* ä½¿ç¨ããASID */
+
+/*
+ *  ã»ã¯ã·ã§ã³ãã¼ãã«
+ */
+static uint32_t section_table[ARM_SECTION_TABLE_ENTRY]
+							__attribute__((aligned(ARM_SECTION_TABLE_ALIGN)));
+
+/*
+ *  MMUã®ã»ã¯ã·ã§ã³ãã¼ãã«ã¨ã³ããªã®è¨­å®
+ */
+Inline void
+config_section_entry(ARM_MMU_CONFIG *p_ammuc)
+{
+	uint32_t	vaddr = p_ammuc->vaddr;
+	uint32_t	paddr = p_ammuc->paddr;
+	uint32_t	size = p_ammuc->size;
+	uint_t		i;
+
+	while (size > 0) {
+#ifdef USE_ARM_SSECTION
+		if (size >= ARM_SSECTION_SIZE && (vaddr % ARM_SSECTION_SIZE) == 0) {
+			for (i = 0; i < 16; i++) {
+				section_table[vaddr / ARM_SECTION_SIZE] = paddr
+									|ARM_MMU_DSCR1_SSECTION|p_ammuc->attr;
+				vaddr += ARM_SECTION_SIZE;
+			}
+			paddr += ARM_SSECTION_SIZE;
+			size -= ARM_SSECTION_SIZE;
+		}
+		else {
+#endif /* USE_ARM_SSECTION */
+			section_table[vaddr / ARM_SECTION_SIZE] = paddr
+									|ARM_MMU_DSCR1_SECTION|p_ammuc->attr;
+			vaddr += ARM_SECTION_SIZE;
+			paddr += ARM_SECTION_SIZE;
+			size -= ARM_SECTION_SIZE;
+#ifdef USE_ARM_SSECTION
+		}
+#endif /* USE_ARM_SSECTION */
+	}
+}
+
+/*
+ *  MMUã®åæå
+ */
+void
+arm_mmu_initialize(void)
+{
+	uint32_t	reg;
+	uint_t		i;
+
+	/*
+	 *  MMUã®ã»ã¯ã·ã§ã³ãã¼ãã«ã®è¨­å®
+	 */
+	for (i = 0; i < ARM_SECTION_TABLE_ENTRY; i++) {
+		section_table[i] = ARM_MMU_DSCR1_FAULT;
+	}
+	for (i = 0; i < arm_tnum_memory_area; i++) {
+		config_section_entry(&(arm_memory_area[i]));
+	}
+
+	/*
+	 *  TTBR0ãç¨ããããã«æå®ï¼ARMv6ä»¥éï¼
+	 */
+#if __TARGET_ARCH_ARM >= 6
+	CP15_WRITE_TTBCR(0U);
+#endif /* __TARGET_ARCH_ARM >= 6 */
+
+	/*
+	 *  å¤æãã¼ãã«ã¨ãã¦ï¼section_tableãä½¿ç¨ããï¼
+	 */
+	reg = ((uint32_t) &(section_table[0])) | TTBR_CONFIG;
+	CP15_WRITE_TTBR0(reg);
+
+	/*
+	 * ãã¡ã¤ã³ã¢ã¯ã»ã¹å¶å¾¡ã®è¨­å®
+	 */
+	CP15_WRITE_DACR(CP15_DACR_D0_CLIENT);
+
+	/*
+	 *  ASIDã®è¨­å®
+	 */
+#if __TARGET_ARCH_ARM >= 6
+	CP15_WRITE_CONTEXTIDR(DEFAULT_ASID);
+#endif /* __TARGET_ARCH_ARM >= 6 */
+
+	/*
+	 *  TLBå
+¨ä½ã®ç¡å¹å
+	 */
+	arm_invalidate_tlb();
+
+	/*
+	 *  MMUãæå¹ã«ããï¼ARMv6ã§ã¯ï¼æ¡å¼µãã¼ã¸ãã¼ãã«è¨­å®ãä½¿ãï¼ãµã
+	 *  ãã¼ã¸ã¯ä½¿ããªãï¼ããã«è¨­å®ããï¼
+	 */
+	CP15_READ_SCTLR(reg);
+#if __TARGET_ARCH_ARM == 6
+	reg |= (CP15_SCTLR_MMU|CP15_SCTLR_EXTPAGE);
+#else /* __TARGET_ARCH_ARM == 6 */
+	reg |= CP15_SCTLR_MMU;
+#endif /* __TARGET_ARCH_ARM == 6 */
+	CP15_WRITE_SCTLR(reg);
+	inst_sync_barrier();
+}
+
+#endif /* USE_ARM_MMU */
+
+/*
+ *  ã³ã¢ä¾å­ã®åæå
+ */
+void
+core_initialize(void)
+{
+	/*
+	 *  ã«ã¼ãã«èµ·åæã¯éã¿ã¹ã¯ã³ã³ãã­ã¹ãã¨ãã¦åä½ãããããã«ï¼ä¾å¤
+	 *  ã®ãã¹ãåæ°ã1ã«åæåããï¼
+	 */ 
+	excpt_nest_count = 1U;
+
+	/*
+	 *  MMUãæå¹ã«
+	 */
+#ifdef USE_ARM_MMU
+	arm_mmu_initialize();
+#endif /* USE_ARM_MMU */
+
+	/*
+	 *  ããã©ã¼ãã³ã¹ã¢ãã¿ã®åæå
+	 */
+#if defined(USE_ARM_PM_HIST) && __TARGET_ARCH_ARM == 7
+	arm_init_pmcnt();
+#endif /* defined(USE_ARM_PM_HIST) && __TARGET_ARCH_ARM == 7 */
+}
+
+/*
+ *  ã³ã¢ä¾å­ã®çµäºå¦ç
+ */
+void
+core_terminate(void)
+{
+}
+
+/*
+ *  CPUä¾å¤ã®çºçç¶æ³ã®ã­ã°åºå
+ */
+#ifndef OMIT_XLOG_SYS
+
+/*
+ *  CPUä¾å¤ãã³ãã©ã®ä¸­ããï¼CPUä¾å¤æ
+å ±ãã¤ã³ã¿ï¼p_excinfï¼ãå¼æ°ã¨ã
+ *  ã¦å¼ã³åºããã¨ã§ï¼CPUä¾å¤ã®çºçç¶æ³ãã·ã¹ãã ã­ã°ã«åºåããï¼
+ */
+void
+xlog_sys(void *p_excinf)
+{
+	syslog_4(LOG_EMERG, "pc = %08x, cpsr = %08x, lr = %08x, r12 = %08x",
+			((T_EXCINF *)(p_excinf))->pc, ((T_EXCINF *)(p_excinf))->cpsr,
+			((T_EXCINF *)(p_excinf))->lr, ((T_EXCINF *)(p_excinf))->r12);
+	syslog_4(LOG_EMERG, "r0 = %08x, r1 = %08x, r2 = %08x, r3 = %08x",
+			((T_EXCINF *)(p_excinf))->r0, ((T_EXCINF *)(p_excinf))->r1,
+			((T_EXCINF *)(p_excinf))->r2, ((T_EXCINF *)(p_excinf))->r3);
+	syslog_2(LOG_EMERG, "nest_count = %d, intpri = %d",
+			((T_EXCINF *)(p_excinf))->nest_count,
+			((T_EXCINF *)(p_excinf))->intpri);
+}
+
+/*
+ *  ããªãã§ããï¼ãã¼ã¿ã¢ãã¼ããçºçããç¶æ³ï¼ç¶æ
+ã¨ã¢ãã¬ã¹ï¼ãã·ã¹
+ *  ãã ã­ã°ã«åºåããï¼
+ */
+void
+xlog_fsr(uint32_t fsr, uint32_t far)
+{
+	char	*status;
+
+	switch (fsr & CP15_FSR_FS_MASK) {
+	case CP15_FSR_FS_ALIGNMENT:
+		status = "alignment fault";
+		break;
+	case CP15_FSR_FS_TRANSLATION1:
+		status = "translation fault (1st level)";
+		break;
+	case CP15_FSR_FS_TRANSLATION2:
+		status = "translation fault (2nd level)";
+		break;
+	case CP15_FSR_FS_PERMISSION1:
+		status = "permission fault (1st level)";
+		break;
+	case CP15_FSR_FS_PERMISSION2:
+		status = "permission fault (2nd level)";
+		break;
+	default:
+		status = "other fault";
+		break;
+	}
+	syslog_2(LOG_EMERG, "Fault status: 0x%04x (%s)", fsr, status);
+	syslog_1(LOG_EMERG, "Fault address: 0x%08x", far);
+}
+
+#endif /* OMIT_XLOG_SYS */
+
+/*
+ *  æªå®ç¾©ã®å²è¾¼ã¿ãå
+¥ã£ãå ´åã®å¦ç
+ */
+#ifndef OMIT_DEFAULT_INT_HANDLER
+
+void
+default_int_handler(void)
+{
+	syslog_0(LOG_EMERG, "Unregistered interrupt occurs.");
+	ext_ker();
+}
+
+#endif /* OMIT_DEFAULT_INT_HANDLER */
+
+/*
+ *  æªå®ç¾©ã®ä¾å¤ãå
+¥ã£ãå ´åã®å¦ç
+ */
+#ifndef OMIT_DEFAULT_EXC_HANDLER
+
+void
+default_exc_handler(void *p_excinf, EXCNO excno)
+{
+#ifdef OMIT_XLOG_SYS
+	syslog_1(LOG_EMERG, "Unregistered exception %d occurs.", excno);
+#else /* OMIT_XLOG_SYS */
+	switch (excno) {
+	case EXCNO_UNDEF:
+		syslog_0(LOG_EMERG, "Undefined Instruction exception occurs.");
+		break;
+	case EXCNO_SVC:
+		syslog_0(LOG_EMERG, "Supervisor Call exception occurs.");
+		break;
+	case EXCNO_PABORT:
+		syslog_0(LOG_EMERG, "Prefetch Abort exception occurs.");
+		break;
+	case EXCNO_DABORT:
+		syslog_0(LOG_EMERG, "Data Abort exception occurs.");
+		break;
+	case EXCNO_IRQ:
+		syslog_0(LOG_EMERG, "IRQ exception occurs.");
+		break;
+	case EXCNO_FIQ:
+		syslog_0(LOG_EMERG, "FIQ exception occurs.");
+		break;
+	}
+	xlog_sys(p_excinf);
+
+	if (excno == EXCNO_PABORT || excno == EXCNO_DABORT) {
+		uint32_t	fsr, far;
+
+#if __TARGET_ARCH_ARM >= 6
+		if (excno == EXCNO_PABORT) {
+			CP15_READ_IFSR(fsr);
+			CP15_READ_IFAR(far);
+		}
+		else {
+			CP15_READ_DFSR(fsr);
+			CP15_READ_DFAR(far);
+		}
+#else /* __TARGET_ARCH_ARM >= 6 */
+		CP15_READ_FSR(fsr);
+		CP15_READ_FAR(far);
+#endif /* __TARGET_ARCH_ARM >= 6 */
+
+		xlog_fsr(fsr, far);
+	}
+#endif /* OMIT_XLOG_SYS */
+	ext_ker();
+}
+
+#endif /* OMIT_DEFAULT_EXC_HANDLER */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_kernel_impl.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_kernel_impl.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_kernel_impl.h	(revision 270)
@@ -0,0 +1,561 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		kernel_impl.hã®ã³ã¢ä¾å­é¨ï¼ARMç¨ï¼
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼target_kernel_impl.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯
+ *  ã«ã¼ãããããã¡ã¤ã«ï¼ã®ã¿ããã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡ã¤ã«ãã
+ *  ç´æ¥ã¤ã³ã¯ã«ã¼ããã¦ã¯ãªããªãï¼
+ */
+
+#ifndef TOPPERS_CORE_KERNEL_IMPL_H
+#define TOPPERS_CORE_KERNEL_IMPL_H
+
+#include "arm.h"
+
+/*
+ *  ã¨ã©ã¼ãã§ãã¯æ¹æ³ã®æå®
+ */
+#define CHECK_STKSZ_ALIGN	8		/* ã¹ã¿ãã¯ãµã¤ãºã®ã¢ã©ã¤ã³åä½ */
+#define CHECK_INTPTR_ALIGN	4		/* intptr_tåã®å¤æ°ã®ã¢ã©ã¤ã³åä½ */
+#define CHECK_INTPTR_NONNULL		/* intptr_tåã®å¤æ°ã®éNULLãã§ãã¯ */
+#ifndef  __thumb__
+#define CHECK_FUNC_ALIGN	4		/* é¢æ°ã®ã¢ã©ã¤ã³åä½ */
+#endif /* __thumb__ */
+#define CHECK_FUNC_NONNULL			/* é¢æ°ã®éNULLãã§ãã¯ */
+#define CHECK_STACK_ALIGN	8		/* ã¹ã¿ãã¯é åã®ã¢ã©ã¤ã³åä½ */
+#define CHECK_STACK_NONNULL			/* ã¹ã¿ãã¯é åã®éNULLãã§ãã¯ */
+#define CHECK_MPF_ALIGN		4		/* åºå®é·ã¡ã¢ãªãã¼ã«é åã®ã¢ã©ã¤ã³åä½ */
+#define CHECK_MPF_NONNULL			/* åºå®é·ã¡ã¢ãªãã¼ã«é åã®éNULLãã§ãã¯ */
+#define CHECK_MB_ALIGN		4		/* ç®¡çé åã®ã¢ã©ã¤ã³åä½ */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ã¬ãã£ã­ã¥ã¼ãµã¼ãã®ããã®ãããããããµã¼ãé¢æ°
+ *
+ *  CLZå½ä»¤ã¯æä¸ä½ããããããµã¼ãããããï¼æä¸ä½ããããæé«åªå
+åº¦ã«
+ *  å¯¾å¿ãããï¼
+ */
+#if __TARGET_ARCH_ARM >= 6
+
+#define	OMIT_BITMAP_SEARCH
+#define	PRIMAP_BIT(pri)		(0x8000U >> (pri))
+
+Inline uint_t
+bitmap_search(uint16_t bitmap)
+{
+	return((uint_t)(count_leading_zero((uint32_t) bitmap) - 16));
+}
+
+#endif /* __TARGET_ARCH_ARM >= 6 */
+
+/*
+ *  ã³ã³ãã­ã¹ãã®åç
+§
+ *
+ *  ARMä¾å­é¨ã§ã¯ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãã¨éã¿ã¹ã¯ã³ã³ãã­ã¹ãã®ä¸¡æ¹ãã¹ã¼
+ *  ããã¤ã¶ã¢ã¼ãã§åä½ãããããï¼ãã­ã»ããµã¢ã¼ãã§å¤æ­ãããã¨ãã§
+ *  ããªãï¼ãã®ããï¼å²è¾¼ã¿ãã³ãã©ï¼CPUä¾å¤ãã³ãã©ã®ãã¹ãæ®µæ°ï¼ãã
+ *  ãï¼ä¾å¤ãã¹ãã«ã¦ã³ãã¨å¼ã¶ï¼ã§ç®¡çãï¼ä¾å¤ãã¹ãã«ã¦ã³ãã0ã®æã«
+ *  ã¿ã¹ã¯ã³ã³ãã­ã¹ãï¼0ããå¤§ããå ´åã«éã¿ã¹ã¯ã³ã³ãã­ã¹ãã§ããã¨å¤
+ *  æ­ããï¼
+ */
+extern uint32_t	excpt_nest_count;		/* ä¾å¤ãã¹ãã«ã¦ã³ã */
+
+Inline bool_t
+sense_context(void)
+{
+	return(excpt_nest_count > 0U);
+}
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  TOPPERSæ¨æºå²è¾¼ã¿å¦çã¢ãã«ã®å®ç¾
+ *
+ *  ARMã³ã¢ä¾å­é¨ã§ã¯ï¼å²è¾¼ã¿ã®æ±ãã«é¢ãã¦ï¼æ¬¡ã®2ã¤ã®æ¹æ³ããµãã¼ãã
+ *  ãï¼
+ *
+ *  (1) ã«ã¼ãã«ãåä½ã§ä½¿ç¨ããå ´åãSafeGã®ãã³ã»ã­ã¥ã¢ã¢ã¼ãã§ä½¿ç¨ã
+ *  ãå ´åï¼IRQãã«ã¼ãã«ç®¡çã®å²è¾¼ã¿ï¼FIQãã«ã¼ãã«ç®¡çå¤ã®å²è¾¼ã¿ã¨ã
+ *  ãï¼ããã©ã«ãã§ã¯ï¼ãã®æ¹æ³ãä½¿ç¨ãããï¼
+ *
+ *  (2) SafeGã®ã»ã­ã¥ã¢ã¢ã¼ãã§ä½¿ç¨ããå ´åï¼FIQãã«ã¼ãã«ç®¡çã®å²è¾¼ã¿
+ *  ã¨ãï¼ã«ã¼ãã«ã®åä½ä¸­ã¯IRQãå¸¸ã«ãã¹ã¯ããï¼ãã®æ¹æ³ãä½¿ç¨ããå ´å
+ *  ã«ã¯ï¼TOPPERS_SAFEG_SECUREããã¯ã­å®ç¾©ããï¼
+ * 
+ *  TOPPERSæ¨æºå²è¾¼ã¿å¦çã¢ãã«ã®ä¸­ã§ï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã¨å²è¾¼ã¿è¦æ±ç¦
+ *  æ­¢ãã©ã°ã«é¢ãã¦ã¯ï¼å²è¾¼ã¿ã³ã³ãã­ã¼ã©ã«ãã£ã¦å®ç¾æ¹æ³ãç°ãªãããï¼
+ *  ARMã³ã¢ä¾å­é¨ã§ã¯æ±ããªãï¼
+ */
+
+/*
+ *  FIQã¨IRQã®ä¸¡æ¹ãç¦æ­¢ããCPSRã®ããããã¿ã¼ã³
+ */
+#ifndef TOPPERS_MACRO_ONLY
+#define CPSR_FIQ_IRQ_BIT	(CPSR_FIQ_BIT|CPSR_IRQ_BIT)
+#else /* TOPPERS_MACRO_ONLY */
+#define CPSR_FIQ_IRQ_BIT	(CPSR_FIQ_BIT AOR CPSR_IRQ_BIT)
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  CPUã­ãã¯ã»å²è¾¼ã¿ã­ãã¯ã§ãªãç¶æ
+ã§ã®CPSRã®ããããã¿ã¼ã³
+ */
+#ifndef TOPPERS_SAFEG_SECURE
+#define CPSR_UNLOCK			UINT_C(0x00)
+#else /* TOPPERS_SAFEG_SECURE */
+#define CPSR_UNLOCK			CPSR_IRQ_BIT
+#endif /* TOPPERS_SAFEG_SECURE */
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã§ã®CPSRã®ããããã¿ã¼ã³
+ */
+#ifndef TOPPERS_SAFEG_SECURE
+#define CPSR_CPULOCK		CPSR_IRQ_BIT
+#else /* TOPPERS_SAFEG_SECURE */
+#define CPSR_CPULOCK		CPSR_FIQ_IRQ_BIT
+#endif /* TOPPERS_SAFEG_SECURE */
+
+/*
+ *  å²è¾¼ã¿ã­ãã¯ç¶æ
+ã§ã®CPSRã®ããããã¿ã¼ã³
+ */
+#define CPSR_INTLOCK		CPSR_FIQ_IRQ_BIT
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã¸ã®é·ç§»
+ */
+Inline void
+lock_cpu(void)
+{
+#if __TARGET_ARCH_ARM < 6
+	set_cpsr(current_cpsr() | CPSR_CPULOCK);
+#else /* __TARGET_ARCH_ARM < 6 */
+#ifndef TOPPERS_SAFEG_SECURE
+	disable_irq();
+#else /* TOPPERS_SAFEG_SECURE */
+	disable_fiq()
+#endif /* TOPPERS_SAFEG_SECURE */
+#endif /* __TARGET_ARCH_ARM < 6 */
+
+	/*
+	 *  ã¡ã¢ãªåç
+§ãï¼ãã®é¢æ°ãè¶
+ãã¦æé©åããããã¨ãææ­¢
+	 */
+	ARM_MEMORY_CHANGED;
+}
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã¸ã®ç§»è¡ï¼ãã£ã¹ãããã§ããç¶æ
+ï¼
+ */
+#define lock_cpu_dsp()		lock_cpu()
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã®è§£é¤
+ */
+Inline void
+unlock_cpu(void)
+{
+	/*
+	 *  ã¡ã¢ãªåç
+§ãï¼ãã®é¢æ°ãè¶
+ãã¦æé©åããããã¨ãææ­¢
+	 */
+	ARM_MEMORY_CHANGED;
+
+#if __TARGET_ARCH_ARM < 6
+	set_cpsr((current_cpsr() & ~CPSR_INT_MASK) | CPSR_UNLOCK);
+#else /* __TARGET_ARCH_ARM < 6 */
+#ifndef TOPPERS_SAFEG_SECURE
+	enable_irq();
+#else /* TOPPERS_SAFEG_SECURE */
+	enable_fiq()
+#endif /* TOPPERS_SAFEG_SECURE */
+#endif /* __TARGET_ARCH_ARM < 6 */
+}
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã®è§£é¤ï¼ãã£ã¹ãããã§ããç¶æ
+ï¼
+ */
+#define unlock_cpu_dsp()	unlock_cpu()
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã®åç
+§
+ */
+Inline bool_t
+sense_lock(void)
+{
+#ifndef TOPPERS_SAFEG_SECURE
+	return((current_cpsr() & CPSR_IRQ_BIT) != 0U);
+#else /* TOPPERS_SAFEG_SECURE */
+	return((current_cpsr() & CPSR_FIQ_BIT) != 0U);
+#endif /* TOPPERS_SAFEG_SECURE */
+}
+
+/*
+ *  å²è¾¼ã¿ãåãä»ããããã®é
+å»¶å¦ç
+ */
+Inline void
+delay_for_interrupt(void)
+{
+}
+
+/*
+ *  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯åæå¤
+ */
+#define TOPPERS_ISTKPT(istk, istksz)	((STK_T *)((char *)(istk) + (istksz)))
+
+/*
+ *  ã¿ã¹ã¯ã³ã³ãã­ã¹ããã­ãã¯ã®å®ç¾©
+ */
+typedef struct task_context_block {
+	void	*sp;		/* ã¹ã¿ãã¯ãã¤ã³ã¿ */
+	FP		pc;			/* å®è¡åéçªå° */
+} TSKCTXB;
+
+/*
+ *  ã¿ã¹ã¯ãã£ã¹ãããã£
+ */
+
+/*
+ *  æé«åªå
+é ä½ã¿ã¹ã¯ã¸ã®ãã£ã¹ãããï¼core_support.Sï¼
+ *
+ *  dispatchã¯ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãããå¼ã³åºããããµã¼ãã¹ã³ã¼ã«å¦çã
+ *  ãå¼ã³åºãã¹ããã®ã§ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãã»CPUã­ãã¯ç¶æ
+ã»ãã£ã¹ãã
+ *  ãè¨±å¯ç¶æ
+ã»ï¼ã¢ãã«ä¸ã®ï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ç¶æ
+ã§å¼ã³åºããª
+ *  ããã°ãªããªãï¼
+ */
+extern void dispatch(void);
+
+/*
+ *  éã¿ã¹ã¯ã³ã³ãã­ã¹ãããã®ãã£ã¹ãããè¦æ±
+ */
+#define request_dispatch()
+
+/*
+ *  ãã£ã¹ãããã£ã®åä½éå§ï¼core_support.Sï¼
+ *
+ *  start_dispatchã¯ï¼ã«ã¼ãã«èµ·åæã«å¼ã³åºãã¹ããã®ã§ï¼ãã¹ã¦ã®å²è¾¼
+ *  ã¿ãç¦æ­¢ããç¶æ
+ï¼å²è¾¼ã¿ã­ãã¯ç¶æ
+ã¨åç­ã®ç¶æ
+ï¼ã§å¼ã³åºããªããã°
+ *  ãªããªãï¼
+ */
+extern void start_dispatch(void) NoReturn;
+
+/*
+ *  ç¾å¨ã®ã³ã³ãã­ã¹ããæ¨ã¦ã¦ãã£ã¹ãããï¼core_support.Sï¼
+ *
+ *  exit_and_dispatchã¯ï¼ext_tskããå¼ã³åºãã¹ããã®ã§ï¼ã¿ã¹ã¯ã³ã³ãã­
+ *  ã¹ãã»CPUã­ãã¯ç¶æ
+ã»ãã£ã¹ãããè¨±å¯ç¶æ
+ã»ï¼ã¢ãã«ä¸ã®ï¼å²è¾¼ã¿åªå
+
+ *  åº¦ãã¹ã¯å
+¨è§£é¤ç¶æ
+ã§å¼ã³åºããªããã°ãªããªãï¼
+ */
+extern void exit_and_dispatch(void) NoReturn;
+
+/*
+ *  ã«ã¼ãã«ã®çµäºå¦çã®å¼åºãï¼core_support.Sï¼
+ *
+ *  call_exit_kernelã¯ï¼ã«ã¼ãã«ã®çµäºæã«å¼ã³åºãã¹ããã®ã§ï¼éã¿ã¹ã¯
+ *  ã³ã³ãã­ã¹ãã«åãæãã¦ï¼ã«ã¼ãã«ã®çµäºå¦çï¼exit_kernelï¼ãå¼ã³åº
+ *  ãï¼
+ */
+extern void call_exit_kernel(void) NoReturn;
+     
+/*
+ *  ã¿ã¹ã¯ã³ã³ãã­ã¹ãã®åæå
+ *
+ *  ã¿ã¹ã¯ãä¼æ­¢ç¶æ
+ããå®è¡ã§ããç¶æ
+ã«é·ç§»ããæã«å¼ã°ããï¼ãã®æç¹
+ *  ã§ã¹ã¿ãã¯é åãä½¿ã£ã¦ã¯ãªããªãï¼
+ *
+ *  activate_contextãï¼ã¤ã³ã©ã¤ã³é¢æ°ã§ã¯ãªããã¯ã­å®ç¾©ã¨ãã¦ããã®ã¯ï¼
+ *  ãã®æç¹ã§ã¯TCBãå®ç¾©ããã¦ããªãããã§ããï¼
+ */
+extern void start_r(void);
+
+#define activate_context(p_tcb)											\
+{																		\
+	(p_tcb)->tskctxb.sp = (void *)((char *)((p_tcb)->p_tinib->stk)		\
+										+ (p_tcb)->p_tinib->stksz);		\
+	(p_tcb)->tskctxb.pc = (FP) start_r;									\
+}
+
+/*
+ *  æ¨æºã®å²è¾¼ã¿ç®¡çæ©è½ã®åæåå¦çãç¨ããªã
+ */
+#define OMIT_INITIALIZE_INTERRUPT
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©ãã¼ãã«ï¼kernel_cfg.cï¼
+ */
+extern FP inh_table[TNUM_INHNO];
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³è¨­å®ãã¼ãã«ï¼kernel_cfg.cï¼
+ * 
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã«å¯¾ãã¦å²è¾¼ã¿å±æ§ãè¨­å®ããã¦ããã°1ï¼è¨­å®ããã¦ã
+ *  ãªããã°0ãä¿æãããã¼ãã«ï¼
+ */
+#ifdef USE_INTCFG_TABLE
+extern const uint8_t intcfg_table[TNUM_INTNO];
+#endif /* USE_INTCFG_TABLE */
+
+/*
+ *  æ¨æºã®ä¾å¤ç®¡çæ©è½ã®åæåå¦çãç¨ããªã
+ */
+#define OMIT_INITIALIZE_EXCEPTION
+
+/*
+ *  CPUä¾å¤ãã³ãã©ãã¼ãã«ï¼kernel_cfg.cï¼
+ */
+extern const FP exc_table[TNUM_EXCNO];
+
+/*
+ *  CPUä¾å¤ãã³ãã©ã®åæå
+ */
+Inline void
+initialize_exception(void)
+{
+}
+
+/*
+ *  CPUä¾å¤ã®çºçããæã®ã³ã³ãã­ã¹ãã®åç
+§
+ *
+ *  CPUä¾å¤ã®çºçããæã®ã³ã³ãã­ã¹ããï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãã®æã«falseï¼
+ *  ããã§ãªãæã«trueãè¿ãï¼
+ */
+Inline bool_t
+exc_sense_context(void *p_excinf)
+{
+	return(((T_EXCINF *)(p_excinf))->nest_count != 0U);
+}
+
+/*
+ *  CPUä¾å¤ã®çºçããæã®å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®åç
+§
+ */
+Inline PRI
+exc_get_intpri(void *p_excinf)
+{
+	return((PRI)(((T_EXCINF *)(p_excinf))->intpri));
+}
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã¾ãã¯å²è¾¼ã¿ã­ãã¯ç¶æ
+ãã®åç
+§
+ */
+Inline bool_t
+exc_sense_lock(void *p_excinf)
+{
+#ifndef TOPPERS_SAFEG_SECURE
+	return(((((T_EXCINF *)(p_excinf))->cpsr) & CPSR_INT_MASK) != 0U);
+#define CPSR_UNLOCK			UINT_C(0x00)
+#else /* TOPPERS_SAFEG_SECURE */
+	return(((((T_EXCINF *)(p_excinf))->cpsr) & CPSR_FIQ_BIT) != 0U);
+#endif /* TOPPERS_SAFEG_SECURE */
+}
+
+/*
+ *  CPUä¾å¤ã®çºçããæã®ã³ã³ãã­ã¹ãã¨å²è¾¼ã¿ã®ãã¹ã¯ç¶æ
+ã®åç
+§
+ *
+ *  CPUä¾å¤ã®çºçããæã®ã·ã¹ãã ç¶æ
+ãï¼ã«ã¼ãã«å®è¡ä¸­ã§ãªãï¼ã¿ã¹ã¯ã³
+ *  ã³ãã­ã¹ãã§ããï¼å
+¨å²è¾¼ã¿ã­ãã¯ç¶æ
+ã§ãªãï¼CPUã­ãã¯ç¶æ
+ã§ãªãï¼å²
+ *  è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ç¶æ
+ã§ããæã«trueï¼ããã§ãªãæã«falseãè¿ã
+ *  ï¼CPUä¾å¤ãã«ã¼ãã«ç®¡çå¤ã®å²è¾¼ã¿å¦çä¸­ã§çºçããå ´åã«ãfalseãè¿
+ *  ãï¼ï¼
+ *
+ */
+Inline bool_t
+exc_sense_intmask(void *p_excinf)
+{
+	return(!exc_sense_context(p_excinf)
+				&& exc_get_intpri(p_excinf) == TIPM_ENAALL
+				&& !exc_sense_lock(p_excinf));
+}
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  MMUé¢é£ã®æä½ï¼VMSAï¼
+ */
+#ifdef USE_ARM_MMU
+
+/*
+ *  å¤æãã¼ãã«ãã¼ã¹ã¬ã¸ã¹ã¿ï¼TTBRï¼ã®è¨­å®å¤
+ */
+#if __TARGET_ARCH_ARM < 6
+#define TTBR_CONFIG		0U
+#elif __TARGET_ARCH_ARM < 7
+#define TTBR_CONFIG		(CP15_TTBR_RGN_CACHEABLE|CP15_TTBR_RGN_SHAREABLE \
+												|CP15_TTBR_RGN_WBACK)
+#else /* __TARGET_ARCH_ARM < 7 */
+#define TTBR_CONFIG		(CP15_TTBR_RGN_SHAREABLE|CP15_TTBR_RGN_WBWA \
+												|CP15_TTBR_IRGN_WBWA)
+#endif
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  MMUã®è¨­å®æ
+å ±ã®ãã¼ã¿å
+ */
+typedef struct arm_mmu_config {
+	uint32_t	vaddr;			/* ä»®æ³ã¢ãã¬ã¹ */
+	uint32_t	paddr;			/* ç©çã¢ãã¬ã¹ */
+	uint32_t	size;			/* ãµã¤ãº */
+	uint32_t	attr;			/* ã»ã¯ã·ã§ã³å±æ§ */
+} ARM_MMU_CONFIG;
+
+/*
+ *  MMUã®è¨­å®æ
+å ±ã®æ°ï¼ã¡ã¢ãªã¨ãªã¢ã®æ°ï¼ï¼target_kernel_impl.cï¼
+ */
+extern const uint_t arm_tnum_memory_area;
+
+/*
+ *  MMUã®è¨­å®æ
+å ±ï¼ã¡ã¢ãªã¨ãªã¢ã®æ
+å ±ï¼ï¼target_kernel_impl.cï¼
+ */
+extern ARM_MMU_CONFIG arm_memory_area[];
+
+/*
+ *  MMUã®åæå
+ */
+extern void arm_mmu_initialize(void);
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* USE_ARM_MMU */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ã³ã¢ä¾å­ã®åæå
+ */
+extern void core_initialize(void);
+
+/*
+ *  ã³ã¢ä¾å­ã®çµäºå¦ç
+ */
+extern void core_terminate(void);
+
+/*
+ *  CPUä¾å¤ã®çºçç¶æ³ã®ã­ã°åºå
+ */
+#ifndef OMIT_XLOG_SYS
+extern void xlog_sys(void *p_excinf);
+extern void xlog_fsr(uint32_t fsr, uint32_t far);
+#endif /* OMIT_XLOG_SYS */
+
+/*
+ *  æªå®ç¾©ã®å²è¾¼ã¿ãå
+¥ã£ãå ´åã®å¦ç
+ */
+extern void default_int_handler(void);
+
+/*
+ *  æªå®ç¾©ã®ä¾å¤ãå
+¥ã£ãå ´åã®å¦ç
+ */
+extern void default_exc_handler(void *p_excinf, EXCNO excno);
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_CORE_KERNEL_IMPL_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_offset.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_offset.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_offset.trb	(revision 270)
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+#
+#		ãªãã»ãããã¡ã¤ã«çæç¨Rubyãã³ãã¬ã¼ãï¼ARMç¨ï¼
+#
+#  $Id: core_offset.trb 572 2016-02-01 14:40:09Z ertl-hiro $
+#
+
+#
+#  ã¿ã¼ã²ããéä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ã
+#
+IncludeTrb("kernel/genoffset.trb")
+
+#
+#  ãã£ã¼ã«ãã®ãªãã»ããã®å®ç¾©ã®çæ
+#
+GenerateDefine("TCB_p_tinib", $offsetof_TCB_p_tinib)
+GenerateDefine("TCB_sp", $offsetof_TCB_sp)
+GenerateDefine("TCB_pc", $offsetof_TCB_pc)
+GenerateDefine("TINIB_exinf", $offsetof_TINIB_exinf)
+GenerateDefine("TINIB_task", $offsetof_TINIB_task)
+GenerateDefine("TINIB_stksz", $offsetof_TINIB_stksz)
+GenerateDefine("TINIB_stk", $offsetof_TINIB_stk)
+GenerateDefine("T_EXCINF_cpsr", $offsetof_T_EXCINF_cpsr)
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_pl310.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_pl310.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_pl310.c	(revision 270)
@@ -0,0 +1,185 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2013-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		L2ã­ã£ãã·ã¥ã³ã³ãã­ã¼ã©ï¼PL310ï¼ã®æä½ã©ã¤ãã©ãª
+ */
+
+#include "kernel_impl.h"
+#include "core_pl310.h"
+
+Inline uint32_t
+get_way_mask(void)
+{
+	uint32_t	aux;
+	
+	aux = sil_rew_mem(PL310_AUX_CTRL);
+	if ((aux & PL310_AUX_CTRL_ASSOCIATIVITY) != 0U) {
+		/* 16ã¦ã§ã¤ */
+		return(0x0000ffffU);
+	}
+	else {
+		/* 8ã¦ã§ã¤ */
+		return(0x000000ffU);
+	}
+}
+
+Inline void
+pl310_cache_sync(void)
+{
+	sil_wrw_mem(PL310_CACHE_SYNC, 0);
+}
+
+Inline void
+pl310_inv_all(void)
+{
+	uint32_t	way_mask = get_way_mask();
+
+	/* ãã¹ã¦ã®ã¦ã§ã¤ãç¡å¹åãã */
+	sil_wrw_mem(PL310_INV_WAY, 0xffff);
+	while ((sil_rew_mem(PL310_INV_WAY) & way_mask) != 0U) ;
+	pl310_cache_sync();
+}
+
+Inline void
+pl310_debug_set(uint32_t val)
+{
+	sil_wrw_mem(PL310_DEBUG_CTRL, val);
+}
+
+/*
+ *  PL310ã®åæå
+ */
+void
+pl310_initialize(uint32_t aux_val, uint32_t aux_mask)
+{
+	uint32_t	aux;
+	uint32_t	prefetch;
+	uint32_t	prefetch_val = 0U;
+
+	/* L2ã­ã£ãã·ã¥ããã£ã¹ã¨ã¼ãã«ã®å ´åã®ã¿åæåãè¡ã */
+	if ((sil_rew_mem(PL310_CTRL) & 0x01) == 0U) {
+		/* å
+±æå±æ§ãç¡è¦ãã */
+		aux_val |= PL310_AUX_CTRL_IGNORE_SHARE;
+
+		/* å½ä»¤ããªãã§ãããã¤ãã¼ãã« */
+		aux_val |= PL310_AUX_CTRL_INST_PREFETCH;
+		prefetch_val |= PL310_AUX_CTRL_INST_PREFETCH;
+
+		/* ãã¼ã¿ããªãã§ãããã¤ãã¼ãã« */
+		aux_val |= PL310_AUX_CTRL_DATA_PREFETCH;
+		prefetch_val |= PL310_AUX_CTRL_DATA_PREFETCH;
+
+		/* ããã«ã©ã¤ã³ãã£ã«ãã¤ãã¼ãã« */
+		prefetch_val |= PL310_PREFETCH_CTRL_DLINEFILL;
+		prefetch_val |= PL310_PREFETCH_CTRL_INCR_DLINEFILL;
+                
+		/* è£å©å¶å¾¡ã¬ã¸ã¹ã¿ãè¨­å® */
+		aux = sil_rew_mem(PL310_AUX_CTRL);
+		sil_wrw_mem(PL310_AUX_CTRL, ((aux & aux_mask) | aux_val));
+
+		/* ããªãã§ããå¶å¾¡ã¬ã¸ã¹ã¿ãè¨­å® */
+		prefetch = sil_rew_mem(PL310_PREFETCH_CTRL);
+		sil_wrw_mem(PL310_PREFETCH_CTRL, (prefetch | prefetch_val));
+
+		/* L2ã­ã£ãã·ã¥ã®å
+¨ä½ã®ç¡å¹å */
+		pl310_inv_all();
+        
+		/* ã¯ã­ãã¯ã²ã¼ãã£ã³ã°ã¨ã¹ã¿ã³ãã¤ã¢ã¼ããã¤ãã¼ãã« */
+		sil_wrw_mem(PL310_POWER_CTRL, 0x03);
+        
+		/* L2ã­ã£ãã·ã¥ã®ã¤ãã¼ãã« */
+		sil_wrw_mem(PL310_CTRL, 0x01);
+	}    
+}
+
+/*
+ *  L2ã­ã£ãã·ã¥ã®ãã£ã¹ã¨ã¼ãã«
+ */
+void
+pl310_disable(void)
+{
+	pl310_clean_and_invalidate_all();
+	sil_wrw_mem(PL310_CTRL, 0x00);
+}
+
+/*
+ *  L2ã­ã£ãã·ã¥å
+¨ä½ã®ç¡å¹åï¼æ¸ãæ»ããªãï¼
+ */
+void
+pl310_invalidate_all(void)
+{
+	pl310_debug_set(0x03);
+	pl310_inv_all();
+	pl310_debug_set(0x00);
+}
+
+/*
+ *  L2ã­ã£ãã·ã¥å
+¨ä½ã®ã¯ãªã¼ã³ã¨ç¡å¹å
+ */
+void
+pl310_clean_and_invalidate_all(void)
+{
+	uint32_t	way_mask = get_way_mask();
+
+	pl310_debug_set(0x03);
+	sil_wrw_mem(PL310_CLEAN_INV_WAY, way_mask);
+	while ((sil_rew_mem(PL310_CLEAN_INV_WAY) & way_mask) != 0U) ;
+	pl310_cache_sync();
+	pl310_debug_set(0x00);
+}
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_pl310.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_pl310.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_pl310.h	(revision 270)
@@ -0,0 +1,148 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2013-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		L2ã­ã£ãã·ã¥ã³ã³ãã­ã¼ã©ï¼PL310ï¼ã«é¢ããå®ç¾©
+ */
+
+#ifndef TOPPERS_PL310_H
+#define TOPPERS_PL310_H
+
+/*
+ *  åã­ã£ã¹ããè¡ããã¯ã­ã®å®ç¾©
+ */
+#ifndef CAST
+#define CAST(type, val)		((type)(val))
+#endif /* CAST */
+
+/*
+ *  PL310ã®ã¬ã¸ã¹ã¿ã®çªå°ã®å®ç¾©
+ */
+#define PL310_CACHE_ID			CAST(uint32_t *, PL310_BASE + 0x000)
+#define PL310_CACHE_TYPE		CAST(uint32_t *, PL310_BASE + 0x004)
+#define PL310_CTRL				CAST(uint32_t *, PL310_BASE + 0x100)
+#define PL310_AUX_CTRL			CAST(uint32_t *, PL310_BASE + 0x104)
+#define PL310_TAG_RAM_CTRL		CAST(uint32_t *, PL310_BASE + 0x108)
+#define PL310_DATA_RAM_CTRL		CAST(uint32_t *, PL310_BASE + 0x10c)
+#define PL310_EVENT_CNT_CTRL	CAST(uint32_t *, PL310_BASE + 0x200)
+#define PL310_EVENT_CNT1_CFG	CAST(uint32_t *, PL310_BASE + 0x204)
+#define PL310_EVENT_CNT0_CFG	CAST(uint32_t *, PL310_BASE + 0x208)
+#define PL310_EVENT_CNT1		CAST(uint32_t *, PL310_BASE + 0x20c)
+#define PL310_EVENT_CNT0		CAST(uint32_t *, PL310_BASE + 0x210)
+#define PL310_INT_MASK			CAST(uint32_t *, PL310_BASE + 0x214)
+#define PL310_INT_MASK_STAT		CAST(uint32_t *, PL310_BASE + 0x218)
+#define PL310_INT_RAW_STAT		CAST(uint32_t *, PL310_BASE + 0x21c)
+#define PL310_INT_CLEAR			CAST(uint32_t *, PL310_BASE + 0x220)
+#define PL310_CACHE_SYNC		CAST(uint32_t *, PL310_BASE + 0x730)
+#define PL310_INV_PA			CAST(uint32_t *, PL310_BASE + 0x770)
+#define PL310_INV_WAY			CAST(uint32_t *, PL310_BASE + 0x77c)
+#define PL310_CLEAN_PA			CAST(uint32_t *, PL310_BASE + 0x7b0)
+#define PL310_CLEAN_IDX			CAST(uint32_t *, PL310_BASE + 0x7b8)
+#define PL310_CLEAN_WAY			CAST(uint32_t *, PL310_BASE + 0x7bc)
+#define PL310_CLEAN_INV_PA		CAST(uint32_t *, PL310_BASE + 0x7f0)
+#define PL310_CLEAN_INV_IDX		CAST(uint32_t *, PL310_BASE + 0x7f8)
+#define PL310_CLEAN_INV_WAY		CAST(uint32_t *, PL310_BASE + 0x7Fc)
+#define PL310_D_LOCKDOWN0		CAST(uint32_t *, PL310_BASE + 0x900)
+#define PL310_I_LOCKDOWN0		CAST(uint32_t *, PL310_BASE + 0x904)
+#define PL310_DEBUG_CTRL		CAST(uint32_t *, PL310_BASE + 0xf40)
+#define PL310_PREFETCH_CTRL		CAST(uint32_t *, PL310_BASE + 0xf60)
+#define PL310_POWER_CTRL		CAST(uint32_t *, PL310_BASE + 0xf80)
+
+/*
+ *  ã­ã£ãã·ã¥è£å©å¶å¾¡ã¬ã¸ã¹ã¿ï¼PL310_AUX_CTRLï¼ã®è¨­å®å¤
+ */
+#define PL310_AUX_CTRL_ASSOCIATIVITY		0x00010000
+#define PL310_AUX_CTRL_WAY_SIZE_SHIFT		17
+#define PL310_AUX_CTRL_WAY_SIZE_MASK		0x000e0000
+#define PL310_AUX_CTRL_IGNORE_SHARE			0x00400000
+#define PL310_AUX_CTRL_NS_LOCKDOWN			0x04000000
+#define PL310_AUX_CTRL_NS_INT_CTRL			0x08000000
+#define PL310_AUX_CTRL_DATA_PREFETCH		0x10000000
+#define PL310_AUX_CTRL_INST_PREFETCH		0x20000000
+#define PL310_AUX_CTRL_EARLY_BRESP			0x40000000
+
+/*
+ *  ããªãã§ããå¶å¾¡ã¬ã¸ã¹ã¿ï¼PL310_PREFETCH_CTRLï¼ã®è¨­å®å¤
+ */
+#define PL310_PREFETCH_CTRL_INCR_DLINEFILL	0x00800000
+#define PL310_PREFETCH_CTRL_DATA_PREFETCH	0x10000000
+#define PL310_PREFETCH_CTRL_INST_PREFETCH	0x20000000
+#define PL310_PREFETCH_CTRL_DLINEFILL		0x40000000
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  L2ã­ã£ãã·ã¥ã®åæåã¨ã¤ãã¼ãã«
+ */
+extern void pl310_initialize(uint32_t aux_val, uint32_t aux_mask);
+
+/*
+ *  L2ã­ã£ãã·ã¥ã®ãã£ã¹ã¨ã¼ãã«
+ */
+extern void pl310_disable(void);
+
+/*
+ *  L2ã­ã£ãã·ã¥å
+¨ä½ã®ç¡å¹åï¼æ¸ãæ»ããªãï¼
+ */
+extern void pl310_invalidate_all(void);
+
+/*
+ *  L2ã­ã£ãã·ã¥å
+¨ä½ã®ã¯ãªã¼ã³ã¨ç¡å¹å
+ */
+extern void pl310_clean_and_invalidate_all(void);
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_PL310_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_rename.def
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_rename.def	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_rename.def	(revision 270)
@@ -0,0 +1,52 @@
+# kernel_cfg.c
+inh_table
+intcfg_table
+exc_table
+
+# core_support.S
+dispatch
+start_dispatch
+exit_and_dispatch
+call_exit_kernel
+start_r
+irq_handler
+undef_handler
+svc_handler
+pabort_handler
+dabort_handler
+fiq_handler
+current_cpsr
+set_cpsr
+
+# core_kernel_impl.c
+excpt_nest_count
+arm_mmu_initialize
+core_initialize
+core_terminate
+xlog_sys
+xlog_fsr
+default_int_handler
+default_exc_handler
+
+# gic_kernel_impl.c
+gicc_initialize
+gicc_terminate
+gicd_initialize
+gicd_terminate
+
+# gic_support.S
+irc_begin_int
+irc_end_int
+irc_get_intpri
+irc_begin_exc
+irc_end_exc
+
+# pl310.c
+pl310_initialize
+pl310_disable
+pl310_invalidate_all
+pl310_clean_and_invalidate_all
+
+# target_kernel_impl.c
+arm_tnum_memory_area
+arm_memory_area
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_rename.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_rename.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_rename.h	(revision 270)
@@ -0,0 +1,74 @@
+/* This file is generated from core_rename.def by genrename. */
+
+#ifndef TOPPERS_CORE_RENAME_H
+#define TOPPERS_CORE_RENAME_H
+
+/*
+ *  kernel_cfg.c
+ */
+#define inh_table					_kernel_inh_table
+#define intcfg_table				_kernel_intcfg_table
+#define exc_table					_kernel_exc_table
+
+/*
+ *  core_support.S
+ */
+#define dispatch					_kernel_dispatch
+#define start_dispatch				_kernel_start_dispatch
+#define exit_and_dispatch			_kernel_exit_and_dispatch
+#define call_exit_kernel			_kernel_call_exit_kernel
+#define start_r						_kernel_start_r
+#define irq_handler					_kernel_irq_handler
+#define undef_handler				_kernel_undef_handler
+#define svc_handler					_kernel_svc_handler
+#define pabort_handler				_kernel_pabort_handler
+#define dabort_handler				_kernel_dabort_handler
+#define fiq_handler					_kernel_fiq_handler
+#define current_cpsr				_kernel_current_cpsr
+#define set_cpsr					_kernel_set_cpsr
+
+/*
+ *  core_kernel_impl.c
+ */
+#define excpt_nest_count			_kernel_excpt_nest_count
+#define arm_mmu_initialize			_kernel_arm_mmu_initialize
+#define core_initialize				_kernel_core_initialize
+#define core_terminate				_kernel_core_terminate
+#define xlog_sys					_kernel_xlog_sys
+#define xlog_fsr					_kernel_xlog_fsr
+#define default_int_handler			_kernel_default_int_handler
+#define default_exc_handler			_kernel_default_exc_handler
+
+/*
+ *  gic_kernel_impl.c
+ */
+#define gicc_initialize				_kernel_gicc_initialize
+#define gicc_terminate				_kernel_gicc_terminate
+#define gicd_initialize				_kernel_gicd_initialize
+#define gicd_terminate				_kernel_gicd_terminate
+
+/*
+ *  gic_support.S
+ */
+#define irc_begin_int				_kernel_irc_begin_int
+#define irc_end_int					_kernel_irc_end_int
+#define irc_get_intpri				_kernel_irc_get_intpri
+#define irc_begin_exc				_kernel_irc_begin_exc
+#define irc_end_exc					_kernel_irc_end_exc
+
+/*
+ *  pl310.c
+ */
+#define pl310_initialize			_kernel_pl310_initialize
+#define pl310_disable				_kernel_pl310_disable
+#define pl310_invalidate_all		_kernel_pl310_invalidate_all
+#define pl310_clean_and_invalidate_all	_kernel_pl310_clean_and_invalidate_all
+
+/*
+ *  target_kernel_impl.c
+ */
+#define arm_tnum_memory_area		_kernel_arm_tnum_memory_area
+#define arm_memory_area				_kernel_arm_memory_area
+
+
+#endif /* TOPPERS_CORE_RENAME_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_sil.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_sil.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_sil.h	(revision 270)
@@ -0,0 +1,158 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		sil.hã®ã³ã¢ä¾å­é¨ï¼ARMç¨ï¼
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼target_sil.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯ã«ã¼ãã
+ *  ãããã¡ã¤ã«ï¼ã®ã¿ããã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡ã¤ã«ããç´æ¥ã¤ã³
+ *  ã¯ã«ã¼ããã¦ã¯ãªããªãï¼
+ */
+
+#ifndef TOPPERS_CORE_SIL_H
+#define TOPPERS_CORE_SIL_H
+
+#include <t_stddef.h>
+
+#ifndef TOPPERS_MACRO_ONLY
+#ifndef __thumb__
+
+/*
+ *  ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿ï¼CPSRï¼ã®ç¾å¨å¤ã®èª­åºã
+ */
+Inline uint32_t
+TOPPERS_current_cpsr(void)
+{
+	uint32_t	cpsr;
+
+	Asm("mrs %0, cpsr" : "=r"(cpsr));
+	return(cpsr);
+}
+
+/*
+ *  ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿ï¼CPSRï¼ã®ç¾å¨å¤ã®å¤æ´
+ */
+Inline void
+TOPPERS_set_cpsr(uint32_t cpsr)
+{
+	Asm("msr cpsr_cxsf, %0" : : "r"(cpsr) : "memory","cc");
+}
+
+#else /* __thumb__ */
+/*
+ *  Thumbã¢ã¼ãã§ã¯mrs/msrå½ä»¤ãä½¿ç¨ã§ããªãããï¼é¢æ°ã¨ãã¦å®ç¾ãã¦ï¼
+ *  ARMã¢ã¼ãã«ç§»è¡ãã¦å®è¡ããï¼
+ */
+
+/*
+ *  ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿ï¼CPSRï¼ã®ç¾å¨å¤ã®èª­åºã
+ */
+extern uint32_t current_cpsr(void);
+#define TOPPERS_current_cpsr()	current_cpsr()
+
+/*
+ *  ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿ï¼CPSRï¼ã®ç¾å¨å¤ã®å¤æ´
+ */
+extern void set_cpsr(uint32_t cpsr);
+#define TOPPERS_set_cpsr(cpsr)	current_cpsr(cpsr)
+
+#endif /* __thumb__ */
+
+/*
+ *  ãã¹ã¦ã®å²è¾¼ã¿ï¼FIQã¨IRQï¼ã®ç¦æ­¢
+ */
+Inline uint32_t
+TOPPERS_disint(void)
+{
+	uint32_t	cpsr;
+	uint32_t	fiq_irq_mask;
+
+	cpsr = TOPPERS_current_cpsr();
+	fiq_irq_mask = cpsr & (0x40U|0x80U);
+#if __TARGET_ARCH_ARM == 6 || __TARGET_ARCH_ARM == 7
+	Asm("cpsid fi" ::: "memory");
+#else /* __TARGET_ARCH_ARM == 6 || __TARGET_ARCH_ARM == 7 */
+	cpsr |= (0x40U|0x80U);
+	TOPPERS_set_cpsr(cpsr);
+#endif /* __TARGET_ARCH_ARM == 6 || __TARGET_ARCH_ARM == 7 */
+	return(fiq_irq_mask);
+}
+
+/*
+ *  FIQã¨IRQã®ç¦æ­¢ãããã®å¾©å¸°
+ */
+Inline void
+TOPPERS_set_fiq_irq(uint32_t fiq_irq_mask)
+{
+	uint32_t	cpsr;
+
+	cpsr = TOPPERS_current_cpsr();
+	cpsr &= ~(0x40U|0x80U);
+	cpsr |= fiq_irq_mask;
+	TOPPERS_set_cpsr(cpsr);
+}
+
+/*
+ *  å
+¨å²è¾¼ã¿ã­ãã¯ç¶æ
+ã®å¶å¾¡
+ */
+#define SIL_PRE_LOC		uint32_t TOPPERS_fiq_irq_mask
+#define SIL_LOC_INT()	((void)(TOPPERS_fiq_irq_mask = TOPPERS_disint()))
+#define SIL_UNL_INT()	(TOPPERS_set_fiq_irq(TOPPERS_fiq_irq_mask))
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_CORE_SIL_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_stddef.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_stddef.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_stddef.h	(revision 270)
@@ -0,0 +1,73 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		t_stddef.hã®ã³ã¢ä¾å­é¨ï¼ARMç¨ï¼
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼target_stddef.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯ã«ã¼ã
+ *  ããããã¡ã¤ã«ï¼ã®ã¿ããã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡ã¤ã«ããç´æ¥ã¤
+ *  ã³ã¯ã«ã¼ããã¦ã¯ãªããªãï¼
+ */
+
+#ifndef TOPPERS_CORE_STDDEF_H
+#define TOPPERS_CORE_STDDEF_H
+
+/*
+ *  ã¿ã¼ã²ãããè­å¥ããããã®ãã¯ã­ã®å®ç¾©
+ */
+#define TOPPERS_ARM						/* ã³ã¢ç¥ç§° */
+
+#endif /* TOPPERS_CORE_STDDEF_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_support.S
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_support.S	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_support.S	(revision 270)
@@ -0,0 +1,1266 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2004 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2006-2017 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã«ã¼ãã«ã®ã³ã¢ä¾å­é¨ã®ã¢ã»ã³ããªè¨èªé¨ï¼ARMç¨ï¼
+ */
+
+#define TOPPERS_MACRO_ONLY
+#define TOPPERS_ASM_MACRO
+#define UINT_C(val)			(val)		/* uint_tåã®å®æ°ãä½ããã¯ã­ */
+#define ULONG_C(val)		(val)		/* ulong_tåã®å®æ°ãä½ããã¯ã­ */
+#define CAST(type, val)		(val)		/* åã­ã£ã¹ããè¡ããã¯ã­ */
+#include "kernel_impl.h"
+#include "offset.h"
+#include "core_asm.inc"
+
+/*
+ *  ä¾å¤ãã¯ã¿
+ */
+	ASECTION(.vector)
+	AALIGN(5)
+	AGLOBAL(vector_table)
+ALABEL(vector_table)
+	ldr		pc, reset_vector		/* ãªã»ãã */
+	ldr		pc, undef_vector		/* æªå®ç¾©å½ä»¤ */
+	ldr		pc, svc_vector			/* ã½ããã¦ã§ã¢å²è¾¼ã¿ */
+	ldr		pc, pabort_vector		/* ããªãã§ããã¢ãã¼ã */
+	ldr		pc, dabort_vector		/* ãã¼ã¿ã¢ãã¼ã */
+	ldr		pc, reset_vector		/* æªä½¿ç¨ */
+	ldr		pc, irq_vector			/* IRQ */
+	ldr		pc, fiq_vector			/* FIQ */
+
+/*
+ *  ä¾å¤ãã¯ã¿ã®å½ä»¤ããåç
+§ãããã¸ã£ã³ãå
+ã¢ãã¬ã¹
+ */
+	AGLOBAL(vector_ref_table)
+ALABEL(vector_ref_table)
+ALABEL(reset_vector)
+	ALONG	Reset_Handler
+ALABEL(undef_vector)
+	ALONG	undef_handler
+ALABEL(svc_vector)
+	ALONG	svc_handler
+ALABEL(pabort_vector)
+	ALONG	pabort_handler
+ALABEL(dabort_vector)
+	ALONG	dabort_handler
+ALABEL(irq_vector)
+	ALONG	irq_handler
+ALABEL(fiq_vector)
+	ALONG	fiq_handler
+
+/*
+ *  ã¿ã¹ã¯ãã£ã¹ãããã£
+ */
+	ATEXT
+	AALIGN(2)
+	AGLOBAL(dispatch)
+ALABEL(dispatch)
+	/*
+	 *  ãã®ã«ã¼ãã³ã¯ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãã»CPUã­ãã¯ç¶æ
+ã»å²è¾¼ã¿åªå
+åº¦
+	 *  ãã¹ã¯å
+¨è§£é¤ç¶æ
+ã»ãã£ã¹ãããè¨±å¯ç¶æ
+ã§å¼ã³åºãããï¼
+	 */
+	push	{r12,lr}				/* æ»ãçªå°ãä¿å­ï¼r12ã¯ããã¼ */
+#ifdef TOPPERS_SUPPORT_OVRHDR
+	bl		ovrtimer_stop
+#endif /* TOPPERS_SUPPORT_OVRHDR */
+	stmfd	sp!, {r4-r11}			/* éã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®ä¿å­ */
+	ldr		r0, =p_runtsk			/* p_runtsk â r0 */
+	ldr		r0, [r0]
+	str		sp, [r0,#TCB_sp]		/* ã¹ã¿ãã¯ãã¤ã³ã¿ãä¿å­ */
+	adr		r1, dispatch_r
+	str		r1, [r0,#TCB_pc]		/* å®è¡åéçªå°ãä¿å­ */
+	b		dispatcher				/* r0ã«ã¯p_runtskãæ ¼ç´ããã¦ãã */
+
+ALABEL(dispatch_r)
+	ldmfd	sp!, {r4-r11}			/* éã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®å¾©å¸° */
+#ifdef TOPPERS_SUPPORT_OVRHDR
+	bl		ovrtimer_start
+#endif /* TOPPERS_SUPPORT_OVRHDR */
+	pop		{r12,lr}				/* æ»ãçªå°ãå¾©å¸° */
+	bx		lr
+
+/*
+ *  ãã£ã¹ãããã£ã®åä½éå§
+ */
+	AGLOBAL(start_dispatch)
+ALABEL(start_dispatch)
+	/*
+	 *  ãã®ã«ã¼ãã³ã¯ï¼ã«ã¼ãã«èµ·åæã«ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãã§ï¼NMIã
+	 *  é¤ããã¹ã¦ã®å²è¾¼ã¿ãç¦æ­¢ããç¶æ
+ï¼å
+¨å²è¾¼ã¿ã­ãã¯ç¶æ
+ã¨åç­ï¼ã§
+	 *  å¼ã³åºãããï¼
+	 *
+	 *  dispatcher_0ã¸åå²ããåã«ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãã»CPUã­ãã¯ç¶æ
+ã»
+	 *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ç¶æ
+ã«ãï¼ä½¿ç¨ããã¹ã¿ãã¯ãï¼IDã1ã®ã¿
+	 *  ã¹ã¯ã®ã¹ã¿ãã¯é åã«åãæããªããã°ãªããªãï¼
+	 */
+
+	/*
+	 *	ã¿ã¹ã¯ã³ã³ãã­ã¹ãã«åãæããï¼
+	 */
+	ldr		r2, =excpt_nest_count	/* ä¾å¤ãã¹ãã«ã¦ã³ãã0ã« */
+	mov		r0, #0
+	str		r0, [r2]
+
+	/*
+	 *  IDã1ã®ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã«åãæããï¼
+	 */
+	ldr		r0, =tcb_table			/* tcb_table[0] â r0 */
+	ldr		r2, [r0,#TCB_p_tinib]	/* tcb_table[0].p_tinib â r2 */
+	ldr		r0, [r2,#TINIB_stk]
+	ldr		r1, [r2,#TINIB_stksz]
+	add		sp, r0, r1
+
+	/*
+	 *  CPUã­ãã¯ç¶æ
+ã«ãã¦ï¼ãã£ã¹ãããã£æ¬ä½ã¸åå²ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_CPULOCK)
+	b		dispatcher_0
+
+/*
+ *  ç¾å¨ã®ã³ã³ãã­ã¹ããæ¨ã¦ã¦ãã£ã¹ããã
+ */
+	AGLOBAL(exit_and_dispatch)
+ALABEL(exit_and_dispatch)
+	/*
+	 *  ãã®ã«ã¼ãã³ã¯ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãã»CPUã­ãã¯ç¶æ
+ã»å²è¾¼ã¿åªå
+åº¦
+	 *  ãã¹ã¯å
+¨è§£é¤ç¶æ
+ã»ãã£ã¹ãããè¨±å¯ç¶æ
+ã§å¼ã³åºãããï¼
+	 */
+#ifdef LOG_DSP_ENTER
+	ldr		r0, =p_runtsk			/* p_runtsk â r0 */
+	ldr		r0, [r0]
+#endif /* LOG_DSP_ENTER */
+	/* ãã£ã¹ãããã£æ¬ä½ï¼dispatcherï¼ã¸ */
+
+/*
+ *  ãã£ã¹ãããã£æ¬ä½
+ */
+ALABEL(dispatcher)
+#ifdef LOG_DSP_ENTER
+	/*
+	 * ããã®æç¹ã®ã¬ã¸ã¹ã¿ç¶æ
+ã
+	 *  r0ï¼p_runtskï¼ã¿ã¹ã¯åæãåï¼
+	 */
+	bl		log_dsp_enter
+#endif /* LOG_DSP_ENTER */
+	
+ALABEL(dispatcher_0)
+	/*
+	 *  ãã®ã«ã¼ãã³ã¯ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãã»CPUã­ãã¯ç¶æ
+ã»å²è¾¼ã¿åªå
+åº¦
+	 *  ãã¹ã¯å
+¨è§£é¤ç¶æ
+ã»ãã£ã¹ãããè¨±å¯ç¶æ
+ã§å¼ã³åºãããï¼å®è¡åéçª
+	 *  å°ã¸ããã®ç¶æ
+ã®ã¾ã¾åå²ããï¼
+	 */
+	ldr		r0, =p_schedtsk		/* p_schedtsk â r4 â p_runtsk */
+	ldr		r4, [r0]
+	ldr		r1, =p_runtsk
+	str		r4, [r1]
+	tst		r4, r4				/* p_runtskãNULLãªãdispatcher_1ã¸ */
+	beq		dispatcher_1
+	ldr		sp, [r4,#TCB_sp]	/* ã¿ã¹ã¯ã¹ã¿ãã¯ãå¾©å¸° */
+#ifdef LOG_DSP_LEAVE
+	mov		r0, r4				/* p_runtskããã©ã¡ã¼ã¿ã«æ¸¡ã */
+	bl		log_dsp_leave
+#endif /* LOG_DSP_LEAVE */
+	ldr		r0, [r4,#TCB_pc]	/* å®è¡åéçªå°ãå¾©å¸° */
+	bx		r0					/* p_runtskãr4ã«å
+¥ããç¶æ
+ã§åå²ãã */
+
+	/*
+	 *  ã¢ã¤ãã«å¦ç
+	 *
+	 *  å²è¾¼ã¿ããã¹ã¦è¨±å¯ãï¼CPUã­ãã¯è§£é¤ç¶æ
+ã«ãã¦å²è¾¼ã¿ãå¾
+ã¤ï¼
+	 *
+	 *  ã¿ã¼ã²ããã«ãã£ã¦ã¯ï¼çé»åã¢ã¼ãç­ã«ç§»è¡ããããï¼æ¨æºã®æ¹æ³
+	 *  ã¨ç°ãªãæé ãå¿
+è¦ãªå ´åãããï¼ãã®ãããªã¿ã¼ã²ããã§ã¯ï¼ã¿ã¼
+	 *  ã²ããä¾å­é¨ã§TOPPERS_CUSTOM_IDLEãå®ç¾©ãï¼ã¢ã»ã³ãã©ãã¯ã­ã¨ã
+	 *  ã¦ï¼toppers_asm_custom_idleãç¨æããã°ããï¼
+	 */
+ALABEL(dispatcher_1)
+#ifdef TOPPERS_CUSTOM_IDLE
+	toppers_asm_custom_idle
+#else /* TOPPERS_CUSTOM_IDLE */
+	msr		cpsr_c, #CPSR_SVC_MODE	/* å²è¾¼ã¿ãè¨±å¯ï¼ã¹ã¼ããã¤ã¶ã¢ã¼ãï¼*/
+ALABEL(dispatcher_2)
+	b		dispatcher_2			/* å²è¾¼ã¿å¾
+ã¡ */
+#endif /* TOPPERS_CUSTOM_IDLE */
+
+/*
+ *  ã«ã¼ãã«ã®çµäºå¦çã®å¼åºã
+ *
+ *  å²è¾¼ã¿ã­ãã¯ç¶æ
+ã«ãï¼ä½¿ç¨ããã¹ã¿ãã¯ãéã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ã
+ *  ã¯é åã«åãæ¿ãï¼exit_kernelãå¼ã³åºãï¼
+ */
+	AGLOBAL(call_exit_kernel)
+ALABEL(call_exit_kernel)
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_INTLOCK)
+	ldr		r0, =istkpt				/* éã¿ã¹ã¯ã³ã³ãã­ã¹ãã®ã¹ã¿ãã¯ã¸ */
+	ldr		sp, [r0]
+	b		exit_kernel
+
+/*
+ *  ã¿ã¹ã¯ã®å®è¡éå§æå¦ç
+ */
+	ATEXT
+	AALIGN(2)
+	AGLOBAL(start_r)
+	/*
+	 *  ãã£ã¹ãããã£æ¬ä½ããå¼ã³åºãããããï¼p_runtskã¯r4ã«å
+¥ã£ã¦ããï¼
+	 */
+ALABEL(start_r)
+#ifdef TOPPERS_SUPPORT_OVRHDR
+	bl		ovrtimer_start
+#endif /* TOPPERS_SUPPORT_OVRHDR */
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_UNLOCK)
+									/* CPUã­ãã¯è§£é¤ç¶æ
+ã« */
+	ldr		lr, =ext_tsk			/* ã¿ã¹ã¯æ¬ä½ããã®æ»ãçªå°ãè¨­å® */
+	ldr		r2, [r4,#TCB_p_tinib]	/* p_runtsk->p_tinib â r2 */
+	ldr		r0, [r2,#TINIB_exinf]	/* exinfããã©ã¡ã¼ã¿ã« */
+	ldr		r1, [r2,#TINIB_task]	/* ã¿ã¹ã¯èµ·åçªå°ã«ã¸ã£ã³ã */
+	bx		r1
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©ã®åºå
+¥å£å¦ç
+ */
+#ifndef OMIT_IRQ_HANDLER
+	ATEXT
+	AALIGN(2)
+	AGLOBAL(irq_handler)
+ALABEL(irq_handler)
+	/*
+	 *  ããã«ã¯ï¼IRQã¢ã¼ãã§åå²ãã¦ããï¼
+	 */
+#if __TARGET_ARCH_ARM < 6
+	/*
+	 *  ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãä¿å­ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_IRQ_BIT)
+	stmfd	sp!, {r0-r5,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+
+	/*
+	 *  IRQã¢ã¼ãã«æ»ãã¦ï¼æ»ãçªå°ã¨spsrï¼æ»ãå
+ã®cpsrï¼ãåå¾ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_IRQ_MODE AOR CPSR_IRQ_BIT)
+	sub		r2, lr, #4
+	mrs		r1, spsr
+
+	/*
+	 *  ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼æ»ãçªå°ã¨spsrãä¿å­ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_IRQ_BIT)
+	str		r2, [sp,#0x20]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
+	push	{r1}					/* spsrãã¹ã¿ãã¯ã«ä¿å­ */
+#else /* __TARGET_ARCH_ARM < 6 */
+	/*
+	 *  æ»ãå
+ï¼lrï¼ã¨spsrï¼cpsr_svcï¼ãã¹ã¼ããã¤ã¶ã¢ã¼ãã®ã¹ã¿ãã¯ã«
+	 *  ä¿å­ããï¼
+	 */
+	sub		lr, lr, #4				/* æ»ãçªå°ã®ç®åº */
+	srsfd	#CPSR_SVC_MODE!
+
+	/*
+	 *  ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãä¿å­ããï¼
+	 */
+	cps		#CPSR_SVC_MODE
+	stmfd	sp!, {r0-r5,r12,lr}
+#endif /* __TARGET_ARCH_ARM < 6 */
+
+	/*
+	 *  ã¹ã¿ãã¯ãã¤ã³ã¿ã®èª¿æ´
+	 */
+	and		r1, sp, #4
+	sub		sp, sp, r1
+	push	{r0,r1}					/* r0ã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+
+	/*
+	 *  ä¾å¤ãã¹ãã«ã¦ã³ããã¤ã³ã¯ãªã¡ã³ãããï¼å²è¾¼ã¿ãéã¿ã¹ã¯ã³ã³ãã­
+	 *  ã¹ãã§çºçããå ´åã«ã¯ï¼irq_handler_1ã¸åå²ããï¼
+	 */
+	ldr		r2, =excpt_nest_count
+	ldr		r3, [r2]
+	add		r3, r3, #1
+	str		r3, [r2]
+	teq		r3, #1					/* å²è¾¼ã¿ãéã¿ã¹ã¯ã³ã³ãã­ã¹ãã§çºç */
+	bne		irq_handler_1			/*			  ãªãirq_handler_1ã«åå² */
+
+#ifdef TOPPERS_SUPPORT_OVRHDR
+	/*
+	 *  ãªã¼ãã©ã³ã¿ã¤ããåæ­¢ããï¼
+	 */
+	bl		ovrtimer_stop
+#endif /* TOPPERS_SUPPORT_OVRHDR */
+
+	/*
+	 *  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ã«åãæããï¼
+	 */
+	mov		r3, sp					/* ãã®æç¹ã®ã¹ã¿ãã¯ãã¤ã³ã¿ãr3ã« */
+	ldr		r2, =istkpt				/* éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ã« */
+	ldr		sp, [r2]
+	push	{r0,r3}					/* åæãåã®ã¹ã¿ãã¯ãã¤ã³ã¿ãä¿å­ */
+									/* r0ã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+ALABEL(irq_handler_1)
+	/*
+	 *  å²è¾¼ã¿ã³ã³ãã­ã¼ã©ãæä½ãï¼å²è¾¼ã¿çªå·ãåå¾ããï¼
+	 */
+	bl		irc_begin_int
+#if TNUM_INHNO <= 256 || __TARGET_ARCH_ARM <= 6
+	cmp		r4, #TNUM_INHNO			/* TNUM_INHNOã®å¤ã«ãã£ã¦ã¯ã¨ã©ã¼ã«ãªã */
+#else /* TNUM_INHNO <= 256 || __TARGET_ARCH_ARM <= 6 */
+	movw	r3, #TNUM_INHNO
+	cmp		r4, r3			
+#endif /* TNUM_INHNO <= 256 || __TARGET_ARCH_ARM <= 6 */
+	bhs		irq_handler_2			/* ã¹ããªã¢ã¹å²è¾¼ã¿ãªã */
+									/*  irq_handler_2ã«åå² */
+	/*
+	 *  CPUã­ãã¯è§£é¤ç¶æ
+ã«ããï¼
+	 */
+#if __TARGET_ARCH_ARM < 6
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_UNLOCK)
+#else /* __TARGET_ARCH_ARM < 6 */
+#ifndef TOPPERS_SAFEG_SECURE
+	cpsie	if
+#else /* TOPPERS_SAFEG_SECURE */
+	cpsie	f
+#endif /* TOPPERS_SAFEG_SECURE */
+#endif /* __TARGET_ARCH_ARM < 6 */
+
+#ifdef LOG_INH_ENTER
+	/*
+	 *  ã­ã°åºåã®å¼åºã
+	 */
+	mov		r0, r4					/* å²è¾¼ã¿çªå·ããã©ã¡ã¼ã¿ã«æ¸¡ã */
+	bl		log_inh_enter
+#endif /* LOG_INH_ENTER */
+
+	/*
+	 *  å²è¾¼ã¿ãã³ãã©ã®å¼åºã
+	 */
+	ldr		r2, =inh_table			/* å²è¾¼ã¿ãã³ãã©ãã¼ãã«ã®èª­è¾¼ã¿ */
+	ldr		r1, [r2,r4,lsl #2]		/* å²è¾¼ã¿ãã³ãã©ã®çªå° â r1 */
+	mov		lr, pc					/* å²è¾¼ã¿ãã³ãã©ã®å¼åºã */
+	bx		r1
+
+#ifdef LOG_INH_LEAVE
+	/*
+	 *  ã­ã°åºåã®å¼åºã
+	 */
+	mov		r0, r4					/* å²è¾¼ã¿çªå·ããã©ã¡ã¼ã¿ã«æ¸¡ã */
+	bl		log_inh_leave
+#endif /* LOG_INH_LEAVE */
+
+	/*
+	 *  ã«ã¼ãã«ç®¡çã®å²è¾¼ã¿ãç¦æ­¢ããï¼
+	 */
+#if __TARGET_ARCH_ARM < 6
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_CPULOCK)
+#else /* __TARGET_ARCH_ARM < 6 */
+#ifndef TOPPERS_SAFEG_SECURE
+	cpsid	i
+#else /* TOPPERS_SAFEG_SECURE */
+	cpsid	if
+#endif /* TOPPERS_SAFEG_SECURE */
+#endif /* __TARGET_ARCH_ARM < 6 */
+
+	/*
+	 *  å²è¾¼ã¿ã³ã³ãã­ã¼ã©ãæä½ããï¼
+	 */
+ALABEL(irq_handler_2)
+	bl		irc_end_int
+
+	/*
+	 *  ä¾å¤ãã¹ãã«ã¦ã³ãããã¯ãªã¡ã³ãããï¼
+	 */
+	ldr		r2, =excpt_nest_count
+	ldr		r3, [r2]
+	subs	r3, r3, #1
+	str		r3, [r2]				/* æ»ãå
+ãéã¿ã¹ã¯ã³ã³ãã­ã¹ããªã */
+	bne		irq_handler_5			/*				irq_handler_5ã«åå² */
+
+	/*
+	 *  ã¿ã¹ã¯ç¨ã®ã¹ã¿ãã¯ã«æ»ãï¼
+	 */
+	pop		{r0,r3}
+	mov   	sp, r3
+
+	/*
+	 *  p_runtskãNULLãå¤å®ããï¼
+	 */
+	ldr		r0, =p_runtsk			/* p_runtsk â r0 */
+	ldr		r0, [r0]
+	tst		r0, r0					/* p_runtskãNULLã§ãªããã° */
+	bne		irq_handler_3			/*		irq_handler_3ã«åå² */
+
+	/*
+	 *  ã¿ã¹ã¯ã®ã¹ã¿ãã¯ã«ä¿å­ããã¹ã¯ã©ããã¬ã¸ã¹ã¿ç­ãæ¨ã¦ãï¼
+	 */
+	pop		{r0,r1}					/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®èª¿æ´ãå
+ã«æ»ã */
+	add		sp, sp, r1
+	add		sp, sp, #40				/* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãæ¨ã¦ã */
+	b		dispatcher_0
+
+	/*
+	 *  ãã£ã¹ããããå¿
+è¦ãå¤å®ããï¼
+	 */
+ALABEL(irq_handler_3)
+	ldr		r1, =p_schedtsk			/* p_schedtsk â r1 */
+	ldr		r1, [r1]
+	teq		r0, r1					/* p_runtskã¨p_schedtskãåããªã */
+	beq		irq_handler_4			/*				  irq_handler_4ã¸ */
+
+	/*
+	 *  ã³ã³ãã­ã¹ããä¿å­ããï¼
+	 */
+	stmfd	sp!, {r6-r11}			/* éã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®ä¿å­ */
+	str		sp, [r0,#TCB_sp]		/* ã¹ã¿ãã¯ãã¤ã³ã¿ãä¿å­ */
+	adr		r1, ret_int_r			/* å®è¡åéçªå°ãä¿å­ */
+	str		r1, [r0,#TCB_pc]
+	b		dispatcher				/* r0ã«ã¯p_runtskãæ ¼ç´ããã¦ãã */
+
+ALABEL(ret_int_r)
+	/*
+	 *  ã³ã³ãã­ã¹ããå¾©å¸°ããï¼
+	 */
+	ldmfd	sp!, {r6-r11}			/* éã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®å¾©å¸° */
+
+ALABEL(irq_handler_4)
+#ifdef TOPPERS_SUPPORT_OVRHDR
+	/*
+	 *  ãªã¼ãã©ã³ã¿ã¤ããåä½éå§ããï¼
+	 */
+	bl		ovrtimer_start
+#endif /* TOPPERS_SUPPORT_OVRHDR */
+
+	/*
+	 *  å²è¾¼ã¿ï¼CPUä¾å¤å¦çããã®ãªã¿ã¼ã³
+	 *
+	 *  å²è¾¼ã¿ï¼CPUä¾å¤å¦çããã®ãªã¿ã¼ã³ã«ããï¼CPUã­ãã¯è§£é¤ç¶æ
+ã«é·
+	 *  ç§»ããããã«ããå¿
+è¦ããããï¼ARMã¯CPSRã®ãããã«ãã£ã¦CPUã­ã
+	 *  ã¯ç¶æ
+ãè¡¨ãã¦ããããï¼CPSRãå
+ã«æ»ãã¦ãªã¿ã¼ã³ããã°ããï¼
+	 */
+ALABEL(irq_handler_5)
+	pop		{r0,r1}					/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®èª¿æ´ãå
+ã«æ»ã */
+	add		sp, sp, r1
+
+#if __TARGET_ARCH_ARM < 6
+	ldmfd	sp!, {r0}				/* æ»ãå
+ã®cpsrãspsrã«è¨­å® */
+	msr		spsr_cxsf, r0
+	ldmfd	sp!, {r0-r5,r12,lr,pc}^	/* ã³ã³ãã­ã¹ãã®å¾©å¸° */
+									/* ^ä»ããªã®ã§ï¼spsr â cpsr */
+#else /* __TARGET_ARCH_ARM < 6 */
+	ldmfd	sp!, {r0-r5,r12,lr}
+	rfefd	sp!
+#endif /* __TARGET_ARCH_ARM < 6 */
+#endif /* OMIT_IRQ_HANDLER */
+
+/*
+ *  CPUä¾å¤ãã³ãã©åºå
+¥å£å¦ç
+ */
+ALABEL(start_exc_entry)
+
+/*
+ *  æªå®ç¾©å½ä»¤
+ */
+#ifndef OMIT_UNDEF_HANDLER
+	ATEXT
+	AALIGN(2)
+	AGLOBAL(undef_handler)
+ALABEL(undef_handler)
+	/*
+	 *  ããã«ã¯ï¼æªå®ç¾©ã¢ã¼ãã§åå²ãã¦ããï¼
+	 */
+#if __TARGET_ARCH_ARM < 6
+	/*
+	 *  Iãããã¨Fããããã»ãããï¼ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼ã¹ã¯
+	 *  ã©ããã¬ã¸ã¹ã¿ãä¿å­ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
+	stmfd	sp!, {r0-r5,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+
+	/*
+	 *  æªå®ç¾©ã¢ã¼ãã«æ»ãã¦ï¼æ»ãçªå°ã¨spsrãåå¾ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_UND_MODE AOR CPSR_FIQ_IRQ_BIT)
+	mov		r2, lr
+	mrs		r1, spsr
+
+	/*
+	 *  ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼æ»ãçªå°ã¨spsrãä¿å­ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
+	str		r2, [sp,#0x20]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
+	push	{r1}					/* spsrãã¹ã¿ãã¯ã«ä¿å­ */
+#else /* __TARGET_ARCH_ARM < 6 */
+	/*
+	 *  æ»ãå
+ï¼lrï¼ã¨spsrï¼cpsr_svcï¼ãã¹ã¼ããã¤ã¶ã¢ã¼ãã®ã¹ã¿ãã¯ã«
+	 *  ä¿å­ããï¼
+	 */
+	srsfd	#CPSR_SVC_MODE!
+
+	/*
+	 *  ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãä¿å­ããï¼
+	 */
+	cps		#CPSR_SVC_MODE
+	stmfd	sp!, {r0-r5,r12,lr}
+#endif /* __TARGET_ARCH_ARM < 6 */
+	mov		r4, #EXCNO_UNDEF
+	b		exc_handler_1
+#endif /* OMIT_UNDEF_HANDLER */
+
+/*
+ *  ã¹ã¼ããã¤ã¶ã³ã¼ã«
+ */
+#ifndef OMIT_SVC_HANDLER
+	ATEXT
+	AALIGN(2)
+	AGLOBAL(svc_handler)
+ALABEL(svc_handler)
+	/*
+	 *  ããã«ã¯ï¼ã¹ã¼ããã¤ã¶ã¢ã¼ãã§åå²ãã¦ããï¼
+	 */
+#if __TARGET_ARCH_ARM < 6
+	/*
+	 *  Iãããã¨Fããããã»ãããï¼ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãä¿å­ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
+	stmfd	sp!, {r0-r5,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+
+	/*
+	 *  æ»ãçªå°ã¨spsrãåå¾ããï¼
+	 */
+	mov		r2, lr
+	mrs		r1, spsr
+
+	/*
+	 *  æ»ãçªå°ã¨spsrãä¿å­ããï¼
+	 */
+	str		r2, [sp,#0x20]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
+	push	{r1}					/* spsrãã¹ã¿ãã¯ã«ä¿å­ */
+#else /* __TARGET_ARCH_ARM < 6 */
+	/*
+	 *  æ»ãå
+ï¼lrï¼ã¨spsrï¼cpsr_svcï¼ãã¹ã¼ããã¤ã¶ã¢ã¼ãã®ã¹ã¿ãã¯ã«
+	 *  ä¿å­ããï¼
+	 */
+	srsfd	#CPSR_SVC_MODE!
+
+	/*
+	 *  ã¹ã¼ããã¤ã¶ã¢ã¼ãã§ï¼ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãä¿å­ããï¼
+	 */
+	cps		#CPSR_SVC_MODE			/* ä¸è¦ã¨æããã */
+	stmfd	sp!, {r0-r5,r12,lr}
+#endif /* __TARGET_ARCH_ARM < 6 */
+	mov		r4, #EXCNO_SVC
+	b		exc_handler_1
+#endif /* OMIT_SVC_HANDLER */
+
+/*
+ *  ããªãã§ããã¢ãã¼ã
+ */
+#ifndef OMIT_PABORT_HANDLER
+	ATEXT
+	AALIGN(2)
+	AGLOBAL(pabort_handler)
+ALABEL(pabort_handler)
+	/*
+	 *  ããã«ã¯ï¼ã¢ãã¼ãã¢ã¼ãã§åå²ãã¦ããï¼
+	 */
+#if __TARGET_ARCH_ARM < 6
+	/*
+	 *  Iãããã¨Fããããã»ãããï¼ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼ã¹ã¯
+	 *  ã©ããã¬ã¸ã¹ã¿ãä¿å­ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
+	stmfd	sp!, {r0-r5,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+
+	/*
+	 *  ã¢ãã¼ãã¢ã¼ãã«æ»ãã¦ï¼æ»ãçªå°ã¨spsrãåå¾ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_ABT_MODE AOR CPSR_FIQ_IRQ_BIT)
+	mov		r2, lr
+	mrs		r1, spsr
+
+	/*
+	 *  ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼æ»ãçªå°ã¨spsrãä¿å­ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
+	str		r2, [sp,#0x20]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
+	push	{r1}					/* spsrãã¹ã¿ãã¯ã«ä¿å­ */
+#else /* __TARGET_ARCH_ARM < 6 */
+	/*
+	 *  æ»ãå
+ï¼lrï¼ã¨spsrï¼cpsr_svcï¼ãã¹ã¼ããã¤ã¶ã¢ã¼ãã®ã¹ã¿ãã¯ã«
+	 *  ä¿å­ããï¼
+	 */
+	srsfd	#CPSR_SVC_MODE!
+
+	/*
+	 *  ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãä¿å­ããï¼
+	 */
+	cps		#CPSR_SVC_MODE
+	stmfd	sp!, {r0-r5,r12,lr}
+#endif /* __TARGET_ARCH_ARM < 6 */
+	mov		r4, #EXCNO_PABORT
+	b		exc_handler_1
+#endif /* OMIT_PABORT_HANDLER */
+
+/*
+ *  ãã¼ã¿ã¢ãã¼ã
+ */
+#ifndef OMIT_DABORT_HANDLER
+	ATEXT
+	AALIGN(2)
+	AGLOBAL(dabort_handler)
+ALABEL(dabort_handler)
+	/*
+	 *  ããã«ã¯ï¼ã¢ãã¼ãã¢ã¼ãã§åå²ãã¦ããï¼
+	 *
+	 *  ãã¼ã¿ã¢ãã¼ããï¼CPUä¾å¤ã®å
+¥å£ï¼start_exc_entryã¨end_exc_entry
+	 *  ã®éï¼ã§çºçããå ´åã«ã¯ï¼fatal_dabort_handlerã«åå²ããï¼ã¢ãã¼
+	 *  ãã¢ã¼ãã®spãæ±ç¨ã¬ã¸ã¹ã¿ã®ä»£ããã«ä½¿ç¨ããï¼
+	 */
+	ldr		sp, =start_exc_entry+8
+	cmp		lr, sp
+	bcc		dabort_handler_1
+	ldr		sp, =end_exc_entry+8
+	cmp		lr, sp
+	bcc		fatal_dabort_handler
+
+ALABEL(dabort_handler_1)
+#if __TARGET_ARCH_ARM < 6
+	/*
+	 *  Iãããã¨Fããããã»ãããï¼ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼ã¹ã¯
+	 *  ã©ããã¬ã¸ã¹ã¿ãä¿å­ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
+	stmfd	sp!, {r0-r5,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+
+	/*
+	 *  ã¢ãã¼ãã¢ã¼ãã«æ»ãã¦ï¼æ»ãçªå°ã¨spsrãåå¾ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_ABT_MODE AOR CPSR_FIQ_IRQ_BIT)
+	mov		r2, lr
+	mrs		r1, spsr
+
+	/*
+	 *  ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼æ»ãçªå°ã¨spsrãä¿å­ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
+	str		r2, [sp,#0x20]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
+	push	{r1}					/* spsrãã¹ã¿ãã¯ã«ä¿å­ */
+#else /* __TARGET_ARCH_ARM < 6 */
+	/*
+	 *  æ»ãå
+ï¼lrï¼ã¨spsrï¼cpsr_svcï¼ãã¹ã¼ããã¤ã¶ã¢ã¼ãã®ã¹ã¿ãã¯ã«
+	 *  ä¿å­ããï¼
+	 */
+	srsfd	#CPSR_SVC_MODE!
+
+	/*
+	 *  ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãä¿å­ããï¼
+	 */
+	cps		#CPSR_SVC_MODE
+	stmfd	sp!, {r0-r5,r12,lr}
+#endif /* __TARGET_ARCH_ARM < 6 */
+	mov		r4, #EXCNO_DABORT
+	b		exc_handler_1
+#endif /* OMIT_DABORT_HANDLER */
+
+/*
+ *  CPUä¾å¤ã®å
+¥å£ã§çºçãããã¼ã¿ã¢ãã¼ã
+ */
+ALABEL(fatal_dabort_handler)
+#if __TARGET_ARCH_ARM < 6
+	/*
+	 *  Iãããã¨Fããããã»ãããï¼ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼ã¹ã¿ã
+	 *  ã¯ãã¤ã³ã¿ãåæåãï¼ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãä¿å­ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
+	ldr		sp, =istkpt
+	ldr		sp, [sp]
+	stmfd	sp!, {r0-r5,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+
+	/*
+	 *  ã¢ãã¼ãã¢ã¼ãã«æ»ãã¦ï¼æ»ãçªå°ã¨spsrãåå¾ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_ABT_MODE AOR CPSR_FIQ_IRQ_BIT)
+	mov		r2, lr
+	mrs		r1, spsr
+
+	/*
+	 *  ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼æ»ãçªå°ã¨spsrãä¿å­ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
+	str		r2, [sp,#0x20]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
+	push	{r1}					/* spsrãã¹ã¿ãã¯ã«ä¿å­ */
+#else /* __TARGET_ARCH_ARM < 6 */
+	/*
+	 *  Iãããã¨Fããããã»ãããï¼ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼ã¹ã¿ã
+	 *  ã¯ãã¤ã³ã¿ãåæåããï¼
+	 */
+	cpsid	if, #CPSR_SVC_MODE
+	ldr		sp, =istkpt
+	ldr		sp, [sp]
+
+	/*
+	 *  ã¢ãã¼ãã¢ã¼ãã«æ»ãã¦ï¼æ»ãå
+ï¼lrï¼ã¨spsrï¼cpsr_svcï¼ãã¹ã¼ã
+	 *  ãã¤ã¶ã¢ã¼ãã®ã¹ã¿ãã¯ã«ä¿å­ããï¼
+	 */
+	cps		#CPSR_ABT_MODE
+	srsfd	#CPSR_SVC_MODE!
+
+	/*
+	 *  ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãä¿å­ããï¼
+	 */
+	cps		#CPSR_SVC_MODE
+	stmfd	sp!, {r0-r5,r12,lr}
+#endif /* __TARGET_ARCH_ARM < 6 */
+
+	/*
+	 *  ä¾å¤ãã¹ãã«ã¦ã³ãã®æä¸ä½ãããã1ã«ããï¼
+	 */
+	ldr		r2, =excpt_nest_count
+	ldr		r3, [r2]
+	orr		r3, r3, #0x80000000
+	str		r3, [r2]
+
+	mov		r4, #EXCNO_DABORT
+	b		exc_handler_1
+
+/*
+ *  FIQ
+ */
+#ifndef OMIT_FIQ_HANDLER
+	ATEXT
+	AALIGN(2)
+	AGLOBAL(fiq_handler)
+ALABEL(fiq_handler)
+	/*
+	 *  ããã«ã¯ï¼FIQã¢ã¼ãã§åå²ãã¦ããï¼
+	 */
+#if __TARGET_ARCH_ARM < 6
+	/*
+	 *  Iãããã¨Fããããã»ãããï¼ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼ã¹ã¯
+	 *  ã©ããã¬ã¸ã¹ã¿ãä¿å­ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
+	stmfd	sp!, {r0-r5,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+
+	/*
+	 *  FIQã¢ã¼ãã«æ»ãã¦ï¼æ»ãçªå°ã¨spsrãåå¾ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_FIQ_MODE AOR CPSR_FIQ_IRQ_BIT)
+	mov		r2, lr
+	mrs		r1, spsr
+
+	/*
+	 *  ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼æ»ãçªå°ã¨spsrãä¿å­ããï¼
+	 */
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
+	str		r2, [sp,#0x20]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
+	push	{r1}					/* spsrãã¹ã¿ãã¯ã«ä¿å­ */
+#else /* __TARGET_ARCH_ARM < 6 */
+	/*
+	 *  æ»ãå
+ï¼lrï¼ã¨spsrï¼cpsr_svcï¼ãã¹ã¼ããã¤ã¶ã¢ã¼ãã®ã¹ã¿ãã¯ã«
+	 *  ä¿å­ããï¼
+	 */
+	srsfd	#CPSR_SVC_MODE!
+
+	/*
+	 *  ã¹ã¼ããã¤ã¶ã¢ã¼ãã«åãæãï¼ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãä¿å­ããï¼
+	 */
+	cps		#CPSR_SVC_MODE
+	stmfd	sp!, {r0-r5,r12,lr}
+#endif /* __TARGET_ARCH_ARM < 6 */
+	mov		r4, #EXCNO_FIQ
+	b		exc_handler_1
+#endif /* OMIT_FIQ_HANDLER */
+	
+ALABEL(end_exc_entry)
+
+/*
+ *  CPUä¾å¤ãã³ãã©åºå
+¥å£å¦çã®å
+±éé¨å
+ *
+ * ããã®æç¹ã®ã¬ã¸ã¹ã¿ç¶æ
+ã
+ *  r4ï¼CPUä¾å¤ãã³ãã©çªå·
+ */
+ALABEL(exc_handler_1)
+	/*
+	 *  CPUä¾å¤ãçºçããç¶æ³ã®å¤æ­ã«ç¨ããããã«ï¼CPUä¾å¤çºçåã®å²
+	 *  è¾¼ã¿åªå
+åº¦ãã¹ã¯ã¨ä¾å¤ãã¹ãã«ã¦ã³ããã¹ã¿ãã¯ã«ä¿å­ããï¼
+	 */
+	bl		irc_get_intpri
+	push	{r0}					/* å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãä¿å­ */
+	ldr		r2, =excpt_nest_count
+	ldr		r3, [r2]
+	push	{r3}					/* ä¾å¤ãã¹ãã«ã¦ã³ããä¿å­ */
+	mov		r5, sp					/* CPUä¾å¤ã®æ
+å ±ãè¨æ¶ãã¦ããé åã® */
+									/*				  å
+é ­çªå°ãr5ã«ä¿å­ */
+	/*
+	 *  ã¹ã¿ãã¯ãã¤ã³ã¿ã®èª¿æ´
+	 */
+	and		r1, sp, #4
+	sub		sp, sp, r1
+	push	{r0,r1}					/* r0ã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+
+	/*
+	 *  ã«ã¼ãã«ç®¡çå¤ã®CPUä¾å¤ãå¤å®ãã
+	 *
+	 *  ã«ã¼ãã«ç®¡çå¤ã®CPUä¾å¤ã¯ï¼ã«ã¼ãã«å®è¡ä¸­ï¼å
+¨å²è¾¼ã¿ã­ãã¯ç¶æ
+ï¼
+	 *  CPUã­ãã¯ç¶æ
+ï¼ã«ã¼ãã«ç®¡çå¤ã®å²è¾¼ã¿ãã³ãã©å®è¡ä¸­ã«çºçãã
+	 *  CPUä¾å¤ã§ããï¼ARMã³ã¢ã®å ´åã¯ï¼æ»ãå
+ã®CPSRã®IããããFããã
+	 *  ã®ãããããã»ããããã¦ãããªãï¼ããè©²å½ããï¼
+	 */
+	ldr		r1, [r5,#T_EXCINF_cpsr]		/* ä¾å¤ãã¬ã¼ã ããcpsrãåå¾ */
+	ands	r1, r1, #CPSR_FIQ_IRQ_BIT
+	bne		nk_exc_handler_1		/* ã«ã¼ãã«ç®¡çå¤ã®CPUä¾å¤ã®å¦çã¸ */
+
+	/*
+	 * ããã®æç¹ã®ã¬ã¸ã¹ã¿ç¶æ
+ã
+	 *  r2ï¼excpt_nest_countã®çªå°
+	 *  r3ï¼excpt_nest_countã®å¤
+	 *  r4ï¼CPUä¾å¤ãã³ãã©çªå·
+	 *  r5ï¼CPUä¾å¤ã®æ
+å ±ãè¨æ¶ãã¦ããé åã®å
+é ­çªå°
+	 */
+
+	/*
+	 *  ä¾å¤ãã¹ãã«ã¦ã³ããã¤ã³ã¯ãªã¡ã³ãããï¼
+	 */
+	add		r3, r3, #1
+	str		r3, [r2]
+	teq		r3, #1					/* CPUä¾å¤çºçåãéã¿ã¹ã¯ã³ã³ãã­ã¹ã */
+	bne		exc_handler_2			/*			   ãªãexc_handler_2ã«åå² */
+
+#ifdef TOPPERS_SUPPORT_OVRHDR
+	/*
+	 *  ãªã¼ãã©ã³ã¿ã¤ããåæ­¢ããï¼
+	 */
+	bl		ovrtimer_stop
+#endif /* TOPPERS_SUPPORT_OVRHDR */
+
+	/*
+	 *  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ã«åãæããï¼
+	 */
+	mov		r3, sp					/* ãã®æç¹ã®ã¹ã¿ãã¯ãã¤ã³ã¿ãr3ã« */
+	ldr		r2, =istkpt				/* éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ã« */
+	ldr		sp, [r2]
+	push	{r0,r3}					/* åæãåã®ã¹ã¿ãã¯ãã¤ã³ã¿ãä¿å­ */
+									/* r0ã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+ALABEL(exc_handler_2)
+	/*
+	 * ããã®æç¹ã®ã¬ã¸ã¹ã¿ç¶æ
+ã
+	 *  r4ï¼CPUä¾å¤ãã³ãã©çªå·
+	 *  r5ï¼CPUä¾å¤ã®æ
+å ±ãè¨æ¶ãã¦ããé åã®å
+é ­çªå°
+	 */
+
+	/*
+	 *  ï¼å¿
+è¦ãªãï¼å²è¾¼ã¿ã³ã³ãã­ã¼ã©ãæä½ããï¼
+	 */
+	bl		irc_begin_exc
+
+	/*
+	 *  CPUã­ãã¯è§£é¤ç¶æ
+ã«ããï¼
+	 *
+	 *  ã«ã¼ãã«ç®¡çå¤ã®CPUä¾å¤ãã³ãã©ã¯å¥ã«ã¼ãã³ã§å¼ã³åºãããï¼åç´
+	 *  ã«å²è¾¼ã¿ãè¨±å¯ããã ãã§ããï¼
+	 */
+#if __TARGET_ARCH_ARM < 6
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_UNLOCK)
+#else /* __TARGET_ARCH_ARM < 6 */
+#ifndef TOPPERS_SAFEG_SECURE
+	cpsie	if
+#else /* TOPPERS_SAFEG_SECURE */
+	cpsie	f
+#endif /* TOPPERS_SAFEG_SECURE */
+#endif /* __TARGET_ARCH_ARM < 6 */
+
+	/*
+	 *  ã­ã°åºåã®å¼åºã
+	 */
+#ifdef LOG_EXC_ENTER
+	mov		r0, r4					/* CPUä¾å¤çªå·ããã©ã¡ã¼ã¿ã«æ¸¡ã */
+	bl		log_exc_enter
+#endif /* LOG_EXC_ENTER */
+
+	/*
+	 *  CPUä¾å¤ãã³ãã©ã®å¼åºã
+	 */
+	ldr		r2, =exc_table			/* CPUä¾å¤ãã³ãã©ãã¼ãã«ã®èª­è¾¼ã¿ */
+	ldr		r3, [r2,r4,lsl #2]		/* CPUä¾å¤ãã³ãã©ã®çªå° â r3 */
+	mov		r0, r5					/* CPUä¾å¤ã®æ
+å ±ãè¨æ¶ãã¦ããé åã® */
+									/*		å
+é ­çªå°ãç¬¬1ãã©ã¡ã¼ã¿ã«æ¸¡ã */
+	mov		r1, r4					/* CPUä¾å¤çªå·ãç¬¬2ãã©ã¡ã¼ã¿ã«æ¸¡ã */
+	mov		lr, pc					/* CPUä¾å¤ãã³ãã©ã®å¼åºã */
+	bx		r3
+
+	/*
+	 *  ã­ã°åºåã®å¼åºã
+	 */
+#ifdef LOG_EXC_LEAVE
+	mov		r0, r4					/* CPUä¾å¤çªå·ããã©ã¡ã¼ã¿ã«æ¸¡ã */
+	bl		log_exc_leave
+#endif /* LOG_EXC_LEAVE */
+
+	/*
+	 *  ã«ã¼ãã«ç®¡çã®å²è¾¼ã¿ãç¦æ­¢ããï¼
+	 */
+#if __TARGET_ARCH_ARM < 6
+	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_CPULOCK)
+#else /* __TARGET_ARCH_ARM < 6 */
+#ifndef TOPPERS_SAFEG_SECURE
+	cpsid	i
+#else /* TOPPERS_SAFEG_SECURE */
+	cpsid	if
+#endif /* TOPPERS_SAFEG_SECURE */
+#endif /* __TARGET_ARCH_ARM < 6 */
+
+	/*
+	 *  å²è¾¼ã¿ã³ã³ãã­ã¼ã©ãæä½ãã¦ï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãï¼CPUä¾å¤çº
+	 *  çæã®å¤ã«è¨­å®ããï¼
+	 */
+	bl		irc_end_exc
+
+	/*
+	 *  ä¾å¤ãã¹ãã«ã¦ã³ãããã¯ãªã¡ã³ãããï¼
+	 */
+	ldr		r2, =excpt_nest_count
+	ldr		r3, [r2]
+	subs	r3, r3, #1
+	str		r3, [r2]				/* æ»ãå
+ãéã¿ã¹ã¯ã³ã³ãã­ã¹ããªã */
+	bne		exc_handler_5			/*				exc_handler_5ã«åå² */
+
+	/*
+	 *  ã¿ã¹ã¯ç¨ã®ã¹ã¿ãã¯ã«æ»ãï¼
+	 */
+	pop		{r0,r3}
+	mov		sp, r3
+
+	/*
+	 *  p_runtskãNULLãå¤å®ããï¼
+	 */
+	ldr		r0, =p_runtsk			/* p_runtsk â r0 */
+	ldr		r0, [r0]
+	tst		r0, r0					/* p_runtskãNULLã§ãªããã° */
+	bne		exc_handler_3			/*		exc_handler_3ã«åå² */
+
+	/*
+	 *  ã¿ã¹ã¯ã®ã¹ã¿ãã¯ã«ä¿å­ããã¹ã¯ã©ããã¬ã¸ã¹ã¿ç­ãæ¨ã¦ãï¼
+	 */
+	pop		{r0,r1}					/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®èª¿æ´ãå
+ã«æ»ã */
+	add		sp, sp, r1
+	add		sp, sp, #48				/* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã¨CPUä¾å¤ãçºçãã */
+	b		dispatcher_0			/*	ç¶æ³ãå¤æ­ããããã®è¿½å æ
+å ±ãæ¨ã¦ã */
+
+	/*
+	 *  ãã£ã¹ããããå¿
+è¦ãå¤å®ããï¼
+	 */
+ALABEL(exc_handler_3)
+	ldr		r1, =p_schedtsk			/* p_schedtsk â r1 */
+	ldr		r1, [r1]
+	teq		r0, r1					/* p_runtskã¨p_schedtskãåããªã */
+	beq		exc_handler_4			/*				  exc_handler_4ã¸ */
+
+	/*
+	 *  ã³ã³ãã­ã¹ããä¿å­ããï¼
+	 */
+	stmfd	sp!, {r6-r11}			/* éã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®ä¿å­ */
+	str		sp, [r0,#TCB_sp]		/* ã¹ã¿ãã¯ãã¤ã³ã¿ãä¿å­ */
+	adr		r1, ret_exc_r			/* å®è¡åéçªå°ãä¿å­ */
+	str		r1, [r0,#TCB_pc]
+	b		dispatcher				/* r0ã«ã¯p_runtskãæ ¼ç´ããã¦ãã */
+
+ALABEL(ret_exc_r)
+	/*
+	 *  ã³ã³ãã­ã¹ããå¾©å¸°ããï¼
+	 */
+	ldmfd	sp!, {r6-r11}			/* éã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®å¾©å¸° */
+
+ALABEL(exc_handler_4)
+#ifdef TOPPERS_SUPPORT_OVRHDR
+	/*
+	 *  ãªã¼ãã©ã³ã¿ã¤ããåä½éå§ããï¼
+	 */
+	bl		ovrtimer_start
+#endif /* TOPPERS_SUPPORT_OVRHDR */
+
+	/*
+	 *  CPUä¾å¤å¦çããã®ãªã¿ã¼ã³
+	 *
+	 *  CPUä¾å¤å¦çããã®ãªã¿ã¼ã³ã«ããï¼CPUã­ãã¯è§£é¤ç¶æ
+ã«é·ç§»ããã
+	 *  ãã«ããå¿
+è¦ããããï¼ARMã¯CPSRã®ãããã«ãã£ã¦CPUã­ãã¯ç¶æ
+ã
+	 *  è¡¨ãã¦ããããï¼CPSRãå
+ã«æ»ãã¦ãªã¿ã¼ã³ããã°ããï¼
+	 */
+ALABEL(exc_handler_5)
+	pop		{r0,r1}					/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®èª¿æ´ãå
+ã«æ»ã */
+	add		sp, sp, r1
+	add		sp, sp, #8				/* ã¹ã¿ãã¯ä¸ã®æ
+å ±ãæ¨ã¦ã */
+
+#if __TARGET_ARCH_ARM < 6
+	ldmfd	sp!, {r0}				/* æ»ãå
+ã®cpsrãspsrã«è¨­å® */
+	msr		spsr_cxsf, r0
+	ldmfd	sp!, {r0-r5,r12,lr,pc}^	/* ã³ã³ãã­ã¹ãã®å¾©å¸° */
+									/* ^ä»ããªã®ã§ï¼spsr â cpsr */
+#else /* __TARGET_ARCH_ARM < 6 */
+	ldmfd	sp!, {r0-r5,r12,lr}
+	rfefd	sp!
+#endif /* __TARGET_ARCH_ARM < 6 */
+
+/*
+ *  ã«ã¼ãã«ç®¡çå¤ã®CPUä¾å¤ã®åºå
+¥å£å¦ç
+ */
+ALABEL(nk_exc_handler_1)
+	/*
+	 * ããã®æç¹ã®ã¬ã¸ã¹ã¿ç¶æ
+ã
+	 *  r1ï¼CPUä¾å¤çºçåã®CPSRã®Fãããã¨Iãããã®å¤
+	 *  r2ï¼excpt_nest_countã®çªå°
+	 *  r3ï¼excpt_nest_countã®å¤
+	 *  r4ï¼CPUä¾å¤ãã³ãã©çªå·
+	 *  r5ï¼CPUä¾å¤ã®æ
+å ±ãè¨æ¶ãã¦ããé åã®å
+é ­çªå°
+	 */
+
+	/*
+	 *  ä¾å¤ãã¹ãã«ã¦ã³ããã¤ã³ã¯ãªã¡ã³ãããï¼
+	 */
+	add		r3, r3, #1
+	str		r3, [r2]
+	teq		r3, #1					/* CPUä¾å¤çºçåãéã¿ã¹ã¯ã³ã³ãã­ã¹ã */
+	bne		nk_exc_handler_2		/*		 	ãªãnk_exc_handler_2ã«åå² */
+
+	/*
+	 *  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ã«åãæããï¼
+	 */
+	mov		r3, sp					/* ãã®æç¹ã®ã¹ã¿ãã¯ãã¤ã³ã¿ãr3ã« */
+	ldr		r2, =istkpt				/* éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ã« */
+	ldr		sp, [r2]
+	push	{r0,r3}					/* åæãåã®ã¹ã¿ãã¯ãã¤ã³ã¿ãä¿å­ */
+									/* r0ã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+ALABEL(nk_exc_handler_2)
+	/*
+	 *  ã·ã¹ãã ç¶æ
+ï¼ã³ã³ãã­ã¹ãã¯é¤ãï¼ãï¼CPUä¾å¤çºçæã®ç¶æ
+ã¸
+	 */
+	orr		r1, r1, #CPSR_SVC_MODE
+	msr		cpsr_c, r1
+
+	/*
+	 *  CPUä¾å¤ãã³ãã©ã®å¼åºã
+	 */
+	ldr		r2, =exc_table			/* CPUä¾å¤ãã³ãã©ãã¼ãã«ã®èª­è¾¼ã¿ */
+	ldr		r3, [r2,r4,lsl #2]		/* CPUä¾å¤ãã³ãã©ã®çªå° â r3 */
+	mov		r0, r5					/* CPUä¾å¤ã®æ
+å ±ãè¨æ¶ãã¦ããé åã® */
+									/*		å
+é ­çªå°ãç¬¬1ãã©ã¡ã¼ã¿ã«æ¸¡ã */
+	mov		r1, r4					/* CPUä¾å¤çªå·ãç¬¬2ãã©ã¡ã¼ã¿ã«æ¸¡ã */
+	mov		lr, pc					/* CPUä¾å¤ãã³ãã©ã®å¼åºã */
+	bx		r3
+
+	/*
+	 *  ä¾å¤ãã¹ãã«ã¦ã³ãããã¯ãªã¡ã³ãããï¼
+	 */
+	ldr		r2, =excpt_nest_count
+	ldr		r3, [r2]
+	subs	r3, r3, #1
+	str		r3, [r2]				/* æ»ãå
+ãéã¿ã¹ã¯ã³ã³ãã­ã¹ããªã */
+	bne		exc_handler_5			/*				exc_handler_5ã«åå² */
+
+	/*
+	 *  ã¿ã¹ã¯ç¨ã®ã¹ã¿ãã¯ã«æ»ãï¼
+	 */
+	pop		{r0,r3}
+	mov		sp, r3
+	b		exc_handler_5
+
+/*
+ *  ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿ã®æä½é¢æ°
+ *
+ *  Thumbã¢ã¼ãã§ã¯mrs/msrå½ä»¤ãä½¿ç¨ã§ããªãããï¼é¢æ°ã¨ãã¦å®ç¾ãã¦ï¼
+ *  ARMã¢ã¼ãã«ç§»è¡ãã¦å®è¡ããï¼
+ */
+#ifdef __thumb__
+
+	ATEXT
+	AALIGN(2)
+	AWEAK(current_cpsr)
+ALABEL(current_cpsr)
+	mrs		r0, cpsr_cxsf
+	bx		lr
+
+	AALIGN(2)
+	AWEAK(set_cpsr)
+ALABEL(set_cpsr)
+	msr		cpsr_cxsf, r0
+	bx		lr
+
+#endif /* __thumb__ */
+
+/*
+ *  å¾®å°æéå¾
+ã¡
+ *
+ *  ã­ã£ãã·ã¥ã©ã¤ã³ã®ã©ã®å ´æã«ãããã®ãã£ã¦å®è¡æéãå¤ããããï¼å¤§
+ *  ããã®åä½ã§ã¢ã©ã¤ã³ãã¦ããï¼
+ */
+	ATEXT
+	AALIGN(8)
+	AGLOBAL(sil_dly_nse)
+ALABEL(sil_dly_nse)
+	mov		r1, #0
+	mcr		p15, 0, r1, c7, c5, 6		/* åå²äºæ¸¬å
+¨ä½ã®ç¡å¹å */
+	asm_inst_sync_barrier r3
+	subs	r0, r0, #SIL_DLY_TIM1
+	bxls	lr
+ALABEL(sil_dly_nse1)
+	mcr		p15, 0, r1, c7, c5, 6		/* åå²äºæ¸¬å
+¨ä½ã®ç¡å¹å */
+	asm_inst_sync_barrier r3
+	subs	r0, r0, #SIL_DLY_TIM2
+	bhi		sil_dly_nse1
+	bx		lr
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_sym.def
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_sym.def	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_sym.def	(revision 270)
@@ -0,0 +1,7 @@
+TARGET_ARCH_ARM,__TARGET_ARCH_ARM
+USE_INTCFG_TABLE,true,bool,defined(USE_INTCFG_TABLE)
+sizeof_TCB,sizeof(TCB)
+offsetof_TCB_p_tinib,"offsetof(TCB,p_tinib)"
+offsetof_TCB_sp,"offsetof(TCB,tskctxb.sp)"
+offsetof_TCB_pc,"offsetof(TCB,tskctxb.pc)"
+offsetof_T_EXCINF_cpsr,"offsetof(T_EXCINF,cpsr)"
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_syssvc.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_syssvc.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_syssvc.h	(revision 270)
@@ -0,0 +1,145 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ã¹ãã ãµã¼ãã¹ã®ã³ã¢ä¾å­é¨ï¼ARMç¨ï¼
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼target_syssvc.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯ã«ã¼ã
+ *  ããããã¡ã¤ã«ï¼ã®ã¿ããã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡ã¤ã«ããç´æ¥ã¤
+ *  ã³ã¯ã«ã¼ããã¦ã¯ãªããªãï¼
+ */
+
+#ifndef TOPPERS_CORE_SYSSVC_H
+#define TOPPERS_CORE_SYSSVC_H
+
+#include <t_stddef.h>
+#include "arm.h"
+
+/*
+ *  ããã©ã¼ãã³ã¹ã¢ãã¿ã«ããæ§è½è©ä¾¡
+ */
+#if defined(USE_ARM_PM_HIST) && __TARGET_ARCH_ARM == 7
+
+/*
+ *  ããã©ã¼ãã³ã¹ã¢ãã¿ã®ã«ã¦ã³ã¿ã®ãã¼ã¿å
+ */
+typedef uint32_t	PMCNT;
+
+/*
+ *  ããã©ã¼ãã³ã¹ã¢ãã¿ã®åæå
+ */
+Inline void
+arm_init_pmcnt(void)
+{
+	uint32_t	reg;
+
+	/*
+	 *  ããã©ã¼ãã³ã¹ã¢ãã¿ã®æå¹å
+	 *
+	 *  TOPPERS_ARM_PMCNT_DIV64ãå®ç¾©ããã¦ããå ´åã¯ï¼64ã¯ã­ãã¯æ¯ã«ã«
+	 *  ã¦ã³ãã¢ããããï¼é·ãæéãè¨æ¸¬ãããå ´åã«æå¹ï¼ï¼
+	 */
+	CP15_READ_PMCR(reg);
+	reg |= CP15_PMCR_ALLCNTR_ENABLE;
+
+#ifdef TOPPERS_ARM_PMCNT_DIV64
+	reg |= CP15_PMCR_PMCCNTR_DIVIDER;
+#else /* !TOPPERS_ARM_PMCNT_DIV64 */
+	reg &= ~CP15_PMCR_PMCCNTR_DIVIDER;
+#endif /* TOPPERS_ARM_PMCNT_DIV64 */
+
+	CP15_WRITE_PMCR(reg);
+
+	/*
+	 *  ããã©ã¼ãã³ã¹ã¢ãã¿ã®ã«ã¦ã³ã¿ã®æå¹å
+	 */
+	CP15_READ_PMCNTENSET(reg);
+	reg |= CP15_PMCNTENSET_CCNTR_ENABLE;
+	CP15_WRITE_PMCNTENSET(reg);
+}
+
+/*
+ *  ããã©ã¼ãã³ã¹ã¢ãã¿ã®ã«ã¦ã³ã¿ã®èª­ã¿è¾¼ã¿
+ */
+Inline void 
+arm_get_pmcnt(PMCNT *p_count)
+{
+	CP15_READ_PMCCNTR(*p_count);
+}
+
+/*
+ *  ã«ã¦ã³ã¿å¤ã®æéè¨æ¸¬åä½ã¸ã®å¤æ
+ *
+ *  æéè¨æ¸¬ã®åä½ã¯ï¼0.1ãã¤ã¯ã­ç§ã¨ãã¦ããï¼
+ */
+Inline uint_t
+arm_conv_pmcnt(PMCNT count) {
+#ifdef TOPPERS_ARM_PMCNT_DIV64
+	return(((uint_t) count) * (10 * 64) / CORE_CLK_MHZ);
+#else /* TOPPERS_ARM_PMCNT_DIV64 */
+	return(((uint_t) count) * 10 / CORE_CLK_MHZ);
+#endif /* TOPPERS_ARM_PMCNT_DIV64 */
+}
+
+/*
+ *  å®è¡æéåå¸éè¨ãµã¼ãã¹ã®è¨­å®
+ */
+#define HISTTIM					PMCNT
+#define HIST_GET_TIM(p_time)	(arm_get_pmcnt(p_time))
+#define HIST_CONV_TIM(time)		(arm_conv_pmcnt(time))
+#define HIST_BM_HOOK()			((void) 0)
+
+#endif /* defined(USE_ARM_PM_HIST) && __TARGET_ARCH_ARM == 7 */
+#endif /* TOPPERS_CORE_SYSSVC_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_test.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_test.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_test.h	(revision 270)
@@ -0,0 +1,148 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ãã¹ããã­ã°ã©ã ã®ã³ã¢ä¾å­é¨ï¼ARMç¨ï¼
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼target_test.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯ã«ã¼ãã
+ *  ãããã¡ã¤ã«ï¼ã®ã¿ããã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡ã¤ã«ããç´æ¥ã¤ã³
+ *  ã¯ã«ã¼ããã¦ã¯ãªããªãï¼
+ */
+
+#ifndef TOPPERS_CORE_TEST_H
+#define TOPPERS_CORE_TEST_H
+
+#include <t_stddef.h>
+#include "arm.h"
+
+/*
+ *  CPUä¾å¤ã®çºç
+ */
+
+#ifndef ILLEGAL_IADDR
+#define ILLEGAL_IADDR			0xd0000000U		/* ä¸æ­£å½ä»¤ã¢ãã¬ã¹ */
+#endif /* ILLEGAL_IADDR */
+
+#ifndef ILLEGAL_DADDR
+#define ILLEGAL_DADDR			0xd0000000U		/* ä¸æ­£ãã¼ã¿ã¢ãã¬ã¹ */
+#endif /* ILLEGAL_DADDR */
+
+/*
+ *  ã¹ã¼ããã¤ã¶ã³ã¼ã«ã«ããCPUä¾å¤ã®çºç
+ *
+ *  CPUä¾å¤ãã³ãã©ããï¼ãã®ã¾ã¾ãªã¿ã¼ã³ãããã¨ãã§ããï¼svcå½ä»¤ã«ã
+ *  ãlrã¬ã¸ã¹ã¿ãä¸æ¸ããããããï¼lrã¬ã¸ã¹ã¿ã¯ç ´å£ããããã®ã¨æå®ã
+ *  ã¦ããï¼
+ */
+#if defined(USE_SVC_CPUEXC)
+
+#define CPUEXC1					EXCNO_SVC		/* ã¹ã¼ããã¤ã¶ã³ã¼ã« */
+#define RAISE_CPU_EXCEPTION		Asm("svc #0":::"lr")
+#define PREPARE_RETURN_CPUEXC
+
+/*
+ *  ããªãã§ããã¢ãã¼ãã«ããCPUä¾å¤ã®çºç
+ *
+ *  ããªãã§ããã¢ãã¼ããèµ·ãããå½ä»¤ãã¹ã­ãããã¦CPUä¾å¤ãã³ãã©ãã
+ *  ãªã¿ã¼ã³ããããã«ï¼æ»ãçªå°ã¯ãã®ã¾ã¾ã§è¯ãï¼ARMã¢ã¼ãã§ä½¿ããã¨ã
+ *  æ³å®ï¼ï¼
+ */
+#elif defined(USE_PABORT_CPUEXC)
+
+#define CPUEXC1					EXCNO_PABORT	/* ããªãã§ããã¢ãã¼ã */
+#define RAISE_CPU_EXCEPTION		((void (*)(void)) ILLEGAL_IADDR)()
+#define PREPARE_RETURN_CPUEXC
+
+/*
+ *  ãã¼ã¿ã¢ãã¼ãã«ããCPUä¾å¤ã®çºç
+ *
+ *  ãã¼ã¿ã¢ãã¼ããèµ·ãããå½ä»¤ãã¹ã­ãããã¦CPUä¾å¤ãã³ãã©ãããªã¿ã¼
+ *  ã³ããããã«ï¼æ»ãçªå°ãã4ãæ¸ç®ããï¼ARMã¢ã¼ãã§ä½¿ããã¨ãæ³å®ï¼ï¼
+ */
+#elif defined(USE_DABORT_CPUEXC)
+
+#include "arm.h"
+#define CPUEXC1					EXCNO_DABORT	/* ãã¼ã¿ã¢ãã¼ã */
+#define RAISE_CPU_EXCEPTION		(void)(*((volatile uint32_t *) ILLEGAL_DADDR))
+#define PREPARE_RETURN_CPUEXC	((T_EXCINF *) p_excinf)->pc -= 4U
+
+/*
+ *  ãã§ã¤ã¿ã«ãã¼ã¿ã¢ãã¼ãå¦ç
+ *
+ *  ã¹ã¿ãã¯ãã¤ã³ã¿ãä¸æ­£ã«ãã¦ï¼ãã§ã¤ã¿ã«ãã¼ã¿ã¢ãã¼ãå¦çãè¡ãã
+ *  ãï¼CPUä¾å¤ãã³ãã©ããã¯ãªã¿ã¼ã³ã§ããªãï¼
+ */
+#elif defined(USE_FATAL_DABORT_CPUEXC)
+
+#define CPUEXC1					EXCNO_DABORT	/* ãã¼ã¿ã¢ãã¼ã */
+#define RAISE_CPU_EXCEPTION		Asm("mov sp, %0"::"I"(ILLEGAL_DADDR))
+
+/*
+ *  æªå®ç¾©å½ä»¤ã«ããCPUä¾å¤ã®çºç
+ *
+ *  RAISE_CPU_EXCEPTIONã¯ï¼ARMã¢ã¼ãã§ä½¿ããã¨ãæ³å®ãã¦ããï¼CPUä¾å¤ã
+ *  ã³ãã©ããï¼ãã®ã¾ã¾ãªã¿ã¼ã³ãããã¨ãã§ããï¼ä½¿ç¨ãã¦ããæªå®ç¾©å½
+ *  ä»¤ã¯ï¼"Multiply and multiply accumulate"å½ä»¤ç¾¤ã®ã¨ã³ã³ã¼ãã£ã³ã°å
+
+ *  ã«ãããæªå®ç¾©å½ä»¤ã§ããï¼
+ */
+#else
+
+#define CPUEXC1					EXCNO_UNDEF		/* æªå®ç¾©å½ä»¤ */
+#define RAISE_CPU_EXCEPTION		Asm(".word 0xf0500090")
+#define PREPARE_RETURN_CPUEXC
+
+#endif
+#endif /* TOPPERS_CORE_TEST_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_unrename.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_unrename.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/core_unrename.h	(revision 270)
@@ -0,0 +1,75 @@
+/* This file is generated from core_rename.def by genrename. */
+
+/* This file is included only when core_rename.h has been included. */
+#ifdef TOPPERS_CORE_RENAME_H
+#undef TOPPERS_CORE_RENAME_H
+
+/*
+ *  kernel_cfg.c
+ */
+#undef inh_table
+#undef intcfg_table
+#undef exc_table
+
+/*
+ *  core_support.S
+ */
+#undef dispatch
+#undef start_dispatch
+#undef exit_and_dispatch
+#undef call_exit_kernel
+#undef start_r
+#undef irq_handler
+#undef undef_handler
+#undef svc_handler
+#undef pabort_handler
+#undef dabort_handler
+#undef fiq_handler
+#undef current_cpsr
+#undef set_cpsr
+
+/*
+ *  core_kernel_impl.c
+ */
+#undef excpt_nest_count
+#undef arm_mmu_initialize
+#undef core_initialize
+#undef core_terminate
+#undef xlog_sys
+#undef xlog_fsr
+#undef default_int_handler
+#undef default_exc_handler
+
+/*
+ *  gic_kernel_impl.c
+ */
+#undef gicc_initialize
+#undef gicc_terminate
+#undef gicd_initialize
+#undef gicd_terminate
+
+/*
+ *  gic_support.S
+ */
+#undef irc_begin_int
+#undef irc_end_int
+#undef irc_get_intpri
+#undef irc_begin_exc
+#undef irc_end_exc
+
+/*
+ *  pl310.c
+ */
+#undef pl310_initialize
+#undef pl310_disable
+#undef pl310_invalidate_all
+#undef pl310_clean_and_invalidate_all
+
+/*
+ *  target_kernel_impl.c
+ */
+#undef arm_tnum_memory_area
+#undef arm_memory_area
+
+
+#endif /* TOPPERS_CORE_RENAME_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/gic_kernel_impl.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/gic_kernel_impl.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/gic_kernel_impl.c	(revision 270)
@@ -0,0 +1,277 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã«ã¼ãã«ã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©ä¾å­é¨ï¼GICç¨ï¼
+ */
+
+#include "kernel_impl.h"
+#include "interrupt.h"
+#include <sil.h>
+#include "arm.h"
+
+/*
+ *  CPUã¤ã³ã¿ãã§ã¼ã¹ã®æä½
+ */
+
+/*
+ *  CPUã¤ã³ã¿ãã§ã¼ã¹ã®åæå
+ */
+void
+gicc_initialize(void)
+{
+	/*
+	 *  CPUã¤ã³ã¿ãã§ã¼ã¹ããã£ã¹ã¨ã¼ãã«
+	 */
+	sil_wrw_mem(GICC_CTLR, GICC_CTLR_DISABLE);
+
+	/*
+	 *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãæä½åªå
+åº¦ã«è¨­å®
+	 */
+	gicc_set_priority((GIC_PRI_LEVEL - 1) << GIC_PRI_SHIFT);
+
+	/*
+	 *  å²è¾¼ã¿åªå
+åº¦ã®å
+¨ãããæå¹ã«
+	 */
+	sil_wrw_mem(GICC_BPR, 0U);
+
+	/*
+	 *  ã¢ã¯ãã£ããªå²è¾¼ã¿ãããã°ï¼EOIã«ããã¯ãªã¢ãã
+	 */
+	sil_wrw_mem(GICC_EOIR, sil_rew_mem(GICC_IAR));
+
+	/*
+	 *  CPUã¤ã³ã¿ãã§ã¼ã¹ãã¤ãã¼ãã«
+	 */
+#ifdef TOPPERS_SAFEG_SECURE
+	sil_wrw_mem(GICC_CTLR, (GICC_CTLR_FIQEN|GICC_CTLR_ENABLEGRP1
+												|GICC_CTLR_ENABLEGRP0));
+#else /* TOPPERS_SAFEG_SECURE */
+	sil_wrw_mem(GICC_CTLR, GICC_CTLR_ENABLE);
+#endif /* TOPPERS_SAFEG_SECURE */
+}
+
+/*
+ *  CPUã¤ã³ã¿ãã§ã¼ã¹ã®çµäºå¦ç
+ */
+void
+gicc_terminate(void)
+{
+	sil_wrw_mem(GICC_CTLR, GICC_CTLR_DISABLE);
+}
+
+/*
+ *  ãã£ã¹ããªãã¥ã¼ã¿ã®æä½
+ */
+
+/*
+ *  ãã£ã¹ããªãã¥ã¼ã¿ã®åæå
+ */
+void
+gicd_initialize(void)
+{
+	int		i;
+
+	/*
+	 *  ãã£ã¹ããªãã¥ã¼ã¿ããã£ã¹ã¨ã¼ãã«
+	 */
+	sil_wrw_mem(GICD_CTLR, GICD_CTLR_DISABLE);
+
+#ifdef TOPPERS_SAFEG_SECURE
+	/*
+	 *  ãã¹ã¦ã®å²è¾¼ã¿ãã°ã«ã¼ã1ï¼IRQï¼ã«è¨­å®
+	 */
+	for (i = 0; i < (GIC_TNUM_INTNO + 31) / 32; i++) {
+		sil_wrw_mem(GICD_IGROUPR(i), 0xffffffffU);
+	}
+#endif /* TOPPERS_SAFEG_SECURE */
+
+	/*
+	 *  ãã¹ã¦ã®å²è¾¼ã¿ãç¦æ­¢
+	 */
+	for (i = 0; i < (GIC_TNUM_INTNO + 31) / 32; i++) {
+		sil_wrw_mem(GICD_ICENABLER(i), 0xffffffffU);
+	}
+
+	/*
+	 *  ãã¹ã¦ã®å²è¾¼ã¿ãã³ãã£ã³ã°ãã¯ãªã¢
+	 */
+	for (i = 0; i < (GIC_TNUM_INTNO + 31) / 32; i++) {
+		sil_wrw_mem(GICD_ICPENDR(i), 0xffffffffU);
+	}
+
+	/*
+	 *  ãã¹ã¦ã®å²è¾¼ã¿ãæä½åªå
+åº¦ã«è¨­å®
+	 */
+	for (i = 0; i < (GIC_TNUM_INTNO + 3) / 4; i++){
+		sil_wrw_mem(GICD_IPRIORITYR(i), 0xffffffffU);
+	}
+
+	/*
+	 *  ãã¹ã¦ã®å
+±æããªãã§ã©ã«å²è¾¼ã¿ã®ã¿ã¼ã²ããããã­ã»ããµ0ã«è¨­å®
+	 */
+	for (i = GIC_INTNO_SPI0 / 4; i < (GIC_TNUM_INTNO + 3) / 4; i++) {
+		sil_wrw_mem(GICD_ITARGETSR(i), 0x01010101U);
+	}
+
+	/*
+	 *  ãã¹ã¦ã®ããªãã§ã©ã«å²è¾¼ã¿ãã¬ãã«ããªã¬ã«è¨­å®
+	 */
+	for (i = GIC_INTNO_PPI0 / 16; i < (GIC_TNUM_INTNO + 15) / 16; i++) {
+#ifdef GIC_ARM11MPCORE
+		sil_wrw_mem(GICD_ICFGR(i), 0x55555555U);
+#else /* GIC_ARM11MPCORE */
+		sil_wrw_mem(GICD_ICFGR(i), 0x00000000U);
+#endif /* GIC_ARM11MPCORE */
+	}
+
+	/*
+	 *  ãã£ã¹ããªãã¥ã¼ã¿ãã¤ãã¼ãã«
+	 */
+	sil_wrw_mem(GICD_CTLR, GICD_CTLR_ENABLE);
+}
+
+/*
+ *  ãã£ã¹ããªãã¥ã¼ã¿ã®çµäºå¦ç
+ */
+void
+gicd_terminate(void)
+{
+	sil_wrw_mem(GICD_CTLR, GICD_CTLR_DISABLE);
+}
+
+#ifndef OMIT_GIC_INITIALIZE_INTERRUPT
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®å±æ§ã®è¨­å®
+ *
+ *  ASPã«ã¼ãã«ã§ã®å©ç¨ãæ³å®ãã¦ï¼ãã©ã¡ã¼ã¿ã¨ã©ã¼ã¯ã¢ãµã¼ã·ã§ã³ã§ãã§ã
+ *  ã¯ãã¦ããï¼
+ */
+Inline void
+config_int(INTNO intno, ATR intatr, PRI intpri)
+{
+	assert(VALID_INTNO(intno));
+	assert(TMIN_INTPRI <= intpri && intpri <= TMAX_INTPRI);
+
+	/*
+	 *  å²è¾¼ã¿ãç¦æ­¢
+	 *
+	 *  å²è¾¼ã¿ãåãä»ããã¾ã¾ï¼ã¬ãã«ããªã¬ï¼ã¨ãã¸ããªã¬ã®è¨­å®ãï¼å²
+	 *  è¾¼ã¿åªå
+åº¦ã®è¨­å®ãè¡ãã®ã¯å±éºãªããï¼å²è¾¼ã¿å±æ§ã«ãããããï¼
+	 *  ä¸æ¦ãã¹ã¯ããï¼
+	 */
+	disable_int(intno);
+
+	/*
+	 *  å²è¾¼ã¿ãã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
+	 */
+#ifdef TOPPERS_SAFEG_SECURE
+	gicd_config_group(intno, 1U);
+#endif /* TOPPERS_SAFEG_SECURE */
+
+	if ((intatr & TA_EDGE) != 0U) {
+#ifdef GIC_ARM11MPCORE
+		gicd_config(intno, GICD_ICFGRn_EDGE|GICD_ICFGRn_1_N);
+#else /* GIC_ARM11MPCORE */
+		gicd_config(intno, GICD_ICFGRn_EDGE);
+#endif /* GIC_ARM11MPCORE */
+		clear_int(intno);
+	}
+	else {
+#ifdef GIC_ARM11MPCORE
+		gicd_config(intno, GICD_ICFGRn_LEVEL|GICD_ICFGRn_1_N);
+#else /* GIC_ARM11MPCORE */
+		gicd_config(intno, GICD_ICFGRn_LEVEL);
+#endif /* GIC_ARM11MPCORE */
+	}
+
+	/*
+	 *  å²è¾¼ã¿åªå
+åº¦ã¨ã¿ã¼ã²ãããã­ã»ããµãè¨­å®
+	 */
+	gicd_set_priority(intno, INT_IPM(intpri));
+	gicd_set_target(intno, 1U << arm_prc_index());
+
+	/*
+	 * å²è¾¼ã¿ãè¨±å¯
+	 */
+	if ((intatr & TA_ENAINT) != 0U) {
+		enable_int(intno);
+	}
+}
+
+/*
+ *  å²è¾¼ã¿ç®¡çæ©è½ã®åæå
+ */
+void
+initialize_interrupt(void)
+{
+	uint_t			i;
+	const INTINIB	*p_intinib;
+
+	for (i = 0; i < tnum_cfg_intno; i++) {
+		p_intinib = &(intinib_table[i]);
+		config_int(p_intinib->intno, p_intinib->intatr, p_intinib->intpri);
+	}
+}
+
+#endif /* OMIT_GIC_INITIALIZE_INTERRUPT */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/gic_kernel_impl.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/gic_kernel_impl.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/gic_kernel_impl.h	(revision 270)
@@ -0,0 +1,491 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2006-2017 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã«ã¼ãã«ã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©ä¾å­é¨ï¼GICç¨ï¼
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼target_kernel_impl.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯
+ *  ã«ã¼ãããããã¡ã¤ã«ï¼ã®ã¿ããã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡ã¤ã«ãã
+ *  ç´æ¥ã¤ã³ã¯ã«ã¼ããã¦ã¯ãªããªãï¼
+ */
+
+#ifndef TOPPERS_GIC_KERNEL_IMPL_H
+#define TOPPERS_GIC_KERNEL_IMPL_H
+
+#include <sil.h>
+#include "arm.h"
+
+/*
+ *  å²è¾¼ã¿çªå·ã®æ°ï¼æå°å¤ã¨æå¤§å¤
+ */
+#define TNUM_INTNO		GIC_TNUM_INTNO
+#define TMIN_INTNO		UINT_C(0)
+#define TMAX_INTNO		(GIC_TNUM_INTNO - 1)
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©çªå·ã®æ°
+ */
+#define TNUM_INHNO		GIC_TNUM_INTNO
+
+/*
+ *  å²è¾¼ã¿çªå·ã®å®ç¾©
+ */
+#define GIC_INTNO_SGI0		0U
+#define GIC_INTNO_PPI0		16U
+#define GIC_INTNO_SPI0		32U
+
+/*
+ *  å²è¾¼ã¿åªå
+åº¦ã®æä½
+ *
+ *  å²è¾¼ã¿åªå
+åº¦ã®å
+é¨è¡¨ç¾ã¯ï¼uint_tåã§è¡¨ãï¼0ãæé«åªå
+åº¦ã§ï¼å¤ãå¤§ã
+ *  ãã»ã©åªå
+åº¦ãä¸ãããã®ã¨ããï¼GICã®ã¬ã¸ã¹ã¿æ§æã¨æ´åãããããã«ï¼
+ *  åªå
+åº¦ã®æ®µæ°ã256æ®µéã®æã«ãããã¦è¡¨ãï¼
+ */
+#define GIC_PRI_LEVEL		(TMAX_INTPRI - TMIN_INTPRI + 2)
+
+#if GIC_PRI_LEVEL == 16
+#define GIC_PRI_SHIFT		4
+#define GIC_PRI_MASK		UINT_C(0x0f)
+#elif GIC_PRI_LEVEL == 32
+#define GIC_PRI_SHIFT		3
+#define GIC_PRI_MASK		UINT_C(0x1f)
+#elif GIC_PRI_LEVEL == 64
+#define GIC_PRI_SHIFT		2
+#define GIC_PRI_MASK		UINT_C(0x3f)
+#elif GIC_PRI_LEVEL == 128
+#define GIC_PRI_SHIFT		1
+#define GIC_PRI_MASK		UINT_C(0x7f)
+#elif GIC_PRI_LEVEL == 256
+#define GIC_PRI_SHIFT		0
+#define GIC_PRI_MASK		UINT_C(0xff)
+#else
+#error Invalid number of priority levels for GIC.
+#endif /* GIC_PRI_LEVEL == 16 */
+
+/* å¤é¨è¡¨ç¾ã¸ã®å¤æ */
+#define EXT_IPM(pri) \
+			(((PRI)((pri) >> GIC_PRI_SHIFT)) - (GIC_PRI_LEVEL - 1))
+
+/* å
+é¨è¡¨ç¾ã¸ã®å¤æ */
+#define INT_IPM(ipm) \
+			(((uint_t)((ipm) + (GIC_PRI_LEVEL - 1))) << GIC_PRI_SHIFT)
+
+/*
+ *  GICã¬ã¸ã¹ã¿ã®ã¢ãã¬ã¹ãå®ç¾©ããããã®ãã¯ã­
+ *
+ *  GICã¬ã¸ã¹ã¿ã®ã¢ãã¬ã¹ãï¼ã¢ã»ã³ããªè¨èªãããåç
+§ã§ããããã«ããã
+ *  ãã®ãã¯ã­ï¼
+ */
+#ifndef GIC_REG
+#define GIC_REG(base, offset)	((uint32_t *)((base) + (offset ## U)))
+#endif /* GIC_REG */
+
+/*
+ *  CPUã¤ã³ã¿ãã§ã¼ã¹é¢é£ã®å®ç¾©
+ */
+#define GICC_CTLR		GIC_REG(GICC_BASE, 0x00)
+#define GICC_PMR		GIC_REG(GICC_BASE, 0x04)
+#define GICC_BPR		GIC_REG(GICC_BASE, 0x08)
+#define GICC_IAR		GIC_REG(GICC_BASE, 0x0C)
+#define GICC_EOIR		GIC_REG(GICC_BASE, 0x10)
+#define GICC_RPR		GIC_REG(GICC_BASE, 0x14)
+#define GICC_HPIR		GIC_REG(GICC_BASE, 0x18)
+
+/*
+ *  CPUã¤ã³ã¿ãã§ã¼ã¹å¶å¾¡ã¬ã¸ã¹ã¿ï¼GICC_CTLRï¼ã®è¨­å®å¤ï¼GICv1ã§ã»ã­ã¥ãª
+ *  ãã£æ¡å¼µããªãå ´åï¼
+ */
+#define GICC_CTLR_DISABLE		UINT_C(0x00)
+#define GICC_CTLR_ENABLE		UINT_C(0x01)
+
+/*
+ *  CPUã¤ã³ã¿ãã§ã¼ã¹å¶å¾¡ã¬ã¸ã¹ã¿ï¼GICC_CTLRï¼ã®è¨­å®å¤ï¼GICv2ã§ã»ã­ã¥ãª
+ *  ãã£æ¡å¼µããªãå ´åãï¼æ¡å¼µãããå ´åã®ã»ã­ã¥ã¢ã¢ã¼ãï¼
+ */
+#ifdef TOPPERS_SAFEG_SECURE
+#define GICC_CTLR_ENABLEGRP0	UINT_C(0x01)
+#define GICC_CTLR_ENABLEGRP1	UINT_C(0x02)
+#define GICC_CTLR_FIQEN			UINT_C(0x08)
+#define GICC_CTLR_CBPR			UINT_C(0x10)
+#endif /* TOPPERS_SAFEG_SECURE */
+
+/*
+ *  ãã£ã¹ããªãã¥ã¼ã¿é¢é£ã®å®ç¾©
+ */
+#define GICD_CTLR			GIC_REG(GICD_BASE, 0x000)
+#define GICD_TYPER			GIC_REG(GICD_BASE, 0x004)
+#define GICD_IIDR			GIC_REG(GICD_BASE, 0x008)
+#define GICD_IGROUPR(n)		GIC_REG(GICD_BASE, 0x080 + (n) * 4)
+#define GICD_ISENABLER(n)	GIC_REG(GICD_BASE, 0x100 + (n) * 4)
+#define GICD_ICENABLER(n)	GIC_REG(GICD_BASE, 0x180 + (n) * 4)
+#define GICD_ISPENDR(n)		GIC_REG(GICD_BASE, 0x200 + (n) * 4)
+#define GICD_ICPENDR(n)		GIC_REG(GICD_BASE, 0x280 + (n) * 4)
+#define GICD_ISACTIVER(n)	GIC_REG(GICD_BASE, 0x300 + (n) * 4)
+#define GICD_ICACTIVER(n)	GIC_REG(GICD_BASE, 0x380 + (n) * 4)
+#define GICD_IPRIORITYR(n)	GIC_REG(GICD_BASE, 0x400 + (n) * 4)
+#define GICD_ITARGETSR(n)	GIC_REG(GICD_BASE, 0x800 + (n) * 4)
+#define GICD_ICFGR(n)		GIC_REG(GICD_BASE, 0xc00 + (n) * 4)
+#define GICD_NSCAR(n)		GIC_REG(GICD_BASE, 0xe00 + (n) * 4)
+#define GICD_SGIR			GIC_REG(GICD_BASE, 0xf00)
+#define GICD_CPENDSGIR(n)	GIC_REG(GICD_BASE, 0xf10 + (n) * 4)
+#define GICD_SPENDSGIR(n)	GIC_REG(GICD_BASE, 0xf20 + (n) * 4)
+
+/*
+ *  ãã£ã¹ããªãã¥ã¼ã¿å¶å¾¡ã¬ã¸ã¹ã¿ï¼GICD_CTLRï¼ã®è¨­å®å¤
+ */
+#define GICD_CTLR_DISABLE	UINT_C(0x00)
+#define GICD_CTLR_ENABLE	UINT_C(0x01)
+
+/*
+ *  å²è¾¼ã¿ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¬ã¸ã¹ã¿ï¼GICD_ICFGRnï¼ã®è¨­å®å¤
+ *
+ *  ç¬¬1ãããã¯ï¼ARM11 MPCoreããã³GICã®æ©ãææã®å®è£
+ã§ã¯å²è¾¼ã¿ã®éç¥
+ *  å
+ãã­ã»ããµãè¨­å®ããããã«ä½¿ç¨ããã¦ããï¼
+ */
+#define GICD_ICFGRn_LEVEL	UINT_C(0x00)
+#define GICD_ICFGRn_EDGE	UINT_C(0x02)
+#ifdef GIC_ARM11MPCORE
+#define GICD_ICFGRn_N_N		UINT_C(0x00)
+#define GICD_ICFGRn_1_N		UINT_C(0x01)
+#endif /* GIC_ARM11MPCORE */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  CPUã¤ã³ã¿ãã§ã¼ã¹ã®æä½
+ */
+
+/*
+ *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãè¨­å®ï¼priã¯å
+é¨è¡¨ç¾ï¼
+ */ 
+Inline void
+gicc_set_priority(uint_t pri)
+{
+	sil_wrw_mem(GICC_PMR, pri);
+}
+
+/*
+ *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãåå¾ï¼å
+é¨è¡¨ç¾ã§è¿ãï¼
+ */ 
+Inline uint_t
+gicc_get_priority(void)
+{
+	return(sil_rew_mem(GICC_PMR));
+}
+
+/*
+ *  CPUã¤ã³ã¿ãã§ã¼ã¹ã®åæå
+ */
+extern void gicc_initialize(void);
+
+/*
+ *  CPUã¤ã³ã¿ãã§ã¼ã¹ã®çµäº
+ */
+extern void gicc_terminate(void);
+
+/*
+ *  ãã£ã¹ããªãã¥ã¼ã¿ã®æä½
+ */
+
+/*
+ *  å²è¾¼ã¿ç¦æ­¢ï¼å²è¾¼ã¿ã¤ãã¼ãã«ã®ã¯ãªã¢ï¼
+ */
+Inline void
+gicd_disable_int(INTNO intno)
+{
+	sil_wrw_mem(GICD_ICENABLER(intno / 32), (1U << (intno % 32)));
+}
+
+/*
+ *  å²è¾¼ã¿è¨±å¯ï¼å²è¾¼ã¿ã¤ãã¼ãã«ã®ã»ããï¼
+ */
+Inline void
+gicd_enable_int(INTNO intno)
+{
+	sil_wrw_mem(GICD_ISENABLER(intno / 32), (1U << (intno % 32)));
+}
+
+/*
+ *  å²è¾¼ã¿ãã³ãã£ã³ã°ã®ã¯ãªã¢
+ */
+Inline void
+gicd_clear_pending(INTNO intno)
+{
+	sil_wrw_mem(GICD_ICPENDR(intno / 32), (1U << (intno % 32)));
+}
+
+/*
+ *  å²è¾¼ã¿ãã³ãã£ã³ã°ã®ã»ãã
+ */
+Inline void
+gicd_set_pending(INTNO intno)
+{
+	sil_wrw_mem(GICD_ISPENDR(intno / 32), (1U << (intno % 32)));
+}
+
+/*
+ *  å²è¾¼ã¿ãã³ãã£ã³ã°ã®ãã§ãã¯
+ */
+Inline bool_t
+gicd_probe_pending(INTNO intno)
+{
+	return((sil_rew_mem(GICD_ISPENDR(intno / 32)) & (1U << (intno % 32)))
+																	!= 0U);
+}
+
+/*
+ *  å²è¾¼ã¿ã®ã³ã³ãã£ã°ã¬ã¼ã·ã§ã³
+ */
+Inline void
+gicd_config(INTNO intno, uint_t config)
+{
+	uint_t		shift = (intno % 16) * 2;
+	uint32_t	reg;
+
+	reg = sil_rew_mem(GICD_ICFGR(intno / 16));
+	reg &= ~(0x03U << shift);
+	reg |= (config << shift);
+	sil_wrw_mem(GICD_ICFGR(intno / 16), reg);
+}
+
+/*
+ *  å²è¾¼ã¿ã°ã«ã¼ãã®è¨­å®ï¼ã»ã­ã¥ãªãã£æ¡å¼µï¼
+ */
+Inline void
+gicd_config_group(INTNO intno, uint_t group)
+{
+	uint_t		shift = intno % 32;
+	uint32_t	reg;
+
+	reg = sil_rew_mem(GICD_IGROUPR(intno / 32));
+	reg &= ~(0x01U << shift);
+	reg |= (group << shift);
+	sil_wrw_mem(GICD_IGROUPR(intno / 32), reg);
+}
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã«å¯¾ããå²è¾¼ã¿åªå
+åº¦ã®è¨­å®ï¼priã¯å
+é¨è¡¨ç¾ï¼
+ */
+Inline void
+gicd_set_priority(INTNO intno, uint_t pri)
+{
+	uint_t		shift = (intno % 4) * 8;
+	uint32_t	reg;
+
+	reg = sil_rew_mem(GICD_IPRIORITYR(intno / 4));
+	reg &= ~(0xffU << shift);
+	reg |= (pri << shift);
+	sil_wrw_mem(GICD_IPRIORITYR(intno / 4), reg);
+}
+
+/*
+ *  å²è¾¼ã¿ã¿ã¼ã²ãããã­ã»ããµã®è¨­å®
+ *
+ *  prcsã¯ï¼ã¿ã¼ã²ããã¨ãããã­ã»ããµãè¡¨ããããã®ãããæ¯è«çåã§æ
+ *  å®ããï¼
+ *		ãã­ã»ããµ0 : 0x01
+ *		ãã­ã»ããµ1 : 0x02
+ *		ãã­ã»ããµ2 : 0x04
+ *		ãã­ã»ããµ3 : 0x08
+ */
+Inline void
+gicd_set_target(INTNO intno, uint_t prcs)
+{
+	uint_t		shift = (intno % 4) * 8;
+	uint32_t	reg;
+
+	reg = sil_rew_mem(GICD_ITARGETSR(intno / 4));
+	reg &= ~(0xffU << shift);
+	reg |= (prcs << shift);
+	sil_wrw_mem(GICD_ITARGETSR(intno / 4), reg);
+}
+
+/*
+ *  ãã£ã¹ããªãã¥ã¼ã¿ã®åæå
+ */
+extern void gicd_initialize(void);
+
+/*
+ *  ãã£ã¹ããªãã¥ã¼ã¿ã®çµäº
+ */
+extern void gicd_terminate(void);
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  å²è¾¼ã¿çªå·ã®ç¯å²ã®å¤å®
+ */
+#define VALID_INTNO(intno)	(TMIN_INTNO <= (intno) && (intno) <= TMAX_INTNO)
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®ããã®æ¨æºçãªåæåæ
+å ±ãçæãã
+ */
+#define USE_INTINIB_TABLE
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³è¨­å®ãã¼ãã«ãçæãã
+ */
+#define USE_INTCFG_TABLE
+
+/*
+ *  ã³ã¢ä¾å­é¨
+ */
+#include "core_kernel_impl.h"
+
+/*
+ *  ã¿ã¼ã²ããéä¾å­é¨ã«æä¾ããé¢æ°
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®è¨­å®
+ */
+Inline void
+t_set_ipm(PRI intpri)
+{
+	gicc_set_priority(INT_IPM(intpri));
+}
+
+/*
+ *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®åç
+§
+ */
+Inline PRI
+t_get_ipm(void)
+{
+	return(EXT_IPM(gicc_get_priority()));
+}
+
+/*
+ *  å²è¾¼ã¿è¦æ±ç¦æ­¢ãã©ã°ã®ã»ãã
+ *
+ *  intnoã§æå®ãããå²è¾¼ã¿è¦æ±ã©ã¤ã³ã«å¯¾ããå²è¾¼ã¿è¦æ±ç¦æ­¢ãã©ã°ã®ã»ã
+ *  ããï¼å²è¾¼ã¿ãç¦æ­¢ããï¼å²è¾¼ã¿å±æ§ãè¨­å®ããã¦ããªãå²è¾¼ã¿è¦æ±ã©ã¤
+ *  ã³ãæå®ãããå ´åã«ã¯ï¼falseãè¿ãï¼
+ */
+Inline bool_t
+disable_int(INTNO intno)
+{
+	if (intcfg_table[intno] == 0U) {
+		return(false);
+	}
+	gicd_disable_int(intno);
+	return(true);
+}
+
+/* 
+ *  å²è¾¼ã¿è¦æ±ç¦æ­¢ãã©ã°ã®ã¯ãªã¢
+ *
+ *  intnoã§æå®ãããå²è¾¼ã¿è¦æ±ã©ã¤ã³ã«å¯¾ããå²è¾¼ã¿è¦æ±ç¦æ­¢ãã©ã°ã®ã¯ãª
+ *  ã¢ãï¼å²è¾¼ã¿ãè¨±å¯ããï¼å²è¾¼ã¿å±æ§ãè¨­å®ããã¦ããªãå²è¾¼ã¿è¦æ±ã©ã¤
+ *  ã³ãæå®ãããå ´åã«ã¯ï¼falseãè¿ãï¼
+ */
+Inline bool_t
+enable_int(INTNO intno)
+{
+	if (intcfg_table[intno] == 0U) {
+		return(false);
+	}
+	gicd_enable_int(intno);
+	return(true);
+}
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã®ã¯ãªã¢
+ */
+Inline void
+clear_int(INTNO intno)
+{
+	gicd_clear_pending(intno);
+}
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã®ãã§ãã¯
+ */
+Inline bool_t
+probe_int(INTNO intno)
+{
+	return(gicd_probe_pending(intno));
+}
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã®ã»ãã
+ */
+Inline void
+raise_int(INTNO intno)
+{
+	gicd_set_pending(intno);
+}
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_GIC_KERNEL_IMPL_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/gic_support.S
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/gic_support.S	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/gic_support.S	(revision 270)
@@ -0,0 +1,224 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã«ã¼ãã«ã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©ä¾å­é¨ã®ã¢ã»ã³ããªè¨èªé¨ï¼GICç¨ï¼
+ */
+
+#define TOPPERS_MACRO_ONLY
+#define TOPPERS_ASM_MACRO
+#define UINT_C(val)			(val)		/* uint_tåã®å®æ°ãä½ããã¯ã­ */
+#define ULONG_C(val)		(val)		/* ulong_tåã®å®æ°ãä½ããã¯ã­ */
+#define CAST(type, val)		(val)		/* åã­ã£ã¹ããè¡ããã¯ã­ */
+#define GIC_REG(base, offset)	((base) + (offset))
+#include "kernel_impl.h"
+#include "core_asm.inc"
+
+#if __TARGET_ARCH_ARM < 6
+#error gic_suport.S supports ARMv6 or later.
+#endif /* __TARGET_ARCH_ARM < 6 */
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©å¼åºãåã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©æä½
+ *
+ *  r4ã«å²è¾¼ã¿çªå·ãè¿ãï¼irc_end_intã§ç¨ããæ
+å ±ï¼å²è¾¼ã¿çºçåã®å²è¾¼ã¿
+ *  åªå
+åº¦ãã¹ã¯ï¼ãï¼ã¹ã¿ãã¯ã®å
+é ­ã«ä¿å­ããï¼
+ */
+	ATEXT
+	AALIGN(2)
+	AGLOBAL(irc_begin_int)
+ALABEL(irc_begin_int)
+	/*
+	 *  å²è¾¼ã¿è¦å ãåå¾ããï¼
+	 */
+	ldr		r1, =GICC_IAR
+	ldr		r3, [r1]
+
+	/*
+	 *  å²è¾¼ã¿çªå·ãæ±ããï¼
+	 */
+	lsl		r4, r3, #22			/* ä¸ä½10ããããåãåºã */
+	lsr		r4, r4, #22
+
+	/*
+	 *  å²è¾¼ã¿è¦æ±ãã¯ãªã¢ããï¼
+	 */
+	and		r0, r4, #31
+	mov		r2, #1
+	lsl		r0, r2, r0
+	ldr		r2, =GICD_ICPENDR(0)
+	lsr		r1, r4, #5
+	str		r0, [r2,r1,lsl #2]
+
+	/*
+	 *  å²è¾¼ã¿è¦å ã®å²è¾¼ã¿åªå
+åº¦ãæ±ãï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã«è¨­å®ããï¼
+	 */
+	ldr		r1, =GICC_RPR		/* åãä»ããå²è¾¼ã¿ã®å²è¾¼ã¿åªå
+åº¦ãåå¾ */
+	ldr		r0, [r1]
+	ldr		r1, =GICC_PMR		/* å²è¾¼ã¿çºçåã®å²è¾¼ã¿åªå
+åº¦ãåå¾ */
+	ldr		r2, [r1]
+	str		r0, [r1]			/* æ°ããå²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãã»ãããã */
+	asm_data_sync_barrier r0	/* å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãã»ãããããã®ãå¾
+ã¤ */
+	str		r2, [sp]			/* irc_end_intã§ç¨ããæ
+å ±ãä¿å­ */
+
+	/*
+	 *  EOIãçºè¡ããï¼
+	 */
+	ldr		r1, =GICC_EOIR		/* EOIã¬ã¸ã¹ã¿ã¸ã®æ¸è¾¼ã¿ */
+	str		r3, [r1]
+
+	/*
+	 *  å²è¾¼ã¿çªå·ãè¿å¤ã¨ãã¦ãªã¿ã¼ã³ããï¼
+	 */
+	bx		lr
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©å¼åºãå¾ã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©æä½
+ */
+	ATEXT
+	AALIGN(2)
+	AGLOBAL(irc_end_int)
+ALABEL(irc_end_int)
+	/*
+	 *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãå
+ã«æ»ãï¼
+	 */
+	ldr		r2, [sp]			/* irc_begin_intã§ä¿å­ããæ
+å ±ãå¾©å¸° */
+	ldr		r1, =GICC_PMR		/* å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãå
+ã«æ»ã */
+	str		r2, [r1]
+	bx		lr
+
+/*
+ *  CPUä¾å¤çºçåã®å²è¾¼ã¿åªå
+åº¦ã®åå¾
+ *
+ *  CPUä¾å¤ã®çºçã§å²è¾¼ã¿åªå
+åº¦ãå¤ãããã¨ã¯ãªãããï¼ç¾å¨ã®å²è¾¼ã¿åªå
+
+ *  åº¦ãè¿ãï¼
+ */
+	ATEXT
+	AALIGN(2)
+	AGLOBAL(irc_get_intpri)
+ALABEL(irc_get_intpri)
+	/*
+	 *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãå¤é¨è¡¨ç¾ã«å¤æãã¦è¿ãï¼
+	 */
+	ldr		r1, =GICC_PMR
+	ldr		r0, [r1]
+	asr		r0, r0, #GIC_PRI_SHIFT
+	sub		r0, r0, #GIC_PRI_MASK
+	bx		lr
+
+/*
+ *  CPUä¾å¤ãã³ãã©å¼åºãåã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©æä½
+ *
+ *  irc_end_excã§ç¨ããæ
+å ±ï¼CPUä¾å¤çºçåã®å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ï¼ãï¼ã¹ã¿ã
+ *	ã¯ã®å
+é ­ã«ä¿å­ããï¼
+ */
+	ATEXT
+	AALIGN(2)
+	AGLOBAL(irc_begin_exc)
+ALABEL(irc_begin_exc)
+	/*
+	 *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãä¿å­ããï¼
+	 */
+	ldr		r1, =GICC_PMR		/* ç¾å¨ã®å²è¾¼ã¿åªå
+åº¦ãåå¾ */
+	ldr		r2, [r1]
+	str		r2, [sp]			/* irc_end_excã§ç¨ããæ
+å ±ãä¿å­ */
+	bx		lr
+
+/*
+ *  CPUä¾å¤ãã³ãã©å¼åºãå¾ã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©æä½
+ */
+	ATEXT
+	AALIGN(2)
+	AGLOBAL(irc_end_exc)
+ALABEL(irc_end_exc)
+	/*
+	 *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãå
+ã«æ»ãï¼
+	 */
+	ldr		r2, [sp]			/* irc_begin_excã§ä¿å­ããæ
+å ±ãå¾©å¸° */
+	ldr		r1, =GICC_PMR		/* å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãå
+ã«æ»ã */
+	str		r2, [r1]
+	bx		lr
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/sp804.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/sp804.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/sp804.h	(revision 270)
@@ -0,0 +1,87 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ARM Dual-Timer Moduleï¼SP804ï¼ã«é¢ããå®ç¾©
+ */
+
+#ifndef TOPPERS_SP804_H
+#define TOPPERS_SP804_H
+
+/*
+ *  ã¿ã¤ãã¬ã¸ã¹ã¿ã®çªå°ã®å®ç¾©
+ */
+#define SP804_LR(base)		((uint32_t *)((base) + 0x00U))
+#define SP804_CVR(base)		((uint32_t *)((base) + 0x04U))
+#define SP804_CR(base)		((uint32_t *)((base) + 0x08U))
+#define SP804_ICR(base)		((uint32_t *)((base) + 0x0cU))
+#define SP804_RIS(base)		((uint32_t *)((base) + 0x10U))
+#define SP804_MIS(base)		((uint32_t *)((base) + 0x14U))
+#define SP804_BGLR(base)	((uint32_t *)((base) + 0x18U))
+
+/*
+ *  å¶å¾¡ã¬ã¸ã¹ã¿ï¼SP804_CRï¼ã®è¨­å®å¤
+ */
+#define SP804_DISABLE			UINT_C(0x00)	/* ã¿ã¤ããã£ã¹ã¨ã¼ãã« */
+#define SP804_ENABLE			UINT_C(0x80)	/* ã¿ã¤ãã¤ãã¼ãã« */
+#define SP804_INT_ENABLE		UINT_C(0x20)	/* ã¿ã¤ãå²è¾¼ã¿ã¤ãã¼ãã« */
+#define SP804_MODE_FREERUN		UINT_C(0x00)	/* ããªã¼ã©ã³ãã³ã°ã¢ã¼ã */
+#define SP804_MODE_PERIODIC		UINT_C(0x40)	/* å¨æã¢ã¼ã */
+#define SP804_MODE_ONESHOT		UINT_C(0x01)	/* ã¯ã³ã·ã§ããã¢ã¼ã */
+#define SP804_SIZE_32			UINT_C(0x02)	/* 32ããã */
+#define SP804_PRESCALE_1		UINT_C(0x00)	/* ããªã¹ã±ã¼ã© Ã1 */
+#define SP804_PRESCALE_16		UINT_C(0x04)	/* ããªã¹ã±ã¼ã© Ã16 */
+#define SP804_PRESCALE_256		UINT_C(0x08)	/* ããªã¹ã±ã¼ã© Ã256 */
+
+#endif /* TOPPERS_SP804_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/start.S
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/start.S	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/start.S	(revision 270)
@@ -0,0 +1,165 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã«ã¼ãã«ç¨ã®ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼ã«ï¼ARMç¨ï¼
+ */
+	
+#define TOPPERS_MACRO_ONLY
+#define TOPPERS_ASM_MACRO
+#define UINT_C(val)			(val)		/* uint_tåã®å®æ°ãä½ããã¯ã­ */
+#define ULONG_C(val)		(val)		/* ulong_tåã®å®æ°ãä½ããã¯ã­ */
+#define CAST(type, val)		(val)		/* åã­ã£ã¹ããè¡ããã¯ã­ */
+#include "kernel_impl.h"
+#include "core_asm.inc"
+
+	ATEXT
+	AALIGN(2)
+	AGLOBAL(start)
+ALABEL(start)
+	/*
+	 *  ãã­ã»ããµã¢ã¼ãã®åæå
+	 *
+	 *  ã¹ã¼ããã¤ã¶ã¢ã¼ãï¼å
+¨å²è¾¼ã¿ã­ãã¯ç¶æ
+ã«åæåããï¼
+	 */
+	msr		cpsr_cxsf, #(CPSR_SVC_MODE AOR CPSR_INTLOCK)
+
+	/*
+	 *  ã¹ã¿ãã¯ãã¤ã³ã¿ã¨ãã¬ã¼ã ãã¤ã³ã¿ã®åæå
+	 */
+	ldr		r0, =_kernel_istkpt
+	ldr		sp, [r0]			/* ã¹ã¿ãã¯ãã¤ã³ã¿ï¼spï¼*/
+	mov		fp, #0				/* ARMã¢ã¼ãç¨ãã¬ã¼ã ãã¤ã³ã¿ï¼r11ï¼*/
+	mov		r7, #0				/* Thumbã¢ã¼ãç¨ãã¬ã¼ã ãã¤ã³ã¿ï¼r7ï¼*/
+
+	/*
+	 *  hardware_init_hookã®å¼åºãï¼0ã§ãªãå ´åï¼
+	 *
+	 *  ã¿ã¼ã²ãããã¼ãã¦ã§ã¢ã«ä¾å­ãã¦å¿
+è¦ãªåæåå¦çãããå ´åã¯ï¼
+	 *  hardware_init_hookã¨ããé¢æ°ãç¨æããï¼
+	 */
+	ldr		r0, =hardware_init_hook
+	cmp		r0, #0
+	movne	lr, pc
+	bxne	r0
+
+#ifndef TOPPERS_OMIT_BSS_INIT
+	/*
+	 *  bssã»ã¯ã·ã§ã³ã®ã¯ãªã¢
+	 *
+	 *  BSS_STARTããBSS_ENDã¾ã§ãã¼ã­ã¯ãªã¢ããï¼
+	 */
+	ldr		r0, =BSS_START
+	ldr		r2, =BSS_END
+	cmp		r0, r2
+	bhs		start_3
+	mov		r1, #0
+#ifdef TOPPERS_USE_STDLIB
+	sub		r2, r2, r0
+	bl		memset
+#else /* TOPPERS_USE_STDLIB */
+ALABEL(start_2)
+	str		r1, [r0], #4
+	cmp		r0, r2
+	blo		start_2
+#endif /* TOPPERS_USE_STDLIB */
+ALABEL(start_3)
+#endif /* TOPPERS_OMIT_BSS_INIT */
+
+#ifndef TOPPERS_OMIT_DATA_INIT
+	/*
+	 *  dataã»ã¯ã·ã§ã³ã®åæåï¼ROMåå¯¾å¿ï¼
+	 *
+	 *  DATA_STARTããDATA_ENDã¾ã§ã«ï¼IDATA_STARTä»¥éããã³ãã¼ããï¼
+	 *  IDATA_STARTããIDATA_ENDã¾ã§ãï¼DATA_STARTä»¥éã«ã³ãã¼ããï¼
+	 */
+	ldr		r0, =DATA_START
+	ldr		r2, =DATA_END
+	cmp		r0, r2
+	bhs		start_5
+	ldr		r1, =IDATA_START
+#ifdef TOPPERS_USE_STDLIB
+	sub		r2, r2, r0
+	bl		memcpy
+#else /* TOPPERS_USE_STDLIB */
+ALABEL(start_4)
+	ldr		r3, [r1], #4
+	str		r3, [r0], #4
+	cmp		r0, r2
+	blo		start_4
+#endif /* TOPPERS_USE_STDLIB */
+ALABEL(start_5)
+#endif /* TOPPERS_OMIT_DATA_INIT */
+
+	/*
+	 *  software_init_hookã®å¼åºãï¼0ã§ãªãå ´åï¼
+	 *
+	 *  ã½ããã¦ã§ã¢ç°å¢ï¼ç¹ã«ã©ã¤ãã©ãªï¼ã«ä¾å­ãã¦å¿
+è¦ãªåæåå¦çã
+	 *  ããå ´åã¯ï¼software_init_hookã¨ããé¢æ°ãç¨æããã°ããï¼
+	 */
+	ldr		r0, =software_init_hook
+	cmp		r0, #0
+	movne	lr, pc
+	bxne	r0
+
+	/*
+	 *  ã«ã¼ãã«ã®èµ·å
+	 */
+	b		sta_ker
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/tUartPL011.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/tUartPL011.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/tUartPL011.c	(revision 270)
@@ -0,0 +1,248 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ARM PrimCell UARTï¼PL011ï¼ç¨ ç°¡æSIOãã©ã¤ã
+ */
+
+#include <sil.h>
+#include "tUartPL011_tecsgen.h"
+#include "uart_pl011.h"
+
+/*
+ *  ããªããã£ããªéä¿¡ï¼åä¿¡é¢æ°
+ */
+
+/*
+ *  åä¿¡ãããã¡ã«æå­ããããï¼
+ */
+Inline bool_t
+uart_pl011_getready(CELLCB *p_cellcb)
+{
+	return((sil_rew_mem(UART_FR(ATTR_baseAddress)) & UART_FR_RXFE) == 0U);
+}
+
+/*
+ *  éä¿¡ãããã¡ã«ç©ºãããããï¼
+ */
+Inline bool_t
+uart_pl011_putready(CELLCB *p_cellcb)
+{
+	return((sil_rew_mem(UART_FR(ATTR_baseAddress)) & UART_FR_TXFF) == 0U);
+}
+
+/*
+ *  åä¿¡ããæå­ã®ååºã
+ */
+Inline char
+uart_pl011_getchar(CELLCB *p_cellcb)
+{
+	return((char) sil_rew_mem(UART_DR(ATTR_baseAddress)));
+}
+
+/*
+ *  éä¿¡ããæå­ã®æ¸è¾¼ã¿
+ */
+Inline void
+uart_pl011_putchar(CELLCB *p_cellcb, char c)
+{
+	sil_wrw_mem(UART_DR(ATTR_baseAddress), (uint32_t) c);
+}
+
+/*
+ *  ã·ãªã¢ã«I/Oãã¼ãã®ãªã¼ãã³
+ */
+void
+eSIOPort_open(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+
+	/*
+	 *  UARTããã£ã¹ã¨ã¼ãã«
+	 */
+	sil_wrw_mem(UART_CR(ATTR_baseAddress), 0U);
+
+	/*
+	 *  ã¨ã©ã¼ãã©ã°ãã¯ãªã¢
+	 */
+	sil_wrw_mem(UART_ECR(ATTR_baseAddress), 0U);
+
+	/*
+	 *  FIFOãç©ºã«ãã
+	 */
+	while (uart_pl011_getready(p_cellcb)) {
+		(void) uart_pl011_getchar(p_cellcb);
+	}
+
+	/*
+	 *  ãã¼ã¬ã¼ãã¨éä¿¡è¦æ ¼ãè¨­å®
+	 */
+	sil_wrw_mem(UART_IBRD(ATTR_baseAddress), ATTR_ibrd);
+	sil_wrw_mem(UART_FBRD(ATTR_baseAddress), ATTR_fbrd);
+	sil_wrw_mem(UART_LCR_H(ATTR_baseAddress), ATTR_lcr_h);
+		
+	/*
+	 *  UARTãã¤ãã¼ãã«
+	 */
+	sil_wrw_mem(UART_CR(ATTR_baseAddress),
+						UART_CR_UARTEN|UART_CR_TXE|UART_CR_RXE);
+}
+
+/*
+ *  ã·ãªã¢ã«I/Oãã¼ãã®ã¯ã­ã¼ãº
+ */
+void
+eSIOPort_close(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+
+	/*
+	 *  UARTããã£ã¹ã¨ã¼ãã«
+	 */
+	sil_wrw_mem(UART_CR(ATTR_baseAddress), 0U);
+}
+
+/*
+ *  ã·ãªã¢ã«I/Oãã¼ãã¸ã®æå­éä¿¡
+ */
+bool_t
+eSIOPort_putChar(CELLIDX idx, char c)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+
+	if (uart_pl011_putready(p_cellcb)){
+		uart_pl011_putchar(p_cellcb, c);
+		return(true);
+	}
+	return(false);
+}
+
+/*
+ *  ã·ãªã¢ã«I/Oãã¼ãããã®æå­åä¿¡
+ */
+int_t
+eSIOPort_getChar(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+
+	if (uart_pl011_getready(p_cellcb)) {
+		return((int_t)(uint8_t) uart_pl011_getchar(p_cellcb));
+	}
+	return(-1);
+}
+
+/*
+ *  ã·ãªã¢ã«I/Oãã¼ãããã®ã³ã¼ã«ããã¯ã®è¨±å¯
+ */
+void
+eSIOPort_enableCBR(CELLIDX idx, uint_t cbrtn)
+{
+	CELLCB		*p_cellcb = GET_CELLCB(idx);
+	uint32_t	reg;
+
+	reg = sil_rew_mem(UART_IMSC(ATTR_baseAddress));
+	switch (cbrtn) {
+	case SIOSendReady:
+		reg |= UART_IMSC_TXIM;
+		break;
+	case SIOReceiveReady:
+		reg |= UART_IMSC_RXIM;
+		break;
+	}
+	sil_wrw_mem(UART_IMSC(ATTR_baseAddress), reg);
+}
+
+/*
+ *  ã·ãªã¢ã«I/Oãã¼ãããã®ã³ã¼ã«ããã¯ã®ç¦æ­¢
+ */
+void
+eSIOPort_disableCBR(CELLIDX idx, uint_t cbrtn)
+{
+	CELLCB		*p_cellcb = GET_CELLCB(idx);
+	uint32_t	reg;
+
+	reg = sil_rew_mem(UART_IMSC(ATTR_baseAddress));
+	switch (cbrtn) {
+	case SIOSendReady:
+		reg &= ~UART_IMSC_TXIM;
+		break;
+	case SIOReceiveReady:
+		reg &= ~UART_IMSC_RXIM;
+		break;
+	}
+	sil_wrw_mem(UART_IMSC(ATTR_baseAddress), reg);
+}
+
+/*
+ *  ã·ãªã¢ã«I/Oãã¼ãã«å¯¾ããå²è¾¼ã¿å¦ç
+ */
+void
+eiISR_main(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+
+	if (uart_pl011_getready(p_cellcb)) {
+		/*
+		 *  åä¿¡éç¥ã³ã¼ã«ããã¯ã«ã¼ãã³ãå¼ã³åºãï¼
+		 */
+		ciSIOCBR_readyReceive();
+	}
+	if (uart_pl011_putready(p_cellcb)) {
+		/*
+		 *  éä¿¡å¯è½ã³ã¼ã«ããã¯ã«ã¼ãã³ãå¼ã³åºãï¼
+		 */
+		ciSIOCBR_readySend();
+	}
+}
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/tUartPL011.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/tUartPL011.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/tUartPL011.cdl	(revision 270)
@@ -0,0 +1,82 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ARM PrimCell UARTï¼PL011ï¼ç¨ ç°¡æSIOãã©ã¤ãã®ã³ã³ãã¼ãã³ãè¨è¿°
+ */
+
+/*
+ *  ARM PrimCell UARTï¼PL011ï¼ã«é¢ããå®ç¾©ã®ã¤ã³ãã¼ã
+ */
+import_C("uart_pl011.h");
+
+/*
+ *  ARM PrimCell UARTï¼PL011ï¼ç¨ ç°¡æSIOãã©ã¤ãã®ã»ã«ã¿ã¤ã
+ */
+celltype tUartPL011 {
+	entry	sSIOPort	eSIOPort;
+	call	siSIOCBR	ciSIOCBR;
+
+	entry	siHandlerBody	eiISR;
+
+	attr {
+		uintptr_t	baseAddress;	/* UARTã¬ã¸ã¹ã¿ã®ãã¼ã¹ã¢ãã¬ã¹ */
+		uint8_t		ibrd;			/* ãã¼ã¬ã¼ãï¼æ´æ°é¨ï¼ã¬ã¸ã¹ã¿ã®è¨­å®å¤ */
+		uint8_t		fbrd;			/* ãã¼ã¬ã¼ãï¼å°æ°é¨ï¼ã¬ã¸ã¹ã¿ã®è¨­å®å¤ */
+		uint8_t		lcr_h;			/* ã©ã¤ã³å¶å¾¡ã¬ã¸ã¹ã¿ã®è¨­å®å¤ */
+	};
+};
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/uart_pl011.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/uart_pl011.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/common/uart_pl011.h	(revision 270)
@@ -0,0 +1,111 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ARM PrimCell UARTï¼PL011ï¼ã«é¢ããå®ç¾©
+ */
+
+#ifndef TOPPERS_UART_PL011_H
+#define TOPPERS_UART_PL011_H
+
+/*
+ *  UARTã¬ã¸ã¹ã¿ã®çªå°ã®å®ç¾©
+ */
+#define UART_DR(base)		((uint32_t *)((base) + 0x00U))
+#define UART_RSR(base)		((uint32_t *)((base) + 0x04U))
+#define UART_ECR(base)		((uint32_t *)((base) + 0x04U))
+#define UART_FR(base)		((uint32_t *)((base) + 0x18U))
+#define UART_IBRD(base)		((uint32_t *)((base) + 0x24U))
+#define UART_FBRD(base)		((uint32_t *)((base) + 0x28U))
+#define UART_LCR_H(base)	((uint32_t *)((base) + 0x2cU))
+#define UART_CR(base)		((uint32_t *)((base) + 0x30U))
+#define UART_IFLS(base)		((uint32_t *)((base) + 0x34U))
+#define UART_IMSC(base)		((uint32_t *)((base) + 0x38U))
+#define UART_RIS(base)		((uint32_t *)((base) + 0x3cU))
+#define UART_MIS(base)		((uint32_t *)((base) + 0x40U))
+#define UART_ICR(base)		((uint32_t *)((base) + 0x44U))
+
+/*
+ *  ãã©ã°ã¬ã¸ã¹ã¿ï¼UART_FRï¼ã®åç
+§å¤
+ */
+#define UART_FR_RXFE		UINT_C(0x10)	/* åä¿¡ãããã¡ãç©º */
+#define UART_FR_TXFF		UINT_C(0x20)	/* éä¿¡ãããã¡ããã« */
+
+/*
+ *  ã©ã¤ã³å¶å¾¡ã¬ã¸ã¹ã¿ï¼UART_LCR_Hï¼ã®è¨­å®å¤
+ */
+#define UART_LCR_H_PEN		UINT_C(0x02)	/* ããªãã£ãç¨ãã */
+#define UART_LCR_H_EPS		UINT_C(0x04)	/* å¶æ°ããªãã£ã« */
+#define UART_LCR_H_STP2		UINT_C(0x08)	/* ã¹ããããããã2ãããã« */
+#define UART_LCR_H_FEN		UINT_C(0x10)	/* FIFOãæå¹ã« */
+#define UART_LCR_H_WLEN8	UINT_C(0x60)	/* ãã¼ã¿é·ã8ãããã« */
+
+/*
+ *  å¶å¾¡ã¬ã¸ã¹ã¿ï¼UART_CRï¼ã®è¨­å®å¤
+ */
+#define UART_CR_UARTEN	UINT_C(0x0001)		/* UARTãã¤ãã¼ãã«ã« */
+#define UART_CR_TXE		UINT_C(0x0100)		/* éä¿¡ãã¤ãã¼ãã«ã« */
+#define UART_CR_RXE		UINT_C(0x0200)		/* åä¿¡ãã¤ãã¼ãã«ã« */
+
+/*
+ *  å²è¾¼ã¿ãã¹ã¯ã»ããï¼ã¯ãªã¢ã¬ã¸ã¹ã¿ï¼UART_IMSCï¼ã®è¨­å®å¤
+ */
+#define UART_IMSC_RXIM	UINT_C(0x0010)		/* åä¿¡å²è¾¼ã¿ãã¹ã¯ */
+#define UART_IMSC_TXIM	UINT_C(0x0020)		/* éä¿¡å²è¾¼ã¿ãã¹ã¯ */
+
+#endif /* TOPPERS_UART_PL011_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/MANIFEST
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/MANIFEST	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/MANIFEST	(revision 270)
@@ -0,0 +1,20 @@
+PACKAGE asp3_arch_arm_gcc
+
+MANIFEST
+Makefile.chip
+chip_kernel.h
+chip_kernel.trb
+chip_kernel_impl.c
+chip_kernel_impl.h
+chip_rename.def
+chip_rename.h
+chip_stddef.h
+chip_sym.def
+chip_timer.c
+chip_timer.cfg
+chip_timer.h
+chip_unrename.h
+rza1.h
+scif.h
+tSCIF.c
+tSCIF.cdl
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/Makefile.chip
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/Makefile.chip	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/Makefile.chip	(revision 270)
@@ -0,0 +1,36 @@
+#
+#		Makefile ã®ãããä¾å­é¨ï¼RZ/A1ç¨ï¼
+#
+#  $Id: Makefile.chip 720 2016-04-01 22:16:17Z ertl-hiro $
+# 
+
+#
+#  ãããä¾å­é¨ãã£ã¬ã¯ããªåã®å®ç¾©
+#
+CHIPDIR = $(SRCDIR)/arch/$(CORE)_$(TOOL)/$(CHIP)
+
+#
+#  ã³ã³ãã¤ã«ãªãã·ã§ã³
+#
+INCLUDES := $(INCLUDES) -I$(CHIPDIR)
+COPTS := $(COPTS) -mcpu=cortex-a9
+LDFLAGS := $(LDFLAGS) -mcpu=cortex-a9
+CDEFS := $(CDEFS) -D__TARGET_ARCH_ARM=7
+
+#
+#  ã«ã¼ãã«ã«é¢ããå®ç¾©
+#
+KERNEL_DIRS := $(KERNEL_DIRS) $(CHIPDIR)
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS) gic_support.o
+KERNEL_COBJS := $(KERNEL_COBJS) chip_kernel_impl.o gic_kernel_impl.o \
+															chip_timer.o
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿é¢ä¿ã®å¤æ°ã®å®ç¾©
+#
+CFG_TABS := $(CFG_TABS) --symval-table $(CHIPDIR)/chip_sym.def
+
+#
+#  ã³ã¢ä¾å­é¨
+#
+include $(SRCDIR)/arch/$(CORE)_$(TOOL)/common/Makefile.core
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_kernel.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_kernel.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_kernel.h	(revision 270)
@@ -0,0 +1,122 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ *
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+/*
+ *		kernel.hã®ã¿ã¼ã²ããä¾å­é¨ï¼RZ/A1ç¨ï¼
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼kernel.hããã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡ã¤ã«
+ *  ããç´æ¥ã¤ã³ã¯ã«ã¼ããããã¨ã¯ãªãï¼ãã®ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ããã
+ *  åã«ï¼t_stddef.hãã¤ã³ã¯ã«ã¼ããããã®ã§ï¼ããã«ä¾å­ãã¦ãããï¼
+ */
+
+#ifndef TOPPERS_CHIP_KERNEL_H
+#define TOPPERS_CHIP_KERNEL_H
+
+/*
+ *  å²è¾¼ã¿åªå
+åº¦ã®ç¯å²
+ */
+#define TMIN_INTPRI		(-31)		/* å²è¾¼ã¿åªå
+åº¦ã®æå°å¤ï¼æé«å¤ï¼*/
+#define TMAX_INTPRI		(-1)		/* å²è¾¼ã¿åªå
+åº¦ã®æå¤§å¤ï¼æä½å¤ï¼*/
+
+/*
+ *  ã¿ã¼ã²ããå®ç¾©ã®å²è¾¼ã¿è¦æ±ã©ã¤ã³å±æ§
+ */
+#define TA_NEGEDGE		0x04U		/* ãã¬ãã£ãã¨ãã¸ããªã¬ */
+#define TA_POSEDGE		0x08U		/* ãã¸ãã£ãã¨ãã¸ããªã¬ */
+#define TA_BOTHEDGE		0x0cU		/* ä¸¡ã¨ãã¸ããªã¬ */
+
+/*
+ *  ãµãã¼ãã§ããæ©è½ã®å®ç¾©
+ *
+ *  ena_intï¼dis_intã¨ãªã¼ãã©ã³ãã³ãã©ããµãã¼ããããã¨ãã§ããï¼
+ */
+#define TOPPERS_TARGET_SUPPORT_ENA_INT		/* ena_int */
+#define TOPPERS_TARGET_SUPPORT_DIS_INT		/* dis_int */
+#define TOPPERS_TARGET_SUPPORT_OVRHDR
+
+/*
+ *  é«åè§£è½ã¿ã¤ãã®ã¿ã¤ãå¨æ
+ *
+ *  2^32 / 33.33â¦ãä¸¸ããå¤ã¨ããï¼
+ */
+#define TCYC_HRTCNT		128849019U
+
+/*
+ *  é«åè§£è½ã¿ã¤ãã®ã«ã¦ã³ãå¤ã®é²ã¿å¹
+
+ */
+#define TSTEP_HRTCNT	1U
+
+/*
+ *  ãªã¼ãã©ã³ãã³ãã©ã®æ®ããã­ã»ããµæéã«æå®ã§ããæå¤§å¤
+ *
+ *  ãã®å¤ãOSã¿ã¤ãã¸ã®è¨­å®å¤ã«å¤æãã¦ã¿ã¤ãã«è¨­å®ããå¾ï¼ã¿ã¤ãã®ç¾
+ *  å¨å¤ãèª­ã¿åºãã¦Î¼ç§åä½ã«å¤æã§ããå¤ã¨ãã¦ããï¼ã¿ã¤ãã®ç¾å¨å¤ã
+ *  Î¼ç§åä½ã«å¤æããæã«34ãå ããããï¼ä»¥ä¸ã®æ¡ä»¶ãæºããæå¤§ã®å¤ã¨
+ *  ããï¼
+ *		(TMAX_OVRTIM * 33 + TMAX_OVRTIM / 3 + 1) + 34 < 2^32
+ */
+#define TMAX_OVRTIM		128849017U
+
+/*
+ *  ã³ã¢ã§å
+±éãªå®ç¾©
+ */
+#include "core_kernel.h"
+
+#endif /* TOPPERS_CHIP_KERNEL_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_kernel.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_kernel.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_kernel.trb	(revision 270)
@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+# 
+#		ãã¹2ã®çæã¹ã¯ãªããã®ãããä¾å­é¨ï¼RZ/A1ç¨ï¼
+# 
+
+# 
+#  ä½¿ç¨ã§ããå²è¾¼ã¿çªå·ã¨ããã«å¯¾å¿ããå²è¾¼ã¿ãã³ãã©çªå·
+# 
+if $TOPPERS_RZA1H
+  $INTNO_VALID = [ *(0..586) ]
+else
+  $INTNO_VALID = [ *(0..537) ]
+end
+$INHNO_VALID = $INTNO_VALID
+
+#
+#  ã¿ã¼ã²ããå®ç¾©ã®å²è¾¼ã¿è¦æ±ã©ã¤ã³å±æ§
+#
+$TARGET_INTATR = $TA_NEGEDGE|$TA_POSEDGE|$TA_BOTHEDGE
+
+# 
+#  çæã¹ã¯ãªããã®ã³ã¢ä¾å­é¨
+# 
+IncludeTrb("core_kernel.trb")
+
+#
+#  å²è¾¼ã¿è¦æ±ã©ã¤ã³å±æ§ã«é¢ããã¿ã¼ã²ããä¾å­ã®ã¨ã©ã¼ãã§ãã¯
+#
+$cfgData[:CFG_INT].each do |key, params|
+  if $INTNO_IRQ0 <= key && key <= $INTNO_IRQ7
+    # IRQå²è¾¼ã¿ã®å ´å
+    #ï¼TA_EDGEãã»ããããã¦ããå ´åï¼
+    if (params[:intatr] & $TA_EDGE) != 0
+      error_illegal_sym("E_RSATR", params, :intatr, :intno)
+    end
+  else
+    # ãã®ä»ã®å²è¾¼ã¿ã®å ´å
+    #ï¼TA_NEGEDGEï¼TA_POSEDGEï¼TARGET_BOTHEDGEãã»ããããã¦ããå ´åï¼
+    if (params[:intatr] & $TARGET_INTATR) != 0
+      error_illegal_sym("E_RSATR", params, :intatr, :intno)
+    end
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_kernel_impl.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_kernel_impl.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_kernel_impl.c	(revision 270)
@@ -0,0 +1,220 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+/*
+ *		ã«ã¼ãã«ã®ãããä¾å­é¨ï¼RZ/A1ç¨ï¼
+ */
+
+#include "kernel_impl.h"
+#include "interrupt.h"
+
+/*
+ *  ãããä¾å­ã®åæå
+ */
+void
+chip_initialize(void)
+{
+	/*
+	 *  ã­ã£ãã·ã¥ããã£ã¹ã¨ã¼ãã«
+	 */
+	arm_disable_cache();
+
+	/*
+	 *  ã³ã¢ä¾å­ã®åæå
+	 */
+	core_initialize();
+
+	/*
+	 *  ã­ã£ãã·ã¥ãã¤ãã¼ãã«
+	 */
+	arm_enable_cache();
+
+	/*
+	 *  GICã®ãã£ã¹ããªãã¥ã¼ã¿ã®åæå
+	 */
+	gicd_initialize();
+
+	/*
+	 *  GICã®CPUã¤ã³ã¿ãã§ã¼ã¹ã®åæå
+	 */
+	gicc_initialize();
+
+	/*
+	 *  åå²äºæ¸¬ã®ç¡å¹åã¨ã¤ãã¼ãã«
+	 */
+	arm_invalidate_bp();
+	arm_enable_bp();
+}
+
+/*
+ *  ãããä¾å­é¨ã®çµäºå¦ç
+ */
+void
+chip_terminate(void)
+{
+	extern void    software_term_hook(void);
+	void (*volatile fp)(void) = software_term_hook;
+
+	/*
+	 *  software_term_hookã¸ã®ãã¤ã³ã¿ãï¼ä¸æ¦volatileæå®ã®ããfpã«ä»£
+	 *  å
+¥ãã¦ããä½¿ãã®ã¯ï¼0ã¨ã®æ¯è¼ãæé©åã§åé¤ãããªãããã«ããã
+	 *  ãã§ããï¼
+	 */
+	if (fp != 0) {
+		(*fp)();
+	}
+
+	/*
+	 *  GICã®CPUã¤ã³ã¿ãã§ã¼ã¹ã®çµäºå¦ç
+	 */
+	gicc_terminate();
+
+	/*
+	 *  GICã®ãã£ã¹ããªãã¥ã¼ã¿ã®çµäºå¦ç
+	 */
+	gicd_terminate();
+
+	/*
+	 *  ã³ã¢ä¾å­ã®çµäºå¦ç
+	 */
+	core_terminate();
+}
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®å±æ§ã®è¨­å®
+ *
+ *  ASPã«ã¼ãã«ã§ã®å©ç¨ãæ³å®ãã¦ï¼ãã©ã¡ã¼ã¿ã¨ã©ã¼ã¯ã¢ãµã¼ã·ã§ã³ã§ãã§ã
+ *  ã¯ãã¦ããï¼
+ */
+Inline void
+config_int(INTNO intno, ATR intatr, PRI intpri)
+{
+	assert(VALID_INTNO(intno));
+	assert(TMIN_INTPRI <= intpri && intpri <= TMAX_INTPRI);
+
+	/*
+	 *  å²è¾¼ã¿ãç¦æ­¢
+	 *
+	 *  å²è¾¼ã¿ãåãä»ããã¾ã¾ï¼ã¬ãã«ããªã¬ï¼ã¨ãã¸ããªã¬ã®è¨­å®ãï¼å²
+	 *  è¾¼ã¿åªå
+åº¦ã®è¨­å®ãè¡ãã®ã¯å±éºãªããï¼å²è¾¼ã¿å±æ§ã«ãããããï¼
+	 *  ä¸æ¦ãã¹ã¯ããï¼
+	 */
+	disable_int(intno);
+
+	/*
+	 *  å²è¾¼ã¿ãã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
+	 */
+#ifdef TOPPERS_SAFEG_SECURE
+	gicd_config_group(intno, 1U);
+#endif /* TOPPERS_SAFEG_SECURE */
+
+	if (INTNO_IRQ0 <= intno && intno <= INTNO_IRQ7) {
+		uint16_t	reg;
+
+		reg = sil_reh_mem(RZA1_ICR1);
+		reg &= ~(0x03U << ((intno - INTNO_IRQ0) * 2));
+		reg |= ((intatr >> 2) << ((intno - INTNO_IRQ0) * 2));
+		sil_wrh_mem(RZA1_ICR1, reg);
+	}
+
+	if ((intatr & TA_EDGE) != 0U) {
+#ifdef GIC_ARM11MPCORE
+		gicd_config(intno, GICD_ICFGRn_EDGE|GICD_ICFGRn_1_N);
+#else /* GIC_ARM11MPCORE */
+		gicd_config(intno, GICD_ICFGRn_EDGE);
+#endif /* GIC_ARM11MPCORE */
+		clear_int(intno);
+	}
+	else {
+#ifdef GIC_ARM11MPCORE
+		gicd_config(intno, GICD_ICFGRn_LEVEL|GICD_ICFGRn_1_N);
+#else /* GIC_ARM11MPCORE */
+		gicd_config(intno, GICD_ICFGRn_LEVEL);
+#endif /* GIC_ARM11MPCORE */
+	}
+
+	/*
+	 *  å²è¾¼ã¿åªå
+åº¦ã¨ã¿ã¼ã²ãããã­ã»ããµãè¨­å®
+	 */
+	gicd_set_priority(intno, INT_IPM(intpri));
+	gicd_set_target(intno, 1U << arm_prc_index());
+
+	/*
+	 * å²è¾¼ã¿ãè¨±å¯
+	 */
+	if ((intatr & TA_ENAINT) != 0U) {
+		enable_int(intno);
+	}
+}
+
+/*
+ *  å²è¾¼ã¿ç®¡çæ©è½ã®åæå
+ */
+void
+initialize_interrupt(void)
+{
+	uint_t			i;
+	const INTINIB	*p_intinib;
+
+	for (i = 0; i < tnum_cfg_intno; i++) {
+		p_intinib = &(intinib_table[i]);
+		config_int(p_intinib->intno, p_intinib->intatr, p_intinib->intpri);
+	}
+}
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_kernel_impl.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_kernel_impl.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_kernel_impl.h	(revision 270)
@@ -0,0 +1,112 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+/*
+ *		kernel_impl.hã®ãããä¾å­é¨ï¼RZ/A1ç¨ï¼
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼target_kernel_impl.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯
+ *  ã«ã¼ãããããã¡ã¤ã«ï¼ã®ã¿ããã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡ã¤ã«ãã
+ *  ç´æ¥ã¤ã³ã¯ã«ã¼ããã¦ã¯ãªããªãï¼
+ */
+
+#ifndef TOPPERS_CHIP_KERNEL_IMPL_H
+#define TOPPERS_CHIP_KERNEL_IMPL_H
+
+/*
+ *  RZ/A1ã®ãã¼ãã¦ã§ã¢è³æºã®å®ç¾©
+ */
+#include "rza1.h"
+
+/*
+ *  MMUã®ä½¿ç¨ã«é¢ããè¨­å®
+ */
+#define USE_ARM_MMU
+#define USE_ARM_SSECTION
+
+/*
+ *  GICã®ãã£ã¹ããªãã¥ã¼ã¿ã®å²è¾¼ã¿ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¬ã¸ã¹ã¿ã«è¨­å®
+ *  ããå¤ã«é¢ããå®ç¾©
+ */
+#define GIC_ARM11MPCORE
+
+/*
+ *  GICä¾å­é¨ã®å²è¾¼ã¿ç®¡çæ©è½ã®åæåã¯ä½¿ç¨ããªãï¼
+ */
+#define OMIT_GIC_INITIALIZE_INTERRUPT
+
+/*
+ *  GICã«é¢ããå®ç¾©ï¼ã³ã¢ã§å
+±éãªå®ç¾©
+ *
+ *  core_kernel_impl.hã¯ï¼gic_kernel_impl.hããã¤ã³ã¯ã«ã¼ããããï¼
+ */
+#include "gic_kernel_impl.h"
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ãããä¾å­ã®åæå
+ */
+extern void chip_initialize(void);
+
+/*
+ *  ãããä¾å­ã®çµäºå¦ç
+ */
+extern void chip_terminate(void);
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_CHIP_KERNEL_IMPL_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_rename.def
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_rename.def	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_rename.def	(revision 270)
@@ -0,0 +1,17 @@
+# chip_kernel_impl.c
+chip_initialize
+chip_terminate
+
+# chip_timer.c
+target_hrt_initialize
+target_hrt_terminate
+target_hrt_set_event
+target_hrt_raise_event
+target_hrt_handler
+target_ovrtimer_initialize
+target_ovrtimer_terminate
+target_ovrtimer_stop
+target_ovrtimer_get_current
+target_ovrtimer_handler
+
+INCLUDE "core"
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_rename.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_rename.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_rename.h	(revision 270)
@@ -0,0 +1,29 @@
+/* This file is generated from chip_rename.def by genrename. */
+
+#ifndef TOPPERS_CHIP_RENAME_H
+#define TOPPERS_CHIP_RENAME_H
+
+/*
+ *  chip_kernel_impl.c
+ */
+#define chip_initialize				_kernel_chip_initialize
+#define chip_terminate				_kernel_chip_terminate
+
+/*
+ *  chip_timer.c
+ */
+#define target_hrt_initialize		_kernel_target_hrt_initialize
+#define target_hrt_terminate		_kernel_target_hrt_terminate
+#define target_hrt_set_event		_kernel_target_hrt_set_event
+#define target_hrt_raise_event		_kernel_target_hrt_raise_event
+#define target_hrt_handler			_kernel_target_hrt_handler
+#define target_ovrtimer_initialize	_kernel_target_ovrtimer_initialize
+#define target_ovrtimer_terminate	_kernel_target_ovrtimer_terminate
+#define target_ovrtimer_stop		_kernel_target_ovrtimer_stop
+#define target_ovrtimer_get_current	_kernel_target_ovrtimer_get_current
+#define target_ovrtimer_handler		_kernel_target_ovrtimer_handler
+
+
+#include "core_rename.h"
+
+#endif /* TOPPERS_CHIP_RENAME_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_stddef.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_stddef.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_stddef.h	(revision 270)
@@ -0,0 +1,86 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *
+ *  Copyright (C) 2007 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+/*
+ *		t_stddef.hã®ãããä¾å­é¨ï¼RZ/A1ç¨ï¼
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼target_stddef.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯ã«ã¼ã
+ *  ããããã¡ã¤ã«ï¼ã®ã¿ããã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡ã¤ã«ããç´æ¥ã¤
+ *  ã³ã¯ã«ã¼ããã¦ã¯ãªããªãï¼
+ */
+
+#ifndef TOPPERS_CHIP_STDDEF_H
+#define TOPPERS_CHIP_STDDEF_H
+
+/*
+ *  ã¿ã¼ã²ãããè­å¥ããããã®ãã¯ã­ã®å®ç¾©
+ */
+#define TOPPERS_RZA1					/* ãããç¥ç§° */
+
+/*
+ *  ããããéå®ãããã¯ã­ãå®ç¾©ããã¦ãããã®ãã§ãã¯
+ */
+#if !defined(TOPPERS_RZA1H) && !defined(TOPPERS_RZA1L)
+#error Either TOPPERS_RZA1H or TOPPERS_RZA1L must be defined.
+#endif
+
+/*
+ *  ã³ã¢ã§å
+±éãªå®ç¾©
+ */
+#include "core_stddef.h"
+
+#endif /* TOPPERS_CHIP_STDDEF_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_sym.def
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_sym.def	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_sym.def	(revision 270)
@@ -0,0 +1,7 @@
+TARGET_RZA1H,true,bool,defined(TARGET_RZA1H)
+TARGET_RZA1L,true,bool,defined(TARGET_RZA1L)
+TA_NEGEDGE
+TA_POSEDGE
+TA_BOTHEDGE
+INTNO_IRQ0
+INTNO_IRQ7
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_timer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_timer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_timer.c	(revision 270)
@@ -0,0 +1,259 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã¿ã¤ããã©ã¤ãï¼RZ/A1 OSã¿ã¤ãç¨ï¼
+ *
+ *  RZ/A1ã¯2ãã£ã³ãã«ã®OSã¿ã¤ããæã¤ãï¼ãã®å
+ã®1ã¤ãç¨ãã¦é«åè§£è½ã¿
+ *  ã¤ããï¼ãã1ã¤ãç¨ãã¦ãªã¼ãã©ã³ã¿ã¤ããå®ç¾ããï¼
+ */
+
+#include "kernel_impl.h"
+#include "time_event.h"
+#ifdef TOPPERS_SUPPORT_OVRHDR
+#include "overrun.h"
+#endif /* TOPPERS_SUPPORT_OVRHDR */
+#include "target_timer.h"
+#include <sil.h>
+#include "rza1.h"
+
+/*
+ *  ã¿ã¤ãã®èµ·åå¦ç
+ */
+void
+target_hrt_initialize(intptr_t exinf)
+{
+	/*
+	 *  OSã¿ã¤ããããªã¼ã©ã³ãã³ã°ã³ã³ãã¢ã¢ã¼ãã«è¨­å®ããï¼
+	 */
+	sil_wrb_mem(OSTM_CTL(OSTM0_BASE), OSTM_CTL_FRCMP);
+
+	/*
+	 *  OSã¿ã¤ãã®è¨­å®å¤ãæå¤§å¤ã«ãã¦ããï¼
+	 */
+	sil_wrw_mem(OSTM_CMP(OSTM0_BASE), 0xffffffff);
+
+	/*
+	 *  OSã¿ã¤ããåä½éå§ããï¼
+	 */
+	sil_wrb_mem(OSTM_TS(OSTM0_BASE), OSTM_TS_START);
+
+	/*
+	 *  ã¿ã¤ãå²è¾¼ã¿è¦æ±ãã¯ãªã¢ããï¼
+	 */
+	clear_int(INTNO_OSTM0);
+}
+
+/*
+ *  ã¿ã¤ãã®åæ­¢å¦ç
+ */
+void
+target_hrt_terminate(intptr_t exinf)
+{
+	/*
+	 *  OSã¿ã¤ããåæ­¢ããï¼
+	 */
+	sil_wrb_mem(OSTM_TT(OSTM0_BASE), OSTM_TT_STOP);
+
+	/*
+	 *  ã¿ã¤ãå²è¾¼ã¿è¦æ±ãã¯ãªã¢ããï¼
+	 */
+	clear_int(INTNO_OSTM0);
+}
+
+/*
+ *  é«åè§£è½ã¿ã¤ãã¸ã®å²è¾¼ã¿ã¿ã¤ãã³ã°ã®è¨­å®
+ */
+void
+target_hrt_set_event(HRTCNT hrtcnt)
+{
+	uint32_t	cnt = hrtcnt * 33 + hrtcnt / 3 + 1;
+	uint32_t	current;
+
+	/*
+	 *  ç¾å¨ã®ã«ã¦ã³ãå¤ãèª­ã¿ï¼hrtcntå¾ã«å²è¾¼ã¿ãçºçããããã«è¨­å®ããï¼
+	 */
+	current = sil_rew_mem(OSTM_CNT(OSTM0_BASE));
+	sil_wrw_mem(OSTM_CMP(OSTM0_BASE), current + cnt);
+
+	/*
+	 *  ä¸ã§ç¾å¨ã®ã«ã¦ã³ãå¤ãèª­ãã§ä»¥éã«ï¼cntä»¥ä¸ã«ã¦ã³ãã¢ãããã¦ã
+	 *  ãå ´åã«ã¯ï¼å²è¾¼ã¿ãçºçãããï¼
+	 */
+	if (sil_rew_mem(OSTM_CNT(OSTM0_BASE)) - current >= cnt) {
+		raise_int(INTNO_OSTM0);
+	}
+}
+
+/*
+ *  é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®è¦æ±
+ */
+void
+target_hrt_raise_event(void)
+{
+	raise_int(INTNO_OSTM0);
+}
+
+/*
+ *  ã¿ã¤ãå²è¾¼ã¿ãã³ãã©
+ */
+void
+target_hrt_handler(void)
+{
+	/*
+	 *  é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ãå¦çããï¼
+	 */
+	signal_time();
+}
+/*
+ *  ãªã¼ãã©ã³ã¿ã¤ããã©ã¤ã
+ */
+#ifdef TOPPERS_SUPPORT_OVRHDR
+
+/*
+ *  ãªã¼ãã©ã³ã¿ã¤ãã®åæåå¦ç
+ */
+void
+target_ovrtimer_initialize(intptr_t exinf)
+{
+	/*
+	 *  OSã¿ã¤ããã¤ã³ã¿ã¼ãã«ã¿ã¤ãã¢ã¼ãã«è¨­å®ããï¼
+	 */
+	sil_wrb_mem(OSTM_CTL(OSTM1_BASE), OSTM_CTL_INTERVAL);
+
+	/*
+	 *  ãªã¼ãã©ã³ã¿ã¤ãå²è¾¼ã¿è¦æ±ãã¯ãªã¢ããï¼
+	 */
+	clear_int(INTNO_OSTM1);
+}
+
+/*
+ *  ãªã¼ãã©ã³ã¿ã¤ãã®åæ­¢å¦ç
+ */
+void
+target_ovrtimer_terminate(intptr_t exinf)
+{
+	/*
+	 *  OSã¿ã¤ããåæ­¢ããï¼
+	 */
+	sil_wrb_mem(OSTM_TT(OSTM1_BASE), OSTM_TT_STOP);
+
+	/*
+	 *  ãªã¼ãã©ã³ã¿ã¤ãå²è¾¼ã¿è¦æ±ãã¯ãªã¢ããï¼
+	 */
+	clear_int(INTNO_OSTM1);
+}
+
+/*
+ *  ãªã¼ãã©ã³ã¿ã¤ãã®åæ­¢
+ */
+PRCTIM
+target_ovrtimer_stop(void)
+{
+	uint32_t	cnt;
+
+	/*
+	 *  OSã¿ã¤ããåæ­¢ããï¼
+	 */
+	sil_wrb_mem(OSTM_TT(OSTM1_BASE), OSTM_TT_STOP);
+
+	if (probe_int(INTNO_OSTM1)) {
+		/*
+		 *  å²è¾¼ã¿è¦æ±ãçºçãã¦ããå ´å
+		 */
+		clear_int(INTNO_OSTM1);
+		return(0U);
+	}
+	else {
+		cnt = sil_rew_mem(OSTM_CNT(OSTM1_BASE));
+		return((PRCTIM)((cnt + 34) / 5 * 3 / 20));
+	}
+}
+
+/*
+ *  ãªã¼ãã©ã³ã¿ã¤ãã®ç¾å¨å¤ã®èª­åºã
+ */
+PRCTIM
+target_ovrtimer_get_current(void)
+{
+	uint32_t	cnt;
+
+	if (probe_int(INTNO_OSTM1)) {
+		/*
+		 *  å²è¾¼ã¿è¦æ±ãçºçãã¦ããå ´å
+		 */
+		return(0U);
+	}
+	else {
+		cnt = sil_rew_mem(OSTM_CNT(OSTM1_BASE));
+		return((PRCTIM)((cnt + 34) / 5 * 3 / 20));
+	}
+}
+
+/*
+ *  ãªã¼ãã©ã³ã¿ã¤ãå²è¾¼ã¿ãã³ãã©
+ *
+ *  ãã®ã«ã¼ãã³ã«æ¥ãã¾ã§ã«ï¼target_ovrtimer_stopãå¼ã°ãã¦ããããï¼
+ *  OSã¿ã¤ããåæ­¢ããå¿
+è¦ã¯ãªãï¼
+ */
+void
+target_ovrtimer_handler(void)
+{
+	call_ovrhdr();					/* ãªã¼ãã©ã³ãã³ãã©ã®èµ·åå¦ç */
+}
+
+#endif /* TOPPERS_SUPPORT_OVRHDR */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_timer.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_timer.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_timer.cfg	(revision 270)
@@ -0,0 +1,23 @@
+/*
+ *		ã¿ã¤ããã©ã¤ãã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ *
+ *  $Id$
+ */
+
+/*
+ *  é«åè§£è½ã¿ã¤ããã©ã¤ã
+ */
+ATT_INI({ TA_NULL, 0, _kernel_target_hrt_initialize });
+ATT_TER({ TA_NULL, 0, _kernel_target_hrt_terminate });
+CFG_INT(INTNO_TIMER, { TA_ENAINT|INTATR_TIMER, INTPRI_TIMER });
+DEF_INH(INHNO_TIMER, { TA_NULL, _kernel_target_hrt_handler });
+
+/*
+ *  ãªã¼ãã©ã³ã¿ã¤ããã©ã¤ã
+ */
+#ifdef TOPPERS_SUPPORT_OVRHDR
+ATT_INI({ TA_NULL, 0, _kernel_target_ovrtimer_initialize });
+ATT_TER({ TA_NULL, 0, _kernel_target_ovrtimer_terminate });
+CFG_INT(INTNO_OVRTIMER, { TA_ENAINT|INTATR_OVRTIMER, INTPRI_OVRTIMER });
+DEF_INH(INHNO_OVRTIMER, { TA_NULL, _kernel_target_ovrtimer_handler });
+#endif /* TOPPERS_SUPPORT_OVRHDR */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_timer.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_timer.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_timer.h	(revision 270)
@@ -0,0 +1,219 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã¿ã¤ããã©ã¤ãï¼RZ/A1 OSã¿ã¤ãç¨ï¼
+ *
+ *  RZ/A1ã¯2ãã£ã³ãã«ã®OSã¿ã¤ããæã¤ãï¼ãã®å
+ã®1ã¤ãç¨ãã¦é«åè§£è½ã¿
+ *  ã¤ããï¼ãã1ã¤ãç¨ãã¦ãªã¼ãã©ã³ã¿ã¤ããå®ç¾ããï¼
+ */
+
+#ifndef TOPPERS_CHIP_TIMER_H
+#define TOPPERS_CHIP_TIMER_H
+
+#include <sil.h>
+#include "rza1.h"
+
+/*
+ *  ã¿ã¤ãå²è¾¼ã¿ãã³ãã©ç»é²ã®ããã®å®æ°
+ */
+#define INHNO_TIMER		INTNO_OSTM0			/* å²è¾¼ã¿ãã³ãã©çªå· */
+#define INTNO_TIMER		INTNO_OSTM0			/* å²è¾¼ã¿çªå· */
+#define INTPRI_TIMER	(TMAX_INTPRI - 1)	/* å²è¾¼ã¿åªå
+åº¦ */
+#define INTATR_TIMER	TA_EDGE				/* å²è¾¼ã¿å±æ§ */
+
+/*
+ *  ãªã¼ãã©ã³ã¿ã¤ãå²è¾¼ã¿ãã³ãã©ç»é²ã®ããã®å®æ°
+ */
+#ifdef TOPPERS_SUPPORT_OVRHDR
+#define INHNO_OVRTIMER		INTNO_OSTM1			/* å²è¾¼ã¿ãã³ãã©çªå· */
+#define INTNO_OVRTIMER		INTNO_OSTM1			/* å²è¾¼ã¿çªå· */
+#define INTPRI_OVRTIMER		TMAX_INTPRI			/* å²è¾¼ã¿åªå
+åº¦ */
+#define INTATR_OVRTIMER		TA_EDGE				/* å²è¾¼ã¿å±æ§ */
+#endif /* TOPPERS_SUPPORT_OVRHDR */
+
+/*
+ *  OSã¿ã¤ãã®å¨æ³¢æ°ã®æ³å®å¤ã®ãã§ãã¯
+ *
+ *  ç¾å¨ã®å®è£
+ã¯ï¼ã¯ã­ãã¯ã33.33â¦MHzã®å ´åã®ã¿ã«å¯¾å¿ãã¦ããï¼
+ */
+#if OSTM_CLK != 33333333UL
+#error Unsupported OS time clock.
+#endif /* OSTM_CLK != 33333333UL */
+
+/*
+ *  OSã¿ã¤ãã¬ã¸ã¹ã¿ã®çªå°ã®å®ç¾©
+ */
+#define OSTM_CMP(base)		((uint32_t *)(base + 0x00U))
+#define OSTM_CNT(base)		((uint32_t *)(base + 0x04U))
+#define OSTM_TE(base)		((uint8_t *)(base + 0x10U))
+#define OSTM_TS(base)		((uint8_t *)(base + 0x14U))
+#define OSTM_TT(base)		((uint8_t *)(base + 0x18U))
+#define OSTM_CTL(base)		((uint8_t *)(base + 0x20U))
+
+/*
+ *  OSã¿ã¤ã ã«ã¦ã³ãéå§ããªã¬ã¬ã¸ã¹ã¿ã®è¨­å®å¤ã®å®ç¾©
+ */
+#define OSTM_TS_START		0x01U
+
+/*
+ *  OSã¿ã¤ã ã«ã¦ã³ãåæ­¢ããªã¬ã¬ã¸ã¹ã¿ã®è¨­å®å¤ã®å®ç¾©
+ */
+#define OSTM_TT_STOP		0x01U
+
+/*
+ *  OSã¿ã¤ã å¶å¾¡ã¬ã¸ã¹ã¿ã®è¨­å®å¤ã®å®ç¾©
+ */
+#define OSTM_CTL_INTERVAL	0x00U		/* ã¤ã³ã¿ã¼ãã«ã¿ã¤ãã¢ã¼ã */
+#define OSTM_CTL_FRCMP		0x02U		/* ããªã¼ã©ã³ãã³ã°ã³ã³ãã¢ã¢ã¼ã */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  é«åè§£è½ã¿ã¤ãã®èµ·åå¦ç
+ */
+extern void	target_hrt_initialize(intptr_t exinf);
+
+/*
+ *  é«åè§£è½ã¿ã¤ãã®åæ­¢å¦ç
+ */
+extern void	target_hrt_terminate(intptr_t exinf);
+
+/*
+ *  é«åè§£è½ã¿ã¤ãã®ç¾å¨ã®ã«ã¦ã³ãå¤ã®èª­åºã
+ */
+Inline HRTCNT
+target_hrt_get_current(void)
+{
+	uint32_t	cnt, cnt1;
+
+	cnt = sil_rew_mem(OSTM_CNT(OSTM0_BASE));
+
+	/* Î¼ç§åä½ã«å¤æï¼ã¯ã­ãã¯ã33.33â¦MHzã§ããåæï¼*/
+	cnt1 = cnt / 1000000000;
+	return((HRTCNT)((cnt - cnt1 * 999999999) * 3 / 100 + cnt1 * 30000000));
+}
+
+/*
+ *  é«åè§£è½ã¿ã¤ãã¸ã®å²è¾¼ã¿ã¿ã¤ãã³ã°ã®è¨­å®
+ *
+ *  é«åè§£è½ã¿ã¤ããï¼hrtcntã§æå®ããå¤ã«ã¦ã³ãã¢ãããããå²è¾¼ã¿ãçº
+ *  çãããããã«è¨­å®ããï¼
+ */
+extern void target_hrt_set_event(HRTCNT hrtcnt);
+
+/*
+ *  é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®è¦æ±
+ */
+extern  void target_hrt_raise_event(void);
+
+/*
+ *  å²è¾¼ã¿ã¿ã¤ãã³ã°ã«æå®ããæå¤§å¤
+ */
+#define HRTCNT_BOUND	100000002U
+
+/*
+ *  é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ãã³ãã©
+ */
+extern void	target_hrt_handler(void);
+
+#ifdef TOPPERS_SUPPORT_OVRHDR
+
+/*
+ *  ãªã¼ãã©ã³ã¿ã¤ãã®åæåå¦ç
+ */
+extern void target_ovrtimer_initialize(intptr_t exinf);
+
+/*
+ *  ãªã¼ãã©ã³ã¿ã¤ãã®åæ­¢å¦ç
+ */
+extern void target_ovrtimer_terminate(intptr_t exinf);
+
+/*
+ *  ãªã¼ãã©ã³ã¿ã¤ãã®åä½éå§
+ */
+Inline void
+target_ovrtimer_start(PRCTIM ovrtim)
+{
+	uint32_t	cnt = ovrtim * 33 + ovrtim / 3 + 1;
+
+	sil_wrw_mem(OSTM_CMP(OSTM1_BASE), cnt);
+	sil_wrb_mem(OSTM_TS(OSTM1_BASE), OSTM_TS_START);
+}
+
+/*
+ *  ãªã¼ãã©ã³ã¿ã¤ãã®åæ­¢
+ */
+extern PRCTIM target_ovrtimer_stop(void);
+
+/*
+ *  ãªã¼ãã©ã³ã¿ã¤ãã®ç¾å¨å¤ã®èª­åºã
+ */
+extern PRCTIM target_ovrtimer_get_current(void);
+
+/*
+ *  ãªã¼ãã©ã³ã¿ã¤ãå²è¾¼ã¿ãã³ãã©
+ */
+extern void	target_ovrtimer_handler(void);
+
+#endif /* TOPPERS_SUPPORT_OVRHDR */
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_CHIP_TIMER_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_unrename.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_unrename.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/chip_unrename.h	(revision 270)
@@ -0,0 +1,30 @@
+/* This file is generated from chip_rename.def by genrename. */
+
+/* This file is included only when chip_rename.h has been included. */
+#ifdef TOPPERS_CHIP_RENAME_H
+#undef TOPPERS_CHIP_RENAME_H
+
+/*
+ *  chip_kernel_impl.c
+ */
+#undef chip_initialize
+#undef chip_terminate
+
+/*
+ *  chip_timer.c
+ */
+#undef target_hrt_initialize
+#undef target_hrt_terminate
+#undef target_hrt_set_event
+#undef target_hrt_raise_event
+#undef target_hrt_handler
+#undef target_ovrtimer_initialize
+#undef target_ovrtimer_terminate
+#undef target_ovrtimer_stop
+#undef target_ovrtimer_get_current
+#undef target_ovrtimer_handler
+
+
+#include "core_unrename.h"
+
+#endif /* TOPPERS_CHIP_RENAME_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/rza1.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/rza1.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/rza1.h	(revision 270)
@@ -0,0 +1,306 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+/*
+ *		RZ/A1ã®ãã¼ãã¦ã§ã¢è³æºã®å®ç¾©
+ */
+
+#ifndef TOPPERS_RZA1_H
+#define TOPPERS_RZA1_H
+
+#include <sil.h>
+
+/*
+ *  åã­ã£ã¹ããè¡ããã¯ã­ã®å®ç¾©
+ */
+#ifndef CAST
+#define CAST(type, val)		((type)(val))
+#endif /* CAST */
+
+/*
+ *  ã¡ã¢ãªãããã®å®ç¾©ï¼MMUã«è¨­å®ããããã«å¿
+è¦ï¼
+ */
+#define SPI_ADDR		0x18000000		/* ã·ãªã¢ã«ãã©ãã·ã¥ã¡ã¢ãª */
+#define SPI_SIZE		0x08000000		/* 128MB */
+
+#define SRAM_ADDR		0x20000000		/* å
+èµRAM */
+#ifdef TOPPERS_RZA1H
+#define SRAM_SIZE		0x00a00000		/* 10MB */
+#else /* TOPPERS_RZA1H */
+#define SRAM_SIZE		0x00300000		/* 3MB */
+#endif /* TOPPERS_RZA1H */
+
+#define IO1_ADDR		0x3fe00000		/* I/Oé åï¼äºç´é åãå«ãï¼*/
+#define IO1_SIZE		0x00200000		/* 2MB */
+#define IO2_ADDR		0xe8000000		/* I/Oé åï¼äºç´é åãå«ãï¼*/
+#define IO2_SIZE		0x18000000		/* 384MB */
+
+/*
+ *  åã¯ã­ãã¯å¨æ³¢æ°ã®å®ç¾©
+ */
+#define OSTM_CLK		RZA1_CLK_P0
+#define SCIF_CLK		RZA1_CLK_P1
+
+/*
+ *  MPCore Private Memory Regionã®å
+é ­çªå°
+ */
+#define MPCORE_PMR_BASE		0xf0000000
+
+/*
+ *  GICä¾å­é¨ãä½¿ç¨ããããã®å®ç¾©
+ */
+#ifndef GIC_TNUM_INTNO
+#ifdef TOPPERS_RZA1H
+#define GIC_TNUM_INTNO		UINT_C(587)
+#else /* TOPPERS_RZA1H */
+#define GIC_TNUM_INTNO		UINT_C(538)
+#endif /* TOPPERS_RZA1H */
+#endif /* GIC_TNUM_INT */
+
+/*
+ *  å²è¾¼ã¿ã³ã³ãã­ã¼ã©ã®ãã¼ã¹ã¢ãã¬ã¹ã¨ã¬ã¸ã¹ã¿ï¼RZ/A1åºæã®ãã®ï¼
+ */
+#define GICC_BASE			0xe8202000
+#define GICD_BASE			0xe8201000
+
+#define RZA1_ICR0			CAST(uint16_t *, 0xfcfef800)
+#define RZA1_ICR1			CAST(uint16_t *, 0xfcfef802)
+#define RZA1_IRQRR			CAST(uint16_t *, 0xfcfef804)
+
+/*
+ *  OSã¿ã¤ãã®ãã¼ã¹ã¢ãã¬ã¹
+ */
+#define OSTM0_BASE			0xfcfec000
+#define OSTM1_BASE			0xfcfec400
+
+/*
+ *  L2ã­ã£ãã·ã¥ã³ã³ãã­ã¼ã©ï¼PL310ï¼ã®ãã¼ã¹ã¢ãã¬ã¹
+ */
+#define PL310_BASE			0x3ffff000
+
+/*
+ *  ã¯ã­ãã¯ãã«ã¹ã¸ã§ãã¬ã¼ã¿ã®ãã¼ã¹ã¢ãã¬ã¹ã¨ã¬ã¸ã¹ã¿
+ */
+#define RZA1_CPG_BASE		0xfcfe0000
+#define RZA1_FRQCR			CAST(uint16_t *, RZA1_CPG_BASE + 0x010)
+#define RZA1_FRQCR2			CAST(uint16_t *, RZA1_CPG_BASE + 0x014)
+
+/*
+ *  ãã¹ã¹ãã¼ãã³ã³ãã­ã¼ã©ã®ãã¼ã¹ã¢ãã¬ã¹ã¨ã¬ã¸ã¹ã¿
+ */
+#define RZA1_BSC_BASE		0x3FFFC000
+#define RZA1_CMNCR			CAST(uint32_t *, RZA1_BSC_BASE)
+#define RZA1_CS0BCR			CAST(uint32_t *, RZA1_BSC_BASE + 0x0004)
+#define RZA1_CS1BCR			CAST(uint32_t *, RZA1_BSC_BASE + 0x0008)
+#define RZA1_CS2BCR			CAST(uint32_t *, RZA1_BSC_BASE + 0x000C)
+#define RZA1_CS3BCR			CAST(uint32_t *, RZA1_BSC_BASE + 0x0010)
+#define RZA1_CS4BCR			CAST(uint32_t *, RZA1_BSC_BASE + 0x0014)
+#define RZA1_CS5BCR			CAST(uint32_t *, RZA1_BSC_BASE + 0x0018)
+#define RZA1_CS0WCR			CAST(uint32_t *, RZA1_BSC_BASE + 0x0028)
+#define RZA1_CS1WCR			CAST(uint32_t *, RZA1_BSC_BASE + 0x002C)
+#define RZA1_CS2WCR			CAST(uint32_t *, RZA1_BSC_BASE + 0x0030)
+#define RZA1_CS3WCR			CAST(uint32_t *, RZA1_BSC_BASE + 0x0034)
+#define RZA1_CS4WCR			CAST(uint32_t *, RZA1_BSC_BASE + 0x0038)
+#define RZA1_CS5WCR			CAST(uint32_t *, RZA1_BSC_BASE + 0x003C)
+#define RZA1_SDCR			CAST(uint32_t *, RZA1_BSC_BASE + 0x004C)
+#define RZA1_RTCSR			CAST(uint32_t *, RZA1_BSC_BASE + 0x0050)
+#define RZA1_RTCNT			CAST(uint32_t *, RZA1_BSC_BASE + 0x0054)
+#define RZA1_RTCOR			CAST(uint32_t *, RZA1_BSC_BASE + 0x0058)
+
+/*
+ *  ã·ãªã¢ã«ã³ãã¥ãã±ã¼ã·ã§ã³ã¤ã³ã¿ãã§ã¼ã¹ã®ãã¼ã¹ã¢ãã¬ã¹
+ */
+#define SCIF0_BASE			0xe8007000
+#define SCIF1_BASE			0xe8007800
+#define SCIF2_BASE			0xe8008000
+#define SCIF3_BASE			0xe8008800
+#define SCIF4_BASE			0xe8009000
+#ifdef TOPPERS_RZA1H
+#define SCIF5_BASE			0xe8009800
+#define SCIF6_BASE			0xe800a000
+#define SCIF7_BASE			0xe800a800
+#endif /* TOPPERS_RZA1H */
+
+/*
+ *  ä½æ¶è²»é»åã¢ã¼ãé¢é£ã®ãã¼ã¹ã¢ãã¬ã¹ã¨ã¬ã¸ã¹ã¿
+ */
+#define RZA1_LOWPWR_BASE	0xfcfe0000
+#define RZA1_STBCR1			CAST(uint8_t *, RZA1_LOWPWR_BASE + 0x020)
+#define RZA1_STBCR2			CAST(uint8_t *, RZA1_LOWPWR_BASE + 0x024)
+#define RZA1_STBCR3			CAST(uint8_t *, RZA1_LOWPWR_BASE + 0x420)
+#define RZA1_STBCR4			CAST(uint8_t *, RZA1_LOWPWR_BASE + 0x424)
+#define RZA1_STBCR5			CAST(uint8_t *, RZA1_LOWPWR_BASE + 0x428)
+#define RZA1_STBCR6			CAST(uint8_t *, RZA1_LOWPWR_BASE + 0x42C)
+#define RZA1_STBCR7			CAST(uint8_t *, RZA1_LOWPWR_BASE + 0x430)
+#define RZA1_STBCR8			CAST(uint8_t *, RZA1_LOWPWR_BASE + 0x434)
+#define RZA1_STBCR9			CAST(uint8_t *, RZA1_LOWPWR_BASE + 0x438)
+#define RZA1_STBCR10		CAST(uint8_t *, RZA1_LOWPWR_BASE + 0x43C)
+#define RZA1_STBCR11		CAST(uint8_t *, RZA1_LOWPWR_BASE + 0x440)
+#define RZA1_STBCR12		CAST(uint8_t *, RZA1_LOWPWR_BASE + 0x444)
+#define RZA1_STBCR13		CAST(uint8_t *, RZA1_LOWPWR_BASE + 0x470)
+#define RZA1_SYSCR1			CAST(uint8_t *, RZA1_LOWPWR_BASE + 0x400)
+#define RZA1_SYSCR2			CAST(uint8_t *, RZA1_LOWPWR_BASE + 0x404)
+#define RZA1_SYSCR3			CAST(uint8_t *, RZA1_LOWPWR_BASE + 0x408)
+#define RZA1_CPUSTS			CAST(uint8_t *, RZA1_LOWPWR_BASE + 0x018)
+
+/*
+ *  æ±ç¨å
+¥åºåãã¼ãã®ãã¼ã¹ã¢ãã¬ã¹ã¨ã¬ã¸ã¹ã¿
+ */
+#define RZA1_PORT_BASE		0xfcfe3000
+#define RZA1_PORT_P(n)		CAST(uint16_t *, (RZA1_PORT_BASE + 0x0000 + (n)*4))
+#define RZA1_PORT_PSR(n)	CAST(uint32_t *, (RZA1_PORT_BASE + 0x0100 + (n)*4))
+#define RZA1_PORT_PPR(n)	CAST(uint16_t *, (RZA1_PORT_BASE + 0x0200 + (n)*4))
+#define RZA1_PORT_PM(n)		CAST(uint16_t *, (RZA1_PORT_BASE + 0x0300 + (n)*4))
+#define RZA1_PORT_PMC(n)	CAST(uint16_t *, (RZA1_PORT_BASE + 0x0400 + (n)*4))
+#define RZA1_PORT_PFC(n)	CAST(uint16_t *, (RZA1_PORT_BASE + 0x0500 + (n)*4))
+#define RZA1_PORT_PFCE(n)	CAST(uint16_t *, (RZA1_PORT_BASE + 0x0600 + (n)*4))
+#define RZA1_PORT_PFCAE(n)	CAST(uint16_t *, (RZA1_PORT_BASE + 0x0a00 + (n)*4))
+#define RZA1_PORT_PIBC(n)	CAST(uint16_t *, (RZA1_PORT_BASE + 0x4000 + (n)*4))
+#define RZA1_PORT_PBDC(n)	CAST(uint16_t *, (RZA1_PORT_BASE + 0x4100 + (n)*4))
+#define RZA1_PORT_PIPC(n)	CAST(uint16_t *, (RZA1_PORT_BASE + 0x4200 + (n)*4))
+
+/*
+ *	å²è¾¼ã¿çªå·
+ */
+#define INTNO_IRQ0			32		/* IRQ0 */
+#define INTNO_IRQ1			33		/* IRQ1 */
+#define INTNO_IRQ2			34		/* IRQ2 */
+#define INTNO_IRQ3			35		/* IRQ3 */
+#define INTNO_IRQ4			36		/* IRQ4 */
+#define INTNO_IRQ5			37		/* IRQ5 */
+#define INTNO_IRQ6			38		/* IRQ6 */
+#define INTNO_IRQ7			39		/* IRQ7 */
+#define INTNO_OSTM0			134		/* OSã¿ã¤ã0 */
+#define INTNO_OSTM1			135		/* OSã¿ã¤ã1 */
+#define INTNO_SCIF0_BRI		221		/* SCIF0 ãã¬ã¼ã¯å²è¾¼ã¿ */
+#define INTNO_SCIF0_ERI		222		/* SCIF0 ã¨ã©ã¼å²è¾¼ã¿ */
+#define INTNO_SCIF0_RXI		223		/* SCIF0 åä¿¡å²è¾¼ã¿ */
+#define INTNO_SCIF0_TXI		224		/* SCIF0 éä¿¡å²è¾¼ã¿ */
+#define INTNO_SCIF1_BRI		225		/* SCIF1 ãã¬ã¼ã¯å²è¾¼ã¿ */
+#define INTNO_SCIF1_ERI		226		/* SCIF1 ã¨ã©ã¼å²è¾¼ã¿ */
+#define INTNO_SCIF1_RXI		227		/* SCIF1 åä¿¡å²è¾¼ã¿ */
+#define INTNO_SCIF1_TXI		228		/* SCIF1 éä¿¡å²è¾¼ã¿ */
+#define INTNO_SCIF2_BRI		229		/* SCIF2 ãã¬ã¼ã¯å²è¾¼ã¿ */
+#define INTNO_SCIF2_ERI		230		/* SCIF2 ã¨ã©ã¼å²è¾¼ã¿ */
+#define INTNO_SCIF2_RXI		231		/* SCIF2 åä¿¡å²è¾¼ã¿ */
+#define INTNO_SCIF2_TXI		232		/* SCIF2 éä¿¡å²è¾¼ã¿ */
+#define INTNO_SCIF3_BRI		233		/* SCIF3 ãã¬ã¼ã¯å²è¾¼ã¿ */
+#define INTNO_SCIF3_ERI		234		/* SCIF3 ã¨ã©ã¼å²è¾¼ã¿ */
+#define INTNO_SCIF3_RXI		235		/* SCIF3 åä¿¡å²è¾¼ã¿ */
+#define INTNO_SCIF3_TXI		236		/* SCIF3 éä¿¡å²è¾¼ã¿ */
+#define INTNO_SCIF4_BRI		237		/* SCIF4 ãã¬ã¼ã¯å²è¾¼ã¿ */
+#define INTNO_SCIF4_ERI		238		/* SCIF4 ã¨ã©ã¼å²è¾¼ã¿ */
+#define INTNO_SCIF4_RXI		239		/* SCIF4 åä¿¡å²è¾¼ã¿ */
+#define INTNO_SCIF4_TXI		240		/* SCIF4 éä¿¡å²è¾¼ã¿ */
+#ifdef TOPPERS_RZA1H
+#define INTNO_SCIF5_BRI		241		/* SCIF5 ãã¬ã¼ã¯å²è¾¼ã¿ */
+#define INTNO_SCIF5_ERI		242		/* SCIF5 ã¨ã©ã¼å²è¾¼ã¿ */
+#define INTNO_SCIF5_RXI		243		/* SCIF5 åä¿¡å²è¾¼ã¿ */
+#define INTNO_SCIF5_TXI		244		/* SCIF5 éä¿¡å²è¾¼ã¿ */
+#define INTNO_SCIF6_BRI		245		/* SCIF6 ãã¬ã¼ã¯å²è¾¼ã¿ */
+#define INTNO_SCIF6_ERI		246		/* SCIF6 ã¨ã©ã¼å²è¾¼ã¿ */
+#define INTNO_SCIF6_RXI		247		/* SCIF6 åä¿¡å²è¾¼ã¿ */
+#define INTNO_SCIF6_TXI		248		/* SCIF6 éä¿¡å²è¾¼ã¿ */
+#define INTNO_SCIF7_BRI		249		/* SCIF7 ãã¬ã¼ã¯å²è¾¼ã¿ */
+#define INTNO_SCIF7_ERI		250		/* SCIF7 ã¨ã©ã¼å²è¾¼ã¿ */
+#define INTNO_SCIF7_RXI		251		/* SCIF7 åä¿¡å²è¾¼ã¿ */
+#define INTNO_SCIF7_TXI		252		/* SCIF7 éä¿¡å²è¾¼ã¿ */
+#endif /* TOPPERS_RZA1H */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  IRQå²è¾¼ã¿è¦æ±ã®ã¯ãªã¢
+ */
+Inline void
+rza1_clear_irq(INTNO intno)
+{
+	uint16_t	reg;
+
+	reg = sil_reh_mem(RZA1_IRQRR);
+	reg &= ~(0x01U << (intno - INTNO_IRQ0));
+	sil_wrh_mem(RZA1_IRQRR, reg);
+}
+
+/*
+ *  æ±ç¨å
+¥åºåãã¼ãã®è¨­å®
+ *
+ *  æ±ç¨å
+¥åºåãã¼ãã®å¶å¾¡ã¬ã¸ã¹ã¿ã®ç¹å®ã®ããããï¼ã»ããï¼setã0ã§ãª
+ *  ãæï¼ã¾ãã¯ã¯ãªã¢ï¼setã0ã®æï¼ããï¼
+ */
+Inline void
+rza1_config_port(uint16_t *reg, uint_t bit, uint_t set)
+{
+	uint16_t	val;
+	uint16_t	mask;
+
+	mask = 0x01U << bit;
+	val = sil_reh_mem(reg);
+	if (set == 0) {
+		val &= ~mask;
+	}
+	else {
+		val |= mask;
+	}
+	sil_wrh_mem(reg, val);
+}
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_RZA1_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/scif.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/scif.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/scif.h	(revision 270)
@@ -0,0 +1,169 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ *
+ *  Copyright (C) 2001-2011 by Industrial Technology Institute,
+ *                              Miyagi Prefectural Government, JAPAN
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+/*
+ *		FIFOå
+èµã·ãªã¢ã«ã³ãã¥ãã±ã¼ã·ã§ã³ã¤ã³ã¿ãã§ã¼ã¹ã«é¢ããå®ç¾©
+ */
+
+#ifndef TOPPERS_SCIF_H
+#define TOPPERS_SCIF_H
+
+/*
+ *  SCIFã¬ã¸ã¹ã¿ã®çªå°ã®å®ç¾©
+ */
+#define SCIF_SCSMR(base)		((uint16_t *)(base + 0x00U))
+#define SCIF_SCBRR(base)		((uint8_t *)(base + 0x04U))
+#define SCIF_SCSCR(base)		((uint16_t *)(base + 0x08U))
+#define SCIF_SCFTDR(base)		((uint8_t *)(base + 0x0cU))
+#define SCIF_SCFSR(base)		((uint16_t *)(base + 0x10U))
+#define SCIF_SCFRDR(base)		((uint8_t *)(base + 0x14U))
+#define SCIF_SCFCR(base)		((uint16_t *)(base + 0x18U))
+#define SCIF_SCFDR(base)		((uint16_t *)(base + 0x1cU))
+#define SCIF_SCSPTR(base)		((uint16_t *)(base + 0x20U))
+#define SCIF_SCLSR(base)		((uint16_t *)(base + 0x24U))
+#define SCIF_SCEMR(base)		((uint16_t *)(base + 0x28U))
+
+/*
+ *  ã·ãªã¢ã«ã¢ã¼ãã¬ã¸ã¹ã¿ï¼SCIF_SCSMRï¼ã®è¨­å®å¤
+ */
+#define SCIF_SCSMR_SYNC		0x0080U		/* ã¯ã­ãã¯åæå¼ã¢ã¼ã */
+#define SCIF_SCSMR_7BIT		0x0040U		/* 7ããããã¼ã¿ */
+#define SCIF_SCSMR_PARITY	0x0020U		/* ããªãã£ãããã®ä»å  */
+#define SCIF_SCSMR_ODD		0x0010U		/* å¥æ°ããªãã£ */
+#define SCIF_SCSMR_2STOP	0x0008U		/* 2ã¹ãããããã */
+#define SCIF_SCSMR_CKS1		0x0000U		/* P1Ïã¯ã­ãã¯1 */
+#define SCIF_SCSMR_CKS4		0x0001U		/* P1Ï/4ã¯ã­ãã¯ */
+#define SCIF_SCSMR_CKS16	0x0002U		/* P1Ï/16ã¯ã­ãã¯ */
+#define SCIF_SCSMR_CKS64	0x0003U		/* P1Ï/64ã¯ã­ãã¯ */
+
+/*
+ *  ã·ãªã¢ã«ã³ã³ãã­ã¼ã«ã¬ã¸ã¹ã¿ï¼SCIF_SCSCRï¼ã®è¨­å®å¤
+ */
+#define SCIF_SCSCR_TIE		0x0080U		/* éä¿¡å²è¾¼ã¿è¨±å¯ */
+#define SCIF_SCSCR_RIE		0x0040U		/* åä¿¡å²è¾¼ã¿ç­è¨±å¯ */
+#define SCIF_SCSCR_TE		0x0020U		/* éä¿¡è¨±å¯ */
+#define SCIF_SCSCR_RE		0x0010U		/* åä¿¡è¨±å¯ */
+#define SCIF_SCSCR_REIE		0x0008U		/* åä¿¡ã¨ã©ã¼å²è¾¼ã¿ç­è¨±å¯ */
+#define SCIF_SCSCR_INTCLK	0x0000U		/* å
+é¨ã¯ã­ãã¯ï¼CKSç«¯å­ã¯ç¡è¦ */
+										/*		  ï¼èª¿æ­©åæå¼ã®å ´åï¼ */
+
+/*
+ *  ã·ãªã¢ã«ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿ï¼SCIF_SCFSRï¼ã®åç
+§å¤
+ */
+#define SCIF_SCFSR_PER_MASK		0xf000U	/* ããªãã£ã¨ã©ã¼æ°æ½åºãã¹ã¯ */
+#define SCIF_SCFSR_PER_SHIFT	12		/* ããªãã£ã¨ã©ã¼æ°æ½åºå³ã·ããæ° */
+#define SCIF_SCFSR_FER_MASK		0x0f00U	/* ãã¬ã¼ãã³ã°ã¨ã©ã¼æ°æ½åºãã¹ã¯ */
+#define SCIF_SCFSR_FER_SHIFT	8		/* ãã¬ã¼ãã³ã°ã¨ã©ã¼æ°æ½åºå³ã·ããæ° */
+#define SCIF_SCFSR_ER		0x0080U		/* åä¿¡ã¨ã©ã¼ */
+#define SCIF_SCFSR_TEND		0x0040U		/* éä¿¡å®äº */
+#define SCIF_SCFSR_TDFE		0x0020U		/* éä¿¡FIFOãã¼ã¿ã¨ã³ããã£ */
+#define SCIF_SCFSR_BRK		0x0010U		/* ãã¬ã¼ã¯æ¤åº */
+#define SCIF_SCFSR_FER		0x0008U		/* ãã¬ã¼ãã³ã°ã¨ã©ã¼æ¤åº */
+#define SCIF_SCFSR_PER		0x0004U		/* ããªãã£ã¨ã©ã¼æ¤åº */
+#define SCIF_SCFSR_RDF		0x0002U		/* åä¿¡FIFOãã¼ã¿ãã« */
+#define SCIF_SCFSR_DR		0x0001U		/* åä¿¡ãã¼ã¿ã¬ãã£ */
+
+/*
+ *  FIFOã³ã³ãã­ã¼ã«ã¬ã¸ã¹ã¿ï¼SCIF_SCFCRï¼ã®è¨­å®å¤
+ */
+#define SCIF_SCFCR_RSTRG_15	0x0000U		/* RTS#åºåã¢ã¯ãã£ãããªã¬ï¼15 */
+#define SCIF_SCFCR_RSTRG_1	0x0100U		/* RTS#åºåã¢ã¯ãã£ãããªã¬ï¼1 */
+#define SCIF_SCFCR_RSTRG_4	0x0200U		/* RTS#åºåã¢ã¯ãã£ãããªã¬ï¼4 */
+#define SCIF_SCFCR_RSTRG_6	0x0300U		/* RTS#åºåã¢ã¯ãã£ãããªã¬ï¼6 */
+#define SCIF_SCFCR_RSTRG_8	0x0400U		/* RTS#åºåã¢ã¯ãã£ãããªã¬ï¼8 */
+#define SCIF_SCFCR_RSTRG_10	0x0500U		/* RTS#åºåã¢ã¯ãã£ãããªã¬ï¼10 */
+#define SCIF_SCFCR_RSTRG_12	0x0600U		/* RTS#åºåã¢ã¯ãã£ãããªã¬ï¼12 */
+#define SCIF_SCFCR_RSTRG_14	0x0700U		/* RTS#åºåã¢ã¯ãã£ãããªã¬ï¼14 */
+#define SCIF_SCFCR_RTRG_1	0x0000U		/* åä¿¡FIFOãã¼ã¿æ°ããªã¬ï¼1 */
+#define SCIF_SCFCR_RTRG_4	0x0040U		/* åä¿¡FIFOãã¼ã¿æ°ããªã¬ï¼4 */
+#define SCIF_SCFCR_RTRG_8	0x0080U		/* åä¿¡FIFOãã¼ã¿æ°ããªã¬ï¼8 */
+#define SCIF_SCFCR_RTRG_14	0x00C0U		/* åä¿¡FIFOãã¼ã¿æ°ããªã¬ï¼14 */
+#define SCIF_SCFCR_TTRG_8	0x0000U		/* éä¿¡FIFOãã¼ã¿æ°ããªã¬ï¼8 */
+#define SCIF_SCFCR_TTRG_4	0x0010U		/* éä¿¡FIFOãã¼ã¿æ°ããªã¬ï¼4 */
+#define SCIF_SCFCR_TTRG_2	0x0020U		/* éä¿¡FIFOãã¼ã¿æ°ããªã¬ï¼2 */
+#define SCIF_SCFCR_TTRG_0	0x0030U		/* éä¿¡FIFOãã¼ã¿æ°ããªã¬ï¼0 */
+#define SCIF_SCFCR_MCE		0x0008U		/* CTS#,RTS#è¨±å¯ */
+#define SCIF_SCFCR_TFRST	0x0004U		/* éä¿¡FIFOãã¼ã¿ã¬ã¸ã¹ã¿ãªã»ãã */
+#define SCIF_SCFCR_RFRST	0x0002U		/* åä¿¡FIFOãã¼ã¿ã¬ã¸ã¹ã¿ãªã»ãã */
+#define SCIF_SCFCR_LOOP		0x0001U		/* ã«ã¼ãããã¯ãã¹ã */
+
+/*
+ *  FIFOãã¼ã¿ã«ã¦ã³ãã¬ã¸ã¹ã¿ï¼SCIF_SCFDRï¼ã®åç
+§å¤
+ */
+#define SCIF_SCFDR_T_MASK	0x1f00U		/* æªéä¿¡ãã¼ã¿æ°æ½åºãã¹ã¯ */
+#define SCIF_SCFDR_T_SHIFT	8			/* æªéä¿¡ãã¼ã¿æ°æ½åºå³ã·ããæ° */
+#define SCIF_SCFDR_R_MASK	0x001fU		/* åä¿¡ãã¼ã¿æ°æ½åºãã¹ã¯ */
+#define SCIF_SCFDR_R_SHIFT	0			/* åä¿¡ãã¼ã¿æ°æ½åºå³ã·ããæ° */
+
+/*
+ *  ã©ã¤ã³ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿ï¼SCIF_SCLSRï¼ã®åç
+§å¤
+ */
+#define SCIF_SCLSR_ORER		0x0001U		/* ãªã¼ãã¼ã©ã³ã¨ã©ã¼ */
+
+/*
+ *  ã·ãªã¢ã«æ¡å¼µã¢ã¼ãã¬ã¸ã¹ã¿ï¼SCIF_SCEMRï¼ã®è¨­å®å¤
+ */
+#define SCIF_SCEMR_BGDM		0x0080U		/* ãã¼ã¬ã¼ãã¸ã§ãã¬ã¼ã¿åéã¢ã¼ã */
+#define SCIF_SCEMR_ABCS16	0x0000U		/* ãããã¬ã¼ãã®16åã®åºæ¬ã¯ã­ãã¯ */
+#define SCIF_SCEMR_ABCS8	0x0001U		/* ãããã¬ã¼ãã®8åã®åºæ¬ã¯ã­ãã¯ */
+
+#endif /* TOPPERS_SCIF_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/tSCIF.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/tSCIF.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/tSCIF.c	(revision 270)
@@ -0,0 +1,301 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		FIFOå
+èµã·ãªã¢ã«ã³ãã¥ãã±ã¼ã·ã§ã³ã¤ã³ã¿ãã§ã¼ã¹ç¨ ç°¡æSIOãã©ã¤ã
+ */
+
+#include <sil.h>
+#include "tSCIF_tecsgen.h"
+#include "scif.h"
+
+/*
+ *  ããªããã£ããªéä¿¡ï¼åä¿¡é¢æ°
+ */
+
+/*
+ *  åä¿¡ãããã¡ã«æå­ããããï¼
+ */
+Inline bool_t
+scif_getready(CELLCB *p_cellcb)
+{
+	uint16_t	fsr;
+	uint16_t	lsr;
+
+	fsr = sil_reh_mem(SCIF_SCFSR(ATTR_baseAddress));
+	lsr = sil_reh_mem(SCIF_SCLSR(ATTR_baseAddress));
+	if ((fsr & (SCIF_SCFSR_ER|SCIF_SCFSR_BRK)) != 0U) {
+		fsr &= ~(SCIF_SCFSR_ER|SCIF_SCFSR_BRK);
+		sil_wrh_mem(SCIF_SCFSR(ATTR_baseAddress), fsr);
+	}
+	if ((lsr & SCIF_SCLSR_ORER) != 0U) {
+		lsr &= ~(SCIF_SCLSR_ORER);
+		sil_wrh_mem(SCIF_SCLSR(ATTR_baseAddress), lsr);
+	}
+	return((fsr & SCIF_SCFSR_RDF) != 0U);
+}
+
+/*
+ *  éä¿¡ãããã¡ã«ç©ºãããããï¼
+ */
+Inline bool_t
+scif_putready(CELLCB *p_cellcb)
+{
+	uint16_t	fsr;
+
+	fsr = sil_reh_mem(SCIF_SCFSR(ATTR_baseAddress));
+	return((fsr & SCIF_SCFSR_TDFE) != 0U);
+}
+
+/*
+ *  åä¿¡ããæå­ã®ååºã
+ */
+Inline bool_t
+scif_getchar(CELLCB *p_cellcb, char *p_c)
+{
+	uint16_t	fsr;
+	uint16_t	lsr;
+
+	fsr = sil_reh_mem(SCIF_SCFSR(ATTR_baseAddress));
+	lsr = sil_reh_mem(SCIF_SCLSR(ATTR_baseAddress));
+	if ((fsr & (SCIF_SCFSR_ER|SCIF_SCFSR_BRK)) != 0U) {
+		fsr &= ~(SCIF_SCFSR_ER|SCIF_SCFSR_BRK);
+		sil_wrh_mem(SCIF_SCFSR(ATTR_baseAddress), fsr);
+	}
+	if ((lsr & SCIF_SCLSR_ORER) != 0U) {
+		lsr &= ~(SCIF_SCLSR_ORER);
+		sil_wrh_mem(SCIF_SCLSR(ATTR_baseAddress), lsr);
+	}
+	if ((fsr & SCIF_SCFSR_RDF) != 0U) {
+		*p_c = (char) sil_reb_mem(SCIF_SCFRDR(ATTR_baseAddress));
+		fsr &= ~(SCIF_SCFSR_RDF);
+		sil_wrh_mem(SCIF_SCFSR(ATTR_baseAddress), fsr);
+		return(true);
+	}
+	return(false);
+}
+
+/*
+ *  éä¿¡ããæå­ã®æ¸è¾¼ã¿
+ */
+Inline void
+scif_putchar(CELLCB *p_cellcb, char c)
+{
+	sil_wrb_mem(SCIF_SCFTDR(ATTR_baseAddress), c);
+	sil_wrh_mem(SCIF_SCFSR(ATTR_baseAddress),
+				(uint16_t) ~(SCIF_SCFSR_TEND|SCIF_SCFSR_TDFE));
+}
+
+/*
+ *  ã·ãªã¢ã«I/Oãã¼ãã®ãªã¼ãã³
+ */
+void
+eSIOPort_open(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	uint_t	brr;
+
+	if (VAR_initialized) {
+		/*
+		 *  æ¢ã«åæåãã¦ããå ´åã¯ãäºéã«åæåããªãï¼
+		 */
+		return;
+	}
+
+	brr = SCIF_CLK / (32 * ATTR_baudRate) - 1;
+	assert(brr <= 255);
+
+	sil_wrh_mem(SCIF_SCSCR(ATTR_baseAddress), 0U);
+	sil_wrh_mem(SCIF_SCFCR(ATTR_baseAddress),
+							SCIF_SCFCR_TFRST|SCIF_SCFCR_RFRST);
+	(void) sil_reh_mem(SCIF_SCFSR(ATTR_baseAddress));
+	(void) sil_reh_mem(SCIF_SCLSR(ATTR_baseAddress));
+	sil_wrh_mem(SCIF_SCFSR(ATTR_baseAddress), 0U);
+	sil_wrh_mem(SCIF_SCLSR(ATTR_baseAddress), 0U);
+	sil_wrh_mem(SCIF_SCSCR(ATTR_baseAddress), SCIF_SCSCR_INTCLK);
+	sil_wrh_mem(SCIF_SCSMR(ATTR_baseAddress), SCIF_SCSMR_CKS1);
+	sil_wrh_mem(SCIF_SCEMR(ATTR_baseAddress), 0U);
+	sil_wrb_mem(SCIF_SCBRR(ATTR_baseAddress), (uint8_t) brr);
+	sil_wrh_mem(SCIF_SCFCR(ATTR_baseAddress),
+					SCIF_SCFCR_RSTRG_15|SCIF_SCFCR_RTRG_1|SCIF_SCFCR_TTRG_8);
+	sil_wrh_mem(SCIF_SCSCR(ATTR_baseAddress),
+					SCIF_SCSCR_TE|SCIF_SCSCR_RE|SCIF_SCSCR_INTCLK);
+
+	while ((sil_reh_mem(SCIF_SCFSR(ATTR_baseAddress)) & SCIF_SCFSR_RDF) != 0U) {
+		(void) sil_reb_mem(SCIF_SCFRDR(ATTR_baseAddress));
+		sil_wrh_mem(SCIF_SCFSR(ATTR_baseAddress), (uint16_t) ~(SCIF_SCFSR_RDF));
+	}
+	sil_wrh_mem(SCIF_SCFSR(ATTR_baseAddress), 0U);
+
+	VAR_initialized = true;
+}
+
+/*
+ *  ã·ãªã¢ã«I/Oãã¼ãã®ã¯ã­ã¼ãº
+ */
+void
+eSIOPort_close(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+
+	sil_wrh_mem(SCIF_SCSCR(ATTR_baseAddress), 0U);
+}
+
+/*
+ *  ã·ãªã¢ã«I/Oãã¼ãã¸ã®æå­éä¿¡
+ */
+bool_t
+eSIOPort_putChar(CELLIDX idx, char c)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+
+	if (scif_putready(p_cellcb)){
+		scif_putchar(p_cellcb, c);
+		return(true);
+	}
+	return(false);
+}
+
+/*
+ *  ã·ãªã¢ã«I/Oãã¼ãããã®æå­åä¿¡
+ */
+int_t
+eSIOPort_getChar(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	char	c;
+
+	if (scif_getready(p_cellcb)) {
+		if (scif_getchar(p_cellcb, &c)) {
+			return((int_t) c);
+		}
+	}
+	return(-1);
+}
+
+/*
+ *  ã·ãªã¢ã«I/Oãã¼ãããã®ã³ã¼ã«ããã¯ã®è¨±å¯
+ */
+void
+eSIOPort_enableCBR(CELLIDX idx, uint_t cbrtn)
+{
+	CELLCB		*p_cellcb = GET_CELLCB(idx);
+	uint16_t	scr;
+
+	scr = sil_reh_mem(SCIF_SCSCR(ATTR_baseAddress));
+	switch (cbrtn) {
+	case SIOSendReady:
+		scr |= SCIF_SCSCR_TIE;
+		break;
+	case SIOReceiveReady:
+		scr |= SCIF_SCSCR_RIE;
+		break;
+	}
+	sil_wrh_mem(SCIF_SCSCR(ATTR_baseAddress), scr);
+}
+
+/*
+ *  ã·ãªã¢ã«I/Oãã¼ãããã®ã³ã¼ã«ããã¯ã®ç¦æ­¢
+ */
+void
+eSIOPort_disableCBR(CELLIDX idx, uint_t cbrtn)
+{
+	CELLCB		*p_cellcb = GET_CELLCB(idx);
+	uint16_t	scr;
+
+	scr = sil_reh_mem(SCIF_SCSCR(ATTR_baseAddress));
+	switch (cbrtn) {
+	case SIOSendReady:
+		scr &= ~(SCIF_SCSCR_TIE);
+		break;
+	case SIOReceiveReady:
+		scr &= ~(SCIF_SCSCR_RIE);
+		break;
+	}
+	sil_wrh_mem(SCIF_SCSCR(ATTR_baseAddress), scr);
+}
+
+/*
+ *  ã·ãªã¢ã«I/Oãã¼ãã«å¯¾ããåä¿¡å²è¾¼ã¿å¦ç
+ */
+void
+eiRxISR_main(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+
+	if (scif_getready(p_cellcb)) {
+		/*
+		 *  åä¿¡éç¥ã³ã¼ã«ããã¯ã«ã¼ãã³ãå¼ã³åºãï¼
+		 */
+		ciSIOCBR_readyReceive();
+	}
+}
+
+/*
+ *  ã·ãªã¢ã«I/Oãã¼ãã«å¯¾ããéä¿¡å²è¾¼ã¿å¦ç
+ */
+void
+eiTxISR_main(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+
+	if (scif_putready(p_cellcb)) {
+		/*
+		 *  éä¿¡å¯è½ã³ã¼ã«ããã¯ã«ã¼ãã³ãå¼ã³åºãï¼
+		 */
+		ciSIOCBR_readySend();
+	}
+}
Index: EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/tSCIF.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/tSCIF.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/arm_gcc/rza1/tSCIF.cdl	(revision 270)
@@ -0,0 +1,89 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		FIFOå
+èµã·ãªã¢ã«ã³ãã¥ãã±ã¼ã·ã§ã³ã¤ã³ã¿ãã§ã¼ã¹ç¨ ç°¡æSIOãã©
+ *		ã¤ãã®ã³ã³ãã¼ãã³ãè¨è¿°
+ */
+
+/*
+ *  FIFOå
+èµã·ãªã¢ã«ã³ãã¥ãã±ã¼ã·ã§ã³ã¤ã³ã¿ãã§ã¼ã¹ã«é¢ããå®ç¾©ã®ã¤ã³
+ *  ãã¼ã
+ */
+import_C("scif.h");
+
+/*
+ *  FIFOå
+èµã·ãªã¢ã«ã³ãã¥ãã±ã¼ã·ã§ã³ã¤ã³ã¿ãã§ã¼ã¹ç¨ ç°¡æSIOãã©ã¤ã
+ *  ã®ã»ã«ã¿ã¤ã
+ */
+celltype tSCIF {
+	entry	sSIOPort	eSIOPort;
+	call	siSIOCBR	ciSIOCBR;
+
+	entry	siHandlerBody	eiRxISR;
+	entry	siHandlerBody	eiTxISR;
+
+	attr {
+		uintptr_t	baseAddress;	/* SCIFã¬ã¸ã¹ã¿ã®ãã¼ã¹ã¢ãã¬ã¹ */
+		uint32_t	baudRate;		/* ãã¼ã¬ã¼ãã®è¨­å®å¤ */
+	};
+	var {
+		bool_t		initialized = false;	/* åæåæ¸ã¿ */
+	};
+};
Index: EcnlProtoTool/trunk/asp3_dcre/arch/gcc/tool_stddef.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/gcc/tool_stddef.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/gcc/tool_stddef.h	(revision 270)
@@ -0,0 +1,218 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2011 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		t_stddef.hã®éçºç°å¢ä¾å­é¨ï¼GCCç¨ï¼
+ */
+
+#ifndef TOPPERS_TOOL_STDDEF_H
+#define TOPPERS_TOOL_STDDEF_H
+
+/*
+ *  ã³ã³ãã¤ã©ã®æ¡å¼µæ©è½ã®ããã®ãã¯ã­å®ç¾©
+ */
+#ifndef __cplusplus					/* C++ã«ã¯inline ããã */
+#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L
+									/* C99ã«ã¯inline ããã */
+#define inline	__inline__			/* ã¤ã³ã©ã¤ã³é¢æ° */
+#endif /* !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L */
+#endif /* __cplusplus */
+
+#define Inline	static inline		/* ã¤ã³ã©ã¤ã³é¢æ° */
+
+#ifndef __cplusplus					/* C++ã«ã¯asmããã */
+#define asm		__asm__				/* ã¤ã³ã©ã¤ã³ã¢ã»ã³ãã© */
+#endif /* __cplusplus */
+
+#define Asm		__asm__ volatile	/* ã¤ã³ã©ã¤ã³ã¢ã»ã³ãã©ï¼æé©åææ­¢ï¼*/
+
+#define NoReturn	__attribute__((__noreturn__))
+									/* ãªã¿ã¼ã³ããªãé¢æ° */
+
+/*
+ *  éçºç°å¢ã®æ¨æºã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã®å©ç¨
+ *
+ *  NULLã®å®ç¾©ãstddef.hããï¼INT_MAXï¼INT_MINï¼UINT_MAXï¼LONG_MAXï¼
+ *  LONG_MINï¼ULONG_MAXï¼CHAR_BITã®å®ç¾©ãlimits.hããåãè¾¼ãï¼
+ *
+ *  C++/EC++ã§ã¯ï¼æ¨æºä»æ§ä¸ã¯ãããã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ãç¨æããã¦
+ *  ããã¨ã¯éããªãã®ã§æ³¨æãå¿
+è¦ã§ããï¼ã»ã¨ãã©ã®éçºç°å¢ã§ç¨æãã
+ *  ã¦ããï¼ï¼
+ */
+#ifndef TOPPERS_MACRO_ONLY
+#include <stddef.h>
+#include <limits.h>
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  stdint.hã®ä»£ç¨ã¨ãªãå®ç¾©
+ *
+ *  éçºç°å¢ã«stdint.hãç¨æããã¦ãããï¼åæ´æ°åã®ãµã¤ãºããããã¿ã¼
+ *  ã³ã«å½ã¦ã¯ã¾ãå ´åã«ï¼stdint.hã®ä»£ç¨ã¨ãªãå®ç¾©ãä¸ããï¼
+ *
+ *  TOPPERS_STDINT_TYPE1: char/short/int/long longã®ãããé·ããããã
+ *                        8/16/32/64ãããã§ï¼ãã¤ã³ã¿ã®ãããé·ãlong
+ *                        ã®ãããé·ã¨ä¸è´ããå ´å
+ */
+#ifdef TOPPERS_STDINT_TYPE1
+
+/*
+ *  ã³ã³ãã¤ã©ä¾å­ã®ãã¼ã¿åã®å®ç¾©
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+typedef signed char			int8_t;		/* ç¬¦å·ä»ã8ãããæ´æ° */
+typedef unsigned char		uint8_t;	/* ç¬¦å·ç¡ã8ãããæ´æ° */
+
+typedef signed short		int16_t;	/* ç¬¦å·ä»ã16ãããæ´æ° */
+typedef unsigned short		uint16_t;	/* ç¬¦å·ç¡ã16ãããæ´æ° */
+
+typedef signed int			int32_t;	/* ç¬¦å·ä»ã32ãããæ´æ° */
+typedef unsigned int		uint32_t;	/* ç¬¦å·ç¡ã32ãããæ´æ° */
+
+typedef signed long long	int64_t;	/* ç¬¦å·ä»ã64ãããæ´æ° */
+typedef unsigned long long	uint64_t;	/* ç¬¦å·ç¡ã64ãããæ´æ° */
+
+typedef int8_t				int_least8_t;	/* 8ãããä»¥ä¸ã®ç¬¦å·ä»ãæ´æ° */
+typedef uint8_t				uint_least8_t;	/* 8ãããä»¥ä¸ã®ç¬¦å·ç¡ãæ´æ° */
+
+typedef long				intptr_t;	/* ãã¤ã³ã¿ãæ ¼ç´ã§ããç¬¦å·ä»ãæ´æ° */
+typedef unsigned long		uintptr_t;	/* ãã¤ã³ã¿ãæ ¼ç´ã§ããç¬¦å·ç¡ãæ´æ° */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  ã³ã³ãã¤ã©ä¾å­ã®ãã¼ã¿åã®æ´æ°å®æ°ãä½ããã¯ã­
+ */
+#ifndef INT8_C
+#define INT8_C(val)			(val)
+#endif /* INT8_C */
+
+#ifndef UINT8_C
+#define UINT8_C(val)		(val ## U)
+#endif /* UINT8_C */
+
+#ifndef INT16_C
+#define INT16_C(val)		(val)
+#endif /* INT16_C */
+
+#ifndef UINT16_C
+#define UINT16_C(val)		(val ## U)
+#endif /* UINT16_C */
+
+#ifndef INT32_C
+#define INT32_C(val)		(val)
+#endif /* INT32_C */
+
+#ifndef UINT32_C
+#define UINT32_C(val)		(val ## U)
+#endif /* UINT32_C */
+
+#ifndef INT64_C
+#define INT64_C(val)		(val ## LL)
+#endif /* INT64_C */
+
+#ifndef UINT64_C
+#define UINT64_C(val)		(val ## ULL)
+#endif /* UINT64_C */
+
+/*
+ *  ã³ã³ãã¤ã©ä¾å­ã®ãã¼ã¿åã«æ ¼ç´ã§ããæå¤§å¤ã¨æå°å¤ã®å®ç¾©
+ */
+#define INT8_MAX			SCHAR_MAX
+#define INT8_MIN			SCHAR_MIN
+#define UINT8_MAX			UCHAR_MAX
+
+#define INT16_MAX			SHRT_MAX
+#define INT16_MIN			SHRT_MIN
+#define UINT16_MAX			USHRT_MAX
+
+#define INT32_MAX			INT_MAX
+#define INT32_MIN			INT_MIN
+#define UINT32_MAX			UINT_MAX
+
+#define INT64_MAX			LLONG_MAX
+#define INT64_MIN			LLONG_MIN
+#define UINT64_MAX			ULLONG_MAX
+
+#define INT_LEAST8_MAX		INT8_MAX
+#define INT_LEAST8_MIN		INT8_MIN
+#define UINT_LEAST8_MAX		INT8_MAX
+
+#endif /* TOPPERS_STDINT_TYPE1 */
+
+/*
+ *  æµ®åå°æ°ç¹åã«é¢ããå®ç¾©
+ *
+ *  TOPPERS_STDFLOAT_TYPE1: floatãIEEE754æºæ ã®åç²¾åº¦æµ®åå°æ°ç¹æ°ï¼
+ *							doubleãåç²¾åº¦æµ®åå°æ°ç¹æ°ã®å ´å
+ */
+#ifdef TOPPERS_STDFLOAT_TYPE1
+#ifndef TOPPERS_MACRO_ONLY
+
+typedef float		float32_t;			/* IEEE754æºæ ã®åç²¾åº¦æµ®åå°æ°ç¹æ° */
+typedef double		double64_t;			/* IEEE754æºæ ã®åç²¾åº¦æµ®åå°æ°ç¹æ° */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#define FLOAT32_MIN		1.17549435e-38F
+#define FLOAT32_MAX		3.40282347e+38F
+#define DOUBLE64_MIN	2.2250738585072014e-308
+#define DOUBLE64_MAX	1.7976931348623157e+308
+
+#endif /* TOPPERS_STDFLOAT_TYPE1 */
+#endif /* TOPPERS_TOOL_STDDEF_H */
Index: EcnlProtoTool/trunk/asp3_dcre/arch/tracelog/tTraceLog.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/tracelog/tTraceLog.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/tracelog/tTraceLog.c	(revision 270)
@@ -0,0 +1,331 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ãã¬ã¼ã¹ã­ã°æ©è½
+ */
+
+#include "tTraceLog_tecsgen.h"
+#include "kernel/kernel_impl.h"
+#include "kernel/task.h"
+#include "kernel/time_event.h"
+#include <sil.h>
+#include <log_output.h>
+#include "target_syssvc.h"
+
+/*
+ *  ãã¬ã¼ã¹æå»ã®åãåºã
+ *
+ *  ããã©ã«ãã§ã¯ï¼ã­ã°æå»ã¨ãã¦ï¼é«åè§£è½ã¿ã¤ãã®ã«ã¦ã³ãå¤ãç¨ãã¦
+ *  ããï¼ã¿ã¼ã²ããä¾å­ã§å¤æ´ããå ´åã«ã¯ï¼SYSLOG_GET_LOGTIMã«ï¼ã­ã°æ
+ *  å»ãåãåºããã¯ã­ãå®ç¾©ããï¼
+ */
+#ifndef SYSLOG_GET_LOGTIM
+#define SYSLOG_GET_LOGTIM(p_logtim) \
+				(*(p_logtim) = target_hrt_get_current())
+#endif /* SYSLOG_GET_TIM */
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã®éå§
+ */
+ER
+eTraceLog_start(MODE mode)
+{
+	if ((mode & TRACE_CLEAR) != 0U) {
+		VAR_count = 0U;
+		VAR_head = 0U;
+		VAR_tail = 0U;
+		mode &= ~TRACE_CLEAR;
+	}
+	VAR_mode = mode;
+	return(E_OK);
+}     
+
+/* 
+ *  ãã¬ã¼ã¹ã­ã°ã®æ¸è¾¼ã¿
+ */
+ER
+eTraceLog_write(const TRACE *p_trace)
+{
+	SIL_PRE_LOC;
+
+	if ((VAR_mode & (TRACE_RINGBUF | TRACE_AUTOSTOP)) != 0U) {
+		SIL_LOC_INT();
+
+		/*
+		 *  ãã¬ã¼ã¹æå»ã®è¨­å®
+		 */
+		SYSLOG_GET_LOGTIM(&(((SYSLOG *) p_trace)->logtim));
+
+		/*
+		 *  ãã¬ã¼ã¹ãããã¡ã«è¨é²
+		 */
+		VAR_logBuffer[VAR_tail] = *p_trace;
+		VAR_tail++;
+		if (VAR_tail >= ATTR_logBufferSize) {
+			VAR_tail = 0U;
+		}
+		if (VAR_count < ATTR_logBufferSize) {
+			VAR_count++;
+			if (VAR_count >= ATTR_logBufferSize
+						&& (VAR_mode & TRACE_AUTOSTOP) != 0U) {
+				VAR_mode = TRACE_STOP;
+			}
+		}
+		else {
+			VAR_head = VAR_tail;
+		}
+
+		SIL_UNL_INT();
+	}
+	return(E_OK);
+}
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã®èª­åºã
+ */
+ER
+eTraceLog_read(TRACE* p_trace)
+{
+	ER_UINT	ercd;
+	SIL_PRE_LOC;
+
+	SIL_LOC_INT();
+
+	/*
+	 *  ãã¬ã¼ã¹ã­ã°ãããã¡ããã®ååºã
+	 */
+	if (VAR_count > 0U) {
+		*p_trace = VAR_logBuffer[VAR_head];
+		VAR_count--;
+		VAR_head++;
+		if (VAR_head >= ATTR_logBufferSize) {
+			VAR_head = 0U;
+		}
+		ercd = E_OK;
+	}
+	else {
+		ercd = E_OBJ;
+	}
+
+	SIL_UNL_INT();
+	return(ercd);
+}
+
+/*
+ *  ã¢ã»ã³ããªè¨èªã§è¨è¿°ãããã³ã¼ããããã¬ã¼ã¹ã­ã°ãåºåããããã®é¢
+ *  æ°
+ */
+
+void
+log_dsp_enter(TCB *p_tcb)
+{
+	trace_1(LOG_TYPE_DSP|LOG_ENTER, p_tcb);
+}
+
+void
+log_dsp_leave(TCB *p_tcb)
+{
+	trace_1(LOG_TYPE_DSP|LOG_LEAVE, p_tcb);
+}
+
+void
+log_inh_enter(INHNO inhno)
+{
+	trace_1(LOG_TYPE_INH|LOG_ENTER, inhno);
+}
+
+void
+log_inh_leave(INHNO inhno)
+{
+	trace_1(LOG_TYPE_INH|LOG_LEAVE, inhno);
+}
+
+void
+log_exc_enter(EXCNO excno)
+{
+	trace_1(LOG_TYPE_EXC|LOG_ENTER, excno);
+}
+
+void
+log_exc_leave(EXCNO excno)
+{
+	trace_1(LOG_TYPE_EXC|LOG_LEAVE, excno);
+}
+
+/* 
+ *  ã«ã¼ãã«æ
+å ±ã®ååºã
+ */
+static intptr_t
+get_tskid(intptr_t info)
+{
+	TCB		*p_tcb;
+	ID		tskid;
+
+	p_tcb = (TCB *) info;
+	if (p_tcb == NULL) {
+		tskid = 0;
+	}
+	else {
+		tskid = TSKID(p_tcb);
+	}
+	return((intptr_t) tskid);
+}
+
+static intptr_t
+get_tskstat(intptr_t info)
+{
+	uint_t		tstat;
+	const char	*tstatstr;
+
+	tstat = (uint_t) info;
+	if (TSTAT_DORMANT(tstat)) {
+		tstatstr = "DORMANT";
+	}
+	else {
+		if (TSTAT_SUSPENDED(tstat)) {
+			if (TSTAT_WAITING(tstat)) {
+				tstatstr = "WAITING-SUSPENDED";
+			}
+			else {
+				tstatstr = "SUSPENDED";
+			}
+		}
+		else if (TSTAT_WAITING(tstat)) {
+			tstatstr = "WAITING";
+		}
+		else {
+			tstatstr = "RUNNABLE";
+		}
+	}
+	return((intptr_t) tstatstr);
+}
+
+/* 
+ *  ãã¬ã¼ã¹ã­ã°ã®è¡¨ç¤º
+ */
+static void
+trace_print(TRACE *p_trace, void (*putc)(char))
+{
+	intptr_t	traceinfo[TNUM_LOGPAR + 1];
+	const char	*tracemsg;
+	int_t		i;
+
+	traceinfo[0] = (intptr_t)(p_trace->logtim);
+	syslog_printf("[%d] ", traceinfo, putc);
+
+	switch (p_trace->logtype) {
+	case LOG_TYPE_TSKSTAT:
+		traceinfo[0] = get_tskid(p_trace->logpar[0]);
+		traceinfo[1] = get_tskstat(p_trace->logpar[1]);
+		tracemsg = "task %d becomes %s.";
+		break;
+	case LOG_TYPE_DSP|LOG_LEAVE:
+		traceinfo[0] = get_tskid(p_trace->logpar[0]);
+		tracemsg = "dispatch to task %d.";
+		break;
+	case LOG_TYPE_COMMENT:
+		for (i = 1; i < TNUM_LOGPAR; i++) {
+			traceinfo[i-1] = p_trace->logpar[i];
+		}
+		tracemsg = (const char *)(p_trace->logpar[0]);
+		break;
+	case LOG_TYPE_ASSERT:
+		traceinfo[0] = p_trace->logpar[0];
+		traceinfo[1] = p_trace->logpar[1];
+		traceinfo[2] = p_trace->logpar[2];
+		tracemsg = "%s:%u: Assertion `%s' failed.";
+		break;
+	default:
+		traceinfo[0] = p_trace->logtype;
+		tracemsg = "unknown trace log type: %d.";
+		break;
+	}
+	syslog_printf(tracemsg, traceinfo, putc);
+	(*putc)('\n');
+}
+
+/*
+ *  ä½ã¬ãã«åºåã®å¼åºãé¢æ°
+ */
+static void
+low_putchar(char c)
+{
+	cPutLog_putChar(c);
+}
+
+/* 
+ *  ãã¬ã¼ã¹ã­ã°ã®ãã³ã
+ */
+void
+eTraceLog_dump(void)
+{
+	TRACE	trace;
+
+	while (trace_rea_log(&trace) >= 0) {
+		trace_print(&trace, low_putchar);
+	}
+}
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã®ãã³ãï¼åãå£é¢æ°ï¼
+ */
+void
+tTraceLog_eDump_main(uintptr_t exinf)
+{
+	eTraceLog_dump();
+}
Index: EcnlProtoTool/trunk/asp3_dcre/arch/tracelog/tTraceLog.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/tracelog/tTraceLog.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/tracelog/tTraceLog.cdl	(revision 270)
@@ -0,0 +1,114 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ãã¬ã¼ã¹ã­ã°æ©è½ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+ */
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°åºåã«é¢ããå®ç¾©
+ */
+import_C("arch/tracelog/trace_log.h");
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°æ©è½ã®ã·ã°ããã£
+ */
+signature sTraceLog {
+	/*
+	 *  ãã¬ã¼ã¹ã­ã°ã®éå§
+	 */
+	ER		start([in] MODE mode);
+
+	/*
+	 *  ãã¬ã¼ã¹ã­ã°ã®æ¸è¾¼ã¿
+	 */
+	ER		write([in] const TRACE *p_trace);
+
+	/*
+	 *  ãã¬ã¼ã¹ã­ã°ã®èª­åºã
+	 */
+	ER		read([out] TRACE *p_trace);
+
+	/*
+	 *  ãã¬ã¼ã¹ã­ã°ã®ãã³ã
+	 */
+	void	dump(void);
+};
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°æ©è½ã®ã»ã«ã¿ã¤ã
+ */
+[singleton, active]
+celltype tTraceLog {
+	entry	sTraceLog		eTraceLog;
+	entry	sRoutineBody	eDump;		/* çµäºå¦çã«ã¼ãã³ã¨ã®æ¥ç¶ */
+	call	sPutLog			cPutLog;	/* ä½ã¬ãã«åºåã¨ã®æ¥ç¶ */
+
+	attr {
+		uint_t	logBufferSize;			/* ã­ã°ãããã¡ãµã¤ãº */
+		MODE	initialMode = C_EXP("TRACE_STOP");
+										/* åæåå¾ã®ã¢ã¼ã */
+	};
+	var {
+		[size_is(logBufferSize)] TRACE	*logBuffer;	/* ã­ã°ãããã¡ */
+		uint_t	count = 0;				/* ã­ã°ãããã¡ä¸­ã®ã­ã°ã®æ° */
+		uint_t	head = 0;				/* å
+é ­ã®ã­ã°ã®æ ¼ç´ä½ç½® */
+		uint_t	tail = 0;				/* æ¬¡ã®ã­ã°ã®æ ¼ç´ä½ç½® */
+		MODE	mode = initialMode;		/* ãã¬ã¼ã¹ã¢ã¼ã */
+	};
+};
Index: EcnlProtoTool/trunk/asp3_dcre/arch/tracelog/trace_log.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/arch/tracelog/trace_log.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/arch/tracelog/trace_log.h	(revision 270)
@@ -0,0 +1,228 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ãã¬ã¼ã¹ã­ã°ã«é¢ããè¨­å®
+ *
+ *  ãã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã¯ï¼target_kernel_impl.hããã³
+ *  target_syssvc.hã®ã¿ããã¤ã³ã¯ã«ã¼ããããï¼ã¾ãï¼ãã¬ã¼ã¹ã­ã°æ©è½ã®
+ *  åæåãè¨é²ã®éå§ï¼åæ­¢ï¼ãã¬ã¼ã¹ã­ã°ã®ãã³ããè¡ããã­ã°ã©ã ãã
+ *  ã¤ã³ã¯ã«ã¼ããããã¨ãæ³å®ãã¦ããï¼
+ */
+
+#ifndef TOPPERS_TRACE_CONFIG_H
+#define TOPPERS_TRACE_CONFIG_H
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã®ãã¼ã¿æ§é 
+ *
+ *  ã·ã¹ãã ã­ã°æ©è½ã®ã­ã°æ
+å ±ã®ãã¼ã¿æ§é ã¨åããã®ãç¨ããï¼
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+#include <t_syslog.h>
+typedef	SYSLOG	TRACE;
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  ãã¬ã¼ã¹ã¢ã¼ãã®å®ç¾©
+ */
+#define TRACE_STOP			UINT_C(0x00)	/* ãã¬ã¼ã¹åæ­¢ */
+#define TRACE_RINGBUF		UINT_C(0x01)	/* ãªã³ã°ãããã¡ã¢ã¼ã */
+#define TRACE_AUTOSTOP		UINT_C(0x02)	/* èªååæ­¢ã¢ã¼ã */
+#define TRACE_CLEAR			UINT_C(0x04)	/* ãã¬ã¼ã¹ã­ã°ã®ã¯ãªã¢ */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  TECSã§è¨è¿°ããããã¹ããã­ã°ã©ã ç¨ã®ãµã¼ãã¹ãç´æ¥å¼ã³åºãããã®å®ç¾©
+ *
+ *  Cè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããï¼TECSã§è¨è¿°ããããã¬ã¼ã¹ã­ã°
+ *  æ©è½ãå¼ã³åºãããã«ã¯ï¼ã¢ããã¿ãç¨ããã®ãæ­£å½ãªæ¹æ³ã§ãããï¼ã
+ *  ã¬ã¼ã¹ã­ã°æ©è½ãã·ã³ã°ã«ãã³ã§ãããã¨ãå©ç¨ãã¦ç´æ¥å¼ã³åºãï¼
+ */
+extern ER	tTraceLog_eTraceLog_start(MODE mode);
+extern ER	tTraceLog_eTraceLog_write(const TRACE *p_trace);
+extern ER	tTraceLog_eTraceLog_read(TRACE* p_trace);
+extern void	tTraceLog_eTraceLog_dump(void);
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã®éå§
+ *
+ *  ãã¬ã¼ã¹ã­ã°ã®è¨é²ãéå§ï¼åæ­¢ããï¼å¼æ°ã«ããæ¬¡ã®åä½ãè¡ãï¼
+ *
+ *  TRACE_STOPï¼ãã¬ã¼ã¹ãåæ­¢ï¼
+ *  TRACE_RINGBUFï¼ãªã³ã°ãããã¡ã¢ã¼ãã§ãã¬ã¼ã¹ãéå§ï¼
+ *  TRACE_AUTOSTOPï¼èªååæ­¢ã¢ã¼ãã§ãã¬ã¼ã¹ãéå§ï¼
+ *  TRACE_CLEARï¼ãã¬ã¼ã¹ã­ã°ãã¯ãªã¢ï¼
+ */
+Inline ER
+trace_sta_log(MODE mode)
+{
+	return(tTraceLog_eTraceLog_start(mode));
+}
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã®æ¸è¾¼ã¿
+ */
+Inline ER
+trace_wri_log(TRACE *p_trace)
+{
+	return(tTraceLog_eTraceLog_write(p_trace));
+}
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã®èª­åºã
+ */
+Inline ER
+trace_rea_log(TRACE *p_trace)
+{
+	return(tTraceLog_eTraceLog_read(p_trace));
+}
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãåºåããããã®ã©ã¤ãã©ãªé¢æ°
+ */
+
+Inline void
+trace_write_0(uint_t type)
+{
+	TRACE	trace;
+
+	trace.logtype = type;
+	(void) trace_wri_log(&trace);
+}
+
+Inline void
+trace_write_1(uint_t type, intptr_t arg1)
+{
+	TRACE	trace;
+
+	trace.logtype = type;
+	trace.logpar[0] = arg1;
+	(void) trace_wri_log(&trace);
+}
+
+Inline void
+trace_write_2(uint_t type, intptr_t arg1, intptr_t arg2)
+{
+	TRACE	trace;
+
+	trace.logtype = type;
+	trace.logpar[0] = arg1;
+	trace.logpar[1] = arg2;
+	(void) trace_wri_log(&trace);
+}
+
+Inline void
+trace_write_3(uint_t type, intptr_t arg1, intptr_t arg2, intptr_t arg3)
+{
+	TRACE	trace;
+
+	trace.logtype = type;
+	trace.logpar[0] = arg1;
+	trace.logpar[1] = arg2;
+	trace.logpar[2] = arg3;
+	(void) trace_wri_log(&trace);
+}
+														
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãåºåããããã®ãã¯ã­
+ */
+
+#define trace_0(type) \
+				trace_write_0(type)
+
+#define trace_1(type, arg1) \
+				trace_write_1(type, (intptr_t)(arg1))
+
+#define trace_2(type, arg1, arg2) \
+				trace_write_2(type, (intptr_t)(arg1), (intptr_t)(arg2))
+
+#define trace_3(type, arg1, arg2, arg3) \
+				trace_write_3(type, (intptr_t)(arg1), (intptr_t)(arg2), \
+														(intptr_t)(arg3))
+
+/* 
+ *  ãã¬ã¼ã¹ã­ã°ã®ãã³ã
+ *
+ *  ãã¬ã¼ã¹ã­ã°ããã³ãããï¼çµäºå¦çã«ã¼ãã³ã¨ãã¦ç»é²ãããã¨ãæ³å®
+ *  ãã¦ããï¼å¼æ°ã¨ãã¦ï¼ãã³ãå
+ã¨ãªãæå­åºåé¢æ°ã¸ã®ãã¤ã³ã¿ãæ¸¡ãï¼
+ *  ã¿ã¼ã²ããä¾å­ã®ä½ã¬ãã«æå­åºåãå©ç¨ããå ´åã«ã¯ï¼target_putcãæ¸¡
+ *  ãï¼
+ */
+Inline void
+trace_dump(void)
+{
+	tTraceLog_eTraceLog_dump();
+}
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°æ¹æ³ã®è¨­å®
+ */
+#define LOG_TSKSTAT(p_tcb)		trace_2(LOG_TYPE_TSKSTAT, p_tcb, p_tcb->tstat)
+
+#define LOG_DSP_LEAVE(p_tcb)	trace_1(LOG_TYPE_DSP|LOG_LEAVE, p_tcb)
+
+#define LOG_TSYSLOG_ESYSLOG_WRITE_ENTER(priority, p_syslog) \
+								trace_wri_log((TRACE *) p_syslog)
+
+#endif /* TOPPERS_TRACE_CONFIG_H */
Index: EcnlProtoTool/trunk/asp3_dcre/cfg/GenFile.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/cfg/GenFile.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/cfg/GenFile.rb	(revision 270)
@@ -0,0 +1,123 @@
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS Configurator by Ruby
+#
+#  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2016 by APTJ Co., Ltd., JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: GenFile.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#
+
+#
+#		ãã¡ã¤ã«ä½æã¯ã©ã¹
+#
+
+#
+# ãã¡ã¤ã«ã«æ¸ããã¨ããå
+å®¹ãå¤æ°ã«èç©ãï¼ãã­ã°ã©ã ã®çµäºæï¼output
+# ã¡ã½ãããå¼ã°ããæï¼ã«ãã¡ã¤ã«ã«åºåããï¼æ¢ã«ãã¡ã¤ã«ãå­å¨ãï¼å·®
+# åããªãå ´åã¯åºåããªãï¼ã¿ã¤ã ã¹ã¿ã³ããæ´æ°ããªãï¼ï¼
+#
+class GenFile
+  @@fileDataHash = {}
+
+  def initialize(fileName)
+    @selfFileName = fileName
+    if !@@fileDataHash.has_key?(fileName)
+      @@fileDataHash[@selfFileName] = ""
+    end
+  end
+
+  # ãã¡ã¤ã«ãã¼ã¿ã®æ«å°¾ã«æå­åãè¿½å ãã
+  def append(code = "")
+    @@fileDataHash[@selfFileName] << code
+  end
+
+  # ãã¡ã¤ã«ãã¼ã¿ã«1è¡è¿½å ãã
+  def add(code = "")
+    @@fileDataHash[@selfFileName] << code << "\n"
+  end
+
+  # ãã¡ã¤ã«ãã¼ã¿ã«1è¡è¿½å ãã(æ¹è¡2å)
+  def add2(code = "")
+    add(code + "\n")
+  end
+
+  # ã³ã¡ã³ãããããè¿½å ãã
+  def comment_header(comment)
+    add("/*")
+    comment.split("\n").each do |sLine|
+      add(" *  " + sLine)
+    end
+    add2(" */")
+  end
+
+  # ãã¡ã¤ã«ãã¼ã¿ãè¡¨ç¤ºãã
+  def print()
+    puts(@@fileDataHash[@selfFileName])
+  end
+
+  # å
+¨ãã¡ã¤ã«ãåºåãã
+  def self.output()
+    @@fileDataHash.each do |fileName, fileData|
+      # æ¢ã«ãã¡ã¤ã«ãå­å¨ãï¼å·®åããªãå ´åã¯åºåããªã
+      #ï¼ã¿ã¤ã ã¹ã¿ã³ããæ´æ°ããªãï¼
+      if File.exist?(fileName)
+        if fileData == File.read(fileName)
+          next
+        end
+      end
+      File.open(fileName, "w") do |file|
+        puts("[#{File.basename($0)}] Generated #{fileName}")
+        file.puts(fileData)
+      end
+    end
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/cfg/MANIFEST
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/cfg/MANIFEST	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/cfg/MANIFEST	(revision 270)
@@ -0,0 +1,8 @@
+MANIFEST
+cfg.rb
+pass1.rb
+pass2.rb
+GenFile.rb
+SRecord.rb
+
+doc/cfg_user.txt
Index: EcnlProtoTool/trunk/asp3_dcre/cfg/SRecord.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/cfg/SRecord.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/cfg/SRecord.rb	(revision 270)
@@ -0,0 +1,190 @@
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS Configurator by Ruby
+#
+#  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: SRecord.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#
+
+#
+#		Sã¬ã³ã¼ããã¡ã¤ã«å¦çã¯ã©ã¹
+#
+
+#
+# Sã¬ã³ã¼ããã¡ã¤ã«ãå¤æ°ã«èª­ã¿è¾¼ã¿ï¼è¦æ±ãããçªå°ã®ãã¼ã¿ãè¿ãï¼
+#
+# @sRecDataã¯ï¼å
+é ­çªå°ãã­ã¼ã¨ãï¼ããããã®ãã¼ã¿ï¼ãã­ãµãã³ãå½¢å¼ï¼
+# ãå¤ã¨ãã­ãã¯ãæ ¼ç´ãããããã·ã¥ã§ããï¼é£ç¶ãããã­ãã¯ã¯ï¼1ã¤ã®ã
+# ã­ãã¯ã«ã¾ã¨ãã¦æ ¼ç´ãããã®ã¨ããï¼ããããªãã¨ï¼ãã¼ã¿ã®ååºãããµã¼
+# ããé¢åã«ãªãï¼ï¼
+#
+class SRecord
+  def initialize(fileName)
+    @sRecData = {}
+    File.open(fileName) do |file|
+      prevAddress = 0
+      prevData = ""
+      file.each do |line|
+        # ãã¼ã¿ã¬ã³ã¼ãã«ããåå²
+        case line.slice(0, 2)
+        when "S1"
+          # ãã¼ã¿é·ï¼ã¢ãã¬ã¹å[2byte]+ãã§ãã¯ãµã å1byteãæ¸ç®ï¼
+          length = line.slice(2, 2).hex - 2 - 1
+
+          # ã¢ãã¬ã¹ï¼4æå­=2byteï¼
+          address = line.slice(4, 4).hex
+
+          # ãã¼ã¿ï¼ãã®æç¹ã§ã¯æå­åã§åã£ã¦ããï¼
+          data = line.slice(8, length * 2)
+        when "S2"
+          # ãã¼ã¿é·ï¼ã¢ãã¬ã¹å[3byte]+ãã§ãã¯ãµã å1byteãæ¸ç®ï¼
+          length = line.slice(2, 2).hex - 3 - 1
+
+          # ã¢ãã¬ã¹ï¼6æå­=3byteï¼
+          address = line.slice(4, 6).hex
+
+          # ãã¼ã¿ï¼ãã®æç¹ã§ã¯æå­åã§åã£ã¦ããï¼
+          data = line.slice(10, length * 2)
+        when "S3"
+          # ãã¼ã¿é·ï¼ã¢ãã¬ã¹å[4byte]+ãã§ãã¯ãµã å1byteãæ¸ç®ï¼
+          length = line.slice(2, 2).hex - 4 - 1
+
+          # ã¢ãã¬ã¹ï¼8æå­=4byteï¼
+          address = line.slice(4, 8).hex
+
+          # ãã¼ã¿ï¼ãã®æç¹ã§ã¯æå­åã§åã£ã¦ããï¼
+          data = line.slice(12, length * 2)
+        else
+          address = nil
+        end
+
+        if !address.nil?
+          # ãã¼ã¿ãæ ¼ç´ãã
+          if address == prevAddress + prevData.size / 2
+            prevData << data
+          else
+            set_data(prevAddress, prevData) if prevData.size > 0
+            prevAddress = address
+            prevData = data
+          end
+        end
+      end
+      set_data(prevAddress, prevData) if prevData.size > 0
+    end
+  end
+
+  # ãã¼ã¿åå¾
+  def get_data(address, size)
+    endAddress = address + size
+    @sRecData.each do |block, blockData|
+      if (block <= address && endAddress <= block + blockData.size / 2)
+        offset = (address - block) * 2
+        return(blockData[offset, size * 2])
+      end
+    end
+    return(nil)
+  end
+
+  # ãã¼ã¿æ¸è¾¼ã¿
+  def set_data(address, data)
+    endAddress = address + data.size / 2
+    @sRecData.each do |block, blockData|
+      nEndBlock = block + blockData.size / 2
+
+      if nEndBlock < address || endAddress < block
+        # éãªãããªã
+      elsif address < block
+        # æ°è¦ãã¼ã¿ã®æ¹ãå
+é ­çªå°ãå°ãã
+        # ããã§ã¯ endAddress >= block ãæç«ãã¦ãã
+        offset = (endAddress - block) * 2
+        data << blockData[offset..-1]
+        @sRecData.delete(block)
+      else
+        # ç»é²æ¸ã¿ãã¼ã¿ã®æ¹ãå
+é ­çªå°ãå°ãããåã
+        offset = (address - block) * 2
+        address = block
+        blockData[offset, data.size] = data
+        data = blockData
+        @sRecData.delete(block)
+      end
+    end
+    @sRecData[address] = data
+  end
+
+  # å¤ã¨ãã¦ã®ãã¼ã¿åå¾
+  def get_value(address, size, signed)
+    targetData = get_data(address, size)
+    if targetData.nil?
+      return(nil)
+    else
+      if $endianLittle
+        # ãªãã«ã¨ã³ãã£ã¢ã³ã®å ´åï¼ãã¤ããªã¼ãã¼ãéã«ãã
+        reverseData = ""
+        # å¾ããã2æå­ãã¤æãåºãï¼ä¸¦ã³æ¿ãã
+        while targetData.size > 0
+          reverseData << targetData[-2, 2]
+          targetData.slice!(-2, 2)
+        end
+        returnData = reverseData.hex
+      else
+        returnData = targetData.hex
+      end
+
+      # è² ã®æ°ã®å¦ç
+      if signed && (returnData & (1 << (size * 8 - 1))) != 0
+        returnData -= (1 << (size * 8))
+      end
+      return(returnData)
+    end
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/cfg/cfg.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/cfg/cfg.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/cfg/cfg.rb	(revision 270)
@@ -0,0 +1,747 @@
+#!/usr/bin/env ruby
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS Configurator by Ruby
+#
+#  Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: cfg.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#
+
+if $0 == __FILE__
+  TOOL_ROOT = File.expand_path(File.dirname(__FILE__)) + "/"
+  $LOAD_PATH.unshift(TOOL_ROOT)
+end
+
+require "pp"
+require "csv"
+require "optparse"
+require "pstore"
+require "GenFile.rb"
+require "SRecord.rb"
+
+#
+#  å®æ°å®ç¾©
+#
+# å
+±é
+VERSION = "1.2.2"
+
+# cfg1_outé¢ä¿
+CFG1_PREFIX        = "TOPPERS_cfg_"
+CFG1_MAGIC_NUM     = "TOPPERS_magic_number"
+CFG1_SIZEOF_SIGNED = "TOPPERS_sizeof_signed_t"
+CFG1_OUT_C         = "cfg1_out.c"
+CFG1_OUT_DB        = "cfg1_out.db"
+CFG1_OUT_SREC      = "cfg1_out.srec"
+CFG1_OUT_SYMS      = "cfg1_out.syms"
+CFG1_OUT_TIMESTAMP = "cfg1_out.timestamp"
+CFG1_OUT_TARGET_H  = "target_cfg1_out.h"
+
+# cfg2_outé¢ä¿
+CFG2_OUT_DB        = "cfg2_out.db"
+
+# cfg3_outé¢ä¿
+CFG3_OUT_DB        = "cfg3_out.db"
+
+#
+#  ã¨ã©ã¼çºçæç¡ãã©ã°
+#
+$errorFlag = false
+
+#
+#  ã¨ã©ã¼ï¼è­¦åè¡¨ç¤ºé¢æ°
+#
+# ä¸è¬çãªã¨ã©ã¼è¡¨ç¤ºï¼å¦çãä¸­æ­ï¼
+def error_exit(message, location = "")
+  location += " " if location != ""
+  abort("#{location}error: #{message}")
+end
+
+# ä¸è¬çãªã¨ã©ã¼è¡¨ç¤ºï¼å¦çãç¶ç¶ï¼
+def error(message, location = "")
+  location += " " if location != ""
+  STDERR.puts("#{location}error: #{message}")
+  $errorFlag = true
+end
+
+# ä¸è¬çãªè­¦åè¡¨ç¤º
+def warning(message, location = "")
+  location += " " if location != ""
+  STDERR.puts("#{location}warning: #{message}")
+end
+
+# ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®æ§æè§£ææã®ã¨ã©ã¼
+$noParseError = 0
+def parse_error(cfgFile, message)
+  error(message, "#{cfgFile.getFileName()}:#{cfgFile.getLineNo}:")
+  if ($noParseError += 1) >= 10
+    abort("too many errors emitted, stopping now")
+  end
+end
+
+# ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®æ§æè§£ææã®è­¦å
+def parse_warning(cfgFile, message)
+  warning(message, "#{cfgFile.getFileName()}:#{cfgFile.getLineNo}:")
+end
+
+#
+#  éçAPIå¦çæã®ã¨ã©ã¼ï¼è­¦åè¡¨ç¤ºé¢æ°
+#
+# éçAPIå¦çæã®ã¨ã©ã¼ï¼è­¦åãç­ãè¨è¿°ã§ããããã«ï¼ã¡ãã»ã¼ã¸ä¸­ã®%ã¾
+# ãã¯%%ã§å§ã¾ãè¨è¿°ãä»¥ä¸ã®ããã«å±éããï¼
+#	%label â #{params[:label]}
+#	%%label â label `#{params[:label]}'
+#
+# ã¨ã©ã¼ï¼è­¦åã¡ãã»ã¼ã¸ã®å±é
+def expand_message(message, params)
+  result = message.dup
+  while /%%(\w+)\b/ =~ result
+    param = $1
+    paramVal = params[param.to_sym].to_s
+    result.sub!(/%%#{param}\b/, "#{param} `#{paramVal}'")
+  end
+  while /%(\w+)\b/ =~ result
+    param = $1
+    paramVal = params[param.to_sym].to_s
+    result.sub!(/%#{param}\b/, paramVal)
+  end
+  return(result)
+end
+
+# éçAPIå¦çæã®ã¨ã©ã¼
+def error_api(params, message)
+  error(expand_message(message, params), \
+			"#{params[:_file_]}:#{params[:_line_]}:")
+end
+
+# éçAPIå¦çæã®è­¦å
+def warning_api(params, message)
+  warning(expand_message(message, params), \
+			"#{params[:_file_]}:#{params[:_line_]}:")
+end
+
+# éçAPIå¦çæã®ã¨ã©ã¼ï¼ã¨ã©ã¼ã³ã¼ãä»ãï¼
+def error_ercd(errorCode, params, message)
+  error_api(params, "#{errorCode}: #{message}")
+end
+
+# éçAPIå¦çæã®è­¦åï¼ã¨ã©ã¼ã³ã¼ãä»ãï¼
+def warning_ercd(errorCode, params, message)
+  warning_api(params, "#{errorCode}: #{message}")
+end
+
+# ãã©ã¡ã¼ã¿ã®ã¨ã©ã¼
+def error_wrong(errorCode, params, symbol, wrong)
+  error_ercd(errorCode, params, "%%#{symbol} is #{wrong} in %apiname")
+end
+
+def error_wrong_id(errorCode, params, symbol, objid, wrong)
+  error_ercd(errorCode, params, "%%#{symbol} is #{wrong} " \
+	             					"in %apiname of %#{objid}")
+end
+
+def error_wrong_sym(errorCode, params, symbol, symbol2, wrong)
+  error_ercd(errorCode, params, "%%#{symbol} is #{wrong} " \
+									"in %apiname of %%#{symbol2}")
+end
+
+# ãã©ã¡ã¼ã¿ä¸æ­£ã®ã¨ã©ã¼
+def error_illegal(errorCode, params, symbol)
+  error_ercd(errorCode, params, "illegal %%#{symbol} in %apiname")
+end
+
+def error_illegal_id(errorCode, params, symbol, objid)
+  error_ercd(errorCode, params, "illegal %%#{symbol} " \
+	             					"in %apiname of %#{objid}")
+end
+
+def error_illegal_sym(errorCode, params, symbol, symbol2)
+  error_ercd(errorCode, params, "illegal %%#{symbol} " \
+									"in %apiname of %%#{symbol2}")
+end
+
+#
+#  Stringã¯ã©ã¹ã®æ¡å¼µï¼äºéå¼ç¨ç¬¦ã§å²ã¾ããæå­åã®ä½æï¼å±éï¼
+#
+class String
+  #
+  #  äºéå¼ç¨ç¬¦ã§å²ã¾ããæå­åã®ä½æ
+  #
+  def quote
+    result = ""
+    self.chars do |c|
+      case c
+      when "'"
+        result += "\\\'"
+      when "\""
+        result += "\\\""
+      when "\0"
+        result += "\\0"
+      when "\a"
+        result += "\\a"
+      when "\b"
+        result += "\\b"
+      when "\f"
+        result += "\\f"
+      when "\n"
+        result += "\\n"
+      when "\r"
+        result += "\\r"
+      when "\t"
+        result += "\\t"
+      when "\v"
+        result += "\\v"
+      when "\\"
+        result += "\\\\"
+      else
+        result += c
+      end
+    end
+    return("\"" + result + "\"")
+  end
+
+  #
+  #  äºéå¼ç¨ç¬¦ã§å²ã¾ããæå­åã®å±é
+  #
+  def unquote
+    if /^\"(.*)\"$/m =~ self
+      str = $1
+      result = ""
+      while (/^(.*)\\(.*)$/m =~ str)
+        result += $1
+        str = $2
+        case str
+        when /^[aA](.*)$/m
+          result += "\a"
+          str = $1
+        when /^[bB](.*)$/m
+          result += "\b"
+          str = $1
+        when /^[fF](.*)$/m
+          result += "\f"
+          str = $1
+        when /^[nN](.*)$/m
+          result += "\n"
+          str = $1
+        when /^[rR](.*)$/m
+          result += "\r"
+          str = $1
+        when /^[tT](.*)$/m
+          result += "\t"
+          str = $1
+        when /^[vV](.*)$/m
+          result += "\v"
+          str = $1
+        when /^[xX]([0-9a-fA-F][0-9a-fA-F]?)(.*)$/m
+          result += $1.hex
+          str = $2
+        when /^([0-7][0-7]?[0-7]?)(.*)$/m
+          result += $1.oct
+          str = $2
+        when /^\\(.*)$/m
+          result += "\\"
+          str = $1
+        end
+      end
+      return(result + str)
+    else
+      return(self.dup)
+    end
+  end
+end
+
+#
+#  NumStrã¯ã©ã¹ï¼æ°å¤ã«æå­åãä»å ãããã®ï¼ã®å®ç¾©
+#
+class NumStr
+  def initialize(val, str = val.to_s)
+    @val = val
+    @str = str
+  end
+
+  # æ°å¤æ
+å ±ãè¿ã
+  def val
+    return @val
+  end
+  alias_method :to_i, :val
+
+  # æå­åæ
+å ±ãè¿ã
+  def str
+    return @str
+  end
+  alias_method :to_s, :str
+
+  # æ¯è¼ã¯æ°å¤æ
+å ±ã§è¡ã
+  def ==(other)
+    @val == other
+  end
+  def !=(other)
+    @val != other
+  end
+  def <=>(other)
+    @val <=> other
+  end
+
+  # ããã·ã¥ã®ã­ã¼ã¨ãã¦ä½¿ãæã®æ¯è¼ãæ°å¤æ
+å ±ã§è¡ã
+  def eql?(other)
+    @val == other.val
+  end
+
+  # ããã·ã¥å¤ã®å®ç¾©ãä¸æ¸ããã
+  def hash
+    return @val.hash
+  end
+
+  # æ°å¤ã¯ã©ã¹ã¨æ¼ç®ã§ããããã«ãã
+  def coerce(other)
+    if other.kind_of?(Numeric)
+      return other, @val
+    else
+      raise
+    end
+  end
+
+  # äºéå¼ç¨ç¬¦ã§å²ã¾ããæå­åã®ä½æ
+  def quote
+    str.quote
+  end
+
+  # äºéå¼ç¨ç¬¦ã§å²ã¾ããæå­åã®å±é
+  def unquote
+    str.unquote
+  end
+
+  # ppæã®è¡¨ç¤º
+  def pretty_print(q)
+    q.text("[#{@val}(=0x#{@val.to_s(16)}),")
+    @str.pretty_print(q)
+    q.text("]")
+  end
+
+  # æªå®ç¾©ã®ã¡ã½ããã¯@valã«éã
+  def method_missing(*method)
+    @val.send(*method)
+  end
+end
+
+#
+#  ã·ã³ãã«ãã¡ã¤ã«ã®èª­ã¿è¾¼ã¿
+#
+#  ä»¥ä¸ã®ã¡ã½ããã¯ï¼GNUã®nmãçæããã·ã³ãã«ãã¡ã¤ã«ã«å¯¾å¿ãã¦ããï¼
+#  å¥ã®ãã¼ã«ã«å¯¾å¿ããå ´åã«ã¯ï¼ãã®ã¡ã½ãããæ¸ãæããã°ããï¼
+#
+def ReadSymbolFile(symbolFileName)
+  begin
+    symbolFile = File.open(symbolFileName)
+  rescue Errno::ENOENT, Errno::EACCES => ex
+    abort(ex.message)
+  end
+
+  symbolAddress = {}
+  symbolFile.each do |line|
+    # ã¹ãã¼ã¹åºåãã§åè§£
+    fields = line.split(/\s+/)
+
+    # 3åã«ãªã£ã¦ããªãè¡ã¯é¤å¤
+    if fields.size == 3
+      symbolAddress[fields[2]] = fields[0].hex
+    end
+  end
+  symbolFile.close
+  return(symbolAddress)
+end
+
+#
+#  å¤åå¾ã·ã³ãã«ãã°ã­ã¼ãã«å¤æ°ã¨ãã¦å®ç¾©ãã
+#
+def DefineSymbolValue
+  $symbolValueTable.each do |symbolName, symbolData|
+    if symbolData.has_key?(:VALUE)
+      eval("$#{symbolName} = #{symbolData[:VALUE]}")
+    end
+  end
+end
+
+#
+#  ã¤ã³ã¯ã«ã¼ããã¹ãããã¡ã¤ã«ãæ¢ã
+#
+def SearchFilePath(fileName)
+  if File.exist?(fileName)
+    # æå®ãããã¡ã¤ã«ãã¹ã«å­å¨ãã
+    return fileName
+  elsif /^\./ =~ fileName
+    # ç¸å¯¾ãã¹ãæå®ãã¦ãã¦è¦ã¤ãããªãã£ãå ´åï¼å­å¨ããªããã®ã¨ãã
+    #ï¼æå³ããªããã¡ã¤ã«ãå¯¾è±¡ã¨ãªããã¨ãé²æ­¢ï¼
+    return nil
+  else
+    # åã¤ã³ã¯ã«ã¼ããã¹ãããã¡ã¤ã«å­å¨ãã§ãã¯
+    $includeDirectories.each do |includeDirectory|
+      path = includeDirectory + "/" + fileName
+      # è¦ã¤ãã£ããç¸å¯¾ãã¹ãè¿ã
+      if File.exist?(path)
+        return path
+      end
+    end
+    return nil
+  end
+end
+
+#
+#  æå®ããçæã¹ã¯ãªããï¼trbãã¡ã¤ã«ï¼ãæ¤ç´¢ãã¦loadãã
+#
+def IncludeTrb(fileName)
+  filePath = SearchFilePath(fileName)
+  if filePath.nil?
+    error_exit("`#{fileName}' not found")
+  else
+    load(filePath)
+  end
+end
+
+#
+#  ãã¹3ã®å¦ç
+#
+def Pass3
+  #
+  #  ãã¹2ããå¼ãæ¸¡ãããæ
+å ±ããã¡ã¤ã«ããèª­ã¿è¾¼ã
+  #
+  db = PStore.new(CFG2_OUT_DB)
+  db.transaction(true) do
+    $apiDefinition = db[:apiDefinition]
+    $symbolValueTable = db[:symbolValueTable]
+    $cfgFileInfo = db[:cfgFileInfo]
+    $includeFiles = db[:includeFiles]
+    $cfgData = db[:cfgData]
+    $asmLabel = db[:asmLabel]
+    $endianLittle = db[:endianLittle]
+    $cfg2Data = db[:cfg2Data]
+  end
+  $cfg3Data = {}
+
+  #
+  #  å¤åå¾ã·ã³ãã«ãã°ã­ã¼ãã«å¤æ°ã¨ãã¦å®ç¾©ãã
+  #
+  DefineSymbolValue()
+
+  #
+  #  çæã¹ã¯ãªããï¼trbãã¡ã¤ã«ï¼ãå®è¡ãã
+  #
+  $trbFileNames.each do |trbFileName|
+    IncludeTrb(trbFileName)
+  end
+
+  #
+  #  ãã¹4ã«å¼ãæ¸¡ãæ
+å ±ããã¡ã¤ã«ã«çæ
+  #
+  if $omitOutputDb.nil?
+    db = PStore.new(CFG3_OUT_DB)
+    db.transaction do
+      db[:apiDefinition] = $apiDefinition
+      db[:symbolValueTable] = $symbolValueTable
+      db[:cfgFileInfo] = $cfgFileInfo
+      db[:includeFiles] = $includeFiles
+      db[:cfgData] = $cfgData
+      db[:asmLabel] = $asmLabel
+      db[:endianLittle] = $endianLittle
+      db[:cfg3Data] = $cfg3Data
+    end
+  end
+end
+
+#
+#  ãã¹4ã®å¦ç
+#
+def Pass4
+  #
+  #  ãã¹3ããå¼ãæ¸¡ãããæ
+å ±ããã¡ã¤ã«ããèª­ã¿è¾¼ã
+  #
+  db = PStore.new(CFG3_OUT_DB)
+  db.transaction(true) do
+    $apiDefinition = db[:apiDefinition]
+    $symbolValueTable = db[:symbolValueTable]
+    $cfgFileInfo = db[:cfgFileInfo]
+    $includeFiles = db[:includeFiles]
+    $cfgData = db[:cfgData]
+    $asmLabel = db[:asmLabel]
+    $endianLittle = db[:endianLittle]
+    $cfg3Data = db[:cfg3Data] || db[:cfg2Data]
+  end
+
+  #
+  #  å¤åå¾ã·ã³ãã«ãã°ã­ã¼ãã«å¤æ°ã¨ãã¦å®ç¾©ãã
+  #
+  DefineSymbolValue()
+
+  #
+  #  çæã¹ã¯ãªããï¼trbãã¡ã¤ã«ï¼ãå®è¡ãã
+  #
+  $trbFileNames.each do |trbFileName|
+    IncludeTrb(trbFileName)
+  end
+end
+
+#
+#  çæã¹ã¯ãªããï¼trbãã¡ã¤ã«ï¼åãã®é¢æ°
+#
+def SYMBOL(symbol)
+  if !$romSymbol.nil? && $romSymbol.has_key?($asmLabel + symbol)
+    return $romSymbol[$asmLabel + symbol]
+  else
+    return nil
+  end
+end
+
+def BCOPY(fromAddress, toAddress, size)
+  if !$romImage.nil?
+    copyData = $romImage.get_data(fromAddress, size)
+    if !copyData.nil?
+      $romImage.set_data(toAddress, copyData)
+    end
+  end
+end
+
+def PEEK(address, size, signed=false)
+  if !$romImage.nil?
+    return $romImage.get_value(address, size, signed)
+  else
+    return nil
+  end
+end
+
+#
+#  ã°ã­ã¼ãã«å¤æ°ã®åæå
+#
+$kernel = nil
+$pass = nil
+$includeDirectories = []
+$trbFileNames = []
+$apiTableFileNames = []
+$symvalTableFileNames = []
+$romImageFileName = nil
+$romSymbolFileName = nil
+$dependencyFileName = nil
+$idInputFileName = nil
+$idOutputFileName = nil
+
+#
+#  ãªãã·ã§ã³ã®å¦ç
+#
+OptionParser.new(banner="Usage: cfg.rb [options] CONFIG-FILE", 40) do |opt|
+  opt.version = VERSION
+  opt.on("-k KERNEL", "--kernel KERNEL", "kernel profile name") do |val|
+    $kernel = val
+  end
+  opt.on("-p NUM", "--pass NUM", "processing pass number") do |val|
+    $pass = val
+  end
+  opt.on("-I DIRECTORY", "--include-directory DIRECTORY",
+										 "include directory") do |val|
+    $includeDirectories.push(val)
+  end
+  opt.on("-T TRB-FILE", "--trb-file TRB-FILE",
+         "generation script (trb file)") do |val|
+    $trbFileNames.push(val)
+  end
+  opt.on("--api-table API-TABLE-FILE", "static API table file") do |val|
+    $apiTableFileNames.push(val)
+  end
+  opt.on("--symval-table SYMVAL-TABLE-FILE", "symbol-value table file") do |val|
+    $symvalTableFileNames.push(val)
+  end
+  opt.on("--rom-image SREC-FILE", "rom image file (s-record)") do |val|
+    $romImageFileName = val
+  end
+  opt.on("--rom-symbol SYMS-FILE", "rom symbol table file (nm)") do |val|
+    $romSymbolFileName = val
+  end
+  opt.on("--id-input-file ID-FILE", "ID input file") do |val|
+    $idInputFileName = val
+  end
+  opt.on("--id-output-file ID-FILE", "ID output file") do |val|
+    $idOutputFileName = val
+  end
+  opt.on("-M [DEPEND-FILE]", "--print-dependencies [DEPEND-FILE]",
+         "dependency file") do |val|
+    $dependencyFileName = val.nil? ? "" : val
+  end
+  opt.on("-O", "--omit-output-db", "omit DB file output") do
+    $omitOutputDb = true
+  end
+  opt.on("-v", "--version", "show version number") do
+    abort(opt.ver)
+  end
+  opt.on("-h", "--help", "show help (this)") do
+    abort(opt.help)
+  end
+  opt.parse!(ARGV)
+end
+$configFileNames = ARGV
+
+#
+#  ãªãã·ã§ã³ã®ãã§ãã¯
+#
+if $pass.nil?
+  # ãã¹ã®æå®ã¯å¿
+é 
+  abort("`--pass' option is mandatory")
+elsif /^[1234]$/ !~ $pass
+  abort("pass number `#{$pass}' is not valid")
+end
+
+# ãã¹1ã§ã¯ï¼éçAPIãã¼ãã«ã¯å¿
+é 
+if ($pass == "1" && $apiTableFileNames.empty?)
+  abort("`--api-table' option must be specified in pass 1")
+end
+
+# ãã¹1ä»¥å¤ã§ã¯ï¼çæã¹ã¯ãªããï¼trbãã¡ã¤ã«ï¼ãå¿
+é 
+if ($pass != "1" && $trbFileNames.empty?)
+  abort("`--trb-file' must be specified except in pass 1")
+end
+
+#
+#  ã«ã¼ãã«ãªãã·ã§ã³ã®å¦ç
+#
+case $kernel
+when /^hrp/
+	$supportDomain = true
+when /^fmp/
+	$supportClass = true
+end
+
+#
+#  IDçªå·å
+¥åãã¡ã¤ã«ã®åãè¾¼ã¿
+#
+$inputObjid = {}
+if !$idInputFileName.nil?
+  begin
+    idInputFile = File.open($idInputFileName)
+  rescue Errno::ENOENT, Errno::EACCES => ex
+    abort(ex.message)
+  end
+
+  idInputFile.each do |line|
+    ( objName, objidNumber ) = line.split(/\s+/)
+    $inputObjid[objName] = objidNumber.to_i
+  end
+
+  idInputFile.close
+end
+
+#
+#  æå®ãããã·ã³ãã«ãã¡ã¤ã«ã®èª­ã¿è¾¼ã¿
+#
+if !$romSymbolFileName.nil?
+  if File.exist?($romSymbolFileName)
+    $romSymbol = ReadSymbolFile($romSymbolFileName)
+  else
+    error_exit("`#{$romSymbolFileName}' not found")
+  end
+end
+
+#
+#  æå®ãããSã¬ã³ã¼ããã¡ã¤ã«ã®èª­ã¿è¾¼ã¿
+#
+if !$romImageFileName.nil?
+  if File.exist?($romImageFileName)
+    $romImage = SRecord.new($romImageFileName)
+  else
+    error_exit("`#{$romImageFileName}' not found")
+  end
+end
+
+#
+#  ãã¹ã«å¾ã£ã¦åå¦çãå®è¡
+#
+case $pass
+when "1"
+  load("pass1.rb")
+  Pass1()
+when "2"
+  load("pass2.rb")
+  Pass2()
+when "3"
+  Pass3()
+when "4"
+  Pass4()
+else
+  error_exit("invalid pass: #{$pass}")
+end
+
+# ã¨ã©ã¼çºçæã¯abortãã
+if $errorFlag
+  if ($0 == __FILE__)
+    abort()
+  else
+    # simplecovå¯¾å¿
+    raise()
+  end
+end
+
+#
+#  ä½æãããã¹ã¦ã®ãã¡ã¤ã«ãåºåãã
+#
+GenFile.output
+
+# 
+#  ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ã®çæ
+# 
+if !$timeStampFileName.nil?
+  File.open($timeStampFileName, "w").close
+end
Index: EcnlProtoTool/trunk/asp3_dcre/cfg/pass1.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/cfg/pass1.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/cfg/pass1.rb	(revision 270)
@@ -0,0 +1,961 @@
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS Configurator by Ruby
+#
+#  Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: pass1.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#
+
+#
+#		ãã¹1ã®å¦ç
+#
+
+#
+#  å¤åå¾ã·ã³ãã«ãã¼ãã«ã¸ã®åºå®ç»é²
+#
+$symbolValueTable = {
+  "CHAR_BIT"  => { EXPR: "CHAR_BIT" },
+  "SCHAR_MAX" => { EXPR: "SCHAR_MAX", SIGNED: true },
+  "SCHAR_MIN" => { EXPR: "SCHAR_MIN", SIGNED: true },
+  "UCHAR_MAX" => { EXPR: "UCHAR_MAX" },
+  "CHAR_MAX"  => { EXPR: "CHAR_MAX",  SIGNED: true },
+  "CHAR_MIN"  => { EXPR: "CHAR_MIN",  SIGNED: true },
+  "SHRT_MAX"  => { EXPR: "SHRT_MAX",  SIGNED: true },
+  "SHRT_MIN"  => { EXPR: "SHRT_MIN",  SIGNED: true },
+  "USHRT_MAX" => { EXPR: "USHRT_MAX" },
+  "INT_MAX"   => { EXPR: "INT_MAX",   SIGNED: true },
+  "INT_MIN"   => { EXPR: "INT_MIN",   SIGNED: true },
+  "UINT_MAX"  => { EXPR: "UINT_MAX" },
+  "LONG_MAX"  => { EXPR: "LONG_MAX",  SIGNED: true },
+  "LONG_MIN"  => { EXPR: "LONG_MIN",  SIGNED: true },
+  "ULONG_MAX" => { EXPR: "ULONG_MAX" }
+}
+
+#
+#  éçAPIãã¼ãã«ã¸ã®åºå®ç»é²
+#
+$apiDefinition = { "INCLUDE" =>
+  { :PARAM => [ { :NAME => :file, :STRING => true }]}}
+
+#
+#  éçAPIãã¼ãã«ã®èª­ã¿è¾¼ã¿
+#
+def ReadApiTableFile
+  $apiTableFileNames.each do |apiTableFileName|
+    if /^(.+):(\w+)$/ =~ apiTableFileName
+      apiTableFileName = $1
+      apiPhase = $2.to_sym
+    end
+
+    if !File.exist?(apiTableFileName)
+      error_exit("`#{apiTableFileName}' not found")
+      next
+    end
+
+    apiFile = File.open(apiTableFileName)
+    apiFile.each do |line|
+      next if /^#/ =~ line			# ã³ã¡ã³ããã¹ã­ãã
+
+      fields = line.split(/\s+/)	# ãã£ã¼ã«ãã«åè§£
+
+      apiName = fields.shift		# APIåã®åãåºã
+      if /^(.+)\[(.+)\]$/ =~ apiName
+        apiName = $1
+        apiDef = { APINAME: apiName, API: $2 }
+      else
+        apiDef = { APINAME: apiName, API: apiName }
+      end
+      if !apiPhase.nil?
+        apiDef[:PHASE] = apiPhase
+      end
+
+      apiParams = []
+      fields.each do |param|
+        case param
+        when /^(\W*)(\w+)(\W*)$/
+          prefix = $1
+          name = $2
+          postfix = $3
+          apiParam = { :NAME => name }
+
+          case prefix
+          when "#"					# ãªãã¸ã§ã¯ãè­å¥åï¼å®ç¾©ï¼
+            apiParam[:ID_DEF] = true
+          when "%"					# ãªãã¸ã§ã¯ãè­å¥åï¼åç
+§ï¼
+            apiParam[:ID_REF] = true
+          when "."					# ç¬¦å·ç¡ãæ´æ°å®æ°å¼ãã©ã¡ã¼ã¿
+            apiParam[:EXPTYPE] = "unsigned_t"
+          when "+"					# ç¬¦å·ä»ãæ´æ°å®æ°å¼ãã©ã¡ã¼ã¿
+            apiParam[:EXPTYPE] = "signed_t"
+            apiParam[:SIGNED] = true
+          when "&"					# ä¸è¬æ´æ°å®æ°å¼ãã©ã¡ã¼ã¿
+            # do nothing
+          when "$"					# æå­åå®æ°å¼ãã©ã¡ã¼ã¿
+            apiParam[:STRING] = true
+          else
+            error_exit("`#{param}' is invalid")
+          end
+
+          case postfix
+          when "*"					# ã­ã¼ãæ±ºãããã©ã¡ã¼ã¿
+            apiDef[:KEYPAR] = name
+          when "?"					# ãªãã·ã§ã³ãã©ã¡ã¼ã¿
+            apiParam[:OPTIONAL] = true
+          when "\.\.\."				# ãªã¹ããã©ã¡ã¼ã¿
+            apiParam[:LIST] = true
+          end
+        
+        when "{"					# {
+          apiParam = { :BRACE => "{" }
+        when "{?"					# {?
+          apiParam = { :BRACE => "{", :OPTBRACE => true }
+
+        when "}"					# }
+          apiParam = { :BRACE => "}" }
+
+        else
+          error_exit("`#{param}' is invalid")
+        end
+        apiParams.push(apiParam)
+      end
+      apiDef[:PARAM] = apiParams
+      $apiDefinition[apiName] = apiDef
+    end
+    apiFile.close
+  end
+end
+
+#
+#  å¤åå¾ã·ã³ãã«ãã¼ãã«ã®èª­ã¿è¾¼ã¿
+#
+def ReadSymvalTable
+  $symvalTableFileNames.each do |symvalTableFileName|
+    if !File.exist?(symvalTableFileName)
+      error_exit("`#{symvalTableFileName}' not found")
+      next
+    end
+
+    symvalCsv = CSV.open(symvalTableFileName)
+    symvalCsv.each do |record|
+      # å¤æ°å
+      if record[0].nil?
+        error_exit("invalid variable name in `#{fileName}'")
+      end
+
+      symbol = {}
+      variable = record[0]
+
+      # å¼
+      if record[1].nil? || record[1].empty?
+        symbol[:EXPR] = variable
+      else
+        symbol[:EXPR] = record[1]
+      end
+
+      # å¼ã®å
+      if !record[2].nil? && !record[2].empty?
+        case record[2]
+        when /^[bB]/				# çå½å¤
+          symbol[:BOOL] = true
+        when /^[uU]/				# ç¬¦å·ç¡ãæ´æ°å¤
+          # ä½ãè¨­å®ããªã
+        else						# ç¬¦å·ä»ãæ´æ°å¤
+          symbol[:SIGNED] = true
+        end
+      end
+
+      # ã³ã³ãã¤ã«æ¡ä»¶
+      if !record[3].nil? && !record[3].empty?
+        symbol[:CONDITION] = record[3]
+      end
+
+      # æ¡ä»¶ãæç«ããªãæã®å¼
+      if !record[4].nil? && !record[4].empty?
+        symbol[:ELSE_EXPR] = record[4]
+      end
+
+      $symbolValueTable[variable] = symbol
+    end
+    symvalCsv.close
+  end
+end
+
+#
+#  ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ããã®èª­ã¿è¾¼ã¿ã¯ã©ã¹
+#
+class ConfigFile
+  def initialize(fileName)
+    @cfgFileName = fileName
+    begin
+      @cfgFile = File.open(@cfgFileName)
+    rescue Errno::ENOENT, Errno::EACCES => ex
+      abort(ex.message)
+    end
+    @lineNo = 0
+    @withinComment = false
+  end
+
+  def close
+    @cfgFile.close
+  end
+
+  def getNextLine(withinApi)
+    line = @cfgFile.gets
+    return(nil) if line.nil?
+    @lineNo += 1
+
+    line.chomp!
+    if @withinComment
+      case line
+      when /\*\//						# Cè¨èªã¹ã¿ã¤ã«ã®ã³ã¡ã³ãçµäº
+        line.sub!(/^.*?\*\//, "")		# æåã®*/ã«ãããããã */
+        @withinComment = false
+      else
+        line = ""
+      end
+    end
+    if !@withinComment
+      line.gsub!(/\/\*.*?\*\//, "")		# Cè¨èªã¹ã¿ã¤ã«ã®ã³ã¡ã³ãã®é¤å»
+										# æåã®*/ã«ãããããã */
+      case line
+      when /^\s*#/						# ããªãã­ã»ããµãã£ã¬ã¯ãã£ã
+        if withinApi
+          parse_error(self, \
+					"preprocessor directive must not be within static API")
+          line = ""
+        end
+      when /\/\*/						# Cè¨èªã¹ã¿ã¤ã«ã®ã³ã¡ã³ãéå§
+        line.sub!(/\/\*.*$/, "")
+        @withinComment = true
+      when /\/\//						# C++è¨èªã¹ã¿ã¤ã«ã®ã³ã¡ã³ã
+        line.sub!(/\/\/.*$/, "")
+      end
+    end
+    return(line)
+  end
+
+  def getFileName
+    return(@cfgFileName)
+  end
+
+  def getLineNo
+    return(@lineNo)
+  end
+end
+
+#
+#  ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®ãã¼ãµã¼ã¯ã©ã¹
+#
+class CfgParser
+  @@lastApiIndex = 0
+  @@currentDomain = nil
+  @@currentClass = nil
+  @@nestDC = []
+
+  def initialize
+    @line = ""
+    @skipComma = false						# æ¬¡ã,ã§ããã°èª­ã¿é£ã°ã
+  end
+
+  #
+  #  æå­åæ«ã¾ã§èª­ã
+  #
+  def parseString(cfgFile)
+    string = ""
+    begin
+      case @line
+      when /^([^"]*\\\\)(.*)$/				# \\ã¾ã§èª­ã
+        string += $1
+        @line = $2
+      when /^([^"]*\\\")(.*)$/				# \"ã¾ã§èª­ã
+        string += $1
+        @line = $2
+      when /^([^"]*\")(.*)$/				# "ã¾ã§èª­ã
+        string += $1
+        @line = $2
+        return(string)
+      else									# è¡æ«ã¾ã§èª­ã
+        string += @line + "\n"
+        @line = cfgFile.getNextLine(true)
+      end
+    end while (@line)
+    error_exit("unterminated string meets end-of-file")
+    return(string)
+  end
+
+  #
+  #  æå­æ«ã¾ã§èª­ã
+  #
+  def parseChar(cfgFile)
+    string = ""
+    begin
+      case @line
+      when /^([^']*\\\\)(.*)$/				# \\ã¾ã§èª­ã
+        string += $1
+        @line = $2
+      when /^([^']*\\\')(.*)$/				# \'ã¾ã§èª­ã
+        string += $1
+        @line = $2
+      when /^([^']*\')(.*)$/				# 'ã¾ã§èª­ã
+        string += $1
+        @line = $2
+        return(string)
+      else									# è¡æ«ã¾ã§èª­ã
+        string += @line + "\n"
+        @line = cfgFile.getNextLine(true)
+      end
+    end while (@line)
+    error_exit("unterminated string meets end-of-file")
+    return(string)
+  end
+
+  #
+  #  æ¹è¡ã¨ç©ºç½æå­ãèª­ã¿é£ã°ã
+  #
+  def skipSpace(cfgFile, withinApi)
+    loop do
+      return if @line.nil?						# ãã¡ã¤ã«æ«ã§ããã°ãªã¿ã¼ã³
+      @line.lstrip!								# å
+é ­ã®ç©ºç½ãåé¤
+      return if @line != ""						# ç©ºè¡ã§ãªããã°ãªã¿ã¼ã³
+      @line = cfgFile.getNextLine(withinApi)	# æ¬¡ã®è¡ãèª­ã
+    end
+  end
+
+  #
+  #  æ¬¡ã®æå­ã¾ã§èª­ã¿é£ã°ã
+  #
+  def skipToToken(cfgFile, withinApi=true)
+    skipSpace(cfgFile, withinApi)
+    if @line.nil?							# ãã¡ã¤ã«æ«ã§ããã°ã¨ã©ã¼çµäº
+      error_exit("unexpexced end-of-file")
+    end
+  end
+
+  #
+  #  ãã©ã¡ã¼ã¿ã1ã¤èª­ã
+  #
+  # @lineã®å
+é ­ãããã©ã¡ã¼ã¿ã1ã¤èª­ãã§ï¼ãããæå­åã§è¿ãï¼èª­ãã ã
+  # ã©ã¡ã¼ã¿ã¯ï¼@lineããã¯åé¤ããï¼ãã©ã¡ã¼ã¿ã®éä¸­ã§è¡æ«ã«éããæã¯ï¼
+  # cfgFileããæ¬¡ã®è¡ãåãåºãï¼ãã¡ã¤ã«æ«ã«éããæã¯ï¼nilãè¿ãï¼
+  #
+  def parseParam(cfgFile)
+    param = ""								# èª­ãã æå­å
+    parenLevel = 0							# æ¬å¼§ã®ãã¹ãã¬ãã«
+    skipComma = @skipComma
+    @skipComma = false
+
+    skipToToken(cfgFile)					# æ¬¡ã®æå­ã¾ã§èª­ã¿é£ã°ã
+    begin
+      if parenLevel == 0
+        case @line
+        when /^(\s*,)(.*)$/					# ,
+          @line = $2
+          if param == "" && skipComma
+            skipComma = false
+            return(parseParam(cfgFile))		# åå¸°å¼ã³åºã
+          else
+            return(param.strip)
+          end
+        when /^(\s*{)(.*)$/					# {
+          if param != ""
+            return(param.strip)
+          else
+            @line = $2
+            return("{")
+          end
+        when /^(\s*\()(.*)$/				# (
+          param += $1
+          @line = $2
+          parenLevel += 1
+        when /^(\s*([)}]))(.*)$/			# }ã)
+          if param != ""
+            return(param.strip)
+          else
+            @line = $3
+            @skipComma = true if $2 == "}"
+            return($2)
+          end
+        when /^(\s*\")(.*)$/				# "
+          @line = $2
+          param += $1 + parseString(cfgFile)
+        when /^(\s*\')(.*)$/				# '
+          @line = $2
+          param += $1 + parseChar(cfgFile)
+        when /^(\s*[^,{}()"'\s]+)(.*)$/		# ãã®ä»ã®æå­å
+          param += $1
+          @line = $2
+        else								# è¡æ«
+          param += " "
+          @line = cfgFile.getNextLine(true)
+        end
+      else
+        # æ¬å¼§å
+ã®å¦ç
+        case @line
+        when /^(\s*\()(.*)$/				# "("
+          param += $1
+          @line = $2
+          parenLevel += 1
+        when /^(\s*\))(.*)$/				# ")"
+          param += $1
+          @line = $2
+          parenLevel -= 1
+        when /^(\s*\")(.*)$/				# "
+          @line = $2
+          param += $1 + parseString(cfgFile)
+        when /^(\s*\')(.*)$/				# '
+          @line = $2
+          param += $1 + parseChar(cfgFile)
+        when /^(\s*[^()"'\s]+)(.*)$/		# ãã®ä»ã®æå­å
+          param += $1
+          @line = $2
+        else								# è¡æ«
+          param += " "
+          @line = cfgFile.getNextLine(true)
+        end
+      end
+    end while (@line)
+    return(param.strip)
+  end
+
+  def getParam(apiParam, param, cfgFile)
+    if param == ""
+      if !apiParam.has_key?(:OPTIONAL)
+        parse_error(cfgFile, "unexpected `,'")
+      end
+      return(param)
+    end
+
+    if apiParam.has_key?(:ID_DEF) || apiParam.has_key?(:ID_REF)
+      if (/^[A-Za-z_]\w*$/ !~ param)
+        parse_error(cfgFile, "`#{param}' is illegal object ID")
+      end
+      return(param)
+    end
+
+    if apiParam.has_key?(:STRING)
+      return(param.unquote)
+    else
+      return(param)
+    end
+  end
+
+  def parseApi(cfgFile, apiName)
+    # éçAPIã®èª­ã¿è¾¼ã¿
+    staticApi = {}
+    tooFewParams = false
+    skipUntilBrace = 0
+
+    skipToToken(cfgFile)					# æ¬¡ã®æå­ã¾ã§èª­ã¿é£ã°ã
+    if (/^\((.*)$/ =~ @line)
+      @line = $1
+
+      staticApi[:APINAME] = apiName
+      staticApi[:_FILE_] = cfgFile.getFileName
+      staticApi[:_LINE_] = cfgFile.getLineNo
+      apiDef = $apiDefinition[apiName]
+      param = parseParam(cfgFile)
+
+      apiDef[:PARAM].each do |apiParam|
+        return(staticApi) if param.nil?		# ãã¡ã¤ã«æ«ã§ããã°ãªã¿ã¼ã³
+
+        if skipUntilBrace > 0
+          # APIå®ç¾©ã}ã¾ã§ã¹ã­ããä¸­
+          if apiParam.has_key?(:BRACE)
+            case apiParam[:BRACE]
+            when "{"
+              skipUntilBrace += 1
+            when "}"
+              skipUntilBrace -= 1
+            end
+          end
+        elsif apiParam.has_key?(:OPTIONAL)
+          if /^([{})])$/ !~ param
+            store_param = getParam(apiParam, param, cfgFile)
+            if store_param != ""
+              staticApi[apiParam[:NAME]] = store_param
+            end
+            param = parseParam(cfgFile)
+          end
+        elsif apiParam.has_key?(:LIST)
+          staticApi[apiParam[:NAME]] = []
+          while /^([{})])$/ !~ param
+            staticApi[apiParam[:NAME]].push(getParam(apiParam, param, cfgFile))
+            param = parseParam(cfgFile)
+            break if param.nil?				# ãã¡ã¤ã«æ«ã®å ´å
+          end
+        elsif apiParam.has_key?(:OPTBRACE)
+          if param == apiParam[:BRACE]
+            param = parseParam(cfgFile)
+            break if param.nil?				# ãã¡ã¤ã«æ«ã®å ´å
+          else
+            if param == ""
+              param = parseParam(cfgFile)
+              break if param.nil?			# ãã¡ã¤ã«æ«ã®å ´å
+            elsif /^([})])$/ !~ param
+              parse_error(cfgFile, "`{...}' expected before #{param}")
+            end
+            skipUntilBrace += 1          	# APIå®ç¾©ã}ã¾ã§ã¹ã­ãã
+          end
+        elsif !apiParam.has_key?(:BRACE)
+          if /^([{})])$/ !~ param
+            staticApi[apiParam[:NAME]] = getParam(apiParam, param, cfgFile)
+            param = parseParam(cfgFile)
+          elsif !tooFewParams
+            parse_error(cfgFile, "too few parameters before `#{$1}'")
+            tooFewParams = true
+          end
+        elsif param == apiParam[:BRACE]
+          param = parseParam(cfgFile)
+          tooFewParams = false
+        else
+          parse_error(cfgFile, "`#{apiParam[:BRACE]}' expected before #{param}")
+          # )ããã¡ã¤ã«æ«ã¾ã§èª­ã¿é£ã°ã
+          loop do
+            param = parseParam(cfgFile)
+            break if (param.nil? || param == ")")
+          end
+          break
+        end
+      end
+
+      # æå¾
+ããããã©ã¡ã¼ã¿ããã¹ã¦èª­ãã å¾ã®å¦ç
+      if param != ")"
+        begin
+          param = parseParam(cfgFile)
+          return(staticApi) if param.nil?	# ãã¡ã¤ã«æ«ã§ããã°ãªã¿ã¼ã³
+        end while param != ")"
+        parse_error(cfgFile, "too many parameters before `)'")
+      end
+    else
+      parse_error(cfgFile, "syntax error: #{@line}")
+      @line = ""
+    end
+    return(staticApi)
+  end
+
+  def parseOpenBrace(cfgFile)
+    # {ã®èª­ã¿è¾¼ã¿
+    skipToToken(cfgFile)					# æ¬¡ã®æå­ã¾ã§èª­ã¿é£ã°ã
+    if (/^\{(.*)$/ =~ @line)
+      @line = $1
+    else
+      parse_error(cfgFile, "`{' expected before #{@line}")
+    end
+  end
+
+  def parseFile(cfgFileName)
+    cfgFiles = [ ConfigFile.new(cfgFileName) ]
+    @line = ""
+    loop do
+      cfgFile = cfgFiles.last
+
+      skipSpace(cfgFile, false)				# æ¹è¡ã¨ç©ºç½æå­ãèª­ã¿é£ã°ã
+      if @line.nil?
+        # ãã¡ã¤ã«æ«ã®å¦ç
+        cfgFiles.pop.close
+        if cfgFiles.empty?
+          break								# ãã¼ã¹å¦ççµäº
+        else
+          @line = ""						# å
+ã®ãã¡ã¤ã«ã«æ»ã£ã¦ç¶ãã
+        end
+      elsif /^;(.*)$/ =~ @line
+        # ;ã¯èª­ã¿é£ã°ã
+        @line = $1
+      elsif /^#/ =~ @line
+        # ããªãã­ã»ããµãã£ã¬ã¯ãã£ããèª­ã
+        case @line
+        when /^#include\b(.*)$/
+          $includeFiles.push($1.strip)
+        when /^#(ifdef|ifndef|if|endif|else|elif)\b/
+          directive = { :DIRECTIVE => @line.strip }
+          $cfgFileInfo.push(directive)
+        else
+          parse_error(cfgFile, "unknown preprocessor directive: #{@line}")
+        end
+        @line = ""
+      elsif (/^([A-Z_][A-Z0-9_]*)\b(.*)$/ =~ @line)
+        apiName = $1
+        @line = $2
+
+        case apiName
+        when "KERNEL_DOMAIN"
+          if $supportDomain.nil?
+            parse_warning(cfgFile, "`KERNEL_DOMAIN' is not supported")
+          end
+          if !@@currentDomain.nil?
+            parse_error(cfgFile, "`DOMAIN' must not be nested")
+          end
+          @@currentDomain = "TDOM_KERNEL"
+          parseOpenBrace(cfgFile)
+          @@nestDC.push("domain")
+        when "DOMAIN"
+          if $supportDomain.nil?
+            parse_warning(cfgFile, "`DOMAIN' is not supported")
+          end
+          if !@@currentDomain.nil?
+            parse_error(cfgFile, "`DOMAIN' must not be nested")
+          end
+          domid = parseParam(cfgFile).sub(/^\((.+)\)$/m, "\\1").strip
+          if (/^[A-Za-z_]\w*$/ !~ domid)
+            parse_error(cfgFile, "`#{domid}' is illegal domain ID")
+          else
+            if !$domainId.has_key?(domid)
+              if $inputObjid.has_key?(domid)
+                # IDçªå·å
+¥åãã¡ã¤ã«ã«å®ç¾©ããã¦ããå ´å
+                $domainId[domid] = $inputObjid[domid]
+                if $domainId[domid] > 32
+                  error_exit("domain ID for `#{domid}' is too large")
+                end
+              else
+                $domainId[domid] = nil
+              end
+            end
+            @@currentDomain = domid
+          end
+          parseOpenBrace(cfgFile)
+          @@nestDC.push("domain")
+        when "CLASS"
+          if $supportClass.nil?
+            parse_warning(cfgFile, "`CLASS' is not supported")
+          end
+          if !@@currentClass.nil?
+            parse_error(cfgFile, "`CLASS' must not be nested")
+          end
+          @@currentClass = parseParam(cfgFile).sub(/^\((.+)\)$/m, "\\1").strip
+          @@classFile = cfgFile.getFileName
+          @@classLine = cfgFile.getLineNo
+          parseOpenBrace(cfgFile)
+          @@nestDC.push("class")
+        else
+          if $apiDefinition.has_key?(apiName)
+            # éçAPIã1ã¤èª­ã
+            staticApi = parseApi(cfgFile, apiName)
+            if staticApi.empty?
+              # ãã¡ã¤ã«æ«ãææ³ã¨ã©ã¼
+            elsif (staticApi[:APINAME] == "INCLUDE")
+              # INCLUDEã®å¦ç
+              includeFilePath = SearchFilePath(staticApi[:file])
+              if includeFilePath.nil?
+                parse_error(cfgFile, "`#{staticApi[:file]}' not found")
+              else
+                $dependencyFiles.push(includeFilePath)
+                cfgFiles.push(ConfigFile.new(includeFilePath))
+              end
+            else
+              # éçAPIã®å¦ç
+              if !@@currentDomain.nil?
+                staticApi[:DOMAIN] = @@currentDomain
+              end
+              if !@@currentClass.nil?
+                staticApi[:CLASS] = @@currentClass
+                staticApi[:CLASS_FILE_] = @@classFile
+                staticApi[:CLASS_LINE_] = @@classLine
+              end
+              staticApi[:INDEX] = (@@lastApiIndex += 1)
+              $cfgFileInfo.push(staticApi)
+            end
+          else
+            parse_error(cfgFile, "unknown static API: #{apiName}")
+          end
+        end
+      elsif (/^\}(.*)$/ =~ @line)
+        # }ã®å¦ç
+        if @@nestDC.size > 0
+          case @@nestDC.pop
+          when "domain"
+            @@currentDomain = nil
+          when "class"
+            @@currentClass = nil
+          end
+        else
+          error_exit("unexpected `}'")
+        end
+        @line = $1
+      else
+        parse_error(cfgFile, "syntax error: #{@line}")
+        @line = ""
+      end
+    end
+  end
+end
+
+#
+#  cfg1_out.cã®çæ
+#
+module Cfg1OutC
+  #
+  #  éçAPIã®ãã¡ã¤ã«åã¨è¡çªå·ã®åºå
+  #
+  def self.OutLineNumber(cfgInfo)
+    @cfg1Out.add("#line #{cfgInfo[:_LINE_]} \"#{cfgInfo[:_FILE_]}\"")
+  end
+
+  #
+  #  ã¯ã©ã¹è¨è¿°ã®ãã¡ã¤ã«åã¨è¡çªå·ã®åºå
+  #
+  def self.OutClassLineNumber(cfgInfo)
+    @cfg1Out.add("#line #{cfgInfo[:CLASS_LINE_]} \"#{cfgInfo[:CLASS_FILE_]}\"")
+  end
+
+  #
+  #  ãã©ã¡ã¼ã¿ã«é¢ããå®ç¾©ã®åºå
+  #
+  def self.OutParamDef(param, index, apiParam, cfgInfo)
+    if apiParam.has_key?(:ID_DEF)
+      @cfg1Out.add("#define #{param}\t(<>)")
+    elsif apiParam.has_key?(:EXPTYPE)
+      OutLineNumber(cfgInfo)
+      @cfg1Out.add("const #{apiParam[:EXPTYPE]} #{CFG1_PREFIX}valueof_" \
+								"#{apiParam[:NAME]}_#{index} = " \
+								"(#{apiParam[:EXPTYPE]})(#{param});")
+    end
+  end
+
+  #
+  #  cfg1_out.cã®çæï¼ã¡ã¤ã³ã®å¦çï¼
+  #
+  def self.Generate
+    @cfg1Out = GenFile.new(CFG1_OUT_C)
+
+    @cfg1Out.append(<<EOS)
+/* #{CFG1_OUT_C} */
+#define TOPPERS_CFG1_OUT
+#include "kernel/kernel_int.h"
+EOS
+
+    # ã¤ã³ã¯ã«ã¼ãããããã¡ã¤ã«
+    $includeFiles.each do |file|
+      @cfg1Out.add("#include #{file}")
+    end
+
+    @cfg1Out.add(<<EOS)
+
+#ifdef INT64_MAX
+  typedef int64_t signed_t;
+  typedef uint64_t unsigned_t;
+#else
+  typedef int32_t signed_t;
+  typedef uint32_t unsigned_t;
+#endif
+
+#include "#{CFG1_OUT_TARGET_H}"
+#include <limits.h>
+
+const uint32_t #{CFG1_MAGIC_NUM} = 0x12345678;
+const uint32_t #{CFG1_SIZEOF_SIGNED} = sizeof(signed_t);
+EOS
+
+    # å¤åå¾ã·ã³ãã«ã®å¦ç
+    $symbolValueTable.each do |symbolName, symbolData|
+      if symbolData.has_key?(:BOOL) || symbolData.has_key?(:SIGNED)
+        type = "signed_t"
+      else
+        type = "unsigned_t"
+      end
+      if symbolData.has_key?(:CONDITION)
+        @cfg1Out.add("#if #{symbolData[:CONDITION]}")
+      end
+      @cfg1Out.add("const #{type} #{CFG1_PREFIX}#{symbolName} = " \
+								"(#{type})(#{symbolData[:EXPR]});")
+      if symbolData.has_key?(:ELSE_EXPR)
+        @cfg1Out.add("#else")
+        @cfg1Out.add("const #{type} #{CFG1_PREFIX}#{symbolName} = " \
+								"(#{type})(#{symbolData[:ELSE_EXPR]});")
+      end
+      if symbolData.has_key?(:CONDITION)
+        @cfg1Out.add("#endif")
+      end
+    end
+    @cfg1Out.add
+
+    # ãã¡ã¤ã³IDã®å®ç¾©ã®çæ
+    $domainId.each do |domainName, domainVal|
+      if domainVal > 0
+        @cfg1Out.add("#define #{domainName} #{domainVal}")
+      end
+    end
+    @cfg1Out.add
+
+    # éçAPIï¼ããªãã­ã»ããµãã£ã¬ã¯ãã£ãã®å¦ç
+    $cfgFileInfo.each do |cfgInfo|
+      if cfgInfo.has_key?(:DIRECTIVE)
+        @cfg1Out.add2(cfgInfo[:DIRECTIVE])
+      else
+        apiDef = $apiDefinition[cfgInfo[:APINAME]]
+        apiIndex = cfgInfo[:INDEX]
+        OutLineNumber(cfgInfo)
+        @cfg1Out.add("const unsigned_t #{CFG1_PREFIX}static_api_" \
+										"#{apiIndex} = #{apiIndex};")
+        apiDef[:PARAM].each do |apiParam|
+          next unless apiParam.has_key?(:NAME)
+          paramName = apiParam[:NAME]
+          next unless cfgInfo.has_key?(paramName)	# ãã©ã¡ã¼ã¿ããªãå ´å
+          paramData = cfgInfo[paramName]
+
+          if apiParam.has_key?(:LIST)
+            paramData.each.with_index(1) do |param, index|
+              OutParamDef(param, "#{apiIndex}_#{index}", apiParam, cfgInfo)
+            end
+          else
+            OutParamDef(paramData, "#{apiIndex}", apiParam, cfgInfo)
+          end
+        end
+        if cfgInfo.has_key?(:CLASS)
+          # ã¯ã©ã¹IDã®åå¾ã®ããã®å¦ç
+          OutClassLineNumber(cfgInfo)
+          @cfg1Out.add("const signed_t #{CFG1_PREFIX}valueof_CLASS_" \
+                      "#{apiIndex} = (signed_t)(#{cfgInfo[:CLASS]});")
+        end
+        @cfg1Out.add
+      end
+    end
+  end
+end
+
+#
+#  ãã¹1ã®å¦ç
+#
+def Pass1
+  # 
+  #  ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ã®æå®
+  # 
+  $timeStampFileName = CFG1_OUT_TIMESTAMP
+
+  #
+  #  éçAPIãã¼ãã«ã®èª­ã¿è¾¼ã¿
+  #
+  ReadApiTableFile()
+
+  #
+  #  å¤åå¾ã·ã³ãã«ãã¼ãã«ã®èª­ã¿è¾¼ã¿
+  #
+  ReadSymvalTable()
+
+  #
+  #  ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®èª­ã¿è¾¼ã¿
+  #
+  $cfgFileInfo = []
+  $dependencyFiles = $configFileNames.dup
+  $includeFiles = []
+  $domainId = { "TDOM_KERNEL" => -1, "TDOM_NONE" => -2 }
+  $configFileNames.each do |configFileName|
+    CfgParser.new.parseFile(configFileName)
+  end
+  abort if $errorFlag					# ã¨ã©ã¼çºçæã¯abortãã
+
+  #
+  #  ãã¡ã¤ã³IDã®å²å½ã¦å¦ç
+  #
+  nextDomainId = 1
+  $domainId.each do |domainName, domainVal|
+    if domainVal.nil?
+      while $domainId.has_value?(nextDomainId)
+        nextDomainId += 1
+      end
+      $domainId[domainName] = nextDomainId
+      if nextDomainId > 32
+        error_exit("too large number of user domains")
+      end
+      nextDomainId += 1
+    end
+  end
+
+  #
+  #  cfg1_out.cã®çæ
+  #
+  Cfg1OutC::Generate()
+
+  #
+  #  ä¾å­é¢ä¿ã®åºå
+  #
+  if !$dependencyFileName.nil?
+    if $dependencyFileName == ""
+      depFile = STDOUT
+    else
+      begin
+        depFile = File.open($dependencyFileName, "w")
+      rescue Errno::ENOENT, Errno::EACCES => ex
+        abort(ex.message)
+      end
+    end
+
+    depFile.print("#{CFG1_OUT_TIMESTAMP}:")
+    $dependencyFiles.each do |fileName|
+      depFile.print(" #{fileName}")
+    end
+    depFile.puts("")
+
+    if $dependencyFileName != ""
+      depFile.close
+    end
+  end
+
+  #
+  #  ãã¹2ã«å¼ãæ¸¡ãæ
+å ±ããã¡ã¤ã«ã«çæ
+  #
+  if $omitOutputDb.nil?
+    db = PStore.new(CFG1_OUT_DB)
+    db.transaction do
+      db[:apiDefinition] = $apiDefinition
+      db[:symbolValueTable] = $symbolValueTable
+      db[:cfgFileInfo] = $cfgFileInfo
+      db[:includeFiles] = $includeFiles
+      db[:domainId] = $domainId
+    end
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/cfg/pass2.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/cfg/pass2.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/cfg/pass2.rb	(revision 270)
@@ -0,0 +1,439 @@
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS Configurator by Ruby
+#
+#  Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: pass2.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#
+
+#
+#		ãã¹2ã®å¦ç
+#
+
+#
+#  ãã¹1ã®çæç©ã®èª­ã¿è¾¼ã¿
+#
+module Cfg1Out
+  #
+  #  Sã¬ã³ã¼ããã¡ã¤ã«ããã·ã³ãã«ã®å¤ãåãåºã
+  #
+  def self.GetSymbolValue(symbol, size, signed)
+    if @symbolAddress.has_key?(symbol)
+      return(@cfg1SRec.get_value(@symbolAddress[symbol], size, signed))
+    else
+      return(nil)
+    end
+  end
+
+  #
+  #  ãã¹1ã®çæç©ã®èª­ã¿è¾¼ã¿ï¼ã¡ã¤ã³ã®å¦çï¼
+  #
+  def self.Read
+    # cfg1_out.symsã®èª­ã¿è¾¼ã¿
+    @symbolAddress = ReadSymbolFile(CFG1_OUT_SYMS)
+
+    # cfg1_out.srecã®èª­ã¿è¾¼ã¿
+    begin
+      @cfg1SRec = SRecord.new(CFG1_OUT_SREC)
+    rescue Errno::ENOENT, Errno::EACCES => ex
+      abort(ex.message)
+    end
+
+    # ãã¸ãã¯ãã³ãã¼ã®åå¾
+    if @symbolAddress.has_key?(CFG1_MAGIC_NUM)
+      $asmLabel = ""
+      $cfg1_prefix = CFG1_PREFIX
+    elsif @symbolAddress.has_key?("_" + CFG1_MAGIC_NUM)
+      $asmLabel = "_"
+      $cfg1_prefix = "_" + CFG1_PREFIX
+    else
+      error_exit("`#{CFG1_MAGIC_NUM}' is not found in `#{CFG1_OUT_SYMS}'")
+    end
+
+    magicNumberData = @cfg1SRec.get_data(@symbolAddress \
+							[$asmLabel + CFG1_MAGIC_NUM], 4)
+    if (magicNumberData == "12345678")
+      $endianLittle = false
+    elsif (magicNumberData == "78563412")
+      $endianLittle = true
+    else
+      error_exit("`#{CFG1_MAGIC_NUM}' is invalid in `#{CFG1_OUT_SREC}'")
+    end
+
+    # åºå®åºåããå¤æ°ã®åå¾
+    $sizeOfSigned = GetSymbolValue($asmLabel + CFG1_SIZEOF_SIGNED, 4, false)
+
+    # å¤åå¾ã·ã³ãã«ã®åå¾
+    $symbolValueTable.each do |symbolName, symbolData|
+      symbol = $cfg1_prefix + symbolName
+      if symbolData.has_key?(:BOOL)
+        value = GetSymbolValue(symbol, $sizeOfSigned, true)
+        if !value.nil?
+          # Cè¨èªã®çå½å¤ãRubyã®çå½å¤ã«å¤æãã¦åãè¾¼ã
+          symbolData[:VALUE] = (value != 0)
+        end
+      else
+        value = GetSymbolValue(symbol, $sizeOfSigned, \
+										symbolData.has_key?(:SIGNED))
+        if !value.nil?
+          symbolData[:VALUE] = value
+        end
+      end
+    end
+
+    #
+    #  ããã·ã¥ã®åæå
+    #
+    $cfgData = {}
+    @objidValues = {}
+    $apiDefinition.each do |apiName, apiDef|
+      if apiDef.has_key?(:API)
+        if !$cfgData.has_key?(apiDef[:API].to_sym)
+          $cfgData[apiDef[:API].to_sym] = {}
+        end
+      end
+      apiDef[:PARAM].each do |apiParam|
+        if apiParam.has_key?(:NAME) && apiParam.has_key?(:ID_DEF)
+          @objidValues[apiParam[:NAME]] = {}
+        end
+      end
+    end
+
+    #
+    #  ãã¡ã¤ã³çæãã¼ã¿ãã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¼ã¿ï¼$cfgDataï¼ã«æ ¼ç´
+    #
+    $cfgData[:CRE_DOM] = {}
+    $domainId.each do |domainName, domainVal|
+      domid = NumStr.new(domainVal, domainName)
+      $cfgData[:CRE_DOM][domainVal] = { :domid => domid }
+    end
+
+    ReadPhase(nil)
+  end
+
+  #
+  #  ãã©ã¡ã¼ã¿ã®å¤ãåãåºã
+  #
+  def self.GetParamValue(paramName, param, apiIndex, index, apiParam, cfgInfo)
+    if apiParam.has_key?(:ID_DEF)				# ãªãã¸ã§ã¯ãè­å¥åï¼å®ç¾©ï¼
+      value = @objidValues[paramName][param]
+    elsif apiParam.has_key?(:ID_REF)			# ãªãã¸ã§ã¯ãè­å¥åï¼åç
+§ï¼
+      if @objidValues[paramName].has_key?(param)
+        value = @objidValues[paramName][param]
+      else
+        error("#{apiDef.has_key?(:KEYPAR) ? "E_NOEXS" : "E_ID"}: " \
+					"`#{param}' in #{cfgInfo[:APINAME]} is not defined", \
+					"#{cfgInfo[:_FILE_]}:#{cfgInfo[:_LINE_]}:")
+        value = nil
+      end
+    elsif apiParam.has_key?(:EXPTYPE)			# æ´æ°å®æ°å¼ãã©ã¡ã¼ã¿
+      if apiIndex.nil?
+        if param.is_a?(NumStr)
+          return(param)
+        else
+          return(NumStr.new(param))
+        end
+      else
+        symbol = "#{$cfg1_prefix}valueof_#{paramName}_#{apiIndex}#{index}"
+        value = GetSymbolValue(symbol, $sizeOfSigned, \
+									apiParam.has_key?(:SIGNED))
+      end
+    else										# ä¸è¬å®æ°å¼ï¼æå­åãã©ã¡ã¼ã¿
+      return(param)
+    end
+    return(NumStr.new(value, param))
+  end
+
+  #
+  #  æå®ãããã§ã¼ãºã®ããã®ãã¹1ã®çæç©ã®èª­ã¿è¾¼ã¿
+  #
+  def self.ReadPhase(phase)
+    #
+    #  ãªãã¸ã§ã¯ãIDã®å²å½ã¦
+    #
+    # å²ãå½ã¦ããªãã¸ã§ã¯ãIDã¯ï¼@objidValuesã«ä¿æããï¼@objidValuesã¯ï¼
+    # 2éã®ããã·ã¥ï¼ããã·ã¥ã®ããã·ã¥ï¼ã§ããï¼
+    #
+    # å
+·ä½çã«ã¯ï¼@objidValuesã¯ï¼ãªãã¸ã§ã¯ãIDã®ãã©ã¡ã¼ã¿åï¼ä¾ãã°ï¼ã»
+    # ããã©IDã§ããã°"semid"ï¼ãããä¿æããå¤æ°åã¯ï¼objidParamNameã¨ã
+    # ãï¼ãã­ã¼ã¨ãï¼ãã®ãªãã¸ã§ã¯ãIDã®å²å½ã¦è¡¨ï¼ãããä¿æããå¤æ°å
+    # ã¯ï¼objidListã¨ããï¼ãå¤ã¨ããããã·ã¥ã§ããï¼ãªãã¸ã§ã¯ãIDã®å²å½
+    # ã¦è¡¨ã¯ï¼ãªãã¸ã§ã¯ãåï¼ãããä¿æããå¤æ°åã¯ï¼objNameã¨ããï¼ãã­ã¼
+    # ã¨ãï¼ãã®IDçªå·ï¼ãããä¿æããå¤æ°åã¯ï¼objidNumberã¨ããï¼ãå¤ã¨
+    # ããããã·ã¥ã§ããï¼
+    #
+    # ä¾ãã°ï¼ã»ããã©SEM1ã®IDçªå·ã1ã®å ´åã«ã¯ï¼æ¬¡ã®ããã«è¨­å®ãããï¼
+    #   @objidValues["semid"]["SEM1"] == 1
+    #
+
+    # IDçªå·å²ãå½ã¦ã®åå¦ç
+    objidParamNameList = []
+    $cfgFileInfo.each do |cfgInfo|
+      # ããªãã­ã»ããµãã£ã¬ã¯ãã£ãã¯èª­ã¿é£ã°ã
+      next if cfgInfo.has_key?(:DIRECTIVE)
+
+      apiDef = $apiDefinition[cfgInfo[:APINAME]]
+      # ç°ãªããã§ã¼ãºã®éçAPIã¯èª­ã¿é£ã°ã
+      next if apiDef[:PHASE] != phase
+
+      apiIndex = cfgInfo[:INDEX]
+      if !apiIndex.nil?
+        # ã·ã³ãã«ãã¡ã¤ã«ã«éçAPIã®ã¤ã³ããã¯ã¹ãå­å¨ããªããã°èª­ã¿é£
+        # ã°ãï¼ifdefç­ã§æ¶ããéçAPIï¼
+        symbol = "#{$cfg1_prefix}static_api_#{apiIndex}"
+        next unless @symbolAddress.has_key?(symbol)
+      end
+
+      apiDef[:PARAM].each do |apiParam|
+        if apiParam.has_key?(:NAME) && apiParam.has_key?(:ID_DEF)
+          objidParamName = apiParam[:NAME]
+          objName = cfgInfo[objidParamName]
+          if $inputObjid.has_key?(objName)
+            # IDçªå·å
+¥åãã¡ã¤ã«ã«å®ç¾©ããã¦ããå ´å
+            @objidValues[objidParamName][objName] = $inputObjid[objName]
+          else
+            @objidValues[objidParamName][objName] = nil
+          end
+          objidParamNameList.push(objidParamName)
+        end
+      end
+    end
+
+    # IDçªå·ã®å²å½ã¦å¦ç
+    objidParamNameList.each do |objidParamName|
+      objidList = @objidValues[objidParamName]
+
+      # æªä½¿ç¨ã®IDçªå·ã®ãªã¹ãï¼ä½¿ç¨ãããã®ããæ¶ãã¦ããï¼
+      unusedObjidList = (1.upto(objidList.keys.size)).to_a
+
+      # å²ãå½ã¦æ¸ã¿ã®IDçªå·ã®å¦ç
+      objidList.each do |objName, objidNumber|
+        if $inputObjid.has_key?(objName)
+          objidIndex = unusedObjidList.index($inputObjid[objName])
+          if objidIndex.nil?
+            # IDçªå·å
+¥åãã¡ã¤ã«ã§æå®ãããå¤ãä¸æ­£
+            error_exit("value of `#{objName}' in ID input file is illegal")
+          else
+            # æªä½¿ç¨ã®IDçªå·ã®ãªã¹ãããåé¤
+            unusedObjidList.delete_at(objidIndex)
+          end
+        end
+      end
+
+      # IDçªå·ã®å²å½ã¦
+      objidList.each do |objName, objidNumber|
+        if objidList[objName].nil?
+          # ä»¥ä¸ã§ï¼@objidValuesãæ¸ãæãã¦ãã
+          objidList[objName] = unusedObjidList.shift
+        end
+      end
+    end
+
+    #
+    #  éçAPIãã¼ã¿ãã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¼ã¿ï¼$cfgDataï¼ã«æ ¼ç´
+    #
+    $cfgFileInfo.each do |cfgInfo|
+      # ããªãã­ã»ããµãã£ã¬ã¯ãã£ãã¯èª­ã¿é£ã°ã
+      next if cfgInfo.has_key?(:DIRECTIVE)
+
+      apiDef = $apiDefinition[cfgInfo[:APINAME]]
+      # ç°ãªããã§ã¼ãºã®éçAPIã¯èª­ã¿é£ã°ã
+      next if apiDef[:PHASE] != phase
+
+      apiSym = apiDef[:API].to_sym
+      apiIndex = cfgInfo[:INDEX]
+      if !apiIndex.nil?
+        # ã·ã³ãã«ãã¡ã¤ã«ã«éçAPIã®ã¤ã³ããã¯ã¹ãå­å¨ããªããã°èª­ã¿é£
+        # ã°ãï¼ifdefç­ã§æ¶ããéçAPIï¼
+        symbol = "#{$cfg1_prefix}static_api_#{apiIndex}"
+        next unless @symbolAddress.has_key?(symbol)
+      end
+
+      # ãã©ã¡ã¼ã¿ã®å¤ãããã·ã¥å½¢å¼ã«æ ¼ç´
+      params = {}
+      apiDef[:PARAM].each do |apiParam|
+        next unless apiParam.has_key?(:NAME)
+        paramName = apiParam[:NAME]
+        next unless cfgInfo.has_key?(paramName)		# ãã©ã¡ã¼ã¿ããªãå ´å
+        paramData = cfgInfo[paramName]
+
+        if apiParam.has_key?(:LIST)
+          params[paramName.to_sym] = []
+          paramData.each.with_index(1) do |param, index|
+            params[paramName.to_sym].push(GetParamValue(paramName, param, \
+								apiIndex, "_#{index}", apiParam, cfgInfo))
+          end
+        else
+          params[paramName.to_sym] = GetParamValue(paramName, paramData, \
+										apiIndex, "", apiParam, cfgInfo)
+        end
+      end
+
+      # ãã¡ã¤ã³IDãè¿½å 
+      if cfgInfo.has_key?(:DOMAIN)
+        domainName = cfgInfo[:DOMAIN]
+        params[:domain] = $domainId[domainName]
+      end
+
+      # ã¯ã©ã¹IDãè¿½å 
+      if cfgInfo.has_key?(:CLASS)
+        if apiIndex.nil?
+          params[:class] = cfgInfo[:CLASS]
+        else
+          symbol = "#{$cfg1_prefix}valueof_CLASS_#{apiIndex}"
+          value = GetSymbolValue(symbol, $sizeOfSigned, true)
+          params[:class] = NumStr.new(value, cfgInfo[:CLASS])
+        end
+      end
+
+      # APIåï¼ãã¡ã¤ã«åï¼è¡çªå·ãè¿½å 
+      params[:apiname] = cfgInfo[:APINAME]
+      params[:_file_] = cfgInfo[:_FILE_]
+      params[:_line_] = cfgInfo[:_LINE_]
+
+      # ç»é²ã­ã¼ãæ±ºå®ãã
+      if apiDef.has_key?(:KEYPAR)
+        keyParam = params[apiDef[:KEYPAR].to_sym]
+        key = keyParam.val
+        if $cfgData[apiSym].has_key?(key)
+          # ç»é²ã­ã¼ã®éè¤
+          error("E_OBJ: #{apiDef[:KEYPAR]} `#{keyParam}' " \
+								"is duplicated in #{cfgInfo[:APINAME]}",
+								"#{cfgInfo[:_FILE_]}:#{cfgInfo[:_LINE_]}:")
+        end
+      else
+        key = $cfgData[apiSym].count + 1
+      end
+      $cfgData[apiSym][key] = params
+    end
+  end
+
+  #
+  #  IDçªå·åºåãã¡ã¤ã«ã®çæ
+  #
+  def self.OutputId(fileName)
+    idOutputFile = GenFile.new(fileName)
+    @objidValues.each do |objidParamName, objidList|
+      objidList.each do |objName, objidNumber|
+        idOutputFile.add("#{objName} #{objidNumber}")
+      end
+    end
+  end
+end
+
+#
+#  ãã¹2ã®å¦ç
+#
+def Pass2
+  #
+  #  ãã¹1ããå¼ãæ¸¡ãããæ
+å ±ããã¡ã¤ã«ããèª­ã¿è¾¼ã
+  #
+  db = PStore.new(CFG1_OUT_DB)
+  db.transaction(true) do
+    $apiDefinition = db[:apiDefinition]
+    $symbolValueTable = db[:symbolValueTable]
+    $cfgFileInfo = db[:cfgFileInfo]
+    $includeFiles = db[:includeFiles]
+    $domainId = db[:domainId]
+  end
+  $cfg2Data = {}
+
+  #
+  #  ãã¹1ã®çæç©ãèª­ã¿è¾¼ã
+  #
+  Cfg1Out.Read()
+  abort if $errorFlag					# ã¨ã©ã¼çºçæã¯abortãã
+
+  #
+  #  å¤åå¾ã·ã³ãã«ãã°ã­ã¼ãã«å¤æ°ã¨ãã¦å®ç¾©ãã
+  #
+  DefineSymbolValue()
+
+  #
+  #  çæã¹ã¯ãªããï¼trbãã¡ã¤ã«ï¼ãå®è¡ãã
+  #
+  $trbFileNames.each do |trbFileName|
+    if /^(.+):(\w+)$/ =~ trbFileName
+      trbFileName = $1
+      Cfg1Out.ReadPhase($2.to_sym)
+    end
+    IncludeTrb(trbFileName)
+  end
+
+  #
+  #  IDçªå·åºåãã¡ã¤ã«ã®çæ
+  #
+  if !$idOutputFileName.nil?
+    Cfg1Out.OutputId($idOutputFileName)
+  end
+
+  #
+  #  ãã¹3ã«å¼ãæ¸¡ãæ
+å ±ããã¡ã¤ã«ã«çæ
+  #
+  if $omitOutputDb.nil?
+    db = PStore.new(CFG2_OUT_DB)
+    db.transaction do
+      db[:apiDefinition] = $apiDefinition
+      db[:symbolValueTable] = $symbolValueTable
+      db[:cfgFileInfo] = $cfgFileInfo
+      db[:includeFiles] = $includeFiles
+      db[:cfgData] = $cfgData
+      db[:asmLabel] = $asmLabel
+      db[:endianLittle] = $endianLittle
+      db[:cfg2Data] = $cfg2Data
+    end
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/configure.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/configure.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/configure.rb	(revision 270)
@@ -0,0 +1,343 @@
+#!/usr/bin/env ruby
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS Software
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+# 
+#  Copyright (C) 2001-2003 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+# 
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+# 
+#  $Id: configure.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+# 
+
+require "optparse"
+require "fileutils"
+require "shell"
+
+#  ãªãã·ã§ã³ã®å®ç¾©
+#
+#  -T <target>			ã¿ã¼ã²ããåï¼å¿
+é ï¼
+#  -a <appldirs>		ã¢ããªã±ã¼ã·ã§ã³ã®ãã£ã¬ã¯ããªåï¼è¤æ°æå®å¯ï¼ã
+#						ãã©ã«ãã¯sampleãã£ã¬ã¯ããªï¼
+#  -A <applname>		ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã åï¼ããã©ã«ãã¯sample1ï¼
+#  -t					ã¡ã¤ã³ã®ãªãã¸ã§ã¯ããã¡ã¤ã«ããªã³ã¯å¯¾è±¡ã«å«ããªã
+#  -c <cfgfile>			ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ï¼.cfgãã¡ã¤
+#						ã«åï¼å
+#  -C <cdlflle>			ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ï¼.cdlãã¡ã¤ã«ï¼å
+#  -U <applobjs>		ä»ã®ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ãã¡ã¤ã«
+#						ï¼.oãã¡ã¤ã«åã§æå®ï¼è¤æ°æå®å¯ï¼
+#  -S <syssvcobjs>		ã·ã¹ãã ãµã¼ãã¹ã®ãã­ã°ã©ã ãã¡ã¤ã«
+#						ï¼.oãã¡ã¤ã«åã§æå®ï¼è¤æ°æå®å¯ï¼
+#  -L <kernel_lib>		ã«ã¼ãã«ã©ã¤ãã©ãªï¼libkernel.aï¼ã®ãã£ã¬ã¯ããªå
+#						ï¼çç¥ããå ´åï¼ã«ã¼ãã«ã©ã¤ãã©ãªãmakeããï¼
+#  -f					ã«ã¼ãã«ãé¢æ°åä½ã§ã³ã³ãã¤ã«ãããã©ããã®æå®
+#  -D <srcdir>			ã«ã¼ãã«ã½ã¼ã¹ã®ç½®ããã¦ãããã£ã¬ã¯ããª
+#  -l <srclang>			ãã­ã°ã©ãã³ã°è¨èªï¼ç¾æç¹ã§ã¯cã¨c++ã®ã¿ãµãã¼ãï¼
+#  -m <tempmakefile>	Makefileã®ãã³ãã¬ã¼ãã®ãã¡ã¤ã«åã®æå®ï¼ããã©ã«
+#						ãã¯sampleãã£ã¬ã¯ããªã®Makefileï¼
+#  -d <depdir>			ä¾å­é¢ä¿ãã¡ã¤ã«ã®ãã£ã¬ã¯ããªåï¼ããã©ã«ãã¯depsï¼
+#  -w					TECSãä½¿ç¨ããªã
+#  -r					ãã¬ã¼ã¹ã­ã°è¨é²ã®ãµã³ãã«ã³ã¼ããä½¿ç¨ãããã©ãã
+#						ã®æå®
+#  -V <devtooldir>		éçºãã¼ã«ï¼ã³ã³ãã¤ã©ç­ï¼ã®ç½®ããã¦ãããã£ã¬ã¯ããª
+#  -R <ruby>			rubyã®ãã¹åï¼æç¤ºçã«æå®ããå ´åï¼
+#  -g <cfg>				ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ï¼cfgï¼ã®ãã¹å
+#  -G <tecsgen>			TECSã¸ã§ãã¬ã¼ã¿ï¼tecsgenï¼ã®ãã¹å
+#  -o <options>			ã³ã³ãã¤ã«ãªãã·ã§ã³ï¼COPTSã«è¿½å ï¼
+#  -O <options>			ã·ã³ãã«å®ç¾©ãªãã·ã§ã³ï¼CDEFSã«è¿½å ï¼
+#  -k <options>			ãªã³ã«ãªãã·ã§ã³ï¼LDFLAGSç­ã«è¿½å ï¼
+
+#  ä½¿ç¨ä¾(1)
+#
+#  % ../configure.rb -T ct11mpcore_gcc -O "-DTOPPERS_USE_QEMU" \
+#					-A perf1 -a ../test -S "test_svc.o histogram.o"
+#
+#  ä½¿ç¨ä¾(2)
+#
+#  % ../configure.rb -T macosx_gcc -L .
+#	ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ã¯ï¼sample1ã«ãªãï¼
+#
+#  ä½¿ç¨ä¾(3)
+#
+#  % ../configure.rb -T ct11mpcore_gcc -O "-DTOPPERS_USE_QEMU" -A tSample2 -t
+#	ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ã¯ï¼TECSçã®ãµã³ãã«ãã­ã°ã©ã ã«ãªãï¼
+#
+#  ä½¿ç¨ä¾(4)
+#
+#  % ../configure.rb -T ct11mpcore_gcc PRC_NUM=4
+#	PRC_NUMã4ã«å®ç¾©ããï¼
+
+#
+#  å¤æ°ã®åæå
+#
+$target = nil
+$appldirs = []
+$applobjs = []
+$syssvcobjs = []
+$kernel_lib = ""
+$kernel_funcobjs = ""
+$srclang = "c"
+$depdir = "deps"
+$omit_tecs = ""
+$enable_trace = ""
+$devtooldir = ""
+$ruby = "ruby"
+$copts = []
+$cdefs = []
+$ldflags = []
+
+#
+#  ãªãã·ã§ã³ã®å¦ç
+#
+OptionParser.new(nil, 22) do |opt|
+  opt.on("-T target",		"taget name (mandatory)") do |val|
+    $target = val
+  end
+  opt.on("-a appldirs",		"application directories") do |val|
+    $appldirs += val.split("\s+")
+  end
+  opt.on("-A applname",		"application program name") do |val|
+    $applname = val
+  end
+  opt.on("-t",				"TECS is used for application development") do |val|
+    $option_t = true
+  end
+  opt.on("-c cfgfile",		"system configuration file") do |val|
+    $cfgfile = val
+  end
+  opt.on("-C cdlfile",		"component description file") do |val|
+    $cdlfile = val
+  end
+  opt.on("-U applobjs",		"additional application object files") do |val|
+    $applobjs += val.split("\s+")
+  end
+  opt.on("-S syssvcobjs",	"system service object files") do |val|
+    $syssvcobjs += val.split("\s+")
+  end
+  opt.on("-L kernel_lib",	"directory of built kernel library") do |val|
+    $kernel_lib = val
+  end
+  opt.on("-f", "each function is complied separately in kernel") do |val|
+    $kernel_funcobjs = true
+  end
+  opt.on("-D srcdir",		"path of source code directory") do |val|
+    $srcdir = val
+  end
+  opt.on("-l srclang",		"programming language (C or C++)") do |val|
+    $srclang = val
+  end
+  opt.on("-m tempmakefile", "template file of Makefile") do |val|
+    $tempmakefile = val
+  end
+  opt.on("-d depdir",		"dependency relation file directory") do |val|
+    $depdir = val
+  end
+  opt.on("-w",				"TECS is not used at all") do |val|
+    $omit_tecs = true
+  end
+  opt.on("-r",				"use the sample code for trace log") do |val|
+    $enable_trace = true
+  end
+  opt.on("-V devtooldir",	"development tools directory") do |val|
+    $devtooldir = val
+  end
+  opt.on("-R ruby",			"path of ruby command") do |val|
+    $ruby = val
+  end
+  opt.on("-g cfg",			"path of configurator") do |val|
+    $cfg = val
+  end
+  opt.on("-G tecsgen",		"path of TECS generator") do |val|
+    $tecsgen = val
+  end
+  opt.on("-o options",		"compiler options") do |val|
+    $copts += val.split("\s+")
+  end
+  opt.on("-O options",		"symbol definition options") do |val|
+    $cdefs += val.split("\s+")
+  end
+  opt.on("-k options",		"linker options") do |val|
+    $ldflags += val.split("\s+")
+  end
+  opt.parse!(ARGV)
+end
+
+#
+#  ãªãã¸ã§ã¯ããã¡ã¤ã«åã®æ¡å¼µå­ãè¿ã
+#
+def GetObjectExtension
+  if /cygwin/ =~ RUBY_PLATFORM
+    return("exe")
+  else
+    return("")
+  end
+end
+
+#
+#  å¤æ°ã®ããã©ã«ãå¤
+#
+if $appldirs.empty?
+  $appldirs.push("\$(SRCDIR)/sample")
+end
+$applname ||= "sample1"
+if $option_t.nil?
+  $applobjs.unshift($applname + ".o")
+end
+$cfgfile ||= $applname + ".cfg"
+$cdlfile ||= $applname + ".cdl"
+if $srcdir.nil?
+  # ã½ã¼ã¹ãã£ã¬ã¯ããªåãåãåºã
+  if /(.*)\/configure/ =~ $0
+    $srcdir = $1
+  else
+    $srcdir = Shell.new.cwd
+  end
+end
+if /^\// =~ $srcdir
+  $srcabsdir = $srcdir
+else
+  $srcabsdir = Shell.new.cwd + "/" + $srcdir
+end
+$tempmakefile ||= $srcdir + "/sample/Makefile"
+$cfg ||= $ruby + " \$(SRCDIR)/cfg/cfg.rb"
+$tecsgen ||= $ruby + " \$(SRCDIR)/tecsgen/tecsgen.rb"
+
+#
+#  -Tãªãã·ã§ã³ã¨ã¿ã¼ã²ããä¾å­é¨ãã£ã¬ã¯ããªã®ç¢ºèª
+#
+if $target.nil?
+  puts("configure.rb: -T option is mandatory")
+elsif !File.directory?($srcdir + "/target/" + $target)
+  puts("configure.rb: #{$srcdir}/target/#{$target} not exist.")
+  $target = nil
+end
+
+if $target.nil?
+  puts("Installed targets are:")
+  Dir.glob($srcdir + "/target/[a-zA-Z0-9]*").each do |target|
+    target.sub!($srcdir + "/target/", "")
+    puts("\t" + target)
+  end
+  abort
+end
+
+#
+#  å¤æ°ãã¼ãã«ã®ä½æ
+#
+$vartable = Hash.new("")
+$vartable["TARGET"] = $target
+$vartable["APPLDIRS"] = $appldirs.join(" ")
+$vartable["APPLNAME"] = $applname
+$vartable["CFGFILE"] = $cfgfile
+$vartable["CDLFILE"] = $cdlfile
+$vartable["APPLOBJS"] = $applobjs.join(" ")
+$vartable["SYSSVCOBJS"] = $syssvcobjs.join(" ")
+$vartable["KERNEL_LIB"] = $kernel_lib
+$vartable["KERNEL_FUNCOBJS"] = $kernel_funcobjs
+$vartable["SRCDIR"] = $srcdir
+$vartable["SRCABSDIR"] = $srcabsdir
+$vartable["SRCLANG"] = $srclang
+$vartable["DEPDIR"] = $depdir
+$vartable["OMIT_TECS"] = $omit_tecs
+$vartable["ENABLE_TRACE"] = $enable_trace
+$vartable["DEVTOOLDIR"] = $devtooldir
+$vartable["RUBY"] = $ruby
+$vartable["CFG"] = $cfg
+$vartable["TECSGEN"] = $tecsgen
+$vartable["COPTS"] = $copts.join(" ")
+$vartable["CDEFS"] = $cdefs.join(" ")
+$vartable["LDFLAGS"] = $ldflags.join(" ")
+$vartable["OBJEXT"] = GetObjectExtension()
+ARGV.each do |arg|
+  if /^([A-Za-z0-9_]+)\s*\=\s*(.*)$/ =~ arg
+    $vartable[$1] = $2
+  else
+    $vartable[arg] = true
+  end
+end
+
+#
+#  ãã¡ã¤ã«ãå¤æãã
+#
+def convert(inFileName, outFileName)
+  puts("Generating #{outFileName} from #{inFileName}.\n")
+  if (File.file?(outFileName))
+    puts("#{outFileName} exists.  Save as #{outFileName}.bak.\n")
+    FileUtils.move(outFileName, outFileName + ".bak")
+  end
+
+  begin
+    inFile = File.open(inFileName)
+    outFile = File.open(outFileName, "w")
+  rescue Errno::ENOENT, Errno::EACCES => ex
+    abort(ex.message)
+  end
+
+  inFile.each do |line|
+    line.chomp!
+    while line.sub!(/\@\(([A-Za-z0-9_]+)\)/) {|var| $vartable[$1]} do end
+    outFile.print(line,"\n")
+  end
+
+  inFile.close
+  outFile.close
+end
+
+#
+#  Makefileã®çæ
+#
+convert($tempmakefile, "Makefile")
+
+#
+#  ä¾å­é¢ä¿ãã¡ã¤ã«ã®ãã£ã¬ã¯ããªã®ä½æ
+#
+if !File.directory?($depdir)
+  Dir.mkdir($depdir)
+end
Index: EcnlProtoTool/trunk/asp3_dcre/include/itron.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/include/itron.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/include/itron.h	(revision 270)
@@ -0,0 +1,164 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ITRONä»æ§å
+±éè¦å®ã®ãã¼ã¿åã»å®æ°ã»ãã¯ã­
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼ITRONä»æ§å
+±éè¦å®ã®ãã¼ã¿åã»å®æ°ã»ãã¯ã­ã®ä¸­
+ *  ã§ï¼TOPPERSå
+±éããããã¡ã¤ã«ã«å«ã¾ããªããã®ã®å®ç¾©ãå«ãï¼ITRONä»
+ *  æ§ã¨ã®äºææ§ãå¿
+è¦ã¨ããã¢ããªã±ã¼ã·ã§ã³ãã¤ã³ã¯ã«ã¼ããããã¨ãæ³
+ *  å®ãã¦ããï¼
+ *
+ *  ã¢ã»ã³ããªè¨èªã®ã½ã¼ã¹ãã¡ã¤ã«ãããã®ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ãããæ
+ *  ã¯ï¼TOPPERS_MACRO_ONLYãå®ç¾©ãã¦ããï¼ããã«ããï¼ãã¯ã­å®ç¾©ä»¥å¤ã
+ *  é¤ãããã«ãªã£ã¦ããï¼
+ */
+
+#ifndef TOPPERS_ITRON_H
+#define TOPPERS_ITRON_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ *  TOPPERSå
+±éããããã¡ã¤ã«
+ */
+#include <t_stddef.h>
+
+/*
+ *  ITRONä»æ§å
+±éãã¼ã¿å
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+#ifdef INT8_MAX
+typedef	int8_t			B;			/* ç¬¦å·ä»ã8ãããæ´æ° */
+#endif /* INT8_MAX */
+
+#ifdef UINT8_MAX
+typedef	uint8_t			UB;			/* ç¬¦å·ç¡ã8ãããæ´æ° */
+typedef	uint8_t			VB;			/* åãå®ã¾ããªã8ãããã®å¤ */
+#endif /* UINT8_MAX */
+
+typedef	int16_t			H;			/* ç¬¦å·ä»ã16ãããæ´æ° */
+typedef	uint16_t		UH;			/* ç¬¦å·ç¡ã16ãããæ´æ° */
+typedef	uint16_t		VH;			/* åãå®ã¾ããªã16ãããã®å¤ */
+
+typedef	int32_t			W;			/* ç¬¦å·ä»ã32ãããæ´æ° */
+typedef	uint32_t		UW;			/* ç¬¦å·ç¡ã32ãããæ´æ° */
+typedef	uint32_t		VW;			/* åãå®ã¾ããªã32ãããã®å¤ */
+
+#ifdef INT64_MAX
+typedef	int64_t			D;			/* ç¬¦å·ä»ã64ãããæ´æ° */
+#endif /* INT64_MAX */
+
+#ifdef UINT64_MAX
+typedef	uint64_t		UD;			/* ç¬¦å·ç¡ã64ãããæ´æ° */
+typedef	uint64_t		VD;			/* åãå®ã¾ããªã64ãããã®å¤ */
+#endif /* UINT64_MAX */
+
+typedef	void			*VP;		/* åãå®ã¾ããªããã®ã¸ã®ãã¤ã³ã¿ */
+
+typedef int_t			INT;		/* èªç¶ãªãµã¤ãºã®ç¬¦å·ä»ãæ´æ° */
+typedef uint_t			UINT;		/* èªç¶ãªãµã¤ãºã®ç¬¦å·ç¡ãæ´æ° */
+
+typedef bool_t			BOOL;		/* çå½å¤ */
+
+typedef size_t			SIZE;		/* ã¡ã¢ãªé åã®ãµã¤ãºãè¡¨ãç¬¦å·ç¡ãæ´æ°*/
+typedef	intptr_t		VP_INT;		/* ãã¤ã³ã¿ã¾ãã¯ç¬¦å·ä»ãæ´æ° */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  ITRONä»æ§å
+±éå®æ°
+ */
+#define	TRUE		true			/* ç */
+#define	FALSE		false			/* å½ */
+
+/*
+ *  å¼·å¶å¾
+ã¡ç¶æ
+ããã®å¼·å¶åé
+ */
+#define frsm_tsk(tskid)		rsm_tsk(tskid)
+
+/*
+ *  ãªãã¸ã§ã¯ãå±æ§ã®å®ç¾©
+ */
+#define TA_HLNG			UINT_C(0x00)	/* é«ç´è¨èªç¨ã¤ã³ã¿ãã§ã¼ã¹ */
+#define TA_TFIFO		UINT_C(0x00)	/* ã¿ã¹ã¯ã®å¾
+ã¡è¡åãFIFOé ã« */
+#define TA_WSGL			UINT_C(0x00)	/* å¾
+ã¡ã¿ã¹ã¯ã¯1ã¤ã®ã¿ */
+
+/*
+ *  ãã¹ãåæ°ã®æå¤§å¤
+ */
+#define TMAX_SUSCNT		UINT_C(1)		/* å¼·å¶å¾
+ã¡è¦æ±ãã¹ãæ°ã®æå¤§å¤ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TOPPERS_ITRON_H */
Index: EcnlProtoTool/trunk/asp3_dcre/include/kernel.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/include/kernel.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/include/kernel.h	(revision 270)
@@ -0,0 +1,786 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		TOPPERS/ASPã«ã¼ãã« æ¨æºããããã¡ã¤ã«
+ *
+ *  TOPPERS/ASPã«ã¼ãã«ããµãã¼ããããµã¼ãã¹ã³ã¼ã«ã®å®£è¨ã¨ï¼å¿
+è¦ãªãã¼
+ *  ã¿åï¼å®æ°ï¼ãã¯ã­ã®å®ç¾©ãå«ãããããã¡ã¤ã«ï¼
+ *
+ *  ã¢ã»ã³ããªè¨èªã®ã½ã¼ã¹ãã¡ã¤ã«ãããã®ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ãããæ
+ *  ã¯ï¼TOPPERS_MACRO_ONLYãå®ç¾©ãã¦ããï¼ããã«ããï¼ãã¯ã­å®ç¾©ä»¥å¤ã
+ *  é¤ãããã«ãªã£ã¦ããï¼
+ */
+
+#ifndef TOPPERS_KERNEL_H
+#define TOPPERS_KERNEL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ *	TOPPERSå
+±éã®ãã¼ã¿åã»å®æ°ã»ãã¯ã­
+ */
+#include <t_stddef.h>
+
+/*
+ *  ã¿ã¼ã²ããä¾å­é¨
+ */
+#include "target_kernel.h"
+
+/*
+ *  ãµãã¼ãããæ©è½
+ */
+#ifdef TOPPERS_TARGET_SUPPORT_DIS_INT
+#define TOPPERS_SUPPORT_DIS_INT			/* dis_intããµãã¼ãããã¦ãã */
+#endif /* TOPPERS_TARGET_SUPPORT_DIS_INT */
+
+#ifdef TOPPERS_TARGET_SUPPORT_ENA_INT
+#define TOPPERS_SUPPORT_ENA_INT			/* ena_intããµãã¼ãããã¦ãã */
+#endif /* TOPPERS_TARGET_SUPPORT_ENA_INT */
+
+#define TOPPERS_SUPPORT_DYNAMIC_CRE		/* åççææ©è½æ¡å¼µ */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ãã¼ã¿åã®å®ç¾©
+ */
+
+/*
+ *  ããããã¿ã¼ã³ããªãã¸ã§ã¯ãçªå·ã®åå®ç¾©
+ */
+typedef	uint_t		FLGPTN;		/* ã¤ãã³ããã©ã°ã®ããããã¿ã¼ã³ */
+typedef	uint_t		INTNO;		/* å²è¾¼ã¿çªå· */
+typedef	uint_t		INHNO;		/* å²è¾¼ã¿ãã³ãã©çªå· */
+typedef	uint_t		EXCNO;		/* CPUä¾å¤ãã³ãã©çªå· */
+
+/*
+ *  å¦çåä½ã®åå®ç¾©
+ */
+typedef void	(*TASK)(intptr_t exinf);
+typedef void	(*TMEHDR)(intptr_t exinf);
+typedef void	(*ISR)(intptr_t exinf);
+typedef void	(*INTHDR)(void);
+typedef void	(*EXCHDR)(void *p_excinf);
+typedef void	(*INIRTN)(intptr_t exinf);
+typedef void	(*TERRTN)(intptr_t exinf);
+
+/*
+ *  ã¡ã¢ãªé åç¢ºä¿ã®ããã®åå®ç¾©
+ */
+#ifndef TOPPERS_STK_T
+#define TOPPERS_STK_T	intptr_t
+#endif /* TOPPERS_STK_T */
+typedef	TOPPERS_STK_T	STK_T;	/* ã¹ã¿ãã¯é åãç¢ºä¿ããããã®å */
+
+#ifndef TOPPERS_MPF_T
+#define TOPPERS_MPF_T	intptr_t
+#endif /* TOPPERS_MPF_T */
+typedef	TOPPERS_MPF_T	MPF_T;	/* åºå®é·ã¡ã¢ãªãã¼ã«é åãç¢ºä¿ããããã®å */
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ãã®éç¥æ¹æ³ã®ãã±ããå½¢å¼ã®å®ç¾©
+ */
+typedef struct {
+	intptr_t	exinf;		/* ã¿ã¤ã ã¤ãã³ããã³ãã©ã®æ¡å¼µæ
+å ± */
+	TMEHDR		tmehdr;		/* ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å
+é ­çªå° */
+} T_NFY_HDR;
+
+typedef struct {
+	intptr_t	*p_var;		/* å¤æ°ã®çªå° */
+	intptr_t	value;		/* è¨­å®ããå¤ */
+} T_NFY_VAR;
+
+typedef struct {
+	intptr_t	*p_var;		/* å¤æ°ã®çªå° */
+} T_NFY_IVAR;
+
+typedef struct {
+	ID			tskid;		/* ã¿ã¹ã¯ID */
+} T_NFY_TSK;
+
+typedef struct {
+	ID			semid;		/* ã»ããã©ID */
+} T_NFY_SEM;
+
+typedef struct {
+	ID			flgid;		/* ã¤ãã³ããã©ã°ID */
+	FLGPTN		flgptn;		/* ã»ããããããããã¿ã¼ã³ */
+} T_NFY_FLG;
+
+typedef struct {
+	ID			dtqid;		/* ãã¼ã¿ã­ã¥ã¼ID */
+	intptr_t	data;		/* éä¿¡ããå¤ */
+} T_NFY_DTQ;
+
+typedef struct {
+	intptr_t	*p_var;		/* å¤æ°ã®çªå° */
+} T_ENFY_VAR;
+
+typedef struct {
+	ID			dtqid;		/* ãã¼ã¿ã­ã¥ã¼ID */
+} T_ENFY_DTQ;
+
+typedef struct {
+	MODE	nfymode;			/* éç¥å¦çã¢ã¼ã */
+	union {						/* ã¿ã¤ã ã¤ãã³ãã®éç¥ã«é¢ããä»éæ
+å ± */
+		T_NFY_HDR	handler;
+		T_NFY_VAR	setvar;		
+		T_NFY_IVAR	incvar;		
+		T_NFY_TSK	acttsk;
+		T_NFY_TSK	wuptsk;
+		T_NFY_SEM	sigsem;
+		T_NFY_FLG	setflg;
+		T_NFY_DTQ	snddtq;
+	} nfy;
+	union {						/* ã¨ã©ã¼ã®éç¥ã«é¢ããä»éæ
+å ± */
+		T_ENFY_VAR	setvar;
+		T_NFY_IVAR	incvar;		
+		T_NFY_TSK	acttsk;
+		T_NFY_TSK	wuptsk;
+		T_NFY_SEM	sigsem;
+		T_NFY_FLG	setflg;
+		T_ENFY_DTQ	snddtq;
+	} enfy;
+} T_NFYINFO;
+
+/*
+ *  ãã±ããå½¢å¼ã®å®ç¾©
+ */
+typedef struct t_ctsk {
+	ATR			tskatr;		/* ã¿ã¹ã¯å±æ§ */
+	intptr_t	exinf;		/* ã¿ã¹ã¯ã®æ¡å¼µæ
+å ± */
+	TASK		task;		/* ã¿ã¹ã¯ã®ã¡ã¤ã³ã«ã¼ãã³ã®å
+é ­çªå° */
+	PRI			itskpri;	/* ã¿ã¹ã¯ã®èµ·åæåªå
+åº¦ */
+	size_t		stksz;		/* ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã®ãµã¤ãº */
+	STK_T 		*stk;		/* ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã®å
+é ­çªå° */
+} T_CTSK;
+
+typedef struct t_rtsk {
+	STAT	tskstat;	/* ã¿ã¹ã¯ç¶æ
+ */
+	PRI		tskpri;		/* ã¿ã¹ã¯ã®ç¾å¨åªå
+åº¦ */
+	PRI		tskbpri;	/* ã¿ã¹ã¯ã®ãã¼ã¹åªå
+åº¦ */
+	STAT	tskwait;	/* å¾
+ã¡è¦å  */
+	ID		wobjid;		/* å¾
+ã¡å¯¾è±¡ã®ãªãã¸ã§ã¯ãã®ID */
+	TMO		lefttmo;	/* ã¿ã¤ã ã¢ã¦ãããã¾ã§ã®æé */
+	uint_t	actcnt;		/* èµ·åè¦æ±ã­ã¥ã¼ã¤ã³ã°æ° */
+	uint_t	wupcnt;		/* èµ·åºè¦æ±ã­ã¥ã¼ã¤ã³ã°æ° */
+	bool_t	raster;		/* ã¿ã¹ã¯çµäºè¦æ±ç¶æ
+ */
+	bool_t	dister;		/* ã¿ã¹ã¯çµäºç¦æ­¢ç¶æ
+ */
+} T_RTSK;
+
+typedef struct t_csem {
+	ATR		sematr;		/* ã»ããã©å±æ§ */
+	uint_t	isemcnt;	/* ã»ããã©ã®åæè³æºæ° */
+	uint_t	maxsem;		/* ã»ããã©ã®æå¤§è³æºæ° */
+} T_CSEM;
+
+typedef struct t_rsem {
+	ID		wtskid;		/* ã»ããã©ã®å¾
+ã¡è¡åã®å
+é ­ã®ã¿ã¹ã¯ã®IDçªå· */
+	uint_t	semcnt;		/* ã»ããã©ã®ç¾å¨ã®è³æºæ° */
+} T_RSEM;
+
+typedef struct t_cflg {
+	ATR		flgatr;		/* ã¤ãã³ããã©ã°å±æ§ */
+	FLGPTN	iflgptn;	/* ã¤ãã³ããã©ã°ã®åæããããã¿ã¼ã³ */
+} T_CFLG;
+
+typedef struct t_rflg {
+	ID		wtskid;		/* ã¤ãã³ããã©ã°ã®å¾
+ã¡è¡åã®å
+é ­ã®ã¿ã¹ã¯ã®IDçªå· */
+	FLGPTN	flgptn;		/* ã¤ãã³ããã©ã°ã®ç¾å¨ã®ããããã¿ã¼ã³ */
+} T_RFLG;
+
+typedef struct t_cdtq {
+	ATR		dtqatr;		/* ãã¼ã¿ã­ã¥ã¼å±æ§ */
+	uint_t	dtqcnt;		/* ãã¼ã¿ã­ã¥ã¼ç®¡çé åã«æ ¼ç´ã§ãããã¼ã¿æ° */
+	void 	*dtqmb;		/* ãã¼ã¿ã­ã¥ã¼ç®¡çé åã®å
+é ­çªå° */
+} T_CDTQ;
+
+typedef struct t_rdtq {
+	ID		stskid;		/* ãã¼ã¿ã­ã¥ã¼ã®éä¿¡å¾
+ã¡è¡åã®å
+é ­ã®ã¿ã¹ã¯ã®IDçªå· */
+	ID		rtskid;		/* ãã¼ã¿ã­ã¥ã¼ã®åä¿¡å¾
+ã¡è¡åã®å
+é ­ã®ã¿ã¹ã¯ã®IDçªå· */
+	uint_t	sdtqcnt;	/* ãã¼ã¿ã­ã¥ã¼ç®¡çé åã«æ ¼ç´ããã¦ãããã¼ã¿ã®æ° */
+} T_RDTQ;
+
+typedef struct t_cpdq {
+	ATR		pdqatr;		/* åªå
+åº¦ãã¼ã¿ã­ã¥ã¼å±æ§ */
+	uint_t	pdqcnt;		/* åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çé åã«æ ¼ç´ã§ãããã¼ã¿æ° */
+	PRI		maxdpri;	/* åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã«éä¿¡ã§ãããã¼ã¿åªå
+åº¦ã®æ
+						   å¤§å¤ */
+	void 	*pdqmb;		/* åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çé åã®å
+é ­çªå° */
+} T_CPDQ;
+
+typedef struct t_rpdq {
+	ID		stskid;		/* åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã®éä¿¡å¾
+ã¡è¡åã®å
+é ­ã®ã¿ã¹ã¯
+						   ã®IDçªå· */
+	ID		rtskid;		/* åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã®åä¿¡å¾
+ã¡è¡åã®å
+é ­ã®ã¿ã¹ã¯
+						   ã®IDçªå· */
+	uint_t	spdqcnt;	/* åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çé åã«æ ¼ç´ããã¦ãããã¼
+						   ã¿ã®æ° */
+} T_RPDQ;
+
+typedef struct t_cmtx {
+	ATR		mtxatr;		/* ãã¥ã¼ããã¯ã¹å±æ§ */
+	PRI		ceilpri;	/* ãã¥ã¼ããã¯ã¹ã®ä¸éåªå
+åº¦ */
+} T_CMTX;
+
+typedef struct t_rmtx {
+	ID		htskid;		/* ãã¥ã¼ããã¯ã¹ãã­ãã¯ãã¦ããã¿ã¹ã¯ã®IDçªå· */
+	ID		wtskid;		/* ãã¥ã¼ããã¯ã¹ã®å¾
+ã¡è¡åã®å
+é ­ã®ã¿ã¹ã¯ã®IDçªå· */
+} T_RMTX;
+
+typedef struct t_cmpf {
+	ATR		mpfatr;		/* åºå®é·ã¡ã¢ãªãã¼ã«å±æ§ */
+	uint_t	blkcnt;		/* ç²å¾ã§ããåºå®é·ã¡ã¢ãªãã­ãã¯ã®æ° */
+	uint_t	blksz;		/* åºå®é·ã¡ã¢ãªãã­ãã¯ã®ãµã¤ãº */
+	MPF_T 	*mpf;		/* åºå®é·ã¡ã¢ãªãã¼ã«é åã®å
+é ­çªå° */
+	void 	*mpfmb;		/* åºå®é·ã¡ã¢ãªãã¼ã«ç®¡çé åã®å
+é ­çªå° */
+} T_CMPF;
+
+typedef struct t_rmpf {
+	ID		wtskid;		/* åºå®é·ã¡ã¢ãªãã¼ã«ã®å¾
+ã¡è¡åã®å
+é ­ã®ã¿ã¹ã¯ã®
+						   IDçªå· */
+	uint_t	fblkcnt;	/* åºå®é·ã¡ã¢ãªãã¼ã«é åã®ç©ºãã¡ã¢ãªé åã«å²ã
+						   ä»ãããã¨ãã§ããåºå®é·ã¡ã¢ãªãã­ãã¯ã®æ° */
+} T_RMPF;
+
+typedef struct t_ccyc {
+	ATR			cycatr;		/* å¨æéç¥å±æ§ */
+	T_NFYINFO	nfyinfo;	/* å¨æéç¥ã®éç¥æ¹æ³ */
+	RELTIM		cyctim;		/* å¨æéç¥ã®éç¥å¨æ */
+	RELTIM		cycphs;		/* å¨æéç¥ã®éç¥ä½ç¸ */
+} T_CCYC;
+
+typedef struct t_rcyc {
+	STAT	cycstat;	/* å¨æéç¥ã®åä½ç¶æ
+ */
+	RELTIM	lefttim;	/* æ¬¡åéç¥æå»ã¾ã§ã®ç¸å¯¾æé */
+} T_RCYC;
+
+typedef struct t_calm {
+	ATR			almatr;		/* ã¢ã©ã¼ã éç¥å±æ§ */
+	T_NFYINFO	nfyinfo;	/* ã¢ã©ã¼ã éç¥ã®éç¥æ¹æ³ */
+} T_CALM;
+
+typedef struct t_ralm {
+	STAT	almstat;	/* ã¢ã©ã¼ã éç¥ã®åä½ç¶æ
+ */
+	RELTIM	lefttim;	/* éç¥æå»ã¾ã§ã®ç¸å¯¾æé */
+} T_RALM;
+
+typedef struct t_cisr {
+	ATR			isratr;		/* å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³å±æ§ */
+	intptr_t	exinf;		/* å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®æ¡å¼µæ
+å ± */
+	INTNO		intno;		/* å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ãç»é²ããå²è¾¼ã¿çªå· */
+	ISR			isr;		/* å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®å
+é ­çªå° */
+	PRI			isrpri;		/* å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³åªå
+åº¦ */
+} T_CISR;
+
+/*
+ *  ãµã¼ãã¹ã³ã¼ã«ã®å®£è¨
+ */
+
+/*
+ *  ã¿ã¹ã¯ç®¡çæ©è½
+ */
+extern ER_UINT	acre_tsk(const T_CTSK *pk_ctsk) throw();
+extern ER		del_tsk(ID tskid) throw();
+extern ER		act_tsk(ID tskid) throw();
+extern ER_UINT	can_act(ID tskid) throw();
+extern ER		get_tst(ID tskid, STAT *p_tskstat) throw();
+extern ER		chg_pri(ID tskid, PRI tskpri) throw();
+extern ER		get_pri(ID tskid, PRI *p_tskpri) throw();
+extern ER		get_inf(intptr_t *p_exinf) throw();
+extern ER		ref_tsk(ID tskid, T_RTSK *pk_rtsk) throw();
+
+/*
+ *  ã¿ã¹ã¯ä»å±åææ©è½
+ */
+extern ER		slp_tsk(void) throw();
+extern ER		tslp_tsk(TMO tmout) throw();
+extern ER		wup_tsk(ID tskid) throw();
+extern ER_UINT	can_wup(ID tskid) throw();
+extern ER		rel_wai(ID tskid) throw();
+extern ER		sus_tsk(ID tskid) throw();
+extern ER		rsm_tsk(ID tskid) throw();
+extern ER		dly_tsk(RELTIM dlytim) throw();
+
+/*
+ *  ã¿ã¹ã¯çµäºæ©è½
+ */
+extern ER		ext_tsk(void) throw();
+extern ER		ras_ter(ID tskid) throw();
+extern ER		dis_ter(void) throw();
+extern ER		ena_ter(void) throw();
+extern bool_t	sns_ter(void) throw();
+extern ER		ter_tsk(ID tskid) throw();
+
+/*
+ *  åæã»éä¿¡æ©è½
+ */
+extern ER_ID	acre_sem(const T_CSEM *pk_csem) throw();
+extern ER		del_sem(ID semid) throw();
+extern ER		sig_sem(ID semid) throw();
+extern ER		wai_sem(ID semid) throw();
+extern ER		pol_sem(ID semid) throw();
+extern ER		twai_sem(ID semid, TMO tmout) throw();
+extern ER		ini_sem(ID semid) throw();
+extern ER		ref_sem(ID semid, T_RSEM *pk_rsem) throw();
+
+extern ER_ID	acre_flg(const T_CFLG *pk_cflg) throw();
+extern ER		del_flg(ID flgid) throw();
+extern ER		set_flg(ID flgid, FLGPTN setptn) throw();
+extern ER		clr_flg(ID flgid, FLGPTN clrptn) throw();
+extern ER		wai_flg(ID flgid, FLGPTN waiptn,
+						MODE wfmode, FLGPTN *p_flgptn) throw();
+extern ER		pol_flg(ID flgid, FLGPTN waiptn,
+						MODE wfmode, FLGPTN *p_flgptn) throw();
+extern ER		twai_flg(ID flgid, FLGPTN waiptn,
+						MODE wfmode, FLGPTN *p_flgptn, TMO tmout) throw();
+extern ER		ini_flg(ID flgid) throw();
+extern ER		ref_flg(ID flgid, T_RFLG *pk_rflg) throw();
+
+extern ER_ID	acre_dtq(const T_CDTQ *pk_cdtq) throw();
+extern ER		del_dtq(ID dtqid) throw();
+extern ER		snd_dtq(ID dtqid, intptr_t data) throw();
+extern ER		psnd_dtq(ID dtqid, intptr_t data) throw();
+extern ER		tsnd_dtq(ID dtqid, intptr_t data, TMO tmout) throw();
+extern ER		fsnd_dtq(ID dtqid, intptr_t data) throw();
+extern ER		rcv_dtq(ID dtqid, intptr_t *p_data) throw();
+extern ER		prcv_dtq(ID dtqid, intptr_t *p_data) throw();
+extern ER		trcv_dtq(ID dtqid, intptr_t *p_data, TMO tmout) throw();
+extern ER		ini_dtq(ID dtqid) throw();
+extern ER		ref_dtq(ID dtqid, T_RDTQ *pk_rdtq) throw();
+
+extern ER_ID	acre_pdq(const T_CPDQ *pk_cpdq) throw();
+extern ER		del_pdq(ID pdqid) throw();
+extern ER		snd_pdq(ID pdqid, intptr_t data, PRI datapri) throw();
+extern ER		psnd_pdq(ID pdqid, intptr_t data, PRI datapri) throw();
+extern ER		tsnd_pdq(ID pdqid, intptr_t data,
+										PRI datapri, TMO tmout) throw();
+extern ER		rcv_pdq(ID pdqid, intptr_t *p_data, PRI *p_datapri) throw();
+extern ER		prcv_pdq(ID pdqid, intptr_t *p_data, PRI *p_datapri) throw();
+extern ER		trcv_pdq(ID pdqid, intptr_t *p_data,
+										PRI *p_datapri, TMO tmout) throw();
+extern ER		ini_pdq(ID pdqid) throw();
+extern ER		ref_pdq(ID pdqid, T_RPDQ *pk_rpdq) throw();
+
+extern ER_ID	acre_mtx(const T_CMTX *pk_cmtx) throw();
+extern ER		del_mtx(ID mtxid) throw();
+extern ER		loc_mtx(ID mtxid) throw();
+extern ER		ploc_mtx(ID mtxid) throw();
+extern ER		tloc_mtx(ID mtxid, TMO tmout) throw();
+extern ER		unl_mtx(ID mtxid) throw();
+extern ER		ini_mtx(ID mtxid) throw();
+extern ER		ref_mtx(ID mtxid, T_RMTX *pk_rmtx) throw();
+
+/*
+ *  ã¡ã¢ãªãã¼ã«ç®¡çæ©è½
+ */
+extern ER_ID	acre_mpf(const T_CMPF *pk_cmpf) throw();
+extern ER		del_mpf(ID mpfid) throw();
+extern ER		get_mpf(ID mpfid, void **p_blk) throw();
+extern ER		pget_mpf(ID mpfid, void **p_blk) throw();
+extern ER		tget_mpf(ID mpfid, void **p_blk, TMO tmout) throw();
+extern ER		rel_mpf(ID mpfid, void *blk) throw();
+extern ER		ini_mpf(ID mpfid) throw();
+extern ER		ref_mpf(ID mpfid, T_RMPF *pk_rmpf) throw();
+
+/*
+ *  æéç®¡çæ©è½
+ */
+extern ER		set_tim(SYSTIM systim) throw();
+extern ER		get_tim(SYSTIM *p_systim) throw();
+extern ER		adj_tim(int32_t adjtim) throw();
+extern HRTCNT	fch_hrt(void) throw();
+
+extern ER_ID	acre_cyc(const T_CCYC *pk_ccyc) throw();
+extern ER		del_cyc(ID cycid) throw();
+extern ER		sta_cyc(ID cycid) throw();
+extern ER		stp_cyc(ID cycid) throw();
+extern ER		ref_cyc(ID cycid, T_RCYC *pk_rcyc) throw();
+
+extern ER_ID	acre_alm(const T_CALM *pk_calm) throw();
+extern ER		del_alm(ID almid) throw();
+extern ER		sta_alm(ID almid, RELTIM almtim) throw();
+extern ER		stp_alm(ID almid) throw();
+extern ER		ref_alm(ID almid, T_RALM *pk_ralm) throw();
+
+/*
+ *  ã·ã¹ãã ç¶æ
+ç®¡çæ©è½
+ */
+extern ER		rot_rdq(PRI tskpri) throw();
+extern ER		get_tid(ID *p_tskid) throw();
+extern ER		get_lod(PRI tskpri, uint_t *p_load) throw();
+extern ER		get_nth(PRI tskpri, uint_t nth, ID *p_tskid) throw();
+extern ER		loc_cpu(void) throw();
+extern ER		unl_cpu(void) throw();
+extern ER		dis_dsp(void) throw();
+extern ER		ena_dsp(void) throw();
+extern bool_t	sns_ctx(void) throw();
+extern bool_t	sns_loc(void) throw();
+extern bool_t	sns_dsp(void) throw();
+extern bool_t	sns_dpn(void) throw();
+extern bool_t	sns_ker(void) throw();
+extern ER		ext_ker(void) throw();
+
+/*
+ *  å²è¾¼ã¿ç®¡çæ©è½
+ */
+extern ER_ID	acre_isr(const T_CISR *pk_cisr) throw();
+extern ER		del_isr(ID isrid) throw();
+extern ER		dis_int(INTNO intno) throw();
+extern ER		ena_int(INTNO intno) throw();
+extern ER		chg_ipm(PRI intpri) throw();
+extern ER		get_ipm(PRI *p_intpri) throw();
+
+/*
+ *  CPUä¾å¤ç®¡çæ©è½
+ */
+extern bool_t	xsns_dpn(void *p_excinf) throw();
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  éã¿ã¹ã¯ã³ã³ãã­ã¹ãããå¼ã³åºãããµã¼ãã¹ã³ã¼ã«
+ */
+#define iact_tsk(tskid)						act_tsk(tskid)
+#define iwup_tsk(tskid)						wup_tsk(tskid)
+#define irel_wai(tskid)						rel_wai(tskid)
+#define isns_ter()							sns_ter()
+#define isig_sem(semid)						sig_sem(semid)
+#define iset_flg(flgid, setptn)				set_flg(flgid, setptn)
+#define ipsnd_dtq(dtqid, data)				psnd_dtq(dtqid, data)
+#define ifsnd_dtq(dtqid, data)				fsnd_dtq(dtqid, data)
+#define ipsnd_pdq(pdqid, data, datapri)		psnd_pdq(pdqid, data, datapri)
+#define ifch_hrt()							fch_hrt()
+#define ista_alm(almid, almtim)				sta_alm(almid, almtim)
+#define istp_alm(almid)						stp_alm(almid)
+#define irot_rdq(tskpri)					rot_rdq(tskpri)
+#define iget_tid(p_tskid)					get_tid(p_tskid)
+#define iloc_cpu()							loc_cpu()
+#define iunl_cpu()							unl_cpu()
+#define isns_ctx()							sns_ctx()
+#define isns_loc()							sns_loc()
+#define isns_dsp()							sns_dsp()
+#define isns_dpn()							sns_dpn()
+#define isns_ker()							sns_ker()
+#define iext_ker()							ext_ker()
+#define idis_int(intno)						dis_int(intno)
+#define iena_int(intno)						ena_int(intno)
+#define ixsns_dpn(p_excinf)					xsns_dpn(p_excinf)
+
+/*
+ *  ãªãã¸ã§ã¯ãå±æ§ã®å®ç¾©
+ */
+#define TA_ACT			UINT_C(0x01)	/* ã¿ã¹ã¯ãèµ·åãããç¶æ
+ã§çæ */
+#define TA_NOACTQUE		UINT_C(0x02)	/* èµ·åè¦æ±ãã­ã¥ã¼ã¤ã³ã°ããªã */
+
+#define TA_TPRI			UINT_C(0x01)	/* ã¿ã¹ã¯ã®å¾
+ã¡è¡åãåªå
+åº¦é ã« */
+
+#define TA_WMUL			UINT_C(0x02)	/* è¤æ°ã®å¾
+ã¡ã¿ã¹ã¯ */
+#define TA_CLR			UINT_C(0x04)	/* ã¤ãã³ããã©ã°ã®ã¯ãªã¢æå® */
+
+#define TA_CEILING		UINT_C(0x03)	/* åªå
+åº¦ä¸éãã­ãã³ã« */
+
+#define TA_STA			UINT_C(0x02)	/* å¨æéç¥ãåä½ç¶æ
+ã§çæ */
+
+#define TA_NONKERNEL	UINT_C(0x02)	/* ã«ã¼ãã«ç®¡çå¤ã®å²è¾¼ã¿ */
+
+#define TA_ENAINT		UINT_C(0x01)	/* å²è¾¼ã¿è¦æ±ç¦æ­¢ãã©ã°ãã¯ãªã¢ */
+#define TA_EDGE			UINT_C(0x02)	/* ã¨ãã¸ããªã¬ */
+
+/*
+ *  ãµã¼ãã¹ã³ã¼ã«ã®åä½ã¢ã¼ãã®å®ç¾©
+ */
+#define TWF_ORW			UINT_C(0x01)	/* ã¤ãã³ããã©ã°ã®ORå¾
+ã¡ */
+#define TWF_ANDW		UINT_C(0x02)	/* ã¤ãã³ããã©ã°ã®ANDå¾
+ã¡ */
+
+/*
+ *  éç¥å¦çã¢ã¼ãã®å®ç¾©
+ */
+#define TNFY_HANDLER	UINT_C(0x00)		/* ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å¼åºã */
+#define TNFY_SETVAR		UINT_C(0x01)		/* å¤æ°ã®è¨­å® */
+#define TNFY_INCVAR		UINT_C(0x02)		/* å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã */
+#define TNFY_ACTTSK		UINT_C(0x03)		/* ã¿ã¹ã¯ã®èµ·å */
+#define TNFY_WUPTSK		UINT_C(0x04)		/* ã¿ã¹ã¯ã®èµ·åº */
+#define TNFY_SIGSEM		UINT_C(0x05)		/* ã»ããã©ã®è³æºã®è¿å´ */
+#define TNFY_SETFLG		UINT_C(0x06)		/* ã¤ãã³ããã©ã°ã®ã»ãã */
+#define TNFY_SNDDTQ		UINT_C(0x07)		/* ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ */
+
+#define TENFY_SETVAR	UINT_C(0x10)		/* å¤æ°ã®è¨­å® */
+#define TENFY_INCVAR	UINT_C(0x20)		/* å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã */
+#define TENFY_ACTTSK	UINT_C(0x30)		/* ã¿ã¹ã¯ã®èµ·å */
+#define TENFY_WUPTSK	UINT_C(0x40)		/* ã¿ã¹ã¯ã®èµ·åº */
+#define TENFY_SIGSEM	UINT_C(0x50)		/* ã»ããã©ã®è¿å´ */
+#define TENFY_SETFLG	UINT_C(0x60)		/* ã¤ãã³ããã©ã°ã®ã»ãã */
+#define TENFY_SNDDTQ	UINT_C(0x70)		/* ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ */
+
+/*
+ *  ãªãã¸ã§ã¯ãã®ç¶æ
+ã®å®ç¾©
+ */
+#define TTS_RUN			UINT_C(0x01)	/* å®è¡ç¶æ
+ */
+#define TTS_RDY			UINT_C(0x02)	/* å®è¡å¯è½ç¶æ
+ */
+#define TTS_WAI			UINT_C(0x04)	/* å¾
+ã¡ç¶æ
+ */
+#define TTS_SUS			UINT_C(0x08)	/* å¼·å¶å¾
+ã¡ç¶æ
+ */
+#define TTS_WAS			UINT_C(0x0c)	/* äºéå¾
+ã¡ç¶æ
+ */
+#define TTS_DMT			UINT_C(0x10)	/* ä¼æ­¢ç¶æ
+ */
+
+#define TTW_SLP			UINT_C(0x0001)	/* èµ·åºå¾
+ã¡ */
+#define TTW_DLY			UINT_C(0x0002)	/* æéçµéå¾
+ã¡ */
+#define TTW_SEM			UINT_C(0x0004)	/* ã»ããã©ã®è³æºç²å¾å¾
+ã¡ */
+#define TTW_FLG			UINT_C(0x0008)	/* ã¤ãã³ããã©ã°å¾
+ã¡ */
+#define TTW_SDTQ		UINT_C(0x0010)	/* ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡å¾
+ã¡ */
+#define TTW_RDTQ		UINT_C(0x0020)	/* ãã¼ã¿ã­ã¥ã¼ããã®åä¿¡å¾
+ã¡ */
+#define TTW_SPDQ		UINT_C(0x0100)	/* åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡å¾
+ã¡ */
+#define TTW_RPDQ		UINT_C(0x0200)	/* åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ããã®åä¿¡å¾
+ã¡ */
+#define TTW_MTX			UINT_C(0x0080)	/* ãã¥ã¼ããã¯ã¹ã®ã­ãã¯å¾
+ã¡ç¶æ
+ */
+#define TTW_MPF			UINT_C(0x2000)	/* åºå®é·ã¡ã¢ãªãã­ãã¯ã®ç²å¾å¾
+ã¡ */
+
+#define TCYC_STP		UINT_C(0x01)	/* å¨æéç¥ãåä½ãã¦ããªã */
+#define TCYC_STA		UINT_C(0x02)	/* å¨æéç¥ãåä½ãã¦ãã */
+
+#define TALM_STP		UINT_C(0x01)	/* ã¢ã©ã¼ã éç¥ãåä½ãã¦ããªã */
+#define TALM_STA		UINT_C(0x02)	/* ã¢ã©ã¼ã éç¥ãåä½ãã¦ãã */
+
+/*
+ *  ãã®ä»ã®å®æ°ã®å®ç¾©
+ */
+#define TSK_SELF		0			/* èªã¿ã¹ã¯æå® */
+#define TSK_NONE		0			/* è©²å½ããã¿ã¹ã¯ããªã */
+
+#define TPRI_SELF		0			/* èªã¿ã¹ã¯ã®ãã¼ã¹åªå
+åº¦ */
+#define TPRI_INI		0			/* ã¿ã¹ã¯ã®èµ·åæåªå
+åº¦ */
+
+#define TIPM_ENAALL		0			/* å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ */
+
+/*
+ *  æ§æå®æ°ã¨ãã¯ã­
+ */
+
+/*
+ *  åªå
+åº¦ã®ç¯å²
+ */
+#define TMIN_TPRI		1			/* ã¿ã¹ã¯åªå
+åº¦ã®æå°å¤ï¼æé«å¤ï¼*/
+#define TMAX_TPRI		16			/* ã¿ã¹ã¯åªå
+åº¦ã®æå¤§å¤ï¼æä½å¤ï¼*/
+#define TMIN_DPRI		1			/* ãã¼ã¿åªå
+åº¦ã®æå°å¤ï¼æé«å¤ï¼*/
+#define TMAX_DPRI		16			/* ãã¼ã¿åªå
+åº¦ã®æå¤§å¤ï¼æä½å¤ï¼*/
+#define TMIN_ISRPRI		1			/* å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³åªå
+åº¦ã®æå°å¤ */
+#define TMAX_ISRPRI		16			/* å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³åªå
+åº¦ã®æå¤§å¤ */
+
+/*
+ *  ãã¼ã¸ã§ã³æ
+å ±
+ */
+#define TKERNEL_MAKER	UINT_C(0x0118)	/* ã«ã¼ãã«ã®ã¡ã¼ã«ã¼ã³ã¼ã */
+#define TKERNEL_PRID	UINT_C(0x0007)	/* ã«ã¼ãã«ã®è­å¥çªå· */
+#define TKERNEL_SPVER	UINT_C(0xf631)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_PRVER	UINT_C(0x3010)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
+
+/*
+ *  ã­ã¥ã¼ã¤ã³ã°åæ°ã®æå¤§å¤
+ */
+#define TMAX_ACTCNT		UINT_C(1)		/* èµ·åè¦æ±ã­ã¥ã¼ã¤ã³ã°æ°ã®æå¤§å¤ */
+#define TMAX_WUPCNT		UINT_C(1)		/* èµ·åºè¦æ±ã­ã¥ã¼ã¤ã³ã°æ°ã®æå¤§å¤ */
+
+/*
+ *  ããããã¿ã¼ã³ã®ãããæ°
+ */
+#ifndef TBIT_FLGPTN					/* ã¤ãã³ããã©ã°ã®ãããæ° */
+#define TBIT_FLGPTN		(sizeof(FLGPTN) * CHAR_BIT)
+#endif /* TBIT_FLGPTN */
+
+/*
+ *  ã·ã¹ãã æå»ã®èª¿æ´ã§ããç¯å²ï¼åä½ï¼Î¼ç§ï¼
+ */
+#define TMIN_ADJTIM		-1000000		/* ã·ã¹ãã æå»ã®æå°èª¿æ´æé */
+#define TMAX_ADJTIM		1000000			/* ã·ã¹ãã æå»ã®æå¤§èª¿æ´æé */
+
+/*
+ *  ã¡ã¢ãªé åç¢ºä¿ã®ããã®ãã¯ã­
+ *
+ *  ä»¥ä¸ã®TOPPERS_COUNT_SZã¨TOPPERS_ROUND_SZã®å®ç¾©ã¯ï¼unitã2ã®å·¾ä¹ã§ã
+ *  ããã¨ãä»®å®ãã¦ããï¼
+ */
+#ifndef TOPPERS_COUNT_SZ
+#define TOPPERS_COUNT_SZ(sz, unit)	(((sz) + (unit) - 1) / (unit))
+#endif /* TOPPERS_COUNT_SZ */
+#ifndef TOPPERS_ROUND_SZ
+#define TOPPERS_ROUND_SZ(sz, unit)	(((sz) + (unit) - 1) & ~((unit) - 1))
+#endif /* TOPPERS_ROUND_SZ */
+
+#define COUNT_STK_T(sz)		TOPPERS_COUNT_SZ(sz, sizeof(STK_T))
+#define ROUND_STK_T(sz)		TOPPERS_ROUND_SZ(sz, sizeof(STK_T))
+
+#define COUNT_MPF_T(blksz)	TOPPERS_COUNT_SZ(blksz, sizeof(MPF_T))
+#define ROUND_MPF_T(blksz)	TOPPERS_ROUND_SZ(blksz, sizeof(MPF_T))
+
+#define TSZ_DTQMB(dtqcnt)	(sizeof(intptr_t) * (dtqcnt))
+#define TCNT_DTQMB(dtqcnt)	TOPPERS_COUNT_SZ(TSZ_DTQMB(dtqcnt), sizeof(MB_T))
+
+#ifndef TSZ_PDQMB
+#define TSZ_PDQMB(pdqcnt)	(sizeof(intptr_t) * 3 * (pdqcnt))
+#endif /* TSZ_PDQMB */
+#define TCNT_PDQMB(pdqcnt)	TOPPERS_COUNT_SZ(TSZ_PDQMB(pdqcnt), sizeof(MB_T))
+
+#define TSZ_MPFMB(blkcnt)	(sizeof(uint_t) * (blkcnt))
+#define TCNT_MPFMB(blkcnt)	TOPPERS_COUNT_SZ(TSZ_MPFMB(blkcnt), sizeof(MB_T))
+
+/*
+ *  ãã®ä»ã®æ§æå®æ°
+ */
+#define TMAX_MAXSEM		UINT_MAX	/* ã»ããã©ã®æå¤§è³æºæ°ã®æå¤§å¤ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TOPPERS_KERNEL_H */
Index: EcnlProtoTool/trunk/asp3_dcre/include/log_output.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/include/log_output.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/include/log_output.h	(revision 270)
@@ -0,0 +1,104 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2011 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ã¹ãã ã­ã°ã®ãã©ã¼ãããåºå
+ */
+
+#ifndef TOPPERS_LOG_OUTPUT_H
+#define TOPPERS_LOG_OUTPUT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <t_stddef.h>
+#include <t_syslog.h>
+
+/*
+ *  æå­åæ´å½¢åºå
+ *
+ *  formatã§æå®ããããã©ã¼ãããè¨è¿°ã¨p_argsã§æå®ãããå¼æ°åããä½
+ *  æããã¡ãã»ã¼ã¸ãï¼1æå­åºåé¢æ°putcãç¨ãã¦åºåããï¼
+ */
+extern void	syslog_printf(const char *format, const intptr_t *p_args,
+										void (*putc)(char)) throw();
+
+/*
+ *  ã­ã°æ
+å ±ã®åºå
+ *
+ *  p_syslogã§æå®ãããã­ã°æ
+å ±ãæå­åã«æ´å½¢ãï¼1æå­åºåé¢æ°putcãç¨
+ *  ãã¦åºåããï¼
+ */
+extern void	syslog_print(const SYSLOG *p_syslog, void (*putc)(char)) throw();
+
+/*
+ *  ã­ã°æ
+å ±åªå¤±ã¡ãã»ã¼ã¸æå­å
+ *
+ *  lostlogåã®ã­ã°æ
+å ±ãå¤±ãããæ¨ã®ã¡ãã»ã¼ã¸ãï¼1æå­åºåé¢æ°putcã
+ *  ç¨ãã¦åºåããï¼
+ */
+extern void	syslog_lostmsg(uint_t lostlog, void (*putc)(char)) throw();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TOPPERS_LOG_OUTPUT_H */
Index: EcnlProtoTool/trunk/asp3_dcre/include/queue.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/include/queue.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/include/queue.h	(revision 270)
@@ -0,0 +1,190 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2006-2011 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã­ã¥ã¼æä½ã©ã¤ãã©ãª
+ *
+ *  ãã®ã­ã¥ã¼æä½ã©ã¤ãã©ãªã§ã¯ï¼ã­ã¥ã¼ããããå«ããªã³ã°æ§é ã®ããã«
+ *  ãªã³ã¯ã­ã¥ã¼ãæ±ãï¼å
+·ä½çã«ã¯ï¼ã­ã¥ã¼ãããã®æ¬¡ã¨ã³ããªã¯ã­ã¥ã¼ã®
+ *  å
+é ­ã®ã¨ã³ããªï¼åã¨ã³ããªã¯ã­ã¥ã¼ã®æ«å°¾ã®ã¨ã³ããªã¨ããï¼ã¾ãï¼ã­
+ *  ã¥ã¼ã®å
+é ­ã®ã¨ã³ããªã®åã¨ã³ããªã¨ï¼ã­ã¥ã¼ã®æ«å°¾ã®ã¨ã³ããªã®æ¬¡ã¨ã³
+ *  ããªã¯ï¼ã­ã¥ã¼ãããã¨ããï¼ç©ºã®ã­ã¥ã¼ã¯ï¼æ¬¡ã¨ã³ããªï¼åã¨ã³ããªã¨
+ *  ãèªåèªèº«ãæãã­ã¥ã¼ãããã§ããããï¼
+ */
+
+#ifndef	TOPPERS_QUEUE_H
+#define	TOPPERS_QUEUE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <t_stddef.h>
+#include <t_syslog.h>
+
+/*
+ *  ã­ã¥ã¼ã®ãã¼ã¿æ§é ã®å®ç¾©
+ */
+typedef struct queue {
+	struct queue *p_next;		/* æ¬¡ã¨ã³ããªã¸ã®ãã¤ã³ã¿ */
+	struct queue *p_prev;		/* åã¨ã³ããªã¸ã®ãã¤ã³ã¿ */
+} QUEUE;
+
+/*
+ *  ã­ã¥ã¼ã®åæå
+ *
+ *  p_queueã«ã¯ã­ã¥ã¼ããããæå®ããï¼
+ */
+Inline void
+queue_initialize(QUEUE *p_queue)
+{
+	p_queue->p_prev = p_queue;
+	p_queue->p_next = p_queue;
+}
+
+/*
+ *  ã­ã¥ã¼ã®åã¨ã³ããªã¸ã®æ¿å
+¥
+ *
+ *  p_queueã®åã«p_entryãæ¿å
+¥ããï¼p_queueã«ã­ã¥ã¼ããããæå®ããå ´
+ *  åã«ã¯ï¼ã­ã¥ã¼ã®æ«å°¾ã«p_entryãæ¿å
+¥ãããã¨ã«ãªãï¼
+ */
+Inline void
+queue_insert_prev(QUEUE *p_queue, QUEUE *p_entry)
+{
+	p_entry->p_prev = p_queue->p_prev;
+	p_entry->p_next = p_queue;
+	p_queue->p_prev->p_next = p_entry;
+	p_queue->p_prev = p_entry;
+}
+
+/*
+ *  ã­ã¥ã¼ã®æ¬¡ã¨ã³ããªã¸ã®æ¿å
+¥
+ *
+ *  p_queueã®æ¬¡ã«p_entryãæ¿å
+¥ããï¼p_queueã«ã­ã¥ã¼ããããæå®ããå ´
+ *  åã«ã¯ï¼ã­ã¥ã¼ã®å
+é ­ã«p_entryãæ¿å
+¥ãããã¨ã«ãªãï¼
+ */
+Inline void
+queue_insert_next(QUEUE *p_queue, QUEUE *p_entry)
+{
+	p_entry->p_prev = p_queue;
+	p_entry->p_next = p_queue->p_next;
+	p_queue->p_next->p_prev = p_entry;
+	p_queue->p_next = p_entry;
+}
+
+/*
+ *  ã¨ã³ããªã®åé¤
+ *
+ *  p_entryãã­ã¥ã¼ããåé¤ããï¼
+ */
+Inline void
+queue_delete(QUEUE *p_entry)
+{
+	p_entry->p_prev->p_next = p_entry->p_next;
+	p_entry->p_next->p_prev = p_entry->p_prev;
+}
+
+/*
+ *  ã­ã¥ã¼ã®æ¬¡ã¨ã³ããªã®ååºã
+ *
+ *  p_queueã®æ¬¡ã¨ã³ããªãã­ã¥ã¼ããåé¤ãï¼åé¤ããã¨ã³ããªãè¿ãï¼
+ *  p_queueã«ã­ã¥ã¼ããããæå®ããå ´åã«ã¯ï¼ã­ã¥ã¼ã®å
+é ­ã®ã¨ã³ããªã
+ *  åãåºããã¨ã«ãªãï¼p_queueã«ç©ºã®ã­ã¥ã¼ãæå®ãã¦å¼ã³åºãã¦ã¯ãªã
+ *  ãªãï¼
+ */
+Inline QUEUE *
+queue_delete_next(QUEUE *p_queue)
+{
+	QUEUE	*p_entry;
+
+	assert(p_queue->p_next != p_queue);
+	p_entry = p_queue->p_next;
+	p_queue->p_next = p_entry->p_next;
+	p_entry->p_next->p_prev = p_queue;
+	return(p_entry);
+}
+
+/*
+ *  ã­ã¥ã¼ãç©ºãã©ããã®ãã§ãã¯
+ *
+ *  p_queueã«ã¯ã­ã¥ã¼ããããæå®ããï¼
+ */
+Inline bool_t
+queue_empty(QUEUE *p_queue)
+{
+	if (p_queue->p_next == p_queue) {
+		assert(p_queue->p_prev == p_queue);
+		return(true);
+	}
+	return(false);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TOPPERS_QUEUE_H */
Index: EcnlProtoTool/trunk/asp3_dcre/include/sil.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/include/sil.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/include/sil.h	(revision 270)
@@ -0,0 +1,303 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2011 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ã¹ãã ã¤ã³ã¿ãã§ã¼ã¹ã¬ã¤ã¤
+ *
+ *  ã·ã¹ãã ã¤ã³ã¿ãã§ã¼ã¹ã¬ã¤ã¤ã®ãµã¼ãã¹ã³ã¼ã«ã®å®ç¾©ã»å®£è¨ã¨ãã¯ã­ãª
+ *  ã©ã®å®ç¾©ãå«ãããããã¡ã¤ã«ï¼
+ *
+ *  ã¢ã»ã³ããªè¨èªã®ã½ã¼ã¹ãã¡ã¤ã«ãããã®ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ãããæ
+ *  ã¯ï¼TOPPERS_MACRO_ONLYãå®ç¾©ãã¦ãããã¨ã§ï¼ãã¯ã­å®ç¾©ä»¥å¤ã®è¨è¿°ã
+ *  é¤ããã¨ãã§ããï¼
+ */
+
+#ifndef TOPPERS_SIL_H
+#define TOPPERS_SIL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ *	TOPPERSå
+±éã®ãã¼ã¿åã»å®æ°ã»ãã¯ã­
+ */
+#include <t_stddef.h>
+
+/*
+ *  ã¿ã¼ã²ããä¾å­é¨
+ */
+#include "target_sil.h"
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  å
+¨å²è¾¼ã¿ã­ãã¯ç¶æ
+ã®å¶å¾¡
+ *
+ *  SIL_PRE_LOCï¼SIL_LOC_INT()ï¼SIL_UNL_INT()ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ã§ç¨
+ *  æããï¼ããã©ã«ãã®å®ç¾©ã¯ç¨æãã¦ããªãï¼
+ */
+
+/*
+ *  å¾®å°æéå¾
+ã¡
+ */
+extern void	sil_dly_nse(ulong_t dlytim) throw();
+
+/*
+ *  ã¨ã³ãã£ã¢ã³ã®åè»¢
+ */
+#ifndef TOPPERS_SIL_REV_ENDIAN_UINT16
+#define	TOPPERS_SIL_REV_ENDIAN_UINT16(data) \
+				((((data) & 0xffU) << 8) | (((data) >> 8) & 0xffU))
+#endif /* TOPPERS_SIL_REV_ENDIAN_UINT16 */
+
+#ifndef TOPPERS_SIL_REV_ENDIAN_UINT32
+#define	TOPPERS_SIL_REV_ENDIAN_UINT32(data) \
+				((((data) & 0xffU) << 24) | (((data) & 0xff00U) << 8) \
+					| (((data) >> 8) & 0xff00U) | (((data) >> 24) & 0xffU))
+#endif /* TOPPERS_SIL_REV_ENDIAN_UINT32 */
+
+/*
+ *  ã¡ã¢ãªç©ºéã¢ã¯ã»ã¹é¢æ°
+ */
+#ifndef TOPPERS_OMIT_SIL_ACCESS
+
+/*
+ *  8ãããåä½ã®èª­åºãï¼æ¸è¾¼ã¿
+ */
+#ifdef UINT8_MAX
+
+Inline uint8_t
+sil_reb_mem(const uint8_t *mem)
+{
+	uint8_t	data;
+
+	data = *((const volatile uint8_t *) mem);
+	return(data);
+}
+
+Inline void
+sil_wrb_mem(uint8_t *mem, uint8_t data)
+{
+	*((volatile uint8_t *) mem) = data;
+}
+
+#endif /* UINT8_MAX */
+
+/*
+ *  16ãããåä½ã®èª­åºãï¼æ¸è¾¼ã¿
+ */
+
+Inline uint16_t
+sil_reh_mem(const uint16_t *mem)
+{
+	uint16_t	data;
+
+	data = *((const volatile uint16_t *) mem);
+	return(data);
+}
+
+Inline void
+sil_wrh_mem(uint16_t *mem, uint16_t data)
+{
+	*((volatile uint16_t *) mem) = data;
+}
+
+#ifdef SIL_ENDIAN_BIG			/* ããã°ã¨ã³ãã£ã¢ã³ãã­ã»ããµ */
+
+#define	sil_reh_bem(mem)		sil_reh_mem(mem)
+#define	sil_wrh_bem(mem, data)	sil_wrh_mem(mem, data)
+
+#ifndef TOPPERS_OMIT_SIL_REH_LEM
+
+Inline uint16_t
+sil_reh_lem(const uint16_t *mem)
+{
+	uint16_t	data;
+
+	data = *((const volatile uint16_t *) mem);
+	return(TOPPERS_SIL_REV_ENDIAN_UINT16(data));
+}
+
+#endif /* TOPPERS_OMIT_SIL_REH_LEM */
+#ifndef TOPPERS_OMIT_SIL_WRH_LEM
+
+Inline void
+sil_wrh_lem(uint16_t *mem, uint16_t data)
+{
+	*((volatile uint16_t *) mem) = TOPPERS_SIL_REV_ENDIAN_UINT16(data);
+}
+
+#endif /* TOPPERS_OMIT_SIL_WRH_LEM */
+#else /* SIL_ENDIAN_BIG */
+#ifdef SIL_ENDIAN_LITTLE		/* ãªãã«ã¨ã³ãã£ã¢ã³ãã­ã»ããµ */
+
+#define	sil_reh_lem(mem)		sil_reh_mem(mem)
+#define	sil_wrh_lem(mem, data)	sil_wrh_mem(mem, data)
+
+#ifndef TOPPERS_OMIT_SIL_REH_BEM
+
+Inline uint16_t
+sil_reh_bem(const uint16_t *mem)
+{
+	uint16_t	data;
+
+	data = *((const volatile uint16_t *) mem);
+	return(TOPPERS_SIL_REV_ENDIAN_UINT16(data));
+}
+
+#endif /* TOPPERS_OMIT_SIL_REH_BEM */
+#ifndef TOPPERS_OMIT_SIL_WRH_BEM
+
+Inline void
+sil_wrh_bem(uint16_t *mem, uint16_t data)
+{
+	*((volatile uint16_t *) mem) = TOPPERS_SIL_REV_ENDIAN_UINT16(data);
+}
+
+#endif /* TOPPERS_OMIT_SIL_WRH_BEM */
+#else /* SIL_ENDIAN_LITTLE */
+
+#error Neither SIL_ENDIAN_BIG nor SIL_ENDIAN_LITTLE is defined.
+
+#endif /* SIL_ENDIAN_LITTLE */
+#endif /* SIL_ENDIAN_BIG */
+
+/*
+ *  32ãããåä½ã®èª­åºãï¼æ¸è¾¼ã¿
+ */
+
+Inline uint32_t
+sil_rew_mem(const uint32_t *mem)
+{
+	uint32_t	data;
+
+	data = *((const volatile uint32_t *) mem);
+	return(data);
+}
+
+Inline void
+sil_wrw_mem(uint32_t *mem, uint32_t data)
+{
+	*((volatile uint32_t *) mem) = data;
+}
+
+#ifdef SIL_ENDIAN_BIG			/* ããã°ã¨ã³ãã£ã¢ã³ãã­ã»ããµ */
+
+#define	sil_rew_bem(mem)		sil_rew_mem(mem)
+#define	sil_wrw_bem(mem, data)	sil_wrw_mem(mem, data)
+
+#ifndef TOPPERS_OMIT_SIL_REW_LEM
+
+Inline uint32_t
+sil_rew_lem(const uint32_t *mem)
+{
+	uint32_t	data;
+
+	data = *((const volatile uint32_t *) mem);
+	return(TOPPERS_SIL_REV_ENDIAN_UINT32(data));
+}
+
+#endif /* TOPPERS_OMIT_SIL_REW_LEM */
+#ifndef TOPPERS_OMIT_SIL_WRW_LEM
+
+Inline void
+sil_wrw_lem(uint32_t *mem, uint32_t data)
+{
+	*((volatile uint32_t *) mem) = TOPPERS_SIL_REV_ENDIAN_UINT32(data);
+}
+
+#endif /* TOPPERS_OMIT_SIL_WRW_LEM */
+#else /* SIL_ENDIAN_BIG */		/* ãªãã«ã¨ã³ãã£ã¢ã³ãã­ã»ããµ */
+
+#define	sil_rew_lem(mem)		sil_rew_mem(mem)
+#define	sil_wrw_lem(mem, data)	sil_wrw_mem(mem, data)
+
+#ifndef TOPPERS_OMIT_SIL_REW_BEM
+
+Inline uint32_t
+sil_rew_bem(const uint32_t *mem)
+{
+	uint32_t	data;
+
+	data = *((const volatile uint32_t *) mem);
+	return(TOPPERS_SIL_REV_ENDIAN_UINT32(data));
+}
+
+#endif /* TOPPERS_OMIT_SIL_REW_BEM */
+#ifndef TOPPERS_OMIT_SIL_WRW_BEM
+
+Inline void
+sil_wrw_bem(uint32_t *mem, uint32_t data)
+{
+	*((volatile uint32_t *) mem) = TOPPERS_SIL_REV_ENDIAN_UINT32(data);
+}
+
+#endif /* TOPPERS_OMIT_SIL_WRW_BEM */
+#endif /* SIL_ENDIAN_BIG */
+#endif /* TOPPERS_OMIT_SIL_ACCESS */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TOPPERS_SIL_H */
Index: EcnlProtoTool/trunk/asp3_dcre/include/t_stddef.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/include/t_stddef.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/include/t_stddef.h	(revision 270)
@@ -0,0 +1,311 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		TOPPERSå
+±éããããã¡ã¤ã«
+ *
+ *  TOPPERSé¢é£ã®ãã¹ã¦ã®ã½ã¼ã¹ãã¡ã¤ã«ã§ã¤ã³ã¯ã«ã¼ããã¹ãããããã¡ã¤
+ *  ã«ï¼åç¨®ã®ã«ã¼ãã«ãã½ããã¦ã§ã¢é¨åã§å
+±éã«ç¨ãããã¨ãæ³å®ãã¦ã
+ *  ãï¼TOPPERSã®åç¨®ã®ã«ã¼ãã«ãã½ããã¦ã§ã¢é¨åã§å
+±éã«ç¨ãããã¼ã¿åï¼
+ *  å®æ°ï¼ãã¯ã­ã®å®ç¾©ãªã©ãå«ãï¼
+ *
+ *  ã¢ã»ã³ããªè¨èªã®ã½ã¼ã¹ãã¡ã¤ã«ãããã®ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ãããæ
+ *  ã¯ï¼TOPPERS_MACRO_ONLYãå®ç¾©ãã¦ããï¼ããã«ããï¼ãã¯ã­å®ç¾©ä»¥å¤ã
+ *  é¤ãããã«ãªã£ã¦ããï¼
+ */
+
+#ifndef TOPPERS_T_STDDEF_H
+#define TOPPERS_T_STDDEF_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ *  ã¿ã¼ã²ããä¾å­é¨
+ */
+#include "target_stddef.h"
+
+/*
+ *  Cè¨èª/EC++ã§throw()ã«å¯¾å¦ããããã®å®ç¾©
+ */
+#if !defined(__cplusplus) || defined(__embedded_cplusplus)
+#define throw()
+#endif
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®ãã¼ã¿åã®ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef TOPPERS_bool
+#define TOPPERS_bool	int				/* ãã¼ã«å */
+#endif /* TOPPERS_bool */
+
+#ifndef TOPPERS_fp
+struct TOPPERS_dummy_t { int TOPPERS_dummy_field; };
+typedef	void			(*TOPPERS_fp_t)(struct TOPPERS_dummy_t);
+#define TOPPERS_fp		TOPPERS_fp_t	/* ãã­ã°ã©ã ã®èµ·åçªå° */
+#endif /* TOPPERS_fp */
+
+/*
+ *  å
+±éãã¼ã¿å
+ */
+typedef TOPPERS_bool	bool_t;		/* çå½å¤ */
+
+typedef signed int		int_t;		/* èªç¶ãªãµã¤ãºã®ç¬¦å·ä»ãæ´æ° */
+typedef unsigned int	uint_t;		/* èªç¶ãªãµã¤ãºã®ç¬¦å·ç¡ãæ´æ° */
+
+typedef signed long		long_t;		/* é·ãã®ãµã¤ãºã®ç¬¦å·ä»ãæ´æ° */
+typedef unsigned long	ulong_t;	/* é·ãã®ãµã¤ãºã®ç¬¦å·ç¡ãæ´æ° */
+
+typedef int_t			FN;			/* æ©è½ã³ã¼ã */
+typedef	int_t			ER;			/* ã¨ã©ã¼ã³ã¼ã */
+typedef	int_t			ID;			/* ãªãã¸ã§ã¯ãã®IDçªå· */
+typedef	uint_t			ATR;		/* ãªãã¸ã§ã¯ãã®å±æ§ */
+typedef	uint_t			STAT;		/* ãªãã¸ã§ã¯ãã®ç¶æ
+ */
+typedef	uint_t			MODE;		/* ãµã¼ãã¹ã³ã¼ã«ã®åä½ã¢ã¼ã */
+typedef	int_t			PRI;		/* åªå
+åº¦ */
+typedef	uint32_t		TMO;		/* ã¿ã¤ã ã¢ã¦ãæå® */
+typedef	uint32_t		RELTIM;		/* ç¸å¯¾æéï¼»NGKI0550ï¼½*/
+#ifdef UINT64_MAX
+typedef	uint64_t		SYSTIM;		/* ã·ã¹ãã æå»ï¼»NGKI0548ï¼½*/
+#else /* UINT64_MAX */
+typedef	uint32_t		SYSTIM;		/* ã·ã¹ãã æå»ï¼»NGKI0548ï¼½*/
+#endif /* UINT64_MAX */
+typedef	uint32_t		PRCTIM;		/* ãã­ã»ããµæéï¼»NGKI0573ï¼½*/
+typedef	uint32_t		HRTCNT;		/* é«åè§£è½ã¿ã¤ãã®ã«ã¦ã³ãå¤ */
+
+typedef	TOPPERS_fp		FP;			/* ãã­ã°ã©ã ã®èµ·åçªå° */
+
+typedef	int_t			ER_BOOL;	/* ã¨ã©ã¼ã³ã¼ãã¾ãã¯çå½å¤ */
+typedef	int_t			ER_ID;		/* ã¨ã©ã¼ã³ã¼ãã¾ãã¯IDçªå· */
+typedef	int_t			ER_UINT;	/* ã¨ã©ã¼ã³ã¼ãã¾ãã¯ç¬¦å·ç¡ãæ´æ° */
+
+typedef uintptr_t		MB_T;		/* ç®¡çé åãç¢ºä¿ããããã®ãã¼ã¿å */
+
+typedef	uint32_t		ACPTN;		/* ã¢ã¯ã»ã¹è¨±å¯ãã¿ã¼ã³ */
+typedef	struct acvct {				/* ã¢ã¯ã»ã¹è¨±å¯ãã¯ã¿ */
+	ACPTN		acptn1;				/* éå¸¸æä½1ã®ã¢ã¯ã»ã¹è¨±å¯ãã¿ã¼ã³ */
+	ACPTN		acptn2;				/* éå¸¸æä½2ã®ã¢ã¯ã»ã¹è¨±å¯ãã¿ã¼ã³ */
+	ACPTN		acptn3;				/* ç®¡çæä½ã®ã¢ã¯ã»ã¹è¨±å¯ãã¿ã¼ã³ */
+	ACPTN		acptn4;				/* åç
+§æä½ã®ã¢ã¯ã»ã¹è¨±å¯ãã¿ã¼ã³ */
+} ACVCT;
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  æ´æ°å®æ°ãä½ããã¯ã­
+ */
+#ifndef UINT_C
+#define UINT_C(val)		(val ## U)		/* uint_tåã®å®æ°ãä½ããã¯ã­ */
+#endif /* UINT_C */
+
+#ifndef ULONG_C
+#define ULONG_C(val)	(val ## UL)		/* ulong_tåã®å®æ°ãä½ããã¯ã­ */
+#endif /* ULONG_C */
+
+/*
+ *  ä¸è¬å®æ°
+ */
+#ifndef NULL
+#define NULL		0			/* ç¡å¹ãã¤ã³ã¿ */
+#endif /* NULL */
+
+#ifndef true
+#define true		1			/* ç */
+#endif /* true */
+
+#ifndef false
+#define false		0			/* å½ */
+#endif /* false */
+
+#define E_OK		0			/* æ­£å¸¸çµäº */
+
+/*
+ *  ã¡ã¤ã³ã¨ã©ã¼ã³ã¼ã
+ */
+#define E_SYS		(-5)		/* ã·ã¹ãã ã¨ã©ã¼ */
+#define E_NOSPT		(-9)		/* æªãµãã¼ãæ©è½ */
+#define E_RSFN		(-10)		/* äºç´æ©è½ã³ã¼ã */
+#define E_RSATR		(-11)		/* äºç´å±æ§ */
+#define E_PAR		(-17)		/* ãã©ã¡ã¼ã¿ã¨ã©ã¼ */
+#define E_ID		(-18)		/* ä¸æ­£IDçªå· */
+#define E_CTX		(-25)		/* ã³ã³ãã­ã¹ãã¨ã©ã¼ */
+#define E_MACV		(-26)		/* ã¡ã¢ãªã¢ã¯ã»ã¹éå */
+#define E_OACV		(-27)		/* ãªãã¸ã§ã¯ãã¢ã¯ã»ã¹éå */
+#define E_ILUSE		(-28)		/* ãµã¼ãã¹ã³ã¼ã«ä¸æ­£ä½¿ç¨ */
+#define E_NOMEM		(-33)		/* ã¡ã¢ãªä¸è¶³ */
+#define E_NOID		(-34)		/* IDçªå·ä¸è¶³ */
+#define E_NORES		(-35)		/* è³æºä¸è¶³ */
+#define E_OBJ		(-41)		/* ãªãã¸ã§ã¯ãç¶æ
+ã¨ã©ã¼ */
+#define E_NOEXS		(-42)		/* ãªãã¸ã§ã¯ãæªçæ */
+#define E_QOVR		(-43)		/* ã­ã¥ã¼ã¤ã³ã°ãªã¼ãã¼ãã­ã¼ */
+#define E_RLWAI		(-49)		/* å¾
+ã¡ç¶æ
+ã®å¼·å¶è§£é¤ */
+#define E_TMOUT		(-50)		/* ãã¼ãªã³ã°å¤±æã¾ãã¯ã¿ã¤ã ã¢ã¦ã */
+#define E_DLT		(-51)		/* å¾
+ã¡ãªãã¸ã§ã¯ãã®åé¤ */
+#define E_CLS		(-52)		/* å¾
+ã¡ãªãã¸ã§ã¯ãã®ç¶æ
+å¤å */
+#define E_RASTER	(-53)		/* ã¿ã¹ã¯ã®çµäºè¦æ± */
+#define E_WBLK		(-57)		/* ãã³ãã­ãã­ã³ã°åä»ã */
+#define E_BOVR		(-58)		/* ãããã¡ãªã¼ãã¼ãã­ã¼ */
+#define E_COMM		(-65)		/* éä¿¡ã¨ã©ã¼ */
+
+/*
+ *  ãªãã¸ã§ã¯ãå±æ§
+ */
+#define TA_NULL		UINT_C(0)	/* ãªãã¸ã§ã¯ãå±æ§ãæå®ããªã */
+
+/*
+ *  ã¿ã¤ã ã¢ã¦ãæå®
+ */
+#define TMO_POL		UINT_C(0)			/* ãã¼ãªã³ã° */
+#define TMO_FEVR	(UINT32_MAX)		/* æ°¸ä¹
+å¾
+ã¡ */
+#define TMO_NBLK	(UINT32_MAX - 1)	/* ãã³ãã­ãã­ã³ã° */
+
+/*
+ *  ã¢ã¯ã»ã¹è¨±å¯ãã¿ã¼ã³
+ */
+#define TACP_KERNEL	UINT_C(0)		/* ã«ã¼ãã«ãã¡ã¤ã³ã ãã«ã¢ã¯ã»ã¹ãè¨±å¯ */
+#define TACP_SHARED	(~UINT_C(0))	/* ãã¹ã¦ã®ãã¡ã¤ã³ããã¢ã¯ã»ã¹ãè¨±å¯ */
+
+/*
+ *  åã«é¢ããæ
+å ±ãåãåºãããã®ãã¯ã­
+ *
+ *  ä»¥ä¸ã®ALIGN_TYPEã®å®ç¾©ã¯ï¼ã¢ã©ã¤ã³ã¡ã³ãã®åä½ã2ã®å·¾ä¹ã§ãããã¨ã
+ *  ä»®å®ãã¦ããï¼
+ */
+#ifndef offsetof
+#define	offsetof(structure, field)	((uintptr_t) &(((structure *) 0)->field))
+#endif /* offsetof */
+
+#ifndef alignof
+#define alignof(type)	offsetof(struct { char field1; type field2; }, field2)
+#endif /* alignof */
+
+#ifndef ALIGN_TYPE				/* ã¢ã©ã¤ã³ã¡ã³ãã®ãã§ãã¯ */
+#define ALIGN_TYPE(addr, type) \
+						((((uintptr_t)(addr)) & (alignof(type) - 1)) == 0U)
+#endif /* ALIGN_TYPE */
+
+/*
+ *  assertãã¯ã­
+ */
+#undef assert
+#ifndef NDEBUG
+#define assert(exp)		((void)((exp) ? 0 : (TOPPERS_assert_fail(#exp, \
+							__FILE__, __LINE__), TOPPERS_assert_abort(), 0)))
+#else /* NDEBUG */
+#define assert(exp)		((void) 0)
+#endif /* NDEBUG */
+
+#ifdef __cplusplus
+}
+#endif
+
+/*
+ *  ã¨ã©ã¼ã³ã¼ãçæã»åè§£ãã¯ã­
+ *
+ *  ä»¥ä¸ã®ãã¯ã­å®ç¾©ã¯ï¼ç¬¦å·ä»ãæ´æ°ã2ã®è£æ°ã§è¡¨ç¾ããã¦ããï¼å³ã·ãã
+ *  æ¼ç®å­ï¼>>ï¼ãç®è¡ã·ããããããã¨ãä»®å®ãã¦ããï¼ããã§ãªãéçºç°
+ *  å¢ã§ã¯ï¼target_stddef.hã§ãããã®å®ç¾©ãä¸æ¸ãããªããã°ãªããªãï¼
+ *
+ *  MERCDãã¯ã­ã®å®ç¾©ã¯ï¼ã¡ã¤ã³ã¨ã©ã¼ã³ã¼ããè² ã§ãããã¨ãä»®å®ãã¦ããï¼
+ *  ããã§ãªãå ´åï¼2ã¤ã®å®ç¾©ãä¸è´ããªããªãï¼
+ */
+#ifndef ERCD
+#define ERCD(mercd, sercd) \
+				((ER)((((uint_t)(sercd)) << 8) | (((uint_t)(mercd)) & 0xffU)))
+#endif /* ERCD */
+
+#ifndef MERCD
+#ifdef INT8_MAX
+#define MERCD(ercd)		((ER)((int8_t)(ercd)))
+#else /* INT8_MAX */
+#define MERCD(ercd)		((ER)(((uint_t) ercd) | ~0xffU))
+#endif /* INT8_MAX */
+#endif /* MERCD */
+
+#ifndef SERCD
+#define SERCD(ercd)		((ER)((ercd) >> 8))
+#endif /* SERCD */
+
+/*
+ *  ã¢ã¯ã»ã¹è¨±å¯ãã¿ã¼ã³çæãã¯ã­
+ */
+#define TACP(domid)		(1U << ((domid) - 1))	/* domidã ãã«ã¢ã¯ã»ã¹ãè¨±å¯ */
+
+/*
+ *  ç¸å¯¾æéï¼RELTIMï¼ã«æå®ã§ããæå¤§å¤ï¼»NGKI0551ï¼½
+ */
+#define TMAX_RELTIM		4000000000U				/* 66å40ç§ã¾ã§æå®å¯ */
+
+#endif /* TOPPERS_T_STDDEF_H */
Index: EcnlProtoTool/trunk/asp3_dcre/include/t_stdlib.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/include/t_stdlib.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/include/t_stdlib.h	(revision 270)
@@ -0,0 +1,91 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2006 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		åºæ¬çãªã©ã¤ãã©ãªé¢æ°
+ */
+
+#ifndef TOPPERS_T_STDLIB_H
+#define TOPPERS_T_STDLIB_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <t_stddef.h>
+
+/*
+ *  ã¨ã©ã¼ã¡ãã»ã¼ã¸æå­åãè¿ãé¢æ°
+ *
+ *  ercdã§æå®ãããã¨ã©ã¼ã³ã¼ãã®ã¡ã¤ã³ã¨ã©ã¼ã³ã¼ãã®åç§°ï¼E_PARï¼
+ *  E_OBJãªã©ï¼ã®æå­åãè¿ãé¢æ°ï¼
+ */
+extern const char	*itron_strerror(ER ercd) throw();
+
+/*
+ *  ã¨ã©ã¼ã¡ãã»ã¼ã¸ã®ã­ã°åºå
+ *
+ *  ãµã¼ãã¹ã³ã¼ã«ãã¨ã©ã¼ãè¿ããå ´åã«ï¼ãã®ãã¡ã¤ã«åï¼è¡çªå·ï¼ã¡ã¤
+ *  ã³ã¨ã©ã¼ã³ã¼ãç­ãè¡¨ç¤ºããããã®é¢æ°ï¼
+ */
+extern void		t_perror(uint_t prio, const char *file, int_t line,
+									const char *expr, ER ercd) throw();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TOPPERS_T_STDLIB_H */
Index: EcnlProtoTool/trunk/asp3_dcre/include/t_syslog.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/include/t_syslog.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/include/t_syslog.h	(revision 270)
@@ -0,0 +1,377 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ã¹ãã ã­ã°åºåãè¡ãããã®å®ç¾©
+ *
+ *  ã·ã¹ãã ã­ã°ãµã¼ãã¹ã¯ï¼ã·ã¹ãã ã®ã­ã°æ
+å ±ãåºåããããã®ãµã¼ãã¹
+ *  ã§ããï¼ã«ã¼ãã«ããã®ã­ã°æ
+å ±ã®åºåã«ãç¨ããããï¼å
+é¨ã§å¾
+ã¡ç¶æ
+
+ *  ã«ã¯ãããã¨ã¯ãªãï¼
+ *
+ *  ã­ã°æ
+å ±ã¯ï¼ã«ã¼ãã«å
+ã®ã­ã°ãããã¡ã«æ¸ãè¾¼ããï¼ä½ã¬ãã«ã®æå­åº
+ *  åé¢æ°ãç¨ãã¦åºåããï¼ã©ã¡ããä½¿ããã¯ï¼æ¡å¼µãµã¼ãã¹ã³ã¼ã«ã§åã
+ *  æãããã¨ãã§ããï¼
+ *
+ *  ã­ã°ãããã¡é åããªã¼ããã­ã¼ããå ´åã«ã¯ï¼å¤ãã­ã°æ
+å ±ãæ¶ãã¦ä¸
+ *  æ¸ãããï¼
+ *
+ *  ã¢ã»ã³ããªè¨èªã®ã½ã¼ã¹ãã¡ã¤ã«ãããã®ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ãããæ
+ *  ã¯ï¼TOPPERS_MACRO_ONLYãå®ç¾©ãã¦ãããã¨ã§ï¼ãã¯ã­å®ç¾©ä»¥å¤ã®è¨è¿°ã
+ *  é¤ããã¨ãã§ããï¼
+ */
+
+#ifndef TOPPERS_T_SYSLOG_H
+#define TOPPERS_T_SYSLOG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <t_stddef.h>
+
+/*
+ *  ã­ã°æ
+å ±ã®ç¨®å¥ã®å®ç¾©
+ */
+#define LOG_TYPE_COMMENT	UINT_C(0x01)	/* ã³ã¡ã³ã */
+#define LOG_TYPE_ASSERT		UINT_C(0x02)	/* ã¢ãµã¼ã·ã§ã³ã®å¤±æ */
+
+#define LOG_TYPE_INH		UINT_C(0x11)	/* å²è¾¼ã¿ãã³ãã© */
+#define LOG_TYPE_ISR		UINT_C(0x12)	/* å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ */
+#define LOG_TYPE_CYC		UINT_C(0x13)	/* å¨æãã³ãã© */
+#define LOG_TYPE_ALM		UINT_C(0x14)	/* ã¢ã©ã¼ã ãã³ãã© */
+#define LOG_TYPE_OVR		UINT_C(0x15)	/* ãªã¼ãã©ã³ãã³ãã© */
+#define LOG_TYPE_EXC		UINT_C(0x16)	/* CPUä¾å¤ãã³ãã© */
+#define LOG_TYPE_TSKSTAT	UINT_C(0x21)	/* ã¿ã¹ã¯ç¶æ
+å¤å */
+#define LOG_TYPE_DSP		UINT_C(0x31)	/* ãã£ã¹ãããã£ */
+#define LOG_TYPE_SVC		UINT_C(0x41)	/* ãµã¼ãã¹ã³ã¼ã« */
+
+#define LOG_ENTER			UINT_C(0x00)	/* å
+¥å£ï¼éå§ */
+#define LOG_LEAVE			UINT_C(0x80)	/* åºå£ï¼çµäº */
+
+/*
+ *  ã­ã°æ
+å ±ã®éè¦åº¦ã®å®ç¾©
+ */
+#define LOG_EMERG			UINT_C(0)		/* ã·ã£ãããã¦ã³ã«å¤ããã¨ã©ã¼ */
+#define LOG_ALERT			UINT_C(1)
+#define LOG_CRIT			UINT_C(2)
+#define LOG_ERROR			UINT_C(3)		/* ã·ã¹ãã ã¨ã©ã¼ */
+#define LOG_WARNING			UINT_C(4)		/* è­¦åã¡ãã»ã¼ã¸ */
+#define LOG_NOTICE			UINT_C(5)
+#define LOG_INFO			UINT_C(6)
+#define LOG_DEBUG			UINT_C(7)		/* ãããã°ç¨ã¡ãã»ã¼ã¸ */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ã­ã°æ
+å ±ã®ãã¼ã¿æ§é 
+ */
+
+#ifndef LOGTIM
+#define LOGTIM		HRTCNT			/* ã­ã°æå»ã®ãã¼ã¿å */
+#endif /* LOGTIM */
+
+#define TNUM_LOGPAR		6			/* ã­ã°ãã©ã¡ã¼ã¿ã®æ° */
+
+#ifndef LOGPAR
+#define LOGPAR		intptr_t		/* ã­ã°ãã©ã¡ã¼ã¿ã®ãã¼ã¿å */
+#define ULOGPAR		uintptr_t
+#endif /* LOGPAR */
+
+typedef struct {
+	uint_t	logtype;				/* ã­ã°æ
+å ±ã®ç¨®å¥ */
+	LOGTIM	logtim;					/* ã­ã°æå» */
+	LOGPAR	logpar[TNUM_LOGPAR];	/* ã­ã°ãã©ã¡ã¼ã¿ */
+} SYSLOG;
+
+/*
+ *  ã­ã°æ
+å ±ã®éè¦åº¦ã®ãããããããä½ãããã®ãã¯ã­
+ */
+#define LOG_MASK(prio)		(1U << (prio))
+#define LOG_UPTO(prio)		((1U << ((prio) + 1)) - 1)
+
+/*
+ *  ãã±ããå½¢å¼ã®å®ç¾©
+ */
+typedef struct t_syslog_rlog {
+	uint_t	count;		/* ã­ã°ãããã¡ä¸­ã®ã­ã°ã®æ° */
+	uint_t	lost;		/* å¤±ãããã­ã°ã®æ° */
+	uint_t	logmask;	/* ã­ã°ãããã¡ã«è¨é²ãã¹ãéè¦åº¦ */
+	uint_t	lowmask;	/* ä½ã¬ãã«åºåãã¹ãéè¦åº¦ */
+} T_SYSLOG_RLOG;
+
+#ifndef TOPPERS_OMIT_SYSLOG
+
+/*
+ *  ã­ã°æ
+å ±ãåºåããããã®ã©ã¤ãã©ãªé¢æ°
+ *
+ *  TECSã§è¨è¿°ãããã·ã¹ãã ã­ã°æ©è½ãç´æ¥å¼ã³åºãï¼
+ */
+
+extern ER	tSysLog_eSysLog_write(uint_t prio, const SYSLOG *p_syslog) throw();
+
+Inline void
+_syslog_0(uint_t prio, uint_t type)
+{
+	SYSLOG	logbuf;
+
+	logbuf.logtype = type;
+	(void) tSysLog_eSysLog_write(prio, &logbuf);
+}
+
+Inline void
+_syslog_1(uint_t prio, uint_t type, LOGPAR arg1)
+{
+	SYSLOG	logbuf;
+
+	logbuf.logtype = type;
+	logbuf.logpar[0] = arg1;
+	(void) tSysLog_eSysLog_write(prio, &logbuf);
+}
+
+Inline void
+_syslog_2(uint_t prio, uint_t type, LOGPAR arg1, LOGPAR arg2)
+{
+	SYSLOG	logbuf;
+
+	logbuf.logtype = type;
+	logbuf.logpar[0] = arg1;
+	logbuf.logpar[1] = arg2;
+	(void) tSysLog_eSysLog_write(prio, &logbuf);
+}
+
+Inline void
+_syslog_3(uint_t prio, uint_t type, LOGPAR arg1, LOGPAR arg2, LOGPAR arg3)
+{
+	SYSLOG	logbuf;
+
+	logbuf.logtype = type;
+	logbuf.logpar[0] = arg1;
+	logbuf.logpar[1] = arg2;
+	logbuf.logpar[2] = arg3;
+	(void) tSysLog_eSysLog_write(prio, &logbuf);
+}
+
+Inline void
+_syslog_4(uint_t prio, uint_t type, LOGPAR arg1, LOGPAR arg2,
+											LOGPAR arg3, LOGPAR arg4)
+{
+	SYSLOG	logbuf;
+
+	logbuf.logtype = type;
+	logbuf.logpar[0] = arg1;
+	logbuf.logpar[1] = arg2;
+	logbuf.logpar[2] = arg3;
+	logbuf.logpar[3] = arg4;
+	(void) tSysLog_eSysLog_write(prio, &logbuf);
+}
+
+Inline void
+_syslog_5(uint_t prio, uint_t type, LOGPAR arg1, LOGPAR arg2,
+								LOGPAR arg3, LOGPAR arg4, LOGPAR arg5)
+{
+	SYSLOG	logbuf;
+
+	logbuf.logtype = type;
+	logbuf.logpar[0] = arg1;
+	logbuf.logpar[1] = arg2;
+	logbuf.logpar[2] = arg3;
+	logbuf.logpar[3] = arg4;
+	logbuf.logpar[4] = arg5;
+	(void) tSysLog_eSysLog_write(prio, &logbuf);
+}
+
+Inline void
+_syslog_6(uint_t prio, uint_t type, LOGPAR arg1, LOGPAR arg2,
+					LOGPAR arg3, LOGPAR arg4, LOGPAR arg5, LOGPAR arg6)
+{
+	SYSLOG	logbuf;
+
+	logbuf.logtype = type;
+	logbuf.logpar[0] = arg1;
+	logbuf.logpar[1] = arg2;
+	logbuf.logpar[2] = arg3;
+	logbuf.logpar[3] = arg4;
+	logbuf.logpar[4] = arg5;
+	logbuf.logpar[5] = arg6;
+	(void) tSysLog_eSysLog_write(prio, &logbuf);
+}
+
+/*
+ *  ã­ã°æ
+å ±ï¼ã³ã¡ã³ãï¼ãåºåããããã®ã©ã¤ãã©ãªé¢æ°ï¼vasyslog.cï¼
+ */
+extern void	syslog(uint_t prio, const char *format, ...) throw();
+
+#else /* TOPPERS_OMIT_SYSLOG */
+
+/*
+ *  ã·ã¹ãã ã­ã°åºåãææ­¢ããå ´å
+ */
+
+Inline void
+_syslog_0(uint_t prio, uint_t type)
+{
+}
+
+Inline void
+_syslog_1(uint_t prio, uint_t type, LOGPAR arg1)
+{
+}
+
+Inline void
+_syslog_2(uint_t prio, uint_t type, LOGPAR arg1, LOGPAR arg2)
+{
+}
+
+Inline void
+_syslog_3(uint_t prio, uint_t type, LOGPAR arg1, LOGPAR arg2, LOGPAR arg3)
+{
+}
+
+Inline void
+_syslog_4(uint_t prio, uint_t type, LOGPAR arg1, LOGPAR arg2,
+											LOGPAR arg3, LOGPAR arg4)
+{
+}
+
+Inline void
+_syslog_5(uint_t prio, uint_t type, LOGPAR arg1, LOGPAR arg2,
+								LOGPAR arg3, LOGPAR arg4, LOGPAR arg5)
+{
+}
+
+Inline void
+_syslog_6(uint_t prio, uint_t type, LOGPAR arg1, LOGPAR arg2,
+					LOGPAR arg3, LOGPAR arg4, LOGPAR arg5, LOGPAR arg6)
+{
+}
+
+Inline void
+syslog(uint_t prio, const char *format, ...)
+{
+}
+
+#endif /* TOPPERS_OMIT_SYSLOG */
+
+/*
+ *  ã­ã°æ
+å ±ï¼ã³ã¡ã³ãï¼ãåºåããããã®ãã¯ã­
+ *
+ *  formatããã³å¾ç¶ã®å¼æ°ããä½æããã¡ãã»ã¼ã¸ãï¼éå¤§åº¦prioã§ã­ã°æ
+
+ *  å ±ã¨ãã¦åºåããããã®ãã¯ã­ï¼arg1ï½argnã¯LOGPARåã«ã­ã£ã¹ãããã
+ *  ãï¼LOGPARåã«åå¤æã§ããä»»æã®åã§ããï¼
+ */
+
+#define syslog_0(prio, format) \
+				_syslog_1(prio, LOG_TYPE_COMMENT, (LOGPAR)(format))
+
+#define syslog_1(prio, format, arg1) \
+				_syslog_2(prio, LOG_TYPE_COMMENT, (LOGPAR)(format), \
+														(LOGPAR)(arg1))
+
+#define syslog_2(prio, format, arg1, arg2) \
+				_syslog_3(prio, LOG_TYPE_COMMENT, (LOGPAR)(format), \
+										(LOGPAR)(arg1), (LOGPAR)(arg2))
+
+#define syslog_3(prio, format, arg1, arg2, arg3) \
+				_syslog_4(prio, LOG_TYPE_COMMENT, (LOGPAR)(format), \
+						(LOGPAR)(arg1), (LOGPAR)(arg2), (LOGPAR)(arg3))
+
+#define syslog_4(prio, format, arg1, arg2, arg3, arg4) \
+				_syslog_5(prio, LOG_TYPE_COMMENT, (LOGPAR)(format), \
+						(LOGPAR)(arg1), (LOGPAR)(arg2), (LOGPAR)(arg3), \
+														(LOGPAR)(arg4))
+
+#define syslog_5(prio, format, arg1, arg2, arg3, arg4, arg5) \
+				_syslog_6(prio, LOG_TYPE_COMMENT, (LOGPAR)(format), \
+						(LOGPAR)(arg1), (LOGPAR)(arg2), (LOGPAR)(arg3), \
+										(LOGPAR)(arg4), (LOGPAR)(arg5))
+
+/*
+ *  ã­ã°æ
+å ±ï¼ã¢ãµã¼ã·ã§ã³ã®å¤±æï¼ãåºåããããã®ãã¯ã­
+ */
+#ifndef TOPPERS_assert_fail
+#define TOPPERS_assert_fail(exp, file, line) \
+				_syslog_3(LOG_EMERG, LOG_TYPE_ASSERT, (LOGPAR)(file), \
+										(LOGPAR)(line), (LOGPAR)(exp))
+#endif /* TOPPERS_assert_fail */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TOPPERS_T_SYSLOG_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/Makefile.kernel
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/Makefile.kernel	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/Makefile.kernel	(revision 270)
@@ -0,0 +1,157 @@
+#
+#  TOPPERS/ASP Kernel
+#      Toyohashi Open Platform for Embedded Real-Time Systems/
+#      Advanced Standard Profile Kernel
+# 
+#  Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+# 
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+# 
+#  $Id: Makefile.kernel 554 2016-01-17 13:21:59Z ertl-hiro $
+# 
+
+#
+#		ã«ã¼ãã«ã®ãã¡ã¤ã«æ§æã®å®ç¾©
+#
+
+#
+#  1ã¤ã®ã½ã¼ã¹ãã¡ã¤ã«ããè¤æ°ã®ãªãã¸ã§ã¯ããã¡ã¤ã«ãçæããããã«ä½
+#  æãããã½ã¼ã¹ãã¡ã¤ã«ã®ãªã¹ã
+#
+KERNEL_FCSRCS = startup.c task.c taskhook.c wait.c time_event.c \
+				task_manage.c task_refer.c task_sync.c task_term.c \
+				semaphore.c eventflag.c dataqueue.c pridataq.c mutex.c \
+				mempfix.c time_manage.c cyclic.c alarm.c \
+				sys_manage.c interrupt.c exception.c
+
+#
+#  åã½ã¼ã¹ãã¡ã¤ã«ããçæããããªãã¸ã§ã¯ããã¡ã¤ã«ã®ãªã¹ã
+#
+startup = sta_ker.o ext_ker.o kermem.o
+
+task = tskini.o tsksched.o tskrun.o tsknrun.o \
+		tskdmt.o tskact.o tskpri.o tskrot.o tskterm.o
+
+taskhook = mtxhook.o
+
+wait = waimake.o waicmp.o waitmo.o waitmook.o \
+		wobjwai.o wobjwaitmo.o iniwque.o
+
+time_event = tmeini.o tmeup.o tmedown.o tmecur.o tmeset.o \
+		tmereg.o tmeenq.o tmedeq.o tmechk.o tmeltim.o sigtim.o
+
+task_manage = acre_tsk.o del_tsk.o act_tsk.o can_act.o get_tst.o \
+		chg_pri.o get_pri.o get_inf.o
+
+task_refer = ref_tsk.o
+
+task_sync = slp_tsk.o tslp_tsk.o wup_tsk.o can_wup.o \
+		rel_wai.o sus_tsk.o rsm_tsk.o dly_tsk.o
+
+task_term = ext_tsk.o ras_ter.o ena_ter.o dis_ter.o sns_ter.o ter_tsk.o
+
+semaphore = semini.o acre_sem.o del_sem.o sig_sem.o \
+		wai_sem.o pol_sem.o twai_sem.o ini_sem.o ref_sem.o
+
+eventflag = flgini.o flgcnd.o acre_flg.o del_flg.o set_flg.o clr_flg.o \
+		wai_flg.o pol_flg.o twai_flg.o ini_flg.o ref_flg.o
+
+dataqueue = dtqini.o dtqenq.o dtqfenq.o dtqdeq.o dtqsnd.o dtqfsnd.o dtqrcv.o \
+		acre_dtq.o del_dtq.o snd_dtq.o psnd_dtq.o tsnd_dtq.o fsnd_dtq.o \
+		rcv_dtq.o prcv_dtq.o trcv_dtq.o ini_dtq.o ref_dtq.o
+
+pridataq = pdqini.o pdqenq.o pdqdeq.o pdqsnd.o pdqrcv.o \
+		acre_pdq.o del_pdq.o snd_pdq.o psnd_pdq.o tsnd_pdq.o \
+		rcv_pdq.o prcv_pdq.o trcv_pdq.o ini_pdq.o ref_pdq.o
+
+mutex = mtxini.o mtxchk.o mtxscan.o mtxdrop.o mtxacq.o mtxrel.o mtxrela.o \
+		acre_mtx.o del_mtx.o loc_mtx.o ploc_mtx.o tloc_mtx.o \
+		unl_mtx.o ini_mtx.o ref_mtx.o
+
+mempfix = mpfini.o mpfget.o acre_mpf.o del_mpf.o get_mpf.o \
+		pget_mpf.o tget_mpf.o rel_mpf.o ini_mpf.o ref_mpf.o
+
+time_manage = set_tim.o get_tim.o adj_tim.o fch_hrt.o chknfy.o nfyhdr.o
+
+cyclic = cycini.o acre_cyc.o del_cyc.o sta_cyc.o stp_cyc.o ref_cyc.o cyccal.o
+
+alarm = almini.o acre_alm.o del_alm.o sta_alm.o stp_alm.o ref_alm.o almcal.o
+
+sys_manage = rot_rdq.o get_tid.o get_lod.o get_nth.o \
+		loc_cpu.o unl_cpu.o dis_dsp.o ena_dsp.o \
+		sns_ctx.o sns_loc.o sns_dsp.o sns_dpn.o sns_ker.o
+
+interrupt = isrini.o isrcal.o acre_isr.o del_isr.o \
+		intini.o dis_int.o ena_int.o chg_ipm.o get_ipm.o
+
+exception = excini.o xsns_dpn.o
+
+#
+#  çæããããªãã¸ã§ã¯ããã¡ã¤ã«ã®ä¾å­é¢ä¿ã®å®ç¾©
+#
+$(startup) $(startup:.o=.s): startup.c
+$(task) $(task:.o=.s): task.c
+$(taskhook) $(taskhook:.o=.s): taskhook.c
+$(wait) $(wait:.o=.s): wait.c
+$(time_event) $(time_event:.o=.s): time_event.c
+$(task_manage) $(task_manage:.o=.s): task_manage.c
+$(task_refer) $(task_refer:.o=.s): task_refer.c
+$(task_sync) $(task_sync:.o=.s): task_sync.c
+$(task_term) $(task_term:.o=.s): task_term.c
+$(semaphore) $(semaphore:.o=.s): semaphore.c
+$(eventflag) $(eventflag:.o=.s): eventflag.c
+$(dataqueue) $(dataqueue:.o=.s): dataqueue.c
+$(pridataq) $(pridataq:.o=.s): pridataq.c
+$(mutex) $(mutex:.o=.s): mutex.c
+$(mempfix) $(mempfix:.o=.s): mempfix.c
+$(time_manage) $(time_manage:.o=.s): time_manage.c
+$(cyclic) $(cyclic:.o=.s): cyclic.c
+$(alarm) $(alarm:.o=.s): alarm.c
+$(sys_manage) $(sys_manage:.o=.s): sys_manage.c
+$(interrupt) $(interrupt:.o=.s): interrupt.c
+$(exception) $(exception:.o=.s): exception.c
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/alarm.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/alarm.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/alarm.c	(revision 270)
@@ -0,0 +1,419 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã¢ã©ã¼ã éç¥æ©è½
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "alarm.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_ALM_ENTER
+#define LOG_ALM_ENTER(p_almcb)
+#endif /* LOG_ALM_ENTER */
+
+#ifndef LOG_ALM_LEAVE
+#define LOG_ALM_LEAVE(p_almcb)
+#endif /* LOG_ALM_LEAVE */
+
+#ifndef LOG_ACRE_ALM_ENTER
+#define LOG_ACRE_ALM_ENTER(pk_calm)
+#endif /* LOG_ACRE_ALM_ENTER */
+
+#ifndef LOG_ACRE_ALM_LEAVE
+#define LOG_ACRE_ALM_LEAVE(ercd)
+#endif /* LOG_ACRE_ALM_LEAVE */
+
+#ifndef LOG_DEL_ALM_ENTER
+#define LOG_DEL_ALM_ENTER(almid)
+#endif /* LOG_DEL_ALM_ENTER */
+
+#ifndef LOG_DEL_ALM_LEAVE
+#define LOG_DEL_ALM_LEAVE(ercd)
+#endif /* LOG_DEL_ALM_LEAVE */
+
+#ifndef LOG_STA_ALM_ENTER
+#define LOG_STA_ALM_ENTER(almid, almtim)
+#endif /* LOG_STA_ALM_ENTER */
+
+#ifndef LOG_STA_ALM_LEAVE
+#define LOG_STA_ALM_LEAVE(ercd)
+#endif /* LOG_STA_ALM_LEAVE */
+
+#ifndef LOG_STP_ALM_ENTER
+#define LOG_STP_ALM_ENTER(almid)
+#endif /* LOG_STP_ALM_ENTER */
+
+#ifndef LOG_STP_ALM_LEAVE
+#define LOG_STP_ALM_LEAVE(ercd)
+#endif /* LOG_STP_ALM_LEAVE */
+
+#ifndef LOG_REF_ALM_ENTER
+#define LOG_REF_ALM_ENTER(almid, pk_ralm)
+#endif /* LOG_REF_ALM_ENTER */
+
+#ifndef LOG_REF_ALM_LEAVE
+#define LOG_REF_ALM_LEAVE(ercd, pk_ralm)
+#endif /* LOG_REF_ALM_LEAVE */
+
+/*
+ *  ã¢ã©ã¼ã éç¥ã®æ°
+ */
+#define tnum_alm	((uint_t)(tmax_almid - TMIN_ALMID + 1))
+#define tnum_salm	((uint_t)(tmax_salmid - TMIN_ALMID + 1))
+
+/*
+ *  ã¢ã©ã¼ã éç¥IDããã¢ã©ã¼ã éç¥ç®¡çãã­ãã¯ãåãåºãããã®ãã¯ã­
+ */
+#define INDEX_ALM(almid)	((uint_t)((almid) - TMIN_ALMID))
+#define get_almcb(almid)	(&(almcb_table[INDEX_ALM(almid)]))
+
+#ifdef TOPPERS_almini
+
+/*
+ *  ä½¿ç¨ãã¦ããªãã¢ã©ã¼ã éç¥ç®¡çãã­ãã¯ã®ãªã¹ã
+ *
+ *  ã¢ã©ã¼ã éç¥ç®¡çãã­ãã¯ã®å
+é ­ã«ã¯ã­ã¥ã¼ã«ã¤ãªãããã®é åããªãã
+ *  ãï¼ã¿ã¤ã ã¤ãã³ããã­ãã¯ï¼tmevtbï¼ã®é åãç¨ããï¼
+ */
+QUEUE	free_almcb;
+
+/*
+ *  ã¢ã©ã¼ã éç¥æ©è½ã®åæå
+ */
+void
+initialize_alarm(void)
+{
+	uint_t	i, j;
+	ALMCB	*p_almcb;
+	ALMINIB	*p_alminib;
+
+	for (i = 0; i < tnum_salm; i++) {
+		p_almcb = &(almcb_table[i]);
+		p_almcb->p_alminib = &(alminib_table[i]);
+		p_almcb->almsta = false;
+		p_almcb->tmevtb.callback = (CBACK) call_alarm;
+		p_almcb->tmevtb.arg = (void *) p_almcb;
+	}
+	queue_initialize(&free_almcb);
+	for (j = 0; i < tnum_alm; i++, j++) {
+		p_almcb = &(almcb_table[i]);
+		p_alminib = &(aalminib_table[j]);
+		p_alminib->almatr = TA_NOEXS;
+		p_almcb->p_alminib = ((const ALMINIB *) p_alminib);
+		p_almcb->tmevtb.callback = (CBACK) call_alarm;
+		p_almcb->tmevtb.arg = (void *) p_almcb;
+		queue_insert_prev(&free_almcb, ((QUEUE *) &(p_almcb->tmevtb)));
+	}
+}
+
+#endif /* TOPPERS_almini */
+
+/*
+ *  ã¢ã©ã¼ã éç¥ã®çæ
+ */
+#ifdef TOPPERS_acre_alm
+
+ER_UINT
+acre_alm(const T_CALM *pk_calm)
+{
+	ALMCB		*p_almcb;
+	ALMINIB		*p_alminib;
+	ATR			almatr;
+	T_NFYINFO	nfyinfo, *p_nfyinfo;
+	ER			ercd, rercd;
+
+	LOG_ACRE_ALM_ENTER(pk_calm);
+	CHECK_TSKCTX_UNL();
+
+	almatr = pk_calm->almatr;
+	nfyinfo = pk_calm->nfyinfo;
+
+	CHECK_RSATR(almatr, TA_NULL);
+	rercd = check_nfyinfo(&nfyinfo);
+	if (rercd != E_OK) {
+		ercd = rercd;
+		goto error_exit;
+	}
+
+	lock_cpu();
+	if (tnum_alm == 0 || queue_empty(&free_almcb)) {
+		ercd = E_NOID;
+	}
+	else {
+		p_almcb = ((ALMCB *)(((char *) queue_delete_next(&free_almcb))
+												- offsetof(ALMCB, tmevtb)));
+		p_alminib = (ALMINIB *)(p_almcb->p_alminib);
+		p_alminib->almatr = almatr;
+		if (nfyinfo.nfymode == TNFY_HANDLER) {
+			p_alminib->exinf = nfyinfo.nfy.handler.exinf;
+			p_alminib->nfyhdr = (NFYHDR)(nfyinfo.nfy.handler.tmehdr);
+		}
+		else {
+			p_nfyinfo = &aalm_nfyinfo_table[p_alminib - aalminib_table];
+			*p_nfyinfo = nfyinfo;
+			p_alminib->exinf = (intptr_t) p_nfyinfo;
+			p_alminib->nfyhdr = notify_handler;
+		}
+		p_almcb->almsta = false;
+		ercd = ALMID(p_almcb);
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_ACRE_ALM_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_acre_alm */
+
+/*
+ *  ã¢ã©ã¼ã éç¥ã®åé¤
+ */
+#ifdef TOPPERS_del_alm
+
+ER
+del_alm(ID almid)
+{
+	ALMCB	*p_almcb;
+	ALMINIB	*p_alminib;
+	ER		ercd;
+
+	LOG_DEL_ALM_ENTER(almid);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_ALMID(almid));
+	p_almcb = get_almcb(almid);
+
+	lock_cpu();
+	if (p_almcb->p_alminib->almatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (almid <= tmax_salmid) {
+		ercd = E_OBJ;
+	}
+	else {
+		if (p_almcb->almsta) {
+			p_almcb->almsta = false;
+			tmevtb_dequeue(&(p_almcb->tmevtb));
+		}
+
+		p_alminib = (ALMINIB *)(p_almcb->p_alminib);
+		p_alminib->almatr = TA_NOEXS;
+		queue_insert_prev(&free_almcb, ((QUEUE *) &(p_almcb->tmevtb)));
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_DEL_ALM_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_del_alm */
+
+/*
+ *  ã¢ã©ã¼ã éç¥ã®åä½éå§
+ */
+#ifdef TOPPERS_sta_alm
+
+ER
+sta_alm(ID almid, RELTIM almtim)
+{
+	ALMCB	*p_almcb;
+	ER		ercd;
+
+	LOG_STA_ALM_ENTER(almid, almtim);
+	CHECK_UNL();
+	CHECK_ID(VALID_ALMID(almid));
+	CHECK_PAR(VALID_RELTIM(almtim));
+	p_almcb = get_almcb(almid);
+
+	lock_cpu();
+	if (p_almcb->p_alminib->almatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		if (p_almcb->almsta) {
+			tmevtb_dequeue(&(p_almcb->tmevtb));
+		}
+		else {
+			p_almcb->almsta = true;
+		}
+		tmevtb_enqueue(&(p_almcb->tmevtb), almtim);
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_STA_ALM_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_sta_alm */
+
+/*
+ *  ã¢ã©ã¼ã éç¥ã®åä½åæ­¢
+ */
+#ifdef TOPPERS_stp_alm
+
+ER
+stp_alm(ID almid)
+{
+	ALMCB	*p_almcb;
+	ER		ercd;
+
+	LOG_STP_ALM_ENTER(almid);
+	CHECK_UNL();
+	CHECK_ID(VALID_ALMID(almid));
+	p_almcb = get_almcb(almid);
+
+	lock_cpu();
+	if (p_almcb->p_alminib->almatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		if (p_almcb->almsta) {
+			p_almcb->almsta = false;
+			tmevtb_dequeue(&(p_almcb->tmevtb));
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_STP_ALM_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_stp_alm */
+
+/*
+ *  ã¢ã©ã¼ã éç¥ã®ç¶æ
+åç
+§
+ */
+#ifdef TOPPERS_ref_alm
+
+ER
+ref_alm(ID almid, T_RALM *pk_ralm)
+{
+	ALMCB	*p_almcb;
+	ER		ercd;
+    
+	LOG_REF_ALM_ENTER(almid, pk_ralm);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_ALMID(almid));
+	p_almcb = get_almcb(almid);
+
+	lock_cpu();
+	if (p_almcb->p_alminib->almatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		if (p_almcb->almsta) {
+			pk_ralm->almstat = TALM_STA;
+			pk_ralm->lefttim = tmevt_lefttim(&(p_almcb->tmevtb));
+		}
+		else {
+			pk_ralm->almstat = TALM_STP;
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_REF_ALM_LEAVE(ercd, pk_ralm);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ref_alm */
+
+/*
+ *  ã¢ã©ã¼ã éç¥èµ·åã«ã¼ãã³
+ */
+#ifdef TOPPERS_almcal
+
+void
+call_alarm(ALMCB *p_almcb)
+{
+	/*
+	 *  ã¢ã©ã¼ã éç¥ãåæ­¢ç¶æ
+ã«ããï¼
+	 */
+	p_almcb->almsta = false;
+
+	/*
+	 *  éç¥ãã³ãã©ãï¼CPUã­ãã¯è§£é¤ç¶æ
+ã§å¼ã³åºãï¼
+	 */
+	unlock_cpu();
+
+	LOG_ALM_ENTER(p_almcb);
+	(*(p_almcb->p_alminib->nfyhdr))(p_almcb->p_alminib->exinf);
+	LOG_ALM_LEAVE(p_almcb);
+
+	if (!sense_lock()) {
+		lock_cpu();
+	}
+}
+
+#endif /* TOPPERS_almcal */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/alarm.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/alarm.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/alarm.h	(revision 270)
@@ -0,0 +1,131 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã¢ã©ã¼ã éç¥æ©è½
+ */
+
+#ifndef TOPPERS_ALARM_H
+#define TOPPERS_ALARM_H
+
+#include "kernel_impl.h"
+#include <queue.h>
+#include "time_event.h"
+
+/*
+ *  ã¢ã©ã¼ã éç¥åæåãã­ãã¯
+ */
+typedef struct alarm_handler_initialization_block {
+	ATR			almatr;			/* ã¢ã©ã¼ã éç¥å±æ§ */
+	intptr_t	exinf;			/* éç¥ãã³ãã©ã®æ¡å¼µæ
+å ± */
+	NFYHDR		nfyhdr;			/* éç¥ãã³ãã©ã®èµ·åçªå° */
+} ALMINIB;
+
+/*
+ *  ã¢ã©ã¼ã éç¥ç®¡çãã­ãã¯
+ */
+typedef struct alarm_handler_control_block {
+	const ALMINIB *p_alminib;	/* åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	bool_t		almsta;			/* ã¢ã©ã¼ã éç¥ã®åä½ç¶æ
+ */
+	TMEVTB		tmevtb;			/* ã¿ã¤ã ã¤ãã³ããã­ãã¯ */
+} ALMCB;
+
+/*
+ *  ä½¿ç¨ãã¦ããªãã¢ã©ã¼ã éç¥ç®¡çãã­ãã¯ã®ãªã¹ã
+ */
+extern QUEUE	free_almcb;
+
+/*
+ *  ã¢ã©ã¼ã éç¥IDã®æå¤§å¤ï¼kernel_cfg.cï¼
+ */
+extern const ID	tmax_almid;
+extern const ID	tmax_salmid;
+
+/*
+ *  ã¢ã©ã¼ã éç¥åæåãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern const ALMINIB	alminib_table[];
+extern ALMINIB			aalminib_table[];
+
+/*
+ *  ã¢ã©ã¼ã éç¥ã®éç¥æ¹æ³ã®æ ¼ç´ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern T_NFYINFO	aalm_nfyinfo_table[];
+
+/*
+ *  ã¢ã©ã¼ã éç¥ç®¡çãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern ALMCB	almcb_table[];
+
+/*
+ *  ã¢ã©ã¼ã éç¥ç®¡çãã­ãã¯ããã¢ã©ã¼ã éç¥IDãåãåºãããã®ãã¯ã­
+ */
+#define	ALMID(p_almcb)	((ID)(((p_almcb) - almcb_table) + TMIN_ALMID))
+
+/*
+ *  ã¢ã©ã¼ã éç¥æ©è½ã®åæå
+ */
+extern void	initialize_alarm(void);
+
+/*
+ *  ã¢ã©ã¼ã éç¥èµ·åã«ã¼ãã³
+ */
+extern void	call_alarm(ALMCB *p_almcb);
+
+#endif /* TOPPERS_ALARM_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/alarm.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/alarm.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/alarm.trb	(revision 270)
@@ -0,0 +1,91 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: alarm.trb 588 2016-02-05 12:54:58Z ertl-hiro $
+# 
+
+#
+#		ã¢ã©ã¼ã éç¥æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class AlarmObject < KernelObject
+  def initialize()
+    super("alm", "alarm")
+    @inibList["T_NFYINFO"] = "aalm_nfyinfo_table"
+  end
+
+  def prepare(key, params)
+    # almatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2491ï¼½
+    #ï¼TA_STAä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+    if (params[:almatr] & ~($TA_STA)) != 0
+      error_illegal_id("E_RSATR", params, :almatr, :almid)
+    end
+
+    # éç¥æ
+å ±ã®å¦ç
+    params[:nfyhdr] = generateNotifyHandler(key, params, :almid)
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:almatr]}), (intptr_t)(#{params[:par1]}), " \
+												"#{params[:nfyhdr]}")
+  end
+end
+
+#
+#  ã¢ã©ã¼ã éç¥ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Alarm Notification Functions")
+AlarmObject.new.generate()
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/allfunc.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/allfunc.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/allfunc.h	(revision 270)
@@ -0,0 +1,281 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ãã¹ã¦ã®é¢æ°ãã³ã³ãã¤ã«ããããã®å®ç¾©
+ */
+
+#ifndef TOPPERS_ALLFUNC_H
+#define TOPPERS_ALLFUNC_H
+
+/* startup.c */
+#define TOPPERS_sta_ker
+#define TOPPERS_ext_ker
+#define TOPPERS_kermem
+
+/* task.c */
+#define TOPPERS_tskini
+#define TOPPERS_tsksched
+#define TOPPERS_tskrun
+#define TOPPERS_tsknrun
+#define TOPPERS_tskdmt
+#define TOPPERS_tskact
+#define TOPPERS_tskpri
+#define TOPPERS_tskrot
+#define TOPPERS_tskterm
+
+/* taskhook.c */
+#define TOPPERS_mtxhook
+
+/* wait.c */
+#define TOPPERS_waimake
+#define TOPPERS_waicmp
+#define TOPPERS_waitmo
+#define TOPPERS_waitmook
+#define TOPPERS_wobjwai
+#define TOPPERS_wobjwaitmo
+#define TOPPERS_iniwque
+
+/* time_event.c */
+#define TOPPERS_tmeini
+#define TOPPERS_tmeup
+#define TOPPERS_tmedown
+#define TOPPERS_tmecur
+#define TOPPERS_tmeset
+#define TOPPERS_tmereg
+#define TOPPERS_tmeenq
+#define TOPPERS_tmedeq
+#define TOPPERS_tmechk
+#define TOPPERS_tmeltim
+#define TOPPERS_sigtim
+
+/* task_manage.c */
+#define TOPPERS_acre_tsk
+#define TOPPERS_del_tsk
+#define TOPPERS_act_tsk
+#define TOPPERS_can_act
+#define TOPPERS_get_tst
+#define TOPPERS_chg_pri
+#define TOPPERS_get_pri
+#define TOPPERS_get_inf
+
+/* task_refer.c */
+#define TOPPERS_ref_tsk
+
+/* task_sync.c */
+#define TOPPERS_slp_tsk
+#define TOPPERS_tslp_tsk
+#define TOPPERS_wup_tsk
+#define TOPPERS_can_wup
+#define TOPPERS_rel_wai
+#define TOPPERS_sus_tsk
+#define TOPPERS_rsm_tsk
+#define TOPPERS_dly_tsk
+
+/* task_term.c */
+#define TOPPERS_ext_tsk
+#define TOPPERS_ras_ter
+#define TOPPERS_dis_ter
+#define TOPPERS_ena_ter
+#define TOPPERS_sns_ter
+#define TOPPERS_ter_tsk
+
+/* semaphore.c */
+#define TOPPERS_semini
+#define TOPPERS_acre_sem
+#define TOPPERS_del_sem
+#define TOPPERS_sig_sem
+#define TOPPERS_wai_sem
+#define TOPPERS_pol_sem
+#define TOPPERS_twai_sem
+#define TOPPERS_ini_sem
+#define TOPPERS_ref_sem
+
+/* eventflag.c */
+#define TOPPERS_flgini
+#define TOPPERS_flgcnd
+#define TOPPERS_acre_flg
+#define TOPPERS_del_flg
+#define TOPPERS_set_flg
+#define TOPPERS_clr_flg
+#define TOPPERS_wai_flg
+#define TOPPERS_pol_flg
+#define TOPPERS_twai_flg
+#define TOPPERS_ini_flg
+#define TOPPERS_ref_flg
+
+/* dataqueue.c */
+#define TOPPERS_dtqini
+#define TOPPERS_dtqenq
+#define TOPPERS_dtqfenq
+#define TOPPERS_dtqdeq
+#define TOPPERS_dtqsnd
+#define TOPPERS_dtqfsnd
+#define TOPPERS_dtqrcv
+#define TOPPERS_acre_dtq
+#define TOPPERS_del_dtq
+#define TOPPERS_snd_dtq
+#define TOPPERS_psnd_dtq
+#define TOPPERS_tsnd_dtq
+#define TOPPERS_fsnd_dtq
+#define TOPPERS_rcv_dtq
+#define TOPPERS_prcv_dtq
+#define TOPPERS_trcv_dtq
+#define TOPPERS_ini_dtq
+#define TOPPERS_ref_dtq
+
+/* pridataq.c */
+#define TOPPERS_pdqini
+#define TOPPERS_pdqenq
+#define TOPPERS_pdqdeq
+#define TOPPERS_pdqsnd
+#define TOPPERS_pdqrcv
+#define TOPPERS_acre_pdq
+#define TOPPERS_del_pdq
+#define TOPPERS_snd_pdq
+#define TOPPERS_psnd_pdq
+#define TOPPERS_tsnd_pdq
+#define TOPPERS_rcv_pdq
+#define TOPPERS_prcv_pdq
+#define TOPPERS_trcv_pdq
+#define TOPPERS_ini_pdq
+#define TOPPERS_ref_pdq
+
+/* mutex.c */
+#define TOPPERS_mtxini
+#define TOPPERS_mtxchk
+#define TOPPERS_mtxscan
+#define TOPPERS_mtxdrop
+#define TOPPERS_mtxacq
+#define TOPPERS_mtxrel
+#define TOPPERS_mtxrela
+#define TOPPERS_acre_mtx
+#define TOPPERS_del_mtx
+#define TOPPERS_loc_mtx
+#define TOPPERS_ploc_mtx
+#define TOPPERS_tloc_mtx
+#define TOPPERS_unl_mtx
+#define TOPPERS_ini_mtx
+#define TOPPERS_ref_mtx
+
+/* mempfix.c */
+#define TOPPERS_mpfini
+#define TOPPERS_mpfget
+#define TOPPERS_acre_mpf
+#define TOPPERS_del_mpf
+#define TOPPERS_get_mpf
+#define TOPPERS_pget_mpf
+#define TOPPERS_tget_mpf
+#define TOPPERS_rel_mpf
+#define TOPPERS_ini_mpf
+#define TOPPERS_ref_mpf
+
+/* time_manage.c */
+#define TOPPERS_set_tim
+#define TOPPERS_get_tim
+#define TOPPERS_adj_tim
+#define TOPPERS_fch_hrt
+#define TOPPERS_chknfy
+#define TOPPERS_nfyhdr
+
+/* cyclic.c */
+#define TOPPERS_cycini
+#define TOPPERS_acre_cyc
+#define TOPPERS_del_cyc
+#define TOPPERS_sta_cyc
+#define TOPPERS_stp_cyc
+#define TOPPERS_ref_cyc
+#define TOPPERS_cyccal
+
+/* alarm.c */
+#define TOPPERS_almini
+#define TOPPERS_acre_alm
+#define TOPPERS_del_alm
+#define TOPPERS_sta_alm
+#define TOPPERS_stp_alm
+#define TOPPERS_ref_alm
+#define TOPPERS_almcal
+
+/* sys_manage.c */
+#define TOPPERS_rot_rdq
+#define TOPPERS_get_tid
+#define TOPPERS_get_lod
+#define TOPPERS_get_nth
+#define TOPPERS_loc_cpu
+#define TOPPERS_unl_cpu
+#define TOPPERS_dis_dsp
+#define TOPPERS_ena_dsp
+#define TOPPERS_sns_ctx
+#define TOPPERS_sns_loc
+#define TOPPERS_sns_dsp
+#define TOPPERS_sns_dpn
+#define TOPPERS_sns_ker
+
+/* interrupt.c */
+#define TOPPERS_isrini
+#define TOPPERS_isrcal
+#define TOPPERS_acre_isr
+#define TOPPERS_del_isr
+#define TOPPERS_intini
+#define TOPPERS_dis_int
+#define TOPPERS_ena_int
+#define TOPPERS_chg_ipm
+#define TOPPERS_get_ipm
+
+/* exception.c */
+#define TOPPERS_excini
+#define TOPPERS_xsns_dpn
+
+#endif /* TOPPERS_ALLFUNC_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/check.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/check.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/check.h	(revision 270)
@@ -0,0 +1,279 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã¨ã©ã¼ãã§ãã¯ç¨ãã¯ã­
+ */
+
+#ifndef TOPPERS_CHECK_H
+#define TOPPERS_CHECK_H
+
+#include "kernel_impl.h"
+
+/*
+ *  ãªãã¸ã§ã¯ãIDã®ç¯å²ã®å¤å®
+ */
+#define VALID_TSKID(tskid)	(TMIN_TSKID <= (tskid) && (tskid) <= tmax_tskid)
+#define VALID_SEMID(semid)	(TMIN_SEMID <= (semid) && (semid) <= tmax_semid)
+#define VALID_FLGID(flgid)	(TMIN_FLGID <= (flgid) && (flgid) <= tmax_flgid)
+#define VALID_DTQID(dtqid)	(TMIN_DTQID <= (dtqid) && (dtqid) <= tmax_dtqid)
+#define VALID_PDQID(pdqid)	(TMIN_PDQID <= (pdqid) && (pdqid) <= tmax_pdqid)
+#define VALID_MTXID(mtxid)	(TMIN_MTXID <= (mtxid) && (mtxid) <= tmax_mtxid)
+#define VALID_MPFID(mpfid)	(TMIN_MPFID <= (mpfid) && (mpfid) <= tmax_mpfid)
+#define VALID_CYCID(cycid)	(TMIN_CYCID <= (cycid) && (cycid) <= tmax_cycid)
+#define VALID_ALMID(almid)	(TMIN_ALMID <= (almid) && (almid) <= tmax_almid)
+#define VALID_ISRID(isrid)	(TMIN_ISRID <= (isrid) && (isrid) <= tmax_isrid)
+
+/*
+ *  ãªãã¸ã§ã¯ãçªå·ã®ç¯å²ã®å¤å®
+ */
+#ifndef VALID_INTNO_DISINT
+#define VALID_INTNO_DISINT(intno)    VALID_INTNO(intno)
+#endif /* VALID_INTNO_DISINT */
+
+#ifndef VALID_INTNO_CREISR
+#define VALID_INTNO_CREISR(intno)    VALID_INTNO(intno)
+#endif /* VALID_INTNO_CREISR */
+
+/*
+ *  åªå
+åº¦ã®ç¯å²ã®å¤å®
+ */
+#define VALID_TPRI(tpri)	(TMIN_TPRI <= (tpri) && (tpri) <= TMAX_TPRI)
+
+#define VALID_DPRI(dpri)	(TMIN_DPRI <= (dpri) && (dpri) <= TMAX_DPRI)
+
+#define VALID_ISRPRI(isrpri) \
+				(TMIN_ISRPRI <= (isrpri) && (isrpri) <= TMAX_ISRPRI)
+
+#ifndef VALID_INTPRI_CHGIPM
+#define VALID_INTPRI_CHGIPM(intpri) \
+				(TMIN_INTPRI <= (intpri) && (intpri) <= TIPM_ENAALL)
+#endif /* VALID_INTPRI_CHGIPM */
+
+/*
+ *  ç¸å¯¾æéã®ç¯å²ã®å¤å®
+ */
+#define VALID_RELTIM(reltim)	((reltim) <= TMAX_RELTIM)
+
+/*
+ *  ã¿ã¤ã ã¢ã¦ãæå®å¤ã®ç¯å²ã®å¤å®
+ */
+#define VALID_TMOUT(tmout)	((tmout) <= TMAX_RELTIM || (tmout) == TMO_FEVR \
+													|| (tmout) == TMO_POL)
+
+/*
+ *  ã¢ã©ã¤ã³ãã¦ãããã®å¤å®
+ */
+#define ALIGNED(val, align)		((((uintptr_t)(val)) & ((align) - 1U)) == 0U)
+
+#ifdef CHECK_STKSZ_ALIGN
+#define STKSZ_ALIGN(stksz)		ALIGNED(stksz, CHECK_STKSZ_ALIGN)
+#else /* CHECK_STKSZ_ALIGN */
+#define STKSZ_ALIGN(stksz)		true
+#endif /* CHECK_STKSZ_ALIGN */
+
+#ifdef CHECK_INTPTR_ALIGN
+#define INTPTR_ALIGN(p_var)		ALIGNED(p_var, CHECK_INTPTR_ALIGN)
+#else /* CHECK_INTPTR_ALIGN */
+#define INTPTR_ALIGN(p_var)		true
+#endif /* CHECK_INTPTR_ALIGN */
+
+#ifdef CHECK_FUNC_ALIGN
+#define FUNC_ALIGN(func)		ALIGNED(func, CHECK_FUNC_ALIGN)
+#else /* CHECK_FUNC_ALIGN */
+#define FUNC_ALIGN(func)		true
+#endif /* CHECK_FUNC_ALIGN */
+
+#ifdef CHECK_STACK_ALIGN
+#define STACK_ALIGN(stack)		ALIGNED(stack, CHECK_STACK_ALIGN)
+#else /* CHECK_STACK_ALIGN */
+#define STACK_ALIGN(stack)		true
+#endif /* CHECK_STACK_ALIGN */
+
+#ifdef CHECK_MPF_ALIGN
+#define MPF_ALIGN(mpf)			ALIGNED(mpf, CHECK_MPF_ALIGN)
+#else /* CHECK_MPF_ALIGN */
+#define MPF_ALIGN(mpf)			true
+#endif /* CHECK_MPF_ALIGN */
+
+#ifdef CHECK_MB_ALIGN
+#define MB_ALIGN(mb)			ALIGNED(mb, CHECK_MB_ALIGN)
+#else /* CHECK_MB_ALIGN */
+#define MB_ALIGN(mb)			true
+#endif /* CHECK_MB_ALIGN */
+
+/*
+ *  NULLã§ãªããã¨ã®å¤å®
+ */
+#ifdef CHECK_INTPTR_NONNULL
+#define INTPTR_NONNULL(p_var)	((p_var) != NULL)
+#else /* CHECK_INTPTR_NONNULL */
+#define INTPTR_NONNULL(p_var)	true
+#endif /* CHECK_INTPTR_NONNULL */
+
+#ifdef CHECK_FUNC_NONNULL
+#define FUNC_NONNULL(func)		((func) != NULL)
+#else /* CHECK_FUNC_NONNULL */
+#define FUNC_NONNULL(func)		true
+#endif /* CHECK_FUNC_NONNULL */
+
+/*
+ *  å¼åºãã³ã³ãã­ã¹ãã®ãã§ãã¯ï¼E_CTXï¼
+ */
+#define CHECK_TSKCTX() do {									\
+	if (sense_context()) {									\
+		ercd = E_CTX;										\
+		goto error_exit;									\
+	}														\
+} while (false)
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã®ãã§ãã¯ï¼E_CTXï¼
+ */
+#define CHECK_UNL() do {									\
+	if (sense_lock()) {										\
+		ercd = E_CTX;										\
+		goto error_exit;									\
+	}														\
+} while (false)
+
+/*
+ *  å¼åºãã³ã³ãã­ã¹ãã¨CPUã­ãã¯ç¶æ
+ã®ãã§ãã¯ï¼E_CTXï¼
+ */
+#define CHECK_TSKCTX_UNL() do {								\
+	if (sense_context() || sense_lock()) {					\
+		ercd = E_CTX;										\
+		goto error_exit;									\
+	}														\
+} while (false)
+
+/*
+ *  ãã£ã¹ãããä¿çç¶æ
+ã§ãªããã®ãã§ãã¯ï¼E_CTXï¼
+ */
+#define CHECK_DISPATCH() do {								\
+	if (sense_context() || sense_lock() || !dspflg) {		\
+		ercd = E_CTX;										\
+		goto error_exit;									\
+	}														\
+} while (false)
+
+/*
+ *  ãã®ä»ã®ã³ã³ãã­ã¹ãã¨ã©ã¼ã®ãã§ãã¯ï¼E_CTXï¼
+ */
+#define CHECK_CTX(exp) do {									\
+	if (!(exp)) {											\
+		ercd = E_CTX;										\
+		goto error_exit;									\
+	}														\
+} while (false)
+
+/*
+ *  ãªãã¸ã§ã¯ãIDã®ãã§ãã¯ï¼E_IDï¼
+ */
+#define CHECK_ID(exp) do {									\
+	if (!(exp)) {											\
+		ercd = E_ID;										\
+		goto error_exit;									\
+	}														\
+} while (false)
+
+/*
+ *  äºç´å±æ§ã¨ã©ã¼ã®ãã§ãã¯ï¼E_RSATRï¼
+ */
+#define CHECK_RSATR(atr, valid_atr) do {					\
+	if (((atr) & ~(valid_atr)) != 0U) {						\
+		ercd = E_RSATR;										\
+		goto error_exit;									\
+	}														\
+} while (false)
+
+/*
+ *  ãã©ã¡ã¼ã¿ã¨ã©ã¼ã®ãã§ãã¯ï¼E_PARï¼
+ */
+#define CHECK_PAR(exp) do {									\
+	if (!(exp)) {											\
+		ercd = E_PAR;										\
+		goto error_exit;									\
+	}														\
+} while (false)
+
+/*
+ *  ä¸æ­£ä½¿ç¨ã¨ã©ã¼ã®ãã§ãã¯ï¼E_ILUSEï¼
+ */
+#define CHECK_ILUSE(exp) do {								\
+	if (!(exp)) {											\
+		ercd = E_ILUSE;										\
+		goto error_exit;									\
+	}														\
+} while (false)
+
+/*
+ *  éçãªãªãã¸ã§ã¯ãç¶æ
+ã¨ã©ã¼ã®ãã§ãã¯ï¼E_OBJï¼
+ */
+#define CHECK_OBJ(exp) do {									\
+	if (!(exp)) {											\
+		ercd = E_OBJ;										\
+		goto error_exit;									\
+	}														\
+} while (false)
+
+#endif /* TOPPERS_CHECK_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/cyclic.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/cyclic.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/cyclic.c	(revision 270)
@@ -0,0 +1,447 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		å¨æéç¥æ©è½
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "cyclic.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_CYC_ENTER
+#define LOG_CYC_ENTER(p_cyccb)
+#endif /* LOG_CYC_ENTER */
+
+#ifndef LOG_CYC_LEAVE
+#define LOG_CYC_LEAVE(p_cyccb)
+#endif /* LOG_CYC_LEAVE */
+
+#ifndef LOG_ACRE_CYC_ENTER
+#define LOG_ACRE_CYC_ENTER(pk_ccyc)
+#endif /* LOG_ACRE_CYC_ENTER */
+
+#ifndef LOG_ACRE_CYC_LEAVE
+#define LOG_ACRE_CYC_LEAVE(ercd)
+#endif /* LOG_ACRE_CYC_LEAVE */
+
+#ifndef LOG_DEL_CYC_ENTER
+#define LOG_DEL_CYC_ENTER(cycid)
+#endif /* LOG_DEL_CYC_ENTER */
+
+#ifndef LOG_DEL_CYC_LEAVE
+#define LOG_DEL_CYC_LEAVE(ercd)
+#endif /* LOG_DEL_CYC_LEAVE */
+
+#ifndef LOG_STA_CYC_ENTER
+#define LOG_STA_CYC_ENTER(cycid)
+#endif /* LOG_STA_CYC_ENTER */
+
+#ifndef LOG_STA_CYC_LEAVE
+#define LOG_STA_CYC_LEAVE(ercd)
+#endif /* LOG_STA_CYC_LEAVE */
+
+#ifndef LOG_STP_CYC_ENTER
+#define LOG_STP_CYC_ENTER(cycid)
+#endif /* LOG_STP_CYC_ENTER */
+
+#ifndef LOG_STP_CYC_LEAVE
+#define LOG_STP_CYC_LEAVE(ercd)
+#endif /* LOG_STP_CYC_LEAVE */
+
+#ifndef LOG_REF_CYC_ENTER
+#define LOG_REF_CYC_ENTER(cycid, pk_rcyc)
+#endif /* LOG_REF_CYC_ENTER */
+
+#ifndef LOG_REF_CYC_LEAVE
+#define LOG_REF_CYC_LEAVE(ercd, pk_rcyc)
+#endif /* LOG_REF_CYC_LEAVE */
+
+/*
+ *  å¨æéç¥ã®æ°
+ */
+#define tnum_cyc	((uint_t)(tmax_cycid - TMIN_CYCID + 1))
+#define tnum_scyc	((uint_t)(tmax_scycid - TMIN_CYCID + 1))
+
+/*
+ *  å¨æéç¥IDããå¨æéç¥ç®¡çãã­ãã¯ãåãåºãããã®ãã¯ã­
+ */
+#define INDEX_CYC(cycid)	((uint_t)((cycid) - TMIN_CYCID))
+#define get_cyccb(cycid)	(&(cyccb_table[INDEX_CYC(cycid)]))
+
+#ifdef TOPPERS_cycini
+
+/*
+ *  ä½¿ç¨ãã¦ããªãå¨æéç¥ç®¡çãã­ãã¯ã®ãªã¹ã
+ *
+ *  å¨æéç¥ç®¡çãã­ãã¯ã®å
+é ­ã«ã¯ã­ã¥ã¼ã«ã¤ãªãããã®é åããªãããï¼
+ *  ã¿ã¤ã ã¤ãã³ããã­ãã¯ï¼tmevtbï¼ã®é åãç¨ããï¼
+ */
+QUEUE	free_cyccb;
+
+/*
+ *  å¨æéç¥æ©è½ã®åæå
+ */
+void
+initialize_cyclic(void)
+{
+	uint_t	i, j;
+	CYCCB	*p_cyccb;
+	CYCINIB	*p_cycinib;
+
+	for (i = 0; i < tnum_scyc; i++) {
+		p_cyccb = &(cyccb_table[i]);
+		p_cyccb->p_cycinib = &(cycinib_table[i]);
+		p_cyccb->tmevtb.callback = (CBACK) call_cyclic;
+		p_cyccb->tmevtb.arg = (void *) p_cyccb;
+		if ((p_cyccb->p_cycinib->cycatr & TA_STA) != 0U) {
+			/*
+			 *  ååã®èµ·åã®ããã®ã¿ã¤ã ã¤ãã³ããç»é²ããï¼»ASPD1035ï¼½
+			 *  ï¼»ASPD1062ï¼½ï¼
+			 */
+			p_cyccb->cycsta = true;
+			p_cyccb->tmevtb.evttim = (EVTTIM)(p_cyccb->p_cycinib->cycphs);
+			tmevtb_register(&(p_cyccb->tmevtb));
+		}
+		else {
+			p_cyccb->cycsta = false;
+		}
+	}
+	queue_initialize(&free_cyccb);
+	for (j = 0; i < tnum_cyc; i++, j++) {
+		p_cyccb = &(cyccb_table[i]);
+		p_cycinib = &(acycinib_table[j]);
+		p_cycinib->cycatr = TA_NOEXS;
+		p_cyccb->p_cycinib = ((const CYCINIB *) p_cycinib);
+		p_cyccb->tmevtb.callback = (CBACK) call_cyclic;
+		p_cyccb->tmevtb.arg = (void *) p_cyccb;
+		queue_insert_prev(&free_cyccb, ((QUEUE *) &(p_cyccb->tmevtb)));
+	}
+}
+
+#endif /* TOPPERS_cycini */
+
+/*
+ *  å¨æéç¥ã®çæ
+ */
+#ifdef TOPPERS_acre_cyc
+
+ER_UINT
+acre_cyc(const T_CCYC *pk_ccyc)
+{
+	CYCCB		*p_cyccb;
+	CYCINIB		*p_cycinib;
+	ATR			cycatr;
+	T_NFYINFO	nfyinfo, *p_nfyinfo;
+	RELTIM		cyctim;
+	RELTIM		cycphs;
+	ER			ercd, rercd;
+
+	LOG_ACRE_CYC_ENTER(pk_ccyc);
+	CHECK_TSKCTX_UNL();
+
+	cycatr = pk_ccyc->cycatr;
+	nfyinfo = pk_ccyc->nfyinfo;
+	cyctim = pk_ccyc->cyctim;
+	cycphs = pk_ccyc->cycphs;
+
+	CHECK_RSATR(cycatr, TA_STA);
+	rercd = check_nfyinfo(&nfyinfo);
+	if (rercd != E_OK) {
+		ercd = rercd;
+		goto error_exit;
+	}
+	CHECK_PAR(0 < cyctim && cyctim <= TMAX_RELTIM);
+	CHECK_PAR(0 <= cycphs && cycphs <= TMAX_RELTIM);
+
+	lock_cpu();
+	if (tnum_cyc == 0 || queue_empty(&free_cyccb)) {
+		ercd = E_NOID;
+	}
+	else {
+		p_cyccb = ((CYCCB *)(((char *) queue_delete_next(&free_cyccb))
+												- offsetof(CYCCB, tmevtb)));
+		p_cycinib = (CYCINIB *)(p_cyccb->p_cycinib);
+		p_cycinib->cycatr = cycatr;
+		if (nfyinfo.nfymode == TNFY_HANDLER) {
+			p_cycinib->exinf = nfyinfo.nfy.handler.exinf;
+			p_cycinib->nfyhdr = (NFYHDR)(nfyinfo.nfy.handler.tmehdr);
+		}
+		else {
+			p_nfyinfo = &acyc_nfyinfo_table[p_cycinib - acycinib_table];
+			*p_nfyinfo = nfyinfo;
+			p_cycinib->exinf = (intptr_t) p_nfyinfo;
+			p_cycinib->nfyhdr = notify_handler;
+		}
+		p_cycinib->cyctim = cyctim;
+		p_cycinib->cycphs = cycphs;
+
+		if ((p_cyccb->p_cycinib->cycatr & TA_STA) != 0U) {
+			p_cyccb->cycsta = true;
+			tmevtb_enqueue(&(p_cyccb->tmevtb), p_cyccb->p_cycinib->cycphs);
+		}
+		else {
+			p_cyccb->cycsta = false;
+		}
+		ercd = CYCID(p_cyccb);
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_ACRE_CYC_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_acre_cyc */
+
+/*
+ *  å¨æéç¥ã®åé¤
+ */
+#ifdef TOPPERS_del_cyc
+
+ER
+del_cyc(ID cycid)
+{
+	CYCCB	*p_cyccb;
+	CYCINIB	*p_cycinib;
+	ER		ercd;
+
+	LOG_DEL_CYC_ENTER(cycid);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_CYCID(cycid));
+	p_cyccb = get_cyccb(cycid);
+
+	lock_cpu();
+	if (p_cyccb->p_cycinib->cycatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (cycid <= tmax_scycid) {
+		ercd = E_OBJ;
+	}
+	else {
+		if (p_cyccb->cycsta) {
+			p_cyccb->cycsta = false;
+			tmevtb_dequeue(&(p_cyccb->tmevtb));
+		}
+
+		p_cycinib = (CYCINIB *)(p_cyccb->p_cycinib);
+		p_cycinib->cycatr = TA_NOEXS;
+		queue_insert_prev(&free_cyccb, ((QUEUE *) &(p_cyccb->tmevtb)));
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_DEL_CYC_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_del_cyc */
+
+/*
+ *  å¨æéç¥ã®åä½éå§
+ */
+#ifdef TOPPERS_sta_cyc
+
+ER
+sta_cyc(ID cycid)
+{
+	CYCCB	*p_cyccb;
+	ER		ercd;
+
+	LOG_STA_CYC_ENTER(cycid);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_CYCID(cycid));
+	p_cyccb = get_cyccb(cycid);
+
+	lock_cpu();
+	if (p_cyccb->p_cycinib->cycatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		if (p_cyccb->cycsta) {
+			tmevtb_dequeue(&(p_cyccb->tmevtb));
+		}
+		else {
+			p_cyccb->cycsta = true;
+		}
+		/*
+		 *  ååã®èµ·åã®ããã®ã¿ã¤ã ã¤ãã³ããç»é²ããï¼»ASPD1036ï¼½ï¼
+		 */
+		tmevtb_enqueue(&(p_cyccb->tmevtb), p_cyccb->p_cycinib->cycphs);
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_STA_CYC_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_sta_cyc */
+
+/*
+ *  å¨æéç¥ã®åä½åæ­¢
+ */
+#ifdef TOPPERS_stp_cyc
+
+ER
+stp_cyc(ID cycid)
+{
+	CYCCB	*p_cyccb;
+	ER		ercd;
+
+	LOG_STP_CYC_ENTER(cycid);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_CYCID(cycid));
+	p_cyccb = get_cyccb(cycid);
+
+	lock_cpu();
+	if (p_cyccb->p_cycinib->cycatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		if (p_cyccb->cycsta) {
+			p_cyccb->cycsta = false;
+			tmevtb_dequeue(&(p_cyccb->tmevtb));
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_STP_CYC_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_stp_cyc */
+
+/*
+ *  å¨æéç¥ã®ç¶æ
+åç
+§
+ */
+#ifdef TOPPERS_ref_cyc
+
+ER
+ref_cyc(ID cycid, T_RCYC *pk_rcyc)
+{
+	CYCCB	*p_cyccb;
+	ER		ercd;
+    
+	LOG_REF_CYC_ENTER(cycid, pk_rcyc);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_CYCID(cycid));
+	p_cyccb = get_cyccb(cycid);
+
+	lock_cpu();
+	if (p_cyccb->p_cycinib->cycatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		if (p_cyccb->cycsta) {
+			pk_rcyc->cycstat = TCYC_STA;
+			pk_rcyc->lefttim = tmevt_lefttim(&(p_cyccb->tmevtb));
+		}
+		else {
+			pk_rcyc->cycstat = TCYC_STP;
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_REF_CYC_LEAVE(ercd, pk_rcyc);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ref_cyc */
+
+/*
+ *  å¨æéç¥èµ·åã«ã¼ãã³
+ */
+#ifdef TOPPERS_cyccal
+
+void
+call_cyclic(CYCCB *p_cyccb)
+{
+	/*
+	 *  æ¬¡åã®èµ·åã®ããã®ã¿ã¤ã ã¤ãã³ããç»é²ããï¼»ASPD1037ï¼½ï¼
+	 */
+	p_cyccb->tmevtb.evttim += p_cyccb->p_cycinib->cyctim;	/*ï¼»ASPD1038ï¼½*/
+	tmevtb_register(&(p_cyccb->tmevtb));
+
+	/*
+	 *  éç¥ãã³ãã©ãï¼CPUã­ãã¯è§£é¤ç¶æ
+ã§å¼ã³åºãï¼
+	 */
+	unlock_cpu();
+
+	LOG_CYC_ENTER(p_cyccb);
+	(*(p_cyccb->p_cycinib->nfyhdr))(p_cyccb->p_cycinib->exinf);
+	LOG_CYC_LEAVE(p_cyccb);
+
+	if (!sense_lock()) {
+		lock_cpu();
+	}
+}
+
+#endif /* TOPPERS_cyccal */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/cyclic.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/cyclic.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/cyclic.h	(revision 270)
@@ -0,0 +1,136 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		å¨æéç¥æ©è½
+ */
+
+#ifndef TOPPERS_CYCLIC_H
+#define TOPPERS_CYCLIC_H
+
+#include "kernel_impl.h"
+#include <queue.h>
+#include "time_event.h"
+
+/*
+ *  å¨æéç¥åæåãã­ãã¯
+ */
+typedef struct cyclic_handler_initialization_block {
+	ATR			cycatr;			/* å¨æéç¥å±æ§ */
+	intptr_t	exinf;			/* éç¥ãã³ãã©ã®æ¡å¼µæ
+å ± */
+	NFYHDR		nfyhdr;			/* éç¥ãã³ãã©ã®èµ·åçªå° */
+	RELTIM		cyctim;			/* å¨æéç¥ã®èµ·åå¨æ */
+	RELTIM		cycphs;			/* å¨æéç¥ã®èµ·åä½ç¸ */
+} CYCINIB;
+
+/*
+ *  å¨æéç¥ç®¡çãã­ãã¯
+ *
+ *	æ¬¡ã«å¨æéç¥ãèµ·åããæå»ã¯ï¼ã¿ã¤ã ã¤ãã³ããã­ãã¯ï¼tmevtbï¼ä¸­ã®
+ *	ã¿ã¤ã ã¤ãã³ãã®çºçæå»ï¼evttimï¼ã§ä¿æããï¼
+ */
+typedef struct cyclic_handler_control_block {
+	const CYCINIB *p_cycinib;	/* åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	bool_t		cycsta;			/* å¨æéç¥ã®åä½ç¶æ
+ */
+	TMEVTB		tmevtb;			/* ã¿ã¤ã ã¤ãã³ããã­ãã¯ */
+} CYCCB;
+
+/*
+ *  ä½¿ç¨ãã¦ããªãå¨æéç¥ç®¡çãã­ãã¯ã®ãªã¹ã
+ */
+extern QUEUE	free_cyccb;
+
+/*
+ *  å¨æéç¥IDã®æå¤§å¤ï¼kernel_cfg.cï¼
+ */
+extern const ID	tmax_cycid;
+extern const ID	tmax_scycid;
+
+/*
+ *  å¨æéç¥åæåãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern const CYCINIB	cycinib_table[];
+extern CYCINIB			acycinib_table[];
+
+/*
+ *  å¨æéç¥ã®éç¥æ¹æ³ã®æ ¼ç´ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern T_NFYINFO	acyc_nfyinfo_table[];
+
+/*
+ *  å¨æéç¥ç®¡çãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern CYCCB	cyccb_table[];
+
+/*
+ *  å¨æéç¥ç®¡çãã­ãã¯ããå¨æéç¥IDãåãåºãããã®ãã¯ã­
+ */
+#define	CYCID(p_cyccb)	((ID)(((p_cyccb) - cyccb_table) + TMIN_CYCID))
+
+/*
+ *  å¨æéç¥æ©è½ã®åæå
+ */
+extern void	initialize_cyclic(void);
+
+/*
+ *  å¨æéç¥èµ·åã«ã¼ãã³
+ */
+extern void	call_cyclic(CYCCB *p_cyccb);
+
+#endif /* TOPPERS_CYCLIC_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/cyclic.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/cyclic.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/cyclic.trb	(revision 270)
@@ -0,0 +1,101 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: cyclic.trb 588 2016-02-05 12:54:58Z ertl-hiro $
+# 
+
+#
+#		å¨æéç¥æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class CyclicObject < KernelObject
+  def initialize()
+    super("cyc", "cyclic")
+    @inibList["T_NFYINFO"] = "acyc_nfyinfo_table"
+  end
+
+  def prepare(key, params)
+    # cycatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2383ï¼½
+    #ï¼TA_STAä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+    if (params[:cycatr] & ~($TA_STA)) != 0
+      error_illegal_id("E_RSATR", params, :cycatr, :cycid)
+    end
+
+    # (0 < cyctim && cyctim <= TMAX_RELTIM)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI2397ï¼½
+    if !(0 < params[:cyctim] && params[:cyctim] <= $TMAX_RELTIM)
+      error_illegal_id("E_PAR", params, :cyctim, :cycid)
+    end
+
+    # (0 <= cycphs && cycphs <= TMAX_RELTIM)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI2399ï¼½
+    if !(0 <= params[:cycphs] && params[:cycphs] <= $TMAX_RELTIM)
+      error_illegal_id("E_PAR", params, :cycphs, :cycid)
+    end
+
+    # éç¥æ
+å ±ã®å¦ç
+    params[:nfyhdr] = generateNotifyHandler(key, params, :cycid)
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:cycatr]}), (intptr_t)(#{params[:par1]}), " \
+			"#{params[:nfyhdr]}, (#{params[:cyctim]}), (#{params[:cycphs]})")
+  end
+end
+
+#
+#  å¨æéç¥ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Cyclic Notification Functions")
+CyclicObject.new.generate()
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/dataqueue.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/dataqueue.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/dataqueue.c	(revision 270)
@@ -0,0 +1,861 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ãã¼ã¿ã­ã¥ã¼æ©è½
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+#include "wait.h"
+#include "dataqueue.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_ACRE_DTQ_ENTER
+#define LOG_ACRE_DTQ_ENTER(pk_cdtq)
+#endif /* LOG_ACRE_DTQ_ENTER */
+
+#ifndef LOG_ACRE_DTQ_LEAVE
+#define LOG_ACRE_DTQ_LEAVE(ercd)
+#endif /* LOG_ACRE_DTQ_LEAVE */
+
+#ifndef LOG_DEL_DTQ_ENTER
+#define LOG_DEL_DTQ_ENTER(dtqid)
+#endif /* LOG_DEL_DTQ_ENTER */
+
+#ifndef LOG_DEL_DTQ_LEAVE
+#define LOG_DEL_DTQ_LEAVE(ercd)
+#endif /* LOG_DEL_DTQ_LEAVE */
+
+#ifndef LOG_SND_DTQ_ENTER
+#define LOG_SND_DTQ_ENTER(dtqid, data)
+#endif /* LOG_SND_DTQ_ENTER */
+
+#ifndef LOG_SND_DTQ_LEAVE
+#define LOG_SND_DTQ_LEAVE(ercd)
+#endif /* LOG_SND_DTQ_LEAVE */
+
+#ifndef LOG_PSND_DTQ_ENTER
+#define LOG_PSND_DTQ_ENTER(dtqid, data)
+#endif /* LOG_PSND_DTQ_ENTER */
+
+#ifndef LOG_PSND_DTQ_LEAVE
+#define LOG_PSND_DTQ_LEAVE(ercd)
+#endif /* LOG_PSND_DTQ_LEAVE */
+
+#ifndef LOG_TSND_DTQ_ENTER
+#define LOG_TSND_DTQ_ENTER(dtqid, data, tmout)
+#endif /* LOG_TSND_DTQ_ENTER */
+
+#ifndef LOG_TSND_DTQ_LEAVE
+#define LOG_TSND_DTQ_LEAVE(ercd)
+#endif /* LOG_TSND_DTQ_LEAVE */
+
+#ifndef LOG_FSND_DTQ_ENTER
+#define LOG_FSND_DTQ_ENTER(dtqid, data)
+#endif /* LOG_FSND_DTQ_ENTER */
+
+#ifndef LOG_FSND_DTQ_LEAVE
+#define LOG_FSND_DTQ_LEAVE(ercd)
+#endif /* LOG_FSND_DTQ_LEAVE */
+
+#ifndef LOG_RCV_DTQ_ENTER
+#define LOG_RCV_DTQ_ENTER(dtqid, p_data)
+#endif /* LOG_RCV_DTQ_ENTER */
+
+#ifndef LOG_RCV_DTQ_LEAVE
+#define LOG_RCV_DTQ_LEAVE(ercd, p_data)
+#endif /* LOG_RCV_DTQ_LEAVE */
+
+#ifndef LOG_PRCV_DTQ_ENTER
+#define LOG_PRCV_DTQ_ENTER(dtqid, p_data)
+#endif /* LOG_PRCV_DTQ_ENTER */
+
+#ifndef LOG_PRCV_DTQ_LEAVE
+#define LOG_PRCV_DTQ_LEAVE(ercd, p_data)
+#endif /* LOG_PRCV_DTQ_LEAVE */
+
+#ifndef LOG_TRCV_DTQ_ENTER
+#define LOG_TRCV_DTQ_ENTER(dtqid, p_data, tmout)
+#endif /* LOG_TRCV_DTQ_ENTER */
+
+#ifndef LOG_TRCV_DTQ_LEAVE
+#define LOG_TRCV_DTQ_LEAVE(ercd, p_data)
+#endif /* LOG_TRCV_DTQ_LEAVE */
+
+#ifndef LOG_INI_DTQ_ENTER
+#define LOG_INI_DTQ_ENTER(dtqid)
+#endif /* LOG_INI_DTQ_ENTER */
+
+#ifndef LOG_INI_DTQ_LEAVE
+#define LOG_INI_DTQ_LEAVE(ercd)
+#endif /* LOG_INI_DTQ_LEAVE */
+
+#ifndef LOG_REF_DTQ_ENTER
+#define LOG_REF_DTQ_ENTER(dtqid, pk_rdtq)
+#endif /* LOG_REF_DTQ_ENTER */
+
+#ifndef LOG_REF_DTQ_LEAVE
+#define LOG_REF_DTQ_LEAVE(ercd, pk_rdtq)
+#endif /* LOG_REF_DTQ_LEAVE */
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã®æ°
+ */
+#define tnum_dtq	((uint_t)(tmax_dtqid - TMIN_DTQID + 1))
+#define tnum_sdtq	((uint_t)(tmax_sdtqid - TMIN_DTQID + 1))
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼IDãããã¼ã¿ã­ã¥ã¼ç®¡çãã­ãã¯ãåãåºãããã®ãã¯ã­
+ */
+#define INDEX_DTQ(dtqid)	((uint_t)((dtqid) - TMIN_DTQID))
+#define get_dtqcb(dtqid)	(&(dtqcb_table[INDEX_DTQ(dtqid)]))
+
+#ifdef TOPPERS_dtqini
+
+/*
+ *  ä½¿ç¨ãã¦ããªããã¼ã¿ã­ã¥ã¼ç®¡çãã­ãã¯ã®ãªã¹ã
+ */
+QUEUE	free_dtqcb;
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼æ©è½ã®åæå
+ */
+void
+initialize_dataqueue(void)
+{
+	uint_t	i, j;
+	DTQCB	*p_dtqcb;
+	DTQINIB	*p_dtqinib;
+
+	for (i = 0; i < tnum_sdtq; i++) {
+		p_dtqcb = &(dtqcb_table[i]);
+		queue_initialize(&(p_dtqcb->swait_queue));
+		p_dtqcb->p_dtqinib = &(dtqinib_table[i]);
+		queue_initialize(&(p_dtqcb->rwait_queue));
+		p_dtqcb->count = 0U;
+		p_dtqcb->head = 0U;
+		p_dtqcb->tail = 0U;
+	}
+	queue_initialize(&free_dtqcb);
+	for (j = 0; i < tnum_dtq; i++, j++) {
+		p_dtqcb = &(dtqcb_table[i]);
+		p_dtqinib = &(adtqinib_table[j]);
+		p_dtqinib->dtqatr = TA_NOEXS;
+		p_dtqcb->p_dtqinib = ((const DTQINIB *) p_dtqinib);
+		queue_insert_prev(&free_dtqcb, &(p_dtqcb->swait_queue));
+	}
+}
+
+#endif /* TOPPERS_dtqini */
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ç®¡çé åã¸ã®ãã¼ã¿ã®æ ¼ç´
+ */
+#ifdef TOPPERS_dtqenq
+
+void
+enqueue_data(DTQCB *p_dtqcb, intptr_t data)
+{
+	(p_dtqcb->p_dtqinib->p_dtqmb + p_dtqcb->tail)->data = data;
+	p_dtqcb->count++;
+	p_dtqcb->tail++;
+	if (p_dtqcb->tail >= p_dtqcb->p_dtqinib->dtqcnt) {
+		p_dtqcb->tail = 0U;
+	}
+}
+
+#endif /* TOPPERS_dtqenq */
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ç®¡çé åã¸ã®ãã¼ã¿ã®å¼·å¶æ ¼ç´
+ */
+#ifdef TOPPERS_dtqfenq
+
+void
+force_enqueue_data(DTQCB *p_dtqcb, intptr_t data)
+{
+	(p_dtqcb->p_dtqinib->p_dtqmb + p_dtqcb->tail)->data = data;
+	p_dtqcb->tail++;
+	if (p_dtqcb->tail >= p_dtqcb->p_dtqinib->dtqcnt) {
+		p_dtqcb->tail = 0U;
+	}
+	if (p_dtqcb->count < p_dtqcb->p_dtqinib->dtqcnt) {
+		p_dtqcb->count++;
+	}
+	else {
+		p_dtqcb->head = p_dtqcb->tail;
+	}
+}
+
+#endif /* TOPPERS_dtqfenq */
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ç®¡çé åããã®ãã¼ã¿ã®ååºã
+ */
+#ifdef TOPPERS_dtqdeq
+
+void
+dequeue_data(DTQCB *p_dtqcb, intptr_t *p_data)
+{
+	*p_data = (p_dtqcb->p_dtqinib->p_dtqmb + p_dtqcb->head)->data;
+	p_dtqcb->count--;
+	p_dtqcb->head++;
+	if (p_dtqcb->head >= p_dtqcb->p_dtqinib->dtqcnt) {
+		p_dtqcb->head = 0U;
+	}
+}
+
+#endif /* TOPPERS_dtqdeq */
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã¸ã®ãã¼ã¿éä¿¡
+ */
+#ifdef TOPPERS_dtqsnd
+
+bool_t
+send_data(DTQCB *p_dtqcb, intptr_t data)
+{
+	TCB		*p_tcb;
+
+	if (!queue_empty(&(p_dtqcb->rwait_queue))) {
+		p_tcb = (TCB *) queue_delete_next(&(p_dtqcb->rwait_queue));
+		((WINFO_RDTQ *)(p_tcb->p_winfo))->data = data;
+		wait_complete(p_tcb);
+		return(true);
+	}
+	else if (p_dtqcb->count < p_dtqcb->p_dtqinib->dtqcnt) {
+		enqueue_data(p_dtqcb, data);
+		return(true);
+	}
+	else {
+		return(false);
+	}
+}
+
+#endif /* TOPPERS_dtqsnd */
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã¸ã®ãã¼ã¿å¼·å¶éä¿¡
+ */
+#ifdef TOPPERS_dtqfsnd
+
+void
+force_send_data(DTQCB *p_dtqcb, intptr_t data)
+{
+	TCB		*p_tcb;
+
+	if (!queue_empty(&(p_dtqcb->rwait_queue))) {
+		p_tcb = (TCB *) queue_delete_next(&(p_dtqcb->rwait_queue));
+		((WINFO_RDTQ *)(p_tcb->p_winfo))->data = data;
+		wait_complete(p_tcb);
+	}
+	else {
+		force_enqueue_data(p_dtqcb, data);
+	}
+}
+
+#endif /* TOPPERS_dtqfsnd */
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ããã®ãã¼ã¿åä¿¡
+ */
+#ifdef TOPPERS_dtqrcv
+
+bool_t
+receive_data(DTQCB *p_dtqcb, intptr_t *p_data)
+{
+	TCB		*p_tcb;
+	intptr_t data;
+
+	if (p_dtqcb->count > 0U) {
+		dequeue_data(p_dtqcb, p_data);
+		if (!queue_empty(&(p_dtqcb->swait_queue))) {
+			p_tcb = (TCB *) queue_delete_next(&(p_dtqcb->swait_queue));
+			data = ((WINFO_SDTQ *)(p_tcb->p_winfo))->data;
+			enqueue_data(p_dtqcb, data);
+			wait_complete(p_tcb);
+		}
+		return(true);
+	}
+	else if (!queue_empty(&(p_dtqcb->swait_queue))) {
+		p_tcb = (TCB *) queue_delete_next(&(p_dtqcb->swait_queue));
+		*p_data = ((WINFO_SDTQ *)(p_tcb->p_winfo))->data;
+		wait_complete(p_tcb);
+		return(true);
+	}
+	else {
+		return(false);
+	}
+}
+
+#endif /* TOPPERS_dtqrcv */
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã®çæ
+ */
+#ifdef TOPPERS_acre_dtq
+
+ER_UINT
+acre_dtq(const T_CDTQ *pk_cdtq)
+{
+	DTQCB		*p_dtqcb;
+	DTQINIB		*p_dtqinib;
+	ATR			dtqatr;
+	uint_t		dtqcnt;
+	DTQMB		*p_dtqmb;
+	ER			ercd;
+
+	LOG_ACRE_DTQ_ENTER(pk_cdtq);
+	CHECK_TSKCTX_UNL();
+
+	dtqatr = pk_cdtq->dtqatr;
+	dtqcnt = pk_cdtq->dtqcnt;
+	p_dtqmb = pk_cdtq->dtqmb;
+
+	CHECK_RSATR(dtqatr, TA_TPRI);
+
+	lock_cpu();
+	if (tnum_dtq == 0 || queue_empty(&free_dtqcb)) {
+		ercd = E_NOID;
+	}
+	else {
+		if (dtqcnt != 0 && p_dtqmb == NULL) {
+			p_dtqmb = kernel_malloc(sizeof(DTQMB) * dtqcnt);
+			dtqatr |= TA_MBALLOC;
+		}
+		if (dtqcnt != 0 && p_dtqmb == NULL) {
+			ercd = E_NOMEM;
+		}
+		else {
+			p_dtqcb = ((DTQCB *) queue_delete_next(&free_dtqcb));
+			p_dtqinib = (DTQINIB *)(p_dtqcb->p_dtqinib);
+			p_dtqinib->dtqatr = dtqatr;
+			p_dtqinib->dtqcnt = dtqcnt;
+			p_dtqinib->p_dtqmb = p_dtqmb;
+
+			queue_initialize(&(p_dtqcb->swait_queue));
+			queue_initialize(&(p_dtqcb->rwait_queue));
+			p_dtqcb->count = 0U;
+			p_dtqcb->head = 0U;
+			p_dtqcb->tail = 0U;
+			ercd = DTQID(p_dtqcb);
+		}
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_ACRE_DTQ_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_acre_dtq */
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã®åé¤
+ */
+#ifdef TOPPERS_del_dtq
+
+ER
+del_dtq(ID dtqid)
+{
+	DTQCB	*p_dtqcb;
+	DTQINIB	*p_dtqinib;
+	ER		ercd;
+
+	LOG_DEL_DTQ_ENTER(dtqid);
+	CHECK_TSKCTX_UNL();
+	CHECK_PAR(VALID_DTQID(dtqid));
+	p_dtqcb = get_dtqcb(dtqid);
+
+	lock_cpu();
+	if (p_dtqcb->p_dtqinib->dtqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (dtqid <= tmax_sdtqid) {
+		ercd = E_OBJ;
+	}
+	else {
+		init_wait_queue(&(p_dtqcb->swait_queue));
+		init_wait_queue(&(p_dtqcb->rwait_queue));
+		p_dtqinib = (DTQINIB *)(p_dtqcb->p_dtqinib);
+		if ((p_dtqinib->dtqatr & TA_MBALLOC) != 0U) {
+			kernel_free(p_dtqinib->p_dtqmb);
+		}
+		p_dtqinib->dtqatr = TA_NOEXS;
+		queue_insert_prev(&free_dtqcb, &(p_dtqcb->swait_queue));
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_DEL_DTQ_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_del_dtq */
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
+ */
+#ifdef TOPPERS_snd_dtq
+
+ER
+snd_dtq(ID dtqid, intptr_t data)
+{
+	DTQCB	*p_dtqcb;
+	WINFO_SDTQ winfo_sdtq;
+	ER		ercd;
+
+	LOG_SND_DTQ_ENTER(dtqid, data);
+	CHECK_DISPATCH();
+	CHECK_ID(VALID_DTQID(dtqid));
+	p_dtqcb = get_dtqcb(dtqid);
+
+	lock_cpu_dsp();
+	if (p_dtqcb->p_dtqinib->dtqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else if (send_data(p_dtqcb, data)) {
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	else {
+		winfo_sdtq.data = data;
+		p_runtsk->tstat = TS_WAITING_SDTQ;
+		wobj_make_wait((WOBJCB *) p_dtqcb, (WINFO_WOBJ *) &winfo_sdtq);
+		dispatch();
+		ercd = winfo_sdtq.winfo.wercd;
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_SND_DTQ_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_snd_dtq */
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ï¼ãã¼ãªã³ã°ï¼
+ */
+#ifdef TOPPERS_psnd_dtq
+
+ER
+psnd_dtq(ID dtqid, intptr_t data)
+{
+	DTQCB	*p_dtqcb;
+	ER		ercd;
+
+	LOG_PSND_DTQ_ENTER(dtqid, data);
+	CHECK_UNL();
+	CHECK_ID(VALID_DTQID(dtqid));
+	p_dtqcb = get_dtqcb(dtqid);
+
+	lock_cpu();
+	if (p_dtqcb->p_dtqinib->dtqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (send_data(p_dtqcb, data)) {
+		if (p_runtsk != p_schedtsk) {
+			if (!sense_context()) {
+				dispatch();
+			}
+			else {
+				request_dispatch();
+			}
+		}
+		ercd = E_OK;
+	}
+	else {
+		ercd = E_TMOUT;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_PSND_DTQ_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_psnd_dtq */
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ï¼ã¿ã¤ã ã¢ã¦ãããï¼
+ */
+#ifdef TOPPERS_tsnd_dtq
+
+ER
+tsnd_dtq(ID dtqid, intptr_t data, TMO tmout)
+{
+	DTQCB	*p_dtqcb;
+	WINFO_SDTQ winfo_sdtq;
+	TMEVTB	tmevtb;
+	ER		ercd;
+
+	LOG_TSND_DTQ_ENTER(dtqid, data, tmout);
+	CHECK_DISPATCH();
+	CHECK_ID(VALID_DTQID(dtqid));
+	CHECK_PAR(VALID_TMOUT(tmout));
+	p_dtqcb = get_dtqcb(dtqid);
+
+	lock_cpu_dsp();
+	if (p_dtqcb->p_dtqinib->dtqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else if (send_data(p_dtqcb, data)) {
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	else if (tmout == TMO_POL) {
+		ercd = E_TMOUT;
+	}
+	else {
+		winfo_sdtq.data = data;
+		p_runtsk->tstat = TS_WAITING_SDTQ;
+		wobj_make_wait_tmout((WOBJCB *) p_dtqcb, (WINFO_WOBJ *) &winfo_sdtq,
+														&tmevtb, tmout);
+		dispatch();
+		ercd = winfo_sdtq.winfo.wercd;
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_TSND_DTQ_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_tsnd_dtq */
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã¸ã®å¼·å¶éä¿¡
+ */
+#ifdef TOPPERS_fsnd_dtq
+
+ER
+fsnd_dtq(ID dtqid, intptr_t data)
+{
+	DTQCB	*p_dtqcb;	
+	ER		ercd;
+
+	LOG_FSND_DTQ_ENTER(dtqid, data);
+	CHECK_UNL();
+	CHECK_ID(VALID_DTQID(dtqid));
+	p_dtqcb = get_dtqcb(dtqid);
+	CHECK_ILUSE(p_dtqcb->p_dtqinib->dtqcnt > 0U);
+
+	lock_cpu();
+	if (p_dtqcb->p_dtqinib->dtqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		force_send_data(p_dtqcb, data);
+		if (p_runtsk != p_schedtsk) {
+			if (!sense_context()) {
+				dispatch();
+			}
+			else {
+				request_dispatch();
+			}
+		}
+	}
+	ercd = E_OK;
+	unlock_cpu();
+
+  error_exit:
+	LOG_FSND_DTQ_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_fsnd_dtq */
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ããã®åä¿¡
+ */
+#ifdef TOPPERS_rcv_dtq
+
+ER
+rcv_dtq(ID dtqid, intptr_t *p_data)
+{
+	DTQCB	*p_dtqcb;
+	WINFO_RDTQ winfo_rdtq;
+	ER		ercd;
+
+	LOG_RCV_DTQ_ENTER(dtqid, p_data);
+	CHECK_DISPATCH();
+	CHECK_ID(VALID_DTQID(dtqid));
+	p_dtqcb = get_dtqcb(dtqid);
+
+	lock_cpu_dsp();
+	if (p_dtqcb->p_dtqinib->dtqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else if (receive_data(p_dtqcb, p_data)) {
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	else {
+		p_runtsk->tstat = TS_WAITING_RDTQ;
+		make_wait(&(winfo_rdtq.winfo));
+		queue_insert_prev(&(p_dtqcb->rwait_queue), &(p_runtsk->task_queue));
+		winfo_rdtq.p_dtqcb = p_dtqcb;
+		LOG_TSKSTAT(p_runtsk);
+		dispatch();
+		ercd = winfo_rdtq.winfo.wercd;
+		if (ercd == E_OK) {
+			*p_data = winfo_rdtq.data;
+		}
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_RCV_DTQ_LEAVE(ercd, p_data);
+	return(ercd);
+}
+
+#endif /* TOPPERS_rcv_dtq */
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ããã®åä¿¡ï¼ãã¼ãªã³ã°ï¼
+ */
+#ifdef TOPPERS_prcv_dtq
+
+ER
+prcv_dtq(ID dtqid, intptr_t *p_data)
+{
+	DTQCB	*p_dtqcb;
+	ER		ercd;
+
+	LOG_PRCV_DTQ_ENTER(dtqid, p_data);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_DTQID(dtqid));
+	p_dtqcb = get_dtqcb(dtqid);
+
+	lock_cpu();
+	if (p_dtqcb->p_dtqinib->dtqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (receive_data(p_dtqcb, p_data)) {
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	else {
+		ercd = E_TMOUT;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_PRCV_DTQ_LEAVE(ercd, p_data);
+	return(ercd);
+}
+
+#endif /* TOPPERS_prcv_dtq */
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ããã®åä¿¡ï¼ã¿ã¤ã ã¢ã¦ãããï¼
+ */
+#ifdef TOPPERS_trcv_dtq
+
+ER
+trcv_dtq(ID dtqid, intptr_t *p_data, TMO tmout)
+{
+	DTQCB	*p_dtqcb;
+	WINFO_RDTQ winfo_rdtq;
+	TMEVTB	tmevtb;
+	ER		ercd;
+
+	LOG_TRCV_DTQ_ENTER(dtqid, p_data, tmout);
+	CHECK_DISPATCH();
+	CHECK_ID(VALID_DTQID(dtqid));
+	CHECK_PAR(VALID_TMOUT(tmout));
+	p_dtqcb = get_dtqcb(dtqid);
+
+	lock_cpu_dsp();
+	if (p_dtqcb->p_dtqinib->dtqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else if (receive_data(p_dtqcb, p_data)) {
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	else if (tmout == TMO_POL) {
+		ercd = E_TMOUT;
+	}
+	else {
+		p_runtsk->tstat = TS_WAITING_RDTQ;
+		make_wait_tmout(&(winfo_rdtq.winfo), &tmevtb, tmout);
+		queue_insert_prev(&(p_dtqcb->rwait_queue), &(p_runtsk->task_queue));
+		winfo_rdtq.p_dtqcb = p_dtqcb;
+		LOG_TSKSTAT(p_runtsk);
+		dispatch();
+		ercd = winfo_rdtq.winfo.wercd;
+		if (ercd == E_OK) {
+			*p_data = winfo_rdtq.data;
+		}
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_TRCV_DTQ_LEAVE(ercd, p_data);
+	return(ercd);
+}
+
+#endif /* TOPPERS_trcv_dtq */
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã®ååæå
+ */
+#ifdef TOPPERS_ini_dtq
+
+ER
+ini_dtq(ID dtqid)
+{
+	DTQCB	*p_dtqcb;
+	ER		ercd;
+    
+	LOG_INI_DTQ_ENTER(dtqid);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_DTQID(dtqid));
+	p_dtqcb = get_dtqcb(dtqid);
+
+	lock_cpu();
+	if (p_dtqcb->p_dtqinib->dtqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		init_wait_queue(&(p_dtqcb->swait_queue));
+		init_wait_queue(&(p_dtqcb->rwait_queue));
+		p_dtqcb->count = 0U;
+		p_dtqcb->head = 0U;
+		p_dtqcb->tail = 0U;
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_INI_DTQ_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ini_dtq */
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã®ç¶æ
+åç
+§
+ */
+#ifdef TOPPERS_ref_dtq
+
+ER
+ref_dtq(ID dtqid, T_RDTQ *pk_rdtq)
+{
+	DTQCB	*p_dtqcb;
+	ER		ercd;
+    
+	LOG_REF_DTQ_ENTER(dtqid, pk_rdtq);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_DTQID(dtqid));
+	p_dtqcb = get_dtqcb(dtqid);
+
+	lock_cpu();
+	if (p_dtqcb->p_dtqinib->dtqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		pk_rdtq->stskid = wait_tskid(&(p_dtqcb->swait_queue));
+		pk_rdtq->rtskid = wait_tskid(&(p_dtqcb->rwait_queue));
+		pk_rdtq->sdtqcnt = p_dtqcb->count;
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_REF_DTQ_LEAVE(ercd, pk_rdtq);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ref_dtq */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/dataqueue.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/dataqueue.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/dataqueue.h	(revision 270)
@@ -0,0 +1,205 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ãã¼ã¿ã­ã¥ã¼æ©è½
+ */
+
+#ifndef TOPPERS_DATAQUEUE_H
+#define TOPPERS_DATAQUEUE_H
+
+#include "kernel_impl.h"
+#include <queue.h>
+#include "wait.h"
+
+/*
+ *  ãã¼ã¿ç®¡çãã­ãã¯
+ */
+typedef struct data_management_block {
+	intptr_t	data;			/* ãã¼ã¿æ¬ä½ */
+} DTQMB;
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼åæåãã­ãã¯
+ *
+ *  ãã®æ§é ä½ã¯ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®åæåãã­ãã¯ã®å
+±éé¨å
+ *  ï¼WOBJINIBï¼ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ï¼
+ *  æåã®ãã£ã¼ã«ããå
+±éã«ãªã£ã¦ããï¼
+ */
+typedef struct dataqueue_initialization_block {
+	ATR			dtqatr;			/* ãã¼ã¿ã­ã¥ã¼å±æ§ */
+	uint_t		dtqcnt;			/* ãã¼ã¿ã­ã¥ã¼ã®å®¹é */
+	DTQMB		*p_dtqmb;		/* ãã¼ã¿ã­ã¥ã¼ç®¡çé åã®å
+é ­çªå° */
+} DTQINIB;
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ç®¡çãã­ãã¯
+ *
+ *  ãã®æ§é ä½ã¯ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®ç®¡çãã­ãã¯ã®å
+±éé¨åï¼WOBJCBï¼
+ *  ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ï¼æåã®2ã¤ã®
+ *  ãã£ã¼ã«ããå
+±éã«ãªã£ã¦ããï¼
+ */
+typedef struct dataqueue_control_block {
+	QUEUE		swait_queue;	/* ãã¼ã¿ã­ã¥ã¼éä¿¡å¾
+ã¡ã­ã¥ã¼ */
+	const DTQINIB *p_dtqinib;	/* åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	QUEUE		rwait_queue;	/* ãã¼ã¿ã­ã¥ã¼åä¿¡å¾
+ã¡ã­ã¥ã¼ */
+	uint_t		count;			/* ãã¼ã¿ã­ã¥ã¼ä¸­ã®ãã¼ã¿ã®æ° */
+	uint_t		head;			/* æåã®ãã¼ã¿ã®æ ¼ç´å ´æ */
+	uint_t		tail;			/* æå¾ã®ãã¼ã¿ã®æ ¼ç´å ´æã®æ¬¡ */
+} DTQCB;
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼å¾
+ã¡æ
+å ±ãã­ãã¯ã®å®ç¾©
+ *
+ *  ãã®æ§é ä½ã¯ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®å¾
+ã¡æ
+å ±ãã­ãã¯ã®å
+±éé¨å
+ *  ï¼WINFO_WOBJï¼ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ï¼
+ *  æåã®2ã¤ã®ãã£ã¼ã«ããå
+±éã«ãªã£ã¦ããï¼
+ */
+typedef struct dataqueue_send_waiting_information {
+	WINFO		winfo;			/* æ¨æºã®å¾
+ã¡æ
+å ±ãã­ãã¯ */
+	DTQCB		*p_dtqcb;		/* å¾
+ã£ã¦ãããã¼ã¿ã­ã¥ã¼ã®ç®¡çãã­ãã¯ */
+	intptr_t	data;			/* éä¿¡ãã¼ã¿ */
+} WINFO_SDTQ;
+
+typedef struct dataqueue_receive_waiting_information {
+	WINFO		winfo;			/* æ¨æºã®å¾
+ã¡æ
+å ±ãã­ãã¯ */
+	DTQCB		*p_dtqcb;		/* å¾
+ã£ã¦ãããã¼ã¿ã­ã¥ã¼ã®ç®¡çãã­ãã¯ */
+	intptr_t	data;			/* åä¿¡ãã¼ã¿ */
+} WINFO_RDTQ;
+
+/*
+ *  ä½¿ç¨ãã¦ããªããã¼ã¿ã­ã¥ã¼ç®¡çãã­ãã¯ã®ãªã¹ã
+ */
+extern QUEUE	free_dtqcb;
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼IDã®æå¤§å¤ï¼kernel_cfg.cï¼
+ */
+extern const ID	tmax_dtqid;
+extern const ID	tmax_sdtqid;
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼åæåãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern const DTQINIB	dtqinib_table[];
+extern DTQINIB			adtqinib_table[];
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ç®¡çãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern DTQCB	dtqcb_table[];
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ç®¡çãã­ãã¯ãããã¼ã¿ã­ã¥ã¼IDãåãåºãããã®ãã¯ã­
+ */
+#define	DTQID(p_dtqcb)	((ID)(((p_dtqcb) - dtqcb_table) + TMIN_DTQID))
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼æ©è½ã®åæå
+ */
+extern void	initialize_dataqueue(void);
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ç®¡çé åã¸ã®ãã¼ã¿ã®æ ¼ç´
+ */
+extern void	enqueue_data(DTQCB *p_dtqcb, intptr_t data);
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ç®¡çé åã¸ã®ãã¼ã¿ã®å¼·å¶æ ¼ç´
+ */
+extern void	force_enqueue_data(DTQCB *p_dtqcb, intptr_t data);
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ç®¡çé åããã®ãã¼ã¿ã®ååºã
+ */
+extern void	dequeue_data(DTQCB *p_dtqcb, intptr_t *p_data);
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã¸ã®ãã¼ã¿éä¿¡
+ */
+extern bool_t	send_data(DTQCB *p_dtqcb, intptr_t data);
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã¸ã®ãã¼ã¿å¼·å¶éä¿¡
+ */
+extern void	force_send_data(DTQCB *p_dtqcb, intptr_t data);
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ããã®ãã¼ã¿åä¿¡
+ */
+extern bool_t	receive_data(DTQCB *p_dtqcb, intptr_t *p_data);
+
+#endif /* TOPPERS_DATAQUEUE_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/dataqueue.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/dataqueue.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/dataqueue.trb	(revision 270)
@@ -0,0 +1,103 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: dataqueue.trb 668 2016-03-03 13:57:53Z ertl-hiro $
+# 
+
+#
+#		ãã¼ã¿ã­ã¥ã¼æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class DataqueueObject < KernelObject
+  def initialize()
+    super("dtq", "dataqueue")
+  end
+
+  def prepare(key, params)
+    # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+    params[:dtqmb] ||= "NULL"
+
+    # dtqatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1669ï¼½
+    #ï¼TA_TPRIä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+    if (params[:dtqatr] & ~($TA_TPRI)) != 0
+      error_illegal_id("E_RSATR", params, :dtqatr, :dtqid)
+    end
+
+    # dtqmbãNULLã§ãªãå ´åï¼E_NOSPTï¼ï¼»ASPS0132ï¼½
+    if params[:dtqmb] != "NULL"
+      error_illegal_id("E_NOSPT", params, :dtqmb, :dtqid)
+    end
+
+    # ãã¼ã¿ã­ã¥ã¼ç®¡çé å
+    if params[:dtqcnt] > 0
+      dtqmbName = "_kernel_dtqmb_#{params[:dtqid]}"
+      $kernelCfgC.add("static DTQMB #{dtqmbName}[#{params[:dtqcnt]}];")
+      params[:dtqinib_dtqmb] = dtqmbName
+    else
+      params[:dtqinib_dtqmb] = "NULL"
+    end
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:dtqatr]}), (#{params[:dtqcnt]}), " \
+										"#{params[:dtqinib_dtqmb]}")
+  end
+end
+
+#
+#  ãã¼ã¿ã­ã¥ã¼ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Dataqueue Functions")
+DataqueueObject.new.generate()
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/eventflag.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/eventflag.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/eventflag.c	(revision 270)
@@ -0,0 +1,621 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã¤ãã³ããã©ã°æ©è½
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+#include "wait.h"
+#include "eventflag.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_ACRE_FLG_ENTER
+#define LOG_ACRE_FLG_ENTER(pk_cflg)
+#endif /* LOG_ACRE_FLG_ENTER */
+
+#ifndef LOG_ACRE_FLG_LEAVE
+#define LOG_ACRE_FLG_LEAVE(ercd)
+#endif /* LOG_ACRE_FLG_LEAVE */
+
+#ifndef LOG_DEL_FLG_ENTER
+#define LOG_DEL_FLG_ENTER(flgid)
+#endif /* LOG_DEL_FLG_ENTER */
+
+#ifndef LOG_DEL_FLG_LEAVE
+#define LOG_DEL_FLG_LEAVE(ercd)
+#endif /* LOG_DEL_FLG_LEAVE */
+
+#ifndef LOG_SET_FLG_ENTER
+#define LOG_SET_FLG_ENTER(flgid, setptn)
+#endif /* LOG_SET_FLG_ENTER */
+
+#ifndef LOG_SET_FLG_LEAVE
+#define LOG_SET_FLG_LEAVE(ercd)
+#endif /* LOG_SET_FLG_LEAVE */
+
+#ifndef LOG_CLR_FLG_ENTER
+#define LOG_CLR_FLG_ENTER(flgid, clrptn)
+#endif /* LOG_CLR_FLG_ENTER */
+
+#ifndef LOG_CLR_FLG_LEAVE
+#define LOG_CLR_FLG_LEAVE(ercd)
+#endif /* LOG_CLR_FLG_LEAVE */
+
+#ifndef LOG_WAI_FLG_ENTER
+#define LOG_WAI_FLG_ENTER(flgid, waiptn, wfmode, p_flgptn)
+#endif /* LOG_WAI_FLG_ENTER */
+
+#ifndef LOG_WAI_FLG_LEAVE
+#define LOG_WAI_FLG_LEAVE(ercd, p_flgptn)
+#endif /* LOG_WAI_FLG_LEAVE */
+
+#ifndef LOG_POL_FLG_ENTER
+#define LOG_POL_FLG_ENTER(flgid, waiptn, wfmode, p_flgptn)
+#endif /* LOG_POL_FLG_ENTER */
+
+#ifndef LOG_POL_FLG_LEAVE
+#define LOG_POL_FLG_LEAVE(ercd, p_flgptn)
+#endif /* LOG_POL_FLG_LEAVE */
+
+#ifndef LOG_TWAI_FLG_ENTER
+#define LOG_TWAI_FLG_ENTER(flgid, waiptn, wfmode, p_flgptn, tmout)
+#endif /* LOG_TWAI_FLG_ENTER */
+
+#ifndef LOG_TWAI_FLG_LEAVE
+#define LOG_TWAI_FLG_LEAVE(ercd, p_flgptn)
+#endif /* LOG_TWAI_FLG_LEAVE */
+
+#ifndef LOG_INI_FLG_ENTER
+#define LOG_INI_FLG_ENTER(flgid)
+#endif /* LOG_INI_FLG_ENTER */
+
+#ifndef LOG_INI_FLG_LEAVE
+#define LOG_INI_FLG_LEAVE(ercd)
+#endif /* LOG_INI_FLG_LEAVE */
+
+#ifndef LOG_REF_FLG_ENTER
+#define LOG_REF_FLG_ENTER(flgid, pk_rflg)
+#endif /* LOG_REF_FLG_ENTER */
+
+#ifndef LOG_REF_FLG_LEAVE
+#define LOG_REF_FLG_LEAVE(ercd, pk_rflg)
+#endif /* LOG_REF_FLG_LEAVE */
+
+/*
+ *  ã¤ãã³ããã©ã°ã®æ°
+ */
+#define tnum_flg	((uint_t)(tmax_flgid - TMIN_FLGID + 1))
+#define tnum_sflg	((uint_t)(tmax_sflgid - TMIN_FLGID + 1))
+
+/*
+ *  ã¤ãã³ããã©ã°IDããã¤ãã³ããã©ã°ç®¡çãã­ãã¯ãåãåºãããã®ãã¯ã­
+ */
+#define INDEX_FLG(flgid)	((uint_t)((flgid) - TMIN_FLGID))
+#define get_flgcb(flgid)	(&(flgcb_table[INDEX_FLG(flgid)]))
+
+#ifdef TOPPERS_flgini
+
+/*
+ *  ä½¿ç¨ãã¦ããªãã¤ãã³ããã©ã°ç®¡çãã­ãã¯ã®ãªã¹ã
+ */
+QUEUE	free_flgcb;
+
+/*
+ *  ã¤ãã³ããã©ã°æ©è½ã®åæå
+ */
+void
+initialize_eventflag(void)
+{
+	uint_t	i, j;
+	FLGCB	*p_flgcb;
+	FLGINIB	*p_flginib;
+
+	for (i = 0; i < tnum_sflg; i++) {
+		p_flgcb = &(flgcb_table[i]);
+		queue_initialize(&(p_flgcb->wait_queue));
+		p_flgcb->p_flginib = &(flginib_table[i]);
+		p_flgcb->flgptn = p_flgcb->p_flginib->iflgptn;
+	}
+	queue_initialize(&free_flgcb);
+	for (j = 0; i < tnum_flg; i++, j++) {
+		p_flgcb = &(flgcb_table[i]);
+		p_flginib = &(aflginib_table[j]);
+		p_flginib->flgatr = TA_NOEXS;
+		p_flgcb->p_flginib = ((const FLGINIB *) p_flginib);
+		queue_insert_prev(&free_flgcb, &(p_flgcb->wait_queue));
+	}
+}
+
+#endif /* TOPPERS_flgini */
+
+/*
+ *  ã¤ãã³ããã©ã°å¾
+ã¡è§£é¤æ¡ä»¶ã®ãã§ãã¯
+ */
+#ifdef TOPPERS_flgcnd
+
+bool_t
+check_flg_cond(FLGCB *p_flgcb, FLGPTN waiptn, MODE wfmode, FLGPTN *p_flgptn)
+{
+	if ((wfmode & TWF_ORW) != 0U ? (p_flgcb->flgptn & waiptn) != 0U
+									: (p_flgcb->flgptn & waiptn) == waiptn) {
+		*p_flgptn = p_flgcb->flgptn;
+		if ((p_flgcb->p_flginib->flgatr & TA_CLR) != 0U) {
+			p_flgcb->flgptn = 0U;
+		}
+		return(true);
+	}
+	return(false);
+}
+
+#endif /* TOPPERS_flgcnd */
+
+/*
+ *  ã¤ãã³ããã©ã°ã®çæ
+ *
+ *  pk_cflg->iflgptnã¯ï¼ã¨ã©ã¼ãã§ãã¯ãããï¼ä¸åº¦ããåç
+§ããªãããï¼
+ *  ã­ã¼ã«ã«å¤æ°ã«ã³ãã¼ããå¿
+è¦ããªãï¼éä¸­ã§æ¸ãæãã£ã¦ãæ¯éããª
+ *  ãï¼ï¼
+ */
+#ifdef TOPPERS_acre_flg
+
+ER_UINT
+acre_flg(const T_CFLG *pk_cflg)
+{
+	FLGCB	*p_flgcb;
+	FLGINIB	*p_flginib;
+	ATR		flgatr;
+	ER		ercd;
+
+	LOG_ACRE_FLG_ENTER(pk_cflg);
+	CHECK_TSKCTX_UNL();
+
+	flgatr = pk_cflg->flgatr;
+
+	CHECK_RSATR(flgatr, TA_TPRI|TA_WMUL|TA_CLR);
+
+	lock_cpu();
+	if (tnum_flg == 0 || queue_empty(&free_flgcb)) {
+		ercd = E_NOID;
+	}
+	else {
+		p_flgcb = ((FLGCB *) queue_delete_next(&free_flgcb));
+		p_flginib = (FLGINIB *)(p_flgcb->p_flginib);
+		p_flginib->flgatr = flgatr;
+		p_flginib->iflgptn = pk_cflg->iflgptn;
+
+		queue_initialize(&(p_flgcb->wait_queue));
+		p_flgcb->flgptn = p_flgcb->p_flginib->iflgptn;
+		ercd = FLGID(p_flgcb);
+	}
+
+  error_exit:
+	LOG_ACRE_FLG_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_acre_flg */
+
+/*
+ *  ã¤ãã³ããã©ã°ã®åé¤
+ */
+#ifdef TOPPERS_del_flg
+
+ER
+del_flg(ID flgid)
+{
+	FLGCB	*p_flgcb;
+	FLGINIB	*p_flginib;
+	ER		ercd;
+
+	LOG_DEL_FLG_ENTER(flgid);
+	CHECK_TSKCTX_UNL();
+	CHECK_PAR(VALID_FLGID(flgid));
+	p_flgcb = get_flgcb(flgid);
+
+	lock_cpu();
+	if (p_flgcb->p_flginib->flgatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (flgid <= tmax_sflgid) {
+		ercd = E_OBJ;
+	}
+	else {
+		init_wait_queue(&(p_flgcb->wait_queue));
+		p_flginib = (FLGINIB *)(p_flgcb->p_flginib);
+ 		p_flginib->flgatr = TA_NOEXS;
+		queue_insert_prev(&free_flgcb, &(p_flgcb->wait_queue));
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_DEL_FLG_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_del_flg */
+
+/*
+ *  ã¤ãã³ããã©ã°ã®ã»ãã
+ */
+#ifdef TOPPERS_set_flg
+
+ER
+set_flg(ID flgid, FLGPTN setptn)
+{
+	FLGCB	*p_flgcb;
+	QUEUE	*p_queue;
+	TCB		*p_tcb;
+	WINFO_FLG *p_winfo_flg;
+	ER		ercd;
+
+	LOG_SET_FLG_ENTER(flgid, setptn);
+	CHECK_UNL();
+	CHECK_ID(VALID_FLGID(flgid));
+	p_flgcb = get_flgcb(flgid);
+
+	lock_cpu();
+	if (p_flgcb->p_flginib->flgatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		p_flgcb->flgptn |= setptn;
+		p_queue = p_flgcb->wait_queue.p_next;
+		while (p_queue != &(p_flgcb->wait_queue)) {
+			p_tcb = (TCB *) p_queue;
+			p_queue = p_queue->p_next;
+			p_winfo_flg = (WINFO_FLG *)(p_tcb->p_winfo);
+			if (check_flg_cond(p_flgcb, p_winfo_flg->waiptn,
+							p_winfo_flg->wfmode, &(p_winfo_flg->waiptn))) {
+				queue_delete(&(p_tcb->task_queue));
+				wait_complete(p_tcb);
+				if ((p_flgcb->p_flginib->flgatr & TA_CLR) != 0U) {
+					break;
+				}
+			}
+		}
+		if (p_runtsk != p_schedtsk) {
+			if (!sense_context()) {
+				dispatch();
+			}
+			else {
+				request_dispatch();
+			}
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_SET_FLG_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_set_flg */
+
+/*
+ *  ã¤ãã³ããã©ã°ã®ã¯ãªã¢
+ */
+#ifdef TOPPERS_clr_flg
+
+ER
+clr_flg(ID flgid, FLGPTN clrptn)
+{
+	FLGCB	*p_flgcb;
+	ER		ercd;
+
+	LOG_CLR_FLG_ENTER(flgid, clrptn);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_FLGID(flgid));
+	p_flgcb = get_flgcb(flgid);
+
+	lock_cpu();
+	if (p_flgcb->p_flginib->flgatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		p_flgcb->flgptn &= clrptn; 
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_CLR_FLG_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_clr_flg */
+
+/*
+ *  ã¤ãã³ããã©ã°å¾
+ã¡
+ */
+#ifdef TOPPERS_wai_flg
+
+ER
+wai_flg(ID flgid, FLGPTN waiptn, MODE wfmode, FLGPTN *p_flgptn)
+{
+	FLGCB	*p_flgcb;
+	WINFO_FLG winfo_flg;
+	ER		ercd;
+
+	LOG_WAI_FLG_ENTER(flgid, waiptn, wfmode, p_flgptn);
+	CHECK_DISPATCH();
+	CHECK_ID(VALID_FLGID(flgid));
+	CHECK_PAR(waiptn != 0U);
+	CHECK_PAR(wfmode == TWF_ORW || wfmode == TWF_ANDW);
+	p_flgcb = get_flgcb(flgid);
+
+	lock_cpu_dsp();
+	if (p_flgcb->p_flginib->flgatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else if ((p_flgcb->p_flginib->flgatr & TA_WMUL) == 0U
+					&& !queue_empty(&(p_flgcb->wait_queue))) {
+		ercd = E_ILUSE;
+	}
+	else if (check_flg_cond(p_flgcb, waiptn, wfmode, p_flgptn)) {
+		ercd = E_OK;
+	}
+	else {
+		winfo_flg.waiptn = waiptn;
+		winfo_flg.wfmode = wfmode;
+		p_runtsk->tstat = TS_WAITING_FLG;
+		wobj_make_wait((WOBJCB *) p_flgcb, (WINFO_WOBJ *) &winfo_flg);
+		dispatch();
+		ercd = winfo_flg.winfo.wercd;
+		if (ercd == E_OK) {
+			*p_flgptn = winfo_flg.waiptn;
+		}
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_WAI_FLG_LEAVE(ercd, p_flgptn);
+	return(ercd);
+}
+
+#endif /* TOPPERS_wai_flg */
+
+/*
+ *  ã¤ãã³ããã©ã°å¾
+ã¡ï¼ãã¼ãªã³ã°ï¼
+ */
+#ifdef TOPPERS_pol_flg
+
+ER
+pol_flg(ID flgid, FLGPTN waiptn, MODE wfmode, FLGPTN *p_flgptn)
+{
+	FLGCB	*p_flgcb;
+	ER		ercd;
+
+	LOG_POL_FLG_ENTER(flgid, waiptn, wfmode, p_flgptn);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_FLGID(flgid));
+	CHECK_PAR(waiptn != 0U);
+	CHECK_PAR(wfmode == TWF_ORW || wfmode == TWF_ANDW);
+	p_flgcb = get_flgcb(flgid);
+
+	lock_cpu();
+	if (p_flgcb->p_flginib->flgatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if ((p_flgcb->p_flginib->flgatr & TA_WMUL) == 0U
+					&& !queue_empty(&(p_flgcb->wait_queue))) {
+		ercd = E_ILUSE;
+	}
+	else if (check_flg_cond(p_flgcb, waiptn, wfmode, p_flgptn)) {
+		ercd = E_OK;
+	}
+	else {
+		ercd = E_TMOUT;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_POL_FLG_LEAVE(ercd, p_flgptn);
+	return(ercd);
+}
+
+#endif /* TOPPERS_pol_flg */
+
+/*
+ *  ã¤ãã³ããã©ã°å¾
+ã¡ï¼ã¿ã¤ã ã¢ã¦ãããï¼
+ */
+#ifdef TOPPERS_twai_flg
+
+ER
+twai_flg(ID flgid, FLGPTN waiptn, MODE wfmode, FLGPTN *p_flgptn, TMO tmout)
+{
+	FLGCB	*p_flgcb;
+	WINFO_FLG winfo_flg;
+	TMEVTB	tmevtb;
+	ER		ercd;
+
+	LOG_TWAI_FLG_ENTER(flgid, waiptn, wfmode, p_flgptn, tmout);
+	CHECK_DISPATCH();
+	CHECK_ID(VALID_FLGID(flgid));
+	CHECK_PAR(waiptn != 0U);
+	CHECK_PAR(wfmode == TWF_ORW || wfmode == TWF_ANDW);
+	CHECK_PAR(VALID_TMOUT(tmout));
+	p_flgcb = get_flgcb(flgid);
+
+	lock_cpu_dsp();
+	if (p_flgcb->p_flginib->flgatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else if ((p_flgcb->p_flginib->flgatr & TA_WMUL) == 0U
+					&& !queue_empty(&(p_flgcb->wait_queue))) {
+		ercd = E_ILUSE;
+	}
+	else if (check_flg_cond(p_flgcb, waiptn, wfmode, p_flgptn)) {
+		ercd = E_OK;
+	}
+	else if (tmout == TMO_POL) {
+		ercd = E_TMOUT;
+	}
+	else {
+		winfo_flg.waiptn = waiptn;
+		winfo_flg.wfmode = wfmode;
+		p_runtsk->tstat = TS_WAITING_FLG;
+		wobj_make_wait_tmout((WOBJCB *) p_flgcb, (WINFO_WOBJ *) &winfo_flg,
+														&tmevtb, tmout);
+		dispatch();
+		ercd = winfo_flg.winfo.wercd;
+		if (ercd == E_OK) {
+			*p_flgptn = winfo_flg.waiptn;
+		}
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_TWAI_FLG_LEAVE(ercd, p_flgptn);
+	return(ercd);
+}
+
+#endif /* TOPPERS_twai_flg */
+
+/*
+ *  ã¤ãã³ããã©ã°ã®ååæå
+ */
+#ifdef TOPPERS_ini_flg
+
+ER
+ini_flg(ID flgid)
+{
+	FLGCB	*p_flgcb;
+	ER		ercd;
+    
+	LOG_INI_FLG_ENTER(flgid);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_FLGID(flgid));
+	p_flgcb = get_flgcb(flgid);
+
+	lock_cpu();
+	if (p_flgcb->p_flginib->flgatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		init_wait_queue(&(p_flgcb->wait_queue));
+		p_flgcb->flgptn = p_flgcb->p_flginib->iflgptn;
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_INI_FLG_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ini_flg */
+
+/*
+ *  ã¤ãã³ããã©ã°ã®ç¶æ
+åç
+§
+ */
+#ifdef TOPPERS_ref_flg
+
+ER
+ref_flg(ID flgid, T_RFLG *pk_rflg)
+{
+	FLGCB	*p_flgcb;
+	ER		ercd;
+    
+	LOG_REF_FLG_ENTER(flgid, pk_rflg);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_FLGID(flgid));
+	p_flgcb = get_flgcb(flgid);
+
+	lock_cpu();
+	if (p_flgcb->p_flginib->flgatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		pk_rflg->wtskid = wait_tskid(&(p_flgcb->wait_queue));
+		pk_rflg->flgptn = p_flgcb->flgptn;
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_REF_FLG_LEAVE(ercd, pk_rflg);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ref_flg */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/eventflag.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/eventflag.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/eventflag.h	(revision 270)
@@ -0,0 +1,174 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã¤ãã³ããã©ã°æ©è½
+ */
+
+#ifndef TOPPERS_EVENTFLAG_H
+#define TOPPERS_EVENTFLAG_H
+
+#include "kernel_impl.h"
+#include <queue.h>
+#include "wait.h"
+
+/*
+ *  ã¤ãã³ããã©ã°åæåãã­ãã¯
+ *
+ *  ãã®æ§é ä½ã¯ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®åæåãã­ãã¯ã®å
+±éé¨å
+ *  ï¼WOBJINIBï¼ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ï¼
+ *  æåã®ãã£ã¼ã«ããå
+±éã«ãªã£ã¦ããï¼
+ */
+typedef struct eventflag_initialization_block {
+	ATR			flgatr;			/* ã¤ãã³ããã©ã°å±æ§ */
+	FLGPTN		iflgptn;		/* ã¤ãã³ããã©ã°ã®ããããã¿ã¼ã³ã®åæå¤ */
+} FLGINIB;
+
+/*
+ *  ã¤ãã³ããã©ã°ç®¡çãã­ãã¯
+ *
+ *  ãã®æ§é ä½ã¯ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®ç®¡çãã­ãã¯ã®å
+±éé¨åï¼WOBJCBï¼
+ *  ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ï¼æåã®2ã¤ã®
+ *  ãã£ã¼ã«ããå
+±éã«ãªã£ã¦ããï¼
+ */
+typedef struct eventflag_control_block {
+	QUEUE		wait_queue;		/* ã¤ãã³ããã©ã°å¾
+ã¡ã­ã¥ã¼ */
+	const FLGINIB *p_flginib;	/* åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	FLGPTN		flgptn;			/* ã¤ãã³ããã©ã°ç¾å¨ãã¿ã¼ã³ */
+} FLGCB;
+
+/*
+ *  ã¤ãã³ããã©ã°å¾
+ã¡æ
+å ±ãã­ãã¯ã®å®ç¾©
+ *
+ *  ãã®æ§é ä½ã¯ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®å¾
+ã¡æ
+å ±ãã­ãã¯ã®å
+±éé¨å
+ *  ï¼WINFO_WOBJï¼ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ï¼
+ *  æåã®2ã¤ã®ãã£ã¼ã«ããå
+±éã«ãªã£ã¦ããï¼
+ *
+ *  waiptnã«ã¯ï¼å¾
+ã¡ç¶æ
+ã®éã¯å¾
+ã¡ãã¿ã¼ã³ãï¼å¾
+ã¡è§£é¤ãããå¾ã¯å¾
+ã¡è§£
+ *  é¤æã®ãã¿ã¼ã³ãå
+¥ããï¼1ã¤ã®ãã£ã¼ã«ãã2ã¤ã®ç®çã«å
+¼ç¨ãã¦ããï¼ï¼
+ */
+typedef struct eventflag_waiting_information {
+	WINFO		winfo;			/* æ¨æºã®å¾
+ã¡æ
+å ±ãã­ãã¯ */
+	FLGCB		*p_flgcb;		/* å¾
+ã£ã¦ããã¤ãã³ããã©ã°ã®ç®¡çãã­ãã¯ */
+	FLGPTN		waiptn;			/* å¾
+ã¡ãã¿ã¼ã³ï¼å¾
+ã¡è§£é¤æã®ãã¿ã¼ã³ */
+	MODE		wfmode;			/* å¾
+ã¡ã¢ã¼ã */
+} WINFO_FLG;
+
+/*
+ *  ä½¿ç¨ãã¦ããªãã¤ãã³ããã©ã°ç®¡çãã­ãã¯ã®ãªã¹ã
+ */
+extern QUEUE	free_flgcb;
+
+/*
+ *  ã¤ãã³ããã©ã°IDã®æå¤§å¤ï¼kernel_cfg.cï¼
+ */
+extern const ID	tmax_flgid;
+extern const ID	tmax_sflgid;
+
+/*
+ *  ã¤ãã³ããã©ã°åæåãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern const FLGINIB	flginib_table[];
+extern FLGINIB			aflginib_table[];
+
+/*
+ *  ã¤ãã³ããã©ã°ç®¡çãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern FLGCB	flgcb_table[];
+
+/*
+ *  ã¤ãã³ããã©ã°ç®¡çãã­ãã¯ããã¤ãã³ããã©ã°IDãåãåºãããã®ãã¯ã­
+ */
+#define	FLGID(p_flgcb)	((ID)(((p_flgcb) - flgcb_table) + TMIN_FLGID))
+
+/*
+ *  ã¤ãã³ããã©ã°æ©è½ã®åæå
+ */
+extern void	initialize_eventflag(void);
+
+/*
+ *  ã¤ãã³ããã©ã°å¾
+ã¡è§£é¤æ¡ä»¶ã®ãã§ãã¯
+ */
+extern bool_t	check_flg_cond(FLGCB *p_flgcb, FLGPTN waiptn,
+								MODE wfmode, FLGPTN *p_flgptn);
+
+#endif /* TOPPERS_EVENTFLAG_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/eventflag.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/eventflag.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/eventflag.trb	(revision 270)
@@ -0,0 +1,90 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: eventflag.trb 588 2016-02-05 12:54:58Z ertl-hiro $
+# 
+
+#
+#		ã¤ãã³ããã©ã°æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class EventflagObject < KernelObject
+  def initialize()
+    super("flg", "eventflag")
+  end
+
+  def prepare(key, params)
+    # flgatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1562ï¼½
+    #ï¼TA_TPRIï¼TA_WMULï¼TA_CLRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+    if (params[:flgatr] & ~($TA_TPRI|$TA_WMUL|$TA_CLR)) != 0
+      error_illegal_id("E_RSATR", params, :flgatr, :flgid)
+    end
+
+    # iflgptnãFLGPTNã«æ ¼ç´ã§ããªãå ´åï¼E_PARï¼ï¼»NGKI3275ï¼½
+    if (params[:iflgptn] & ~((1 << $TBIT_FLGPTN) - 1)) != 0
+      error_wrong_id("E_PAR", params, :iflgptn, :flgid, "too large")
+    end
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:flgatr]}), (#{params[:iflgptn]})")
+  end
+end
+
+#
+#  ã¤ãã³ããã©ã°ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Eventflag Functions")
+EventflagObject.new.generate()
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/exception.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/exception.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/exception.c	(revision 270)
@@ -0,0 +1,126 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		CPUä¾å¤ç®¡çæ©è½
+ */
+
+#include "kernel_impl.h"
+#include "task.h"
+#include "exception.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_XSNS_DPN_ENTER
+#define LOG_XSNS_DPN_ENTER(p_excinf)
+#endif /* LOG_XSNS_DPN_ENTER */
+
+#ifndef LOG_XSNS_DPN_LEAVE
+#define LOG_XSNS_DPN_LEAVE(state)
+#endif /* LOG_XSNS_DPN_LEAVE */
+
+/* 
+ *  CPUä¾å¤ãã³ãã©ç®¡çæ©è½ã®åæå
+ */
+#ifdef TOPPERS_excini
+#ifndef OMIT_INITIALIZE_EXCEPTION
+
+void
+initialize_exception(void)
+{
+	uint_t			i;
+	const EXCINIB	*p_excinib;
+
+	for (i = 0; i < tnum_def_excno; i++) {
+		p_excinib = &(excinib_table[i]);
+		define_exc(p_excinib->excno, p_excinib->exc_entry);
+	}
+}
+
+#endif /* OMIT_INITIALIZE_EXCEPTION */
+#endif /* TOPPERS_excini */
+
+/*
+ *  CPUä¾å¤ã®çºçããã³ã³ãã­ã¹ãã®åç
+§
+ */
+
+/*
+ *  CPUä¾å¤çºçæã®ãã£ã¹ãããä¿çç¶æ
+ã®åç
+§
+ *
+ *  CPUä¾å¤ãã³ãã©ä¸­ã§enadspãå¤åãããã¨ã¯ãªãããï¼CPUä¾å¤ãçºçã
+ *  ãæã®enadspãä¿å­ãã¦ããå¿
+è¦ã¯ãªãï¼
+ */
+#ifdef TOPPERS_xsns_dpn
+
+bool_t
+xsns_dpn(void *p_excinf)
+{
+	bool_t	state;
+
+	LOG_XSNS_DPN_ENTER(p_excinf);
+	state = (kerflg && exc_sense_intmask(p_excinf) && enadsp
+								&& p_runtsk != NULL) ? false : true;
+	LOG_XSNS_DPN_LEAVE(state);
+	return(state);
+}
+
+#endif /* TOPPERS_xsns_dpn */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/exception.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/exception.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/exception.h	(revision 270)
@@ -0,0 +1,96 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2007 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		CPUä¾å¤ç®¡çæ©è½
+ */
+
+#ifndef TOPPERS_EXCEPTION_H
+#define TOPPERS_EXCEPTION_H
+
+#include "kernel_impl.h"
+
+#ifndef OMIT_INITIALIZE_EXCEPTION
+
+/*
+ *  CPUä¾å¤ãã³ãã©åæåãã­ãã¯
+ */
+typedef struct cpu_exception_handler_initialization_block {
+	EXCNO		excno;			/* CPUä¾å¤ãã³ãã©çªå· */
+	ATR			excatr;			/* CPUä¾å¤ãã³ãã©å±æ§ */
+	FP			exc_entry;		/* CPUä¾å¤ãã³ãã©ã®åºå
+¥å£å¦çã®çªå° */
+} EXCINIB;
+
+/*
+ *  å®ç¾©ããCPUä¾å¤ãã³ãã©çªå·ã®æ°ï¼kernel_cfg.cï¼
+ */
+extern const uint_t	tnum_def_excno;
+
+/*
+ *  CPUä¾å¤ãã³ãã©åæåãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern const EXCINIB	excinib_table[];
+
+#endif /* OMIT_INITIALIZE_EXCEPTION */
+
+/*
+ *  CPUä¾å¤ãã³ãã©ç®¡çæ©è½ã®åæå
+ */
+extern void	initialize_exception(void);
+
+#endif /* TOPPERS_EXCEPTION_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/exception.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/exception.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/exception.trb	(revision 270)
@@ -0,0 +1,126 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: exception.trb 663 2016-02-27 04:45:50Z ertl-hiro $
+# 
+
+#
+#		CPUä¾å¤ç®¡çæ©è½ã®çæã¹ã¯ãªãã
+#
+
+#
+#  kernel_cfg.cã®çæ
+#
+$kernelCfgC.comment_header("CPU Exception Management Functions")
+
+#
+#  CPUä¾å¤ãã³ãã©ã«é¢ããã¨ã©ã¼ãã§ãã¯
+#
+$cfgData[:DEF_EXC].each do |key, params|
+  # excnoãCPUä¾å¤ãã³ãã©çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3134ï¼½
+  if $EXCNO_VALID.index(params[:excno]).nil?
+    error_illegal("E_PAR", params, :excno)
+  end
+
+  # excatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3131ï¼½
+  #ï¼TARGET_EXCATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+  if (params[:excatr] & ~($TARGET_EXCATR)) != 0
+    error_illegal_sym("E_RSATR", params, :excatr, :excno)
+  end
+end
+
+#
+#  CPUä¾å¤ãã³ãã©ã®ããã®æ¨æºçãªåæåæ
+å ±ã®çæ
+#
+if !$OMIT_INITIALIZE_EXCEPTION
+  #
+  #  å®ç¾©ããCPUä¾å¤ãã³ãã©ã®æ°
+  #
+  $kernelCfgC.add(<<EOS)
+#define TNUM_DEF_EXCNO	#{$cfgData[:DEF_EXC].size}
+const uint_t _kernel_tnum_def_excno = TNUM_DEF_EXCNO;
+EOS
+
+  if $cfgData[:DEF_EXC].size != 0
+    #
+    #  CPUä¾å¤ãã³ãã©ã®ã¨ã³ããª
+    #
+    $cfgData[:DEF_EXC].each do |key, params|
+      $kernelCfgC.add("EXCHDR_ENTRY(#{params[:excno]}, " \
+						"#{params[:excno].val}, #{params[:exchdr]})")
+    end
+    $kernelCfgC.add("")
+
+    #
+    #  CPUä¾å¤ãã³ãã©åæåãã­ãã¯
+    #
+    $kernelCfgC.add("const EXCINIB _kernel_excinib_table[TNUM_DEF_EXCNO] = {")
+    $cfgData[:DEF_EXC].each_with_index do |(key, params), index|
+      $kernelCfgC.add(",") if index > 0
+      $kernelCfgC.append("\t{ (#{params[:excno]}), (#{params[:excatr]}), " \
+				"(FP)(EXC_ENTRY(#{params[:excno]}, #{params[:exchdr]})) }")
+    end
+    $kernelCfgC.add
+    $kernelCfgC.add2("};")
+  else
+    $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(const EXCINIB, " \
+										"_kernel_excinib_table);")
+  end
+end
+
+#
+#  CPUä¾å¤ç®¡çæ©è½åæåé¢æ°ã®è¿½å 
+#
+$initializeFunctions.push("_kernel_initialize_exception();")
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/genoffset.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/genoffset.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/genoffset.trb	(revision 270)
@@ -0,0 +1,164 @@
+# -*- coding: utf-8 -*-
+# 
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2011-2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#  
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: genoffset.trb 662 2016-02-27 02:33:51Z ertl-hiro $
+# 
+
+#
+#		ãªãã»ãããã¡ã¤ã«çæç¨ã®çæã¹ã¯ãªãã
+#
+
+# 
+#  ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ã®æå®
+# 
+$timeStampFileName = "offset.timestamp"
+
+# 
+#  offset.hã®å
+é ­é¨åã®çæ
+# 
+$offsetH = GenFile.new("offset.h")
+$offsetH.add2("/* offset.h */")
+
+# 
+#  #defineãã£ã¬ã¯ãã£ãã®çæ
+# 
+def GenerateDefine(symbol, value)
+  $offsetH.add("#define #{symbol}\t#{value}")
+end
+
+# 
+#  ãããã®ãµã¼ã
+# 
+def SearchBit(val)
+  (0..7).each do |valBit|
+    if (val & 1) != 0
+      return valBit
+    end
+    val >>= 1
+  end
+end
+
+# 
+#  ããããã£ã¼ã«ãã®ãªãã»ããã¨ãããä½ç½®ã®å®ç¾©ã®çæ
+# 
+def GenerateDefineBit(label, structSize, outputSize)
+  top = SYMBOL(label)
+  if top.nil?
+    error_exit("label `#{label}' not found")
+  else
+    val = 0
+    offset = 0
+    0.upto(structSize - 1).each do |i|
+      tmpVal = PEEK(top + i, 1)
+      if tmpVal != 0
+        val = tmpVal
+        offset = i
+        break
+      end
+    end
+
+    if val == 0
+      error_exit("bit not found in `#{label}'")
+    else
+      valBit = SearchBit(val)
+      case outputSize
+      when "W"
+        if $SIL_ENDIAN_BIG
+          valBit = valBit + 24 - ((offset & 0x03) << 3)
+        else
+          valBit = valBit + ((offset & 0x03) << 3)
+        end
+        offset &= ~0x03
+      when "H"
+        if $SIL_ENDIAN_BIG
+          valBit = valBit + 8 - ((offset & 0x01) << 3)
+        else
+          valBit = valBit + ((offset & 0x01) << 3)
+        end
+        offset &= ~0x01
+      end
+    end
+
+    $offsetH.add("#define #{label}\t#{offset}")
+    $offsetH.add("#define #{label}_bit\t#{valBit}")
+    $offsetH.add("#define #{label}_mask\t#{sprintf("0x%x", 1 << valBit)}")
+  end
+end
+
+# 
+#  ãã¤ãé
+ç½®ã®ãã§ãã¯
+# 
+def magicCheck(size, check)
+  label = "MAGIC_#{size}"
+  top = SYMBOL(label)
+  if top.nil?
+    error_exit("label `#{label}' not found")
+  else
+    1.upto(size).each do |offset|
+      if $SIL_ENDIAN_BIG
+        val = PEEK(top + offset - 1, 1)
+      else
+        val = PEEK(top + size - offset, 1)
+      end
+      if val != check.at(offset - 1)
+        error_exit("value check of `#{label}' failed")
+      end
+    end
+  end
+end
+
+magicCheck(1, [ 0x12 ])
+magicCheck(2, [ 0x12, 0x34 ])
+magicCheck(4, [ 0x12, 0x34, 0x56, 0x78 ])
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/interrupt.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/interrupt.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/interrupt.c	(revision 270)
@@ -0,0 +1,529 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		å²è¾¼ã¿ç®¡çæ©è½
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+#include "interrupt.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_ISR_ENTER
+#define LOG_ISR_ENTER(isrid)
+#endif /* LOG_ISR_ENTER */
+
+#ifndef LOG_ISR_LEAVE
+#define LOG_ISR_LEAVE(isrid)
+#endif /* LOG_ISR_LEAVE */
+
+#ifndef LOG_ACRE_ISR_ENTER
+#define LOG_ACRE_ISR_ENTER(pk_cisr)
+#endif /* LOG_ACRE_ISR_ENTER */
+
+#ifndef LOG_ACRE_ISR_LEAVE
+#define LOG_ACRE_ISR_LEAVE(ercd)
+#endif /* LOG_ACRE_ISR_LEAVE */
+
+#ifndef LOG_DEL_ISR_ENTER
+#define LOG_DEL_ISR_ENTER(isrid)
+#endif /* LOG_DEL_ISR_ENTER */
+
+#ifndef LOG_DEL_ISR_LEAVE
+#define LOG_DEL_ISR_LEAVE(ercd)
+#endif /* LOG_DEL_ISR_LEAVE */
+
+#ifndef LOG_DIS_INT_ENTER
+#define LOG_DIS_INT_ENTER(intno)
+#endif /* LOG_DIS_INT_ENTER */
+
+#ifndef LOG_DIS_INT_LEAVE
+#define LOG_DIS_INT_LEAVE(ercd)
+#endif /* LOG_DIS_INT_LEAVE */
+
+#ifndef LOG_ENA_INT_ENTER
+#define LOG_ENA_INT_ENTER(intno)
+#endif /* LOG_ENA_INT_ENTER */
+
+#ifndef LOG_ENA_INT_LEAVE
+#define LOG_ENA_INT_LEAVE(ercd)
+#endif /* LOG_ENA_INT_LEAVE */
+
+#ifndef LOG_CHG_IPM_ENTER
+#define LOG_CHG_IPM_ENTER(intpri)
+#endif /* LOG_CHG_IPM_ENTER */
+
+#ifndef LOG_CHG_IPM_LEAVE
+#define LOG_CHG_IPM_LEAVE(ercd)
+#endif /* LOG_CHG_IPM_LEAVE */
+
+#ifndef LOG_GET_IPM_ENTER
+#define LOG_GET_IPM_ENTER(p_intpri)
+#endif /* LOG_GET_IPM_ENTER */
+
+#ifndef LOG_GET_IPM_LEAVE
+#define LOG_GET_IPM_LEAVE(ercd, p_intpri)
+#endif /* LOG_GET_IPM_LEAVE */
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®æ°
+ */
+#define tnum_isr	((uint_t)(tmax_isrid - TMIN_ISRID + 1))
+#define tnum_sisr	((uint_t)(tmax_sisrid - TMIN_ISRID + 1))
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³IDããå²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ç®¡çãã­ãã¯ãå
+ *  ãåºãããã®ãã¯ã­
+ */
+#define INDEX_ISR(isrid)	((uint_t)((isrid) - TMIN_ISRID))
+#define get_isrcb(isrid)	(&(isrcb_table[INDEX_ISR(isrid)]))
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã­ã¥ã¼ã¸ã®ç»é²
+ */
+Inline void
+enqueue_isr(QUEUE *p_isr_queue, ISRCB *p_isrcb)
+{
+	QUEUE	*p_entry;
+	PRI		isrpri = p_isrcb->p_isrinib->isrpri;
+
+	for (p_entry = p_isr_queue->p_next; p_entry != p_isr_queue;
+											p_entry = p_entry->p_next) {
+		if (isrpri < ((ISRCB *) p_entry)->p_isrinib->isrpri) {
+			break;
+		}
+	}
+	queue_insert_prev(p_entry, &(p_isrcb->isr_queue));
+}
+
+#ifdef TOPPERS_isrini
+
+/*
+ *  ä½¿ç¨ãã¦ããªãå²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ç®¡çãã­ãã¯ã®ãªã¹ã
+ */
+QUEUE	free_isrcb;
+
+/* 
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³æ©è½ã®åæå
+ */
+void
+initialize_isr(void)
+{
+	uint_t	i, j;
+	ISRCB	*p_isrcb;
+	ISRINIB	*p_isrinib;
+
+	for (i = 0; i < tnum_isr_queue; i++) {
+		queue_initialize(&(isr_queue_table[i]));
+	}
+	for (i = 0; i < tnum_sisr; i++) {
+		j = INDEX_ISR(isrorder_table[i]);
+		p_isrcb = &(isrcb_table[j]);
+		p_isrcb->p_isrinib = &(isrinib_table[j]);
+		enqueue_isr(p_isrcb->p_isrinib->p_isr_queue, p_isrcb);
+	}
+	queue_initialize(&free_isrcb);
+	for (j = 0; i < tnum_isr; i++, j++) {
+		p_isrcb = &(isrcb_table[i]);
+		p_isrinib = &(aisrinib_table[j]);
+		p_isrinib->isratr = TA_NOEXS;
+		p_isrcb->p_isrinib = ((const ISRINIB *) p_isrinib);
+		queue_insert_prev(&free_isrcb, &(p_isrcb->isr_queue));
+	}
+}
+
+#endif /* TOPPERS_isrini */
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®å¼åºã
+ */
+#ifdef TOPPERS_isrcal
+
+void
+call_isr(QUEUE *p_isr_queue)
+{
+	QUEUE	*p_queue;
+	ISRCB	*p_isrcb;
+
+	for (p_queue = p_isr_queue->p_next; p_queue != p_isr_queue;
+											p_queue = p_queue->p_next) {
+		p_isrcb = (ISRCB *) p_queue;
+		LOG_ISR_ENTER(ISRID(p_isrcb));
+		(*(p_isrcb->p_isrinib->isr))(p_isrcb->p_isrinib->exinf);
+		LOG_ISR_LEAVE(ISRID(p_isrcb));
+
+		if (p_queue->p_next != p_isr_queue) {
+			/* ISRã®å¼åºãåã®ç¶æ
+ã«æ»ã */
+			if (sense_lock()) {
+				unlock_cpu();
+			}
+		}
+	}
+}
+
+#endif /* TOPPERS_isrcal */
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³å¼åºãã­ã¥ã¼ã®æ¤ç´¢
+ */
+Inline QUEUE *
+search_isr_queue(INTNO intno)
+{
+	int_t	left, right, i;
+
+	if (tnum_isr_queue == 0) {
+		return(NULL);
+	}
+
+	left = 0;
+	right = tnum_isr_queue - 1;
+	while (left < right) {
+		i = (left + right + 1) / 2;
+		if (intno < isr_queue_list[i].intno) {
+			right = i - 1;
+		}
+		else {
+			left = i;
+		}
+	}
+	if (isr_queue_list[left].intno == intno) {
+		return(isr_queue_list[left].p_isr_queue);
+	}
+	else {
+		return(NULL);
+	}
+}
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®çæ
+ *
+ *  pk_cisr->exinfã¯ï¼ã¨ã©ã¼ãã§ãã¯ãããï¼ä¸åº¦ããåç
+§ããªãããï¼ã­ã¼
+ *  ã«ã«å¤æ°ã«ã³ãã¼ããå¿
+è¦ããªãï¼éä¸­ã§æ¸ãæãã£ã¦ãæ¯éããªãï¼ï¼
+ */
+#ifdef TOPPERS_acre_isr
+
+ER_UINT
+acre_isr(const T_CISR *pk_cisr)
+{
+	ISRCB		*p_isrcb;
+	ISRINIB		*p_isrinib;
+	QUEUE		*p_isr_queue;
+	ATR			isratr;
+	INTNO		intno;
+	ISR			isr;
+	PRI			isrpri;
+	ER			ercd;
+
+	LOG_ACRE_ISR_ENTER(pk_cisr);
+	CHECK_TSKCTX_UNL();
+
+	isratr = pk_cisr->isratr;
+	intno = pk_cisr->intno;
+	isr = pk_cisr->isr;
+	isrpri = pk_cisr->isrpri;
+
+	CHECK_RSATR(isratr, TARGET_ISRATR);
+	CHECK_PAR(VALID_INTNO_CREISR(intno));
+	CHECK_PAR(FUNC_ALIGN(isr));
+	CHECK_PAR(FUNC_NONNULL(isr));
+	CHECK_PAR(VALID_ISRPRI(isrpri));
+
+	p_isr_queue = search_isr_queue(intno);
+	CHECK_OBJ(p_isr_queue != NULL);
+
+	lock_cpu();
+	if (tnum_isr == 0 || queue_empty(&free_isrcb)) {
+		ercd = E_NOID;
+	}
+	else {
+		p_isrcb = ((ISRCB *) queue_delete_next(&free_isrcb));
+		p_isrinib = (ISRINIB *)(p_isrcb->p_isrinib);
+		p_isrinib->isratr = isratr;
+		p_isrinib->exinf = pk_cisr->exinf;
+		p_isrinib->p_isr_queue = p_isr_queue;
+		p_isrinib->isr = isr;
+		p_isrinib->isrpri = isrpri;
+		enqueue_isr(p_isr_queue, p_isrcb);
+		ercd = ISRID(p_isrcb);
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_ACRE_ISR_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_acre_isr */
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®åé¤
+ */
+#ifdef TOPPERS_del_isr
+
+ER
+del_isr(ID isrid)
+{
+	ISRCB	*p_isrcb;
+	ISRINIB	*p_isrinib;
+	ER		ercd;
+
+	LOG_DEL_ISR_ENTER(isrid);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_ISRID(isrid));
+	p_isrcb = get_isrcb(isrid);
+
+	lock_cpu();
+	if (p_isrcb->p_isrinib->isratr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (isrid <= tmax_sisrid) {
+		ercd = E_OBJ;
+	}
+	else {
+		queue_delete(&(p_isrcb->isr_queue));
+		p_isrinib = (ISRINIB *)(p_isrcb->p_isrinib);
+		p_isrinib->isratr = TA_NOEXS;
+		queue_insert_prev(&free_isrcb, &(p_isrcb->isr_queue));
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_DEL_ISR_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_del_isr */
+
+/* 
+ *  å²è¾¼ã¿ç®¡çæ©è½ã®åæå
+ */
+#ifdef TOPPERS_intini
+#ifndef OMIT_INITIALIZE_INTERRUPT
+
+void
+initialize_interrupt(void)
+{
+	uint_t			i;
+	const INHINIB	*p_inhinib;
+	const INTINIB	*p_intinib;
+
+	for (i = 0; i < tnum_def_inhno; i++) {
+		p_inhinib = &(inhinib_table[i]);
+		define_inh(p_inhinib->inhno, p_inhinib->int_entry);
+	}
+	for (i = 0; i < tnum_cfg_intno; i++) {
+		p_intinib = &(intinib_table[i]);
+		config_int(p_intinib->intno, p_intinib->intatr, p_intinib->intpri);
+	}
+}
+
+#endif /* OMIT_INITIALIZE_INTERRUPT */
+#endif /* TOPPERS_intini */
+
+/*
+ *  å²è¾¼ã¿ã®ç¦æ­¢ï¼»NGKI3555ï¼½
+ */
+#ifdef TOPPERS_dis_int
+#ifdef TOPPERS_SUPPORT_DIS_INT					/*ï¼»NGKI3093ï¼½*/
+
+ER
+dis_int(INTNO intno)
+{
+	bool_t	locked;
+	ER		ercd;
+
+	LOG_DIS_INT_ENTER(intno);
+	CHECK_PAR(VALID_INTNO_DISINT(intno));		/*ï¼»NGKI3083ï¼½ï¼»NGKI3087ï¼½*/
+
+	locked = sense_lock();
+	if (!locked) {
+		lock_cpu();
+	}
+	if (disable_int(intno)) {					/*ï¼»NGKI3086ï¼½*/
+		ercd = E_OK;
+	}
+	else {
+		ercd = E_OBJ;							/*ï¼»NGKI3085ï¼½*/
+	}
+	if (!locked) {
+		unlock_cpu();
+	}
+
+  error_exit:
+	LOG_DIS_INT_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_SUPPORT_DIS_INT */
+#endif /* TOPPERS_dis_int */
+
+/*
+ *  å²è¾¼ã¿ã®è¨±å¯ï¼»NGKI3556ï¼½
+ */
+#ifdef TOPPERS_ena_int
+#ifdef TOPPERS_SUPPORT_ENA_INT					/*ï¼»NGKI3106ï¼½*/
+
+ER
+ena_int(INTNO intno)
+{
+	bool_t	locked;
+	ER		ercd;
+
+	LOG_ENA_INT_ENTER(intno);
+	CHECK_PAR(VALID_INTNO_DISINT(intno));		/*ï¼»NGKI3096ï¼½ï¼»NGKI3100ï¼½*/
+
+	locked = sense_lock();
+	if (!locked) {
+		lock_cpu();
+	}
+	if (enable_int(intno)) {					/*ï¼»NGKI3099ï¼½*/
+		ercd = E_OK;
+	}
+	else {
+		ercd = E_OBJ;							/*ï¼»NGKI3098ï¼½*/
+	}
+	if (!locked) {
+		unlock_cpu();
+	}
+
+  error_exit:
+	LOG_ENA_INT_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_SUPPORT_ENA_INT */
+#endif /* TOPPERS_ena_int */
+
+/*
+ *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®å¤æ´ï¼»NGKI3107ï¼½
+ */
+#ifdef TOPPERS_chg_ipm
+
+ER
+chg_ipm(PRI intpri)
+{
+	ER		ercd;
+
+	LOG_CHG_IPM_ENTER(intpri);
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3108ï¼½ï¼»NGKI3109ï¼½*/
+	CHECK_PAR(VALID_INTPRI_CHGIPM(intpri));		/*ï¼»NGKI3113ï¼½ï¼»NGKI3114ï¼½*/
+
+	lock_cpu();
+	t_set_ipm(intpri);							/*ï¼»NGKI3111ï¼½*/
+	if (intpri == TIPM_ENAALL && enadsp) {
+		dspflg = true;
+		p_schedtsk = search_schedtsk();
+		if (p_runtsk->raster && p_runtsk->enater) {
+			task_terminate(p_runtsk);
+			exit_and_dispatch();
+			ercd = E_SYS;
+		}
+		else {
+			if (p_runtsk != p_schedtsk) {
+				dispatch();
+			}
+			ercd = E_OK;
+		}
+	}
+	else {
+		dspflg = false;
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_CHG_IPM_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_chg_ipm */
+
+/*
+ *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®åç
+§ï¼»NGKI3115ï¼½
+ */
+#ifdef TOPPERS_get_ipm
+
+ER
+get_ipm(PRI *p_intpri)
+{
+	ER		ercd;
+
+	LOG_GET_IPM_ENTER(p_intpri);
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3116ï¼½ï¼»NGKI3117ï¼½*/
+
+	lock_cpu();
+	*p_intpri = t_get_ipm();					/*ï¼»NGKI3120ï¼½*/
+	ercd = E_OK;
+	unlock_cpu();
+
+  error_exit:
+	LOG_GET_IPM_LEAVE(ercd, p_intpri);
+	return(ercd);
+}
+
+#endif /* TOPPERS_get_ipm */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/interrupt.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/interrupt.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/interrupt.h	(revision 270)
@@ -0,0 +1,210 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		å²è¾¼ã¿ç®¡çæ©è½
+ */
+
+#ifndef TOPPERS_INTERRUPT_H
+#define TOPPERS_INTERRUPT_H
+
+#include "kernel_impl.h"
+#include <queue.h>
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³åæåãã­ãã¯
+ */
+typedef struct isr_initialization_block {
+	ATR			isratr;			/* å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³å±æ§ */
+	intptr_t	exinf;			/* å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®æ¡å¼µæ
+å ± */
+	QUEUE		*p_isr_queue;	/* ç»é²å
+å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³å¼åºãã­ã¥ã¼ */
+	ISR			isr;			/* å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®å
+é ­çªå° */
+	PRI			isrpri;			/* å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³åªå
+åº¦ */
+} ISRINIB;
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ç®¡çãã­ãã¯
+ */
+typedef struct isr_control_block {
+	QUEUE		isr_queue;		/* å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³å¼åºãã­ã¥ã¼ */
+	const ISRINIB *p_isrinib;	/* åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+} ISRCB;
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³å¼åºãã­ã¥ã¼ãæ¤ç´¢ããããã®ãã¼ã¿æ§é 
+ */
+typedef struct {
+	INTNO		intno;			/* å²è¾¼ã¿çªå· */
+	QUEUE		*p_isr_queue;	/* å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³å¼åºãã­ã¥ã¼ */
+} ISR_ENTRY;
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³å¼åºãã­ã¥ã¼ã®ã¨ã³ããªæ°ï¼kernel_cfg.cï¼
+ */
+extern const uint_t tnum_isr_queue;
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³å¼åºãã­ã¥ã¼ãªã¹ãï¼kernel_cfg.cï¼
+ */
+extern const ISR_ENTRY isr_queue_list[];
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³å¼åºãã­ã¥ã¼ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern QUEUE isr_queue_table[];
+
+/*
+ *  ä½¿ç¨ãã¦ããªãå²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ç®¡çãã­ãã¯ã®ãªã¹ã
+ */
+extern QUEUE	free_isrcb;
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³IDã®æå¤§å¤ï¼kernel_cfg.cï¼
+ */
+extern const ID	tmax_isrid;
+extern const ID	tmax_sisrid;
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³åæåãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern const ISRINIB	isrinib_table[];
+extern ISRINIB			aisrinib_table[];
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³çæé åºãã¼ãã«ï¼kernel_cfg.cï¼
+ */
+extern const ID	isrorder_table[];
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ç®¡çãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern ISRCB	isrcb_table[];
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ç®¡çãã­ãã¯ããå²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³IDãå
+ *  ãåºãããã®ãã¯ã­
+ */
+#define	ISRID(p_isrcb)	((ID)(((p_isrcb) - isrcb_table) + TMIN_ISRID))
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³æ©è½ã®åæå
+ */
+extern void initialize_isr(void);
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®å¼åºã
+ */
+extern void call_isr(QUEUE *p_isr_queue);
+
+#if !defined(OMIT_INITIALIZE_INTERRUPT) || defined(USE_INHINIB_TABLE)
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©åæåãã­ãã¯
+ */
+typedef struct interrupt_handler_initialization_block {
+	INHNO		inhno;			/* å²è¾¼ã¿ãã³ãã©çªå· */
+	ATR			inhatr;			/* å²è¾¼ã¿ãã³ãã©å±æ§ */
+	FP			int_entry;		/* å²è¾¼ã¿ãã³ãã©ã®åºå
+¥å£å¦çã®çªå° */
+} INHINIB;
+
+/*
+ *  å®ç¾©ããå²è¾¼ã¿ãã³ãã©çªå·ã®æ°ï¼kernel_cfg.cï¼
+ */
+extern const uint_t	tnum_def_inhno;
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©åæåãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern const INHINIB	inhinib_table[];
+
+#endif /* !defined(OMIT_INITIALIZE_INTERRUPT) || defined(USE_INHINIB_TABLE) */
+
+#if !defined(OMIT_INITIALIZE_INTERRUPT) || defined(USE_INTINIB_TABLE)
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³åæåãã­ãã¯
+ */
+typedef struct interrupt_request_initialization_block {
+	INTNO		intno;			/* å²è¾¼ã¿çªå· */
+	ATR			intatr;			/* å²è¾¼ã¿å±æ§ */
+	PRI			intpri;			/* å²è¾¼ã¿åªå
+åº¦ */
+} INTINIB;
+
+/*
+ *  è¨­å®ããå²è¾¼ã¿è¦æ±ã©ã¤ã³ã®æ°ï¼kernel_cfg.cï¼
+ */
+extern const uint_t	tnum_cfg_intno;
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³åæåãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern const INTINIB	intinib_table[];
+
+#endif /* !defined(OMIT_INITIALIZE_INTERRUPT) || defined(USE_INTINIB_TABLE) */
+
+/*
+ *  å²è¾¼ã¿ç®¡çæ©è½ã®åæå
+ */
+extern void	initialize_interrupt(void);
+
+#endif /* TOPPERS_INTERRUPT_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/interrupt.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/interrupt.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/interrupt.trb	(revision 270)
@@ -0,0 +1,448 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: interrupt.trb 678 2016-03-06 02:36:09Z ertl-hiro $
+# 
+
+#
+#		å²è¾¼ã¿ç®¡çæ©è½ã®çæã¹ã¯ãªãã
+#
+
+#
+#  kernel_cfg.cã®çæ
+#
+$kernelCfgC.comment_header("Interrupt Management Functions")
+
+#
+#  CRE_ISRã§ä½¿ç¨ã§ããå²è¾¼ã¿çªå·ã¨ããã«å¯¾å¿ããå²è¾¼ã¿ãã³ãã©çªå·ã®ã
+#  ãã©ã«ãå®ç¾©
+#
+if $INTNO_CREISR_VALID.nil?
+  $INTNO_CREISR_VALID = $INTNO_VALID
+end
+if $INHNO_CREISR_VALID.nil?
+  $INHNO_CREISR_VALID = $INHNO_VALID
+end
+
+#
+#  CFG_INTã§ä½¿ç¨ã§ããå²è¾¼ã¿åªå
+åº¦ã®ããã©ã«ãå®ç¾©
+# 
+if $INTPRI_CFGINT_VALID.nil?
+  $INTPRI_CFGINT_VALID = $TMIN_INTPRI.upto($TMAX_INTPRI).to_a
+end
+
+#
+#  å²è¾¼ã¿çªå·ã¨å²è¾¼ã¿ãã³ãã©çªå·ã®å¤æãã¼ãã«ã®ä½æ
+#
+if $INTNO_CREISR_VALID.length != $INHNO_CREISR_VALID.length
+  error_exit("length of `INTNO_CREISR_VALID' is different from" \
+									" length of `INHNO_CREISR_VALID'")
+end
+$toInhnoVal = {}
+$toIntnoVal = {}
+inhno_creisr_valid = $INHNO_CREISR_VALID.dup
+$INTNO_CREISR_VALID.each do |intnoVal|
+  inhnoVal = inhno_creisr_valid.shift
+  $toInhnoVal[intnoVal] = inhnoVal
+  $toIntnoVal[inhnoVal] = intnoVal
+end
+
+#
+#  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã«é¢ããã¨ã©ã¼ãã§ãã¯
+#
+$cfgData[:CFG_INT].each do |key, params|
+  #	intnoãå²è¾¼ã¿çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI2972ï¼½
+  if $INTNO_VALID.index(params[:intno]).nil?
+    error_illegal("E_PAR", params, :intno)
+  end
+
+  #	intatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2969ï¼½
+  #ï¼TA_ENAINTï¼TA_EDGEï¼TARGET_INTATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+  if (params[:intatr] & ~($TA_ENAINT|$TA_EDGE|$TARGET_INTATR)) != 0
+    error_illegal_sym("E_RSATR", params, :intatr, :intno)
+  end
+
+  #	intpriãCFG_INTã«å¯¾ããå²è¾¼ã¿åªå
+åº¦ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼
+  #	ï¼»NGKI2973ï¼½
+  if $INTPRI_CFGINT_VALID.index(params[:intpri]).nil?
+    error_illegal_sym("E_OBJ", params, :intpri, :intno)
+  end
+
+  # ã«ã¼ãã«ç®¡çå¤ã«åºå®ããã¦ããintnoã«å¯¾ãã¦ï¼intpriã«TMIN_INTPRIã
+  #	ããå°ããå¤ãæå®ãããªãã£ãå ´åï¼E_OBJï¼ï¼»NGKI2983ï¼½
+  if !$INTNO_FIX_NONKERNEL.nil?
+    if !$INTNO_FIX_NONKERNEL.index(params[:intno]).nil?
+      if params[:intpri] >= $TMIN_INTPRI
+        error_ercd("E_OBJ", params, "%%intno must have higher priority " \
+											"than TMIN_INTPRI in %apiname")
+      end
+    end
+  end
+
+  #	ã«ã¼ãã«ç®¡çã«åºå®ããã¦ããintnoã«å¯¾ãã¦ï¼intpriã«TMIN_INTPRIãã
+  #	ãå°ããå¤ãæå®ãããå ´åï¼E_OBJï¼ï¼»NGKI2984ï¼½
+  if !$INTNO_FIX_KERNEL.nil?
+    if !$INTNO_FIX_KERNEL.index(params[:intno]).nil?
+      if params[:intpri] < $TMIN_INTPRI
+        error_ercd("E_OBJ", params, "%%intno must have lower or equal " \
+									"priority to TMIN_INTPRI in %apiname")
+      end
+    end
+  end
+end
+
+#
+#  å²è¾¼ã¿ãã³ãã©ã«é¢ããã¨ã©ã¼ãã§ãã¯
+#
+$cfgData[:DEF_INH].each do |key, params|
+  # inhnoãå²è¾¼ã¿ãã³ãã©çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3055ï¼½
+  if $INHNO_VALID.index(params[:inhno]).nil?
+    error_illegal("E_PAR", params, :inhno)
+  end
+
+  # inhatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3052ï¼½
+  #ï¼TARGET_INHATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+  if (params[:inhatr] & ~($TARGET_INHATR)) != 0
+    error_illegal_sym("E_RSATR", params, :inhatr, :inhno)
+  end
+
+  #	ã«ã¼ãã«ç®¡çå¤ã«åºå®ããã¦ããinhnoã«å¯¾ãã¦ï¼inhatrã«TA_NONKERNELã
+  #	æå®ããã¦ããªãå ´åï¼E_RSATRï¼ï¼»NGKI3067ï¼½
+  if !$INHNO_FIX_NONKERNEL.nil?
+    if !$INHNO_FIX_NONKERNEL.index(params[:inhno]).nil?
+      if (params[:inhatr] & $TA_NONKERNEL) == 0
+        error_ercd("E_RSATR", params, "%%inhno must be " \
+								"non-kernel interrupt in %apiname")
+      end
+    end
+  end
+
+  #	ã«ã¼ãã«ç®¡çã«åºå®ããã¦ããinhnoã«å¯¾ãã¦ï¼inhatrã«TA_NONKERNELãæ
+  #	å®ããã¦ããå ´åï¼E_RSATRï¼ï¼»NGKI3068ï¼½
+  if !$INHNO_FIX_KERNEL.nil?
+    if !$INHNO_FIX_KERNEL.index(params[:inhno]).nil?
+      if (params[:inhatr] & $TA_NONKERNEL) != 0
+        error_ercd("E_RSATR", params, "%%inhno must not be " \
+								"non-kernel interrupt in %apiname")
+      end
+    end
+  end
+
+  if $toIntnoVal.has_key?(params[:inhno].val)
+    intnoVal = $toIntnoVal[params[:inhno].val]
+
+    # inhnoã«å¯¾å¿ããintnoã«å¯¾ããCFG_INTããªãå ´åï¼E_OBJï¼ï¼»NGKI3062ï¼½
+    if !$cfgData[:CFG_INT].has_key?(intnoVal)
+      error_ercd("E_OBJ", params, "intno `#{intnoVal}' corresponding to " \
+					"%%inhno in %apiname is not configured with CFG_INT")
+    else
+      intnoParams = $cfgData[:CFG_INT][intnoVal]
+      if (params[:inhatr] & $TA_NONKERNEL) == 0
+        # inhatrã«TA_NONKERNELãæå®ããã¦ãããï¼inhnoã«å¯¾å¿ããintno
+        # ã«å¯¾ãã¦CFG_INTã§è¨­å®ãããå²è¾¼ã¿åªå
+åº¦ãTMIN_INTPRIãããå°
+        # ããå ´åï¼E_OBJï¼ï¼»NGKI3065ï¼½
+        if intnoParams[:intpri] < $TMIN_INTPRI
+          error_ercd("E_OBJ", params, "intpri `#{intnoParams[:intpri]}' " \
+				"configured for %%inhno must be lower or equal to TMIN_INTPRI")
+        end
+      else
+        # inhatrã«TA_NONKERNELãæå®ããã¦ããï¼inhnoã«å¯¾å¿ããintnoã«
+        # å¯¾ãã¦CFG_INTã§è¨­å®ãããå²è¾¼ã¿åªå
+åº¦ãTMIN_INTPRIä»¥ä¸ã§ãã
+        # å ´åï¼E_OBJï¼ï¼»NGKI3066ï¼½
+        if intnoParams[:intpri] >= $TMIN_INTPRI
+          error_ercd("E_OBJ", params, "intpri `#{intnoParams[:intpri]}' " \
+					"configured for %%inhno must be higher than TMIN_INTPRI")
+        end
+      end
+    end
+  end
+end
+
+#
+#  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼ISRï¼ã«é¢ããã¨ã©ã¼ãã§ãã¯
+#
+$cfgData[:CRE_ISR].sort.each do |key, params|
+  #	isratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2998ï¼½
+  #ï¼TARGET_ISRATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+  if (params[:isratr] & ~($TARGET_ISRATR)) != 0
+    error_illegal("E_RSATR", params, "isratr")
+  end
+
+  #	intnoãCRE_ISRã«å¯¾ããå²è¾¼ã¿çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼
+  #	ï¼»NGKI3003ï¼½
+  if $INTNO_CREISR_VALID.index(params[:intno]).nil?
+    error_illegal("E_PAR", params, "intno")
+  end
+
+  #	(TMIN_ISRPRI <= isrpri && isrpri <= TMAX_ISRPRI)ã§ãªãå ´åï¼E_PARï¼
+  #	ï¼»NGKI3005ï¼½
+  if !($TMIN_ISRPRI <= params[:isrpri] && params[:isrpri] <= $TMAX_ISRPRI)
+    error_illegal("E_PAR", params, "isrpri")
+  end
+end
+
+$INTNO_CREISR_VALID.each do |intnoVal|
+  # å²è¾¼ã¿çªå·intnoã«å¯¾ãã¦ç»é²ãããISRã®ãªã¹ãã®ä½æ
+  isrParamsList = []
+  $cfgData[:CRE_ISR].sort.each do |key, params|
+    if params[:intno] == intnoVal
+      isrParamsList.push(params)
+    end
+  end
+
+  #	å²è¾¼ã¿çªå·intnoã«å¯¾ãã¦ç»é²ãããISRãå­å¨ããå ´å
+  if isrParamsList.size > 0
+    inhnoVal = $toInhnoVal[intnoVal]
+
+    # intnoã«å¯¾å¿ããinhnoã«å¯¾ãã¦DEF_INHãããå ´åï¼E_OBJï¼ï¼»NGKI3013ï¼½
+    if $cfgData[:DEF_INH].has_key?(inhnoVal)
+      inhnoParams = $cfgData[:DEF_INH][inhnoVal]
+      error_ercd("E_OBJ", isrParamsList[0], "%%intno in %apiname " \
+					"is duplicated with inhno #{inhnoParams[:inhno]}")
+    end
+
+    # intnoã«å¯¾ããCFG_INTããªãå ´åï¼E_OBJï¼ï¼»NGKI3012ï¼½
+    if !$cfgData[:CFG_INT].has_key?(intnoVal)
+      error_ercd("E_OBJ", isrParamsList[0], "%%intno in %apiname " \
+									"is not configured with CFG_INT")
+    else
+      intnoParams = $cfgData[:CFG_INT][intnoVal]
+
+      #	intnoã«å¯¾ãã¦CFG_INTã§è¨­å®ãããå²è¾¼ã¿åªå
+åº¦ãTMIN_INTPRIããã
+      #	å°ããå ´åï¼E_OBJï¼ï¼»NGKI3014ï¼½
+      if intnoParams[:intpri] < $TMIN_INTPRI
+        error_ercd("E_OBJ", isrParamsList[0],
+						"intpri `#{intnoParams[:intpri]}' configured for " \
+						"%%intno with CFG_INT in higher than TMIN_INTPRI")
+      end
+    end
+  end
+end
+
+#
+#  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼ISRï¼ç®¡çã®ãã¼ã¿æ§é 
+#
+intnoIsrList = []
+$INTNO_CREISR_VALID.each do |intnoVal|
+  inhnoVal = $toInhnoVal[intnoVal]
+  if $cfgData[:CFG_INT].has_key?(intnoVal) \
+							&& !$cfgData[:DEF_INH].has_key?(inhnoVal)
+    intnoIsrList.push(intnoVal)
+  end
+end
+
+intnoIsrList.sort!
+$isrQueueHeader = {}
+intnoIsrList.each_with_index do |intnoVal, index|
+  $isrQueueHeader[intnoVal] = "&(_kernel_isr_queue_table[#{index}])"
+end
+
+$kernelCfgC.add2("const uint_t _kernel_tnum_isr_queue = #{intnoIsrList.size};")
+
+if intnoIsrList.size > 0
+  $kernelCfgC.add("const ISR_ENTRY _kernel_isr_queue_list" \
+										"[#{intnoIsrList.size}] = {")
+  intnoIsrList.each_with_index do |intnoVal, index|
+    $kernelCfgC.add(",") if index > 0
+    $kernelCfgC.append("\t{ #{intnoVal}, #{$isrQueueHeader[intnoVal]} }")
+  end
+  $kernelCfgC.add
+  $kernelCfgC.add2("};")
+  $kernelCfgC.add2("QUEUE _kernel_isr_queue_table[#{intnoIsrList.size}];")
+else
+  $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const ISR_ENTRY, " \
+											"_kernel_isr_queue_list);")
+  $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(QUEUE, _kernel_isr_queue_table);")
+end
+
+#
+#  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼ISRï¼å¼åºãã®ããã®å²è¾¼ã¿ãã³ãã©
+#
+intnoIsrList.each do |intnoVal|
+  inhnoVal = $toInhnoVal[intnoVal]
+
+  # æ¬¡ã®DEF_INHã«ç¸å½ãããã¼ã¿ãçæ
+  # DEF_INH(inhno, { TA_NULL, _kernel_inthdr_<intno> } );
+  $cfgData[:DEF_INH][inhnoVal] = {
+    inhno: NumStr.new(inhnoVal),
+    inhatr: NumStr.new($TA_NULL, "TA_NULL"),
+    inthdr: "_kernel_inthdr_#{intnoVal}"
+  }
+
+  # å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ç¨ã®å²è¾¼ã¿ãã³ãã©
+  $kernelCfgC.add("void")
+  $kernelCfgC.add("_kernel_inthdr_#{intnoVal}(void)")
+  $kernelCfgC.add("{")
+  $kernelCfgC.add("\t_kernel_call_isr(#{$isrQueueHeader[intnoVal]});");
+  $kernelCfgC.add2("}")
+end
+
+#
+#  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã«é¢ããä¸è¬çãªæ
+å ±ã®çæ
+#
+class IsrObject < KernelObject
+  def initialize()
+    super("isr", "isr")
+  end
+
+  def prepare(key, params)
+    # ã¨ã©ã¼ãã§ãã¯ã¯å®æ½æ¸ã¿ãªã®ã§ï¼ããã§ã®å¦çã¯ä¸è¦
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:isratr]}), (intptr_t)(#{params[:exinf]}), " \
+						"(#{$isrQueueHeader[params[:intno].val]}), " \
+						"(ISR)(#{params[:isr]}), (#{params[:isrpri]})")
+  end
+end
+IsrObject.new.generate()
+
+# å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³çæé åºãã¼ãã«ã®çæ
+$kernelCfgC.add("const ID _kernel_isrorder_table[TNUM_SISRID] = { ")
+$kernelCfgC.append("\t")
+$cfgData[:CRE_ISR].each_with_index do |(key, params), index|
+  $kernelCfgC.append(", ") if index > 0
+  $kernelCfgC.append("#{params[:isrid]}")
+end
+$kernelCfgC.add
+$kernelCfgC.add2("};")
+
+#
+#  å²è¾¼ã¿ãã³ãã©ã®ããã®æ¨æºçãªåæåæ
+å ±ã®çæ
+#
+if !$OMIT_INITIALIZE_INTERRUPT || $USE_INHINIB_TABLE
+  #
+  #  å®ç¾©ããå²è¾¼ã¿ãã³ãã©ã®æ°
+  #
+  $kernelCfgC.add(<<EOS)
+#define TNUM_DEF_INHNO	#{$cfgData[:DEF_INH].size}
+const uint_t _kernel_tnum_def_inhno = TNUM_DEF_INHNO;
+EOS
+
+  if $cfgData[:DEF_INH].size != 0
+    #
+    #  å²è¾¼ã¿ãã³ãã©ã®ã¨ã³ããª
+    #
+    $cfgData[:DEF_INH].each do |key, params|
+      if (params[:inhatr] & $TA_NONKERNEL) == 0
+        $kernelCfgC.add("INTHDR_ENTRY(#{params[:inhno]}, " \
+						"#{params[:inhno].val}, #{params[:inthdr]})")
+      end
+    end
+    $kernelCfgC.add("")
+
+    #
+    #  å²è¾¼ã¿ãã³ãã©åæåãã­ãã¯
+    #
+    $kernelCfgC.add("const INHINIB _kernel_inhinib_table[TNUM_DEF_INHNO] = {")
+    $cfgData[:DEF_INH].each_with_index do |(key, params), index|
+      $kernelCfgC.add(",") if index > 0
+      if (params[:inhatr] & $TA_NONKERNEL) == 0
+        inthdr = "(FP)(INT_ENTRY(#{params[:inhno]}, #{params[:inthdr]}))"
+      else
+        inthdr = "(FP)(#{params[:inthdr]})"
+      end
+      $kernelCfgC.append("\t{ (#{params[:inhno]}), (#{params[:inhatr]}), " \
+															"#{inthdr} }")
+    end
+    $kernelCfgC.add
+    $kernelCfgC.add2("};")
+  else
+    $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(const INHINIB, " \
+										"_kernel_inhinib_table);")
+  end
+end
+
+#
+#  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®ããã®æ¨æºçãªåæåæ
+å ±ã®çæ
+#
+if !$OMIT_INITIALIZE_INTERRUPT || $USE_INTINIB_TABLE
+  #
+  #  è¨­å®ããå²è¾¼ã¿è¦æ±ã©ã¤ã³ã®æ°
+  #
+  $kernelCfgC.add(<<EOS)
+#define TNUM_CFG_INTNO	#{$cfgData[:CFG_INT].size}
+const uint_t _kernel_tnum_cfg_intno = TNUM_CFG_INTNO;
+EOS
+
+  #
+  #  å²è¾¼ã¿è¦æ±ã©ã¤ã³åæåãã­ãã¯
+  #
+  if $cfgData[:CFG_INT].size != 0
+    $kernelCfgC.add("const INTINIB _kernel_intinib_table[TNUM_CFG_INTNO] = {")
+    $cfgData[:CFG_INT].each_with_index do |(key, params), index|
+      $kernelCfgC.add(",") if index > 0
+      $kernelCfgC.append("\t{ (#{params[:intno]}), (#{params[:intatr]}), " \
+													"(#{params[:intpri]}) }")
+    end
+    $kernelCfgC.add
+    $kernelCfgC.add2("};")
+  else
+    $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(const INTINIB, " \
+										"_kernel_intinib_table);")
+  end
+end
+
+#
+#  å²è¾¼ã¿ç®¡çæ©è½åæåé¢æ°ã®è¿½å 
+#
+$initializeFunctions.push("_kernel_initialize_interrupt();")
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/kernel.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/kernel.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/kernel.trb	(revision 270)
@@ -0,0 +1,563 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: kernel.trb 716 2016-03-31 06:16:23Z ertl-hiro $
+# 
+
+#
+#		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®çæã¹ã¯ãªãã
+#
+
+#
+#  ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ã®æå®
+#
+$timeStampFileName = "kernel_cfg.timestamp"
+
+#
+#  kernel_cfg.hã®å
+é ­é¨åã®çæ
+#
+$kernelCfgH = GenFile.new("kernel_cfg.h")
+$kernelCfgH.add(<<EOS)
+/* kernel_cfg.h */
+#ifndef TOPPERS_KERNEL_CFG_H
+#define TOPPERS_KERNEL_CFG_H
+EOS
+
+#
+#  kernel_cfg.cã®å
+é ­é¨åã®çæ
+#
+$kernelCfgC = GenFile.new("kernel_cfg.c")
+$kernelCfgC.add(<<EOS)
+/* kernel_cfg.c */
+#include "kernel/kernel_int.h"
+#include "kernel_cfg.h"
+
+#if !(TKERNEL_PRID == 0x0007U && (TKERNEL_PRVER & 0xf000U) == 0x3000U)
+#error The kernel does not match this configuration file.
+#endif
+EOS
+
+#
+#  ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼
+#
+$kernelCfgC.comment_header("Include Directives")
+$includeFiles.each do |file|
+  $kernelCfgC.add("#include #{file}")
+end
+$kernelCfgC.add()
+
+#
+#  ã¹ã¿ãã¯é åã®ç¢ºä¿é¢æ°
+#
+#  ã¹ã¿ãã¯é åã®å®ç¾©åã¨ï¼ã¹ã¿ãã¯é åã®ãµã¤ãºè¨è¿°ãé
+åã§è¿ãï¼
+#
+unless defined? AllocStack()
+  def AllocStack(stack, size)
+    # å¤§ããæ¹ã«ä¸¸ãããµã¤ãºã§ç¢ºä¿ããï¼»NGKI1050ï¼½ï¼»NGKI3220ï¼½
+    $kernelCfgC.add("/*static*/ STK_T #{stack}[COUNT_STK_T(#{size})];")
+    return("ROUND_STK_T(#{size})")
+  end
+end
+
+#
+#  ã«ã¼ãã«ãªãã¸ã§ã¯ãã«é¢ããæ
+å ±ã®çæï¼ä»®æ³ã¯ã©ã¹ï¼
+#
+class KernelObject
+  def initialize(obj, object, obj_s = obj)
+    @obj = obj
+    @OBJ = obj.tr("a-z", "A-Z")
+    @object = object
+    @obj_s = obj_s
+    @OBJ_S = obj_s.tr("a-z", "A-Z")
+    @objid = (obj + "id").to_sym
+    @api = "CRE_#{@OBJ}".to_sym
+    @inibList = { "#{@OBJ_S}INIB" => "a#{@obj_s}inib_table"}
+  end
+
+  def generate()
+    # AID_@OBJã®å¦ç
+    numAutoObjid = 0
+    $cfgData["AID_#{@OBJ}".to_sym].each do |key, params|
+      numAutoObjid += params["no#{@obj}".to_sym]
+    end
+    numObjid = $cfgData[@api].size + numAutoObjid
+
+    # kernel_cfg.hã®çæ
+    $kernelCfgH.add("#define TNUM_#{@OBJ}ID\t#{numObjid}")
+
+    # ãªãã¸ã§ã¯ãã®IDçªå·ã®ãã¯ã­å®ç¾©ã®çæ
+    $cfgData[@api].sort.each do |key, params|
+      $kernelCfgH.add("#define #{params[@objid]}\t#{params[@objid].val}")
+    end
+    $kernelCfgH.add()
+
+    # ãªãã¸ã§ã¯ãã®IDçªå·ãä¿æããå¤æ°
+    if $USE_EXTERNAL_ID
+      $cfgData[@api].sort.each do |key, params|
+        $kernelCfgC.add("const ID #{params[@objid]}_id" \
+										" = #{params[@objid].val};")
+      end
+      $kernelCfgC.add()
+    end
+
+    # éçã«çæããããªãã¸ã§ã¯ãã®æ°
+    $kernelCfgC.add("#define TNUM_S#{@OBJ}ID\t#{$cfgData[@api].size}")
+
+    # ãªãã¸ã§ã¯ãIDçªå·ã®æå¤§å¤
+    $kernelCfgC.add("const ID _kernel_tmax_#{@obj}id" \
+							" = (TMIN_#{@OBJ}ID + TNUM_#{@OBJ}ID - 1);")
+    $kernelCfgC.add2("const ID _kernel_tmax_s#{@obj}id" \
+							" = (TMIN_#{@OBJ}ID + TNUM_S#{@OBJ}ID - 1);")
+
+    # ãã¼ã¿æ§é 
+    if $cfgData[@api].size > 0
+      # äºåæºåï¼ã¨ã©ã¼ãã§ãã¯ï¼ã¡ã¢ãªé åã®çæï¼
+      $cfgData[@api].sort.each do |key, params|
+        prepare(key, params)
+      end
+
+      # ãªãã¸ã§ã¯ãå
+¨ä½ã«å¯¾ãã¦å¿
+è¦ãªã¡ã¢ãªé åã®çæï¼ãªãã·ã§ã³ï¼
+      if respond_to?(:generateData)
+        generateData()
+      end
+
+      # ãªãã¸ã§ã¯ãåæåãã­ãã¯ã®çæ
+      $kernelCfgC.add("const #{@OBJ_S}INIB _kernel_#{@obj_s}inib_table" \
+													"[TNUM_S#{@OBJ}ID] = {")
+      $cfgData[@api].sort.each_with_index do |(key, params), index|
+        $kernelCfgC.add(",") if index > 0
+        $kernelCfgC.append("\t{ " + generateInib(key, params) + " }")
+      end
+      $kernelCfgC.add
+      $kernelCfgC.add2("};")
+    else
+      $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(const #{@OBJ_S}INIB, " \
+										"_kernel_#{@obj_s}inib_table);")
+    end
+
+    # åççæãªãã¸ã§ã¯ãç¨ã®ãªãã¸ã§ã¯ãåæåãã­ãã¯
+    @inibList.each do |type, array|
+      if numAutoObjid > 0
+        $kernelCfgC.add2("#{type} _kernel_#{array}[#{numAutoObjid}];")
+      else
+        $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(#{type}, _kernel_#{array});")
+      end
+    end
+
+    if numObjid > 0
+      # ãªãã¸ã§ã¯ãç®¡çãã­ãã¯ã®çæ
+      $kernelCfgC.add2("#{@OBJ_S}CB _kernel_#{@obj_s}cb_table" \
+													"[TNUM_#{@OBJ}ID];")
+
+      # ãªãã¸ã§ã¯ãåæåé¢æ°ã®è¿½å 
+      $initializeFunctions.push("_kernel_initialize_#{@object}();")
+    else
+      $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(#{@OBJ_S}CB, " \
+										"_kernel_#{@obj_s}cb_table);")
+    end
+  end
+end
+
+#
+#  éç¥ãã³ãã©ã®çæé¢æ°
+#
+def generateNotifyHandler(key, params, objid)
+  # ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
+  nfymode = params[:nfymode]
+  nfymode1 = nfymode & 0x0f
+  nfymode2 = nfymode & ~0x0f
+  par1 = params[:par1]
+  par2 = params[:par2]
+
+  # éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
+  if nfymode == $TNFY_HANDLER || nfymode1 == $TNFY_SETVAR \
+								|| nfymode1 == $TNFY_SETFLG \
+								|| nfymode1 == $TNFY_SNDDTQ
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
+	numpar = 2
+	epar1 = params[:par3]
+	epar2 = params[:par4]
+  else
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
+    numpar = 1
+    epar1 = params[:par2]
+    epar2 = params[:par3]
+  end
+
+  # ãã©ã¡ã¼ã¿æ°ã®ãã§ãã¯
+  if (numpar == 2 && par2.nil?) || (nfymode2 != 0 && epar1.nil?) \
+								|| (nfymode2 == $TENFY_SETFLG && epar2.nil?)
+    # ãã©ã¡ã¼ã¿ãè¶³ããªãå ´å
+    error_api(params, "too few parameters for nfymode `#{nfymode}' " \
+											"in %apiname of %#{objid}")
+  elsif (nfymode2 == 0 && !epar1.nil?) \
+					|| (nfymode2 != $TENFY_SETFLG && !epar2.nil?)
+    # ãã©ã¡ã¼ã¿ãå¤ãããå ´å
+    error_api(params, "too many parameters for nfymode `#{nfymode}' " \
+											"in %apiname of %#{objid}")
+  elsif nfymode == $TNFY_HANDLER
+    # ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å¼åºã
+    funcname = "(NFYHDR)(#{par2})"
+  else
+    # éç¥ãã³ãã©ã®é¢æ°å
+    funcname = "_kernel_nfyhdr_#{params[objid]}"
+
+    # ã¨ã©ã¼éç¥ã®ããã®å¤æ°ã®ã¢ãã¬ã¹ã¨ãªãã¸ã§ã¯ãIDãæ ¼ç´ãã
+    # å¤æ°ã®çæï¼ã¨ã©ã¼ãã§ãã¯ã®ããã«å¿
+è¦ï¼
+    if nfymode2 == $TENFY_SETVAR || nfymode2 == $TENFY_INCVAR
+      $kernelCfgC.add2("intptr_t *const #{funcname}_p_evar =" \
+											" (intptr_t *)(#{epar1});")
+    elsif nfymode2 == $TENFY_ACTTSK || nfymode2 == $TENFY_WUPTSK
+      $kernelCfgC.add2("const ID #{funcname}_etskid = #{epar1};")
+    elsif nfymode2 == $TENFY_SIGSEM
+      $kernelCfgC.add2("const ID #{funcname}_esemid = #{epar1};")
+    elsif nfymode2 == $TENFY_SETFLG
+      $kernelCfgC.add2("const ID #{funcname}_eflgid = #{epar1};")
+    elsif nfymode2 == $TENFY_SNDDTQ
+      $kernelCfgC.add2("const ID #{funcname}_edtqid = #{epar1};")
+    end
+
+    # é¢æ°ã®å
+é ­é¨åã®çæ
+    $kernelCfgC.add("static void")
+    $kernelCfgC.add("#{funcname}(intptr_t exinf)")
+    $kernelCfgC.add("{")
+
+    if nfymode2 == 0
+      # ã¨ã©ã¼éç¥ããªãå ´å
+      errorCode = "(void) "
+    else
+      # ã¨ã©ã¼éç¥ãããå ´å
+      $kernelCfgC.add2("\tER\tercd;")
+      errorCode = "ercd = "
+    end
+
+    # ã¤ãã³ãéç¥å¦çã®å¦ç
+    if nfymode1 == $TNFY_SETVAR && nfymode2 == 0
+      # å¤æ°ã®è¨­å®
+      $kernelCfgC.add("\t*((intptr_t *) exinf) = (#{par2});")
+    elsif nfymode1 == $TNFY_INCVAR && nfymode2 == 0
+      # å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
+      $kernelCfgC.add("\t(void) loc_cpu();")
+      $kernelCfgC.add("\t*((intptr_t *) exinf) += 1;")
+      $kernelCfgC.add("\t(void) unl_cpu();")
+    elsif nfymode1 == $TNFY_ACTTSK
+      # ã¿ã¹ã¯ã®èµ·å
+      $kernelCfgC.add("\t#{errorCode}act_tsk((ID) exinf);")
+    elsif nfymode1 == $TNFY_WUPTSK
+      # ã¿ã¹ã¯ã®èµ·åº
+      $kernelCfgC.add("\t#{errorCode}wup_tsk((ID) exinf);")
+    elsif nfymode1 == $TNFY_SIGSEM
+      # ã»ããã©ã®è¿å´
+      $kernelCfgC.add("\t#{errorCode}sig_sem((ID) exinf);")
+    elsif nfymode1 == $TNFY_SETFLG
+      # ã¤ãã³ããã©ã°ã®ã»ãã
+      $kernelCfgC.add("\t#{errorCode}set_flg(((ID) exinf), #{par2});")
+    elsif nfymode1 == $TNFY_SNDDTQ
+      # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
+      $kernelCfgC.add("\t#{errorCode}psnd_dtq(((ID) exinf), #{par2});")
+    else
+      error_illegal_id("E_PAR", params, :nfymode, objid)
+    end
+			
+    if nfymode2 != 0
+      # ã¨ã©ã¼éç¥å¦çã®å¦ç
+      $kernelCfgC.add("\tif (ercd != E_OK) {")
+
+
+      if nfymode2 == $TENFY_SETVAR
+        # å¤æ°ã®è¨­å®
+        $kernelCfgC.add("\t\t*#{funcname}_p_evar = (intptr_t) ercd;")
+      elsif nfymode2 == $TENFY_INCVAR
+        # å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
+        $kernelCfgC.add("\t\t(void) loc_cpu();")
+        $kernelCfgC.add("\t\t*#{funcname}_p_evar += 1;")
+        $kernelCfgC.add("\t\t(void) unl_cpu();")
+      elsif nfymode2 == $TENFY_ACTTSK
+        # ã¿ã¹ã¯ã®èµ·å
+        $kernelCfgC.add("\t\t(void) act_tsk(#{funcname}_etskid);")
+      elsif nfymode2 == $TENFY_WUPTSK
+        # ã¿ã¹ã¯ã®èµ·åº
+        $kernelCfgC.add("\t\t(void) wup_tsk(#{funcname}_etskid);")
+      elsif nfymode2 == $TENFY_SIGSEM
+        # ã»ããã©ã®è¿å´
+        $kernelCfgC.add("\t\t(void) sig_sem(#{funcname}_esemid);")
+      elsif nfymode2 == $TENFY_SETFLG
+        # ã¤ãã³ããã©ã°ã®ã»ãã
+        $kernelCfgC.add("\t\t(void) set_flg(#{funcname}_eflgid, #{epar2});")
+      elsif nfymode2 == $TENFY_SNDDTQ
+        # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
+        $kernelCfgC.add("\t\t(void) psnd_dtq(#{funcname}_edtqid," \
+													" (intptr_t) ercd);")
+      else
+        error_illegal_id("E_PAR", params, :nfymode, objid)
+      end
+      $kernelCfgC.add("\t}")
+    end
+
+    # é¢æ°ã®æ«å°¾é¨åã®çæ
+    $kernelCfgC.add2("}")
+  end
+  return(funcname)
+end
+
+#
+#  åæ©è½ã¢ã¸ã¥ã¼ã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
+#
+$initializeFunctions = []
+IncludeTrb("kernel/task.trb")
+IncludeTrb("kernel/semaphore.trb")
+IncludeTrb("kernel/eventflag.trb")
+IncludeTrb("kernel/dataqueue.trb")
+IncludeTrb("kernel/pridataq.trb")
+IncludeTrb("kernel/mutex.trb")
+IncludeTrb("kernel/mempfix.trb")
+IncludeTrb("kernel/cyclic.trb")
+IncludeTrb("kernel/alarm.trb")
+IncludeTrb("kernel/interrupt.trb")
+IncludeTrb("kernel/exception.trb")
+
+#
+#  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
+#
+$kernelCfgC.comment_header("Stack Area for Non-task Context")
+
+if $cfgData[:DEF_ICS].size == 0
+  # DEF_ICSããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
+  if $DEFAULT_ISTK.nil?
+    # ã¹ã¿ãã¯é åã®èªåå²ä»ã
+    istksz = AllocStack("_kernel_istack", "DEFAULT_ISTKSZ")
+    istk = "_kernel_istack"
+  else
+    istksz = "DEFAULT_ISTKSZ"
+    istk = "DEFAULT_ISTK"
+  end
+else
+  # éçAPIãDEF_ICSããè¤æ°ããï¼E_OBJï¼ï¼»NGKI3216ï¼½
+  if $cfgData[:DEF_ICS].size > 1
+    error("E_OBJ: too many DEF_ICS")
+  end
+
+  # DEF_ICSãããå ´åã®å¦ç
+  params = $cfgData[:DEF_ICS][1]
+
+  # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+  params[:istk] ||= "NULL"
+
+  # istkszãã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_ISTKSZï¼æªå®ç¾©ã®å ´åã¯1ï¼
+  # ãããå°ããå ´åï¼E_PARï¼ï¼»NGKI3254ï¼½
+  if params[:istksz] < $TARGET_MIN_ISTKSZ
+    error_wrong("E_PAR", params, :istksz, "too small")
+  end
+
+  if params[:istk] == "NULL"
+    # ã¹ã¿ãã¯é åã®èªåå²ä»ã
+    istksz = AllocStack("_kernel_istack", params[:istksz])
+    istk = "_kernel_istack"
+  else
+    # istkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3222ï¼½
+    if (params[:istksz] & ($CHECK_STKSZ_ALIGN - 1)) != 0
+      error_wrong("E_PAR", params, :istksz, "not aligned")
+    end
+
+    istksz = "(#{params[:istksz]})"
+    istk = "(void *)(#{params[:istk]})"
+  end
+end
+
+$kernelCfgC.add(<<EOS)
+const size_t _kernel_istksz = #{istksz};
+STK_T *const _kernel_istk = #{istk};
+
+#ifdef TOPPERS_ISTKPT
+STK_T *const _kernel_istkpt = TOPPERS_ISTKPT(#{istk}, #{istksz});
+#endif /* TOPPERS_ISTKPT */
+EOS
+
+#
+#  ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé å
+#
+$kernelCfgC.comment_header("Memory Area Allocated by Kernel")
+
+if $cfgData[:DEF_KMM].size == 0
+  # DEF_KMMããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
+  kmmsz = "0"
+  kmm = "NULL"
+else
+  # éçAPIãDEF_KMMããè¤æ°ããï¼E_OBJï¼
+  if ($cfgData[:DEF_KMM].size > 1)
+    error("E_OBJ: too many DEF_KMM")
+  end
+
+  # DEF_KMMãããå ´åã®å¦ç
+  params = $cfgData[:DEF_KMM][1]
+
+  # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+  params[:kmm] ||= "NULL"
+
+  # kmmszã0ã®å ´åï¼E_PARï¼
+  if params[:kmmsz] == 0
+    error_wrong("E_PAR", params, :kmmsz, "zero")
+  end
+
+  if params[:kmm] == "NULL"
+    # ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã®èªåå²ä»ã
+    $kernelCfgC.add("static MB_T _kernel_memory" \
+					"[TOPPERS_COUNT_SZ(#{params[:kmmsz]}, sizeof(MB_T))];")
+    kmmsz = "TOPPERS_ROUND_SZ(#{params[:kmmsz]}, sizeof(MB_T))"
+    kmm = "_kernel_memory"
+  else
+    # kmmszãã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´å
+    # ï¼E_PARï¼
+    if (params[:kmmsz] & ($CHECK_MB_ALIGN - 1)) != 0
+      error_wrong("E_PAR", params, :kmmsz, "not aligned")
+    end
+
+    kmmsz = "(#{params[:kmmsz]})"
+    kmm = "(void *)(#{params[:kmm]})"
+  end
+end
+
+$kernelCfgC.add(<<EOS)
+const size_t _kernel_kmmsz = #{kmmsz};
+MB_T *const _kernel_kmm = #{kmm};
+EOS
+
+#
+#  ã¿ã¤ã ã¤ãã³ãç®¡ç
+#
+$kernelCfgC.comment_header("Time Event Management")
+$kernelCfgC.add(<<EOS)
+TMEVTN   _kernel_tmevt_heap[1 + TNUM_TSKID + TNUM_CYCID + TNUM_ALMID];
+EOS
+
+#
+#  åã¢ã¸ã¥ã¼ã«ã®åæåé¢æ°
+#
+$kernelCfgC.comment_header("Module Initialization Function")
+$kernelCfgC.append(<<EOS)
+void
+_kernel_initialize_object(void)
+{
+EOS
+$initializeFunctions.each do |func|
+  $kernelCfgC.add("\t#{func}")
+end
+$kernelCfgC.add2("}")
+
+#
+#  åæåã«ã¼ãã³æ©è½
+#
+$kernelCfgC.comment_header("Initialization Routine")
+
+# ã¨ã©ã¼ãã§ãã¯
+$cfgData[:ATT_INI].each do |key, params|
+  # iniatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3241ï¼½
+  #ï¼TA_NULLã§ãªãå ´åï¼
+  if (params[:iniatr] != $TA_NULL)
+    error_illegal_sym("E_RSATR", params, :iniatr, :inirtn)
+  end
+end
+
+# åæåã«ã¼ãã³ã®å®è¡é¢æ°ã®çæ
+$kernelCfgC.append(<<EOS)
+void
+_kernel_call_inirtn(void)
+{
+EOS
+$cfgData[:ATT_INI].each do |key, params|
+  $kernelCfgC.add("\t((INIRTN)(#{params[:inirtn]}))" \
+								"((intptr_t)(#{params[:exinf]}));")
+end
+$kernelCfgC.add2("}")
+
+#
+#  çµäºå¦çã«ã¼ãã³æ©è½
+#
+$kernelCfgC.comment_header("Termination Routine")
+
+# ã¨ã©ã¼ãã§ãã¯
+$cfgData[:ATT_TER].each do |key, params|
+  # teratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3248ï¼½
+  #ï¼TA_NULLã§ãªãå ´åï¼
+  if (params[:teratr] != $TA_NULL)
+    error_illegal_sym("E_RSATR", params, :teratr, :terrtn)
+  end
+end
+
+# çµäºå¦çã«ã¼ãã³ã®å®è¡é¢æ°ã®çæ
+$kernelCfgC.append(<<EOS)
+void
+_kernel_call_terrtn(void)
+{
+EOS
+$cfgData[:ATT_TER].reverse_each do |key, params|
+  $kernelCfgC.add("\t((TERRTN)(#{params[:terrtn]}))" \
+								"((intptr_t)(#{params[:exinf]}));")
+end
+$kernelCfgC.add2("}")
+
+#
+#  kernel_cfg.hã®æ«å°¾é¨åã®çæ
+#
+$kernelCfgH.append(<<EOS)
+#endif /* TOPPERS_KERNEL_CFG_H */
+EOS
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_api.def
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_api.def	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_api.def	(revision 270)
@@ -0,0 +1,27 @@
+CRE_TSK #tskid* { .tskatr &exinf &task +itskpri .stksz &stk? }
+AID_TSK .notsk
+CRE_SEM #semid* { .sematr .isemcnt .maxsem }
+AID_SEM .nosem
+CRE_FLG #flgid* { .flgatr .iflgptn }
+AID_FLG .noflg
+CRE_DTQ #dtqid* { .dtqatr .dtqcnt &dtqmb? }
+AID_DTQ .nodtq
+CRE_PDQ #pdqid* { .pdqatr .pdqcnt +maxdpri &pdqmb? }
+AID_PDQ .nopdq
+CRE_MTX #mtxid* { .mtxatr +ceilpri? }
+AID_MTX .nomtx
+CRE_MPF #mpfid* { .mpfatr .blkcnt .blksz &mpf? &mpfmb? }
+AID_MPF .nompf
+CRE_CYC #cycid* { .cycatr { .nfymode &par1 &par2? &par3? &par4? } .cyctim .cycphs }
+AID_CYC .nocyc
+CRE_ALM #almid* { .almatr { .nfymode &par1 &par2? &par3? &par4? } }
+AID_ALM .noalm
+CFG_INT .intno* { .intatr +intpri }
+CRE_ISR #isrid* { .isratr &exinf .intno &isr +isrpri }
+AID_ISR .noisr
+DEF_INH .inhno* { .inhatr &inthdr }
+DEF_EXC .excno* { .excatr &exchdr }
+DEF_ICS { .istksz &istk? }
+DEF_KMM { .kmmsz &kmm? }
+ATT_INI { .iniatr &exinf &inirtn }
+ATT_TER { .teratr &exinf &terrtn }
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_check.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_check.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_check.trb	(revision 270)
@@ -0,0 +1,374 @@
+# -*- coding: utf-8 -*-
+# 
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#  
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: kernel_check.trb 662 2016-02-27 02:33:51Z ertl-hiro $
+#  
+
+#
+#		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã®çæã¹ã¯ãªãã
+#
+
+# 
+#  ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ã®æå®
+# 
+$timeStampFileName = "check.timestamp"
+
+#
+#  ãã¼ã¿ã»ã¯ã·ã§ã³ã®LMAããVMAã¸ã®ã³ãã¼
+#
+if !$lmaList.nil?
+  $lmaList.each do |lma|
+    startData = SYMBOL(lma[:START_DATA])
+    endData = SYMBOL(lma[:END_DATA])
+    startIdata = SYMBOL(lma[:START_IDATA])
+    if startData.nil?
+      error_exit("symbol `lma[:START_DATA]' not found")
+    elsif endData.nil?
+      error_exit("symbol `lma[:END_DATA]' not found")
+    elsif startIdata.nil?
+      error_exit("symbol `lma[:START_IDATA]' not found")
+    else
+      BCOPY(startIdata, startData, endData - startData)
+    end
+  end
+end
+
+#
+#  éç¥æ
+å ±ã®ãã§ãã¯é¢æ°
+#
+$tmax_tskid = $TMIN_TSKID + $cfgData[:CRE_TSK].size - 1
+$tmax_semid = $TMIN_SEMID + $cfgData[:CRE_SEM].size - 1
+$tmax_flgid = $TMIN_FLGID + $cfgData[:CRE_FLG].size - 1
+$tmax_dtqid = $TMIN_DTQID + $cfgData[:CRE_DTQ].size - 1
+
+def checkNotifyHandler(key, params, objid, exinf, nfyhdr)
+  # ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
+  nfymode = params[:nfymode]
+  nfymode1 = nfymode & 0x0f
+  nfymode2 = nfymode & ~0x0f
+  par1 = params[:par1]
+  par2 = params[:par2]
+  funcname = "_kernel_nfyhdr_#{params[objid]}"
+
+  # éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
+  if nfymode1 == $TNFY_SETVAR || nfymode1 == $TNFY_SETFLG \
+								|| nfymode1 == $TNFY_SNDDTQ
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
+    epar1 = params[:par3]
+    epar2 = params[:par4]
+  else
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
+    epar1 = params[:par2]
+    epar2 = params[:par3]
+  end
+
+  #	ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI3693ï¼½
+  if nfymode == $TNFY_HANDLER
+    tmehdr = nfyhdr
+    params1 = params.dup
+    params1[:tmehdr] = par2
+    if (tmehdr & ($CHECK_FUNC_ALIGN - 1)) != 0
+      error_wrong_id("E_PAR", params1, :tmehdr, objid, "not aligned")
+    end
+    if $CHECK_FUNC_NONNULL && tmehdr == 0
+      error_wrong_id("E_PAR", params1, :tmehdr, objid, "null")
+    end
+  end
+
+  #	ã¤ãã³ãéç¥å¦çã®å¤æ°ã®çªå°ã¨ãªãã¸ã§ã¯ãIDã®ãã§ãã¯
+  if nfymode1 == $TNFY_SETVAR || nfymode1 == $TNFY_INCVAR
+    # å¤æ°ã®è¨­å®ï¼ã¤ã³ã¯ãªã¡ã³ãã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+	p_var = exinf
+    params1 = params.dup
+    params1[:p_var] = par1
+
+    # å¤æ°ã®çªå°ã®ãã§ãã¯ï¼»NGKI3699ï¼½ï¼»NGKI3897ï¼½
+    if (p_var & ($CHECK_INTPTR_ALIGN - 1)) != 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "not aligned")
+    end
+    if $CHECK_INTPTR_NONNULL && p_var == 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "null")
+    end
+  elsif (nfymode1 == $TNFY_ACTTSK || nfymode1 == $TNFY_WUPTSK)
+    # ã¿ã¹ã¯ã®èµ·åï¼èµ·åºã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    tskid = exinf
+    params1 = params.dup
+    params1[:tskid] = par1
+
+    # ã¿ã¹ã¯IDã®ãã§ãã¯ï¼»NGKI3704ï¼½
+    if !($TMIN_TSKID <= tskid && tskid <= $tmax_tskid)
+      error_illegal_id("E_ID", params1, :tskid, objid)
+    end
+  elsif nfymode1 == $TNFY_SIGSEM
+    # ã»ããã©ã®è³æºã®è¿å´ã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    semid = exinf
+    params1 = params.dup
+    params1[:semid] = par1
+
+    # ã»ããã©IDã®ãã§ãã¯ï¼»NGKI3707ï¼½
+    if !($TMIN_SEMID <= semid && semid <= $tmax_semid)
+      error_illegal_id("E_ID", params1, :semid, objid)
+    end
+  elsif nfymode1 == $TNFY_SETFLG
+    # ã¤ãã³ããã©ã°ã®ã»ããã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    flgid = exinf
+    params1 = params.dup
+    params1[:flgid] = par1
+
+    # ã¤ãã³ããã©ã°IDã®ãã§ãã¯ï¼»NGKI3710ï¼½
+    if !($TMIN_FLGID <= flgid && flgid <= $tmax_flgid)
+      error_illegal_id("E_ID", params1, :flgid, objid)
+    end
+  elsif nfymode1 == $TNFY_SNDDTQ
+    # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    dtqid = exinf
+    params1 = params.dup
+    params1[:dtqid] = par1
+
+    # ãã¼ã¿ã­ã¥ã¼IDã®ãã§ãã¯ï¼»NGKI3713ï¼½
+    if !($TMIN_DTQID <= dtqid && dtqid <= $tmax_dtqid)
+      error_illegal_id("E_ID", params1, :dtqid, objid)
+    end
+  end
+
+  # ã¨ã©ã¼éç¥å¦çã®å¤æ°ã®çªå°ã¨ãªãã¸ã§ã¯ãIDã®ãã§ãã¯
+  if (nfymode2 == $TENFY_SETVAR || nfymode2 == $TENFY_INCVAR)
+    # å¤æ°ã®è¨­å®ï¼ã¤ã³ã¯ãªã¡ã³ãã«ããã¨ã©ã¼ã®éç¥
+    p_var = PEEK(SYMBOL(funcname + "_p_evar"), $sizeof_intptr_t)
+    params1 = params.dup
+    params1[:p_var] = epar1
+
+    # å¤æ°ã®çªå°ã®ãã§ãã¯ï¼»NGKI3701ï¼½ï¼»NGKI3897ï¼½
+    if (p_var & ($CHECK_INTPTR_ALIGN - 1)) != 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "not aligned")
+    end
+    if $CHECK_INTPTR_NONNULL && p_var == 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "null")
+    end
+  elsif nfymode2 == $TENFY_ACTTSK || nfymode2 == $TENFY_WUPTSK
+    # ã¿ã¹ã¯ã®èµ·åï¼èµ·åºã«ããã¨ã©ã¼ã®éç¥
+    tskid = PEEK(SYMBOL(funcname + "_etskid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:tskid] = epar1
+
+    # ã¿ã¹ã¯IDã®ãã§ãã¯ï¼»NGKI3704ï¼½
+    if !($TMIN_TSKID <= tskid && tskid <= $tmax_tskid)
+      error_illegal_id("E_ID", params1, :tskid, objid)
+    end
+  elsif nfymode2 == $TENFY_SIGSEM
+    # ã»ããã©ã®è³æºã®è¿å´ã«ããã¨ã©ã¼ã®éç¥
+	semid = PEEK(SYMBOL(funcname + "_esemid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:semid] = epar1
+
+    # ã»ããã©IDã®ãã§ãã¯ï¼»NGKI3707ï¼½
+    if !($TMIN_SEMID <= semid && semid <= $tmax_semid)
+      error_illegal_id("E_ID", params1, :semid, objid)
+    end
+  elsif nfymode2 == $TENFY_SETFLG
+    # ã¤ãã³ããã©ã°ã®ã»ããã«ããã¨ã©ã¼ã®éç¥
+    flgid = PEEK(SYMBOL(funcname + "_eflgid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:flgid] = epar1
+
+    # ã¤ãã³ããã©ã°IDã®ãã§ãã¯ï¼»NGKI3710ï¼½
+    if !($TMIN_FLGID <= flgid && flgid <= $tmax_flgid)
+      error_illegal_id("E_ID", params1, :flgid, objid)
+    end
+  elsif nfymode2 == $TENFY_SNDDTQ
+    # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¨ã©ã¼ã®éç¥
+    dtqid = PEEK(SYMBOL(funcname + "_edtqid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:dtqid] = epar1
+
+    # ãã¼ã¿ã­ã¥ã¼IDã®ãã§ãã¯ï¼»NGKI3715ï¼½
+    if !($TMIN_DTQID <= dtqid && dtqid <= $tmax_dtqid)
+      error_illegal_id("E_ID", params1, :dtqid, objid)
+    end
+  end
+end
+
+# 
+#  ã¿ã¹ã¯ã«é¢ãããã§ãã¯
+# 
+tinib = SYMBOL("_kernel_tinib_table")
+$cfgData[:CRE_TSK].sort.each do |key, params|
+  task = PEEK(tinib + $offsetof_TINIB_task, $sizeof_TASK)
+
+  # ã¿ã¹ã¯ã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI1033ï¼½
+  if (task & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :task, :tskid, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && task == 0
+    error_wrong_id("E_PAR", params, :task, :tskid, "null")
+  end
+
+  # ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI1056ï¼½
+  if $USE_TSKINICTXB
+    stk = GetStackTskinictxb(key, params, tinib)
+  else
+    stk = PEEK(tinib + $offsetof_TINIB_stk, $sizeof_void_ptr)
+  end
+  if (stk & ($CHECK_STACK_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :stk, :tskid, "not aligned")
+  end
+  if $CHECK_STACK_NONNULL && stk == 0
+    error_wrong_id("E_PAR", params, :stk, :tskid, "null")
+  end
+
+  tinib += $sizeof_TINIB
+end
+
+# 
+#  åºå®é·ã¡ã¢ãªãã¼ã«ã«é¢ãããã§ãã¯
+# 
+mpfinib = SYMBOL("_kernel_mpfinib_table")
+$cfgData[:CRE_MPF].sort.each do |key, params|
+  mpf = PEEK(mpfinib + $offsetof_MPFINIB_mpf, $sizeof_void_ptr)
+
+  # åºå®é·ã¡ã¢ãªãã¼ã«é åã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI2249ï¼½
+  if (mpf & ($CHECK_MPF_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :mpf, :mpfid, "not aligned")
+  end
+  if $CHECK_MPF_NONNULL && mpf == 0
+    error_wrong_id("E_PAR", params, :mpf, :mpfid, "null")
+  end
+
+  mpfinib += $sizeof_MPFINIB
+end
+
+# 
+#  å¨æéç¥ã«é¢ãããã§ãã¯
+# 
+cycinib = SYMBOL("_kernel_cycinib_table")
+$cfgData[:CRE_CYC].sort.each do |key, params|
+  exinf = PEEK(cycinib + $offsetof_CYCINIB_exinf, $sizeof_intptr_t)
+  nfyhdr = PEEK(cycinib + $offsetof_CYCINIB_nfyhdr, $sizeof_NFYHDR)
+
+  #	éç¥æ
+å ±ã®ãã§ãã¯
+  checkNotifyHandler(key, params, :cycid, exinf, nfyhdr)
+
+  cycinib += $sizeof_CYCINIB
+end
+
+# 
+#  ã¢ã©ã¼ã éç¥ã«é¢ãããã§ãã¯
+# 
+alminib = SYMBOL("_kernel_alminib_table")
+$cfgData[:CRE_ALM].sort.each do |key, params|
+  exinf = PEEK(alminib + $offsetof_ALMINIB_exinf, $sizeof_intptr_t)
+  nfyhdr = PEEK(alminib + $offsetof_ALMINIB_nfyhdr, $sizeof_NFYHDR)
+
+  #	éç¥æ
+å ±ã®ãã§ãã¯
+  checkNotifyHandler(key, params, :almid, exinf, nfyhdr)
+
+  alminib += $sizeof_ALMINIB
+end
+
+#
+#  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã«é¢ãããã§ãã¯
+#
+isrinib = SYMBOL("_kernel_isrinib_table")
+$cfgData[:CRE_ISR].sort.each do |key, params|
+  isr = PEEK(isrinib + $offsetof_ISRINIB_isr, $sizeof_ISR)
+
+  # å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI3004ï¼½
+  if (isr & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :isr, :isrid, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && isr == 0
+    error_wrong_id("E_PAR", params, :isr, :isrid, "null")
+  end
+
+  isrinib += $sizeof_ISRINIB
+end
+
+# 
+#  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã«é¢ãããã§ãã¯
+# 
+istkAddr = SYMBOL("_kernel_istk")
+if !istkAddr.nil?
+  istk = PEEK(istkAddr, $sizeof_void_ptr)
+
+  # éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI3222ï¼½
+  if (istk & ($CHECK_STACK_ALIGN - 1)) != 0
+    error_wrong("E_PAR", $cfgData[:DEF_ICS][1], :istk, "not aligned")
+  end
+  if $CHECK_STACK_NONNULL && istk == 0
+    error_wrong("E_PAR", $cfgData[:DEF_ICS][1], :istk, "null")
+  end
+end
+
+# 
+#  ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã«é¢ãããã§ãã¯
+# 
+kmmAddr = SYMBOL("_kernel_kmm")
+if !kmmAddr.nil?
+  kmm = PEEK(kmmAddr, $sizeof_void_ptr)
+
+  # ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã®å
+é ­çªå°ã®ãã§ãã¯
+  if (kmm & ($CHECK_MB_ALIGN - 1)) != 0
+    error_wrong("E_PAR", $cfgData[:DEF_KMM][1], :kmm, "not aligned")
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_impl.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_impl.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_impl.h	(revision 270)
@@ -0,0 +1,266 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		TOPPERS/ASPã«ã¼ãã«å
+é¨åãæ¨æºããããã¡ã¤ã«
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼ã«ã¼ãã«ãæ§æãããã­ã°ã©ã ã®ã½ã¼ã¹ãã¡ã¤ã«
+ *  ã§å¿
+ãã¤ã³ã¯ã«ã¼ãããã¹ãæ¨æºããããã¡ã¤ã«ã§ããï¼
+ *
+ *  ã¢ã»ã³ããªè¨èªã®ã½ã¼ã¹ãã¡ã¤ã«ãããã®ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ãããæ
+ *  ã¯ï¼TOPPERS_MACRO_ONLYãå®ç¾©ãã¦ããï¼ããã«ããï¼ãã¯ã­å®ç¾©ä»¥å¤ã
+ *  é¤ãããã«ãªã£ã¦ããï¼
+ */
+
+#ifndef TOPPERS_KERNEL_IMPL_H
+#define TOPPERS_KERNEL_IMPL_H
+
+/*
+ *  ã«ã¼ãã«ã®å
+é¨è­å¥åã®ãªãã¼ã 
+ */
+#include "kernel_rename.h"
+
+/*
+ *  ã¢ããªã±ã¼ã·ã§ã³ã¨å
+±éã®ããããã¡ã¤ã«
+ */
+#include <kernel.h>
+
+/*
+ *  ã·ã¹ãã ã­ã°æ©è½ã®ããã®å®ç¾©
+ */
+#include <t_syslog.h>
+
+/*
+ *  åã­ã£ã¹ããè¡ããã¯ã­ã®å®ç¾©
+ */
+#ifndef CAST
+#define CAST(type, val)		((type)(val))
+#endif /* CAST */
+
+/*
+ *  ã¿ã¼ã²ããä¾å­æ
+å ±ã®å®ç¾©
+ */
+#include "target_kernel_impl.h"
+
+/*
+ *  ãã¹ã¦ã®é¢æ°ãã³ã³ãã¤ã«ããããã®å®ç¾©
+ */
+#ifdef ALLFUNC
+#include "allfunc.h"
+#endif /* ALLFUNC */
+
+/*
+ *  ããããã£ã¼ã«ãã§ã®ç¬¦å·ç¡ãæ´æ°å
+ *
+ *  8ãããä»¥ä¸ã®å¹
+ã®ããããã£ã¼ã«ãã§ï¼ç¬¦å·ç¡ãæ´æ°å¤ãä¿æãããå ´å
+ *  ã«ç¨ããã¹ããã¼ã¿åï¼ANSI Cã§ã¯ï¼ããããã£ã¼ã«ãã®ãã¼ã¿åã«ã¯
+ *  intã¨unsigned intããè¨±ãããªãããï¼ããã©ã«ãã®å®ç¾©ã¯unsigned
+ *  intã¨ãã¦ãããï¼ã¿ã¼ã²ããããã³ãã¼ã«ä¾å­ã§ï¼unsigned charã¾ãã¯
+ *  unsigned shortã«å®ç¾©ããæ¹ãå¹çãè¯ãå ´åãããï¼
+ */
+#ifndef BIT_FIELD_UINT
+#define BIT_FIELD_UINT		unsigned int
+#endif /* BIT_FIELD_UINT */
+
+/*
+ *  ããããã£ã¼ã«ãã§ã®ãã¼ã«å
+ *
+ *  1ãããå¹
+ã®ããããã£ã¼ã«ãã§ï¼ãã¼ã«å¤ãä¿æãããå ´åã«ç¨ããã¹ã
+ *  ãã¼ã¿åï¼ããã©ã«ãã§ã¯BIT_FIELD_UINTã¨åä¸ã«å®ç¾©ãã¦ãããï¼ãã¼
+ *  ã«å¤ãä¿æãããã¨ãæç¤ºããããã«å¥ã®åç§°ã¨ãã¦ããï¼
+ */
+#ifndef BIT_FIELD_BOOL
+#define BIT_FIELD_BOOL		BIT_FIELD_UINT
+#endif /* BIT_FIELD_BOOL */
+
+/*
+ *  ãªãã¸ã§ã¯ãIDã®æå°å¤ã®å®ç¾©
+ */
+#define TMIN_TSKID		1		/* ã¿ã¹ã¯IDã®æå°å¤ */
+#define TMIN_SEMID		1		/* ã»ããã©IDã®æå°å¤ */
+#define TMIN_FLGID		1		/* ãã©ã°IDã®æå°å¤ */
+#define TMIN_DTQID		1		/* ãã¼ã¿ã­ã¥ã¼IDã®æå°å¤ */
+#define TMIN_PDQID		1		/* åªå
+åº¦ãã¼ã¿ã­ã¥ã¼IDã®æå°å¤ */
+#define TMIN_MTXID		1		/* ãã¥ã¼ããã¯ã¹IDã®æå°å¤ */
+#define TMIN_MPFID		1		/* åºå®é·ã¡ã¢ãªãã¼ã«IDã®æå°å¤ */
+#define TMIN_CYCID		1		/* å¨æéç¥IDã®æå°å¤ */
+#define TMIN_ALMID		1		/* ã¢ã©ã¼ã éç¥IDã®æå°å¤ */
+#define TMIN_ISRID		1		/* å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³IDã®æå°å¤ */
+
+/*
+ *  åªå
+åº¦ã®æ®µéæ°ã®å®ç¾©
+ */
+#define TNUM_TPRI		(TMAX_TPRI - TMIN_TPRI + 1)
+#define TNUM_DPRI		(TMAX_DPRI - TMIN_DPRI + 1)
+#define TNUM_INTPRI		(TMAX_INTPRI - TMIN_INTPRI + 1)
+
+/*
+ *  ã«ã¼ãã«å
+é¨ã§ä½¿ç¨ããå±æ§ã®å®ç¾©
+ */
+#define TA_NOEXS		((ATR)(-1))			/* æªç»é²ç¶æ
+ */
+
+#ifndef TA_MEMALLOC
+#define TA_MEMALLOC		UINT_C(0x8000)		/* ã¡ã¢ãªé åãã«ã¼ãã«ã§ç¢ºä¿ */
+#endif /* TA_MEMALLOC */
+#ifndef TA_MBALLOC
+#define TA_MBALLOC		UINT_C(0x4000)		/* ç®¡çé åãã«ã¼ãã«ã§ç¢ºä¿ */
+#endif /* TA_MBALLOC */
+
+/*
+ *  ã¿ã¼ã²ããå®ç¾©ã®ã¨ã©ã¼ãã§ãã¯ãã¯ã­ã®ããã©ã«ãå¤ã®å®ç¾©
+ */
+#ifndef TARGET_TSKATR
+#define TARGET_TSKATR		0U		/* ã¿ã¼ã²ããå®ç¾©ã®ã¿ã¹ã¯å±æ§ */
+#endif /* TARGET_TSKATR */
+
+#ifndef TARGET_ISRATR
+#define TARGET_ISRATR		0U		/* ã¿ã¼ã²ããå®ç¾©ã®ISRå±æ§ */
+#endif /* TARGET_ISRATR */
+
+/*
+ *  ããããã¡ã¤ã«ãæããªãã¢ã¸ã¥ã¼ã«ã®é¢æ°ã»å¤æ°ã®å®£è¨
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  TECSã®åæåï¼init_tecs.cï¼
+ */
+extern void initialize_tecs(void);
+
+/*
+ *  åã¢ã¸ã¥ã¼ã«ã®åæåï¼kernel_cfg.cï¼
+ */
+extern void	initialize_object(void);
+
+/*
+ *  åæåã«ã¼ãã³ã®å®è¡ï¼kernel_cfg.cï¼
+ */
+extern void	call_inirtn(void);
+
+/*
+ *  çµäºå¦çã«ã¼ãã³ã®å®è¡ï¼kernel_cfg.cï¼
+ */
+extern void	call_terrtn(void);
+
+/*
+ *  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åï¼kernel_cfg.cï¼
+ */
+extern const size_t	istksz;		/* ã¹ã¿ãã¯é åã®ãµã¤ãºï¼ä¸¸ããå¤ï¼ */
+extern STK_T *const	istk;		/* ã¹ã¿ãã¯é åã®å
+é ­çªå° */
+#ifdef TOPPERS_ISTKPT
+extern STK_T *const	istkpt;		/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®åæå¤ */
+#endif /* TOPPERS_ISTKPT */
+
+/*
+ *  ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åï¼kernel_cfg.cï¼
+ */
+extern const size_t	kmmsz;		/* ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã®ãµã¤ãº */
+extern MB_T *const	kmm;		/* ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã®å
+é ­çªå° */
+
+/*
+ *  ã«ã¼ãã«åä½ç¶æ
+ãã©ã°ï¼startup.cï¼
+ */
+extern bool_t	kerflg;
+
+/*
+ *  ã«ã¼ãã«ã®èµ·åï¼startup.cï¼
+ */
+extern void	sta_ker(void);
+
+/*
+ *  ã«ã¼ãã«ã®çµäºå¦çï¼startup.cï¼
+ */
+extern void	exit_kernel(void);
+
+/*
+ *  ã«ã¼ãã«ã®å²ãä»ããã¡ã¢ãªé åã®ç®¡çï¼startup.cï¼
+ */
+extern void initialize_kmm(void);
+extern void *kernel_malloc(size_t size);
+extern void kernel_free(void *ptr);
+
+/*
+ *  éç¥ãã³ãã©ã®åå®ç¾©
+ */
+typedef void	(*NFYHDR)(intptr_t exinf);
+
+/*
+ *  éç¥æ¹æ³ã®ã¨ã©ã¼ãã§ãã¯
+ */
+extern ER check_nfyinfo(const T_NFYINFO *p_nfyinfo);
+
+/*
+ *  éç¥ãã³ãã©
+ */
+extern void notify_handler(intptr_t exinf);
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_KERNEL_IMPL_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_int.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_int.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_int.h	(revision 270)
@@ -0,0 +1,101 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		kernel_cfg.cï¼ããã³cfg1_out.cï¼ç¨ããããã¡ã¤ã«
+ */
+
+#ifndef TOPPERS_KERNEL_INT_H
+#define TOPPERS_KERNEL_INT_H
+
+/*
+ *  ã«ã¼ãã«æ¨æºããããã¡ã¤ã«
+ */
+#include "kernel_impl.h"
+
+/*
+ *  ã«ã¼ãã«ã®åããããã¡ã¤ã«
+ */
+#include "task.h"
+#include "semaphore.h"
+#include "eventflag.h"
+#include "dataqueue.h"
+#include "pridataq.h"
+#include "mutex.h"
+#include "mempfix.h"
+#include "cyclic.h"
+#include "alarm.h"
+#include "interrupt.h"
+#include "exception.h"
+#include "time_event.h"
+
+/*
+ *  ãªãã¼ã ããã·ã³ãã«ãå
+ã«æ»ãããã®ããããã¡ã¤ã«
+ */
+#include "kernel_unrename.h"
+
+/*
+ *  å
+å®¹ãç©ºã®é
+åãçæããããã®ãã¯ã­
+ */
+#ifndef TOPPERS_EMPTY_LABEL
+#define TOPPERS_EMPTY_LABEL(type, var)		type var[0]
+#endif
+
+#endif /* TOPPERS_KERNEL_INT_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_rename.def
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_rename.def	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_rename.def	(revision 270)
@@ -0,0 +1,198 @@
+# startup.c
+kerflg
+exit_kernel
+initialize_kmm
+kernel_malloc
+kernel_free
+
+# task.c
+p_runtsk
+p_schedtsk
+enadsp
+dspflg
+ready_queue
+ready_primap
+free_tcb
+initialize_task
+search_schedtsk
+make_runnable
+make_non_runnable
+make_dormant
+make_active
+change_priority
+rotate_ready_queue
+task_terminate
+
+# taskhook.c
+mtxhook_check_ceilpri
+mtxhook_scan_ceilmtx
+mtxhook_release_all
+
+# wait.c
+make_wait_tmout
+wait_complete
+wait_tmout
+wait_tmout_ok
+wobj_make_wait
+wobj_make_wait_tmout
+init_wait_queue
+
+# time_event.c
+boundary_evttim
+current_evttim
+current_hrtcnt
+monotonic_evttim
+systim_offset
+in_signal_time
+initialize_tmevt
+tmevt_up
+tmevt_down
+update_current_evttim
+set_hrt_event
+tmevtb_register
+tmevtb_enqueue
+tmevtb_dequeue
+check_adjtim
+tmevt_lefttim
+signal_time
+
+# semaphore.c
+free_semcb
+initialize_semaphore
+
+# eventflag.c
+free_flgcb
+initialize_eventflag
+check_flg_cond
+
+# dataqueue.c
+free_dtqcb
+initialize_dataqueue
+enqueue_data
+force_enqueue_data
+dequeue_data
+send_data
+force_send_data
+receive_data
+
+# pridataq.c
+free_pdqcb
+initialize_pridataq
+enqueue_pridata
+dequeue_pridata
+send_pridata
+receive_pridata
+
+# mutex.c
+free_mtxcb
+initialize_mutex
+mutex_check_ceilpri
+mutex_scan_ceilmtx
+mutex_drop_priority
+mutex_acquire
+mutex_release
+mutex_release_all
+
+# mempfix.c
+free_mpfcb
+initialize_mempfix
+get_mpf_block
+
+# time_manage.c
+check_nfyinfo
+notify_handler
+
+# cyclic.c
+free_cyccb
+initialize_cyclic
+call_cyclic
+
+# alarm.c
+free_almcb
+initialize_alarm
+call_alarm
+
+# interrupt.c
+free_isrcb
+initialize_isr
+call_isr
+initialize_interrupt
+
+# exception.c
+initialize_exception
+
+# kernel_cfg.c
+initialize_object
+call_inirtn
+call_terrtn
+tmax_tskid
+tmax_stskid
+tinib_table
+atinib_table
+torder_table
+tcb_table
+tmax_semid
+tmax_ssemid
+seminib_table
+aseminib_table
+semcb_table
+tmax_flgid
+tmax_sflgid
+flginib_table
+aflginib_table
+flgcb_table
+tmax_dtqid
+tmax_sdtqid
+dtqinib_table
+adtqinib_table
+dtqcb_table
+tmax_pdqid
+tmax_spdqid
+pdqinib_table
+apdqinib_table
+pdqcb_table
+tmax_mtxid
+tmax_smtxid
+mtxinib_table
+amtxinib_table
+mtxcb_table
+tmax_mpfid
+tmax_smpfid
+mpfinib_table
+ampfinib_table
+mpfcb_table
+tmax_cycid
+tmax_scycid
+cycinib_table
+acycinib_table
+acyc_nfyinfo_table
+cyccb_table
+tmax_almid
+tmax_salmid
+alminib_table
+aalminib_table
+aalm_nfyinfo_table
+almcb_table
+tnum_isr_queue
+isr_queue_list
+isr_queue_table
+tmax_isrid
+tmax_sisrid
+isrinib_table
+aisrinib_table
+isrorder_table
+isrcb_table
+tnum_def_inhno
+inhinib_table
+tnum_cfg_intno
+intinib_table
+tnum_def_excno
+excinib_table
+tmevt_heap
+istksz
+istk
+istkpt
+kmmsz
+kmm
+
+INCLUDE "target"
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_rename.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_rename.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_rename.h	(revision 270)
@@ -0,0 +1,240 @@
+/* This file is generated from kernel_rename.def by genrename. */
+
+#ifndef TOPPERS_KERNEL_RENAME_H
+#define TOPPERS_KERNEL_RENAME_H
+
+/*
+ *  startup.c
+ */
+#define kerflg						_kernel_kerflg
+#define exit_kernel					_kernel_exit_kernel
+#define initialize_kmm				_kernel_initialize_kmm
+#define kernel_malloc				_kernel_kernel_malloc
+#define kernel_free					_kernel_kernel_free
+
+/*
+ *  task.c
+ */
+#define p_runtsk					_kernel_p_runtsk
+#define p_schedtsk					_kernel_p_schedtsk
+#define enadsp						_kernel_enadsp
+#define dspflg						_kernel_dspflg
+#define ready_queue					_kernel_ready_queue
+#define ready_primap				_kernel_ready_primap
+#define free_tcb					_kernel_free_tcb
+#define initialize_task				_kernel_initialize_task
+#define search_schedtsk				_kernel_search_schedtsk
+#define make_runnable				_kernel_make_runnable
+#define make_non_runnable			_kernel_make_non_runnable
+#define make_dormant				_kernel_make_dormant
+#define make_active					_kernel_make_active
+#define change_priority				_kernel_change_priority
+#define rotate_ready_queue			_kernel_rotate_ready_queue
+#define task_terminate				_kernel_task_terminate
+
+/*
+ *  taskhook.c
+ */
+#define mtxhook_check_ceilpri		_kernel_mtxhook_check_ceilpri
+#define mtxhook_scan_ceilmtx		_kernel_mtxhook_scan_ceilmtx
+#define mtxhook_release_all			_kernel_mtxhook_release_all
+
+/*
+ *  wait.c
+ */
+#define make_wait_tmout				_kernel_make_wait_tmout
+#define wait_complete				_kernel_wait_complete
+#define wait_tmout					_kernel_wait_tmout
+#define wait_tmout_ok				_kernel_wait_tmout_ok
+#define wobj_make_wait				_kernel_wobj_make_wait
+#define wobj_make_wait_tmout		_kernel_wobj_make_wait_tmout
+#define init_wait_queue				_kernel_init_wait_queue
+
+/*
+ *  time_event.c
+ */
+#define boundary_evttim				_kernel_boundary_evttim
+#define current_evttim				_kernel_current_evttim
+#define current_hrtcnt				_kernel_current_hrtcnt
+#define monotonic_evttim			_kernel_monotonic_evttim
+#define systim_offset				_kernel_systim_offset
+#define in_signal_time				_kernel_in_signal_time
+#define initialize_tmevt			_kernel_initialize_tmevt
+#define tmevt_up					_kernel_tmevt_up
+#define tmevt_down					_kernel_tmevt_down
+#define update_current_evttim		_kernel_update_current_evttim
+#define set_hrt_event				_kernel_set_hrt_event
+#define tmevtb_register				_kernel_tmevtb_register
+#define tmevtb_enqueue				_kernel_tmevtb_enqueue
+#define tmevtb_dequeue				_kernel_tmevtb_dequeue
+#define check_adjtim				_kernel_check_adjtim
+#define tmevt_lefttim				_kernel_tmevt_lefttim
+#define signal_time					_kernel_signal_time
+
+/*
+ *  semaphore.c
+ */
+#define free_semcb					_kernel_free_semcb
+#define initialize_semaphore		_kernel_initialize_semaphore
+
+/*
+ *  eventflag.c
+ */
+#define free_flgcb					_kernel_free_flgcb
+#define initialize_eventflag		_kernel_initialize_eventflag
+#define check_flg_cond				_kernel_check_flg_cond
+
+/*
+ *  dataqueue.c
+ */
+#define free_dtqcb					_kernel_free_dtqcb
+#define initialize_dataqueue		_kernel_initialize_dataqueue
+#define enqueue_data				_kernel_enqueue_data
+#define force_enqueue_data			_kernel_force_enqueue_data
+#define dequeue_data				_kernel_dequeue_data
+#define send_data					_kernel_send_data
+#define force_send_data				_kernel_force_send_data
+#define receive_data				_kernel_receive_data
+
+/*
+ *  pridataq.c
+ */
+#define free_pdqcb					_kernel_free_pdqcb
+#define initialize_pridataq			_kernel_initialize_pridataq
+#define enqueue_pridata				_kernel_enqueue_pridata
+#define dequeue_pridata				_kernel_dequeue_pridata
+#define send_pridata				_kernel_send_pridata
+#define receive_pridata				_kernel_receive_pridata
+
+/*
+ *  mutex.c
+ */
+#define free_mtxcb					_kernel_free_mtxcb
+#define initialize_mutex			_kernel_initialize_mutex
+#define mutex_check_ceilpri			_kernel_mutex_check_ceilpri
+#define mutex_scan_ceilmtx			_kernel_mutex_scan_ceilmtx
+#define mutex_drop_priority			_kernel_mutex_drop_priority
+#define mutex_acquire				_kernel_mutex_acquire
+#define mutex_release				_kernel_mutex_release
+#define mutex_release_all			_kernel_mutex_release_all
+
+/*
+ *  mempfix.c
+ */
+#define free_mpfcb					_kernel_free_mpfcb
+#define initialize_mempfix			_kernel_initialize_mempfix
+#define get_mpf_block				_kernel_get_mpf_block
+
+/*
+ *  time_manage.c
+ */
+#define check_nfyinfo				_kernel_check_nfyinfo
+#define notify_handler				_kernel_notify_handler
+
+/*
+ *  cyclic.c
+ */
+#define free_cyccb					_kernel_free_cyccb
+#define initialize_cyclic			_kernel_initialize_cyclic
+#define call_cyclic					_kernel_call_cyclic
+
+/*
+ *  alarm.c
+ */
+#define free_almcb					_kernel_free_almcb
+#define initialize_alarm			_kernel_initialize_alarm
+#define call_alarm					_kernel_call_alarm
+
+/*
+ *  interrupt.c
+ */
+#define free_isrcb					_kernel_free_isrcb
+#define initialize_isr				_kernel_initialize_isr
+#define call_isr					_kernel_call_isr
+#define initialize_interrupt		_kernel_initialize_interrupt
+
+/*
+ *  exception.c
+ */
+#define initialize_exception		_kernel_initialize_exception
+
+/*
+ *  kernel_cfg.c
+ */
+#define initialize_object			_kernel_initialize_object
+#define call_inirtn					_kernel_call_inirtn
+#define call_terrtn					_kernel_call_terrtn
+#define tmax_tskid					_kernel_tmax_tskid
+#define tmax_stskid					_kernel_tmax_stskid
+#define tinib_table					_kernel_tinib_table
+#define atinib_table				_kernel_atinib_table
+#define torder_table				_kernel_torder_table
+#define tcb_table					_kernel_tcb_table
+#define tmax_semid					_kernel_tmax_semid
+#define tmax_ssemid					_kernel_tmax_ssemid
+#define seminib_table				_kernel_seminib_table
+#define aseminib_table				_kernel_aseminib_table
+#define semcb_table					_kernel_semcb_table
+#define tmax_flgid					_kernel_tmax_flgid
+#define tmax_sflgid					_kernel_tmax_sflgid
+#define flginib_table				_kernel_flginib_table
+#define aflginib_table				_kernel_aflginib_table
+#define flgcb_table					_kernel_flgcb_table
+#define tmax_dtqid					_kernel_tmax_dtqid
+#define tmax_sdtqid					_kernel_tmax_sdtqid
+#define dtqinib_table				_kernel_dtqinib_table
+#define adtqinib_table				_kernel_adtqinib_table
+#define dtqcb_table					_kernel_dtqcb_table
+#define tmax_pdqid					_kernel_tmax_pdqid
+#define tmax_spdqid					_kernel_tmax_spdqid
+#define pdqinib_table				_kernel_pdqinib_table
+#define apdqinib_table				_kernel_apdqinib_table
+#define pdqcb_table					_kernel_pdqcb_table
+#define tmax_mtxid					_kernel_tmax_mtxid
+#define tmax_smtxid					_kernel_tmax_smtxid
+#define mtxinib_table				_kernel_mtxinib_table
+#define amtxinib_table				_kernel_amtxinib_table
+#define mtxcb_table					_kernel_mtxcb_table
+#define tmax_mpfid					_kernel_tmax_mpfid
+#define tmax_smpfid					_kernel_tmax_smpfid
+#define mpfinib_table				_kernel_mpfinib_table
+#define ampfinib_table				_kernel_ampfinib_table
+#define mpfcb_table					_kernel_mpfcb_table
+#define tmax_cycid					_kernel_tmax_cycid
+#define tmax_scycid					_kernel_tmax_scycid
+#define cycinib_table				_kernel_cycinib_table
+#define acycinib_table				_kernel_acycinib_table
+#define acyc_nfyinfo_table			_kernel_acyc_nfyinfo_table
+#define cyccb_table					_kernel_cyccb_table
+#define tmax_almid					_kernel_tmax_almid
+#define tmax_salmid					_kernel_tmax_salmid
+#define alminib_table				_kernel_alminib_table
+#define aalminib_table				_kernel_aalminib_table
+#define aalm_nfyinfo_table			_kernel_aalm_nfyinfo_table
+#define almcb_table					_kernel_almcb_table
+#define tnum_isr_queue				_kernel_tnum_isr_queue
+#define isr_queue_list				_kernel_isr_queue_list
+#define isr_queue_table				_kernel_isr_queue_table
+#define tmax_isrid					_kernel_tmax_isrid
+#define tmax_sisrid					_kernel_tmax_sisrid
+#define isrinib_table				_kernel_isrinib_table
+#define aisrinib_table				_kernel_aisrinib_table
+#define isrorder_table				_kernel_isrorder_table
+#define isrcb_table					_kernel_isrcb_table
+#define tnum_def_inhno				_kernel_tnum_def_inhno
+#define inhinib_table				_kernel_inhinib_table
+#define tnum_cfg_intno				_kernel_tnum_cfg_intno
+#define intinib_table				_kernel_intinib_table
+#define tnum_def_excno				_kernel_tnum_def_excno
+#define excinib_table				_kernel_excinib_table
+#define tmevt_heap					_kernel_tmevt_heap
+#define istksz						_kernel_istksz
+#define istk						_kernel_istk
+#define istkpt						_kernel_istkpt
+#define kmmsz						_kernel_kmmsz
+#define kmm							_kernel_kmm
+
+
+#include "target_rename.h"
+
+#endif /* TOPPERS_KERNEL_RENAME_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_sym.def
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_sym.def	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_sym.def	(revision 270)
@@ -0,0 +1,150 @@
+USE_EXTERNAL_ID,true,bool,defined(USE_EXTERNAL_ID)
+SIL_ENDIAN_BIG,true,bool,defined(SIL_ENDIAN_BIG)
+SIL_ENDIAN_LITTLE,true,bool,defined(SIL_ENDIAN_LITTLE)
+TA_NULL
+TA_ACT
+TA_NOACTQUE
+TA_TPRI
+TA_WMUL
+TA_CLR
+TA_CEILING
+TA_STA
+TA_NONKERNEL
+TA_ENAINT
+TA_EDGE
+TNFY_HANDLER
+TNFY_SETVAR
+TNFY_INCVAR
+TNFY_ACTTSK
+TNFY_WUPTSK
+TNFY_SIGSEM
+TNFY_SETFLG
+TNFY_SNDDTQ
+TENFY_SETVAR
+TENFY_INCVAR
+TENFY_ACTTSK
+TENFY_WUPTSK
+TENFY_SIGSEM
+TENFY_SETFLG
+TENFY_SNDDTQ
+TMIN_TPRI,,signed
+TMAX_TPRI,,signed
+TMIN_DPRI,,signed
+TMAX_DPRI,,signed
+TMIN_ISRPRI,,signed
+TMAX_ISRPRI,,signed
+TBIT_FLGPTN
+TMAX_MAXSEM
+TMAX_RELTIM
+TMIN_INTPRI,,signed
+TMAX_INTPRI,,signed
+TMIN_TSKID,,signed
+TMIN_SEMID,,signed
+TMIN_FLGID,,signed
+TMIN_DTQID,,signed
+TMIN_PDQID,,signed
+TMIN_MTXID,,signed
+TMIN_MPFID,,signed
+TMIN_CYCID,,signed
+TMIN_ALMID,,signed
+USE_TSKINICTXB,true,bool,defined(USE_TSKINICTXB)
+OMIT_INITIALIZE_INTERRUPT,true,bool,defined(OMIT_INITIALIZE_INTERRUPT)
+USE_INHINIB_TABLE,true,bool,defined(USE_INHINIB_TABLE)
+USE_INTINIB_TABLE,true,bool,defined(USE_INTINIB_TABLE)
+OMIT_INITIALIZE_EXCEPTION,true,bool,defined(OMIT_INITIALIZE_EXCEPTION)
+DEFAULT_ISTK,,,defined(DEFAULT_ISTK)
+TARGET_TSKATR,,,defined(TARGET_TSKATR),0
+TARGET_INTATR,,,defined(TARGET_INTATR),0
+TARGET_INHATR,,,defined(TARGET_INHATR),0
+TARGET_ISRATR,,,defined(TARGET_ISRATR),0
+TARGET_EXCATR,,,defined(TARGET_EXCATR),0
+TARGET_MIN_STKSZ,,,defined(TARGET_MIN_STKSZ),1
+TARGET_MIN_ISTKSZ,,,defined(TARGET_MIN_ISTKSZ),1
+CHECK_STKSZ_ALIGN,,,defined(CHECK_STKSZ_ALIGN),1
+CHECK_INTPTR_ALIGN,,,defined(CHECK_INTPTR_ALIGN),1
+CHECK_INTPTR_NONNULL,true,bool,defined(CHECK_INTPTR_NONNULL)
+CHECK_FUNC_ALIGN,,,defined(CHECK_FUNC_ALIGN),1
+CHECK_FUNC_NONNULL,true,bool,defined(CHECK_FUNC_NONNULL)
+CHECK_STACK_ALIGN,,,defined(CHECK_STACK_ALIGN),1
+CHECK_STACK_NONNULL,true,bool,defined(CHECK_STACK_NONNULL)
+CHECK_MPF_ALIGN,,,defined(CHECK_MPF_ALIGN),1
+CHECK_MPF_NONNULL,true,bool,defined(CHECK_MPF_NONNULL)
+CHECK_MB_ALIGN,,,defined(CHECK_MB_ALIGN),1
+sizeof_void_ptr,sizeof(void*)
+sizeof_uint_t,sizeof(uint_t)
+sizeof_size_t,sizeof(size_t)
+sizeof_intptr_t,sizeof(intptr_t)
+sizeof_ID,sizeof(ID)
+sizeof_FP,sizeof(FP)
+sizeof_INTNO,sizeof(INTNO)
+sizeof_INHNO,sizeof(INHNO)
+sizeof_EXCNO,sizeof(EXCNO)
+sizeof_TASK,sizeof(TASK)
+sizeof_TMEHDR,sizeof(TMEHDR)
+sizeof_ISR,sizeof(ISR)
+sizeof_INTHDR,sizeof(INTHDR)
+sizeof_EXCHDR,sizeof(EXCHDR)
+sizeof_INIRTN,sizeof(INIRTN)
+sizeof_TERRTN,sizeof(TERRTN)
+sizeof_NFYHDR,sizeof(NFYHDR)
+sizeof_TINIB,sizeof(TINIB)
+offsetof_TINIB_tskatr,"offsetof(TINIB,tskatr)"
+offsetof_TINIB_exinf,"offsetof(TINIB,exinf)"
+offsetof_TINIB_task,"offsetof(TINIB,task)"
+offsetof_TINIB_ipriority,"offsetof(TINIB,ipriority)"
+offsetof_TINIB_stksz,"offsetof(TINIB,stksz)",,!defined(USE_TSKINICTXB)
+offsetof_TINIB_stk,"offsetof(TINIB,stk)",,!defined(USE_TSKINICTXB)
+sizeof_SEMINIB,sizeof(SEMINIB)
+offsetof_SEMINIB_sematr,"offsetof(SEMINIB,sematr)"
+offsetof_SEMINIB_isemcnt,"offsetof(SEMINIB,isemcnt)"
+offsetof_SEMINIB_maxsem,"offsetof(SEMINIB,maxsem)"
+sizeof_FLGPTN,sizeof(FLGPTN)
+sizeof_FLGINIB,sizeof(FLGINIB)
+offsetof_FLGINIB_flgatr,"offsetof(FLGINIB,flgatr)"
+offsetof_FLGINIB_iflgptn,"offsetof(FLGINIB,iflgptn)"
+sizeof_DTQINIB,sizeof(DTQINIB)
+offsetof_DTQINIB_dtqatr,"offsetof(DTQINIB,dtqatr)"
+offsetof_DTQINIB_dtqcnt,"offsetof(DTQINIB,dtqcnt)"
+offsetof_DTQINIB_p_dtqmb,"offsetof(DTQINIB,p_dtqmb)"
+sizeof_PDQINIB,sizeof(PDQINIB)
+offsetof_PDQINIB_pdqatr,"offsetof(PDQINIB,pdqatr)"
+offsetof_PDQINIB_pdqcnt,"offsetof(PDQINIB,pdqcnt)"
+offsetof_PDQINIB_maxdpri,"offsetof(PDQINIB,maxdpri)"
+offsetof_PDQINIB_p_pdqmb,"offsetof(PDQINIB,p_pdqmb)"
+sizeof_MTXINIB,sizeof(MTXINIB)
+offsetof_MTXINIB_mtxatr,"offsetof(MTXINIB,mtxatr)"
+offsetof_MTXINIB_ceilpri,"offsetof(MTXINIB,ceilpri)"
+sizeof_MPFINIB,sizeof(MPFINIB)
+offsetof_MPFINIB_mpfatr,"offsetof(MPFINIB,mpfatr)"
+offsetof_MPFINIB_blkcnt,"offsetof(MPFINIB,blkcnt)"
+offsetof_MPFINIB_blksz,"offsetof(MPFINIB,blksz)"
+offsetof_MPFINIB_mpf,"offsetof(MPFINIB,mpf)"
+offsetof_MPFINIB_p_mpfmb,"offsetof(MPFINIB,p_mpfmb)"
+sizeof_CYCINIB,sizeof(CYCINIB)
+offsetof_CYCINIB_cycatr,"offsetof(CYCINIB,cycatr)"
+offsetof_CYCINIB_exinf,"offsetof(CYCINIB,exinf)"
+offsetof_CYCINIB_nfyhdr,"offsetof(CYCINIB,nfyhdr)"
+offsetof_CYCINIB_cyctim,"offsetof(CYCINIB,cyctim)"
+offsetof_CYCINIB_cycphs,"offsetof(CYCINIB,cycphs)"
+sizeof_ALMINIB,sizeof(ALMINIB)
+offsetof_ALMINIB_almatr,"offsetof(ALMINIB,almatr)"
+offsetof_ALMINIB_exinf,"offsetof(ALMINIB,exinf)"
+offsetof_ALMINIB_nfyhdr,"offsetof(ALMINIB,nfyhdr)"
+sizeof_ISRINIB,sizeof(ISRINIB)
+offsetof_ISRINIB_isratr,"offsetof(ISRINIB,isratr)"
+offsetof_ISRINIB_exinf,"offsetof(ISRINIB,exinf)"
+offsetof_ISRINIB_p_isr_queue,"offsetof(ISRINIB,p_isr_queue)"
+offsetof_ISRINIB_isr,"offsetof(ISRINIB,isr)"
+offsetof_ISRINIB_isrpri,"offsetof(ISRINIB,isrpri)"
+sizeof_INHINIB,sizeof(INHINIB),,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INHINIB_inhno,"offsetof(INHINIB,inhno)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INHINIB_inhatr,"offsetof(INHINIB,inhatr)",,!defined(OMIT_INITIALIZE_INTERRUPT),,
+offset_INHINIB_int_entry,"offsetof(INHINIB,int_entry)",,!defined(OMIT_INITIALIZE_INTERRUPT),,
+sizeof_INTINIB,sizeof(INTINIB),,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intno,"offsetof(INTINIB,intno)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intatr,"offsetof(INTINIB,intatr)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intpri,"offsetof(INTINIB,intpri)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+sizeof_EXCINIB,sizeof(EXCINIB),,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_excno,"offsetof(EXCINIB,excno)",,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_excatr,"offsetof(EXCINIB,excatr)",,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_exc_entry,"offsetof(EXCINIB,exc_entry)",,!defined(OMIT_INITIALIZE_EXCEPTION)
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_unrename.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_unrename.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/kernel_unrename.h	(revision 270)
@@ -0,0 +1,241 @@
+/* This file is generated from kernel_rename.def by genrename. */
+
+/* This file is included only when kernel_rename.h has been included. */
+#ifdef TOPPERS_KERNEL_RENAME_H
+#undef TOPPERS_KERNEL_RENAME_H
+
+/*
+ *  startup.c
+ */
+#undef kerflg
+#undef exit_kernel
+#undef initialize_kmm
+#undef kernel_malloc
+#undef kernel_free
+
+/*
+ *  task.c
+ */
+#undef p_runtsk
+#undef p_schedtsk
+#undef enadsp
+#undef dspflg
+#undef ready_queue
+#undef ready_primap
+#undef free_tcb
+#undef initialize_task
+#undef search_schedtsk
+#undef make_runnable
+#undef make_non_runnable
+#undef make_dormant
+#undef make_active
+#undef change_priority
+#undef rotate_ready_queue
+#undef task_terminate
+
+/*
+ *  taskhook.c
+ */
+#undef mtxhook_check_ceilpri
+#undef mtxhook_scan_ceilmtx
+#undef mtxhook_release_all
+
+/*
+ *  wait.c
+ */
+#undef make_wait_tmout
+#undef wait_complete
+#undef wait_tmout
+#undef wait_tmout_ok
+#undef wobj_make_wait
+#undef wobj_make_wait_tmout
+#undef init_wait_queue
+
+/*
+ *  time_event.c
+ */
+#undef boundary_evttim
+#undef current_evttim
+#undef current_hrtcnt
+#undef monotonic_evttim
+#undef systim_offset
+#undef in_signal_time
+#undef initialize_tmevt
+#undef tmevt_up
+#undef tmevt_down
+#undef update_current_evttim
+#undef set_hrt_event
+#undef tmevtb_register
+#undef tmevtb_enqueue
+#undef tmevtb_dequeue
+#undef check_adjtim
+#undef tmevt_lefttim
+#undef signal_time
+
+/*
+ *  semaphore.c
+ */
+#undef free_semcb
+#undef initialize_semaphore
+
+/*
+ *  eventflag.c
+ */
+#undef free_flgcb
+#undef initialize_eventflag
+#undef check_flg_cond
+
+/*
+ *  dataqueue.c
+ */
+#undef free_dtqcb
+#undef initialize_dataqueue
+#undef enqueue_data
+#undef force_enqueue_data
+#undef dequeue_data
+#undef send_data
+#undef force_send_data
+#undef receive_data
+
+/*
+ *  pridataq.c
+ */
+#undef free_pdqcb
+#undef initialize_pridataq
+#undef enqueue_pridata
+#undef dequeue_pridata
+#undef send_pridata
+#undef receive_pridata
+
+/*
+ *  mutex.c
+ */
+#undef free_mtxcb
+#undef initialize_mutex
+#undef mutex_check_ceilpri
+#undef mutex_scan_ceilmtx
+#undef mutex_drop_priority
+#undef mutex_acquire
+#undef mutex_release
+#undef mutex_release_all
+
+/*
+ *  mempfix.c
+ */
+#undef free_mpfcb
+#undef initialize_mempfix
+#undef get_mpf_block
+
+/*
+ *  time_manage.c
+ */
+#undef check_nfyinfo
+#undef notify_handler
+
+/*
+ *  cyclic.c
+ */
+#undef free_cyccb
+#undef initialize_cyclic
+#undef call_cyclic
+
+/*
+ *  alarm.c
+ */
+#undef free_almcb
+#undef initialize_alarm
+#undef call_alarm
+
+/*
+ *  interrupt.c
+ */
+#undef free_isrcb
+#undef initialize_isr
+#undef call_isr
+#undef initialize_interrupt
+
+/*
+ *  exception.c
+ */
+#undef initialize_exception
+
+/*
+ *  kernel_cfg.c
+ */
+#undef initialize_object
+#undef call_inirtn
+#undef call_terrtn
+#undef tmax_tskid
+#undef tmax_stskid
+#undef tinib_table
+#undef atinib_table
+#undef torder_table
+#undef tcb_table
+#undef tmax_semid
+#undef tmax_ssemid
+#undef seminib_table
+#undef aseminib_table
+#undef semcb_table
+#undef tmax_flgid
+#undef tmax_sflgid
+#undef flginib_table
+#undef aflginib_table
+#undef flgcb_table
+#undef tmax_dtqid
+#undef tmax_sdtqid
+#undef dtqinib_table
+#undef adtqinib_table
+#undef dtqcb_table
+#undef tmax_pdqid
+#undef tmax_spdqid
+#undef pdqinib_table
+#undef apdqinib_table
+#undef pdqcb_table
+#undef tmax_mtxid
+#undef tmax_smtxid
+#undef mtxinib_table
+#undef amtxinib_table
+#undef mtxcb_table
+#undef tmax_mpfid
+#undef tmax_smpfid
+#undef mpfinib_table
+#undef ampfinib_table
+#undef mpfcb_table
+#undef tmax_cycid
+#undef tmax_scycid
+#undef cycinib_table
+#undef acycinib_table
+#undef acyc_nfyinfo_table
+#undef cyccb_table
+#undef tmax_almid
+#undef tmax_salmid
+#undef alminib_table
+#undef aalminib_table
+#undef aalm_nfyinfo_table
+#undef almcb_table
+#undef tnum_isr_queue
+#undef isr_queue_list
+#undef isr_queue_table
+#undef tmax_isrid
+#undef tmax_sisrid
+#undef isrinib_table
+#undef aisrinib_table
+#undef isrorder_table
+#undef isrcb_table
+#undef tnum_def_inhno
+#undef inhinib_table
+#undef tnum_cfg_intno
+#undef intinib_table
+#undef tnum_def_excno
+#undef excinib_table
+#undef tmevt_heap
+#undef istksz
+#undef istk
+#undef istkpt
+#undef kmmsz
+#undef kmm
+
+
+#include "target_unrename.h"
+
+#endif /* TOPPERS_KERNEL_RENAME_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/mempfix.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/mempfix.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/mempfix.c	(revision 270)
@@ -0,0 +1,616 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		åºå®é·ã¡ã¢ãªãã¼ã«æ©è½
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+#include "wait.h"
+#include "mempfix.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_ACRE_MPF_ENTER
+#define LOG_ACRE_MPF_ENTER(pk_cmpf)
+#endif /* LOG_ACRE_MPF_ENTER */
+
+#ifndef LOG_ACRE_MPF_LEAVE
+#define LOG_ACRE_MPF_LEAVE(ercd)
+#endif /* LOG_ACRE_MPF_LEAVE */
+
+#ifndef LOG_DEL_MPF_ENTER
+#define LOG_DEL_MPF_ENTER(mpfid)
+#endif /* LOG_DEL_MPF_ENTER */
+
+#ifndef LOG_DEL_MPF_LEAVE
+#define LOG_DEL_MPF_LEAVE(ercd)
+#endif /* LOG_DEL_MPF_LEAVE */
+
+#ifndef LOG_GET_MPF_ENTER
+#define LOG_GET_MPF_ENTER(mpfid, p_blk)
+#endif /* LOG_GET_MPF_ENTER */
+
+#ifndef LOG_GET_MPF_LEAVE
+#define LOG_GET_MPF_LEAVE(ercd, p_blk)
+#endif /* LOG_GET_MPF_LEAVE */
+
+#ifndef LOG_PGET_MPF_ENTER
+#define LOG_PGET_MPF_ENTER(mpfid, p_blk)
+#endif /* LOG_PGET_MPF_ENTER */
+
+#ifndef LOG_PGET_MPF_LEAVE
+#define LOG_PGET_MPF_LEAVE(ercd, p_blk)
+#endif /* LOG_PGET_MPF_LEAVE */
+
+#ifndef LOG_TGET_MPF_ENTER
+#define LOG_TGET_MPF_ENTER(mpfid, p_blk, tmout)
+#endif /* LOG_TGET_MPF_ENTER */
+
+#ifndef LOG_TGET_MPF_LEAVE
+#define LOG_TGET_MPF_LEAVE(ercd, p_blk)
+#endif /* LOG_TGET_MPF_LEAVE */
+
+#ifndef LOG_REL_MPF_ENTER
+#define LOG_REL_MPF_ENTER(mpfid, blk)
+#endif /* LOG_REL_MPF_ENTER */
+
+#ifndef LOG_REL_MPF_LEAVE
+#define LOG_REL_MPF_LEAVE(ercd)
+#endif /* LOG_REL_MPF_LEAVE */
+
+#ifndef LOG_INI_MPF_ENTER
+#define LOG_INI_MPF_ENTER(mpfid)
+#endif /* LOG_INI_MPF_ENTER */
+
+#ifndef LOG_INI_MPF_LEAVE
+#define LOG_INI_MPF_LEAVE(ercd)
+#endif /* LOG_INI_MPF_LEAVE */
+
+#ifndef LOG_REF_MPF_ENTER
+#define LOG_REF_MPF_ENTER(mpfid, pk_rmpf)
+#endif /* LOG_REF_MPF_ENTER */
+
+#ifndef LOG_REF_MPF_LEAVE
+#define LOG_REF_MPF_LEAVE(ercd, pk_rmpf)
+#endif /* LOG_REF_MPF_LEAVE */
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«ã®æ°
+ */
+#define tnum_mpf	((uint_t)(tmax_mpfid - TMIN_MPFID + 1))
+#define tnum_smpf	((uint_t)(tmax_smpfid - TMIN_MPFID + 1))
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«IDããåºå®é·ã¡ã¢ãªãã¼ã«ç®¡çãã­ãã¯ãåãåºãã
+ *  ãã®ãã¯ã­
+ */
+#define INDEX_MPF(mpfid)	((uint_t)((mpfid) - TMIN_MPFID))
+#define get_mpfcb(mpfid)	(&(mpfcb_table[INDEX_MPF(mpfid)]))
+
+/*
+ *  ç¹æ®ãªã¤ã³ããã¯ã¹å¤ã®å®ç¾©
+ */
+#define INDEX_NULL		(~0U)		/* ç©ºããã­ãã¯ãªã¹ãã®æå¾ */
+#define INDEX_ALLOC		(~1U)		/* å²å½ã¦æ¸ã¿ã®ãã­ãã¯ */
+
+#ifdef TOPPERS_mpfini
+
+/*
+ *  ä½¿ç¨ãã¦ããªãåºå®é·ã¡ã¢ãªãã¼ã«ç®¡çãã­ãã¯ã®ãªã¹ã
+ */
+QUEUE	free_mpfcb;
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«æ©è½ã®åæå
+ */
+void
+initialize_mempfix(void)
+{
+	uint_t	i, j;
+	MPFCB	*p_mpfcb;
+	MPFINIB	*p_mpfinib;
+
+	for (i = 0; i < tnum_smpf; i++) {
+		p_mpfcb = &(mpfcb_table[i]);
+		queue_initialize(&(p_mpfcb->wait_queue));
+		p_mpfcb->p_mpfinib = &(mpfinib_table[i]);
+		p_mpfcb->fblkcnt = p_mpfcb->p_mpfinib->blkcnt;
+		p_mpfcb->unused = 0U;
+		p_mpfcb->freelist = INDEX_NULL;
+	}
+	queue_initialize(&free_mpfcb);
+	for (j = 0; i < tnum_mpf; i++, j++) {
+		p_mpfcb = &(mpfcb_table[i]);
+		p_mpfinib = &(ampfinib_table[j]);
+		p_mpfinib->mpfatr = TA_NOEXS;
+		p_mpfcb->p_mpfinib = ((const MPFINIB *) p_mpfinib);
+		queue_insert_prev(&free_mpfcb, &(p_mpfcb->wait_queue));
+	}
+}
+
+#endif /* TOPPERS_mpfini */
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«ãããã­ãã¯ãç²å¾
+ */
+#ifdef TOPPERS_mpfget
+
+void
+get_mpf_block(MPFCB *p_mpfcb, void **p_blk)
+{
+	uint_t	blkidx;
+
+	if (p_mpfcb->freelist != INDEX_NULL) {
+		blkidx = p_mpfcb->freelist;
+		p_mpfcb->freelist = (p_mpfcb->p_mpfinib->p_mpfmb + blkidx)->next;
+	}
+	else {
+		blkidx = p_mpfcb->unused;
+		p_mpfcb->unused++;
+	}
+	*p_blk = (void *)((char *)(p_mpfcb->p_mpfinib->mpf)
+								+ p_mpfcb->p_mpfinib->blksz * blkidx);
+	p_mpfcb->fblkcnt--;
+	(p_mpfcb->p_mpfinib->p_mpfmb + blkidx)->next = INDEX_ALLOC;
+}
+
+#endif /* TOPPERS_mpfget */
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«ã®çæ
+ */
+#ifdef TOPPERS_acre_mpf
+
+ER_UINT
+acre_mpf(const T_CMPF *pk_cmpf)
+{
+	MPFCB	*p_mpfcb;
+	MPFINIB	*p_mpfinib;
+	ATR		mpfatr;
+	uint_t	blkcnt;
+	uint_t	blksz;
+	MPF_T	*mpf;
+	MPFMB	*p_mpfmb;
+	ER		ercd;
+
+	LOG_ACRE_MPF_ENTER(pk_cmpf);
+	CHECK_TSKCTX_UNL();
+
+	mpfatr = pk_cmpf->mpfatr;
+	blkcnt = pk_cmpf->blkcnt;
+	blksz = pk_cmpf->blksz;
+	mpf = pk_cmpf->mpf;
+	p_mpfmb = pk_cmpf->mpfmb;
+
+	CHECK_RSATR(mpfatr, TA_TPRI);
+	CHECK_PAR(blkcnt != 0);
+	CHECK_PAR(blksz != 0);
+	if (mpf != NULL) {
+		CHECK_PAR(MPF_ALIGN(mpf));
+	}
+	if (p_mpfmb != NULL) {
+		CHECK_PAR(MB_ALIGN(p_mpfmb));
+	}
+
+	lock_cpu();
+	if (tnum_mpf == 0 || queue_empty(&free_mpfcb)) {
+		ercd = E_NOID;
+	}
+	else {
+		if (mpf == NULL) {
+			mpf = kernel_malloc(ROUND_MPF_T(blksz) * blkcnt);
+			mpfatr |= TA_MEMALLOC;
+		}
+		if (mpf == NULL) {
+			ercd = E_NOMEM;
+		}
+		else {
+			if (p_mpfmb == NULL) {
+				p_mpfmb = kernel_malloc(sizeof(MPFMB) * blkcnt);
+				mpfatr |= TA_MBALLOC;
+			}
+			if (p_mpfmb == NULL) {
+				if (mpf == NULL) {
+					kernel_free(mpf);
+				}
+				ercd = E_NOMEM;
+			}
+			else {
+				p_mpfcb = ((MPFCB *) queue_delete_next(&free_mpfcb));
+				p_mpfinib = (MPFINIB *)(p_mpfcb->p_mpfinib);
+				p_mpfinib->mpfatr = mpfatr;
+				p_mpfinib->blkcnt = blkcnt;
+				p_mpfinib->blksz = ROUND_MPF_T(blksz);
+				p_mpfinib->mpf = mpf;
+				p_mpfinib->p_mpfmb = p_mpfmb;
+
+				queue_initialize(&(p_mpfcb->wait_queue));
+				p_mpfcb->fblkcnt = p_mpfcb->p_mpfinib->blkcnt;
+				p_mpfcb->unused = 0U;
+				p_mpfcb->freelist = INDEX_NULL;
+				ercd = MPFID(p_mpfcb);
+			}
+		}
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_ACRE_MPF_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_acre_mpf */
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«ã®åé¤
+ */
+#ifdef TOPPERS_del_mpf
+
+ER
+del_mpf(ID mpfid)
+{
+	MPFCB	*p_mpfcb;
+	MPFINIB	*p_mpfinib;
+	ER		ercd;
+
+	LOG_DEL_MPF_ENTER(mpfid);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_MPFID(mpfid));
+	p_mpfcb = get_mpfcb(mpfid);
+
+	lock_cpu();
+	if (p_mpfcb->p_mpfinib->mpfatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (mpfid <= tmax_smpfid) {
+		ercd = E_OBJ;
+	}
+	else {
+		init_wait_queue(&(p_mpfcb->wait_queue));
+		p_mpfinib = (MPFINIB *)(p_mpfcb->p_mpfinib);
+		if ((p_mpfinib->mpfatr & TA_MEMALLOC) != 0U) {
+			kernel_free(p_mpfinib->mpf);
+		}
+		if ((p_mpfinib->mpfatr & TA_MBALLOC) != 0U) {
+			kernel_free(p_mpfinib->p_mpfmb);
+		}
+		p_mpfinib->mpfatr = TA_NOEXS;
+		queue_insert_prev(&free_mpfcb, &(p_mpfcb->wait_queue));
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_DEL_MPF_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_del_mpf */
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã­ãã¯ã®ç²å¾
+ */
+#ifdef TOPPERS_get_mpf
+
+ER
+get_mpf(ID mpfid, void **p_blk)
+{
+	MPFCB	*p_mpfcb;
+	WINFO_MPF winfo_mpf;
+	ER		ercd;
+
+	LOG_GET_MPF_ENTER(mpfid, p_blk);
+	CHECK_DISPATCH();
+	CHECK_ID(VALID_MPFID(mpfid));
+	p_mpfcb = get_mpfcb(mpfid);
+
+	lock_cpu_dsp();
+	if (p_mpfcb->p_mpfinib->mpfatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else if (p_mpfcb->fblkcnt > 0) {
+		get_mpf_block(p_mpfcb, p_blk);
+		ercd = E_OK;
+	}
+	else {
+		p_runtsk->tstat = TS_WAITING_MPF;
+		wobj_make_wait((WOBJCB *) p_mpfcb, (WINFO_WOBJ *) &winfo_mpf);
+		dispatch();
+		ercd = winfo_mpf.winfo.wercd;
+		if (ercd == E_OK) {
+			*p_blk = winfo_mpf.blk;
+		}
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_GET_MPF_LEAVE(ercd, p_blk);
+	return(ercd);
+}
+
+#endif /* TOPPERS_get_mpf */
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã­ãã¯ã®ç²å¾ï¼ãã¼ãªã³ã°ï¼
+ */
+#ifdef TOPPERS_pget_mpf
+
+ER
+pget_mpf(ID mpfid, void **p_blk)
+{
+	MPFCB	*p_mpfcb;
+	ER		ercd;
+
+	LOG_PGET_MPF_ENTER(mpfid, p_blk);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_MPFID(mpfid));
+	p_mpfcb = get_mpfcb(mpfid);
+
+	lock_cpu();
+	if (p_mpfcb->p_mpfinib->mpfatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (p_mpfcb->fblkcnt > 0) {
+		get_mpf_block(p_mpfcb, p_blk);
+		ercd = E_OK;
+	}
+	else {
+		ercd = E_TMOUT;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_PGET_MPF_LEAVE(ercd, p_blk);
+	return(ercd);
+}
+
+#endif /* TOPPERS_pget_mpf */
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã­ãã¯ã®ç²å¾ï¼ã¿ã¤ã ã¢ã¦ãããï¼
+ */
+#ifdef TOPPERS_tget_mpf
+
+ER
+tget_mpf(ID mpfid, void **p_blk, TMO tmout)
+{
+	MPFCB	*p_mpfcb;
+	WINFO_MPF winfo_mpf;
+	TMEVTB	tmevtb;
+	ER		ercd;
+
+	LOG_TGET_MPF_ENTER(mpfid, p_blk, tmout);
+	CHECK_DISPATCH();
+	CHECK_ID(VALID_MPFID(mpfid));
+	CHECK_PAR(VALID_TMOUT(tmout));
+	p_mpfcb = get_mpfcb(mpfid);
+
+	lock_cpu_dsp();
+	if (p_mpfcb->p_mpfinib->mpfatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else if (p_mpfcb->fblkcnt > 0) {
+		get_mpf_block(p_mpfcb, p_blk);
+		ercd = E_OK;
+	}
+	else if (tmout == TMO_POL) {
+		ercd = E_TMOUT;
+	}
+	else {
+		p_runtsk->tstat = TS_WAITING_MPF;
+		wobj_make_wait_tmout((WOBJCB *) p_mpfcb, (WINFO_WOBJ *) &winfo_mpf,
+														&tmevtb, tmout);
+		dispatch();
+		ercd = winfo_mpf.winfo.wercd;
+		if (ercd == E_OK) {
+			*p_blk = winfo_mpf.blk;
+		}
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_TGET_MPF_LEAVE(ercd, p_blk);
+	return(ercd);
+}
+
+#endif /* TOPPERS_tget_mpf */
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã­ãã¯ã®è¿å´
+ */
+#ifdef TOPPERS_rel_mpf
+
+ER
+rel_mpf(ID mpfid, void *blk)
+{
+	MPFCB	*p_mpfcb;
+	size_t	blkoffset;
+	uint_t	blkidx;
+	TCB		*p_tcb;
+	ER		ercd;
+    
+	LOG_REL_MPF_ENTER(mpfid, blk);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_MPFID(mpfid));
+	p_mpfcb = get_mpfcb(mpfid);
+
+	lock_cpu();
+	if (p_mpfcb->p_mpfinib->mpfatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		blkoffset = ((char *) blk) - (char *)(p_mpfcb->p_mpfinib->mpf);
+		blkidx = (uint_t)(blkoffset / p_mpfcb->p_mpfinib->blksz);
+		if (!(p_mpfcb->p_mpfinib->mpf <= blk)
+				|| !(blkoffset % p_mpfcb->p_mpfinib->blksz == 0U)
+				|| !(blkoffset / p_mpfcb->p_mpfinib->blksz < p_mpfcb->unused)
+				|| !((p_mpfcb->p_mpfinib->p_mpfmb + blkidx)->next
+															== INDEX_ALLOC)) {
+			ercd = E_PAR;
+		}
+		else if (!queue_empty(&(p_mpfcb->wait_queue))) {
+			p_tcb = (TCB *) queue_delete_next(&(p_mpfcb->wait_queue));
+			((WINFO_MPF *)(p_tcb->p_winfo))->blk = blk;
+			wait_complete(p_tcb);
+			if (p_runtsk != p_schedtsk) {
+				dispatch();
+			}
+			ercd = E_OK;
+		}
+		else {
+			p_mpfcb->fblkcnt++;
+			(p_mpfcb->p_mpfinib->p_mpfmb + blkidx)->next = p_mpfcb->freelist;
+			p_mpfcb->freelist = blkidx;
+			ercd = E_OK;
+		}
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_REL_MPF_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_rel_mpf */
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«ã®ååæå
+ */
+#ifdef TOPPERS_ini_mpf
+
+ER
+ini_mpf(ID mpfid)
+{
+	MPFCB	*p_mpfcb;
+	ER		ercd;
+    
+	LOG_INI_MPF_ENTER(mpfid);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_MPFID(mpfid));
+	p_mpfcb = get_mpfcb(mpfid);
+
+	lock_cpu();
+	if (p_mpfcb->p_mpfinib->mpfatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		init_wait_queue(&(p_mpfcb->wait_queue));
+		p_mpfcb->fblkcnt = p_mpfcb->p_mpfinib->blkcnt;
+		p_mpfcb->unused = 0U;
+		p_mpfcb->freelist = INDEX_NULL;
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_INI_MPF_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ini_mpf */
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«ã®ç¶æ
+åç
+§
+ */
+#ifdef TOPPERS_ref_mpf
+
+ER
+ref_mpf(ID mpfid, T_RMPF *pk_rmpf)
+{
+	MPFCB	*p_mpfcb;
+	ER		ercd;
+    
+	LOG_REF_MPF_ENTER(mpfid, pk_rmpf);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_MPFID(mpfid));
+	p_mpfcb = get_mpfcb(mpfid);
+
+	lock_cpu();
+	if (p_mpfcb->p_mpfinib->mpfatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		pk_rmpf->wtskid = wait_tskid(&(p_mpfcb->wait_queue));
+		pk_rmpf->fblkcnt = p_mpfcb->fblkcnt;
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_REF_MPF_LEAVE(ercd, pk_rmpf);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ref_mpf */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/mempfix.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/mempfix.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/mempfix.h	(revision 270)
@@ -0,0 +1,178 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		åºå®é·ã¡ã¢ãªãã¼ã«æ©è½
+ */
+
+#ifndef TOPPERS_MEMPFIX_H
+#define TOPPERS_MEMPFIX_H
+
+#include "kernel_impl.h"
+#include <queue.h>
+#include "wait.h"
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã­ãã¯ç®¡çãã­ãã¯
+ *
+ *  nextãã£ã¼ã«ãã«ã¯ï¼ã¡ã¢ãªãã­ãã¯ãå²å½ã¦æ¸ã¿ã®å ´åã¯INDEX_ALLOCãï¼
+ *  æªå²å½ã¦ã®å ´åã¯æ¬¡ã®æªå²å½ã¦ãã­ãã¯ã®ã¤ã³ããã¯ã¹çªå·ãæ ¼ç´ããï¼
+ *  æå¾ã®æªå²å½ã¦ãã­ãã¯ã®å ´åã«ã¯ï¼INDEX_NULLãæ ¼ç´ããï¼
+ */
+typedef struct fixed_memoryblock_management_block {
+	uint_t		next;			/* æ¬¡ã®æªå²å½ã¦ãã­ãã¯ */
+} MPFMB;
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«åæåãã­ãã¯
+ *
+ *  ãã®æ§é ä½ã¯ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®åæåãã­ãã¯ã®å
+±éé¨å
+ *  ï¼WOBJINIBï¼ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ï¼
+ *  æåã®ãã£ã¼ã«ããå
+±éã«ãªã£ã¦ããï¼
+ */
+typedef struct fixed_memorypool_initialization_block {
+	ATR			mpfatr;			/* åºå®é·ã¡ã¢ãªãã¼ã«å±æ§ */
+	uint_t		blkcnt;			/* ã¡ã¢ãªãã­ãã¯æ° */
+	uint_t		blksz;			/* ã¡ã¢ãªãã­ãã¯ã®ãµã¤ãºï¼ä¸¸ããå¤ï¼ */
+	void		*mpf;			/* åºå®é·ã¡ã¢ãªãã¼ã«é åã®å
+é ­çªå° */
+	MPFMB		*p_mpfmb;		/* åºå®é·ã¡ã¢ãªãã¼ã«ç®¡çé åã®å
+é ­çªå° */
+} MPFINIB;
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«ç®¡çãã­ãã¯
+ *
+ *  ãã®æ§é ä½ã¯ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®ç®¡çãã­ãã¯ã®å
+±éé¨åï¼WOBJCBï¼
+ *  ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ï¼æåã®2ã¤ã®
+ *  ãã£ã¼ã«ããå
+±éã«ãªã£ã¦ããï¼
+ */
+typedef struct fixed_memorypool_control_block {
+	QUEUE		wait_queue;		/* åºå®é·ã¡ã¢ãªãã¼ã«å¾
+ã¡ã­ã¥ã¼ */
+	const MPFINIB *p_mpfinib;	/* åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	uint_t		fblkcnt;		/* æªå²å½ã¦ãã­ãã¯æ° */
+	uint_t		unused;			/* æªä½¿ç¨ãã­ãã¯ã®å
+é ­ */
+	uint_t		freelist;		/* æªå²å½ã¦ãã­ãã¯ã®ãªã¹ã */
+} MPFCB;
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«å¾
+ã¡æ
+å ±ãã­ãã¯ã®å®ç¾©
+ *
+ *  ãã®æ§é ä½ã¯ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®å¾
+ã¡æ
+å ±ãã­ãã¯ã®å
+±éé¨å
+ *  ï¼WINFO_WOBJï¼ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ï¼
+ *  æåã®2ã¤ã®ãã£ã¼ã«ããå
+±éã«ãªã£ã¦ããï¼
+ */
+typedef struct fixed_memorypool_waiting_information {
+	WINFO		winfo;			/* æ¨æºã®å¾
+ã¡æ
+å ±ãã­ãã¯ */
+	MPFCB		*p_mpfcb;		/* å¾
+ã£ã¦ããåºå®é·ã¡ã¢ãªãã¼ã«ã®ç®¡çãã­ãã¯*/
+	void		*blk;			/* ç²å¾ããã¡ã¢ãªãã­ãã¯ */
+} WINFO_MPF;
+
+/*
+ *  ä½¿ç¨ãã¦ããªãåºå®é·ã¡ã¢ãªãã¼ã«ç®¡çãã­ãã¯ã®ãªã¹ã
+ */
+extern QUEUE	free_mpfcb;
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«IDã®æå¤§å¤ï¼kernel_cfg.cï¼
+ */
+extern const ID	tmax_mpfid;
+extern const ID	tmax_smpfid;
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«åæåãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern const MPFINIB	mpfinib_table[];
+extern MPFINIB			ampfinib_table[];
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«ç®¡çãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern MPFCB	mpfcb_table[];
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«ç®¡çãã­ãã¯ããåºå®é·ã¡ã¢ãªãã¼ã«IDãåãåºãã
+ *  ãã®ãã¯ã­
+ */
+#define	MPFID(p_mpfcb)	((ID)(((p_mpfcb) - mpfcb_table) + TMIN_MPFID))
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«æ©è½ã®åæå
+ */
+extern void	initialize_mempfix(void);
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«ãããã­ãã¯ãç²å¾
+ */
+extern void	get_mpf_block(MPFCB *p_mpfcb, void **p_blk);
+
+#endif /* TOPPERS_MEMPFIX_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/mempfix.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/mempfix.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/mempfix.trb	(revision 270)
@@ -0,0 +1,121 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: mempfix.trb 672 2016-03-05 15:33:08Z ertl-hiro $
+# 
+
+#
+#		åºå®é·ã¡ã¢ãªãã¼ã«æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class MempfixObject < KernelObject
+  def initialize()
+    super("mpf", "mempfix")
+  end
+
+  def prepare(key, params)
+    # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+    params[:mpf] ||= "NULL"
+    params[:mpfmb] ||= "NULL"
+
+    # mpfatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2225ï¼½
+    #ï¼TA_TPRIä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+    if (params[:mpfatr] & ~($TA_TPRI)) != 0
+      error_illegal_id("E_RSATR", params, :mpfatr, :mpfid)
+    end
+
+    # blkcntã0ã®å ´åï¼E_PARï¼ï¼»NGKI2229ï¼½
+    if params[:blkcnt] == 0
+      error_illegal_id("E_PAR", params, :blkcnt, :mpfid)
+    end
+
+    # blkszã0ã®å ´åï¼E_PARï¼ï¼»NGKI2230ï¼½
+    if params[:blksz] == 0
+      error_illegal_id("E_PAR", params, :blksz, :mpfid)
+    end
+
+    # åºå®é·ã¡ã¢ãªãã¼ã«é å
+    if params[:mpf] == "NULL"
+      mpfName = "_kernel_mpf_#{params[:mpfid]}"
+      $kernelCfgC.add("static MPF_T #{mpfName}" \
+				"[#{params[:blkcnt]} * COUNT_MPF_T(#{params[:blksz]})];")
+      params[:mpfinib_mpf] = mpfName
+    else
+      params[:mpfinib_mpf] = "(void *)(#{params[:mpf]})"
+    end
+
+    # mpfmbãNULLã§ãªãå ´åï¼E_NOSPTï¼ï¼»ASPS0166ï¼½
+    if params[:mpfmb] != "NULL"
+      error_illegal_id("E_NOSPT", params, :mpfmb, :mpfid)
+    end
+
+    # åºå®é·ã¡ã¢ãªãã¼ã«ç®¡çé å
+    mpfmbName = "_kernel_mpfmb_#{params[:mpfid]}"
+    $kernelCfgC.add("static MPFMB #{mpfmbName}[#{params[:blkcnt]}];")
+    params[:mpfinib_mpfmb] = mpfmbName
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:mpfatr]}), (#{params[:blkcnt]}), " \
+			"ROUND_MPF_T(#{params[:blksz]}), #{params[:mpfinib_mpf]}, " \
+			"#{params[:mpfinib_mpfmb]}")
+  end
+end
+
+#
+#  åºå®é·ã¡ã¢ãªãã¼ã«ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Fixed-sized Memorypool Functions")
+MempfixObject.new.generate()
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/mutex.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/mutex.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/mutex.c	(revision 270)
@@ -0,0 +1,795 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ãã¥ã¼ããã¯ã¹æ©è½
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+#include "taskhook.h"
+#include "wait.h"
+#include "mutex.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_ACRE_MTX_ENTER
+#define LOG_ACRE_MTX_ENTER(pk_cmtx)
+#endif /* LOG_ACRE_MTX_ENTER */
+
+#ifndef LOG_ACRE_MTX_LEAVE
+#define LOG_ACRE_MTX_LEAVE(ercd)
+#endif /* LOG_ACRE_MTX_LEAVE */
+
+#ifndef LOG_DEL_MTX_ENTER
+#define LOG_DEL_MTX_ENTER(mtxid)
+#endif /* LOG_DEL_MTX_ENTER */
+
+#ifndef LOG_DEL_MTX_LEAVE
+#define LOG_DEL_MTX_LEAVE(ercd)
+#endif /* LOG_DEL_MTX_LEAVE */
+
+#ifndef LOG_LOC_MTX_ENTER
+#define LOG_LOC_MTX_ENTER(mtxid)
+#endif /* LOG_LOC_MTX_ENTER */
+
+#ifndef LOG_LOC_MTX_LEAVE
+#define LOG_LOC_MTX_LEAVE(ercd)
+#endif /* LOG_LOC_MTX_LEAVE */
+
+#ifndef LOG_PLOC_MTX_ENTER
+#define LOG_PLOC_MTX_ENTER(mtxid)
+#endif /* LOG_PLOC_MTX_ENTER */
+
+#ifndef LOG_PLOC_MTX_LEAVE
+#define LOG_PLOC_MTX_LEAVE(ercd)
+#endif /* LOG_PLOC_MTX_LEAVE */
+
+#ifndef LOG_TLOC_MTX_ENTER
+#define LOG_TLOC_MTX_ENTER(mtxid, tmout)
+#endif /* LOG_TLOC_MTX_ENTER */
+
+#ifndef LOG_TLOC_MTX_LEAVE
+#define LOG_TLOC_MTX_LEAVE(ercd)
+#endif /* LOG_TLOC_MTX_LEAVE */
+
+#ifndef LOG_UNL_MTX_ENTER
+#define LOG_UNL_MTX_ENTER(mtxid)
+#endif /* LOG_UNL_MTX_ENTER */
+
+#ifndef LOG_UNL_MTX_LEAVE
+#define LOG_UNL_MTX_LEAVE(ercd)
+#endif /* LOG_UNL_MTX_LEAVE */
+
+#ifndef LOG_INI_MTX_ENTER
+#define LOG_INI_MTX_ENTER(mtxid)
+#endif /* LOG_INI_MTX_ENTER */
+
+#ifndef LOG_INI_MTX_LEAVE
+#define LOG_INI_MTX_LEAVE(ercd)
+#endif /* LOG_INI_MTX_LEAVE */
+
+#ifndef LOG_REF_MTX_ENTER
+#define LOG_REF_MTX_ENTER(mtxid, pk_rmtx)
+#endif /* LOG_REF_MTX_ENTER */
+
+#ifndef LOG_REF_MTX_LEAVE
+#define LOG_REF_MTX_LEAVE(ercd, pk_rmtx)
+#endif /* LOG_REF_MTX_LEAVE */
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®æ°
+ */
+#define tnum_mtx	((uint_t)(tmax_mtxid - TMIN_MTXID + 1))
+#define tnum_smtx	((uint_t)(tmax_smtxid - TMIN_MTXID + 1))
+
+/*
+ *  ãã¥ã¼ããã¯ã¹IDãããã¥ã¼ããã¯ã¹ç®¡çãã­ãã¯ãåãåºãããã®ãã¯ã­
+ */
+#define INDEX_MTX(mtxid)	((uint_t)((mtxid) - TMIN_MTXID))
+#define get_mtxcb(mtxid)	(&(mtxcb_table[INDEX_MTX(mtxid)]))
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®ãã­ãã³ã«ãå¤æ­ãããã¯ã­
+ */
+#define MTXPROTO_MASK			0x03U
+#define MTXPROTO(p_mtxcb)		((p_mtxcb)->p_mtxinib->mtxatr & MTXPROTO_MASK)
+#define MTX_CEILING(p_mtxcb)	(MTXPROTO(p_mtxcb) == TA_CEILING)
+
+#ifdef TOPPERS_mtxini
+
+/*
+ *  ä½¿ç¨ãã¦ããªããã¥ã¼ããã¯ã¹ç®¡çãã­ãã¯ã®ãªã¹ã
+ */
+QUEUE	free_mtxcb;
+
+/* 
+ *  ãã¥ã¼ããã¯ã¹æ©è½ã®åæå
+ */
+void
+initialize_mutex(void)
+{
+	uint_t	i, j;
+	MTXCB	*p_mtxcb;
+	MTXINIB	*p_mtxinib;
+
+	mtxhook_check_ceilpri = mutex_check_ceilpri;
+	mtxhook_scan_ceilmtx = mutex_scan_ceilmtx;
+	mtxhook_release_all = mutex_release_all;
+
+	for (i = 0; i < tnum_smtx; i++) {
+		p_mtxcb = &(mtxcb_table[i]);
+		queue_initialize(&(p_mtxcb->wait_queue));
+		p_mtxcb->p_mtxinib = &(mtxinib_table[i]);
+		p_mtxcb->p_loctsk = NULL;
+	}
+	queue_initialize(&free_mtxcb);
+	for (j = 0; i < tnum_mtx; i++, j++) {
+		p_mtxcb = &(mtxcb_table[i]);
+		p_mtxinib = &(amtxinib_table[j]);
+		p_mtxinib->mtxatr = TA_NOEXS;
+		p_mtxcb->p_mtxinib = ((const MTXINIB *) p_mtxinib);
+		queue_insert_prev(&free_mtxcb, &(p_mtxcb->wait_queue));
+	}
+}
+
+#endif /* TOPPERS_mtxini */
+
+/* 
+ *  ä¸éåªå
+åº¦éåã®ãã§ãã¯
+ */
+#ifdef TOPPERS_mtxchk
+
+bool_t
+mutex_check_ceilpri(TCB *p_tcb, uint_t bpriority)
+{
+	MTXCB	*p_mtxcb;
+
+	/*
+	 *  ã¿ã¹ã¯ãã­ãã¯ãã¦ããåªå
+åº¦ä¸éãã¥ã¼ããã¯ã¹ã®ä¸­ã§ï¼ä¸éåªå
+
+	 *  åº¦ãbpriorityãããä½ããã®ãããã°ï¼falseãè¿ãï¼
+	 */
+	p_mtxcb = p_tcb->p_lastmtx;
+	while (p_mtxcb != NULL) {
+		if (MTX_CEILING(p_mtxcb) && bpriority < p_mtxcb->p_mtxinib->ceilpri) {
+			return(false);
+		}
+		p_mtxcb = p_mtxcb->p_prevmtx;
+	}
+
+	/*
+	 *  ã¿ã¹ã¯ãåªå
+åº¦ä¸éãã¥ã¼ããã¯ã¹ã®ã­ãã¯ãå¾
+ã£ã¦ããå ´åã«ï¼ã
+	 *  ã®ä¸éåªå
+åº¦ãbpriorityãããä½ãããã°ï¼falseãè¿ãï¼
+	 */
+	if (TSTAT_WAIT_MTX(p_tcb->tstat)) {
+		p_mtxcb = ((WINFO_MTX *)(p_tcb->p_winfo))->p_mtxcb;
+		if (MTX_CEILING(p_mtxcb) && bpriority < p_mtxcb->p_mtxinib->ceilpri) {
+			return(false);
+		}
+	}
+
+	/*
+	 *  ãããã®æ¡ä»¶ã«ãå½ã¦ã¯ã¾ããªããã°trueãè¿ãï¼
+	 */
+	return(true);
+}
+
+#endif /* TOPPERS_mtxchk */
+
+/* 
+ *  åªå
+åº¦ä¸éãã¥ã¼ããã¯ã¹ãã­ãã¯ãã¦ãããã®ãã§ãã¯
+ */
+#ifdef TOPPERS_mtxscan
+
+bool_t
+mutex_scan_ceilmtx(TCB *p_tcb)
+{
+	MTXCB	*p_mtxcb;
+
+	p_mtxcb = p_tcb->p_lastmtx;
+	while (p_mtxcb != NULL) {
+		if (MTX_CEILING(p_mtxcb)) {
+			return(true);
+		}
+		p_mtxcb = p_mtxcb->p_prevmtx;
+	}
+	return(false);
+}
+
+#endif /* TOPPERS_mtxscan */
+
+/* 
+ *  ã¿ã¹ã¯ã®ç¾å¨åªå
+åº¦ã®è¨ç®
+ *
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ã®ç¾å¨åªå
+åº¦ï¼ã«è¨­å®ãã¹ãå¤ï¼ãè¨ç®ããï¼
+ */
+Inline uint_t
+mutex_calc_priority(TCB *p_tcb)
+{
+	uint_t	priority;
+	MTXCB	*p_mtxcb;
+
+	priority = p_tcb->bpriority;
+	p_mtxcb = p_tcb->p_lastmtx;
+	while (p_mtxcb != NULL) {
+		if (MTX_CEILING(p_mtxcb) && p_mtxcb->p_mtxinib->ceilpri < priority) {
+			priority = p_mtxcb->p_mtxinib->ceilpri;
+		}
+		p_mtxcb = p_mtxcb->p_prevmtx;
+	}
+	return(priority);
+}
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ãè§£æ¾ããå ´åã®ç¾å¨åªå
+åº¦å¤æ´å¦ç
+ */
+#ifdef TOPPERS_mtxdrop
+
+void
+mutex_drop_priority(TCB *p_tcb, MTXCB *p_mtxcb)
+{
+	uint_t	newpri;
+
+	if (MTX_CEILING(p_mtxcb)
+					&& p_mtxcb->p_mtxinib->ceilpri == p_tcb->priority) {
+		newpri = mutex_calc_priority(p_tcb);
+		if (newpri != p_tcb->priority) {
+			change_priority(p_tcb, newpri, true);
+		}
+	}
+}
+
+#endif /* TOPPERS_mtxdrop */
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®ã­ãã¯
+ */
+#ifdef TOPPERS_mtxacq
+
+void
+mutex_acquire(TCB *p_tcb, MTXCB *p_mtxcb)
+{
+	p_mtxcb->p_loctsk = p_tcb;
+	p_mtxcb->p_prevmtx = p_tcb->p_lastmtx;
+	p_tcb->p_lastmtx = p_mtxcb;
+	if (MTX_CEILING(p_mtxcb)
+					&& p_mtxcb->p_mtxinib->ceilpri < p_tcb->priority) {
+		change_priority(p_tcb, p_mtxcb->p_mtxinib->ceilpri, true);
+	}
+}
+
+#endif /* TOPPERS_mtxacq */
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®ã­ãã¯è§£é¤
+ */
+#ifdef TOPPERS_mtxrel
+
+void
+mutex_release(MTXCB *p_mtxcb)
+{
+	TCB		*p_tcb;
+
+	if (queue_empty(&(p_mtxcb->wait_queue))) {
+		p_mtxcb->p_loctsk = NULL;
+	}
+	else {
+		/*
+		 *  ãã¥ã¼ããã¯ã¹å¾
+ã¡ã­ã¥ã¼ã®å
+é ­ã¿ã¹ã¯ï¼p_tcbï¼ã«ï¼ãã¥ã¼ãã
+		 *  ã¯ã¹ãã­ãã¯ãããï¼
+		 */
+		p_tcb = (TCB *) queue_delete_next(&(p_mtxcb->wait_queue));
+		wait_dequeue_tmevtb(p_tcb);
+		p_tcb->p_winfo->wercd = E_OK;
+
+		p_mtxcb->p_loctsk = p_tcb;
+		p_mtxcb->p_prevmtx = p_tcb->p_lastmtx;
+		p_tcb->p_lastmtx = p_mtxcb;
+		if (MTX_CEILING(p_mtxcb)) {
+			if (p_mtxcb->p_mtxinib->ceilpri < p_tcb->priority) {
+				p_tcb->priority = p_mtxcb->p_mtxinib->ceilpri;
+			}
+		}
+		make_non_wait(p_tcb);
+	}
+}
+
+#endif /* TOPPERS_mtxrel */
+
+/*
+ *  ã¿ã¹ã¯ãã­ãã¯ãã¦ãããã¹ã¦ã®ãã¥ã¼ããã¯ã¹ã®ã­ãã¯è§£é¤
+ */
+#ifdef TOPPERS_mtxrela
+
+void
+mutex_release_all(TCB *p_tcb)
+{
+	MTXCB	*p_mtxcb;
+
+	while ((p_mtxcb = p_tcb->p_lastmtx) != NULL) {
+		p_tcb->p_lastmtx = p_mtxcb->p_prevmtx;
+		mutex_release(p_mtxcb);
+	}
+}
+
+#endif /* TOPPERS_mtxrela */
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®çæï¼»NGKI2022ï¼½
+ */
+#ifdef TOPPERS_acre_mtx
+
+ER_UINT
+acre_mtx(const T_CMTX *pk_cmtx)
+{
+	MTXCB	*p_mtxcb;
+	MTXINIB	*p_mtxinib;
+	ATR		mtxatr;
+	PRI		ceilpri;
+	ER		ercd;
+
+	LOG_ACRE_MTX_ENTER(pk_cmtx);
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2023ï¼½ï¼»NGKI2024ï¼½*/
+
+	mtxatr = pk_cmtx->mtxatr;
+	ceilpri = pk_cmtx->ceilpri;
+
+	if (mtxatr == TA_CEILING) {
+		CHECK_PAR(VALID_TPRI(ceilpri));			/*ï¼»NGKI2037ï¼½*/
+	}
+	else {
+		CHECK_RSATR(mtxatr, TA_TPRI);			/*ï¼»NGKI2025ï¼½*/
+	}
+
+	lock_cpu();
+	if (tnum_mtx == 0 || queue_empty(&free_mtxcb)) {
+		ercd = E_NOID;							/*ï¼»NGKI2031ï¼½*/
+	}
+	else {
+		p_mtxcb = ((MTXCB *) queue_delete_next(&free_mtxcb));
+		p_mtxinib = (MTXINIB *)(p_mtxcb->p_mtxinib);
+		p_mtxinib->mtxatr = mtxatr;
+		p_mtxinib->ceilpri = INT_PRIORITY(ceilpri);
+
+		queue_initialize(&(p_mtxcb->wait_queue));
+		p_mtxcb->p_loctsk = NULL;				/*ï¼»NGKI2033ï¼½*/
+		ercd = MTXID(p_mtxcb);
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_ACRE_MTX_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_acre_mtx */
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®åé¤ï¼»NGKI2056ï¼½
+ */
+#ifdef TOPPERS_del_mtx
+
+ER
+del_mtx(ID mtxid)
+{
+	MTXCB	*p_mtxcb, **pp_prevmtx;
+	MTXINIB	*p_mtxinib;
+	TCB		*p_loctsk;
+	ER		ercd;
+
+	LOG_DEL_MTX_ENTER(mtxid);
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2057ï¼½ï¼»NGKI2058ï¼½*/
+	CHECK_ID(VALID_MTXID(mtxid));				/*ï¼»NGKI2059ï¼½*/
+	p_mtxcb = get_mtxcb(mtxid);
+
+	lock_cpu();
+	if (p_mtxcb->p_mtxinib->mtxatr == TA_NOEXS) {
+		ercd = E_NOEXS;							/*ï¼»NGKI2060ï¼½*/
+	}
+	else if (mtxid <= tmax_smtxid) {
+		ercd = E_OBJ;							/*ï¼»NGKI2062ï¼½*/
+	}
+	else {
+		init_wait_queue(&(p_mtxcb->wait_queue));	/*ï¼»NGKI2065ï¼½*/
+		p_loctsk = p_mtxcb->p_loctsk;
+		if (p_loctsk != NULL) {
+			/*
+			 *  p_loctskãã­ãã¯ãã¦ãããã¥ã¼ããã¯ã¹ã®ãªã¹ãããå¯¾è±¡
+			 *  ãã¥ã¼ã¯ã¹ãåé¤ãï¼å¿
+è¦ãªå ´åã«ã¯p_loctskã®ç¾å¨åªå
+åº¦
+			 *  ãå¤æ´ããï¼»NGKI2064ï¼½ï¼
+			 */
+			pp_prevmtx = &(p_loctsk->p_lastmtx);
+			while (*pp_prevmtx != NULL) {
+				if (*pp_prevmtx == p_mtxcb) {
+					*pp_prevmtx = p_mtxcb->p_prevmtx;
+					break;
+				}
+				pp_prevmtx = &((*pp_prevmtx)->p_prevmtx);
+			}
+			mutex_drop_priority(p_loctsk, p_mtxcb);
+		}
+		p_mtxinib = (MTXINIB *)(p_mtxcb->p_mtxinib);
+		p_mtxinib->mtxatr = TA_NOEXS;						/*ï¼»NGKI2063ï¼½*/
+		queue_insert_prev(&free_mtxcb, &(p_mtxcb->wait_queue));
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_DEL_MTX_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_del_mtx */
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®ã­ãã¯
+ */
+#ifdef TOPPERS_loc_mtx
+
+ER
+loc_mtx(ID mtxid)
+{
+	MTXCB	*p_mtxcb;
+	WINFO_MTX winfo_mtx;
+	ER		ercd;
+
+	LOG_LOC_MTX_ENTER(mtxid);
+	CHECK_DISPATCH();
+	CHECK_ID(VALID_MTXID(mtxid));
+	p_mtxcb = get_mtxcb(mtxid);
+
+	lock_cpu_dsp();
+	if (p_mtxcb->p_mtxinib->mtxatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else if (MTX_CEILING(p_mtxcb)
+				&& p_runtsk->bpriority < p_mtxcb->p_mtxinib->ceilpri) {
+		ercd = E_ILUSE;
+	}
+	else if (p_mtxcb->p_loctsk == NULL) {
+		mutex_acquire(p_runtsk, p_mtxcb);
+		/*
+		 *  åªå
+åº¦ä¸éãã¥ã¼ããã¯ã¹ãã­ãã¯ããå ´åï¼p_runtskã®åªå
+åº¦
+		 *  ãä¸ããå¯è½æ§ããããï¼ãã£ã¹ããããå¿
+è¦ã«ãªããã¨ã¯ãªãï¼
+		 */
+		assert(p_runtsk == p_schedtsk);
+		ercd = E_OK;
+	}
+	else if (p_mtxcb->p_loctsk == p_runtsk) {
+		ercd = E_OBJ;
+	}
+	else {
+		p_runtsk->tstat = TS_WAITING_MTX;
+		wobj_make_wait((WOBJCB *) p_mtxcb, (WINFO_WOBJ *) &winfo_mtx);
+		dispatch();
+		ercd = winfo_mtx.winfo.wercd;
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_LOC_MTX_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_loc_mtx */
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®ã­ãã¯ï¼ãã¼ãªã³ã°ï¼
+ */
+#ifdef TOPPERS_ploc_mtx
+
+ER
+ploc_mtx(ID mtxid)
+{
+	MTXCB	*p_mtxcb;
+	ER		ercd;
+
+	LOG_PLOC_MTX_ENTER(mtxid);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_MTXID(mtxid));
+	p_mtxcb = get_mtxcb(mtxid);
+
+	lock_cpu();
+	if (p_mtxcb->p_mtxinib->mtxatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (MTX_CEILING(p_mtxcb)
+				&& p_runtsk->bpriority < p_mtxcb->p_mtxinib->ceilpri) {
+		ercd = E_ILUSE;
+	}
+	else if (p_mtxcb->p_loctsk == NULL) {
+		mutex_acquire(p_runtsk, p_mtxcb);
+		/*
+		 *  åªå
+åº¦ä¸éãã¥ã¼ããã¯ã¹ãã­ãã¯ããå ´åï¼p_runtskã®åªå
+åº¦
+		 *  ãä¸ããå¯è½æ§ããããï¼ãã£ã¹ããããå¿
+è¦ã«ãªããã¨ã¯ãªãï¼
+		 */
+		assert(p_runtsk == p_schedtsk);
+		ercd = E_OK;
+	}
+	else if (p_mtxcb->p_loctsk == p_runtsk) {
+		ercd = E_OBJ;
+	}
+	else {
+		ercd = E_TMOUT;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_PLOC_MTX_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ploc_mtx */
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®ã­ãã¯ï¼ã¿ã¤ã ã¢ã¦ãããï¼
+ */
+#ifdef TOPPERS_tloc_mtx
+
+ER
+tloc_mtx(ID mtxid, TMO tmout)
+{
+	MTXCB	*p_mtxcb;
+	WINFO_MTX winfo_mtx;
+	TMEVTB	tmevtb;
+	ER		ercd;
+
+	LOG_TLOC_MTX_ENTER(mtxid, tmout);
+	CHECK_DISPATCH();
+	CHECK_ID(VALID_MTXID(mtxid));
+	CHECK_PAR(VALID_TMOUT(tmout));
+	p_mtxcb = get_mtxcb(mtxid);
+
+	lock_cpu_dsp();
+	if (p_mtxcb->p_mtxinib->mtxatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else if (MTX_CEILING(p_mtxcb)
+				&& p_runtsk->bpriority < p_mtxcb->p_mtxinib->ceilpri) {
+		ercd = E_ILUSE;
+	}
+	else if (p_mtxcb->p_loctsk == NULL) {
+		mutex_acquire(p_runtsk, p_mtxcb);
+		/*
+		 *  åªå
+åº¦ä¸éãã¥ã¼ããã¯ã¹ãã­ãã¯ããå ´åï¼p_runtskã®åªå
+åº¦
+		 *  ãä¸ããå¯è½æ§ããããï¼ãã£ã¹ããããå¿
+è¦ã«ãªããã¨ã¯ãªãï¼
+		 */
+		assert(p_runtsk == p_schedtsk);
+		ercd = E_OK;
+	}
+	else if (p_mtxcb->p_loctsk == p_runtsk) {
+		ercd = E_OBJ;
+	}
+	else if (tmout == TMO_POL) {
+		ercd = E_TMOUT;
+	}
+	else {
+		p_runtsk->tstat = TS_WAITING_MTX;
+		wobj_make_wait_tmout((WOBJCB *) p_mtxcb, (WINFO_WOBJ *) &winfo_mtx,
+														&tmevtb, tmout);
+		dispatch();
+		ercd = winfo_mtx.winfo.wercd;
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_TLOC_MTX_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_tloc_mtx */
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®ã­ãã¯è§£é¤
+ */
+#ifdef TOPPERS_unl_mtx
+
+ER
+unl_mtx(ID mtxid)
+{
+	MTXCB	*p_mtxcb;
+	ER		ercd;
+    
+	LOG_UNL_MTX_ENTER(mtxid);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_MTXID(mtxid));
+	p_mtxcb = get_mtxcb(mtxid);
+
+	lock_cpu();
+	if (p_mtxcb->p_mtxinib->mtxatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (p_mtxcb != p_runtsk->p_lastmtx) {
+		ercd = E_OBJ;
+	}
+	else {
+		p_runtsk->p_lastmtx = p_mtxcb->p_prevmtx;
+		mutex_drop_priority(p_runtsk, p_mtxcb);
+		mutex_release(p_mtxcb);
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_UNL_MTX_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_unl_mtx */
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®ååæå
+ */
+#ifdef TOPPERS_ini_mtx
+
+ER
+ini_mtx(ID mtxid)
+{
+	MTXCB	*p_mtxcb, **pp_prevmtx;
+	TCB		*p_loctsk;
+	ER		ercd;
+    
+	LOG_INI_MTX_ENTER(mtxid);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_MTXID(mtxid));
+	p_mtxcb = get_mtxcb(mtxid);
+
+	lock_cpu();
+	if (p_mtxcb->p_mtxinib->mtxatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		init_wait_queue(&(p_mtxcb->wait_queue));
+		p_loctsk = p_mtxcb->p_loctsk;
+		if (p_loctsk != NULL) {
+			p_mtxcb->p_loctsk = NULL;
+			pp_prevmtx = &(p_loctsk->p_lastmtx);
+			while (*pp_prevmtx != NULL) {
+				if (*pp_prevmtx == p_mtxcb) {
+					*pp_prevmtx = p_mtxcb->p_prevmtx;
+					break;
+				}
+				pp_prevmtx = &((*pp_prevmtx)->p_prevmtx);
+			}
+			mutex_drop_priority(p_loctsk, p_mtxcb);
+		}
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_INI_MTX_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ini_mtx */
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®ç¶æ
+åç
+§
+ */
+#ifdef TOPPERS_ref_mtx
+
+ER
+ref_mtx(ID mtxid, T_RMTX *pk_rmtx)
+{
+	MTXCB	*p_mtxcb;
+	ER		ercd;
+    
+	LOG_REF_MTX_ENTER(mtxid, pk_rmtx);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_MTXID(mtxid));
+	p_mtxcb = get_mtxcb(mtxid);
+
+	lock_cpu();
+	if (p_mtxcb->p_mtxinib->mtxatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		pk_rmtx->htskid = (p_mtxcb->p_loctsk != NULL) ? TSKID(p_mtxcb->p_loctsk)
+														: TSK_NONE;
+		pk_rmtx->wtskid = wait_tskid(&(p_mtxcb->wait_queue));
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_REF_MTX_LEAVE(ercd, pk_rmtx);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ref_mtx */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/mutex.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/mutex.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/mutex.h	(revision 270)
@@ -0,0 +1,229 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ãã¥ã¼ããã¯ã¹æ©è½
+ */
+
+#ifndef TOPPERS_MUTEX_H
+#define TOPPERS_MUTEX_H
+
+#include "kernel_impl.h"
+#include <queue.h>
+#include "wait.h"
+
+/*
+ *  ãã¥ã¼ããã¯ã¹åæåãã­ãã¯
+ *
+ *  ãã®æ§é ä½ã¯ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®åæåãã­ãã¯ã®å
+±éé¨å
+ *  ï¼WOBJINIBï¼ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ï¼
+ *  æåã®ãã£ã¼ã«ããå
+±éã«ãªã£ã¦ããï¼
+ */
+typedef struct mutex_initialization_block {
+	ATR			mtxatr;			/* ãã¥ã¼ããã¯ã¹å±æ§ */
+	uint_t		ceilpri;		/* ãã¥ã¼ããã¯ã¹ã®ä¸éåªå
+åº¦ï¼å
+é¨è¡¨ç¾ï¼*/
+} MTXINIB;
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ç®¡çãã­ãã¯
+ *
+ *  ãã®æ§é ä½ã¯ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®ç®¡çãã­ãã¯ã®å
+±éé¨åï¼WOBJCBï¼
+ *  ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ï¼æåã®2ã¤ã®
+ *  ãã£ã¼ã«ããå
+±éã«ãªã£ã¦ããï¼
+ */
+struct mutex_control_block {
+	QUEUE		wait_queue;		/* ãã¥ã¼ããã¯ã¹å¾
+ã¡ã­ã¥ã¼ */
+	const MTXINIB *p_mtxinib;	/* åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	TCB			*p_loctsk;		/* ãã¥ã¼ããã¯ã¹ãã­ãã¯ãã¦ããã¿ã¹ã¯ */
+	MTXCB		*p_prevmtx;		/* ãã®åã«ã­ãã¯ãããã¥ã¼ããã¯ã¹ */
+};
+
+/*
+ *  ãã¥ã¼ããã¯ã¹å¾
+ã¡æ
+å ±ãã­ãã¯ã®å®ç¾©
+ *
+ *  ãã®æ§é ä½ã¯ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®å¾
+ã¡æ
+å ±ãã­ãã¯ã®å
+±éé¨å
+ *  ï¼WINFO_WOBJï¼ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ï¼
+ *  ãã¹ã¦ã®ãã£ã¼ã«ããå
+±éã«ãªã£ã¦ããï¼
+ */
+typedef struct mutex_waiting_information {
+	WINFO	winfo;			/* æ¨æºã®å¾
+ã¡æ
+å ±ãã­ãã¯ */
+	MTXCB	*p_mtxcb;		/* å¾
+ã£ã¦ãããã¥ã¼ããã¯ã¹ã®ç®¡çãã­ãã¯ */
+} WINFO_MTX;
+
+/*
+ *  ä½¿ç¨ãã¦ããªããã¥ã¼ããã¯ã¹ç®¡çãã­ãã¯ã®ãªã¹ã
+ */
+extern QUEUE	free_mtxcb;
+
+/*
+ *  ãã¥ã¼ããã¯ã¹IDã®æå¤§å¤ï¼kernel_cfg.cï¼
+ */
+extern const ID	tmax_mtxid;
+extern const ID	tmax_smtxid;
+
+/*
+ *  ãã¥ã¼ããã¯ã¹åæåãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern const MTXINIB	mtxinib_table[];
+extern MTXINIB			amtxinib_table[];
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ç®¡çãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern MTXCB	mtxcb_table[];
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ç®¡çãã­ãã¯ãããã¥ã¼ããã¯ã¹IDãåãåºãããã®ãã¯ã­
+ */
+#define	MTXID(p_mtxcb)	((ID)(((p_mtxcb) - mtxcb_table) + TMIN_MTXID))
+
+/*
+ *  ãã¥ã¼ããã¯ã¹æ©è½ã®åæå
+ */
+extern void	initialize_mutex(void);
+
+/*
+ *  ä¸éåªå
+åº¦éåã®ãã§ãã¯
+ *
+ *  chg_priã®ä¸­ã§ä¸éåªå
+åº¦éåã®ãã§ãã¯ãè¡ãããã«ç¨ããé¢æ°ã§ããï¼
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ãã­ãã¯ãã¦ããåªå
+åº¦ä¸éãã¥ã¼ããã¯ã¹ã¨ï¼
+ *  ã­ãã¯ãå¾
+ã£ã¦ããåªå
+åº¦ä¸éãã¥ã¼ããã¯ã¹ã®ä¸­ã§ï¼ä¸éåªå
+åº¦ã
+ *  bpriorityãããä½ããã®ãããã°falseãï¼ããã§ãªããã°trueãè¿ãï¼
+ */
+extern bool_t	mutex_check_ceilpri(TCB *p_tcb, uint_t bpriority);
+
+/* 
+ *  åªå
+åº¦ä¸éãã¥ã¼ããã¯ã¹ãã­ãã¯ãã¦ãããã®ãã§ãã¯
+ *
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ãåªå
+åº¦ä¸éãã¥ã¼ããã¯ã¹ãã­ãã¯ãã¦ããã°
+ *  trueï¼ããã§ãªããã°falseãè¿ãï¼
+ */
+extern bool_t	mutex_scan_ceilmtx(TCB *p_tcb);
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ãã­ãã¯è§£é¤ããå ´åã®ç¾å¨åªå
+åº¦å¤æ´å¦ç
+ *
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ãï¼p_mtxcbã§æå®ããããã¥ã¼ããã¯ã¹ãã­ã
+ *  ã¯è§£é¤ããéã®ç¾å¨åªå
+åº¦å¤æ´å¦çãè¡ãï¼
+ */
+extern void	mutex_drop_priority(TCB *p_tcb, MTXCB *p_mtxcb);
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®ã­ãã¯
+ *
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ã«ï¼p_mtxcbã§æå®ããããã¥ã¼ããã¯ã¹ãã­ã
+ *  ã¯ãããï¼
+ */
+extern void	mutex_acquire(TCB *p_tcb, MTXCB *p_mtxcb);
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®ã­ãã¯è§£é¤
+ *
+ *  p_mtxcbã§æå®ããããã¥ã¼ããã¯ã¹ãã­ãã¯è§£é¤ããï¼ã­ãã¯è§£é¤ãã
+ *  ãã¥ã¼ããã¯ã¹ã«ï¼ã­ãã¯å¾
+ã¡ç¶æ
+ã®ã¿ã¹ã¯ãããå ´åã«ã¯ï¼ãã®ã¿ã¹ã¯
+ *  ã«ãã¥ã¼ããã¯ã¹ãã­ãã¯ãããï¼
+ */
+extern void	mutex_release(MTXCB *p_mtxcb);
+
+/*
+ *  ã¿ã¹ã¯ãã­ãã¯ãã¦ãããã¹ã¦ã®ãã¥ã¼ããã¯ã¹ã®ã­ãã¯è§£é¤
+ *
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ã«ï¼ãããã­ãã¯ãã¦ãããã¹ã¦ã®ãã¥ã¼ããã¯
+ *  ã¹ãã­ãã¯è§£é¤ãããï¼ã­ãã¯è§£é¤ãããã¥ã¼ããã¯ã¹ã«ï¼ã­ãã¯å¾
+ã¡ç¶
+ *  æ
+ã®ã¿ã¹ã¯ãããå ´åã«ã¯ï¼ãã®ã¿ã¹ã¯ã«ãã¥ã¼ããã¯ã¹ãã­ãã¯ãããï¼
+ *
+ *  ãã®é¢æ°ã¯ï¼ã¿ã¹ã¯ã®çµäºæã«ä½¿ããããã®ã§ããããï¼p_tcbã§æå®ãã
+ *  ãã¿ã¹ã¯ã®åªå
+åº¦ãå¤æ´ããå¦çã¯è¡ããªãï¼ãã ãï¼ãã®é¢æ°ã®ä¸­ã§ä»
+ *  ã®ã¿ã¹ã¯ã®åªå
+åº¦ãå¤åãï¼å®è¡ãã¹ãã¿ã¹ã¯ãå¤ãããã¨ãããï¼ãã®
+ *  ããï¼ãã®é¢æ°ããæ»ã£ãå¾ã«ï¼ãã£ã¹ããããå¿
+è¦ãå¤å¥ãã¦ï¼å¿
+è¦ãª
+ *  å ´åã«ã¯ãã£ã¹ããããè¡ããªããã°ãªããªãï¼
+ */
+extern void	mutex_release_all(TCB *p_tcb);
+
+#endif /* TOPPERS_MUTEX_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/mutex.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/mutex.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/mutex.trb	(revision 270)
@@ -0,0 +1,108 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: mutex.trb 630 2016-02-14 11:30:17Z ertl-hiro $
+# 
+
+#
+#		ãã¥ã¼ããã¯ã¹æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class MutexObject < KernelObject
+  def initialize()
+    super("mtx", "mutex")
+  end
+
+  def prepare(key, params)
+    # mtxatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2025ï¼½
+    # ï¼TA_NULLï¼TA_TPRIï¼TA_CEILINGã®ãããã§ããªãå ´åï¼
+    if !(params[:mtxatr] == $TA_NULL || params[:mtxatr] == $TA_TPRI \
+										|| params[:mtxatr] == $TA_CEILING)
+      error_illegal_id("E_RSATR", params, :mtxatr, :mtxid)
+    end
+
+    if params[:mtxatr] == $TA_CEILING
+      # åªå
+åº¦ä¸éãã¥ã¼ããã¯ã¹ã®å ´å
+      # ceilpriãæªæå®ã®å ´åã¯ã¨ã©ã¼ã¨ãã
+      if params[:ceilpri].nil?
+        error_api(params, "ceilpri must be specified in %apiname of %mtxid")
+
+      # (TMIN_TPRI <= ceilpri && ceilpri <= TMAX_TPRI)ã§ãªãå ´åï¼E_PARï¼
+      # ï¼»NGKI2037ï¼½
+      elsif !($TMIN_TPRI <= params[:ceilpri] && params[:ceilpri] <= $TMAX_TPRI)
+        error_illegal_id("E_PAR", params, :ceilpri, :mtxid)
+      end
+    else
+      # åªå
+åº¦ä¸éãã¥ã¼ããã¯ã¹ã§ãªãå ´å
+      # ceilpriãæå®ããã¦ããå ´åã¯è­¦åã¡ãã»ã¼ã¸ãåºã
+      if !params[:ceilpri].nil?
+        warning_api(params, "%%ceilpri is ignored in %apiname of %mtxid")
+      end
+      params[:ceilpri] = 0
+    end
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:mtxatr]}), INT_PRIORITY(#{params[:ceilpri]})")
+  end
+end
+
+#
+#  ãã¥ã¼ããã¯ã¹ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Mutex Functions")
+MutexObject.new.generate()
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/pridataq.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/pridataq.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/pridataq.c	(revision 270)
@@ -0,0 +1,838 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		åªå
+åº¦ãã¼ã¿ã­ã¥ã¼æ©è½
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+#include "wait.h"
+#include "pridataq.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_ACRE_PDQ_ENTER
+#define LOG_ACRE_PDQ_ENTER(pk_cpdq)
+#endif /* LOG_ACRE_PDQ_ENTER */
+
+#ifndef LOG_ACRE_PDQ_LEAVE
+#define LOG_ACRE_PDQ_LEAVE(ercd)
+#endif /* LOG_ACRE_PDQ_LEAVE */
+
+#ifndef LOG_DEL_PDQ_ENTER
+#define LOG_DEL_PDQ_ENTER(pdqid)
+#endif /* LOG_DEL_PDQ_ENTER */
+
+#ifndef LOG_DEL_PDQ_LEAVE
+#define LOG_DEL_PDQ_LEAVE(ercd)
+#endif /* LOG_DEL_PDQ_LEAVE */
+
+#ifndef LOG_SND_PDQ_ENTER
+#define LOG_SND_PDQ_ENTER(pdqid, data, datapri)
+#endif /* LOG_SND_PDQ_ENTER */
+
+#ifndef LOG_SND_PDQ_LEAVE
+#define LOG_SND_PDQ_LEAVE(ercd)
+#endif /* LOG_SND_PDQ_LEAVE */
+
+#ifndef LOG_PSND_PDQ_ENTER
+#define LOG_PSND_PDQ_ENTER(pdqid, data, datapri)
+#endif /* LOG_PSND_PDQ_ENTER */
+
+#ifndef LOG_PSND_PDQ_LEAVE
+#define LOG_PSND_PDQ_LEAVE(ercd)
+#endif /* LOG_PSND_PDQ_LEAVE */
+
+#ifndef LOG_TSND_PDQ_ENTER
+#define LOG_TSND_PDQ_ENTER(pdqid, data, datapri, tmout)
+#endif /* LOG_TSND_PDQ_ENTER */
+
+#ifndef LOG_TSND_PDQ_LEAVE
+#define LOG_TSND_PDQ_LEAVE(ercd)
+#endif /* LOG_TSND_PDQ_LEAVE */
+
+#ifndef LOG_RCV_PDQ_ENTER
+#define LOG_RCV_PDQ_ENTER(pdqid, p_data, p_datapri)
+#endif /* LOG_RCV_PDQ_ENTER */
+
+#ifndef LOG_RCV_PDQ_LEAVE
+#define LOG_RCV_PDQ_LEAVE(ercd, p_data, p_datapri)
+#endif /* LOG_RCV_PDQ_LEAVE */
+
+#ifndef LOG_PRCV_PDQ_ENTER
+#define LOG_PRCV_PDQ_ENTER(pdqid, p_data, p_datapri)
+#endif /* LOG_PRCV_PDQ_ENTER */
+
+#ifndef LOG_PRCV_PDQ_LEAVE
+#define LOG_PRCV_PDQ_LEAVE(ercd, p_data, p_datapri)
+#endif /* LOG_PRCV_PDQ_LEAVE */
+
+#ifndef LOG_TRCV_PDQ_ENTER
+#define LOG_TRCV_PDQ_ENTER(pdqid, p_data, p_datapri, tmout)
+#endif /* LOG_TRCV_PDQ_ENTER */
+
+#ifndef LOG_TRCV_PDQ_LEAVE
+#define LOG_TRCV_PDQ_LEAVE(ercd, p_data, p_datapri)
+#endif /* LOG_TRCV_PDQ_LEAVE */
+
+#ifndef LOG_INI_PDQ_ENTER
+#define LOG_INI_PDQ_ENTER(pdqid)
+#endif /* LOG_INI_PDQ_ENTER */
+
+#ifndef LOG_INI_PDQ_LEAVE
+#define LOG_INI_PDQ_LEAVE(ercd)
+#endif /* LOG_INI_PDQ_LEAVE */
+
+#ifndef LOG_REF_PDQ_ENTER
+#define LOG_REF_PDQ_ENTER(pdqid, pk_rpdq)
+#endif /* LOG_REF_PDQ_ENTER */
+
+#ifndef LOG_REF_PDQ_LEAVE
+#define LOG_REF_PDQ_LEAVE(ercd, pk_rpdq)
+#endif /* LOG_REF_PDQ_LEAVE */
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã®æ°
+ */
+#define tnum_pdq	((uint_t)(tmax_pdqid - TMIN_PDQID + 1))
+#define tnum_spdq	((uint_t)(tmax_spdqid - TMIN_PDQID + 1))
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼IDããåªå
+åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çãã­ãã¯ãåãåºãã
+ *  ãã®ãã¯ã­
+ */
+#define INDEX_PDQ(pdqid)	((uint_t)((pdqid) - TMIN_PDQID))
+#define get_pdqcb(pdqid)	(&(pdqcb_table[INDEX_PDQ(pdqid)]))
+
+#ifdef TOPPERS_pdqini
+
+/*
+ *  ä½¿ç¨ãã¦ããªãåªå
+åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çãã­ãã¯ã®ãªã¹ã
+ */
+QUEUE	free_pdqcb;
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼æ©è½ã®åæå
+ */
+void
+initialize_pridataq(void)
+{
+	uint_t	i, j;
+	PDQCB	*p_pdqcb;
+	PDQINIB	*p_pdqinib;
+
+	for (i = 0; i < tnum_spdq; i++) {
+		p_pdqcb = &(pdqcb_table[i]);
+		queue_initialize(&(p_pdqcb->swait_queue));
+		p_pdqcb->p_pdqinib = &(pdqinib_table[i]);
+		queue_initialize(&(p_pdqcb->rwait_queue));
+		p_pdqcb->count = 0U;
+		p_pdqcb->p_head = NULL;
+		p_pdqcb->unused = 0U;
+		p_pdqcb->p_freelist = NULL;
+	}
+	queue_initialize(&free_pdqcb);
+	for (j = 0; i < tnum_pdq; i++, j++) {
+		p_pdqcb = &(pdqcb_table[i]);
+		p_pdqinib = &(apdqinib_table[j]);
+		p_pdqinib->pdqatr = TA_NOEXS;
+		p_pdqcb->p_pdqinib = ((const PDQINIB *) p_pdqinib);
+		queue_insert_prev(&free_pdqcb, &(p_pdqcb->swait_queue));
+	}
+}
+
+#endif /* TOPPERS_pdqini */
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çé åã¸ã®ãã¼ã¿ã®æ ¼ç´
+ */
+#ifdef TOPPERS_pdqenq
+
+void
+enqueue_pridata(PDQCB *p_pdqcb, intptr_t data, PRI datapri)
+{
+	PDQMB	*p_pdqmb;
+	PDQMB	**pp_prev_next, *p_next;
+
+	if (p_pdqcb->p_freelist != NULL) {
+		p_pdqmb = p_pdqcb->p_freelist;
+		p_pdqcb->p_freelist = p_pdqmb->p_next;
+	}
+	else {
+		p_pdqmb = p_pdqcb->p_pdqinib->p_pdqmb + p_pdqcb->unused;
+		p_pdqcb->unused++;
+	}
+
+	p_pdqmb->data = data;
+	p_pdqmb->datapri = datapri;
+
+	pp_prev_next = &(p_pdqcb->p_head);
+	while ((p_next = *pp_prev_next) != NULL) {
+		if (p_next->datapri > datapri) {
+			break;
+		}
+		pp_prev_next = &(p_next->p_next);
+	}
+	p_pdqmb->p_next = p_next;
+	*pp_prev_next = p_pdqmb;
+	p_pdqcb->count++;
+}
+
+#endif /* TOPPERS_pdqenq */
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çé åããã®ãã¼ã¿ã®ååºã
+ */
+#ifdef TOPPERS_pdqdeq
+
+void
+dequeue_pridata(PDQCB *p_pdqcb, intptr_t *p_data, PRI *p_datapri)
+{
+	PDQMB	*p_pdqmb;
+
+	p_pdqmb = p_pdqcb->p_head;
+	p_pdqcb->p_head = p_pdqmb->p_next;
+	p_pdqcb->count--;
+
+	*p_data = p_pdqmb->data;
+	*p_datapri = p_pdqmb->datapri;
+
+	p_pdqmb->p_next = p_pdqcb->p_freelist;
+	p_pdqcb->p_freelist = p_pdqmb;
+}
+
+#endif /* TOPPERS_pdqdeq */
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã¸ã®ãã¼ã¿éä¿¡
+ */
+#ifdef TOPPERS_pdqsnd
+
+bool_t
+send_pridata(PDQCB *p_pdqcb, intptr_t data, PRI datapri)
+{
+	TCB		*p_tcb;
+
+	if (!queue_empty(&(p_pdqcb->rwait_queue))) {
+		p_tcb = (TCB *) queue_delete_next(&(p_pdqcb->rwait_queue));
+		((WINFO_RPDQ *)(p_tcb->p_winfo))->data = data;
+		((WINFO_RPDQ *)(p_tcb->p_winfo))->datapri = datapri;
+		wait_complete(p_tcb);
+		return(true);
+	}
+	else if (p_pdqcb->count < p_pdqcb->p_pdqinib->pdqcnt) {
+		enqueue_pridata(p_pdqcb, data, datapri);
+		return(true);
+	}
+	else {
+		return(false);
+	}
+}
+
+#endif /* TOPPERS_pdqsnd */
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ããã®ãã¼ã¿åä¿¡
+ */
+#ifdef TOPPERS_pdqrcv
+
+bool_t
+receive_pridata(PDQCB *p_pdqcb, intptr_t *p_data, PRI *p_datapri)
+{
+	TCB		*p_tcb;
+	intptr_t data;
+	PRI		datapri;
+
+	if (p_pdqcb->count > 0U) {
+		dequeue_pridata(p_pdqcb, p_data, p_datapri);
+		if (!queue_empty(&(p_pdqcb->swait_queue))) {
+			p_tcb = (TCB *) queue_delete_next(&(p_pdqcb->swait_queue));
+			data = ((WINFO_SPDQ *)(p_tcb->p_winfo))->data;
+			datapri = ((WINFO_SPDQ *)(p_tcb->p_winfo))->datapri;
+			enqueue_pridata(p_pdqcb, data, datapri);
+			wait_complete(p_tcb);
+		}
+		return(true);
+	}
+	else if (!queue_empty(&(p_pdqcb->swait_queue))) {
+		p_tcb = (TCB *) queue_delete_next(&(p_pdqcb->swait_queue));
+		*p_data = ((WINFO_SPDQ *)(p_tcb->p_winfo))->data;
+		*p_datapri = ((WINFO_SPDQ *)(p_tcb->p_winfo))->datapri;
+		wait_complete(p_tcb);
+		return(true);
+	}
+	else {
+		return(false);
+	}
+}
+
+#endif /* TOPPERS_pdqrcv */
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã®çæ
+ */
+#ifdef TOPPERS_acre_pdq
+
+ER_UINT
+acre_pdq(const T_CPDQ *pk_cpdq)
+{
+	PDQCB	*p_pdqcb;
+	PDQINIB	*p_pdqinib;
+	ATR		pdqatr;
+	uint_t	pdqcnt;
+	PRI		maxdpri;
+	PDQMB	*p_pdqmb;
+	ER		ercd;
+
+	LOG_ACRE_PDQ_ENTER(pk_cpdq);
+	CHECK_TSKCTX_UNL();
+
+	pdqatr = pk_cpdq->pdqatr;
+	pdqcnt = pk_cpdq->pdqcnt;
+	maxdpri = pk_cpdq->maxdpri;
+	p_pdqmb = pk_cpdq->pdqmb;
+
+	CHECK_RSATR(pdqatr, TA_TPRI);
+	CHECK_PAR(VALID_DPRI(maxdpri));
+
+	lock_cpu();
+	if (tnum_pdq == 0 || queue_empty(&free_pdqcb)) {
+		ercd = E_NOID;
+	}
+	else {
+		if (pdqcnt != 0 && p_pdqmb == NULL) {
+			p_pdqmb = kernel_malloc(sizeof(PDQMB) * pdqcnt);
+			pdqatr |= TA_MBALLOC;
+		}
+		if (pdqcnt != 0 && p_pdqmb == NULL) {
+			ercd = E_NOMEM;
+		}
+		else {
+			p_pdqcb = ((PDQCB *) queue_delete_next(&free_pdqcb));
+			p_pdqinib = (PDQINIB *)(p_pdqcb->p_pdqinib);
+			p_pdqinib->pdqatr = pdqatr;
+			p_pdqinib->pdqcnt = pdqcnt;
+			p_pdqinib->maxdpri = maxdpri;
+			p_pdqinib->p_pdqmb = p_pdqmb;
+
+			queue_initialize(&(p_pdqcb->swait_queue));
+			queue_initialize(&(p_pdqcb->rwait_queue));
+			p_pdqcb->count = 0U;
+			p_pdqcb->p_head = NULL;
+			p_pdqcb->unused = 0U;
+			p_pdqcb->p_freelist = NULL;
+			ercd = PDQID(p_pdqcb);
+		}
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_ACRE_PDQ_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_acre_pdq */
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã®åé¤
+ */
+#ifdef TOPPERS_del_pdq
+
+ER
+del_pdq(ID pdqid)
+{
+	PDQCB	*p_pdqcb;
+	PDQINIB	*p_pdqinib;
+	ER		ercd;
+
+	LOG_DEL_PDQ_ENTER(pdqid);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_PDQID(pdqid));
+	p_pdqcb = get_pdqcb(pdqid);
+
+	lock_cpu();
+	if (p_pdqcb->p_pdqinib->pdqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (pdqid <= tmax_spdqid) {
+		ercd = E_OBJ;
+	}
+	else {
+		init_wait_queue(&(p_pdqcb->swait_queue));
+		init_wait_queue(&(p_pdqcb->rwait_queue));
+		p_pdqinib = (PDQINIB *)(p_pdqcb->p_pdqinib);
+		if ((p_pdqinib->pdqatr & TA_MBALLOC) != 0U) {
+			kernel_free(p_pdqinib->p_pdqmb);
+		}
+		p_pdqinib->pdqatr = TA_NOEXS;
+		queue_insert_prev(&free_pdqcb, &(p_pdqcb->swait_queue));
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_DEL_PDQ_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_del_pdq */
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
+ */
+#ifdef TOPPERS_snd_pdq
+
+ER
+snd_pdq(ID pdqid, intptr_t data, PRI datapri)
+{
+	PDQCB	*p_pdqcb;
+	WINFO_SPDQ winfo_spdq;
+	ER		ercd;
+
+	LOG_SND_PDQ_ENTER(pdqid, data, datapri);
+	CHECK_DISPATCH();
+	CHECK_ID(VALID_PDQID(pdqid));
+	p_pdqcb = get_pdqcb(pdqid);
+	CHECK_PAR(TMIN_DPRI <= datapri);
+
+	lock_cpu_dsp();
+	if (p_pdqcb->p_pdqinib->pdqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (datapri > p_pdqcb->p_pdqinib->maxdpri) {
+		ercd = E_PAR;
+	}
+	else if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else if (send_pridata(p_pdqcb, data, datapri)) {
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	else {
+		winfo_spdq.data = data;
+		winfo_spdq.datapri = datapri;
+		p_runtsk->tstat = TS_WAITING_SPDQ;
+		wobj_make_wait((WOBJCB *) p_pdqcb, (WINFO_WOBJ *) &winfo_spdq);
+		dispatch();
+		ercd = winfo_spdq.winfo.wercd;
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_SND_PDQ_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_snd_pdq */
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ï¼ãã¼ãªã³ã°ï¼
+ */
+#ifdef TOPPERS_psnd_pdq
+
+ER
+psnd_pdq(ID pdqid, intptr_t data, PRI datapri)
+{
+	PDQCB	*p_pdqcb;
+	ER		ercd;
+
+	LOG_PSND_PDQ_ENTER(pdqid, data, datapri);
+	CHECK_UNL();
+	CHECK_ID(VALID_PDQID(pdqid));
+	p_pdqcb = get_pdqcb(pdqid);
+	CHECK_PAR(TMIN_DPRI <= datapri);
+
+	lock_cpu();
+	if (p_pdqcb->p_pdqinib->pdqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (datapri > p_pdqcb->p_pdqinib->maxdpri) {
+		ercd = E_PAR;
+	}
+	else if (send_pridata(p_pdqcb, data, datapri)) {
+		if (p_runtsk != p_schedtsk) {
+			if (!sense_context()) {
+				dispatch();
+			}
+			else {
+				request_dispatch();
+			}
+		}
+		ercd = E_OK;
+	}
+	else {
+		ercd = E_TMOUT;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_PSND_PDQ_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_psnd_pdq */
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ï¼ã¿ã¤ã ã¢ã¦ãããï¼
+ */
+#ifdef TOPPERS_tsnd_pdq
+
+ER
+tsnd_pdq(ID pdqid, intptr_t data, PRI datapri, TMO tmout)
+{
+	PDQCB	*p_pdqcb;
+	WINFO_SPDQ winfo_spdq;
+	TMEVTB	tmevtb;
+	ER		ercd;
+
+	LOG_TSND_PDQ_ENTER(pdqid, data, datapri, tmout);
+	CHECK_DISPATCH();
+	CHECK_ID(VALID_PDQID(pdqid));
+	CHECK_PAR(VALID_TMOUT(tmout));
+	p_pdqcb = get_pdqcb(pdqid);
+	CHECK_PAR(TMIN_DPRI <= datapri);
+
+	lock_cpu_dsp();
+	if (p_pdqcb->p_pdqinib->pdqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (datapri > p_pdqcb->p_pdqinib->maxdpri) {
+		ercd = E_PAR;
+	}
+	else if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else if (send_pridata(p_pdqcb, data, datapri)) {
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	else if (tmout == TMO_POL) {
+		ercd = E_TMOUT;
+	}
+	else {
+		winfo_spdq.data = data;
+		winfo_spdq.datapri = datapri;
+		p_runtsk->tstat = TS_WAITING_SPDQ;
+		wobj_make_wait_tmout((WOBJCB *) p_pdqcb, (WINFO_WOBJ *) &winfo_spdq,
+														&tmevtb, tmout);
+		dispatch();
+		ercd = winfo_spdq.winfo.wercd;
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_TSND_PDQ_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_tsnd_pdq */
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ããã®åä¿¡
+ */
+#ifdef TOPPERS_rcv_pdq
+
+ER
+rcv_pdq(ID pdqid, intptr_t *p_data, PRI *p_datapri)
+{
+	PDQCB	*p_pdqcb;
+	WINFO_RPDQ winfo_rpdq;
+	ER		ercd;
+
+	LOG_RCV_PDQ_ENTER(pdqid, p_data, p_datapri);
+	CHECK_DISPATCH();
+	CHECK_ID(VALID_PDQID(pdqid));
+	p_pdqcb = get_pdqcb(pdqid);
+
+	lock_cpu_dsp();
+	if (p_pdqcb->p_pdqinib->pdqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else if (receive_pridata(p_pdqcb, p_data, p_datapri)) {
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	else {
+		p_runtsk->tstat = TS_WAITING_RPDQ;
+		make_wait(&(winfo_rpdq.winfo));
+		queue_insert_prev(&(p_pdqcb->rwait_queue), &(p_runtsk->task_queue));
+		winfo_rpdq.p_pdqcb = p_pdqcb;
+		LOG_TSKSTAT(p_runtsk);
+		dispatch();
+		ercd = winfo_rpdq.winfo.wercd;
+		if (ercd == E_OK) {
+			*p_data = winfo_rpdq.data;
+			*p_datapri = winfo_rpdq.datapri;
+		}
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_RCV_PDQ_LEAVE(ercd, p_data, p_datapri);
+	return(ercd);
+}
+
+#endif /* TOPPERS_rcv_pdq */
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ããã®åä¿¡ï¼ãã¼ãªã³ã°ï¼
+ */
+#ifdef TOPPERS_prcv_pdq
+
+ER
+prcv_pdq(ID pdqid, intptr_t *p_data, PRI *p_datapri)
+{
+	PDQCB	*p_pdqcb;
+	ER		ercd;
+
+	LOG_PRCV_PDQ_ENTER(pdqid, p_data, p_datapri);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_PDQID(pdqid));
+	p_pdqcb = get_pdqcb(pdqid);
+
+	lock_cpu();
+	if (p_pdqcb->p_pdqinib->pdqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (receive_pridata(p_pdqcb, p_data, p_datapri)) {
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	else {
+		ercd = E_TMOUT;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_PRCV_PDQ_LEAVE(ercd, p_data, p_datapri);
+	return(ercd);
+}
+
+#endif /* TOPPERS_prcv_pdq */
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ããã®åä¿¡ï¼ã¿ã¤ã ã¢ã¦ãããï¼
+ */
+#ifdef TOPPERS_trcv_pdq
+
+ER
+trcv_pdq(ID pdqid, intptr_t *p_data, PRI *p_datapri, TMO tmout)
+{
+	PDQCB	*p_pdqcb;
+	WINFO_RPDQ winfo_rpdq;
+	TMEVTB	tmevtb;
+	ER		ercd;
+
+	LOG_TRCV_PDQ_ENTER(pdqid, p_data, p_datapri, tmout);
+	CHECK_DISPATCH();
+	CHECK_ID(VALID_PDQID(pdqid));
+	CHECK_PAR(VALID_TMOUT(tmout));
+	p_pdqcb = get_pdqcb(pdqid);
+
+	lock_cpu_dsp();
+	if (p_pdqcb->p_pdqinib->pdqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else if (receive_pridata(p_pdqcb, p_data, p_datapri)) {
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	else if (tmout == TMO_POL) {
+		ercd = E_TMOUT;
+	}
+	else {
+		p_runtsk->tstat = TS_WAITING_RPDQ;
+		make_wait_tmout(&(winfo_rpdq.winfo), &tmevtb, tmout);
+		queue_insert_prev(&(p_pdqcb->rwait_queue), &(p_runtsk->task_queue));
+		winfo_rpdq.p_pdqcb = p_pdqcb;
+		LOG_TSKSTAT(p_runtsk);
+		dispatch();
+		ercd = winfo_rpdq.winfo.wercd;
+		if (ercd == E_OK) {
+			*p_data = winfo_rpdq.data;
+			*p_datapri = winfo_rpdq.datapri;
+		}
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_TRCV_PDQ_LEAVE(ercd, p_data, p_datapri);
+	return(ercd);
+}
+
+#endif /* TOPPERS_trcv_pdq */
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã®ååæå
+ */
+#ifdef TOPPERS_ini_pdq
+
+ER
+ini_pdq(ID pdqid)
+{
+	PDQCB	*p_pdqcb;
+	ER		ercd;
+    
+	LOG_INI_PDQ_ENTER(pdqid);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_PDQID(pdqid));
+	p_pdqcb = get_pdqcb(pdqid);
+
+	lock_cpu();
+	if (p_pdqcb->p_pdqinib->pdqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		init_wait_queue(&(p_pdqcb->swait_queue));
+		init_wait_queue(&(p_pdqcb->rwait_queue));
+		p_pdqcb->count = 0U;
+		p_pdqcb->p_head = NULL;
+		p_pdqcb->unused = 0U;
+		p_pdqcb->p_freelist = NULL;
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_INI_PDQ_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ini_pdq */
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã®ç¶æ
+åç
+§
+ */
+#ifdef TOPPERS_ref_pdq
+
+ER
+ref_pdq(ID pdqid, T_RPDQ *pk_rpdq)
+{
+	PDQCB	*p_pdqcb;
+	ER		ercd;
+    
+	LOG_REF_PDQ_ENTER(pdqid, pk_rpdq);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_PDQID(pdqid));
+	p_pdqcb = get_pdqcb(pdqid);
+
+	lock_cpu();
+	if (p_pdqcb->p_pdqinib->pdqatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		pk_rpdq->stskid = wait_tskid(&(p_pdqcb->swait_queue));
+		pk_rpdq->rtskid = wait_tskid(&(p_pdqcb->rwait_queue));
+		pk_rpdq->spdqcnt = p_pdqcb->count;
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_REF_PDQ_LEAVE(ercd, pk_rpdq);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ref_pdq */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/pridataq.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/pridataq.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/pridataq.h	(revision 270)
@@ -0,0 +1,234 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		åªå
+åº¦ãã¼ã¿ã­ã¥ã¼æ©è½
+ */
+
+#ifndef TOPPERS_PRIDATAQ_H
+#define TOPPERS_PRIDATAQ_H
+
+#include "kernel_impl.h"
+#include <queue.h>
+#include "wait.h"
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ç®¡çãã­ãã¯
+ */
+typedef struct pridata_management_block PDQMB;
+
+struct pridata_management_block {
+	PDQMB		*p_next;		/* æ¬¡ã®ãã¼ã¿ */
+	intptr_t	data;			/* ãã¼ã¿æ¬ä½ */
+	PRI			datapri;		/* ãã¼ã¿åªå
+åº¦ */
+};
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼åæåãã­ãã¯
+ *
+ *  ãã®æ§é ä½ã¯ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®åæåãã­ãã¯ã®å
+±éé¨å
+ *  ï¼WOBJINIBï¼ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ï¼
+ *  æåã®ãã£ã¼ã«ããå
+±éã«ãªã£ã¦ããï¼
+ */
+typedef struct pridataq_initialization_block {
+	ATR			pdqatr;			/* åªå
+åº¦ãã¼ã¿ã­ã¥ã¼å±æ§ */
+	uint_t		pdqcnt;			/* åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã®å®¹é */
+	PRI			maxdpri;		/* ãã¼ã¿åªå
+åº¦ã®æå¤§å¤ */
+	PDQMB		*p_pdqmb;		/* åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çé åã®å
+é ­çªå° */
+} PDQINIB;
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çãã­ãã¯
+ *
+ *  ãã®æ§é ä½ã¯ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®ç®¡çãã­ãã¯ã®å
+±éé¨åï¼WOBJCBï¼
+ *  ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ï¼æåã®2ã¤ã®
+ *  ãã£ã¼ã«ããå
+±éã«ãªã£ã¦ããï¼
+ */
+typedef struct pridataq_control_block {
+	QUEUE		swait_queue;	/* åªå
+åº¦ãã¼ã¿ã­ã¥ã¼éä¿¡å¾
+ã¡ã­ã¥ã¼ */
+	const PDQINIB *p_pdqinib;	/* åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	QUEUE		rwait_queue;	/* åªå
+åº¦ãã¼ã¿ã­ã¥ã¼åä¿¡å¾
+ã¡ã­ã¥ã¼ */
+	uint_t		count;			/* åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ä¸­ã®ãã¼ã¿ã®æ° */
+	PDQMB		*p_head;		/* æåã®ãã¼ã¿ */
+	uint_t		unused;			/* æªä½¿ç¨ãã¼ã¿ç®¡çãã­ãã¯ã®å
+é ­ */
+	PDQMB		*p_freelist;	/* æªå²å½ã¦ãã¼ã¿ç®¡çãã­ãã¯ã®ãªã¹ã */
+} PDQCB;
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼å¾
+ã¡æ
+å ±ãã­ãã¯ã®å®ç¾©
+ *
+ *  ãã®æ§é ä½ã¯ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®å¾
+ã¡æ
+å ±ãã­ãã¯ã®å
+±éé¨å
+ *  ï¼WINFO_WOBJï¼ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ï¼
+ *  æåã®2ã¤ã®ãã£ã¼ã«ããå
+±éã«ãªã£ã¦ããï¼
+ */
+typedef struct pridataq_send_waiting_information {
+	WINFO		winfo;			/* æ¨æºã®å¾
+ã¡æ
+å ±ãã­ãã¯ */
+	PDQCB		*p_pdqcb;		/* å¾
+ã£ã¦ããåªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã®ç®¡çãã­ãã¯*/
+	intptr_t	data;			/* éä¿¡ãã¼ã¿ */
+	PRI			datapri;		/* ãã¼ã¿åªå
+åº¦ */
+} WINFO_SPDQ;
+
+typedef struct pridataq_receive_waiting_information {
+	WINFO		winfo;			/* æ¨æºã®å¾
+ã¡æ
+å ±ãã­ãã¯ */
+	PDQCB		*p_pdqcb;		/* å¾
+ã£ã¦ããåªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã®ç®¡çãã­ãã¯*/
+	intptr_t	data;			/* åä¿¡ãã¼ã¿ */
+	PRI			datapri;		/* ãã¼ã¿åªå
+åº¦ */
+} WINFO_RPDQ;
+
+/*
+ *  ä½¿ç¨ãã¦ããªãåªå
+åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çãã­ãã¯ã®ãªã¹ã
+ */
+extern QUEUE	free_pdqcb;
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼IDã®æå¤§å¤ï¼kernel_cfg.cï¼
+ */
+extern const ID	tmax_pdqid;
+extern const ID	tmax_spdqid;
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼åæåãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern const PDQINIB	pdqinib_table[];
+extern PDQINIB			apdqinib_table[];
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern PDQCB	pdqcb_table[];
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çãã­ãã¯ããåªå
+åº¦ãã¼ã¿ã­ã¥ã¼IDãåãåºãã
+ *  ãã®ãã¯ã­
+ */
+#define	PDQID(p_pdqcb)	((ID)(((p_pdqcb) - pdqcb_table) + TMIN_PDQID))
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼æ©è½ã®åæå
+ */
+extern void	initialize_pridataq(void);
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çé åã¸ã®ãã¼ã¿ã®æ ¼ç´
+ */
+extern void	enqueue_pridata(PDQCB *p_pdqcb, intptr_t data, PRI datapri);
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çé åããã®ãã¼ã¿ã®ååºã
+ */
+extern void	dequeue_pridata(PDQCB *p_pdqcb, intptr_t *p_data, PRI *p_datapri);
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã¸ã®ãã¼ã¿éä¿¡
+ */
+extern bool_t	send_pridata(PDQCB *p_pdqcb, intptr_t data, PRI datapri);
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ããã®ãã¼ã¿åä¿¡
+ */
+extern bool_t	receive_pridata(PDQCB *p_pdqcb, intptr_t *p_data,
+														PRI *p_datapri);
+
+#endif /* TOPPERS_PRIDATAQ_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/pridataq.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/pridataq.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/pridataq.trb	(revision 270)
@@ -0,0 +1,112 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: pridataq.trb 668 2016-03-03 13:57:53Z ertl-hiro $
+# 
+
+#
+#		åªå
+åº¦ãã¼ã¿ã­ã¥ã¼æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class PridataqObject < KernelObject
+  def initialize()
+    super("pdq", "pridataq")
+  end
+
+  def prepare(key, params)
+    # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+    params[:pdqmb] ||= "NULL"
+
+    # pdqatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1804ï¼½
+    #ï¼TA_TPRIä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+    if (params[:pdqatr] & ~($TA_TPRI)) != 0
+      error_illegal_id("E_RSATR", params, :pdqatr, :pdqid)
+    end
+
+    # (TMIN_DPRI <= maxdpri && maxdpri <= TMAX_DPRI)ã§ãªãå ´åï¼E_PARï¼
+    # ï¼»NGKI1819ï¼½
+    if !($TMIN_DPRI <= params[:maxdpri] && params[:maxdpri] <= $TMAX_DPRI)
+      error_illegal_id("E_PAR", params, :maxdpri, :pdqid)
+    end
+
+    # pdqmbãNULLã§ãªãå ´åï¼E_NOSPTï¼ï¼»ASPS0142ï¼½
+    if params[:pdqmb] != "NULL"
+      error_illegal_id("E_NOSPT", params, :pdqmb, :pdqid)
+    end
+
+    # åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çé å
+    if params[:pdqcnt] > 0
+      pdqmbName = "_kernel_pdqmb_#{params[:pdqid]}"
+      $kernelCfgC.add("static PDQMB #{pdqmbName}[#{params[:pdqcnt]}];")
+      params[:pdqinib_pdqmb] = pdqmbName
+    else
+      params[:pdqinib_pdqmb] = "NULL"
+    end
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:pdqatr]}), (#{params[:pdqcnt]}), " \
+				"(#{params[:maxdpri]}), #{params[:pdqinib_pdqmb]}")
+  end
+end
+
+#
+#  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Priority Dataqueue Functions")
+PridataqObject.new.generate()
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/semaphore.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/semaphore.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/semaphore.c	(revision 270)
@@ -0,0 +1,523 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã»ããã©æ©è½
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+#include "wait.h"
+#include "semaphore.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_ACRE_SEM_ENTER
+#define LOG_ACRE_SEM_ENTER(pk_csem)
+#endif /* LOG_ACRE_SEM_ENTER */
+
+#ifndef LOG_ACRE_SEM_LEAVE
+#define LOG_ACRE_SEM_LEAVE(ercd)
+#endif /* LOG_ACRE_SEM_LEAVE */
+
+#ifndef LOG_DEL_SEM_ENTER
+#define LOG_DEL_SEM_ENTER(semid)
+#endif /* LOG_DEL_SEM_ENTER */
+
+#ifndef LOG_DEL_SEM_LEAVE
+#define LOG_DEL_SEM_LEAVE(ercd)
+#endif /* LOG_DEL_SEM_LEAVE */
+
+#ifndef LOG_SIG_SEM_ENTER
+#define LOG_SIG_SEM_ENTER(semid)
+#endif /* LOG_SIG_SEM_ENTER */
+
+#ifndef LOG_SIG_SEM_LEAVE
+#define LOG_SIG_SEM_LEAVE(ercd)
+#endif /* LOG_SIG_SEM_LEAVE */
+
+#ifndef LOG_WAI_SEM_ENTER
+#define LOG_WAI_SEM_ENTER(semid)
+#endif /* LOG_WAI_SEM_ENTER */
+
+#ifndef LOG_WAI_SEM_LEAVE
+#define LOG_WAI_SEM_LEAVE(ercd)
+#endif /* LOG_WAI_SEM_LEAVE */
+
+#ifndef LOG_POL_SEM_ENTER
+#define LOG_POL_SEM_ENTER(semid)
+#endif /* LOG_POL_SEM_ENTER */
+
+#ifndef LOG_POL_SEM_LEAVE
+#define LOG_POL_SEM_LEAVE(ercd)
+#endif /* LOG_POL_SEM_LEAVE */
+
+#ifndef LOG_TWAI_SEM_ENTER
+#define LOG_TWAI_SEM_ENTER(semid, tmout)
+#endif /* LOG_TWAI_SEM_ENTER */
+
+#ifndef LOG_TWAI_SEM_LEAVE
+#define LOG_TWAI_SEM_LEAVE(ercd)
+#endif /* LOG_TWAI_SEM_LEAVE */
+
+#ifndef LOG_INI_SEM_ENTER
+#define LOG_INI_SEM_ENTER(semid)
+#endif /* LOG_INI_SEM_ENTER */
+
+#ifndef LOG_INI_SEM_LEAVE
+#define LOG_INI_SEM_LEAVE(ercd)
+#endif /* LOG_INI_SEM_LEAVE */
+
+#ifndef LOG_REF_SEM_ENTER
+#define LOG_REF_SEM_ENTER(semid, pk_rsem)
+#endif /* LOG_REF_SEM_ENTER */
+
+#ifndef LOG_REF_SEM_LEAVE
+#define LOG_REF_SEM_LEAVE(ercd, pk_rsem)
+#endif /* LOG_REF_SEM_LEAVE */
+
+/*
+ *  ã»ããã©ã®æ°
+ */
+#define tnum_sem	((uint_t)(tmax_semid - TMIN_SEMID + 1))
+#define tnum_ssem	((uint_t)(tmax_ssemid - TMIN_SEMID + 1))
+
+/*
+ *  ã»ããã©IDããã»ããã©ç®¡çãã­ãã¯ãåãåºãããã®ãã¯ã­
+ */
+#define INDEX_SEM(semid)	((uint_t)((semid) - TMIN_SEMID))
+#define get_semcb(semid)	(&(semcb_table[INDEX_SEM(semid)]))
+
+#ifdef TOPPERS_semini
+
+/*
+ *  ä½¿ç¨ãã¦ããªãã»ããã©ç®¡çãã­ãã¯ã®ãªã¹ã
+ */
+QUEUE	free_semcb;
+
+/* 
+ *  ã»ããã©æ©è½ã®åæå
+ */
+void
+initialize_semaphore(void)
+{
+	uint_t	i, j;
+	SEMCB	*p_semcb;
+	SEMINIB	*p_seminib;
+
+	for (i = 0; i < tnum_ssem; i++) {
+		p_semcb = &(semcb_table[i]);
+		queue_initialize(&(p_semcb->wait_queue));
+		p_semcb->p_seminib = &(seminib_table[i]);
+		p_semcb->semcnt = p_semcb->p_seminib->isemcnt;
+	}
+	queue_initialize(&free_semcb);
+	for (j = 0; i < tnum_sem; i++, j++) {
+		p_semcb = &(semcb_table[i]);
+		p_seminib = &(aseminib_table[j]);
+		p_seminib->sematr = TA_NOEXS;
+		p_semcb->p_seminib = ((const SEMINIB *) p_seminib);
+		queue_insert_prev(&free_semcb, &(p_semcb->wait_queue));
+	}
+}
+
+#endif /* TOPPERS_semini */
+
+/*
+ *  ã»ããã©ã®çæ
+ */
+#ifdef TOPPERS_acre_sem
+
+ER_UINT
+acre_sem(const T_CSEM *pk_csem)
+{
+	SEMCB	*p_semcb;
+	SEMINIB	*p_seminib;
+	ATR		sematr;
+	uint_t	isemcnt, maxsem;
+	ER		ercd;
+
+	LOG_ACRE_SEM_ENTER(pk_csem);
+	CHECK_TSKCTX_UNL();
+
+	sematr = pk_csem->sematr;
+	isemcnt = pk_csem->isemcnt;
+	maxsem = pk_csem->maxsem;
+
+	CHECK_RSATR(sematr, TA_TPRI);
+	CHECK_PAR(0 <= isemcnt && isemcnt <= maxsem);
+	CHECK_PAR(1 <= maxsem && maxsem <= TMAX_MAXSEM);
+
+	lock_cpu();
+	if (tnum_sem == 0 || queue_empty(&free_semcb)) {
+		ercd = E_NOID;
+	}
+	else {
+		p_semcb = ((SEMCB *) queue_delete_next(&free_semcb));
+		p_seminib = (SEMINIB *)(p_semcb->p_seminib);
+		p_seminib->sematr = sematr;
+		p_seminib->isemcnt = isemcnt;
+		p_seminib->maxsem = maxsem;
+
+		queue_initialize(&(p_semcb->wait_queue));
+		p_semcb->semcnt = p_semcb->p_seminib->isemcnt;
+		ercd = SEMID(p_semcb);
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_ACRE_SEM_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_acre_sem */
+
+/*
+ *  ã»ããã©ã®åé¤
+ */
+#ifdef TOPPERS_del_sem
+
+ER
+del_sem(ID semid)
+{
+	SEMCB	*p_semcb;
+	SEMINIB	*p_seminib;
+	ER		ercd;
+
+	LOG_DEL_SEM_ENTER(semid);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_SEMID(semid));
+	p_semcb = get_semcb(semid);
+
+	lock_cpu();
+	if (p_semcb->p_seminib->sematr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (semid <= tmax_ssemid) {
+		ercd = E_OBJ;
+	}
+	else {
+		init_wait_queue(&(p_semcb->wait_queue));
+		p_seminib = (SEMINIB *)(p_semcb->p_seminib);
+		p_seminib->sematr = TA_NOEXS;
+		queue_insert_prev(&free_semcb, &(p_semcb->wait_queue));
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_DEL_SEM_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_del_sem */
+
+/*
+ *  ã»ããã©è³æºã®è¿å´
+ */
+#ifdef TOPPERS_sig_sem
+
+ER
+sig_sem(ID semid)
+{
+	SEMCB	*p_semcb;
+	TCB		*p_tcb;
+	ER		ercd;
+    
+	LOG_SIG_SEM_ENTER(semid);
+	CHECK_UNL();
+	CHECK_ID(VALID_SEMID(semid));
+	p_semcb = get_semcb(semid);
+
+	lock_cpu();
+	if (p_semcb->p_seminib->sematr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (!queue_empty(&(p_semcb->wait_queue))) {
+		p_tcb = (TCB *) queue_delete_next(&(p_semcb->wait_queue));
+		wait_complete(p_tcb);
+		if (p_runtsk != p_schedtsk) {
+			if (!sense_context()) {
+				dispatch();
+			}
+			else {
+				request_dispatch();
+			}
+		}
+		ercd = E_OK;
+	}
+	else if (p_semcb->semcnt < p_semcb->p_seminib->maxsem) {
+		p_semcb->semcnt += 1;
+		ercd = E_OK;
+	}
+	else {
+		ercd = E_QOVR;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_SIG_SEM_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_sig_sem */
+
+/*
+ *  ã»ããã©è³æºã®ç²å¾
+ */
+#ifdef TOPPERS_wai_sem
+
+ER
+wai_sem(ID semid)
+{
+	SEMCB	*p_semcb;
+	WINFO_SEM winfo_sem;
+	ER		ercd;
+
+	LOG_WAI_SEM_ENTER(semid);
+	CHECK_DISPATCH();
+	CHECK_ID(VALID_SEMID(semid));
+	p_semcb = get_semcb(semid);
+
+	lock_cpu_dsp();
+	if (p_semcb->p_seminib->sematr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else if (p_semcb->semcnt >= 1) {
+		p_semcb->semcnt -= 1;
+		ercd = E_OK;
+	}
+	else {
+		p_runtsk->tstat = TS_WAITING_SEM;
+		wobj_make_wait((WOBJCB *) p_semcb, (WINFO_WOBJ *) &winfo_sem);
+		dispatch();
+		ercd = winfo_sem.winfo.wercd;
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_WAI_SEM_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_wai_sem */
+
+/*
+ *  ã»ããã©è³æºã®ç²å¾ï¼ãã¼ãªã³ã°ï¼
+ */
+#ifdef TOPPERS_pol_sem
+
+ER
+pol_sem(ID semid)
+{
+	SEMCB	*p_semcb;
+	ER		ercd;
+
+	LOG_POL_SEM_ENTER(semid);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_SEMID(semid));
+	p_semcb = get_semcb(semid);
+
+	lock_cpu();
+	if (p_semcb->p_seminib->sematr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (p_semcb->semcnt >= 1) {
+		p_semcb->semcnt -= 1;
+		ercd = E_OK;
+	}
+	else {
+		ercd = E_TMOUT;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_POL_SEM_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_pol_sem */
+
+/*
+ *  ã»ããã©è³æºã®ç²å¾ï¼ã¿ã¤ã ã¢ã¦ãããï¼
+ */
+#ifdef TOPPERS_twai_sem
+
+ER
+twai_sem(ID semid, TMO tmout)
+{
+	SEMCB	*p_semcb;
+	WINFO_SEM winfo_sem;
+	TMEVTB	tmevtb;
+	ER		ercd;
+
+	LOG_TWAI_SEM_ENTER(semid, tmout);
+	CHECK_DISPATCH();
+	CHECK_ID(VALID_SEMID(semid));
+	CHECK_PAR(VALID_TMOUT(tmout));
+	p_semcb = get_semcb(semid);
+
+	lock_cpu_dsp();
+	if (p_semcb->p_seminib->sematr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else if (p_semcb->semcnt >= 1) {
+		p_semcb->semcnt -= 1;
+		ercd = E_OK;
+	}
+	else if (tmout == TMO_POL) {
+		ercd = E_TMOUT;
+	}
+	else {
+		p_runtsk->tstat = TS_WAITING_SEM;
+		wobj_make_wait_tmout((WOBJCB *) p_semcb, (WINFO_WOBJ *) &winfo_sem,
+														&tmevtb, tmout);
+		dispatch();
+		ercd = winfo_sem.winfo.wercd;
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_TWAI_SEM_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_twai_sem */
+
+/*
+ *  ã»ããã©ã®ååæå
+ */
+#ifdef TOPPERS_ini_sem
+
+ER
+ini_sem(ID semid)
+{
+	SEMCB	*p_semcb;
+	ER		ercd;
+    
+	LOG_INI_SEM_ENTER(semid);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_SEMID(semid));
+	p_semcb = get_semcb(semid);
+
+	lock_cpu();
+	if (p_semcb->p_seminib->sematr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		init_wait_queue(&(p_semcb->wait_queue));
+		p_semcb->semcnt = p_semcb->p_seminib->isemcnt;
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_INI_SEM_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ini_sem */
+
+/*
+ *  ã»ããã©ã®ç¶æ
+åç
+§
+ */
+#ifdef TOPPERS_ref_sem
+
+ER
+ref_sem(ID semid, T_RSEM *pk_rsem)
+{
+	SEMCB	*p_semcb;
+	ER		ercd;
+    
+	LOG_REF_SEM_ENTER(semid, pk_rsem);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_SEMID(semid));
+	p_semcb = get_semcb(semid);
+
+	lock_cpu();
+	if (p_semcb->p_seminib->sematr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		pk_rsem->wtskid = wait_tskid(&(p_semcb->wait_queue));
+		pk_rsem->semcnt = p_semcb->semcnt;
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_REF_SEM_LEAVE(ercd, pk_rsem);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ref_sem */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/semaphore.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/semaphore.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/semaphore.h	(revision 270)
@@ -0,0 +1,153 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã»ããã©æ©è½
+ */
+
+#ifndef TOPPERS_SEMAPHORE_H
+#define TOPPERS_SEMAPHORE_H
+
+#include "kernel_impl.h"
+#include <queue.h>
+#include "wait.h"
+
+/*
+ *  ã»ããã©åæåãã­ãã¯
+ *
+ *  ãã®æ§é ä½ã¯ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®åæåãã­ãã¯ã®å
+±éé¨å
+ *  ï¼WOBJINIBï¼ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ï¼
+ *  æåã®ãã£ã¼ã«ããå
+±éã«ãªã£ã¦ããï¼
+ */
+typedef struct semaphore_initialization_block {
+	ATR			sematr;			/* ã»ããã©å±æ§ */
+	uint_t		isemcnt;		/* ã»ããã©ã®è³æºæ°ã®åæå¤ */
+	uint_t		maxsem;			/* ã»ããã©ã®æå¤§è³æºæ° */
+} SEMINIB;
+
+/*
+ *  ã»ããã©ç®¡çãã­ãã¯
+ *
+ *  ãã®æ§é ä½ã¯ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®ç®¡çãã­ãã¯ã®å
+±éé¨åï¼WOBJCBï¼
+ *  ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ï¼æåã®2ã¤ã®
+ *  ãã£ã¼ã«ããå
+±éã«ãªã£ã¦ããï¼
+ */
+typedef struct semaphore_control_block {
+	QUEUE		wait_queue;		/* ã»ããã©å¾
+ã¡ã­ã¥ã¼ */
+	const SEMINIB *p_seminib;	/* åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	uint_t		semcnt;			/* ã»ããã©ç¾å¨ã«ã¦ã³ãå¤ */
+} SEMCB;
+
+/*
+ *  ã»ããã©å¾
+ã¡æ
+å ±ãã­ãã¯ã®å®ç¾©
+ *
+ *  ãã®æ§é ä½ã¯ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®å¾
+ã¡æ
+å ±ãã­ãã¯ã®å
+±éé¨å
+ *  ï¼WINFO_WOBJï¼ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ï¼
+ *  ãã¹ã¦ã®ãã£ã¼ã«ããå
+±éã«ãªã£ã¦ããï¼
+ */
+typedef struct semaphore_waiting_information {
+	WINFO	winfo;			/* æ¨æºã®å¾
+ã¡æ
+å ±ãã­ãã¯ */
+	SEMCB	*p_semcb;		/* å¾
+ã£ã¦ããã»ããã©ã®ç®¡çãã­ãã¯ */
+} WINFO_SEM;
+
+/*
+ *  ä½¿ç¨ãã¦ããªãã»ããã©ç®¡çãã­ãã¯ã®ãªã¹ã
+ */
+extern QUEUE	free_semcb;
+
+/*
+ *  ã»ããã©IDã®æå¤§å¤ï¼kernel_cfg.cï¼
+ */
+extern const ID	tmax_semid;
+extern const ID	tmax_ssemid;
+
+/*
+ *  ã»ããã©åæåãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern const SEMINIB	seminib_table[];
+extern SEMINIB			aseminib_table[];
+
+/*
+ *  ã»ããã©ç®¡çãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern SEMCB	semcb_table[];
+
+/*
+ *  ã»ããã©ç®¡çãã­ãã¯ããã»ããã©IDãåãåºãããã®ãã¯ã­
+ */
+#define	SEMID(p_semcb)	((ID)(((p_semcb) - semcb_table) + TMIN_SEMID))
+
+/*
+ *  ã»ããã©æ©è½ã®åæå
+ */
+extern void	initialize_semaphore(void);
+
+#endif /* TOPPERS_SEMAPHORE_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/semaphore.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/semaphore.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/semaphore.trb	(revision 270)
@@ -0,0 +1,95 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: semaphore.trb 588 2016-02-05 12:54:58Z ertl-hiro $
+# 
+
+#
+#		ã»ããã©æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class SemaphoreObject < KernelObject
+  def initialize()
+    super("sem", "semaphore")
+  end
+
+  def prepare(key, params)
+    # sematrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1456ï¼½
+    #ï¼TA_TPRIä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+    if (params[:sematr] & ~($TA_TPRI)) != 0
+      error_illegal_id("E_RSATR", params, :sematr, :semid)
+    end
+
+    # (1 <= maxsem && maxsem <= TMAX_MAXSEM)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI1468ï¼½
+    if !(1 <= params[:maxsem] && params[:maxsem] <= $TMAX_MAXSEM)
+      error_illegal_id("E_PAR", params, :maxsem, :semid)
+    end
+
+    # (0 <= isemcnt && isemcnt <= maxsem)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI1466ï¼½
+    if !(0 <= params[:isemcnt] && params[:isemcnt] <= params[:maxsem])
+      error_wrong_id("E_PAR", params, :isemcnt, :semid, "too large")
+    end
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:sematr]}), (#{params[:isemcnt]}), (#{params[:maxsem]})")
+  end
+end
+
+#
+#  ã»ããã©ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Semaphore Functions")
+SemaphoreObject.new.generate()
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/startup.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/startup.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/startup.c	(revision 270)
@@ -0,0 +1,244 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã«ã¼ãã«ã®åæåã¨çµäºå¦ç
+ */
+
+#include "kernel_impl.h"
+#include "time_event.h"
+#include <sil.h>
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_KER_ENTER
+#define LOG_KER_ENTER()
+#endif /* LOG_KER_ENTER */
+
+#ifndef LOG_KER_LEAVE
+#define LOG_KER_LEAVE()
+#endif /* LOG_KER_LEAVE */
+
+#ifndef LOG_EXT_KER_ENTER
+#define LOG_EXT_KER_ENTER()
+#endif /* LOG_EXT_KER_ENTER */
+
+#ifndef LOG_EXT_KER_LEAVE
+#define LOG_EXT_KER_LEAVE(ercd)
+#endif /* LOG_EXT_KER_LEAVE */
+
+#ifdef TOPPERS_sta_ker
+
+/*
+ *  ã«ã¼ãã«åä½ç¶æ
+ãã©ã°
+ *
+ *  ã¹ã¿ã¼ãã¢ããã«ã¼ãã³ã§ï¼falseï¼ï¼0ï¼ã«åæåããããã¨ãæå¾
+ãã¦
+ *  ããï¼
+ */
+bool_t	kerflg = false;
+
+/*
+ *  ã«ã¼ãã«ã®èµ·å
+ */
+void
+sta_ker(void)
+{
+	/*
+	 *  TECSã®åæå
+	 */
+#ifndef TOPPERS_OMIT_TECS
+	initialize_tecs();
+#endif /* TOPPERS_OMIT_TECS */
+
+	/*
+	 *  ã¿ã¼ã²ããä¾å­ã®åæå
+	 */
+	target_initialize();
+
+	/*
+	 *  åã¢ã¸ã¥ã¼ã«ã®åæå
+	 *
+	 *  ã¿ã¤ã ã¤ãã³ãç®¡çã¢ã¸ã¥ã¼ã«ã¯ä»ã®ã¢ã¸ã¥ã¼ã«ããå
+ã«åæå
+	 *  ããå¿
+è¦ãããï¼
+	 */
+	initialize_kmm();
+	initialize_tmevt();								/*ï¼»ASPD1061ï¼½*/
+	initialize_object();
+
+	/*
+	 *  åæåã«ã¼ãã³ã®å®è¡
+	 */ 
+	call_inirtn();
+
+	/*
+	 *  é«åè§£è½ã¿ã¤ãã®è¨­å®
+	 */
+	current_hrtcnt = target_hrt_get_current();		/*ï¼»ASPD1063ï¼½*/
+	set_hrt_event();								/*ï¼»ASPD1064ï¼½*/
+
+	/*
+	 *  ã«ã¼ãã«åä½ã®éå§
+	 */
+	kerflg = true;
+	LOG_KER_ENTER();
+	start_dispatch();
+	assert(0);
+}
+
+#endif /* TOPPERS_sta_ker */
+
+/*
+ *  ã«ã¼ãã«ã®çµäº
+ */
+#ifdef TOPPERS_ext_ker
+
+ER
+ext_ker(void)
+{
+	SIL_PRE_LOC;
+
+	LOG_EXT_KER_ENTER();
+
+	/*
+	 *  å²è¾¼ã¿ã­ãã¯ç¶æ
+ã«ç§»è¡
+	 */
+	SIL_LOC_INT();
+
+	/*
+	 *  ã«ã¼ãã«åä½ã®çµäº
+	 */
+	LOG_KER_LEAVE();
+	kerflg = false;
+
+	/*
+	 *  ã«ã¼ãã«ã®çµäºå¦çã®å¼åºã
+	 *
+	 *  éã¿ã¹ã¯ã³ã³ãã­ã¹ãã«åãæãã¦ï¼exit_kernelãå¼ã³åºãï¼
+	 */
+	call_exit_kernel();
+
+	/*
+	 *  ã³ã³ãã¤ã©ã®è­¦åå¯¾ç­ï¼ããã¸æ¥ããã¨ã¯ãªãã¯ãï¼
+	 */
+	SIL_UNL_INT();
+	LOG_EXT_KER_LEAVE(E_SYS);
+	return(E_SYS);
+}
+
+/*
+ *  ã«ã¼ãã«ã®çµäºå¦ç
+ */
+void
+exit_kernel(void)
+{
+	/*
+	 *  çµäºå¦çã«ã¼ãã³ã®å®è¡
+	 */
+	call_terrtn();
+
+	/*
+	 *  ã¿ã¼ã²ããä¾å­ã®çµäºå¦ç
+	 */
+	target_exit();
+	assert(0);
+}
+
+#endif /* TOPPERS_ext_ker */
+
+/*
+ *  ã«ã¼ãã«ã®å²ãä»ããã¡ã¢ãªé åã®ç®¡ç
+ *
+ *  ã¡ã¢ãªé åãå
+é ­ããé ã«å²ãå½ã¦ï¼è§£æ¾ãããã¡ã¢ãªé åãåå©ç¨ããª
+ *  ãã¡ã¢ãªç®¡çã¢ã¸ã¥ã¼ã«ï¼
+ */
+#ifdef TOPPERS_kermem
+#ifndef OMIT_KMM_ALLOCONLY
+
+static void	*kmm_brk;
+
+void
+initialize_kmm(void)
+{
+	kmm_brk = ((char *) kmm) + kmmsz;
+}
+
+void *
+kernel_malloc(size_t size)
+{
+	if (((char *) kmm_brk) - ((char *) kmm) >= size) {
+		kmm_brk = ((char *) kmm_brk) - size;
+		return(kmm_brk);
+	}
+	else {
+		return(NULL);
+	}
+}
+
+void
+kernel_free(void *ptr)
+{
+}
+
+#endif /* OMIT_KMM_ALLOCONLY */
+#endif /* TOPPERS_kermem */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/sys_manage.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/sys_manage.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/sys_manage.c	(revision 270)
@@ -0,0 +1,551 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ã¹ãã ç¶æ
+ç®¡çæ©è½
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_ROT_RDQ_ENTER
+#define LOG_ROT_RDQ_ENTER(tskpri)
+#endif /* LOG_ROT_RDQ_ENTER */
+
+#ifndef LOG_ROT_RDQ_LEAVE
+#define LOG_ROT_RDQ_LEAVE(ercd)
+#endif /* LOG_ROT_RDQ_LEAVE */
+
+#ifndef LOG_GET_TID_ENTER
+#define LOG_GET_TID_ENTER(p_tskid)
+#endif /* LOG_GET_TID_ENTER */
+
+#ifndef LOG_GET_TID_LEAVE
+#define LOG_GET_TID_LEAVE(ercd, p_tskid)
+#endif /* LOG_GET_TID_LEAVE */
+
+#ifndef LOG_GET_LOD_ENTER
+#define LOG_GET_LOD_ENTER(tskpri, p_load)
+#endif /* LOG_GET_LOD_ENTER */
+
+#ifndef LOG_GET_LOD_LEAVE
+#define LOG_GET_LOD_LEAVE(ercd, p_load)
+#endif /* LOG_GET_LOD_LEAVE */
+
+#ifndef LOG_GET_NTH_ENTER
+#define LOG_GET_NTH_ENTER(tskpri, nth, p_tskid)
+#endif /* LOG_GET_NTH_ENTER */
+
+#ifndef LOG_GET_NTH_LEAVE
+#define LOG_GET_NTH_LEAVE(ercd, p_tskid)
+#endif /* LOG_GET_NTH_LEAVE */
+
+#ifndef LOG_LOC_CPU_ENTER
+#define LOG_LOC_CPU_ENTER()
+#endif /* LOG_LOC_CPU_ENTER */
+
+#ifndef LOG_LOC_CPU_LEAVE
+#define LOG_LOC_CPU_LEAVE(ercd)
+#endif /* LOG_LOC_CPU_LEAVE */
+
+#ifndef LOG_UNL_CPU_ENTER
+#define LOG_UNL_CPU_ENTER()
+#endif /* LOG_UNL_CPU_ENTER */
+
+#ifndef LOG_UNL_CPU_LEAVE
+#define LOG_UNL_CPU_LEAVE(ercd)
+#endif /* LOG_UNL_CPU_LEAVE */
+
+#ifndef LOG_DIS_DSP_ENTER
+#define LOG_DIS_DSP_ENTER()
+#endif /* LOG_DIS_DSP_ENTER */
+
+#ifndef LOG_DIS_DSP_LEAVE
+#define LOG_DIS_DSP_LEAVE(ercd)
+#endif /* LOG_DIS_DSP_LEAVE */
+
+#ifndef LOG_ENA_DSP_ENTER
+#define LOG_ENA_DSP_ENTER()
+#endif /* LOG_ENA_DSP_ENTER */
+
+#ifndef LOG_ENA_DSP_LEAVE
+#define LOG_ENA_DSP_LEAVE(ercd)
+#endif /* LOG_ENA_DSP_LEAVE */
+
+#ifndef LOG_SNS_CTX_ENTER
+#define LOG_SNS_CTX_ENTER()
+#endif /* LOG_SNS_CTX_ENTER */
+
+#ifndef LOG_SNS_CTX_LEAVE
+#define LOG_SNS_CTX_LEAVE(state)
+#endif /* LOG_SNS_CTX_LEAVE */
+
+#ifndef LOG_SNS_LOC_ENTER
+#define LOG_SNS_LOC_ENTER()
+#endif /* LOG_SNS_LOC_ENTER */
+
+#ifndef LOG_SNS_LOC_LEAVE
+#define LOG_SNS_LOC_LEAVE(state)
+#endif /* LOG_SNS_LOC_LEAVE */
+
+#ifndef LOG_SNS_DSP_ENTER
+#define LOG_SNS_DSP_ENTER()
+#endif /* LOG_SNS_DSP_ENTER */
+
+#ifndef LOG_SNS_DSP_LEAVE
+#define LOG_SNS_DSP_LEAVE(state)
+#endif /* LOG_SNS_DSP_LEAVE */
+
+#ifndef LOG_SNS_DPN_ENTER
+#define LOG_SNS_DPN_ENTER()
+#endif /* LOG_SNS_DPN_ENTER */
+
+#ifndef LOG_SNS_DPN_LEAVE
+#define LOG_SNS_DPN_LEAVE(state)
+#endif /* LOG_SNS_DPN_LEAVE */
+
+#ifndef LOG_SNS_KER_ENTER
+#define LOG_SNS_KER_ENTER()
+#endif /* LOG_SNS_KER_ENTER */
+
+#ifndef LOG_SNS_KER_LEAVE
+#define LOG_SNS_KER_LEAVE(state)
+#endif /* LOG_SNS_KER_LEAVE */
+
+/*
+ *  ã¿ã¹ã¯ã®åªå
+é ä½ã®åè»¢ï¼»NGKI3548ï¼½
+ */
+#ifdef TOPPERS_rot_rdq
+
+ER
+rot_rdq(PRI tskpri)
+{
+	uint_t	pri;
+	ER		ercd;
+
+	LOG_ROT_RDQ_ENTER(tskpri);
+	CHECK_UNL();								/*ï¼»NGKI2684ï¼½*/
+	if (tskpri == TPRI_SELF && !sense_context()) {
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI2689ï¼½*/
+	}
+	else {
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI2685ï¼½*/
+		pri = INT_PRIORITY(tskpri);
+	}
+
+	lock_cpu();
+	rotate_ready_queue(&(ready_queue[pri]));
+	if (p_runtsk != p_schedtsk) {
+		if (!sense_context()) {
+			dispatch();
+		}
+		else {
+			request_dispatch();
+		}
+	}
+	ercd = E_OK;
+	unlock_cpu();
+
+  error_exit:
+	LOG_ROT_RDQ_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_rot_rdq */
+
+/*
+ *  å®è¡ç¶æ
+ã®ã¿ã¹ã¯IDã®åç
+§ï¼»NGKI3550ï¼½
+ */
+#ifdef TOPPERS_get_tid
+
+ER
+get_tid(ID *p_tskid)
+{
+	ER		ercd;
+
+	LOG_GET_TID_ENTER(p_tskid);
+	CHECK_UNL();								/*ï¼»NGKI2707ï¼½*/
+
+	lock_cpu();
+	*p_tskid = (p_runtsk == NULL) ? TSK_NONE : TSKID(p_runtsk);
+	ercd = E_OK;
+	unlock_cpu();
+
+  error_exit:
+	LOG_GET_TID_LEAVE(ercd, p_tskid);
+	return(ercd);
+}
+
+#endif /* TOPPERS_get_tid */
+
+/*
+ *  å®è¡ã§ããã¿ã¹ã¯ã®æ°ã®åç
+§ï¼»NGKI3623ï¼½
+ */
+#ifdef TOPPERS_get_lod
+
+ER
+get_lod(PRI tskpri, uint_t *p_load)
+{
+	uint_t	pri, load;
+	QUEUE	*p_queue, *p_entry;
+	ER		ercd;
+
+	LOG_GET_LOD_ENTER(p_tskid, p_load);
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3624ï¼½ï¼»NGKI3625ï¼½*/
+	if (tskpri == TPRI_SELF) {
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI3631ï¼½*/
+	}
+	else {
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI3626ï¼½*/
+		pri = INT_PRIORITY(tskpri);
+	}
+	p_queue = &(ready_queue[pri]);
+
+	lock_cpu();
+	load = 0U;
+	for (p_entry = p_queue->p_next; p_entry != p_queue;
+										p_entry = p_entry->p_next) {
+		load += 1U;
+	}
+	*p_load = load;
+	ercd = E_OK;
+	unlock_cpu();
+
+  error_exit:
+	LOG_GET_LOD_LEAVE(ercd, p_load);
+	return(ercd);
+}
+
+#endif /* TOPPERS_get_lod */
+
+/*
+ *  æå®ããåªå
+é ä½ã®ã¿ã¹ã¯IDã®åç
+§ï¼»NGKI3641ï¼½
+ */
+#ifdef TOPPERS_get_nth
+
+ER
+get_nth(PRI tskpri, uint_t nth, ID *p_tskid)
+{
+	uint_t	pri;
+	QUEUE	*p_queue, *p_entry;
+	ID		tskid;
+	ER		ercd;
+
+	LOG_GET_NTH_ENTER(p_tskid, nth, p_tskid);
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3642ï¼½ï¼»NGKI3643ï¼½*/
+	if (tskpri == TPRI_SELF) {
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI3650ï¼½*/
+	}
+	else {
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI3644ï¼½*/
+		pri = INT_PRIORITY(tskpri);
+	}
+	p_queue = &(ready_queue[pri]);
+
+	lock_cpu();
+	tskid = TSK_NONE;
+	for (p_entry = p_queue->p_next; p_entry != p_queue;
+										p_entry = p_entry->p_next) {
+		if (nth == 0U) {
+			tskid = TSKID((TCB *) p_entry);
+			break;
+		}
+		nth -= 1U;
+	}
+	*p_tskid = tskid;
+	ercd = E_OK;
+	unlock_cpu();
+
+  error_exit:
+	LOG_GET_NTH_LEAVE(ercd, p_tskid);
+	return(ercd);
+}
+
+#endif /* TOPPERS_get_nth */
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã¸ã®é·ç§»ï¼»NGKI3538ï¼½
+ */
+#ifdef TOPPERS_loc_cpu
+
+ER
+loc_cpu(void)
+{
+	ER		ercd;
+
+	LOG_LOC_CPU_ENTER();
+
+	if (!sense_lock()) {						/*ï¼»NGKI2731ï¼½*/
+		lock_cpu();								/*ï¼»NGKI2730ï¼½*/
+	}
+	ercd = E_OK;
+
+	LOG_LOC_CPU_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_loc_cpu */
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã®è§£é¤ï¼»NGKI3539ï¼½
+ *
+ *  CPUã­ãã¯ä¸­ã¯ï¼ãã£ã¹ããããå¿
+è¦ã¨ãªããµã¼ãã¹ã³ã¼ã«ãå¼ã³åºãã
+ *  ã¨ã¯ã§ããªãããï¼CPUã­ãã¯ç¶æ
+ã®è§£é¤æã«ãã£ã¹ãããã£ãèµ·åãã
+ *  å¿
+è¦ã¯ãªãï¼
+ */
+#ifdef TOPPERS_unl_cpu
+
+ER
+unl_cpu(void)
+{
+	ER		ercd;
+
+	LOG_UNL_CPU_ENTER();
+
+	if (sense_lock()) {							/*ï¼»NGKI2738ï¼½*/
+		unlock_cpu();							/*ï¼»NGKI2737ï¼½*/
+	}
+	ercd = E_OK;
+
+	LOG_UNL_CPU_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_unl_cpu */
+
+/*
+ *  ãã£ã¹ãããã®ç¦æ­¢ï¼»NGKI2740ï¼½
+ */
+#ifdef TOPPERS_dis_dsp
+
+ER
+dis_dsp(void)
+{
+	ER		ercd;
+
+	LOG_DIS_DSP_ENTER();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2741ï¼½ï¼»NGKI2742ï¼½*/
+
+	lock_cpu();
+	enadsp = false;
+	dspflg = false;
+	ercd = E_OK;
+	unlock_cpu();
+
+  error_exit:
+	LOG_DIS_DSP_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_dis_dsp */
+
+/*
+ *  ãã£ã¹ãããã®è¨±å¯ï¼»NGKI2746ï¼½
+ */
+#ifdef TOPPERS_ena_dsp
+
+ER
+ena_dsp(void)
+{
+	ER		ercd;
+
+	LOG_ENA_DSP_ENTER();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2747ï¼½ï¼»NGKI2748ï¼½*/
+
+	lock_cpu();
+	enadsp = true;
+	if (t_get_ipm() == TIPM_ENAALL) {
+		dspflg = true;
+		p_schedtsk = search_schedtsk();
+		if (p_runtsk->raster && p_runtsk->enater) {
+			task_terminate(p_runtsk);
+			exit_and_dispatch();
+			ercd = E_SYS;
+		}
+		else {
+			if (p_runtsk != p_schedtsk) {
+				dispatch();
+			}
+			ercd = E_OK;
+		}
+	}
+	else {
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_ENA_DSP_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ena_dsp */
+
+/*
+ *  ã³ã³ãã­ã¹ãã®åç
+§ï¼»NGKI2752ï¼½
+ */
+#ifdef TOPPERS_sns_ctx
+
+bool_t
+sns_ctx(void)
+{
+	bool_t	state;
+
+	LOG_SNS_CTX_ENTER();
+	state = sense_context() ? true : false;
+	LOG_SNS_CTX_LEAVE(state);
+	return(state);
+}
+
+#endif /* TOPPERS_sns_ctx */
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã®åç
+§ï¼»NGKI2754ï¼½
+ */
+#ifdef TOPPERS_sns_loc
+
+bool_t
+sns_loc(void)
+{
+	bool_t	state;
+
+	LOG_SNS_LOC_ENTER();
+	state = sense_lock() ? true : false;
+	LOG_SNS_LOC_LEAVE(state);
+	return(state);
+}
+
+#endif /* TOPPERS_sns_loc */
+
+/*
+ *  ãã£ã¹ãããç¦æ­¢ç¶æ
+ã®åç
+§ï¼»NGKI2756ï¼½
+ */
+#ifdef TOPPERS_sns_dsp
+
+bool_t
+sns_dsp(void)
+{
+	bool_t	state;
+
+	LOG_SNS_DSP_ENTER();
+	state = !enadsp;
+	LOG_SNS_DSP_LEAVE(state);
+	return(state);
+}
+
+#endif /* TOPPERS_sns_dsp */
+
+/*
+ *  ãã£ã¹ãããä¿çç¶æ
+ã®åç
+§ï¼»NGKI2758ï¼½
+ */
+#ifdef TOPPERS_sns_dpn
+
+bool_t
+sns_dpn(void)
+{
+	bool_t	state;
+
+	LOG_SNS_DPN_ENTER();
+	state = (sense_context() || sense_lock() || !dspflg) ? true : false;
+	LOG_SNS_DPN_LEAVE(state);
+	return(state);
+}
+
+#endif /* TOPPERS_sns_dpn */
+
+/*
+ *  ã«ã¼ãã«éåä½ç¶æ
+ã®åç
+§ï¼»NGKI2760ï¼½
+ */
+#ifdef TOPPERS_sns_ker
+
+bool_t
+sns_ker(void)
+{
+	bool_t	state;
+
+	LOG_SNS_KER_ENTER();
+	state = kerflg ? false : true;
+	LOG_SNS_KER_LEAVE(state);
+	return(state);
+}
+
+#endif /* TOPPERS_sns_ker */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/task.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/task.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/task.c	(revision 270)
@@ -0,0 +1,490 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«
+ */
+
+#include "kernel_impl.h"
+#include "task.h"
+#include "taskhook.h"
+#include "wait.h"
+
+#ifdef TOPPERS_tskini
+
+/*
+ *  å®è¡ç¶æ
+ã®ã¿ã¹ã¯
+ */
+TCB		*p_runtsk;
+
+/*
+ *  å®è¡ãã¹ãã¿ã¹ã¯
+ */
+TCB		*p_schedtsk;
+
+/*
+ *  ãã£ã¹ãããè¨±å¯ç¶æ
+
+ */
+bool_t	enadsp;
+
+/*
+ *  ã¿ã¹ã¯ãã£ã¹ãããå¯è½ç¶æ
+
+ */
+bool_t	dspflg;
+
+/*
+ *  ã¬ãã£ã­ã¥ã¼
+ */
+QUEUE	ready_queue[TNUM_TPRI];
+
+/*
+ *  ã¬ãã£ã­ã¥ã¼ãµã¼ãã®ããã®ãããããã
+ */
+uint16_t	ready_primap;
+
+/*
+ *  ä½¿ç¨ãã¦ããªãTCBã®ãªã¹ã
+ */
+QUEUE	free_tcb;
+
+/*
+ *  ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®åæå
+ */
+void
+initialize_task(void)
+{
+	uint_t	i, j;
+	TCB		*p_tcb;
+	TINIB	*p_tinib;
+
+	p_runtsk = NULL;
+	p_schedtsk = NULL;
+	enadsp = true;
+	dspflg = true;
+
+	for (i = 0; i < TNUM_TPRI; i++) {
+		queue_initialize(&(ready_queue[i]));
+	}
+	ready_primap = 0U;
+
+	for (i = 0; i < tnum_stsk; i++) {
+		j = INDEX_TSK(torder_table[i]);
+		p_tcb = &(tcb_table[j]);
+		p_tcb->p_tinib = &(tinib_table[j]);
+		p_tcb->actque = false;
+		make_dormant(p_tcb);
+		if ((p_tcb->p_tinib->tskatr & TA_ACT) != 0U) {
+			make_active(p_tcb);
+		}
+	}
+	queue_initialize(&free_tcb);
+	for (j = 0; i < tnum_tsk; i++, j++) {
+		p_tcb = &(tcb_table[i]);
+		p_tinib = &(atinib_table[j]);
+		p_tinib->tskatr = TA_NOEXS;
+		p_tcb->p_tinib = ((const TINIB *) p_tinib);
+		queue_insert_prev(&free_tcb, &(p_tcb->task_queue));
+	}
+}
+
+#endif /* TOPPERS_tskini */
+
+/*
+ *  ãããããããµã¼ãé¢æ°
+ *
+ *  bitmapå
+ã®1ã®ãããã®å
+ï¼æãä¸ä½ï¼å³ï¼ã®ãã®ããµã¼ããï¼ãã®ãã
+ *  ãçªå·ãè¿ãï¼ãããçªå·ã¯ï¼æä¸ä½ãããã0ã¨ããï¼bitmapã«0ãæå®
+ *  ãã¦ã¯ãªããªãï¼ãã®é¢æ°ã§ã¯ï¼bitmapã16ãããã§ãããã¨ãä»®å®ãï¼
+ *  uint16_tåã¨ãã¦ããï¼
+ *
+ *  ããããµã¼ãå½ä»¤ãæã¤ãã­ã»ããµã§ã¯ï¼ããããµã¼ãå½ä»¤ãä½¿ãããã«
+ *  æ¸ãç´ããæ¹ãå¹çãè¯ãå ´åãããï¼ãã®ãããªå ´åã«ã¯ï¼ã¿ã¼ã²ãã
+ *  ä¾å­é¨ã§ããããµã¼ãå½ä»¤ãä½¿ã£ãbitmap_searchãå®ç¾©ãï¼
+ *  OMIT_BITMAP_SEARCHããã¯ã­å®ç¾©ããã°ããï¼ã¾ãï¼ããããµã¼ãå½ä»¤ã®
+ *  ãµã¼ãæ¹åãéãªã©ã®çç±ã§åªå
+åº¦ã¨ãããã¨ã®å¯¾å¿ãå¤æ´ãããå ´åã«
+ *  ã¯ï¼PRIMAP_BITããã¯ã­å®ç¾©ããã°ããï¼
+ *
+ *  ã¾ãï¼ã©ã¤ãã©ãªã«ffsããããªãï¼æ¬¡ã®ããã«å®ç¾©ãã¦ã©ã¤ãã©ãªé¢æ°ã
+ *  ä½¿ã£ãæ¹ãå¹çãè¯ãå¯è½æ§ãããï¼
+ *		#define	bitmap_search(bitmap) (ffs(bitmap) - 1)
+ */
+#ifndef PRIMAP_BIT
+#define	PRIMAP_BIT(pri)		(1U << (pri))
+#endif /* PRIMAP_BIT */
+
+#ifndef OMIT_BITMAP_SEARCH
+
+static const unsigned char bitmap_search_table[] = { 0, 1, 0, 2, 0, 1, 0,
+												3, 0, 1, 0, 2, 0, 1, 0 };
+
+Inline uint_t
+bitmap_search(uint16_t bitmap)
+{
+	uint_t	n = 0U;
+
+	assert(bitmap != 0U);
+	if ((bitmap & 0x00ffU) == 0U) {
+		bitmap >>= 8;
+		n += 8;
+	}
+	if ((bitmap & 0x0fU) == 0U) {
+		bitmap >>= 4;
+		n += 4;
+	}
+	return(n + bitmap_search_table[(bitmap & 0x0fU) - 1]);
+}
+
+#endif /* OMIT_BITMAP_SEARCH */
+
+/*
+ *  åªå
+åº¦ãããããããç©ºãã®ãã§ãã¯
+ */
+Inline bool_t
+primap_empty(void)
+{
+	return(ready_primap == 0U);
+}
+
+/*
+ *  åªå
+åº¦ããããããã®ãµã¼ã
+ */
+Inline uint_t
+primap_search(void)
+{
+	return(bitmap_search(ready_primap));
+}
+
+/*
+ *  åªå
+åº¦ããããããã®ã»ãã
+ */
+Inline void
+primap_set(uint_t pri)
+{
+	ready_primap |= PRIMAP_BIT(pri);
+}
+
+/*
+ *  åªå
+åº¦ããããããã®ã¯ãªã¢
+ */
+Inline void
+primap_clear(uint_t pri)
+{
+	ready_primap &= ~PRIMAP_BIT(pri);
+}
+
+/*
+ *  æé«åªå
+é ä½ã¿ã¹ã¯ã®ãµã¼ã
+ */
+#ifdef TOPPERS_tsksched
+
+TCB *
+search_schedtsk(void)
+{
+	uint_t	schedpri;
+
+	schedpri = primap_search();
+	return((TCB *)(ready_queue[schedpri].p_next));
+}
+
+#endif /* TOPPERS_tsksched */
+
+/*
+ *  å®è¡ã§ããç¶æ
+ã¸ã®é·ç§»
+ *
+ *  å®è¡ãã¹ãã¿ã¹ã¯ãæ´æ°ããã®ã¯ï¼å®è¡ã§ããã¿ã¹ã¯ããªãã£ãå ´åã¨ï¼
+ *  p_tcbã®åªå
+åº¦ãå®è¡ãã¹ãã¿ã¹ã¯ã®åªå
+åº¦ãããé«ãå ´åã§ããï¼
+ */
+#ifdef TOPPERS_tskrun
+
+void
+make_runnable(TCB *p_tcb)
+{
+	uint_t	pri = p_tcb->priority;
+
+	queue_insert_prev(&(ready_queue[pri]), &(p_tcb->task_queue));
+	primap_set(pri);
+
+	if (dspflg) {
+		if (p_schedtsk == (TCB *) NULL || pri < p_schedtsk->priority) {
+			p_schedtsk = p_tcb;
+		}
+	}
+}
+
+#endif /* TOPPERS_tskrun */
+
+/*
+ *  å®è¡ã§ããç¶æ
+ããä»ã®ç¶æ
+ã¸ã®é·ç§»
+ *
+ *  å®è¡ãã¹ãã¿ã¹ã¯ãæ´æ°ããã®ã¯ï¼p_tcbãå®è¡ãã¹ãã¿ã¹ã¯ã§ãã£ãå ´å
+ *  ã§ããï¼p_tcbã¨åãåªå
+åº¦ã®ã¿ã¹ã¯ãä»ã«ããå ´åã¯ï¼p_tcbã®æ¬¡ã®ã¿ã¹
+ *  ã¯ãå®è¡ãã¹ãã¿ã¹ã¯ã«ãªãï¼ããã§ãªãå ´åã¯ï¼ã¬ãã£ã­ã¥ã¼ããµã¼ã
+ *  ããå¿
+è¦ãããï¼
+ */
+#ifdef TOPPERS_tsknrun
+
+void
+make_non_runnable(TCB *p_tcb)
+{
+	uint_t	pri = p_tcb->priority;
+	QUEUE	*p_queue = &(ready_queue[pri]);
+
+	queue_delete(&(p_tcb->task_queue));
+	if (queue_empty(p_queue)) {
+		primap_clear(pri);
+		if (p_schedtsk == p_tcb) {
+			assert(dspflg);
+			p_schedtsk = primap_empty() ? (TCB *) NULL : search_schedtsk();
+		}
+	}
+	else {
+		if (p_schedtsk == p_tcb) {
+			assert(dspflg);
+			p_schedtsk = (TCB *)(p_queue->p_next);
+		}
+	}
+}
+
+#endif /* TOPPERS_tsknrun */
+
+/*
+ *  ä¼æ­¢ç¶æ
+ã¸ã®é·ç§»
+ */
+#ifdef TOPPERS_tskdmt
+
+void
+make_dormant(TCB *p_tcb)
+{
+	p_tcb->tstat = TS_DORMANT;
+	p_tcb->bpriority = p_tcb->p_tinib->ipriority;
+	p_tcb->priority = p_tcb->p_tinib->ipriority;
+	p_tcb->wupque = false;
+	p_tcb->raster = false;
+	p_tcb->enater = true;
+	LOG_TSKSTAT(p_tcb);
+}
+
+#endif /* TOPPERS_tskdmt */
+
+/*
+ *  ä¼æ­¢ç¶æ
+ããå®è¡ã§ããç¶æ
+ã¸ã®é·ç§»
+ */
+#ifdef TOPPERS_tskact
+
+void
+make_active(TCB *p_tcb)
+{
+	activate_context(p_tcb);
+	p_tcb->tstat = TS_RUNNABLE;
+	LOG_TSKSTAT(p_tcb);
+	make_runnable(p_tcb);
+}
+
+#endif /* TOPPERS_tskact */
+
+/*
+ *  ã¿ã¹ã¯ã®åªå
+åº¦ã®å¤æ´
+ *
+ *  ã¿ã¹ã¯ãå®è¡ã§ããç¶æ
+ã®å ´åã«ã¯ï¼ã¬ãã£ã­ã¥ã¼ã®ä¸­ã§ã®ä½ç½®ãå¤æ´ã
+ *  ãï¼ãªãã¸ã§ã¯ãã®å¾
+ã¡ã­ã¥ã¼ã®ä¸­ã§å¾
+ã¡ç¶æ
+ã«ãªã£ã¦ããå ´åã«ã¯ï¼å¾
+
+ *  ã¡ã­ã¥ã¼ã®ä¸­ã§ã®ä½ç½®ãå¤æ´ããï¼
+ *
+ *  å®è¡ãã¹ãã¿ã¹ã¯ãæ´æ°ããã®ã¯ï¼(1) p_tcbãå®è¡ãã¹ãã¿ã¹ã¯ã§ãã£ã¦ï¼
+ *  ãã®åªå
+åº¦ãä¸ããå ´åï¼(2) p_tcbãå®è¡ãã¹ãã¿ã¹ã¯ã§ã¯ãªãï¼å¤æ´å¾
+ *  ã®åªå
+åº¦ãå®è¡ãã¹ãã¿ã¹ã¯ã®åªå
+åº¦ãããé«ãå ´åã§ããï¼(1)ã®å ´åã«
+ *  ã¯ï¼ã¬ãã£ã­ã¥ã¼ããµã¼ãããå¿
+è¦ãããï¼
+ */
+#ifdef TOPPERS_tskpri
+
+void
+change_priority(TCB *p_tcb, uint_t newpri, bool_t mtxmode)
+{
+	uint_t	oldpri;
+
+	oldpri = p_tcb->priority;
+	p_tcb->priority = newpri;
+
+	if (TSTAT_RUNNABLE(p_tcb->tstat)) {
+		/*
+		 *  ã¿ã¹ã¯ãå®è¡ã§ããç¶æ
+ã®å ´å
+		 */
+		queue_delete(&(p_tcb->task_queue));
+		if (queue_empty(&(ready_queue[oldpri]))) {
+			primap_clear(oldpri);
+		}
+		if (mtxmode) {
+			queue_insert_next(&(ready_queue[newpri]), &(p_tcb->task_queue));
+		}
+		else {
+			queue_insert_prev(&(ready_queue[newpri]), &(p_tcb->task_queue));
+		}
+		primap_set(newpri);
+
+		if (dspflg) {
+			if (p_schedtsk == p_tcb) {
+				if (newpri >= oldpri) {
+					p_schedtsk = search_schedtsk();
+				}
+			}
+			else {
+				if (mtxmode ? newpri <= p_schedtsk->priority
+							: newpri < p_schedtsk->priority) {
+					p_schedtsk = p_tcb;
+				}
+			}
+		}
+	}
+	else {
+		if (TSTAT_WAIT_WOBJCB(p_tcb->tstat)) {
+			/*
+			 *  ã¿ã¹ã¯ãï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®ç®¡çãã­ãã¯ã®å
+±éé¨
+			 *  åï¼WOBJCBï¼ã®å¾
+ã¡ã­ã¥ã¼ã«ã¤ãªããã¦ããå ´å
+			 */
+			wobj_change_priority(((WINFO_WOBJ *)(p_tcb->p_winfo))->p_wobjcb,
+																	p_tcb);
+		}
+	}
+}
+
+#endif /* TOPPERS_tskpri */
+
+/*
+ *  ã¬ãã£ã­ã¥ã¼ã®åè»¢
+ *
+ *  å®è¡ãã¹ãã¿ã¹ã¯ãæ´æ°ããã®ã¯ï¼å®è¡ãã¹ãã¿ã¹ã¯ãã¿ã¹ã¯ã­ã¥ã¼ã®æ«
+ *  å°¾ã«ç§»åããå ´åã§ããï¼
+ */
+#ifdef TOPPERS_tskrot
+
+void
+rotate_ready_queue(QUEUE *p_queue)
+{
+	QUEUE	*p_entry;
+
+	if (!queue_empty(p_queue) && p_queue->p_next->p_next != p_queue) {
+		p_entry = queue_delete_next(p_queue);
+		queue_insert_prev(p_queue, p_entry);
+		if (dspflg) {
+			if (p_schedtsk == (TCB *) p_entry) {
+				p_schedtsk = (TCB *)(p_queue->p_next);
+			}
+		}
+	}
+}
+
+#endif /* TOPPERS_tskrot */
+
+/*
+ *  ã¿ã¹ã¯ã®çµäºå¦ç
+ */
+#ifdef TOPPERS_tskterm
+
+void
+task_terminate(TCB *p_tcb)
+{
+	if (TSTAT_RUNNABLE(p_tcb->tstat)) {
+		make_non_runnable(p_tcb);
+	}
+	else if (TSTAT_WAITING(p_tcb->tstat)) {
+		wait_dequeue_wobj(p_tcb);
+		wait_dequeue_tmevtb(p_tcb);
+	}
+	if (p_tcb->p_lastmtx != NULL) {
+		(*mtxhook_release_all)(p_tcb);
+	}
+	make_dormant(p_tcb);
+	if (p_tcb->actque) {
+		p_tcb->actque = false;
+		make_active(p_tcb);
+	}
+}
+
+#endif /* TOPPERS_tskterm */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/task.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/task.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/task.h	(revision 270)
@@ -0,0 +1,659 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«
+ */
+
+#ifndef TOPPERS_TASK_H
+#define TOPPERS_TASK_H
+
+#include "kernel_impl.h"
+#include <queue.h>
+#include "time_event.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_TSKSTAT
+#define LOG_TSKSTAT(p_tcb)
+#endif /* LOG_TSKSTAT */
+
+/*
+ *  ã¿ã¹ã¯åªå
+åº¦ã®å
+é¨è¡¨ç¾ã»å¤é¨è¡¨ç¾å¤æãã¯ã­
+ */
+#define INT_PRIORITY(x)		((uint_t)((x) - TMIN_TPRI))
+#define EXT_TSKPRI(x)		((PRI)(x) + TMIN_TPRI)
+
+/*
+ *  ã¿ã¹ã¯ç¶æ
+ã®å
+é¨è¡¨ç¾
+ *
+ *  TCBä¸­ã®ã¿ã¹ã¯ç¶æ
+ã®ãã£ã¼ã«ãã§ã¯ï¼ã¿ã¹ã¯ã®ç¶æ
+ã¨ï¼ã¿ã¹ã¯ãå¾
+ã¡ç¶æ
+
+ *  ã®æã®å¾
+ã¡è¦å ãè¡¨ãï¼ãã ãï¼å®è¡ç¶æ
+ï¼RUNNINGï¼ã¨å®è¡å¯è½ç¶æ
+
+ *  ï¼READYï¼ã¯åºå¥ããï¼ä¸¡ç¶æ
+ããããã¦å®è¡ã§ããç¶æ
+ï¼RUNNABLEï¼ã¨ã
+ *  ã¦ç®¡çããï¼äºéå¾
+ã¡ç¶æ
+ã¯ï¼(TS_WAITING_??? | TS_SUSPENDED)ã§è¡¨ãï¼
+ *
+ *  ã¿ã¹ã¯ãå¾
+ã¡ç¶æ
+ï¼äºéå¾
+ã¡ç¶æ
+ãå«ãï¼ã®æã¯ï¼TS_WAITING_???ã§å¾
+ã¡
+ *  è¦å ãè¡¨ãï¼å¾
+ã¡è¦å ï¼5ãããã§è¡¨ç¾ãããï¼ã®ä¸ä½2ãããã§ï¼åæã»
+ *  éä¿¡ãªãã¸ã§ã¯ãã®å¾
+ã¡ã­ã¥ã¼ã«ã¤ãªãã£ã¦ãããã©ãããè¡¨ãï¼åæã»
+ *  éä¿¡ãªãã¸ã§ã¯ãã®å¾
+ã¡ã­ã¥ã¼ã«ã¤ãªãããªããã®ã¯ä¸ä½2ãããã00ï¼å
+ *  æã»éä¿¡ãªãã¸ã§ã¯ãã®ç®¡çãã­ãã¯ã®å
+±éé¨åï¼WOBJCBï¼ã®å¾
+ã¡ã­ã¥ã¼
+ *  ã«ã¤ãªãããã®ã¯10ã¾ãã¯11ï¼ããä»¥å¤ã®å¾
+ã¡ã­ã¥ã¼ã«ã¤ãªãããã®ã¯01
+ *  ã¨ããï¼
+ */
+#define TS_DORMANT		0x00U			/* ä¼æ­¢ç¶æ
+ */
+#define TS_RUNNABLE		0x01U			/* å®è¡ã§ããç¶æ
+ */
+#define TS_SUSPENDED	0x02U			/* å¼·å¶å¾
+ã¡ç¶æ
+ */
+
+#define TS_WAITING_SLP	(0x01U << 2)	/* èµ·åºå¾
+ã¡ */
+#define TS_WAITING_DLY	(0x02U << 2)	/* æéçµéå¾
+ã¡ */
+#define TS_WAITING_RDTQ	(0x08U << 2)	/* ãã¼ã¿ã­ã¥ã¼ããã®åä¿¡å¾
+ã¡ */
+#define TS_WAITING_RPDQ	(0x09U << 2)	/* åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ããã®åä¿¡å¾
+ã¡ */
+#define TS_WAITING_SEM	(0x10U << 2)	/* ã»ããã©è³æºã®ç²å¾å¾
+ã¡ */
+#define TS_WAITING_FLG	(0x11U << 2)	/* ã¤ãã³ããã©ã°å¾
+ã¡ */
+#define TS_WAITING_SDTQ	(0x12U << 2)	/* ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡å¾
+ã¡ */
+#define TS_WAITING_SPDQ	(0x13U << 2)	/* åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡å¾
+ã¡ */
+#define TS_WAITING_MTX	(0x14U << 2)	/* ãã¥ã¼ããã¯ã¹ã®ã­ãã¯å¾
+ã¡ */
+#define TS_WAITING_MPF	(0x15U << 2)	/* åºå®é·ã¡ã¢ãªãã­ãã¯ã®ç²å¾å¾
+ã¡ */
+
+#define TS_WAITING_MASK	(0x1fU << 2)	/* å¾
+ã¡ç¶æ
+ã®å¤å¥ç¨ãã¹ã¯ */
+
+/*
+ *  ã¿ã¹ã¯ç¶æ
+å¤å¥ãã¯ã­
+ *
+ *  TSTAT_DORMANTã¯ã¿ã¹ã¯ãä¼æ­¢ç¶æ
+ã§ãããã©ãããï¼TSTAT_RUNNABLEã¯
+ *  ã¿ã¹ã¯ãå®è¡ã§ããç¶æ
+ã§ãããã©ãããå¤å¥ããï¼TSTAT_WAITINGã¯å¾
+
+ *  ã¡ç¶æ
+ã¨äºéå¾
+ã¡ç¶æ
+ã®ããããã§ãããã©ãããï¼TSTAT_SUSPENDEDã¯
+ *  å¼·å¶å¾
+ã¡ç¶æ
+ã¨äºéå¾
+ã¡ç¶æ
+ã®ããããã§ãããã©ãããå¤å¥ããï¼
+ */
+#define TSTAT_DORMANT(tstat)	((tstat) == TS_DORMANT)
+#define TSTAT_RUNNABLE(tstat)	(((tstat) & TS_RUNNABLE) != 0U)
+#define TSTAT_WAITING(tstat)	(((tstat) & TS_WAITING_MASK) != 0U)
+#define TSTAT_SUSPENDED(tstat)	(((tstat) & TS_SUSPENDED) != 0U)
+
+/*
+ *  ã¿ã¹ã¯å¾
+ã¡è¦å å¤å¥ãã¯ã­
+ *
+ *  TSTAT_WAIT_SLPã¯ã¿ã¹ã¯ãèµ·åºå¾
+ã¡ã§ãããã©ãããï¼TSTAT_WAIT_MTXã¯
+ *  ã¿ã¹ã¯ããã¥ã¼ããã¯ã¹å¾
+ã¡ã§ãããã©ãããå¤å¥ããï¼
+ *
+ *  ã¾ãï¼TSTAT_WAIT_WOBJ ã¯ã¿ã¹ã¯ãåæã»éä¿¡ãªãã¸ã§ã¯ãã«å¯¾ããå¾
+ã¡
+ *  ã§ãããï¼è¨ãæããã¨ï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®å¾
+ã¡ã­ã¥ã¼ã«ã¤ãªã
+ *  ãã¦ãããï¼ã©ãããï¼TSTAT_WAIT_WOBJCBã¯ã¿ã¹ã¯ãåæã»éä¿¡ãªãã¸ã§
+ *  ã¯ãã®ç®¡çãã­ãã¯ã®å
+±éé¨åï¼WOBJCBï¼ã®å¾
+ã¡ã­ã¥ã¼ã«ã¤ãªããã¦ãã
+ *  ãã©ãããå¤å¥ããï¼
+ */
+#define TSTAT_WAIT_SLP(tstat)	(((tstat) & ~TS_SUSPENDED) == TS_WAITING_SLP)
+#define TSTAT_WAIT_MTX(tstat)	(((tstat) & ~TS_SUSPENDED) == TS_WAITING_MTX)
+
+#define TSTAT_WAIT_WOBJ(tstat)		(((tstat) & (0x18U << 2)) != 0U)
+#define TSTAT_WAIT_WOBJCB(tstat)	(((tstat) & (0x10U << 2)) != 0U)
+
+/*
+ *  å¾
+ã¡æ
+å ±ãã­ãã¯ï¼WINFOï¼ã®å®ç¾©
+ *
+ *  ã¿ã¹ã¯ãå¾
+ã¡ç¶æ
+ã®éã¯ï¼TCBããã³ãã®p_winfoã§æãããWINFOãæ¬¡ã®
+ *  ããã«è¨­å®ããªããã°ãªããªãï¼
+ *
+ *  (a) TCBã®ã¿ã¹ã¯ç¶æ
+ãå¾
+ã¡ç¶æ
+ï¼TS_WAITING_???ï¼ã«ããï¼
+ *
+ *  (b) ã¿ã¤ã ã¢ã¦ããç£è¦ããããã«ï¼ã¿ã¤ã ã¤ãã³ããã­ãã¯ãç»é²ããï¼
+ *  ç»é²ããã¿ã¤ã ã¤ãã³ããã­ãã¯ã¯ï¼å¾
+ã¡ã«å
+¥ããµã¼ãã¹ã³ã¼ã«å¦çé¢æ°
+ *  ã®ã­ã¼ã«ã«å¤æ°ã¨ãã¦ç¢ºä¿ãï¼ããã¸ã®ãã¤ã³ã¿ãWINFOã®p_tmevtbã«è¨
+ *  æ¶ããï¼ã¿ã¤ã ã¢ã¦ãã®ç£è¦ãå¿
+è¦ãªãå ´åï¼æ°¸ä¹
+å¾
+ã¡ã®å ´åï¼ã«ã¯ï¼
+ *  p_tmevtbãNULLã«ããï¼
+ *
+ *  åæã»éä¿¡ãªãã¸ã§ã¯ãã«å¯¾ããå¾
+ã¡ç¶æ
+ã®å ´åã«ã¯ï¼æ¨æºã®WINFOã«
+ *  p_wobjcbãã£ã¼ã«ããè¿½å ããæ§é ä½ï¼WINFO_WOBJï¼wait.hã§å®ç¾©ï¼ã«ï¼
+ *  å¾
+ã¡å¯¾è±¡ã®åæã»éä¿¡ãªãã¸ã§ã¯ãã«ä¾å­ãã¦è¨æ¶ãããã¨ãå¿
+è¦ãªæ
+å ±
+ *  ã®ããã®ãã£ã¼ã«ããè¿½å ããæ§é ä½ï¼WINFO_???ï¼ãå®ç¾©ãï¼WINFOã®ä»£
+ *  ããã«ç¨ããï¼ã¾ãï¼ä»¥ä¸ã®(c)ï½(e)ã®è¨­å®ãè¡ãå¿
+è¦ãããï¼åæã»é
+ *  ä¿¡ãªãã¸ã§ã¯ãã«é¢ä¿ããªãå¾
+ã¡ï¼èµ·åºå¾
+ã¡ï¼æéçµéå¾
+ã¡ï¼ã®å ´åã«ã¯ï¼
+ *  ãããã¯å¿
+è¦ãªãï¼
+ *
+ *  (c) TCBãå¾
+ã¡å¯¾è±¡ã®åæã»éä¿¡ãªãã¸ã§ã¯ãã®å¾
+ã¡ã­ã¥ã¼ã«ã¤ãªãï¼å¾
+
+ *  ã¡ã­ã¥ã¼ã«ã¤ãªãããã«ï¼task_queueãä½¿ãï¼
+ *
+ *  (d) å¾
+ã¡å¯¾è±¡ã®åæã»éä¿¡ãªãã¸ã§ã¯ãã®ç®¡çãã­ãã¯ã¸ã®ãã¤ã³ã¿ãï¼
+ *  WINFO_WOBJã®p_wobjcbã«è¨æ¶ããï¼
+ *
+ *  (e) å¾
+ã¡å¯¾è±¡ã®åæã»éä¿¡ãªãã¸ã§ã¯ãã«ä¾å­ãã¦è¨æ¶ãããã¨ãå¿
+è¦ãª
+ *  æ
+å ±ãããå ´åã«ã¯ï¼WINFO_???å
+ã®ãã£ã¼ã«ãã«è¨æ¶ããï¼
+ *
+ *  å¾
+ã¡ç¶æ
+ãè§£é¤ããéã«ã¯ï¼å¾
+ã¡è§£é¤ããã¿ã¹ã¯ã«å¯¾ããè¿å¤ãWINFOã®
+ *  wercdã«è¨­å®ããï¼wercdãå¿
+è¦ãªã®ã¯å¾
+ã¡è§£é¤ä»¥éã§ããã®ã«å¯¾ãã¦ï¼
+ *  p_tmevtbã¯å¾
+ã¡è§£é¤å¾ã¯å¿
+è¦ãªãããï¼ã¡ã¢ãªç¯ç´ã®ããã«å
+±ç¨ä½ãä½¿ã£
+ *  ã¦ããï¼ãã®ããï¼wercdã¸ã¨ã©ã¼ã³ã¼ããè¨­å®ããã®ã¯ï¼ã¿ã¤ã ã¤ãã³ã
+ *  ãã­ãã¯ãç»é²è§£é¤ããå¾ã«ããªããã°ãªããªãï¼
+ */
+typedef union waiting_information {
+	ER		wercd;			/* å¾
+ã¡è§£é¤æã®ã¨ã©ã¼ã³ã¼ã */
+	TMEVTB	*p_tmevtb;		/* å¾
+ã¡ç¶æ
+ç¨ã®ã¿ã¤ã ã¤ãã³ããã­ãã¯ */
+} WINFO;
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ç®¡çãã­ãã¯ã®åã®åæ¹åç
+§
+ */
+typedef struct mutex_control_block MTXCB;
+
+/*
+ *  ã¿ã¹ã¯åæåãã­ãã¯
+ *
+ *  ã¿ã¹ã¯ã«é¢ããæ
+å ±ãï¼å¤ãå¤ãããªãããã«ROMã«ç½®ããé¨åï¼ã¿ã¹ã¯
+ *  åæåãã­ãã¯ï¼ã¨ï¼å¤ãå¤åããããã«RAMã«ç½®ããªããã°ãªããªãé¨
+ *  åï¼ã¿ã¹ã¯ç®¡çãã­ãã¯ï¼TCBï¼ã«åé¢ãï¼TCBå
+ã«å¯¾å¿ããã¿ã¹ã¯åæå
+ *  ãã­ãã¯ãæããã¤ã³ã¿ãå
+¥ããï¼ã¿ã¹ã¯åæåãã­ãã¯å
+ã«å¯¾å¿ãã
+ *  TCBãæããã¤ã³ã¿ãå
+¥ããæ¹æ³ã®æ¹ãï¼RAMã®ç¯ç´ã®è¦³ç¹ããã¯æã¾ãã
+ *  ãï¼å®è¡å¹çãæªããªãããã«æ¡ç¨ãã¦ããªãï¼ä»ã®ãªãã¸ã§ã¯ãã«ã¤ã
+ *  ã¦ãåæ§ã«æ±ãï¼
+ *
+ *  ã¿ã¹ã¯åæåãã­ãã¯ã«ã¯ï¼DEF_TEXã§å®ç¾©ãããã¿ã¹ã¯ä¾å¤å¦çã«ã¼ã
+ *  ã³ã«é¢ããæ
+å ±ãå«ãï¼
+ */
+typedef struct task_initialization_block {
+	ATR			tskatr;			/* ã¿ã¹ã¯å±æ§ */
+	intptr_t	exinf;			/* ã¿ã¹ã¯ã®æ¡å¼µæ
+å ± */
+	TASK		task;			/* ã¿ã¹ã¯ã®èµ·åçªå° */
+	uint_t		ipriority;		/* ã¿ã¹ã¯ã®èµ·åæåªå
+åº¦ï¼å
+é¨è¡¨ç¾ï¼ */
+
+#ifdef USE_TSKINICTXB
+	TSKINICTXB	tskinictxb;		/* ã¿ã¹ã¯åæåã³ã³ãã­ã¹ããã­ãã¯ */
+#else /* USE_TSKINICTXB */
+	size_t		stksz;			/* ã¹ã¿ãã¯é åã®ãµã¤ãºï¼ä¸¸ããå¤ï¼ */
+	void		*stk;			/* ã¹ã¿ãã¯é åã®å
+é ­çªå° */
+#endif /* USE_TSKINICTXB */
+} TINIB;
+
+/*
+ *  ã¿ã¹ã¯ç®¡çãã­ãã¯ï¼TCBï¼
+ *
+ *  ASPã«ã¼ãã«ã§ã¯ï¼ã¿ã¹ã¯ã®èµ·åè¦æ±ã­ã¥ã¼ã¤ã³ã°æ°ã®æå¤§å¤ï¼TMAX_ACTCNTï¼
+ *  ã¨èµ·åºè¦æ±ã­ã¥ã¼ã¤ã³ã°æ°ã®æå¤§å¤ï¼TMAX_WUPCNTï¼ã¯1ã«åºå®ããã¦ãã
+ *  ããï¼ã­ã¥ã¼ã¤ã³ã°ããã¦ãããã©ããã®çå½å¤ã§è¡¨ç¾ãããã¨ãã§ããï¼
+ *  ã¾ãï¼å¼·å¶å¾
+ã¡è¦æ±ãã¹ãæ°ã®æå¤§å¤ï¼TMAX_SUSCNTï¼ã1ã«åºå®ããã¦ã
+ *  ãã®ã§ï¼å¼·å¶å¾
+ã¡è¦æ±ãã¹ãæ°ï¼suscntï¼ã¯å¿
+è¦ãªãï¼
+ *
+ *  TCBã®ããã¤ãã®ãã£ã¼ã«ãã¯ï¼ç¹å®ã®ã¿ã¹ã¯ç¶æ
+ã§ã®ã¿æå¹ãªå¤ãä¿æãï¼
+ *  ããä»¥å¤ã®å ´åã¯å¤ãä¿è¨¼ãããªãï¼ãã£ã¦ï¼åç
+§ãã¦ã¯ãªããªãï¼ï¼å
+ *  ãã£ã¼ã«ããæå¹ãªå¤ãä¿æããæ¡ä»¶ã¯æ¬¡ã®éãï¼
+ *
+ *  ã»åæåå¾ã¯å¸¸ã«æå¹ï¼
+ *  		p_tinibï¼tstatï¼actque
+ *  ã»ä¼æ­¢ç¶æ
+ä»¥å¤ã§æå¹ï¼ä¼æ­¢ç¶æ
+ã§ã¯åæå¤ã«ãªã£ã¦ããï¼ï¼
+ *  		bpriorityï¼priorityï¼wupqueï¼rasterï¼enaterï¼p_lastmtx
+ *  ã»å¾
+ã¡ç¶æ
+ï¼äºéå¾
+ã¡ç¶æ
+ãå«ãï¼ã§æå¹ï¼
+ *  		p_winfo
+ *  ã»å®è¡ã§ããç¶æ
+ã¨åæã»éä¿¡ãªãã¸ã§ã¯ãã«å¯¾ããå¾
+ã¡ç¶æ
+ã§æå¹ï¼
+ *  		task_queue
+ *  ã»å®è¡å¯è½ç¶æ
+ï¼å¾
+ã¡ç¶æ
+ï¼å¼·å¶å¾
+ã¡ç¶æ
+ï¼äºéå¾
+ã¡ç¶æ
+ã§æå¹ï¼
+ *  		tskctxb
+ */
+typedef struct task_control_block {
+	QUEUE			task_queue;		/* ã¿ã¹ã¯ã­ã¥ã¼ */
+	const TINIB		*p_tinib;		/* åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+
+#ifdef UINT8_MAX
+	uint8_t			tstat;			/* ã¿ã¹ã¯ç¶æ
+ï¼å
+é¨è¡¨ç¾ï¼*/
+	uint8_t			bpriority;		/* ãã¼ã¹åªå
+åº¦ï¼å
+é¨è¡¨ç¾ï¼*/
+	uint8_t			priority;		/* ç¾å¨ã®åªå
+åº¦ï¼å
+é¨è¡¨ç¾ï¼*/
+#else /* UINT8_MAX */
+	BIT_FIELD_UINT	tstat : 8;		/* ã¿ã¹ã¯ç¶æ
+ï¼å
+é¨è¡¨ç¾ï¼*/
+	BIT_FIELD_UINT	bpriority : 8;	/* ãã¼ã¹åªå
+åº¦ï¼å
+é¨è¡¨ç¾ï¼*/
+	BIT_FIELD_UINT	priority : 8	/* ç¾å¨ã®åªå
+åº¦ï¼å
+é¨è¡¨ç¾ï¼*/;
+#endif /* UINT8_MAX */
+	BIT_FIELD_BOOL	actque : 1;		/* èµ·åè¦æ±ã­ã¥ã¼ã¤ã³ã° */
+	BIT_FIELD_BOOL	wupque : 1;		/* èµ·åºè¦æ±ã­ã¥ã¼ã¤ã³ã° */
+	BIT_FIELD_BOOL	raster : 1;		/* ã¿ã¹ã¯çµäºè¦æ±ç¶æ
+ */
+	BIT_FIELD_BOOL	enater : 1;		/* ã¿ã¹ã¯çµäºè¨±å¯ç¶æ
+ */
+
+	WINFO			*p_winfo;		/* å¾
+ã¡æ
+å ±ãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	MTXCB			*p_lastmtx;		/* æå¾ã«ã­ãã¯ãããã¥ã¼ããã¯ã¹ */
+	TSKCTXB			tskctxb;		/* ã¿ã¹ã¯ã³ã³ãã­ã¹ããã­ãã¯ */
+} TCB;
+
+/*
+ *  å®è¡ç¶æ
+ã®ã¿ã¹ã¯
+ *
+ *  å®è¡ç¶æ
+ã®ã¿ã¹ã¯ï¼ï¼ãã­ã»ããµãã³ã³ãã­ã¹ããæã£ã¦ããã¿ã¹ã¯ï¼ã®
+ *  TCBãæããã¤ã³ã¿ï¼å®è¡ç¶æ
+ã®ã¿ã¹ã¯ããªãå ´åã¯NULLã«ããï¼
+ *
+ *  ãµã¼ãã¹ã³ã¼ã«ã®å¦çä¸­ã§ï¼èªã¿ã¹ã¯ï¼ãµã¼ãã¹ã³ã¼ã«ãå¼ã³åºããã¿ã¹
+ *  ã¯ï¼ã«é¢ããæ
+å ±ãåç
+§ããå ´åã¯p_runtskãä½¿ãï¼p_runtskãæ¸ãæã
+ *  ãã®ã¯ï¼ãã£ã¹ãããã£ï¼ã¨åæåå¦çï¼ã®ã¿ã§ããï¼
+ */
+extern TCB	*p_runtsk;
+
+/*
+ *  å®è¡ãã¹ãã¿ã¹ã¯
+ *
+ *  å®è¡ãã¹ãã¿ã¹ã¯ã®TCBãæããã¤ã³ã¿ï¼å®è¡ã§ããã¿ã¹ã¯ããªãå ´åã¯
+ *  NULLã«ããï¼
+ *
+ *  p_runtskã¯ï¼éå¸¸ã¯p_schedtskã¨ä¸è´ãã¦ãããï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ã
+ *  å®è¡ä¸­ã¯ï¼ä¸è´ãã¦ããã¨ã¯éããªãï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ã§ãªã
+ *  ç¶æ
+ã®éã¨ãã£ã¹ãããç¦æ­¢ç¶æ
+ã®éï¼ããªãã¡ï¼dspflgãfalseã§ããéï¼
+ *  ã¯ï¼p_schedtskãæ´æ°ããªãï¼
+ */
+extern TCB	*p_schedtsk;
+
+/*
+ *  ãã£ã¹ãããè¨±å¯ç¶æ
+
+ *
+ *  ãã£ã¹ãããè¨±å¯ç¶æ
+ã§ãããã¨ãç¤ºããã©ã°ï¼
+ */
+extern bool_t	enadsp;
+
+/*
+ *  ã¿ã¹ã¯ãã£ã¹ãããå¯è½ç¶æ
+
+ *
+ *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ç¶æ
+ã§ããï¼ãã£ã¹ãããè¨±å¯ç¶æ
+ã§ããï¼ãã£
+ *  ã¹ãããç¦æ­¢ç¶æ
+ã§ãªãï¼ãã¨ãç¤ºããã©ã°ï¼ãã£ã¹ãããä¿çç¶æ
+ã§ãª
+ *  ããã¨ã¯ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãå®è¡ä¸­ã§ï¼CPUã­ãã¯ç¶æ
+ã§ãªãï¼dspflgã
+ *  trueã§ãããã¨ã§å¤å¥ãããã¨ãã§ããï¼
+ */
+extern bool_t	dspflg;
+
+/*
+ *  ã¬ãã£ã­ã¥ã¼
+ *
+ *  ã¬ãã£ã­ã¥ã¼ã¯ï¼å®è¡ã§ããç¶æ
+ã®ã¿ã¹ã¯ãç®¡çããããã®ã­ã¥ã¼ã§ããï¼
+ *  å®è¡ç¶æ
+ã®ã¿ã¹ã¯ãç®¡çãã¦ããããï¼ã¬ãã£ï¼å®è¡å¯è½ï¼ã­ã¥ã¼ã¨ãã
+ *  åç§°ã¯æ­£ç¢ºã§ã¯ãªããï¼ã¬ãã£ã­ã¥ã¼ã¨ããåç§°ãå®çãã¦ããããï¼ã
+ *  ã®åç§°ã§å¼ã¶ãã¨ã«ããï¼
+ *
+ *  ã¬ãã£ã­ã¥ã¼ã¯ï¼åªå
+åº¦ãã¨ã®ã¿ã¹ã¯ã­ã¥ã¼ã§æ§æããã¦ããï¼ã¿ã¹ã¯ã®
+ *  TCBã¯ï¼è©²å½ããåªå
+åº¦ã®ã­ã¥ã¼ã«ç»é²ãããï¼
+ */
+extern QUEUE	ready_queue[TNUM_TPRI];
+
+/*
+ *  ã¬ãã£ã­ã¥ã¼ãµã¼ãã®ããã®ãããããã
+ *
+ *  ã¬ãã£ã­ã¥ã¼ã®ãµã¼ããå¹çããè¡ãããã«ï¼åªå
+åº¦ãã¨ã®ã¿ã¹ã¯ã­ã¥ã¼
+ *  ã«ã¿ã¹ã¯ãå
+¥ã£ã¦ãããã©ãããç¤ºããããããããç¨æãã¦ããï¼ãã
+ *  ãããããä½¿ããã¨ã§ï¼ã¡ã¢ãªã¢ã¯ã»ã¹ã®åæ°ãæ¸ãããã¨ãã§ãããï¼
+ *  ãããæä½å½ä»¤ãå
+
+å®ãã¦ããªããã­ã»ããµã§ï¼åªå
+åº¦ã®æ®µéæ°ãå°ãªã
+ *  å ´åã«ã¯ï¼ããããããæä½ã®ãªã¼ãã¼ãããã®ããã«ï¼éã«å¹çãè½ã¡
+ *  ãå¯è½æ§ãããï¼
+ *
+ *  åªå
+åº¦ã16æ®µéã§ãããã¨ãä»®å®ãã¦ããããï¼uint16_tåã¨ãã¦ããï¼
+ */
+extern uint16_t	ready_primap;
+
+/*
+ *  ä½¿ç¨ãã¦ããªãTCBã®ãªã¹ã
+ */
+extern QUEUE	free_tcb;
+
+/*
+ *  ã¿ã¹ã¯IDã®æå¤§å¤ï¼kernel_cfg.cï¼
+ */
+extern const ID	tmax_tskid;
+extern const ID	tmax_stskid;
+
+/*
+ *  ã¿ã¹ã¯åæåãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern const TINIB	tinib_table[];
+extern TINIB		atinib_table[];
+
+/*
+ *  ã¿ã¹ã¯çæé åºãã¼ãã«ï¼kernel_cfg.cï¼
+ */
+extern const ID	torder_table[];
+
+/*
+ *  TCBã®ã¨ãªã¢ï¼kernel_cfg.cï¼
+ */
+extern TCB	tcb_table[];
+
+/*
+ *  ã¿ã¹ã¯ã®æ°
+ */
+#define tnum_tsk	((uint_t)(tmax_tskid - TMIN_TSKID + 1))
+#define tnum_stsk	((uint_t)(tmax_stskid - TMIN_TSKID + 1))
+
+/*
+ *  ã¿ã¹ã¯IDããTCBãåãåºãããã®ãã¯ã­
+ */
+#define INDEX_TSK(tskid)	((uint_t)((tskid) - TMIN_TSKID))
+#define get_tcb(tskid)		(&(tcb_table[INDEX_TSK(tskid)]))
+
+/*
+ *  TCBããã¿ã¹ã¯IDãåãåºãããã®ãã¯ã­
+ */
+#define	TSKID(p_tcb)	((ID)(((p_tcb) - tcb_table) + TMIN_TSKID))
+
+/*
+ *  ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®åæå
+ */
+extern void	initialize_task(void);
+
+/*
+ *  æé«åªå
+é ä½ã¿ã¹ã¯ã®ãµã¼ã
+ *
+ *  ã¬ãã£ã­ã¥ã¼ä¸­ã®æé«åªå
+é ä½ã®ã¿ã¹ã¯ããµã¼ããï¼ãã®TCBã¸ã®ãã¤ã³ã¿
+ *  ãè¿ãï¼ã¬ãã£ã­ã¥ã¼ãç©ºã®å ´åã«ã¯ï¼ãã®é¢æ°ãå¼ã³åºãã¦ã¯ãªããªãï¼
+ */
+extern TCB	*search_schedtsk(void);
+
+/*
+ *  å®è¡ã§ããç¶æ
+ã¸ã®é·ç§»
+ *
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ãã¬ãã£ã­ã¥ã¼ã«æ¿å
+¥ããï¼ã¬ãã£ã­ã¥ã¼ã«æ¿å
+¥
+ *  ããã¿ã¹ã¯ã®åªå
+åº¦ãï¼å®è¡ãã¹ãã¿ã¹ã¯ã®åªå
+åº¦ãããé«ãå ´åã¯ï¼å®
+ *  è¡ãã¹ãã¿ã¹ã¯ãæ´æ°ããï¼
+ */
+extern void	make_runnable(TCB *p_tcb);
+
+/*
+ *  å®è¡ã§ããç¶æ
+ããä»ã®ç¶æ
+ã¸ã®é·ç§»
+ *
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ãã¬ãã£ã­ã¥ã¼ããåé¤ããï¼p_tcbã§æå®ãã
+ *  ã¿ã¹ã¯ãå®è¡ãã¹ãã¿ã¹ã¯ã§ãã£ãå ´åã«ã¯ï¼å®è¡ãã¹ãã¿ã¹ã¯ãæ´æ°ã
+ *  ãï¼
+ */
+extern void	make_non_runnable(TCB *p_tcb);
+
+/*
+ *  ä¼æ­¢ç¶æ
+ã¸ã®é·ç§»
+ *
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ã®ç¶æ
+ãä¼æ­¢ç¶æ
+ã¨ããï¼ã¾ãï¼ã¿ã¹ã¯ã®èµ·å
+ *  æã«åæåãã¹ãå¤æ°ã®åæåã¨ï¼ã¿ã¹ã¯èµ·åã®ããã®ã³ã³ãã­ã¹ããè¨­
+ *  å®ããï¼
+ */
+extern void	make_dormant(TCB *p_tcb);
+
+/*
+ *  ä¼æ­¢ç¶æ
+ããå®è¡ã§ããç¶æ
+ã¸ã®é·ç§»
+ *
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ã®ç¶æ
+ãä¼æ­¢ç¶æ
+ããå®è¡ã§ããç¶æ
+ã¨ããï¼
+ */
+extern void	make_active(TCB *p_tcb);
+
+/*
+ *  ã¿ã¹ã¯ã®åªå
+åº¦ã®å¤æ´
+ *
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ã®åªå
+åº¦ãnewpriï¼å
+é¨è¡¨ç¾ï¼ã«å¤æ´ããï¼ã¾ãï¼
+ *  å¿
+è¦ãªå ´åã«ã¯ï¼å®è¡ãã¹ãã¿ã¹ã¯ãæ´æ°ããï¼
+ *
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ã®åªå
+é ä½ã¯ï¼åªå
+åº¦ãåãã¿ã¹ã¯ã®ä¸­ã§ï¼
+ *  mtxmodeãfalseã®æã¯æä½ï¼mtxmodeãtrueã®æã¯æé«ã¨ããï¼
+ */
+extern void	change_priority(TCB *p_tcb, uint_t newpri, bool_t mtxmode);
+
+/*
+ *  ã¬ãã£ã­ã¥ã¼ã®åè»¢
+ *
+ *  ã¬ãã£ã­ã¥ã¼ä¸­ã®ï¼p_queueã§æå®ãããã¿ã¹ã¯ã­ã¥ã¼ãåè»¢ãããï¼ã¾ãï¼
+ *  å¿
+è¦ãªå ´åã«ã¯ï¼å®è¡ãã¹ãã¿ã¹ã¯ãæ´æ°ããï¼
+ */
+extern void	rotate_ready_queue(QUEUE *p_queue);
+
+/*
+ *  ã¿ã¹ã¯ã®çµäºå¦ç
+ *
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ãçµäºãããå¦çãè¡ãï¼ã¿ã¹ã¯ã®èµ·åè¦æ±ã­ã¥ã¼
+ *  ã¤ã³ã°æ°ã0ã§ãªãå ´åã«ã¯ï¼ååº¦èµ·åããããã®å¦çãè¡ãï¼
+ */
+extern void	task_terminate(TCB *p_tcb);
+
+#endif /* TOPPERS_TASK_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/task.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/task.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/task.trb	(revision 270)
@@ -0,0 +1,135 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: task.trb 668 2016-03-03 13:57:53Z ertl-hiro $
+# 
+
+#
+#		ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®çæã¹ã¯ãªãã
+#
+
+class TaskObject < KernelObject
+  def initialize()
+    super("tsk", "task", "t")
+  end
+
+  def prepare(key, params)
+    # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+    params[:stk] ||= "NULL"
+
+    # tskatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1028ï¼½
+    #ï¼TA_ACTï¼TA_NOACTQUEï¼TARGET_TSKATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+    if (params[:tskatr] & ~($TA_ACT|$TA_NOACTQUE|$TARGET_TSKATR)) != 0
+      error_illegal_id("E_RSATR", params, :tskatr, :tskid)
+    end
+
+    # (TMIN_TPRI <= itskpri && itskpri <= TMAX_TPRI)ã§ãªãå ´åï¼»NGKI1034ï¼½
+    if !($TMIN_TPRI <= params[:itskpri] && params[:itskpri] <= $TMAX_TPRI)
+      error_illegal_id("E_PAR", params, :itskpri, :tskid)
+    end
+
+    # stkszãã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_STKSZï¼æªå®ç¾©ã®å ´åã¯1ï¼
+    # ãããå°ããå ´åï¼»NGKI1042ï¼½
+    if params[:stksz] < $TARGET_MIN_STKSZ
+      error_wrong_id("E_PAR", params, :stksz, :tskid, "too small")
+    end
+
+    # ã¹ã¿ãã¯é åã®è¨­å®ï¼»NGKI1041ï¼½
+    if params[:stk] == "NULL"
+      # ã¹ã¿ãã¯é åã®çæï¼»NGKI1049ï¼½
+      stkName = "_kernel_stack_#{params[:tskid]}"
+      params[:tinib_stksz] = AllocStack(stkName, params[:stksz])
+      params[:tinib_stk] = stkName
+    else
+      # stkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼»NGKI1056ï¼½
+      if (params[:stksz] & ($CHECK_STKSZ_ALIGN - 1)) != 0
+        error_wrong_id("E_PAR", params, :stksz, :tskid, "not aligned")
+      end
+
+      params[:tinib_stksz] = params[:stksz]
+      params[:tinib_stk] = "(void *)(#{params[:stk]})"
+    end
+  end
+
+  def generateInib(key, params)
+    if $USE_TSKINICTXB
+      tskinictxb = GenerateTskinictxb(key, params)
+    else
+      tskinictxb = "#{params[:tinib_stksz]}, #{params[:tinib_stk]}"
+    end
+    return("(#{params[:tskatr]}), (intptr_t)(#{params[:exinf]}), " \
+			"(TASK)(#{params[:task]}), INT_PRIORITY(#{params[:itskpri]}), " \
+			+ tskinictxb)
+  end
+end
+
+#
+#  ã¿ã¹ã¯ç®¡çã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Task Management Functions")
+if $cfgData[:CRE_TSK].size() == 0
+  error("no task is registered")
+end
+TaskObject.new.generate()
+
+# ã¿ã¹ã¯çæé åºãã¼ãã«ã®çæ
+$kernelCfgC.add("const ID _kernel_torder_table[TNUM_STSKID] = { ")
+$kernelCfgC.append("\t")
+$cfgData[:CRE_TSK].each_with_index do |(key, params), index|
+  $kernelCfgC.append(", ") if index > 0
+  $kernelCfgC.append("#{params[:tskid]}")
+end
+$kernelCfgC.add
+$kernelCfgC.add2("};")
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/task_manage.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/task_manage.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/task_manage.c	(revision 270)
@@ -0,0 +1,548 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2017 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã¿ã¹ã¯ç®¡çæ©è½
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+#include "taskhook.h"
+#include "wait.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_ACRE_TSK_ENTER
+#define LOG_ACRE_TSK_ENTER(pk_ctsk)
+#endif /* LOG_ACRE_TSK_ENTER */
+
+#ifndef LOG_ACRE_TSK_LEAVE
+#define LOG_ACRE_TSK_LEAVE(ercd)
+#endif /* LOG_ACRE_TSK_LEAVE */
+
+#ifndef LOG_DEL_TSK_ENTER
+#define LOG_DEL_TSK_ENTER(tskid)
+#endif /* LOG_DEL_TSK_ENTER */
+
+#ifndef LOG_DEL_TSK_LEAVE
+#define LOG_DEL_TSK_LEAVE(ercd)
+#endif /* LOG_DEL_TSK_LEAVE */
+
+#ifndef LOG_ACT_TSK_ENTER
+#define LOG_ACT_TSK_ENTER(tskid)
+#endif /* LOG_ACT_TSK_ENTER */
+
+#ifndef LOG_ACT_TSK_LEAVE
+#define LOG_ACT_TSK_LEAVE(ercd)
+#endif /* LOG_ACT_TSK_LEAVE */
+
+#ifndef LOG_CAN_ACT_ENTER
+#define LOG_CAN_ACT_ENTER(tskid)
+#endif /* LOG_CAN_ACT_ENTER */
+
+#ifndef LOG_CAN_ACT_LEAVE
+#define LOG_CAN_ACT_LEAVE(ercd)
+#endif /* LOG_CAN_ACT_LEAVE */
+
+#ifndef LOG_GET_TST_ENTER
+#define LOG_GET_TST_ENTER(tskid, p_tskstat)
+#endif /* LOG_GET_TST_ENTER */
+
+#ifndef LOG_GET_TST_LEAVE
+#define LOG_GET_TST_LEAVE(ercd, p_tskstat)
+#endif /* LOG_GET_TST_LEAVE */
+
+#ifndef LOG_CHG_PRI_ENTER
+#define LOG_CHG_PRI_ENTER(tskid, tskpri)
+#endif /* LOG_CHG_PRI_ENTER */
+
+#ifndef LOG_CHG_PRI_LEAVE
+#define LOG_CHG_PRI_LEAVE(ercd)
+#endif /* LOG_CHG_PRI_LEAVE */
+
+#ifndef LOG_GET_PRI_ENTER
+#define LOG_GET_PRI_ENTER(tskid, p_tskpri)
+#endif /* LOG_GET_PRI_ENTER */
+
+#ifndef LOG_GET_PRI_LEAVE
+#define LOG_GET_PRI_LEAVE(ercd, p_tskpri)
+#endif /* LOG_GET_PRI_LEAVE */
+
+#ifndef LOG_GET_INF_ENTER
+#define LOG_GET_INF_ENTER(p_exinf)
+#endif /* LOG_GET_INF_ENTER */
+
+#ifndef LOG_GET_INF_LEAVE
+#define LOG_GET_INF_LEAVE(ercd, p_exinf)
+#endif /* LOG_GET_INF_LEAVE */
+
+/*
+ *  ã¿ã¹ã¯ã®çæ
+ *
+ *  pk_ctsk->exinfã¯ï¼ã¨ã©ã¼ãã§ãã¯ãããï¼ä¸åº¦ããåç
+§ããªãããï¼ã­ã¼
+ *  ã«ã«å¤æ°ã«ã³ãã¼ããå¿
+è¦ããªãï¼éä¸­ã§æ¸ãæãã£ã¦ãæ¯éããªãï¼ï¼
+ */
+#ifdef TOPPERS_acre_tsk
+
+#ifndef TARGET_MIN_STKSZ
+#define TARGET_MIN_STKSZ	1U		/* æªå®ç¾©ã®å ´åã¯0ã§ãªããã¨ããã§ãã¯ */
+#endif /* TARGET_MIN_STKSZ */
+
+ER_UINT
+acre_tsk(const T_CTSK *pk_ctsk)
+{
+	TCB		*p_tcb;
+	TINIB	*p_tinib;
+	ATR		tskatr;
+	TASK	task;
+	PRI		itskpri;
+	size_t	stksz;
+	STK_T	*stk;
+	ER		ercd;
+
+	LOG_ACRE_TSK_ENTER(pk_ctsk);
+	CHECK_TSKCTX_UNL();
+
+	tskatr = pk_ctsk->tskatr;
+	task = pk_ctsk->task;
+	itskpri = pk_ctsk->itskpri;
+	stksz = pk_ctsk->stksz;
+	stk = pk_ctsk->stk;
+
+	CHECK_RSATR(tskatr, TA_ACT|TA_NOACTQUE|TARGET_TSKATR);
+	CHECK_PAR(FUNC_ALIGN(task));
+	CHECK_PAR(FUNC_NONNULL(task));
+	CHECK_PAR(VALID_TPRI(itskpri));
+	CHECK_PAR(stksz >= TARGET_MIN_STKSZ);
+	if (stk != NULL) {
+		CHECK_PAR(STKSZ_ALIGN(stksz));
+		CHECK_PAR(STACK_ALIGN(stk));
+	}
+
+	lock_cpu();
+	if (queue_empty(&free_tcb)) {
+		ercd = E_NOID;
+	}
+	else {
+		if (stk == NULL) {
+			stksz = ROUND_STK_T(stksz);
+			stk = kernel_malloc(stksz);
+			tskatr |= TA_MEMALLOC;
+		}
+		if (stk == NULL) {
+			ercd = E_NOMEM;
+		}
+		else {
+			p_tcb = ((TCB *) queue_delete_next(&free_tcb));
+			p_tinib = (TINIB *)(p_tcb->p_tinib);
+			p_tinib->tskatr = tskatr;
+			p_tinib->exinf = pk_ctsk->exinf;
+			p_tinib->task = task;
+			p_tinib->ipriority = INT_PRIORITY(itskpri);
+#ifdef USE_TSKINICTXB
+			init_tskinictxb(&(p_tinib->tskinictxb), stksz, stk);
+#else /* USE_TSKINICTXB */
+			p_tinib->stksz = stksz;
+			p_tinib->stk = stk;
+#endif /* USE_TSKINICTXB */
+
+			p_tcb->actque = false;
+			make_dormant(p_tcb);
+			if ((p_tcb->p_tinib->tskatr & TA_ACT) != 0U) {
+				make_active(p_tcb);
+			}
+			ercd = TSKID(p_tcb);
+		}
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_ACRE_TSK_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_acre_tsk */
+
+/*
+ *  ã¿ã¹ã¯ã®åé¤ï¼»NGKI1100ï¼½
+ */
+#ifdef TOPPERS_del_tsk
+
+ER
+del_tsk(ID tskid)
+{
+	TCB		*p_tcb;
+	TINIB	*p_tinib;
+	ER		ercd;
+
+	LOG_DEL_TSK_ENTER(tskid);
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI1101ï¼½ï¼»NGKI1102ï¼½*/
+	CHECK_ID(VALID_TSKID(tskid));				/*ï¼»NGKI1103ï¼½*/
+	p_tcb = get_tcb(tskid);
+
+	lock_cpu();
+	if (p_tcb->p_tinib->tskatr == TA_NOEXS) {
+		ercd = E_NOEXS;							/*ï¼»NGKI1104ï¼½*/
+	}
+	else if (tskid <= tmax_stskid || !TSTAT_DORMANT(p_tcb->tstat)) {
+		ercd = E_OBJ;							/*ï¼»NGKI1106ï¼½ï¼»NGKI1107ï¼½*/
+	}
+	else {
+		p_tinib = (TINIB *)(p_tcb->p_tinib);
+#ifdef USE_TSKINICTXB
+		term_tskinictxb(&(p_tinib->tskinictxb));
+#else /* USE_TSKINICTXB */
+		if ((p_tinib->tskatr & TA_MEMALLOC) != 0U) {	/*ï¼»NGKI1109ï¼½*/
+			kernel_free(p_tinib->stk);
+		}
+#endif /* USE_TSKINICTXB */
+		p_tinib->tskatr = TA_NOEXS;				/*ï¼»NGKI1108ï¼½*/
+		queue_insert_prev(&free_tcb, &(p_tcb->task_queue));
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_DEL_TSK_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_del_tsk */
+
+/*
+ *  ã¿ã¹ã¯ã®èµ·åï¼»NGKI3529ï¼½
+ */
+#ifdef TOPPERS_act_tsk
+
+ER
+act_tsk(ID tskid)
+{
+	TCB		*p_tcb;
+	ER		ercd;
+
+	LOG_ACT_TSK_ENTER(tskid);
+	CHECK_UNL();								/*ï¼»NGKI1114ï¼½*/
+	if (tskid == TSK_SELF && !sense_context()) {
+		p_tcb = p_runtsk;						/*ï¼»NGKI1121ï¼½*/
+	}
+	else {
+		CHECK_ID(VALID_TSKID(tskid));			/*ï¼»NGKI1115ï¼½*/
+		p_tcb = get_tcb(tskid);
+	}
+
+	lock_cpu();
+	if (p_tcb->p_tinib->tskatr == TA_NOEXS) {
+		ercd = E_NOEXS;							/*ï¼»NGKI1116ï¼½*/
+	}
+	else if (TSTAT_DORMANT(p_tcb->tstat)) {
+		make_active(p_tcb);						/*ï¼»NGKI1118ï¼½*/
+		if (p_runtsk != p_schedtsk) {
+			if (!sense_context()) {
+				dispatch();
+			}
+			else {
+				request_dispatch();
+			}
+		}
+		ercd = E_OK;
+	}
+	else if ((p_tcb->p_tinib->tskatr & TA_NOACTQUE) != 0U || p_tcb->actque) {
+		ercd = E_QOVR;			   				/*ï¼»NGKI3528ï¼½*/
+	}
+	else {
+		p_tcb->actque = true;					/*ï¼»NGKI3527ï¼½*/
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_ACT_TSK_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_act_tsk */
+
+/*
+ *  ã¿ã¹ã¯èµ·åè¦æ±ã®ã­ã£ã³ã»ã«ï¼»NGKI1138ï¼½
+ */
+#ifdef TOPPERS_can_act
+
+ER_UINT
+can_act(ID tskid)
+{
+	TCB		*p_tcb;
+	ER_UINT	ercd;
+
+	LOG_CAN_ACT_ENTER(tskid);
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI1139ï¼½ï¼»NGKI1140ï¼½*/
+	if (tskid == TSK_SELF) {
+		p_tcb = p_runtsk;						/*ï¼»NGKI1146ï¼½*/
+	}
+	else {
+		CHECK_ID(VALID_TSKID(tskid));			/*ï¼»NGKI1141ï¼½*/
+		p_tcb = get_tcb(tskid);
+	}
+
+	lock_cpu();
+	if (p_tcb->p_tinib->tskatr == TA_NOEXS) {
+		ercd = E_NOEXS;							/*ï¼»NGKI1142ï¼½*/
+	}
+	else {
+		ercd = p_tcb->actque ? 1 : 0;			/*ï¼»NGKI1144ï¼½*/
+		p_tcb->actque = false;					/*ï¼»NGKI1144ï¼½*/
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_CAN_ACT_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_can_act */
+
+/*
+ *  ã¿ã¹ã¯ç¶æ
+ã®åç
+§ï¼»NGKI3613ï¼½
+ */
+#ifdef TOPPERS_get_tst
+
+ER
+get_tst(ID tskid, STAT *p_tskstat)
+{
+	TCB		*p_tcb;
+	uint_t	tstat;
+	ER		ercd;
+
+	LOG_GET_TST_ENTER(tskid, p_tskstat);
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3614ï¼½ï¼»NGKI3615ï¼½*/
+	if (tskid == TSK_SELF) {
+		p_tcb = p_runtsk;						/*ï¼»NGKI3621ï¼½*/
+	}
+	else {
+		CHECK_ID(VALID_TSKID(tskid));			/*ï¼»NGKI3616ï¼½*/
+		p_tcb = get_tcb(tskid);
+	}
+
+	lock_cpu();
+	tstat = p_tcb->tstat;
+	if (p_tcb->p_tinib->tskatr == TA_NOEXS) {
+		ercd = E_NOEXS;							/*ï¼»NGKI3617ï¼½*/
+	}
+	else if (TSTAT_DORMANT(tstat)) {			/*ï¼»NGKI3620ï¼½*/
+		*p_tskstat = TTS_DMT;
+	}
+	else if (TSTAT_SUSPENDED(tstat)) {
+		if (TSTAT_WAITING(tstat)) {
+			*p_tskstat = TTS_WAS;
+		}
+		else {
+			*p_tskstat = TTS_SUS;
+		}
+	}
+	else if (TSTAT_WAITING(tstat)) {
+		*p_tskstat = TTS_WAI;
+	}
+	else if (p_tcb == p_runtsk) {
+		*p_tskstat = TTS_RUN;
+	}
+	else {
+		*p_tskstat = TTS_RDY;
+	}
+	ercd = E_OK;
+	unlock_cpu();
+
+  error_exit:
+	LOG_GET_TST_LEAVE(ercd, p_tskstat);
+	return(ercd);
+}
+
+#endif /* TOPPERS_get_tst */
+
+/*
+ *  ã¿ã¹ã¯ã®ãã¼ã¹åªå
+åº¦ã®å¤æ´ï¼»NGKI1183ï¼½
+ */
+#ifdef TOPPERS_chg_pri
+
+ER
+chg_pri(ID tskid, PRI tskpri)
+{
+	TCB		*p_tcb;
+	uint_t	newbpri;
+	ER		ercd;
+
+	LOG_CHG_PRI_ENTER(tskid, tskpri);
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI1184ï¼½ï¼»NGKI1185ï¼½*/
+	if (tskid == TSK_SELF) {
+		p_tcb = p_runtsk;						/*ï¼»NGKI1198ï¼½*/
+	}
+	else {
+		CHECK_ID(VALID_TSKID(tskid));			/*ï¼»NGKI1187ï¼½*/
+		p_tcb = get_tcb(tskid);
+	}
+	if (tskpri == TPRI_INI) {
+		newbpri = p_tcb->p_tinib->ipriority;	/*ï¼»NGKI1199ï¼½*/
+	}
+	else {
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI1188ï¼½*/
+		newbpri = INT_PRIORITY(tskpri);
+	}
+
+	lock_cpu();
+	if (p_tcb->p_tinib->tskatr == TA_NOEXS) {
+		ercd = E_NOEXS;							/*ï¼»NGKI1189ï¼½*/
+	}
+	else if (TSTAT_DORMANT(p_tcb->tstat)) {
+		ercd = E_OBJ;							/*ï¼»NGKI1191ï¼½*/
+	}
+	else if ((p_tcb->p_lastmtx != NULL || TSTAT_WAIT_MTX(p_tcb->tstat))
+						&& !((*mtxhook_check_ceilpri)(p_tcb, newbpri))) {
+		ercd = E_ILUSE;							/*ï¼»NGKI1201ï¼½*/
+	}
+	else {
+		p_tcb->bpriority = newbpri;				/*ï¼»NGKI1192ï¼½*/
+		if (p_tcb->p_lastmtx == NULL || !((*mtxhook_scan_ceilmtx)(p_tcb))) {
+			change_priority(p_tcb, newbpri, false);		/*ï¼»NGKI1193ï¼½*/
+			if (p_runtsk != p_schedtsk) {
+				dispatch();
+			}									/*ï¼»NGKI1197ï¼½*/
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_CHG_PRI_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_chg_pri */
+
+/*
+ *  ã¿ã¹ã¯åªå
+åº¦ã®åç
+§ï¼»NGKI1202ï¼½
+ */
+#ifdef TOPPERS_get_pri
+
+ER
+get_pri(ID tskid, PRI *p_tskpri)
+{
+	TCB		*p_tcb;
+	ER		ercd;
+
+	LOG_GET_PRI_ENTER(tskid, p_tskpri);
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI1203ï¼½ï¼»NGKI1204ï¼½*/
+	if (tskid == TSK_SELF) {
+		p_tcb = p_runtsk;						/*ï¼»NGKI1211ï¼½*/
+	}
+	else {
+		CHECK_ID(VALID_TSKID(tskid));			/*ï¼»NGKI1205ï¼½*/
+		p_tcb = get_tcb(tskid);
+	}
+
+	lock_cpu();
+	if (p_tcb->p_tinib->tskatr == TA_NOEXS) {
+		ercd = E_NOEXS;							/*ï¼»NGKI1206ï¼½*/
+	}
+	else if (TSTAT_DORMANT(p_tcb->tstat)) {
+		ercd = E_OBJ;							/*ï¼»NGKI1209ï¼½*/
+	}
+	else {
+		*p_tskpri = EXT_TSKPRI(p_tcb->priority);	/*ï¼»NGKI1210ï¼½*/
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_GET_PRI_LEAVE(ercd, p_tskpri);
+	return(ercd);
+}
+
+#endif /* TOPPERS_get_pri */
+
+/*
+ *  èªã¿ã¹ã¯ã®æ¡å¼µæ
+å ±ã®åç
+§ï¼»NGKI1212ï¼½
+ */
+#ifdef TOPPERS_get_inf
+
+ER
+get_inf(intptr_t *p_exinf)
+{
+	ER		ercd;
+
+	LOG_GET_INF_ENTER(p_exinf);
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI1213ï¼½ï¼»NGKI1214ï¼½*/
+
+	lock_cpu();
+	*p_exinf = p_runtsk->p_tinib->exinf;		/*ï¼»NGKI1216ï¼½*/
+	ercd = E_OK;
+	unlock_cpu();
+
+  error_exit:
+	LOG_GET_INF_LEAVE(ercd, p_exinf);
+	return(ercd);
+}
+
+#endif /* TOPPERS_get_inf */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/task_refer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/task_refer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/task_refer.c	(revision 270)
@@ -0,0 +1,251 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã¿ã¹ã¯ã®ç¶æ
+åç
+§æ©è½
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+#include "wait.h"
+#include "semaphore.h"
+#include "eventflag.h"
+#include "dataqueue.h"
+#include "pridataq.h"
+#include "mutex.h"
+#include "mempfix.h"
+#include "time_event.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_REF_TSK_ENTER
+#define LOG_REF_TSK_ENTER(tskid, pk_rtsk)
+#endif /* LOG_REF_TSK_ENTER */
+
+#ifndef LOG_REF_TSK_LEAVE
+#define LOG_REF_TSK_LEAVE(ercd, pk_rtsk)
+#endif /* LOG_REF_TSK_LEAVE */
+
+/*
+ *  ã¿ã¹ã¯ã®ç¶æ
+åç
+§
+ */
+#ifdef TOPPERS_ref_tsk
+
+ER
+ref_tsk(ID tskid, T_RTSK *pk_rtsk)
+{
+	TCB		*p_tcb;
+	uint_t	tstat;
+	ER		ercd;
+
+	LOG_REF_TSK_ENTER(tskid, pk_rtsk);
+	CHECK_TSKCTX_UNL();
+	if (tskid == TSK_SELF) {
+		p_tcb = p_runtsk;
+	}
+	else {
+		CHECK_ID(VALID_TSKID(tskid));
+		p_tcb = get_tcb(tskid);
+	}
+
+	lock_cpu();
+	if (p_tcb->p_tinib->tskatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else {
+		tstat = p_tcb->tstat;
+		if (TSTAT_DORMANT(tstat)) {
+			/*
+	 		 *  å¯¾è±¡ã¿ã¹ã¯ãä¼æ­¢ç¶æ
+ã®å ´å
+			 */
+			pk_rtsk->tskstat = TTS_DMT;
+		}
+		else {
+			/*
+	 		 *  ã¿ã¹ã¯ç¶æ
+ã®ååºã
+			 */
+			if (TSTAT_SUSPENDED(tstat)) {
+				if (TSTAT_WAITING(tstat)) {
+					pk_rtsk->tskstat = TTS_WAS;
+				}
+				else {
+					pk_rtsk->tskstat = TTS_SUS;
+				}
+			}
+			else if (TSTAT_WAITING(tstat)) {
+				pk_rtsk->tskstat = TTS_WAI;
+			}
+			else if (p_tcb == p_runtsk) {
+				pk_rtsk->tskstat = TTS_RUN;
+			}
+			else {
+				pk_rtsk->tskstat = TTS_RDY;
+			}
+
+			/*
+	 		 *  ç¾å¨åªå
+åº¦ã¨ãã¼ã¹åªå
+åº¦ã®ååºã
+			 */
+			pk_rtsk->tskpri = EXT_TSKPRI(p_tcb->priority);
+			pk_rtsk->tskbpri = EXT_TSKPRI(p_tcb->bpriority);
+
+			if (TSTAT_WAITING(tstat)) {
+				/*
+		 		 *  å¾
+ã¡è¦å ã¨å¾
+ã¡å¯¾è±¡ã®ãªãã¸ã§ã¯ãã®IDã®ååºã
+				 */
+				switch (tstat) {
+				case TS_WAITING_SLP:
+					pk_rtsk->tskwait = TTW_SLP;
+					break;
+				case TS_WAITING_DLY:
+					pk_rtsk->tskwait = TTW_DLY;
+					break;
+				case TS_WAITING_SEM:
+					pk_rtsk->tskwait = TTW_SEM;
+					pk_rtsk->wobjid = SEMID(((WINFO_SEM *)(p_tcb->p_winfo))
+																->p_semcb);
+					break;
+				case TS_WAITING_FLG:
+					pk_rtsk->tskwait = TTW_FLG;
+					pk_rtsk->wobjid = FLGID(((WINFO_FLG *)(p_tcb->p_winfo))
+																->p_flgcb);
+					break;
+				case TS_WAITING_SDTQ:
+					pk_rtsk->tskwait = TTW_SDTQ;
+					pk_rtsk->wobjid = DTQID(((WINFO_SDTQ *)(p_tcb->p_winfo))
+																->p_dtqcb);
+					break;
+				case TS_WAITING_RDTQ:
+					pk_rtsk->tskwait = TTW_RDTQ;
+					pk_rtsk->wobjid = DTQID(((WINFO_RDTQ *)(p_tcb->p_winfo))
+																->p_dtqcb);
+					break;
+				case TS_WAITING_SPDQ:
+					pk_rtsk->tskwait = TTW_SPDQ;
+					pk_rtsk->wobjid = PDQID(((WINFO_SPDQ *)(p_tcb->p_winfo))
+																->p_pdqcb);
+					break;
+				case TS_WAITING_RPDQ:
+					pk_rtsk->tskwait = TTW_RPDQ;
+					pk_rtsk->wobjid = PDQID(((WINFO_RPDQ *)(p_tcb->p_winfo))
+																->p_pdqcb);
+					break;
+				case TS_WAITING_MTX:
+					pk_rtsk->tskwait = TTW_MTX;
+					pk_rtsk->wobjid = MTXID(((WINFO_MTX *)(p_tcb->p_winfo))
+																->p_mtxcb);
+					break;
+				case TS_WAITING_MPF:
+					pk_rtsk->tskwait = TTW_MPF;
+					pk_rtsk->wobjid = MPFID(((WINFO_MPF *)(p_tcb->p_winfo))
+																->p_mpfcb);
+					break;
+				}
+
+				/*
+		 		 *  ã¿ã¤ã ã¢ã¦ãããã¾ã§ã®æéã®ååºã
+				 */
+				if (p_tcb->p_winfo->p_tmevtb != NULL) {
+					pk_rtsk->lefttmo
+							= (TMO) tmevt_lefttim(p_tcb->p_winfo->p_tmevtb);
+				}
+				else {
+					pk_rtsk->lefttmo = TMO_FEVR;
+				}
+			}
+
+			/*
+	 		 *  èµ·åºè¦æ±ã­ã¥ã¼ã¤ã³ã°æ°ã®ååºã
+			 */
+			pk_rtsk->wupcnt = p_tcb->wupque ? 1U : 0U;
+
+			/*
+			 *  ã¿ã¹ã¯çµäºè¦æ±ç¶æ
+ã®ååºã
+			 */
+			pk_rtsk->raster = p_tcb->raster;
+
+			/*
+			 *  ã¿ã¹ã¯çµäºç¦æ­¢ç¶æ
+ã®ååºã
+			 */
+			pk_rtsk->dister = !(p_tcb->enater);
+		}
+
+		/*
+		 *  èµ·åè¦æ±ã­ã¥ã¼ã¤ã³ã°æ°ã®ååºã
+		 */
+		pk_rtsk->actcnt = p_tcb->actque ? 1U : 0U;
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_REF_TSK_LEAVE(ercd, pk_rtsk);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ref_tsk */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/task_sync.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/task_sync.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/task_sync.c	(revision 270)
@@ -0,0 +1,539 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã¿ã¹ã¯ä»å±åææ©è½
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+#include "wait.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_SLP_TSK_ENTER
+#define LOG_SLP_TSK_ENTER()
+#endif /* LOG_SLP_TSK_ENTER */
+
+#ifndef LOG_SLP_TSK_LEAVE
+#define LOG_SLP_TSK_LEAVE(ercd)
+#endif /* LOG_SLP_TSK_LEAVE */
+
+#ifndef LOG_TSLP_TSK_ENTER
+#define LOG_TSLP_TSK_ENTER(tmout)
+#endif /* LOG_TSLP_TSK_ENTER */
+
+#ifndef LOG_TSLP_TSK_LEAVE
+#define LOG_TSLP_TSK_LEAVE(ercd)
+#endif /* LOG_TSLP_TSK_LEAVE */
+
+#ifndef LOG_WUP_TSK_ENTER
+#define LOG_WUP_TSK_ENTER(tskid)
+#endif /* LOG_WUP_TSK_ENTER */
+
+#ifndef LOG_WUP_TSK_LEAVE
+#define LOG_WUP_TSK_LEAVE(ercd)
+#endif /* LOG_WUP_TSK_LEAVE */
+
+#ifndef LOG_CAN_WUP_ENTER
+#define LOG_CAN_WUP_ENTER(tskid)
+#endif /* LOG_CAN_WUP_ENTER */
+
+#ifndef LOG_CAN_WUP_LEAVE
+#define LOG_CAN_WUP_LEAVE(ercd)
+#endif /* LOG_CAN_WUP_LEAVE */
+
+#ifndef LOG_REL_WAI_ENTER
+#define LOG_REL_WAI_ENTER(tskid)
+#endif /* LOG_REL_WAI_ENTER */
+
+#ifndef LOG_REL_WAI_LEAVE
+#define LOG_REL_WAI_LEAVE(ercd)
+#endif /* LOG_REL_WAI_LEAVE */
+
+#ifndef LOG_SUS_TSK_ENTER
+#define LOG_SUS_TSK_ENTER(tskid)
+#endif /* LOG_SUS_TSK_ENTER */
+
+#ifndef LOG_SUS_TSK_LEAVE
+#define LOG_SUS_TSK_LEAVE(ercd)
+#endif /* LOG_SUS_TSK_LEAVE */
+
+#ifndef LOG_RSM_TSK_ENTER
+#define LOG_RSM_TSK_ENTER(tskid)
+#endif /* LOG_RSM_TSK_ENTER */
+
+#ifndef LOG_RSM_TSK_LEAVE
+#define LOG_RSM_TSK_LEAVE(ercd)
+#endif /* LOG_RSM_TSK_LEAVE */
+
+#ifndef LOG_DLY_TSK_ENTER
+#define LOG_DLY_TSK_ENTER(dlytim)
+#endif /* LOG_DLY_TSK_ENTER */
+
+#ifndef LOG_DLY_TSK_LEAVE
+#define LOG_DLY_TSK_LEAVE(ercd)
+#endif /* LOG_DLY_TSK_LEAVE */
+
+/*
+ *  èµ·åºå¾
+ã¡
+ */
+#ifdef TOPPERS_slp_tsk
+
+ER
+slp_tsk(void)
+{
+	WINFO	winfo;
+	ER		ercd;
+
+	LOG_SLP_TSK_ENTER();
+	CHECK_DISPATCH();
+
+	lock_cpu_dsp();
+	if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else if (p_runtsk->wupque) {
+		p_runtsk->wupque = false;
+		ercd = E_OK;
+	}
+	else {
+		p_runtsk->tstat = TS_WAITING_SLP;
+		make_wait(&winfo);
+		LOG_TSKSTAT(p_runtsk);
+		dispatch();
+		ercd = winfo.wercd;
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_SLP_TSK_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_slp_tsk */
+
+/*
+ *  èµ·åºå¾
+ã¡ï¼ã¿ã¤ã ã¢ã¦ãããï¼
+ */
+#ifdef TOPPERS_tslp_tsk
+
+ER
+tslp_tsk(TMO tmout)
+{
+	WINFO	winfo;
+	TMEVTB	tmevtb;
+	ER		ercd;
+
+	LOG_TSLP_TSK_ENTER(tmout);
+	CHECK_DISPATCH();
+	CHECK_PAR(VALID_TMOUT(tmout));
+
+	lock_cpu_dsp();
+	if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else if (p_runtsk->wupque) {
+		p_runtsk->wupque = false;
+		ercd = E_OK;
+	}
+	else if (tmout == TMO_POL) {
+		ercd = E_TMOUT;
+	}
+	else {
+		p_runtsk->tstat = TS_WAITING_SLP;
+		make_wait_tmout(&winfo, &tmevtb, tmout);
+		LOG_TSKSTAT(p_runtsk);
+		dispatch();
+		ercd = winfo.wercd;
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_TSLP_TSK_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_tslp_tsk */
+
+/*
+ *  ã¿ã¹ã¯ã®èµ·åº
+ */
+#ifdef TOPPERS_wup_tsk
+
+ER
+wup_tsk(ID tskid)
+{
+	TCB		*p_tcb;
+	ER		ercd;
+
+	LOG_WUP_TSK_ENTER(tskid);
+	CHECK_UNL();
+	if (tskid == TSK_SELF && !sense_context()) {
+		p_tcb = p_runtsk;
+	}
+	else {
+		CHECK_ID(VALID_TSKID(tskid));
+		p_tcb = get_tcb(tskid);
+	}
+
+	lock_cpu();
+	if (p_tcb->p_tinib->tskatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (TSTAT_DORMANT(p_tcb->tstat)) {
+		ercd = E_OBJ;
+	}
+	else if (TSTAT_WAIT_SLP(p_tcb->tstat)) {
+		wait_complete(p_tcb);
+		if (p_runtsk != p_schedtsk) {
+			if (!sense_context()) {
+				dispatch();
+			}
+			else {
+				request_dispatch();
+			}
+		}
+		ercd = E_OK;
+	}
+	else if (!(p_tcb->wupque)) {
+		p_tcb->wupque = true;
+		ercd = E_OK;
+	}
+	else {
+		ercd = E_QOVR;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_WUP_TSK_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_wup_tsk */
+
+/*
+ *  ã¿ã¹ã¯èµ·åºè¦æ±ã®ã­ã£ã³ã»ã«
+ */
+#ifdef TOPPERS_can_wup
+
+ER_UINT
+can_wup(ID tskid)
+{
+	TCB		*p_tcb;
+	ER_UINT	ercd;
+
+	LOG_CAN_WUP_ENTER(tskid);
+	CHECK_TSKCTX_UNL();
+	if (tskid == TSK_SELF) {
+		p_tcb = p_runtsk;
+	}
+	else {
+		CHECK_ID(VALID_TSKID(tskid));
+		p_tcb = get_tcb(tskid);
+	}
+
+	lock_cpu();
+	if (p_tcb->p_tinib->tskatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (TSTAT_DORMANT(p_tcb->tstat)) {
+		ercd = E_OBJ;
+	}
+	else {
+		ercd = p_tcb->wupque ? 1 : 0;
+		p_tcb->wupque = false;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_CAN_WUP_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_can_wup */
+
+/*
+ *  å¾
+ã¡ç¶æ
+ã®å¼·å¶è§£é¤
+ */
+#ifdef TOPPERS_rel_wai
+
+ER
+rel_wai(ID tskid)
+{
+	TCB		*p_tcb;
+	ER		ercd;
+
+	LOG_REL_WAI_ENTER(tskid);
+	CHECK_UNL();
+	CHECK_ID(VALID_TSKID(tskid));
+	p_tcb = get_tcb(tskid);
+
+	lock_cpu();
+	if (p_tcb->p_tinib->tskatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (!TSTAT_WAITING(p_tcb->tstat)) {
+		ercd = E_OBJ;
+	}
+	else {
+		wait_dequeue_wobj(p_tcb);
+		wait_dequeue_tmevtb(p_tcb);
+		p_tcb->p_winfo->wercd = E_RLWAI;
+		make_non_wait(p_tcb);
+		if (p_runtsk != p_schedtsk) {
+			if (!sense_context()) {
+				dispatch();
+			}
+			else {
+				request_dispatch();
+			}
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_REL_WAI_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_rel_wai */
+
+/*
+ *  å¼·å¶å¾
+ã¡ç¶æ
+ã¸ã®ç§»è¡ï¼»NGKI1298ï¼½
+ */
+#ifdef TOPPERS_sus_tsk
+
+ER
+sus_tsk(ID tskid)
+{
+	TCB		*p_tcb;
+	ER		ercd;
+
+	LOG_SUS_TSK_ENTER(tskid);
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI1299ï¼½ï¼»NGKI1300ï¼½*/
+	if (tskid == TSK_SELF) {
+		p_tcb = p_runtsk;						/*ï¼»NGKI1310ï¼½*/
+	}
+	else {
+		CHECK_ID(VALID_TSKID(tskid));			/*ï¼»NGKI1302ï¼½*/
+		p_tcb = get_tcb(tskid);
+	}
+
+	lock_cpu();
+	if (p_tcb == p_runtsk && !dspflg) {			/*ï¼»NGKI1311ï¼½ï¼»NGKI3604ï¼½*/
+		ercd = E_CTX;
+	}
+	else if (p_tcb->p_tinib->tskatr == TA_NOEXS) {
+		ercd = E_NOEXS;							/*ï¼»NGKI1303ï¼½*/
+	}
+	else if (TSTAT_DORMANT(p_tcb->tstat)) {
+		ercd = E_OBJ;							/*ï¼»NGKI1305ï¼½*/
+	}
+	else if (p_tcb->raster) {
+		ercd = E_RASTER;						/*ï¼»NGKI3605ï¼½*/
+	}
+	else if (TSTAT_RUNNABLE(p_tcb->tstat)) {
+		/*
+		 *  å®è¡ã§ããç¶æ
+ããå¼·å¶å¾
+ã¡ç¶æ
+ã¸ã®é·ç§»ï¼»NGKI1307ï¼½
+		 */
+		p_tcb->tstat = TS_SUSPENDED;
+		LOG_TSKSTAT(p_tcb);
+		make_non_runnable(p_tcb);
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	else if (TSTAT_SUSPENDED(p_tcb->tstat)) {
+		ercd = E_QOVR;							/*ï¼»NGKI1306ï¼½*/
+	}
+	else {
+		/*
+		 *  å¾
+ã¡ç¶æ
+ããäºéå¾
+ã¡ç¶æ
+ã¸ã®é·ç§»ï¼»NGKI1308ï¼½
+		 */
+		p_tcb->tstat |= TS_SUSPENDED;
+		LOG_TSKSTAT(p_tcb);
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_SUS_TSK_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_sus_tsk */
+
+/*
+ *  å¼·å¶å¾
+ã¡ç¶æ
+ããã®åé
+ */
+#ifdef TOPPERS_rsm_tsk
+
+ER
+rsm_tsk(ID tskid)
+{
+	TCB		*p_tcb;
+	ER		ercd;
+
+	LOG_RSM_TSK_ENTER(tskid);
+	CHECK_TSKCTX_UNL();
+	CHECK_ID(VALID_TSKID(tskid));
+	p_tcb = get_tcb(tskid);
+
+	lock_cpu();
+	if (p_tcb->p_tinib->tskatr == TA_NOEXS) {
+		ercd = E_NOEXS;
+	}
+	else if (!TSTAT_SUSPENDED(p_tcb->tstat)) {
+		ercd = E_OBJ;
+	}
+	else if (!TSTAT_WAITING(p_tcb->tstat)) {
+		/*
+		 *  å¼·å¶å¾
+ã¡ç¶æ
+ããå®è¡ã§ããç¶æ
+ã¸ã®é·ç§»
+		 */
+		p_tcb->tstat = TS_RUNNABLE;
+		LOG_TSKSTAT(p_tcb);
+		make_runnable(p_tcb);
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	else {
+		/*
+		 *  äºéå¾
+ã¡ç¶æ
+ããå¾
+ã¡ç¶æ
+ã¸ã®é·ç§»
+		 */
+		p_tcb->tstat &= ~TS_SUSPENDED;
+		LOG_TSKSTAT(p_tcb);
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_RSM_TSK_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_rsm_tsk */
+
+/*
+ *  èªã¿ã¹ã¯ã®é
+å»¶
+ */
+#ifdef TOPPERS_dly_tsk
+
+ER
+dly_tsk(RELTIM dlytim)
+{
+	WINFO	winfo;
+	TMEVTB	tmevtb;
+	ER		ercd;
+
+	LOG_DLY_TSK_ENTER(dlytim);
+	CHECK_DISPATCH();
+	CHECK_PAR(VALID_RELTIM(dlytim));
+
+	lock_cpu_dsp();
+	if (p_runtsk->raster) {
+		ercd = E_RASTER;
+	}
+	else {
+		p_runtsk->tstat = TS_WAITING_DLY;
+		make_non_runnable(p_runtsk);
+		p_runtsk->p_winfo = &winfo;
+		winfo.p_tmevtb = &tmevtb;
+		tmevtb.callback = (CBACK) wait_tmout_ok;
+		tmevtb.arg = (void *) p_runtsk;
+		tmevtb_enqueue(&tmevtb, dlytim);
+		LOG_TSKSTAT(p_runtsk);
+		dispatch();
+		ercd = winfo.wercd;
+	}
+	unlock_cpu_dsp();
+
+  error_exit:
+	LOG_DLY_TSK_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_dly_tsk */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/task_term.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/task_term.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/task_term.c	(revision 270)
@@ -0,0 +1,359 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã¿ã¹ã¯çµäºæ©è½
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+#include "wait.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_EXT_TSK_ENTER
+#define LOG_EXT_TSK_ENTER()
+#endif /* LOG_EXT_TSK_ENTER */
+
+#ifndef LOG_EXT_TSK_LEAVE
+#define LOG_EXT_TSK_LEAVE(ercd)
+#endif /* LOG_EXT_TSK_LEAVE */
+
+#ifndef LOG_RAS_TER_ENTER
+#define LOG_RAS_TER_ENTER(tskid)
+#endif /* LOG_RAS_TER_ENTER */
+
+#ifndef LOG_RAS_TER_LEAVE
+#define LOG_RAS_TER_LEAVE(ercd)
+#endif /* LOG_RAS_TER_LEAVE */
+
+#ifndef LOG_DIS_TER_ENTER
+#define LOG_DIS_TER_ENTER()
+#endif /* LOG_DIS_TER_ENTER */
+
+#ifndef LOG_DIS_TER_LEAVE
+#define LOG_DIS_TER_LEAVE(ercd)
+#endif /* LOG_DIS_TER_LEAVE */
+
+#ifndef LOG_ENA_TER_ENTER
+#define LOG_ENA_TER_ENTER()
+#endif /* LOG_ENA_TER_ENTER */
+
+#ifndef LOG_ENA_TER_LEAVE
+#define LOG_ENA_TER_LEAVE(ercd)
+#endif /* LOG_ENA_TER_LEAVE */
+
+#ifndef LOG_SNS_TER_ENTER
+#define LOG_SNS_TER_ENTER()
+#endif /* LOG_SNS_TER_ENTER */
+
+#ifndef LOG_SNS_TER_LEAVE
+#define LOG_SNS_TER_LEAVE(state)
+#endif /* LOG_SNS_TER_LEAVE */
+
+#ifndef LOG_TER_TSK_ENTER
+#define LOG_TER_TSK_ENTER(tskid)
+#endif /* LOG_TER_TSK_ENTER */
+
+#ifndef LOG_TER_TSK_LEAVE
+#define LOG_TER_TSK_LEAVE(ercd)
+#endif /* LOG_TER_TSK_LEAVE */
+
+/*
+ *  èªã¿ã¹ã¯ã®çµäºï¼»NGKI1162ï¼½
+ */
+#ifdef TOPPERS_ext_tsk
+
+ER
+ext_tsk(void)
+{
+	PRI		intpri;
+	ER		ercd;
+
+	LOG_EXT_TSK_ENTER();
+	CHECK_TSKCTX();							/*ï¼»NGKI1164ï¼½*/
+
+	if (sense_lock()) {
+		/*
+		 *  CPUã­ãã¯ç¶æ
+ã§ext_tskãå¼ã°ããå ´åã¯ï¼CPUã­ãã¯ãè§£é¤ã
+		 *  ã¦ããã¿ã¹ã¯ãçµäºããï¼å®è£
+ä¸ã¯ï¼ãµã¼ãã¹ã³ã¼ã«å
+ã§ã®CPU
+		 *  ã­ãã¯ãçç¥ããã°ããã ãï¼ï¼»NGKI1168ï¼½
+		 */
+	}
+	else {
+		lock_cpu();
+	}
+
+	intpri = t_get_ipm();
+	if (!enadsp || intpri != TIPM_ENAALL) {
+		if (!enadsp) {
+			/*
+			 *  ãã£ã¹ãããç¦æ­¢ç¶æ
+ã§ext_tskãå¼ã°ããå ´åã¯ï¼ãã£ã¹ãã
+			 *  ãè¨±å¯ç¶æ
+ã«ãã¦ããã¿ã¹ã¯ãçµäºããï¼ï¼»NGKI1168ï¼½
+			 */
+			enadsp = true;
+		}
+		if (intpri != TIPM_ENAALL) {
+			/*
+			 *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ï¼IPMï¼ãTIPM_ENAALLä»¥å¤ã®ç¶æ
+ã§
+			 *  ext_tskãå¼ã°ããå ´åã¯ï¼IPMãTIPM_ENAALLã«ãã¦ããã¿ã¹
+			 *  ã¯ãçµäºããï¼ï¼»NGKI1168ï¼½
+			 */
+			t_set_ipm(TIPM_ENAALL);
+		}
+		dspflg = true;
+		p_schedtsk = search_schedtsk();
+	}
+
+	task_terminate(p_runtsk);				/* ï¼»NGKI3449ï¼½*/
+	exit_and_dispatch();					/* ï¼»NGKI1169ï¼½*/
+	ercd = E_SYS;							/* ï¼»NGKI1163ï¼½*/
+
+  error_exit:
+	LOG_EXT_TSK_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ext_tsk */
+
+/*
+ *  ã¿ã¹ã¯ã®çµäºè¦æ±ï¼»NGKI3469ï¼½
+ */
+#ifdef TOPPERS_ras_ter
+
+ER
+ras_ter(ID tskid)
+{
+	TCB		*p_tcb;
+	ER		ercd;
+
+	LOG_RAS_TER_ENTER(tskid);
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3470ï¼½ï¼»NGKI3471ï¼½*/
+	CHECK_ID(VALID_TSKID(tskid));				/*ï¼»NGKI3472ï¼½*/
+	p_tcb = get_tcb(tskid);
+	CHECK_ILUSE(p_tcb != p_runtsk);				/*ï¼»NGKI3475ï¼½*/
+
+	lock_cpu();
+	if (p_tcb->p_tinib->tskatr == TA_NOEXS) {
+		ercd = E_NOEXS;							/*ï¼»NGKI3473ï¼½*/
+	}
+	else if (TSTAT_DORMANT(p_tcb->tstat)) {
+		ercd = E_OBJ;							/*ï¼»NGKI3476ï¼½*/
+	}
+	else if (p_tcb->enater) {
+		task_terminate(p_tcb);					/*ï¼»NGKI3477ï¼½*/
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	else {
+		p_tcb->raster = true;					/*ï¼»NGKI3478ï¼½*/
+		if (!TSTAT_RUNNABLE(p_tcb->tstat)) {
+			if (TSTAT_WAITING(p_tcb->tstat)) {
+				wait_dequeue_wobj(p_tcb);		/*ï¼»NGKI3479ï¼½*/
+				wait_dequeue_tmevtb(p_tcb);
+				p_tcb->p_winfo->wercd = E_RASTER;	/*ï¼»NGKI3480ï¼½*/
+			}
+			p_tcb->tstat = TS_RUNNABLE;			/*ï¼»NGKI3606ï¼½*/
+			LOG_TSKSTAT(p_tcb);
+			make_runnable(p_tcb);
+			if (p_runtsk != p_schedtsk) {
+				dispatch();
+			}
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_RAS_TER_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ras_ter */
+
+/*
+ *  ã¿ã¹ã¯çµäºã®ç¦æ­¢ï¼»NGKI3482ï¼½
+ */
+#ifdef TOPPERS_dis_ter
+
+ER
+dis_ter(void)
+{
+	ER		ercd;
+
+	LOG_DIS_TER_ENTER();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3483ï¼½ï¼»NGKI3484ï¼½*/
+
+	lock_cpu();
+	p_runtsk->enater = false;					/*ï¼»NGKI3486ï¼½*/
+	ercd = E_OK;
+	unlock_cpu();
+
+  error_exit:
+	LOG_DIS_TER_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_dis_ter */
+
+/*
+ *  ã¿ã¹ã¯çµäºã®è¨±å¯ï¼»NGKI3487ï¼½
+ */
+#ifdef TOPPERS_ena_ter
+
+ER
+ena_ter(void)
+{
+	ER		ercd;
+
+	LOG_ENA_TER_ENTER();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3488ï¼½ï¼»NGKI3489ï¼½*/
+
+	lock_cpu();
+	if (p_runtsk->raster && dspflg) {
+		task_terminate(p_runtsk);
+		exit_and_dispatch();
+		ercd = E_SYS;
+	}
+	else {
+		p_runtsk->enater = true;				/*ï¼»NGKI3491ï¼½*/
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_ENA_TER_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ena_ter */
+
+/*
+ *  ã¿ã¹ã¯çµäºç¦æ­¢ç¶æ
+ã®åç
+§ï¼»NGKI3494ï¼½
+ */
+#ifdef TOPPERS_sns_ter
+
+bool_t
+sns_ter(void)
+{
+	bool_t	state;
+
+	LOG_SNS_TER_ENTER();
+	/*
+	 *  enaterãå¤æ´ã§ããã®ã¯èªã¿ã¹ã¯ã®ã¿ã§ããããï¼æä»å¶å¾¡ããã«èª­
+	 *  ãã§ãåé¡ãªãï¼
+	 */
+	state = (p_runtsk != NULL && p_runtsk->enater) ? false : true;
+												/*ï¼»NGKI3495ï¼½ï¼»NGKI3496ï¼½*/
+	LOG_SNS_TER_LEAVE(state);
+	return(state);
+}
+
+#endif /* TOPPERS_sns_ter */
+
+/*
+ *  ã¿ã¹ã¯ã®å¼·å¶çµäºï¼»NGKI1170ï¼½
+ */
+#ifdef TOPPERS_ter_tsk
+
+ER
+ter_tsk(ID tskid)
+{
+	TCB		*p_tcb;
+	ER		ercd;
+
+	LOG_TER_TSK_ENTER(tskid);
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI1171ï¼½ï¼»NGKI1172ï¼½*/
+	CHECK_ID(VALID_TSKID(tskid));				/*ï¼»NGKI1173ï¼½*/
+	p_tcb = get_tcb(tskid);
+	CHECK_ILUSE(p_tcb != p_runtsk);				/*ï¼»NGKI1176ï¼½*/
+
+	lock_cpu();
+	if (p_tcb->p_tinib->tskatr == TA_NOEXS) {
+		ercd = E_NOEXS;							/*ï¼»NGKI1174ï¼½*/
+	}
+	else if (TSTAT_DORMANT(p_tcb->tstat)) {
+		ercd = E_OBJ;							/*ï¼»NGKI1177ï¼½*/
+	}
+	else {
+		task_terminate(p_tcb);					/*ï¼»NGKI3450ï¼½*/
+		if (p_runtsk != p_schedtsk) {
+			dispatch();
+		}
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_TER_TSK_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ter_tsk */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/taskhook.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/taskhook.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/taskhook.c	(revision 270)
@@ -0,0 +1,73 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *  ã¿ã¹ã¯ç®¡çã«é¢é£ããããã¯ã«ã¼ãã³
+ */
+
+#include "kernel_impl.h"
+#include "task.h"
+#include "taskhook.h"
+
+/*
+ *  ãã¥ã¼ããã¯ã¹æ©è½ã®ããã®ããã¯ã«ã¼ãã³
+ */
+#ifdef TOPPERS_mtxhook
+
+bool_t	(*mtxhook_check_ceilpri)(TCB *p_tcb, uint_t bpriority) = NULL;
+bool_t	(*mtxhook_scan_ceilmtx)(TCB *p_tcb) = NULL;
+void	(*mtxhook_release_all)(TCB *p_tcb) = NULL;
+
+#endif /* TOPPERS_mtxhook */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/taskhook.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/taskhook.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/taskhook.h	(revision 270)
@@ -0,0 +1,73 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *  ã¿ã¹ã¯ç®¡çã«é¢é£ããããã¯ã«ã¼ãã³
+ */
+
+#ifndef TOPPERS_TASKHOOK_H
+#define TOPPERS_TASKHOOK_H
+
+#include "kernel_impl.h"
+#include "task.h"
+
+/*
+ *  ãã¥ã¼ããã¯ã¹æ©è½ã®ããã®ããã¯ã«ã¼ãã³
+ */
+extern bool_t	(*mtxhook_check_ceilpri)(TCB *p_tcb, uint_t bpriority);
+extern bool_t	(*mtxhook_scan_ceilmtx)(TCB *p_tcb);
+extern void		(*mtxhook_release_all)(TCB *p_tcb);
+
+#endif /* TOPPERS_TASKHOOK_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/time_event.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/time_event.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/time_event.c	(revision 270)
@@ -0,0 +1,646 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã¿ã¤ã ã¤ãã³ãç®¡çã¢ã¸ã¥ã¼ã«
+ */
+
+#include "kernel_impl.h"
+#include "time_event.h"
+
+/*
+ *  TSTEP_HRTCNTã®ç¯å²ãã§ãã¯
+ */
+#if TSTEP_HRTCNT > 4000U
+#error TSTEP_HRTCNT is too large.
+#endif /* TSTEP_HRTCNT > 4000U */
+
+/*
+ *  HRTCNT_BOUNDã®ç¯å²ãã§ãã¯
+ */
+#if HRTCNT_BOUND >= 4294000000U
+#error HRTCNT_BOUND is too large.
+#endif /* HRTCNT_BOUND >= 4294000000U */
+
+#ifdef TCYC_HRTCNT
+#if HRTCNT_BOUND >= TCYC_HRTCNT
+#error HRTCNT_BOUND is too large.
+#endif /* HRTCNT_BOUND >= TCYC_HRTCNT */
+#endif /* TCYC_HRTCNT */
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ããã¼ãæä½ãã¯ã­
+ */
+#define PARENT(p_tmevtn)	(tmevt_heap + (((p_tmevtn) - tmevt_heap) >> 1))
+													/* è¦ªãã¼ããæ±ãã */
+#define LCHILD(p_tmevtn)	(tmevt_heap + (((p_tmevtn) - tmevt_heap) << 1))
+													/* å·¦ã®å­ãã¼ããæ±ãã */
+/*
+ *  ã¿ã¤ã ã¤ãã³ããã¼ãä¸­ã®å
+é ­ã®ãã¼ã
+ */
+#define p_top_tmevtn	(&(tmevt_heap[1]))
+#define top_evttim		(tmevt_heap[1].p_tmevtb->evttim)
+										/* å
+é ­ã®ã¿ã¤ã ã¤ãã³ãã®çºçæå» */
+/*
+ *  ã¿ã¤ã ã¤ãã³ããã¼ãä¸­ã®æå¾ã®ãã¼ã
+ */
+#define p_last_tmevtn	(tmevt_heap[0].p_last)
+
+/*
+ *  ã¤ãã³ãæå»ã®åå¾é¢ä¿ã®å¤å®ï¼»ASPD1009ï¼½
+ *
+ *  ã¤ãã³ãæå»ã¯ï¼boundary_evttimããã®ç¸å¯¾å¤ã§æ¯è¼ããï¼ããªãã¡ï¼
+ *  boundary_evttimãæãæ©ãæå»ï¼boundary_evttim-1ãæãé
+ãæå»ã¨ã¿
+ *  ãªãã¦æ¯è¼ããï¼
+ */
+#define EVTTIM_ADVANCE(t)	((t) - boundary_evttim)
+#define EVTTIM_LT(t1, t2)	(EVTTIM_ADVANCE(t1) < EVTTIM_ADVANCE(t2))
+#define EVTTIM_LE(t1, t2)	(EVTTIM_ADVANCE(t1) <= EVTTIM_ADVANCE(t2))
+
+#ifdef TOPPERS_tmeini
+
+/*
+ *  å¢çã¤ãã³ãæå»ï¼»ASPD1008ï¼½
+ */
+EVTTIM	boundary_evttim;
+
+/*
+ *  æå¾ã«ç¾å¨æå»ãç®åºããæç¹ã§ã®ã¤ãã³ãæå»ï¼»ASPD1012ï¼½
+ */
+EVTTIM	current_evttim;
+
+/*
+ *  æå¾ã«ç¾å¨æå»ãç®åºããæç¹ã§ã®é«åè§£è½ã¿ã¤ãã®ã«ã¦ã³ãå¤ï¼»ASPD1012ï¼½
+ */
+HRTCNT	current_hrtcnt;
+
+/*
+ *  æãé²ãã§ããæã®ã¤ãã³ãæå»ï¼»ASPD1041ï¼½
+ */
+EVTTIM	monotonic_evttim;
+
+/*
+ *  ã·ã¹ãã æå»ã®ãªãã»ããï¼»ASPD1043ï¼½
+ */
+SYSTIM	systim_offset;
+
+/*
+ *  é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®å¦çä¸­ã§ãããã¨ãç¤ºããã©ã°ï¼»ASPD1032ï¼½
+ */
+bool_t	in_signal_time;
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ãç®¡çã¢ã¸ã¥ã¼ã«ã®åæåï¼»ASPD1061ï¼½
+ */
+void
+initialize_tmevt(void)
+{
+	current_evttim = 0U;							/*ï¼»ASPD1047ï¼½*/
+	boundary_evttim = current_evttim - BOUNDARY_MARGIN;
+													/*ï¼»ASPD1048ï¼½*/
+	monotonic_evttim = 0U;							/*ï¼»ASPD1046ï¼½*/
+	systim_offset = 0U;								/*ï¼»ASPD1044ï¼½*/
+	in_signal_time = false;							/*ï¼»ASPD1033ï¼½*/
+	p_last_tmevtn = tmevt_heap;
+}
+
+#endif /* TOPPERS_tmeini */
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ãã®æ¿å
+¥ä½ç½®ãä¸åãã«æ¢ç´¢
+ *
+ *  æå»evttimã«çºçããã¿ã¤ã ã¤ãã³ããæ¿å
+¥ãããã¼ããç©ºããããã«ï¼
+ *  ãã¼ãã®ä¸ã«åãã£ã¦ç©ºãã¼ããç§»åãããï¼ç§»ååã®ç©ºãã¼ãã®ä½ç½®ã
+ *  p_tmevtnã«æ¸¡ãã¨ï¼ç§»åå¾ã®ç©ºãã¼ãã®ä½ç½®ï¼ããªãã¡æ¿å
+¥ä½ç½®ï¼ãè¿ãï¼
+ */
+#ifdef TOPPERS_tmeup
+
+TMEVTN *
+tmevt_up(TMEVTN *p_tmevtn, EVTTIM evttim)
+{
+	TMEVTN	*p_parent;
+
+	while (p_tmevtn > p_top_tmevtn) {
+		/*
+		 *  è¦ªãã¼ãã®ã¤ãã³ãçºçæå»ã®æ¹ãæ©ãï¼ã¾ãã¯åãï¼ãªãã°ï¼
+		 *  p_tmevtnãæ¿å
+¥ä½ç½®ãªã®ã§ã«ã¼ããæããï¼
+		 */
+		p_parent = PARENT(p_tmevtn);
+		if (EVTTIM_LE(p_parent->p_tmevtb->evttim, evttim)) {
+			break;
+		}
+
+		/*
+		 *  è¦ªãã¼ããp_tmevtnã®ä½ç½®ã«ç§»åãããï¼
+		 */
+		*p_tmevtn = *p_parent;
+		p_tmevtn->p_tmevtb->p_tmevtn = p_tmevtn;
+
+		/*
+		 *  p_tmevtnãè¦ªãã¼ãã®ä½ç½®ã«æ´æ°ï¼
+		 */
+		p_tmevtn = p_parent;
+	}
+	return(p_tmevtn);
+}
+
+#endif /* TOPPERS_tmeup */
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ãã®æ¿å
+¥ä½ç½®ãä¸åãã«æ¢ç´¢
+ *
+ *  æå»evttimã«çºçããã¿ã¤ã ã¤ãã³ããæ¿å
+¥ãããã¼ããç©ºããããã«ï¼
+ *  ãã¼ãã®ä¸ã«åãã£ã¦ç©ºãã¼ããç§»åãããï¼ç§»ååã®ç©ºãã¼ãã®ä½ç½®ã
+ *  p_tmevtnã«æ¸¡ãã¨ï¼ç§»åå¾ã®ç©ºãã¼ãã®ä½ç½®ï¼ããªãã¡æ¿å
+¥ä½ç½®ï¼ãè¿ãï¼
+ */
+#ifdef TOPPERS_tmedown
+
+TMEVTN *
+tmevt_down(TMEVTN *p_tmevtn, EVTTIM evttim)
+{
+	TMEVTN	*p_child;
+
+	while ((p_child = LCHILD(p_tmevtn)) <= p_last_tmevtn) {
+		/*
+		 *  å·¦å³ã®å­ãã¼ãã®ã¤ãã³ãçºçæå»ãæ¯è¼ãï¼æ©ãæ¹ã®å­ãã¼ã
+		 *  ã®ä½ç½®ãp_childã«è¨­å®ããï¼ä»¥ä¸ã®å­ãã¼ãã¯ï¼ããã§é¸ã°ãã
+		 *  æ¹ã®å­ãã¼ãã®ãã¨ï¼
+		 */
+		if (p_child + 1 <= p_last_tmevtn
+					&& EVTTIM_LT((p_child + 1)->p_tmevtb->evttim,
+											p_child->p_tmevtb->evttim)) {
+			p_child = p_child + 1;
+		}
+
+		/*
+		 *  å­ãã¼ãã®ã¤ãã³ãçºçæå»ã®æ¹ãé
+ãï¼ã¾ãã¯åãï¼ãªãã°ï¼
+		 *  p_tmevtnãæ¿å
+¥ä½ç½®ãªã®ã§ã«ã¼ããæããï¼
+		 */
+		if (EVTTIM_LE(evttim, p_child->p_tmevtb->evttim)) {
+			break;
+		}
+
+		/*
+		 *  å­ãã¼ããp_tmevtnã®ä½ç½®ã«ç§»åãããï¼
+		 */
+		*p_tmevtn = *p_child;
+		p_tmevtn->p_tmevtb->p_tmevtn = p_tmevtn;
+
+		/*
+		 *  p_tmevtnãå­ãã¼ãã®ä½ç½®ã«æ´æ°ï¼
+		 */
+		p_tmevtn = p_child;
+	}
+	return(p_tmevtn);
+}
+
+#endif /* TOPPERS_tmedown */
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ããã¼ãã¸ã®è¿½å 
+ *
+ *  p_tmevtbã§æå®ããã¿ã¤ã ã¤ãã³ããã­ãã¯ãï¼ã¿ã¤ã ã¤ãã³ããã¼ãã«
+ *  è¿½å ããï¼
+ */
+Inline void
+tmevtb_insert(TMEVTB *p_tmevtb)
+{
+	TMEVTN	*p_tmevtn;
+
+	/*
+	 *  p_last_tmevtnãã¤ã³ã¯ãªã¡ã³ããï¼ããããä¸ã«æ¿å
+¥ä½ç½®ãæ¢ãï¼
+	 */
+	p_tmevtn = tmevt_up(++p_last_tmevtn, p_tmevtb->evttim);
+
+	/*
+	 *  ã¿ã¤ã ã¤ãã³ããp_tmevtnã®ä½ç½®ã«æ¿å
+¥ããï¼
+	 */ 
+	p_tmevtn->p_tmevtb = p_tmevtb;
+	p_tmevtb->p_tmevtn = p_tmevtn;
+}
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ããã¼ãããã®åé¤
+ */
+Inline void
+tmevtb_delete(TMEVTB *p_tmevtb)
+{
+	TMEVTN	*p_tmevtn = p_tmevtb->p_tmevtn;
+	TMEVTN	*p_parent;
+	EVTTIM	event_evttim;
+
+	/*
+	 *  åé¤ã«ããã¿ã¤ã ã¤ãã³ããã¼ããç©ºã«ãªãå ´åã¯ä½ãããªãï¼
+	 */
+	if (--p_last_tmevtn < p_top_tmevtn) {
+		return;
+	}
+
+	/*
+	 *  åé¤ãããã¼ãã®ä½ç½®ã«æå¾ã®ãã¼ãï¼p_last_tmevtn + 1 ã®ä½ç½®ã®
+	 *  ãã¼ãï¼ãæ¿å
+¥ãï¼ãããé©åãªä½ç½®ã¸ç§»åãããï¼å®éã«ã¯ï¼æå¾
+	 *  ã®ãã¼ããå®éã«æ¿å
+¥ããã®ã§ã¯ãªãï¼åé¤ãããã¼ãã®ä½ç½®ãç©ºãã¼
+	 *  ãã«ãªãã®ã§ï¼æå¾ã®ãã¼ããæ¿å
+¥ãã¹ãä½ç½®ã¸åãã¦ç©ºãã¼ããç§»
+	 *  åãããï¼
+	 *
+	 *  æå¾ã®ãã¼ãã®ã¤ãã³ãçºçæå»ãï¼åé¤ãããã¼ãã®è¦ªãã¼ãã®ã¤
+	 *  ãã³ãçºçæå»ããåã®å ´åã«ã¯ï¼ä¸ã«åãã£ã¦æ¿å
+¥ä½ç½®ãæ¢ãï¼ã
+	 *  ãã§ãªãå ´åã«ã¯ï¼ä¸ã«åãã£ã¦æ¢ãï¼
+	 */
+	event_evttim = (p_last_tmevtn + 1)->p_tmevtb->evttim;
+	if (p_tmevtn > p_top_tmevtn
+			&& EVTTIM_LT(event_evttim,
+						(p_parent = PARENT(p_tmevtn))->p_tmevtb->evttim)) {
+		/*
+		 *  è¦ªãã¼ããp_tmevtnã®ä½ç½®ã«ç§»åãããï¼
+		 */
+		*p_tmevtn = *p_parent;
+		p_tmevtn->p_tmevtb->p_tmevtn = p_tmevtn;
+
+		/*
+		 *  åé¤ãããã¼ãã®è¦ªãã¼ãããä¸ã«åãã£ã¦æ¿å
+¥ä½ç½®ãæ¢ãï¼
+		 */
+		p_tmevtn = tmevt_up(p_parent, event_evttim);
+	}
+	else {
+		/*
+		 *  åé¤ãããã¼ãããä¸ã«åãã£ã¦æ¿å
+¥ä½ç½®ãæ¢ãï¼
+		 */
+		p_tmevtn = tmevt_down(p_tmevtn, event_evttim);
+	}
+
+	/*
+	 *  æå¾ã®ãã¼ããp_tmevtnã®ä½ç½®ã«æ¿å
+¥ããï¼
+	 */ 
+	*p_tmevtn = *(p_last_tmevtn + 1);
+	p_tmevtn->p_tmevtb->p_tmevtn = p_tmevtn;
+}
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ããã¼ãã®å
+é ­ã®ãã¼ãã®åé¤
+ */
+Inline TMEVTB *
+tmevtb_delete_top(void)
+{
+	TMEVTN	*p_tmevtn;
+	TMEVTB	*p_top_tmevtb = p_top_tmevtn->p_tmevtb;
+	EVTTIM	event_evttim;
+
+	/*
+	 *  åé¤ã«ããã¿ã¤ã ã¤ãã³ããã¼ããç©ºã«ãªãå ´åã¯ä½ãããªãï¼
+	 */
+	if (--p_last_tmevtn >= p_top_tmevtn) {
+		/*
+		 *  ã«ã¼ããã¼ãã«æå¾ã®ãã¼ãï¼p_last_tmevtn + 1 ã®ä½ç½®ã®ãã¼
+		 *  ãï¼ãæ¿å
+¥ãï¼ãããé©åãªä½ç½®ã¸ç§»åãããï¼å®éã«ã¯ï¼æå¾
+		 *  ã®ãã¼ããå®éã«æ¿å
+¥ããã®ã§ã¯ãªãï¼ã«ã¼ããã¼ããç©ºãã¼ã
+		 *  ã«ãªãã®ã§ï¼æå¾ã®ãã¼ããæ¿å
+¥ãã¹ãä½ç½®ã¸åãã¦ç©ºãã¼ãã
+		 *  ç§»åãããï¼
+		 */
+		event_evttim = (p_last_tmevtn + 1)->p_tmevtb->evttim;
+		p_tmevtn = tmevt_down(p_top_tmevtn, event_evttim);
+
+		/*
+		 *  æå¾ã®ãã¼ããp_tmevtnã®ä½ç½®ã«æ¿å
+¥ããï¼
+		 */ 
+		*p_tmevtn = *(p_last_tmevtn + 1);
+		p_tmevtn->p_tmevtb->p_tmevtn = p_tmevtn;
+	}
+	return(p_top_tmevtb);
+}
+
+/*
+ *  ç¾å¨ã®ã¤ãã³ãæå»ã®æ´æ°
+ */
+#ifdef TOPPERS_tmecur
+
+void
+update_current_evttim(void)
+{
+	HRTCNT	new_hrtcnt, hrtcnt_advance;
+	EVTTIM	previous_evttim;
+
+	new_hrtcnt = target_hrt_get_current();			/*ï¼»ASPD1013ï¼½*/
+	hrtcnt_advance = new_hrtcnt - current_hrtcnt;	/*ï¼»ASPD1014ï¼½*/
+#ifdef TCYC_HRTCNT
+	if (new_hrtcnt < current_hrtcnt) {
+		hrtcnt_advance += TCYC_HRTCNT;
+	}
+#endif /* TCYC_HRTCNT */
+
+	previous_evttim = current_evttim;
+	current_evttim += (EVTTIM) hrtcnt_advance;		/*ï¼»ASPD1015ï¼½*/
+	current_hrtcnt = new_hrtcnt;					/*ï¼»ASPD1016ï¼½*/
+	boundary_evttim = current_evttim - BOUNDARY_MARGIN;	/*ï¼»ASPD1011ï¼½*/
+
+	if (monotonic_evttim - previous_evttim < (EVTTIM) hrtcnt_advance) {
+#ifdef UINT64_MAX
+		if (current_evttim < monotonic_evttim) {
+			systim_offset += 1LLU << 32;			/*ï¼»ASPD1045ï¼½*/
+		}
+#endif /* UINT64_MAX */
+		monotonic_evttim = current_evttim;			/*ï¼»ASPD1042ï¼½*/
+	}
+}
+
+#endif /* TOPPERS_tmecur */
+
+/*
+ *  ç¾å¨ã®ã¤ãã³ãæå»ãé
+ãæ¹ã«ä¸¸ããã¤ãã³ãæå»ã®ç®åºï¼»ASPD1027ï¼½
+ *
+ *  ç¾å¨ã®ã¤ãã³ãæå»ãæ´æ°ããå¾ã«å¼ã¶ãã¨ãæ³å®ãã¦ããï¼
+ */
+Inline EVTTIM
+calc_current_evttim_ub(void)
+{
+	return(current_evttim + ((EVTTIM) TSTEP_HRTCNT));
+}
+
+/*
+ *  é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®çºçã¿ã¤ãã³ã°ã®è¨­å®
+ */
+#ifdef TOPPERS_tmeset
+
+void
+set_hrt_event(void)
+{
+	HRTCNT	hrtcnt;
+
+	if (p_last_tmevtn < p_top_tmevtn) {
+		target_hrt_set_event(HRTCNT_BOUND);			/*ï¼»ASPD1007ï¼½*/
+	}
+	else if (EVTTIM_LE(top_evttim, current_evttim)) {
+		target_hrt_raise_event();					/*ï¼»ASPD1017ï¼½*/
+	}
+	else {
+		hrtcnt = (HRTCNT)(top_evttim - current_evttim);
+		if (hrtcnt > HRTCNT_BOUND) {
+			target_hrt_set_event(HRTCNT_BOUND);		/*ï¼»ASPD1006ï¼½*/
+		}
+		else {
+			target_hrt_set_event(hrtcnt);			/*ï¼»ASPD1002ï¼½*/
+		}
+	}
+}
+
+#endif /* TOPPERS_tmeset */
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ããã­ãã¯ã®ãã¼ãã¸ã®æ¿å
+¥
+ */
+#ifdef TOPPERS_tmereg
+
+void
+tmevtb_register(TMEVTB *p_tmevtb)
+{
+	tmevtb_insert(p_tmevtb);
+}
+
+#endif /* TOPPERS_tmereg */
+
+/*
+ *  ç¸å¯¾æéæå®ã«ããã¿ã¤ã ã¤ãã³ãã®ç»é²
+ *  
+ */
+#ifdef TOPPERS_tmeenq
+
+void
+tmevtb_enqueue(TMEVTB *p_tmevtb, RELTIM time)
+{
+	/*
+	 *  ç¾å¨ã®ã¤ãã³ãæå»ã¨ã¿ã¤ã ã¤ãã³ãã®çºçæå»ãæ±ããï¼»ASPD1026ï¼½ï¼
+	 */
+	update_current_evttim();
+	p_tmevtb->evttim = calc_current_evttim_ub() + time;
+
+	/*
+	 *  ã¿ã¤ã ã¤ãã³ããã­ãã¯ããã¼ãã«æ¿å
+¥ããï¼»ASPD1030ï¼½ï¼
+	 */
+	tmevtb_insert(p_tmevtb);
+
+	/*
+	 *  é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®çºçã¿ã¤ãã³ã°ãè¨­å®ããï¼»ASPD1031ï¼½
+	 *  ï¼»ASPD1034ï¼½ï¼
+	 */
+	if (!in_signal_time && p_tmevtb->p_tmevtn == p_top_tmevtn) {
+		set_hrt_event();
+	}
+}
+
+#endif /* TOPPERS_tmeenq */
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ãã®ç»é²è§£é¤
+ */
+#ifdef TOPPERS_tmedeq
+
+void
+tmevtb_dequeue(TMEVTB *p_tmevtb)
+{
+	TMEVTN	*p_tmevtn;
+
+	/*
+	 *  ã¿ã¤ã ã¤ãã³ããã­ãã¯ããã¼ãããåé¤ããï¼»ASPD1039ï¼½ï¼
+	 */
+	p_tmevtn = p_tmevtb->p_tmevtn;
+	tmevtb_delete(p_tmevtb);
+
+	/*
+	 *  é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®çºçã¿ã¤ãã³ã°ãè¨­å®ããï¼»ASPD1040ï¼½ï¼
+	 */
+	if (!in_signal_time && p_tmevtn == p_top_tmevtn) {
+		update_current_evttim();
+		set_hrt_event();
+	}
+}
+
+#endif /* TOPPERS_tmedeq */
+
+/*
+ *  ã·ã¹ãã æå»ã®èª¿æ´æã®ã¨ã©ã¼ãã§ãã¯
+ */
+#ifdef TOPPERS_tmechk
+
+bool_t
+check_adjtim(int_t adjtim)
+{
+	if (adjtim > 0) {
+		return(p_last_tmevtn >= p_top_tmevtn	/*ï¼»NGKI3588ï¼½*/
+					&& EVTTIM_LE(top_evttim, current_evttim - TMAX_ADJTIM));
+	}
+	else if (adjtim < 0) {						/*ï¼»NGKI3589ï¼½*/
+		return(monotonic_evttim - current_evttim >= -TMIN_ADJTIM);
+	}
+	return(false);
+}
+
+#endif /* TOPPERS_tmechk */
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ããçºçããã¾ã§ã®æéã®è¨ç®
+ */
+#ifdef TOPPERS_tmeltim
+
+RELTIM
+tmevt_lefttim(TMEVTB *p_tmevtb)
+{
+	EVTTIM	evttim, current_evttim_ub;
+
+	/*
+	 *  ç¾å¨ã®ã¤ãã³ãæå»ãé
+ãæ¹ã«ä¸¸ããæå»ãæ±ããï¼»ASPD1050ï¼½ï¼
+	 */
+	update_current_evttim();
+	current_evttim_ub = calc_current_evttim_ub();
+
+	/*
+	 *  ã¿ã¤ã ã¤ãã³ãçºçã¾ã§ã®ç¸å¯¾æéãæ±ããï¼»ASPD1049ï¼½ï¼
+	 */
+	evttim = p_tmevtb->evttim;
+	if (EVTTIM_LE(evttim, current_evttim_ub)) {
+		/*
+		 *  ã¿ã¤ã ã¤ãã³ãã®çºçæå»ãéãã¦ããå ´åã«ã¯0ãè¿ãï¼»NGKI0552ï¼½ï¼
+		 */
+		return(0U);
+	}
+	else {
+		return((RELTIM)(evttim - current_evttim_ub));
+	}
+}
+
+#endif /* TOPPERS_tmeltim */
+
+/*
+ *  é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®å¦ç
+ */
+#ifdef TOPPERS_sigtim
+
+void
+signal_time(void)
+{
+	TMEVTB	*p_tmevtb;
+	bool_t	callflag;
+
+	assert(sense_context());
+	assert(!sense_lock());
+
+	lock_cpu();
+	in_signal_time = true;							/*ï¼»ASPD1033ï¼½*/
+
+	do {
+		/*
+		 *  ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºããªããã°ã«ã¼ããæããï¼»ASPD1020ï¼½ï¼
+		 */
+		callflag = false;
+
+		/*
+		 *  ç¾å¨ã®ã¤ãã³ãæå»ãæ±ããï¼»ASPD1022ï¼½ï¼
+		 */
+		update_current_evttim();
+
+		/*
+		 *  çºçæå»ãcurrent_evttimä»¥åã®ã¿ã¤ã ã¤ãã³ããããã°ï¼ã¿ã¤
+		 *  ã ã¤ãã³ããã¼ãããåé¤ãï¼ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºã
+		 *  ï¼»ASPD1018ï¼½ï¼»ASPD1019ï¼½ï¼
+		 */
+		while (p_last_tmevtn >= p_top_tmevtn
+							&& EVTTIM_LE(top_evttim, current_evttim)) {
+			p_tmevtb = tmevtb_delete_top();
+			(*(p_tmevtb->callback))(p_tmevtb->arg);
+			callflag = true;
+		}
+	} while (callflag);								/*ï¼»ASPD1020ï¼½*/
+
+	/*
+	 *  é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®çºçã¿ã¤ãã³ã°ãè¨­å®ããï¼»ASPD1025ï¼½ï¼
+	 */
+	set_hrt_event();
+
+	in_signal_time = false;							/*ï¼»ASPD1033ï¼½*/
+	unlock_cpu();
+}
+
+#endif /* TOPPERS_sigtim */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/time_event.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/time_event.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/time_event.h	(revision 270)
@@ -0,0 +1,220 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã¿ã¤ã ã¤ãã³ãç®¡çã¢ã¸ã¥ã¼ã«
+ */
+
+#ifndef TOPPERS_TIME_EVENT_H
+#define TOPPERS_TIME_EVENT_H
+
+#include "kernel_impl.h"
+#include "target_timer.h"
+
+/*
+ *  ã¤ãã³ãæå»ã®ãã¼ã¿åã®å®ç¾©ï¼»ASPD1001ï¼½
+ *
+ *  ã¿ã¤ã ã¤ãã³ããã¼ãã«ç»é²ããã¿ã¤ã ã¤ãã³ãã®çºçæå»ãè¡¨ç¾ããã
+ *  ãã®ãã¼ã¿åï¼ãªã¼ããããä½æ¸ã®ããã«ï¼32ãããã§æ±ãï¼
+ */
+typedef uint32_t	EVTTIM;
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ããã¼ãä¸­ã®ãã¼ãã®ãã¼ã¿åã®åæ¹åç
+§
+ */
+typedef union time_event_node TMEVTN;
+
+/* 
+ *  ã¿ã¤ã ã¤ãã³ããã­ãã¯ã®ãã¼ã¿åã®å®ç¾©
+ */
+typedef void	(*CBACK)(void *);	/* ã³ã¼ã«ããã¯é¢æ°ã®å */
+
+typedef struct time_event_block {
+	EVTTIM	evttim;			/* ã¿ã¤ã ã¤ãã³ãã®çºçæå» */
+	TMEVTN	*p_tmevtn;		/* ã¿ã¤ã ã¤ãã³ããã¼ãä¸­ã§ã®ä½ç½® */
+	CBACK	callback;		/* ã³ã¼ã«ããã¯é¢æ° */
+	void	*arg;			/* ã³ã¼ã«ããã¯é¢æ°ã¸æ¸¡ãå¼æ° */
+} TMEVTB;
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ããã¼ãä¸­ã®ãã¼ãã®ãã¼ã¿åã®å®ç¾©
+ *
+ *  ã¿ã¤ã ã¤ãã³ããã¼ãã®å
+é ­ã®ãã¼ãï¼tmevt_heap[0]ï¼ã«ï¼æå¾ã®ä½¿ç¨é 
+ *  åãæããã¤ã³ã¿ï¼p_lastï¼ãæ ¼ç´ãï¼ããä»¥éãã¿ã¤ã ã¤ãã³ããã¼ã
+ *  ã¨ãã¦ä½¿ç¨ããï¼(tmevt_heap[0].p_last - tmevt_heap) ãï¼ã¿ã¤ã ã¤ã
+ *  ã³ããã¼ãã«ç»é²ããã¦ããã¿ã¤ã ã¤ãã³ãã®æ°ã¨ãªãï¼
+ */
+union time_event_node {
+	TMEVTB	*p_tmevtb;		/* å¯¾å¿ããã¿ã¤ã ã¤ãã³ããã­ãã¯ */
+	TMEVTN	*p_last;		/* ã¿ã¤ã ã¤ãã³ããã¼ãã®æå¾ã®ä½¿ç¨é å */
+};
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ããã¼ãï¼kernel_cfg.cï¼
+ */
+extern TMEVTN	tmevt_heap[];
+
+/*
+ *  å¢çã¤ãã³ãæå»ï¼»ASPD1008ï¼½
+ */
+extern EVTTIM	boundary_evttim;
+
+/*
+ *  ç¾å¨ã®ã¤ãã³ãæå»ã¨å¢çã¤ãã³ãæå»ã®å·®ï¼»ASPD1010ï¼½
+ */
+#define BOUNDARY_MARGIN		(200000000U)
+
+/*
+ *  æå¾ã«ç¾å¨æå»ãç®åºããæç¹ã§ã®ã¤ãã³ãæå»ï¼»ASPD1012ï¼½
+ */
+extern EVTTIM	current_evttim;
+
+/*
+ *  æå¾ã«ç¾å¨æå»ãç®åºããæç¹ã§ã®é«åè§£è½ã¿ã¤ãã®ã«ã¦ã³ãå¤ï¼»ASPD1012ï¼½
+ */
+extern HRTCNT	current_hrtcnt;
+
+/*
+ *  æãé²ãã§ããæã®ã¤ãã³ãæå»ï¼»ASPD1041ï¼½
+ */
+extern EVTTIM	monotonic_evttim;
+
+/*
+ *  ã·ã¹ãã æå»ã®ãªãã»ããï¼»ASPD1043ï¼½
+ *
+ *  get_timã§åç
+§ããã·ã¹ãã æå»ã¨monotonic_evttimã®å·®ãä¿æããï¼
+ */
+extern SYSTIM	systim_offset;
+
+/*
+ *  é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®å¦çä¸­ã§ãããã¨ãç¤ºããã©ã°ï¼»ASPD1032ï¼½
+ */
+extern bool_t	in_signal_time;
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ãç®¡çã¢ã¸ã¥ã¼ã«ã®åæå
+ */
+extern void	initialize_tmevt(void);
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ãã®æ¿å
+¥ä½ç½®ã®æ¢ç´¢
+ */
+extern TMEVTN	*tmevt_up(TMEVTN *p_tmevtn, EVTTIM evttim);
+extern TMEVTN	*tmevt_down(TMEVTN *p_tmevtn, EVTTIM evttim);
+
+/*
+ *  ç¾å¨ã®ã¤ãã³ãæå»ã®æ´æ°
+ *
+ *  current_evttimã¨current_hrtcntãï¼ç¾å¨ã®å¤ã«æ´æ°ããï¼
+ */
+extern void		update_current_evttim(void);
+
+/*
+ *  é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®çºçã¿ã¤ãã³ã°ã®è¨­å®
+ *
+ *  ç¾å¨ã®ã¤ãã³ãæå»ãåå¾ããå¾ã«å¼ã³åºããã¨ãæ³å®ãã¦ããï¼
+ */
+extern void		set_hrt_event(void);
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ãã®ç»é²
+ *
+ *  p_tmevtbã§æå®ããã¿ã¤ã ã¤ãã³ããã­ãã¯ãç»é²ããï¼ã¿ã¤ã ã¤ãã³ã
+ *  ã®çºçæå»ï¼ã³ã¼ã«ããã¯é¢æ°ï¼ã³ã¼ã«ããã¯é¢æ°ã¸æ¸¡ãå¼æ°ã¯ï¼
+ *  p_tmevtbãæãã¿ã¤ã ã¤ãã³ããã­ãã¯ä¸­ã«è¨­å®ãã¦ããï¼
+ */
+extern void		tmevtb_register(TMEVTB *p_tmevtb);
+
+/*
+ *  ç¸å¯¾æéæå®ã«ããã¿ã¤ã ã¤ãã³ãã®ç»é²
+ *
+ *  timeã§æå®ããç¸å¯¾æéãçµéããå¾ã«ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºããã
+ *  ããã«ï¼p_tmevtbã§æå®ããã¿ã¤ã ã¤ãã³ããã­ãã¯ãç»é²ããï¼ã³ã¼ã«
+ *  ããã¯é¢æ°ï¼ã³ã¼ã«ããã¯é¢æ°ã¸æ¸¡ãå¼æ°ã¯ï¼p_tmevtbãæãã¿ã¤ã ã¤ã
+ *  ã³ããã­ãã¯ä¸­ã«è¨­å®ãã¦ããï¼
+ */
+extern void		tmevtb_enqueue(TMEVTB *p_tmevtb, RELTIM time);
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ãã®ç»é²è§£é¤
+ */
+extern void		tmevtb_dequeue(TMEVTB *p_tmevtb);
+
+/*
+ *  ã·ã¹ãã æå»ã®èª¿æ´æã®ã¨ã©ã¼ãã§ãã¯
+ *
+ *  adjtimã§æå®ãããæéã®åï¼ã·ã¹ãã æå»ãèª¿æ´ãã¦ãããå¤å®ããï¼
+ *  èª¿æ´ãã¦ã¯ãªããªãå ´åã«trueï¼ããã§ãªãå ´åã«falseãè¿ãï¼ç¾å¨ã®ã¤
+ *  ãã³ãæå»ãåå¾ããå¾ã«å¼ã³åºããã¨ãæ³å®ãã¦ããï¼
+ */
+extern bool_t	check_adjtim(int_t adjtim);
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ããçºçããã¾ã§ã®æéã®è¨ç®
+ */
+extern RELTIM	tmevt_lefttim(TMEVTB *p_tmevtb);
+
+/*
+ *  é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®å¦ç
+ */
+extern void	signal_time(void);
+
+#endif /* TOPPERS_TIME_EVENT_H */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/time_manage.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/time_manage.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/time_manage.c	(revision 270)
@@ -0,0 +1,394 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ã¹ãã æå»ç®¡çæ©è½
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+#include "semaphore.h"
+#include "eventflag.h"
+#include "dataqueue.h"
+#include "time_event.h"
+#include "target_timer.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_SET_TIM_ENTER
+#define LOG_SET_TIM_ENTER(systim)
+#endif /* LOG_SET_TIM_ENTER */
+
+#ifndef LOG_SET_TIM_LEAVE
+#define LOG_SET_TIM_LEAVE(ercd)
+#endif /* LOG_SET_TIM_LEAVE */
+
+#ifndef LOG_GET_TIM_ENTER
+#define LOG_GET_TIM_ENTER(p_systim)
+#endif /* LOG_GET_TIM_ENTER */
+
+#ifndef LOG_GET_TIM_LEAVE
+#define LOG_GET_TIM_LEAVE(ercd, p_systim)
+#endif /* LOG_GET_TIM_LEAVE */
+
+#ifndef LOG_ADJ_TIM_ENTER
+#define LOG_ADJ_TIM_ENTER(adjtim)
+#endif /* LOG_ADJ_TIM_ENTER */
+
+#ifndef LOG_ADJ_TIM_LEAVE
+#define LOG_ADJ_TIM_LEAVE(ercd)
+#endif /* LOG_ADJ_TIM_LEAVE */
+
+#ifndef LOG_FCH_HRT_ENTER
+#define LOG_FCH_HRT_ENTER()
+#endif /* LOG_FCH_HRT_ENTER */
+
+#ifndef LOG_FCH_HRT_LEAVE
+#define LOG_FCH_HRT_LEAVE(hrtcnt)
+#endif /* LOG_FCH_HRT_LEAVE */
+
+/*
+ *  ã·ã¹ãã æå»ã®è¨­å®ï¼»NGKI3563ï¼½
+ */
+#ifdef TOPPERS_set_tim
+
+ER
+set_tim(SYSTIM systim)
+{
+	ER		ercd;
+
+	LOG_SET_TIM_ENTER(systim);
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3564ï¼½ï¼»NGKI3565ï¼½*/
+
+	lock_cpu();
+	update_current_evttim();					/*ï¼»ASPD1059ï¼½*/
+	systim_offset = systim - monotonic_evttim;	/*ï¼»ASPD1060ï¼½*/
+	ercd = E_OK;
+	unlock_cpu();
+
+  error_exit:
+	LOG_SET_TIM_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_set_tim */
+
+/*
+ *  ã·ã¹ãã æå»ã®åç
+§ï¼»NGKI2349ï¼½
+ */
+#ifdef TOPPERS_get_tim
+
+ER
+get_tim(SYSTIM *p_systim)
+{
+	ER		ercd;
+
+	LOG_GET_TIM_ENTER(p_systim);
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2350ï¼½ï¼»NGKI2351ï¼½*/
+
+	lock_cpu();
+	update_current_evttim();					/*ï¼»ASPD1057ï¼½*/
+	*p_systim = systim_offset + monotonic_evttim;	/*ï¼»ASPD1058ï¼½*/
+	ercd = E_OK;
+	unlock_cpu();
+
+  error_exit:
+	LOG_GET_TIM_LEAVE(ercd, p_systim);
+	return(ercd);
+}
+
+#endif /* TOPPERS_get_tim */
+
+/*
+ *  ã·ã¹ãã æå»ã®èª¿æ´ï¼»NGKI3581ï¼½
+ */
+#ifdef TOPPERS_adj_tim
+
+ER
+adj_tim(int32_t adjtim)
+{
+	EVTTIM	previous_evttim;
+	ER		ercd;
+
+	LOG_ADJ_TIM_ENTER(adjtim);
+	CHECK_UNL();								/*ï¼»NGKI3583ï¼½*/
+	CHECK_PAR(TMIN_ADJTIM <= adjtim && adjtim <= TMAX_ADJTIM);
+												/*ï¼»NGKI3584ï¼½*/
+	lock_cpu();
+	update_current_evttim();					/*ï¼»ASPD1051ï¼½*/
+	if (check_adjtim(adjtim)) {					/*ï¼»ASPD1052ï¼½*/
+		ercd = E_OBJ;
+	}
+	else {
+		previous_evttim = current_evttim;
+		current_evttim += adjtim;				/*ï¼»ASPD1053ï¼½*/
+		boundary_evttim = current_evttim - BOUNDARY_MARGIN;	/*ï¼»ASPD1055ï¼½*/
+
+		if (adjtim > 0
+				&& monotonic_evttim - previous_evttim < (EVTTIM) adjtim) {
+#ifdef UINT64_MAX
+			if (current_evttim < monotonic_evttim) {
+				systim_offset += 1LLU << 32;
+			}
+#endif /* UINT64_MAX */
+			monotonic_evttim = current_evttim;	/*ï¼»ASPD1054ï¼½*/
+		}
+
+		set_hrt_event();						/*ï¼»ASPD1056ï¼½*/
+		ercd = E_OK;
+	}
+	unlock_cpu();
+
+  error_exit:
+	LOG_ADJ_TIM_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_adj_tim */
+
+/*
+ *  é«åè§£è½ã¿ã¤ãã®åç
+§ï¼»NGKI3569ï¼½
+ *
+ *  ä»»æã®ç¶æ
+ããå¼ã³åºããããã«ããããã«ï¼SILã®å
+¨å²è¾¼ã¿ã­ãã¯ç¶æ
+ã®
+ *  å¶å¾¡æ©è½ãç¨ãã¦ï¼æä»å¶å¾¡ãå®ç¾ãã¦ããï¼»NGKI3572ï¼½ï¼
+ */
+#ifdef TOPPERS_fch_hrt
+
+HRTCNT
+fch_hrt(void)
+{
+	HRTCNT	hrtcnt;
+	SIL_PRE_LOC;
+
+	LOG_FCH_HRT_ENTER();
+
+	SIL_LOC_INT();
+	hrtcnt = target_hrt_get_current();			/*ï¼»NGKI3571ï¼½*/
+	SIL_UNL_INT();
+
+	LOG_FCH_HRT_LEAVE(hrtcnt);
+	return(hrtcnt);
+}
+
+#endif /* TOPPERS_fch_hrt */
+
+/*
+ *  éç¥æ¹æ³ã®ã¨ã©ã¼ãã§ãã¯
+ */
+#ifdef TOPPERS_chknfy
+
+ER
+check_nfyinfo(const T_NFYINFO *p_nfyinfo)
+{
+	ER		ercd;
+
+	if (p_nfyinfo->nfymode == TNFY_HANDLER) {
+		CHECK_PAR(FUNC_ALIGN(p_nfyinfo->nfy.handler.tmehdr));
+		CHECK_PAR(FUNC_NONNULL(p_nfyinfo->nfy.handler.tmehdr));
+	}
+	else {
+		switch (p_nfyinfo->nfymode & 0x0fU) {
+		case TNFY_SETVAR:
+			CHECK_PAR((p_nfyinfo->nfymode & ~0x0fU) == 0);
+			CHECK_PAR(INTPTR_ALIGN(p_nfyinfo->nfy.setvar.p_var));
+			CHECK_PAR(INTPTR_NONNULL(p_nfyinfo->nfy.setvar.p_var));
+			break;
+		case TNFY_INCVAR:
+			CHECK_PAR((p_nfyinfo->nfymode & ~0x0fU) == 0);
+			CHECK_PAR(INTPTR_ALIGN(p_nfyinfo->nfy.incvar.p_var));
+			CHECK_PAR(INTPTR_NONNULL(p_nfyinfo->nfy.incvar.p_var));
+			break;
+		case TNFY_ACTTSK:
+			CHECK_ID(VALID_TSKID(p_nfyinfo->nfy.acttsk.tskid));
+			break;
+		case TNFY_WUPTSK:
+			CHECK_ID(VALID_TSKID(p_nfyinfo->nfy.wuptsk.tskid));
+			break;
+		case TNFY_SIGSEM:
+			CHECK_ID(VALID_SEMID(p_nfyinfo->nfy.sigsem.semid));
+			break;
+		case TNFY_SETFLG:
+			CHECK_ID(VALID_FLGID(p_nfyinfo->nfy.setflg.flgid));
+			break;
+		case TNFY_SNDDTQ:
+			CHECK_ID(VALID_DTQID(p_nfyinfo->nfy.snddtq.dtqid));
+			break;
+		default:
+			CHECK_PAR(false);
+			break;
+		}
+		switch (p_nfyinfo->nfymode & ~0x0fU) {
+		case TENFY_SETVAR:
+			CHECK_PAR(INTPTR_ALIGN(p_nfyinfo->enfy.setvar.p_var));
+			CHECK_PAR(INTPTR_NONNULL(p_nfyinfo->enfy.setvar.p_var));
+			break;
+		case TENFY_INCVAR:
+			CHECK_PAR(INTPTR_ALIGN(p_nfyinfo->enfy.incvar.p_var));
+			CHECK_PAR(INTPTR_NONNULL(p_nfyinfo->enfy.incvar.p_var));
+			break;
+		case TENFY_ACTTSK:
+			CHECK_ID(VALID_TSKID(p_nfyinfo->enfy.acttsk.tskid));
+			break;
+		case TENFY_WUPTSK:
+			CHECK_ID(VALID_TSKID(p_nfyinfo->enfy.wuptsk.tskid));
+			break;
+		case TENFY_SIGSEM:
+			CHECK_ID(VALID_SEMID(p_nfyinfo->enfy.sigsem.semid));
+			break;
+		case TENFY_SETFLG:
+			CHECK_ID(VALID_FLGID(p_nfyinfo->enfy.setflg.flgid));
+			break;
+		case TENFY_SNDDTQ:
+			CHECK_ID(VALID_DTQID(p_nfyinfo->enfy.snddtq.dtqid));
+			break;
+		default:
+			CHECK_PAR(false);
+			break;
+		}
+	}
+	ercd = E_OK;
+
+  error_exit:
+	return(ercd);
+}
+
+#endif /* TOPPERS_chknfy */
+
+/*
+ *  éç¥ãã³ãã©
+ */
+#ifdef TOPPERS_nfyhdr
+
+void
+notify_handler(intptr_t exinf)
+{
+	T_NFYINFO	*p_nfyinfo = (T_NFYINFO *) exinf;
+	ER			ercd;
+
+	switch (p_nfyinfo->nfymode & 0x0fU) {
+	case TNFY_SETVAR:
+		*(p_nfyinfo->nfy.setvar.p_var) = p_nfyinfo->nfy.setvar.value;
+		ercd = E_OK;
+		break;
+	case TNFY_INCVAR:
+		(void) loc_cpu();
+		*(p_nfyinfo->nfy.incvar.p_var) += 1;
+		(void) unl_cpu();
+		ercd = E_OK;
+		break;
+	case TNFY_ACTTSK:
+		ercd = act_tsk(p_nfyinfo->nfy.acttsk.tskid);
+		break;
+	case TNFY_WUPTSK:
+		ercd = wup_tsk(p_nfyinfo->nfy.wuptsk.tskid);
+		break;
+	case TNFY_SIGSEM:
+		ercd = sig_sem(p_nfyinfo->nfy.sigsem.semid);
+		break;
+	case TNFY_SETFLG:
+		ercd = set_flg(p_nfyinfo->nfy.setflg.flgid,
+							p_nfyinfo->nfy.setflg.flgptn);
+		break;
+	case TNFY_SNDDTQ:
+		ercd = snd_dtq(p_nfyinfo->nfy.snddtq.dtqid,
+							p_nfyinfo->nfy.snddtq.data);
+		break;
+	default:
+		ercd = E_SYS;
+		break;
+	}
+
+	if (ercd != E_OK) {
+		switch (p_nfyinfo->nfymode & ~0x0fU) {
+		case TENFY_SETVAR:
+			*(p_nfyinfo->enfy.setvar.p_var) = (intptr_t) ercd;
+			break;
+		case TENFY_INCVAR:
+			(void) loc_cpu();
+			*(p_nfyinfo->enfy.incvar.p_var) += 1;
+			(void) unl_cpu();
+			break;
+		case TENFY_ACTTSK:
+			(void) act_tsk(p_nfyinfo->enfy.acttsk.tskid);
+			break;
+		case TENFY_WUPTSK:
+			(void) wup_tsk(p_nfyinfo->enfy.wuptsk.tskid);
+			break;
+		case TENFY_SIGSEM:
+			(void) sig_sem(p_nfyinfo->enfy.sigsem.semid);
+			break;
+		case TENFY_SETFLG:
+			(void) set_flg(p_nfyinfo->enfy.setflg.flgid,
+							p_nfyinfo->enfy.setflg.flgptn);
+			break;
+		case TENFY_SNDDTQ:
+			(void) snd_dtq(p_nfyinfo->enfy.snddtq.dtqid, (intptr_t) ercd);
+			break;
+		default:
+			break;
+		}
+	}
+}
+
+#endif /* TOPPERS_nfyhdr */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/wait.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/wait.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/wait.c	(revision 270)
@@ -0,0 +1,230 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		å¾
+ã¡ç¶æ
+ç®¡çã¢ã¸ã¥ã¼ã«
+ */
+
+#include "kernel_impl.h"
+#include "wait.h"
+
+/*
+ *  å¾
+ã¡ç¶æ
+ã¸ã®é·ç§»ï¼ã¿ã¤ã ã¢ã¦ãæå®ï¼
+ */
+#ifdef TOPPERS_waimake
+
+void
+make_wait_tmout(WINFO *p_winfo, TMEVTB *p_tmevtb, TMO tmout)
+{
+	make_non_runnable(p_runtsk);
+	p_runtsk->p_winfo = p_winfo;
+	if (tmout == TMO_FEVR) {
+		p_winfo->p_tmevtb = NULL;
+	}
+	else {
+		assert(tmout <= TMAX_RELTIM);
+		p_winfo->p_tmevtb = p_tmevtb;
+		p_tmevtb->callback = (CBACK) wait_tmout;
+		p_tmevtb->arg = (void *) p_runtsk;
+		tmevtb_enqueue(p_tmevtb, (RELTIM) tmout);
+	}
+}
+
+#endif /* TOPPERS_waimake */
+
+/*
+ *  å¾
+ã¡è§£é¤
+ */
+#ifdef TOPPERS_waicmp
+
+void
+wait_complete(TCB *p_tcb)
+{
+	wait_dequeue_tmevtb(p_tcb);
+	p_tcb->p_winfo->wercd = E_OK;
+	make_non_wait(p_tcb);
+}
+
+#endif /* TOPPERS_waicmp */
+
+/*
+ *  ã¿ã¤ã ã¢ã¦ãã«ä¼´ãå¾
+ã¡è§£é¤
+ */
+#ifdef TOPPERS_waitmo
+
+void
+wait_tmout(TCB *p_tcb)
+{
+	wait_dequeue_wobj(p_tcb);
+	p_tcb->p_winfo->wercd = E_TMOUT;
+	make_non_wait(p_tcb);
+	if (p_runtsk != p_schedtsk) {
+		request_dispatch();
+	}
+
+	/*
+	 *  ããã§åªå
+åº¦ã®é«ãå²è¾¼ã¿ãåãä»ããï¼
+	 */
+	unlock_cpu();
+	delay_for_interrupt();
+	lock_cpu();
+}
+
+#endif /* TOPPERS_waitmo */
+#ifdef TOPPERS_waitmook
+
+void
+wait_tmout_ok(TCB *p_tcb)
+{
+	p_tcb->p_winfo->wercd = E_OK;
+	make_non_wait(p_tcb);
+	if (p_runtsk != p_schedtsk) {
+		request_dispatch();
+	}
+
+	/*
+	 *  ããã§åªå
+åº¦ã®é«ãå²è¾¼ã¿ãåãä»ããï¼
+	 */
+	unlock_cpu();
+	delay_for_interrupt();
+	lock_cpu();
+}
+
+#endif /* TOPPERS_waitmook */
+
+/*
+ *  å®è¡ä¸­ã®ã¿ã¹ã¯ã®åæã»éä¿¡ãªãã¸ã§ã¯ãã®å¾
+ã¡ã­ã¥ã¼ã¸ã®æ¿å
+¥
+ *
+ *  å®è¡ä¸­ã®ã¿ã¹ã¯ãï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®å¾
+ã¡ã­ã¥ã¼ã¸æ¿å
+¥ããï¼ãª
+ *  ãã¸ã§ã¯ãã®å±æ§ã«å¿ãã¦ï¼FIFOé ã¾ãã¯ã¿ã¹ã¯åªå
+åº¦é ã§æ¿å
+¥ããï¼
+ */
+Inline void
+wobj_queue_insert(WOBJCB *p_wobjcb)
+{
+	if ((p_wobjcb->p_wobjinib->wobjatr & TA_TPRI) != 0U) {
+		queue_insert_tpri(&(p_wobjcb->wait_queue), p_runtsk);
+	}
+	else {
+		queue_insert_prev(&(p_wobjcb->wait_queue), &(p_runtsk->task_queue));
+	}
+}
+
+/*
+ *  åæã»éä¿¡ãªãã¸ã§ã¯ãã«å¯¾ããå¾
+ã¡ç¶æ
+ã¸ã®é·ç§»
+ */
+#ifdef TOPPERS_wobjwai
+
+void
+wobj_make_wait(WOBJCB *p_wobjcb, WINFO_WOBJ *p_winfo_wobj)
+{
+	make_wait(&(p_winfo_wobj->winfo));
+	wobj_queue_insert(p_wobjcb);
+	p_winfo_wobj->p_wobjcb = p_wobjcb;
+	LOG_TSKSTAT(p_runtsk);
+}
+
+#endif /* TOPPERS_wobjwai */
+#ifdef TOPPERS_wobjwaitmo
+
+void
+wobj_make_wait_tmout(WOBJCB *p_wobjcb, WINFO_WOBJ *p_winfo_wobj,
+								TMEVTB *p_tmevtb, TMO tmout)
+{
+	make_wait_tmout(&(p_winfo_wobj->winfo), p_tmevtb, tmout);
+	wobj_queue_insert(p_wobjcb);
+	p_winfo_wobj->p_wobjcb = p_wobjcb;
+	LOG_TSKSTAT(p_runtsk);
+}
+
+#endif /* TOPPERS_wobjwaitmo */
+
+/*
+ *  å¾
+ã¡ã­ã¥ã¼ã®åæå
+ */
+#ifdef TOPPERS_iniwque
+
+void
+init_wait_queue(QUEUE *p_wait_queue)
+{
+	TCB		*p_tcb;
+
+	while (!queue_empty(p_wait_queue)) {
+		p_tcb = (TCB *) queue_delete_next(p_wait_queue);
+		wait_dequeue_tmevtb(p_tcb);
+		p_tcb->p_winfo->wercd = E_DLT;
+		make_non_wait(p_tcb);
+	}
+}
+
+#endif /* TOPPERS_iniwque */
Index: EcnlProtoTool/trunk/asp3_dcre/kernel/wait.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/kernel/wait.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/kernel/wait.h	(revision 270)
@@ -0,0 +1,381 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		å¾
+ã¡ç¶æ
+ç®¡çã¢ã¸ã¥ã¼ã«
+ */
+
+#ifndef TOPPERS_WAIT_H
+#define TOPPERS_WAIT_H
+
+#include "kernel_impl.h"
+#include <queue.h>
+#include "task.h"
+#include "time_event.h"
+
+/*
+ *  ã¿ã¹ã¯ã®åªå
+åº¦é ã®å¾
+ã¡ã­ã¥ã¼ã¸ã®æ¿å
+¥
+ *
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ãï¼ã¿ã¹ã¯åªå
+åº¦é ã®ã­ã¥ã¼p_queueã«æ¿å
+¥ããï¼
+ *  ã­ã¥ã¼ã®ä¸­ã«åãåªå
+åº¦ã®ã¿ã¹ã¯ãããå ´åã«ã¯ï¼ãã®æå¾ã«æ¿å
+¥ããï¼
+ */
+Inline void
+queue_insert_tpri(QUEUE *p_queue, TCB *p_tcb)
+{
+	QUEUE	*p_entry;
+	uint_t	pri = p_tcb->priority;
+
+	for (p_entry = p_queue->p_next; p_entry != p_queue;
+										p_entry = p_entry->p_next) {
+		if (pri < ((TCB *) p_entry)->priority) {
+			break;
+		}
+	}
+	queue_insert_prev(p_entry, &(p_tcb->task_queue));
+}
+
+/*
+ *  å¾
+ã¡ç¶æ
+ã¸ã®é·ç§»
+ *
+ *  å®è¡ä¸­ã®ã¿ã¹ã¯ãå¾
+ã¡ç¶æ
+ã«é·ç§»ãããï¼å
+·ä½çã«ã¯ï¼å®è¡ä¸­ã®ã¿ã¹ã¯ã
+ *  ã¬ãã£ã­ã¥ã¼ããåé¤ãï¼TCBã®p_winfoãã£ã¼ã«ãï¼WINFOã®p_tmevtbãã£ã¼
+ *  ã«ããè¨­å®ããï¼
+ */
+Inline void
+make_wait(WINFO *p_winfo)
+{
+	make_non_runnable(p_runtsk);
+	p_runtsk->p_winfo = p_winfo;
+	p_winfo->p_tmevtb = NULL;
+}
+
+/*
+ *  å¾
+ã¡ç¶æ
+ã¸ã®é·ç§»ï¼ã¿ã¤ã ã¢ã¦ãæå®ï¼
+ *
+ *  å®è¡ä¸­ã®ã¿ã¹ã¯ãï¼ã¿ã¤ã ã¢ã¦ãæå®ä»ãã§å¾
+ã¡ç¶æ
+ã«é·ç§»ãããï¼å
+·ä½
+ *  çã«ã¯ï¼å®è¡ä¸­ã®ã¿ã¹ã¯ãã¬ãã£ã­ã¥ã¼ããåé¤ãï¼TCBã®p_winfoãã£ã¼
+ *  ã«ãï¼WINFOã®p_tmevtbãã£ã¼ã«ããè¨­å®ããï¼ã¾ãï¼ã¿ã¤ã ã¤ãã³ãã
+ *  ã­ãã¯ãç»é²ããï¼
+ */
+extern void	make_wait_tmout(WINFO *p_winfo, TMEVTB *p_tmevtb, TMO tmout);
+
+/*
+ *  å¾
+ã¡è§£é¤ã®ããã®ã¿ã¹ã¯ç¶æ
+ã®æ´æ°
+ *
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ãï¼å¾
+ã¡è§£é¤ããããã¿ã¹ã¯ç¶æ
+ãæ´æ°ããï¼
+ *  å¾
+ã¡è§£é¤ããã¿ã¹ã¯ãå®è¡ã§ããç¶æ
+ã«ãªãå ´åã¯ï¼ã¬ãã£ã­ã¥ã¼ã«ã¤ãª
+ *  ãï¼
+ */
+Inline void
+make_non_wait(TCB *p_tcb)
+{
+	assert(TSTAT_WAITING(p_tcb->tstat));
+
+	if (!TSTAT_SUSPENDED(p_tcb->tstat)) {
+		/*
+		 *  å¾
+ã¡ç¶æ
+ããå®è¡ã§ããç¶æ
+ã¸ã®é·ç§»
+		 */
+		p_tcb->tstat = TS_RUNNABLE;
+		LOG_TSKSTAT(p_tcb);
+		make_runnable(p_tcb);
+	}
+	else {
+		/*
+		 *  äºéå¾
+ã¡ç¶æ
+ããå¼·å¶å¾
+ã¡ç¶æ
+ã¸ã®é·ç§»
+		 */
+		p_tcb->tstat = TS_SUSPENDED;
+		LOG_TSKSTAT(p_tcb);
+	}
+}
+
+/*
+ *  ãªãã¸ã§ã¯ãå¾
+ã¡ã­ã¥ã¼ããã®åé¤
+ *
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ãï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®å¾
+ã¡ã­ã¥ã¼ã«ã¤
+ *  ãªããã¦ããã°ï¼å¾
+ã¡ã­ã¥ã¼ããåé¤ããï¼
+ */
+Inline void
+wait_dequeue_wobj(TCB *p_tcb)
+{
+	if (TSTAT_WAIT_WOBJ(p_tcb->tstat)) {
+		queue_delete(&(p_tcb->task_queue));
+	}
+}
+
+/*
+ *  æéå¾
+ã¡ã®ããã®ã¿ã¤ã ã¤ãã³ããã­ãã¯ã®ç»é²è§£é¤
+ *
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ã«å¯¾ãã¦ï¼æéå¾
+ã¡ã®ããã®ã¿ã¤ã ã¤ãã³ãã
+ *  ã­ãã¯ãç»é²ããã¦ããã°ï¼ãããç»é²è§£é¤ããï¼
+ */
+Inline void
+wait_dequeue_tmevtb(TCB *p_tcb)
+{
+	if (p_tcb->p_winfo->p_tmevtb != NULL) {
+		tmevtb_dequeue(p_tcb->p_winfo->p_tmevtb);
+	}
+}
+
+/*
+ *  å¾
+ã¡è§£é¤
+ *
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ã®å¾
+ã¡ç¶æ
+ãè§£é¤ããï¼å
+·ä½çã«ã¯ï¼ã¿ã¤ã ã¤
+ *  ãã³ããã­ãã¯ãç»é²ããã¦ããã°ï¼ãããç»é²è§£é¤ããï¼ã¾ãï¼ã¿ã¹ã¯
+ *  ç¶æ
+ãæ´æ°ãï¼å¾
+ã¡è§£é¤ããã¿ã¹ã¯ããã®è¿å¤ãE_OKã¨ããï¼å¾
+ã¡ã­ã¥ã¼
+ *  ããã®åé¤ã¯è¡ããªãï¼
+ */
+extern void	wait_complete(TCB *p_tcb);
+
+/*
+ *  ã¿ã¤ã ã¢ã¦ãã«ä¼´ãå¾
+ã¡è§£é¤
+ *
+ *  p_tcbã§æå®ãããã¿ã¹ã¯ãï¼å¾
+ã¡ã­ã¥ã¼ã«ã¤ãªããã¦ããã°å¾
+ã¡ã­ã¥ã¼
+ *  ããåé¤ãï¼ã¿ã¹ã¯ç¶æ
+ãæ´æ°ããï¼ã¾ãï¼å¾
+ã¡è§£é¤ããã¿ã¹ã¯ããã®è¿
+ *  å¤ãï¼wait_tmoutã§ã¯E_TMOUTï¼wait_tmout_okã§ã¯E_OKã¨ããï¼
+ *
+ *  wait_tmout_okã¯ï¼dly_tskã§ä½¿ãããã®ãã®ã§ï¼å¾
+ã¡ã­ã¥ã¼ããåé¤ãã
+ *  å¦çãè¡ããªãï¼
+ *
+ *  ãããã®é¢æ°ãï¼ã¿ã¤ã ã¤ãã³ãã®ã³ã¼ã«ããã¯é¢æ°ã¨ãã¦ç¨ããããã®
+ *  ãã®ã§ï¼å²è¾¼ã¿ãã³ãã©ããå¼ã³åºããããã¨ãæ³å®ãã¦ããï¼
+ */
+extern void	wait_tmout(TCB *p_tcb);
+extern void	wait_tmout_ok(TCB *p_tcb);
+
+/*
+ *  å¾
+ã¡ã­ã¥ã¼ã®å
+é ­ã®ã¿ã¹ã¯ID
+ *
+ *  p_wait_queueã§æå®ããå¾
+ã¡ã­ã¥ã¼ã®å
+é ­ã®ã¿ã¹ã¯IDãè¿ãï¼å¾
+ã¡ã­ã¥ã¼
+ *  ãç©ºã®å ´åã«ã¯ï¼TSK_NONEãè¿ãï¼
+ */
+Inline ID
+wait_tskid(QUEUE *p_wait_queue)
+{
+	if (!queue_empty(p_wait_queue)) {
+		return(TSKID((TCB *) p_wait_queue->p_next));
+	}
+	else {
+		return(TSK_NONE);
+	}
+}
+
+/*
+ *  åæã»éä¿¡ãªãã¸ã§ã¯ãã®ç®¡çãã­ãã¯ã®å
+±éé¨åæä½ã«ã¼ãã³
+ *
+ *  åæã»éä¿¡ãªãã¸ã§ã¯ãã®åæåãã­ãã¯ã¨ç®¡çãã­ãã¯ã®å
+é ­é¨åã¯å
+±
+ *  éã«ãªã£ã¦ããï¼ä»¥ä¸ã¯ï¼ãã®å
+±éé¨åãæ±ãããã®åããã³ã«ã¼ãã³ç¾¤
+ *  ã§ããï¼
+ *
+ *  è¤æ°ã®å¾
+ã¡ã­ã¥ã¼ãæã¤åæã»éä¿¡ãªãã¸ã§ã¯ãã®å ´åï¼å
+é ­ä»¥å¤ã®å¾
+ã¡
+ *  ã­ã¥ã¼ãæä½ããå ´åã«ã¯ï¼ãããã®ã«ã¼ãã³ã¯ä½¿ããªãï¼ã¾ãï¼ãªãã¸ã§
+ *  ã¯ãå±æ§ã®TA_TPRIããããåç
+§ããã®ã§ï¼ãã®ããããä»ã®ç®çã«ä½¿ã£ã¦
+ *  ããå ´åãï¼ãããã®ã«ã¼ãã³ã¯ä½¿ããªãï¼
+ */
+
+/*
+ *  åæã»éä¿¡ãªãã¸ã§ã¯ãã®åæåãã­ãã¯ã®å
+±éé¨å
+ */
+typedef struct wait_object_initialization_block {
+	ATR			wobjatr;		/* ãªãã¸ã§ã¯ãå±æ§ */
+} WOBJINIB;
+
+/*
+ *  åæã»éä¿¡ãªãã¸ã§ã¯ãã®ç®¡çãã­ãã¯ã®å
+±éé¨å
+ */
+typedef struct wait_object_control_block {
+	QUEUE		wait_queue;		/* å¾
+ã¡ã­ã¥ã¼ */
+	const WOBJINIB *p_wobjinib;	/* åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+} WOBJCB;
+
+/*
+ *  åæã»éä¿¡ãªãã¸ã§ã¯ãã®å¾
+ã¡æ
+å ±ãã­ãã¯ã®å
+±éé¨å
+ *
+ *  ãã®æ§é ä½ã¯ï¼å¾
+ã¡æ
+å ±ãã­ãã¯ï¼WINFOï¼ãæ¡å¼µï¼ãªãã¸ã§ã¯ãæåè¨
+ *  èªã®ç¶æ¿ã«ç¸å½ï¼ãããã®ã§ãããï¼WINFOãå
+±ç¨ä½ã§å®ç¾©ããã¦ããã
+ *  ãã«ï¼1ã¤ã®ãã£ã¼ã«ãã¨ãã¦å«ãã¦ããï¼
+ */
+typedef struct wait_object_waiting_information {
+	WINFO	winfo;			/* æ¨æºã®å¾
+ã¡æ
+å ±ãã­ãã¯ */
+	WOBJCB	*p_wobjcb;		/* å¾
+ã¡ãªãã¸ã§ã¯ãã®ç®¡çãã­ãã¯ */
+} WINFO_WOBJ;
+
+/*
+ *  åæã»éä¿¡ãªãã¸ã§ã¯ãã«å¯¾ããå¾
+ã¡ç¶æ
+ã¸ã®é·ç§»
+ *  
+ *  å®è¡ä¸­ã®ã¿ã¹ã¯ãå¾
+ã¡ç¶æ
+ã«é·ç§»ããï¼åæã»éä¿¡ãªãã¸ã§ã¯ãã®å¾
+ã¡ã­ã¥ã¼
+ *  ã«ã¤ãªãï¼ã¾ãï¼å¾
+ã¡æ
+å ±ãã­ãã¯ï¼WINFOï¼ã®p_wobjcbãè¨­å®ããï¼
+ *  wobj_make_wait_tmoutã¯ï¼ã¿ã¤ã ã¤ãã³ããã­ãã¯ã®ç»é²ãè¡ãï¼
+ */
+extern void	wobj_make_wait(WOBJCB *p_wobjcb, WINFO_WOBJ *p_winfo);
+extern void	wobj_make_wait_tmout(WOBJCB *p_wobjcb, WINFO_WOBJ *p_winfo,
+											TMEVTB *p_tmevtb, TMO tmout);
+
+/*
+ *  ã¿ã¹ã¯åªå
+åº¦å¤æ´æã®å¦ç
+ *
+ *  åæã»éä¿¡ãªãã¸ã§ã¯ãã«å¯¾ããå¾
+ã¡ç¶æ
+ã«ããã¿ã¹ã¯ã®åªå
+åº¦ãå¤æ´ã
+ *  ããå ´åã«ï¼å¾
+ã¡ã­ã¥ã¼ã®ä¸­ã§ã®ã¿ã¹ã¯ã®ä½ç½®ãä¿®æ­£ããï¼
+ */
+Inline void
+wobj_change_priority(WOBJCB *p_wobjcb, TCB *p_tcb)
+{
+	if ((p_wobjcb->p_wobjinib->wobjatr & TA_TPRI) != 0U) {
+		queue_delete(&(p_tcb->task_queue));
+		queue_insert_tpri(&(p_wobjcb->wait_queue), p_tcb);
+	}
+}
+
+/*
+ *  å¾
+ã¡ã­ã¥ã¼ã®åæå
+ *
+ *  å¾
+ã¡ã­ã¥ã¼ã«ã¤ãªããã¦ããã¿ã¹ã¯ããã¹ã¦å¾
+ã¡è§£é¤ããï¼å¾
+ã¡è§£é¤ãã
+ *  ã¿ã¹ã¯ããã®è¿å¤ã¯ï¼E_DLTã¨ããï¼
+ */
+extern void	init_wait_queue(QUEUE *p_wait_queue);
+
+#endif /* TOPPERS_WAIT_H */
Index: EcnlProtoTool/trunk/asp3_dcre/library/log_output.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/library/log_output.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/library/log_output.c	(revision 270)
@@ -0,0 +1,218 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ã¹ãã ã­ã°ã®ãã©ã¼ãããåºå
+ */
+
+#include <t_stddef.h>
+#include <t_syslog.h>
+#include <log_output.h>
+
+/*
+ *  æ°å¤ãæå­åã«å¤æ
+ */
+#define CONVERT_BUFLEN	((sizeof(ULOGPAR) * CHAR_BIT + 2) / 3)
+										/* ULOGPARåã®æ°å¤ã®æå¤§æå­æ° */
+static void
+convert(ULOGPAR val, uint_t radix, const char *radchar,
+			uint_t width, bool_t minus, bool_t padzero, void (*putc)(char))
+{
+	char	buf[CONVERT_BUFLEN];
+	uint_t	i, j;
+
+	i = 0U;
+	do {
+		buf[i++] = radchar[val % radix];
+		val /= radix;
+	} while (i < CONVERT_BUFLEN && val != 0);
+
+	if (minus && width > 0) {
+		width -= 1;
+	}
+	if (minus && padzero) {
+		(*putc)('-');
+	}
+	for (j = i; j < width; j++) {
+		(*putc)(padzero ? '0' : ' ');
+	}
+	if (minus && !padzero) {
+		(*putc)('-');
+	}
+	while (i > 0U) {
+		(*putc)(buf[--i]);
+	}
+}
+
+/*
+ *  æå­åæ´å½¢åºå
+ */
+static const char raddec[] = "0123456789";
+static const char radhex[] = "0123456789abcdef";
+static const char radHEX[] = "0123456789ABCDEF";
+
+void
+syslog_printf(const char *format, const LOGPAR *p_args, void (*putc)(char))
+{
+	char		c;
+	uint_t		width;
+	bool_t		padzero;
+	LOGPAR	val;
+	const char	*str;
+
+	while ((c = *format++) != '\0') {
+		if (c != '%') {
+			(*putc)(c);
+			continue;
+		}
+
+		width = 0U;
+		padzero = false;
+		if ((c = *format++) == '0') {
+			padzero = true;
+			c = *format++;
+		}
+		while ('0' <= c && c <= '9') {
+			width = width * 10U + c - '0';
+			c = *format++;
+		}
+		if (c == 'l' || c == 't' || c == 'T') {
+			c = *format++;
+		}
+		switch (c) {
+		case 'd':
+			val = (LOGPAR)(*p_args++);
+			if (val >= 0) {
+				convert((ULOGPAR) val, 10U, raddec,
+											width, false, padzero, putc);
+			}
+			else {
+				convert((ULOGPAR)(-val), 10U, raddec,
+											width, true, padzero, putc);
+			}
+			break;
+		case 'u':
+			val = (LOGPAR)(*p_args++);
+			convert((ULOGPAR) val, 10U, raddec, width, false, padzero, putc);
+			break;
+		case 'x':
+		case 'p':
+			val = (LOGPAR)(*p_args++);
+			convert((ULOGPAR) val, 16U, radhex, width, false, padzero, putc);
+			break;
+		case 'X':
+			val = (LOGPAR)(*p_args++);
+			convert((ULOGPAR) val, 16U, radHEX, width, false, padzero, putc);
+			break;
+		case 'c':
+			(*putc)((char)(LOGPAR)(*p_args++));
+			break;
+		case 's':
+			str = (const char *)(*p_args++);
+			while ((c = *str++) != '\0') {
+				(*putc)(c);
+			}
+			break;
+		case '%':
+			(*putc)('%');
+			break;
+		case '\0':
+			format--;
+			break;
+		default:
+			break;
+		}
+	}
+}
+
+/*
+ *  ã­ã°æ
+å ±ã®åºå
+ */
+void
+syslog_print(const SYSLOG *p_syslog, void (*putc)(char))
+{
+	switch (p_syslog->logtype) {
+	case LOG_TYPE_COMMENT:
+		syslog_printf((const char *)(p_syslog->logpar[0]),
+								&(p_syslog->logpar[1]), putc);
+		break;
+	case LOG_TYPE_ASSERT:
+		syslog_printf("%s:%u: Assertion `%s' failed.",
+								&(p_syslog->logpar[0]), putc);
+		break;
+	default:
+		/*
+		 *  ä»ã®ç¨®å¥ã®ã­ã°æ
+å ±ã«ã¯å¯¾å¿ãã¦ããªãï¼
+		 */
+		break;
+	}
+}
+
+/*
+ *  ã­ã°æ
+å ±åªå¤±ã¡ãã»ã¼ã¸ã®åºå
+ */
+void
+syslog_lostmsg(uint_t lostlog, void (*putc)(char))
+{
+	LOGPAR	lostinfo[1];
+
+	lostinfo[0] = (LOGPAR) lostlog;
+	syslog_printf("%d messages are lost.", lostinfo, putc);
+	(*putc)('\n');
+}
Index: EcnlProtoTool/trunk/asp3_dcre/library/strerror.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/library/strerror.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/library/strerror.c	(revision 270)
@@ -0,0 +1,130 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã¨ã©ã¼ã¡ãã»ã¼ã¸æå­åãè¿ãé¢æ°
+ */
+
+#include <t_stddef.h>
+#include <t_stdlib.h>
+
+const char *
+itron_strerror(ER ercd)
+{
+	switch (MERCD(ercd)) {
+	case E_OK:
+		return("E_OK");
+
+	case E_SYS:
+		return("E_SYS");
+	case E_NOSPT:
+		return("E_NOSPT");
+	case E_RSFN:
+		return("E_RSFN");
+	case E_RSATR:
+		return("E_RSATR");
+
+	case E_PAR:
+		return("E_PAR");
+	case E_ID:
+		return("E_ID");
+
+	case E_CTX:
+		return("E_CTX");
+	case E_MACV:
+		return("E_MACV");
+	case E_OACV:
+		return("E_OACV");
+	case E_ILUSE:
+		return("E_ILUSE");
+
+	case E_NOMEM:
+		return("E_NOMEM");
+	case E_NOID:
+		return("E_NOID");
+	case E_NORES:
+		return("E_NORES");
+
+	case E_OBJ:
+		return("E_OBJ");
+	case E_NOEXS:
+		return("E_NOEXS");
+	case E_QOVR:
+		return("E_QOVR");
+
+	case E_RLWAI:
+		return("E_RLWAI");
+	case E_TMOUT:
+		return("E_TMOUT");
+	case E_DLT:
+		return("E_DLT");
+	case E_CLS:
+		return("E_CLS");
+	case E_RASTER:
+		return("E_RASTER");
+
+	case E_WBLK:
+		return("E_WBLK");
+	case E_BOVR:
+		return("E_BOVR");
+
+	case E_COMM:
+		return("E_COMM");
+
+	default:
+		return("unknown error");
+	}
+}
Index: EcnlProtoTool/trunk/asp3_dcre/library/t_perror.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/library/t_perror.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/library/t_perror.c	(revision 270)
@@ -0,0 +1,71 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2006 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã¨ã©ã¼ã¡ãã»ã¼ã¸ã®åºå
+ */
+
+#include <t_stddef.h>
+#include <t_syslog.h>
+#include <t_stdlib.h>
+
+void
+t_perror(uint_t prio, const char *file, int_t line, const char *expr, ER ercd)
+{
+	syslog_5(prio, "%s (%d) reported by `%s' in line %d of `%s'.",
+						itron_strerror(ercd), SERCD(ercd), expr, line, file);
+
+}
Index: EcnlProtoTool/trunk/asp3_dcre/library/vasyslog.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/library/vasyslog.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/library/vasyslog.c	(revision 270)
@@ -0,0 +1,130 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		å¯å¤æ°å¼æ°ã®ã·ã¹ãã ã­ã°ã©ã¤ãã©ãª
+ */
+
+#include <t_stddef.h>
+#include <t_syslog.h>
+#include <stdarg.h>
+
+#ifndef TOPPERS_OMIT_SYSLOG
+
+void
+syslog(uint_t prio, const char *format, ...)
+{
+	SYSLOG	logbuf;
+	va_list	ap;
+	uint_t	i;
+	char	sz;
+	char	c;
+
+	logbuf.logtype = LOG_TYPE_COMMENT;
+	logbuf.logpar[0] = (LOGPAR) format;
+	i = 1U;
+	va_start(ap, format);
+
+	while ((c = *format++) != '\0' && i < TNUM_LOGPAR) {
+		if (c != '%') {
+			continue;
+		}
+
+		sz = '\0';
+		c = *format++;
+		while ('0' <= c && c <= '9') {
+			c = *format++;
+		}
+		if (c == 'l' || c == 't' || c == 'T') {
+			sz = c;
+			c = *format++;
+		}
+		switch (c) {
+		case 'd':
+			logbuf.logpar[i++] = (sz == 'l') ? (LOGPAR) va_arg(ap, long_t)
+							   : (sz == 't') ? (LOGPAR) va_arg(ap, int32_t)
+							   : (sz == 'T') ? (LOGPAR) va_arg(ap, SYSTIM)
+							   : (LOGPAR) va_arg(ap, int_t);
+			break;
+		case 'u':
+		case 'x':
+		case 'X':
+			logbuf.logpar[i++] = (sz == 'l') ? (LOGPAR) va_arg(ap, ulong_t)
+							   : (sz == 't') ? (LOGPAR) va_arg(ap, uint32_t)
+							   : (sz == 'T') ? (LOGPAR) va_arg(ap, SYSTIM)
+							   : (LOGPAR) va_arg(ap, uint_t);
+			break;
+		case 'p':
+			logbuf.logpar[i++] = (LOGPAR) va_arg(ap, void *);
+			break;
+		case 'c':
+			logbuf.logpar[i++] = (LOGPAR) va_arg(ap, int);
+			break;
+		case 's':
+			logbuf.logpar[i++] = (LOGPAR) va_arg(ap, const char *);
+			break;
+		case '\0':
+			format--;
+			break;
+		default:
+			break;
+		}
+	}
+	va_end(ap);
+	(void) tSysLog_eSysLog_write(prio, &logbuf);
+}
+
+#endif /* TOPPERS_OMIT_SYSLOG */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/Makefile.mbed
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/Makefile.mbed	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/Makefile.mbed	(revision 270)
@@ -0,0 +1,71 @@
+#
+#		Makefile ã®mbedï¼RZ/A1ç¨ï¼
+#
+#  $Id: Makefile.chip 720 2016-04-01 22:16:17Z ertl-hiro $
+# 
+
+#
+#  mbedãã£ã¬ã¯ããªåã®å®ç¾©
+#
+MBEDDIR = $(SRCDIR)/mbed
+
+#
+#  ã³ã³ãã¤ã«ãªãã·ã§ã³
+#
+INCLUDES := $(INCLUDES)\
+	-I$(MBEDDIR)/api\
+	-I$(MBEDDIR)/hal\
+	-I$(MBEDDIR)/targets/cmsis\
+	-I$(MBEDDIR)/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H\
+	-I$(MBEDDIR)/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc\
+	-I$(MBEDDIR)/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines\
+	-I$(MBEDDIR)/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H\
+	-I$(MBEDDIR)/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/TARGET_MBED_MBRZA1H
+COPTS := $(COPTS)\
+  -mthumb\
+  -mthumb-interwork\
+  -marm\
+  -march=armv7-a\
+  -mfpu=vfpv3\
+  -mfloat-abi=hard\
+  -mno-unaligned-access
+LDFLAGS := $(LDFLAGS)\
+  -mthumb\
+  -mthumb-interwork\
+  -marm\
+  -march=armv7-a\
+  -mfpu=vfpv3\
+  -mfloat-abi=hard\
+  -mno-unaligned-access
+CDEFS := $(CDEFS)\
+	-DTARGET_RZ_A1H\
+	-DTARGET_MBRZA1H\
+	-DTOOLCHAIN_GCC_ARM\
+	-DTOOLCHAIN_GCC\
+	-DTARGET_CORTEX_A\
+	-DMBED_BUILD_TIMESTAMP=1460441486.52\
+	-DTARGET_RENESAS\
+	-D__FPU_PRESENT
+
+#
+#  ã·ã¹ãã ãµã¼ãã¹ã«é¢ããå®ç¾©
+#
+SYSSVC_DIRS := $(SYSSVC_DIRS)\
+	$(MBEDDIR)/common\
+	$(MBEDDIR)/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H\
+	$(MBEDDIR)/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/TOOLCHAIN_GCC_ARM\
+	$(MBEDDIR)/targets/cmsis/TOOLCHAIN_GCC/TARGET_CORTEX_A\
+	$(MBEDDIR)/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H
+SYSSVC_ASMOBJS := $(SYSSVC_ASMOBJS)\
+	cache.o
+START_OBJS = startup_RZ1AH.o
+SYSSVC_COBJS := $(SYSSVC_COBJS)\
+	assert.o board.o error.o gpio.o lp_ticker_api.o mbed_interface.o\
+	pinmap_common.o rtc_time.o semihost_api.o ticker_api.o us_ticker_api.o\
+	RZ_A1_Init.o cmsis_nvic.o gic.o mbed_sf_boot.o mmu_Renesas_RZ_A1.o\
+	nvic_wrapper.o pl310.o rza_io_regrw.o system_MBRZA1H.o\
+	analogin_api.o can_api.o ethernet_api.o gpio_api.o gpio_irq_api.o i2c_api.o\
+	pinmap.o port_api.o pwmout_api.o rtc_api.o serial_api.o spi_api.o
+	#wait_api.o us_ticker.o
+CFG_DMY := cfg_dmy.o mmu_Renesas_RZ_A1.o mbed_sf_boot.o RZ_A1_Init.o system_MBRZA1H.o cache.o pl310.o gic.o
+
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/api/can_helper.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/api/can_helper.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/api/can_helper.h	(revision 270)
@@ -0,0 +1,53 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_CAN_HELPER_H
+#define MBED_CAN_HELPER_H
+
+#if DEVICE_CAN
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum CANFormat {
+    CANStandard = 0,
+    CANExtended = 1,
+    CANAny = 2
+};
+typedef enum CANFormat CANFormat;
+
+enum CANType {
+    CANData   = 0,
+    CANRemote = 1
+};
+typedef enum CANType CANType;
+
+struct CAN_Message {
+    unsigned int   id;                 // 29 bit identifier
+    unsigned char  data[8];            // Data field
+    unsigned char  len;                // Length of data field in bytes
+    CANFormat      format;             // 0 - STANDARD, 1- EXTENDED IDENTIFIER
+    CANType        type;               // 0 - DATA FRAME, 1 - REMOTE FRAME
+};
+typedef struct CAN_Message CAN_Message;
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif
+
+#endif // MBED_CAN_HELPER_H
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/api/mbed_assert.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/api/mbed_assert.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/api/mbed_assert.h	(revision 270)
@@ -0,0 +1,49 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_ASSERT_H
+#define MBED_ASSERT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Internal mbed assert function which is invoked when MBED_ASSERT macro failes.
+ *  This function is active only if NDEBUG is not defined prior to including this
+ *  assert header file.
+ *  In case of MBED_ASSERT failing condition, error() is called with the assertation message.
+ *  @param expr Expresion to be checked.
+ *  @param file File where assertation failed.
+ *  @param line Failing assertation line number.
+ */
+void mbed_assert_internal(const char *expr, const char *file, int line);
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifdef NDEBUG
+#define MBED_ASSERT(expr) ((void)0)
+
+#else
+#define MBED_ASSERT(expr)                                \
+do {                                                     \
+    if (!(expr)) {                                       \
+        mbed_assert_internal(#expr, __FILE__, __LINE__); \
+    }                                                    \
+} while (0)
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/api/mbed_error.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/api/mbed_error.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/api/mbed_error.h	(revision 270)
@@ -0,0 +1,66 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_ERROR_H
+#define MBED_ERROR_H
+
+/** To generate a fatal compile-time error, you can use the pre-processor #error directive.
+ *
+ * @code
+ * #error "That shouldn't have happened!"
+ * @endcode
+ *
+ * If the compiler evaluates this line, it will report the error and stop the compile.
+ *
+ * For example, you could use this to check some user-defined compile-time variables:
+ *
+ * @code
+ * #define NUM_PORTS 7
+ * #if (NUM_PORTS > 4)
+ *     #error "NUM_PORTS must be less than 4"
+ * #endif
+ * @endcode
+ *
+ * Reporting Run-Time Errors:
+ * To generate a fatal run-time error, you can use the mbed error() function.
+ *
+ * @code
+ * error("That shouldn't have happened!");
+ * @endcode
+ *
+ * If the mbed running the program executes this function, it will print the
+ * message via the USB serial port, and then die with the blue lights of death!
+ *
+ * The message can use printf-style formatting, so you can report variables in the
+ * message too. For example, you could use this to check a run-time condition:
+ *
+ * @code
+ * if(x >= 5) {
+ *     error("expected x to be less than 5, but got %d", x);
+ * }
+ * #endcode
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void error(const char* format, ...);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/api/mbed_interface.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/api/mbed_interface.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/api/mbed_interface.h	(revision 270)
@@ -0,0 +1,114 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_INTERFACE_H
+#define MBED_INTERFACE_H
+
+#include "device.h"
+
+/* Mbed interface mac address
+ * if MBED_MAC_ADD_x are zero, interface uid sets mac address,
+ * otherwise MAC_ADD_x are used.
+ */
+#define MBED_MAC_ADDR_INTERFACE 0x00
+#define MBED_MAC_ADDR_0  MBED_MAC_ADDR_INTERFACE
+#define MBED_MAC_ADDR_1  MBED_MAC_ADDR_INTERFACE
+#define MBED_MAC_ADDR_2  MBED_MAC_ADDR_INTERFACE
+#define MBED_MAC_ADDR_3  MBED_MAC_ADDR_INTERFACE
+#define MBED_MAC_ADDR_4  MBED_MAC_ADDR_INTERFACE
+#define MBED_MAC_ADDR_5  MBED_MAC_ADDR_INTERFACE
+#define MBED_MAC_ADDRESS_SUM (MBED_MAC_ADDR_0 | MBED_MAC_ADDR_1 | MBED_MAC_ADDR_2 | MBED_MAC_ADDR_3 | MBED_MAC_ADDR_4 | MBED_MAC_ADDR_5)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if DEVICE_SEMIHOST
+
+/** Functions to control the mbed interface
+ *
+ * mbed Microcontrollers have a built-in interface to provide functionality such as
+ * drag-n-drop download, reset, serial-over-usb, and access to the mbed local file
+ * system. These functions provide means to control the interface suing semihost
+ * calls it supports.
+ */
+
+/** Determine whether the mbed interface is connected, based on whether debug is enabled
+ *
+ *  @returns
+ *    1 if interface is connected,
+ *    0 otherwise
+ */
+int mbed_interface_connected(void);
+
+/** Instruct the mbed interface to reset, as if the reset button had been pressed
+ *
+ *  @returns
+ *    1 if successful,
+ *    0 otherwise (e.g. interface not present)
+ */
+int mbed_interface_reset(void);
+
+/** This will disconnect the debug aspect of the interface, so semihosting will be disabled.
+ * The interface will still support the USB serial aspect
+ *
+ *  @returns
+ *    0 if successful,
+ *   -1 otherwise (e.g. interface not present)
+ */
+int mbed_interface_disconnect(void);
+
+/** This will disconnect the debug aspect of the interface, and if the USB cable is not
+ * connected, also power down the interface. If the USB cable is connected, the interface
+ * will remain powered up and visible to the host
+ *
+ *  @returns
+ *    0 if successful,
+ *   -1 otherwise (e.g. interface not present)
+ */
+int mbed_interface_powerdown(void);
+
+/** This returns a string containing the 32-character UID of the mbed interface
+ *  This is a weak function that can be overwritten if required
+ *
+ *  @param uid A 33-byte array to write the null terminated 32-byte string
+ *
+ *  @returns
+ *    0 if successful,
+ *   -1 otherwise (e.g. interface not present)
+ */
+int mbed_interface_uid(char *uid);
+
+#endif
+
+/** This returns a unique 6-byte MAC address, based on the interface UID
+ * If the interface is not present, it returns a default fixed MAC address (00:02:F7:F0:00:00)
+ *
+ * This is a weak function that can be overwritten if you want to provide your own mechanism to
+ * provide a MAC address.
+ *
+ *  @param mac A 6-byte array to write the MAC address
+ */
+void mbed_mac_address(char *mac);
+
+/** Cause the mbed to flash the BLOD (Blue LEDs Of Death) sequence
+ */
+void mbed_die(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/api/rtc_time.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/api/rtc_time.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/api/rtc_time.h	(revision 270)
@@ -0,0 +1,85 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <time.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Implementation of the C time.h functions
+ *
+ * Provides mechanisms to set and read the current time, based
+ * on the microcontroller Real-Time Clock (RTC), plus some
+ * standard C manipulation and formating functions.
+ *
+ * Example:
+ * @code
+ * #include "mbed.h"
+ *
+ * int main() {
+ *     set_time(1256729737);  // Set RTC time to Wed, 28 Oct 2009 11:35:37
+ *
+ *     while(1) {
+ *         time_t seconds = time(NULL);
+ *
+ *         printf("Time as seconds since January 1, 1970 = %d\n", seconds);
+ *
+ *         printf("Time as a basic string = %s", ctime(&seconds));
+ *
+ *         char buffer[32];
+ *         strftime(buffer, 32, "%I:%M %p\n", localtime(&seconds));
+ *         printf("Time as a custom formatted string = %s", buffer);
+ *
+ *         wait(1);
+ *     }
+ * }
+ * @endcode
+ */
+
+/** Set the current time
+ *
+ * Initialises and sets the time of the microcontroller Real-Time Clock (RTC)
+ * to the time represented by the number of seconds since January 1, 1970
+ * (the UNIX timestamp).
+ *
+ * @param t Number of seconds since January 1, 1970 (the UNIX timestamp)
+ *
+ * Example:
+ * @code
+ * #include "mbed.h"
+ *
+ * int main() {
+ *     set_time(1256729737); // Set time to Wed, 28 Oct 2009 11:35:37
+ * }
+ * @endcode
+ */
+void set_time(time_t t);
+
+/** Attach an external RTC to be used for the C time functions
+ *
+ * Do not call this function from an interrupt while an RTC read/write operation may be occurring 
+ *
+ * @param read_rtc pointer to function which returns current UNIX timestamp
+ * @param write_rtc pointer to function which sets current UNIX timestamp, can be NULL
+ * @param init_rtc pointer to funtion which initializes RTC, can be NULL
+ * @param isenabled_rtc pointer to function wich returns if the rtc is enabled, can be NULL
+ */
+void attach_rtc(time_t (*read_rtc)(void), void (*write_rtc)(time_t), void (*init_rtc)(void), int (*isenabled_rtc)(void));
+
+#ifdef __cplusplus
+}
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/api/semihost_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/api/semihost_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/api/semihost_api.h	(revision 270)
@@ -0,0 +1,93 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_SEMIHOST_H
+#define MBED_SEMIHOST_H
+
+#include "device.h"
+#include "toolchain.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if DEVICE_SEMIHOST
+
+#ifndef __CC_ARM
+
+#if defined(__ICCARM__)
+inline int __semihost(int reason, const void *arg) {
+    return __semihosting(reason, (void*)arg);
+}
+#else
+
+#ifdef __thumb__
+#   define AngelSWI            0xAB
+#   define AngelSWIInsn        "bkpt"
+#   define AngelSWIAsm          bkpt
+#else
+#   define AngelSWI            0x123456
+#   define AngelSWIInsn        "swi"
+#   define AngelSWIAsm          swi
+#endif
+
+static inline int __semihost(int reason, const void *arg) {
+    int value;
+
+    asm volatile (
+       "mov r0, %1"          "\n\t"
+       "mov r1, %2"          "\n\t"
+       AngelSWIInsn " %a3"   "\n\t"
+       "mov %0, r0"
+       : "=r" (value)                                         /* output operands             */
+       : "r" (reason), "r" (arg), "i" (AngelSWI)              /* input operands              */
+       : "r0", "r1", "r2", "r3", "ip", "lr", "memory", "cc"   /* list of clobbered registers */
+    );
+
+    return value;
+}
+#endif
+#endif
+
+#if DEVICE_LOCALFILESYSTEM
+FILEHANDLE semihost_open(const char* name, int openmode);
+int semihost_close (FILEHANDLE fh);
+int semihost_read  (FILEHANDLE fh, unsigned char* buffer, unsigned int length, int mode);
+int semihost_write (FILEHANDLE fh, const unsigned char* buffer, unsigned int length, int mode);
+int semihost_ensure(FILEHANDLE fh);
+long semihost_flen (FILEHANDLE fh);
+int semihost_seek  (FILEHANDLE fh, long position);
+int semihost_istty (FILEHANDLE fh);
+
+int semihost_remove(const char *name);
+int semihost_rename(const char *old_name, const char *new_name);
+#endif
+
+int semihost_uid(char *uid);
+int semihost_reset(void);
+int semihost_vbus(void);
+int semihost_powerdown(void);
+int semihost_exit(void);
+
+int semihost_connected(void);
+int semihost_disabledebug(void);
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/api/toolchain.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/api/toolchain.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/api/toolchain.h	(revision 270)
@@ -0,0 +1,35 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_TOOLCHAIN_H
+#define MBED_TOOLCHAIN_H
+
+#if defined(TOOLCHAIN_ARM)
+#include <rt_sys.h>
+#endif
+
+#ifndef FILEHANDLE
+typedef int FILEHANDLE;
+#endif
+
+#if defined (__ICCARM__)
+#   define WEAK     __weak
+#   define PACKED   __packed
+#else
+#   define WEAK     __attribute__((weak))
+#   define PACKED   __attribute__((packed))
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/api/wait_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/api/wait_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/api/wait_api.h	(revision 270)
@@ -0,0 +1,66 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_WAIT_API_H
+#define MBED_WAIT_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Generic wait functions.
+ *
+ * These provide simple NOP type wait capabilities.
+ *
+ * Example:
+ * @code
+ * #include "mbed.h"
+ *
+ * DigitalOut heartbeat(LED1);
+ *
+ * int main() {
+ *     while (1) {
+ *         heartbeat = 1;
+ *         wait(0.5);
+ *         heartbeat = 0;
+ *         wait(0.5);
+ *     }
+ * }
+ */
+
+/** Waits for a number of seconds, with microsecond resolution (within
+ *  the accuracy of single precision floating point).
+ *
+ *  @param s number of seconds to wait
+ */
+void wait(float s);
+
+/** Waits a number of milliseconds.
+ *
+ *  @param ms the whole number of milliseconds to wait
+ */
+void wait_ms(int ms);
+
+/** Waits a number of microseconds.
+ *
+ *  @param us the whole number of microseconds to wait
+ */
+void wait_us(int us);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/common/assert.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/common/assert.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/common/assert.c	(revision 270)
@@ -0,0 +1,22 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "mbed_assert.h"
+#include "mbed_error.h"
+
+void mbed_assert_internal(const char *expr, const char *file, int line)
+{
+    error("mbed assertation failed: %s, file: %s, line %d \n", expr, file, line);
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/common/board.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/common/board.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/common/board.c	(revision 270)
@@ -0,0 +1,59 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "gpio_api.h"
+#include "wait_api.h"
+#include "toolchain.h"
+#include "mbed_interface.h"
+
+WEAK void mbed_die(void) {
+#if !defined (NRF51_H) && !defined(TARGET_EFM32)
+	__disable_irq();	// dont allow interrupts to disturb the flash pattern
+#endif
+#if   (DEVICE_ERROR_RED == 1)
+    gpio_t led_red; gpio_init_out(&led_red, LED_RED);
+#elif (DEVICE_ERROR_PATTERN == 1)
+    gpio_t led_1; gpio_init_out(&led_1, LED1);
+    gpio_t led_2; gpio_init_out(&led_2, LED2);
+    gpio_t led_3; gpio_init_out(&led_3, LED3);
+    gpio_t led_4; gpio_init_out(&led_4, LED4);
+#endif
+
+    while (1) {
+#if   (DEVICE_ERROR_RED == 1)
+        gpio_write(&led_red, 1);
+
+#elif (DEVICE_ERROR_PATTERN == 1)
+        gpio_write(&led_1, 1);
+        gpio_write(&led_2, 0);
+        gpio_write(&led_3, 0);
+        gpio_write(&led_4, 1);
+#endif
+
+        wait_ms(150);
+
+#if   (DEVICE_ERROR_RED == 1)
+        gpio_write(&led_red, 0);
+
+#elif (DEVICE_ERROR_PATTERN == 1)
+        gpio_write(&led_1, 0);
+        gpio_write(&led_2, 1);
+        gpio_write(&led_3, 1);
+        gpio_write(&led_4, 0);
+#endif
+
+        wait_ms(150);
+    }
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/common/error.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/common/error.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/common/error.c	(revision 270)
@@ -0,0 +1,33 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <stdlib.h>
+#include <stdarg.h>
+#include "device.h"
+#include "toolchain.h"
+#include "mbed_error.h"
+#if DEVICE_STDIO_MESSAGES
+#include <stdio.h>
+#endif
+
+WEAK void error(const char* format, ...) {
+#if DEVICE_STDIO_MESSAGES
+    va_list arg;
+    va_start(arg, format);
+    vfprintf(stderr, format, arg);
+    va_end(arg);
+#endif
+    exit(1);
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/common/gpio.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/common/gpio.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/common/gpio.c	(revision 270)
@@ -0,0 +1,61 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "gpio_api.h"
+
+static inline void _gpio_init_in(gpio_t* gpio, PinName pin, PinMode mode)
+{
+    gpio_init(gpio, pin);
+    if (pin != NC) {
+        gpio_dir(gpio, PIN_INPUT);
+        gpio_mode(gpio, mode);
+    }
+}
+
+static inline void _gpio_init_out(gpio_t* gpio, PinName pin, PinMode mode, int value)
+{
+    gpio_init(gpio, pin);
+    if (pin != NC) {
+        gpio_write(gpio, value);
+        gpio_dir(gpio, PIN_OUTPUT);
+        gpio_mode(gpio, mode);
+    }
+}
+
+void gpio_init_in(gpio_t* gpio, PinName pin) {
+    gpio_init_in_ex(gpio, pin, PullDefault);
+}
+
+void gpio_init_in_ex(gpio_t* gpio, PinName pin, PinMode mode) {
+    _gpio_init_in(gpio, pin, mode);
+}
+
+void gpio_init_out(gpio_t* gpio, PinName pin) {
+    gpio_init_out_ex(gpio, pin, 0);
+}
+
+void gpio_init_out_ex(gpio_t* gpio, PinName pin, int value) {
+    _gpio_init_out(gpio, pin, PullNone, value);
+}
+
+void gpio_init_inout(gpio_t* gpio, PinName pin, PinDirection direction, PinMode mode, int value) {
+    if (direction == PIN_INPUT) {
+        _gpio_init_in(gpio, pin, mode);
+        if (pin != NC)
+            gpio_write(gpio, value); // we prepare the value in case it is switched later
+    } else {
+        _gpio_init_out(gpio, pin, mode, value);
+    }
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/common/lp_ticker_api.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/common/lp_ticker_api.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/common/lp_ticker_api.c	(revision 270)
@@ -0,0 +1,45 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2015 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "lp_ticker_api.h"
+
+#if DEVICE_LOWPOWERTIMER
+
+static ticker_event_queue_t events;
+
+static const ticker_interface_t lp_interface = {
+    .init = lp_ticker_init,
+    .read = lp_ticker_read,
+    .disable_interrupt = lp_ticker_disable_interrupt,
+    .clear_interrupt = lp_ticker_clear_interrupt,
+    .set_interrupt = lp_ticker_set_interrupt,
+};
+
+static const ticker_data_t lp_data = {
+    .interface = &lp_interface,
+    .queue = &events,
+};
+
+const ticker_data_t* get_lp_ticker_data(void)
+{
+    return &lp_data;
+}
+
+void lp_ticker_irq_handler(void)
+{
+    ticker_irq_handler(&lp_data);
+}
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/common/mbed_interface.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/common/mbed_interface.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/common/mbed_interface.c	(revision 270)
@@ -0,0 +1,113 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <stdio.h>
+#include "mbed_interface.h"
+
+#include "gpio_api.h"
+#include "wait_api.h"
+#include "semihost_api.h"
+#include "mbed_error.h"
+#include "toolchain.h"
+
+#if DEVICE_SEMIHOST
+
+// return true if a debugger is attached, indicating mbed interface is connected
+int mbed_interface_connected(void) {
+    return semihost_connected();
+}
+
+int mbed_interface_reset(void) {
+    if (mbed_interface_connected()) {
+        semihost_reset();
+        return 0;
+    } else {
+        return -1;
+    }
+}
+
+WEAK int mbed_interface_uid(char *uid) {
+    if (mbed_interface_connected()) {
+        return semihost_uid(uid); // Returns 0 if successful, -1 on failure
+    } else {
+        uid[0] = 0;
+        return -1;
+    }
+}
+
+int mbed_interface_disconnect(void) {
+    int res;
+    if (mbed_interface_connected()) {
+        if ((res = semihost_disabledebug()) != 0)
+            return res;
+        while (mbed_interface_connected());
+        return 0;
+    } else {
+        return -1;
+    }
+}
+
+int mbed_interface_powerdown(void) {
+    int res;
+    if (mbed_interface_connected()) {
+        if ((res = semihost_powerdown()) != 0)
+            return res;
+        while (mbed_interface_connected());
+        return 0;
+    } else {
+        return -1;
+    }
+}
+
+// for backward compatibility
+void mbed_reset(void) {
+    mbed_interface_reset();
+}
+
+WEAK int mbed_uid(char *uid) {
+    return mbed_interface_uid(uid);
+}
+#endif
+
+WEAK void mbed_mac_address(char *mac) {
+#if DEVICE_SEMIHOST
+    char uid[DEVICE_ID_LENGTH + 1];
+    int i;
+
+    // if we have a UID, extract the MAC
+    if (mbed_interface_uid(uid) == 0) {
+        char *p = uid;
+#if defined(DEVICE_MAC_OFFSET)
+        p += DEVICE_MAC_OFFSET;
+#endif
+        for (i=0; i<6; i++) {
+            int byte;
+            sscanf(p, "%2x", &byte);
+            mac[i] = byte;
+            p += 2;
+        }
+        mac[0] &= ~0x01;    // reset the IG bit in the address; see IEE 802.3-2002, Section 3.2.3(b)
+    } else {  // else return a default MAC
+#endif
+        mac[0] = 0x00;
+        mac[1] = 0x02;
+        mac[2] = 0xF7;
+        mac[3] = 0xF0;
+        mac[4] = 0x00;
+        mac[5] = 0x00;
+#if DEVICE_SEMIHOST
+    }
+#endif
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/common/pinmap_common.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/common/pinmap_common.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/common/pinmap_common.c	(revision 270)
@@ -0,0 +1,89 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "pinmap.h"
+#include "mbed_error.h"
+
+void pinmap_pinout(PinName pin, const PinMap *map) {
+    if (pin == NC)
+        return;
+
+    while (map->pin != NC) {
+        if (map->pin == pin) {
+            pin_function(pin, map->function);
+
+            pin_mode(pin, PullNone);
+            return;
+        }
+        map++;
+    }
+    error("could not pinout");
+}
+
+uint32_t pinmap_merge(uint32_t a, uint32_t b) {
+    // both are the same (inc both NC)
+    if (a == b)
+        return a;
+
+    // one (or both) is not connected
+    if (a == (uint32_t)NC)
+        return b;
+    if (b == (uint32_t)NC)
+        return a;
+
+    // mis-match error case
+    error("pinmap mis-match");
+    return (uint32_t)NC;
+}
+
+uint32_t pinmap_find_peripheral(PinName pin, const PinMap* map) {
+    while (map->pin != NC) {
+        if (map->pin == pin)
+            return map->peripheral;
+        map++;
+    }
+    return (uint32_t)NC;
+}
+
+uint32_t pinmap_peripheral(PinName pin, const PinMap* map) {
+    uint32_t peripheral = (uint32_t)NC;
+
+    if (pin == (PinName)NC)
+        return (uint32_t)NC;
+    peripheral = pinmap_find_peripheral(pin, map);
+    if ((uint32_t)NC == peripheral) // no mapping available
+        error("pinmap not found for peripheral");
+    return peripheral;
+}
+
+uint32_t pinmap_find_function(PinName pin, const PinMap* map) {
+    while (map->pin != NC) {
+        if (map->pin == pin)
+            return map->function;
+        map++;
+    }
+    return (uint32_t)NC;
+}
+
+uint32_t pinmap_function(PinName pin, const PinMap* map) {
+    uint32_t function = (uint32_t)NC;
+
+    if (pin == (PinName)NC)
+        return (uint32_t)NC;
+    function = pinmap_find_function(pin, map);
+    if ((uint32_t)NC == function) // no mapping available
+        error("pinmap not found for function");
+    return function;
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/common/rtc_time.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/common/rtc_time.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/common/rtc_time.c	(revision 270)
@@ -0,0 +1,89 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "rtc_api.h"
+
+#include <time.h>
+#include "rtc_time.h"
+#include "us_ticker_api.h"
+
+#if DEVICE_RTC
+static void (*_rtc_init)(void) = rtc_init;
+static int (*_rtc_isenabled)(void) = rtc_isenabled;
+static time_t (*_rtc_read)(void) = rtc_read;
+static void (*_rtc_write)(time_t t) = rtc_write;
+#else
+static void (*_rtc_init)(void) = NULL;
+static int (*_rtc_isenabled)(void) = NULL;
+static time_t (*_rtc_read)(void) = NULL;
+static void (*_rtc_write)(time_t t) = NULL;
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if defined (__ICCARM__)
+time_t __time32(time_t *timer)
+#else
+time_t time(time_t *timer)
+#endif
+
+{
+    if (_rtc_isenabled != NULL) {
+        if (!(_rtc_isenabled())) {
+            set_time(0);
+        }
+    }
+    
+    time_t t = 0;
+    if (_rtc_read != NULL) {
+        t = _rtc_read();
+    }
+
+    if (timer != NULL) {
+        *timer = t;
+    }
+    return t;
+}
+
+void set_time(time_t t) {
+    if (_rtc_init != NULL) {
+        _rtc_init();
+    }
+    if (_rtc_write != NULL) {
+        _rtc_write(t);
+    }
+}
+
+clock_t clock() {
+    clock_t t = us_ticker_read();
+    t /= 1000000 / CLOCKS_PER_SEC; // convert to processor time
+    return t;
+}
+
+void attach_rtc(time_t (*read_rtc)(void), void (*write_rtc)(time_t), void (*init_rtc)(void), int (*isenabled_rtc)(void)) {
+    __disable_irq();
+    _rtc_read = read_rtc;
+    _rtc_write = write_rtc;
+    _rtc_init = init_rtc;
+    _rtc_isenabled = isenabled_rtc;
+    __enable_irq();
+}
+
+
+
+#ifdef __cplusplus
+}
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/common/semihost_api.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/common/semihost_api.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/common/semihost_api.c	(revision 270)
@@ -0,0 +1,162 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "cmsis.h"
+#include "semihost_api.h"
+
+#include <stdint.h>
+#include <string.h>
+
+#if DEVICE_SEMIHOST
+
+// ARM Semihosting Commands
+#define SYS_OPEN   (0x1)
+#define SYS_CLOSE  (0x2)
+#define SYS_WRITE  (0x5)
+#define SYS_READ   (0x6)
+#define SYS_ISTTY  (0x9)
+#define SYS_SEEK   (0xa)
+#define SYS_ENSURE (0xb)
+#define SYS_FLEN   (0xc)
+#define SYS_REMOVE (0xe)
+#define SYS_RENAME (0xf)
+#define SYS_EXIT   (0x18)
+
+// mbed Semihosting Commands
+#define RESERVED_FOR_USER_APPLICATIONS (0x100) // 0x100 - 0x1ff
+#define USR_XFFIND      (RESERVED_FOR_USER_APPLICATIONS + 0)
+#define USR_UID      (RESERVED_FOR_USER_APPLICATIONS + 1)
+#define USR_RESET     (RESERVED_FOR_USER_APPLICATIONS + 2)
+#define USR_VBUS     (RESERVED_FOR_USER_APPLICATIONS + 3)
+#define USR_POWERDOWN     (RESERVED_FOR_USER_APPLICATIONS + 4)
+#define USR_DISABLEDEBUG (RESERVED_FOR_USER_APPLICATIONS + 5)
+
+#if DEVICE_LOCALFILESYSTEM
+FILEHANDLE semihost_open(const char* name, int openmode) {
+    uint32_t args[3];
+    args[0] = (uint32_t)name;
+    args[1] = (uint32_t)openmode;
+    args[2] = (uint32_t)strlen(name);
+    return __semihost(SYS_OPEN, args);
+}
+
+int semihost_close(FILEHANDLE fh) {
+    return __semihost(SYS_CLOSE, &fh);
+}
+
+int semihost_write(FILEHANDLE fh, const unsigned char* buffer, unsigned int length, int mode) {
+    if (length == 0) return 0;
+
+    uint32_t args[3];
+    args[0] = (uint32_t)fh;
+    args[1] = (uint32_t)buffer;
+    args[2] = (uint32_t)length;
+    return __semihost(SYS_WRITE, args);
+}
+
+int semihost_read(FILEHANDLE fh, unsigned char* buffer, unsigned int length, int mode) {
+    uint32_t args[3];
+    args[0] = (uint32_t)fh;
+    args[1] = (uint32_t)buffer;
+    args[2] = (uint32_t)length;
+    return __semihost(SYS_READ, args);
+}
+
+int semihost_istty(FILEHANDLE fh) {
+    return __semihost(SYS_ISTTY, &fh);
+}
+
+int semihost_seek(FILEHANDLE fh, long position) {
+    uint32_t args[2];
+    args[0] = (uint32_t)fh;
+    args[1] = (uint32_t)position;
+    return __semihost(SYS_SEEK, args);
+}
+
+int semihost_ensure(FILEHANDLE fh) {
+    return __semihost(SYS_ENSURE, &fh);
+}
+
+long semihost_flen(FILEHANDLE fh) {
+    return __semihost(SYS_FLEN, &fh);
+}
+
+int semihost_remove(const char *name) {
+    uint32_t args[2];
+    args[0] = (uint32_t)name;
+    args[1] = (uint32_t)strlen(name);
+    return __semihost(SYS_REMOVE, args);
+}
+
+int semihost_rename(const char *old_name, const char *new_name) {
+    uint32_t args[4];
+    args[0] = (uint32_t)old_name;
+    args[1] = (uint32_t)strlen(old_name);
+    args[0] = (uint32_t)new_name;
+    args[1] = (uint32_t)strlen(new_name);
+    return __semihost(SYS_RENAME, args);
+}
+#endif
+
+int semihost_exit(void) {
+    uint32_t args[4];
+    return __semihost(SYS_EXIT, args);
+}
+
+int semihost_uid(char *uid) {
+    uint32_t args[2];
+    args[0] = (uint32_t)uid;
+    args[1] = DEVICE_ID_LENGTH + 1;
+    return __semihost(USR_UID, &args);
+}
+
+int semihost_reset(void) {
+    // Does not normally return, however if used with older firmware versions
+    // that do not support this call it will return -1.
+    return __semihost(USR_RESET, NULL);
+}
+
+int semihost_vbus(void) {
+    return __semihost(USR_VBUS, NULL);
+}
+
+int semihost_powerdown(void) {
+    return __semihost(USR_POWERDOWN, NULL);
+}
+
+#if DEVICE_DEBUG_AWARENESS
+
+int semihost_connected(void) {
+    return (CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk) ? 1 : 0;
+}
+
+#else
+// These processors cannot know if the interface is connect, assume so:
+static int is_debugger_attached = 1;
+
+int semihost_connected(void) {
+    return is_debugger_attached;
+}
+#endif
+
+int semihost_disabledebug(void) {
+#if !(DEVICE_DEBUG_AWARENESS)
+    is_debugger_attached = 0;
+#endif
+    return __semihost(USR_DISABLEDEBUG, NULL);
+}
+
+#endif
+
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/common/ticker_api.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/common/ticker_api.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/common/ticker_api.c	(revision 270)
@@ -0,0 +1,135 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2015 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <stddef.h>
+#include "ticker_api.h"
+#include "cmsis.h"
+
+void ticker_set_handler(const ticker_data_t *const data, ticker_event_handler handler) {
+    data->interface->init();
+
+    data->queue->event_handler = handler;
+}
+
+void ticker_irq_handler(const ticker_data_t *const data) {
+    data->interface->clear_interrupt();
+
+    /* Go through all the pending TimerEvents */
+    while (1) {
+        if (data->queue->head == NULL) {
+            // There are no more TimerEvents left, so disable matches.
+            data->interface->disable_interrupt();
+            return;
+        }
+
+        if ((int)(data->queue->head->timestamp - data->interface->read()) <= 0) {
+            // This event was in the past:
+            //      point to the following one and execute its handler
+            ticker_event_t *p = data->queue->head;
+            data->queue->head = data->queue->head->next;
+            if (data->queue->event_handler != NULL) {
+                (*data->queue->event_handler)(p->id); // NOTE: the handler can set new events
+            }
+            /* Note: We continue back to examining the head because calling the
+             * event handler may have altered the chain of pending events. */
+        } else {
+            // This event and the following ones in the list are in the future:
+            //      set it as next interrupt and return
+            data->interface->set_interrupt(data->queue->head->timestamp);
+            return;
+        }
+    }
+}
+
+void ticker_insert_event(const ticker_data_t *const data, ticker_event_t *obj, timestamp_t timestamp, uint32_t id) {
+    /* disable interrupts for the duration of the function */
+    __disable_irq();
+
+    // initialise our data
+    obj->timestamp = timestamp;
+    obj->id = id;
+
+    /* Go through the list until we either reach the end, or find
+       an element this should come before (which is possibly the
+       head). */
+    ticker_event_t *prev = NULL, *p = data->queue->head;
+    while (p != NULL) {
+        /* check if we come before p */
+        if ((int)(timestamp - p->timestamp) < 0) {
+            break;
+        }
+        /* go to the next element */
+        prev = p;
+        p = p->next;
+    }
+    /* if prev is NULL we're at the head */
+    if (prev == NULL) {
+        data->queue->head = obj;
+        data->interface->set_interrupt(timestamp);
+    } else {
+        prev->next = obj;
+    }
+    /* if we're at the end p will be NULL, which is correct */
+    obj->next = p;
+
+    __enable_irq();
+}
+
+void ticker_remove_event(const ticker_data_t *const data, ticker_event_t *obj) {
+    __disable_irq();
+
+    // remove this object from the list
+    if (data->queue->head == obj) {
+        // first in the list, so just drop me
+        data->queue->head = obj->next;
+        if (data->queue->head == NULL) {
+            data->interface->disable_interrupt();
+        } else {
+            data->interface->set_interrupt(data->queue->head->timestamp);
+        }
+    } else {
+        // find the object before me, then drop me
+        ticker_event_t* p = data->queue->head;
+        while (p != NULL) {
+            if (p->next == obj) {
+                p->next = obj->next;
+                break;
+            }
+            p = p->next;
+        }
+    }
+
+    __enable_irq();
+}
+
+timestamp_t ticker_read(const ticker_data_t *const data)
+{
+    return data->interface->read();
+}
+
+int ticker_get_next_timestamp(const ticker_data_t *const data, timestamp_t *timestamp)
+{
+    int ret = 0;
+
+    /* if head is NULL, there are no pending events */
+    __disable_irq();
+    if (data->queue->head != NULL) {
+        *timestamp = data->queue->head->timestamp;
+        ret = 1;
+    }
+    __enable_irq();
+
+    return ret;
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/common/us_ticker_api.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/common/us_ticker_api.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/common/us_ticker_api.c	(revision 270)
@@ -0,0 +1,41 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2015 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "us_ticker_api.h"
+
+static ticker_event_queue_t events;
+
+static const ticker_interface_t us_interface = {
+    .init = us_ticker_init,
+    .read = us_ticker_read,
+    .disable_interrupt = us_ticker_disable_interrupt,
+    .clear_interrupt = us_ticker_clear_interrupt,
+    .set_interrupt = us_ticker_set_interrupt,
+};
+
+static const ticker_data_t us_data = {
+    .interface = &us_interface,
+    .queue = &events,
+};
+
+const ticker_data_t* get_us_ticker_data(void)
+{
+    return &us_data;
+}
+
+void us_ticker_irq_handler(void)
+{
+    ticker_irq_handler(&us_data);
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/common/wait_api.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/common/wait_api.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/common/wait_api.c	(revision 270)
@@ -0,0 +1,30 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "wait_api.h"
+#include "us_ticker_api.h"
+
+void wait(float s) {
+    wait_us(s * 1000000.0f);
+}
+
+void wait_ms(int ms) {
+    wait_us(ms * 1000);
+}
+
+void wait_us(int us) {
+    uint32_t start = us_ticker_read();
+    while ((us_ticker_read() - start) < (uint32_t)us);
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/analogin_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/analogin_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/analogin_api.h	(revision 270)
@@ -0,0 +1,39 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_ANALOGIN_API_H
+#define MBED_ANALOGIN_API_H
+
+#include "device.h"
+
+#if DEVICE_ANALOGIN
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct analogin_s analogin_t;
+
+void     analogin_init    (analogin_t *obj, PinName pin);
+float    analogin_read    (analogin_t *obj);
+uint16_t analogin_read_u16(analogin_t *obj);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/analogout_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/analogout_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/analogout_api.h	(revision 270)
@@ -0,0 +1,42 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_ANALOGOUT_API_H
+#define MBED_ANALOGOUT_API_H
+
+#include "device.h"
+
+#if DEVICE_ANALOGOUT
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct dac_s dac_t;
+
+void     analogout_init     (dac_t *obj, PinName pin);
+void     analogout_free     (dac_t *obj);
+void     analogout_write    (dac_t *obj, float value);
+void     analogout_write_u16(dac_t *obj, uint16_t value);
+float    analogout_read     (dac_t *obj);
+uint16_t analogout_read_u16 (dac_t *obj);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/buffer.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/buffer.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/buffer.h	(revision 270)
@@ -0,0 +1,30 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2014-2015 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_BUFFER_H
+#define MBED_BUFFER_H
+
+#include <stddef.h>
+
+/** Generic buffer structure
+ */
+typedef struct buffer_s {
+    void    *buffer; /**< the pointer to a buffer */
+    size_t   length; /**< the buffer length */
+    size_t   pos;    /**< actual buffer position */
+    uint8_t  width;  /**< The buffer unit width (8, 16, 32, 64), used for proper *buffer casting */
+} buffer_t;
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/can_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/can_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/can_api.h	(revision 270)
@@ -0,0 +1,80 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_CAN_API_H
+#define MBED_CAN_API_H
+
+#include "device.h"
+
+#if DEVICE_CAN
+
+#include "PinNames.h"
+#include "PeripheralNames.h"
+#include "can_helper.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+    IRQ_RX,
+    IRQ_TX,
+    IRQ_ERROR,
+    IRQ_OVERRUN,
+    IRQ_WAKEUP,
+    IRQ_PASSIVE,
+    IRQ_ARB,
+    IRQ_BUS,
+    IRQ_READY
+} CanIrqType;
+
+
+typedef enum {
+    MODE_RESET,
+    MODE_NORMAL,
+    MODE_SILENT,
+    MODE_TEST_LOCAL,
+    MODE_TEST_GLOBAL,
+    MODE_TEST_SILENT
+} CanMode;
+
+typedef void (*can_irq_handler)(uint32_t id, CanIrqType type);
+
+typedef struct can_s can_t;
+
+void          can_init     (can_t *obj, PinName rd, PinName td);
+void          can_free     (can_t *obj);
+int           can_frequency(can_t *obj, int hz);
+
+void          can_irq_init (can_t *obj, can_irq_handler handler, uint32_t id);
+void          can_irq_free (can_t *obj);
+void          can_irq_set  (can_t *obj, CanIrqType irq, uint32_t enable);
+
+int           can_write    (can_t *obj, CAN_Message, int cc);
+int           can_read     (can_t *obj, CAN_Message *msg, int handle);
+int           can_mode     (can_t *obj, CanMode mode);
+int           can_filter(can_t *obj, uint32_t id, uint32_t mask, CANFormat format, int32_t handle);
+void          can_reset    (can_t *obj);
+unsigned char can_rderror  (can_t *obj);
+unsigned char can_tderror  (can_t *obj);
+void          can_monitor  (can_t *obj, int silent);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif    // MBED_CAN_API_H
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/dma_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/dma_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/dma_api.h	(revision 270)
@@ -0,0 +1,45 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2014-2015 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_DMA_API_H
+#define MBED_DMA_API_H
+
+#include <stdint.h>
+
+#define DMA_ERROR_OUT_OF_CHANNELS (-1)
+
+typedef enum {
+    DMA_USAGE_NEVER,
+    DMA_USAGE_OPPORTUNISTIC,
+    DMA_USAGE_ALWAYS,
+    DMA_USAGE_TEMPORARY_ALLOCATED,
+    DMA_USAGE_ALLOCATED
+} DMAUsage;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void dma_init(void);
+
+int dma_channel_allocate(uint32_t capabilities);
+
+int dma_channel_free(int channelid);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/ethernet_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/ethernet_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/ethernet_api.h	(revision 270)
@@ -0,0 +1,67 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_ETHERNET_API_H
+#define MBED_ETHERNET_API_H
+
+#include "device.h"
+
+#if DEVICE_ETHERNET
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Descriptor info */
+#define NUM_OF_TX_DESCRIPTOR    (4)
+#define NUM_OF_RX_DESCRIPTOR    (4)
+
+// Connection constants
+
+int ethernet_init(void);
+void ethernet_free(void);
+
+// write size bytes from data to ethernet buffer
+// return num bytes written
+// or -1 if size is too big
+int ethernet_write(const char *data, int size);
+
+// send ethernet write buffer, returning the packet size sent
+int ethernet_send(void);
+
+// recieve from ethernet buffer, returning packet size, or 0 if no packet
+int ethernet_receive(void);
+
+// read size bytes in to data, return actual num bytes read (0..size)
+// if data == NULL, throw the bytes away
+int ethernet_read(char *data, int size);
+
+// get the ethernet address
+void ethernet_address(char *mac);
+
+// see if the link is up
+int ethernet_link(void);
+
+// force link settings
+void ethernet_set_link(int speed, int duplex);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#endif
+
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/gpio_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/gpio_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/gpio_api.h	(revision 270)
@@ -0,0 +1,57 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_GPIO_API_H
+#define MBED_GPIO_API_H
+
+#include "device.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Set the given pin as GPIO
+ * @param pin The pin to be set as GPIO
+ * @return The GPIO port mask for this pin
+ **/
+uint32_t gpio_set(PinName pin);
+
+/* Checks if gpio object is connected (pin was not initialized with NC)
+ * @param pin The pin to be set as GPIO
+ * @return 0 if port is initialized with NC
+ **/
+int gpio_is_connected(const gpio_t *obj);
+
+/* GPIO object */
+void gpio_init(gpio_t *obj, PinName pin);
+
+void gpio_mode (gpio_t *obj, PinMode mode);
+void gpio_dir  (gpio_t *obj, PinDirection direction);
+
+void gpio_write(gpio_t *obj, int value);
+int  gpio_read (gpio_t *obj);
+
+// the following set of functions are generic and are implemented in the common gpio.c file
+void gpio_init_in(gpio_t* gpio, PinName pin);
+void gpio_init_in_ex(gpio_t* gpio, PinName pin, PinMode mode);
+void gpio_init_out(gpio_t* gpio, PinName pin);
+void gpio_init_out_ex(gpio_t* gpio, PinName pin, int value);
+void gpio_init_inout(gpio_t* gpio, PinName pin, PinDirection direction, PinMode mode, int value);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/gpio_irq_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/gpio_irq_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/gpio_irq_api.h	(revision 270)
@@ -0,0 +1,49 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_GPIO_IRQ_API_H
+#define MBED_GPIO_IRQ_API_H
+
+#include "device.h"
+
+#if DEVICE_INTERRUPTIN
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+    IRQ_NONE,
+    IRQ_RISE,
+    IRQ_FALL
+} gpio_irq_event;
+
+typedef struct gpio_irq_s gpio_irq_t;
+
+typedef void (*gpio_irq_handler)(uint32_t id, gpio_irq_event event);
+
+int  gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32_t id);
+void gpio_irq_free(gpio_irq_t *obj);
+void gpio_irq_set (gpio_irq_t *obj, gpio_irq_event event, uint32_t enable);
+void gpio_irq_enable(gpio_irq_t *obj);
+void gpio_irq_disable(gpio_irq_t *obj);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/i2c_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/i2c_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/i2c_api.h	(revision 270)
@@ -0,0 +1,223 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2015 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_I2C_API_H
+#define MBED_I2C_API_H
+
+#include "device.h"
+#include "buffer.h"
+
+#if DEVICE_I2C
+
+/**
+ * @defgroup I2CEvents I2C Events Macros
+ *
+ * @{
+ */
+#define I2C_EVENT_ERROR               (1 << 1)
+#define I2C_EVENT_ERROR_NO_SLAVE      (1 << 2)
+#define I2C_EVENT_TRANSFER_COMPLETE   (1 << 3)
+#define I2C_EVENT_TRANSFER_EARLY_NACK (1 << 4)
+#define I2C_EVENT_ALL                 (I2C_EVENT_ERROR |  I2C_EVENT_TRANSFER_COMPLETE | I2C_EVENT_ERROR_NO_SLAVE | I2C_EVENT_TRANSFER_EARLY_NACK)
+
+/**@}*/
+
+#if DEVICE_I2C_ASYNCH
+/** Asynch i2c hal structure
+ */
+typedef struct {
+    struct i2c_s    i2c;     /**< Target specific i2c structure */
+    struct buffer_s tx_buff; /**< Tx buffer */
+    struct buffer_s rx_buff; /**< Rx buffer */
+} i2c_t;
+
+#else
+/** Non-asynch i2c hal structure
+ */
+typedef struct i2c_s i2c_t;
+
+#endif
+
+enum {
+  I2C_ERROR_NO_SLAVE = -1,
+  I2C_ERROR_BUS_BUSY = -2
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \defgroup GeneralI2C I2C Configuration Functions
+ * @{
+ */
+
+/** Initialize the I2C peripheral. It sets the default parameters for I2C
+ *  peripheral, and configure its specifieds pins.
+ *  @param obj  The i2c object
+ *  @param sda  The sda pin
+ *  @param scl  The scl pin
+ */
+void i2c_init(i2c_t *obj, PinName sda, PinName scl);
+
+/** Configure the I2C frequency.
+ *  @param obj The i2c object
+ *  @param hz  Frequency in Hz
+ */
+void i2c_frequency(i2c_t *obj, int hz);
+
+/** Send START command.
+ *  @param obj The i2c object
+ */
+int  i2c_start(i2c_t *obj);
+
+/** Send STOP command.
+ *  @param obj The i2c object
+ */
+int  i2c_stop(i2c_t *obj);
+
+/** Blocking reading data.
+ *  @param obj     The i2c object
+ *  @param address 7-bit address (last bit is 1)
+ *  @param data    The buffer for receiving
+ *  @param length  Number of bytes to read
+ *  @param stop    Stop to be generated after the transfer is done
+ *  @return Number of read bytes
+ */
+int  i2c_read(i2c_t *obj, int address, char *data, int length, int stop);
+
+/** Blocking sending data.
+ *  @param obj     The i2c object
+ *  @param address 7-bit address (last bit is 0)
+ *  @param data    The buffer for sending
+ *  @param length  Number of bytes to wrte
+ *  @param stop    Stop to be generated after the transfer is done
+ *  @return Number of written bytes
+ */
+int  i2c_write(i2c_t *obj, int address, const char *data, int length, int stop);
+
+/** Reset I2C peripheral. TODO: The action here. Most of the implementation sends stop().
+ *  @param obj The i2c object
+ */
+void i2c_reset(i2c_t *obj);
+
+/** Read one byte.
+ *  @param obj The i2c object
+ *  @param last Acknoledge
+ *  @return The read byte
+ */
+int  i2c_byte_read(i2c_t *obj, int last);
+
+/** Write one byte.
+ *  @param obj The i2c object
+ *  @param data Byte to be written
+ *  @return 1 if NAK was received, 0 if ACK was received, 2 for timeout.
+ */
+int  i2c_byte_write(i2c_t *obj, int data);
+
+/**@}*/
+
+#if DEVICE_I2CSLAVE
+
+/**
+ * \defgroup SynchI2C Synchronous I2C Hardware Abstraction Layer for slave
+ * @{
+ */
+
+/** Configure I2C as slave or master.
+ *  @param obj The I2C object
+ *  @return non-zero if a value is available
+ */
+void i2c_slave_mode(i2c_t *obj, int enable_slave);
+
+/** Check to see if the I2C slave has been addressed.
+ *  @param obj The I2C object
+ *  @return The status - 1 - read addresses, 2 - write to all slaves,
+ *         3 write addressed, 0 - the slave has not been addressed
+ */
+int  i2c_slave_receive(i2c_t *obj);
+
+/** Configure I2C as slave or master.
+ *  @param obj The I2C object
+ *  @return non-zero if a value is available
+ */
+int  i2c_slave_read(i2c_t *obj, char *data, int length);
+
+/** Configure I2C as slave or master.
+ *  @param obj The I2C object
+ *  @return non-zero if a value is available
+ */
+int  i2c_slave_write(i2c_t *obj, const char *data, int length);
+
+/** Configure I2C address.
+ *  @param obj     The I2C object
+ *  @param idx     Currently not used
+ *  @param address The address to be set
+ *  @param mask    Currently not used
+ */
+void i2c_slave_address(i2c_t *obj, int idx, uint32_t address, uint32_t mask);
+
+#endif
+
+/**@}*/
+
+#if DEVICE_I2C_ASYNCH
+
+/**
+ * \defgroup AsynchI2C Asynchronous I2C Hardware Abstraction Layer
+ * @{
+ */
+
+/** Start i2c asynchronous transfer.
+ *  @param obj       The I2C object
+ *  @param tx        The buffer to send
+ *  @param tx_length The number of words to transmit
+ *  @param rx        The buffer to receive
+ *  @param rx_length The number of words to receive
+ *  @param address   The address to be set - 7bit or 9 bit
+ *  @param stop      If true, stop will be generated after the transfer is done
+ *  @param handler   The I2C IRQ handler to be set
+ *  @param hint      DMA hint usage
+ */
+void i2c_transfer_asynch(i2c_t *obj, const void *tx, size_t tx_length, void *rx, size_t rx_length, uint32_t address, uint32_t stop, uint32_t handler, uint32_t event, DMAUsage hint);
+
+/** The asynchronous IRQ handler
+ *  @param obj The I2C object which holds the transfer information
+ *  @return event flags if a transfer termination condition was met or 0 otherwise.
+ */
+uint32_t i2c_irq_handler_asynch(i2c_t *obj);
+
+/** Attempts to determine if I2C peripheral is already in use.
+ *  @param obj The I2C object
+ *  @return non-zero if the I2C module is active or zero if it is not
+ */
+uint8_t i2c_active(i2c_t *obj);
+
+/** Abort ongoing asynchronous transaction.
+ *  @param obj The I2C object
+ */
+void i2c_abort_asynch(i2c_t *obj);
+
+#endif
+
+/**@}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/lp_ticker_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/lp_ticker_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/lp_ticker_api.h	(revision 270)
@@ -0,0 +1,82 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2015 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_LPTICKER_API_H
+#define MBED_LPTICKER_API_H
+
+#include "device.h"
+
+#if DEVICE_LOWPOWERTIMER
+
+#include "ticker_api.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \defgroup LpTicker Low Power Ticker Functions
+ * @{
+ */
+
+/** Get low power ticker's data
+ *
+ * @return The low power ticker data
+ */
+const ticker_data_t* get_lp_ticker_data(void);
+
+/** The wrapper for ticker_irq_handler, to pass lp ticker's data
+ *
+ */
+void lp_ticker_irq_handler(void);
+
+/* HAL lp ticker */
+
+/** Initialize the low power ticker
+ *
+ */
+void lp_ticker_init(void);
+
+/** Read the current counter
+ *
+ * @return The current timer's counter value in microseconds
+ */
+uint32_t lp_ticker_read(void);
+
+/** Set interrupt for specified timestamp
+ *
+ * @param timestamp The time in microseconds to be set
+ */
+void lp_ticker_set_interrupt(timestamp_t timestamp);
+
+/** Disable low power ticker interrupt
+ *
+ */
+void lp_ticker_disable_interrupt(void);
+
+/** Clear the low power ticker interrupt
+ *
+ */
+void lp_ticker_clear_interrupt(void);
+
+/**@}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/pinmap.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/pinmap.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/pinmap.h	(revision 270)
@@ -0,0 +1,45 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_PINMAP_H
+#define MBED_PINMAP_H
+
+#include "PinNames.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+    PinName pin;
+    int peripheral;
+    int function;
+} PinMap;
+
+void pin_function(PinName pin, int function);
+void pin_mode    (PinName pin, PinMode mode);
+
+uint32_t pinmap_peripheral(PinName pin, const PinMap* map);
+uint32_t pinmap_function(PinName pin, const PinMap* map);
+uint32_t pinmap_merge     (uint32_t a, uint32_t b);
+void     pinmap_pinout    (PinName pin, const PinMap *map);
+uint32_t pinmap_find_peripheral(PinName pin, const PinMap* map);
+uint32_t pinmap_find_function(PinName pin, const PinMap* map);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/port_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/port_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/port_api.h	(revision 270)
@@ -0,0 +1,42 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_PORTMAP_H
+#define MBED_PORTMAP_H
+
+#include "device.h"
+
+#if DEVICE_PORTIN || DEVICE_PORTOUT
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct port_s port_t;
+
+PinName port_pin(PortName port, int pin_n);
+
+void port_init (port_t *obj, PortName port, int mask, PinDirection dir);
+void port_mode (port_t *obj, PinMode mode);
+void port_dir  (port_t *obj, PinDirection dir);
+void port_write(port_t *obj, int value);
+int  port_read (port_t *obj);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/pwmout_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/pwmout_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/pwmout_api.h	(revision 270)
@@ -0,0 +1,49 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_PWMOUT_API_H
+#define MBED_PWMOUT_API_H
+
+#include "device.h"
+
+#if DEVICE_PWMOUT
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct pwmout_s pwmout_t;
+
+void pwmout_init         (pwmout_t* obj, PinName pin);
+void pwmout_free         (pwmout_t* obj);
+
+void  pwmout_write       (pwmout_t* obj, float percent);
+float pwmout_read        (pwmout_t* obj);
+
+void pwmout_period       (pwmout_t* obj, float seconds);
+void pwmout_period_ms    (pwmout_t* obj, int ms);
+void pwmout_period_us    (pwmout_t* obj, int us);
+
+void pwmout_pulsewidth   (pwmout_t* obj, float seconds);
+void pwmout_pulsewidth_ms(pwmout_t* obj, int ms);
+void pwmout_pulsewidth_us(pwmout_t* obj, int us);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/rtc_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/rtc_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/rtc_api.h	(revision 270)
@@ -0,0 +1,42 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_RTC_API_H
+#define MBED_RTC_API_H
+
+#include "device.h"
+
+#if DEVICE_RTC
+
+#include <time.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void rtc_init(void);
+void rtc_free(void);
+int rtc_isenabled(void);
+
+time_t rtc_read(void);
+void rtc_write(time_t t);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/serial_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/serial_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/serial_api.h	(revision 270)
@@ -0,0 +1,302 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_SERIAL_API_H
+#define MBED_SERIAL_API_H
+
+#include "device.h"
+#include "buffer.h"
+#include "dma_api.h"
+
+#if DEVICE_SERIAL
+
+#define SERIAL_EVENT_TX_SHIFT (2)
+#define SERIAL_EVENT_RX_SHIFT (8)
+
+#define SERIAL_EVENT_TX_MASK (0x00FC)
+#define SERIAL_EVENT_RX_MASK (0x3F00)
+
+#define SERIAL_EVENT_ERROR (1 << 1)
+
+/**
+ * @defgroup SerialTXEvents Serial TX Events Macros
+ *
+ * @{
+ */
+#define SERIAL_EVENT_TX_COMPLETE (1 << (SERIAL_EVENT_TX_SHIFT + 0))
+#define SERIAL_EVENT_TX_ALL      (SERIAL_EVENT_TX_COMPLETE)
+/**@}*/
+
+/**
+ * @defgroup SerialRXEvents Serial RX Events Macros
+ *
+ * @{
+ */
+#define SERIAL_EVENT_RX_COMPLETE        (1 << (SERIAL_EVENT_RX_SHIFT + 0))
+#define SERIAL_EVENT_RX_OVERRUN_ERROR   (1 << (SERIAL_EVENT_RX_SHIFT + 1))
+#define SERIAL_EVENT_RX_FRAMING_ERROR   (1 << (SERIAL_EVENT_RX_SHIFT + 2))
+#define SERIAL_EVENT_RX_PARITY_ERROR    (1 << (SERIAL_EVENT_RX_SHIFT + 3))
+#define SERIAL_EVENT_RX_OVERFLOW        (1 << (SERIAL_EVENT_RX_SHIFT + 4))
+#define SERIAL_EVENT_RX_CHARACTER_MATCH (1 << (SERIAL_EVENT_RX_SHIFT + 5))
+#define SERIAL_EVENT_RX_ALL             (SERIAL_EVENT_RX_OVERFLOW | SERIAL_EVENT_RX_PARITY_ERROR | \
+                                         SERIAL_EVENT_RX_FRAMING_ERROR | SERIAL_EVENT_RX_OVERRUN_ERROR | \
+                                         SERIAL_EVENT_RX_COMPLETE | SERIAL_EVENT_RX_CHARACTER_MATCH)
+/**@}*/
+
+#define SERIAL_RESERVED_CHAR_MATCH (255)
+
+typedef enum {
+    ParityNone = 0,
+    ParityOdd = 1,
+    ParityEven = 2,
+    ParityForced1 = 3,
+    ParityForced0 = 4
+} SerialParity;
+
+typedef enum {
+    RxIrq,
+    TxIrq
+} SerialIrq;
+
+typedef enum {
+    FlowControlNone,
+    FlowControlRTS,
+    FlowControlCTS,
+    FlowControlRTSCTS
+} FlowControl;
+
+typedef void (*uart_irq_handler)(uint32_t id, SerialIrq event);
+
+#if DEVICE_SERIAL_ASYNCH
+/** Asynch serial hal structure
+ */
+typedef struct {
+    struct serial_s serial;  /**< Target specific serial structure */
+    struct buffer_s tx_buff; /**< Tx buffer */
+    struct buffer_s rx_buff; /**< Rx buffer */
+    uint8_t char_match;      /**< Character to be matched */
+    uint8_t char_found;      /**< State of the matched character */
+} serial_t;
+
+#else
+/** Non-asynch serial hal structure
+ */
+typedef struct serial_s serial_t;
+
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \defgroup GeneralSerial Serial Configuration Functions
+ * @{
+ */
+
+/** Initialize the serial peripheral. It sets the default parameters for serial
+ *  peripheral, and configure its specifieds pins.
+ *
+ * @param obj The serial object
+ * @param tx  The TX pin
+ * @param rx  The RX pin
+ */
+void serial_init(serial_t *obj, PinName tx, PinName rx);
+
+/** Release the serial peripheral, not currently invoked. It requires further
+ *  resource management.
+ *
+ * @param obj The serial object
+ */
+void serial_free(serial_t *obj);
+
+/** Configure the baud rate
+ *
+ * @param obj      The serial object
+ * @param baudrate The baud rate to be configured
+ */
+void serial_baud(serial_t *obj, int baudrate);
+
+/** Configure the format. Set the number of bits, parity and the number of stop bits
+ *
+ * @param obj       The serial object
+ * @param data_bits The number of data bits
+ * @param parity    The parity
+ * @param stop_bits The number of stop bits
+ */
+void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_bits);
+
+/** The serial interrupt handler registration.
+ *
+ * @param obj     The serial object
+ * @param handler The interrupt handler which will be invoked when interrupt fires.
+ * @param id      The SerialBase object
+ */
+void serial_irq_handler(serial_t *obj, uart_irq_handler handler, uint32_t id);
+
+/** Configure serial interrupt. This function is used for word-approach
+ *
+ * @param obj    The serial object
+ * @param irq    The serial IRQ type (RX or TX)
+ * @param enable Set to non-zero to enable events, or zero to disable them
+ */
+void serial_irq_set(serial_t *obj, SerialIrq irq, uint32_t enable);
+
+/** Get character. This is a blocking call, waiting for a character
+ *
+ * @param obj The serial object
+ */
+int  serial_getc(serial_t *obj);
+
+/** Put a character. This is a blocking call, waiting for a peripheral to be available
+ *  for writing
+ *
+ * @param obj The serial object
+ * @param c   The character to be sent
+ */
+void serial_putc(serial_t *obj, int c);
+
+/** Check if the serial peripheral is readable
+ *
+ * @param obj The serial object
+ * @return Non-zero value if a character can be read, 0 if nothing to read.
+ */
+int  serial_readable(serial_t *obj);
+
+/** Check if the serial peripheral is writable
+ *
+ * @param obj The serial object
+ * @return Non-zero value if a character can be written, 0 otherwise.
+ */
+int  serial_writable(serial_t *obj);
+
+/** Clear the serial peripheral
+ *
+ * @param obj The serial object
+ */
+void serial_clear(serial_t *obj);
+
+/** Set the break
+ *
+ * @param obj The serial object
+ */
+void serial_break_set(serial_t *obj);
+
+/** Clear the break
+ *
+ * @param obj The serial object
+ */
+void serial_break_clear(serial_t *obj);
+
+/** Configure the TX pin for UART function.
+ *
+ * @param tx The pin used for TX
+ */
+void serial_pinout_tx(PinName tx);
+
+/** Configure the serial for the flow control. It sets flow control in the hardware
+ *  if a serial peripheral supports it, otherwise software emulation is used.
+ *
+ * @param obj    The serial object
+ * @param type   The type of the flow control. Look at the available FlowControl types.
+ * @param rxflow The tx pin
+ * @param txflow The rx pin
+ */
+void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, PinName txflow);
+
+#if DEVICE_SERIAL_ASYNCH
+
+/**@}*/
+
+/**
+ * \defgroup AsynchSerial Asynchronous Serial Hardware Abstraction Layer
+ * @{
+ */
+
+/** Begin asynchronous TX transfer. The used buffer is specified in the serial object,
+ *  tx_buff
+ *
+ * @param obj       The serial object
+ * @param tx        The buffer for sending
+ * @param tx_length The number of words to transmit
+ * @param tx_width  The bit width of buffer word
+ * @param handler   The serial handler
+ * @param event     The logical OR of events to be registered
+ * @param hint      A suggestion for how to use DMA with this transfer
+ * @return Returns number of data transfered, or 0 otherwise
+ */
+int serial_tx_asynch(serial_t *obj, const void *tx, size_t tx_length, uint8_t tx_width, uint32_t handler, uint32_t event, DMAUsage hint);
+
+/** Begin asynchronous RX transfer (enable interrupt for data collecting)
+ *  The used buffer is specified in the serial object - rx_buff
+ *
+ * @param obj        The serial object
+ * @param rx         The buffer for sending
+ * @param rx_length  The number of words to transmit
+ * @param rx_width   The bit width of buffer word
+ * @param handler    The serial handler
+ * @param event      The logical OR of events to be registered
+ * @param handler    The serial handler
+ * @param char_match A character in range 0-254 to be matched
+ * @param hint       A suggestion for how to use DMA with this transfer
+ */
+void serial_rx_asynch(serial_t *obj, void *rx, size_t rx_length, uint8_t rx_width, uint32_t handler, uint32_t event, uint8_t char_match, DMAUsage hint);
+
+/** Attempts to determine if the serial peripheral is already in use for TX
+ *
+ * @param obj The serial object
+ * @return Non-zero if the RX transaction is ongoing, 0 otherwise
+ */
+uint8_t serial_tx_active(serial_t *obj);
+
+/** Attempts to determine if the serial peripheral is already in use for RX
+ *
+ * @param obj The serial object
+ * @return Non-zero if the RX transaction is ongoing, 0 otherwise
+ */
+uint8_t serial_rx_active(serial_t *obj);
+
+/** The asynchronous TX and RX handler.
+ *
+ * @param obj The serial object
+ * @return Returns event flags if a RX transfer termination condition was met or 0 otherwise
+ */
+int serial_irq_handler_asynch(serial_t *obj);
+
+/** Abort the ongoing TX transaction. It disables the enabled interupt for TX and
+ *  flush TX hardware buffer if TX FIFO is used
+ *
+ * @param obj The serial object
+ */
+void serial_tx_abort_asynch(serial_t *obj);
+
+/** Abort the ongoing RX transaction It disables the enabled interrupt for RX and
+ *  flush RX hardware buffer if RX FIFO is used
+ *
+ * @param obj The serial object
+ */
+void serial_rx_abort_asynch(serial_t *obj);
+
+/**@}*/
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/sleep_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/sleep_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/sleep_api.h	(revision 270)
@@ -0,0 +1,64 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_SLEEP_API_H
+#define MBED_SLEEP_API_H
+
+#include "device.h"
+
+#if DEVICE_SLEEP
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Send the microcontroller to sleep
+ *
+ * The processor is setup ready for sleep, and sent to sleep using __WFI(). In this mode, the
+ * system clock to the core is stopped until a reset or an interrupt occurs. This eliminates
+ * dynamic power used by the processor, memory systems and buses. The processor, peripheral and
+ * memory state are maintained, and the peripherals continue to work and can generate interrupts.
+ *
+ * The processor can be woken up by any internal peripheral interrupt or external pin interrupt.
+ *
+ * @note
+ *  The mbed interface semihosting is disconnected as part of going to sleep, and can not be restored.
+ * Flash re-programming and the USB serial port will remain active, but the mbed program will no longer be
+ * able to access the LocalFileSystem
+ */
+void sleep(void);
+
+/** Send the microcontroller to deep sleep
+ *
+ * This processor is setup ready for deep sleep, and sent to sleep using __WFI(). This mode
+ * has the same sleep features as sleep plus it powers down peripherals and clocks. All state
+ * is still maintained.
+ *
+ * The processor can only be woken up by an external interrupt on a pin or a watchdog timer.
+ *
+ * @note
+ *  The mbed interface semihosting is disconnected as part of going to sleep, and can not be restored.
+ * Flash re-programming and the USB serial port will remain active, but the mbed program will no longer be
+ * able to access the LocalFileSystem
+ */
+void deepsleep(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/spi_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/spi_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/spi_api.h	(revision 270)
@@ -0,0 +1,213 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_SPI_API_H
+#define MBED_SPI_API_H
+
+#include "device.h"
+#include "dma_api.h"
+#include "buffer.h"
+
+#if DEVICE_SPI
+
+#define SPI_EVENT_ERROR       (1 << 1)
+#define SPI_EVENT_COMPLETE    (1 << 2)
+#define SPI_EVENT_RX_OVERFLOW (1 << 3)
+#define SPI_EVENT_ALL         (SPI_EVENT_ERROR | SPI_EVENT_COMPLETE | SPI_EVENT_RX_OVERFLOW)
+
+#define SPI_EVENT_INTERNAL_TRANSFER_COMPLETE (1 << 30) // internal flag to report an event occurred
+
+#define SPI_FILL_WORD         (0xFFFF)
+
+#if DEVICE_SPI_ASYNCH
+/** Asynch spi hal structure
+ */
+typedef struct {
+    struct spi_s spi;        /**< Target specific spi structure */
+    struct buffer_s tx_buff; /**< Tx buffer */
+    struct buffer_s rx_buff; /**< Rx buffer */
+} spi_t;
+
+#else
+/** Non-asynch spi hal structure
+ */
+typedef struct spi_s spi_t;
+
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \defgroup GeneralSPI SPI Configuration Functions
+ * @{
+ */
+
+/** Initialize the SPI peripheral
+ *
+ * Configures the pins used by SPI, sets a default format and frequency, and enables the peripheral
+ * @param[out] obj  The SPI object to initialize
+ * @param[in]  mosi The pin to use for MOSI
+ * @param[in]  miso The pin to use for MISO
+ * @param[in]  sclk The pin to use for SCLK
+ * @param[in]  ssel The pin to use for SSEL
+ */
+void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk, PinName ssel);
+
+/** Release a SPI object
+ *
+ * TODO: spi_free is currently unimplemented
+ * This will require reference counting at the C++ level to be safe
+ *
+ * Return the pins owned by the SPI object to their reset state
+ * Disable the SPI peripheral
+ * Disable the SPI clock
+ * @param[in] obj The SPI object to deinitialize
+ */
+void spi_free(spi_t *obj);
+
+/** Configure the SPI format
+ *
+ * Set the number of bits per frame, configure clock polarity and phase, shift order and master/slave mode
+ * @param[in,out] obj   The SPI object to configure
+ * @param[in]     bits  The number of bits per frame
+ * @param[in]     mode  The SPI mode (clock polarity, phase, and shift direction)
+ * @param[in]     slave Zero for master mode or non-zero for slave mode
+ */
+void spi_format(spi_t *obj, int bits, int mode, int slave);
+
+/** Set the SPI baud rate
+ *
+ * Actual frequency may differ from the desired frequency due to available dividers and bus clock
+ * Configures the SPI peripheral's baud rate
+ * @param[in,out] obj The SPI object to configure
+ * @param[in]     hz  The baud rate in Hz
+ */
+void spi_frequency(spi_t *obj, int hz);
+
+/**@}*/
+/**
+ * \defgroup SynchSPI Synchronous SPI Hardware Abstraction Layer
+ * @{
+ */
+
+/** Write a byte out in master mode and receive a value
+ *
+ * @param[in] obj   The SPI peripheral to use for sending
+ * @param[in] value The value to send
+ * @return Returns the value received during send
+ */
+int  spi_master_write(spi_t *obj, int value);
+
+/** Check if a value is available to read
+ *
+ * @param[in] obj The SPI peripheral to check
+ * @return non-zero if a value is available
+ */
+int  spi_slave_receive(spi_t *obj);
+
+/** Get a received value out of the SPI receive buffer in slave mode
+ *
+ * Blocks until a value is available
+ * @param[in] obj The SPI peripheral to read
+ * @return The value received
+ */
+int  spi_slave_read(spi_t *obj);
+
+/** Write a value to the SPI peripheral in slave mode
+ *
+ * Blocks until the SPI peripheral can be written to
+ * @param[in] obj   The SPI peripheral to write
+ * @param[in] value The value to write
+ */
+void spi_slave_write(spi_t *obj, int value);
+
+/** Checks if the specified SPI peripheral is in use
+ *
+ * @param[in] obj The SPI peripheral to check
+ * @return non-zero if the peripheral is currently transmitting
+ */
+int  spi_busy(spi_t *obj);
+
+/** Get the module number
+ *
+ * @param[in] obj The SPI peripheral to check
+ * @return The module number
+ */
+uint8_t spi_get_module(spi_t *obj);
+
+/**@}*/
+
+#if DEVICE_SPI_ASYNCH
+/**
+ * \defgroup AsynchSPI Asynchronous SPI Hardware Abstraction Layer
+ * @{
+ */
+
+/** Begin the SPI transfer. Buffer pointers and lengths are specified in tx_buff and rx_buff
+ *
+ * @param[in] obj       The SPI object which holds the transfer information
+ * @param[in] tx        The buffer to send
+ * @param[in] tx_length The number of words to transmit
+ * @param[in] rx        The buffer to receive
+ * @param[in] rx_length The number of words to receive
+ * @param[in] bit_width The bit width of buffer words
+ * @param[in] event     The logical OR of events to be registered
+ * @param[in] handler   SPI interrupt handler
+ * @param[in] hint      A suggestion for how to use DMA with this transfer
+ */
+void spi_master_transfer(spi_t *obj, const void *tx, size_t tx_length, void *rx, size_t rx_length, uint8_t bit_width, uint32_t handler, uint32_t event, DMAUsage hint);
+
+/** The asynchronous IRQ handler
+ *
+ * Reads the received values out of the RX FIFO, writes values into the TX FIFO and checks for transfer termination
+ * conditions, such as buffer overflows or transfer complete.
+ * @param[in] obj     The SPI object which holds the transfer information
+ * @return event flags if a transfer termination condition was met or 0 otherwise.
+ */
+uint32_t spi_irq_handler_asynch(spi_t *obj);
+
+/** Attempts to determine if the SPI peripheral is already in use.
+ *
+ * If a temporary DMA channel has been allocated, peripheral is in use.
+ * If a permanent DMA channel has been allocated, check if the DMA channel is in use.  If not, proceed as though no DMA
+ * channel were allocated.
+ * If no DMA channel is allocated, check whether tx and rx buffers have been assigned.  For each assigned buffer, check
+ * if the corresponding buffer position is less than the buffer length.  If buffers do not indicate activity, check if
+ * there are any bytes in the FIFOs.
+ * @param[in] obj The SPI object to check for activity
+ * @return non-zero if the SPI port is active or zero if it is not.
+ */
+uint8_t spi_active(spi_t *obj);
+
+/** Abort an SPI transfer
+ *
+ * @param obj The SPI peripheral to stop
+ */
+void spi_abort_asynch(spi_t *obj);
+
+
+#endif
+
+/**@}*/
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+
+#endif // SPI_DEVICE
+
+#endif // MBED_SPI_API_H
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/ticker_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/ticker_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/ticker_api.h	(revision 270)
@@ -0,0 +1,108 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2015 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_TICKER_API_H
+#define MBED_TICKER_API_H
+
+#include "device.h"
+
+typedef uint32_t timestamp_t;
+
+/** Ticker's event structure
+ */
+typedef struct ticker_event_s {
+    timestamp_t            timestamp; /**< Event's timestamp */
+    uint32_t               id;        /**< TimerEvent object */
+    struct ticker_event_s *next;      /**< Next event in the queue */
+} ticker_event_t;
+
+typedef void (*ticker_event_handler)(uint32_t id);
+
+/** Ticker's interface structure - required API for a ticker
+ */
+typedef struct {
+    void (*init)(void);                           /**< Init function */
+    uint32_t (*read)(void);                       /**< Read function */
+    void (*disable_interrupt)(void);              /**< Disable interrupt function */
+    void (*clear_interrupt)(void);                /**< Clear interrupt function */
+    void (*set_interrupt)(timestamp_t timestamp); /**< Set interrupt function */
+} ticker_interface_t;
+
+/** Tickers events queue structure
+ */
+typedef struct {
+    ticker_event_handler event_handler; /**< Event handler */
+    ticker_event_t *head;               /**< A pointer to head */
+} ticker_event_queue_t;
+
+/** Tickers data structure
+ */
+typedef struct {
+    const ticker_interface_t *interface; /**< Ticker's interface */
+    ticker_event_queue_t *queue;         /**< Ticker's events queue */
+} ticker_data_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Initialize a ticker and sets the event handler
+ *
+ * @param data    The ticker's data
+ * @param handler A handler to be set
+ */
+void ticker_set_handler(const ticker_data_t *const data, ticker_event_handler handler);
+
+/** Irq handler which goes through the events to trigger events in the past.
+ *
+ * @param data    The ticker's data
+ */
+void ticker_irq_handler(const ticker_data_t *const data);
+
+/** Remove an event from the queue
+ *
+ * @param data The ticker's data
+ * @param obj  The event's queue to be removed
+ */
+void ticker_remove_event(const ticker_data_t *const data, ticker_event_t *obj);
+
+/** Insert an event from the queue
+ *
+ * @param data      The ticker's data
+ * @param obj       The event's queue to be removed
+ * @param timestamp The event's timestamp
+ * @param id        The event object
+ */
+void ticker_insert_event(const ticker_data_t *const data, ticker_event_t *obj, timestamp_t timestamp, uint32_t id);
+
+/** Read the current ticker's timestamp
+ *
+ * @param data The ticker's data
+ * @return The current timestamp
+ */
+timestamp_t ticker_read(const ticker_data_t *const data);
+
+/** Read the next event's timestamp
+ *
+ * @param data The ticker's data
+ * @return 1 if timestamp is pending event, 0 if there's no event pending
+ */
+int ticker_get_next_timestamp(const ticker_data_t *const data, timestamp_t *timestamp);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/hal/us_ticker_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/hal/us_ticker_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/hal/us_ticker_api.h	(revision 270)
@@ -0,0 +1,78 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2015 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_US_TICKER_API_H
+#define MBED_US_TICKER_API_H
+
+#include <stdint.h>
+#include "ticker_api.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \defgroup UsTicker Microseconds Ticker Functions
+ * @{
+ */
+
+/** Get ticker's data
+ *
+ * @return The low power ticker data
+ */
+const ticker_data_t* get_us_ticker_data(void);
+
+
+/** The wrapper for ticker_irq_handler, to pass us ticker's data
+ *
+ */
+void us_ticker_irq_handler(void);
+
+/* HAL us ticker */
+
+/** Initialize the ticker
+ *
+ */
+void us_ticker_init(void);
+
+/** Read the current counter
+ *
+ * @return The current timer's counter value in microseconds
+ */
+uint32_t us_ticker_read(void);
+
+/** Set interrupt for specified timestamp
+ *
+ * @param timestamp The time in microseconds to be set
+ */
+void us_ticker_set_interrupt(timestamp_t timestamp);
+
+/** Disable us ticker interrupt
+ *
+ */
+void us_ticker_disable_interrupt(void);
+
+/** Clear us ticker interrupt
+ *
+ */
+void us_ticker_clear_interrupt(void);
+
+/**@}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/MBRZA1H.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/MBRZA1H.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/MBRZA1H.h	(revision 270)
@@ -0,0 +1,1057 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/**************************************************************************//**
+ * @file     MBRZA1H.h
+ * @brief    CMSIS Cortex-A9 Core Peripheral Access Layer Header File for 
+ *           Renesas MBRZA1H Device Series
+ * @version
+ * @date     19 Sept 2013
+ *
+ * @note
+ *
+ ******************************************************************************/
+
+#ifndef __MBRZA1H_H__
+#define __MBRZA1H_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* -------------------------  Interrupt Number Definition  ------------------------ */
+
+typedef enum IRQn
+{
+/******  SGI Interrupts Numbers                 ****************************************/
+  SGI0_IRQn           =  0,
+  SGI1_IRQn           =  1,
+  SGI2_IRQn           =  2,
+  SGI3_IRQn           =  3,
+  SGI4_IRQn           =  4,
+  SGI5_IRQn           =  5,
+  SGI6_IRQn           =  6,
+  SGI7_IRQn           =  7,
+  SGI8_IRQn           =  8,
+  SGI9_IRQn           =  9,
+  SGI10_IRQn          = 10,
+  SGI11_IRQn          = 11,
+  SGI12_IRQn          = 12,
+  SGI13_IRQn          = 13,
+  SGI14_IRQn          = 14,
+  SGI15_IRQn          = 15,
+
+/******  Cortex-A9 Processor Exceptions Numbers ****************************************/
+  /* 16 - 578 */
+  PMUIRQ0_IRQn         = 16,
+  COMMRX0_IRQn         = 17,
+  COMMTX0_IRQn         = 18,
+  CTIIRQ0_IRQn         = 19,
+
+  IRQ0_IRQn            = 32,
+  IRQ1_IRQn            = 33,
+  IRQ2_IRQn            = 34,
+  IRQ3_IRQn            = 35,
+  IRQ4_IRQn            = 36,
+  IRQ5_IRQn            = 37,
+  IRQ6_IRQn            = 38,
+  IRQ7_IRQn            = 39,
+
+  PL310ERR_IRQn        = 40,
+
+  DMAINT0_IRQn         = 41,        /*!< DMAC Interrupt         */
+  DMAINT1_IRQn         = 42,        /*!< DMAC Interrupt         */
+  DMAINT2_IRQn         = 43,        /*!< DMAC Interrupt         */
+  DMAINT3_IRQn         = 44,        /*!< DMAC Interrupt         */
+  DMAINT4_IRQn         = 45,        /*!< DMAC Interrupt         */
+  DMAINT5_IRQn         = 46,        /*!< DMAC Interrupt         */
+  DMAINT6_IRQn         = 47,        /*!< DMAC Interrupt         */
+  DMAINT7_IRQn         = 48,        /*!< DMAC Interrupt         */
+  DMAINT8_IRQn         = 49,        /*!< DMAC Interrupt         */
+  DMAINT9_IRQn         = 50,        /*!< DMAC Interrupt         */
+  DMAINT10_IRQn        = 51,        /*!< DMAC Interrupt         */
+  DMAINT11_IRQn        = 52,        /*!< DMAC Interrupt         */
+  DMAINT12_IRQn        = 53,        /*!< DMAC Interrupt         */
+  DMAINT13_IRQn        = 54,        /*!< DMAC Interrupt         */
+  DMAINT14_IRQn        = 55,        /*!< DMAC Interrupt         */
+  DMAINT15_IRQn        = 56,        /*!< DMAC Interrupt         */
+  DMAERR_IRQn          = 57,        /*!< DMAC Interrupt         */
+
+  /* 58-72 Reserved */
+
+  USBI0_IRQn           = 73,
+  USBI1_IRQn           = 74,
+
+  S0_VI_VSYNC0_IRQn    = 75,
+  S0_LO_VSYNC0_IRQn    = 76,
+  S0_VSYNCERR0_IRQn    = 77,
+  GR3_VLINE0_IRQn      = 78,
+  S0_VFIELD0_IRQn      = 79,
+  IV1_VBUFERR0_IRQn    = 80,
+  IV3_VBUFERR0_IRQn    = 81,
+  IV5_VBUFERR0_IRQn    = 82,
+  IV6_VBUFERR0_IRQn    = 83,
+  S0_WLINE0_IRQn       = 84,
+  S1_VI_VSYNC0_IRQn    = 85,
+  S1_LO_VSYNC0_IRQn    = 86,
+  S1_VSYNCERR0_IRQn    = 87,
+  S1_VFIELD0_IRQn      = 88,
+  IV2_VBUFERR0_IRQn    = 89,
+  IV4_VBUFERR0_IRQn    = 90,
+  S1_WLINE0_IRQn       = 91,
+  OIR_VI_VSYNC0_IRQn   = 92,
+  OIR_LO_VSYNC0_IRQn   = 93,
+  OIR_VSYNCERR0_IRQn   = 94,
+  OIR_VFIELD0_IRQn     = 95,
+  IV7_VBUFERR0_IRQn    = 96,
+  IV8_VBUFERR0_IRQn    = 97,
+  /* 98 Reserved */
+  S0_VI_VSYNC1_IRQn    = 99,
+  S0_LO_VSYNC1_IRQn    = 100,
+  S0_VSYNCERR1_IRQn    = 101,
+  GR3_VLINE1_IRQn      = 102,
+  S0_VFIELD1_IRQn      = 103,
+  IV1_VBUFERR1_IRQn    = 104,
+  IV3_VBUFERR1_IRQn    = 105,
+  IV5_VBUFERR1_IRQn    = 106,
+  IV6_VBUFERR1_IRQn    = 107,
+  S0_WLINE1_IRQn       = 108,
+  S1_VI_VSYNC1_IRQn    = 109,
+  S1_LO_VSYNC1_IRQn    = 110,
+  S1_VSYNCERR1_IRQn    = 111,
+  S1_VFIELD1_IRQn      = 112,
+  IV2_VBUFERR1_IRQn    = 113,
+  IV4_VBUFERR1_IRQn    = 114,
+  S1_WLINE1_IRQn       = 115,
+  OIR_VI_VSYNC1_IRQn   = 116,
+  OIR_LO_VSYNC1_IRQn   = 117,
+  OIR_VSYNCERR1_IRQn   = 118,
+  OIR_VFIELD1_IRQn     = 119,
+  IV7_VBUFERR1_IRQn    = 120,
+  IV8_VBUFERR1_IRQn    = 121,
+  /* Reserved = 122 */
+
+  IMRDI_IRQn           = 123,
+  IMR2I0_IRQn          = 124,
+  IMR2I1_IRQn          = 125,
+
+  JEDI_IRQn            = 126,
+  JDTI_IRQn            = 127,
+
+  CMP0_IRQn            = 128,
+  CMP1_IRQn            = 129,
+
+  INT0_IRQn            = 130,
+  INT1_IRQn            = 131,
+  INT2_IRQn            = 132,
+  INT3_IRQn            = 133,
+
+  OSTMI0TINT_IRQn      = 134,       /*!< OSTM Interrupt         */
+  OSTMI1TINT_IRQn      = 135,       /*!< OSTM Interrupt         */
+
+  CMI_IRQn             = 136,
+  WTOUT_IRQn           = 137,
+
+  ITI_IRQn             = 138,
+
+  TGI0A_IRQn           = 139,
+  TGI0B_IRQn           = 140,
+  TGI0C_IRQn           = 141,
+  TGI0D_IRQn           = 142,
+  TGI0V_IRQn           = 143,
+  TGI0E_IRQn           = 144,
+  TGI0F_IRQn           = 145,
+  TGI1A_IRQn           = 146,
+  TGI1B_IRQn           = 147,
+  TGI1V_IRQn           = 148,
+  TGI1U_IRQn           = 149,
+  TGI2A_IRQn           = 150,
+  TGI2B_IRQn           = 151,
+  TGI2V_IRQn           = 152,
+  TGI2U_IRQn           = 153,
+  TGI3A_IRQn           = 154,
+  TGI3B_IRQn           = 155,
+  TGI3C_IRQn           = 156,
+  TGI3D_IRQn           = 157,
+  TGI3V_IRQn           = 158,
+  TGI4A_IRQn           = 159,
+  TGI4B_IRQn           = 160,
+  TGI4C_IRQn           = 161,
+  TGI4D_IRQn           = 162,
+  TGI4V_IRQn           = 163,
+
+  CMI1_IRQn            = 164,
+  CMI2_IRQn            = 165,
+
+  SGDEI0_IRQn          = 166,
+  SGDEI1_IRQn          = 167,
+  SGDEI2_IRQn          = 168,
+  SGDEI3_IRQn          = 169,
+
+  ADI_IRQn             = 170,
+  LMTI_IRQn            = 171,
+
+  SSII0_IRQn           = 172,       /*!< SSIF Interrupt         */
+  SSIRXI0_IRQn         = 173,       /*!< SSIF Interrupt         */
+  SSITXI0_IRQn         = 174,       /*!< SSIF Interrupt         */
+  SSII1_IRQn           = 175,       /*!< SSIF Interrupt         */
+  SSIRXI1_IRQn         = 176,       /*!< SSIF Interrupt         */
+  SSITXI1_IRQn         = 177,       /*!< SSIF Interrupt         */
+  SSII2_IRQn           = 178,       /*!< SSIF Interrupt         */
+  SSIRTI2_IRQn         = 179,       /*!< SSIF Interrupt         */
+  SSII3_IRQn           = 180,       /*!< SSIF Interrupt         */
+  SSIRXI3_IRQn         = 181,       /*!< SSIF Interrupt         */
+  SSITXI3_IRQn         = 182,       /*!< SSIF Interrupt         */
+  SSII4_IRQn           = 183,       /*!< SSIF Interrupt         */
+  SSIRTI4_IRQn         = 184,       /*!< SSIF Interrupt         */
+  SSII5_IRQn           = 185,       /*!< SSIF Interrupt         */
+  SSIRXI5_IRQn         = 186,       /*!< SSIF Interrupt         */
+  SSITXI5_IRQn         = 187,       /*!< SSIF Interrupt         */
+
+  SPDIFI_IRQn          = 188,
+
+  INTIICTEI0_IRQn      = 189,       /*!< RIIC Interrupt         */
+  INTIICRI0_IRQn       = 190,       /*!< RIIC Interrupt         */
+  INTIICTI0_IRQn       = 191,       /*!< RIIC Interrupt         */
+  INTIICSPI0_IRQn      = 192,       /*!< RIIC Interrupt         */
+  INTIICSTI0_IRQn      = 193,       /*!< RIIC Interrupt         */
+  INTIICNAKI0_IRQn     = 194,       /*!< RIIC Interrupt         */
+  INTIICALI0_IRQn      = 195,       /*!< RIIC Interrupt         */
+  INTIICTMOI0_IRQn     = 196,       /*!< RIIC Interrupt         */
+  INTIICTEI1_IRQn      = 197,       /*!< RIIC Interrupt         */
+  INTIICRI1_IRQn       = 198,       /*!< RIIC Interrupt         */
+  INTIICTI1_IRQn       = 199,       /*!< RIIC Interrupt         */
+  INTIICSPI1_IRQn      = 200,       /*!< RIIC Interrupt         */
+  INTIICSTI1_IRQn      = 201,       /*!< RIIC Interrupt         */
+  INTIICNAKI1_IRQn     = 202,       /*!< RIIC Interrupt         */
+  INTIICALI1_IRQn      = 203,       /*!< RIIC Interrupt         */
+  INTIICTMOI1_IRQn     = 204,       /*!< RIIC Interrupt         */
+  INTIICTEI2_IRQn      = 205,       /*!< RIIC Interrupt         */
+  INTIICRI2_IRQn       = 206,       /*!< RIIC Interrupt         */
+  INTIICTI2_IRQn       = 207,       /*!< RIIC Interrupt         */
+  INTIICSPI2_IRQn      = 208,       /*!< RIIC Interrupt         */
+  INTIICSTI2_IRQn      = 209,       /*!< RIIC Interrupt         */
+  INTIICNAKI2_IRQn     = 210,       /*!< RIIC Interrupt         */
+  INTIICALI2_IRQn      = 211,       /*!< RIIC Interrupt         */
+  INTIICTMOI2_IRQn     = 212,       /*!< RIIC Interrupt         */
+  INTIICTEI3_IRQn      = 213,       /*!< RIIC Interrupt         */
+  INTIICRI3_IRQn       = 214,       /*!< RIIC Interrupt         */
+  INTIICTI3_IRQn       = 215,       /*!< RIIC Interrupt         */
+  INTIICSPI3_IRQn      = 216,       /*!< RIIC Interrupt         */
+  INTIICSTI3_IRQn      = 217,       /*!< RIIC Interrupt         */
+  INTIICNAKI3_IRQn     = 218,       /*!< RIIC Interrupt         */
+  INTIICALI3_IRQn      = 219,       /*!< RIIC Interrupt         */
+  INTIICTMOI3_IRQn     = 220,       /*!< RIIC Interrupt         */
+
+  SCIFBRI0_IRQn        = 221,       /*!< SCIF Interrupt         */
+  SCIFERI0_IRQn        = 222,       /*!< SCIF Interrupt         */
+  SCIFRXI0_IRQn        = 223,       /*!< SCIF Interrupt         */
+  SCIFTXI0_IRQn        = 224,       /*!< SCIF Interrupt         */
+  SCIFBRI1_IRQn        = 225,       /*!< SCIF Interrupt         */
+  SCIFERI1_IRQn        = 226,       /*!< SCIF Interrupt         */
+  SCIFRXI1_IRQn        = 227,       /*!< SCIF Interrupt         */
+  SCIFTXI1_IRQn        = 228,       /*!< SCIF Interrupt         */
+  SCIFBRI2_IRQn        = 229,       /*!< SCIF Interrupt         */
+  SCIFERI2_IRQn        = 230,       /*!< SCIF Interrupt         */
+  SCIFRXI2_IRQn        = 231,       /*!< SCIF Interrupt         */
+  SCIFTXI2_IRQn        = 232,       /*!< SCIF Interrupt         */
+  SCIFBRI3_IRQn        = 233,       /*!< SCIF Interrupt         */
+  SCIFERI3_IRQn        = 234,       /*!< SCIF Interrupt         */
+  SCIFRXI3_IRQn        = 235,       /*!< SCIF Interrupt         */
+  SCIFTXI3_IRQn        = 236,       /*!< SCIF Interrupt         */
+  SCIFBRI4_IRQn        = 237,       /*!< SCIF Interrupt         */
+  SCIFERI4_IRQn        = 238,       /*!< SCIF Interrupt         */
+  SCIFRXI4_IRQn        = 239,       /*!< SCIF Interrupt         */
+  SCIFTXI4_IRQn        = 240,       /*!< SCIF Interrupt         */
+  SCIFBRI5_IRQn        = 241,       /*!< SCIF Interrupt         */
+  SCIFERI5_IRQn        = 242,       /*!< SCIF Interrupt         */
+  SCIFRXI5_IRQn        = 243,       /*!< SCIF Interrupt         */
+  SCIFTXI5_IRQn        = 244,       /*!< SCIF Interrupt         */
+  SCIFBRI6_IRQn        = 245,       /*!< SCIF Interrupt         */
+  SCIFERI6_IRQn        = 246,       /*!< SCIF Interrupt         */
+  SCIFRXI6_IRQn        = 247,       /*!< SCIF Interrupt         */
+  SCIFTXI6_IRQn        = 248,       /*!< SCIF Interrupt         */
+  SCIFBRI7_IRQn        = 249,       /*!< SCIF Interrupt         */
+  SCIFERI7_IRQn        = 250,       /*!< SCIF Interrupt         */
+  SCIFRXI7_IRQn        = 251,       /*!< SCIF Interrupt         */
+  SCIFTXI7_IRQn        = 252,       /*!< SCIF Interrupt         */
+
+  INTRCANGERR_IRQn     = 253,
+  INTRCANGRECC_IRQn    = 254,
+  INTRCAN0REC_IRQn     = 255,
+  INTRCAN0ERR_IRQn     = 256,
+  INTRCAN0TRX_IRQn     = 257,
+  INTRCAN1REC_IRQn     = 258,
+  INTRCAN1ERR_IRQn     = 259,
+  INTRCAN1TRX_IRQn     = 260,
+  INTRCAN2REC_IRQn     = 261,
+  INTRCAN2ERR_IRQn     = 262,
+  INTRCAN2TRX_IRQn     = 263,
+  INTRCAN3REC_IRQn     = 264,
+  INTRCAN3ERR_IRQn     = 265,
+  INTRCAN3TRX_IRQn     = 266,
+  INTRCAN4REC_IRQn     = 267,
+  INTRCAN4ERR_IRQn     = 268,
+  INTRCAN4TRX_IRQn     = 269,
+
+  RSPISPEI0_IRQn       = 270,       /*!< RSPI Interrupt         */
+  RSPISPRI0_IRQn       = 271,       /*!< RSPI Interrupt         */
+  RSPISPTI0_IRQn       = 272,       /*!< RSPI Interrupt         */
+  RSPISPEI1_IRQn       = 273,       /*!< RSPI Interrupt         */
+  RSPISPRI1_IRQn       = 274,       /*!< RSPI Interrupt         */
+  RSPISPTI1_IRQn       = 275,       /*!< RSPI Interrupt         */
+  RSPISPEI2_IRQn       = 276,       /*!< RSPI Interrupt         */
+  RSPISPRI2_IRQn       = 277,       /*!< RSPI Interrupt         */
+  RSPISPTI2_IRQn       = 278,       /*!< RSPI Interrupt         */
+  RSPISPEI3_IRQn       = 279,       /*!< RSPI Interrupt         */
+  RSPISPRI3_IRQn       = 280,       /*!< RSPI Interrupt         */
+  RSPISPTI3_IRQn       = 281,       /*!< RSPI Interrupt         */
+  RSPISPEI4_IRQn       = 282,       /*!< RSPI Interrupt         */
+  RSPISPRI4_IRQn       = 283,       /*!< RSPI Interrupt         */
+  RSPISPTI4_IRQn       = 284,       /*!< RSPI Interrupt         */
+
+  IEBBTD_IRQn          = 285,
+  IEBBTERR_IRQn        = 286,
+  IEBBTSTA_IRQn        = 287,
+  IEBBTV_IRQn          = 288,
+
+  ISY_IRQn             = 289,
+  IERR_IRQn            = 290,
+  ITARG_IRQn           = 291,
+  ISEC_IRQn            = 292,
+  IBUF_IRQn            = 293,
+  IREADY_IRQn          = 294,
+
+  STERB_IRQn           = 295,
+  FLTENDI_IRQn         = 296,
+  FLTREQ0I_IRQn        = 297,
+  FLTREQ1I_IRQn        = 298,
+
+  MMC0_IRQn            = 299,
+  MMC1_IRQn            = 300,
+  MMC2_IRQn            = 301,
+
+  SCHI0_3_IRQn         = 302,
+  SDHI0_0_IRQn         = 303,
+  SDHI0_1_IRQn         = 304,
+  SCHI1_3_IRQn         = 305,
+  SDHI1_0_IRQn         = 306,
+  SDHI1_1_IRQn         = 307,
+
+  ARM_IRQn             = 308,
+  PRD_IRQn             = 309,
+  CUP_IRQn             = 310,
+
+  SCUAI0_IRQn          = 311,
+  SCUAI1_IRQn          = 312,
+  SCUFDI0_IRQn         = 313,
+  SCUFDI1_IRQn         = 314,
+  SCUFDI2_IRQn         = 315,
+  SCUFDI3_IRQn         = 316,
+  SCUFUI0_IRQn         = 317,
+  SCUFUI1_IRQn         = 318,
+  SCUFUI2_IRQn         = 319,
+  SCUFUI3_IRQn         = 320,
+  SCUDVI0_IRQn         = 321,
+  SCUDVI1_IRQn         = 322,
+  SCUDVI2_IRQn         = 323,
+  SCUDVI3_IRQn         = 324,
+
+  MLB_CINT_IRQn        = 325,
+  MLB_SINT_IRQn        = 326,
+
+  DRC10_IRQn           = 327,
+  DRC11_IRQn           = 328,
+
+  /* 329-330 Reserved  */
+
+  LINI0_INT_T_IRQn     = 331,
+  LINI0_INT_R_IRQn     = 332,
+  LINI0_INT_S_IRQn     = 333,
+  LINI0_INT_M_IRQn     = 334,
+  LINI1_INT_T_IRQn     = 335,
+  LINI1_INT_R_IRQn     = 336,
+  LINI1_INT_S_IRQn     = 337,
+  LINI1_INT_M_IRQn     = 338,
+
+  /* 339-346 Reserved */
+
+  SCIERI0_IRQn         = 347,
+  SCIRXI0_IRQn         = 348,
+  SCITXI0_IRQn         = 349,
+  SCITEI0_IRQn         = 350,
+  SCIERI1_IRQn         = 351,
+  SCIRXI1_IRQn         = 352,
+  SCITXI1_IRQn         = 353,
+  SCITEI1_IRQn         = 354,
+
+  AVBI_DATA            = 355,
+  AVBI_ERROR           = 356,
+  AVBI_MANAGE          = 357,
+  AVBI_MAC             = 358,
+
+  ETHERI_IRQn          = 359,
+
+  /* 360-363 Reserved */
+
+  CEUI_IRQn            = 364,
+
+  /* 365-380 Reserved */
+
+
+  H2XMLB_ERRINT_IRQn   = 381,
+  H2XIC1_ERRINT_IRQn   = 382,
+  X2HPERI1_ERRINT_IRQn = 383,
+  X2HPERR2_ERRINT_IRQn = 384,
+  X2HPERR34_ERRINT_IRQn= 385,
+  X2HPERR5_ERRINT_IRQn = 386,
+  X2HPERR67_ERRINT_IRQn= 387,
+  X2HDBGR_ERRINT_IRQn  = 388,
+  X2HBSC_ERRINT_IRQn   = 389,   
+  X2HSPI1_ERRINT_IRQn  = 390,   
+  X2HSPI2_ERRINT_IRQn  = 391,   
+  PRRI_IRQn            = 392,
+
+  IFEI0_IRQn           = 393,
+  OFFI0_IRQn           = 394,
+  PFVEI0_IRQn          = 395,
+  IFEI1_IRQn           = 396,
+  OFFI1_IRQn           = 397,
+  PFVEI1_IRQn          = 398,
+
+  /* 399-415 Reserved */
+  TINT0_IRQn           = 416,
+  TINT1_IRQn           = 417,
+  TINT2_IRQn           = 418,
+  TINT3_IRQn           = 419,
+  TINT4_IRQn           = 420,
+  TINT5_IRQn           = 421,
+  TINT6_IRQn           = 422,
+  TINT7_IRQn           = 423,
+  TINT8_IRQn           = 424,
+  TINT9_IRQn           = 425,
+  TINT10_IRQn          = 426,
+  TINT11_IRQn          = 427,
+  TINT12_IRQn          = 428,
+  TINT13_IRQn          = 429,
+  TINT14_IRQn          = 430,
+  TINT15_IRQn          = 431,
+  TINT16_IRQn          = 432,
+  TINT17_IRQn          = 433,
+  TINT18_IRQn          = 434,
+  TINT19_IRQn          = 435,
+  TINT20_IRQn          = 436,
+  TINT21_IRQn          = 437,
+  TINT22_IRQn          = 438,
+  TINT23_IRQn          = 439,
+  TINT24_IRQn          = 440,
+  TINT25_IRQn          = 441,
+  TINT26_IRQn          = 442,
+  TINT27_IRQn          = 443,
+  TINT28_IRQn          = 444,
+  TINT29_IRQn          = 445,
+  TINT30_IRQn          = 446,
+  TINT31_IRQn          = 447,
+  TINT32_IRQn          = 448,
+  TINT33_IRQn          = 449,
+  TINT34_IRQn          = 450,
+  TINT35_IRQn          = 451,
+  TINT36_IRQn          = 452,
+  TINT37_IRQn          = 453,
+  TINT38_IRQn          = 454,
+  TINT39_IRQn          = 455,
+  TINT40_IRQn          = 456,
+  TINT41_IRQn          = 457,
+  TINT42_IRQn          = 458,
+  TINT43_IRQn          = 459,
+  TINT44_IRQn          = 460,
+  TINT45_IRQn          = 461,
+  TINT46_IRQn          = 462,
+  TINT47_IRQn          = 463,
+  TINT48_IRQn          = 464,
+  TINT49_IRQn          = 465,
+  TINT50_IRQn          = 466,
+  TINT51_IRQn          = 467,
+  TINT52_IRQn          = 468,
+  TINT53_IRQn          = 469,
+  TINT54_IRQn          = 470,
+  TINT55_IRQn          = 471,
+  TINT56_IRQn          = 472,
+  TINT57_IRQn          = 473,
+  TINT58_IRQn          = 474,
+  TINT59_IRQn          = 475,
+  TINT60_IRQn          = 476,
+  TINT61_IRQn          = 477,
+  TINT62_IRQn          = 478,
+  TINT63_IRQn          = 479,
+  TINT64_IRQn          = 480,
+  TINT65_IRQn          = 481,
+  TINT66_IRQn          = 482,
+  TINT67_IRQn          = 483,
+  TINT68_IRQn          = 484,
+  TINT69_IRQn          = 485,
+  TINT70_IRQn          = 486,
+  TINT71_IRQn          = 487,
+  TINT72_IRQn          = 488,
+  TINT73_IRQn          = 489,
+  TINT74_IRQn          = 490,
+  TINT75_IRQn          = 491,
+  TINT76_IRQn          = 492,
+  TINT77_IRQn          = 493,
+  TINT78_IRQn          = 494,
+  TINT79_IRQn          = 495,
+  TINT80_IRQn          = 496,
+  TINT81_IRQn          = 497,
+  TINT82_IRQn          = 498,
+  TINT83_IRQn          = 499,
+  TINT84_IRQn          = 500,
+  TINT85_IRQn          = 501,
+  TINT86_IRQn          = 502,
+  TINT87_IRQn          = 503,
+  TINT88_IRQn          = 504,
+  TINT89_IRQn          = 505,
+  TINT90_IRQn          = 506,
+  TINT91_IRQn          = 507,
+  TINT92_IRQn          = 508,
+  TINT93_IRQn          = 509,
+  TINT94_IRQn          = 510,
+  TINT95_IRQn          = 511,
+  TINT96_IRQn          = 512,
+  TINT97_IRQn          = 513,
+  TINT98_IRQn          = 514,
+  TINT99_IRQn          = 515,
+  TINT100_IRQn         = 516,
+  TINT101_IRQn         = 517,
+  TINT102_IRQn         = 518,
+  TINT103_IRQn         = 519,
+  TINT104_IRQn         = 520,
+  TINT105_IRQn         = 521,
+  TINT106_IRQn         = 522,
+  TINT107_IRQn         = 523,
+  TINT108_IRQn         = 524,
+  TINT109_IRQn         = 525,
+  TINT110_IRQn         = 526,
+  TINT111_IRQn         = 527,
+  TINT112_IRQn         = 528,
+  TINT113_IRQn         = 529,
+  TINT114_IRQn         = 530,
+  TINT115_IRQn         = 531,
+  TINT116_IRQn         = 532,
+  TINT117_IRQn         = 533,
+  TINT118_IRQn         = 534,
+  TINT119_IRQn         = 535,
+  TINT120_IRQn         = 536,
+  TINT121_IRQn         = 537,
+  TINT122_IRQn         = 538,
+  TINT123_IRQn         = 539,
+  TINT124_IRQn         = 540,
+  TINT125_IRQn         = 541,
+  TINT126_IRQn         = 542,
+  TINT127_IRQn         = 543,
+  TINT128_IRQn         = 544,
+  TINT129_IRQn         = 545,
+  TINT130_IRQn         = 546,
+  TINT131_IRQn         = 547,
+  TINT132_IRQn         = 548,
+  TINT133_IRQn         = 549,
+  TINT134_IRQn         = 550,
+  TINT135_IRQn         = 551,
+  TINT136_IRQn         = 552,
+  TINT137_IRQn         = 553,
+  TINT138_IRQn         = 554,
+  TINT139_IRQn         = 555,
+  TINT140_IRQn         = 556,
+  TINT141_IRQn         = 557,
+  TINT142_IRQn         = 558,
+  TINT143_IRQn         = 559,
+  TINT144_IRQn         = 560,
+  TINT145_IRQn         = 561,
+  TINT146_IRQn         = 562,
+  TINT147_IRQn         = 563,
+  TINT148_IRQn         = 564,
+  TINT149_IRQn         = 565,
+  TINT150_IRQn         = 566,
+  TINT151_IRQn         = 567,
+  TINT152_IRQn         = 568,
+  TINT153_IRQn         = 569,
+  TINT154_IRQn         = 570,
+  TINT155_IRQn         = 571,
+  TINT156_IRQn         = 572,
+  TINT157_IRQn         = 573,
+  TINT158_IRQn         = 574,
+  TINT159_IRQn         = 575,
+  TINT160_IRQn         = 576,
+  TINT161_IRQn         = 577,
+  TINT162_IRQn         = 578,
+  TINT163_IRQn         = 579,
+  TINT164_IRQn         = 580,
+  TINT165_IRQn         = 581,
+  TINT166_IRQn         = 582,
+  TINT167_IRQn         = 583,
+  TINT168_IRQn         = 584,
+  TINT169_IRQn         = 585,
+  TINT170_IRQn         = 586
+
+} IRQn_Type;
+
+#define Renesas_RZ_A1_IRQ_MAX  TINT170_IRQn
+
+/* --------  Configuration of the Cortex-A9 Processor and Core Peripherals  ------- */
+#define __CA9_REV                 0x0000    /*!< Core revision r0                                */
+
+#define __MPU_PRESENT             1         /*!< MPU present or not                               */
+
+#define __FPU_PRESENT             1         /*!< FPU present or not                               */
+
+#define __NVIC_PRIO_BITS          5         /*!< Number of Bits used for Priority Levels          */
+#define __Vendor_SysTickConfig    0         /*!< Set to 1 if different SysTick Config is used     */
+
+#include <core_ca9.h>
+#include "system_MBRZA1H.h"
+
+
+/******************************************************************************/
+/*                Device Specific Peripheral Section                          */
+/******************************************************************************/
+/** @addtogroup Renesas_RZ_A1_Peripherals Renesas_RZ_A1 Peripherals
+  Renesas_RZ_A1 Device Specific Peripheral registers structures
+  @{
+*/
+
+#if defined ( __CC_ARM   )
+#pragma anon_unions
+#endif
+
+#include "pl310.h"
+#include "gic.h"
+#include "nvic_wrapper.h"
+#include "cmsis_nvic.h"
+
+#include "ostm_iodefine.h"
+#include "gpio_iodefine.h"
+#include "cpg_iodefine.h"
+#include "l2c_iodefine.h"
+
+#if defined ( __CC_ARM   )
+#pragma no_anon_unions
+#endif
+
+/*@}*/ /* end of group Renesas_RZ_A1_Peripherals */
+
+
+/******************************************************************************/
+/*                         Peripheral memory map                              */
+/******************************************************************************/
+/** @addtogroup Renesas_RZ_A1_MemoryMap Renesas_RZ_A1 Memory Mapping
+  @{
+*/
+
+/* R7S72100 CPU board  */
+#define Renesas_RZ_A1_NORFLASH_BASE0               (0x00000000UL)                        /*!< (FLASH0    ) Base Address */
+#define Renesas_RZ_A1_NORFLASH_BASE1               (0x04000000UL)                        /*!< (FLASH1    ) Base Address */
+#define Renesas_RZ_A1_SDRAM_BASE0                  (0x08000000UL)                        /*!< (SDRAM0    ) Base Address */
+#define Renesas_RZ_A1_SDRAM_BASE1                  (0x0C000000UL)                        /*!< (SDRAM1    ) Base Address */
+#define Renesas_RZ_A1_USER_AREA0                   (0x10000000UL)                        /*!< (USER0     ) Base Address */
+#define Renesas_RZ_A1_USER_AREA1                   (0x14000000UL)                        /*!< (USER1     ) Base Address */
+#define Renesas_RZ_A1_SPI_IO0                      (0x18000000UL)                        /*!< (SPI_IO0   ) Base Address */
+#define Renesas_RZ_A1_SPI_IO1                      (0x1C000000UL)                        /*!< (SPI_IO1   ) Base Address */
+#define Renesas_RZ_A1_ONCHIP_SRAM_BASE             (0x20000000UL)                        /*!< (SRAM_OC   ) Base Address */
+#define Renesas_RZ_A1_SPI_MIO_BASE                 (0x3fe00000UL)                        /*!< (SPI_MIO   ) Base Address */
+#define Renesas_RZ_A1_BSC_BASE                     (0x3ff00000UL)                        /*!< (BSC       ) Base Address */
+#define Renesas_RZ_A1_PERIPH_BASE0                 (0xe8000000UL)                        /*!< (PERIPH0   ) Base Address */
+#define Renesas_RZ_A1_PERIPH_BASE1                 (0xfcf00000UL)                        /*!< (PERIPH1   ) Base Address */
+#define Renesas_RZ_A1_GIC_DISTRIBUTOR_BASE         (0xe8201000UL)                        /*!< (GIC DIST  ) Base Address */
+#define Renesas_RZ_A1_GIC_INTERFACE_BASE           (0xe8202000UL)                        /*!< (GIC CPU IF) Base Address */
+#define Renesas_RZ_A1_PL310_BASE                   (0x3ffff000UL)                        /*!< (PL310     ) Base Address */
+#define Renesas_RZ_A1_ONCHIP_SRAM_NC_BASE          (0x60000000UL)                        /*!< (SRAM_OC   ) Base Address */
+
+//Following macros define the descriptors and attributes used to define the Renesas_RZ_A1 MMU flat-map
+//Sect_Normal. Outer & inner wb/wa, non-shareable, executable, rw, domain 0.
+#define section_normal(descriptor_l1, region)     region.rg_t = SECTION; \
+                                   region.domain = 0x0; \
+                                   region.e_t = ECC_DISABLED; \
+                                   region.g_t = GLOBAL; \
+                                   region.inner_norm_t = WB_WA; \
+                                   region.outer_norm_t = WB_WA; \
+                                   region.mem_t = NORMAL; \
+                                   region.sec_t = NON_SECURE; \
+                                   region.xn_t = EXECUTE; \
+                                   region.priv_t = RW; \
+                                   region.user_t = RW; \
+                                   region.sh_t = NON_SHARED; \
+                                   __get_section_descriptor(&descriptor_l1, region);
+
+#define section_normal_nc(descriptor_l1, region)     region.rg_t = SECTION; \
+                                   region.domain = 0x0; \
+                                   region.e_t = ECC_DISABLED; \
+                                   region.g_t = GLOBAL; \
+                                   region.inner_norm_t = NON_CACHEABLE; \
+                                   region.outer_norm_t = NON_CACHEABLE; \
+                                   region.mem_t = NORMAL; \
+                                   region.sec_t = SECURE; \
+                                   region.xn_t = EXECUTE; \
+                                   region.priv_t = RW; \
+                                   region.user_t = RW; \
+                                   region.sh_t = NON_SHARED; \
+                                   __get_section_descriptor(&descriptor_l1, region);
+
+//Sect_Normal_Cod. Outer & inner wb/wa, non-shareable, executable, ro, domain 0.
+#define section_normal_cod(descriptor_l1, region) region.rg_t = SECTION; \
+                                   region.domain = 0x0; \
+                                   region.e_t = ECC_DISABLED; \
+                                   region.g_t = GLOBAL; \
+                                   region.inner_norm_t = WB_WA; \
+                                   region.outer_norm_t = WB_WA; \
+                                   region.mem_t = NORMAL; \
+                                   region.sec_t = NON_SECURE; \
+                                   region.xn_t = EXECUTE; \
+                                   region.priv_t = READ; \
+                                   region.user_t = READ; \
+                                   region.sh_t = NON_SHARED; \
+                                   __get_section_descriptor(&descriptor_l1, region);
+
+//Sect_Normal_RO. Sect_Normal_Cod, but not executable
+#define section_normal_ro(descriptor_l1, region)  region.rg_t = SECTION; \
+                                   region.domain = 0x0; \
+                                   region.e_t = ECC_DISABLED; \
+                                   region.g_t = GLOBAL; \
+                                   region.inner_norm_t = WB_WA; \
+                                   region.outer_norm_t = WB_WA; \
+                                   region.mem_t = NORMAL; \
+                                   region.sec_t = NON_SECURE; \
+                                   region.xn_t = NON_EXECUTE; \
+                                   region.priv_t = READ; \
+                                   region.user_t = READ; \
+                                   region.sh_t = NON_SHARED; \
+                                   __get_section_descriptor(&descriptor_l1, region);
+
+//Sect_Normal_RW. Sect_Normal_Cod, but writeable and not executable
+#define section_normal_rw(descriptor_l1, region) region.rg_t = SECTION; \
+                                   region.domain = 0x0; \
+                                   region.e_t = ECC_DISABLED; \
+                                   region.g_t = GLOBAL; \
+                                   region.inner_norm_t = WB_WA; \
+                                   region.outer_norm_t = WB_WA; \
+                                   region.mem_t = NORMAL; \
+                                   region.sec_t = NON_SECURE; \
+                                   region.xn_t = NON_EXECUTE; \
+                                   region.priv_t = RW; \
+                                   region.user_t = RW; \
+                                   region.sh_t = NON_SHARED; \
+                                   __get_section_descriptor(&descriptor_l1, region);
+//Sect_SO. Strongly-ordered (therefore shareable), not executable, rw, domain 0, base addr 0
+#define section_so(descriptor_l1, region) region.rg_t = SECTION; \
+                                   region.domain = 0x0; \
+                                   region.e_t = ECC_DISABLED; \
+                                   region.g_t = GLOBAL; \
+                                   region.inner_norm_t = NON_CACHEABLE; \
+                                   region.outer_norm_t = NON_CACHEABLE; \
+                                   region.mem_t = STRONGLY_ORDERED; \
+                                   region.sec_t = SECURE; \
+                                   region.xn_t = NON_EXECUTE; \
+                                   region.priv_t = RW; \
+                                   region.user_t = RW; \
+                                   region.sh_t = NON_SHARED; \
+                                   __get_section_descriptor(&descriptor_l1, region);
+
+//Sect_Device_RO. Device, non-shareable, non-executable, ro, domain 0, base addr 0
+#define section_device_ro(descriptor_l1, region) region.rg_t = SECTION; \
+                                   region.domain = 0x0; \
+                                   region.e_t = ECC_DISABLED; \
+                                   region.g_t = GLOBAL; \
+                                   region.inner_norm_t = NON_CACHEABLE; \
+                                   region.outer_norm_t = NON_CACHEABLE; \
+                                   region.mem_t = STRONGLY_ORDERED; \
+                                   region.sec_t = SECURE; \
+                                   region.xn_t = NON_EXECUTE; \
+                                   region.priv_t = READ; \
+                                   region.user_t = READ; \
+                                   region.sh_t = NON_SHARED; \
+                                   __get_section_descriptor(&descriptor_l1, region);
+
+//Sect_Device_RW. Sect_Device_RO, but writeable
+#define section_device_rw(descriptor_l1, region) region.rg_t = SECTION; \
+                                   region.domain = 0x0; \
+                                   region.e_t = ECC_DISABLED; \
+                                   region.g_t = GLOBAL; \
+                                   region.inner_norm_t = NON_CACHEABLE; \
+                                   region.outer_norm_t = NON_CACHEABLE; \
+                                   region.mem_t = STRONGLY_ORDERED; \
+                                   region.sec_t = SECURE; \
+                                   region.xn_t = NON_EXECUTE; \
+                                   region.priv_t = RW; \
+                                   region.user_t = RW; \
+                                   region.sh_t = NON_SHARED; \
+                                   __get_section_descriptor(&descriptor_l1, region);
+//Page_4k_Device_RW.  Shared device, not executable, rw, domain 0
+#define page4k_device_rw(descriptor_l1, descriptor_l2, region) region.rg_t = PAGE_4k; \
+                                   region.domain = 0x0; \
+                                   region.e_t = ECC_DISABLED; \
+                                   region.g_t = GLOBAL; \
+                                   region.inner_norm_t = NON_CACHEABLE; \
+                                   region.outer_norm_t = NON_CACHEABLE; \
+                                   region.mem_t = SHARED_DEVICE; \
+                                   region.sec_t = SECURE; \
+                                   region.xn_t = NON_EXECUTE; \
+                                   region.priv_t = RW; \
+                                   region.user_t = RW; \
+                                   region.sh_t = NON_SHARED; \
+                                   __get_page_descriptor(&descriptor_l1, &descriptor_l2, region);
+
+//Page_64k_Device_RW.  Shared device, not executable, rw, domain 0
+#define page64k_device_rw(descriptor_l1, descriptor_l2, region)  region.rg_t = PAGE_64k; \
+                                   region.domain = 0x0; \
+                                   region.e_t = ECC_DISABLED; \
+                                   region.g_t = GLOBAL; \
+                                   region.inner_norm_t = NON_CACHEABLE; \
+                                   region.outer_norm_t = NON_CACHEABLE; \
+                                   region.mem_t = SHARED_DEVICE; \
+                                   region.sec_t = SECURE; \
+                                   region.xn_t = NON_EXECUTE; \
+                                   region.priv_t = RW; \
+                                   region.user_t = RW; \
+                                   region.sh_t = NON_SHARED; \
+                                   __get_page_descriptor(&descriptor_l1, &descriptor_l2, region);
+
+/*@}*/ /* end of group Renesas_RZ_A1_MemoryMap */
+
+/******************************************************************************/
+/*                         Clock Settings                                     */
+/******************************************************************************/
+/** @addtogroup Renesas_RZ_A1_H_Clocks Renesas_RZ_A1 Clock definitions
+  @{
+*/
+
+/*
+ * Clock Mode 0 settings
+ * SW1-4(MD_CLK):ON
+ * SW1-5(MD_CLKS):ON
+ * FRQCR=0x1035
+ *   CLKEN2    = 0b - unstable
+ *   CLKEN[1:0]=01b - Output, Low, Low
+ *   IFC[1:0]  =00b - CPU clock is 1/1 PLL clock
+ * FRQCR2=0x0001
+ *   GFC[1:0]  =01b - Graphic clock is 2/3 bus clock
+ */
+#define CM0_RENESAS_RZ_A1_CLKIN  ( 13333333u)
+#define CM0_RENESAS_RZ_A1_CLKO   ( 66666666u)
+#define CM0_RENESAS_RZ_A1_I_CLK  (400000000u)
+#define CM0_RENESAS_RZ_A1_G_CLK  (266666666u)
+#define CM0_RENESAS_RZ_A1_B_CLK  (133333333u)
+#define CM0_RENESAS_RZ_A1_P1_CLK ( 66666666u)
+#define CM0_RENESAS_RZ_A1_P0_CLK ( 33333333u)
+
+/*
+ * Clock Mode 1 settings
+ * SW1-4(MD_CLK):OFF
+ * SW1-5(MD_CLKS):ON
+ * FRQCR=0x1335
+ *   CLKEN2    = 0b - unstable
+ *   CLKEN[1:0]=01b - Output, Low, Low
+ *   IFC[1:0]  =11b - CPU clock is 1/3 PLL clock
+ * FRQCR2=0x0003
+ *   GFC[1:0]  =11b - graphic clock is 1/3 bus clock
+ */
+#define CM1_RENESAS_RZ_A1_CLKIN  ( 48000000u)
+#define CM1_RENESAS_RZ_A1_CLKO   ( 64000000u)
+#define CM1_RENESAS_RZ_A1_I_CLK  (128000000u)
+#define CM1_RENESAS_RZ_A1_G_CLK  (128000000u)
+#define CM1_RENESAS_RZ_A1_B_CLK  (128000000u)
+#define CM1_RENESAS_RZ_A1_P1_CLK ( 64000000u)
+#define CM1_RENESAS_RZ_A1_P0_CLK ( 32000000u)
+
+/*@}*/ /* end of group Renesas_RZ_A1_Clocks */
+
+/******************************************************************************/
+/*                         CPG   Settings                                     */
+/******************************************************************************/
+/** @addtogroup Renesas_RZ_A1_H_CPG Renesas_RZ_A1 CPG Bit definitions
+  @{
+*/
+
+#define CPG_FRQCR_SHIFT_CKOEN2  (14)
+#define CPG_FRQCR_BIT_CKOEN2    (0x1 << CPG_FRQCR_SHIFT_CKOEN2)
+#define CPG_FRQCR_SHIFT_CKOEN0  (12)
+#define CPG_FRQCR_BITS_CKOEN0   (0x3 << CPG_FRQCR_SHIFT_CKOEN0)
+#define CPG_FRQCR_SHIFT_IFC     (8)
+#define CPG_FRQCR_BITS_IFC      (0x3 << CPG_FRQCR_SHIFT_IFC)
+
+#define CPG_FRQCR2_SHIFT_GFC    (0)
+#define CPG_FRQCR2_BITS_GFC     (0x3 << CPG_FRQCR2_SHIFT_GFC)
+
+
+#define CPG_STBCR1_BIT_STBY     (0x80u)
+#define CPG_STBCR1_BIT_DEEP     (0x40u)
+#define CPG_STBCR2_BIT_HIZ      (0x80u)
+#define CPG_STBCR2_BIT_MSTP20   (0x01u) /* CoreSight */
+#define CPG_STBCR3_BIT_MSTP37   (0x80u) /* IEBus */
+#define CPG_STBCR3_BIT_MSTP36   (0x40u) /* IrDA */
+#define CPG_STBCR3_BIT_MSTP35   (0x20u) /* LIN0 */
+#define CPG_STBCR3_BIT_MSTP34   (0x10u) /* LIN1 */
+#define CPG_STBCR3_BIT_MSTP33   (0x08u) /* Multi-Function Timer */
+#define CPG_STBCR3_BIT_MSTP32   (0x04u) /* CAN */
+#define CPG_STBCR3_BIT_MSTP30   (0x01u) /* Motor Control PWM Timer */
+#define CPG_STBCR4_BIT_MSTP47   (0x80u) /* SCIF0 */
+#define CPG_STBCR4_BIT_MSTP46   (0x40u) /* SCIF1 */
+#define CPG_STBCR4_BIT_MSTP45   (0x20u) /* SCIF2 */
+#define CPG_STBCR4_BIT_MSTP44   (0x10u) /* SCIF3 */
+#define CPG_STBCR4_BIT_MSTP43   (0x08u) /* SCIF4 */
+#define CPG_STBCR4_BIT_MSTP42   (0x04u) /* SCIF5 */
+#define CPG_STBCR4_BIT_MSTP41   (0x02u) /* SCIF6 */
+#define CPG_STBCR4_BIT_MSTP40   (0x01u) /* SCIF7 */
+#define CPG_STBCR5_BIT_MSTP57   (0x80u) /* SCI0 */
+#define CPG_STBCR5_BIT_MSTP56   (0x40u) /* SCI1 */
+#define CPG_STBCR5_BIT_MSTP55   (0x20u) /* Sound Generator0 */
+#define CPG_STBCR5_BIT_MSTP54   (0x10u) /* Sound Generator1 */
+#define CPG_STBCR5_BIT_MSTP53   (0x08u) /* Sound Generator2 */
+#define CPG_STBCR5_BIT_MSTP52   (0x04u) /* Sound Generator3 */
+#define CPG_STBCR5_BIT_MSTP51   (0x02u) /* OSTM0 */
+#define CPG_STBCR5_BIT_MSTP50   (0x01u) /* OSTM1 */
+#define CPG_STBCR6_BIT_MSTP67   (0x80u) /* General A/D Comvertor */
+#define CPG_STBCR6_BIT_MSTP66   (0x40u) /* Capture Engine */
+#define CPG_STBCR6_BIT_MSTP65   (0x20u) /* Display out comparison0 */
+#define CPG_STBCR6_BIT_MSTP64   (0x10u) /* Display out comparison1 */   
+#define CPG_STBCR6_BIT_MSTP63   (0x08u) /* Dynamic Range Compalator0 */
+#define CPG_STBCR6_BIT_MSTP62   (0x04u) /* Dynamic Range Compalator1 */
+#define CPG_STBCR6_BIT_MSTP61   (0x02u) /* JPEG Decoder */
+#define CPG_STBCR6_BIT_MSTP60   (0x01u) /* Realtime Clock */
+#define CPG_STBCR7_BIT_MSTP77   (0x80u) /* Video Decoder0 */
+#define CPG_STBCR7_BIT_MSTP76   (0x40u) /* Video Decoder1 */
+#define CPG_STBCR7_BIT_MSTP74   (0x10u) /* Ether */
+#define CPG_STBCR7_BIT_MSTP73   (0x04u) /* NAND Flash Memory Controller */
+#define CPG_STBCR7_BIT_MSTP71   (0x02u) /* USB0 */
+#define CPG_STBCR7_BIT_MSTP70   (0x01u) /* USB1 */
+#define CPG_STBCR8_BIT_MSTP87   (0x80u) /* IMR-LS2_0 */
+#define CPG_STBCR8_BIT_MSTP86   (0x40u) /* IMR-LS2_1 */
+#define CPG_STBCR8_BIT_MSTP85   (0x20u) /* IMR-LSD */
+#define CPG_STBCR8_BIT_MSTP84   (0x10u) /* MMC Host Interface */
+#define CPG_STBCR8_BIT_MSTP83   (0x08u) /* MediaLB */
+#define CPG_STBCR8_BIT_MSTP81   (0x02u) /* SCUX */
+#define CPG_STBCR9_BIT_MSTP97   (0x80u) /* RIIC0 */
+#define CPG_STBCR9_BIT_MSTP96   (0x40u) /* RIIC1 */
+#define CPG_STBCR9_BIT_MSTP95   (0x20u) /* RIIC2 */
+#define CPG_STBCR9_BIT_MSTP94   (0x10u) /* RIIC3 */
+#define CPG_STBCR9_BIT_MSTP93   (0x08u) /* SPI Multi I/O Bus Controller0 */
+#define CPG_STBCR9_BIT_MSTP92   (0x04u) /* SPI Multi I/O Bus Controller1 */
+#define CPG_STBCR9_BIT_MSTP91   (0x02u) /* VDC5_0 */
+#define CPG_STBCR9_BIT_MSTP90   (0x01u) /* VDC5_1 */
+#define CPG_STBCR10_BIT_MSTP107 (0x80u) /* RSPI0 */
+#define CPG_STBCR10_BIT_MSTP106 (0x40u) /* RSPI1 */
+#define CPG_STBCR10_BIT_MSTP105 (0x20u) /* RSPI2 */
+#define CPG_STBCR10_BIT_MSTP104 (0x10u) /* RSPI3 */
+#define CPG_STBCR10_BIT_MSTP103 (0x08u) /* RSPI4 */
+#define CPG_STBCR10_BIT_MSTP102 (0x04u) /* ROMDEC */
+#define CPG_STBCR10_BIT_MSTP101 (0x02u) /* SPIDF */
+#define CPG_STBCR10_BIT_MSTP100 (0x01u) /* OpenVG */
+#define CPG_STBCR11_BIT_MSTP115 (0x20u) /* SSIF0 */
+#define CPG_STBCR11_BIT_MSTP114 (0x10u) /* SSIF1 */
+#define CPG_STBCR11_BIT_MSTP113 (0x08u) /* SSIF2 */
+#define CPG_STBCR11_BIT_MSTP112 (0x04u) /* SSIF3 */
+#define CPG_STBCR11_BIT_MSTP111 (0x02u) /* SSIF4 */
+#define CPG_STBCR11_BIT_MSTP110 (0x01u) /* SSIF5 */
+#define CPG_STBCR12_BIT_MSTP123 (0x08u) /* SD Host Interface00 */
+#define CPG_STBCR12_BIT_MSTP122 (0x04u) /* SD Host Interface01 */
+#define CPG_STBCR12_BIT_MSTP121 (0x02u) /* SD Host Interface10 */
+#define CPG_STBCR12_BIT_MSTP120 (0x01u) /* SD Host Interface11 */
+#define CPG_CSTBCR1_BIT_CMSTP11 (0x02u) /* PFV */
+#define CPG_SWRSTCR1_BIT_AXTALE (0x80u) /* AUDIO_X1 */
+#define CPG_SWRSTCR1_BIT_SRST16 (0x40u) /* SSIF0 */
+#define CPG_SWRSTCR1_BIT_SRST15 (0x20u) /* SSIF1 */
+#define CPG_SWRSTCR1_BIT_SRST14 (0x10u) /* SSIF2 */
+#define CPG_SWRSTCR1_BIT_SRST13 (0x08u) /* SSIF3 */
+#define CPG_SWRSTCR1_BIT_SRST12 (0x04u) /* SSIF4 */
+#define CPG_SWRSTCR1_BIT_SRST11 (0x02u) /* SSIF5 */
+#define CPG_SWRSTCR2_BIT_SRST27 (0x80u) /* Display out comparison0 */
+#define CPG_SWRSTCR2_BIT_SRST26 (0x40u) /* Display out comparison1 */
+#define CPG_SWRSTCR2_BIT_SRST25 (0x20u) /* Dynamic Range Compalator0 */
+#define CPG_SWRSTCR2_BIT_SRST24 (0x10u) /* Dynamic Range Compalator1 */
+#define CPG_SWRSTCR2_BIT_SRST23 (0x08u) /* VDC5_0 */
+#define CPG_SWRSTCR2_BIT_SRST22 (0x04u) /* VDC5_1 */
+#define CPG_SWRSTCR2_BIT_SRST21 (0x02u) /* JPEG Decoder */
+#define CPG_SWRSTCR3_BIT_SRST36 (0x40u) /* DMA */
+#define CPG_SWRSTCR3_BIT_SRST35 (0x20u) /* IMR-LS2_0 */
+#define CPG_SWRSTCR3_BIT_SRST34 (0x10u) /* IMR-LS2_1 */
+#define CPG_SWRSTCR3_BIT_SRST33 (0x08u) /* IMR-LSD? */
+#define CPG_SWRSTCR3_BIT_SRST32 (0x04u) /* OpenVG */
+#define CPG_SWRSTCR3_BIT_SRST31 (0x02u) /* Capture Engine */
+#define CPG_SWRSTCR4_BIT_SRST41 (0x02u) /* Video Decoder0 */
+#define CPG_SWRSTCR4_BIT_SRST40 (0x01u) /* Video Decoder1 */
+#define CPG_SYSCR1_BIT_VRAME4   (0x10u) /* VRAM E Page4 */
+#define CPG_SYSCR1_BIT_VRAME3   (0x08u) /* VRAM E Page3 */
+#define CPG_SYSCR1_BIT_VRAME2   (0x04u) /* VRAM E Page2 */
+#define CPG_SYSCR1_BIT_VRAME1   (0x02u) /* VRAM E Page1 */
+#define CPG_SYSCR1_BIT_VRAME0   (0x01u) /* VRAM E Page0 */
+#define CPG_SYSCR2_BIT_VRAMWE4  (0x10u) /* VRAM WE Page4 */
+#define CPG_SYSCR2_BIT_VRAMWE3  (0x08u) /* VRAM WE Page3 */
+#define CPG_SYSCR2_BIT_VRAMWE2  (0x04u) /* VRAM WE Page2 */
+#define CPG_SYSCR2_BIT_VRAMWE1  (0x02u) /* VRAM WE Page1 */
+#define CPG_SYSCR2_BIT_VRAMWE0  (0x01u) /* VRAM WE Page0 */
+#define CPG_SYSCR3_BIT_RRAMWE3  (0x08u) /* RRAM WE Page3 */
+#define CPG_SYSCR3_BIT_RRAMWE2  (0x04u) /* RRAM WE Page2 */
+#define CPG_SYSCR3_BIT_RRAMWE1  (0x02u) /* RRAM WE Page1 */
+#define CPG_SYSCR3_BIT_RRAMWE0  (0x01u) /* RRAM WE Page0 */
+
+/*@}*/ /* end of group Renesas_RZ_A1_CPG */
+
+/******************************************************************************/
+/*                        GPIO   Settings                                     */
+/******************************************************************************/
+/** @addtogroup Renesas_RZ_A1_H_GPIO Renesas_RZ_A1 GPIO Bit definitions
+  @{
+*/
+
+#define GPIO_BIT_N0  (1u <<  0)
+#define GPIO_BIT_N1  (1u <<  1)
+#define GPIO_BIT_N2  (1u <<  2)
+#define GPIO_BIT_N3  (1u <<  3)
+#define GPIO_BIT_N4  (1u <<  4)
+#define GPIO_BIT_N5  (1u <<  5)
+#define GPIO_BIT_N6  (1u <<  6)
+#define GPIO_BIT_N7  (1u <<  7)
+#define GPIO_BIT_N8  (1u <<  8)
+#define GPIO_BIT_N9  (1u <<  9)
+#define GPIO_BIT_N10 (1u << 10)
+#define GPIO_BIT_N11 (1u << 11)
+#define GPIO_BIT_N12 (1u << 12)
+#define GPIO_BIT_N13 (1u << 13)
+#define GPIO_BIT_N14 (1u << 14)
+#define GPIO_BIT_N15 (1u << 15)
+
+
+#define MD_BOOT10_MASK    (0x3)
+
+#define MD_BOOT10_BM0     (0x0)
+#define MD_BOOT10_BM1     (0x2)
+#define MD_BOOT10_BM3     (0x1)
+#define MD_BOOT10_BM4_5   (0x3)
+
+#define MD_CLK        (1u << 2)
+#define MD_CLKS       (1u << 3)
+
+/*@}*/ /* end of group Renesas_RZ_A1_GPIO */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  // __MBRZA1H_H__
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/RZ_A1_Init.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/RZ_A1_Init.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/RZ_A1_Init.c	(revision 270)
@@ -0,0 +1,135 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/**************************************************************************//**
+* @file         RZ_A1_Init.c
+* $Rev: 624 $
+* $Date:: 2013-04-24 13:37:48 +0900#$
+* @brief        RZ_A1 Initialize
+******************************************************************************/
+
+/******************************************************************************
+Includes   <System Includes> , "Project Includes"
+******************************************************************************/
+#include "MBRZA1H.h"
+#include "RZ_A1_Init.h"
+
+/******************************************************************************
+Typedef definitions
+******************************************************************************/
+
+/******************************************************************************
+Macro definitions
+******************************************************************************/
+#define CS2_SDRAM_MODE_16BIT_CAS2_BR_BW (*(volatile uint16_t*)0x3FFFD040)
+#define CS3_SDRAM_MODE_16BIT_CAS2_BR_BW (*(volatile uint16_t*)0x3FFFE040)
+
+#define GPIO_PORT0_BOOTMODE_BITMASK (0x000fu)
+
+/******************************************************************************
+Imported global variables and functions (from other files)
+******************************************************************************/
+
+/******************************************************************************
+Exported global variables and functions (to be accessed by other files)
+******************************************************************************/
+
+/******************************************************************************
+Private global variables and functions
+******************************************************************************/
+
+/**************************************************************************//**
+* Function Name: RZ_A1_SetSramWriteEnable
+* @brief         Initialize Board settings
+*
+*                Description:<br>
+*                Set SRAM write enable
+* @param         none
+* @retval        none
+******************************************************************************/
+void RZ_A1_SetSramWriteEnable(void)
+{
+    /* Enable SRAM write access */
+    CPG.SYSCR3 = 0x0F;
+
+    return;
+}
+
+/**************************************************************************//**
+* Function Name: RZ_A1_InitClock
+* @brief         Initialize Board settings
+*
+*                Description:<br>
+*                Initialize Clock
+* @param         none
+* @retval        none
+******************************************************************************/
+void RZ_A1_InitClock(void)
+{
+    /* Cancel L2C standby status before clock change */
+    L2CREG15_POWER_CTRL = 0x00000001;
+
+    /* Clock settings */
+    /* ClockMode0 */
+    CPG.FRQCR  = 0x1035;    /* CPU Clock =399.99MHz */
+    CPG.FRQCR2 = 0x0001;    /* G Clock   =266.66MHz */
+
+    return;
+}
+
+/**************************************************************************//**
+* Function Name: RZ_A1_IsClockMode0
+* @brief         Query Clock Mode
+*
+*                Description:<br>
+*                Answer ClockMode0 or not
+* @param         none
+* @retval        true  : clock mode 0
+* @retval        false : clock mode 1
+******************************************************************************/
+int RZ_A1_IsClockMode0(void)
+{
+    /* ClockMode0 */
+    return true;
+}
+
+/**************************************************************************//**
+* Function Name: RZ_A1_InitBus
+* @brief         Initialize Bus
+*
+*                Description:<br>
+*                Initialize Pin Setting
+* @param         none
+* @retval        none
+******************************************************************************/
+void RZ_A1_InitBus(void)
+{
+    /*************************************************************************/
+    /* If need Pin Setting before run program, the setting will be wrote here*/
+    /*************************************************************************/
+
+    return;
+}
+
+/******************************************************************************
+End of file
+******************************************************************************/
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/RZ_A1_Init.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/RZ_A1_Init.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/RZ_A1_Init.h	(revision 270)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/**************************************************************************//**
+* @file          RZ_A1_Init.h
+* $Rev: 531 $
+* $Date:: 2013-04-16 13:07:35 +0900#$
+* @brief         RZ_A1 Initialize
+******************************************************************************/
+
+#ifndef RZ_A1_INIT_H
+#define RZ_A1_INIT_H
+
+/******************************************************************************
+Includes   <System Includes> , "Project Includes"
+******************************************************************************/
+#include <stdio.h>
+#include <stdbool.h>
+#include "iodefine.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+/******************************************************************************
+Typedef definitions
+******************************************************************************/
+
+/******************************************************************************
+Macro definitions
+******************************************************************************/
+
+/******************************************************************************
+Variable Externs
+******************************************************************************/
+
+/******************************************************************************
+Functions Prototypes
+******************************************************************************/
+
+void    RZ_A1_SetSramWriteEnable(void);
+void    RZ_A1_InitClock(void);
+int     RZ_A1_IsClockMode0(void);
+void    RZ_A1_InitBus(void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* RZ_A1_INIT_H */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/TOOLCHAIN_GCC_ARM/RZA1H.ld
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/TOOLCHAIN_GCC_ARM/RZA1H.ld	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/TOOLCHAIN_GCC_ARM/RZA1H.ld	(revision 270)
@@ -0,0 +1,232 @@
+/* Linker script for mbed RZ_A1H */
+PROVIDE(hardware_init_hook = 0);
+PROVIDE(software_init_hook = 0);
+PROVIDE(software_term_hook = 0);
+PROVIDE(IRQTable = _kernel_inh_table);
+PROVIDE(IRQNestLevel = _kernel_excpt_nest_count);
+
+/* Linker script to configure memory regions. */
+MEMORY
+{
+  ROM   (rx)  : ORIGIN = 0x00000000, LENGTH = 0x02000000
+  BOOT_LOADER (rx) : ORIGIN = 0x18000000, LENGTH = 0x00004000 
+  SFLASH (rx) : ORIGIN = 0x18004000, LENGTH = 0x07FFC000 
+  L_TTB (rw)  : ORIGIN = 0x20000000, LENGTH = 0x00004000 
+  RAM (rwx) : ORIGIN = 0x20020000, LENGTH = 0x00700000
+  RAM_NC (rwx) : ORIGIN = 0x20900000, LENGTH = 0x00100000
+}
+
+/* Linker script to place sections and symbol values. Should be used together
+ * with other linker script that defines memory regions FLASH and RAM.
+ * It references following symbols, which must be defined in code:
+ *   Reset_Handler : Entry of reset handler
+ * 
+ * It defines following symbols, which code can use without definition:
+ *   __exidx_start
+ *   __exidx_end
+ *   __etext
+ *   __data_start__
+ *   __preinit_array_start
+ *   __preinit_array_end
+ *   __init_array_start
+ *   __init_array_end
+ *   __fini_array_start
+ *   __fini_array_end
+ *   __data_end__
+ *   __bss_start__
+ *   __bss_end__
+ *   __end__
+ *   end
+ *   __HeapLimit
+ *   __StackLimit
+ *   __StackTop
+ *   __stack
+ */
+ENTRY(Reset_Handler)
+
+SECTIONS
+{
+    .boot :
+    {
+        KEEP(*(.boot_loader)) 
+    } > BOOT_LOADER 
+
+    .text :
+    {
+
+        Image$$VECTORS$$Base = .;
+        * (RESET)
+        Image$$VECTORS$$Limit = .;
+        . += 0x00000400;
+
+        KEEP(*(.isr_vector))
+        *(SVC_TABLE)
+        *(.text*)
+
+        KEEP(*(.init))
+        KEEP(*(.fini))
+
+        /* .ctors */
+        *crtbegin.o(.ctors)
+        *crtbegin?.o(.ctors)
+        *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
+        *(SORT(.ctors.*))
+        *(.ctors)
+
+        /* .dtors */
+        *crtbegin.o(.dtors)
+        *crtbegin?.o(.dtors)
+        *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
+        *(SORT(.dtors.*))
+        *(.dtors)
+
+        Image$$RO_DATA$$Base = .;
+        *(.rodata*)
+        Image$$RO_DATA$$Limit = .;
+
+        KEEP(*(.eh_frame*))
+    } > SFLASH
+
+    .ARM.extab : 
+    {
+        *(.ARM.extab* .gnu.linkonce.armextab.*)
+    } > SFLASH
+
+    __exidx_start = .;
+    .ARM.exidx :
+    {
+        *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+    } > SFLASH
+    __exidx_end = .;
+
+
+    .copy.table :
+    {
+        . = ALIGN(4);
+        __copy_table_start__ = .;
+        LONG (__etext)
+        LONG (__data_start__)
+        LONG (__data_end__ - __data_start__)
+        LONG (__etext2)
+        LONG (__nc_data_start)
+        LONG (__nc_data_end - __nc_data_start)
+        __copy_table_end__ = .;
+    } > SFLASH
+
+    .zero.table :
+    {
+        . = ALIGN(4);
+        __zero_table_start__ = .;
+        LONG (__bss_start__)
+        LONG (__bss_end__ - __bss_start__)
+        LONG (__nc_bss_start)
+        LONG (__nc_bss_end - __nc_bss_start)
+        __zero_table_end__ = .;
+    } > SFLASH
+
+    __etext = .;
+        
+    .ttb :
+    {
+        Image$$TTB$$ZI$$Base = .;
+        . += 0x00004000;
+        Image$$TTB$$ZI$$Limit = .;
+    } > L_TTB
+
+    .data : AT (__etext)
+    {
+        Image$$RW_DATA$$Base = .;
+        __data_start__ = .;
+        *(vtable)
+        *(.data*)
+        Image$$RW_DATA$$Limit = .;
+
+        . = ALIGN(4);
+        /* preinit data */
+        PROVIDE (__preinit_array_start = .);
+        KEEP(*(.preinit_array))
+        PROVIDE (__preinit_array_end = .);
+
+        . = ALIGN(4);
+        /* init data */
+        PROVIDE (__init_array_start = .);
+        KEEP(*(SORT(.init_array.*)))
+        KEEP(*(.init_array))
+        PROVIDE (__init_array_end = .);
+
+
+        . = ALIGN(4);
+        /* finit data */
+        PROVIDE (__fini_array_start = .);
+        KEEP(*(SORT(.fini_array.*)))
+        KEEP(*(.fini_array))
+        PROVIDE (__fini_array_end = .);
+
+        . = ALIGN(4);
+        /* All data end */
+        __data_end__ = .;
+
+    } > RAM
+
+    
+    .bss ALIGN(0x400):
+    {
+        Image$$ZI_DATA$$Base = .;
+        __bss_start__ = .;
+        *(.bss*)
+        *(COMMON)
+        __bss_end__ = .;
+        Image$$ZI_DATA$$Limit = .;
+    } > RAM
+
+    
+    .heap :
+    {
+        __end__ = .;
+        end = __end__;
+        *(.heap*)
+        __HeapLimit = .;
+    } > RAM
+
+    /* .stack_dummy section doesn't contains any symbols. It is only
+     * used for linker to calculate size of stack sections, and assign
+     * values to stack symbols later */
+    .stack_dummy :
+    {
+        *(.stack)
+    } > RAM
+
+    __etext2 = __etext + SIZEOF(.data);
+    .nc_data : AT (__etext2)
+    {
+        Image$$RW_DATA_NC$$Base = .;
+        __nc_data_start = .;
+        *(NC_DATA)
+
+        . = ALIGN(4);
+        __nc_data_end = .;
+        Image$$RW_DATA_NC$$Limit = .;
+    } > RAM_NC
+
+    .nc_bss (NOLOAD) :
+    {
+        Image$$ZI_DATA_NC$$Base = .;
+        __nc_bss_start = .;
+        *(NC_BSS)
+
+        . = ALIGN(4);
+        __nc_bss_end = .;
+        Image$$ZI_DATA_NC$$Limit = .;
+    } > RAM_NC
+
+    /* Set stack top to end of RAM, and stack limit move down by
+     * size of stack_dummy section */
+    __StackTop = ORIGIN(RAM) + LENGTH(RAM);
+    __StackLimit = __StackTop - SIZEOF(.stack_dummy);
+    PROVIDE(__stack = __StackTop);
+    
+    /* Check if data + heap + stack exceeds RAM limit */
+    ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
+
+
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/TOOLCHAIN_GCC_ARM/startup_RZ1AH.S
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/TOOLCHAIN_GCC_ARM/startup_RZ1AH.S	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/TOOLCHAIN_GCC_ARM/startup_RZ1AH.S	(revision 270)
@@ -0,0 +1,533 @@
+/* File: startup_ARMCM3.s
+ * Purpose: startup file for Cortex-M3/M4 devices. Should use with 
+ *   GNU Tools for ARM Embedded Processors
+ * Version: V1.1
+ * Date: 17 June 2011
+ * 
+ * Copyright (C) 2011 ARM Limited. All rights reserved.
+ * ARM Limited (ARM) is supplying this software for use with Cortex-M3/M4 
+ * processor based microcontrollers.  This file can be freely distributed 
+ * within development tools that are supporting such ARM based processors. 
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
+ * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
+ * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
+ * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
+ */
+    .syntax unified
+    .extern sta_ker
+ 
+@ Standard definitions of mode bits and interrupt (I & F) flags in PSRs
+    .equ    USR_MODE        ,   0x10
+    .equ    FIQ_MODE        ,   0x11
+    .equ    IRQ_MODE        ,   0x12
+    .equ    SVC_MODE        ,   0x13
+    .equ    ABT_MODE        ,   0x17
+    .equ    UND_MODE        ,   0x1b
+    .equ    SYS_MODE        ,   0x1f
+    .equ    Thum_bit        ,   0x20            @ CPSR/SPSR Thumb bit
+
+    .equ    GICI_BASE       ,   0xe8202000
+    .equ    ICCIAR_OFFSET   ,   0x0000000C
+    .equ    ICCEOIR_OFFSET  ,   0x00000010
+    .equ    ICCHPIR_OFFSET  ,   0x00000018
+    .equ    GICD_BASE       ,   0xe8201000
+    .equ    ICDISER0_OFFSET ,   0x00000100
+    .equ    ICDICER0_OFFSET ,   0x00000180
+    .equ    ICDISPR0_OFFSET ,   0x00000200
+    .equ    ICDABR0_OFFSET  ,   0x00000300
+    .equ    ICDIPR0_OFFSET  ,   0x00000400
+
+    .equ    Mode_USR        ,   0x10
+    .equ    Mode_FIQ        ,   0x11
+    .equ    Mode_IRQ        ,   0x12
+    .equ    Mode_SVC        ,   0x13
+    .equ    Mode_ABT        ,   0x17
+    .equ    Mode_UND        ,   0x1B
+    .equ    Mode_SYS        ,   0x1F
+
+    .equ    I_Bit           ,   0x80            @ when I bit is set, IRQ is disabled 
+    .equ    F_Bit           ,   0x40            @ when F bit is set, FIQ is disabled 
+    .equ    T_Bit           ,   0x20            @ when T bit is set, core is in Thumb state 
+
+    .equ    GIC_ERRATA_CHECK_1, 0x000003FE 
+    .equ    GIC_ERRATA_CHECK_2, 0x000003FF 
+
+    .equ    Sect_Normal     , 0x00005c06        @ outer & inner wb/wa, non-shareable, executable, rw, domain 0, base addr 0 
+    .equ    Sect_Normal_Cod , 0x0000dc06        @ outer & inner wb/wa, non-shareable, executable, ro, domain 0, base addr 0 
+    .equ    Sect_Normal_RO  , 0x0000dc16        @ as Sect_Normal_Cod, but not executable 
+    .equ    Sect_Normal_RW  , 0x00005c16        @ as Sect_Normal_Cod, but writeable and not executable 
+    .equ    Sect_SO         , 0x00000c12        @ strongly-ordered (therefore shareable), not executable, rw, domain 0, base addr 0 
+    .equ    Sect_Device_RO  , 0x00008c12        @ device, non-shareable, non-executable, ro, domain 0, base addr 0 
+    .equ    Sect_Device_RW  , 0x00000c12        @ as Sect_Device_RO, but writeable 
+    .equ    Sect_Fault      , 0x00000000        @ this translation will fault (the bottom 2 bits are important, the rest are ignored) 
+
+    .equ    RAM_BASE        , 0x80000000
+    .equ    VRAM_BASE       , 0x18000000
+    .equ    SRAM_BASE       , 0x2e000000
+    .equ    ETHERNET        , 0x1a000000
+    .equ    CS3_PERIPHERAL_BASE, 0x1c000000
+
+
+@ Stack Configuration
+
+    .EQU    UND_Stack_Size  , 0x00000100
+    .EQU    SVC_Stack_Size  , 0x00008000
+    .EQU    ABT_Stack_Size  , 0x00000100
+    .EQU    FIQ_Stack_Size  , 0x00000100
+    .EQU    IRQ_Stack_Size  , 0x00008000
+    .EQU    USR_Stack_Size  , 0x00004000
+
+    .EQU    ISR_Stack_Size, (UND_Stack_Size + SVC_Stack_Size + ABT_Stack_Size + FIQ_Stack_Size + IRQ_Stack_Size)
+
+    .section .stack
+    .align 3
+    .globl    __StackTop
+    .globl    __StackLimit
+__StackLimit:
+    .space    ISR_Stack_Size
+__initial_sp:
+    .space    USR_Stack_Size
+    .size __StackLimit, . - __StackLimit
+__StackTop:
+    .size __StackTop, . - __StackTop
+
+
+@ Heap Configuration
+
+    .EQU    Heap_Size       , 0x00080000
+
+    .section .heap
+    .align 3
+    .globl    __HeapBase
+    .globl    __HeapLimit
+__HeapBase:
+    .space    Heap_Size
+    .size __HeapBase, . - __HeapBase
+__HeapLimit:
+    .size __HeapLimit, . - __HeapLimit
+
+
+    .section .isr_vector
+    .align 2
+    .globl __isr_vector
+__isr_vector:
+    .long   0xe59ff018 /* 0x00 */
+    .long   0xe59ff018 /* 0x04 */
+    .long   0xe59ff018 /* 0x08 */
+    .long   0xe59ff018 /* 0x0c */
+    .long   0xe59ff018 /* 0x10 */
+    .long   0xe59ff018 /* 0x14 */
+    .long   0xe59ff018 /* 0x18 */
+    .long   0xe59ff018 /* 0x1c */
+
+    .long   Reset_Handler          /* 0x20 */
+    .long   _kernel_undef_handler  /* 0x24 */
+    .long   _kernel_svc_handler    /* 0x28 */
+    .long   _kernel_pabort_handler /* 0x2c */
+    .long   _kernel_dabort_handler /* 0x30 */
+    .long   0                      /* Reserved */
+    .long   _kernel_irq_handler    /* IRQ */
+    .long   _kernel_fiq_handler    /* FIQ */
+
+
+    .size    __isr_vector, . - __isr_vector
+
+    .text
+    .align 2
+    .globl          Reset_Handler
+    .type          Reset_Handler, %function
+Reset_Handler:
+    @ Put any cores other than 0 to sleep
+    mrc     p15, 0, r0, c0, c0, 5   @ Read MPIDR
+    ands    r0, r0, #3
+
+goToSleep:
+    wfine
+    bne     goToSleep
+
+@ Enable access to NEON/VFP by enabling access to Coprocessors 10 and 11. 
+@ Enables Full Access i.e. in both privileged and non privileged modes 
+    mrc     p15, 0, r0, c1, c0, 2       @ Read Coprocessor Access Control Register (CPACR) 
+    orr     r0, r0, #(0xF << 20)        @ Enable access to CP 10 & 11 
+    mcr     p15, 0, r0, c1, c0, 2       @ Write Coprocessor Access Control Register (CPACR) 
+    isb
+
+@ Switch on the VFP and NEON hardware 
+    mov     r0, #0x40000000
+    vmsr    fpexc, r0                   @ Write FPEXC register, EN bit set 
+
+    mrc     p15, 0, r0, c1, c0, 0       @ Read CP15 System Control register 
+    bic     r0, r0, #(0x1 << 12)        @ Clear I bit 12 to disable I Cache 
+    bic     r0, r0, #(0x1 <<  2)        @ Clear C bit  2 to disable D Cache 
+    bic     r0, r0, #0x1                @ Clear M bit  0 to disable MMU 
+    bic     r0, r0, #(0x1 << 11)        @ Clear Z bit 11 to disable branch prediction 
+    bic     r0, r0, #(0x1 << 13)        @ Clear V bit 13 to disable hivecs 
+    mcr     p15, 0, r0, c1, c0, 0       @ Write value back to CP15 System Control register 
+    isb
+
+@ Set Vector Base Address Register (VBAR) to point to this application's vector table
+    ldr     r0, =__isr_vector
+    mcr     p15, 0, r0, c12, c0, 0
+ 
+@ Setup Stack for each exceptional mode 
+/*    ldr     r0, =__StackTop  */
+    ldr     r0, =(__StackTop - USR_Stack_Size)
+
+@ Enter Undefined Instruction Mode and set its Stack Pointer 
+    msr     cpsr_c, #(Mode_UND | I_Bit | F_Bit)
+    mov     sp, r0
+    sub     r0, r0, #UND_Stack_Size
+
+@ Enter Abort Mode and set its Stack Pointer 
+    msr     cpsr_c, #(Mode_ABT | I_Bit | F_Bit)
+    mov     sp, r0 
+    sub     r0, r0, #ABT_Stack_Size
+
+@ Enter FIQ Mode and set its Stack Pointer 
+    msr     cpsr_c, #(Mode_FIQ | I_Bit | F_Bit)
+    mov     sp, r0 
+    sub     r0, r0, #FIQ_Stack_Size
+
+@ Enter IRQ Mode and set its Stack Pointer 
+    msr     cpsr_c, #(Mode_IRQ | I_Bit | F_Bit)
+    mov     sp, r0 
+    sub     r0, r0, #IRQ_Stack_Size
+
+@ Enter Supervisor Mode and set its Stack Pointer 
+    msr     cpsr_c, #(Mode_SVC | I_Bit | F_Bit)
+    mov     sp, r0 
+    sub     r0, r0, #SVC_Stack_Size
+
+@ Enter System Mode to complete initialization and enter kernel 
+    msr     cpsr_c, #(Mode_SYS | I_Bit | F_Bit)
+    mov     sp, r0 
+
+    isb
+    ldr     r0, =RZ_A1_SetSramWriteEnable
+    blx     r0
+
+    .extern  create_translation_table
+    bl      create_translation_table 
+
+@  USR/SYS stack pointer will be set during kernel init
+    ldr     r0, =SystemInit
+    blx     r0
+    ldr     r0, =InitMemorySubsystem
+    blx     r0
+
+@ fp_init
+    mov      r0, #0x3000000
+    vmsr     fpscr, r0
+
+
+@ data sections copy
+    ldr     r4, =__copy_table_start__
+    ldr     r5, =__copy_table_end__
+
+.L_loop0:
+    cmp     r4, r5
+    bge     .L_loop0_done
+    ldr     r1, [r4]
+    ldr     r2, [r4, #4]
+    ldr     r3, [r4, #8]
+
+.L_loop0_0:
+    subs    r3, #4
+    ittt    ge
+    ldrge   r0, [r1, r3]
+    strge   r0, [r2, r3]
+    bge     .L_loop0_0
+
+    adds    r4, #12
+    b       .L_loop0
+
+.L_loop0_done:
+
+@ bss sections clear
+    ldr     r3, =__zero_table_start__
+    ldr     r4, =__zero_table_end__
+
+.L_loop2:
+    cmp     r3, r4
+    bge     .L_loop2_done
+    ldr     r1, [r3]
+    ldr     r2, [r3, #4]
+    movs    r0, 0
+
+.L_loop2_0:
+    subs    r2, #4
+    itt     ge
+    strge   r0, [r1, r2]
+    bge     .L_loop2_0
+
+    adds    r3, #8
+    b       .L_loop2
+.L_loop2_done:
+
+
+    ldr     r0, =sta_ker
+    bx      r0
+
+    ldr     r0, sf_boot     @ dummy to keep boot loader area
+loop_here:
+    b       loop_here
+
+sf_boot: 
+    .word   boot_loader
+
+    .pool
+    .size Reset_Handler, . - Reset_Handler
+
+
+    .text
+
+Undef_Handler:
+                .global Undef_Handler
+                .func   Undef_Handler
+                .extern CUndefHandler
+                SRSDB   SP!, #Mode_UND
+                PUSH    {R0-R4, R12}              /* Save APCS corruptible registers to UND mode stack */
+
+                MRS     R0, SPSR
+                TST     R0, #T_Bit                /* Check mode */
+                MOVEQ   R1, #4                    /* R1 = 4 ARM mode */
+                MOVNE   R1, #2                    /* R1 = 2 Thumb mode */
+                SUB     R0, LR, R1
+                LDREQ   R0, [R0]                  /* ARM mode - R0 points to offending instruction */
+                BEQ     undef_cont
+
+                /* Thumb instruction */
+                /* Determine if it is a 32-bit Thumb instruction */
+                LDRH    R0, [R0]
+                MOV     R2, #0x1c
+                CMP     R2, R0, LSR #11
+                BHS     undef_cont                /* 16-bit Thumb instruction */
+
+                /* 32-bit Thumb instruction. Unaligned - we need to reconstruct the offending instruction. */
+                LDRH    R2, [LR]
+                ORR     R0, R2, R0, LSL #16
+undef_cont:
+                MOV     R2, LR                    /* Set LR to third argument */
+                
+/*              AND     R12, SP, #4 */            /* Ensure stack is 8-byte aligned */
+                MOV     R3, SP                    /* Ensure stack is 8-byte aligned */
+                AND     R12, R3, #4
+                SUB     SP, SP, R12               /* Adjust stack */
+                PUSH    {R12, LR}                 /* Store stack adjustment and dummy LR */
+
+                /* R0 Offending instruction */
+                /* R1 =2 (Thumb) or =4 (ARM) */
+                BL      CUndefHandler
+
+                POP     {R12, LR}                 /* Get stack adjustment & discard dummy LR */
+                ADD     SP, SP, R12               /* Unadjust stack */
+
+                LDR     LR, [SP, #24]             /* Restore stacked LR and possibly adjust for retry */
+                SUB     LR, LR, R0
+                LDR     R0, [SP, #28]             /* Restore stacked SPSR */
+                MSR     SPSR_cxsf, R0
+                POP     {R0-R4, R12}              /* Restore stacked APCS registers */
+                ADD     SP, SP, #8                /* Adjust SP for already-restored banked registers */
+                MOVS    PC, LR
+                .endfunc
+ 
+PAbt_Handler:
+                .global PAbt_Handler
+                .func   PAbt_Handler
+                .extern CPAbtHandler
+                SUB     LR, LR, #4                /* Pre-adjust LR */
+                SRSDB   SP!, #Mode_ABT            /* Save LR and SPRS to ABT mode stack */
+                PUSH    {R0-R4, R12}              /* Save APCS corruptible registers to ABT mode stack */
+                MRC     p15, 0, R0, c5, c0, 1     /* IFSR */
+                MRC     p15, 0, R1, c6, c0, 2     /* IFAR */
+
+                MOV     R2, LR                    /* Set LR to third argument */
+
+/*              AND     R12, SP, #4 */            /* Ensure stack is 8-byte aligned */
+                MOV     R3, SP                    /* Ensure stack is 8-byte aligned */
+                AND     R12, R3, #4
+                SUB     SP, SP, R12               /* Adjust stack */
+                PUSH    {R12, LR}                 /* Store stack adjustment and dummy LR */
+
+                BL      CPAbtHandler
+
+                POP     {R12, LR}                 /* Get stack adjustment & discard dummy LR */
+                ADD     SP, SP, R12               /* Unadjust stack */
+
+                POP     {R0-R4, R12}              /* Restore stack APCS registers */
+                RFEFD   SP!                       /* Return from exception */
+                .endfunc
+
+DAbt_Handler:
+                .global DAbt_Handler
+                .func   DAbt_Handler
+                .extern CDAbtHandler
+                SUB     LR, LR, #8                /* Pre-adjust LR */
+                SRSDB   SP!, #Mode_ABT            /* Save LR and SPRS to ABT mode stack */
+                PUSH    {R0-R4, R12}              /* Save APCS corruptible registers to ABT mode stack */
+                CLREX                             /* State of exclusive monitors unknown after taken data abort */
+                MRC     p15, 0, R0, c5, c0, 0     /* DFSR */
+                MRC     p15, 0, R1, c6, c0, 0     /* DFAR */
+
+                MOV     R2, LR                    /* Set LR to third argument */
+
+/*              AND     R12, SP, #4 */            /* Ensure stack is 8-byte aligned */
+                MOV     R3, SP                    /* Ensure stack is 8-byte aligned */
+                AND     R12, R3, #4
+                SUB     SP, SP, R12               /* Adjust stack */
+                PUSH    {R12, LR}                 /* Store stack adjustment and dummy LR */
+
+                BL      CDAbtHandler
+
+                POP     {R12, LR}                 /* Get stack adjustment & discard dummy LR */
+                ADD     SP, SP, R12               /* Unadjust stack */
+
+                POP     {R0-R4, R12}              /* Restore stacked APCS registers */
+                RFEFD   SP!                       /* Return from exception */
+                .endfunc
+ 
+FIQ_Handler:
+                .global FIQ_Handler
+                .func   FIQ_Handler
+                /* An FIQ might occur between the dummy read and the real read of the GIC in IRQ_Handler,
+                 * so if a real FIQ Handler is implemented, this will be needed before returning:
+                 */
+                /* LDR     R1, =GICI_BASE
+                   LDR     R0, [R1, #ICCHPIR_OFFSET]   ; Dummy Read ICCHPIR (GIC CPU Interface register) to avoid GIC 390 errata 801120
+                 */
+                B       .
+                .endfunc
+ 
+                .extern SVC_Handler                 /* refer RTX function */
+
+IRQ_Handler: 
+                .global IRQ_Handler
+                .func   IRQ_Handler
+                .extern IRQCount
+                .extern IRQTable
+                .extern IRQNestLevel
+
+                /* prologue */
+                SUB     LR, LR, #4                  /* Pre-adjust LR */
+                SRSDB   SP!, #Mode_IRQ              /* Save LR_IRQ and SPRS_IRQ to SVC mode stack */
+                CPS     #Mode_IRQ                   /* Switch to SVC mode, to avoid a nested interrupt corrupting LR on a BL */
+                PUSH    {R0-R3, R12}                /* Save remaining APCS corruptible registers to SVC stack */
+
+/*              AND     R1, SP, #4 */               /* Ensure stack is 8-byte aligned */
+                MOV     R3, SP                      /* Ensure stack is 8-byte aligned */
+                AND     R1, R3, #4
+                SUB     SP, SP, R1                  /* Adjust stack */
+                PUSH    {R1, LR}                    /* Store stack adjustment and LR_SVC to SVC stack */
+
+                LDR     R0, =IRQNestLevel           /* Get address of nesting counter */
+                LDR     R1, [R0]
+                ADD     R1, R1, #1                  /* Increment nesting counter */
+                STR     R1, [R0]
+
+                /* identify and acknowledge interrupt */
+                LDR     R1, =GICI_BASE
+                LDR     R0, [R1, #ICCHPIR_OFFSET]   /* Dummy Read ICCHPIR (GIC CPU Interface register) to avoid GIC 390 errata 801120 */
+                LDR     R0, [R1, #ICCIAR_OFFSET]    /* Read ICCIAR (GIC CPU Interface register) */
+                DSB                                 /* Ensure that interrupt acknowledge completes before re-enabling interrupts */
+
+                /* Workaround GIC 390 errata 733075
+                 * If the ID is not 0, then service the interrupt as normal.
+                 * If the ID is 0 and active, then service interrupt ID 0 as normal.
+                 * If the ID is 0 but not active, then the GIC CPU interface may be locked-up, so unlock it
+                 *   with a dummy write to ICDIPR0.  This interrupt should be treated as spurious and not serviced.
+                 */
+                LDR     R2, =GICD_BASE
+                LDR     R3, =GIC_ERRATA_CHECK_1
+                CMP     R0, R3
+                BEQ     unlock_cpu
+                LDR     R3, =GIC_ERRATA_CHECK_2
+                CMP     R0, R3
+                BEQ     unlock_cpu
+                CMP     R0, #0
+                BNE     int_active                  /* If the ID is not 0, then service the interrupt */
+                LDR     R3, [R2, #ICDABR0_OFFSET]   /* Get the interrupt state */
+                TST     R3, #1
+                BNE     int_active                  /* If active, then service the interrupt */
+unlock_cpu:
+                LDR     R3, [R2, #ICDIPR0_OFFSET]   /* Not active, so unlock the CPU interface */
+                STR     R3, [R2, #ICDIPR0_OFFSET]   /*   with a dummy write */
+                DSB                                 /* Ensure the write completes before continuing */
+                B       ret_irq                     /* Do not service the spurious interrupt */
+                /* End workaround */
+
+int_active:
+                LDR     R2, =IRQCount               /* Read number of IRQs */
+                LDR     R2, [R2]
+                CMP     R0, R2                      /* Clean up and return if no handler */
+                BHS     ret_irq                     /* In a single-processor system, spurious interrupt ID 1023 does not need any special handling */
+                LDR     R2, =IRQTable               /* Get address of handler */
+                LDR     R2, [R2, R0, LSL #2]
+                CMP     R2, #0                      /* Clean up and return if handler address is 0 */
+                BEQ     ret_irq
+                PUSH    {R0,R1}
+
+                CPSIE   i                           /* Now safe to re-enable interrupts */
+                BLX     R2                          /* Call handler. R0 will be IRQ number */
+                CPSID   i                           /* Disable interrupts again */
+
+                /* write EOIR (GIC CPU Interface register) */
+                POP     {R0,R1}
+                DSB                                 /* Ensure that interrupt source is cleared before we write the EOIR */
+ret_irq:
+                /* epilogue */
+                STR     R0, [R1, #ICCEOIR_OFFSET]
+
+                LDR     R0, =IRQNestLevel           /* Get address of nesting counter */
+                LDR     R1, [R0]
+                SUB     R1, R1, #1                  /* Decrement nesting counter */
+                STR     R1, [R0]
+
+                POP     {R1, LR}                    /* Get stack adjustment and restore LR_SVC */
+                ADD     SP, SP, R1                  /* Unadjust stack */
+
+                POP     {R0-R3,R12}                 /* Restore stacked APCS registers */
+                RFEFD   SP!                         /* Return from exception */
+                .endfunc
+
+/*    Macro to define default handlers. Default handler
+ *    will be weak symbol and just dead loops. They can be
+ *    overwritten by other handlers */
+                .macro    def_default_handler    handler_name
+                .align 1
+                .thumb_func
+                .weak    \handler_name
+                .type    \handler_name, %function
+\handler_name :
+                b    .
+                .size    \handler_name, . - \handler_name
+                .endm
+
+                def_default_handler    SVC_Handler
+
+
+/* User Initial Stack & Heap */
+
+                .ifdef __MICROLIB
+                
+                .global __initial_sp
+                .global __heap_base
+                .global __heap_limit
+
+                .else
+
+                .extern __use_two_region_memory
+                .global __user_initial_stackheap
+__user_initial_stackheap:
+
+                LDR     R0, =  __HeapBase
+                LDR     R1, =(__StackTop)
+                LDR     R2, = (__HeapBase +  Heap_Size)
+                LDR     R3, = (__StackTop - USR_Stack_Size)
+                BX      LR
+
+                .endif
+
+
+                .END
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/cmsis.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/cmsis.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/cmsis.h	(revision 270)
@@ -0,0 +1,12 @@
+/* mbed Microcontroller Library - CMSIS
+ * Copyright (C) 2009-2011 ARM Limited. All rights reserved.
+ *
+ * A generic CMSIS include header, pulling in LPC1768 specifics
+ */
+
+#ifndef MBED_CMSIS_H
+#define MBED_CMSIS_H
+
+#include "MBRZA1H.h"
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/cmsis_nvic.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/cmsis_nvic.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/cmsis_nvic.c	(revision 270)
@@ -0,0 +1,42 @@
+/* mbed Microcontroller Library
+ * CMSIS-style functionality to support dynamic vectors
+ *******************************************************************************
+ * Copyright (c) 2015 ARM Limited. All rights reserved.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 3. Neither the name of ARM Limited nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *******************************************************************************
+ */
+#include "MBRZA1H.h"
+
+extern IRQHandler IRQTable[Renesas_RZ_A1_IRQ_MAX+1];
+
+void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
+    InterruptHandlerRegister(IRQn, (IRQHandler)vector);
+}
+
+uint32_t NVIC_GetVector(IRQn_Type IRQn) {
+    uint32_t vectors = (uint32_t)IRQTable[IRQn];
+    return vectors;
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/cmsis_nvic.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/cmsis_nvic.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/cmsis_nvic.h	(revision 270)
@@ -0,0 +1,46 @@
+/* mbed Microcontroller Library
+ * CMSIS-style functionality to support dynamic vectors
+ *******************************************************************************
+ * Copyright (c) 2015 ARM Limited. All rights reserved.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 3. Neither the name of ARM Limited nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *******************************************************************************
+ */
+
+#ifndef MBED_CMSIS_NVIC_H
+#define MBED_CMSIS_NVIC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector);
+uint32_t NVIC_GetVector(IRQn_Type IRQn);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/dev_drv.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/dev_drv.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/dev_drv.h	(revision 270)
@@ -0,0 +1,85 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/******************************************************************************
+* File Name    : dev_drv.h
+* $Rev: 809 $
+* $Date:: 2014-04-09 15:06:36 +0900#$
+* Description  : Device driver header
+******************************************************************************/
+#ifndef DEV_DRV_H
+#define DEV_DRV_H
+
+/******************************************************************************
+Includes   <System Includes> , "Project Includes"
+******************************************************************************/
+
+
+/******************************************************************************
+Typedef definitions
+******************************************************************************/
+
+
+/******************************************************************************
+Macro definitions
+******************************************************************************/
+/* ==== Arguments, Return values ==== */
+#define DEVDRV_SUCCESS      (0)     /* Success */
+#define DEVDRV_ERROR        (-1)    /* Failure */
+
+/* ==== Flags ==== */
+#define DEVDRV_FLAG_OFF     (0)     /* Flag OFF */
+#define DEVDRV_FLAG_ON      (1)     /* Flag ON  */
+
+/* ==== Channels ==== */
+typedef enum devdrv_ch
+{
+    DEVDRV_CH_0,            /* Channel 0  */
+    DEVDRV_CH_1,            /* Channel 1  */
+    DEVDRV_CH_2,            /* Channel 2  */
+    DEVDRV_CH_3,            /* Channel 3  */
+    DEVDRV_CH_4,            /* Channel 4  */
+    DEVDRV_CH_5,            /* Channel 5  */
+    DEVDRV_CH_6,            /* Channel 6  */
+    DEVDRV_CH_7,            /* Channel 7  */
+    DEVDRV_CH_8,            /* Channel 8  */
+    DEVDRV_CH_9,            /* Channel 9  */
+    DEVDRV_CH_10,           /* Channel 10 */
+    DEVDRV_CH_11,           /* Channel 11 */
+    DEVDRV_CH_12,           /* Channel 12 */
+    DEVDRV_CH_13,           /* Channel 13 */
+    DEVDRV_CH_14,           /* Channel 14 */
+    DEVDRV_CH_15            /* Channel 15 */
+} devdrv_ch_t;
+
+/******************************************************************************
+Variable Externs
+******************************************************************************/
+
+
+/******************************************************************************
+Functions Prototypes
+******************************************************************************/
+
+#endif  /* DEV_DRV_H */
+
+/* End of File */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/gic.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/gic.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/gic.c	(revision 270)
@@ -0,0 +1,305 @@
+/**************************************************************************//**
+ * @file     gic.c
+ * @brief    Implementation of GIC functions declared in CMSIS Cortex-A9 Core Peripheral Access Layer Header File
+ * @version
+ * @date     19 Sept 2013
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2011 - 2013 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+#include "MBRZA1H.h"
+
+#define GICDistributor      ((GICDistributor_Type      *)     Renesas_RZ_A1_GIC_DISTRIBUTOR_BASE ) /*!< GIC Distributor configuration struct */
+#define GICInterface        ((GICInterface_Type        *)     Renesas_RZ_A1_GIC_INTERFACE_BASE )   /*!< GIC Interface configuration struct */
+
+/* Globals for use of post-scatterloading code that must access GIC */
+const uint32_t GICDistributor_BASE = Renesas_RZ_A1_GIC_DISTRIBUTOR_BASE;
+const uint32_t GICInterface_BASE = Renesas_RZ_A1_GIC_INTERFACE_BASE;
+
+void GIC_EnableDistributor(void)
+{
+    GICDistributor->ICDDCR |= 1; //enable distributor
+}
+
+void GIC_DisableDistributor(void)
+{
+    GICDistributor->ICDDCR &=~1; //disable distributor
+}
+
+uint32_t GIC_DistributorInfo(void)
+{
+    return (uint32_t)(GICDistributor->ICDICTR);
+}
+
+uint32_t GIC_DistributorImplementer(void)
+{
+    return (uint32_t)(GICDistributor->ICDIIDR);
+}
+
+void GIC_SetTarget(IRQn_Type IRQn, uint32_t cpu_target)
+{
+    volatile uint8_t* field = (volatile uint8_t*)&(GICDistributor->ICDIPTR[IRQn / 4]);
+    field += IRQn % 4;
+    *field = (uint8_t)cpu_target & 0xf;
+}
+
+void GIC_SetICDICFR (const uint32_t *ICDICFRn)
+{
+    uint32_t i, num_irq;
+
+    //Get the maximum number of interrupts that the GIC supports
+    num_irq = 32 * ((GIC_DistributorInfo() & 0x1f) + 1);
+
+    for (i = 0; i < (num_irq/16); i++)
+    {
+        GICDistributor->ICDISPR[i] = *ICDICFRn++;
+    }
+}
+
+uint32_t GIC_GetTarget(IRQn_Type IRQn)
+{
+    volatile uint8_t* field = (volatile uint8_t*)&(GICDistributor->ICDIPTR[IRQn / 4]);
+    field += IRQn % 4;
+    return ((uint32_t)*field & 0xf);
+}
+
+void GIC_EnableInterface(void)
+{
+    GICInterface->ICCICR |= 1; //enable interface
+}
+
+void GIC_DisableInterface(void)
+{
+    GICInterface->ICCICR &=~1; //disable distributor
+}
+
+IRQn_Type GIC_AcknowledgePending(void)
+{
+    return (IRQn_Type)(GICInterface->ICCIAR);
+}
+
+void GIC_EndInterrupt(IRQn_Type IRQn)
+{
+    GICInterface->ICCEOIR = IRQn;
+}
+
+void GIC_EnableIRQ(IRQn_Type IRQn)
+{
+    GICDistributor->ICDISER[IRQn / 32] = 1 << (IRQn % 32);
+}
+
+void GIC_DisableIRQ(IRQn_Type IRQn)
+{
+    GICDistributor->ICDICER[IRQn / 32] = 1 << (IRQn % 32);
+}
+
+void GIC_SetPendingIRQ(IRQn_Type IRQn)
+{
+    GICDistributor->ICDISPR[IRQn / 32] = 1 << (IRQn % 32);
+}
+
+void GIC_ClearPendingIRQ(IRQn_Type IRQn)
+{
+    GICDistributor->ICDICPR[IRQn / 32] = 1 << (IRQn % 32);
+}
+
+void GIC_SetLevelModel(IRQn_Type IRQn, int8_t edge_level, int8_t model)
+{
+    volatile uint8_t* field = (volatile uint8_t*)&(GICDistributor->ICDICFR[IRQn / 16]);
+    int  bit_shift = (IRQn % 16)<<1;
+    uint8_t save_byte;
+
+    field += (bit_shift / 8);
+    bit_shift %= 8;
+
+    save_byte = *field;
+    save_byte &= ((uint8_t)~(3u << bit_shift));
+
+    *field = save_byte | ((uint8_t)((edge_level<<1) | model)<< bit_shift);
+}
+
+void GIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
+{
+    volatile uint8_t* field = (volatile uint8_t*)&(GICDistributor->ICDIPR[IRQn / 4]);
+    field += (IRQn % 4);
+    *field = (uint8_t)priority;
+}
+
+uint32_t GIC_GetPriority(IRQn_Type IRQn)
+{
+    volatile uint8_t* field = (volatile uint8_t*)&(GICDistributor->ICDIPR[IRQn / 4]);
+    field += (IRQn % 4);
+    return (uint32_t)*field;
+}
+
+void GIC_InterfacePriorityMask(uint32_t priority)
+{
+    GICInterface->ICCPMR = priority & 0xff; //set priority mask
+}
+
+void GIC_SetBinaryPoint(uint32_t binary_point)
+{
+    GICInterface->ICCBPR = binary_point & 0x07; //set binary point
+}
+
+uint32_t GIC_GetBinaryPoint(uint32_t binary_point)
+{
+    return (uint32_t)GICInterface->ICCBPR;
+}
+
+uint32_t GIC_GetIRQStatus(IRQn_Type IRQn)
+{
+    uint32_t pending, active;
+
+    active = ((GICDistributor->ICDABR[IRQn / 32])  >> (IRQn % 32)) & 0x1;
+    pending =((GICDistributor->ICDISPR[IRQn / 32]) >> (IRQn % 32)) & 0x1;
+
+    return ((active<<1) | pending);
+}
+
+void GIC_SendSGI(IRQn_Type IRQn, uint32_t target_list, uint32_t filter_list)
+{
+    GICDistributor->ICDSGIR = ((filter_list & 0x3) << 24) | ((target_list & 0xff) << 16) | (IRQn & 0xf);
+}
+
+void GIC_DistInit(void)
+{
+    //IRQn_Type i;
+    uint32_t i;
+    uint32_t num_irq = 0;
+    uint32_t priority_field;
+
+    //A reset sets all bits in the ICDISRs corresponding to the SPIs to 0,
+    //configuring all of the interrupts as Secure.
+
+    //Disable interrupt forwarding
+    GIC_DisableDistributor();
+    //Get the maximum number of interrupts that the GIC supports
+    num_irq = 32 * ((GIC_DistributorInfo() & 0x1f) + 1);
+
+    /* Priority level is implementation defined.
+     To determine the number of priority bits implemented write 0xFF to an ICDIPR
+     priority field and read back the value stored.*/
+    GIC_SetPriority((IRQn_Type)0, 0xff);
+    priority_field = GIC_GetPriority((IRQn_Type)0);
+
+    for (i = 32; i < num_irq; i++)
+    {
+        //Disable all SPI the interrupts
+        GIC_DisableIRQ((IRQn_Type)i);
+        //Set level-sensitive and N-N model
+        //GIC_SetLevelModel(i, 0, 0);
+        //Set priority
+        GIC_SetPriority((IRQn_Type)i, priority_field/2);
+        //Set target list to "all cpus"
+        GIC_SetTarget((IRQn_Type)i, 0xff);
+    }
+    /* Set level-edge and 1-N model */
+    /* GICDistributor->ICDICFR[ 0] is read only */
+    GICDistributor->ICDICFR[ 1] = 0x00000055;
+    GICDistributor->ICDICFR[ 2] = 0xFFFD5555;
+    GICDistributor->ICDICFR[ 3] = 0x555FFFFF;
+    GICDistributor->ICDICFR[ 4] = 0x55555555;
+    GICDistributor->ICDICFR[ 5] = 0x55555555;
+    GICDistributor->ICDICFR[ 6] = 0x55555555;
+    GICDistributor->ICDICFR[ 7] = 0x55555555;
+    GICDistributor->ICDICFR[ 8] = 0x5555F555;
+    GICDistributor->ICDICFR[ 9] = 0x55555555;
+    GICDistributor->ICDICFR[10] = 0x55555555;
+    GICDistributor->ICDICFR[11] = 0xF5555555;
+    GICDistributor->ICDICFR[12] = 0xF555F555;
+    GICDistributor->ICDICFR[13] = 0x5555F555;
+    GICDistributor->ICDICFR[14] = 0x55555555;
+    GICDistributor->ICDICFR[15] = 0x55555555;
+    GICDistributor->ICDICFR[16] = 0x55555555;
+    GICDistributor->ICDICFR[17] = 0xFD555555;
+    GICDistributor->ICDICFR[18] = 0x55555557;
+    GICDistributor->ICDICFR[19] = 0x55555555;
+    GICDistributor->ICDICFR[20] = 0xFFD55555;
+    GICDistributor->ICDICFR[21] = 0x5F55557F;
+    GICDistributor->ICDICFR[22] = 0xFD55555F;
+    GICDistributor->ICDICFR[23] = 0x55555557;
+    GICDistributor->ICDICFR[24] = 0x55555555;
+    GICDistributor->ICDICFR[25] = 0x55555555;
+    GICDistributor->ICDICFR[26] = 0x55555555;
+    GICDistributor->ICDICFR[27] = 0x55555555;
+    GICDistributor->ICDICFR[28] = 0x55555555;
+    GICDistributor->ICDICFR[29] = 0x55555555;
+    GICDistributor->ICDICFR[30] = 0x55555555;
+    GICDistributor->ICDICFR[31] = 0x55555555;
+    GICDistributor->ICDICFR[32] = 0x55555555;
+    GICDistributor->ICDICFR[33] = 0x55555555;
+
+    //Enable distributor
+    GIC_EnableDistributor();
+}
+
+void GIC_CPUInterfaceInit(void)
+{
+    IRQn_Type i;
+    uint32_t priority_field;
+
+    //A reset sets all bits in the ICDISRs corresponding to the SPIs to 0,
+    //configuring all of the interrupts as Secure.
+
+    //Disable interrupt forwarding
+    GIC_DisableInterface();
+
+    /* Priority level is implementation defined.
+     To determine the number of priority bits implemented write 0xFF to an ICDIPR
+     priority field and read back the value stored.*/
+    GIC_SetPriority((IRQn_Type)0, 0xff);
+    priority_field = GIC_GetPriority((IRQn_Type)0);
+
+    //SGI and PPI
+    for (i = (IRQn_Type)0; i < 32; i++)
+    {
+        //Set level-sensitive and N-N model for PPI
+        //if(i > 15)
+            //GIC_SetLevelModel(i, 0, 0);
+        //Disable SGI and PPI interrupts
+        GIC_DisableIRQ(i);
+        //Set priority
+        GIC_SetPriority(i, priority_field/2);
+    }
+    //Enable interface
+    GIC_EnableInterface();
+    //Set binary point to 0
+    GIC_SetBinaryPoint(0);
+    //Set priority mask
+    GIC_InterfacePriorityMask(0xff);
+}
+
+void GIC_Enable(void)
+{
+    GIC_DistInit();
+    GIC_CPUInterfaceInit(); //per CPU
+}
+
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/gic.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/gic.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/gic.h	(revision 270)
@@ -0,0 +1,316 @@
+/**************************************************************************//**
+ * @file     gic.h
+ * @brief    Implementation of GIC functions declared in CMSIS Cortex-A9 Core Peripheral Access Layer Header File
+ * @version
+ * @date     29 August 2013
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2011 - 2013 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+#ifndef GIC_H_
+#define GIC_H_
+
+/* IO definitions (access restrictions to peripheral registers) */
+/**
+*/
+#ifdef __cplusplus
+  #define   __I     volatile             /*!< Defines 'read only' permissions                 */
+#else
+  #define   __I     volatile const       /*!< Defines 'read only' permissions                 */
+#endif
+#define     __O     volatile             /*!< Defines 'write only' permissions                */
+#define     __IO    volatile             /*!< Defines 'read / write' permissions              */
+
+/** \brief  Structure type to access the Generic Interrupt Controller Distributor (GICD)
+ */
+typedef struct
+{
+  __IO uint32_t ICDDCR;
+  __I  uint32_t ICDICTR;
+  __I  uint32_t ICDIIDR;
+       uint32_t RESERVED0[29];
+  __IO uint32_t ICDISR[32];
+  __IO uint32_t ICDISER[32];
+  __IO uint32_t ICDICER[32];
+  __IO uint32_t ICDISPR[32];
+  __IO uint32_t ICDICPR[32];
+  __I  uint32_t ICDABR[32];
+       uint32_t RESERVED1[32];
+  __IO uint32_t ICDIPR[256];
+  __IO uint32_t ICDIPTR[256];
+  __IO uint32_t ICDICFR[64];
+       uint32_t RESERVED2[128];
+  __IO uint32_t ICDSGIR;
+}  GICDistributor_Type;
+
+/** \brief  Structure type to access the Controller Interface (GICC)
+ */
+typedef struct
+{
+  __IO uint32_t ICCICR;          // +0x000 - RW - CPU Interface Control Register
+  __IO uint32_t ICCPMR;          // +0x004 - RW - Interrupt Priority Mask Register
+  __IO uint32_t ICCBPR;          // +0x008 - RW - Binary Point Register
+  __I  uint32_t ICCIAR;          // +0x00C - RO - Interrupt Acknowledge Register
+  __IO uint32_t ICCEOIR;         // +0x010 - WO - End of Interrupt Register
+  __I  uint32_t ICCRPR;          // +0x014 - RO - Running Priority Register
+  __I  uint32_t ICCHPIR;         // +0x018 - RO - Highest Pending Interrupt Register
+  __IO uint32_t ICCABPR;         // +0x01C - RW - Aliased Binary Point Register
+
+       uint32_t RESERVED[55];
+
+  __I  uint32_t ICCIIDR;         // +0x0FC - RO - CPU Interface Identification Register
+}  GICInterface_Type;
+
+/*@} end of GICD */
+
+/* ##########################   GIC functions  #################################### */
+/**  \brief      Functions that manage interrupts via the GIC.
+  @{
+ */
+
+/** \brief  Enable DistributorGICInterface->ICCICR |= 1; //enable interface
+
+   Enables the forwarding of pending interrupts to the CPU interfaces.
+
+ */
+void GIC_EnableDistributor(void);
+
+/** \brief  Disable Distributor
+
+   Disables the forwarding of pending interrupts to the CPU interfaces.
+
+ */
+void GIC_DisableDistributor(void);
+
+/** \brief  Provides information about the configuration of the GIC.
+   Provides information about the configuration of the GIC.
+   - whether the GIC implements the Security Extensions
+   - the maximum number of interrupt IDs that the GIC supports
+   - the number of CPU interfaces implemented
+   - if the GIC implements the Security Extensions, the maximum number of implemented Lockable Shared Peripheral Interrupts (LSPIs).
+
+   \return Distributor Information.
+ */
+uint32_t GIC_DistributorInfo(void);
+
+/** \brief  Distributor Implementer Identification Register.
+
+   Distributor Implementer Identification Register
+
+   \return Implementer Information.
+ */
+uint32_t GIC_DistributorImplementer(void);
+
+/** \brief  Set list of processors that the interrupt is sent to if it is asserted.
+
+    The ICDIPTRs provide an 8-bit CPU targets field for each interrupt supported by the GIC.
+    This field stores the list of processors that the interrupt is sent to if it is asserted.
+
+    \param [in]      IRQn  Interrupt number.
+    \param [in]    target  CPU target
+ */
+void GIC_SetTarget(IRQn_Type IRQn, uint32_t cpu_target);
+
+/** \brief  Get list of processors that the interrupt is sent to if it is asserted.
+
+    The ICDIPTRs provide an 8-bit CPU targets field for each interrupt supported by the GIC.
+    This field stores the list of processors that the interrupt is sent to if it is asserted.
+
+    \param [in]      IRQn  Interrupt number.
+    \param [in]    target  CPU target
+*/
+uint32_t GIC_GetTarget(IRQn_Type IRQn);
+
+/** \brief  Enable Interface
+
+   Enables the signalling of interrupts to the target processors.
+
+ */
+void GIC_EnableInterface(void);
+
+/** \brief  Disable Interface
+
+   Disables the signalling of interrupts to the target processors.
+
+ */
+void GIC_DisableInterface(void);
+
+/** \brief  Acknowledge Interrupt
+
+    The function acknowledges the highest priority pending interrupt and returns its IRQ number.
+
+    \return             Interrupt number
+ */
+IRQn_Type GIC_AcknowledgePending(void);
+
+/** \brief  End Interrupt
+
+    The function writes the end of interrupt register, indicating that handling of the interrupt is complete.
+
+    \param [in]   IRQn  Interrupt number.
+ */
+void GIC_EndInterrupt(IRQn_Type IRQn);
+
+
+/** \brief  Enable Interrupt
+
+    Set-enable bit for each interrupt supported by the GIC.
+
+    \param [in]      IRQn  External interrupt number.
+ */
+void GIC_EnableIRQ(IRQn_Type IRQn);
+
+/** \brief  Disable Interrupt
+
+    Clear-enable bit for each interrupt supported by the GIC.
+
+    \param [in]      IRQn  Number of the external interrupt to disable
+ */
+void GIC_DisableIRQ(IRQn_Type IRQn);
+
+/** \brief  Set Pending Interrupt
+
+    Set-pending bit for each interrupt supported by the GIC.
+
+    \param [in]      IRQn  Interrupt number.
+ */
+void GIC_SetPendingIRQ(IRQn_Type IRQn);
+
+/** \brief  Clear Pending Interrupt
+
+    Clear-pending bit for each interrupt supported by the GIC
+
+    \param [in]      IRQn  Number of the interrupt for clear pending
+ */
+void GIC_ClearPendingIRQ(IRQn_Type IRQn);
+
+/** \brief  Int_config field for each interrupt supported by the GIC.
+
+    This field identifies whether the corresponding interrupt is:
+    (1) edge-triggered or (0) level-sensitive
+    (1) 1-N model or (0) N-N model
+
+    \param [in]      IRQn  Interrupt number.
+    \param [in] edge_level (1) edge-triggered or (0) level-sensitive
+    \param [in] model      (1) 1-N model or (0) N-N model
+ */
+void GIC_SetLevelModel(IRQn_Type IRQn, int8_t edge_level, int8_t model);
+
+
+/** \brief  Set Interrupt Priority
+
+    The function sets the priority of an interrupt.
+
+    \param [in]      IRQn  Interrupt number.
+    \param [in]  priority  Priority to set.
+ */
+void GIC_SetPriority(IRQn_Type IRQn, uint32_t priority);
+
+/** \brief  Get Interrupt Priority
+
+    The function reads the priority of an interrupt.
+
+    \param [in]   IRQn  Interrupt number.
+    \return             Interrupt Priority.
+ */
+uint32_t GIC_GetPriority(IRQn_Type IRQn);
+
+/** \brief  CPU Interface Priority Mask Register
+
+    The priority mask level for the CPU interface. If the priority of an interrupt is higher than the
+    value indicated by this field, the interface signals the interrupt to the processor.
+
+    \param [in]   Mask.
+ */
+void GIC_InterfacePriorityMask(uint32_t priority);
+
+/** \brief  Set the binary point.
+
+     Set the point at which the priority value fields split into two parts, the group priority field and the subpriority field.
+
+    \param [in]   Mask.
+ */
+void GIC_SetBinaryPoint(uint32_t binary_point);
+
+/** \brief  Get the binary point.
+
+     Get the point at which the priority value fields split into two parts, the group priority field and the subpriority field.
+
+    \return  Binary point.
+ */
+uint32_t GIC_GetBinaryPoint(uint32_t binary_point);
+
+/** \brief  Get Interrupt state.
+
+     Get the interrupt state, whether pending and/or active
+
+    \return  0 - inactive, 1 - pending, 2 - active, 3 - pending and active
+ */
+uint32_t GIC_GetIRQStatus(IRQn_Type IRQn);
+
+/** \brief  Send Software Generated interrupt
+
+    Provides an interrupt priority filter. Only interrupts with higher priority than the value in this register can be signalled to the processor.
+GIC_InterfacePriorityMask
+    \param [in]   IRQn         The Interrupt ID of the SGI.
+    \param [in]   target_list  CPUTargetList
+    \param [in]   filter_list  TargetListFilter
+ */
+void GIC_SendSGI(IRQn_Type IRQn, uint32_t target_list, uint32_t filter_list);
+
+/** \brief  API call to initialise the interrupt distributor
+
+   API call to initialise the interrupt distributor
+
+ */
+void GIC_DistInit(void);
+
+/** \brief  API call to initialise the CPU interface
+
+   API call to initialise the CPU interface
+
+ */
+void GIC_CPUInterfaceInit(void);
+
+/** \brief  API call to set the Interrupt Configuration Registers
+
+   API call to initialise the Interrupt Configuration Registers
+
+ */
+void GIC_SetICDICFR (const uint32_t *ICDICFRn);
+
+/** \brief  API call to  Enable the GIC
+
+   API call to  Enable the GIC
+
+ */
+void GIC_Enable(void);
+
+#endif /* GIC_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/bsc_iobitmask.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/bsc_iobitmask.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/bsc_iobitmask.h	(revision 270)
@@ -0,0 +1,357 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name   : bsc_iobitmask.h
+* $Rev: 1115 $
+* $Date:: 2014-07-09 15:35:02 +0900#$
+* Description : BSC register define header
+*******************************************************************************/
+#ifndef BSC_IOBITMASK_H
+#define BSC_IOBITMASK_H
+
+
+/* ==== Mask values for IO registers ==== */
+#define BSC_CMNCR_HIZCNT                (0x00000001uL)
+#define BSC_CMNCR_HIZMEM                (0x00000002uL)
+#define BSC_CMNCR_DPRTY                 (0x00000600uL)
+#define BSC_CMNCR_AL0                   (0x01000000uL)
+#define BSC_CMNCR_TL0                   (0x10000000uL)
+
+#define BSC_CS0BCR_BSZ                  (0x00000600uL)
+#define BSC_CS0BCR_TYPE                 (0x00007000uL)
+#define BSC_CS0BCR_IWRRS                (0x00070000uL)
+#define BSC_CS0BCR_IWRRD                (0x00380000uL)
+#define BSC_CS0BCR_IWRWS                (0x01C00000uL)
+#define BSC_CS0BCR_IWRWD                (0x0E000000uL)
+#define BSC_CS0BCR_IWW                  (0x70000000uL)
+
+#define BSC_CS1BCR_BSZ                  (0x00000600uL)
+#define BSC_CS1BCR_TYPE                 (0x00007000uL)
+#define BSC_CS1BCR_IWRRS                (0x00070000uL)
+#define BSC_CS1BCR_IWRRD                (0x00380000uL)
+#define BSC_CS1BCR_IWRWS                (0x01C00000uL)
+#define BSC_CS1BCR_IWRWD                (0x0E000000uL)
+#define BSC_CS1BCR_IWW                  (0x70000000uL)
+
+#define BSC_CS2BCR_BSZ                  (0x00000600uL)
+#define BSC_CS2BCR_TYPE                 (0x00007000uL)
+#define BSC_CS2BCR_IWRRS                (0x00070000uL)
+#define BSC_CS2BCR_IWRRD                (0x00380000uL)
+#define BSC_CS2BCR_IWRWS                (0x01C00000uL)
+#define BSC_CS2BCR_IWRWD                (0x0E000000uL)
+#define BSC_CS2BCR_IWW                  (0x70000000uL)
+
+#define BSC_CS3BCR_BSZ                  (0x00000600uL)
+#define BSC_CS3BCR_TYPE                 (0x00007000uL)
+#define BSC_CS3BCR_IWRRS                (0x00070000uL)
+#define BSC_CS3BCR_IWRRD                (0x00380000uL)
+#define BSC_CS3BCR_IWRWS                (0x01C00000uL)
+#define BSC_CS3BCR_IWRWD                (0x0E000000uL)
+#define BSC_CS3BCR_IWW                  (0x70000000uL)
+
+#define BSC_CS4BCR_BSZ                  (0x00000600uL)
+#define BSC_CS4BCR_TYPE                 (0x00007000uL)
+#define BSC_CS4BCR_IWRRS                (0x00070000uL)
+#define BSC_CS4BCR_IWRRD                (0x00380000uL)
+#define BSC_CS4BCR_IWRWS                (0x01C00000uL)
+#define BSC_CS4BCR_IWRWD                (0x0E000000uL)
+#define BSC_CS4BCR_IWW                  (0x70000000uL)
+
+#define BSC_CS5BCR_BSZ                  (0x00000600uL)
+#define BSC_CS5BCR_TYPE                 (0x00007000uL)
+#define BSC_CS5BCR_IWRRS                (0x00070000uL)
+#define BSC_CS5BCR_IWRRD                (0x00380000uL)
+#define BSC_CS5BCR_IWRWS                (0x01C00000uL)
+#define BSC_CS5BCR_IWRWD                (0x0E000000uL)
+#define BSC_CS5BCR_IWW                  (0x70000000uL)
+
+#define BSC_CS0WCR_NORMAL_HW            (0x00000003uL)
+#define BSC_CS0WCR_NORMAL_WM            (0x00000040uL)
+#define BSC_CS0WCR_NORMAL_WR            (0x00000780uL)
+#define BSC_CS0WCR_NORMAL_SW            (0x00001800uL)
+#define BSC_CS0WCR_NORMAL_BAS           (0x00100000uL)
+
+#define BSC_CS1WCR_NORMAL_HW            (0x00000003uL)
+#define BSC_CS1WCR_NORMAL_WM            (0x00000040uL)
+#define BSC_CS1WCR_NORMAL_WR            (0x00000780uL)
+#define BSC_CS1WCR_NORMAL_SW            (0x00001800uL)
+#define BSC_CS1WCR_NORMAL_WW            (0x00070000uL)
+#define BSC_CS1WCR_NORMAL_BAS           (0x00100000uL)
+
+#define BSC_CS2WCR_NORMAL_WM            (0x00000040uL)
+#define BSC_CS2WCR_NORMAL_WR            (0x00000780uL)
+#define BSC_CS2WCR_NORMAL_BAS           (0x00100000uL)
+
+#define BSC_CS3WCR_NORMAL_WM            (0x00000040uL)
+#define BSC_CS3WCR_NORMAL_WR            (0x00000780uL)
+#define BSC_CS3WCR_NORMAL_BAS           (0x00100000uL)
+
+#define BSC_CS4WCR_NORMAL_HW            (0x00000003uL)
+#define BSC_CS4WCR_NORMAL_WM            (0x00000040uL)
+#define BSC_CS4WCR_NORMAL_WR            (0x00000780uL)
+#define BSC_CS4WCR_NORMAL_SW            (0x00001800uL)
+#define BSC_CS4WCR_NORMAL_WW            (0x00070000uL)
+#define BSC_CS4WCR_NORMAL_BAS           (0x00100000uL)
+
+#define BSC_CS5WCR_NORMAL_HW            (0x00000003uL)
+#define BSC_CS5WCR_NORMAL_WM            (0x00000040uL)
+#define BSC_CS5WCR_NORMAL_WR            (0x00000780uL)
+#define BSC_CS5WCR_NORMAL_SW            (0x00001800uL)
+#define BSC_CS5WCR_NORMAL_WW            (0x00070000uL)
+#define BSC_CS5WCR_NORMAL_MPXWBAS       (0x00100000uL)
+#define BSC_CS5WCR_NORMAL_SZSEL         (0x00200000uL)
+
+#define BSC_CS0WCR_BROM_ASY_WM          (0x00000040uL)
+#define BSC_CS0WCR_BROM_ASY_W           (0x00000780uL)
+#define BSC_CS0WCR_BROM_ASY_BW          (0x00030000uL)
+#define BSC_CS0WCR_BROM_ASY_BST         (0x00300000uL)
+
+#define BSC_CS4WCR_BROM_ASY_HW          (0x00000003uL)
+#define BSC_CS4WCR_BROM_ASY_WM          (0x00000040uL)
+#define BSC_CS4WCR_BROM_ASY_W           (0x00000780uL)
+#define BSC_CS4WCR_BROM_ASY_SW          (0x00001800uL)
+#define BSC_CS4WCR_BROM_ASY_BW          (0x00030000uL)
+#define BSC_CS4WCR_BROM_ASY_BST         (0x00300000uL)
+
+#define BSC_CS2WCR_SDRAM_A2CL           (0x00000180uL)
+
+#define BSC_CS3WCR_SDRAM_WTRC           (0x00000003uL)
+#define BSC_CS3WCR_SDRAM_TRWL           (0x00000018uL)
+#define BSC_CS3WCR_SDRAM_A3CL           (0x00000180uL)
+#define BSC_CS3WCR_SDRAM_WTRCD          (0x00000C00uL)
+#define BSC_CS3WCR_SDRAM_WTRP           (0x00006000uL)
+
+#define BSC_CS0WCR_BROM_SY_WM           (0x00000040uL)
+#define BSC_CS0WCR_BROM_SY_W            (0x00000780uL)
+#define BSC_CS0WCR_BROM_SY_BW           (0x00030000uL)
+
+#define BSC_SDCR_A3COL                  (0x00000003uL)
+#define BSC_SDCR_A3ROW                  (0x00000018uL)
+#define BSC_SDCR_BACTV                  (0x00000100uL)
+#define BSC_SDCR_PDOWN                  (0x00000200uL)
+#define BSC_SDCR_RMODE                  (0x00000400uL)
+#define BSC_SDCR_RFSH                   (0x00000800uL)
+#define BSC_SDCR_DEEP                   (0x00002000uL)
+#define BSC_SDCR_A2COL                  (0x00030000uL)
+#define BSC_SDCR_A2ROW                  (0x00180000uL)
+
+#define BSC_RTCSR_RRC                   (0x00000007uL)
+#define BSC_RTCSR_CKS                   (0x00000038uL)
+#define BSC_RTCSR_CMIE                  (0x00000040uL)
+#define BSC_RTCSR_CMF                   (0x00000080uL)
+
+#define BSC_RTCNT_D                     (0xFFFFFFFFuL)
+
+#define BSC_RTCOR_D                     (0xFFFFFFFFuL)
+
+#define BSC_TOSCOR0_D                   (0x0000FFFFuL)
+
+#define BSC_TOSCOR1_D                   (0x0000FFFFuL)
+
+#define BSC_TOSCOR2_D                   (0x0000FFFFuL)
+
+#define BSC_TOSCOR3_D                   (0x0000FFFFuL)
+
+#define BSC_TOSCOR4_D                   (0x0000FFFFuL)
+
+#define BSC_TOSCOR5_D                   (0x0000FFFFuL)
+
+#define BSC_TOSTR_CS0TOSTF              (0x00000001uL)
+#define BSC_TOSTR_CS1TOSTF              (0x00000002uL)
+#define BSC_TOSTR_CS2TOSTF              (0x00000004uL)
+#define BSC_TOSTR_CS3TOSTF              (0x00000008uL)
+#define BSC_TOSTR_CS4TOSTF              (0x00000010uL)
+#define BSC_TOSTR_CS5TOSTF              (0x00000020uL)
+
+#define BSC_TOENR_CS0TOEN               (0x00000001uL)
+#define BSC_TOENR_CS1TOEN               (0x00000002uL)
+#define BSC_TOENR_CS2TOEN               (0x00000004uL)
+#define BSC_TOENR_CS3TOEN               (0x00000008uL)
+#define BSC_TOENR_CS4TOEN               (0x00000010uL)
+#define BSC_TOENR_CS5TOEN               (0x00000020uL)
+
+
+/* ==== Shift values for IO registers ==== */
+#define BSC_CMNCR_HIZCNT_SHIFT          (0u)
+#define BSC_CMNCR_HIZMEM_SHIFT          (1u)
+#define BSC_CMNCR_DPRTY_SHIFT           (9u)
+#define BSC_CMNCR_AL0_SHIFT             (24u)
+#define BSC_CMNCR_TL0_SHIFT             (28u)
+
+#define BSC_CS0BCR_BSZ_SHIFT            (9u)
+#define BSC_CS0BCR_TYPE_SHIFT           (12u)
+#define BSC_CS0BCR_IWRRS_SHIFT          (16u)
+#define BSC_CS0BCR_IWRRD_SHIFT          (19u)
+#define BSC_CS0BCR_IWRWS_SHIFT          (22u)
+#define BSC_CS0BCR_IWRWD_SHIFT          (25u)
+#define BSC_CS0BCR_IWW_SHIFT            (28u)
+
+#define BSC_CS1BCR_BSZ_SHIFT            (9u)
+#define BSC_CS1BCR_TYPE_SHIFT           (12u)
+#define BSC_CS1BCR_IWRRS_SHIFT          (16u)
+#define BSC_CS1BCR_IWRRD_SHIFT          (19u)
+#define BSC_CS1BCR_IWRWS_SHIFT          (22u)
+#define BSC_CS1BCR_IWRWD_SHIFT          (25u)
+#define BSC_CS1BCR_IWW_SHIFT            (28u)
+
+#define BSC_CS2BCR_BSZ_SHIFT            (9u)
+#define BSC_CS2BCR_TYPE_SHIFT           (12u)
+#define BSC_CS2BCR_IWRRS_SHIFT          (16u)
+#define BSC_CS2BCR_IWRRD_SHIFT          (19u)
+#define BSC_CS2BCR_IWRWS_SHIFT          (22u)
+#define BSC_CS2BCR_IWRWD_SHIFT          (25u)
+#define BSC_CS2BCR_IWW_SHIFT            (28u)
+
+#define BSC_CS3BCR_BSZ_SHIFT            (9u)
+#define BSC_CS3BCR_TYPE_SHIFT           (12u)
+#define BSC_CS3BCR_IWRRS_SHIFT          (16u)
+#define BSC_CS3BCR_IWRRD_SHIFT          (19u)
+#define BSC_CS3BCR_IWRWS_SHIFT          (22u)
+#define BSC_CS3BCR_IWRWD_SHIFT          (25u)
+#define BSC_CS3BCR_IWW_SHIFT            (28u)
+
+#define BSC_CS4BCR_BSZ_SHIFT            (9u)
+#define BSC_CS4BCR_TYPE_SHIFT           (12u)
+#define BSC_CS4BCR_IWRRS_SHIFT          (16u)
+#define BSC_CS4BCR_IWRRD_SHIFT          (19u)
+#define BSC_CS4BCR_IWRWS_SHIFT          (22u)
+#define BSC_CS4BCR_IWRWD_SHIFT          (25u)
+#define BSC_CS4BCR_IWW_SHIFT            (28u)
+
+#define BSC_CS5BCR_BSZ_SHIFT            (9u)
+#define BSC_CS5BCR_TYPE_SHIFT           (12u)
+#define BSC_CS5BCR_IWRRS_SHIFT          (16u)
+#define BSC_CS5BCR_IWRRD_SHIFT          (19u)
+#define BSC_CS5BCR_IWRWS_SHIFT          (22u)
+#define BSC_CS5BCR_IWRWD_SHIFT          (25u)
+#define BSC_CS5BCR_IWW_SHIFT            (28u)
+
+#define BSC_CS0WCR_NORMAL_HW_SHIFT      (0u)
+#define BSC_CS0WCR_NORMAL_WM_SHIFT      (6u)
+#define BSC_CS0WCR_NORMAL_WR_SHIFT      (7u)
+#define BSC_CS0WCR_NORMAL_SW_SHIFT      (11u)
+#define BSC_CS0WCR_NORMAL_BAS_SHIFT     (20u)
+
+#define BSC_CS1WCR_NORMAL_HW_SHIFT      (0u)
+#define BSC_CS1WCR_NORMAL_WM_SHIFT      (6u)
+#define BSC_CS1WCR_NORMAL_WR_SHIFT      (7u)
+#define BSC_CS1WCR_NORMAL_SW_SHIFT      (11u)
+#define BSC_CS1WCR_NORMAL_WW_SHIFT      (16u)
+#define BSC_CS1WCR_NORMAL_BAS_SHIFT     (20u)
+
+#define BSC_CS2WCR_NORMAL_WM_SHIFT      (6u)
+#define BSC_CS2WCR_NORMAL_WR_SHIFT      (7u)
+#define BSC_CS2WCR_NORMAL_BAS_SHIFT     (20u)
+
+#define BSC_CS3WCR_NORMAL_WM_SHIFT      (6u)
+#define BSC_CS3WCR_NORMAL_WR_SHIFT      (7u)
+#define BSC_CS3WCR_NORMAL_BAS_SHIFT     (20u)
+
+#define BSC_CS4WCR_NORMAL_HW_SHIFT      (0u)
+#define BSC_CS4WCR_NORMAL_WM_SHIFT      (6u)
+#define BSC_CS4WCR_NORMAL_WR_SHIFT      (7u)
+#define BSC_CS4WCR_NORMAL_SW_SHIFT      (11u)
+#define BSC_CS4WCR_NORMAL_WW_SHIFT      (16u)
+#define BSC_CS4WCR_NORMAL_BAS_SHIFT     (20u)
+
+#define BSC_CS5WCR_NORMAL_HW_SHIFT      (0u)
+#define BSC_CS5WCR_NORMAL_WM_SHIFT      (6u)
+#define BSC_CS5WCR_NORMAL_WR_SHIFT      (7u)
+#define BSC_CS5WCR_NORMAL_SW_SHIFT      (11u)
+#define BSC_CS5WCR_NORMAL_WW_SHIFT      (16u)
+#define BSC_CS5WCR_NORMAL_MPXWBAS_SHIFT (20u)
+#define BSC_CS5WCR_NORMAL_SZSEL_SHIFT   (21u)
+
+#define BSC_CS0WCR_BROM_ASY_WM_SHIFT    (6u)
+#define BSC_CS0WCR_BROM_ASY_W_SHIFT     (7u)
+#define BSC_CS0WCR_BROM_ASY_BW_SHIFT    (16u)
+#define BSC_CS0WCR_BROM_ASY_BST_SHIFT   (20u)
+
+#define BSC_CS4WCR_BROM_ASY_HW_SHIFT    (0u)
+#define BSC_CS4WCR_BROM_ASY_WM_SHIFT    (6u)
+#define BSC_CS4WCR_BROM_ASY_W_SHIFT     (7u)
+#define BSC_CS4WCR_BROM_ASY_SW_SHIFT    (11u)
+#define BSC_CS4WCR_BROM_ASY_BW_SHIFT    (16u)
+#define BSC_CS4WCR_BROM_ASY_BST_SHIFT   (20u)
+
+#define BSC_CS2WCR_SDRAM_A2CL_SHIFT     (7u)
+
+#define BSC_CS3WCR_SDRAM_WTRC_SHIFT     (0u)
+#define BSC_CS3WCR_SDRAM_TRWL_SHIFT     (3u)
+#define BSC_CS3WCR_SDRAM_A3CL_SHIFT     (7u)
+#define BSC_CS3WCR_SDRAM_WTRCD_SHIFT    (10u)
+#define BSC_CS3WCR_SDRAM_WTRP_SHIFT     (13u)
+
+#define BSC_CS0WCR_BROM_SY_WM_SHIFT     (6u)
+#define BSC_CS0WCR_BROM_SY_W_SHIFT      (7u)
+#define BSC_CS0WCR_BROM_SY_BW_SHIFT     (16u)
+
+#define BSC_SDCR_A3COL_SHIFT            (0u)
+#define BSC_SDCR_A3ROW_SHIFT            (3u)
+#define BSC_SDCR_BACTV_SHIFT            (8u)
+#define BSC_SDCR_PDOWN_SHIFT            (9u)
+#define BSC_SDCR_RMODE_SHIFT            (10u)
+#define BSC_SDCR_RFSH_SHIFT             (11u)
+#define BSC_SDCR_DEEP_SHIFT             (13u)
+#define BSC_SDCR_A2COL_SHIFT            (16u)
+#define BSC_SDCR_A2ROW_SHIFT            (19u)
+
+#define BSC_RTCSR_RRC_SHIFT             (0u)
+#define BSC_RTCSR_CKS_SHIFT             (3u)
+#define BSC_RTCSR_CMIE_SHIFT            (6u)
+#define BSC_RTCSR_CMF_SHIFT             (7u)
+
+#define BSC_RTCNT_D_SHIFT               (0u)
+
+#define BSC_RTCOR_D_SHIFT               (0u)
+
+#define BSC_TOSCOR0_D_SHIFT             (0u)
+
+#define BSC_TOSCOR1_D_SHIFT             (0u)
+
+#define BSC_TOSCOR2_D_SHIFT             (0u)
+
+#define BSC_TOSCOR3_D_SHIFT             (0u)
+
+#define BSC_TOSCOR4_D_SHIFT             (0u)
+
+#define BSC_TOSCOR5_D_SHIFT             (0u)
+
+#define BSC_TOSTR_CS0TOSTF_SHIFT        (0u)
+#define BSC_TOSTR_CS1TOSTF_SHIFT        (1u)
+#define BSC_TOSTR_CS2TOSTF_SHIFT        (2u)
+#define BSC_TOSTR_CS3TOSTF_SHIFT        (3u)
+#define BSC_TOSTR_CS4TOSTF_SHIFT        (4u)
+#define BSC_TOSTR_CS5TOSTF_SHIFT        (5u)
+
+#define BSC_TOENR_CS0TOEN_SHIFT         (0u)
+#define BSC_TOENR_CS1TOEN_SHIFT         (1u)
+#define BSC_TOENR_CS2TOEN_SHIFT         (2u)
+#define BSC_TOENR_CS3TOEN_SHIFT         (3u)
+#define BSC_TOENR_CS4TOEN_SHIFT         (4u)
+#define BSC_TOENR_CS5TOEN_SHIFT         (5u)
+
+
+#endif /* BSC_IOBITMASK_H */
+
+/* End of File */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/cpg_iobitmask.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/cpg_iobitmask.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/cpg_iobitmask.h	(revision 270)
@@ -0,0 +1,461 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name   : cpg_iobitmask.h
+* $Rev: 1115 $
+* $Date:: 2014-07-09 15:35:02 +0900#$
+* Description : CPG register define header
+*******************************************************************************/
+#ifndef CPG_IOBITMASK_H
+#define CPG_IOBITMASK_H
+
+
+/* ==== Mask values for IO registers ==== */
+#define CPG_FRQCR_IFC                   (0x0300u)
+#define CPG_FRQCR_CKOEN                 (0x3000u)
+#define CPG_FRQCR_CKOEN2                (0x4000u)
+
+#define CPG_FRQCR2_GFC                  (0x0003u)
+
+#define CPG_CPUSTS_ISBUSY               (0x10u)
+
+#define CPG_STBCR1_DEEP                 (0x40u)
+#define CPG_STBCR1_STBY                 (0x80u)
+
+#define CPG_STBCR2_MSTP20               (0x01u)
+#define CPG_STBCR2_HIZ                  (0x80u)
+
+#define CPG_STBREQ1_STBRQ10             (0x01u)
+#define CPG_STBREQ1_STBRQ12             (0x04u)
+#define CPG_STBREQ1_STBRQ13             (0x08u)
+#define CPG_STBREQ1_STBRQ15             (0x20u)
+
+#define CPG_STBREQ2_STBRQ20             (0x01u)
+#define CPG_STBREQ2_STBRQ21             (0x02u)
+#define CPG_STBREQ2_STBRQ22             (0x04u)
+#define CPG_STBREQ2_STBRQ23             (0x08u)
+#define CPG_STBREQ2_STBRQ24             (0x10u)
+#define CPG_STBREQ2_STBRQ25             (0x20u)
+#define CPG_STBREQ2_STBRQ26             (0x40u)
+#define CPG_STBREQ2_STBRQ27             (0x80u)
+
+#define CPG_STBACK1_STBAK10             (0x01u)
+#define CPG_STBACK1_STBAK12             (0x04u)
+#define CPG_STBACK1_STBAK13             (0x08u)
+#define CPG_STBACK1_STBAK15             (0x20u)
+
+#define CPG_STBACK2_STBAK20             (0x01u)
+#define CPG_STBACK2_STBAK21             (0x02u)
+#define CPG_STBACK2_STBAK22             (0x04u)
+#define CPG_STBACK2_STBAK23             (0x08u)
+#define CPG_STBACK2_STBAK24             (0x10u)
+#define CPG_STBACK2_STBAK25             (0x20u)
+#define CPG_STBACK2_STBAK26             (0x40u)
+#define CPG_STBACK2_STBAK27             (0x80u)
+
+#define CPG_SYSCR1_VRAME0               (0x01u)
+#define CPG_SYSCR1_VRAME1               (0x02u)
+#define CPG_SYSCR1_VRAME2               (0x04u)
+#define CPG_SYSCR1_VRAME3               (0x08u)
+#define CPG_SYSCR1_VRAME4               (0x10u)
+
+#define CPG_SYSCR2_VRAMWE0              (0x01u)
+#define CPG_SYSCR2_VRAMWE1              (0x02u)
+#define CPG_SYSCR2_VRAMWE2              (0x04u)
+#define CPG_SYSCR2_VRAMWE3              (0x08u)
+#define CPG_SYSCR2_VRAMWE4              (0x10u)
+
+#define CPG_SYSCR3_RRAMWE0              (0x01u)
+#define CPG_SYSCR3_RRAMWE1              (0x02u)
+#define CPG_SYSCR3_RRAMWE2              (0x04u)
+#define CPG_SYSCR3_RRAMWE3              (0x08u)
+
+#define CPG_STBCR3_MSTP30               (0x01u)
+#define CPG_STBCR3_MSTP31               (0x02u)
+#define CPG_STBCR3_MSTP32               (0x04u)
+#define CPG_STBCR3_MSTP33               (0x08u)
+#define CPG_STBCR3_MSTP34               (0x10u)
+#define CPG_STBCR3_MSTP35               (0x20u)
+#define CPG_STBCR3_MSTP36               (0x40u)
+#define CPG_STBCR3_MSTP37               (0x80u)
+
+#define CPG_STBCR4_MSTP40               (0x01u)
+#define CPG_STBCR4_MSTP41               (0x02u)
+#define CPG_STBCR4_MSTP42               (0x04u)
+#define CPG_STBCR4_MSTP43               (0x08u)
+#define CPG_STBCR4_MSTP44               (0x10u)
+#define CPG_STBCR4_MSTP45               (0x20u)
+#define CPG_STBCR4_MSTP46               (0x40u)
+#define CPG_STBCR4_MSTP47               (0x80u)
+
+#define CPG_STBCR5_MSTP50               (0x01u)
+#define CPG_STBCR5_MSTP51               (0x02u)
+#define CPG_STBCR5_MSTP52               (0x04u)
+#define CPG_STBCR5_MSTP53               (0x08u)
+#define CPG_STBCR5_MSTP54               (0x10u)
+#define CPG_STBCR5_MSTP55               (0x20u)
+#define CPG_STBCR5_MSTP56               (0x40u)
+#define CPG_STBCR5_MSTP57               (0x80u)
+
+#define CPG_STBCR6_MSTP60               (0x01u)
+#define CPG_STBCR6_MSTP61               (0x02u)
+#define CPG_STBCR6_MSTP62               (0x04u)
+#define CPG_STBCR6_MSTP63               (0x08u)
+#define CPG_STBCR6_MSTP64               (0x10u)
+#define CPG_STBCR6_MSTP65               (0x20u)
+#define CPG_STBCR6_MSTP66               (0x40u)
+#define CPG_STBCR6_MSTP67               (0x80u)
+
+#define CPG_STBCR7_MSTP70               (0x01u)
+#define CPG_STBCR7_MSTP71               (0x02u)
+#define CPG_STBCR7_MSTP73               (0x08u)
+#define CPG_STBCR7_MSTP74               (0x10u)
+#define CPG_STBCR7_MSTP76               (0x40u)
+#define CPG_STBCR7_MSTP77               (0x80u)
+
+#define CPG_STBCR8_MSTP81               (0x02u)
+#define CPG_STBCR8_MSTP82               (0x04u)
+#define CPG_STBCR8_MSTP83               (0x08u)
+#define CPG_STBCR8_MSTP84               (0x10u)
+#define CPG_STBCR8_MSTP85               (0x20u)
+#define CPG_STBCR8_MSTP86               (0x40u)
+#define CPG_STBCR8_MSTP87               (0x80u)
+
+#define CPG_STBCR9_MSTP90               (0x01u)
+#define CPG_STBCR9_MSTP91               (0x02u)
+#define CPG_STBCR9_MSTP92               (0x04u)
+#define CPG_STBCR9_MSTP93               (0x08u)
+#define CPG_STBCR9_MSTP94               (0x10u)
+#define CPG_STBCR9_MSTP95               (0x20u)
+#define CPG_STBCR9_MSTP96               (0x40u)
+#define CPG_STBCR9_MSTP97               (0x80u)
+
+#define CPG_STBCR10_MSTP100             (0x01u)
+#define CPG_STBCR10_MSTP101             (0x02u)
+#define CPG_STBCR10_MSTP102             (0x04u)
+#define CPG_STBCR10_MSTP103             (0x08u)
+#define CPG_STBCR10_MSTP104             (0x10u)
+#define CPG_STBCR10_MSTP105             (0x20u)
+#define CPG_STBCR10_MSTP106             (0x40u)
+#define CPG_STBCR10_MSTP107             (0x80u)
+
+#define CPG_STBCR11_MSTP110             (0x01u)
+#define CPG_STBCR11_MSTP111             (0x02u)
+#define CPG_STBCR11_MSTP112             (0x04u)
+#define CPG_STBCR11_MSTP113             (0x08u)
+#define CPG_STBCR11_MSTP114             (0x10u)
+#define CPG_STBCR11_MSTP115             (0x20u)
+
+#define CPG_STBCR12_MSTP120             (0x01u)
+#define CPG_STBCR12_MSTP121             (0x02u)
+#define CPG_STBCR12_MSTP122             (0x04u)
+#define CPG_STBCR12_MSTP123             (0x08u)
+
+#define CPG_STBCR13_MSTP131             (0x02u)
+#define CPG_STBCR13_MSTP132             (0x04u)
+
+#define CPG_SWRSTCR1_SRST11             (0x02u)
+#define CPG_SWRSTCR1_SRST12             (0x04u)
+#define CPG_SWRSTCR1_SRST13             (0x08u)
+#define CPG_SWRSTCR1_SRST14             (0x10u)
+#define CPG_SWRSTCR1_SRST15             (0x20u)
+#define CPG_SWRSTCR1_SRST16             (0x40u)
+#define CPG_SWRSTCR1_AXTALE             (0x80u)
+
+#define CPG_SWRSTCR2_SRST21             (0x02u)
+
+#define CPG_SWRSTCR3_SRST32             (0x04u)
+
+#define CPG_RRAMKP_RRAMKP0              (0x01u)
+#define CPG_RRAMKP_RRAMKP1              (0x02u)
+#define CPG_RRAMKP_RRAMKP2              (0x04u)
+#define CPG_RRAMKP_RRAMKP3              (0x08u)
+
+#define CPG_DSCTR_RAMBOOT               (0x40u)
+#define CPG_DSCTR_EBUSKEEPE             (0x80u)
+
+#define CPG_DSSSR_P8_2                  (0x0001u)
+#define CPG_DSSSR_P9_1                  (0x0002u)
+#define CPG_DSSSR_P2_15                 (0x0004u)
+#define CPG_DSSSR_P7_8                  (0x0008u)
+#define CPG_DSSSR_P5_9                  (0x0010u)
+#define CPG_DSSSR_P6_4                  (0x0020u)
+#define CPG_DSSSR_RTCAR                 (0x0040u)
+#define CPG_DSSSR_NMI                   (0x0100u)
+#define CPG_DSSSR_P3_3                  (0x0200u)
+#define CPG_DSSSR_P8_7                  (0x0400u)
+#define CPG_DSSSR_P2_12                 (0x0800u)
+#define CPG_DSSSR_P3_1                  (0x1000u)
+#define CPG_DSSSR_P3_9                  (0x2000u)
+#define CPG_DSSSR_P6_2                  (0x4000u)
+
+#define CPG_DSESR_P8_2E                 (0x0001u)
+#define CPG_DSESR_P9_1E                 (0x0002u)
+#define CPG_DSESR_P2_15E                (0x0004u)
+#define CPG_DSESR_P7_8E                 (0x0008u)
+#define CPG_DSESR_P5_9E                 (0x0010u)
+#define CPG_DSESR_P6_4E                 (0x0020u)
+#define CPG_DSESR_NMIE                  (0x0100u)
+#define CPG_DSESR_P3_3E                 (0x0200u)
+#define CPG_DSESR_P8_7E                 (0x0400u)
+#define CPG_DSESR_P2_12E                (0x0800u)
+#define CPG_DSESR_P3_1E                 (0x1000u)
+#define CPG_DSESR_P3_9E                 (0x2000u)
+#define CPG_DSESR_P6_2E                 (0x4000u)
+
+#define CPG_DSFR_P8_2F                  (0x0001u)
+#define CPG_DSFR_P9_1F                  (0x0002u)
+#define CPG_DSFR_P2_15F                 (0x0004u)
+#define CPG_DSFR_P7_8F                  (0x0008u)
+#define CPG_DSFR_P5_9F                  (0x0010u)
+#define CPG_DSFR_P6_4F                  (0x0020u)
+#define CPG_DSFR_RTCARF                 (0x0040u)
+#define CPG_DSFR_NMIF                   (0x0100u)
+#define CPG_DSFR_P3_3F                  (0x0200u)
+#define CPG_DSFR_P8_7F                  (0x0400u)
+#define CPG_DSFR_P2_12F                 (0x0800u)
+#define CPG_DSFR_P3_1F                  (0x1000u)
+#define CPG_DSFR_P3_9F                  (0x2000u)
+#define CPG_DSFR_P6_2F                  (0x4000u)
+#define CPG_DSFR_IOKEEP                 (0x8000u)
+
+#define CPG_XTALCTR_GAIN0               (0x01u)
+#define CPG_XTALCTR_GAIN1               (0x02u)
+
+
+/* ==== Shift values for IO registers ==== */
+#define CPG_FRQCR_IFC_SHIFT             (8u)
+#define CPG_FRQCR_CKOEN_SHIFT           (12u)
+#define CPG_FRQCR_CKOEN2_SHIFT          (14u)
+
+#define CPG_FRQCR2_GFC_SHIFT            (0u)
+
+#define CPG_CPUSTS_ISBUSY_SHIFT         (4u)
+
+#define CPG_STBCR1_DEEP_SHIFT           (6u)
+#define CPG_STBCR1_STBY_SHIFT           (7u)
+
+#define CPG_STBCR2_MSTP20_SHIFT         (0u)
+#define CPG_STBCR2_HIZ_SHIFT            (7u)
+
+#define CPG_STBREQ1_STBRQ10_SHIFT       (0u)
+#define CPG_STBREQ1_STBRQ12_SHIFT       (2u)
+#define CPG_STBREQ1_STBRQ13_SHIFT       (3u)
+#define CPG_STBREQ1_STBRQ15_SHIFT       (5u)
+
+#define CPG_STBREQ2_STBRQ20_SHIFT       (0u)
+#define CPG_STBREQ2_STBRQ21_SHIFT       (1u)
+#define CPG_STBREQ2_STBRQ22_SHIFT       (2u)
+#define CPG_STBREQ2_STBRQ23_SHIFT       (3u)
+#define CPG_STBREQ2_STBRQ24_SHIFT       (4u)
+#define CPG_STBREQ2_STBRQ25_SHIFT       (5u)
+#define CPG_STBREQ2_STBRQ26_SHIFT       (6u)
+#define CPG_STBREQ2_STBRQ27_SHIFT       (7u)
+
+#define CPG_STBACK1_STBAK10_SHIFT       (0u)
+#define CPG_STBACK1_STBAK12_SHIFT       (2u)
+#define CPG_STBACK1_STBAK13_SHIFT       (3u)
+#define CPG_STBACK1_STBAK15_SHIFT       (5u)
+
+#define CPG_STBACK2_STBAK20_SHIFT       (0u)
+#define CPG_STBACK2_STBAK21_SHIFT       (1u)
+#define CPG_STBACK2_STBAK22_SHIFT       (2u)
+#define CPG_STBACK2_STBAK23_SHIFT       (3u)
+#define CPG_STBACK2_STBAK24_SHIFT       (4u)
+#define CPG_STBACK2_STBAK25_SHIFT       (5u)
+#define CPG_STBACK2_STBAK26_SHIFT       (6u)
+#define CPG_STBACK2_STBAK27_SHIFT       (7u)
+
+#define CPG_SYSCR1_VRAME0_SHIFT         (0u)
+#define CPG_SYSCR1_VRAME1_SHIFT         (1u)
+#define CPG_SYSCR1_VRAME2_SHIFT         (2u)
+#define CPG_SYSCR1_VRAME3_SHIFT         (3u)
+#define CPG_SYSCR1_VRAME4_SHIFT         (4u)
+
+#define CPG_SYSCR2_VRAMWE0_SHIFT        (0u)
+#define CPG_SYSCR2_VRAMWE1_SHIFT        (1u)
+#define CPG_SYSCR2_VRAMWE2_SHIFT        (2u)
+#define CPG_SYSCR2_VRAMWE3_SHIFT        (3u)
+#define CPG_SYSCR2_VRAMWE4_SHIFT        (4u)
+
+#define CPG_SYSCR3_RRAMWE0_SHIFT        (0u)
+#define CPG_SYSCR3_RRAMWE1_SHIFT        (1u)
+#define CPG_SYSCR3_RRAMWE2_SHIFT        (2u)
+#define CPG_SYSCR3_RRAMWE3_SHIFT        (3u)
+
+#define CPG_STBCR3_MSTP30_SHIFT         (0u)
+#define CPG_STBCR3_MSTP31_SHIFT         (1u)
+#define CPG_STBCR3_MSTP32_SHIFT         (2u)
+#define CPG_STBCR3_MSTP33_SHIFT         (3u)
+#define CPG_STBCR3_MSTP34_SHIFT         (4u)
+#define CPG_STBCR3_MSTP35_SHIFT         (5u)
+#define CPG_STBCR3_MSTP36_SHIFT         (6u)
+#define CPG_STBCR3_MSTP37_SHIFT         (7u)
+
+#define CPG_STBCR4_MSTP40_SHIFT         (0u)
+#define CPG_STBCR4_MSTP41_SHIFT         (1u)
+#define CPG_STBCR4_MSTP42_SHIFT         (2u)
+#define CPG_STBCR4_MSTP43_SHIFT         (3u)
+#define CPG_STBCR4_MSTP44_SHIFT         (4u)
+#define CPG_STBCR4_MSTP45_SHIFT         (5u)
+#define CPG_STBCR4_MSTP46_SHIFT         (6u)
+#define CPG_STBCR4_MSTP47_SHIFT         (7u)
+
+#define CPG_STBCR5_MSTP50_SHIFT         (0u)
+#define CPG_STBCR5_MSTP51_SHIFT         (1u)
+#define CPG_STBCR5_MSTP52_SHIFT         (2u)
+#define CPG_STBCR5_MSTP53_SHIFT         (3u)
+#define CPG_STBCR5_MSTP54_SHIFT         (4u)
+#define CPG_STBCR5_MSTP55_SHIFT         (5u)
+#define CPG_STBCR5_MSTP56_SHIFT         (6u)
+#define CPG_STBCR5_MSTP57_SHIFT         (7u)
+
+#define CPG_STBCR6_MSTP60_SHIFT         (0u)
+#define CPG_STBCR6_MSTP61_SHIFT         (1u)
+#define CPG_STBCR6_MSTP62_SHIFT         (2u)
+#define CPG_STBCR6_MSTP63_SHIFT         (3u)
+#define CPG_STBCR6_MSTP64_SHIFT         (4u)
+#define CPG_STBCR6_MSTP65_SHIFT         (5u)
+#define CPG_STBCR6_MSTP66_SHIFT         (6u)
+#define CPG_STBCR6_MSTP67_SHIFT         (7u)
+
+#define CPG_STBCR7_MSTP70_SHIFT         (0u)
+#define CPG_STBCR7_MSTP71_SHIFT         (1u)
+#define CPG_STBCR7_MSTP73_SHIFT         (3u)
+#define CPG_STBCR7_MSTP74_SHIFT         (4u)
+#define CPG_STBCR7_MSTP76_SHIFT         (6u)
+#define CPG_STBCR7_MSTP77_SHIFT         (7u)
+
+#define CPG_STBCR8_MSTP81_SHIFT         (1u)
+#define CPG_STBCR8_MSTP82_SHIFT         (2u)
+#define CPG_STBCR8_MSTP83_SHIFT         (3u)
+#define CPG_STBCR8_MSTP84_SHIFT         (4u)
+#define CPG_STBCR8_MSTP85_SHIFT         (5u)
+#define CPG_STBCR8_MSTP86_SHIFT         (6u)
+#define CPG_STBCR8_MSTP87_SHIFT         (7u)
+
+#define CPG_STBCR9_MSTP90_SHIFT         (0u)
+#define CPG_STBCR9_MSTP91_SHIFT         (1u)
+#define CPG_STBCR9_MSTP92_SHIFT         (2u)
+#define CPG_STBCR9_MSTP93_SHIFT         (3u)
+#define CPG_STBCR9_MSTP94_SHIFT         (4u)
+#define CPG_STBCR9_MSTP95_SHIFT         (5u)
+#define CPG_STBCR9_MSTP96_SHIFT         (6u)
+#define CPG_STBCR9_MSTP97_SHIFT         (7u)
+
+#define CPG_STBCR10_MSTP100_SHIFT       (0u)
+#define CPG_STBCR10_MSTP101_SHIFT       (1u)
+#define CPG_STBCR10_MSTP102_SHIFT       (2u)
+#define CPG_STBCR10_MSTP103_SHIFT       (3u)
+#define CPG_STBCR10_MSTP104_SHIFT       (4u)
+#define CPG_STBCR10_MSTP105_SHIFT       (5u)
+#define CPG_STBCR10_MSTP106_SHIFT       (6u)
+#define CPG_STBCR10_MSTP107_SHIFT       (7u)
+
+#define CPG_STBCR11_MSTP110_SHIFT       (0u)
+#define CPG_STBCR11_MSTP111_SHIFT       (1u)
+#define CPG_STBCR11_MSTP112_SHIFT       (2u)
+#define CPG_STBCR11_MSTP113_SHIFT       (3u)
+#define CPG_STBCR11_MSTP114_SHIFT       (4u)
+#define CPG_STBCR11_MSTP115_SHIFT       (5u)
+
+#define CPG_STBCR12_MSTP120_SHIFT       (0u)
+#define CPG_STBCR12_MSTP121_SHIFT       (1u)
+#define CPG_STBCR12_MSTP122_SHIFT       (2u)
+#define CPG_STBCR12_MSTP123_SHIFT       (3u)
+
+#define CPG_STBCR13_MSTP131_SHIFT       (1u)
+#define CPG_STBCR13_MSTP132_SHIFT       (2u)
+
+#define CPG_SWRSTCR1_SRST11_SHIFT       (1u)
+#define CPG_SWRSTCR1_SRST12_SHIFT       (2u)
+#define CPG_SWRSTCR1_SRST13_SHIFT       (3u)
+#define CPG_SWRSTCR1_SRST14_SHIFT       (4u)
+#define CPG_SWRSTCR1_SRST15_SHIFT       (5u)
+#define CPG_SWRSTCR1_SRST16_SHIFT       (6u)
+#define CPG_SWRSTCR1_AXTALE_SHIFT       (7u)
+
+#define CPG_SWRSTCR2_SRST21_SHIFT       (1u)
+
+#define CPG_SWRSTCR3_SRST32_SHIFT       (2u)
+
+#define CPG_RRAMKP_RRAMKP0_SHIFT        (0u)
+#define CPG_RRAMKP_RRAMKP1_SHIFT        (1u)
+#define CPG_RRAMKP_RRAMKP2_SHIFT        (2u)
+#define CPG_RRAMKP_RRAMKP3_SHIFT        (3u)
+
+#define CPG_DSCTR_RAMBOOT_SHIFT         (6u)
+#define CPG_DSCTR_EBUSKEEPE_SHIFT       (7u)
+
+#define CPG_DSSSR_P8_2_SHIFT            (0u)
+#define CPG_DSSSR_P9_1_SHIFT            (1u)
+#define CPG_DSSSR_P2_15_SHIFT           (2u)
+#define CPG_DSSSR_P7_8_SHIFT            (3u)
+#define CPG_DSSSR_P5_9_SHIFT            (4u)
+#define CPG_DSSSR_P6_4_SHIFT            (5u)
+#define CPG_DSSSR_RTCAR_SHIFT           (6u)
+#define CPG_DSSSR_NMI_SHIFT             (8u)
+#define CPG_DSSSR_P3_3_SHIFT            (9u)
+#define CPG_DSSSR_P8_7_SHIFT            (10u)
+#define CPG_DSSSR_P2_12_SHIFT           (11u)
+#define CPG_DSSSR_P3_1_SHIFT            (12u)
+#define CPG_DSSSR_P3_9_SHIFT            (13u)
+#define CPG_DSSSR_P6_2_SHIFT            (14u)
+
+#define CPG_DSESR_P8_2E_SHIFT           (0u)
+#define CPG_DSESR_P9_1E_SHIFT           (1u)
+#define CPG_DSESR_P2_15E_SHIFT          (2u)
+#define CPG_DSESR_P7_8E_SHIFT           (3u)
+#define CPG_DSESR_P5_9E_SHIFT           (4u)
+#define CPG_DSESR_P6_4E_SHIFT           (5u)
+#define CPG_DSESR_NMIE_SHIFT            (8u)
+#define CPG_DSESR_P3_3E_SHIFT           (9u)
+#define CPG_DSESR_P8_7E_SHIFT           (10u)
+#define CPG_DSESR_P2_12E_SHIFT          (11u)
+#define CPG_DSESR_P3_1E_SHIFT           (12u)
+#define CPG_DSESR_P3_9E_SHIFT           (13u)
+#define CPG_DSESR_P6_2E_SHIFT           (14u)
+
+#define CPG_DSFR_P8_2F_SHIFT            (0u)
+#define CPG_DSFR_P9_1F_SHIFT            (1u)
+#define CPG_DSFR_P2_15F_SHIFT           (2u)
+#define CPG_DSFR_P7_8F_SHIFT            (3u)
+#define CPG_DSFR_P5_9F_SHIFT            (4u)
+#define CPG_DSFR_P6_4F_SHIFT            (5u)
+#define CPG_DSFR_RTCARF_SHIFT           (6u)
+#define CPG_DSFR_NMIF_SHIFT             (8u)
+#define CPG_DSFR_P3_3F_SHIFT            (9u)
+#define CPG_DSFR_P8_7F_SHIFT            (10u)
+#define CPG_DSFR_P2_12F_SHIFT           (11u)
+#define CPG_DSFR_P3_1F_SHIFT            (12u)
+#define CPG_DSFR_P3_9F_SHIFT            (13u)
+#define CPG_DSFR_P6_2F_SHIFT            (14u)
+#define CPG_DSFR_IOKEEP_SHIFT           (15u)
+
+#define CPG_XTALCTR_GAIN0_SHIFT         (0u)
+#define CPG_XTALCTR_GAIN1_SHIFT         (1u)
+
+
+#endif /* CPG_IOBITMASK_H */
+
+/* End of File */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/dmac_iobitmask.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/dmac_iobitmask.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/dmac_iobitmask.h	(revision 270)
@@ -0,0 +1,2675 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name   : dmac_iobitmask.h
+* $Rev: 1114 $
+* $Date:: 2014-07-09 14:56:39 +0900#$
+* Description : DMAC register define header
+*******************************************************************************/
+#ifndef DMAC_IOBITMASK_H
+#define DMAC_IOBITMASK_H
+
+
+/* ==== Mask values for IO registers ==== */
+/* ---- DMAC0 ---- */
+#define DMAC0_N0SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC0_N0DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC0_N0TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC0_N1SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC0_N1DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC0_N1TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC0_CRSA_n_CRSA                   (0xFFFFFFFFuL)
+
+#define DMAC0_CRDA_n_CRDA                   (0xFFFFFFFFuL)
+
+#define DMAC0_CRTB_n_CRTB                   (0xFFFFFFFFuL)
+
+#define DMAC0_CHSTAT_n_EN                   (0x00000001uL)
+#define DMAC0_CHSTAT_n_RQST                 (0x00000002uL)
+#define DMAC0_CHSTAT_n_TACT                 (0x00000004uL)
+#define DMAC0_CHSTAT_n_SUS                  (0x00000008uL)
+#define DMAC0_CHSTAT_n_ER                   (0x00000010uL)
+#define DMAC0_CHSTAT_n_END                  (0x00000020uL)
+#define DMAC0_CHSTAT_n_TC                   (0x00000040uL)
+#define DMAC0_CHSTAT_n_SR                   (0x00000080uL)
+#define DMAC0_CHSTAT_n_DL                   (0x00000100uL)
+#define DMAC0_CHSTAT_n_DW                   (0x00000200uL)
+#define DMAC0_CHSTAT_n_DER                  (0x00000400uL)
+#define DMAC0_CHSTAT_n_MODE                 (0x00000800uL)
+#define DMAC0_CHSTAT_n_INTMSK               (0x00010000uL)
+
+#define DMAC0_CHCTRL_n_SETEN                (0x00000001uL)
+#define DMAC0_CHCTRL_n_CLREN                (0x00000002uL)
+#define DMAC0_CHCTRL_n_STG                  (0x00000004uL)
+#define DMAC0_CHCTRL_n_SWRST                (0x00000008uL)
+#define DMAC0_CHCTRL_n_CLRRQ                (0x00000010uL)
+#define DMAC0_CHCTRL_n_CLREND               (0x00000020uL)
+#define DMAC0_CHCTRL_n_CLRTC                (0x00000040uL)
+#define DMAC0_CHCTRL_n_SETSUS               (0x00000100uL)
+#define DMAC0_CHCTRL_n_CLRSUS               (0x00000200uL)
+#define DMAC0_CHCTRL_n_SETINTMSK            (0x00010000uL)
+#define DMAC0_CHCTRL_n_CLRINTMSK            (0x00020000uL)
+
+#define DMAC0_CHCFG_n_SEL                   (0x00000007uL)
+#define DMAC0_CHCFG_n_REQD                  (0x00000008uL)
+#define DMAC0_CHCFG_n_LOEN                  (0x00000010uL)
+#define DMAC0_CHCFG_n_HIEN                  (0x00000020uL)
+#define DMAC0_CHCFG_n_LVL                   (0x00000040uL)
+#define DMAC0_CHCFG_n_AM                    (0x00000700uL)
+#define DMAC0_CHCFG_n_SDS                   (0x0000F000uL)
+#define DMAC0_CHCFG_n_DDS                   (0x000F0000uL)
+#define DMAC0_CHCFG_n_SAD                   (0x00100000uL)
+#define DMAC0_CHCFG_n_DAD                   (0x00200000uL)
+#define DMAC0_CHCFG_n_TM                    (0x00400000uL)
+#define DMAC0_CHCFG_n_DEM                   (0x01000000uL)
+#define DMAC0_CHCFG_n_TCM                   (0x02000000uL)
+#define DMAC0_CHCFG_n_SBE                   (0x08000000uL)
+#define DMAC0_CHCFG_n_RSEL                  (0x10000000uL)
+#define DMAC0_CHCFG_n_RSW                   (0x20000000uL)
+#define DMAC0_CHCFG_n_REN                   (0x40000000uL)
+#define DMAC0_CHCFG_n_DMS                   (0x80000000uL)
+
+#define DMAC0_CHITVL_n_ITVL                 (0x0000FFFFuL)
+
+#define DMAC0_CHEXT_n_SCA                   (0x000000F0uL)
+#define DMAC0_CHEXT_n_DCA                   (0x0000F000uL)
+
+#define DMAC0_NXLA_n_NXLA                   (0xFFFFFFFFuL)
+
+#define DMAC0_CRLA_n_CRLA                   (0xFFFFFFFFuL)
+
+/* ---- DMAC1 ---- */
+#define DMAC1_N0SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC1_N0DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC1_N0TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC1_N1SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC1_N1DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC1_N1TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC1_CRSA_n_CRSA                   (0xFFFFFFFFuL)
+
+#define DMAC1_CRDA_n_CRDA                   (0xFFFFFFFFuL)
+
+#define DMAC1_CRTB_n_CRTB                   (0xFFFFFFFFuL)
+
+#define DMAC1_CHSTAT_n_EN                   (0x00000001uL)
+#define DMAC1_CHSTAT_n_RQST                 (0x00000002uL)
+#define DMAC1_CHSTAT_n_TACT                 (0x00000004uL)
+#define DMAC1_CHSTAT_n_SUS                  (0x00000008uL)
+#define DMAC1_CHSTAT_n_ER                   (0x00000010uL)
+#define DMAC1_CHSTAT_n_END                  (0x00000020uL)
+#define DMAC1_CHSTAT_n_TC                   (0x00000040uL)
+#define DMAC1_CHSTAT_n_SR                   (0x00000080uL)
+#define DMAC1_CHSTAT_n_DL                   (0x00000100uL)
+#define DMAC1_CHSTAT_n_DW                   (0x00000200uL)
+#define DMAC1_CHSTAT_n_DER                  (0x00000400uL)
+#define DMAC1_CHSTAT_n_MODE                 (0x00000800uL)
+#define DMAC1_CHSTAT_n_INTMSK               (0x00010000uL)
+
+#define DMAC1_CHCTRL_n_SETEN                (0x00000001uL)
+#define DMAC1_CHCTRL_n_CLREN                (0x00000002uL)
+#define DMAC1_CHCTRL_n_STG                  (0x00000004uL)
+#define DMAC1_CHCTRL_n_SWRST                (0x00000008uL)
+#define DMAC1_CHCTRL_n_CLRRQ                (0x00000010uL)
+#define DMAC1_CHCTRL_n_CLREND               (0x00000020uL)
+#define DMAC1_CHCTRL_n_CLRTC                (0x00000040uL)
+#define DMAC1_CHCTRL_n_SETSUS               (0x00000100uL)
+#define DMAC1_CHCTRL_n_CLRSUS               (0x00000200uL)
+#define DMAC1_CHCTRL_n_SETINTMSK            (0x00010000uL)
+#define DMAC1_CHCTRL_n_CLRINTMSK            (0x00020000uL)
+
+#define DMAC1_CHCFG_n_SEL                   (0x00000007uL)
+#define DMAC1_CHCFG_n_REQD                  (0x00000008uL)
+#define DMAC1_CHCFG_n_LOEN                  (0x00000010uL)
+#define DMAC1_CHCFG_n_HIEN                  (0x00000020uL)
+#define DMAC1_CHCFG_n_LVL                   (0x00000040uL)
+#define DMAC1_CHCFG_n_AM                    (0x00000700uL)
+#define DMAC1_CHCFG_n_SDS                   (0x0000F000uL)
+#define DMAC1_CHCFG_n_DDS                   (0x000F0000uL)
+#define DMAC1_CHCFG_n_SAD                   (0x00100000uL)
+#define DMAC1_CHCFG_n_DAD                   (0x00200000uL)
+#define DMAC1_CHCFG_n_TM                    (0x00400000uL)
+#define DMAC1_CHCFG_n_DEM                   (0x01000000uL)
+#define DMAC1_CHCFG_n_TCM                   (0x02000000uL)
+#define DMAC1_CHCFG_n_SBE                   (0x08000000uL)
+#define DMAC1_CHCFG_n_RSEL                  (0x10000000uL)
+#define DMAC1_CHCFG_n_RSW                   (0x20000000uL)
+#define DMAC1_CHCFG_n_REN                   (0x40000000uL)
+#define DMAC1_CHCFG_n_DMS                   (0x80000000uL)
+
+#define DMAC1_CHITVL_n_ITVL                 (0x0000FFFFuL)
+
+#define DMAC1_CHEXT_n_SCA                   (0x000000F0uL)
+#define DMAC1_CHEXT_n_DCA                   (0x0000F000uL)
+
+#define DMAC1_NXLA_n_NXLA                   (0xFFFFFFFFuL)
+
+#define DMAC1_CRLA_n_CRLA                   (0xFFFFFFFFuL)
+
+/* ---- DMAC2 ---- */
+#define DMAC2_N0SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC2_N0DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC2_N0TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC2_N1SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC2_N1DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC2_N1TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC2_CRSA_n_CRSA                   (0xFFFFFFFFuL)
+
+#define DMAC2_CRDA_n_CRDA                   (0xFFFFFFFFuL)
+
+#define DMAC2_CRTB_n_CRTB                   (0xFFFFFFFFuL)
+
+#define DMAC2_CHSTAT_n_EN                   (0x00000001uL)
+#define DMAC2_CHSTAT_n_RQST                 (0x00000002uL)
+#define DMAC2_CHSTAT_n_TACT                 (0x00000004uL)
+#define DMAC2_CHSTAT_n_SUS                  (0x00000008uL)
+#define DMAC2_CHSTAT_n_ER                   (0x00000010uL)
+#define DMAC2_CHSTAT_n_END                  (0x00000020uL)
+#define DMAC2_CHSTAT_n_TC                   (0x00000040uL)
+#define DMAC2_CHSTAT_n_SR                   (0x00000080uL)
+#define DMAC2_CHSTAT_n_DL                   (0x00000100uL)
+#define DMAC2_CHSTAT_n_DW                   (0x00000200uL)
+#define DMAC2_CHSTAT_n_DER                  (0x00000400uL)
+#define DMAC2_CHSTAT_n_MODE                 (0x00000800uL)
+#define DMAC2_CHSTAT_n_INTMSK               (0x00010000uL)
+
+#define DMAC2_CHCTRL_n_SETEN                (0x00000001uL)
+#define DMAC2_CHCTRL_n_CLREN                (0x00000002uL)
+#define DMAC2_CHCTRL_n_STG                  (0x00000004uL)
+#define DMAC2_CHCTRL_n_SWRST                (0x00000008uL)
+#define DMAC2_CHCTRL_n_CLRRQ                (0x00000010uL)
+#define DMAC2_CHCTRL_n_CLREND               (0x00000020uL)
+#define DMAC2_CHCTRL_n_CLRTC                (0x00000040uL)
+#define DMAC2_CHCTRL_n_SETSUS               (0x00000100uL)
+#define DMAC2_CHCTRL_n_CLRSUS               (0x00000200uL)
+#define DMAC2_CHCTRL_n_SETINTMSK            (0x00010000uL)
+#define DMAC2_CHCTRL_n_CLRINTMSK            (0x00020000uL)
+
+#define DMAC2_CHCFG_n_SEL                   (0x00000007uL)
+#define DMAC2_CHCFG_n_REQD                  (0x00000008uL)
+#define DMAC2_CHCFG_n_LOEN                  (0x00000010uL)
+#define DMAC2_CHCFG_n_HIEN                  (0x00000020uL)
+#define DMAC2_CHCFG_n_LVL                   (0x00000040uL)
+#define DMAC2_CHCFG_n_AM                    (0x00000700uL)
+#define DMAC2_CHCFG_n_SDS                   (0x0000F000uL)
+#define DMAC2_CHCFG_n_DDS                   (0x000F0000uL)
+#define DMAC2_CHCFG_n_SAD                   (0x00100000uL)
+#define DMAC2_CHCFG_n_DAD                   (0x00200000uL)
+#define DMAC2_CHCFG_n_TM                    (0x00400000uL)
+#define DMAC2_CHCFG_n_DEM                   (0x01000000uL)
+#define DMAC2_CHCFG_n_TCM                   (0x02000000uL)
+#define DMAC2_CHCFG_n_SBE                   (0x08000000uL)
+#define DMAC2_CHCFG_n_RSEL                  (0x10000000uL)
+#define DMAC2_CHCFG_n_RSW                   (0x20000000uL)
+#define DMAC2_CHCFG_n_REN                   (0x40000000uL)
+#define DMAC2_CHCFG_n_DMS                   (0x80000000uL)
+
+#define DMAC2_CHITVL_n_ITVL                 (0x0000FFFFuL)
+
+#define DMAC2_CHEXT_n_SCA                   (0x000000F0uL)
+#define DMAC2_CHEXT_n_DCA                   (0x0000F000uL)
+
+#define DMAC2_NXLA_n_NXLA                   (0xFFFFFFFFuL)
+
+#define DMAC2_CRLA_n_CRLA                   (0xFFFFFFFFuL)
+
+/* ---- DMAC3 ---- */
+#define DMAC3_N0SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC3_N0DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC3_N0TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC3_N1SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC3_N1DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC3_N1TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC3_CRSA_n_CRSA                   (0xFFFFFFFFuL)
+
+#define DMAC3_CRDA_n_CRDA                   (0xFFFFFFFFuL)
+
+#define DMAC3_CRTB_n_CRTB                   (0xFFFFFFFFuL)
+
+#define DMAC3_CHSTAT_n_EN                   (0x00000001uL)
+#define DMAC3_CHSTAT_n_RQST                 (0x00000002uL)
+#define DMAC3_CHSTAT_n_TACT                 (0x00000004uL)
+#define DMAC3_CHSTAT_n_SUS                  (0x00000008uL)
+#define DMAC3_CHSTAT_n_ER                   (0x00000010uL)
+#define DMAC3_CHSTAT_n_END                  (0x00000020uL)
+#define DMAC3_CHSTAT_n_TC                   (0x00000040uL)
+#define DMAC3_CHSTAT_n_SR                   (0x00000080uL)
+#define DMAC3_CHSTAT_n_DL                   (0x00000100uL)
+#define DMAC3_CHSTAT_n_DW                   (0x00000200uL)
+#define DMAC3_CHSTAT_n_DER                  (0x00000400uL)
+#define DMAC3_CHSTAT_n_MODE                 (0x00000800uL)
+#define DMAC3_CHSTAT_n_INTMSK               (0x00010000uL)
+
+#define DMAC3_CHCTRL_n_SETEN                (0x00000001uL)
+#define DMAC3_CHCTRL_n_CLREN                (0x00000002uL)
+#define DMAC3_CHCTRL_n_STG                  (0x00000004uL)
+#define DMAC3_CHCTRL_n_SWRST                (0x00000008uL)
+#define DMAC3_CHCTRL_n_CLRRQ                (0x00000010uL)
+#define DMAC3_CHCTRL_n_CLREND               (0x00000020uL)
+#define DMAC3_CHCTRL_n_CLRTC                (0x00000040uL)
+#define DMAC3_CHCTRL_n_SETSUS               (0x00000100uL)
+#define DMAC3_CHCTRL_n_CLRSUS               (0x00000200uL)
+#define DMAC3_CHCTRL_n_SETINTMSK            (0x00010000uL)
+#define DMAC3_CHCTRL_n_CLRINTMSK            (0x00020000uL)
+
+#define DMAC3_CHCFG_n_SEL                   (0x00000007uL)
+#define DMAC3_CHCFG_n_REQD                  (0x00000008uL)
+#define DMAC3_CHCFG_n_LOEN                  (0x00000010uL)
+#define DMAC3_CHCFG_n_HIEN                  (0x00000020uL)
+#define DMAC3_CHCFG_n_LVL                   (0x00000040uL)
+#define DMAC3_CHCFG_n_AM                    (0x00000700uL)
+#define DMAC3_CHCFG_n_SDS                   (0x0000F000uL)
+#define DMAC3_CHCFG_n_DDS                   (0x000F0000uL)
+#define DMAC3_CHCFG_n_SAD                   (0x00100000uL)
+#define DMAC3_CHCFG_n_DAD                   (0x00200000uL)
+#define DMAC3_CHCFG_n_TM                    (0x00400000uL)
+#define DMAC3_CHCFG_n_DEM                   (0x01000000uL)
+#define DMAC3_CHCFG_n_TCM                   (0x02000000uL)
+#define DMAC3_CHCFG_n_SBE                   (0x08000000uL)
+#define DMAC3_CHCFG_n_RSEL                  (0x10000000uL)
+#define DMAC3_CHCFG_n_RSW                   (0x20000000uL)
+#define DMAC3_CHCFG_n_REN                   (0x40000000uL)
+#define DMAC3_CHCFG_n_DMS                   (0x80000000uL)
+
+#define DMAC3_CHITVL_n_ITVL                 (0x0000FFFFuL)
+
+#define DMAC3_CHEXT_n_SCA                   (0x000000F0uL)
+#define DMAC3_CHEXT_n_DCA                   (0x0000F000uL)
+
+#define DMAC3_NXLA_n_NXLA                   (0xFFFFFFFFuL)
+
+#define DMAC3_CRLA_n_CRLA                   (0xFFFFFFFFuL)
+
+/* ---- DMAC4 ---- */
+#define DMAC4_N0SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC4_N0DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC4_N0TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC4_N1SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC4_N1DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC4_N1TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC4_CRSA_n_CRSA                   (0xFFFFFFFFuL)
+
+#define DMAC4_CRDA_n_CRDA                   (0xFFFFFFFFuL)
+
+#define DMAC4_CRTB_n_CRTB                   (0xFFFFFFFFuL)
+
+#define DMAC4_CHSTAT_n_EN                   (0x00000001uL)
+#define DMAC4_CHSTAT_n_RQST                 (0x00000002uL)
+#define DMAC4_CHSTAT_n_TACT                 (0x00000004uL)
+#define DMAC4_CHSTAT_n_SUS                  (0x00000008uL)
+#define DMAC4_CHSTAT_n_ER                   (0x00000010uL)
+#define DMAC4_CHSTAT_n_END                  (0x00000020uL)
+#define DMAC4_CHSTAT_n_TC                   (0x00000040uL)
+#define DMAC4_CHSTAT_n_SR                   (0x00000080uL)
+#define DMAC4_CHSTAT_n_DL                   (0x00000100uL)
+#define DMAC4_CHSTAT_n_DW                   (0x00000200uL)
+#define DMAC4_CHSTAT_n_DER                  (0x00000400uL)
+#define DMAC4_CHSTAT_n_MODE                 (0x00000800uL)
+#define DMAC4_CHSTAT_n_INTMSK               (0x00010000uL)
+
+#define DMAC4_CHCTRL_n_SETEN                (0x00000001uL)
+#define DMAC4_CHCTRL_n_CLREN                (0x00000002uL)
+#define DMAC4_CHCTRL_n_STG                  (0x00000004uL)
+#define DMAC4_CHCTRL_n_SWRST                (0x00000008uL)
+#define DMAC4_CHCTRL_n_CLRRQ                (0x00000010uL)
+#define DMAC4_CHCTRL_n_CLREND               (0x00000020uL)
+#define DMAC4_CHCTRL_n_CLRTC                (0x00000040uL)
+#define DMAC4_CHCTRL_n_SETSUS               (0x00000100uL)
+#define DMAC4_CHCTRL_n_CLRSUS               (0x00000200uL)
+#define DMAC4_CHCTRL_n_SETINTMSK            (0x00010000uL)
+#define DMAC4_CHCTRL_n_CLRINTMSK            (0x00020000uL)
+
+#define DMAC4_CHCFG_n_SEL                   (0x00000007uL)
+#define DMAC4_CHCFG_n_REQD                  (0x00000008uL)
+#define DMAC4_CHCFG_n_LOEN                  (0x00000010uL)
+#define DMAC4_CHCFG_n_HIEN                  (0x00000020uL)
+#define DMAC4_CHCFG_n_LVL                   (0x00000040uL)
+#define DMAC4_CHCFG_n_AM                    (0x00000700uL)
+#define DMAC4_CHCFG_n_SDS                   (0x0000F000uL)
+#define DMAC4_CHCFG_n_DDS                   (0x000F0000uL)
+#define DMAC4_CHCFG_n_SAD                   (0x00100000uL)
+#define DMAC4_CHCFG_n_DAD                   (0x00200000uL)
+#define DMAC4_CHCFG_n_TM                    (0x00400000uL)
+#define DMAC4_CHCFG_n_DEM                   (0x01000000uL)
+#define DMAC4_CHCFG_n_TCM                   (0x02000000uL)
+#define DMAC4_CHCFG_n_SBE                   (0x08000000uL)
+#define DMAC4_CHCFG_n_RSEL                  (0x10000000uL)
+#define DMAC4_CHCFG_n_RSW                   (0x20000000uL)
+#define DMAC4_CHCFG_n_REN                   (0x40000000uL)
+#define DMAC4_CHCFG_n_DMS                   (0x80000000uL)
+
+#define DMAC4_CHITVL_n_ITVL                 (0x0000FFFFuL)
+
+#define DMAC4_CHEXT_n_SCA                   (0x000000F0uL)
+#define DMAC4_CHEXT_n_DCA                   (0x0000F000uL)
+
+#define DMAC4_NXLA_n_NXLA                   (0xFFFFFFFFuL)
+
+#define DMAC4_CRLA_n_CRLA                   (0xFFFFFFFFuL)
+
+/* ---- DMAC5 ---- */
+#define DMAC5_N0SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC5_N0DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC5_N0TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC5_N1SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC5_N1DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC5_N1TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC5_CRSA_n_CRSA                   (0xFFFFFFFFuL)
+
+#define DMAC5_CRDA_n_CRDA                   (0xFFFFFFFFuL)
+
+#define DMAC5_CRTB_n_CRTB                   (0xFFFFFFFFuL)
+
+#define DMAC5_CHSTAT_n_EN                   (0x00000001uL)
+#define DMAC5_CHSTAT_n_RQST                 (0x00000002uL)
+#define DMAC5_CHSTAT_n_TACT                 (0x00000004uL)
+#define DMAC5_CHSTAT_n_SUS                  (0x00000008uL)
+#define DMAC5_CHSTAT_n_ER                   (0x00000010uL)
+#define DMAC5_CHSTAT_n_END                  (0x00000020uL)
+#define DMAC5_CHSTAT_n_TC                   (0x00000040uL)
+#define DMAC5_CHSTAT_n_SR                   (0x00000080uL)
+#define DMAC5_CHSTAT_n_DL                   (0x00000100uL)
+#define DMAC5_CHSTAT_n_DW                   (0x00000200uL)
+#define DMAC5_CHSTAT_n_DER                  (0x00000400uL)
+#define DMAC5_CHSTAT_n_MODE                 (0x00000800uL)
+#define DMAC5_CHSTAT_n_INTMSK               (0x00010000uL)
+
+#define DMAC5_CHCTRL_n_SETEN                (0x00000001uL)
+#define DMAC5_CHCTRL_n_CLREN                (0x00000002uL)
+#define DMAC5_CHCTRL_n_STG                  (0x00000004uL)
+#define DMAC5_CHCTRL_n_SWRST                (0x00000008uL)
+#define DMAC5_CHCTRL_n_CLRRQ                (0x00000010uL)
+#define DMAC5_CHCTRL_n_CLREND               (0x00000020uL)
+#define DMAC5_CHCTRL_n_CLRTC                (0x00000040uL)
+#define DMAC5_CHCTRL_n_SETSUS               (0x00000100uL)
+#define DMAC5_CHCTRL_n_CLRSUS               (0x00000200uL)
+#define DMAC5_CHCTRL_n_SETINTMSK            (0x00010000uL)
+#define DMAC5_CHCTRL_n_CLRINTMSK            (0x00020000uL)
+
+#define DMAC5_CHCFG_n_SEL                   (0x00000007uL)
+#define DMAC5_CHCFG_n_REQD                  (0x00000008uL)
+#define DMAC5_CHCFG_n_LOEN                  (0x00000010uL)
+#define DMAC5_CHCFG_n_HIEN                  (0x00000020uL)
+#define DMAC5_CHCFG_n_LVL                   (0x00000040uL)
+#define DMAC5_CHCFG_n_AM                    (0x00000700uL)
+#define DMAC5_CHCFG_n_SDS                   (0x0000F000uL)
+#define DMAC5_CHCFG_n_DDS                   (0x000F0000uL)
+#define DMAC5_CHCFG_n_SAD                   (0x00100000uL)
+#define DMAC5_CHCFG_n_DAD                   (0x00200000uL)
+#define DMAC5_CHCFG_n_TM                    (0x00400000uL)
+#define DMAC5_CHCFG_n_DEM                   (0x01000000uL)
+#define DMAC5_CHCFG_n_TCM                   (0x02000000uL)
+#define DMAC5_CHCFG_n_SBE                   (0x08000000uL)
+#define DMAC5_CHCFG_n_RSEL                  (0x10000000uL)
+#define DMAC5_CHCFG_n_RSW                   (0x20000000uL)
+#define DMAC5_CHCFG_n_REN                   (0x40000000uL)
+#define DMAC5_CHCFG_n_DMS                   (0x80000000uL)
+
+#define DMAC5_CHITVL_n_ITVL                 (0x0000FFFFuL)
+
+#define DMAC5_CHEXT_n_SCA                   (0x000000F0uL)
+#define DMAC5_CHEXT_n_DCA                   (0x0000F000uL)
+
+#define DMAC5_NXLA_n_NXLA                   (0xFFFFFFFFuL)
+
+#define DMAC5_CRLA_n_CRLA                   (0xFFFFFFFFuL)
+
+/* ---- DMAC6 ---- */
+#define DMAC6_N0SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC6_N0DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC6_N0TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC6_N1SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC6_N1DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC6_N1TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC6_CRSA_n_CRSA                   (0xFFFFFFFFuL)
+
+#define DMAC6_CRDA_n_CRDA                   (0xFFFFFFFFuL)
+
+#define DMAC6_CRTB_n_CRTB                   (0xFFFFFFFFuL)
+
+#define DMAC6_CHSTAT_n_EN                   (0x00000001uL)
+#define DMAC6_CHSTAT_n_RQST                 (0x00000002uL)
+#define DMAC6_CHSTAT_n_TACT                 (0x00000004uL)
+#define DMAC6_CHSTAT_n_SUS                  (0x00000008uL)
+#define DMAC6_CHSTAT_n_ER                   (0x00000010uL)
+#define DMAC6_CHSTAT_n_END                  (0x00000020uL)
+#define DMAC6_CHSTAT_n_TC                   (0x00000040uL)
+#define DMAC6_CHSTAT_n_SR                   (0x00000080uL)
+#define DMAC6_CHSTAT_n_DL                   (0x00000100uL)
+#define DMAC6_CHSTAT_n_DW                   (0x00000200uL)
+#define DMAC6_CHSTAT_n_DER                  (0x00000400uL)
+#define DMAC6_CHSTAT_n_MODE                 (0x00000800uL)
+#define DMAC6_CHSTAT_n_INTMSK               (0x00010000uL)
+
+#define DMAC6_CHCTRL_n_SETEN                (0x00000001uL)
+#define DMAC6_CHCTRL_n_CLREN                (0x00000002uL)
+#define DMAC6_CHCTRL_n_STG                  (0x00000004uL)
+#define DMAC6_CHCTRL_n_SWRST                (0x00000008uL)
+#define DMAC6_CHCTRL_n_CLRRQ                (0x00000010uL)
+#define DMAC6_CHCTRL_n_CLREND               (0x00000020uL)
+#define DMAC6_CHCTRL_n_CLRTC                (0x00000040uL)
+#define DMAC6_CHCTRL_n_SETSUS               (0x00000100uL)
+#define DMAC6_CHCTRL_n_CLRSUS               (0x00000200uL)
+#define DMAC6_CHCTRL_n_SETINTMSK            (0x00010000uL)
+#define DMAC6_CHCTRL_n_CLRINTMSK            (0x00020000uL)
+
+#define DMAC6_CHCFG_n_SEL                   (0x00000007uL)
+#define DMAC6_CHCFG_n_REQD                  (0x00000008uL)
+#define DMAC6_CHCFG_n_LOEN                  (0x00000010uL)
+#define DMAC6_CHCFG_n_HIEN                  (0x00000020uL)
+#define DMAC6_CHCFG_n_LVL                   (0x00000040uL)
+#define DMAC6_CHCFG_n_AM                    (0x00000700uL)
+#define DMAC6_CHCFG_n_SDS                   (0x0000F000uL)
+#define DMAC6_CHCFG_n_DDS                   (0x000F0000uL)
+#define DMAC6_CHCFG_n_SAD                   (0x00100000uL)
+#define DMAC6_CHCFG_n_DAD                   (0x00200000uL)
+#define DMAC6_CHCFG_n_TM                    (0x00400000uL)
+#define DMAC6_CHCFG_n_DEM                   (0x01000000uL)
+#define DMAC6_CHCFG_n_TCM                   (0x02000000uL)
+#define DMAC6_CHCFG_n_SBE                   (0x08000000uL)
+#define DMAC6_CHCFG_n_RSEL                  (0x10000000uL)
+#define DMAC6_CHCFG_n_RSW                   (0x20000000uL)
+#define DMAC6_CHCFG_n_REN                   (0x40000000uL)
+#define DMAC6_CHCFG_n_DMS                   (0x80000000uL)
+
+#define DMAC6_CHITVL_n_ITVL                 (0x0000FFFFuL)
+
+#define DMAC6_CHEXT_n_SCA                   (0x000000F0uL)
+#define DMAC6_CHEXT_n_DCA                   (0x0000F000uL)
+
+#define DMAC6_NXLA_n_NXLA                   (0xFFFFFFFFuL)
+
+#define DMAC6_CRLA_n_CRLA                   (0xFFFFFFFFuL)
+
+/* ---- DMAC7 ---- */
+#define DMAC7_N0SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC7_N0DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC7_N0TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC7_N1SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC7_N1DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC7_N1TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC7_CRSA_n_CRSA                   (0xFFFFFFFFuL)
+
+#define DMAC7_CRDA_n_CRDA                   (0xFFFFFFFFuL)
+
+#define DMAC7_CRTB_n_CRTB                   (0xFFFFFFFFuL)
+
+#define DMAC7_CHSTAT_n_EN                   (0x00000001uL)
+#define DMAC7_CHSTAT_n_RQST                 (0x00000002uL)
+#define DMAC7_CHSTAT_n_TACT                 (0x00000004uL)
+#define DMAC7_CHSTAT_n_SUS                  (0x00000008uL)
+#define DMAC7_CHSTAT_n_ER                   (0x00000010uL)
+#define DMAC7_CHSTAT_n_END                  (0x00000020uL)
+#define DMAC7_CHSTAT_n_TC                   (0x00000040uL)
+#define DMAC7_CHSTAT_n_SR                   (0x00000080uL)
+#define DMAC7_CHSTAT_n_DL                   (0x00000100uL)
+#define DMAC7_CHSTAT_n_DW                   (0x00000200uL)
+#define DMAC7_CHSTAT_n_DER                  (0x00000400uL)
+#define DMAC7_CHSTAT_n_MODE                 (0x00000800uL)
+#define DMAC7_CHSTAT_n_INTMSK               (0x00010000uL)
+
+#define DMAC7_CHCTRL_n_SETEN                (0x00000001uL)
+#define DMAC7_CHCTRL_n_CLREN                (0x00000002uL)
+#define DMAC7_CHCTRL_n_STG                  (0x00000004uL)
+#define DMAC7_CHCTRL_n_SWRST                (0x00000008uL)
+#define DMAC7_CHCTRL_n_CLRRQ                (0x00000010uL)
+#define DMAC7_CHCTRL_n_CLREND               (0x00000020uL)
+#define DMAC7_CHCTRL_n_CLRTC                (0x00000040uL)
+#define DMAC7_CHCTRL_n_SETSUS               (0x00000100uL)
+#define DMAC7_CHCTRL_n_CLRSUS               (0x00000200uL)
+#define DMAC7_CHCTRL_n_SETINTMSK            (0x00010000uL)
+#define DMAC7_CHCTRL_n_CLRINTMSK            (0x00020000uL)
+
+#define DMAC7_CHCFG_n_SEL                   (0x00000007uL)
+#define DMAC7_CHCFG_n_REQD                  (0x00000008uL)
+#define DMAC7_CHCFG_n_LOEN                  (0x00000010uL)
+#define DMAC7_CHCFG_n_HIEN                  (0x00000020uL)
+#define DMAC7_CHCFG_n_LVL                   (0x00000040uL)
+#define DMAC7_CHCFG_n_AM                    (0x00000700uL)
+#define DMAC7_CHCFG_n_SDS                   (0x0000F000uL)
+#define DMAC7_CHCFG_n_DDS                   (0x000F0000uL)
+#define DMAC7_CHCFG_n_SAD                   (0x00100000uL)
+#define DMAC7_CHCFG_n_DAD                   (0x00200000uL)
+#define DMAC7_CHCFG_n_TM                    (0x00400000uL)
+#define DMAC7_CHCFG_n_DEM                   (0x01000000uL)
+#define DMAC7_CHCFG_n_TCM                   (0x02000000uL)
+#define DMAC7_CHCFG_n_SBE                   (0x08000000uL)
+#define DMAC7_CHCFG_n_RSEL                  (0x10000000uL)
+#define DMAC7_CHCFG_n_RSW                   (0x20000000uL)
+#define DMAC7_CHCFG_n_REN                   (0x40000000uL)
+#define DMAC7_CHCFG_n_DMS                   (0x80000000uL)
+
+#define DMAC7_CHITVL_n_ITVL                 (0x0000FFFFuL)
+
+#define DMAC7_CHEXT_n_SCA                   (0x000000F0uL)
+#define DMAC7_CHEXT_n_DCA                   (0x0000F000uL)
+
+#define DMAC7_NXLA_n_NXLA                   (0xFFFFFFFFuL)
+
+#define DMAC7_CRLA_n_CRLA                   (0xFFFFFFFFuL)
+
+/* ---- DMAC0-7 ---- */
+#define DMAC07_DCTRL_0_7_PR                 (0x00000001uL)
+#define DMAC07_DCTRL_0_7_LVINT              (0x00000002uL)
+#define DMAC07_DCTRL_0_7_LDCA               (0x0000003CuL)
+#define DMAC07_DCTRL_0_7_LWCA               (0x000003C0uL)
+
+#define DMAC07_DSTAT_EN_0_7_EN0             (0x00000001uL)
+#define DMAC07_DSTAT_EN_0_7_EN1             (0x00000002uL)
+#define DMAC07_DSTAT_EN_0_7_EN2             (0x00000004uL)
+#define DMAC07_DSTAT_EN_0_7_EN3             (0x00000008uL)
+#define DMAC07_DSTAT_EN_0_7_EN4             (0x00000010uL)
+#define DMAC07_DSTAT_EN_0_7_EN5             (0x00000020uL)
+#define DMAC07_DSTAT_EN_0_7_EN6             (0x00000040uL)
+#define DMAC07_DSTAT_EN_0_7_EN7             (0x00000080uL)
+
+#define DMAC07_DSTAT_ER_0_7_ER0             (0x00000001uL)
+#define DMAC07_DSTAT_ER_0_7_ER1             (0x00000002uL)
+#define DMAC07_DSTAT_ER_0_7_ER2             (0x00000004uL)
+#define DMAC07_DSTAT_ER_0_7_ER3             (0x00000008uL)
+#define DMAC07_DSTAT_ER_0_7_ER4             (0x00000010uL)
+#define DMAC07_DSTAT_ER_0_7_ER5             (0x00000020uL)
+#define DMAC07_DSTAT_ER_0_7_ER6             (0x00000040uL)
+#define DMAC07_DSTAT_ER_0_7_ER7             (0x00000080uL)
+
+#define DMAC07_DSTAT_END_0_7_END0           (0x00000001uL)
+#define DMAC07_DSTAT_END_0_7_END1           (0x00000002uL)
+#define DMAC07_DSTAT_END_0_7_END2           (0x00000004uL)
+#define DMAC07_DSTAT_END_0_7_END3           (0x00000008uL)
+#define DMAC07_DSTAT_END_0_7_END4           (0x00000010uL)
+#define DMAC07_DSTAT_END_0_7_END5           (0x00000020uL)
+#define DMAC07_DSTAT_END_0_7_END6           (0x00000040uL)
+#define DMAC07_DSTAT_END_0_7_END7           (0x00000080uL)
+
+#define DMAC07_DSTAT_TC_0_7_TC0             (0x00000001uL)
+#define DMAC07_DSTAT_TC_0_7_TC1             (0x00000002uL)
+#define DMAC07_DSTAT_TC_0_7_TC2             (0x00000004uL)
+#define DMAC07_DSTAT_TC_0_7_TC3             (0x00000008uL)
+#define DMAC07_DSTAT_TC_0_7_TC4             (0x00000010uL)
+#define DMAC07_DSTAT_TC_0_7_TC5             (0x00000020uL)
+#define DMAC07_DSTAT_TC_0_7_TC6             (0x00000040uL)
+#define DMAC07_DSTAT_TC_0_7_TC7             (0x00000080uL)
+
+#define DMAC07_DSTAT_SUS_0_7_SUS0           (0x00000001uL)
+#define DMAC07_DSTAT_SUS_0_7_SUS1           (0x00000002uL)
+#define DMAC07_DSTAT_SUS_0_7_SUS2           (0x00000004uL)
+#define DMAC07_DSTAT_SUS_0_7_SUS3           (0x00000008uL)
+#define DMAC07_DSTAT_SUS_0_7_SUS4           (0x00000010uL)
+#define DMAC07_DSTAT_SUS_0_7_SUS5           (0x00000020uL)
+#define DMAC07_DSTAT_SUS_0_7_SUS6           (0x00000040uL)
+#define DMAC07_DSTAT_SUS_0_7_SUS7           (0x00000080uL)
+
+/* ---- DMAC8 ---- */
+#define DMAC8_N0SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC8_N0DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC8_N0TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC8_N1SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC8_N1DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC8_N1TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC8_CRSA_n_CRSA                   (0xFFFFFFFFuL)
+
+#define DMAC8_CRDA_n_CRDA                   (0xFFFFFFFFuL)
+
+#define DMAC8_CRTB_n_CRTB                   (0xFFFFFFFFuL)
+
+#define DMAC8_CHSTAT_n_EN                   (0x00000001uL)
+#define DMAC8_CHSTAT_n_RQST                 (0x00000002uL)
+#define DMAC8_CHSTAT_n_TACT                 (0x00000004uL)
+#define DMAC8_CHSTAT_n_SUS                  (0x00000008uL)
+#define DMAC8_CHSTAT_n_ER                   (0x00000010uL)
+#define DMAC8_CHSTAT_n_END                  (0x00000020uL)
+#define DMAC8_CHSTAT_n_TC                   (0x00000040uL)
+#define DMAC8_CHSTAT_n_SR                   (0x00000080uL)
+#define DMAC8_CHSTAT_n_DL                   (0x00000100uL)
+#define DMAC8_CHSTAT_n_DW                   (0x00000200uL)
+#define DMAC8_CHSTAT_n_DER                  (0x00000400uL)
+#define DMAC8_CHSTAT_n_MODE                 (0x00000800uL)
+#define DMAC8_CHSTAT_n_INTMSK               (0x00010000uL)
+
+#define DMAC8_CHCTRL_n_SETEN                (0x00000001uL)
+#define DMAC8_CHCTRL_n_CLREN                (0x00000002uL)
+#define DMAC8_CHCTRL_n_STG                  (0x00000004uL)
+#define DMAC8_CHCTRL_n_SWRST                (0x00000008uL)
+#define DMAC8_CHCTRL_n_CLRRQ                (0x00000010uL)
+#define DMAC8_CHCTRL_n_CLREND               (0x00000020uL)
+#define DMAC8_CHCTRL_n_CLRTC                (0x00000040uL)
+#define DMAC8_CHCTRL_n_SETSUS               (0x00000100uL)
+#define DMAC8_CHCTRL_n_CLRSUS               (0x00000200uL)
+#define DMAC8_CHCTRL_n_SETINTMSK            (0x00010000uL)
+#define DMAC8_CHCTRL_n_CLRINTMSK            (0x00020000uL)
+
+#define DMAC8_CHCFG_n_SEL                   (0x00000007uL)
+#define DMAC8_CHCFG_n_REQD                  (0x00000008uL)
+#define DMAC8_CHCFG_n_LOEN                  (0x00000010uL)
+#define DMAC8_CHCFG_n_HIEN                  (0x00000020uL)
+#define DMAC8_CHCFG_n_LVL                   (0x00000040uL)
+#define DMAC8_CHCFG_n_AM                    (0x00000700uL)
+#define DMAC8_CHCFG_n_SDS                   (0x0000F000uL)
+#define DMAC8_CHCFG_n_DDS                   (0x000F0000uL)
+#define DMAC8_CHCFG_n_SAD                   (0x00100000uL)
+#define DMAC8_CHCFG_n_DAD                   (0x00200000uL)
+#define DMAC8_CHCFG_n_TM                    (0x00400000uL)
+#define DMAC8_CHCFG_n_DEM                   (0x01000000uL)
+#define DMAC8_CHCFG_n_TCM                   (0x02000000uL)
+#define DMAC8_CHCFG_n_SBE                   (0x08000000uL)
+#define DMAC8_CHCFG_n_RSEL                  (0x10000000uL)
+#define DMAC8_CHCFG_n_RSW                   (0x20000000uL)
+#define DMAC8_CHCFG_n_REN                   (0x40000000uL)
+#define DMAC8_CHCFG_n_DMS                   (0x80000000uL)
+
+#define DMAC8_CHITVL_n_ITVL                 (0x0000FFFFuL)
+
+#define DMAC8_CHEXT_n_SCA                   (0x000000F0uL)
+#define DMAC8_CHEXT_n_DCA                   (0x0000F000uL)
+
+#define DMAC8_NXLA_n_NXLA                   (0xFFFFFFFFuL)
+
+#define DMAC8_CRLA_n_CRLA                   (0xFFFFFFFFuL)
+
+/* ---- DMAC9 ---- */
+#define DMAC9_N0SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC9_N0DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC9_N0TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC9_N1SA_n_SA                     (0xFFFFFFFFuL)
+
+#define DMAC9_N1DA_n_DA                     (0xFFFFFFFFuL)
+
+#define DMAC9_N1TB_n_TB                     (0xFFFFFFFFuL)
+
+#define DMAC9_CRSA_n_CRSA                   (0xFFFFFFFFuL)
+
+#define DMAC9_CRDA_n_CRDA                   (0xFFFFFFFFuL)
+
+#define DMAC9_CRTB_n_CRTB                   (0xFFFFFFFFuL)
+
+#define DMAC9_CHSTAT_n_EN                   (0x00000001uL)
+#define DMAC9_CHSTAT_n_RQST                 (0x00000002uL)
+#define DMAC9_CHSTAT_n_TACT                 (0x00000004uL)
+#define DMAC9_CHSTAT_n_SUS                  (0x00000008uL)
+#define DMAC9_CHSTAT_n_ER                   (0x00000010uL)
+#define DMAC9_CHSTAT_n_END                  (0x00000020uL)
+#define DMAC9_CHSTAT_n_TC                   (0x00000040uL)
+#define DMAC9_CHSTAT_n_SR                   (0x00000080uL)
+#define DMAC9_CHSTAT_n_DL                   (0x00000100uL)
+#define DMAC9_CHSTAT_n_DW                   (0x00000200uL)
+#define DMAC9_CHSTAT_n_DER                  (0x00000400uL)
+#define DMAC9_CHSTAT_n_MODE                 (0x00000800uL)
+#define DMAC9_CHSTAT_n_INTMSK               (0x00010000uL)
+
+#define DMAC9_CHCTRL_n_SETEN                (0x00000001uL)
+#define DMAC9_CHCTRL_n_CLREN                (0x00000002uL)
+#define DMAC9_CHCTRL_n_STG                  (0x00000004uL)
+#define DMAC9_CHCTRL_n_SWRST                (0x00000008uL)
+#define DMAC9_CHCTRL_n_CLRRQ                (0x00000010uL)
+#define DMAC9_CHCTRL_n_CLREND               (0x00000020uL)
+#define DMAC9_CHCTRL_n_CLRTC                (0x00000040uL)
+#define DMAC9_CHCTRL_n_SETSUS               (0x00000100uL)
+#define DMAC9_CHCTRL_n_CLRSUS               (0x00000200uL)
+#define DMAC9_CHCTRL_n_SETINTMSK            (0x00010000uL)
+#define DMAC9_CHCTRL_n_CLRINTMSK            (0x00020000uL)
+
+#define DMAC9_CHCFG_n_SEL                   (0x00000007uL)
+#define DMAC9_CHCFG_n_REQD                  (0x00000008uL)
+#define DMAC9_CHCFG_n_LOEN                  (0x00000010uL)
+#define DMAC9_CHCFG_n_HIEN                  (0x00000020uL)
+#define DMAC9_CHCFG_n_LVL                   (0x00000040uL)
+#define DMAC9_CHCFG_n_AM                    (0x00000700uL)
+#define DMAC9_CHCFG_n_SDS                   (0x0000F000uL)
+#define DMAC9_CHCFG_n_DDS                   (0x000F0000uL)
+#define DMAC9_CHCFG_n_SAD                   (0x00100000uL)
+#define DMAC9_CHCFG_n_DAD                   (0x00200000uL)
+#define DMAC9_CHCFG_n_TM                    (0x00400000uL)
+#define DMAC9_CHCFG_n_DEM                   (0x01000000uL)
+#define DMAC9_CHCFG_n_TCM                   (0x02000000uL)
+#define DMAC9_CHCFG_n_SBE                   (0x08000000uL)
+#define DMAC9_CHCFG_n_RSEL                  (0x10000000uL)
+#define DMAC9_CHCFG_n_RSW                   (0x20000000uL)
+#define DMAC9_CHCFG_n_REN                   (0x40000000uL)
+#define DMAC9_CHCFG_n_DMS                   (0x80000000uL)
+
+#define DMAC9_CHITVL_n_ITVL                 (0x0000FFFFuL)
+
+#define DMAC9_CHEXT_n_SCA                   (0x000000F0uL)
+#define DMAC9_CHEXT_n_DCA                   (0x0000F000uL)
+
+#define DMAC9_NXLA_n_NXLA                   (0xFFFFFFFFuL)
+
+#define DMAC9_CRLA_n_CRLA                   (0xFFFFFFFFuL)
+
+/* ---- DMAC10 ---- */
+#define DMAC10_N0SA_n_SA                    (0xFFFFFFFFuL)
+
+#define DMAC10_N0DA_n_DA                    (0xFFFFFFFFuL)
+
+#define DMAC10_N0TB_n_TB                    (0xFFFFFFFFuL)
+
+#define DMAC10_N1SA_n_SA                    (0xFFFFFFFFuL)
+
+#define DMAC10_N1DA_n_DA                    (0xFFFFFFFFuL)
+
+#define DMAC10_N1TB_n_TB                    (0xFFFFFFFFuL)
+
+#define DMAC10_CRSA_n_CRSA                  (0xFFFFFFFFuL)
+
+#define DMAC10_CRDA_n_CRDA                  (0xFFFFFFFFuL)
+
+#define DMAC10_CRTB_n_CRTB                  (0xFFFFFFFFuL)
+
+#define DMAC10_CHSTAT_n_EN                  (0x00000001uL)
+#define DMAC10_CHSTAT_n_RQST                (0x00000002uL)
+#define DMAC10_CHSTAT_n_TACT                (0x00000004uL)
+#define DMAC10_CHSTAT_n_SUS                 (0x00000008uL)
+#define DMAC10_CHSTAT_n_ER                  (0x00000010uL)
+#define DMAC10_CHSTAT_n_END                 (0x00000020uL)
+#define DMAC10_CHSTAT_n_TC                  (0x00000040uL)
+#define DMAC10_CHSTAT_n_SR                  (0x00000080uL)
+#define DMAC10_CHSTAT_n_DL                  (0x00000100uL)
+#define DMAC10_CHSTAT_n_DW                  (0x00000200uL)
+#define DMAC10_CHSTAT_n_DER                 (0x00000400uL)
+#define DMAC10_CHSTAT_n_MODE                (0x00000800uL)
+#define DMAC10_CHSTAT_n_INTMSK              (0x00010000uL)
+
+#define DMAC10_CHCTRL_n_SETEN               (0x00000001uL)
+#define DMAC10_CHCTRL_n_CLREN               (0x00000002uL)
+#define DMAC10_CHCTRL_n_STG                 (0x00000004uL)
+#define DMAC10_CHCTRL_n_SWRST               (0x00000008uL)
+#define DMAC10_CHCTRL_n_CLRRQ               (0x00000010uL)
+#define DMAC10_CHCTRL_n_CLREND              (0x00000020uL)
+#define DMAC10_CHCTRL_n_CLRTC               (0x00000040uL)
+#define DMAC10_CHCTRL_n_SETSUS              (0x00000100uL)
+#define DMAC10_CHCTRL_n_CLRSUS              (0x00000200uL)
+#define DMAC10_CHCTRL_n_SETINTMSK           (0x00010000uL)
+#define DMAC10_CHCTRL_n_CLRINTMSK           (0x00020000uL)
+
+#define DMAC10_CHCFG_n_SEL                  (0x00000007uL)
+#define DMAC10_CHCFG_n_REQD                 (0x00000008uL)
+#define DMAC10_CHCFG_n_LOEN                 (0x00000010uL)
+#define DMAC10_CHCFG_n_HIEN                 (0x00000020uL)
+#define DMAC10_CHCFG_n_LVL                  (0x00000040uL)
+#define DMAC10_CHCFG_n_AM                   (0x00000700uL)
+#define DMAC10_CHCFG_n_SDS                  (0x0000F000uL)
+#define DMAC10_CHCFG_n_DDS                  (0x000F0000uL)
+#define DMAC10_CHCFG_n_SAD                  (0x00100000uL)
+#define DMAC10_CHCFG_n_DAD                  (0x00200000uL)
+#define DMAC10_CHCFG_n_TM                   (0x00400000uL)
+#define DMAC10_CHCFG_n_DEM                  (0x01000000uL)
+#define DMAC10_CHCFG_n_TCM                  (0x02000000uL)
+#define DMAC10_CHCFG_n_SBE                  (0x08000000uL)
+#define DMAC10_CHCFG_n_RSEL                 (0x10000000uL)
+#define DMAC10_CHCFG_n_RSW                  (0x20000000uL)
+#define DMAC10_CHCFG_n_REN                  (0x40000000uL)
+#define DMAC10_CHCFG_n_DMS                  (0x80000000uL)
+
+#define DMAC10_CHITVL_n_ITVL                (0x0000FFFFuL)
+
+#define DMAC10_CHEXT_n_SCA                  (0x000000F0uL)
+#define DMAC10_CHEXT_n_DCA                  (0x0000F000uL)
+
+#define DMAC10_NXLA_n_NXLA                  (0xFFFFFFFFuL)
+
+#define DMAC10_CRLA_n_CRLA                  (0xFFFFFFFFuL)
+
+/* ---- DMAC11 ---- */
+#define DMAC11_N0SA_n_SA                    (0xFFFFFFFFuL)
+
+#define DMAC11_N0DA_n_DA                    (0xFFFFFFFFuL)
+
+#define DMAC11_N0TB_n_TB                    (0xFFFFFFFFuL)
+
+#define DMAC11_N1SA_n_SA                    (0xFFFFFFFFuL)
+
+#define DMAC11_N1DA_n_DA                    (0xFFFFFFFFuL)
+
+#define DMAC11_N1TB_n_TB                    (0xFFFFFFFFuL)
+
+#define DMAC11_CRSA_n_CRSA                  (0xFFFFFFFFuL)
+
+#define DMAC11_CRDA_n_CRDA                  (0xFFFFFFFFuL)
+
+#define DMAC11_CRTB_n_CRTB                  (0xFFFFFFFFuL)
+
+#define DMAC11_CHSTAT_n_EN                  (0x00000001uL)
+#define DMAC11_CHSTAT_n_RQST                (0x00000002uL)
+#define DMAC11_CHSTAT_n_TACT                (0x00000004uL)
+#define DMAC11_CHSTAT_n_SUS                 (0x00000008uL)
+#define DMAC11_CHSTAT_n_ER                  (0x00000010uL)
+#define DMAC11_CHSTAT_n_END                 (0x00000020uL)
+#define DMAC11_CHSTAT_n_TC                  (0x00000040uL)
+#define DMAC11_CHSTAT_n_SR                  (0x00000080uL)
+#define DMAC11_CHSTAT_n_DL                  (0x00000100uL)
+#define DMAC11_CHSTAT_n_DW                  (0x00000200uL)
+#define DMAC11_CHSTAT_n_DER                 (0x00000400uL)
+#define DMAC11_CHSTAT_n_MODE                (0x00000800uL)
+#define DMAC11_CHSTAT_n_INTMSK              (0x00010000uL)
+
+#define DMAC11_CHCTRL_n_SETEN               (0x00000001uL)
+#define DMAC11_CHCTRL_n_CLREN               (0x00000002uL)
+#define DMAC11_CHCTRL_n_STG                 (0x00000004uL)
+#define DMAC11_CHCTRL_n_SWRST               (0x00000008uL)
+#define DMAC11_CHCTRL_n_CLRRQ               (0x00000010uL)
+#define DMAC11_CHCTRL_n_CLREND              (0x00000020uL)
+#define DMAC11_CHCTRL_n_CLRTC               (0x00000040uL)
+#define DMAC11_CHCTRL_n_SETSUS              (0x00000100uL)
+#define DMAC11_CHCTRL_n_CLRSUS              (0x00000200uL)
+#define DMAC11_CHCTRL_n_SETINTMSK           (0x00010000uL)
+#define DMAC11_CHCTRL_n_CLRINTMSK           (0x00020000uL)
+
+#define DMAC11_CHCFG_n_SEL                  (0x00000007uL)
+#define DMAC11_CHCFG_n_REQD                 (0x00000008uL)
+#define DMAC11_CHCFG_n_LOEN                 (0x00000010uL)
+#define DMAC11_CHCFG_n_HIEN                 (0x00000020uL)
+#define DMAC11_CHCFG_n_LVL                  (0x00000040uL)
+#define DMAC11_CHCFG_n_AM                   (0x00000700uL)
+#define DMAC11_CHCFG_n_SDS                  (0x0000F000uL)
+#define DMAC11_CHCFG_n_DDS                  (0x000F0000uL)
+#define DMAC11_CHCFG_n_SAD                  (0x00100000uL)
+#define DMAC11_CHCFG_n_DAD                  (0x00200000uL)
+#define DMAC11_CHCFG_n_TM                   (0x00400000uL)
+#define DMAC11_CHCFG_n_DEM                  (0x01000000uL)
+#define DMAC11_CHCFG_n_TCM                  (0x02000000uL)
+#define DMAC11_CHCFG_n_SBE                  (0x08000000uL)
+#define DMAC11_CHCFG_n_RSEL                 (0x10000000uL)
+#define DMAC11_CHCFG_n_RSW                  (0x20000000uL)
+#define DMAC11_CHCFG_n_REN                  (0x40000000uL)
+#define DMAC11_CHCFG_n_DMS                  (0x80000000uL)
+
+#define DMAC11_CHITVL_n_ITVL                (0x0000FFFFuL)
+
+#define DMAC11_CHEXT_n_SCA                  (0x000000F0uL)
+#define DMAC11_CHEXT_n_DCA                  (0x0000F000uL)
+
+#define DMAC11_NXLA_n_NXLA                  (0xFFFFFFFFuL)
+
+#define DMAC11_CRLA_n_CRLA                  (0xFFFFFFFFuL)
+
+/* ---- DMAC12 ---- */
+#define DMAC12_N0SA_n_SA                    (0xFFFFFFFFuL)
+
+#define DMAC12_N0DA_n_DA                    (0xFFFFFFFFuL)
+
+#define DMAC12_N0TB_n_TB                    (0xFFFFFFFFuL)
+
+#define DMAC12_N1SA_n_SA                    (0xFFFFFFFFuL)
+
+#define DMAC12_N1DA_n_DA                    (0xFFFFFFFFuL)
+
+#define DMAC12_N1TB_n_TB                    (0xFFFFFFFFuL)
+
+#define DMAC12_CRSA_n_CRSA                  (0xFFFFFFFFuL)
+
+#define DMAC12_CRDA_n_CRDA                  (0xFFFFFFFFuL)
+
+#define DMAC12_CRTB_n_CRTB                  (0xFFFFFFFFuL)
+
+#define DMAC12_CHSTAT_n_EN                  (0x00000001uL)
+#define DMAC12_CHSTAT_n_RQST                (0x00000002uL)
+#define DMAC12_CHSTAT_n_TACT                (0x00000004uL)
+#define DMAC12_CHSTAT_n_SUS                 (0x00000008uL)
+#define DMAC12_CHSTAT_n_ER                  (0x00000010uL)
+#define DMAC12_CHSTAT_n_END                 (0x00000020uL)
+#define DMAC12_CHSTAT_n_TC                  (0x00000040uL)
+#define DMAC12_CHSTAT_n_SR                  (0x00000080uL)
+#define DMAC12_CHSTAT_n_DL                  (0x00000100uL)
+#define DMAC12_CHSTAT_n_DW                  (0x00000200uL)
+#define DMAC12_CHSTAT_n_DER                 (0x00000400uL)
+#define DMAC12_CHSTAT_n_MODE                (0x00000800uL)
+#define DMAC12_CHSTAT_n_INTMSK              (0x00010000uL)
+
+#define DMAC12_CHCTRL_n_SETEN               (0x00000001uL)
+#define DMAC12_CHCTRL_n_CLREN               (0x00000002uL)
+#define DMAC12_CHCTRL_n_STG                 (0x00000004uL)
+#define DMAC12_CHCTRL_n_SWRST               (0x00000008uL)
+#define DMAC12_CHCTRL_n_CLRRQ               (0x00000010uL)
+#define DMAC12_CHCTRL_n_CLREND              (0x00000020uL)
+#define DMAC12_CHCTRL_n_CLRTC               (0x00000040uL)
+#define DMAC12_CHCTRL_n_SETSUS              (0x00000100uL)
+#define DMAC12_CHCTRL_n_CLRSUS              (0x00000200uL)
+#define DMAC12_CHCTRL_n_SETINTMSK           (0x00010000uL)
+#define DMAC12_CHCTRL_n_CLRINTMSK           (0x00020000uL)
+
+#define DMAC12_CHCFG_n_SEL                  (0x00000007uL)
+#define DMAC12_CHCFG_n_REQD                 (0x00000008uL)
+#define DMAC12_CHCFG_n_LOEN                 (0x00000010uL)
+#define DMAC12_CHCFG_n_HIEN                 (0x00000020uL)
+#define DMAC12_CHCFG_n_LVL                  (0x00000040uL)
+#define DMAC12_CHCFG_n_AM                   (0x00000700uL)
+#define DMAC12_CHCFG_n_SDS                  (0x0000F000uL)
+#define DMAC12_CHCFG_n_DDS                  (0x000F0000uL)
+#define DMAC12_CHCFG_n_SAD                  (0x00100000uL)
+#define DMAC12_CHCFG_n_DAD                  (0x00200000uL)
+#define DMAC12_CHCFG_n_TM                   (0x00400000uL)
+#define DMAC12_CHCFG_n_DEM                  (0x01000000uL)
+#define DMAC12_CHCFG_n_TCM                  (0x02000000uL)
+#define DMAC12_CHCFG_n_SBE                  (0x08000000uL)
+#define DMAC12_CHCFG_n_RSEL                 (0x10000000uL)
+#define DMAC12_CHCFG_n_RSW                  (0x20000000uL)
+#define DMAC12_CHCFG_n_REN                  (0x40000000uL)
+#define DMAC12_CHCFG_n_DMS                  (0x80000000uL)
+
+#define DMAC12_CHITVL_n_ITVL                (0x0000FFFFuL)
+
+#define DMAC12_CHEXT_n_SCA                  (0x000000F0uL)
+#define DMAC12_CHEXT_n_DCA                  (0x0000F000uL)
+
+#define DMAC12_NXLA_n_NXLA                  (0xFFFFFFFFuL)
+
+#define DMAC12_CRLA_n_CRLA                  (0xFFFFFFFFuL)
+
+/* ---- DMAC13 ---- */
+#define DMAC13_N0SA_n_SA                    (0xFFFFFFFFuL)
+
+#define DMAC13_N0DA_n_DA                    (0xFFFFFFFFuL)
+
+#define DMAC13_N0TB_n_TB                    (0xFFFFFFFFuL)
+
+#define DMAC13_N1SA_n_SA                    (0xFFFFFFFFuL)
+
+#define DMAC13_N1DA_n_DA                    (0xFFFFFFFFuL)
+
+#define DMAC13_N1TB_n_TB                    (0xFFFFFFFFuL)
+
+#define DMAC13_CRSA_n_CRSA                  (0xFFFFFFFFuL)
+
+#define DMAC13_CRDA_n_CRDA                  (0xFFFFFFFFuL)
+
+#define DMAC13_CRTB_n_CRTB                  (0xFFFFFFFFuL)
+
+#define DMAC13_CHSTAT_n_EN                  (0x00000001uL)
+#define DMAC13_CHSTAT_n_RQST                (0x00000002uL)
+#define DMAC13_CHSTAT_n_TACT                (0x00000004uL)
+#define DMAC13_CHSTAT_n_SUS                 (0x00000008uL)
+#define DMAC13_CHSTAT_n_ER                  (0x00000010uL)
+#define DMAC13_CHSTAT_n_END                 (0x00000020uL)
+#define DMAC13_CHSTAT_n_TC                  (0x00000040uL)
+#define DMAC13_CHSTAT_n_SR                  (0x00000080uL)
+#define DMAC13_CHSTAT_n_DL                  (0x00000100uL)
+#define DMAC13_CHSTAT_n_DW                  (0x00000200uL)
+#define DMAC13_CHSTAT_n_DER                 (0x00000400uL)
+#define DMAC13_CHSTAT_n_MODE                (0x00000800uL)
+#define DMAC13_CHSTAT_n_INTMSK              (0x00010000uL)
+
+#define DMAC13_CHCTRL_n_SETEN               (0x00000001uL)
+#define DMAC13_CHCTRL_n_CLREN               (0x00000002uL)
+#define DMAC13_CHCTRL_n_STG                 (0x00000004uL)
+#define DMAC13_CHCTRL_n_SWRST               (0x00000008uL)
+#define DMAC13_CHCTRL_n_CLRRQ               (0x00000010uL)
+#define DMAC13_CHCTRL_n_CLREND              (0x00000020uL)
+#define DMAC13_CHCTRL_n_CLRTC               (0x00000040uL)
+#define DMAC13_CHCTRL_n_SETSUS              (0x00000100uL)
+#define DMAC13_CHCTRL_n_CLRSUS              (0x00000200uL)
+#define DMAC13_CHCTRL_n_SETINTMSK           (0x00010000uL)
+#define DMAC13_CHCTRL_n_CLRINTMSK           (0x00020000uL)
+
+#define DMAC13_CHCFG_n_SEL                  (0x00000007uL)
+#define DMAC13_CHCFG_n_REQD                 (0x00000008uL)
+#define DMAC13_CHCFG_n_LOEN                 (0x00000010uL)
+#define DMAC13_CHCFG_n_HIEN                 (0x00000020uL)
+#define DMAC13_CHCFG_n_LVL                  (0x00000040uL)
+#define DMAC13_CHCFG_n_AM                   (0x00000700uL)
+#define DMAC13_CHCFG_n_SDS                  (0x0000F000uL)
+#define DMAC13_CHCFG_n_DDS                  (0x000F0000uL)
+#define DMAC13_CHCFG_n_SAD                  (0x00100000uL)
+#define DMAC13_CHCFG_n_DAD                  (0x00200000uL)
+#define DMAC13_CHCFG_n_TM                   (0x00400000uL)
+#define DMAC13_CHCFG_n_DEM                  (0x01000000uL)
+#define DMAC13_CHCFG_n_TCM                  (0x02000000uL)
+#define DMAC13_CHCFG_n_SBE                  (0x08000000uL)
+#define DMAC13_CHCFG_n_RSEL                 (0x10000000uL)
+#define DMAC13_CHCFG_n_RSW                  (0x20000000uL)
+#define DMAC13_CHCFG_n_REN                  (0x40000000uL)
+#define DMAC13_CHCFG_n_DMS                  (0x80000000uL)
+
+#define DMAC13_CHITVL_n_ITVL                (0x0000FFFFuL)
+
+#define DMAC13_CHEXT_n_SCA                  (0x000000F0uL)
+#define DMAC13_CHEXT_n_DCA                  (0x0000F000uL)
+
+#define DMAC13_NXLA_n_NXLA                  (0xFFFFFFFFuL)
+
+#define DMAC13_CRLA_n_CRLA                  (0xFFFFFFFFuL)
+
+/* ---- DMAC14 ---- */
+#define DMAC14_N0SA_n_SA                    (0xFFFFFFFFuL)
+
+#define DMAC14_N0DA_n_DA                    (0xFFFFFFFFuL)
+
+#define DMAC14_N0TB_n_TB                    (0xFFFFFFFFuL)
+
+#define DMAC14_N1SA_n_SA                    (0xFFFFFFFFuL)
+
+#define DMAC14_N1DA_n_DA                    (0xFFFFFFFFuL)
+
+#define DMAC14_N1TB_n_TB                    (0xFFFFFFFFuL)
+
+#define DMAC14_CRSA_n_CRSA                  (0xFFFFFFFFuL)
+
+#define DMAC14_CRDA_n_CRDA                  (0xFFFFFFFFuL)
+
+#define DMAC14_CRTB_n_CRTB                  (0xFFFFFFFFuL)
+
+#define DMAC14_CHSTAT_n_EN                  (0x00000001uL)
+#define DMAC14_CHSTAT_n_RQST                (0x00000002uL)
+#define DMAC14_CHSTAT_n_TACT                (0x00000004uL)
+#define DMAC14_CHSTAT_n_SUS                 (0x00000008uL)
+#define DMAC14_CHSTAT_n_ER                  (0x00000010uL)
+#define DMAC14_CHSTAT_n_END                 (0x00000020uL)
+#define DMAC14_CHSTAT_n_TC                  (0x00000040uL)
+#define DMAC14_CHSTAT_n_SR                  (0x00000080uL)
+#define DMAC14_CHSTAT_n_DL                  (0x00000100uL)
+#define DMAC14_CHSTAT_n_DW                  (0x00000200uL)
+#define DMAC14_CHSTAT_n_DER                 (0x00000400uL)
+#define DMAC14_CHSTAT_n_MODE                (0x00000800uL)
+#define DMAC14_CHSTAT_n_INTMSK              (0x00010000uL)
+
+#define DMAC14_CHCTRL_n_SETEN               (0x00000001uL)
+#define DMAC14_CHCTRL_n_CLREN               (0x00000002uL)
+#define DMAC14_CHCTRL_n_STG                 (0x00000004uL)
+#define DMAC14_CHCTRL_n_SWRST               (0x00000008uL)
+#define DMAC14_CHCTRL_n_CLRRQ               (0x00000010uL)
+#define DMAC14_CHCTRL_n_CLREND              (0x00000020uL)
+#define DMAC14_CHCTRL_n_CLRTC               (0x00000040uL)
+#define DMAC14_CHCTRL_n_SETSUS              (0x00000100uL)
+#define DMAC14_CHCTRL_n_CLRSUS              (0x00000200uL)
+#define DMAC14_CHCTRL_n_SETINTMSK           (0x00010000uL)
+#define DMAC14_CHCTRL_n_CLRINTMSK           (0x00020000uL)
+
+#define DMAC14_CHCFG_n_SEL                  (0x00000007uL)
+#define DMAC14_CHCFG_n_REQD                 (0x00000008uL)
+#define DMAC14_CHCFG_n_LOEN                 (0x00000010uL)
+#define DMAC14_CHCFG_n_HIEN                 (0x00000020uL)
+#define DMAC14_CHCFG_n_LVL                  (0x00000040uL)
+#define DMAC14_CHCFG_n_AM                   (0x00000700uL)
+#define DMAC14_CHCFG_n_SDS                  (0x0000F000uL)
+#define DMAC14_CHCFG_n_DDS                  (0x000F0000uL)
+#define DMAC14_CHCFG_n_SAD                  (0x00100000uL)
+#define DMAC14_CHCFG_n_DAD                  (0x00200000uL)
+#define DMAC14_CHCFG_n_TM                   (0x00400000uL)
+#define DMAC14_CHCFG_n_DEM                  (0x01000000uL)
+#define DMAC14_CHCFG_n_TCM                  (0x02000000uL)
+#define DMAC14_CHCFG_n_SBE                  (0x08000000uL)
+#define DMAC14_CHCFG_n_RSEL                 (0x10000000uL)
+#define DMAC14_CHCFG_n_RSW                  (0x20000000uL)
+#define DMAC14_CHCFG_n_REN                  (0x40000000uL)
+#define DMAC14_CHCFG_n_DMS                  (0x80000000uL)
+
+#define DMAC14_CHITVL_n_ITVL                (0x0000FFFFuL)
+
+#define DMAC14_CHEXT_n_SCA                  (0x000000F0uL)
+#define DMAC14_CHEXT_n_DCA                  (0x0000F000uL)
+
+#define DMAC14_NXLA_n_NXLA                  (0xFFFFFFFFuL)
+
+#define DMAC14_CRLA_n_CRLA                  (0xFFFFFFFFuL)
+
+/* ---- DMAC15 ---- */
+#define DMAC15_N0SA_n_SA                    (0xFFFFFFFFuL)
+
+#define DMAC15_N0DA_n_DA                    (0xFFFFFFFFuL)
+
+#define DMAC15_N0TB_n_TB                    (0xFFFFFFFFuL)
+
+#define DMAC15_N1SA_n_SA                    (0xFFFFFFFFuL)
+
+#define DMAC15_N1DA_n_DA                    (0xFFFFFFFFuL)
+
+#define DMAC15_N1TB_n_TB                    (0xFFFFFFFFuL)
+
+#define DMAC15_CRSA_n_CRSA                  (0xFFFFFFFFuL)
+
+#define DMAC15_CRDA_n_CRDA                  (0xFFFFFFFFuL)
+
+#define DMAC15_CRTB_n_CRTB                  (0xFFFFFFFFuL)
+
+#define DMAC15_CHSTAT_n_EN                  (0x00000001uL)
+#define DMAC15_CHSTAT_n_RQST                (0x00000002uL)
+#define DMAC15_CHSTAT_n_TACT                (0x00000004uL)
+#define DMAC15_CHSTAT_n_SUS                 (0x00000008uL)
+#define DMAC15_CHSTAT_n_ER                  (0x00000010uL)
+#define DMAC15_CHSTAT_n_END                 (0x00000020uL)
+#define DMAC15_CHSTAT_n_TC                  (0x00000040uL)
+#define DMAC15_CHSTAT_n_SR                  (0x00000080uL)
+#define DMAC15_CHSTAT_n_DL                  (0x00000100uL)
+#define DMAC15_CHSTAT_n_DW                  (0x00000200uL)
+#define DMAC15_CHSTAT_n_DER                 (0x00000400uL)
+#define DMAC15_CHSTAT_n_MODE                (0x00000800uL)
+#define DMAC15_CHSTAT_n_INTMSK              (0x00010000uL)
+
+#define DMAC15_CHCTRL_n_SETEN               (0x00000001uL)
+#define DMAC15_CHCTRL_n_CLREN               (0x00000002uL)
+#define DMAC15_CHCTRL_n_STG                 (0x00000004uL)
+#define DMAC15_CHCTRL_n_SWRST               (0x00000008uL)
+#define DMAC15_CHCTRL_n_CLRRQ               (0x00000010uL)
+#define DMAC15_CHCTRL_n_CLREND              (0x00000020uL)
+#define DMAC15_CHCTRL_n_CLRTC               (0x00000040uL)
+#define DMAC15_CHCTRL_n_SETSUS              (0x00000100uL)
+#define DMAC15_CHCTRL_n_CLRSUS              (0x00000200uL)
+#define DMAC15_CHCTRL_n_SETINTMSK           (0x00010000uL)
+#define DMAC15_CHCTRL_n_CLRINTMSK           (0x00020000uL)
+
+#define DMAC15_CHCFG_n_SEL                  (0x00000007uL)
+#define DMAC15_CHCFG_n_REQD                 (0x00000008uL)
+#define DMAC15_CHCFG_n_LOEN                 (0x00000010uL)
+#define DMAC15_CHCFG_n_HIEN                 (0x00000020uL)
+#define DMAC15_CHCFG_n_LVL                  (0x00000040uL)
+#define DMAC15_CHCFG_n_AM                   (0x00000700uL)
+#define DMAC15_CHCFG_n_SDS                  (0x0000F000uL)
+#define DMAC15_CHCFG_n_DDS                  (0x000F0000uL)
+#define DMAC15_CHCFG_n_SAD                  (0x00100000uL)
+#define DMAC15_CHCFG_n_DAD                  (0x00200000uL)
+#define DMAC15_CHCFG_n_TM                   (0x00400000uL)
+#define DMAC15_CHCFG_n_DEM                  (0x01000000uL)
+#define DMAC15_CHCFG_n_TCM                  (0x02000000uL)
+#define DMAC15_CHCFG_n_SBE                  (0x08000000uL)
+#define DMAC15_CHCFG_n_RSEL                 (0x10000000uL)
+#define DMAC15_CHCFG_n_RSW                  (0x20000000uL)
+#define DMAC15_CHCFG_n_REN                  (0x40000000uL)
+#define DMAC15_CHCFG_n_DMS                  (0x80000000uL)
+
+#define DMAC15_CHITVL_n_ITVL                (0x0000FFFFuL)
+
+#define DMAC15_CHEXT_n_SCA                  (0x000000F0uL)
+#define DMAC15_CHEXT_n_DCA                  (0x0000F000uL)
+
+#define DMAC15_NXLA_n_NXLA                  (0xFFFFFFFFuL)
+
+#define DMAC15_CRLA_n_CRLA                  (0xFFFFFFFFuL)
+
+/* ---- DMAC8-15 ---- */
+#define DMAC815_DCTRL_8_15_PR               (0x00000001uL)
+#define DMAC815_DCTRL_8_15_LVINT            (0x00000002uL)
+#define DMAC815_DCTRL_8_15_LDCA             (0x0000003CuL)
+#define DMAC815_DCTRL_8_15_LWCA             (0x00003C00uL)
+
+#define DMAC815_DSTAT_EN_8_15_EN8           (0x00000001uL)
+#define DMAC815_DSTAT_EN_8_15_EN9           (0x00000002uL)
+#define DMAC815_DSTAT_EN_8_15_EN10          (0x00000004uL)
+#define DMAC815_DSTAT_EN_8_15_EN11          (0x00000008uL)
+#define DMAC815_DSTAT_EN_8_15_EN12          (0x00000010uL)
+#define DMAC815_DSTAT_EN_8_15_EN13          (0x00000020uL)
+#define DMAC815_DSTAT_EN_8_15_EN14          (0x00000040uL)
+#define DMAC815_DSTAT_EN_8_15_EN15          (0x00000080uL)
+
+#define DMAC815_DSTAT_ER_8_15_ER8           (0x00000001uL)
+#define DMAC815_DSTAT_ER_8_15_ER9           (0x00000002uL)
+#define DMAC815_DSTAT_ER_8_15_ER10          (0x00000004uL)
+#define DMAC815_DSTAT_ER_8_15_ER11          (0x00000008uL)
+#define DMAC815_DSTAT_ER_8_15_ER12          (0x00000010uL)
+#define DMAC815_DSTAT_ER_8_15_ER13          (0x00000020uL)
+#define DMAC815_DSTAT_ER_8_15_ER14          (0x00000040uL)
+#define DMAC815_DSTAT_ER_8_15_ER15          (0x00000080uL)
+
+#define DMAC815_DSTAT_END_8_15_END8         (0x00000001uL)
+#define DMAC815_DSTAT_END_8_15_END9         (0x00000002uL)
+#define DMAC815_DSTAT_END_8_15_END10        (0x00000004uL)
+#define DMAC815_DSTAT_END_8_15_END11        (0x00000008uL)
+#define DMAC815_DSTAT_END_8_15_END12        (0x00000010uL)
+#define DMAC815_DSTAT_END_8_15_END13        (0x00000020uL)
+#define DMAC815_DSTAT_END_8_15_END14        (0x00000040uL)
+#define DMAC815_DSTAT_END_8_15_END15        (0x00000080uL)
+
+#define DMAC815_DSTAT_TC_8_15_TC8           (0x00000001uL)
+#define DMAC815_DSTAT_TC_8_15_TC9           (0x00000002uL)
+#define DMAC815_DSTAT_TC_8_15_TC10          (0x00000004uL)
+#define DMAC815_DSTAT_TC_8_15_TC11          (0x00000008uL)
+#define DMAC815_DSTAT_TC_8_15_TC12          (0x00000010uL)
+#define DMAC815_DSTAT_TC_8_15_TC13          (0x00000020uL)
+#define DMAC815_DSTAT_TC_8_15_TC14          (0x00000040uL)
+#define DMAC815_DSTAT_TC_8_15_TC15          (0x00000080uL)
+
+#define DMAC815_DSTAT_SUS_8_15_SUS8         (0x00000001uL)
+#define DMAC815_DSTAT_SUS_8_15_SUS9         (0x00000002uL)
+#define DMAC815_DSTAT_SUS_8_15_SUS10        (0x00000004uL)
+#define DMAC815_DSTAT_SUS_8_15_SUS11        (0x00000008uL)
+#define DMAC815_DSTAT_SUS_8_15_SUS12        (0x00000010uL)
+#define DMAC815_DSTAT_SUS_8_15_SUS13        (0x00000020uL)
+#define DMAC815_DSTAT_SUS_8_15_SUS14        (0x00000040uL)
+#define DMAC815_DSTAT_SUS_8_15_SUS15        (0x00000080uL)
+
+/* ---- DMAC0-1 ---- */
+#define DMAC01_DMARS_CH0_RID                (0x00000003uL)
+#define DMAC01_DMARS_CH0_MID                (0x000001FCuL)
+#define DMAC01_DMARS_CH1_RID                (0x00030000uL)
+#define DMAC01_DMARS_CH1_MID                (0x01FC0000uL)
+
+/* ---- DMAC2-3 ---- */
+#define DMAC23_DMARS_CH2_RID                (0x00000003uL)
+#define DMAC23_DMARS_CH2_MID                (0x000001FCuL)
+#define DMAC23_DMARS_CH3_RID                (0x00030000uL)
+#define DMAC23_DMARS_CH3_MID                (0x01FC0000uL)
+
+/* ---- DMAC4-5 ---- */
+#define DMAC45_DMARS_CH4_RID                (0x00000003uL)
+#define DMAC45_DMARS_CH4_MID                (0x000001FCuL)
+#define DMAC45_DMARS_CH5_RID                (0x00030000uL)
+#define DMAC45_DMARS_CH5_MID                (0x01FC0000uL)
+
+/* ---- DMAC6-7 ---- */
+#define DMAC67_DMARS_CH6_RID                (0x00000003uL)
+#define DMAC67_DMARS_CH6_MID                (0x000001FCuL)
+#define DMAC67_DMARS_CH7_RID                (0x00030000uL)
+#define DMAC67_DMARS_CH7_MID                (0x01FC0000uL)
+
+/* ---- DMAC8-9 ---- */
+#define DMAC89_DMARS_CH8_RID                (0x00000003uL)
+#define DMAC89_DMARS_CH8_MID                (0x000001FCuL)
+#define DMAC89_DMARS_CH9_RID                (0x00030000uL)
+#define DMAC89_DMARS_CH9_MID                (0x01FC0000uL)
+
+/* ---- DMAC10-11 ---- */
+#define DMAC1011_DMARS_CH10_RID             (0x00000003uL)
+#define DMAC1011_DMARS_CH10_MID             (0x000001FCuL)
+#define DMAC1011_DMARS_CH11_RID             (0x00030000uL)
+#define DMAC1011_DMARS_CH11_MID             (0x01FC0000uL)
+
+/* ---- DMAC12-13 ---- */
+#define DMAC1213_DMARS_CH12_RID             (0x00000003uL)
+#define DMAC1213_DMARS_CH12_MID             (0x000001FCuL)
+#define DMAC1213_DMARS_CH13_RID             (0x00030000uL)
+#define DMAC1213_DMARS_CH13_MID             (0x01FC0000uL)
+
+/* ---- DMAC14-15 ---- */
+#define DMAC1415_DMARS_CH14_RID             (0x00000003uL)
+#define DMAC1415_DMARS_CH14_MID             (0x000001FCuL)
+#define DMAC1415_DMARS_CH15_RID             (0x00030000uL)
+#define DMAC1415_DMARS_CH15_MID             (0x01FC0000uL)
+
+
+/* ==== Shift values for IO registers ==== */
+/* ---- DMAC0 ---- */
+#define DMAC0_N0SA_n_SA_SHIFT               (0u)
+
+#define DMAC0_N0DA_n_DA_SHIFT               (0u)
+
+#define DMAC0_N0TB_n_TB_SHIFT               (0u)
+
+#define DMAC0_N1SA_n_SA_SHIFT               (0u)
+
+#define DMAC0_N1DA_n_DA_SHIFT               (0u)
+
+#define DMAC0_N1TB_n_TB_SHIFT               (0u)
+
+#define DMAC0_CRSA_n_CRSA_SHIFT             (0u)
+
+#define DMAC0_CRDA_n_CRDA_SHIFT             (0u)
+
+#define DMAC0_CRTB_n_CRTB_SHIFT             (0u)
+
+#define DMAC0_CHSTAT_n_EN_SHIFT             (0u)
+#define DMAC0_CHSTAT_n_RQST_SHIFT           (1u)
+#define DMAC0_CHSTAT_n_TACT_SHIFT           (2u)
+#define DMAC0_CHSTAT_n_SUS_SHIFT            (3u)
+#define DMAC0_CHSTAT_n_ER_SHIFT             (4u)
+#define DMAC0_CHSTAT_n_END_SHIFT            (5u)
+#define DMAC0_CHSTAT_n_TC_SHIFT             (6u)
+#define DMAC0_CHSTAT_n_SR_SHIFT             (7u)
+#define DMAC0_CHSTAT_n_DL_SHIFT             (8u)
+#define DMAC0_CHSTAT_n_DW_SHIFT             (9u)
+#define DMAC0_CHSTAT_n_DER_SHIFT            (10u)
+#define DMAC0_CHSTAT_n_MODE_SHIFT           (11u)
+#define DMAC0_CHSTAT_n_INTMSK_SHIFT         (16u)
+
+#define DMAC0_CHCTRL_n_SETEN_SHIFT          (0u)
+#define DMAC0_CHCTRL_n_CLREN_SHIFT          (1u)
+#define DMAC0_CHCTRL_n_STG_SHIFT            (2u)
+#define DMAC0_CHCTRL_n_SWRST_SHIFT          (3u)
+#define DMAC0_CHCTRL_n_CLRRQ_SHIFT          (4u)
+#define DMAC0_CHCTRL_n_CLREND_SHIFT         (5u)
+#define DMAC0_CHCTRL_n_CLRTC_SHIFT          (6u)
+#define DMAC0_CHCTRL_n_SETSUS_SHIFT         (8u)
+#define DMAC0_CHCTRL_n_CLRSUS_SHIFT         (9u)
+#define DMAC0_CHCTRL_n_SETINTMSK_SHIFT      (16u)
+#define DMAC0_CHCTRL_n_CLRINTMSK_SHIFT      (17u)
+
+#define DMAC0_CHCFG_n_SEL_SHIFT             (0u)
+#define DMAC0_CHCFG_n_REQD_SHIFT            (3u)
+#define DMAC0_CHCFG_n_LOEN_SHIFT            (4u)
+#define DMAC0_CHCFG_n_HIEN_SHIFT            (5u)
+#define DMAC0_CHCFG_n_LVL_SHIFT             (6u)
+#define DMAC0_CHCFG_n_AM_SHIFT              (8u)
+#define DMAC0_CHCFG_n_SDS_SHIFT             (12u)
+#define DMAC0_CHCFG_n_DDS_SHIFT             (16u)
+#define DMAC0_CHCFG_n_SAD_SHIFT             (20u)
+#define DMAC0_CHCFG_n_DAD_SHIFT             (21u)
+#define DMAC0_CHCFG_n_TM_SHIFT              (22u)
+#define DMAC0_CHCFG_n_DEM_SHIFT             (24u)
+#define DMAC0_CHCFG_n_TCM_SHIFT             (25u)
+#define DMAC0_CHCFG_n_SBE_SHIFT             (27u)
+#define DMAC0_CHCFG_n_RSEL_SHIFT            (28u)
+#define DMAC0_CHCFG_n_RSW_SHIFT             (29u)
+#define DMAC0_CHCFG_n_REN_SHIFT             (30u)
+#define DMAC0_CHCFG_n_DMS_SHIFT             (31u)
+
+#define DMAC0_CHITVL_n_ITVL_SHIFT           (0u)
+
+#define DMAC0_CHEXT_n_SCA_SHIFT             (4u)
+#define DMAC0_CHEXT_n_DCA_SHIFT             (12u)
+
+#define DMAC0_NXLA_n_NXLA_SHIFT             (0u)
+
+#define DMAC0_CRLA_n_CRLA_SHIFT             (0u)
+
+/* ---- DMAC1 ---- */
+#define DMAC1_N0SA_n_SA_SHIFT               (0u)
+
+#define DMAC1_N0DA_n_DA_SHIFT               (0u)
+
+#define DMAC1_N0TB_n_TB_SHIFT               (0u)
+
+#define DMAC1_N1SA_n_SA_SHIFT               (0u)
+
+#define DMAC1_N1DA_n_DA_SHIFT               (0u)
+
+#define DMAC1_N1TB_n_TB_SHIFT               (0u)
+
+#define DMAC1_CRSA_n_CRSA_SHIFT             (0u)
+
+#define DMAC1_CRDA_n_CRDA_SHIFT             (0u)
+
+#define DMAC1_CRTB_n_CRTB_SHIFT             (0u)
+
+#define DMAC1_CHSTAT_n_EN_SHIFT             (0u)
+#define DMAC1_CHSTAT_n_RQST_SHIFT           (1u)
+#define DMAC1_CHSTAT_n_TACT_SHIFT           (2u)
+#define DMAC1_CHSTAT_n_SUS_SHIFT            (3u)
+#define DMAC1_CHSTAT_n_ER_SHIFT             (4u)
+#define DMAC1_CHSTAT_n_END_SHIFT            (5u)
+#define DMAC1_CHSTAT_n_TC_SHIFT             (6u)
+#define DMAC1_CHSTAT_n_SR_SHIFT             (7u)
+#define DMAC1_CHSTAT_n_DL_SHIFT             (8u)
+#define DMAC1_CHSTAT_n_DW_SHIFT             (9u)
+#define DMAC1_CHSTAT_n_DER_SHIFT            (10u)
+#define DMAC1_CHSTAT_n_MODE_SHIFT           (11u)
+#define DMAC1_CHSTAT_n_INTMSK_SHIFT         (16u)
+
+#define DMAC1_CHCTRL_n_SETEN_SHIFT          (0u)
+#define DMAC1_CHCTRL_n_CLREN_SHIFT          (1u)
+#define DMAC1_CHCTRL_n_STG_SHIFT            (2u)
+#define DMAC1_CHCTRL_n_SWRST_SHIFT          (3u)
+#define DMAC1_CHCTRL_n_CLRRQ_SHIFT          (4u)
+#define DMAC1_CHCTRL_n_CLREND_SHIFT         (5u)
+#define DMAC1_CHCTRL_n_CLRTC_SHIFT          (6u)
+#define DMAC1_CHCTRL_n_SETSUS_SHIFT         (8u)
+#define DMAC1_CHCTRL_n_CLRSUS_SHIFT         (9u)
+#define DMAC1_CHCTRL_n_SETINTMSK_SHIFT      (16u)
+#define DMAC1_CHCTRL_n_CLRINTMSK_SHIFT      (17u)
+
+#define DMAC1_CHCFG_n_SEL_SHIFT             (0u)
+#define DMAC1_CHCFG_n_REQD_SHIFT            (3u)
+#define DMAC1_CHCFG_n_LOEN_SHIFT            (4u)
+#define DMAC1_CHCFG_n_HIEN_SHIFT            (5u)
+#define DMAC1_CHCFG_n_LVL_SHIFT             (6u)
+#define DMAC1_CHCFG_n_AM_SHIFT              (8u)
+#define DMAC1_CHCFG_n_SDS_SHIFT             (12u)
+#define DMAC1_CHCFG_n_DDS_SHIFT             (16u)
+#define DMAC1_CHCFG_n_SAD_SHIFT             (20u)
+#define DMAC1_CHCFG_n_DAD_SHIFT             (21u)
+#define DMAC1_CHCFG_n_TM_SHIFT              (22u)
+#define DMAC1_CHCFG_n_DEM_SHIFT             (24u)
+#define DMAC1_CHCFG_n_TCM_SHIFT             (25u)
+#define DMAC1_CHCFG_n_SBE_SHIFT             (27u)
+#define DMAC1_CHCFG_n_RSEL_SHIFT            (28u)
+#define DMAC1_CHCFG_n_RSW_SHIFT             (29u)
+#define DMAC1_CHCFG_n_REN_SHIFT             (30u)
+#define DMAC1_CHCFG_n_DMS_SHIFT             (31u)
+
+#define DMAC1_CHITVL_n_ITVL_SHIFT           (0u)
+
+#define DMAC1_CHEXT_n_SCA_SHIFT             (4u)
+#define DMAC1_CHEXT_n_DCA_SHIFT             (12u)
+
+#define DMAC1_NXLA_n_NXLA_SHIFT             (0u)
+
+#define DMAC1_CRLA_n_CRLA_SHIFT             (0u)
+
+/* ---- DMAC2 ---- */
+#define DMAC2_N0SA_n_SA_SHIFT               (0u)
+
+#define DMAC2_N0DA_n_DA_SHIFT               (0u)
+
+#define DMAC2_N0TB_n_TB_SHIFT               (0u)
+
+#define DMAC2_N1SA_n_SA_SHIFT               (0u)
+
+#define DMAC2_N1DA_n_DA_SHIFT               (0u)
+
+#define DMAC2_N1TB_n_TB_SHIFT               (0u)
+
+#define DMAC2_CRSA_n_CRSA_SHIFT             (0u)
+
+#define DMAC2_CRDA_n_CRDA_SHIFT             (0u)
+
+#define DMAC2_CRTB_n_CRTB_SHIFT             (0u)
+
+#define DMAC2_CHSTAT_n_EN_SHIFT             (0u)
+#define DMAC2_CHSTAT_n_RQST_SHIFT           (1u)
+#define DMAC2_CHSTAT_n_TACT_SHIFT           (2u)
+#define DMAC2_CHSTAT_n_SUS_SHIFT            (3u)
+#define DMAC2_CHSTAT_n_ER_SHIFT             (4u)
+#define DMAC2_CHSTAT_n_END_SHIFT            (5u)
+#define DMAC2_CHSTAT_n_TC_SHIFT             (6u)
+#define DMAC2_CHSTAT_n_SR_SHIFT             (7u)
+#define DMAC2_CHSTAT_n_DL_SHIFT             (8u)
+#define DMAC2_CHSTAT_n_DW_SHIFT             (9u)
+#define DMAC2_CHSTAT_n_DER_SHIFT            (10u)
+#define DMAC2_CHSTAT_n_MODE_SHIFT           (11u)
+#define DMAC2_CHSTAT_n_INTMSK_SHIFT         (16u)
+
+#define DMAC2_CHCTRL_n_SETEN_SHIFT          (0u)
+#define DMAC2_CHCTRL_n_CLREN_SHIFT          (1u)
+#define DMAC2_CHCTRL_n_STG_SHIFT            (2u)
+#define DMAC2_CHCTRL_n_SWRST_SHIFT          (3u)
+#define DMAC2_CHCTRL_n_CLRRQ_SHIFT          (4u)
+#define DMAC2_CHCTRL_n_CLREND_SHIFT         (5u)
+#define DMAC2_CHCTRL_n_CLRTC_SHIFT          (6u)
+#define DMAC2_CHCTRL_n_SETSUS_SHIFT         (8u)
+#define DMAC2_CHCTRL_n_CLRSUS_SHIFT         (9u)
+#define DMAC2_CHCTRL_n_SETINTMSK_SHIFT      (16u)
+#define DMAC2_CHCTRL_n_CLRINTMSK_SHIFT      (17u)
+
+#define DMAC2_CHCFG_n_SEL_SHIFT             (0u)
+#define DMAC2_CHCFG_n_REQD_SHIFT            (3u)
+#define DMAC2_CHCFG_n_LOEN_SHIFT            (4u)
+#define DMAC2_CHCFG_n_HIEN_SHIFT            (5u)
+#define DMAC2_CHCFG_n_LVL_SHIFT             (6u)
+#define DMAC2_CHCFG_n_AM_SHIFT              (8u)
+#define DMAC2_CHCFG_n_SDS_SHIFT             (12u)
+#define DMAC2_CHCFG_n_DDS_SHIFT             (16u)
+#define DMAC2_CHCFG_n_SAD_SHIFT             (20u)
+#define DMAC2_CHCFG_n_DAD_SHIFT             (21u)
+#define DMAC2_CHCFG_n_TM_SHIFT              (22u)
+#define DMAC2_CHCFG_n_DEM_SHIFT             (24u)
+#define DMAC2_CHCFG_n_TCM_SHIFT             (25u)
+#define DMAC2_CHCFG_n_SBE_SHIFT             (27u)
+#define DMAC2_CHCFG_n_RSEL_SHIFT            (28u)
+#define DMAC2_CHCFG_n_RSW_SHIFT             (29u)
+#define DMAC2_CHCFG_n_REN_SHIFT             (30u)
+#define DMAC2_CHCFG_n_DMS_SHIFT             (31u)
+
+#define DMAC2_CHITVL_n_ITVL_SHIFT           (0u)
+
+#define DMAC2_CHEXT_n_SCA_SHIFT             (4u)
+#define DMAC2_CHEXT_n_DCA_SHIFT             (12u)
+
+#define DMAC2_NXLA_n_NXLA_SHIFT             (0u)
+
+#define DMAC2_CRLA_n_CRLA_SHIFT             (0u)
+
+/* ---- DMAC3 ---- */
+#define DMAC3_N0SA_n_SA_SHIFT               (0u)
+
+#define DMAC3_N0DA_n_DA_SHIFT               (0u)
+
+#define DMAC3_N0TB_n_TB_SHIFT               (0u)
+
+#define DMAC3_N1SA_n_SA_SHIFT               (0u)
+
+#define DMAC3_N1DA_n_DA_SHIFT               (0u)
+
+#define DMAC3_N1TB_n_TB_SHIFT               (0u)
+
+#define DMAC3_CRSA_n_CRSA_SHIFT             (0u)
+
+#define DMAC3_CRDA_n_CRDA_SHIFT             (0u)
+
+#define DMAC3_CRTB_n_CRTB_SHIFT             (0u)
+
+#define DMAC3_CHSTAT_n_EN_SHIFT             (0u)
+#define DMAC3_CHSTAT_n_RQST_SHIFT           (1u)
+#define DMAC3_CHSTAT_n_TACT_SHIFT           (2u)
+#define DMAC3_CHSTAT_n_SUS_SHIFT            (3u)
+#define DMAC3_CHSTAT_n_ER_SHIFT             (4u)
+#define DMAC3_CHSTAT_n_END_SHIFT            (5u)
+#define DMAC3_CHSTAT_n_TC_SHIFT             (6u)
+#define DMAC3_CHSTAT_n_SR_SHIFT             (7u)
+#define DMAC3_CHSTAT_n_DL_SHIFT             (8u)
+#define DMAC3_CHSTAT_n_DW_SHIFT             (9u)
+#define DMAC3_CHSTAT_n_DER_SHIFT            (10u)
+#define DMAC3_CHSTAT_n_MODE_SHIFT           (11u)
+#define DMAC3_CHSTAT_n_INTMSK_SHIFT         (16u)
+
+#define DMAC3_CHCTRL_n_SETEN_SHIFT          (0u)
+#define DMAC3_CHCTRL_n_CLREN_SHIFT          (1u)
+#define DMAC3_CHCTRL_n_STG_SHIFT            (2u)
+#define DMAC3_CHCTRL_n_SWRST_SHIFT          (3u)
+#define DMAC3_CHCTRL_n_CLRRQ_SHIFT          (4u)
+#define DMAC3_CHCTRL_n_CLREND_SHIFT         (5u)
+#define DMAC3_CHCTRL_n_CLRTC_SHIFT          (6u)
+#define DMAC3_CHCTRL_n_SETSUS_SHIFT         (8u)
+#define DMAC3_CHCTRL_n_CLRSUS_SHIFT         (9u)
+#define DMAC3_CHCTRL_n_SETINTMSK_SHIFT      (16u)
+#define DMAC3_CHCTRL_n_CLRINTMSK_SHIFT      (17u)
+
+#define DMAC3_CHCFG_n_SEL_SHIFT             (0u)
+#define DMAC3_CHCFG_n_REQD_SHIFT            (3u)
+#define DMAC3_CHCFG_n_LOEN_SHIFT            (4u)
+#define DMAC3_CHCFG_n_HIEN_SHIFT            (5u)
+#define DMAC3_CHCFG_n_LVL_SHIFT             (6u)
+#define DMAC3_CHCFG_n_AM_SHIFT              (8u)
+#define DMAC3_CHCFG_n_SDS_SHIFT             (12u)
+#define DMAC3_CHCFG_n_DDS_SHIFT             (16u)
+#define DMAC3_CHCFG_n_SAD_SHIFT             (20u)
+#define DMAC3_CHCFG_n_DAD_SHIFT             (21u)
+#define DMAC3_CHCFG_n_TM_SHIFT              (22u)
+#define DMAC3_CHCFG_n_DEM_SHIFT             (24u)
+#define DMAC3_CHCFG_n_TCM_SHIFT             (25u)
+#define DMAC3_CHCFG_n_SBE_SHIFT             (27u)
+#define DMAC3_CHCFG_n_RSEL_SHIFT            (28u)
+#define DMAC3_CHCFG_n_RSW_SHIFT             (29u)
+#define DMAC3_CHCFG_n_REN_SHIFT             (30u)
+#define DMAC3_CHCFG_n_DMS_SHIFT             (31u)
+
+#define DMAC3_CHITVL_n_ITVL_SHIFT           (0u)
+
+#define DMAC3_CHEXT_n_SCA_SHIFT             (4u)
+#define DMAC3_CHEXT_n_DCA_SHIFT             (12u)
+
+#define DMAC3_NXLA_n_NXLA_SHIFT             (0u)
+
+#define DMAC3_CRLA_n_CRLA_SHIFT             (0u)
+
+/* ---- DMAC4 ---- */
+#define DMAC4_N0SA_n_SA_SHIFT               (0u)
+
+#define DMAC4_N0DA_n_DA_SHIFT               (0u)
+
+#define DMAC4_N0TB_n_TB_SHIFT               (0u)
+
+#define DMAC4_N1SA_n_SA_SHIFT               (0u)
+
+#define DMAC4_N1DA_n_DA_SHIFT               (0u)
+
+#define DMAC4_N1TB_n_TB_SHIFT               (0u)
+
+#define DMAC4_CRSA_n_CRSA_SHIFT             (0u)
+
+#define DMAC4_CRDA_n_CRDA_SHIFT             (0u)
+
+#define DMAC4_CRTB_n_CRTB_SHIFT             (0u)
+
+#define DMAC4_CHSTAT_n_EN_SHIFT             (0u)
+#define DMAC4_CHSTAT_n_RQST_SHIFT           (1u)
+#define DMAC4_CHSTAT_n_TACT_SHIFT           (2u)
+#define DMAC4_CHSTAT_n_SUS_SHIFT            (3u)
+#define DMAC4_CHSTAT_n_ER_SHIFT             (4u)
+#define DMAC4_CHSTAT_n_END_SHIFT            (5u)
+#define DMAC4_CHSTAT_n_TC_SHIFT             (6u)
+#define DMAC4_CHSTAT_n_SR_SHIFT             (7u)
+#define DMAC4_CHSTAT_n_DL_SHIFT             (8u)
+#define DMAC4_CHSTAT_n_DW_SHIFT             (9u)
+#define DMAC4_CHSTAT_n_DER_SHIFT            (10u)
+#define DMAC4_CHSTAT_n_MODE_SHIFT           (11u)
+#define DMAC4_CHSTAT_n_INTMSK_SHIFT         (16u)
+
+#define DMAC4_CHCTRL_n_SETEN_SHIFT          (0u)
+#define DMAC4_CHCTRL_n_CLREN_SHIFT          (1u)
+#define DMAC4_CHCTRL_n_STG_SHIFT            (2u)
+#define DMAC4_CHCTRL_n_SWRST_SHIFT          (3u)
+#define DMAC4_CHCTRL_n_CLRRQ_SHIFT          (4u)
+#define DMAC4_CHCTRL_n_CLREND_SHIFT         (5u)
+#define DMAC4_CHCTRL_n_CLRTC_SHIFT          (6u)
+#define DMAC4_CHCTRL_n_SETSUS_SHIFT         (8u)
+#define DMAC4_CHCTRL_n_CLRSUS_SHIFT         (9u)
+#define DMAC4_CHCTRL_n_SETINTMSK_SHIFT      (16u)
+#define DMAC4_CHCTRL_n_CLRINTMSK_SHIFT      (17u)
+
+#define DMAC4_CHCFG_n_SEL_SHIFT             (0u)
+#define DMAC4_CHCFG_n_REQD_SHIFT            (3u)
+#define DMAC4_CHCFG_n_LOEN_SHIFT            (4u)
+#define DMAC4_CHCFG_n_HIEN_SHIFT            (5u)
+#define DMAC4_CHCFG_n_LVL_SHIFT             (6u)
+#define DMAC4_CHCFG_n_AM_SHIFT              (8u)
+#define DMAC4_CHCFG_n_SDS_SHIFT             (12u)
+#define DMAC4_CHCFG_n_DDS_SHIFT             (16u)
+#define DMAC4_CHCFG_n_SAD_SHIFT             (20u)
+#define DMAC4_CHCFG_n_DAD_SHIFT             (21u)
+#define DMAC4_CHCFG_n_TM_SHIFT              (22u)
+#define DMAC4_CHCFG_n_DEM_SHIFT             (24u)
+#define DMAC4_CHCFG_n_TCM_SHIFT             (25u)
+#define DMAC4_CHCFG_n_SBE_SHIFT             (27u)
+#define DMAC4_CHCFG_n_RSEL_SHIFT            (28u)
+#define DMAC4_CHCFG_n_RSW_SHIFT             (29u)
+#define DMAC4_CHCFG_n_REN_SHIFT             (30u)
+#define DMAC4_CHCFG_n_DMS_SHIFT             (31u)
+
+#define DMAC4_CHITVL_n_ITVL_SHIFT           (0u)
+
+#define DMAC4_CHEXT_n_SCA_SHIFT             (4u)
+#define DMAC4_CHEXT_n_DCA_SHIFT             (12u)
+
+#define DMAC4_NXLA_n_NXLA_SHIFT             (0u)
+
+#define DMAC4_CRLA_n_CRLA_SHIFT             (0u)
+
+/* ---- DMAC5 ---- */
+#define DMAC5_N0SA_n_SA_SHIFT               (0u)
+
+#define DMAC5_N0DA_n_DA_SHIFT               (0u)
+
+#define DMAC5_N0TB_n_TB_SHIFT               (0u)
+
+#define DMAC5_N1SA_n_SA_SHIFT               (0u)
+
+#define DMAC5_N1DA_n_DA_SHIFT               (0u)
+
+#define DMAC5_N1TB_n_TB_SHIFT               (0u)
+
+#define DMAC5_CRSA_n_CRSA_SHIFT             (0u)
+
+#define DMAC5_CRDA_n_CRDA_SHIFT             (0u)
+
+#define DMAC5_CRTB_n_CRTB_SHIFT             (0u)
+
+#define DMAC5_CHSTAT_n_EN_SHIFT             (0u)
+#define DMAC5_CHSTAT_n_RQST_SHIFT           (1u)
+#define DMAC5_CHSTAT_n_TACT_SHIFT           (2u)
+#define DMAC5_CHSTAT_n_SUS_SHIFT            (3u)
+#define DMAC5_CHSTAT_n_ER_SHIFT             (4u)
+#define DMAC5_CHSTAT_n_END_SHIFT            (5u)
+#define DMAC5_CHSTAT_n_TC_SHIFT             (6u)
+#define DMAC5_CHSTAT_n_SR_SHIFT             (7u)
+#define DMAC5_CHSTAT_n_DL_SHIFT             (8u)
+#define DMAC5_CHSTAT_n_DW_SHIFT             (9u)
+#define DMAC5_CHSTAT_n_DER_SHIFT            (10u)
+#define DMAC5_CHSTAT_n_MODE_SHIFT           (11u)
+#define DMAC5_CHSTAT_n_INTMSK_SHIFT         (16u)
+
+#define DMAC5_CHCTRL_n_SETEN_SHIFT          (0u)
+#define DMAC5_CHCTRL_n_CLREN_SHIFT          (1u)
+#define DMAC5_CHCTRL_n_STG_SHIFT            (2u)
+#define DMAC5_CHCTRL_n_SWRST_SHIFT          (3u)
+#define DMAC5_CHCTRL_n_CLRRQ_SHIFT          (4u)
+#define DMAC5_CHCTRL_n_CLREND_SHIFT         (5u)
+#define DMAC5_CHCTRL_n_CLRTC_SHIFT          (6u)
+#define DMAC5_CHCTRL_n_SETSUS_SHIFT         (8u)
+#define DMAC5_CHCTRL_n_CLRSUS_SHIFT         (9u)
+#define DMAC5_CHCTRL_n_SETINTMSK_SHIFT      (16u)
+#define DMAC5_CHCTRL_n_CLRINTMSK_SHIFT      (17u)
+
+#define DMAC5_CHCFG_n_SEL_SHIFT             (0u)
+#define DMAC5_CHCFG_n_REQD_SHIFT            (3u)
+#define DMAC5_CHCFG_n_LOEN_SHIFT            (4u)
+#define DMAC5_CHCFG_n_HIEN_SHIFT            (5u)
+#define DMAC5_CHCFG_n_LVL_SHIFT             (6u)
+#define DMAC5_CHCFG_n_AM_SHIFT              (8u)
+#define DMAC5_CHCFG_n_SDS_SHIFT             (12u)
+#define DMAC5_CHCFG_n_DDS_SHIFT             (16u)
+#define DMAC5_CHCFG_n_SAD_SHIFT             (20u)
+#define DMAC5_CHCFG_n_DAD_SHIFT             (21u)
+#define DMAC5_CHCFG_n_TM_SHIFT              (22u)
+#define DMAC5_CHCFG_n_DEM_SHIFT             (24u)
+#define DMAC5_CHCFG_n_TCM_SHIFT             (25u)
+#define DMAC5_CHCFG_n_SBE_SHIFT             (27u)
+#define DMAC5_CHCFG_n_RSEL_SHIFT            (28u)
+#define DMAC5_CHCFG_n_RSW_SHIFT             (29u)
+#define DMAC5_CHCFG_n_REN_SHIFT             (30u)
+#define DMAC5_CHCFG_n_DMS_SHIFT             (31u)
+
+#define DMAC5_CHITVL_n_ITVL_SHIFT           (0u)
+
+#define DMAC5_CHEXT_n_SCA_SHIFT             (4u)
+#define DMAC5_CHEXT_n_DCA_SHIFT             (12u)
+
+#define DMAC5_NXLA_n_NXLA_SHIFT             (0u)
+
+#define DMAC5_CRLA_n_CRLA_SHIFT             (0u)
+
+/* ---- DMAC6 ---- */
+#define DMAC6_N0SA_n_SA_SHIFT               (0u)
+
+#define DMAC6_N0DA_n_DA_SHIFT               (0u)
+
+#define DMAC6_N0TB_n_TB_SHIFT               (0u)
+
+#define DMAC6_N1SA_n_SA_SHIFT               (0u)
+
+#define DMAC6_N1DA_n_DA_SHIFT               (0u)
+
+#define DMAC6_N1TB_n_TB_SHIFT               (0u)
+
+#define DMAC6_CRSA_n_CRSA_SHIFT             (0u)
+
+#define DMAC6_CRDA_n_CRDA_SHIFT             (0u)
+
+#define DMAC6_CRTB_n_CRTB_SHIFT             (0u)
+
+#define DMAC6_CHSTAT_n_EN_SHIFT             (0u)
+#define DMAC6_CHSTAT_n_RQST_SHIFT           (1u)
+#define DMAC6_CHSTAT_n_TACT_SHIFT           (2u)
+#define DMAC6_CHSTAT_n_SUS_SHIFT            (3u)
+#define DMAC6_CHSTAT_n_ER_SHIFT             (4u)
+#define DMAC6_CHSTAT_n_END_SHIFT            (5u)
+#define DMAC6_CHSTAT_n_TC_SHIFT             (6u)
+#define DMAC6_CHSTAT_n_SR_SHIFT             (7u)
+#define DMAC6_CHSTAT_n_DL_SHIFT             (8u)
+#define DMAC6_CHSTAT_n_DW_SHIFT             (9u)
+#define DMAC6_CHSTAT_n_DER_SHIFT            (10u)
+#define DMAC6_CHSTAT_n_MODE_SHIFT           (11u)
+#define DMAC6_CHSTAT_n_INTMSK_SHIFT         (16u)
+
+#define DMAC6_CHCTRL_n_SETEN_SHIFT          (0u)
+#define DMAC6_CHCTRL_n_CLREN_SHIFT          (1u)
+#define DMAC6_CHCTRL_n_STG_SHIFT            (2u)
+#define DMAC6_CHCTRL_n_SWRST_SHIFT          (3u)
+#define DMAC6_CHCTRL_n_CLRRQ_SHIFT          (4u)
+#define DMAC6_CHCTRL_n_CLREND_SHIFT         (5u)
+#define DMAC6_CHCTRL_n_CLRTC_SHIFT          (6u)
+#define DMAC6_CHCTRL_n_SETSUS_SHIFT         (8u)
+#define DMAC6_CHCTRL_n_CLRSUS_SHIFT         (9u)
+#define DMAC6_CHCTRL_n_SETINTMSK_SHIFT      (16u)
+#define DMAC6_CHCTRL_n_CLRINTMSK_SHIFT      (17u)
+
+#define DMAC6_CHCFG_n_SEL_SHIFT             (0u)
+#define DMAC6_CHCFG_n_REQD_SHIFT            (3u)
+#define DMAC6_CHCFG_n_LOEN_SHIFT            (4u)
+#define DMAC6_CHCFG_n_HIEN_SHIFT            (5u)
+#define DMAC6_CHCFG_n_LVL_SHIFT             (6u)
+#define DMAC6_CHCFG_n_AM_SHIFT              (8u)
+#define DMAC6_CHCFG_n_SDS_SHIFT             (12u)
+#define DMAC6_CHCFG_n_DDS_SHIFT             (16u)
+#define DMAC6_CHCFG_n_SAD_SHIFT             (20u)
+#define DMAC6_CHCFG_n_DAD_SHIFT             (21u)
+#define DMAC6_CHCFG_n_TM_SHIFT              (22u)
+#define DMAC6_CHCFG_n_DEM_SHIFT             (24u)
+#define DMAC6_CHCFG_n_TCM_SHIFT             (25u)
+#define DMAC6_CHCFG_n_SBE_SHIFT             (27u)
+#define DMAC6_CHCFG_n_RSEL_SHIFT            (28u)
+#define DMAC6_CHCFG_n_RSW_SHIFT             (29u)
+#define DMAC6_CHCFG_n_REN_SHIFT             (30u)
+#define DMAC6_CHCFG_n_DMS_SHIFT             (31u)
+
+#define DMAC6_CHITVL_n_ITVL_SHIFT           (0u)
+
+#define DMAC6_CHEXT_n_SCA_SHIFT             (4u)
+#define DMAC6_CHEXT_n_DCA_SHIFT             (12u)
+
+#define DMAC6_NXLA_n_NXLA_SHIFT             (0u)
+
+#define DMAC6_CRLA_n_CRLA_SHIFT             (0u)
+
+/* ---- DMAC7 ---- */
+#define DMAC7_N0SA_n_SA_SHIFT               (0u)
+
+#define DMAC7_N0DA_n_DA_SHIFT               (0u)
+
+#define DMAC7_N0TB_n_TB_SHIFT               (0u)
+
+#define DMAC7_N1SA_n_SA_SHIFT               (0u)
+
+#define DMAC7_N1DA_n_DA_SHIFT               (0u)
+
+#define DMAC7_N1TB_n_TB_SHIFT               (0u)
+
+#define DMAC7_CRSA_n_CRSA_SHIFT             (0u)
+
+#define DMAC7_CRDA_n_CRDA_SHIFT             (0u)
+
+#define DMAC7_CRTB_n_CRTB_SHIFT             (0u)
+
+#define DMAC7_CHSTAT_n_EN_SHIFT             (0u)
+#define DMAC7_CHSTAT_n_RQST_SHIFT           (1u)
+#define DMAC7_CHSTAT_n_TACT_SHIFT           (2u)
+#define DMAC7_CHSTAT_n_SUS_SHIFT            (3u)
+#define DMAC7_CHSTAT_n_ER_SHIFT             (4u)
+#define DMAC7_CHSTAT_n_END_SHIFT            (5u)
+#define DMAC7_CHSTAT_n_TC_SHIFT             (6u)
+#define DMAC7_CHSTAT_n_SR_SHIFT             (7u)
+#define DMAC7_CHSTAT_n_DL_SHIFT             (8u)
+#define DMAC7_CHSTAT_n_DW_SHIFT             (9u)
+#define DMAC7_CHSTAT_n_DER_SHIFT            (10u)
+#define DMAC7_CHSTAT_n_MODE_SHIFT           (11u)
+#define DMAC7_CHSTAT_n_INTMSK_SHIFT         (16u)
+
+#define DMAC7_CHCTRL_n_SETEN_SHIFT          (0u)
+#define DMAC7_CHCTRL_n_CLREN_SHIFT          (1u)
+#define DMAC7_CHCTRL_n_STG_SHIFT            (2u)
+#define DMAC7_CHCTRL_n_SWRST_SHIFT          (3u)
+#define DMAC7_CHCTRL_n_CLRRQ_SHIFT          (4u)
+#define DMAC7_CHCTRL_n_CLREND_SHIFT         (5u)
+#define DMAC7_CHCTRL_n_CLRTC_SHIFT          (6u)
+#define DMAC7_CHCTRL_n_SETSUS_SHIFT         (8u)
+#define DMAC7_CHCTRL_n_CLRSUS_SHIFT         (9u)
+#define DMAC7_CHCTRL_n_SETINTMSK_SHIFT      (16u)
+#define DMAC7_CHCTRL_n_CLRINTMSK_SHIFT      (17u)
+
+#define DMAC7_CHCFG_n_SEL_SHIFT             (0u)
+#define DMAC7_CHCFG_n_REQD_SHIFT            (3u)
+#define DMAC7_CHCFG_n_LOEN_SHIFT            (4u)
+#define DMAC7_CHCFG_n_HIEN_SHIFT            (5u)
+#define DMAC7_CHCFG_n_LVL_SHIFT             (6u)
+#define DMAC7_CHCFG_n_AM_SHIFT              (8u)
+#define DMAC7_CHCFG_n_SDS_SHIFT             (12u)
+#define DMAC7_CHCFG_n_DDS_SHIFT             (16u)
+#define DMAC7_CHCFG_n_SAD_SHIFT             (20u)
+#define DMAC7_CHCFG_n_DAD_SHIFT             (21u)
+#define DMAC7_CHCFG_n_TM_SHIFT              (22u)
+#define DMAC7_CHCFG_n_DEM_SHIFT             (24u)
+#define DMAC7_CHCFG_n_TCM_SHIFT             (25u)
+#define DMAC7_CHCFG_n_SBE_SHIFT             (27u)
+#define DMAC7_CHCFG_n_RSEL_SHIFT            (28u)
+#define DMAC7_CHCFG_n_RSW_SHIFT             (29u)
+#define DMAC7_CHCFG_n_REN_SHIFT             (30u)
+#define DMAC7_CHCFG_n_DMS_SHIFT             (31u)
+
+#define DMAC7_CHITVL_n_ITVL_SHIFT           (0u)
+
+#define DMAC7_CHEXT_n_SCA_SHIFT             (4u)
+#define DMAC7_CHEXT_n_DCA_SHIFT             (12u)
+
+#define DMAC7_NXLA_n_NXLA_SHIFT             (0u)
+
+#define DMAC7_CRLA_n_CRLA_SHIFT             (0u)
+
+/* ---- DMAC0-7 ---- */
+#define DMAC07_DCTRL_0_7_PR_SHIFT           (0u)
+#define DMAC07_DCTRL_0_7_LVINT_SHIFT        (1u)
+#define DMAC07_DCTRL_0_7_LDCA_SHIFT         (2u)
+#define DMAC07_DCTRL_0_7_LWCA_SHIFT         (6u)
+
+#define DMAC07_DSTAT_EN_0_7_EN0_SHIFT       (0u)
+#define DMAC07_DSTAT_EN_0_7_EN1_SHIFT       (1u)
+#define DMAC07_DSTAT_EN_0_7_EN2_SHIFT       (2u)
+#define DMAC07_DSTAT_EN_0_7_EN3_SHIFT       (3u)
+#define DMAC07_DSTAT_EN_0_7_EN4_SHIFT       (4u)
+#define DMAC07_DSTAT_EN_0_7_EN5_SHIFT       (5u)
+#define DMAC07_DSTAT_EN_0_7_EN6_SHIFT       (6u)
+#define DMAC07_DSTAT_EN_0_7_EN7_SHIFT       (7u)
+
+#define DMAC07_DSTAT_ER_0_7_ER0_SHIFT       (0u)
+#define DMAC07_DSTAT_ER_0_7_ER1_SHIFT       (1u)
+#define DMAC07_DSTAT_ER_0_7_ER2_SHIFT       (2u)
+#define DMAC07_DSTAT_ER_0_7_ER3_SHIFT       (3u)
+#define DMAC07_DSTAT_ER_0_7_ER4_SHIFT       (4u)
+#define DMAC07_DSTAT_ER_0_7_ER5_SHIFT       (5u)
+#define DMAC07_DSTAT_ER_0_7_ER6_SHIFT       (6u)
+#define DMAC07_DSTAT_ER_0_7_ER7_SHIFT       (7u)
+
+#define DMAC07_DSTAT_END_0_7_END0_SHIFT     (0u)
+#define DMAC07_DSTAT_END_0_7_END1_SHIFT     (1u)
+#define DMAC07_DSTAT_END_0_7_END2_SHIFT     (2u)
+#define DMAC07_DSTAT_END_0_7_END3_SHIFT     (3u)
+#define DMAC07_DSTAT_END_0_7_END4_SHIFT     (4u)
+#define DMAC07_DSTAT_END_0_7_END5_SHIFT     (5u)
+#define DMAC07_DSTAT_END_0_7_END6_SHIFT     (6u)
+#define DMAC07_DSTAT_END_0_7_END7_SHIFT     (7u)
+
+#define DMAC07_DSTAT_TC_0_7_TC0_SHIFT       (0u)
+#define DMAC07_DSTAT_TC_0_7_TC1_SHIFT       (1u)
+#define DMAC07_DSTAT_TC_0_7_TC2_SHIFT       (2u)
+#define DMAC07_DSTAT_TC_0_7_TC3_SHIFT       (3u)
+#define DMAC07_DSTAT_TC_0_7_TC4_SHIFT       (4u)
+#define DMAC07_DSTAT_TC_0_7_TC5_SHIFT       (5u)
+#define DMAC07_DSTAT_TC_0_7_TC6_SHIFT       (6u)
+#define DMAC07_DSTAT_TC_0_7_TC7_SHIFT       (7u)
+
+#define DMAC07_DSTAT_SUS_0_7_SUS0_SHIFT     (0u)
+#define DMAC07_DSTAT_SUS_0_7_SUS1_SHIFT     (1u)
+#define DMAC07_DSTAT_SUS_0_7_SUS2_SHIFT     (2u)
+#define DMAC07_DSTAT_SUS_0_7_SUS3_SHIFT     (3u)
+#define DMAC07_DSTAT_SUS_0_7_SUS4_SHIFT     (4u)
+#define DMAC07_DSTAT_SUS_0_7_SUS5_SHIFT     (5u)
+#define DMAC07_DSTAT_SUS_0_7_SUS6_SHIFT     (6u)
+#define DMAC07_DSTAT_SUS_0_7_SUS7_SHIFT     (7u)
+
+/* ---- DMAC8 ---- */
+#define DMAC8_N0SA_n_SA_SHIFT               (0u)
+
+#define DMAC8_N0DA_n_DA_SHIFT               (0u)
+
+#define DMAC8_N0TB_n_TB_SHIFT               (0u)
+
+#define DMAC8_N1SA_n_SA_SHIFT               (0u)
+
+#define DMAC8_N1DA_n_DA_SHIFT               (0u)
+
+#define DMAC8_N1TB_n_TB_SHIFT               (0u)
+
+#define DMAC8_CRSA_n_CRSA_SHIFT             (0u)
+
+#define DMAC8_CRDA_n_CRDA_SHIFT             (0u)
+
+#define DMAC8_CRTB_n_CRTB_SHIFT             (0u)
+
+#define DMAC8_CHSTAT_n_EN_SHIFT             (0u)
+#define DMAC8_CHSTAT_n_RQST_SHIFT           (1u)
+#define DMAC8_CHSTAT_n_TACT_SHIFT           (2u)
+#define DMAC8_CHSTAT_n_SUS_SHIFT            (3u)
+#define DMAC8_CHSTAT_n_ER_SHIFT             (4u)
+#define DMAC8_CHSTAT_n_END_SHIFT            (5u)
+#define DMAC8_CHSTAT_n_TC_SHIFT             (6u)
+#define DMAC8_CHSTAT_n_SR_SHIFT             (7u)
+#define DMAC8_CHSTAT_n_DL_SHIFT             (8u)
+#define DMAC8_CHSTAT_n_DW_SHIFT             (9u)
+#define DMAC8_CHSTAT_n_DER_SHIFT            (10u)
+#define DMAC8_CHSTAT_n_MODE_SHIFT           (11u)
+#define DMAC8_CHSTAT_n_INTMSK_SHIFT         (16u)
+
+#define DMAC8_CHCTRL_n_SETEN_SHIFT          (0u)
+#define DMAC8_CHCTRL_n_CLREN_SHIFT          (1u)
+#define DMAC8_CHCTRL_n_STG_SHIFT            (2u)
+#define DMAC8_CHCTRL_n_SWRST_SHIFT          (3u)
+#define DMAC8_CHCTRL_n_CLRRQ_SHIFT          (4u)
+#define DMAC8_CHCTRL_n_CLREND_SHIFT         (5u)
+#define DMAC8_CHCTRL_n_CLRTC_SHIFT          (6u)
+#define DMAC8_CHCTRL_n_SETSUS_SHIFT         (8u)
+#define DMAC8_CHCTRL_n_CLRSUS_SHIFT         (9u)
+#define DMAC8_CHCTRL_n_SETINTMSK_SHIFT      (16u)
+#define DMAC8_CHCTRL_n_CLRINTMSK_SHIFT      (17u)
+
+#define DMAC8_CHCFG_n_SEL_SHIFT             (0u)
+#define DMAC8_CHCFG_n_REQD_SHIFT            (3u)
+#define DMAC8_CHCFG_n_LOEN_SHIFT            (4u)
+#define DMAC8_CHCFG_n_HIEN_SHIFT            (5u)
+#define DMAC8_CHCFG_n_LVL_SHIFT             (6u)
+#define DMAC8_CHCFG_n_AM_SHIFT              (8u)
+#define DMAC8_CHCFG_n_SDS_SHIFT             (12u)
+#define DMAC8_CHCFG_n_DDS_SHIFT             (16u)
+#define DMAC8_CHCFG_n_SAD_SHIFT             (20u)
+#define DMAC8_CHCFG_n_DAD_SHIFT             (21u)
+#define DMAC8_CHCFG_n_TM_SHIFT              (22u)
+#define DMAC8_CHCFG_n_DEM_SHIFT             (24u)
+#define DMAC8_CHCFG_n_TCM_SHIFT             (25u)
+#define DMAC8_CHCFG_n_SBE_SHIFT             (27u)
+#define DMAC8_CHCFG_n_RSEL_SHIFT            (28u)
+#define DMAC8_CHCFG_n_RSW_SHIFT             (29u)
+#define DMAC8_CHCFG_n_REN_SHIFT             (30u)
+#define DMAC8_CHCFG_n_DMS_SHIFT             (31u)
+
+#define DMAC8_CHITVL_n_ITVL_SHIFT           (0u)
+
+#define DMAC8_CHEXT_n_SCA_SHIFT             (4u)
+#define DMAC8_CHEXT_n_DCA_SHIFT             (12u)
+
+#define DMAC8_NXLA_n_NXLA_SHIFT             (0u)
+
+#define DMAC8_CRLA_n_CRLA_SHIFT             (0u)
+
+/* ---- DMAC9 ---- */
+#define DMAC9_N0SA_n_SA_SHIFT               (0u)
+
+#define DMAC9_N0DA_n_DA_SHIFT               (0u)
+
+#define DMAC9_N0TB_n_TB_SHIFT               (0u)
+
+#define DMAC9_N1SA_n_SA_SHIFT               (0u)
+
+#define DMAC9_N1DA_n_DA_SHIFT               (0u)
+
+#define DMAC9_N1TB_n_TB_SHIFT               (0u)
+
+#define DMAC9_CRSA_n_CRSA_SHIFT             (0u)
+
+#define DMAC9_CRDA_n_CRDA_SHIFT             (0u)
+
+#define DMAC9_CRTB_n_CRTB_SHIFT             (0u)
+
+#define DMAC9_CHSTAT_n_EN_SHIFT             (0u)
+#define DMAC9_CHSTAT_n_RQST_SHIFT           (1u)
+#define DMAC9_CHSTAT_n_TACT_SHIFT           (2u)
+#define DMAC9_CHSTAT_n_SUS_SHIFT            (3u)
+#define DMAC9_CHSTAT_n_ER_SHIFT             (4u)
+#define DMAC9_CHSTAT_n_END_SHIFT            (5u)
+#define DMAC9_CHSTAT_n_TC_SHIFT             (6u)
+#define DMAC9_CHSTAT_n_SR_SHIFT             (7u)
+#define DMAC9_CHSTAT_n_DL_SHIFT             (8u)
+#define DMAC9_CHSTAT_n_DW_SHIFT             (9u)
+#define DMAC9_CHSTAT_n_DER_SHIFT            (10u)
+#define DMAC9_CHSTAT_n_MODE_SHIFT           (11u)
+#define DMAC9_CHSTAT_n_INTMSK_SHIFT         (16u)
+
+#define DMAC9_CHCTRL_n_SETEN_SHIFT          (0u)
+#define DMAC9_CHCTRL_n_CLREN_SHIFT          (1u)
+#define DMAC9_CHCTRL_n_STG_SHIFT            (2u)
+#define DMAC9_CHCTRL_n_SWRST_SHIFT          (3u)
+#define DMAC9_CHCTRL_n_CLRRQ_SHIFT          (4u)
+#define DMAC9_CHCTRL_n_CLREND_SHIFT         (5u)
+#define DMAC9_CHCTRL_n_CLRTC_SHIFT          (6u)
+#define DMAC9_CHCTRL_n_SETSUS_SHIFT         (8u)
+#define DMAC9_CHCTRL_n_CLRSUS_SHIFT         (9u)
+#define DMAC9_CHCTRL_n_SETINTMSK_SHIFT      (16u)
+#define DMAC9_CHCTRL_n_CLRINTMSK_SHIFT      (17u)
+
+#define DMAC9_CHCFG_n_SEL_SHIFT             (0u)
+#define DMAC9_CHCFG_n_REQD_SHIFT            (3u)
+#define DMAC9_CHCFG_n_LOEN_SHIFT            (4u)
+#define DMAC9_CHCFG_n_HIEN_SHIFT            (5u)
+#define DMAC9_CHCFG_n_LVL_SHIFT             (6u)
+#define DMAC9_CHCFG_n_AM_SHIFT              (8u)
+#define DMAC9_CHCFG_n_SDS_SHIFT             (12u)
+#define DMAC9_CHCFG_n_DDS_SHIFT             (16u)
+#define DMAC9_CHCFG_n_SAD_SHIFT             (20u)
+#define DMAC9_CHCFG_n_DAD_SHIFT             (21u)
+#define DMAC9_CHCFG_n_TM_SHIFT              (22u)
+#define DMAC9_CHCFG_n_DEM_SHIFT             (24u)
+#define DMAC9_CHCFG_n_TCM_SHIFT             (25u)
+#define DMAC9_CHCFG_n_SBE_SHIFT             (27u)
+#define DMAC9_CHCFG_n_RSEL_SHIFT            (28u)
+#define DMAC9_CHCFG_n_RSW_SHIFT             (29u)
+#define DMAC9_CHCFG_n_REN_SHIFT             (30u)
+#define DMAC9_CHCFG_n_DMS_SHIFT             (31u)
+
+#define DMAC9_CHITVL_n_ITVL_SHIFT           (0u)
+
+#define DMAC9_CHEXT_n_SCA_SHIFT             (4u)
+#define DMAC9_CHEXT_n_DCA_SHIFT             (12u)
+
+#define DMAC9_NXLA_n_NXLA_SHIFT             (0u)
+
+#define DMAC9_CRLA_n_CRLA_SHIFT             (0u)
+
+/* ---- DMAC10 ---- */
+#define DMAC10_N0SA_n_SA_SHIFT              (0u)
+
+#define DMAC10_N0DA_n_DA_SHIFT              (0u)
+
+#define DMAC10_N0TB_n_TB_SHIFT              (0u)
+
+#define DMAC10_N1SA_n_SA_SHIFT              (0u)
+
+#define DMAC10_N1DA_n_DA_SHIFT              (0u)
+
+#define DMAC10_N1TB_n_TB_SHIFT              (0u)
+
+#define DMAC10_CRSA_n_CRSA_SHIFT            (0u)
+
+#define DMAC10_CRDA_n_CRDA_SHIFT            (0u)
+
+#define DMAC10_CRTB_n_CRTB_SHIFT            (0u)
+
+#define DMAC10_CHSTAT_n_EN_SHIFT            (0u)
+#define DMAC10_CHSTAT_n_RQST_SHIFT          (1u)
+#define DMAC10_CHSTAT_n_TACT_SHIFT          (2u)
+#define DMAC10_CHSTAT_n_SUS_SHIFT           (3u)
+#define DMAC10_CHSTAT_n_ER_SHIFT            (4u)
+#define DMAC10_CHSTAT_n_END_SHIFT           (5u)
+#define DMAC10_CHSTAT_n_TC_SHIFT            (6u)
+#define DMAC10_CHSTAT_n_SR_SHIFT            (7u)
+#define DMAC10_CHSTAT_n_DL_SHIFT            (8u)
+#define DMAC10_CHSTAT_n_DW_SHIFT            (9u)
+#define DMAC10_CHSTAT_n_DER_SHIFT           (10u)
+#define DMAC10_CHSTAT_n_MODE_SHIFT          (11u)
+#define DMAC10_CHSTAT_n_INTMSK_SHIFT        (16u)
+
+#define DMAC10_CHCTRL_n_SETEN_SHIFT         (0u)
+#define DMAC10_CHCTRL_n_CLREN_SHIFT         (1u)
+#define DMAC10_CHCTRL_n_STG_SHIFT           (2u)
+#define DMAC10_CHCTRL_n_SWRST_SHIFT         (3u)
+#define DMAC10_CHCTRL_n_CLRRQ_SHIFT         (4u)
+#define DMAC10_CHCTRL_n_CLREND_SHIFT        (5u)
+#define DMAC10_CHCTRL_n_CLRTC_SHIFT         (6u)
+#define DMAC10_CHCTRL_n_SETSUS_SHIFT        (8u)
+#define DMAC10_CHCTRL_n_CLRSUS_SHIFT        (9u)
+#define DMAC10_CHCTRL_n_SETINTMSK_SHIFT     (16u)
+#define DMAC10_CHCTRL_n_CLRINTMSK_SHIFT     (17u)
+
+#define DMAC10_CHCFG_n_SEL_SHIFT            (0u)
+#define DMAC10_CHCFG_n_REQD_SHIFT           (3u)
+#define DMAC10_CHCFG_n_LOEN_SHIFT           (4u)
+#define DMAC10_CHCFG_n_HIEN_SHIFT           (5u)
+#define DMAC10_CHCFG_n_LVL_SHIFT            (6u)
+#define DMAC10_CHCFG_n_AM_SHIFT             (8u)
+#define DMAC10_CHCFG_n_SDS_SHIFT            (12u)
+#define DMAC10_CHCFG_n_DDS_SHIFT            (16u)
+#define DMAC10_CHCFG_n_SAD_SHIFT            (20u)
+#define DMAC10_CHCFG_n_DAD_SHIFT            (21u)
+#define DMAC10_CHCFG_n_TM_SHIFT             (22u)
+#define DMAC10_CHCFG_n_DEM_SHIFT            (24u)
+#define DMAC10_CHCFG_n_TCM_SHIFT            (25u)
+#define DMAC10_CHCFG_n_SBE_SHIFT            (27u)
+#define DMAC10_CHCFG_n_RSEL_SHIFT           (28u)
+#define DMAC10_CHCFG_n_RSW_SHIFT            (29u)
+#define DMAC10_CHCFG_n_REN_SHIFT            (30u)
+#define DMAC10_CHCFG_n_DMS_SHIFT            (31u)
+
+#define DMAC10_CHITVL_n_ITVL_SHIFT          (0u)
+
+#define DMAC10_CHEXT_n_SCA_SHIFT            (4u)
+#define DMAC10_CHEXT_n_DCA_SHIFT            (12u)
+
+#define DMAC10_NXLA_n_NXLA_SHIFT            (0u)
+
+#define DMAC10_CRLA_n_CRLA_SHIFT            (0u)
+
+/* ---- DMAC11 ---- */
+#define DMAC11_N0SA_n_SA_SHIFT              (0u)
+
+#define DMAC11_N0DA_n_DA_SHIFT              (0u)
+
+#define DMAC11_N0TB_n_TB_SHIFT              (0u)
+
+#define DMAC11_N1SA_n_SA_SHIFT              (0u)
+
+#define DMAC11_N1DA_n_DA_SHIFT              (0u)
+
+#define DMAC11_N1TB_n_TB_SHIFT              (0u)
+
+#define DMAC11_CRSA_n_CRSA_SHIFT            (0u)
+
+#define DMAC11_CRDA_n_CRDA_SHIFT            (0u)
+
+#define DMAC11_CRTB_n_CRTB_SHIFT            (0u)
+
+#define DMAC11_CHSTAT_n_EN_SHIFT            (0u)
+#define DMAC11_CHSTAT_n_RQST_SHIFT          (1u)
+#define DMAC11_CHSTAT_n_TACT_SHIFT          (2u)
+#define DMAC11_CHSTAT_n_SUS_SHIFT           (3u)
+#define DMAC11_CHSTAT_n_ER_SHIFT            (4u)
+#define DMAC11_CHSTAT_n_END_SHIFT           (5u)
+#define DMAC11_CHSTAT_n_TC_SHIFT            (6u)
+#define DMAC11_CHSTAT_n_SR_SHIFT            (7u)
+#define DMAC11_CHSTAT_n_DL_SHIFT            (8u)
+#define DMAC11_CHSTAT_n_DW_SHIFT            (9u)
+#define DMAC11_CHSTAT_n_DER_SHIFT           (10u)
+#define DMAC11_CHSTAT_n_MODE_SHIFT          (11u)
+#define DMAC11_CHSTAT_n_INTMSK_SHIFT        (16u)
+
+#define DMAC11_CHCTRL_n_SETEN_SHIFT         (0u)
+#define DMAC11_CHCTRL_n_CLREN_SHIFT         (1u)
+#define DMAC11_CHCTRL_n_STG_SHIFT           (2u)
+#define DMAC11_CHCTRL_n_SWRST_SHIFT         (3u)
+#define DMAC11_CHCTRL_n_CLRRQ_SHIFT         (4u)
+#define DMAC11_CHCTRL_n_CLREND_SHIFT        (5u)
+#define DMAC11_CHCTRL_n_CLRTC_SHIFT         (6u)
+#define DMAC11_CHCTRL_n_SETSUS_SHIFT        (8u)
+#define DMAC11_CHCTRL_n_CLRSUS_SHIFT        (9u)
+#define DMAC11_CHCTRL_n_SETINTMSK_SHIFT     (16u)
+#define DMAC11_CHCTRL_n_CLRINTMSK_SHIFT     (17u)
+
+#define DMAC11_CHCFG_n_SEL_SHIFT            (0u)
+#define DMAC11_CHCFG_n_REQD_SHIFT           (3u)
+#define DMAC11_CHCFG_n_LOEN_SHIFT           (4u)
+#define DMAC11_CHCFG_n_HIEN_SHIFT           (5u)
+#define DMAC11_CHCFG_n_LVL_SHIFT            (6u)
+#define DMAC11_CHCFG_n_AM_SHIFT             (8u)
+#define DMAC11_CHCFG_n_SDS_SHIFT            (12u)
+#define DMAC11_CHCFG_n_DDS_SHIFT            (16u)
+#define DMAC11_CHCFG_n_SAD_SHIFT            (20u)
+#define DMAC11_CHCFG_n_DAD_SHIFT            (21u)
+#define DMAC11_CHCFG_n_TM_SHIFT             (22u)
+#define DMAC11_CHCFG_n_DEM_SHIFT            (24u)
+#define DMAC11_CHCFG_n_TCM_SHIFT            (25u)
+#define DMAC11_CHCFG_n_SBE_SHIFT            (27u)
+#define DMAC11_CHCFG_n_RSEL_SHIFT           (28u)
+#define DMAC11_CHCFG_n_RSW_SHIFT            (29u)
+#define DMAC11_CHCFG_n_REN_SHIFT            (30u)
+#define DMAC11_CHCFG_n_DMS_SHIFT            (31u)
+
+#define DMAC11_CHITVL_n_ITVL_SHIFT          (0u)
+
+#define DMAC11_CHEXT_n_SCA_SHIFT            (4u)
+#define DMAC11_CHEXT_n_DCA_SHIFT            (12u)
+
+#define DMAC11_NXLA_n_NXLA_SHIFT            (0u)
+
+#define DMAC11_CRLA_n_CRLA_SHIFT            (0u)
+
+/* ---- DMAC12 ---- */
+#define DMAC12_N0SA_n_SA_SHIFT              (0u)
+
+#define DMAC12_N0DA_n_DA_SHIFT              (0u)
+
+#define DMAC12_N0TB_n_TB_SHIFT              (0u)
+
+#define DMAC12_N1SA_n_SA_SHIFT              (0u)
+
+#define DMAC12_N1DA_n_DA_SHIFT              (0u)
+
+#define DMAC12_N1TB_n_TB_SHIFT              (0u)
+
+#define DMAC12_CRSA_n_CRSA_SHIFT            (0u)
+
+#define DMAC12_CRDA_n_CRDA_SHIFT            (0u)
+
+#define DMAC12_CRTB_n_CRTB_SHIFT            (0u)
+
+#define DMAC12_CHSTAT_n_EN_SHIFT            (0u)
+#define DMAC12_CHSTAT_n_RQST_SHIFT          (1u)
+#define DMAC12_CHSTAT_n_TACT_SHIFT          (2u)
+#define DMAC12_CHSTAT_n_SUS_SHIFT           (3u)
+#define DMAC12_CHSTAT_n_ER_SHIFT            (4u)
+#define DMAC12_CHSTAT_n_END_SHIFT           (5u)
+#define DMAC12_CHSTAT_n_TC_SHIFT            (6u)
+#define DMAC12_CHSTAT_n_SR_SHIFT            (7u)
+#define DMAC12_CHSTAT_n_DL_SHIFT            (8u)
+#define DMAC12_CHSTAT_n_DW_SHIFT            (9u)
+#define DMAC12_CHSTAT_n_DER_SHIFT           (10u)
+#define DMAC12_CHSTAT_n_MODE_SHIFT          (11u)
+#define DMAC12_CHSTAT_n_INTMSK_SHIFT        (16u)
+
+#define DMAC12_CHCTRL_n_SETEN_SHIFT         (0u)
+#define DMAC12_CHCTRL_n_CLREN_SHIFT         (1u)
+#define DMAC12_CHCTRL_n_STG_SHIFT           (2u)
+#define DMAC12_CHCTRL_n_SWRST_SHIFT         (3u)
+#define DMAC12_CHCTRL_n_CLRRQ_SHIFT         (4u)
+#define DMAC12_CHCTRL_n_CLREND_SHIFT        (5u)
+#define DMAC12_CHCTRL_n_CLRTC_SHIFT         (6u)
+#define DMAC12_CHCTRL_n_SETSUS_SHIFT        (8u)
+#define DMAC12_CHCTRL_n_CLRSUS_SHIFT        (9u)
+#define DMAC12_CHCTRL_n_SETINTMSK_SHIFT     (16u)
+#define DMAC12_CHCTRL_n_CLRINTMSK_SHIFT     (17u)
+
+#define DMAC12_CHCFG_n_SEL_SHIFT            (0u)
+#define DMAC12_CHCFG_n_REQD_SHIFT           (3u)
+#define DMAC12_CHCFG_n_LOEN_SHIFT           (4u)
+#define DMAC12_CHCFG_n_HIEN_SHIFT           (5u)
+#define DMAC12_CHCFG_n_LVL_SHIFT            (6u)
+#define DMAC12_CHCFG_n_AM_SHIFT             (8u)
+#define DMAC12_CHCFG_n_SDS_SHIFT            (12u)
+#define DMAC12_CHCFG_n_DDS_SHIFT            (16u)
+#define DMAC12_CHCFG_n_SAD_SHIFT            (20u)
+#define DMAC12_CHCFG_n_DAD_SHIFT            (21u)
+#define DMAC12_CHCFG_n_TM_SHIFT             (22u)
+#define DMAC12_CHCFG_n_DEM_SHIFT            (24u)
+#define DMAC12_CHCFG_n_TCM_SHIFT            (25u)
+#define DMAC12_CHCFG_n_SBE_SHIFT            (27u)
+#define DMAC12_CHCFG_n_RSEL_SHIFT           (28u)
+#define DMAC12_CHCFG_n_RSW_SHIFT            (29u)
+#define DMAC12_CHCFG_n_REN_SHIFT            (30u)
+#define DMAC12_CHCFG_n_DMS_SHIFT            (31u)
+
+#define DMAC12_CHITVL_n_ITVL_SHIFT          (0u)
+
+#define DMAC12_CHEXT_n_SCA_SHIFT            (4u)
+#define DMAC12_CHEXT_n_DCA_SHIFT            (12u)
+
+#define DMAC12_NXLA_n_NXLA_SHIFT            (0u)
+
+#define DMAC12_CRLA_n_CRLA_SHIFT            (0u)
+
+/* ---- DMAC13 ---- */
+#define DMAC13_N0SA_n_SA_SHIFT              (0u)
+
+#define DMAC13_N0DA_n_DA_SHIFT              (0u)
+
+#define DMAC13_N0TB_n_TB_SHIFT              (0u)
+
+#define DMAC13_N1SA_n_SA_SHIFT              (0u)
+
+#define DMAC13_N1DA_n_DA_SHIFT              (0u)
+
+#define DMAC13_N1TB_n_TB_SHIFT              (0u)
+
+#define DMAC13_CRSA_n_CRSA_SHIFT            (0u)
+
+#define DMAC13_CRDA_n_CRDA_SHIFT            (0u)
+
+#define DMAC13_CRTB_n_CRTB_SHIFT            (0u)
+
+#define DMAC13_CHSTAT_n_EN_SHIFT            (0u)
+#define DMAC13_CHSTAT_n_RQST_SHIFT          (1u)
+#define DMAC13_CHSTAT_n_TACT_SHIFT          (2u)
+#define DMAC13_CHSTAT_n_SUS_SHIFT           (3u)
+#define DMAC13_CHSTAT_n_ER_SHIFT            (4u)
+#define DMAC13_CHSTAT_n_END_SHIFT           (5u)
+#define DMAC13_CHSTAT_n_TC_SHIFT            (6u)
+#define DMAC13_CHSTAT_n_SR_SHIFT            (7u)
+#define DMAC13_CHSTAT_n_DL_SHIFT            (8u)
+#define DMAC13_CHSTAT_n_DW_SHIFT            (9u)
+#define DMAC13_CHSTAT_n_DER_SHIFT           (10u)
+#define DMAC13_CHSTAT_n_MODE_SHIFT          (11u)
+#define DMAC13_CHSTAT_n_INTMSK_SHIFT        (16u)
+
+#define DMAC13_CHCTRL_n_SETEN_SHIFT         (0u)
+#define DMAC13_CHCTRL_n_CLREN_SHIFT         (1u)
+#define DMAC13_CHCTRL_n_STG_SHIFT           (2u)
+#define DMAC13_CHCTRL_n_SWRST_SHIFT         (3u)
+#define DMAC13_CHCTRL_n_CLRRQ_SHIFT         (4u)
+#define DMAC13_CHCTRL_n_CLREND_SHIFT        (5u)
+#define DMAC13_CHCTRL_n_CLRTC_SHIFT         (6u)
+#define DMAC13_CHCTRL_n_SETSUS_SHIFT        (8u)
+#define DMAC13_CHCTRL_n_CLRSUS_SHIFT        (9u)
+#define DMAC13_CHCTRL_n_SETINTMSK_SHIFT     (16u)
+#define DMAC13_CHCTRL_n_CLRINTMSK_SHIFT     (17u)
+
+#define DMAC13_CHCFG_n_SEL_SHIFT            (0u)
+#define DMAC13_CHCFG_n_REQD_SHIFT           (3u)
+#define DMAC13_CHCFG_n_LOEN_SHIFT           (4u)
+#define DMAC13_CHCFG_n_HIEN_SHIFT           (5u)
+#define DMAC13_CHCFG_n_LVL_SHIFT            (6u)
+#define DMAC13_CHCFG_n_AM_SHIFT             (8u)
+#define DMAC13_CHCFG_n_SDS_SHIFT            (12u)
+#define DMAC13_CHCFG_n_DDS_SHIFT            (16u)
+#define DMAC13_CHCFG_n_SAD_SHIFT            (20u)
+#define DMAC13_CHCFG_n_DAD_SHIFT            (21u)
+#define DMAC13_CHCFG_n_TM_SHIFT             (22u)
+#define DMAC13_CHCFG_n_DEM_SHIFT            (24u)
+#define DMAC13_CHCFG_n_TCM_SHIFT            (25u)
+#define DMAC13_CHCFG_n_SBE_SHIFT            (27u)
+#define DMAC13_CHCFG_n_RSEL_SHIFT           (28u)
+#define DMAC13_CHCFG_n_RSW_SHIFT            (29u)
+#define DMAC13_CHCFG_n_REN_SHIFT            (30u)
+#define DMAC13_CHCFG_n_DMS_SHIFT            (31u)
+
+#define DMAC13_CHITVL_n_ITVL_SHIFT          (0u)
+
+#define DMAC13_CHEXT_n_SCA_SHIFT            (4u)
+#define DMAC13_CHEXT_n_DCA_SHIFT            (12u)
+
+#define DMAC13_NXLA_n_NXLA_SHIFT            (0u)
+
+#define DMAC13_CRLA_n_CRLA_SHIFT            (0u)
+
+/* ---- DMAC14 ---- */
+#define DMAC14_N0SA_n_SA_SHIFT              (0u)
+
+#define DMAC14_N0DA_n_DA_SHIFT              (0u)
+
+#define DMAC14_N0TB_n_TB_SHIFT              (0u)
+
+#define DMAC14_N1SA_n_SA_SHIFT              (0u)
+
+#define DMAC14_N1DA_n_DA_SHIFT              (0u)
+
+#define DMAC14_N1TB_n_TB_SHIFT              (0u)
+
+#define DMAC14_CRSA_n_CRSA_SHIFT            (0u)
+
+#define DMAC14_CRDA_n_CRDA_SHIFT            (0u)
+
+#define DMAC14_CRTB_n_CRTB_SHIFT            (0u)
+
+#define DMAC14_CHSTAT_n_EN_SHIFT            (0u)
+#define DMAC14_CHSTAT_n_RQST_SHIFT          (1u)
+#define DMAC14_CHSTAT_n_TACT_SHIFT          (2u)
+#define DMAC14_CHSTAT_n_SUS_SHIFT           (3u)
+#define DMAC14_CHSTAT_n_ER_SHIFT            (4u)
+#define DMAC14_CHSTAT_n_END_SHIFT           (5u)
+#define DMAC14_CHSTAT_n_TC_SHIFT            (6u)
+#define DMAC14_CHSTAT_n_SR_SHIFT            (7u)
+#define DMAC14_CHSTAT_n_DL_SHIFT            (8u)
+#define DMAC14_CHSTAT_n_DW_SHIFT            (9u)
+#define DMAC14_CHSTAT_n_DER_SHIFT           (10u)
+#define DMAC14_CHSTAT_n_MODE_SHIFT          (11u)
+#define DMAC14_CHSTAT_n_INTMSK_SHIFT        (16u)
+
+#define DMAC14_CHCTRL_n_SETEN_SHIFT         (0u)
+#define DMAC14_CHCTRL_n_CLREN_SHIFT         (1u)
+#define DMAC14_CHCTRL_n_STG_SHIFT           (2u)
+#define DMAC14_CHCTRL_n_SWRST_SHIFT         (3u)
+#define DMAC14_CHCTRL_n_CLRRQ_SHIFT         (4u)
+#define DMAC14_CHCTRL_n_CLREND_SHIFT        (5u)
+#define DMAC14_CHCTRL_n_CLRTC_SHIFT         (6u)
+#define DMAC14_CHCTRL_n_SETSUS_SHIFT        (8u)
+#define DMAC14_CHCTRL_n_CLRSUS_SHIFT        (9u)
+#define DMAC14_CHCTRL_n_SETINTMSK_SHIFT     (16u)
+#define DMAC14_CHCTRL_n_CLRINTMSK_SHIFT     (17u)
+
+#define DMAC14_CHCFG_n_SEL_SHIFT            (0u)
+#define DMAC14_CHCFG_n_REQD_SHIFT           (3u)
+#define DMAC14_CHCFG_n_LOEN_SHIFT           (4u)
+#define DMAC14_CHCFG_n_HIEN_SHIFT           (5u)
+#define DMAC14_CHCFG_n_LVL_SHIFT            (6u)
+#define DMAC14_CHCFG_n_AM_SHIFT             (8u)
+#define DMAC14_CHCFG_n_SDS_SHIFT            (12u)
+#define DMAC14_CHCFG_n_DDS_SHIFT            (16u)
+#define DMAC14_CHCFG_n_SAD_SHIFT            (20u)
+#define DMAC14_CHCFG_n_DAD_SHIFT            (21u)
+#define DMAC14_CHCFG_n_TM_SHIFT             (22u)
+#define DMAC14_CHCFG_n_DEM_SHIFT            (24u)
+#define DMAC14_CHCFG_n_TCM_SHIFT            (25u)
+#define DMAC14_CHCFG_n_SBE_SHIFT            (27u)
+#define DMAC14_CHCFG_n_RSEL_SHIFT           (28u)
+#define DMAC14_CHCFG_n_RSW_SHIFT            (29u)
+#define DMAC14_CHCFG_n_REN_SHIFT            (30u)
+#define DMAC14_CHCFG_n_DMS_SHIFT            (31u)
+
+#define DMAC14_CHITVL_n_ITVL_SHIFT          (0u)
+
+#define DMAC14_CHEXT_n_SCA_SHIFT            (4u)
+#define DMAC14_CHEXT_n_DCA_SHIFT            (12u)
+
+#define DMAC14_NXLA_n_NXLA_SHIFT            (0u)
+
+#define DMAC14_CRLA_n_CRLA_SHIFT            (0u)
+
+/* ---- DMAC15 ---- */
+#define DMAC15_N0SA_n_SA_SHIFT              (0u)
+
+#define DMAC15_N0DA_n_DA_SHIFT              (0u)
+
+#define DMAC15_N0TB_n_TB_SHIFT              (0u)
+
+#define DMAC15_N1SA_n_SA_SHIFT              (0u)
+
+#define DMAC15_N1DA_n_DA_SHIFT              (0u)
+
+#define DMAC15_N1TB_n_TB_SHIFT              (0u)
+
+#define DMAC15_CRSA_n_CRSA_SHIFT            (0u)
+
+#define DMAC15_CRDA_n_CRDA_SHIFT            (0u)
+
+#define DMAC15_CRTB_n_CRTB_SHIFT            (0u)
+
+#define DMAC15_CHSTAT_n_EN_SHIFT            (0u)
+#define DMAC15_CHSTAT_n_RQST_SHIFT          (1u)
+#define DMAC15_CHSTAT_n_TACT_SHIFT          (2u)
+#define DMAC15_CHSTAT_n_SUS_SHIFT           (3u)
+#define DMAC15_CHSTAT_n_ER_SHIFT            (4u)
+#define DMAC15_CHSTAT_n_END_SHIFT           (5u)
+#define DMAC15_CHSTAT_n_TC_SHIFT            (6u)
+#define DMAC15_CHSTAT_n_SR_SHIFT            (7u)
+#define DMAC15_CHSTAT_n_DL_SHIFT            (8u)
+#define DMAC15_CHSTAT_n_DW_SHIFT            (9u)
+#define DMAC15_CHSTAT_n_DER_SHIFT           (10u)
+#define DMAC15_CHSTAT_n_MODE_SHIFT          (11u)
+#define DMAC15_CHSTAT_n_INTMSK_SHIFT        (16u)
+
+#define DMAC15_CHCTRL_n_SETEN_SHIFT         (0u)
+#define DMAC15_CHCTRL_n_CLREN_SHIFT         (1u)
+#define DMAC15_CHCTRL_n_STG_SHIFT           (2u)
+#define DMAC15_CHCTRL_n_SWRST_SHIFT         (3u)
+#define DMAC15_CHCTRL_n_CLRRQ_SHIFT         (4u)
+#define DMAC15_CHCTRL_n_CLREND_SHIFT        (5u)
+#define DMAC15_CHCTRL_n_CLRTC_SHIFT         (6u)
+#define DMAC15_CHCTRL_n_SETSUS_SHIFT        (8u)
+#define DMAC15_CHCTRL_n_CLRSUS_SHIFT        (9u)
+#define DMAC15_CHCTRL_n_SETINTMSK_SHIFT     (16u)
+#define DMAC15_CHCTRL_n_CLRINTMSK_SHIFT     (17u)
+
+#define DMAC15_CHCFG_n_SEL_SHIFT            (0u)
+#define DMAC15_CHCFG_n_REQD_SHIFT           (3u)
+#define DMAC15_CHCFG_n_LOEN_SHIFT           (4u)
+#define DMAC15_CHCFG_n_HIEN_SHIFT           (5u)
+#define DMAC15_CHCFG_n_LVL_SHIFT            (6u)
+#define DMAC15_CHCFG_n_AM_SHIFT             (8u)
+#define DMAC15_CHCFG_n_SDS_SHIFT            (12u)
+#define DMAC15_CHCFG_n_DDS_SHIFT            (16u)
+#define DMAC15_CHCFG_n_SAD_SHIFT            (20u)
+#define DMAC15_CHCFG_n_DAD_SHIFT            (21u)
+#define DMAC15_CHCFG_n_TM_SHIFT             (22u)
+#define DMAC15_CHCFG_n_DEM_SHIFT            (24u)
+#define DMAC15_CHCFG_n_TCM_SHIFT            (25u)
+#define DMAC15_CHCFG_n_SBE_SHIFT            (27u)
+#define DMAC15_CHCFG_n_RSEL_SHIFT           (28u)
+#define DMAC15_CHCFG_n_RSW_SHIFT            (29u)
+#define DMAC15_CHCFG_n_REN_SHIFT            (30u)
+#define DMAC15_CHCFG_n_DMS_SHIFT            (31u)
+
+#define DMAC15_CHITVL_n_ITVL_SHIFT          (0u)
+
+#define DMAC15_CHEXT_n_SCA_SHIFT            (4u)
+#define DMAC15_CHEXT_n_DCA_SHIFT            (12u)
+
+#define DMAC15_NXLA_n_NXLA_SHIFT            (0u)
+
+#define DMAC15_CRLA_n_CRLA_SHIFT            (0u)
+
+/* ---- DMAC8-15 ---- */
+#define DMAC815_DCTRL_8_15_PR_SHIFT         (0u)
+#define DMAC815_DCTRL_8_15_LVINT_SHIFT      (1u)
+#define DMAC815_DCTRL_8_15_LDCA_SHIFT       (2u)
+#define DMAC815_DCTRL_8_15_LWCA_SHIFT       (10u)
+
+#define DMAC815_DSTAT_EN_8_15_EN8_SHIFT     (0u)
+#define DMAC815_DSTAT_EN_8_15_EN9_SHIFT     (1u)
+#define DMAC815_DSTAT_EN_8_15_EN10_SHIFT    (2u)
+#define DMAC815_DSTAT_EN_8_15_EN11_SHIFT    (3u)
+#define DMAC815_DSTAT_EN_8_15_EN12_SHIFT    (4u)
+#define DMAC815_DSTAT_EN_8_15_EN13_SHIFT    (5u)
+#define DMAC815_DSTAT_EN_8_15_EN14_SHIFT    (6u)
+#define DMAC815_DSTAT_EN_8_15_EN15_SHIFT    (7u)
+
+#define DMAC815_DSTAT_ER_8_15_ER8_SHIFT     (0u)
+#define DMAC815_DSTAT_ER_8_15_ER9_SHIFT     (1u)
+#define DMAC815_DSTAT_ER_8_15_ER10_SHIFT    (2u)
+#define DMAC815_DSTAT_ER_8_15_ER11_SHIFT    (3u)
+#define DMAC815_DSTAT_ER_8_15_ER12_SHIFT    (4u)
+#define DMAC815_DSTAT_ER_8_15_ER13_SHIFT    (5u)
+#define DMAC815_DSTAT_ER_8_15_ER14_SHIFT    (6u)
+#define DMAC815_DSTAT_ER_8_15_ER15_SHIFT    (7u)
+
+#define DMAC815_DSTAT_END_8_15_END8_SHIFT   (0u)
+#define DMAC815_DSTAT_END_8_15_END9_SHIFT   (1u)
+#define DMAC815_DSTAT_END_8_15_END10_SHIFT  (2u)
+#define DMAC815_DSTAT_END_8_15_END11_SHIFT  (3u)
+#define DMAC815_DSTAT_END_8_15_END12_SHIFT  (4u)
+#define DMAC815_DSTAT_END_8_15_END13_SHIFT  (5u)
+#define DMAC815_DSTAT_END_8_15_END14_SHIFT  (6u)
+#define DMAC815_DSTAT_END_8_15_END15_SHIFT  (7u)
+
+#define DMAC815_DSTAT_TC_8_15_TC8_SHIFT     (0u)
+#define DMAC815_DSTAT_TC_8_15_TC9_SHIFT     (1u)
+#define DMAC815_DSTAT_TC_8_15_TC10_SHIFT    (2u)
+#define DMAC815_DSTAT_TC_8_15_TC11_SHIFT    (3u)
+#define DMAC815_DSTAT_TC_8_15_TC12_SHIFT    (4u)
+#define DMAC815_DSTAT_TC_8_15_TC13_SHIFT    (5u)
+#define DMAC815_DSTAT_TC_8_15_TC14_SHIFT    (6u)
+#define DMAC815_DSTAT_TC_8_15_TC15_SHIFT    (7u)
+
+#define DMAC815_DSTAT_SUS_8_15_SUS8_SHIFT   (0u)
+#define DMAC815_DSTAT_SUS_8_15_SUS9_SHIFT   (1u)
+#define DMAC815_DSTAT_SUS_8_15_SUS10_SHIFT  (2u)
+#define DMAC815_DSTAT_SUS_8_15_SUS11_SHIFT  (3u)
+#define DMAC815_DSTAT_SUS_8_15_SUS12_SHIFT  (4u)
+#define DMAC815_DSTAT_SUS_8_15_SUS13_SHIFT  (5u)
+#define DMAC815_DSTAT_SUS_8_15_SUS14_SHIFT  (6u)
+#define DMAC815_DSTAT_SUS_8_15_SUS15_SHIFT  (7u)
+
+/* ---- DMAC0-1 ---- */
+#define DMAC01_DMARS_CH0_RID_SHIFT          (0u)
+#define DMAC01_DMARS_CH0_MID_SHIFT          (2u)
+#define DMAC01_DMARS_CH1_RID_SHIFT          (16u)
+#define DMAC01_DMARS_CH1_MID_SHIFT          (18u)
+
+/* ---- DMAC2-3 ---- */
+#define DMAC23_DMARS_CH2_RID_SHIFT          (0u)
+#define DMAC23_DMARS_CH2_MID_SHIFT          (2u)
+#define DMAC23_DMARS_CH3_RID_SHIFT          (16u)
+#define DMAC23_DMARS_CH3_MID_SHIFT          (18u)
+
+/* ---- DMAC4-5 ---- */
+#define DMAC45_DMARS_CH4_RID_SHIFT          (0u)
+#define DMAC45_DMARS_CH4_MID_SHIFT          (2u)
+#define DMAC45_DMARS_CH5_RID_SHIFT          (16u)
+#define DMAC45_DMARS_CH5_MID_SHIFT          (18u)
+
+/* ---- DMAC6-7 ---- */
+#define DMAC67_DMARS_CH6_RID_SHIFT          (0u)
+#define DMAC67_DMARS_CH6_MID_SHIFT          (2u)
+#define DMAC67_DMARS_CH7_RID_SHIFT          (16u)
+#define DMAC67_DMARS_CH7_MID_SHIFT          (18u)
+
+/* ---- DMAC8-9 ---- */
+#define DMAC89_DMARS_CH8_RID_SHIFT          (0u)
+#define DMAC89_DMARS_CH8_MID_SHIFT          (2u)
+#define DMAC89_DMARS_CH9_RID_SHIFT          (16u)
+#define DMAC89_DMARS_CH9_MID_SHIFT          (18u)
+
+/* ---- DMAC10-11 ---- */
+#define DMAC1011_DMARS_CH10_RID_SHIFT       (0u)
+#define DMAC1011_DMARS_CH10_MID_SHIFT       (2u)
+#define DMAC1011_DMARS_CH11_RID_SHIFT       (16u)
+#define DMAC1011_DMARS_CH11_MID_SHIFT       (18u)
+
+/* ---- DMAC12-13 ---- */
+#define DMAC1213_DMARS_CH12_RID_SHIFT       (0u)
+#define DMAC1213_DMARS_CH12_MID_SHIFT       (2u)
+#define DMAC1213_DMARS_CH13_RID_SHIFT       (16u)
+#define DMAC1213_DMARS_CH13_MID_SHIFT       (18u)
+
+/* ---- DMAC14-15 ---- */
+#define DMAC1415_DMARS_CH14_RID_SHIFT       (0u)
+#define DMAC1415_DMARS_CH14_MID_SHIFT       (2u)
+#define DMAC1415_DMARS_CH15_RID_SHIFT       (16u)
+#define DMAC1415_DMARS_CH15_MID_SHIFT       (18u)
+
+
+#endif /* DMAC_IOBITMASK_H */
+
+/* End of File */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/gpio_iobitmask.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/gpio_iobitmask.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/gpio_iobitmask.h	(revision 270)
@@ -0,0 +1,5793 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name   : gpio_iobitmask.h
+* $Rev: 1115 $
+* $Date:: 2014-07-09 15:35:02 +0900#$
+* Description : General purpose I/O ports register define header
+*******************************************************************************/
+#ifndef GPIO_IOBITMASK_H
+#define GPIO_IOBITMASK_H
+
+
+/* ==== Mask values for IO registers ==== */
+/* ---- P0 ---- */
+#define GPIO_PPR0_PPR00                         (0x0001u)
+#define GPIO_PPR0_PPR01                         (0x0002u)
+#define GPIO_PPR0_PPR02                         (0x0004u)
+#define GPIO_PPR0_PPR03                         (0x0008u)
+#define GPIO_PPR0_PPR04                         (0x0010u)
+#define GPIO_PPR0_PPR05                         (0x0020u)
+
+#define GPIO_PMC0_PMC04                         (0x0010u)
+#define GPIO_PMC0_PMC05                         (0x0020u)
+
+#define GPIO_PMCSR0_PMCSR04                     (0x00000010uL)
+#define GPIO_PMCSR0_PMCSR05                     (0x00000020uL)
+
+#define GPIO_PIBC0_PIBC00                       (0x0001u)
+#define GPIO_PIBC0_PIBC01                       (0x0002u)
+#define GPIO_PIBC0_PIBC02                       (0x0004u)
+#define GPIO_PIBC0_PIBC03                       (0x0008u)
+#define GPIO_PIBC0_PIBC04                       (0x0010u)
+#define GPIO_PIBC0_PIBC05                       (0x0020u)
+
+/* ---- P1 ---- */
+#define GPIO_P1_P10                             (0x0001u)
+#define GPIO_P1_P11                             (0x0002u)
+#define GPIO_P1_P12                             (0x0004u)
+#define GPIO_P1_P13                             (0x0008u)
+#define GPIO_P1_P14                             (0x0010u)
+#define GPIO_P1_P15                             (0x0020u)
+#define GPIO_P1_P16                             (0x0040u)
+#define GPIO_P1_P17                             (0x0080u)
+
+#define GPIO_PSR1_PSR10                         (0x00000001uL)
+#define GPIO_PSR1_PSR11                         (0x00000002uL)
+#define GPIO_PSR1_PSR12                         (0x00000004uL)
+#define GPIO_PSR1_PSR13                         (0x00000008uL)
+#define GPIO_PSR1_PSR14                         (0x00000010uL)
+#define GPIO_PSR1_PSR15                         (0x00000020uL)
+#define GPIO_PSR1_PSR16                         (0x00000040uL)
+#define GPIO_PSR1_PSR17                         (0x00000080uL)
+#define GPIO_PSR1_PSR116                        (0x00010000uL)
+#define GPIO_PSR1_PSR117                        (0x00020000uL)
+#define GPIO_PSR1_PSR118                        (0x00040000uL)
+#define GPIO_PSR1_PSR119                        (0x00080000uL)
+#define GPIO_PSR1_PSR120                        (0x00100000uL)
+#define GPIO_PSR1_PSR121                        (0x00200000uL)
+#define GPIO_PSR1_PSR122                        (0x00400000uL)
+#define GPIO_PSR1_PSR123                        (0x00800000uL)
+
+#define GPIO_PPR1_PPR10                         (0x0001u)
+#define GPIO_PPR1_PPR11                         (0x0002u)
+#define GPIO_PPR1_PPR12                         (0x0004u)
+#define GPIO_PPR1_PPR13                         (0x0008u)
+#define GPIO_PPR1_PPR14                         (0x0010u)
+#define GPIO_PPR1_PPR15                         (0x0020u)
+#define GPIO_PPR1_PPR16                         (0x0040u)
+#define GPIO_PPR1_PPR17                         (0x0080u)
+#define GPIO_PPR1_PPR18                         (0x0100u)
+#define GPIO_PPR1_PPR19                         (0x0200u)
+#define GPIO_PPR1_PPR110                        (0x0400u)
+#define GPIO_PPR1_PPR111                        (0x0800u)
+#define GPIO_PPR1_PPR112                        (0x1000u)
+#define GPIO_PPR1_PPR113                        (0x2000u)
+#define GPIO_PPR1_PPR114                        (0x4000u)
+#define GPIO_PPR1_PPR115                        (0x8000u)
+
+#define GPIO_PM1_PM10                           (0x0001u)
+#define GPIO_PM1_PM11                           (0x0002u)
+#define GPIO_PM1_PM12                           (0x0004u)
+#define GPIO_PM1_PM13                           (0x0008u)
+#define GPIO_PM1_PM14                           (0x0010u)
+#define GPIO_PM1_PM15                           (0x0020u)
+#define GPIO_PM1_PM16                           (0x0040u)
+#define GPIO_PM1_PM17                           (0x0080u)
+
+#define GPIO_PMC1_PMC10                         (0x0001u)
+#define GPIO_PMC1_PMC11                         (0x0002u)
+#define GPIO_PMC1_PMC12                         (0x0004u)
+#define GPIO_PMC1_PMC13                         (0x0008u)
+#define GPIO_PMC1_PMC14                         (0x0010u)
+#define GPIO_PMC1_PMC15                         (0x0020u)
+#define GPIO_PMC1_PMC16                         (0x0040u)
+#define GPIO_PMC1_PMC17                         (0x0080u)
+#define GPIO_PMC1_PMC18                         (0x0100u)
+#define GPIO_PMC1_PMC19                         (0x0200u)
+#define GPIO_PMC1_PMC110                        (0x0400u)
+#define GPIO_PMC1_PMC111                        (0x0800u)
+#define GPIO_PMC1_PMC112                        (0x1000u)
+#define GPIO_PMC1_PMC113                        (0x2000u)
+#define GPIO_PMC1_PMC114                        (0x4000u)
+#define GPIO_PMC1_PMC115                        (0x8000u)
+
+#define GPIO_PFC1_PFC10                         (0x0001u)
+#define GPIO_PFC1_PFC11                         (0x0002u)
+#define GPIO_PFC1_PFC12                         (0x0004u)
+#define GPIO_PFC1_PFC13                         (0x0008u)
+#define GPIO_PFC1_PFC14                         (0x0010u)
+#define GPIO_PFC1_PFC15                         (0x0020u)
+#define GPIO_PFC1_PFC16                         (0x0040u)
+#define GPIO_PFC1_PFC17                         (0x0080u)
+#define GPIO_PFC1_PFC18                         (0x0100u)
+#define GPIO_PFC1_PFC19                         (0x0200u)
+#define GPIO_PFC1_PFC110                        (0x0400u)
+#define GPIO_PFC1_PFC111                        (0x0800u)
+#define GPIO_PFC1_PFC112                        (0x1000u)
+#define GPIO_PFC1_PFC113                        (0x2000u)
+#define GPIO_PFC1_PFC114                        (0x4000u)
+#define GPIO_PFC1_PFC115                        (0x8000u)
+
+#define GPIO_PFCE1_PFCE10                       (0x0001u)
+#define GPIO_PFCE1_PFCE11                       (0x0002u)
+#define GPIO_PFCE1_PFCE12                       (0x0004u)
+#define GPIO_PFCE1_PFCE13                       (0x0008u)
+#define GPIO_PFCE1_PFCE14                       (0x0010u)
+#define GPIO_PFCE1_PFCE15                       (0x0020u)
+#define GPIO_PFCE1_PFCE16                       (0x0040u)
+#define GPIO_PFCE1_PFCE17                       (0x0080u)
+#define GPIO_PFCE1_PFCE18                       (0x0100u)
+#define GPIO_PFCE1_PFCE19                       (0x0200u)
+#define GPIO_PFCE1_PFCE110                      (0x0400u)
+#define GPIO_PFCE1_PFCE111                      (0x0800u)
+#define GPIO_PFCE1_PFCE112                      (0x1000u)
+#define GPIO_PFCE1_PFCE113                      (0x2000u)
+#define GPIO_PFCE1_PFCE114                      (0x4000u)
+#define GPIO_PFCE1_PFCE115                      (0x8000u)
+
+#define GPIO_PNOT1_PNOT10                       (0x0001u)
+#define GPIO_PNOT1_PNOT11                       (0x0002u)
+#define GPIO_PNOT1_PNOT12                       (0x0004u)
+#define GPIO_PNOT1_PNOT13                       (0x0008u)
+#define GPIO_PNOT1_PNOT14                       (0x0010u)
+#define GPIO_PNOT1_PNOT15                       (0x0020u)
+#define GPIO_PNOT1_PNOT16                       (0x0040u)
+#define GPIO_PNOT1_PNOT17                       (0x0080u)
+
+#define GPIO_PMSR1_PMSR10                       (0x00000001uL)
+#define GPIO_PMSR1_PMSR11                       (0x00000002uL)
+#define GPIO_PMSR1_PMSR12                       (0x00000004uL)
+#define GPIO_PMSR1_PMSR13                       (0x00000008uL)
+#define GPIO_PMSR1_PMSR14                       (0x00000010uL)
+#define GPIO_PMSR1_PMSR15                       (0x00000020uL)
+#define GPIO_PMSR1_PMSR16                       (0x00000040uL)
+#define GPIO_PMSR1_PMSR17                       (0x00000080uL)
+#define GPIO_PMSR1_PMSR116                      (0x00010000uL)
+#define GPIO_PMSR1_PMSR117                      (0x00020000uL)
+#define GPIO_PMSR1_PMSR118                      (0x00040000uL)
+#define GPIO_PMSR1_PMSR119                      (0x00080000uL)
+#define GPIO_PMSR1_PMSR120                      (0x00100000uL)
+#define GPIO_PMSR1_PMSR121                      (0x00200000uL)
+#define GPIO_PMSR1_PMSR122                      (0x00400000uL)
+#define GPIO_PMSR1_PMSR123                      (0x00800000uL)
+
+#define GPIO_PMCSR1_PMCSR10                     (0x00000001uL)
+#define GPIO_PMCSR1_PMCSR11                     (0x00000002uL)
+#define GPIO_PMCSR1_PMCSR12                     (0x00000004uL)
+#define GPIO_PMCSR1_PMCSR13                     (0x00000008uL)
+#define GPIO_PMCSR1_PMCSR14                     (0x00000010uL)
+#define GPIO_PMCSR1_PMCSR15                     (0x00000020uL)
+#define GPIO_PMCSR1_PMCSR16                     (0x00000040uL)
+#define GPIO_PMCSR1_PMCSR17                     (0x00000080uL)
+#define GPIO_PMCSR1_PMCSR116                    (0x00010000uL)
+#define GPIO_PMCSR1_PMCSR117                    (0x00020000uL)
+#define GPIO_PMCSR1_PMCSR118                    (0x00040000uL)
+#define GPIO_PMCSR1_PMCSR119                    (0x00080000uL)
+#define GPIO_PMCSR1_PMCSR120                    (0x00100000uL)
+#define GPIO_PMCSR1_PMCSR121                    (0x00200000uL)
+#define GPIO_PMCSR1_PMCSR122                    (0x00400000uL)
+#define GPIO_PMCSR1_PMCSR123                    (0x00800000uL)
+
+#define GPIO_PFCAE1_PFCAE10                     (0x0001u)
+#define GPIO_PFCAE1_PFCAE11                     (0x0002u)
+#define GPIO_PFCAE1_PFCAE12                     (0x0004u)
+#define GPIO_PFCAE1_PFCAE13                     (0x0008u)
+#define GPIO_PFCAE1_PFCAE14                     (0x0010u)
+#define GPIO_PFCAE1_PFCAE15                     (0x0020u)
+#define GPIO_PFCAE1_PFCAE16                     (0x0040u)
+#define GPIO_PFCAE1_PFCAE17                     (0x0080u)
+#define GPIO_PFCAE1_PFCAE18                     (0x0100u)
+#define GPIO_PFCAE1_PFCAE19                     (0x0200u)
+#define GPIO_PFCAE1_PFCAE110                    (0x0400u)
+#define GPIO_PFCAE1_PFCAE111                    (0x0800u)
+#define GPIO_PFCAE1_PFCAE112                    (0x1000u)
+#define GPIO_PFCAE1_PFCAE113                    (0x2000u)
+#define GPIO_PFCAE1_PFCAE114                    (0x4000u)
+#define GPIO_PFCAE1_PFCAE115                    (0x8000u)
+
+#define GPIO_PIBC1_PIBC10                       (0x0001u)
+#define GPIO_PIBC1_PIBC11                       (0x0002u)
+#define GPIO_PIBC1_PIBC12                       (0x0004u)
+#define GPIO_PIBC1_PIBC13                       (0x0008u)
+#define GPIO_PIBC1_PIBC14                       (0x0010u)
+#define GPIO_PIBC1_PIBC15                       (0x0020u)
+#define GPIO_PIBC1_PIBC16                       (0x0040u)
+#define GPIO_PIBC1_PIBC17                       (0x0080u)
+#define GPIO_PIBC1_PIBC18                       (0x0100u)
+#define GPIO_PIBC1_PIBC19                       (0x0200u)
+#define GPIO_PIBC1_PIBC110                      (0x0400u)
+#define GPIO_PIBC1_PIBC111                      (0x0800u)
+#define GPIO_PIBC1_PIBC112                      (0x1000u)
+#define GPIO_PIBC1_PIBC113                      (0x2000u)
+#define GPIO_PIBC1_PIBC114                      (0x4000u)
+#define GPIO_PIBC1_PIBC115                      (0x8000u)
+
+#define GPIO_PBDC1_PBDC10                       (0x0001u)
+#define GPIO_PBDC1_PBDC11                       (0x0002u)
+#define GPIO_PBDC1_PBDC12                       (0x0004u)
+#define GPIO_PBDC1_PBDC13                       (0x0008u)
+#define GPIO_PBDC1_PBDC14                       (0x0010u)
+#define GPIO_PBDC1_PBDC15                       (0x0020u)
+#define GPIO_PBDC1_PBDC16                       (0x0040u)
+#define GPIO_PBDC1_PBDC17                       (0x0080u)
+#define GPIO_PBDC1_PBDC18                       (0x0100u)
+#define GPIO_PBDC1_PBDC19                       (0x0200u)
+#define GPIO_PBDC1_PBDC110                      (0x0400u)
+#define GPIO_PBDC1_PBDC111                      (0x0800u)
+#define GPIO_PBDC1_PBDC112                      (0x1000u)
+#define GPIO_PBDC1_PBDC113                      (0x2000u)
+#define GPIO_PBDC1_PBDC114                      (0x4000u)
+#define GPIO_PBDC1_PBDC115                      (0x8000u)
+
+#define GPIO_PIPC1_PIPC10                       (0x0001u)
+#define GPIO_PIPC1_PIPC11                       (0x0002u)
+#define GPIO_PIPC1_PIPC12                       (0x0004u)
+#define GPIO_PIPC1_PIPC13                       (0x0008u)
+#define GPIO_PIPC1_PIPC14                       (0x0010u)
+#define GPIO_PIPC1_PIPC15                       (0x0020u)
+#define GPIO_PIPC1_PIPC16                       (0x0040u)
+#define GPIO_PIPC1_PIPC17                       (0x0080u)
+
+/* ---- P2 ---- */
+#define GPIO_P2_P20                             (0x0001u)
+#define GPIO_P2_P21                             (0x0002u)
+#define GPIO_P2_P22                             (0x0004u)
+#define GPIO_P2_P23                             (0x0008u)
+#define GPIO_P2_P24                             (0x0010u)
+#define GPIO_P2_P25                             (0x0020u)
+#define GPIO_P2_P26                             (0x0040u)
+#define GPIO_P2_P27                             (0x0080u)
+#define GPIO_P2_P28                             (0x0100u)
+#define GPIO_P2_P29                             (0x0200u)
+#define GPIO_P2_P210                            (0x0400u)
+#define GPIO_P2_P211                            (0x0800u)
+#define GPIO_P2_P212                            (0x1000u)
+#define GPIO_P2_P213                            (0x2000u)
+#define GPIO_P2_P214                            (0x4000u)
+#define GPIO_P2_P215                            (0x8000u)
+
+#define GPIO_PSR2_PSR20                         (0x00000001uL)
+#define GPIO_PSR2_PSR21                         (0x00000002uL)
+#define GPIO_PSR2_PSR22                         (0x00000004uL)
+#define GPIO_PSR2_PSR23                         (0x00000008uL)
+#define GPIO_PSR2_PSR24                         (0x00000010uL)
+#define GPIO_PSR2_PSR25                         (0x00000020uL)
+#define GPIO_PSR2_PSR26                         (0x00000040uL)
+#define GPIO_PSR2_PSR27                         (0x00000080uL)
+#define GPIO_PSR2_PSR28                         (0x00000100uL)
+#define GPIO_PSR2_PSR29                         (0x00000200uL)
+#define GPIO_PSR2_PSR210                        (0x00000400uL)
+#define GPIO_PSR2_PSR211                        (0x00000800uL)
+#define GPIO_PSR2_PSR212                        (0x00001000uL)
+#define GPIO_PSR2_PSR213                        (0x00002000uL)
+#define GPIO_PSR2_PSR214                        (0x00004000uL)
+#define GPIO_PSR2_PSR215                        (0x00008000uL)
+#define GPIO_PSR2_PSR216                        (0x00010000uL)
+#define GPIO_PSR2_PSR217                        (0x00020000uL)
+#define GPIO_PSR2_PSR218                        (0x00040000uL)
+#define GPIO_PSR2_PSR219                        (0x00080000uL)
+#define GPIO_PSR2_PSR220                        (0x00100000uL)
+#define GPIO_PSR2_PSR221                        (0x00200000uL)
+#define GPIO_PSR2_PSR222                        (0x00400000uL)
+#define GPIO_PSR2_PSR223                        (0x00800000uL)
+#define GPIO_PSR2_PSR224                        (0x01000000uL)
+#define GPIO_PSR2_PSR225                        (0x02000000uL)
+#define GPIO_PSR2_PSR226                        (0x04000000uL)
+#define GPIO_PSR2_PSR227                        (0x08000000uL)
+#define GPIO_PSR2_PSR228                        (0x10000000uL)
+#define GPIO_PSR2_PSR229                        (0x20000000uL)
+#define GPIO_PSR2_PSR230                        (0x40000000uL)
+#define GPIO_PSR2_PSR231                        (0x80000000uL)
+
+#define GPIO_PPR2_PPR20                         (0x0001u)
+#define GPIO_PPR2_PPR21                         (0x0002u)
+#define GPIO_PPR2_PPR22                         (0x0004u)
+#define GPIO_PPR2_PPR23                         (0x0008u)
+#define GPIO_PPR2_PPR24                         (0x0010u)
+#define GPIO_PPR2_PPR25                         (0x0020u)
+#define GPIO_PPR2_PPR26                         (0x0040u)
+#define GPIO_PPR2_PPR27                         (0x0080u)
+#define GPIO_PPR2_PPR28                         (0x0100u)
+#define GPIO_PPR2_PPR29                         (0x0200u)
+#define GPIO_PPR2_PPR210                        (0x0400u)
+#define GPIO_PPR2_PPR211                        (0x0800u)
+#define GPIO_PPR2_PPR212                        (0x1000u)
+#define GPIO_PPR2_PPR213                        (0x2000u)
+#define GPIO_PPR2_PPR214                        (0x4000u)
+#define GPIO_PPR2_PPR215                        (0x8000u)
+
+#define GPIO_PM2_PM20                           (0x0001u)
+#define GPIO_PM2_PM21                           (0x0002u)
+#define GPIO_PM2_PM22                           (0x0004u)
+#define GPIO_PM2_PM23                           (0x0008u)
+#define GPIO_PM2_PM24                           (0x0010u)
+#define GPIO_PM2_PM25                           (0x0020u)
+#define GPIO_PM2_PM26                           (0x0040u)
+#define GPIO_PM2_PM27                           (0x0080u)
+#define GPIO_PM2_PM28                           (0x0100u)
+#define GPIO_PM2_PM29                           (0x0200u)
+#define GPIO_PM2_PM210                          (0x0400u)
+#define GPIO_PM2_PM211                          (0x0800u)
+#define GPIO_PM2_PM212                          (0x1000u)
+#define GPIO_PM2_PM213                          (0x2000u)
+#define GPIO_PM2_PM214                          (0x4000u)
+#define GPIO_PM2_PM215                          (0x8000u)
+
+#define GPIO_PMC2_PMC20                         (0x0001u)
+#define GPIO_PMC2_PMC21                         (0x0002u)
+#define GPIO_PMC2_PMC22                         (0x0004u)
+#define GPIO_PMC2_PMC23                         (0x0008u)
+#define GPIO_PMC2_PMC24                         (0x0010u)
+#define GPIO_PMC2_PMC25                         (0x0020u)
+#define GPIO_PMC2_PMC26                         (0x0040u)
+#define GPIO_PMC2_PMC27                         (0x0080u)
+#define GPIO_PMC2_PMC28                         (0x0100u)
+#define GPIO_PMC2_PMC29                         (0x0200u)
+#define GPIO_PMC2_PMC210                        (0x0400u)
+#define GPIO_PMC2_PMC211                        (0x0800u)
+#define GPIO_PMC2_PMC212                        (0x1000u)
+#define GPIO_PMC2_PMC213                        (0x2000u)
+#define GPIO_PMC2_PMC214                        (0x4000u)
+#define GPIO_PMC2_PMC215                        (0x8000u)
+
+#define GPIO_PFC2_PFC20                         (0x0001u)
+#define GPIO_PFC2_PFC21                         (0x0002u)
+#define GPIO_PFC2_PFC22                         (0x0004u)
+#define GPIO_PFC2_PFC23                         (0x0008u)
+#define GPIO_PFC2_PFC24                         (0x0010u)
+#define GPIO_PFC2_PFC25                         (0x0020u)
+#define GPIO_PFC2_PFC26                         (0x0040u)
+#define GPIO_PFC2_PFC27                         (0x0080u)
+#define GPIO_PFC2_PFC28                         (0x0100u)
+#define GPIO_PFC2_PFC29                         (0x0200u)
+#define GPIO_PFC2_PFC210                        (0x0400u)
+#define GPIO_PFC2_PFC211                        (0x0800u)
+#define GPIO_PFC2_PFC212                        (0x1000u)
+#define GPIO_PFC2_PFC213                        (0x2000u)
+#define GPIO_PFC2_PFC214                        (0x4000u)
+#define GPIO_PFC2_PFC215                        (0x8000u)
+
+#define GPIO_PFCE2_PFCE20                       (0x0001u)
+#define GPIO_PFCE2_PFCE21                       (0x0002u)
+#define GPIO_PFCE2_PFCE22                       (0x0004u)
+#define GPIO_PFCE2_PFCE23                       (0x0008u)
+#define GPIO_PFCE2_PFCE24                       (0x0010u)
+#define GPIO_PFCE2_PFCE25                       (0x0020u)
+#define GPIO_PFCE2_PFCE26                       (0x0040u)
+#define GPIO_PFCE2_PFCE27                       (0x0080u)
+#define GPIO_PFCE2_PFCE28                       (0x0100u)
+#define GPIO_PFCE2_PFCE29                       (0x0200u)
+#define GPIO_PFCE2_PFCE210                      (0x0400u)
+#define GPIO_PFCE2_PFCE211                      (0x0800u)
+#define GPIO_PFCE2_PFCE212                      (0x1000u)
+#define GPIO_PFCE2_PFCE213                      (0x2000u)
+#define GPIO_PFCE2_PFCE214                      (0x4000u)
+#define GPIO_PFCE2_PFCE215                      (0x8000u)
+
+#define GPIO_PNOT2_PNOT20                       (0x0001u)
+#define GPIO_PNOT2_PNOT21                       (0x0002u)
+#define GPIO_PNOT2_PNOT22                       (0x0004u)
+#define GPIO_PNOT2_PNOT23                       (0x0008u)
+#define GPIO_PNOT2_PNOT24                       (0x0010u)
+#define GPIO_PNOT2_PNOT25                       (0x0020u)
+#define GPIO_PNOT2_PNOT26                       (0x0040u)
+#define GPIO_PNOT2_PNOT27                       (0x0080u)
+#define GPIO_PNOT2_PNOT28                       (0x0100u)
+#define GPIO_PNOT2_PNOT29                       (0x0200u)
+#define GPIO_PNOT2_PNOT210                      (0x0400u)
+#define GPIO_PNOT2_PNOT211                      (0x0800u)
+#define GPIO_PNOT2_PNOT212                      (0x1000u)
+#define GPIO_PNOT2_PNOT213                      (0x2000u)
+#define GPIO_PNOT2_PNOT214                      (0x4000u)
+#define GPIO_PNOT2_PNOT215                      (0x8000u)
+
+#define GPIO_PMSR2_PMSR20                       (0x00000001uL)
+#define GPIO_PMSR2_PMSR21                       (0x00000002uL)
+#define GPIO_PMSR2_PMSR22                       (0x00000004uL)
+#define GPIO_PMSR2_PMSR23                       (0x00000008uL)
+#define GPIO_PMSR2_PMSR24                       (0x00000010uL)
+#define GPIO_PMSR2_PMSR25                       (0x00000020uL)
+#define GPIO_PMSR2_PMSR26                       (0x00000040uL)
+#define GPIO_PMSR2_PMSR27                       (0x00000080uL)
+#define GPIO_PMSR2_PMSR28                       (0x00000100uL)
+#define GPIO_PMSR2_PMSR29                       (0x00000200uL)
+#define GPIO_PMSR2_PMSR210                      (0x00000400uL)
+#define GPIO_PMSR2_PMSR211                      (0x00000800uL)
+#define GPIO_PMSR2_PMSR212                      (0x00001000uL)
+#define GPIO_PMSR2_PMSR213                      (0x00002000uL)
+#define GPIO_PMSR2_PMSR214                      (0x00004000uL)
+#define GPIO_PMSR2_PMSR215                      (0x00008000uL)
+#define GPIO_PMSR2_PMSR216                      (0x00010000uL)
+#define GPIO_PMSR2_PMSR217                      (0x00020000uL)
+#define GPIO_PMSR2_PMSR218                      (0x00040000uL)
+#define GPIO_PMSR2_PMSR219                      (0x00080000uL)
+#define GPIO_PMSR2_PMSR220                      (0x00100000uL)
+#define GPIO_PMSR2_PMSR221                      (0x00200000uL)
+#define GPIO_PMSR2_PMSR222                      (0x00400000uL)
+#define GPIO_PMSR2_PMSR223                      (0x00800000uL)
+#define GPIO_PMSR2_PMSR224                      (0x01000000uL)
+#define GPIO_PMSR2_PMSR225                      (0x02000000uL)
+#define GPIO_PMSR2_PMSR226                      (0x04000000uL)
+#define GPIO_PMSR2_PMSR227                      (0x08000000uL)
+#define GPIO_PMSR2_PMSR228                      (0x10000000uL)
+#define GPIO_PMSR2_PMSR229                      (0x20000000uL)
+#define GPIO_PMSR2_PMSR230                      (0x40000000uL)
+#define GPIO_PMSR2_PMSR231                      (0x80000000uL)
+
+#define GPIO_PMCSR2_PMCSR20                     (0x00000001uL)
+#define GPIO_PMCSR2_PMCSR21                     (0x00000002uL)
+#define GPIO_PMCSR2_PMCSR22                     (0x00000004uL)
+#define GPIO_PMCSR2_PMCSR23                     (0x00000008uL)
+#define GPIO_PMCSR2_PMCSR24                     (0x00000010uL)
+#define GPIO_PMCSR2_PMCSR25                     (0x00000020uL)
+#define GPIO_PMCSR2_PMCSR26                     (0x00000040uL)
+#define GPIO_PMCSR2_PMCSR27                     (0x00000080uL)
+#define GPIO_PMCSR2_PMCSR28                     (0x00000100uL)
+#define GPIO_PMCSR2_PMCSR29                     (0x00000200uL)
+#define GPIO_PMCSR2_PMCSR210                    (0x00000400uL)
+#define GPIO_PMCSR2_PMCSR211                    (0x00000800uL)
+#define GPIO_PMCSR2_PMCSR212                    (0x00001000uL)
+#define GPIO_PMCSR2_PMCSR213                    (0x00002000uL)
+#define GPIO_PMCSR2_PMCSR214                    (0x00004000uL)
+#define GPIO_PMCSR2_PMCSR215                    (0x00008000uL)
+#define GPIO_PMCSR2_PMCSR216                    (0x00010000uL)
+#define GPIO_PMCSR2_PMCSR217                    (0x00020000uL)
+#define GPIO_PMCSR2_PMCSR218                    (0x00040000uL)
+#define GPIO_PMCSR2_PMCSR219                    (0x00080000uL)
+#define GPIO_PMCSR2_PMCSR220                    (0x00100000uL)
+#define GPIO_PMCSR2_PMCSR221                    (0x00200000uL)
+#define GPIO_PMCSR2_PMCSR222                    (0x00400000uL)
+#define GPIO_PMCSR2_PMCSR223                    (0x00800000uL)
+#define GPIO_PMCSR2_PMCSR224                    (0x01000000uL)
+#define GPIO_PMCSR2_PMCSR225                    (0x02000000uL)
+#define GPIO_PMCSR2_PMCSR226                    (0x04000000uL)
+#define GPIO_PMCSR2_PMCSR227                    (0x08000000uL)
+#define GPIO_PMCSR2_PMCSR228                    (0x10000000uL)
+#define GPIO_PMCSR2_PMCSR229                    (0x20000000uL)
+#define GPIO_PMCSR2_PMCSR230                    (0x40000000uL)
+#define GPIO_PMCSR2_PMCSR231                    (0x80000000uL)
+
+#define GPIO_PFCAE2_PFCAE20                     (0x0001u)
+#define GPIO_PFCAE2_PFCAE21                     (0x0002u)
+#define GPIO_PFCAE2_PFCAE22                     (0x0004u)
+#define GPIO_PFCAE2_PFCAE23                     (0x0008u)
+#define GPIO_PFCAE2_PFCAE24                     (0x0010u)
+#define GPIO_PFCAE2_PFCAE25                     (0x0020u)
+#define GPIO_PFCAE2_PFCAE26                     (0x0040u)
+#define GPIO_PFCAE2_PFCAE27                     (0x0080u)
+#define GPIO_PFCAE2_PFCAE28                     (0x0100u)
+#define GPIO_PFCAE2_PFCAE29                     (0x0200u)
+#define GPIO_PFCAE2_PFCAE210                    (0x0400u)
+#define GPIO_PFCAE2_PFCAE211                    (0x0800u)
+#define GPIO_PFCAE2_PFCAE212                    (0x1000u)
+#define GPIO_PFCAE2_PFCAE213                    (0x2000u)
+#define GPIO_PFCAE2_PFCAE214                    (0x4000u)
+#define GPIO_PFCAE2_PFCAE215                    (0x8000u)
+
+#define GPIO_PIBC2_PIBC20                       (0x0001u)
+#define GPIO_PIBC2_PIBC21                       (0x0002u)
+#define GPIO_PIBC2_PIBC22                       (0x0004u)
+#define GPIO_PIBC2_PIBC23                       (0x0008u)
+#define GPIO_PIBC2_PIBC24                       (0x0010u)
+#define GPIO_PIBC2_PIBC25                       (0x0020u)
+#define GPIO_PIBC2_PIBC26                       (0x0040u)
+#define GPIO_PIBC2_PIBC27                       (0x0080u)
+#define GPIO_PIBC2_PIBC28                       (0x0100u)
+#define GPIO_PIBC2_PIBC29                       (0x0200u)
+#define GPIO_PIBC2_PIBC210                      (0x0400u)
+#define GPIO_PIBC2_PIBC211                      (0x0800u)
+#define GPIO_PIBC2_PIBC212                      (0x1000u)
+#define GPIO_PIBC2_PIBC213                      (0x2000u)
+#define GPIO_PIBC2_PIBC214                      (0x4000u)
+#define GPIO_PIBC2_PIBC215                      (0x8000u)
+
+#define GPIO_PBDC2_PBDC20                       (0x0001u)
+#define GPIO_PBDC2_PBDC21                       (0x0002u)
+#define GPIO_PBDC2_PBDC22                       (0x0004u)
+#define GPIO_PBDC2_PBDC23                       (0x0008u)
+#define GPIO_PBDC2_PBDC24                       (0x0010u)
+#define GPIO_PBDC2_PBDC25                       (0x0020u)
+#define GPIO_PBDC2_PBDC26                       (0x0040u)
+#define GPIO_PBDC2_PBDC27                       (0x0080u)
+#define GPIO_PBDC2_PBDC28                       (0x0100u)
+#define GPIO_PBDC2_PBDC29                       (0x0200u)
+#define GPIO_PBDC2_PBDC210                      (0x0400u)
+#define GPIO_PBDC2_PBDC211                      (0x0800u)
+#define GPIO_PBDC2_PBDC212                      (0x1000u)
+#define GPIO_PBDC2_PBDC213                      (0x2000u)
+#define GPIO_PBDC2_PBDC214                      (0x4000u)
+#define GPIO_PBDC2_PBDC215                      (0x8000u)
+
+#define GPIO_PIPC2_PIPC20                       (0x0001u)
+#define GPIO_PIPC2_PIPC21                       (0x0002u)
+#define GPIO_PIPC2_PIPC22                       (0x0004u)
+#define GPIO_PIPC2_PIPC23                       (0x0008u)
+#define GPIO_PIPC2_PIPC24                       (0x0010u)
+#define GPIO_PIPC2_PIPC25                       (0x0020u)
+#define GPIO_PIPC2_PIPC26                       (0x0040u)
+#define GPIO_PIPC2_PIPC27                       (0x0080u)
+#define GPIO_PIPC2_PIPC28                       (0x0100u)
+#define GPIO_PIPC2_PIPC29                       (0x0200u)
+#define GPIO_PIPC2_PIPC210                      (0x0400u)
+#define GPIO_PIPC2_PIPC211                      (0x0800u)
+#define GPIO_PIPC2_PIPC212                      (0x1000u)
+#define GPIO_PIPC2_PIPC213                      (0x2000u)
+#define GPIO_PIPC2_PIPC214                      (0x4000u)
+#define GPIO_PIPC2_PIPC215                      (0x8000u)
+
+/* ---- P3 ---- */
+#define GPIO_P3_P30                             (0x0001u)
+#define GPIO_P3_P31                             (0x0002u)
+#define GPIO_P3_P32                             (0x0004u)
+#define GPIO_P3_P33                             (0x0008u)
+#define GPIO_P3_P34                             (0x0010u)
+#define GPIO_P3_P35                             (0x0020u)
+#define GPIO_P3_P36                             (0x0040u)
+#define GPIO_P3_P37                             (0x0080u)
+#define GPIO_P3_P38                             (0x0100u)
+#define GPIO_P3_P39                             (0x0200u)
+#define GPIO_P3_P310                            (0x0400u)
+#define GPIO_P3_P311                            (0x0800u)
+#define GPIO_P3_P312                            (0x1000u)
+#define GPIO_P3_P313                            (0x2000u)
+#define GPIO_P3_P314                            (0x4000u)
+#define GPIO_P3_P315                            (0x8000u)
+
+#define GPIO_PSR3_PSR30                         (0x00000001uL)
+#define GPIO_PSR3_PSR31                         (0x00000002uL)
+#define GPIO_PSR3_PSR32                         (0x00000004uL)
+#define GPIO_PSR3_PSR33                         (0x00000008uL)
+#define GPIO_PSR3_PSR34                         (0x00000010uL)
+#define GPIO_PSR3_PSR35                         (0x00000020uL)
+#define GPIO_PSR3_PSR36                         (0x00000040uL)
+#define GPIO_PSR3_PSR37                         (0x00000080uL)
+#define GPIO_PSR3_PSR38                         (0x00000100uL)
+#define GPIO_PSR3_PSR39                         (0x00000200uL)
+#define GPIO_PSR3_PSR310                        (0x00000400uL)
+#define GPIO_PSR3_PSR311                        (0x00000800uL)
+#define GPIO_PSR3_PSR312                        (0x00001000uL)
+#define GPIO_PSR3_PSR313                        (0x00002000uL)
+#define GPIO_PSR3_PSR314                        (0x00004000uL)
+#define GPIO_PSR3_PSR315                        (0x00008000uL)
+#define GPIO_PSR3_PSR316                        (0x00010000uL)
+#define GPIO_PSR3_PSR317                        (0x00020000uL)
+#define GPIO_PSR3_PSR318                        (0x00040000uL)
+#define GPIO_PSR3_PSR319                        (0x00080000uL)
+#define GPIO_PSR3_PSR320                        (0x00100000uL)
+#define GPIO_PSR3_PSR321                        (0x00200000uL)
+#define GPIO_PSR3_PSR322                        (0x00400000uL)
+#define GPIO_PSR3_PSR323                        (0x00800000uL)
+#define GPIO_PSR3_PSR324                        (0x01000000uL)
+#define GPIO_PSR3_PSR325                        (0x02000000uL)
+#define GPIO_PSR3_PSR326                        (0x04000000uL)
+#define GPIO_PSR3_PSR327                        (0x08000000uL)
+#define GPIO_PSR3_PSR328                        (0x10000000uL)
+#define GPIO_PSR3_PSR329                        (0x20000000uL)
+#define GPIO_PSR3_PSR330                        (0x40000000uL)
+#define GPIO_PSR3_PSR331                        (0x80000000uL)
+
+#define GPIO_PPR3_PPR30                         (0x0001u)
+#define GPIO_PPR3_PPR31                         (0x0002u)
+#define GPIO_PPR3_PPR32                         (0x0004u)
+#define GPIO_PPR3_PPR33                         (0x0008u)
+#define GPIO_PPR3_PPR34                         (0x0010u)
+#define GPIO_PPR3_PPR35                         (0x0020u)
+#define GPIO_PPR3_PPR36                         (0x0040u)
+#define GPIO_PPR3_PPR37                         (0x0080u)
+#define GPIO_PPR3_PPR38                         (0x0100u)
+#define GPIO_PPR3_PPR39                         (0x0200u)
+#define GPIO_PPR3_PPR310                        (0x0400u)
+#define GPIO_PPR3_PPR311                        (0x0800u)
+#define GPIO_PPR3_PPR312                        (0x1000u)
+#define GPIO_PPR3_PPR313                        (0x2000u)
+#define GPIO_PPR3_PPR314                        (0x4000u)
+#define GPIO_PPR3_PPR315                        (0x8000u)
+
+#define GPIO_PM3_PM30                           (0x0001u)
+#define GPIO_PM3_PM31                           (0x0002u)
+#define GPIO_PM3_PM32                           (0x0004u)
+#define GPIO_PM3_PM33                           (0x0008u)
+#define GPIO_PM3_PM34                           (0x0010u)
+#define GPIO_PM3_PM35                           (0x0020u)
+#define GPIO_PM3_PM36                           (0x0040u)
+#define GPIO_PM3_PM37                           (0x0080u)
+#define GPIO_PM3_PM38                           (0x0100u)
+#define GPIO_PM3_PM39                           (0x0200u)
+#define GPIO_PM3_PM310                          (0x0400u)
+#define GPIO_PM3_PM311                          (0x0800u)
+#define GPIO_PM3_PM312                          (0x1000u)
+#define GPIO_PM3_PM313                          (0x2000u)
+#define GPIO_PM3_PM314                          (0x4000u)
+#define GPIO_PM3_PM315                          (0x8000u)
+
+#define GPIO_PMC3_PMC30                         (0x0001u)
+#define GPIO_PMC3_PMC31                         (0x0002u)
+#define GPIO_PMC3_PMC32                         (0x0004u)
+#define GPIO_PMC3_PMC33                         (0x0008u)
+#define GPIO_PMC3_PMC34                         (0x0010u)
+#define GPIO_PMC3_PMC35                         (0x0020u)
+#define GPIO_PMC3_PMC36                         (0x0040u)
+#define GPIO_PMC3_PMC37                         (0x0080u)
+#define GPIO_PMC3_PMC38                         (0x0100u)
+#define GPIO_PMC3_PMC39                         (0x0200u)
+#define GPIO_PMC3_PMC310                        (0x0400u)
+#define GPIO_PMC3_PMC311                        (0x0800u)
+#define GPIO_PMC3_PMC312                        (0x1000u)
+#define GPIO_PMC3_PMC313                        (0x2000u)
+#define GPIO_PMC3_PMC314                        (0x4000u)
+#define GPIO_PMC3_PMC315                        (0x8000u)
+
+#define GPIO_PFC3_PFC30                         (0x0001u)
+#define GPIO_PFC3_PFC31                         (0x0002u)
+#define GPIO_PFC3_PFC32                         (0x0004u)
+#define GPIO_PFC3_PFC33                         (0x0008u)
+#define GPIO_PFC3_PFC34                         (0x0010u)
+#define GPIO_PFC3_PFC35                         (0x0020u)
+#define GPIO_PFC3_PFC36                         (0x0040u)
+#define GPIO_PFC3_PFC37                         (0x0080u)
+#define GPIO_PFC3_PFC38                         (0x0100u)
+#define GPIO_PFC3_PFC39                         (0x0200u)
+#define GPIO_PFC3_PFC310                        (0x0400u)
+#define GPIO_PFC3_PFC311                        (0x0800u)
+#define GPIO_PFC3_PFC312                        (0x1000u)
+#define GPIO_PFC3_PFC313                        (0x2000u)
+#define GPIO_PFC3_PFC314                        (0x4000u)
+#define GPIO_PFC3_PFC315                        (0x8000u)
+
+#define GPIO_PFCE3_PFCE30                       (0x0001u)
+#define GPIO_PFCE3_PFCE31                       (0x0002u)
+#define GPIO_PFCE3_PFCE32                       (0x0004u)
+#define GPIO_PFCE3_PFCE33                       (0x0008u)
+#define GPIO_PFCE3_PFCE34                       (0x0010u)
+#define GPIO_PFCE3_PFCE35                       (0x0020u)
+#define GPIO_PFCE3_PFCE36                       (0x0040u)
+#define GPIO_PFCE3_PFCE37                       (0x0080u)
+#define GPIO_PFCE3_PFCE38                       (0x0100u)
+#define GPIO_PFCE3_PFCE39                       (0x0200u)
+#define GPIO_PFCE3_PFCE310                      (0x0400u)
+#define GPIO_PFCE3_PFCE311                      (0x0800u)
+#define GPIO_PFCE3_PFCE312                      (0x1000u)
+#define GPIO_PFCE3_PFCE313                      (0x2000u)
+#define GPIO_PFCE3_PFCE314                      (0x4000u)
+#define GPIO_PFCE3_PFCE315                      (0x8000u)
+
+#define GPIO_PNOT3_PNOT30                       (0x0001u)
+#define GPIO_PNOT3_PNOT31                       (0x0002u)
+#define GPIO_PNOT3_PNOT32                       (0x0004u)
+#define GPIO_PNOT3_PNOT33                       (0x0008u)
+#define GPIO_PNOT3_PNOT34                       (0x0010u)
+#define GPIO_PNOT3_PNOT35                       (0x0020u)
+#define GPIO_PNOT3_PNOT36                       (0x0040u)
+#define GPIO_PNOT3_PNOT37                       (0x0080u)
+#define GPIO_PNOT3_PNOT38                       (0x0100u)
+#define GPIO_PNOT3_PNOT39                       (0x0200u)
+#define GPIO_PNOT3_PNOT310                      (0x0400u)
+#define GPIO_PNOT3_PNOT311                      (0x0800u)
+#define GPIO_PNOT3_PNOT312                      (0x1000u)
+#define GPIO_PNOT3_PNOT313                      (0x2000u)
+#define GPIO_PNOT3_PNOT314                      (0x4000u)
+#define GPIO_PNOT3_PNOT315                      (0x8000u)
+
+#define GPIO_PMSR3_PMSR30                       (0x00000001uL)
+#define GPIO_PMSR3_PMSR31                       (0x00000002uL)
+#define GPIO_PMSR3_PMSR32                       (0x00000004uL)
+#define GPIO_PMSR3_PMSR33                       (0x00000008uL)
+#define GPIO_PMSR3_PMSR34                       (0x00000010uL)
+#define GPIO_PMSR3_PMSR35                       (0x00000020uL)
+#define GPIO_PMSR3_PMSR36                       (0x00000040uL)
+#define GPIO_PMSR3_PMSR37                       (0x00000080uL)
+#define GPIO_PMSR3_PMSR38                       (0x00000100uL)
+#define GPIO_PMSR3_PMSR39                       (0x00000200uL)
+#define GPIO_PMSR3_PMSR310                      (0x00000400uL)
+#define GPIO_PMSR3_PMSR311                      (0x00000800uL)
+#define GPIO_PMSR3_PMSR312                      (0x00001000uL)
+#define GPIO_PMSR3_PMSR313                      (0x00002000uL)
+#define GPIO_PMSR3_PMSR314                      (0x00004000uL)
+#define GPIO_PMSR3_PMSR315                      (0x00008000uL)
+#define GPIO_PMSR3_PMSR316                      (0x00010000uL)
+#define GPIO_PMSR3_PMSR317                      (0x00020000uL)
+#define GPIO_PMSR3_PMSR318                      (0x00040000uL)
+#define GPIO_PMSR3_PMSR319                      (0x00080000uL)
+#define GPIO_PMSR3_PMSR320                      (0x00100000uL)
+#define GPIO_PMSR3_PMSR321                      (0x00200000uL)
+#define GPIO_PMSR3_PMSR322                      (0x00400000uL)
+#define GPIO_PMSR3_PMSR323                      (0x00800000uL)
+#define GPIO_PMSR3_PMSR324                      (0x01000000uL)
+#define GPIO_PMSR3_PMSR325                      (0x02000000uL)
+#define GPIO_PMSR3_PMSR326                      (0x04000000uL)
+#define GPIO_PMSR3_PMSR327                      (0x08000000uL)
+#define GPIO_PMSR3_PMSR328                      (0x10000000uL)
+#define GPIO_PMSR3_PMSR329                      (0x20000000uL)
+#define GPIO_PMSR3_PMSR330                      (0x40000000uL)
+#define GPIO_PMSR3_PMSR331                      (0x80000000uL)
+
+#define GPIO_PMCSR3_PMCSR30                     (0x00000001uL)
+#define GPIO_PMCSR3_PMCSR31                     (0x00000002uL)
+#define GPIO_PMCSR3_PMCSR32                     (0x00000004uL)
+#define GPIO_PMCSR3_PMCSR33                     (0x00000008uL)
+#define GPIO_PMCSR3_PMCSR34                     (0x00000010uL)
+#define GPIO_PMCSR3_PMCSR35                     (0x00000020uL)
+#define GPIO_PMCSR3_PMCSR36                     (0x00000040uL)
+#define GPIO_PMCSR3_PMCSR37                     (0x00000080uL)
+#define GPIO_PMCSR3_PMCSR38                     (0x00000100uL)
+#define GPIO_PMCSR3_PMCSR39                     (0x00000200uL)
+#define GPIO_PMCSR3_PMCSR310                    (0x00000400uL)
+#define GPIO_PMCSR3_PMCSR311                    (0x00000800uL)
+#define GPIO_PMCSR3_PMCSR312                    (0x00001000uL)
+#define GPIO_PMCSR3_PMCSR313                    (0x00002000uL)
+#define GPIO_PMCSR3_PMCSR314                    (0x00004000uL)
+#define GPIO_PMCSR3_PMCSR315                    (0x00008000uL)
+#define GPIO_PMCSR3_PMCSR316                    (0x00010000uL)
+#define GPIO_PMCSR3_PMCSR317                    (0x00020000uL)
+#define GPIO_PMCSR3_PMCSR318                    (0x00040000uL)
+#define GPIO_PMCSR3_PMCSR319                    (0x00080000uL)
+#define GPIO_PMCSR3_PMCSR320                    (0x00100000uL)
+#define GPIO_PMCSR3_PMCSR321                    (0x00200000uL)
+#define GPIO_PMCSR3_PMCSR322                    (0x00400000uL)
+#define GPIO_PMCSR3_PMCSR323                    (0x00800000uL)
+#define GPIO_PMCSR3_PMCSR324                    (0x01000000uL)
+#define GPIO_PMCSR3_PMCSR325                    (0x02000000uL)
+#define GPIO_PMCSR3_PMCSR326                    (0x04000000uL)
+#define GPIO_PMCSR3_PMCSR327                    (0x08000000uL)
+#define GPIO_PMCSR3_PMCSR328                    (0x10000000uL)
+#define GPIO_PMCSR3_PMCSR329                    (0x20000000uL)
+#define GPIO_PMCSR3_PMCSR330                    (0x40000000uL)
+#define GPIO_PMCSR3_PMCSR331                    (0x80000000uL)
+
+#define GPIO_PFCAE3_PFCAE30                     (0x0001u)
+#define GPIO_PFCAE3_PFCAE31                     (0x0002u)
+#define GPIO_PFCAE3_PFCAE32                     (0x0004u)
+#define GPIO_PFCAE3_PFCAE33                     (0x0008u)
+#define GPIO_PFCAE3_PFCAE34                     (0x0010u)
+#define GPIO_PFCAE3_PFCAE35                     (0x0020u)
+#define GPIO_PFCAE3_PFCAE36                     (0x0040u)
+#define GPIO_PFCAE3_PFCAE37                     (0x0080u)
+#define GPIO_PFCAE3_PFCAE38                     (0x0100u)
+#define GPIO_PFCAE3_PFCAE39                     (0x0200u)
+#define GPIO_PFCAE3_PFCAE310                    (0x0400u)
+#define GPIO_PFCAE3_PFCAE311                    (0x0800u)
+#define GPIO_PFCAE3_PFCAE312                    (0x1000u)
+#define GPIO_PFCAE3_PFCAE313                    (0x2000u)
+#define GPIO_PFCAE3_PFCAE314                    (0x4000u)
+#define GPIO_PFCAE3_PFCAE315                    (0x8000u)
+
+#define GPIO_PIBC3_PIBC30                       (0x0001u)
+#define GPIO_PIBC3_PIBC31                       (0x0002u)
+#define GPIO_PIBC3_PIBC32                       (0x0004u)
+#define GPIO_PIBC3_PIBC33                       (0x0008u)
+#define GPIO_PIBC3_PIBC34                       (0x0010u)
+#define GPIO_PIBC3_PIBC35                       (0x0020u)
+#define GPIO_PIBC3_PIBC36                       (0x0040u)
+#define GPIO_PIBC3_PIBC37                       (0x0080u)
+#define GPIO_PIBC3_PIBC38                       (0x0100u)
+#define GPIO_PIBC3_PIBC39                       (0x0200u)
+#define GPIO_PIBC3_PIBC310                      (0x0400u)
+#define GPIO_PIBC3_PIBC311                      (0x0800u)
+#define GPIO_PIBC3_PIBC312                      (0x1000u)
+#define GPIO_PIBC3_PIBC313                      (0x2000u)
+#define GPIO_PIBC3_PIBC314                      (0x4000u)
+#define GPIO_PIBC3_PIBC315                      (0x8000u)
+
+#define GPIO_PBDC3_PBDC30                       (0x0001u)
+#define GPIO_PBDC3_PBDC31                       (0x0002u)
+#define GPIO_PBDC3_PBDC32                       (0x0004u)
+#define GPIO_PBDC3_PBDC33                       (0x0008u)
+#define GPIO_PBDC3_PBDC34                       (0x0010u)
+#define GPIO_PBDC3_PBDC35                       (0x0020u)
+#define GPIO_PBDC3_PBDC36                       (0x0040u)
+#define GPIO_PBDC3_PBDC37                       (0x0080u)
+#define GPIO_PBDC3_PBDC38                       (0x0100u)
+#define GPIO_PBDC3_PBDC39                       (0x0200u)
+#define GPIO_PBDC3_PBDC310                      (0x0400u)
+#define GPIO_PBDC3_PBDC311                      (0x0800u)
+#define GPIO_PBDC3_PBDC312                      (0x1000u)
+#define GPIO_PBDC3_PBDC313                      (0x2000u)
+#define GPIO_PBDC3_PBDC314                      (0x4000u)
+#define GPIO_PBDC3_PBDC315                      (0x8000u)
+
+#define GPIO_PIPC3_PIPC30                       (0x0001u)
+#define GPIO_PIPC3_PIPC31                       (0x0002u)
+#define GPIO_PIPC3_PIPC32                       (0x0004u)
+#define GPIO_PIPC3_PIPC33                       (0x0008u)
+#define GPIO_PIPC3_PIPC34                       (0x0010u)
+#define GPIO_PIPC3_PIPC35                       (0x0020u)
+#define GPIO_PIPC3_PIPC36                       (0x0040u)
+#define GPIO_PIPC3_PIPC37                       (0x0080u)
+#define GPIO_PIPC3_PIPC38                       (0x0100u)
+#define GPIO_PIPC3_PIPC39                       (0x0200u)
+#define GPIO_PIPC3_PIPC310                      (0x0400u)
+#define GPIO_PIPC3_PIPC311                      (0x0800u)
+#define GPIO_PIPC3_PIPC312                      (0x1000u)
+#define GPIO_PIPC3_PIPC313                      (0x2000u)
+#define GPIO_PIPC3_PIPC314                      (0x4000u)
+#define GPIO_PIPC3_PIPC315                      (0x8000u)
+
+/* ---- P4 ---- */
+#define GPIO_P4_P40                             (0x0001u)
+#define GPIO_P4_P41                             (0x0002u)
+#define GPIO_P4_P42                             (0x0004u)
+#define GPIO_P4_P43                             (0x0008u)
+#define GPIO_P4_P44                             (0x0010u)
+#define GPIO_P4_P45                             (0x0020u)
+#define GPIO_P4_P46                             (0x0040u)
+#define GPIO_P4_P47                             (0x0080u)
+#define GPIO_P4_P48                             (0x0100u)
+#define GPIO_P4_P49                             (0x0200u)
+#define GPIO_P4_P410                            (0x0400u)
+#define GPIO_P4_P411                            (0x0800u)
+#define GPIO_P4_P412                            (0x1000u)
+#define GPIO_P4_P413                            (0x2000u)
+#define GPIO_P4_P414                            (0x4000u)
+#define GPIO_P4_P415                            (0x8000u)
+
+#define GPIO_PSR4_PSR40                         (0x00000001uL)
+#define GPIO_PSR4_PSR41                         (0x00000002uL)
+#define GPIO_PSR4_PSR42                         (0x00000004uL)
+#define GPIO_PSR4_PSR43                         (0x00000008uL)
+#define GPIO_PSR4_PSR44                         (0x00000010uL)
+#define GPIO_PSR4_PSR45                         (0x00000020uL)
+#define GPIO_PSR4_PSR46                         (0x00000040uL)
+#define GPIO_PSR4_PSR47                         (0x00000080uL)
+#define GPIO_PSR4_PSR48                         (0x00000100uL)
+#define GPIO_PSR4_PSR49                         (0x00000200uL)
+#define GPIO_PSR4_PSR410                        (0x00000400uL)
+#define GPIO_PSR4_PSR411                        (0x00000800uL)
+#define GPIO_PSR4_PSR412                        (0x00001000uL)
+#define GPIO_PSR4_PSR413                        (0x00002000uL)
+#define GPIO_PSR4_PSR414                        (0x00004000uL)
+#define GPIO_PSR4_PSR415                        (0x00008000uL)
+#define GPIO_PSR4_PSR416                        (0x00010000uL)
+#define GPIO_PSR4_PSR417                        (0x00020000uL)
+#define GPIO_PSR4_PSR418                        (0x00040000uL)
+#define GPIO_PSR4_PSR419                        (0x00080000uL)
+#define GPIO_PSR4_PSR420                        (0x00100000uL)
+#define GPIO_PSR4_PSR421                        (0x00200000uL)
+#define GPIO_PSR4_PSR422                        (0x00400000uL)
+#define GPIO_PSR4_PSR423                        (0x00800000uL)
+#define GPIO_PSR4_PSR424                        (0x01000000uL)
+#define GPIO_PSR4_PSR425                        (0x02000000uL)
+#define GPIO_PSR4_PSR426                        (0x04000000uL)
+#define GPIO_PSR4_PSR427                        (0x08000000uL)
+#define GPIO_PSR4_PSR428                        (0x10000000uL)
+#define GPIO_PSR4_PSR429                        (0x20000000uL)
+#define GPIO_PSR4_PSR430                        (0x40000000uL)
+#define GPIO_PSR4_PSR431                        (0x80000000uL)
+
+#define GPIO_PPR4_PPR40                         (0x0001u)
+#define GPIO_PPR4_PPR41                         (0x0002u)
+#define GPIO_PPR4_PPR42                         (0x0004u)
+#define GPIO_PPR4_PPR43                         (0x0008u)
+#define GPIO_PPR4_PPR44                         (0x0010u)
+#define GPIO_PPR4_PPR45                         (0x0020u)
+#define GPIO_PPR4_PPR46                         (0x0040u)
+#define GPIO_PPR4_PPR47                         (0x0080u)
+#define GPIO_PPR4_PPR48                         (0x0100u)
+#define GPIO_PPR4_PPR49                         (0x0200u)
+#define GPIO_PPR4_PPR410                        (0x0400u)
+#define GPIO_PPR4_PPR411                        (0x0800u)
+#define GPIO_PPR4_PPR412                        (0x1000u)
+#define GPIO_PPR4_PPR413                        (0x2000u)
+#define GPIO_PPR4_PPR414                        (0x4000u)
+#define GPIO_PPR4_PPR415                        (0x8000u)
+
+#define GPIO_PM4_PM40                           (0x0001u)
+#define GPIO_PM4_PM41                           (0x0002u)
+#define GPIO_PM4_PM42                           (0x0004u)
+#define GPIO_PM4_PM43                           (0x0008u)
+#define GPIO_PM4_PM44                           (0x0010u)
+#define GPIO_PM4_PM45                           (0x0020u)
+#define GPIO_PM4_PM46                           (0x0040u)
+#define GPIO_PM4_PM47                           (0x0080u)
+#define GPIO_PM4_PM48                           (0x0100u)
+#define GPIO_PM4_PM49                           (0x0200u)
+#define GPIO_PM4_PM410                          (0x0400u)
+#define GPIO_PM4_PM411                          (0x0800u)
+#define GPIO_PM4_PM412                          (0x1000u)
+#define GPIO_PM4_PM413                          (0x2000u)
+#define GPIO_PM4_PM414                          (0x4000u)
+#define GPIO_PM4_PM415                          (0x8000u)
+
+#define GPIO_PMC4_PMC40                         (0x0001u)
+#define GPIO_PMC4_PMC41                         (0x0002u)
+#define GPIO_PMC4_PMC42                         (0x0004u)
+#define GPIO_PMC4_PMC43                         (0x0008u)
+#define GPIO_PMC4_PMC44                         (0x0010u)
+#define GPIO_PMC4_PMC45                         (0x0020u)
+#define GPIO_PMC4_PMC46                         (0x0040u)
+#define GPIO_PMC4_PMC47                         (0x0080u)
+#define GPIO_PMC4_PMC48                         (0x0100u)
+#define GPIO_PMC4_PMC49                         (0x0200u)
+#define GPIO_PMC4_PMC410                        (0x0400u)
+#define GPIO_PMC4_PMC411                        (0x0800u)
+#define GPIO_PMC4_PMC412                        (0x1000u)
+#define GPIO_PMC4_PMC413                        (0x2000u)
+#define GPIO_PMC4_PMC414                        (0x4000u)
+#define GPIO_PMC4_PMC415                        (0x8000u)
+
+#define GPIO_PFC4_PFC40                         (0x0001u)
+#define GPIO_PFC4_PFC41                         (0x0002u)
+#define GPIO_PFC4_PFC42                         (0x0004u)
+#define GPIO_PFC4_PFC43                         (0x0008u)
+#define GPIO_PFC4_PFC44                         (0x0010u)
+#define GPIO_PFC4_PFC45                         (0x0020u)
+#define GPIO_PFC4_PFC46                         (0x0040u)
+#define GPIO_PFC4_PFC47                         (0x0080u)
+#define GPIO_PFC4_PFC48                         (0x0100u)
+#define GPIO_PFC4_PFC49                         (0x0200u)
+#define GPIO_PFC4_PFC410                        (0x0400u)
+#define GPIO_PFC4_PFC411                        (0x0800u)
+#define GPIO_PFC4_PFC412                        (0x1000u)
+#define GPIO_PFC4_PFC413                        (0x2000u)
+#define GPIO_PFC4_PFC414                        (0x4000u)
+#define GPIO_PFC4_PFC415                        (0x8000u)
+
+#define GPIO_PFCE4_PFCE40                       (0x0001u)
+#define GPIO_PFCE4_PFCE41                       (0x0002u)
+#define GPIO_PFCE4_PFCE42                       (0x0004u)
+#define GPIO_PFCE4_PFCE43                       (0x0008u)
+#define GPIO_PFCE4_PFCE44                       (0x0010u)
+#define GPIO_PFCE4_PFCE45                       (0x0020u)
+#define GPIO_PFCE4_PFCE46                       (0x0040u)
+#define GPIO_PFCE4_PFCE47                       (0x0080u)
+#define GPIO_PFCE4_PFCE48                       (0x0100u)
+#define GPIO_PFCE4_PFCE49                       (0x0200u)
+#define GPIO_PFCE4_PFCE410                      (0x0400u)
+#define GPIO_PFCE4_PFCE411                      (0x0800u)
+#define GPIO_PFCE4_PFCE412                      (0x1000u)
+#define GPIO_PFCE4_PFCE413                      (0x2000u)
+#define GPIO_PFCE4_PFCE414                      (0x4000u)
+#define GPIO_PFCE4_PFCE415                      (0x8000u)
+
+#define GPIO_PNOT4_PNOT40                       (0x0001u)
+#define GPIO_PNOT4_PNOT41                       (0x0002u)
+#define GPIO_PNOT4_PNOT42                       (0x0004u)
+#define GPIO_PNOT4_PNOT43                       (0x0008u)
+#define GPIO_PNOT4_PNOT44                       (0x0010u)
+#define GPIO_PNOT4_PNOT45                       (0x0020u)
+#define GPIO_PNOT4_PNOT46                       (0x0040u)
+#define GPIO_PNOT4_PNOT47                       (0x0080u)
+#define GPIO_PNOT4_PNOT48                       (0x0100u)
+#define GPIO_PNOT4_PNOT49                       (0x0200u)
+#define GPIO_PNOT4_PNOT410                      (0x0400u)
+#define GPIO_PNOT4_PNOT411                      (0x0800u)
+#define GPIO_PNOT4_PNOT412                      (0x1000u)
+#define GPIO_PNOT4_PNOT413                      (0x2000u)
+#define GPIO_PNOT4_PNOT414                      (0x4000u)
+#define GPIO_PNOT4_PNOT415                      (0x8000u)
+
+#define GPIO_PMSR4_PMSR40                       (0x00000001uL)
+#define GPIO_PMSR4_PMSR41                       (0x00000002uL)
+#define GPIO_PMSR4_PMSR42                       (0x00000004uL)
+#define GPIO_PMSR4_PMSR43                       (0x00000008uL)
+#define GPIO_PMSR4_PMSR44                       (0x00000010uL)
+#define GPIO_PMSR4_PMSR45                       (0x00000020uL)
+#define GPIO_PMSR4_PMSR46                       (0x00000040uL)
+#define GPIO_PMSR4_PMSR47                       (0x00000080uL)
+#define GPIO_PMSR4_PMSR48                       (0x00000100uL)
+#define GPIO_PMSR4_PMSR49                       (0x00000200uL)
+#define GPIO_PMSR4_PMSR410                      (0x00000400uL)
+#define GPIO_PMSR4_PMSR411                      (0x00000800uL)
+#define GPIO_PMSR4_PMSR412                      (0x00001000uL)
+#define GPIO_PMSR4_PMSR413                      (0x00002000uL)
+#define GPIO_PMSR4_PMSR414                      (0x00004000uL)
+#define GPIO_PMSR4_PMSR415                      (0x00008000uL)
+#define GPIO_PMSR4_PMSR416                      (0x00010000uL)
+#define GPIO_PMSR4_PMSR417                      (0x00020000uL)
+#define GPIO_PMSR4_PMSR418                      (0x00040000uL)
+#define GPIO_PMSR4_PMSR419                      (0x00080000uL)
+#define GPIO_PMSR4_PMSR420                      (0x00100000uL)
+#define GPIO_PMSR4_PMSR421                      (0x00200000uL)
+#define GPIO_PMSR4_PMSR422                      (0x00400000uL)
+#define GPIO_PMSR4_PMSR423                      (0x00800000uL)
+#define GPIO_PMSR4_PMSR424                      (0x01000000uL)
+#define GPIO_PMSR4_PMSR425                      (0x02000000uL)
+#define GPIO_PMSR4_PMSR426                      (0x04000000uL)
+#define GPIO_PMSR4_PMSR427                      (0x08000000uL)
+#define GPIO_PMSR4_PMSR428                      (0x10000000uL)
+#define GPIO_PMSR4_PMSR429                      (0x20000000uL)
+#define GPIO_PMSR4_PMSR430                      (0x40000000uL)
+#define GPIO_PMSR4_PMSR431                      (0x80000000uL)
+
+#define GPIO_PMCSR4_PMCSR40                     (0x00000001uL)
+#define GPIO_PMCSR4_PMCSR41                     (0x00000002uL)
+#define GPIO_PMCSR4_PMCSR42                     (0x00000004uL)
+#define GPIO_PMCSR4_PMCSR43                     (0x00000008uL)
+#define GPIO_PMCSR4_PMCSR44                     (0x00000010uL)
+#define GPIO_PMCSR4_PMCSR45                     (0x00000020uL)
+#define GPIO_PMCSR4_PMCSR46                     (0x00000040uL)
+#define GPIO_PMCSR4_PMCSR47                     (0x00000080uL)
+#define GPIO_PMCSR4_PMCSR48                     (0x00000100uL)
+#define GPIO_PMCSR4_PMCSR49                     (0x00000200uL)
+#define GPIO_PMCSR4_PMCSR410                    (0x00000400uL)
+#define GPIO_PMCSR4_PMCSR411                    (0x00000800uL)
+#define GPIO_PMCSR4_PMCSR412                    (0x00001000uL)
+#define GPIO_PMCSR4_PMCSR413                    (0x00002000uL)
+#define GPIO_PMCSR4_PMCSR414                    (0x00004000uL)
+#define GPIO_PMCSR4_PMCSR415                    (0x00008000uL)
+#define GPIO_PMCSR4_PMCSR416                    (0x00010000uL)
+#define GPIO_PMCSR4_PMCSR417                    (0x00020000uL)
+#define GPIO_PMCSR4_PMCSR418                    (0x00040000uL)
+#define GPIO_PMCSR4_PMCSR419                    (0x00080000uL)
+#define GPIO_PMCSR4_PMCSR420                    (0x00100000uL)
+#define GPIO_PMCSR4_PMCSR421                    (0x00200000uL)
+#define GPIO_PMCSR4_PMCSR422                    (0x00400000uL)
+#define GPIO_PMCSR4_PMCSR423                    (0x00800000uL)
+#define GPIO_PMCSR4_PMCSR424                    (0x01000000uL)
+#define GPIO_PMCSR4_PMCSR425                    (0x02000000uL)
+#define GPIO_PMCSR4_PMCSR426                    (0x04000000uL)
+#define GPIO_PMCSR4_PMCSR427                    (0x08000000uL)
+#define GPIO_PMCSR4_PMCSR428                    (0x10000000uL)
+#define GPIO_PMCSR4_PMCSR429                    (0x20000000uL)
+#define GPIO_PMCSR4_PMCSR430                    (0x40000000uL)
+#define GPIO_PMCSR4_PMCSR431                    (0x80000000uL)
+
+#define GPIO_PFCAE4_PFCAE40                     (0x0001u)
+#define GPIO_PFCAE4_PFCAE41                     (0x0002u)
+#define GPIO_PFCAE4_PFCAE42                     (0x0004u)
+#define GPIO_PFCAE4_PFCAE43                     (0x0008u)
+#define GPIO_PFCAE4_PFCAE44                     (0x0010u)
+#define GPIO_PFCAE4_PFCAE45                     (0x0020u)
+#define GPIO_PFCAE4_PFCAE46                     (0x0040u)
+#define GPIO_PFCAE4_PFCAE47                     (0x0080u)
+#define GPIO_PFCAE4_PFCAE48                     (0x0100u)
+#define GPIO_PFCAE4_PFCAE49                     (0x0200u)
+#define GPIO_PFCAE4_PFCAE410                    (0x0400u)
+#define GPIO_PFCAE4_PFCAE411                    (0x0800u)
+#define GPIO_PFCAE4_PFCAE412                    (0x1000u)
+#define GPIO_PFCAE4_PFCAE413                    (0x2000u)
+#define GPIO_PFCAE4_PFCAE414                    (0x4000u)
+#define GPIO_PFCAE4_PFCAE415                    (0x8000u)
+
+#define GPIO_PIBC4_PIBC40                       (0x0001u)
+#define GPIO_PIBC4_PIBC41                       (0x0002u)
+#define GPIO_PIBC4_PIBC42                       (0x0004u)
+#define GPIO_PIBC4_PIBC43                       (0x0008u)
+#define GPIO_PIBC4_PIBC44                       (0x0010u)
+#define GPIO_PIBC4_PIBC45                       (0x0020u)
+#define GPIO_PIBC4_PIBC46                       (0x0040u)
+#define GPIO_PIBC4_PIBC47                       (0x0080u)
+#define GPIO_PIBC4_PIBC48                       (0x0100u)
+#define GPIO_PIBC4_PIBC49                       (0x0200u)
+#define GPIO_PIBC4_PIBC410                      (0x0400u)
+#define GPIO_PIBC4_PIBC411                      (0x0800u)
+#define GPIO_PIBC4_PIBC412                      (0x1000u)
+#define GPIO_PIBC4_PIBC413                      (0x2000u)
+#define GPIO_PIBC4_PIBC414                      (0x4000u)
+#define GPIO_PIBC4_PIBC415                      (0x8000u)
+
+#define GPIO_PBDC4_PBDC40                       (0x0001u)
+#define GPIO_PBDC4_PBDC41                       (0x0002u)
+#define GPIO_PBDC4_PBDC42                       (0x0004u)
+#define GPIO_PBDC4_PBDC43                       (0x0008u)
+#define GPIO_PBDC4_PBDC44                       (0x0010u)
+#define GPIO_PBDC4_PBDC45                       (0x0020u)
+#define GPIO_PBDC4_PBDC46                       (0x0040u)
+#define GPIO_PBDC4_PBDC47                       (0x0080u)
+#define GPIO_PBDC4_PBDC48                       (0x0100u)
+#define GPIO_PBDC4_PBDC49                       (0x0200u)
+#define GPIO_PBDC4_PBDC410                      (0x0400u)
+#define GPIO_PBDC4_PBDC411                      (0x0800u)
+#define GPIO_PBDC4_PBDC412                      (0x1000u)
+#define GPIO_PBDC4_PBDC413                      (0x2000u)
+#define GPIO_PBDC4_PBDC414                      (0x4000u)
+#define GPIO_PBDC4_PBDC415                      (0x8000u)
+
+#define GPIO_PIPC4_PIPC40                       (0x0001u)
+#define GPIO_PIPC4_PIPC41                       (0x0002u)
+#define GPIO_PIPC4_PIPC42                       (0x0004u)
+#define GPIO_PIPC4_PIPC43                       (0x0008u)
+#define GPIO_PIPC4_PIPC44                       (0x0010u)
+#define GPIO_PIPC4_PIPC45                       (0x0020u)
+#define GPIO_PIPC4_PIPC46                       (0x0040u)
+#define GPIO_PIPC4_PIPC47                       (0x0080u)
+#define GPIO_PIPC4_PIPC48                       (0x0100u)
+#define GPIO_PIPC4_PIPC49                       (0x0200u)
+#define GPIO_PIPC4_PIPC410                      (0x0400u)
+#define GPIO_PIPC4_PIPC411                      (0x0800u)
+#define GPIO_PIPC4_PIPC412                      (0x1000u)
+#define GPIO_PIPC4_PIPC413                      (0x2000u)
+#define GPIO_PIPC4_PIPC414                      (0x4000u)
+#define GPIO_PIPC4_PIPC415                      (0x8000u)
+
+/* ---- P5 ---- */
+#define GPIO_P5_P50                             (0x0001u)
+#define GPIO_P5_P51                             (0x0002u)
+#define GPIO_P5_P52                             (0x0004u)
+#define GPIO_P5_P53                             (0x0008u)
+#define GPIO_P5_P54                             (0x0010u)
+#define GPIO_P5_P55                             (0x0020u)
+#define GPIO_P5_P56                             (0x0040u)
+#define GPIO_P5_P57                             (0x0080u)
+#define GPIO_P5_P58                             (0x0100u)
+#define GPIO_P5_P59                             (0x0200u)
+#define GPIO_P5_P510                            (0x0400u)
+
+#define GPIO_PSR5_PSR50                         (0x00000001uL)
+#define GPIO_PSR5_PSR51                         (0x00000002uL)
+#define GPIO_PSR5_PSR52                         (0x00000004uL)
+#define GPIO_PSR5_PSR53                         (0x00000008uL)
+#define GPIO_PSR5_PSR54                         (0x00000010uL)
+#define GPIO_PSR5_PSR55                         (0x00000020uL)
+#define GPIO_PSR5_PSR56                         (0x00000040uL)
+#define GPIO_PSR5_PSR57                         (0x00000080uL)
+#define GPIO_PSR5_PSR58                         (0x00000100uL)
+#define GPIO_PSR5_PSR59                         (0x00000200uL)
+#define GPIO_PSR5_PSR510                        (0x00000400uL)
+#define GPIO_PSR5_PSR516                        (0x00010000uL)
+#define GPIO_PSR5_PSR517                        (0x00020000uL)
+#define GPIO_PSR5_PSR518                        (0x00040000uL)
+#define GPIO_PSR5_PSR519                        (0x00080000uL)
+#define GPIO_PSR5_PSR520                        (0x00100000uL)
+#define GPIO_PSR5_PSR521                        (0x00200000uL)
+#define GPIO_PSR5_PSR522                        (0x00400000uL)
+#define GPIO_PSR5_PSR523                        (0x00800000uL)
+#define GPIO_PSR5_PSR524                        (0x01000000uL)
+#define GPIO_PSR5_PSR525                        (0x02000000uL)
+#define GPIO_PSR5_PSR526                        (0x04000000uL)
+
+#define GPIO_PPR5_PPR50                         (0x0001u)
+#define GPIO_PPR5_PPR51                         (0x0002u)
+#define GPIO_PPR5_PPR52                         (0x0004u)
+#define GPIO_PPR5_PPR53                         (0x0008u)
+#define GPIO_PPR5_PPR54                         (0x0010u)
+#define GPIO_PPR5_PPR55                         (0x0020u)
+#define GPIO_PPR5_PPR56                         (0x0040u)
+#define GPIO_PPR5_PPR57                         (0x0080u)
+#define GPIO_PPR5_PPR58                         (0x0100u)
+#define GPIO_PPR5_PPR59                         (0x0200u)
+#define GPIO_PPR5_PPR510                        (0x0400u)
+
+#define GPIO_PM5_PM50                           (0x0001u)
+#define GPIO_PM5_PM51                           (0x0002u)
+#define GPIO_PM5_PM52                           (0x0004u)
+#define GPIO_PM5_PM53                           (0x0008u)
+#define GPIO_PM5_PM54                           (0x0010u)
+#define GPIO_PM5_PM55                           (0x0020u)
+#define GPIO_PM5_PM56                           (0x0040u)
+#define GPIO_PM5_PM57                           (0x0080u)
+#define GPIO_PM5_PM58                           (0x0100u)
+#define GPIO_PM5_PM59                           (0x0200u)
+#define GPIO_PM5_PM510                          (0x0400u)
+
+#define GPIO_PMC5_PMC50                         (0x0001u)
+#define GPIO_PMC5_PMC51                         (0x0002u)
+#define GPIO_PMC5_PMC52                         (0x0004u)
+#define GPIO_PMC5_PMC53                         (0x0008u)
+#define GPIO_PMC5_PMC54                         (0x0010u)
+#define GPIO_PMC5_PMC55                         (0x0020u)
+#define GPIO_PMC5_PMC56                         (0x0040u)
+#define GPIO_PMC5_PMC57                         (0x0080u)
+#define GPIO_PMC5_PMC58                         (0x0100u)
+#define GPIO_PMC5_PMC59                         (0x0200u)
+#define GPIO_PMC5_PMC510                        (0x0400u)
+
+#define GPIO_PFC5_PFC50                         (0x0001u)
+#define GPIO_PFC5_PFC51                         (0x0002u)
+#define GPIO_PFC5_PFC52                         (0x0004u)
+#define GPIO_PFC5_PFC53                         (0x0008u)
+#define GPIO_PFC5_PFC54                         (0x0010u)
+#define GPIO_PFC5_PFC55                         (0x0020u)
+#define GPIO_PFC5_PFC56                         (0x0040u)
+#define GPIO_PFC5_PFC57                         (0x0080u)
+#define GPIO_PFC5_PFC58                         (0x0100u)
+#define GPIO_PFC5_PFC59                         (0x0200u)
+#define GPIO_PFC5_PFC510                        (0x0400u)
+
+#define GPIO_PFCE5_PFCE50                       (0x0001u)
+#define GPIO_PFCE5_PFCE51                       (0x0002u)
+#define GPIO_PFCE5_PFCE52                       (0x0004u)
+#define GPIO_PFCE5_PFCE53                       (0x0008u)
+#define GPIO_PFCE5_PFCE54                       (0x0010u)
+#define GPIO_PFCE5_PFCE55                       (0x0020u)
+#define GPIO_PFCE5_PFCE56                       (0x0040u)
+#define GPIO_PFCE5_PFCE57                       (0x0080u)
+#define GPIO_PFCE5_PFCE58                       (0x0100u)
+#define GPIO_PFCE5_PFCE59                       (0x0200u)
+#define GPIO_PFCE5_PFCE510                      (0x0400u)
+
+#define GPIO_PNOT5_PNOT50                       (0x0001u)
+#define GPIO_PNOT5_PNOT51                       (0x0002u)
+#define GPIO_PNOT5_PNOT52                       (0x0004u)
+#define GPIO_PNOT5_PNOT53                       (0x0008u)
+#define GPIO_PNOT5_PNOT54                       (0x0010u)
+#define GPIO_PNOT5_PNOT55                       (0x0020u)
+#define GPIO_PNOT5_PNOT56                       (0x0040u)
+#define GPIO_PNOT5_PNOT57                       (0x0080u)
+#define GPIO_PNOT5_PNOT58                       (0x0100u)
+#define GPIO_PNOT5_PNOT59                       (0x0200u)
+#define GPIO_PNOT5_PNOT510                      (0x0400u)
+
+#define GPIO_PMSR5_PMSR50                       (0x00000001uL)
+#define GPIO_PMSR5_PMSR51                       (0x00000002uL)
+#define GPIO_PMSR5_PMSR52                       (0x00000004uL)
+#define GPIO_PMSR5_PMSR53                       (0x00000008uL)
+#define GPIO_PMSR5_PMSR54                       (0x00000010uL)
+#define GPIO_PMSR5_PMSR55                       (0x00000020uL)
+#define GPIO_PMSR5_PMSR56                       (0x00000040uL)
+#define GPIO_PMSR5_PMSR57                       (0x00000080uL)
+#define GPIO_PMSR5_PMSR58                       (0x00000100uL)
+#define GPIO_PMSR5_PMSR59                       (0x00000200uL)
+#define GPIO_PMSR5_PMSR510                      (0x00000400uL)
+#define GPIO_PMSR5_PMSR516                      (0x00010000uL)
+#define GPIO_PMSR5_PMSR517                      (0x00020000uL)
+#define GPIO_PMSR5_PMSR518                      (0x00040000uL)
+#define GPIO_PMSR5_PMSR519                      (0x00080000uL)
+#define GPIO_PMSR5_PMSR520                      (0x00100000uL)
+#define GPIO_PMSR5_PMSR521                      (0x00200000uL)
+#define GPIO_PMSR5_PMSR522                      (0x00400000uL)
+#define GPIO_PMSR5_PMSR523                      (0x00800000uL)
+#define GPIO_PMSR5_PMSR524                      (0x01000000uL)
+#define GPIO_PMSR5_PMSR525                      (0x02000000uL)
+#define GPIO_PMSR5_PMSR526                      (0x04000000uL)
+
+#define GPIO_PMCSR5_PMCSR50                     (0x00000001uL)
+#define GPIO_PMCSR5_PMCSR51                     (0x00000002uL)
+#define GPIO_PMCSR5_PMCSR52                     (0x00000004uL)
+#define GPIO_PMCSR5_PMCSR53                     (0x00000008uL)
+#define GPIO_PMCSR5_PMCSR54                     (0x00000010uL)
+#define GPIO_PMCSR5_PMCSR55                     (0x00000020uL)
+#define GPIO_PMCSR5_PMCSR56                     (0x00000040uL)
+#define GPIO_PMCSR5_PMCSR57                     (0x00000080uL)
+#define GPIO_PMCSR5_PMCSR58                     (0x00000100uL)
+#define GPIO_PMCSR5_PMCSR59                     (0x00000200uL)
+#define GPIO_PMCSR5_PMCSR510                    (0x00000400uL)
+#define GPIO_PMCSR5_PMCSR516                    (0x00010000uL)
+#define GPIO_PMCSR5_PMCSR517                    (0x00020000uL)
+#define GPIO_PMCSR5_PMCSR518                    (0x00040000uL)
+#define GPIO_PMCSR5_PMCSR519                    (0x00080000uL)
+#define GPIO_PMCSR5_PMCSR520                    (0x00100000uL)
+#define GPIO_PMCSR5_PMCSR521                    (0x00200000uL)
+#define GPIO_PMCSR5_PMCSR522                    (0x00400000uL)
+#define GPIO_PMCSR5_PMCSR523                    (0x00800000uL)
+#define GPIO_PMCSR5_PMCSR524                    (0x01000000uL)
+#define GPIO_PMCSR5_PMCSR525                    (0x02000000uL)
+#define GPIO_PMCSR5_PMCSR526                    (0x04000000uL)
+
+#define GPIO_PFCAE5_PFCAE50                     (0x0001u)
+#define GPIO_PFCAE5_PFCAE51                     (0x0002u)
+#define GPIO_PFCAE5_PFCAE52                     (0x0004u)
+#define GPIO_PFCAE5_PFCAE53                     (0x0008u)
+#define GPIO_PFCAE5_PFCAE54                     (0x0010u)
+#define GPIO_PFCAE5_PFCAE55                     (0x0020u)
+#define GPIO_PFCAE5_PFCAE56                     (0x0040u)
+#define GPIO_PFCAE5_PFCAE57                     (0x0080u)
+#define GPIO_PFCAE5_PFCAE58                     (0x0100u)
+#define GPIO_PFCAE5_PFCAE59                     (0x0200u)
+#define GPIO_PFCAE5_PFCAE510                    (0x0400u)
+
+#define GPIO_PIBC5_PIBC50                       (0x0001u)
+#define GPIO_PIBC5_PIBC51                       (0x0002u)
+#define GPIO_PIBC5_PIBC52                       (0x0004u)
+#define GPIO_PIBC5_PIBC53                       (0x0008u)
+#define GPIO_PIBC5_PIBC54                       (0x0010u)
+#define GPIO_PIBC5_PIBC55                       (0x0020u)
+#define GPIO_PIBC5_PIBC56                       (0x0040u)
+#define GPIO_PIBC5_PIBC57                       (0x0080u)
+#define GPIO_PIBC5_PIBC58                       (0x0100u)
+#define GPIO_PIBC5_PIBC59                       (0x0200u)
+#define GPIO_PIBC5_PIBC510                      (0x0400u)
+
+#define GPIO_PBDC5_PBDC50                       (0x0001u)
+#define GPIO_PBDC5_PBDC51                       (0x0002u)
+#define GPIO_PBDC5_PBDC52                       (0x0004u)
+#define GPIO_PBDC5_PBDC53                       (0x0008u)
+#define GPIO_PBDC5_PBDC54                       (0x0010u)
+#define GPIO_PBDC5_PBDC55                       (0x0020u)
+#define GPIO_PBDC5_PBDC56                       (0x0040u)
+#define GPIO_PBDC5_PBDC57                       (0x0080u)
+#define GPIO_PBDC5_PBDC58                       (0x0100u)
+#define GPIO_PBDC5_PBDC59                       (0x0200u)
+#define GPIO_PBDC5_PBDC510                      (0x0400u)
+
+#define GPIO_PIPC5_PIPC50                       (0x0001u)
+#define GPIO_PIPC5_PIPC51                       (0x0002u)
+#define GPIO_PIPC5_PIPC52                       (0x0004u)
+#define GPIO_PIPC5_PIPC53                       (0x0008u)
+#define GPIO_PIPC5_PIPC54                       (0x0010u)
+#define GPIO_PIPC5_PIPC55                       (0x0020u)
+#define GPIO_PIPC5_PIPC56                       (0x0040u)
+#define GPIO_PIPC5_PIPC57                       (0x0080u)
+#define GPIO_PIPC5_PIPC58                       (0x0100u)
+#define GPIO_PIPC5_PIPC59                       (0x0200u)
+#define GPIO_PIPC5_PIPC510                      (0x0400u)
+
+/* ---- P6 ---- */
+#define GPIO_P6_P60                             (0x0001u)
+#define GPIO_P6_P61                             (0x0002u)
+#define GPIO_P6_P62                             (0x0004u)
+#define GPIO_P6_P63                             (0x0008u)
+#define GPIO_P6_P64                             (0x0010u)
+#define GPIO_P6_P65                             (0x0020u)
+#define GPIO_P6_P66                             (0x0040u)
+#define GPIO_P6_P67                             (0x0080u)
+#define GPIO_P6_P68                             (0x0100u)
+#define GPIO_P6_P69                             (0x0200u)
+#define GPIO_P6_P610                            (0x0400u)
+#define GPIO_P6_P611                            (0x0800u)
+#define GPIO_P6_P612                            (0x1000u)
+#define GPIO_P6_P613                            (0x2000u)
+#define GPIO_P6_P614                            (0x4000u)
+#define GPIO_P6_P615                            (0x8000u)
+
+#define GPIO_PSR6_PSR60                         (0x00000001uL)
+#define GPIO_PSR6_PSR61                         (0x00000002uL)
+#define GPIO_PSR6_PSR62                         (0x00000004uL)
+#define GPIO_PSR6_PSR63                         (0x00000008uL)
+#define GPIO_PSR6_PSR64                         (0x00000010uL)
+#define GPIO_PSR6_PSR65                         (0x00000020uL)
+#define GPIO_PSR6_PSR66                         (0x00000040uL)
+#define GPIO_PSR6_PSR67                         (0x00000080uL)
+#define GPIO_PSR6_PSR68                         (0x00000100uL)
+#define GPIO_PSR6_PSR69                         (0x00000200uL)
+#define GPIO_PSR6_PSR610                        (0x00000400uL)
+#define GPIO_PSR6_PSR611                        (0x00000800uL)
+#define GPIO_PSR6_PSR612                        (0x00001000uL)
+#define GPIO_PSR6_PSR613                        (0x00002000uL)
+#define GPIO_PSR6_PSR614                        (0x00004000uL)
+#define GPIO_PSR6_PSR615                        (0x00008000uL)
+#define GPIO_PSR6_PSR616                        (0x00010000uL)
+#define GPIO_PSR6_PSR617                        (0x00020000uL)
+#define GPIO_PSR6_PSR618                        (0x00040000uL)
+#define GPIO_PSR6_PSR619                        (0x00080000uL)
+#define GPIO_PSR6_PSR620                        (0x00100000uL)
+#define GPIO_PSR6_PSR621                        (0x00200000uL)
+#define GPIO_PSR6_PSR622                        (0x00400000uL)
+#define GPIO_PSR6_PSR623                        (0x00800000uL)
+#define GPIO_PSR6_PSR624                        (0x01000000uL)
+#define GPIO_PSR6_PSR625                        (0x02000000uL)
+#define GPIO_PSR6_PSR626                        (0x04000000uL)
+#define GPIO_PSR6_PSR627                        (0x08000000uL)
+#define GPIO_PSR6_PSR628                        (0x10000000uL)
+#define GPIO_PSR6_PSR629                        (0x20000000uL)
+#define GPIO_PSR6_PSR630                        (0x40000000uL)
+#define GPIO_PSR6_PSR631                        (0x80000000uL)
+
+#define GPIO_PPR6_PPR60                         (0x0001u)
+#define GPIO_PPR6_PPR61                         (0x0002u)
+#define GPIO_PPR6_PPR62                         (0x0004u)
+#define GPIO_PPR6_PPR63                         (0x0008u)
+#define GPIO_PPR6_PPR64                         (0x0010u)
+#define GPIO_PPR6_PPR65                         (0x0020u)
+#define GPIO_PPR6_PPR66                         (0x0040u)
+#define GPIO_PPR6_PPR67                         (0x0080u)
+#define GPIO_PPR6_PPR68                         (0x0100u)
+#define GPIO_PPR6_PPR69                         (0x0200u)
+#define GPIO_PPR6_PPR610                        (0x0400u)
+#define GPIO_PPR6_PPR611                        (0x0800u)
+#define GPIO_PPR6_PPR612                        (0x1000u)
+#define GPIO_PPR6_PPR613                        (0x2000u)
+#define GPIO_PPR6_PPR614                        (0x4000u)
+#define GPIO_PPR6_PPR615                        (0x8000u)
+
+#define GPIO_PM6_PM60                           (0x0001u)
+#define GPIO_PM6_PM61                           (0x0002u)
+#define GPIO_PM6_PM62                           (0x0004u)
+#define GPIO_PM6_PM63                           (0x0008u)
+#define GPIO_PM6_PM64                           (0x0010u)
+#define GPIO_PM6_PM65                           (0x0020u)
+#define GPIO_PM6_PM66                           (0x0040u)
+#define GPIO_PM6_PM67                           (0x0080u)
+#define GPIO_PM6_PM68                           (0x0100u)
+#define GPIO_PM6_PM69                           (0x0200u)
+#define GPIO_PM6_PM610                          (0x0400u)
+#define GPIO_PM6_PM611                          (0x0800u)
+#define GPIO_PM6_PM612                          (0x1000u)
+#define GPIO_PM6_PM613                          (0x2000u)
+#define GPIO_PM6_PM614                          (0x4000u)
+#define GPIO_PM6_PM615                          (0x8000u)
+
+#define GPIO_PMC6_PMC60                         (0x0001u)
+#define GPIO_PMC6_PMC61                         (0x0002u)
+#define GPIO_PMC6_PMC62                         (0x0004u)
+#define GPIO_PMC6_PMC63                         (0x0008u)
+#define GPIO_PMC6_PMC64                         (0x0010u)
+#define GPIO_PMC6_PMC65                         (0x0020u)
+#define GPIO_PMC6_PMC66                         (0x0040u)
+#define GPIO_PMC6_PMC67                         (0x0080u)
+#define GPIO_PMC6_PMC68                         (0x0100u)
+#define GPIO_PMC6_PMC69                         (0x0200u)
+#define GPIO_PMC6_PMC610                        (0x0400u)
+#define GPIO_PMC6_PMC611                        (0x0800u)
+#define GPIO_PMC6_PMC612                        (0x1000u)
+#define GPIO_PMC6_PMC613                        (0x2000u)
+#define GPIO_PMC6_PMC614                        (0x4000u)
+#define GPIO_PMC6_PMC615                        (0x8000u)
+
+#define GPIO_PFC6_PFC60                         (0x0001u)
+#define GPIO_PFC6_PFC61                         (0x0002u)
+#define GPIO_PFC6_PFC62                         (0x0004u)
+#define GPIO_PFC6_PFC63                         (0x0008u)
+#define GPIO_PFC6_PFC64                         (0x0010u)
+#define GPIO_PFC6_PFC65                         (0x0020u)
+#define GPIO_PFC6_PFC66                         (0x0040u)
+#define GPIO_PFC6_PFC67                         (0x0080u)
+#define GPIO_PFC6_PFC68                         (0x0100u)
+#define GPIO_PFC6_PFC69                         (0x0200u)
+#define GPIO_PFC6_PFC610                        (0x0400u)
+#define GPIO_PFC6_PFC611                        (0x0800u)
+#define GPIO_PFC6_PFC612                        (0x1000u)
+#define GPIO_PFC6_PFC613                        (0x2000u)
+#define GPIO_PFC6_PFC614                        (0x4000u)
+#define GPIO_PFC6_PFC615                        (0x8000u)
+
+#define GPIO_PFCE6_PFCE60                       (0x0001u)
+#define GPIO_PFCE6_PFCE61                       (0x0002u)
+#define GPIO_PFCE6_PFCE62                       (0x0004u)
+#define GPIO_PFCE6_PFCE63                       (0x0008u)
+#define GPIO_PFCE6_PFCE64                       (0x0010u)
+#define GPIO_PFCE6_PFCE65                       (0x0020u)
+#define GPIO_PFCE6_PFCE66                       (0x0040u)
+#define GPIO_PFCE6_PFCE67                       (0x0080u)
+#define GPIO_PFCE6_PFCE68                       (0x0100u)
+#define GPIO_PFCE6_PFCE69                       (0x0200u)
+#define GPIO_PFCE6_PFCE610                      (0x0400u)
+#define GPIO_PFCE6_PFCE611                      (0x0800u)
+#define GPIO_PFCE6_PFCE612                      (0x1000u)
+#define GPIO_PFCE6_PFCE613                      (0x2000u)
+#define GPIO_PFCE6_PFCE614                      (0x4000u)
+#define GPIO_PFCE6_PFCE615                      (0x8000u)
+
+#define GPIO_PNOT6_PNOT60                       (0x0001u)
+#define GPIO_PNOT6_PNOT61                       (0x0002u)
+#define GPIO_PNOT6_PNOT62                       (0x0004u)
+#define GPIO_PNOT6_PNOT63                       (0x0008u)
+#define GPIO_PNOT6_PNOT64                       (0x0010u)
+#define GPIO_PNOT6_PNOT65                       (0x0020u)
+#define GPIO_PNOT6_PNOT66                       (0x0040u)
+#define GPIO_PNOT6_PNOT67                       (0x0080u)
+#define GPIO_PNOT6_PNOT68                       (0x0100u)
+#define GPIO_PNOT6_PNOT69                       (0x0200u)
+#define GPIO_PNOT6_PNOT610                      (0x0400u)
+#define GPIO_PNOT6_PNOT611                      (0x0800u)
+#define GPIO_PNOT6_PNOT612                      (0x1000u)
+#define GPIO_PNOT6_PNOT613                      (0x2000u)
+#define GPIO_PNOT6_PNOT614                      (0x4000u)
+#define GPIO_PNOT6_PNOT615                      (0x8000u)
+
+#define GPIO_PMSR6_PMSR60                       (0x00000001uL)
+#define GPIO_PMSR6_PMSR61                       (0x00000002uL)
+#define GPIO_PMSR6_PMSR62                       (0x00000004uL)
+#define GPIO_PMSR6_PMSR63                       (0x00000008uL)
+#define GPIO_PMSR6_PMSR64                       (0x00000010uL)
+#define GPIO_PMSR6_PMSR65                       (0x00000020uL)
+#define GPIO_PMSR6_PMSR66                       (0x00000040uL)
+#define GPIO_PMSR6_PMSR67                       (0x00000080uL)
+#define GPIO_PMSR6_PMSR68                       (0x00000100uL)
+#define GPIO_PMSR6_PMSR69                       (0x00000200uL)
+#define GPIO_PMSR6_PMSR610                      (0x00000400uL)
+#define GPIO_PMSR6_PMSR611                      (0x00000800uL)
+#define GPIO_PMSR6_PMSR612                      (0x00001000uL)
+#define GPIO_PMSR6_PMSR613                      (0x00002000uL)
+#define GPIO_PMSR6_PMSR614                      (0x00004000uL)
+#define GPIO_PMSR6_PMSR615                      (0x00008000uL)
+#define GPIO_PMSR6_PMSR616                      (0x00010000uL)
+#define GPIO_PMSR6_PMSR617                      (0x00020000uL)
+#define GPIO_PMSR6_PMSR618                      (0x00040000uL)
+#define GPIO_PMSR6_PMSR619                      (0x00080000uL)
+#define GPIO_PMSR6_PMSR620                      (0x00100000uL)
+#define GPIO_PMSR6_PMSR621                      (0x00200000uL)
+#define GPIO_PMSR6_PMSR622                      (0x00400000uL)
+#define GPIO_PMSR6_PMSR623                      (0x00800000uL)
+#define GPIO_PMSR6_PMSR624                      (0x01000000uL)
+#define GPIO_PMSR6_PMSR625                      (0x02000000uL)
+#define GPIO_PMSR6_PMSR626                      (0x04000000uL)
+#define GPIO_PMSR6_PMSR627                      (0x08000000uL)
+#define GPIO_PMSR6_PMSR628                      (0x10000000uL)
+#define GPIO_PMSR6_PMSR629                      (0x20000000uL)
+#define GPIO_PMSR6_PMSR630                      (0x40000000uL)
+#define GPIO_PMSR6_PMSR631                      (0x80000000uL)
+
+#define GPIO_PMCSR6_PMCSR60                     (0x00000001uL)
+#define GPIO_PMCSR6_PMCSR61                     (0x00000002uL)
+#define GPIO_PMCSR6_PMCSR62                     (0x00000004uL)
+#define GPIO_PMCSR6_PMCSR63                     (0x00000008uL)
+#define GPIO_PMCSR6_PMCSR64                     (0x00000010uL)
+#define GPIO_PMCSR6_PMCSR65                     (0x00000020uL)
+#define GPIO_PMCSR6_PMCSR66                     (0x00000040uL)
+#define GPIO_PMCSR6_PMCSR67                     (0x00000080uL)
+#define GPIO_PMCSR6_PMCSR68                     (0x00000100uL)
+#define GPIO_PMCSR6_PMCSR69                     (0x00000200uL)
+#define GPIO_PMCSR6_PMCSR610                    (0x00000400uL)
+#define GPIO_PMCSR6_PMCSR611                    (0x00000800uL)
+#define GPIO_PMCSR6_PMCSR612                    (0x00001000uL)
+#define GPIO_PMCSR6_PMCSR613                    (0x00002000uL)
+#define GPIO_PMCSR6_PMCSR614                    (0x00004000uL)
+#define GPIO_PMCSR6_PMCSR615                    (0x00008000uL)
+#define GPIO_PMCSR6_PMCSR616                    (0x00010000uL)
+#define GPIO_PMCSR6_PMCSR617                    (0x00020000uL)
+#define GPIO_PMCSR6_PMCSR618                    (0x00040000uL)
+#define GPIO_PMCSR6_PMCSR619                    (0x00080000uL)
+#define GPIO_PMCSR6_PMCSR620                    (0x00100000uL)
+#define GPIO_PMCSR6_PMCSR621                    (0x00200000uL)
+#define GPIO_PMCSR6_PMCSR622                    (0x00400000uL)
+#define GPIO_PMCSR6_PMCSR623                    (0x00800000uL)
+#define GPIO_PMCSR6_PMCSR624                    (0x01000000uL)
+#define GPIO_PMCSR6_PMCSR625                    (0x02000000uL)
+#define GPIO_PMCSR6_PMCSR626                    (0x04000000uL)
+#define GPIO_PMCSR6_PMCSR627                    (0x08000000uL)
+#define GPIO_PMCSR6_PMCSR628                    (0x10000000uL)
+#define GPIO_PMCSR6_PMCSR629                    (0x20000000uL)
+#define GPIO_PMCSR6_PMCSR630                    (0x40000000uL)
+#define GPIO_PMCSR6_PMCSR631                    (0x80000000uL)
+
+#define GPIO_PFCAE6_PFCAE60                     (0x0001u)
+#define GPIO_PFCAE6_PFCAE61                     (0x0002u)
+#define GPIO_PFCAE6_PFCAE62                     (0x0004u)
+#define GPIO_PFCAE6_PFCAE63                     (0x0008u)
+#define GPIO_PFCAE6_PFCAE64                     (0x0010u)
+#define GPIO_PFCAE6_PFCAE65                     (0x0020u)
+#define GPIO_PFCAE6_PFCAE66                     (0x0040u)
+#define GPIO_PFCAE6_PFCAE67                     (0x0080u)
+#define GPIO_PFCAE6_PFCAE68                     (0x0100u)
+#define GPIO_PFCAE6_PFCAE69                     (0x0200u)
+#define GPIO_PFCAE6_PFCAE610                    (0x0400u)
+#define GPIO_PFCAE6_PFCAE611                    (0x0800u)
+#define GPIO_PFCAE6_PFCAE612                    (0x1000u)
+#define GPIO_PFCAE6_PFCAE613                    (0x2000u)
+#define GPIO_PFCAE6_PFCAE614                    (0x4000u)
+#define GPIO_PFCAE6_PFCAE615                    (0x8000u)
+
+#define GPIO_PIBC6_PIBC60                       (0x0001u)
+#define GPIO_PIBC6_PIBC61                       (0x0002u)
+#define GPIO_PIBC6_PIBC62                       (0x0004u)
+#define GPIO_PIBC6_PIBC63                       (0x0008u)
+#define GPIO_PIBC6_PIBC64                       (0x0010u)
+#define GPIO_PIBC6_PIBC65                       (0x0020u)
+#define GPIO_PIBC6_PIBC66                       (0x0040u)
+#define GPIO_PIBC6_PIBC67                       (0x0080u)
+#define GPIO_PIBC6_PIBC68                       (0x0100u)
+#define GPIO_PIBC6_PIBC69                       (0x0200u)
+#define GPIO_PIBC6_PIBC610                      (0x0400u)
+#define GPIO_PIBC6_PIBC611                      (0x0800u)
+#define GPIO_PIBC6_PIBC612                      (0x1000u)
+#define GPIO_PIBC6_PIBC613                      (0x2000u)
+#define GPIO_PIBC6_PIBC614                      (0x4000u)
+#define GPIO_PIBC6_PIBC615                      (0x8000u)
+
+#define GPIO_PBDC6_PBDC60                       (0x0001u)
+#define GPIO_PBDC6_PBDC61                       (0x0002u)
+#define GPIO_PBDC6_PBDC62                       (0x0004u)
+#define GPIO_PBDC6_PBDC63                       (0x0008u)
+#define GPIO_PBDC6_PBDC64                       (0x0010u)
+#define GPIO_PBDC6_PBDC65                       (0x0020u)
+#define GPIO_PBDC6_PBDC66                       (0x0040u)
+#define GPIO_PBDC6_PBDC67                       (0x0080u)
+#define GPIO_PBDC6_PBDC68                       (0x0100u)
+#define GPIO_PBDC6_PBDC69                       (0x0200u)
+#define GPIO_PBDC6_PBDC610                      (0x0400u)
+#define GPIO_PBDC6_PBDC611                      (0x0800u)
+#define GPIO_PBDC6_PBDC612                      (0x1000u)
+#define GPIO_PBDC6_PBDC613                      (0x2000u)
+#define GPIO_PBDC6_PBDC614                      (0x4000u)
+#define GPIO_PBDC6_PBDC615                      (0x8000u)
+
+#define GPIO_PIPC6_PIPC60                       (0x0001u)
+#define GPIO_PIPC6_PIPC61                       (0x0002u)
+#define GPIO_PIPC6_PIPC62                       (0x0004u)
+#define GPIO_PIPC6_PIPC63                       (0x0008u)
+#define GPIO_PIPC6_PIPC64                       (0x0010u)
+#define GPIO_PIPC6_PIPC65                       (0x0020u)
+#define GPIO_PIPC6_PIPC66                       (0x0040u)
+#define GPIO_PIPC6_PIPC67                       (0x0080u)
+#define GPIO_PIPC6_PIPC68                       (0x0100u)
+#define GPIO_PIPC6_PIPC69                       (0x0200u)
+#define GPIO_PIPC6_PIPC610                      (0x0400u)
+#define GPIO_PIPC6_PIPC611                      (0x0800u)
+#define GPIO_PIPC6_PIPC612                      (0x1000u)
+#define GPIO_PIPC6_PIPC613                      (0x2000u)
+#define GPIO_PIPC6_PIPC614                      (0x4000u)
+#define GPIO_PIPC6_PIPC615                      (0x8000u)
+
+/* ---- P7 ---- */
+#define GPIO_P7_P70                             (0x0001u)
+#define GPIO_P7_P71                             (0x0002u)
+#define GPIO_P7_P72                             (0x0004u)
+#define GPIO_P7_P73                             (0x0008u)
+#define GPIO_P7_P74                             (0x0010u)
+#define GPIO_P7_P75                             (0x0020u)
+#define GPIO_P7_P76                             (0x0040u)
+#define GPIO_P7_P77                             (0x0080u)
+#define GPIO_P7_P78                             (0x0100u)
+#define GPIO_P7_P79                             (0x0200u)
+#define GPIO_P7_P710                            (0x0400u)
+#define GPIO_P7_P711                            (0x0800u)
+#define GPIO_P7_P712                            (0x1000u)
+#define GPIO_P7_P713                            (0x2000u)
+#define GPIO_P7_P714                            (0x4000u)
+#define GPIO_P7_P715                            (0x8000u)
+
+#define GPIO_PSR7_PSR70                         (0x00000001uL)
+#define GPIO_PSR7_PSR71                         (0x00000002uL)
+#define GPIO_PSR7_PSR72                         (0x00000004uL)
+#define GPIO_PSR7_PSR73                         (0x00000008uL)
+#define GPIO_PSR7_PSR74                         (0x00000010uL)
+#define GPIO_PSR7_PSR75                         (0x00000020uL)
+#define GPIO_PSR7_PSR76                         (0x00000040uL)
+#define GPIO_PSR7_PSR77                         (0x00000080uL)
+#define GPIO_PSR7_PSR78                         (0x00000100uL)
+#define GPIO_PSR7_PSR79                         (0x00000200uL)
+#define GPIO_PSR7_PSR710                        (0x00000400uL)
+#define GPIO_PSR7_PSR711                        (0x00000800uL)
+#define GPIO_PSR7_PSR712                        (0x00001000uL)
+#define GPIO_PSR7_PSR713                        (0x00002000uL)
+#define GPIO_PSR7_PSR714                        (0x00004000uL)
+#define GPIO_PSR7_PSR715                        (0x00008000uL)
+#define GPIO_PSR7_PSR716                        (0x00010000uL)
+#define GPIO_PSR7_PSR717                        (0x00020000uL)
+#define GPIO_PSR7_PSR718                        (0x00040000uL)
+#define GPIO_PSR7_PSR719                        (0x00080000uL)
+#define GPIO_PSR7_PSR720                        (0x00100000uL)
+#define GPIO_PSR7_PSR721                        (0x00200000uL)
+#define GPIO_PSR7_PSR722                        (0x00400000uL)
+#define GPIO_PSR7_PSR723                        (0x00800000uL)
+#define GPIO_PSR7_PSR724                        (0x01000000uL)
+#define GPIO_PSR7_PSR725                        (0x02000000uL)
+#define GPIO_PSR7_PSR726                        (0x04000000uL)
+#define GPIO_PSR7_PSR727                        (0x08000000uL)
+#define GPIO_PSR7_PSR728                        (0x10000000uL)
+#define GPIO_PSR7_PSR729                        (0x20000000uL)
+#define GPIO_PSR7_PSR730                        (0x40000000uL)
+#define GPIO_PSR7_PSR731                        (0x80000000uL)
+
+#define GPIO_PPR7_PPR70                         (0x0001u)
+#define GPIO_PPR7_PPR71                         (0x0002u)
+#define GPIO_PPR7_PPR72                         (0x0004u)
+#define GPIO_PPR7_PPR73                         (0x0008u)
+#define GPIO_PPR7_PPR74                         (0x0010u)
+#define GPIO_PPR7_PPR75                         (0x0020u)
+#define GPIO_PPR7_PPR76                         (0x0040u)
+#define GPIO_PPR7_PPR77                         (0x0080u)
+#define GPIO_PPR7_PPR78                         (0x0100u)
+#define GPIO_PPR7_PPR79                         (0x0200u)
+#define GPIO_PPR7_PPR710                        (0x0400u)
+#define GPIO_PPR7_PPR711                        (0x0800u)
+#define GPIO_PPR7_PPR712                        (0x1000u)
+#define GPIO_PPR7_PPR713                        (0x2000u)
+#define GPIO_PPR7_PPR714                        (0x4000u)
+#define GPIO_PPR7_PPR715                        (0x8000u)
+
+#define GPIO_PM7_PM70                           (0x0001u)
+#define GPIO_PM7_PM71                           (0x0002u)
+#define GPIO_PM7_PM72                           (0x0004u)
+#define GPIO_PM7_PM73                           (0x0008u)
+#define GPIO_PM7_PM74                           (0x0010u)
+#define GPIO_PM7_PM75                           (0x0020u)
+#define GPIO_PM7_PM76                           (0x0040u)
+#define GPIO_PM7_PM77                           (0x0080u)
+#define GPIO_PM7_PM78                           (0x0100u)
+#define GPIO_PM7_PM79                           (0x0200u)
+#define GPIO_PM7_PM710                          (0x0400u)
+#define GPIO_PM7_PM711                          (0x0800u)
+#define GPIO_PM7_PM712                          (0x1000u)
+#define GPIO_PM7_PM713                          (0x2000u)
+#define GPIO_PM7_PM714                          (0x4000u)
+#define GPIO_PM7_PM715                          (0x8000u)
+
+#define GPIO_PMC7_PMC70                         (0x0001u)
+#define GPIO_PMC7_PMC71                         (0x0002u)
+#define GPIO_PMC7_PMC72                         (0x0004u)
+#define GPIO_PMC7_PMC73                         (0x0008u)
+#define GPIO_PMC7_PMC74                         (0x0010u)
+#define GPIO_PMC7_PMC75                         (0x0020u)
+#define GPIO_PMC7_PMC76                         (0x0040u)
+#define GPIO_PMC7_PMC77                         (0x0080u)
+#define GPIO_PMC7_PMC78                         (0x0100u)
+#define GPIO_PMC7_PMC79                         (0x0200u)
+#define GPIO_PMC7_PMC710                        (0x0400u)
+#define GPIO_PMC7_PMC711                        (0x0800u)
+#define GPIO_PMC7_PMC712                        (0x1000u)
+#define GPIO_PMC7_PMC713                        (0x2000u)
+#define GPIO_PMC7_PMC714                        (0x4000u)
+#define GPIO_PMC7_PMC715                        (0x8000u)
+
+#define GPIO_PFC7_PFC70                         (0x0001u)
+#define GPIO_PFC7_PFC71                         (0x0002u)
+#define GPIO_PFC7_PFC72                         (0x0004u)
+#define GPIO_PFC7_PFC73                         (0x0008u)
+#define GPIO_PFC7_PFC74                         (0x0010u)
+#define GPIO_PFC7_PFC75                         (0x0020u)
+#define GPIO_PFC7_PFC76                         (0x0040u)
+#define GPIO_PFC7_PFC77                         (0x0080u)
+#define GPIO_PFC7_PFC78                         (0x0100u)
+#define GPIO_PFC7_PFC79                         (0x0200u)
+#define GPIO_PFC7_PFC710                        (0x0400u)
+#define GPIO_PFC7_PFC711                        (0x0800u)
+#define GPIO_PFC7_PFC712                        (0x1000u)
+#define GPIO_PFC7_PFC713                        (0x2000u)
+#define GPIO_PFC7_PFC714                        (0x4000u)
+#define GPIO_PFC7_PFC715                        (0x8000u)
+
+#define GPIO_PFCE7_PFCE70                       (0x0001u)
+#define GPIO_PFCE7_PFCE71                       (0x0002u)
+#define GPIO_PFCE7_PFCE72                       (0x0004u)
+#define GPIO_PFCE7_PFCE73                       (0x0008u)
+#define GPIO_PFCE7_PFCE74                       (0x0010u)
+#define GPIO_PFCE7_PFCE75                       (0x0020u)
+#define GPIO_PFCE7_PFCE76                       (0x0040u)
+#define GPIO_PFCE7_PFCE77                       (0x0080u)
+#define GPIO_PFCE7_PFCE78                       (0x0100u)
+#define GPIO_PFCE7_PFCE79                       (0x0200u)
+#define GPIO_PFCE7_PFCE710                      (0x0400u)
+#define GPIO_PFCE7_PFCE711                      (0x0800u)
+#define GPIO_PFCE7_PFCE712                      (0x1000u)
+#define GPIO_PFCE7_PFCE713                      (0x2000u)
+#define GPIO_PFCE7_PFCE714                      (0x4000u)
+#define GPIO_PFCE7_PFCE715                      (0x8000u)
+
+#define GPIO_PNOT7_PNOT70                       (0x0001u)
+#define GPIO_PNOT7_PNOT71                       (0x0002u)
+#define GPIO_PNOT7_PNOT72                       (0x0004u)
+#define GPIO_PNOT7_PNOT73                       (0x0008u)
+#define GPIO_PNOT7_PNOT74                       (0x0010u)
+#define GPIO_PNOT7_PNOT75                       (0x0020u)
+#define GPIO_PNOT7_PNOT76                       (0x0040u)
+#define GPIO_PNOT7_PNOT77                       (0x0080u)
+#define GPIO_PNOT7_PNOT78                       (0x0100u)
+#define GPIO_PNOT7_PNOT79                       (0x0200u)
+#define GPIO_PNOT7_PNOT710                      (0x0400u)
+#define GPIO_PNOT7_PNOT711                      (0x0800u)
+#define GPIO_PNOT7_PNOT712                      (0x1000u)
+#define GPIO_PNOT7_PNOT713                      (0x2000u)
+#define GPIO_PNOT7_PNOT714                      (0x4000u)
+#define GPIO_PNOT7_PNOT715                      (0x8000u)
+
+#define GPIO_PMSR7_PMSR70                       (0x00000001uL)
+#define GPIO_PMSR7_PMSR71                       (0x00000002uL)
+#define GPIO_PMSR7_PMSR72                       (0x00000004uL)
+#define GPIO_PMSR7_PMSR73                       (0x00000008uL)
+#define GPIO_PMSR7_PMSR74                       (0x00000010uL)
+#define GPIO_PMSR7_PMSR75                       (0x00000020uL)
+#define GPIO_PMSR7_PMSR76                       (0x00000040uL)
+#define GPIO_PMSR7_PMSR77                       (0x00000080uL)
+#define GPIO_PMSR7_PMSR78                       (0x00000100uL)
+#define GPIO_PMSR7_PMSR79                       (0x00000200uL)
+#define GPIO_PMSR7_PMSR710                      (0x00000400uL)
+#define GPIO_PMSR7_PMSR711                      (0x00000800uL)
+#define GPIO_PMSR7_PMSR712                      (0x00001000uL)
+#define GPIO_PMSR7_PMSR713                      (0x00002000uL)
+#define GPIO_PMSR7_PMSR714                      (0x00004000uL)
+#define GPIO_PMSR7_PMSR715                      (0x00008000uL)
+#define GPIO_PMSR7_PMSR716                      (0x00010000uL)
+#define GPIO_PMSR7_PMSR717                      (0x00020000uL)
+#define GPIO_PMSR7_PMSR718                      (0x00040000uL)
+#define GPIO_PMSR7_PMSR719                      (0x00080000uL)
+#define GPIO_PMSR7_PMSR720                      (0x00100000uL)
+#define GPIO_PMSR7_PMSR721                      (0x00200000uL)
+#define GPIO_PMSR7_PMSR722                      (0x00400000uL)
+#define GPIO_PMSR7_PMSR723                      (0x00800000uL)
+#define GPIO_PMSR7_PMSR724                      (0x01000000uL)
+#define GPIO_PMSR7_PMSR725                      (0x02000000uL)
+#define GPIO_PMSR7_PMSR726                      (0x04000000uL)
+#define GPIO_PMSR7_PMSR727                      (0x08000000uL)
+#define GPIO_PMSR7_PMSR728                      (0x10000000uL)
+#define GPIO_PMSR7_PMSR729                      (0x20000000uL)
+#define GPIO_PMSR7_PMSR730                      (0x40000000uL)
+#define GPIO_PMSR7_PMSR731                      (0x80000000uL)
+
+#define GPIO_PMCSR7_PMCSR70                     (0x00000001uL)
+#define GPIO_PMCSR7_PMCSR71                     (0x00000002uL)
+#define GPIO_PMCSR7_PMCSR72                     (0x00000004uL)
+#define GPIO_PMCSR7_PMCSR73                     (0x00000008uL)
+#define GPIO_PMCSR7_PMCSR74                     (0x00000010uL)
+#define GPIO_PMCSR7_PMCSR75                     (0x00000020uL)
+#define GPIO_PMCSR7_PMCSR76                     (0x00000040uL)
+#define GPIO_PMCSR7_PMCSR77                     (0x00000080uL)
+#define GPIO_PMCSR7_PMCSR78                     (0x00000100uL)
+#define GPIO_PMCSR7_PMCSR79                     (0x00000200uL)
+#define GPIO_PMCSR7_PMCSR710                    (0x00000400uL)
+#define GPIO_PMCSR7_PMCSR711                    (0x00000800uL)
+#define GPIO_PMCSR7_PMCSR712                    (0x00001000uL)
+#define GPIO_PMCSR7_PMCSR713                    (0x00002000uL)
+#define GPIO_PMCSR7_PMCSR714                    (0x00004000uL)
+#define GPIO_PMCSR7_PMCSR715                    (0x00008000uL)
+#define GPIO_PMCSR7_PMCSR716                    (0x00010000uL)
+#define GPIO_PMCSR7_PMCSR717                    (0x00020000uL)
+#define GPIO_PMCSR7_PMCSR718                    (0x00040000uL)
+#define GPIO_PMCSR7_PMCSR719                    (0x00080000uL)
+#define GPIO_PMCSR7_PMCSR720                    (0x00100000uL)
+#define GPIO_PMCSR7_PMCSR721                    (0x00200000uL)
+#define GPIO_PMCSR7_PMCSR722                    (0x00400000uL)
+#define GPIO_PMCSR7_PMCSR723                    (0x00800000uL)
+#define GPIO_PMCSR7_PMCSR724                    (0x01000000uL)
+#define GPIO_PMCSR7_PMCSR725                    (0x02000000uL)
+#define GPIO_PMCSR7_PMCSR726                    (0x04000000uL)
+#define GPIO_PMCSR7_PMCSR727                    (0x08000000uL)
+#define GPIO_PMCSR7_PMCSR728                    (0x10000000uL)
+#define GPIO_PMCSR7_PMCSR729                    (0x20000000uL)
+#define GPIO_PMCSR7_PMCSR730                    (0x40000000uL)
+#define GPIO_PMCSR7_PMCSR731                    (0x80000000uL)
+
+#define GPIO_PFCAE7_PFCAE70                     (0x0001u)
+#define GPIO_PFCAE7_PFCAE71                     (0x0002u)
+#define GPIO_PFCAE7_PFCAE72                     (0x0004u)
+#define GPIO_PFCAE7_PFCAE73                     (0x0008u)
+#define GPIO_PFCAE7_PFCAE74                     (0x0010u)
+#define GPIO_PFCAE7_PFCAE75                     (0x0020u)
+#define GPIO_PFCAE7_PFCAE76                     (0x0040u)
+#define GPIO_PFCAE7_PFCAE77                     (0x0080u)
+#define GPIO_PFCAE7_PFCAE78                     (0x0100u)
+#define GPIO_PFCAE7_PFCAE79                     (0x0200u)
+#define GPIO_PFCAE7_PFCAE710                    (0x0400u)
+#define GPIO_PFCAE7_PFCAE711                    (0x0800u)
+#define GPIO_PFCAE7_PFCAE712                    (0x1000u)
+#define GPIO_PFCAE7_PFCAE713                    (0x2000u)
+#define GPIO_PFCAE7_PFCAE714                    (0x4000u)
+#define GPIO_PFCAE7_PFCAE715                    (0x8000u)
+
+#define GPIO_PIBC7_PIBC70                       (0x0001u)
+#define GPIO_PIBC7_PIBC71                       (0x0002u)
+#define GPIO_PIBC7_PIBC72                       (0x0004u)
+#define GPIO_PIBC7_PIBC73                       (0x0008u)
+#define GPIO_PIBC7_PIBC74                       (0x0010u)
+#define GPIO_PIBC7_PIBC75                       (0x0020u)
+#define GPIO_PIBC7_PIBC76                       (0x0040u)
+#define GPIO_PIBC7_PIBC77                       (0x0080u)
+#define GPIO_PIBC7_PIBC78                       (0x0100u)
+#define GPIO_PIBC7_PIBC79                       (0x0200u)
+#define GPIO_PIBC7_PIBC710                      (0x0400u)
+#define GPIO_PIBC7_PIBC711                      (0x0800u)
+#define GPIO_PIBC7_PIBC712                      (0x1000u)
+#define GPIO_PIBC7_PIBC713                      (0x2000u)
+#define GPIO_PIBC7_PIBC714                      (0x4000u)
+#define GPIO_PIBC7_PIBC715                      (0x8000u)
+
+#define GPIO_PBDC7_PBDC70                       (0x0001u)
+#define GPIO_PBDC7_PBDC71                       (0x0002u)
+#define GPIO_PBDC7_PBDC72                       (0x0004u)
+#define GPIO_PBDC7_PBDC73                       (0x0008u)
+#define GPIO_PBDC7_PBDC74                       (0x0010u)
+#define GPIO_PBDC7_PBDC75                       (0x0020u)
+#define GPIO_PBDC7_PBDC76                       (0x0040u)
+#define GPIO_PBDC7_PBDC77                       (0x0080u)
+#define GPIO_PBDC7_PBDC78                       (0x0100u)
+#define GPIO_PBDC7_PBDC79                       (0x0200u)
+#define GPIO_PBDC7_PBDC710                      (0x0400u)
+#define GPIO_PBDC7_PBDC711                      (0x0800u)
+#define GPIO_PBDC7_PBDC712                      (0x1000u)
+#define GPIO_PBDC7_PBDC713                      (0x2000u)
+#define GPIO_PBDC7_PBDC714                      (0x4000u)
+#define GPIO_PBDC7_PBDC715                      (0x8000u)
+
+#define GPIO_PIPC7_PIPC70                       (0x0001u)
+#define GPIO_PIPC7_PIPC71                       (0x0002u)
+#define GPIO_PIPC7_PIPC72                       (0x0004u)
+#define GPIO_PIPC7_PIPC73                       (0x0008u)
+#define GPIO_PIPC7_PIPC74                       (0x0010u)
+#define GPIO_PIPC7_PIPC75                       (0x0020u)
+#define GPIO_PIPC7_PIPC76                       (0x0040u)
+#define GPIO_PIPC7_PIPC77                       (0x0080u)
+#define GPIO_PIPC7_PIPC78                       (0x0100u)
+#define GPIO_PIPC7_PIPC79                       (0x0200u)
+#define GPIO_PIPC7_PIPC710                      (0x0400u)
+#define GPIO_PIPC7_PIPC711                      (0x0800u)
+#define GPIO_PIPC7_PIPC712                      (0x1000u)
+#define GPIO_PIPC7_PIPC713                      (0x2000u)
+#define GPIO_PIPC7_PIPC714                      (0x4000u)
+#define GPIO_PIPC7_PIPC715                      (0x8000u)
+
+/* ---- P8 ---- */
+#define GPIO_P8_P80                             (0x0001u)
+#define GPIO_P8_P81                             (0x0002u)
+#define GPIO_P8_P82                             (0x0004u)
+#define GPIO_P8_P83                             (0x0008u)
+#define GPIO_P8_P84                             (0x0010u)
+#define GPIO_P8_P85                             (0x0020u)
+#define GPIO_P8_P86                             (0x0040u)
+#define GPIO_P8_P87                             (0x0080u)
+#define GPIO_P8_P88                             (0x0100u)
+#define GPIO_P8_P89                             (0x0200u)
+#define GPIO_P8_P810                            (0x0400u)
+#define GPIO_P8_P811                            (0x0800u)
+#define GPIO_P8_P812                            (0x1000u)
+#define GPIO_P8_P813                            (0x2000u)
+#define GPIO_P8_P814                            (0x4000u)
+#define GPIO_P8_P815                            (0x8000u)
+
+#define GPIO_PSR8_PSR80                         (0x00000001uL)
+#define GPIO_PSR8_PSR81                         (0x00000002uL)
+#define GPIO_PSR8_PSR82                         (0x00000004uL)
+#define GPIO_PSR8_PSR83                         (0x00000008uL)
+#define GPIO_PSR8_PSR84                         (0x00000010uL)
+#define GPIO_PSR8_PSR85                         (0x00000020uL)
+#define GPIO_PSR8_PSR86                         (0x00000040uL)
+#define GPIO_PSR8_PSR87                         (0x00000080uL)
+#define GPIO_PSR8_PSR88                         (0x00000100uL)
+#define GPIO_PSR8_PSR89                         (0x00000200uL)
+#define GPIO_PSR8_PSR810                        (0x00000400uL)
+#define GPIO_PSR8_PSR811                        (0x00000800uL)
+#define GPIO_PSR8_PSR812                        (0x00001000uL)
+#define GPIO_PSR8_PSR813                        (0x00002000uL)
+#define GPIO_PSR8_PSR814                        (0x00004000uL)
+#define GPIO_PSR8_PSR815                        (0x00008000uL)
+#define GPIO_PSR8_PSR816                        (0x00010000uL)
+#define GPIO_PSR8_PSR817                        (0x00020000uL)
+#define GPIO_PSR8_PSR818                        (0x00040000uL)
+#define GPIO_PSR8_PSR819                        (0x00080000uL)
+#define GPIO_PSR8_PSR820                        (0x00100000uL)
+#define GPIO_PSR8_PSR821                        (0x00200000uL)
+#define GPIO_PSR8_PSR822                        (0x00400000uL)
+#define GPIO_PSR8_PSR823                        (0x00800000uL)
+#define GPIO_PSR8_PSR824                        (0x01000000uL)
+#define GPIO_PSR8_PSR825                        (0x02000000uL)
+#define GPIO_PSR8_PSR826                        (0x04000000uL)
+#define GPIO_PSR8_PSR827                        (0x08000000uL)
+#define GPIO_PSR8_PSR828                        (0x10000000uL)
+#define GPIO_PSR8_PSR829                        (0x20000000uL)
+#define GPIO_PSR8_PSR830                        (0x40000000uL)
+#define GPIO_PSR8_PSR831                        (0x80000000uL)
+
+#define GPIO_PPR8_PPR80                         (0x0001u)
+#define GPIO_PPR8_PPR81                         (0x0002u)
+#define GPIO_PPR8_PPR82                         (0x0004u)
+#define GPIO_PPR8_PPR83                         (0x0008u)
+#define GPIO_PPR8_PPR84                         (0x0010u)
+#define GPIO_PPR8_PPR85                         (0x0020u)
+#define GPIO_PPR8_PPR86                         (0x0040u)
+#define GPIO_PPR8_PPR87                         (0x0080u)
+#define GPIO_PPR8_PPR88                         (0x0100u)
+#define GPIO_PPR8_PPR89                         (0x0200u)
+#define GPIO_PPR8_PPR810                        (0x0400u)
+#define GPIO_PPR8_PPR811                        (0x0800u)
+#define GPIO_PPR8_PPR812                        (0x1000u)
+#define GPIO_PPR8_PPR813                        (0x2000u)
+#define GPIO_PPR8_PPR814                        (0x4000u)
+#define GPIO_PPR8_PPR815                        (0x8000u)
+
+#define GPIO_PM8_PM80                           (0x0001u)
+#define GPIO_PM8_PM81                           (0x0002u)
+#define GPIO_PM8_PM82                           (0x0004u)
+#define GPIO_PM8_PM83                           (0x0008u)
+#define GPIO_PM8_PM84                           (0x0010u)
+#define GPIO_PM8_PM85                           (0x0020u)
+#define GPIO_PM8_PM86                           (0x0040u)
+#define GPIO_PM8_PM87                           (0x0080u)
+#define GPIO_PM8_PM88                           (0x0100u)
+#define GPIO_PM8_PM89                           (0x0200u)
+#define GPIO_PM8_PM810                          (0x0400u)
+#define GPIO_PM8_PM811                          (0x0800u)
+#define GPIO_PM8_PM812                          (0x1000u)
+#define GPIO_PM8_PM813                          (0x2000u)
+#define GPIO_PM8_PM814                          (0x4000u)
+#define GPIO_PM8_PM815                          (0x8000u)
+
+#define GPIO_PMC8_PMC80                         (0x0001u)
+#define GPIO_PMC8_PMC81                         (0x0002u)
+#define GPIO_PMC8_PMC82                         (0x0004u)
+#define GPIO_PMC8_PMC83                         (0x0008u)
+#define GPIO_PMC8_PMC84                         (0x0010u)
+#define GPIO_PMC8_PMC85                         (0x0020u)
+#define GPIO_PMC8_PMC86                         (0x0040u)
+#define GPIO_PMC8_PMC87                         (0x0080u)
+#define GPIO_PMC8_PMC88                         (0x0100u)
+#define GPIO_PMC8_PMC89                         (0x0200u)
+#define GPIO_PMC8_PMC810                        (0x0400u)
+#define GPIO_PMC8_PMC811                        (0x0800u)
+#define GPIO_PMC8_PMC812                        (0x1000u)
+#define GPIO_PMC8_PMC813                        (0x2000u)
+#define GPIO_PMC8_PMC814                        (0x4000u)
+#define GPIO_PMC8_PMC815                        (0x8000u)
+
+#define GPIO_PFC8_PFC80                         (0x0001u)
+#define GPIO_PFC8_PFC81                         (0x0002u)
+#define GPIO_PFC8_PFC82                         (0x0004u)
+#define GPIO_PFC8_PFC83                         (0x0008u)
+#define GPIO_PFC8_PFC84                         (0x0010u)
+#define GPIO_PFC8_PFC85                         (0x0020u)
+#define GPIO_PFC8_PFC86                         (0x0040u)
+#define GPIO_PFC8_PFC87                         (0x0080u)
+#define GPIO_PFC8_PFC88                         (0x0100u)
+#define GPIO_PFC8_PFC89                         (0x0200u)
+#define GPIO_PFC8_PFC810                        (0x0400u)
+#define GPIO_PFC8_PFC811                        (0x0800u)
+#define GPIO_PFC8_PFC812                        (0x1000u)
+#define GPIO_PFC8_PFC813                        (0x2000u)
+#define GPIO_PFC8_PFC814                        (0x4000u)
+#define GPIO_PFC8_PFC815                        (0x8000u)
+
+#define GPIO_PFCE8_PFCE80                       (0x0001u)
+#define GPIO_PFCE8_PFCE81                       (0x0002u)
+#define GPIO_PFCE8_PFCE82                       (0x0004u)
+#define GPIO_PFCE8_PFCE83                       (0x0008u)
+#define GPIO_PFCE8_PFCE84                       (0x0010u)
+#define GPIO_PFCE8_PFCE85                       (0x0020u)
+#define GPIO_PFCE8_PFCE86                       (0x0040u)
+#define GPIO_PFCE8_PFCE87                       (0x0080u)
+#define GPIO_PFCE8_PFCE88                       (0x0100u)
+#define GPIO_PFCE8_PFCE89                       (0x0200u)
+#define GPIO_PFCE8_PFCE810                      (0x0400u)
+#define GPIO_PFCE8_PFCE811                      (0x0800u)
+#define GPIO_PFCE8_PFCE812                      (0x1000u)
+#define GPIO_PFCE8_PFCE813                      (0x2000u)
+#define GPIO_PFCE8_PFCE814                      (0x4000u)
+#define GPIO_PFCE8_PFCE815                      (0x8000u)
+
+#define GPIO_PNOT8_PNOT80                       (0x0001u)
+#define GPIO_PNOT8_PNOT81                       (0x0002u)
+#define GPIO_PNOT8_PNOT82                       (0x0004u)
+#define GPIO_PNOT8_PNOT83                       (0x0008u)
+#define GPIO_PNOT8_PNOT84                       (0x0010u)
+#define GPIO_PNOT8_PNOT85                       (0x0020u)
+#define GPIO_PNOT8_PNOT86                       (0x0040u)
+#define GPIO_PNOT8_PNOT87                       (0x0080u)
+#define GPIO_PNOT8_PNOT88                       (0x0100u)
+#define GPIO_PNOT8_PNOT89                       (0x0200u)
+#define GPIO_PNOT8_PNOT810                      (0x0400u)
+#define GPIO_PNOT8_PNOT811                      (0x0800u)
+#define GPIO_PNOT8_PNOT812                      (0x1000u)
+#define GPIO_PNOT8_PNOT813                      (0x2000u)
+#define GPIO_PNOT8_PNOT814                      (0x4000u)
+#define GPIO_PNOT8_PNOT815                      (0x8000u)
+
+#define GPIO_PMSR8_PMSR80                       (0x00000001uL)
+#define GPIO_PMSR8_PMSR81                       (0x00000002uL)
+#define GPIO_PMSR8_PMSR82                       (0x00000004uL)
+#define GPIO_PMSR8_PMSR83                       (0x00000008uL)
+#define GPIO_PMSR8_PMSR84                       (0x00000010uL)
+#define GPIO_PMSR8_PMSR85                       (0x00000020uL)
+#define GPIO_PMSR8_PMSR86                       (0x00000040uL)
+#define GPIO_PMSR8_PMSR87                       (0x00000080uL)
+#define GPIO_PMSR8_PMSR88                       (0x00000100uL)
+#define GPIO_PMSR8_PMSR89                       (0x00000200uL)
+#define GPIO_PMSR8_PMSR810                      (0x00000400uL)
+#define GPIO_PMSR8_PMSR811                      (0x00000800uL)
+#define GPIO_PMSR8_PMSR812                      (0x00001000uL)
+#define GPIO_PMSR8_PMSR813                      (0x00002000uL)
+#define GPIO_PMSR8_PMSR814                      (0x00004000uL)
+#define GPIO_PMSR8_PMSR815                      (0x00008000uL)
+#define GPIO_PMSR8_PMSR816                      (0x00010000uL)
+#define GPIO_PMSR8_PMSR817                      (0x00020000uL)
+#define GPIO_PMSR8_PMSR818                      (0x00040000uL)
+#define GPIO_PMSR8_PMSR819                      (0x00080000uL)
+#define GPIO_PMSR8_PMSR820                      (0x00100000uL)
+#define GPIO_PMSR8_PMSR821                      (0x00200000uL)
+#define GPIO_PMSR8_PMSR822                      (0x00400000uL)
+#define GPIO_PMSR8_PMSR823                      (0x00800000uL)
+#define GPIO_PMSR8_PMSR824                      (0x01000000uL)
+#define GPIO_PMSR8_PMSR825                      (0x02000000uL)
+#define GPIO_PMSR8_PMSR826                      (0x04000000uL)
+#define GPIO_PMSR8_PMSR827                      (0x08000000uL)
+#define GPIO_PMSR8_PMSR828                      (0x10000000uL)
+#define GPIO_PMSR8_PMSR829                      (0x20000000uL)
+#define GPIO_PMSR8_PMSR830                      (0x40000000uL)
+#define GPIO_PMSR8_PMSR831                      (0x80000000uL)
+
+#define GPIO_PMCSR8_PMCSR80                     (0x00000001uL)
+#define GPIO_PMCSR8_PMCSR81                     (0x00000002uL)
+#define GPIO_PMCSR8_PMCSR82                     (0x00000004uL)
+#define GPIO_PMCSR8_PMCSR83                     (0x00000008uL)
+#define GPIO_PMCSR8_PMCSR84                     (0x00000010uL)
+#define GPIO_PMCSR8_PMCSR85                     (0x00000020uL)
+#define GPIO_PMCSR8_PMCSR86                     (0x00000040uL)
+#define GPIO_PMCSR8_PMCSR87                     (0x00000080uL)
+#define GPIO_PMCSR8_PMCSR88                     (0x00000100uL)
+#define GPIO_PMCSR8_PMCSR89                     (0x00000200uL)
+#define GPIO_PMCSR8_PMCSR810                    (0x00000400uL)
+#define GPIO_PMCSR8_PMCSR811                    (0x00000800uL)
+#define GPIO_PMCSR8_PMCSR812                    (0x00001000uL)
+#define GPIO_PMCSR8_PMCSR813                    (0x00002000uL)
+#define GPIO_PMCSR8_PMCSR814                    (0x00004000uL)
+#define GPIO_PMCSR8_PMCSR815                    (0x00008000uL)
+#define GPIO_PMCSR8_PMCSR816                    (0x00010000uL)
+#define GPIO_PMCSR8_PMCSR817                    (0x00020000uL)
+#define GPIO_PMCSR8_PMCSR818                    (0x00040000uL)
+#define GPIO_PMCSR8_PMCSR819                    (0x00080000uL)
+#define GPIO_PMCSR8_PMCSR820                    (0x00100000uL)
+#define GPIO_PMCSR8_PMCSR821                    (0x00200000uL)
+#define GPIO_PMCSR8_PMCSR822                    (0x00400000uL)
+#define GPIO_PMCSR8_PMCSR823                    (0x00800000uL)
+#define GPIO_PMCSR8_PMCSR824                    (0x01000000uL)
+#define GPIO_PMCSR8_PMCSR825                    (0x02000000uL)
+#define GPIO_PMCSR8_PMCSR826                    (0x04000000uL)
+#define GPIO_PMCSR8_PMCSR827                    (0x08000000uL)
+#define GPIO_PMCSR8_PMCSR828                    (0x10000000uL)
+#define GPIO_PMCSR8_PMCSR829                    (0x20000000uL)
+#define GPIO_PMCSR8_PMCSR830                    (0x40000000uL)
+#define GPIO_PMCSR8_PMCSR831                    (0x80000000uL)
+
+#define GPIO_PFCAE8_PFCAE80                     (0x0001u)
+#define GPIO_PFCAE8_PFCAE81                     (0x0002u)
+#define GPIO_PFCAE8_PFCAE82                     (0x0004u)
+#define GPIO_PFCAE8_PFCAE83                     (0x0008u)
+#define GPIO_PFCAE8_PFCAE84                     (0x0010u)
+#define GPIO_PFCAE8_PFCAE85                     (0x0020u)
+#define GPIO_PFCAE8_PFCAE86                     (0x0040u)
+#define GPIO_PFCAE8_PFCAE87                     (0x0080u)
+#define GPIO_PFCAE8_PFCAE88                     (0x0100u)
+#define GPIO_PFCAE8_PFCAE89                     (0x0200u)
+#define GPIO_PFCAE8_PFCAE810                    (0x0400u)
+#define GPIO_PFCAE8_PFCAE811                    (0x0800u)
+#define GPIO_PFCAE8_PFCAE812                    (0x1000u)
+#define GPIO_PFCAE8_PFCAE813                    (0x2000u)
+#define GPIO_PFCAE8_PFCAE814                    (0x4000u)
+#define GPIO_PFCAE8_PFCAE815                    (0x8000u)
+
+#define GPIO_PIBC8_PIBC80                       (0x0001u)
+#define GPIO_PIBC8_PIBC81                       (0x0002u)
+#define GPIO_PIBC8_PIBC82                       (0x0004u)
+#define GPIO_PIBC8_PIBC83                       (0x0008u)
+#define GPIO_PIBC8_PIBC84                       (0x0010u)
+#define GPIO_PIBC8_PIBC85                       (0x0020u)
+#define GPIO_PIBC8_PIBC86                       (0x0040u)
+#define GPIO_PIBC8_PIBC87                       (0x0080u)
+#define GPIO_PIBC8_PIBC88                       (0x0100u)
+#define GPIO_PIBC8_PIBC89                       (0x0200u)
+#define GPIO_PIBC8_PIBC810                      (0x0400u)
+#define GPIO_PIBC8_PIBC811                      (0x0800u)
+#define GPIO_PIBC8_PIBC812                      (0x1000u)
+#define GPIO_PIBC8_PIBC813                      (0x2000u)
+#define GPIO_PIBC8_PIBC814                      (0x4000u)
+#define GPIO_PIBC8_PIBC815                      (0x8000u)
+
+#define GPIO_PBDC8_PBDC80                       (0x0001u)
+#define GPIO_PBDC8_PBDC81                       (0x0002u)
+#define GPIO_PBDC8_PBDC82                       (0x0004u)
+#define GPIO_PBDC8_PBDC83                       (0x0008u)
+#define GPIO_PBDC8_PBDC84                       (0x0010u)
+#define GPIO_PBDC8_PBDC85                       (0x0020u)
+#define GPIO_PBDC8_PBDC86                       (0x0040u)
+#define GPIO_PBDC8_PBDC87                       (0x0080u)
+#define GPIO_PBDC8_PBDC88                       (0x0100u)
+#define GPIO_PBDC8_PBDC89                       (0x0200u)
+#define GPIO_PBDC8_PBDC810                      (0x0400u)
+#define GPIO_PBDC8_PBDC811                      (0x0800u)
+#define GPIO_PBDC8_PBDC812                      (0x1000u)
+#define GPIO_PBDC8_PBDC813                      (0x2000u)
+#define GPIO_PBDC8_PBDC814                      (0x4000u)
+#define GPIO_PBDC8_PBDC815                      (0x8000u)
+
+#define GPIO_PIPC8_PIPC80                       (0x0001u)
+#define GPIO_PIPC8_PIPC81                       (0x0002u)
+#define GPIO_PIPC8_PIPC82                       (0x0004u)
+#define GPIO_PIPC8_PIPC83                       (0x0008u)
+#define GPIO_PIPC8_PIPC84                       (0x0010u)
+#define GPIO_PIPC8_PIPC85                       (0x0020u)
+#define GPIO_PIPC8_PIPC86                       (0x0040u)
+#define GPIO_PIPC8_PIPC87                       (0x0080u)
+#define GPIO_PIPC8_PIPC88                       (0x0100u)
+#define GPIO_PIPC8_PIPC89                       (0x0200u)
+#define GPIO_PIPC8_PIPC810                      (0x0400u)
+#define GPIO_PIPC8_PIPC811                      (0x0800u)
+#define GPIO_PIPC8_PIPC812                      (0x1000u)
+#define GPIO_PIPC8_PIPC813                      (0x2000u)
+#define GPIO_PIPC8_PIPC814                      (0x4000u)
+#define GPIO_PIPC8_PIPC815                      (0x8000u)
+
+/* ---- P9 ---- */
+#define GPIO_P9_P90                             (0x0001u)
+#define GPIO_P9_P91                             (0x0002u)
+#define GPIO_P9_P92                             (0x0004u)
+#define GPIO_P9_P93                             (0x0008u)
+#define GPIO_P9_P94                             (0x0010u)
+#define GPIO_P9_P95                             (0x0020u)
+#define GPIO_P9_P96                             (0x0040u)
+#define GPIO_P9_P97                             (0x0080u)
+
+#define GPIO_PSR9_PSR90                         (0x00000001uL)
+#define GPIO_PSR9_PSR91                         (0x00000002uL)
+#define GPIO_PSR9_PSR92                         (0x00000004uL)
+#define GPIO_PSR9_PSR93                         (0x00000008uL)
+#define GPIO_PSR9_PSR94                         (0x00000010uL)
+#define GPIO_PSR9_PSR95                         (0x00000020uL)
+#define GPIO_PSR9_PSR96                         (0x00000040uL)
+#define GPIO_PSR9_PSR97                         (0x00000080uL)
+#define GPIO_PSR9_PSR916                        (0x00010000uL)
+#define GPIO_PSR9_PSR917                        (0x00020000uL)
+#define GPIO_PSR9_PSR918                        (0x00040000uL)
+#define GPIO_PSR9_PSR919                        (0x00080000uL)
+#define GPIO_PSR9_PSR920                        (0x00100000uL)
+#define GPIO_PSR9_PSR921                        (0x00200000uL)
+#define GPIO_PSR9_PSR922                        (0x00400000uL)
+#define GPIO_PSR9_PSR923                        (0x00800000uL)
+
+#define GPIO_PPR9_PPR90                         (0x0001u)
+#define GPIO_PPR9_PPR91                         (0x0002u)
+#define GPIO_PPR9_PPR92                         (0x0004u)
+#define GPIO_PPR9_PPR93                         (0x0008u)
+#define GPIO_PPR9_PPR94                         (0x0010u)
+#define GPIO_PPR9_PPR95                         (0x0020u)
+#define GPIO_PPR9_PPR96                         (0x0040u)
+#define GPIO_PPR9_PPR97                         (0x0080u)
+
+#define GPIO_PM9_PM90                           (0x0001u)
+#define GPIO_PM9_PM91                           (0x0002u)
+#define GPIO_PM9_PM92                           (0x0004u)
+#define GPIO_PM9_PM93                           (0x0008u)
+#define GPIO_PM9_PM94                           (0x0010u)
+#define GPIO_PM9_PM95                           (0x0020u)
+#define GPIO_PM9_PM96                           (0x0040u)
+#define GPIO_PM9_PM97                           (0x0080u)
+
+#define GPIO_PMC9_PMC90                         (0x0001u)
+#define GPIO_PMC9_PMC91                         (0x0002u)
+#define GPIO_PMC9_PMC92                         (0x0004u)
+#define GPIO_PMC9_PMC93                         (0x0008u)
+#define GPIO_PMC9_PMC94                         (0x0010u)
+#define GPIO_PMC9_PMC95                         (0x0020u)
+#define GPIO_PMC9_PMC96                         (0x0040u)
+#define GPIO_PMC9_PMC97                         (0x0080u)
+
+#define GPIO_PFC9_PFC90                         (0x0001u)
+#define GPIO_PFC9_PFC91                         (0x0002u)
+#define GPIO_PFC9_PFC92                         (0x0004u)
+#define GPIO_PFC9_PFC93                         (0x0008u)
+#define GPIO_PFC9_PFC94                         (0x0010u)
+#define GPIO_PFC9_PFC95                         (0x0020u)
+#define GPIO_PFC9_PFC96                         (0x0040u)
+#define GPIO_PFC9_PFC97                         (0x0080u)
+
+#define GPIO_PFCE9_PFCE90                       (0x0001u)
+#define GPIO_PFCE9_PFCE91                       (0x0002u)
+#define GPIO_PFCE9_PFCE92                       (0x0004u)
+#define GPIO_PFCE9_PFCE93                       (0x0008u)
+#define GPIO_PFCE9_PFCE94                       (0x0010u)
+#define GPIO_PFCE9_PFCE95                       (0x0020u)
+#define GPIO_PFCE9_PFCE96                       (0x0040u)
+#define GPIO_PFCE9_PFCE97                       (0x0080u)
+
+#define GPIO_PNOT9_PNOT90                       (0x0001u)
+#define GPIO_PNOT9_PNOT91                       (0x0002u)
+#define GPIO_PNOT9_PNOT92                       (0x0004u)
+#define GPIO_PNOT9_PNOT93                       (0x0008u)
+#define GPIO_PNOT9_PNOT94                       (0x0010u)
+#define GPIO_PNOT9_PNOT95                       (0x0020u)
+#define GPIO_PNOT9_PNOT96                       (0x0040u)
+#define GPIO_PNOT9_PNOT97                       (0x0080u)
+
+#define GPIO_PMSR9_PMSR90                       (0x00000001uL)
+#define GPIO_PMSR9_PMSR91                       (0x00000002uL)
+#define GPIO_PMSR9_PMSR92                       (0x00000004uL)
+#define GPIO_PMSR9_PMSR93                       (0x00000008uL)
+#define GPIO_PMSR9_PMSR94                       (0x00000010uL)
+#define GPIO_PMSR9_PMSR95                       (0x00000020uL)
+#define GPIO_PMSR9_PMSR96                       (0x00000040uL)
+#define GPIO_PMSR9_PMSR97                       (0x00000080uL)
+#define GPIO_PMSR9_PMSR916                      (0x00010000uL)
+#define GPIO_PMSR9_PMSR917                      (0x00020000uL)
+#define GPIO_PMSR9_PMSR918                      (0x00040000uL)
+#define GPIO_PMSR9_PMSR919                      (0x00080000uL)
+#define GPIO_PMSR9_PMSR920                      (0x00100000uL)
+#define GPIO_PMSR9_PMSR921                      (0x00200000uL)
+#define GPIO_PMSR9_PMSR922                      (0x00400000uL)
+#define GPIO_PMSR9_PMSR923                      (0x00800000uL)
+
+#define GPIO_PMCSR9_PMCSR90                     (0x00000001uL)
+#define GPIO_PMCSR9_PMCSR91                     (0x00000002uL)
+#define GPIO_PMCSR9_PMCSR92                     (0x00000004uL)
+#define GPIO_PMCSR9_PMCSR93                     (0x00000008uL)
+#define GPIO_PMCSR9_PMCSR94                     (0x00000010uL)
+#define GPIO_PMCSR9_PMCSR95                     (0x00000020uL)
+#define GPIO_PMCSR9_PMCSR96                     (0x00000040uL)
+#define GPIO_PMCSR9_PMCSR97                     (0x00000080uL)
+#define GPIO_PMCSR9_PMCSR916                    (0x00010000uL)
+#define GPIO_PMCSR9_PMCSR917                    (0x00020000uL)
+#define GPIO_PMCSR9_PMCSR918                    (0x00040000uL)
+#define GPIO_PMCSR9_PMCSR919                    (0x00080000uL)
+#define GPIO_PMCSR9_PMCSR920                    (0x00100000uL)
+#define GPIO_PMCSR9_PMCSR921                    (0x00200000uL)
+#define GPIO_PMCSR9_PMCSR922                    (0x00400000uL)
+#define GPIO_PMCSR9_PMCSR923                    (0x00800000uL)
+
+#define GPIO_PFCAE9_PFCAE90                     (0x0001u)
+#define GPIO_PFCAE9_PFCAE91                     (0x0002u)
+#define GPIO_PFCAE9_PFCAE92                     (0x0004u)
+#define GPIO_PFCAE9_PFCAE93                     (0x0008u)
+#define GPIO_PFCAE9_PFCAE94                     (0x0010u)
+#define GPIO_PFCAE9_PFCAE95                     (0x0020u)
+#define GPIO_PFCAE9_PFCAE96                     (0x0040u)
+#define GPIO_PFCAE9_PFCAE97                     (0x0080u)
+
+#define GPIO_PIBC9_PIBC90                       (0x0001u)
+#define GPIO_PIBC9_PIBC91                       (0x0002u)
+#define GPIO_PIBC9_PIBC92                       (0x0004u)
+#define GPIO_PIBC9_PIBC93                       (0x0008u)
+#define GPIO_PIBC9_PIBC94                       (0x0010u)
+#define GPIO_PIBC9_PIBC95                       (0x0020u)
+#define GPIO_PIBC9_PIBC96                       (0x0040u)
+#define GPIO_PIBC9_PIBC97                       (0x0080u)
+
+#define GPIO_PBDC9_PBDC90                       (0x0001u)
+#define GPIO_PBDC9_PBDC91                       (0x0002u)
+#define GPIO_PBDC9_PBDC92                       (0x0004u)
+#define GPIO_PBDC9_PBDC93                       (0x0008u)
+#define GPIO_PBDC9_PBDC94                       (0x0010u)
+#define GPIO_PBDC9_PBDC95                       (0x0020u)
+#define GPIO_PBDC9_PBDC96                       (0x0040u)
+#define GPIO_PBDC9_PBDC97                       (0x0080u)
+
+#define GPIO_PIPC9_PIPC90                       (0x0001u)
+#define GPIO_PIPC9_PIPC91                       (0x0002u)
+#define GPIO_PIPC9_PIPC92                       (0x0004u)
+#define GPIO_PIPC9_PIPC93                       (0x0008u)
+#define GPIO_PIPC9_PIPC94                       (0x0010u)
+#define GPIO_PIPC9_PIPC95                       (0x0020u)
+#define GPIO_PIPC9_PIPC96                       (0x0040u)
+#define GPIO_PIPC9_PIPC97                       (0x0080u)
+
+/* ---- P10 ---- */
+#define GPIO_P10_P100                           (0x0001u)
+#define GPIO_P10_P101                           (0x0002u)
+#define GPIO_P10_P102                           (0x0004u)
+#define GPIO_P10_P103                           (0x0008u)
+#define GPIO_P10_P104                           (0x0010u)
+#define GPIO_P10_P105                           (0x0020u)
+#define GPIO_P10_P106                           (0x0040u)
+#define GPIO_P10_P107                           (0x0080u)
+#define GPIO_P10_P108                           (0x0100u)
+#define GPIO_P10_P109                           (0x0200u)
+#define GPIO_P10_P1010                          (0x0400u)
+#define GPIO_P10_P1011                          (0x0800u)
+#define GPIO_P10_P1012                          (0x1000u)
+#define GPIO_P10_P1013                          (0x2000u)
+#define GPIO_P10_P1014                          (0x4000u)
+#define GPIO_P10_P1015                          (0x8000u)
+
+#define GPIO_PSR10_PSR100                       (0x00000001uL)
+#define GPIO_PSR10_PSR101                       (0x00000002uL)
+#define GPIO_PSR10_PSR102                       (0x00000004uL)
+#define GPIO_PSR10_PSR103                       (0x00000008uL)
+#define GPIO_PSR10_PSR104                       (0x00000010uL)
+#define GPIO_PSR10_PSR105                       (0x00000020uL)
+#define GPIO_PSR10_PSR106                       (0x00000040uL)
+#define GPIO_PSR10_PSR107                       (0x00000080uL)
+#define GPIO_PSR10_PSR108                       (0x00000100uL)
+#define GPIO_PSR10_PSR109                       (0x00000200uL)
+#define GPIO_PSR10_PSR1010                      (0x00000400uL)
+#define GPIO_PSR10_PSR1011                      (0x00000800uL)
+#define GPIO_PSR10_PSR1012                      (0x00001000uL)
+#define GPIO_PSR10_PSR1013                      (0x00002000uL)
+#define GPIO_PSR10_PSR1014                      (0x00004000uL)
+#define GPIO_PSR10_PSR1015                      (0x00008000uL)
+#define GPIO_PSR10_PSR1016                      (0x00010000uL)
+#define GPIO_PSR10_PSR1017                      (0x00020000uL)
+#define GPIO_PSR10_PSR1018                      (0x00040000uL)
+#define GPIO_PSR10_PSR1019                      (0x00080000uL)
+#define GPIO_PSR10_PSR1020                      (0x00100000uL)
+#define GPIO_PSR10_PSR1021                      (0x00200000uL)
+#define GPIO_PSR10_PSR1022                      (0x00400000uL)
+#define GPIO_PSR10_PSR1023                      (0x00800000uL)
+#define GPIO_PSR10_PSR1024                      (0x01000000uL)
+#define GPIO_PSR10_PSR1025                      (0x02000000uL)
+#define GPIO_PSR10_PSR1026                      (0x04000000uL)
+#define GPIO_PSR10_PSR1027                      (0x08000000uL)
+#define GPIO_PSR10_PSR1028                      (0x10000000uL)
+#define GPIO_PSR10_PSR1029                      (0x20000000uL)
+#define GPIO_PSR10_PSR1030                      (0x40000000uL)
+#define GPIO_PSR10_PSR1031                      (0x80000000uL)
+
+#define GPIO_PPR10_PPR100                       (0x0001u)
+#define GPIO_PPR10_PPR101                       (0x0002u)
+#define GPIO_PPR10_PPR102                       (0x0004u)
+#define GPIO_PPR10_PPR103                       (0x0008u)
+#define GPIO_PPR10_PPR104                       (0x0010u)
+#define GPIO_PPR10_PPR105                       (0x0020u)
+#define GPIO_PPR10_PPR106                       (0x0040u)
+#define GPIO_PPR10_PPR107                       (0x0080u)
+#define GPIO_PPR10_PPR108                       (0x0100u)
+#define GPIO_PPR10_PPR109                       (0x0200u)
+#define GPIO_PPR10_PPR1010                      (0x0400u)
+#define GPIO_PPR10_PPR1011                      (0x0800u)
+#define GPIO_PPR10_PPR1012                      (0x1000u)
+#define GPIO_PPR10_PPR1013                      (0x2000u)
+#define GPIO_PPR10_PPR1014                      (0x4000u)
+#define GPIO_PPR10_PPR1015                      (0x8000u)
+
+#define GPIO_PM10_PM100                         (0x0001u)
+#define GPIO_PM10_PM101                         (0x0002u)
+#define GPIO_PM10_PM102                         (0x0004u)
+#define GPIO_PM10_PM103                         (0x0008u)
+#define GPIO_PM10_PM104                         (0x0010u)
+#define GPIO_PM10_PM105                         (0x0020u)
+#define GPIO_PM10_PM106                         (0x0040u)
+#define GPIO_PM10_PM107                         (0x0080u)
+#define GPIO_PM10_PM108                         (0x0100u)
+#define GPIO_PM10_PM109                         (0x0200u)
+#define GPIO_PM10_PM1010                        (0x0400u)
+#define GPIO_PM10_PM1011                        (0x0800u)
+#define GPIO_PM10_PM1012                        (0x1000u)
+#define GPIO_PM10_PM1013                        (0x2000u)
+#define GPIO_PM10_PM1014                        (0x4000u)
+#define GPIO_PM10_PM1015                        (0x8000u)
+
+#define GPIO_PMC10_PMC100                       (0x0001u)
+#define GPIO_PMC10_PMC101                       (0x0002u)
+#define GPIO_PMC10_PMC102                       (0x0004u)
+#define GPIO_PMC10_PMC103                       (0x0008u)
+#define GPIO_PMC10_PMC104                       (0x0010u)
+#define GPIO_PMC10_PMC105                       (0x0020u)
+#define GPIO_PMC10_PMC106                       (0x0040u)
+#define GPIO_PMC10_PMC107                       (0x0080u)
+#define GPIO_PMC10_PMC108                       (0x0100u)
+#define GPIO_PMC10_PMC109                       (0x0200u)
+#define GPIO_PMC10_PMC1010                      (0x0400u)
+#define GPIO_PMC10_PMC1011                      (0x0800u)
+#define GPIO_PMC10_PMC1012                      (0x1000u)
+#define GPIO_PMC10_PMC1013                      (0x2000u)
+#define GPIO_PMC10_PMC1014                      (0x4000u)
+#define GPIO_PMC10_PMC1015                      (0x8000u)
+
+#define GPIO_PFC10_PFC100                       (0x0001u)
+#define GPIO_PFC10_PFC101                       (0x0002u)
+#define GPIO_PFC10_PFC102                       (0x0004u)
+#define GPIO_PFC10_PFC103                       (0x0008u)
+#define GPIO_PFC10_PFC104                       (0x0010u)
+#define GPIO_PFC10_PFC105                       (0x0020u)
+#define GPIO_PFC10_PFC106                       (0x0040u)
+#define GPIO_PFC10_PFC107                       (0x0080u)
+#define GPIO_PFC10_PFC108                       (0x0100u)
+#define GPIO_PFC10_PFC109                       (0x0200u)
+#define GPIO_PFC10_PFC1010                      (0x0400u)
+#define GPIO_PFC10_PFC1011                      (0x0800u)
+#define GPIO_PFC10_PFC1012                      (0x1000u)
+#define GPIO_PFC10_PFC1013                      (0x2000u)
+#define GPIO_PFC10_PFC1014                      (0x4000u)
+#define GPIO_PFC10_PFC1015                      (0x8000u)
+
+#define GPIO_PFCE10_PFCE100                     (0x0001u)
+#define GPIO_PFCE10_PFCE101                     (0x0002u)
+#define GPIO_PFCE10_PFCE102                     (0x0004u)
+#define GPIO_PFCE10_PFCE103                     (0x0008u)
+#define GPIO_PFCE10_PFCE104                     (0x0010u)
+#define GPIO_PFCE10_PFCE105                     (0x0020u)
+#define GPIO_PFCE10_PFCE106                     (0x0040u)
+#define GPIO_PFCE10_PFCE107                     (0x0080u)
+#define GPIO_PFCE10_PFCE108                     (0x0100u)
+#define GPIO_PFCE10_PFCE109                     (0x0200u)
+#define GPIO_PFCE10_PFCE1010                    (0x0400u)
+#define GPIO_PFCE10_PFCE1011                    (0x0800u)
+#define GPIO_PFCE10_PFCE1012                    (0x1000u)
+#define GPIO_PFCE10_PFCE1013                    (0x2000u)
+#define GPIO_PFCE10_PFCE1014                    (0x4000u)
+#define GPIO_PFCE10_PFCE1015                    (0x8000u)
+
+#define GPIO_PNOT10_PNOT100                     (0x0001u)
+#define GPIO_PNOT10_PNOT101                     (0x0002u)
+#define GPIO_PNOT10_PNOT102                     (0x0004u)
+#define GPIO_PNOT10_PNOT103                     (0x0008u)
+#define GPIO_PNOT10_PNOT104                     (0x0010u)
+#define GPIO_PNOT10_PNOT105                     (0x0020u)
+#define GPIO_PNOT10_PNOT106                     (0x0040u)
+#define GPIO_PNOT10_PNOT107                     (0x0080u)
+#define GPIO_PNOT10_PNOT108                     (0x0100u)
+#define GPIO_PNOT10_PNOT109                     (0x0200u)
+#define GPIO_PNOT10_PNOT1010                    (0x0400u)
+#define GPIO_PNOT10_PNOT1011                    (0x0800u)
+#define GPIO_PNOT10_PNOT1012                    (0x1000u)
+#define GPIO_PNOT10_PNOT1013                    (0x2000u)
+#define GPIO_PNOT10_PNOT1014                    (0x4000u)
+#define GPIO_PNOT10_PNOT1015                    (0x8000u)
+
+#define GPIO_PMSR10_PMSR100                     (0x00000001uL)
+#define GPIO_PMSR10_PMSR101                     (0x00000002uL)
+#define GPIO_PMSR10_PMSR102                     (0x00000004uL)
+#define GPIO_PMSR10_PMSR103                     (0x00000008uL)
+#define GPIO_PMSR10_PMSR104                     (0x00000010uL)
+#define GPIO_PMSR10_PMSR105                     (0x00000020uL)
+#define GPIO_PMSR10_PMSR106                     (0x00000040uL)
+#define GPIO_PMSR10_PMSR107                     (0x00000080uL)
+#define GPIO_PMSR10_PMSR108                     (0x00000100uL)
+#define GPIO_PMSR10_PMSR109                     (0x00000200uL)
+#define GPIO_PMSR10_PMSR1010                    (0x00000400uL)
+#define GPIO_PMSR10_PMSR1011                    (0x00000800uL)
+#define GPIO_PMSR10_PMSR1012                    (0x00001000uL)
+#define GPIO_PMSR10_PMSR1013                    (0x00002000uL)
+#define GPIO_PMSR10_PMSR1014                    (0x00004000uL)
+#define GPIO_PMSR10_PMSR1015                    (0x00008000uL)
+#define GPIO_PMSR10_PMSR1016                    (0x00010000uL)
+#define GPIO_PMSR10_PMSR1017                    (0x00020000uL)
+#define GPIO_PMSR10_PMSR1018                    (0x00040000uL)
+#define GPIO_PMSR10_PMSR1019                    (0x00080000uL)
+#define GPIO_PMSR10_PMSR1020                    (0x00100000uL)
+#define GPIO_PMSR10_PMSR1021                    (0x00200000uL)
+#define GPIO_PMSR10_PMSR1022                    (0x00400000uL)
+#define GPIO_PMSR10_PMSR1023                    (0x00800000uL)
+#define GPIO_PMSR10_PMSR1024                    (0x01000000uL)
+#define GPIO_PMSR10_PMSR1025                    (0x02000000uL)
+#define GPIO_PMSR10_PMSR1026                    (0x04000000uL)
+#define GPIO_PMSR10_PMSR1027                    (0x08000000uL)
+#define GPIO_PMSR10_PMSR1028                    (0x10000000uL)
+#define GPIO_PMSR10_PMSR1029                    (0x20000000uL)
+#define GPIO_PMSR10_PMSR1030                    (0x40000000uL)
+#define GPIO_PMSR10_PMSR1031                    (0x80000000uL)
+
+#define GPIO_PMCSR10_PMCSR100                   (0x00000001uL)
+#define GPIO_PMCSR10_PMCSR101                   (0x00000002uL)
+#define GPIO_PMCSR10_PMCSR102                   (0x00000004uL)
+#define GPIO_PMCSR10_PMCSR103                   (0x00000008uL)
+#define GPIO_PMCSR10_PMCSR104                   (0x00000010uL)
+#define GPIO_PMCSR10_PMCSR105                   (0x00000020uL)
+#define GPIO_PMCSR10_PMCSR106                   (0x00000040uL)
+#define GPIO_PMCSR10_PMCSR107                   (0x00000080uL)
+#define GPIO_PMCSR10_PMCSR108                   (0x00000100uL)
+#define GPIO_PMCSR10_PMCSR109                   (0x00000200uL)
+#define GPIO_PMCSR10_PMCSR1010                  (0x00000400uL)
+#define GPIO_PMCSR10_PMCSR1011                  (0x00000800uL)
+#define GPIO_PMCSR10_PMCSR1012                  (0x00001000uL)
+#define GPIO_PMCSR10_PMCSR1013                  (0x00002000uL)
+#define GPIO_PMCSR10_PMCSR1014                  (0x00004000uL)
+#define GPIO_PMCSR10_PMCSR1015                  (0x00008000uL)
+#define GPIO_PMCSR10_PMCSR1016                  (0x00010000uL)
+#define GPIO_PMCSR10_PMCSR1017                  (0x00020000uL)
+#define GPIO_PMCSR10_PMCSR1018                  (0x00040000uL)
+#define GPIO_PMCSR10_PMCSR1019                  (0x00080000uL)
+#define GPIO_PMCSR10_PMCSR1020                  (0x00100000uL)
+#define GPIO_PMCSR10_PMCSR1021                  (0x00200000uL)
+#define GPIO_PMCSR10_PMCSR1022                  (0x00400000uL)
+#define GPIO_PMCSR10_PMCSR1023                  (0x00800000uL)
+#define GPIO_PMCSR10_PMCSR1024                  (0x01000000uL)
+#define GPIO_PMCSR10_PMCSR1025                  (0x02000000uL)
+#define GPIO_PMCSR10_PMCSR1026                  (0x04000000uL)
+#define GPIO_PMCSR10_PMCSR1027                  (0x08000000uL)
+#define GPIO_PMCSR10_PMCSR1028                  (0x10000000uL)
+#define GPIO_PMCSR10_PMCSR1029                  (0x20000000uL)
+#define GPIO_PMCSR10_PMCSR1030                  (0x40000000uL)
+#define GPIO_PMCSR10_PMCSR1031                  (0x80000000uL)
+
+#define GPIO_PFCAE10_PFCAE100                   (0x0001u)
+#define GPIO_PFCAE10_PFCAE101                   (0x0002u)
+#define GPIO_PFCAE10_PFCAE102                   (0x0004u)
+#define GPIO_PFCAE10_PFCAE103                   (0x0008u)
+#define GPIO_PFCAE10_PFCAE104                   (0x0010u)
+#define GPIO_PFCAE10_PFCAE105                   (0x0020u)
+#define GPIO_PFCAE10_PFCAE106                   (0x0040u)
+#define GPIO_PFCAE10_PFCAE107                   (0x0080u)
+#define GPIO_PFCAE10_PFCAE108                   (0x0100u)
+#define GPIO_PFCAE10_PFCAE109                   (0x0200u)
+#define GPIO_PFCAE10_PFCAE1010                  (0x0400u)
+#define GPIO_PFCAE10_PFCAE1011                  (0x0800u)
+#define GPIO_PFCAE10_PFCAE1012                  (0x1000u)
+#define GPIO_PFCAE10_PFCAE1013                  (0x2000u)
+#define GPIO_PFCAE10_PFCAE1014                  (0x4000u)
+#define GPIO_PFCAE10_PFCAE1015                  (0x8000u)
+
+#define GPIO_PIBC10_PIBC100                     (0x0001u)
+#define GPIO_PIBC10_PIBC101                     (0x0002u)
+#define GPIO_PIBC10_PIBC102                     (0x0004u)
+#define GPIO_PIBC10_PIBC103                     (0x0008u)
+#define GPIO_PIBC10_PIBC104                     (0x0010u)
+#define GPIO_PIBC10_PIBC105                     (0x0020u)
+#define GPIO_PIBC10_PIBC106                     (0x0040u)
+#define GPIO_PIBC10_PIBC107                     (0x0080u)
+#define GPIO_PIBC10_PIBC108                     (0x0100u)
+#define GPIO_PIBC10_PIBC109                     (0x0200u)
+#define GPIO_PIBC10_PIBC1010                    (0x0400u)
+#define GPIO_PIBC10_PIBC1011                    (0x0800u)
+#define GPIO_PIBC10_PIBC1012                    (0x1000u)
+#define GPIO_PIBC10_PIBC1013                    (0x2000u)
+#define GPIO_PIBC10_PIBC1014                    (0x4000u)
+#define GPIO_PIBC10_PIBC1015                    (0x8000u)
+
+#define GPIO_PBDC10_PBDC100                     (0x0001u)
+#define GPIO_PBDC10_PBDC101                     (0x0002u)
+#define GPIO_PBDC10_PBDC102                     (0x0004u)
+#define GPIO_PBDC10_PBDC103                     (0x0008u)
+#define GPIO_PBDC10_PBDC104                     (0x0010u)
+#define GPIO_PBDC10_PBDC105                     (0x0020u)
+#define GPIO_PBDC10_PBDC106                     (0x0040u)
+#define GPIO_PBDC10_PBDC107                     (0x0080u)
+#define GPIO_PBDC10_PBDC108                     (0x0100u)
+#define GPIO_PBDC10_PBDC109                     (0x0200u)
+#define GPIO_PBDC10_PBDC1010                    (0x0400u)
+#define GPIO_PBDC10_PBDC1011                    (0x0800u)
+#define GPIO_PBDC10_PBDC1012                    (0x1000u)
+#define GPIO_PBDC10_PBDC1013                    (0x2000u)
+#define GPIO_PBDC10_PBDC1014                    (0x4000u)
+#define GPIO_PBDC10_PBDC1015                    (0x8000u)
+
+#define GPIO_PIPC10_PIPC100                     (0x0001u)
+#define GPIO_PIPC10_PIPC101                     (0x0002u)
+#define GPIO_PIPC10_PIPC102                     (0x0004u)
+#define GPIO_PIPC10_PIPC103                     (0x0008u)
+#define GPIO_PIPC10_PIPC104                     (0x0010u)
+#define GPIO_PIPC10_PIPC105                     (0x0020u)
+#define GPIO_PIPC10_PIPC106                     (0x0040u)
+#define GPIO_PIPC10_PIPC107                     (0x0080u)
+#define GPIO_PIPC10_PIPC108                     (0x0100u)
+#define GPIO_PIPC10_PIPC109                     (0x0200u)
+#define GPIO_PIPC10_PIPC1010                    (0x0400u)
+#define GPIO_PIPC10_PIPC1011                    (0x0800u)
+#define GPIO_PIPC10_PIPC1012                    (0x1000u)
+#define GPIO_PIPC10_PIPC1013                    (0x2000u)
+#define GPIO_PIPC10_PIPC1014                    (0x4000u)
+#define GPIO_PIPC10_PIPC1015                    (0x8000u)
+
+/* ---- P11 ---- */
+#define GPIO_P11_P110                           (0x0001u)
+#define GPIO_P11_P111                           (0x0002u)
+#define GPIO_P11_P112                           (0x0004u)
+#define GPIO_P11_P113                           (0x0008u)
+#define GPIO_P11_P114                           (0x0010u)
+#define GPIO_P11_P115                           (0x0020u)
+#define GPIO_P11_P116                           (0x0040u)
+#define GPIO_P11_P117                           (0x0080u)
+#define GPIO_P11_P118                           (0x0100u)
+#define GPIO_P11_P119                           (0x0200u)
+#define GPIO_P11_P1110                          (0x0400u)
+#define GPIO_P11_P1111                          (0x0800u)
+#define GPIO_P11_P1112                          (0x1000u)
+#define GPIO_P11_P1113                          (0x2000u)
+#define GPIO_P11_P1114                          (0x4000u)
+#define GPIO_P11_P1115                          (0x8000u)
+
+#define GPIO_PSR11_PSR110                       (0x00000001uL)
+#define GPIO_PSR11_PSR111                       (0x00000002uL)
+#define GPIO_PSR11_PSR112                       (0x00000004uL)
+#define GPIO_PSR11_PSR113                       (0x00000008uL)
+#define GPIO_PSR11_PSR114                       (0x00000010uL)
+#define GPIO_PSR11_PSR115                       (0x00000020uL)
+#define GPIO_PSR11_PSR116                       (0x00000040uL)
+#define GPIO_PSR11_PSR117                       (0x00000080uL)
+#define GPIO_PSR11_PSR118                       (0x00000100uL)
+#define GPIO_PSR11_PSR119                       (0x00000200uL)
+#define GPIO_PSR11_PSR1110                      (0x00000400uL)
+#define GPIO_PSR11_PSR1111                      (0x00000800uL)
+#define GPIO_PSR11_PSR1112                      (0x00001000uL)
+#define GPIO_PSR11_PSR1113                      (0x00002000uL)
+#define GPIO_PSR11_PSR1114                      (0x00004000uL)
+#define GPIO_PSR11_PSR1115                      (0x00008000uL)
+#define GPIO_PSR11_PSR1116                      (0x00010000uL)
+#define GPIO_PSR11_PSR1117                      (0x00020000uL)
+#define GPIO_PSR11_PSR1118                      (0x00040000uL)
+#define GPIO_PSR11_PSR1119                      (0x00080000uL)
+#define GPIO_PSR11_PSR1120                      (0x00100000uL)
+#define GPIO_PSR11_PSR1121                      (0x00200000uL)
+#define GPIO_PSR11_PSR1122                      (0x00400000uL)
+#define GPIO_PSR11_PSR1123                      (0x00800000uL)
+#define GPIO_PSR11_PSR1124                      (0x01000000uL)
+#define GPIO_PSR11_PSR1125                      (0x02000000uL)
+#define GPIO_PSR11_PSR1126                      (0x04000000uL)
+#define GPIO_PSR11_PSR1127                      (0x08000000uL)
+#define GPIO_PSR11_PSR1128                      (0x10000000uL)
+#define GPIO_PSR11_PSR1129                      (0x20000000uL)
+#define GPIO_PSR11_PSR1130                      (0x40000000uL)
+#define GPIO_PSR11_PSR1131                      (0x80000000uL)
+
+#define GPIO_PPR11_PPR110                       (0x0001u)
+#define GPIO_PPR11_PPR111                       (0x0002u)
+#define GPIO_PPR11_PPR112                       (0x0004u)
+#define GPIO_PPR11_PPR113                       (0x0008u)
+#define GPIO_PPR11_PPR114                       (0x0010u)
+#define GPIO_PPR11_PPR115                       (0x0020u)
+#define GPIO_PPR11_PPR116                       (0x0040u)
+#define GPIO_PPR11_PPR117                       (0x0080u)
+#define GPIO_PPR11_PPR118                       (0x0100u)
+#define GPIO_PPR11_PPR119                       (0x0200u)
+#define GPIO_PPR11_PPR1110                      (0x0400u)
+#define GPIO_PPR11_PPR1111                      (0x0800u)
+#define GPIO_PPR11_PPR1112                      (0x1000u)
+#define GPIO_PPR11_PPR1113                      (0x2000u)
+#define GPIO_PPR11_PPR1114                      (0x4000u)
+#define GPIO_PPR11_PPR1115                      (0x8000u)
+
+#define GPIO_PM11_PM110                         (0x0001u)
+#define GPIO_PM11_PM111                         (0x0002u)
+#define GPIO_PM11_PM112                         (0x0004u)
+#define GPIO_PM11_PM113                         (0x0008u)
+#define GPIO_PM11_PM114                         (0x0010u)
+#define GPIO_PM11_PM115                         (0x0020u)
+#define GPIO_PM11_PM116                         (0x0040u)
+#define GPIO_PM11_PM117                         (0x0080u)
+#define GPIO_PM11_PM118                         (0x0100u)
+#define GPIO_PM11_PM119                         (0x0200u)
+#define GPIO_PM11_PM1110                        (0x0400u)
+#define GPIO_PM11_PM1111                        (0x0800u)
+#define GPIO_PM11_PM1112                        (0x1000u)
+#define GPIO_PM11_PM1113                        (0x2000u)
+#define GPIO_PM11_PM1114                        (0x4000u)
+#define GPIO_PM11_PM1115                        (0x8000u)
+
+#define GPIO_PMC11_PMC110                       (0x0001u)
+#define GPIO_PMC11_PMC111                       (0x0002u)
+#define GPIO_PMC11_PMC112                       (0x0004u)
+#define GPIO_PMC11_PMC113                       (0x0008u)
+#define GPIO_PMC11_PMC114                       (0x0010u)
+#define GPIO_PMC11_PMC115                       (0x0020u)
+#define GPIO_PMC11_PMC116                       (0x0040u)
+#define GPIO_PMC11_PMC117                       (0x0080u)
+#define GPIO_PMC11_PMC118                       (0x0100u)
+#define GPIO_PMC11_PMC119                       (0x0200u)
+#define GPIO_PMC11_PMC1110                      (0x0400u)
+#define GPIO_PMC11_PMC1111                      (0x0800u)
+#define GPIO_PMC11_PMC1112                      (0x1000u)
+#define GPIO_PMC11_PMC1113                      (0x2000u)
+#define GPIO_PMC11_PMC1114                      (0x4000u)
+#define GPIO_PMC11_PMC1115                      (0x8000u)
+
+#define GPIO_PFC11_PFC110                       (0x0001u)
+#define GPIO_PFC11_PFC111                       (0x0002u)
+#define GPIO_PFC11_PFC112                       (0x0004u)
+#define GPIO_PFC11_PFC113                       (0x0008u)
+#define GPIO_PFC11_PFC114                       (0x0010u)
+#define GPIO_PFC11_PFC115                       (0x0020u)
+#define GPIO_PFC11_PFC116                       (0x0040u)
+#define GPIO_PFC11_PFC117                       (0x0080u)
+#define GPIO_PFC11_PFC118                       (0x0100u)
+#define GPIO_PFC11_PFC119                       (0x0200u)
+#define GPIO_PFC11_PFC1110                      (0x0400u)
+#define GPIO_PFC11_PFC1111                      (0x0800u)
+#define GPIO_PFC11_PFC1112                      (0x1000u)
+#define GPIO_PFC11_PFC1113                      (0x2000u)
+#define GPIO_PFC11_PFC1114                      (0x4000u)
+#define GPIO_PFC11_PFC1115                      (0x8000u)
+
+#define GPIO_PFCE11_PFCE110                     (0x0001u)
+#define GPIO_PFCE11_PFCE111                     (0x0002u)
+#define GPIO_PFCE11_PFCE112                     (0x0004u)
+#define GPIO_PFCE11_PFCE113                     (0x0008u)
+#define GPIO_PFCE11_PFCE114                     (0x0010u)
+#define GPIO_PFCE11_PFCE115                     (0x0020u)
+#define GPIO_PFCE11_PFCE116                     (0x0040u)
+#define GPIO_PFCE11_PFCE117                     (0x0080u)
+#define GPIO_PFCE11_PFCE118                     (0x0100u)
+#define GPIO_PFCE11_PFCE119                     (0x0200u)
+#define GPIO_PFCE11_PFCE1110                    (0x0400u)
+#define GPIO_PFCE11_PFCE1111                    (0x0800u)
+#define GPIO_PFCE11_PFCE1112                    (0x1000u)
+#define GPIO_PFCE11_PFCE1113                    (0x2000u)
+#define GPIO_PFCE11_PFCE1114                    (0x4000u)
+#define GPIO_PFCE11_PFCE1115                    (0x8000u)
+
+#define GPIO_PNOT11_PNOT110                     (0x0001u)
+#define GPIO_PNOT11_PNOT111                     (0x0002u)
+#define GPIO_PNOT11_PNOT112                     (0x0004u)
+#define GPIO_PNOT11_PNOT113                     (0x0008u)
+#define GPIO_PNOT11_PNOT114                     (0x0010u)
+#define GPIO_PNOT11_PNOT115                     (0x0020u)
+#define GPIO_PNOT11_PNOT116                     (0x0040u)
+#define GPIO_PNOT11_PNOT117                     (0x0080u)
+#define GPIO_PNOT11_PNOT118                     (0x0100u)
+#define GPIO_PNOT11_PNOT119                     (0x0200u)
+#define GPIO_PNOT11_PNOT1110                    (0x0400u)
+#define GPIO_PNOT11_PNOT1111                    (0x0800u)
+#define GPIO_PNOT11_PNOT1112                    (0x1000u)
+#define GPIO_PNOT11_PNOT1113                    (0x2000u)
+#define GPIO_PNOT11_PNOT1114                    (0x4000u)
+#define GPIO_PNOT11_PNOT1115                    (0x8000u)
+
+#define GPIO_PMSR11_PMSR110                     (0x00000001uL)
+#define GPIO_PMSR11_PMSR111                     (0x00000002uL)
+#define GPIO_PMSR11_PMSR112                     (0x00000004uL)
+#define GPIO_PMSR11_PMSR113                     (0x00000008uL)
+#define GPIO_PMSR11_PMSR114                     (0x00000010uL)
+#define GPIO_PMSR11_PMSR115                     (0x00000020uL)
+#define GPIO_PMSR11_PMSR116                     (0x00000040uL)
+#define GPIO_PMSR11_PMSR117                     (0x00000080uL)
+#define GPIO_PMSR11_PMSR118                     (0x00000100uL)
+#define GPIO_PMSR11_PMSR119                     (0x00000200uL)
+#define GPIO_PMSR11_PMSR1110                    (0x00000400uL)
+#define GPIO_PMSR11_PMSR1111                    (0x00000800uL)
+#define GPIO_PMSR11_PMSR1112                    (0x00001000uL)
+#define GPIO_PMSR11_PMSR1113                    (0x00002000uL)
+#define GPIO_PMSR11_PMSR1114                    (0x00004000uL)
+#define GPIO_PMSR11_PMSR1115                    (0x00008000uL)
+#define GPIO_PMSR11_PMSR1116                    (0x00010000uL)
+#define GPIO_PMSR11_PMSR1117                    (0x00020000uL)
+#define GPIO_PMSR11_PMSR1118                    (0x00040000uL)
+#define GPIO_PMSR11_PMSR1119                    (0x00080000uL)
+#define GPIO_PMSR11_PMSR1120                    (0x00100000uL)
+#define GPIO_PMSR11_PMSR1121                    (0x00200000uL)
+#define GPIO_PMSR11_PMSR1122                    (0x00400000uL)
+#define GPIO_PMSR11_PMSR1123                    (0x00800000uL)
+#define GPIO_PMSR11_PMSR1124                    (0x01000000uL)
+#define GPIO_PMSR11_PMSR1125                    (0x02000000uL)
+#define GPIO_PMSR11_PMSR1126                    (0x04000000uL)
+#define GPIO_PMSR11_PMSR1127                    (0x08000000uL)
+#define GPIO_PMSR11_PMSR1128                    (0x10000000uL)
+#define GPIO_PMSR11_PMSR1129                    (0x20000000uL)
+#define GPIO_PMSR11_PMSR1130                    (0x40000000uL)
+#define GPIO_PMSR11_PMSR1131                    (0x80000000uL)
+
+#define GPIO_PMCSR11_PMCSR110                   (0x00000001uL)
+#define GPIO_PMCSR11_PMCSR111                   (0x00000002uL)
+#define GPIO_PMCSR11_PMCSR112                   (0x00000004uL)
+#define GPIO_PMCSR11_PMCSR113                   (0x00000008uL)
+#define GPIO_PMCSR11_PMCSR114                   (0x00000010uL)
+#define GPIO_PMCSR11_PMCSR115                   (0x00000020uL)
+#define GPIO_PMCSR11_PMCSR116                   (0x00000040uL)
+#define GPIO_PMCSR11_PMCSR117                   (0x00000080uL)
+#define GPIO_PMCSR11_PMCSR118                   (0x00000100uL)
+#define GPIO_PMCSR11_PMCSR119                   (0x00000200uL)
+#define GPIO_PMCSR11_PMCSR1110                  (0x00000400uL)
+#define GPIO_PMCSR11_PMCSR1111                  (0x00000800uL)
+#define GPIO_PMCSR11_PMCSR1112                  (0x00001000uL)
+#define GPIO_PMCSR11_PMCSR1113                  (0x00002000uL)
+#define GPIO_PMCSR11_PMCSR1114                  (0x00004000uL)
+#define GPIO_PMCSR11_PMCSR1115                  (0x00008000uL)
+#define GPIO_PMCSR11_PMCSR1116                  (0x00010000uL)
+#define GPIO_PMCSR11_PMCSR1117                  (0x00020000uL)
+#define GPIO_PMCSR11_PMCSR1118                  (0x00040000uL)
+#define GPIO_PMCSR11_PMCSR1119                  (0x00080000uL)
+#define GPIO_PMCSR11_PMCSR1120                  (0x00100000uL)
+#define GPIO_PMCSR11_PMCSR1121                  (0x00200000uL)
+#define GPIO_PMCSR11_PMCSR1122                  (0x00400000uL)
+#define GPIO_PMCSR11_PMCSR1123                  (0x00800000uL)
+#define GPIO_PMCSR11_PMCSR1124                  (0x01000000uL)
+#define GPIO_PMCSR11_PMCSR1125                  (0x02000000uL)
+#define GPIO_PMCSR11_PMCSR1126                  (0x04000000uL)
+#define GPIO_PMCSR11_PMCSR1127                  (0x08000000uL)
+#define GPIO_PMCSR11_PMCSR1128                  (0x10000000uL)
+#define GPIO_PMCSR11_PMCSR1129                  (0x20000000uL)
+#define GPIO_PMCSR11_PMCSR1130                  (0x40000000uL)
+#define GPIO_PMCSR11_PMCSR1131                  (0x80000000uL)
+
+#define GPIO_PFCAE11_PFCAE110                   (0x0001u)
+#define GPIO_PFCAE11_PFCAE111                   (0x0002u)
+#define GPIO_PFCAE11_PFCAE112                   (0x0004u)
+#define GPIO_PFCAE11_PFCAE113                   (0x0008u)
+#define GPIO_PFCAE11_PFCAE114                   (0x0010u)
+#define GPIO_PFCAE11_PFCAE115                   (0x0020u)
+#define GPIO_PFCAE11_PFCAE116                   (0x0040u)
+#define GPIO_PFCAE11_PFCAE117                   (0x0080u)
+#define GPIO_PFCAE11_PFCAE118                   (0x0100u)
+#define GPIO_PFCAE11_PFCAE119                   (0x0200u)
+#define GPIO_PFCAE11_PFCAE1110                  (0x0400u)
+#define GPIO_PFCAE11_PFCAE1111                  (0x0800u)
+#define GPIO_PFCAE11_PFCAE1112                  (0x1000u)
+#define GPIO_PFCAE11_PFCAE1113                  (0x2000u)
+#define GPIO_PFCAE11_PFCAE1114                  (0x4000u)
+#define GPIO_PFCAE11_PFCAE1115                  (0x8000u)
+
+#define GPIO_PIBC11_PIBC110                     (0x0001u)
+#define GPIO_PIBC11_PIBC111                     (0x0002u)
+#define GPIO_PIBC11_PIBC112                     (0x0004u)
+#define GPIO_PIBC11_PIBC113                     (0x0008u)
+#define GPIO_PIBC11_PIBC114                     (0x0010u)
+#define GPIO_PIBC11_PIBC115                     (0x0020u)
+#define GPIO_PIBC11_PIBC116                     (0x0040u)
+#define GPIO_PIBC11_PIBC117                     (0x0080u)
+#define GPIO_PIBC11_PIBC118                     (0x0100u)
+#define GPIO_PIBC11_PIBC119                     (0x0200u)
+#define GPIO_PIBC11_PIBC1110                    (0x0400u)
+#define GPIO_PIBC11_PIBC1111                    (0x0800u)
+#define GPIO_PIBC11_PIBC1112                    (0x1000u)
+#define GPIO_PIBC11_PIBC1113                    (0x2000u)
+#define GPIO_PIBC11_PIBC1114                    (0x4000u)
+#define GPIO_PIBC11_PIBC1115                    (0x8000u)
+
+#define GPIO_PBDC11_PBDC110                     (0x0001u)
+#define GPIO_PBDC11_PBDC111                     (0x0002u)
+#define GPIO_PBDC11_PBDC112                     (0x0004u)
+#define GPIO_PBDC11_PBDC113                     (0x0008u)
+#define GPIO_PBDC11_PBDC114                     (0x0010u)
+#define GPIO_PBDC11_PBDC115                     (0x0020u)
+#define GPIO_PBDC11_PBDC116                     (0x0040u)
+#define GPIO_PBDC11_PBDC117                     (0x0080u)
+#define GPIO_PBDC11_PBDC118                     (0x0100u)
+#define GPIO_PBDC11_PBDC119                     (0x0200u)
+#define GPIO_PBDC11_PBDC1110                    (0x0400u)
+#define GPIO_PBDC11_PBDC1111                    (0x0800u)
+#define GPIO_PBDC11_PBDC1112                    (0x1000u)
+#define GPIO_PBDC11_PBDC1113                    (0x2000u)
+#define GPIO_PBDC11_PBDC1114                    (0x4000u)
+#define GPIO_PBDC11_PBDC1115                    (0x8000u)
+
+#define GPIO_PIPC11_PIPC110                     (0x0001u)
+#define GPIO_PIPC11_PIPC111                     (0x0002u)
+#define GPIO_PIPC11_PIPC112                     (0x0004u)
+#define GPIO_PIPC11_PIPC113                     (0x0008u)
+#define GPIO_PIPC11_PIPC114                     (0x0010u)
+#define GPIO_PIPC11_PIPC115                     (0x0020u)
+#define GPIO_PIPC11_PIPC116                     (0x0040u)
+#define GPIO_PIPC11_PIPC117                     (0x0080u)
+#define GPIO_PIPC11_PIPC118                     (0x0100u)
+#define GPIO_PIPC11_PIPC119                     (0x0200u)
+#define GPIO_PIPC11_PIPC1110                    (0x0400u)
+#define GPIO_PIPC11_PIPC1111                    (0x0800u)
+#define GPIO_PIPC11_PIPC1112                    (0x1000u)
+#define GPIO_PIPC11_PIPC1113                    (0x2000u)
+#define GPIO_PIPC11_PIPC1114                    (0x4000u)
+#define GPIO_PIPC11_PIPC1115                    (0x8000u)
+
+
+/* ==== Shift values for IO registers ==== */
+/* ---- P0 ---- */
+#define GPIO_PPR0_PPR00_SHIFT                   (0u)
+#define GPIO_PPR0_PPR01_SHIFT                   (1u)
+#define GPIO_PPR0_PPR02_SHIFT                   (2u)
+#define GPIO_PPR0_PPR03_SHIFT                   (3u)
+#define GPIO_PPR0_PPR04_SHIFT                   (4u)
+#define GPIO_PPR0_PPR05_SHIFT                   (5u)
+
+#define GPIO_PMC0_PMC04_SHIFT                   (4u)
+#define GPIO_PMC0_PMC05_SHIFT                   (5u)
+
+#define GPIO_PMCSR0_PMCSR04_SHIFT               (4u)
+#define GPIO_PMCSR0_PMCSR05_SHIFT               (5u)
+
+#define GPIO_PIBC0_PIBC00_SHIFT                 (0u)
+#define GPIO_PIBC0_PIBC01_SHIFT                 (1u)
+#define GPIO_PIBC0_PIBC02_SHIFT                 (2u)
+#define GPIO_PIBC0_PIBC03_SHIFT                 (3u)
+#define GPIO_PIBC0_PIBC04_SHIFT                 (4u)
+#define GPIO_PIBC0_PIBC05_SHIFT                 (5u)
+
+/* ---- P1 ---- */
+#define GPIO_P1_P10_SHIFT                       (0u)
+#define GPIO_P1_P11_SHIFT                       (1u)
+#define GPIO_P1_P12_SHIFT                       (2u)
+#define GPIO_P1_P13_SHIFT                       (3u)
+#define GPIO_P1_P14_SHIFT                       (4u)
+#define GPIO_P1_P15_SHIFT                       (5u)
+#define GPIO_P1_P16_SHIFT                       (6u)
+#define GPIO_P1_P17_SHIFT                       (7u)
+
+#define GPIO_PSR1_PSR10_SHIFT                   (0u)
+#define GPIO_PSR1_PSR11_SHIFT                   (1u)
+#define GPIO_PSR1_PSR12_SHIFT                   (2u)
+#define GPIO_PSR1_PSR13_SHIFT                   (3u)
+#define GPIO_PSR1_PSR14_SHIFT                   (4u)
+#define GPIO_PSR1_PSR15_SHIFT                   (5u)
+#define GPIO_PSR1_PSR16_SHIFT                   (6u)
+#define GPIO_PSR1_PSR17_SHIFT                   (7u)
+#define GPIO_PSR1_PSR116_SHIFT                  (16u)
+#define GPIO_PSR1_PSR117_SHIFT                  (17u)
+#define GPIO_PSR1_PSR118_SHIFT                  (18u)
+#define GPIO_PSR1_PSR119_SHIFT                  (19u)
+#define GPIO_PSR1_PSR120_SHIFT                  (20u)
+#define GPIO_PSR1_PSR121_SHIFT                  (21u)
+#define GPIO_PSR1_PSR122_SHIFT                  (22u)
+#define GPIO_PSR1_PSR123_SHIFT                  (23u)
+
+#define GPIO_PPR1_PPR10_SHIFT                   (0u)
+#define GPIO_PPR1_PPR11_SHIFT                   (1u)
+#define GPIO_PPR1_PPR12_SHIFT                   (2u)
+#define GPIO_PPR1_PPR13_SHIFT                   (3u)
+#define GPIO_PPR1_PPR14_SHIFT                   (4u)
+#define GPIO_PPR1_PPR15_SHIFT                   (5u)
+#define GPIO_PPR1_PPR16_SHIFT                   (6u)
+#define GPIO_PPR1_PPR17_SHIFT                   (7u)
+#define GPIO_PPR1_PPR18_SHIFT                   (8u)
+#define GPIO_PPR1_PPR19_SHIFT                   (9u)
+#define GPIO_PPR1_PPR110_SHIFT                  (10u)
+#define GPIO_PPR1_PPR111_SHIFT                  (11u)
+#define GPIO_PPR1_PPR112_SHIFT                  (12u)
+#define GPIO_PPR1_PPR113_SHIFT                  (13u)
+#define GPIO_PPR1_PPR114_SHIFT                  (14u)
+#define GPIO_PPR1_PPR115_SHIFT                  (15u)
+
+#define GPIO_PM1_PM10_SHIFT                     (0u)
+#define GPIO_PM1_PM11_SHIFT                     (1u)
+#define GPIO_PM1_PM12_SHIFT                     (2u)
+#define GPIO_PM1_PM13_SHIFT                     (3u)
+#define GPIO_PM1_PM14_SHIFT                     (4u)
+#define GPIO_PM1_PM15_SHIFT                     (5u)
+#define GPIO_PM1_PM16_SHIFT                     (6u)
+#define GPIO_PM1_PM17_SHIFT                     (7u)
+
+#define GPIO_PMC1_PMC10_SHIFT                   (0u)
+#define GPIO_PMC1_PMC11_SHIFT                   (1u)
+#define GPIO_PMC1_PMC12_SHIFT                   (2u)
+#define GPIO_PMC1_PMC13_SHIFT                   (3u)
+#define GPIO_PMC1_PMC14_SHIFT                   (4u)
+#define GPIO_PMC1_PMC15_SHIFT                   (5u)
+#define GPIO_PMC1_PMC16_SHIFT                   (6u)
+#define GPIO_PMC1_PMC17_SHIFT                   (7u)
+#define GPIO_PMC1_PMC18_SHIFT                   (8u)
+#define GPIO_PMC1_PMC19_SHIFT                   (9u)
+#define GPIO_PMC1_PMC110_SHIFT                  (10u)
+#define GPIO_PMC1_PMC111_SHIFT                  (11u)
+#define GPIO_PMC1_PMC112_SHIFT                  (12u)
+#define GPIO_PMC1_PMC113_SHIFT                  (13u)
+#define GPIO_PMC1_PMC114_SHIFT                  (14u)
+#define GPIO_PMC1_PMC115_SHIFT                  (15u)
+
+#define GPIO_PFC1_PFC10_SHIFT                   (0u)
+#define GPIO_PFC1_PFC11_SHIFT                   (1u)
+#define GPIO_PFC1_PFC12_SHIFT                   (2u)
+#define GPIO_PFC1_PFC13_SHIFT                   (3u)
+#define GPIO_PFC1_PFC14_SHIFT                   (4u)
+#define GPIO_PFC1_PFC15_SHIFT                   (5u)
+#define GPIO_PFC1_PFC16_SHIFT                   (6u)
+#define GPIO_PFC1_PFC17_SHIFT                   (7u)
+#define GPIO_PFC1_PFC18_SHIFT                   (8u)
+#define GPIO_PFC1_PFC19_SHIFT                   (9u)
+#define GPIO_PFC1_PFC110_SHIFT                  (10u)
+#define GPIO_PFC1_PFC111_SHIFT                  (11u)
+#define GPIO_PFC1_PFC112_SHIFT                  (12u)
+#define GPIO_PFC1_PFC113_SHIFT                  (13u)
+#define GPIO_PFC1_PFC114_SHIFT                  (14u)
+#define GPIO_PFC1_PFC115_SHIFT                  (15u)
+
+#define GPIO_PFCE1_PFCE10_SHIFT                 (0u)
+#define GPIO_PFCE1_PFCE11_SHIFT                 (1u)
+#define GPIO_PFCE1_PFCE12_SHIFT                 (2u)
+#define GPIO_PFCE1_PFCE13_SHIFT                 (3u)
+#define GPIO_PFCE1_PFCE14_SHIFT                 (4u)
+#define GPIO_PFCE1_PFCE15_SHIFT                 (5u)
+#define GPIO_PFCE1_PFCE16_SHIFT                 (6u)
+#define GPIO_PFCE1_PFCE17_SHIFT                 (7u)
+#define GPIO_PFCE1_PFCE18_SHIFT                 (8u)
+#define GPIO_PFCE1_PFCE19_SHIFT                 (9u)
+#define GPIO_PFCE1_PFCE110_SHIFT                (10u)
+#define GPIO_PFCE1_PFCE111_SHIFT                (11u)
+#define GPIO_PFCE1_PFCE112_SHIFT                (12u)
+#define GPIO_PFCE1_PFCE113_SHIFT                (13u)
+#define GPIO_PFCE1_PFCE114_SHIFT                (14u)
+#define GPIO_PFCE1_PFCE115_SHIFT                (15u)
+
+#define GPIO_PNOT1_PNOT10_SHIFT                 (0u)
+#define GPIO_PNOT1_PNOT11_SHIFT                 (1u)
+#define GPIO_PNOT1_PNOT12_SHIFT                 (2u)
+#define GPIO_PNOT1_PNOT13_SHIFT                 (3u)
+#define GPIO_PNOT1_PNOT14_SHIFT                 (4u)
+#define GPIO_PNOT1_PNOT15_SHIFT                 (5u)
+#define GPIO_PNOT1_PNOT16_SHIFT                 (6u)
+#define GPIO_PNOT1_PNOT17_SHIFT                 (7u)
+
+#define GPIO_PMSR1_PMSR10_SHIFT                 (0u)
+#define GPIO_PMSR1_PMSR11_SHIFT                 (1u)
+#define GPIO_PMSR1_PMSR12_SHIFT                 (2u)
+#define GPIO_PMSR1_PMSR13_SHIFT                 (3u)
+#define GPIO_PMSR1_PMSR14_SHIFT                 (4u)
+#define GPIO_PMSR1_PMSR15_SHIFT                 (5u)
+#define GPIO_PMSR1_PMSR16_SHIFT                 (6u)
+#define GPIO_PMSR1_PMSR17_SHIFT                 (7u)
+#define GPIO_PMSR1_PMSR116_SHIFT                (16u)
+#define GPIO_PMSR1_PMSR117_SHIFT                (17u)
+#define GPIO_PMSR1_PMSR118_SHIFT                (18u)
+#define GPIO_PMSR1_PMSR119_SHIFT                (19u)
+#define GPIO_PMSR1_PMSR120_SHIFT                (20u)
+#define GPIO_PMSR1_PMSR121_SHIFT                (21u)
+#define GPIO_PMSR1_PMSR122_SHIFT                (22u)
+#define GPIO_PMSR1_PMSR123_SHIFT                (23u)
+
+#define GPIO_PMCSR1_PMCSR10_SHIFT               (0u)
+#define GPIO_PMCSR1_PMCSR11_SHIFT               (1u)
+#define GPIO_PMCSR1_PMCSR12_SHIFT               (2u)
+#define GPIO_PMCSR1_PMCSR13_SHIFT               (3u)
+#define GPIO_PMCSR1_PMCSR14_SHIFT               (4u)
+#define GPIO_PMCSR1_PMCSR15_SHIFT               (5u)
+#define GPIO_PMCSR1_PMCSR16_SHIFT               (6u)
+#define GPIO_PMCSR1_PMCSR17_SHIFT               (7u)
+#define GPIO_PMCSR1_PMCSR116_SHIFT              (16u)
+#define GPIO_PMCSR1_PMCSR117_SHIFT              (17u)
+#define GPIO_PMCSR1_PMCSR118_SHIFT              (18u)
+#define GPIO_PMCSR1_PMCSR119_SHIFT              (19u)
+#define GPIO_PMCSR1_PMCSR120_SHIFT              (20u)
+#define GPIO_PMCSR1_PMCSR121_SHIFT              (21u)
+#define GPIO_PMCSR1_PMCSR122_SHIFT              (22u)
+#define GPIO_PMCSR1_PMCSR123_SHIFT              (23u)
+
+#define GPIO_PFCAE1_PFCAE10_SHIFT               (0u)
+#define GPIO_PFCAE1_PFCAE11_SHIFT               (1u)
+#define GPIO_PFCAE1_PFCAE12_SHIFT               (2u)
+#define GPIO_PFCAE1_PFCAE13_SHIFT               (3u)
+#define GPIO_PFCAE1_PFCAE14_SHIFT               (4u)
+#define GPIO_PFCAE1_PFCAE15_SHIFT               (5u)
+#define GPIO_PFCAE1_PFCAE16_SHIFT               (6u)
+#define GPIO_PFCAE1_PFCAE17_SHIFT               (7u)
+#define GPIO_PFCAE1_PFCAE18_SHIFT               (8u)
+#define GPIO_PFCAE1_PFCAE19_SHIFT               (9u)
+#define GPIO_PFCAE1_PFCAE110_SHIFT              (10u)
+#define GPIO_PFCAE1_PFCAE111_SHIFT              (11u)
+#define GPIO_PFCAE1_PFCAE112_SHIFT              (12u)
+#define GPIO_PFCAE1_PFCAE113_SHIFT              (13u)
+#define GPIO_PFCAE1_PFCAE114_SHIFT              (14u)
+#define GPIO_PFCAE1_PFCAE115_SHIFT              (15u)
+
+#define GPIO_PIBC1_PIBC10_SHIFT                 (0u)
+#define GPIO_PIBC1_PIBC11_SHIFT                 (1u)
+#define GPIO_PIBC1_PIBC12_SHIFT                 (2u)
+#define GPIO_PIBC1_PIBC13_SHIFT                 (3u)
+#define GPIO_PIBC1_PIBC14_SHIFT                 (4u)
+#define GPIO_PIBC1_PIBC15_SHIFT                 (5u)
+#define GPIO_PIBC1_PIBC16_SHIFT                 (6u)
+#define GPIO_PIBC1_PIBC17_SHIFT                 (7u)
+#define GPIO_PIBC1_PIBC18_SHIFT                 (8u)
+#define GPIO_PIBC1_PIBC19_SHIFT                 (9u)
+#define GPIO_PIBC1_PIBC110_SHIFT                (10u)
+#define GPIO_PIBC1_PIBC111_SHIFT                (11u)
+#define GPIO_PIBC1_PIBC112_SHIFT                (12u)
+#define GPIO_PIBC1_PIBC113_SHIFT                (13u)
+#define GPIO_PIBC1_PIBC114_SHIFT                (14u)
+#define GPIO_PIBC1_PIBC115_SHIFT                (15u)
+
+#define GPIO_PBDC1_PBDC10_SHIFT                 (0u)
+#define GPIO_PBDC1_PBDC11_SHIFT                 (1u)
+#define GPIO_PBDC1_PBDC12_SHIFT                 (2u)
+#define GPIO_PBDC1_PBDC13_SHIFT                 (3u)
+#define GPIO_PBDC1_PBDC14_SHIFT                 (4u)
+#define GPIO_PBDC1_PBDC15_SHIFT                 (5u)
+#define GPIO_PBDC1_PBDC16_SHIFT                 (6u)
+#define GPIO_PBDC1_PBDC17_SHIFT                 (7u)
+#define GPIO_PBDC1_PBDC18_SHIFT                 (8u)
+#define GPIO_PBDC1_PBDC19_SHIFT                 (9u)
+#define GPIO_PBDC1_PBDC110_SHIFT                (10u)
+#define GPIO_PBDC1_PBDC111_SHIFT                (11u)
+#define GPIO_PBDC1_PBDC112_SHIFT                (12u)
+#define GPIO_PBDC1_PBDC113_SHIFT                (13u)
+#define GPIO_PBDC1_PBDC114_SHIFT                (14u)
+#define GPIO_PBDC1_PBDC115_SHIFT                (15u)
+
+#define GPIO_PIPC1_PIPC10_SHIFT                 (0u)
+#define GPIO_PIPC1_PIPC11_SHIFT                 (1u)
+#define GPIO_PIPC1_PIPC12_SHIFT                 (2u)
+#define GPIO_PIPC1_PIPC13_SHIFT                 (3u)
+#define GPIO_PIPC1_PIPC14_SHIFT                 (4u)
+#define GPIO_PIPC1_PIPC15_SHIFT                 (5u)
+#define GPIO_PIPC1_PIPC16_SHIFT                 (6u)
+#define GPIO_PIPC1_PIPC17_SHIFT                 (7u)
+
+/* ---- P2 ---- */
+#define GPIO_P2_P20_SHIFT                       (0u)
+#define GPIO_P2_P21_SHIFT                       (1u)
+#define GPIO_P2_P22_SHIFT                       (2u)
+#define GPIO_P2_P23_SHIFT                       (3u)
+#define GPIO_P2_P24_SHIFT                       (4u)
+#define GPIO_P2_P25_SHIFT                       (5u)
+#define GPIO_P2_P26_SHIFT                       (6u)
+#define GPIO_P2_P27_SHIFT                       (7u)
+#define GPIO_P2_P28_SHIFT                       (8u)
+#define GPIO_P2_P29_SHIFT                       (9u)
+#define GPIO_P2_P210_SHIFT                      (10u)
+#define GPIO_P2_P211_SHIFT                      (11u)
+#define GPIO_P2_P212_SHIFT                      (12u)
+#define GPIO_P2_P213_SHIFT                      (13u)
+#define GPIO_P2_P214_SHIFT                      (14u)
+#define GPIO_P2_P215_SHIFT                      (15u)
+
+#define GPIO_PSR2_PSR20_SHIFT                   (0u)
+#define GPIO_PSR2_PSR21_SHIFT                   (1u)
+#define GPIO_PSR2_PSR22_SHIFT                   (2u)
+#define GPIO_PSR2_PSR23_SHIFT                   (3u)
+#define GPIO_PSR2_PSR24_SHIFT                   (4u)
+#define GPIO_PSR2_PSR25_SHIFT                   (5u)
+#define GPIO_PSR2_PSR26_SHIFT                   (6u)
+#define GPIO_PSR2_PSR27_SHIFT                   (7u)
+#define GPIO_PSR2_PSR28_SHIFT                   (8u)
+#define GPIO_PSR2_PSR29_SHIFT                   (9u)
+#define GPIO_PSR2_PSR210_SHIFT                  (10u)
+#define GPIO_PSR2_PSR211_SHIFT                  (11u)
+#define GPIO_PSR2_PSR212_SHIFT                  (12u)
+#define GPIO_PSR2_PSR213_SHIFT                  (13u)
+#define GPIO_PSR2_PSR214_SHIFT                  (14u)
+#define GPIO_PSR2_PSR215_SHIFT                  (15u)
+#define GPIO_PSR2_PSR216_SHIFT                  (16u)
+#define GPIO_PSR2_PSR217_SHIFT                  (17u)
+#define GPIO_PSR2_PSR218_SHIFT                  (18u)
+#define GPIO_PSR2_PSR219_SHIFT                  (19u)
+#define GPIO_PSR2_PSR220_SHIFT                  (20u)
+#define GPIO_PSR2_PSR221_SHIFT                  (21u)
+#define GPIO_PSR2_PSR222_SHIFT                  (22u)
+#define GPIO_PSR2_PSR223_SHIFT                  (23u)
+#define GPIO_PSR2_PSR224_SHIFT                  (24u)
+#define GPIO_PSR2_PSR225_SHIFT                  (25u)
+#define GPIO_PSR2_PSR226_SHIFT                  (26u)
+#define GPIO_PSR2_PSR227_SHIFT                  (27u)
+#define GPIO_PSR2_PSR228_SHIFT                  (28u)
+#define GPIO_PSR2_PSR229_SHIFT                  (29u)
+#define GPIO_PSR2_PSR230_SHIFT                  (30u)
+#define GPIO_PSR2_PSR231_SHIFT                  (31u)
+
+#define GPIO_PPR2_PPR20_SHIFT                   (0u)
+#define GPIO_PPR2_PPR21_SHIFT                   (1u)
+#define GPIO_PPR2_PPR22_SHIFT                   (2u)
+#define GPIO_PPR2_PPR23_SHIFT                   (3u)
+#define GPIO_PPR2_PPR24_SHIFT                   (4u)
+#define GPIO_PPR2_PPR25_SHIFT                   (5u)
+#define GPIO_PPR2_PPR26_SHIFT                   (6u)
+#define GPIO_PPR2_PPR27_SHIFT                   (7u)
+#define GPIO_PPR2_PPR28_SHIFT                   (8u)
+#define GPIO_PPR2_PPR29_SHIFT                   (9u)
+#define GPIO_PPR2_PPR210_SHIFT                  (10u)
+#define GPIO_PPR2_PPR211_SHIFT                  (11u)
+#define GPIO_PPR2_PPR212_SHIFT                  (12u)
+#define GPIO_PPR2_PPR213_SHIFT                  (13u)
+#define GPIO_PPR2_PPR214_SHIFT                  (14u)
+#define GPIO_PPR2_PPR215_SHIFT                  (15u)
+
+#define GPIO_PM2_PM20_SHIFT                     (0u)
+#define GPIO_PM2_PM21_SHIFT                     (1u)
+#define GPIO_PM2_PM22_SHIFT                     (2u)
+#define GPIO_PM2_PM23_SHIFT                     (3u)
+#define GPIO_PM2_PM24_SHIFT                     (4u)
+#define GPIO_PM2_PM25_SHIFT                     (5u)
+#define GPIO_PM2_PM26_SHIFT                     (6u)
+#define GPIO_PM2_PM27_SHIFT                     (7u)
+#define GPIO_PM2_PM28_SHIFT                     (8u)
+#define GPIO_PM2_PM29_SHIFT                     (9u)
+#define GPIO_PM2_PM210_SHIFT                    (10u)
+#define GPIO_PM2_PM211_SHIFT                    (11u)
+#define GPIO_PM2_PM212_SHIFT                    (12u)
+#define GPIO_PM2_PM213_SHIFT                    (13u)
+#define GPIO_PM2_PM214_SHIFT                    (14u)
+#define GPIO_PM2_PM215_SHIFT                    (15u)
+
+#define GPIO_PMC2_PMC20_SHIFT                   (0u)
+#define GPIO_PMC2_PMC21_SHIFT                   (1u)
+#define GPIO_PMC2_PMC22_SHIFT                   (2u)
+#define GPIO_PMC2_PMC23_SHIFT                   (3u)
+#define GPIO_PMC2_PMC24_SHIFT                   (4u)
+#define GPIO_PMC2_PMC25_SHIFT                   (5u)
+#define GPIO_PMC2_PMC26_SHIFT                   (6u)
+#define GPIO_PMC2_PMC27_SHIFT                   (7u)
+#define GPIO_PMC2_PMC28_SHIFT                   (8u)
+#define GPIO_PMC2_PMC29_SHIFT                   (9u)
+#define GPIO_PMC2_PMC210_SHIFT                  (10u)
+#define GPIO_PMC2_PMC211_SHIFT                  (11u)
+#define GPIO_PMC2_PMC212_SHIFT                  (12u)
+#define GPIO_PMC2_PMC213_SHIFT                  (13u)
+#define GPIO_PMC2_PMC214_SHIFT                  (14u)
+#define GPIO_PMC2_PMC215_SHIFT                  (15u)
+
+#define GPIO_PFC2_PFC20_SHIFT                   (0u)
+#define GPIO_PFC2_PFC21_SHIFT                   (1u)
+#define GPIO_PFC2_PFC22_SHIFT                   (2u)
+#define GPIO_PFC2_PFC23_SHIFT                   (3u)
+#define GPIO_PFC2_PFC24_SHIFT                   (4u)
+#define GPIO_PFC2_PFC25_SHIFT                   (5u)
+#define GPIO_PFC2_PFC26_SHIFT                   (6u)
+#define GPIO_PFC2_PFC27_SHIFT                   (7u)
+#define GPIO_PFC2_PFC28_SHIFT                   (8u)
+#define GPIO_PFC2_PFC29_SHIFT                   (9u)
+#define GPIO_PFC2_PFC210_SHIFT                  (10u)
+#define GPIO_PFC2_PFC211_SHIFT                  (11u)
+#define GPIO_PFC2_PFC212_SHIFT                  (12u)
+#define GPIO_PFC2_PFC213_SHIFT                  (13u)
+#define GPIO_PFC2_PFC214_SHIFT                  (14u)
+#define GPIO_PFC2_PFC215_SHIFT                  (15u)
+
+#define GPIO_PFCE2_PFCE20_SHIFT                 (0u)
+#define GPIO_PFCE2_PFCE21_SHIFT                 (1u)
+#define GPIO_PFCE2_PFCE22_SHIFT                 (2u)
+#define GPIO_PFCE2_PFCE23_SHIFT                 (3u)
+#define GPIO_PFCE2_PFCE24_SHIFT                 (4u)
+#define GPIO_PFCE2_PFCE25_SHIFT                 (5u)
+#define GPIO_PFCE2_PFCE26_SHIFT                 (6u)
+#define GPIO_PFCE2_PFCE27_SHIFT                 (7u)
+#define GPIO_PFCE2_PFCE28_SHIFT                 (8u)
+#define GPIO_PFCE2_PFCE29_SHIFT                 (9u)
+#define GPIO_PFCE2_PFCE210_SHIFT                (10u)
+#define GPIO_PFCE2_PFCE211_SHIFT                (11u)
+#define GPIO_PFCE2_PFCE212_SHIFT                (12u)
+#define GPIO_PFCE2_PFCE213_SHIFT                (13u)
+#define GPIO_PFCE2_PFCE214_SHIFT                (14u)
+#define GPIO_PFCE2_PFCE215_SHIFT                (15u)
+
+#define GPIO_PNOT2_PNOT20_SHIFT                 (0u)
+#define GPIO_PNOT2_PNOT21_SHIFT                 (1u)
+#define GPIO_PNOT2_PNOT22_SHIFT                 (2u)
+#define GPIO_PNOT2_PNOT23_SHIFT                 (3u)
+#define GPIO_PNOT2_PNOT24_SHIFT                 (4u)
+#define GPIO_PNOT2_PNOT25_SHIFT                 (5u)
+#define GPIO_PNOT2_PNOT26_SHIFT                 (6u)
+#define GPIO_PNOT2_PNOT27_SHIFT                 (7u)
+#define GPIO_PNOT2_PNOT28_SHIFT                 (8u)
+#define GPIO_PNOT2_PNOT29_SHIFT                 (9u)
+#define GPIO_PNOT2_PNOT210_SHIFT                (10u)
+#define GPIO_PNOT2_PNOT211_SHIFT                (11u)
+#define GPIO_PNOT2_PNOT212_SHIFT                (12u)
+#define GPIO_PNOT2_PNOT213_SHIFT                (13u)
+#define GPIO_PNOT2_PNOT214_SHIFT                (14u)
+#define GPIO_PNOT2_PNOT215_SHIFT                (15u)
+
+#define GPIO_PMSR2_PMSR20_SHIFT                 (0u)
+#define GPIO_PMSR2_PMSR21_SHIFT                 (1u)
+#define GPIO_PMSR2_PMSR22_SHIFT                 (2u)
+#define GPIO_PMSR2_PMSR23_SHIFT                 (3u)
+#define GPIO_PMSR2_PMSR24_SHIFT                 (4u)
+#define GPIO_PMSR2_PMSR25_SHIFT                 (5u)
+#define GPIO_PMSR2_PMSR26_SHIFT                 (6u)
+#define GPIO_PMSR2_PMSR27_SHIFT                 (7u)
+#define GPIO_PMSR2_PMSR28_SHIFT                 (8u)
+#define GPIO_PMSR2_PMSR29_SHIFT                 (9u)
+#define GPIO_PMSR2_PMSR210_SHIFT                (10u)
+#define GPIO_PMSR2_PMSR211_SHIFT                (11u)
+#define GPIO_PMSR2_PMSR212_SHIFT                (12u)
+#define GPIO_PMSR2_PMSR213_SHIFT                (13u)
+#define GPIO_PMSR2_PMSR214_SHIFT                (14u)
+#define GPIO_PMSR2_PMSR215_SHIFT                (15u)
+#define GPIO_PMSR2_PMSR216_SHIFT                (16u)
+#define GPIO_PMSR2_PMSR217_SHIFT                (17u)
+#define GPIO_PMSR2_PMSR218_SHIFT                (18u)
+#define GPIO_PMSR2_PMSR219_SHIFT                (19u)
+#define GPIO_PMSR2_PMSR220_SHIFT                (20u)
+#define GPIO_PMSR2_PMSR221_SHIFT                (21u)
+#define GPIO_PMSR2_PMSR222_SHIFT                (22u)
+#define GPIO_PMSR2_PMSR223_SHIFT                (23u)
+#define GPIO_PMSR2_PMSR224_SHIFT                (24u)
+#define GPIO_PMSR2_PMSR225_SHIFT                (25u)
+#define GPIO_PMSR2_PMSR226_SHIFT                (26u)
+#define GPIO_PMSR2_PMSR227_SHIFT                (27u)
+#define GPIO_PMSR2_PMSR228_SHIFT                (28u)
+#define GPIO_PMSR2_PMSR229_SHIFT                (29u)
+#define GPIO_PMSR2_PMSR230_SHIFT                (30u)
+#define GPIO_PMSR2_PMSR231_SHIFT                (31u)
+
+#define GPIO_PMCSR2_PMCSR20_SHIFT               (0u)
+#define GPIO_PMCSR2_PMCSR21_SHIFT               (1u)
+#define GPIO_PMCSR2_PMCSR22_SHIFT               (2u)
+#define GPIO_PMCSR2_PMCSR23_SHIFT               (3u)
+#define GPIO_PMCSR2_PMCSR24_SHIFT               (4u)
+#define GPIO_PMCSR2_PMCSR25_SHIFT               (5u)
+#define GPIO_PMCSR2_PMCSR26_SHIFT               (6u)
+#define GPIO_PMCSR2_PMCSR27_SHIFT               (7u)
+#define GPIO_PMCSR2_PMCSR28_SHIFT               (8u)
+#define GPIO_PMCSR2_PMCSR29_SHIFT               (9u)
+#define GPIO_PMCSR2_PMCSR210_SHIFT              (10u)
+#define GPIO_PMCSR2_PMCSR211_SHIFT              (11u)
+#define GPIO_PMCSR2_PMCSR212_SHIFT              (12u)
+#define GPIO_PMCSR2_PMCSR213_SHIFT              (13u)
+#define GPIO_PMCSR2_PMCSR214_SHIFT              (14u)
+#define GPIO_PMCSR2_PMCSR215_SHIFT              (15u)
+#define GPIO_PMCSR2_PMCSR216_SHIFT              (16u)
+#define GPIO_PMCSR2_PMCSR217_SHIFT              (17u)
+#define GPIO_PMCSR2_PMCSR218_SHIFT              (18u)
+#define GPIO_PMCSR2_PMCSR219_SHIFT              (19u)
+#define GPIO_PMCSR2_PMCSR220_SHIFT              (20u)
+#define GPIO_PMCSR2_PMCSR221_SHIFT              (21u)
+#define GPIO_PMCSR2_PMCSR222_SHIFT              (22u)
+#define GPIO_PMCSR2_PMCSR223_SHIFT              (23u)
+#define GPIO_PMCSR2_PMCSR224_SHIFT              (24u)
+#define GPIO_PMCSR2_PMCSR225_SHIFT              (25u)
+#define GPIO_PMCSR2_PMCSR226_SHIFT              (26u)
+#define GPIO_PMCSR2_PMCSR227_SHIFT              (27u)
+#define GPIO_PMCSR2_PMCSR228_SHIFT              (28u)
+#define GPIO_PMCSR2_PMCSR229_SHIFT              (29u)
+#define GPIO_PMCSR2_PMCSR230_SHIFT              (30u)
+#define GPIO_PMCSR2_PMCSR231_SHIFT              (31u)
+
+#define GPIO_PFCAE2_PFCAE20_SHIFT               (0u)
+#define GPIO_PFCAE2_PFCAE21_SHIFT               (1u)
+#define GPIO_PFCAE2_PFCAE22_SHIFT               (2u)
+#define GPIO_PFCAE2_PFCAE23_SHIFT               (3u)
+#define GPIO_PFCAE2_PFCAE24_SHIFT               (4u)
+#define GPIO_PFCAE2_PFCAE25_SHIFT               (5u)
+#define GPIO_PFCAE2_PFCAE26_SHIFT               (6u)
+#define GPIO_PFCAE2_PFCAE27_SHIFT               (7u)
+#define GPIO_PFCAE2_PFCAE28_SHIFT               (8u)
+#define GPIO_PFCAE2_PFCAE29_SHIFT               (9u)
+#define GPIO_PFCAE2_PFCAE210_SHIFT              (10u)
+#define GPIO_PFCAE2_PFCAE211_SHIFT              (11u)
+#define GPIO_PFCAE2_PFCAE212_SHIFT              (12u)
+#define GPIO_PFCAE2_PFCAE213_SHIFT              (13u)
+#define GPIO_PFCAE2_PFCAE214_SHIFT              (14u)
+#define GPIO_PFCAE2_PFCAE215_SHIFT              (15u)
+
+#define GPIO_PIBC2_PIBC20_SHIFT                 (0u)
+#define GPIO_PIBC2_PIBC21_SHIFT                 (1u)
+#define GPIO_PIBC2_PIBC22_SHIFT                 (2u)
+#define GPIO_PIBC2_PIBC23_SHIFT                 (3u)
+#define GPIO_PIBC2_PIBC24_SHIFT                 (4u)
+#define GPIO_PIBC2_PIBC25_SHIFT                 (5u)
+#define GPIO_PIBC2_PIBC26_SHIFT                 (6u)
+#define GPIO_PIBC2_PIBC27_SHIFT                 (7u)
+#define GPIO_PIBC2_PIBC28_SHIFT                 (8u)
+#define GPIO_PIBC2_PIBC29_SHIFT                 (9u)
+#define GPIO_PIBC2_PIBC210_SHIFT                (10u)
+#define GPIO_PIBC2_PIBC211_SHIFT                (11u)
+#define GPIO_PIBC2_PIBC212_SHIFT                (12u)
+#define GPIO_PIBC2_PIBC213_SHIFT                (13u)
+#define GPIO_PIBC2_PIBC214_SHIFT                (14u)
+#define GPIO_PIBC2_PIBC215_SHIFT                (15u)
+
+#define GPIO_PBDC2_PBDC20_SHIFT                 (0u)
+#define GPIO_PBDC2_PBDC21_SHIFT                 (1u)
+#define GPIO_PBDC2_PBDC22_SHIFT                 (2u)
+#define GPIO_PBDC2_PBDC23_SHIFT                 (3u)
+#define GPIO_PBDC2_PBDC24_SHIFT                 (4u)
+#define GPIO_PBDC2_PBDC25_SHIFT                 (5u)
+#define GPIO_PBDC2_PBDC26_SHIFT                 (6u)
+#define GPIO_PBDC2_PBDC27_SHIFT                 (7u)
+#define GPIO_PBDC2_PBDC28_SHIFT                 (8u)
+#define GPIO_PBDC2_PBDC29_SHIFT                 (9u)
+#define GPIO_PBDC2_PBDC210_SHIFT                (10u)
+#define GPIO_PBDC2_PBDC211_SHIFT                (11u)
+#define GPIO_PBDC2_PBDC212_SHIFT                (12u)
+#define GPIO_PBDC2_PBDC213_SHIFT                (13u)
+#define GPIO_PBDC2_PBDC214_SHIFT                (14u)
+#define GPIO_PBDC2_PBDC215_SHIFT                (15u)
+
+#define GPIO_PIPC2_PIPC20_SHIFT                 (0u)
+#define GPIO_PIPC2_PIPC21_SHIFT                 (1u)
+#define GPIO_PIPC2_PIPC22_SHIFT                 (2u)
+#define GPIO_PIPC2_PIPC23_SHIFT                 (3u)
+#define GPIO_PIPC2_PIPC24_SHIFT                 (4u)
+#define GPIO_PIPC2_PIPC25_SHIFT                 (5u)
+#define GPIO_PIPC2_PIPC26_SHIFT                 (6u)
+#define GPIO_PIPC2_PIPC27_SHIFT                 (7u)
+#define GPIO_PIPC2_PIPC28_SHIFT                 (8u)
+#define GPIO_PIPC2_PIPC29_SHIFT                 (9u)
+#define GPIO_PIPC2_PIPC210_SHIFT                (10u)
+#define GPIO_PIPC2_PIPC211_SHIFT                (11u)
+#define GPIO_PIPC2_PIPC212_SHIFT                (12u)
+#define GPIO_PIPC2_PIPC213_SHIFT                (13u)
+#define GPIO_PIPC2_PIPC214_SHIFT                (14u)
+#define GPIO_PIPC2_PIPC215_SHIFT                (15u)
+
+/* ---- P3 ---- */
+#define GPIO_P3_P30_SHIFT                       (0u)
+#define GPIO_P3_P31_SHIFT                       (1u)
+#define GPIO_P3_P32_SHIFT                       (2u)
+#define GPIO_P3_P33_SHIFT                       (3u)
+#define GPIO_P3_P34_SHIFT                       (4u)
+#define GPIO_P3_P35_SHIFT                       (5u)
+#define GPIO_P3_P36_SHIFT                       (6u)
+#define GPIO_P3_P37_SHIFT                       (7u)
+#define GPIO_P3_P38_SHIFT                       (8u)
+#define GPIO_P3_P39_SHIFT                       (9u)
+#define GPIO_P3_P310_SHIFT                      (10u)
+#define GPIO_P3_P311_SHIFT                      (11u)
+#define GPIO_P3_P312_SHIFT                      (12u)
+#define GPIO_P3_P313_SHIFT                      (13u)
+#define GPIO_P3_P314_SHIFT                      (14u)
+#define GPIO_P3_P315_SHIFT                      (15u)
+
+#define GPIO_PSR3_PSR30_SHIFT                   (0u)
+#define GPIO_PSR3_PSR31_SHIFT                   (1u)
+#define GPIO_PSR3_PSR32_SHIFT                   (2u)
+#define GPIO_PSR3_PSR33_SHIFT                   (3u)
+#define GPIO_PSR3_PSR34_SHIFT                   (4u)
+#define GPIO_PSR3_PSR35_SHIFT                   (5u)
+#define GPIO_PSR3_PSR36_SHIFT                   (6u)
+#define GPIO_PSR3_PSR37_SHIFT                   (7u)
+#define GPIO_PSR3_PSR38_SHIFT                   (8u)
+#define GPIO_PSR3_PSR39_SHIFT                   (9u)
+#define GPIO_PSR3_PSR310_SHIFT                  (10u)
+#define GPIO_PSR3_PSR311_SHIFT                  (11u)
+#define GPIO_PSR3_PSR312_SHIFT                  (12u)
+#define GPIO_PSR3_PSR313_SHIFT                  (13u)
+#define GPIO_PSR3_PSR314_SHIFT                  (14u)
+#define GPIO_PSR3_PSR315_SHIFT                  (15u)
+#define GPIO_PSR3_PSR316_SHIFT                  (16u)
+#define GPIO_PSR3_PSR317_SHIFT                  (17u)
+#define GPIO_PSR3_PSR318_SHIFT                  (18u)
+#define GPIO_PSR3_PSR319_SHIFT                  (19u)
+#define GPIO_PSR3_PSR320_SHIFT                  (20u)
+#define GPIO_PSR3_PSR321_SHIFT                  (21u)
+#define GPIO_PSR3_PSR322_SHIFT                  (22u)
+#define GPIO_PSR3_PSR323_SHIFT                  (23u)
+#define GPIO_PSR3_PSR324_SHIFT                  (24u)
+#define GPIO_PSR3_PSR325_SHIFT                  (25u)
+#define GPIO_PSR3_PSR326_SHIFT                  (26u)
+#define GPIO_PSR3_PSR327_SHIFT                  (27u)
+#define GPIO_PSR3_PSR328_SHIFT                  (28u)
+#define GPIO_PSR3_PSR329_SHIFT                  (29u)
+#define GPIO_PSR3_PSR330_SHIFT                  (30u)
+#define GPIO_PSR3_PSR331_SHIFT                  (31u)
+
+#define GPIO_PPR3_PPR30_SHIFT                   (0u)
+#define GPIO_PPR3_PPR31_SHIFT                   (1u)
+#define GPIO_PPR3_PPR32_SHIFT                   (2u)
+#define GPIO_PPR3_PPR33_SHIFT                   (3u)
+#define GPIO_PPR3_PPR34_SHIFT                   (4u)
+#define GPIO_PPR3_PPR35_SHIFT                   (5u)
+#define GPIO_PPR3_PPR36_SHIFT                   (6u)
+#define GPIO_PPR3_PPR37_SHIFT                   (7u)
+#define GPIO_PPR3_PPR38_SHIFT                   (8u)
+#define GPIO_PPR3_PPR39_SHIFT                   (9u)
+#define GPIO_PPR3_PPR310_SHIFT                  (10u)
+#define GPIO_PPR3_PPR311_SHIFT                  (11u)
+#define GPIO_PPR3_PPR312_SHIFT                  (12u)
+#define GPIO_PPR3_PPR313_SHIFT                  (13u)
+#define GPIO_PPR3_PPR314_SHIFT                  (14u)
+#define GPIO_PPR3_PPR315_SHIFT                  (15u)
+
+#define GPIO_PM3_PM30_SHIFT                     (0u)
+#define GPIO_PM3_PM31_SHIFT                     (1u)
+#define GPIO_PM3_PM32_SHIFT                     (2u)
+#define GPIO_PM3_PM33_SHIFT                     (3u)
+#define GPIO_PM3_PM34_SHIFT                     (4u)
+#define GPIO_PM3_PM35_SHIFT                     (5u)
+#define GPIO_PM3_PM36_SHIFT                     (6u)
+#define GPIO_PM3_PM37_SHIFT                     (7u)
+#define GPIO_PM3_PM38_SHIFT                     (8u)
+#define GPIO_PM3_PM39_SHIFT                     (9u)
+#define GPIO_PM3_PM310_SHIFT                    (10u)
+#define GPIO_PM3_PM311_SHIFT                    (11u)
+#define GPIO_PM3_PM312_SHIFT                    (12u)
+#define GPIO_PM3_PM313_SHIFT                    (13u)
+#define GPIO_PM3_PM314_SHIFT                    (14u)
+#define GPIO_PM3_PM315_SHIFT                    (15u)
+
+#define GPIO_PMC3_PMC30_SHIFT                   (0u)
+#define GPIO_PMC3_PMC31_SHIFT                   (1u)
+#define GPIO_PMC3_PMC32_SHIFT                   (2u)
+#define GPIO_PMC3_PMC33_SHIFT                   (3u)
+#define GPIO_PMC3_PMC34_SHIFT                   (4u)
+#define GPIO_PMC3_PMC35_SHIFT                   (5u)
+#define GPIO_PMC3_PMC36_SHIFT                   (6u)
+#define GPIO_PMC3_PMC37_SHIFT                   (7u)
+#define GPIO_PMC3_PMC38_SHIFT                   (8u)
+#define GPIO_PMC3_PMC39_SHIFT                   (9u)
+#define GPIO_PMC3_PMC310_SHIFT                  (10u)
+#define GPIO_PMC3_PMC311_SHIFT                  (11u)
+#define GPIO_PMC3_PMC312_SHIFT                  (12u)
+#define GPIO_PMC3_PMC313_SHIFT                  (13u)
+#define GPIO_PMC3_PMC314_SHIFT                  (14u)
+#define GPIO_PMC3_PMC315_SHIFT                  (15u)
+
+#define GPIO_PFC3_PFC30_SHIFT                   (0u)
+#define GPIO_PFC3_PFC31_SHIFT                   (1u)
+#define GPIO_PFC3_PFC32_SHIFT                   (2u)
+#define GPIO_PFC3_PFC33_SHIFT                   (3u)
+#define GPIO_PFC3_PFC34_SHIFT                   (4u)
+#define GPIO_PFC3_PFC35_SHIFT                   (5u)
+#define GPIO_PFC3_PFC36_SHIFT                   (6u)
+#define GPIO_PFC3_PFC37_SHIFT                   (7u)
+#define GPIO_PFC3_PFC38_SHIFT                   (8u)
+#define GPIO_PFC3_PFC39_SHIFT                   (9u)
+#define GPIO_PFC3_PFC310_SHIFT                  (10u)
+#define GPIO_PFC3_PFC311_SHIFT                  (11u)
+#define GPIO_PFC3_PFC312_SHIFT                  (12u)
+#define GPIO_PFC3_PFC313_SHIFT                  (13u)
+#define GPIO_PFC3_PFC314_SHIFT                  (14u)
+#define GPIO_PFC3_PFC315_SHIFT                  (15u)
+
+#define GPIO_PFCE3_PFCE30_SHIFT                 (0u)
+#define GPIO_PFCE3_PFCE31_SHIFT                 (1u)
+#define GPIO_PFCE3_PFCE32_SHIFT                 (2u)
+#define GPIO_PFCE3_PFCE33_SHIFT                 (3u)
+#define GPIO_PFCE3_PFCE34_SHIFT                 (4u)
+#define GPIO_PFCE3_PFCE35_SHIFT                 (5u)
+#define GPIO_PFCE3_PFCE36_SHIFT                 (6u)
+#define GPIO_PFCE3_PFCE37_SHIFT                 (7u)
+#define GPIO_PFCE3_PFCE38_SHIFT                 (8u)
+#define GPIO_PFCE3_PFCE39_SHIFT                 (9u)
+#define GPIO_PFCE3_PFCE310_SHIFT                (10u)
+#define GPIO_PFCE3_PFCE311_SHIFT                (11u)
+#define GPIO_PFCE3_PFCE312_SHIFT                (12u)
+#define GPIO_PFCE3_PFCE313_SHIFT                (13u)
+#define GPIO_PFCE3_PFCE314_SHIFT                (14u)
+#define GPIO_PFCE3_PFCE315_SHIFT                (15u)
+
+#define GPIO_PNOT3_PNOT30_SHIFT                 (0u)
+#define GPIO_PNOT3_PNOT31_SHIFT                 (1u)
+#define GPIO_PNOT3_PNOT32_SHIFT                 (2u)
+#define GPIO_PNOT3_PNOT33_SHIFT                 (3u)
+#define GPIO_PNOT3_PNOT34_SHIFT                 (4u)
+#define GPIO_PNOT3_PNOT35_SHIFT                 (5u)
+#define GPIO_PNOT3_PNOT36_SHIFT                 (6u)
+#define GPIO_PNOT3_PNOT37_SHIFT                 (7u)
+#define GPIO_PNOT3_PNOT38_SHIFT                 (8u)
+#define GPIO_PNOT3_PNOT39_SHIFT                 (9u)
+#define GPIO_PNOT3_PNOT310_SHIFT                (10u)
+#define GPIO_PNOT3_PNOT311_SHIFT                (11u)
+#define GPIO_PNOT3_PNOT312_SHIFT                (12u)
+#define GPIO_PNOT3_PNOT313_SHIFT                (13u)
+#define GPIO_PNOT3_PNOT314_SHIFT                (14u)
+#define GPIO_PNOT3_PNOT315_SHIFT                (15u)
+
+#define GPIO_PMSR3_PMSR30_SHIFT                 (0u)
+#define GPIO_PMSR3_PMSR31_SHIFT                 (1u)
+#define GPIO_PMSR3_PMSR32_SHIFT                 (2u)
+#define GPIO_PMSR3_PMSR33_SHIFT                 (3u)
+#define GPIO_PMSR3_PMSR34_SHIFT                 (4u)
+#define GPIO_PMSR3_PMSR35_SHIFT                 (5u)
+#define GPIO_PMSR3_PMSR36_SHIFT                 (6u)
+#define GPIO_PMSR3_PMSR37_SHIFT                 (7u)
+#define GPIO_PMSR3_PMSR38_SHIFT                 (8u)
+#define GPIO_PMSR3_PMSR39_SHIFT                 (9u)
+#define GPIO_PMSR3_PMSR310_SHIFT                (10u)
+#define GPIO_PMSR3_PMSR311_SHIFT                (11u)
+#define GPIO_PMSR3_PMSR312_SHIFT                (12u)
+#define GPIO_PMSR3_PMSR313_SHIFT                (13u)
+#define GPIO_PMSR3_PMSR314_SHIFT                (14u)
+#define GPIO_PMSR3_PMSR315_SHIFT                (15u)
+#define GPIO_PMSR3_PMSR316_SHIFT                (16u)
+#define GPIO_PMSR3_PMSR317_SHIFT                (17u)
+#define GPIO_PMSR3_PMSR318_SHIFT                (18u)
+#define GPIO_PMSR3_PMSR319_SHIFT                (19u)
+#define GPIO_PMSR3_PMSR320_SHIFT                (20u)
+#define GPIO_PMSR3_PMSR321_SHIFT                (21u)
+#define GPIO_PMSR3_PMSR322_SHIFT                (22u)
+#define GPIO_PMSR3_PMSR323_SHIFT                (23u)
+#define GPIO_PMSR3_PMSR324_SHIFT                (24u)
+#define GPIO_PMSR3_PMSR325_SHIFT                (25u)
+#define GPIO_PMSR3_PMSR326_SHIFT                (26u)
+#define GPIO_PMSR3_PMSR327_SHIFT                (27u)
+#define GPIO_PMSR3_PMSR328_SHIFT                (28u)
+#define GPIO_PMSR3_PMSR329_SHIFT                (29u)
+#define GPIO_PMSR3_PMSR330_SHIFT                (30u)
+#define GPIO_PMSR3_PMSR331_SHIFT                (31u)
+
+#define GPIO_PMCSR3_PMCSR30_SHIFT               (0u)
+#define GPIO_PMCSR3_PMCSR31_SHIFT               (1u)
+#define GPIO_PMCSR3_PMCSR32_SHIFT               (2u)
+#define GPIO_PMCSR3_PMCSR33_SHIFT               (3u)
+#define GPIO_PMCSR3_PMCSR34_SHIFT               (4u)
+#define GPIO_PMCSR3_PMCSR35_SHIFT               (5u)
+#define GPIO_PMCSR3_PMCSR36_SHIFT               (6u)
+#define GPIO_PMCSR3_PMCSR37_SHIFT               (7u)
+#define GPIO_PMCSR3_PMCSR38_SHIFT               (8u)
+#define GPIO_PMCSR3_PMCSR39_SHIFT               (9u)
+#define GPIO_PMCSR3_PMCSR310_SHIFT              (10u)
+#define GPIO_PMCSR3_PMCSR311_SHIFT              (11u)
+#define GPIO_PMCSR3_PMCSR312_SHIFT              (12u)
+#define GPIO_PMCSR3_PMCSR313_SHIFT              (13u)
+#define GPIO_PMCSR3_PMCSR314_SHIFT              (14u)
+#define GPIO_PMCSR3_PMCSR315_SHIFT              (15u)
+#define GPIO_PMCSR3_PMCSR316_SHIFT              (16u)
+#define GPIO_PMCSR3_PMCSR317_SHIFT              (17u)
+#define GPIO_PMCSR3_PMCSR318_SHIFT              (18u)
+#define GPIO_PMCSR3_PMCSR319_SHIFT              (19u)
+#define GPIO_PMCSR3_PMCSR320_SHIFT              (20u)
+#define GPIO_PMCSR3_PMCSR321_SHIFT              (21u)
+#define GPIO_PMCSR3_PMCSR322_SHIFT              (22u)
+#define GPIO_PMCSR3_PMCSR323_SHIFT              (23u)
+#define GPIO_PMCSR3_PMCSR324_SHIFT              (24u)
+#define GPIO_PMCSR3_PMCSR325_SHIFT              (25u)
+#define GPIO_PMCSR3_PMCSR326_SHIFT              (26u)
+#define GPIO_PMCSR3_PMCSR327_SHIFT              (27u)
+#define GPIO_PMCSR3_PMCSR328_SHIFT              (28u)
+#define GPIO_PMCSR3_PMCSR329_SHIFT              (29u)
+#define GPIO_PMCSR3_PMCSR330_SHIFT              (30u)
+#define GPIO_PMCSR3_PMCSR331_SHIFT              (31u)
+
+#define GPIO_PFCAE3_PFCAE30_SHIFT               (0u)
+#define GPIO_PFCAE3_PFCAE31_SHIFT               (1u)
+#define GPIO_PFCAE3_PFCAE32_SHIFT               (2u)
+#define GPIO_PFCAE3_PFCAE33_SHIFT               (3u)
+#define GPIO_PFCAE3_PFCAE34_SHIFT               (4u)
+#define GPIO_PFCAE3_PFCAE35_SHIFT               (5u)
+#define GPIO_PFCAE3_PFCAE36_SHIFT               (6u)
+#define GPIO_PFCAE3_PFCAE37_SHIFT               (7u)
+#define GPIO_PFCAE3_PFCAE38_SHIFT               (8u)
+#define GPIO_PFCAE3_PFCAE39_SHIFT               (9u)
+#define GPIO_PFCAE3_PFCAE310_SHIFT              (10u)
+#define GPIO_PFCAE3_PFCAE311_SHIFT              (11u)
+#define GPIO_PFCAE3_PFCAE312_SHIFT              (12u)
+#define GPIO_PFCAE3_PFCAE313_SHIFT              (13u)
+#define GPIO_PFCAE3_PFCAE314_SHIFT              (14u)
+#define GPIO_PFCAE3_PFCAE315_SHIFT              (15u)
+
+#define GPIO_PIBC3_PIBC30_SHIFT                 (0u)
+#define GPIO_PIBC3_PIBC31_SHIFT                 (1u)
+#define GPIO_PIBC3_PIBC32_SHIFT                 (2u)
+#define GPIO_PIBC3_PIBC33_SHIFT                 (3u)
+#define GPIO_PIBC3_PIBC34_SHIFT                 (4u)
+#define GPIO_PIBC3_PIBC35_SHIFT                 (5u)
+#define GPIO_PIBC3_PIBC36_SHIFT                 (6u)
+#define GPIO_PIBC3_PIBC37_SHIFT                 (7u)
+#define GPIO_PIBC3_PIBC38_SHIFT                 (8u)
+#define GPIO_PIBC3_PIBC39_SHIFT                 (9u)
+#define GPIO_PIBC3_PIBC310_SHIFT                (10u)
+#define GPIO_PIBC3_PIBC311_SHIFT                (11u)
+#define GPIO_PIBC3_PIBC312_SHIFT                (12u)
+#define GPIO_PIBC3_PIBC313_SHIFT                (13u)
+#define GPIO_PIBC3_PIBC314_SHIFT                (14u)
+#define GPIO_PIBC3_PIBC315_SHIFT                (15u)
+
+#define GPIO_PBDC3_PBDC30_SHIFT                 (0u)
+#define GPIO_PBDC3_PBDC31_SHIFT                 (1u)
+#define GPIO_PBDC3_PBDC32_SHIFT                 (2u)
+#define GPIO_PBDC3_PBDC33_SHIFT                 (3u)
+#define GPIO_PBDC3_PBDC34_SHIFT                 (4u)
+#define GPIO_PBDC3_PBDC35_SHIFT                 (5u)
+#define GPIO_PBDC3_PBDC36_SHIFT                 (6u)
+#define GPIO_PBDC3_PBDC37_SHIFT                 (7u)
+#define GPIO_PBDC3_PBDC38_SHIFT                 (8u)
+#define GPIO_PBDC3_PBDC39_SHIFT                 (9u)
+#define GPIO_PBDC3_PBDC310_SHIFT                (10u)
+#define GPIO_PBDC3_PBDC311_SHIFT                (11u)
+#define GPIO_PBDC3_PBDC312_SHIFT                (12u)
+#define GPIO_PBDC3_PBDC313_SHIFT                (13u)
+#define GPIO_PBDC3_PBDC314_SHIFT                (14u)
+#define GPIO_PBDC3_PBDC315_SHIFT                (15u)
+
+#define GPIO_PIPC3_PIPC30_SHIFT                 (0u)
+#define GPIO_PIPC3_PIPC31_SHIFT                 (1u)
+#define GPIO_PIPC3_PIPC32_SHIFT                 (2u)
+#define GPIO_PIPC3_PIPC33_SHIFT                 (3u)
+#define GPIO_PIPC3_PIPC34_SHIFT                 (4u)
+#define GPIO_PIPC3_PIPC35_SHIFT                 (5u)
+#define GPIO_PIPC3_PIPC36_SHIFT                 (6u)
+#define GPIO_PIPC3_PIPC37_SHIFT                 (7u)
+#define GPIO_PIPC3_PIPC38_SHIFT                 (8u)
+#define GPIO_PIPC3_PIPC39_SHIFT                 (9u)
+#define GPIO_PIPC3_PIPC310_SHIFT                (10u)
+#define GPIO_PIPC3_PIPC311_SHIFT                (11u)
+#define GPIO_PIPC3_PIPC312_SHIFT                (12u)
+#define GPIO_PIPC3_PIPC313_SHIFT                (13u)
+#define GPIO_PIPC3_PIPC314_SHIFT                (14u)
+#define GPIO_PIPC3_PIPC315_SHIFT                (15u)
+
+/* ---- P4 ---- */
+#define GPIO_P4_P40_SHIFT                       (0u)
+#define GPIO_P4_P41_SHIFT                       (1u)
+#define GPIO_P4_P42_SHIFT                       (2u)
+#define GPIO_P4_P43_SHIFT                       (3u)
+#define GPIO_P4_P44_SHIFT                       (4u)
+#define GPIO_P4_P45_SHIFT                       (5u)
+#define GPIO_P4_P46_SHIFT                       (6u)
+#define GPIO_P4_P47_SHIFT                       (7u)
+#define GPIO_P4_P48_SHIFT                       (8u)
+#define GPIO_P4_P49_SHIFT                       (9u)
+#define GPIO_P4_P410_SHIFT                      (10u)
+#define GPIO_P4_P411_SHIFT                      (11u)
+#define GPIO_P4_P412_SHIFT                      (12u)
+#define GPIO_P4_P413_SHIFT                      (13u)
+#define GPIO_P4_P414_SHIFT                      (14u)
+#define GPIO_P4_P415_SHIFT                      (15u)
+
+#define GPIO_PSR4_PSR40_SHIFT                   (0u)
+#define GPIO_PSR4_PSR41_SHIFT                   (1u)
+#define GPIO_PSR4_PSR42_SHIFT                   (2u)
+#define GPIO_PSR4_PSR43_SHIFT                   (3u)
+#define GPIO_PSR4_PSR44_SHIFT                   (4u)
+#define GPIO_PSR4_PSR45_SHIFT                   (5u)
+#define GPIO_PSR4_PSR46_SHIFT                   (6u)
+#define GPIO_PSR4_PSR47_SHIFT                   (7u)
+#define GPIO_PSR4_PSR48_SHIFT                   (8u)
+#define GPIO_PSR4_PSR49_SHIFT                   (9u)
+#define GPIO_PSR4_PSR410_SHIFT                  (10u)
+#define GPIO_PSR4_PSR411_SHIFT                  (11u)
+#define GPIO_PSR4_PSR412_SHIFT                  (12u)
+#define GPIO_PSR4_PSR413_SHIFT                  (13u)
+#define GPIO_PSR4_PSR414_SHIFT                  (14u)
+#define GPIO_PSR4_PSR415_SHIFT                  (15u)
+#define GPIO_PSR4_PSR416_SHIFT                  (16u)
+#define GPIO_PSR4_PSR417_SHIFT                  (17u)
+#define GPIO_PSR4_PSR418_SHIFT                  (18u)
+#define GPIO_PSR4_PSR419_SHIFT                  (19u)
+#define GPIO_PSR4_PSR420_SHIFT                  (20u)
+#define GPIO_PSR4_PSR421_SHIFT                  (21u)
+#define GPIO_PSR4_PSR422_SHIFT                  (22u)
+#define GPIO_PSR4_PSR423_SHIFT                  (23u)
+#define GPIO_PSR4_PSR424_SHIFT                  (24u)
+#define GPIO_PSR4_PSR425_SHIFT                  (25u)
+#define GPIO_PSR4_PSR426_SHIFT                  (26u)
+#define GPIO_PSR4_PSR427_SHIFT                  (27u)
+#define GPIO_PSR4_PSR428_SHIFT                  (28u)
+#define GPIO_PSR4_PSR429_SHIFT                  (29u)
+#define GPIO_PSR4_PSR430_SHIFT                  (30u)
+#define GPIO_PSR4_PSR431_SHIFT                  (31u)
+
+#define GPIO_PPR4_PPR40_SHIFT                   (0u)
+#define GPIO_PPR4_PPR41_SHIFT                   (1u)
+#define GPIO_PPR4_PPR42_SHIFT                   (2u)
+#define GPIO_PPR4_PPR43_SHIFT                   (3u)
+#define GPIO_PPR4_PPR44_SHIFT                   (4u)
+#define GPIO_PPR4_PPR45_SHIFT                   (5u)
+#define GPIO_PPR4_PPR46_SHIFT                   (6u)
+#define GPIO_PPR4_PPR47_SHIFT                   (7u)
+#define GPIO_PPR4_PPR48_SHIFT                   (8u)
+#define GPIO_PPR4_PPR49_SHIFT                   (9u)
+#define GPIO_PPR4_PPR410_SHIFT                  (10u)
+#define GPIO_PPR4_PPR411_SHIFT                  (11u)
+#define GPIO_PPR4_PPR412_SHIFT                  (12u)
+#define GPIO_PPR4_PPR413_SHIFT                  (13u)
+#define GPIO_PPR4_PPR414_SHIFT                  (14u)
+#define GPIO_PPR4_PPR415_SHIFT                  (15u)
+
+#define GPIO_PM4_PM40_SHIFT                     (0u)
+#define GPIO_PM4_PM41_SHIFT                     (1u)
+#define GPIO_PM4_PM42_SHIFT                     (2u)
+#define GPIO_PM4_PM43_SHIFT                     (3u)
+#define GPIO_PM4_PM44_SHIFT                     (4u)
+#define GPIO_PM4_PM45_SHIFT                     (5u)
+#define GPIO_PM4_PM46_SHIFT                     (6u)
+#define GPIO_PM4_PM47_SHIFT                     (7u)
+#define GPIO_PM4_PM48_SHIFT                     (8u)
+#define GPIO_PM4_PM49_SHIFT                     (9u)
+#define GPIO_PM4_PM410_SHIFT                    (10u)
+#define GPIO_PM4_PM411_SHIFT                    (11u)
+#define GPIO_PM4_PM412_SHIFT                    (12u)
+#define GPIO_PM4_PM413_SHIFT                    (13u)
+#define GPIO_PM4_PM414_SHIFT                    (14u)
+#define GPIO_PM4_PM415_SHIFT                    (15u)
+
+#define GPIO_PMC4_PMC40_SHIFT                   (0u)
+#define GPIO_PMC4_PMC41_SHIFT                   (1u)
+#define GPIO_PMC4_PMC42_SHIFT                   (2u)
+#define GPIO_PMC4_PMC43_SHIFT                   (3u)
+#define GPIO_PMC4_PMC44_SHIFT                   (4u)
+#define GPIO_PMC4_PMC45_SHIFT                   (5u)
+#define GPIO_PMC4_PMC46_SHIFT                   (6u)
+#define GPIO_PMC4_PMC47_SHIFT                   (7u)
+#define GPIO_PMC4_PMC48_SHIFT                   (8u)
+#define GPIO_PMC4_PMC49_SHIFT                   (9u)
+#define GPIO_PMC4_PMC410_SHIFT                  (10u)
+#define GPIO_PMC4_PMC411_SHIFT                  (11u)
+#define GPIO_PMC4_PMC412_SHIFT                  (12u)
+#define GPIO_PMC4_PMC413_SHIFT                  (13u)
+#define GPIO_PMC4_PMC414_SHIFT                  (14u)
+#define GPIO_PMC4_PMC415_SHIFT                  (15u)
+
+#define GPIO_PFC4_PFC40_SHIFT                   (0u)
+#define GPIO_PFC4_PFC41_SHIFT                   (1u)
+#define GPIO_PFC4_PFC42_SHIFT                   (2u)
+#define GPIO_PFC4_PFC43_SHIFT                   (3u)
+#define GPIO_PFC4_PFC44_SHIFT                   (4u)
+#define GPIO_PFC4_PFC45_SHIFT                   (5u)
+#define GPIO_PFC4_PFC46_SHIFT                   (6u)
+#define GPIO_PFC4_PFC47_SHIFT                   (7u)
+#define GPIO_PFC4_PFC48_SHIFT                   (8u)
+#define GPIO_PFC4_PFC49_SHIFT                   (9u)
+#define GPIO_PFC4_PFC410_SHIFT                  (10u)
+#define GPIO_PFC4_PFC411_SHIFT                  (11u)
+#define GPIO_PFC4_PFC412_SHIFT                  (12u)
+#define GPIO_PFC4_PFC413_SHIFT                  (13u)
+#define GPIO_PFC4_PFC414_SHIFT                  (14u)
+#define GPIO_PFC4_PFC415_SHIFT                  (15u)
+
+#define GPIO_PFCE4_PFCE40_SHIFT                 (0u)
+#define GPIO_PFCE4_PFCE41_SHIFT                 (1u)
+#define GPIO_PFCE4_PFCE42_SHIFT                 (2u)
+#define GPIO_PFCE4_PFCE43_SHIFT                 (3u)
+#define GPIO_PFCE4_PFCE44_SHIFT                 (4u)
+#define GPIO_PFCE4_PFCE45_SHIFT                 (5u)
+#define GPIO_PFCE4_PFCE46_SHIFT                 (6u)
+#define GPIO_PFCE4_PFCE47_SHIFT                 (7u)
+#define GPIO_PFCE4_PFCE48_SHIFT                 (8u)
+#define GPIO_PFCE4_PFCE49_SHIFT                 (9u)
+#define GPIO_PFCE4_PFCE410_SHIFT                (10u)
+#define GPIO_PFCE4_PFCE411_SHIFT                (11u)
+#define GPIO_PFCE4_PFCE412_SHIFT                (12u)
+#define GPIO_PFCE4_PFCE413_SHIFT                (13u)
+#define GPIO_PFCE4_PFCE414_SHIFT                (14u)
+#define GPIO_PFCE4_PFCE415_SHIFT                (15u)
+
+#define GPIO_PNOT4_PNOT40_SHIFT                 (0u)
+#define GPIO_PNOT4_PNOT41_SHIFT                 (1u)
+#define GPIO_PNOT4_PNOT42_SHIFT                 (2u)
+#define GPIO_PNOT4_PNOT43_SHIFT                 (3u)
+#define GPIO_PNOT4_PNOT44_SHIFT                 (4u)
+#define GPIO_PNOT4_PNOT45_SHIFT                 (5u)
+#define GPIO_PNOT4_PNOT46_SHIFT                 (6u)
+#define GPIO_PNOT4_PNOT47_SHIFT                 (7u)
+#define GPIO_PNOT4_PNOT48_SHIFT                 (8u)
+#define GPIO_PNOT4_PNOT49_SHIFT                 (9u)
+#define GPIO_PNOT4_PNOT410_SHIFT                (10u)
+#define GPIO_PNOT4_PNOT411_SHIFT                (11u)
+#define GPIO_PNOT4_PNOT412_SHIFT                (12u)
+#define GPIO_PNOT4_PNOT413_SHIFT                (13u)
+#define GPIO_PNOT4_PNOT414_SHIFT                (14u)
+#define GPIO_PNOT4_PNOT415_SHIFT                (15u)
+
+#define GPIO_PMSR4_PMSR40_SHIFT                 (0u)
+#define GPIO_PMSR4_PMSR41_SHIFT                 (1u)
+#define GPIO_PMSR4_PMSR42_SHIFT                 (2u)
+#define GPIO_PMSR4_PMSR43_SHIFT                 (3u)
+#define GPIO_PMSR4_PMSR44_SHIFT                 (4u)
+#define GPIO_PMSR4_PMSR45_SHIFT                 (5u)
+#define GPIO_PMSR4_PMSR46_SHIFT                 (6u)
+#define GPIO_PMSR4_PMSR47_SHIFT                 (7u)
+#define GPIO_PMSR4_PMSR48_SHIFT                 (8u)
+#define GPIO_PMSR4_PMSR49_SHIFT                 (9u)
+#define GPIO_PMSR4_PMSR410_SHIFT                (10u)
+#define GPIO_PMSR4_PMSR411_SHIFT                (11u)
+#define GPIO_PMSR4_PMSR412_SHIFT                (12u)
+#define GPIO_PMSR4_PMSR413_SHIFT                (13u)
+#define GPIO_PMSR4_PMSR414_SHIFT                (14u)
+#define GPIO_PMSR4_PMSR415_SHIFT                (15u)
+#define GPIO_PMSR4_PMSR416_SHIFT                (16u)
+#define GPIO_PMSR4_PMSR417_SHIFT                (17u)
+#define GPIO_PMSR4_PMSR418_SHIFT                (18u)
+#define GPIO_PMSR4_PMSR419_SHIFT                (19u)
+#define GPIO_PMSR4_PMSR420_SHIFT                (20u)
+#define GPIO_PMSR4_PMSR421_SHIFT                (21u)
+#define GPIO_PMSR4_PMSR422_SHIFT                (22u)
+#define GPIO_PMSR4_PMSR423_SHIFT                (23u)
+#define GPIO_PMSR4_PMSR424_SHIFT                (24u)
+#define GPIO_PMSR4_PMSR425_SHIFT                (25u)
+#define GPIO_PMSR4_PMSR426_SHIFT                (26u)
+#define GPIO_PMSR4_PMSR427_SHIFT                (27u)
+#define GPIO_PMSR4_PMSR428_SHIFT                (28u)
+#define GPIO_PMSR4_PMSR429_SHIFT                (29u)
+#define GPIO_PMSR4_PMSR430_SHIFT                (30u)
+#define GPIO_PMSR4_PMSR431_SHIFT                (31u)
+
+#define GPIO_PMCSR4_PMCSR40_SHIFT               (0u)
+#define GPIO_PMCSR4_PMCSR41_SHIFT               (1u)
+#define GPIO_PMCSR4_PMCSR42_SHIFT               (2u)
+#define GPIO_PMCSR4_PMCSR43_SHIFT               (3u)
+#define GPIO_PMCSR4_PMCSR44_SHIFT               (4u)
+#define GPIO_PMCSR4_PMCSR45_SHIFT               (5u)
+#define GPIO_PMCSR4_PMCSR46_SHIFT               (6u)
+#define GPIO_PMCSR4_PMCSR47_SHIFT               (7u)
+#define GPIO_PMCSR4_PMCSR48_SHIFT               (8u)
+#define GPIO_PMCSR4_PMCSR49_SHIFT               (9u)
+#define GPIO_PMCSR4_PMCSR410_SHIFT              (10u)
+#define GPIO_PMCSR4_PMCSR411_SHIFT              (11u)
+#define GPIO_PMCSR4_PMCSR412_SHIFT              (12u)
+#define GPIO_PMCSR4_PMCSR413_SHIFT              (13u)
+#define GPIO_PMCSR4_PMCSR414_SHIFT              (14u)
+#define GPIO_PMCSR4_PMCSR415_SHIFT              (15u)
+#define GPIO_PMCSR4_PMCSR416_SHIFT              (16u)
+#define GPIO_PMCSR4_PMCSR417_SHIFT              (17u)
+#define GPIO_PMCSR4_PMCSR418_SHIFT              (18u)
+#define GPIO_PMCSR4_PMCSR419_SHIFT              (19u)
+#define GPIO_PMCSR4_PMCSR420_SHIFT              (20u)
+#define GPIO_PMCSR4_PMCSR421_SHIFT              (21u)
+#define GPIO_PMCSR4_PMCSR422_SHIFT              (22u)
+#define GPIO_PMCSR4_PMCSR423_SHIFT              (23u)
+#define GPIO_PMCSR4_PMCSR424_SHIFT              (24u)
+#define GPIO_PMCSR4_PMCSR425_SHIFT              (25u)
+#define GPIO_PMCSR4_PMCSR426_SHIFT              (26u)
+#define GPIO_PMCSR4_PMCSR427_SHIFT              (27u)
+#define GPIO_PMCSR4_PMCSR428_SHIFT              (28u)
+#define GPIO_PMCSR4_PMCSR429_SHIFT              (29u)
+#define GPIO_PMCSR4_PMCSR430_SHIFT              (30u)
+#define GPIO_PMCSR4_PMCSR431_SHIFT              (31u)
+
+#define GPIO_PFCAE4_PFCAE40_SHIFT               (0u)
+#define GPIO_PFCAE4_PFCAE41_SHIFT               (1u)
+#define GPIO_PFCAE4_PFCAE42_SHIFT               (2u)
+#define GPIO_PFCAE4_PFCAE43_SHIFT               (3u)
+#define GPIO_PFCAE4_PFCAE44_SHIFT               (4u)
+#define GPIO_PFCAE4_PFCAE45_SHIFT               (5u)
+#define GPIO_PFCAE4_PFCAE46_SHIFT               (6u)
+#define GPIO_PFCAE4_PFCAE47_SHIFT               (7u)
+#define GPIO_PFCAE4_PFCAE48_SHIFT               (8u)
+#define GPIO_PFCAE4_PFCAE49_SHIFT               (9u)
+#define GPIO_PFCAE4_PFCAE410_SHIFT              (10u)
+#define GPIO_PFCAE4_PFCAE411_SHIFT              (11u)
+#define GPIO_PFCAE4_PFCAE412_SHIFT              (12u)
+#define GPIO_PFCAE4_PFCAE413_SHIFT              (13u)
+#define GPIO_PFCAE4_PFCAE414_SHIFT              (14u)
+#define GPIO_PFCAE4_PFCAE415_SHIFT              (15u)
+
+#define GPIO_PIBC4_PIBC40_SHIFT                 (0u)
+#define GPIO_PIBC4_PIBC41_SHIFT                 (1u)
+#define GPIO_PIBC4_PIBC42_SHIFT                 (2u)
+#define GPIO_PIBC4_PIBC43_SHIFT                 (3u)
+#define GPIO_PIBC4_PIBC44_SHIFT                 (4u)
+#define GPIO_PIBC4_PIBC45_SHIFT                 (5u)
+#define GPIO_PIBC4_PIBC46_SHIFT                 (6u)
+#define GPIO_PIBC4_PIBC47_SHIFT                 (7u)
+#define GPIO_PIBC4_PIBC48_SHIFT                 (8u)
+#define GPIO_PIBC4_PIBC49_SHIFT                 (9u)
+#define GPIO_PIBC4_PIBC410_SHIFT                (10u)
+#define GPIO_PIBC4_PIBC411_SHIFT                (11u)
+#define GPIO_PIBC4_PIBC412_SHIFT                (12u)
+#define GPIO_PIBC4_PIBC413_SHIFT                (13u)
+#define GPIO_PIBC4_PIBC414_SHIFT                (14u)
+#define GPIO_PIBC4_PIBC415_SHIFT                (15u)
+
+#define GPIO_PBDC4_PBDC40_SHIFT                 (0u)
+#define GPIO_PBDC4_PBDC41_SHIFT                 (1u)
+#define GPIO_PBDC4_PBDC42_SHIFT                 (2u)
+#define GPIO_PBDC4_PBDC43_SHIFT                 (3u)
+#define GPIO_PBDC4_PBDC44_SHIFT                 (4u)
+#define GPIO_PBDC4_PBDC45_SHIFT                 (5u)
+#define GPIO_PBDC4_PBDC46_SHIFT                 (6u)
+#define GPIO_PBDC4_PBDC47_SHIFT                 (7u)
+#define GPIO_PBDC4_PBDC48_SHIFT                 (8u)
+#define GPIO_PBDC4_PBDC49_SHIFT                 (9u)
+#define GPIO_PBDC4_PBDC410_SHIFT                (10u)
+#define GPIO_PBDC4_PBDC411_SHIFT                (11u)
+#define GPIO_PBDC4_PBDC412_SHIFT                (12u)
+#define GPIO_PBDC4_PBDC413_SHIFT                (13u)
+#define GPIO_PBDC4_PBDC414_SHIFT                (14u)
+#define GPIO_PBDC4_PBDC415_SHIFT                (15u)
+
+#define GPIO_PIPC4_PIPC40_SHIFT                 (0u)
+#define GPIO_PIPC4_PIPC41_SHIFT                 (1u)
+#define GPIO_PIPC4_PIPC42_SHIFT                 (2u)
+#define GPIO_PIPC4_PIPC43_SHIFT                 (3u)
+#define GPIO_PIPC4_PIPC44_SHIFT                 (4u)
+#define GPIO_PIPC4_PIPC45_SHIFT                 (5u)
+#define GPIO_PIPC4_PIPC46_SHIFT                 (6u)
+#define GPIO_PIPC4_PIPC47_SHIFT                 (7u)
+#define GPIO_PIPC4_PIPC48_SHIFT                 (8u)
+#define GPIO_PIPC4_PIPC49_SHIFT                 (9u)
+#define GPIO_PIPC4_PIPC410_SHIFT                (10u)
+#define GPIO_PIPC4_PIPC411_SHIFT                (11u)
+#define GPIO_PIPC4_PIPC412_SHIFT                (12u)
+#define GPIO_PIPC4_PIPC413_SHIFT                (13u)
+#define GPIO_PIPC4_PIPC414_SHIFT                (14u)
+#define GPIO_PIPC4_PIPC415_SHIFT                (15u)
+
+/* ---- P5 ---- */
+#define GPIO_P5_P50_SHIFT                       (0u)
+#define GPIO_P5_P51_SHIFT                       (1u)
+#define GPIO_P5_P52_SHIFT                       (2u)
+#define GPIO_P5_P53_SHIFT                       (3u)
+#define GPIO_P5_P54_SHIFT                       (4u)
+#define GPIO_P5_P55_SHIFT                       (5u)
+#define GPIO_P5_P56_SHIFT                       (6u)
+#define GPIO_P5_P57_SHIFT                       (7u)
+#define GPIO_P5_P58_SHIFT                       (8u)
+#define GPIO_P5_P59_SHIFT                       (9u)
+#define GPIO_P5_P510_SHIFT                      (10u)
+
+#define GPIO_PSR5_PSR50_SHIFT                   (0u)
+#define GPIO_PSR5_PSR51_SHIFT                   (1u)
+#define GPIO_PSR5_PSR52_SHIFT                   (2u)
+#define GPIO_PSR5_PSR53_SHIFT                   (3u)
+#define GPIO_PSR5_PSR54_SHIFT                   (4u)
+#define GPIO_PSR5_PSR55_SHIFT                   (5u)
+#define GPIO_PSR5_PSR56_SHIFT                   (6u)
+#define GPIO_PSR5_PSR57_SHIFT                   (7u)
+#define GPIO_PSR5_PSR58_SHIFT                   (8u)
+#define GPIO_PSR5_PSR59_SHIFT                   (9u)
+#define GPIO_PSR5_PSR510_SHIFT                  (10u)
+#define GPIO_PSR5_PSR516_SHIFT                  (16u)
+#define GPIO_PSR5_PSR517_SHIFT                  (17u)
+#define GPIO_PSR5_PSR518_SHIFT                  (18u)
+#define GPIO_PSR5_PSR519_SHIFT                  (19u)
+#define GPIO_PSR5_PSR520_SHIFT                  (20u)
+#define GPIO_PSR5_PSR521_SHIFT                  (21u)
+#define GPIO_PSR5_PSR522_SHIFT                  (22u)
+#define GPIO_PSR5_PSR523_SHIFT                  (23u)
+#define GPIO_PSR5_PSR524_SHIFT                  (24u)
+#define GPIO_PSR5_PSR525_SHIFT                  (25u)
+#define GPIO_PSR5_PSR526_SHIFT                  (26u)
+
+#define GPIO_PPR5_PPR50_SHIFT                   (0u)
+#define GPIO_PPR5_PPR51_SHIFT                   (1u)
+#define GPIO_PPR5_PPR52_SHIFT                   (2u)
+#define GPIO_PPR5_PPR53_SHIFT                   (3u)
+#define GPIO_PPR5_PPR54_SHIFT                   (4u)
+#define GPIO_PPR5_PPR55_SHIFT                   (5u)
+#define GPIO_PPR5_PPR56_SHIFT                   (6u)
+#define GPIO_PPR5_PPR57_SHIFT                   (7u)
+#define GPIO_PPR5_PPR58_SHIFT                   (8u)
+#define GPIO_PPR5_PPR59_SHIFT                   (9u)
+#define GPIO_PPR5_PPR510_SHIFT                  (10u)
+
+#define GPIO_PM5_PM50_SHIFT                     (0u)
+#define GPIO_PM5_PM51_SHIFT                     (1u)
+#define GPIO_PM5_PM52_SHIFT                     (2u)
+#define GPIO_PM5_PM53_SHIFT                     (3u)
+#define GPIO_PM5_PM54_SHIFT                     (4u)
+#define GPIO_PM5_PM55_SHIFT                     (5u)
+#define GPIO_PM5_PM56_SHIFT                     (6u)
+#define GPIO_PM5_PM57_SHIFT                     (7u)
+#define GPIO_PM5_PM58_SHIFT                     (8u)
+#define GPIO_PM5_PM59_SHIFT                     (9u)
+#define GPIO_PM5_PM510_SHIFT                    (10u)
+
+#define GPIO_PMC5_PMC50_SHIFT                   (0u)
+#define GPIO_PMC5_PMC51_SHIFT                   (1u)
+#define GPIO_PMC5_PMC52_SHIFT                   (2u)
+#define GPIO_PMC5_PMC53_SHIFT                   (3u)
+#define GPIO_PMC5_PMC54_SHIFT                   (4u)
+#define GPIO_PMC5_PMC55_SHIFT                   (5u)
+#define GPIO_PMC5_PMC56_SHIFT                   (6u)
+#define GPIO_PMC5_PMC57_SHIFT                   (7u)
+#define GPIO_PMC5_PMC58_SHIFT                   (8u)
+#define GPIO_PMC5_PMC59_SHIFT                   (9u)
+#define GPIO_PMC5_PMC510_SHIFT                  (10u)
+
+#define GPIO_PFC5_PFC50_SHIFT                   (0u)
+#define GPIO_PFC5_PFC51_SHIFT                   (1u)
+#define GPIO_PFC5_PFC52_SHIFT                   (2u)
+#define GPIO_PFC5_PFC53_SHIFT                   (3u)
+#define GPIO_PFC5_PFC54_SHIFT                   (4u)
+#define GPIO_PFC5_PFC55_SHIFT                   (5u)
+#define GPIO_PFC5_PFC56_SHIFT                   (6u)
+#define GPIO_PFC5_PFC57_SHIFT                   (7u)
+#define GPIO_PFC5_PFC58_SHIFT                   (8u)
+#define GPIO_PFC5_PFC59_SHIFT                   (9u)
+#define GPIO_PFC5_PFC510_SHIFT                  (10u)
+
+#define GPIO_PFCE5_PFCE50_SHIFT                 (0u)
+#define GPIO_PFCE5_PFCE51_SHIFT                 (1u)
+#define GPIO_PFCE5_PFCE52_SHIFT                 (2u)
+#define GPIO_PFCE5_PFCE53_SHIFT                 (3u)
+#define GPIO_PFCE5_PFCE54_SHIFT                 (4u)
+#define GPIO_PFCE5_PFCE55_SHIFT                 (5u)
+#define GPIO_PFCE5_PFCE56_SHIFT                 (6u)
+#define GPIO_PFCE5_PFCE57_SHIFT                 (7u)
+#define GPIO_PFCE5_PFCE58_SHIFT                 (8u)
+#define GPIO_PFCE5_PFCE59_SHIFT                 (9u)
+#define GPIO_PFCE5_PFCE510_SHIFT                (10u)
+
+#define GPIO_PNOT5_PNOT50_SHIFT                 (0u)
+#define GPIO_PNOT5_PNOT51_SHIFT                 (1u)
+#define GPIO_PNOT5_PNOT52_SHIFT                 (2u)
+#define GPIO_PNOT5_PNOT53_SHIFT                 (3u)
+#define GPIO_PNOT5_PNOT54_SHIFT                 (4u)
+#define GPIO_PNOT5_PNOT55_SHIFT                 (5u)
+#define GPIO_PNOT5_PNOT56_SHIFT                 (6u)
+#define GPIO_PNOT5_PNOT57_SHIFT                 (7u)
+#define GPIO_PNOT5_PNOT58_SHIFT                 (8u)
+#define GPIO_PNOT5_PNOT59_SHIFT                 (9u)
+#define GPIO_PNOT5_PNOT510_SHIFT                (10u)
+
+#define GPIO_PMSR5_PMSR50_SHIFT                 (0u)
+#define GPIO_PMSR5_PMSR51_SHIFT                 (1u)
+#define GPIO_PMSR5_PMSR52_SHIFT                 (2u)
+#define GPIO_PMSR5_PMSR53_SHIFT                 (3u)
+#define GPIO_PMSR5_PMSR54_SHIFT                 (4u)
+#define GPIO_PMSR5_PMSR55_SHIFT                 (5u)
+#define GPIO_PMSR5_PMSR56_SHIFT                 (6u)
+#define GPIO_PMSR5_PMSR57_SHIFT                 (7u)
+#define GPIO_PMSR5_PMSR58_SHIFT                 (8u)
+#define GPIO_PMSR5_PMSR59_SHIFT                 (9u)
+#define GPIO_PMSR5_PMSR510_SHIFT                (10u)
+#define GPIO_PMSR5_PMSR516_SHIFT                (16u)
+#define GPIO_PMSR5_PMSR517_SHIFT                (17u)
+#define GPIO_PMSR5_PMSR518_SHIFT                (18u)
+#define GPIO_PMSR5_PMSR519_SHIFT                (19u)
+#define GPIO_PMSR5_PMSR520_SHIFT                (20u)
+#define GPIO_PMSR5_PMSR521_SHIFT                (21u)
+#define GPIO_PMSR5_PMSR522_SHIFT                (22u)
+#define GPIO_PMSR5_PMSR523_SHIFT                (23u)
+#define GPIO_PMSR5_PMSR524_SHIFT                (24u)
+#define GPIO_PMSR5_PMSR525_SHIFT                (25u)
+#define GPIO_PMSR5_PMSR526_SHIFT                (26u)
+
+#define GPIO_PMCSR5_PMCSR50_SHIFT               (0u)
+#define GPIO_PMCSR5_PMCSR51_SHIFT               (1u)
+#define GPIO_PMCSR5_PMCSR52_SHIFT               (2u)
+#define GPIO_PMCSR5_PMCSR53_SHIFT               (3u)
+#define GPIO_PMCSR5_PMCSR54_SHIFT               (4u)
+#define GPIO_PMCSR5_PMCSR55_SHIFT               (5u)
+#define GPIO_PMCSR5_PMCSR56_SHIFT               (6u)
+#define GPIO_PMCSR5_PMCSR57_SHIFT               (7u)
+#define GPIO_PMCSR5_PMCSR58_SHIFT               (8u)
+#define GPIO_PMCSR5_PMCSR59_SHIFT               (9u)
+#define GPIO_PMCSR5_PMCSR510_SHIFT              (10u)
+#define GPIO_PMCSR5_PMCSR516_SHIFT              (16u)
+#define GPIO_PMCSR5_PMCSR517_SHIFT              (17u)
+#define GPIO_PMCSR5_PMCSR518_SHIFT              (18u)
+#define GPIO_PMCSR5_PMCSR519_SHIFT              (19u)
+#define GPIO_PMCSR5_PMCSR520_SHIFT              (20u)
+#define GPIO_PMCSR5_PMCSR521_SHIFT              (21u)
+#define GPIO_PMCSR5_PMCSR522_SHIFT              (22u)
+#define GPIO_PMCSR5_PMCSR523_SHIFT              (23u)
+#define GPIO_PMCSR5_PMCSR524_SHIFT              (24u)
+#define GPIO_PMCSR5_PMCSR525_SHIFT              (25u)
+#define GPIO_PMCSR5_PMCSR526_SHIFT              (26u)
+
+#define GPIO_PFCAE5_PFCAE50_SHIFT               (0u)
+#define GPIO_PFCAE5_PFCAE51_SHIFT               (1u)
+#define GPIO_PFCAE5_PFCAE52_SHIFT               (2u)
+#define GPIO_PFCAE5_PFCAE53_SHIFT               (3u)
+#define GPIO_PFCAE5_PFCAE54_SHIFT               (4u)
+#define GPIO_PFCAE5_PFCAE55_SHIFT               (5u)
+#define GPIO_PFCAE5_PFCAE56_SHIFT               (6u)
+#define GPIO_PFCAE5_PFCAE57_SHIFT               (7u)
+#define GPIO_PFCAE5_PFCAE58_SHIFT               (8u)
+#define GPIO_PFCAE5_PFCAE59_SHIFT               (9u)
+#define GPIO_PFCAE5_PFCAE510_SHIFT              (10u)
+
+#define GPIO_PIBC5_PIBC50_SHIFT                 (0u)
+#define GPIO_PIBC5_PIBC51_SHIFT                 (1u)
+#define GPIO_PIBC5_PIBC52_SHIFT                 (2u)
+#define GPIO_PIBC5_PIBC53_SHIFT                 (3u)
+#define GPIO_PIBC5_PIBC54_SHIFT                 (4u)
+#define GPIO_PIBC5_PIBC55_SHIFT                 (5u)
+#define GPIO_PIBC5_PIBC56_SHIFT                 (6u)
+#define GPIO_PIBC5_PIBC57_SHIFT                 (7u)
+#define GPIO_PIBC5_PIBC58_SHIFT                 (8u)
+#define GPIO_PIBC5_PIBC59_SHIFT                 (9u)
+#define GPIO_PIBC5_PIBC510_SHIFT                (10u)
+
+#define GPIO_PBDC5_PBDC50_SHIFT                 (0u)
+#define GPIO_PBDC5_PBDC51_SHIFT                 (1u)
+#define GPIO_PBDC5_PBDC52_SHIFT                 (2u)
+#define GPIO_PBDC5_PBDC53_SHIFT                 (3u)
+#define GPIO_PBDC5_PBDC54_SHIFT                 (4u)
+#define GPIO_PBDC5_PBDC55_SHIFT                 (5u)
+#define GPIO_PBDC5_PBDC56_SHIFT                 (6u)
+#define GPIO_PBDC5_PBDC57_SHIFT                 (7u)
+#define GPIO_PBDC5_PBDC58_SHIFT                 (8u)
+#define GPIO_PBDC5_PBDC59_SHIFT                 (9u)
+#define GPIO_PBDC5_PBDC510_SHIFT                (10u)
+
+#define GPIO_PIPC5_PIPC50_SHIFT                 (0u)
+#define GPIO_PIPC5_PIPC51_SHIFT                 (1u)
+#define GPIO_PIPC5_PIPC52_SHIFT                 (2u)
+#define GPIO_PIPC5_PIPC53_SHIFT                 (3u)
+#define GPIO_PIPC5_PIPC54_SHIFT                 (4u)
+#define GPIO_PIPC5_PIPC55_SHIFT                 (5u)
+#define GPIO_PIPC5_PIPC56_SHIFT                 (6u)
+#define GPIO_PIPC5_PIPC57_SHIFT                 (7u)
+#define GPIO_PIPC5_PIPC58_SHIFT                 (8u)
+#define GPIO_PIPC5_PIPC59_SHIFT                 (9u)
+#define GPIO_PIPC5_PIPC510_SHIFT                (10u)
+
+/* ---- P6 ---- */
+#define GPIO_P6_P60_SHIFT                       (0u)
+#define GPIO_P6_P61_SHIFT                       (1u)
+#define GPIO_P6_P62_SHIFT                       (2u)
+#define GPIO_P6_P63_SHIFT                       (3u)
+#define GPIO_P6_P64_SHIFT                       (4u)
+#define GPIO_P6_P65_SHIFT                       (5u)
+#define GPIO_P6_P66_SHIFT                       (6u)
+#define GPIO_P6_P67_SHIFT                       (7u)
+#define GPIO_P6_P68_SHIFT                       (8u)
+#define GPIO_P6_P69_SHIFT                       (9u)
+#define GPIO_P6_P610_SHIFT                      (10u)
+#define GPIO_P6_P611_SHIFT                      (11u)
+#define GPIO_P6_P612_SHIFT                      (12u)
+#define GPIO_P6_P613_SHIFT                      (13u)
+#define GPIO_P6_P614_SHIFT                      (14u)
+#define GPIO_P6_P615_SHIFT                      (15u)
+
+#define GPIO_PSR6_PSR60_SHIFT                   (0u)
+#define GPIO_PSR6_PSR61_SHIFT                   (1u)
+#define GPIO_PSR6_PSR62_SHIFT                   (2u)
+#define GPIO_PSR6_PSR63_SHIFT                   (3u)
+#define GPIO_PSR6_PSR64_SHIFT                   (4u)
+#define GPIO_PSR6_PSR65_SHIFT                   (5u)
+#define GPIO_PSR6_PSR66_SHIFT                   (6u)
+#define GPIO_PSR6_PSR67_SHIFT                   (7u)
+#define GPIO_PSR6_PSR68_SHIFT                   (8u)
+#define GPIO_PSR6_PSR69_SHIFT                   (9u)
+#define GPIO_PSR6_PSR610_SHIFT                  (10u)
+#define GPIO_PSR6_PSR611_SHIFT                  (11u)
+#define GPIO_PSR6_PSR612_SHIFT                  (12u)
+#define GPIO_PSR6_PSR613_SHIFT                  (13u)
+#define GPIO_PSR6_PSR614_SHIFT                  (14u)
+#define GPIO_PSR6_PSR615_SHIFT                  (15u)
+#define GPIO_PSR6_PSR616_SHIFT                  (16u)
+#define GPIO_PSR6_PSR617_SHIFT                  (17u)
+#define GPIO_PSR6_PSR618_SHIFT                  (18u)
+#define GPIO_PSR6_PSR619_SHIFT                  (19u)
+#define GPIO_PSR6_PSR620_SHIFT                  (20u)
+#define GPIO_PSR6_PSR621_SHIFT                  (21u)
+#define GPIO_PSR6_PSR622_SHIFT                  (22u)
+#define GPIO_PSR6_PSR623_SHIFT                  (23u)
+#define GPIO_PSR6_PSR624_SHIFT                  (24u)
+#define GPIO_PSR6_PSR625_SHIFT                  (25u)
+#define GPIO_PSR6_PSR626_SHIFT                  (26u)
+#define GPIO_PSR6_PSR627_SHIFT                  (27u)
+#define GPIO_PSR6_PSR628_SHIFT                  (28u)
+#define GPIO_PSR6_PSR629_SHIFT                  (29u)
+#define GPIO_PSR6_PSR630_SHIFT                  (30u)
+#define GPIO_PSR6_PSR631_SHIFT                  (31u)
+
+#define GPIO_PPR6_PPR60_SHIFT                   (0u)
+#define GPIO_PPR6_PPR61_SHIFT                   (1u)
+#define GPIO_PPR6_PPR62_SHIFT                   (2u)
+#define GPIO_PPR6_PPR63_SHIFT                   (3u)
+#define GPIO_PPR6_PPR64_SHIFT                   (4u)
+#define GPIO_PPR6_PPR65_SHIFT                   (5u)
+#define GPIO_PPR6_PPR66_SHIFT                   (6u)
+#define GPIO_PPR6_PPR67_SHIFT                   (7u)
+#define GPIO_PPR6_PPR68_SHIFT                   (8u)
+#define GPIO_PPR6_PPR69_SHIFT                   (9u)
+#define GPIO_PPR6_PPR610_SHIFT                  (10u)
+#define GPIO_PPR6_PPR611_SHIFT                  (11u)
+#define GPIO_PPR6_PPR612_SHIFT                  (12u)
+#define GPIO_PPR6_PPR613_SHIFT                  (13u)
+#define GPIO_PPR6_PPR614_SHIFT                  (14u)
+#define GPIO_PPR6_PPR615_SHIFT                  (15u)
+
+#define GPIO_PM6_PM60_SHIFT                     (0u)
+#define GPIO_PM6_PM61_SHIFT                     (1u)
+#define GPIO_PM6_PM62_SHIFT                     (2u)
+#define GPIO_PM6_PM63_SHIFT                     (3u)
+#define GPIO_PM6_PM64_SHIFT                     (4u)
+#define GPIO_PM6_PM65_SHIFT                     (5u)
+#define GPIO_PM6_PM66_SHIFT                     (6u)
+#define GPIO_PM6_PM67_SHIFT                     (7u)
+#define GPIO_PM6_PM68_SHIFT                     (8u)
+#define GPIO_PM6_PM69_SHIFT                     (9u)
+#define GPIO_PM6_PM610_SHIFT                    (10u)
+#define GPIO_PM6_PM611_SHIFT                    (11u)
+#define GPIO_PM6_PM612_SHIFT                    (12u)
+#define GPIO_PM6_PM613_SHIFT                    (13u)
+#define GPIO_PM6_PM614_SHIFT                    (14u)
+#define GPIO_PM6_PM615_SHIFT                    (15u)
+
+#define GPIO_PMC6_PMC60_SHIFT                   (0u)
+#define GPIO_PMC6_PMC61_SHIFT                   (1u)
+#define GPIO_PMC6_PMC62_SHIFT                   (2u)
+#define GPIO_PMC6_PMC63_SHIFT                   (3u)
+#define GPIO_PMC6_PMC64_SHIFT                   (4u)
+#define GPIO_PMC6_PMC65_SHIFT                   (5u)
+#define GPIO_PMC6_PMC66_SHIFT                   (6u)
+#define GPIO_PMC6_PMC67_SHIFT                   (7u)
+#define GPIO_PMC6_PMC68_SHIFT                   (8u)
+#define GPIO_PMC6_PMC69_SHIFT                   (9u)
+#define GPIO_PMC6_PMC610_SHIFT                  (10u)
+#define GPIO_PMC6_PMC611_SHIFT                  (11u)
+#define GPIO_PMC6_PMC612_SHIFT                  (12u)
+#define GPIO_PMC6_PMC613_SHIFT                  (13u)
+#define GPIO_PMC6_PMC614_SHIFT                  (14u)
+#define GPIO_PMC6_PMC615_SHIFT                  (15u)
+
+#define GPIO_PFC6_PFC60_SHIFT                   (0u)
+#define GPIO_PFC6_PFC61_SHIFT                   (1u)
+#define GPIO_PFC6_PFC62_SHIFT                   (2u)
+#define GPIO_PFC6_PFC63_SHIFT                   (3u)
+#define GPIO_PFC6_PFC64_SHIFT                   (4u)
+#define GPIO_PFC6_PFC65_SHIFT                   (5u)
+#define GPIO_PFC6_PFC66_SHIFT                   (6u)
+#define GPIO_PFC6_PFC67_SHIFT                   (7u)
+#define GPIO_PFC6_PFC68_SHIFT                   (8u)
+#define GPIO_PFC6_PFC69_SHIFT                   (9u)
+#define GPIO_PFC6_PFC610_SHIFT                  (10u)
+#define GPIO_PFC6_PFC611_SHIFT                  (11u)
+#define GPIO_PFC6_PFC612_SHIFT                  (12u)
+#define GPIO_PFC6_PFC613_SHIFT                  (13u)
+#define GPIO_PFC6_PFC614_SHIFT                  (14u)
+#define GPIO_PFC6_PFC615_SHIFT                  (15u)
+
+#define GPIO_PFCE6_PFCE60_SHIFT                 (0u)
+#define GPIO_PFCE6_PFCE61_SHIFT                 (1u)
+#define GPIO_PFCE6_PFCE62_SHIFT                 (2u)
+#define GPIO_PFCE6_PFCE63_SHIFT                 (3u)
+#define GPIO_PFCE6_PFCE64_SHIFT                 (4u)
+#define GPIO_PFCE6_PFCE65_SHIFT                 (5u)
+#define GPIO_PFCE6_PFCE66_SHIFT                 (6u)
+#define GPIO_PFCE6_PFCE67_SHIFT                 (7u)
+#define GPIO_PFCE6_PFCE68_SHIFT                 (8u)
+#define GPIO_PFCE6_PFCE69_SHIFT                 (9u)
+#define GPIO_PFCE6_PFCE610_SHIFT                (10u)
+#define GPIO_PFCE6_PFCE611_SHIFT                (11u)
+#define GPIO_PFCE6_PFCE612_SHIFT                (12u)
+#define GPIO_PFCE6_PFCE613_SHIFT                (13u)
+#define GPIO_PFCE6_PFCE614_SHIFT                (14u)
+#define GPIO_PFCE6_PFCE615_SHIFT                (15u)
+
+#define GPIO_PNOT6_PNOT60_SHIFT                 (0u)
+#define GPIO_PNOT6_PNOT61_SHIFT                 (1u)
+#define GPIO_PNOT6_PNOT62_SHIFT                 (2u)
+#define GPIO_PNOT6_PNOT63_SHIFT                 (3u)
+#define GPIO_PNOT6_PNOT64_SHIFT                 (4u)
+#define GPIO_PNOT6_PNOT65_SHIFT                 (5u)
+#define GPIO_PNOT6_PNOT66_SHIFT                 (6u)
+#define GPIO_PNOT6_PNOT67_SHIFT                 (7u)
+#define GPIO_PNOT6_PNOT68_SHIFT                 (8u)
+#define GPIO_PNOT6_PNOT69_SHIFT                 (9u)
+#define GPIO_PNOT6_PNOT610_SHIFT                (10u)
+#define GPIO_PNOT6_PNOT611_SHIFT                (11u)
+#define GPIO_PNOT6_PNOT612_SHIFT                (12u)
+#define GPIO_PNOT6_PNOT613_SHIFT                (13u)
+#define GPIO_PNOT6_PNOT614_SHIFT                (14u)
+#define GPIO_PNOT6_PNOT615_SHIFT                (15u)
+
+#define GPIO_PMSR6_PMSR60_SHIFT                 (0u)
+#define GPIO_PMSR6_PMSR61_SHIFT                 (1u)
+#define GPIO_PMSR6_PMSR62_SHIFT                 (2u)
+#define GPIO_PMSR6_PMSR63_SHIFT                 (3u)
+#define GPIO_PMSR6_PMSR64_SHIFT                 (4u)
+#define GPIO_PMSR6_PMSR65_SHIFT                 (5u)
+#define GPIO_PMSR6_PMSR66_SHIFT                 (6u)
+#define GPIO_PMSR6_PMSR67_SHIFT                 (7u)
+#define GPIO_PMSR6_PMSR68_SHIFT                 (8u)
+#define GPIO_PMSR6_PMSR69_SHIFT                 (9u)
+#define GPIO_PMSR6_PMSR610_SHIFT                (10u)
+#define GPIO_PMSR6_PMSR611_SHIFT                (11u)
+#define GPIO_PMSR6_PMSR612_SHIFT                (12u)
+#define GPIO_PMSR6_PMSR613_SHIFT                (13u)
+#define GPIO_PMSR6_PMSR614_SHIFT                (14u)
+#define GPIO_PMSR6_PMSR615_SHIFT                (15u)
+#define GPIO_PMSR6_PMSR616_SHIFT                (16u)
+#define GPIO_PMSR6_PMSR617_SHIFT                (17u)
+#define GPIO_PMSR6_PMSR618_SHIFT                (18u)
+#define GPIO_PMSR6_PMSR619_SHIFT                (19u)
+#define GPIO_PMSR6_PMSR620_SHIFT                (20u)
+#define GPIO_PMSR6_PMSR621_SHIFT                (21u)
+#define GPIO_PMSR6_PMSR622_SHIFT                (22u)
+#define GPIO_PMSR6_PMSR623_SHIFT                (23u)
+#define GPIO_PMSR6_PMSR624_SHIFT                (24u)
+#define GPIO_PMSR6_PMSR625_SHIFT                (25u)
+#define GPIO_PMSR6_PMSR626_SHIFT                (26u)
+#define GPIO_PMSR6_PMSR627_SHIFT                (27u)
+#define GPIO_PMSR6_PMSR628_SHIFT                (28u)
+#define GPIO_PMSR6_PMSR629_SHIFT                (29u)
+#define GPIO_PMSR6_PMSR630_SHIFT                (30u)
+#define GPIO_PMSR6_PMSR631_SHIFT                (31u)
+
+#define GPIO_PMCSR6_PMCSR60_SHIFT               (0u)
+#define GPIO_PMCSR6_PMCSR61_SHIFT               (1u)
+#define GPIO_PMCSR6_PMCSR62_SHIFT               (2u)
+#define GPIO_PMCSR6_PMCSR63_SHIFT               (3u)
+#define GPIO_PMCSR6_PMCSR64_SHIFT               (4u)
+#define GPIO_PMCSR6_PMCSR65_SHIFT               (5u)
+#define GPIO_PMCSR6_PMCSR66_SHIFT               (6u)
+#define GPIO_PMCSR6_PMCSR67_SHIFT               (7u)
+#define GPIO_PMCSR6_PMCSR68_SHIFT               (8u)
+#define GPIO_PMCSR6_PMCSR69_SHIFT               (9u)
+#define GPIO_PMCSR6_PMCSR610_SHIFT              (10u)
+#define GPIO_PMCSR6_PMCSR611_SHIFT              (11u)
+#define GPIO_PMCSR6_PMCSR612_SHIFT              (12u)
+#define GPIO_PMCSR6_PMCSR613_SHIFT              (13u)
+#define GPIO_PMCSR6_PMCSR614_SHIFT              (14u)
+#define GPIO_PMCSR6_PMCSR615_SHIFT              (15u)
+#define GPIO_PMCSR6_PMCSR616_SHIFT              (16u)
+#define GPIO_PMCSR6_PMCSR617_SHIFT              (17u)
+#define GPIO_PMCSR6_PMCSR618_SHIFT              (18u)
+#define GPIO_PMCSR6_PMCSR619_SHIFT              (19u)
+#define GPIO_PMCSR6_PMCSR620_SHIFT              (20u)
+#define GPIO_PMCSR6_PMCSR621_SHIFT              (21u)
+#define GPIO_PMCSR6_PMCSR622_SHIFT              (22u)
+#define GPIO_PMCSR6_PMCSR623_SHIFT              (23u)
+#define GPIO_PMCSR6_PMCSR624_SHIFT              (24u)
+#define GPIO_PMCSR6_PMCSR625_SHIFT              (25u)
+#define GPIO_PMCSR6_PMCSR626_SHIFT              (26u)
+#define GPIO_PMCSR6_PMCSR627_SHIFT              (27u)
+#define GPIO_PMCSR6_PMCSR628_SHIFT              (28u)
+#define GPIO_PMCSR6_PMCSR629_SHIFT              (29u)
+#define GPIO_PMCSR6_PMCSR630_SHIFT              (30u)
+#define GPIO_PMCSR6_PMCSR631_SHIFT              (31u)
+
+#define GPIO_PFCAE6_PFCAE60_SHIFT               (0u)
+#define GPIO_PFCAE6_PFCAE61_SHIFT               (1u)
+#define GPIO_PFCAE6_PFCAE62_SHIFT               (2u)
+#define GPIO_PFCAE6_PFCAE63_SHIFT               (3u)
+#define GPIO_PFCAE6_PFCAE64_SHIFT               (4u)
+#define GPIO_PFCAE6_PFCAE65_SHIFT               (5u)
+#define GPIO_PFCAE6_PFCAE66_SHIFT               (6u)
+#define GPIO_PFCAE6_PFCAE67_SHIFT               (7u)
+#define GPIO_PFCAE6_PFCAE68_SHIFT               (8u)
+#define GPIO_PFCAE6_PFCAE69_SHIFT               (9u)
+#define GPIO_PFCAE6_PFCAE610_SHIFT              (10u)
+#define GPIO_PFCAE6_PFCAE611_SHIFT              (11u)
+#define GPIO_PFCAE6_PFCAE612_SHIFT              (12u)
+#define GPIO_PFCAE6_PFCAE613_SHIFT              (13u)
+#define GPIO_PFCAE6_PFCAE614_SHIFT              (14u)
+#define GPIO_PFCAE6_PFCAE615_SHIFT              (15u)
+
+#define GPIO_PIBC6_PIBC60_SHIFT                 (0u)
+#define GPIO_PIBC6_PIBC61_SHIFT                 (1u)
+#define GPIO_PIBC6_PIBC62_SHIFT                 (2u)
+#define GPIO_PIBC6_PIBC63_SHIFT                 (3u)
+#define GPIO_PIBC6_PIBC64_SHIFT                 (4u)
+#define GPIO_PIBC6_PIBC65_SHIFT                 (5u)
+#define GPIO_PIBC6_PIBC66_SHIFT                 (6u)
+#define GPIO_PIBC6_PIBC67_SHIFT                 (7u)
+#define GPIO_PIBC6_PIBC68_SHIFT                 (8u)
+#define GPIO_PIBC6_PIBC69_SHIFT                 (9u)
+#define GPIO_PIBC6_PIBC610_SHIFT                (10u)
+#define GPIO_PIBC6_PIBC611_SHIFT                (11u)
+#define GPIO_PIBC6_PIBC612_SHIFT                (12u)
+#define GPIO_PIBC6_PIBC613_SHIFT                (13u)
+#define GPIO_PIBC6_PIBC614_SHIFT                (14u)
+#define GPIO_PIBC6_PIBC615_SHIFT                (15u)
+
+#define GPIO_PBDC6_PBDC60_SHIFT                 (0u)
+#define GPIO_PBDC6_PBDC61_SHIFT                 (1u)
+#define GPIO_PBDC6_PBDC62_SHIFT                 (2u)
+#define GPIO_PBDC6_PBDC63_SHIFT                 (3u)
+#define GPIO_PBDC6_PBDC64_SHIFT                 (4u)
+#define GPIO_PBDC6_PBDC65_SHIFT                 (5u)
+#define GPIO_PBDC6_PBDC66_SHIFT                 (6u)
+#define GPIO_PBDC6_PBDC67_SHIFT                 (7u)
+#define GPIO_PBDC6_PBDC68_SHIFT                 (8u)
+#define GPIO_PBDC6_PBDC69_SHIFT                 (9u)
+#define GPIO_PBDC6_PBDC610_SHIFT                (10u)
+#define GPIO_PBDC6_PBDC611_SHIFT                (11u)
+#define GPIO_PBDC6_PBDC612_SHIFT                (12u)
+#define GPIO_PBDC6_PBDC613_SHIFT                (13u)
+#define GPIO_PBDC6_PBDC614_SHIFT                (14u)
+#define GPIO_PBDC6_PBDC615_SHIFT                (15u)
+
+#define GPIO_PIPC6_PIPC60_SHIFT                 (0u)
+#define GPIO_PIPC6_PIPC61_SHIFT                 (1u)
+#define GPIO_PIPC6_PIPC62_SHIFT                 (2u)
+#define GPIO_PIPC6_PIPC63_SHIFT                 (3u)
+#define GPIO_PIPC6_PIPC64_SHIFT                 (4u)
+#define GPIO_PIPC6_PIPC65_SHIFT                 (5u)
+#define GPIO_PIPC6_PIPC66_SHIFT                 (6u)
+#define GPIO_PIPC6_PIPC67_SHIFT                 (7u)
+#define GPIO_PIPC6_PIPC68_SHIFT                 (8u)
+#define GPIO_PIPC6_PIPC69_SHIFT                 (9u)
+#define GPIO_PIPC6_PIPC610_SHIFT                (10u)
+#define GPIO_PIPC6_PIPC611_SHIFT                (11u)
+#define GPIO_PIPC6_PIPC612_SHIFT                (12u)
+#define GPIO_PIPC6_PIPC613_SHIFT                (13u)
+#define GPIO_PIPC6_PIPC614_SHIFT                (14u)
+#define GPIO_PIPC6_PIPC615_SHIFT                (15u)
+
+/* ---- P7 ---- */
+#define GPIO_P7_P70_SHIFT                       (0u)
+#define GPIO_P7_P71_SHIFT                       (1u)
+#define GPIO_P7_P72_SHIFT                       (2u)
+#define GPIO_P7_P73_SHIFT                       (3u)
+#define GPIO_P7_P74_SHIFT                       (4u)
+#define GPIO_P7_P75_SHIFT                       (5u)
+#define GPIO_P7_P76_SHIFT                       (6u)
+#define GPIO_P7_P77_SHIFT                       (7u)
+#define GPIO_P7_P78_SHIFT                       (8u)
+#define GPIO_P7_P79_SHIFT                       (9u)
+#define GPIO_P7_P710_SHIFT                      (10u)
+#define GPIO_P7_P711_SHIFT                      (11u)
+#define GPIO_P7_P712_SHIFT                      (12u)
+#define GPIO_P7_P713_SHIFT                      (13u)
+#define GPIO_P7_P714_SHIFT                      (14u)
+#define GPIO_P7_P715_SHIFT                      (15u)
+
+#define GPIO_PSR7_PSR70_SHIFT                   (0u)
+#define GPIO_PSR7_PSR71_SHIFT                   (1u)
+#define GPIO_PSR7_PSR72_SHIFT                   (2u)
+#define GPIO_PSR7_PSR73_SHIFT                   (3u)
+#define GPIO_PSR7_PSR74_SHIFT                   (4u)
+#define GPIO_PSR7_PSR75_SHIFT                   (5u)
+#define GPIO_PSR7_PSR76_SHIFT                   (6u)
+#define GPIO_PSR7_PSR77_SHIFT                   (7u)
+#define GPIO_PSR7_PSR78_SHIFT                   (8u)
+#define GPIO_PSR7_PSR79_SHIFT                   (9u)
+#define GPIO_PSR7_PSR710_SHIFT                  (10u)
+#define GPIO_PSR7_PSR711_SHIFT                  (11u)
+#define GPIO_PSR7_PSR712_SHIFT                  (12u)
+#define GPIO_PSR7_PSR713_SHIFT                  (13u)
+#define GPIO_PSR7_PSR714_SHIFT                  (14u)
+#define GPIO_PSR7_PSR715_SHIFT                  (15u)
+#define GPIO_PSR7_PSR716_SHIFT                  (16u)
+#define GPIO_PSR7_PSR717_SHIFT                  (17u)
+#define GPIO_PSR7_PSR718_SHIFT                  (18u)
+#define GPIO_PSR7_PSR719_SHIFT                  (19u)
+#define GPIO_PSR7_PSR720_SHIFT                  (20u)
+#define GPIO_PSR7_PSR721_SHIFT                  (21u)
+#define GPIO_PSR7_PSR722_SHIFT                  (22u)
+#define GPIO_PSR7_PSR723_SHIFT                  (23u)
+#define GPIO_PSR7_PSR724_SHIFT                  (24u)
+#define GPIO_PSR7_PSR725_SHIFT                  (25u)
+#define GPIO_PSR7_PSR726_SHIFT                  (26u)
+#define GPIO_PSR7_PSR727_SHIFT                  (27u)
+#define GPIO_PSR7_PSR728_SHIFT                  (28u)
+#define GPIO_PSR7_PSR729_SHIFT                  (29u)
+#define GPIO_PSR7_PSR730_SHIFT                  (30u)
+#define GPIO_PSR7_PSR731_SHIFT                  (31u)
+
+#define GPIO_PPR7_PPR70_SHIFT                   (0u)
+#define GPIO_PPR7_PPR71_SHIFT                   (1u)
+#define GPIO_PPR7_PPR72_SHIFT                   (2u)
+#define GPIO_PPR7_PPR73_SHIFT                   (3u)
+#define GPIO_PPR7_PPR74_SHIFT                   (4u)
+#define GPIO_PPR7_PPR75_SHIFT                   (5u)
+#define GPIO_PPR7_PPR76_SHIFT                   (6u)
+#define GPIO_PPR7_PPR77_SHIFT                   (7u)
+#define GPIO_PPR7_PPR78_SHIFT                   (8u)
+#define GPIO_PPR7_PPR79_SHIFT                   (9u)
+#define GPIO_PPR7_PPR710_SHIFT                  (10u)
+#define GPIO_PPR7_PPR711_SHIFT                  (11u)
+#define GPIO_PPR7_PPR712_SHIFT                  (12u)
+#define GPIO_PPR7_PPR713_SHIFT                  (13u)
+#define GPIO_PPR7_PPR714_SHIFT                  (14u)
+#define GPIO_PPR7_PPR715_SHIFT                  (15u)
+
+#define GPIO_PM7_PM70_SHIFT                     (0u)
+#define GPIO_PM7_PM71_SHIFT                     (1u)
+#define GPIO_PM7_PM72_SHIFT                     (2u)
+#define GPIO_PM7_PM73_SHIFT                     (3u)
+#define GPIO_PM7_PM74_SHIFT                     (4u)
+#define GPIO_PM7_PM75_SHIFT                     (5u)
+#define GPIO_PM7_PM76_SHIFT                     (6u)
+#define GPIO_PM7_PM77_SHIFT                     (7u)
+#define GPIO_PM7_PM78_SHIFT                     (8u)
+#define GPIO_PM7_PM79_SHIFT                     (9u)
+#define GPIO_PM7_PM710_SHIFT                    (10u)
+#define GPIO_PM7_PM711_SHIFT                    (11u)
+#define GPIO_PM7_PM712_SHIFT                    (12u)
+#define GPIO_PM7_PM713_SHIFT                    (13u)
+#define GPIO_PM7_PM714_SHIFT                    (14u)
+#define GPIO_PM7_PM715_SHIFT                    (15u)
+
+#define GPIO_PMC7_PMC70_SHIFT                   (0u)
+#define GPIO_PMC7_PMC71_SHIFT                   (1u)
+#define GPIO_PMC7_PMC72_SHIFT                   (2u)
+#define GPIO_PMC7_PMC73_SHIFT                   (3u)
+#define GPIO_PMC7_PMC74_SHIFT                   (4u)
+#define GPIO_PMC7_PMC75_SHIFT                   (5u)
+#define GPIO_PMC7_PMC76_SHIFT                   (6u)
+#define GPIO_PMC7_PMC77_SHIFT                   (7u)
+#define GPIO_PMC7_PMC78_SHIFT                   (8u)
+#define GPIO_PMC7_PMC79_SHIFT                   (9u)
+#define GPIO_PMC7_PMC710_SHIFT                  (10u)
+#define GPIO_PMC7_PMC711_SHIFT                  (11u)
+#define GPIO_PMC7_PMC712_SHIFT                  (12u)
+#define GPIO_PMC7_PMC713_SHIFT                  (13u)
+#define GPIO_PMC7_PMC714_SHIFT                  (14u)
+#define GPIO_PMC7_PMC715_SHIFT                  (15u)
+
+#define GPIO_PFC7_PFC70_SHIFT                   (0u)
+#define GPIO_PFC7_PFC71_SHIFT                   (1u)
+#define GPIO_PFC7_PFC72_SHIFT                   (2u)
+#define GPIO_PFC7_PFC73_SHIFT                   (3u)
+#define GPIO_PFC7_PFC74_SHIFT                   (4u)
+#define GPIO_PFC7_PFC75_SHIFT                   (5u)
+#define GPIO_PFC7_PFC76_SHIFT                   (6u)
+#define GPIO_PFC7_PFC77_SHIFT                   (7u)
+#define GPIO_PFC7_PFC78_SHIFT                   (8u)
+#define GPIO_PFC7_PFC79_SHIFT                   (9u)
+#define GPIO_PFC7_PFC710_SHIFT                  (10u)
+#define GPIO_PFC7_PFC711_SHIFT                  (11u)
+#define GPIO_PFC7_PFC712_SHIFT                  (12u)
+#define GPIO_PFC7_PFC713_SHIFT                  (13u)
+#define GPIO_PFC7_PFC714_SHIFT                  (14u)
+#define GPIO_PFC7_PFC715_SHIFT                  (15u)
+
+#define GPIO_PFCE7_PFCE70_SHIFT                 (0u)
+#define GPIO_PFCE7_PFCE71_SHIFT                 (1u)
+#define GPIO_PFCE7_PFCE72_SHIFT                 (2u)
+#define GPIO_PFCE7_PFCE73_SHIFT                 (3u)
+#define GPIO_PFCE7_PFCE74_SHIFT                 (4u)
+#define GPIO_PFCE7_PFCE75_SHIFT                 (5u)
+#define GPIO_PFCE7_PFCE76_SHIFT                 (6u)
+#define GPIO_PFCE7_PFCE77_SHIFT                 (7u)
+#define GPIO_PFCE7_PFCE78_SHIFT                 (8u)
+#define GPIO_PFCE7_PFCE79_SHIFT                 (9u)
+#define GPIO_PFCE7_PFCE710_SHIFT                (10u)
+#define GPIO_PFCE7_PFCE711_SHIFT                (11u)
+#define GPIO_PFCE7_PFCE712_SHIFT                (12u)
+#define GPIO_PFCE7_PFCE713_SHIFT                (13u)
+#define GPIO_PFCE7_PFCE714_SHIFT                (14u)
+#define GPIO_PFCE7_PFCE715_SHIFT                (15u)
+
+#define GPIO_PNOT7_PNOT70_SHIFT                 (0u)
+#define GPIO_PNOT7_PNOT71_SHIFT                 (1u)
+#define GPIO_PNOT7_PNOT72_SHIFT                 (2u)
+#define GPIO_PNOT7_PNOT73_SHIFT                 (3u)
+#define GPIO_PNOT7_PNOT74_SHIFT                 (4u)
+#define GPIO_PNOT7_PNOT75_SHIFT                 (5u)
+#define GPIO_PNOT7_PNOT76_SHIFT                 (6u)
+#define GPIO_PNOT7_PNOT77_SHIFT                 (7u)
+#define GPIO_PNOT7_PNOT78_SHIFT                 (8u)
+#define GPIO_PNOT7_PNOT79_SHIFT                 (9u)
+#define GPIO_PNOT7_PNOT710_SHIFT                (10u)
+#define GPIO_PNOT7_PNOT711_SHIFT                (11u)
+#define GPIO_PNOT7_PNOT712_SHIFT                (12u)
+#define GPIO_PNOT7_PNOT713_SHIFT                (13u)
+#define GPIO_PNOT7_PNOT714_SHIFT                (14u)
+#define GPIO_PNOT7_PNOT715_SHIFT                (15u)
+
+#define GPIO_PMSR7_PMSR70_SHIFT                 (0u)
+#define GPIO_PMSR7_PMSR71_SHIFT                 (1u)
+#define GPIO_PMSR7_PMSR72_SHIFT                 (2u)
+#define GPIO_PMSR7_PMSR73_SHIFT                 (3u)
+#define GPIO_PMSR7_PMSR74_SHIFT                 (4u)
+#define GPIO_PMSR7_PMSR75_SHIFT                 (5u)
+#define GPIO_PMSR7_PMSR76_SHIFT                 (6u)
+#define GPIO_PMSR7_PMSR77_SHIFT                 (7u)
+#define GPIO_PMSR7_PMSR78_SHIFT                 (8u)
+#define GPIO_PMSR7_PMSR79_SHIFT                 (9u)
+#define GPIO_PMSR7_PMSR710_SHIFT                (10u)
+#define GPIO_PMSR7_PMSR711_SHIFT                (11u)
+#define GPIO_PMSR7_PMSR712_SHIFT                (12u)
+#define GPIO_PMSR7_PMSR713_SHIFT                (13u)
+#define GPIO_PMSR7_PMSR714_SHIFT                (14u)
+#define GPIO_PMSR7_PMSR715_SHIFT                (15u)
+#define GPIO_PMSR7_PMSR716_SHIFT                (16u)
+#define GPIO_PMSR7_PMSR717_SHIFT                (17u)
+#define GPIO_PMSR7_PMSR718_SHIFT                (18u)
+#define GPIO_PMSR7_PMSR719_SHIFT                (19u)
+#define GPIO_PMSR7_PMSR720_SHIFT                (20u)
+#define GPIO_PMSR7_PMSR721_SHIFT                (21u)
+#define GPIO_PMSR7_PMSR722_SHIFT                (22u)
+#define GPIO_PMSR7_PMSR723_SHIFT                (23u)
+#define GPIO_PMSR7_PMSR724_SHIFT                (24u)
+#define GPIO_PMSR7_PMSR725_SHIFT                (25u)
+#define GPIO_PMSR7_PMSR726_SHIFT                (26u)
+#define GPIO_PMSR7_PMSR727_SHIFT                (27u)
+#define GPIO_PMSR7_PMSR728_SHIFT                (28u)
+#define GPIO_PMSR7_PMSR729_SHIFT                (29u)
+#define GPIO_PMSR7_PMSR730_SHIFT                (30u)
+#define GPIO_PMSR7_PMSR731_SHIFT                (31u)
+
+#define GPIO_PMCSR7_PMCSR70_SHIFT               (0u)
+#define GPIO_PMCSR7_PMCSR71_SHIFT               (1u)
+#define GPIO_PMCSR7_PMCSR72_SHIFT               (2u)
+#define GPIO_PMCSR7_PMCSR73_SHIFT               (3u)
+#define GPIO_PMCSR7_PMCSR74_SHIFT               (4u)
+#define GPIO_PMCSR7_PMCSR75_SHIFT               (5u)
+#define GPIO_PMCSR7_PMCSR76_SHIFT               (6u)
+#define GPIO_PMCSR7_PMCSR77_SHIFT               (7u)
+#define GPIO_PMCSR7_PMCSR78_SHIFT               (8u)
+#define GPIO_PMCSR7_PMCSR79_SHIFT               (9u)
+#define GPIO_PMCSR7_PMCSR710_SHIFT              (10u)
+#define GPIO_PMCSR7_PMCSR711_SHIFT              (11u)
+#define GPIO_PMCSR7_PMCSR712_SHIFT              (12u)
+#define GPIO_PMCSR7_PMCSR713_SHIFT              (13u)
+#define GPIO_PMCSR7_PMCSR714_SHIFT              (14u)
+#define GPIO_PMCSR7_PMCSR715_SHIFT              (15u)
+#define GPIO_PMCSR7_PMCSR716_SHIFT              (16u)
+#define GPIO_PMCSR7_PMCSR717_SHIFT              (17u)
+#define GPIO_PMCSR7_PMCSR718_SHIFT              (18u)
+#define GPIO_PMCSR7_PMCSR719_SHIFT              (19u)
+#define GPIO_PMCSR7_PMCSR720_SHIFT              (20u)
+#define GPIO_PMCSR7_PMCSR721_SHIFT              (21u)
+#define GPIO_PMCSR7_PMCSR722_SHIFT              (22u)
+#define GPIO_PMCSR7_PMCSR723_SHIFT              (23u)
+#define GPIO_PMCSR7_PMCSR724_SHIFT              (24u)
+#define GPIO_PMCSR7_PMCSR725_SHIFT              (25u)
+#define GPIO_PMCSR7_PMCSR726_SHIFT              (26u)
+#define GPIO_PMCSR7_PMCSR727_SHIFT              (27u)
+#define GPIO_PMCSR7_PMCSR728_SHIFT              (28u)
+#define GPIO_PMCSR7_PMCSR729_SHIFT              (29u)
+#define GPIO_PMCSR7_PMCSR730_SHIFT              (30u)
+#define GPIO_PMCSR7_PMCSR731_SHIFT              (31u)
+
+#define GPIO_PFCAE7_PFCAE70_SHIFT               (0u)
+#define GPIO_PFCAE7_PFCAE71_SHIFT               (1u)
+#define GPIO_PFCAE7_PFCAE72_SHIFT               (2u)
+#define GPIO_PFCAE7_PFCAE73_SHIFT               (3u)
+#define GPIO_PFCAE7_PFCAE74_SHIFT               (4u)
+#define GPIO_PFCAE7_PFCAE75_SHIFT               (5u)
+#define GPIO_PFCAE7_PFCAE76_SHIFT               (6u)
+#define GPIO_PFCAE7_PFCAE77_SHIFT               (7u)
+#define GPIO_PFCAE7_PFCAE78_SHIFT               (8u)
+#define GPIO_PFCAE7_PFCAE79_SHIFT               (9u)
+#define GPIO_PFCAE7_PFCAE710_SHIFT              (10u)
+#define GPIO_PFCAE7_PFCAE711_SHIFT              (11u)
+#define GPIO_PFCAE7_PFCAE712_SHIFT              (12u)
+#define GPIO_PFCAE7_PFCAE713_SHIFT              (13u)
+#define GPIO_PFCAE7_PFCAE714_SHIFT              (14u)
+#define GPIO_PFCAE7_PFCAE715_SHIFT              (15u)
+
+#define GPIO_PIBC7_PIBC70_SHIFT                 (0u)
+#define GPIO_PIBC7_PIBC71_SHIFT                 (1u)
+#define GPIO_PIBC7_PIBC72_SHIFT                 (2u)
+#define GPIO_PIBC7_PIBC73_SHIFT                 (3u)
+#define GPIO_PIBC7_PIBC74_SHIFT                 (4u)
+#define GPIO_PIBC7_PIBC75_SHIFT                 (5u)
+#define GPIO_PIBC7_PIBC76_SHIFT                 (6u)
+#define GPIO_PIBC7_PIBC77_SHIFT                 (7u)
+#define GPIO_PIBC7_PIBC78_SHIFT                 (8u)
+#define GPIO_PIBC7_PIBC79_SHIFT                 (9u)
+#define GPIO_PIBC7_PIBC710_SHIFT                (10u)
+#define GPIO_PIBC7_PIBC711_SHIFT                (11u)
+#define GPIO_PIBC7_PIBC712_SHIFT                (12u)
+#define GPIO_PIBC7_PIBC713_SHIFT                (13u)
+#define GPIO_PIBC7_PIBC714_SHIFT                (14u)
+#define GPIO_PIBC7_PIBC715_SHIFT                (15u)
+
+#define GPIO_PBDC7_PBDC70_SHIFT                 (0u)
+#define GPIO_PBDC7_PBDC71_SHIFT                 (1u)
+#define GPIO_PBDC7_PBDC72_SHIFT                 (2u)
+#define GPIO_PBDC7_PBDC73_SHIFT                 (3u)
+#define GPIO_PBDC7_PBDC74_SHIFT                 (4u)
+#define GPIO_PBDC7_PBDC75_SHIFT                 (5u)
+#define GPIO_PBDC7_PBDC76_SHIFT                 (6u)
+#define GPIO_PBDC7_PBDC77_SHIFT                 (7u)
+#define GPIO_PBDC7_PBDC78_SHIFT                 (8u)
+#define GPIO_PBDC7_PBDC79_SHIFT                 (9u)
+#define GPIO_PBDC7_PBDC710_SHIFT                (10u)
+#define GPIO_PBDC7_PBDC711_SHIFT                (11u)
+#define GPIO_PBDC7_PBDC712_SHIFT                (12u)
+#define GPIO_PBDC7_PBDC713_SHIFT                (13u)
+#define GPIO_PBDC7_PBDC714_SHIFT                (14u)
+#define GPIO_PBDC7_PBDC715_SHIFT                (15u)
+
+#define GPIO_PIPC7_PIPC70_SHIFT                 (0u)
+#define GPIO_PIPC7_PIPC71_SHIFT                 (1u)
+#define GPIO_PIPC7_PIPC72_SHIFT                 (2u)
+#define GPIO_PIPC7_PIPC73_SHIFT                 (3u)
+#define GPIO_PIPC7_PIPC74_SHIFT                 (4u)
+#define GPIO_PIPC7_PIPC75_SHIFT                 (5u)
+#define GPIO_PIPC7_PIPC76_SHIFT                 (6u)
+#define GPIO_PIPC7_PIPC77_SHIFT                 (7u)
+#define GPIO_PIPC7_PIPC78_SHIFT                 (8u)
+#define GPIO_PIPC7_PIPC79_SHIFT                 (9u)
+#define GPIO_PIPC7_PIPC710_SHIFT                (10u)
+#define GPIO_PIPC7_PIPC711_SHIFT                (11u)
+#define GPIO_PIPC7_PIPC712_SHIFT                (12u)
+#define GPIO_PIPC7_PIPC713_SHIFT                (13u)
+#define GPIO_PIPC7_PIPC714_SHIFT                (14u)
+#define GPIO_PIPC7_PIPC715_SHIFT                (15u)
+
+/* ---- P8 ---- */
+#define GPIO_P8_P80_SHIFT                       (0u)
+#define GPIO_P8_P81_SHIFT                       (1u)
+#define GPIO_P8_P82_SHIFT                       (2u)
+#define GPIO_P8_P83_SHIFT                       (3u)
+#define GPIO_P8_P84_SHIFT                       (4u)
+#define GPIO_P8_P85_SHIFT                       (5u)
+#define GPIO_P8_P86_SHIFT                       (6u)
+#define GPIO_P8_P87_SHIFT                       (7u)
+#define GPIO_P8_P88_SHIFT                       (8u)
+#define GPIO_P8_P89_SHIFT                       (9u)
+#define GPIO_P8_P810_SHIFT                      (10u)
+#define GPIO_P8_P811_SHIFT                      (11u)
+#define GPIO_P8_P812_SHIFT                      (12u)
+#define GPIO_P8_P813_SHIFT                      (13u)
+#define GPIO_P8_P814_SHIFT                      (14u)
+#define GPIO_P8_P815_SHIFT                      (15u)
+
+#define GPIO_PSR8_PSR80_SHIFT                   (0u)
+#define GPIO_PSR8_PSR81_SHIFT                   (1u)
+#define GPIO_PSR8_PSR82_SHIFT                   (2u)
+#define GPIO_PSR8_PSR83_SHIFT                   (3u)
+#define GPIO_PSR8_PSR84_SHIFT                   (4u)
+#define GPIO_PSR8_PSR85_SHIFT                   (5u)
+#define GPIO_PSR8_PSR86_SHIFT                   (6u)
+#define GPIO_PSR8_PSR87_SHIFT                   (7u)
+#define GPIO_PSR8_PSR88_SHIFT                   (8u)
+#define GPIO_PSR8_PSR89_SHIFT                   (9u)
+#define GPIO_PSR8_PSR810_SHIFT                  (10u)
+#define GPIO_PSR8_PSR811_SHIFT                  (11u)
+#define GPIO_PSR8_PSR812_SHIFT                  (12u)
+#define GPIO_PSR8_PSR813_SHIFT                  (13u)
+#define GPIO_PSR8_PSR814_SHIFT                  (14u)
+#define GPIO_PSR8_PSR815_SHIFT                  (15u)
+#define GPIO_PSR8_PSR816_SHIFT                  (16u)
+#define GPIO_PSR8_PSR817_SHIFT                  (17u)
+#define GPIO_PSR8_PSR818_SHIFT                  (18u)
+#define GPIO_PSR8_PSR819_SHIFT                  (19u)
+#define GPIO_PSR8_PSR820_SHIFT                  (20u)
+#define GPIO_PSR8_PSR821_SHIFT                  (21u)
+#define GPIO_PSR8_PSR822_SHIFT                  (22u)
+#define GPIO_PSR8_PSR823_SHIFT                  (23u)
+#define GPIO_PSR8_PSR824_SHIFT                  (24u)
+#define GPIO_PSR8_PSR825_SHIFT                  (25u)
+#define GPIO_PSR8_PSR826_SHIFT                  (26u)
+#define GPIO_PSR8_PSR827_SHIFT                  (27u)
+#define GPIO_PSR8_PSR828_SHIFT                  (28u)
+#define GPIO_PSR8_PSR829_SHIFT                  (29u)
+#define GPIO_PSR8_PSR830_SHIFT                  (30u)
+#define GPIO_PSR8_PSR831_SHIFT                  (31u)
+
+#define GPIO_PPR8_PPR80_SHIFT                   (0u)
+#define GPIO_PPR8_PPR81_SHIFT                   (1u)
+#define GPIO_PPR8_PPR82_SHIFT                   (2u)
+#define GPIO_PPR8_PPR83_SHIFT                   (3u)
+#define GPIO_PPR8_PPR84_SHIFT                   (4u)
+#define GPIO_PPR8_PPR85_SHIFT                   (5u)
+#define GPIO_PPR8_PPR86_SHIFT                   (6u)
+#define GPIO_PPR8_PPR87_SHIFT                   (7u)
+#define GPIO_PPR8_PPR88_SHIFT                   (8u)
+#define GPIO_PPR8_PPR89_SHIFT                   (9u)
+#define GPIO_PPR8_PPR810_SHIFT                  (10u)
+#define GPIO_PPR8_PPR811_SHIFT                  (11u)
+#define GPIO_PPR8_PPR812_SHIFT                  (12u)
+#define GPIO_PPR8_PPR813_SHIFT                  (13u)
+#define GPIO_PPR8_PPR814_SHIFT                  (14u)
+#define GPIO_PPR8_PPR815_SHIFT                  (15u)
+
+#define GPIO_PM8_PM80_SHIFT                     (0u)
+#define GPIO_PM8_PM81_SHIFT                     (1u)
+#define GPIO_PM8_PM82_SHIFT                     (2u)
+#define GPIO_PM8_PM83_SHIFT                     (3u)
+#define GPIO_PM8_PM84_SHIFT                     (4u)
+#define GPIO_PM8_PM85_SHIFT                     (5u)
+#define GPIO_PM8_PM86_SHIFT                     (6u)
+#define GPIO_PM8_PM87_SHIFT                     (7u)
+#define GPIO_PM8_PM88_SHIFT                     (8u)
+#define GPIO_PM8_PM89_SHIFT                     (9u)
+#define GPIO_PM8_PM810_SHIFT                    (10u)
+#define GPIO_PM8_PM811_SHIFT                    (11u)
+#define GPIO_PM8_PM812_SHIFT                    (12u)
+#define GPIO_PM8_PM813_SHIFT                    (13u)
+#define GPIO_PM8_PM814_SHIFT                    (14u)
+#define GPIO_PM8_PM815_SHIFT                    (15u)
+
+#define GPIO_PMC8_PMC80_SHIFT                   (0u)
+#define GPIO_PMC8_PMC81_SHIFT                   (1u)
+#define GPIO_PMC8_PMC82_SHIFT                   (2u)
+#define GPIO_PMC8_PMC83_SHIFT                   (3u)
+#define GPIO_PMC8_PMC84_SHIFT                   (4u)
+#define GPIO_PMC8_PMC85_SHIFT                   (5u)
+#define GPIO_PMC8_PMC86_SHIFT                   (6u)
+#define GPIO_PMC8_PMC87_SHIFT                   (7u)
+#define GPIO_PMC8_PMC88_SHIFT                   (8u)
+#define GPIO_PMC8_PMC89_SHIFT                   (9u)
+#define GPIO_PMC8_PMC810_SHIFT                  (10u)
+#define GPIO_PMC8_PMC811_SHIFT                  (11u)
+#define GPIO_PMC8_PMC812_SHIFT                  (12u)
+#define GPIO_PMC8_PMC813_SHIFT                  (13u)
+#define GPIO_PMC8_PMC814_SHIFT                  (14u)
+#define GPIO_PMC8_PMC815_SHIFT                  (15u)
+
+#define GPIO_PFC8_PFC80_SHIFT                   (0u)
+#define GPIO_PFC8_PFC81_SHIFT                   (1u)
+#define GPIO_PFC8_PFC82_SHIFT                   (2u)
+#define GPIO_PFC8_PFC83_SHIFT                   (3u)
+#define GPIO_PFC8_PFC84_SHIFT                   (4u)
+#define GPIO_PFC8_PFC85_SHIFT                   (5u)
+#define GPIO_PFC8_PFC86_SHIFT                   (6u)
+#define GPIO_PFC8_PFC87_SHIFT                   (7u)
+#define GPIO_PFC8_PFC88_SHIFT                   (8u)
+#define GPIO_PFC8_PFC89_SHIFT                   (9u)
+#define GPIO_PFC8_PFC810_SHIFT                  (10u)
+#define GPIO_PFC8_PFC811_SHIFT                  (11u)
+#define GPIO_PFC8_PFC812_SHIFT                  (12u)
+#define GPIO_PFC8_PFC813_SHIFT                  (13u)
+#define GPIO_PFC8_PFC814_SHIFT                  (14u)
+#define GPIO_PFC8_PFC815_SHIFT                  (15u)
+
+#define GPIO_PFCE8_PFCE80_SHIFT                 (0u)
+#define GPIO_PFCE8_PFCE81_SHIFT                 (1u)
+#define GPIO_PFCE8_PFCE82_SHIFT                 (2u)
+#define GPIO_PFCE8_PFCE83_SHIFT                 (3u)
+#define GPIO_PFCE8_PFCE84_SHIFT                 (4u)
+#define GPIO_PFCE8_PFCE85_SHIFT                 (5u)
+#define GPIO_PFCE8_PFCE86_SHIFT                 (6u)
+#define GPIO_PFCE8_PFCE87_SHIFT                 (7u)
+#define GPIO_PFCE8_PFCE88_SHIFT                 (8u)
+#define GPIO_PFCE8_PFCE89_SHIFT                 (9u)
+#define GPIO_PFCE8_PFCE810_SHIFT                (10u)
+#define GPIO_PFCE8_PFCE811_SHIFT                (11u)
+#define GPIO_PFCE8_PFCE812_SHIFT                (12u)
+#define GPIO_PFCE8_PFCE813_SHIFT                (13u)
+#define GPIO_PFCE8_PFCE814_SHIFT                (14u)
+#define GPIO_PFCE8_PFCE815_SHIFT                (15u)
+
+#define GPIO_PNOT8_PNOT80_SHIFT                 (0u)
+#define GPIO_PNOT8_PNOT81_SHIFT                 (1u)
+#define GPIO_PNOT8_PNOT82_SHIFT                 (2u)
+#define GPIO_PNOT8_PNOT83_SHIFT                 (3u)
+#define GPIO_PNOT8_PNOT84_SHIFT                 (4u)
+#define GPIO_PNOT8_PNOT85_SHIFT                 (5u)
+#define GPIO_PNOT8_PNOT86_SHIFT                 (6u)
+#define GPIO_PNOT8_PNOT87_SHIFT                 (7u)
+#define GPIO_PNOT8_PNOT88_SHIFT                 (8u)
+#define GPIO_PNOT8_PNOT89_SHIFT                 (9u)
+#define GPIO_PNOT8_PNOT810_SHIFT                (10u)
+#define GPIO_PNOT8_PNOT811_SHIFT                (11u)
+#define GPIO_PNOT8_PNOT812_SHIFT                (12u)
+#define GPIO_PNOT8_PNOT813_SHIFT                (13u)
+#define GPIO_PNOT8_PNOT814_SHIFT                (14u)
+#define GPIO_PNOT8_PNOT815_SHIFT                (15u)
+
+#define GPIO_PMSR8_PMSR80_SHIFT                 (0u)
+#define GPIO_PMSR8_PMSR81_SHIFT                 (1u)
+#define GPIO_PMSR8_PMSR82_SHIFT                 (2u)
+#define GPIO_PMSR8_PMSR83_SHIFT                 (3u)
+#define GPIO_PMSR8_PMSR84_SHIFT                 (4u)
+#define GPIO_PMSR8_PMSR85_SHIFT                 (5u)
+#define GPIO_PMSR8_PMSR86_SHIFT                 (6u)
+#define GPIO_PMSR8_PMSR87_SHIFT                 (7u)
+#define GPIO_PMSR8_PMSR88_SHIFT                 (8u)
+#define GPIO_PMSR8_PMSR89_SHIFT                 (9u)
+#define GPIO_PMSR8_PMSR810_SHIFT                (10u)
+#define GPIO_PMSR8_PMSR811_SHIFT                (11u)
+#define GPIO_PMSR8_PMSR812_SHIFT                (12u)
+#define GPIO_PMSR8_PMSR813_SHIFT                (13u)
+#define GPIO_PMSR8_PMSR814_SHIFT                (14u)
+#define GPIO_PMSR8_PMSR815_SHIFT                (15u)
+#define GPIO_PMSR8_PMSR816_SHIFT                (16u)
+#define GPIO_PMSR8_PMSR817_SHIFT                (17u)
+#define GPIO_PMSR8_PMSR818_SHIFT                (18u)
+#define GPIO_PMSR8_PMSR819_SHIFT                (19u)
+#define GPIO_PMSR8_PMSR820_SHIFT                (20u)
+#define GPIO_PMSR8_PMSR821_SHIFT                (21u)
+#define GPIO_PMSR8_PMSR822_SHIFT                (22u)
+#define GPIO_PMSR8_PMSR823_SHIFT                (23u)
+#define GPIO_PMSR8_PMSR824_SHIFT                (24u)
+#define GPIO_PMSR8_PMSR825_SHIFT                (25u)
+#define GPIO_PMSR8_PMSR826_SHIFT                (26u)
+#define GPIO_PMSR8_PMSR827_SHIFT                (27u)
+#define GPIO_PMSR8_PMSR828_SHIFT                (28u)
+#define GPIO_PMSR8_PMSR829_SHIFT                (29u)
+#define GPIO_PMSR8_PMSR830_SHIFT                (30u)
+#define GPIO_PMSR8_PMSR831_SHIFT                (31u)
+
+#define GPIO_PMCSR8_PMCSR80_SHIFT               (0u)
+#define GPIO_PMCSR8_PMCSR81_SHIFT               (1u)
+#define GPIO_PMCSR8_PMCSR82_SHIFT               (2u)
+#define GPIO_PMCSR8_PMCSR83_SHIFT               (3u)
+#define GPIO_PMCSR8_PMCSR84_SHIFT               (4u)
+#define GPIO_PMCSR8_PMCSR85_SHIFT               (5u)
+#define GPIO_PMCSR8_PMCSR86_SHIFT               (6u)
+#define GPIO_PMCSR8_PMCSR87_SHIFT               (7u)
+#define GPIO_PMCSR8_PMCSR88_SHIFT               (8u)
+#define GPIO_PMCSR8_PMCSR89_SHIFT               (9u)
+#define GPIO_PMCSR8_PMCSR810_SHIFT              (10u)
+#define GPIO_PMCSR8_PMCSR811_SHIFT              (11u)
+#define GPIO_PMCSR8_PMCSR812_SHIFT              (12u)
+#define GPIO_PMCSR8_PMCSR813_SHIFT              (13u)
+#define GPIO_PMCSR8_PMCSR814_SHIFT              (14u)
+#define GPIO_PMCSR8_PMCSR815_SHIFT              (15u)
+#define GPIO_PMCSR8_PMCSR816_SHIFT              (16u)
+#define GPIO_PMCSR8_PMCSR817_SHIFT              (17u)
+#define GPIO_PMCSR8_PMCSR818_SHIFT              (18u)
+#define GPIO_PMCSR8_PMCSR819_SHIFT              (19u)
+#define GPIO_PMCSR8_PMCSR820_SHIFT              (20u)
+#define GPIO_PMCSR8_PMCSR821_SHIFT              (21u)
+#define GPIO_PMCSR8_PMCSR822_SHIFT              (22u)
+#define GPIO_PMCSR8_PMCSR823_SHIFT              (23u)
+#define GPIO_PMCSR8_PMCSR824_SHIFT              (24u)
+#define GPIO_PMCSR8_PMCSR825_SHIFT              (25u)
+#define GPIO_PMCSR8_PMCSR826_SHIFT              (26u)
+#define GPIO_PMCSR8_PMCSR827_SHIFT              (27u)
+#define GPIO_PMCSR8_PMCSR828_SHIFT              (28u)
+#define GPIO_PMCSR8_PMCSR829_SHIFT              (29u)
+#define GPIO_PMCSR8_PMCSR830_SHIFT              (30u)
+#define GPIO_PMCSR8_PMCSR831_SHIFT              (31u)
+
+#define GPIO_PFCAE8_PFCAE80_SHIFT               (0u)
+#define GPIO_PFCAE8_PFCAE81_SHIFT               (1u)
+#define GPIO_PFCAE8_PFCAE82_SHIFT               (2u)
+#define GPIO_PFCAE8_PFCAE83_SHIFT               (3u)
+#define GPIO_PFCAE8_PFCAE84_SHIFT               (4u)
+#define GPIO_PFCAE8_PFCAE85_SHIFT               (5u)
+#define GPIO_PFCAE8_PFCAE86_SHIFT               (6u)
+#define GPIO_PFCAE8_PFCAE87_SHIFT               (7u)
+#define GPIO_PFCAE8_PFCAE88_SHIFT               (8u)
+#define GPIO_PFCAE8_PFCAE89_SHIFT               (9u)
+#define GPIO_PFCAE8_PFCAE810_SHIFT              (10u)
+#define GPIO_PFCAE8_PFCAE811_SHIFT              (11u)
+#define GPIO_PFCAE8_PFCAE812_SHIFT              (12u)
+#define GPIO_PFCAE8_PFCAE813_SHIFT              (13u)
+#define GPIO_PFCAE8_PFCAE814_SHIFT              (14u)
+#define GPIO_PFCAE8_PFCAE815_SHIFT              (15u)
+
+#define GPIO_PIBC8_PIBC80_SHIFT                 (0u)
+#define GPIO_PIBC8_PIBC81_SHIFT                 (1u)
+#define GPIO_PIBC8_PIBC82_SHIFT                 (2u)
+#define GPIO_PIBC8_PIBC83_SHIFT                 (3u)
+#define GPIO_PIBC8_PIBC84_SHIFT                 (4u)
+#define GPIO_PIBC8_PIBC85_SHIFT                 (5u)
+#define GPIO_PIBC8_PIBC86_SHIFT                 (6u)
+#define GPIO_PIBC8_PIBC87_SHIFT                 (7u)
+#define GPIO_PIBC8_PIBC88_SHIFT                 (8u)
+#define GPIO_PIBC8_PIBC89_SHIFT                 (9u)
+#define GPIO_PIBC8_PIBC810_SHIFT                (10u)
+#define GPIO_PIBC8_PIBC811_SHIFT                (11u)
+#define GPIO_PIBC8_PIBC812_SHIFT                (12u)
+#define GPIO_PIBC8_PIBC813_SHIFT                (13u)
+#define GPIO_PIBC8_PIBC814_SHIFT                (14u)
+#define GPIO_PIBC8_PIBC815_SHIFT                (15u)
+
+#define GPIO_PBDC8_PBDC80_SHIFT                 (0u)
+#define GPIO_PBDC8_PBDC81_SHIFT                 (1u)
+#define GPIO_PBDC8_PBDC82_SHIFT                 (2u)
+#define GPIO_PBDC8_PBDC83_SHIFT                 (3u)
+#define GPIO_PBDC8_PBDC84_SHIFT                 (4u)
+#define GPIO_PBDC8_PBDC85_SHIFT                 (5u)
+#define GPIO_PBDC8_PBDC86_SHIFT                 (6u)
+#define GPIO_PBDC8_PBDC87_SHIFT                 (7u)
+#define GPIO_PBDC8_PBDC88_SHIFT                 (8u)
+#define GPIO_PBDC8_PBDC89_SHIFT                 (9u)
+#define GPIO_PBDC8_PBDC810_SHIFT                (10u)
+#define GPIO_PBDC8_PBDC811_SHIFT                (11u)
+#define GPIO_PBDC8_PBDC812_SHIFT                (12u)
+#define GPIO_PBDC8_PBDC813_SHIFT                (13u)
+#define GPIO_PBDC8_PBDC814_SHIFT                (14u)
+#define GPIO_PBDC8_PBDC815_SHIFT                (15u)
+
+#define GPIO_PIPC8_PIPC80_SHIFT                 (0u)
+#define GPIO_PIPC8_PIPC81_SHIFT                 (1u)
+#define GPIO_PIPC8_PIPC82_SHIFT                 (2u)
+#define GPIO_PIPC8_PIPC83_SHIFT                 (3u)
+#define GPIO_PIPC8_PIPC84_SHIFT                 (4u)
+#define GPIO_PIPC8_PIPC85_SHIFT                 (5u)
+#define GPIO_PIPC8_PIPC86_SHIFT                 (6u)
+#define GPIO_PIPC8_PIPC87_SHIFT                 (7u)
+#define GPIO_PIPC8_PIPC88_SHIFT                 (8u)
+#define GPIO_PIPC8_PIPC89_SHIFT                 (9u)
+#define GPIO_PIPC8_PIPC810_SHIFT                (10u)
+#define GPIO_PIPC8_PIPC811_SHIFT                (11u)
+#define GPIO_PIPC8_PIPC812_SHIFT                (12u)
+#define GPIO_PIPC8_PIPC813_SHIFT                (13u)
+#define GPIO_PIPC8_PIPC814_SHIFT                (14u)
+#define GPIO_PIPC8_PIPC815_SHIFT                (15u)
+
+/* ---- P9 ---- */
+#define GPIO_P9_P90_SHIFT                       (0u)
+#define GPIO_P9_P91_SHIFT                       (1u)
+#define GPIO_P9_P92_SHIFT                       (2u)
+#define GPIO_P9_P93_SHIFT                       (3u)
+#define GPIO_P9_P94_SHIFT                       (4u)
+#define GPIO_P9_P95_SHIFT                       (5u)
+#define GPIO_P9_P96_SHIFT                       (6u)
+#define GPIO_P9_P97_SHIFT                       (7u)
+
+#define GPIO_PSR9_PSR90_SHIFT                   (0u)
+#define GPIO_PSR9_PSR91_SHIFT                   (1u)
+#define GPIO_PSR9_PSR92_SHIFT                   (2u)
+#define GPIO_PSR9_PSR93_SHIFT                   (3u)
+#define GPIO_PSR9_PSR94_SHIFT                   (4u)
+#define GPIO_PSR9_PSR95_SHIFT                   (5u)
+#define GPIO_PSR9_PSR96_SHIFT                   (6u)
+#define GPIO_PSR9_PSR97_SHIFT                   (7u)
+#define GPIO_PSR9_PSR916_SHIFT                  (16u)
+#define GPIO_PSR9_PSR917_SHIFT                  (17u)
+#define GPIO_PSR9_PSR918_SHIFT                  (18u)
+#define GPIO_PSR9_PSR919_SHIFT                  (19u)
+#define GPIO_PSR9_PSR920_SHIFT                  (20u)
+#define GPIO_PSR9_PSR921_SHIFT                  (21u)
+#define GPIO_PSR9_PSR922_SHIFT                  (22u)
+#define GPIO_PSR9_PSR923_SHIFT                  (23u)
+
+#define GPIO_PPR9_PPR90_SHIFT                   (0u)
+#define GPIO_PPR9_PPR91_SHIFT                   (1u)
+#define GPIO_PPR9_PPR92_SHIFT                   (2u)
+#define GPIO_PPR9_PPR93_SHIFT                   (3u)
+#define GPIO_PPR9_PPR94_SHIFT                   (4u)
+#define GPIO_PPR9_PPR95_SHIFT                   (5u)
+#define GPIO_PPR9_PPR96_SHIFT                   (6u)
+#define GPIO_PPR9_PPR97_SHIFT                   (7u)
+
+#define GPIO_PM9_PM90_SHIFT                     (0u)
+#define GPIO_PM9_PM91_SHIFT                     (1u)
+#define GPIO_PM9_PM92_SHIFT                     (2u)
+#define GPIO_PM9_PM93_SHIFT                     (3u)
+#define GPIO_PM9_PM94_SHIFT                     (4u)
+#define GPIO_PM9_PM95_SHIFT                     (5u)
+#define GPIO_PM9_PM96_SHIFT                     (6u)
+#define GPIO_PM9_PM97_SHIFT                     (7u)
+
+#define GPIO_PMC9_PMC90_SHIFT                   (0u)
+#define GPIO_PMC9_PMC91_SHIFT                   (1u)
+#define GPIO_PMC9_PMC92_SHIFT                   (2u)
+#define GPIO_PMC9_PMC93_SHIFT                   (3u)
+#define GPIO_PMC9_PMC94_SHIFT                   (4u)
+#define GPIO_PMC9_PMC95_SHIFT                   (5u)
+#define GPIO_PMC9_PMC96_SHIFT                   (6u)
+#define GPIO_PMC9_PMC97_SHIFT                   (7u)
+
+#define GPIO_PFC9_PFC90_SHIFT                   (0u)
+#define GPIO_PFC9_PFC91_SHIFT                   (1u)
+#define GPIO_PFC9_PFC92_SHIFT                   (2u)
+#define GPIO_PFC9_PFC93_SHIFT                   (3u)
+#define GPIO_PFC9_PFC94_SHIFT                   (4u)
+#define GPIO_PFC9_PFC95_SHIFT                   (5u)
+#define GPIO_PFC9_PFC96_SHIFT                   (6u)
+#define GPIO_PFC9_PFC97_SHIFT                   (7u)
+
+#define GPIO_PFCE9_PFCE90_SHIFT                 (0u)
+#define GPIO_PFCE9_PFCE91_SHIFT                 (1u)
+#define GPIO_PFCE9_PFCE92_SHIFT                 (2u)
+#define GPIO_PFCE9_PFCE93_SHIFT                 (3u)
+#define GPIO_PFCE9_PFCE94_SHIFT                 (4u)
+#define GPIO_PFCE9_PFCE95_SHIFT                 (5u)
+#define GPIO_PFCE9_PFCE96_SHIFT                 (6u)
+#define GPIO_PFCE9_PFCE97_SHIFT                 (7u)
+
+#define GPIO_PNOT9_PNOT90_SHIFT                 (0u)
+#define GPIO_PNOT9_PNOT91_SHIFT                 (1u)
+#define GPIO_PNOT9_PNOT92_SHIFT                 (2u)
+#define GPIO_PNOT9_PNOT93_SHIFT                 (3u)
+#define GPIO_PNOT9_PNOT94_SHIFT                 (4u)
+#define GPIO_PNOT9_PNOT95_SHIFT                 (5u)
+#define GPIO_PNOT9_PNOT96_SHIFT                 (6u)
+#define GPIO_PNOT9_PNOT97_SHIFT                 (7u)
+
+#define GPIO_PMSR9_PMSR90_SHIFT                 (0u)
+#define GPIO_PMSR9_PMSR91_SHIFT                 (1u)
+#define GPIO_PMSR9_PMSR92_SHIFT                 (2u)
+#define GPIO_PMSR9_PMSR93_SHIFT                 (3u)
+#define GPIO_PMSR9_PMSR94_SHIFT                 (4u)
+#define GPIO_PMSR9_PMSR95_SHIFT                 (5u)
+#define GPIO_PMSR9_PMSR96_SHIFT                 (6u)
+#define GPIO_PMSR9_PMSR97_SHIFT                 (7u)
+#define GPIO_PMSR9_PMSR916_SHIFT                (16u)
+#define GPIO_PMSR9_PMSR917_SHIFT                (17u)
+#define GPIO_PMSR9_PMSR918_SHIFT                (18u)
+#define GPIO_PMSR9_PMSR919_SHIFT                (19u)
+#define GPIO_PMSR9_PMSR920_SHIFT                (20u)
+#define GPIO_PMSR9_PMSR921_SHIFT                (21u)
+#define GPIO_PMSR9_PMSR922_SHIFT                (22u)
+#define GPIO_PMSR9_PMSR923_SHIFT                (23u)
+
+#define GPIO_PMCSR9_PMCSR90_SHIFT               (0u)
+#define GPIO_PMCSR9_PMCSR91_SHIFT               (1u)
+#define GPIO_PMCSR9_PMCSR92_SHIFT               (2u)
+#define GPIO_PMCSR9_PMCSR93_SHIFT               (3u)
+#define GPIO_PMCSR9_PMCSR94_SHIFT               (4u)
+#define GPIO_PMCSR9_PMCSR95_SHIFT               (5u)
+#define GPIO_PMCSR9_PMCSR96_SHIFT               (6u)
+#define GPIO_PMCSR9_PMCSR97_SHIFT               (7u)
+#define GPIO_PMCSR9_PMCSR916_SHIFT              (16u)
+#define GPIO_PMCSR9_PMCSR917_SHIFT              (17u)
+#define GPIO_PMCSR9_PMCSR918_SHIFT              (18u)
+#define GPIO_PMCSR9_PMCSR919_SHIFT              (19u)
+#define GPIO_PMCSR9_PMCSR920_SHIFT              (20u)
+#define GPIO_PMCSR9_PMCSR921_SHIFT              (21u)
+#define GPIO_PMCSR9_PMCSR922_SHIFT              (22u)
+#define GPIO_PMCSR9_PMCSR923_SHIFT              (23u)
+
+#define GPIO_PFCAE9_PFCAE90_SHIFT               (0u)
+#define GPIO_PFCAE9_PFCAE91_SHIFT               (1u)
+#define GPIO_PFCAE9_PFCAE92_SHIFT               (2u)
+#define GPIO_PFCAE9_PFCAE93_SHIFT               (3u)
+#define GPIO_PFCAE9_PFCAE94_SHIFT               (4u)
+#define GPIO_PFCAE9_PFCAE95_SHIFT               (5u)
+#define GPIO_PFCAE9_PFCAE96_SHIFT               (6u)
+#define GPIO_PFCAE9_PFCAE97_SHIFT               (7u)
+
+#define GPIO_PIBC9_PIBC90_SHIFT                 (0u)
+#define GPIO_PIBC9_PIBC91_SHIFT                 (1u)
+#define GPIO_PIBC9_PIBC92_SHIFT                 (2u)
+#define GPIO_PIBC9_PIBC93_SHIFT                 (3u)
+#define GPIO_PIBC9_PIBC94_SHIFT                 (4u)
+#define GPIO_PIBC9_PIBC95_SHIFT                 (5u)
+#define GPIO_PIBC9_PIBC96_SHIFT                 (6u)
+#define GPIO_PIBC9_PIBC97_SHIFT                 (7u)
+
+#define GPIO_PBDC9_PBDC90_SHIFT                 (0u)
+#define GPIO_PBDC9_PBDC91_SHIFT                 (1u)
+#define GPIO_PBDC9_PBDC92_SHIFT                 (2u)
+#define GPIO_PBDC9_PBDC93_SHIFT                 (3u)
+#define GPIO_PBDC9_PBDC94_SHIFT                 (4u)
+#define GPIO_PBDC9_PBDC95_SHIFT                 (5u)
+#define GPIO_PBDC9_PBDC96_SHIFT                 (6u)
+#define GPIO_PBDC9_PBDC97_SHIFT                 (7u)
+
+#define GPIO_PIPC9_PIPC90_SHIFT                 (0u)
+#define GPIO_PIPC9_PIPC91_SHIFT                 (1u)
+#define GPIO_PIPC9_PIPC92_SHIFT                 (2u)
+#define GPIO_PIPC9_PIPC93_SHIFT                 (3u)
+#define GPIO_PIPC9_PIPC94_SHIFT                 (4u)
+#define GPIO_PIPC9_PIPC95_SHIFT                 (5u)
+#define GPIO_PIPC9_PIPC96_SHIFT                 (6u)
+#define GPIO_PIPC9_PIPC97_SHIFT                 (7u)
+
+/* ---- P10 ---- */
+#define GPIO_P10_P100_SHIFT                     (0u)
+#define GPIO_P10_P101_SHIFT                     (1u)
+#define GPIO_P10_P102_SHIFT                     (2u)
+#define GPIO_P10_P103_SHIFT                     (3u)
+#define GPIO_P10_P104_SHIFT                     (4u)
+#define GPIO_P10_P105_SHIFT                     (5u)
+#define GPIO_P10_P106_SHIFT                     (6u)
+#define GPIO_P10_P107_SHIFT                     (7u)
+#define GPIO_P10_P108_SHIFT                     (8u)
+#define GPIO_P10_P109_SHIFT                     (9u)
+#define GPIO_P10_P1010_SHIFT                    (10u)
+#define GPIO_P10_P1011_SHIFT                    (11u)
+#define GPIO_P10_P1012_SHIFT                    (12u)
+#define GPIO_P10_P1013_SHIFT                    (13u)
+#define GPIO_P10_P1014_SHIFT                    (14u)
+#define GPIO_P10_P1015_SHIFT                    (15u)
+
+#define GPIO_PSR10_PSR100_SHIFT                 (0u)
+#define GPIO_PSR10_PSR101_SHIFT                 (1u)
+#define GPIO_PSR10_PSR102_SHIFT                 (2u)
+#define GPIO_PSR10_PSR103_SHIFT                 (3u)
+#define GPIO_PSR10_PSR104_SHIFT                 (4u)
+#define GPIO_PSR10_PSR105_SHIFT                 (5u)
+#define GPIO_PSR10_PSR106_SHIFT                 (6u)
+#define GPIO_PSR10_PSR107_SHIFT                 (7u)
+#define GPIO_PSR10_PSR108_SHIFT                 (8u)
+#define GPIO_PSR10_PSR109_SHIFT                 (9u)
+#define GPIO_PSR10_PSR1010_SHIFT                (10u)
+#define GPIO_PSR10_PSR1011_SHIFT                (11u)
+#define GPIO_PSR10_PSR1012_SHIFT                (12u)
+#define GPIO_PSR10_PSR1013_SHIFT                (13u)
+#define GPIO_PSR10_PSR1014_SHIFT                (14u)
+#define GPIO_PSR10_PSR1015_SHIFT                (15u)
+#define GPIO_PSR10_PSR1016_SHIFT                (16u)
+#define GPIO_PSR10_PSR1017_SHIFT                (17u)
+#define GPIO_PSR10_PSR1018_SHIFT                (18u)
+#define GPIO_PSR10_PSR1019_SHIFT                (19u)
+#define GPIO_PSR10_PSR1020_SHIFT                (20u)
+#define GPIO_PSR10_PSR1021_SHIFT                (21u)
+#define GPIO_PSR10_PSR1022_SHIFT                (22u)
+#define GPIO_PSR10_PSR1023_SHIFT                (23u)
+#define GPIO_PSR10_PSR1024_SHIFT                (24u)
+#define GPIO_PSR10_PSR1025_SHIFT                (25u)
+#define GPIO_PSR10_PSR1026_SHIFT                (26u)
+#define GPIO_PSR10_PSR1027_SHIFT                (27u)
+#define GPIO_PSR10_PSR1028_SHIFT                (28u)
+#define GPIO_PSR10_PSR1029_SHIFT                (29u)
+#define GPIO_PSR10_PSR1030_SHIFT                (30u)
+#define GPIO_PSR10_PSR1031_SHIFT                (31u)
+
+#define GPIO_PPR10_PPR100_SHIFT                 (0u)
+#define GPIO_PPR10_PPR101_SHIFT                 (1u)
+#define GPIO_PPR10_PPR102_SHIFT                 (2u)
+#define GPIO_PPR10_PPR103_SHIFT                 (3u)
+#define GPIO_PPR10_PPR104_SHIFT                 (4u)
+#define GPIO_PPR10_PPR105_SHIFT                 (5u)
+#define GPIO_PPR10_PPR106_SHIFT                 (6u)
+#define GPIO_PPR10_PPR107_SHIFT                 (7u)
+#define GPIO_PPR10_PPR108_SHIFT                 (8u)
+#define GPIO_PPR10_PPR109_SHIFT                 (9u)
+#define GPIO_PPR10_PPR1010_SHIFT                (10u)
+#define GPIO_PPR10_PPR1011_SHIFT                (11u)
+#define GPIO_PPR10_PPR1012_SHIFT                (12u)
+#define GPIO_PPR10_PPR1013_SHIFT                (13u)
+#define GPIO_PPR10_PPR1014_SHIFT                (14u)
+#define GPIO_PPR10_PPR1015_SHIFT                (15u)
+
+#define GPIO_PM10_PM100_SHIFT                   (0u)
+#define GPIO_PM10_PM101_SHIFT                   (1u)
+#define GPIO_PM10_PM102_SHIFT                   (2u)
+#define GPIO_PM10_PM103_SHIFT                   (3u)
+#define GPIO_PM10_PM104_SHIFT                   (4u)
+#define GPIO_PM10_PM105_SHIFT                   (5u)
+#define GPIO_PM10_PM106_SHIFT                   (6u)
+#define GPIO_PM10_PM107_SHIFT                   (7u)
+#define GPIO_PM10_PM108_SHIFT                   (8u)
+#define GPIO_PM10_PM109_SHIFT                   (9u)
+#define GPIO_PM10_PM1010_SHIFT                  (10u)
+#define GPIO_PM10_PM1011_SHIFT                  (11u)
+#define GPIO_PM10_PM1012_SHIFT                  (12u)
+#define GPIO_PM10_PM1013_SHIFT                  (13u)
+#define GPIO_PM10_PM1014_SHIFT                  (14u)
+#define GPIO_PM10_PM1015_SHIFT                  (15u)
+
+#define GPIO_PMC10_PMC100_SHIFT                 (0u)
+#define GPIO_PMC10_PMC101_SHIFT                 (1u)
+#define GPIO_PMC10_PMC102_SHIFT                 (2u)
+#define GPIO_PMC10_PMC103_SHIFT                 (3u)
+#define GPIO_PMC10_PMC104_SHIFT                 (4u)
+#define GPIO_PMC10_PMC105_SHIFT                 (5u)
+#define GPIO_PMC10_PMC106_SHIFT                 (6u)
+#define GPIO_PMC10_PMC107_SHIFT                 (7u)
+#define GPIO_PMC10_PMC108_SHIFT                 (8u)
+#define GPIO_PMC10_PMC109_SHIFT                 (9u)
+#define GPIO_PMC10_PMC1010_SHIFT                (10u)
+#define GPIO_PMC10_PMC1011_SHIFT                (11u)
+#define GPIO_PMC10_PMC1012_SHIFT                (12u)
+#define GPIO_PMC10_PMC1013_SHIFT                (13u)
+#define GPIO_PMC10_PMC1014_SHIFT                (14u)
+#define GPIO_PMC10_PMC1015_SHIFT                (15u)
+
+#define GPIO_PFC10_PFC100_SHIFT                 (0u)
+#define GPIO_PFC10_PFC101_SHIFT                 (1u)
+#define GPIO_PFC10_PFC102_SHIFT                 (2u)
+#define GPIO_PFC10_PFC103_SHIFT                 (3u)
+#define GPIO_PFC10_PFC104_SHIFT                 (4u)
+#define GPIO_PFC10_PFC105_SHIFT                 (5u)
+#define GPIO_PFC10_PFC106_SHIFT                 (6u)
+#define GPIO_PFC10_PFC107_SHIFT                 (7u)
+#define GPIO_PFC10_PFC108_SHIFT                 (8u)
+#define GPIO_PFC10_PFC109_SHIFT                 (9u)
+#define GPIO_PFC10_PFC1010_SHIFT                (10u)
+#define GPIO_PFC10_PFC1011_SHIFT                (11u)
+#define GPIO_PFC10_PFC1012_SHIFT                (12u)
+#define GPIO_PFC10_PFC1013_SHIFT                (13u)
+#define GPIO_PFC10_PFC1014_SHIFT                (14u)
+#define GPIO_PFC10_PFC1015_SHIFT                (15u)
+
+#define GPIO_PFCE10_PFCE100_SHIFT               (0u)
+#define GPIO_PFCE10_PFCE101_SHIFT               (1u)
+#define GPIO_PFCE10_PFCE102_SHIFT               (2u)
+#define GPIO_PFCE10_PFCE103_SHIFT               (3u)
+#define GPIO_PFCE10_PFCE104_SHIFT               (4u)
+#define GPIO_PFCE10_PFCE105_SHIFT               (5u)
+#define GPIO_PFCE10_PFCE106_SHIFT               (6u)
+#define GPIO_PFCE10_PFCE107_SHIFT               (7u)
+#define GPIO_PFCE10_PFCE108_SHIFT               (8u)
+#define GPIO_PFCE10_PFCE109_SHIFT               (9u)
+#define GPIO_PFCE10_PFCE1010_SHIFT              (10u)
+#define GPIO_PFCE10_PFCE1011_SHIFT              (11u)
+#define GPIO_PFCE10_PFCE1012_SHIFT              (12u)
+#define GPIO_PFCE10_PFCE1013_SHIFT              (13u)
+#define GPIO_PFCE10_PFCE1014_SHIFT              (14u)
+#define GPIO_PFCE10_PFCE1015_SHIFT              (15u)
+
+#define GPIO_PNOT10_PNOT100_SHIFT               (0u)
+#define GPIO_PNOT10_PNOT101_SHIFT               (1u)
+#define GPIO_PNOT10_PNOT102_SHIFT               (2u)
+#define GPIO_PNOT10_PNOT103_SHIFT               (3u)
+#define GPIO_PNOT10_PNOT104_SHIFT               (4u)
+#define GPIO_PNOT10_PNOT105_SHIFT               (5u)
+#define GPIO_PNOT10_PNOT106_SHIFT               (6u)
+#define GPIO_PNOT10_PNOT107_SHIFT               (7u)
+#define GPIO_PNOT10_PNOT108_SHIFT               (8u)
+#define GPIO_PNOT10_PNOT109_SHIFT               (9u)
+#define GPIO_PNOT10_PNOT1010_SHIFT              (10u)
+#define GPIO_PNOT10_PNOT1011_SHIFT              (11u)
+#define GPIO_PNOT10_PNOT1012_SHIFT              (12u)
+#define GPIO_PNOT10_PNOT1013_SHIFT              (13u)
+#define GPIO_PNOT10_PNOT1014_SHIFT              (14u)
+#define GPIO_PNOT10_PNOT1015_SHIFT              (15u)
+
+#define GPIO_PMSR10_PMSR100_SHIFT               (0u)
+#define GPIO_PMSR10_PMSR101_SHIFT               (1u)
+#define GPIO_PMSR10_PMSR102_SHIFT               (2u)
+#define GPIO_PMSR10_PMSR103_SHIFT               (3u)
+#define GPIO_PMSR10_PMSR104_SHIFT               (4u)
+#define GPIO_PMSR10_PMSR105_SHIFT               (5u)
+#define GPIO_PMSR10_PMSR106_SHIFT               (6u)
+#define GPIO_PMSR10_PMSR107_SHIFT               (7u)
+#define GPIO_PMSR10_PMSR108_SHIFT               (8u)
+#define GPIO_PMSR10_PMSR109_SHIFT               (9u)
+#define GPIO_PMSR10_PMSR1010_SHIFT              (10u)
+#define GPIO_PMSR10_PMSR1011_SHIFT              (11u)
+#define GPIO_PMSR10_PMSR1012_SHIFT              (12u)
+#define GPIO_PMSR10_PMSR1013_SHIFT              (13u)
+#define GPIO_PMSR10_PMSR1014_SHIFT              (14u)
+#define GPIO_PMSR10_PMSR1015_SHIFT              (15u)
+#define GPIO_PMSR10_PMSR1016_SHIFT              (16u)
+#define GPIO_PMSR10_PMSR1017_SHIFT              (17u)
+#define GPIO_PMSR10_PMSR1018_SHIFT              (18u)
+#define GPIO_PMSR10_PMSR1019_SHIFT              (19u)
+#define GPIO_PMSR10_PMSR1020_SHIFT              (20u)
+#define GPIO_PMSR10_PMSR1021_SHIFT              (21u)
+#define GPIO_PMSR10_PMSR1022_SHIFT              (22u)
+#define GPIO_PMSR10_PMSR1023_SHIFT              (23u)
+#define GPIO_PMSR10_PMSR1024_SHIFT              (24u)
+#define GPIO_PMSR10_PMSR1025_SHIFT              (25u)
+#define GPIO_PMSR10_PMSR1026_SHIFT              (26u)
+#define GPIO_PMSR10_PMSR1027_SHIFT              (27u)
+#define GPIO_PMSR10_PMSR1028_SHIFT              (28u)
+#define GPIO_PMSR10_PMSR1029_SHIFT              (29u)
+#define GPIO_PMSR10_PMSR1030_SHIFT              (30u)
+#define GPIO_PMSR10_PMSR1031_SHIFT              (31u)
+
+#define GPIO_PMCSR10_PMCSR100_SHIFT             (0u)
+#define GPIO_PMCSR10_PMCSR101_SHIFT             (1u)
+#define GPIO_PMCSR10_PMCSR102_SHIFT             (2u)
+#define GPIO_PMCSR10_PMCSR103_SHIFT             (3u)
+#define GPIO_PMCSR10_PMCSR104_SHIFT             (4u)
+#define GPIO_PMCSR10_PMCSR105_SHIFT             (5u)
+#define GPIO_PMCSR10_PMCSR106_SHIFT             (6u)
+#define GPIO_PMCSR10_PMCSR107_SHIFT             (7u)
+#define GPIO_PMCSR10_PMCSR108_SHIFT             (8u)
+#define GPIO_PMCSR10_PMCSR109_SHIFT             (9u)
+#define GPIO_PMCSR10_PMCSR1010_SHIFT            (10u)
+#define GPIO_PMCSR10_PMCSR1011_SHIFT            (11u)
+#define GPIO_PMCSR10_PMCSR1012_SHIFT            (12u)
+#define GPIO_PMCSR10_PMCSR1013_SHIFT            (13u)
+#define GPIO_PMCSR10_PMCSR1014_SHIFT            (14u)
+#define GPIO_PMCSR10_PMCSR1015_SHIFT            (15u)
+#define GPIO_PMCSR10_PMCSR1016_SHIFT            (16u)
+#define GPIO_PMCSR10_PMCSR1017_SHIFT            (17u)
+#define GPIO_PMCSR10_PMCSR1018_SHIFT            (18u)
+#define GPIO_PMCSR10_PMCSR1019_SHIFT            (19u)
+#define GPIO_PMCSR10_PMCSR1020_SHIFT            (20u)
+#define GPIO_PMCSR10_PMCSR1021_SHIFT            (21u)
+#define GPIO_PMCSR10_PMCSR1022_SHIFT            (22u)
+#define GPIO_PMCSR10_PMCSR1023_SHIFT            (23u)
+#define GPIO_PMCSR10_PMCSR1024_SHIFT            (24u)
+#define GPIO_PMCSR10_PMCSR1025_SHIFT            (25u)
+#define GPIO_PMCSR10_PMCSR1026_SHIFT            (26u)
+#define GPIO_PMCSR10_PMCSR1027_SHIFT            (27u)
+#define GPIO_PMCSR10_PMCSR1028_SHIFT            (28u)
+#define GPIO_PMCSR10_PMCSR1029_SHIFT            (29u)
+#define GPIO_PMCSR10_PMCSR1030_SHIFT            (30u)
+#define GPIO_PMCSR10_PMCSR1031_SHIFT            (31u)
+
+#define GPIO_PFCAE10_PFCAE100_SHIFT             (0u)
+#define GPIO_PFCAE10_PFCAE101_SHIFT             (1u)
+#define GPIO_PFCAE10_PFCAE102_SHIFT             (2u)
+#define GPIO_PFCAE10_PFCAE103_SHIFT             (3u)
+#define GPIO_PFCAE10_PFCAE104_SHIFT             (4u)
+#define GPIO_PFCAE10_PFCAE105_SHIFT             (5u)
+#define GPIO_PFCAE10_PFCAE106_SHIFT             (6u)
+#define GPIO_PFCAE10_PFCAE107_SHIFT             (7u)
+#define GPIO_PFCAE10_PFCAE108_SHIFT             (8u)
+#define GPIO_PFCAE10_PFCAE109_SHIFT             (9u)
+#define GPIO_PFCAE10_PFCAE1010_SHIFT            (10u)
+#define GPIO_PFCAE10_PFCAE1011_SHIFT            (11u)
+#define GPIO_PFCAE10_PFCAE1012_SHIFT            (12u)
+#define GPIO_PFCAE10_PFCAE1013_SHIFT            (13u)
+#define GPIO_PFCAE10_PFCAE1014_SHIFT            (14u)
+#define GPIO_PFCAE10_PFCAE1015_SHIFT            (15u)
+
+#define GPIO_PIBC10_PIBC100_SHIFT               (0u)
+#define GPIO_PIBC10_PIBC101_SHIFT               (1u)
+#define GPIO_PIBC10_PIBC102_SHIFT               (2u)
+#define GPIO_PIBC10_PIBC103_SHIFT               (3u)
+#define GPIO_PIBC10_PIBC104_SHIFT               (4u)
+#define GPIO_PIBC10_PIBC105_SHIFT               (5u)
+#define GPIO_PIBC10_PIBC106_SHIFT               (6u)
+#define GPIO_PIBC10_PIBC107_SHIFT               (7u)
+#define GPIO_PIBC10_PIBC108_SHIFT               (8u)
+#define GPIO_PIBC10_PIBC109_SHIFT               (9u)
+#define GPIO_PIBC10_PIBC1010_SHIFT              (10u)
+#define GPIO_PIBC10_PIBC1011_SHIFT              (11u)
+#define GPIO_PIBC10_PIBC1012_SHIFT              (12u)
+#define GPIO_PIBC10_PIBC1013_SHIFT              (13u)
+#define GPIO_PIBC10_PIBC1014_SHIFT              (14u)
+#define GPIO_PIBC10_PIBC1015_SHIFT              (15u)
+
+#define GPIO_PBDC10_PBDC100_SHIFT               (0u)
+#define GPIO_PBDC10_PBDC101_SHIFT               (1u)
+#define GPIO_PBDC10_PBDC102_SHIFT               (2u)
+#define GPIO_PBDC10_PBDC103_SHIFT               (3u)
+#define GPIO_PBDC10_PBDC104_SHIFT               (4u)
+#define GPIO_PBDC10_PBDC105_SHIFT               (5u)
+#define GPIO_PBDC10_PBDC106_SHIFT               (6u)
+#define GPIO_PBDC10_PBDC107_SHIFT               (7u)
+#define GPIO_PBDC10_PBDC108_SHIFT               (8u)
+#define GPIO_PBDC10_PBDC109_SHIFT               (9u)
+#define GPIO_PBDC10_PBDC1010_SHIFT              (10u)
+#define GPIO_PBDC10_PBDC1011_SHIFT              (11u)
+#define GPIO_PBDC10_PBDC1012_SHIFT              (12u)
+#define GPIO_PBDC10_PBDC1013_SHIFT              (13u)
+#define GPIO_PBDC10_PBDC1014_SHIFT              (14u)
+#define GPIO_PBDC10_PBDC1015_SHIFT              (15u)
+
+#define GPIO_PIPC10_PIPC100_SHIFT               (0u)
+#define GPIO_PIPC10_PIPC101_SHIFT               (1u)
+#define GPIO_PIPC10_PIPC102_SHIFT               (2u)
+#define GPIO_PIPC10_PIPC103_SHIFT               (3u)
+#define GPIO_PIPC10_PIPC104_SHIFT               (4u)
+#define GPIO_PIPC10_PIPC105_SHIFT               (5u)
+#define GPIO_PIPC10_PIPC106_SHIFT               (6u)
+#define GPIO_PIPC10_PIPC107_SHIFT               (7u)
+#define GPIO_PIPC10_PIPC108_SHIFT               (8u)
+#define GPIO_PIPC10_PIPC109_SHIFT               (9u)
+#define GPIO_PIPC10_PIPC1010_SHIFT              (10u)
+#define GPIO_PIPC10_PIPC1011_SHIFT              (11u)
+#define GPIO_PIPC10_PIPC1012_SHIFT              (12u)
+#define GPIO_PIPC10_PIPC1013_SHIFT              (13u)
+#define GPIO_PIPC10_PIPC1014_SHIFT              (14u)
+#define GPIO_PIPC10_PIPC1015_SHIFT              (15u)
+
+/* ---- P11 ---- */
+#define GPIO_P11_P110_SHIFT                     (0u)
+#define GPIO_P11_P111_SHIFT                     (1u)
+#define GPIO_P11_P112_SHIFT                     (2u)
+#define GPIO_P11_P113_SHIFT                     (3u)
+#define GPIO_P11_P114_SHIFT                     (4u)
+#define GPIO_P11_P115_SHIFT                     (5u)
+#define GPIO_P11_P116_SHIFT                     (6u)
+#define GPIO_P11_P117_SHIFT                     (7u)
+#define GPIO_P11_P118_SHIFT                     (8u)
+#define GPIO_P11_P119_SHIFT                     (9u)
+#define GPIO_P11_P1110_SHIFT                    (10u)
+#define GPIO_P11_P1111_SHIFT                    (11u)
+#define GPIO_P11_P1112_SHIFT                    (12u)
+#define GPIO_P11_P1113_SHIFT                    (13u)
+#define GPIO_P11_P1114_SHIFT                    (14u)
+#define GPIO_P11_P1115_SHIFT                    (15u)
+
+#define GPIO_PSR11_PSR110_SHIFT                 (0u)
+#define GPIO_PSR11_PSR111_SHIFT                 (1u)
+#define GPIO_PSR11_PSR112_SHIFT                 (2u)
+#define GPIO_PSR11_PSR113_SHIFT                 (3u)
+#define GPIO_PSR11_PSR114_SHIFT                 (4u)
+#define GPIO_PSR11_PSR115_SHIFT                 (5u)
+#define GPIO_PSR11_PSR116_SHIFT                 (6u)
+#define GPIO_PSR11_PSR117_SHIFT                 (7u)
+#define GPIO_PSR11_PSR118_SHIFT                 (8u)
+#define GPIO_PSR11_PSR119_SHIFT                 (9u)
+#define GPIO_PSR11_PSR1110_SHIFT                (10u)
+#define GPIO_PSR11_PSR1111_SHIFT                (11u)
+#define GPIO_PSR11_PSR1112_SHIFT                (12u)
+#define GPIO_PSR11_PSR1113_SHIFT                (13u)
+#define GPIO_PSR11_PSR1114_SHIFT                (14u)
+#define GPIO_PSR11_PSR1115_SHIFT                (15u)
+#define GPIO_PSR11_PSR1116_SHIFT                (16u)
+#define GPIO_PSR11_PSR1117_SHIFT                (17u)
+#define GPIO_PSR11_PSR1118_SHIFT                (18u)
+#define GPIO_PSR11_PSR1119_SHIFT                (19u)
+#define GPIO_PSR11_PSR1120_SHIFT                (20u)
+#define GPIO_PSR11_PSR1121_SHIFT                (21u)
+#define GPIO_PSR11_PSR1122_SHIFT                (22u)
+#define GPIO_PSR11_PSR1123_SHIFT                (23u)
+#define GPIO_PSR11_PSR1124_SHIFT                (24u)
+#define GPIO_PSR11_PSR1125_SHIFT                (25u)
+#define GPIO_PSR11_PSR1126_SHIFT                (26u)
+#define GPIO_PSR11_PSR1127_SHIFT                (27u)
+#define GPIO_PSR11_PSR1128_SHIFT                (28u)
+#define GPIO_PSR11_PSR1129_SHIFT                (29u)
+#define GPIO_PSR11_PSR1130_SHIFT                (30u)
+#define GPIO_PSR11_PSR1131_SHIFT                (31u)
+
+#define GPIO_PPR11_PPR110_SHIFT                 (0u)
+#define GPIO_PPR11_PPR111_SHIFT                 (1u)
+#define GPIO_PPR11_PPR112_SHIFT                 (2u)
+#define GPIO_PPR11_PPR113_SHIFT                 (3u)
+#define GPIO_PPR11_PPR114_SHIFT                 (4u)
+#define GPIO_PPR11_PPR115_SHIFT                 (5u)
+#define GPIO_PPR11_PPR116_SHIFT                 (6u)
+#define GPIO_PPR11_PPR117_SHIFT                 (7u)
+#define GPIO_PPR11_PPR118_SHIFT                 (8u)
+#define GPIO_PPR11_PPR119_SHIFT                 (9u)
+#define GPIO_PPR11_PPR1110_SHIFT                (10u)
+#define GPIO_PPR11_PPR1111_SHIFT                (11u)
+#define GPIO_PPR11_PPR1112_SHIFT                (12u)
+#define GPIO_PPR11_PPR1113_SHIFT                (13u)
+#define GPIO_PPR11_PPR1114_SHIFT                (14u)
+#define GPIO_PPR11_PPR1115_SHIFT                (15u)
+
+#define GPIO_PM11_PM110_SHIFT                   (0u)
+#define GPIO_PM11_PM111_SHIFT                   (1u)
+#define GPIO_PM11_PM112_SHIFT                   (2u)
+#define GPIO_PM11_PM113_SHIFT                   (3u)
+#define GPIO_PM11_PM114_SHIFT                   (4u)
+#define GPIO_PM11_PM115_SHIFT                   (5u)
+#define GPIO_PM11_PM116_SHIFT                   (6u)
+#define GPIO_PM11_PM117_SHIFT                   (7u)
+#define GPIO_PM11_PM118_SHIFT                   (8u)
+#define GPIO_PM11_PM119_SHIFT                   (9u)
+#define GPIO_PM11_PM1110_SHIFT                  (10u)
+#define GPIO_PM11_PM1111_SHIFT                  (11u)
+#define GPIO_PM11_PM1112_SHIFT                  (12u)
+#define GPIO_PM11_PM1113_SHIFT                  (13u)
+#define GPIO_PM11_PM1114_SHIFT                  (14u)
+#define GPIO_PM11_PM1115_SHIFT                  (15u)
+
+#define GPIO_PMC11_PMC110_SHIFT                 (0u)
+#define GPIO_PMC11_PMC111_SHIFT                 (1u)
+#define GPIO_PMC11_PMC112_SHIFT                 (2u)
+#define GPIO_PMC11_PMC113_SHIFT                 (3u)
+#define GPIO_PMC11_PMC114_SHIFT                 (4u)
+#define GPIO_PMC11_PMC115_SHIFT                 (5u)
+#define GPIO_PMC11_PMC116_SHIFT                 (6u)
+#define GPIO_PMC11_PMC117_SHIFT                 (7u)
+#define GPIO_PMC11_PMC118_SHIFT                 (8u)
+#define GPIO_PMC11_PMC119_SHIFT                 (9u)
+#define GPIO_PMC11_PMC1110_SHIFT                (10u)
+#define GPIO_PMC11_PMC1111_SHIFT                (11u)
+#define GPIO_PMC11_PMC1112_SHIFT                (12u)
+#define GPIO_PMC11_PMC1113_SHIFT                (13u)
+#define GPIO_PMC11_PMC1114_SHIFT                (14u)
+#define GPIO_PMC11_PMC1115_SHIFT                (15u)
+
+#define GPIO_PFC11_PFC110_SHIFT                 (0u)
+#define GPIO_PFC11_PFC111_SHIFT                 (1u)
+#define GPIO_PFC11_PFC112_SHIFT                 (2u)
+#define GPIO_PFC11_PFC113_SHIFT                 (3u)
+#define GPIO_PFC11_PFC114_SHIFT                 (4u)
+#define GPIO_PFC11_PFC115_SHIFT                 (5u)
+#define GPIO_PFC11_PFC116_SHIFT                 (6u)
+#define GPIO_PFC11_PFC117_SHIFT                 (7u)
+#define GPIO_PFC11_PFC118_SHIFT                 (8u)
+#define GPIO_PFC11_PFC119_SHIFT                 (9u)
+#define GPIO_PFC11_PFC1110_SHIFT                (10u)
+#define GPIO_PFC11_PFC1111_SHIFT                (11u)
+#define GPIO_PFC11_PFC1112_SHIFT                (12u)
+#define GPIO_PFC11_PFC1113_SHIFT                (13u)
+#define GPIO_PFC11_PFC1114_SHIFT                (14u)
+#define GPIO_PFC11_PFC1115_SHIFT                (15u)
+
+#define GPIO_PFCE11_PFCE110_SHIFT               (0u)
+#define GPIO_PFCE11_PFCE111_SHIFT               (1u)
+#define GPIO_PFCE11_PFCE112_SHIFT               (2u)
+#define GPIO_PFCE11_PFCE113_SHIFT               (3u)
+#define GPIO_PFCE11_PFCE114_SHIFT               (4u)
+#define GPIO_PFCE11_PFCE115_SHIFT               (5u)
+#define GPIO_PFCE11_PFCE116_SHIFT               (6u)
+#define GPIO_PFCE11_PFCE117_SHIFT               (7u)
+#define GPIO_PFCE11_PFCE118_SHIFT               (8u)
+#define GPIO_PFCE11_PFCE119_SHIFT               (9u)
+#define GPIO_PFCE11_PFCE1110_SHIFT              (10u)
+#define GPIO_PFCE11_PFCE1111_SHIFT              (11u)
+#define GPIO_PFCE11_PFCE1112_SHIFT              (12u)
+#define GPIO_PFCE11_PFCE1113_SHIFT              (13u)
+#define GPIO_PFCE11_PFCE1114_SHIFT              (14u)
+#define GPIO_PFCE11_PFCE1115_SHIFT              (15u)
+
+#define GPIO_PNOT11_PNOT110_SHIFT               (0u)
+#define GPIO_PNOT11_PNOT111_SHIFT               (1u)
+#define GPIO_PNOT11_PNOT112_SHIFT               (2u)
+#define GPIO_PNOT11_PNOT113_SHIFT               (3u)
+#define GPIO_PNOT11_PNOT114_SHIFT               (4u)
+#define GPIO_PNOT11_PNOT115_SHIFT               (5u)
+#define GPIO_PNOT11_PNOT116_SHIFT               (6u)
+#define GPIO_PNOT11_PNOT117_SHIFT               (7u)
+#define GPIO_PNOT11_PNOT118_SHIFT               (8u)
+#define GPIO_PNOT11_PNOT119_SHIFT               (9u)
+#define GPIO_PNOT11_PNOT1110_SHIFT              (10u)
+#define GPIO_PNOT11_PNOT1111_SHIFT              (11u)
+#define GPIO_PNOT11_PNOT1112_SHIFT              (12u)
+#define GPIO_PNOT11_PNOT1113_SHIFT              (13u)
+#define GPIO_PNOT11_PNOT1114_SHIFT              (14u)
+#define GPIO_PNOT11_PNOT1115_SHIFT              (15u)
+
+#define GPIO_PMSR11_PMSR110_SHIFT               (0u)
+#define GPIO_PMSR11_PMSR111_SHIFT               (1u)
+#define GPIO_PMSR11_PMSR112_SHIFT               (2u)
+#define GPIO_PMSR11_PMSR113_SHIFT               (3u)
+#define GPIO_PMSR11_PMSR114_SHIFT               (4u)
+#define GPIO_PMSR11_PMSR115_SHIFT               (5u)
+#define GPIO_PMSR11_PMSR116_SHIFT               (6u)
+#define GPIO_PMSR11_PMSR117_SHIFT               (7u)
+#define GPIO_PMSR11_PMSR118_SHIFT               (8u)
+#define GPIO_PMSR11_PMSR119_SHIFT               (9u)
+#define GPIO_PMSR11_PMSR1110_SHIFT              (10u)
+#define GPIO_PMSR11_PMSR1111_SHIFT              (11u)
+#define GPIO_PMSR11_PMSR1112_SHIFT              (12u)
+#define GPIO_PMSR11_PMSR1113_SHIFT              (13u)
+#define GPIO_PMSR11_PMSR1114_SHIFT              (14u)
+#define GPIO_PMSR11_PMSR1115_SHIFT              (15u)
+#define GPIO_PMSR11_PMSR1116_SHIFT              (16u)
+#define GPIO_PMSR11_PMSR1117_SHIFT              (17u)
+#define GPIO_PMSR11_PMSR1118_SHIFT              (18u)
+#define GPIO_PMSR11_PMSR1119_SHIFT              (19u)
+#define GPIO_PMSR11_PMSR1120_SHIFT              (20u)
+#define GPIO_PMSR11_PMSR1121_SHIFT              (21u)
+#define GPIO_PMSR11_PMSR1122_SHIFT              (22u)
+#define GPIO_PMSR11_PMSR1123_SHIFT              (23u)
+#define GPIO_PMSR11_PMSR1124_SHIFT              (24u)
+#define GPIO_PMSR11_PMSR1125_SHIFT              (25u)
+#define GPIO_PMSR11_PMSR1126_SHIFT              (26u)
+#define GPIO_PMSR11_PMSR1127_SHIFT              (27u)
+#define GPIO_PMSR11_PMSR1128_SHIFT              (28u)
+#define GPIO_PMSR11_PMSR1129_SHIFT              (29u)
+#define GPIO_PMSR11_PMSR1130_SHIFT              (30u)
+#define GPIO_PMSR11_PMSR1131_SHIFT              (31u)
+
+#define GPIO_PMCSR11_PMCSR110_SHIFT             (0u)
+#define GPIO_PMCSR11_PMCSR111_SHIFT             (1u)
+#define GPIO_PMCSR11_PMCSR112_SHIFT             (2u)
+#define GPIO_PMCSR11_PMCSR113_SHIFT             (3u)
+#define GPIO_PMCSR11_PMCSR114_SHIFT             (4u)
+#define GPIO_PMCSR11_PMCSR115_SHIFT             (5u)
+#define GPIO_PMCSR11_PMCSR116_SHIFT             (6u)
+#define GPIO_PMCSR11_PMCSR117_SHIFT             (7u)
+#define GPIO_PMCSR11_PMCSR118_SHIFT             (8u)
+#define GPIO_PMCSR11_PMCSR119_SHIFT             (9u)
+#define GPIO_PMCSR11_PMCSR1110_SHIFT            (10u)
+#define GPIO_PMCSR11_PMCSR1111_SHIFT            (11u)
+#define GPIO_PMCSR11_PMCSR1112_SHIFT            (12u)
+#define GPIO_PMCSR11_PMCSR1113_SHIFT            (13u)
+#define GPIO_PMCSR11_PMCSR1114_SHIFT            (14u)
+#define GPIO_PMCSR11_PMCSR1115_SHIFT            (15u)
+#define GPIO_PMCSR11_PMCSR1116_SHIFT            (16u)
+#define GPIO_PMCSR11_PMCSR1117_SHIFT            (17u)
+#define GPIO_PMCSR11_PMCSR1118_SHIFT            (18u)
+#define GPIO_PMCSR11_PMCSR1119_SHIFT            (19u)
+#define GPIO_PMCSR11_PMCSR1120_SHIFT            (20u)
+#define GPIO_PMCSR11_PMCSR1121_SHIFT            (21u)
+#define GPIO_PMCSR11_PMCSR1122_SHIFT            (22u)
+#define GPIO_PMCSR11_PMCSR1123_SHIFT            (23u)
+#define GPIO_PMCSR11_PMCSR1124_SHIFT            (24u)
+#define GPIO_PMCSR11_PMCSR1125_SHIFT            (25u)
+#define GPIO_PMCSR11_PMCSR1126_SHIFT            (26u)
+#define GPIO_PMCSR11_PMCSR1127_SHIFT            (27u)
+#define GPIO_PMCSR11_PMCSR1128_SHIFT            (28u)
+#define GPIO_PMCSR11_PMCSR1129_SHIFT            (29u)
+#define GPIO_PMCSR11_PMCSR1130_SHIFT            (30u)
+#define GPIO_PMCSR11_PMCSR1131_SHIFT            (31u)
+
+#define GPIO_PFCAE11_PFCAE110_SHIFT             (0u)
+#define GPIO_PFCAE11_PFCAE111_SHIFT             (1u)
+#define GPIO_PFCAE11_PFCAE112_SHIFT             (2u)
+#define GPIO_PFCAE11_PFCAE113_SHIFT             (3u)
+#define GPIO_PFCAE11_PFCAE114_SHIFT             (4u)
+#define GPIO_PFCAE11_PFCAE115_SHIFT             (5u)
+#define GPIO_PFCAE11_PFCAE116_SHIFT             (6u)
+#define GPIO_PFCAE11_PFCAE117_SHIFT             (7u)
+#define GPIO_PFCAE11_PFCAE118_SHIFT             (8u)
+#define GPIO_PFCAE11_PFCAE119_SHIFT             (9u)
+#define GPIO_PFCAE11_PFCAE1110_SHIFT            (10u)
+#define GPIO_PFCAE11_PFCAE1111_SHIFT            (11u)
+#define GPIO_PFCAE11_PFCAE1112_SHIFT            (12u)
+#define GPIO_PFCAE11_PFCAE1113_SHIFT            (13u)
+#define GPIO_PFCAE11_PFCAE1114_SHIFT            (14u)
+#define GPIO_PFCAE11_PFCAE1115_SHIFT            (15u)
+
+#define GPIO_PIBC11_PIBC110_SHIFT               (0u)
+#define GPIO_PIBC11_PIBC111_SHIFT               (1u)
+#define GPIO_PIBC11_PIBC112_SHIFT               (2u)
+#define GPIO_PIBC11_PIBC113_SHIFT               (3u)
+#define GPIO_PIBC11_PIBC114_SHIFT               (4u)
+#define GPIO_PIBC11_PIBC115_SHIFT               (5u)
+#define GPIO_PIBC11_PIBC116_SHIFT               (6u)
+#define GPIO_PIBC11_PIBC117_SHIFT               (7u)
+#define GPIO_PIBC11_PIBC118_SHIFT               (8u)
+#define GPIO_PIBC11_PIBC119_SHIFT               (9u)
+#define GPIO_PIBC11_PIBC1110_SHIFT              (10u)
+#define GPIO_PIBC11_PIBC1111_SHIFT              (11u)
+#define GPIO_PIBC11_PIBC1112_SHIFT              (12u)
+#define GPIO_PIBC11_PIBC1113_SHIFT              (13u)
+#define GPIO_PIBC11_PIBC1114_SHIFT              (14u)
+#define GPIO_PIBC11_PIBC1115_SHIFT              (15u)
+
+#define GPIO_PBDC11_PBDC110_SHIFT               (0u)
+#define GPIO_PBDC11_PBDC111_SHIFT               (1u)
+#define GPIO_PBDC11_PBDC112_SHIFT               (2u)
+#define GPIO_PBDC11_PBDC113_SHIFT               (3u)
+#define GPIO_PBDC11_PBDC114_SHIFT               (4u)
+#define GPIO_PBDC11_PBDC115_SHIFT               (5u)
+#define GPIO_PBDC11_PBDC116_SHIFT               (6u)
+#define GPIO_PBDC11_PBDC117_SHIFT               (7u)
+#define GPIO_PBDC11_PBDC118_SHIFT               (8u)
+#define GPIO_PBDC11_PBDC119_SHIFT               (9u)
+#define GPIO_PBDC11_PBDC1110_SHIFT              (10u)
+#define GPIO_PBDC11_PBDC1111_SHIFT              (11u)
+#define GPIO_PBDC11_PBDC1112_SHIFT              (12u)
+#define GPIO_PBDC11_PBDC1113_SHIFT              (13u)
+#define GPIO_PBDC11_PBDC1114_SHIFT              (14u)
+#define GPIO_PBDC11_PBDC1115_SHIFT              (15u)
+
+#define GPIO_PIPC11_PIPC110_SHIFT               (0u)
+#define GPIO_PIPC11_PIPC111_SHIFT               (1u)
+#define GPIO_PIPC11_PIPC112_SHIFT               (2u)
+#define GPIO_PIPC11_PIPC113_SHIFT               (3u)
+#define GPIO_PIPC11_PIPC114_SHIFT               (4u)
+#define GPIO_PIPC11_PIPC115_SHIFT               (5u)
+#define GPIO_PIPC11_PIPC116_SHIFT               (6u)
+#define GPIO_PIPC11_PIPC117_SHIFT               (7u)
+#define GPIO_PIPC11_PIPC118_SHIFT               (8u)
+#define GPIO_PIPC11_PIPC119_SHIFT               (9u)
+#define GPIO_PIPC11_PIPC1110_SHIFT              (10u)
+#define GPIO_PIPC11_PIPC1111_SHIFT              (11u)
+#define GPIO_PIPC11_PIPC1112_SHIFT              (12u)
+#define GPIO_PIPC11_PIPC1113_SHIFT              (13u)
+#define GPIO_PIPC11_PIPC1114_SHIFT              (14u)
+#define GPIO_PIPC11_PIPC1115_SHIFT              (15u)
+
+
+#endif /* GPIO_IOBITMASK_H */
+
+/* End of File */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/intc_iobitmask.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/intc_iobitmask.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/intc_iobitmask.h	(revision 270)
@@ -0,0 +1,11236 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name   : intc_iobitmask.h
+* $Rev: 1115 $
+* $Date:: 2014-07-09 15:35:02 +0900#$
+* Description : INTC register define header
+*******************************************************************************/
+#ifndef INTC_IOBITMASK_H
+#define INTC_IOBITMASK_H
+
+/* ==== Mask values for IO registers ==== */
+#define INTC_ICDDCR_Enable                      (0x00000001uL)
+
+#define INTC_ICDICTR_ITLinesNumber              (0x0000001FuL)
+#define INTC_ICDICTR_CPUNumber                  (0x000000E0uL)
+#define INTC_ICDICTR_SecurityExtn               (0x00000400uL)
+#define INTC_ICDICTR_LSPI                       (0x0000F800uL)
+
+#define INTC_ICDIIDR_Implementer                (0x00000FFFuL)
+#define INTC_ICDIIDR_Revision                   (0x0000F000uL)
+#define INTC_ICDIIDR_Variant                    (0x000F0000uL)
+#define INTC_ICDIIDR_ProductID                  (0xFF000000uL)
+
+#define INTC_ICDISR0_SW0                        (0x00000001uL)
+#define INTC_ICDISR0_SW1                        (0x00000002uL)
+#define INTC_ICDISR0_SW2                        (0x00000004uL)
+#define INTC_ICDISR0_SW3                        (0x00000008uL)
+#define INTC_ICDISR0_SW4                        (0x00000010uL)
+#define INTC_ICDISR0_SW5                        (0x00000020uL)
+#define INTC_ICDISR0_SW6                        (0x00000040uL)
+#define INTC_ICDISR0_SW7                        (0x00000080uL)
+#define INTC_ICDISR0_SW8                        (0x00000100uL)
+#define INTC_ICDISR0_SW9                        (0x00000200uL)
+#define INTC_ICDISR0_SW10                       (0x00000400uL)
+#define INTC_ICDISR0_SW11                       (0x00000800uL)
+#define INTC_ICDISR0_SW12                       (0x00001000uL)
+#define INTC_ICDISR0_SW13                       (0x00002000uL)
+#define INTC_ICDISR0_SW14                       (0x00004000uL)
+#define INTC_ICDISR0_SW15                       (0x00008000uL)
+#define INTC_ICDISR0_PMUIRQ0                    (0x00010000uL)
+#define INTC_ICDISR0_COMMRX0                    (0x00020000uL)
+#define INTC_ICDISR0_COMMTX0                    (0x00040000uL)
+#define INTC_ICDISR0_CTIIRQ0                    (0x00080000uL)
+
+#define INTC_ICDISR1_IRQ0                       (0x00000001uL)
+#define INTC_ICDISR1_IRQ1                       (0x00000002uL)
+#define INTC_ICDISR1_IRQ2                       (0x00000004uL)
+#define INTC_ICDISR1_IRQ3                       (0x00000008uL)
+#define INTC_ICDISR1_IRQ4                       (0x00000010uL)
+#define INTC_ICDISR1_IRQ5                       (0x00000020uL)
+#define INTC_ICDISR1_IRQ6                       (0x00000040uL)
+#define INTC_ICDISR1_IRQ7                       (0x00000080uL)
+#define INTC_ICDISR1_PL310ERR                   (0x00000100uL)
+#define INTC_ICDISR1_DMAINT0                    (0x00000200uL)
+#define INTC_ICDISR1_DMAINT1                    (0x00000400uL)
+#define INTC_ICDISR1_DMAINT2                    (0x00000800uL)
+#define INTC_ICDISR1_DMAINT3                    (0x00001000uL)
+#define INTC_ICDISR1_DMAINT4                    (0x00002000uL)
+#define INTC_ICDISR1_DMAINT5                    (0x00004000uL)
+#define INTC_ICDISR1_DMAINT6                    (0x00008000uL)
+#define INTC_ICDISR1_DMAINT7                    (0x00010000uL)
+#define INTC_ICDISR1_DMAINT8                    (0x00020000uL)
+#define INTC_ICDISR1_DMAINT9                    (0x00040000uL)
+#define INTC_ICDISR1_DMAINT10                   (0x00080000uL)
+#define INTC_ICDISR1_DMAINT11                   (0x00100000uL)
+#define INTC_ICDISR1_DMAINT12                   (0x00200000uL)
+#define INTC_ICDISR1_DMAINT13                   (0x00400000uL)
+#define INTC_ICDISR1_DMAINT14                   (0x00800000uL)
+#define INTC_ICDISR1_DMAINT15                   (0x01000000uL)
+#define INTC_ICDISR1_DMAERR                     (0x02000000uL)
+
+#define INTC_ICDISR2_USBI0                      (0x00000200uL)
+#define INTC_ICDISR2_USBI1                      (0x00000400uL)
+#define INTC_ICDISR2_S0_VI_VSYNC0               (0x00000800uL)
+#define INTC_ICDISR2_S0_LO_VSYNC0               (0x00001000uL)
+#define INTC_ICDISR2_S0_VSYNCERR0               (0x00002000uL)
+#define INTC_ICDISR2_GR3_VLINE0                 (0x00004000uL)
+#define INTC_ICDISR2_S0_VFIELD0                 (0x00008000uL)
+#define INTC_ICDISR2_IV1_VBUFERR0               (0x00010000uL)
+#define INTC_ICDISR2_IV3_VBUFERR0               (0x00020000uL)
+#define INTC_ICDISR2_IV5_VBUFERR0               (0x00040000uL)
+#define INTC_ICDISR2_IV6_VBUFERR0               (0x00080000uL)
+#define INTC_ICDISR2_S0_WLINE0                  (0x00100000uL)
+#define INTC_ICDISR2_S1_VI_VSYNC0               (0x00200000uL)
+#define INTC_ICDISR2_S1_LO_VSYNC0               (0x00400000uL)
+#define INTC_ICDISR2_S1_VSYNCERR0               (0x00800000uL)
+#define INTC_ICDISR2_S1_VFIELD0                 (0x01000000uL)
+#define INTC_ICDISR2_IV2_VBUFERR0               (0x02000000uL)
+#define INTC_ICDISR2_IV4_VBUFERR0               (0x04000000uL)
+#define INTC_ICDISR2_S1_WLINE0                  (0x08000000uL)
+#define INTC_ICDISR2_OIR_VI_VSYNC0              (0x10000000uL)
+#define INTC_ICDISR2_OIR_LO_VSYNC0              (0x20000000uL)
+#define INTC_ICDISR2_OIR_VSYNCERR0              (0x40000000uL)
+#define INTC_ICDISR2_OIR_VFIELD0                (0x80000000uL)
+
+#define INTC_ICDISR3_IV7_VBUFERR0               (0x00000001uL)
+#define INTC_ICDISR3_IV8_VBUFERR0               (0x00000002uL)
+#define INTC_ICDISR3_S0_VI_VSYNC1               (0x00000008uL)
+#define INTC_ICDISR3_S0_LO_VSYNC1               (0x00000010uL)
+#define INTC_ICDISR3_S0_VSYNCERR1               (0x00000020uL)
+#define INTC_ICDISR3_GR3_VLINE1                 (0x00000040uL)
+#define INTC_ICDISR3_S0_VFIELD1                 (0x00000080uL)
+#define INTC_ICDISR3_IV1_VBUFERR1               (0x00000100uL)
+#define INTC_ICDISR3_IV3_VBUFERR1               (0x00000200uL)
+#define INTC_ICDISR3_IV5_VBUFERR1               (0x00000400uL)
+#define INTC_ICDISR3_IV6_VBUFERR1               (0x00000800uL)
+#define INTC_ICDISR3_S0_WLINE1                  (0x00001000uL)
+#define INTC_ICDISR3_S1_VI_VSYNC1               (0x00002000uL)
+#define INTC_ICDISR3_S1_LO_VSYNC1               (0x00004000uL)
+#define INTC_ICDISR3_S1_VSYNCERR1               (0x00008000uL)
+#define INTC_ICDISR3_S1_VFIELD1                 (0x00010000uL)
+#define INTC_ICDISR3_IV2_VBUFERR1               (0x00020000uL)
+#define INTC_ICDISR3_IV4_VBUFERR1               (0x00040000uL)
+#define INTC_ICDISR3_S1_WLINE1                  (0x00080000uL)
+#define INTC_ICDISR3_OIR_VI_VSYNC1              (0x00100000uL)
+#define INTC_ICDISR3_OIR_LO_VSYNC1              (0x00200000uL)
+#define INTC_ICDISR3_OIR_VLINE1                 (0x00400000uL)
+#define INTC_ICDISR3_OIR_VFIELD1                (0x00800000uL)
+#define INTC_ICDISR3_IV7_VBUFERR1               (0x01000000uL)
+#define INTC_ICDISR3_IV8_VBUFERR1               (0x02000000uL)
+#define INTC_ICDISR3_IMRDI                      (0x08000000uL)
+#define INTC_ICDISR3_IMR2I0                     (0x10000000uL)
+#define INTC_ICDISR3_IMR2I1                     (0x20000000uL)
+#define INTC_ICDISR3_JEDI                       (0x40000000uL)
+#define INTC_ICDISR3_JDTI                       (0x80000000uL)
+
+#define INTC_ICDISR4_CMP0                       (0x00000001uL)
+#define INTC_ICDISR4_CMP1                       (0x00000002uL)
+#define INTC_ICDISR4_INT0                       (0x00000004uL)
+#define INTC_ICDISR4_INT1                       (0x00000008uL)
+#define INTC_ICDISR4_INT2                       (0x00000010uL)
+#define INTC_ICDISR4_INT3                       (0x00000020uL)
+#define INTC_ICDISR4_OSTM0TINT                  (0x00000040uL)
+#define INTC_ICDISR4_OSTM1TINT                  (0x00000080uL)
+#define INTC_ICDISR4_CMI                        (0x00000100uL)
+#define INTC_ICDISR4_WTOUT                      (0x00000200uL)
+#define INTC_ICDISR4_ITI                        (0x00000400uL)
+#define INTC_ICDISR4_TGI0A                      (0x00000800uL)
+#define INTC_ICDISR4_TGI0B                      (0x00001000uL)
+#define INTC_ICDISR4_TGI0C                      (0x00002000uL)
+#define INTC_ICDISR4_TGI0D                      (0x00004000uL)
+#define INTC_ICDISR4_TGI0V                      (0x00008000uL)
+#define INTC_ICDISR4_TGI0E                      (0x00010000uL)
+#define INTC_ICDISR4_TGI0F                      (0x00020000uL)
+#define INTC_ICDISR4_TGI1A                      (0x00040000uL)
+#define INTC_ICDISR4_TGI1B                      (0x00080000uL)
+#define INTC_ICDISR4_TGI1V                      (0x00100000uL)
+#define INTC_ICDISR4_TGI1U                      (0x00200000uL)
+#define INTC_ICDISR4_TGI2A                      (0x00400000uL)
+#define INTC_ICDISR4_TGI2B                      (0x00800000uL)
+#define INTC_ICDISR4_TGI2V                      (0x01000000uL)
+#define INTC_ICDISR4_TGI2U                      (0x02000000uL)
+#define INTC_ICDISR4_TGI3A                      (0x04000000uL)
+#define INTC_ICDISR4_TGI3B                      (0x08000000uL)
+#define INTC_ICDISR4_TGI3C                      (0x10000000uL)
+#define INTC_ICDISR4_TGI3D                      (0x20000000uL)
+#define INTC_ICDISR4_TGI3V                      (0x40000000uL)
+#define INTC_ICDISR4_TGI4A                      (0x80000000uL)
+
+#define INTC_ICDISR5_TGI4B                      (0x00000001uL)
+#define INTC_ICDISR5_TGI4C                      (0x00000002uL)
+#define INTC_ICDISR5_TGI4D                      (0x00000004uL)
+#define INTC_ICDISR5_TGI4V                      (0x00000008uL)
+#define INTC_ICDISR5_CMI1                       (0x00000010uL)
+#define INTC_ICDISR5_CMI2                       (0x00000020uL)
+#define INTC_ICDISR5_SGDEI0                     (0x00000040uL)
+#define INTC_ICDISR5_SGDEI1                     (0x00000080uL)
+#define INTC_ICDISR5_SGDEI2                     (0x00000100uL)
+#define INTC_ICDISR5_SGDEI3                     (0x00000200uL)
+#define INTC_ICDISR5_ADI                        (0x00000400uL)
+#define INTC_ICDISR5_LMTI                       (0x00000800uL)
+#define INTC_ICDISR5_SSII0                      (0x00001000uL)
+#define INTC_ICDISR5_SSIRXI0                    (0x00002000uL)
+#define INTC_ICDISR5_SSITXI0                    (0x00004000uL)
+#define INTC_ICDISR5_SSII1                      (0x00008000uL)
+#define INTC_ICDISR5_SSIRXI1                    (0x00010000uL)
+#define INTC_ICDISR5_SSITXI1                    (0x00020000uL)
+#define INTC_ICDISR5_SSII2                      (0x00040000uL)
+#define INTC_ICDISR5_SSIRTI2                    (0x00080000uL)
+#define INTC_ICDISR5_SSII3                      (0x00100000uL)
+#define INTC_ICDISR5_SSIRXI3                    (0x00200000uL)
+#define INTC_ICDISR5_SSITXI3                    (0x00400000uL)
+#define INTC_ICDISR5_SSII4                      (0x00800000uL)
+#define INTC_ICDISR5_SSIRTI4                    (0x01000000uL)
+#define INTC_ICDISR5_SSII5                      (0x02000000uL)
+#define INTC_ICDISR5_SSIRXI5                    (0x04000000uL)
+#define INTC_ICDISR5_SSITXI5                    (0x08000000uL)
+#define INTC_ICDISR5_SPDIFI                     (0x10000000uL)
+#define INTC_ICDISR5_INTIICTEI0                 (0x20000000uL)
+#define INTC_ICDISR5_INTIICRI0                  (0x40000000uL)
+#define INTC_ICDISR5_INTIICTI0                  (0x80000000uL)
+
+#define INTC_ICDISR6_INTIICSPI0                 (0x00000001uL)
+#define INTC_ICDISR6_INTIICSTI0                 (0x00000002uL)
+#define INTC_ICDISR6_INTIICNAKI0                (0x00000004uL)
+#define INTC_ICDISR6_INTIICALI0                 (0x00000008uL)
+#define INTC_ICDISR6_INTIICTMOI0                (0x00000010uL)
+#define INTC_ICDISR6_INTIICTEI1                 (0x00000020uL)
+#define INTC_ICDISR6_INTIICRI1                  (0x00000040uL)
+#define INTC_ICDISR6_INTIICTI1                  (0x00000080uL)
+#define INTC_ICDISR6_INTIICSPI1                 (0x00000100uL)
+#define INTC_ICDISR6_INTIICSTI1                 (0x00000200uL)
+#define INTC_ICDISR6_INTIICNAKI1                (0x00000400uL)
+#define INTC_ICDISR6_INTIICALI1                 (0x00000800uL)
+#define INTC_ICDISR6_INTIICTMOI1                (0x00001000uL)
+#define INTC_ICDISR6_INTIICTEI2                 (0x00002000uL)
+#define INTC_ICDISR6_INTIICRI2                  (0x00004000uL)
+#define INTC_ICDISR6_INTIICTI2                  (0x00008000uL)
+#define INTC_ICDISR6_INTIICSPI2                 (0x00010000uL)
+#define INTC_ICDISR6_INTIICSTI2                 (0x00020000uL)
+#define INTC_ICDISR6_INTIICNAKI2                (0x00040000uL)
+#define INTC_ICDISR6_INTIICALI2                 (0x00080000uL)
+#define INTC_ICDISR6_INTIICTMOI2                (0x00100000uL)
+#define INTC_ICDISR6_INTIICTEI3                 (0x00200000uL)
+#define INTC_ICDISR6_INTIICRI3                  (0x00400000uL)
+#define INTC_ICDISR6_INTIICTI3                  (0x00800000uL)
+#define INTC_ICDISR6_INTIICSPI3                 (0x01000000uL)
+#define INTC_ICDISR6_INTIICSTI3                 (0x02000000uL)
+#define INTC_ICDISR6_INTIICNAKI3                (0x04000000uL)
+#define INTC_ICDISR6_INTIICALI3                 (0x08000000uL)
+#define INTC_ICDISR6_INTIICTMOI3                (0x10000000uL)
+#define INTC_ICDISR6_BRI0                       (0x20000000uL)
+#define INTC_ICDISR6_ERI0                       (0x40000000uL)
+#define INTC_ICDISR6_RXI0                       (0x80000000uL)
+
+#define INTC_ICDISR7_TXI0                       (0x00000001uL)
+#define INTC_ICDISR7_BRI1                       (0x00000002uL)
+#define INTC_ICDISR7_ERI1                       (0x00000004uL)
+#define INTC_ICDISR7_RXI1                       (0x00000008uL)
+#define INTC_ICDISR7_TXI1                       (0x00000010uL)
+#define INTC_ICDISR7_BRI2                       (0x00000020uL)
+#define INTC_ICDISR7_ERI2                       (0x00000040uL)
+#define INTC_ICDISR7_RXI2                       (0x00000080uL)
+#define INTC_ICDISR7_TXI2                       (0x00000100uL)
+#define INTC_ICDISR7_BRI3                       (0x00000200uL)
+#define INTC_ICDISR7_ERI3                       (0x00000400uL)
+#define INTC_ICDISR7_RXI3                       (0x00000800uL)
+#define INTC_ICDISR7_TXI3                       (0x00001000uL)
+#define INTC_ICDISR7_BRI4                       (0x00002000uL)
+#define INTC_ICDISR7_ERI4                       (0x00004000uL)
+#define INTC_ICDISR7_RXI4                       (0x00008000uL)
+#define INTC_ICDISR7_TXI4                       (0x00010000uL)
+#define INTC_ICDISR7_BRI5                       (0x00020000uL)
+#define INTC_ICDISR7_ERI5                       (0x00040000uL)
+#define INTC_ICDISR7_RXI5                       (0x00080000uL)
+#define INTC_ICDISR7_TXI5                       (0x00100000uL)
+#define INTC_ICDISR7_BRI6                       (0x00200000uL)
+#define INTC_ICDISR7_ERI6                       (0x00400000uL)
+#define INTC_ICDISR7_RXI6                       (0x00800000uL)
+#define INTC_ICDISR7_TXI6                       (0x01000000uL)
+#define INTC_ICDISR7_BRI7                       (0x02000000uL)
+#define INTC_ICDISR7_ERI7                       (0x04000000uL)
+#define INTC_ICDISR7_RXI7                       (0x08000000uL)
+#define INTC_ICDISR7_TXI7                       (0x10000000uL)
+#define INTC_ICDISR7_INTRCANGERR                (0x20000000uL)
+#define INTC_ICDISR7_INTRCANGRECC               (0x40000000uL)
+#define INTC_ICDISR7_INTRCAN0REC                (0x80000000uL)
+
+#define INTC_ICDISR8_INTRCAN0ERR                (0x00000001uL)
+#define INTC_ICDISR8_INTRCAN0TRX                (0x00000002uL)
+#define INTC_ICDISR8_INTRCAN1REC                (0x00000004uL)
+#define INTC_ICDISR8_INTRCAN1ERR                (0x00000008uL)
+#define INTC_ICDISR8_INTRCAN1TRX                (0x00000010uL)
+#define INTC_ICDISR8_INTRCAN2REC                (0x00000020uL)
+#define INTC_ICDISR8_INTRCAN2ERR                (0x00000040uL)
+#define INTC_ICDISR8_INTRCAN2TRX                (0x00000080uL)
+#define INTC_ICDISR8_INTRCAN3REC                (0x00000100uL)
+#define INTC_ICDISR8_INTRCAN3ERR                (0x00000200uL)
+#define INTC_ICDISR8_INTRCAN3TRX                (0x00000400uL)
+#define INTC_ICDISR8_INTRCAN4REC                (0x00000800uL)
+#define INTC_ICDISR8_INTRCAN4ERR                (0x00001000uL)
+#define INTC_ICDISR8_INTRCAN4TRX                (0x00002000uL)
+#define INTC_ICDISR8_SPEI0                      (0x00004000uL)
+#define INTC_ICDISR8_SPRI0                      (0x00008000uL)
+#define INTC_ICDISR8_SPTI0                      (0x00010000uL)
+#define INTC_ICDISR8_SPEI1                      (0x00020000uL)
+#define INTC_ICDISR8_SPRI1                      (0x00040000uL)
+#define INTC_ICDISR8_SPTI1                      (0x00080000uL)
+#define INTC_ICDISR8_SPEI2                      (0x00100000uL)
+#define INTC_ICDISR8_SPRI2                      (0x00200000uL)
+#define INTC_ICDISR8_SPTI2                      (0x00400000uL)
+#define INTC_ICDISR8_SPEI3                      (0x00800000uL)
+#define INTC_ICDISR8_SPRI3                      (0x01000000uL)
+#define INTC_ICDISR8_SPTI3                      (0x02000000uL)
+#define INTC_ICDISR8_SPEI4                      (0x04000000uL)
+#define INTC_ICDISR8_SPRI4                      (0x08000000uL)
+#define INTC_ICDISR8_SPTI4                      (0x10000000uL)
+#define INTC_ICDISR8_IEBBTD                     (0x20000000uL)
+#define INTC_ICDISR8_IEBBTERR                   (0x40000000uL)
+#define INTC_ICDISR8_IEBBTSTA                   (0x80000000uL)
+
+#define INTC_ICDISR9_IEBBTV                     (0x00000001uL)
+#define INTC_ICDISR9_ISY                        (0x00000002uL)
+#define INTC_ICDISR9_IERR                       (0x00000004uL)
+#define INTC_ICDISR9_ITARG                      (0x00000008uL)
+#define INTC_ICDISR9_ISEC                       (0x00000010uL)
+#define INTC_ICDISR9_IBUF                       (0x00000020uL)
+#define INTC_ICDISR9_IREADY                     (0x00000040uL)
+#define INTC_ICDISR9_FLSTE                      (0x00000080uL)
+#define INTC_ICDISR9_FLTENDI                    (0x00000100uL)
+#define INTC_ICDISR9_FLTREQ0I                   (0x00000200uL)
+#define INTC_ICDISR9_FLTREQ1I                   (0x00000400uL)
+#define INTC_ICDISR9_MMC0                       (0x00000800uL)
+#define INTC_ICDISR9_MMC1                       (0x00001000uL)
+#define INTC_ICDISR9_MMC2                       (0x00002000uL)
+#define INTC_ICDISR9_SDHI0_3                    (0x00004000uL)
+#define INTC_ICDISR9_SDHI0_0                    (0x00008000uL)
+#define INTC_ICDISR9_SDHI0_1                    (0x00010000uL)
+#define INTC_ICDISR9_SDHI1_3                    (0x00020000uL)
+#define INTC_ICDISR9_SDHI1_0                    (0x00040000uL)
+#define INTC_ICDISR9_SDHI1_1                    (0x00080000uL)
+#define INTC_ICDISR9_ARM                        (0x00100000uL)
+#define INTC_ICDISR9_PRD                        (0x00200000uL)
+#define INTC_ICDISR9_CUP                        (0x00400000uL)
+#define INTC_ICDISR9_SCUAI0                     (0x00800000uL)
+#define INTC_ICDISR9_SCUAI1                     (0x01000000uL)
+#define INTC_ICDISR9_SCUFDI0                    (0x02000000uL)
+#define INTC_ICDISR9_SCUFDI1                    (0x04000000uL)
+#define INTC_ICDISR9_SCUFDI2                    (0x08000000uL)
+#define INTC_ICDISR9_SCUFDI3                    (0x10000000uL)
+#define INTC_ICDISR9_SCUFUI0                    (0x20000000uL)
+#define INTC_ICDISR9_SCUFUI1                    (0x40000000uL)
+#define INTC_ICDISR9_SCUFUI2                    (0x80000000uL)
+
+#define INTC_ICDISR10_SCUFUI3                   (0x00000001uL)
+#define INTC_ICDISR10_SCUDVI0                   (0x00000002uL)
+#define INTC_ICDISR10_SCUDVI1                   (0x00000004uL)
+#define INTC_ICDISR10_SCUDVI2                   (0x00000008uL)
+#define INTC_ICDISR10_SCUDVI3                   (0x00000010uL)
+#define INTC_ICDISR10_MLB_CINT                  (0x00000020uL)
+#define INTC_ICDISR10_MLB_SINT                  (0x00000040uL)
+#define INTC_ICDISR10_DRC0                      (0x00000080uL)
+#define INTC_ICDISR10_DRC1                      (0x00000100uL)
+#define INTC_ICDISR10_LINI0_INT_T               (0x00000800uL)
+#define INTC_ICDISR10_LINI0_INT_R               (0x00001000uL)
+#define INTC_ICDISR10_LINI0_INT_S               (0x00002000uL)
+#define INTC_ICDISR10_LINI0_INT_M               (0x00004000uL)
+#define INTC_ICDISR10_LINI1_INT_T               (0x00008000uL)
+#define INTC_ICDISR10_LINI1_INT_R               (0x00010000uL)
+#define INTC_ICDISR10_LINI1_INT_S               (0x00020000uL)
+#define INTC_ICDISR10_LINI1_INT_M               (0x00040000uL)
+#define INTC_ICDISR10_ERI0                      (0x08000000uL)
+#define INTC_ICDISR10_RXI0                      (0x10000000uL)
+#define INTC_ICDISR10_TXI0                      (0x20000000uL)
+#define INTC_ICDISR10_TEI0                      (0x40000000uL)
+#define INTC_ICDISR10_ERI1                      (0x80000000uL)
+
+#define INTC_ICDISR11_RXI1                      (0x00000001uL)
+#define INTC_ICDISR11_TXI1                      (0x00000002uL)
+#define INTC_ICDISR11_TEI1                      (0x00000004uL)
+#define INTC_ICDISR11_AVBI_DATA                 (0x00000008uL)
+#define INTC_ICDISR11_AVBI_ERROR                (0x00000010uL)
+#define INTC_ICDISR11_AVBI_MANAGE               (0x00000020uL)
+#define INTC_ICDISR11_AVBI_MAC                  (0x00000040uL)
+#define INTC_ICDISR11_ETHERI                    (0x00000080uL)
+#define INTC_ICDISR11_CEUI                      (0x00001000uL)
+#define INTC_ICDISR11_H2XMLB_ERRINT             (0x20000000uL)
+#define INTC_ICDISR11_H2XIC1_ERRINT             (0x40000000uL)
+#define INTC_ICDISR11_X2HPERI1_ERRINT           (0x80000000uL)
+
+#define INTC_ICDISR12_X2HPERI2_ERRINT           (0x00000001uL)
+#define INTC_ICDISR12_X2HPERI34_ERRINT          (0x00000002uL)
+#define INTC_ICDISR12_X2HPERI5_ERRINT           (0x00000004uL)
+#define INTC_ICDISR12_X2HPERI67_ERRINT          (0x00000008uL)
+#define INTC_ICDISR12_X2HDBGR_ERRINT            (0x00000010uL)
+#define INTC_ICDISR12_X2HBSC_ERRINT             (0x00000020uL)
+#define INTC_ICDISR12_X2HSPI1_ERRINT            (0x00000040uL)
+#define INTC_ICDISR12_X2HSPI2_ERRINT            (0x00000080uL)
+#define INTC_ICDISR12_PRRI                      (0x00000100uL)
+#define INTC_ICDISR12_IFEI0                     (0x00000200uL)
+#define INTC_ICDISR12_OFFI0                     (0x00000400uL)
+#define INTC_ICDISR12_PFVEI0                    (0x00000800uL)
+#define INTC_ICDISR12_IFEI1                     (0x00001000uL)
+#define INTC_ICDISR12_OFFI1                     (0x00002000uL)
+#define INTC_ICDISR12_PFVEI1                    (0x00004000uL)
+
+#define INTC_ICDISR13_TINT0                     (0x00000001uL)
+#define INTC_ICDISR13_TINT1                     (0x00000002uL)
+#define INTC_ICDISR13_TINT2                     (0x00000004uL)
+#define INTC_ICDISR13_TINT3                     (0x00000008uL)
+#define INTC_ICDISR13_TINT4                     (0x00000010uL)
+#define INTC_ICDISR13_TINT5                     (0x00000020uL)
+#define INTC_ICDISR13_TINT6                     (0x00000040uL)
+#define INTC_ICDISR13_TINT7                     (0x00000080uL)
+#define INTC_ICDISR13_TINT8                     (0x00000100uL)
+#define INTC_ICDISR13_TINT9                     (0x00000200uL)
+#define INTC_ICDISR13_TINT10                    (0x00000400uL)
+#define INTC_ICDISR13_TINT11                    (0x00000800uL)
+#define INTC_ICDISR13_TINT12                    (0x00001000uL)
+#define INTC_ICDISR13_TINT13                    (0x00002000uL)
+#define INTC_ICDISR13_TINT14                    (0x00004000uL)
+#define INTC_ICDISR13_TINT15                    (0x00008000uL)
+#define INTC_ICDISR13_TINT16                    (0x00010000uL)
+#define INTC_ICDISR13_TINT17                    (0x00020000uL)
+#define INTC_ICDISR13_TINT18                    (0x00040000uL)
+#define INTC_ICDISR13_TINT19                    (0x00080000uL)
+#define INTC_ICDISR13_TINT20                    (0x00100000uL)
+#define INTC_ICDISR13_TINT21                    (0x00200000uL)
+#define INTC_ICDISR13_TINT22                    (0x00400000uL)
+#define INTC_ICDISR13_TINT23                    (0x00800000uL)
+#define INTC_ICDISR13_TINT24                    (0x01000000uL)
+#define INTC_ICDISR13_TINT25                    (0x02000000uL)
+#define INTC_ICDISR13_TINT26                    (0x04000000uL)
+#define INTC_ICDISR13_TINT27                    (0x08000000uL)
+#define INTC_ICDISR13_TINT28                    (0x10000000uL)
+#define INTC_ICDISR13_TINT29                    (0x20000000uL)
+#define INTC_ICDISR13_TINT30                    (0x40000000uL)
+#define INTC_ICDISR13_TINT31                    (0x80000000uL)
+
+#define INTC_ICDISR14_TINT32                    (0x00000001uL)
+#define INTC_ICDISR14_TINT33                    (0x00000002uL)
+#define INTC_ICDISR14_TINT34                    (0x00000004uL)
+#define INTC_ICDISR14_TINT35                    (0x00000008uL)
+#define INTC_ICDISR14_TINT36                    (0x00000010uL)
+#define INTC_ICDISR14_TINT37                    (0x00000020uL)
+#define INTC_ICDISR14_TINT38                    (0x00000040uL)
+#define INTC_ICDISR14_TINT39                    (0x00000080uL)
+#define INTC_ICDISR14_TINT40                    (0x00000100uL)
+#define INTC_ICDISR14_TINT41                    (0x00000200uL)
+#define INTC_ICDISR14_TINT42                    (0x00000400uL)
+#define INTC_ICDISR14_TINT43                    (0x00000800uL)
+#define INTC_ICDISR14_TINT44                    (0x00001000uL)
+#define INTC_ICDISR14_TINT45                    (0x00002000uL)
+#define INTC_ICDISR14_TINT46                    (0x00004000uL)
+#define INTC_ICDISR14_TINT47                    (0x00008000uL)
+#define INTC_ICDISR14_TINT48                    (0x00010000uL)
+#define INTC_ICDISR14_TINT49                    (0x00020000uL)
+#define INTC_ICDISR14_TINT50                    (0x00040000uL)
+#define INTC_ICDISR14_TINT51                    (0x00080000uL)
+#define INTC_ICDISR14_TINT52                    (0x00100000uL)
+#define INTC_ICDISR14_TINT53                    (0x00200000uL)
+#define INTC_ICDISR14_TINT54                    (0x00400000uL)
+#define INTC_ICDISR14_TINT55                    (0x00800000uL)
+#define INTC_ICDISR14_TINT56                    (0x01000000uL)
+#define INTC_ICDISR14_TINT57                    (0x02000000uL)
+#define INTC_ICDISR14_TINT58                    (0x04000000uL)
+#define INTC_ICDISR14_TINT59                    (0x08000000uL)
+#define INTC_ICDISR14_TINT60                    (0x10000000uL)
+#define INTC_ICDISR14_TINT61                    (0x20000000uL)
+#define INTC_ICDISR14_TINT62                    (0x40000000uL)
+#define INTC_ICDISR14_TINT63                    (0x80000000uL)
+
+#define INTC_ICDISR15_TINT64                    (0x00000001uL)
+#define INTC_ICDISR15_TINT65                    (0x00000002uL)
+#define INTC_ICDISR15_TINT66                    (0x00000004uL)
+#define INTC_ICDISR15_TINT67                    (0x00000008uL)
+#define INTC_ICDISR15_TINT68                    (0x00000010uL)
+#define INTC_ICDISR15_TINT69                    (0x00000020uL)
+#define INTC_ICDISR15_TINT70                    (0x00000040uL)
+#define INTC_ICDISR15_TINT71                    (0x00000080uL)
+#define INTC_ICDISR15_TINT72                    (0x00000100uL)
+#define INTC_ICDISR15_TINT73                    (0x00000200uL)
+#define INTC_ICDISR15_TINT74                    (0x00000400uL)
+#define INTC_ICDISR15_TINT75                    (0x00000800uL)
+#define INTC_ICDISR15_TINT76                    (0x00001000uL)
+#define INTC_ICDISR15_TINT77                    (0x00002000uL)
+#define INTC_ICDISR15_TINT78                    (0x00004000uL)
+#define INTC_ICDISR15_TINT79                    (0x00008000uL)
+#define INTC_ICDISR15_TINT80                    (0x00010000uL)
+#define INTC_ICDISR15_TINT81                    (0x00020000uL)
+#define INTC_ICDISR15_TINT82                    (0x00040000uL)
+#define INTC_ICDISR15_TINT83                    (0x00080000uL)
+#define INTC_ICDISR15_TINT84                    (0x00100000uL)
+#define INTC_ICDISR15_TINT85                    (0x00200000uL)
+#define INTC_ICDISR15_TINT86                    (0x00400000uL)
+#define INTC_ICDISR15_TINT87                    (0x00800000uL)
+#define INTC_ICDISR15_TINT88                    (0x01000000uL)
+#define INTC_ICDISR15_TINT89                    (0x02000000uL)
+#define INTC_ICDISR15_TINT90                    (0x04000000uL)
+#define INTC_ICDISR15_TINT91                    (0x08000000uL)
+#define INTC_ICDISR15_TINT92                    (0x10000000uL)
+#define INTC_ICDISR15_TINT93                    (0x20000000uL)
+#define INTC_ICDISR15_TINT94                    (0x40000000uL)
+#define INTC_ICDISR15_TINT95                    (0x80000000uL)
+
+#define INTC_ICDISR16_TINT96                    (0x00000001uL)
+#define INTC_ICDISR16_TINT97                    (0x00000002uL)
+#define INTC_ICDISR16_TINT98                    (0x00000004uL)
+#define INTC_ICDISR16_TINT99                    (0x00000008uL)
+#define INTC_ICDISR16_TINT100                   (0x00000010uL)
+#define INTC_ICDISR16_TINT101                   (0x00000020uL)
+#define INTC_ICDISR16_TINT102                   (0x00000040uL)
+#define INTC_ICDISR16_TINT103                   (0x00000080uL)
+#define INTC_ICDISR16_TINT104                   (0x00000100uL)
+#define INTC_ICDISR16_TINT105                   (0x00000200uL)
+#define INTC_ICDISR16_TINT106                   (0x00000400uL)
+#define INTC_ICDISR16_TINT107                   (0x00000800uL)
+#define INTC_ICDISR16_TINT108                   (0x00001000uL)
+#define INTC_ICDISR16_TINT109                   (0x00002000uL)
+#define INTC_ICDISR16_TINT110                   (0x00004000uL)
+#define INTC_ICDISR16_TINT111                   (0x00008000uL)
+#define INTC_ICDISR16_TINT112                   (0x00010000uL)
+#define INTC_ICDISR16_TINT113                   (0x00020000uL)
+#define INTC_ICDISR16_TINT114                   (0x00040000uL)
+#define INTC_ICDISR16_TINT115                   (0x00080000uL)
+#define INTC_ICDISR16_TINT116                   (0x00100000uL)
+#define INTC_ICDISR16_TINT117                   (0x00200000uL)
+#define INTC_ICDISR16_TINT118                   (0x00400000uL)
+#define INTC_ICDISR16_TINT119                   (0x00800000uL)
+#define INTC_ICDISR16_TINT120                   (0x01000000uL)
+#define INTC_ICDISR16_TINT121                   (0x02000000uL)
+#define INTC_ICDISR16_TINT122                   (0x04000000uL)
+#define INTC_ICDISR16_TINT123                   (0x08000000uL)
+#define INTC_ICDISR16_TINT124                   (0x10000000uL)
+#define INTC_ICDISR16_TINT125                   (0x20000000uL)
+#define INTC_ICDISR16_TINT126                   (0x40000000uL)
+#define INTC_ICDISR16_TINT127                   (0x80000000uL)
+
+#define INTC_ICDISR17_TINT128                   (0x00000001uL)
+#define INTC_ICDISR17_TINT129                   (0x00000002uL)
+#define INTC_ICDISR17_TINT130                   (0x00000004uL)
+#define INTC_ICDISR17_TINT131                   (0x00000008uL)
+#define INTC_ICDISR17_TINT132                   (0x00000010uL)
+#define INTC_ICDISR17_TINT133                   (0x00000020uL)
+#define INTC_ICDISR17_TINT134                   (0x00000040uL)
+#define INTC_ICDISR17_TINT135                   (0x00000080uL)
+#define INTC_ICDISR17_TINT136                   (0x00000100uL)
+#define INTC_ICDISR17_TINT137                   (0x00000200uL)
+#define INTC_ICDISR17_TINT138                   (0x00000400uL)
+#define INTC_ICDISR17_TINT139                   (0x00000800uL)
+#define INTC_ICDISR17_TINT140                   (0x00001000uL)
+#define INTC_ICDISR17_TINT141                   (0x00002000uL)
+#define INTC_ICDISR17_TINT142                   (0x00004000uL)
+#define INTC_ICDISR17_TINT143                   (0x00008000uL)
+#define INTC_ICDISR17_TINT144                   (0x00010000uL)
+#define INTC_ICDISR17_TINT145                   (0x00020000uL)
+#define INTC_ICDISR17_TINT146                   (0x00040000uL)
+#define INTC_ICDISR17_TINT147                   (0x00080000uL)
+#define INTC_ICDISR17_TINT148                   (0x00100000uL)
+#define INTC_ICDISR17_TINT149                   (0x00200000uL)
+#define INTC_ICDISR17_TINT150                   (0x00400000uL)
+#define INTC_ICDISR17_TINT151                   (0x00800000uL)
+#define INTC_ICDISR17_TINT152                   (0x01000000uL)
+#define INTC_ICDISR17_TINT153                   (0x02000000uL)
+#define INTC_ICDISR17_TINT154                   (0x04000000uL)
+#define INTC_ICDISR17_TINT155                   (0x08000000uL)
+#define INTC_ICDISR17_TINT156                   (0x10000000uL)
+#define INTC_ICDISR17_TINT157                   (0x20000000uL)
+#define INTC_ICDISR17_TINT158                   (0x40000000uL)
+#define INTC_ICDISR17_TINT159                   (0x80000000uL)
+
+#define INTC_ICDISR18_TINT160                   (0x00000001uL)
+#define INTC_ICDISR18_TINT161                   (0x00000002uL)
+#define INTC_ICDISR18_TINT162                   (0x00000004uL)
+#define INTC_ICDISR18_TINT163                   (0x00000008uL)
+#define INTC_ICDISR18_TINT164                   (0x00000010uL)
+#define INTC_ICDISR18_TINT165                   (0x00000020uL)
+#define INTC_ICDISR18_TINT166                   (0x00000040uL)
+#define INTC_ICDISR18_TINT167                   (0x00000080uL)
+#define INTC_ICDISR18_TINT168                   (0x00000100uL)
+#define INTC_ICDISR18_TINT169                   (0x00000200uL)
+#define INTC_ICDISR18_TINT170                   (0x00000400uL)
+
+#define INTC_ICDISER0_SW0                       (0x00000001uL)
+#define INTC_ICDISER0_SW1                       (0x00000002uL)
+#define INTC_ICDISER0_SW2                       (0x00000004uL)
+#define INTC_ICDISER0_SW3                       (0x00000008uL)
+#define INTC_ICDISER0_SW4                       (0x00000010uL)
+#define INTC_ICDISER0_SW5                       (0x00000020uL)
+#define INTC_ICDISER0_SW6                       (0x00000040uL)
+#define INTC_ICDISER0_SW7                       (0x00000080uL)
+#define INTC_ICDISER0_SW8                       (0x00000100uL)
+#define INTC_ICDISER0_SW9                       (0x00000200uL)
+#define INTC_ICDISER0_SW10                      (0x00000400uL)
+#define INTC_ICDISER0_SW11                      (0x00000800uL)
+#define INTC_ICDISER0_SW12                      (0x00001000uL)
+#define INTC_ICDISER0_SW13                      (0x00002000uL)
+#define INTC_ICDISER0_SW14                      (0x00004000uL)
+#define INTC_ICDISER0_SW15                      (0x00008000uL)
+#define INTC_ICDISER0_PMUIRQ0                   (0x00010000uL)
+#define INTC_ICDISER0_COMMRX0                   (0x00020000uL)
+#define INTC_ICDISER0_COMMTX0                   (0x00040000uL)
+#define INTC_ICDISER0_CTIIRQ0                   (0x00080000uL)
+
+#define INTC_ICDISER1_IRQ0                      (0x00000001uL)
+#define INTC_ICDISER1_IRQ1                      (0x00000002uL)
+#define INTC_ICDISER1_IRQ2                      (0x00000004uL)
+#define INTC_ICDISER1_IRQ3                      (0x00000008uL)
+#define INTC_ICDISER1_IRQ4                      (0x00000010uL)
+#define INTC_ICDISER1_IRQ5                      (0x00000020uL)
+#define INTC_ICDISER1_IRQ6                      (0x00000040uL)
+#define INTC_ICDISER1_IRQ7                      (0x00000080uL)
+#define INTC_ICDISER1_PL310ERR                  (0x00000100uL)
+#define INTC_ICDISER1_DMAINT0                   (0x00000200uL)
+#define INTC_ICDISER1_DMAINT1                   (0x00000400uL)
+#define INTC_ICDISER1_DMAINT2                   (0x00000800uL)
+#define INTC_ICDISER1_DMAINT3                   (0x00001000uL)
+#define INTC_ICDISER1_DMAINT4                   (0x00002000uL)
+#define INTC_ICDISER1_DMAINT5                   (0x00004000uL)
+#define INTC_ICDISER1_DMAINT6                   (0x00008000uL)
+#define INTC_ICDISER1_DMAINT7                   (0x00010000uL)
+#define INTC_ICDISER1_DMAINT8                   (0x00020000uL)
+#define INTC_ICDISER1_DMAINT9                   (0x00040000uL)
+#define INTC_ICDISER1_DMAINT10                  (0x00080000uL)
+#define INTC_ICDISER1_DMAINT11                  (0x00100000uL)
+#define INTC_ICDISER1_DMAINT12                  (0x00200000uL)
+#define INTC_ICDISER1_DMAINT13                  (0x00400000uL)
+#define INTC_ICDISER1_DMAINT14                  (0x00800000uL)
+#define INTC_ICDISER1_DMAINT15                  (0x01000000uL)
+#define INTC_ICDISER1_DMAERR                    (0x02000000uL)
+
+#define INTC_ICDISER2_USBI0                     (0x00000200uL)
+#define INTC_ICDISER2_USBI1                     (0x00000400uL)
+#define INTC_ICDISER2_S0_VI_VSYNC0              (0x00000800uL)
+#define INTC_ICDISER2_S0_LO_VSYNC0              (0x00001000uL)
+#define INTC_ICDISER2_S0_VSYNCERR0              (0x00002000uL)
+#define INTC_ICDISER2_GR3_VLINE0                (0x00004000uL)
+#define INTC_ICDISER2_S0_VFIELD0                (0x00008000uL)
+#define INTC_ICDISER2_IV1_VBUFERR0              (0x00010000uL)
+#define INTC_ICDISER2_IV3_VBUFERR0              (0x00020000uL)
+#define INTC_ICDISER2_IV5_VBUFERR0              (0x00040000uL)
+#define INTC_ICDISER2_IV6_VBUFERR0              (0x00080000uL)
+#define INTC_ICDISER2_S0_WLINE0                 (0x00100000uL)
+#define INTC_ICDISER2_S1_VI_VSYNC0              (0x00200000uL)
+#define INTC_ICDISER2_S1_LO_VSYNC0              (0x00400000uL)
+#define INTC_ICDISER2_S1_VSYNCERR0              (0x00800000uL)
+#define INTC_ICDISER2_S1_VFIELD0                (0x01000000uL)
+#define INTC_ICDISER2_IV2_VBUFERR0              (0x02000000uL)
+#define INTC_ICDISER2_IV4_VBUFERR0              (0x04000000uL)
+#define INTC_ICDISER2_S1_WLINE0                 (0x08000000uL)
+#define INTC_ICDISER2_OIR_VI_VSYNC0             (0x10000000uL)
+#define INTC_ICDISER2_OIR_LO_VSYNC0             (0x20000000uL)
+#define INTC_ICDISER2_OIR_VSYNCERR0             (0x40000000uL)
+#define INTC_ICDISER2_OIR_VFIELD0               (0x80000000uL)
+
+#define INTC_ICDISER3_IV7_VBUFERR0              (0x00000001uL)
+#define INTC_ICDISER3_IV8_VBUFERR0              (0x00000002uL)
+#define INTC_ICDISER3_S0_VI_VSYNC1              (0x00000008uL)
+#define INTC_ICDISER3_S0_LO_VSYNC1              (0x00000010uL)
+#define INTC_ICDISER3_S0_VSYNCERR1              (0x00000020uL)
+#define INTC_ICDISER3_GR3_VLINE1                (0x00000040uL)
+#define INTC_ICDISER3_S0_VFIELD1                (0x00000080uL)
+#define INTC_ICDISER3_IV1_VBUFERR1              (0x00000100uL)
+#define INTC_ICDISER3_IV3_VBUFERR1              (0x00000200uL)
+#define INTC_ICDISER3_IV5_VBUFERR1              (0x00000400uL)
+#define INTC_ICDISER3_IV6_VBUFERR1              (0x00000800uL)
+#define INTC_ICDISER3_S0_WLINE1                 (0x00001000uL)
+#define INTC_ICDISER3_S1_VI_VSYNC1              (0x00002000uL)
+#define INTC_ICDISER3_S1_LO_VSYNC1              (0x00004000uL)
+#define INTC_ICDISER3_S1_VSYNCERR1              (0x00008000uL)
+#define INTC_ICDISER3_S1_VFIELD1                (0x00010000uL)
+#define INTC_ICDISER3_IV2_VBUFERR1              (0x00020000uL)
+#define INTC_ICDISER3_IV4_VBUFERR1              (0x00040000uL)
+#define INTC_ICDISER3_S1_WLINE1                 (0x00080000uL)
+#define INTC_ICDISER3_OIR_VI_VSYNC1             (0x00100000uL)
+#define INTC_ICDISER3_OIR_LO_VSYNC1             (0x00200000uL)
+#define INTC_ICDISER3_OIR_VLINE1                (0x00400000uL)
+#define INTC_ICDISER3_OIR_VFIELD1               (0x00800000uL)
+#define INTC_ICDISER3_IV7_VBUFERR1              (0x01000000uL)
+#define INTC_ICDISER3_IV8_VBUFERR1              (0x02000000uL)
+#define INTC_ICDISER3_IMRDI                     (0x08000000uL)
+#define INTC_ICDISER3_IMR2I0                    (0x10000000uL)
+#define INTC_ICDISER3_IMR2I1                    (0x20000000uL)
+#define INTC_ICDISER3_JEDI                      (0x40000000uL)
+#define INTC_ICDISER3_JDTI                      (0x80000000uL)
+
+#define INTC_ICDISER4_CMP0                      (0x00000001uL)
+#define INTC_ICDISER4_CMP1                      (0x00000002uL)
+#define INTC_ICDISER4_INT0                      (0x00000004uL)
+#define INTC_ICDISER4_INT1                      (0x00000008uL)
+#define INTC_ICDISER4_INT2                      (0x00000010uL)
+#define INTC_ICDISER4_INT3                      (0x00000020uL)
+#define INTC_ICDISER4_OSTM0TINT                 (0x00000040uL)
+#define INTC_ICDISER4_OSTM1TINT                 (0x00000080uL)
+#define INTC_ICDISER4_CMI                       (0x00000100uL)
+#define INTC_ICDISER4_WTOUT                     (0x00000200uL)
+#define INTC_ICDISER4_ITI                       (0x00000400uL)
+#define INTC_ICDISER4_TGI0A                     (0x00000800uL)
+#define INTC_ICDISER4_TGI0B                     (0x00001000uL)
+#define INTC_ICDISER4_TGI0C                     (0x00002000uL)
+#define INTC_ICDISER4_TGI0D                     (0x00004000uL)
+#define INTC_ICDISER4_TGI0V                     (0x00008000uL)
+#define INTC_ICDISER4_TGI0E                     (0x00010000uL)
+#define INTC_ICDISER4_TGI0F                     (0x00020000uL)
+#define INTC_ICDISER4_TGI1A                     (0x00040000uL)
+#define INTC_ICDISER4_TGI1B                     (0x00080000uL)
+#define INTC_ICDISER4_TGI1V                     (0x00100000uL)
+#define INTC_ICDISER4_TGI1U                     (0x00200000uL)
+#define INTC_ICDISER4_TGI2A                     (0x00400000uL)
+#define INTC_ICDISER4_TGI2B                     (0x00800000uL)
+#define INTC_ICDISER4_TGI2V                     (0x01000000uL)
+#define INTC_ICDISER4_TGI2U                     (0x02000000uL)
+#define INTC_ICDISER4_TGI3A                     (0x04000000uL)
+#define INTC_ICDISER4_TGI3B                     (0x08000000uL)
+#define INTC_ICDISER4_TGI3C                     (0x10000000uL)
+#define INTC_ICDISER4_TGI3D                     (0x20000000uL)
+#define INTC_ICDISER4_TGI3V                     (0x40000000uL)
+#define INTC_ICDISER4_TGI4A                     (0x80000000uL)
+
+#define INTC_ICDISER5_TGI4B                     (0x00000001uL)
+#define INTC_ICDISER5_TGI4C                     (0x00000002uL)
+#define INTC_ICDISER5_TGI4D                     (0x00000004uL)
+#define INTC_ICDISER5_TGI4V                     (0x00000008uL)
+#define INTC_ICDISER5_CMI1                      (0x00000010uL)
+#define INTC_ICDISER5_CMI2                      (0x00000020uL)
+#define INTC_ICDISER5_SGDEI0                    (0x00000040uL)
+#define INTC_ICDISER5_SGDEI1                    (0x00000080uL)
+#define INTC_ICDISER5_SGDEI2                    (0x00000100uL)
+#define INTC_ICDISER5_SGDEI3                    (0x00000200uL)
+#define INTC_ICDISER5_ADI                       (0x00000400uL)
+#define INTC_ICDISER5_LMTI                      (0x00000800uL)
+#define INTC_ICDISER5_SSII0                     (0x00001000uL)
+#define INTC_ICDISER5_SSIRXI0                   (0x00002000uL)
+#define INTC_ICDISER5_SSITXI0                   (0x00004000uL)
+#define INTC_ICDISER5_SSII1                     (0x00008000uL)
+#define INTC_ICDISER5_SSIRXI1                   (0x00010000uL)
+#define INTC_ICDISER5_SSITXI1                   (0x00020000uL)
+#define INTC_ICDISER5_SSII2                     (0x00040000uL)
+#define INTC_ICDISER5_SSIRTI2                   (0x00080000uL)
+#define INTC_ICDISER5_SSII3                     (0x00100000uL)
+#define INTC_ICDISER5_SSIRXI3                   (0x00200000uL)
+#define INTC_ICDISER5_SSITXI3                   (0x00400000uL)
+#define INTC_ICDISER5_SSII4                     (0x00800000uL)
+#define INTC_ICDISER5_SSIRTI4                   (0x01000000uL)
+#define INTC_ICDISER5_SSII5                     (0x02000000uL)
+#define INTC_ICDISER5_SSIRXI5                   (0x04000000uL)
+#define INTC_ICDISER5_SSITXI5                   (0x08000000uL)
+#define INTC_ICDISER5_SPDIFI                    (0x10000000uL)
+#define INTC_ICDISER5_INTIICTEI0                (0x20000000uL)
+#define INTC_ICDISER5_INTIICRI0                 (0x40000000uL)
+#define INTC_ICDISER5_INTIICTI0                 (0x80000000uL)
+
+#define INTC_ICDISER6_INTIICSPI0                (0x00000001uL)
+#define INTC_ICDISER6_INTIICSTI0                (0x00000002uL)
+#define INTC_ICDISER6_INTIICNAKI0               (0x00000004uL)
+#define INTC_ICDISER6_INTIICALI0                (0x00000008uL)
+#define INTC_ICDISER6_INTIICTMOI0               (0x00000010uL)
+#define INTC_ICDISER6_INTIICTEI1                (0x00000020uL)
+#define INTC_ICDISER6_INTIICRI1                 (0x00000040uL)
+#define INTC_ICDISER6_INTIICTI1                 (0x00000080uL)
+#define INTC_ICDISER6_INTIICSPI1                (0x00000100uL)
+#define INTC_ICDISER6_INTIICSTI1                (0x00000200uL)
+#define INTC_ICDISER6_INTIICNAKI1               (0x00000400uL)
+#define INTC_ICDISER6_INTIICALI1                (0x00000800uL)
+#define INTC_ICDISER6_INTIICTMOI1               (0x00001000uL)
+#define INTC_ICDISER6_INTIICTEI2                (0x00002000uL)
+#define INTC_ICDISER6_INTIICRI2                 (0x00004000uL)
+#define INTC_ICDISER6_INTIICTI2                 (0x00008000uL)
+#define INTC_ICDISER6_INTIICSPI2                (0x00010000uL)
+#define INTC_ICDISER6_INTIICSTI2                (0x00020000uL)
+#define INTC_ICDISER6_INTIICNAKI2               (0x00040000uL)
+#define INTC_ICDISER6_INTIICALI2                (0x00080000uL)
+#define INTC_ICDISER6_INTIICTMOI2               (0x00100000uL)
+#define INTC_ICDISER6_INTIICTEI3                (0x00200000uL)
+#define INTC_ICDISER6_INTIICRI3                 (0x00400000uL)
+#define INTC_ICDISER6_INTIICTI3                 (0x00800000uL)
+#define INTC_ICDISER6_INTIICSPI3                (0x01000000uL)
+#define INTC_ICDISER6_INTIICSTI3                (0x02000000uL)
+#define INTC_ICDISER6_INTIICNAKI3               (0x04000000uL)
+#define INTC_ICDISER6_INTIICALI3                (0x08000000uL)
+#define INTC_ICDISER6_INTIICTMOI3               (0x10000000uL)
+#define INTC_ICDISER6_BRI0                      (0x20000000uL)
+#define INTC_ICDISER6_ERI0                      (0x40000000uL)
+#define INTC_ICDISER6_RXI0                      (0x80000000uL)
+
+#define INTC_ICDISER7_TXI0                      (0x00000001uL)
+#define INTC_ICDISER7_BRI1                      (0x00000002uL)
+#define INTC_ICDISER7_ERI1                      (0x00000004uL)
+#define INTC_ICDISER7_RXI1                      (0x00000008uL)
+#define INTC_ICDISER7_TXI1                      (0x00000010uL)
+#define INTC_ICDISER7_BRI2                      (0x00000020uL)
+#define INTC_ICDISER7_ERI2                      (0x00000040uL)
+#define INTC_ICDISER7_RXI2                      (0x00000080uL)
+#define INTC_ICDISER7_TXI2                      (0x00000100uL)
+#define INTC_ICDISER7_BRI3                      (0x00000200uL)
+#define INTC_ICDISER7_ERI3                      (0x00000400uL)
+#define INTC_ICDISER7_RXI3                      (0x00000800uL)
+#define INTC_ICDISER7_TXI3                      (0x00001000uL)
+#define INTC_ICDISER7_BRI4                      (0x00002000uL)
+#define INTC_ICDISER7_ERI4                      (0x00004000uL)
+#define INTC_ICDISER7_RXI4                      (0x00008000uL)
+#define INTC_ICDISER7_TXI4                      (0x00010000uL)
+#define INTC_ICDISER7_BRI5                      (0x00020000uL)
+#define INTC_ICDISER7_ERI5                      (0x00040000uL)
+#define INTC_ICDISER7_RXI5                      (0x00080000uL)
+#define INTC_ICDISER7_TXI5                      (0x00100000uL)
+#define INTC_ICDISER7_BRI6                      (0x00200000uL)
+#define INTC_ICDISER7_ERI6                      (0x00400000uL)
+#define INTC_ICDISER7_RXI6                      (0x00800000uL)
+#define INTC_ICDISER7_TXI6                      (0x01000000uL)
+#define INTC_ICDISER7_BRI7                      (0x02000000uL)
+#define INTC_ICDISER7_ERI7                      (0x04000000uL)
+#define INTC_ICDISER7_RXI7                      (0x08000000uL)
+#define INTC_ICDISER7_TXI7                      (0x10000000uL)
+#define INTC_ICDISER7_INTRCANGERR               (0x20000000uL)
+#define INTC_ICDISER7_INTRCANGRECC              (0x40000000uL)
+#define INTC_ICDISER7_INTRCAN0REC               (0x80000000uL)
+
+#define INTC_ICDISER8_INTRCAN0ERR               (0x00000001uL)
+#define INTC_ICDISER8_INTRCAN0TRX               (0x00000002uL)
+#define INTC_ICDISER8_INTRCAN1REC               (0x00000004uL)
+#define INTC_ICDISER8_INTRCAN1ERR               (0x00000008uL)
+#define INTC_ICDISER8_INTRCAN1TRX               (0x00000010uL)
+#define INTC_ICDISER8_INTRCAN2REC               (0x00000020uL)
+#define INTC_ICDISER8_INTRCAN2ERR               (0x00000040uL)
+#define INTC_ICDISER8_INTRCAN2TRX               (0x00000080uL)
+#define INTC_ICDISER8_INTRCAN3REC               (0x00000100uL)
+#define INTC_ICDISER8_INTRCAN3ERR               (0x00000200uL)
+#define INTC_ICDISER8_INTRCAN3TRX               (0x00000400uL)
+#define INTC_ICDISER8_INTRCAN4REC               (0x00000800uL)
+#define INTC_ICDISER8_INTRCAN4ERR               (0x00001000uL)
+#define INTC_ICDISER8_INTRCAN4TRX               (0x00002000uL)
+#define INTC_ICDISER8_SPEI0                     (0x00004000uL)
+#define INTC_ICDISER8_SPRI0                     (0x00008000uL)
+#define INTC_ICDISER8_SPTI0                     (0x00010000uL)
+#define INTC_ICDISER8_SPEI1                     (0x00020000uL)
+#define INTC_ICDISER8_SPRI1                     (0x00040000uL)
+#define INTC_ICDISER8_SPTI1                     (0x00080000uL)
+#define INTC_ICDISER8_SPEI2                     (0x00100000uL)
+#define INTC_ICDISER8_SPRI2                     (0x00200000uL)
+#define INTC_ICDISER8_SPTI2                     (0x00400000uL)
+#define INTC_ICDISER8_SPEI3                     (0x00800000uL)
+#define INTC_ICDISER8_SPRI3                     (0x01000000uL)
+#define INTC_ICDISER8_SPTI3                     (0x02000000uL)
+#define INTC_ICDISER8_SPEI4                     (0x04000000uL)
+#define INTC_ICDISER8_SPRI4                     (0x08000000uL)
+#define INTC_ICDISER8_SPTI4                     (0x10000000uL)
+#define INTC_ICDISER8_IEBBTD                    (0x20000000uL)
+#define INTC_ICDISER8_IEBBTERR                  (0x40000000uL)
+#define INTC_ICDISER8_IEBBTSTA                  (0x80000000uL)
+
+#define INTC_ICDISER9_IEBBTV                    (0x00000001uL)
+#define INTC_ICDISER9_ISY                       (0x00000002uL)
+#define INTC_ICDISER9_IERR                      (0x00000004uL)
+#define INTC_ICDISER9_ITARG                     (0x00000008uL)
+#define INTC_ICDISER9_ISEC                      (0x00000010uL)
+#define INTC_ICDISER9_IBUF                      (0x00000020uL)
+#define INTC_ICDISER9_IREADY                    (0x00000040uL)
+#define INTC_ICDISER9_FLSTE                     (0x00000080uL)
+#define INTC_ICDISER9_FLTENDI                   (0x00000100uL)
+#define INTC_ICDISER9_FLTREQ0I                  (0x00000200uL)
+#define INTC_ICDISER9_FLTREQ1I                  (0x00000400uL)
+#define INTC_ICDISER9_MMC0                      (0x00000800uL)
+#define INTC_ICDISER9_MMC1                      (0x00001000uL)
+#define INTC_ICDISER9_MMC2                      (0x00002000uL)
+#define INTC_ICDISER9_SDHI0_3                   (0x00004000uL)
+#define INTC_ICDISER9_SDHI0_0                   (0x00008000uL)
+#define INTC_ICDISER9_SDHI0_1                   (0x00010000uL)
+#define INTC_ICDISER9_SDHI1_3                   (0x00020000uL)
+#define INTC_ICDISER9_SDHI1_0                   (0x00040000uL)
+#define INTC_ICDISER9_SDHI1_1                   (0x00080000uL)
+#define INTC_ICDISER9_ARM                       (0x00100000uL)
+#define INTC_ICDISER9_PRD                       (0x00200000uL)
+#define INTC_ICDISER9_CUP                       (0x00400000uL)
+#define INTC_ICDISER9_SCUAI0                    (0x00800000uL)
+#define INTC_ICDISER9_SCUAI1                    (0x01000000uL)
+#define INTC_ICDISER9_SCUFDI0                   (0x02000000uL)
+#define INTC_ICDISER9_SCUFDI1                   (0x04000000uL)
+#define INTC_ICDISER9_SCUFDI2                   (0x08000000uL)
+#define INTC_ICDISER9_SCUFDI3                   (0x10000000uL)
+#define INTC_ICDISER9_SCUFUI0                   (0x20000000uL)
+#define INTC_ICDISER9_SCUFUI1                   (0x40000000uL)
+#define INTC_ICDISER9_SCUFUI2                   (0x80000000uL)
+
+#define INTC_ICDISER10_SCUFUI3                  (0x00000001uL)
+#define INTC_ICDISER10_SCUDVI0                  (0x00000002uL)
+#define INTC_ICDISER10_SCUDVI1                  (0x00000004uL)
+#define INTC_ICDISER10_SCUDVI2                  (0x00000008uL)
+#define INTC_ICDISER10_SCUDVI3                  (0x00000010uL)
+#define INTC_ICDISER10_MLB_CINT                 (0x00000020uL)
+#define INTC_ICDISER10_MLB_SINT                 (0x00000040uL)
+#define INTC_ICDISER10_DRC0                     (0x00000080uL)
+#define INTC_ICDISER10_DRC1                     (0x00000100uL)
+#define INTC_ICDISER10_LINI0_INT_T              (0x00000800uL)
+#define INTC_ICDISER10_LINI0_INT_R              (0x00001000uL)
+#define INTC_ICDISER10_LINI0_INT_S              (0x00002000uL)
+#define INTC_ICDISER10_LINI0_INT_M              (0x00004000uL)
+#define INTC_ICDISER10_LINI1_INT_T              (0x00008000uL)
+#define INTC_ICDISER10_LINI1_INT_R              (0x00010000uL)
+#define INTC_ICDISER10_LINI1_INT_S              (0x00020000uL)
+#define INTC_ICDISER10_LINI1_INT_M              (0x00040000uL)
+#define INTC_ICDISER10_ERI0                     (0x08000000uL)
+#define INTC_ICDISER10_RXI0                     (0x10000000uL)
+#define INTC_ICDISER10_TXI0                     (0x20000000uL)
+#define INTC_ICDISER10_TEI0                     (0x40000000uL)
+#define INTC_ICDISER10_ERI1                     (0x80000000uL)
+
+#define INTC_ICDISER11_RXI1                     (0x00000001uL)
+#define INTC_ICDISER11_TXI1                     (0x00000002uL)
+#define INTC_ICDISER11_TEI1                     (0x00000004uL)
+#define INTC_ICDISER11_AVBI_DATA                (0x00000008uL)
+#define INTC_ICDISER11_AVBI_ERROR               (0x00000010uL)
+#define INTC_ICDISER11_AVBI_MANAGE              (0x00000020uL)
+#define INTC_ICDISER11_AVBI_MAC                 (0x00000040uL)
+#define INTC_ICDISER11_ETHERI                   (0x00000080uL)
+#define INTC_ICDISER11_CEUI                     (0x00001000uL)
+#define INTC_ICDISER11_H2XMLB_ERRINT            (0x20000000uL)
+#define INTC_ICDISER11_H2XIC1_ERRINT            (0x40000000uL)
+#define INTC_ICDISER11_X2HPERI1_ERRINT          (0x80000000uL)
+
+#define INTC_ICDISER12_X2HPERI2_ERRINT          (0x00000001uL)
+#define INTC_ICDISER12_X2HPERI34_ERRINT         (0x00000002uL)
+#define INTC_ICDISER12_X2HPERI5_ERRINT          (0x00000004uL)
+#define INTC_ICDISER12_X2HPERI67_ERRINT         (0x00000008uL)
+#define INTC_ICDISER12_X2HDBGR_ERRINT           (0x00000010uL)
+#define INTC_ICDISER12_X2HBSC_ERRINT            (0x00000020uL)
+#define INTC_ICDISER12_X2HSPI1_ERRINT           (0x00000040uL)
+#define INTC_ICDISER12_X2HSPI2_ERRINT           (0x00000080uL)
+#define INTC_ICDISER12_PRRI                     (0x00000100uL)
+#define INTC_ICDISER12_IFEI0                    (0x00000200uL)
+#define INTC_ICDISER12_OFFI0                    (0x00000400uL)
+#define INTC_ICDISER12_PFVEI0                   (0x00000800uL)
+#define INTC_ICDISER12_IFEI1                    (0x00001000uL)
+#define INTC_ICDISER12_OFFI1                    (0x00002000uL)
+#define INTC_ICDISER12_PFVEI1                   (0x00004000uL)
+
+#define INTC_ICDISER13_TINT0                    (0x00000001uL)
+#define INTC_ICDISER13_TINT1                    (0x00000002uL)
+#define INTC_ICDISER13_TINT2                    (0x00000004uL)
+#define INTC_ICDISER13_TINT3                    (0x00000008uL)
+#define INTC_ICDISER13_TINT4                    (0x00000010uL)
+#define INTC_ICDISER13_TINT5                    (0x00000020uL)
+#define INTC_ICDISER13_TINT6                    (0x00000040uL)
+#define INTC_ICDISER13_TINT7                    (0x00000080uL)
+#define INTC_ICDISER13_TINT8                    (0x00000100uL)
+#define INTC_ICDISER13_TINT9                    (0x00000200uL)
+#define INTC_ICDISER13_TINT10                   (0x00000400uL)
+#define INTC_ICDISER13_TINT11                   (0x00000800uL)
+#define INTC_ICDISER13_TINT12                   (0x00001000uL)
+#define INTC_ICDISER13_TINT13                   (0x00002000uL)
+#define INTC_ICDISER13_TINT14                   (0x00004000uL)
+#define INTC_ICDISER13_TINT15                   (0x00008000uL)
+#define INTC_ICDISER13_TINT16                   (0x00010000uL)
+#define INTC_ICDISER13_TINT17                   (0x00020000uL)
+#define INTC_ICDISER13_TINT18                   (0x00040000uL)
+#define INTC_ICDISER13_TINT19                   (0x00080000uL)
+#define INTC_ICDISER13_TINT20                   (0x00100000uL)
+#define INTC_ICDISER13_TINT21                   (0x00200000uL)
+#define INTC_ICDISER13_TINT22                   (0x00400000uL)
+#define INTC_ICDISER13_TINT23                   (0x00800000uL)
+#define INTC_ICDISER13_TINT24                   (0x01000000uL)
+#define INTC_ICDISER13_TINT25                   (0x02000000uL)
+#define INTC_ICDISER13_TINT26                   (0x04000000uL)
+#define INTC_ICDISER13_TINT27                   (0x08000000uL)
+#define INTC_ICDISER13_TINT28                   (0x10000000uL)
+#define INTC_ICDISER13_TINT29                   (0x20000000uL)
+#define INTC_ICDISER13_TINT30                   (0x40000000uL)
+#define INTC_ICDISER13_TINT31                   (0x80000000uL)
+
+#define INTC_ICDISER14_TINT32                   (0x00000001uL)
+#define INTC_ICDISER14_TINT33                   (0x00000002uL)
+#define INTC_ICDISER14_TINT34                   (0x00000004uL)
+#define INTC_ICDISER14_TINT35                   (0x00000008uL)
+#define INTC_ICDISER14_TINT36                   (0x00000010uL)
+#define INTC_ICDISER14_TINT37                   (0x00000020uL)
+#define INTC_ICDISER14_TINT38                   (0x00000040uL)
+#define INTC_ICDISER14_TINT39                   (0x00000080uL)
+#define INTC_ICDISER14_TINT40                   (0x00000100uL)
+#define INTC_ICDISER14_TINT41                   (0x00000200uL)
+#define INTC_ICDISER14_TINT42                   (0x00000400uL)
+#define INTC_ICDISER14_TINT43                   (0x00000800uL)
+#define INTC_ICDISER14_TINT44                   (0x00001000uL)
+#define INTC_ICDISER14_TINT45                   (0x00002000uL)
+#define INTC_ICDISER14_TINT46                   (0x00004000uL)
+#define INTC_ICDISER14_TINT47                   (0x00008000uL)
+#define INTC_ICDISER14_TINT48                   (0x00010000uL)
+#define INTC_ICDISER14_TINT49                   (0x00020000uL)
+#define INTC_ICDISER14_TINT50                   (0x00040000uL)
+#define INTC_ICDISER14_TINT51                   (0x00080000uL)
+#define INTC_ICDISER14_TINT52                   (0x00100000uL)
+#define INTC_ICDISER14_TINT53                   (0x00200000uL)
+#define INTC_ICDISER14_TINT54                   (0x00400000uL)
+#define INTC_ICDISER14_TINT55                   (0x00800000uL)
+#define INTC_ICDISER14_TINT56                   (0x01000000uL)
+#define INTC_ICDISER14_TINT57                   (0x02000000uL)
+#define INTC_ICDISER14_TINT58                   (0x04000000uL)
+#define INTC_ICDISER14_TINT59                   (0x08000000uL)
+#define INTC_ICDISER14_TINT60                   (0x10000000uL)
+#define INTC_ICDISER14_TINT61                   (0x20000000uL)
+#define INTC_ICDISER14_TINT62                   (0x40000000uL)
+#define INTC_ICDISER14_TINT63                   (0x80000000uL)
+
+#define INTC_ICDISER15_TINT64                   (0x00000001uL)
+#define INTC_ICDISER15_TINT65                   (0x00000002uL)
+#define INTC_ICDISER15_TINT66                   (0x00000004uL)
+#define INTC_ICDISER15_TINT67                   (0x00000008uL)
+#define INTC_ICDISER15_TINT68                   (0x00000010uL)
+#define INTC_ICDISER15_TINT69                   (0x00000020uL)
+#define INTC_ICDISER15_TINT70                   (0x00000040uL)
+#define INTC_ICDISER15_TINT71                   (0x00000080uL)
+#define INTC_ICDISER15_TINT72                   (0x00000100uL)
+#define INTC_ICDISER15_TINT73                   (0x00000200uL)
+#define INTC_ICDISER15_TINT74                   (0x00000400uL)
+#define INTC_ICDISER15_TINT75                   (0x00000800uL)
+#define INTC_ICDISER15_TINT76                   (0x00001000uL)
+#define INTC_ICDISER15_TINT77                   (0x00002000uL)
+#define INTC_ICDISER15_TINT78                   (0x00004000uL)
+#define INTC_ICDISER15_TINT79                   (0x00008000uL)
+#define INTC_ICDISER15_TINT80                   (0x00010000uL)
+#define INTC_ICDISER15_TINT81                   (0x00020000uL)
+#define INTC_ICDISER15_TINT82                   (0x00040000uL)
+#define INTC_ICDISER15_TINT83                   (0x00080000uL)
+#define INTC_ICDISER15_TINT84                   (0x00100000uL)
+#define INTC_ICDISER15_TINT85                   (0x00200000uL)
+#define INTC_ICDISER15_TINT86                   (0x00400000uL)
+#define INTC_ICDISER15_TINT87                   (0x00800000uL)
+#define INTC_ICDISER15_TINT88                   (0x01000000uL)
+#define INTC_ICDISER15_TINT89                   (0x02000000uL)
+#define INTC_ICDISER15_TINT90                   (0x04000000uL)
+#define INTC_ICDISER15_TINT91                   (0x08000000uL)
+#define INTC_ICDISER15_TINT92                   (0x10000000uL)
+#define INTC_ICDISER15_TINT93                   (0x20000000uL)
+#define INTC_ICDISER15_TINT94                   (0x40000000uL)
+#define INTC_ICDISER15_TINT95                   (0x80000000uL)
+
+#define INTC_ICDISER16_TINT96                   (0x00000001uL)
+#define INTC_ICDISER16_TINT97                   (0x00000002uL)
+#define INTC_ICDISER16_TINT98                   (0x00000004uL)
+#define INTC_ICDISER16_TINT99                   (0x00000008uL)
+#define INTC_ICDISER16_TINT100                  (0x00000010uL)
+#define INTC_ICDISER16_TINT101                  (0x00000020uL)
+#define INTC_ICDISER16_TINT102                  (0x00000040uL)
+#define INTC_ICDISER16_TINT103                  (0x00000080uL)
+#define INTC_ICDISER16_TINT104                  (0x00000100uL)
+#define INTC_ICDISER16_TINT105                  (0x00000200uL)
+#define INTC_ICDISER16_TINT106                  (0x00000400uL)
+#define INTC_ICDISER16_TINT107                  (0x00000800uL)
+#define INTC_ICDISER16_TINT108                  (0x00001000uL)
+#define INTC_ICDISER16_TINT109                  (0x00002000uL)
+#define INTC_ICDISER16_TINT110                  (0x00004000uL)
+#define INTC_ICDISER16_TINT111                  (0x00008000uL)
+#define INTC_ICDISER16_TINT112                  (0x00010000uL)
+#define INTC_ICDISER16_TINT113                  (0x00020000uL)
+#define INTC_ICDISER16_TINT114                  (0x00040000uL)
+#define INTC_ICDISER16_TINT115                  (0x00080000uL)
+#define INTC_ICDISER16_TINT116                  (0x00100000uL)
+#define INTC_ICDISER16_TINT117                  (0x00200000uL)
+#define INTC_ICDISER16_TINT118                  (0x00400000uL)
+#define INTC_ICDISER16_TINT119                  (0x00800000uL)
+#define INTC_ICDISER16_TINT120                  (0x01000000uL)
+#define INTC_ICDISER16_TINT121                  (0x02000000uL)
+#define INTC_ICDISER16_TINT122                  (0x04000000uL)
+#define INTC_ICDISER16_TINT123                  (0x08000000uL)
+#define INTC_ICDISER16_TINT124                  (0x10000000uL)
+#define INTC_ICDISER16_TINT125                  (0x20000000uL)
+#define INTC_ICDISER16_TINT126                  (0x40000000uL)
+#define INTC_ICDISER16_TINT127                  (0x80000000uL)
+
+#define INTC_ICDISER17_TINT128                  (0x00000001uL)
+#define INTC_ICDISER17_TINT129                  (0x00000002uL)
+#define INTC_ICDISER17_TINT130                  (0x00000004uL)
+#define INTC_ICDISER17_TINT131                  (0x00000008uL)
+#define INTC_ICDISER17_TINT132                  (0x00000010uL)
+#define INTC_ICDISER17_TINT133                  (0x00000020uL)
+#define INTC_ICDISER17_TINT134                  (0x00000040uL)
+#define INTC_ICDISER17_TINT135                  (0x00000080uL)
+#define INTC_ICDISER17_TINT136                  (0x00000100uL)
+#define INTC_ICDISER17_TINT137                  (0x00000200uL)
+#define INTC_ICDISER17_TINT138                  (0x00000400uL)
+#define INTC_ICDISER17_TINT139                  (0x00000800uL)
+#define INTC_ICDISER17_TINT140                  (0x00001000uL)
+#define INTC_ICDISER17_TINT141                  (0x00002000uL)
+#define INTC_ICDISER17_TINT142                  (0x00004000uL)
+#define INTC_ICDISER17_TINT143                  (0x00008000uL)
+#define INTC_ICDISER17_TINT144                  (0x00010000uL)
+#define INTC_ICDISER17_TINT145                  (0x00020000uL)
+#define INTC_ICDISER17_TINT146                  (0x00040000uL)
+#define INTC_ICDISER17_TINT147                  (0x00080000uL)
+#define INTC_ICDISER17_TINT148                  (0x00100000uL)
+#define INTC_ICDISER17_TINT149                  (0x00200000uL)
+#define INTC_ICDISER17_TINT150                  (0x00400000uL)
+#define INTC_ICDISER17_TINT151                  (0x00800000uL)
+#define INTC_ICDISER17_TINT152                  (0x01000000uL)
+#define INTC_ICDISER17_TINT153                  (0x02000000uL)
+#define INTC_ICDISER17_TINT154                  (0x04000000uL)
+#define INTC_ICDISER17_TINT155                  (0x08000000uL)
+#define INTC_ICDISER17_TINT156                  (0x10000000uL)
+#define INTC_ICDISER17_TINT157                  (0x20000000uL)
+#define INTC_ICDISER17_TINT158                  (0x40000000uL)
+#define INTC_ICDISER17_TINT159                  (0x80000000uL)
+
+#define INTC_ICDISER18_TINT160                  (0x00000001uL)
+#define INTC_ICDISER18_TINT161                  (0x00000002uL)
+#define INTC_ICDISER18_TINT162                  (0x00000004uL)
+#define INTC_ICDISER18_TINT163                  (0x00000008uL)
+#define INTC_ICDISER18_TINT164                  (0x00000010uL)
+#define INTC_ICDISER18_TINT165                  (0x00000020uL)
+#define INTC_ICDISER18_TINT166                  (0x00000040uL)
+#define INTC_ICDISER18_TINT167                  (0x00000080uL)
+#define INTC_ICDISER18_TINT168                  (0x00000100uL)
+#define INTC_ICDISER18_TINT169                  (0x00000200uL)
+#define INTC_ICDISER18_TINT170                  (0x00000400uL)
+
+#define INTC_ICDICER0_SW0                       (0x00000001uL)
+#define INTC_ICDICER0_SW1                       (0x00000002uL)
+#define INTC_ICDICER0_SW2                       (0x00000004uL)
+#define INTC_ICDICER0_SW3                       (0x00000008uL)
+#define INTC_ICDICER0_SW4                       (0x00000010uL)
+#define INTC_ICDICER0_SW5                       (0x00000020uL)
+#define INTC_ICDICER0_SW6                       (0x00000040uL)
+#define INTC_ICDICER0_SW7                       (0x00000080uL)
+#define INTC_ICDICER0_SW8                       (0x00000100uL)
+#define INTC_ICDICER0_SW9                       (0x00000200uL)
+#define INTC_ICDICER0_SW10                      (0x00000400uL)
+#define INTC_ICDICER0_SW11                      (0x00000800uL)
+#define INTC_ICDICER0_SW12                      (0x00001000uL)
+#define INTC_ICDICER0_SW13                      (0x00002000uL)
+#define INTC_ICDICER0_SW14                      (0x00004000uL)
+#define INTC_ICDICER0_SW15                      (0x00008000uL)
+#define INTC_ICDICER0_PMUIRQ0                   (0x00010000uL)
+#define INTC_ICDICER0_COMMRX0                   (0x00020000uL)
+#define INTC_ICDICER0_COMMTX0                   (0x00040000uL)
+#define INTC_ICDICER0_CTIIRQ0                   (0x00080000uL)
+
+#define INTC_ICDICER1_IRQ0                      (0x00000001uL)
+#define INTC_ICDICER1_IRQ1                      (0x00000002uL)
+#define INTC_ICDICER1_IRQ2                      (0x00000004uL)
+#define INTC_ICDICER1_IRQ3                      (0x00000008uL)
+#define INTC_ICDICER1_IRQ4                      (0x00000010uL)
+#define INTC_ICDICER1_IRQ5                      (0x00000020uL)
+#define INTC_ICDICER1_IRQ6                      (0x00000040uL)
+#define INTC_ICDICER1_IRQ7                      (0x00000080uL)
+#define INTC_ICDICER1_PL310ERR                  (0x00000100uL)
+#define INTC_ICDICER1_DMAINT0                   (0x00000200uL)
+#define INTC_ICDICER1_DMAINT1                   (0x00000400uL)
+#define INTC_ICDICER1_DMAINT2                   (0x00000800uL)
+#define INTC_ICDICER1_DMAINT3                   (0x00001000uL)
+#define INTC_ICDICER1_DMAINT4                   (0x00002000uL)
+#define INTC_ICDICER1_DMAINT5                   (0x00004000uL)
+#define INTC_ICDICER1_DMAINT6                   (0x00008000uL)
+#define INTC_ICDICER1_DMAINT7                   (0x00010000uL)
+#define INTC_ICDICER1_DMAINT8                   (0x00020000uL)
+#define INTC_ICDICER1_DMAINT9                   (0x00040000uL)
+#define INTC_ICDICER1_DMAINT10                  (0x00080000uL)
+#define INTC_ICDICER1_DMAINT11                  (0x00100000uL)
+#define INTC_ICDICER1_DMAINT12                  (0x00200000uL)
+#define INTC_ICDICER1_DMAINT13                  (0x00400000uL)
+#define INTC_ICDICER1_DMAINT14                  (0x00800000uL)
+#define INTC_ICDICER1_DMAINT15                  (0x01000000uL)
+#define INTC_ICDICER1_DMAERR                    (0x02000000uL)
+
+#define INTC_ICDICER2_USBI0                     (0x00000200uL)
+#define INTC_ICDICER2_USBI1                     (0x00000400uL)
+#define INTC_ICDICER2_S0_VI_VSYNC0              (0x00000800uL)
+#define INTC_ICDICER2_S0_LO_VSYNC0              (0x00001000uL)
+#define INTC_ICDICER2_S0_VSYNCERR0              (0x00002000uL)
+#define INTC_ICDICER2_GR3_VLINE0                (0x00004000uL)
+#define INTC_ICDICER2_S0_VFIELD0                (0x00008000uL)
+#define INTC_ICDICER2_IV1_VBUFERR0              (0x00010000uL)
+#define INTC_ICDICER2_IV3_VBUFERR0              (0x00020000uL)
+#define INTC_ICDICER2_IV5_VBUFERR0              (0x00040000uL)
+#define INTC_ICDICER2_IV6_VBUFERR0              (0x00080000uL)
+#define INTC_ICDICER2_S0_WLINE0                 (0x00100000uL)
+#define INTC_ICDICER2_S1_VI_VSYNC0              (0x00200000uL)
+#define INTC_ICDICER2_S1_LO_VSYNC0              (0x00400000uL)
+#define INTC_ICDICER2_S1_VSYNCERR0              (0x00800000uL)
+#define INTC_ICDICER2_S1_VFIELD0                (0x01000000uL)
+#define INTC_ICDICER2_IV2_VBUFERR0              (0x02000000uL)
+#define INTC_ICDICER2_IV4_VBUFERR0              (0x04000000uL)
+#define INTC_ICDICER2_S1_WLINE0                 (0x08000000uL)
+#define INTC_ICDICER2_OIR_VI_VSYNC0             (0x10000000uL)
+#define INTC_ICDICER2_OIR_LO_VSYNC0             (0x20000000uL)
+#define INTC_ICDICER2_OIR_VSYNCERR0             (0x40000000uL)
+#define INTC_ICDICER2_OIR_VFIELD0               (0x80000000uL)
+
+#define INTC_ICDICER3_IV7_VBUFERR0              (0x00000001uL)
+#define INTC_ICDICER3_IV8_VBUFERR0              (0x00000002uL)
+#define INTC_ICDICER3_S0_VI_VSYNC1              (0x00000008uL)
+#define INTC_ICDICER3_S0_LO_VSYNC1              (0x00000010uL)
+#define INTC_ICDICER3_S0_VSYNCERR1              (0x00000020uL)
+#define INTC_ICDICER3_GR3_VLINE1                (0x00000040uL)
+#define INTC_ICDICER3_S0_VFIELD1                (0x00000080uL)
+#define INTC_ICDICER3_IV1_VBUFERR1              (0x00000100uL)
+#define INTC_ICDICER3_IV3_VBUFERR1              (0x00000200uL)
+#define INTC_ICDICER3_IV5_VBUFERR1              (0x00000400uL)
+#define INTC_ICDICER3_IV6_VBUFERR1              (0x00000800uL)
+#define INTC_ICDICER3_S0_WLINE1                 (0x00001000uL)
+#define INTC_ICDICER3_S1_VI_VSYNC1              (0x00002000uL)
+#define INTC_ICDICER3_S1_LO_VSYNC1              (0x00004000uL)
+#define INTC_ICDICER3_S1_VSYNCERR1              (0x00008000uL)
+#define INTC_ICDICER3_S1_VFIELD1                (0x00010000uL)
+#define INTC_ICDICER3_IV2_VBUFERR1              (0x00020000uL)
+#define INTC_ICDICER3_IV4_VBUFERR1              (0x00040000uL)
+#define INTC_ICDICER3_S1_WLINE1                 (0x00080000uL)
+#define INTC_ICDICER3_OIR_VI_VSYNC1             (0x00100000uL)
+#define INTC_ICDICER3_OIR_LO_VSYNC1             (0x00200000uL)
+#define INTC_ICDICER3_OIR_VLINE1                (0x00400000uL)
+#define INTC_ICDICER3_OIR_VFIELD1               (0x00800000uL)
+#define INTC_ICDICER3_IV7_VBUFERR1              (0x01000000uL)
+#define INTC_ICDICER3_IV8_VBUFERR1              (0x02000000uL)
+#define INTC_ICDICER3_IMRDI                     (0x08000000uL)
+#define INTC_ICDICER3_IMR2I0                    (0x10000000uL)
+#define INTC_ICDICER3_IMR2I1                    (0x20000000uL)
+#define INTC_ICDICER3_JEDI                      (0x40000000uL)
+#define INTC_ICDICER3_JDTI                      (0x80000000uL)
+
+#define INTC_ICDICER4_CMP0                      (0x00000001uL)
+#define INTC_ICDICER4_CMP1                      (0x00000002uL)
+#define INTC_ICDICER4_INT0                      (0x00000004uL)
+#define INTC_ICDICER4_INT1                      (0x00000008uL)
+#define INTC_ICDICER4_INT2                      (0x00000010uL)
+#define INTC_ICDICER4_INT3                      (0x00000020uL)
+#define INTC_ICDICER4_OSTM0TINT                 (0x00000040uL)
+#define INTC_ICDICER4_OSTM1TINT                 (0x00000080uL)
+#define INTC_ICDICER4_CMI                       (0x00000100uL)
+#define INTC_ICDICER4_WTOUT                     (0x00000200uL)
+#define INTC_ICDICER4_ITI                       (0x00000400uL)
+#define INTC_ICDICER4_TGI0A                     (0x00000800uL)
+#define INTC_ICDICER4_TGI0B                     (0x00001000uL)
+#define INTC_ICDICER4_TGI0C                     (0x00002000uL)
+#define INTC_ICDICER4_TGI0D                     (0x00004000uL)
+#define INTC_ICDICER4_TGI0V                     (0x00008000uL)
+#define INTC_ICDICER4_TGI0E                     (0x00010000uL)
+#define INTC_ICDICER4_TGI0F                     (0x00020000uL)
+#define INTC_ICDICER4_TGI1A                     (0x00040000uL)
+#define INTC_ICDICER4_TGI1B                     (0x00080000uL)
+#define INTC_ICDICER4_TGI1V                     (0x00100000uL)
+#define INTC_ICDICER4_TGI1U                     (0x00200000uL)
+#define INTC_ICDICER4_TGI2A                     (0x00400000uL)
+#define INTC_ICDICER4_TGI2B                     (0x00800000uL)
+#define INTC_ICDICER4_TGI2V                     (0x01000000uL)
+#define INTC_ICDICER4_TGI2U                     (0x02000000uL)
+#define INTC_ICDICER4_TGI3A                     (0x04000000uL)
+#define INTC_ICDICER4_TGI3B                     (0x08000000uL)
+#define INTC_ICDICER4_TGI3C                     (0x10000000uL)
+#define INTC_ICDICER4_TGI3D                     (0x20000000uL)
+#define INTC_ICDICER4_TGI3V                     (0x40000000uL)
+#define INTC_ICDICER4_TGI4A                     (0x80000000uL)
+
+#define INTC_ICDICER5_TGI4B                     (0x00000001uL)
+#define INTC_ICDICER5_TGI4C                     (0x00000002uL)
+#define INTC_ICDICER5_TGI4D                     (0x00000004uL)
+#define INTC_ICDICER5_TGI4V                     (0x00000008uL)
+#define INTC_ICDICER5_CMI1                      (0x00000010uL)
+#define INTC_ICDICER5_CMI2                      (0x00000020uL)
+#define INTC_ICDICER5_SGDEI0                    (0x00000040uL)
+#define INTC_ICDICER5_SGDEI1                    (0x00000080uL)
+#define INTC_ICDICER5_SGDEI2                    (0x00000100uL)
+#define INTC_ICDICER5_SGDEI3                    (0x00000200uL)
+#define INTC_ICDICER5_ADI                       (0x00000400uL)
+#define INTC_ICDICER5_LMTI                      (0x00000800uL)
+#define INTC_ICDICER5_SSII0                     (0x00001000uL)
+#define INTC_ICDICER5_SSIRXI0                   (0x00002000uL)
+#define INTC_ICDICER5_SSITXI0                   (0x00004000uL)
+#define INTC_ICDICER5_SSII1                     (0x00008000uL)
+#define INTC_ICDICER5_SSIRXI1                   (0x00010000uL)
+#define INTC_ICDICER5_SSITXI1                   (0x00020000uL)
+#define INTC_ICDICER5_SSII2                     (0x00040000uL)
+#define INTC_ICDICER5_SSIRTI2                   (0x00080000uL)
+#define INTC_ICDICER5_SSII3                     (0x00100000uL)
+#define INTC_ICDICER5_SSIRXI3                   (0x00200000uL)
+#define INTC_ICDICER5_SSITXI3                   (0x00400000uL)
+#define INTC_ICDICER5_SSII4                     (0x00800000uL)
+#define INTC_ICDICER5_SSIRTI4                   (0x01000000uL)
+#define INTC_ICDICER5_SSII5                     (0x02000000uL)
+#define INTC_ICDICER5_SSIRXI5                   (0x04000000uL)
+#define INTC_ICDICER5_SSITXI5                   (0x08000000uL)
+#define INTC_ICDICER5_SPDIFI                    (0x10000000uL)
+#define INTC_ICDICER5_INTIICTEI0                (0x20000000uL)
+#define INTC_ICDICER5_INTIICRI0                 (0x40000000uL)
+#define INTC_ICDICER5_INTIICTI0                 (0x80000000uL)
+
+#define INTC_ICDICER6_INTIICSPI0                (0x00000001uL)
+#define INTC_ICDICER6_INTIICSTI0                (0x00000002uL)
+#define INTC_ICDICER6_INTIICNAKI0               (0x00000004uL)
+#define INTC_ICDICER6_INTIICALI0                (0x00000008uL)
+#define INTC_ICDICER6_INTIICTMOI0               (0x00000010uL)
+#define INTC_ICDICER6_INTIICTEI1                (0x00000020uL)
+#define INTC_ICDICER6_INTIICRI1                 (0x00000040uL)
+#define INTC_ICDICER6_INTIICTI1                 (0x00000080uL)
+#define INTC_ICDICER6_INTIICSPI1                (0x00000100uL)
+#define INTC_ICDICER6_INTIICSTI1                (0x00000200uL)
+#define INTC_ICDICER6_INTIICNAKI1               (0x00000400uL)
+#define INTC_ICDICER6_INTIICALI1                (0x00000800uL)
+#define INTC_ICDICER6_INTIICTMOI1               (0x00001000uL)
+#define INTC_ICDICER6_INTIICTEI2                (0x00002000uL)
+#define INTC_ICDICER6_INTIICRI2                 (0x00004000uL)
+#define INTC_ICDICER6_INTIICTI2                 (0x00008000uL)
+#define INTC_ICDICER6_INTIICSPI2                (0x00010000uL)
+#define INTC_ICDICER6_INTIICSTI2                (0x00020000uL)
+#define INTC_ICDICER6_INTIICNAKI2               (0x00040000uL)
+#define INTC_ICDICER6_INTIICALI2                (0x00080000uL)
+#define INTC_ICDICER6_INTIICTMOI2               (0x00100000uL)
+#define INTC_ICDICER6_INTIICTEI3                (0x00200000uL)
+#define INTC_ICDICER6_INTIICRI3                 (0x00400000uL)
+#define INTC_ICDICER6_INTIICTI3                 (0x00800000uL)
+#define INTC_ICDICER6_INTIICSPI3                (0x01000000uL)
+#define INTC_ICDICER6_INTIICSTI3                (0x02000000uL)
+#define INTC_ICDICER6_INTIICNAKI3               (0x04000000uL)
+#define INTC_ICDICER6_INTIICALI3                (0x08000000uL)
+#define INTC_ICDICER6_INTIICTMOI3               (0x10000000uL)
+#define INTC_ICDICER6_BRI0                      (0x20000000uL)
+#define INTC_ICDICER6_ERI0                      (0x40000000uL)
+#define INTC_ICDICER6_RXI0                      (0x80000000uL)
+
+#define INTC_ICDICER7_TXI0                      (0x00000001uL)
+#define INTC_ICDICER7_BRI1                      (0x00000002uL)
+#define INTC_ICDICER7_ERI1                      (0x00000004uL)
+#define INTC_ICDICER7_RXI1                      (0x00000008uL)
+#define INTC_ICDICER7_TXI1                      (0x00000010uL)
+#define INTC_ICDICER7_BRI2                      (0x00000020uL)
+#define INTC_ICDICER7_ERI2                      (0x00000040uL)
+#define INTC_ICDICER7_RXI2                      (0x00000080uL)
+#define INTC_ICDICER7_TXI2                      (0x00000100uL)
+#define INTC_ICDICER7_BRI3                      (0x00000200uL)
+#define INTC_ICDICER7_ERI3                      (0x00000400uL)
+#define INTC_ICDICER7_RXI3                      (0x00000800uL)
+#define INTC_ICDICER7_TXI3                      (0x00001000uL)
+#define INTC_ICDICER7_BRI4                      (0x00002000uL)
+#define INTC_ICDICER7_ERI4                      (0x00004000uL)
+#define INTC_ICDICER7_RXI4                      (0x00008000uL)
+#define INTC_ICDICER7_TXI4                      (0x00010000uL)
+#define INTC_ICDICER7_BRI5                      (0x00020000uL)
+#define INTC_ICDICER7_ERI5                      (0x00040000uL)
+#define INTC_ICDICER7_RXI5                      (0x00080000uL)
+#define INTC_ICDICER7_TXI5                      (0x00100000uL)
+#define INTC_ICDICER7_BRI6                      (0x00200000uL)
+#define INTC_ICDICER7_ERI6                      (0x00400000uL)
+#define INTC_ICDICER7_RXI6                      (0x00800000uL)
+#define INTC_ICDICER7_TXI6                      (0x01000000uL)
+#define INTC_ICDICER7_BRI7                      (0x02000000uL)
+#define INTC_ICDICER7_ERI7                      (0x04000000uL)
+#define INTC_ICDICER7_RXI7                      (0x08000000uL)
+#define INTC_ICDICER7_TXI7                      (0x10000000uL)
+#define INTC_ICDICER7_INTRCANGERR               (0x20000000uL)
+#define INTC_ICDICER7_INTRCANGRECC              (0x40000000uL)
+#define INTC_ICDICER7_INTRCAN0REC               (0x80000000uL)
+
+#define INTC_ICDICER8_INTRCAN0ERR               (0x00000001uL)
+#define INTC_ICDICER8_INTRCAN0TRX               (0x00000002uL)
+#define INTC_ICDICER8_INTRCAN1REC               (0x00000004uL)
+#define INTC_ICDICER8_INTRCAN1ERR               (0x00000008uL)
+#define INTC_ICDICER8_INTRCAN1TRX               (0x00000010uL)
+#define INTC_ICDICER8_INTRCAN2REC               (0x00000020uL)
+#define INTC_ICDICER8_INTRCAN2ERR               (0x00000040uL)
+#define INTC_ICDICER8_INTRCAN2TRX               (0x00000080uL)
+#define INTC_ICDICER8_INTRCAN3REC               (0x00000100uL)
+#define INTC_ICDICER8_INTRCAN3ERR               (0x00000200uL)
+#define INTC_ICDICER8_INTRCAN3TRX               (0x00000400uL)
+#define INTC_ICDICER8_INTRCAN4REC               (0x00000800uL)
+#define INTC_ICDICER8_INTRCAN4ERR               (0x00001000uL)
+#define INTC_ICDICER8_INTRCAN4TRX               (0x00002000uL)
+#define INTC_ICDICER8_SPEI0                     (0x00004000uL)
+#define INTC_ICDICER8_SPRI0                     (0x00008000uL)
+#define INTC_ICDICER8_SPTI0                     (0x00010000uL)
+#define INTC_ICDICER8_SPEI1                     (0x00020000uL)
+#define INTC_ICDICER8_SPRI1                     (0x00040000uL)
+#define INTC_ICDICER8_SPTI1                     (0x00080000uL)
+#define INTC_ICDICER8_SPEI2                     (0x00100000uL)
+#define INTC_ICDICER8_SPRI2                     (0x00200000uL)
+#define INTC_ICDICER8_SPTI2                     (0x00400000uL)
+#define INTC_ICDICER8_SPEI3                     (0x00800000uL)
+#define INTC_ICDICER8_SPRI3                     (0x01000000uL)
+#define INTC_ICDICER8_SPTI3                     (0x02000000uL)
+#define INTC_ICDICER8_SPEI4                     (0x04000000uL)
+#define INTC_ICDICER8_SPRI4                     (0x08000000uL)
+#define INTC_ICDICER8_SPTI4                     (0x10000000uL)
+#define INTC_ICDICER8_IEBBTD                    (0x20000000uL)
+#define INTC_ICDICER8_IEBBTERR                  (0x40000000uL)
+#define INTC_ICDICER8_IEBBTSTA                  (0x80000000uL)
+
+#define INTC_ICDICER9_IEBBTV                    (0x00000001uL)
+#define INTC_ICDICER9_ISY                       (0x00000002uL)
+#define INTC_ICDICER9_IERR                      (0x00000004uL)
+#define INTC_ICDICER9_ITARG                     (0x00000008uL)
+#define INTC_ICDICER9_ISEC                      (0x00000010uL)
+#define INTC_ICDICER9_IBUF                      (0x00000020uL)
+#define INTC_ICDICER9_IREADY                    (0x00000040uL)
+#define INTC_ICDICER9_FLSTE                     (0x00000080uL)
+#define INTC_ICDICER9_FLTENDI                   (0x00000100uL)
+#define INTC_ICDICER9_FLTREQ0I                  (0x00000200uL)
+#define INTC_ICDICER9_FLTREQ1I                  (0x00000400uL)
+#define INTC_ICDICER9_MMC0                      (0x00000800uL)
+#define INTC_ICDICER9_MMC1                      (0x00001000uL)
+#define INTC_ICDICER9_MMC2                      (0x00002000uL)
+#define INTC_ICDICER9_SDHI0_3                   (0x00004000uL)
+#define INTC_ICDICER9_SDHI0_0                   (0x00008000uL)
+#define INTC_ICDICER9_SDHI0_1                   (0x00010000uL)
+#define INTC_ICDICER9_SDHI1_3                   (0x00020000uL)
+#define INTC_ICDICER9_SDHI1_0                   (0x00040000uL)
+#define INTC_ICDICER9_SDHI1_1                   (0x00080000uL)
+#define INTC_ICDICER9_ARM                       (0x00100000uL)
+#define INTC_ICDICER9_PRD                       (0x00200000uL)
+#define INTC_ICDICER9_CUP                       (0x00400000uL)
+#define INTC_ICDICER9_SCUAI0                    (0x00800000uL)
+#define INTC_ICDICER9_SCUAI1                    (0x01000000uL)
+#define INTC_ICDICER9_SCUFDI0                   (0x02000000uL)
+#define INTC_ICDICER9_SCUFDI1                   (0x04000000uL)
+#define INTC_ICDICER9_SCUFDI2                   (0x08000000uL)
+#define INTC_ICDICER9_SCUFDI3                   (0x10000000uL)
+#define INTC_ICDICER9_SCUFUI0                   (0x20000000uL)
+#define INTC_ICDICER9_SCUFUI1                   (0x40000000uL)
+#define INTC_ICDICER9_SCUFUI2                   (0x80000000uL)
+
+#define INTC_ICDICER10_SCUFUI3                  (0x00000001uL)
+#define INTC_ICDICER10_SCUDVI0                  (0x00000002uL)
+#define INTC_ICDICER10_SCUDVI1                  (0x00000004uL)
+#define INTC_ICDICER10_SCUDVI2                  (0x00000008uL)
+#define INTC_ICDICER10_SCUDVI3                  (0x00000010uL)
+#define INTC_ICDICER10_MLB_CINT                 (0x00000020uL)
+#define INTC_ICDICER10_MLB_SINT                 (0x00000040uL)
+#define INTC_ICDICER10_DRC0                     (0x00000080uL)
+#define INTC_ICDICER10_DRC1                     (0x00000100uL)
+#define INTC_ICDICER10_LINI0_INT_T              (0x00000800uL)
+#define INTC_ICDICER10_LINI0_INT_R              (0x00001000uL)
+#define INTC_ICDICER10_LINI0_INT_S              (0x00002000uL)
+#define INTC_ICDICER10_LINI0_INT_M              (0x00004000uL)
+#define INTC_ICDICER10_LINI1_INT_T              (0x00008000uL)
+#define INTC_ICDICER10_LINI1_INT_R              (0x00010000uL)
+#define INTC_ICDICER10_LINI1_INT_S              (0x00020000uL)
+#define INTC_ICDICER10_LINI1_INT_M              (0x00040000uL)
+#define INTC_ICDICER10_ERI0                     (0x08000000uL)
+#define INTC_ICDICER10_RXI0                     (0x10000000uL)
+#define INTC_ICDICER10_TXI0                     (0x20000000uL)
+#define INTC_ICDICER10_TEI0                     (0x40000000uL)
+#define INTC_ICDICER10_ERI1                     (0x80000000uL)
+
+#define INTC_ICDICER11_RXI1                     (0x00000001uL)
+#define INTC_ICDICER11_TXI1                     (0x00000002uL)
+#define INTC_ICDICER11_TEI1                     (0x00000004uL)
+#define INTC_ICDICER11_AVBI_DATA                (0x00000008uL)
+#define INTC_ICDICER11_AVBI_ERROR               (0x00000010uL)
+#define INTC_ICDICER11_AVBI_MANAGE              (0x00000020uL)
+#define INTC_ICDICER11_AVBI_MAC                 (0x00000040uL)
+#define INTC_ICDICER11_ETHERI                   (0x00000080uL)
+#define INTC_ICDICER11_CEUI                     (0x00001000uL)
+#define INTC_ICDICER11_H2XMLB_ERRINT            (0x20000000uL)
+#define INTC_ICDICER11_H2XIC1_ERRINT            (0x40000000uL)
+#define INTC_ICDICER11_X2HPERI1_ERRINT          (0x80000000uL)
+
+#define INTC_ICDICER12_X2HPERI2_ERRINT          (0x00000001uL)
+#define INTC_ICDICER12_X2HPERI34_ERRINT         (0x00000002uL)
+#define INTC_ICDICER12_X2HPERI5_ERRINT          (0x00000004uL)
+#define INTC_ICDICER12_X2HPERI67_ERRINT         (0x00000008uL)
+#define INTC_ICDICER12_X2HDBGR_ERRINT           (0x00000010uL)
+#define INTC_ICDICER12_X2HBSC_ERRINT            (0x00000020uL)
+#define INTC_ICDICER12_X2HSPI1_ERRINT           (0x00000040uL)
+#define INTC_ICDICER12_X2HSPI2_ERRINT           (0x00000080uL)
+#define INTC_ICDICER12_PRRI                     (0x00000100uL)
+#define INTC_ICDICER12_IFEI0                    (0x00000200uL)
+#define INTC_ICDICER12_OFFI0                    (0x00000400uL)
+#define INTC_ICDICER12_PFVEI0                   (0x00000800uL)
+#define INTC_ICDICER12_IFEI1                    (0x00001000uL)
+#define INTC_ICDICER12_OFFI1                    (0x00002000uL)
+#define INTC_ICDICER12_PFVEI1                   (0x00004000uL)
+
+#define INTC_ICDICER13_TINT0                    (0x00000001uL)
+#define INTC_ICDICER13_TINT1                    (0x00000002uL)
+#define INTC_ICDICER13_TINT2                    (0x00000004uL)
+#define INTC_ICDICER13_TINT3                    (0x00000008uL)
+#define INTC_ICDICER13_TINT4                    (0x00000010uL)
+#define INTC_ICDICER13_TINT5                    (0x00000020uL)
+#define INTC_ICDICER13_TINT6                    (0x00000040uL)
+#define INTC_ICDICER13_TINT7                    (0x00000080uL)
+#define INTC_ICDICER13_TINT8                    (0x00000100uL)
+#define INTC_ICDICER13_TINT9                    (0x00000200uL)
+#define INTC_ICDICER13_TINT10                   (0x00000400uL)
+#define INTC_ICDICER13_TINT11                   (0x00000800uL)
+#define INTC_ICDICER13_TINT12                   (0x00001000uL)
+#define INTC_ICDICER13_TINT13                   (0x00002000uL)
+#define INTC_ICDICER13_TINT14                   (0x00004000uL)
+#define INTC_ICDICER13_TINT15                   (0x00008000uL)
+#define INTC_ICDICER13_TINT16                   (0x00010000uL)
+#define INTC_ICDICER13_TINT17                   (0x00020000uL)
+#define INTC_ICDICER13_TINT18                   (0x00040000uL)
+#define INTC_ICDICER13_TINT19                   (0x00080000uL)
+#define INTC_ICDICER13_TINT20                   (0x00100000uL)
+#define INTC_ICDICER13_TINT21                   (0x00200000uL)
+#define INTC_ICDICER13_TINT22                   (0x00400000uL)
+#define INTC_ICDICER13_TINT23                   (0x00800000uL)
+#define INTC_ICDICER13_TINT24                   (0x01000000uL)
+#define INTC_ICDICER13_TINT25                   (0x02000000uL)
+#define INTC_ICDICER13_TINT26                   (0x04000000uL)
+#define INTC_ICDICER13_TINT27                   (0x08000000uL)
+#define INTC_ICDICER13_TINT28                   (0x10000000uL)
+#define INTC_ICDICER13_TINT29                   (0x20000000uL)
+#define INTC_ICDICER13_TINT30                   (0x40000000uL)
+#define INTC_ICDICER13_TINT31                   (0x80000000uL)
+
+#define INTC_ICDICER14_TINT32                   (0x00000001uL)
+#define INTC_ICDICER14_TINT33                   (0x00000002uL)
+#define INTC_ICDICER14_TINT34                   (0x00000004uL)
+#define INTC_ICDICER14_TINT35                   (0x00000008uL)
+#define INTC_ICDICER14_TINT36                   (0x00000010uL)
+#define INTC_ICDICER14_TINT37                   (0x00000020uL)
+#define INTC_ICDICER14_TINT38                   (0x00000040uL)
+#define INTC_ICDICER14_TINT39                   (0x00000080uL)
+#define INTC_ICDICER14_TINT40                   (0x00000100uL)
+#define INTC_ICDICER14_TINT41                   (0x00000200uL)
+#define INTC_ICDICER14_TINT42                   (0x00000400uL)
+#define INTC_ICDICER14_TINT43                   (0x00000800uL)
+#define INTC_ICDICER14_TINT44                   (0x00001000uL)
+#define INTC_ICDICER14_TINT45                   (0x00002000uL)
+#define INTC_ICDICER14_TINT46                   (0x00004000uL)
+#define INTC_ICDICER14_TINT47                   (0x00008000uL)
+#define INTC_ICDICER14_TINT48                   (0x00010000uL)
+#define INTC_ICDICER14_TINT49                   (0x00020000uL)
+#define INTC_ICDICER14_TINT50                   (0x00040000uL)
+#define INTC_ICDICER14_TINT51                   (0x00080000uL)
+#define INTC_ICDICER14_TINT52                   (0x00100000uL)
+#define INTC_ICDICER14_TINT53                   (0x00200000uL)
+#define INTC_ICDICER14_TINT54                   (0x00400000uL)
+#define INTC_ICDICER14_TINT55                   (0x00800000uL)
+#define INTC_ICDICER14_TINT56                   (0x01000000uL)
+#define INTC_ICDICER14_TINT57                   (0x02000000uL)
+#define INTC_ICDICER14_TINT58                   (0x04000000uL)
+#define INTC_ICDICER14_TINT59                   (0x08000000uL)
+#define INTC_ICDICER14_TINT60                   (0x10000000uL)
+#define INTC_ICDICER14_TINT61                   (0x20000000uL)
+#define INTC_ICDICER14_TINT62                   (0x40000000uL)
+#define INTC_ICDICER14_TINT63                   (0x80000000uL)
+
+#define INTC_ICDICER15_TINT64                   (0x00000001uL)
+#define INTC_ICDICER15_TINT65                   (0x00000002uL)
+#define INTC_ICDICER15_TINT66                   (0x00000004uL)
+#define INTC_ICDICER15_TINT67                   (0x00000008uL)
+#define INTC_ICDICER15_TINT68                   (0x00000010uL)
+#define INTC_ICDICER15_TINT69                   (0x00000020uL)
+#define INTC_ICDICER15_TINT70                   (0x00000040uL)
+#define INTC_ICDICER15_TINT71                   (0x00000080uL)
+#define INTC_ICDICER15_TINT72                   (0x00000100uL)
+#define INTC_ICDICER15_TINT73                   (0x00000200uL)
+#define INTC_ICDICER15_TINT74                   (0x00000400uL)
+#define INTC_ICDICER15_TINT75                   (0x00000800uL)
+#define INTC_ICDICER15_TINT76                   (0x00001000uL)
+#define INTC_ICDICER15_TINT77                   (0x00002000uL)
+#define INTC_ICDICER15_TINT78                   (0x00004000uL)
+#define INTC_ICDICER15_TINT79                   (0x00008000uL)
+#define INTC_ICDICER15_TINT80                   (0x00010000uL)
+#define INTC_ICDICER15_TINT81                   (0x00020000uL)
+#define INTC_ICDICER15_TINT82                   (0x00040000uL)
+#define INTC_ICDICER15_TINT83                   (0x00080000uL)
+#define INTC_ICDICER15_TINT84                   (0x00100000uL)
+#define INTC_ICDICER15_TINT85                   (0x00200000uL)
+#define INTC_ICDICER15_TINT86                   (0x00400000uL)
+#define INTC_ICDICER15_TINT87                   (0x00800000uL)
+#define INTC_ICDICER15_TINT88                   (0x01000000uL)
+#define INTC_ICDICER15_TINT89                   (0x02000000uL)
+#define INTC_ICDICER15_TINT90                   (0x04000000uL)
+#define INTC_ICDICER15_TINT91                   (0x08000000uL)
+#define INTC_ICDICER15_TINT92                   (0x10000000uL)
+#define INTC_ICDICER15_TINT93                   (0x20000000uL)
+#define INTC_ICDICER15_TINT94                   (0x40000000uL)
+#define INTC_ICDICER15_TINT95                   (0x80000000uL)
+
+#define INTC_ICDICER16_TINT96                   (0x00000001uL)
+#define INTC_ICDICER16_TINT97                   (0x00000002uL)
+#define INTC_ICDICER16_TINT98                   (0x00000004uL)
+#define INTC_ICDICER16_TINT99                   (0x00000008uL)
+#define INTC_ICDICER16_TINT100                  (0x00000010uL)
+#define INTC_ICDICER16_TINT101                  (0x00000020uL)
+#define INTC_ICDICER16_TINT102                  (0x00000040uL)
+#define INTC_ICDICER16_TINT103                  (0x00000080uL)
+#define INTC_ICDICER16_TINT104                  (0x00000100uL)
+#define INTC_ICDICER16_TINT105                  (0x00000200uL)
+#define INTC_ICDICER16_TINT106                  (0x00000400uL)
+#define INTC_ICDICER16_TINT107                  (0x00000800uL)
+#define INTC_ICDICER16_TINT108                  (0x00001000uL)
+#define INTC_ICDICER16_TINT109                  (0x00002000uL)
+#define INTC_ICDICER16_TINT110                  (0x00004000uL)
+#define INTC_ICDICER16_TINT111                  (0x00008000uL)
+#define INTC_ICDICER16_TINT112                  (0x00010000uL)
+#define INTC_ICDICER16_TINT113                  (0x00020000uL)
+#define INTC_ICDICER16_TINT114                  (0x00040000uL)
+#define INTC_ICDICER16_TINT115                  (0x00080000uL)
+#define INTC_ICDICER16_TINT116                  (0x00100000uL)
+#define INTC_ICDICER16_TINT117                  (0x00200000uL)
+#define INTC_ICDICER16_TINT118                  (0x00400000uL)
+#define INTC_ICDICER16_TINT119                  (0x00800000uL)
+#define INTC_ICDICER16_TINT120                  (0x01000000uL)
+#define INTC_ICDICER16_TINT121                  (0x02000000uL)
+#define INTC_ICDICER16_TINT122                  (0x04000000uL)
+#define INTC_ICDICER16_TINT123                  (0x08000000uL)
+#define INTC_ICDICER16_TINT124                  (0x10000000uL)
+#define INTC_ICDICER16_TINT125                  (0x20000000uL)
+#define INTC_ICDICER16_TINT126                  (0x40000000uL)
+#define INTC_ICDICER16_TINT127                  (0x80000000uL)
+
+#define INTC_ICDICER17_TINT128                  (0x00000001uL)
+#define INTC_ICDICER17_TINT129                  (0x00000002uL)
+#define INTC_ICDICER17_TINT130                  (0x00000004uL)
+#define INTC_ICDICER17_TINT131                  (0x00000008uL)
+#define INTC_ICDICER17_TINT132                  (0x00000010uL)
+#define INTC_ICDICER17_TINT133                  (0x00000020uL)
+#define INTC_ICDICER17_TINT134                  (0x00000040uL)
+#define INTC_ICDICER17_TINT135                  (0x00000080uL)
+#define INTC_ICDICER17_TINT136                  (0x00000100uL)
+#define INTC_ICDICER17_TINT137                  (0x00000200uL)
+#define INTC_ICDICER17_TINT138                  (0x00000400uL)
+#define INTC_ICDICER17_TINT139                  (0x00000800uL)
+#define INTC_ICDICER17_TINT140                  (0x00001000uL)
+#define INTC_ICDICER17_TINT141                  (0x00002000uL)
+#define INTC_ICDICER17_TINT142                  (0x00004000uL)
+#define INTC_ICDICER17_TINT143                  (0x00008000uL)
+#define INTC_ICDICER17_TINT144                  (0x00010000uL)
+#define INTC_ICDICER17_TINT145                  (0x00020000uL)
+#define INTC_ICDICER17_TINT146                  (0x00040000uL)
+#define INTC_ICDICER17_TINT147                  (0x00080000uL)
+#define INTC_ICDICER17_TINT148                  (0x00100000uL)
+#define INTC_ICDICER17_TINT149                  (0x00200000uL)
+#define INTC_ICDICER17_TINT150                  (0x00400000uL)
+#define INTC_ICDICER17_TINT151                  (0x00800000uL)
+#define INTC_ICDICER17_TINT152                  (0x01000000uL)
+#define INTC_ICDICER17_TINT153                  (0x02000000uL)
+#define INTC_ICDICER17_TINT154                  (0x04000000uL)
+#define INTC_ICDICER17_TINT155                  (0x08000000uL)
+#define INTC_ICDICER17_TINT156                  (0x10000000uL)
+#define INTC_ICDICER17_TINT157                  (0x20000000uL)
+#define INTC_ICDICER17_TINT158                  (0x40000000uL)
+#define INTC_ICDICER17_TINT159                  (0x80000000uL)
+
+#define INTC_ICDICER18_TINT160                  (0x00000001uL)
+#define INTC_ICDICER18_TINT161                  (0x00000002uL)
+#define INTC_ICDICER18_TINT162                  (0x00000004uL)
+#define INTC_ICDICER18_TINT163                  (0x00000008uL)
+#define INTC_ICDICER18_TINT164                  (0x00000010uL)
+#define INTC_ICDICER18_TINT165                  (0x00000020uL)
+#define INTC_ICDICER18_TINT166                  (0x00000040uL)
+#define INTC_ICDICER18_TINT167                  (0x00000080uL)
+#define INTC_ICDICER18_TINT168                  (0x00000100uL)
+#define INTC_ICDICER18_TINT169                  (0x00000200uL)
+#define INTC_ICDICER18_TINT170                  (0x00000400uL)
+
+#define INTC_ICDISPR0_SW0                       (0x00000001uL)
+#define INTC_ICDISPR0_SW1                       (0x00000002uL)
+#define INTC_ICDISPR0_SW2                       (0x00000004uL)
+#define INTC_ICDISPR0_SW3                       (0x00000008uL)
+#define INTC_ICDISPR0_SW4                       (0x00000010uL)
+#define INTC_ICDISPR0_SW5                       (0x00000020uL)
+#define INTC_ICDISPR0_SW6                       (0x00000040uL)
+#define INTC_ICDISPR0_SW7                       (0x00000080uL)
+#define INTC_ICDISPR0_SW8                       (0x00000100uL)
+#define INTC_ICDISPR0_SW9                       (0x00000200uL)
+#define INTC_ICDISPR0_SW10                      (0x00000400uL)
+#define INTC_ICDISPR0_SW11                      (0x00000800uL)
+#define INTC_ICDISPR0_SW12                      (0x00001000uL)
+#define INTC_ICDISPR0_SW13                      (0x00002000uL)
+#define INTC_ICDISPR0_SW14                      (0x00004000uL)
+#define INTC_ICDISPR0_SW15                      (0x00008000uL)
+#define INTC_ICDISPR0_PMUIRQ0                   (0x00010000uL)
+#define INTC_ICDISPR0_COMMRX0                   (0x00020000uL)
+#define INTC_ICDISPR0_COMMTX0                   (0x00040000uL)
+#define INTC_ICDISPR0_CTIIRQ0                   (0x00080000uL)
+
+#define INTC_ICDISPR1_IRQ0                      (0x00000001uL)
+#define INTC_ICDISPR1_IRQ1                      (0x00000002uL)
+#define INTC_ICDISPR1_IRQ2                      (0x00000004uL)
+#define INTC_ICDISPR1_IRQ3                      (0x00000008uL)
+#define INTC_ICDISPR1_IRQ4                      (0x00000010uL)
+#define INTC_ICDISPR1_IRQ5                      (0x00000020uL)
+#define INTC_ICDISPR1_IRQ6                      (0x00000040uL)
+#define INTC_ICDISPR1_IRQ7                      (0x00000080uL)
+#define INTC_ICDISPR1_PL310ERR                  (0x00000100uL)
+#define INTC_ICDISPR1_DMAINT0                   (0x00000200uL)
+#define INTC_ICDISPR1_DMAINT1                   (0x00000400uL)
+#define INTC_ICDISPR1_DMAINT2                   (0x00000800uL)
+#define INTC_ICDISPR1_DMAINT3                   (0x00001000uL)
+#define INTC_ICDISPR1_DMAINT4                   (0x00002000uL)
+#define INTC_ICDISPR1_DMAINT5                   (0x00004000uL)
+#define INTC_ICDISPR1_DMAINT6                   (0x00008000uL)
+#define INTC_ICDISPR1_DMAINT7                   (0x00010000uL)
+#define INTC_ICDISPR1_DMAINT8                   (0x00020000uL)
+#define INTC_ICDISPR1_DMAINT9                   (0x00040000uL)
+#define INTC_ICDISPR1_DMAINT10                  (0x00080000uL)
+#define INTC_ICDISPR1_DMAINT11                  (0x00100000uL)
+#define INTC_ICDISPR1_DMAINT12                  (0x00200000uL)
+#define INTC_ICDISPR1_DMAINT13                  (0x00400000uL)
+#define INTC_ICDISPR1_DMAINT14                  (0x00800000uL)
+#define INTC_ICDISPR1_DMAINT15                  (0x01000000uL)
+#define INTC_ICDISPR1_DMAERR                    (0x02000000uL)
+
+#define INTC_ICDISPR2_USBI0                     (0x00000200uL)
+#define INTC_ICDISPR2_USBI1                     (0x00000400uL)
+#define INTC_ICDISPR2_S0_VI_VSYNC0              (0x00000800uL)
+#define INTC_ICDISPR2_S0_LO_VSYNC0              (0x00001000uL)
+#define INTC_ICDISPR2_S0_VSYNCERR0              (0x00002000uL)
+#define INTC_ICDISPR2_GR3_VLINE0                (0x00004000uL)
+#define INTC_ICDISPR2_S0_VFIELD0                (0x00008000uL)
+#define INTC_ICDISPR2_IV1_VBUFERR0              (0x00010000uL)
+#define INTC_ICDISPR2_IV3_VBUFERR0              (0x00020000uL)
+#define INTC_ICDISPR2_IV5_VBUFERR0              (0x00040000uL)
+#define INTC_ICDISPR2_IV6_VBUFERR0              (0x00080000uL)
+#define INTC_ICDISPR2_S0_WLINE0                 (0x00100000uL)
+#define INTC_ICDISPR2_S1_VI_VSYNC0              (0x00200000uL)
+#define INTC_ICDISPR2_S1_LO_VSYNC0              (0x00400000uL)
+#define INTC_ICDISPR2_S1_VSYNCERR0              (0x00800000uL)
+#define INTC_ICDISPR2_S1_VFIELD0                (0x01000000uL)
+#define INTC_ICDISPR2_IV2_VBUFERR0              (0x02000000uL)
+#define INTC_ICDISPR2_IV4_VBUFERR0              (0x04000000uL)
+#define INTC_ICDISPR2_S1_WLINE0                 (0x08000000uL)
+#define INTC_ICDISPR2_OIR_VI_VSYNC0             (0x10000000uL)
+#define INTC_ICDISPR2_OIR_LO_VSYNC0             (0x20000000uL)
+#define INTC_ICDISPR2_OIR_VSYNCERR0             (0x40000000uL)
+#define INTC_ICDISPR2_OIR_VFIELD0               (0x80000000uL)
+
+#define INTC_ICDISPR3_IV7_VBUFERR0              (0x00000001uL)
+#define INTC_ICDISPR3_IV8_VBUFERR0              (0x00000002uL)
+#define INTC_ICDISPR3_S0_VI_VSYNC1              (0x00000008uL)
+#define INTC_ICDISPR3_S0_LO_VSYNC1              (0x00000010uL)
+#define INTC_ICDISPR3_S0_VSYNCERR1              (0x00000020uL)
+#define INTC_ICDISPR3_GR3_VLINE1                (0x00000040uL)
+#define INTC_ICDISPR3_S0_VFIELD1                (0x00000080uL)
+#define INTC_ICDISPR3_IV1_VBUFERR1              (0x00000100uL)
+#define INTC_ICDISPR3_IV3_VBUFERR1              (0x00000200uL)
+#define INTC_ICDISPR3_IV5_VBUFERR1              (0x00000400uL)
+#define INTC_ICDISPR3_IV6_VBUFERR1              (0x00000800uL)
+#define INTC_ICDISPR3_S0_WLINE1                 (0x00001000uL)
+#define INTC_ICDISPR3_S1_VI_VSYNC1              (0x00002000uL)
+#define INTC_ICDISPR3_S1_LO_VSYNC1              (0x00004000uL)
+#define INTC_ICDISPR3_S1_VSYNCERR1              (0x00008000uL)
+#define INTC_ICDISPR3_S1_VFIELD1                (0x00010000uL)
+#define INTC_ICDISPR3_IV2_VBUFERR1              (0x00020000uL)
+#define INTC_ICDISPR3_IV4_VBUFERR1              (0x00040000uL)
+#define INTC_ICDISPR3_S1_WLINE1                 (0x00080000uL)
+#define INTC_ICDISPR3_OIR_VI_VSYNC1             (0x00100000uL)
+#define INTC_ICDISPR3_OIR_LO_VSYNC1             (0x00200000uL)
+#define INTC_ICDISPR3_OIR_VLINE1                (0x00400000uL)
+#define INTC_ICDISPR3_OIR_VFIELD1               (0x00800000uL)
+#define INTC_ICDISPR3_IV7_VBUFERR1              (0x01000000uL)
+#define INTC_ICDISPR3_IV8_VBUFERR1              (0x02000000uL)
+#define INTC_ICDISPR3_IMRDI                     (0x08000000uL)
+#define INTC_ICDISPR3_IMR2I0                    (0x10000000uL)
+#define INTC_ICDISPR3_IMR2I1                    (0x20000000uL)
+#define INTC_ICDISPR3_JEDI                      (0x40000000uL)
+#define INTC_ICDISPR3_JDTI                      (0x80000000uL)
+
+#define INTC_ICDISPR4_CMP0                      (0x00000001uL)
+#define INTC_ICDISPR4_CMP1                      (0x00000002uL)
+#define INTC_ICDISPR4_INT0                      (0x00000004uL)
+#define INTC_ICDISPR4_INT1                      (0x00000008uL)
+#define INTC_ICDISPR4_INT2                      (0x00000010uL)
+#define INTC_ICDISPR4_INT3                      (0x00000020uL)
+#define INTC_ICDISPR4_OSTM0TINT                 (0x00000040uL)
+#define INTC_ICDISPR4_OSTM1TINT                 (0x00000080uL)
+#define INTC_ICDISPR4_CMI                       (0x00000100uL)
+#define INTC_ICDISPR4_WTOUT                     (0x00000200uL)
+#define INTC_ICDISPR4_ITI                       (0x00000400uL)
+#define INTC_ICDISPR4_TGI0A                     (0x00000800uL)
+#define INTC_ICDISPR4_TGI0B                     (0x00001000uL)
+#define INTC_ICDISPR4_TGI0C                     (0x00002000uL)
+#define INTC_ICDISPR4_TGI0D                     (0x00004000uL)
+#define INTC_ICDISPR4_TGI0V                     (0x00008000uL)
+#define INTC_ICDISPR4_TGI0E                     (0x00010000uL)
+#define INTC_ICDISPR4_TGI0F                     (0x00020000uL)
+#define INTC_ICDISPR4_TGI1A                     (0x00040000uL)
+#define INTC_ICDISPR4_TGI1B                     (0x00080000uL)
+#define INTC_ICDISPR4_TGI1V                     (0x00100000uL)
+#define INTC_ICDISPR4_TGI1U                     (0x00200000uL)
+#define INTC_ICDISPR4_TGI2A                     (0x00400000uL)
+#define INTC_ICDISPR4_TGI2B                     (0x00800000uL)
+#define INTC_ICDISPR4_TGI2V                     (0x01000000uL)
+#define INTC_ICDISPR4_TGI2U                     (0x02000000uL)
+#define INTC_ICDISPR4_TGI3A                     (0x04000000uL)
+#define INTC_ICDISPR4_TGI3B                     (0x08000000uL)
+#define INTC_ICDISPR4_TGI3C                     (0x10000000uL)
+#define INTC_ICDISPR4_TGI3D                     (0x20000000uL)
+#define INTC_ICDISPR4_TGI3V                     (0x40000000uL)
+#define INTC_ICDISPR4_TGI4A                     (0x80000000uL)
+
+#define INTC_ICDISPR5_TGI4B                     (0x00000001uL)
+#define INTC_ICDISPR5_TGI4C                     (0x00000002uL)
+#define INTC_ICDISPR5_TGI4D                     (0x00000004uL)
+#define INTC_ICDISPR5_TGI4V                     (0x00000008uL)
+#define INTC_ICDISPR5_CMI1                      (0x00000010uL)
+#define INTC_ICDISPR5_CMI2                      (0x00000020uL)
+#define INTC_ICDISPR5_SGDEI0                    (0x00000040uL)
+#define INTC_ICDISPR5_SGDEI1                    (0x00000080uL)
+#define INTC_ICDISPR5_SGDEI2                    (0x00000100uL)
+#define INTC_ICDISPR5_SGDEI3                    (0x00000200uL)
+#define INTC_ICDISPR5_ADI                       (0x00000400uL)
+#define INTC_ICDISPR5_LMTI                      (0x00000800uL)
+#define INTC_ICDISPR5_SSII0                     (0x00001000uL)
+#define INTC_ICDISPR5_SSIRXI0                   (0x00002000uL)
+#define INTC_ICDISPR5_SSITXI0                   (0x00004000uL)
+#define INTC_ICDISPR5_SSII1                     (0x00008000uL)
+#define INTC_ICDISPR5_SSIRXI1                   (0x00010000uL)
+#define INTC_ICDISPR5_SSITXI1                   (0x00020000uL)
+#define INTC_ICDISPR5_SSII2                     (0x00040000uL)
+#define INTC_ICDISPR5_SSIRTI2                   (0x00080000uL)
+#define INTC_ICDISPR5_SSII3                     (0x00100000uL)
+#define INTC_ICDISPR5_SSIRXI3                   (0x00200000uL)
+#define INTC_ICDISPR5_SSITXI3                   (0x00400000uL)
+#define INTC_ICDISPR5_SSII4                     (0x00800000uL)
+#define INTC_ICDISPR5_SSIRTI4                   (0x01000000uL)
+#define INTC_ICDISPR5_SSII5                     (0x02000000uL)
+#define INTC_ICDISPR5_SSIRXI5                   (0x04000000uL)
+#define INTC_ICDISPR5_SSITXI5                   (0x08000000uL)
+#define INTC_ICDISPR5_SPDIFI                    (0x10000000uL)
+#define INTC_ICDISPR5_INTIICTEI0                (0x20000000uL)
+#define INTC_ICDISPR5_INTIICRI0                 (0x40000000uL)
+#define INTC_ICDISPR5_INTIICTI0                 (0x80000000uL)
+
+#define INTC_ICDISPR6_INTIICSPI0                (0x00000001uL)
+#define INTC_ICDISPR6_INTIICSTI0                (0x00000002uL)
+#define INTC_ICDISPR6_INTIICNAKI0               (0x00000004uL)
+#define INTC_ICDISPR6_INTIICALI0                (0x00000008uL)
+#define INTC_ICDISPR6_INTIICTMOI0               (0x00000010uL)
+#define INTC_ICDISPR6_INTIICTEI1                (0x00000020uL)
+#define INTC_ICDISPR6_INTIICRI1                 (0x00000040uL)
+#define INTC_ICDISPR6_INTIICTI1                 (0x00000080uL)
+#define INTC_ICDISPR6_INTIICSPI1                (0x00000100uL)
+#define INTC_ICDISPR6_INTIICSTI1                (0x00000200uL)
+#define INTC_ICDISPR6_INTIICNAKI1               (0x00000400uL)
+#define INTC_ICDISPR6_INTIICALI1                (0x00000800uL)
+#define INTC_ICDISPR6_INTIICTMOI1               (0x00001000uL)
+#define INTC_ICDISPR6_INTIICTEI2                (0x00002000uL)
+#define INTC_ICDISPR6_INTIICRI2                 (0x00004000uL)
+#define INTC_ICDISPR6_INTIICTI2                 (0x00008000uL)
+#define INTC_ICDISPR6_INTIICSPI2                (0x00010000uL)
+#define INTC_ICDISPR6_INTIICSTI2                (0x00020000uL)
+#define INTC_ICDISPR6_INTIICNAKI2               (0x00040000uL)
+#define INTC_ICDISPR6_INTIICALI2                (0x00080000uL)
+#define INTC_ICDISPR6_INTIICTMOI2               (0x00100000uL)
+#define INTC_ICDISPR6_INTIICTEI3                (0x00200000uL)
+#define INTC_ICDISPR6_INTIICRI3                 (0x00400000uL)
+#define INTC_ICDISPR6_INTIICTI3                 (0x00800000uL)
+#define INTC_ICDISPR6_INTIICSPI3                (0x01000000uL)
+#define INTC_ICDISPR6_INTIICSTI3                (0x02000000uL)
+#define INTC_ICDISPR6_INTIICNAKI3               (0x04000000uL)
+#define INTC_ICDISPR6_INTIICALI3                (0x08000000uL)
+#define INTC_ICDISPR6_INTIICTMOI3               (0x10000000uL)
+#define INTC_ICDISPR6_BRI0                      (0x20000000uL)
+#define INTC_ICDISPR6_ERI0                      (0x40000000uL)
+#define INTC_ICDISPR6_RXI0                      (0x80000000uL)
+
+#define INTC_ICDISPR7_TXI0                      (0x00000001uL)
+#define INTC_ICDISPR7_BRI1                      (0x00000002uL)
+#define INTC_ICDISPR7_ERI1                      (0x00000004uL)
+#define INTC_ICDISPR7_RXI1                      (0x00000008uL)
+#define INTC_ICDISPR7_TXI1                      (0x00000010uL)
+#define INTC_ICDISPR7_BRI2                      (0x00000020uL)
+#define INTC_ICDISPR7_ERI2                      (0x00000040uL)
+#define INTC_ICDISPR7_RXI2                      (0x00000080uL)
+#define INTC_ICDISPR7_TXI2                      (0x00000100uL)
+#define INTC_ICDISPR7_BRI3                      (0x00000200uL)
+#define INTC_ICDISPR7_ERI3                      (0x00000400uL)
+#define INTC_ICDISPR7_RXI3                      (0x00000800uL)
+#define INTC_ICDISPR7_TXI3                      (0x00001000uL)
+#define INTC_ICDISPR7_BRI4                      (0x00002000uL)
+#define INTC_ICDISPR7_ERI4                      (0x00004000uL)
+#define INTC_ICDISPR7_RXI4                      (0x00008000uL)
+#define INTC_ICDISPR7_TXI4                      (0x00010000uL)
+#define INTC_ICDISPR7_BRI5                      (0x00020000uL)
+#define INTC_ICDISPR7_ERI5                      (0x00040000uL)
+#define INTC_ICDISPR7_RXI5                      (0x00080000uL)
+#define INTC_ICDISPR7_TXI5                      (0x00100000uL)
+#define INTC_ICDISPR7_BRI6                      (0x00200000uL)
+#define INTC_ICDISPR7_ERI6                      (0x00400000uL)
+#define INTC_ICDISPR7_RXI6                      (0x00800000uL)
+#define INTC_ICDISPR7_TXI6                      (0x01000000uL)
+#define INTC_ICDISPR7_BRI7                      (0x02000000uL)
+#define INTC_ICDISPR7_ERI7                      (0x04000000uL)
+#define INTC_ICDISPR7_RXI7                      (0x08000000uL)
+#define INTC_ICDISPR7_TXI7                      (0x10000000uL)
+#define INTC_ICDISPR7_INTRCANGERR               (0x20000000uL)
+#define INTC_ICDISPR7_INTRCANGRECC              (0x40000000uL)
+#define INTC_ICDISPR7_INTRCAN0REC               (0x80000000uL)
+
+#define INTC_ICDISPR8_INTRCAN0ERR               (0x00000001uL)
+#define INTC_ICDISPR8_INTRCAN0TRX               (0x00000002uL)
+#define INTC_ICDISPR8_INTRCAN1REC               (0x00000004uL)
+#define INTC_ICDISPR8_INTRCAN1ERR               (0x00000008uL)
+#define INTC_ICDISPR8_INTRCAN1TRX               (0x00000010uL)
+#define INTC_ICDISPR8_INTRCAN2REC               (0x00000020uL)
+#define INTC_ICDISPR8_INTRCAN2ERR               (0x00000040uL)
+#define INTC_ICDISPR8_INTRCAN2TRX               (0x00000080uL)
+#define INTC_ICDISPR8_INTRCAN3REC               (0x00000100uL)
+#define INTC_ICDISPR8_INTRCAN3ERR               (0x00000200uL)
+#define INTC_ICDISPR8_INTRCAN3TRX               (0x00000400uL)
+#define INTC_ICDISPR8_INTRCAN4REC               (0x00000800uL)
+#define INTC_ICDISPR8_INTRCAN4ERR               (0x00001000uL)
+#define INTC_ICDISPR8_INTRCAN4TRX               (0x00002000uL)
+#define INTC_ICDISPR8_SPEI0                     (0x00004000uL)
+#define INTC_ICDISPR8_SPRI0                     (0x00008000uL)
+#define INTC_ICDISPR8_SPTI0                     (0x00010000uL)
+#define INTC_ICDISPR8_SPEI1                     (0x00020000uL)
+#define INTC_ICDISPR8_SPRI1                     (0x00040000uL)
+#define INTC_ICDISPR8_SPTI1                     (0x00080000uL)
+#define INTC_ICDISPR8_SPEI2                     (0x00100000uL)
+#define INTC_ICDISPR8_SPRI2                     (0x00200000uL)
+#define INTC_ICDISPR8_SPTI2                     (0x00400000uL)
+#define INTC_ICDISPR8_SPEI3                     (0x00800000uL)
+#define INTC_ICDISPR8_SPRI3                     (0x01000000uL)
+#define INTC_ICDISPR8_SPTI3                     (0x02000000uL)
+#define INTC_ICDISPR8_SPEI4                     (0x04000000uL)
+#define INTC_ICDISPR8_SPRI4                     (0x08000000uL)
+#define INTC_ICDISPR8_SPTI4                     (0x10000000uL)
+#define INTC_ICDISPR8_IEBBTD                    (0x20000000uL)
+#define INTC_ICDISPR8_IEBBTERR                  (0x40000000uL)
+#define INTC_ICDISPR8_IEBBTSTA                  (0x80000000uL)
+
+#define INTC_ICDISPR9_IEBBTV                    (0x00000001uL)
+#define INTC_ICDISPR9_ISY                       (0x00000002uL)
+#define INTC_ICDISPR9_IERR                      (0x00000004uL)
+#define INTC_ICDISPR9_ITARG                     (0x00000008uL)
+#define INTC_ICDISPR9_ISEC                      (0x00000010uL)
+#define INTC_ICDISPR9_IBUF                      (0x00000020uL)
+#define INTC_ICDISPR9_IREADY                    (0x00000040uL)
+#define INTC_ICDISPR9_FLSTE                     (0x00000080uL)
+#define INTC_ICDISPR9_FLTENDI                   (0x00000100uL)
+#define INTC_ICDISPR9_FLTREQ0I                  (0x00000200uL)
+#define INTC_ICDISPR9_FLTREQ1I                  (0x00000400uL)
+#define INTC_ICDISPR9_MMC0                      (0x00000800uL)
+#define INTC_ICDISPR9_MMC1                      (0x00001000uL)
+#define INTC_ICDISPR9_MMC2                      (0x00002000uL)
+#define INTC_ICDISPR9_SDHI0_3                   (0x00004000uL)
+#define INTC_ICDISPR9_SDHI0_0                   (0x00008000uL)
+#define INTC_ICDISPR9_SDHI0_1                   (0x00010000uL)
+#define INTC_ICDISPR9_SDHI1_3                   (0x00020000uL)
+#define INTC_ICDISPR9_SDHI1_0                   (0x00040000uL)
+#define INTC_ICDISPR9_SDHI1_1                   (0x00080000uL)
+#define INTC_ICDISPR9_ARM                       (0x00100000uL)
+#define INTC_ICDISPR9_PRD                       (0x00200000uL)
+#define INTC_ICDISPR9_CUP                       (0x00400000uL)
+#define INTC_ICDISPR9_SCUAI0                    (0x00800000uL)
+#define INTC_ICDISPR9_SCUAI1                    (0x01000000uL)
+#define INTC_ICDISPR9_SCUFDI0                   (0x02000000uL)
+#define INTC_ICDISPR9_SCUFDI1                   (0x04000000uL)
+#define INTC_ICDISPR9_SCUFDI2                   (0x08000000uL)
+#define INTC_ICDISPR9_SCUFDI3                   (0x10000000uL)
+#define INTC_ICDISPR9_SCUFUI0                   (0x20000000uL)
+#define INTC_ICDISPR9_SCUFUI1                   (0x40000000uL)
+#define INTC_ICDISPR9_SCUFUI2                   (0x80000000uL)
+
+#define INTC_ICDISPR10_SCUFUI3                  (0x00000001uL)
+#define INTC_ICDISPR10_SCUDVI0                  (0x00000002uL)
+#define INTC_ICDISPR10_SCUDVI1                  (0x00000004uL)
+#define INTC_ICDISPR10_SCUDVI2                  (0x00000008uL)
+#define INTC_ICDISPR10_SCUDVI3                  (0x00000010uL)
+#define INTC_ICDISPR10_MLB_CINT                 (0x00000020uL)
+#define INTC_ICDISPR10_MLB_SINT                 (0x00000040uL)
+#define INTC_ICDISPR10_DRC0                     (0x00000080uL)
+#define INTC_ICDISPR10_DRC1                     (0x00000100uL)
+#define INTC_ICDISPR10_LINI0_INT_T              (0x00000800uL)
+#define INTC_ICDISPR10_LINI0_INT_R              (0x00001000uL)
+#define INTC_ICDISPR10_LINI0_INT_S              (0x00002000uL)
+#define INTC_ICDISPR10_LINI0_INT_M              (0x00004000uL)
+#define INTC_ICDISPR10_LINI1_INT_T              (0x00008000uL)
+#define INTC_ICDISPR10_LINI1_INT_R              (0x00010000uL)
+#define INTC_ICDISPR10_LINI1_INT_S              (0x00020000uL)
+#define INTC_ICDISPR10_LINI1_INT_M              (0x00040000uL)
+#define INTC_ICDISPR10_ERI0                     (0x08000000uL)
+#define INTC_ICDISPR10_RXI0                     (0x10000000uL)
+#define INTC_ICDISPR10_TXI0                     (0x20000000uL)
+#define INTC_ICDISPR10_TEI0                     (0x40000000uL)
+#define INTC_ICDISPR10_ERI1                     (0x80000000uL)
+
+#define INTC_ICDISPR11_RXI1                     (0x00000001uL)
+#define INTC_ICDISPR11_TXI1                     (0x00000002uL)
+#define INTC_ICDISPR11_TEI1                     (0x00000004uL)
+#define INTC_ICDISPR11_AVBI_DATA                (0x00000008uL)
+#define INTC_ICDISPR11_AVBI_ERROR               (0x00000010uL)
+#define INTC_ICDISPR11_AVBI_MANAGE              (0x00000020uL)
+#define INTC_ICDISPR11_AVBI_MAC                 (0x00000040uL)
+#define INTC_ICDISPR11_ETHERI                   (0x00000080uL)
+#define INTC_ICDISPR11_CEUI                     (0x00001000uL)
+#define INTC_ICDISPR11_H2XMLB_ERRINT            (0x20000000uL)
+#define INTC_ICDISPR11_H2XIC1_ERRINT            (0x40000000uL)
+#define INTC_ICDISPR11_X2HPERI1_ERRINT          (0x80000000uL)
+
+#define INTC_ICDISPR12_X2HPERI2_ERRINT          (0x00000001uL)
+#define INTC_ICDISPR12_X2HPERI34_ERRINT         (0x00000002uL)
+#define INTC_ICDISPR12_X2HPERI5_ERRINT          (0x00000004uL)
+#define INTC_ICDISPR12_X2HPERI67_ERRINT         (0x00000008uL)
+#define INTC_ICDISPR12_X2HDBGR_ERRINT           (0x00000010uL)
+#define INTC_ICDISPR12_X2HBSC_ERRINT            (0x00000020uL)
+#define INTC_ICDISPR12_X2HSPI1_ERRINT           (0x00000040uL)
+#define INTC_ICDISPR12_X2HSPI2_ERRINT           (0x00000080uL)
+#define INTC_ICDISPR12_PRRI                     (0x00000100uL)
+#define INTC_ICDISPR12_IFEI0                    (0x00000200uL)
+#define INTC_ICDISPR12_OFFI0                    (0x00000400uL)
+#define INTC_ICDISPR12_PFVEI0                   (0x00000800uL)
+#define INTC_ICDISPR12_IFEI1                    (0x00001000uL)
+#define INTC_ICDISPR12_OFFI1                    (0x00002000uL)
+#define INTC_ICDISPR12_PFVEI1                   (0x00004000uL)
+
+#define INTC_ICDISPR13_TINT0                    (0x00000001uL)
+#define INTC_ICDISPR13_TINT1                    (0x00000002uL)
+#define INTC_ICDISPR13_TINT2                    (0x00000004uL)
+#define INTC_ICDISPR13_TINT3                    (0x00000008uL)
+#define INTC_ICDISPR13_TINT4                    (0x00000010uL)
+#define INTC_ICDISPR13_TINT5                    (0x00000020uL)
+#define INTC_ICDISPR13_TINT6                    (0x00000040uL)
+#define INTC_ICDISPR13_TINT7                    (0x00000080uL)
+#define INTC_ICDISPR13_TINT8                    (0x00000100uL)
+#define INTC_ICDISPR13_TINT9                    (0x00000200uL)
+#define INTC_ICDISPR13_TINT10                   (0x00000400uL)
+#define INTC_ICDISPR13_TINT11                   (0x00000800uL)
+#define INTC_ICDISPR13_TINT12                   (0x00001000uL)
+#define INTC_ICDISPR13_TINT13                   (0x00002000uL)
+#define INTC_ICDISPR13_TINT14                   (0x00004000uL)
+#define INTC_ICDISPR13_TINT15                   (0x00008000uL)
+#define INTC_ICDISPR13_TINT16                   (0x00010000uL)
+#define INTC_ICDISPR13_TINT17                   (0x00020000uL)
+#define INTC_ICDISPR13_TINT18                   (0x00040000uL)
+#define INTC_ICDISPR13_TINT19                   (0x00080000uL)
+#define INTC_ICDISPR13_TINT20                   (0x00100000uL)
+#define INTC_ICDISPR13_TINT21                   (0x00200000uL)
+#define INTC_ICDISPR13_TINT22                   (0x00400000uL)
+#define INTC_ICDISPR13_TINT23                   (0x00800000uL)
+#define INTC_ICDISPR13_TINT24                   (0x01000000uL)
+#define INTC_ICDISPR13_TINT25                   (0x02000000uL)
+#define INTC_ICDISPR13_TINT26                   (0x04000000uL)
+#define INTC_ICDISPR13_TINT27                   (0x08000000uL)
+#define INTC_ICDISPR13_TINT28                   (0x10000000uL)
+#define INTC_ICDISPR13_TINT29                   (0x20000000uL)
+#define INTC_ICDISPR13_TINT30                   (0x40000000uL)
+#define INTC_ICDISPR13_TINT31                   (0x80000000uL)
+
+#define INTC_ICDISPR14_TINT32                   (0x00000001uL)
+#define INTC_ICDISPR14_TINT33                   (0x00000002uL)
+#define INTC_ICDISPR14_TINT34                   (0x00000004uL)
+#define INTC_ICDISPR14_TINT35                   (0x00000008uL)
+#define INTC_ICDISPR14_TINT36                   (0x00000010uL)
+#define INTC_ICDISPR14_TINT37                   (0x00000020uL)
+#define INTC_ICDISPR14_TINT38                   (0x00000040uL)
+#define INTC_ICDISPR14_TINT39                   (0x00000080uL)
+#define INTC_ICDISPR14_TINT40                   (0x00000100uL)
+#define INTC_ICDISPR14_TINT41                   (0x00000200uL)
+#define INTC_ICDISPR14_TINT42                   (0x00000400uL)
+#define INTC_ICDISPR14_TINT43                   (0x00000800uL)
+#define INTC_ICDISPR14_TINT44                   (0x00001000uL)
+#define INTC_ICDISPR14_TINT45                   (0x00002000uL)
+#define INTC_ICDISPR14_TINT46                   (0x00004000uL)
+#define INTC_ICDISPR14_TINT47                   (0x00008000uL)
+#define INTC_ICDISPR14_TINT48                   (0x00010000uL)
+#define INTC_ICDISPR14_TINT49                   (0x00020000uL)
+#define INTC_ICDISPR14_TINT50                   (0x00040000uL)
+#define INTC_ICDISPR14_TINT51                   (0x00080000uL)
+#define INTC_ICDISPR14_TINT52                   (0x00100000uL)
+#define INTC_ICDISPR14_TINT53                   (0x00200000uL)
+#define INTC_ICDISPR14_TINT54                   (0x00400000uL)
+#define INTC_ICDISPR14_TINT55                   (0x00800000uL)
+#define INTC_ICDISPR14_TINT56                   (0x01000000uL)
+#define INTC_ICDISPR14_TINT57                   (0x02000000uL)
+#define INTC_ICDISPR14_TINT58                   (0x04000000uL)
+#define INTC_ICDISPR14_TINT59                   (0x08000000uL)
+#define INTC_ICDISPR14_TINT60                   (0x10000000uL)
+#define INTC_ICDISPR14_TINT61                   (0x20000000uL)
+#define INTC_ICDISPR14_TINT62                   (0x40000000uL)
+#define INTC_ICDISPR14_TINT63                   (0x80000000uL)
+
+#define INTC_ICDISPR15_TINT64                   (0x00000001uL)
+#define INTC_ICDISPR15_TINT65                   (0x00000002uL)
+#define INTC_ICDISPR15_TINT66                   (0x00000004uL)
+#define INTC_ICDISPR15_TINT67                   (0x00000008uL)
+#define INTC_ICDISPR15_TINT68                   (0x00000010uL)
+#define INTC_ICDISPR15_TINT69                   (0x00000020uL)
+#define INTC_ICDISPR15_TINT70                   (0x00000040uL)
+#define INTC_ICDISPR15_TINT71                   (0x00000080uL)
+#define INTC_ICDISPR15_TINT72                   (0x00000100uL)
+#define INTC_ICDISPR15_TINT73                   (0x00000200uL)
+#define INTC_ICDISPR15_TINT74                   (0x00000400uL)
+#define INTC_ICDISPR15_TINT75                   (0x00000800uL)
+#define INTC_ICDISPR15_TINT76                   (0x00001000uL)
+#define INTC_ICDISPR15_TINT77                   (0x00002000uL)
+#define INTC_ICDISPR15_TINT78                   (0x00004000uL)
+#define INTC_ICDISPR15_TINT79                   (0x00008000uL)
+#define INTC_ICDISPR15_TINT80                   (0x00010000uL)
+#define INTC_ICDISPR15_TINT81                   (0x00020000uL)
+#define INTC_ICDISPR15_TINT82                   (0x00040000uL)
+#define INTC_ICDISPR15_TINT83                   (0x00080000uL)
+#define INTC_ICDISPR15_TINT84                   (0x00100000uL)
+#define INTC_ICDISPR15_TINT85                   (0x00200000uL)
+#define INTC_ICDISPR15_TINT86                   (0x00400000uL)
+#define INTC_ICDISPR15_TINT87                   (0x00800000uL)
+#define INTC_ICDISPR15_TINT88                   (0x01000000uL)
+#define INTC_ICDISPR15_TINT89                   (0x02000000uL)
+#define INTC_ICDISPR15_TINT90                   (0x04000000uL)
+#define INTC_ICDISPR15_TINT91                   (0x08000000uL)
+#define INTC_ICDISPR15_TINT92                   (0x10000000uL)
+#define INTC_ICDISPR15_TINT93                   (0x20000000uL)
+#define INTC_ICDISPR15_TINT94                   (0x40000000uL)
+#define INTC_ICDISPR15_TINT95                   (0x80000000uL)
+
+#define INTC_ICDISPR16_TINT96                   (0x00000001uL)
+#define INTC_ICDISPR16_TINT97                   (0x00000002uL)
+#define INTC_ICDISPR16_TINT98                   (0x00000004uL)
+#define INTC_ICDISPR16_TINT99                   (0x00000008uL)
+#define INTC_ICDISPR16_TINT100                  (0x00000010uL)
+#define INTC_ICDISPR16_TINT101                  (0x00000020uL)
+#define INTC_ICDISPR16_TINT102                  (0x00000040uL)
+#define INTC_ICDISPR16_TINT103                  (0x00000080uL)
+#define INTC_ICDISPR16_TINT104                  (0x00000100uL)
+#define INTC_ICDISPR16_TINT105                  (0x00000200uL)
+#define INTC_ICDISPR16_TINT106                  (0x00000400uL)
+#define INTC_ICDISPR16_TINT107                  (0x00000800uL)
+#define INTC_ICDISPR16_TINT108                  (0x00001000uL)
+#define INTC_ICDISPR16_TINT109                  (0x00002000uL)
+#define INTC_ICDISPR16_TINT110                  (0x00004000uL)
+#define INTC_ICDISPR16_TINT111                  (0x00008000uL)
+#define INTC_ICDISPR16_TINT112                  (0x00010000uL)
+#define INTC_ICDISPR16_TINT113                  (0x00020000uL)
+#define INTC_ICDISPR16_TINT114                  (0x00040000uL)
+#define INTC_ICDISPR16_TINT115                  (0x00080000uL)
+#define INTC_ICDISPR16_TINT116                  (0x00100000uL)
+#define INTC_ICDISPR16_TINT117                  (0x00200000uL)
+#define INTC_ICDISPR16_TINT118                  (0x00400000uL)
+#define INTC_ICDISPR16_TINT119                  (0x00800000uL)
+#define INTC_ICDISPR16_TINT120                  (0x01000000uL)
+#define INTC_ICDISPR16_TINT121                  (0x02000000uL)
+#define INTC_ICDISPR16_TINT122                  (0x04000000uL)
+#define INTC_ICDISPR16_TINT123                  (0x08000000uL)
+#define INTC_ICDISPR16_TINT124                  (0x10000000uL)
+#define INTC_ICDISPR16_TINT125                  (0x20000000uL)
+#define INTC_ICDISPR16_TINT126                  (0x40000000uL)
+#define INTC_ICDISPR16_TINT127                  (0x80000000uL)
+
+#define INTC_ICDISPR17_TINT128                  (0x00000001uL)
+#define INTC_ICDISPR17_TINT129                  (0x00000002uL)
+#define INTC_ICDISPR17_TINT130                  (0x00000004uL)
+#define INTC_ICDISPR17_TINT131                  (0x00000008uL)
+#define INTC_ICDISPR17_TINT132                  (0x00000010uL)
+#define INTC_ICDISPR17_TINT133                  (0x00000020uL)
+#define INTC_ICDISPR17_TINT134                  (0x00000040uL)
+#define INTC_ICDISPR17_TINT135                  (0x00000080uL)
+#define INTC_ICDISPR17_TINT136                  (0x00000100uL)
+#define INTC_ICDISPR17_TINT137                  (0x00000200uL)
+#define INTC_ICDISPR17_TINT138                  (0x00000400uL)
+#define INTC_ICDISPR17_TINT139                  (0x00000800uL)
+#define INTC_ICDISPR17_TINT140                  (0x00001000uL)
+#define INTC_ICDISPR17_TINT141                  (0x00002000uL)
+#define INTC_ICDISPR17_TINT142                  (0x00004000uL)
+#define INTC_ICDISPR17_TINT143                  (0x00008000uL)
+#define INTC_ICDISPR17_TINT144                  (0x00010000uL)
+#define INTC_ICDISPR17_TINT145                  (0x00020000uL)
+#define INTC_ICDISPR17_TINT146                  (0x00040000uL)
+#define INTC_ICDISPR17_TINT147                  (0x00080000uL)
+#define INTC_ICDISPR17_TINT148                  (0x00100000uL)
+#define INTC_ICDISPR17_TINT149                  (0x00200000uL)
+#define INTC_ICDISPR17_TINT150                  (0x00400000uL)
+#define INTC_ICDISPR17_TINT151                  (0x00800000uL)
+#define INTC_ICDISPR17_TINT152                  (0x01000000uL)
+#define INTC_ICDISPR17_TINT153                  (0x02000000uL)
+#define INTC_ICDISPR17_TINT154                  (0x04000000uL)
+#define INTC_ICDISPR17_TINT155                  (0x08000000uL)
+#define INTC_ICDISPR17_TINT156                  (0x10000000uL)
+#define INTC_ICDISPR17_TINT157                  (0x20000000uL)
+#define INTC_ICDISPR17_TINT158                  (0x40000000uL)
+#define INTC_ICDISPR17_TINT159                  (0x80000000uL)
+
+#define INTC_ICDISPR18_TINT160                  (0x00000001uL)
+#define INTC_ICDISPR18_TINT161                  (0x00000002uL)
+#define INTC_ICDISPR18_TINT162                  (0x00000004uL)
+#define INTC_ICDISPR18_TINT163                  (0x00000008uL)
+#define INTC_ICDISPR18_TINT164                  (0x00000010uL)
+#define INTC_ICDISPR18_TINT165                  (0x00000020uL)
+#define INTC_ICDISPR18_TINT166                  (0x00000040uL)
+#define INTC_ICDISPR18_TINT167                  (0x00000080uL)
+#define INTC_ICDISPR18_TINT168                  (0x00000100uL)
+#define INTC_ICDISPR18_TINT169                  (0x00000200uL)
+#define INTC_ICDISPR18_TINT170                  (0x00000400uL)
+
+#define INTC_ICDICPR0_SW0                       (0x00000001uL)
+#define INTC_ICDICPR0_SW1                       (0x00000002uL)
+#define INTC_ICDICPR0_SW2                       (0x00000004uL)
+#define INTC_ICDICPR0_SW3                       (0x00000008uL)
+#define INTC_ICDICPR0_SW4                       (0x00000010uL)
+#define INTC_ICDICPR0_SW5                       (0x00000020uL)
+#define INTC_ICDICPR0_SW6                       (0x00000040uL)
+#define INTC_ICDICPR0_SW7                       (0x00000080uL)
+#define INTC_ICDICPR0_SW8                       (0x00000100uL)
+#define INTC_ICDICPR0_SW9                       (0x00000200uL)
+#define INTC_ICDICPR0_SW10                      (0x00000400uL)
+#define INTC_ICDICPR0_SW11                      (0x00000800uL)
+#define INTC_ICDICPR0_SW12                      (0x00001000uL)
+#define INTC_ICDICPR0_SW13                      (0x00002000uL)
+#define INTC_ICDICPR0_SW14                      (0x00004000uL)
+#define INTC_ICDICPR0_SW15                      (0x00008000uL)
+#define INTC_ICDICPR0_PMUIRQ0                   (0x00010000uL)
+#define INTC_ICDICPR0_COMMRX0                   (0x00020000uL)
+#define INTC_ICDICPR0_COMMTX0                   (0x00040000uL)
+#define INTC_ICDICPR0_CTIIRQ0                   (0x00080000uL)
+
+#define INTC_ICDICPR1_IRQ0                      (0x00000001uL)
+#define INTC_ICDICPR1_IRQ1                      (0x00000002uL)
+#define INTC_ICDICPR1_IRQ2                      (0x00000004uL)
+#define INTC_ICDICPR1_IRQ3                      (0x00000008uL)
+#define INTC_ICDICPR1_IRQ4                      (0x00000010uL)
+#define INTC_ICDICPR1_IRQ5                      (0x00000020uL)
+#define INTC_ICDICPR1_IRQ6                      (0x00000040uL)
+#define INTC_ICDICPR1_IRQ7                      (0x00000080uL)
+#define INTC_ICDICPR1_PL310ERR                  (0x00000100uL)
+#define INTC_ICDICPR1_DMAINT0                   (0x00000200uL)
+#define INTC_ICDICPR1_DMAINT1                   (0x00000400uL)
+#define INTC_ICDICPR1_DMAINT2                   (0x00000800uL)
+#define INTC_ICDICPR1_DMAINT3                   (0x00001000uL)
+#define INTC_ICDICPR1_DMAINT4                   (0x00002000uL)
+#define INTC_ICDICPR1_DMAINT5                   (0x00004000uL)
+#define INTC_ICDICPR1_DMAINT6                   (0x00008000uL)
+#define INTC_ICDICPR1_DMAINT7                   (0x00010000uL)
+#define INTC_ICDICPR1_DMAINT8                   (0x00020000uL)
+#define INTC_ICDICPR1_DMAINT9                   (0x00040000uL)
+#define INTC_ICDICPR1_DMAINT10                  (0x00080000uL)
+#define INTC_ICDICPR1_DMAINT11                  (0x00100000uL)
+#define INTC_ICDICPR1_DMAINT12                  (0x00200000uL)
+#define INTC_ICDICPR1_DMAINT13                  (0x00400000uL)
+#define INTC_ICDICPR1_DMAINT14                  (0x00800000uL)
+#define INTC_ICDICPR1_DMAINT15                  (0x01000000uL)
+#define INTC_ICDICPR1_DMAERR                    (0x02000000uL)
+
+#define INTC_ICDICPR2_USBI0                     (0x00000200uL)
+#define INTC_ICDICPR2_USBI1                     (0x00000400uL)
+#define INTC_ICDICPR2_S0_VI_VSYNC0              (0x00000800uL)
+#define INTC_ICDICPR2_S0_LO_VSYNC0              (0x00001000uL)
+#define INTC_ICDICPR2_S0_VSYNCERR0              (0x00002000uL)
+#define INTC_ICDICPR2_GR3_VLINE0                (0x00004000uL)
+#define INTC_ICDICPR2_S0_VFIELD0                (0x00008000uL)
+#define INTC_ICDICPR2_IV1_VBUFERR0              (0x00010000uL)
+#define INTC_ICDICPR2_IV3_VBUFERR0              (0x00020000uL)
+#define INTC_ICDICPR2_IV5_VBUFERR0              (0x00040000uL)
+#define INTC_ICDICPR2_IV6_VBUFERR0              (0x00080000uL)
+#define INTC_ICDICPR2_S0_WLINE0                 (0x00100000uL)
+#define INTC_ICDICPR2_S1_VI_VSYNC0              (0x00200000uL)
+#define INTC_ICDICPR2_S1_LO_VSYNC0              (0x00400000uL)
+#define INTC_ICDICPR2_S1_VSYNCERR0              (0x00800000uL)
+#define INTC_ICDICPR2_S1_VFIELD0                (0x01000000uL)
+#define INTC_ICDICPR2_IV2_VBUFERR0              (0x02000000uL)
+#define INTC_ICDICPR2_IV4_VBUFERR0              (0x04000000uL)
+#define INTC_ICDICPR2_S1_WLINE0                 (0x08000000uL)
+#define INTC_ICDICPR2_OIR_VI_VSYNC0             (0x10000000uL)
+#define INTC_ICDICPR2_OIR_LO_VSYNC0             (0x20000000uL)
+#define INTC_ICDICPR2_OIR_VSYNCERR0             (0x40000000uL)
+#define INTC_ICDICPR2_OIR_VFIELD0               (0x80000000uL)
+
+#define INTC_ICDICPR3_IV7_VBUFERR0              (0x00000001uL)
+#define INTC_ICDICPR3_IV8_VBUFERR0              (0x00000002uL)
+#define INTC_ICDICPR3_S0_VI_VSYNC1              (0x00000008uL)
+#define INTC_ICDICPR3_S0_LO_VSYNC1              (0x00000010uL)
+#define INTC_ICDICPR3_S0_VSYNCERR1              (0x00000020uL)
+#define INTC_ICDICPR3_GR3_VLINE1                (0x00000040uL)
+#define INTC_ICDICPR3_S0_VFIELD1                (0x00000080uL)
+#define INTC_ICDICPR3_IV1_VBUFERR1              (0x00000100uL)
+#define INTC_ICDICPR3_IV3_VBUFERR1              (0x00000200uL)
+#define INTC_ICDICPR3_IV5_VBUFERR1              (0x00000400uL)
+#define INTC_ICDICPR3_IV6_VBUFERR1              (0x00000800uL)
+#define INTC_ICDICPR3_S0_WLINE1                 (0x00001000uL)
+#define INTC_ICDICPR3_S1_VI_VSYNC1              (0x00002000uL)
+#define INTC_ICDICPR3_S1_LO_VSYNC1              (0x00004000uL)
+#define INTC_ICDICPR3_S1_VSYNCERR1              (0x00008000uL)
+#define INTC_ICDICPR3_S1_VFIELD1                (0x00010000uL)
+#define INTC_ICDICPR3_IV2_VBUFERR1              (0x00020000uL)
+#define INTC_ICDICPR3_IV4_VBUFERR1              (0x00040000uL)
+#define INTC_ICDICPR3_S1_WLINE1                 (0x00080000uL)
+#define INTC_ICDICPR3_OIR_VI_VSYNC1             (0x00100000uL)
+#define INTC_ICDICPR3_OIR_LO_VSYNC1             (0x00200000uL)
+#define INTC_ICDICPR3_OIR_VLINE1                (0x00400000uL)
+#define INTC_ICDICPR3_OIR_VFIELD1               (0x00800000uL)
+#define INTC_ICDICPR3_IV7_VBUFERR1              (0x01000000uL)
+#define INTC_ICDICPR3_IV8_VBUFERR1              (0x02000000uL)
+#define INTC_ICDICPR3_IMRDI                     (0x08000000uL)
+#define INTC_ICDICPR3_IMR2I0                    (0x10000000uL)
+#define INTC_ICDICPR3_IMR2I1                    (0x20000000uL)
+#define INTC_ICDICPR3_JEDI                      (0x40000000uL)
+#define INTC_ICDICPR3_JDTI                      (0x80000000uL)
+
+#define INTC_ICDICPR4_CMP0                      (0x00000001uL)
+#define INTC_ICDICPR4_CMP1                      (0x00000002uL)
+#define INTC_ICDICPR4_INT0                      (0x00000004uL)
+#define INTC_ICDICPR4_INT1                      (0x00000008uL)
+#define INTC_ICDICPR4_INT2                      (0x00000010uL)
+#define INTC_ICDICPR4_INT3                      (0x00000020uL)
+#define INTC_ICDICPR4_OSTM0TINT                 (0x00000040uL)
+#define INTC_ICDICPR4_OSTM1TINT                 (0x00000080uL)
+#define INTC_ICDICPR4_CMI                       (0x00000100uL)
+#define INTC_ICDICPR4_WTOUT                     (0x00000200uL)
+#define INTC_ICDICPR4_ITI                       (0x00000400uL)
+#define INTC_ICDICPR4_TGI0A                     (0x00000800uL)
+#define INTC_ICDICPR4_TGI0B                     (0x00001000uL)
+#define INTC_ICDICPR4_TGI0C                     (0x00002000uL)
+#define INTC_ICDICPR4_TGI0D                     (0x00004000uL)
+#define INTC_ICDICPR4_TGI0V                     (0x00008000uL)
+#define INTC_ICDICPR4_TGI0E                     (0x00010000uL)
+#define INTC_ICDICPR4_TGI0F                     (0x00020000uL)
+#define INTC_ICDICPR4_TGI1A                     (0x00040000uL)
+#define INTC_ICDICPR4_TGI1B                     (0x00080000uL)
+#define INTC_ICDICPR4_TGI1V                     (0x00100000uL)
+#define INTC_ICDICPR4_TGI1U                     (0x00200000uL)
+#define INTC_ICDICPR4_TGI2A                     (0x00400000uL)
+#define INTC_ICDICPR4_TGI2B                     (0x00800000uL)
+#define INTC_ICDICPR4_TGI2V                     (0x01000000uL)
+#define INTC_ICDICPR4_TGI2U                     (0x02000000uL)
+#define INTC_ICDICPR4_TGI3A                     (0x04000000uL)
+#define INTC_ICDICPR4_TGI3B                     (0x08000000uL)
+#define INTC_ICDICPR4_TGI3C                     (0x10000000uL)
+#define INTC_ICDICPR4_TGI3D                     (0x20000000uL)
+#define INTC_ICDICPR4_TGI3V                     (0x40000000uL)
+#define INTC_ICDICPR4_TGI4A                     (0x80000000uL)
+
+#define INTC_ICDICPR5_TGI4B                     (0x00000001uL)
+#define INTC_ICDICPR5_TGI4C                     (0x00000002uL)
+#define INTC_ICDICPR5_TGI4D                     (0x00000004uL)
+#define INTC_ICDICPR5_TGI4V                     (0x00000008uL)
+#define INTC_ICDICPR5_CMI1                      (0x00000010uL)
+#define INTC_ICDICPR5_CMI2                      (0x00000020uL)
+#define INTC_ICDICPR5_SGDEI0                    (0x00000040uL)
+#define INTC_ICDICPR5_SGDEI1                    (0x00000080uL)
+#define INTC_ICDICPR5_SGDEI2                    (0x00000100uL)
+#define INTC_ICDICPR5_SGDEI3                    (0x00000200uL)
+#define INTC_ICDICPR5_ADI                       (0x00000400uL)
+#define INTC_ICDICPR5_LMTI                      (0x00000800uL)
+#define INTC_ICDICPR5_SSII0                     (0x00001000uL)
+#define INTC_ICDICPR5_SSIRXI0                   (0x00002000uL)
+#define INTC_ICDICPR5_SSITXI0                   (0x00004000uL)
+#define INTC_ICDICPR5_SSII1                     (0x00008000uL)
+#define INTC_ICDICPR5_SSIRXI1                   (0x00010000uL)
+#define INTC_ICDICPR5_SSITXI1                   (0x00020000uL)
+#define INTC_ICDICPR5_SSII2                     (0x00040000uL)
+#define INTC_ICDICPR5_SSIRTI2                   (0x00080000uL)
+#define INTC_ICDICPR5_SSII3                     (0x00100000uL)
+#define INTC_ICDICPR5_SSIRXI3                   (0x00200000uL)
+#define INTC_ICDICPR5_SSITXI3                   (0x00400000uL)
+#define INTC_ICDICPR5_SSII4                     (0x00800000uL)
+#define INTC_ICDICPR5_SSIRTI4                   (0x01000000uL)
+#define INTC_ICDICPR5_SSII5                     (0x02000000uL)
+#define INTC_ICDICPR5_SSIRXI5                   (0x04000000uL)
+#define INTC_ICDICPR5_SSITXI5                   (0x08000000uL)
+#define INTC_ICDICPR5_SPDIFI                    (0x10000000uL)
+#define INTC_ICDICPR5_INTIICTEI0                (0x20000000uL)
+#define INTC_ICDICPR5_INTIICRI0                 (0x40000000uL)
+#define INTC_ICDICPR5_INTIICTI0                 (0x80000000uL)
+
+#define INTC_ICDICPR6_INTIICSPI0                (0x00000001uL)
+#define INTC_ICDICPR6_INTIICSTI0                (0x00000002uL)
+#define INTC_ICDICPR6_INTIICNAKI0               (0x00000004uL)
+#define INTC_ICDICPR6_INTIICALI0                (0x00000008uL)
+#define INTC_ICDICPR6_INTIICTMOI0               (0x00000010uL)
+#define INTC_ICDICPR6_INTIICTEI1                (0x00000020uL)
+#define INTC_ICDICPR6_INTIICRI1                 (0x00000040uL)
+#define INTC_ICDICPR6_INTIICTI1                 (0x00000080uL)
+#define INTC_ICDICPR6_INTIICSPI1                (0x00000100uL)
+#define INTC_ICDICPR6_INTIICSTI1                (0x00000200uL)
+#define INTC_ICDICPR6_INTIICNAKI1               (0x00000400uL)
+#define INTC_ICDICPR6_INTIICALI1                (0x00000800uL)
+#define INTC_ICDICPR6_INTIICTMOI1               (0x00001000uL)
+#define INTC_ICDICPR6_INTIICTEI2                (0x00002000uL)
+#define INTC_ICDICPR6_INTIICRI2                 (0x00004000uL)
+#define INTC_ICDICPR6_INTIICTI2                 (0x00008000uL)
+#define INTC_ICDICPR6_INTIICSPI2                (0x00010000uL)
+#define INTC_ICDICPR6_INTIICSTI2                (0x00020000uL)
+#define INTC_ICDICPR6_INTIICNAKI2               (0x00040000uL)
+#define INTC_ICDICPR6_INTIICALI2                (0x00080000uL)
+#define INTC_ICDICPR6_INTIICTMOI2               (0x00100000uL)
+#define INTC_ICDICPR6_INTIICTEI3                (0x00200000uL)
+#define INTC_ICDICPR6_INTIICRI3                 (0x00400000uL)
+#define INTC_ICDICPR6_INTIICTI3                 (0x00800000uL)
+#define INTC_ICDICPR6_INTIICSPI3                (0x01000000uL)
+#define INTC_ICDICPR6_INTIICSTI3                (0x02000000uL)
+#define INTC_ICDICPR6_INTIICNAKI3               (0x04000000uL)
+#define INTC_ICDICPR6_INTIICALI3                (0x08000000uL)
+#define INTC_ICDICPR6_INTIICTMOI3               (0x10000000uL)
+#define INTC_ICDICPR6_BRI0                      (0x20000000uL)
+#define INTC_ICDICPR6_ERI0                      (0x40000000uL)
+#define INTC_ICDICPR6_RXI0                      (0x80000000uL)
+
+#define INTC_ICDICPR7_TXI0                      (0x00000001uL)
+#define INTC_ICDICPR7_BRI1                      (0x00000002uL)
+#define INTC_ICDICPR7_ERI1                      (0x00000004uL)
+#define INTC_ICDICPR7_RXI1                      (0x00000008uL)
+#define INTC_ICDICPR7_TXI1                      (0x00000010uL)
+#define INTC_ICDICPR7_BRI2                      (0x00000020uL)
+#define INTC_ICDICPR7_ERI2                      (0x00000040uL)
+#define INTC_ICDICPR7_RXI2                      (0x00000080uL)
+#define INTC_ICDICPR7_TXI2                      (0x00000100uL)
+#define INTC_ICDICPR7_BRI3                      (0x00000200uL)
+#define INTC_ICDICPR7_ERI3                      (0x00000400uL)
+#define INTC_ICDICPR7_RXI3                      (0x00000800uL)
+#define INTC_ICDICPR7_TXI3                      (0x00001000uL)
+#define INTC_ICDICPR7_BRI4                      (0x00002000uL)
+#define INTC_ICDICPR7_ERI4                      (0x00004000uL)
+#define INTC_ICDICPR7_RXI4                      (0x00008000uL)
+#define INTC_ICDICPR7_TXI4                      (0x00010000uL)
+#define INTC_ICDICPR7_BRI5                      (0x00020000uL)
+#define INTC_ICDICPR7_ERI5                      (0x00040000uL)
+#define INTC_ICDICPR7_RXI5                      (0x00080000uL)
+#define INTC_ICDICPR7_TXI5                      (0x00100000uL)
+#define INTC_ICDICPR7_BRI6                      (0x00200000uL)
+#define INTC_ICDICPR7_ERI6                      (0x00400000uL)
+#define INTC_ICDICPR7_RXI6                      (0x00800000uL)
+#define INTC_ICDICPR7_TXI6                      (0x01000000uL)
+#define INTC_ICDICPR7_BRI7                      (0x02000000uL)
+#define INTC_ICDICPR7_ERI7                      (0x04000000uL)
+#define INTC_ICDICPR7_RXI7                      (0x08000000uL)
+#define INTC_ICDICPR7_TXI7                      (0x10000000uL)
+#define INTC_ICDICPR7_INTRCANGERR               (0x20000000uL)
+#define INTC_ICDICPR7_INTRCANGRECC              (0x40000000uL)
+#define INTC_ICDICPR7_INTRCAN0REC               (0x80000000uL)
+
+#define INTC_ICDICPR8_INTRCAN0ERR               (0x00000001uL)
+#define INTC_ICDICPR8_INTRCAN0TRX               (0x00000002uL)
+#define INTC_ICDICPR8_INTRCAN1REC               (0x00000004uL)
+#define INTC_ICDICPR8_INTRCAN1ERR               (0x00000008uL)
+#define INTC_ICDICPR8_INTRCAN1TRX               (0x00000010uL)
+#define INTC_ICDICPR8_INTRCAN2REC               (0x00000020uL)
+#define INTC_ICDICPR8_INTRCAN2ERR               (0x00000040uL)
+#define INTC_ICDICPR8_INTRCAN2TRX               (0x00000080uL)
+#define INTC_ICDICPR8_INTRCAN3REC               (0x00000100uL)
+#define INTC_ICDICPR8_INTRCAN3ERR               (0x00000200uL)
+#define INTC_ICDICPR8_INTRCAN3TRX               (0x00000400uL)
+#define INTC_ICDICPR8_INTRCAN4REC               (0x00000800uL)
+#define INTC_ICDICPR8_INTRCAN4ERR               (0x00001000uL)
+#define INTC_ICDICPR8_INTRCAN4TRX               (0x00002000uL)
+#define INTC_ICDICPR8_SPEI0                     (0x00004000uL)
+#define INTC_ICDICPR8_SPRI0                     (0x00008000uL)
+#define INTC_ICDICPR8_SPTI0                     (0x00010000uL)
+#define INTC_ICDICPR8_SPEI1                     (0x00020000uL)
+#define INTC_ICDICPR8_SPRI1                     (0x00040000uL)
+#define INTC_ICDICPR8_SPTI1                     (0x00080000uL)
+#define INTC_ICDICPR8_SPEI2                     (0x00100000uL)
+#define INTC_ICDICPR8_SPRI2                     (0x00200000uL)
+#define INTC_ICDICPR8_SPTI2                     (0x00400000uL)
+#define INTC_ICDICPR8_SPEI3                     (0x00800000uL)
+#define INTC_ICDICPR8_SPRI3                     (0x01000000uL)
+#define INTC_ICDICPR8_SPTI3                     (0x02000000uL)
+#define INTC_ICDICPR8_SPEI4                     (0x04000000uL)
+#define INTC_ICDICPR8_SPRI4                     (0x08000000uL)
+#define INTC_ICDICPR8_SPTI4                     (0x10000000uL)
+#define INTC_ICDICPR8_IEBBTD                    (0x20000000uL)
+#define INTC_ICDICPR8_IEBBTERR                  (0x40000000uL)
+#define INTC_ICDICPR8_IEBBTSTA                  (0x80000000uL)
+
+#define INTC_ICDICPR9_IEBBTV                    (0x00000001uL)
+#define INTC_ICDICPR9_ISY                       (0x00000002uL)
+#define INTC_ICDICPR9_IERR                      (0x00000004uL)
+#define INTC_ICDICPR9_ITARG                     (0x00000008uL)
+#define INTC_ICDICPR9_ISEC                      (0x00000010uL)
+#define INTC_ICDICPR9_IBUF                      (0x00000020uL)
+#define INTC_ICDICPR9_IREADY                    (0x00000040uL)
+#define INTC_ICDICPR9_FLSTE                     (0x00000080uL)
+#define INTC_ICDICPR9_FLTENDI                   (0x00000100uL)
+#define INTC_ICDICPR9_FLTREQ0I                  (0x00000200uL)
+#define INTC_ICDICPR9_FLTREQ1I                  (0x00000400uL)
+#define INTC_ICDICPR9_MMC0                      (0x00000800uL)
+#define INTC_ICDICPR9_MMC1                      (0x00001000uL)
+#define INTC_ICDICPR9_MMC2                      (0x00002000uL)
+#define INTC_ICDICPR9_SDHI0_3                   (0x00004000uL)
+#define INTC_ICDICPR9_SDHI0_0                   (0x00008000uL)
+#define INTC_ICDICPR9_SDHI0_1                   (0x00010000uL)
+#define INTC_ICDICPR9_SDHI1_3                   (0x00020000uL)
+#define INTC_ICDICPR9_SDHI1_0                   (0x00040000uL)
+#define INTC_ICDICPR9_SDHI1_1                   (0x00080000uL)
+#define INTC_ICDICPR9_ARM                       (0x00100000uL)
+#define INTC_ICDICPR9_PRD                       (0x00200000uL)
+#define INTC_ICDICPR9_CUP                       (0x00400000uL)
+#define INTC_ICDICPR9_SCUAI0                    (0x00800000uL)
+#define INTC_ICDICPR9_SCUAI1                    (0x01000000uL)
+#define INTC_ICDICPR9_SCUFDI0                   (0x02000000uL)
+#define INTC_ICDICPR9_SCUFDI1                   (0x04000000uL)
+#define INTC_ICDICPR9_SCUFDI2                   (0x08000000uL)
+#define INTC_ICDICPR9_SCUFDI3                   (0x10000000uL)
+#define INTC_ICDICPR9_SCUFUI0                   (0x20000000uL)
+#define INTC_ICDICPR9_SCUFUI1                   (0x40000000uL)
+#define INTC_ICDICPR9_SCUFUI2                   (0x80000000uL)
+
+#define INTC_ICDICPR10_SCUFUI3                  (0x00000001uL)
+#define INTC_ICDICPR10_SCUDVI0                  (0x00000002uL)
+#define INTC_ICDICPR10_SCUDVI1                  (0x00000004uL)
+#define INTC_ICDICPR10_SCUDVI2                  (0x00000008uL)
+#define INTC_ICDICPR10_SCUDVI3                  (0x00000010uL)
+#define INTC_ICDICPR10_MLB_CINT                 (0x00000020uL)
+#define INTC_ICDICPR10_MLB_SINT                 (0x00000040uL)
+#define INTC_ICDICPR10_DRC0                     (0x00000080uL)
+#define INTC_ICDICPR10_DRC1                     (0x00000100uL)
+#define INTC_ICDICPR10_LINI0_INT_T              (0x00000800uL)
+#define INTC_ICDICPR10_LINI0_INT_R              (0x00001000uL)
+#define INTC_ICDICPR10_LINI0_INT_S              (0x00002000uL)
+#define INTC_ICDICPR10_LINI0_INT_M              (0x00004000uL)
+#define INTC_ICDICPR10_LINI1_INT_T              (0x00008000uL)
+#define INTC_ICDICPR10_LINI1_INT_R              (0x00010000uL)
+#define INTC_ICDICPR10_LINI1_INT_S              (0x00020000uL)
+#define INTC_ICDICPR10_LINI1_INT_M              (0x00040000uL)
+#define INTC_ICDICPR10_ERI0                     (0x08000000uL)
+#define INTC_ICDICPR10_RXI0                     (0x10000000uL)
+#define INTC_ICDICPR10_TXI0                     (0x20000000uL)
+#define INTC_ICDICPR10_TEI0                     (0x40000000uL)
+#define INTC_ICDICPR10_ERI1                     (0x80000000uL)
+
+#define INTC_ICDICPR11_RXI1                     (0x00000001uL)
+#define INTC_ICDICPR11_TXI1                     (0x00000002uL)
+#define INTC_ICDICPR11_TEI1                     (0x00000004uL)
+#define INTC_ICDICPR11_AVBI_DATA                (0x00000008uL)
+#define INTC_ICDICPR11_AVBI_ERROR               (0x00000010uL)
+#define INTC_ICDICPR11_AVBI_MANAGE              (0x00000020uL)
+#define INTC_ICDICPR11_AVBI_MAC                 (0x00000040uL)
+#define INTC_ICDICPR11_ETHERI                   (0x00000080uL)
+#define INTC_ICDICPR11_CEUI                     (0x00001000uL)
+#define INTC_ICDICPR11_H2XMLB_ERRINT            (0x20000000uL)
+#define INTC_ICDICPR11_H2XIC1_ERRINT            (0x40000000uL)
+#define INTC_ICDICPR11_X2HPERI1_ERRINT          (0x80000000uL)
+
+#define INTC_ICDICPR12_X2HPERI2_ERRINT          (0x00000001uL)
+#define INTC_ICDICPR12_X2HPERI34_ERRINT         (0x00000002uL)
+#define INTC_ICDICPR12_X2HPERI5_ERRINT          (0x00000004uL)
+#define INTC_ICDICPR12_X2HPERI67_ERRINT         (0x00000008uL)
+#define INTC_ICDICPR12_X2HDBGR_ERRINT           (0x00000010uL)
+#define INTC_ICDICPR12_X2HBSC_ERRINT            (0x00000020uL)
+#define INTC_ICDICPR12_X2HSPI1_ERRINT           (0x00000040uL)
+#define INTC_ICDICPR12_X2HSPI2_ERRINT           (0x00000080uL)
+#define INTC_ICDICPR12_PRRI                     (0x00000100uL)
+#define INTC_ICDICPR12_IFEI0                    (0x00000200uL)
+#define INTC_ICDICPR12_OFFI0                    (0x00000400uL)
+#define INTC_ICDICPR12_PFVEI0                   (0x00000800uL)
+#define INTC_ICDICPR12_IFEI1                    (0x00001000uL)
+#define INTC_ICDICPR12_OFFI1                    (0x00002000uL)
+#define INTC_ICDICPR12_PFVEI1                   (0x00004000uL)
+
+#define INTC_ICDICPR13_TINT0                    (0x00000001uL)
+#define INTC_ICDICPR13_TINT1                    (0x00000002uL)
+#define INTC_ICDICPR13_TINT2                    (0x00000004uL)
+#define INTC_ICDICPR13_TINT3                    (0x00000008uL)
+#define INTC_ICDICPR13_TINT4                    (0x00000010uL)
+#define INTC_ICDICPR13_TINT5                    (0x00000020uL)
+#define INTC_ICDICPR13_TINT6                    (0x00000040uL)
+#define INTC_ICDICPR13_TINT7                    (0x00000080uL)
+#define INTC_ICDICPR13_TINT8                    (0x00000100uL)
+#define INTC_ICDICPR13_TINT9                    (0x00000200uL)
+#define INTC_ICDICPR13_TINT10                   (0x00000400uL)
+#define INTC_ICDICPR13_TINT11                   (0x00000800uL)
+#define INTC_ICDICPR13_TINT12                   (0x00001000uL)
+#define INTC_ICDICPR13_TINT13                   (0x00002000uL)
+#define INTC_ICDICPR13_TINT14                   (0x00004000uL)
+#define INTC_ICDICPR13_TINT15                   (0x00008000uL)
+#define INTC_ICDICPR13_TINT16                   (0x00010000uL)
+#define INTC_ICDICPR13_TINT17                   (0x00020000uL)
+#define INTC_ICDICPR13_TINT18                   (0x00040000uL)
+#define INTC_ICDICPR13_TINT19                   (0x00080000uL)
+#define INTC_ICDICPR13_TINT20                   (0x00100000uL)
+#define INTC_ICDICPR13_TINT21                   (0x00200000uL)
+#define INTC_ICDICPR13_TINT22                   (0x00400000uL)
+#define INTC_ICDICPR13_TINT23                   (0x00800000uL)
+#define INTC_ICDICPR13_TINT24                   (0x01000000uL)
+#define INTC_ICDICPR13_TINT25                   (0x02000000uL)
+#define INTC_ICDICPR13_TINT26                   (0x04000000uL)
+#define INTC_ICDICPR13_TINT27                   (0x08000000uL)
+#define INTC_ICDICPR13_TINT28                   (0x10000000uL)
+#define INTC_ICDICPR13_TINT29                   (0x20000000uL)
+#define INTC_ICDICPR13_TINT30                   (0x40000000uL)
+#define INTC_ICDICPR13_TINT31                   (0x80000000uL)
+
+#define INTC_ICDICPR14_TINT32                   (0x00000001uL)
+#define INTC_ICDICPR14_TINT33                   (0x00000002uL)
+#define INTC_ICDICPR14_TINT34                   (0x00000004uL)
+#define INTC_ICDICPR14_TINT35                   (0x00000008uL)
+#define INTC_ICDICPR14_TINT36                   (0x00000010uL)
+#define INTC_ICDICPR14_TINT37                   (0x00000020uL)
+#define INTC_ICDICPR14_TINT38                   (0x00000040uL)
+#define INTC_ICDICPR14_TINT39                   (0x00000080uL)
+#define INTC_ICDICPR14_TINT40                   (0x00000100uL)
+#define INTC_ICDICPR14_TINT41                   (0x00000200uL)
+#define INTC_ICDICPR14_TINT42                   (0x00000400uL)
+#define INTC_ICDICPR14_TINT43                   (0x00000800uL)
+#define INTC_ICDICPR14_TINT44                   (0x00001000uL)
+#define INTC_ICDICPR14_TINT45                   (0x00002000uL)
+#define INTC_ICDICPR14_TINT46                   (0x00004000uL)
+#define INTC_ICDICPR14_TINT47                   (0x00008000uL)
+#define INTC_ICDICPR14_TINT48                   (0x00010000uL)
+#define INTC_ICDICPR14_TINT49                   (0x00020000uL)
+#define INTC_ICDICPR14_TINT50                   (0x00040000uL)
+#define INTC_ICDICPR14_TINT51                   (0x00080000uL)
+#define INTC_ICDICPR14_TINT52                   (0x00100000uL)
+#define INTC_ICDICPR14_TINT53                   (0x00200000uL)
+#define INTC_ICDICPR14_TINT54                   (0x00400000uL)
+#define INTC_ICDICPR14_TINT55                   (0x00800000uL)
+#define INTC_ICDICPR14_TINT56                   (0x01000000uL)
+#define INTC_ICDICPR14_TINT57                   (0x02000000uL)
+#define INTC_ICDICPR14_TINT58                   (0x04000000uL)
+#define INTC_ICDICPR14_TINT59                   (0x08000000uL)
+#define INTC_ICDICPR14_TINT60                   (0x10000000uL)
+#define INTC_ICDICPR14_TINT61                   (0x20000000uL)
+#define INTC_ICDICPR14_TINT62                   (0x40000000uL)
+#define INTC_ICDICPR14_TINT63                   (0x80000000uL)
+
+#define INTC_ICDICPR15_TINT64                   (0x00000001uL)
+#define INTC_ICDICPR15_TINT65                   (0x00000002uL)
+#define INTC_ICDICPR15_TINT66                   (0x00000004uL)
+#define INTC_ICDICPR15_TINT67                   (0x00000008uL)
+#define INTC_ICDICPR15_TINT68                   (0x00000010uL)
+#define INTC_ICDICPR15_TINT69                   (0x00000020uL)
+#define INTC_ICDICPR15_TINT70                   (0x00000040uL)
+#define INTC_ICDICPR15_TINT71                   (0x00000080uL)
+#define INTC_ICDICPR15_TINT72                   (0x00000100uL)
+#define INTC_ICDICPR15_TINT73                   (0x00000200uL)
+#define INTC_ICDICPR15_TINT74                   (0x00000400uL)
+#define INTC_ICDICPR15_TINT75                   (0x00000800uL)
+#define INTC_ICDICPR15_TINT76                   (0x00001000uL)
+#define INTC_ICDICPR15_TINT77                   (0x00002000uL)
+#define INTC_ICDICPR15_TINT78                   (0x00004000uL)
+#define INTC_ICDICPR15_TINT79                   (0x00008000uL)
+#define INTC_ICDICPR15_TINT80                   (0x00010000uL)
+#define INTC_ICDICPR15_TINT81                   (0x00020000uL)
+#define INTC_ICDICPR15_TINT82                   (0x00040000uL)
+#define INTC_ICDICPR15_TINT83                   (0x00080000uL)
+#define INTC_ICDICPR15_TINT84                   (0x00100000uL)
+#define INTC_ICDICPR15_TINT85                   (0x00200000uL)
+#define INTC_ICDICPR15_TINT86                   (0x00400000uL)
+#define INTC_ICDICPR15_TINT87                   (0x00800000uL)
+#define INTC_ICDICPR15_TINT88                   (0x01000000uL)
+#define INTC_ICDICPR15_TINT89                   (0x02000000uL)
+#define INTC_ICDICPR15_TINT90                   (0x04000000uL)
+#define INTC_ICDICPR15_TINT91                   (0x08000000uL)
+#define INTC_ICDICPR15_TINT92                   (0x10000000uL)
+#define INTC_ICDICPR15_TINT93                   (0x20000000uL)
+#define INTC_ICDICPR15_TINT94                   (0x40000000uL)
+#define INTC_ICDICPR15_TINT95                   (0x80000000uL)
+
+#define INTC_ICDICPR16_TINT96                   (0x00000001uL)
+#define INTC_ICDICPR16_TINT97                   (0x00000002uL)
+#define INTC_ICDICPR16_TINT98                   (0x00000004uL)
+#define INTC_ICDICPR16_TINT99                   (0x00000008uL)
+#define INTC_ICDICPR16_TINT100                  (0x00000010uL)
+#define INTC_ICDICPR16_TINT101                  (0x00000020uL)
+#define INTC_ICDICPR16_TINT102                  (0x00000040uL)
+#define INTC_ICDICPR16_TINT103                  (0x00000080uL)
+#define INTC_ICDICPR16_TINT104                  (0x00000100uL)
+#define INTC_ICDICPR16_TINT105                  (0x00000200uL)
+#define INTC_ICDICPR16_TINT106                  (0x00000400uL)
+#define INTC_ICDICPR16_TINT107                  (0x00000800uL)
+#define INTC_ICDICPR16_TINT108                  (0x00001000uL)
+#define INTC_ICDICPR16_TINT109                  (0x00002000uL)
+#define INTC_ICDICPR16_TINT110                  (0x00004000uL)
+#define INTC_ICDICPR16_TINT111                  (0x00008000uL)
+#define INTC_ICDICPR16_TINT112                  (0x00010000uL)
+#define INTC_ICDICPR16_TINT113                  (0x00020000uL)
+#define INTC_ICDICPR16_TINT114                  (0x00040000uL)
+#define INTC_ICDICPR16_TINT115                  (0x00080000uL)
+#define INTC_ICDICPR16_TINT116                  (0x00100000uL)
+#define INTC_ICDICPR16_TINT117                  (0x00200000uL)
+#define INTC_ICDICPR16_TINT118                  (0x00400000uL)
+#define INTC_ICDICPR16_TINT119                  (0x00800000uL)
+#define INTC_ICDICPR16_TINT120                  (0x01000000uL)
+#define INTC_ICDICPR16_TINT121                  (0x02000000uL)
+#define INTC_ICDICPR16_TINT122                  (0x04000000uL)
+#define INTC_ICDICPR16_TINT123                  (0x08000000uL)
+#define INTC_ICDICPR16_TINT124                  (0x10000000uL)
+#define INTC_ICDICPR16_TINT125                  (0x20000000uL)
+#define INTC_ICDICPR16_TINT126                  (0x40000000uL)
+#define INTC_ICDICPR16_TINT127                  (0x80000000uL)
+
+#define INTC_ICDICPR17_TINT128                  (0x00000001uL)
+#define INTC_ICDICPR17_TINT129                  (0x00000002uL)
+#define INTC_ICDICPR17_TINT130                  (0x00000004uL)
+#define INTC_ICDICPR17_TINT131                  (0x00000008uL)
+#define INTC_ICDICPR17_TINT132                  (0x00000010uL)
+#define INTC_ICDICPR17_TINT133                  (0x00000020uL)
+#define INTC_ICDICPR17_TINT134                  (0x00000040uL)
+#define INTC_ICDICPR17_TINT135                  (0x00000080uL)
+#define INTC_ICDICPR17_TINT136                  (0x00000100uL)
+#define INTC_ICDICPR17_TINT137                  (0x00000200uL)
+#define INTC_ICDICPR17_TINT138                  (0x00000400uL)
+#define INTC_ICDICPR17_TINT139                  (0x00000800uL)
+#define INTC_ICDICPR17_TINT140                  (0x00001000uL)
+#define INTC_ICDICPR17_TINT141                  (0x00002000uL)
+#define INTC_ICDICPR17_TINT142                  (0x00004000uL)
+#define INTC_ICDICPR17_TINT143                  (0x00008000uL)
+#define INTC_ICDICPR17_TINT144                  (0x00010000uL)
+#define INTC_ICDICPR17_TINT145                  (0x00020000uL)
+#define INTC_ICDICPR17_TINT146                  (0x00040000uL)
+#define INTC_ICDICPR17_TINT147                  (0x00080000uL)
+#define INTC_ICDICPR17_TINT148                  (0x00100000uL)
+#define INTC_ICDICPR17_TINT149                  (0x00200000uL)
+#define INTC_ICDICPR17_TINT150                  (0x00400000uL)
+#define INTC_ICDICPR17_TINT151                  (0x00800000uL)
+#define INTC_ICDICPR17_TINT152                  (0x01000000uL)
+#define INTC_ICDICPR17_TINT153                  (0x02000000uL)
+#define INTC_ICDICPR17_TINT154                  (0x04000000uL)
+#define INTC_ICDICPR17_TINT155                  (0x08000000uL)
+#define INTC_ICDICPR17_TINT156                  (0x10000000uL)
+#define INTC_ICDICPR17_TINT157                  (0x20000000uL)
+#define INTC_ICDICPR17_TINT158                  (0x40000000uL)
+#define INTC_ICDICPR17_TINT159                  (0x80000000uL)
+
+#define INTC_ICDICPR18_TINT160                  (0x00000001uL)
+#define INTC_ICDICPR18_TINT161                  (0x00000002uL)
+#define INTC_ICDICPR18_TINT162                  (0x00000004uL)
+#define INTC_ICDICPR18_TINT163                  (0x00000008uL)
+#define INTC_ICDICPR18_TINT164                  (0x00000010uL)
+#define INTC_ICDICPR18_TINT165                  (0x00000020uL)
+#define INTC_ICDICPR18_TINT166                  (0x00000040uL)
+#define INTC_ICDICPR18_TINT167                  (0x00000080uL)
+#define INTC_ICDICPR18_TINT168                  (0x00000100uL)
+#define INTC_ICDICPR18_TINT169                  (0x00000200uL)
+#define INTC_ICDICPR18_TINT170                  (0x00000400uL)
+
+#define INTC_ICDABR0_SW0                        (0x00000001uL)
+#define INTC_ICDABR0_SW1                        (0x00000002uL)
+#define INTC_ICDABR0_SW2                        (0x00000004uL)
+#define INTC_ICDABR0_SW3                        (0x00000008uL)
+#define INTC_ICDABR0_SW4                        (0x00000010uL)
+#define INTC_ICDABR0_SW5                        (0x00000020uL)
+#define INTC_ICDABR0_SW6                        (0x00000040uL)
+#define INTC_ICDABR0_SW7                        (0x00000080uL)
+#define INTC_ICDABR0_SW8                        (0x00000100uL)
+#define INTC_ICDABR0_SW9                        (0x00000200uL)
+#define INTC_ICDABR0_SW10                       (0x00000400uL)
+#define INTC_ICDABR0_SW11                       (0x00000800uL)
+#define INTC_ICDABR0_SW12                       (0x00001000uL)
+#define INTC_ICDABR0_SW13                       (0x00002000uL)
+#define INTC_ICDABR0_SW14                       (0x00004000uL)
+#define INTC_ICDABR0_SW15                       (0x00008000uL)
+#define INTC_ICDABR0_PMUIRQ0                    (0x00010000uL)
+#define INTC_ICDABR0_COMMRX0                    (0x00020000uL)
+#define INTC_ICDABR0_COMMTX0                    (0x00040000uL)
+#define INTC_ICDABR0_CTIIRQ0                    (0x00080000uL)
+
+#define INTC_ICDABR1_IRQ0                       (0x00000001uL)
+#define INTC_ICDABR1_IRQ1                       (0x00000002uL)
+#define INTC_ICDABR1_IRQ2                       (0x00000004uL)
+#define INTC_ICDABR1_IRQ3                       (0x00000008uL)
+#define INTC_ICDABR1_IRQ4                       (0x00000010uL)
+#define INTC_ICDABR1_IRQ5                       (0x00000020uL)
+#define INTC_ICDABR1_IRQ6                       (0x00000040uL)
+#define INTC_ICDABR1_IRQ7                       (0x00000080uL)
+#define INTC_ICDABR1_PL310ERR                   (0x00000100uL)
+#define INTC_ICDABR1_DMAINT0                    (0x00000200uL)
+#define INTC_ICDABR1_DMAINT1                    (0x00000400uL)
+#define INTC_ICDABR1_DMAINT2                    (0x00000800uL)
+#define INTC_ICDABR1_DMAINT3                    (0x00001000uL)
+#define INTC_ICDABR1_DMAINT4                    (0x00002000uL)
+#define INTC_ICDABR1_DMAINT5                    (0x00004000uL)
+#define INTC_ICDABR1_DMAINT6                    (0x00008000uL)
+#define INTC_ICDABR1_DMAINT7                    (0x00010000uL)
+#define INTC_ICDABR1_DMAINT8                    (0x00020000uL)
+#define INTC_ICDABR1_DMAINT9                    (0x00040000uL)
+#define INTC_ICDABR1_DMAINT10                   (0x00080000uL)
+#define INTC_ICDABR1_DMAINT11                   (0x00100000uL)
+#define INTC_ICDABR1_DMAINT12                   (0x00200000uL)
+#define INTC_ICDABR1_DMAINT13                   (0x00400000uL)
+#define INTC_ICDABR1_DMAINT14                   (0x00800000uL)
+#define INTC_ICDABR1_DMAINT15                   (0x01000000uL)
+#define INTC_ICDABR1_DMAERR                     (0x02000000uL)
+
+#define INTC_ICDABR2_USBI0                      (0x00000200uL)
+#define INTC_ICDABR2_USBI1                      (0x00000400uL)
+#define INTC_ICDABR2_S0_VI_VSYNC0               (0x00000800uL)
+#define INTC_ICDABR2_S0_LO_VSYNC0               (0x00001000uL)
+#define INTC_ICDABR2_S0_VSYNCERR0               (0x00002000uL)
+#define INTC_ICDABR2_GR3_VLINE0                 (0x00004000uL)
+#define INTC_ICDABR2_S0_VFIELD0                 (0x00008000uL)
+#define INTC_ICDABR2_IV1_VBUFERR0               (0x00010000uL)
+#define INTC_ICDABR2_IV3_VBUFERR0               (0x00020000uL)
+#define INTC_ICDABR2_IV5_VBUFERR0               (0x00040000uL)
+#define INTC_ICDABR2_IV6_VBUFERR0               (0x00080000uL)
+#define INTC_ICDABR2_S0_WLINE0                  (0x00100000uL)
+#define INTC_ICDABR2_S1_VI_VSYNC0               (0x00200000uL)
+#define INTC_ICDABR2_S1_LO_VSYNC0               (0x00400000uL)
+#define INTC_ICDABR2_S1_VSYNCERR0               (0x00800000uL)
+#define INTC_ICDABR2_S1_VFIELD0                 (0x01000000uL)
+#define INTC_ICDABR2_IV2_VBUFERR0               (0x02000000uL)
+#define INTC_ICDABR2_IV4_VBUFERR0               (0x04000000uL)
+#define INTC_ICDABR2_S1_WLINE0                  (0x08000000uL)
+#define INTC_ICDABR2_OIR_VI_VSYNC0              (0x10000000uL)
+#define INTC_ICDABR2_OIR_LO_VSYNC0              (0x20000000uL)
+#define INTC_ICDABR2_OIR_VSYNCERR0              (0x40000000uL)
+#define INTC_ICDABR2_OIR_VFIELD0                (0x80000000uL)
+
+#define INTC_ICDABR3_IV7_VBUFERR0               (0x00000001uL)
+#define INTC_ICDABR3_IV8_VBUFERR0               (0x00000002uL)
+#define INTC_ICDABR3_S0_VI_VSYNC1               (0x00000008uL)
+#define INTC_ICDABR3_S0_LO_VSYNC1               (0x00000010uL)
+#define INTC_ICDABR3_S0_VSYNCERR1               (0x00000020uL)
+#define INTC_ICDABR3_GR3_VLINE1                 (0x00000040uL)
+#define INTC_ICDABR3_S0_VFIELD1                 (0x00000080uL)
+#define INTC_ICDABR3_IV1_VBUFERR1               (0x00000100uL)
+#define INTC_ICDABR3_IV3_VBUFERR1               (0x00000200uL)
+#define INTC_ICDABR3_IV5_VBUFERR1               (0x00000400uL)
+#define INTC_ICDABR3_IV6_VBUFERR1               (0x00000800uL)
+#define INTC_ICDABR3_S0_WLINE1                  (0x00001000uL)
+#define INTC_ICDABR3_S1_VI_VSYNC1               (0x00002000uL)
+#define INTC_ICDABR3_S1_LO_VSYNC1               (0x00004000uL)
+#define INTC_ICDABR3_S1_VSYNCERR1               (0x00008000uL)
+#define INTC_ICDABR3_S1_VFIELD1                 (0x00010000uL)
+#define INTC_ICDABR3_IV2_VBUFERR1               (0x00020000uL)
+#define INTC_ICDABR3_IV4_VBUFERR1               (0x00040000uL)
+#define INTC_ICDABR3_S1_WLINE1                  (0x00080000uL)
+#define INTC_ICDABR3_OIR_VI_VSYNC1              (0x00100000uL)
+#define INTC_ICDABR3_OIR_LO_VSYNC1              (0x00200000uL)
+#define INTC_ICDABR3_OIR_VLINE1                 (0x00400000uL)
+#define INTC_ICDABR3_OIR_VFIELD1                (0x00800000uL)
+#define INTC_ICDABR3_IV7_VBUFERR1               (0x01000000uL)
+#define INTC_ICDABR3_IV8_VBUFERR1               (0x02000000uL)
+#define INTC_ICDABR3_IMRDI                      (0x08000000uL)
+#define INTC_ICDABR3_IMR2I0                     (0x10000000uL)
+#define INTC_ICDABR3_IMR2I1                     (0x20000000uL)
+#define INTC_ICDABR3_JEDI                       (0x40000000uL)
+#define INTC_ICDABR3_JDTI                       (0x80000000uL)
+
+#define INTC_ICDABR4_CMP0                       (0x00000001uL)
+#define INTC_ICDABR4_CMP1                       (0x00000002uL)
+#define INTC_ICDABR4_INT0                       (0x00000004uL)
+#define INTC_ICDABR4_INT1                       (0x00000008uL)
+#define INTC_ICDABR4_INT2                       (0x00000010uL)
+#define INTC_ICDABR4_INT3                       (0x00000020uL)
+#define INTC_ICDABR4_OSTM0TINT                  (0x00000040uL)
+#define INTC_ICDABR4_OSTM1TINT                  (0x00000080uL)
+#define INTC_ICDABR4_CMI                        (0x00000100uL)
+#define INTC_ICDABR4_WTOUT                      (0x00000200uL)
+#define INTC_ICDABR4_ITI                        (0x00000400uL)
+#define INTC_ICDABR4_TGI0A                      (0x00000800uL)
+#define INTC_ICDABR4_TGI0B                      (0x00001000uL)
+#define INTC_ICDABR4_TGI0C                      (0x00002000uL)
+#define INTC_ICDABR4_TGI0D                      (0x00004000uL)
+#define INTC_ICDABR4_TGI0V                      (0x00008000uL)
+#define INTC_ICDABR4_TGI0E                      (0x00010000uL)
+#define INTC_ICDABR4_TGI0F                      (0x00020000uL)
+#define INTC_ICDABR4_TGI1A                      (0x00040000uL)
+#define INTC_ICDABR4_TGI1B                      (0x00080000uL)
+#define INTC_ICDABR4_TGI1V                      (0x00100000uL)
+#define INTC_ICDABR4_TGI1U                      (0x00200000uL)
+#define INTC_ICDABR4_TGI2A                      (0x00400000uL)
+#define INTC_ICDABR4_TGI2B                      (0x00800000uL)
+#define INTC_ICDABR4_TGI2V                      (0x01000000uL)
+#define INTC_ICDABR4_TGI2U                      (0x02000000uL)
+#define INTC_ICDABR4_TGI3A                      (0x04000000uL)
+#define INTC_ICDABR4_TGI3B                      (0x08000000uL)
+#define INTC_ICDABR4_TGI3C                      (0x10000000uL)
+#define INTC_ICDABR4_TGI3D                      (0x20000000uL)
+#define INTC_ICDABR4_TGI3V                      (0x40000000uL)
+#define INTC_ICDABR4_TGI4A                      (0x80000000uL)
+
+#define INTC_ICDABR5_TGI4B                      (0x00000001uL)
+#define INTC_ICDABR5_TGI4C                      (0x00000002uL)
+#define INTC_ICDABR5_TGI4D                      (0x00000004uL)
+#define INTC_ICDABR5_TGI4V                      (0x00000008uL)
+#define INTC_ICDABR5_CMI1                       (0x00000010uL)
+#define INTC_ICDABR5_CMI2                       (0x00000020uL)
+#define INTC_ICDABR5_SGDEI0                     (0x00000040uL)
+#define INTC_ICDABR5_SGDEI1                     (0x00000080uL)
+#define INTC_ICDABR5_SGDEI2                     (0x00000100uL)
+#define INTC_ICDABR5_SGDEI3                     (0x00000200uL)
+#define INTC_ICDABR5_ADI                        (0x00000400uL)
+#define INTC_ICDABR5_LMTI                       (0x00000800uL)
+#define INTC_ICDABR5_SSII0                      (0x00001000uL)
+#define INTC_ICDABR5_SSIRXI0                    (0x00002000uL)
+#define INTC_ICDABR5_SSITXI0                    (0x00004000uL)
+#define INTC_ICDABR5_SSII1                      (0x00008000uL)
+#define INTC_ICDABR5_SSIRXI1                    (0x00010000uL)
+#define INTC_ICDABR5_SSITXI1                    (0x00020000uL)
+#define INTC_ICDABR5_SSII2                      (0x00040000uL)
+#define INTC_ICDABR5_SSIRTI2                    (0x00080000uL)
+#define INTC_ICDABR5_SSII3                      (0x00100000uL)
+#define INTC_ICDABR5_SSIRXI3                    (0x00200000uL)
+#define INTC_ICDABR5_SSITXI3                    (0x00400000uL)
+#define INTC_ICDABR5_SSII4                      (0x00800000uL)
+#define INTC_ICDABR5_SSIRTI4                    (0x01000000uL)
+#define INTC_ICDABR5_SSII5                      (0x02000000uL)
+#define INTC_ICDABR5_SSIRXI5                    (0x04000000uL)
+#define INTC_ICDABR5_SSITXI5                    (0x08000000uL)
+#define INTC_ICDABR5_SPDIFI                     (0x10000000uL)
+#define INTC_ICDABR5_INTIICTEI0                 (0x20000000uL)
+#define INTC_ICDABR5_INTIICRI0                  (0x40000000uL)
+#define INTC_ICDABR5_INTIICTI0                  (0x80000000uL)
+
+#define INTC_ICDABR6_INTIICSPI0                 (0x00000001uL)
+#define INTC_ICDABR6_INTIICSTI0                 (0x00000002uL)
+#define INTC_ICDABR6_INTIICNAKI0                (0x00000004uL)
+#define INTC_ICDABR6_INTIICALI0                 (0x00000008uL)
+#define INTC_ICDABR6_INTIICTMOI0                (0x00000010uL)
+#define INTC_ICDABR6_INTIICTEI1                 (0x00000020uL)
+#define INTC_ICDABR6_INTIICRI1                  (0x00000040uL)
+#define INTC_ICDABR6_INTIICTI1                  (0x00000080uL)
+#define INTC_ICDABR6_INTIICSPI1                 (0x00000100uL)
+#define INTC_ICDABR6_INTIICSTI1                 (0x00000200uL)
+#define INTC_ICDABR6_INTIICNAKI1                (0x00000400uL)
+#define INTC_ICDABR6_INTIICALI1                 (0x00000800uL)
+#define INTC_ICDABR6_INTIICTMOI1                (0x00001000uL)
+#define INTC_ICDABR6_INTIICTEI2                 (0x00002000uL)
+#define INTC_ICDABR6_INTIICRI2                  (0x00004000uL)
+#define INTC_ICDABR6_INTIICTI2                  (0x00008000uL)
+#define INTC_ICDABR6_INTIICSPI2                 (0x00010000uL)
+#define INTC_ICDABR6_INTIICSTI2                 (0x00020000uL)
+#define INTC_ICDABR6_INTIICNAKI2                (0x00040000uL)
+#define INTC_ICDABR6_INTIICALI2                 (0x00080000uL)
+#define INTC_ICDABR6_INTIICTMOI2                (0x00100000uL)
+#define INTC_ICDABR6_INTIICTEI3                 (0x00200000uL)
+#define INTC_ICDABR6_INTIICRI3                  (0x00400000uL)
+#define INTC_ICDABR6_INTIICTI3                  (0x00800000uL)
+#define INTC_ICDABR6_INTIICSPI3                 (0x01000000uL)
+#define INTC_ICDABR6_INTIICSTI3                 (0x02000000uL)
+#define INTC_ICDABR6_INTIICNAKI3                (0x04000000uL)
+#define INTC_ICDABR6_INTIICALI3                 (0x08000000uL)
+#define INTC_ICDABR6_INTIICTMOI3                (0x10000000uL)
+#define INTC_ICDABR6_BRI0                       (0x20000000uL)
+#define INTC_ICDABR6_ERI0                       (0x40000000uL)
+#define INTC_ICDABR6_RXI0                       (0x80000000uL)
+
+#define INTC_ICDABR7_TXI0                       (0x00000001uL)
+#define INTC_ICDABR7_BRI1                       (0x00000002uL)
+#define INTC_ICDABR7_ERI1                       (0x00000004uL)
+#define INTC_ICDABR7_RXI1                       (0x00000008uL)
+#define INTC_ICDABR7_TXI1                       (0x00000010uL)
+#define INTC_ICDABR7_BRI2                       (0x00000020uL)
+#define INTC_ICDABR7_ERI2                       (0x00000040uL)
+#define INTC_ICDABR7_RXI2                       (0x00000080uL)
+#define INTC_ICDABR7_TXI2                       (0x00000100uL)
+#define INTC_ICDABR7_BRI3                       (0x00000200uL)
+#define INTC_ICDABR7_ERI3                       (0x00000400uL)
+#define INTC_ICDABR7_RXI3                       (0x00000800uL)
+#define INTC_ICDABR7_TXI3                       (0x00001000uL)
+#define INTC_ICDABR7_BRI4                       (0x00002000uL)
+#define INTC_ICDABR7_ERI4                       (0x00004000uL)
+#define INTC_ICDABR7_RXI4                       (0x00008000uL)
+#define INTC_ICDABR7_TXI4                       (0x00010000uL)
+#define INTC_ICDABR7_BRI5                       (0x00020000uL)
+#define INTC_ICDABR7_ERI5                       (0x00040000uL)
+#define INTC_ICDABR7_RXI5                       (0x00080000uL)
+#define INTC_ICDABR7_TXI5                       (0x00100000uL)
+#define INTC_ICDABR7_BRI6                       (0x00200000uL)
+#define INTC_ICDABR7_ERI6                       (0x00400000uL)
+#define INTC_ICDABR7_RXI6                       (0x00800000uL)
+#define INTC_ICDABR7_TXI6                       (0x01000000uL)
+#define INTC_ICDABR7_BRI7                       (0x02000000uL)
+#define INTC_ICDABR7_ERI7                       (0x04000000uL)
+#define INTC_ICDABR7_RXI7                       (0x08000000uL)
+#define INTC_ICDABR7_TXI7                       (0x10000000uL)
+#define INTC_ICDABR7_INTRCANGERR                (0x20000000uL)
+#define INTC_ICDABR7_INTRCANGRECC               (0x40000000uL)
+#define INTC_ICDABR7_INTRCAN0REC                (0x80000000uL)
+
+#define INTC_ICDABR8_INTRCAN0ERR                (0x00000001uL)
+#define INTC_ICDABR8_INTRCAN0TRX                (0x00000002uL)
+#define INTC_ICDABR8_INTRCAN1REC                (0x00000004uL)
+#define INTC_ICDABR8_INTRCAN1ERR                (0x00000008uL)
+#define INTC_ICDABR8_INTRCAN1TRX                (0x00000010uL)
+#define INTC_ICDABR8_INTRCAN2REC                (0x00000020uL)
+#define INTC_ICDABR8_INTRCAN2ERR                (0x00000040uL)
+#define INTC_ICDABR8_INTRCAN2TRX                (0x00000080uL)
+#define INTC_ICDABR8_INTRCAN3REC                (0x00000100uL)
+#define INTC_ICDABR8_INTRCAN3ERR                (0x00000200uL)
+#define INTC_ICDABR8_INTRCAN3TRX                (0x00000400uL)
+#define INTC_ICDABR8_INTRCAN4REC                (0x00000800uL)
+#define INTC_ICDABR8_INTRCAN4ERR                (0x00001000uL)
+#define INTC_ICDABR8_INTRCAN4TRX                (0x00002000uL)
+#define INTC_ICDABR8_SPEI0                      (0x00004000uL)
+#define INTC_ICDABR8_SPRI0                      (0x00008000uL)
+#define INTC_ICDABR8_SPTI0                      (0x00010000uL)
+#define INTC_ICDABR8_SPEI1                      (0x00020000uL)
+#define INTC_ICDABR8_SPRI1                      (0x00040000uL)
+#define INTC_ICDABR8_SPTI1                      (0x00080000uL)
+#define INTC_ICDABR8_SPEI2                      (0x00100000uL)
+#define INTC_ICDABR8_SPRI2                      (0x00200000uL)
+#define INTC_ICDABR8_SPTI2                      (0x00400000uL)
+#define INTC_ICDABR8_SPEI3                      (0x00800000uL)
+#define INTC_ICDABR8_SPRI3                      (0x01000000uL)
+#define INTC_ICDABR8_SPTI3                      (0x02000000uL)
+#define INTC_ICDABR8_SPEI4                      (0x04000000uL)
+#define INTC_ICDABR8_SPRI4                      (0x08000000uL)
+#define INTC_ICDABR8_SPTI4                      (0x10000000uL)
+#define INTC_ICDABR8_IEBBTD                     (0x20000000uL)
+#define INTC_ICDABR8_IEBBTERR                   (0x40000000uL)
+#define INTC_ICDABR8_IEBBTSTA                   (0x80000000uL)
+
+#define INTC_ICDABR9_IEBBTV                     (0x00000001uL)
+#define INTC_ICDABR9_ISY                        (0x00000002uL)
+#define INTC_ICDABR9_IERR                       (0x00000004uL)
+#define INTC_ICDABR9_ITARG                      (0x00000008uL)
+#define INTC_ICDABR9_ISEC                       (0x00000010uL)
+#define INTC_ICDABR9_IBUF                       (0x00000020uL)
+#define INTC_ICDABR9_IREADY                     (0x00000040uL)
+#define INTC_ICDABR9_FLSTE                      (0x00000080uL)
+#define INTC_ICDABR9_FLTENDI                    (0x00000100uL)
+#define INTC_ICDABR9_FLTREQ0I                   (0x00000200uL)
+#define INTC_ICDABR9_FLTREQ1I                   (0x00000400uL)
+#define INTC_ICDABR9_MMC0                       (0x00000800uL)
+#define INTC_ICDABR9_MMC1                       (0x00001000uL)
+#define INTC_ICDABR9_MMC2                       (0x00002000uL)
+#define INTC_ICDABR9_SDHI0_3                    (0x00004000uL)
+#define INTC_ICDABR9_SDHI0_0                    (0x00008000uL)
+#define INTC_ICDABR9_SDHI0_1                    (0x00010000uL)
+#define INTC_ICDABR9_SDHI1_3                    (0x00020000uL)
+#define INTC_ICDABR9_SDHI1_0                    (0x00040000uL)
+#define INTC_ICDABR9_SDHI1_1                    (0x00080000uL)
+#define INTC_ICDABR9_ARM                        (0x00100000uL)
+#define INTC_ICDABR9_PRD                        (0x00200000uL)
+#define INTC_ICDABR9_CUP                        (0x00400000uL)
+#define INTC_ICDABR9_SCUAI0                     (0x00800000uL)
+#define INTC_ICDABR9_SCUAI1                     (0x01000000uL)
+#define INTC_ICDABR9_SCUFDI0                    (0x02000000uL)
+#define INTC_ICDABR9_SCUFDI1                    (0x04000000uL)
+#define INTC_ICDABR9_SCUFDI2                    (0x08000000uL)
+#define INTC_ICDABR9_SCUFDI3                    (0x10000000uL)
+#define INTC_ICDABR9_SCUFUI0                    (0x20000000uL)
+#define INTC_ICDABR9_SCUFUI1                    (0x40000000uL)
+#define INTC_ICDABR9_SCUFUI2                    (0x80000000uL)
+
+#define INTC_ICDABR10_SCUFUI3                   (0x00000001uL)
+#define INTC_ICDABR10_SCUDVI0                   (0x00000002uL)
+#define INTC_ICDABR10_SCUDVI1                   (0x00000004uL)
+#define INTC_ICDABR10_SCUDVI2                   (0x00000008uL)
+#define INTC_ICDABR10_SCUDVI3                   (0x00000010uL)
+#define INTC_ICDABR10_MLB_CINT                  (0x00000020uL)
+#define INTC_ICDABR10_MLB_SINT                  (0x00000040uL)
+#define INTC_ICDABR10_DRC0                      (0x00000080uL)
+#define INTC_ICDABR10_DRC1                      (0x00000100uL)
+#define INTC_ICDABR10_LINI0_INT_T               (0x00000800uL)
+#define INTC_ICDABR10_LINI0_INT_R               (0x00001000uL)
+#define INTC_ICDABR10_LINI0_INT_S               (0x00002000uL)
+#define INTC_ICDABR10_LINI0_INT_M               (0x00004000uL)
+#define INTC_ICDABR10_LINI1_INT_T               (0x00008000uL)
+#define INTC_ICDABR10_LINI1_INT_R               (0x00010000uL)
+#define INTC_ICDABR10_LINI1_INT_S               (0x00020000uL)
+#define INTC_ICDABR10_LINI1_INT_M               (0x00040000uL)
+#define INTC_ICDABR10_ERI0                      (0x08000000uL)
+#define INTC_ICDABR10_RXI0                      (0x10000000uL)
+#define INTC_ICDABR10_TXI0                      (0x20000000uL)
+#define INTC_ICDABR10_TEI0                      (0x40000000uL)
+#define INTC_ICDABR10_ERI1                      (0x80000000uL)
+
+#define INTC_ICDABR11_RXI1                      (0x00000001uL)
+#define INTC_ICDABR11_TXI1                      (0x00000002uL)
+#define INTC_ICDABR11_TEI1                      (0x00000004uL)
+#define INTC_ICDABR11_AVBI_DATA                 (0x00000008uL)
+#define INTC_ICDABR11_AVBI_ERROR                (0x00000010uL)
+#define INTC_ICDABR11_AVBI_MANAGE               (0x00000020uL)
+#define INTC_ICDABR11_AVBI_MAC                  (0x00000040uL)
+#define INTC_ICDABR11_ETHERI                    (0x00000080uL)
+#define INTC_ICDABR11_CEUI                      (0x00001000uL)
+#define INTC_ICDABR11_H2XMLB_ERRINT             (0x20000000uL)
+#define INTC_ICDABR11_H2XIC1_ERRINT             (0x40000000uL)
+#define INTC_ICDABR11_X2HPERI1_ERRINT           (0x80000000uL)
+
+#define INTC_ICDABR12_X2HPERI2_ERRINT           (0x00000001uL)
+#define INTC_ICDABR12_X2HPERI34_ERRINT          (0x00000002uL)
+#define INTC_ICDABR12_X2HPERI5_ERRINT           (0x00000004uL)
+#define INTC_ICDABR12_X2HPERI67_ERRINT          (0x00000008uL)
+#define INTC_ICDABR12_X2HDBGR_ERRINT            (0x00000010uL)
+#define INTC_ICDABR12_X2HBSC_ERRINT             (0x00000020uL)
+#define INTC_ICDABR12_X2HSPI1_ERRINT            (0x00000040uL)
+#define INTC_ICDABR12_X2HSPI2_ERRINT            (0x00000080uL)
+#define INTC_ICDABR12_PRRI                      (0x00000100uL)
+#define INTC_ICDABR12_IFEI0                     (0x00000200uL)
+#define INTC_ICDABR12_OFFI0                     (0x00000400uL)
+#define INTC_ICDABR12_PFVEI0                    (0x00000800uL)
+#define INTC_ICDABR12_IFEI1                     (0x00001000uL)
+#define INTC_ICDABR12_OFFI1                     (0x00002000uL)
+#define INTC_ICDABR12_PFVEI1                    (0x00004000uL)
+
+#define INTC_ICDABR13_TINT0                     (0x00000001uL)
+#define INTC_ICDABR13_TINT1                     (0x00000002uL)
+#define INTC_ICDABR13_TINT2                     (0x00000004uL)
+#define INTC_ICDABR13_TINT3                     (0x00000008uL)
+#define INTC_ICDABR13_TINT4                     (0x00000010uL)
+#define INTC_ICDABR13_TINT5                     (0x00000020uL)
+#define INTC_ICDABR13_TINT6                     (0x00000040uL)
+#define INTC_ICDABR13_TINT7                     (0x00000080uL)
+#define INTC_ICDABR13_TINT8                     (0x00000100uL)
+#define INTC_ICDABR13_TINT9                     (0x00000200uL)
+#define INTC_ICDABR13_TINT10                    (0x00000400uL)
+#define INTC_ICDABR13_TINT11                    (0x00000800uL)
+#define INTC_ICDABR13_TINT12                    (0x00001000uL)
+#define INTC_ICDABR13_TINT13                    (0x00002000uL)
+#define INTC_ICDABR13_TINT14                    (0x00004000uL)
+#define INTC_ICDABR13_TINT15                    (0x00008000uL)
+#define INTC_ICDABR13_TINT16                    (0x00010000uL)
+#define INTC_ICDABR13_TINT17                    (0x00020000uL)
+#define INTC_ICDABR13_TINT18                    (0x00040000uL)
+#define INTC_ICDABR13_TINT19                    (0x00080000uL)
+#define INTC_ICDABR13_TINT20                    (0x00100000uL)
+#define INTC_ICDABR13_TINT21                    (0x00200000uL)
+#define INTC_ICDABR13_TINT22                    (0x00400000uL)
+#define INTC_ICDABR13_TINT23                    (0x00800000uL)
+#define INTC_ICDABR13_TINT24                    (0x01000000uL)
+#define INTC_ICDABR13_TINT25                    (0x02000000uL)
+#define INTC_ICDABR13_TINT26                    (0x04000000uL)
+#define INTC_ICDABR13_TINT27                    (0x08000000uL)
+#define INTC_ICDABR13_TINT28                    (0x10000000uL)
+#define INTC_ICDABR13_TINT29                    (0x20000000uL)
+#define INTC_ICDABR13_TINT30                    (0x40000000uL)
+#define INTC_ICDABR13_TINT31                    (0x80000000uL)
+
+#define INTC_ICDABR14_TINT32                    (0x00000001uL)
+#define INTC_ICDABR14_TINT33                    (0x00000002uL)
+#define INTC_ICDABR14_TINT34                    (0x00000004uL)
+#define INTC_ICDABR14_TINT35                    (0x00000008uL)
+#define INTC_ICDABR14_TINT36                    (0x00000010uL)
+#define INTC_ICDABR14_TINT37                    (0x00000020uL)
+#define INTC_ICDABR14_TINT38                    (0x00000040uL)
+#define INTC_ICDABR14_TINT39                    (0x00000080uL)
+#define INTC_ICDABR14_TINT40                    (0x00000100uL)
+#define INTC_ICDABR14_TINT41                    (0x00000200uL)
+#define INTC_ICDABR14_TINT42                    (0x00000400uL)
+#define INTC_ICDABR14_TINT43                    (0x00000800uL)
+#define INTC_ICDABR14_TINT44                    (0x00001000uL)
+#define INTC_ICDABR14_TINT45                    (0x00002000uL)
+#define INTC_ICDABR14_TINT46                    (0x00004000uL)
+#define INTC_ICDABR14_TINT47                    (0x00008000uL)
+#define INTC_ICDABR14_TINT48                    (0x00010000uL)
+#define INTC_ICDABR14_TINT49                    (0x00020000uL)
+#define INTC_ICDABR14_TINT50                    (0x00040000uL)
+#define INTC_ICDABR14_TINT51                    (0x00080000uL)
+#define INTC_ICDABR14_TINT52                    (0x00100000uL)
+#define INTC_ICDABR14_TINT53                    (0x00200000uL)
+#define INTC_ICDABR14_TINT54                    (0x00400000uL)
+#define INTC_ICDABR14_TINT55                    (0x00800000uL)
+#define INTC_ICDABR14_TINT56                    (0x01000000uL)
+#define INTC_ICDABR14_TINT57                    (0x02000000uL)
+#define INTC_ICDABR14_TINT58                    (0x04000000uL)
+#define INTC_ICDABR14_TINT59                    (0x08000000uL)
+#define INTC_ICDABR14_TINT60                    (0x10000000uL)
+#define INTC_ICDABR14_TINT61                    (0x20000000uL)
+#define INTC_ICDABR14_TINT62                    (0x40000000uL)
+#define INTC_ICDABR14_TINT63                    (0x80000000uL)
+
+#define INTC_ICDABR15_TINT64                    (0x00000001uL)
+#define INTC_ICDABR15_TINT65                    (0x00000002uL)
+#define INTC_ICDABR15_TINT66                    (0x00000004uL)
+#define INTC_ICDABR15_TINT67                    (0x00000008uL)
+#define INTC_ICDABR15_TINT68                    (0x00000010uL)
+#define INTC_ICDABR15_TINT69                    (0x00000020uL)
+#define INTC_ICDABR15_TINT70                    (0x00000040uL)
+#define INTC_ICDABR15_TINT71                    (0x00000080uL)
+#define INTC_ICDABR15_TINT72                    (0x00000100uL)
+#define INTC_ICDABR15_TINT73                    (0x00000200uL)
+#define INTC_ICDABR15_TINT74                    (0x00000400uL)
+#define INTC_ICDABR15_TINT75                    (0x00000800uL)
+#define INTC_ICDABR15_TINT76                    (0x00001000uL)
+#define INTC_ICDABR15_TINT77                    (0x00002000uL)
+#define INTC_ICDABR15_TINT78                    (0x00004000uL)
+#define INTC_ICDABR15_TINT79                    (0x00008000uL)
+#define INTC_ICDABR15_TINT80                    (0x00010000uL)
+#define INTC_ICDABR15_TINT81                    (0x00020000uL)
+#define INTC_ICDABR15_TINT82                    (0x00040000uL)
+#define INTC_ICDABR15_TINT83                    (0x00080000uL)
+#define INTC_ICDABR15_TINT84                    (0x00100000uL)
+#define INTC_ICDABR15_TINT85                    (0x00200000uL)
+#define INTC_ICDABR15_TINT86                    (0x00400000uL)
+#define INTC_ICDABR15_TINT87                    (0x00800000uL)
+#define INTC_ICDABR15_TINT88                    (0x01000000uL)
+#define INTC_ICDABR15_TINT89                    (0x02000000uL)
+#define INTC_ICDABR15_TINT90                    (0x04000000uL)
+#define INTC_ICDABR15_TINT91                    (0x08000000uL)
+#define INTC_ICDABR15_TINT92                    (0x10000000uL)
+#define INTC_ICDABR15_TINT93                    (0x20000000uL)
+#define INTC_ICDABR15_TINT94                    (0x40000000uL)
+#define INTC_ICDABR15_TINT95                    (0x80000000uL)
+
+#define INTC_ICDABR16_TINT96                    (0x00000001uL)
+#define INTC_ICDABR16_TINT97                    (0x00000002uL)
+#define INTC_ICDABR16_TINT98                    (0x00000004uL)
+#define INTC_ICDABR16_TINT99                    (0x00000008uL)
+#define INTC_ICDABR16_TINT100                   (0x00000010uL)
+#define INTC_ICDABR16_TINT101                   (0x00000020uL)
+#define INTC_ICDABR16_TINT102                   (0x00000040uL)
+#define INTC_ICDABR16_TINT103                   (0x00000080uL)
+#define INTC_ICDABR16_TINT104                   (0x00000100uL)
+#define INTC_ICDABR16_TINT105                   (0x00000200uL)
+#define INTC_ICDABR16_TINT106                   (0x00000400uL)
+#define INTC_ICDABR16_TINT107                   (0x00000800uL)
+#define INTC_ICDABR16_TINT108                   (0x00001000uL)
+#define INTC_ICDABR16_TINT109                   (0x00002000uL)
+#define INTC_ICDABR16_TINT110                   (0x00004000uL)
+#define INTC_ICDABR16_TINT111                   (0x00008000uL)
+#define INTC_ICDABR16_TINT112                   (0x00010000uL)
+#define INTC_ICDABR16_TINT113                   (0x00020000uL)
+#define INTC_ICDABR16_TINT114                   (0x00040000uL)
+#define INTC_ICDABR16_TINT115                   (0x00080000uL)
+#define INTC_ICDABR16_TINT116                   (0x00100000uL)
+#define INTC_ICDABR16_TINT117                   (0x00200000uL)
+#define INTC_ICDABR16_TINT118                   (0x00400000uL)
+#define INTC_ICDABR16_TINT119                   (0x00800000uL)
+#define INTC_ICDABR16_TINT120                   (0x01000000uL)
+#define INTC_ICDABR16_TINT121                   (0x02000000uL)
+#define INTC_ICDABR16_TINT122                   (0x04000000uL)
+#define INTC_ICDABR16_TINT123                   (0x08000000uL)
+#define INTC_ICDABR16_TINT124                   (0x10000000uL)
+#define INTC_ICDABR16_TINT125                   (0x20000000uL)
+#define INTC_ICDABR16_TINT126                   (0x40000000uL)
+#define INTC_ICDABR16_TINT127                   (0x80000000uL)
+
+#define INTC_ICDABR17_TINT128                   (0x00000001uL)
+#define INTC_ICDABR17_TINT129                   (0x00000002uL)
+#define INTC_ICDABR17_TINT130                   (0x00000004uL)
+#define INTC_ICDABR17_TINT131                   (0x00000008uL)
+#define INTC_ICDABR17_TINT132                   (0x00000010uL)
+#define INTC_ICDABR17_TINT133                   (0x00000020uL)
+#define INTC_ICDABR17_TINT134                   (0x00000040uL)
+#define INTC_ICDABR17_TINT135                   (0x00000080uL)
+#define INTC_ICDABR17_TINT136                   (0x00000100uL)
+#define INTC_ICDABR17_TINT137                   (0x00000200uL)
+#define INTC_ICDABR17_TINT138                   (0x00000400uL)
+#define INTC_ICDABR17_TINT139                   (0x00000800uL)
+#define INTC_ICDABR17_TINT140                   (0x00001000uL)
+#define INTC_ICDABR17_TINT141                   (0x00002000uL)
+#define INTC_ICDABR17_TINT142                   (0x00004000uL)
+#define INTC_ICDABR17_TINT143                   (0x00008000uL)
+#define INTC_ICDABR17_TINT144                   (0x00010000uL)
+#define INTC_ICDABR17_TINT145                   (0x00020000uL)
+#define INTC_ICDABR17_TINT146                   (0x00040000uL)
+#define INTC_ICDABR17_TINT147                   (0x00080000uL)
+#define INTC_ICDABR17_TINT148                   (0x00100000uL)
+#define INTC_ICDABR17_TINT149                   (0x00200000uL)
+#define INTC_ICDABR17_TINT150                   (0x00400000uL)
+#define INTC_ICDABR17_TINT151                   (0x00800000uL)
+#define INTC_ICDABR17_TINT152                   (0x01000000uL)
+#define INTC_ICDABR17_TINT153                   (0x02000000uL)
+#define INTC_ICDABR17_TINT154                   (0x04000000uL)
+#define INTC_ICDABR17_TINT155                   (0x08000000uL)
+#define INTC_ICDABR17_TINT156                   (0x10000000uL)
+#define INTC_ICDABR17_TINT157                   (0x20000000uL)
+#define INTC_ICDABR17_TINT158                   (0x40000000uL)
+#define INTC_ICDABR17_TINT159                   (0x80000000uL)
+
+#define INTC_ICDABR18_TINT160                   (0x00000001uL)
+#define INTC_ICDABR18_TINT161                   (0x00000002uL)
+#define INTC_ICDABR18_TINT162                   (0x00000004uL)
+#define INTC_ICDABR18_TINT163                   (0x00000008uL)
+#define INTC_ICDABR18_TINT164                   (0x00000010uL)
+#define INTC_ICDABR18_TINT165                   (0x00000020uL)
+#define INTC_ICDABR18_TINT166                   (0x00000040uL)
+#define INTC_ICDABR18_TINT167                   (0x00000080uL)
+#define INTC_ICDABR18_TINT168                   (0x00000100uL)
+#define INTC_ICDABR18_TINT169                   (0x00000200uL)
+#define INTC_ICDABR18_TINT170                   (0x00000400uL)
+
+#define INTC_ICDIPR0_SW0                        (0x000000FFuL)
+#define INTC_ICDIPR0_SW1                        (0x0000FF00uL)
+#define INTC_ICDIPR0_SW2                        (0x00FF0000uL)
+#define INTC_ICDIPR0_SW3                        (0xFF000000uL)
+
+#define INTC_ICDIPR1_SW4                        (0x000000FFuL)
+#define INTC_ICDIPR1_SW5                        (0x0000FF00uL)
+#define INTC_ICDIPR1_SW6                        (0x00FF0000uL)
+#define INTC_ICDIPR1_SW7                        (0xFF000000uL)
+
+#define INTC_ICDIPR2_SW8                        (0x000000FFuL)
+#define INTC_ICDIPR2_SW9                        (0x0000FF00uL)
+#define INTC_ICDIPR2_SW10                       (0x00FF0000uL)
+#define INTC_ICDIPR2_SW11                       (0xFF000000uL)
+
+#define INTC_ICDIPR3_SW12                       (0x000000FFuL)
+#define INTC_ICDIPR3_SW13                       (0x0000FF00uL)
+#define INTC_ICDIPR3_SW14                       (0x00FF0000uL)
+#define INTC_ICDIPR3_SW15                       (0xFF000000uL)
+
+#define INTC_ICDIPR4_PMUIRQ0                    (0x000000FFuL)
+#define INTC_ICDIPR4_COMMRX0                    (0x0000FF00uL)
+#define INTC_ICDIPR4_COMMTX0                    (0x00FF0000uL)
+#define INTC_ICDIPR4_CTIIRQ0                    (0xFF000000uL)
+
+#define INTC_ICDIPR8_IRQ0                       (0x000000FFuL)
+#define INTC_ICDIPR8_IRQ1                       (0x0000FF00uL)
+#define INTC_ICDIPR8_IRQ2                       (0x00FF0000uL)
+#define INTC_ICDIPR8_IRQ3                       (0xFF000000uL)
+
+#define INTC_ICDIPR9_IRQ4                       (0x000000FFuL)
+#define INTC_ICDIPR9_IRQ5                       (0x0000FF00uL)
+#define INTC_ICDIPR9_IRQ6                       (0x00FF0000uL)
+#define INTC_ICDIPR9_IRQ7                       (0xFF000000uL)
+
+#define INTC_ICDIPR10_PL310ERR                  (0x000000FFuL)
+#define INTC_ICDIPR10_DMAINT0                   (0x0000FF00uL)
+#define INTC_ICDIPR10_DMAINT1                   (0x00FF0000uL)
+#define INTC_ICDIPR10_DMAINT2                   (0xFF000000uL)
+
+#define INTC_ICDIPR11_DMAINT3                   (0x000000FFuL)
+#define INTC_ICDIPR11_DMAINT4                   (0x0000FF00uL)
+#define INTC_ICDIPR11_DMAINT5                   (0x00FF0000uL)
+#define INTC_ICDIPR11_DMAINT6                   (0xFF000000uL)
+
+#define INTC_ICDIPR12_DMAINT7                   (0x000000FFuL)
+#define INTC_ICDIPR12_DMAINT8                   (0x0000FF00uL)
+#define INTC_ICDIPR12_DMAINT9                   (0x00FF0000uL)
+#define INTC_ICDIPR12_DMAINT10                  (0xFF000000uL)
+
+#define INTC_ICDIPR13_DMAINT11                  (0x000000FFuL)
+#define INTC_ICDIPR13_DMAINT12                  (0x0000FF00uL)
+#define INTC_ICDIPR13_DMAINT13                  (0x00FF0000uL)
+#define INTC_ICDIPR13_DMAINT14                  (0xFF000000uL)
+
+#define INTC_ICDIPR14_DMAINT15                  (0x000000FFuL)
+#define INTC_ICDIPR14_DMAERR                    (0x0000FF00uL)
+
+#define INTC_ICDIPR18_USBI0                     (0x0000FF00uL)
+#define INTC_ICDIPR18_USBI1                     (0x00FF0000uL)
+#define INTC_ICDIPR18_S0_VI_VSYNC0              (0xFF000000uL)
+
+#define INTC_ICDIPR19_S0_LO_VSYNC0              (0x000000FFuL)
+#define INTC_ICDIPR19_S0_VSYNCERR0              (0x0000FF00uL)
+#define INTC_ICDIPR19_GR3_VLINE0                (0x00FF0000uL)
+#define INTC_ICDIPR19_S0_VFIELD0                (0xFF000000uL)
+
+#define INTC_ICDIPR20_IV1_VBUFERR0              (0x000000FFuL)
+#define INTC_ICDIPR20_IV3_VBUFERR0              (0x0000FF00uL)
+#define INTC_ICDIPR20_IV5_VBUFERR0              (0x00FF0000uL)
+#define INTC_ICDIPR20_IV6_VBUFERR0              (0xFF000000uL)
+
+#define INTC_ICDIPR21_S0_WLINE0                 (0x000000FFuL)
+#define INTC_ICDIPR21_S1_VI_VSYNC0              (0x0000FF00uL)
+#define INTC_ICDIPR21_S1_LO_VSYNC0              (0x00FF0000uL)
+#define INTC_ICDIPR21_S1_VSYNCERR0              (0xFF000000uL)
+
+#define INTC_ICDIPR22_S1_VFIELD0                (0x000000FFuL)
+#define INTC_ICDIPR22_IV2_VBUFERR0              (0x0000FF00uL)
+#define INTC_ICDIPR22_IV4_VBUFERR0              (0x00FF0000uL)
+#define INTC_ICDIPR22_S1_WLINE0                 (0xFF000000uL)
+
+#define INTC_ICDIPR23_OIR_VI_VSYNC0             (0x000000FFuL)
+#define INTC_ICDIPR23_OIR_LO_VSYNC0             (0x0000FF00uL)
+#define INTC_ICDIPR23_OIR_VSYNCERR0             (0x00FF0000uL)
+#define INTC_ICDIPR23_OIR_VFIELD0               (0xFF000000uL)
+
+#define INTC_ICDIPR24_IV7_VBUFERR0              (0x000000FFuL)
+#define INTC_ICDIPR24_IV8_VBUFERR0              (0x0000FF00uL)
+#define INTC_ICDIPR24_S0_VI_VSYNC1              (0xFF000000uL)
+
+#define INTC_ICDIPR25_S0_LO_VSYNC1              (0x000000FFuL)
+#define INTC_ICDIPR25_S0_VSYNCERR1              (0x0000FF00uL)
+#define INTC_ICDIPR25_GR3_VLINE1                (0x00FF0000uL)
+#define INTC_ICDIPR25_S0_VFIELD1                (0xFF000000uL)
+
+#define INTC_ICDIPR26_IV1_VBUFERR1              (0x000000FFuL)
+#define INTC_ICDIPR26_IV3_VBUFERR1              (0x0000FF00uL)
+#define INTC_ICDIPR26_IV5_VBUFERR1              (0x00FF0000uL)
+#define INTC_ICDIPR26_IV6_VBUFERR1              (0xFF000000uL)
+
+#define INTC_ICDIPR27_S0_WLINE1                 (0x000000FFuL)
+#define INTC_ICDIPR27_S1_VI_VSYNC1              (0x0000FF00uL)
+#define INTC_ICDIPR27_S1_LO_VSYNC1              (0x00FF0000uL)
+#define INTC_ICDIPR27_S1_VSYNCERR1              (0xFF000000uL)
+
+#define INTC_ICDIPR28_S1_VFIELD1                (0x000000FFuL)
+#define INTC_ICDIPR28_IV2_VBUFERR1              (0x0000FF00uL)
+#define INTC_ICDIPR28_IV4_VBUFERR1              (0x00FF0000uL)
+#define INTC_ICDIPR28_S1_WLINE1                 (0xFF000000uL)
+
+#define INTC_ICDIPR29_OIR_VI_VSYNC1             (0x000000FFuL)
+#define INTC_ICDIPR29_OIR_LO_VSYNC1             (0x0000FF00uL)
+#define INTC_ICDIPR29_OIR_VLINE1                (0x00FF0000uL)
+#define INTC_ICDIPR29_OIR_VFIELD1               (0xFF000000uL)
+
+#define INTC_ICDIPR30_IV7_VBUFERR1              (0x000000FFuL)
+#define INTC_ICDIPR30_IV8_VBUFERR1              (0x0000FF00uL)
+#define INTC_ICDIPR30_IMRDI                     (0xFF000000uL)
+
+#define INTC_ICDIPR31_IMR2I0                    (0x000000FFuL)
+#define INTC_ICDIPR31_IMR2I1                    (0x0000FF00uL)
+#define INTC_ICDIPR31_JEDI                      (0x00FF0000uL)
+#define INTC_ICDIPR31_JDTI                      (0xFF000000uL)
+
+#define INTC_ICDIPR32_CMP0                      (0x000000FFuL)
+#define INTC_ICDIPR32_CMP1                      (0x0000FF00uL)
+#define INTC_ICDIPR32_INT0                      (0x00FF0000uL)
+#define INTC_ICDIPR32_INT1                      (0xFF000000uL)
+
+#define INTC_ICDIPR33_INT2                      (0x000000FFuL)
+#define INTC_ICDIPR33_INT3                      (0x0000FF00uL)
+#define INTC_ICDIPR33_OSTM0TINT                 (0x00FF0000uL)
+#define INTC_ICDIPR33_OSTM1TINT                 (0xFF000000uL)
+
+#define INTC_ICDIPR34_CMI                       (0x000000FFuL)
+#define INTC_ICDIPR34_WTOUT                     (0x0000FF00uL)
+#define INTC_ICDIPR34_ITI                       (0x00FF0000uL)
+#define INTC_ICDIPR34_TGI0A                     (0xFF000000uL)
+
+#define INTC_ICDIPR35_TGI0B                     (0x000000FFuL)
+#define INTC_ICDIPR35_TGI0C                     (0x0000FF00uL)
+#define INTC_ICDIPR35_TGI0D                     (0x00FF0000uL)
+#define INTC_ICDIPR35_TGI0V                     (0xFF000000uL)
+
+#define INTC_ICDIPR36_TGI0E                     (0x000000FFuL)
+#define INTC_ICDIPR36_TGI0F                     (0x0000FF00uL)
+#define INTC_ICDIPR36_TGI1A                     (0x00FF0000uL)
+#define INTC_ICDIPR36_TGI1B                     (0xFF000000uL)
+
+#define INTC_ICDIPR37_TGI1V                     (0x000000FFuL)
+#define INTC_ICDIPR37_TGI1U                     (0x0000FF00uL)
+#define INTC_ICDIPR37_TGI2A                     (0x00FF0000uL)
+#define INTC_ICDIPR37_TGI2B                     (0xFF000000uL)
+
+#define INTC_ICDIPR38_TGI2V                     (0x000000FFuL)
+#define INTC_ICDIPR38_TGI2U                     (0x0000FF00uL)
+#define INTC_ICDIPR38_TGI3A                     (0x00FF0000uL)
+#define INTC_ICDIPR38_TGI3B                     (0xFF000000uL)
+
+#define INTC_ICDIPR39_TGI3C                     (0x000000FFuL)
+#define INTC_ICDIPR39_TGI3D                     (0x0000FF00uL)
+#define INTC_ICDIPR39_TGI3V                     (0x00FF0000uL)
+#define INTC_ICDIPR39_TGI4A                     (0xFF000000uL)
+
+#define INTC_ICDIPR40_TGI4B                     (0x000000FFuL)
+#define INTC_ICDIPR40_TGI4C                     (0x0000FF00uL)
+#define INTC_ICDIPR40_TGI4D                     (0x00FF0000uL)
+#define INTC_ICDIPR40_TGI4V                     (0xFF000000uL)
+
+#define INTC_ICDIPR41_CMI1                      (0x000000FFuL)
+#define INTC_ICDIPR41_CMI2                      (0x0000FF00uL)
+#define INTC_ICDIPR41_SGDEI0                    (0x00FF0000uL)
+#define INTC_ICDIPR41_SGDEI1                    (0xFF000000uL)
+
+#define INTC_ICDIPR42_SGDEI2                    (0x000000FFuL)
+#define INTC_ICDIPR42_SGDEI3                    (0x0000FF00uL)
+#define INTC_ICDIPR42_ADI                       (0x00FF0000uL)
+#define INTC_ICDIPR42_LMTI                      (0xFF000000uL)
+
+#define INTC_ICDIPR43_SSII0                     (0x000000FFuL)
+#define INTC_ICDIPR43_SSIRXI0                   (0x0000FF00uL)
+#define INTC_ICDIPR43_SSITXI0                   (0x00FF0000uL)
+#define INTC_ICDIPR43_SSII1                     (0xFF000000uL)
+
+#define INTC_ICDIPR44_SSIRXI1                   (0x000000FFuL)
+#define INTC_ICDIPR44_SSITXI1                   (0x0000FF00uL)
+#define INTC_ICDIPR44_SSII2                     (0x00FF0000uL)
+#define INTC_ICDIPR44_SSIRTI2                   (0xFF000000uL)
+
+#define INTC_ICDIPR45_SSII3                     (0x000000FFuL)
+#define INTC_ICDIPR45_SSIRXI3                   (0x0000FF00uL)
+#define INTC_ICDIPR45_SSITXI3                   (0x00FF0000uL)
+#define INTC_ICDIPR45_SSII4                     (0xFF000000uL)
+
+#define INTC_ICDIPR46_SSIRTI4                   (0x000000FFuL)
+#define INTC_ICDIPR46_SSII5                     (0x0000FF00uL)
+#define INTC_ICDIPR46_SSIRXI5                   (0x00FF0000uL)
+#define INTC_ICDIPR46_SSITXI5                   (0xFF000000uL)
+
+#define INTC_ICDIPR47_SPDIFI                    (0x000000FFuL)
+#define INTC_ICDIPR47_INTIICTEI0                (0x0000FF00uL)
+#define INTC_ICDIPR47_INTIICRI0                 (0x00FF0000uL)
+#define INTC_ICDIPR47_INTIICTI0                 (0xFF000000uL)
+
+#define INTC_ICDIPR48_INTIICSPI0                (0x000000FFuL)
+#define INTC_ICDIPR48_INTIICSTI0                (0x0000FF00uL)
+#define INTC_ICDIPR48_INTIICNAKI0               (0x00FF0000uL)
+#define INTC_ICDIPR48_INTIICALI0                (0xFF000000uL)
+
+#define INTC_ICDIPR49_INTIICTMOI0               (0x000000FFuL)
+#define INTC_ICDIPR49_INTIICTEI1                (0x0000FF00uL)
+#define INTC_ICDIPR49_INTIICRI1                 (0x00FF0000uL)
+#define INTC_ICDIPR49_INTIICTI1                 (0xFF000000uL)
+
+#define INTC_ICDIPR50_INTIICSPI1                (0x000000FFuL)
+#define INTC_ICDIPR50_INTIICSTI1                (0x0000FF00uL)
+#define INTC_ICDIPR50_INTIICNAKI1               (0x00FF0000uL)
+#define INTC_ICDIPR50_INTIICALI1                (0xFF000000uL)
+
+#define INTC_ICDIPR51_INTIICTMOI1               (0x000000FFuL)
+#define INTC_ICDIPR51_INTIICTEI2                (0x0000FF00uL)
+#define INTC_ICDIPR51_INTIICRI2                 (0x00FF0000uL)
+#define INTC_ICDIPR51_INTIICTI2                 (0xFF000000uL)
+
+#define INTC_ICDIPR52_INTIICSPI2                (0x000000FFuL)
+#define INTC_ICDIPR52_INTIICSTI2                (0x0000FF00uL)
+#define INTC_ICDIPR52_INTIICNAKI2               (0x00FF0000uL)
+#define INTC_ICDIPR52_INTIICALI2                (0xFF000000uL)
+
+#define INTC_ICDIPR53_INTIICTMOI2               (0x000000FFuL)
+#define INTC_ICDIPR53_INTIICTEI3                (0x0000FF00uL)
+#define INTC_ICDIPR53_INTIICRI3                 (0x00FF0000uL)
+#define INTC_ICDIPR53_INTIICTI3                 (0xFF000000uL)
+
+#define INTC_ICDIPR54_INTIICSPI3                (0x000000FFuL)
+#define INTC_ICDIPR54_INTIICSTI3                (0x0000FF00uL)
+#define INTC_ICDIPR54_INTIICNAKI3               (0x00FF0000uL)
+#define INTC_ICDIPR54_INTIICALI3                (0xFF000000uL)
+
+#define INTC_ICDIPR55_INTIICTMOI3               (0x000000FFuL)
+#define INTC_ICDIPR55_BRI0                      (0x0000FF00uL)
+#define INTC_ICDIPR55_ERI0                      (0x00FF0000uL)
+#define INTC_ICDIPR55_RXI0                      (0xFF000000uL)
+
+#define INTC_ICDIPR56_TXI0                      (0x000000FFuL)
+#define INTC_ICDIPR56_BRI1                      (0x0000FF00uL)
+#define INTC_ICDIPR56_ERI1                      (0x00FF0000uL)
+#define INTC_ICDIPR56_RXI1                      (0xFF000000uL)
+
+#define INTC_ICDIPR57_TXI1                      (0x000000FFuL)
+#define INTC_ICDIPR57_BRI2                      (0x0000FF00uL)
+#define INTC_ICDIPR57_ERI2                      (0x00FF0000uL)
+#define INTC_ICDIPR57_RXI2                      (0xFF000000uL)
+
+#define INTC_ICDIPR58_TXI2                      (0x000000FFuL)
+#define INTC_ICDIPR58_BRI3                      (0x0000FF00uL)
+#define INTC_ICDIPR58_ERI3                      (0x00FF0000uL)
+#define INTC_ICDIPR58_RXI3                      (0xFF000000uL)
+
+#define INTC_ICDIPR59_TXI3                      (0x000000FFuL)
+#define INTC_ICDIPR59_BRI4                      (0x0000FF00uL)
+#define INTC_ICDIPR59_ERI4                      (0x00FF0000uL)
+#define INTC_ICDIPR59_RXI4                      (0xFF000000uL)
+
+#define INTC_ICDIPR60_TXI4                      (0x000000FFuL)
+#define INTC_ICDIPR60_BRI5                      (0x0000FF00uL)
+#define INTC_ICDIPR60_ERI5                      (0x00FF0000uL)
+#define INTC_ICDIPR60_RXI5                      (0xFF000000uL)
+
+#define INTC_ICDIPR61_TXI5                      (0x000000FFuL)
+#define INTC_ICDIPR61_BRI6                      (0x0000FF00uL)
+#define INTC_ICDIPR61_ERI6                      (0x00FF0000uL)
+#define INTC_ICDIPR61_RXI6                      (0xFF000000uL)
+
+#define INTC_ICDIPR62_TXI6                      (0x000000FFuL)
+#define INTC_ICDIPR62_BRI7                      (0x0000FF00uL)
+#define INTC_ICDIPR62_ERI7                      (0x00FF0000uL)
+#define INTC_ICDIPR62_RXI7                      (0xFF000000uL)
+
+#define INTC_ICDIPR63_TXI7                      (0x000000FFuL)
+#define INTC_ICDIPR63_INTRCANGERR               (0x0000FF00uL)
+#define INTC_ICDIPR63_INTRCANGRECC              (0x00FF0000uL)
+#define INTC_ICDIPR63_INTRCAN0REC               (0xFF000000uL)
+
+#define INTC_ICDIPR64_INTRCAN0ERR               (0x000000FFuL)
+#define INTC_ICDIPR64_INTRCAN0TRX               (0x0000FF00uL)
+#define INTC_ICDIPR64_INTRCAN1REC               (0x00FF0000uL)
+#define INTC_ICDIPR64_INTRCAN1ERR               (0xFF000000uL)
+
+#define INTC_ICDIPR65_INTRCAN1TRX               (0x000000FFuL)
+#define INTC_ICDIPR65_INTRCAN2REC               (0x0000FF00uL)
+#define INTC_ICDIPR65_INTRCAN2ERR               (0x00FF0000uL)
+#define INTC_ICDIPR65_INTRCAN2TRX               (0xFF000000uL)
+
+#define INTC_ICDIPR66_INTRCAN3REC               (0x000000FFuL)
+#define INTC_ICDIPR66_INTRCAN3ERR               (0x0000FF00uL)
+#define INTC_ICDIPR66_INTRCAN3TRX               (0x00FF0000uL)
+#define INTC_ICDIPR66_INTRCAN4REC               (0xFF000000uL)
+
+#define INTC_ICDIPR67_INTRCAN4ERR               (0x000000FFuL)
+#define INTC_ICDIPR67_INTRCAN4TRX               (0x0000FF00uL)
+#define INTC_ICDIPR67_SPEI0                     (0x00FF0000uL)
+#define INTC_ICDIPR67_SPRI0                     (0xFF000000uL)
+
+#define INTC_ICDIPR68_SPTI0                     (0x000000FFuL)
+#define INTC_ICDIPR68_SPEI1                     (0x0000FF00uL)
+#define INTC_ICDIPR68_SPRI1                     (0x00FF0000uL)
+#define INTC_ICDIPR68_SPTI1                     (0xFF000000uL)
+
+#define INTC_ICDIPR69_SPEI2                     (0x000000FFuL)
+#define INTC_ICDIPR69_SPRI2                     (0x0000FF00uL)
+#define INTC_ICDIPR69_SPTI2                     (0x00FF0000uL)
+#define INTC_ICDIPR69_SPEI3                     (0xFF000000uL)
+
+#define INTC_ICDIPR70_SPRI3                     (0x000000FFuL)
+#define INTC_ICDIPR70_SPTI3                     (0x0000FF00uL)
+#define INTC_ICDIPR70_SPEI4                     (0x00FF0000uL)
+#define INTC_ICDIPR70_SPRI4                     (0xFF000000uL)
+
+#define INTC_ICDIPR71_SPTI4                     (0x000000FFuL)
+#define INTC_ICDIPR71_IEBBTD                    (0x0000FF00uL)
+#define INTC_ICDIPR71_IEBBTERR                  (0x00FF0000uL)
+#define INTC_ICDIPR71_IEBBTSTA                  (0xFF000000uL)
+
+#define INTC_ICDIPR72_IEBBTV                    (0x000000FFuL)
+#define INTC_ICDIPR72_ISY                       (0x0000FF00uL)
+#define INTC_ICDIPR72_IERR                      (0x00FF0000uL)
+#define INTC_ICDIPR72_ITARG                     (0xFF000000uL)
+
+#define INTC_ICDIPR73_ISEC                      (0x000000FFuL)
+#define INTC_ICDIPR73_IBUF                      (0x0000FF00uL)
+#define INTC_ICDIPR73_IREADY                    (0x00FF0000uL)
+#define INTC_ICDIPR73_FLSTE                     (0xFF000000uL)
+
+#define INTC_ICDIPR74_FLTENDI                   (0x000000FFuL)
+#define INTC_ICDIPR74_FLTREQ0I                  (0x0000FF00uL)
+#define INTC_ICDIPR74_FLTREQ1I                  (0x00FF0000uL)
+#define INTC_ICDIPR74_MMC0                      (0xFF000000uL)
+
+#define INTC_ICDIPR75_MMC1                      (0x000000FFuL)
+#define INTC_ICDIPR75_MMC2                      (0x0000FF00uL)
+#define INTC_ICDIPR75_SDHI0_3                   (0x00FF0000uL)
+#define INTC_ICDIPR75_SDHI0_0                   (0xFF000000uL)
+
+#define INTC_ICDIPR76_SDHI0_1                   (0x000000FFuL)
+#define INTC_ICDIPR76_SDHI1_3                   (0x0000FF00uL)
+#define INTC_ICDIPR76_SDHI1_0                   (0x00FF0000uL)
+#define INTC_ICDIPR76_SDHI1_1                   (0xFF000000uL)
+
+#define INTC_ICDIPR77_ARM                       (0x000000FFuL)
+#define INTC_ICDIPR77_PRD                       (0x0000FF00uL)
+#define INTC_ICDIPR77_CUP                       (0x00FF0000uL)
+#define INTC_ICDIPR77_SCUAI0                    (0xFF000000uL)
+
+#define INTC_ICDIPR78_SCUAI1                    (0x000000FFuL)
+#define INTC_ICDIPR78_SCUFDI0                   (0x0000FF00uL)
+#define INTC_ICDIPR78_SCUFDI1                   (0x00FF0000uL)
+#define INTC_ICDIPR78_SCUFDI2                   (0xFF000000uL)
+
+#define INTC_ICDIPR79_SCUFDI3                   (0x000000FFuL)
+#define INTC_ICDIPR79_SCUFUI0                   (0x0000FF00uL)
+#define INTC_ICDIPR79_SCUFUI1                   (0x00FF0000uL)
+#define INTC_ICDIPR79_SCUFUI2                   (0xFF000000uL)
+
+#define INTC_ICDIPR80_SCUFUI3                   (0x000000FFuL)
+#define INTC_ICDIPR80_SCUDVI0                   (0x0000FF00uL)
+#define INTC_ICDIPR80_SCUDVI1                   (0x00FF0000uL)
+#define INTC_ICDIPR80_SCUDVI2                   (0xFF000000uL)
+
+#define INTC_ICDIPR81_SCUDVI3                   (0x000000FFuL)
+#define INTC_ICDIPR81_MLB_CINT                  (0x0000FF00uL)
+#define INTC_ICDIPR81_MLB_SINT                  (0x00FF0000uL)
+#define INTC_ICDIPR81_DRC0                      (0xFF000000uL)
+
+#define INTC_ICDIPR82_DRC1                      (0x000000FFuL)
+#define INTC_ICDIPR82_LINI0_INT_T               (0xFF000000uL)
+
+#define INTC_ICDIPR83_LINI0_INT_R               (0x000000FFuL)
+#define INTC_ICDIPR83_LINI0_INT_S               (0x0000FF00uL)
+#define INTC_ICDIPR83_LINI0_INT_M               (0x00FF0000uL)
+#define INTC_ICDIPR83_LINI1_INT_T               (0xFF000000uL)
+
+#define INTC_ICDIPR84_LINI1_INT_R               (0x000000FFuL)
+#define INTC_ICDIPR84_LINI1_INT_S               (0x0000FF00uL)
+#define INTC_ICDIPR84_LINI1_INT_M               (0x00FF0000uL)
+
+#define INTC_ICDIPR86_ERI0                      (0xFF000000uL)
+
+#define INTC_ICDIPR87_RXI0                      (0x000000FFuL)
+#define INTC_ICDIPR87_TXI0                      (0x0000FF00uL)
+#define INTC_ICDIPR87_TEI0                      (0x00FF0000uL)
+#define INTC_ICDIPR87_ERI1                      (0xFF000000uL)
+
+#define INTC_ICDIPR88_RXI1                      (0x000000FFuL)
+#define INTC_ICDIPR88_TXI1                      (0x0000FF00uL)
+#define INTC_ICDIPR88_TEI1                      (0x00FF0000uL)
+#define INTC_ICDIPR88_AVBI_DATA                 (0xFF000000uL)
+
+#define INTC_ICDIPR89_AVBI_ERROR                (0x000000FFuL)
+#define INTC_ICDIPR89_AVBI_MANAGE               (0x0000FF00uL)
+#define INTC_ICDIPR89_AVBI_MAC                  (0x00FF0000uL)
+#define INTC_ICDIPR89_ETHERI                    (0xFF000000uL)
+
+#define INTC_ICDIPR91_CEUI                      (0x000000FFuL)
+
+#define INTC_ICDIPR95_H2XMLB_ERRINT             (0x0000FF00uL)
+#define INTC_ICDIPR95_H2XIC1_ERRINT             (0x00FF0000uL)
+#define INTC_ICDIPR95_X2HPERI1_ERRINT           (0xFF000000uL)
+
+#define INTC_ICDIPR96_X2HPERI2_ERRINT           (0x000000FFuL)
+#define INTC_ICDIPR96_X2HPERI34_ERRINT          (0x0000FF00uL)
+#define INTC_ICDIPR96_X2HPERI5_ERRINT           (0x00FF0000uL)
+#define INTC_ICDIPR96_X2HPERI67_ERRINT          (0xFF000000uL)
+
+#define INTC_ICDIPR97_X2HDBGR_ERRINT            (0x000000FFuL)
+#define INTC_ICDIPR97_X2HBSC_ERRINT             (0x0000FF00uL)
+#define INTC_ICDIPR97_X2HSPI1_ERRINT            (0x00FF0000uL)
+#define INTC_ICDIPR97_X2HSPI2_ERRINT            (0xFF000000uL)
+
+#define INTC_ICDIPR98_PRRI                      (0x000000FFuL)
+#define INTC_ICDIPR98_IFEI0                     (0x0000FF00uL)
+#define INTC_ICDIPR98_OFFI0                     (0x00FF0000uL)
+#define INTC_ICDIPR98_PFVEI0                    (0xFF000000uL)
+
+#define INTC_ICDIPR99_IFEI1                     (0x000000FFuL)
+#define INTC_ICDIPR99_OFFI1                     (0x0000FF00uL)
+#define INTC_ICDIPR99_PFVEI1                    (0x00FF0000uL)
+
+#define INTC_ICDIPR104_TINT0                    (0x000000FFuL)
+#define INTC_ICDIPR104_TINT1                    (0x0000FF00uL)
+#define INTC_ICDIPR104_TINT2                    (0x00FF0000uL)
+#define INTC_ICDIPR104_TINT3                    (0xFF000000uL)
+
+#define INTC_ICDIPR105_TINT4                    (0x000000FFuL)
+#define INTC_ICDIPR105_TINT5                    (0x0000FF00uL)
+#define INTC_ICDIPR105_TINT6                    (0x00FF0000uL)
+#define INTC_ICDIPR105_TINT7                    (0xFF000000uL)
+
+#define INTC_ICDIPR106_TINT8                    (0x000000FFuL)
+#define INTC_ICDIPR106_TINT9                    (0x0000FF00uL)
+#define INTC_ICDIPR106_TINT10                   (0x00FF0000uL)
+#define INTC_ICDIPR106_TINT11                   (0xFF000000uL)
+
+#define INTC_ICDIPR107_TINT12                   (0x000000FFuL)
+#define INTC_ICDIPR107_TINT13                   (0x0000FF00uL)
+#define INTC_ICDIPR107_TINT14                   (0x00FF0000uL)
+#define INTC_ICDIPR107_TINT15                   (0xFF000000uL)
+
+#define INTC_ICDIPR108_TINT16                   (0x000000FFuL)
+#define INTC_ICDIPR108_TINT17                   (0x0000FF00uL)
+#define INTC_ICDIPR108_TINT18                   (0x00FF0000uL)
+#define INTC_ICDIPR108_TINT19                   (0xFF000000uL)
+
+#define INTC_ICDIPR109_TINT20                   (0x000000FFuL)
+#define INTC_ICDIPR109_TINT21                   (0x0000FF00uL)
+#define INTC_ICDIPR109_TINT22                   (0x00FF0000uL)
+#define INTC_ICDIPR109_TINT23                   (0xFF000000uL)
+
+#define INTC_ICDIPR110_TINT24                   (0x000000FFuL)
+#define INTC_ICDIPR110_TINT25                   (0x0000FF00uL)
+#define INTC_ICDIPR110_TINT26                   (0x00FF0000uL)
+#define INTC_ICDIPR110_TINT27                   (0xFF000000uL)
+
+#define INTC_ICDIPR111_TINT28                   (0x000000FFuL)
+#define INTC_ICDIPR111_TINT29                   (0x0000FF00uL)
+#define INTC_ICDIPR111_TINT30                   (0x00FF0000uL)
+#define INTC_ICDIPR111_TINT31                   (0xFF000000uL)
+
+#define INTC_ICDIPR112_TINT32                   (0x000000FFuL)
+#define INTC_ICDIPR112_TINT33                   (0x0000FF00uL)
+#define INTC_ICDIPR112_TINT34                   (0x00FF0000uL)
+#define INTC_ICDIPR112_TINT35                   (0xFF000000uL)
+
+#define INTC_ICDIPR113_TINT36                   (0x000000FFuL)
+#define INTC_ICDIPR113_TINT37                   (0x0000FF00uL)
+#define INTC_ICDIPR113_TINT38                   (0x00FF0000uL)
+#define INTC_ICDIPR113_TINT39                   (0xFF000000uL)
+
+#define INTC_ICDIPR114_TINT40                   (0x000000FFuL)
+#define INTC_ICDIPR114_TINT41                   (0x0000FF00uL)
+#define INTC_ICDIPR114_TINT42                   (0x00FF0000uL)
+#define INTC_ICDIPR114_TINT43                   (0xFF000000uL)
+
+#define INTC_ICDIPR115_TINT44                   (0x000000FFuL)
+#define INTC_ICDIPR115_TINT45                   (0x0000FF00uL)
+#define INTC_ICDIPR115_TINT46                   (0x00FF0000uL)
+#define INTC_ICDIPR115_TINT47                   (0xFF000000uL)
+
+#define INTC_ICDIPR116_TINT48                   (0x000000FFuL)
+#define INTC_ICDIPR116_TINT49                   (0x0000FF00uL)
+#define INTC_ICDIPR116_TINT50                   (0x00FF0000uL)
+#define INTC_ICDIPR116_TINT51                   (0xFF000000uL)
+
+#define INTC_ICDIPR117_TINT52                   (0x000000FFuL)
+#define INTC_ICDIPR117_TINT53                   (0x0000FF00uL)
+#define INTC_ICDIPR117_TINT54                   (0x00FF0000uL)
+#define INTC_ICDIPR117_TINT55                   (0xFF000000uL)
+
+#define INTC_ICDIPR118_TINT56                   (0x000000FFuL)
+#define INTC_ICDIPR118_TINT57                   (0x0000FF00uL)
+#define INTC_ICDIPR118_TINT58                   (0x00FF0000uL)
+#define INTC_ICDIPR118_TINT59                   (0xFF000000uL)
+
+#define INTC_ICDIPR119_TINT60                   (0x000000FFuL)
+#define INTC_ICDIPR119_TINT61                   (0x0000FF00uL)
+#define INTC_ICDIPR119_TINT62                   (0x00FF0000uL)
+#define INTC_ICDIPR119_TINT63                   (0xFF000000uL)
+
+#define INTC_ICDIPR120_TINT64                   (0x000000FFuL)
+#define INTC_ICDIPR120_TINT65                   (0x0000FF00uL)
+#define INTC_ICDIPR120_TINT66                   (0x00FF0000uL)
+#define INTC_ICDIPR120_TINT67                   (0xFF000000uL)
+
+#define INTC_ICDIPR121_TINT68                   (0x000000FFuL)
+#define INTC_ICDIPR121_TINT69                   (0x0000FF00uL)
+#define INTC_ICDIPR121_TINT70                   (0x00FF0000uL)
+#define INTC_ICDIPR121_TINT71                   (0xFF000000uL)
+
+#define INTC_ICDIPR122_TINT72                   (0x000000FFuL)
+#define INTC_ICDIPR122_TINT73                   (0x0000FF00uL)
+#define INTC_ICDIPR122_TINT74                   (0x00FF0000uL)
+#define INTC_ICDIPR122_TINT75                   (0xFF000000uL)
+
+#define INTC_ICDIPR123_TINT76                   (0x000000FFuL)
+#define INTC_ICDIPR123_TINT77                   (0x0000FF00uL)
+#define INTC_ICDIPR123_TINT78                   (0x00FF0000uL)
+#define INTC_ICDIPR123_TINT79                   (0xFF000000uL)
+
+#define INTC_ICDIPR124_TINT80                   (0x000000FFuL)
+#define INTC_ICDIPR124_TINT81                   (0x0000FF00uL)
+#define INTC_ICDIPR124_TINT82                   (0x00FF0000uL)
+#define INTC_ICDIPR124_TINT83                   (0xFF000000uL)
+
+#define INTC_ICDIPR125_TINT84                   (0x000000FFuL)
+#define INTC_ICDIPR125_TINT85                   (0x0000FF00uL)
+#define INTC_ICDIPR125_TINT86                   (0x00FF0000uL)
+#define INTC_ICDIPR125_TINT87                   (0xFF000000uL)
+
+#define INTC_ICDIPR126_TINT88                   (0x000000FFuL)
+#define INTC_ICDIPR126_TINT89                   (0x0000FF00uL)
+#define INTC_ICDIPR126_TINT90                   (0x00FF0000uL)
+#define INTC_ICDIPR126_TINT91                   (0xFF000000uL)
+
+#define INTC_ICDIPR127_TINT92                   (0x000000FFuL)
+#define INTC_ICDIPR127_TINT93                   (0x0000FF00uL)
+#define INTC_ICDIPR127_TINT94                   (0x00FF0000uL)
+#define INTC_ICDIPR127_TINT95                   (0xFF000000uL)
+
+#define INTC_ICDIPR128_TINT96                   (0x000000FFuL)
+#define INTC_ICDIPR128_TINT97                   (0x0000FF00uL)
+#define INTC_ICDIPR128_TINT98                   (0x00FF0000uL)
+#define INTC_ICDIPR128_TINT99                   (0xFF000000uL)
+
+#define INTC_ICDIPR129_TINT100                  (0x000000FFuL)
+#define INTC_ICDIPR129_TINT101                  (0x0000FF00uL)
+#define INTC_ICDIPR129_TINT102                  (0x00FF0000uL)
+#define INTC_ICDIPR129_TINT103                  (0xFF000000uL)
+
+#define INTC_ICDIPR130_TINT104                  (0x000000FFuL)
+#define INTC_ICDIPR130_TINT105                  (0x0000FF00uL)
+#define INTC_ICDIPR130_TINT106                  (0x00FF0000uL)
+#define INTC_ICDIPR130_TINT107                  (0xFF000000uL)
+
+#define INTC_ICDIPR131_TINT108                  (0x000000FFuL)
+#define INTC_ICDIPR131_TINT109                  (0x0000FF00uL)
+#define INTC_ICDIPR131_TINT110                  (0x00FF0000uL)
+#define INTC_ICDIPR131_TINT111                  (0xFF000000uL)
+
+#define INTC_ICDIPR132_TINT112                  (0x000000FFuL)
+#define INTC_ICDIPR132_TINT113                  (0x0000FF00uL)
+#define INTC_ICDIPR132_TINT114                  (0x00FF0000uL)
+#define INTC_ICDIPR132_TINT115                  (0xFF000000uL)
+
+#define INTC_ICDIPR133_TINT116                  (0x000000FFuL)
+#define INTC_ICDIPR133_TINT117                  (0x0000FF00uL)
+#define INTC_ICDIPR133_TINT118                  (0x00FF0000uL)
+#define INTC_ICDIPR133_TINT119                  (0xFF000000uL)
+
+#define INTC_ICDIPR134_TINT120                  (0x000000FFuL)
+#define INTC_ICDIPR134_TINT121                  (0x0000FF00uL)
+#define INTC_ICDIPR134_TINT122                  (0x00FF0000uL)
+#define INTC_ICDIPR134_TINT123                  (0xFF000000uL)
+
+#define INTC_ICDIPR135_TINT124                  (0x000000FFuL)
+#define INTC_ICDIPR135_TINT125                  (0x0000FF00uL)
+#define INTC_ICDIPR135_TINT126                  (0x00FF0000uL)
+#define INTC_ICDIPR135_TINT127                  (0xFF000000uL)
+
+#define INTC_ICDIPR136_TINT128                  (0x000000FFuL)
+#define INTC_ICDIPR136_TINT129                  (0x0000FF00uL)
+#define INTC_ICDIPR136_TINT130                  (0x00FF0000uL)
+#define INTC_ICDIPR136_TINT131                  (0xFF000000uL)
+
+#define INTC_ICDIPR137_TINT132                  (0x000000FFuL)
+#define INTC_ICDIPR137_TINT133                  (0x0000FF00uL)
+#define INTC_ICDIPR137_TINT134                  (0x00FF0000uL)
+#define INTC_ICDIPR137_TINT135                  (0xFF000000uL)
+
+#define INTC_ICDIPR138_TINT136                  (0x000000FFuL)
+#define INTC_ICDIPR138_TINT137                  (0x0000FF00uL)
+#define INTC_ICDIPR138_TINT138                  (0x00FF0000uL)
+#define INTC_ICDIPR138_TINT139                  (0xFF000000uL)
+
+#define INTC_ICDIPR139_TINT140                  (0x000000FFuL)
+#define INTC_ICDIPR139_TINT141                  (0x0000FF00uL)
+#define INTC_ICDIPR139_TINT142                  (0x00FF0000uL)
+#define INTC_ICDIPR139_TINT143                  (0xFF000000uL)
+
+#define INTC_ICDIPR140_TINT144                  (0x000000FFuL)
+#define INTC_ICDIPR140_TINT145                  (0x0000FF00uL)
+#define INTC_ICDIPR140_TINT146                  (0x00FF0000uL)
+#define INTC_ICDIPR140_TINT147                  (0xFF000000uL)
+
+#define INTC_ICDIPR141_TINT148                  (0x000000FFuL)
+#define INTC_ICDIPR141_TINT149                  (0x0000FF00uL)
+#define INTC_ICDIPR141_TINT150                  (0x00FF0000uL)
+#define INTC_ICDIPR141_TINT151                  (0xFF000000uL)
+
+#define INTC_ICDIPR142_TINT152                  (0x000000FFuL)
+#define INTC_ICDIPR142_TINT153                  (0x0000FF00uL)
+#define INTC_ICDIPR142_TINT154                  (0x00FF0000uL)
+#define INTC_ICDIPR142_TINT155                  (0xFF000000uL)
+
+#define INTC_ICDIPR143_TINT156                  (0x000000FFuL)
+#define INTC_ICDIPR143_TINT157                  (0x0000FF00uL)
+#define INTC_ICDIPR143_TINT158                  (0x00FF0000uL)
+#define INTC_ICDIPR143_TINT159                  (0xFF000000uL)
+
+#define INTC_ICDIPR144_TINT160                  (0x000000FFuL)
+#define INTC_ICDIPR144_TINT161                  (0x0000FF00uL)
+#define INTC_ICDIPR144_TINT162                  (0x00FF0000uL)
+#define INTC_ICDIPR144_TINT163                  (0xFF000000uL)
+
+#define INTC_ICDIPR145_TINT164                  (0x000000FFuL)
+#define INTC_ICDIPR145_TINT165                  (0x0000FF00uL)
+#define INTC_ICDIPR145_TINT166                  (0x00FF0000uL)
+#define INTC_ICDIPR145_TINT167                  (0xFF000000uL)
+
+#define INTC_ICDIPR146_TINT168                  (0x000000FFuL)
+#define INTC_ICDIPR146_TINT169                  (0x0000FF00uL)
+#define INTC_ICDIPR146_TINT170                  (0x00FF0000uL)
+
+#define INTC_ICDIPTR0_SW0                       (0x000000FFuL)
+#define INTC_ICDIPTR0_SW1                       (0x0000FF00uL)
+#define INTC_ICDIPTR0_SW2                       (0x00FF0000uL)
+#define INTC_ICDIPTR0_SW3                       (0xFF000000uL)
+
+#define INTC_ICDIPTR1_SW4                       (0x000000FFuL)
+#define INTC_ICDIPTR1_SW5                       (0x0000FF00uL)
+#define INTC_ICDIPTR1_SW6                       (0x00FF0000uL)
+#define INTC_ICDIPTR1_SW7                       (0xFF000000uL)
+
+#define INTC_ICDIPTR2_SW8                       (0x000000FFuL)
+#define INTC_ICDIPTR2_SW9                       (0x0000FF00uL)
+#define INTC_ICDIPTR2_SW10                      (0x00FF0000uL)
+#define INTC_ICDIPTR2_SW11                      (0xFF000000uL)
+
+#define INTC_ICDIPTR3_SW12                      (0x000000FFuL)
+#define INTC_ICDIPTR3_SW13                      (0x0000FF00uL)
+#define INTC_ICDIPTR3_SW14                      (0x00FF0000uL)
+#define INTC_ICDIPTR3_SW15                      (0xFF000000uL)
+
+#define INTC_ICDIPTR4_PMUIRQ0                   (0x000000FFuL)
+#define INTC_ICDIPTR4_COMMRX0                   (0x0000FF00uL)
+#define INTC_ICDIPTR4_COMMTX0                   (0x00FF0000uL)
+#define INTC_ICDIPTR4_CTIIRQ0                   (0xFF000000uL)
+
+#define INTC_ICDIPTR8_IRQ0                      (0x000000FFuL)
+#define INTC_ICDIPTR8_IRQ1                      (0x0000FF00uL)
+#define INTC_ICDIPTR8_IRQ2                      (0x00FF0000uL)
+#define INTC_ICDIPTR8_IRQ3                      (0xFF000000uL)
+
+#define INTC_ICDIPTR9_IRQ4                      (0x000000FFuL)
+#define INTC_ICDIPTR9_IRQ5                      (0x0000FF00uL)
+#define INTC_ICDIPTR9_IRQ6                      (0x00FF0000uL)
+#define INTC_ICDIPTR9_IRQ7                      (0xFF000000uL)
+
+#define INTC_ICDIPTR10_PL310ERR                 (0x000000FFuL)
+#define INTC_ICDIPTR10_DMAINT0                  (0x0000FF00uL)
+#define INTC_ICDIPTR10_DMAINT1                  (0x00FF0000uL)
+#define INTC_ICDIPTR10_DMAINT2                  (0xFF000000uL)
+
+#define INTC_ICDIPTR11_DMAINT3                  (0x000000FFuL)
+#define INTC_ICDIPTR11_DMAINT4                  (0x0000FF00uL)
+#define INTC_ICDIPTR11_DMAINT5                  (0x00FF0000uL)
+#define INTC_ICDIPTR11_DMAINT6                  (0xFF000000uL)
+
+#define INTC_ICDIPTR12_DMAINT7                  (0x000000FFuL)
+#define INTC_ICDIPTR12_DMAINT8                  (0x0000FF00uL)
+#define INTC_ICDIPTR12_DMAINT9                  (0x00FF0000uL)
+#define INTC_ICDIPTR12_DMAINT10                 (0xFF000000uL)
+
+#define INTC_ICDIPTR13_DMAINT11                 (0x000000FFuL)
+#define INTC_ICDIPTR13_DMAINT12                 (0x0000FF00uL)
+#define INTC_ICDIPTR13_DMAINT13                 (0x00FF0000uL)
+#define INTC_ICDIPTR13_DMAINT14                 (0xFF000000uL)
+
+#define INTC_ICDIPTR14_DMAINT15                 (0x000000FFuL)
+#define INTC_ICDIPTR14_DMAERR                   (0x0000FF00uL)
+
+#define INTC_ICDIPTR18_USBI0                    (0x0000FF00uL)
+#define INTC_ICDIPTR18_USBI1                    (0x00FF0000uL)
+#define INTC_ICDIPTR18_S0_VI_VSYNC0             (0xFF000000uL)
+
+#define INTC_ICDIPTR19_S0_LO_VSYNC0             (0x000000FFuL)
+#define INTC_ICDIPTR19_S0_VSYNCERR0             (0x0000FF00uL)
+#define INTC_ICDIPTR19_GR3_VLINE0               (0x00FF0000uL)
+#define INTC_ICDIPTR19_S0_VFIELD0               (0xFF000000uL)
+
+#define INTC_ICDIPTR20_IV1_VBUFERR0             (0x000000FFuL)
+#define INTC_ICDIPTR20_IV3_VBUFERR0             (0x0000FF00uL)
+#define INTC_ICDIPTR20_IV5_VBUFERR0             (0x00FF0000uL)
+#define INTC_ICDIPTR20_IV6_VBUFERR0             (0xFF000000uL)
+
+#define INTC_ICDIPTR21_S0_WLINE0                (0x000000FFuL)
+#define INTC_ICDIPTR21_S1_VI_VSYNC0             (0x0000FF00uL)
+#define INTC_ICDIPTR21_S1_LO_VSYNC0             (0x00FF0000uL)
+#define INTC_ICDIPTR21_S1_VSYNCERR0             (0xFF000000uL)
+
+#define INTC_ICDIPTR22_S1_VFIELD0               (0x000000FFuL)
+#define INTC_ICDIPTR22_IV2_VBUFERR0             (0x0000FF00uL)
+#define INTC_ICDIPTR22_IV4_VBUFERR0             (0x00FF0000uL)
+#define INTC_ICDIPTR22_S1_WLINE0                (0xFF000000uL)
+
+#define INTC_ICDIPTR23_OIR_VI_VSYNC0            (0x000000FFuL)
+#define INTC_ICDIPTR23_OIR_LO_VSYNC0            (0x0000FF00uL)
+#define INTC_ICDIPTR23_OIR_VSYNCERR0            (0x00FF0000uL)
+#define INTC_ICDIPTR23_OIR_VFIELD0              (0xFF000000uL)
+
+#define INTC_ICDIPTR24_IV7_VBUFERR0             (0x000000FFuL)
+#define INTC_ICDIPTR24_IV8_VBUFERR0             (0x0000FF00uL)
+#define INTC_ICDIPTR24_S0_VI_VSYNC1             (0xFF000000uL)
+
+#define INTC_ICDIPTR25_S0_LO_VSYNC1             (0x000000FFuL)
+#define INTC_ICDIPTR25_S0_VSYNCERR1             (0x0000FF00uL)
+#define INTC_ICDIPTR25_GR3_VLINE1               (0x00FF0000uL)
+#define INTC_ICDIPTR25_S0_VFIELD1               (0xFF000000uL)
+
+#define INTC_ICDIPTR26_IV1_VBUFERR1             (0x000000FFuL)
+#define INTC_ICDIPTR26_IV3_VBUFERR1             (0x0000FF00uL)
+#define INTC_ICDIPTR26_IV5_VBUFERR1             (0x00FF0000uL)
+#define INTC_ICDIPTR26_IV6_VBUFERR1             (0xFF000000uL)
+
+#define INTC_ICDIPTR27_S0_WLINE1                (0x000000FFuL)
+#define INTC_ICDIPTR27_S1_VI_VSYNC1             (0x0000FF00uL)
+#define INTC_ICDIPTR27_S1_LO_VSYNC1             (0x00FF0000uL)
+#define INTC_ICDIPTR27_S1_VSYNCERR1             (0xFF000000uL)
+
+#define INTC_ICDIPTR28_S1_VFIELD1               (0x000000FFuL)
+#define INTC_ICDIPTR28_IV2_VBUFERR1             (0x0000FF00uL)
+#define INTC_ICDIPTR28_IV4_VBUFERR1             (0x00FF0000uL)
+#define INTC_ICDIPTR28_S1_WLINE1                (0xFF000000uL)
+
+#define INTC_ICDIPTR29_OIR_VI_VSYNC1            (0x000000FFuL)
+#define INTC_ICDIPTR29_OIR_LO_VSYNC1            (0x0000FF00uL)
+#define INTC_ICDIPTR29_OIR_VLINE1               (0x00FF0000uL)
+#define INTC_ICDIPTR29_OIR_VFIELD1              (0xFF000000uL)
+
+#define INTC_ICDIPTR30_IV7_VBUFERR1             (0x000000FFuL)
+#define INTC_ICDIPTR30_IV8_VBUFERR1             (0x0000FF00uL)
+#define INTC_ICDIPTR30_IMRDI                    (0xFF000000uL)
+
+#define INTC_ICDIPTR31_IMR2I0                   (0x000000FFuL)
+#define INTC_ICDIPTR31_IMR2I1                   (0x0000FF00uL)
+#define INTC_ICDIPTR31_JEDI                     (0x00FF0000uL)
+#define INTC_ICDIPTR31_JDTI                     (0xFF000000uL)
+
+#define INTC_ICDIPTR32_CMP0                     (0x000000FFuL)
+#define INTC_ICDIPTR32_CMP1                     (0x0000FF00uL)
+#define INTC_ICDIPTR32_INT0                     (0x00FF0000uL)
+#define INTC_ICDIPTR32_INT1                     (0xFF000000uL)
+
+#define INTC_ICDIPTR33_INT2                     (0x000000FFuL)
+#define INTC_ICDIPTR33_INT3                     (0x0000FF00uL)
+#define INTC_ICDIPTR33_OSTM0TINT                (0x00FF0000uL)
+#define INTC_ICDIPTR33_OSTM1TINT                (0xFF000000uL)
+
+#define INTC_ICDIPTR34_CMI                      (0x000000FFuL)
+#define INTC_ICDIPTR34_WTOUT                    (0x0000FF00uL)
+#define INTC_ICDIPTR34_ITI                      (0x00FF0000uL)
+#define INTC_ICDIPTR34_TGI0A                    (0xFF000000uL)
+
+#define INTC_ICDIPTR35_TGI0B                    (0x000000FFuL)
+#define INTC_ICDIPTR35_TGI0C                    (0x0000FF00uL)
+#define INTC_ICDIPTR35_TGI0D                    (0x00FF0000uL)
+#define INTC_ICDIPTR35_TGI0V                    (0xFF000000uL)
+
+#define INTC_ICDIPTR36_TGI0E                    (0x000000FFuL)
+#define INTC_ICDIPTR36_TGI0F                    (0x0000FF00uL)
+#define INTC_ICDIPTR36_TGI1A                    (0x00FF0000uL)
+#define INTC_ICDIPTR36_TGI1B                    (0xFF000000uL)
+
+#define INTC_ICDIPTR37_TGI1V                    (0x000000FFuL)
+#define INTC_ICDIPTR37_TGI1U                    (0x0000FF00uL)
+#define INTC_ICDIPTR37_TGI2A                    (0x00FF0000uL)
+#define INTC_ICDIPTR37_TGI2B                    (0xFF000000uL)
+
+#define INTC_ICDIPTR38_TGI2V                    (0x000000FFuL)
+#define INTC_ICDIPTR38_TGI2U                    (0x0000FF00uL)
+#define INTC_ICDIPTR38_TGI3A                    (0x00FF0000uL)
+#define INTC_ICDIPTR38_TGI3B                    (0xFF000000uL)
+
+#define INTC_ICDIPTR39_TGI3C                    (0x000000FFuL)
+#define INTC_ICDIPTR39_TGI3D                    (0x0000FF00uL)
+#define INTC_ICDIPTR39_TGI3V                    (0x00FF0000uL)
+#define INTC_ICDIPTR39_TGI4A                    (0xFF000000uL)
+
+#define INTC_ICDIPTR40_TGI4B                    (0x000000FFuL)
+#define INTC_ICDIPTR40_TGI4C                    (0x0000FF00uL)
+#define INTC_ICDIPTR40_TGI4D                    (0x00FF0000uL)
+#define INTC_ICDIPTR40_TGI4V                    (0xFF000000uL)
+
+#define INTC_ICDIPTR41_CMI1                     (0x000000FFuL)
+#define INTC_ICDIPTR41_CMI2                     (0x0000FF00uL)
+#define INTC_ICDIPTR41_SGDEI0                   (0x00FF0000uL)
+#define INTC_ICDIPTR41_SGDEI1                   (0xFF000000uL)
+
+#define INTC_ICDIPTR42_SGDEI2                   (0x000000FFuL)
+#define INTC_ICDIPTR42_SGDEI3                   (0x0000FF00uL)
+#define INTC_ICDIPTR42_ADI                      (0x00FF0000uL)
+#define INTC_ICDIPTR42_LMTI                     (0xFF000000uL)
+
+#define INTC_ICDIPTR43_SSII0                    (0x000000FFuL)
+#define INTC_ICDIPTR43_SSIRXI0                  (0x0000FF00uL)
+#define INTC_ICDIPTR43_SSITXI0                  (0x00FF0000uL)
+#define INTC_ICDIPTR43_SSII1                    (0xFF000000uL)
+
+#define INTC_ICDIPTR44_SSIRXI1                  (0x000000FFuL)
+#define INTC_ICDIPTR44_SSITXI1                  (0x0000FF00uL)
+#define INTC_ICDIPTR44_SSII2                    (0x00FF0000uL)
+#define INTC_ICDIPTR44_SSIRTI2                  (0xFF000000uL)
+
+#define INTC_ICDIPTR45_SSII3                    (0x000000FFuL)
+#define INTC_ICDIPTR45_SSIRXI3                  (0x0000FF00uL)
+#define INTC_ICDIPTR45_SSITXI3                  (0x00FF0000uL)
+#define INTC_ICDIPTR45_SSII4                    (0xFF000000uL)
+
+#define INTC_ICDIPTR46_SSIRTI4                  (0x000000FFuL)
+#define INTC_ICDIPTR46_SSII5                    (0x0000FF00uL)
+#define INTC_ICDIPTR46_SSIRXI5                  (0x00FF0000uL)
+#define INTC_ICDIPTR46_SSITXI5                  (0xFF000000uL)
+
+#define INTC_ICDIPTR47_SPDIFI                   (0x000000FFuL)
+#define INTC_ICDIPTR47_INTIICTEI0               (0x0000FF00uL)
+#define INTC_ICDIPTR47_INTIICRI0                (0x00FF0000uL)
+#define INTC_ICDIPTR47_INTIICTI0                (0xFF000000uL)
+
+#define INTC_ICDIPTR48_INTIICSPI0               (0x000000FFuL)
+#define INTC_ICDIPTR48_INTIICSTI0               (0x0000FF00uL)
+#define INTC_ICDIPTR48_INTIICNAKI0              (0x00FF0000uL)
+#define INTC_ICDIPTR48_INTIICALI0               (0xFF000000uL)
+
+#define INTC_ICDIPTR49_INTIICTMOI0              (0x000000FFuL)
+#define INTC_ICDIPTR49_INTIICTEI1               (0x0000FF00uL)
+#define INTC_ICDIPTR49_INTIICRI1                (0x00FF0000uL)
+#define INTC_ICDIPTR49_INTIICTI1                (0xFF000000uL)
+
+#define INTC_ICDIPTR50_INTIICSPI1               (0x000000FFuL)
+#define INTC_ICDIPTR50_INTIICSTI1               (0x0000FF00uL)
+#define INTC_ICDIPTR50_INTIICNAKI1              (0x00FF0000uL)
+#define INTC_ICDIPTR50_INTIICALI1               (0xFF000000uL)
+
+#define INTC_ICDIPTR51_INTIICTMOI1              (0x000000FFuL)
+#define INTC_ICDIPTR51_INTIICTEI2               (0x0000FF00uL)
+#define INTC_ICDIPTR51_INTIICRI2                (0x00FF0000uL)
+#define INTC_ICDIPTR51_INTIICTI2                (0xFF000000uL)
+
+#define INTC_ICDIPTR52_INTIICSPI2               (0x000000FFuL)
+#define INTC_ICDIPTR52_INTIICSTI2               (0x0000FF00uL)
+#define INTC_ICDIPTR52_INTIICNAKI2              (0x00FF0000uL)
+#define INTC_ICDIPTR52_INTIICALI2               (0xFF000000uL)
+
+#define INTC_ICDIPTR53_INTIICTMOI2              (0x000000FFuL)
+#define INTC_ICDIPTR53_INTIICTEI3               (0x0000FF00uL)
+#define INTC_ICDIPTR53_INTIICRI3                (0x00FF0000uL)
+#define INTC_ICDIPTR53_INTIICTI3                (0xFF000000uL)
+
+#define INTC_ICDIPTR54_INTIICSPI3               (0x000000FFuL)
+#define INTC_ICDIPTR54_INTIICSTI3               (0x0000FF00uL)
+#define INTC_ICDIPTR54_INTIICNAKI3              (0x00FF0000uL)
+#define INTC_ICDIPTR54_INTIICALI3               (0xFF000000uL)
+
+#define INTC_ICDIPTR55_INTIICTMOI3              (0x000000FFuL)
+#define INTC_ICDIPTR55_BRI0                     (0x0000FF00uL)
+#define INTC_ICDIPTR55_ERI0                     (0x00FF0000uL)
+#define INTC_ICDIPTR55_RXI0                     (0xFF000000uL)
+
+#define INTC_ICDIPTR56_TXI0                     (0x000000FFuL)
+#define INTC_ICDIPTR56_BRI1                     (0x0000FF00uL)
+#define INTC_ICDIPTR56_ERI1                     (0x00FF0000uL)
+#define INTC_ICDIPTR56_RXI1                     (0xFF000000uL)
+
+#define INTC_ICDIPTR57_TXI1                     (0x000000FFuL)
+#define INTC_ICDIPTR57_BRI2                     (0x0000FF00uL)
+#define INTC_ICDIPTR57_ERI2                     (0x00FF0000uL)
+#define INTC_ICDIPTR57_RXI2                     (0xFF000000uL)
+
+#define INTC_ICDIPTR58_TXI2                     (0x000000FFuL)
+#define INTC_ICDIPTR58_BRI3                     (0x0000FF00uL)
+#define INTC_ICDIPTR58_ERI3                     (0x00FF0000uL)
+#define INTC_ICDIPTR58_RXI3                     (0xFF000000uL)
+
+#define INTC_ICDIPTR59_TXI3                     (0x000000FFuL)
+#define INTC_ICDIPTR59_BRI4                     (0x0000FF00uL)
+#define INTC_ICDIPTR59_ERI4                     (0x00FF0000uL)
+#define INTC_ICDIPTR59_RXI4                     (0xFF000000uL)
+
+#define INTC_ICDIPTR60_TXI4                     (0x000000FFuL)
+#define INTC_ICDIPTR60_BRI5                     (0x0000FF00uL)
+#define INTC_ICDIPTR60_ERI5                     (0x00FF0000uL)
+#define INTC_ICDIPTR60_RXI5                     (0xFF000000uL)
+
+#define INTC_ICDIPTR61_TXI5                     (0x000000FFuL)
+#define INTC_ICDIPTR61_BRI6                     (0x0000FF00uL)
+#define INTC_ICDIPTR61_ERI6                     (0x00FF0000uL)
+#define INTC_ICDIPTR61_RXI6                     (0xFF000000uL)
+
+#define INTC_ICDIPTR62_TXI6                     (0x000000FFuL)
+#define INTC_ICDIPTR62_BRI7                     (0x0000FF00uL)
+#define INTC_ICDIPTR62_ERI7                     (0x00FF0000uL)
+#define INTC_ICDIPTR62_RXI7                     (0xFF000000uL)
+
+#define INTC_ICDIPTR63_TXI7                     (0x000000FFuL)
+#define INTC_ICDIPTR63_INTRCANGERR              (0x0000FF00uL)
+#define INTC_ICDIPTR63_INTRCANGRECC             (0x00FF0000uL)
+#define INTC_ICDIPTR63_INTRCAN0REC              (0xFF000000uL)
+
+#define INTC_ICDIPTR64_INTRCAN0ERR              (0x000000FFuL)
+#define INTC_ICDIPTR64_INTRCAN0TRX              (0x0000FF00uL)
+#define INTC_ICDIPTR64_INTRCAN1REC              (0x00FF0000uL)
+#define INTC_ICDIPTR64_INTRCAN1ERR              (0xFF000000uL)
+
+#define INTC_ICDIPTR65_INTRCAN1TRX              (0x000000FFuL)
+#define INTC_ICDIPTR65_INTRCAN2REC              (0x0000FF00uL)
+#define INTC_ICDIPTR65_INTRCAN2ERR              (0x00FF0000uL)
+#define INTC_ICDIPTR65_INTRCAN2TRX              (0xFF000000uL)
+
+#define INTC_ICDIPTR66_INTRCAN3REC              (0x000000FFuL)
+#define INTC_ICDIPTR66_INTRCAN3ERR              (0x0000FF00uL)
+#define INTC_ICDIPTR66_INTRCAN3TRX              (0x00FF0000uL)
+#define INTC_ICDIPTR66_INTRCAN4REC              (0xFF000000uL)
+
+#define INTC_ICDIPTR67_INTRCAN4ERR              (0x000000FFuL)
+#define INTC_ICDIPTR67_INTRCAN4TRX              (0x0000FF00uL)
+#define INTC_ICDIPTR67_SPEI0                    (0x00FF0000uL)
+#define INTC_ICDIPTR67_SPRI0                    (0xFF000000uL)
+
+#define INTC_ICDIPTR68_SPTI0                    (0x000000FFuL)
+#define INTC_ICDIPTR68_SPEI1                    (0x0000FF00uL)
+#define INTC_ICDIPTR68_SPRI1                    (0x00FF0000uL)
+#define INTC_ICDIPTR68_SPTI1                    (0xFF000000uL)
+
+#define INTC_ICDIPTR69_SPEI2                    (0x000000FFuL)
+#define INTC_ICDIPTR69_SPRI2                    (0x0000FF00uL)
+#define INTC_ICDIPTR69_SPTI2                    (0x00FF0000uL)
+#define INTC_ICDIPTR69_SPEI3                    (0xFF000000uL)
+
+#define INTC_ICDIPTR70_SPRI3                    (0x000000FFuL)
+#define INTC_ICDIPTR70_SPTI3                    (0x0000FF00uL)
+#define INTC_ICDIPTR70_SPEI4                    (0x00FF0000uL)
+#define INTC_ICDIPTR70_SPRI4                    (0xFF000000uL)
+
+#define INTC_ICDIPTR71_SPTI4                    (0x000000FFuL)
+#define INTC_ICDIPTR71_IEBBTD                   (0x0000FF00uL)
+#define INTC_ICDIPTR71_IEBBTERR                 (0x00FF0000uL)
+#define INTC_ICDIPTR71_IEBBTSTA                 (0xFF000000uL)
+
+#define INTC_ICDIPTR72_IEBBTV                   (0x000000FFuL)
+#define INTC_ICDIPTR72_ISY                      (0x0000FF00uL)
+#define INTC_ICDIPTR72_IERR                     (0x00FF0000uL)
+#define INTC_ICDIPTR72_ITARG                    (0xFF000000uL)
+
+#define INTC_ICDIPTR73_ISEC                     (0x000000FFuL)
+#define INTC_ICDIPTR73_IBUF                     (0x0000FF00uL)
+#define INTC_ICDIPTR73_IREADY                   (0x00FF0000uL)
+#define INTC_ICDIPTR73_FLSTE                    (0xFF000000uL)
+
+#define INTC_ICDIPTR74_FLTENDI                  (0x000000FFuL)
+#define INTC_ICDIPTR74_FLTREQ0I                 (0x0000FF00uL)
+#define INTC_ICDIPTR74_FLTREQ1I                 (0x00FF0000uL)
+#define INTC_ICDIPTR74_MMC0                     (0xFF000000uL)
+
+#define INTC_ICDIPTR75_MMC1                     (0x000000FFuL)
+#define INTC_ICDIPTR75_MMC2                     (0x0000FF00uL)
+#define INTC_ICDIPTR75_SDHI0_3                  (0x00FF0000uL)
+#define INTC_ICDIPTR75_SDHI0_0                  (0xFF000000uL)
+
+#define INTC_ICDIPTR76_SDHI0_1                  (0x000000FFuL)
+#define INTC_ICDIPTR76_SDHI1_3                  (0x0000FF00uL)
+#define INTC_ICDIPTR76_SDHI1_0                  (0x00FF0000uL)
+#define INTC_ICDIPTR76_SDHI1_1                  (0xFF000000uL)
+
+#define INTC_ICDIPTR77_ARM                      (0x000000FFuL)
+#define INTC_ICDIPTR77_PRD                      (0x0000FF00uL)
+#define INTC_ICDIPTR77_CUP                      (0x00FF0000uL)
+#define INTC_ICDIPTR77_SCUAI0                   (0xFF000000uL)
+
+#define INTC_ICDIPTR78_SCUAI1                   (0x000000FFuL)
+#define INTC_ICDIPTR78_SCUFDI0                  (0x0000FF00uL)
+#define INTC_ICDIPTR78_SCUFDI1                  (0x00FF0000uL)
+#define INTC_ICDIPTR78_SCUFDI2                  (0xFF000000uL)
+
+#define INTC_ICDIPTR79_SCUFDI3                  (0x000000FFuL)
+#define INTC_ICDIPTR79_SCUFUI0                  (0x0000FF00uL)
+#define INTC_ICDIPTR79_SCUFUI1                  (0x00FF0000uL)
+#define INTC_ICDIPTR79_SCUFUI2                  (0xFF000000uL)
+
+#define INTC_ICDIPTR80_SCUFUI3                  (0x000000FFuL)
+#define INTC_ICDIPTR80_SCUDVI0                  (0x0000FF00uL)
+#define INTC_ICDIPTR80_SCUDVI1                  (0x00FF0000uL)
+#define INTC_ICDIPTR80_SCUDVI2                  (0xFF000000uL)
+
+#define INTC_ICDIPTR81_SCUDVI3                  (0x000000FFuL)
+#define INTC_ICDIPTR81_MLB_CINT                 (0x0000FF00uL)
+#define INTC_ICDIPTR81_MLB_SINT                 (0x00FF0000uL)
+#define INTC_ICDIPTR81_DRC0                     (0xFF000000uL)
+
+#define INTC_ICDIPTR82_DRC1                     (0x000000FFuL)
+#define INTC_ICDIPTR82_LINI0_INT_T              (0xFF000000uL)
+
+#define INTC_ICDIPTR83_LINI0_INT_R              (0x000000FFuL)
+#define INTC_ICDIPTR83_LINI0_INT_S              (0x0000FF00uL)
+#define INTC_ICDIPTR83_LINI0_INT_M              (0x00FF0000uL)
+#define INTC_ICDIPTR83_LINI1_INT_T              (0xFF000000uL)
+
+#define INTC_ICDIPTR84_LINI1_INT_R              (0x000000FFuL)
+#define INTC_ICDIPTR84_LINI1_INT_S              (0x0000FF00uL)
+#define INTC_ICDIPTR84_LINI1_INT_M              (0x00FF0000uL)
+
+#define INTC_ICDIPTR86_ERI0                     (0xFF000000uL)
+
+#define INTC_ICDIPTR87_RXI0                     (0x000000FFuL)
+#define INTC_ICDIPTR87_TXI0                     (0x0000FF00uL)
+#define INTC_ICDIPTR87_TEI0                     (0x00FF0000uL)
+#define INTC_ICDIPTR87_ERI1                     (0xFF000000uL)
+
+#define INTC_ICDIPTR88_RXI1                     (0x000000FFuL)
+#define INTC_ICDIPTR88_TXI1                     (0x0000FF00uL)
+#define INTC_ICDIPTR88_TEI1                     (0x00FF0000uL)
+#define INTC_ICDIPTR88_AVBI_DATA                (0xFF000000uL)
+
+#define INTC_ICDIPTR89_AVBI_ERROR               (0x000000FFuL)
+#define INTC_ICDIPTR89_AVBI_MANAGE              (0x0000FF00uL)
+#define INTC_ICDIPTR89_AVBI_MAC                 (0x00FF0000uL)
+#define INTC_ICDIPTR89_ETHERI                   (0xFF000000uL)
+
+#define INTC_ICDIPTR91_CEUI                     (0x000000FFuL)
+
+#define INTC_ICDIPTR95_H2XMLB_ERRINT            (0x0000FF00uL)
+#define INTC_ICDIPTR95_H2XIC1_ERRINT            (0x00FF0000uL)
+#define INTC_ICDIPTR95_X2HPERI1_ERRINT          (0xFF000000uL)
+
+#define INTC_ICDIPTR96_X2HPERI2_ERRINT          (0x000000FFuL)
+#define INTC_ICDIPTR96_X2HPERI34_ERRINT         (0x0000FF00uL)
+#define INTC_ICDIPTR96_X2HPERI5_ERRINT          (0x00FF0000uL)
+#define INTC_ICDIPTR96_X2HPERI67_ERRINT         (0xFF000000uL)
+
+#define INTC_ICDIPTR97_X2HDBGR_ERRINT           (0x000000FFuL)
+#define INTC_ICDIPTR97_X2HBSC_ERRINT            (0x0000FF00uL)
+#define INTC_ICDIPTR97_X2HSPI1_ERRINT           (0x00FF0000uL)
+#define INTC_ICDIPTR97_X2HSPI2_ERRINT           (0xFF000000uL)
+
+#define INTC_ICDIPTR98_PRRI                     (0x000000FFuL)
+#define INTC_ICDIPTR98_IFEI0                    (0x0000FF00uL)
+#define INTC_ICDIPTR98_OFFI0                    (0x00FF0000uL)
+#define INTC_ICDIPTR98_PFVEI0                   (0xFF000000uL)
+
+#define INTC_ICDIPTR99_IFEI1                    (0x000000FFuL)
+#define INTC_ICDIPTR99_OFFI1                    (0x0000FF00uL)
+#define INTC_ICDIPTR99_PFVEI1                   (0x00FF0000uL)
+
+#define INTC_ICDIPTR104_TINT0                   (0x000000FFuL)
+#define INTC_ICDIPTR104_TINT1                   (0x0000FF00uL)
+#define INTC_ICDIPTR104_TINT2                   (0x00FF0000uL)
+#define INTC_ICDIPTR104_TINT3                   (0xFF000000uL)
+
+#define INTC_ICDIPTR105_TINT4                   (0x000000FFuL)
+#define INTC_ICDIPTR105_TINT5                   (0x0000FF00uL)
+#define INTC_ICDIPTR105_TINT6                   (0x00FF0000uL)
+#define INTC_ICDIPTR105_TINT7                   (0xFF000000uL)
+
+#define INTC_ICDIPTR106_TINT8                   (0x000000FFuL)
+#define INTC_ICDIPTR106_TINT9                   (0x0000FF00uL)
+#define INTC_ICDIPTR106_TINT10                  (0x00FF0000uL)
+#define INTC_ICDIPTR106_TINT11                  (0xFF000000uL)
+
+#define INTC_ICDIPTR107_TINT12                  (0x000000FFuL)
+#define INTC_ICDIPTR107_TINT13                  (0x0000FF00uL)
+#define INTC_ICDIPTR107_TINT14                  (0x00FF0000uL)
+#define INTC_ICDIPTR107_TINT15                  (0xFF000000uL)
+
+#define INTC_ICDIPTR108_TINT16                  (0x000000FFuL)
+#define INTC_ICDIPTR108_TINT17                  (0x0000FF00uL)
+#define INTC_ICDIPTR108_TINT18                  (0x00FF0000uL)
+#define INTC_ICDIPTR108_TINT19                  (0xFF000000uL)
+
+#define INTC_ICDIPTR109_TINT20                  (0x000000FFuL)
+#define INTC_ICDIPTR109_TINT21                  (0x0000FF00uL)
+#define INTC_ICDIPTR109_TINT22                  (0x00FF0000uL)
+#define INTC_ICDIPTR109_TINT23                  (0xFF000000uL)
+
+#define INTC_ICDIPTR110_TINT24                  (0x000000FFuL)
+#define INTC_ICDIPTR110_TINT25                  (0x0000FF00uL)
+#define INTC_ICDIPTR110_TINT26                  (0x00FF0000uL)
+#define INTC_ICDIPTR110_TINT27                  (0xFF000000uL)
+
+#define INTC_ICDIPTR111_TINT28                  (0x000000FFuL)
+#define INTC_ICDIPTR111_TINT29                  (0x0000FF00uL)
+#define INTC_ICDIPTR111_TINT30                  (0x00FF0000uL)
+#define INTC_ICDIPTR111_TINT31                  (0xFF000000uL)
+
+#define INTC_ICDIPTR112_TINT32                  (0x000000FFuL)
+#define INTC_ICDIPTR112_TINT33                  (0x0000FF00uL)
+#define INTC_ICDIPTR112_TINT34                  (0x00FF0000uL)
+#define INTC_ICDIPTR112_TINT35                  (0xFF000000uL)
+
+#define INTC_ICDIPTR113_TINT36                  (0x000000FFuL)
+#define INTC_ICDIPTR113_TINT37                  (0x0000FF00uL)
+#define INTC_ICDIPTR113_TINT38                  (0x00FF0000uL)
+#define INTC_ICDIPTR113_TINT39                  (0xFF000000uL)
+
+#define INTC_ICDIPTR114_TINT40                  (0x000000FFuL)
+#define INTC_ICDIPTR114_TINT41                  (0x0000FF00uL)
+#define INTC_ICDIPTR114_TINT42                  (0x00FF0000uL)
+#define INTC_ICDIPTR114_TINT43                  (0xFF000000uL)
+
+#define INTC_ICDIPTR115_TINT44                  (0x000000FFuL)
+#define INTC_ICDIPTR115_TINT45                  (0x0000FF00uL)
+#define INTC_ICDIPTR115_TINT46                  (0x00FF0000uL)
+#define INTC_ICDIPTR115_TINT47                  (0xFF000000uL)
+
+#define INTC_ICDIPTR116_TINT48                  (0x000000FFuL)
+#define INTC_ICDIPTR116_TINT49                  (0x0000FF00uL)
+#define INTC_ICDIPTR116_TINT50                  (0x00FF0000uL)
+#define INTC_ICDIPTR116_TINT51                  (0xFF000000uL)
+
+#define INTC_ICDIPTR117_TINT52                  (0x000000FFuL)
+#define INTC_ICDIPTR117_TINT53                  (0x0000FF00uL)
+#define INTC_ICDIPTR117_TINT54                  (0x00FF0000uL)
+#define INTC_ICDIPTR117_TINT55                  (0xFF000000uL)
+
+#define INTC_ICDIPTR118_TINT56                  (0x000000FFuL)
+#define INTC_ICDIPTR118_TINT57                  (0x0000FF00uL)
+#define INTC_ICDIPTR118_TINT58                  (0x00FF0000uL)
+#define INTC_ICDIPTR118_TINT59                  (0xFF000000uL)
+
+#define INTC_ICDIPTR119_TINT60                  (0x000000FFuL)
+#define INTC_ICDIPTR119_TINT61                  (0x0000FF00uL)
+#define INTC_ICDIPTR119_TINT62                  (0x00FF0000uL)
+#define INTC_ICDIPTR119_TINT63                  (0xFF000000uL)
+
+#define INTC_ICDIPTR120_TINT64                  (0x000000FFuL)
+#define INTC_ICDIPTR120_TINT65                  (0x0000FF00uL)
+#define INTC_ICDIPTR120_TINT66                  (0x00FF0000uL)
+#define INTC_ICDIPTR120_TINT67                  (0xFF000000uL)
+
+#define INTC_ICDIPTR121_TINT68                  (0x000000FFuL)
+#define INTC_ICDIPTR121_TINT69                  (0x0000FF00uL)
+#define INTC_ICDIPTR121_TINT70                  (0x00FF0000uL)
+#define INTC_ICDIPTR121_TINT71                  (0xFF000000uL)
+
+#define INTC_ICDIPTR122_TINT72                  (0x000000FFuL)
+#define INTC_ICDIPTR122_TINT73                  (0x0000FF00uL)
+#define INTC_ICDIPTR122_TINT74                  (0x00FF0000uL)
+#define INTC_ICDIPTR122_TINT75                  (0xFF000000uL)
+
+#define INTC_ICDIPTR123_TINT76                  (0x000000FFuL)
+#define INTC_ICDIPTR123_TINT77                  (0x0000FF00uL)
+#define INTC_ICDIPTR123_TINT78                  (0x00FF0000uL)
+#define INTC_ICDIPTR123_TINT79                  (0xFF000000uL)
+
+#define INTC_ICDIPTR124_TINT80                  (0x000000FFuL)
+#define INTC_ICDIPTR124_TINT81                  (0x0000FF00uL)
+#define INTC_ICDIPTR124_TINT82                  (0x00FF0000uL)
+#define INTC_ICDIPTR124_TINT83                  (0xFF000000uL)
+
+#define INTC_ICDIPTR125_TINT84                  (0x000000FFuL)
+#define INTC_ICDIPTR125_TINT85                  (0x0000FF00uL)
+#define INTC_ICDIPTR125_TINT86                  (0x00FF0000uL)
+#define INTC_ICDIPTR125_TINT87                  (0xFF000000uL)
+
+#define INTC_ICDIPTR126_TINT88                  (0x000000FFuL)
+#define INTC_ICDIPTR126_TINT89                  (0x0000FF00uL)
+#define INTC_ICDIPTR126_TINT90                  (0x00FF0000uL)
+#define INTC_ICDIPTR126_TINT91                  (0xFF000000uL)
+
+#define INTC_ICDIPTR127_TINT92                  (0x000000FFuL)
+#define INTC_ICDIPTR127_TINT93                  (0x0000FF00uL)
+#define INTC_ICDIPTR127_TINT94                  (0x00FF0000uL)
+#define INTC_ICDIPTR127_TINT95                  (0xFF000000uL)
+
+#define INTC_ICDIPTR128_TINT96                  (0x000000FFuL)
+#define INTC_ICDIPTR128_TINT97                  (0x0000FF00uL)
+#define INTC_ICDIPTR128_TINT98                  (0x00FF0000uL)
+#define INTC_ICDIPTR128_TINT99                  (0xFF000000uL)
+
+#define INTC_ICDIPTR129_TINT100                 (0x000000FFuL)
+#define INTC_ICDIPTR129_TINT101                 (0x0000FF00uL)
+#define INTC_ICDIPTR129_TINT102                 (0x00FF0000uL)
+#define INTC_ICDIPTR129_TINT103                 (0xFF000000uL)
+
+#define INTC_ICDIPTR130_TINT104                 (0x000000FFuL)
+#define INTC_ICDIPTR130_TINT105                 (0x0000FF00uL)
+#define INTC_ICDIPTR130_TINT106                 (0x00FF0000uL)
+#define INTC_ICDIPTR130_TINT107                 (0xFF000000uL)
+
+#define INTC_ICDIPTR131_TINT108                 (0x000000FFuL)
+#define INTC_ICDIPTR131_TINT109                 (0x0000FF00uL)
+#define INTC_ICDIPTR131_TINT110                 (0x00FF0000uL)
+#define INTC_ICDIPTR131_TINT111                 (0xFF000000uL)
+
+#define INTC_ICDIPTR132_TINT112                 (0x000000FFuL)
+#define INTC_ICDIPTR132_TINT113                 (0x0000FF00uL)
+#define INTC_ICDIPTR132_TINT114                 (0x00FF0000uL)
+#define INTC_ICDIPTR132_TINT115                 (0xFF000000uL)
+
+#define INTC_ICDIPTR133_TINT116                 (0x000000FFuL)
+#define INTC_ICDIPTR133_TINT117                 (0x0000FF00uL)
+#define INTC_ICDIPTR133_TINT118                 (0x00FF0000uL)
+#define INTC_ICDIPTR133_TINT119                 (0xFF000000uL)
+
+#define INTC_ICDIPTR134_TINT120                 (0x000000FFuL)
+#define INTC_ICDIPTR134_TINT121                 (0x0000FF00uL)
+#define INTC_ICDIPTR134_TINT122                 (0x00FF0000uL)
+#define INTC_ICDIPTR134_TINT123                 (0xFF000000uL)
+
+#define INTC_ICDIPTR135_TINT124                 (0x000000FFuL)
+#define INTC_ICDIPTR135_TINT125                 (0x0000FF00uL)
+#define INTC_ICDIPTR135_TINT126                 (0x00FF0000uL)
+#define INTC_ICDIPTR135_TINT127                 (0xFF000000uL)
+
+#define INTC_ICDIPTR136_TINT128                 (0x000000FFuL)
+#define INTC_ICDIPTR136_TINT129                 (0x0000FF00uL)
+#define INTC_ICDIPTR136_TINT130                 (0x00FF0000uL)
+#define INTC_ICDIPTR136_TINT131                 (0xFF000000uL)
+
+#define INTC_ICDIPTR137_TINT132                 (0x000000FFuL)
+#define INTC_ICDIPTR137_TINT133                 (0x0000FF00uL)
+#define INTC_ICDIPTR137_TINT134                 (0x00FF0000uL)
+#define INTC_ICDIPTR137_TINT135                 (0xFF000000uL)
+
+#define INTC_ICDIPTR138_TINT136                 (0x000000FFuL)
+#define INTC_ICDIPTR138_TINT137                 (0x0000FF00uL)
+#define INTC_ICDIPTR138_TINT138                 (0x00FF0000uL)
+#define INTC_ICDIPTR138_TINT139                 (0xFF000000uL)
+
+#define INTC_ICDIPTR139_TINT140                 (0x000000FFuL)
+#define INTC_ICDIPTR139_TINT141                 (0x0000FF00uL)
+#define INTC_ICDIPTR139_TINT142                 (0x00FF0000uL)
+#define INTC_ICDIPTR139_TINT143                 (0xFF000000uL)
+
+#define INTC_ICDIPTR140_TINT144                 (0x000000FFuL)
+#define INTC_ICDIPTR140_TINT145                 (0x0000FF00uL)
+#define INTC_ICDIPTR140_TINT146                 (0x00FF0000uL)
+#define INTC_ICDIPTR140_TINT147                 (0xFF000000uL)
+
+#define INTC_ICDIPTR141_TINT148                 (0x000000FFuL)
+#define INTC_ICDIPTR141_TINT149                 (0x0000FF00uL)
+#define INTC_ICDIPTR141_TINT150                 (0x00FF0000uL)
+#define INTC_ICDIPTR141_TINT151                 (0xFF000000uL)
+
+#define INTC_ICDIPTR142_TINT152                 (0x000000FFuL)
+#define INTC_ICDIPTR142_TINT153                 (0x0000FF00uL)
+#define INTC_ICDIPTR142_TINT154                 (0x00FF0000uL)
+#define INTC_ICDIPTR142_TINT155                 (0xFF000000uL)
+
+#define INTC_ICDIPTR143_TINT156                 (0x000000FFuL)
+#define INTC_ICDIPTR143_TINT157                 (0x0000FF00uL)
+#define INTC_ICDIPTR143_TINT158                 (0x00FF0000uL)
+#define INTC_ICDIPTR143_TINT159                 (0xFF000000uL)
+
+#define INTC_ICDIPTR144_TINT160                 (0x000000FFuL)
+#define INTC_ICDIPTR144_TINT161                 (0x0000FF00uL)
+#define INTC_ICDIPTR144_TINT162                 (0x00FF0000uL)
+#define INTC_ICDIPTR144_TINT163                 (0xFF000000uL)
+
+#define INTC_ICDIPTR145_TINT164                 (0x000000FFuL)
+#define INTC_ICDIPTR145_TINT165                 (0x0000FF00uL)
+#define INTC_ICDIPTR145_TINT166                 (0x00FF0000uL)
+#define INTC_ICDIPTR145_TINT167                 (0xFF000000uL)
+
+#define INTC_ICDIPTR146_TINT168                 (0x000000FFuL)
+#define INTC_ICDIPTR146_TINT169                 (0x0000FF00uL)
+#define INTC_ICDIPTR146_TINT170                 (0x00FF0000uL)
+
+#define INTC_ICDICFR0_SW0_0                     (0x00000001uL)
+#define INTC_ICDICFR0_SW0_1                     (0x00000002uL)
+#define INTC_ICDICFR0_SW1_0                     (0x00000004uL)
+#define INTC_ICDICFR0_SW1_1                     (0x00000008uL)
+#define INTC_ICDICFR0_SW2_0                     (0x00000010uL)
+#define INTC_ICDICFR0_SW2_1                     (0x00000020uL)
+#define INTC_ICDICFR0_SW3_0                     (0x00000040uL)
+#define INTC_ICDICFR0_SW3_1                     (0x00000080uL)
+#define INTC_ICDICFR0_SW4_0                     (0x00000100uL)
+#define INTC_ICDICFR0_SW4_1                     (0x00000200uL)
+#define INTC_ICDICFR0_SW5_0                     (0x00000400uL)
+#define INTC_ICDICFR0_SW5_1                     (0x00000800uL)
+#define INTC_ICDICFR0_SW6_0                     (0x00001000uL)
+#define INTC_ICDICFR0_SW6_1                     (0x00002000uL)
+#define INTC_ICDICFR0_SW7_0                     (0x00004000uL)
+#define INTC_ICDICFR0_SW7_1                     (0x00008000uL)
+#define INTC_ICDICFR0_SW8_0                     (0x00010000uL)
+#define INTC_ICDICFR0_SW8_1                     (0x00020000uL)
+#define INTC_ICDICFR0_SW9_0                     (0x00040000uL)
+#define INTC_ICDICFR0_SW9_1                     (0x00080000uL)
+#define INTC_ICDICFR0_SW10_0                    (0x00100000uL)
+#define INTC_ICDICFR0_SW10_1                    (0x00200000uL)
+#define INTC_ICDICFR0_SW11_0                    (0x00400000uL)
+#define INTC_ICDICFR0_SW11_1                    (0x00800000uL)
+#define INTC_ICDICFR0_SW12_0                    (0x01000000uL)
+#define INTC_ICDICFR0_SW12_1                    (0x02000000uL)
+#define INTC_ICDICFR0_SW13_0                    (0x04000000uL)
+#define INTC_ICDICFR0_SW13_1                    (0x08000000uL)
+#define INTC_ICDICFR0_SW14_0                    (0x10000000uL)
+#define INTC_ICDICFR0_SW14_1                    (0x20000000uL)
+#define INTC_ICDICFR0_SW15_0                    (0x40000000uL)
+#define INTC_ICDICFR0_SW15_1                    (0x80000000uL)
+
+#define INTC_ICDICFR1_PMUIRQ0_0                 (0x00000001uL)
+#define INTC_ICDICFR1_PMUIRQ0_1                 (0x00000002uL)
+#define INTC_ICDICFR1_COMMRX0_0                 (0x00000004uL)
+#define INTC_ICDICFR1_COMMRX0_1                 (0x00000008uL)
+#define INTC_ICDICFR1_COMMTX0_0                 (0x00000010uL)
+#define INTC_ICDICFR1_COMMTX0_1                 (0x00000020uL)
+#define INTC_ICDICFR1_CTIIRQ0_0                 (0x00000040uL)
+#define INTC_ICDICFR1_CTIIRQ0_1                 (0x00000080uL)
+
+#define INTC_ICDICFR2_IRQ0_0                    (0x00000001uL)
+#define INTC_ICDICFR2_IRQ0_1                    (0x00000002uL)
+#define INTC_ICDICFR2_IRQ1_0                    (0x00000004uL)
+#define INTC_ICDICFR2_IRQ1_1                    (0x00000008uL)
+#define INTC_ICDICFR2_IRQ2_0                    (0x00000010uL)
+#define INTC_ICDICFR2_IRQ2_1                    (0x00000020uL)
+#define INTC_ICDICFR2_IRQ3_0                    (0x00000040uL)
+#define INTC_ICDICFR2_IRQ3_1                    (0x00000080uL)
+#define INTC_ICDICFR2_IRQ4_0                    (0x00000100uL)
+#define INTC_ICDICFR2_IRQ4_1                    (0x00000200uL)
+#define INTC_ICDICFR2_IRQ5_0                    (0x00000400uL)
+#define INTC_ICDICFR2_IRQ5_1                    (0x00000800uL)
+#define INTC_ICDICFR2_IRQ6_0                    (0x00001000uL)
+#define INTC_ICDICFR2_IRQ6_1                    (0x00002000uL)
+#define INTC_ICDICFR2_IRQ7_0                    (0x00004000uL)
+#define INTC_ICDICFR2_IRQ7_1                    (0x00008000uL)
+#define INTC_ICDICFR2_PL310ERR_0                (0x00010000uL)
+#define INTC_ICDICFR2_PL310ERR_1                (0x00020000uL)
+#define INTC_ICDICFR2_DMAINT0_0                 (0x00040000uL)
+#define INTC_ICDICFR2_DMAINT0_1                 (0x00080000uL)
+#define INTC_ICDICFR2_DMAINT1_0                 (0x00100000uL)
+#define INTC_ICDICFR2_DMAINT1_1                 (0x00200000uL)
+#define INTC_ICDICFR2_DMAINT2_0                 (0x00400000uL)
+#define INTC_ICDICFR2_DMAINT2_1                 (0x00800000uL)
+#define INTC_ICDICFR2_DMAINT3_0                 (0x01000000uL)
+#define INTC_ICDICFR2_DMAINT3_1                 (0x02000000uL)
+#define INTC_ICDICFR2_DMAINT4_0                 (0x04000000uL)
+#define INTC_ICDICFR2_DMAINT4_1                 (0x08000000uL)
+#define INTC_ICDICFR2_DMAINT5_0                 (0x10000000uL)
+#define INTC_ICDICFR2_DMAINT5_1                 (0x20000000uL)
+#define INTC_ICDICFR2_DMAINT6_0                 (0x40000000uL)
+#define INTC_ICDICFR2_DMAINT6_1                 (0x80000000uL)
+
+#define INTC_ICDICFR3_DMAINT7_0                 (0x00000001uL)
+#define INTC_ICDICFR3_DMAINT7_1                 (0x00000002uL)
+#define INTC_ICDICFR3_DMAINT8_0                 (0x00000004uL)
+#define INTC_ICDICFR3_DMAINT8_1                 (0x00000008uL)
+#define INTC_ICDICFR3_DMAINT9_0                 (0x00000010uL)
+#define INTC_ICDICFR3_DMAINT9_1                 (0x00000020uL)
+#define INTC_ICDICFR3_DMAINT10_0                (0x00000040uL)
+#define INTC_ICDICFR3_DMAINT10_1                (0x00000080uL)
+#define INTC_ICDICFR3_DMAINT11_0                (0x00000100uL)
+#define INTC_ICDICFR3_DMAINT11_1                (0x00000200uL)
+#define INTC_ICDICFR3_DMAINT12_0                (0x00000400uL)
+#define INTC_ICDICFR3_DMAINT12_1                (0x00000800uL)
+#define INTC_ICDICFR3_DMAINT13_0                (0x00001000uL)
+#define INTC_ICDICFR3_DMAINT13_1                (0x00002000uL)
+#define INTC_ICDICFR3_DMAINT14_0                (0x00004000uL)
+#define INTC_ICDICFR3_DMAINT14_1                (0x00008000uL)
+#define INTC_ICDICFR3_DMAINT15_0                (0x00010000uL)
+#define INTC_ICDICFR3_DMAINT15_1                (0x00020000uL)
+#define INTC_ICDICFR3_DMAERR_0                  (0x00040000uL)
+#define INTC_ICDICFR3_DMAERR_1                  (0x00080000uL)
+
+#define INTC_ICDICFR4_USBI0_0                   (0x00040000uL)
+#define INTC_ICDICFR4_USBI0_1                   (0x00080000uL)
+#define INTC_ICDICFR4_USBI1_0                   (0x00100000uL)
+#define INTC_ICDICFR4_USBI1_1                   (0x00200000uL)
+#define INTC_ICDICFR4_S0_VI_VSYNC0_0            (0x00400000uL)
+#define INTC_ICDICFR4_S0_VI_VSYNC0_1            (0x00800000uL)
+#define INTC_ICDICFR4_S0_LO_VSYNC0_0            (0x01000000uL)
+#define INTC_ICDICFR4_S0_LO_VSYNC0_1            (0x02000000uL)
+#define INTC_ICDICFR4_S0_VSYNCERR0_0            (0x04000000uL)
+#define INTC_ICDICFR4_S0_VSYNCERR0_1            (0x08000000uL)
+#define INTC_ICDICFR4_GR3_VLINE0_0              (0x10000000uL)
+#define INTC_ICDICFR4_GR3_VLINE0_1              (0x20000000uL)
+#define INTC_ICDICFR4_S0_VFIELD0_0              (0x40000000uL)
+#define INTC_ICDICFR4_S0_VFIELD0_1              (0x80000000uL)
+
+#define INTC_ICDICFR5_IV1_VBUFERR0_0            (0x00000001uL)
+#define INTC_ICDICFR5_IV1_VBUFERR0_1            (0x00000002uL)
+#define INTC_ICDICFR5_IV3_VBUFERR0_0            (0x00000004uL)
+#define INTC_ICDICFR5_IV3_VBUFERR0_1            (0x00000008uL)
+#define INTC_ICDICFR5_IV5_VBUFERR0_0            (0x00000010uL)
+#define INTC_ICDICFR5_IV5_VBUFERR0_1            (0x00000020uL)
+#define INTC_ICDICFR5_IV6_VBUFERR0_0            (0x00000040uL)
+#define INTC_ICDICFR5_IV6_VBUFERR0_1            (0x00000080uL)
+#define INTC_ICDICFR5_S0_WLINE0_0               (0x00000100uL)
+#define INTC_ICDICFR5_S0_WLINE0_1               (0x00000200uL)
+#define INTC_ICDICFR5_S1_VI_VSYNC0_0            (0x00000400uL)
+#define INTC_ICDICFR5_S1_VI_VSYNC0_1            (0x00000800uL)
+#define INTC_ICDICFR5_S1_LO_VSYNC0_0            (0x00001000uL)
+#define INTC_ICDICFR5_S1_LO_VSYNC0_1            (0x00002000uL)
+#define INTC_ICDICFR5_S1_VSYNCERR0_0            (0x00004000uL)
+#define INTC_ICDICFR5_S1_VSYNCERR0_1            (0x00008000uL)
+#define INTC_ICDICFR5_S1_VFIELD0_0              (0x00010000uL)
+#define INTC_ICDICFR5_S1_VFIELD0_1              (0x00020000uL)
+#define INTC_ICDICFR5_IV2_VBUFERR0_0            (0x00040000uL)
+#define INTC_ICDICFR5_IV2_VBUFERR0_1            (0x00080000uL)
+#define INTC_ICDICFR5_IV4_VBUFERR0_0            (0x00100000uL)
+#define INTC_ICDICFR5_IV4_VBUFERR0_1            (0x00200000uL)
+#define INTC_ICDICFR5_S1_WLINE0_0               (0x00400000uL)
+#define INTC_ICDICFR5_S1_WLINE0_1               (0x00800000uL)
+#define INTC_ICDICFR5_OIR_VI_VSYNC0_0           (0x01000000uL)
+#define INTC_ICDICFR5_OIR_VI_VSYNC0_1           (0x02000000uL)
+#define INTC_ICDICFR5_OIR_LO_VSYNC0_0           (0x04000000uL)
+#define INTC_ICDICFR5_OIR_LO_VSYNC0_1           (0x08000000uL)
+#define INTC_ICDICFR5_OIR_VSYNCERR0_0           (0x10000000uL)
+#define INTC_ICDICFR5_OIR_VSYNCERR0_1           (0x20000000uL)
+#define INTC_ICDICFR5_OIR_VFIELD0_0             (0x40000000uL)
+#define INTC_ICDICFR5_OIR_VFIELD0_1             (0x80000000uL)
+
+#define INTC_ICDICFR6_IV7_VBUFERR0_0            (0x00000001uL)
+#define INTC_ICDICFR6_IV7_VBUFERR0_1            (0x00000002uL)
+#define INTC_ICDICFR6_IV8_VBUFERR0_0            (0x00000004uL)
+#define INTC_ICDICFR6_IV8_VBUFERR0_1            (0x00000008uL)
+#define INTC_ICDICFR6_S0_VI_VSYNC1_0            (0x00000040uL)
+#define INTC_ICDICFR6_S0_VI_VSYNC1_1            (0x00000080uL)
+#define INTC_ICDICFR6_S0_LO_VSYNC1_0            (0x00000100uL)
+#define INTC_ICDICFR6_S0_LO_VSYNC1_1            (0x00000200uL)
+#define INTC_ICDICFR6_S0_VSYNCERR1_0            (0x00000400uL)
+#define INTC_ICDICFR6_S0_VSYNCERR1_1            (0x00000800uL)
+#define INTC_ICDICFR6_GR3_VLINE1_0              (0x00001000uL)
+#define INTC_ICDICFR6_GR3_VLINE1_1              (0x00002000uL)
+#define INTC_ICDICFR6_S0_VFIELD1_0              (0x00004000uL)
+#define INTC_ICDICFR6_S0_VFIELD1_1              (0x00008000uL)
+#define INTC_ICDICFR6_IV1_VBUFERR1_0            (0x00010000uL)
+#define INTC_ICDICFR6_IV1_VBUFERR1_1            (0x00020000uL)
+#define INTC_ICDICFR6_IV3_VBUFERR1_0            (0x00040000uL)
+#define INTC_ICDICFR6_IV3_VBUFERR1_1            (0x00080000uL)
+#define INTC_ICDICFR6_IV5_VBUFERR1_0            (0x00100000uL)
+#define INTC_ICDICFR6_IV5_VBUFERR1_1            (0x00200000uL)
+#define INTC_ICDICFR6_IV6_VBUFERR1_0            (0x00400000uL)
+#define INTC_ICDICFR6_IV6_VBUFERR1_1            (0x00800000uL)
+#define INTC_ICDICFR6_S0_WLINE1_0               (0x01000000uL)
+#define INTC_ICDICFR6_S0_WLINE1_1               (0x02000000uL)
+#define INTC_ICDICFR6_S1_VI_VSYNC1_0            (0x04000000uL)
+#define INTC_ICDICFR6_S1_VI_VSYNC1_1            (0x08000000uL)
+#define INTC_ICDICFR6_S1_LO_VSYNC1_0            (0x10000000uL)
+#define INTC_ICDICFR6_S1_LO_VSYNC1_1            (0x20000000uL)
+#define INTC_ICDICFR6_S1_VSYNCERR1_0            (0x40000000uL)
+#define INTC_ICDICFR6_S1_VSYNCERR1_1            (0x80000000uL)
+
+#define INTC_ICDICFR7_S1_VFIELD1_0              (0x00000001uL)
+#define INTC_ICDICFR7_S1_VFIELD1_1              (0x00000002uL)
+#define INTC_ICDICFR7_IV2_VBUFERR1_0            (0x00000004uL)
+#define INTC_ICDICFR7_IV2_VBUFERR1_1            (0x00000008uL)
+#define INTC_ICDICFR7_IV4_VBUFERR1_0            (0x00000010uL)
+#define INTC_ICDICFR7_IV4_VBUFERR1_1            (0x00000020uL)
+#define INTC_ICDICFR7_S1_WLINE1_0               (0x00000040uL)
+#define INTC_ICDICFR7_S1_WLINE1_1               (0x00000080uL)
+#define INTC_ICDICFR7_OIR_VI_VSYNC1_0           (0x00000100uL)
+#define INTC_ICDICFR7_OIR_VI_VSYNC1_1           (0x00000200uL)
+#define INTC_ICDICFR7_OIR_LO_VSYNC1_0           (0x00000400uL)
+#define INTC_ICDICFR7_OIR_LO_VSYNC1_1           (0x00000800uL)
+#define INTC_ICDICFR7_OIR_VLINE1_0              (0x00001000uL)
+#define INTC_ICDICFR7_OIR_VLINE1_1              (0x00002000uL)
+#define INTC_ICDICFR7_OIR_VFIELD1_0             (0x00004000uL)
+#define INTC_ICDICFR7_OIR_VFIELD1_1             (0x00008000uL)
+#define INTC_ICDICFR7_IV7_VBUFERR1_0            (0x00010000uL)
+#define INTC_ICDICFR7_IV7_VBUFERR1_1            (0x00020000uL)
+#define INTC_ICDICFR7_IV8_VBUFERR1_0            (0x00040000uL)
+#define INTC_ICDICFR7_IV8_VBUFERR1_1            (0x00080000uL)
+#define INTC_ICDICFR7_IMRDI_0                   (0x00400000uL)
+#define INTC_ICDICFR7_IMRDI_1                   (0x00800000uL)
+#define INTC_ICDICFR7_IMR2I0_0                  (0x01000000uL)
+#define INTC_ICDICFR7_IMR2I0_1                  (0x02000000uL)
+#define INTC_ICDICFR7_IMR2I1_0                  (0x04000000uL)
+#define INTC_ICDICFR7_IMR2I1_1                  (0x08000000uL)
+#define INTC_ICDICFR7_JEDI_0                    (0x10000000uL)
+#define INTC_ICDICFR7_JEDI_1                    (0x20000000uL)
+#define INTC_ICDICFR7_JDTI_0                    (0x40000000uL)
+#define INTC_ICDICFR7_JDTI_1                    (0x80000000uL)
+
+#define INTC_ICDICFR8_CMP0_0                    (0x00000001uL)
+#define INTC_ICDICFR8_CMP0_1                    (0x00000002uL)
+#define INTC_ICDICFR8_CMP1_0                    (0x00000004uL)
+#define INTC_ICDICFR8_CMP1_1                    (0x00000008uL)
+#define INTC_ICDICFR8_INT0_0                    (0x00000010uL)
+#define INTC_ICDICFR8_INT0_1                    (0x00000020uL)
+#define INTC_ICDICFR8_INT1_0                    (0x00000040uL)
+#define INTC_ICDICFR8_INT1_1                    (0x00000080uL)
+#define INTC_ICDICFR8_INT2_0                    (0x00000100uL)
+#define INTC_ICDICFR8_INT2_1                    (0x00000200uL)
+#define INTC_ICDICFR8_INT3_0                    (0x00000400uL)
+#define INTC_ICDICFR8_INT3_1                    (0x00000800uL)
+#define INTC_ICDICFR8_OSTM0TINT_0               (0x00001000uL)
+#define INTC_ICDICFR8_OSTM0TINT_1               (0x00002000uL)
+#define INTC_ICDICFR8_OSTM1TINT_0               (0x00004000uL)
+#define INTC_ICDICFR8_OSTM1TINT_1               (0x00008000uL)
+#define INTC_ICDICFR8_CMI_0                     (0x00010000uL)
+#define INTC_ICDICFR8_CMI_1                     (0x00020000uL)
+#define INTC_ICDICFR8_WTOUT_0                   (0x00040000uL)
+#define INTC_ICDICFR8_WTOUT_1                   (0x00080000uL)
+#define INTC_ICDICFR8_ITI_0                     (0x00100000uL)
+#define INTC_ICDICFR8_ITI_1                     (0x00200000uL)
+#define INTC_ICDICFR8_TGI0A_0                   (0x00400000uL)
+#define INTC_ICDICFR8_TGI0A_1                   (0x00800000uL)
+#define INTC_ICDICFR8_TGI0B_0                   (0x01000000uL)
+#define INTC_ICDICFR8_TGI0B_1                   (0x02000000uL)
+#define INTC_ICDICFR8_TGI0C_0                   (0x04000000uL)
+#define INTC_ICDICFR8_TGI0C_1                   (0x08000000uL)
+#define INTC_ICDICFR8_TGI0D_0                   (0x10000000uL)
+#define INTC_ICDICFR8_TGI0D_1                   (0x20000000uL)
+#define INTC_ICDICFR8_TGI0V_0                   (0x40000000uL)
+#define INTC_ICDICFR8_TGI0V_1                   (0x80000000uL)
+
+#define INTC_ICDICFR9_TGI0E_0                   (0x00000001uL)
+#define INTC_ICDICFR9_TGI0E_1                   (0x00000002uL)
+#define INTC_ICDICFR9_TGI0F_0                   (0x00000004uL)
+#define INTC_ICDICFR9_TGI0F_1                   (0x00000008uL)
+#define INTC_ICDICFR9_TGI1A_0                   (0x00000010uL)
+#define INTC_ICDICFR9_TGI1A_1                   (0x00000020uL)
+#define INTC_ICDICFR9_TGI1B_0                   (0x00000040uL)
+#define INTC_ICDICFR9_TGI1B_1                   (0x00000080uL)
+#define INTC_ICDICFR9_TGI1V_0                   (0x00000100uL)
+#define INTC_ICDICFR9_TGI1V_1                   (0x00000200uL)
+#define INTC_ICDICFR9_TGI1U_0                   (0x00000400uL)
+#define INTC_ICDICFR9_TGI1U_1                   (0x00000800uL)
+#define INTC_ICDICFR9_TGI2A_0                   (0x00001000uL)
+#define INTC_ICDICFR9_TGI2A_1                   (0x00002000uL)
+#define INTC_ICDICFR9_TGI2B_0                   (0x00004000uL)
+#define INTC_ICDICFR9_TGI2B_1                   (0x00008000uL)
+#define INTC_ICDICFR9_TGI2V_0                   (0x00010000uL)
+#define INTC_ICDICFR9_TGI2V_1                   (0x00020000uL)
+#define INTC_ICDICFR9_TGI2U_0                   (0x00040000uL)
+#define INTC_ICDICFR9_TGI2U_1                   (0x00080000uL)
+#define INTC_ICDICFR9_TGI3A_0                   (0x00100000uL)
+#define INTC_ICDICFR9_TGI3A_1                   (0x00200000uL)
+#define INTC_ICDICFR9_TGI3B_0                   (0x00400000uL)
+#define INTC_ICDICFR9_TGI3B_1                   (0x00800000uL)
+#define INTC_ICDICFR9_TGI3C_0                   (0x01000000uL)
+#define INTC_ICDICFR9_TGI3C_1                   (0x02000000uL)
+#define INTC_ICDICFR9_TGI3D_0                   (0x04000000uL)
+#define INTC_ICDICFR9_TGI3D_1                   (0x08000000uL)
+#define INTC_ICDICFR9_TGI3V_0                   (0x10000000uL)
+#define INTC_ICDICFR9_TGI3V_1                   (0x20000000uL)
+#define INTC_ICDICFR9_TGI4A_0                   (0x40000000uL)
+#define INTC_ICDICFR9_TGI4A_1                   (0x80000000uL)
+
+#define INTC_ICDICFR10_TGI4B_0                  (0x00000001uL)
+#define INTC_ICDICFR10_TGI4B_1                  (0x00000002uL)
+#define INTC_ICDICFR10_TGI4C_0                  (0x00000004uL)
+#define INTC_ICDICFR10_TGI4C_1                  (0x00000008uL)
+#define INTC_ICDICFR10_TGI4D_0                  (0x00000010uL)
+#define INTC_ICDICFR10_TGI4D_1                  (0x00000020uL)
+#define INTC_ICDICFR10_TGI4V_0                  (0x00000040uL)
+#define INTC_ICDICFR10_TGI4V_1                  (0x00000080uL)
+#define INTC_ICDICFR10_CMI1_0                   (0x00000100uL)
+#define INTC_ICDICFR10_CMI1_1                   (0x00000200uL)
+#define INTC_ICDICFR10_CMI2_0                   (0x00000400uL)
+#define INTC_ICDICFR10_CMI2_1                   (0x00000800uL)
+#define INTC_ICDICFR10_SGDEI0_0                 (0x00001000uL)
+#define INTC_ICDICFR10_SGDEI0_1                 (0x00002000uL)
+#define INTC_ICDICFR10_SGDEI1_0                 (0x00004000uL)
+#define INTC_ICDICFR10_SGDEI1_1                 (0x00008000uL)
+#define INTC_ICDICFR10_SGDEI2_0                 (0x00010000uL)
+#define INTC_ICDICFR10_SGDEI2_1                 (0x00020000uL)
+#define INTC_ICDICFR10_SGDEI3_0                 (0x00040000uL)
+#define INTC_ICDICFR10_SGDEI3_1                 (0x00080000uL)
+#define INTC_ICDICFR10_ADI_0                    (0x00100000uL)
+#define INTC_ICDICFR10_ADI_1                    (0x00200000uL)
+#define INTC_ICDICFR10_LMTI_0                   (0x00400000uL)
+#define INTC_ICDICFR10_LMTI_1                   (0x00800000uL)
+#define INTC_ICDICFR10_SSII0_0                  (0x01000000uL)
+#define INTC_ICDICFR10_SSII0_1                  (0x02000000uL)
+#define INTC_ICDICFR10_SSIRXI0_0                (0x04000000uL)
+#define INTC_ICDICFR10_SSIRXI0_1                (0x08000000uL)
+#define INTC_ICDICFR10_SSITXI0_0                (0x10000000uL)
+#define INTC_ICDICFR10_SSITXI0_1                (0x20000000uL)
+#define INTC_ICDICFR10_SSII1_0                  (0x40000000uL)
+#define INTC_ICDICFR10_SSII1_1                  (0x80000000uL)
+
+#define INTC_ICDICFR11_SSIRXI1_0                (0x00000001uL)
+#define INTC_ICDICFR11_SSIRXI1_1                (0x00000002uL)
+#define INTC_ICDICFR11_SSITXI1_0                (0x00000004uL)
+#define INTC_ICDICFR11_SSITXI1_1                (0x00000008uL)
+#define INTC_ICDICFR11_SSII2_0                  (0x00000010uL)
+#define INTC_ICDICFR11_SSII2_1                  (0x00000020uL)
+#define INTC_ICDICFR11_SSIRTI2_0                (0x00000040uL)
+#define INTC_ICDICFR11_SSIRTI2_1                (0x00000080uL)
+#define INTC_ICDICFR11_SSII3_0                  (0x00000100uL)
+#define INTC_ICDICFR11_SSII3_1                  (0x00000200uL)
+#define INTC_ICDICFR11_SSIRXI3_0                (0x00000400uL)
+#define INTC_ICDICFR11_SSIRXI3_1                (0x00000800uL)
+#define INTC_ICDICFR11_SSITXI3_0                (0x00001000uL)
+#define INTC_ICDICFR11_SSITXI3_1                (0x00002000uL)
+#define INTC_ICDICFR11_SSII4_0                  (0x00004000uL)
+#define INTC_ICDICFR11_SSII4_1                  (0x00008000uL)
+#define INTC_ICDICFR11_SSIRTI4_0                (0x00010000uL)
+#define INTC_ICDICFR11_SSIRTI4_1                (0x00020000uL)
+#define INTC_ICDICFR11_SSII5_0                  (0x00040000uL)
+#define INTC_ICDICFR11_SSII5_1                  (0x00080000uL)
+#define INTC_ICDICFR11_SSIRXI5_0                (0x00100000uL)
+#define INTC_ICDICFR11_SSIRXI5_1                (0x00200000uL)
+#define INTC_ICDICFR11_SSITXI5_0                (0x00400000uL)
+#define INTC_ICDICFR11_SSITXI5_1                (0x00800000uL)
+#define INTC_ICDICFR11_SPDIFI_0                 (0x01000000uL)
+#define INTC_ICDICFR11_SPDIFI_1                 (0x02000000uL)
+#define INTC_ICDICFR11_INTIICTEI0_0             (0x04000000uL)
+#define INTC_ICDICFR11_INTIICTEI0_1             (0x08000000uL)
+#define INTC_ICDICFR11_INTIICRI0_0              (0x10000000uL)
+#define INTC_ICDICFR11_INTIICRI0_1              (0x20000000uL)
+#define INTC_ICDICFR11_INTIICTI0_0              (0x40000000uL)
+#define INTC_ICDICFR11_INTIICTI0_1              (0x80000000uL)
+
+#define INTC_ICDICFR12_INTIICSPI0_0             (0x00000001uL)
+#define INTC_ICDICFR12_INTIICSPI0_1             (0x00000002uL)
+#define INTC_ICDICFR12_INTIICSTI0_0             (0x00000004uL)
+#define INTC_ICDICFR12_INTIICSTI0_1             (0x00000008uL)
+#define INTC_ICDICFR12_INTIICNAKI0_0            (0x00000010uL)
+#define INTC_ICDICFR12_INTIICNAKI0_1            (0x00000020uL)
+#define INTC_ICDICFR12_INTIICALI0_0             (0x00000040uL)
+#define INTC_ICDICFR12_INTIICALI0_1             (0x00000080uL)
+#define INTC_ICDICFR12_INTIICTMOI0_0            (0x00000100uL)
+#define INTC_ICDICFR12_INTIICTMOI0_1            (0x00000200uL)
+#define INTC_ICDICFR12_INTIICTEI1_0             (0x00000400uL)
+#define INTC_ICDICFR12_INTIICTEI1_1             (0x00000800uL)
+#define INTC_ICDICFR12_INTIICRI1_0              (0x00001000uL)
+#define INTC_ICDICFR12_INTIICRI1_1              (0x00002000uL)
+#define INTC_ICDICFR12_INTIICTI1_0              (0x00004000uL)
+#define INTC_ICDICFR12_INTIICTI1_1              (0x00008000uL)
+#define INTC_ICDICFR12_INTIICSPI1_0             (0x00010000uL)
+#define INTC_ICDICFR12_INTIICSPI1_1             (0x00020000uL)
+#define INTC_ICDICFR12_INTIICSTI1_0             (0x00040000uL)
+#define INTC_ICDICFR12_INTIICSTI1_1             (0x00080000uL)
+#define INTC_ICDICFR12_INTIICNAKI1_0            (0x00100000uL)
+#define INTC_ICDICFR12_INTIICNAKI1_1            (0x00200000uL)
+#define INTC_ICDICFR12_INTIICALI1_0             (0x00400000uL)
+#define INTC_ICDICFR12_INTIICALI1_1             (0x00800000uL)
+#define INTC_ICDICFR12_INTIICTMOI1_0            (0x01000000uL)
+#define INTC_ICDICFR12_INTIICTMOI1_1            (0x02000000uL)
+#define INTC_ICDICFR12_INTIICTEI2_0             (0x04000000uL)
+#define INTC_ICDICFR12_INTIICTEI2_1             (0x08000000uL)
+#define INTC_ICDICFR12_INTIICRI2_0              (0x10000000uL)
+#define INTC_ICDICFR12_INTIICRI2_1              (0x20000000uL)
+#define INTC_ICDICFR12_INTIICTI2_0              (0x40000000uL)
+#define INTC_ICDICFR12_INTIICTI2_1              (0x80000000uL)
+
+#define INTC_ICDICFR13_INTIICSPI2_0             (0x00000001uL)
+#define INTC_ICDICFR13_INTIICSPI2_1             (0x00000002uL)
+#define INTC_ICDICFR13_INTIICSTI2_0             (0x00000004uL)
+#define INTC_ICDICFR13_INTIICSTI2_1             (0x00000008uL)
+#define INTC_ICDICFR13_INTIICNAKI2_0            (0x00000010uL)
+#define INTC_ICDICFR13_INTIICNAKI2_1            (0x00000020uL)
+#define INTC_ICDICFR13_INTIICALI2_0             (0x00000040uL)
+#define INTC_ICDICFR13_INTIICALI2_1             (0x00000080uL)
+#define INTC_ICDICFR13_INTIICTMOI2_0            (0x00000100uL)
+#define INTC_ICDICFR13_INTIICTMOI2_1            (0x00000200uL)
+#define INTC_ICDICFR13_INTIICTEI3_0             (0x00000400uL)
+#define INTC_ICDICFR13_INTIICTEI3_1             (0x00000800uL)
+#define INTC_ICDICFR13_INTIICRI3_0              (0x00001000uL)
+#define INTC_ICDICFR13_INTIICRI3_1              (0x00002000uL)
+#define INTC_ICDICFR13_INTIICTI3_0              (0x00004000uL)
+#define INTC_ICDICFR13_INTIICTI3_1              (0x00008000uL)
+#define INTC_ICDICFR13_INTIICSPI3_0             (0x00010000uL)
+#define INTC_ICDICFR13_INTIICSPI3_1             (0x00020000uL)
+#define INTC_ICDICFR13_INTIICSTI3_0             (0x00040000uL)
+#define INTC_ICDICFR13_INTIICSTI3_1             (0x00080000uL)
+#define INTC_ICDICFR13_INTIICNAKI3_0            (0x00100000uL)
+#define INTC_ICDICFR13_INTIICNAKI3_1            (0x00200000uL)
+#define INTC_ICDICFR13_INTIICALI3_0             (0x00400000uL)
+#define INTC_ICDICFR13_INTIICALI3_1             (0x00800000uL)
+#define INTC_ICDICFR13_INTIICTMOI3_0            (0x01000000uL)
+#define INTC_ICDICFR13_INTIICTMOI3_1            (0x02000000uL)
+#define INTC_ICDICFR13_BRI0_0                   (0x04000000uL)
+#define INTC_ICDICFR13_BRI0_1                   (0x08000000uL)
+#define INTC_ICDICFR13_ERI0_0                   (0x10000000uL)
+#define INTC_ICDICFR13_ERI0_1                   (0x20000000uL)
+#define INTC_ICDICFR13_RXI0_0                   (0x40000000uL)
+#define INTC_ICDICFR13_RXI0_1                   (0x80000000uL)
+
+#define INTC_ICDICFR14_TXI0_0                   (0x00000001uL)
+#define INTC_ICDICFR14_TXI0_1                   (0x00000002uL)
+#define INTC_ICDICFR14_BRI1_0                   (0x00000004uL)
+#define INTC_ICDICFR14_BRI1_1                   (0x00000008uL)
+#define INTC_ICDICFR14_ERI1_0                   (0x00000010uL)
+#define INTC_ICDICFR14_ERI1_1                   (0x00000020uL)
+#define INTC_ICDICFR14_RXI1_0                   (0x00000040uL)
+#define INTC_ICDICFR14_RXI1_1                   (0x00000080uL)
+#define INTC_ICDICFR14_TXI1_0                   (0x00000100uL)
+#define INTC_ICDICFR14_TXI1_1                   (0x00000200uL)
+#define INTC_ICDICFR14_BRI2_0                   (0x00000400uL)
+#define INTC_ICDICFR14_BRI2_1                   (0x00000800uL)
+#define INTC_ICDICFR14_ERI2_0                   (0x00001000uL)
+#define INTC_ICDICFR14_ERI2_1                   (0x00002000uL)
+#define INTC_ICDICFR14_RXI2_0                   (0x00004000uL)
+#define INTC_ICDICFR14_RXI2_1                   (0x00008000uL)
+#define INTC_ICDICFR14_TXI2_0                   (0x00010000uL)
+#define INTC_ICDICFR14_TXI2_1                   (0x00020000uL)
+#define INTC_ICDICFR14_BRI3_0                   (0x00040000uL)
+#define INTC_ICDICFR14_BRI3_1                   (0x00080000uL)
+#define INTC_ICDICFR14_ERI3_0                   (0x00100000uL)
+#define INTC_ICDICFR14_ERI3_1                   (0x00200000uL)
+#define INTC_ICDICFR14_RXI3_0                   (0x00400000uL)
+#define INTC_ICDICFR14_RXI3_1                   (0x00800000uL)
+#define INTC_ICDICFR14_TXI3_0                   (0x01000000uL)
+#define INTC_ICDICFR14_TXI3_1                   (0x02000000uL)
+#define INTC_ICDICFR14_BRI4_0                   (0x04000000uL)
+#define INTC_ICDICFR14_BRI4_1                   (0x08000000uL)
+#define INTC_ICDICFR14_ERI4_0                   (0x10000000uL)
+#define INTC_ICDICFR14_ERI4_1                   (0x20000000uL)
+#define INTC_ICDICFR14_RXI4_0                   (0x40000000uL)
+#define INTC_ICDICFR14_RXI4_1                   (0x80000000uL)
+
+#define INTC_ICDICFR15_TXI4_0                   (0x00000001uL)
+#define INTC_ICDICFR15_TXI4_1                   (0x00000002uL)
+#define INTC_ICDICFR15_BRI5_0                   (0x00000004uL)
+#define INTC_ICDICFR15_BRI5_1                   (0x00000008uL)
+#define INTC_ICDICFR15_ERI5_0                   (0x00000010uL)
+#define INTC_ICDICFR15_ERI5_1                   (0x00000020uL)
+#define INTC_ICDICFR15_RXI5_0                   (0x00000040uL)
+#define INTC_ICDICFR15_RXI5_1                   (0x00000080uL)
+#define INTC_ICDICFR15_TXI5_0                   (0x00000100uL)
+#define INTC_ICDICFR15_TXI5_1                   (0x00000200uL)
+#define INTC_ICDICFR15_BRI6_0                   (0x00000400uL)
+#define INTC_ICDICFR15_BRI6_1                   (0x00000800uL)
+#define INTC_ICDICFR15_ERI6_0                   (0x00001000uL)
+#define INTC_ICDICFR15_ERI6_1                   (0x00002000uL)
+#define INTC_ICDICFR15_RXI6_0                   (0x00004000uL)
+#define INTC_ICDICFR15_RXI6_1                   (0x00008000uL)
+#define INTC_ICDICFR15_TXI6_0                   (0x00010000uL)
+#define INTC_ICDICFR15_TXI6_1                   (0x00020000uL)
+#define INTC_ICDICFR15_BRI7_0                   (0x00040000uL)
+#define INTC_ICDICFR15_BRI7_1                   (0x00080000uL)
+#define INTC_ICDICFR15_ERI7_0                   (0x00100000uL)
+#define INTC_ICDICFR15_ERI7_1                   (0x00200000uL)
+#define INTC_ICDICFR15_RXI7_0                   (0x00400000uL)
+#define INTC_ICDICFR15_RXI7_1                   (0x00800000uL)
+#define INTC_ICDICFR15_TXI7_0                   (0x01000000uL)
+#define INTC_ICDICFR15_TXI7_1                   (0x02000000uL)
+#define INTC_ICDICFR15_INTRCANGERR_0            (0x04000000uL)
+#define INTC_ICDICFR15_INTRCANGERR_1            (0x08000000uL)
+#define INTC_ICDICFR15_INTRCANGRECC_0           (0x10000000uL)
+#define INTC_ICDICFR15_INTRCANGRECC_1           (0x20000000uL)
+#define INTC_ICDICFR15_INTRCAN0REC_0            (0x40000000uL)
+#define INTC_ICDICFR15_INTRCAN0REC_1            (0x80000000uL)
+
+#define INTC_ICDICFR16_INTRCAN0ERR_0            (0x00000001uL)
+#define INTC_ICDICFR16_INTRCAN0ERR_1            (0x00000002uL)
+#define INTC_ICDICFR16_INTRCAN0TRX_0            (0x00000004uL)
+#define INTC_ICDICFR16_INTRCAN0TRX_1            (0x00000008uL)
+#define INTC_ICDICFR16_INTRCAN1REC_0            (0x00000010uL)
+#define INTC_ICDICFR16_INTRCAN1REC_1            (0x00000020uL)
+#define INTC_ICDICFR16_INTRCAN1ERR_0            (0x00000040uL)
+#define INTC_ICDICFR16_INTRCAN1ERR_1            (0x00000080uL)
+#define INTC_ICDICFR16_INTRCAN1TRX_0            (0x00000100uL)
+#define INTC_ICDICFR16_INTRCAN1TRX_1            (0x00000200uL)
+#define INTC_ICDICFR16_INTRCAN2REC_0            (0x00000400uL)
+#define INTC_ICDICFR16_INTRCAN2REC_1            (0x00000800uL)
+#define INTC_ICDICFR16_INTRCAN2ERR_0            (0x00001000uL)
+#define INTC_ICDICFR16_INTRCAN2ERR_1            (0x00002000uL)
+#define INTC_ICDICFR16_INTRCAN2TRX_0            (0x00004000uL)
+#define INTC_ICDICFR16_INTRCAN2TRX_1            (0x00008000uL)
+#define INTC_ICDICFR16_INTRCAN3REC_0            (0x00010000uL)
+#define INTC_ICDICFR16_INTRCAN3REC_1            (0x00020000uL)
+#define INTC_ICDICFR16_INTRCAN3ERR_0            (0x00040000uL)
+#define INTC_ICDICFR16_INTRCAN3ERR_1            (0x00080000uL)
+#define INTC_ICDICFR16_INTRCAN3TRX_0            (0x00100000uL)
+#define INTC_ICDICFR16_INTRCAN3TRX_1            (0x00200000uL)
+#define INTC_ICDICFR16_INTRCAN4REC_0            (0x00400000uL)
+#define INTC_ICDICFR16_INTRCAN4REC_1            (0x00800000uL)
+#define INTC_ICDICFR16_INTRCAN4ERR_0            (0x01000000uL)
+#define INTC_ICDICFR16_INTRCAN4ERR_1            (0x02000000uL)
+#define INTC_ICDICFR16_INTRCAN4TRX_0            (0x04000000uL)
+#define INTC_ICDICFR16_INTRCAN4TRX_1            (0x08000000uL)
+#define INTC_ICDICFR16_SPEI0_0                  (0x10000000uL)
+#define INTC_ICDICFR16_SPEI0_1                  (0x20000000uL)
+#define INTC_ICDICFR16_SPRI0_0                  (0x40000000uL)
+#define INTC_ICDICFR16_SPRI0_1                  (0x80000000uL)
+
+#define INTC_ICDICFR17_SPTI0_0                  (0x00000001uL)
+#define INTC_ICDICFR17_SPTI0_1                  (0x00000002uL)
+#define INTC_ICDICFR17_SPEI1_0                  (0x00000004uL)
+#define INTC_ICDICFR17_SPEI1_1                  (0x00000008uL)
+#define INTC_ICDICFR17_SPRI1_0                  (0x00000010uL)
+#define INTC_ICDICFR17_SPRI1_1                  (0x00000020uL)
+#define INTC_ICDICFR17_SPTI1_0                  (0x00000040uL)
+#define INTC_ICDICFR17_SPTI1_1                  (0x00000080uL)
+#define INTC_ICDICFR17_SPEI2_0                  (0x00000100uL)
+#define INTC_ICDICFR17_SPEI2_1                  (0x00000200uL)
+#define INTC_ICDICFR17_SPRI2_0                  (0x00000400uL)
+#define INTC_ICDICFR17_SPRI2_1                  (0x00000800uL)
+#define INTC_ICDICFR17_SPTI2_0                  (0x00001000uL)
+#define INTC_ICDICFR17_SPTI2_1                  (0x00002000uL)
+#define INTC_ICDICFR17_SPEI3_0                  (0x00004000uL)
+#define INTC_ICDICFR17_SPEI3_1                  (0x00008000uL)
+#define INTC_ICDICFR17_SPRI3_0                  (0x00010000uL)
+#define INTC_ICDICFR17_SPRI3_1                  (0x00020000uL)
+#define INTC_ICDICFR17_SPTI3_0                  (0x00040000uL)
+#define INTC_ICDICFR17_SPTI3_1                  (0x00080000uL)
+#define INTC_ICDICFR17_SPEI4_0                  (0x00100000uL)
+#define INTC_ICDICFR17_SPEI4_1                  (0x00200000uL)
+#define INTC_ICDICFR17_SPRI4_0                  (0x00400000uL)
+#define INTC_ICDICFR17_SPRI4_1                  (0x00800000uL)
+#define INTC_ICDICFR17_SPTI4_0                  (0x01000000uL)
+#define INTC_ICDICFR17_SPTI4_1                  (0x02000000uL)
+#define INTC_ICDICFR17_IEBBTD_0                 (0x04000000uL)
+#define INTC_ICDICFR17_IEBBTD_1                 (0x08000000uL)
+#define INTC_ICDICFR17_IEBBTERR_0               (0x10000000uL)
+#define INTC_ICDICFR17_IEBBTERR_1               (0x20000000uL)
+#define INTC_ICDICFR17_IEBBTSTA_0               (0x40000000uL)
+#define INTC_ICDICFR17_IEBBTSTA_1               (0x80000000uL)
+
+#define INTC_ICDICFR18_IEBBTV_0                 (0x00000001uL)
+#define INTC_ICDICFR18_IEBBTV_1                 (0x00000002uL)
+#define INTC_ICDICFR18_ISY_0                    (0x00000004uL)
+#define INTC_ICDICFR18_ISY_1                    (0x00000008uL)
+#define INTC_ICDICFR18_IERR_0                   (0x00000010uL)
+#define INTC_ICDICFR18_IERR_1                   (0x00000020uL)
+#define INTC_ICDICFR18_ITARG_0                  (0x00000040uL)
+#define INTC_ICDICFR18_ITARG_1                  (0x00000080uL)
+#define INTC_ICDICFR18_ISEC_0                   (0x00000100uL)
+#define INTC_ICDICFR18_ISEC_1                   (0x00000200uL)
+#define INTC_ICDICFR18_IBUF_0                   (0x00000400uL)
+#define INTC_ICDICFR18_IBUF_1                   (0x00000800uL)
+#define INTC_ICDICFR18_IREADY_0                 (0x00001000uL)
+#define INTC_ICDICFR18_IREADY_1                 (0x00002000uL)
+#define INTC_ICDICFR18_FLSTE_0                  (0x00004000uL)
+#define INTC_ICDICFR18_FLSTE_1                  (0x00008000uL)
+#define INTC_ICDICFR18_FLTENDI_0                (0x00010000uL)
+#define INTC_ICDICFR18_FLTENDI_1                (0x00020000uL)
+#define INTC_ICDICFR18_FLTREQ0I_0               (0x00040000uL)
+#define INTC_ICDICFR18_FLTREQ0I_1               (0x00080000uL)
+#define INTC_ICDICFR18_FLTREQ1I_0               (0x00100000uL)
+#define INTC_ICDICFR18_FLTREQ1I_1               (0x00200000uL)
+#define INTC_ICDICFR18_MMC0_0                   (0x00400000uL)
+#define INTC_ICDICFR18_MMC0_1                   (0x00800000uL)
+#define INTC_ICDICFR18_MMC1_0                   (0x01000000uL)
+#define INTC_ICDICFR18_MMC1_1                   (0x02000000uL)
+#define INTC_ICDICFR18_MMC2_0                   (0x04000000uL)
+#define INTC_ICDICFR18_MMC2_1                   (0x08000000uL)
+#define INTC_ICDICFR18_SDHI0_3_0                (0x10000000uL)
+#define INTC_ICDICFR18_SDHI0_3_1                (0x20000000uL)
+#define INTC_ICDICFR18_SDHI0_0_0                (0x40000000uL)
+#define INTC_ICDICFR18_SDHI0_0_1                (0x80000000uL)
+
+#define INTC_ICDICFR19_SDHI0_1_0                (0x00000001uL)
+#define INTC_ICDICFR19_SDHI0_1_1                (0x00000002uL)
+#define INTC_ICDICFR19_SDHI1_3_0                (0x00000004uL)
+#define INTC_ICDICFR19_SDHI1_3_1                (0x00000008uL)
+#define INTC_ICDICFR19_SDHI1_0_0                (0x00000010uL)
+#define INTC_ICDICFR19_SDHI1_0_1                (0x00000020uL)
+#define INTC_ICDICFR19_SDHI1_1_0                (0x00000040uL)
+#define INTC_ICDICFR19_SDHI1_1_1                (0x00000080uL)
+#define INTC_ICDICFR19_ARM_0                    (0x00000100uL)
+#define INTC_ICDICFR19_ARM_1                    (0x00000200uL)
+#define INTC_ICDICFR19_PRD_0                    (0x00000400uL)
+#define INTC_ICDICFR19_PRD_1                    (0x00000800uL)
+#define INTC_ICDICFR19_CUP_0                    (0x00001000uL)
+#define INTC_ICDICFR19_CUP_1                    (0x00002000uL)
+#define INTC_ICDICFR19_SCUAI0_0                 (0x00004000uL)
+#define INTC_ICDICFR19_SCUAI0_1                 (0x00008000uL)
+#define INTC_ICDICFR19_SCUAI1_0                 (0x00010000uL)
+#define INTC_ICDICFR19_SCUAI1_1                 (0x00020000uL)
+#define INTC_ICDICFR19_SCUFDI0_0                (0x00040000uL)
+#define INTC_ICDICFR19_SCUFDI0_1                (0x00080000uL)
+#define INTC_ICDICFR19_SCUFDI1_0                (0x00100000uL)
+#define INTC_ICDICFR19_SCUFDI1_1                (0x00200000uL)
+#define INTC_ICDICFR19_SCUFDI2_0                (0x00400000uL)
+#define INTC_ICDICFR19_SCUFDI2_1                (0x00800000uL)
+#define INTC_ICDICFR19_SCUFDI3_0                (0x01000000uL)
+#define INTC_ICDICFR19_SCUFDI3_1                (0x02000000uL)
+#define INTC_ICDICFR19_SCUFUI0_0                (0x04000000uL)
+#define INTC_ICDICFR19_SCUFUI0_1                (0x08000000uL)
+#define INTC_ICDICFR19_SCUFUI1_0                (0x10000000uL)
+#define INTC_ICDICFR19_SCUFUI1_1                (0x20000000uL)
+#define INTC_ICDICFR19_SCUFUI2_0                (0x40000000uL)
+#define INTC_ICDICFR19_SCUFUI2_1                (0x80000000uL)
+
+#define INTC_ICDICFR20_SCUFUI3_0                (0x00000001uL)
+#define INTC_ICDICFR20_SCUFUI3_1                (0x00000002uL)
+#define INTC_ICDICFR20_SCUDVI0_0                (0x00000004uL)
+#define INTC_ICDICFR20_SCUDVI0_1                (0x00000008uL)
+#define INTC_ICDICFR20_SCUDVI1_0                (0x00000010uL)
+#define INTC_ICDICFR20_SCUDVI1_1                (0x00000020uL)
+#define INTC_ICDICFR20_SCUDVI2_0                (0x00000040uL)
+#define INTC_ICDICFR20_SCUDVI2_1                (0x00000080uL)
+#define INTC_ICDICFR20_SCUDVI3_0                (0x00000100uL)
+#define INTC_ICDICFR20_SCUDVI3_1                (0x00000200uL)
+#define INTC_ICDICFR20_MLB_CINT_0               (0x00000400uL)
+#define INTC_ICDICFR20_MLB_CINT_1               (0x00000800uL)
+#define INTC_ICDICFR20_MLB_SINT_0               (0x00001000uL)
+#define INTC_ICDICFR20_MLB_SINT_1               (0x00002000uL)
+#define INTC_ICDICFR20_DRC0_0                   (0x00004000uL)
+#define INTC_ICDICFR20_DRC0_1                   (0x00008000uL)
+#define INTC_ICDICFR20_DRC1_0                   (0x00010000uL)
+#define INTC_ICDICFR20_DRC1_1                   (0x00020000uL)
+#define INTC_ICDICFR20_LINI0_INT_T_0            (0x00400000uL)
+#define INTC_ICDICFR20_LINI0_INT_T_1            (0x00800000uL)
+#define INTC_ICDICFR20_LINI0_INT_R_0            (0x01000000uL)
+#define INTC_ICDICFR20_LINI0_INT_R_1            (0x02000000uL)
+#define INTC_ICDICFR20_LINI0_INT_S_0            (0x04000000uL)
+#define INTC_ICDICFR20_LINI0_INT_S_1            (0x08000000uL)
+#define INTC_ICDICFR20_LINI0_INT_M_0            (0x10000000uL)
+#define INTC_ICDICFR20_LINI0_INT_M_1            (0x20000000uL)
+#define INTC_ICDICFR20_LINI1_INT_T_0            (0x40000000uL)
+#define INTC_ICDICFR20_LINI1_INT_T_1            (0x80000000uL)
+
+#define INTC_ICDICFR21_LINI1_INT_R_0            (0x00000001uL)
+#define INTC_ICDICFR21_LINI1_INT_R_1            (0x00000002uL)
+#define INTC_ICDICFR21_LINI1_INT_S_0            (0x00000004uL)
+#define INTC_ICDICFR21_LINI1_INT_S_1            (0x00000008uL)
+#define INTC_ICDICFR21_LINI1_INT_M_0            (0x00000010uL)
+#define INTC_ICDICFR21_LINI1_INT_M_1            (0x00000020uL)
+#define INTC_ICDICFR21_ERI0_0                   (0x00400000uL)
+#define INTC_ICDICFR21_ERI0_1                   (0x00800000uL)
+#define INTC_ICDICFR21_RXI0_0                   (0x01000000uL)
+#define INTC_ICDICFR21_RXI0_1                   (0x02000000uL)
+#define INTC_ICDICFR21_TXI0_0                   (0x04000000uL)
+#define INTC_ICDICFR21_TXI0_1                   (0x08000000uL)
+#define INTC_ICDICFR21_TEI0_0                   (0x10000000uL)
+#define INTC_ICDICFR21_TEI0_1                   (0x20000000uL)
+#define INTC_ICDICFR21_ERI1_0                   (0x40000000uL)
+#define INTC_ICDICFR21_ERI1_1                   (0x80000000uL)
+
+#define INTC_ICDICFR22_RXI1_0                   (0x00000001uL)
+#define INTC_ICDICFR22_RXI1_1                   (0x00000002uL)
+#define INTC_ICDICFR22_TXI1_0                   (0x00000004uL)
+#define INTC_ICDICFR22_TXI1_1                   (0x00000008uL)
+#define INTC_ICDICFR22_TEI1_0                   (0x00000010uL)
+#define INTC_ICDICFR22_TEI1_1                   (0x00000020uL)
+#define INTC_ICDICFR22_AVBI_DATA_0              (0x00000040uL)
+#define INTC_ICDICFR22_AVBI_DATA_1              (0x00000080uL)
+#define INTC_ICDICFR22_AVBI_ERROR_0             (0x00000100uL)
+#define INTC_ICDICFR22_AVBI_ERROR_1             (0x00000200uL)
+#define INTC_ICDICFR22_AVBI_MANAGE_0            (0x00000400uL)
+#define INTC_ICDICFR22_AVBI_MANAGE_1            (0x00000800uL)
+#define INTC_ICDICFR22_AVBI_MAC_0               (0x00001000uL)
+#define INTC_ICDICFR22_AVBI_MAC_1               (0x00002000uL)
+#define INTC_ICDICFR22_ETHERI_0                 (0x00004000uL)
+#define INTC_ICDICFR22_ETHERI_1                 (0x00008000uL)
+#define INTC_ICDICFR22_CEUI_0                   (0x01000000uL)
+#define INTC_ICDICFR22_CEUI_1                   (0x02000000uL)
+
+#define INTC_ICDICFR23_H2XMLB_ERRINT_0          (0x04000000uL)
+#define INTC_ICDICFR23_H2XMLB_ERRINT_1          (0x08000000uL)
+#define INTC_ICDICFR23_H2XIC1_ERRINT_0          (0x10000000uL)
+#define INTC_ICDICFR23_H2XIC1_ERRINT_1          (0x20000000uL)
+#define INTC_ICDICFR23_X2HPERI1_ERRINT_0        (0x40000000uL)
+#define INTC_ICDICFR23_X2HPERI1_ERRINT_1        (0x80000000uL)
+
+#define INTC_ICDICFR24_X2HPERI2_ERRINT_0        (0x00000001uL)
+#define INTC_ICDICFR24_X2HPERI2_ERRINT_1        (0x00000002uL)
+#define INTC_ICDICFR24_X2HPERI34_ERRINT_0       (0x00000004uL)
+#define INTC_ICDICFR24_X2HPERI34_ERRINT_1       (0x00000008uL)
+#define INTC_ICDICFR24_X2HPERI5_ERRINT_0        (0x00000010uL)
+#define INTC_ICDICFR24_X2HPERI5_ERRINT_1        (0x00000020uL)
+#define INTC_ICDICFR24_X2HPERI67_ERRINT_0       (0x00000040uL)
+#define INTC_ICDICFR24_X2HPERI67_ERRINT_1       (0x00000080uL)
+#define INTC_ICDICFR24_X2HDBGR_ERRINT_0         (0x00000100uL)
+#define INTC_ICDICFR24_X2HDBGR_ERRINT_1         (0x00000200uL)
+#define INTC_ICDICFR24_X2HBSC_ERRINT_0          (0x00000400uL)
+#define INTC_ICDICFR24_X2HBSC_ERRINT_1          (0x00000800uL)
+#define INTC_ICDICFR24_X2HSPI1_ERRINT_0         (0x00001000uL)
+#define INTC_ICDICFR24_X2HSPI1_ERRINT_1         (0x00002000uL)
+#define INTC_ICDICFR24_X2HSPI2_ERRINT_0         (0x00004000uL)
+#define INTC_ICDICFR24_X2HSPI2_ERRINT_1         (0x00008000uL)
+#define INTC_ICDICFR24_PRRI_0                   (0x00010000uL)
+#define INTC_ICDICFR24_PRRI_1                   (0x00020000uL)
+#define INTC_ICDICFR24_IFEI0_0                  (0x00040000uL)
+#define INTC_ICDICFR24_IFEI0_1                  (0x00080000uL)
+#define INTC_ICDICFR24_OFFI0_0                  (0x00100000uL)
+#define INTC_ICDICFR24_OFFI0_1                  (0x00200000uL)
+#define INTC_ICDICFR24_PFVEI0_0                 (0x00400000uL)
+#define INTC_ICDICFR24_PFVEI0_1                 (0x00800000uL)
+#define INTC_ICDICFR24_IFEI1_0                  (0x01000000uL)
+#define INTC_ICDICFR24_IFEI1_1                  (0x02000000uL)
+#define INTC_ICDICFR24_OFFI1_0                  (0x04000000uL)
+#define INTC_ICDICFR24_OFFI1_1                  (0x08000000uL)
+#define INTC_ICDICFR24_PFVEI1_0                 (0x10000000uL)
+#define INTC_ICDICFR24_PFVEI1_1                 (0x20000000uL)
+
+#define INTC_ICDICFR26_TINT0_0                  (0x00000001uL)
+#define INTC_ICDICFR26_TINT0_1                  (0x00000002uL)
+#define INTC_ICDICFR26_TINT1_0                  (0x00000004uL)
+#define INTC_ICDICFR26_TINT1_1                  (0x00000008uL)
+#define INTC_ICDICFR26_TINT2_0                  (0x00000010uL)
+#define INTC_ICDICFR26_TINT2_1                  (0x00000020uL)
+#define INTC_ICDICFR26_TINT3_0                  (0x00000040uL)
+#define INTC_ICDICFR26_TINT3_1                  (0x00000080uL)
+#define INTC_ICDICFR26_TINT4_0                  (0x00000100uL)
+#define INTC_ICDICFR26_TINT4_1                  (0x00000200uL)
+#define INTC_ICDICFR26_TINT5_0                  (0x00000400uL)
+#define INTC_ICDICFR26_TINT5_1                  (0x00000800uL)
+#define INTC_ICDICFR26_TINT6_0                  (0x00001000uL)
+#define INTC_ICDICFR26_TINT6_1                  (0x00002000uL)
+#define INTC_ICDICFR26_TINT7_0                  (0x00004000uL)
+#define INTC_ICDICFR26_TINT7_1                  (0x00008000uL)
+#define INTC_ICDICFR26_TINT8_0                  (0x00010000uL)
+#define INTC_ICDICFR26_TINT8_1                  (0x00020000uL)
+#define INTC_ICDICFR26_TINT9_0                  (0x00040000uL)
+#define INTC_ICDICFR26_TINT9_1                  (0x00080000uL)
+#define INTC_ICDICFR26_TINT10_0                 (0x00100000uL)
+#define INTC_ICDICFR26_TINT10_1                 (0x00200000uL)
+#define INTC_ICDICFR26_TINT11_0                 (0x00400000uL)
+#define INTC_ICDICFR26_TINT11_1                 (0x00800000uL)
+#define INTC_ICDICFR26_TINT12_0                 (0x01000000uL)
+#define INTC_ICDICFR26_TINT12_1                 (0x02000000uL)
+#define INTC_ICDICFR26_TINT13_0                 (0x04000000uL)
+#define INTC_ICDICFR26_TINT13_1                 (0x08000000uL)
+#define INTC_ICDICFR26_TINT14_0                 (0x10000000uL)
+#define INTC_ICDICFR26_TINT14_1                 (0x20000000uL)
+#define INTC_ICDICFR26_TINT15_0                 (0x40000000uL)
+#define INTC_ICDICFR26_TINT15_1                 (0x80000000uL)
+
+#define INTC_ICDICFR27_TINT16_0                 (0x00000001uL)
+#define INTC_ICDICFR27_TINT16_1                 (0x00000002uL)
+#define INTC_ICDICFR27_TINT17_0                 (0x00000004uL)
+#define INTC_ICDICFR27_TINT17_1                 (0x00000008uL)
+#define INTC_ICDICFR27_TINT18_0                 (0x00000010uL)
+#define INTC_ICDICFR27_TINT18_1                 (0x00000020uL)
+#define INTC_ICDICFR27_TINT19_0                 (0x00000040uL)
+#define INTC_ICDICFR27_TINT19_1                 (0x00000080uL)
+#define INTC_ICDICFR27_TINT20_0                 (0x00000100uL)
+#define INTC_ICDICFR27_TINT20_1                 (0x00000200uL)
+#define INTC_ICDICFR27_TINT21_0                 (0x00000400uL)
+#define INTC_ICDICFR27_TINT21_1                 (0x00000800uL)
+#define INTC_ICDICFR27_TINT22_0                 (0x00001000uL)
+#define INTC_ICDICFR27_TINT22_1                 (0x00002000uL)
+#define INTC_ICDICFR27_TINT23_0                 (0x00004000uL)
+#define INTC_ICDICFR27_TINT23_1                 (0x00008000uL)
+#define INTC_ICDICFR27_TINT24_0                 (0x00010000uL)
+#define INTC_ICDICFR27_TINT24_1                 (0x00020000uL)
+#define INTC_ICDICFR27_TINT25_0                 (0x00040000uL)
+#define INTC_ICDICFR27_TINT25_1                 (0x00080000uL)
+#define INTC_ICDICFR27_TINT26_0                 (0x00100000uL)
+#define INTC_ICDICFR27_TINT26_1                 (0x00200000uL)
+#define INTC_ICDICFR27_TINT27_0                 (0x00400000uL)
+#define INTC_ICDICFR27_TINT27_1                 (0x00800000uL)
+#define INTC_ICDICFR27_TINT28_0                 (0x01000000uL)
+#define INTC_ICDICFR27_TINT28_1                 (0x02000000uL)
+#define INTC_ICDICFR27_TINT29_0                 (0x04000000uL)
+#define INTC_ICDICFR27_TINT29_1                 (0x08000000uL)
+#define INTC_ICDICFR27_TINT30_0                 (0x10000000uL)
+#define INTC_ICDICFR27_TINT30_1                 (0x20000000uL)
+#define INTC_ICDICFR27_TINT31_0                 (0x40000000uL)
+#define INTC_ICDICFR27_TINT31_1                 (0x80000000uL)
+
+#define INTC_ICDICFR28_TINT32_0                 (0x00000001uL)
+#define INTC_ICDICFR28_TINT32_1                 (0x00000002uL)
+#define INTC_ICDICFR28_TINT33_0                 (0x00000004uL)
+#define INTC_ICDICFR28_TINT33_1                 (0x00000008uL)
+#define INTC_ICDICFR28_TINT34_0                 (0x00000010uL)
+#define INTC_ICDICFR28_TINT34_1                 (0x00000020uL)
+#define INTC_ICDICFR28_TINT35_0                 (0x00000040uL)
+#define INTC_ICDICFR28_TINT35_1                 (0x00000080uL)
+#define INTC_ICDICFR28_TINT36_0                 (0x00000100uL)
+#define INTC_ICDICFR28_TINT36_1                 (0x00000200uL)
+#define INTC_ICDICFR28_TINT37_0                 (0x00000400uL)
+#define INTC_ICDICFR28_TINT37_1                 (0x00000800uL)
+#define INTC_ICDICFR28_TINT38_0                 (0x00001000uL)
+#define INTC_ICDICFR28_TINT38_1                 (0x00002000uL)
+#define INTC_ICDICFR28_TINT39_0                 (0x00004000uL)
+#define INTC_ICDICFR28_TINT39_1                 (0x00008000uL)
+#define INTC_ICDICFR28_TINT40_0                 (0x00010000uL)
+#define INTC_ICDICFR28_TINT40_1                 (0x00020000uL)
+#define INTC_ICDICFR28_TINT41_0                 (0x00040000uL)
+#define INTC_ICDICFR28_TINT41_1                 (0x00080000uL)
+#define INTC_ICDICFR28_TINT42_0                 (0x00100000uL)
+#define INTC_ICDICFR28_TINT42_1                 (0x00200000uL)
+#define INTC_ICDICFR28_TINT43_0                 (0x00400000uL)
+#define INTC_ICDICFR28_TINT43_1                 (0x00800000uL)
+#define INTC_ICDICFR28_TINT44_0                 (0x01000000uL)
+#define INTC_ICDICFR28_TINT44_1                 (0x02000000uL)
+#define INTC_ICDICFR28_TINT45_0                 (0x04000000uL)
+#define INTC_ICDICFR28_TINT45_1                 (0x08000000uL)
+#define INTC_ICDICFR28_TINT46_0                 (0x10000000uL)
+#define INTC_ICDICFR28_TINT46_1                 (0x20000000uL)
+#define INTC_ICDICFR28_TINT47_0                 (0x40000000uL)
+#define INTC_ICDICFR28_TINT47_1                 (0x80000000uL)
+
+#define INTC_ICDICFR29_TINT48_0                 (0x00000001uL)
+#define INTC_ICDICFR29_TINT48_1                 (0x00000002uL)
+#define INTC_ICDICFR29_TINT49_0                 (0x00000004uL)
+#define INTC_ICDICFR29_TINT49_1                 (0x00000008uL)
+#define INTC_ICDICFR29_TINT50_0                 (0x00000010uL)
+#define INTC_ICDICFR29_TINT50_1                 (0x00000020uL)
+#define INTC_ICDICFR29_TINT51_0                 (0x00000040uL)
+#define INTC_ICDICFR29_TINT51_1                 (0x00000080uL)
+#define INTC_ICDICFR29_TINT52_0                 (0x00000100uL)
+#define INTC_ICDICFR29_TINT52_1                 (0x00000200uL)
+#define INTC_ICDICFR29_TINT53_0                 (0x00000400uL)
+#define INTC_ICDICFR29_TINT53_1                 (0x00000800uL)
+#define INTC_ICDICFR29_TINT54_0                 (0x00001000uL)
+#define INTC_ICDICFR29_TINT54_1                 (0x00002000uL)
+#define INTC_ICDICFR29_TINT55_0                 (0x00004000uL)
+#define INTC_ICDICFR29_TINT55_1                 (0x00008000uL)
+#define INTC_ICDICFR29_TINT56_0                 (0x00010000uL)
+#define INTC_ICDICFR29_TINT56_1                 (0x00020000uL)
+#define INTC_ICDICFR29_TINT57_0                 (0x00040000uL)
+#define INTC_ICDICFR29_TINT57_1                 (0x00080000uL)
+#define INTC_ICDICFR29_TINT58_0                 (0x00100000uL)
+#define INTC_ICDICFR29_TINT58_1                 (0x00200000uL)
+#define INTC_ICDICFR29_TINT59_0                 (0x00400000uL)
+#define INTC_ICDICFR29_TINT59_1                 (0x00800000uL)
+#define INTC_ICDICFR29_TINT60_0                 (0x01000000uL)
+#define INTC_ICDICFR29_TINT60_1                 (0x02000000uL)
+#define INTC_ICDICFR29_TINT61_0                 (0x04000000uL)
+#define INTC_ICDICFR29_TINT61_1                 (0x08000000uL)
+#define INTC_ICDICFR29_TINT62_0                 (0x10000000uL)
+#define INTC_ICDICFR29_TINT62_1                 (0x20000000uL)
+#define INTC_ICDICFR29_TINT63_0                 (0x40000000uL)
+#define INTC_ICDICFR29_TINT63_1                 (0x80000000uL)
+
+#define INTC_ICDICFR30_TINT64_0                 (0x00000001uL)
+#define INTC_ICDICFR30_TINT64_1                 (0x00000002uL)
+#define INTC_ICDICFR30_TINT65_0                 (0x00000004uL)
+#define INTC_ICDICFR30_TINT65_1                 (0x00000008uL)
+#define INTC_ICDICFR30_TINT66_0                 (0x00000010uL)
+#define INTC_ICDICFR30_TINT66_1                 (0x00000020uL)
+#define INTC_ICDICFR30_TINT67_0                 (0x00000040uL)
+#define INTC_ICDICFR30_TINT67_1                 (0x00000080uL)
+#define INTC_ICDICFR30_TINT68_0                 (0x00000100uL)
+#define INTC_ICDICFR30_TINT68_1                 (0x00000200uL)
+#define INTC_ICDICFR30_TINT69_0                 (0x00000400uL)
+#define INTC_ICDICFR30_TINT69_1                 (0x00000800uL)
+#define INTC_ICDICFR30_TINT70_0                 (0x00001000uL)
+#define INTC_ICDICFR30_TINT70_1                 (0x00002000uL)
+#define INTC_ICDICFR30_TINT71_0                 (0x00004000uL)
+#define INTC_ICDICFR30_TINT71_1                 (0x00008000uL)
+#define INTC_ICDICFR30_TINT72_0                 (0x00010000uL)
+#define INTC_ICDICFR30_TINT72_1                 (0x00020000uL)
+#define INTC_ICDICFR30_TINT73_0                 (0x00040000uL)
+#define INTC_ICDICFR30_TINT73_1                 (0x00080000uL)
+#define INTC_ICDICFR30_TINT74_0                 (0x00100000uL)
+#define INTC_ICDICFR30_TINT74_1                 (0x00200000uL)
+#define INTC_ICDICFR30_TINT75_0                 (0x00400000uL)
+#define INTC_ICDICFR30_TINT75_1                 (0x00800000uL)
+#define INTC_ICDICFR30_TINT76_0                 (0x01000000uL)
+#define INTC_ICDICFR30_TINT76_1                 (0x02000000uL)
+#define INTC_ICDICFR30_TINT77_0                 (0x04000000uL)
+#define INTC_ICDICFR30_TINT77_1                 (0x08000000uL)
+#define INTC_ICDICFR30_TINT78_0                 (0x10000000uL)
+#define INTC_ICDICFR30_TINT78_1                 (0x20000000uL)
+#define INTC_ICDICFR30_TINT79_0                 (0x40000000uL)
+#define INTC_ICDICFR30_TINT79_1                 (0x80000000uL)
+
+#define INTC_ICDICFR31_TINT80_0                 (0x00000001uL)
+#define INTC_ICDICFR31_TINT80_1                 (0x00000002uL)
+#define INTC_ICDICFR31_TINT81_0                 (0x00000004uL)
+#define INTC_ICDICFR31_TINT81_1                 (0x00000008uL)
+#define INTC_ICDICFR31_TINT82_0                 (0x00000010uL)
+#define INTC_ICDICFR31_TINT82_1                 (0x00000020uL)
+#define INTC_ICDICFR31_TINT83_0                 (0x00000040uL)
+#define INTC_ICDICFR31_TINT83_1                 (0x00000080uL)
+#define INTC_ICDICFR31_TINT84_0                 (0x00000100uL)
+#define INTC_ICDICFR31_TINT84_1                 (0x00000200uL)
+#define INTC_ICDICFR31_TINT85_0                 (0x00000400uL)
+#define INTC_ICDICFR31_TINT85_1                 (0x00000800uL)
+#define INTC_ICDICFR31_TINT86_0                 (0x00001000uL)
+#define INTC_ICDICFR31_TINT86_1                 (0x00002000uL)
+#define INTC_ICDICFR31_TINT87_0                 (0x00004000uL)
+#define INTC_ICDICFR31_TINT87_1                 (0x00008000uL)
+#define INTC_ICDICFR31_TINT88_0                 (0x00010000uL)
+#define INTC_ICDICFR31_TINT88_1                 (0x00020000uL)
+#define INTC_ICDICFR31_TINT89_0                 (0x00040000uL)
+#define INTC_ICDICFR31_TINT89_1                 (0x00080000uL)
+#define INTC_ICDICFR31_TINT90_0                 (0x00100000uL)
+#define INTC_ICDICFR31_TINT90_1                 (0x00200000uL)
+#define INTC_ICDICFR31_TINT91_0                 (0x00400000uL)
+#define INTC_ICDICFR31_TINT91_1                 (0x00800000uL)
+#define INTC_ICDICFR31_TINT92_0                 (0x01000000uL)
+#define INTC_ICDICFR31_TINT92_1                 (0x02000000uL)
+#define INTC_ICDICFR31_TINT93_0                 (0x04000000uL)
+#define INTC_ICDICFR31_TINT93_1                 (0x08000000uL)
+#define INTC_ICDICFR31_TINT94_0                 (0x10000000uL)
+#define INTC_ICDICFR31_TINT94_1                 (0x20000000uL)
+#define INTC_ICDICFR31_TINT95_0                 (0x40000000uL)
+#define INTC_ICDICFR31_TINT95_1                 (0x80000000uL)
+
+#define INTC_ICDICFR32_TINT96_0                 (0x00000001uL)
+#define INTC_ICDICFR32_TINT96_1                 (0x00000002uL)
+#define INTC_ICDICFR32_TINT97_0                 (0x00000004uL)
+#define INTC_ICDICFR32_TINT97_1                 (0x00000008uL)
+#define INTC_ICDICFR32_TINT98_0                 (0x00000010uL)
+#define INTC_ICDICFR32_TINT98_1                 (0x00000020uL)
+#define INTC_ICDICFR32_TINT99_0                 (0x00000040uL)
+#define INTC_ICDICFR32_TINT99_1                 (0x00000080uL)
+#define INTC_ICDICFR32_TINT100_0                (0x00000100uL)
+#define INTC_ICDICFR32_TINT100_1                (0x00000200uL)
+#define INTC_ICDICFR32_TINT101_0                (0x00000400uL)
+#define INTC_ICDICFR32_TINT101_1                (0x00000800uL)
+#define INTC_ICDICFR32_TINT102_0                (0x00001000uL)
+#define INTC_ICDICFR32_TINT102_1                (0x00002000uL)
+#define INTC_ICDICFR32_TINT103_0                (0x00004000uL)
+#define INTC_ICDICFR32_TINT103_1                (0x00008000uL)
+#define INTC_ICDICFR32_TINT104_0                (0x00010000uL)
+#define INTC_ICDICFR32_TINT104_1                (0x00020000uL)
+#define INTC_ICDICFR32_TINT105_0                (0x00040000uL)
+#define INTC_ICDICFR32_TINT105_1                (0x00080000uL)
+#define INTC_ICDICFR32_TINT106_0                (0x00100000uL)
+#define INTC_ICDICFR32_TINT106_1                (0x00200000uL)
+#define INTC_ICDICFR32_TINT107_0                (0x00400000uL)
+#define INTC_ICDICFR32_TINT107_1                (0x00800000uL)
+#define INTC_ICDICFR32_TINT108_0                (0x01000000uL)
+#define INTC_ICDICFR32_TINT108_1                (0x02000000uL)
+#define INTC_ICDICFR32_TINT109_0                (0x04000000uL)
+#define INTC_ICDICFR32_TINT109_1                (0x08000000uL)
+#define INTC_ICDICFR32_TINT110_0                (0x10000000uL)
+#define INTC_ICDICFR32_TINT110_1                (0x20000000uL)
+#define INTC_ICDICFR32_TINT111_0                (0x40000000uL)
+#define INTC_ICDICFR32_TINT111_1                (0x80000000uL)
+
+#define INTC_ICDICFR33_TINT112_0                (0x00000001uL)
+#define INTC_ICDICFR33_TINT112_1                (0x00000002uL)
+#define INTC_ICDICFR33_TINT113_0                (0x00000004uL)
+#define INTC_ICDICFR33_TINT113_1                (0x00000008uL)
+#define INTC_ICDICFR33_TINT114_0                (0x00000010uL)
+#define INTC_ICDICFR33_TINT114_1                (0x00000020uL)
+#define INTC_ICDICFR33_TINT115_0                (0x00000040uL)
+#define INTC_ICDICFR33_TINT115_1                (0x00000080uL)
+#define INTC_ICDICFR33_TINT116_0                (0x00000100uL)
+#define INTC_ICDICFR33_TINT116_1                (0x00000200uL)
+#define INTC_ICDICFR33_TINT117_0                (0x00000400uL)
+#define INTC_ICDICFR33_TINT117_1                (0x00000800uL)
+#define INTC_ICDICFR33_TINT118_0                (0x00001000uL)
+#define INTC_ICDICFR33_TINT118_1                (0x00002000uL)
+#define INTC_ICDICFR33_TINT119_0                (0x00004000uL)
+#define INTC_ICDICFR33_TINT119_1                (0x00008000uL)
+#define INTC_ICDICFR33_TINT120_0                (0x00010000uL)
+#define INTC_ICDICFR33_TINT120_1                (0x00020000uL)
+#define INTC_ICDICFR33_TINT121_0                (0x00040000uL)
+#define INTC_ICDICFR33_TINT121_1                (0x00080000uL)
+#define INTC_ICDICFR33_TINT122_0                (0x00100000uL)
+#define INTC_ICDICFR33_TINT122_1                (0x00200000uL)
+#define INTC_ICDICFR33_TINT123_0                (0x00400000uL)
+#define INTC_ICDICFR33_TINT123_1                (0x00800000uL)
+#define INTC_ICDICFR33_TINT124_0                (0x01000000uL)
+#define INTC_ICDICFR33_TINT124_1                (0x02000000uL)
+#define INTC_ICDICFR33_TINT125_0                (0x04000000uL)
+#define INTC_ICDICFR33_TINT125_1                (0x08000000uL)
+#define INTC_ICDICFR33_TINT126_0                (0x10000000uL)
+#define INTC_ICDICFR33_TINT126_1                (0x20000000uL)
+#define INTC_ICDICFR33_TINT127_0                (0x40000000uL)
+#define INTC_ICDICFR33_TINT127_1                (0x80000000uL)
+
+#define INTC_ICDICFR34_TINT128_0                (0x00000001uL)
+#define INTC_ICDICFR34_TINT128_1                (0x00000002uL)
+#define INTC_ICDICFR34_TINT129_0                (0x00000004uL)
+#define INTC_ICDICFR34_TINT129_1                (0x00000008uL)
+#define INTC_ICDICFR34_TINT130_0                (0x00000010uL)
+#define INTC_ICDICFR34_TINT130_1                (0x00000020uL)
+#define INTC_ICDICFR34_TINT131_0                (0x00000040uL)
+#define INTC_ICDICFR34_TINT131_1                (0x00000080uL)
+#define INTC_ICDICFR34_TINT132_0                (0x00000100uL)
+#define INTC_ICDICFR34_TINT132_1                (0x00000200uL)
+#define INTC_ICDICFR34_TINT133_0                (0x00000400uL)
+#define INTC_ICDICFR34_TINT133_1                (0x00000800uL)
+#define INTC_ICDICFR34_TINT134_0                (0x00001000uL)
+#define INTC_ICDICFR34_TINT134_1                (0x00002000uL)
+#define INTC_ICDICFR34_TINT135_0                (0x00004000uL)
+#define INTC_ICDICFR34_TINT135_1                (0x00008000uL)
+#define INTC_ICDICFR34_TINT136_0                (0x00010000uL)
+#define INTC_ICDICFR34_TINT136_1                (0x00020000uL)
+#define INTC_ICDICFR34_TINT137_0                (0x00040000uL)
+#define INTC_ICDICFR34_TINT137_1                (0x00080000uL)
+#define INTC_ICDICFR34_TINT138_0                (0x00100000uL)
+#define INTC_ICDICFR34_TINT138_1                (0x00200000uL)
+#define INTC_ICDICFR34_TINT139_0                (0x00400000uL)
+#define INTC_ICDICFR34_TINT139_1                (0x00800000uL)
+#define INTC_ICDICFR34_TINT140_0                (0x01000000uL)
+#define INTC_ICDICFR34_TINT140_1                (0x02000000uL)
+#define INTC_ICDICFR34_TINT141_0                (0x04000000uL)
+#define INTC_ICDICFR34_TINT141_1                (0x08000000uL)
+#define INTC_ICDICFR34_TINT142_0                (0x10000000uL)
+#define INTC_ICDICFR34_TINT142_1                (0x20000000uL)
+#define INTC_ICDICFR34_TINT143_0                (0x40000000uL)
+#define INTC_ICDICFR34_TINT143_1                (0x80000000uL)
+
+#define INTC_ICDICFR35_TINT144_0                (0x00000001uL)
+#define INTC_ICDICFR35_TINT144_1                (0x00000002uL)
+#define INTC_ICDICFR35_TINT145_0                (0x00000004uL)
+#define INTC_ICDICFR35_TINT145_1                (0x00000008uL)
+#define INTC_ICDICFR35_TINT146_0                (0x00000010uL)
+#define INTC_ICDICFR35_TINT146_1                (0x00000020uL)
+#define INTC_ICDICFR35_TINT147_0                (0x00000040uL)
+#define INTC_ICDICFR35_TINT147_1                (0x00000080uL)
+#define INTC_ICDICFR35_TINT148_0                (0x00000100uL)
+#define INTC_ICDICFR35_TINT148_1                (0x00000200uL)
+#define INTC_ICDICFR35_TINT149_0                (0x00000400uL)
+#define INTC_ICDICFR35_TINT149_1                (0x00000800uL)
+#define INTC_ICDICFR35_TINT150_0                (0x00001000uL)
+#define INTC_ICDICFR35_TINT150_1                (0x00002000uL)
+#define INTC_ICDICFR35_TINT151_0                (0x00004000uL)
+#define INTC_ICDICFR35_TINT151_1                (0x00008000uL)
+#define INTC_ICDICFR35_TINT152_0                (0x00010000uL)
+#define INTC_ICDICFR35_TINT152_1                (0x00020000uL)
+#define INTC_ICDICFR35_TINT153_0                (0x00040000uL)
+#define INTC_ICDICFR35_TINT153_1                (0x00080000uL)
+#define INTC_ICDICFR35_TINT154_0                (0x00100000uL)
+#define INTC_ICDICFR35_TINT154_1                (0x00200000uL)
+#define INTC_ICDICFR35_TINT155_0                (0x00400000uL)
+#define INTC_ICDICFR35_TINT155_1                (0x00800000uL)
+#define INTC_ICDICFR35_TINT156_0                (0x01000000uL)
+#define INTC_ICDICFR35_TINT156_1                (0x02000000uL)
+#define INTC_ICDICFR35_TINT157_0                (0x04000000uL)
+#define INTC_ICDICFR35_TINT157_1                (0x08000000uL)
+#define INTC_ICDICFR35_TINT158_0                (0x10000000uL)
+#define INTC_ICDICFR35_TINT158_1                (0x20000000uL)
+#define INTC_ICDICFR35_TINT159_0                (0x40000000uL)
+#define INTC_ICDICFR35_TINT159_1                (0x80000000uL)
+
+#define INTC_ICDICFR36_TINT160_0                (0x00000001uL)
+#define INTC_ICDICFR36_TINT160_1                (0x00000002uL)
+#define INTC_ICDICFR36_TINT161_0                (0x00000004uL)
+#define INTC_ICDICFR36_TINT161_1                (0x00000008uL)
+#define INTC_ICDICFR36_TINT162_0                (0x00000010uL)
+#define INTC_ICDICFR36_TINT162_1                (0x00000020uL)
+#define INTC_ICDICFR36_TINT163_0                (0x00000040uL)
+#define INTC_ICDICFR36_TINT163_1                (0x00000080uL)
+#define INTC_ICDICFR36_TINT164_0                (0x00000100uL)
+#define INTC_ICDICFR36_TINT164_1                (0x00000200uL)
+#define INTC_ICDICFR36_TINT165_0                (0x00000400uL)
+#define INTC_ICDICFR36_TINT165_1                (0x00000800uL)
+#define INTC_ICDICFR36_TINT166_0                (0x00001000uL)
+#define INTC_ICDICFR36_TINT166_1                (0x00002000uL)
+#define INTC_ICDICFR36_TINT167_0                (0x00004000uL)
+#define INTC_ICDICFR36_TINT167_1                (0x00008000uL)
+#define INTC_ICDICFR36_TINT168_0                (0x00010000uL)
+#define INTC_ICDICFR36_TINT168_1                (0x00020000uL)
+#define INTC_ICDICFR36_TINT169_0                (0x00040000uL)
+#define INTC_ICDICFR36_TINT169_1                (0x00080000uL)
+#define INTC_ICDICFR36_TINT170_0                (0x00100000uL)
+#define INTC_ICDICFR36_TINT170_1                (0x00200000uL)
+
+#define INTC_ICDSGIR_SGIINTID                   (0x0000000FuL)
+#define INTC_ICDSGIR_SATT                       (0x00008000uL)
+#define INTC_ICDSGIR_CPUTargetList              (0x00FF0000uL)
+#define INTC_ICDSGIR_TargetListFilter           (0x03000000uL)
+
+#define INTC_ICCICR_EnableS                     (0x00000001uL)
+#define INTC_ICCICR_EnableNS                    (0x00000002uL)
+#define INTC_ICCICR_AckCtl                      (0x00000004uL)
+#define INTC_ICCICR_FIQEn                       (0x00000008uL)
+#define INTC_ICCICR_SBPR                        (0x00000010uL)
+
+#define INTC_ICCPMR_Priority                    (0x000000FFuL)
+
+#define INTC_ICCBPR_Binarypoint                 (0x00000007uL)
+
+#define INTC_ICCIAR_ACKINTID                    (0x000003FFuL)
+#define INTC_ICCIAR_CPUID                       (0x00001C00uL)
+
+#define INTC_ICCEOIR_EOIINTID                   (0x000003FFuL)
+#define INTC_ICCEOIR_CPUID                      (0x00001C00uL)
+
+#define INTC_ICCRPR_Priority                    (0x000000FFuL)
+
+#define INTC_ICCHPIR_PENDINTID                  (0x000003FFuL)
+#define INTC_ICCHPIR_CPUID                      (0x00001C00uL)
+
+#define INTC_ICCABPR_Binarypoint                (0x00000007uL)
+
+#define INTC_ICCIIDR_Implementer                (0x00000FFFuL)
+#define INTC_ICCIIDR_Revision                   (0x0000F000uL)
+#define INTC_ICCIIDR_Architecture_version       (0x000F0000uL)
+#define INTC_ICCIIDR_ProductID                  (0xFFF00000uL)
+
+#define INTC_ICR0_NMIF                          (0x0002u)
+#define INTC_ICR0_NMIE                          (0x0100u)
+#define INTC_ICR0_NMIL                          (0x8000u)
+
+#define INTC_ICR1_IRQ00S                        (0x0001u)
+#define INTC_ICR1_IRQ01S                        (0x0002u)
+#define INTC_ICR1_IRQ10S                        (0x0004u)
+#define INTC_ICR1_IRQ11S                        (0x0008u)
+#define INTC_ICR1_IRQ20S                        (0x0010u)
+#define INTC_ICR1_IRQ21S                        (0x0020u)
+#define INTC_ICR1_IRQ30S                        (0x0040u)
+#define INTC_ICR1_IRQ31S                        (0x0080u)
+#define INTC_ICR1_IRQ40S                        (0x0100u)
+#define INTC_ICR1_IRQ41S                        (0x0200u)
+#define INTC_ICR1_IRQ50S                        (0x0400u)
+#define INTC_ICR1_IRQ51S                        (0x0800u)
+#define INTC_ICR1_IRQ60S                        (0x1000u)
+#define INTC_ICR1_IRQ61S                        (0x2000u)
+#define INTC_ICR1_IRQ70S                        (0x4000u)
+#define INTC_ICR1_IRQ71S                        (0x8000u)
+
+#define INTC_IRQRR_IRQ0F                        (0x0001u)
+#define INTC_IRQRR_IRQ1F                        (0x0002u)
+#define INTC_IRQRR_IRQ2F                        (0x0004u)
+#define INTC_IRQRR_IRQ3F                        (0x0008u)
+#define INTC_IRQRR_IRQ4F                        (0x0010u)
+#define INTC_IRQRR_IRQ5F                        (0x0020u)
+#define INTC_IRQRR_IRQ6F                        (0x0040u)
+#define INTC_IRQRR_IRQ7F                        (0x0080u)
+
+
+/* ==== Shift values for IO registers ==== */
+#define INTC_ICDDCR_Enable_SHIFT                (0u)
+
+#define INTC_ICDICTR_ITLinesNumber_SHIFT        (0u)
+#define INTC_ICDICTR_CPUNumber_SHIFT            (5u)
+#define INTC_ICDICTR_SecurityExtn_SHIFT         (10u)
+#define INTC_ICDICTR_LSPI_SHIFT                 (11u)
+
+#define INTC_ICDIIDR_Implementer_SHIFT          (0u)
+#define INTC_ICDIIDR_Revision_SHIFT             (12u)
+#define INTC_ICDIIDR_Variant_SHIFT              (16u)
+#define INTC_ICDIIDR_ProductID_SHIFT            (24u)
+
+#define INTC_ICDISR0_SW0_SHIFT                  (0u)
+#define INTC_ICDISR0_SW1_SHIFT                  (1u)
+#define INTC_ICDISR0_SW2_SHIFT                  (2u)
+#define INTC_ICDISR0_SW3_SHIFT                  (3u)
+#define INTC_ICDISR0_SW4_SHIFT                  (4u)
+#define INTC_ICDISR0_SW5_SHIFT                  (5u)
+#define INTC_ICDISR0_SW6_SHIFT                  (6u)
+#define INTC_ICDISR0_SW7_SHIFT                  (7u)
+#define INTC_ICDISR0_SW8_SHIFT                  (8u)
+#define INTC_ICDISR0_SW9_SHIFT                  (9u)
+#define INTC_ICDISR0_SW10_SHIFT                 (10u)
+#define INTC_ICDISR0_SW11_SHIFT                 (11u)
+#define INTC_ICDISR0_SW12_SHIFT                 (12u)
+#define INTC_ICDISR0_SW13_SHIFT                 (13u)
+#define INTC_ICDISR0_SW14_SHIFT                 (14u)
+#define INTC_ICDISR0_SW15_SHIFT                 (15u)
+#define INTC_ICDISR0_PMUIRQ0_SHIFT              (16u)
+#define INTC_ICDISR0_COMMRX0_SHIFT              (17u)
+#define INTC_ICDISR0_COMMTX0_SHIFT              (18u)
+#define INTC_ICDISR0_CTIIRQ0_SHIFT              (19u)
+
+#define INTC_ICDISR1_IRQ0_SHIFT                 (0u)
+#define INTC_ICDISR1_IRQ1_SHIFT                 (1u)
+#define INTC_ICDISR1_IRQ2_SHIFT                 (2u)
+#define INTC_ICDISR1_IRQ3_SHIFT                 (3u)
+#define INTC_ICDISR1_IRQ4_SHIFT                 (4u)
+#define INTC_ICDISR1_IRQ5_SHIFT                 (5u)
+#define INTC_ICDISR1_IRQ6_SHIFT                 (6u)
+#define INTC_ICDISR1_IRQ7_SHIFT                 (7u)
+#define INTC_ICDISR1_PL310ERR_SHIFT             (8u)
+#define INTC_ICDISR1_DMAINT0_SHIFT              (9u)
+#define INTC_ICDISR1_DMAINT1_SHIFT              (10u)
+#define INTC_ICDISR1_DMAINT2_SHIFT              (11u)
+#define INTC_ICDISR1_DMAINT3_SHIFT              (12u)
+#define INTC_ICDISR1_DMAINT4_SHIFT              (13u)
+#define INTC_ICDISR1_DMAINT5_SHIFT              (14u)
+#define INTC_ICDISR1_DMAINT6_SHIFT              (15u)
+#define INTC_ICDISR1_DMAINT7_SHIFT              (16u)
+#define INTC_ICDISR1_DMAINT8_SHIFT              (17u)
+#define INTC_ICDISR1_DMAINT9_SHIFT              (18u)
+#define INTC_ICDISR1_DMAINT10_SHIFT             (19u)
+#define INTC_ICDISR1_DMAINT11_SHIFT             (20u)
+#define INTC_ICDISR1_DMAINT12_SHIFT             (21u)
+#define INTC_ICDISR1_DMAINT13_SHIFT             (22u)
+#define INTC_ICDISR1_DMAINT14_SHIFT             (23u)
+#define INTC_ICDISR1_DMAINT15_SHIFT             (24u)
+#define INTC_ICDISR1_DMAERR_SHIFT               (25u)
+
+#define INTC_ICDISR2_USBI0_SHIFT                (9u)
+#define INTC_ICDISR2_USBI1_SHIFT                (10u)
+#define INTC_ICDISR2_S0_VI_VSYNC0_SHIFT         (11u)
+#define INTC_ICDISR2_S0_LO_VSYNC0_SHIFT         (12u)
+#define INTC_ICDISR2_S0_VSYNCERR0_SHIFT         (13u)
+#define INTC_ICDISR2_GR3_VLINE0_SHIFT           (14u)
+#define INTC_ICDISR2_S0_VFIELD0_SHIFT           (15u)
+#define INTC_ICDISR2_IV1_VBUFERR0_SHIFT         (16u)
+#define INTC_ICDISR2_IV3_VBUFERR0_SHIFT         (17u)
+#define INTC_ICDISR2_IV5_VBUFERR0_SHIFT         (18u)
+#define INTC_ICDISR2_IV6_VBUFERR0_SHIFT         (19u)
+#define INTC_ICDISR2_S0_WLINE0_SHIFT            (20u)
+#define INTC_ICDISR2_S1_VI_VSYNC0_SHIFT         (21u)
+#define INTC_ICDISR2_S1_LO_VSYNC0_SHIFT         (22u)
+#define INTC_ICDISR2_S1_VSYNCERR0_SHIFT         (23u)
+#define INTC_ICDISR2_S1_VFIELD0_SHIFT           (24u)
+#define INTC_ICDISR2_IV2_VBUFERR0_SHIFT         (25u)
+#define INTC_ICDISR2_IV4_VBUFERR0_SHIFT         (26u)
+#define INTC_ICDISR2_S1_WLINE0_SHIFT            (27u)
+#define INTC_ICDISR2_OIR_VI_VSYNC0_SHIFT        (28u)
+#define INTC_ICDISR2_OIR_LO_VSYNC0_SHIFT        (29u)
+#define INTC_ICDISR2_OIR_VSYNCERR0_SHIFT        (30u)
+#define INTC_ICDISR2_OIR_VFIELD0_SHIFT          (31u)
+
+#define INTC_ICDISR3_IV7_VBUFERR0_SHIFT         (0u)
+#define INTC_ICDISR3_IV8_VBUFERR0_SHIFT         (1u)
+#define INTC_ICDISR3_S0_VI_VSYNC1_SHIFT         (3u)
+#define INTC_ICDISR3_S0_LO_VSYNC1_SHIFT         (4u)
+#define INTC_ICDISR3_S0_VSYNCERR1_SHIFT         (5u)
+#define INTC_ICDISR3_GR3_VLINE1_SHIFT           (6u)
+#define INTC_ICDISR3_S0_VFIELD1_SHIFT           (7u)
+#define INTC_ICDISR3_IV1_VBUFERR1_SHIFT         (8u)
+#define INTC_ICDISR3_IV3_VBUFERR1_SHIFT         (9u)
+#define INTC_ICDISR3_IV5_VBUFERR1_SHIFT         (10u)
+#define INTC_ICDISR3_IV6_VBUFERR1_SHIFT         (11u)
+#define INTC_ICDISR3_S0_WLINE1_SHIFT            (12u)
+#define INTC_ICDISR3_S1_VI_VSYNC1_SHIFT         (13u)
+#define INTC_ICDISR3_S1_LO_VSYNC1_SHIFT         (14u)
+#define INTC_ICDISR3_S1_VSYNCERR1_SHIFT         (15u)
+#define INTC_ICDISR3_S1_VFIELD1_SHIFT           (16u)
+#define INTC_ICDISR3_IV2_VBUFERR1_SHIFT         (17u)
+#define INTC_ICDISR3_IV4_VBUFERR1_SHIFT         (18u)
+#define INTC_ICDISR3_S1_WLINE1_SHIFT            (19u)
+#define INTC_ICDISR3_OIR_VI_VSYNC1_SHIFT        (20u)
+#define INTC_ICDISR3_OIR_LO_VSYNC1_SHIFT        (21u)
+#define INTC_ICDISR3_OIR_VLINE1_SHIFT           (22u)
+#define INTC_ICDISR3_OIR_VFIELD1_SHIFT          (23u)
+#define INTC_ICDISR3_IV7_VBUFERR1_SHIFT         (24u)
+#define INTC_ICDISR3_IV8_VBUFERR1_SHIFT         (25u)
+#define INTC_ICDISR3_IMRDI_SHIFT                (27u)
+#define INTC_ICDISR3_IMR2I0_SHIFT               (28u)
+#define INTC_ICDISR3_IMR2I1_SHIFT               (29u)
+#define INTC_ICDISR3_JEDI_SHIFT                 (30u)
+#define INTC_ICDISR3_JDTI_SHIFT                 (31u)
+
+#define INTC_ICDISR4_CMP0_SHIFT                 (0u)
+#define INTC_ICDISR4_CMP1_SHIFT                 (1u)
+#define INTC_ICDISR4_INT0_SHIFT                 (2u)
+#define INTC_ICDISR4_INT1_SHIFT                 (3u)
+#define INTC_ICDISR4_INT2_SHIFT                 (4u)
+#define INTC_ICDISR4_INT3_SHIFT                 (5u)
+#define INTC_ICDISR4_OSTM0TINT_SHIFT            (6u)
+#define INTC_ICDISR4_OSTM1TINT_SHIFT            (7u)
+#define INTC_ICDISR4_CMI_SHIFT                  (8u)
+#define INTC_ICDISR4_WTOUT_SHIFT                (9u)
+#define INTC_ICDISR4_ITI_SHIFT                  (10u)
+#define INTC_ICDISR4_TGI0A_SHIFT                (11u)
+#define INTC_ICDISR4_TGI0B_SHIFT                (12u)
+#define INTC_ICDISR4_TGI0C_SHIFT                (13u)
+#define INTC_ICDISR4_TGI0D_SHIFT                (14u)
+#define INTC_ICDISR4_TGI0V_SHIFT                (15u)
+#define INTC_ICDISR4_TGI0E_SHIFT                (16u)
+#define INTC_ICDISR4_TGI0F_SHIFT                (17u)
+#define INTC_ICDISR4_TGI1A_SHIFT                (18u)
+#define INTC_ICDISR4_TGI1B_SHIFT                (19u)
+#define INTC_ICDISR4_TGI1V_SHIFT                (20u)
+#define INTC_ICDISR4_TGI1U_SHIFT                (21u)
+#define INTC_ICDISR4_TGI2A_SHIFT                (22u)
+#define INTC_ICDISR4_TGI2B_SHIFT                (23u)
+#define INTC_ICDISR4_TGI2V_SHIFT                (24u)
+#define INTC_ICDISR4_TGI2U_SHIFT                (25u)
+#define INTC_ICDISR4_TGI3A_SHIFT                (26u)
+#define INTC_ICDISR4_TGI3B_SHIFT                (27u)
+#define INTC_ICDISR4_TGI3C_SHIFT                (28u)
+#define INTC_ICDISR4_TGI3D_SHIFT                (29u)
+#define INTC_ICDISR4_TGI3V_SHIFT                (30u)
+#define INTC_ICDISR4_TGI4A_SHIFT                (31u)
+
+#define INTC_ICDISR5_TGI4B_SHIFT                (0u)
+#define INTC_ICDISR5_TGI4C_SHIFT                (1u)
+#define INTC_ICDISR5_TGI4D_SHIFT                (2u)
+#define INTC_ICDISR5_TGI4V_SHIFT                (3u)
+#define INTC_ICDISR5_CMI1_SHIFT                 (4u)
+#define INTC_ICDISR5_CMI2_SHIFT                 (5u)
+#define INTC_ICDISR5_SGDEI0_SHIFT               (6u)
+#define INTC_ICDISR5_SGDEI1_SHIFT               (7u)
+#define INTC_ICDISR5_SGDEI2_SHIFT               (8u)
+#define INTC_ICDISR5_SGDEI3_SHIFT               (9u)
+#define INTC_ICDISR5_ADI_SHIFT                  (10u)
+#define INTC_ICDISR5_LMTI_SHIFT                 (11u)
+#define INTC_ICDISR5_SSII0_SHIFT                (12u)
+#define INTC_ICDISR5_SSIRXI0_SHIFT              (13u)
+#define INTC_ICDISR5_SSITXI0_SHIFT              (14u)
+#define INTC_ICDISR5_SSII1_SHIFT                (15u)
+#define INTC_ICDISR5_SSIRXI1_SHIFT              (16u)
+#define INTC_ICDISR5_SSITXI1_SHIFT              (17u)
+#define INTC_ICDISR5_SSII2_SHIFT                (18u)
+#define INTC_ICDISR5_SSIRTI2_SHIFT              (19u)
+#define INTC_ICDISR5_SSII3_SHIFT                (20u)
+#define INTC_ICDISR5_SSIRXI3_SHIFT              (21u)
+#define INTC_ICDISR5_SSITXI3_SHIFT              (22u)
+#define INTC_ICDISR5_SSII4_SHIFT                (23u)
+#define INTC_ICDISR5_SSIRTI4_SHIFT              (24u)
+#define INTC_ICDISR5_SSII5_SHIFT                (25u)
+#define INTC_ICDISR5_SSIRXI5_SHIFT              (26u)
+#define INTC_ICDISR5_SSITXI5_SHIFT              (27u)
+#define INTC_ICDISR5_SPDIFI_SHIFT               (28u)
+#define INTC_ICDISR5_INTIICTEI0_SHIFT           (29u)
+#define INTC_ICDISR5_INTIICRI0_SHIFT            (30u)
+#define INTC_ICDISR5_INTIICTI0_SHIFT            (31u)
+
+#define INTC_ICDISR6_INTIICSPI0_SHIFT           (0u)
+#define INTC_ICDISR6_INTIICSTI0_SHIFT           (1u)
+#define INTC_ICDISR6_INTIICNAKI0_SHIFT          (2u)
+#define INTC_ICDISR6_INTIICALI0_SHIFT           (3u)
+#define INTC_ICDISR6_INTIICTMOI0_SHIFT          (4u)
+#define INTC_ICDISR6_INTIICTEI1_SHIFT           (5u)
+#define INTC_ICDISR6_INTIICRI1_SHIFT            (6u)
+#define INTC_ICDISR6_INTIICTI1_SHIFT            (7u)
+#define INTC_ICDISR6_INTIICSPI1_SHIFT           (8u)
+#define INTC_ICDISR6_INTIICSTI1_SHIFT           (9u)
+#define INTC_ICDISR6_INTIICNAKI1_SHIFT          (10u)
+#define INTC_ICDISR6_INTIICALI1_SHIFT           (11u)
+#define INTC_ICDISR6_INTIICTMOI1_SHIFT          (12u)
+#define INTC_ICDISR6_INTIICTEI2_SHIFT           (13u)
+#define INTC_ICDISR6_INTIICRI2_SHIFT            (14u)
+#define INTC_ICDISR6_INTIICTI2_SHIFT            (15u)
+#define INTC_ICDISR6_INTIICSPI2_SHIFT           (16u)
+#define INTC_ICDISR6_INTIICSTI2_SHIFT           (17u)
+#define INTC_ICDISR6_INTIICNAKI2_SHIFT          (18u)
+#define INTC_ICDISR6_INTIICALI2_SHIFT           (19u)
+#define INTC_ICDISR6_INTIICTMOI2_SHIFT          (20u)
+#define INTC_ICDISR6_INTIICTEI3_SHIFT           (21u)
+#define INTC_ICDISR6_INTIICRI3_SHIFT            (22u)
+#define INTC_ICDISR6_INTIICTI3_SHIFT            (23u)
+#define INTC_ICDISR6_INTIICSPI3_SHIFT           (24u)
+#define INTC_ICDISR6_INTIICSTI3_SHIFT           (25u)
+#define INTC_ICDISR6_INTIICNAKI3_SHIFT          (26u)
+#define INTC_ICDISR6_INTIICALI3_SHIFT           (27u)
+#define INTC_ICDISR6_INTIICTMOI3_SHIFT          (28u)
+#define INTC_ICDISR6_BRI0_SHIFT                 (29u)
+#define INTC_ICDISR6_ERI0_SHIFT                 (30u)
+#define INTC_ICDISR6_RXI0_SHIFT                 (31u)
+
+#define INTC_ICDISR7_TXI0_SHIFT                 (0u)
+#define INTC_ICDISR7_BRI1_SHIFT                 (1u)
+#define INTC_ICDISR7_ERI1_SHIFT                 (2u)
+#define INTC_ICDISR7_RXI1_SHIFT                 (3u)
+#define INTC_ICDISR7_TXI1_SHIFT                 (4u)
+#define INTC_ICDISR7_BRI2_SHIFT                 (5u)
+#define INTC_ICDISR7_ERI2_SHIFT                 (6u)
+#define INTC_ICDISR7_RXI2_SHIFT                 (7u)
+#define INTC_ICDISR7_TXI2_SHIFT                 (8u)
+#define INTC_ICDISR7_BRI3_SHIFT                 (9u)
+#define INTC_ICDISR7_ERI3_SHIFT                 (10u)
+#define INTC_ICDISR7_RXI3_SHIFT                 (11u)
+#define INTC_ICDISR7_TXI3_SHIFT                 (12u)
+#define INTC_ICDISR7_BRI4_SHIFT                 (13u)
+#define INTC_ICDISR7_ERI4_SHIFT                 (14u)
+#define INTC_ICDISR7_RXI4_SHIFT                 (15u)
+#define INTC_ICDISR7_TXI4_SHIFT                 (16u)
+#define INTC_ICDISR7_BRI5_SHIFT                 (17u)
+#define INTC_ICDISR7_ERI5_SHIFT                 (18u)
+#define INTC_ICDISR7_RXI5_SHIFT                 (19u)
+#define INTC_ICDISR7_TXI5_SHIFT                 (20u)
+#define INTC_ICDISR7_BRI6_SHIFT                 (21u)
+#define INTC_ICDISR7_ERI6_SHIFT                 (22u)
+#define INTC_ICDISR7_RXI6_SHIFT                 (23u)
+#define INTC_ICDISR7_TXI6_SHIFT                 (24u)
+#define INTC_ICDISR7_BRI7_SHIFT                 (25u)
+#define INTC_ICDISR7_ERI7_SHIFT                 (26u)
+#define INTC_ICDISR7_RXI7_SHIFT                 (27u)
+#define INTC_ICDISR7_TXI7_SHIFT                 (28u)
+#define INTC_ICDISR7_INTRCANGERR_SHIFT          (29u)
+#define INTC_ICDISR7_INTRCANGRECC_SHIFT         (30u)
+#define INTC_ICDISR7_INTRCAN0REC_SHIFT          (31u)
+
+#define INTC_ICDISR8_INTRCAN0ERR_SHIFT          (0u)
+#define INTC_ICDISR8_INTRCAN0TRX_SHIFT          (1u)
+#define INTC_ICDISR8_INTRCAN1REC_SHIFT          (2u)
+#define INTC_ICDISR8_INTRCAN1ERR_SHIFT          (3u)
+#define INTC_ICDISR8_INTRCAN1TRX_SHIFT          (4u)
+#define INTC_ICDISR8_INTRCAN2REC_SHIFT          (5u)
+#define INTC_ICDISR8_INTRCAN2ERR_SHIFT          (6u)
+#define INTC_ICDISR8_INTRCAN2TRX_SHIFT          (7u)
+#define INTC_ICDISR8_INTRCAN3REC_SHIFT          (8u)
+#define INTC_ICDISR8_INTRCAN3ERR_SHIFT          (9u)
+#define INTC_ICDISR8_INTRCAN3TRX_SHIFT          (10u)
+#define INTC_ICDISR8_INTRCAN4REC_SHIFT          (11u)
+#define INTC_ICDISR8_INTRCAN4ERR_SHIFT          (12u)
+#define INTC_ICDISR8_INTRCAN4TRX_SHIFT          (13u)
+#define INTC_ICDISR8_SPEI0_SHIFT                (14u)
+#define INTC_ICDISR8_SPRI0_SHIFT                (15u)
+#define INTC_ICDISR8_SPTI0_SHIFT                (16u)
+#define INTC_ICDISR8_SPEI1_SHIFT                (17u)
+#define INTC_ICDISR8_SPRI1_SHIFT                (18u)
+#define INTC_ICDISR8_SPTI1_SHIFT                (19u)
+#define INTC_ICDISR8_SPEI2_SHIFT                (20u)
+#define INTC_ICDISR8_SPRI2_SHIFT                (21u)
+#define INTC_ICDISR8_SPTI2_SHIFT                (22u)
+#define INTC_ICDISR8_SPEI3_SHIFT                (23u)
+#define INTC_ICDISR8_SPRI3_SHIFT                (24u)
+#define INTC_ICDISR8_SPTI3_SHIFT                (25u)
+#define INTC_ICDISR8_SPEI4_SHIFT                (26u)
+#define INTC_ICDISR8_SPRI4_SHIFT                (27u)
+#define INTC_ICDISR8_SPTI4_SHIFT                (28u)
+#define INTC_ICDISR8_IEBBTD_SHIFT               (29u)
+#define INTC_ICDISR8_IEBBTERR_SHIFT             (30u)
+#define INTC_ICDISR8_IEBBTSTA_SHIFT             (31u)
+
+#define INTC_ICDISR9_IEBBTV_SHIFT               (0u)
+#define INTC_ICDISR9_ISY_SHIFT                  (1u)
+#define INTC_ICDISR9_IERR_SHIFT                 (2u)
+#define INTC_ICDISR9_ITARG_SHIFT                (3u)
+#define INTC_ICDISR9_ISEC_SHIFT                 (4u)
+#define INTC_ICDISR9_IBUF_SHIFT                 (5u)
+#define INTC_ICDISR9_IREADY_SHIFT               (6u)
+#define INTC_ICDISR9_FLSTE_SHIFT                (7u)
+#define INTC_ICDISR9_FLTENDI_SHIFT              (8u)
+#define INTC_ICDISR9_FLTREQ0I_SHIFT             (9u)
+#define INTC_ICDISR9_FLTREQ1I_SHIFT             (10u)
+#define INTC_ICDISR9_MMC0_SHIFT                 (11u)
+#define INTC_ICDISR9_MMC1_SHIFT                 (12u)
+#define INTC_ICDISR9_MMC2_SHIFT                 (13u)
+#define INTC_ICDISR9_SDHI0_3_SHIFT              (14u)
+#define INTC_ICDISR9_SDHI0_0_SHIFT              (15u)
+#define INTC_ICDISR9_SDHI0_1_SHIFT              (16u)
+#define INTC_ICDISR9_SDHI1_3_SHIFT              (17u)
+#define INTC_ICDISR9_SDHI1_0_SHIFT              (18u)
+#define INTC_ICDISR9_SDHI1_1_SHIFT              (19u)
+#define INTC_ICDISR9_ARM_SHIFT                  (20u)
+#define INTC_ICDISR9_PRD_SHIFT                  (21u)
+#define INTC_ICDISR9_CUP_SHIFT                  (22u)
+#define INTC_ICDISR9_SCUAI0_SHIFT               (23u)
+#define INTC_ICDISR9_SCUAI1_SHIFT               (24u)
+#define INTC_ICDISR9_SCUFDI0_SHIFT              (25u)
+#define INTC_ICDISR9_SCUFDI1_SHIFT              (26u)
+#define INTC_ICDISR9_SCUFDI2_SHIFT              (27u)
+#define INTC_ICDISR9_SCUFDI3_SHIFT              (28u)
+#define INTC_ICDISR9_SCUFUI0_SHIFT              (29u)
+#define INTC_ICDISR9_SCUFUI1_SHIFT              (30u)
+#define INTC_ICDISR9_SCUFUI2_SHIFT              (31u)
+
+#define INTC_ICDISR10_SCUFUI3_SHIFT             (0u)
+#define INTC_ICDISR10_SCUDVI0_SHIFT             (1u)
+#define INTC_ICDISR10_SCUDVI1_SHIFT             (2u)
+#define INTC_ICDISR10_SCUDVI2_SHIFT             (3u)
+#define INTC_ICDISR10_SCUDVI3_SHIFT             (4u)
+#define INTC_ICDISR10_MLB_CINT_SHIFT            (5u)
+#define INTC_ICDISR10_MLB_SINT_SHIFT            (6u)
+#define INTC_ICDISR10_DRC0_SHIFT                (7u)
+#define INTC_ICDISR10_DRC1_SHIFT                (8u)
+#define INTC_ICDISR10_LINI0_INT_T_SHIFT         (11u)
+#define INTC_ICDISR10_LINI0_INT_R_SHIFT         (12u)
+#define INTC_ICDISR10_LINI0_INT_S_SHIFT         (13u)
+#define INTC_ICDISR10_LINI0_INT_M_SHIFT         (14u)
+#define INTC_ICDISR10_LINI1_INT_T_SHIFT         (15u)
+#define INTC_ICDISR10_LINI1_INT_R_SHIFT         (16u)
+#define INTC_ICDISR10_LINI1_INT_S_SHIFT         (17u)
+#define INTC_ICDISR10_LINI1_INT_M_SHIFT         (18u)
+#define INTC_ICDISR10_ERI0_SHIFT                (27u)
+#define INTC_ICDISR10_RXI0_SHIFT                (28u)
+#define INTC_ICDISR10_TXI0_SHIFT                (29u)
+#define INTC_ICDISR10_TEI0_SHIFT                (30u)
+#define INTC_ICDISR10_ERI1_SHIFT                (31u)
+
+#define INTC_ICDISR11_RXI1_SHIFT                (0u)
+#define INTC_ICDISR11_TXI1_SHIFT                (1u)
+#define INTC_ICDISR11_TEI1_SHIFT                (2u)
+#define INTC_ICDISR11_AVBI_DATA_SHIFT           (3u)
+#define INTC_ICDISR11_AVBI_ERROR_SHIFT          (4u)
+#define INTC_ICDISR11_AVBI_MANAGE_SHIFT         (5u)
+#define INTC_ICDISR11_AVBI_MAC_SHIFT            (6u)
+#define INTC_ICDISR11_ETHERI_SHIFT              (7u)
+#define INTC_ICDISR11_CEUI_SHIFT                (12u)
+#define INTC_ICDISR11_H2XMLB_ERRINT_SHIFT       (29u)
+#define INTC_ICDISR11_H2XIC1_ERRINT_SHIFT       (30u)
+#define INTC_ICDISR11_X2HPERI1_ERRINT_SHIFT     (31u)
+
+#define INTC_ICDISR12_X2HPERI2_ERRINT_SHIFT     (0u)
+#define INTC_ICDISR12_X2HPERI34_ERRINT_SHIFT    (1u)
+#define INTC_ICDISR12_X2HPERI5_ERRINT_SHIFT     (2u)
+#define INTC_ICDISR12_X2HPERI67_ERRINT_SHIFT    (3u)
+#define INTC_ICDISR12_X2HDBGR_ERRINT_SHIFT      (4u)
+#define INTC_ICDISR12_X2HBSC_ERRINT_SHIFT       (5u)
+#define INTC_ICDISR12_X2HSPI1_ERRINT_SHIFT      (6u)
+#define INTC_ICDISR12_X2HSPI2_ERRINT_SHIFT      (7u)
+#define INTC_ICDISR12_PRRI_SHIFT                (8u)
+#define INTC_ICDISR12_IFEI0_SHIFT               (9u)
+#define INTC_ICDISR12_OFFI0_SHIFT               (10u)
+#define INTC_ICDISR12_PFVEI0_SHIFT              (11u)
+#define INTC_ICDISR12_IFEI1_SHIFT               (12u)
+#define INTC_ICDISR12_OFFI1_SHIFT               (13u)
+#define INTC_ICDISR12_PFVEI1_SHIFT              (14u)
+
+#define INTC_ICDISR13_TINT0_SHIFT               (0u)
+#define INTC_ICDISR13_TINT1_SHIFT               (1u)
+#define INTC_ICDISR13_TINT2_SHIFT               (2u)
+#define INTC_ICDISR13_TINT3_SHIFT               (3u)
+#define INTC_ICDISR13_TINT4_SHIFT               (4u)
+#define INTC_ICDISR13_TINT5_SHIFT               (5u)
+#define INTC_ICDISR13_TINT6_SHIFT               (6u)
+#define INTC_ICDISR13_TINT7_SHIFT               (7u)
+#define INTC_ICDISR13_TINT8_SHIFT               (8u)
+#define INTC_ICDISR13_TINT9_SHIFT               (9u)
+#define INTC_ICDISR13_TINT10_SHIFT              (10u)
+#define INTC_ICDISR13_TINT11_SHIFT              (11u)
+#define INTC_ICDISR13_TINT12_SHIFT              (12u)
+#define INTC_ICDISR13_TINT13_SHIFT              (13u)
+#define INTC_ICDISR13_TINT14_SHIFT              (14u)
+#define INTC_ICDISR13_TINT15_SHIFT              (15u)
+#define INTC_ICDISR13_TINT16_SHIFT              (16u)
+#define INTC_ICDISR13_TINT17_SHIFT              (17u)
+#define INTC_ICDISR13_TINT18_SHIFT              (18u)
+#define INTC_ICDISR13_TINT19_SHIFT              (19u)
+#define INTC_ICDISR13_TINT20_SHIFT              (20u)
+#define INTC_ICDISR13_TINT21_SHIFT              (21u)
+#define INTC_ICDISR13_TINT22_SHIFT              (22u)
+#define INTC_ICDISR13_TINT23_SHIFT              (23u)
+#define INTC_ICDISR13_TINT24_SHIFT              (24u)
+#define INTC_ICDISR13_TINT25_SHIFT              (25u)
+#define INTC_ICDISR13_TINT26_SHIFT              (26u)
+#define INTC_ICDISR13_TINT27_SHIFT              (27u)
+#define INTC_ICDISR13_TINT28_SHIFT              (28u)
+#define INTC_ICDISR13_TINT29_SHIFT              (29u)
+#define INTC_ICDISR13_TINT30_SHIFT              (30u)
+#define INTC_ICDISR13_TINT31_SHIFT              (31u)
+
+#define INTC_ICDISR14_TINT32_SHIFT              (0u)
+#define INTC_ICDISR14_TINT33_SHIFT              (1u)
+#define INTC_ICDISR14_TINT34_SHIFT              (2u)
+#define INTC_ICDISR14_TINT35_SHIFT              (3u)
+#define INTC_ICDISR14_TINT36_SHIFT              (4u)
+#define INTC_ICDISR14_TINT37_SHIFT              (5u)
+#define INTC_ICDISR14_TINT38_SHIFT              (6u)
+#define INTC_ICDISR14_TINT39_SHIFT              (7u)
+#define INTC_ICDISR14_TINT40_SHIFT              (8u)
+#define INTC_ICDISR14_TINT41_SHIFT              (9u)
+#define INTC_ICDISR14_TINT42_SHIFT              (10u)
+#define INTC_ICDISR14_TINT43_SHIFT              (11u)
+#define INTC_ICDISR14_TINT44_SHIFT              (12u)
+#define INTC_ICDISR14_TINT45_SHIFT              (13u)
+#define INTC_ICDISR14_TINT46_SHIFT              (14u)
+#define INTC_ICDISR14_TINT47_SHIFT              (15u)
+#define INTC_ICDISR14_TINT48_SHIFT              (16u)
+#define INTC_ICDISR14_TINT49_SHIFT              (17u)
+#define INTC_ICDISR14_TINT50_SHIFT              (18u)
+#define INTC_ICDISR14_TINT51_SHIFT              (19u)
+#define INTC_ICDISR14_TINT52_SHIFT              (20u)
+#define INTC_ICDISR14_TINT53_SHIFT              (21u)
+#define INTC_ICDISR14_TINT54_SHIFT              (22u)
+#define INTC_ICDISR14_TINT55_SHIFT              (23u)
+#define INTC_ICDISR14_TINT56_SHIFT              (24u)
+#define INTC_ICDISR14_TINT57_SHIFT              (25u)
+#define INTC_ICDISR14_TINT58_SHIFT              (26u)
+#define INTC_ICDISR14_TINT59_SHIFT              (27u)
+#define INTC_ICDISR14_TINT60_SHIFT              (28u)
+#define INTC_ICDISR14_TINT61_SHIFT              (29u)
+#define INTC_ICDISR14_TINT62_SHIFT              (30u)
+#define INTC_ICDISR14_TINT63_SHIFT              (31u)
+
+#define INTC_ICDISR15_TINT64_SHIFT              (0u)
+#define INTC_ICDISR15_TINT65_SHIFT              (1u)
+#define INTC_ICDISR15_TINT66_SHIFT              (2u)
+#define INTC_ICDISR15_TINT67_SHIFT              (3u)
+#define INTC_ICDISR15_TINT68_SHIFT              (4u)
+#define INTC_ICDISR15_TINT69_SHIFT              (5u)
+#define INTC_ICDISR15_TINT70_SHIFT              (6u)
+#define INTC_ICDISR15_TINT71_SHIFT              (7u)
+#define INTC_ICDISR15_TINT72_SHIFT              (8u)
+#define INTC_ICDISR15_TINT73_SHIFT              (9u)
+#define INTC_ICDISR15_TINT74_SHIFT              (10u)
+#define INTC_ICDISR15_TINT75_SHIFT              (11u)
+#define INTC_ICDISR15_TINT76_SHIFT              (12u)
+#define INTC_ICDISR15_TINT77_SHIFT              (13u)
+#define INTC_ICDISR15_TINT78_SHIFT              (14u)
+#define INTC_ICDISR15_TINT79_SHIFT              (15u)
+#define INTC_ICDISR15_TINT80_SHIFT              (16u)
+#define INTC_ICDISR15_TINT81_SHIFT              (17u)
+#define INTC_ICDISR15_TINT82_SHIFT              (18u)
+#define INTC_ICDISR15_TINT83_SHIFT              (19u)
+#define INTC_ICDISR15_TINT84_SHIFT              (20u)
+#define INTC_ICDISR15_TINT85_SHIFT              (21u)
+#define INTC_ICDISR15_TINT86_SHIFT              (22u)
+#define INTC_ICDISR15_TINT87_SHIFT              (23u)
+#define INTC_ICDISR15_TINT88_SHIFT              (24u)
+#define INTC_ICDISR15_TINT89_SHIFT              (25u)
+#define INTC_ICDISR15_TINT90_SHIFT              (26u)
+#define INTC_ICDISR15_TINT91_SHIFT              (27u)
+#define INTC_ICDISR15_TINT92_SHIFT              (28u)
+#define INTC_ICDISR15_TINT93_SHIFT              (29u)
+#define INTC_ICDISR15_TINT94_SHIFT              (30u)
+#define INTC_ICDISR15_TINT95_SHIFT              (31u)
+
+#define INTC_ICDISR16_TINT96_SHIFT              (0u)
+#define INTC_ICDISR16_TINT97_SHIFT              (1u)
+#define INTC_ICDISR16_TINT98_SHIFT              (2u)
+#define INTC_ICDISR16_TINT99_SHIFT              (3u)
+#define INTC_ICDISR16_TINT100_SHIFT             (4u)
+#define INTC_ICDISR16_TINT101_SHIFT             (5u)
+#define INTC_ICDISR16_TINT102_SHIFT             (6u)
+#define INTC_ICDISR16_TINT103_SHIFT             (7u)
+#define INTC_ICDISR16_TINT104_SHIFT             (8u)
+#define INTC_ICDISR16_TINT105_SHIFT             (9u)
+#define INTC_ICDISR16_TINT106_SHIFT             (10u)
+#define INTC_ICDISR16_TINT107_SHIFT             (11u)
+#define INTC_ICDISR16_TINT108_SHIFT             (12u)
+#define INTC_ICDISR16_TINT109_SHIFT             (13u)
+#define INTC_ICDISR16_TINT110_SHIFT             (14u)
+#define INTC_ICDISR16_TINT111_SHIFT             (15u)
+#define INTC_ICDISR16_TINT112_SHIFT             (16u)
+#define INTC_ICDISR16_TINT113_SHIFT             (17u)
+#define INTC_ICDISR16_TINT114_SHIFT             (18u)
+#define INTC_ICDISR16_TINT115_SHIFT             (19u)
+#define INTC_ICDISR16_TINT116_SHIFT             (20u)
+#define INTC_ICDISR16_TINT117_SHIFT             (21u)
+#define INTC_ICDISR16_TINT118_SHIFT             (22u)
+#define INTC_ICDISR16_TINT119_SHIFT             (23u)
+#define INTC_ICDISR16_TINT120_SHIFT             (24u)
+#define INTC_ICDISR16_TINT121_SHIFT             (25u)
+#define INTC_ICDISR16_TINT122_SHIFT             (26u)
+#define INTC_ICDISR16_TINT123_SHIFT             (27u)
+#define INTC_ICDISR16_TINT124_SHIFT             (28u)
+#define INTC_ICDISR16_TINT125_SHIFT             (29u)
+#define INTC_ICDISR16_TINT126_SHIFT             (30u)
+#define INTC_ICDISR16_TINT127_SHIFT             (31u)
+
+#define INTC_ICDISR17_TINT128_SHIFT             (0u)
+#define INTC_ICDISR17_TINT129_SHIFT             (1u)
+#define INTC_ICDISR17_TINT130_SHIFT             (2u)
+#define INTC_ICDISR17_TINT131_SHIFT             (3u)
+#define INTC_ICDISR17_TINT132_SHIFT             (4u)
+#define INTC_ICDISR17_TINT133_SHIFT             (5u)
+#define INTC_ICDISR17_TINT134_SHIFT             (6u)
+#define INTC_ICDISR17_TINT135_SHIFT             (7u)
+#define INTC_ICDISR17_TINT136_SHIFT             (8u)
+#define INTC_ICDISR17_TINT137_SHIFT             (9u)
+#define INTC_ICDISR17_TINT138_SHIFT             (10u)
+#define INTC_ICDISR17_TINT139_SHIFT             (11u)
+#define INTC_ICDISR17_TINT140_SHIFT             (12u)
+#define INTC_ICDISR17_TINT141_SHIFT             (13u)
+#define INTC_ICDISR17_TINT142_SHIFT             (14u)
+#define INTC_ICDISR17_TINT143_SHIFT             (15u)
+#define INTC_ICDISR17_TINT144_SHIFT             (16u)
+#define INTC_ICDISR17_TINT145_SHIFT             (17u)
+#define INTC_ICDISR17_TINT146_SHIFT             (18u)
+#define INTC_ICDISR17_TINT147_SHIFT             (19u)
+#define INTC_ICDISR17_TINT148_SHIFT             (20u)
+#define INTC_ICDISR17_TINT149_SHIFT             (21u)
+#define INTC_ICDISR17_TINT150_SHIFT             (22u)
+#define INTC_ICDISR17_TINT151_SHIFT             (23u)
+#define INTC_ICDISR17_TINT152_SHIFT             (24u)
+#define INTC_ICDISR17_TINT153_SHIFT             (25u)
+#define INTC_ICDISR17_TINT154_SHIFT             (26u)
+#define INTC_ICDISR17_TINT155_SHIFT             (27u)
+#define INTC_ICDISR17_TINT156_SHIFT             (28u)
+#define INTC_ICDISR17_TINT157_SHIFT             (29u)
+#define INTC_ICDISR17_TINT158_SHIFT             (30u)
+#define INTC_ICDISR17_TINT159_SHIFT             (31u)
+
+#define INTC_ICDISR18_TINT160_SHIFT             (0u)
+#define INTC_ICDISR18_TINT161_SHIFT             (1u)
+#define INTC_ICDISR18_TINT162_SHIFT             (2u)
+#define INTC_ICDISR18_TINT163_SHIFT             (3u)
+#define INTC_ICDISR18_TINT164_SHIFT             (4u)
+#define INTC_ICDISR18_TINT165_SHIFT             (5u)
+#define INTC_ICDISR18_TINT166_SHIFT             (6u)
+#define INTC_ICDISR18_TINT167_SHIFT             (7u)
+#define INTC_ICDISR18_TINT168_SHIFT             (8u)
+#define INTC_ICDISR18_TINT169_SHIFT             (9u)
+#define INTC_ICDISR18_TINT170_SHIFT             (10u)
+
+#define INTC_ICDISER0_SW0_SHIFT                 (0u)
+#define INTC_ICDISER0_SW1_SHIFT                 (1u)
+#define INTC_ICDISER0_SW2_SHIFT                 (2u)
+#define INTC_ICDISER0_SW3_SHIFT                 (3u)
+#define INTC_ICDISER0_SW4_SHIFT                 (4u)
+#define INTC_ICDISER0_SW5_SHIFT                 (5u)
+#define INTC_ICDISER0_SW6_SHIFT                 (6u)
+#define INTC_ICDISER0_SW7_SHIFT                 (7u)
+#define INTC_ICDISER0_SW8_SHIFT                 (8u)
+#define INTC_ICDISER0_SW9_SHIFT                 (9u)
+#define INTC_ICDISER0_SW10_SHIFT                (10u)
+#define INTC_ICDISER0_SW11_SHIFT                (11u)
+#define INTC_ICDISER0_SW12_SHIFT                (12u)
+#define INTC_ICDISER0_SW13_SHIFT                (13u)
+#define INTC_ICDISER0_SW14_SHIFT                (14u)
+#define INTC_ICDISER0_SW15_SHIFT                (15u)
+#define INTC_ICDISER0_PMUIRQ0_SHIFT             (16u)
+#define INTC_ICDISER0_COMMRX0_SHIFT             (17u)
+#define INTC_ICDISER0_COMMTX0_SHIFT             (18u)
+#define INTC_ICDISER0_CTIIRQ0_SHIFT             (19u)
+
+#define INTC_ICDISER1_IRQ0_SHIFT                (0u)
+#define INTC_ICDISER1_IRQ1_SHIFT                (1u)
+#define INTC_ICDISER1_IRQ2_SHIFT                (2u)
+#define INTC_ICDISER1_IRQ3_SHIFT                (3u)
+#define INTC_ICDISER1_IRQ4_SHIFT                (4u)
+#define INTC_ICDISER1_IRQ5_SHIFT                (5u)
+#define INTC_ICDISER1_IRQ6_SHIFT                (6u)
+#define INTC_ICDISER1_IRQ7_SHIFT                (7u)
+#define INTC_ICDISER1_PL310ERR_SHIFT            (8u)
+#define INTC_ICDISER1_DMAINT0_SHIFT             (9u)
+#define INTC_ICDISER1_DMAINT1_SHIFT             (10u)
+#define INTC_ICDISER1_DMAINT2_SHIFT             (11u)
+#define INTC_ICDISER1_DMAINT3_SHIFT             (12u)
+#define INTC_ICDISER1_DMAINT4_SHIFT             (13u)
+#define INTC_ICDISER1_DMAINT5_SHIFT             (14u)
+#define INTC_ICDISER1_DMAINT6_SHIFT             (15u)
+#define INTC_ICDISER1_DMAINT7_SHIFT             (16u)
+#define INTC_ICDISER1_DMAINT8_SHIFT             (17u)
+#define INTC_ICDISER1_DMAINT9_SHIFT             (18u)
+#define INTC_ICDISER1_DMAINT10_SHIFT            (19u)
+#define INTC_ICDISER1_DMAINT11_SHIFT            (20u)
+#define INTC_ICDISER1_DMAINT12_SHIFT            (21u)
+#define INTC_ICDISER1_DMAINT13_SHIFT            (22u)
+#define INTC_ICDISER1_DMAINT14_SHIFT            (23u)
+#define INTC_ICDISER1_DMAINT15_SHIFT            (24u)
+#define INTC_ICDISER1_DMAERR_SHIFT              (25u)
+
+#define INTC_ICDISER2_USBI0_SHIFT               (9u)
+#define INTC_ICDISER2_USBI1_SHIFT               (10u)
+#define INTC_ICDISER2_S0_VI_VSYNC0_SHIFT        (11u)
+#define INTC_ICDISER2_S0_LO_VSYNC0_SHIFT        (12u)
+#define INTC_ICDISER2_S0_VSYNCERR0_SHIFT        (13u)
+#define INTC_ICDISER2_GR3_VLINE0_SHIFT          (14u)
+#define INTC_ICDISER2_S0_VFIELD0_SHIFT          (15u)
+#define INTC_ICDISER2_IV1_VBUFERR0_SHIFT        (16u)
+#define INTC_ICDISER2_IV3_VBUFERR0_SHIFT        (17u)
+#define INTC_ICDISER2_IV5_VBUFERR0_SHIFT        (18u)
+#define INTC_ICDISER2_IV6_VBUFERR0_SHIFT        (19u)
+#define INTC_ICDISER2_S0_WLINE0_SHIFT           (20u)
+#define INTC_ICDISER2_S1_VI_VSYNC0_SHIFT        (21u)
+#define INTC_ICDISER2_S1_LO_VSYNC0_SHIFT        (22u)
+#define INTC_ICDISER2_S1_VSYNCERR0_SHIFT        (23u)
+#define INTC_ICDISER2_S1_VFIELD0_SHIFT          (24u)
+#define INTC_ICDISER2_IV2_VBUFERR0_SHIFT        (25u)
+#define INTC_ICDISER2_IV4_VBUFERR0_SHIFT        (26u)
+#define INTC_ICDISER2_S1_WLINE0_SHIFT           (27u)
+#define INTC_ICDISER2_OIR_VI_VSYNC0_SHIFT       (28u)
+#define INTC_ICDISER2_OIR_LO_VSYNC0_SHIFT       (29u)
+#define INTC_ICDISER2_OIR_VSYNCERR0_SHIFT       (30u)
+#define INTC_ICDISER2_OIR_VFIELD0_SHIFT         (31u)
+
+#define INTC_ICDISER3_IV7_VBUFERR0_SHIFT        (0u)
+#define INTC_ICDISER3_IV8_VBUFERR0_SHIFT        (1u)
+#define INTC_ICDISER3_S0_VI_VSYNC1_SHIFT        (3u)
+#define INTC_ICDISER3_S0_LO_VSYNC1_SHIFT        (4u)
+#define INTC_ICDISER3_S0_VSYNCERR1_SHIFT        (5u)
+#define INTC_ICDISER3_GR3_VLINE1_SHIFT          (6u)
+#define INTC_ICDISER3_S0_VFIELD1_SHIFT          (7u)
+#define INTC_ICDISER3_IV1_VBUFERR1_SHIFT        (8u)
+#define INTC_ICDISER3_IV3_VBUFERR1_SHIFT        (9u)
+#define INTC_ICDISER3_IV5_VBUFERR1_SHIFT        (10u)
+#define INTC_ICDISER3_IV6_VBUFERR1_SHIFT        (11u)
+#define INTC_ICDISER3_S0_WLINE1_SHIFT           (12u)
+#define INTC_ICDISER3_S1_VI_VSYNC1_SHIFT        (13u)
+#define INTC_ICDISER3_S1_LO_VSYNC1_SHIFT        (14u)
+#define INTC_ICDISER3_S1_VSYNCERR1_SHIFT        (15u)
+#define INTC_ICDISER3_S1_VFIELD1_SHIFT          (16u)
+#define INTC_ICDISER3_IV2_VBUFERR1_SHIFT        (17u)
+#define INTC_ICDISER3_IV4_VBUFERR1_SHIFT        (18u)
+#define INTC_ICDISER3_S1_WLINE1_SHIFT           (19u)
+#define INTC_ICDISER3_OIR_VI_VSYNC1_SHIFT       (20u)
+#define INTC_ICDISER3_OIR_LO_VSYNC1_SHIFT       (21u)
+#define INTC_ICDISER3_OIR_VLINE1_SHIFT          (22u)
+#define INTC_ICDISER3_OIR_VFIELD1_SHIFT         (23u)
+#define INTC_ICDISER3_IV7_VBUFERR1_SHIFT        (24u)
+#define INTC_ICDISER3_IV8_VBUFERR1_SHIFT        (25u)
+#define INTC_ICDISER3_IMRDI_SHIFT               (27u)
+#define INTC_ICDISER3_IMR2I0_SHIFT              (28u)
+#define INTC_ICDISER3_IMR2I1_SHIFT              (29u)
+#define INTC_ICDISER3_JEDI_SHIFT                (30u)
+#define INTC_ICDISER3_JDTI_SHIFT                (31u)
+
+#define INTC_ICDISER4_CMP0_SHIFT                (0u)
+#define INTC_ICDISER4_CMP1_SHIFT                (1u)
+#define INTC_ICDISER4_INT0_SHIFT                (2u)
+#define INTC_ICDISER4_INT1_SHIFT                (3u)
+#define INTC_ICDISER4_INT2_SHIFT                (4u)
+#define INTC_ICDISER4_INT3_SHIFT                (5u)
+#define INTC_ICDISER4_OSTM0TINT_SHIFT           (6u)
+#define INTC_ICDISER4_OSTM1TINT_SHIFT           (7u)
+#define INTC_ICDISER4_CMI_SHIFT                 (8u)
+#define INTC_ICDISER4_WTOUT_SHIFT               (9u)
+#define INTC_ICDISER4_ITI_SHIFT                 (10u)
+#define INTC_ICDISER4_TGI0A_SHIFT               (11u)
+#define INTC_ICDISER4_TGI0B_SHIFT               (12u)
+#define INTC_ICDISER4_TGI0C_SHIFT               (13u)
+#define INTC_ICDISER4_TGI0D_SHIFT               (14u)
+#define INTC_ICDISER4_TGI0V_SHIFT               (15u)
+#define INTC_ICDISER4_TGI0E_SHIFT               (16u)
+#define INTC_ICDISER4_TGI0F_SHIFT               (17u)
+#define INTC_ICDISER4_TGI1A_SHIFT               (18u)
+#define INTC_ICDISER4_TGI1B_SHIFT               (19u)
+#define INTC_ICDISER4_TGI1V_SHIFT               (20u)
+#define INTC_ICDISER4_TGI1U_SHIFT               (21u)
+#define INTC_ICDISER4_TGI2A_SHIFT               (22u)
+#define INTC_ICDISER4_TGI2B_SHIFT               (23u)
+#define INTC_ICDISER4_TGI2V_SHIFT               (24u)
+#define INTC_ICDISER4_TGI2U_SHIFT               (25u)
+#define INTC_ICDISER4_TGI3A_SHIFT               (26u)
+#define INTC_ICDISER4_TGI3B_SHIFT               (27u)
+#define INTC_ICDISER4_TGI3C_SHIFT               (28u)
+#define INTC_ICDISER4_TGI3D_SHIFT               (29u)
+#define INTC_ICDISER4_TGI3V_SHIFT               (30u)
+#define INTC_ICDISER4_TGI4A_SHIFT               (31u)
+
+#define INTC_ICDISER5_TGI4B_SHIFT               (0u)
+#define INTC_ICDISER5_TGI4C_SHIFT               (1u)
+#define INTC_ICDISER5_TGI4D_SHIFT               (2u)
+#define INTC_ICDISER5_TGI4V_SHIFT               (3u)
+#define INTC_ICDISER5_CMI1_SHIFT                (4u)
+#define INTC_ICDISER5_CMI2_SHIFT                (5u)
+#define INTC_ICDISER5_SGDEI0_SHIFT              (6u)
+#define INTC_ICDISER5_SGDEI1_SHIFT              (7u)
+#define INTC_ICDISER5_SGDEI2_SHIFT              (8u)
+#define INTC_ICDISER5_SGDEI3_SHIFT              (9u)
+#define INTC_ICDISER5_ADI_SHIFT                 (10u)
+#define INTC_ICDISER5_LMTI_SHIFT                (11u)
+#define INTC_ICDISER5_SSII0_SHIFT               (12u)
+#define INTC_ICDISER5_SSIRXI0_SHIFT             (13u)
+#define INTC_ICDISER5_SSITXI0_SHIFT             (14u)
+#define INTC_ICDISER5_SSII1_SHIFT               (15u)
+#define INTC_ICDISER5_SSIRXI1_SHIFT             (16u)
+#define INTC_ICDISER5_SSITXI1_SHIFT             (17u)
+#define INTC_ICDISER5_SSII2_SHIFT               (18u)
+#define INTC_ICDISER5_SSIRTI2_SHIFT             (19u)
+#define INTC_ICDISER5_SSII3_SHIFT               (20u)
+#define INTC_ICDISER5_SSIRXI3_SHIFT             (21u)
+#define INTC_ICDISER5_SSITXI3_SHIFT             (22u)
+#define INTC_ICDISER5_SSII4_SHIFT               (23u)
+#define INTC_ICDISER5_SSIRTI4_SHIFT             (24u)
+#define INTC_ICDISER5_SSII5_SHIFT               (25u)
+#define INTC_ICDISER5_SSIRXI5_SHIFT             (26u)
+#define INTC_ICDISER5_SSITXI5_SHIFT             (27u)
+#define INTC_ICDISER5_SPDIFI_SHIFT              (28u)
+#define INTC_ICDISER5_INTIICTEI0_SHIFT          (29u)
+#define INTC_ICDISER5_INTIICRI0_SHIFT           (30u)
+#define INTC_ICDISER5_INTIICTI0_SHIFT           (31u)
+
+#define INTC_ICDISER6_INTIICSPI0_SHIFT          (0u)
+#define INTC_ICDISER6_INTIICSTI0_SHIFT          (1u)
+#define INTC_ICDISER6_INTIICNAKI0_SHIFT         (2u)
+#define INTC_ICDISER6_INTIICALI0_SHIFT          (3u)
+#define INTC_ICDISER6_INTIICTMOI0_SHIFT         (4u)
+#define INTC_ICDISER6_INTIICTEI1_SHIFT          (5u)
+#define INTC_ICDISER6_INTIICRI1_SHIFT           (6u)
+#define INTC_ICDISER6_INTIICTI1_SHIFT           (7u)
+#define INTC_ICDISER6_INTIICSPI1_SHIFT          (8u)
+#define INTC_ICDISER6_INTIICSTI1_SHIFT          (9u)
+#define INTC_ICDISER6_INTIICNAKI1_SHIFT         (10u)
+#define INTC_ICDISER6_INTIICALI1_SHIFT          (11u)
+#define INTC_ICDISER6_INTIICTMOI1_SHIFT         (12u)
+#define INTC_ICDISER6_INTIICTEI2_SHIFT          (13u)
+#define INTC_ICDISER6_INTIICRI2_SHIFT           (14u)
+#define INTC_ICDISER6_INTIICTI2_SHIFT           (15u)
+#define INTC_ICDISER6_INTIICSPI2_SHIFT          (16u)
+#define INTC_ICDISER6_INTIICSTI2_SHIFT          (17u)
+#define INTC_ICDISER6_INTIICNAKI2_SHIFT         (18u)
+#define INTC_ICDISER6_INTIICALI2_SHIFT          (19u)
+#define INTC_ICDISER6_INTIICTMOI2_SHIFT         (20u)
+#define INTC_ICDISER6_INTIICTEI3_SHIFT          (21u)
+#define INTC_ICDISER6_INTIICRI3_SHIFT           (22u)
+#define INTC_ICDISER6_INTIICTI3_SHIFT           (23u)
+#define INTC_ICDISER6_INTIICSPI3_SHIFT          (24u)
+#define INTC_ICDISER6_INTIICSTI3_SHIFT          (25u)
+#define INTC_ICDISER6_INTIICNAKI3_SHIFT         (26u)
+#define INTC_ICDISER6_INTIICALI3_SHIFT          (27u)
+#define INTC_ICDISER6_INTIICTMOI3_SHIFT         (28u)
+#define INTC_ICDISER6_BRI0_SHIFT                (29u)
+#define INTC_ICDISER6_ERI0_SHIFT                (30u)
+#define INTC_ICDISER6_RXI0_SHIFT                (31u)
+
+#define INTC_ICDISER7_TXI0_SHIFT                (0u)
+#define INTC_ICDISER7_BRI1_SHIFT                (1u)
+#define INTC_ICDISER7_ERI1_SHIFT                (2u)
+#define INTC_ICDISER7_RXI1_SHIFT                (3u)
+#define INTC_ICDISER7_TXI1_SHIFT                (4u)
+#define INTC_ICDISER7_BRI2_SHIFT                (5u)
+#define INTC_ICDISER7_ERI2_SHIFT                (6u)
+#define INTC_ICDISER7_RXI2_SHIFT                (7u)
+#define INTC_ICDISER7_TXI2_SHIFT                (8u)
+#define INTC_ICDISER7_BRI3_SHIFT                (9u)
+#define INTC_ICDISER7_ERI3_SHIFT                (10u)
+#define INTC_ICDISER7_RXI3_SHIFT                (11u)
+#define INTC_ICDISER7_TXI3_SHIFT                (12u)
+#define INTC_ICDISER7_BRI4_SHIFT                (13u)
+#define INTC_ICDISER7_ERI4_SHIFT                (14u)
+#define INTC_ICDISER7_RXI4_SHIFT                (15u)
+#define INTC_ICDISER7_TXI4_SHIFT                (16u)
+#define INTC_ICDISER7_BRI5_SHIFT                (17u)
+#define INTC_ICDISER7_ERI5_SHIFT                (18u)
+#define INTC_ICDISER7_RXI5_SHIFT                (19u)
+#define INTC_ICDISER7_TXI5_SHIFT                (20u)
+#define INTC_ICDISER7_BRI6_SHIFT                (21u)
+#define INTC_ICDISER7_ERI6_SHIFT                (22u)
+#define INTC_ICDISER7_RXI6_SHIFT                (23u)
+#define INTC_ICDISER7_TXI6_SHIFT                (24u)
+#define INTC_ICDISER7_BRI7_SHIFT                (25u)
+#define INTC_ICDISER7_ERI7_SHIFT                (26u)
+#define INTC_ICDISER7_RXI7_SHIFT                (27u)
+#define INTC_ICDISER7_TXI7_SHIFT                (28u)
+#define INTC_ICDISER7_INTRCANGERR_SHIFT         (29u)
+#define INTC_ICDISER7_INTRCANGRECC_SHIFT        (30u)
+#define INTC_ICDISER7_INTRCAN0REC_SHIFT         (31u)
+
+#define INTC_ICDISER8_INTRCAN0ERR_SHIFT         (0u)
+#define INTC_ICDISER8_INTRCAN0TRX_SHIFT         (1u)
+#define INTC_ICDISER8_INTRCAN1REC_SHIFT         (2u)
+#define INTC_ICDISER8_INTRCAN1ERR_SHIFT         (3u)
+#define INTC_ICDISER8_INTRCAN1TRX_SHIFT         (4u)
+#define INTC_ICDISER8_INTRCAN2REC_SHIFT         (5u)
+#define INTC_ICDISER8_INTRCAN2ERR_SHIFT         (6u)
+#define INTC_ICDISER8_INTRCAN2TRX_SHIFT         (7u)
+#define INTC_ICDISER8_INTRCAN3REC_SHIFT         (8u)
+#define INTC_ICDISER8_INTRCAN3ERR_SHIFT         (9u)
+#define INTC_ICDISER8_INTRCAN3TRX_SHIFT         (10u)
+#define INTC_ICDISER8_INTRCAN4REC_SHIFT         (11u)
+#define INTC_ICDISER8_INTRCAN4ERR_SHIFT         (12u)
+#define INTC_ICDISER8_INTRCAN4TRX_SHIFT         (13u)
+#define INTC_ICDISER8_SPEI0_SHIFT               (14u)
+#define INTC_ICDISER8_SPRI0_SHIFT               (15u)
+#define INTC_ICDISER8_SPTI0_SHIFT               (16u)
+#define INTC_ICDISER8_SPEI1_SHIFT               (17u)
+#define INTC_ICDISER8_SPRI1_SHIFT               (18u)
+#define INTC_ICDISER8_SPTI1_SHIFT               (19u)
+#define INTC_ICDISER8_SPEI2_SHIFT               (20u)
+#define INTC_ICDISER8_SPRI2_SHIFT               (21u)
+#define INTC_ICDISER8_SPTI2_SHIFT               (22u)
+#define INTC_ICDISER8_SPEI3_SHIFT               (23u)
+#define INTC_ICDISER8_SPRI3_SHIFT               (24u)
+#define INTC_ICDISER8_SPTI3_SHIFT               (25u)
+#define INTC_ICDISER8_SPEI4_SHIFT               (26u)
+#define INTC_ICDISER8_SPRI4_SHIFT               (27u)
+#define INTC_ICDISER8_SPTI4_SHIFT               (28u)
+#define INTC_ICDISER8_IEBBTD_SHIFT              (29u)
+#define INTC_ICDISER8_IEBBTERR_SHIFT            (30u)
+#define INTC_ICDISER8_IEBBTSTA_SHIFT            (31u)
+
+#define INTC_ICDISER9_IEBBTV_SHIFT              (0u)
+#define INTC_ICDISER9_ISY_SHIFT                 (1u)
+#define INTC_ICDISER9_IERR_SHIFT                (2u)
+#define INTC_ICDISER9_ITARG_SHIFT               (3u)
+#define INTC_ICDISER9_ISEC_SHIFT                (4u)
+#define INTC_ICDISER9_IBUF_SHIFT                (5u)
+#define INTC_ICDISER9_IREADY_SHIFT              (6u)
+#define INTC_ICDISER9_FLSTE_SHIFT               (7u)
+#define INTC_ICDISER9_FLTENDI_SHIFT             (8u)
+#define INTC_ICDISER9_FLTREQ0I_SHIFT            (9u)
+#define INTC_ICDISER9_FLTREQ1I_SHIFT            (10u)
+#define INTC_ICDISER9_MMC0_SHIFT                (11u)
+#define INTC_ICDISER9_MMC1_SHIFT                (12u)
+#define INTC_ICDISER9_MMC2_SHIFT                (13u)
+#define INTC_ICDISER9_SDHI0_3_SHIFT             (14u)
+#define INTC_ICDISER9_SDHI0_0_SHIFT             (15u)
+#define INTC_ICDISER9_SDHI0_1_SHIFT             (16u)
+#define INTC_ICDISER9_SDHI1_3_SHIFT             (17u)
+#define INTC_ICDISER9_SDHI1_0_SHIFT             (18u)
+#define INTC_ICDISER9_SDHI1_1_SHIFT             (19u)
+#define INTC_ICDISER9_ARM_SHIFT                 (20u)
+#define INTC_ICDISER9_PRD_SHIFT                 (21u)
+#define INTC_ICDISER9_CUP_SHIFT                 (22u)
+#define INTC_ICDISER9_SCUAI0_SHIFT              (23u)
+#define INTC_ICDISER9_SCUAI1_SHIFT              (24u)
+#define INTC_ICDISER9_SCUFDI0_SHIFT             (25u)
+#define INTC_ICDISER9_SCUFDI1_SHIFT             (26u)
+#define INTC_ICDISER9_SCUFDI2_SHIFT             (27u)
+#define INTC_ICDISER9_SCUFDI3_SHIFT             (28u)
+#define INTC_ICDISER9_SCUFUI0_SHIFT             (29u)
+#define INTC_ICDISER9_SCUFUI1_SHIFT             (30u)
+#define INTC_ICDISER9_SCUFUI2_SHIFT             (31u)
+
+#define INTC_ICDISER10_SCUFUI3_SHIFT            (0u)
+#define INTC_ICDISER10_SCUDVI0_SHIFT            (1u)
+#define INTC_ICDISER10_SCUDVI1_SHIFT            (2u)
+#define INTC_ICDISER10_SCUDVI2_SHIFT            (3u)
+#define INTC_ICDISER10_SCUDVI3_SHIFT            (4u)
+#define INTC_ICDISER10_MLB_CINT_SHIFT           (5u)
+#define INTC_ICDISER10_MLB_SINT_SHIFT           (6u)
+#define INTC_ICDISER10_DRC0_SHIFT               (7u)
+#define INTC_ICDISER10_DRC1_SHIFT               (8u)
+#define INTC_ICDISER10_LINI0_INT_T_SHIFT        (11u)
+#define INTC_ICDISER10_LINI0_INT_R_SHIFT        (12u)
+#define INTC_ICDISER10_LINI0_INT_S_SHIFT        (13u)
+#define INTC_ICDISER10_LINI0_INT_M_SHIFT        (14u)
+#define INTC_ICDISER10_LINI1_INT_T_SHIFT        (15u)
+#define INTC_ICDISER10_LINI1_INT_R_SHIFT        (16u)
+#define INTC_ICDISER10_LINI1_INT_S_SHIFT        (17u)
+#define INTC_ICDISER10_LINI1_INT_M_SHIFT        (18u)
+#define INTC_ICDISER10_ERI0_SHIFT               (27u)
+#define INTC_ICDISER10_RXI0_SHIFT               (28u)
+#define INTC_ICDISER10_TXI0_SHIFT               (29u)
+#define INTC_ICDISER10_TEI0_SHIFT               (30u)
+#define INTC_ICDISER10_ERI1_SHIFT               (31u)
+
+#define INTC_ICDISER11_RXI1_SHIFT               (0u)
+#define INTC_ICDISER11_TXI1_SHIFT               (1u)
+#define INTC_ICDISER11_TEI1_SHIFT               (2u)
+#define INTC_ICDISER11_AVBI_DATA_SHIFT          (3u)
+#define INTC_ICDISER11_AVBI_ERROR_SHIFT         (4u)
+#define INTC_ICDISER11_AVBI_MANAGE_SHIFT        (5u)
+#define INTC_ICDISER11_AVBI_MAC_SHIFT           (6u)
+#define INTC_ICDISER11_ETHERI_SHIFT             (7u)
+#define INTC_ICDISER11_CEUI_SHIFT               (12u)
+#define INTC_ICDISER11_H2XMLB_ERRINT_SHIFT      (29u)
+#define INTC_ICDISER11_H2XIC1_ERRINT_SHIFT      (30u)
+#define INTC_ICDISER11_X2HPERI1_ERRINT_SHIFT    (31u)
+
+#define INTC_ICDISER12_X2HPERI2_ERRINT_SHIFT    (0u)
+#define INTC_ICDISER12_X2HPERI34_ERRINT_SHIFT   (1u)
+#define INTC_ICDISER12_X2HPERI5_ERRINT_SHIFT    (2u)
+#define INTC_ICDISER12_X2HPERI67_ERRINT_SHIFT   (3u)
+#define INTC_ICDISER12_X2HDBGR_ERRINT_SHIFT     (4u)
+#define INTC_ICDISER12_X2HBSC_ERRINT_SHIFT      (5u)
+#define INTC_ICDISER12_X2HSPI1_ERRINT_SHIFT     (6u)
+#define INTC_ICDISER12_X2HSPI2_ERRINT_SHIFT     (7u)
+#define INTC_ICDISER12_PRRI_SHIFT               (8u)
+#define INTC_ICDISER12_IFEI0_SHIFT              (9u)
+#define INTC_ICDISER12_OFFI0_SHIFT              (10u)
+#define INTC_ICDISER12_PFVEI0_SHIFT             (11u)
+#define INTC_ICDISER12_IFEI1_SHIFT              (12u)
+#define INTC_ICDISER12_OFFI1_SHIFT              (13u)
+#define INTC_ICDISER12_PFVEI1_SHIFT             (14u)
+
+#define INTC_ICDISER13_TINT0_SHIFT              (0u)
+#define INTC_ICDISER13_TINT1_SHIFT              (1u)
+#define INTC_ICDISER13_TINT2_SHIFT              (2u)
+#define INTC_ICDISER13_TINT3_SHIFT              (3u)
+#define INTC_ICDISER13_TINT4_SHIFT              (4u)
+#define INTC_ICDISER13_TINT5_SHIFT              (5u)
+#define INTC_ICDISER13_TINT6_SHIFT              (6u)
+#define INTC_ICDISER13_TINT7_SHIFT              (7u)
+#define INTC_ICDISER13_TINT8_SHIFT              (8u)
+#define INTC_ICDISER13_TINT9_SHIFT              (9u)
+#define INTC_ICDISER13_TINT10_SHIFT             (10u)
+#define INTC_ICDISER13_TINT11_SHIFT             (11u)
+#define INTC_ICDISER13_TINT12_SHIFT             (12u)
+#define INTC_ICDISER13_TINT13_SHIFT             (13u)
+#define INTC_ICDISER13_TINT14_SHIFT             (14u)
+#define INTC_ICDISER13_TINT15_SHIFT             (15u)
+#define INTC_ICDISER13_TINT16_SHIFT             (16u)
+#define INTC_ICDISER13_TINT17_SHIFT             (17u)
+#define INTC_ICDISER13_TINT18_SHIFT             (18u)
+#define INTC_ICDISER13_TINT19_SHIFT             (19u)
+#define INTC_ICDISER13_TINT20_SHIFT             (20u)
+#define INTC_ICDISER13_TINT21_SHIFT             (21u)
+#define INTC_ICDISER13_TINT22_SHIFT             (22u)
+#define INTC_ICDISER13_TINT23_SHIFT             (23u)
+#define INTC_ICDISER13_TINT24_SHIFT             (24u)
+#define INTC_ICDISER13_TINT25_SHIFT             (25u)
+#define INTC_ICDISER13_TINT26_SHIFT             (26u)
+#define INTC_ICDISER13_TINT27_SHIFT             (27u)
+#define INTC_ICDISER13_TINT28_SHIFT             (28u)
+#define INTC_ICDISER13_TINT29_SHIFT             (29u)
+#define INTC_ICDISER13_TINT30_SHIFT             (30u)
+#define INTC_ICDISER13_TINT31_SHIFT             (31u)
+
+#define INTC_ICDISER14_TINT32_SHIFT             (0u)
+#define INTC_ICDISER14_TINT33_SHIFT             (1u)
+#define INTC_ICDISER14_TINT34_SHIFT             (2u)
+#define INTC_ICDISER14_TINT35_SHIFT             (3u)
+#define INTC_ICDISER14_TINT36_SHIFT             (4u)
+#define INTC_ICDISER14_TINT37_SHIFT             (5u)
+#define INTC_ICDISER14_TINT38_SHIFT             (6u)
+#define INTC_ICDISER14_TINT39_SHIFT             (7u)
+#define INTC_ICDISER14_TINT40_SHIFT             (8u)
+#define INTC_ICDISER14_TINT41_SHIFT             (9u)
+#define INTC_ICDISER14_TINT42_SHIFT             (10u)
+#define INTC_ICDISER14_TINT43_SHIFT             (11u)
+#define INTC_ICDISER14_TINT44_SHIFT             (12u)
+#define INTC_ICDISER14_TINT45_SHIFT             (13u)
+#define INTC_ICDISER14_TINT46_SHIFT             (14u)
+#define INTC_ICDISER14_TINT47_SHIFT             (15u)
+#define INTC_ICDISER14_TINT48_SHIFT             (16u)
+#define INTC_ICDISER14_TINT49_SHIFT             (17u)
+#define INTC_ICDISER14_TINT50_SHIFT             (18u)
+#define INTC_ICDISER14_TINT51_SHIFT             (19u)
+#define INTC_ICDISER14_TINT52_SHIFT             (20u)
+#define INTC_ICDISER14_TINT53_SHIFT             (21u)
+#define INTC_ICDISER14_TINT54_SHIFT             (22u)
+#define INTC_ICDISER14_TINT55_SHIFT             (23u)
+#define INTC_ICDISER14_TINT56_SHIFT             (24u)
+#define INTC_ICDISER14_TINT57_SHIFT             (25u)
+#define INTC_ICDISER14_TINT58_SHIFT             (26u)
+#define INTC_ICDISER14_TINT59_SHIFT             (27u)
+#define INTC_ICDISER14_TINT60_SHIFT             (28u)
+#define INTC_ICDISER14_TINT61_SHIFT             (29u)
+#define INTC_ICDISER14_TINT62_SHIFT             (30u)
+#define INTC_ICDISER14_TINT63_SHIFT             (31u)
+
+#define INTC_ICDISER15_TINT64_SHIFT             (0u)
+#define INTC_ICDISER15_TINT65_SHIFT             (1u)
+#define INTC_ICDISER15_TINT66_SHIFT             (2u)
+#define INTC_ICDISER15_TINT67_SHIFT             (3u)
+#define INTC_ICDISER15_TINT68_SHIFT             (4u)
+#define INTC_ICDISER15_TINT69_SHIFT             (5u)
+#define INTC_ICDISER15_TINT70_SHIFT             (6u)
+#define INTC_ICDISER15_TINT71_SHIFT             (7u)
+#define INTC_ICDISER15_TINT72_SHIFT             (8u)
+#define INTC_ICDISER15_TINT73_SHIFT             (9u)
+#define INTC_ICDISER15_TINT74_SHIFT             (10u)
+#define INTC_ICDISER15_TINT75_SHIFT             (11u)
+#define INTC_ICDISER15_TINT76_SHIFT             (12u)
+#define INTC_ICDISER15_TINT77_SHIFT             (13u)
+#define INTC_ICDISER15_TINT78_SHIFT             (14u)
+#define INTC_ICDISER15_TINT79_SHIFT             (15u)
+#define INTC_ICDISER15_TINT80_SHIFT             (16u)
+#define INTC_ICDISER15_TINT81_SHIFT             (17u)
+#define INTC_ICDISER15_TINT82_SHIFT             (18u)
+#define INTC_ICDISER15_TINT83_SHIFT             (19u)
+#define INTC_ICDISER15_TINT84_SHIFT             (20u)
+#define INTC_ICDISER15_TINT85_SHIFT             (21u)
+#define INTC_ICDISER15_TINT86_SHIFT             (22u)
+#define INTC_ICDISER15_TINT87_SHIFT             (23u)
+#define INTC_ICDISER15_TINT88_SHIFT             (24u)
+#define INTC_ICDISER15_TINT89_SHIFT             (25u)
+#define INTC_ICDISER15_TINT90_SHIFT             (26u)
+#define INTC_ICDISER15_TINT91_SHIFT             (27u)
+#define INTC_ICDISER15_TINT92_SHIFT             (28u)
+#define INTC_ICDISER15_TINT93_SHIFT             (29u)
+#define INTC_ICDISER15_TINT94_SHIFT             (30u)
+#define INTC_ICDISER15_TINT95_SHIFT             (31u)
+
+#define INTC_ICDISER16_TINT96_SHIFT             (0u)
+#define INTC_ICDISER16_TINT97_SHIFT             (1u)
+#define INTC_ICDISER16_TINT98_SHIFT             (2u)
+#define INTC_ICDISER16_TINT99_SHIFT             (3u)
+#define INTC_ICDISER16_TINT100_SHIFT            (4u)
+#define INTC_ICDISER16_TINT101_SHIFT            (5u)
+#define INTC_ICDISER16_TINT102_SHIFT            (6u)
+#define INTC_ICDISER16_TINT103_SHIFT            (7u)
+#define INTC_ICDISER16_TINT104_SHIFT            (8u)
+#define INTC_ICDISER16_TINT105_SHIFT            (9u)
+#define INTC_ICDISER16_TINT106_SHIFT            (10u)
+#define INTC_ICDISER16_TINT107_SHIFT            (11u)
+#define INTC_ICDISER16_TINT108_SHIFT            (12u)
+#define INTC_ICDISER16_TINT109_SHIFT            (13u)
+#define INTC_ICDISER16_TINT110_SHIFT            (14u)
+#define INTC_ICDISER16_TINT111_SHIFT            (15u)
+#define INTC_ICDISER16_TINT112_SHIFT            (16u)
+#define INTC_ICDISER16_TINT113_SHIFT            (17u)
+#define INTC_ICDISER16_TINT114_SHIFT            (18u)
+#define INTC_ICDISER16_TINT115_SHIFT            (19u)
+#define INTC_ICDISER16_TINT116_SHIFT            (20u)
+#define INTC_ICDISER16_TINT117_SHIFT            (21u)
+#define INTC_ICDISER16_TINT118_SHIFT            (22u)
+#define INTC_ICDISER16_TINT119_SHIFT            (23u)
+#define INTC_ICDISER16_TINT120_SHIFT            (24u)
+#define INTC_ICDISER16_TINT121_SHIFT            (25u)
+#define INTC_ICDISER16_TINT122_SHIFT            (26u)
+#define INTC_ICDISER16_TINT123_SHIFT            (27u)
+#define INTC_ICDISER16_TINT124_SHIFT            (28u)
+#define INTC_ICDISER16_TINT125_SHIFT            (29u)
+#define INTC_ICDISER16_TINT126_SHIFT            (30u)
+#define INTC_ICDISER16_TINT127_SHIFT            (31u)
+
+#define INTC_ICDISER17_TINT128_SHIFT            (0u)
+#define INTC_ICDISER17_TINT129_SHIFT            (1u)
+#define INTC_ICDISER17_TINT130_SHIFT            (2u)
+#define INTC_ICDISER17_TINT131_SHIFT            (3u)
+#define INTC_ICDISER17_TINT132_SHIFT            (4u)
+#define INTC_ICDISER17_TINT133_SHIFT            (5u)
+#define INTC_ICDISER17_TINT134_SHIFT            (6u)
+#define INTC_ICDISER17_TINT135_SHIFT            (7u)
+#define INTC_ICDISER17_TINT136_SHIFT            (8u)
+#define INTC_ICDISER17_TINT137_SHIFT            (9u)
+#define INTC_ICDISER17_TINT138_SHIFT            (10u)
+#define INTC_ICDISER17_TINT139_SHIFT            (11u)
+#define INTC_ICDISER17_TINT140_SHIFT            (12u)
+#define INTC_ICDISER17_TINT141_SHIFT            (13u)
+#define INTC_ICDISER17_TINT142_SHIFT            (14u)
+#define INTC_ICDISER17_TINT143_SHIFT            (15u)
+#define INTC_ICDISER17_TINT144_SHIFT            (16u)
+#define INTC_ICDISER17_TINT145_SHIFT            (17u)
+#define INTC_ICDISER17_TINT146_SHIFT            (18u)
+#define INTC_ICDISER17_TINT147_SHIFT            (19u)
+#define INTC_ICDISER17_TINT148_SHIFT            (20u)
+#define INTC_ICDISER17_TINT149_SHIFT            (21u)
+#define INTC_ICDISER17_TINT150_SHIFT            (22u)
+#define INTC_ICDISER17_TINT151_SHIFT            (23u)
+#define INTC_ICDISER17_TINT152_SHIFT            (24u)
+#define INTC_ICDISER17_TINT153_SHIFT            (25u)
+#define INTC_ICDISER17_TINT154_SHIFT            (26u)
+#define INTC_ICDISER17_TINT155_SHIFT            (27u)
+#define INTC_ICDISER17_TINT156_SHIFT            (28u)
+#define INTC_ICDISER17_TINT157_SHIFT            (29u)
+#define INTC_ICDISER17_TINT158_SHIFT            (30u)
+#define INTC_ICDISER17_TINT159_SHIFT            (31u)
+
+#define INTC_ICDISER18_TINT160_SHIFT            (0u)
+#define INTC_ICDISER18_TINT161_SHIFT            (1u)
+#define INTC_ICDISER18_TINT162_SHIFT            (2u)
+#define INTC_ICDISER18_TINT163_SHIFT            (3u)
+#define INTC_ICDISER18_TINT164_SHIFT            (4u)
+#define INTC_ICDISER18_TINT165_SHIFT            (5u)
+#define INTC_ICDISER18_TINT166_SHIFT            (6u)
+#define INTC_ICDISER18_TINT167_SHIFT            (7u)
+#define INTC_ICDISER18_TINT168_SHIFT            (8u)
+#define INTC_ICDISER18_TINT169_SHIFT            (9u)
+#define INTC_ICDISER18_TINT170_SHIFT            (10u)
+
+#define INTC_ICDICER0_SW0_SHIFT                 (0u)
+#define INTC_ICDICER0_SW1_SHIFT                 (1u)
+#define INTC_ICDICER0_SW2_SHIFT                 (2u)
+#define INTC_ICDICER0_SW3_SHIFT                 (3u)
+#define INTC_ICDICER0_SW4_SHIFT                 (4u)
+#define INTC_ICDICER0_SW5_SHIFT                 (5u)
+#define INTC_ICDICER0_SW6_SHIFT                 (6u)
+#define INTC_ICDICER0_SW7_SHIFT                 (7u)
+#define INTC_ICDICER0_SW8_SHIFT                 (8u)
+#define INTC_ICDICER0_SW9_SHIFT                 (9u)
+#define INTC_ICDICER0_SW10_SHIFT                (10u)
+#define INTC_ICDICER0_SW11_SHIFT                (11u)
+#define INTC_ICDICER0_SW12_SHIFT                (12u)
+#define INTC_ICDICER0_SW13_SHIFT                (13u)
+#define INTC_ICDICER0_SW14_SHIFT                (14u)
+#define INTC_ICDICER0_SW15_SHIFT                (15u)
+#define INTC_ICDICER0_PMUIRQ0_SHIFT             (16u)
+#define INTC_ICDICER0_COMMRX0_SHIFT             (17u)
+#define INTC_ICDICER0_COMMTX0_SHIFT             (18u)
+#define INTC_ICDICER0_CTIIRQ0_SHIFT             (19u)
+
+#define INTC_ICDICER1_IRQ0_SHIFT                (0u)
+#define INTC_ICDICER1_IRQ1_SHIFT                (1u)
+#define INTC_ICDICER1_IRQ2_SHIFT                (2u)
+#define INTC_ICDICER1_IRQ3_SHIFT                (3u)
+#define INTC_ICDICER1_IRQ4_SHIFT                (4u)
+#define INTC_ICDICER1_IRQ5_SHIFT                (5u)
+#define INTC_ICDICER1_IRQ6_SHIFT                (6u)
+#define INTC_ICDICER1_IRQ7_SHIFT                (7u)
+#define INTC_ICDICER1_PL310ERR_SHIFT            (8u)
+#define INTC_ICDICER1_DMAINT0_SHIFT             (9u)
+#define INTC_ICDICER1_DMAINT1_SHIFT             (10u)
+#define INTC_ICDICER1_DMAINT2_SHIFT             (11u)
+#define INTC_ICDICER1_DMAINT3_SHIFT             (12u)
+#define INTC_ICDICER1_DMAINT4_SHIFT             (13u)
+#define INTC_ICDICER1_DMAINT5_SHIFT             (14u)
+#define INTC_ICDICER1_DMAINT6_SHIFT             (15u)
+#define INTC_ICDICER1_DMAINT7_SHIFT             (16u)
+#define INTC_ICDICER1_DMAINT8_SHIFT             (17u)
+#define INTC_ICDICER1_DMAINT9_SHIFT             (18u)
+#define INTC_ICDICER1_DMAINT10_SHIFT            (19u)
+#define INTC_ICDICER1_DMAINT11_SHIFT            (20u)
+#define INTC_ICDICER1_DMAINT12_SHIFT            (21u)
+#define INTC_ICDICER1_DMAINT13_SHIFT            (22u)
+#define INTC_ICDICER1_DMAINT14_SHIFT            (23u)
+#define INTC_ICDICER1_DMAINT15_SHIFT            (24u)
+#define INTC_ICDICER1_DMAERR_SHIFT              (25u)
+
+#define INTC_ICDICER2_USBI0_SHIFT               (9u)
+#define INTC_ICDICER2_USBI1_SHIFT               (10u)
+#define INTC_ICDICER2_S0_VI_VSYNC0_SHIFT        (11u)
+#define INTC_ICDICER2_S0_LO_VSYNC0_SHIFT        (12u)
+#define INTC_ICDICER2_S0_VSYNCERR0_SHIFT        (13u)
+#define INTC_ICDICER2_GR3_VLINE0_SHIFT          (14u)
+#define INTC_ICDICER2_S0_VFIELD0_SHIFT          (15u)
+#define INTC_ICDICER2_IV1_VBUFERR0_SHIFT        (16u)
+#define INTC_ICDICER2_IV3_VBUFERR0_SHIFT        (17u)
+#define INTC_ICDICER2_IV5_VBUFERR0_SHIFT        (18u)
+#define INTC_ICDICER2_IV6_VBUFERR0_SHIFT        (19u)
+#define INTC_ICDICER2_S0_WLINE0_SHIFT           (20u)
+#define INTC_ICDICER2_S1_VI_VSYNC0_SHIFT        (21u)
+#define INTC_ICDICER2_S1_LO_VSYNC0_SHIFT        (22u)
+#define INTC_ICDICER2_S1_VSYNCERR0_SHIFT        (23u)
+#define INTC_ICDICER2_S1_VFIELD0_SHIFT          (24u)
+#define INTC_ICDICER2_IV2_VBUFERR0_SHIFT        (25u)
+#define INTC_ICDICER2_IV4_VBUFERR0_SHIFT        (26u)
+#define INTC_ICDICER2_S1_WLINE0_SHIFT           (27u)
+#define INTC_ICDICER2_OIR_VI_VSYNC0_SHIFT       (28u)
+#define INTC_ICDICER2_OIR_LO_VSYNC0_SHIFT       (29u)
+#define INTC_ICDICER2_OIR_VSYNCERR0_SHIFT       (30u)
+#define INTC_ICDICER2_OIR_VFIELD0_SHIFT         (31u)
+
+#define INTC_ICDICER3_IV7_VBUFERR0_SHIFT        (0u)
+#define INTC_ICDICER3_IV8_VBUFERR0_SHIFT        (1u)
+#define INTC_ICDICER3_S0_VI_VSYNC1_SHIFT        (3u)
+#define INTC_ICDICER3_S0_LO_VSYNC1_SHIFT        (4u)
+#define INTC_ICDICER3_S0_VSYNCERR1_SHIFT        (5u)
+#define INTC_ICDICER3_GR3_VLINE1_SHIFT          (6u)
+#define INTC_ICDICER3_S0_VFIELD1_SHIFT          (7u)
+#define INTC_ICDICER3_IV1_VBUFERR1_SHIFT        (8u)
+#define INTC_ICDICER3_IV3_VBUFERR1_SHIFT        (9u)
+#define INTC_ICDICER3_IV5_VBUFERR1_SHIFT        (10u)
+#define INTC_ICDICER3_IV6_VBUFERR1_SHIFT        (11u)
+#define INTC_ICDICER3_S0_WLINE1_SHIFT           (12u)
+#define INTC_ICDICER3_S1_VI_VSYNC1_SHIFT        (13u)
+#define INTC_ICDICER3_S1_LO_VSYNC1_SHIFT        (14u)
+#define INTC_ICDICER3_S1_VSYNCERR1_SHIFT        (15u)
+#define INTC_ICDICER3_S1_VFIELD1_SHIFT          (16u)
+#define INTC_ICDICER3_IV2_VBUFERR1_SHIFT        (17u)
+#define INTC_ICDICER3_IV4_VBUFERR1_SHIFT        (18u)
+#define INTC_ICDICER3_S1_WLINE1_SHIFT           (19u)
+#define INTC_ICDICER3_OIR_VI_VSYNC1_SHIFT       (20u)
+#define INTC_ICDICER3_OIR_LO_VSYNC1_SHIFT       (21u)
+#define INTC_ICDICER3_OIR_VLINE1_SHIFT          (22u)
+#define INTC_ICDICER3_OIR_VFIELD1_SHIFT         (23u)
+#define INTC_ICDICER3_IV7_VBUFERR1_SHIFT        (24u)
+#define INTC_ICDICER3_IV8_VBUFERR1_SHIFT        (25u)
+#define INTC_ICDICER3_IMRDI_SHIFT               (27u)
+#define INTC_ICDICER3_IMR2I0_SHIFT              (28u)
+#define INTC_ICDICER3_IMR2I1_SHIFT              (29u)
+#define INTC_ICDICER3_JEDI_SHIFT                (30u)
+#define INTC_ICDICER3_JDTI_SHIFT                (31u)
+
+#define INTC_ICDICER4_CMP0_SHIFT                (0u)
+#define INTC_ICDICER4_CMP1_SHIFT                (1u)
+#define INTC_ICDICER4_INT0_SHIFT                (2u)
+#define INTC_ICDICER4_INT1_SHIFT                (3u)
+#define INTC_ICDICER4_INT2_SHIFT                (4u)
+#define INTC_ICDICER4_INT3_SHIFT                (5u)
+#define INTC_ICDICER4_OSTM0TINT_SHIFT           (6u)
+#define INTC_ICDICER4_OSTM1TINT_SHIFT           (7u)
+#define INTC_ICDICER4_CMI_SHIFT                 (8u)
+#define INTC_ICDICER4_WTOUT_SHIFT               (9u)
+#define INTC_ICDICER4_ITI_SHIFT                 (10u)
+#define INTC_ICDICER4_TGI0A_SHIFT               (11u)
+#define INTC_ICDICER4_TGI0B_SHIFT               (12u)
+#define INTC_ICDICER4_TGI0C_SHIFT               (13u)
+#define INTC_ICDICER4_TGI0D_SHIFT               (14u)
+#define INTC_ICDICER4_TGI0V_SHIFT               (15u)
+#define INTC_ICDICER4_TGI0E_SHIFT               (16u)
+#define INTC_ICDICER4_TGI0F_SHIFT               (17u)
+#define INTC_ICDICER4_TGI1A_SHIFT               (18u)
+#define INTC_ICDICER4_TGI1B_SHIFT               (19u)
+#define INTC_ICDICER4_TGI1V_SHIFT               (20u)
+#define INTC_ICDICER4_TGI1U_SHIFT               (21u)
+#define INTC_ICDICER4_TGI2A_SHIFT               (22u)
+#define INTC_ICDICER4_TGI2B_SHIFT               (23u)
+#define INTC_ICDICER4_TGI2V_SHIFT               (24u)
+#define INTC_ICDICER4_TGI2U_SHIFT               (25u)
+#define INTC_ICDICER4_TGI3A_SHIFT               (26u)
+#define INTC_ICDICER4_TGI3B_SHIFT               (27u)
+#define INTC_ICDICER4_TGI3C_SHIFT               (28u)
+#define INTC_ICDICER4_TGI3D_SHIFT               (29u)
+#define INTC_ICDICER4_TGI3V_SHIFT               (30u)
+#define INTC_ICDICER4_TGI4A_SHIFT               (31u)
+
+#define INTC_ICDICER5_TGI4B_SHIFT               (0u)
+#define INTC_ICDICER5_TGI4C_SHIFT               (1u)
+#define INTC_ICDICER5_TGI4D_SHIFT               (2u)
+#define INTC_ICDICER5_TGI4V_SHIFT               (3u)
+#define INTC_ICDICER5_CMI1_SHIFT                (4u)
+#define INTC_ICDICER5_CMI2_SHIFT                (5u)
+#define INTC_ICDICER5_SGDEI0_SHIFT              (6u)
+#define INTC_ICDICER5_SGDEI1_SHIFT              (7u)
+#define INTC_ICDICER5_SGDEI2_SHIFT              (8u)
+#define INTC_ICDICER5_SGDEI3_SHIFT              (9u)
+#define INTC_ICDICER5_ADI_SHIFT                 (10u)
+#define INTC_ICDICER5_LMTI_SHIFT                (11u)
+#define INTC_ICDICER5_SSII0_SHIFT               (12u)
+#define INTC_ICDICER5_SSIRXI0_SHIFT             (13u)
+#define INTC_ICDICER5_SSITXI0_SHIFT             (14u)
+#define INTC_ICDICER5_SSII1_SHIFT               (15u)
+#define INTC_ICDICER5_SSIRXI1_SHIFT             (16u)
+#define INTC_ICDICER5_SSITXI1_SHIFT             (17u)
+#define INTC_ICDICER5_SSII2_SHIFT               (18u)
+#define INTC_ICDICER5_SSIRTI2_SHIFT             (19u)
+#define INTC_ICDICER5_SSII3_SHIFT               (20u)
+#define INTC_ICDICER5_SSIRXI3_SHIFT             (21u)
+#define INTC_ICDICER5_SSITXI3_SHIFT             (22u)
+#define INTC_ICDICER5_SSII4_SHIFT               (23u)
+#define INTC_ICDICER5_SSIRTI4_SHIFT             (24u)
+#define INTC_ICDICER5_SSII5_SHIFT               (25u)
+#define INTC_ICDICER5_SSIRXI5_SHIFT             (26u)
+#define INTC_ICDICER5_SSITXI5_SHIFT             (27u)
+#define INTC_ICDICER5_SPDIFI_SHIFT              (28u)
+#define INTC_ICDICER5_INTIICTEI0_SHIFT          (29u)
+#define INTC_ICDICER5_INTIICRI0_SHIFT           (30u)
+#define INTC_ICDICER5_INTIICTI0_SHIFT           (31u)
+
+#define INTC_ICDICER6_INTIICSPI0_SHIFT          (0u)
+#define INTC_ICDICER6_INTIICSTI0_SHIFT          (1u)
+#define INTC_ICDICER6_INTIICNAKI0_SHIFT         (2u)
+#define INTC_ICDICER6_INTIICALI0_SHIFT          (3u)
+#define INTC_ICDICER6_INTIICTMOI0_SHIFT         (4u)
+#define INTC_ICDICER6_INTIICTEI1_SHIFT          (5u)
+#define INTC_ICDICER6_INTIICRI1_SHIFT           (6u)
+#define INTC_ICDICER6_INTIICTI1_SHIFT           (7u)
+#define INTC_ICDICER6_INTIICSPI1_SHIFT          (8u)
+#define INTC_ICDICER6_INTIICSTI1_SHIFT          (9u)
+#define INTC_ICDICER6_INTIICNAKI1_SHIFT         (10u)
+#define INTC_ICDICER6_INTIICALI1_SHIFT          (11u)
+#define INTC_ICDICER6_INTIICTMOI1_SHIFT         (12u)
+#define INTC_ICDICER6_INTIICTEI2_SHIFT          (13u)
+#define INTC_ICDICER6_INTIICRI2_SHIFT           (14u)
+#define INTC_ICDICER6_INTIICTI2_SHIFT           (15u)
+#define INTC_ICDICER6_INTIICSPI2_SHIFT          (16u)
+#define INTC_ICDICER6_INTIICSTI2_SHIFT          (17u)
+#define INTC_ICDICER6_INTIICNAKI2_SHIFT         (18u)
+#define INTC_ICDICER6_INTIICALI2_SHIFT          (19u)
+#define INTC_ICDICER6_INTIICTMOI2_SHIFT         (20u)
+#define INTC_ICDICER6_INTIICTEI3_SHIFT          (21u)
+#define INTC_ICDICER6_INTIICRI3_SHIFT           (22u)
+#define INTC_ICDICER6_INTIICTI3_SHIFT           (23u)
+#define INTC_ICDICER6_INTIICSPI3_SHIFT          (24u)
+#define INTC_ICDICER6_INTIICSTI3_SHIFT          (25u)
+#define INTC_ICDICER6_INTIICNAKI3_SHIFT         (26u)
+#define INTC_ICDICER6_INTIICALI3_SHIFT          (27u)
+#define INTC_ICDICER6_INTIICTMOI3_SHIFT         (28u)
+#define INTC_ICDICER6_BRI0_SHIFT                (29u)
+#define INTC_ICDICER6_ERI0_SHIFT                (30u)
+#define INTC_ICDICER6_RXI0_SHIFT                (31u)
+
+#define INTC_ICDICER7_TXI0_SHIFT                (0u)
+#define INTC_ICDICER7_BRI1_SHIFT                (1u)
+#define INTC_ICDICER7_ERI1_SHIFT                (2u)
+#define INTC_ICDICER7_RXI1_SHIFT                (3u)
+#define INTC_ICDICER7_TXI1_SHIFT                (4u)
+#define INTC_ICDICER7_BRI2_SHIFT                (5u)
+#define INTC_ICDICER7_ERI2_SHIFT                (6u)
+#define INTC_ICDICER7_RXI2_SHIFT                (7u)
+#define INTC_ICDICER7_TXI2_SHIFT                (8u)
+#define INTC_ICDICER7_BRI3_SHIFT                (9u)
+#define INTC_ICDICER7_ERI3_SHIFT                (10u)
+#define INTC_ICDICER7_RXI3_SHIFT                (11u)
+#define INTC_ICDICER7_TXI3_SHIFT                (12u)
+#define INTC_ICDICER7_BRI4_SHIFT                (13u)
+#define INTC_ICDICER7_ERI4_SHIFT                (14u)
+#define INTC_ICDICER7_RXI4_SHIFT                (15u)
+#define INTC_ICDICER7_TXI4_SHIFT                (16u)
+#define INTC_ICDICER7_BRI5_SHIFT                (17u)
+#define INTC_ICDICER7_ERI5_SHIFT                (18u)
+#define INTC_ICDICER7_RXI5_SHIFT                (19u)
+#define INTC_ICDICER7_TXI5_SHIFT                (20u)
+#define INTC_ICDICER7_BRI6_SHIFT                (21u)
+#define INTC_ICDICER7_ERI6_SHIFT                (22u)
+#define INTC_ICDICER7_RXI6_SHIFT                (23u)
+#define INTC_ICDICER7_TXI6_SHIFT                (24u)
+#define INTC_ICDICER7_BRI7_SHIFT                (25u)
+#define INTC_ICDICER7_ERI7_SHIFT                (26u)
+#define INTC_ICDICER7_RXI7_SHIFT                (27u)
+#define INTC_ICDICER7_TXI7_SHIFT                (28u)
+#define INTC_ICDICER7_INTRCANGERR_SHIFT         (29u)
+#define INTC_ICDICER7_INTRCANGRECC_SHIFT        (30u)
+#define INTC_ICDICER7_INTRCAN0REC_SHIFT         (31u)
+
+#define INTC_ICDICER8_INTRCAN0ERR_SHIFT         (0u)
+#define INTC_ICDICER8_INTRCAN0TRX_SHIFT         (1u)
+#define INTC_ICDICER8_INTRCAN1REC_SHIFT         (2u)
+#define INTC_ICDICER8_INTRCAN1ERR_SHIFT         (3u)
+#define INTC_ICDICER8_INTRCAN1TRX_SHIFT         (4u)
+#define INTC_ICDICER8_INTRCAN2REC_SHIFT         (5u)
+#define INTC_ICDICER8_INTRCAN2ERR_SHIFT         (6u)
+#define INTC_ICDICER8_INTRCAN2TRX_SHIFT         (7u)
+#define INTC_ICDICER8_INTRCAN3REC_SHIFT         (8u)
+#define INTC_ICDICER8_INTRCAN3ERR_SHIFT         (9u)
+#define INTC_ICDICER8_INTRCAN3TRX_SHIFT         (10u)
+#define INTC_ICDICER8_INTRCAN4REC_SHIFT         (11u)
+#define INTC_ICDICER8_INTRCAN4ERR_SHIFT         (12u)
+#define INTC_ICDICER8_INTRCAN4TRX_SHIFT         (13u)
+#define INTC_ICDICER8_SPEI0_SHIFT               (14u)
+#define INTC_ICDICER8_SPRI0_SHIFT               (15u)
+#define INTC_ICDICER8_SPTI0_SHIFT               (16u)
+#define INTC_ICDICER8_SPEI1_SHIFT               (17u)
+#define INTC_ICDICER8_SPRI1_SHIFT               (18u)
+#define INTC_ICDICER8_SPTI1_SHIFT               (19u)
+#define INTC_ICDICER8_SPEI2_SHIFT               (20u)
+#define INTC_ICDICER8_SPRI2_SHIFT               (21u)
+#define INTC_ICDICER8_SPTI2_SHIFT               (22u)
+#define INTC_ICDICER8_SPEI3_SHIFT               (23u)
+#define INTC_ICDICER8_SPRI3_SHIFT               (24u)
+#define INTC_ICDICER8_SPTI3_SHIFT               (25u)
+#define INTC_ICDICER8_SPEI4_SHIFT               (26u)
+#define INTC_ICDICER8_SPRI4_SHIFT               (27u)
+#define INTC_ICDICER8_SPTI4_SHIFT               (28u)
+#define INTC_ICDICER8_IEBBTD_SHIFT              (29u)
+#define INTC_ICDICER8_IEBBTERR_SHIFT            (30u)
+#define INTC_ICDICER8_IEBBTSTA_SHIFT            (31u)
+
+#define INTC_ICDICER9_IEBBTV_SHIFT              (0u)
+#define INTC_ICDICER9_ISY_SHIFT                 (1u)
+#define INTC_ICDICER9_IERR_SHIFT                (2u)
+#define INTC_ICDICER9_ITARG_SHIFT               (3u)
+#define INTC_ICDICER9_ISEC_SHIFT                (4u)
+#define INTC_ICDICER9_IBUF_SHIFT                (5u)
+#define INTC_ICDICER9_IREADY_SHIFT              (6u)
+#define INTC_ICDICER9_FLSTE_SHIFT               (7u)
+#define INTC_ICDICER9_FLTENDI_SHIFT             (8u)
+#define INTC_ICDICER9_FLTREQ0I_SHIFT            (9u)
+#define INTC_ICDICER9_FLTREQ1I_SHIFT            (10u)
+#define INTC_ICDICER9_MMC0_SHIFT                (11u)
+#define INTC_ICDICER9_MMC1_SHIFT                (12u)
+#define INTC_ICDICER9_MMC2_SHIFT                (13u)
+#define INTC_ICDICER9_SDHI0_3_SHIFT             (14u)
+#define INTC_ICDICER9_SDHI0_0_SHIFT             (15u)
+#define INTC_ICDICER9_SDHI0_1_SHIFT             (16u)
+#define INTC_ICDICER9_SDHI1_3_SHIFT             (17u)
+#define INTC_ICDICER9_SDHI1_0_SHIFT             (18u)
+#define INTC_ICDICER9_SDHI1_1_SHIFT             (19u)
+#define INTC_ICDICER9_ARM_SHIFT                 (20u)
+#define INTC_ICDICER9_PRD_SHIFT                 (21u)
+#define INTC_ICDICER9_CUP_SHIFT                 (22u)
+#define INTC_ICDICER9_SCUAI0_SHIFT              (23u)
+#define INTC_ICDICER9_SCUAI1_SHIFT              (24u)
+#define INTC_ICDICER9_SCUFDI0_SHIFT             (25u)
+#define INTC_ICDICER9_SCUFDI1_SHIFT             (26u)
+#define INTC_ICDICER9_SCUFDI2_SHIFT             (27u)
+#define INTC_ICDICER9_SCUFDI3_SHIFT             (28u)
+#define INTC_ICDICER9_SCUFUI0_SHIFT             (29u)
+#define INTC_ICDICER9_SCUFUI1_SHIFT             (30u)
+#define INTC_ICDICER9_SCUFUI2_SHIFT             (31u)
+
+#define INTC_ICDICER10_SCUFUI3_SHIFT            (0u)
+#define INTC_ICDICER10_SCUDVI0_SHIFT            (1u)
+#define INTC_ICDICER10_SCUDVI1_SHIFT            (2u)
+#define INTC_ICDICER10_SCUDVI2_SHIFT            (3u)
+#define INTC_ICDICER10_SCUDVI3_SHIFT            (4u)
+#define INTC_ICDICER10_MLB_CINT_SHIFT           (5u)
+#define INTC_ICDICER10_MLB_SINT_SHIFT           (6u)
+#define INTC_ICDICER10_DRC0_SHIFT               (7u)
+#define INTC_ICDICER10_DRC1_SHIFT               (8u)
+#define INTC_ICDICER10_LINI0_INT_T_SHIFT        (11u)
+#define INTC_ICDICER10_LINI0_INT_R_SHIFT        (12u)
+#define INTC_ICDICER10_LINI0_INT_S_SHIFT        (13u)
+#define INTC_ICDICER10_LINI0_INT_M_SHIFT        (14u)
+#define INTC_ICDICER10_LINI1_INT_T_SHIFT        (15u)
+#define INTC_ICDICER10_LINI1_INT_R_SHIFT        (16u)
+#define INTC_ICDICER10_LINI1_INT_S_SHIFT        (17u)
+#define INTC_ICDICER10_LINI1_INT_M_SHIFT        (18u)
+#define INTC_ICDICER10_ERI0_SHIFT               (27u)
+#define INTC_ICDICER10_RXI0_SHIFT               (28u)
+#define INTC_ICDICER10_TXI0_SHIFT               (29u)
+#define INTC_ICDICER10_TEI0_SHIFT               (30u)
+#define INTC_ICDICER10_ERI1_SHIFT               (31u)
+
+#define INTC_ICDICER11_RXI1_SHIFT               (0u)
+#define INTC_ICDICER11_TXI1_SHIFT               (1u)
+#define INTC_ICDICER11_TEI1_SHIFT               (2u)
+#define INTC_ICDICER11_AVBI_DATA_SHIFT          (3u)
+#define INTC_ICDICER11_AVBI_ERROR_SHIFT         (4u)
+#define INTC_ICDICER11_AVBI_MANAGE_SHIFT        (5u)
+#define INTC_ICDICER11_AVBI_MAC_SHIFT           (6u)
+#define INTC_ICDICER11_ETHERI_SHIFT             (7u)
+#define INTC_ICDICER11_CEUI_SHIFT               (12u)
+#define INTC_ICDICER11_H2XMLB_ERRINT_SHIFT      (29u)
+#define INTC_ICDICER11_H2XIC1_ERRINT_SHIFT      (30u)
+#define INTC_ICDICER11_X2HPERI1_ERRINT_SHIFT    (31u)
+
+#define INTC_ICDICER12_X2HPERI2_ERRINT_SHIFT    (0u)
+#define INTC_ICDICER12_X2HPERI34_ERRINT_SHIFT   (1u)
+#define INTC_ICDICER12_X2HPERI5_ERRINT_SHIFT    (2u)
+#define INTC_ICDICER12_X2HPERI67_ERRINT_SHIFT   (3u)
+#define INTC_ICDICER12_X2HDBGR_ERRINT_SHIFT     (4u)
+#define INTC_ICDICER12_X2HBSC_ERRINT_SHIFT      (5u)
+#define INTC_ICDICER12_X2HSPI1_ERRINT_SHIFT     (6u)
+#define INTC_ICDICER12_X2HSPI2_ERRINT_SHIFT     (7u)
+#define INTC_ICDICER12_PRRI_SHIFT               (8u)
+#define INTC_ICDICER12_IFEI0_SHIFT              (9u)
+#define INTC_ICDICER12_OFFI0_SHIFT              (10u)
+#define INTC_ICDICER12_PFVEI0_SHIFT             (11u)
+#define INTC_ICDICER12_IFEI1_SHIFT              (12u)
+#define INTC_ICDICER12_OFFI1_SHIFT              (13u)
+#define INTC_ICDICER12_PFVEI1_SHIFT             (14u)
+
+#define INTC_ICDICER13_TINT0_SHIFT              (0u)
+#define INTC_ICDICER13_TINT1_SHIFT              (1u)
+#define INTC_ICDICER13_TINT2_SHIFT              (2u)
+#define INTC_ICDICER13_TINT3_SHIFT              (3u)
+#define INTC_ICDICER13_TINT4_SHIFT              (4u)
+#define INTC_ICDICER13_TINT5_SHIFT              (5u)
+#define INTC_ICDICER13_TINT6_SHIFT              (6u)
+#define INTC_ICDICER13_TINT7_SHIFT              (7u)
+#define INTC_ICDICER13_TINT8_SHIFT              (8u)
+#define INTC_ICDICER13_TINT9_SHIFT              (9u)
+#define INTC_ICDICER13_TINT10_SHIFT             (10u)
+#define INTC_ICDICER13_TINT11_SHIFT             (11u)
+#define INTC_ICDICER13_TINT12_SHIFT             (12u)
+#define INTC_ICDICER13_TINT13_SHIFT             (13u)
+#define INTC_ICDICER13_TINT14_SHIFT             (14u)
+#define INTC_ICDICER13_TINT15_SHIFT             (15u)
+#define INTC_ICDICER13_TINT16_SHIFT             (16u)
+#define INTC_ICDICER13_TINT17_SHIFT             (17u)
+#define INTC_ICDICER13_TINT18_SHIFT             (18u)
+#define INTC_ICDICER13_TINT19_SHIFT             (19u)
+#define INTC_ICDICER13_TINT20_SHIFT             (20u)
+#define INTC_ICDICER13_TINT21_SHIFT             (21u)
+#define INTC_ICDICER13_TINT22_SHIFT             (22u)
+#define INTC_ICDICER13_TINT23_SHIFT             (23u)
+#define INTC_ICDICER13_TINT24_SHIFT             (24u)
+#define INTC_ICDICER13_TINT25_SHIFT             (25u)
+#define INTC_ICDICER13_TINT26_SHIFT             (26u)
+#define INTC_ICDICER13_TINT27_SHIFT             (27u)
+#define INTC_ICDICER13_TINT28_SHIFT             (28u)
+#define INTC_ICDICER13_TINT29_SHIFT             (29u)
+#define INTC_ICDICER13_TINT30_SHIFT             (30u)
+#define INTC_ICDICER13_TINT31_SHIFT             (31u)
+
+#define INTC_ICDICER14_TINT32_SHIFT             (0u)
+#define INTC_ICDICER14_TINT33_SHIFT             (1u)
+#define INTC_ICDICER14_TINT34_SHIFT             (2u)
+#define INTC_ICDICER14_TINT35_SHIFT             (3u)
+#define INTC_ICDICER14_TINT36_SHIFT             (4u)
+#define INTC_ICDICER14_TINT37_SHIFT             (5u)
+#define INTC_ICDICER14_TINT38_SHIFT             (6u)
+#define INTC_ICDICER14_TINT39_SHIFT             (7u)
+#define INTC_ICDICER14_TINT40_SHIFT             (8u)
+#define INTC_ICDICER14_TINT41_SHIFT             (9u)
+#define INTC_ICDICER14_TINT42_SHIFT             (10u)
+#define INTC_ICDICER14_TINT43_SHIFT             (11u)
+#define INTC_ICDICER14_TINT44_SHIFT             (12u)
+#define INTC_ICDICER14_TINT45_SHIFT             (13u)
+#define INTC_ICDICER14_TINT46_SHIFT             (14u)
+#define INTC_ICDICER14_TINT47_SHIFT             (15u)
+#define INTC_ICDICER14_TINT48_SHIFT             (16u)
+#define INTC_ICDICER14_TINT49_SHIFT             (17u)
+#define INTC_ICDICER14_TINT50_SHIFT             (18u)
+#define INTC_ICDICER14_TINT51_SHIFT             (19u)
+#define INTC_ICDICER14_TINT52_SHIFT             (20u)
+#define INTC_ICDICER14_TINT53_SHIFT             (21u)
+#define INTC_ICDICER14_TINT54_SHIFT             (22u)
+#define INTC_ICDICER14_TINT55_SHIFT             (23u)
+#define INTC_ICDICER14_TINT56_SHIFT             (24u)
+#define INTC_ICDICER14_TINT57_SHIFT             (25u)
+#define INTC_ICDICER14_TINT58_SHIFT             (26u)
+#define INTC_ICDICER14_TINT59_SHIFT             (27u)
+#define INTC_ICDICER14_TINT60_SHIFT             (28u)
+#define INTC_ICDICER14_TINT61_SHIFT             (29u)
+#define INTC_ICDICER14_TINT62_SHIFT             (30u)
+#define INTC_ICDICER14_TINT63_SHIFT             (31u)
+
+#define INTC_ICDICER15_TINT64_SHIFT             (0u)
+#define INTC_ICDICER15_TINT65_SHIFT             (1u)
+#define INTC_ICDICER15_TINT66_SHIFT             (2u)
+#define INTC_ICDICER15_TINT67_SHIFT             (3u)
+#define INTC_ICDICER15_TINT68_SHIFT             (4u)
+#define INTC_ICDICER15_TINT69_SHIFT             (5u)
+#define INTC_ICDICER15_TINT70_SHIFT             (6u)
+#define INTC_ICDICER15_TINT71_SHIFT             (7u)
+#define INTC_ICDICER15_TINT72_SHIFT             (8u)
+#define INTC_ICDICER15_TINT73_SHIFT             (9u)
+#define INTC_ICDICER15_TINT74_SHIFT             (10u)
+#define INTC_ICDICER15_TINT75_SHIFT             (11u)
+#define INTC_ICDICER15_TINT76_SHIFT             (12u)
+#define INTC_ICDICER15_TINT77_SHIFT             (13u)
+#define INTC_ICDICER15_TINT78_SHIFT             (14u)
+#define INTC_ICDICER15_TINT79_SHIFT             (15u)
+#define INTC_ICDICER15_TINT80_SHIFT             (16u)
+#define INTC_ICDICER15_TINT81_SHIFT             (17u)
+#define INTC_ICDICER15_TINT82_SHIFT             (18u)
+#define INTC_ICDICER15_TINT83_SHIFT             (19u)
+#define INTC_ICDICER15_TINT84_SHIFT             (20u)
+#define INTC_ICDICER15_TINT85_SHIFT             (21u)
+#define INTC_ICDICER15_TINT86_SHIFT             (22u)
+#define INTC_ICDICER15_TINT87_SHIFT             (23u)
+#define INTC_ICDICER15_TINT88_SHIFT             (24u)
+#define INTC_ICDICER15_TINT89_SHIFT             (25u)
+#define INTC_ICDICER15_TINT90_SHIFT             (26u)
+#define INTC_ICDICER15_TINT91_SHIFT             (27u)
+#define INTC_ICDICER15_TINT92_SHIFT             (28u)
+#define INTC_ICDICER15_TINT93_SHIFT             (29u)
+#define INTC_ICDICER15_TINT94_SHIFT             (30u)
+#define INTC_ICDICER15_TINT95_SHIFT             (31u)
+
+#define INTC_ICDICER16_TINT96_SHIFT             (0u)
+#define INTC_ICDICER16_TINT97_SHIFT             (1u)
+#define INTC_ICDICER16_TINT98_SHIFT             (2u)
+#define INTC_ICDICER16_TINT99_SHIFT             (3u)
+#define INTC_ICDICER16_TINT100_SHIFT            (4u)
+#define INTC_ICDICER16_TINT101_SHIFT            (5u)
+#define INTC_ICDICER16_TINT102_SHIFT            (6u)
+#define INTC_ICDICER16_TINT103_SHIFT            (7u)
+#define INTC_ICDICER16_TINT104_SHIFT            (8u)
+#define INTC_ICDICER16_TINT105_SHIFT            (9u)
+#define INTC_ICDICER16_TINT106_SHIFT            (10u)
+#define INTC_ICDICER16_TINT107_SHIFT            (11u)
+#define INTC_ICDICER16_TINT108_SHIFT            (12u)
+#define INTC_ICDICER16_TINT109_SHIFT            (13u)
+#define INTC_ICDICER16_TINT110_SHIFT            (14u)
+#define INTC_ICDICER16_TINT111_SHIFT            (15u)
+#define INTC_ICDICER16_TINT112_SHIFT            (16u)
+#define INTC_ICDICER16_TINT113_SHIFT            (17u)
+#define INTC_ICDICER16_TINT114_SHIFT            (18u)
+#define INTC_ICDICER16_TINT115_SHIFT            (19u)
+#define INTC_ICDICER16_TINT116_SHIFT            (20u)
+#define INTC_ICDICER16_TINT117_SHIFT            (21u)
+#define INTC_ICDICER16_TINT118_SHIFT            (22u)
+#define INTC_ICDICER16_TINT119_SHIFT            (23u)
+#define INTC_ICDICER16_TINT120_SHIFT            (24u)
+#define INTC_ICDICER16_TINT121_SHIFT            (25u)
+#define INTC_ICDICER16_TINT122_SHIFT            (26u)
+#define INTC_ICDICER16_TINT123_SHIFT            (27u)
+#define INTC_ICDICER16_TINT124_SHIFT            (28u)
+#define INTC_ICDICER16_TINT125_SHIFT            (29u)
+#define INTC_ICDICER16_TINT126_SHIFT            (30u)
+#define INTC_ICDICER16_TINT127_SHIFT            (31u)
+
+#define INTC_ICDICER17_TINT128_SHIFT            (0u)
+#define INTC_ICDICER17_TINT129_SHIFT            (1u)
+#define INTC_ICDICER17_TINT130_SHIFT            (2u)
+#define INTC_ICDICER17_TINT131_SHIFT            (3u)
+#define INTC_ICDICER17_TINT132_SHIFT            (4u)
+#define INTC_ICDICER17_TINT133_SHIFT            (5u)
+#define INTC_ICDICER17_TINT134_SHIFT            (6u)
+#define INTC_ICDICER17_TINT135_SHIFT            (7u)
+#define INTC_ICDICER17_TINT136_SHIFT            (8u)
+#define INTC_ICDICER17_TINT137_SHIFT            (9u)
+#define INTC_ICDICER17_TINT138_SHIFT            (10u)
+#define INTC_ICDICER17_TINT139_SHIFT            (11u)
+#define INTC_ICDICER17_TINT140_SHIFT            (12u)
+#define INTC_ICDICER17_TINT141_SHIFT            (13u)
+#define INTC_ICDICER17_TINT142_SHIFT            (14u)
+#define INTC_ICDICER17_TINT143_SHIFT            (15u)
+#define INTC_ICDICER17_TINT144_SHIFT            (16u)
+#define INTC_ICDICER17_TINT145_SHIFT            (17u)
+#define INTC_ICDICER17_TINT146_SHIFT            (18u)
+#define INTC_ICDICER17_TINT147_SHIFT            (19u)
+#define INTC_ICDICER17_TINT148_SHIFT            (20u)
+#define INTC_ICDICER17_TINT149_SHIFT            (21u)
+#define INTC_ICDICER17_TINT150_SHIFT            (22u)
+#define INTC_ICDICER17_TINT151_SHIFT            (23u)
+#define INTC_ICDICER17_TINT152_SHIFT            (24u)
+#define INTC_ICDICER17_TINT153_SHIFT            (25u)
+#define INTC_ICDICER17_TINT154_SHIFT            (26u)
+#define INTC_ICDICER17_TINT155_SHIFT            (27u)
+#define INTC_ICDICER17_TINT156_SHIFT            (28u)
+#define INTC_ICDICER17_TINT157_SHIFT            (29u)
+#define INTC_ICDICER17_TINT158_SHIFT            (30u)
+#define INTC_ICDICER17_TINT159_SHIFT            (31u)
+
+#define INTC_ICDICER18_TINT160_SHIFT            (0u)
+#define INTC_ICDICER18_TINT161_SHIFT            (1u)
+#define INTC_ICDICER18_TINT162_SHIFT            (2u)
+#define INTC_ICDICER18_TINT163_SHIFT            (3u)
+#define INTC_ICDICER18_TINT164_SHIFT            (4u)
+#define INTC_ICDICER18_TINT165_SHIFT            (5u)
+#define INTC_ICDICER18_TINT166_SHIFT            (6u)
+#define INTC_ICDICER18_TINT167_SHIFT            (7u)
+#define INTC_ICDICER18_TINT168_SHIFT            (8u)
+#define INTC_ICDICER18_TINT169_SHIFT            (9u)
+#define INTC_ICDICER18_TINT170_SHIFT            (10u)
+
+#define INTC_ICDISPR0_SW0_SHIFT                 (0u)
+#define INTC_ICDISPR0_SW1_SHIFT                 (1u)
+#define INTC_ICDISPR0_SW2_SHIFT                 (2u)
+#define INTC_ICDISPR0_SW3_SHIFT                 (3u)
+#define INTC_ICDISPR0_SW4_SHIFT                 (4u)
+#define INTC_ICDISPR0_SW5_SHIFT                 (5u)
+#define INTC_ICDISPR0_SW6_SHIFT                 (6u)
+#define INTC_ICDISPR0_SW7_SHIFT                 (7u)
+#define INTC_ICDISPR0_SW8_SHIFT                 (8u)
+#define INTC_ICDISPR0_SW9_SHIFT                 (9u)
+#define INTC_ICDISPR0_SW10_SHIFT                (10u)
+#define INTC_ICDISPR0_SW11_SHIFT                (11u)
+#define INTC_ICDISPR0_SW12_SHIFT                (12u)
+#define INTC_ICDISPR0_SW13_SHIFT                (13u)
+#define INTC_ICDISPR0_SW14_SHIFT                (14u)
+#define INTC_ICDISPR0_SW15_SHIFT                (15u)
+#define INTC_ICDISPR0_PMUIRQ0_SHIFT             (16u)
+#define INTC_ICDISPR0_COMMRX0_SHIFT             (17u)
+#define INTC_ICDISPR0_COMMTX0_SHIFT             (18u)
+#define INTC_ICDISPR0_CTIIRQ0_SHIFT             (19u)
+
+#define INTC_ICDISPR1_IRQ0_SHIFT                (0u)
+#define INTC_ICDISPR1_IRQ1_SHIFT                (1u)
+#define INTC_ICDISPR1_IRQ2_SHIFT                (2u)
+#define INTC_ICDISPR1_IRQ3_SHIFT                (3u)
+#define INTC_ICDISPR1_IRQ4_SHIFT                (4u)
+#define INTC_ICDISPR1_IRQ5_SHIFT                (5u)
+#define INTC_ICDISPR1_IRQ6_SHIFT                (6u)
+#define INTC_ICDISPR1_IRQ7_SHIFT                (7u)
+#define INTC_ICDISPR1_PL310ERR_SHIFT            (8u)
+#define INTC_ICDISPR1_DMAINT0_SHIFT             (9u)
+#define INTC_ICDISPR1_DMAINT1_SHIFT             (10u)
+#define INTC_ICDISPR1_DMAINT2_SHIFT             (11u)
+#define INTC_ICDISPR1_DMAINT3_SHIFT             (12u)
+#define INTC_ICDISPR1_DMAINT4_SHIFT             (13u)
+#define INTC_ICDISPR1_DMAINT5_SHIFT             (14u)
+#define INTC_ICDISPR1_DMAINT6_SHIFT             (15u)
+#define INTC_ICDISPR1_DMAINT7_SHIFT             (16u)
+#define INTC_ICDISPR1_DMAINT8_SHIFT             (17u)
+#define INTC_ICDISPR1_DMAINT9_SHIFT             (18u)
+#define INTC_ICDISPR1_DMAINT10_SHIFT            (19u)
+#define INTC_ICDISPR1_DMAINT11_SHIFT            (20u)
+#define INTC_ICDISPR1_DMAINT12_SHIFT            (21u)
+#define INTC_ICDISPR1_DMAINT13_SHIFT            (22u)
+#define INTC_ICDISPR1_DMAINT14_SHIFT            (23u)
+#define INTC_ICDISPR1_DMAINT15_SHIFT            (24u)
+#define INTC_ICDISPR1_DMAERR_SHIFT              (25u)
+
+#define INTC_ICDISPR2_USBI0_SHIFT               (9u)
+#define INTC_ICDISPR2_USBI1_SHIFT               (10u)
+#define INTC_ICDISPR2_S0_VI_VSYNC0_SHIFT        (11u)
+#define INTC_ICDISPR2_S0_LO_VSYNC0_SHIFT        (12u)
+#define INTC_ICDISPR2_S0_VSYNCERR0_SHIFT        (13u)
+#define INTC_ICDISPR2_GR3_VLINE0_SHIFT          (14u)
+#define INTC_ICDISPR2_S0_VFIELD0_SHIFT          (15u)
+#define INTC_ICDISPR2_IV1_VBUFERR0_SHIFT        (16u)
+#define INTC_ICDISPR2_IV3_VBUFERR0_SHIFT        (17u)
+#define INTC_ICDISPR2_IV5_VBUFERR0_SHIFT        (18u)
+#define INTC_ICDISPR2_IV6_VBUFERR0_SHIFT        (19u)
+#define INTC_ICDISPR2_S0_WLINE0_SHIFT           (20u)
+#define INTC_ICDISPR2_S1_VI_VSYNC0_SHIFT        (21u)
+#define INTC_ICDISPR2_S1_LO_VSYNC0_SHIFT        (22u)
+#define INTC_ICDISPR2_S1_VSYNCERR0_SHIFT        (23u)
+#define INTC_ICDISPR2_S1_VFIELD0_SHIFT          (24u)
+#define INTC_ICDISPR2_IV2_VBUFERR0_SHIFT        (25u)
+#define INTC_ICDISPR2_IV4_VBUFERR0_SHIFT        (26u)
+#define INTC_ICDISPR2_S1_WLINE0_SHIFT           (27u)
+#define INTC_ICDISPR2_OIR_VI_VSYNC0_SHIFT       (28u)
+#define INTC_ICDISPR2_OIR_LO_VSYNC0_SHIFT       (29u)
+#define INTC_ICDISPR2_OIR_VSYNCERR0_SHIFT       (30u)
+#define INTC_ICDISPR2_OIR_VFIELD0_SHIFT         (31u)
+
+#define INTC_ICDISPR3_IV7_VBUFERR0_SHIFT        (0u)
+#define INTC_ICDISPR3_IV8_VBUFERR0_SHIFT        (1u)
+#define INTC_ICDISPR3_S0_VI_VSYNC1_SHIFT        (3u)
+#define INTC_ICDISPR3_S0_LO_VSYNC1_SHIFT        (4u)
+#define INTC_ICDISPR3_S0_VSYNCERR1_SHIFT        (5u)
+#define INTC_ICDISPR3_GR3_VLINE1_SHIFT          (6u)
+#define INTC_ICDISPR3_S0_VFIELD1_SHIFT          (7u)
+#define INTC_ICDISPR3_IV1_VBUFERR1_SHIFT        (8u)
+#define INTC_ICDISPR3_IV3_VBUFERR1_SHIFT        (9u)
+#define INTC_ICDISPR3_IV5_VBUFERR1_SHIFT        (10u)
+#define INTC_ICDISPR3_IV6_VBUFERR1_SHIFT        (11u)
+#define INTC_ICDISPR3_S0_WLINE1_SHIFT           (12u)
+#define INTC_ICDISPR3_S1_VI_VSYNC1_SHIFT        (13u)
+#define INTC_ICDISPR3_S1_LO_VSYNC1_SHIFT        (14u)
+#define INTC_ICDISPR3_S1_VSYNCERR1_SHIFT        (15u)
+#define INTC_ICDISPR3_S1_VFIELD1_SHIFT          (16u)
+#define INTC_ICDISPR3_IV2_VBUFERR1_SHIFT        (17u)
+#define INTC_ICDISPR3_IV4_VBUFERR1_SHIFT        (18u)
+#define INTC_ICDISPR3_S1_WLINE1_SHIFT           (19u)
+#define INTC_ICDISPR3_OIR_VI_VSYNC1_SHIFT       (20u)
+#define INTC_ICDISPR3_OIR_LO_VSYNC1_SHIFT       (21u)
+#define INTC_ICDISPR3_OIR_VLINE1_SHIFT          (22u)
+#define INTC_ICDISPR3_OIR_VFIELD1_SHIFT         (23u)
+#define INTC_ICDISPR3_IV7_VBUFERR1_SHIFT        (24u)
+#define INTC_ICDISPR3_IV8_VBUFERR1_SHIFT        (25u)
+#define INTC_ICDISPR3_IMRDI_SHIFT               (27u)
+#define INTC_ICDISPR3_IMR2I0_SHIFT              (28u)
+#define INTC_ICDISPR3_IMR2I1_SHIFT              (29u)
+#define INTC_ICDISPR3_JEDI_SHIFT                (30u)
+#define INTC_ICDISPR3_JDTI_SHIFT                (31u)
+
+#define INTC_ICDISPR4_CMP0_SHIFT                (0u)
+#define INTC_ICDISPR4_CMP1_SHIFT                (1u)
+#define INTC_ICDISPR4_INT0_SHIFT                (2u)
+#define INTC_ICDISPR4_INT1_SHIFT                (3u)
+#define INTC_ICDISPR4_INT2_SHIFT                (4u)
+#define INTC_ICDISPR4_INT3_SHIFT                (5u)
+#define INTC_ICDISPR4_OSTM0TINT_SHIFT           (6u)
+#define INTC_ICDISPR4_OSTM1TINT_SHIFT           (7u)
+#define INTC_ICDISPR4_CMI_SHIFT                 (8u)
+#define INTC_ICDISPR4_WTOUT_SHIFT               (9u)
+#define INTC_ICDISPR4_ITI_SHIFT                 (10u)
+#define INTC_ICDISPR4_TGI0A_SHIFT               (11u)
+#define INTC_ICDISPR4_TGI0B_SHIFT               (12u)
+#define INTC_ICDISPR4_TGI0C_SHIFT               (13u)
+#define INTC_ICDISPR4_TGI0D_SHIFT               (14u)
+#define INTC_ICDISPR4_TGI0V_SHIFT               (15u)
+#define INTC_ICDISPR4_TGI0E_SHIFT               (16u)
+#define INTC_ICDISPR4_TGI0F_SHIFT               (17u)
+#define INTC_ICDISPR4_TGI1A_SHIFT               (18u)
+#define INTC_ICDISPR4_TGI1B_SHIFT               (19u)
+#define INTC_ICDISPR4_TGI1V_SHIFT               (20u)
+#define INTC_ICDISPR4_TGI1U_SHIFT               (21u)
+#define INTC_ICDISPR4_TGI2A_SHIFT               (22u)
+#define INTC_ICDISPR4_TGI2B_SHIFT               (23u)
+#define INTC_ICDISPR4_TGI2V_SHIFT               (24u)
+#define INTC_ICDISPR4_TGI2U_SHIFT               (25u)
+#define INTC_ICDISPR4_TGI3A_SHIFT               (26u)
+#define INTC_ICDISPR4_TGI3B_SHIFT               (27u)
+#define INTC_ICDISPR4_TGI3C_SHIFT               (28u)
+#define INTC_ICDISPR4_TGI3D_SHIFT               (29u)
+#define INTC_ICDISPR4_TGI3V_SHIFT               (30u)
+#define INTC_ICDISPR4_TGI4A_SHIFT               (31u)
+
+#define INTC_ICDISPR5_TGI4B_SHIFT               (0u)
+#define INTC_ICDISPR5_TGI4C_SHIFT               (1u)
+#define INTC_ICDISPR5_TGI4D_SHIFT               (2u)
+#define INTC_ICDISPR5_TGI4V_SHIFT               (3u)
+#define INTC_ICDISPR5_CMI1_SHIFT                (4u)
+#define INTC_ICDISPR5_CMI2_SHIFT                (5u)
+#define INTC_ICDISPR5_SGDEI0_SHIFT              (6u)
+#define INTC_ICDISPR5_SGDEI1_SHIFT              (7u)
+#define INTC_ICDISPR5_SGDEI2_SHIFT              (8u)
+#define INTC_ICDISPR5_SGDEI3_SHIFT              (9u)
+#define INTC_ICDISPR5_ADI_SHIFT                 (10u)
+#define INTC_ICDISPR5_LMTI_SHIFT                (11u)
+#define INTC_ICDISPR5_SSII0_SHIFT               (12u)
+#define INTC_ICDISPR5_SSIRXI0_SHIFT             (13u)
+#define INTC_ICDISPR5_SSITXI0_SHIFT             (14u)
+#define INTC_ICDISPR5_SSII1_SHIFT               (15u)
+#define INTC_ICDISPR5_SSIRXI1_SHIFT             (16u)
+#define INTC_ICDISPR5_SSITXI1_SHIFT             (17u)
+#define INTC_ICDISPR5_SSII2_SHIFT               (18u)
+#define INTC_ICDISPR5_SSIRTI2_SHIFT             (19u)
+#define INTC_ICDISPR5_SSII3_SHIFT               (20u)
+#define INTC_ICDISPR5_SSIRXI3_SHIFT             (21u)
+#define INTC_ICDISPR5_SSITXI3_SHIFT             (22u)
+#define INTC_ICDISPR5_SSII4_SHIFT               (23u)
+#define INTC_ICDISPR5_SSIRTI4_SHIFT             (24u)
+#define INTC_ICDISPR5_SSII5_SHIFT               (25u)
+#define INTC_ICDISPR5_SSIRXI5_SHIFT             (26u)
+#define INTC_ICDISPR5_SSITXI5_SHIFT             (27u)
+#define INTC_ICDISPR5_SPDIFI_SHIFT              (28u)
+#define INTC_ICDISPR5_INTIICTEI0_SHIFT          (29u)
+#define INTC_ICDISPR5_INTIICRI0_SHIFT           (30u)
+#define INTC_ICDISPR5_INTIICTI0_SHIFT           (31u)
+
+#define INTC_ICDISPR6_INTIICSPI0_SHIFT          (0u)
+#define INTC_ICDISPR6_INTIICSTI0_SHIFT          (1u)
+#define INTC_ICDISPR6_INTIICNAKI0_SHIFT         (2u)
+#define INTC_ICDISPR6_INTIICALI0_SHIFT          (3u)
+#define INTC_ICDISPR6_INTIICTMOI0_SHIFT         (4u)
+#define INTC_ICDISPR6_INTIICTEI1_SHIFT          (5u)
+#define INTC_ICDISPR6_INTIICRI1_SHIFT           (6u)
+#define INTC_ICDISPR6_INTIICTI1_SHIFT           (7u)
+#define INTC_ICDISPR6_INTIICSPI1_SHIFT          (8u)
+#define INTC_ICDISPR6_INTIICSTI1_SHIFT          (9u)
+#define INTC_ICDISPR6_INTIICNAKI1_SHIFT         (10u)
+#define INTC_ICDISPR6_INTIICALI1_SHIFT          (11u)
+#define INTC_ICDISPR6_INTIICTMOI1_SHIFT         (12u)
+#define INTC_ICDISPR6_INTIICTEI2_SHIFT          (13u)
+#define INTC_ICDISPR6_INTIICRI2_SHIFT           (14u)
+#define INTC_ICDISPR6_INTIICTI2_SHIFT           (15u)
+#define INTC_ICDISPR6_INTIICSPI2_SHIFT          (16u)
+#define INTC_ICDISPR6_INTIICSTI2_SHIFT          (17u)
+#define INTC_ICDISPR6_INTIICNAKI2_SHIFT         (18u)
+#define INTC_ICDISPR6_INTIICALI2_SHIFT          (19u)
+#define INTC_ICDISPR6_INTIICTMOI2_SHIFT         (20u)
+#define INTC_ICDISPR6_INTIICTEI3_SHIFT          (21u)
+#define INTC_ICDISPR6_INTIICRI3_SHIFT           (22u)
+#define INTC_ICDISPR6_INTIICTI3_SHIFT           (23u)
+#define INTC_ICDISPR6_INTIICSPI3_SHIFT          (24u)
+#define INTC_ICDISPR6_INTIICSTI3_SHIFT          (25u)
+#define INTC_ICDISPR6_INTIICNAKI3_SHIFT         (26u)
+#define INTC_ICDISPR6_INTIICALI3_SHIFT          (27u)
+#define INTC_ICDISPR6_INTIICTMOI3_SHIFT         (28u)
+#define INTC_ICDISPR6_BRI0_SHIFT                (29u)
+#define INTC_ICDISPR6_ERI0_SHIFT                (30u)
+#define INTC_ICDISPR6_RXI0_SHIFT                (31u)
+
+#define INTC_ICDISPR7_TXI0_SHIFT                (0u)
+#define INTC_ICDISPR7_BRI1_SHIFT                (1u)
+#define INTC_ICDISPR7_ERI1_SHIFT                (2u)
+#define INTC_ICDISPR7_RXI1_SHIFT                (3u)
+#define INTC_ICDISPR7_TXI1_SHIFT                (4u)
+#define INTC_ICDISPR7_BRI2_SHIFT                (5u)
+#define INTC_ICDISPR7_ERI2_SHIFT                (6u)
+#define INTC_ICDISPR7_RXI2_SHIFT                (7u)
+#define INTC_ICDISPR7_TXI2_SHIFT                (8u)
+#define INTC_ICDISPR7_BRI3_SHIFT                (9u)
+#define INTC_ICDISPR7_ERI3_SHIFT                (10u)
+#define INTC_ICDISPR7_RXI3_SHIFT                (11u)
+#define INTC_ICDISPR7_TXI3_SHIFT                (12u)
+#define INTC_ICDISPR7_BRI4_SHIFT                (13u)
+#define INTC_ICDISPR7_ERI4_SHIFT                (14u)
+#define INTC_ICDISPR7_RXI4_SHIFT                (15u)
+#define INTC_ICDISPR7_TXI4_SHIFT                (16u)
+#define INTC_ICDISPR7_BRI5_SHIFT                (17u)
+#define INTC_ICDISPR7_ERI5_SHIFT                (18u)
+#define INTC_ICDISPR7_RXI5_SHIFT                (19u)
+#define INTC_ICDISPR7_TXI5_SHIFT                (20u)
+#define INTC_ICDISPR7_BRI6_SHIFT                (21u)
+#define INTC_ICDISPR7_ERI6_SHIFT                (22u)
+#define INTC_ICDISPR7_RXI6_SHIFT                (23u)
+#define INTC_ICDISPR7_TXI6_SHIFT                (24u)
+#define INTC_ICDISPR7_BRI7_SHIFT                (25u)
+#define INTC_ICDISPR7_ERI7_SHIFT                (26u)
+#define INTC_ICDISPR7_RXI7_SHIFT                (27u)
+#define INTC_ICDISPR7_TXI7_SHIFT                (28u)
+#define INTC_ICDISPR7_INTRCANGERR_SHIFT         (29u)
+#define INTC_ICDISPR7_INTRCANGRECC_SHIFT        (30u)
+#define INTC_ICDISPR7_INTRCAN0REC_SHIFT         (31u)
+
+#define INTC_ICDISPR8_INTRCAN0ERR_SHIFT         (0u)
+#define INTC_ICDISPR8_INTRCAN0TRX_SHIFT         (1u)
+#define INTC_ICDISPR8_INTRCAN1REC_SHIFT         (2u)
+#define INTC_ICDISPR8_INTRCAN1ERR_SHIFT         (3u)
+#define INTC_ICDISPR8_INTRCAN1TRX_SHIFT         (4u)
+#define INTC_ICDISPR8_INTRCAN2REC_SHIFT         (5u)
+#define INTC_ICDISPR8_INTRCAN2ERR_SHIFT         (6u)
+#define INTC_ICDISPR8_INTRCAN2TRX_SHIFT         (7u)
+#define INTC_ICDISPR8_INTRCAN3REC_SHIFT         (8u)
+#define INTC_ICDISPR8_INTRCAN3ERR_SHIFT         (9u)
+#define INTC_ICDISPR8_INTRCAN3TRX_SHIFT         (10u)
+#define INTC_ICDISPR8_INTRCAN4REC_SHIFT         (11u)
+#define INTC_ICDISPR8_INTRCAN4ERR_SHIFT         (12u)
+#define INTC_ICDISPR8_INTRCAN4TRX_SHIFT         (13u)
+#define INTC_ICDISPR8_SPEI0_SHIFT               (14u)
+#define INTC_ICDISPR8_SPRI0_SHIFT               (15u)
+#define INTC_ICDISPR8_SPTI0_SHIFT               (16u)
+#define INTC_ICDISPR8_SPEI1_SHIFT               (17u)
+#define INTC_ICDISPR8_SPRI1_SHIFT               (18u)
+#define INTC_ICDISPR8_SPTI1_SHIFT               (19u)
+#define INTC_ICDISPR8_SPEI2_SHIFT               (20u)
+#define INTC_ICDISPR8_SPRI2_SHIFT               (21u)
+#define INTC_ICDISPR8_SPTI2_SHIFT               (22u)
+#define INTC_ICDISPR8_SPEI3_SHIFT               (23u)
+#define INTC_ICDISPR8_SPRI3_SHIFT               (24u)
+#define INTC_ICDISPR8_SPTI3_SHIFT               (25u)
+#define INTC_ICDISPR8_SPEI4_SHIFT               (26u)
+#define INTC_ICDISPR8_SPRI4_SHIFT               (27u)
+#define INTC_ICDISPR8_SPTI4_SHIFT               (28u)
+#define INTC_ICDISPR8_IEBBTD_SHIFT              (29u)
+#define INTC_ICDISPR8_IEBBTERR_SHIFT            (30u)
+#define INTC_ICDISPR8_IEBBTSTA_SHIFT            (31u)
+
+#define INTC_ICDISPR9_IEBBTV_SHIFT              (0u)
+#define INTC_ICDISPR9_ISY_SHIFT                 (1u)
+#define INTC_ICDISPR9_IERR_SHIFT                (2u)
+#define INTC_ICDISPR9_ITARG_SHIFT               (3u)
+#define INTC_ICDISPR9_ISEC_SHIFT                (4u)
+#define INTC_ICDISPR9_IBUF_SHIFT                (5u)
+#define INTC_ICDISPR9_IREADY_SHIFT              (6u)
+#define INTC_ICDISPR9_FLSTE_SHIFT               (7u)
+#define INTC_ICDISPR9_FLTENDI_SHIFT             (8u)
+#define INTC_ICDISPR9_FLTREQ0I_SHIFT            (9u)
+#define INTC_ICDISPR9_FLTREQ1I_SHIFT            (10u)
+#define INTC_ICDISPR9_MMC0_SHIFT                (11u)
+#define INTC_ICDISPR9_MMC1_SHIFT                (12u)
+#define INTC_ICDISPR9_MMC2_SHIFT                (13u)
+#define INTC_ICDISPR9_SDHI0_3_SHIFT             (14u)
+#define INTC_ICDISPR9_SDHI0_0_SHIFT             (15u)
+#define INTC_ICDISPR9_SDHI0_1_SHIFT             (16u)
+#define INTC_ICDISPR9_SDHI1_3_SHIFT             (17u)
+#define INTC_ICDISPR9_SDHI1_0_SHIFT             (18u)
+#define INTC_ICDISPR9_SDHI1_1_SHIFT             (19u)
+#define INTC_ICDISPR9_ARM_SHIFT                 (20u)
+#define INTC_ICDISPR9_PRD_SHIFT                 (21u)
+#define INTC_ICDISPR9_CUP_SHIFT                 (22u)
+#define INTC_ICDISPR9_SCUAI0_SHIFT              (23u)
+#define INTC_ICDISPR9_SCUAI1_SHIFT              (24u)
+#define INTC_ICDISPR9_SCUFDI0_SHIFT             (25u)
+#define INTC_ICDISPR9_SCUFDI1_SHIFT             (26u)
+#define INTC_ICDISPR9_SCUFDI2_SHIFT             (27u)
+#define INTC_ICDISPR9_SCUFDI3_SHIFT             (28u)
+#define INTC_ICDISPR9_SCUFUI0_SHIFT             (29u)
+#define INTC_ICDISPR9_SCUFUI1_SHIFT             (30u)
+#define INTC_ICDISPR9_SCUFUI2_SHIFT             (31u)
+
+#define INTC_ICDISPR10_SCUFUI3_SHIFT            (0u)
+#define INTC_ICDISPR10_SCUDVI0_SHIFT            (1u)
+#define INTC_ICDISPR10_SCUDVI1_SHIFT            (2u)
+#define INTC_ICDISPR10_SCUDVI2_SHIFT            (3u)
+#define INTC_ICDISPR10_SCUDVI3_SHIFT            (4u)
+#define INTC_ICDISPR10_MLB_CINT_SHIFT           (5u)
+#define INTC_ICDISPR10_MLB_SINT_SHIFT           (6u)
+#define INTC_ICDISPR10_DRC0_SHIFT               (7u)
+#define INTC_ICDISPR10_DRC1_SHIFT               (8u)
+#define INTC_ICDISPR10_LINI0_INT_T_SHIFT        (11u)
+#define INTC_ICDISPR10_LINI0_INT_R_SHIFT        (12u)
+#define INTC_ICDISPR10_LINI0_INT_S_SHIFT        (13u)
+#define INTC_ICDISPR10_LINI0_INT_M_SHIFT        (14u)
+#define INTC_ICDISPR10_LINI1_INT_T_SHIFT        (15u)
+#define INTC_ICDISPR10_LINI1_INT_R_SHIFT        (16u)
+#define INTC_ICDISPR10_LINI1_INT_S_SHIFT        (17u)
+#define INTC_ICDISPR10_LINI1_INT_M_SHIFT        (18u)
+#define INTC_ICDISPR10_ERI0_SHIFT               (27u)
+#define INTC_ICDISPR10_RXI0_SHIFT               (28u)
+#define INTC_ICDISPR10_TXI0_SHIFT               (29u)
+#define INTC_ICDISPR10_TEI0_SHIFT               (30u)
+#define INTC_ICDISPR10_ERI1_SHIFT               (31u)
+
+#define INTC_ICDISPR11_RXI1_SHIFT               (0u)
+#define INTC_ICDISPR11_TXI1_SHIFT               (1u)
+#define INTC_ICDISPR11_TEI1_SHIFT               (2u)
+#define INTC_ICDISPR11_AVBI_DATA_SHIFT          (3u)
+#define INTC_ICDISPR11_AVBI_ERROR_SHIFT         (4u)
+#define INTC_ICDISPR11_AVBI_MANAGE_SHIFT        (5u)
+#define INTC_ICDISPR11_AVBI_MAC_SHIFT           (6u)
+#define INTC_ICDISPR11_ETHERI_SHIFT             (7u)
+#define INTC_ICDISPR11_CEUI_SHIFT               (12u)
+#define INTC_ICDISPR11_H2XMLB_ERRINT_SHIFT      (29u)
+#define INTC_ICDISPR11_H2XIC1_ERRINT_SHIFT      (30u)
+#define INTC_ICDISPR11_X2HPERI1_ERRINT_SHIFT    (31u)
+
+#define INTC_ICDISPR12_X2HPERI2_ERRINT_SHIFT    (0u)
+#define INTC_ICDISPR12_X2HPERI34_ERRINT_SHIFT   (1u)
+#define INTC_ICDISPR12_X2HPERI5_ERRINT_SHIFT    (2u)
+#define INTC_ICDISPR12_X2HPERI67_ERRINT_SHIFT   (3u)
+#define INTC_ICDISPR12_X2HDBGR_ERRINT_SHIFT     (4u)
+#define INTC_ICDISPR12_X2HBSC_ERRINT_SHIFT      (5u)
+#define INTC_ICDISPR12_X2HSPI1_ERRINT_SHIFT     (6u)
+#define INTC_ICDISPR12_X2HSPI2_ERRINT_SHIFT     (7u)
+#define INTC_ICDISPR12_PRRI_SHIFT               (8u)
+#define INTC_ICDISPR12_IFEI0_SHIFT              (9u)
+#define INTC_ICDISPR12_OFFI0_SHIFT              (10u)
+#define INTC_ICDISPR12_PFVEI0_SHIFT             (11u)
+#define INTC_ICDISPR12_IFEI1_SHIFT              (12u)
+#define INTC_ICDISPR12_OFFI1_SHIFT              (13u)
+#define INTC_ICDISPR12_PFVEI1_SHIFT             (14u)
+
+#define INTC_ICDISPR13_TINT0_SHIFT              (0u)
+#define INTC_ICDISPR13_TINT1_SHIFT              (1u)
+#define INTC_ICDISPR13_TINT2_SHIFT              (2u)
+#define INTC_ICDISPR13_TINT3_SHIFT              (3u)
+#define INTC_ICDISPR13_TINT4_SHIFT              (4u)
+#define INTC_ICDISPR13_TINT5_SHIFT              (5u)
+#define INTC_ICDISPR13_TINT6_SHIFT              (6u)
+#define INTC_ICDISPR13_TINT7_SHIFT              (7u)
+#define INTC_ICDISPR13_TINT8_SHIFT              (8u)
+#define INTC_ICDISPR13_TINT9_SHIFT              (9u)
+#define INTC_ICDISPR13_TINT10_SHIFT             (10u)
+#define INTC_ICDISPR13_TINT11_SHIFT             (11u)
+#define INTC_ICDISPR13_TINT12_SHIFT             (12u)
+#define INTC_ICDISPR13_TINT13_SHIFT             (13u)
+#define INTC_ICDISPR13_TINT14_SHIFT             (14u)
+#define INTC_ICDISPR13_TINT15_SHIFT             (15u)
+#define INTC_ICDISPR13_TINT16_SHIFT             (16u)
+#define INTC_ICDISPR13_TINT17_SHIFT             (17u)
+#define INTC_ICDISPR13_TINT18_SHIFT             (18u)
+#define INTC_ICDISPR13_TINT19_SHIFT             (19u)
+#define INTC_ICDISPR13_TINT20_SHIFT             (20u)
+#define INTC_ICDISPR13_TINT21_SHIFT             (21u)
+#define INTC_ICDISPR13_TINT22_SHIFT             (22u)
+#define INTC_ICDISPR13_TINT23_SHIFT             (23u)
+#define INTC_ICDISPR13_TINT24_SHIFT             (24u)
+#define INTC_ICDISPR13_TINT25_SHIFT             (25u)
+#define INTC_ICDISPR13_TINT26_SHIFT             (26u)
+#define INTC_ICDISPR13_TINT27_SHIFT             (27u)
+#define INTC_ICDISPR13_TINT28_SHIFT             (28u)
+#define INTC_ICDISPR13_TINT29_SHIFT             (29u)
+#define INTC_ICDISPR13_TINT30_SHIFT             (30u)
+#define INTC_ICDISPR13_TINT31_SHIFT             (31u)
+
+#define INTC_ICDISPR14_TINT32_SHIFT             (0u)
+#define INTC_ICDISPR14_TINT33_SHIFT             (1u)
+#define INTC_ICDISPR14_TINT34_SHIFT             (2u)
+#define INTC_ICDISPR14_TINT35_SHIFT             (3u)
+#define INTC_ICDISPR14_TINT36_SHIFT             (4u)
+#define INTC_ICDISPR14_TINT37_SHIFT             (5u)
+#define INTC_ICDISPR14_TINT38_SHIFT             (6u)
+#define INTC_ICDISPR14_TINT39_SHIFT             (7u)
+#define INTC_ICDISPR14_TINT40_SHIFT             (8u)
+#define INTC_ICDISPR14_TINT41_SHIFT             (9u)
+#define INTC_ICDISPR14_TINT42_SHIFT             (10u)
+#define INTC_ICDISPR14_TINT43_SHIFT             (11u)
+#define INTC_ICDISPR14_TINT44_SHIFT             (12u)
+#define INTC_ICDISPR14_TINT45_SHIFT             (13u)
+#define INTC_ICDISPR14_TINT46_SHIFT             (14u)
+#define INTC_ICDISPR14_TINT47_SHIFT             (15u)
+#define INTC_ICDISPR14_TINT48_SHIFT             (16u)
+#define INTC_ICDISPR14_TINT49_SHIFT             (17u)
+#define INTC_ICDISPR14_TINT50_SHIFT             (18u)
+#define INTC_ICDISPR14_TINT51_SHIFT             (19u)
+#define INTC_ICDISPR14_TINT52_SHIFT             (20u)
+#define INTC_ICDISPR14_TINT53_SHIFT             (21u)
+#define INTC_ICDISPR14_TINT54_SHIFT             (22u)
+#define INTC_ICDISPR14_TINT55_SHIFT             (23u)
+#define INTC_ICDISPR14_TINT56_SHIFT             (24u)
+#define INTC_ICDISPR14_TINT57_SHIFT             (25u)
+#define INTC_ICDISPR14_TINT58_SHIFT             (26u)
+#define INTC_ICDISPR14_TINT59_SHIFT             (27u)
+#define INTC_ICDISPR14_TINT60_SHIFT             (28u)
+#define INTC_ICDISPR14_TINT61_SHIFT             (29u)
+#define INTC_ICDISPR14_TINT62_SHIFT             (30u)
+#define INTC_ICDISPR14_TINT63_SHIFT             (31u)
+
+#define INTC_ICDISPR15_TINT64_SHIFT             (0u)
+#define INTC_ICDISPR15_TINT65_SHIFT             (1u)
+#define INTC_ICDISPR15_TINT66_SHIFT             (2u)
+#define INTC_ICDISPR15_TINT67_SHIFT             (3u)
+#define INTC_ICDISPR15_TINT68_SHIFT             (4u)
+#define INTC_ICDISPR15_TINT69_SHIFT             (5u)
+#define INTC_ICDISPR15_TINT70_SHIFT             (6u)
+#define INTC_ICDISPR15_TINT71_SHIFT             (7u)
+#define INTC_ICDISPR15_TINT72_SHIFT             (8u)
+#define INTC_ICDISPR15_TINT73_SHIFT             (9u)
+#define INTC_ICDISPR15_TINT74_SHIFT             (10u)
+#define INTC_ICDISPR15_TINT75_SHIFT             (11u)
+#define INTC_ICDISPR15_TINT76_SHIFT             (12u)
+#define INTC_ICDISPR15_TINT77_SHIFT             (13u)
+#define INTC_ICDISPR15_TINT78_SHIFT             (14u)
+#define INTC_ICDISPR15_TINT79_SHIFT             (15u)
+#define INTC_ICDISPR15_TINT80_SHIFT             (16u)
+#define INTC_ICDISPR15_TINT81_SHIFT             (17u)
+#define INTC_ICDISPR15_TINT82_SHIFT             (18u)
+#define INTC_ICDISPR15_TINT83_SHIFT             (19u)
+#define INTC_ICDISPR15_TINT84_SHIFT             (20u)
+#define INTC_ICDISPR15_TINT85_SHIFT             (21u)
+#define INTC_ICDISPR15_TINT86_SHIFT             (22u)
+#define INTC_ICDISPR15_TINT87_SHIFT             (23u)
+#define INTC_ICDISPR15_TINT88_SHIFT             (24u)
+#define INTC_ICDISPR15_TINT89_SHIFT             (25u)
+#define INTC_ICDISPR15_TINT90_SHIFT             (26u)
+#define INTC_ICDISPR15_TINT91_SHIFT             (27u)
+#define INTC_ICDISPR15_TINT92_SHIFT             (28u)
+#define INTC_ICDISPR15_TINT93_SHIFT             (29u)
+#define INTC_ICDISPR15_TINT94_SHIFT             (30u)
+#define INTC_ICDISPR15_TINT95_SHIFT             (31u)
+
+#define INTC_ICDISPR16_TINT96_SHIFT             (0u)
+#define INTC_ICDISPR16_TINT97_SHIFT             (1u)
+#define INTC_ICDISPR16_TINT98_SHIFT             (2u)
+#define INTC_ICDISPR16_TINT99_SHIFT             (3u)
+#define INTC_ICDISPR16_TINT100_SHIFT            (4u)
+#define INTC_ICDISPR16_TINT101_SHIFT            (5u)
+#define INTC_ICDISPR16_TINT102_SHIFT            (6u)
+#define INTC_ICDISPR16_TINT103_SHIFT            (7u)
+#define INTC_ICDISPR16_TINT104_SHIFT            (8u)
+#define INTC_ICDISPR16_TINT105_SHIFT            (9u)
+#define INTC_ICDISPR16_TINT106_SHIFT            (10u)
+#define INTC_ICDISPR16_TINT107_SHIFT            (11u)
+#define INTC_ICDISPR16_TINT108_SHIFT            (12u)
+#define INTC_ICDISPR16_TINT109_SHIFT            (13u)
+#define INTC_ICDISPR16_TINT110_SHIFT            (14u)
+#define INTC_ICDISPR16_TINT111_SHIFT            (15u)
+#define INTC_ICDISPR16_TINT112_SHIFT            (16u)
+#define INTC_ICDISPR16_TINT113_SHIFT            (17u)
+#define INTC_ICDISPR16_TINT114_SHIFT            (18u)
+#define INTC_ICDISPR16_TINT115_SHIFT            (19u)
+#define INTC_ICDISPR16_TINT116_SHIFT            (20u)
+#define INTC_ICDISPR16_TINT117_SHIFT            (21u)
+#define INTC_ICDISPR16_TINT118_SHIFT            (22u)
+#define INTC_ICDISPR16_TINT119_SHIFT            (23u)
+#define INTC_ICDISPR16_TINT120_SHIFT            (24u)
+#define INTC_ICDISPR16_TINT121_SHIFT            (25u)
+#define INTC_ICDISPR16_TINT122_SHIFT            (26u)
+#define INTC_ICDISPR16_TINT123_SHIFT            (27u)
+#define INTC_ICDISPR16_TINT124_SHIFT            (28u)
+#define INTC_ICDISPR16_TINT125_SHIFT            (29u)
+#define INTC_ICDISPR16_TINT126_SHIFT            (30u)
+#define INTC_ICDISPR16_TINT127_SHIFT            (31u)
+
+#define INTC_ICDISPR17_TINT128_SHIFT            (0u)
+#define INTC_ICDISPR17_TINT129_SHIFT            (1u)
+#define INTC_ICDISPR17_TINT130_SHIFT            (2u)
+#define INTC_ICDISPR17_TINT131_SHIFT            (3u)
+#define INTC_ICDISPR17_TINT132_SHIFT            (4u)
+#define INTC_ICDISPR17_TINT133_SHIFT            (5u)
+#define INTC_ICDISPR17_TINT134_SHIFT            (6u)
+#define INTC_ICDISPR17_TINT135_SHIFT            (7u)
+#define INTC_ICDISPR17_TINT136_SHIFT            (8u)
+#define INTC_ICDISPR17_TINT137_SHIFT            (9u)
+#define INTC_ICDISPR17_TINT138_SHIFT            (10u)
+#define INTC_ICDISPR17_TINT139_SHIFT            (11u)
+#define INTC_ICDISPR17_TINT140_SHIFT            (12u)
+#define INTC_ICDISPR17_TINT141_SHIFT            (13u)
+#define INTC_ICDISPR17_TINT142_SHIFT            (14u)
+#define INTC_ICDISPR17_TINT143_SHIFT            (15u)
+#define INTC_ICDISPR17_TINT144_SHIFT            (16u)
+#define INTC_ICDISPR17_TINT145_SHIFT            (17u)
+#define INTC_ICDISPR17_TINT146_SHIFT            (18u)
+#define INTC_ICDISPR17_TINT147_SHIFT            (19u)
+#define INTC_ICDISPR17_TINT148_SHIFT            (20u)
+#define INTC_ICDISPR17_TINT149_SHIFT            (21u)
+#define INTC_ICDISPR17_TINT150_SHIFT            (22u)
+#define INTC_ICDISPR17_TINT151_SHIFT            (23u)
+#define INTC_ICDISPR17_TINT152_SHIFT            (24u)
+#define INTC_ICDISPR17_TINT153_SHIFT            (25u)
+#define INTC_ICDISPR17_TINT154_SHIFT            (26u)
+#define INTC_ICDISPR17_TINT155_SHIFT            (27u)
+#define INTC_ICDISPR17_TINT156_SHIFT            (28u)
+#define INTC_ICDISPR17_TINT157_SHIFT            (29u)
+#define INTC_ICDISPR17_TINT158_SHIFT            (30u)
+#define INTC_ICDISPR17_TINT159_SHIFT            (31u)
+
+#define INTC_ICDISPR18_TINT160_SHIFT            (0u)
+#define INTC_ICDISPR18_TINT161_SHIFT            (1u)
+#define INTC_ICDISPR18_TINT162_SHIFT            (2u)
+#define INTC_ICDISPR18_TINT163_SHIFT            (3u)
+#define INTC_ICDISPR18_TINT164_SHIFT            (4u)
+#define INTC_ICDISPR18_TINT165_SHIFT            (5u)
+#define INTC_ICDISPR18_TINT166_SHIFT            (6u)
+#define INTC_ICDISPR18_TINT167_SHIFT            (7u)
+#define INTC_ICDISPR18_TINT168_SHIFT            (8u)
+#define INTC_ICDISPR18_TINT169_SHIFT            (9u)
+#define INTC_ICDISPR18_TINT170_SHIFT            (10u)
+
+#define INTC_ICDICPR0_SW0_SHIFT                 (0u)
+#define INTC_ICDICPR0_SW1_SHIFT                 (1u)
+#define INTC_ICDICPR0_SW2_SHIFT                 (2u)
+#define INTC_ICDICPR0_SW3_SHIFT                 (3u)
+#define INTC_ICDICPR0_SW4_SHIFT                 (4u)
+#define INTC_ICDICPR0_SW5_SHIFT                 (5u)
+#define INTC_ICDICPR0_SW6_SHIFT                 (6u)
+#define INTC_ICDICPR0_SW7_SHIFT                 (7u)
+#define INTC_ICDICPR0_SW8_SHIFT                 (8u)
+#define INTC_ICDICPR0_SW9_SHIFT                 (9u)
+#define INTC_ICDICPR0_SW10_SHIFT                (10u)
+#define INTC_ICDICPR0_SW11_SHIFT                (11u)
+#define INTC_ICDICPR0_SW12_SHIFT                (12u)
+#define INTC_ICDICPR0_SW13_SHIFT                (13u)
+#define INTC_ICDICPR0_SW14_SHIFT                (14u)
+#define INTC_ICDICPR0_SW15_SHIFT                (15u)
+#define INTC_ICDICPR0_PMUIRQ0_SHIFT             (16u)
+#define INTC_ICDICPR0_COMMRX0_SHIFT             (17u)
+#define INTC_ICDICPR0_COMMTX0_SHIFT             (18u)
+#define INTC_ICDICPR0_CTIIRQ0_SHIFT             (19u)
+
+#define INTC_ICDICPR1_IRQ0_SHIFT                (0u)
+#define INTC_ICDICPR1_IRQ1_SHIFT                (1u)
+#define INTC_ICDICPR1_IRQ2_SHIFT                (2u)
+#define INTC_ICDICPR1_IRQ3_SHIFT                (3u)
+#define INTC_ICDICPR1_IRQ4_SHIFT                (4u)
+#define INTC_ICDICPR1_IRQ5_SHIFT                (5u)
+#define INTC_ICDICPR1_IRQ6_SHIFT                (6u)
+#define INTC_ICDICPR1_IRQ7_SHIFT                (7u)
+#define INTC_ICDICPR1_PL310ERR_SHIFT            (8u)
+#define INTC_ICDICPR1_DMAINT0_SHIFT             (9u)
+#define INTC_ICDICPR1_DMAINT1_SHIFT             (10u)
+#define INTC_ICDICPR1_DMAINT2_SHIFT             (11u)
+#define INTC_ICDICPR1_DMAINT3_SHIFT             (12u)
+#define INTC_ICDICPR1_DMAINT4_SHIFT             (13u)
+#define INTC_ICDICPR1_DMAINT5_SHIFT             (14u)
+#define INTC_ICDICPR1_DMAINT6_SHIFT             (15u)
+#define INTC_ICDICPR1_DMAINT7_SHIFT             (16u)
+#define INTC_ICDICPR1_DMAINT8_SHIFT             (17u)
+#define INTC_ICDICPR1_DMAINT9_SHIFT             (18u)
+#define INTC_ICDICPR1_DMAINT10_SHIFT            (19u)
+#define INTC_ICDICPR1_DMAINT11_SHIFT            (20u)
+#define INTC_ICDICPR1_DMAINT12_SHIFT            (21u)
+#define INTC_ICDICPR1_DMAINT13_SHIFT            (22u)
+#define INTC_ICDICPR1_DMAINT14_SHIFT            (23u)
+#define INTC_ICDICPR1_DMAINT15_SHIFT            (24u)
+#define INTC_ICDICPR1_DMAERR_SHIFT              (25u)
+
+#define INTC_ICDICPR2_USBI0_SHIFT               (9u)
+#define INTC_ICDICPR2_USBI1_SHIFT               (10u)
+#define INTC_ICDICPR2_S0_VI_VSYNC0_SHIFT        (11u)
+#define INTC_ICDICPR2_S0_LO_VSYNC0_SHIFT        (12u)
+#define INTC_ICDICPR2_S0_VSYNCERR0_SHIFT        (13u)
+#define INTC_ICDICPR2_GR3_VLINE0_SHIFT          (14u)
+#define INTC_ICDICPR2_S0_VFIELD0_SHIFT          (15u)
+#define INTC_ICDICPR2_IV1_VBUFERR0_SHIFT        (16u)
+#define INTC_ICDICPR2_IV3_VBUFERR0_SHIFT        (17u)
+#define INTC_ICDICPR2_IV5_VBUFERR0_SHIFT        (18u)
+#define INTC_ICDICPR2_IV6_VBUFERR0_SHIFT        (19u)
+#define INTC_ICDICPR2_S0_WLINE0_SHIFT           (20u)
+#define INTC_ICDICPR2_S1_VI_VSYNC0_SHIFT        (21u)
+#define INTC_ICDICPR2_S1_LO_VSYNC0_SHIFT        (22u)
+#define INTC_ICDICPR2_S1_VSYNCERR0_SHIFT        (23u)
+#define INTC_ICDICPR2_S1_VFIELD0_SHIFT          (24u)
+#define INTC_ICDICPR2_IV2_VBUFERR0_SHIFT        (25u)
+#define INTC_ICDICPR2_IV4_VBUFERR0_SHIFT        (26u)
+#define INTC_ICDICPR2_S1_WLINE0_SHIFT           (27u)
+#define INTC_ICDICPR2_OIR_VI_VSYNC0_SHIFT       (28u)
+#define INTC_ICDICPR2_OIR_LO_VSYNC0_SHIFT       (29u)
+#define INTC_ICDICPR2_OIR_VSYNCERR0_SHIFT       (30u)
+#define INTC_ICDICPR2_OIR_VFIELD0_SHIFT         (31u)
+
+#define INTC_ICDICPR3_IV7_VBUFERR0_SHIFT        (0u)
+#define INTC_ICDICPR3_IV8_VBUFERR0_SHIFT        (1u)
+#define INTC_ICDICPR3_S0_VI_VSYNC1_SHIFT        (3u)
+#define INTC_ICDICPR3_S0_LO_VSYNC1_SHIFT        (4u)
+#define INTC_ICDICPR3_S0_VSYNCERR1_SHIFT        (5u)
+#define INTC_ICDICPR3_GR3_VLINE1_SHIFT          (6u)
+#define INTC_ICDICPR3_S0_VFIELD1_SHIFT          (7u)
+#define INTC_ICDICPR3_IV1_VBUFERR1_SHIFT        (8u)
+#define INTC_ICDICPR3_IV3_VBUFERR1_SHIFT        (9u)
+#define INTC_ICDICPR3_IV5_VBUFERR1_SHIFT        (10u)
+#define INTC_ICDICPR3_IV6_VBUFERR1_SHIFT        (11u)
+#define INTC_ICDICPR3_S0_WLINE1_SHIFT           (12u)
+#define INTC_ICDICPR3_S1_VI_VSYNC1_SHIFT        (13u)
+#define INTC_ICDICPR3_S1_LO_VSYNC1_SHIFT        (14u)
+#define INTC_ICDICPR3_S1_VSYNCERR1_SHIFT        (15u)
+#define INTC_ICDICPR3_S1_VFIELD1_SHIFT          (16u)
+#define INTC_ICDICPR3_IV2_VBUFERR1_SHIFT        (17u)
+#define INTC_ICDICPR3_IV4_VBUFERR1_SHIFT        (18u)
+#define INTC_ICDICPR3_S1_WLINE1_SHIFT           (19u)
+#define INTC_ICDICPR3_OIR_VI_VSYNC1_SHIFT       (20u)
+#define INTC_ICDICPR3_OIR_LO_VSYNC1_SHIFT       (21u)
+#define INTC_ICDICPR3_OIR_VLINE1_SHIFT          (22u)
+#define INTC_ICDICPR3_OIR_VFIELD1_SHIFT         (23u)
+#define INTC_ICDICPR3_IV7_VBUFERR1_SHIFT        (24u)
+#define INTC_ICDICPR3_IV8_VBUFERR1_SHIFT        (25u)
+#define INTC_ICDICPR3_IMRDI_SHIFT               (27u)
+#define INTC_ICDICPR3_IMR2I0_SHIFT              (28u)
+#define INTC_ICDICPR3_IMR2I1_SHIFT              (29u)
+#define INTC_ICDICPR3_JEDI_SHIFT                (30u)
+#define INTC_ICDICPR3_JDTI_SHIFT                (31u)
+
+#define INTC_ICDICPR4_CMP0_SHIFT                (0u)
+#define INTC_ICDICPR4_CMP1_SHIFT                (1u)
+#define INTC_ICDICPR4_INT0_SHIFT                (2u)
+#define INTC_ICDICPR4_INT1_SHIFT                (3u)
+#define INTC_ICDICPR4_INT2_SHIFT                (4u)
+#define INTC_ICDICPR4_INT3_SHIFT                (5u)
+#define INTC_ICDICPR4_OSTM0TINT_SHIFT           (6u)
+#define INTC_ICDICPR4_OSTM1TINT_SHIFT           (7u)
+#define INTC_ICDICPR4_CMI_SHIFT                 (8u)
+#define INTC_ICDICPR4_WTOUT_SHIFT               (9u)
+#define INTC_ICDICPR4_ITI_SHIFT                 (10u)
+#define INTC_ICDICPR4_TGI0A_SHIFT               (11u)
+#define INTC_ICDICPR4_TGI0B_SHIFT               (12u)
+#define INTC_ICDICPR4_TGI0C_SHIFT               (13u)
+#define INTC_ICDICPR4_TGI0D_SHIFT               (14u)
+#define INTC_ICDICPR4_TGI0V_SHIFT               (15u)
+#define INTC_ICDICPR4_TGI0E_SHIFT               (16u)
+#define INTC_ICDICPR4_TGI0F_SHIFT               (17u)
+#define INTC_ICDICPR4_TGI1A_SHIFT               (18u)
+#define INTC_ICDICPR4_TGI1B_SHIFT               (19u)
+#define INTC_ICDICPR4_TGI1V_SHIFT               (20u)
+#define INTC_ICDICPR4_TGI1U_SHIFT               (21u)
+#define INTC_ICDICPR4_TGI2A_SHIFT               (22u)
+#define INTC_ICDICPR4_TGI2B_SHIFT               (23u)
+#define INTC_ICDICPR4_TGI2V_SHIFT               (24u)
+#define INTC_ICDICPR4_TGI2U_SHIFT               (25u)
+#define INTC_ICDICPR4_TGI3A_SHIFT               (26u)
+#define INTC_ICDICPR4_TGI3B_SHIFT               (27u)
+#define INTC_ICDICPR4_TGI3C_SHIFT               (28u)
+#define INTC_ICDICPR4_TGI3D_SHIFT               (29u)
+#define INTC_ICDICPR4_TGI3V_SHIFT               (30u)
+#define INTC_ICDICPR4_TGI4A_SHIFT               (31u)
+
+#define INTC_ICDICPR5_TGI4B_SHIFT               (0u)
+#define INTC_ICDICPR5_TGI4C_SHIFT               (1u)
+#define INTC_ICDICPR5_TGI4D_SHIFT               (2u)
+#define INTC_ICDICPR5_TGI4V_SHIFT               (3u)
+#define INTC_ICDICPR5_CMI1_SHIFT                (4u)
+#define INTC_ICDICPR5_CMI2_SHIFT                (5u)
+#define INTC_ICDICPR5_SGDEI0_SHIFT              (6u)
+#define INTC_ICDICPR5_SGDEI1_SHIFT              (7u)
+#define INTC_ICDICPR5_SGDEI2_SHIFT              (8u)
+#define INTC_ICDICPR5_SGDEI3_SHIFT              (9u)
+#define INTC_ICDICPR5_ADI_SHIFT                 (10u)
+#define INTC_ICDICPR5_LMTI_SHIFT                (11u)
+#define INTC_ICDICPR5_SSII0_SHIFT               (12u)
+#define INTC_ICDICPR5_SSIRXI0_SHIFT             (13u)
+#define INTC_ICDICPR5_SSITXI0_SHIFT             (14u)
+#define INTC_ICDICPR5_SSII1_SHIFT               (15u)
+#define INTC_ICDICPR5_SSIRXI1_SHIFT             (16u)
+#define INTC_ICDICPR5_SSITXI1_SHIFT             (17u)
+#define INTC_ICDICPR5_SSII2_SHIFT               (18u)
+#define INTC_ICDICPR5_SSIRTI2_SHIFT             (19u)
+#define INTC_ICDICPR5_SSII3_SHIFT               (20u)
+#define INTC_ICDICPR5_SSIRXI3_SHIFT             (21u)
+#define INTC_ICDICPR5_SSITXI3_SHIFT             (22u)
+#define INTC_ICDICPR5_SSII4_SHIFT               (23u)
+#define INTC_ICDICPR5_SSIRTI4_SHIFT             (24u)
+#define INTC_ICDICPR5_SSII5_SHIFT               (25u)
+#define INTC_ICDICPR5_SSIRXI5_SHIFT             (26u)
+#define INTC_ICDICPR5_SSITXI5_SHIFT             (27u)
+#define INTC_ICDICPR5_SPDIFI_SHIFT              (28u)
+#define INTC_ICDICPR5_INTIICTEI0_SHIFT          (29u)
+#define INTC_ICDICPR5_INTIICRI0_SHIFT           (30u)
+#define INTC_ICDICPR5_INTIICTI0_SHIFT           (31u)
+
+#define INTC_ICDICPR6_INTIICSPI0_SHIFT          (0u)
+#define INTC_ICDICPR6_INTIICSTI0_SHIFT          (1u)
+#define INTC_ICDICPR6_INTIICNAKI0_SHIFT         (2u)
+#define INTC_ICDICPR6_INTIICALI0_SHIFT          (3u)
+#define INTC_ICDICPR6_INTIICTMOI0_SHIFT         (4u)
+#define INTC_ICDICPR6_INTIICTEI1_SHIFT          (5u)
+#define INTC_ICDICPR6_INTIICRI1_SHIFT           (6u)
+#define INTC_ICDICPR6_INTIICTI1_SHIFT           (7u)
+#define INTC_ICDICPR6_INTIICSPI1_SHIFT          (8u)
+#define INTC_ICDICPR6_INTIICSTI1_SHIFT          (9u)
+#define INTC_ICDICPR6_INTIICNAKI1_SHIFT         (10u)
+#define INTC_ICDICPR6_INTIICALI1_SHIFT          (11u)
+#define INTC_ICDICPR6_INTIICTMOI1_SHIFT         (12u)
+#define INTC_ICDICPR6_INTIICTEI2_SHIFT          (13u)
+#define INTC_ICDICPR6_INTIICRI2_SHIFT           (14u)
+#define INTC_ICDICPR6_INTIICTI2_SHIFT           (15u)
+#define INTC_ICDICPR6_INTIICSPI2_SHIFT          (16u)
+#define INTC_ICDICPR6_INTIICSTI2_SHIFT          (17u)
+#define INTC_ICDICPR6_INTIICNAKI2_SHIFT         (18u)
+#define INTC_ICDICPR6_INTIICALI2_SHIFT          (19u)
+#define INTC_ICDICPR6_INTIICTMOI2_SHIFT         (20u)
+#define INTC_ICDICPR6_INTIICTEI3_SHIFT          (21u)
+#define INTC_ICDICPR6_INTIICRI3_SHIFT           (22u)
+#define INTC_ICDICPR6_INTIICTI3_SHIFT           (23u)
+#define INTC_ICDICPR6_INTIICSPI3_SHIFT          (24u)
+#define INTC_ICDICPR6_INTIICSTI3_SHIFT          (25u)
+#define INTC_ICDICPR6_INTIICNAKI3_SHIFT         (26u)
+#define INTC_ICDICPR6_INTIICALI3_SHIFT          (27u)
+#define INTC_ICDICPR6_INTIICTMOI3_SHIFT         (28u)
+#define INTC_ICDICPR6_BRI0_SHIFT                (29u)
+#define INTC_ICDICPR6_ERI0_SHIFT                (30u)
+#define INTC_ICDICPR6_RXI0_SHIFT                (31u)
+
+#define INTC_ICDICPR7_TXI0_SHIFT                (0u)
+#define INTC_ICDICPR7_BRI1_SHIFT                (1u)
+#define INTC_ICDICPR7_ERI1_SHIFT                (2u)
+#define INTC_ICDICPR7_RXI1_SHIFT                (3u)
+#define INTC_ICDICPR7_TXI1_SHIFT                (4u)
+#define INTC_ICDICPR7_BRI2_SHIFT                (5u)
+#define INTC_ICDICPR7_ERI2_SHIFT                (6u)
+#define INTC_ICDICPR7_RXI2_SHIFT                (7u)
+#define INTC_ICDICPR7_TXI2_SHIFT                (8u)
+#define INTC_ICDICPR7_BRI3_SHIFT                (9u)
+#define INTC_ICDICPR7_ERI3_SHIFT                (10u)
+#define INTC_ICDICPR7_RXI3_SHIFT                (11u)
+#define INTC_ICDICPR7_TXI3_SHIFT                (12u)
+#define INTC_ICDICPR7_BRI4_SHIFT                (13u)
+#define INTC_ICDICPR7_ERI4_SHIFT                (14u)
+#define INTC_ICDICPR7_RXI4_SHIFT                (15u)
+#define INTC_ICDICPR7_TXI4_SHIFT                (16u)
+#define INTC_ICDICPR7_BRI5_SHIFT                (17u)
+#define INTC_ICDICPR7_ERI5_SHIFT                (18u)
+#define INTC_ICDICPR7_RXI5_SHIFT                (19u)
+#define INTC_ICDICPR7_TXI5_SHIFT                (20u)
+#define INTC_ICDICPR7_BRI6_SHIFT                (21u)
+#define INTC_ICDICPR7_ERI6_SHIFT                (22u)
+#define INTC_ICDICPR7_RXI6_SHIFT                (23u)
+#define INTC_ICDICPR7_TXI6_SHIFT                (24u)
+#define INTC_ICDICPR7_BRI7_SHIFT                (25u)
+#define INTC_ICDICPR7_ERI7_SHIFT                (26u)
+#define INTC_ICDICPR7_RXI7_SHIFT                (27u)
+#define INTC_ICDICPR7_TXI7_SHIFT                (28u)
+#define INTC_ICDICPR7_INTRCANGERR_SHIFT         (29u)
+#define INTC_ICDICPR7_INTRCANGRECC_SHIFT        (30u)
+#define INTC_ICDICPR7_INTRCAN0REC_SHIFT         (31u)
+
+#define INTC_ICDICPR8_INTRCAN0ERR_SHIFT         (0u)
+#define INTC_ICDICPR8_INTRCAN0TRX_SHIFT         (1u)
+#define INTC_ICDICPR8_INTRCAN1REC_SHIFT         (2u)
+#define INTC_ICDICPR8_INTRCAN1ERR_SHIFT         (3u)
+#define INTC_ICDICPR8_INTRCAN1TRX_SHIFT         (4u)
+#define INTC_ICDICPR8_INTRCAN2REC_SHIFT         (5u)
+#define INTC_ICDICPR8_INTRCAN2ERR_SHIFT         (6u)
+#define INTC_ICDICPR8_INTRCAN2TRX_SHIFT         (7u)
+#define INTC_ICDICPR8_INTRCAN3REC_SHIFT         (8u)
+#define INTC_ICDICPR8_INTRCAN3ERR_SHIFT         (9u)
+#define INTC_ICDICPR8_INTRCAN3TRX_SHIFT         (10u)
+#define INTC_ICDICPR8_INTRCAN4REC_SHIFT         (11u)
+#define INTC_ICDICPR8_INTRCAN4ERR_SHIFT         (12u)
+#define INTC_ICDICPR8_INTRCAN4TRX_SHIFT         (13u)
+#define INTC_ICDICPR8_SPEI0_SHIFT               (14u)
+#define INTC_ICDICPR8_SPRI0_SHIFT               (15u)
+#define INTC_ICDICPR8_SPTI0_SHIFT               (16u)
+#define INTC_ICDICPR8_SPEI1_SHIFT               (17u)
+#define INTC_ICDICPR8_SPRI1_SHIFT               (18u)
+#define INTC_ICDICPR8_SPTI1_SHIFT               (19u)
+#define INTC_ICDICPR8_SPEI2_SHIFT               (20u)
+#define INTC_ICDICPR8_SPRI2_SHIFT               (21u)
+#define INTC_ICDICPR8_SPTI2_SHIFT               (22u)
+#define INTC_ICDICPR8_SPEI3_SHIFT               (23u)
+#define INTC_ICDICPR8_SPRI3_SHIFT               (24u)
+#define INTC_ICDICPR8_SPTI3_SHIFT               (25u)
+#define INTC_ICDICPR8_SPEI4_SHIFT               (26u)
+#define INTC_ICDICPR8_SPRI4_SHIFT               (27u)
+#define INTC_ICDICPR8_SPTI4_SHIFT               (28u)
+#define INTC_ICDICPR8_IEBBTD_SHIFT              (29u)
+#define INTC_ICDICPR8_IEBBTERR_SHIFT            (30u)
+#define INTC_ICDICPR8_IEBBTSTA_SHIFT            (31u)
+
+#define INTC_ICDICPR9_IEBBTV_SHIFT              (0u)
+#define INTC_ICDICPR9_ISY_SHIFT                 (1u)
+#define INTC_ICDICPR9_IERR_SHIFT                (2u)
+#define INTC_ICDICPR9_ITARG_SHIFT               (3u)
+#define INTC_ICDICPR9_ISEC_SHIFT                (4u)
+#define INTC_ICDICPR9_IBUF_SHIFT                (5u)
+#define INTC_ICDICPR9_IREADY_SHIFT              (6u)
+#define INTC_ICDICPR9_FLSTE_SHIFT               (7u)
+#define INTC_ICDICPR9_FLTENDI_SHIFT             (8u)
+#define INTC_ICDICPR9_FLTREQ0I_SHIFT            (9u)
+#define INTC_ICDICPR9_FLTREQ1I_SHIFT            (10u)
+#define INTC_ICDICPR9_MMC0_SHIFT                (11u)
+#define INTC_ICDICPR9_MMC1_SHIFT                (12u)
+#define INTC_ICDICPR9_MMC2_SHIFT                (13u)
+#define INTC_ICDICPR9_SDHI0_3_SHIFT             (14u)
+#define INTC_ICDICPR9_SDHI0_0_SHIFT             (15u)
+#define INTC_ICDICPR9_SDHI0_1_SHIFT             (16u)
+#define INTC_ICDICPR9_SDHI1_3_SHIFT             (17u)
+#define INTC_ICDICPR9_SDHI1_0_SHIFT             (18u)
+#define INTC_ICDICPR9_SDHI1_1_SHIFT             (19u)
+#define INTC_ICDICPR9_ARM_SHIFT                 (20u)
+#define INTC_ICDICPR9_PRD_SHIFT                 (21u)
+#define INTC_ICDICPR9_CUP_SHIFT                 (22u)
+#define INTC_ICDICPR9_SCUAI0_SHIFT              (23u)
+#define INTC_ICDICPR9_SCUAI1_SHIFT              (24u)
+#define INTC_ICDICPR9_SCUFDI0_SHIFT             (25u)
+#define INTC_ICDICPR9_SCUFDI1_SHIFT             (26u)
+#define INTC_ICDICPR9_SCUFDI2_SHIFT             (27u)
+#define INTC_ICDICPR9_SCUFDI3_SHIFT             (28u)
+#define INTC_ICDICPR9_SCUFUI0_SHIFT             (29u)
+#define INTC_ICDICPR9_SCUFUI1_SHIFT             (30u)
+#define INTC_ICDICPR9_SCUFUI2_SHIFT             (31u)
+
+#define INTC_ICDICPR10_SCUFUI3_SHIFT            (0u)
+#define INTC_ICDICPR10_SCUDVI0_SHIFT            (1u)
+#define INTC_ICDICPR10_SCUDVI1_SHIFT            (2u)
+#define INTC_ICDICPR10_SCUDVI2_SHIFT            (3u)
+#define INTC_ICDICPR10_SCUDVI3_SHIFT            (4u)
+#define INTC_ICDICPR10_MLB_CINT_SHIFT           (5u)
+#define INTC_ICDICPR10_MLB_SINT_SHIFT           (6u)
+#define INTC_ICDICPR10_DRC0_SHIFT               (7u)
+#define INTC_ICDICPR10_DRC1_SHIFT               (8u)
+#define INTC_ICDICPR10_LINI0_INT_T_SHIFT        (11u)
+#define INTC_ICDICPR10_LINI0_INT_R_SHIFT        (12u)
+#define INTC_ICDICPR10_LINI0_INT_S_SHIFT        (13u)
+#define INTC_ICDICPR10_LINI0_INT_M_SHIFT        (14u)
+#define INTC_ICDICPR10_LINI1_INT_T_SHIFT        (15u)
+#define INTC_ICDICPR10_LINI1_INT_R_SHIFT        (16u)
+#define INTC_ICDICPR10_LINI1_INT_S_SHIFT        (17u)
+#define INTC_ICDICPR10_LINI1_INT_M_SHIFT        (18u)
+#define INTC_ICDICPR10_ERI0_SHIFT               (27u)
+#define INTC_ICDICPR10_RXI0_SHIFT               (28u)
+#define INTC_ICDICPR10_TXI0_SHIFT               (29u)
+#define INTC_ICDICPR10_TEI0_SHIFT               (30u)
+#define INTC_ICDICPR10_ERI1_SHIFT               (31u)
+
+#define INTC_ICDICPR11_RXI1_SHIFT               (0u)
+#define INTC_ICDICPR11_TXI1_SHIFT               (1u)
+#define INTC_ICDICPR11_TEI1_SHIFT               (2u)
+#define INTC_ICDICPR11_AVBI_DATA_SHIFT          (3u)
+#define INTC_ICDICPR11_AVBI_ERROR_SHIFT         (4u)
+#define INTC_ICDICPR11_AVBI_MANAGE_SHIFT        (5u)
+#define INTC_ICDICPR11_AVBI_MAC_SHIFT           (6u)
+#define INTC_ICDICPR11_ETHERI_SHIFT             (7u)
+#define INTC_ICDICPR11_CEUI_SHIFT               (12u)
+#define INTC_ICDICPR11_H2XMLB_ERRINT_SHIFT      (29u)
+#define INTC_ICDICPR11_H2XIC1_ERRINT_SHIFT      (30u)
+#define INTC_ICDICPR11_X2HPERI1_ERRINT_SHIFT    (31u)
+
+#define INTC_ICDICPR12_X2HPERI2_ERRINT_SHIFT    (0u)
+#define INTC_ICDICPR12_X2HPERI34_ERRINT_SHIFT   (1u)
+#define INTC_ICDICPR12_X2HPERI5_ERRINT_SHIFT    (2u)
+#define INTC_ICDICPR12_X2HPERI67_ERRINT_SHIFT   (3u)
+#define INTC_ICDICPR12_X2HDBGR_ERRINT_SHIFT     (4u)
+#define INTC_ICDICPR12_X2HBSC_ERRINT_SHIFT      (5u)
+#define INTC_ICDICPR12_X2HSPI1_ERRINT_SHIFT     (6u)
+#define INTC_ICDICPR12_X2HSPI2_ERRINT_SHIFT     (7u)
+#define INTC_ICDICPR12_PRRI_SHIFT               (8u)
+#define INTC_ICDICPR12_IFEI0_SHIFT              (9u)
+#define INTC_ICDICPR12_OFFI0_SHIFT              (10u)
+#define INTC_ICDICPR12_PFVEI0_SHIFT             (11u)
+#define INTC_ICDICPR12_IFEI1_SHIFT              (12u)
+#define INTC_ICDICPR12_OFFI1_SHIFT              (13u)
+#define INTC_ICDICPR12_PFVEI1_SHIFT             (14u)
+
+#define INTC_ICDICPR13_TINT0_SHIFT              (0u)
+#define INTC_ICDICPR13_TINT1_SHIFT              (1u)
+#define INTC_ICDICPR13_TINT2_SHIFT              (2u)
+#define INTC_ICDICPR13_TINT3_SHIFT              (3u)
+#define INTC_ICDICPR13_TINT4_SHIFT              (4u)
+#define INTC_ICDICPR13_TINT5_SHIFT              (5u)
+#define INTC_ICDICPR13_TINT6_SHIFT              (6u)
+#define INTC_ICDICPR13_TINT7_SHIFT              (7u)
+#define INTC_ICDICPR13_TINT8_SHIFT              (8u)
+#define INTC_ICDICPR13_TINT9_SHIFT              (9u)
+#define INTC_ICDICPR13_TINT10_SHIFT             (10u)
+#define INTC_ICDICPR13_TINT11_SHIFT             (11u)
+#define INTC_ICDICPR13_TINT12_SHIFT             (12u)
+#define INTC_ICDICPR13_TINT13_SHIFT             (13u)
+#define INTC_ICDICPR13_TINT14_SHIFT             (14u)
+#define INTC_ICDICPR13_TINT15_SHIFT             (15u)
+#define INTC_ICDICPR13_TINT16_SHIFT             (16u)
+#define INTC_ICDICPR13_TINT17_SHIFT             (17u)
+#define INTC_ICDICPR13_TINT18_SHIFT             (18u)
+#define INTC_ICDICPR13_TINT19_SHIFT             (19u)
+#define INTC_ICDICPR13_TINT20_SHIFT             (20u)
+#define INTC_ICDICPR13_TINT21_SHIFT             (21u)
+#define INTC_ICDICPR13_TINT22_SHIFT             (22u)
+#define INTC_ICDICPR13_TINT23_SHIFT             (23u)
+#define INTC_ICDICPR13_TINT24_SHIFT             (24u)
+#define INTC_ICDICPR13_TINT25_SHIFT             (25u)
+#define INTC_ICDICPR13_TINT26_SHIFT             (26u)
+#define INTC_ICDICPR13_TINT27_SHIFT             (27u)
+#define INTC_ICDICPR13_TINT28_SHIFT             (28u)
+#define INTC_ICDICPR13_TINT29_SHIFT             (29u)
+#define INTC_ICDICPR13_TINT30_SHIFT             (30u)
+#define INTC_ICDICPR13_TINT31_SHIFT             (31u)
+
+#define INTC_ICDICPR14_TINT32_SHIFT             (0u)
+#define INTC_ICDICPR14_TINT33_SHIFT             (1u)
+#define INTC_ICDICPR14_TINT34_SHIFT             (2u)
+#define INTC_ICDICPR14_TINT35_SHIFT             (3u)
+#define INTC_ICDICPR14_TINT36_SHIFT             (4u)
+#define INTC_ICDICPR14_TINT37_SHIFT             (5u)
+#define INTC_ICDICPR14_TINT38_SHIFT             (6u)
+#define INTC_ICDICPR14_TINT39_SHIFT             (7u)
+#define INTC_ICDICPR14_TINT40_SHIFT             (8u)
+#define INTC_ICDICPR14_TINT41_SHIFT             (9u)
+#define INTC_ICDICPR14_TINT42_SHIFT             (10u)
+#define INTC_ICDICPR14_TINT43_SHIFT             (11u)
+#define INTC_ICDICPR14_TINT44_SHIFT             (12u)
+#define INTC_ICDICPR14_TINT45_SHIFT             (13u)
+#define INTC_ICDICPR14_TINT46_SHIFT             (14u)
+#define INTC_ICDICPR14_TINT47_SHIFT             (15u)
+#define INTC_ICDICPR14_TINT48_SHIFT             (16u)
+#define INTC_ICDICPR14_TINT49_SHIFT             (17u)
+#define INTC_ICDICPR14_TINT50_SHIFT             (18u)
+#define INTC_ICDICPR14_TINT51_SHIFT             (19u)
+#define INTC_ICDICPR14_TINT52_SHIFT             (20u)
+#define INTC_ICDICPR14_TINT53_SHIFT             (21u)
+#define INTC_ICDICPR14_TINT54_SHIFT             (22u)
+#define INTC_ICDICPR14_TINT55_SHIFT             (23u)
+#define INTC_ICDICPR14_TINT56_SHIFT             (24u)
+#define INTC_ICDICPR14_TINT57_SHIFT             (25u)
+#define INTC_ICDICPR14_TINT58_SHIFT             (26u)
+#define INTC_ICDICPR14_TINT59_SHIFT             (27u)
+#define INTC_ICDICPR14_TINT60_SHIFT             (28u)
+#define INTC_ICDICPR14_TINT61_SHIFT             (29u)
+#define INTC_ICDICPR14_TINT62_SHIFT             (30u)
+#define INTC_ICDICPR14_TINT63_SHIFT             (31u)
+
+#define INTC_ICDICPR15_TINT64_SHIFT             (0u)
+#define INTC_ICDICPR15_TINT65_SHIFT             (1u)
+#define INTC_ICDICPR15_TINT66_SHIFT             (2u)
+#define INTC_ICDICPR15_TINT67_SHIFT             (3u)
+#define INTC_ICDICPR15_TINT68_SHIFT             (4u)
+#define INTC_ICDICPR15_TINT69_SHIFT             (5u)
+#define INTC_ICDICPR15_TINT70_SHIFT             (6u)
+#define INTC_ICDICPR15_TINT71_SHIFT             (7u)
+#define INTC_ICDICPR15_TINT72_SHIFT             (8u)
+#define INTC_ICDICPR15_TINT73_SHIFT             (9u)
+#define INTC_ICDICPR15_TINT74_SHIFT             (10u)
+#define INTC_ICDICPR15_TINT75_SHIFT             (11u)
+#define INTC_ICDICPR15_TINT76_SHIFT             (12u)
+#define INTC_ICDICPR15_TINT77_SHIFT             (13u)
+#define INTC_ICDICPR15_TINT78_SHIFT             (14u)
+#define INTC_ICDICPR15_TINT79_SHIFT             (15u)
+#define INTC_ICDICPR15_TINT80_SHIFT             (16u)
+#define INTC_ICDICPR15_TINT81_SHIFT             (17u)
+#define INTC_ICDICPR15_TINT82_SHIFT             (18u)
+#define INTC_ICDICPR15_TINT83_SHIFT             (19u)
+#define INTC_ICDICPR15_TINT84_SHIFT             (20u)
+#define INTC_ICDICPR15_TINT85_SHIFT             (21u)
+#define INTC_ICDICPR15_TINT86_SHIFT             (22u)
+#define INTC_ICDICPR15_TINT87_SHIFT             (23u)
+#define INTC_ICDICPR15_TINT88_SHIFT             (24u)
+#define INTC_ICDICPR15_TINT89_SHIFT             (25u)
+#define INTC_ICDICPR15_TINT90_SHIFT             (26u)
+#define INTC_ICDICPR15_TINT91_SHIFT             (27u)
+#define INTC_ICDICPR15_TINT92_SHIFT             (28u)
+#define INTC_ICDICPR15_TINT93_SHIFT             (29u)
+#define INTC_ICDICPR15_TINT94_SHIFT             (30u)
+#define INTC_ICDICPR15_TINT95_SHIFT             (31u)
+
+#define INTC_ICDICPR16_TINT96_SHIFT             (0u)
+#define INTC_ICDICPR16_TINT97_SHIFT             (1u)
+#define INTC_ICDICPR16_TINT98_SHIFT             (2u)
+#define INTC_ICDICPR16_TINT99_SHIFT             (3u)
+#define INTC_ICDICPR16_TINT100_SHIFT            (4u)
+#define INTC_ICDICPR16_TINT101_SHIFT            (5u)
+#define INTC_ICDICPR16_TINT102_SHIFT            (6u)
+#define INTC_ICDICPR16_TINT103_SHIFT            (7u)
+#define INTC_ICDICPR16_TINT104_SHIFT            (8u)
+#define INTC_ICDICPR16_TINT105_SHIFT            (9u)
+#define INTC_ICDICPR16_TINT106_SHIFT            (10u)
+#define INTC_ICDICPR16_TINT107_SHIFT            (11u)
+#define INTC_ICDICPR16_TINT108_SHIFT            (12u)
+#define INTC_ICDICPR16_TINT109_SHIFT            (13u)
+#define INTC_ICDICPR16_TINT110_SHIFT            (14u)
+#define INTC_ICDICPR16_TINT111_SHIFT            (15u)
+#define INTC_ICDICPR16_TINT112_SHIFT            (16u)
+#define INTC_ICDICPR16_TINT113_SHIFT            (17u)
+#define INTC_ICDICPR16_TINT114_SHIFT            (18u)
+#define INTC_ICDICPR16_TINT115_SHIFT            (19u)
+#define INTC_ICDICPR16_TINT116_SHIFT            (20u)
+#define INTC_ICDICPR16_TINT117_SHIFT            (21u)
+#define INTC_ICDICPR16_TINT118_SHIFT            (22u)
+#define INTC_ICDICPR16_TINT119_SHIFT            (23u)
+#define INTC_ICDICPR16_TINT120_SHIFT            (24u)
+#define INTC_ICDICPR16_TINT121_SHIFT            (25u)
+#define INTC_ICDICPR16_TINT122_SHIFT            (26u)
+#define INTC_ICDICPR16_TINT123_SHIFT            (27u)
+#define INTC_ICDICPR16_TINT124_SHIFT            (28u)
+#define INTC_ICDICPR16_TINT125_SHIFT            (29u)
+#define INTC_ICDICPR16_TINT126_SHIFT            (30u)
+#define INTC_ICDICPR16_TINT127_SHIFT            (31u)
+
+#define INTC_ICDICPR17_TINT128_SHIFT            (0u)
+#define INTC_ICDICPR17_TINT129_SHIFT            (1u)
+#define INTC_ICDICPR17_TINT130_SHIFT            (2u)
+#define INTC_ICDICPR17_TINT131_SHIFT            (3u)
+#define INTC_ICDICPR17_TINT132_SHIFT            (4u)
+#define INTC_ICDICPR17_TINT133_SHIFT            (5u)
+#define INTC_ICDICPR17_TINT134_SHIFT            (6u)
+#define INTC_ICDICPR17_TINT135_SHIFT            (7u)
+#define INTC_ICDICPR17_TINT136_SHIFT            (8u)
+#define INTC_ICDICPR17_TINT137_SHIFT            (9u)
+#define INTC_ICDICPR17_TINT138_SHIFT            (10u)
+#define INTC_ICDICPR17_TINT139_SHIFT            (11u)
+#define INTC_ICDICPR17_TINT140_SHIFT            (12u)
+#define INTC_ICDICPR17_TINT141_SHIFT            (13u)
+#define INTC_ICDICPR17_TINT142_SHIFT            (14u)
+#define INTC_ICDICPR17_TINT143_SHIFT            (15u)
+#define INTC_ICDICPR17_TINT144_SHIFT            (16u)
+#define INTC_ICDICPR17_TINT145_SHIFT            (17u)
+#define INTC_ICDICPR17_TINT146_SHIFT            (18u)
+#define INTC_ICDICPR17_TINT147_SHIFT            (19u)
+#define INTC_ICDICPR17_TINT148_SHIFT            (20u)
+#define INTC_ICDICPR17_TINT149_SHIFT            (21u)
+#define INTC_ICDICPR17_TINT150_SHIFT            (22u)
+#define INTC_ICDICPR17_TINT151_SHIFT            (23u)
+#define INTC_ICDICPR17_TINT152_SHIFT            (24u)
+#define INTC_ICDICPR17_TINT153_SHIFT            (25u)
+#define INTC_ICDICPR17_TINT154_SHIFT            (26u)
+#define INTC_ICDICPR17_TINT155_SHIFT            (27u)
+#define INTC_ICDICPR17_TINT156_SHIFT            (28u)
+#define INTC_ICDICPR17_TINT157_SHIFT            (29u)
+#define INTC_ICDICPR17_TINT158_SHIFT            (30u)
+#define INTC_ICDICPR17_TINT159_SHIFT            (31u)
+
+#define INTC_ICDICPR18_TINT160_SHIFT            (0u)
+#define INTC_ICDICPR18_TINT161_SHIFT            (1u)
+#define INTC_ICDICPR18_TINT162_SHIFT            (2u)
+#define INTC_ICDICPR18_TINT163_SHIFT            (3u)
+#define INTC_ICDICPR18_TINT164_SHIFT            (4u)
+#define INTC_ICDICPR18_TINT165_SHIFT            (5u)
+#define INTC_ICDICPR18_TINT166_SHIFT            (6u)
+#define INTC_ICDICPR18_TINT167_SHIFT            (7u)
+#define INTC_ICDICPR18_TINT168_SHIFT            (8u)
+#define INTC_ICDICPR18_TINT169_SHIFT            (9u)
+#define INTC_ICDICPR18_TINT170_SHIFT            (10u)
+
+#define INTC_ICDABR0_SW0_SHIFT                  (0u)
+#define INTC_ICDABR0_SW1_SHIFT                  (1u)
+#define INTC_ICDABR0_SW2_SHIFT                  (2u)
+#define INTC_ICDABR0_SW3_SHIFT                  (3u)
+#define INTC_ICDABR0_SW4_SHIFT                  (4u)
+#define INTC_ICDABR0_SW5_SHIFT                  (5u)
+#define INTC_ICDABR0_SW6_SHIFT                  (6u)
+#define INTC_ICDABR0_SW7_SHIFT                  (7u)
+#define INTC_ICDABR0_SW8_SHIFT                  (8u)
+#define INTC_ICDABR0_SW9_SHIFT                  (9u)
+#define INTC_ICDABR0_SW10_SHIFT                 (10u)
+#define INTC_ICDABR0_SW11_SHIFT                 (11u)
+#define INTC_ICDABR0_SW12_SHIFT                 (12u)
+#define INTC_ICDABR0_SW13_SHIFT                 (13u)
+#define INTC_ICDABR0_SW14_SHIFT                 (14u)
+#define INTC_ICDABR0_SW15_SHIFT                 (15u)
+#define INTC_ICDABR0_PMUIRQ0_SHIFT              (16u)
+#define INTC_ICDABR0_COMMRX0_SHIFT              (17u)
+#define INTC_ICDABR0_COMMTX0_SHIFT              (18u)
+#define INTC_ICDABR0_CTIIRQ0_SHIFT              (19u)
+
+#define INTC_ICDABR1_IRQ0_SHIFT                 (0u)
+#define INTC_ICDABR1_IRQ1_SHIFT                 (1u)
+#define INTC_ICDABR1_IRQ2_SHIFT                 (2u)
+#define INTC_ICDABR1_IRQ3_SHIFT                 (3u)
+#define INTC_ICDABR1_IRQ4_SHIFT                 (4u)
+#define INTC_ICDABR1_IRQ5_SHIFT                 (5u)
+#define INTC_ICDABR1_IRQ6_SHIFT                 (6u)
+#define INTC_ICDABR1_IRQ7_SHIFT                 (7u)
+#define INTC_ICDABR1_PL310ERR_SHIFT             (8u)
+#define INTC_ICDABR1_DMAINT0_SHIFT              (9u)
+#define INTC_ICDABR1_DMAINT1_SHIFT              (10u)
+#define INTC_ICDABR1_DMAINT2_SHIFT              (11u)
+#define INTC_ICDABR1_DMAINT3_SHIFT              (12u)
+#define INTC_ICDABR1_DMAINT4_SHIFT              (13u)
+#define INTC_ICDABR1_DMAINT5_SHIFT              (14u)
+#define INTC_ICDABR1_DMAINT6_SHIFT              (15u)
+#define INTC_ICDABR1_DMAINT7_SHIFT              (16u)
+#define INTC_ICDABR1_DMAINT8_SHIFT              (17u)
+#define INTC_ICDABR1_DMAINT9_SHIFT              (18u)
+#define INTC_ICDABR1_DMAINT10_SHIFT             (19u)
+#define INTC_ICDABR1_DMAINT11_SHIFT             (20u)
+#define INTC_ICDABR1_DMAINT12_SHIFT             (21u)
+#define INTC_ICDABR1_DMAINT13_SHIFT             (22u)
+#define INTC_ICDABR1_DMAINT14_SHIFT             (23u)
+#define INTC_ICDABR1_DMAINT15_SHIFT             (24u)
+#define INTC_ICDABR1_DMAERR_SHIFT               (25u)
+
+#define INTC_ICDABR2_USBI0_SHIFT                (9u)
+#define INTC_ICDABR2_USBI1_SHIFT                (10u)
+#define INTC_ICDABR2_S0_VI_VSYNC0_SHIFT         (11u)
+#define INTC_ICDABR2_S0_LO_VSYNC0_SHIFT         (12u)
+#define INTC_ICDABR2_S0_VSYNCERR0_SHIFT         (13u)
+#define INTC_ICDABR2_GR3_VLINE0_SHIFT           (14u)
+#define INTC_ICDABR2_S0_VFIELD0_SHIFT           (15u)
+#define INTC_ICDABR2_IV1_VBUFERR0_SHIFT         (16u)
+#define INTC_ICDABR2_IV3_VBUFERR0_SHIFT         (17u)
+#define INTC_ICDABR2_IV5_VBUFERR0_SHIFT         (18u)
+#define INTC_ICDABR2_IV6_VBUFERR0_SHIFT         (19u)
+#define INTC_ICDABR2_S0_WLINE0_SHIFT            (20u)
+#define INTC_ICDABR2_S1_VI_VSYNC0_SHIFT         (21u)
+#define INTC_ICDABR2_S1_LO_VSYNC0_SHIFT         (22u)
+#define INTC_ICDABR2_S1_VSYNCERR0_SHIFT         (23u)
+#define INTC_ICDABR2_S1_VFIELD0_SHIFT           (24u)
+#define INTC_ICDABR2_IV2_VBUFERR0_SHIFT         (25u)
+#define INTC_ICDABR2_IV4_VBUFERR0_SHIFT         (26u)
+#define INTC_ICDABR2_S1_WLINE0_SHIFT            (27u)
+#define INTC_ICDABR2_OIR_VI_VSYNC0_SHIFT        (28u)
+#define INTC_ICDABR2_OIR_LO_VSYNC0_SHIFT        (29u)
+#define INTC_ICDABR2_OIR_VSYNCERR0_SHIFT        (30u)
+#define INTC_ICDABR2_OIR_VFIELD0_SHIFT          (31u)
+
+#define INTC_ICDABR3_IV7_VBUFERR0_SHIFT         (0u)
+#define INTC_ICDABR3_IV8_VBUFERR0_SHIFT         (1u)
+#define INTC_ICDABR3_S0_VI_VSYNC1_SHIFT         (3u)
+#define INTC_ICDABR3_S0_LO_VSYNC1_SHIFT         (4u)
+#define INTC_ICDABR3_S0_VSYNCERR1_SHIFT         (5u)
+#define INTC_ICDABR3_GR3_VLINE1_SHIFT           (6u)
+#define INTC_ICDABR3_S0_VFIELD1_SHIFT           (7u)
+#define INTC_ICDABR3_IV1_VBUFERR1_SHIFT         (8u)
+#define INTC_ICDABR3_IV3_VBUFERR1_SHIFT         (9u)
+#define INTC_ICDABR3_IV5_VBUFERR1_SHIFT         (10u)
+#define INTC_ICDABR3_IV6_VBUFERR1_SHIFT         (11u)
+#define INTC_ICDABR3_S0_WLINE1_SHIFT            (12u)
+#define INTC_ICDABR3_S1_VI_VSYNC1_SHIFT         (13u)
+#define INTC_ICDABR3_S1_LO_VSYNC1_SHIFT         (14u)
+#define INTC_ICDABR3_S1_VSYNCERR1_SHIFT         (15u)
+#define INTC_ICDABR3_S1_VFIELD1_SHIFT           (16u)
+#define INTC_ICDABR3_IV2_VBUFERR1_SHIFT         (17u)
+#define INTC_ICDABR3_IV4_VBUFERR1_SHIFT         (18u)
+#define INTC_ICDABR3_S1_WLINE1_SHIFT            (19u)
+#define INTC_ICDABR3_OIR_VI_VSYNC1_SHIFT        (20u)
+#define INTC_ICDABR3_OIR_LO_VSYNC1_SHIFT        (21u)
+#define INTC_ICDABR3_OIR_VLINE1_SHIFT           (22u)
+#define INTC_ICDABR3_OIR_VFIELD1_SHIFT          (23u)
+#define INTC_ICDABR3_IV7_VBUFERR1_SHIFT         (24u)
+#define INTC_ICDABR3_IV8_VBUFERR1_SHIFT         (25u)
+#define INTC_ICDABR3_IMRDI_SHIFT                (27u)
+#define INTC_ICDABR3_IMR2I0_SHIFT               (28u)
+#define INTC_ICDABR3_IMR2I1_SHIFT               (29u)
+#define INTC_ICDABR3_JEDI_SHIFT                 (30u)
+#define INTC_ICDABR3_JDTI_SHIFT                 (31u)
+
+#define INTC_ICDABR4_CMP0_SHIFT                 (0u)
+#define INTC_ICDABR4_CMP1_SHIFT                 (1u)
+#define INTC_ICDABR4_INT0_SHIFT                 (2u)
+#define INTC_ICDABR4_INT1_SHIFT                 (3u)
+#define INTC_ICDABR4_INT2_SHIFT                 (4u)
+#define INTC_ICDABR4_INT3_SHIFT                 (5u)
+#define INTC_ICDABR4_OSTM0TINT_SHIFT            (6u)
+#define INTC_ICDABR4_OSTM1TINT_SHIFT            (7u)
+#define INTC_ICDABR4_CMI_SHIFT                  (8u)
+#define INTC_ICDABR4_WTOUT_SHIFT                (9u)
+#define INTC_ICDABR4_ITI_SHIFT                  (10u)
+#define INTC_ICDABR4_TGI0A_SHIFT                (11u)
+#define INTC_ICDABR4_TGI0B_SHIFT                (12u)
+#define INTC_ICDABR4_TGI0C_SHIFT                (13u)
+#define INTC_ICDABR4_TGI0D_SHIFT                (14u)
+#define INTC_ICDABR4_TGI0V_SHIFT                (15u)
+#define INTC_ICDABR4_TGI0E_SHIFT                (16u)
+#define INTC_ICDABR4_TGI0F_SHIFT                (17u)
+#define INTC_ICDABR4_TGI1A_SHIFT                (18u)
+#define INTC_ICDABR4_TGI1B_SHIFT                (19u)
+#define INTC_ICDABR4_TGI1V_SHIFT                (20u)
+#define INTC_ICDABR4_TGI1U_SHIFT                (21u)
+#define INTC_ICDABR4_TGI2A_SHIFT                (22u)
+#define INTC_ICDABR4_TGI2B_SHIFT                (23u)
+#define INTC_ICDABR4_TGI2V_SHIFT                (24u)
+#define INTC_ICDABR4_TGI2U_SHIFT                (25u)
+#define INTC_ICDABR4_TGI3A_SHIFT                (26u)
+#define INTC_ICDABR4_TGI3B_SHIFT                (27u)
+#define INTC_ICDABR4_TGI3C_SHIFT                (28u)
+#define INTC_ICDABR4_TGI3D_SHIFT                (29u)
+#define INTC_ICDABR4_TGI3V_SHIFT                (30u)
+#define INTC_ICDABR4_TGI4A_SHIFT                (31u)
+
+#define INTC_ICDABR5_TGI4B_SHIFT                (0u)
+#define INTC_ICDABR5_TGI4C_SHIFT                (1u)
+#define INTC_ICDABR5_TGI4D_SHIFT                (2u)
+#define INTC_ICDABR5_TGI4V_SHIFT                (3u)
+#define INTC_ICDABR5_CMI1_SHIFT                 (4u)
+#define INTC_ICDABR5_CMI2_SHIFT                 (5u)
+#define INTC_ICDABR5_SGDEI0_SHIFT               (6u)
+#define INTC_ICDABR5_SGDEI1_SHIFT               (7u)
+#define INTC_ICDABR5_SGDEI2_SHIFT               (8u)
+#define INTC_ICDABR5_SGDEI3_SHIFT               (9u)
+#define INTC_ICDABR5_ADI_SHIFT                  (10u)
+#define INTC_ICDABR5_LMTI_SHIFT                 (11u)
+#define INTC_ICDABR5_SSII0_SHIFT                (12u)
+#define INTC_ICDABR5_SSIRXI0_SHIFT              (13u)
+#define INTC_ICDABR5_SSITXI0_SHIFT              (14u)
+#define INTC_ICDABR5_SSII1_SHIFT                (15u)
+#define INTC_ICDABR5_SSIRXI1_SHIFT              (16u)
+#define INTC_ICDABR5_SSITXI1_SHIFT              (17u)
+#define INTC_ICDABR5_SSII2_SHIFT                (18u)
+#define INTC_ICDABR5_SSIRTI2_SHIFT              (19u)
+#define INTC_ICDABR5_SSII3_SHIFT                (20u)
+#define INTC_ICDABR5_SSIRXI3_SHIFT              (21u)
+#define INTC_ICDABR5_SSITXI3_SHIFT              (22u)
+#define INTC_ICDABR5_SSII4_SHIFT                (23u)
+#define INTC_ICDABR5_SSIRTI4_SHIFT              (24u)
+#define INTC_ICDABR5_SSII5_SHIFT                (25u)
+#define INTC_ICDABR5_SSIRXI5_SHIFT              (26u)
+#define INTC_ICDABR5_SSITXI5_SHIFT              (27u)
+#define INTC_ICDABR5_SPDIFI_SHIFT               (28u)
+#define INTC_ICDABR5_INTIICTEI0_SHIFT           (29u)
+#define INTC_ICDABR5_INTIICRI0_SHIFT            (30u)
+#define INTC_ICDABR5_INTIICTI0_SHIFT            (31u)
+
+#define INTC_ICDABR6_INTIICSPI0_SHIFT           (0u)
+#define INTC_ICDABR6_INTIICSTI0_SHIFT           (1u)
+#define INTC_ICDABR6_INTIICNAKI0_SHIFT          (2u)
+#define INTC_ICDABR6_INTIICALI0_SHIFT           (3u)
+#define INTC_ICDABR6_INTIICTMOI0_SHIFT          (4u)
+#define INTC_ICDABR6_INTIICTEI1_SHIFT           (5u)
+#define INTC_ICDABR6_INTIICRI1_SHIFT            (6u)
+#define INTC_ICDABR6_INTIICTI1_SHIFT            (7u)
+#define INTC_ICDABR6_INTIICSPI1_SHIFT           (8u)
+#define INTC_ICDABR6_INTIICSTI1_SHIFT           (9u)
+#define INTC_ICDABR6_INTIICNAKI1_SHIFT          (10u)
+#define INTC_ICDABR6_INTIICALI1_SHIFT           (11u)
+#define INTC_ICDABR6_INTIICTMOI1_SHIFT          (12u)
+#define INTC_ICDABR6_INTIICTEI2_SHIFT           (13u)
+#define INTC_ICDABR6_INTIICRI2_SHIFT            (14u)
+#define INTC_ICDABR6_INTIICTI2_SHIFT            (15u)
+#define INTC_ICDABR6_INTIICSPI2_SHIFT           (16u)
+#define INTC_ICDABR6_INTIICSTI2_SHIFT           (17u)
+#define INTC_ICDABR6_INTIICNAKI2_SHIFT          (18u)
+#define INTC_ICDABR6_INTIICALI2_SHIFT           (19u)
+#define INTC_ICDABR6_INTIICTMOI2_SHIFT          (20u)
+#define INTC_ICDABR6_INTIICTEI3_SHIFT           (21u)
+#define INTC_ICDABR6_INTIICRI3_SHIFT            (22u)
+#define INTC_ICDABR6_INTIICTI3_SHIFT            (23u)
+#define INTC_ICDABR6_INTIICSPI3_SHIFT           (24u)
+#define INTC_ICDABR6_INTIICSTI3_SHIFT           (25u)
+#define INTC_ICDABR6_INTIICNAKI3_SHIFT          (26u)
+#define INTC_ICDABR6_INTIICALI3_SHIFT           (27u)
+#define INTC_ICDABR6_INTIICTMOI3_SHIFT          (28u)
+#define INTC_ICDABR6_BRI0_SHIFT                 (29u)
+#define INTC_ICDABR6_ERI0_SHIFT                 (30u)
+#define INTC_ICDABR6_RXI0_SHIFT                 (31u)
+
+#define INTC_ICDABR7_TXI0_SHIFT                 (0u)
+#define INTC_ICDABR7_BRI1_SHIFT                 (1u)
+#define INTC_ICDABR7_ERI1_SHIFT                 (2u)
+#define INTC_ICDABR7_RXI1_SHIFT                 (3u)
+#define INTC_ICDABR7_TXI1_SHIFT                 (4u)
+#define INTC_ICDABR7_BRI2_SHIFT                 (5u)
+#define INTC_ICDABR7_ERI2_SHIFT                 (6u)
+#define INTC_ICDABR7_RXI2_SHIFT                 (7u)
+#define INTC_ICDABR7_TXI2_SHIFT                 (8u)
+#define INTC_ICDABR7_BRI3_SHIFT                 (9u)
+#define INTC_ICDABR7_ERI3_SHIFT                 (10u)
+#define INTC_ICDABR7_RXI3_SHIFT                 (11u)
+#define INTC_ICDABR7_TXI3_SHIFT                 (12u)
+#define INTC_ICDABR7_BRI4_SHIFT                 (13u)
+#define INTC_ICDABR7_ERI4_SHIFT                 (14u)
+#define INTC_ICDABR7_RXI4_SHIFT                 (15u)
+#define INTC_ICDABR7_TXI4_SHIFT                 (16u)
+#define INTC_ICDABR7_BRI5_SHIFT                 (17u)
+#define INTC_ICDABR7_ERI5_SHIFT                 (18u)
+#define INTC_ICDABR7_RXI5_SHIFT                 (19u)
+#define INTC_ICDABR7_TXI5_SHIFT                 (20u)
+#define INTC_ICDABR7_BRI6_SHIFT                 (21u)
+#define INTC_ICDABR7_ERI6_SHIFT                 (22u)
+#define INTC_ICDABR7_RXI6_SHIFT                 (23u)
+#define INTC_ICDABR7_TXI6_SHIFT                 (24u)
+#define INTC_ICDABR7_BRI7_SHIFT                 (25u)
+#define INTC_ICDABR7_ERI7_SHIFT                 (26u)
+#define INTC_ICDABR7_RXI7_SHIFT                 (27u)
+#define INTC_ICDABR7_TXI7_SHIFT                 (28u)
+#define INTC_ICDABR7_INTRCANGERR_SHIFT          (29u)
+#define INTC_ICDABR7_INTRCANGRECC_SHIFT         (30u)
+#define INTC_ICDABR7_INTRCAN0REC_SHIFT          (31u)
+
+#define INTC_ICDABR8_INTRCAN0ERR_SHIFT          (0u)
+#define INTC_ICDABR8_INTRCAN0TRX_SHIFT          (1u)
+#define INTC_ICDABR8_INTRCAN1REC_SHIFT          (2u)
+#define INTC_ICDABR8_INTRCAN1ERR_SHIFT          (3u)
+#define INTC_ICDABR8_INTRCAN1TRX_SHIFT          (4u)
+#define INTC_ICDABR8_INTRCAN2REC_SHIFT          (5u)
+#define INTC_ICDABR8_INTRCAN2ERR_SHIFT          (6u)
+#define INTC_ICDABR8_INTRCAN2TRX_SHIFT          (7u)
+#define INTC_ICDABR8_INTRCAN3REC_SHIFT          (8u)
+#define INTC_ICDABR8_INTRCAN3ERR_SHIFT          (9u)
+#define INTC_ICDABR8_INTRCAN3TRX_SHIFT          (10u)
+#define INTC_ICDABR8_INTRCAN4REC_SHIFT          (11u)
+#define INTC_ICDABR8_INTRCAN4ERR_SHIFT          (12u)
+#define INTC_ICDABR8_INTRCAN4TRX_SHIFT          (13u)
+#define INTC_ICDABR8_SPEI0_SHIFT                (14u)
+#define INTC_ICDABR8_SPRI0_SHIFT                (15u)
+#define INTC_ICDABR8_SPTI0_SHIFT                (16u)
+#define INTC_ICDABR8_SPEI1_SHIFT                (17u)
+#define INTC_ICDABR8_SPRI1_SHIFT                (18u)
+#define INTC_ICDABR8_SPTI1_SHIFT                (19u)
+#define INTC_ICDABR8_SPEI2_SHIFT                (20u)
+#define INTC_ICDABR8_SPRI2_SHIFT                (21u)
+#define INTC_ICDABR8_SPTI2_SHIFT                (22u)
+#define INTC_ICDABR8_SPEI3_SHIFT                (23u)
+#define INTC_ICDABR8_SPRI3_SHIFT                (24u)
+#define INTC_ICDABR8_SPTI3_SHIFT                (25u)
+#define INTC_ICDABR8_SPEI4_SHIFT                (26u)
+#define INTC_ICDABR8_SPRI4_SHIFT                (27u)
+#define INTC_ICDABR8_SPTI4_SHIFT                (28u)
+#define INTC_ICDABR8_IEBBTD_SHIFT               (29u)
+#define INTC_ICDABR8_IEBBTERR_SHIFT             (30u)
+#define INTC_ICDABR8_IEBBTSTA_SHIFT             (31u)
+
+#define INTC_ICDABR9_IEBBTV_SHIFT               (0u)
+#define INTC_ICDABR9_ISY_SHIFT                  (1u)
+#define INTC_ICDABR9_IERR_SHIFT                 (2u)
+#define INTC_ICDABR9_ITARG_SHIFT                (3u)
+#define INTC_ICDABR9_ISEC_SHIFT                 (4u)
+#define INTC_ICDABR9_IBUF_SHIFT                 (5u)
+#define INTC_ICDABR9_IREADY_SHIFT               (6u)
+#define INTC_ICDABR9_FLSTE_SHIFT                (7u)
+#define INTC_ICDABR9_FLTENDI_SHIFT              (8u)
+#define INTC_ICDABR9_FLTREQ0I_SHIFT             (9u)
+#define INTC_ICDABR9_FLTREQ1I_SHIFT             (10u)
+#define INTC_ICDABR9_MMC0_SHIFT                 (11u)
+#define INTC_ICDABR9_MMC1_SHIFT                 (12u)
+#define INTC_ICDABR9_MMC2_SHIFT                 (13u)
+#define INTC_ICDABR9_SDHI0_3_SHIFT              (14u)
+#define INTC_ICDABR9_SDHI0_0_SHIFT              (15u)
+#define INTC_ICDABR9_SDHI0_1_SHIFT              (16u)
+#define INTC_ICDABR9_SDHI1_3_SHIFT              (17u)
+#define INTC_ICDABR9_SDHI1_0_SHIFT              (18u)
+#define INTC_ICDABR9_SDHI1_1_SHIFT              (19u)
+#define INTC_ICDABR9_ARM_SHIFT                  (20u)
+#define INTC_ICDABR9_PRD_SHIFT                  (21u)
+#define INTC_ICDABR9_CUP_SHIFT                  (22u)
+#define INTC_ICDABR9_SCUAI0_SHIFT               (23u)
+#define INTC_ICDABR9_SCUAI1_SHIFT               (24u)
+#define INTC_ICDABR9_SCUFDI0_SHIFT              (25u)
+#define INTC_ICDABR9_SCUFDI1_SHIFT              (26u)
+#define INTC_ICDABR9_SCUFDI2_SHIFT              (27u)
+#define INTC_ICDABR9_SCUFDI3_SHIFT              (28u)
+#define INTC_ICDABR9_SCUFUI0_SHIFT              (29u)
+#define INTC_ICDABR9_SCUFUI1_SHIFT              (30u)
+#define INTC_ICDABR9_SCUFUI2_SHIFT              (31u)
+
+#define INTC_ICDABR10_SCUFUI3_SHIFT             (0u)
+#define INTC_ICDABR10_SCUDVI0_SHIFT             (1u)
+#define INTC_ICDABR10_SCUDVI1_SHIFT             (2u)
+#define INTC_ICDABR10_SCUDVI2_SHIFT             (3u)
+#define INTC_ICDABR10_SCUDVI3_SHIFT             (4u)
+#define INTC_ICDABR10_MLB_CINT_SHIFT            (5u)
+#define INTC_ICDABR10_MLB_SINT_SHIFT            (6u)
+#define INTC_ICDABR10_DRC0_SHIFT                (7u)
+#define INTC_ICDABR10_DRC1_SHIFT                (8u)
+#define INTC_ICDABR10_LINI0_INT_T_SHIFT         (11u)
+#define INTC_ICDABR10_LINI0_INT_R_SHIFT         (12u)
+#define INTC_ICDABR10_LINI0_INT_S_SHIFT         (13u)
+#define INTC_ICDABR10_LINI0_INT_M_SHIFT         (14u)
+#define INTC_ICDABR10_LINI1_INT_T_SHIFT         (15u)
+#define INTC_ICDABR10_LINI1_INT_R_SHIFT         (16u)
+#define INTC_ICDABR10_LINI1_INT_S_SHIFT         (17u)
+#define INTC_ICDABR10_LINI1_INT_M_SHIFT         (18u)
+#define INTC_ICDABR10_ERI0_SHIFT                (27u)
+#define INTC_ICDABR10_RXI0_SHIFT                (28u)
+#define INTC_ICDABR10_TXI0_SHIFT                (29u)
+#define INTC_ICDABR10_TEI0_SHIFT                (30u)
+#define INTC_ICDABR10_ERI1_SHIFT                (31u)
+
+#define INTC_ICDABR11_RXI1_SHIFT                (0u)
+#define INTC_ICDABR11_TXI1_SHIFT                (1u)
+#define INTC_ICDABR11_TEI1_SHIFT                (2u)
+#define INTC_ICDABR11_AVBI_DATA_SHIFT           (3u)
+#define INTC_ICDABR11_AVBI_ERROR_SHIFT          (4u)
+#define INTC_ICDABR11_AVBI_MANAGE_SHIFT         (5u)
+#define INTC_ICDABR11_AVBI_MAC_SHIFT            (6u)
+#define INTC_ICDABR11_ETHERI_SHIFT              (7u)
+#define INTC_ICDABR11_CEUI_SHIFT                (12u)
+#define INTC_ICDABR11_H2XMLB_ERRINT_SHIFT       (29u)
+#define INTC_ICDABR11_H2XIC1_ERRINT_SHIFT       (30u)
+#define INTC_ICDABR11_X2HPERI1_ERRINT_SHIFT     (31u)
+
+#define INTC_ICDABR12_X2HPERI2_ERRINT_SHIFT     (0u)
+#define INTC_ICDABR12_X2HPERI34_ERRINT_SHIFT    (1u)
+#define INTC_ICDABR12_X2HPERI5_ERRINT_SHIFT     (2u)
+#define INTC_ICDABR12_X2HPERI67_ERRINT_SHIFT    (3u)
+#define INTC_ICDABR12_X2HDBGR_ERRINT_SHIFT      (4u)
+#define INTC_ICDABR12_X2HBSC_ERRINT_SHIFT       (5u)
+#define INTC_ICDABR12_X2HSPI1_ERRINT_SHIFT      (6u)
+#define INTC_ICDABR12_X2HSPI2_ERRINT_SHIFT      (7u)
+#define INTC_ICDABR12_PRRI_SHIFT                (8u)
+#define INTC_ICDABR12_IFEI0_SHIFT               (9u)
+#define INTC_ICDABR12_OFFI0_SHIFT               (10u)
+#define INTC_ICDABR12_PFVEI0_SHIFT              (11u)
+#define INTC_ICDABR12_IFEI1_SHIFT               (12u)
+#define INTC_ICDABR12_OFFI1_SHIFT               (13u)
+#define INTC_ICDABR12_PFVEI1_SHIFT              (14u)
+
+#define INTC_ICDABR13_TINT0_SHIFT               (0u)
+#define INTC_ICDABR13_TINT1_SHIFT               (1u)
+#define INTC_ICDABR13_TINT2_SHIFT               (2u)
+#define INTC_ICDABR13_TINT3_SHIFT               (3u)
+#define INTC_ICDABR13_TINT4_SHIFT               (4u)
+#define INTC_ICDABR13_TINT5_SHIFT               (5u)
+#define INTC_ICDABR13_TINT6_SHIFT               (6u)
+#define INTC_ICDABR13_TINT7_SHIFT               (7u)
+#define INTC_ICDABR13_TINT8_SHIFT               (8u)
+#define INTC_ICDABR13_TINT9_SHIFT               (9u)
+#define INTC_ICDABR13_TINT10_SHIFT              (10u)
+#define INTC_ICDABR13_TINT11_SHIFT              (11u)
+#define INTC_ICDABR13_TINT12_SHIFT              (12u)
+#define INTC_ICDABR13_TINT13_SHIFT              (13u)
+#define INTC_ICDABR13_TINT14_SHIFT              (14u)
+#define INTC_ICDABR13_TINT15_SHIFT              (15u)
+#define INTC_ICDABR13_TINT16_SHIFT              (16u)
+#define INTC_ICDABR13_TINT17_SHIFT              (17u)
+#define INTC_ICDABR13_TINT18_SHIFT              (18u)
+#define INTC_ICDABR13_TINT19_SHIFT              (19u)
+#define INTC_ICDABR13_TINT20_SHIFT              (20u)
+#define INTC_ICDABR13_TINT21_SHIFT              (21u)
+#define INTC_ICDABR13_TINT22_SHIFT              (22u)
+#define INTC_ICDABR13_TINT23_SHIFT              (23u)
+#define INTC_ICDABR13_TINT24_SHIFT              (24u)
+#define INTC_ICDABR13_TINT25_SHIFT              (25u)
+#define INTC_ICDABR13_TINT26_SHIFT              (26u)
+#define INTC_ICDABR13_TINT27_SHIFT              (27u)
+#define INTC_ICDABR13_TINT28_SHIFT              (28u)
+#define INTC_ICDABR13_TINT29_SHIFT              (29u)
+#define INTC_ICDABR13_TINT30_SHIFT              (30u)
+#define INTC_ICDABR13_TINT31_SHIFT              (31u)
+
+#define INTC_ICDABR14_TINT32_SHIFT              (0u)
+#define INTC_ICDABR14_TINT33_SHIFT              (1u)
+#define INTC_ICDABR14_TINT34_SHIFT              (2u)
+#define INTC_ICDABR14_TINT35_SHIFT              (3u)
+#define INTC_ICDABR14_TINT36_SHIFT              (4u)
+#define INTC_ICDABR14_TINT37_SHIFT              (5u)
+#define INTC_ICDABR14_TINT38_SHIFT              (6u)
+#define INTC_ICDABR14_TINT39_SHIFT              (7u)
+#define INTC_ICDABR14_TINT40_SHIFT              (8u)
+#define INTC_ICDABR14_TINT41_SHIFT              (9u)
+#define INTC_ICDABR14_TINT42_SHIFT              (10u)
+#define INTC_ICDABR14_TINT43_SHIFT              (11u)
+#define INTC_ICDABR14_TINT44_SHIFT              (12u)
+#define INTC_ICDABR14_TINT45_SHIFT              (13u)
+#define INTC_ICDABR14_TINT46_SHIFT              (14u)
+#define INTC_ICDABR14_TINT47_SHIFT              (15u)
+#define INTC_ICDABR14_TINT48_SHIFT              (16u)
+#define INTC_ICDABR14_TINT49_SHIFT              (17u)
+#define INTC_ICDABR14_TINT50_SHIFT              (18u)
+#define INTC_ICDABR14_TINT51_SHIFT              (19u)
+#define INTC_ICDABR14_TINT52_SHIFT              (20u)
+#define INTC_ICDABR14_TINT53_SHIFT              (21u)
+#define INTC_ICDABR14_TINT54_SHIFT              (22u)
+#define INTC_ICDABR14_TINT55_SHIFT              (23u)
+#define INTC_ICDABR14_TINT56_SHIFT              (24u)
+#define INTC_ICDABR14_TINT57_SHIFT              (25u)
+#define INTC_ICDABR14_TINT58_SHIFT              (26u)
+#define INTC_ICDABR14_TINT59_SHIFT              (27u)
+#define INTC_ICDABR14_TINT60_SHIFT              (28u)
+#define INTC_ICDABR14_TINT61_SHIFT              (29u)
+#define INTC_ICDABR14_TINT62_SHIFT              (30u)
+#define INTC_ICDABR14_TINT63_SHIFT              (31u)
+
+#define INTC_ICDABR15_TINT64_SHIFT              (0u)
+#define INTC_ICDABR15_TINT65_SHIFT              (1u)
+#define INTC_ICDABR15_TINT66_SHIFT              (2u)
+#define INTC_ICDABR15_TINT67_SHIFT              (3u)
+#define INTC_ICDABR15_TINT68_SHIFT              (4u)
+#define INTC_ICDABR15_TINT69_SHIFT              (5u)
+#define INTC_ICDABR15_TINT70_SHIFT              (6u)
+#define INTC_ICDABR15_TINT71_SHIFT              (7u)
+#define INTC_ICDABR15_TINT72_SHIFT              (8u)
+#define INTC_ICDABR15_TINT73_SHIFT              (9u)
+#define INTC_ICDABR15_TINT74_SHIFT              (10u)
+#define INTC_ICDABR15_TINT75_SHIFT              (11u)
+#define INTC_ICDABR15_TINT76_SHIFT              (12u)
+#define INTC_ICDABR15_TINT77_SHIFT              (13u)
+#define INTC_ICDABR15_TINT78_SHIFT              (14u)
+#define INTC_ICDABR15_TINT79_SHIFT              (15u)
+#define INTC_ICDABR15_TINT80_SHIFT              (16u)
+#define INTC_ICDABR15_TINT81_SHIFT              (17u)
+#define INTC_ICDABR15_TINT82_SHIFT              (18u)
+#define INTC_ICDABR15_TINT83_SHIFT              (19u)
+#define INTC_ICDABR15_TINT84_SHIFT              (20u)
+#define INTC_ICDABR15_TINT85_SHIFT              (21u)
+#define INTC_ICDABR15_TINT86_SHIFT              (22u)
+#define INTC_ICDABR15_TINT87_SHIFT              (23u)
+#define INTC_ICDABR15_TINT88_SHIFT              (24u)
+#define INTC_ICDABR15_TINT89_SHIFT              (25u)
+#define INTC_ICDABR15_TINT90_SHIFT              (26u)
+#define INTC_ICDABR15_TINT91_SHIFT              (27u)
+#define INTC_ICDABR15_TINT92_SHIFT              (28u)
+#define INTC_ICDABR15_TINT93_SHIFT              (29u)
+#define INTC_ICDABR15_TINT94_SHIFT              (30u)
+#define INTC_ICDABR15_TINT95_SHIFT              (31u)
+
+#define INTC_ICDABR16_TINT96_SHIFT              (0u)
+#define INTC_ICDABR16_TINT97_SHIFT              (1u)
+#define INTC_ICDABR16_TINT98_SHIFT              (2u)
+#define INTC_ICDABR16_TINT99_SHIFT              (3u)
+#define INTC_ICDABR16_TINT100_SHIFT             (4u)
+#define INTC_ICDABR16_TINT101_SHIFT             (5u)
+#define INTC_ICDABR16_TINT102_SHIFT             (6u)
+#define INTC_ICDABR16_TINT103_SHIFT             (7u)
+#define INTC_ICDABR16_TINT104_SHIFT             (8u)
+#define INTC_ICDABR16_TINT105_SHIFT             (9u)
+#define INTC_ICDABR16_TINT106_SHIFT             (10u)
+#define INTC_ICDABR16_TINT107_SHIFT             (11u)
+#define INTC_ICDABR16_TINT108_SHIFT             (12u)
+#define INTC_ICDABR16_TINT109_SHIFT             (13u)
+#define INTC_ICDABR16_TINT110_SHIFT             (14u)
+#define INTC_ICDABR16_TINT111_SHIFT             (15u)
+#define INTC_ICDABR16_TINT112_SHIFT             (16u)
+#define INTC_ICDABR16_TINT113_SHIFT             (17u)
+#define INTC_ICDABR16_TINT114_SHIFT             (18u)
+#define INTC_ICDABR16_TINT115_SHIFT             (19u)
+#define INTC_ICDABR16_TINT116_SHIFT             (20u)
+#define INTC_ICDABR16_TINT117_SHIFT             (21u)
+#define INTC_ICDABR16_TINT118_SHIFT             (22u)
+#define INTC_ICDABR16_TINT119_SHIFT             (23u)
+#define INTC_ICDABR16_TINT120_SHIFT             (24u)
+#define INTC_ICDABR16_TINT121_SHIFT             (25u)
+#define INTC_ICDABR16_TINT122_SHIFT             (26u)
+#define INTC_ICDABR16_TINT123_SHIFT             (27u)
+#define INTC_ICDABR16_TINT124_SHIFT             (28u)
+#define INTC_ICDABR16_TINT125_SHIFT             (29u)
+#define INTC_ICDABR16_TINT126_SHIFT             (30u)
+#define INTC_ICDABR16_TINT127_SHIFT             (31u)
+
+#define INTC_ICDABR17_TINT128_SHIFT             (0u)
+#define INTC_ICDABR17_TINT129_SHIFT             (1u)
+#define INTC_ICDABR17_TINT130_SHIFT             (2u)
+#define INTC_ICDABR17_TINT131_SHIFT             (3u)
+#define INTC_ICDABR17_TINT132_SHIFT             (4u)
+#define INTC_ICDABR17_TINT133_SHIFT             (5u)
+#define INTC_ICDABR17_TINT134_SHIFT             (6u)
+#define INTC_ICDABR17_TINT135_SHIFT             (7u)
+#define INTC_ICDABR17_TINT136_SHIFT             (8u)
+#define INTC_ICDABR17_TINT137_SHIFT             (9u)
+#define INTC_ICDABR17_TINT138_SHIFT             (10u)
+#define INTC_ICDABR17_TINT139_SHIFT             (11u)
+#define INTC_ICDABR17_TINT140_SHIFT             (12u)
+#define INTC_ICDABR17_TINT141_SHIFT             (13u)
+#define INTC_ICDABR17_TINT142_SHIFT             (14u)
+#define INTC_ICDABR17_TINT143_SHIFT             (15u)
+#define INTC_ICDABR17_TINT144_SHIFT             (16u)
+#define INTC_ICDABR17_TINT145_SHIFT             (17u)
+#define INTC_ICDABR17_TINT146_SHIFT             (18u)
+#define INTC_ICDABR17_TINT147_SHIFT             (19u)
+#define INTC_ICDABR17_TINT148_SHIFT             (20u)
+#define INTC_ICDABR17_TINT149_SHIFT             (21u)
+#define INTC_ICDABR17_TINT150_SHIFT             (22u)
+#define INTC_ICDABR17_TINT151_SHIFT             (23u)
+#define INTC_ICDABR17_TINT152_SHIFT             (24u)
+#define INTC_ICDABR17_TINT153_SHIFT             (25u)
+#define INTC_ICDABR17_TINT154_SHIFT             (26u)
+#define INTC_ICDABR17_TINT155_SHIFT             (27u)
+#define INTC_ICDABR17_TINT156_SHIFT             (28u)
+#define INTC_ICDABR17_TINT157_SHIFT             (29u)
+#define INTC_ICDABR17_TINT158_SHIFT             (30u)
+#define INTC_ICDABR17_TINT159_SHIFT             (31u)
+
+#define INTC_ICDABR18_TINT160_SHIFT             (0u)
+#define INTC_ICDABR18_TINT161_SHIFT             (1u)
+#define INTC_ICDABR18_TINT162_SHIFT             (2u)
+#define INTC_ICDABR18_TINT163_SHIFT             (3u)
+#define INTC_ICDABR18_TINT164_SHIFT             (4u)
+#define INTC_ICDABR18_TINT165_SHIFT             (5u)
+#define INTC_ICDABR18_TINT166_SHIFT             (6u)
+#define INTC_ICDABR18_TINT167_SHIFT             (7u)
+#define INTC_ICDABR18_TINT168_SHIFT             (8u)
+#define INTC_ICDABR18_TINT169_SHIFT             (9u)
+#define INTC_ICDABR18_TINT170_SHIFT             (10u)
+
+#define INTC_ICDIPR0_SW0_SHIFT                  (0u)
+#define INTC_ICDIPR0_SW1_SHIFT                  (8u)
+#define INTC_ICDIPR0_SW2_SHIFT                  (16u)
+#define INTC_ICDIPR0_SW3_SHIFT                  (24u)
+
+#define INTC_ICDIPR1_SW4_SHIFT                  (0u)
+#define INTC_ICDIPR1_SW5_SHIFT                  (8u)
+#define INTC_ICDIPR1_SW6_SHIFT                  (16u)
+#define INTC_ICDIPR1_SW7_SHIFT                  (24u)
+
+#define INTC_ICDIPR2_SW8_SHIFT                  (0u)
+#define INTC_ICDIPR2_SW9_SHIFT                  (8u)
+#define INTC_ICDIPR2_SW10_SHIFT                 (16u)
+#define INTC_ICDIPR2_SW11_SHIFT                 (24u)
+
+#define INTC_ICDIPR3_SW12_SHIFT                 (0u)
+#define INTC_ICDIPR3_SW13_SHIFT                 (8u)
+#define INTC_ICDIPR3_SW14_SHIFT                 (16u)
+#define INTC_ICDIPR3_SW15_SHIFT                 (24u)
+
+#define INTC_ICDIPR4_PMUIRQ0_SHIFT              (0u)
+#define INTC_ICDIPR4_COMMRX0_SHIFT              (8u)
+#define INTC_ICDIPR4_COMMTX0_SHIFT              (16u)
+#define INTC_ICDIPR4_CTIIRQ0_SHIFT              (24u)
+
+#define INTC_ICDIPR8_IRQ0_SHIFT                 (0u)
+#define INTC_ICDIPR8_IRQ1_SHIFT                 (8u)
+#define INTC_ICDIPR8_IRQ2_SHIFT                 (16u)
+#define INTC_ICDIPR8_IRQ3_SHIFT                 (24u)
+
+#define INTC_ICDIPR9_IRQ4_SHIFT                 (0u)
+#define INTC_ICDIPR9_IRQ5_SHIFT                 (8u)
+#define INTC_ICDIPR9_IRQ6_SHIFT                 (16u)
+#define INTC_ICDIPR9_IRQ7_SHIFT                 (24u)
+
+#define INTC_ICDIPR10_PL310ERR_SHIFT            (0u)
+#define INTC_ICDIPR10_DMAINT0_SHIFT             (8u)
+#define INTC_ICDIPR10_DMAINT1_SHIFT             (16u)
+#define INTC_ICDIPR10_DMAINT2_SHIFT             (24u)
+
+#define INTC_ICDIPR11_DMAINT3_SHIFT             (0u)
+#define INTC_ICDIPR11_DMAINT4_SHIFT             (8u)
+#define INTC_ICDIPR11_DMAINT5_SHIFT             (16u)
+#define INTC_ICDIPR11_DMAINT6_SHIFT             (24u)
+
+#define INTC_ICDIPR12_DMAINT7_SHIFT             (0u)
+#define INTC_ICDIPR12_DMAINT8_SHIFT             (8u)
+#define INTC_ICDIPR12_DMAINT9_SHIFT             (16u)
+#define INTC_ICDIPR12_DMAINT10_SHIFT            (24u)
+
+#define INTC_ICDIPR13_DMAINT11_SHIFT            (0u)
+#define INTC_ICDIPR13_DMAINT12_SHIFT            (8u)
+#define INTC_ICDIPR13_DMAINT13_SHIFT            (16u)
+#define INTC_ICDIPR13_DMAINT14_SHIFT            (24u)
+
+#define INTC_ICDIPR14_DMAINT15_SHIFT            (0u)
+#define INTC_ICDIPR14_DMAERR_SHIFT              (8u)
+
+#define INTC_ICDIPR18_USBI0_SHIFT               (8u)
+#define INTC_ICDIPR18_USBI1_SHIFT               (16u)
+#define INTC_ICDIPR18_S0_VI_VSYNC0_SHIFT        (24u)
+
+#define INTC_ICDIPR19_S0_LO_VSYNC0_SHIFT        (0u)
+#define INTC_ICDIPR19_S0_VSYNCERR0_SHIFT        (8u)
+#define INTC_ICDIPR19_GR3_VLINE0_SHIFT          (16u)
+#define INTC_ICDIPR19_S0_VFIELD0_SHIFT          (24u)
+
+#define INTC_ICDIPR20_IV1_VBUFERR0_SHIFT        (0u)
+#define INTC_ICDIPR20_IV3_VBUFERR0_SHIFT        (8u)
+#define INTC_ICDIPR20_IV5_VBUFERR0_SHIFT        (16u)
+#define INTC_ICDIPR20_IV6_VBUFERR0_SHIFT        (24u)
+
+#define INTC_ICDIPR21_S0_WLINE0_SHIFT           (0u)
+#define INTC_ICDIPR21_S1_VI_VSYNC0_SHIFT        (8u)
+#define INTC_ICDIPR21_S1_LO_VSYNC0_SHIFT        (16u)
+#define INTC_ICDIPR21_S1_VSYNCERR0_SHIFT        (24u)
+
+#define INTC_ICDIPR22_S1_VFIELD0_SHIFT          (0u)
+#define INTC_ICDIPR22_IV2_VBUFERR0_SHIFT        (8u)
+#define INTC_ICDIPR22_IV4_VBUFERR0_SHIFT        (16u)
+#define INTC_ICDIPR22_S1_WLINE0_SHIFT           (24u)
+
+#define INTC_ICDIPR23_OIR_VI_VSYNC0_SHIFT       (0u)
+#define INTC_ICDIPR23_OIR_LO_VSYNC0_SHIFT       (8u)
+#define INTC_ICDIPR23_OIR_VSYNCERR0_SHIFT       (16u)
+#define INTC_ICDIPR23_OIR_VFIELD0_SHIFT         (24u)
+
+#define INTC_ICDIPR24_IV7_VBUFERR0_SHIFT        (0u)
+#define INTC_ICDIPR24_IV8_VBUFERR0_SHIFT        (8u)
+#define INTC_ICDIPR24_S0_VI_VSYNC1_SHIFT        (24u)
+
+#define INTC_ICDIPR25_S0_LO_VSYNC1_SHIFT        (0u)
+#define INTC_ICDIPR25_S0_VSYNCERR1_SHIFT        (8u)
+#define INTC_ICDIPR25_GR3_VLINE1_SHIFT          (16u)
+#define INTC_ICDIPR25_S0_VFIELD1_SHIFT          (24u)
+
+#define INTC_ICDIPR26_IV1_VBUFERR1_SHIFT        (0u)
+#define INTC_ICDIPR26_IV3_VBUFERR1_SHIFT        (8u)
+#define INTC_ICDIPR26_IV5_VBUFERR1_SHIFT        (16u)
+#define INTC_ICDIPR26_IV6_VBUFERR1_SHIFT        (24u)
+
+#define INTC_ICDIPR27_S0_WLINE1_SHIFT           (0u)
+#define INTC_ICDIPR27_S1_VI_VSYNC1_SHIFT        (8u)
+#define INTC_ICDIPR27_S1_LO_VSYNC1_SHIFT        (16u)
+#define INTC_ICDIPR27_S1_VSYNCERR1_SHIFT        (24u)
+
+#define INTC_ICDIPR28_S1_VFIELD1_SHIFT          (0u)
+#define INTC_ICDIPR28_IV2_VBUFERR1_SHIFT        (8u)
+#define INTC_ICDIPR28_IV4_VBUFERR1_SHIFT        (16u)
+#define INTC_ICDIPR28_S1_WLINE1_SHIFT           (24u)
+
+#define INTC_ICDIPR29_OIR_VI_VSYNC1_SHIFT       (0u)
+#define INTC_ICDIPR29_OIR_LO_VSYNC1_SHIFT       (8u)
+#define INTC_ICDIPR29_OIR_VLINE1_SHIFT          (16u)
+#define INTC_ICDIPR29_OIR_VFIELD1_SHIFT         (24u)
+
+#define INTC_ICDIPR30_IV7_VBUFERR1_SHIFT        (0u)
+#define INTC_ICDIPR30_IV8_VBUFERR1_SHIFT        (8u)
+#define INTC_ICDIPR30_IMRDI_SHIFT               (24u)
+
+#define INTC_ICDIPR31_IMR2I0_SHIFT              (0u)
+#define INTC_ICDIPR31_IMR2I1_SHIFT              (8u)
+#define INTC_ICDIPR31_JEDI_SHIFT                (16u)
+#define INTC_ICDIPR31_JDTI_SHIFT                (24u)
+
+#define INTC_ICDIPR32_CMP0_SHIFT                (0u)
+#define INTC_ICDIPR32_CMP1_SHIFT                (8u)
+#define INTC_ICDIPR32_INT0_SHIFT                (16u)
+#define INTC_ICDIPR32_INT1_SHIFT                (24u)
+
+#define INTC_ICDIPR33_INT2_SHIFT                (0u)
+#define INTC_ICDIPR33_INT3_SHIFT                (8u)
+#define INTC_ICDIPR33_OSTM0TINT_SHIFT           (16u)
+#define INTC_ICDIPR33_OSTM1TINT_SHIFT           (24u)
+
+#define INTC_ICDIPR34_CMI_SHIFT                 (0u)
+#define INTC_ICDIPR34_WTOUT_SHIFT               (8u)
+#define INTC_ICDIPR34_ITI_SHIFT                 (16u)
+#define INTC_ICDIPR34_TGI0A_SHIFT               (24u)
+
+#define INTC_ICDIPR35_TGI0B_SHIFT               (0u)
+#define INTC_ICDIPR35_TGI0C_SHIFT               (8u)
+#define INTC_ICDIPR35_TGI0D_SHIFT               (16u)
+#define INTC_ICDIPR35_TGI0V_SHIFT               (24u)
+
+#define INTC_ICDIPR36_TGI0E_SHIFT               (0u)
+#define INTC_ICDIPR36_TGI0F_SHIFT               (8u)
+#define INTC_ICDIPR36_TGI1A_SHIFT               (16u)
+#define INTC_ICDIPR36_TGI1B_SHIFT               (24u)
+
+#define INTC_ICDIPR37_TGI1V_SHIFT               (0u)
+#define INTC_ICDIPR37_TGI1U_SHIFT               (8u)
+#define INTC_ICDIPR37_TGI2A_SHIFT               (16u)
+#define INTC_ICDIPR37_TGI2B_SHIFT               (24u)
+
+#define INTC_ICDIPR38_TGI2V_SHIFT               (0u)
+#define INTC_ICDIPR38_TGI2U_SHIFT               (8u)
+#define INTC_ICDIPR38_TGI3A_SHIFT               (16u)
+#define INTC_ICDIPR38_TGI3B_SHIFT               (24u)
+
+#define INTC_ICDIPR39_TGI3C_SHIFT               (0u)
+#define INTC_ICDIPR39_TGI3D_SHIFT               (8u)
+#define INTC_ICDIPR39_TGI3V_SHIFT               (16u)
+#define INTC_ICDIPR39_TGI4A_SHIFT               (24u)
+
+#define INTC_ICDIPR40_TGI4B_SHIFT               (0u)
+#define INTC_ICDIPR40_TGI4C_SHIFT               (8u)
+#define INTC_ICDIPR40_TGI4D_SHIFT               (16u)
+#define INTC_ICDIPR40_TGI4V_SHIFT               (24u)
+
+#define INTC_ICDIPR41_CMI1_SHIFT                (0u)
+#define INTC_ICDIPR41_CMI2_SHIFT                (8u)
+#define INTC_ICDIPR41_SGDEI0_SHIFT              (16u)
+#define INTC_ICDIPR41_SGDEI1_SHIFT              (24u)
+
+#define INTC_ICDIPR42_SGDEI2_SHIFT              (0u)
+#define INTC_ICDIPR42_SGDEI3_SHIFT              (8u)
+#define INTC_ICDIPR42_ADI_SHIFT                 (16u)
+#define INTC_ICDIPR42_LMTI_SHIFT                (24u)
+
+#define INTC_ICDIPR43_SSII0_SHIFT               (0u)
+#define INTC_ICDIPR43_SSIRXI0_SHIFT             (8u)
+#define INTC_ICDIPR43_SSITXI0_SHIFT             (16u)
+#define INTC_ICDIPR43_SSII1_SHIFT               (24u)
+
+#define INTC_ICDIPR44_SSIRXI1_SHIFT             (0u)
+#define INTC_ICDIPR44_SSITXI1_SHIFT             (8u)
+#define INTC_ICDIPR44_SSII2_SHIFT               (16u)
+#define INTC_ICDIPR44_SSIRTI2_SHIFT             (24u)
+
+#define INTC_ICDIPR45_SSII3_SHIFT               (0u)
+#define INTC_ICDIPR45_SSIRXI3_SHIFT             (8u)
+#define INTC_ICDIPR45_SSITXI3_SHIFT             (16u)
+#define INTC_ICDIPR45_SSII4_SHIFT               (24u)
+
+#define INTC_ICDIPR46_SSIRTI4_SHIFT             (0u)
+#define INTC_ICDIPR46_SSII5_SHIFT               (8u)
+#define INTC_ICDIPR46_SSIRXI5_SHIFT             (16u)
+#define INTC_ICDIPR46_SSITXI5_SHIFT             (24u)
+
+#define INTC_ICDIPR47_SPDIFI_SHIFT              (0u)
+#define INTC_ICDIPR47_INTIICTEI0_SHIFT          (8u)
+#define INTC_ICDIPR47_INTIICRI0_SHIFT           (16u)
+#define INTC_ICDIPR47_INTIICTI0_SHIFT           (24u)
+
+#define INTC_ICDIPR48_INTIICSPI0_SHIFT          (0u)
+#define INTC_ICDIPR48_INTIICSTI0_SHIFT          (8u)
+#define INTC_ICDIPR48_INTIICNAKI0_SHIFT         (16u)
+#define INTC_ICDIPR48_INTIICALI0_SHIFT          (24u)
+
+#define INTC_ICDIPR49_INTIICTMOI0_SHIFT         (0u)
+#define INTC_ICDIPR49_INTIICTEI1_SHIFT          (8u)
+#define INTC_ICDIPR49_INTIICRI1_SHIFT           (16u)
+#define INTC_ICDIPR49_INTIICTI1_SHIFT           (24u)
+
+#define INTC_ICDIPR50_INTIICSPI1_SHIFT          (0u)
+#define INTC_ICDIPR50_INTIICSTI1_SHIFT          (8u)
+#define INTC_ICDIPR50_INTIICNAKI1_SHIFT         (16u)
+#define INTC_ICDIPR50_INTIICALI1_SHIFT          (24u)
+
+#define INTC_ICDIPR51_INTIICTMOI1_SHIFT         (0u)
+#define INTC_ICDIPR51_INTIICTEI2_SHIFT          (8u)
+#define INTC_ICDIPR51_INTIICRI2_SHIFT           (16u)
+#define INTC_ICDIPR51_INTIICTI2_SHIFT           (24u)
+
+#define INTC_ICDIPR52_INTIICSPI2_SHIFT          (0u)
+#define INTC_ICDIPR52_INTIICSTI2_SHIFT          (8u)
+#define INTC_ICDIPR52_INTIICNAKI2_SHIFT         (16u)
+#define INTC_ICDIPR52_INTIICALI2_SHIFT          (24u)
+
+#define INTC_ICDIPR53_INTIICTMOI2_SHIFT         (0u)
+#define INTC_ICDIPR53_INTIICTEI3_SHIFT          (8u)
+#define INTC_ICDIPR53_INTIICRI3_SHIFT           (16u)
+#define INTC_ICDIPR53_INTIICTI3_SHIFT           (24u)
+
+#define INTC_ICDIPR54_INTIICSPI3_SHIFT          (0u)
+#define INTC_ICDIPR54_INTIICSTI3_SHIFT          (8u)
+#define INTC_ICDIPR54_INTIICNAKI3_SHIFT         (16u)
+#define INTC_ICDIPR54_INTIICALI3_SHIFT          (24u)
+
+#define INTC_ICDIPR55_INTIICTMOI3_SHIFT         (0u)
+#define INTC_ICDIPR55_BRI0_SHIFT                (8u)
+#define INTC_ICDIPR55_ERI0_SHIFT                (16u)
+#define INTC_ICDIPR55_RXI0_SHIFT                (24u)
+
+#define INTC_ICDIPR56_TXI0_SHIFT                (0u)
+#define INTC_ICDIPR56_BRI1_SHIFT                (8u)
+#define INTC_ICDIPR56_ERI1_SHIFT                (16u)
+#define INTC_ICDIPR56_RXI1_SHIFT                (24u)
+
+#define INTC_ICDIPR57_TXI1_SHIFT                (0u)
+#define INTC_ICDIPR57_BRI2_SHIFT                (8u)
+#define INTC_ICDIPR57_ERI2_SHIFT                (16u)
+#define INTC_ICDIPR57_RXI2_SHIFT                (24u)
+
+#define INTC_ICDIPR58_TXI2_SHIFT                (0u)
+#define INTC_ICDIPR58_BRI3_SHIFT                (8u)
+#define INTC_ICDIPR58_ERI3_SHIFT                (16u)
+#define INTC_ICDIPR58_RXI3_SHIFT                (24u)
+
+#define INTC_ICDIPR59_TXI3_SHIFT                (0u)
+#define INTC_ICDIPR59_BRI4_SHIFT                (8u)
+#define INTC_ICDIPR59_ERI4_SHIFT                (16u)
+#define INTC_ICDIPR59_RXI4_SHIFT                (24u)
+
+#define INTC_ICDIPR60_TXI4_SHIFT                (0u)
+#define INTC_ICDIPR60_BRI5_SHIFT                (8u)
+#define INTC_ICDIPR60_ERI5_SHIFT                (16u)
+#define INTC_ICDIPR60_RXI5_SHIFT                (24u)
+
+#define INTC_ICDIPR61_TXI5_SHIFT                (0u)
+#define INTC_ICDIPR61_BRI6_SHIFT                (8u)
+#define INTC_ICDIPR61_ERI6_SHIFT                (16u)
+#define INTC_ICDIPR61_RXI6_SHIFT                (24u)
+
+#define INTC_ICDIPR62_TXI6_SHIFT                (0u)
+#define INTC_ICDIPR62_BRI7_SHIFT                (8u)
+#define INTC_ICDIPR62_ERI7_SHIFT                (16u)
+#define INTC_ICDIPR62_RXI7_SHIFT                (24u)
+
+#define INTC_ICDIPR63_TXI7_SHIFT                (0u)
+#define INTC_ICDIPR63_INTRCANGERR_SHIFT         (8u)
+#define INTC_ICDIPR63_INTRCANGRECC_SHIFT        (16u)
+#define INTC_ICDIPR63_INTRCAN0REC_SHIFT         (24u)
+
+#define INTC_ICDIPR64_INTRCAN0ERR_SHIFT         (0u)
+#define INTC_ICDIPR64_INTRCAN0TRX_SHIFT         (8u)
+#define INTC_ICDIPR64_INTRCAN1REC_SHIFT         (16u)
+#define INTC_ICDIPR64_INTRCAN1ERR_SHIFT         (24u)
+
+#define INTC_ICDIPR65_INTRCAN1TRX_SHIFT         (0u)
+#define INTC_ICDIPR65_INTRCAN2REC_SHIFT         (8u)
+#define INTC_ICDIPR65_INTRCAN2ERR_SHIFT         (16u)
+#define INTC_ICDIPR65_INTRCAN2TRX_SHIFT         (24u)
+
+#define INTC_ICDIPR66_INTRCAN3REC_SHIFT         (0u)
+#define INTC_ICDIPR66_INTRCAN3ERR_SHIFT         (8u)
+#define INTC_ICDIPR66_INTRCAN3TRX_SHIFT         (16u)
+#define INTC_ICDIPR66_INTRCAN4REC_SHIFT         (24u)
+
+#define INTC_ICDIPR67_INTRCAN4ERR_SHIFT         (0u)
+#define INTC_ICDIPR67_INTRCAN4TRX_SHIFT         (8u)
+#define INTC_ICDIPR67_SPEI0_SHIFT               (16u)
+#define INTC_ICDIPR67_SPRI0_SHIFT               (24u)
+
+#define INTC_ICDIPR68_SPTI0_SHIFT               (0u)
+#define INTC_ICDIPR68_SPEI1_SHIFT               (8u)
+#define INTC_ICDIPR68_SPRI1_SHIFT               (16u)
+#define INTC_ICDIPR68_SPTI1_SHIFT               (24u)
+
+#define INTC_ICDIPR69_SPEI2_SHIFT               (0u)
+#define INTC_ICDIPR69_SPRI2_SHIFT               (8u)
+#define INTC_ICDIPR69_SPTI2_SHIFT               (16u)
+#define INTC_ICDIPR69_SPEI3_SHIFT               (24u)
+
+#define INTC_ICDIPR70_SPRI3_SHIFT               (0u)
+#define INTC_ICDIPR70_SPTI3_SHIFT               (8u)
+#define INTC_ICDIPR70_SPEI4_SHIFT               (16u)
+#define INTC_ICDIPR70_SPRI4_SHIFT               (24u)
+
+#define INTC_ICDIPR71_SPTI4_SHIFT               (0u)
+#define INTC_ICDIPR71_IEBBTD_SHIFT              (8u)
+#define INTC_ICDIPR71_IEBBTERR_SHIFT            (16u)
+#define INTC_ICDIPR71_IEBBTSTA_SHIFT            (24u)
+
+#define INTC_ICDIPR72_IEBBTV_SHIFT              (0u)
+#define INTC_ICDIPR72_ISY_SHIFT                 (8u)
+#define INTC_ICDIPR72_IERR_SHIFT                (16u)
+#define INTC_ICDIPR72_ITARG_SHIFT               (24u)
+
+#define INTC_ICDIPR73_ISEC_SHIFT                (0u)
+#define INTC_ICDIPR73_IBUF_SHIFT                (8u)
+#define INTC_ICDIPR73_IREADY_SHIFT              (16u)
+#define INTC_ICDIPR73_FLSTE_SHIFT               (24u)
+
+#define INTC_ICDIPR74_FLTENDI_SHIFT             (0u)
+#define INTC_ICDIPR74_FLTREQ0I_SHIFT            (8u)
+#define INTC_ICDIPR74_FLTREQ1I_SHIFT            (16u)
+#define INTC_ICDIPR74_MMC0_SHIFT                (24u)
+
+#define INTC_ICDIPR75_MMC1_SHIFT                (0u)
+#define INTC_ICDIPR75_MMC2_SHIFT                (8u)
+#define INTC_ICDIPR75_SDHI0_3_SHIFT             (16u)
+#define INTC_ICDIPR75_SDHI0_0_SHIFT             (24u)
+
+#define INTC_ICDIPR76_SDHI0_1_SHIFT             (0u)
+#define INTC_ICDIPR76_SDHI1_3_SHIFT             (8u)
+#define INTC_ICDIPR76_SDHI1_0_SHIFT             (16u)
+#define INTC_ICDIPR76_SDHI1_1_SHIFT             (24u)
+
+#define INTC_ICDIPR77_ARM_SHIFT                 (0u)
+#define INTC_ICDIPR77_PRD_SHIFT                 (8u)
+#define INTC_ICDIPR77_CUP_SHIFT                 (16u)
+#define INTC_ICDIPR77_SCUAI0_SHIFT              (24u)
+
+#define INTC_ICDIPR78_SCUAI1_SHIFT              (0u)
+#define INTC_ICDIPR78_SCUFDI0_SHIFT             (8u)
+#define INTC_ICDIPR78_SCUFDI1_SHIFT             (16u)
+#define INTC_ICDIPR78_SCUFDI2_SHIFT             (24u)
+
+#define INTC_ICDIPR79_SCUFDI3_SHIFT             (0u)
+#define INTC_ICDIPR79_SCUFUI0_SHIFT             (8u)
+#define INTC_ICDIPR79_SCUFUI1_SHIFT             (16u)
+#define INTC_ICDIPR79_SCUFUI2_SHIFT             (24u)
+
+#define INTC_ICDIPR80_SCUFUI3_SHIFT             (0u)
+#define INTC_ICDIPR80_SCUDVI0_SHIFT             (8u)
+#define INTC_ICDIPR80_SCUDVI1_SHIFT             (16u)
+#define INTC_ICDIPR80_SCUDVI2_SHIFT             (24u)
+
+#define INTC_ICDIPR81_SCUDVI3_SHIFT             (0u)
+#define INTC_ICDIPR81_MLB_CINT_SHIFT            (8u)
+#define INTC_ICDIPR81_MLB_SINT_SHIFT            (16u)
+#define INTC_ICDIPR81_DRC0_SHIFT                (24u)
+
+#define INTC_ICDIPR82_DRC1_SHIFT                (0u)
+#define INTC_ICDIPR82_LINI0_INT_T_SHIFT         (24u)
+
+#define INTC_ICDIPR83_LINI0_INT_R_SHIFT         (0u)
+#define INTC_ICDIPR83_LINI0_INT_S_SHIFT         (8u)
+#define INTC_ICDIPR83_LINI0_INT_M_SHIFT         (16u)
+#define INTC_ICDIPR83_LINI1_INT_T_SHIFT         (24u)
+
+#define INTC_ICDIPR84_LINI1_INT_R_SHIFT         (0u)
+#define INTC_ICDIPR84_LINI1_INT_S_SHIFT         (8u)
+#define INTC_ICDIPR84_LINI1_INT_M_SHIFT         (16u)
+
+#define INTC_ICDIPR86_ERI0_SHIFT                (24u)
+
+#define INTC_ICDIPR87_RXI0_SHIFT                (0u)
+#define INTC_ICDIPR87_TXI0_SHIFT                (8u)
+#define INTC_ICDIPR87_TEI0_SHIFT                (16u)
+#define INTC_ICDIPR87_ERI1_SHIFT                (24u)
+
+#define INTC_ICDIPR88_RXI1_SHIFT                (0u)
+#define INTC_ICDIPR88_TXI1_SHIFT                (8u)
+#define INTC_ICDIPR88_TEI1_SHIFT                (16u)
+#define INTC_ICDIPR88_AVBI_DATA_SHIFT           (24u)
+
+#define INTC_ICDIPR89_AVBI_ERROR_SHIFT          (0u)
+#define INTC_ICDIPR89_AVBI_MANAGE_SHIFT         (8u)
+#define INTC_ICDIPR89_AVBI_MAC_SHIFT            (16u)
+#define INTC_ICDIPR89_ETHERI_SHIFT              (24u)
+
+#define INTC_ICDIPR91_CEUI_SHIFT                (0u)
+
+#define INTC_ICDIPR95_H2XMLB_ERRINT_SHIFT       (8u)
+#define INTC_ICDIPR95_H2XIC1_ERRINT_SHIFT       (16u)
+#define INTC_ICDIPR95_X2HPERI1_ERRINT_SHIFT     (24u)
+
+#define INTC_ICDIPR96_X2HPERI2_ERRINT_SHIFT     (0u)
+#define INTC_ICDIPR96_X2HPERI34_ERRINT_SHIFT    (8u)
+#define INTC_ICDIPR96_X2HPERI5_ERRINT_SHIFT     (16u)
+#define INTC_ICDIPR96_X2HPERI67_ERRINT_SHIFT    (24u)
+
+#define INTC_ICDIPR97_X2HDBGR_ERRINT_SHIFT      (0u)
+#define INTC_ICDIPR97_X2HBSC_ERRINT_SHIFT       (8u)
+#define INTC_ICDIPR97_X2HSPI1_ERRINT_SHIFT      (16u)
+#define INTC_ICDIPR97_X2HSPI2_ERRINT_SHIFT      (24u)
+
+#define INTC_ICDIPR98_PRRI_SHIFT                (0u)
+#define INTC_ICDIPR98_IFEI0_SHIFT               (8u)
+#define INTC_ICDIPR98_OFFI0_SHIFT               (16u)
+#define INTC_ICDIPR98_PFVEI0_SHIFT              (24u)
+
+#define INTC_ICDIPR99_IFEI1_SHIFT               (0u)
+#define INTC_ICDIPR99_OFFI1_SHIFT               (8u)
+#define INTC_ICDIPR99_PFVEI1_SHIFT              (16u)
+
+#define INTC_ICDIPR104_TINT0_SHIFT              (0u)
+#define INTC_ICDIPR104_TINT1_SHIFT              (8u)
+#define INTC_ICDIPR104_TINT2_SHIFT              (16u)
+#define INTC_ICDIPR104_TINT3_SHIFT              (24u)
+
+#define INTC_ICDIPR105_TINT4_SHIFT              (0u)
+#define INTC_ICDIPR105_TINT5_SHIFT              (8u)
+#define INTC_ICDIPR105_TINT6_SHIFT              (16u)
+#define INTC_ICDIPR105_TINT7_SHIFT              (24u)
+
+#define INTC_ICDIPR106_TINT8_SHIFT              (0u)
+#define INTC_ICDIPR106_TINT9_SHIFT              (8u)
+#define INTC_ICDIPR106_TINT10_SHIFT             (16u)
+#define INTC_ICDIPR106_TINT11_SHIFT             (24u)
+
+#define INTC_ICDIPR107_TINT12_SHIFT             (0u)
+#define INTC_ICDIPR107_TINT13_SHIFT             (8u)
+#define INTC_ICDIPR107_TINT14_SHIFT             (16u)
+#define INTC_ICDIPR107_TINT15_SHIFT             (24u)
+
+#define INTC_ICDIPR108_TINT16_SHIFT             (0u)
+#define INTC_ICDIPR108_TINT17_SHIFT             (8u)
+#define INTC_ICDIPR108_TINT18_SHIFT             (16u)
+#define INTC_ICDIPR108_TINT19_SHIFT             (24u)
+
+#define INTC_ICDIPR109_TINT20_SHIFT             (0u)
+#define INTC_ICDIPR109_TINT21_SHIFT             (8u)
+#define INTC_ICDIPR109_TINT22_SHIFT             (16u)
+#define INTC_ICDIPR109_TINT23_SHIFT             (24u)
+
+#define INTC_ICDIPR110_TINT24_SHIFT             (0u)
+#define INTC_ICDIPR110_TINT25_SHIFT             (8u)
+#define INTC_ICDIPR110_TINT26_SHIFT             (16u)
+#define INTC_ICDIPR110_TINT27_SHIFT             (24u)
+
+#define INTC_ICDIPR111_TINT28_SHIFT             (0u)
+#define INTC_ICDIPR111_TINT29_SHIFT             (8u)
+#define INTC_ICDIPR111_TINT30_SHIFT             (16u)
+#define INTC_ICDIPR111_TINT31_SHIFT             (24u)
+
+#define INTC_ICDIPR112_TINT32_SHIFT             (0u)
+#define INTC_ICDIPR112_TINT33_SHIFT             (8u)
+#define INTC_ICDIPR112_TINT34_SHIFT             (16u)
+#define INTC_ICDIPR112_TINT35_SHIFT             (24u)
+
+#define INTC_ICDIPR113_TINT36_SHIFT             (0u)
+#define INTC_ICDIPR113_TINT37_SHIFT             (8u)
+#define INTC_ICDIPR113_TINT38_SHIFT             (16u)
+#define INTC_ICDIPR113_TINT39_SHIFT             (24u)
+
+#define INTC_ICDIPR114_TINT40_SHIFT             (0u)
+#define INTC_ICDIPR114_TINT41_SHIFT             (8u)
+#define INTC_ICDIPR114_TINT42_SHIFT             (16u)
+#define INTC_ICDIPR114_TINT43_SHIFT             (24u)
+
+#define INTC_ICDIPR115_TINT44_SHIFT             (0u)
+#define INTC_ICDIPR115_TINT45_SHIFT             (8u)
+#define INTC_ICDIPR115_TINT46_SHIFT             (16u)
+#define INTC_ICDIPR115_TINT47_SHIFT             (24u)
+
+#define INTC_ICDIPR116_TINT48_SHIFT             (0u)
+#define INTC_ICDIPR116_TINT49_SHIFT             (8u)
+#define INTC_ICDIPR116_TINT50_SHIFT             (16u)
+#define INTC_ICDIPR116_TINT51_SHIFT             (24u)
+
+#define INTC_ICDIPR117_TINT52_SHIFT             (0u)
+#define INTC_ICDIPR117_TINT53_SHIFT             (8u)
+#define INTC_ICDIPR117_TINT54_SHIFT             (16u)
+#define INTC_ICDIPR117_TINT55_SHIFT             (24u)
+
+#define INTC_ICDIPR118_TINT56_SHIFT             (0u)
+#define INTC_ICDIPR118_TINT57_SHIFT             (8u)
+#define INTC_ICDIPR118_TINT58_SHIFT             (16u)
+#define INTC_ICDIPR118_TINT59_SHIFT             (24u)
+
+#define INTC_ICDIPR119_TINT60_SHIFT             (0u)
+#define INTC_ICDIPR119_TINT61_SHIFT             (8u)
+#define INTC_ICDIPR119_TINT62_SHIFT             (16u)
+#define INTC_ICDIPR119_TINT63_SHIFT             (24u)
+
+#define INTC_ICDIPR120_TINT64_SHIFT             (0u)
+#define INTC_ICDIPR120_TINT65_SHIFT             (8u)
+#define INTC_ICDIPR120_TINT66_SHIFT             (16u)
+#define INTC_ICDIPR120_TINT67_SHIFT             (24u)
+
+#define INTC_ICDIPR121_TINT68_SHIFT             (0u)
+#define INTC_ICDIPR121_TINT69_SHIFT             (8u)
+#define INTC_ICDIPR121_TINT70_SHIFT             (16u)
+#define INTC_ICDIPR121_TINT71_SHIFT             (24u)
+
+#define INTC_ICDIPR122_TINT72_SHIFT             (0u)
+#define INTC_ICDIPR122_TINT73_SHIFT             (8u)
+#define INTC_ICDIPR122_TINT74_SHIFT             (16u)
+#define INTC_ICDIPR122_TINT75_SHIFT             (24u)
+
+#define INTC_ICDIPR123_TINT76_SHIFT             (0u)
+#define INTC_ICDIPR123_TINT77_SHIFT             (8u)
+#define INTC_ICDIPR123_TINT78_SHIFT             (16u)
+#define INTC_ICDIPR123_TINT79_SHIFT             (24u)
+
+#define INTC_ICDIPR124_TINT80_SHIFT             (0u)
+#define INTC_ICDIPR124_TINT81_SHIFT             (8u)
+#define INTC_ICDIPR124_TINT82_SHIFT             (16u)
+#define INTC_ICDIPR124_TINT83_SHIFT             (24u)
+
+#define INTC_ICDIPR125_TINT84_SHIFT             (0u)
+#define INTC_ICDIPR125_TINT85_SHIFT             (8u)
+#define INTC_ICDIPR125_TINT86_SHIFT             (16u)
+#define INTC_ICDIPR125_TINT87_SHIFT             (24u)
+
+#define INTC_ICDIPR126_TINT88_SHIFT             (0u)
+#define INTC_ICDIPR126_TINT89_SHIFT             (8u)
+#define INTC_ICDIPR126_TINT90_SHIFT             (16u)
+#define INTC_ICDIPR126_TINT91_SHIFT             (24u)
+
+#define INTC_ICDIPR127_TINT92_SHIFT             (0u)
+#define INTC_ICDIPR127_TINT93_SHIFT             (8u)
+#define INTC_ICDIPR127_TINT94_SHIFT             (16u)
+#define INTC_ICDIPR127_TINT95_SHIFT             (24u)
+
+#define INTC_ICDIPR128_TINT96_SHIFT             (0u)
+#define INTC_ICDIPR128_TINT97_SHIFT             (8u)
+#define INTC_ICDIPR128_TINT98_SHIFT             (16u)
+#define INTC_ICDIPR128_TINT99_SHIFT             (24u)
+
+#define INTC_ICDIPR129_TINT100_SHIFT            (0u)
+#define INTC_ICDIPR129_TINT101_SHIFT            (8u)
+#define INTC_ICDIPR129_TINT102_SHIFT            (16u)
+#define INTC_ICDIPR129_TINT103_SHIFT            (24u)
+
+#define INTC_ICDIPR130_TINT104_SHIFT            (0u)
+#define INTC_ICDIPR130_TINT105_SHIFT            (8u)
+#define INTC_ICDIPR130_TINT106_SHIFT            (16u)
+#define INTC_ICDIPR130_TINT107_SHIFT            (24u)
+
+#define INTC_ICDIPR131_TINT108_SHIFT            (0u)
+#define INTC_ICDIPR131_TINT109_SHIFT            (8u)
+#define INTC_ICDIPR131_TINT110_SHIFT            (16u)
+#define INTC_ICDIPR131_TINT111_SHIFT            (24u)
+
+#define INTC_ICDIPR132_TINT112_SHIFT            (0u)
+#define INTC_ICDIPR132_TINT113_SHIFT            (8u)
+#define INTC_ICDIPR132_TINT114_SHIFT            (16u)
+#define INTC_ICDIPR132_TINT115_SHIFT            (24u)
+
+#define INTC_ICDIPR133_TINT116_SHIFT            (0u)
+#define INTC_ICDIPR133_TINT117_SHIFT            (8u)
+#define INTC_ICDIPR133_TINT118_SHIFT            (16u)
+#define INTC_ICDIPR133_TINT119_SHIFT            (24u)
+
+#define INTC_ICDIPR134_TINT120_SHIFT            (0u)
+#define INTC_ICDIPR134_TINT121_SHIFT            (8u)
+#define INTC_ICDIPR134_TINT122_SHIFT            (16u)
+#define INTC_ICDIPR134_TINT123_SHIFT            (24u)
+
+#define INTC_ICDIPR135_TINT124_SHIFT            (0u)
+#define INTC_ICDIPR135_TINT125_SHIFT            (8u)
+#define INTC_ICDIPR135_TINT126_SHIFT            (16u)
+#define INTC_ICDIPR135_TINT127_SHIFT            (24u)
+
+#define INTC_ICDIPR136_TINT128_SHIFT            (0u)
+#define INTC_ICDIPR136_TINT129_SHIFT            (8u)
+#define INTC_ICDIPR136_TINT130_SHIFT            (16u)
+#define INTC_ICDIPR136_TINT131_SHIFT            (24u)
+
+#define INTC_ICDIPR137_TINT132_SHIFT            (0u)
+#define INTC_ICDIPR137_TINT133_SHIFT            (8u)
+#define INTC_ICDIPR137_TINT134_SHIFT            (16u)
+#define INTC_ICDIPR137_TINT135_SHIFT            (24u)
+
+#define INTC_ICDIPR138_TINT136_SHIFT            (0u)
+#define INTC_ICDIPR138_TINT137_SHIFT            (8u)
+#define INTC_ICDIPR138_TINT138_SHIFT            (16u)
+#define INTC_ICDIPR138_TINT139_SHIFT            (24u)
+
+#define INTC_ICDIPR139_TINT140_SHIFT            (0u)
+#define INTC_ICDIPR139_TINT141_SHIFT            (8u)
+#define INTC_ICDIPR139_TINT142_SHIFT            (16u)
+#define INTC_ICDIPR139_TINT143_SHIFT            (24u)
+
+#define INTC_ICDIPR140_TINT144_SHIFT            (0u)
+#define INTC_ICDIPR140_TINT145_SHIFT            (8u)
+#define INTC_ICDIPR140_TINT146_SHIFT            (16u)
+#define INTC_ICDIPR140_TINT147_SHIFT            (24u)
+
+#define INTC_ICDIPR141_TINT148_SHIFT            (0u)
+#define INTC_ICDIPR141_TINT149_SHIFT            (8u)
+#define INTC_ICDIPR141_TINT150_SHIFT            (16u)
+#define INTC_ICDIPR141_TINT151_SHIFT            (24u)
+
+#define INTC_ICDIPR142_TINT152_SHIFT            (0u)
+#define INTC_ICDIPR142_TINT153_SHIFT            (8u)
+#define INTC_ICDIPR142_TINT154_SHIFT            (16u)
+#define INTC_ICDIPR142_TINT155_SHIFT            (24u)
+
+#define INTC_ICDIPR143_TINT156_SHIFT            (0u)
+#define INTC_ICDIPR143_TINT157_SHIFT            (8u)
+#define INTC_ICDIPR143_TINT158_SHIFT            (16u)
+#define INTC_ICDIPR143_TINT159_SHIFT            (24u)
+
+#define INTC_ICDIPR144_TINT160_SHIFT            (0u)
+#define INTC_ICDIPR144_TINT161_SHIFT            (8u)
+#define INTC_ICDIPR144_TINT162_SHIFT            (16u)
+#define INTC_ICDIPR144_TINT163_SHIFT            (24u)
+
+#define INTC_ICDIPR145_TINT164_SHIFT            (0u)
+#define INTC_ICDIPR145_TINT165_SHIFT            (8u)
+#define INTC_ICDIPR145_TINT166_SHIFT            (16u)
+#define INTC_ICDIPR145_TINT167_SHIFT            (24u)
+
+#define INTC_ICDIPR146_TINT168_SHIFT            (0u)
+#define INTC_ICDIPR146_TINT169_SHIFT            (8u)
+#define INTC_ICDIPR146_TINT170_SHIFT            (16u)
+
+#define INTC_ICDIPTR0_SW0_SHIFT                 (0u)
+#define INTC_ICDIPTR0_SW1_SHIFT                 (8u)
+#define INTC_ICDIPTR0_SW2_SHIFT                 (16u)
+#define INTC_ICDIPTR0_SW3_SHIFT                 (24u)
+
+#define INTC_ICDIPTR1_SW4_SHIFT                 (0u)
+#define INTC_ICDIPTR1_SW5_SHIFT                 (8u)
+#define INTC_ICDIPTR1_SW6_SHIFT                 (16u)
+#define INTC_ICDIPTR1_SW7_SHIFT                 (24u)
+
+#define INTC_ICDIPTR2_SW8_SHIFT                 (0u)
+#define INTC_ICDIPTR2_SW9_SHIFT                 (8u)
+#define INTC_ICDIPTR2_SW10_SHIFT                (16u)
+#define INTC_ICDIPTR2_SW11_SHIFT                (24u)
+
+#define INTC_ICDIPTR3_SW12_SHIFT                (0u)
+#define INTC_ICDIPTR3_SW13_SHIFT                (8u)
+#define INTC_ICDIPTR3_SW14_SHIFT                (16u)
+#define INTC_ICDIPTR3_SW15_SHIFT                (24u)
+
+#define INTC_ICDIPTR4_PMUIRQ0_SHIFT             (0u)
+#define INTC_ICDIPTR4_COMMRX0_SHIFT             (8u)
+#define INTC_ICDIPTR4_COMMTX0_SHIFT             (16u)
+#define INTC_ICDIPTR4_CTIIRQ0_SHIFT             (24u)
+
+#define INTC_ICDIPTR8_IRQ0_SHIFT                (0u)
+#define INTC_ICDIPTR8_IRQ1_SHIFT                (8u)
+#define INTC_ICDIPTR8_IRQ2_SHIFT                (16u)
+#define INTC_ICDIPTR8_IRQ3_SHIFT                (24u)
+
+#define INTC_ICDIPTR9_IRQ4_SHIFT                (0u)
+#define INTC_ICDIPTR9_IRQ5_SHIFT                (8u)
+#define INTC_ICDIPTR9_IRQ6_SHIFT                (16u)
+#define INTC_ICDIPTR9_IRQ7_SHIFT                (24u)
+
+#define INTC_ICDIPTR10_PL310ERR_SHIFT           (0u)
+#define INTC_ICDIPTR10_DMAINT0_SHIFT            (8u)
+#define INTC_ICDIPTR10_DMAINT1_SHIFT            (16u)
+#define INTC_ICDIPTR10_DMAINT2_SHIFT            (24u)
+
+#define INTC_ICDIPTR11_DMAINT3_SHIFT            (0u)
+#define INTC_ICDIPTR11_DMAINT4_SHIFT            (8u)
+#define INTC_ICDIPTR11_DMAINT5_SHIFT            (16u)
+#define INTC_ICDIPTR11_DMAINT6_SHIFT            (24u)
+
+#define INTC_ICDIPTR12_DMAINT7_SHIFT            (0u)
+#define INTC_ICDIPTR12_DMAINT8_SHIFT            (8u)
+#define INTC_ICDIPTR12_DMAINT9_SHIFT            (16u)
+#define INTC_ICDIPTR12_DMAINT10_SHIFT           (24u)
+
+#define INTC_ICDIPTR13_DMAINT11_SHIFT           (0u)
+#define INTC_ICDIPTR13_DMAINT12_SHIFT           (8u)
+#define INTC_ICDIPTR13_DMAINT13_SHIFT           (16u)
+#define INTC_ICDIPTR13_DMAINT14_SHIFT           (24u)
+
+#define INTC_ICDIPTR14_DMAINT15_SHIFT           (0u)
+#define INTC_ICDIPTR14_DMAERR_SHIFT             (8u)
+
+#define INTC_ICDIPTR18_USBI0_SHIFT              (8u)
+#define INTC_ICDIPTR18_USBI1_SHIFT              (16u)
+#define INTC_ICDIPTR18_S0_VI_VSYNC0_SHIFT       (24u)
+
+#define INTC_ICDIPTR19_S0_LO_VSYNC0_SHIFT       (0u)
+#define INTC_ICDIPTR19_S0_VSYNCERR0_SHIFT       (8u)
+#define INTC_ICDIPTR19_GR3_VLINE0_SHIFT         (16u)
+#define INTC_ICDIPTR19_S0_VFIELD0_SHIFT         (24u)
+
+#define INTC_ICDIPTR20_IV1_VBUFERR0_SHIFT       (0u)
+#define INTC_ICDIPTR20_IV3_VBUFERR0_SHIFT       (8u)
+#define INTC_ICDIPTR20_IV5_VBUFERR0_SHIFT       (16u)
+#define INTC_ICDIPTR20_IV6_VBUFERR0_SHIFT       (24u)
+
+#define INTC_ICDIPTR21_S0_WLINE0_SHIFT          (0u)
+#define INTC_ICDIPTR21_S1_VI_VSYNC0_SHIFT       (8u)
+#define INTC_ICDIPTR21_S1_LO_VSYNC0_SHIFT       (16u)
+#define INTC_ICDIPTR21_S1_VSYNCERR0_SHIFT       (24u)
+
+#define INTC_ICDIPTR22_S1_VFIELD0_SHIFT         (0u)
+#define INTC_ICDIPTR22_IV2_VBUFERR0_SHIFT       (8u)
+#define INTC_ICDIPTR22_IV4_VBUFERR0_SHIFT       (16u)
+#define INTC_ICDIPTR22_S1_WLINE0_SHIFT          (24u)
+
+#define INTC_ICDIPTR23_OIR_VI_VSYNC0_SHIFT      (0u)
+#define INTC_ICDIPTR23_OIR_LO_VSYNC0_SHIFT      (8u)
+#define INTC_ICDIPTR23_OIR_VSYNCERR0_SHIFT      (16u)
+#define INTC_ICDIPTR23_OIR_VFIELD0_SHIFT        (24u)
+
+#define INTC_ICDIPTR24_IV7_VBUFERR0_SHIFT       (0u)
+#define INTC_ICDIPTR24_IV8_VBUFERR0_SHIFT       (8u)
+#define INTC_ICDIPTR24_S0_VI_VSYNC1_SHIFT       (24u)
+
+#define INTC_ICDIPTR25_S0_LO_VSYNC1_SHIFT       (0u)
+#define INTC_ICDIPTR25_S0_VSYNCERR1_SHIFT       (8u)
+#define INTC_ICDIPTR25_GR3_VLINE1_SHIFT         (16u)
+#define INTC_ICDIPTR25_S0_VFIELD1_SHIFT         (24u)
+
+#define INTC_ICDIPTR26_IV1_VBUFERR1_SHIFT       (0u)
+#define INTC_ICDIPTR26_IV3_VBUFERR1_SHIFT       (8u)
+#define INTC_ICDIPTR26_IV5_VBUFERR1_SHIFT       (16u)
+#define INTC_ICDIPTR26_IV6_VBUFERR1_SHIFT       (24u)
+
+#define INTC_ICDIPTR27_S0_WLINE1_SHIFT          (0u)
+#define INTC_ICDIPTR27_S1_VI_VSYNC1_SHIFT       (8u)
+#define INTC_ICDIPTR27_S1_LO_VSYNC1_SHIFT       (16u)
+#define INTC_ICDIPTR27_S1_VSYNCERR1_SHIFT       (24u)
+
+#define INTC_ICDIPTR28_S1_VFIELD1_SHIFT         (0u)
+#define INTC_ICDIPTR28_IV2_VBUFERR1_SHIFT       (8u)
+#define INTC_ICDIPTR28_IV4_VBUFERR1_SHIFT       (16u)
+#define INTC_ICDIPTR28_S1_WLINE1_SHIFT          (24u)
+
+#define INTC_ICDIPTR29_OIR_VI_VSYNC1_SHIFT      (0u)
+#define INTC_ICDIPTR29_OIR_LO_VSYNC1_SHIFT      (8u)
+#define INTC_ICDIPTR29_OIR_VLINE1_SHIFT         (16u)
+#define INTC_ICDIPTR29_OIR_VFIELD1_SHIFT        (24u)
+
+#define INTC_ICDIPTR30_IV7_VBUFERR1_SHIFT       (0u)
+#define INTC_ICDIPTR30_IV8_VBUFERR1_SHIFT       (8u)
+#define INTC_ICDIPTR30_IMRDI_SHIFT              (24u)
+
+#define INTC_ICDIPTR31_IMR2I0_SHIFT             (0u)
+#define INTC_ICDIPTR31_IMR2I1_SHIFT             (8u)
+#define INTC_ICDIPTR31_JEDI_SHIFT               (16u)
+#define INTC_ICDIPTR31_JDTI_SHIFT               (24u)
+
+#define INTC_ICDIPTR32_CMP0_SHIFT               (0u)
+#define INTC_ICDIPTR32_CMP1_SHIFT               (8u)
+#define INTC_ICDIPTR32_INT0_SHIFT               (16u)
+#define INTC_ICDIPTR32_INT1_SHIFT               (24u)
+
+#define INTC_ICDIPTR33_INT2_SHIFT               (0u)
+#define INTC_ICDIPTR33_INT3_SHIFT               (8u)
+#define INTC_ICDIPTR33_OSTM0TINT_SHIFT          (16u)
+#define INTC_ICDIPTR33_OSTM1TINT_SHIFT          (24u)
+
+#define INTC_ICDIPTR34_CMI_SHIFT                (0u)
+#define INTC_ICDIPTR34_WTOUT_SHIFT              (8u)
+#define INTC_ICDIPTR34_ITI_SHIFT                (16u)
+#define INTC_ICDIPTR34_TGI0A_SHIFT              (24u)
+
+#define INTC_ICDIPTR35_TGI0B_SHIFT              (0u)
+#define INTC_ICDIPTR35_TGI0C_SHIFT              (8u)
+#define INTC_ICDIPTR35_TGI0D_SHIFT              (16u)
+#define INTC_ICDIPTR35_TGI0V_SHIFT              (24u)
+
+#define INTC_ICDIPTR36_TGI0E_SHIFT              (0u)
+#define INTC_ICDIPTR36_TGI0F_SHIFT              (8u)
+#define INTC_ICDIPTR36_TGI1A_SHIFT              (16u)
+#define INTC_ICDIPTR36_TGI1B_SHIFT              (24u)
+
+#define INTC_ICDIPTR37_TGI1V_SHIFT              (0u)
+#define INTC_ICDIPTR37_TGI1U_SHIFT              (8u)
+#define INTC_ICDIPTR37_TGI2A_SHIFT              (16u)
+#define INTC_ICDIPTR37_TGI2B_SHIFT              (24u)
+
+#define INTC_ICDIPTR38_TGI2V_SHIFT              (0u)
+#define INTC_ICDIPTR38_TGI2U_SHIFT              (8u)
+#define INTC_ICDIPTR38_TGI3A_SHIFT              (16u)
+#define INTC_ICDIPTR38_TGI3B_SHIFT              (24u)
+
+#define INTC_ICDIPTR39_TGI3C_SHIFT              (0u)
+#define INTC_ICDIPTR39_TGI3D_SHIFT              (8u)
+#define INTC_ICDIPTR39_TGI3V_SHIFT              (16u)
+#define INTC_ICDIPTR39_TGI4A_SHIFT              (24u)
+
+#define INTC_ICDIPTR40_TGI4B_SHIFT              (0u)
+#define INTC_ICDIPTR40_TGI4C_SHIFT              (8u)
+#define INTC_ICDIPTR40_TGI4D_SHIFT              (16u)
+#define INTC_ICDIPTR40_TGI4V_SHIFT              (24u)
+
+#define INTC_ICDIPTR41_CMI1_SHIFT               (0u)
+#define INTC_ICDIPTR41_CMI2_SHIFT               (8u)
+#define INTC_ICDIPTR41_SGDEI0_SHIFT             (16u)
+#define INTC_ICDIPTR41_SGDEI1_SHIFT             (24u)
+
+#define INTC_ICDIPTR42_SGDEI2_SHIFT             (0u)
+#define INTC_ICDIPTR42_SGDEI3_SHIFT             (8u)
+#define INTC_ICDIPTR42_ADI_SHIFT                (16u)
+#define INTC_ICDIPTR42_LMTI_SHIFT               (24u)
+
+#define INTC_ICDIPTR43_SSII0_SHIFT              (0u)
+#define INTC_ICDIPTR43_SSIRXI0_SHIFT            (8u)
+#define INTC_ICDIPTR43_SSITXI0_SHIFT            (16u)
+#define INTC_ICDIPTR43_SSII1_SHIFT              (24u)
+
+#define INTC_ICDIPTR44_SSIRXI1_SHIFT            (0u)
+#define INTC_ICDIPTR44_SSITXI1_SHIFT            (8u)
+#define INTC_ICDIPTR44_SSII2_SHIFT              (16u)
+#define INTC_ICDIPTR44_SSIRTI2_SHIFT            (24u)
+
+#define INTC_ICDIPTR45_SSII3_SHIFT              (0u)
+#define INTC_ICDIPTR45_SSIRXI3_SHIFT            (8u)
+#define INTC_ICDIPTR45_SSITXI3_SHIFT            (16u)
+#define INTC_ICDIPTR45_SSII4_SHIFT              (24u)
+
+#define INTC_ICDIPTR46_SSIRTI4_SHIFT            (0u)
+#define INTC_ICDIPTR46_SSII5_SHIFT              (8u)
+#define INTC_ICDIPTR46_SSIRXI5_SHIFT            (16u)
+#define INTC_ICDIPTR46_SSITXI5_SHIFT            (24u)
+
+#define INTC_ICDIPTR47_SPDIFI_SHIFT             (0u)
+#define INTC_ICDIPTR47_INTIICTEI0_SHIFT         (8u)
+#define INTC_ICDIPTR47_INTIICRI0_SHIFT          (16u)
+#define INTC_ICDIPTR47_INTIICTI0_SHIFT          (24u)
+
+#define INTC_ICDIPTR48_INTIICSPI0_SHIFT         (0u)
+#define INTC_ICDIPTR48_INTIICSTI0_SHIFT         (8u)
+#define INTC_ICDIPTR48_INTIICNAKI0_SHIFT        (16u)
+#define INTC_ICDIPTR48_INTIICALI0_SHIFT         (24u)
+
+#define INTC_ICDIPTR49_INTIICTMOI0_SHIFT        (0u)
+#define INTC_ICDIPTR49_INTIICTEI1_SHIFT         (8u)
+#define INTC_ICDIPTR49_INTIICRI1_SHIFT          (16u)
+#define INTC_ICDIPTR49_INTIICTI1_SHIFT          (24u)
+
+#define INTC_ICDIPTR50_INTIICSPI1_SHIFT         (0u)
+#define INTC_ICDIPTR50_INTIICSTI1_SHIFT         (8u)
+#define INTC_ICDIPTR50_INTIICNAKI1_SHIFT        (16u)
+#define INTC_ICDIPTR50_INTIICALI1_SHIFT         (24u)
+
+#define INTC_ICDIPTR51_INTIICTMOI1_SHIFT        (0u)
+#define INTC_ICDIPTR51_INTIICTEI2_SHIFT         (8u)
+#define INTC_ICDIPTR51_INTIICRI2_SHIFT          (16u)
+#define INTC_ICDIPTR51_INTIICTI2_SHIFT          (24u)
+
+#define INTC_ICDIPTR52_INTIICSPI2_SHIFT         (0u)
+#define INTC_ICDIPTR52_INTIICSTI2_SHIFT         (8u)
+#define INTC_ICDIPTR52_INTIICNAKI2_SHIFT        (16u)
+#define INTC_ICDIPTR52_INTIICALI2_SHIFT         (24u)
+
+#define INTC_ICDIPTR53_INTIICTMOI2_SHIFT        (0u)
+#define INTC_ICDIPTR53_INTIICTEI3_SHIFT         (8u)
+#define INTC_ICDIPTR53_INTIICRI3_SHIFT          (16u)
+#define INTC_ICDIPTR53_INTIICTI3_SHIFT          (24u)
+
+#define INTC_ICDIPTR54_INTIICSPI3_SHIFT         (0u)
+#define INTC_ICDIPTR54_INTIICSTI3_SHIFT         (8u)
+#define INTC_ICDIPTR54_INTIICNAKI3_SHIFT        (16u)
+#define INTC_ICDIPTR54_INTIICALI3_SHIFT         (24u)
+
+#define INTC_ICDIPTR55_INTIICTMOI3_SHIFT        (0u)
+#define INTC_ICDIPTR55_BRI0_SHIFT               (8u)
+#define INTC_ICDIPTR55_ERI0_SHIFT               (16u)
+#define INTC_ICDIPTR55_RXI0_SHIFT               (24u)
+
+#define INTC_ICDIPTR56_TXI0_SHIFT               (0u)
+#define INTC_ICDIPTR56_BRI1_SHIFT               (8u)
+#define INTC_ICDIPTR56_ERI1_SHIFT               (16u)
+#define INTC_ICDIPTR56_RXI1_SHIFT               (24u)
+
+#define INTC_ICDIPTR57_TXI1_SHIFT               (0u)
+#define INTC_ICDIPTR57_BRI2_SHIFT               (8u)
+#define INTC_ICDIPTR57_ERI2_SHIFT               (16u)
+#define INTC_ICDIPTR57_RXI2_SHIFT               (24u)
+
+#define INTC_ICDIPTR58_TXI2_SHIFT               (0u)
+#define INTC_ICDIPTR58_BRI3_SHIFT               (8u)
+#define INTC_ICDIPTR58_ERI3_SHIFT               (16u)
+#define INTC_ICDIPTR58_RXI3_SHIFT               (24u)
+
+#define INTC_ICDIPTR59_TXI3_SHIFT               (0u)
+#define INTC_ICDIPTR59_BRI4_SHIFT               (8u)
+#define INTC_ICDIPTR59_ERI4_SHIFT               (16u)
+#define INTC_ICDIPTR59_RXI4_SHIFT               (24u)
+
+#define INTC_ICDIPTR60_TXI4_SHIFT               (0u)
+#define INTC_ICDIPTR60_BRI5_SHIFT               (8u)
+#define INTC_ICDIPTR60_ERI5_SHIFT               (16u)
+#define INTC_ICDIPTR60_RXI5_SHIFT               (24u)
+
+#define INTC_ICDIPTR61_TXI5_SHIFT               (0u)
+#define INTC_ICDIPTR61_BRI6_SHIFT               (8u)
+#define INTC_ICDIPTR61_ERI6_SHIFT               (16u)
+#define INTC_ICDIPTR61_RXI6_SHIFT               (24u)
+
+#define INTC_ICDIPTR62_TXI6_SHIFT               (0u)
+#define INTC_ICDIPTR62_BRI7_SHIFT               (8u)
+#define INTC_ICDIPTR62_ERI7_SHIFT               (16u)
+#define INTC_ICDIPTR62_RXI7_SHIFT               (24u)
+
+#define INTC_ICDIPTR63_TXI7_SHIFT               (0u)
+#define INTC_ICDIPTR63_INTRCANGERR_SHIFT        (8u)
+#define INTC_ICDIPTR63_INTRCANGRECC_SHIFT       (16u)
+#define INTC_ICDIPTR63_INTRCAN0REC_SHIFT        (24u)
+
+#define INTC_ICDIPTR64_INTRCAN0ERR_SHIFT        (0u)
+#define INTC_ICDIPTR64_INTRCAN0TRX_SHIFT        (8u)
+#define INTC_ICDIPTR64_INTRCAN1REC_SHIFT        (16u)
+#define INTC_ICDIPTR64_INTRCAN1ERR_SHIFT        (24u)
+
+#define INTC_ICDIPTR65_INTRCAN1TRX_SHIFT        (0u)
+#define INTC_ICDIPTR65_INTRCAN2REC_SHIFT        (8u)
+#define INTC_ICDIPTR65_INTRCAN2ERR_SHIFT        (16u)
+#define INTC_ICDIPTR65_INTRCAN2TRX_SHIFT        (24u)
+
+#define INTC_ICDIPTR66_INTRCAN3REC_SHIFT        (0u)
+#define INTC_ICDIPTR66_INTRCAN3ERR_SHIFT        (8u)
+#define INTC_ICDIPTR66_INTRCAN3TRX_SHIFT        (16u)
+#define INTC_ICDIPTR66_INTRCAN4REC_SHIFT        (24u)
+
+#define INTC_ICDIPTR67_INTRCAN4ERR_SHIFT        (0u)
+#define INTC_ICDIPTR67_INTRCAN4TRX_SHIFT        (8u)
+#define INTC_ICDIPTR67_SPEI0_SHIFT              (16u)
+#define INTC_ICDIPTR67_SPRI0_SHIFT              (24u)
+
+#define INTC_ICDIPTR68_SPTI0_SHIFT              (0u)
+#define INTC_ICDIPTR68_SPEI1_SHIFT              (8u)
+#define INTC_ICDIPTR68_SPRI1_SHIFT              (16u)
+#define INTC_ICDIPTR68_SPTI1_SHIFT              (24u)
+
+#define INTC_ICDIPTR69_SPEI2_SHIFT              (0u)
+#define INTC_ICDIPTR69_SPRI2_SHIFT              (8u)
+#define INTC_ICDIPTR69_SPTI2_SHIFT              (16u)
+#define INTC_ICDIPTR69_SPEI3_SHIFT              (24u)
+
+#define INTC_ICDIPTR70_SPRI3_SHIFT              (0u)
+#define INTC_ICDIPTR70_SPTI3_SHIFT              (8u)
+#define INTC_ICDIPTR70_SPEI4_SHIFT              (16u)
+#define INTC_ICDIPTR70_SPRI4_SHIFT              (24u)
+
+#define INTC_ICDIPTR71_SPTI4_SHIFT              (0u)
+#define INTC_ICDIPTR71_IEBBTD_SHIFT             (8u)
+#define INTC_ICDIPTR71_IEBBTERR_SHIFT           (16u)
+#define INTC_ICDIPTR71_IEBBTSTA_SHIFT           (24u)
+
+#define INTC_ICDIPTR72_IEBBTV_SHIFT             (0u)
+#define INTC_ICDIPTR72_ISY_SHIFT                (8u)
+#define INTC_ICDIPTR72_IERR_SHIFT               (16u)
+#define INTC_ICDIPTR72_ITARG_SHIFT              (24u)
+
+#define INTC_ICDIPTR73_ISEC_SHIFT               (0u)
+#define INTC_ICDIPTR73_IBUF_SHIFT               (8u)
+#define INTC_ICDIPTR73_IREADY_SHIFT             (16u)
+#define INTC_ICDIPTR73_FLSTE_SHIFT              (24u)
+
+#define INTC_ICDIPTR74_FLTENDI_SHIFT            (0u)
+#define INTC_ICDIPTR74_FLTREQ0I_SHIFT           (8u)
+#define INTC_ICDIPTR74_FLTREQ1I_SHIFT           (16u)
+#define INTC_ICDIPTR74_MMC0_SHIFT               (24u)
+
+#define INTC_ICDIPTR75_MMC1_SHIFT               (0u)
+#define INTC_ICDIPTR75_MMC2_SHIFT               (8u)
+#define INTC_ICDIPTR75_SDHI0_3_SHIFT            (16u)
+#define INTC_ICDIPTR75_SDHI0_0_SHIFT            (24u)
+
+#define INTC_ICDIPTR76_SDHI0_1_SHIFT            (0u)
+#define INTC_ICDIPTR76_SDHI1_3_SHIFT            (8u)
+#define INTC_ICDIPTR76_SDHI1_0_SHIFT            (16u)
+#define INTC_ICDIPTR76_SDHI1_1_SHIFT            (24u)
+
+#define INTC_ICDIPTR77_ARM_SHIFT                (0u)
+#define INTC_ICDIPTR77_PRD_SHIFT                (8u)
+#define INTC_ICDIPTR77_CUP_SHIFT                (16u)
+#define INTC_ICDIPTR77_SCUAI0_SHIFT             (24u)
+
+#define INTC_ICDIPTR78_SCUAI1_SHIFT             (0u)
+#define INTC_ICDIPTR78_SCUFDI0_SHIFT            (8u)
+#define INTC_ICDIPTR78_SCUFDI1_SHIFT            (16u)
+#define INTC_ICDIPTR78_SCUFDI2_SHIFT            (24u)
+
+#define INTC_ICDIPTR79_SCUFDI3_SHIFT            (0u)
+#define INTC_ICDIPTR79_SCUFUI0_SHIFT            (8u)
+#define INTC_ICDIPTR79_SCUFUI1_SHIFT            (16u)
+#define INTC_ICDIPTR79_SCUFUI2_SHIFT            (24u)
+
+#define INTC_ICDIPTR80_SCUFUI3_SHIFT            (0u)
+#define INTC_ICDIPTR80_SCUDVI0_SHIFT            (8u)
+#define INTC_ICDIPTR80_SCUDVI1_SHIFT            (16u)
+#define INTC_ICDIPTR80_SCUDVI2_SHIFT            (24u)
+
+#define INTC_ICDIPTR81_SCUDVI3_SHIFT            (0u)
+#define INTC_ICDIPTR81_MLB_CINT_SHIFT           (8u)
+#define INTC_ICDIPTR81_MLB_SINT_SHIFT           (16u)
+#define INTC_ICDIPTR81_DRC0_SHIFT               (24u)
+
+#define INTC_ICDIPTR82_DRC1_SHIFT               (0u)
+#define INTC_ICDIPTR82_LINI0_INT_T_SHIFT        (24u)
+
+#define INTC_ICDIPTR83_LINI0_INT_R_SHIFT        (0u)
+#define INTC_ICDIPTR83_LINI0_INT_S_SHIFT        (8u)
+#define INTC_ICDIPTR83_LINI0_INT_M_SHIFT        (16u)
+#define INTC_ICDIPTR83_LINI1_INT_T_SHIFT        (24u)
+
+#define INTC_ICDIPTR84_LINI1_INT_R_SHIFT        (0u)
+#define INTC_ICDIPTR84_LINI1_INT_S_SHIFT        (8u)
+#define INTC_ICDIPTR84_LINI1_INT_M_SHIFT        (16u)
+
+#define INTC_ICDIPTR86_ERI0_SHIFT               (24u)
+
+#define INTC_ICDIPTR87_RXI0_SHIFT               (0u)
+#define INTC_ICDIPTR87_TXI0_SHIFT               (8u)
+#define INTC_ICDIPTR87_TEI0_SHIFT               (16u)
+#define INTC_ICDIPTR87_ERI1_SHIFT               (24u)
+
+#define INTC_ICDIPTR88_RXI1_SHIFT               (0u)
+#define INTC_ICDIPTR88_TXI1_SHIFT               (8u)
+#define INTC_ICDIPTR88_TEI1_SHIFT               (16u)
+#define INTC_ICDIPTR88_AVBI_DATA_SHIFT          (24u)
+
+#define INTC_ICDIPTR89_AVBI_ERROR_SHIFT         (0u)
+#define INTC_ICDIPTR89_AVBI_MANAGE_SHIFT        (8u)
+#define INTC_ICDIPTR89_AVBI_MAC_SHIFT           (16u)
+#define INTC_ICDIPTR89_ETHERI_SHIFT             (24u)
+
+#define INTC_ICDIPTR91_CEUI_SHIFT               (0u)
+
+#define INTC_ICDIPTR95_H2XMLB_ERRINT_SHIFT      (8u)
+#define INTC_ICDIPTR95_H2XIC1_ERRINT_SHIFT      (16u)
+#define INTC_ICDIPTR95_X2HPERI1_ERRINT_SHIFT    (24u)
+
+#define INTC_ICDIPTR96_X2HPERI2_ERRINT_SHIFT    (0u)
+#define INTC_ICDIPTR96_X2HPERI34_ERRINT_SHIFT   (8u)
+#define INTC_ICDIPTR96_X2HPERI5_ERRINT_SHIFT    (16u)
+#define INTC_ICDIPTR96_X2HPERI67_ERRINT_SHIFT   (24u)
+
+#define INTC_ICDIPTR97_X2HDBGR_ERRINT_SHIFT     (0u)
+#define INTC_ICDIPTR97_X2HBSC_ERRINT_SHIFT      (8u)
+#define INTC_ICDIPTR97_X2HSPI1_ERRINT_SHIFT     (16u)
+#define INTC_ICDIPTR97_X2HSPI2_ERRINT_SHIFT     (24u)
+
+#define INTC_ICDIPTR98_PRRI_SHIFT               (0u)
+#define INTC_ICDIPTR98_IFEI0_SHIFT              (8u)
+#define INTC_ICDIPTR98_OFFI0_SHIFT              (16u)
+#define INTC_ICDIPTR98_PFVEI0_SHIFT             (24u)
+
+#define INTC_ICDIPTR99_IFEI1_SHIFT              (0u)
+#define INTC_ICDIPTR99_OFFI1_SHIFT              (8u)
+#define INTC_ICDIPTR99_PFVEI1_SHIFT             (16u)
+
+#define INTC_ICDIPTR104_TINT0_SHIFT             (0u)
+#define INTC_ICDIPTR104_TINT1_SHIFT             (8u)
+#define INTC_ICDIPTR104_TINT2_SHIFT             (16u)
+#define INTC_ICDIPTR104_TINT3_SHIFT             (24u)
+
+#define INTC_ICDIPTR105_TINT4_SHIFT             (0u)
+#define INTC_ICDIPTR105_TINT5_SHIFT             (8u)
+#define INTC_ICDIPTR105_TINT6_SHIFT             (16u)
+#define INTC_ICDIPTR105_TINT7_SHIFT             (24u)
+
+#define INTC_ICDIPTR106_TINT8_SHIFT             (0u)
+#define INTC_ICDIPTR106_TINT9_SHIFT             (8u)
+#define INTC_ICDIPTR106_TINT10_SHIFT            (16u)
+#define INTC_ICDIPTR106_TINT11_SHIFT            (24u)
+
+#define INTC_ICDIPTR107_TINT12_SHIFT            (0u)
+#define INTC_ICDIPTR107_TINT13_SHIFT            (8u)
+#define INTC_ICDIPTR107_TINT14_SHIFT            (16u)
+#define INTC_ICDIPTR107_TINT15_SHIFT            (24u)
+
+#define INTC_ICDIPTR108_TINT16_SHIFT            (0u)
+#define INTC_ICDIPTR108_TINT17_SHIFT            (8u)
+#define INTC_ICDIPTR108_TINT18_SHIFT            (16u)
+#define INTC_ICDIPTR108_TINT19_SHIFT            (24u)
+
+#define INTC_ICDIPTR109_TINT20_SHIFT            (0u)
+#define INTC_ICDIPTR109_TINT21_SHIFT            (8u)
+#define INTC_ICDIPTR109_TINT22_SHIFT            (16u)
+#define INTC_ICDIPTR109_TINT23_SHIFT            (24u)
+
+#define INTC_ICDIPTR110_TINT24_SHIFT            (0u)
+#define INTC_ICDIPTR110_TINT25_SHIFT            (8u)
+#define INTC_ICDIPTR110_TINT26_SHIFT            (16u)
+#define INTC_ICDIPTR110_TINT27_SHIFT            (24u)
+
+#define INTC_ICDIPTR111_TINT28_SHIFT            (0u)
+#define INTC_ICDIPTR111_TINT29_SHIFT            (8u)
+#define INTC_ICDIPTR111_TINT30_SHIFT            (16u)
+#define INTC_ICDIPTR111_TINT31_SHIFT            (24u)
+
+#define INTC_ICDIPTR112_TINT32_SHIFT            (0u)
+#define INTC_ICDIPTR112_TINT33_SHIFT            (8u)
+#define INTC_ICDIPTR112_TINT34_SHIFT            (16u)
+#define INTC_ICDIPTR112_TINT35_SHIFT            (24u)
+
+#define INTC_ICDIPTR113_TINT36_SHIFT            (0u)
+#define INTC_ICDIPTR113_TINT37_SHIFT            (8u)
+#define INTC_ICDIPTR113_TINT38_SHIFT            (16u)
+#define INTC_ICDIPTR113_TINT39_SHIFT            (24u)
+
+#define INTC_ICDIPTR114_TINT40_SHIFT            (0u)
+#define INTC_ICDIPTR114_TINT41_SHIFT            (8u)
+#define INTC_ICDIPTR114_TINT42_SHIFT            (16u)
+#define INTC_ICDIPTR114_TINT43_SHIFT            (24u)
+
+#define INTC_ICDIPTR115_TINT44_SHIFT            (0u)
+#define INTC_ICDIPTR115_TINT45_SHIFT            (8u)
+#define INTC_ICDIPTR115_TINT46_SHIFT            (16u)
+#define INTC_ICDIPTR115_TINT47_SHIFT            (24u)
+
+#define INTC_ICDIPTR116_TINT48_SHIFT            (0u)
+#define INTC_ICDIPTR116_TINT49_SHIFT            (8u)
+#define INTC_ICDIPTR116_TINT50_SHIFT            (16u)
+#define INTC_ICDIPTR116_TINT51_SHIFT            (24u)
+
+#define INTC_ICDIPTR117_TINT52_SHIFT            (0u)
+#define INTC_ICDIPTR117_TINT53_SHIFT            (8u)
+#define INTC_ICDIPTR117_TINT54_SHIFT            (16u)
+#define INTC_ICDIPTR117_TINT55_SHIFT            (24u)
+
+#define INTC_ICDIPTR118_TINT56_SHIFT            (0u)
+#define INTC_ICDIPTR118_TINT57_SHIFT            (8u)
+#define INTC_ICDIPTR118_TINT58_SHIFT            (16u)
+#define INTC_ICDIPTR118_TINT59_SHIFT            (24u)
+
+#define INTC_ICDIPTR119_TINT60_SHIFT            (0u)
+#define INTC_ICDIPTR119_TINT61_SHIFT            (8u)
+#define INTC_ICDIPTR119_TINT62_SHIFT            (16u)
+#define INTC_ICDIPTR119_TINT63_SHIFT            (24u)
+
+#define INTC_ICDIPTR120_TINT64_SHIFT            (0u)
+#define INTC_ICDIPTR120_TINT65_SHIFT            (8u)
+#define INTC_ICDIPTR120_TINT66_SHIFT            (16u)
+#define INTC_ICDIPTR120_TINT67_SHIFT            (24u)
+
+#define INTC_ICDIPTR121_TINT68_SHIFT            (0u)
+#define INTC_ICDIPTR121_TINT69_SHIFT            (8u)
+#define INTC_ICDIPTR121_TINT70_SHIFT            (16u)
+#define INTC_ICDIPTR121_TINT71_SHIFT            (24u)
+
+#define INTC_ICDIPTR122_TINT72_SHIFT            (0u)
+#define INTC_ICDIPTR122_TINT73_SHIFT            (8u)
+#define INTC_ICDIPTR122_TINT74_SHIFT            (16u)
+#define INTC_ICDIPTR122_TINT75_SHIFT            (24u)
+
+#define INTC_ICDIPTR123_TINT76_SHIFT            (0u)
+#define INTC_ICDIPTR123_TINT77_SHIFT            (8u)
+#define INTC_ICDIPTR123_TINT78_SHIFT            (16u)
+#define INTC_ICDIPTR123_TINT79_SHIFT            (24u)
+
+#define INTC_ICDIPTR124_TINT80_SHIFT            (0u)
+#define INTC_ICDIPTR124_TINT81_SHIFT            (8u)
+#define INTC_ICDIPTR124_TINT82_SHIFT            (16u)
+#define INTC_ICDIPTR124_TINT83_SHIFT            (24u)
+
+#define INTC_ICDIPTR125_TINT84_SHIFT            (0u)
+#define INTC_ICDIPTR125_TINT85_SHIFT            (8u)
+#define INTC_ICDIPTR125_TINT86_SHIFT            (16u)
+#define INTC_ICDIPTR125_TINT87_SHIFT            (24u)
+
+#define INTC_ICDIPTR126_TINT88_SHIFT            (0u)
+#define INTC_ICDIPTR126_TINT89_SHIFT            (8u)
+#define INTC_ICDIPTR126_TINT90_SHIFT            (16u)
+#define INTC_ICDIPTR126_TINT91_SHIFT            (24u)
+
+#define INTC_ICDIPTR127_TINT92_SHIFT            (0u)
+#define INTC_ICDIPTR127_TINT93_SHIFT            (8u)
+#define INTC_ICDIPTR127_TINT94_SHIFT            (16u)
+#define INTC_ICDIPTR127_TINT95_SHIFT            (24u)
+
+#define INTC_ICDIPTR128_TINT96_SHIFT            (0u)
+#define INTC_ICDIPTR128_TINT97_SHIFT            (8u)
+#define INTC_ICDIPTR128_TINT98_SHIFT            (16u)
+#define INTC_ICDIPTR128_TINT99_SHIFT            (24u)
+
+#define INTC_ICDIPTR129_TINT100_SHIFT           (0u)
+#define INTC_ICDIPTR129_TINT101_SHIFT           (8u)
+#define INTC_ICDIPTR129_TINT102_SHIFT           (16u)
+#define INTC_ICDIPTR129_TINT103_SHIFT           (24u)
+
+#define INTC_ICDIPTR130_TINT104_SHIFT           (0u)
+#define INTC_ICDIPTR130_TINT105_SHIFT           (8u)
+#define INTC_ICDIPTR130_TINT106_SHIFT           (16u)
+#define INTC_ICDIPTR130_TINT107_SHIFT           (24u)
+
+#define INTC_ICDIPTR131_TINT108_SHIFT           (0u)
+#define INTC_ICDIPTR131_TINT109_SHIFT           (8u)
+#define INTC_ICDIPTR131_TINT110_SHIFT           (16u)
+#define INTC_ICDIPTR131_TINT111_SHIFT           (24u)
+
+#define INTC_ICDIPTR132_TINT112_SHIFT           (0u)
+#define INTC_ICDIPTR132_TINT113_SHIFT           (8u)
+#define INTC_ICDIPTR132_TINT114_SHIFT           (16u)
+#define INTC_ICDIPTR132_TINT115_SHIFT           (24u)
+
+#define INTC_ICDIPTR133_TINT116_SHIFT           (0u)
+#define INTC_ICDIPTR133_TINT117_SHIFT           (8u)
+#define INTC_ICDIPTR133_TINT118_SHIFT           (16u)
+#define INTC_ICDIPTR133_TINT119_SHIFT           (24u)
+
+#define INTC_ICDIPTR134_TINT120_SHIFT           (0u)
+#define INTC_ICDIPTR134_TINT121_SHIFT           (8u)
+#define INTC_ICDIPTR134_TINT122_SHIFT           (16u)
+#define INTC_ICDIPTR134_TINT123_SHIFT           (24u)
+
+#define INTC_ICDIPTR135_TINT124_SHIFT           (0u)
+#define INTC_ICDIPTR135_TINT125_SHIFT           (8u)
+#define INTC_ICDIPTR135_TINT126_SHIFT           (16u)
+#define INTC_ICDIPTR135_TINT127_SHIFT           (24u)
+
+#define INTC_ICDIPTR136_TINT128_SHIFT           (0u)
+#define INTC_ICDIPTR136_TINT129_SHIFT           (8u)
+#define INTC_ICDIPTR136_TINT130_SHIFT           (16u)
+#define INTC_ICDIPTR136_TINT131_SHIFT           (24u)
+
+#define INTC_ICDIPTR137_TINT132_SHIFT           (0u)
+#define INTC_ICDIPTR137_TINT133_SHIFT           (8u)
+#define INTC_ICDIPTR137_TINT134_SHIFT           (16u)
+#define INTC_ICDIPTR137_TINT135_SHIFT           (24u)
+
+#define INTC_ICDIPTR138_TINT136_SHIFT           (0u)
+#define INTC_ICDIPTR138_TINT137_SHIFT           (8u)
+#define INTC_ICDIPTR138_TINT138_SHIFT           (16u)
+#define INTC_ICDIPTR138_TINT139_SHIFT           (24u)
+
+#define INTC_ICDIPTR139_TINT140_SHIFT           (0u)
+#define INTC_ICDIPTR139_TINT141_SHIFT           (8u)
+#define INTC_ICDIPTR139_TINT142_SHIFT           (16u)
+#define INTC_ICDIPTR139_TINT143_SHIFT           (24u)
+
+#define INTC_ICDIPTR140_TINT144_SHIFT           (0u)
+#define INTC_ICDIPTR140_TINT145_SHIFT           (8u)
+#define INTC_ICDIPTR140_TINT146_SHIFT           (16u)
+#define INTC_ICDIPTR140_TINT147_SHIFT           (24u)
+
+#define INTC_ICDIPTR141_TINT148_SHIFT           (0u)
+#define INTC_ICDIPTR141_TINT149_SHIFT           (8u)
+#define INTC_ICDIPTR141_TINT150_SHIFT           (16u)
+#define INTC_ICDIPTR141_TINT151_SHIFT           (24u)
+
+#define INTC_ICDIPTR142_TINT152_SHIFT           (0u)
+#define INTC_ICDIPTR142_TINT153_SHIFT           (8u)
+#define INTC_ICDIPTR142_TINT154_SHIFT           (16u)
+#define INTC_ICDIPTR142_TINT155_SHIFT           (24u)
+
+#define INTC_ICDIPTR143_TINT156_SHIFT           (0u)
+#define INTC_ICDIPTR143_TINT157_SHIFT           (8u)
+#define INTC_ICDIPTR143_TINT158_SHIFT           (16u)
+#define INTC_ICDIPTR143_TINT159_SHIFT           (24u)
+
+#define INTC_ICDIPTR144_TINT160_SHIFT           (0u)
+#define INTC_ICDIPTR144_TINT161_SHIFT           (8u)
+#define INTC_ICDIPTR144_TINT162_SHIFT           (16u)
+#define INTC_ICDIPTR144_TINT163_SHIFT           (24u)
+
+#define INTC_ICDIPTR145_TINT164_SHIFT           (0u)
+#define INTC_ICDIPTR145_TINT165_SHIFT           (8u)
+#define INTC_ICDIPTR145_TINT166_SHIFT           (16u)
+#define INTC_ICDIPTR145_TINT167_SHIFT           (24u)
+
+#define INTC_ICDIPTR146_TINT168_SHIFT           (0u)
+#define INTC_ICDIPTR146_TINT169_SHIFT           (8u)
+#define INTC_ICDIPTR146_TINT170_SHIFT           (16u)
+
+#define INTC_ICDICFR0_SW0_0_SHIFT               (0u)
+#define INTC_ICDICFR0_SW0_1_SHIFT               (1u)
+#define INTC_ICDICFR0_SW1_0_SHIFT               (2u)
+#define INTC_ICDICFR0_SW1_1_SHIFT               (3u)
+#define INTC_ICDICFR0_SW2_0_SHIFT               (4u)
+#define INTC_ICDICFR0_SW2_1_SHIFT               (5u)
+#define INTC_ICDICFR0_SW3_0_SHIFT               (6u)
+#define INTC_ICDICFR0_SW3_1_SHIFT               (7u)
+#define INTC_ICDICFR0_SW4_0_SHIFT               (8u)
+#define INTC_ICDICFR0_SW4_1_SHIFT               (9u)
+#define INTC_ICDICFR0_SW5_0_SHIFT               (10u)
+#define INTC_ICDICFR0_SW5_1_SHIFT               (11u)
+#define INTC_ICDICFR0_SW6_0_SHIFT               (12u)
+#define INTC_ICDICFR0_SW6_1_SHIFT               (13u)
+#define INTC_ICDICFR0_SW7_0_SHIFT               (14u)
+#define INTC_ICDICFR0_SW7_1_SHIFT               (15u)
+#define INTC_ICDICFR0_SW8_0_SHIFT               (16u)
+#define INTC_ICDICFR0_SW8_1_SHIFT               (17u)
+#define INTC_ICDICFR0_SW9_0_SHIFT               (18u)
+#define INTC_ICDICFR0_SW9_1_SHIFT               (19u)
+#define INTC_ICDICFR0_SW10_0_SHIFT              (20u)
+#define INTC_ICDICFR0_SW10_1_SHIFT              (21u)
+#define INTC_ICDICFR0_SW11_0_SHIFT              (22u)
+#define INTC_ICDICFR0_SW11_1_SHIFT              (23u)
+#define INTC_ICDICFR0_SW12_0_SHIFT              (24u)
+#define INTC_ICDICFR0_SW12_1_SHIFT              (25u)
+#define INTC_ICDICFR0_SW13_0_SHIFT              (26u)
+#define INTC_ICDICFR0_SW13_1_SHIFT              (27u)
+#define INTC_ICDICFR0_SW14_0_SHIFT              (28u)
+#define INTC_ICDICFR0_SW14_1_SHIFT              (29u)
+#define INTC_ICDICFR0_SW15_0_SHIFT              (30u)
+#define INTC_ICDICFR0_SW15_1_SHIFT              (31u)
+
+#define INTC_ICDICFR1_PMUIRQ0_0_SHIFT           (0u)
+#define INTC_ICDICFR1_PMUIRQ0_1_SHIFT           (1u)
+#define INTC_ICDICFR1_COMMRX0_0_SHIFT           (2u)
+#define INTC_ICDICFR1_COMMRX0_1_SHIFT           (3u)
+#define INTC_ICDICFR1_COMMTX0_0_SHIFT           (4u)
+#define INTC_ICDICFR1_COMMTX0_1_SHIFT           (5u)
+#define INTC_ICDICFR1_CTIIRQ0_0_SHIFT           (6u)
+#define INTC_ICDICFR1_CTIIRQ0_1_SHIFT           (7u)
+
+#define INTC_ICDICFR2_IRQ0_0_SHIFT              (0u)
+#define INTC_ICDICFR2_IRQ0_1_SHIFT              (1u)
+#define INTC_ICDICFR2_IRQ1_0_SHIFT              (2u)
+#define INTC_ICDICFR2_IRQ1_1_SHIFT              (3u)
+#define INTC_ICDICFR2_IRQ2_0_SHIFT              (4u)
+#define INTC_ICDICFR2_IRQ2_1_SHIFT              (5u)
+#define INTC_ICDICFR2_IRQ3_0_SHIFT              (6u)
+#define INTC_ICDICFR2_IRQ3_1_SHIFT              (7u)
+#define INTC_ICDICFR2_IRQ4_0_SHIFT              (8u)
+#define INTC_ICDICFR2_IRQ4_1_SHIFT              (9u)
+#define INTC_ICDICFR2_IRQ5_0_SHIFT              (10u)
+#define INTC_ICDICFR2_IRQ5_1_SHIFT              (11u)
+#define INTC_ICDICFR2_IRQ6_0_SHIFT              (12u)
+#define INTC_ICDICFR2_IRQ6_1_SHIFT              (13u)
+#define INTC_ICDICFR2_IRQ7_0_SHIFT              (14u)
+#define INTC_ICDICFR2_IRQ7_1_SHIFT              (15u)
+#define INTC_ICDICFR2_PL310ERR_0_SHIFT          (16u)
+#define INTC_ICDICFR2_PL310ERR_1_SHIFT          (17u)
+#define INTC_ICDICFR2_DMAINT0_0_SHIFT           (18u)
+#define INTC_ICDICFR2_DMAINT0_1_SHIFT           (19u)
+#define INTC_ICDICFR2_DMAINT1_0_SHIFT           (20u)
+#define INTC_ICDICFR2_DMAINT1_1_SHIFT           (21u)
+#define INTC_ICDICFR2_DMAINT2_0_SHIFT           (22u)
+#define INTC_ICDICFR2_DMAINT2_1_SHIFT           (23u)
+#define INTC_ICDICFR2_DMAINT3_0_SHIFT           (24u)
+#define INTC_ICDICFR2_DMAINT3_1_SHIFT           (25u)
+#define INTC_ICDICFR2_DMAINT4_0_SHIFT           (26u)
+#define INTC_ICDICFR2_DMAINT4_1_SHIFT           (27u)
+#define INTC_ICDICFR2_DMAINT5_0_SHIFT           (28u)
+#define INTC_ICDICFR2_DMAINT5_1_SHIFT           (29u)
+#define INTC_ICDICFR2_DMAINT6_0_SHIFT           (30u)
+#define INTC_ICDICFR2_DMAINT6_1_SHIFT           (31u)
+
+#define INTC_ICDICFR3_DMAINT7_0_SHIFT           (0u)
+#define INTC_ICDICFR3_DMAINT7_1_SHIFT           (1u)
+#define INTC_ICDICFR3_DMAINT8_0_SHIFT           (2u)
+#define INTC_ICDICFR3_DMAINT8_1_SHIFT           (3u)
+#define INTC_ICDICFR3_DMAINT9_0_SHIFT           (4u)
+#define INTC_ICDICFR3_DMAINT9_1_SHIFT           (5u)
+#define INTC_ICDICFR3_DMAINT10_0_SHIFT          (6u)
+#define INTC_ICDICFR3_DMAINT10_1_SHIFT          (7u)
+#define INTC_ICDICFR3_DMAINT11_0_SHIFT          (8u)
+#define INTC_ICDICFR3_DMAINT11_1_SHIFT          (9u)
+#define INTC_ICDICFR3_DMAINT12_0_SHIFT          (10u)
+#define INTC_ICDICFR3_DMAINT12_1_SHIFT          (11u)
+#define INTC_ICDICFR3_DMAINT13_0_SHIFT          (12u)
+#define INTC_ICDICFR3_DMAINT13_1_SHIFT          (13u)
+#define INTC_ICDICFR3_DMAINT14_0_SHIFT          (14u)
+#define INTC_ICDICFR3_DMAINT14_1_SHIFT          (15u)
+#define INTC_ICDICFR3_DMAINT15_0_SHIFT          (16u)
+#define INTC_ICDICFR3_DMAINT15_1_SHIFT          (17u)
+#define INTC_ICDICFR3_DMAERR_0_SHIFT            (18u)
+#define INTC_ICDICFR3_DMAERR_1_SHIFT            (19u)
+
+#define INTC_ICDICFR4_USBI0_0_SHIFT             (18u)
+#define INTC_ICDICFR4_USBI0_1_SHIFT             (19u)
+#define INTC_ICDICFR4_USBI1_0_SHIFT             (20u)
+#define INTC_ICDICFR4_USBI1_1_SHIFT             (21u)
+#define INTC_ICDICFR4_S0_VI_VSYNC0_0_SHIFT      (22u)
+#define INTC_ICDICFR4_S0_VI_VSYNC0_1_SHIFT      (23u)
+#define INTC_ICDICFR4_S0_LO_VSYNC0_0_SHIFT      (24u)
+#define INTC_ICDICFR4_S0_LO_VSYNC0_1_SHIFT      (25u)
+#define INTC_ICDICFR4_S0_VSYNCERR0_0_SHIFT      (26u)
+#define INTC_ICDICFR4_S0_VSYNCERR0_1_SHIFT      (27u)
+#define INTC_ICDICFR4_GR3_VLINE0_0_SHIFT        (28u)
+#define INTC_ICDICFR4_GR3_VLINE0_1_SHIFT        (29u)
+#define INTC_ICDICFR4_S0_VFIELD0_0_SHIFT        (30u)
+#define INTC_ICDICFR4_S0_VFIELD0_1_SHIFT        (31u)
+
+#define INTC_ICDICFR5_IV1_VBUFERR0_0_SHIFT      (0u)
+#define INTC_ICDICFR5_IV1_VBUFERR0_1_SHIFT      (1u)
+#define INTC_ICDICFR5_IV3_VBUFERR0_0_SHIFT      (2u)
+#define INTC_ICDICFR5_IV3_VBUFERR0_1_SHIFT      (3u)
+#define INTC_ICDICFR5_IV5_VBUFERR0_0_SHIFT      (4u)
+#define INTC_ICDICFR5_IV5_VBUFERR0_1_SHIFT      (5u)
+#define INTC_ICDICFR5_IV6_VBUFERR0_0_SHIFT      (6u)
+#define INTC_ICDICFR5_IV6_VBUFERR0_1_SHIFT      (7u)
+#define INTC_ICDICFR5_S0_WLINE0_0_SHIFT         (8u)
+#define INTC_ICDICFR5_S0_WLINE0_1_SHIFT         (9u)
+#define INTC_ICDICFR5_S1_VI_VSYNC0_0_SHIFT      (10u)
+#define INTC_ICDICFR5_S1_VI_VSYNC0_1_SHIFT      (11u)
+#define INTC_ICDICFR5_S1_LO_VSYNC0_0_SHIFT      (12u)
+#define INTC_ICDICFR5_S1_LO_VSYNC0_1_SHIFT      (13u)
+#define INTC_ICDICFR5_S1_VSYNCERR0_0_SHIFT      (14u)
+#define INTC_ICDICFR5_S1_VSYNCERR0_1_SHIFT      (15u)
+#define INTC_ICDICFR5_S1_VFIELD0_0_SHIFT        (16u)
+#define INTC_ICDICFR5_S1_VFIELD0_1_SHIFT        (17u)
+#define INTC_ICDICFR5_IV2_VBUFERR0_0_SHIFT      (18u)
+#define INTC_ICDICFR5_IV2_VBUFERR0_1_SHIFT      (19u)
+#define INTC_ICDICFR5_IV4_VBUFERR0_0_SHIFT      (20u)
+#define INTC_ICDICFR5_IV4_VBUFERR0_1_SHIFT      (21u)
+#define INTC_ICDICFR5_S1_WLINE0_0_SHIFT         (22u)
+#define INTC_ICDICFR5_S1_WLINE0_1_SHIFT         (23u)
+#define INTC_ICDICFR5_OIR_VI_VSYNC0_0_SHIFT     (24u)
+#define INTC_ICDICFR5_OIR_VI_VSYNC0_1_SHIFT     (25u)
+#define INTC_ICDICFR5_OIR_LO_VSYNC0_0_SHIFT     (26u)
+#define INTC_ICDICFR5_OIR_LO_VSYNC0_1_SHIFT     (27u)
+#define INTC_ICDICFR5_OIR_VSYNCERR0_0_SHIFT     (28u)
+#define INTC_ICDICFR5_OIR_VSYNCERR0_1_SHIFT     (29u)
+#define INTC_ICDICFR5_OIR_VFIELD0_0_SHIFT       (30u)
+#define INTC_ICDICFR5_OIR_VFIELD0_1_SHIFT       (31u)
+
+#define INTC_ICDICFR6_IV7_VBUFERR0_0_SHIFT      (0u)
+#define INTC_ICDICFR6_IV7_VBUFERR0_1_SHIFT      (1u)
+#define INTC_ICDICFR6_IV8_VBUFERR0_0_SHIFT      (2u)
+#define INTC_ICDICFR6_IV8_VBUFERR0_1_SHIFT      (3u)
+#define INTC_ICDICFR6_S0_VI_VSYNC1_0_SHIFT      (6u)
+#define INTC_ICDICFR6_S0_VI_VSYNC1_1_SHIFT      (7u)
+#define INTC_ICDICFR6_S0_LO_VSYNC1_0_SHIFT      (8u)
+#define INTC_ICDICFR6_S0_LO_VSYNC1_1_SHIFT      (9u)
+#define INTC_ICDICFR6_S0_VSYNCERR1_0_SHIFT      (10u)
+#define INTC_ICDICFR6_S0_VSYNCERR1_1_SHIFT      (11u)
+#define INTC_ICDICFR6_GR3_VLINE1_0_SHIFT        (12u)
+#define INTC_ICDICFR6_GR3_VLINE1_1_SHIFT        (13u)
+#define INTC_ICDICFR6_S0_VFIELD1_0_SHIFT        (14u)
+#define INTC_ICDICFR6_S0_VFIELD1_1_SHIFT        (15u)
+#define INTC_ICDICFR6_IV1_VBUFERR1_0_SHIFT      (16u)
+#define INTC_ICDICFR6_IV1_VBUFERR1_1_SHIFT      (17u)
+#define INTC_ICDICFR6_IV3_VBUFERR1_0_SHIFT      (18u)
+#define INTC_ICDICFR6_IV3_VBUFERR1_1_SHIFT      (19u)
+#define INTC_ICDICFR6_IV5_VBUFERR1_0_SHIFT      (20u)
+#define INTC_ICDICFR6_IV5_VBUFERR1_1_SHIFT      (21u)
+#define INTC_ICDICFR6_IV6_VBUFERR1_0_SHIFT      (22u)
+#define INTC_ICDICFR6_IV6_VBUFERR1_1_SHIFT      (23u)
+#define INTC_ICDICFR6_S0_WLINE1_0_SHIFT         (24u)
+#define INTC_ICDICFR6_S0_WLINE1_1_SHIFT         (25u)
+#define INTC_ICDICFR6_S1_VI_VSYNC1_0_SHIFT      (26u)
+#define INTC_ICDICFR6_S1_VI_VSYNC1_1_SHIFT      (27u)
+#define INTC_ICDICFR6_S1_LO_VSYNC1_0_SHIFT      (28u)
+#define INTC_ICDICFR6_S1_LO_VSYNC1_1_SHIFT      (29u)
+#define INTC_ICDICFR6_S1_VSYNCERR1_0_SHIFT      (30u)
+#define INTC_ICDICFR6_S1_VSYNCERR1_1_SHIFT      (31u)
+
+#define INTC_ICDICFR7_S1_VFIELD1_0_SHIFT        (0u)
+#define INTC_ICDICFR7_S1_VFIELD1_1_SHIFT        (1u)
+#define INTC_ICDICFR7_IV2_VBUFERR1_0_SHIFT      (2u)
+#define INTC_ICDICFR7_IV2_VBUFERR1_1_SHIFT      (3u)
+#define INTC_ICDICFR7_IV4_VBUFERR1_0_SHIFT      (4u)
+#define INTC_ICDICFR7_IV4_VBUFERR1_1_SHIFT      (5u)
+#define INTC_ICDICFR7_S1_WLINE1_0_SHIFT         (6u)
+#define INTC_ICDICFR7_S1_WLINE1_1_SHIFT         (7u)
+#define INTC_ICDICFR7_OIR_VI_VSYNC1_0_SHIFT     (8u)
+#define INTC_ICDICFR7_OIR_VI_VSYNC1_1_SHIFT     (9u)
+#define INTC_ICDICFR7_OIR_LO_VSYNC1_0_SHIFT     (10u)
+#define INTC_ICDICFR7_OIR_LO_VSYNC1_1_SHIFT     (11u)
+#define INTC_ICDICFR7_OIR_VLINE1_0_SHIFT        (12u)
+#define INTC_ICDICFR7_OIR_VLINE1_1_SHIFT        (13u)
+#define INTC_ICDICFR7_OIR_VFIELD1_0_SHIFT       (14u)
+#define INTC_ICDICFR7_OIR_VFIELD1_1_SHIFT       (15u)
+#define INTC_ICDICFR7_IV7_VBUFERR1_0_SHIFT      (16u)
+#define INTC_ICDICFR7_IV7_VBUFERR1_1_SHIFT      (17u)
+#define INTC_ICDICFR7_IV8_VBUFERR1_0_SHIFT      (18u)
+#define INTC_ICDICFR7_IV8_VBUFERR1_1_SHIFT      (19u)
+#define INTC_ICDICFR7_IMRDI_0_SHIFT             (22u)
+#define INTC_ICDICFR7_IMRDI_1_SHIFT             (23u)
+#define INTC_ICDICFR7_IMR2I0_0_SHIFT            (24u)
+#define INTC_ICDICFR7_IMR2I0_1_SHIFT            (25u)
+#define INTC_ICDICFR7_IMR2I1_0_SHIFT            (26u)
+#define INTC_ICDICFR7_IMR2I1_1_SHIFT            (27u)
+#define INTC_ICDICFR7_JEDI_0_SHIFT              (28u)
+#define INTC_ICDICFR7_JEDI_1_SHIFT              (29u)
+#define INTC_ICDICFR7_JDTI_0_SHIFT              (30u)
+#define INTC_ICDICFR7_JDTI_1_SHIFT              (31u)
+
+#define INTC_ICDICFR8_CMP0_0_SHIFT              (0u)
+#define INTC_ICDICFR8_CMP0_1_SHIFT              (1u)
+#define INTC_ICDICFR8_CMP1_0_SHIFT              (2u)
+#define INTC_ICDICFR8_CMP1_1_SHIFT              (3u)
+#define INTC_ICDICFR8_INT0_0_SHIFT              (4u)
+#define INTC_ICDICFR8_INT0_1_SHIFT              (5u)
+#define INTC_ICDICFR8_INT1_0_SHIFT              (6u)
+#define INTC_ICDICFR8_INT1_1_SHIFT              (7u)
+#define INTC_ICDICFR8_INT2_0_SHIFT              (8u)
+#define INTC_ICDICFR8_INT2_1_SHIFT              (9u)
+#define INTC_ICDICFR8_INT3_0_SHIFT              (10u)
+#define INTC_ICDICFR8_INT3_1_SHIFT              (11u)
+#define INTC_ICDICFR8_OSTM0TINT_0_SHIFT         (12u)
+#define INTC_ICDICFR8_OSTM0TINT_1_SHIFT         (13u)
+#define INTC_ICDICFR8_OSTM1TINT_0_SHIFT         (14u)
+#define INTC_ICDICFR8_OSTM1TINT_1_SHIFT         (15u)
+#define INTC_ICDICFR8_CMI_0_SHIFT               (16u)
+#define INTC_ICDICFR8_CMI_1_SHIFT               (17u)
+#define INTC_ICDICFR8_WTOUT_0_SHIFT             (18u)
+#define INTC_ICDICFR8_WTOUT_1_SHIFT             (19u)
+#define INTC_ICDICFR8_ITI_0_SHIFT               (20u)
+#define INTC_ICDICFR8_ITI_1_SHIFT               (21u)
+#define INTC_ICDICFR8_TGI0A_0_SHIFT             (22u)
+#define INTC_ICDICFR8_TGI0A_1_SHIFT             (23u)
+#define INTC_ICDICFR8_TGI0B_0_SHIFT             (24u)
+#define INTC_ICDICFR8_TGI0B_1_SHIFT             (25u)
+#define INTC_ICDICFR8_TGI0C_0_SHIFT             (26u)
+#define INTC_ICDICFR8_TGI0C_1_SHIFT             (27u)
+#define INTC_ICDICFR8_TGI0D_0_SHIFT             (28u)
+#define INTC_ICDICFR8_TGI0D_1_SHIFT             (29u)
+#define INTC_ICDICFR8_TGI0V_0_SHIFT             (30u)
+#define INTC_ICDICFR8_TGI0V_1_SHIFT             (31u)
+
+#define INTC_ICDICFR9_TGI0E_0_SHIFT             (0u)
+#define INTC_ICDICFR9_TGI0E_1_SHIFT             (1u)
+#define INTC_ICDICFR9_TGI0F_0_SHIFT             (2u)
+#define INTC_ICDICFR9_TGI0F_1_SHIFT             (3u)
+#define INTC_ICDICFR9_TGI1A_0_SHIFT             (4u)
+#define INTC_ICDICFR9_TGI1A_1_SHIFT             (5u)
+#define INTC_ICDICFR9_TGI1B_0_SHIFT             (6u)
+#define INTC_ICDICFR9_TGI1B_1_SHIFT             (7u)
+#define INTC_ICDICFR9_TGI1V_0_SHIFT             (8u)
+#define INTC_ICDICFR9_TGI1V_1_SHIFT             (9u)
+#define INTC_ICDICFR9_TGI1U_0_SHIFT             (10u)
+#define INTC_ICDICFR9_TGI1U_1_SHIFT             (11u)
+#define INTC_ICDICFR9_TGI2A_0_SHIFT             (12u)
+#define INTC_ICDICFR9_TGI2A_1_SHIFT             (13u)
+#define INTC_ICDICFR9_TGI2B_0_SHIFT             (14u)
+#define INTC_ICDICFR9_TGI2B_1_SHIFT             (15u)
+#define INTC_ICDICFR9_TGI2V_0_SHIFT             (16u)
+#define INTC_ICDICFR9_TGI2V_1_SHIFT             (17u)
+#define INTC_ICDICFR9_TGI2U_0_SHIFT             (18u)
+#define INTC_ICDICFR9_TGI2U_1_SHIFT             (19u)
+#define INTC_ICDICFR9_TGI3A_0_SHIFT             (20u)
+#define INTC_ICDICFR9_TGI3A_1_SHIFT             (21u)
+#define INTC_ICDICFR9_TGI3B_0_SHIFT             (22u)
+#define INTC_ICDICFR9_TGI3B_1_SHIFT             (23u)
+#define INTC_ICDICFR9_TGI3C_0_SHIFT             (24u)
+#define INTC_ICDICFR9_TGI3C_1_SHIFT             (25u)
+#define INTC_ICDICFR9_TGI3D_0_SHIFT             (26u)
+#define INTC_ICDICFR9_TGI3D_1_SHIFT             (27u)
+#define INTC_ICDICFR9_TGI3V_0_SHIFT             (28u)
+#define INTC_ICDICFR9_TGI3V_1_SHIFT             (29u)
+#define INTC_ICDICFR9_TGI4A_0_SHIFT             (30u)
+#define INTC_ICDICFR9_TGI4A_1_SHIFT             (31u)
+
+#define INTC_ICDICFR10_TGI4B_0_SHIFT            (0u)
+#define INTC_ICDICFR10_TGI4B_1_SHIFT            (1u)
+#define INTC_ICDICFR10_TGI4C_0_SHIFT            (2u)
+#define INTC_ICDICFR10_TGI4C_1_SHIFT            (3u)
+#define INTC_ICDICFR10_TGI4D_0_SHIFT            (4u)
+#define INTC_ICDICFR10_TGI4D_1_SHIFT            (5u)
+#define INTC_ICDICFR10_TGI4V_0_SHIFT            (6u)
+#define INTC_ICDICFR10_TGI4V_1_SHIFT            (7u)
+#define INTC_ICDICFR10_CMI1_0_SHIFT             (8u)
+#define INTC_ICDICFR10_CMI1_1_SHIFT             (9u)
+#define INTC_ICDICFR10_CMI2_0_SHIFT             (10u)
+#define INTC_ICDICFR10_CMI2_1_SHIFT             (11u)
+#define INTC_ICDICFR10_SGDEI0_0_SHIFT           (12u)
+#define INTC_ICDICFR10_SGDEI0_1_SHIFT           (13u)
+#define INTC_ICDICFR10_SGDEI1_0_SHIFT           (14u)
+#define INTC_ICDICFR10_SGDEI1_1_SHIFT           (15u)
+#define INTC_ICDICFR10_SGDEI2_0_SHIFT           (16u)
+#define INTC_ICDICFR10_SGDEI2_1_SHIFT           (17u)
+#define INTC_ICDICFR10_SGDEI3_0_SHIFT           (18u)
+#define INTC_ICDICFR10_SGDEI3_1_SHIFT           (19u)
+#define INTC_ICDICFR10_ADI_0_SHIFT              (20u)
+#define INTC_ICDICFR10_ADI_1_SHIFT              (21u)
+#define INTC_ICDICFR10_LMTI_0_SHIFT             (22u)
+#define INTC_ICDICFR10_LMTI_1_SHIFT             (23u)
+#define INTC_ICDICFR10_SSII0_0_SHIFT            (24u)
+#define INTC_ICDICFR10_SSII0_1_SHIFT            (25u)
+#define INTC_ICDICFR10_SSIRXI0_0_SHIFT          (26u)
+#define INTC_ICDICFR10_SSIRXI0_1_SHIFT          (27u)
+#define INTC_ICDICFR10_SSITXI0_0_SHIFT          (28u)
+#define INTC_ICDICFR10_SSITXI0_1_SHIFT          (29u)
+#define INTC_ICDICFR10_SSII1_0_SHIFT            (30u)
+#define INTC_ICDICFR10_SSII1_1_SHIFT            (31u)
+
+#define INTC_ICDICFR11_SSIRXI1_0_SHIFT          (0u)
+#define INTC_ICDICFR11_SSIRXI1_1_SHIFT          (1u)
+#define INTC_ICDICFR11_SSITXI1_0_SHIFT          (2u)
+#define INTC_ICDICFR11_SSITXI1_1_SHIFT          (3u)
+#define INTC_ICDICFR11_SSII2_0_SHIFT            (4u)
+#define INTC_ICDICFR11_SSII2_1_SHIFT            (5u)
+#define INTC_ICDICFR11_SSIRTI2_0_SHIFT          (6u)
+#define INTC_ICDICFR11_SSIRTI2_1_SHIFT          (7u)
+#define INTC_ICDICFR11_SSII3_0_SHIFT            (8u)
+#define INTC_ICDICFR11_SSII3_1_SHIFT            (9u)
+#define INTC_ICDICFR11_SSIRXI3_0_SHIFT          (10u)
+#define INTC_ICDICFR11_SSIRXI3_1_SHIFT          (11u)
+#define INTC_ICDICFR11_SSITXI3_0_SHIFT          (12u)
+#define INTC_ICDICFR11_SSITXI3_1_SHIFT          (13u)
+#define INTC_ICDICFR11_SSII4_0_SHIFT            (14u)
+#define INTC_ICDICFR11_SSII4_1_SHIFT            (15u)
+#define INTC_ICDICFR11_SSIRTI4_0_SHIFT          (16u)
+#define INTC_ICDICFR11_SSIRTI4_1_SHIFT          (17u)
+#define INTC_ICDICFR11_SSII5_0_SHIFT            (18u)
+#define INTC_ICDICFR11_SSII5_1_SHIFT            (19u)
+#define INTC_ICDICFR11_SSIRXI5_0_SHIFT          (20u)
+#define INTC_ICDICFR11_SSIRXI5_1_SHIFT          (21u)
+#define INTC_ICDICFR11_SSITXI5_0_SHIFT          (22u)
+#define INTC_ICDICFR11_SSITXI5_1_SHIFT          (23u)
+#define INTC_ICDICFR11_SPDIFI_0_SHIFT           (24u)
+#define INTC_ICDICFR11_SPDIFI_1_SHIFT           (25u)
+#define INTC_ICDICFR11_INTIICTEI0_0_SHIFT       (26u)
+#define INTC_ICDICFR11_INTIICTEI0_1_SHIFT       (27u)
+#define INTC_ICDICFR11_INTIICRI0_0_SHIFT        (28u)
+#define INTC_ICDICFR11_INTIICRI0_1_SHIFT        (29u)
+#define INTC_ICDICFR11_INTIICTI0_0_SHIFT        (30u)
+#define INTC_ICDICFR11_INTIICTI0_1_SHIFT        (31u)
+
+#define INTC_ICDICFR12_INTIICSPI0_0_SHIFT       (0u)
+#define INTC_ICDICFR12_INTIICSPI0_1_SHIFT       (1u)
+#define INTC_ICDICFR12_INTIICSTI0_0_SHIFT       (2u)
+#define INTC_ICDICFR12_INTIICSTI0_1_SHIFT       (3u)
+#define INTC_ICDICFR12_INTIICNAKI0_0_SHIFT      (4u)
+#define INTC_ICDICFR12_INTIICNAKI0_1_SHIFT      (5u)
+#define INTC_ICDICFR12_INTIICALI0_0_SHIFT       (6u)
+#define INTC_ICDICFR12_INTIICALI0_1_SHIFT       (7u)
+#define INTC_ICDICFR12_INTIICTMOI0_0_SHIFT      (8u)
+#define INTC_ICDICFR12_INTIICTMOI0_1_SHIFT      (9u)
+#define INTC_ICDICFR12_INTIICTEI1_0_SHIFT       (10u)
+#define INTC_ICDICFR12_INTIICTEI1_1_SHIFT       (11u)
+#define INTC_ICDICFR12_INTIICRI1_0_SHIFT        (12u)
+#define INTC_ICDICFR12_INTIICRI1_1_SHIFT        (13u)
+#define INTC_ICDICFR12_INTIICTI1_0_SHIFT        (14u)
+#define INTC_ICDICFR12_INTIICTI1_1_SHIFT        (15u)
+#define INTC_ICDICFR12_INTIICSPI1_0_SHIFT       (16u)
+#define INTC_ICDICFR12_INTIICSPI1_1_SHIFT       (17u)
+#define INTC_ICDICFR12_INTIICSTI1_0_SHIFT       (18u)
+#define INTC_ICDICFR12_INTIICSTI1_1_SHIFT       (19u)
+#define INTC_ICDICFR12_INTIICNAKI1_0_SHIFT      (20u)
+#define INTC_ICDICFR12_INTIICNAKI1_1_SHIFT      (21u)
+#define INTC_ICDICFR12_INTIICALI1_0_SHIFT       (22u)
+#define INTC_ICDICFR12_INTIICALI1_1_SHIFT       (23u)
+#define INTC_ICDICFR12_INTIICTMOI1_0_SHIFT      (24u)
+#define INTC_ICDICFR12_INTIICTMOI1_1_SHIFT      (25u)
+#define INTC_ICDICFR12_INTIICTEI2_0_SHIFT       (26u)
+#define INTC_ICDICFR12_INTIICTEI2_1_SHIFT       (27u)
+#define INTC_ICDICFR12_INTIICRI2_0_SHIFT        (28u)
+#define INTC_ICDICFR12_INTIICRI2_1_SHIFT        (29u)
+#define INTC_ICDICFR12_INTIICTI2_0_SHIFT        (30u)
+#define INTC_ICDICFR12_INTIICTI2_1_SHIFT        (31u)
+
+#define INTC_ICDICFR13_INTIICSPI2_0_SHIFT       (0u)
+#define INTC_ICDICFR13_INTIICSPI2_1_SHIFT       (1u)
+#define INTC_ICDICFR13_INTIICSTI2_0_SHIFT       (2u)
+#define INTC_ICDICFR13_INTIICSTI2_1_SHIFT       (3u)
+#define INTC_ICDICFR13_INTIICNAKI2_0_SHIFT      (4u)
+#define INTC_ICDICFR13_INTIICNAKI2_1_SHIFT      (5u)
+#define INTC_ICDICFR13_INTIICALI2_0_SHIFT       (6u)
+#define INTC_ICDICFR13_INTIICALI2_1_SHIFT       (7u)
+#define INTC_ICDICFR13_INTIICTMOI2_0_SHIFT      (8u)
+#define INTC_ICDICFR13_INTIICTMOI2_1_SHIFT      (9u)
+#define INTC_ICDICFR13_INTIICTEI3_0_SHIFT       (10u)
+#define INTC_ICDICFR13_INTIICTEI3_1_SHIFT       (11u)
+#define INTC_ICDICFR13_INTIICRI3_0_SHIFT        (12u)
+#define INTC_ICDICFR13_INTIICRI3_1_SHIFT        (13u)
+#define INTC_ICDICFR13_INTIICTI3_0_SHIFT        (14u)
+#define INTC_ICDICFR13_INTIICTI3_1_SHIFT        (15u)
+#define INTC_ICDICFR13_INTIICSPI3_0_SHIFT       (16u)
+#define INTC_ICDICFR13_INTIICSPI3_1_SHIFT       (17u)
+#define INTC_ICDICFR13_INTIICSTI3_0_SHIFT       (18u)
+#define INTC_ICDICFR13_INTIICSTI3_1_SHIFT       (19u)
+#define INTC_ICDICFR13_INTIICNAKI3_0_SHIFT      (20u)
+#define INTC_ICDICFR13_INTIICNAKI3_1_SHIFT      (21u)
+#define INTC_ICDICFR13_INTIICALI3_0_SHIFT       (22u)
+#define INTC_ICDICFR13_INTIICALI3_1_SHIFT       (23u)
+#define INTC_ICDICFR13_INTIICTMOI3_0_SHIFT      (24u)
+#define INTC_ICDICFR13_INTIICTMOI3_1_SHIFT      (25u)
+#define INTC_ICDICFR13_BRI0_0_SHIFT             (26u)
+#define INTC_ICDICFR13_BRI0_1_SHIFT             (27u)
+#define INTC_ICDICFR13_ERI0_0_SHIFT             (28u)
+#define INTC_ICDICFR13_ERI0_1_SHIFT             (29u)
+#define INTC_ICDICFR13_RXI0_0_SHIFT             (30u)
+#define INTC_ICDICFR13_RXI0_1_SHIFT             (31u)
+
+#define INTC_ICDICFR14_TXI0_0_SHIFT             (0u)
+#define INTC_ICDICFR14_TXI0_1_SHIFT             (1u)
+#define INTC_ICDICFR14_BRI1_0_SHIFT             (2u)
+#define INTC_ICDICFR14_BRI1_1_SHIFT             (3u)
+#define INTC_ICDICFR14_ERI1_0_SHIFT             (4u)
+#define INTC_ICDICFR14_ERI1_1_SHIFT             (5u)
+#define INTC_ICDICFR14_RXI1_0_SHIFT             (6u)
+#define INTC_ICDICFR14_RXI1_1_SHIFT             (7u)
+#define INTC_ICDICFR14_TXI1_0_SHIFT             (8u)
+#define INTC_ICDICFR14_TXI1_1_SHIFT             (9u)
+#define INTC_ICDICFR14_BRI2_0_SHIFT             (10u)
+#define INTC_ICDICFR14_BRI2_1_SHIFT             (11u)
+#define INTC_ICDICFR14_ERI2_0_SHIFT             (12u)
+#define INTC_ICDICFR14_ERI2_1_SHIFT             (13u)
+#define INTC_ICDICFR14_RXI2_0_SHIFT             (14u)
+#define INTC_ICDICFR14_RXI2_1_SHIFT             (15u)
+#define INTC_ICDICFR14_TXI2_0_SHIFT             (16u)
+#define INTC_ICDICFR14_TXI2_1_SHIFT             (17u)
+#define INTC_ICDICFR14_BRI3_0_SHIFT             (18u)
+#define INTC_ICDICFR14_BRI3_1_SHIFT             (19u)
+#define INTC_ICDICFR14_ERI3_0_SHIFT             (20u)
+#define INTC_ICDICFR14_ERI3_1_SHIFT             (21u)
+#define INTC_ICDICFR14_RXI3_0_SHIFT             (22u)
+#define INTC_ICDICFR14_RXI3_1_SHIFT             (23u)
+#define INTC_ICDICFR14_TXI3_0_SHIFT             (24u)
+#define INTC_ICDICFR14_TXI3_1_SHIFT             (25u)
+#define INTC_ICDICFR14_BRI4_0_SHIFT             (26u)
+#define INTC_ICDICFR14_BRI4_1_SHIFT             (27u)
+#define INTC_ICDICFR14_ERI4_0_SHIFT             (28u)
+#define INTC_ICDICFR14_ERI4_1_SHIFT             (29u)
+#define INTC_ICDICFR14_RXI4_0_SHIFT             (30u)
+#define INTC_ICDICFR14_RXI4_1_SHIFT             (31u)
+
+#define INTC_ICDICFR15_TXI4_0_SHIFT             (0u)
+#define INTC_ICDICFR15_TXI4_1_SHIFT             (1u)
+#define INTC_ICDICFR15_BRI5_0_SHIFT             (2u)
+#define INTC_ICDICFR15_BRI5_1_SHIFT             (3u)
+#define INTC_ICDICFR15_ERI5_0_SHIFT             (4u)
+#define INTC_ICDICFR15_ERI5_1_SHIFT             (5u)
+#define INTC_ICDICFR15_RXI5_0_SHIFT             (6u)
+#define INTC_ICDICFR15_RXI5_1_SHIFT             (7u)
+#define INTC_ICDICFR15_TXI5_0_SHIFT             (8u)
+#define INTC_ICDICFR15_TXI5_1_SHIFT             (9u)
+#define INTC_ICDICFR15_BRI6_0_SHIFT             (10u)
+#define INTC_ICDICFR15_BRI6_1_SHIFT             (11u)
+#define INTC_ICDICFR15_ERI6_0_SHIFT             (12u)
+#define INTC_ICDICFR15_ERI6_1_SHIFT             (13u)
+#define INTC_ICDICFR15_RXI6_0_SHIFT             (14u)
+#define INTC_ICDICFR15_RXI6_1_SHIFT             (15u)
+#define INTC_ICDICFR15_TXI6_0_SHIFT             (16u)
+#define INTC_ICDICFR15_TXI6_1_SHIFT             (17u)
+#define INTC_ICDICFR15_BRI7_0_SHIFT             (18u)
+#define INTC_ICDICFR15_BRI7_1_SHIFT             (19u)
+#define INTC_ICDICFR15_ERI7_0_SHIFT             (20u)
+#define INTC_ICDICFR15_ERI7_1_SHIFT             (21u)
+#define INTC_ICDICFR15_RXI7_0_SHIFT             (22u)
+#define INTC_ICDICFR15_RXI7_1_SHIFT             (23u)
+#define INTC_ICDICFR15_TXI7_0_SHIFT             (24u)
+#define INTC_ICDICFR15_TXI7_1_SHIFT             (25u)
+#define INTC_ICDICFR15_INTRCANGERR_0_SHIFT      (26u)
+#define INTC_ICDICFR15_INTRCANGERR_1_SHIFT      (27u)
+#define INTC_ICDICFR15_INTRCANGRECC_0_SHIFT     (28u)
+#define INTC_ICDICFR15_INTRCANGRECC_1_SHIFT     (29u)
+#define INTC_ICDICFR15_INTRCAN0REC_0_SHIFT      (30u)
+#define INTC_ICDICFR15_INTRCAN0REC_1_SHIFT      (31u)
+
+#define INTC_ICDICFR16_INTRCAN0ERR_0_SHIFT      (0u)
+#define INTC_ICDICFR16_INTRCAN0ERR_1_SHIFT      (1u)
+#define INTC_ICDICFR16_INTRCAN0TRX_0_SHIFT      (2u)
+#define INTC_ICDICFR16_INTRCAN0TRX_1_SHIFT      (3u)
+#define INTC_ICDICFR16_INTRCAN1REC_0_SHIFT      (4u)
+#define INTC_ICDICFR16_INTRCAN1REC_1_SHIFT      (5u)
+#define INTC_ICDICFR16_INTRCAN1ERR_0_SHIFT      (6u)
+#define INTC_ICDICFR16_INTRCAN1ERR_1_SHIFT      (7u)
+#define INTC_ICDICFR16_INTRCAN1TRX_0_SHIFT      (8u)
+#define INTC_ICDICFR16_INTRCAN1TRX_1_SHIFT      (9u)
+#define INTC_ICDICFR16_INTRCAN2REC_0_SHIFT      (10u)
+#define INTC_ICDICFR16_INTRCAN2REC_1_SHIFT      (11u)
+#define INTC_ICDICFR16_INTRCAN2ERR_0_SHIFT      (12u)
+#define INTC_ICDICFR16_INTRCAN2ERR_1_SHIFT      (13u)
+#define INTC_ICDICFR16_INTRCAN2TRX_0_SHIFT      (14u)
+#define INTC_ICDICFR16_INTRCAN2TRX_1_SHIFT      (15u)
+#define INTC_ICDICFR16_INTRCAN3REC_0_SHIFT      (16u)
+#define INTC_ICDICFR16_INTRCAN3REC_1_SHIFT      (17u)
+#define INTC_ICDICFR16_INTRCAN3ERR_0_SHIFT      (18u)
+#define INTC_ICDICFR16_INTRCAN3ERR_1_SHIFT      (19u)
+#define INTC_ICDICFR16_INTRCAN3TRX_0_SHIFT      (20u)
+#define INTC_ICDICFR16_INTRCAN3TRX_1_SHIFT      (21u)
+#define INTC_ICDICFR16_INTRCAN4REC_0_SHIFT      (22u)
+#define INTC_ICDICFR16_INTRCAN4REC_1_SHIFT      (23u)
+#define INTC_ICDICFR16_INTRCAN4ERR_0_SHIFT      (24u)
+#define INTC_ICDICFR16_INTRCAN4ERR_1_SHIFT      (25u)
+#define INTC_ICDICFR16_INTRCAN4TRX_0_SHIFT      (26u)
+#define INTC_ICDICFR16_INTRCAN4TRX_1_SHIFT      (27u)
+#define INTC_ICDICFR16_SPEI0_0_SHIFT            (28u)
+#define INTC_ICDICFR16_SPEI0_1_SHIFT            (29u)
+#define INTC_ICDICFR16_SPRI0_0_SHIFT            (30u)
+#define INTC_ICDICFR16_SPRI0_1_SHIFT            (31u)
+
+#define INTC_ICDICFR17_SPTI0_0_SHIFT            (0u)
+#define INTC_ICDICFR17_SPTI0_1_SHIFT            (1u)
+#define INTC_ICDICFR17_SPEI1_0_SHIFT            (2u)
+#define INTC_ICDICFR17_SPEI1_1_SHIFT            (3u)
+#define INTC_ICDICFR17_SPRI1_0_SHIFT            (4u)
+#define INTC_ICDICFR17_SPRI1_1_SHIFT            (5u)
+#define INTC_ICDICFR17_SPTI1_0_SHIFT            (6u)
+#define INTC_ICDICFR17_SPTI1_1_SHIFT            (7u)
+#define INTC_ICDICFR17_SPEI2_0_SHIFT            (8u)
+#define INTC_ICDICFR17_SPEI2_1_SHIFT            (9u)
+#define INTC_ICDICFR17_SPRI2_0_SHIFT            (10u)
+#define INTC_ICDICFR17_SPRI2_1_SHIFT            (11u)
+#define INTC_ICDICFR17_SPTI2_0_SHIFT            (12u)
+#define INTC_ICDICFR17_SPTI2_1_SHIFT            (13u)
+#define INTC_ICDICFR17_SPEI3_0_SHIFT            (14u)
+#define INTC_ICDICFR17_SPEI3_1_SHIFT            (15u)
+#define INTC_ICDICFR17_SPRI3_0_SHIFT            (16u)
+#define INTC_ICDICFR17_SPRI3_1_SHIFT            (17u)
+#define INTC_ICDICFR17_SPTI3_0_SHIFT            (18u)
+#define INTC_ICDICFR17_SPTI3_1_SHIFT            (19u)
+#define INTC_ICDICFR17_SPEI4_0_SHIFT            (20u)
+#define INTC_ICDICFR17_SPEI4_1_SHIFT            (21u)
+#define INTC_ICDICFR17_SPRI4_0_SHIFT            (22u)
+#define INTC_ICDICFR17_SPRI4_1_SHIFT            (23u)
+#define INTC_ICDICFR17_SPTI4_0_SHIFT            (24u)
+#define INTC_ICDICFR17_SPTI4_1_SHIFT            (25u)
+#define INTC_ICDICFR17_IEBBTD_0_SHIFT           (26u)
+#define INTC_ICDICFR17_IEBBTD_1_SHIFT           (27u)
+#define INTC_ICDICFR17_IEBBTERR_0_SHIFT         (28u)
+#define INTC_ICDICFR17_IEBBTERR_1_SHIFT         (29u)
+#define INTC_ICDICFR17_IEBBTSTA_0_SHIFT         (30u)
+#define INTC_ICDICFR17_IEBBTSTA_1_SHIFT         (31u)
+
+#define INTC_ICDICFR18_IEBBTV_0_SHIFT           (0u)
+#define INTC_ICDICFR18_IEBBTV_1_SHIFT           (1u)
+#define INTC_ICDICFR18_ISY_0_SHIFT              (2u)
+#define INTC_ICDICFR18_ISY_1_SHIFT              (3u)
+#define INTC_ICDICFR18_IERR_0_SHIFT             (4u)
+#define INTC_ICDICFR18_IERR_1_SHIFT             (5u)
+#define INTC_ICDICFR18_ITARG_0_SHIFT            (6u)
+#define INTC_ICDICFR18_ITARG_1_SHIFT            (7u)
+#define INTC_ICDICFR18_ISEC_0_SHIFT             (8u)
+#define INTC_ICDICFR18_ISEC_1_SHIFT             (9u)
+#define INTC_ICDICFR18_IBUF_0_SHIFT             (10u)
+#define INTC_ICDICFR18_IBUF_1_SHIFT             (11u)
+#define INTC_ICDICFR18_IREADY_0_SHIFT           (12u)
+#define INTC_ICDICFR18_IREADY_1_SHIFT           (13u)
+#define INTC_ICDICFR18_FLSTE_0_SHIFT            (14u)
+#define INTC_ICDICFR18_FLSTE_1_SHIFT            (15u)
+#define INTC_ICDICFR18_FLTENDI_0_SHIFT          (16u)
+#define INTC_ICDICFR18_FLTENDI_1_SHIFT          (17u)
+#define INTC_ICDICFR18_FLTREQ0I_0_SHIFT         (18u)
+#define INTC_ICDICFR18_FLTREQ0I_1_SHIFT         (19u)
+#define INTC_ICDICFR18_FLTREQ1I_0_SHIFT         (20u)
+#define INTC_ICDICFR18_FLTREQ1I_1_SHIFT         (21u)
+#define INTC_ICDICFR18_MMC0_0_SHIFT             (22u)
+#define INTC_ICDICFR18_MMC0_1_SHIFT             (23u)
+#define INTC_ICDICFR18_MMC1_0_SHIFT             (24u)
+#define INTC_ICDICFR18_MMC1_1_SHIFT             (25u)
+#define INTC_ICDICFR18_MMC2_0_SHIFT             (26u)
+#define INTC_ICDICFR18_MMC2_1_SHIFT             (27u)
+#define INTC_ICDICFR18_SDHI0_3_0_SHIFT          (28u)
+#define INTC_ICDICFR18_SDHI0_3_1_SHIFT          (29u)
+#define INTC_ICDICFR18_SDHI0_0_0_SHIFT          (30u)
+#define INTC_ICDICFR18_SDHI0_0_1_SHIFT          (31u)
+
+#define INTC_ICDICFR19_SDHI0_1_0_SHIFT          (0u)
+#define INTC_ICDICFR19_SDHI0_1_1_SHIFT          (1u)
+#define INTC_ICDICFR19_SDHI1_3_0_SHIFT          (2u)
+#define INTC_ICDICFR19_SDHI1_3_1_SHIFT          (3u)
+#define INTC_ICDICFR19_SDHI1_0_0_SHIFT          (4u)
+#define INTC_ICDICFR19_SDHI1_0_1_SHIFT          (5u)
+#define INTC_ICDICFR19_SDHI1_1_0_SHIFT          (6u)
+#define INTC_ICDICFR19_SDHI1_1_1_SHIFT          (7u)
+#define INTC_ICDICFR19_ARM_0_SHIFT              (8u)
+#define INTC_ICDICFR19_ARM_1_SHIFT              (9u)
+#define INTC_ICDICFR19_PRD_0_SHIFT              (10u)
+#define INTC_ICDICFR19_PRD_1_SHIFT              (11u)
+#define INTC_ICDICFR19_CUP_0_SHIFT              (12u)
+#define INTC_ICDICFR19_CUP_1_SHIFT              (13u)
+#define INTC_ICDICFR19_SCUAI0_0_SHIFT           (14u)
+#define INTC_ICDICFR19_SCUAI0_1_SHIFT           (15u)
+#define INTC_ICDICFR19_SCUAI1_0_SHIFT           (16u)
+#define INTC_ICDICFR19_SCUAI1_1_SHIFT           (17u)
+#define INTC_ICDICFR19_SCUFDI0_0_SHIFT          (18u)
+#define INTC_ICDICFR19_SCUFDI0_1_SHIFT          (19u)
+#define INTC_ICDICFR19_SCUFDI1_0_SHIFT          (20u)
+#define INTC_ICDICFR19_SCUFDI1_1_SHIFT          (21u)
+#define INTC_ICDICFR19_SCUFDI2_0_SHIFT          (22u)
+#define INTC_ICDICFR19_SCUFDI2_1_SHIFT          (23u)
+#define INTC_ICDICFR19_SCUFDI3_0_SHIFT          (24u)
+#define INTC_ICDICFR19_SCUFDI3_1_SHIFT          (25u)
+#define INTC_ICDICFR19_SCUFUI0_0_SHIFT          (26u)
+#define INTC_ICDICFR19_SCUFUI0_1_SHIFT          (27u)
+#define INTC_ICDICFR19_SCUFUI1_0_SHIFT          (28u)
+#define INTC_ICDICFR19_SCUFUI1_1_SHIFT          (29u)
+#define INTC_ICDICFR19_SCUFUI2_0_SHIFT          (30u)
+#define INTC_ICDICFR19_SCUFUI2_1_SHIFT          (31u)
+
+#define INTC_ICDICFR20_SCUFUI3_0_SHIFT          (0u)
+#define INTC_ICDICFR20_SCUFUI3_1_SHIFT          (1u)
+#define INTC_ICDICFR20_SCUDVI0_0_SHIFT          (2u)
+#define INTC_ICDICFR20_SCUDVI0_1_SHIFT          (3u)
+#define INTC_ICDICFR20_SCUDVI1_0_SHIFT          (4u)
+#define INTC_ICDICFR20_SCUDVI1_1_SHIFT          (5u)
+#define INTC_ICDICFR20_SCUDVI2_0_SHIFT          (6u)
+#define INTC_ICDICFR20_SCUDVI2_1_SHIFT          (7u)
+#define INTC_ICDICFR20_SCUDVI3_0_SHIFT          (8u)
+#define INTC_ICDICFR20_SCUDVI3_1_SHIFT          (9u)
+#define INTC_ICDICFR20_MLB_CINT_0_SHIFT         (10u)
+#define INTC_ICDICFR20_MLB_CINT_1_SHIFT         (11u)
+#define INTC_ICDICFR20_MLB_SINT_0_SHIFT         (12u)
+#define INTC_ICDICFR20_MLB_SINT_1_SHIFT         (13u)
+#define INTC_ICDICFR20_DRC0_0_SHIFT             (14u)
+#define INTC_ICDICFR20_DRC0_1_SHIFT             (15u)
+#define INTC_ICDICFR20_DRC1_0_SHIFT             (16u)
+#define INTC_ICDICFR20_DRC1_1_SHIFT             (17u)
+#define INTC_ICDICFR20_LINI0_INT_T_0_SHIFT      (22u)
+#define INTC_ICDICFR20_LINI0_INT_T_1_SHIFT      (23u)
+#define INTC_ICDICFR20_LINI0_INT_R_0_SHIFT      (24u)
+#define INTC_ICDICFR20_LINI0_INT_R_1_SHIFT      (25u)
+#define INTC_ICDICFR20_LINI0_INT_S_0_SHIFT      (26u)
+#define INTC_ICDICFR20_LINI0_INT_S_1_SHIFT      (27u)
+#define INTC_ICDICFR20_LINI0_INT_M_0_SHIFT      (28u)
+#define INTC_ICDICFR20_LINI0_INT_M_1_SHIFT      (29u)
+#define INTC_ICDICFR20_LINI1_INT_T_0_SHIFT      (30u)
+#define INTC_ICDICFR20_LINI1_INT_T_1_SHIFT      (31u)
+
+#define INTC_ICDICFR21_LINI1_INT_R_0_SHIFT      (0u)
+#define INTC_ICDICFR21_LINI1_INT_R_1_SHIFT      (1u)
+#define INTC_ICDICFR21_LINI1_INT_S_0_SHIFT      (2u)
+#define INTC_ICDICFR21_LINI1_INT_S_1_SHIFT      (3u)
+#define INTC_ICDICFR21_LINI1_INT_M_0_SHIFT      (4u)
+#define INTC_ICDICFR21_LINI1_INT_M_1_SHIFT      (5u)
+#define INTC_ICDICFR21_ERI0_0_SHIFT             (22u)
+#define INTC_ICDICFR21_ERI0_1_SHIFT             (23u)
+#define INTC_ICDICFR21_RXI0_0_SHIFT             (24u)
+#define INTC_ICDICFR21_RXI0_1_SHIFT             (25u)
+#define INTC_ICDICFR21_TXI0_0_SHIFT             (26u)
+#define INTC_ICDICFR21_TXI0_1_SHIFT             (27u)
+#define INTC_ICDICFR21_TEI0_0_SHIFT             (28u)
+#define INTC_ICDICFR21_TEI0_1_SHIFT             (29u)
+#define INTC_ICDICFR21_ERI1_0_SHIFT             (30u)
+#define INTC_ICDICFR21_ERI1_1_SHIFT             (31u)
+
+#define INTC_ICDICFR22_RXI1_0_SHIFT             (0u)
+#define INTC_ICDICFR22_RXI1_1_SHIFT             (1u)
+#define INTC_ICDICFR22_TXI1_0_SHIFT             (2u)
+#define INTC_ICDICFR22_TXI1_1_SHIFT             (3u)
+#define INTC_ICDICFR22_TEI1_0_SHIFT             (4u)
+#define INTC_ICDICFR22_TEI1_1_SHIFT             (5u)
+#define INTC_ICDICFR22_AVBI_DATA_0_SHIFT        (6u)
+#define INTC_ICDICFR22_AVBI_DATA_1_SHIFT        (7u)
+#define INTC_ICDICFR22_AVBI_ERROR_0_SHIFT       (8u)
+#define INTC_ICDICFR22_AVBI_ERROR_1_SHIFT       (9u)
+#define INTC_ICDICFR22_AVBI_MANAGE_0_SHIFT      (10u)
+#define INTC_ICDICFR22_AVBI_MANAGE_1_SHIFT      (11u)
+#define INTC_ICDICFR22_AVBI_MAC_0_SHIFT         (12u)
+#define INTC_ICDICFR22_AVBI_MAC_1_SHIFT         (13u)
+#define INTC_ICDICFR22_ETHERI_0_SHIFT           (14u)
+#define INTC_ICDICFR22_ETHERI_1_SHIFT           (15u)
+#define INTC_ICDICFR22_CEUI_0_SHIFT             (24u)
+#define INTC_ICDICFR22_CEUI_1_SHIFT             (25u)
+
+#define INTC_ICDICFR23_H2XMLB_ERRINT_0_SHIFT    (26u)
+#define INTC_ICDICFR23_H2XMLB_ERRINT_1_SHIFT    (27u)
+#define INTC_ICDICFR23_H2XIC1_ERRINT_0_SHIFT    (28u)
+#define INTC_ICDICFR23_H2XIC1_ERRINT_1_SHIFT    (29u)
+#define INTC_ICDICFR23_X2HPERI1_ERRINT_0_SHIFT  (30u)
+#define INTC_ICDICFR23_X2HPERI1_ERRINT_1_SHIFT  (31u)
+
+#define INTC_ICDICFR24_X2HPERI2_ERRINT_0_SHIFT  (0u)
+#define INTC_ICDICFR24_X2HPERI2_ERRINT_1_SHIFT  (1u)
+#define INTC_ICDICFR24_X2HPERI34_ERRINT_0_SHIFT (2u)
+#define INTC_ICDICFR24_X2HPERI34_ERRINT_1_SHIFT (3u)
+#define INTC_ICDICFR24_X2HPERI5_ERRINT_0_SHIFT  (4u)
+#define INTC_ICDICFR24_X2HPERI5_ERRINT_1_SHIFT  (5u)
+#define INTC_ICDICFR24_X2HPERI67_ERRINT_0_SHIFT (6u)
+#define INTC_ICDICFR24_X2HPERI67_ERRINT_1_SHIFT (7u)
+#define INTC_ICDICFR24_X2HDBGR_ERRINT_0_SHIFT   (8u)
+#define INTC_ICDICFR24_X2HDBGR_ERRINT_1_SHIFT   (9u)
+#define INTC_ICDICFR24_X2HBSC_ERRINT_0_SHIFT    (10u)
+#define INTC_ICDICFR24_X2HBSC_ERRINT_1_SHIFT    (11u)
+#define INTC_ICDICFR24_X2HSPI1_ERRINT_0_SHIFT   (12u)
+#define INTC_ICDICFR24_X2HSPI1_ERRINT_1_SHIFT   (13u)
+#define INTC_ICDICFR24_X2HSPI2_ERRINT_0_SHIFT   (14u)
+#define INTC_ICDICFR24_X2HSPI2_ERRINT_1_SHIFT   (15u)
+#define INTC_ICDICFR24_PRRI_0_SHIFT             (16u)
+#define INTC_ICDICFR24_PRRI_1_SHIFT             (17u)
+#define INTC_ICDICFR24_IFEI0_0_SHIFT            (18u)
+#define INTC_ICDICFR24_IFEI0_1_SHIFT            (19u)
+#define INTC_ICDICFR24_OFFI0_0_SHIFT            (20u)
+#define INTC_ICDICFR24_OFFI0_1_SHIFT            (21u)
+#define INTC_ICDICFR24_PFVEI0_0_SHIFT           (22u)
+#define INTC_ICDICFR24_PFVEI0_1_SHIFT           (23u)
+#define INTC_ICDICFR24_IFEI1_0_SHIFT            (24u)
+#define INTC_ICDICFR24_IFEI1_1_SHIFT            (25u)
+#define INTC_ICDICFR24_OFFI1_0_SHIFT            (26u)
+#define INTC_ICDICFR24_OFFI1_1_SHIFT            (27u)
+#define INTC_ICDICFR24_PFVEI1_0_SHIFT           (28u)
+#define INTC_ICDICFR24_PFVEI1_1_SHIFT           (29u)
+
+#define INTC_ICDICFR26_TINT0_0_SHIFT            (0u)
+#define INTC_ICDICFR26_TINT0_1_SHIFT            (1u)
+#define INTC_ICDICFR26_TINT1_0_SHIFT            (2u)
+#define INTC_ICDICFR26_TINT1_1_SHIFT            (3u)
+#define INTC_ICDICFR26_TINT2_0_SHIFT            (4u)
+#define INTC_ICDICFR26_TINT2_1_SHIFT            (5u)
+#define INTC_ICDICFR26_TINT3_0_SHIFT            (6u)
+#define INTC_ICDICFR26_TINT3_1_SHIFT            (7u)
+#define INTC_ICDICFR26_TINT4_0_SHIFT            (8u)
+#define INTC_ICDICFR26_TINT4_1_SHIFT            (9u)
+#define INTC_ICDICFR26_TINT5_0_SHIFT            (10u)
+#define INTC_ICDICFR26_TINT5_1_SHIFT            (11u)
+#define INTC_ICDICFR26_TINT6_0_SHIFT            (12u)
+#define INTC_ICDICFR26_TINT6_1_SHIFT            (13u)
+#define INTC_ICDICFR26_TINT7_0_SHIFT            (14u)
+#define INTC_ICDICFR26_TINT7_1_SHIFT            (15u)
+#define INTC_ICDICFR26_TINT8_0_SHIFT            (16u)
+#define INTC_ICDICFR26_TINT8_1_SHIFT            (17u)
+#define INTC_ICDICFR26_TINT9_0_SHIFT            (18u)
+#define INTC_ICDICFR26_TINT9_1_SHIFT            (19u)
+#define INTC_ICDICFR26_TINT10_0_SHIFT           (20u)
+#define INTC_ICDICFR26_TINT10_1_SHIFT           (21u)
+#define INTC_ICDICFR26_TINT11_0_SHIFT           (22u)
+#define INTC_ICDICFR26_TINT11_1_SHIFT           (23u)
+#define INTC_ICDICFR26_TINT12_0_SHIFT           (24u)
+#define INTC_ICDICFR26_TINT12_1_SHIFT           (25u)
+#define INTC_ICDICFR26_TINT13_0_SHIFT           (26u)
+#define INTC_ICDICFR26_TINT13_1_SHIFT           (27u)
+#define INTC_ICDICFR26_TINT14_0_SHIFT           (28u)
+#define INTC_ICDICFR26_TINT14_1_SHIFT           (29u)
+#define INTC_ICDICFR26_TINT15_0_SHIFT           (30u)
+#define INTC_ICDICFR26_TINT15_1_SHIFT           (31u)
+
+#define INTC_ICDICFR27_TINT16_0_SHIFT           (0u)
+#define INTC_ICDICFR27_TINT16_1_SHIFT           (1u)
+#define INTC_ICDICFR27_TINT17_0_SHIFT           (2u)
+#define INTC_ICDICFR27_TINT17_1_SHIFT           (3u)
+#define INTC_ICDICFR27_TINT18_0_SHIFT           (4u)
+#define INTC_ICDICFR27_TINT18_1_SHIFT           (5u)
+#define INTC_ICDICFR27_TINT19_0_SHIFT           (6u)
+#define INTC_ICDICFR27_TINT19_1_SHIFT           (7u)
+#define INTC_ICDICFR27_TINT20_0_SHIFT           (8u)
+#define INTC_ICDICFR27_TINT20_1_SHIFT           (9u)
+#define INTC_ICDICFR27_TINT21_0_SHIFT           (10u)
+#define INTC_ICDICFR27_TINT21_1_SHIFT           (11u)
+#define INTC_ICDICFR27_TINT22_0_SHIFT           (12u)
+#define INTC_ICDICFR27_TINT22_1_SHIFT           (13u)
+#define INTC_ICDICFR27_TINT23_0_SHIFT           (14u)
+#define INTC_ICDICFR27_TINT23_1_SHIFT           (15u)
+#define INTC_ICDICFR27_TINT24_0_SHIFT           (16u)
+#define INTC_ICDICFR27_TINT24_1_SHIFT           (17u)
+#define INTC_ICDICFR27_TINT25_0_SHIFT           (18u)
+#define INTC_ICDICFR27_TINT25_1_SHIFT           (19u)
+#define INTC_ICDICFR27_TINT26_0_SHIFT           (20u)
+#define INTC_ICDICFR27_TINT26_1_SHIFT           (21u)
+#define INTC_ICDICFR27_TINT27_0_SHIFT           (22u)
+#define INTC_ICDICFR27_TINT27_1_SHIFT           (23u)
+#define INTC_ICDICFR27_TINT28_0_SHIFT           (24u)
+#define INTC_ICDICFR27_TINT28_1_SHIFT           (25u)
+#define INTC_ICDICFR27_TINT29_0_SHIFT           (26u)
+#define INTC_ICDICFR27_TINT29_1_SHIFT           (27u)
+#define INTC_ICDICFR27_TINT30_0_SHIFT           (28u)
+#define INTC_ICDICFR27_TINT30_1_SHIFT           (29u)
+#define INTC_ICDICFR27_TINT31_0_SHIFT           (30u)
+#define INTC_ICDICFR27_TINT31_1_SHIFT           (31u)
+
+#define INTC_ICDICFR28_TINT32_0_SHIFT           (0u)
+#define INTC_ICDICFR28_TINT32_1_SHIFT           (1u)
+#define INTC_ICDICFR28_TINT33_0_SHIFT           (2u)
+#define INTC_ICDICFR28_TINT33_1_SHIFT           (3u)
+#define INTC_ICDICFR28_TINT34_0_SHIFT           (4u)
+#define INTC_ICDICFR28_TINT34_1_SHIFT           (5u)
+#define INTC_ICDICFR28_TINT35_0_SHIFT           (6u)
+#define INTC_ICDICFR28_TINT35_1_SHIFT           (7u)
+#define INTC_ICDICFR28_TINT36_0_SHIFT           (8u)
+#define INTC_ICDICFR28_TINT36_1_SHIFT           (9u)
+#define INTC_ICDICFR28_TINT37_0_SHIFT           (10u)
+#define INTC_ICDICFR28_TINT37_1_SHIFT           (11u)
+#define INTC_ICDICFR28_TINT38_0_SHIFT           (12u)
+#define INTC_ICDICFR28_TINT38_1_SHIFT           (13u)
+#define INTC_ICDICFR28_TINT39_0_SHIFT           (14u)
+#define INTC_ICDICFR28_TINT39_1_SHIFT           (15u)
+#define INTC_ICDICFR28_TINT40_0_SHIFT           (16u)
+#define INTC_ICDICFR28_TINT40_1_SHIFT           (17u)
+#define INTC_ICDICFR28_TINT41_0_SHIFT           (18u)
+#define INTC_ICDICFR28_TINT41_1_SHIFT           (19u)
+#define INTC_ICDICFR28_TINT42_0_SHIFT           (20u)
+#define INTC_ICDICFR28_TINT42_1_SHIFT           (21u)
+#define INTC_ICDICFR28_TINT43_0_SHIFT           (22u)
+#define INTC_ICDICFR28_TINT43_1_SHIFT           (23u)
+#define INTC_ICDICFR28_TINT44_0_SHIFT           (24u)
+#define INTC_ICDICFR28_TINT44_1_SHIFT           (25u)
+#define INTC_ICDICFR28_TINT45_0_SHIFT           (26u)
+#define INTC_ICDICFR28_TINT45_1_SHIFT           (27u)
+#define INTC_ICDICFR28_TINT46_0_SHIFT           (28u)
+#define INTC_ICDICFR28_TINT46_1_SHIFT           (29u)
+#define INTC_ICDICFR28_TINT47_0_SHIFT           (30u)
+#define INTC_ICDICFR28_TINT47_1_SHIFT           (31u)
+
+#define INTC_ICDICFR29_TINT48_0_SHIFT           (0u)
+#define INTC_ICDICFR29_TINT48_1_SHIFT           (1u)
+#define INTC_ICDICFR29_TINT49_0_SHIFT           (2u)
+#define INTC_ICDICFR29_TINT49_1_SHIFT           (3u)
+#define INTC_ICDICFR29_TINT50_0_SHIFT           (4u)
+#define INTC_ICDICFR29_TINT50_1_SHIFT           (5u)
+#define INTC_ICDICFR29_TINT51_0_SHIFT           (6u)
+#define INTC_ICDICFR29_TINT51_1_SHIFT           (7u)
+#define INTC_ICDICFR29_TINT52_0_SHIFT           (8u)
+#define INTC_ICDICFR29_TINT52_1_SHIFT           (9u)
+#define INTC_ICDICFR29_TINT53_0_SHIFT           (10u)
+#define INTC_ICDICFR29_TINT53_1_SHIFT           (11u)
+#define INTC_ICDICFR29_TINT54_0_SHIFT           (12u)
+#define INTC_ICDICFR29_TINT54_1_SHIFT           (13u)
+#define INTC_ICDICFR29_TINT55_0_SHIFT           (14u)
+#define INTC_ICDICFR29_TINT55_1_SHIFT           (15u)
+#define INTC_ICDICFR29_TINT56_0_SHIFT           (16u)
+#define INTC_ICDICFR29_TINT56_1_SHIFT           (17u)
+#define INTC_ICDICFR29_TINT57_0_SHIFT           (18u)
+#define INTC_ICDICFR29_TINT57_1_SHIFT           (19u)
+#define INTC_ICDICFR29_TINT58_0_SHIFT           (20u)
+#define INTC_ICDICFR29_TINT58_1_SHIFT           (21u)
+#define INTC_ICDICFR29_TINT59_0_SHIFT           (22u)
+#define INTC_ICDICFR29_TINT59_1_SHIFT           (23u)
+#define INTC_ICDICFR29_TINT60_0_SHIFT           (24u)
+#define INTC_ICDICFR29_TINT60_1_SHIFT           (25u)
+#define INTC_ICDICFR29_TINT61_0_SHIFT           (26u)
+#define INTC_ICDICFR29_TINT61_1_SHIFT           (27u)
+#define INTC_ICDICFR29_TINT62_0_SHIFT           (28u)
+#define INTC_ICDICFR29_TINT62_1_SHIFT           (29u)
+#define INTC_ICDICFR29_TINT63_0_SHIFT           (30u)
+#define INTC_ICDICFR29_TINT63_1_SHIFT           (31u)
+
+#define INTC_ICDICFR30_TINT64_0_SHIFT           (0u)
+#define INTC_ICDICFR30_TINT64_1_SHIFT           (1u)
+#define INTC_ICDICFR30_TINT65_0_SHIFT           (2u)
+#define INTC_ICDICFR30_TINT65_1_SHIFT           (3u)
+#define INTC_ICDICFR30_TINT66_0_SHIFT           (4u)
+#define INTC_ICDICFR30_TINT66_1_SHIFT           (5u)
+#define INTC_ICDICFR30_TINT67_0_SHIFT           (6u)
+#define INTC_ICDICFR30_TINT67_1_SHIFT           (7u)
+#define INTC_ICDICFR30_TINT68_0_SHIFT           (8u)
+#define INTC_ICDICFR30_TINT68_1_SHIFT           (9u)
+#define INTC_ICDICFR30_TINT69_0_SHIFT           (10u)
+#define INTC_ICDICFR30_TINT69_1_SHIFT           (11u)
+#define INTC_ICDICFR30_TINT70_0_SHIFT           (12u)
+#define INTC_ICDICFR30_TINT70_1_SHIFT           (13u)
+#define INTC_ICDICFR30_TINT71_0_SHIFT           (14u)
+#define INTC_ICDICFR30_TINT71_1_SHIFT           (15u)
+#define INTC_ICDICFR30_TINT72_0_SHIFT           (16u)
+#define INTC_ICDICFR30_TINT72_1_SHIFT           (17u)
+#define INTC_ICDICFR30_TINT73_0_SHIFT           (18u)
+#define INTC_ICDICFR30_TINT73_1_SHIFT           (19u)
+#define INTC_ICDICFR30_TINT74_0_SHIFT           (20u)
+#define INTC_ICDICFR30_TINT74_1_SHIFT           (21u)
+#define INTC_ICDICFR30_TINT75_0_SHIFT           (22u)
+#define INTC_ICDICFR30_TINT75_1_SHIFT           (23u)
+#define INTC_ICDICFR30_TINT76_0_SHIFT           (24u)
+#define INTC_ICDICFR30_TINT76_1_SHIFT           (25u)
+#define INTC_ICDICFR30_TINT77_0_SHIFT           (26u)
+#define INTC_ICDICFR30_TINT77_1_SHIFT           (27u)
+#define INTC_ICDICFR30_TINT78_0_SHIFT           (28u)
+#define INTC_ICDICFR30_TINT78_1_SHIFT           (29u)
+#define INTC_ICDICFR30_TINT79_0_SHIFT           (30u)
+#define INTC_ICDICFR30_TINT79_1_SHIFT           (31u)
+
+#define INTC_ICDICFR31_TINT80_0_SHIFT           (0u)
+#define INTC_ICDICFR31_TINT80_1_SHIFT           (1u)
+#define INTC_ICDICFR31_TINT81_0_SHIFT           (2u)
+#define INTC_ICDICFR31_TINT81_1_SHIFT           (3u)
+#define INTC_ICDICFR31_TINT82_0_SHIFT           (4u)
+#define INTC_ICDICFR31_TINT82_1_SHIFT           (5u)
+#define INTC_ICDICFR31_TINT83_0_SHIFT           (6u)
+#define INTC_ICDICFR31_TINT83_1_SHIFT           (7u)
+#define INTC_ICDICFR31_TINT84_0_SHIFT           (8u)
+#define INTC_ICDICFR31_TINT84_1_SHIFT           (9u)
+#define INTC_ICDICFR31_TINT85_0_SHIFT           (10u)
+#define INTC_ICDICFR31_TINT85_1_SHIFT           (11u)
+#define INTC_ICDICFR31_TINT86_0_SHIFT           (12u)
+#define INTC_ICDICFR31_TINT86_1_SHIFT           (13u)
+#define INTC_ICDICFR31_TINT87_0_SHIFT           (14u)
+#define INTC_ICDICFR31_TINT87_1_SHIFT           (15u)
+#define INTC_ICDICFR31_TINT88_0_SHIFT           (16u)
+#define INTC_ICDICFR31_TINT88_1_SHIFT           (17u)
+#define INTC_ICDICFR31_TINT89_0_SHIFT           (18u)
+#define INTC_ICDICFR31_TINT89_1_SHIFT           (19u)
+#define INTC_ICDICFR31_TINT90_0_SHIFT           (20u)
+#define INTC_ICDICFR31_TINT90_1_SHIFT           (21u)
+#define INTC_ICDICFR31_TINT91_0_SHIFT           (22u)
+#define INTC_ICDICFR31_TINT91_1_SHIFT           (23u)
+#define INTC_ICDICFR31_TINT92_0_SHIFT           (24u)
+#define INTC_ICDICFR31_TINT92_1_SHIFT           (25u)
+#define INTC_ICDICFR31_TINT93_0_SHIFT           (26u)
+#define INTC_ICDICFR31_TINT93_1_SHIFT           (27u)
+#define INTC_ICDICFR31_TINT94_0_SHIFT           (28u)
+#define INTC_ICDICFR31_TINT94_1_SHIFT           (29u)
+#define INTC_ICDICFR31_TINT95_0_SHIFT           (30u)
+#define INTC_ICDICFR31_TINT95_1_SHIFT           (31u)
+
+#define INTC_ICDICFR32_TINT96_0_SHIFT           (0u)
+#define INTC_ICDICFR32_TINT96_1_SHIFT           (1u)
+#define INTC_ICDICFR32_TINT97_0_SHIFT           (2u)
+#define INTC_ICDICFR32_TINT97_1_SHIFT           (3u)
+#define INTC_ICDICFR32_TINT98_0_SHIFT           (4u)
+#define INTC_ICDICFR32_TINT98_1_SHIFT           (5u)
+#define INTC_ICDICFR32_TINT99_0_SHIFT           (6u)
+#define INTC_ICDICFR32_TINT99_1_SHIFT           (7u)
+#define INTC_ICDICFR32_TINT100_0_SHIFT          (8u)
+#define INTC_ICDICFR32_TINT100_1_SHIFT          (9u)
+#define INTC_ICDICFR32_TINT101_0_SHIFT          (10u)
+#define INTC_ICDICFR32_TINT101_1_SHIFT          (11u)
+#define INTC_ICDICFR32_TINT102_0_SHIFT          (12u)
+#define INTC_ICDICFR32_TINT102_1_SHIFT          (13u)
+#define INTC_ICDICFR32_TINT103_0_SHIFT          (14u)
+#define INTC_ICDICFR32_TINT103_1_SHIFT          (15u)
+#define INTC_ICDICFR32_TINT104_0_SHIFT          (16u)
+#define INTC_ICDICFR32_TINT104_1_SHIFT          (17u)
+#define INTC_ICDICFR32_TINT105_0_SHIFT          (18u)
+#define INTC_ICDICFR32_TINT105_1_SHIFT          (19u)
+#define INTC_ICDICFR32_TINT106_0_SHIFT          (20u)
+#define INTC_ICDICFR32_TINT106_1_SHIFT          (21u)
+#define INTC_ICDICFR32_TINT107_0_SHIFT          (22u)
+#define INTC_ICDICFR32_TINT107_1_SHIFT          (23u)
+#define INTC_ICDICFR32_TINT108_0_SHIFT          (24u)
+#define INTC_ICDICFR32_TINT108_1_SHIFT          (25u)
+#define INTC_ICDICFR32_TINT109_0_SHIFT          (26u)
+#define INTC_ICDICFR32_TINT109_1_SHIFT          (27u)
+#define INTC_ICDICFR32_TINT110_0_SHIFT          (28u)
+#define INTC_ICDICFR32_TINT110_1_SHIFT          (29u)
+#define INTC_ICDICFR32_TINT111_0_SHIFT          (30u)
+#define INTC_ICDICFR32_TINT111_1_SHIFT          (31u)
+
+#define INTC_ICDICFR33_TINT112_0_SHIFT          (0u)
+#define INTC_ICDICFR33_TINT112_1_SHIFT          (1u)
+#define INTC_ICDICFR33_TINT113_0_SHIFT          (2u)
+#define INTC_ICDICFR33_TINT113_1_SHIFT          (3u)
+#define INTC_ICDICFR33_TINT114_0_SHIFT          (4u)
+#define INTC_ICDICFR33_TINT114_1_SHIFT          (5u)
+#define INTC_ICDICFR33_TINT115_0_SHIFT          (6u)
+#define INTC_ICDICFR33_TINT115_1_SHIFT          (7u)
+#define INTC_ICDICFR33_TINT116_0_SHIFT          (8u)
+#define INTC_ICDICFR33_TINT116_1_SHIFT          (9u)
+#define INTC_ICDICFR33_TINT117_0_SHIFT          (10u)
+#define INTC_ICDICFR33_TINT117_1_SHIFT          (11u)
+#define INTC_ICDICFR33_TINT118_0_SHIFT          (12u)
+#define INTC_ICDICFR33_TINT118_1_SHIFT          (13u)
+#define INTC_ICDICFR33_TINT119_0_SHIFT          (14u)
+#define INTC_ICDICFR33_TINT119_1_SHIFT          (15u)
+#define INTC_ICDICFR33_TINT120_0_SHIFT          (16u)
+#define INTC_ICDICFR33_TINT120_1_SHIFT          (17u)
+#define INTC_ICDICFR33_TINT121_0_SHIFT          (18u)
+#define INTC_ICDICFR33_TINT121_1_SHIFT          (19u)
+#define INTC_ICDICFR33_TINT122_0_SHIFT          (20u)
+#define INTC_ICDICFR33_TINT122_1_SHIFT          (21u)
+#define INTC_ICDICFR33_TINT123_0_SHIFT          (22u)
+#define INTC_ICDICFR33_TINT123_1_SHIFT          (23u)
+#define INTC_ICDICFR33_TINT124_0_SHIFT          (24u)
+#define INTC_ICDICFR33_TINT124_1_SHIFT          (25u)
+#define INTC_ICDICFR33_TINT125_0_SHIFT          (26u)
+#define INTC_ICDICFR33_TINT125_1_SHIFT          (27u)
+#define INTC_ICDICFR33_TINT126_0_SHIFT          (28u)
+#define INTC_ICDICFR33_TINT126_1_SHIFT          (29u)
+#define INTC_ICDICFR33_TINT127_0_SHIFT          (30u)
+#define INTC_ICDICFR33_TINT127_1_SHIFT          (31u)
+
+#define INTC_ICDICFR34_TINT128_0_SHIFT          (0u)
+#define INTC_ICDICFR34_TINT128_1_SHIFT          (1u)
+#define INTC_ICDICFR34_TINT129_0_SHIFT          (2u)
+#define INTC_ICDICFR34_TINT129_1_SHIFT          (3u)
+#define INTC_ICDICFR34_TINT130_0_SHIFT          (4u)
+#define INTC_ICDICFR34_TINT130_1_SHIFT          (5u)
+#define INTC_ICDICFR34_TINT131_0_SHIFT          (6u)
+#define INTC_ICDICFR34_TINT131_1_SHIFT          (7u)
+#define INTC_ICDICFR34_TINT132_0_SHIFT          (8u)
+#define INTC_ICDICFR34_TINT132_1_SHIFT          (9u)
+#define INTC_ICDICFR34_TINT133_0_SHIFT          (10u)
+#define INTC_ICDICFR34_TINT133_1_SHIFT          (11u)
+#define INTC_ICDICFR34_TINT134_0_SHIFT          (12u)
+#define INTC_ICDICFR34_TINT134_1_SHIFT          (13u)
+#define INTC_ICDICFR34_TINT135_0_SHIFT          (14u)
+#define INTC_ICDICFR34_TINT135_1_SHIFT          (15u)
+#define INTC_ICDICFR34_TINT136_0_SHIFT          (16u)
+#define INTC_ICDICFR34_TINT136_1_SHIFT          (17u)
+#define INTC_ICDICFR34_TINT137_0_SHIFT          (18u)
+#define INTC_ICDICFR34_TINT137_1_SHIFT          (19u)
+#define INTC_ICDICFR34_TINT138_0_SHIFT          (20u)
+#define INTC_ICDICFR34_TINT138_1_SHIFT          (21u)
+#define INTC_ICDICFR34_TINT139_0_SHIFT          (22u)
+#define INTC_ICDICFR34_TINT139_1_SHIFT          (23u)
+#define INTC_ICDICFR34_TINT140_0_SHIFT          (24u)
+#define INTC_ICDICFR34_TINT140_1_SHIFT          (25u)
+#define INTC_ICDICFR34_TINT141_0_SHIFT          (26u)
+#define INTC_ICDICFR34_TINT141_1_SHIFT          (27u)
+#define INTC_ICDICFR34_TINT142_0_SHIFT          (28u)
+#define INTC_ICDICFR34_TINT142_1_SHIFT          (29u)
+#define INTC_ICDICFR34_TINT143_0_SHIFT          (30u)
+#define INTC_ICDICFR34_TINT143_1_SHIFT          (31u)
+
+#define INTC_ICDICFR35_TINT144_0_SHIFT          (0u)
+#define INTC_ICDICFR35_TINT144_1_SHIFT          (1u)
+#define INTC_ICDICFR35_TINT145_0_SHIFT          (2u)
+#define INTC_ICDICFR35_TINT145_1_SHIFT          (3u)
+#define INTC_ICDICFR35_TINT146_0_SHIFT          (4u)
+#define INTC_ICDICFR35_TINT146_1_SHIFT          (5u)
+#define INTC_ICDICFR35_TINT147_0_SHIFT          (6u)
+#define INTC_ICDICFR35_TINT147_1_SHIFT          (7u)
+#define INTC_ICDICFR35_TINT148_0_SHIFT          (8u)
+#define INTC_ICDICFR35_TINT148_1_SHIFT          (9u)
+#define INTC_ICDICFR35_TINT149_0_SHIFT          (10u)
+#define INTC_ICDICFR35_TINT149_1_SHIFT          (11u)
+#define INTC_ICDICFR35_TINT150_0_SHIFT          (12u)
+#define INTC_ICDICFR35_TINT150_1_SHIFT          (13u)
+#define INTC_ICDICFR35_TINT151_0_SHIFT          (14u)
+#define INTC_ICDICFR35_TINT151_1_SHIFT          (15u)
+#define INTC_ICDICFR35_TINT152_0_SHIFT          (16u)
+#define INTC_ICDICFR35_TINT152_1_SHIFT          (17u)
+#define INTC_ICDICFR35_TINT153_0_SHIFT          (18u)
+#define INTC_ICDICFR35_TINT153_1_SHIFT          (19u)
+#define INTC_ICDICFR35_TINT154_0_SHIFT          (20u)
+#define INTC_ICDICFR35_TINT154_1_SHIFT          (21u)
+#define INTC_ICDICFR35_TINT155_0_SHIFT          (22u)
+#define INTC_ICDICFR35_TINT155_1_SHIFT          (23u)
+#define INTC_ICDICFR35_TINT156_0_SHIFT          (24u)
+#define INTC_ICDICFR35_TINT156_1_SHIFT          (25u)
+#define INTC_ICDICFR35_TINT157_0_SHIFT          (26u)
+#define INTC_ICDICFR35_TINT157_1_SHIFT          (27u)
+#define INTC_ICDICFR35_TINT158_0_SHIFT          (28u)
+#define INTC_ICDICFR35_TINT158_1_SHIFT          (29u)
+#define INTC_ICDICFR35_TINT159_0_SHIFT          (30u)
+#define INTC_ICDICFR35_TINT159_1_SHIFT          (31u)
+
+#define INTC_ICDICFR36_TINT160_0_SHIFT          (0u)
+#define INTC_ICDICFR36_TINT160_1_SHIFT          (1u)
+#define INTC_ICDICFR36_TINT161_0_SHIFT          (2u)
+#define INTC_ICDICFR36_TINT161_1_SHIFT          (3u)
+#define INTC_ICDICFR36_TINT162_0_SHIFT          (4u)
+#define INTC_ICDICFR36_TINT162_1_SHIFT          (5u)
+#define INTC_ICDICFR36_TINT163_0_SHIFT          (6u)
+#define INTC_ICDICFR36_TINT163_1_SHIFT          (7u)
+#define INTC_ICDICFR36_TINT164_0_SHIFT          (8u)
+#define INTC_ICDICFR36_TINT164_1_SHIFT          (9u)
+#define INTC_ICDICFR36_TINT165_0_SHIFT          (10u)
+#define INTC_ICDICFR36_TINT165_1_SHIFT          (11u)
+#define INTC_ICDICFR36_TINT166_0_SHIFT          (12u)
+#define INTC_ICDICFR36_TINT166_1_SHIFT          (13u)
+#define INTC_ICDICFR36_TINT167_0_SHIFT          (14u)
+#define INTC_ICDICFR36_TINT167_1_SHIFT          (15u)
+#define INTC_ICDICFR36_TINT168_0_SHIFT          (16u)
+#define INTC_ICDICFR36_TINT168_1_SHIFT          (17u)
+#define INTC_ICDICFR36_TINT169_0_SHIFT          (18u)
+#define INTC_ICDICFR36_TINT169_1_SHIFT          (19u)
+#define INTC_ICDICFR36_TINT170_0_SHIFT          (20u)
+#define INTC_ICDICFR36_TINT170_1_SHIFT          (21u)
+
+#define INTC_ICDSGIR_SGIINTID_SHIFT             (0u)
+#define INTC_ICDSGIR_SATT_SHIFT                 (15u)
+#define INTC_ICDSGIR_CPUTargetList_SHIFT        (16u)
+#define INTC_ICDSGIR_TargetListFilter_SHIFT     (24u)
+
+#define INTC_ICCICR_EnableS_SHIFT               (0u)
+#define INTC_ICCICR_EnableNS_SHIFT              (1u)
+#define INTC_ICCICR_AckCtl_SHIFT                (2u)
+#define INTC_ICCICR_FIQEn_SHIFT                 (3u)
+#define INTC_ICCICR_SBPR_SHIFT                  (4u)
+
+#define INTC_ICCPMR_Priority_SHIFT              (0u)
+
+#define INTC_ICCBPR_Binarypoint_SHIFT           (0u)
+
+#define INTC_ICCIAR_ACKINTID_SHIFT              (0u)
+#define INTC_ICCIAR_CPUID_SHIFT                 (10u)
+
+#define INTC_ICCEOIR_EOIINTID_SHIFT             (0u)
+#define INTC_ICCEOIR_CPUID_SHIFT                (10u)
+
+#define INTC_ICCRPR_Priority_SHIFT              (0u)
+
+#define INTC_ICCHPIR_PENDINTID_SHIFT            (0u)
+#define INTC_ICCHPIR_CPUID_SHIFT                (10u)
+
+#define INTC_ICCABPR_Binarypoint_SHIFT          (0u)
+
+#define INTC_ICCIIDR_Implementer_SHIFT          (0u)
+#define INTC_ICCIIDR_Revision_SHIFT             (12u)
+#define INTC_ICCIIDR_Architecture_version_SHIFT (16u)
+#define INTC_ICCIIDR_ProductID_SHIFT            (20u)
+
+#define INTC_ICR0_NMIF_SHIFT                    (1u)
+#define INTC_ICR0_NMIE_SHIFT                    (8u)
+#define INTC_ICR0_NMIL_SHIFT                    (15u)
+
+#define INTC_ICR1_IRQ00S_SHIFT                  (0u)
+#define INTC_ICR1_IRQ01S_SHIFT                  (1u)
+#define INTC_ICR1_IRQ10S_SHIFT                  (2u)
+#define INTC_ICR1_IRQ11S_SHIFT                  (3u)
+#define INTC_ICR1_IRQ20S_SHIFT                  (4u)
+#define INTC_ICR1_IRQ21S_SHIFT                  (5u)
+#define INTC_ICR1_IRQ30S_SHIFT                  (6u)
+#define INTC_ICR1_IRQ31S_SHIFT                  (7u)
+#define INTC_ICR1_IRQ40S_SHIFT                  (8u)
+#define INTC_ICR1_IRQ41S_SHIFT                  (9u)
+#define INTC_ICR1_IRQ50S_SHIFT                  (10u)
+#define INTC_ICR1_IRQ51S_SHIFT                  (11u)
+#define INTC_ICR1_IRQ60S_SHIFT                  (12u)
+#define INTC_ICR1_IRQ61S_SHIFT                  (13u)
+#define INTC_ICR1_IRQ70S_SHIFT                  (14u)
+#define INTC_ICR1_IRQ71S_SHIFT                  (15u)
+
+#define INTC_IRQRR_IRQ0F_SHIFT                  (0u)
+#define INTC_IRQRR_IRQ1F_SHIFT                  (1u)
+#define INTC_IRQRR_IRQ2F_SHIFT                  (2u)
+#define INTC_IRQRR_IRQ3F_SHIFT                  (3u)
+#define INTC_IRQRR_IRQ4F_SHIFT                  (4u)
+#define INTC_IRQRR_IRQ5F_SHIFT                  (5u)
+#define INTC_IRQRR_IRQ6F_SHIFT                  (6u)
+#define INTC_IRQRR_IRQ7F_SHIFT                  (7u)
+
+
+#endif /* INTC_IOBITMASK_H */
+
+/* End of File */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/mtu2_iobitmask.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/mtu2_iobitmask.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/mtu2_iobitmask.h	(revision 270)
@@ -0,0 +1,462 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name   : mtu2_iobitmask.h
+* $Rev: 1138 $
+* $Date:: 2014-08-08 11:03:56 +0900#$
+* Description : MTU2 register define header
+*******************************************************************************/
+#ifndef MTU2_IOBITMASK_H
+#define MTU2_IOBITMASK_H
+
+
+/* ==== Mask values for IO registers ==== */
+#define MTU2_TCR_n_TPSC                         (0x07u)
+#define MTU2_TCR_n_CKEG                         (0x18u)
+#define MTU2_TCR_n_CCLR                         (0xE0u)
+
+#define MTU2_TMDR_n_MD                          (0x0Fu)
+
+#define MTU2_TIOR_2_IOA                         (0x0Fu)
+#define MTU2_TIOR_2_IOB                         (0xF0u)
+
+#define MTU2_TIER_n_TGIEA                       (0x01u)
+#define MTU2_TIER_n_TGIEB                       (0x02u)
+#define MTU2_TIER_n_TCIEV                       (0x10u)
+#define MTU2_TIER_2_TCIEU                       (0x20u)
+#define MTU2_TIER_n_TTGE                        (0x80u)
+
+#define MTU2_TSR_n_TGFA                         (0x01u)
+#define MTU2_TSR_n_TGFB                         (0x02u)
+#define MTU2_TSR_n_TCFV                         (0x10u)
+#define MTU2_TSR_2_TCFU                         (0x20u)
+#define MTU2_TSR_2_TCFD                         (0x80u)
+
+#define MTU2_TCNT_n_D                           (0xFFFFu)
+
+#define MTU2_TGRA_n_D                           (0xFFFFu)
+
+#define MTU2_TGRB_n_D                           (0xFFFFu)
+
+#define MTU2_TMDR_3_BFA                         (0x10u)
+#define MTU2_TMDR_3_BFB                         (0x20u)
+
+#define MTU2_TMDR_4_BFA                         (0x10u)
+#define MTU2_TMDR_4_BFB                         (0x20u)
+
+#define MTU2_TIORH_3_IOA                        (0x0Fu)
+#define MTU2_TIORH_3_IOB                        (0xF0u)
+
+#define MTU2_TIORL_3_IOC                        (0x0Fu)
+#define MTU2_TIORL_3_IOD                        (0xF0u)
+
+#define MTU2_TIORH_4_IOA                        (0x0Fu)
+#define MTU2_TIORH_4_IOB                        (0xF0u)
+
+#define MTU2_TIORL_4_IOC                        (0x0Fu)
+#define MTU2_TIORL_4_IOD                        (0xF0u)
+
+#define MTU2_TIER_3_TGIEC                       (0x04u)
+#define MTU2_TIER_3_TGIED                       (0x08u)
+
+#define MTU2_TIER_4_TGIEC                       (0x04u)
+#define MTU2_TIER_4_TGIED                       (0x08u)
+#define MTU2_TIER_4_TTGE2                       (0x40u)
+
+#define MTU2_TOER_OE3B                          (0x01u)
+#define MTU2_TOER_OE4A                          (0x02u)
+#define MTU2_TOER_OE4B                          (0x04u)
+#define MTU2_TOER_OE3D                          (0x08u)
+#define MTU2_TOER_OE4C                          (0x10u)
+#define MTU2_TOER_OE4D                          (0x20u)
+
+#define MTU2_TGCR_UF                            (0x01u)
+#define MTU2_TGCR_VF                            (0x02u)
+#define MTU2_TGCR_WF                            (0x04u)
+#define MTU2_TGCR_FB                            (0x08u)
+#define MTU2_TGCR_P                             (0x10u)
+#define MTU2_TGCR_N                             (0x20u)
+#define MTU2_TGCR_BDC                           (0x40u)
+
+#define MTU2_TOCR1_OLSP                         (0x01u)
+#define MTU2_TOCR1_OLSN                         (0x02u)
+#define MTU2_TOCR1_TOCS                         (0x04u)
+#define MTU2_TOCR1_TOCL                         (0x08u)
+#define MTU2_TOCR1_PSYE                         (0x40u)
+
+#define MTU2_TOCR2_OLS1P                        (0x01u)
+#define MTU2_TOCR2_OLS1N                        (0x02u)
+#define MTU2_TOCR2_OLS2P                        (0x04u)
+#define MTU2_TOCR2_OLS2N                        (0x08u)
+#define MTU2_TOCR2_OLS3P                        (0x10u)
+#define MTU2_TOCR2_OLS3N                        (0x20u)
+#define MTU2_TOCR2_BF                           (0xC0u)
+
+#define MTU2_TCDR_D                             (0xFFFFu)
+
+#define MTU2_TDDR_D                             (0xFFFFu)
+
+#define MTU2_TCNTS_D                            (0xFFFFu)
+
+#define MTU2_TCBR_D                             (0xFFFFu)
+
+#define MTU2_TGRC_3_D                           (0xFFFFu)
+
+#define MTU2_TGRD_3_D                           (0xFFFFu)
+
+#define MTU2_TGRC_4_D                           (0xFFFFu)
+
+#define MTU2_TGRD_4_D                           (0xFFFFu)
+
+#define MTU2_TSR_3_TGFC                         (0x04u)
+#define MTU2_TSR_3_TGFD                         (0x08u)
+#define MTU2_TSR_3_TCFD                         (0x80u)
+
+#define MTU2_TSR_4_TGFC                         (0x04u)
+#define MTU2_TSR_4_TGFD                         (0x08u)
+#define MTU2_TSR_4_TCFD                         (0x80u)
+
+#define MTU2_TITCR_4VCOR                        (0x07u)
+#define MTU2_TITCR_T4VEN                        (0x08u)
+#define MTU2_TITCR_3ACOR                        (0x70u)
+#define MTU2_TITCR_T3AEN                        (0x80u)
+
+#define MTU2_TITCNT_4VCNT                       (0x07u)
+#define MTU2_TITCNT_3ACNT                       (0x70u)
+
+#define MTU2_TBTER_BTE                          (0x03u)
+
+#define MTU2_TDER_TDER                          (0x01u)
+
+#define MTU2_TOLBR_OLS1P                        (0x01u)
+#define MTU2_TOLBR_OLS1N                        (0x02u)
+#define MTU2_TOLBR_OLS2P                        (0x04u)
+#define MTU2_TOLBR_OLS2N                        (0x08u)
+#define MTU2_TOLBR_OLS3P                        (0x10u)
+#define MTU2_TOLBR_OLS3N                        (0x20u)
+
+#define MTU2_TBTM_3_TTSA                        (0x01u)
+#define MTU2_TBTM_3_TTSB                        (0x02u)
+
+#define MTU2_TBTM_4_TTSA                        (0x01u)
+#define MTU2_TBTM_4_TTSB                        (0x02u)
+
+#define MTU2_TADCR_ITB4VE                       (0x0001u)
+#define MTU2_TADCR_ITB3AE                       (0x0002u)
+#define MTU2_TADCR_ITA4VE                       (0x0004u)
+#define MTU2_TADCR_ITA3AE                       (0x0008u)
+#define MTU2_TADCR_DT4BE                        (0x0010u)
+#define MTU2_TADCR_UT4BE                        (0x0020u)
+#define MTU2_TADCR_DT4AE                        (0x0040u)
+#define MTU2_TADCR_UT4AE                        (0x0080u)
+#define MTU2_TADCR_BF                           (0xC000u)
+
+#define MTU2_TADCORA_4_D                        (0xFFFFu)
+
+#define MTU2_TADCORB_4_D                        (0xFFFFu)
+
+#define MTU2_TADCOBRA_4_D                       (0xFFFFu)
+
+#define MTU2_TADCOBRB_4_D                       (0xFFFFu)
+
+#define MTU2_TWCR_WRE                           (0x01u)
+#define MTU2_TWCR_CCE                           (0x80u)
+
+#define MTU2_TSTR_CST0                          (0x01u)
+#define MTU2_TSTR_CST1                          (0x02u)
+#define MTU2_TSTR_CST2                          (0x04u)
+#define MTU2_TSTR_CST3                          (0x40u)
+#define MTU2_TSTR_CST4                          (0x80u)
+
+#define MTU2_TSYR_SYNC0                         (0x01u)
+#define MTU2_TSYR_SYNC1                         (0x02u)
+#define MTU2_TSYR_SYNC2                         (0x04u)
+#define MTU2_TSYR_SYNC3                         (0x40u)
+#define MTU2_TSYR_SYNC4                         (0x80u)
+
+#define MTU2_TRWER_RWE                          (0x01u)
+
+#define MTU2_TMDR_0_BFA                         (0x10u)
+#define MTU2_TMDR_0_BFB                         (0x20u)
+#define MTU2_TMDR_0_BFE                         (0x40u)
+
+#define MTU2_TIORH_0_IOA                        (0x0Fu)
+#define MTU2_TIORH_0_IOB                        (0xF0u)
+
+#define MTU2_TIORL_0_IOC                        (0x0Fu)
+#define MTU2_TIORL_0_IOD                        (0xF0u)
+
+#define MTU2_TIER_0_TGIEC                       (0x04u)
+#define MTU2_TIER_0_TGIED                       (0x08u)
+
+#define MTU2_TSR_0_TGFC                         (0x04u)
+#define MTU2_TSR_0_TGFD                         (0x08u)
+
+#define MTU2_TGRC_0_D                           (0xFFFFu)
+
+#define MTU2_TGRD_0_D                           (0xFFFFu)
+
+#define MTU2_TGRE_0_D                           (0xFFFFu)
+
+#define MTU2_TGRF_0_D                           (0xFFFFu)
+
+#define MTU2_TIER2_0_TGIEE                      (0x01u)
+#define MTU2_TIER2_0_TGIEF                      (0x02u)
+
+#define MTU2_TSR2_0_TGFE                        (0x01u)
+#define MTU2_TSR2_0_TGFF                        (0x02u)
+
+#define MTU2_TBTM_0_TTSA                        (0x01u)
+#define MTU2_TBTM_0_TTSB                        (0x02u)
+#define MTU2_TBTM_0_TTSE                        (0x04u)
+
+#define MTU2_TIOR_1_IOA                         (0x0Fu)
+#define MTU2_TIOR_1_IOB                         (0xF0u)
+
+#define MTU2_TIER_1_TCIEU                       (0x20u)
+
+#define MTU2_TSR_1_TCFU                         (0x20u)
+#define MTU2_TSR_1_TCFD                         (0x80u)
+
+#define MTU2_TICCR_I1AE                         (0x01u)
+#define MTU2_TICCR_I1BE                         (0x02u)
+#define MTU2_TICCR_I2AE                         (0x04u)
+#define MTU2_TICCR_I2BE                         (0x08u)
+
+
+/* ==== Shift values for IO registers ==== */
+#define MTU2_TCR_n_TPSC_SHIFT                   (0u)
+#define MTU2_TCR_n_CKEG_SHIFT                   (3u)
+#define MTU2_TCR_n_CCLR_SHIFT                   (5u)
+
+#define MTU2_TMDR_n_MD_SHIFT                    (0u)
+
+#define MTU2_TIOR_2_IOA_SHIFT                   (0u)
+#define MTU2_TIOR_2_IOB_SHIFT                   (4u)
+
+#define MTU2_TIER_n_TGIEA_SHIFT                 (0u)
+#define MTU2_TIER_n_TGIEB_SHIFT                 (1u)
+#define MTU2_TIER_n_TCIEV_SHIFT                 (4u)
+#define MTU2_TIER_2_TCIEU_SHIFT                 (5u)
+#define MTU2_TIER_n_TTGE_SHIFT                  (7u)
+
+#define MTU2_TSR_n_TGFA_SHIFT                   (0u)
+#define MTU2_TSR_n_TGFB_SHIFT                   (1u)
+#define MTU2_TSR_n_TCFV_SHIFT                   (4u)
+#define MTU2_TSR_2_TCFU_SHIFT                   (5u)
+#define MTU2_TSR_2_TCFD_SHIFT                   (7u)
+
+#define MTU2_TCNT_n_D_SHIFT                     (0u)
+
+#define MTU2_TGRA_n_D_SHIFT                     (0u)
+
+#define MTU2_TGRB_n_D_SHIFT                     (0u)
+
+#define MTU2_TMDR_3_BFA_SHIFT                   (4u)
+#define MTU2_TMDR_3_BFB_SHIFT                   (5u)
+
+#define MTU2_TMDR_4_BFA_SHIFT                   (4u)
+#define MTU2_TMDR_4_BFB_SHIFT                   (5u)
+
+#define MTU2_TIORH_3_IOA_SHIFT                  (0u)
+#define MTU2_TIORH_3_IOB_SHIFT                  (4u)
+
+#define MTU2_TIORL_3_IOC_SHIFT                  (0u)
+#define MTU2_TIORL_3_IOD_SHIFT                  (4u)
+
+#define MTU2_TIORH_4_IOA_SHIFT                  (0u)
+#define MTU2_TIORH_4_IOB_SHIFT                  (4u)
+
+#define MTU2_TIORL_4_IOC_SHIFT                  (0u)
+#define MTU2_TIORL_4_IOD_SHIFT                  (4u)
+
+#define MTU2_TIER_3_TGIEC_SHIFT                 (2u)
+#define MTU2_TIER_3_TGIED_SHIFT                 (3u)
+
+#define MTU2_TIER_4_TGIEC_SHIFT                 (2u)
+#define MTU2_TIER_4_TGIED_SHIFT                 (3u)
+#define MTU2_TIER_4_TTGE2_SHIFT                 (6u)
+
+#define MTU2_TOER_OE3B_SHIFT                    (0u)
+#define MTU2_TOER_OE4A_SHIFT                    (1u)
+#define MTU2_TOER_OE4B_SHIFT                    (2u)
+#define MTU2_TOER_OE3D_SHIFT                    (3u)
+#define MTU2_TOER_OE4C_SHIFT                    (4u)
+#define MTU2_TOER_OE4D_SHIFT                    (5u)
+
+#define MTU2_TGCR_UF_SHIFT                      (0u)
+#define MTU2_TGCR_VF_SHIFT                      (1u)
+#define MTU2_TGCR_WF_SHIFT                      (2u)
+#define MTU2_TGCR_FB_SHIFT                      (3u)
+#define MTU2_TGCR_P_SHIFT                       (4u)
+#define MTU2_TGCR_N_SHIFT                       (5u)
+#define MTU2_TGCR_BDC_SHIFT                     (6u)
+
+#define MTU2_TOCR1_OLSP_SHIFT                   (0u)
+#define MTU2_TOCR1_OLSN_SHIFT                   (1u)
+#define MTU2_TOCR1_TOCS_SHIFT                   (2u)
+#define MTU2_TOCR1_TOCL_SHIFT                   (3u)
+#define MTU2_TOCR1_PSYE_SHIFT                   (6u)
+
+#define MTU2_TOCR2_OLS1P_SHIFT                  (0u)
+#define MTU2_TOCR2_OLS1N_SHIFT                  (1u)
+#define MTU2_TOCR2_OLS2P_SHIFT                  (2u)
+#define MTU2_TOCR2_OLS2N_SHIFT                  (3u)
+#define MTU2_TOCR2_OLS3P_SHIFT                  (4u)
+#define MTU2_TOCR2_OLS3N_SHIFT                  (5u)
+#define MTU2_TOCR2_BF_SHIFT                     (6u)
+
+#define MTU2_TCDR_D_SHIFT                       (0u)
+
+#define MTU2_TDDR_D_SHIFT                       (0u)
+
+#define MTU2_TCNTS_D_SHIFT                      (0u)
+
+#define MTU2_TCBR_D_SHIFT                       (0u)
+
+#define MTU2_TGRC_3_D_SHIFT                     (0u)
+
+#define MTU2_TGRD_3_D_SHIFT                     (0u)
+
+#define MTU2_TGRC_4_D_SHIFT                     (0u)
+
+#define MTU2_TGRD_4_D_SHIFT                     (0u)
+
+#define MTU2_TSR_3_TGFC_SHIFT                   (2u)
+#define MTU2_TSR_3_TGFD_SHIFT                   (3u)
+#define MTU2_TSR_3_TCFD_SHIFT                   (7u)
+
+#define MTU2_TSR_4_TGFC_SHIFT                   (2u)
+#define MTU2_TSR_4_TGFD_SHIFT                   (3u)
+#define MTU2_TSR_4_TCFD_SHIFT                   (7u)
+
+#define MTU2_TITCR_4VCOR_SHIFT                  (0u)
+#define MTU2_TITCR_T4VEN_SHIFT                  (3u)
+#define MTU2_TITCR_3ACOR_SHIFT                  (4u)
+#define MTU2_TITCR_T3AEN_SHIFT                  (7u)
+
+#define MTU2_TITCNT_4VCNT_SHIFT                 (0u)
+#define MTU2_TITCNT_3ACNT_SHIFT                 (4u)
+
+#define MTU2_TBTER_BTE_SHIFT                    (0u)
+
+#define MTU2_TDER_TDER_SHIFT                    (0u)
+
+#define MTU2_TOLBR_OLS1P_SHIFT                  (0u)
+#define MTU2_TOLBR_OLS1N_SHIFT                  (1u)
+#define MTU2_TOLBR_OLS2P_SHIFT                  (2u)
+#define MTU2_TOLBR_OLS2N_SHIFT                  (3u)
+#define MTU2_TOLBR_OLS3P_SHIFT                  (4u)
+#define MTU2_TOLBR_OLS3N_SHIFT                  (5u)
+
+#define MTU2_TBTM_3_TTSA_SHIFT                  (0u)
+#define MTU2_TBTM_3_TTSB_SHIFT                  (1u)
+
+#define MTU2_TBTM_4_TTSA_SHIFT                  (0u)
+#define MTU2_TBTM_4_TTSB_SHIFT                  (1u)
+
+#define MTU2_TADCR_ITB4VE_SHIFT                 (0u)
+#define MTU2_TADCR_ITB3AE_SHIFT                 (1u)
+#define MTU2_TADCR_ITA4VE_SHIFT                 (2u)
+#define MTU2_TADCR_ITA3AE_SHIFT                 (3u)
+#define MTU2_TADCR_DT4BE_SHIFT                  (4u)
+#define MTU2_TADCR_UT4BE_SHIFT                  (5u)
+#define MTU2_TADCR_DT4AE_SHIFT                  (6u)
+#define MTU2_TADCR_UT4AE_SHIFT                  (7u)
+#define MTU2_TADCR_BF_SHIFT                     (14u)
+
+#define MTU2_TADCORA_4_D_SHIFT                  (0u)
+
+#define MTU2_TADCORB_4_D_SHIFT                  (0u)
+
+#define MTU2_TADCOBRA_4_D_SHIFT                 (0u)
+
+#define MTU2_TADCOBRB_4_D_SHIFT                 (0u)
+
+#define MTU2_TWCR_WRE_SHIFT                     (0u)
+#define MTU2_TWCR_CCE_SHIFT                     (7u)
+
+#define MTU2_TSTR_CST0_SHIFT                    (0u)
+#define MTU2_TSTR_CST1_SHIFT                    (1u)
+#define MTU2_TSTR_CST2_SHIFT                    (2u)
+#define MTU2_TSTR_CST3_SHIFT                    (6u)
+#define MTU2_TSTR_CST4_SHIFT                    (7u)
+
+#define MTU2_TSYR_SYNC0_SHIFT                   (0u)
+#define MTU2_TSYR_SYNC1_SHIFT                   (1u)
+#define MTU2_TSYR_SYNC2_SHIFT                   (2u)
+#define MTU2_TSYR_SYNC3_SHIFT                   (6u)
+#define MTU2_TSYR_SYNC4_SHIFT                   (7u)
+
+#define MTU2_TRWER_RWE_SHIFT                    (0u)
+
+#define MTU2_TMDR_0_BFA_SHIFT                   (4u)
+#define MTU2_TMDR_0_BFB_SHIFT                   (5u)
+#define MTU2_TMDR_0_BFE_SHIFT                   (6u)
+
+#define MTU2_TIORH_0_IOA_SHIFT                  (0u)
+#define MTU2_TIORH_0_IOB_SHIFT                  (4u)
+
+#define MTU2_TIORL_0_IOC_SHIFT                  (0u)
+#define MTU2_TIORL_0_IOD_SHIFT                  (4u)
+
+#define MTU2_TIER_0_TGIEC_SHIFT                 (2u)
+#define MTU2_TIER_0_TGIED_SHIFT                 (3u)
+
+#define MTU2_TSR_0_TGFC_SHIFT                   (2u)
+#define MTU2_TSR_0_TGFD_SHIFT                   (3u)
+
+#define MTU2_TGRC_0_D_SHIFT                     (0u)
+
+#define MTU2_TGRD_0_D_SHIFT                     (0u)
+
+#define MTU2_TGRE_0_D_SHIFT                     (0u)
+
+#define MTU2_TGRF_0_D_SHIFT                     (0u)
+
+#define MTU2_TIER2_0_TGIEE_SHIFT                (0u)
+#define MTU2_TIER2_0_TGIEF_SHIFT                (1u)
+
+#define MTU2_TSR2_0_TGFE_SHIFT                  (0u)
+#define MTU2_TSR2_0_TGFF_SHIFT                  (1u)
+
+#define MTU2_TBTM_0_TTSA_SHIFT                  (0u)
+#define MTU2_TBTM_0_TTSB_SHIFT                  (1u)
+#define MTU2_TBTM_0_TTSE_SHIFT                  (2u)
+
+#define MTU2_TIOR_1_IOA_SHIFT                   (0u)
+#define MTU2_TIOR_1_IOB_SHIFT                   (4u)
+
+#define MTU2_TIER_1_TCIEU_SHIFT                 (5u)
+
+#define MTU2_TSR_1_TCFU_SHIFT                   (5u)
+#define MTU2_TSR_1_TCFD_SHIFT                   (7u)
+
+#define MTU2_TICCR_I1AE_SHIFT                   (0u)
+#define MTU2_TICCR_I1BE_SHIFT                   (1u)
+#define MTU2_TICCR_I2AE_SHIFT                   (2u)
+#define MTU2_TICCR_I2BE_SHIFT                   (3u)
+
+
+#endif /* MTU2_IOBITMASK_H */
+/* End of File */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/ostm_iobitmask.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/ostm_iobitmask.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/ostm_iobitmask.h	(revision 270)
@@ -0,0 +1,123 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name   : ostm_iobitmask.h
+* $Rev: 1115 $
+* $Date:: 2014-07-09 15:35:02 +0900#$
+* Description : OSTM register define header
+*******************************************************************************/
+#ifndef OSTM_IOBITMASK_H
+#define OSTM_IOBITMASK_H
+
+
+/* ==== Mask values for IO registers ==== */
+/* ---- OSTM0 ---- */
+#define OSTM0_OSTMnCMP_OSTMnCMP                 (0xFFFFFFFFuL)
+
+#define OSTM0_OSTMnCNT_OSTMnCNT                 (0xFFFFFFFFuL)
+
+#define OSTM0_OSTMnTE_OSTMnTE                   (0x01u)
+
+#define OSTM0_OSTMnTS_OSTMnTS                   (0x01u)
+
+#define OSTM0_OSTMnTT_OSTMnTT                   (0x01u)
+
+#define OSTM0_OSTMnCTL_MD0                      (0x00000001uL)
+#define OSTM0_OSTMnCTL_MD1                      (0x00000002uL)
+
+/* ---- OSTM1 ---- */
+#define OSTM1_OSTMnCMP_OSTMnCMP                 (0xFFFFFFFFuL)
+
+#define OSTM1_OSTMnCNT_OSTMnCNT                 (0xFFFFFFFFuL)
+
+#define OSTM1_OSTMnTE_OSTMnTE                   (0x01u)
+
+#define OSTM1_OSTMnTS_OSTMnTS                   (0x01u)
+
+#define OSTM1_OSTMnTT_OSTMnTT                   (0x01u)
+
+#define OSTM1_OSTMnCTL_MD0                      (0x00000001uL)
+#define OSTM1_OSTMnCTL_MD1                      (0x00000002uL)
+
+/* ---- OSTMn ---- */
+#define OSTMn_OSTMnCMP_OSTMnCMP                 (0xFFFFFFFFuL)
+
+#define OSTMn_OSTMnCNT_OSTMnCNT                 (0xFFFFFFFFuL)
+
+#define OSTMn_OSTMnTE_OSTMnTE                   (0x01u)
+
+#define OSTMn_OSTMnTS_OSTMnTS                   (0x01u)
+
+#define OSTMn_OSTMnTT_OSTMnTT                   (0x01u)
+
+#define OSTMn_OSTMnCTL_MD0                      (0x00000001uL)
+#define OSTMn_OSTMnCTL_MD1                      (0x00000002uL)
+
+
+/* ==== Shift values for IO registers ==== */
+/* ---- OSTM0 ---- */
+#define OSTM0_OSTMnCMP_OSTMnCMP_SHIFT           (0u)
+
+#define OSTM0_OSTMnCNT_OSTMnCNT_SHIFT           (0u)
+
+#define OSTM0_OSTMnTE_OSTMnTE_SHIFT             (0u)
+
+#define OSTM0_OSTMnTS_OSTMnTS_SHIFT             (0u)
+
+#define OSTM0_OSTMnTT_OSTMnTT_SHIFT             (0u)
+
+#define OSTM0_OSTMnCTL_MD0_SHIFT                (0u)
+#define OSTM0_OSTMnCTL_MD1_SHIFT                (1u)
+
+/* ---- OSTM1 ---- */
+#define OSTM1_OSTMnCMP_OSTMnCMP_SHIFT           (0u)
+
+#define OSTM1_OSTMnCNT_OSTMnCNT_SHIFT           (0u)
+
+#define OSTM1_OSTMnTE_OSTMnTE_SHIFT             (0u)
+
+#define OSTM1_OSTMnTS_OSTMnTS_SHIFT             (0u)
+
+#define OSTM1_OSTMnTT_OSTMnTT_SHIFT             (0u)
+
+#define OSTM1_OSTMnCTL_MD0_SHIFT                (0u)
+#define OSTM1_OSTMnCTL_MD1_SHIFT                (1u)
+
+/* ---- OSTMn ---- */
+#define OSTMn_OSTMnCMP_OSTMnCMP_SHIFT           (0u)
+
+#define OSTMn_OSTMnCNT_OSTMnCNT_SHIFT           (0u)
+
+#define OSTMn_OSTMnTE_OSTMnTE_SHIFT             (0u)
+
+#define OSTMn_OSTMnTS_OSTMnTS_SHIFT             (0u)
+
+#define OSTMn_OSTMnTT_OSTMnTT_SHIFT             (0u)
+
+#define OSTMn_OSTMnCTL_MD0_SHIFT                (0u)
+#define OSTMn_OSTMnCTL_MD1_SHIFT                (1u)
+
+
+#endif /* OSTM_IOBITMASK_H */
+
+/* End of File */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/riic_iobitmask.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/riic_iobitmask.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/riic_iobitmask.h	(revision 270)
@@ -0,0 +1,231 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name   : riic_iobitmask.h
+* $Rev: 1114 $
+* $Date:: 2014-07-09 14:56:39 +0900#$
+* Description : RIIC register define header
+*******************************************************************************/
+#ifndef RIIC_IOBITMASK_H
+#define RIIC_IOBITMASK_H
+
+
+/* ==== Mask values for IO registers ==== */
+#define RIICn_RIICnCR1_SDAI                     (0x01u)
+#define RIICn_RIICnCR1_SCLI                     (0x02u)
+#define RIICn_RIICnCR1_SDAO                     (0x04u)
+#define RIICn_RIICnCR1_SCLO                     (0x08u)
+#define RIICn_RIICnCR1_SOWP                     (0x10u)
+#define RIICn_RIICnCR1_CLO                      (0x20u)
+#define RIICn_RIICnCR1_IICRST                   (0x40u)
+#define RIICn_RIICnCR1_ICE                      (0x80u)
+
+#define RIICn_RIICnCR2_ST                       (0x02u)
+#define RIICn_RIICnCR2_RS                       (0x04u)
+#define RIICn_RIICnCR2_SP                       (0x08u)
+#define RIICn_RIICnCR2_TRS                      (0x20u)
+#define RIICn_RIICnCR2_MST                      (0x40u)
+#define RIICn_RIICnCR2_BBSY                     (0x80u)
+
+#define RIICn_RIICnMR1_BC                       (0x07u)
+#define RIICn_RIICnMR1_BCWP                     (0x08u)
+#define RIICn_RIICnMR1_CKS                      (0x70u)
+#define RIICn_RIICnMR1_MTWP                     (0x80u)
+
+#define RIICn_RIICnMR2_TMOS                     (0x01u)
+#define RIICn_RIICnMR2_TMOL                     (0x02u)
+#define RIICn_RIICnMR2_TMOH                     (0x04u)
+#define RIICn_RIICnMR2_SDDL                     (0x70u)
+#define RIICn_RIICnMR2_DLCS                     (0x80u)
+
+#define RIICn_RIICnMR3_NF                       (0x03u)
+#define RIICn_RIICnMR3_ACKBR                    (0x04u)
+#define RIICn_RIICnMR3_ACKBT                    (0x08u)
+#define RIICn_RIICnMR3_ACKWP                    (0x10u)
+#define RIICn_RIICnMR3_RDRFS                    (0x20u)
+#define RIICn_RIICnMR3_WAIT                     (0x40u)
+#define RIICn_RIICnMR3_SMBS                     (0x80u)
+
+#define RIICn_RIICnFER_TMOE                     (0x01u)
+#define RIICn_RIICnFER_MALE                     (0x02u)
+#define RIICn_RIICnFER_NALE                     (0x04u)
+#define RIICn_RIICnFER_SALE                     (0x08u)
+#define RIICn_RIICnFER_NACKE                    (0x10u)
+#define RIICn_RIICnFER_NFE                      (0x20u)
+#define RIICn_RIICnFER_SCLE                     (0x40u)
+#define RIICn_RIICnFER_FMPE                     (0x80u)
+
+#define RIICn_RIICnSER_SAR0E                    (0x01u)
+#define RIICn_RIICnSER_SAR1E                    (0x02u)
+#define RIICn_RIICnSER_SAR2E                    (0x04u)
+#define RIICn_RIICnSER_GCAE                     (0x08u)
+#define RIICn_RIICnSER_DIDE                     (0x20u)
+#define RIICn_RIICnSER_HOAE                     (0x80u)
+
+#define RIICn_RIICnIER_TMOIE                    (0x01u)
+#define RIICn_RIICnIER_ALIE                     (0x02u)
+#define RIICn_RIICnIER_STIE                     (0x04u)
+#define RIICn_RIICnIER_SPIE                     (0x08u)
+#define RIICn_RIICnIER_NAKIE                    (0x10u)
+#define RIICn_RIICnIER_RIE                      (0x20u)
+#define RIICn_RIICnIER_TEIE                     (0x40u)
+#define RIICn_RIICnIER_TIE                      (0x80u)
+
+#define RIICn_RIICnSR1_AAS0                     (0x01u)
+#define RIICn_RIICnSR1_AAS1                     (0x02u)
+#define RIICn_RIICnSR1_AAS2                     (0x04u)
+#define RIICn_RIICnSR1_GCA                      (0x08u)
+#define RIICn_RIICnSR1_DID                      (0x20u)
+#define RIICn_RIICnSR1_HOA                      (0x80u)
+
+#define RIICn_RIICnSR2_TMOF                     (0x01u)
+#define RIICn_RIICnSR2_AL                       (0x02u)
+#define RIICn_RIICnSR2_START                    (0x04u)
+#define RIICn_RIICnSR2_STOP                     (0x08u)
+#define RIICn_RIICnSR2_NACKF                    (0x10u)
+#define RIICn_RIICnSR2_RDRF                     (0x20u)
+#define RIICn_RIICnSR2_TEND                     (0x40u)
+#define RIICn_RIICnSR2_TDRE                     (0x80u)
+
+#define RIICn_RIICnSAR0_SVA0                    (0x0001u)
+#define RIICn_RIICnSAR0_SVA                     (0x03FEu)
+#define RIICn_RIICnSAR0_FSy                     (0x8000u)
+
+#define RIICn_RIICnSAR1_SVA0                    (0x0001u)
+#define RIICn_RIICnSAR1_SVA                     (0x03FEu)
+#define RIICn_RIICnSAR1_FSy                     (0x8000u)
+
+#define RIICn_RIICnSAR2_SVA0                    (0x0001u)
+#define RIICn_RIICnSAR2_SVA                     (0x03FEu)
+#define RIICn_RIICnSAR2_FSy                     (0x8000u)
+
+#define RIICn_RIICnBRL_BRL                      (0x1Fu)
+
+#define RIICn_RIICnBRH_BRH                      (0x1Fu)
+
+#define RIICn_RIICnDRT_DRT                      (0xFFu)
+
+#define RIICn_RIICnDRR_DRR                      (0xFFu)
+
+
+/* ==== Shift values for IO registers ==== */
+#define RIICn_RIICnCR1_SDAI_SHIFT               (0u)
+#define RIICn_RIICnCR1_SCLI_SHIFT               (1u)
+#define RIICn_RIICnCR1_SDAO_SHIFT               (2u)
+#define RIICn_RIICnCR1_SCLO_SHIFT               (3u)
+#define RIICn_RIICnCR1_SOWP_SHIFT               (4u)
+#define RIICn_RIICnCR1_CLO_SHIFT                (5u)
+#define RIICn_RIICnCR1_IICRST_SHIFT             (6u)
+#define RIICn_RIICnCR1_ICE_SHIFT                (7u)
+
+#define RIICn_RIICnCR2_ST_SHIFT                 (1u)
+#define RIICn_RIICnCR2_RS_SHIFT                 (2u)
+#define RIICn_RIICnCR2_SP_SHIFT                 (3u)
+#define RIICn_RIICnCR2_TRS_SHIFT                (5u)
+#define RIICn_RIICnCR2_MST_SHIFT                (6u)
+#define RIICn_RIICnCR2_BBSY_SHIFT               (7u)
+
+#define RIICn_RIICnMR1_BC_SHIFT                 (0u)
+#define RIICn_RIICnMR1_BCWP_SHIFT               (3u)
+#define RIICn_RIICnMR1_CKS_SHIFT                (4u)
+#define RIICn_RIICnMR1_MTWP_SHIFT               (7u)
+
+#define RIICn_RIICnMR2_TMOS_SHIFT               (0u)
+#define RIICn_RIICnMR2_TMOL_SHIFT               (1u)
+#define RIICn_RIICnMR2_TMOH_SHIFT               (2u)
+#define RIICn_RIICnMR2_SDDL_SHIFT               (4u)
+#define RIICn_RIICnMR2_DLCS_SHIFT               (7u)
+
+#define RIICn_RIICnMR3_NF_SHIFT                 (0u)
+#define RIICn_RIICnMR3_ACKBR_SHIFT              (2u)
+#define RIICn_RIICnMR3_ACKBT_SHIFT              (3u)
+#define RIICn_RIICnMR3_ACKWP_SHIFT              (4u)
+#define RIICn_RIICnMR3_RDRFS_SHIFT              (5u)
+#define RIICn_RIICnMR3_WAIT_SHIFT               (6u)
+#define RIICn_RIICnMR3_SMBS_SHIFT               (7u)
+
+#define RIICn_RIICnFER_TMOE_SHIFT               (0u)
+#define RIICn_RIICnFER_MALE_SHIFT               (1u)
+#define RIICn_RIICnFER_NALE_SHIFT               (2u)
+#define RIICn_RIICnFER_SALE_SHIFT               (3u)
+#define RIICn_RIICnFER_NACKE_SHIFT              (4u)
+#define RIICn_RIICnFER_NFE_SHIFT                (5u)
+#define RIICn_RIICnFER_SCLE_SHIFT               (6u)
+#define RIICn_RIICnFER_FMPE_SHIFT               (7u)
+
+#define RIICn_RIICnSER_SAR0E_SHIFT              (0u)
+#define RIICn_RIICnSER_SAR1E_SHIFT              (1u)
+#define RIICn_RIICnSER_SAR2E_SHIFT              (2u)
+#define RIICn_RIICnSER_GCAE_SHIFT               (3u)
+#define RIICn_RIICnSER_DIDE_SHIFT               (5u)
+#define RIICn_RIICnSER_HOAE_SHIFT               (7u)
+
+#define RIICn_RIICnIER_TMOIE_SHIFT              (0u)
+#define RIICn_RIICnIER_ALIE_SHIFT               (1u)
+#define RIICn_RIICnIER_STIE_SHIFT               (2u)
+#define RIICn_RIICnIER_SPIE_SHIFT               (3u)
+#define RIICn_RIICnIER_NAKIE_SHIFT              (4u)
+#define RIICn_RIICnIER_RIE_SHIFT                (5u)
+#define RIICn_RIICnIER_TEIE_SHIFT               (6u)
+#define RIICn_RIICnIER_TIE_SHIFT                (7u)
+
+#define RIICn_RIICnSR1_AAS0_SHIFT               (0u)
+#define RIICn_RIICnSR1_AAS1_SHIFT               (1u)
+#define RIICn_RIICnSR1_AAS2_SHIFT               (2u)
+#define RIICn_RIICnSR1_GCA_SHIFT                (3u)
+#define RIICn_RIICnSR1_DID_SHIFT                (5u)
+#define RIICn_RIICnSR1_HOA_SHIFT                (7u)
+
+#define RIICn_RIICnSR2_TMOF_SHIFT               (0u)
+#define RIICn_RIICnSR2_AL_SHIFT                 (1u)
+#define RIICn_RIICnSR2_START_SHIFT              (2u)
+#define RIICn_RIICnSR2_STOP_SHIFT               (3u)
+#define RIICn_RIICnSR2_NACKF_SHIFT              (4u)
+#define RIICn_RIICnSR2_RDRF_SHIFT               (5u)
+#define RIICn_RIICnSR2_TEND_SHIFT               (6u)
+#define RIICn_RIICnSR2_TDRE_SHIFT               (7u)
+
+#define RIICn_RIICnSAR0_SVA0_SHIFT              (0u)
+#define RIICn_RIICnSAR0_SVA_SHIFT               (1u)
+#define RIICn_RIICnSAR0_FSy_SHIFT               (15u)
+
+#define RIICn_RIICnSAR1_SVA0_SHIFT              (0u)
+#define RIICn_RIICnSAR1_SVA_SHIFT               (1u)
+#define RIICn_RIICnSAR1_FSy_SHIFT               (15u)
+
+#define RIICn_RIICnSAR2_SVA0_SHIFT              (0u)
+#define RIICn_RIICnSAR2_SVA_SHIFT               (1u)
+#define RIICn_RIICnSAR2_FSy_SHIFT               (15u)
+
+#define RIICn_RIICnBRL_BRL_SHIFT                (0u)
+
+#define RIICn_RIICnBRH_BRH_SHIFT                (0u)
+
+#define RIICn_RIICnDRT_DRT_SHIFT                (0u)
+
+#define RIICn_RIICnDRR_DRR_SHIFT                (0u)
+
+
+#endif /* RIIC_IOBITMASK_H */
+
+/* End of File */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/rspi_iobitmask.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/rspi_iobitmask.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/rspi_iobitmask.h	(revision 270)
@@ -0,0 +1,215 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name   : rspi_iobitmask.h
+* $Rev: 1114 $
+* $Date:: 2014-07-09 14:56:39 +0900#$
+* Description : Renesas Serial Peripheral Interface register define header
+*******************************************************************************/
+#ifndef RSPI_IOBITMASK_H
+#define RSPI_IOBITMASK_H
+
+
+/* ==== Mask values for IO registers ==== */
+#define RSPIn_SPCR_MODFEN                   (0x04u)
+#define RSPIn_SPCR_MSTR                     (0x08u)
+#define RSPIn_SPCR_SPEIE                    (0x10u)
+#define RSPIn_SPCR_SPTIE                    (0x20u)
+#define RSPIn_SPCR_SPE                      (0x40u)
+#define RSPIn_SPCR_SPRIE                    (0x80u)
+
+#define RSPIn_SSLP_SSL0P                    (0x01u)
+
+#define RSPIn_SPPCR_SPLP                    (0x01u)
+#define RSPIn_SPPCR_MOIFV                   (0x10u)
+#define RSPIn_SPPCR_MOIFE                   (0x20u)
+
+#define RSPIn_SPSR_OVRF                     (0x01u)
+#define RSPIn_SPSR_MODF                     (0x04u)
+#define RSPIn_SPSR_SPTEF                    (0x20u)
+#define RSPIn_SPSR_TEND                     (0x40u)
+#define RSPIn_SPSR_SPRF                     (0x80u)
+
+#define RSPIn_SPDR_UINT32                   (0xFFFFFFFFuL)
+
+#define RSPIn_SPDR_UINT16                   (0xFFFFu)
+
+#define RSPIn_SPDR_UINT8                    (0xFFu)
+
+#define RSPIn_SPSCR_SPSLN                   (0x03u)
+
+#define RSPIn_SPSSR_SPCP                    (0x03u)
+
+#define RSPIn_SPBR_SPR                      (0xFFu)
+
+#define RSPIn_SPDCR_SPLW                    (0x60u)
+#define RSPIn_SPDCR_TXDMY                   (0x80u)
+
+#define RSPIn_SPCKD_SCKDL                   (0x07u)
+
+#define RSPIn_SSLND_SLNDL                   (0x07u)
+
+#define RSPIn_SPND_SPNDL                    (0x07u)
+
+#define RSPIn_SPCMD0_CPHA                   (0x0001u)
+#define RSPIn_SPCMD0_CPOL                   (0x0002u)
+#define RSPIn_SPCMD0_BRDV                   (0x000Cu)
+#define RSPIn_SPCMD0_SSLKP                  (0x0080u)
+#define RSPIn_SPCMD0_SPB                    (0x0F00u)
+#define RSPIn_SPCMD0_LSBF                   (0x1000u)
+#define RSPIn_SPCMD0_SPNDEN                 (0x2000u)
+#define RSPIn_SPCMD0_SLNDEN                 (0x4000u)
+#define RSPIn_SPCMD0_SCKDEN                 (0x8000u)
+
+#define RSPIn_SPCMD1_CPHA                   (0x0001u)
+#define RSPIn_SPCMD1_CPOL                   (0x0002u)
+#define RSPIn_SPCMD1_BRDV                   (0x000Cu)
+#define RSPIn_SPCMD1_SSLKP                  (0x0080u)
+#define RSPIn_SPCMD1_SPB                    (0x0F00u)
+#define RSPIn_SPCMD1_LSBF                   (0x1000u)
+#define RSPIn_SPCMD1_SPNDEN                 (0x2000u)
+#define RSPIn_SPCMD1_SLNDEN                 (0x4000u)
+#define RSPIn_SPCMD1_SCKDEN                 (0x8000u)
+
+#define RSPIn_SPCMD2_CPHA                   (0x0001u)
+#define RSPIn_SPCMD2_CPOL                   (0x0002u)
+#define RSPIn_SPCMD2_BRDV                   (0x000Cu)
+#define RSPIn_SPCMD2_SSLKP                  (0x0080u)
+#define RSPIn_SPCMD2_SPB                    (0x0F00u)
+#define RSPIn_SPCMD2_LSBF                   (0x1000u)
+#define RSPIn_SPCMD2_SPNDEN                 (0x2000u)
+#define RSPIn_SPCMD2_SLNDEN                 (0x4000u)
+#define RSPIn_SPCMD2_SCKDEN                 (0x8000u)
+
+#define RSPIn_SPCMD3_CPHA                   (0x0001u)
+#define RSPIn_SPCMD3_CPOL                   (0x0002u)
+#define RSPIn_SPCMD3_BRDV                   (0x000Cu)
+#define RSPIn_SPCMD3_SSLKP                  (0x0080u)
+#define RSPIn_SPCMD3_SPB                    (0x0F00u)
+#define RSPIn_SPCMD3_LSBF                   (0x1000u)
+#define RSPIn_SPCMD3_SPNDEN                 (0x2000u)
+#define RSPIn_SPCMD3_SLNDEN                 (0x4000u)
+#define RSPIn_SPCMD3_SCKDEN                 (0x8000u)
+
+#define RSPIn_SPBFCR_RXTRG                  (0x07u)
+#define RSPIn_SPBFCR_TXTRG                  (0x30u)
+#define RSPIn_SPBFCR_RXRST                  (0x40u)
+#define RSPIn_SPBFCR_TXRST                  (0x80u)
+
+#define RSPIn_SPBFDR_R                      (0x003Fu)
+#define RSPIn_SPBFDR_T                      (0x0F00u)
+
+
+/* ==== Shift values for IO registers ==== */
+#define RSPIn_SPCR_MODFEN_SHIFT             (2u)
+#define RSPIn_SPCR_MSTR_SHIFT               (3u)
+#define RSPIn_SPCR_SPEIE_SHIFT              (4u)
+#define RSPIn_SPCR_SPTIE_SHIFT              (5u)
+#define RSPIn_SPCR_SPE_SHIFT                (6u)
+#define RSPIn_SPCR_SPRIE_SHIFT              (7u)
+
+#define RSPIn_SSLP_SSL0P_SHIFT              (0u)
+
+#define RSPIn_SPPCR_SPLP_SHIFT              (0u)
+#define RSPIn_SPPCR_MOIFV_SHIFT             (4u)
+#define RSPIn_SPPCR_MOIFE_SHIFT             (5u)
+
+#define RSPIn_SPSR_OVRF_SHIFT               (0u)
+#define RSPIn_SPSR_MODF_SHIFT               (2u)
+#define RSPIn_SPSR_SPTEF_SHIFT              (5u)
+#define RSPIn_SPSR_TEND_SHIFT               (6u)
+#define RSPIn_SPSR_SPRF_SHIFT               (7u)
+
+#define RSPIn_SPDR_UINT32_SHIFT             (0u)
+
+#define RSPIn_SPDR_UINT16_SHIFT             (0u)
+
+#define RSPIn_SPDR_UINT8_SHIFT              (0u)
+
+#define RSPIn_SPSCR_SPSLN_SHIFT             (0u)
+
+#define RSPIn_SPSSR_SPCP_SHIFT              (0u)
+
+#define RSPIn_SPBR_SPR_SHIFT                (0u)
+
+#define RSPIn_SPDCR_SPLW_SHIFT              (5u)
+#define RSPIn_SPDCR_TXDMY_SHIFT             (7u)
+
+#define RSPIn_SPCKD_SCKDL_SHIFT             (0u)
+
+#define RSPIn_SSLND_SLNDL_SHIFT             (0u)
+
+#define RSPIn_SPND_SPNDL_SHIFT              (0u)
+
+#define RSPIn_SPCMD0_CPHA_SHIFT             (0u)
+#define RSPIn_SPCMD0_CPOL_SHIFT             (1u)
+#define RSPIn_SPCMD0_BRDV_SHIFT             (2u)
+#define RSPIn_SPCMD0_SSLKP_SHIFT            (7u)
+#define RSPIn_SPCMD0_SPB_SHIFT              (8u)
+#define RSPIn_SPCMD0_LSBF_SHIFT             (12u)
+#define RSPIn_SPCMD0_SPNDEN_SHIFT           (13u)
+#define RSPIn_SPCMD0_SLNDEN_SHIFT           (14u)
+#define RSPIn_SPCMD0_SCKDEN_SHIFT           (15u)
+
+#define RSPIn_SPCMD1_CPHA_SHIFT             (0u)
+#define RSPIn_SPCMD1_CPOL_SHIFT             (1u)
+#define RSPIn_SPCMD1_BRDV_SHIFT             (2u)
+#define RSPIn_SPCMD1_SSLKP_SHIFT            (7u)
+#define RSPIn_SPCMD1_SPB_SHIFT              (8u)
+#define RSPIn_SPCMD1_LSBF_SHIFT             (12u)
+#define RSPIn_SPCMD1_SPNDEN_SHIFT           (13u)
+#define RSPIn_SPCMD1_SLNDEN_SHIFT           (14u)
+#define RSPIn_SPCMD1_SCKDEN_SHIFT           (15u)
+
+#define RSPIn_SPCMD2_CPHA_SHIFT             (0u)
+#define RSPIn_SPCMD2_CPOL_SHIFT             (1u)
+#define RSPIn_SPCMD2_BRDV_SHIFT             (2u)
+#define RSPIn_SPCMD2_SSLKP_SHIFT            (7u)
+#define RSPIn_SPCMD2_SPB_SHIFT              (8u)
+#define RSPIn_SPCMD2_LSBF_SHIFT             (12u)
+#define RSPIn_SPCMD2_SPNDEN_SHIFT           (13u)
+#define RSPIn_SPCMD2_SLNDEN_SHIFT           (14u)
+#define RSPIn_SPCMD2_SCKDEN_SHIFT           (15u)
+
+#define RSPIn_SPCMD3_CPHA_SHIFT             (0u)
+#define RSPIn_SPCMD3_CPOL_SHIFT             (1u)
+#define RSPIn_SPCMD3_BRDV_SHIFT             (2u)
+#define RSPIn_SPCMD3_SSLKP_SHIFT            (7u)
+#define RSPIn_SPCMD3_SPB_SHIFT              (8u)
+#define RSPIn_SPCMD3_LSBF_SHIFT             (12u)
+#define RSPIn_SPCMD3_SPNDEN_SHIFT           (13u)
+#define RSPIn_SPCMD3_SLNDEN_SHIFT           (14u)
+#define RSPIn_SPCMD3_SCKDEN_SHIFT           (15u)
+
+#define RSPIn_SPBFCR_RXTRG_SHIFT            (0u)
+#define RSPIn_SPBFCR_TXTRG_SHIFT            (4u)
+#define RSPIn_SPBFCR_RXRST_SHIFT            (6u)
+#define RSPIn_SPBFCR_TXRST_SHIFT            (7u)
+
+#define RSPIn_SPBFDR_R_SHIFT                (0u)
+#define RSPIn_SPBFDR_T_SHIFT                (8u)
+
+
+#endif /* RSPI_IOBITMASK_H */
+
+/* End of File */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/scif_iobitmask.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/scif_iobitmask.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/scif_iobitmask.h	(revision 270)
@@ -0,0 +1,1065 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name   : scif_iobitmask.h
+* $Rev: 1115 $
+* $Date:: 2014-07-09 15:35:02 +0900#$
+* Description : SCIF register define header
+*******************************************************************************/
+#ifndef SCIF_IOBITMASK_H
+#define SCIF_IOBITMASK_H
+
+
+/* ==== Mask values for IO registers ==== */
+/* ---- SCIF0 ---- */
+#define SCIF0_SCSMR_CKS                         (0x0003u)
+#define SCIF0_SCSMR_STOP                        (0x0008u)
+#define SCIF0_SCSMR_OE                          (0x0010u)
+#define SCIF0_SCSMR_PE                          (0x0020u)
+#define SCIF0_SCSMR_CHR                         (0x0040u)
+#define SCIF0_SCSMR_CA                          (0x0080u)
+
+#define SCIF0_SCBRR_D                           (0xFFu)
+
+#define SCIF0_SCSCR_CKE                         (0x0003u)
+#define SCIF0_SCSCR_REIE                        (0x0008u)
+#define SCIF0_SCSCR_RE                          (0x0010u)
+#define SCIF0_SCSCR_TE                          (0x0020u)
+#define SCIF0_SCSCR_RIE                         (0x0040u)
+#define SCIF0_SCSCR_TIE                         (0x0080u)
+
+#define SCIF0_SCFTDR_D                          (0xFFu)
+
+#define SCIF0_SCFSR_DR                          (0x0001u)
+#define SCIF0_SCFSR_RDF                         (0x0002u)
+#define SCIF0_SCFSR_PER                         (0x0004u)
+#define SCIF0_SCFSR_FER                         (0x0008u)
+#define SCIF0_SCFSR_BRK                         (0x0010u)
+#define SCIF0_SCFSR_TDFE                        (0x0020u)
+#define SCIF0_SCFSR_TEND                        (0x0040u)
+#define SCIF0_SCFSR_ER                          (0x0080u)
+#define SCIF0_SCFSR_FERN                        (0x0F00u)
+#define SCIF0_SCFSR_PERN                        (0xF000u)
+
+#define SCIF0_SCFRDR_D                          (0xFFu)
+
+#define SCIF0_SCFCR_LOOP                        (0x0001u)
+#define SCIF0_SCFCR_RFRST                       (0x0002u)
+#define SCIF0_SCFCR_TFRST                       (0x0004u)
+#define SCIF0_SCFCR_MCE                         (0x0008u)
+#define SCIF0_SCFCR_TTRG                        (0x0030u)
+#define SCIF0_SCFCR_RTRG                        (0x00C0u)
+#define SCIF0_SCFCR_RSTRG                       (0x0700u)
+
+#define SCIF0_SCFDR_R                           (0x001Fu)
+#define SCIF0_SCFDR_T                           (0x1F00u)
+
+#define SCIF0_SCSPTR_SPB2DT                     (0x0001u)
+#define SCIF0_SCSPTR_SPB2IO                     (0x0002u)
+#define SCIF0_SCSPTR_SCKDT                      (0x0004u)
+#define SCIF0_SCSPTR_SCKIO                      (0x0008u)
+#define SCIF0_SCSPTR_CTSDT                      (0x0010u)
+#define SCIF0_SCSPTR_CTSIO                      (0x0020u)
+#define SCIF0_SCSPTR_RTSDT                      (0x0040u)
+#define SCIF0_SCSPTR_RTSIO                      (0x0080u)
+
+#define SCIF0_SCLSR_ORER                        (0x0001u)
+
+#define SCIF0_SCEMR_ABCS                        (0x0001u)
+#define SCIF0_SCEMR_BGDM                        (0x0080u)
+
+/* ---- SCIF1 ---- */
+#define SCIF1_SCSMR_CKS                         (0x0003u)
+#define SCIF1_SCSMR_STOP                        (0x0008u)
+#define SCIF1_SCSMR_OE                          (0x0010u)
+#define SCIF1_SCSMR_PE                          (0x0020u)
+#define SCIF1_SCSMR_CHR                         (0x0040u)
+#define SCIF1_SCSMR_CA                          (0x0080u)
+
+#define SCIF1_SCBRR_D                           (0xFFu)
+
+#define SCIF1_SCSCR_CKE                         (0x0003u)
+#define SCIF1_SCSCR_REIE                        (0x0008u)
+#define SCIF1_SCSCR_RE                          (0x0010u)
+#define SCIF1_SCSCR_TE                          (0x0020u)
+#define SCIF1_SCSCR_RIE                         (0x0040u)
+#define SCIF1_SCSCR_TIE                         (0x0080u)
+
+#define SCIF1_SCFTDR_D                          (0xFFu)
+
+#define SCIF1_SCFSR_DR                          (0x0001u)
+#define SCIF1_SCFSR_RDF                         (0x0002u)
+#define SCIF1_SCFSR_PER                         (0x0004u)
+#define SCIF1_SCFSR_FER                         (0x0008u)
+#define SCIF1_SCFSR_BRK                         (0x0010u)
+#define SCIF1_SCFSR_TDFE                        (0x0020u)
+#define SCIF1_SCFSR_TEND                        (0x0040u)
+#define SCIF1_SCFSR_ER                          (0x0080u)
+#define SCIF1_SCFSR_FERN                        (0x0F00u)
+#define SCIF1_SCFSR_PERN                        (0xF000u)
+
+#define SCIF1_SCFRDR_D                          (0xFFu)
+
+#define SCIF1_SCFCR_LOOP                        (0x0001u)
+#define SCIF1_SCFCR_RFRST                       (0x0002u)
+#define SCIF1_SCFCR_TFRST                       (0x0004u)
+#define SCIF1_SCFCR_MCE                         (0x0008u)
+#define SCIF1_SCFCR_TTRG                        (0x0030u)
+#define SCIF1_SCFCR_RTRG                        (0x00C0u)
+#define SCIF1_SCFCR_RSTRG                       (0x0700u)
+
+#define SCIF1_SCFDR_R                           (0x001Fu)
+#define SCIF1_SCFDR_T                           (0x1F00u)
+
+#define SCIF1_SCSPTR_SPB2DT                     (0x0001u)
+#define SCIF1_SCSPTR_SPB2IO                     (0x0002u)
+#define SCIF1_SCSPTR_SCKDT                      (0x0004u)
+#define SCIF1_SCSPTR_SCKIO                      (0x0008u)
+#define SCIF1_SCSPTR_CTSDT                      (0x0010u)
+#define SCIF1_SCSPTR_CTSIO                      (0x0020u)
+#define SCIF1_SCSPTR_RTSDT                      (0x0040u)
+#define SCIF1_SCSPTR_RTSIO                      (0x0080u)
+
+#define SCIF1_SCLSR_ORER                        (0x0001u)
+
+#define SCIF1_SCEMR_ABCS                        (0x0001u)
+#define SCIF1_SCEMR_BGDM                        (0x0080u)
+
+/* ---- SCIF2 ---- */
+#define SCIF2_SCSMR_CKS                         (0x0003u)
+#define SCIF2_SCSMR_STOP                        (0x0008u)
+#define SCIF2_SCSMR_OE                          (0x0010u)
+#define SCIF2_SCSMR_PE                          (0x0020u)
+#define SCIF2_SCSMR_CHR                         (0x0040u)
+#define SCIF2_SCSMR_CA                          (0x0080u)
+
+#define SCIF2_SCBRR_D                           (0xFFu)
+
+#define SCIF2_SCSCR_CKE                         (0x0003u)
+#define SCIF2_SCSCR_REIE                        (0x0008u)
+#define SCIF2_SCSCR_RE                          (0x0010u)
+#define SCIF2_SCSCR_TE                          (0x0020u)
+#define SCIF2_SCSCR_RIE                         (0x0040u)
+#define SCIF2_SCSCR_TIE                         (0x0080u)
+
+#define SCIF2_SCFTDR_D                          (0xFFu)
+
+#define SCIF2_SCFSR_DR                          (0x0001u)
+#define SCIF2_SCFSR_RDF                         (0x0002u)
+#define SCIF2_SCFSR_PER                         (0x0004u)
+#define SCIF2_SCFSR_FER                         (0x0008u)
+#define SCIF2_SCFSR_BRK                         (0x0010u)
+#define SCIF2_SCFSR_TDFE                        (0x0020u)
+#define SCIF2_SCFSR_TEND                        (0x0040u)
+#define SCIF2_SCFSR_ER                          (0x0080u)
+#define SCIF2_SCFSR_FERN                        (0x0F00u)
+#define SCIF2_SCFSR_PERN                        (0xF000u)
+
+#define SCIF2_SCFRDR_D                          (0xFFu)
+
+#define SCIF2_SCFCR_LOOP                        (0x0001u)
+#define SCIF2_SCFCR_RFRST                       (0x0002u)
+#define SCIF2_SCFCR_TFRST                       (0x0004u)
+#define SCIF2_SCFCR_MCE                         (0x0008u)
+#define SCIF2_SCFCR_TTRG                        (0x0030u)
+#define SCIF2_SCFCR_RTRG                        (0x00C0u)
+#define SCIF2_SCFCR_RSTRG                       (0x0700u)
+
+#define SCIF2_SCFDR_R                           (0x001Fu)
+#define SCIF2_SCFDR_T                           (0x1F00u)
+
+#define SCIF2_SCSPTR_SPB2DT                     (0x0001u)
+#define SCIF2_SCSPTR_SPB2IO                     (0x0002u)
+#define SCIF2_SCSPTR_SCKDT                      (0x0004u)
+#define SCIF2_SCSPTR_SCKIO                      (0x0008u)
+#define SCIF2_SCSPTR_CTSDT                      (0x0010u)
+#define SCIF2_SCSPTR_CTSIO                      (0x0020u)
+#define SCIF2_SCSPTR_RTSDT                      (0x0040u)
+#define SCIF2_SCSPTR_RTSIO                      (0x0080u)
+
+#define SCIF2_SCLSR_ORER                        (0x0001u)
+
+#define SCIF2_SCEMR_ABCS                        (0x0001u)
+#define SCIF2_SCEMR_BGDM                        (0x0080u)
+
+/* ---- SCIF3 ---- */
+#define SCIF3_SCSMR_CKS                         (0x0003u)
+#define SCIF3_SCSMR_STOP                        (0x0008u)
+#define SCIF3_SCSMR_OE                          (0x0010u)
+#define SCIF3_SCSMR_PE                          (0x0020u)
+#define SCIF3_SCSMR_CHR                         (0x0040u)
+#define SCIF3_SCSMR_CA                          (0x0080u)
+
+#define SCIF3_SCBRR_D                           (0xFFu)
+
+#define SCIF3_SCSCR_CKE                         (0x0003u)
+#define SCIF3_SCSCR_REIE                        (0x0008u)
+#define SCIF3_SCSCR_RE                          (0x0010u)
+#define SCIF3_SCSCR_TE                          (0x0020u)
+#define SCIF3_SCSCR_RIE                         (0x0040u)
+#define SCIF3_SCSCR_TIE                         (0x0080u)
+
+#define SCIF3_SCFTDR_D                          (0xFFu)
+
+#define SCIF3_SCFSR_DR                          (0x0001u)
+#define SCIF3_SCFSR_RDF                         (0x0002u)
+#define SCIF3_SCFSR_PER                         (0x0004u)
+#define SCIF3_SCFSR_FER                         (0x0008u)
+#define SCIF3_SCFSR_BRK                         (0x0010u)
+#define SCIF3_SCFSR_TDFE                        (0x0020u)
+#define SCIF3_SCFSR_TEND                        (0x0040u)
+#define SCIF3_SCFSR_ER                          (0x0080u)
+#define SCIF3_SCFSR_FERN                        (0x0F00u)
+#define SCIF3_SCFSR_PERN                        (0xF000u)
+
+#define SCIF3_SCFRDR_D                          (0xFFu)
+
+#define SCIF3_SCFCR_LOOP                        (0x0001u)
+#define SCIF3_SCFCR_RFRST                       (0x0002u)
+#define SCIF3_SCFCR_TFRST                       (0x0004u)
+#define SCIF3_SCFCR_MCE                         (0x0008u)
+#define SCIF3_SCFCR_TTRG                        (0x0030u)
+#define SCIF3_SCFCR_RTRG                        (0x00C0u)
+#define SCIF3_SCFCR_RSTRG                       (0x0700u)
+
+#define SCIF3_SCFDR_R                           (0x001Fu)
+#define SCIF3_SCFDR_T                           (0x1F00u)
+
+#define SCIF3_SCSPTR_SPB2DT                     (0x0001u)
+#define SCIF3_SCSPTR_SPB2IO                     (0x0002u)
+#define SCIF3_SCSPTR_SCKDT                      (0x0004u)
+#define SCIF3_SCSPTR_SCKIO                      (0x0008u)
+#define SCIF3_SCSPTR_CTSDT                      (0x0010u)
+#define SCIF3_SCSPTR_CTSIO                      (0x0020u)
+#define SCIF3_SCSPTR_RTSDT                      (0x0040u)
+#define SCIF3_SCSPTR_RTSIO                      (0x0080u)
+
+#define SCIF3_SCLSR_ORER                        (0x0001u)
+
+#define SCIF3_SCEMR_ABCS                        (0x0001u)
+#define SCIF3_SCEMR_BGDM                        (0x0080u)
+
+/* ---- SCIF4 ---- */
+#define SCIF4_SCSMR_CKS                         (0x0003u)
+#define SCIF4_SCSMR_STOP                        (0x0008u)
+#define SCIF4_SCSMR_OE                          (0x0010u)
+#define SCIF4_SCSMR_PE                          (0x0020u)
+#define SCIF4_SCSMR_CHR                         (0x0040u)
+#define SCIF4_SCSMR_CA                          (0x0080u)
+
+#define SCIF4_SCBRR_D                           (0xFFu)
+
+#define SCIF4_SCSCR_CKE                         (0x0003u)
+#define SCIF4_SCSCR_REIE                        (0x0008u)
+#define SCIF4_SCSCR_RE                          (0x0010u)
+#define SCIF4_SCSCR_TE                          (0x0020u)
+#define SCIF4_SCSCR_RIE                         (0x0040u)
+#define SCIF4_SCSCR_TIE                         (0x0080u)
+
+#define SCIF4_SCFTDR_D                          (0xFFu)
+
+#define SCIF4_SCFSR_DR                          (0x0001u)
+#define SCIF4_SCFSR_RDF                         (0x0002u)
+#define SCIF4_SCFSR_PER                         (0x0004u)
+#define SCIF4_SCFSR_FER                         (0x0008u)
+#define SCIF4_SCFSR_BRK                         (0x0010u)
+#define SCIF4_SCFSR_TDFE                        (0x0020u)
+#define SCIF4_SCFSR_TEND                        (0x0040u)
+#define SCIF4_SCFSR_ER                          (0x0080u)
+#define SCIF4_SCFSR_FERN                        (0x0F00u)
+#define SCIF4_SCFSR_PERN                        (0xF000u)
+
+#define SCIF4_SCFRDR_D                          (0xFFu)
+
+#define SCIF4_SCFCR_LOOP                        (0x0001u)
+#define SCIF4_SCFCR_RFRST                       (0x0002u)
+#define SCIF4_SCFCR_TFRST                       (0x0004u)
+#define SCIF4_SCFCR_MCE                         (0x0008u)
+#define SCIF4_SCFCR_TTRG                        (0x0030u)
+#define SCIF4_SCFCR_RTRG                        (0x00C0u)
+#define SCIF4_SCFCR_RSTRG                       (0x0700u)
+
+#define SCIF4_SCFDR_R                           (0x001Fu)
+#define SCIF4_SCFDR_T                           (0x1F00u)
+
+#define SCIF4_SCSPTR_SPB2DT                     (0x0001u)
+#define SCIF4_SCSPTR_SPB2IO                     (0x0002u)
+#define SCIF4_SCSPTR_SCKDT                      (0x0004u)
+#define SCIF4_SCSPTR_SCKIO                      (0x0008u)
+#define SCIF4_SCSPTR_CTSDT                      (0x0010u)
+#define SCIF4_SCSPTR_CTSIO                      (0x0020u)
+#define SCIF4_SCSPTR_RTSDT                      (0x0040u)
+#define SCIF4_SCSPTR_RTSIO                      (0x0080u)
+
+#define SCIF4_SCLSR_ORER                        (0x0001u)
+
+#define SCIF4_SCEMR_ABCS                        (0x0001u)
+#define SCIF4_SCEMR_BGDM                        (0x0080u)
+
+/* ---- SCIF5 ---- */
+#define SCIF5_SCSMR_CKS                         (0x0003u)
+#define SCIF5_SCSMR_STOP                        (0x0008u)
+#define SCIF5_SCSMR_OE                          (0x0010u)
+#define SCIF5_SCSMR_PE                          (0x0020u)
+#define SCIF5_SCSMR_CHR                         (0x0040u)
+#define SCIF5_SCSMR_CA                          (0x0080u)
+
+#define SCIF5_SCBRR_D                           (0xFFu)
+
+#define SCIF5_SCSCR_CKE                         (0x0003u)
+#define SCIF5_SCSCR_REIE                        (0x0008u)
+#define SCIF5_SCSCR_RE                          (0x0010u)
+#define SCIF5_SCSCR_TE                          (0x0020u)
+#define SCIF5_SCSCR_RIE                         (0x0040u)
+#define SCIF5_SCSCR_TIE                         (0x0080u)
+
+#define SCIF5_SCFTDR_D                          (0xFFu)
+
+#define SCIF5_SCFSR_DR                          (0x0001u)
+#define SCIF5_SCFSR_RDF                         (0x0002u)
+#define SCIF5_SCFSR_PER                         (0x0004u)
+#define SCIF5_SCFSR_FER                         (0x0008u)
+#define SCIF5_SCFSR_BRK                         (0x0010u)
+#define SCIF5_SCFSR_TDFE                        (0x0020u)
+#define SCIF5_SCFSR_TEND                        (0x0040u)
+#define SCIF5_SCFSR_ER                          (0x0080u)
+#define SCIF5_SCFSR_FERN                        (0x0F00u)
+#define SCIF5_SCFSR_PERN                        (0xF000u)
+
+#define SCIF5_SCFRDR_D                          (0xFFu)
+
+#define SCIF5_SCFCR_LOOP                        (0x0001u)
+#define SCIF5_SCFCR_RFRST                       (0x0002u)
+#define SCIF5_SCFCR_TFRST                       (0x0004u)
+#define SCIF5_SCFCR_MCE                         (0x0008u)
+#define SCIF5_SCFCR_TTRG                        (0x0030u)
+#define SCIF5_SCFCR_RTRG                        (0x00C0u)
+#define SCIF5_SCFCR_RSTRG                       (0x0700u)
+
+#define SCIF5_SCFDR_R                           (0x001Fu)
+#define SCIF5_SCFDR_T                           (0x1F00u)
+
+#define SCIF5_SCSPTR_SPB2DT                     (0x0001u)
+#define SCIF5_SCSPTR_SPB2IO                     (0x0002u)
+#define SCIF5_SCSPTR_SCKDT                      (0x0004u)
+#define SCIF5_SCSPTR_SCKIO                      (0x0008u)
+#define SCIF5_SCSPTR_CTSDT                      (0x0010u)
+#define SCIF5_SCSPTR_CTSIO                      (0x0020u)
+#define SCIF5_SCSPTR_RTSDT                      (0x0040u)
+#define SCIF5_SCSPTR_RTSIO                      (0x0080u)
+
+#define SCIF5_SCLSR_ORER                        (0x0001u)
+
+#define SCIF5_SCEMR_ABCS                        (0x0001u)
+#define SCIF5_SCEMR_BGDM                        (0x0080u)
+
+/* ---- SCIF6 ---- */
+#define SCIF6_SCSMR_CKS                         (0x0003u)
+#define SCIF6_SCSMR_STOP                        (0x0008u)
+#define SCIF6_SCSMR_OE                          (0x0010u)
+#define SCIF6_SCSMR_PE                          (0x0020u)
+#define SCIF6_SCSMR_CHR                         (0x0040u)
+#define SCIF6_SCSMR_CA                          (0x0080u)
+
+#define SCIF6_SCBRR_D                           (0xFFu)
+
+#define SCIF6_SCSCR_CKE                         (0x0003u)
+#define SCIF6_SCSCR_REIE                        (0x0008u)
+#define SCIF6_SCSCR_RE                          (0x0010u)
+#define SCIF6_SCSCR_TE                          (0x0020u)
+#define SCIF6_SCSCR_RIE                         (0x0040u)
+#define SCIF6_SCSCR_TIE                         (0x0080u)
+
+#define SCIF6_SCFTDR_D                          (0xFFu)
+
+#define SCIF6_SCFSR_DR                          (0x0001u)
+#define SCIF6_SCFSR_RDF                         (0x0002u)
+#define SCIF6_SCFSR_PER                         (0x0004u)
+#define SCIF6_SCFSR_FER                         (0x0008u)
+#define SCIF6_SCFSR_BRK                         (0x0010u)
+#define SCIF6_SCFSR_TDFE                        (0x0020u)
+#define SCIF6_SCFSR_TEND                        (0x0040u)
+#define SCIF6_SCFSR_ER                          (0x0080u)
+#define SCIF6_SCFSR_FERN                        (0x0F00u)
+#define SCIF6_SCFSR_PERN                        (0xF000u)
+
+#define SCIF6_SCFRDR_D                          (0xFFu)
+
+#define SCIF6_SCFCR_LOOP                        (0x0001u)
+#define SCIF6_SCFCR_RFRST                       (0x0002u)
+#define SCIF6_SCFCR_TFRST                       (0x0004u)
+#define SCIF6_SCFCR_MCE                         (0x0008u)
+#define SCIF6_SCFCR_TTRG                        (0x0030u)
+#define SCIF6_SCFCR_RTRG                        (0x00C0u)
+#define SCIF6_SCFCR_RSTRG                       (0x0700u)
+
+#define SCIF6_SCFDR_R                           (0x001Fu)
+#define SCIF6_SCFDR_T                           (0x1F00u)
+
+#define SCIF6_SCSPTR_SPB2DT                     (0x0001u)
+#define SCIF6_SCSPTR_SPB2IO                     (0x0002u)
+#define SCIF6_SCSPTR_SCKDT                      (0x0004u)
+#define SCIF6_SCSPTR_SCKIO                      (0x0008u)
+#define SCIF6_SCSPTR_CTSDT                      (0x0010u)
+#define SCIF6_SCSPTR_CTSIO                      (0x0020u)
+#define SCIF6_SCSPTR_RTSDT                      (0x0040u)
+#define SCIF6_SCSPTR_RTSIO                      (0x0080u)
+
+#define SCIF6_SCLSR_ORER                        (0x0001u)
+
+#define SCIF6_SCEMR_ABCS                        (0x0001u)
+#define SCIF6_SCEMR_BGDM                        (0x0080u)
+
+/* ---- SCIF7 ---- */
+#define SCIF7_SCSMR_CKS                         (0x0003u)
+#define SCIF7_SCSMR_STOP                        (0x0008u)
+#define SCIF7_SCSMR_OE                          (0x0010u)
+#define SCIF7_SCSMR_PE                          (0x0020u)
+#define SCIF7_SCSMR_CHR                         (0x0040u)
+#define SCIF7_SCSMR_CA                          (0x0080u)
+
+#define SCIF7_SCBRR_D                           (0xFFu)
+
+#define SCIF7_SCSCR_CKE                         (0x0003u)
+#define SCIF7_SCSCR_REIE                        (0x0008u)
+#define SCIF7_SCSCR_RE                          (0x0010u)
+#define SCIF7_SCSCR_TE                          (0x0020u)
+#define SCIF7_SCSCR_RIE                         (0x0040u)
+#define SCIF7_SCSCR_TIE                         (0x0080u)
+
+#define SCIF7_SCFTDR_D                          (0xFFu)
+
+#define SCIF7_SCFSR_DR                          (0x0001u)
+#define SCIF7_SCFSR_RDF                         (0x0002u)
+#define SCIF7_SCFSR_PER                         (0x0004u)
+#define SCIF7_SCFSR_FER                         (0x0008u)
+#define SCIF7_SCFSR_BRK                         (0x0010u)
+#define SCIF7_SCFSR_TDFE                        (0x0020u)
+#define SCIF7_SCFSR_TEND                        (0x0040u)
+#define SCIF7_SCFSR_ER                          (0x0080u)
+#define SCIF7_SCFSR_FERN                        (0x0F00u)
+#define SCIF7_SCFSR_PERN                        (0xF000u)
+
+#define SCIF7_SCFRDR_D                          (0xFFu)
+
+#define SCIF7_SCFCR_LOOP                        (0x0001u)
+#define SCIF7_SCFCR_RFRST                       (0x0002u)
+#define SCIF7_SCFCR_TFRST                       (0x0004u)
+#define SCIF7_SCFCR_MCE                         (0x0008u)
+#define SCIF7_SCFCR_TTRG                        (0x0030u)
+#define SCIF7_SCFCR_RTRG                        (0x00C0u)
+#define SCIF7_SCFCR_RSTRG                       (0x0700u)
+
+#define SCIF7_SCFDR_R                           (0x001Fu)
+#define SCIF7_SCFDR_T                           (0x1F00u)
+
+#define SCIF7_SCSPTR_SPB2DT                     (0x0001u)
+#define SCIF7_SCSPTR_SPB2IO                     (0x0002u)
+#define SCIF7_SCSPTR_SCKDT                      (0x0004u)
+#define SCIF7_SCSPTR_SCKIO                      (0x0008u)
+#define SCIF7_SCSPTR_CTSDT                      (0x0010u)
+#define SCIF7_SCSPTR_CTSIO                      (0x0020u)
+#define SCIF7_SCSPTR_RTSDT                      (0x0040u)
+#define SCIF7_SCSPTR_RTSIO                      (0x0080u)
+
+#define SCIF7_SCLSR_ORER                        (0x0001u)
+
+#define SCIF7_SCEMR_ABCS                        (0x0001u)
+#define SCIF7_SCEMR_BGDM                        (0x0080u)
+
+/* ---- SCIFn ---- */
+#define SCIFn_SCSMR_CKS                         (0x0003u)
+#define SCIFn_SCSMR_STOP                        (0x0008u)
+#define SCIFn_SCSMR_OE                          (0x0010u)
+#define SCIFn_SCSMR_PE                          (0x0020u)
+#define SCIFn_SCSMR_CHR                         (0x0040u)
+#define SCIFn_SCSMR_CA                          (0x0080u)
+
+#define SCIFn_SCBRR_D                           (0xFFu)
+
+#define SCIFn_SCSCR_CKE                         (0x0003u)
+#define SCIFn_SCSCR_REIE                        (0x0008u)
+#define SCIFn_SCSCR_RE                          (0x0010u)
+#define SCIFn_SCSCR_TE                          (0x0020u)
+#define SCIFn_SCSCR_RIE                         (0x0040u)
+#define SCIFn_SCSCR_TIE                         (0x0080u)
+
+#define SCIFn_SCFTDR_D                          (0xFFu)
+
+#define SCIFn_SCFSR_DR                          (0x0001u)
+#define SCIFn_SCFSR_RDF                         (0x0002u)
+#define SCIFn_SCFSR_PER                         (0x0004u)
+#define SCIFn_SCFSR_FER                         (0x0008u)
+#define SCIFn_SCFSR_BRK                         (0x0010u)
+#define SCIFn_SCFSR_TDFE                        (0x0020u)
+#define SCIFn_SCFSR_TEND                        (0x0040u)
+#define SCIFn_SCFSR_ER                          (0x0080u)
+#define SCIFn_SCFSR_FERN                        (0x0F00u)
+#define SCIFn_SCFSR_PERN                        (0xF000u)
+
+#define SCIFn_SCFRDR_D                          (0xFFu)
+
+#define SCIFn_SCFCR_LOOP                        (0x0001u)
+#define SCIFn_SCFCR_RFRST                       (0x0002u)
+#define SCIFn_SCFCR_TFRST                       (0x0004u)
+#define SCIFn_SCFCR_MCE                         (0x0008u)
+#define SCIFn_SCFCR_TTRG                        (0x0030u)
+#define SCIFn_SCFCR_RTRG                        (0x00C0u)
+#define SCIFn_SCFCR_RSTRG                       (0x0700u)
+
+#define SCIFn_SCFDR_R                           (0x001Fu)
+#define SCIFn_SCFDR_T                           (0x1F00u)
+
+#define SCIFn_SCSPTR_SPB2DT                     (0x0001u)
+#define SCIFn_SCSPTR_SPB2IO                     (0x0002u)
+#define SCIFn_SCSPTR_SCKDT                      (0x0004u)
+#define SCIFn_SCSPTR_SCKIO                      (0x0008u)
+#define SCIFn_SCSPTR_CTSDT                      (0x0010u)
+#define SCIFn_SCSPTR_CTSIO                      (0x0020u)
+#define SCIFn_SCSPTR_RTSDT                      (0x0040u)
+#define SCIFn_SCSPTR_RTSIO                      (0x0080u)
+
+#define SCIFn_SCLSR_ORER                        (0x0001u)
+
+#define SCIFn_SCEMR_ABCS                        (0x0001u)
+#define SCIFn_SCEMR_BGDM                        (0x0080u)
+
+
+/* ==== Shift values for IO registers ==== */
+/* ---- SCIF0 ---- */
+#define SCIF0_SCSMR_CKS_SHIFT                   (0u)
+#define SCIF0_SCSMR_STOP_SHIFT                  (3u)
+#define SCIF0_SCSMR_OE_SHIFT                    (4u)
+#define SCIF0_SCSMR_PE_SHIFT                    (5u)
+#define SCIF0_SCSMR_CHR_SHIFT                   (6u)
+#define SCIF0_SCSMR_CA_SHIFT                    (7u)
+
+#define SCIF0_SCBRR_D_SHIFT                     (0u)
+
+#define SCIF0_SCSCR_CKE_SHIFT                   (0u)
+#define SCIF0_SCSCR_REIE_SHIFT                  (3u)
+#define SCIF0_SCSCR_RE_SHIFT                    (4u)
+#define SCIF0_SCSCR_TE_SHIFT                    (5u)
+#define SCIF0_SCSCR_RIE_SHIFT                   (6u)
+#define SCIF0_SCSCR_TIE_SHIFT                   (7u)
+
+#define SCIF0_SCFTDR_D_SHIFT                    (0u)
+
+#define SCIF0_SCFSR_DR_SHIFT                    (0u)
+#define SCIF0_SCFSR_RDF_SHIFT                   (1u)
+#define SCIF0_SCFSR_PER_SHIFT                   (2u)
+#define SCIF0_SCFSR_FER_SHIFT                   (3u)
+#define SCIF0_SCFSR_BRK_SHIFT                   (4u)
+#define SCIF0_SCFSR_TDFE_SHIFT                  (5u)
+#define SCIF0_SCFSR_TEND_SHIFT                  (6u)
+#define SCIF0_SCFSR_ER_SHIFT                    (7u)
+#define SCIF0_SCFSR_FERN_SHIFT                  (8u)
+#define SCIF0_SCFSR_PERN_SHIFT                  (12u)
+
+#define SCIF0_SCFRDR_D_SHIFT                    (0u)
+
+#define SCIF0_SCFCR_LOOP_SHIFT                  (0u)
+#define SCIF0_SCFCR_RFRST_SHIFT                 (1u)
+#define SCIF0_SCFCR_TFRST_SHIFT                 (2u)
+#define SCIF0_SCFCR_MCE_SHIFT                   (3u)
+#define SCIF0_SCFCR_TTRG_SHIFT                  (4u)
+#define SCIF0_SCFCR_RTRG_SHIFT                  (6u)
+#define SCIF0_SCFCR_RSTRG_SHIFT                 (8u)
+
+#define SCIF0_SCFDR_R_SHIFT                     (0u)
+#define SCIF0_SCFDR_T_SHIFT                     (8u)
+
+#define SCIF0_SCSPTR_SPB2DT_SHIFT               (0u)
+#define SCIF0_SCSPTR_SPB2IO_SHIFT               (1u)
+#define SCIF0_SCSPTR_SCKDT_SHIFT                (2u)
+#define SCIF0_SCSPTR_SCKIO_SHIFT                (3u)
+#define SCIF0_SCSPTR_CTSDT_SHIFT                (4u)
+#define SCIF0_SCSPTR_CTSIO_SHIFT                (5u)
+#define SCIF0_SCSPTR_RTSDT_SHIFT                (6u)
+#define SCIF0_SCSPTR_RTSIO_SHIFT                (7u)
+
+#define SCIF0_SCLSR_ORER_SHIFT                  (0u)
+
+#define SCIF0_SCEMR_ABCS_SHIFT                  (0u)
+#define SCIF0_SCEMR_BGDM_SHIFT                  (7u)
+
+/* ---- SCIF1 ---- */
+#define SCIF1_SCSMR_CKS_SHIFT                   (0u)
+#define SCIF1_SCSMR_STOP_SHIFT                  (3u)
+#define SCIF1_SCSMR_OE_SHIFT                    (4u)
+#define SCIF1_SCSMR_PE_SHIFT                    (5u)
+#define SCIF1_SCSMR_CHR_SHIFT                   (6u)
+#define SCIF1_SCSMR_CA_SHIFT                    (7u)
+
+#define SCIF1_SCBRR_D_SHIFT                     (0u)
+
+#define SCIF1_SCSCR_CKE_SHIFT                   (0u)
+#define SCIF1_SCSCR_REIE_SHIFT                  (3u)
+#define SCIF1_SCSCR_RE_SHIFT                    (4u)
+#define SCIF1_SCSCR_TE_SHIFT                    (5u)
+#define SCIF1_SCSCR_RIE_SHIFT                   (6u)
+#define SCIF1_SCSCR_TIE_SHIFT                   (7u)
+
+#define SCIF1_SCFTDR_D_SHIFT                    (0u)
+
+#define SCIF1_SCFSR_DR_SHIFT                    (0u)
+#define SCIF1_SCFSR_RDF_SHIFT                   (1u)
+#define SCIF1_SCFSR_PER_SHIFT                   (2u)
+#define SCIF1_SCFSR_FER_SHIFT                   (3u)
+#define SCIF1_SCFSR_BRK_SHIFT                   (4u)
+#define SCIF1_SCFSR_TDFE_SHIFT                  (5u)
+#define SCIF1_SCFSR_TEND_SHIFT                  (6u)
+#define SCIF1_SCFSR_ER_SHIFT                    (7u)
+#define SCIF1_SCFSR_FERN_SHIFT                  (8u)
+#define SCIF1_SCFSR_PERN_SHIFT                  (12u)
+
+#define SCIF1_SCFRDR_D_SHIFT                    (0u)
+
+#define SCIF1_SCFCR_LOOP_SHIFT                  (0u)
+#define SCIF1_SCFCR_RFRST_SHIFT                 (1u)
+#define SCIF1_SCFCR_TFRST_SHIFT                 (2u)
+#define SCIF1_SCFCR_MCE_SHIFT                   (3u)
+#define SCIF1_SCFCR_TTRG_SHIFT                  (4u)
+#define SCIF1_SCFCR_RTRG_SHIFT                  (6u)
+#define SCIF1_SCFCR_RSTRG_SHIFT                 (8u)
+
+#define SCIF1_SCFDR_R_SHIFT                     (0u)
+#define SCIF1_SCFDR_T_SHIFT                     (8u)
+
+#define SCIF1_SCSPTR_SPB2DT_SHIFT               (0u)
+#define SCIF1_SCSPTR_SPB2IO_SHIFT               (1u)
+#define SCIF1_SCSPTR_SCKDT_SHIFT                (2u)
+#define SCIF1_SCSPTR_SCKIO_SHIFT                (3u)
+#define SCIF1_SCSPTR_CTSDT_SHIFT                (4u)
+#define SCIF1_SCSPTR_CTSIO_SHIFT                (5u)
+#define SCIF1_SCSPTR_RTSDT_SHIFT                (6u)
+#define SCIF1_SCSPTR_RTSIO_SHIFT                (7u)
+
+#define SCIF1_SCLSR_ORER_SHIFT                  (0u)
+
+#define SCIF1_SCEMR_ABCS_SHIFT                  (0u)
+#define SCIF1_SCEMR_BGDM_SHIFT                  (7u)
+
+/* ---- SCIF2 ---- */
+#define SCIF2_SCSMR_CKS_SHIFT                   (0u)
+#define SCIF2_SCSMR_STOP_SHIFT                  (3u)
+#define SCIF2_SCSMR_OE_SHIFT                    (4u)
+#define SCIF2_SCSMR_PE_SHIFT                    (5u)
+#define SCIF2_SCSMR_CHR_SHIFT                   (6u)
+#define SCIF2_SCSMR_CA_SHIFT                    (7u)
+
+#define SCIF2_SCBRR_D_SHIFT                     (0u)
+
+#define SCIF2_SCSCR_CKE_SHIFT                   (0u)
+#define SCIF2_SCSCR_REIE_SHIFT                  (3u)
+#define SCIF2_SCSCR_RE_SHIFT                    (4u)
+#define SCIF2_SCSCR_TE_SHIFT                    (5u)
+#define SCIF2_SCSCR_RIE_SHIFT                   (6u)
+#define SCIF2_SCSCR_TIE_SHIFT                   (7u)
+
+#define SCIF2_SCFTDR_D_SHIFT                    (0u)
+
+#define SCIF2_SCFSR_DR_SHIFT                    (0u)
+#define SCIF2_SCFSR_RDF_SHIFT                   (1u)
+#define SCIF2_SCFSR_PER_SHIFT                   (2u)
+#define SCIF2_SCFSR_FER_SHIFT                   (3u)
+#define SCIF2_SCFSR_BRK_SHIFT                   (4u)
+#define SCIF2_SCFSR_TDFE_SHIFT                  (5u)
+#define SCIF2_SCFSR_TEND_SHIFT                  (6u)
+#define SCIF2_SCFSR_ER_SHIFT                    (7u)
+#define SCIF2_SCFSR_FERN_SHIFT                  (8u)
+#define SCIF2_SCFSR_PERN_SHIFT                  (12u)
+
+#define SCIF2_SCFRDR_D_SHIFT                    (0u)
+
+#define SCIF2_SCFCR_LOOP_SHIFT                  (0u)
+#define SCIF2_SCFCR_RFRST_SHIFT                 (1u)
+#define SCIF2_SCFCR_TFRST_SHIFT                 (2u)
+#define SCIF2_SCFCR_MCE_SHIFT                   (3u)
+#define SCIF2_SCFCR_TTRG_SHIFT                  (4u)
+#define SCIF2_SCFCR_RTRG_SHIFT                  (6u)
+#define SCIF2_SCFCR_RSTRG_SHIFT                 (8u)
+
+#define SCIF2_SCFDR_R_SHIFT                     (0u)
+#define SCIF2_SCFDR_T_SHIFT                     (8u)
+
+#define SCIF2_SCSPTR_SPB2DT_SHIFT               (0u)
+#define SCIF2_SCSPTR_SPB2IO_SHIFT               (1u)
+#define SCIF2_SCSPTR_SCKDT_SHIFT                (2u)
+#define SCIF2_SCSPTR_SCKIO_SHIFT                (3u)
+#define SCIF2_SCSPTR_CTSDT_SHIFT                (4u)
+#define SCIF2_SCSPTR_CTSIO_SHIFT                (5u)
+#define SCIF2_SCSPTR_RTSDT_SHIFT                (6u)
+#define SCIF2_SCSPTR_RTSIO_SHIFT                (7u)
+
+#define SCIF2_SCLSR_ORER_SHIFT                  (0u)
+
+#define SCIF2_SCEMR_ABCS_SHIFT                  (0u)
+#define SCIF2_SCEMR_BGDM_SHIFT                  (7u)
+
+/* ---- SCIF3 ---- */
+#define SCIF3_SCSMR_CKS_SHIFT                   (0u)
+#define SCIF3_SCSMR_STOP_SHIFT                  (3u)
+#define SCIF3_SCSMR_OE_SHIFT                    (4u)
+#define SCIF3_SCSMR_PE_SHIFT                    (5u)
+#define SCIF3_SCSMR_CHR_SHIFT                   (6u)
+#define SCIF3_SCSMR_CA_SHIFT                    (7u)
+
+#define SCIF3_SCBRR_D_SHIFT                     (0u)
+
+#define SCIF3_SCSCR_CKE_SHIFT                   (0u)
+#define SCIF3_SCSCR_REIE_SHIFT                  (3u)
+#define SCIF3_SCSCR_RE_SHIFT                    (4u)
+#define SCIF3_SCSCR_TE_SHIFT                    (5u)
+#define SCIF3_SCSCR_RIE_SHIFT                   (6u)
+#define SCIF3_SCSCR_TIE_SHIFT                   (7u)
+
+#define SCIF3_SCFTDR_D_SHIFT                    (0u)
+
+#define SCIF3_SCFSR_DR_SHIFT                    (0u)
+#define SCIF3_SCFSR_RDF_SHIFT                   (1u)
+#define SCIF3_SCFSR_PER_SHIFT                   (2u)
+#define SCIF3_SCFSR_FER_SHIFT                   (3u)
+#define SCIF3_SCFSR_BRK_SHIFT                   (4u)
+#define SCIF3_SCFSR_TDFE_SHIFT                  (5u)
+#define SCIF3_SCFSR_TEND_SHIFT                  (6u)
+#define SCIF3_SCFSR_ER_SHIFT                    (7u)
+#define SCIF3_SCFSR_FERN_SHIFT                  (8u)
+#define SCIF3_SCFSR_PERN_SHIFT                  (12u)
+
+#define SCIF3_SCFRDR_D_SHIFT                    (0u)
+
+#define SCIF3_SCFCR_LOOP_SHIFT                  (0u)
+#define SCIF3_SCFCR_RFRST_SHIFT                 (1u)
+#define SCIF3_SCFCR_TFRST_SHIFT                 (2u)
+#define SCIF3_SCFCR_MCE_SHIFT                   (3u)
+#define SCIF3_SCFCR_TTRG_SHIFT                  (4u)
+#define SCIF3_SCFCR_RTRG_SHIFT                  (6u)
+#define SCIF3_SCFCR_RSTRG_SHIFT                 (8u)
+
+#define SCIF3_SCFDR_R_SHIFT                     (0u)
+#define SCIF3_SCFDR_T_SHIFT                     (8u)
+
+#define SCIF3_SCSPTR_SPB2DT_SHIFT               (0u)
+#define SCIF3_SCSPTR_SPB2IO_SHIFT               (1u)
+#define SCIF3_SCSPTR_SCKDT_SHIFT                (2u)
+#define SCIF3_SCSPTR_SCKIO_SHIFT                (3u)
+#define SCIF3_SCSPTR_CTSDT_SHIFT                (4u)
+#define SCIF3_SCSPTR_CTSIO_SHIFT                (5u)
+#define SCIF3_SCSPTR_RTSDT_SHIFT                (6u)
+#define SCIF3_SCSPTR_RTSIO_SHIFT                (7u)
+
+#define SCIF3_SCLSR_ORER_SHIFT                  (0u)
+
+#define SCIF3_SCEMR_ABCS_SHIFT                  (0u)
+#define SCIF3_SCEMR_BGDM_SHIFT                  (7u)
+
+/* ---- SCIF4 ---- */
+#define SCIF4_SCSMR_CKS_SHIFT                   (0u)
+#define SCIF4_SCSMR_STOP_SHIFT                  (3u)
+#define SCIF4_SCSMR_OE_SHIFT                    (4u)
+#define SCIF4_SCSMR_PE_SHIFT                    (5u)
+#define SCIF4_SCSMR_CHR_SHIFT                   (6u)
+#define SCIF4_SCSMR_CA_SHIFT                    (7u)
+
+#define SCIF4_SCBRR_D_SHIFT                     (0u)
+
+#define SCIF4_SCSCR_CKE_SHIFT                   (0u)
+#define SCIF4_SCSCR_REIE_SHIFT                  (3u)
+#define SCIF4_SCSCR_RE_SHIFT                    (4u)
+#define SCIF4_SCSCR_TE_SHIFT                    (5u)
+#define SCIF4_SCSCR_RIE_SHIFT                   (6u)
+#define SCIF4_SCSCR_TIE_SHIFT                   (7u)
+
+#define SCIF4_SCFTDR_D_SHIFT                    (0u)
+
+#define SCIF4_SCFSR_DR_SHIFT                    (0u)
+#define SCIF4_SCFSR_RDF_SHIFT                   (1u)
+#define SCIF4_SCFSR_PER_SHIFT                   (2u)
+#define SCIF4_SCFSR_FER_SHIFT                   (3u)
+#define SCIF4_SCFSR_BRK_SHIFT                   (4u)
+#define SCIF4_SCFSR_TDFE_SHIFT                  (5u)
+#define SCIF4_SCFSR_TEND_SHIFT                  (6u)
+#define SCIF4_SCFSR_ER_SHIFT                    (7u)
+#define SCIF4_SCFSR_FERN_SHIFT                  (8u)
+#define SCIF4_SCFSR_PERN_SHIFT                  (12u)
+
+#define SCIF4_SCFRDR_D_SHIFT                    (0u)
+
+#define SCIF4_SCFCR_LOOP_SHIFT                  (0u)
+#define SCIF4_SCFCR_RFRST_SHIFT                 (1u)
+#define SCIF4_SCFCR_TFRST_SHIFT                 (2u)
+#define SCIF4_SCFCR_MCE_SHIFT                   (3u)
+#define SCIF4_SCFCR_TTRG_SHIFT                  (4u)
+#define SCIF4_SCFCR_RTRG_SHIFT                  (6u)
+#define SCIF4_SCFCR_RSTRG_SHIFT                 (8u)
+
+#define SCIF4_SCFDR_R_SHIFT                     (0u)
+#define SCIF4_SCFDR_T_SHIFT                     (8u)
+
+#define SCIF4_SCSPTR_SPB2DT_SHIFT               (0u)
+#define SCIF4_SCSPTR_SPB2IO_SHIFT               (1u)
+#define SCIF4_SCSPTR_SCKDT_SHIFT                (2u)
+#define SCIF4_SCSPTR_SCKIO_SHIFT                (3u)
+#define SCIF4_SCSPTR_CTSDT_SHIFT                (4u)
+#define SCIF4_SCSPTR_CTSIO_SHIFT                (5u)
+#define SCIF4_SCSPTR_RTSDT_SHIFT                (6u)
+#define SCIF4_SCSPTR_RTSIO_SHIFT                (7u)
+
+#define SCIF4_SCLSR_ORER_SHIFT                  (0u)
+
+#define SCIF4_SCEMR_ABCS_SHIFT                  (0u)
+#define SCIF4_SCEMR_BGDM_SHIFT                  (7u)
+
+/* ---- SCIF5 ---- */
+#define SCIF5_SCSMR_CKS_SHIFT                   (0u)
+#define SCIF5_SCSMR_STOP_SHIFT                  (3u)
+#define SCIF5_SCSMR_OE_SHIFT                    (4u)
+#define SCIF5_SCSMR_PE_SHIFT                    (5u)
+#define SCIF5_SCSMR_CHR_SHIFT                   (6u)
+#define SCIF5_SCSMR_CA_SHIFT                    (7u)
+
+#define SCIF5_SCBRR_D_SHIFT                     (0u)
+
+#define SCIF5_SCSCR_CKE_SHIFT                   (0u)
+#define SCIF5_SCSCR_REIE_SHIFT                  (3u)
+#define SCIF5_SCSCR_RE_SHIFT                    (4u)
+#define SCIF5_SCSCR_TE_SHIFT                    (5u)
+#define SCIF5_SCSCR_RIE_SHIFT                   (6u)
+#define SCIF5_SCSCR_TIE_SHIFT                   (7u)
+
+#define SCIF5_SCFTDR_D_SHIFT                    (0u)
+
+#define SCIF5_SCFSR_DR_SHIFT                    (0u)
+#define SCIF5_SCFSR_RDF_SHIFT                   (1u)
+#define SCIF5_SCFSR_PER_SHIFT                   (2u)
+#define SCIF5_SCFSR_FER_SHIFT                   (3u)
+#define SCIF5_SCFSR_BRK_SHIFT                   (4u)
+#define SCIF5_SCFSR_TDFE_SHIFT                  (5u)
+#define SCIF5_SCFSR_TEND_SHIFT                  (6u)
+#define SCIF5_SCFSR_ER_SHIFT                    (7u)
+#define SCIF5_SCFSR_FERN_SHIFT                  (8u)
+#define SCIF5_SCFSR_PERN_SHIFT                  (12u)
+
+#define SCIF5_SCFRDR_D_SHIFT                    (0u)
+
+#define SCIF5_SCFCR_LOOP_SHIFT                  (0u)
+#define SCIF5_SCFCR_RFRST_SHIFT                 (1u)
+#define SCIF5_SCFCR_TFRST_SHIFT                 (2u)
+#define SCIF5_SCFCR_MCE_SHIFT                   (3u)
+#define SCIF5_SCFCR_TTRG_SHIFT                  (4u)
+#define SCIF5_SCFCR_RTRG_SHIFT                  (6u)
+#define SCIF5_SCFCR_RSTRG_SHIFT                 (8u)
+
+#define SCIF5_SCFDR_R_SHIFT                     (0u)
+#define SCIF5_SCFDR_T_SHIFT                     (8u)
+
+#define SCIF5_SCSPTR_SPB2DT_SHIFT               (0u)
+#define SCIF5_SCSPTR_SPB2IO_SHIFT               (1u)
+#define SCIF5_SCSPTR_SCKDT_SHIFT                (2u)
+#define SCIF5_SCSPTR_SCKIO_SHIFT                (3u)
+#define SCIF5_SCSPTR_CTSDT_SHIFT                (4u)
+#define SCIF5_SCSPTR_CTSIO_SHIFT                (5u)
+#define SCIF5_SCSPTR_RTSDT_SHIFT                (6u)
+#define SCIF5_SCSPTR_RTSIO_SHIFT                (7u)
+
+#define SCIF5_SCLSR_ORER_SHIFT                  (0u)
+
+#define SCIF5_SCEMR_ABCS_SHIFT                  (0u)
+#define SCIF5_SCEMR_BGDM_SHIFT                  (7u)
+
+/* ---- SCIF6 ---- */
+#define SCIF6_SCSMR_CKS_SHIFT                   (0u)
+#define SCIF6_SCSMR_STOP_SHIFT                  (3u)
+#define SCIF6_SCSMR_OE_SHIFT                    (4u)
+#define SCIF6_SCSMR_PE_SHIFT                    (5u)
+#define SCIF6_SCSMR_CHR_SHIFT                   (6u)
+#define SCIF6_SCSMR_CA_SHIFT                    (7u)
+
+#define SCIF6_SCBRR_D_SHIFT                     (0u)
+
+#define SCIF6_SCSCR_CKE_SHIFT                   (0u)
+#define SCIF6_SCSCR_REIE_SHIFT                  (3u)
+#define SCIF6_SCSCR_RE_SHIFT                    (4u)
+#define SCIF6_SCSCR_TE_SHIFT                    (5u)
+#define SCIF6_SCSCR_RIE_SHIFT                   (6u)
+#define SCIF6_SCSCR_TIE_SHIFT                   (7u)
+
+#define SCIF6_SCFTDR_D_SHIFT                    (0u)
+
+#define SCIF6_SCFSR_DR_SHIFT                    (0u)
+#define SCIF6_SCFSR_RDF_SHIFT                   (1u)
+#define SCIF6_SCFSR_PER_SHIFT                   (2u)
+#define SCIF6_SCFSR_FER_SHIFT                   (3u)
+#define SCIF6_SCFSR_BRK_SHIFT                   (4u)
+#define SCIF6_SCFSR_TDFE_SHIFT                  (5u)
+#define SCIF6_SCFSR_TEND_SHIFT                  (6u)
+#define SCIF6_SCFSR_ER_SHIFT                    (7u)
+#define SCIF6_SCFSR_FERN_SHIFT                  (8u)
+#define SCIF6_SCFSR_PERN_SHIFT                  (12u)
+
+#define SCIF6_SCFRDR_D_SHIFT                    (0u)
+
+#define SCIF6_SCFCR_LOOP_SHIFT                  (0u)
+#define SCIF6_SCFCR_RFRST_SHIFT                 (1u)
+#define SCIF6_SCFCR_TFRST_SHIFT                 (2u)
+#define SCIF6_SCFCR_MCE_SHIFT                   (3u)
+#define SCIF6_SCFCR_TTRG_SHIFT                  (4u)
+#define SCIF6_SCFCR_RTRG_SHIFT                  (6u)
+#define SCIF6_SCFCR_RSTRG_SHIFT                 (8u)
+
+#define SCIF6_SCFDR_R_SHIFT                     (0u)
+#define SCIF6_SCFDR_T_SHIFT                     (8u)
+
+#define SCIF6_SCSPTR_SPB2DT_SHIFT               (0u)
+#define SCIF6_SCSPTR_SPB2IO_SHIFT               (1u)
+#define SCIF6_SCSPTR_SCKDT_SHIFT                (2u)
+#define SCIF6_SCSPTR_SCKIO_SHIFT                (3u)
+#define SCIF6_SCSPTR_CTSDT_SHIFT                (4u)
+#define SCIF6_SCSPTR_CTSIO_SHIFT                (5u)
+#define SCIF6_SCSPTR_RTSDT_SHIFT                (6u)
+#define SCIF6_SCSPTR_RTSIO_SHIFT                (7u)
+
+#define SCIF6_SCLSR_ORER_SHIFT                  (0u)
+
+#define SCIF6_SCEMR_ABCS_SHIFT                  (0u)
+#define SCIF6_SCEMR_BGDM_SHIFT                  (7u)
+
+/* ---- SCIF7 ---- */
+#define SCIF7_SCSMR_CKS_SHIFT                   (0u)
+#define SCIF7_SCSMR_STOP_SHIFT                  (3u)
+#define SCIF7_SCSMR_OE_SHIFT                    (4u)
+#define SCIF7_SCSMR_PE_SHIFT                    (5u)
+#define SCIF7_SCSMR_CHR_SHIFT                   (6u)
+#define SCIF7_SCSMR_CA_SHIFT                    (7u)
+
+#define SCIF7_SCBRR_D_SHIFT                     (0u)
+
+#define SCIF7_SCSCR_CKE_SHIFT                   (0u)
+#define SCIF7_SCSCR_REIE_SHIFT                  (3u)
+#define SCIF7_SCSCR_RE_SHIFT                    (4u)
+#define SCIF7_SCSCR_TE_SHIFT                    (5u)
+#define SCIF7_SCSCR_RIE_SHIFT                   (6u)
+#define SCIF7_SCSCR_TIE_SHIFT                   (7u)
+
+#define SCIF7_SCFTDR_D_SHIFT                    (0u)
+
+#define SCIF7_SCFSR_DR_SHIFT                    (0u)
+#define SCIF7_SCFSR_RDF_SHIFT                   (1u)
+#define SCIF7_SCFSR_PER_SHIFT                   (2u)
+#define SCIF7_SCFSR_FER_SHIFT                   (3u)
+#define SCIF7_SCFSR_BRK_SHIFT                   (4u)
+#define SCIF7_SCFSR_TDFE_SHIFT                  (5u)
+#define SCIF7_SCFSR_TEND_SHIFT                  (6u)
+#define SCIF7_SCFSR_ER_SHIFT                    (7u)
+#define SCIF7_SCFSR_FERN_SHIFT                  (8u)
+#define SCIF7_SCFSR_PERN_SHIFT                  (12u)
+
+#define SCIF7_SCFRDR_D_SHIFT                    (0u)
+
+#define SCIF7_SCFCR_LOOP_SHIFT                  (0u)
+#define SCIF7_SCFCR_RFRST_SHIFT                 (1u)
+#define SCIF7_SCFCR_TFRST_SHIFT                 (2u)
+#define SCIF7_SCFCR_MCE_SHIFT                   (3u)
+#define SCIF7_SCFCR_TTRG_SHIFT                  (4u)
+#define SCIF7_SCFCR_RTRG_SHIFT                  (6u)
+#define SCIF7_SCFCR_RSTRG_SHIFT                 (8u)
+
+#define SCIF7_SCFDR_R_SHIFT                     (0u)
+#define SCIF7_SCFDR_T_SHIFT                     (8u)
+
+#define SCIF7_SCSPTR_SPB2DT_SHIFT               (0u)
+#define SCIF7_SCSPTR_SPB2IO_SHIFT               (1u)
+#define SCIF7_SCSPTR_SCKDT_SHIFT                (2u)
+#define SCIF7_SCSPTR_SCKIO_SHIFT                (3u)
+#define SCIF7_SCSPTR_CTSDT_SHIFT                (4u)
+#define SCIF7_SCSPTR_CTSIO_SHIFT                (5u)
+#define SCIF7_SCSPTR_RTSDT_SHIFT                (6u)
+#define SCIF7_SCSPTR_RTSIO_SHIFT                (7u)
+
+#define SCIF7_SCLSR_ORER_SHIFT                  (0u)
+
+#define SCIF7_SCEMR_ABCS_SHIFT                  (0u)
+#define SCIF7_SCEMR_BGDM_SHIFT                  (7u)
+
+/* ---- SCIFn ---- */
+#define SCIFn_SCSMR_CKS_SHIFT                   (0u)
+#define SCIFn_SCSMR_STOP_SHIFT                  (3u)
+#define SCIFn_SCSMR_OE_SHIFT                    (4u)
+#define SCIFn_SCSMR_PE_SHIFT                    (5u)
+#define SCIFn_SCSMR_CHR_SHIFT                   (6u)
+#define SCIFn_SCSMR_CA_SHIFT                    (7u)
+
+#define SCIFn_SCBRR_D_SHIFT                     (0u)
+
+#define SCIFn_SCSCR_CKE_SHIFT                   (0u)
+#define SCIFn_SCSCR_REIE_SHIFT                  (3u)
+#define SCIFn_SCSCR_RE_SHIFT                    (4u)
+#define SCIFn_SCSCR_TE_SHIFT                    (5u)
+#define SCIFn_SCSCR_RIE_SHIFT                   (6u)
+#define SCIFn_SCSCR_TIE_SHIFT                   (7u)
+
+#define SCIFn_SCFTDR_D_SHIFT                    (0u)
+
+#define SCIFn_SCFSR_DR_SHIFT                    (0u)
+#define SCIFn_SCFSR_RDF_SHIFT                   (1u)
+#define SCIFn_SCFSR_PER_SHIFT                   (2u)
+#define SCIFn_SCFSR_FER_SHIFT                   (3u)
+#define SCIFn_SCFSR_BRK_SHIFT                   (4u)
+#define SCIFn_SCFSR_TDFE_SHIFT                  (5u)
+#define SCIFn_SCFSR_TEND_SHIFT                  (6u)
+#define SCIFn_SCFSR_ER_SHIFT                    (7u)
+#define SCIFn_SCFSR_FERN_SHIFT                  (8u)
+#define SCIFn_SCFSR_PERN_SHIFT                  (12u)
+
+#define SCIFn_SCFRDR_D_SHIFT                    (0u)
+
+#define SCIFn_SCFCR_LOOP_SHIFT                  (0u)
+#define SCIFn_SCFCR_RFRST_SHIFT                 (1u)
+#define SCIFn_SCFCR_TFRST_SHIFT                 (2u)
+#define SCIFn_SCFCR_MCE_SHIFT                   (3u)
+#define SCIFn_SCFCR_TTRG_SHIFT                  (4u)
+#define SCIFn_SCFCR_RTRG_SHIFT                  (6u)
+#define SCIFn_SCFCR_RSTRG_SHIFT                 (8u)
+
+#define SCIFn_SCFDR_R_SHIFT                     (0u)
+#define SCIFn_SCFDR_T_SHIFT                     (8u)
+
+#define SCIFn_SCSPTR_SPB2DT_SHIFT               (0u)
+#define SCIFn_SCSPTR_SPB2IO_SHIFT               (1u)
+#define SCIFn_SCSPTR_SCKDT_SHIFT                (2u)
+#define SCIFn_SCSPTR_SCKIO_SHIFT                (3u)
+#define SCIFn_SCSPTR_CTSDT_SHIFT                (4u)
+#define SCIFn_SCSPTR_CTSIO_SHIFT                (5u)
+#define SCIFn_SCSPTR_RTSDT_SHIFT                (6u)
+#define SCIFn_SCSPTR_RTSIO_SHIFT                (7u)
+
+#define SCIFn_SCLSR_ORER_SHIFT                  (0u)
+
+#define SCIFn_SCEMR_ABCS_SHIFT                  (0u)
+#define SCIFn_SCEMR_BGDM_SHIFT                  (7u)
+
+
+#endif /* SCIF_IOBITMASK_H */
+
+/* End of File */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/usb_iobitmask.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/usb_iobitmask.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iobitmasks/usb_iobitmask.h	(revision 270)
@@ -0,0 +1,731 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name   : usb_iobitmask.h
+* $Rev: 1116 $
+* $Date:: 2014-07-09 16:29:19 +0900#$
+* Description : USB register define header
+*******************************************************************************/
+#ifndef USB_IOBITMASK_H
+#define USB_IOBITMASK_H
+
+/*==============================================*/
+/* SYSCFG                                       */
+/*==============================================*/
+#define     USB_SYSCFG_USBE                 (0x0001u)
+#define     USB_SYSCFG_UPLLE                (0x0002u)
+#define     USB_SYSCFG_UCKSEL               (0x0004u)
+/* #define  USB_SYSCFG_RESERVED1            (0x0008u) */
+#define     USB_SYSCFG_DPRPU                (0x0010u)
+#define     USB_SYSCFG_DRPD                 (0x0020u)
+#define     USB_SYSCFG_DCFM                 (0x0040u)
+#define     USB_SYSCFG_HSE                  (0x0080u)
+/* #define  USB_SYSCFG_RESERVED2            (0xFF00u) */
+
+#define     USB_SYSCFG_USBE_SHIFT           (0)
+#define     USB_SYSCFG_UPLLE_SHIFT          (1)
+#define     USB_SYSCFG_UCKSEL_SHIFT         (2)
+/* #define  USB_SYSCFG_RESERVED1_SHIFT      (3) */
+#define     USB_SYSCFG_DPRPU_SHIFT          (4)
+#define     USB_SYSCFG_DRPD_SHIFT           (5)
+#define     USB_SYSCFG_DCFM_SHIFT           (6)
+#define     USB_SYSCFG_HSE_SHIFT            (7)
+/* #define  USB_SYSCFG_RESERVED2_SHIFT      (8) */
+
+/*==============================================*/
+/* BUSWAIT                                      */
+/*==============================================*/
+#define     USB_BUSWAIT_BWAIT               (0x003Fu)
+
+#define     USB_BUSWAIT_BWAIT_SHIFT         (0)
+
+/*==============================================*/
+/* SYSSTS0                                      */
+/*==============================================*/
+#define     USB_SYSSTS0_LNST                (0x0003u)
+#define     USB_SYSSTS0_SOFEA               (0x0020u)
+#define     USB_SYSSTS0_HTACT               (0x0040u)
+
+#define     USB_SYSSTS0_LNST_SHIFT          (0)
+#define     USB_SYSSTS0_SOFEA_SHIFT         (5)
+#define     USB_SYSSTS0_HTACT_SHIFT         (6)
+
+/*==============================================*/
+/* DVSTCTR0                                     */
+/*==============================================*/
+#define     USB_DVSTCTR0_RHST               (0x0007u)
+/* #define  USB_DVSTCTR0_RESERVED           (0x0008u) */
+#define     USB_DVSTCTR0_UACT               (0x0010u)
+#define     USB_DVSTCTR0_RESUME             (0x0020u)
+#define     USB_DVSTCTR0_USBRST             (0x0040u)
+#define     USB_DVSTCTR0_RWUPE              (0x0080u)
+#define     USB_DVSTCTR0_WKUP               (0x0100u)
+
+#define     USB_DVSTCTR0_RHST_SHIFT         (0)
+/* #define  USB_DVSTCTR0_RESERVED_SHIFT     (3) */
+#define     USB_DVSTCTR0_UACT_SHIFT         (4)
+#define     USB_DVSTCTR0_RESUME_SHIFT       (5)
+#define     USB_DVSTCTR0_USBRST_SHIFT       (6)
+#define     USB_DVSTCTR0_RWUPE_SHIFT        (7)
+#define     USB_DVSTCTR0_WKUP_SHIFT         (8)
+
+/*==============================================*/
+/* TESTMODE                                     */
+/*==============================================*/
+#define     USB_TESTMODE_UTST               (0x000Fu)
+/* #define  USB_TESTMODE_RESERVED           (0xFFF0u) */
+
+#define     USB_TESTMODE_UTST_SHIFT         (0)
+/* #define  USB_TESTMODE_RESERVED_SHIFT     (4) */
+
+/*==============================================*/
+/* DnFBCFG                                      */
+/*==============================================*/
+/* #define      USB_DnFBCFG_RESERVED1       (0x000Fu) */
+#define     USB_DnFBCFG_TENDE               (0x0010u)
+/* #define      USB_DnFBCFG_RESERVED2       (0x0FE0u) */
+#define     USB_DnFBCFG_DFACC               (0x3000u)
+/* #define      USB_DnFBCFG_RESERVED3       (0xC000u) */
+
+/* #define  USB_DnFBCFG_RESERVED1_SHIFT     (0) */
+#define     USB_DnFBCFG_TENDE_SHIFT         (4)
+/* #define  USB_DnFBCFG_RESERVED2_SHIFT     (5) */
+#define     USB_DnFBCFG_DFACC_SHIFT         (12)
+/* #define  USB_DnFBCFG_RESERVED3_SHIFT     (14) */
+
+/*==============================================*/
+/* CFIFO                                        */
+/*==============================================*/
+#define     USB_CFIFO_FIFOPORT              (0xFFFFFFFFuL)
+
+#define     USB_CFIFO_FIFOPORT_SHIFT        (0)
+
+/*==============================================*/
+/* DnFIFO                                       */
+/*==============================================*/
+#define     USB_DnFIFO_FIFOPORT             (0xFFFFFFFFuL)
+
+#define     USB_DnFIFO_FIFOPORT_SHIFT       (0)
+
+/*==============================================*/
+/* CFIFOSEL                                     */
+/*==============================================*/
+#define     USB_CFIFOSEL_CURPIPE            (0x000Fu)
+/* #define  USB_CFIFOSEL_RESERVED1          (0x0010u) */
+#define     USB_CFIFOSEL_ISEL_              (0x0020u)
+/* #define  USB_CFIFOSEL_RESERVED2          (0x00C0u) */
+#define     USB_CFIFOSEL_BIGEND             (0x0100u)
+/* #define  USB_CFIFOSEL_RESERVED3          (0x0200u) */
+#define     USB_CFIFOSEL_MBW                (0x0C00u)
+/* #define  USB_CFIFOSEL_RESERVED4          (0x3000u) */
+#define     USB_CFIFOSEL_REW                (0x4000u)
+#define     USB_CFIFOSEL_RCNT               (0x8000u)
+
+#define     USB_CFIFOSEL_CURPIPE_SHIFT      (0)
+/* #define  USB_CFIFOSEL_RESERVED1_SHIFT    (4) */
+#define     USB_CFIFOSEL_ISEL_SHIFT_        (5)
+/* #define  USB_CFIFOSEL_RESERVED2_SHIFT    (6) */
+#define     USB_CFIFOSEL_BIGEND_SHIFT       (8)
+/* #define  USB_CFIFOSEL_RESERVED3_SHIFT    (9) */
+#define     USB_CFIFOSEL_MBW_SHIFT          (10)
+/* #define  USB_CFIFOSEL_RESERVED4_SHIFT    (12) */
+#define     USB_CFIFOSEL_REW_SHIFT          (14)
+#define     USB_CFIFOSEL_RCNT_SHIFT         (15)
+
+/*==============================================*/
+/* DnFIFOSEL                                    */
+/*==============================================*/
+#define     USB_DnFIFOSEL_CURPIPE           (0x000Fu)
+/* #define  USB_DnFIFOSEL_RESERVED1         (0x00F0u) */
+#define     USB_DnFIFOSEL_BIGEND            (0x0100u)
+/* #define  USB_DnFIFOSEL_RESERVED2         (0x0200u) */
+#define     USB_DnFIFOSEL_MBW               (0x0C00u)
+#define     USB_DnFIFOSEL_DREQE             (0x1000u)
+#define     USB_DnFIFOSEL_DCLRM             (0x2000u)
+#define     USB_DnFIFOSEL_REW               (0x4000u)
+#define     USB_DnFIFOSEL_RCNT              (0x8000u)
+
+#define     USB_DnFIFOSEL_CURPIPE_SHIFT     (0)
+/* #define  USB_DnFIFOSEL_RESERVED1_SHIFT   (4) */
+#define     USB_DnFIFOSEL_BIGEND_SHIFT      (8)
+/* #define  USB_DnFIFOSEL_RESERVED2_SHIFT   (9) */
+#define     USB_DnFIFOSEL_MBW_SHIFT         (10)
+#define     USB_DnFIFOSEL_DREQE_SHIFT       (12)
+#define     USB_DnFIFOSEL_DCLRM_SHIFT       (13)
+#define     USB_DnFIFOSEL_REW_SHIFT         (14)
+#define     USB_DnFIFOSEL_RCNT_SHIFT        (15)
+
+/*==============================================*/
+/* CFIFOCTR                                     */
+/*==============================================*/
+#define     USB_CFIFOCTR_DTLN               (0x0FFFu)
+/* #define  USB_CFIFOCTR_RESERVED           (0x1000u) */
+#define     USB_CFIFOCTR_FRDY               (0x2000u)
+#define     USB_CFIFOCTR_BCLR               (0x4000u)
+#define     USB_CFIFOCTR_BVAL               (0x8000u)
+
+#define     USB_CFIFOCTR_DTLN_SHIFT         (0)
+/* #define  USB_CFIFOCTR_RESERVED_SHIFT     (12) */
+#define     USB_CFIFOCTR_FRDY_SHIFT         (13)
+#define     USB_CFIFOCTR_BCLR_SHIFT         (14)
+#define     USB_CFIFOCTR_BVAL_SHIFT         (15)
+
+/*==============================================*/
+/* DnFIFOCTR                                    */
+/*==============================================*/
+#define     USB_DnFIFOCTR_DTLN              (0x0FFFu)
+/* #define  USB_DnFIFOCTR_RESERVED          (0x1000u) */
+#define     USB_DnFIFOCTR_FRDY              (0x2000u)
+#define     USB_DnFIFOCTR_BCLR              (0x4000u)
+#define     USB_DnFIFOCTR_BVAL              (0x8000u)
+
+#define     USB_DnFIFOCTR_DTLN_SHIFT        (0)
+/* #define  USB_DnFIFOCTR_RESERVED_SHIFT    (12) */
+#define     USB_DnFIFOCTR_FRDY_SHIFT        (13)
+#define     USB_DnFIFOCTR_BCLR_SHIFT        (14)
+#define     USB_DnFIFOCTR_BVAL_SHIFT        (15)
+
+/*==============================================*/
+/* INTENB0                                      */
+/*==============================================*/
+/* #define  USB_INTENB0_RESERVED            (0x00FFu) */
+#define     USB_INTENB0_BRDYE               (0x0100u)
+#define     USB_INTENB0_NRDYE               (0x0200u)
+#define     USB_INTENB0_BEMPE               (0x0400u)
+#define     USB_INTENB0_CTRE                (0x0800u)
+#define     USB_INTENB0_DVSE                (0x1000u)
+#define     USB_INTENB0_SOFE                (0x2000u)
+#define     USB_INTENB0_RSME                (0x4000u)
+#define     USB_INTENB0_VBSE                (0x8000u)
+
+/* #define  USB_INTENB0_RESERVED_SHIFT      (0) */
+#define     USB_INTENB0_BRDYE_SHIFT         (8)
+#define     USB_INTENB0_NRDYE_SHIFT         (9)
+#define     USB_INTENB0_BEMPE_SHIFT         (10)
+#define     USB_INTENB0_CTRE_SHIFT          (11)
+#define     USB_INTENB0_DVSE_SHIFT          (12)
+#define     USB_INTENB0_SOFE_SHIFT          (13)
+#define     USB_INTENB0_RSME_SHIFT          (14)
+#define     USB_INTENB0_VBSE_SHIFT          (15)
+
+/*==============================================*/
+/* INTENB1                                      */
+/*==============================================*/
+/* #define  USB_INTENB1_RESERVED1           (0x000Fu) */
+#define     USB_INTENB1_SACKE               (0x0010u)
+#define     USB_INTENB1_SIGNE               (0x0020u)
+#define     USB_INTENB1_EOFERRE             (0x0040u)
+/* #define  USB_INTENB1_RESERVED2           (0x0780u) */
+#define     USB_INTENB1_ATTCHE              (0x0800u)
+#define     USB_INTENB1_DTCHE               (0x1000u)
+/* #define  USB_INTENB1_RESERVED3           (0x2000u) */
+#define     USB_INTENB1_BCHGE               (0x4000u)
+/* #define  USB_INTENB1_RESERVED4           (0x8000u) */
+
+/* #define  USB_INTENB1_RESERVED1_SHIFT     (0) */
+#define     USB_INTENB1_SACKE_SHIFT         (4)
+#define     USB_INTENB1_SIGNE_SHIFT         (5)
+#define     USB_INTENB1_EOFERRE_SHIFT       (6)
+/* #define  USB_INTENB1_RESERVED2_SHIFT     (7) */
+#define     USB_INTENB1_ATTCHE_SHIFT        (11)
+#define     USB_INTENB1_DTCHE_SHIFT         (12)
+/* #define  USB_INTENB1_RESERVED3_SHIFT     (13) */
+#define     USB_INTENB1_BCHGE_SHIFT         (14)
+/* #define  USB_INTENB1_RESERVED4_SHIFT     (15) */
+
+/*==============================================*/
+/* BRDYENB                                      */
+/*==============================================*/
+#define     USB_BRDYENB                     (0xFFFFu)
+
+#define     USB_BRDYENB_SHIFT               (0)
+
+/*==============================================*/
+/* NRDYENB                                      */
+/*==============================================*/
+#define     USB_NRDYENB                     (0xFFFFu)
+
+#define     USB_NRDYENB_SHIFT               (0)
+
+/*==============================================*/
+/* BEMPENB                                      */
+/*==============================================*/
+#define     USB_BEMPENB                     (0xFFFFu)
+
+#define     USB_BEMPENB_SHIFT               (0)
+
+/*==============================================*/
+/* SOFCFG                                       */
+/*==============================================*/
+/* #define  USB_SOFCFG_RESERVED1            (0x003Fu) */
+#define     USB_SOFCFG_BRDYM                (0x0040u)
+/* #define  USB_SOFCFG_RESERVED2            (0x0080u) */
+#define     USB_SOFCFG_TRNENSEL             (0x0100u)
+/* #define  USB_SOFCFG_RESERVED3            (0xFE00u) */
+
+/* #define  USB_SOFCFG_RESERVED1_SHIFT      (0) */
+#define     USB_SOFCFG_BRDYM_SHIFT          (6)
+/* #define  USB_SOFCFG_RESERVED2_SHIFT      (7) */
+#define     USB_SOFCFG_TRNENSEL_SHIFT       (8)
+/* #define  USB_SOFCFG_RESERVED3_SHIFT      (9) */
+
+/*==============================================*/
+/* INTSTS0                                      */
+/*==============================================*/
+#define     USB_INTSTS0_CTSQ                (0x0007u)
+#define     USB_INTSTS0_VALID               (0x0008u)
+#define     USB_INTSTS0_DVSQ                (0x0070u)
+#define     USB_INTSTS0_VBSTS               (0x0080u)
+#define     USB_INTSTS0_BRDY                (0x0100u)
+#define     USB_INTSTS0_NRDY                (0x0200u)
+#define     USB_INTSTS0_BEMP                (0x0400u)
+#define     USB_INTSTS0_CTRT                (0x0800u)
+#define     USB_INTSTS0_DVST                (0x1000u)
+#define     USB_INTSTS0_SOFR                (0x2000u)
+#define     USB_INTSTS0_RESM                (0x4000u)
+#define     USB_INTSTS0_VBINT               (0x8000u)
+
+#define     USB_INTSTS0_CTSQ_SHIFT          (0)
+#define     USB_INTSTS0_VALID_SHIFT         (3)
+#define     USB_INTSTS0_DVSQ_SHIFT          (4)
+#define     USB_INTSTS0_VBSTS_SHIFT         (7)
+#define     USB_INTSTS0_BRDY_SHIFT          (8)
+#define     USB_INTSTS0_NRDY_SHIFT          (9)
+#define     USB_INTSTS0_BEMP_SHIFT          (10)
+#define     USB_INTSTS0_CTRT_SHIFT          (11)
+#define     USB_INTSTS0_DVST_SHIFT          (12)
+#define     USB_INTSTS0_SOFR_SHIFT          (13)
+#define     USB_INTSTS0_RESM_SHIFT          (14)
+#define     USB_INTSTS0_VBINT_SHIFT         (15)
+
+/*==============================================*/
+/* INTSTS1                                      */
+/*==============================================*/
+/* #define  USB_INTSTS1_RESERVED1           (0x000Fu) */
+#define     USB_INTSTS1_SACK                (0x0010u)
+#define     USB_INTSTS1_SIGN                (0x0020u)
+#define     USB_INTSTS1_EOFERR              (0x0040u)
+/* #define  USB_INTSTS1_RESERVED2           (0x0780u) */
+#define     USB_INTSTS1_ATTCH               (0x0800u)
+#define     USB_INTSTS1_DTCH                (0x1000u)
+/* #define  USB_INTSTS1_RESERVED3           (0x2000u) */
+#define     USB_INTSTS1_BCHG                (0x4000u)
+/* #define  USB_INTSTS1_RESERVED4           (0x8000u) */
+
+/* #define  USB_INTSTS1_RESERVED1_SHIFT     (0) */
+#define     USB_INTSTS1_SACK_SHIFT          (4)
+#define     USB_INTSTS1_SIGN_SHIFT          (5)
+#define     USB_INTSTS1_EOFERR_SHIFT        (6)
+/* #define  USB_INTSTS1_RESERVED2_SHIFT     (7) */
+#define     USB_INTSTS1_ATTCH_SHIFT         (11)
+#define     USB_INTSTS1_DTCH_SHIFT          (12)
+/* #define  USB_INTSTS1_RESERVED3_SHIFT     (13) */
+#define     USB_INTSTS1_BCHG_SHIFT          (14)
+/* #define  USB_INTSTS1_RESERVED4_SHIFT     (15) */
+
+/*==============================================*/
+/* BRDYSTS                                      */
+/*==============================================*/
+#define     USB_BRDYSTS                     (0xFFFFu)
+
+#define     USB_BRDYSTS_SHIFT               (0)
+
+/*==============================================*/
+/* NRDYSTS                                      */
+/*==============================================*/
+#define     USB_NRDYSTS                     (0xFFFFu)
+
+#define     USB_NRDYSTS_SHIFT               (0)
+
+/*==============================================*/
+/* BEMPSTS                                      */
+/*==============================================*/
+#define     USB_BEMPSTS                     (0xFFFFu)
+
+#define     USB_BEMPSTS_SHIFT               (0)
+
+/*==============================================*/
+/* FRMNUM                                       */
+/*==============================================*/
+#define     USB_FRMNUM_FRNM                 (0x07FFu)
+/* #define  USB_FRMNUM_RESERVED             (0x3800u) */
+#define     USB_FRMNUM_CRCE                 (0x4000u)
+#define     USB_FRMNUM_OVRN                 (0x8000u)
+
+#define     USB_FRMNUM_FRNM_SHIFT           (0)
+/* #define  USB_FRMNUM_RESERVED_SHIFT       (11) */
+#define     USB_FRMNUM_CRCE_SHIFT           (14)
+#define     USB_FRMNUM_OVRN_SHIFT           (15)
+
+/*==============================================*/
+/* UFRMNUM                                      */
+/*==============================================*/
+#define     USB_UFRMNUM_UFRNM               (0x0007u)
+/* #define  USB_UFRMNUM_RESERVED            (0xFFF8u) */
+
+#define     USB_UFRMNUM_UFRNM_SHIFT         (0)
+/* #define  USB_UFRMNUM_RESERVED_SHIFT      (3) */
+
+/*==============================================*/
+/* USBADDR                                      */
+/*==============================================*/
+#define     USB_USBADDR_USBADDR             (0x007Fu)
+/* #define  USB_USBADDR_RESERVED            (0xFF80u) */
+
+#define     USB_USBADDR_USBADDR_SHIFT       (0)
+/* #define  USB_USBADDR_RESERVED_SHIFT      (7) */
+
+/*==============================================*/
+/* USBREQ                                       */
+/*==============================================*/
+#define     USB_USBREQ_BMREQUESTTYPE        (0x00FFu)
+#define     USB_USBREQ_BREQUEST             (0xFF00u)
+
+#define     USB_USBREQ_BMREQUESTTYPE_SHIFT  (0)
+#define     USB_USBREQ_BREQUEST_SHIFT       (8)
+
+/*==============================================*/
+/* USBVAL                                       */
+/*==============================================*/
+#define     USB_USBVAL                      (0xFFFFu)
+
+#define     USB_USBVAL_SHIFT                (0)
+
+/*==============================================*/
+/* USBINDX                                      */
+/*==============================================*/
+#define     USB_USBINDX                     (0xFFFFu)
+
+#define     USB_USBINDX_SHIFT               (0)
+
+/*==============================================*/
+/* USBLENG                                      */
+/*==============================================*/
+#define     USB_USBLENG                     (0xFFFFu)
+
+#define     USB_USBLENG_SHIFT               (0)
+
+/*==============================================*/
+/* DCPCFG                                       */
+/*==============================================*/
+/* #define  USB_DCPCFG_RESERVED1            (0x000Fu) */
+#define     USB_DCPCFG_DIR                  (0x0010u)
+/* #define  USB_DCPCFG_RESERVED2            (0x0060u) */
+#define     USB_DCPCFG_SHTNAK               (0x0080u)
+#define     USB_DCPCFG_CNTMD                (0x0100u)
+/* #define  USB_DCPCFG_RESERVED3            (0xFE00u) */
+
+/* #define  USB_DCPCFG_RESERVED1_SHIFT      (0) */
+#define     USB_DCPCFG_DIR_SHIFT            (4)
+/* #define  USB_DCPCFG_RESERVED2_SHIFT      (5) */
+#define     USB_DCPCFG_SHTNK_SHIFT          (7)
+#define     USB_DCPCFG_CNTMD_SHIFT          (8)
+/* #define  USB_DCPCFG_RESERVED3            (9) */
+
+/*==============================================*/
+/* DCPMAXP                                      */
+/*==============================================*/
+#define     USB_DCPMAXP_MXPS                (0x007Fu)
+/* #define  USB_DCPMAXP_RESERVED            (0x0F80u) */
+#define     USB_DCPMAXP_DEVSEL              (0xF000u)
+
+#define     USB_DCPMAXP_MXPS_SHIFT          (0)
+/* #define  USB_DCPMAXP_RESERVED_SHIFT      (7) */
+#define     USB_DCPMAXP_DEVSEL_SHIFT        (12)
+
+/*==============================================*/
+/* DCPCTR                                       */
+/*==============================================*/
+#define     USB_DCPCTR_PID                  (0x0003u)
+#define     USB_DCPCTR_CCPL                 (0x0004u)
+/* #define  USB_DCPCTR_RESERVED1            (0x0008u) */
+#define     USB_DCPCTR_PINGE                (0x0010u)
+#define     USB_DCPCTR_PBUSY                (0x0020u)
+#define     USB_DCPCTR_SQMON                (0x0040u)
+#define     USB_DCPCTR_SQSET                (0x0080u)
+#define     USB_DCPCTR_SQCLR                (0x0100u)
+/* #define  USB_DCPCTR_RESERVED2            (0x0600u) */
+#define     USB_DCPCTR_SUREQCLR             (0x0800u)
+#define     USB_DCPCTR_CSSTS                (0x1000u)
+#define     USB_DCPCTR_CSCLR                (0x2000u)
+#define     USB_DCPCTR_SUREQ                (0x4000u)
+#define     USB_DCPCTR_BSTS                 (0x8000u)
+
+#define     USB_DCPCTR_PID_SHIFT            (0)
+#define     USB_DCPCTR_CCPL_SHIFT           (2)
+/* #define  USB_DCPCTR_RESERVED1_SHIFT      (3) */
+#define     USB_DCPCTR_PINGE_SHIFT          (4)
+#define     USB_DCPCTR_PBUSY_SHIFT          (5)
+#define     USB_DCPCTR_SQMON_SHIFT          (6)
+#define     USB_DCPCTR_SQSET_SHIFT          (7)
+#define     USB_DCPCTR_SQCLR_SHIFT          (8)
+/* #define  USB_DCPCTR_RESERVED2_SHIFT      (9) */
+#define     USB_DCPCTR_SUREQCLR_SHIFT       (11)
+#define     USB_DCPCTR_CSSTS_SHIFT          (12)
+#define     USB_DCPCTR_CSCLR_SHIFT          (13)
+#define     USB_DCPCTR_SUREQ_SHIFT          (14)
+#define     USB_DCPCTR_BSTS_SHIFT           (15)
+
+/*==============================================*/
+/* PIPESEL                                      */
+/*==============================================*/
+#define     USB_PIPESEL_PIPESEL             (0x000Fu)
+/* #define  USB_PIPESEL_RESERVED            (0xFFF0u) */
+
+#define     USB_PIPESEL_PIPESEL_SHIFT       (0)
+/* #define  USB_PIPESEL_RESERVED_SHIFT      (4) */
+
+/*==============================================*/
+/* PIPECFG                                      */
+/*==============================================*/
+#define     USB_PIPECFG_EPNUM               (0x000Fu)
+#define     USB_PIPECFG_DIR                 (0x0010u)
+/* #define  USB_PIPECFG_RESERVED1           (0x0060u) */
+#define     USB_PIPECFG_SHTNAK              (0x0080u)
+#define     USB_PIPECFG_CNTMD               (0x0100u)
+#define     USB_PIPECFG_DBLB                (0x0200u)
+#define     USB_PIPECFG_BFRE                (0x0400u)
+/* #define  USB_PIPECFG_RESERVED2           (0x3800u) */
+#define     USB_PIPECFG_TYPE                (0xC000u)
+
+#define     USB_PIPECFG_EPNUM_SHIFT         (0)
+#define     USB_PIPECFG_DIR_SHIFT           (4)
+/* #define  USB_PIPECFG_RESERVED1_SHIFT     (5) */
+#define     USB_PIPECFG_SHTNAK_SHIFT        (7)
+#define     USB_PIPECFG_CNTMD_SHIFT         (8)
+#define     USB_PIPECFG_DBLB_SHIFT          (9)
+#define     USB_PIPECFG_BFRE_SHIFT          (10)
+/* #define  USB_PIPECFG_RESERVED2_SHIFT     (11) */
+#define     USB_PIPECFG_TYPE_SHIFT          (14)
+
+/*==============================================*/
+/* PIPEBUF                                      */
+/*==============================================*/
+#define     USB_PIPEBUF_BUFNMB              (0x00FFu)
+/* #define  USB_PIPEBUF_RESERVED1           (0x0300u) */
+#define     USB_PIPEBUF_BUFSIZE             (0x7C00u)
+/* #define  USB_PIPEBUF_RESERVED2           (0x8000u) */
+
+#define     USB_PIPEBUF_BUFNMB_SHIFT        (0)
+/* #define  USB_PIPEBUF_RESERVED1_SHIFT     (8) */
+#define     USB_PIPEBUF_BUFSIZE_SHIFT       (10)
+/* #define  USB_PIPEBUF_RESERVED2_SHIFT     (15) */
+
+/*==============================================*/
+/* PIPEMAXP                                     */
+/*==============================================*/
+#define     USB_PIPEMAXP_MXPS               (0x07FFu)
+/* #define  USB_PIPEMAXP_RESERVED           (0x0800u) */
+#define     USB_PIPEMAXP_DEVSEL             (0xF000u)
+
+#define     USB_PIPEMAXP_MXPS_SHIFT         (0)
+/* #define  USB_PIPEMAXP_RESERVED_SHIFT     (11) */
+#define     USB_PIPEMAXP_DEVSEL_SHIFT       (12)
+
+/*==============================================*/
+/* PIPEPERI                                     */
+/*==============================================*/
+#define     USB_PIPEPERI_IITV               (0x0007u)
+/* #define  USB_PIPEPERI_RESERVED1          (0x0FF8u) */
+#define     USB_PIPEPERI_IFIS               (0x1000u)
+/* #define  USB_PIPEPERI_RESERVED2          (0xE000u) */
+
+#define     USB_PIPEPERI_IITV_SHIFT         (0)
+/* #define  USB_PIPEPERI_RESERVED1_SHIFT    (3) */
+#define     USB_PIPEPERI_IFIS_SHIFT         (12)
+/* #define  USB_PIPEPERI_RESERVED2_SHIFT    (13) */
+
+/*==============================================*/
+/* PIPEnCTR_1_5                                 */
+/*==============================================*/
+#define     USB_PIPEnCTR_1_5_PID                (0x0003u)
+/* #define  USB_PIPEnCTR_1_5_RESERVED1          (0x001Cu) */
+#define     USB_PIPEnCTR_1_5_PBUSY              (0x0020u)
+#define     USB_PIPEnCTR_1_5_SQMON              (0x0040u)
+#define     USB_PIPEnCTR_1_5_SQSET              (0x0080u)
+#define     USB_PIPEnCTR_1_5_SQCLR              (0x0100u)
+#define     USB_PIPEnCTR_1_5_ACLRM              (0x0200u)
+#define     USB_PIPEnCTR_1_5_ATREPM             (0x0400u)
+/* #define  USB_PIPEnCTR_1_5_RESERVED2          (0x0800u) */
+#define     USB_PIPEnCTR_1_5_CSSTS              (0x1000u)
+#define     USB_PIPEnCTR_1_5_CSCLR              (0x2000u)
+#define     USB_PIPEnCTR_1_5_INBUFM             (0x4000u)
+#define     USB_PIPEnCTR_1_5_BSTS               (0x8000u)
+
+#define     USB_PIPEnCTR_1_5_PID_SHIFT          (0)
+/* #define  USB_PIPEnCTR_1_5_RESERVED1_SHIFT    (2) */
+#define     USB_PIPEnCTR_1_5_PBUSY_SHIFT        (5)
+#define     USB_PIPEnCTR_1_5_SQMON_SHIFT        (6)
+#define     USB_PIPEnCTR_1_5_SQSET_SHIFT        (7)
+#define     USB_PIPEnCTR_1_5_SQCLR_SHIFT        (8)
+#define     USB_PIPEnCTR_1_5_ACLRM_SHIFT        (9)
+#define     USB_PIPEnCTR_1_5_ATREPM_SHIFT       (10)
+/* #define  USB_PIPEnCTR_1_5_RESERVED2_SHIFT    (11) */
+#define     USB_PIPEnCTR_1_5_CSSTS_SHIFT        (12)
+#define     USB_PIPEnCTR_1_5_CSCLR_SHIFT        (13)
+#define     USB_PIPEnCTR_1_5_INBUFM_SHIFT       (14)
+#define     USB_PIPEnCTR_1_5_BSTS_SHIFT         (15)
+
+/*==============================================*/
+/* PIPEnCTR_6_8                                 */
+/*==============================================*/
+#define     USB_PIPEnCTR_6_8_PID                (0x0003u)
+/* #define  USB_PIPEnCTR_6_8_RESERVED1          (0x001Cu) */
+#define     USB_PIPEnCTR_6_8_PBUSY              (0x0020u)
+#define     USB_PIPEnCTR_6_8_SQMON              (0x0040u)
+#define     USB_PIPEnCTR_6_8_SQSET              (0x0080u)
+#define     USB_PIPEnCTR_6_8_SQCLR              (0x0100u)
+#define     USB_PIPEnCTR_6_8_ACLRM              (0x0200u)
+/* #define  USB_PIPEnCTR_6_8_RESERVED2          (0x0C00u) */
+#define     USB_PIPEnCTR_6_8_CSSTS              (0x1000u)
+#define     USB_PIPEnCTR_6_8_CSCLR              (0x2000u)
+/* #define  USB_PIPEnCTR_6_8_RESERVED3          (0x4000u) */
+#define     USB_PIPEnCTR_6_8_BSTS               (0x8000u)
+
+#define     USB_PIPEnCTR_6_8_PID_SHIFT          (0)
+/* #define  USB_PIPEnCTR_6_8_RESERVED1_SHIFT    (2) */
+#define     USB_PIPEnCTR_6_8_PBUSY_SHIFT        (5)
+#define     USB_PIPEnCTR_6_8_SQMON_SHIFT        (6)
+#define     USB_PIPEnCTR_6_8_SQSET_SHIFT        (7)
+#define     USB_PIPEnCTR_6_8_SQCLR_SHIFT        (8)
+#define     USB_PIPEnCTR_6_8_ACLRM_SHIFT        (9)
+/* #define  USB_PIPEnCTR_6_8_RESERVED2_SHIFT    (10) */
+#define     USB_PIPEnCTR_6_8_CSSTS_SHIFT        (12)
+#define     USB_PIPEnCTR_6_8_CSCLR_SHIFT        (13)
+/* #define  USB_PIPEnCTR_6_8_RESERVED3_SHIFT    (14) */
+#define     USB_PIPEnCTR_6_8_BSTS_SHIFT         (15)
+
+/*==============================================*/
+/* PIPEnCTR_9                                   */
+/*==============================================*/
+#define     USB_PIPEnCTR_9_PID                  (0x0003u)
+/* #define  USB_PIPEnCTR_9_RESERVED1            (0x001Cu) */
+#define     USB_PIPEnCTR_9_PBUSY                (0x0020u)
+#define     USB_PIPEnCTR_9_SQMON                (0x0040u)
+#define     USB_PIPEnCTR_9_SQSET                (0x0080u)
+#define     USB_PIPEnCTR_9_SQCLR                (0x0100u)
+#define     USB_PIPEnCTR_9_ACLRM                (0x0200u)
+#define     USB_PIPEnCTR_9_ATREPM               (0x0400u)
+/* #define  USB_PIPEnCTR_9_RESERVED2            (0x0800u) */
+#define     USB_PIPEnCTR_9_CSSTS                (0x1000u)
+#define     USB_PIPEnCTR_9_CSCLR                (0x2000u)
+#define     USB_PIPEnCTR_9_INBUFM               (0x4000u)
+#define     USB_PIPEnCTR_9_BSTS                 (0x8000u)
+
+#define     USB_PIPEnCTR_9_PID_SHIFT            (0)
+/* #define  USB_PIPEnCTR_9_RESERVED1_SHIFT      (2) */
+#define     USB_PIPEnCTR_9_PBUSY_SHIFT          (5)
+#define     USB_PIPEnCTR_9_SQMON_SHIFT          (6)
+#define     USB_PIPEnCTR_9_SQSET_SHIFT          (7)
+#define     USB_PIPEnCTR_9_SQCLR_SHIFT          (8)
+#define     USB_PIPEnCTR_9_ACLRM_SHIFT          (9)
+#define     USB_PIPEnCTR_9_ATREPM_SHIFT         (10)
+/* #define  USB_PIPEnCTR_9_RESERVED2_SHIFT      (11) */
+#define     USB_PIPEnCTR_9_CSSTS_SHIFT          (12)
+#define     USB_PIPEnCTR_9_CSCLR_SHIFT          (13)
+#define     USB_PIPEnCTR_9_INBUFM_SHIFT         (14)
+#define     USB_PIPEnCTR_9_BSTS_SHIFT           (15)
+
+/*==============================================*/
+/* PIPEnCTR_A_F                                 */
+/*==============================================*/
+#define     USB_PIPEnCTR_A_F_PID                (0x0003u)
+/* #define  USB_PIPEnCTR_A_F_RESERVED1          (0x001Cu) */
+#define     USB_PIPEnCTR_A_F_PBUSY              (0x0020u)
+#define     USB_PIPEnCTR_A_F_SQMON              (0x0040u)
+#define     USB_PIPEnCTR_A_F_SQSET              (0x0080u)
+#define     USB_PIPEnCTR_A_F_SQCLR              (0x0100u)
+#define     USB_PIPEnCTR_A_F_ACLRM              (0x0200u)
+#define     USB_PIPEnCTR_A_F_ATREPM             (0x0400u)
+/* #define  USB_PIPEnCTR_A_F_RESERVED2          (0x3800u) */
+#define     USB_PIPEnCTR_A_F_INBUFM             (0x4000u)
+#define     USB_PIPEnCTR_A_F_BSTS               (0x8000u)
+
+#define     USB_PIPEnCTR_A_F_PID_SHIFT          (0)
+/* #define  USB_PIPEnCTR_A_F_RESERVED1_SHIFT    (2) */
+#define     USB_PIPEnCTR_A_F_PBUSY_SHIFT        (5)
+#define     USB_PIPEnCTR_A_F_SQMON_SHIFT        (6)
+#define     USB_PIPEnCTR_A_F_SQSET_SHIFT        (7)
+#define     USB_PIPEnCTR_A_F_SQCLR_SHIFT        (8)
+#define     USB_PIPEnCTR_A_F_ACLRM_SHIFT        (9)
+#define     USB_PIPEnCTR_A_F_ATREPM_SHIFT       (10)
+/* #define  USB_PIPEnCTR_A_F_RESERVED2_SHIFT    (11) */
+#define     USB_PIPEnCTR_A_F_INBUFM_SHIFT       (14)
+#define     USB_PIPEnCTR_A_F_BSTS_SHIFT         (15)
+
+/*==============================================*/
+/* PIPEnTRE                                     */
+/*==============================================*/
+/* #define  USB_PIPEnTRE_RESERVED1              (0x00FFu) */
+#define     USB_PIPEnTRE_TRCLR                  (0x0100u)
+#define     USB_PIPEnTRE_TRENB                  (0x0200u)
+/* #define  USB_PIPEnTRE_RESERVED2              (0xFC00u) */
+
+/* #define  USB_PIPEnTRE_RESERVED1_SHIFT        (0) */
+#define     USB_PIPEnTRE_TRCLR_SHIFT            (8)
+#define     USB_PIPEnTRE_TRENB_SHIFT            (9)
+/* #define  USB_PIPEnTRE_RESERVED2_SHIFT        (10) */
+
+/*==============================================*/
+/* PIPEnTRN                                     */
+/*==============================================*/
+#define     USB_PIPEnTRN                        (0xFFFFu)
+
+#define     USB_PIPEnTRN_SHIFT                  (0)
+
+/*==============================================*/
+/* DEVADDn                                      */
+/*==============================================*/
+/* #define  USB_DEVADDn_RESERVED1               (0x003Fu) */
+#define     USB_DEVADDn_USBSPD                  (0x00C0u)
+#define     USB_DEVADDn_HUBPORT                 (0x0700u)
+#define     USB_DEVADDn_UPPHUB                  (0x7800u)
+/* #define  USB_DEVADDn_RESERVED2               (0x8000u) */
+
+/* #define  USB_DEVADDn_RESERVED1_SHIFT         (0) */
+#define     USB_DEVADDn_USBSPD_SHIFT            (6)
+#define     USB_DEVADDn_HUBPORT_SHIFT           (8)
+#define     USB_DEVADDn_UPPHUB_SHIFT            (11)
+/* #define  USB_DEVADDn_RESERVED2_SHIFT         (15) */
+
+/*==============================================*/
+/* SUSPMODE                                     */
+/*==============================================*/
+/* #define  USB_SUSPMODE_RESERVED1              (0x3FFFu) */
+#define     USB_SUSPMODE_SUSPM                  (0x4000u)
+/* #define  USB_SUSPMODE_RESERVED2              (0x8000u) */
+
+/* #define  USB_SUSPMODE_RESERVED1_SHIFT        (0) */
+#define     USB_SUSPMODE_SUSPM_SHIFT            (14)
+/* #define  USB_SUSPMODE_RESERVED2_SHIFT        (15) */
+
+/*==============================================*/
+/* DnFIFOBm                                     */
+/*==============================================*/
+#define     USB_DnFIFOBm                        (0xFFFFu)
+
+#define     USB_DnFIFOBm_SHIFT                  (0)
+
+#endif /* USB_IOBITMASK_H */
+
+/* End of File */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefine.h	(revision 270)
@@ -0,0 +1,136 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef R7S72100_IODEFINE_H
+#define R7S72100_IODEFINE_H
+#define IODEFINE_H_VERSION  100
+
+enum iodefine_byte_select_t
+{
+    L = 0, H = 1,
+    LL= 0, LH = 1, HL = 2, HH = 3
+};
+
+/***********************************************************************
+  <<< [iodefine_reg32_t] >>> 
+- Padding : sizeof(iodefine_reg32_t) == 4
+- Alignment(Offset) : &UINT32==0, &UINT16[0]==0, &UINT16[1]==2
+-                     &UINT8[0]==0, &UINT8[1]==1, &UINT8[2]==2, &UINT8[3]==3
+- Endian : Independent (Same as CPU endian as register endian)
+- Bit-Order : Independent
+************************************************************************/
+/* ->MISRA 18.4 : Pack unpack union */ /* ->SEC M1.6.2 */
+/* ->SEC M1.10.1 : Not magic number */
+union iodefine_reg32_t
+{
+    volatile uint32_t  UINT32;                                  /*  32-bit Access   */
+    volatile uint16_t  UINT16[2];                               /*  16-bit Access   */
+    volatile uint8_t   UINT8[4];                                /*  8-bit Access    */
+};
+/* <-SEC M1.10.1 */
+/* <-MISRA 18.4 */ /* <-SEC M1.6.2 */
+
+/***********************************************************************
+  <<< [iodefine_reg32_16_t] >>> 
+- Padding : sizeof(iodefine_reg32_16_t) == 4
+- Alignment(Offset) : &UINT32==0, &UINT16[0]==0, &UINT16[1]==2
+- Endian : Independent (Same as CPU endian as register endian)
+- Bit-Order : Independent
+************************************************************************/
+/* ->MISRA 18.4 : Pack unpack union */ /* ->SEC M1.6.2 */
+/* ->SEC M1.10.1 : Not magic number */
+union iodefine_reg32_16_t
+{
+    volatile uint32_t  UINT32;                                  /*  32-bit Access   */
+    volatile uint16_t  UINT16[2];                               /*  16-bit Access   */
+};
+/* <-SEC M1.10.1 */
+/* <-MISRA 18.4 */ /* <-SEC M1.6.2 */
+
+/***********************************************************************
+  <<< [iodefine_reg16_8_t] >>> 
+- Padding : sizeof(iodefine_reg16_8_t) == 2
+- Alignment(Offset) : &UINT16==0, &UINT8[0]==0, &UINT8[1]==1
+- Endian : Independent (Same as CPU endian as register endian)
+- Bit-Order : Independent
+************************************************************************/
+/* ->MISRA 18.4 : Pack unpack union */ /* ->SEC M1.6.2 */
+/* ->SEC M1.10.1 : Not magic number */
+union iodefine_reg16_8_t
+{
+    volatile uint16_t  UINT16;                                  /*  16-bit Access   */
+    volatile uint8_t   UINT8[2];                                /*  8-bit Access    */
+};
+/* <-SEC M1.10.1 */
+/* <-MISRA 18.4 */ /* <-SEC M1.6.2 */
+
+
+
+
+
+
+#include "adc_iodefine.h"                             /* (V1.00a) */
+#include "bsc_iodefine.h"                             /* (V1.00a) */
+#include "ceu_iodefine.h"                             /* (V1.00a) */
+#include "cpg_iodefine.h"                             /* (V1.00a) */
+#include "disc_iodefine.h"                            /* (V1.00a) */
+#include "dmac_iodefine.h"                            /* (V1.00a) */
+#include "dvdec_iodefine.h"                           /* (V1.00a) */
+#include "ether_iodefine.h"                           /* (V1.00a) */
+#include "flctl_iodefine.h"                           /* (V1.00a) */
+#include "gpio_iodefine.h"                            /* (V1.00a) */
+#include "ieb_iodefine.h"                             /* (V1.00a) */
+#include "inb_iodefine.h"                             /* (V1.00a) */
+#include "intc_iodefine.h"                            /* (V1.00a) */
+#include "irda_iodefine.h"                            /* (V1.00a) */
+#include "jcu_iodefine.h"                             /* (V1.00a) */
+#include "l2c_iodefine.h"                             /* (V1.00a) */
+#include "lin_iodefine.h"                             /* (V1.00a) */
+#include "lvds_iodefine.h"                            /* (V1.00a) */
+#include "mlb_iodefine.h"                             /* (V1.00a) */
+#include "mmc_iodefine.h"                             /* (V1.00a) */
+#include "mtu2_iodefine.h"                            /* (V1.00a) */
+#include "ostm_iodefine.h"                            /* (V1.00a) */
+#include "pfv_iodefine.h"                             /* (V1.00a) */
+#include "pwm_iodefine.h"                             /* (V1.00a) */
+#include "riic_iodefine.h"                            /* (V1.00a) */
+#include "romdec_iodefine.h"                          /* (V1.00a) */
+#include "rscan0_iodefine.h"                          /* (V1.00a) */
+#include "rspi_iodefine.h"                            /* (V1.00a) */
+#include "rtc_iodefine.h"                             /* (V1.00a) */
+#include "scif_iodefine.h"                            /* (V1.00a) */
+#include "scim_iodefine.h"                            /* (V1.00a) */
+#include "scux_iodefine.h"                            /* (V1.00a) */
+#include "sdg_iodefine.h"                             /* (V1.00a) */
+#include "spdif_iodefine.h"                           /* (V1.00a) */
+#include "spibsc_iodefine.h"                          /* (V1.00a) */
+#include "ssif_iodefine.h"                            /* (V1.00a) */
+#include "usb20_iodefine.h"                           /* (V1.00a) */
+#include "vdc5_iodefine.h"                            /* (V1.00a) */
+#include "wdt_iodefine.h"                             /* (V1.00a) */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/adc_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/adc_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/adc_iodefine.h	(revision 270)
@@ -0,0 +1,98 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : adc_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef ADC_IODEFINE_H
+#define ADC_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_adc
+{                                                          /* ADC              */
+    volatile uint16_t ADDRA;                                  /*  ADDRA           */
+    volatile uint16_t ADDRB;                                  /*  ADDRB           */
+    volatile uint16_t ADDRC;                                  /*  ADDRC           */
+    volatile uint16_t ADDRD;                                  /*  ADDRD           */
+    volatile uint16_t ADDRE;                                  /*  ADDRE           */
+    volatile uint16_t ADDRF;                                  /*  ADDRF           */
+    volatile uint16_t ADDRG;                                  /*  ADDRG           */
+    volatile uint16_t ADDRH;                                  /*  ADDRH           */
+    volatile uint8_t   dummy32[16];                            /*                  */
+    volatile uint16_t ADCMPHA;                                /*  ADCMPHA         */
+    volatile uint16_t ADCMPLA;                                /*  ADCMPLA         */
+    volatile uint16_t ADCMPHB;                                /*  ADCMPHB         */
+    volatile uint16_t ADCMPLB;                                /*  ADCMPLB         */
+    volatile uint16_t ADCMPHC;                                /*  ADCMPHC         */
+    volatile uint16_t ADCMPLC;                                /*  ADCMPLC         */
+    volatile uint16_t ADCMPHD;                                /*  ADCMPHD         */
+    volatile uint16_t ADCMPLD;                                /*  ADCMPLD         */
+    volatile uint16_t ADCMPHE;                                /*  ADCMPHE         */
+    volatile uint16_t ADCMPLE;                                /*  ADCMPLE         */
+    volatile uint16_t ADCMPHF;                                /*  ADCMPHF         */
+    volatile uint16_t ADCMPLF;                                /*  ADCMPLF         */
+    volatile uint16_t ADCMPHG;                                /*  ADCMPHG         */
+    volatile uint16_t ADCMPLG;                                /*  ADCMPLG         */
+    volatile uint16_t ADCMPHH;                                /*  ADCMPHH         */
+    volatile uint16_t ADCMPLH;                                /*  ADCMPLH         */
+    volatile uint8_t   dummy33[32];                            /*                  */
+    volatile uint16_t ADCSR;                                  /*  ADCSR           */
+    volatile uint16_t ADCMPER;                                /*  ADCMPER         */
+    volatile uint16_t ADCMPSR;                                /*  ADCMPSR         */
+};
+
+
+#define ADC     (*(struct st_adc     *)0xE8005800uL) /* ADC */
+
+
+#define ADCADDRA ADC.ADDRA
+#define ADCADDRB ADC.ADDRB
+#define ADCADDRC ADC.ADDRC
+#define ADCADDRD ADC.ADDRD
+#define ADCADDRE ADC.ADDRE
+#define ADCADDRF ADC.ADDRF
+#define ADCADDRG ADC.ADDRG
+#define ADCADDRH ADC.ADDRH
+#define ADCADCMPHA ADC.ADCMPHA
+#define ADCADCMPLA ADC.ADCMPLA
+#define ADCADCMPHB ADC.ADCMPHB
+#define ADCADCMPLB ADC.ADCMPLB
+#define ADCADCMPHC ADC.ADCMPHC
+#define ADCADCMPLC ADC.ADCMPLC
+#define ADCADCMPHD ADC.ADCMPHD
+#define ADCADCMPLD ADC.ADCMPLD
+#define ADCADCMPHE ADC.ADCMPHE
+#define ADCADCMPLE ADC.ADCMPLE
+#define ADCADCMPHF ADC.ADCMPHF
+#define ADCADCMPLF ADC.ADCMPLF
+#define ADCADCMPHG ADC.ADCMPHG
+#define ADCADCMPLG ADC.ADCMPLG
+#define ADCADCMPHH ADC.ADCMPHH
+#define ADCADCMPLH ADC.ADCMPLH
+#define ADCADCSR ADC.ADCSR
+#define ADCADCMPER ADC.ADCMPER
+#define ADCADCMPSR ADC.ADCMPSR
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/bsc_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/bsc_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/bsc_iodefine.h	(revision 270)
@@ -0,0 +1,99 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : bsc_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef BSC_IODEFINE_H
+#define BSC_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_bsc
+{                                                          /* BSC              */
+    volatile uint32_t  CMNCR;                                  /*  CMNCR           */
+#define BSC_CSnBCR_COUNT 6
+    volatile uint32_t  CS0BCR;                                 /*  CS0BCR          */
+    volatile uint32_t  CS1BCR;                                 /*  CS1BCR          */
+    volatile uint32_t  CS2BCR;                                 /*  CS2BCR          */
+    volatile uint32_t  CS3BCR;                                 /*  CS3BCR          */
+    volatile uint32_t  CS4BCR;                                 /*  CS4BCR          */
+    volatile uint32_t  CS5BCR;                                 /*  CS5BCR          */
+    volatile uint8_t   dummy4[12];                             /*                  */
+#define BSC_CSnWCR_COUNT 6
+    volatile uint32_t  CS0WCR;                                 /*  CS0WCR          */
+    volatile uint32_t  CS1WCR;                                 /*  CS1WCR          */
+    volatile uint32_t  CS2WCR;                                 /*  CS2WCR          */
+    volatile uint32_t  CS3WCR;                                 /*  CS3WCR          */
+    volatile uint32_t  CS4WCR;                                 /*  CS4WCR          */
+    volatile uint32_t  CS5WCR;                                 /*  CS5WCR          */
+    volatile uint8_t   dummy5[12];                             /*                  */
+    volatile uint32_t  SDCR;                                   /*  SDCR            */
+    volatile uint32_t  RTCSR;                                  /*  RTCSR           */
+    volatile uint32_t  RTCNT;                                  /*  RTCNT           */
+    volatile uint32_t  RTCOR;                                  /*  RTCOR           */
+    volatile uint8_t   dummy6[4];                              /*                  */
+#define BSC_TOSCORn_COUNT 6
+    volatile uint32_t  TOSCOR0;                                /*  TOSCOR0         */
+    volatile uint32_t  TOSCOR1;                                /*  TOSCOR1         */
+    volatile uint32_t  TOSCOR2;                                /*  TOSCOR2         */
+    volatile uint32_t  TOSCOR3;                                /*  TOSCOR3         */
+    volatile uint32_t  TOSCOR4;                                /*  TOSCOR4         */
+    volatile uint32_t  TOSCOR5;                                /*  TOSCOR5         */
+    volatile uint8_t   dummy7[8];                              /*                  */
+    volatile uint32_t  TOSTR;                                  /*  TOSTR           */
+    volatile uint32_t  TOENR;                                  /*  TOENR           */
+};
+
+
+#define BSC     (*(struct st_bsc     *)0x3FFFC000uL) /* BSC */
+
+
+#define BSCCMNCR BSC.CMNCR
+#define BSCCS0BCR BSC.CS0BCR
+#define BSCCS1BCR BSC.CS1BCR
+#define BSCCS2BCR BSC.CS2BCR
+#define BSCCS3BCR BSC.CS3BCR
+#define BSCCS4BCR BSC.CS4BCR
+#define BSCCS5BCR BSC.CS5BCR
+#define BSCCS0WCR BSC.CS0WCR
+#define BSCCS1WCR BSC.CS1WCR
+#define BSCCS2WCR BSC.CS2WCR
+#define BSCCS3WCR BSC.CS3WCR
+#define BSCCS4WCR BSC.CS4WCR
+#define BSCCS5WCR BSC.CS5WCR
+#define BSCSDCR BSC.SDCR
+#define BSCRTCSR BSC.RTCSR
+#define BSCRTCNT BSC.RTCNT
+#define BSCRTCOR BSC.RTCOR
+#define BSCTOSCOR0 BSC.TOSCOR0
+#define BSCTOSCOR1 BSC.TOSCOR1
+#define BSCTOSCOR2 BSC.TOSCOR2
+#define BSCTOSCOR3 BSC.TOSCOR3
+#define BSCTOSCOR4 BSC.TOSCOR4
+#define BSCTOSCOR5 BSC.TOSCOR5
+#define BSCTOSTR BSC.TOSTR
+#define BSCTOENR BSC.TOENR
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/ceu_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/ceu_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/ceu_iodefine.h	(revision 270)
@@ -0,0 +1,269 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : ceu_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef CEU_IODEFINE_H
+#define CEU_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_ceu
+{                                                          /* CEU              */
+/* start of struct st_ceu_n */
+    volatile uint32_t  CAPSR;                                  /*  CAPSR           */
+    volatile uint32_t  CAPCR;                                  /*  CAPCR           */
+    volatile uint32_t  CAMCR;                                  /*  CAMCR           */
+    volatile uint32_t  CMCYR;                                  /*  CMCYR           */
+    volatile uint32_t  CAMOR_A;                                /*  CAMOR_A         */
+    volatile uint32_t  CAPWR_A;                                /*  CAPWR_A         */
+    volatile uint32_t  CAIFR;                                  /*  CAIFR           */
+    volatile uint8_t   dummy305[12];                           /*                  */
+    volatile uint32_t  CRCNTR;                                 /*  CRCNTR          */
+    volatile uint32_t  CRCMPR;                                 /*  CRCMPR          */
+    volatile uint32_t  CFLCR_A;                                /*  CFLCR_A         */
+    volatile uint32_t  CFSZR_A;                                /*  CFSZR_A         */
+    volatile uint32_t  CDWDR_A;                                /*  CDWDR_A         */
+    volatile uint32_t  CDAYR_A;                                /*  CDAYR_A         */
+    volatile uint32_t  CDACR_A;                                /*  CDACR_A         */
+    volatile uint32_t  CDBYR_A;                                /*  CDBYR_A         */
+    volatile uint32_t  CDBCR_A;                                /*  CDBCR_A         */
+    volatile uint32_t  CBDSR_A;                                /*  CBDSR_A         */
+    volatile uint8_t   dummy306[12];                           /*                  */
+    volatile uint32_t  CFWCR;                                  /*  CFWCR           */
+    volatile uint32_t  CLFCR_A;                                /*  CLFCR_A         */
+    volatile uint32_t  CDOCR_A;                                /*  CDOCR_A         */
+    volatile uint8_t   dummy307[8];                            /*                  */
+    volatile uint32_t  CEIER;                                  /*  CEIER           */
+    volatile uint32_t  CETCR;                                  /*  CETCR           */
+    volatile uint8_t   dummy308[4];                            /*                  */
+    volatile uint32_t  CSTSR;                                  /*  CSTSR           */
+    volatile uint8_t   dummy309[4];                            /*                  */
+    volatile uint32_t  CDSSR;                                  /*  CDSSR           */
+    volatile uint8_t   dummy310[8];                            /*                  */
+    volatile uint32_t  CDAYR2_A;                               /*  CDAYR2_A        */
+    volatile uint32_t  CDACR2_A;                               /*  CDACR2_A        */
+    volatile uint32_t  CDBYR2_A;                               /*  CDBYR2_A        */
+    volatile uint32_t  CDBCR2_A;                               /*  CDBCR2_A        */
+/* end of struct st_ceu_n */
+    volatile uint8_t   dummy3110[3936];                        /*                  */
+/* start of struct st_ceu_n */
+    volatile uint8_t   dummy3111[4];                           /*                  */
+    volatile uint8_t   dummy3112[4];                           /*                  */
+    volatile uint8_t   dummy3113[4];                           /*                  */
+    volatile uint8_t   dummy3114[4];                           /*                  */
+    volatile uint32_t  CAMOR_B;                                /*  CAMOR_B         */
+    volatile uint32_t  CAPWR_B;                                /*  CAPWR_B         */
+    volatile uint8_t   dummy3120[4];                           /*                  */
+    volatile uint8_t   dummy3121[12];                          /*                  */
+    volatile uint8_t   dummy3122[4];                           /*                  */
+    volatile uint8_t   dummy3123[4];                           /*                  */
+    volatile uint32_t  CFLCR_B;                                /*  CFLCR_B         */
+    volatile uint32_t  CFSZR_B;                                /*  CFSZR_B         */
+    volatile uint32_t  CDWDR_B;                                /*  CDWDR_B         */
+    volatile uint32_t  CDAYR_B;                                /*  CDAYR_B         */
+    volatile uint32_t  CDACR_B;                                /*  CDACR_B         */
+    volatile uint32_t  CDBYR_B;                                /*  CDBYR_B         */
+    volatile uint32_t  CDBCR_B;                                /*  CDBCR_B         */
+    volatile uint32_t  CBDSR_B;                                /*  CBDSR_B         */
+    volatile uint8_t   dummy3130[12];                          /*                  */
+    volatile uint8_t   dummy3131[4];                           /*                  */
+    volatile uint32_t  CLFCR_B;                                /*  CLFCR_B         */
+    volatile uint32_t  CDOCR_B;                                /*  CDOCR_B         */
+    volatile uint8_t   dummy3140[8];                           /*                  */
+    volatile uint8_t   dummy3141[4];                           /*                  */
+    volatile uint8_t   dummy3142[4];                           /*                  */
+    volatile uint8_t   dummy3143[4];                           /*                  */
+    volatile uint8_t   dummy3144[4];                           /*                  */
+    volatile uint8_t   dummy3145[4];                           /*                  */
+    volatile uint8_t   dummy3146[4];                           /*                  */
+    volatile uint8_t   dummy3147[8];                           /*                  */
+    volatile uint32_t  CDAYR2_B;                               /*  CDAYR2_B        */
+    volatile uint32_t  CDACR2_B;                               /*  CDACR2_B        */
+    volatile uint32_t  CDBYR2_B;                               /*  CDBYR2_B        */
+    volatile uint32_t  CDBCR2_B;                               /*  CDBCR2_B        */
+/* end of struct st_ceu_n */
+    volatile uint8_t   dummy3150[3936];                        /*                  */
+/* start of struct st_ceu_n */
+    volatile uint8_t   dummy3151[4];                           /*                  */
+    volatile uint8_t   dummy3152[4];                           /*                  */
+    volatile uint8_t   dummy3153[4];                           /*                  */
+    volatile uint8_t   dummy3154[4];                           /*                  */
+    volatile uint32_t  CAMOR_M;                                /*  CAMOR_M         */
+    volatile uint32_t  CAPWR_M;                                /*  CAPWR_M         */
+    volatile uint8_t   dummy3160[4];                           /*                  */
+    volatile uint8_t   dummy3161[12];                          /*                  */
+    volatile uint8_t   dummy3162[4];                           /*                  */
+    volatile uint8_t   dummy3163[4];                           /*                  */
+    volatile uint32_t  CFLCR_M;                                /*  CFLCR_M         */
+    volatile uint32_t  CFSZR_M;                                /*  CFSZR_M         */
+    volatile uint32_t  CDWDR_M;                                /*  CDWDR_M         */
+    volatile uint32_t  CDAYR_M;                                /*  CDAYR_M         */
+    volatile uint32_t  CDACR_M;                                /*  CDACR_M         */
+    volatile uint32_t  CDBYR_M;                                /*  CDBYR_M         */
+    volatile uint32_t  CDBCR_M;                                /*  CDBCR_M         */
+    volatile uint32_t  CBDSR_M;                                /*  CBDSR_M         */
+    volatile uint8_t   dummy3170[12];                          /*                  */
+    volatile uint8_t   dummy3171[4];                           /*                  */
+    volatile uint32_t  CLFCR_M;                                /*  CLFCR_M         */
+    volatile uint32_t  CDOCR_M;                                /*  CDOCR_M         */
+    volatile uint8_t   dummy3180[8];                           /*                  */
+    volatile uint8_t   dummy3181[4];                           /*                  */
+    volatile uint8_t   dummy3182[4];                           /*                  */
+    volatile uint8_t   dummy3183[4];                           /*                  */
+    volatile uint8_t   dummy3184[4];                           /*                  */
+    volatile uint8_t   dummy3185[4];                           /*                  */
+    volatile uint8_t   dummy3186[4];                           /*                  */
+    volatile uint8_t   dummy3187[8];                           /*                  */
+    volatile uint32_t  CDAYR2_M;                               /*  CDAYR2_M        */
+    volatile uint32_t  CDACR2_M;                               /*  CDACR2_M        */
+    volatile uint32_t  CDBYR2_M;                               /*  CDBYR2_M        */
+    volatile uint32_t  CDBCR2_M;                               /*  CDBCR2_M        */
+/* end of struct st_ceu_n */
+};
+
+
+struct st_ceu_n
+{
+    volatile uint32_t  not_common1;                            /*                  */
+    volatile uint32_t  not_common2;                            /*                  */
+    volatile uint32_t  not_common3;                            /*                  */
+    volatile uint32_t  not_common4;                            /*                  */
+    volatile uint32_t  CAMOR;                                  /*  CAMOR           */
+    volatile uint32_t  CAPWR;                                  /*  CAPWR           */
+    volatile uint32_t  not_common5;                            /*                  */
+    volatile uint8_t   dummy322[12];                           /*                  */
+    volatile uint32_t  not_common6;                            /*                  */
+    volatile uint32_t  not_common7;                            /*                  */
+    volatile uint32_t  CFLCR;                                  /*  CFLCR           */
+    volatile uint32_t  CFSZR;                                  /*  CFSZR           */
+    volatile uint32_t  CDWDR;                                  /*  CDWDR           */
+    volatile uint32_t  CDAYR;                                  /*  CDAYR           */
+    volatile uint32_t  CDACR;                                  /*  CDACR           */
+    volatile uint32_t  CDBYR;                                  /*  CDBYR           */
+    volatile uint32_t  CDBCR;                                  /*  CDBCR           */
+    volatile uint32_t  CBDSR;                                  /*  CBDSR           */
+    volatile uint8_t   dummy323[12];                           /*                  */
+    volatile uint32_t  not_common8;                            /*                  */
+    volatile uint32_t  CLFCR;                                  /*  CLFCR           */
+    volatile uint32_t  CDOCR;                                  /*  CDOCR           */
+    volatile uint8_t   dummy324[8];                            /*                  */
+    volatile uint32_t  not_common9;                            /*                  */
+    volatile uint32_t  not_common10;                           /*                  */
+    volatile uint8_t   dummy325[4];                            /*                  */
+    volatile uint32_t  not_common11;                           /*                  */
+    volatile uint8_t   dummy326[4];                            /*                  */
+    volatile uint32_t  not_common12;                           /*                  */
+    volatile uint8_t   dummy327[8];                            /*                  */
+    volatile uint32_t  CDAYR2;                                 /*  CDAYR2          */
+    volatile uint32_t  CDACR2;                                 /*  CDACR2          */
+    volatile uint32_t  CDBYR2;                                 /*  CDBYR2          */
+    volatile uint32_t  CDBCR2;                                 /*  CDBCR2          */
+};
+
+
+#define CEU     (*(struct st_ceu     *)0xE8210000uL) /* CEU */
+
+
+/* Start of channnel array defines of CEU */
+
+/* Channnel array defines of CEUn */
+/*(Sample) value = CEUn[ channel ]->CAMOR; */
+#define CEUn_COUNT  3
+#define CEUn_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    (volatile struct st_ceu_n*)&CEU_A, \
+    (volatile struct st_ceu_n*)&CEU_B, \
+    (volatile struct st_ceu_n*)&CEU_M \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define CEU_A   (*(struct st_ceu_n *)&CEU.CAPSR)                 /* CEU_A */
+#define CEU_B   (*(struct st_ceu_n *)&CEU.dummy3111)             /* CEU_B */
+#define CEU_M   (*(struct st_ceu_n *)&CEU.dummy3151)             /* CEU_M */
+
+/* End of channnel array defines of CEU */
+
+
+#define CEUCAPSR CEU.CAPSR
+#define CEUCAPCR CEU.CAPCR
+#define CEUCAMCR CEU.CAMCR
+#define CEUCMCYR CEU.CMCYR
+#define CEUCAMOR_A CEU.CAMOR_A
+#define CEUCAPWR_A CEU.CAPWR_A
+#define CEUCAIFR CEU.CAIFR
+#define CEUCRCNTR CEU.CRCNTR
+#define CEUCRCMPR CEU.CRCMPR
+#define CEUCFLCR_A CEU.CFLCR_A
+#define CEUCFSZR_A CEU.CFSZR_A
+#define CEUCDWDR_A CEU.CDWDR_A
+#define CEUCDAYR_A CEU.CDAYR_A
+#define CEUCDACR_A CEU.CDACR_A
+#define CEUCDBYR_A CEU.CDBYR_A
+#define CEUCDBCR_A CEU.CDBCR_A
+#define CEUCBDSR_A CEU.CBDSR_A
+#define CEUCFWCR CEU.CFWCR
+#define CEUCLFCR_A CEU.CLFCR_A
+#define CEUCDOCR_A CEU.CDOCR_A
+#define CEUCEIER CEU.CEIER
+#define CEUCETCR CEU.CETCR
+#define CEUCSTSR CEU.CSTSR
+#define CEUCDSSR CEU.CDSSR
+#define CEUCDAYR2_A CEU.CDAYR2_A
+#define CEUCDACR2_A CEU.CDACR2_A
+#define CEUCDBYR2_A CEU.CDBYR2_A
+#define CEUCDBCR2_A CEU.CDBCR2_A
+#define CEUCAMOR_B CEU.CAMOR_B
+#define CEUCAPWR_B CEU.CAPWR_B
+#define CEUCFLCR_B CEU.CFLCR_B
+#define CEUCFSZR_B CEU.CFSZR_B
+#define CEUCDWDR_B CEU.CDWDR_B
+#define CEUCDAYR_B CEU.CDAYR_B
+#define CEUCDACR_B CEU.CDACR_B
+#define CEUCDBYR_B CEU.CDBYR_B
+#define CEUCDBCR_B CEU.CDBCR_B
+#define CEUCBDSR_B CEU.CBDSR_B
+#define CEUCLFCR_B CEU.CLFCR_B
+#define CEUCDOCR_B CEU.CDOCR_B
+#define CEUCDAYR2_B CEU.CDAYR2_B
+#define CEUCDACR2_B CEU.CDACR2_B
+#define CEUCDBYR2_B CEU.CDBYR2_B
+#define CEUCDBCR2_B CEU.CDBCR2_B
+#define CEUCAMOR_M CEU.CAMOR_M
+#define CEUCAPWR_M CEU.CAPWR_M
+#define CEUCFLCR_M CEU.CFLCR_M
+#define CEUCFSZR_M CEU.CFSZR_M
+#define CEUCDWDR_M CEU.CDWDR_M
+#define CEUCDAYR_M CEU.CDAYR_M
+#define CEUCDACR_M CEU.CDACR_M
+#define CEUCDBYR_M CEU.CDBYR_M
+#define CEUCDBCR_M CEU.CDBCR_M
+#define CEUCBDSR_M CEU.CBDSR_M
+#define CEUCLFCR_M CEU.CLFCR_M
+#define CEUCDOCR_M CEU.CDOCR_M
+#define CEUCDAYR2_M CEU.CDAYR2_M
+#define CEUCDACR2_M CEU.CDACR2_M
+#define CEUCDBYR2_M CEU.CDBYR2_M
+#define CEUCDBCR2_M CEU.CDBCR2_M
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/cpg_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/cpg_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/cpg_iodefine.h	(revision 270)
@@ -0,0 +1,239 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : cpg_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef CPG_IODEFINE_H
+#define CPG_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_cpg
+{                                                          /* CPG              */
+    volatile uint16_t FRQCR;                                  /*  FRQCR           */
+    volatile uint8_t   dummy319[2];                            /*                  */
+    volatile uint16_t FRQCR2;                                 /*  FRQCR2          */
+    volatile uint8_t   dummy320[2];                            /*                  */
+    volatile uint8_t   CPUSTS;                                 /*  CPUSTS          */
+    volatile uint8_t   dummy321[7];                            /*                  */
+    volatile uint8_t   STBCR1;                                 /*  STBCR1          */
+    volatile uint8_t   dummy322[3];                            /*                  */
+    volatile uint8_t   STBCR2;                                 /*  STBCR2          */
+    volatile uint8_t   dummy323[11];                           /*                  */
+    volatile uint8_t   STBREQ1;                                /*  STBREQ1         */
+    volatile uint8_t   dummy324[3];                            /*                  */
+    volatile uint8_t   STBREQ2;                                /*  STBREQ2         */
+    volatile uint8_t   dummy325[11];                           /*                  */
+    volatile uint8_t   STBACK1;                                /*  STBACK1         */
+    volatile uint8_t   dummy326[3];                            /*                  */
+    volatile uint8_t   STBACK2;                                /*  STBACK2         */
+    volatile uint8_t   dummy327[955];                          /*                  */
+/* start of struct st_cpg_from_syscr1 */
+    volatile uint8_t   SYSCR1;                                 /*  SYSCR1          */
+    volatile uint8_t   dummy328[3];                            /*                  */
+/* end of struct st_cpg_from_syscr1 */
+/* start of struct st_cpg_from_syscr1 */
+    volatile uint8_t   SYSCR2;                                 /*  SYSCR2          */
+    volatile uint8_t   dummy329[3];                            /*                  */
+/* end of struct st_cpg_from_syscr1 */
+/* start of struct st_cpg_from_syscr1 */
+    volatile uint8_t   SYSCR3;                                 /*  SYSCR3          */
+    volatile uint8_t   dummy3300[3];                           /*                  */
+/* end of struct st_cpg_from_syscr1 */
+    volatile uint8_t   dummy3301[20];                          /*                  */
+/* start of struct st_cpg_from_stbcr3 */
+    volatile uint8_t   STBCR3;                                 /*  STBCR3          */
+    volatile uint8_t   dummy331[3];                            /*                  */
+/* end of struct st_cpg_from_stbcr3 */
+/* start of struct st_cpg_from_stbcr3 */
+    volatile uint8_t   STBCR4;                                 /*  STBCR4          */
+    volatile uint8_t   dummy332[3];                            /*                  */
+/* end of struct st_cpg_from_stbcr3 */
+/* start of struct st_cpg_from_stbcr3 */
+    volatile uint8_t   STBCR5;                                 /*  STBCR5          */
+    volatile uint8_t   dummy333[3];                            /*                  */
+/* end of struct st_cpg_from_stbcr3 */
+/* start of struct st_cpg_from_stbcr3 */
+    volatile uint8_t   STBCR6;                                 /*  STBCR6          */
+    volatile uint8_t   dummy334[3];                            /*                  */
+/* end of struct st_cpg_from_stbcr3 */
+/* start of struct st_cpg_from_stbcr3 */
+    volatile uint8_t   STBCR7;                                 /*  STBCR7          */
+    volatile uint8_t   dummy335[3];                            /*                  */
+/* end of struct st_cpg_from_stbcr3 */
+/* start of struct st_cpg_from_stbcr3 */
+    volatile uint8_t   STBCR8;                                 /*  STBCR8          */
+    volatile uint8_t   dummy336[3];                            /*                  */
+/* end of struct st_cpg_from_stbcr3 */
+/* start of struct st_cpg_from_stbcr3 */
+    volatile uint8_t   STBCR9;                                 /*  STBCR9          */
+    volatile uint8_t   dummy337[3];                            /*                  */
+/* end of struct st_cpg_from_stbcr3 */
+/* start of struct st_cpg_from_stbcr3 */
+    volatile uint8_t   STBCR10;                                /*  STBCR10         */
+    volatile uint8_t   dummy338[3];                            /*                  */
+/* end of struct st_cpg_from_stbcr3 */
+/* start of struct st_cpg_from_stbcr3 */
+    volatile uint8_t   STBCR11;                                /*  STBCR11         */
+    volatile uint8_t   dummy339[3];                            /*                  */
+/* end of struct st_cpg_from_stbcr3 */
+/* start of struct st_cpg_from_stbcr3 */
+    volatile uint8_t   STBCR12;                                /*  STBCR12         */
+    volatile uint8_t   dummy3400[3];                           /*                  */
+/* end of struct st_cpg_from_stbcr3 */
+    volatile uint8_t   dummy3401[24];                          /*                  */
+/* start of struct st_cpg_from_swrstcr1 */
+    volatile uint8_t   SWRSTCR1;                               /*  SWRSTCR1        */
+    volatile uint8_t   dummy341[3];                            /*                  */
+/* end of struct st_cpg_from_swrstcr1 */
+/* start of struct st_cpg_from_swrstcr1 */
+    volatile uint8_t   SWRSTCR2;                               /*  SWRSTCR2        */
+    volatile uint8_t   dummy342[3];                            /*                  */
+/* end of struct st_cpg_from_swrstcr1 */
+/* start of struct st_cpg_from_swrstcr1 */
+    volatile uint8_t   SWRSTCR3;                               /*  SWRSTCR3        */
+    volatile uint8_t   dummy3430[3];                           /*                  */
+/* end of struct st_cpg_from_swrstcr1 */
+    volatile uint8_t   dummy3431[4];                           /*                  */
+    volatile uint8_t   STBCR13;                                /*  STBCR13         */
+    volatile uint8_t   dummy344[70543];                        /*                  */
+    volatile uint8_t   RRAMKP;                                 /*  RRAMKP          */
+    volatile uint8_t   dummy345[1];                            /*                  */
+    volatile uint8_t   DSCTR;                                  /*  DSCTR           */
+    volatile uint8_t   dummy346[1];                            /*                  */
+    volatile uint16_t DSSSR;                                  /*  DSSSR           */
+    volatile uint16_t DSESR;                                  /*  DSESR           */
+    volatile uint16_t DSFR;                                   /*  DSFR            */
+    volatile uint8_t   dummy347[6];                            /*                  */
+    volatile uint8_t   XTALCTR;                                /*  XTALCTR         */
+};
+
+
+struct st_cpg_from_syscr1
+{
+    volatile uint8_t   SYSCR1;                                 /*  SYSCR1          */
+    volatile uint8_t   dummy1[3];                              /*                  */
+};
+
+
+struct st_cpg_from_stbcr3
+{
+    volatile uint8_t   STBCR3;                                 /*  STBCR3          */
+    volatile uint8_t   dummy1[3];                              /*                  */
+};
+
+
+struct st_cpg_from_swrstcr1
+{
+    volatile uint8_t   SWRSTCR1;                               /*  SWRSTCR1        */
+    volatile uint8_t   dummy1[3];                              /*                  */
+};
+
+
+#define CPG     (*(struct st_cpg     *)0xFCFE0010uL) /* CPG */
+
+
+/* Start of channnel array defines of CPG */
+
+/* Channnel array defines of CPG_FROM_SWRSTCR1_ARRAY */
+/*(Sample) value = CPG_FROM_SWRSTCR1_ARRAY[ channel ]->SWRSTCR1; */
+#define CPG_FROM_SWRSTCR1_ARRAY_COUNT  3
+#define CPG_FROM_SWRSTCR1_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &CPG_FROM_SWRSTCR1, &CPG_FROM_SWRSTCR2, &CPG_FROM_SWRSTCR3 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define CPG_FROM_SWRSTCR1 (*(struct st_cpg_from_swrstcr1 *)&CPG.SWRSTCR1) /* CPG_FROM_SWRSTCR1 */
+#define CPG_FROM_SWRSTCR2 (*(struct st_cpg_from_swrstcr1 *)&CPG.SWRSTCR2) /* CPG_FROM_SWRSTCR2 */
+#define CPG_FROM_SWRSTCR3 (*(struct st_cpg_from_swrstcr1 *)&CPG.SWRSTCR3) /* CPG_FROM_SWRSTCR3 */
+
+
+/* Channnel array defines of CPG_FROM_STBCR3_ARRAY */
+/*(Sample) value = CPG_FROM_STBCR3_ARRAY[ channel ]->STBCR3; */
+#define CPG_FROM_STBCR3_ARRAY_COUNT  10
+#define CPG_FROM_STBCR3_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &CPG_FROM_STBCR3, &CPG_FROM_STBCR4, &CPG_FROM_STBCR5, &CPG_FROM_STBCR6, &CPG_FROM_STBCR7, &CPG_FROM_STBCR8, &CPG_FROM_STBCR9, &CPG_FROM_STBCR10, \
+    &CPG_FROM_STBCR11, &CPG_FROM_STBCR12 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define CPG_FROM_STBCR3 (*(struct st_cpg_from_stbcr3 *)&CPG.STBCR3) /* CPG_FROM_STBCR3 */
+#define CPG_FROM_STBCR4 (*(struct st_cpg_from_stbcr3 *)&CPG.STBCR4) /* CPG_FROM_STBCR4 */
+#define CPG_FROM_STBCR5 (*(struct st_cpg_from_stbcr3 *)&CPG.STBCR5) /* CPG_FROM_STBCR5 */
+#define CPG_FROM_STBCR6 (*(struct st_cpg_from_stbcr3 *)&CPG.STBCR6) /* CPG_FROM_STBCR6 */
+#define CPG_FROM_STBCR7 (*(struct st_cpg_from_stbcr3 *)&CPG.STBCR7) /* CPG_FROM_STBCR7 */
+#define CPG_FROM_STBCR8 (*(struct st_cpg_from_stbcr3 *)&CPG.STBCR8) /* CPG_FROM_STBCR8 */
+#define CPG_FROM_STBCR9 (*(struct st_cpg_from_stbcr3 *)&CPG.STBCR9) /* CPG_FROM_STBCR9 */
+#define CPG_FROM_STBCR10 (*(struct st_cpg_from_stbcr3 *)&CPG.STBCR10) /* CPG_FROM_STBCR10 */
+#define CPG_FROM_STBCR11 (*(struct st_cpg_from_stbcr3 *)&CPG.STBCR11) /* CPG_FROM_STBCR11 */
+#define CPG_FROM_STBCR12 (*(struct st_cpg_from_stbcr3 *)&CPG.STBCR12) /* CPG_FROM_STBCR12 */
+
+
+/* Channnel array defines of CPG_FROM_SYSCR1_ARRAY */
+/*(Sample) value = CPG_FROM_SYSCR1_ARRAY[ channel ]->SYSCR1; */
+#define CPG_FROM_SYSCR1_ARRAY_COUNT  3
+#define CPG_FROM_SYSCR1_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &CPG_FROM_SYSCR1, &CPG_FROM_SYSCR2, &CPG_FROM_SYSCR3 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define CPG_FROM_SYSCR1 (*(struct st_cpg_from_syscr1 *)&CPG.SYSCR1) /* CPG_FROM_SYSCR1 */
+#define CPG_FROM_SYSCR2 (*(struct st_cpg_from_syscr1 *)&CPG.SYSCR2) /* CPG_FROM_SYSCR2 */
+#define CPG_FROM_SYSCR3 (*(struct st_cpg_from_syscr1 *)&CPG.SYSCR3) /* CPG_FROM_SYSCR3 */
+
+/* End of channnel array defines of CPG */
+
+
+#define CPGFRQCR CPG.FRQCR
+#define CPGFRQCR2 CPG.FRQCR2
+#define CPGCPUSTS CPG.CPUSTS
+#define CPGSTBCR1 CPG.STBCR1
+#define CPGSTBCR2 CPG.STBCR2
+#define CPGSTBREQ1 CPG.STBREQ1
+#define CPGSTBREQ2 CPG.STBREQ2
+#define CPGSTBACK1 CPG.STBACK1
+#define CPGSTBACK2 CPG.STBACK2
+#define CPGSYSCR1 CPG.SYSCR1
+#define CPGSYSCR2 CPG.SYSCR2
+#define CPGSYSCR3 CPG.SYSCR3
+#define CPGSTBCR3 CPG.STBCR3
+#define CPGSTBCR4 CPG.STBCR4
+#define CPGSTBCR5 CPG.STBCR5
+#define CPGSTBCR6 CPG.STBCR6
+#define CPGSTBCR7 CPG.STBCR7
+#define CPGSTBCR8 CPG.STBCR8
+#define CPGSTBCR9 CPG.STBCR9
+#define CPGSTBCR10 CPG.STBCR10
+#define CPGSTBCR11 CPG.STBCR11
+#define CPGSTBCR12 CPG.STBCR12
+#define CPGSWRSTCR1 CPG.SWRSTCR1
+#define CPGSWRSTCR2 CPG.SWRSTCR2
+#define CPGSWRSTCR3 CPG.SWRSTCR3
+#define CPGSTBCR13 CPG.STBCR13
+#define CPGRRAMKP CPG.RRAMKP
+#define CPGDSCTR CPG.DSCTR
+#define CPGDSSSR CPG.DSSSR
+#define CPGDSESR CPG.DSESR
+#define CPGDSFR CPG.DSFR
+#define CPGXTALCTR CPG.XTALCTR
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/disc_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/disc_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/disc_iodefine.h	(revision 270)
@@ -0,0 +1,93 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : disc_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef DISC_IODEFINE_H
+#define DISC_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_disc
+{                                                          /* DISC             */
+    volatile uint32_t  DOCMCR;                                 /*  DOCMCR          */
+    volatile uint32_t  DOCMSTR;                                /*  DOCMSTR         */
+    volatile uint32_t  DOCMCLSTR;                              /*  DOCMCLSTR       */
+    volatile uint32_t  DOCMIENR;                               /*  DOCMIENR        */
+    volatile uint8_t   dummy1[4];                              /*                  */
+    volatile uint32_t  DOCMPMR;                                /*  DOCMPMR         */
+    volatile uint32_t  DOCMECRCR;                              /*  DOCMECRCR       */
+    volatile uint32_t  DOCMCCRCR;                              /*  DOCMCCRCR       */
+    volatile uint32_t  DOCMSPXR;                               /*  DOCMSPXR        */
+    volatile uint32_t  DOCMSPYR;                               /*  DOCMSPYR        */
+    volatile uint32_t  DOCMSZXR;                               /*  DOCMSZXR        */
+    volatile uint32_t  DOCMSZYR;                               /*  DOCMSZYR        */
+    volatile uint32_t  DOCMCRCIR;                              /*  DOCMCRCIR       */
+};
+
+
+#define DISC0   (*(struct st_disc    *)0xFCFFA800uL) /* DISC0 */
+#define DISC1   (*(struct st_disc    *)0xFCFFB000uL) /* DISC1 */
+
+
+/* Start of channnel array defines of DISC */
+
+/* Channnel array defines of DISC */
+/*(Sample) value = DISC[ channel ]->DOCMCR; */
+#define DISC_COUNT  2
+#define DISC_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &DISC0, &DISC1 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+
+/* End of channnel array defines of DISC */
+
+
+#define DISC0DOCMCR DISC0.DOCMCR
+#define DISC0DOCMSTR DISC0.DOCMSTR
+#define DISC0DOCMCLSTR DISC0.DOCMCLSTR
+#define DISC0DOCMIENR DISC0.DOCMIENR
+#define DISC0DOCMPMR DISC0.DOCMPMR
+#define DISC0DOCMECRCR DISC0.DOCMECRCR
+#define DISC0DOCMCCRCR DISC0.DOCMCCRCR
+#define DISC0DOCMSPXR DISC0.DOCMSPXR
+#define DISC0DOCMSPYR DISC0.DOCMSPYR
+#define DISC0DOCMSZXR DISC0.DOCMSZXR
+#define DISC0DOCMSZYR DISC0.DOCMSZYR
+#define DISC0DOCMCRCIR DISC0.DOCMCRCIR
+#define DISC1DOCMCR DISC1.DOCMCR
+#define DISC1DOCMSTR DISC1.DOCMSTR
+#define DISC1DOCMCLSTR DISC1.DOCMCLSTR
+#define DISC1DOCMIENR DISC1.DOCMIENR
+#define DISC1DOCMPMR DISC1.DOCMPMR
+#define DISC1DOCMECRCR DISC1.DOCMECRCR
+#define DISC1DOCMCCRCR DISC1.DOCMCCRCR
+#define DISC1DOCMSPXR DISC1.DOCMSPXR
+#define DISC1DOCMSPYR DISC1.DOCMSPYR
+#define DISC1DOCMSZXR DISC1.DOCMSZXR
+#define DISC1DOCMSZYR DISC1.DOCMSZYR
+#define DISC1DOCMCRCIR DISC1.DOCMCRCIR
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/dmac_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/dmac_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/dmac_iodefine.h	(revision 270)
@@ -0,0 +1,733 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : dmac_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef DMAC_IODEFINE_H
+#define DMAC_IODEFINE_H
+/* ->QAC 0639 : Over 127 members (C90) */
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_dmac
+{                                                          /* DMAC             */
+/* start of struct st_dmac_n */
+    volatile uint32_t  N0SA_0;                                 /*  N0SA_0          */
+    volatile uint32_t  N0DA_0;                                 /*  N0DA_0          */
+    volatile uint32_t  N0TB_0;                                 /*  N0TB_0          */
+    volatile uint32_t  N1SA_0;                                 /*  N1SA_0          */
+    volatile uint32_t  N1DA_0;                                 /*  N1DA_0          */
+    volatile uint32_t  N1TB_0;                                 /*  N1TB_0          */
+    volatile uint32_t  CRSA_0;                                 /*  CRSA_0          */
+    volatile uint32_t  CRDA_0;                                 /*  CRDA_0          */
+    volatile uint32_t  CRTB_0;                                 /*  CRTB_0          */
+    volatile uint32_t  CHSTAT_0;                               /*  CHSTAT_0        */
+    volatile uint32_t  CHCTRL_0;                               /*  CHCTRL_0        */
+    volatile uint32_t  CHCFG_0;                                /*  CHCFG_0         */
+    volatile uint32_t  CHITVL_0;                               /*  CHITVL_0        */
+    volatile uint32_t  CHEXT_0;                                /*  CHEXT_0         */
+    volatile uint32_t  NXLA_0;                                 /*  NXLA_0          */
+    volatile uint32_t  CRLA_0;                                 /*  CRLA_0          */
+/* end of struct st_dmac_n */
+/* start of struct st_dmac_n */
+    volatile uint32_t  N0SA_1;                                 /*  N0SA_1          */
+    volatile uint32_t  N0DA_1;                                 /*  N0DA_1          */
+    volatile uint32_t  N0TB_1;                                 /*  N0TB_1          */
+    volatile uint32_t  N1SA_1;                                 /*  N1SA_1          */
+    volatile uint32_t  N1DA_1;                                 /*  N1DA_1          */
+    volatile uint32_t  N1TB_1;                                 /*  N1TB_1          */
+    volatile uint32_t  CRSA_1;                                 /*  CRSA_1          */
+    volatile uint32_t  CRDA_1;                                 /*  CRDA_1          */
+    volatile uint32_t  CRTB_1;                                 /*  CRTB_1          */
+    volatile uint32_t  CHSTAT_1;                               /*  CHSTAT_1        */
+    volatile uint32_t  CHCTRL_1;                               /*  CHCTRL_1        */
+    volatile uint32_t  CHCFG_1;                                /*  CHCFG_1         */
+    volatile uint32_t  CHITVL_1;                               /*  CHITVL_1        */
+    volatile uint32_t  CHEXT_1;                                /*  CHEXT_1         */
+    volatile uint32_t  NXLA_1;                                 /*  NXLA_1          */
+    volatile uint32_t  CRLA_1;                                 /*  CRLA_1          */
+/* end of struct st_dmac_n */
+/* start of struct st_dmac_n */
+    volatile uint32_t  N0SA_2;                                 /*  N0SA_2          */
+    volatile uint32_t  N0DA_2;                                 /*  N0DA_2          */
+    volatile uint32_t  N0TB_2;                                 /*  N0TB_2          */
+    volatile uint32_t  N1SA_2;                                 /*  N1SA_2          */
+    volatile uint32_t  N1DA_2;                                 /*  N1DA_2          */
+    volatile uint32_t  N1TB_2;                                 /*  N1TB_2          */
+    volatile uint32_t  CRSA_2;                                 /*  CRSA_2          */
+    volatile uint32_t  CRDA_2;                                 /*  CRDA_2          */
+    volatile uint32_t  CRTB_2;                                 /*  CRTB_2          */
+    volatile uint32_t  CHSTAT_2;                               /*  CHSTAT_2        */
+    volatile uint32_t  CHCTRL_2;                               /*  CHCTRL_2        */
+    volatile uint32_t  CHCFG_2;                                /*  CHCFG_2         */
+    volatile uint32_t  CHITVL_2;                               /*  CHITVL_2        */
+    volatile uint32_t  CHEXT_2;                                /*  CHEXT_2         */
+    volatile uint32_t  NXLA_2;                                 /*  NXLA_2          */
+    volatile uint32_t  CRLA_2;                                 /*  CRLA_2          */
+/* end of struct st_dmac_n */
+/* start of struct st_dmac_n */
+    volatile uint32_t  N0SA_3;                                 /*  N0SA_3          */
+    volatile uint32_t  N0DA_3;                                 /*  N0DA_3          */
+    volatile uint32_t  N0TB_3;                                 /*  N0TB_3          */
+    volatile uint32_t  N1SA_3;                                 /*  N1SA_3          */
+    volatile uint32_t  N1DA_3;                                 /*  N1DA_3          */
+    volatile uint32_t  N1TB_3;                                 /*  N1TB_3          */
+    volatile uint32_t  CRSA_3;                                 /*  CRSA_3          */
+    volatile uint32_t  CRDA_3;                                 /*  CRDA_3          */
+    volatile uint32_t  CRTB_3;                                 /*  CRTB_3          */
+    volatile uint32_t  CHSTAT_3;                               /*  CHSTAT_3        */
+    volatile uint32_t  CHCTRL_3;                               /*  CHCTRL_3        */
+    volatile uint32_t  CHCFG_3;                                /*  CHCFG_3         */
+    volatile uint32_t  CHITVL_3;                               /*  CHITVL_3        */
+    volatile uint32_t  CHEXT_3;                                /*  CHEXT_3         */
+    volatile uint32_t  NXLA_3;                                 /*  NXLA_3          */
+    volatile uint32_t  CRLA_3;                                 /*  CRLA_3          */
+/* end of struct st_dmac_n */
+/* start of struct st_dmac_n */
+    volatile uint32_t  N0SA_4;                                 /*  N0SA_4          */
+    volatile uint32_t  N0DA_4;                                 /*  N0DA_4          */
+    volatile uint32_t  N0TB_4;                                 /*  N0TB_4          */
+    volatile uint32_t  N1SA_4;                                 /*  N1SA_4          */
+    volatile uint32_t  N1DA_4;                                 /*  N1DA_4          */
+    volatile uint32_t  N1TB_4;                                 /*  N1TB_4          */
+    volatile uint32_t  CRSA_4;                                 /*  CRSA_4          */
+    volatile uint32_t  CRDA_4;                                 /*  CRDA_4          */
+    volatile uint32_t  CRTB_4;                                 /*  CRTB_4          */
+    volatile uint32_t  CHSTAT_4;                               /*  CHSTAT_4        */
+    volatile uint32_t  CHCTRL_4;                               /*  CHCTRL_4        */
+    volatile uint32_t  CHCFG_4;                                /*  CHCFG_4         */
+    volatile uint32_t  CHITVL_4;                               /*  CHITVL_4        */
+    volatile uint32_t  CHEXT_4;                                /*  CHEXT_4         */
+    volatile uint32_t  NXLA_4;                                 /*  NXLA_4          */
+    volatile uint32_t  CRLA_4;                                 /*  CRLA_4          */
+/* end of struct st_dmac_n */
+/* start of struct st_dmac_n */
+    volatile uint32_t  N0SA_5;                                 /*  N0SA_5          */
+    volatile uint32_t  N0DA_5;                                 /*  N0DA_5          */
+    volatile uint32_t  N0TB_5;                                 /*  N0TB_5          */
+    volatile uint32_t  N1SA_5;                                 /*  N1SA_5          */
+    volatile uint32_t  N1DA_5;                                 /*  N1DA_5          */
+    volatile uint32_t  N1TB_5;                                 /*  N1TB_5          */
+    volatile uint32_t  CRSA_5;                                 /*  CRSA_5          */
+    volatile uint32_t  CRDA_5;                                 /*  CRDA_5          */
+    volatile uint32_t  CRTB_5;                                 /*  CRTB_5          */
+    volatile uint32_t  CHSTAT_5;                               /*  CHSTAT_5        */
+    volatile uint32_t  CHCTRL_5;                               /*  CHCTRL_5        */
+    volatile uint32_t  CHCFG_5;                                /*  CHCFG_5         */
+    volatile uint32_t  CHITVL_5;                               /*  CHITVL_5        */
+    volatile uint32_t  CHEXT_5;                                /*  CHEXT_5         */
+    volatile uint32_t  NXLA_5;                                 /*  NXLA_5          */
+    volatile uint32_t  CRLA_5;                                 /*  CRLA_5          */
+/* end of struct st_dmac_n */
+/* start of struct st_dmac_n */
+    volatile uint32_t  N0SA_6;                                 /*  N0SA_6          */
+    volatile uint32_t  N0DA_6;                                 /*  N0DA_6          */
+    volatile uint32_t  N0TB_6;                                 /*  N0TB_6          */
+    volatile uint32_t  N1SA_6;                                 /*  N1SA_6          */
+    volatile uint32_t  N1DA_6;                                 /*  N1DA_6          */
+    volatile uint32_t  N1TB_6;                                 /*  N1TB_6          */
+    volatile uint32_t  CRSA_6;                                 /*  CRSA_6          */
+    volatile uint32_t  CRDA_6;                                 /*  CRDA_6          */
+    volatile uint32_t  CRTB_6;                                 /*  CRTB_6          */
+    volatile uint32_t  CHSTAT_6;                               /*  CHSTAT_6        */
+    volatile uint32_t  CHCTRL_6;                               /*  CHCTRL_6        */
+    volatile uint32_t  CHCFG_6;                                /*  CHCFG_6         */
+    volatile uint32_t  CHITVL_6;                               /*  CHITVL_6        */
+    volatile uint32_t  CHEXT_6;                                /*  CHEXT_6         */
+    volatile uint32_t  NXLA_6;                                 /*  NXLA_6          */
+    volatile uint32_t  CRLA_6;                                 /*  CRLA_6          */
+/* end of struct st_dmac_n */
+/* start of struct st_dmac_n */
+    volatile uint32_t  N0SA_7;                                 /*  N0SA_7          */
+    volatile uint32_t  N0DA_7;                                 /*  N0DA_7          */
+    volatile uint32_t  N0TB_7;                                 /*  N0TB_7          */
+    volatile uint32_t  N1SA_7;                                 /*  N1SA_7          */
+    volatile uint32_t  N1DA_7;                                 /*  N1DA_7          */
+    volatile uint32_t  N1TB_7;                                 /*  N1TB_7          */
+    volatile uint32_t  CRSA_7;                                 /*  CRSA_7          */
+    volatile uint32_t  CRDA_7;                                 /*  CRDA_7          */
+    volatile uint32_t  CRTB_7;                                 /*  CRTB_7          */
+    volatile uint32_t  CHSTAT_7;                               /*  CHSTAT_7        */
+    volatile uint32_t  CHCTRL_7;                               /*  CHCTRL_7        */
+    volatile uint32_t  CHCFG_7;                                /*  CHCFG_7         */
+    volatile uint32_t  CHITVL_7;                               /*  CHITVL_7        */
+    volatile uint32_t  CHEXT_7;                                /*  CHEXT_7         */
+    volatile uint32_t  NXLA_7;                                 /*  NXLA_7          */
+    volatile uint32_t  CRLA_7;                                 /*  CRLA_7          */
+/* end of struct st_dmac_n */
+    volatile uint8_t   dummy187[256];                          /*                  */
+/* start of struct st_dmaccommon_n */
+    volatile uint32_t  DCTRL_0_7;                              /*  DCTRL_0_7       */
+    volatile uint8_t   dummy188[12];                           /*                  */
+    volatile uint32_t  DSTAT_EN_0_7;                           /*  DSTAT_EN_0_7    */
+    volatile uint32_t  DSTAT_ER_0_7;                           /*  DSTAT_ER_0_7    */
+    volatile uint32_t  DSTAT_END_0_7;                          /*  DSTAT_END_0_7   */
+    volatile uint32_t  DSTAT_TC_0_7;                           /*  DSTAT_TC_0_7    */
+    volatile uint32_t  DSTAT_SUS_0_7;                          /*  DSTAT_SUS_0_7   */
+/* end of struct st_dmaccommon_n */
+    volatile uint8_t   dummy189[220];                          /*                  */
+/* start of struct st_dmac_n */
+    volatile uint32_t  N0SA_8;                                 /*  N0SA_8          */
+    volatile uint32_t  N0DA_8;                                 /*  N0DA_8          */
+    volatile uint32_t  N0TB_8;                                 /*  N0TB_8          */
+    volatile uint32_t  N1SA_8;                                 /*  N1SA_8          */
+    volatile uint32_t  N1DA_8;                                 /*  N1DA_8          */
+    volatile uint32_t  N1TB_8;                                 /*  N1TB_8          */
+    volatile uint32_t  CRSA_8;                                 /*  CRSA_8          */
+    volatile uint32_t  CRDA_8;                                 /*  CRDA_8          */
+    volatile uint32_t  CRTB_8;                                 /*  CRTB_8          */
+    volatile uint32_t  CHSTAT_8;                               /*  CHSTAT_8        */
+    volatile uint32_t  CHCTRL_8;                               /*  CHCTRL_8        */
+    volatile uint32_t  CHCFG_8;                                /*  CHCFG_8         */
+    volatile uint32_t  CHITVL_8;                               /*  CHITVL_8        */
+    volatile uint32_t  CHEXT_8;                                /*  CHEXT_8         */
+    volatile uint32_t  NXLA_8;                                 /*  NXLA_8          */
+    volatile uint32_t  CRLA_8;                                 /*  CRLA_8          */
+/* end of struct st_dmac_n */
+/* start of struct st_dmac_n */
+    volatile uint32_t  N0SA_9;                                 /*  N0SA_9          */
+    volatile uint32_t  N0DA_9;                                 /*  N0DA_9          */
+    volatile uint32_t  N0TB_9;                                 /*  N0TB_9          */
+    volatile uint32_t  N1SA_9;                                 /*  N1SA_9          */
+    volatile uint32_t  N1DA_9;                                 /*  N1DA_9          */
+    volatile uint32_t  N1TB_9;                                 /*  N1TB_9          */
+    volatile uint32_t  CRSA_9;                                 /*  CRSA_9          */
+    volatile uint32_t  CRDA_9;                                 /*  CRDA_9          */
+    volatile uint32_t  CRTB_9;                                 /*  CRTB_9          */
+    volatile uint32_t  CHSTAT_9;                               /*  CHSTAT_9        */
+    volatile uint32_t  CHCTRL_9;                               /*  CHCTRL_9        */
+    volatile uint32_t  CHCFG_9;                                /*  CHCFG_9         */
+    volatile uint32_t  CHITVL_9;                               /*  CHITVL_9        */
+    volatile uint32_t  CHEXT_9;                                /*  CHEXT_9         */
+    volatile uint32_t  NXLA_9;                                 /*  NXLA_9          */
+    volatile uint32_t  CRLA_9;                                 /*  CRLA_9          */
+/* end of struct st_dmac_n */
+/* start of struct st_dmac_n */
+    volatile uint32_t  N0SA_10;                                /*  N0SA_10         */
+    volatile uint32_t  N0DA_10;                                /*  N0DA_10         */
+    volatile uint32_t  N0TB_10;                                /*  N0TB_10         */
+    volatile uint32_t  N1SA_10;                                /*  N1SA_10         */
+    volatile uint32_t  N1DA_10;                                /*  N1DA_10         */
+    volatile uint32_t  N1TB_10;                                /*  N1TB_10         */
+    volatile uint32_t  CRSA_10;                                /*  CRSA_10         */
+    volatile uint32_t  CRDA_10;                                /*  CRDA_10         */
+    volatile uint32_t  CRTB_10;                                /*  CRTB_10         */
+    volatile uint32_t  CHSTAT_10;                              /*  CHSTAT_10       */
+    volatile uint32_t  CHCTRL_10;                              /*  CHCTRL_10       */
+    volatile uint32_t  CHCFG_10;                               /*  CHCFG_10        */
+    volatile uint32_t  CHITVL_10;                              /*  CHITVL_10       */
+    volatile uint32_t  CHEXT_10;                               /*  CHEXT_10        */
+    volatile uint32_t  NXLA_10;                                /*  NXLA_10         */
+    volatile uint32_t  CRLA_10;                                /*  CRLA_10         */
+/* end of struct st_dmac_n */
+/* start of struct st_dmac_n */
+    volatile uint32_t  N0SA_11;                                /*  N0SA_11         */
+    volatile uint32_t  N0DA_11;                                /*  N0DA_11         */
+    volatile uint32_t  N0TB_11;                                /*  N0TB_11         */
+    volatile uint32_t  N1SA_11;                                /*  N1SA_11         */
+    volatile uint32_t  N1DA_11;                                /*  N1DA_11         */
+    volatile uint32_t  N1TB_11;                                /*  N1TB_11         */
+    volatile uint32_t  CRSA_11;                                /*  CRSA_11         */
+    volatile uint32_t  CRDA_11;                                /*  CRDA_11         */
+    volatile uint32_t  CRTB_11;                                /*  CRTB_11         */
+    volatile uint32_t  CHSTAT_11;                              /*  CHSTAT_11       */
+    volatile uint32_t  CHCTRL_11;                              /*  CHCTRL_11       */
+    volatile uint32_t  CHCFG_11;                               /*  CHCFG_11        */
+    volatile uint32_t  CHITVL_11;                              /*  CHITVL_11       */
+    volatile uint32_t  CHEXT_11;                               /*  CHEXT_11        */
+    volatile uint32_t  NXLA_11;                                /*  NXLA_11         */
+    volatile uint32_t  CRLA_11;                                /*  CRLA_11         */
+/* end of struct st_dmac_n */
+/* start of struct st_dmac_n */
+    volatile uint32_t  N0SA_12;                                /*  N0SA_12         */
+    volatile uint32_t  N0DA_12;                                /*  N0DA_12         */
+    volatile uint32_t  N0TB_12;                                /*  N0TB_12         */
+    volatile uint32_t  N1SA_12;                                /*  N1SA_12         */
+    volatile uint32_t  N1DA_12;                                /*  N1DA_12         */
+    volatile uint32_t  N1TB_12;                                /*  N1TB_12         */
+    volatile uint32_t  CRSA_12;                                /*  CRSA_12         */
+    volatile uint32_t  CRDA_12;                                /*  CRDA_12         */
+    volatile uint32_t  CRTB_12;                                /*  CRTB_12         */
+    volatile uint32_t  CHSTAT_12;                              /*  CHSTAT_12       */
+    volatile uint32_t  CHCTRL_12;                              /*  CHCTRL_12       */
+    volatile uint32_t  CHCFG_12;                               /*  CHCFG_12        */
+    volatile uint32_t  CHITVL_12;                              /*  CHITVL_12       */
+    volatile uint32_t  CHEXT_12;                               /*  CHEXT_12        */
+    volatile uint32_t  NXLA_12;                                /*  NXLA_12         */
+    volatile uint32_t  CRLA_12;                                /*  CRLA_12         */
+/* end of struct st_dmac_n */
+/* start of struct st_dmac_n */
+    volatile uint32_t  N0SA_13;                                /*  N0SA_13         */
+    volatile uint32_t  N0DA_13;                                /*  N0DA_13         */
+    volatile uint32_t  N0TB_13;                                /*  N0TB_13         */
+    volatile uint32_t  N1SA_13;                                /*  N1SA_13         */
+    volatile uint32_t  N1DA_13;                                /*  N1DA_13         */
+    volatile uint32_t  N1TB_13;                                /*  N1TB_13         */
+    volatile uint32_t  CRSA_13;                                /*  CRSA_13         */
+    volatile uint32_t  CRDA_13;                                /*  CRDA_13         */
+    volatile uint32_t  CRTB_13;                                /*  CRTB_13         */
+    volatile uint32_t  CHSTAT_13;                              /*  CHSTAT_13       */
+    volatile uint32_t  CHCTRL_13;                              /*  CHCTRL_13       */
+    volatile uint32_t  CHCFG_13;                               /*  CHCFG_13        */
+    volatile uint32_t  CHITVL_13;                              /*  CHITVL_13       */
+    volatile uint32_t  CHEXT_13;                               /*  CHEXT_13        */
+    volatile uint32_t  NXLA_13;                                /*  NXLA_13         */
+    volatile uint32_t  CRLA_13;                                /*  CRLA_13         */
+/* end of struct st_dmac_n */
+/* start of struct st_dmac_n */
+    volatile uint32_t  N0SA_14;                                /*  N0SA_14         */
+    volatile uint32_t  N0DA_14;                                /*  N0DA_14         */
+    volatile uint32_t  N0TB_14;                                /*  N0TB_14         */
+    volatile uint32_t  N1SA_14;                                /*  N1SA_14         */
+    volatile uint32_t  N1DA_14;                                /*  N1DA_14         */
+    volatile uint32_t  N1TB_14;                                /*  N1TB_14         */
+    volatile uint32_t  CRSA_14;                                /*  CRSA_14         */
+    volatile uint32_t  CRDA_14;                                /*  CRDA_14         */
+    volatile uint32_t  CRTB_14;                                /*  CRTB_14         */
+    volatile uint32_t  CHSTAT_14;                              /*  CHSTAT_14       */
+    volatile uint32_t  CHCTRL_14;                              /*  CHCTRL_14       */
+    volatile uint32_t  CHCFG_14;                               /*  CHCFG_14        */
+    volatile uint32_t  CHITVL_14;                              /*  CHITVL_14       */
+    volatile uint32_t  CHEXT_14;                               /*  CHEXT_14        */
+    volatile uint32_t  NXLA_14;                                /*  NXLA_14         */
+    volatile uint32_t  CRLA_14;                                /*  CRLA_14         */
+/* end of struct st_dmac_n */
+/* start of struct st_dmac_n */
+    volatile uint32_t  N0SA_15;                                /*  N0SA_15         */
+    volatile uint32_t  N0DA_15;                                /*  N0DA_15         */
+    volatile uint32_t  N0TB_15;                                /*  N0TB_15         */
+    volatile uint32_t  N1SA_15;                                /*  N1SA_15         */
+    volatile uint32_t  N1DA_15;                                /*  N1DA_15         */
+    volatile uint32_t  N1TB_15;                                /*  N1TB_15         */
+    volatile uint32_t  CRSA_15;                                /*  CRSA_15         */
+    volatile uint32_t  CRDA_15;                                /*  CRDA_15         */
+    volatile uint32_t  CRTB_15;                                /*  CRTB_15         */
+    volatile uint32_t  CHSTAT_15;                              /*  CHSTAT_15       */
+    volatile uint32_t  CHCTRL_15;                              /*  CHCTRL_15       */
+    volatile uint32_t  CHCFG_15;                               /*  CHCFG_15        */
+    volatile uint32_t  CHITVL_15;                              /*  CHITVL_15       */
+    volatile uint32_t  CHEXT_15;                               /*  CHEXT_15        */
+    volatile uint32_t  NXLA_15;                                /*  NXLA_15         */
+    volatile uint32_t  CRLA_15;                                /*  CRLA_15         */
+/* end of struct st_dmac_n */
+    volatile uint8_t   dummy190[256];                          /*                  */
+/* start of struct st_dmaccommon_n */
+    volatile uint32_t  DCTRL_8_15;                             /*  DCTRL_8_15      */
+    volatile uint8_t   dummy191[12];                           /*                  */
+    volatile uint32_t  DSTAT_EN_8_15;                          /*  DSTAT_EN_8_15   */
+    volatile uint32_t  DSTAT_ER_8_15;                          /*  DSTAT_ER_8_15   */
+    volatile uint32_t  DSTAT_END_8_15;                         /*  DSTAT_END_8_15  */
+    volatile uint32_t  DSTAT_TC_8_15;                          /*  DSTAT_TC_8_15   */
+    volatile uint32_t  DSTAT_SUS_8_15;                         /*  DSTAT_SUS_8_15  */
+/* end of struct st_dmaccommon_n */
+    volatile uint8_t   dummy192[350095580];                    /*                  */
+    volatile uint32_t  DMARS0;                                 /*  DMARS0          */
+    volatile uint32_t  DMARS1;                                 /*  DMARS1          */
+    volatile uint32_t  DMARS2;                                 /*  DMARS2          */
+    volatile uint32_t  DMARS3;                                 /*  DMARS3          */
+    volatile uint32_t  DMARS4;                                 /*  DMARS4          */
+    volatile uint32_t  DMARS5;                                 /*  DMARS5          */
+    volatile uint32_t  DMARS6;                                 /*  DMARS6          */
+    volatile uint32_t  DMARS7;                                 /*  DMARS7          */
+};
+
+
+struct st_dmaccommon_n
+{
+    volatile uint32_t  DCTRL_0_7;                              /*  DCTRL_0_7       */
+    volatile uint8_t   dummy1[12];                             /*                  */
+    volatile uint32_t  DSTAT_EN_0_7;                           /*  DSTAT_EN_0_7    */
+    volatile uint32_t  DSTAT_ER_0_7;                           /*  DSTAT_ER_0_7    */
+    volatile uint32_t  DSTAT_END_0_7;                          /*  DSTAT_END_0_7   */
+    volatile uint32_t  DSTAT_TC_0_7;                           /*  DSTAT_TC_0_7    */
+    volatile uint32_t  DSTAT_SUS_0_7;                          /*  DSTAT_SUS_0_7   */
+};
+
+
+struct st_dmac_n
+{
+    volatile uint32_t  N0SA_n;                                 /*  N0SA_n          */
+    volatile uint32_t  N0DA_n;                                 /*  N0DA_n          */
+    volatile uint32_t  N0TB_n;                                 /*  N0TB_n          */
+    volatile uint32_t  N1SA_n;                                 /*  N1SA_n          */
+    volatile uint32_t  N1DA_n;                                 /*  N1DA_n          */
+    volatile uint32_t  N1TB_n;                                 /*  N1TB_n          */
+    volatile uint32_t  CRSA_n;                                 /*  CRSA_n          */
+    volatile uint32_t  CRDA_n;                                 /*  CRDA_n          */
+    volatile uint32_t  CRTB_n;                                 /*  CRTB_n          */
+    volatile uint32_t  CHSTAT_n;                               /*  CHSTAT_n        */
+    volatile uint32_t  CHCTRL_n;                               /*  CHCTRL_n        */
+    volatile uint32_t  CHCFG_n;                                /*  CHCFG_n         */
+    volatile uint32_t  CHITVL_n;                               /*  CHITVL_n        */
+    volatile uint32_t  CHEXT_n;                                /*  CHEXT_n         */
+    volatile uint32_t  NXLA_n;                                 /*  NXLA_n          */
+    volatile uint32_t  CRLA_n;                                 /*  CRLA_n          */
+};
+
+
+#define DMAC    (*(struct st_dmac    *)0xE8200000uL) /* DMAC */
+
+
+/* Start of channnel array defines of DMAC */
+
+/* Channnel array defines of DMACn */
+/*(Sample) value = DMACn[ channel ]->N0SA_n; */
+#define DMACn_COUNT  16
+#define DMACn_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &DMAC0, &DMAC1, &DMAC2, &DMAC3, &DMAC4, &DMAC5, &DMAC6, &DMAC7, \
+    &DMAC8, &DMAC9, &DMAC10, &DMAC11, &DMAC12, &DMAC13, &DMAC14, &DMAC15 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define DMAC0   (*(struct st_dmac_n *)&DMAC.N0SA_0)              /* DMAC0 */
+#define DMAC1   (*(struct st_dmac_n *)&DMAC.N0SA_1)              /* DMAC1 */
+#define DMAC2   (*(struct st_dmac_n *)&DMAC.N0SA_2)              /* DMAC2 */
+#define DMAC3   (*(struct st_dmac_n *)&DMAC.N0SA_3)              /* DMAC3 */
+#define DMAC4   (*(struct st_dmac_n *)&DMAC.N0SA_4)              /* DMAC4 */
+#define DMAC5   (*(struct st_dmac_n *)&DMAC.N0SA_5)              /* DMAC5 */
+#define DMAC6   (*(struct st_dmac_n *)&DMAC.N0SA_6)              /* DMAC6 */
+#define DMAC7   (*(struct st_dmac_n *)&DMAC.N0SA_7)              /* DMAC7 */
+#define DMAC8   (*(struct st_dmac_n *)&DMAC.N0SA_8)              /* DMAC8 */
+#define DMAC9   (*(struct st_dmac_n *)&DMAC.N0SA_9)              /* DMAC9 */
+#define DMAC10  (*(struct st_dmac_n *)&DMAC.N0SA_10)             /* DMAC10 */
+#define DMAC11  (*(struct st_dmac_n *)&DMAC.N0SA_11)             /* DMAC11 */
+#define DMAC12  (*(struct st_dmac_n *)&DMAC.N0SA_12)             /* DMAC12 */
+#define DMAC13  (*(struct st_dmac_n *)&DMAC.N0SA_13)             /* DMAC13 */
+#define DMAC14  (*(struct st_dmac_n *)&DMAC.N0SA_14)             /* DMAC14 */
+#define DMAC15  (*(struct st_dmac_n *)&DMAC.N0SA_15)             /* DMAC15 */
+
+
+/* Channnel array defines of DMACnn */
+/*(Sample) value = DMACnn[ channel / 8 ]->DCTRL_0_7; */
+#define DMACnn_COUNT  2
+#define DMACnn_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &DMAC07, &DMAC815 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define DMAC07  (*(struct st_dmaccommon_n *)&DMAC.DCTRL_0_7)     /* DMAC07 */
+#define DMAC815 (*(struct st_dmaccommon_n *)&DMAC.DCTRL_8_15)    /* DMAC815 */
+
+
+/* Channnel array defines of DMACmm */
+/*(Sample) value = DMACmm[ channel / 2 ]->DMARS; */
+struct st_dmars_mm
+{
+    uint32_t       DMARS;                                        /*  DMARS     */
+};
+#define DMACmm_COUNT  8
+#define DMACmm_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &DMAC01, &DMAC23, &DMAC45, &DMAC67, &DMAC89, &DMAC1011, &DMAC1213, &DMAC1415 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define DMAC01    (*(struct st_dmars_mm *)&DMAC.DMARS0)  /* DMAC0-1   */
+#define DMAC23    (*(struct st_dmars_mm *)&DMAC.DMARS1)  /* DMAC2-3   */
+#define DMAC45    (*(struct st_dmars_mm *)&DMAC.DMARS2)  /* DMAC4-5   */
+#define DMAC67    (*(struct st_dmars_mm *)&DMAC.DMARS3)  /* DMAC6-7   */
+#define DMAC89    (*(struct st_dmars_mm *)&DMAC.DMARS4)  /* DMAC8-9   */
+#define DMAC1011  (*(struct st_dmars_mm *)&DMAC.DMARS5)  /* DMAC10-11 */
+#define DMAC1213  (*(struct st_dmars_mm *)&DMAC.DMARS6)  /* DMAC12-13 */
+#define DMAC1415  (*(struct st_dmars_mm *)&DMAC.DMARS7)  /* DMAC14-15 */
+
+/* End of channnel array defines of DMAC */
+
+
+#define DMACN0SA_0 DMAC.N0SA_0
+#define DMACN0DA_0 DMAC.N0DA_0
+#define DMACN0TB_0 DMAC.N0TB_0
+#define DMACN1SA_0 DMAC.N1SA_0
+#define DMACN1DA_0 DMAC.N1DA_0
+#define DMACN1TB_0 DMAC.N1TB_0
+#define DMACCRSA_0 DMAC.CRSA_0
+#define DMACCRDA_0 DMAC.CRDA_0
+#define DMACCRTB_0 DMAC.CRTB_0
+#define DMACCHSTAT_0 DMAC.CHSTAT_0
+#define DMACCHCTRL_0 DMAC.CHCTRL_0
+#define DMACCHCFG_0 DMAC.CHCFG_0
+#define DMACCHITVL_0 DMAC.CHITVL_0
+#define DMACCHEXT_0 DMAC.CHEXT_0
+#define DMACNXLA_0 DMAC.NXLA_0
+#define DMACCRLA_0 DMAC.CRLA_0
+#define DMACN0SA_1 DMAC.N0SA_1
+#define DMACN0DA_1 DMAC.N0DA_1
+#define DMACN0TB_1 DMAC.N0TB_1
+#define DMACN1SA_1 DMAC.N1SA_1
+#define DMACN1DA_1 DMAC.N1DA_1
+#define DMACN1TB_1 DMAC.N1TB_1
+#define DMACCRSA_1 DMAC.CRSA_1
+#define DMACCRDA_1 DMAC.CRDA_1
+#define DMACCRTB_1 DMAC.CRTB_1
+#define DMACCHSTAT_1 DMAC.CHSTAT_1
+#define DMACCHCTRL_1 DMAC.CHCTRL_1
+#define DMACCHCFG_1 DMAC.CHCFG_1
+#define DMACCHITVL_1 DMAC.CHITVL_1
+#define DMACCHEXT_1 DMAC.CHEXT_1
+#define DMACNXLA_1 DMAC.NXLA_1
+#define DMACCRLA_1 DMAC.CRLA_1
+#define DMACN0SA_2 DMAC.N0SA_2
+#define DMACN0DA_2 DMAC.N0DA_2
+#define DMACN0TB_2 DMAC.N0TB_2
+#define DMACN1SA_2 DMAC.N1SA_2
+#define DMACN1DA_2 DMAC.N1DA_2
+#define DMACN1TB_2 DMAC.N1TB_2
+#define DMACCRSA_2 DMAC.CRSA_2
+#define DMACCRDA_2 DMAC.CRDA_2
+#define DMACCRTB_2 DMAC.CRTB_2
+#define DMACCHSTAT_2 DMAC.CHSTAT_2
+#define DMACCHCTRL_2 DMAC.CHCTRL_2
+#define DMACCHCFG_2 DMAC.CHCFG_2
+#define DMACCHITVL_2 DMAC.CHITVL_2
+#define DMACCHEXT_2 DMAC.CHEXT_2
+#define DMACNXLA_2 DMAC.NXLA_2
+#define DMACCRLA_2 DMAC.CRLA_2
+#define DMACN0SA_3 DMAC.N0SA_3
+#define DMACN0DA_3 DMAC.N0DA_3
+#define DMACN0TB_3 DMAC.N0TB_3
+#define DMACN1SA_3 DMAC.N1SA_3
+#define DMACN1DA_3 DMAC.N1DA_3
+#define DMACN1TB_3 DMAC.N1TB_3
+#define DMACCRSA_3 DMAC.CRSA_3
+#define DMACCRDA_3 DMAC.CRDA_3
+#define DMACCRTB_3 DMAC.CRTB_3
+#define DMACCHSTAT_3 DMAC.CHSTAT_3
+#define DMACCHCTRL_3 DMAC.CHCTRL_3
+#define DMACCHCFG_3 DMAC.CHCFG_3
+#define DMACCHITVL_3 DMAC.CHITVL_3
+#define DMACCHEXT_3 DMAC.CHEXT_3
+#define DMACNXLA_3 DMAC.NXLA_3
+#define DMACCRLA_3 DMAC.CRLA_3
+#define DMACN0SA_4 DMAC.N0SA_4
+#define DMACN0DA_4 DMAC.N0DA_4
+#define DMACN0TB_4 DMAC.N0TB_4
+#define DMACN1SA_4 DMAC.N1SA_4
+#define DMACN1DA_4 DMAC.N1DA_4
+#define DMACN1TB_4 DMAC.N1TB_4
+#define DMACCRSA_4 DMAC.CRSA_4
+#define DMACCRDA_4 DMAC.CRDA_4
+#define DMACCRTB_4 DMAC.CRTB_4
+#define DMACCHSTAT_4 DMAC.CHSTAT_4
+#define DMACCHCTRL_4 DMAC.CHCTRL_4
+#define DMACCHCFG_4 DMAC.CHCFG_4
+#define DMACCHITVL_4 DMAC.CHITVL_4
+#define DMACCHEXT_4 DMAC.CHEXT_4
+#define DMACNXLA_4 DMAC.NXLA_4
+#define DMACCRLA_4 DMAC.CRLA_4
+#define DMACN0SA_5 DMAC.N0SA_5
+#define DMACN0DA_5 DMAC.N0DA_5
+#define DMACN0TB_5 DMAC.N0TB_5
+#define DMACN1SA_5 DMAC.N1SA_5
+#define DMACN1DA_5 DMAC.N1DA_5
+#define DMACN1TB_5 DMAC.N1TB_5
+#define DMACCRSA_5 DMAC.CRSA_5
+#define DMACCRDA_5 DMAC.CRDA_5
+#define DMACCRTB_5 DMAC.CRTB_5
+#define DMACCHSTAT_5 DMAC.CHSTAT_5
+#define DMACCHCTRL_5 DMAC.CHCTRL_5
+#define DMACCHCFG_5 DMAC.CHCFG_5
+#define DMACCHITVL_5 DMAC.CHITVL_5
+#define DMACCHEXT_5 DMAC.CHEXT_5
+#define DMACNXLA_5 DMAC.NXLA_5
+#define DMACCRLA_5 DMAC.CRLA_5
+#define DMACN0SA_6 DMAC.N0SA_6
+#define DMACN0DA_6 DMAC.N0DA_6
+#define DMACN0TB_6 DMAC.N0TB_6
+#define DMACN1SA_6 DMAC.N1SA_6
+#define DMACN1DA_6 DMAC.N1DA_6
+#define DMACN1TB_6 DMAC.N1TB_6
+#define DMACCRSA_6 DMAC.CRSA_6
+#define DMACCRDA_6 DMAC.CRDA_6
+#define DMACCRTB_6 DMAC.CRTB_6
+#define DMACCHSTAT_6 DMAC.CHSTAT_6
+#define DMACCHCTRL_6 DMAC.CHCTRL_6
+#define DMACCHCFG_6 DMAC.CHCFG_6
+#define DMACCHITVL_6 DMAC.CHITVL_6
+#define DMACCHEXT_6 DMAC.CHEXT_6
+#define DMACNXLA_6 DMAC.NXLA_6
+#define DMACCRLA_6 DMAC.CRLA_6
+#define DMACN0SA_7 DMAC.N0SA_7
+#define DMACN0DA_7 DMAC.N0DA_7
+#define DMACN0TB_7 DMAC.N0TB_7
+#define DMACN1SA_7 DMAC.N1SA_7
+#define DMACN1DA_7 DMAC.N1DA_7
+#define DMACN1TB_7 DMAC.N1TB_7
+#define DMACCRSA_7 DMAC.CRSA_7
+#define DMACCRDA_7 DMAC.CRDA_7
+#define DMACCRTB_7 DMAC.CRTB_7
+#define DMACCHSTAT_7 DMAC.CHSTAT_7
+#define DMACCHCTRL_7 DMAC.CHCTRL_7
+#define DMACCHCFG_7 DMAC.CHCFG_7
+#define DMACCHITVL_7 DMAC.CHITVL_7
+#define DMACCHEXT_7 DMAC.CHEXT_7
+#define DMACNXLA_7 DMAC.NXLA_7
+#define DMACCRLA_7 DMAC.CRLA_7
+#define DMACDCTRL_0_7 DMAC.DCTRL_0_7
+#define DMACDSTAT_EN_0_7 DMAC.DSTAT_EN_0_7
+#define DMACDSTAT_ER_0_7 DMAC.DSTAT_ER_0_7
+#define DMACDSTAT_END_0_7 DMAC.DSTAT_END_0_7
+#define DMACDSTAT_TC_0_7 DMAC.DSTAT_TC_0_7
+#define DMACDSTAT_SUS_0_7 DMAC.DSTAT_SUS_0_7
+#define DMACN0SA_8 DMAC.N0SA_8
+#define DMACN0DA_8 DMAC.N0DA_8
+#define DMACN0TB_8 DMAC.N0TB_8
+#define DMACN1SA_8 DMAC.N1SA_8
+#define DMACN1DA_8 DMAC.N1DA_8
+#define DMACN1TB_8 DMAC.N1TB_8
+#define DMACCRSA_8 DMAC.CRSA_8
+#define DMACCRDA_8 DMAC.CRDA_8
+#define DMACCRTB_8 DMAC.CRTB_8
+#define DMACCHSTAT_8 DMAC.CHSTAT_8
+#define DMACCHCTRL_8 DMAC.CHCTRL_8
+#define DMACCHCFG_8 DMAC.CHCFG_8
+#define DMACCHITVL_8 DMAC.CHITVL_8
+#define DMACCHEXT_8 DMAC.CHEXT_8
+#define DMACNXLA_8 DMAC.NXLA_8
+#define DMACCRLA_8 DMAC.CRLA_8
+#define DMACN0SA_9 DMAC.N0SA_9
+#define DMACN0DA_9 DMAC.N0DA_9
+#define DMACN0TB_9 DMAC.N0TB_9
+#define DMACN1SA_9 DMAC.N1SA_9
+#define DMACN1DA_9 DMAC.N1DA_9
+#define DMACN1TB_9 DMAC.N1TB_9
+#define DMACCRSA_9 DMAC.CRSA_9
+#define DMACCRDA_9 DMAC.CRDA_9
+#define DMACCRTB_9 DMAC.CRTB_9
+#define DMACCHSTAT_9 DMAC.CHSTAT_9
+#define DMACCHCTRL_9 DMAC.CHCTRL_9
+#define DMACCHCFG_9 DMAC.CHCFG_9
+#define DMACCHITVL_9 DMAC.CHITVL_9
+#define DMACCHEXT_9 DMAC.CHEXT_9
+#define DMACNXLA_9 DMAC.NXLA_9
+#define DMACCRLA_9 DMAC.CRLA_9
+#define DMACN0SA_10 DMAC.N0SA_10
+#define DMACN0DA_10 DMAC.N0DA_10
+#define DMACN0TB_10 DMAC.N0TB_10
+#define DMACN1SA_10 DMAC.N1SA_10
+#define DMACN1DA_10 DMAC.N1DA_10
+#define DMACN1TB_10 DMAC.N1TB_10
+#define DMACCRSA_10 DMAC.CRSA_10
+#define DMACCRDA_10 DMAC.CRDA_10
+#define DMACCRTB_10 DMAC.CRTB_10
+#define DMACCHSTAT_10 DMAC.CHSTAT_10
+#define DMACCHCTRL_10 DMAC.CHCTRL_10
+#define DMACCHCFG_10 DMAC.CHCFG_10
+#define DMACCHITVL_10 DMAC.CHITVL_10
+#define DMACCHEXT_10 DMAC.CHEXT_10
+#define DMACNXLA_10 DMAC.NXLA_10
+#define DMACCRLA_10 DMAC.CRLA_10
+#define DMACN0SA_11 DMAC.N0SA_11
+#define DMACN0DA_11 DMAC.N0DA_11
+#define DMACN0TB_11 DMAC.N0TB_11
+#define DMACN1SA_11 DMAC.N1SA_11
+#define DMACN1DA_11 DMAC.N1DA_11
+#define DMACN1TB_11 DMAC.N1TB_11
+#define DMACCRSA_11 DMAC.CRSA_11
+#define DMACCRDA_11 DMAC.CRDA_11
+#define DMACCRTB_11 DMAC.CRTB_11
+#define DMACCHSTAT_11 DMAC.CHSTAT_11
+#define DMACCHCTRL_11 DMAC.CHCTRL_11
+#define DMACCHCFG_11 DMAC.CHCFG_11
+#define DMACCHITVL_11 DMAC.CHITVL_11
+#define DMACCHEXT_11 DMAC.CHEXT_11
+#define DMACNXLA_11 DMAC.NXLA_11
+#define DMACCRLA_11 DMAC.CRLA_11
+#define DMACN0SA_12 DMAC.N0SA_12
+#define DMACN0DA_12 DMAC.N0DA_12
+#define DMACN0TB_12 DMAC.N0TB_12
+#define DMACN1SA_12 DMAC.N1SA_12
+#define DMACN1DA_12 DMAC.N1DA_12
+#define DMACN1TB_12 DMAC.N1TB_12
+#define DMACCRSA_12 DMAC.CRSA_12
+#define DMACCRDA_12 DMAC.CRDA_12
+#define DMACCRTB_12 DMAC.CRTB_12
+#define DMACCHSTAT_12 DMAC.CHSTAT_12
+#define DMACCHCTRL_12 DMAC.CHCTRL_12
+#define DMACCHCFG_12 DMAC.CHCFG_12
+#define DMACCHITVL_12 DMAC.CHITVL_12
+#define DMACCHEXT_12 DMAC.CHEXT_12
+#define DMACNXLA_12 DMAC.NXLA_12
+#define DMACCRLA_12 DMAC.CRLA_12
+#define DMACN0SA_13 DMAC.N0SA_13
+#define DMACN0DA_13 DMAC.N0DA_13
+#define DMACN0TB_13 DMAC.N0TB_13
+#define DMACN1SA_13 DMAC.N1SA_13
+#define DMACN1DA_13 DMAC.N1DA_13
+#define DMACN1TB_13 DMAC.N1TB_13
+#define DMACCRSA_13 DMAC.CRSA_13
+#define DMACCRDA_13 DMAC.CRDA_13
+#define DMACCRTB_13 DMAC.CRTB_13
+#define DMACCHSTAT_13 DMAC.CHSTAT_13
+#define DMACCHCTRL_13 DMAC.CHCTRL_13
+#define DMACCHCFG_13 DMAC.CHCFG_13
+#define DMACCHITVL_13 DMAC.CHITVL_13
+#define DMACCHEXT_13 DMAC.CHEXT_13
+#define DMACNXLA_13 DMAC.NXLA_13
+#define DMACCRLA_13 DMAC.CRLA_13
+#define DMACN0SA_14 DMAC.N0SA_14
+#define DMACN0DA_14 DMAC.N0DA_14
+#define DMACN0TB_14 DMAC.N0TB_14
+#define DMACN1SA_14 DMAC.N1SA_14
+#define DMACN1DA_14 DMAC.N1DA_14
+#define DMACN1TB_14 DMAC.N1TB_14
+#define DMACCRSA_14 DMAC.CRSA_14
+#define DMACCRDA_14 DMAC.CRDA_14
+#define DMACCRTB_14 DMAC.CRTB_14
+#define DMACCHSTAT_14 DMAC.CHSTAT_14
+#define DMACCHCTRL_14 DMAC.CHCTRL_14
+#define DMACCHCFG_14 DMAC.CHCFG_14
+#define DMACCHITVL_14 DMAC.CHITVL_14
+#define DMACCHEXT_14 DMAC.CHEXT_14
+#define DMACNXLA_14 DMAC.NXLA_14
+#define DMACCRLA_14 DMAC.CRLA_14
+#define DMACN0SA_15 DMAC.N0SA_15
+#define DMACN0DA_15 DMAC.N0DA_15
+#define DMACN0TB_15 DMAC.N0TB_15
+#define DMACN1SA_15 DMAC.N1SA_15
+#define DMACN1DA_15 DMAC.N1DA_15
+#define DMACN1TB_15 DMAC.N1TB_15
+#define DMACCRSA_15 DMAC.CRSA_15
+#define DMACCRDA_15 DMAC.CRDA_15
+#define DMACCRTB_15 DMAC.CRTB_15
+#define DMACCHSTAT_15 DMAC.CHSTAT_15
+#define DMACCHCTRL_15 DMAC.CHCTRL_15
+#define DMACCHCFG_15 DMAC.CHCFG_15
+#define DMACCHITVL_15 DMAC.CHITVL_15
+#define DMACCHEXT_15 DMAC.CHEXT_15
+#define DMACNXLA_15 DMAC.NXLA_15
+#define DMACCRLA_15 DMAC.CRLA_15
+#define DMACDCTRL_8_15 DMAC.DCTRL_8_15
+#define DMACDSTAT_EN_8_15 DMAC.DSTAT_EN_8_15
+#define DMACDSTAT_ER_8_15 DMAC.DSTAT_ER_8_15
+#define DMACDSTAT_END_8_15 DMAC.DSTAT_END_8_15
+#define DMACDSTAT_TC_8_15 DMAC.DSTAT_TC_8_15
+#define DMACDSTAT_SUS_8_15 DMAC.DSTAT_SUS_8_15
+#define DMACDMARS0 DMAC.DMARS0
+#define DMACDMARS1 DMAC.DMARS1
+#define DMACDMARS2 DMAC.DMARS2
+#define DMACDMARS3 DMAC.DMARS3
+#define DMACDMARS4 DMAC.DMARS4
+#define DMACDMARS5 DMAC.DMARS5
+#define DMACDMARS6 DMAC.DMARS6
+#define DMACDMARS7 DMAC.DMARS7
+/* <-SEC M1.10.1 */
+/* <-QAC 0639 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/dvdec_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/dvdec_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/dvdec_iodefine.h	(revision 270)
@@ -0,0 +1,391 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : dvdec_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef DVDEC_IODEFINE_H
+#define DVDEC_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_dvdec
+{                                                          /* DVDEC            */
+    volatile uint16_t ADCCR1;                                 /*  ADCCR1          */
+    volatile uint8_t   dummy1[4];                              /*                  */
+#define DVDEC_TGCRn_COUNT 3
+    volatile uint16_t TGCR1;                                  /*  TGCR1           */
+    volatile uint16_t TGCR2;                                  /*  TGCR2           */
+    volatile uint16_t TGCR3;                                  /*  TGCR3           */
+    volatile uint8_t   dummy2[6];                              /*                  */
+#define DVDEC_SYNSCRn_COUNT 5
+    volatile uint16_t SYNSCR1;                                /*  SYNSCR1         */
+    volatile uint16_t SYNSCR2;                                /*  SYNSCR2         */
+    volatile uint16_t SYNSCR3;                                /*  SYNSCR3         */
+    volatile uint16_t SYNSCR4;                                /*  SYNSCR4         */
+    volatile uint16_t SYNSCR5;                                /*  SYNSCR5         */
+#define DVDEC_HAFCCRn_COUNT 3
+    volatile uint16_t HAFCCR1;                                /*  HAFCCR1         */
+    volatile uint16_t HAFCCR2;                                /*  HAFCCR2         */
+    volatile uint16_t HAFCCR3;                                /*  HAFCCR3         */
+    volatile uint16_t VCDWCR1;                                /*  VCDWCR1         */
+    volatile uint8_t   dummy3[4];                              /*                  */
+#define DVDEC_DCPCRn_COUNT 8
+    volatile uint16_t DCPCR1;                                 /*  DCPCR1          */
+    volatile uint16_t DCPCR2;                                 /*  DCPCR2          */
+    volatile uint16_t DCPCR3;                                 /*  DCPCR3          */
+    volatile uint16_t DCPCR4;                                 /*  DCPCR4          */
+    volatile uint16_t DCPCR5;                                 /*  DCPCR5          */
+    volatile uint16_t DCPCR6;                                 /*  DCPCR6          */
+    volatile uint16_t DCPCR7;                                 /*  DCPCR7          */
+    volatile uint16_t DCPCR8;                                 /*  DCPCR8          */
+    volatile uint16_t NSDCR;                                  /*  NSDCR           */
+    volatile uint16_t BTLCR;                                  /*  BTLCR           */
+    volatile uint16_t BTGPCR;                                 /*  BTGPCR          */
+#define DVDEC_ACCCRn_COUNT 3
+    volatile uint16_t ACCCR1;                                 /*  ACCCR1          */
+    volatile uint16_t ACCCR2;                                 /*  ACCCR2          */
+    volatile uint16_t ACCCR3;                                 /*  ACCCR3          */
+    volatile uint16_t TINTCR;                                 /*  TINTCR          */
+    volatile uint16_t YCDCR;                                  /*  YCDCR           */
+#define DVDEC_AGCCRn_COUNT 2
+    volatile uint16_t AGCCR1;                                 /*  AGCCR1          */
+    volatile uint16_t AGCCR2;                                 /*  AGCCR2          */
+    volatile uint16_t PKLIMITCR;                              /*  PKLIMITCR       */
+#define DVDEC_RGORCRn_COUNT 7
+    volatile uint16_t RGORCR1;                                /*  RGORCR1         */
+    volatile uint16_t RGORCR2;                                /*  RGORCR2         */
+    volatile uint16_t RGORCR3;                                /*  RGORCR3         */
+    volatile uint16_t RGORCR4;                                /*  RGORCR4         */
+    volatile uint16_t RGORCR5;                                /*  RGORCR5         */
+    volatile uint16_t RGORCR6;                                /*  RGORCR6         */
+    volatile uint16_t RGORCR7;                                /*  RGORCR7         */
+    volatile uint8_t   dummy4[24];                             /*                  */
+    volatile uint16_t AFCPFCR;                                /*  AFCPFCR         */
+    volatile uint16_t RUPDCR;                                 /*  RUPDCR          */
+    volatile uint16_t VSYNCSR;                                /*  VSYNCSR         */
+    volatile uint16_t HSYNCSR;                                /*  HSYNCSR         */
+#define DVDEC_DCPSRn_COUNT 2
+    volatile uint16_t DCPSR1;                                 /*  DCPSR1          */
+    volatile uint16_t DCPSR2;                                 /*  DCPSR2          */
+    volatile uint8_t   dummy5[4];                              /*                  */
+    volatile uint16_t NSDSR;                                  /*  NSDSR           */
+#define DVDEC_CROMASRn_COUNT 2
+    volatile uint16_t CROMASR1;                               /*  CROMASR1        */
+    volatile uint16_t CROMASR2;                               /*  CROMASR2        */
+    volatile uint16_t SYNCSSR;                                /*  SYNCSSR         */
+#define DVDEC_AGCCSRn_COUNT 2
+    volatile uint16_t AGCCSR1;                                /*  AGCCSR1         */
+    volatile uint16_t AGCCSR2;                                /*  AGCCSR2         */
+    volatile uint8_t   dummy6[108];                            /*                  */
+#define DVDEC_YCSCRn_COUNT 7
+    volatile uint16_t YCSCR3;                                 /*  YCSCR3          */
+    volatile uint16_t YCSCR4;                                 /*  YCSCR4          */
+    volatile uint16_t YCSCR5;                                 /*  YCSCR5          */
+    volatile uint16_t YCSCR6;                                 /*  YCSCR6          */
+    volatile uint16_t YCSCR7;                                 /*  YCSCR7          */
+    volatile uint16_t YCSCR8;                                 /*  YCSCR8          */
+    volatile uint16_t YCSCR9;                                 /*  YCSCR9          */
+    volatile uint8_t   dummy7[2];                              /*                  */
+    volatile uint16_t YCSCR11;                                /*  YCSCR11         */
+    volatile uint16_t YCSCR12;                                /*  YCSCR12         */
+    volatile uint8_t   dummy8[104];                            /*                  */
+    volatile uint16_t DCPCR9;                                 /*  DCPCR9          */
+    volatile uint8_t   dummy9[16];                             /*                  */
+#define DVDEC_YCTWA_Fn_COUNT 9
+    volatile uint16_t YCTWA_F0;                               /*  YCTWA_F0        */
+    volatile uint16_t YCTWA_F1;                               /*  YCTWA_F1        */
+    volatile uint16_t YCTWA_F2;                               /*  YCTWA_F2        */
+    volatile uint16_t YCTWA_F3;                               /*  YCTWA_F3        */
+    volatile uint16_t YCTWA_F4;                               /*  YCTWA_F4        */
+    volatile uint16_t YCTWA_F5;                               /*  YCTWA_F5        */
+    volatile uint16_t YCTWA_F6;                               /*  YCTWA_F6        */
+    volatile uint16_t YCTWA_F7;                               /*  YCTWA_F7        */
+    volatile uint16_t YCTWA_F8;                               /*  YCTWA_F8        */
+#define DVDEC_YCTWB_Fn_COUNT 9
+    volatile uint16_t YCTWB_F0;                               /*  YCTWB_F0        */
+    volatile uint16_t YCTWB_F1;                               /*  YCTWB_F1        */
+    volatile uint16_t YCTWB_F2;                               /*  YCTWB_F2        */
+    volatile uint16_t YCTWB_F3;                               /*  YCTWB_F3        */
+    volatile uint16_t YCTWB_F4;                               /*  YCTWB_F4        */
+    volatile uint16_t YCTWB_F5;                               /*  YCTWB_F5        */
+    volatile uint16_t YCTWB_F6;                               /*  YCTWB_F6        */
+    volatile uint16_t YCTWB_F7;                               /*  YCTWB_F7        */
+    volatile uint16_t YCTWB_F8;                               /*  YCTWB_F8        */
+#define DVDEC_YCTNA_Fn_COUNT 9
+    volatile uint16_t YCTNA_F0;                               /*  YCTNA_F0        */
+    volatile uint16_t YCTNA_F1;                               /*  YCTNA_F1        */
+    volatile uint16_t YCTNA_F2;                               /*  YCTNA_F2        */
+    volatile uint16_t YCTNA_F3;                               /*  YCTNA_F3        */
+    volatile uint16_t YCTNA_F4;                               /*  YCTNA_F4        */
+    volatile uint16_t YCTNA_F5;                               /*  YCTNA_F5        */
+    volatile uint16_t YCTNA_F6;                               /*  YCTNA_F6        */
+    volatile uint16_t YCTNA_F7;                               /*  YCTNA_F7        */
+    volatile uint16_t YCTNA_F8;                               /*  YCTNA_F8        */
+#define DVDEC_YCTNB_Fn_COUNT 9
+    volatile uint16_t YCTNB_F0;                               /*  YCTNB_F0        */
+    volatile uint16_t YCTNB_F1;                               /*  YCTNB_F1        */
+    volatile uint16_t YCTNB_F2;                               /*  YCTNB_F2        */
+    volatile uint16_t YCTNB_F3;                               /*  YCTNB_F3        */
+    volatile uint16_t YCTNB_F4;                               /*  YCTNB_F4        */
+    volatile uint16_t YCTNB_F5;                               /*  YCTNB_F5        */
+    volatile uint16_t YCTNB_F6;                               /*  YCTNB_F6        */
+    volatile uint16_t YCTNB_F7;                               /*  YCTNB_F7        */
+    volatile uint16_t YCTNB_F8;                               /*  YCTNB_F8        */
+    volatile uint8_t   dummy10[38];                            /*                  */
+    volatile uint16_t YGAINCR;                                /*  YGAINCR         */
+    volatile uint16_t CBGAINCR;                               /*  CBGAINCR        */
+    volatile uint16_t CRGAINCR;                               /*  CRGAINCR        */
+    volatile uint8_t   dummy11[122];                           /*                  */
+    volatile uint16_t PGA_UPDATE;                             /*  PGA_UPDATE      */
+    volatile uint16_t PGACR;                                  /*  PGACR           */
+    volatile uint16_t ADCCR2;                                 /*  ADCCR2          */
+};
+
+
+#define DVDEC1  (*(struct st_dvdec   *)0xFCFFA008uL) /* DVDEC1 */
+#define DVDEC0  (*(struct st_dvdec   *)0xFCFFB808uL) /* DVDEC0 */
+
+
+/* Start of channnel array defines of DVDEC */
+
+/* Channnel array defines of DVDEC */
+/*(Sample) value = DVDEC[ channel ]->ADCCR1; */
+#define DVDEC_COUNT  2
+#define DVDEC_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &DVDEC0, &DVDEC1 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+
+/* End of channnel array defines of DVDEC */
+
+
+#define ADCCR1_1 DVDEC1.ADCCR1
+#define TGCR1_1 DVDEC1.TGCR1
+#define TGCR2_1 DVDEC1.TGCR2
+#define TGCR3_1 DVDEC1.TGCR3
+#define SYNSCR1_1 DVDEC1.SYNSCR1
+#define SYNSCR2_1 DVDEC1.SYNSCR2
+#define SYNSCR3_1 DVDEC1.SYNSCR3
+#define SYNSCR4_1 DVDEC1.SYNSCR4
+#define SYNSCR5_1 DVDEC1.SYNSCR5
+#define HAFCCR1_1 DVDEC1.HAFCCR1
+#define HAFCCR2_1 DVDEC1.HAFCCR2
+#define HAFCCR3_1 DVDEC1.HAFCCR3
+#define VCDWCR1_1 DVDEC1.VCDWCR1
+#define DCPCR1_1 DVDEC1.DCPCR1
+#define DCPCR2_1 DVDEC1.DCPCR2
+#define DCPCR3_1 DVDEC1.DCPCR3
+#define DCPCR4_1 DVDEC1.DCPCR4
+#define DCPCR5_1 DVDEC1.DCPCR5
+#define DCPCR6_1 DVDEC1.DCPCR6
+#define DCPCR7_1 DVDEC1.DCPCR7
+#define DCPCR8_1 DVDEC1.DCPCR8
+#define NSDCR_1 DVDEC1.NSDCR
+#define BTLCR_1 DVDEC1.BTLCR
+#define BTGPCR_1 DVDEC1.BTGPCR
+#define ACCCR1_1 DVDEC1.ACCCR1
+#define ACCCR2_1 DVDEC1.ACCCR2
+#define ACCCR3_1 DVDEC1.ACCCR3
+#define TINTCR_1 DVDEC1.TINTCR
+#define YCDCR_1 DVDEC1.YCDCR
+#define AGCCR1_1 DVDEC1.AGCCR1
+#define AGCCR2_1 DVDEC1.AGCCR2
+#define PKLIMITCR_1 DVDEC1.PKLIMITCR
+#define RGORCR1_1 DVDEC1.RGORCR1
+#define RGORCR2_1 DVDEC1.RGORCR2
+#define RGORCR3_1 DVDEC1.RGORCR3
+#define RGORCR4_1 DVDEC1.RGORCR4
+#define RGORCR5_1 DVDEC1.RGORCR5
+#define RGORCR6_1 DVDEC1.RGORCR6
+#define RGORCR7_1 DVDEC1.RGORCR7
+#define AFCPFCR_1 DVDEC1.AFCPFCR
+#define RUPDCR_1 DVDEC1.RUPDCR
+#define VSYNCSR_1 DVDEC1.VSYNCSR
+#define HSYNCSR_1 DVDEC1.HSYNCSR
+#define DCPSR1_1 DVDEC1.DCPSR1
+#define DCPSR2_1 DVDEC1.DCPSR2
+#define NSDSR_1 DVDEC1.NSDSR
+#define CROMASR1_1 DVDEC1.CROMASR1
+#define CROMASR2_1 DVDEC1.CROMASR2
+#define SYNCSSR_1 DVDEC1.SYNCSSR
+#define AGCCSR1_1 DVDEC1.AGCCSR1
+#define AGCCSR2_1 DVDEC1.AGCCSR2
+#define YCSCR3_1 DVDEC1.YCSCR3
+#define YCSCR4_1 DVDEC1.YCSCR4
+#define YCSCR5_1 DVDEC1.YCSCR5
+#define YCSCR6_1 DVDEC1.YCSCR6
+#define YCSCR7_1 DVDEC1.YCSCR7
+#define YCSCR8_1 DVDEC1.YCSCR8
+#define YCSCR9_1 DVDEC1.YCSCR9
+#define YCSCR11_1 DVDEC1.YCSCR11
+#define YCSCR12_1 DVDEC1.YCSCR12
+#define DCPCR9_1 DVDEC1.DCPCR9
+#define YCTWA_F0_1 DVDEC1.YCTWA_F0
+#define YCTWA_F1_1 DVDEC1.YCTWA_F1
+#define YCTWA_F2_1 DVDEC1.YCTWA_F2
+#define YCTWA_F3_1 DVDEC1.YCTWA_F3
+#define YCTWA_F4_1 DVDEC1.YCTWA_F4
+#define YCTWA_F5_1 DVDEC1.YCTWA_F5
+#define YCTWA_F6_1 DVDEC1.YCTWA_F6
+#define YCTWA_F7_1 DVDEC1.YCTWA_F7
+#define YCTWA_F8_1 DVDEC1.YCTWA_F8
+#define YCTWB_F0_1 DVDEC1.YCTWB_F0
+#define YCTWB_F1_1 DVDEC1.YCTWB_F1
+#define YCTWB_F2_1 DVDEC1.YCTWB_F2
+#define YCTWB_F3_1 DVDEC1.YCTWB_F3
+#define YCTWB_F4_1 DVDEC1.YCTWB_F4
+#define YCTWB_F5_1 DVDEC1.YCTWB_F5
+#define YCTWB_F6_1 DVDEC1.YCTWB_F6
+#define YCTWB_F7_1 DVDEC1.YCTWB_F7
+#define YCTWB_F8_1 DVDEC1.YCTWB_F8
+#define YCTNA_F0_1 DVDEC1.YCTNA_F0
+#define YCTNA_F1_1 DVDEC1.YCTNA_F1
+#define YCTNA_F2_1 DVDEC1.YCTNA_F2
+#define YCTNA_F3_1 DVDEC1.YCTNA_F3
+#define YCTNA_F4_1 DVDEC1.YCTNA_F4
+#define YCTNA_F5_1 DVDEC1.YCTNA_F5
+#define YCTNA_F6_1 DVDEC1.YCTNA_F6
+#define YCTNA_F7_1 DVDEC1.YCTNA_F7
+#define YCTNA_F8_1 DVDEC1.YCTNA_F8
+#define YCTNB_F0_1 DVDEC1.YCTNB_F0
+#define YCTNB_F1_1 DVDEC1.YCTNB_F1
+#define YCTNB_F2_1 DVDEC1.YCTNB_F2
+#define YCTNB_F3_1 DVDEC1.YCTNB_F3
+#define YCTNB_F4_1 DVDEC1.YCTNB_F4
+#define YCTNB_F5_1 DVDEC1.YCTNB_F5
+#define YCTNB_F6_1 DVDEC1.YCTNB_F6
+#define YCTNB_F7_1 DVDEC1.YCTNB_F7
+#define YCTNB_F8_1 DVDEC1.YCTNB_F8
+#define YGAINCR_1 DVDEC1.YGAINCR
+#define CBGAINCR_1 DVDEC1.CBGAINCR
+#define CRGAINCR_1 DVDEC1.CRGAINCR
+#define PGA_UPDATE_1 DVDEC1.PGA_UPDATE
+#define PGACR_1 DVDEC1.PGACR
+#define ADCCR2_1 DVDEC1.ADCCR2
+#define ADCCR1_0 DVDEC0.ADCCR1
+#define TGCR1_0 DVDEC0.TGCR1
+#define TGCR2_0 DVDEC0.TGCR2
+#define TGCR3_0 DVDEC0.TGCR3
+#define SYNSCR1_0 DVDEC0.SYNSCR1
+#define SYNSCR2_0 DVDEC0.SYNSCR2
+#define SYNSCR3_0 DVDEC0.SYNSCR3
+#define SYNSCR4_0 DVDEC0.SYNSCR4
+#define SYNSCR5_0 DVDEC0.SYNSCR5
+#define HAFCCR1_0 DVDEC0.HAFCCR1
+#define HAFCCR2_0 DVDEC0.HAFCCR2
+#define HAFCCR3_0 DVDEC0.HAFCCR3
+#define VCDWCR1_0 DVDEC0.VCDWCR1
+#define DCPCR1_0 DVDEC0.DCPCR1
+#define DCPCR2_0 DVDEC0.DCPCR2
+#define DCPCR3_0 DVDEC0.DCPCR3
+#define DCPCR4_0 DVDEC0.DCPCR4
+#define DCPCR5_0 DVDEC0.DCPCR5
+#define DCPCR6_0 DVDEC0.DCPCR6
+#define DCPCR7_0 DVDEC0.DCPCR7
+#define DCPCR8_0 DVDEC0.DCPCR8
+#define NSDCR_0 DVDEC0.NSDCR
+#define BTLCR_0 DVDEC0.BTLCR
+#define BTGPCR_0 DVDEC0.BTGPCR
+#define ACCCR1_0 DVDEC0.ACCCR1
+#define ACCCR2_0 DVDEC0.ACCCR2
+#define ACCCR3_0 DVDEC0.ACCCR3
+#define TINTCR_0 DVDEC0.TINTCR
+#define YCDCR_0 DVDEC0.YCDCR
+#define AGCCR1_0 DVDEC0.AGCCR1
+#define AGCCR2_0 DVDEC0.AGCCR2
+#define PKLIMITCR_0 DVDEC0.PKLIMITCR
+#define RGORCR1_0 DVDEC0.RGORCR1
+#define RGORCR2_0 DVDEC0.RGORCR2
+#define RGORCR3_0 DVDEC0.RGORCR3
+#define RGORCR4_0 DVDEC0.RGORCR4
+#define RGORCR5_0 DVDEC0.RGORCR5
+#define RGORCR6_0 DVDEC0.RGORCR6
+#define RGORCR7_0 DVDEC0.RGORCR7
+#define AFCPFCR_0 DVDEC0.AFCPFCR
+#define RUPDCR_0 DVDEC0.RUPDCR
+#define VSYNCSR_0 DVDEC0.VSYNCSR
+#define HSYNCSR_0 DVDEC0.HSYNCSR
+#define DCPSR1_0 DVDEC0.DCPSR1
+#define DCPSR2_0 DVDEC0.DCPSR2
+#define NSDSR_0 DVDEC0.NSDSR
+#define CROMASR1_0 DVDEC0.CROMASR1
+#define CROMASR2_0 DVDEC0.CROMASR2
+#define SYNCSSR_0 DVDEC0.SYNCSSR
+#define AGCCSR1_0 DVDEC0.AGCCSR1
+#define AGCCSR2_0 DVDEC0.AGCCSR2
+#define YCSCR3_0 DVDEC0.YCSCR3
+#define YCSCR4_0 DVDEC0.YCSCR4
+#define YCSCR5_0 DVDEC0.YCSCR5
+#define YCSCR6_0 DVDEC0.YCSCR6
+#define YCSCR7_0 DVDEC0.YCSCR7
+#define YCSCR8_0 DVDEC0.YCSCR8
+#define YCSCR9_0 DVDEC0.YCSCR9
+#define YCSCR11_0 DVDEC0.YCSCR11
+#define YCSCR12_0 DVDEC0.YCSCR12
+#define DCPCR9_0 DVDEC0.DCPCR9
+#define YCTWA_F0_0 DVDEC0.YCTWA_F0
+#define YCTWA_F1_0 DVDEC0.YCTWA_F1
+#define YCTWA_F2_0 DVDEC0.YCTWA_F2
+#define YCTWA_F3_0 DVDEC0.YCTWA_F3
+#define YCTWA_F4_0 DVDEC0.YCTWA_F4
+#define YCTWA_F5_0 DVDEC0.YCTWA_F5
+#define YCTWA_F6_0 DVDEC0.YCTWA_F6
+#define YCTWA_F7_0 DVDEC0.YCTWA_F7
+#define YCTWA_F8_0 DVDEC0.YCTWA_F8
+#define YCTWB_F0_0 DVDEC0.YCTWB_F0
+#define YCTWB_F1_0 DVDEC0.YCTWB_F1
+#define YCTWB_F2_0 DVDEC0.YCTWB_F2
+#define YCTWB_F3_0 DVDEC0.YCTWB_F3
+#define YCTWB_F4_0 DVDEC0.YCTWB_F4
+#define YCTWB_F5_0 DVDEC0.YCTWB_F5
+#define YCTWB_F6_0 DVDEC0.YCTWB_F6
+#define YCTWB_F7_0 DVDEC0.YCTWB_F7
+#define YCTWB_F8_0 DVDEC0.YCTWB_F8
+#define YCTNA_F0_0 DVDEC0.YCTNA_F0
+#define YCTNA_F1_0 DVDEC0.YCTNA_F1
+#define YCTNA_F2_0 DVDEC0.YCTNA_F2
+#define YCTNA_F3_0 DVDEC0.YCTNA_F3
+#define YCTNA_F4_0 DVDEC0.YCTNA_F4
+#define YCTNA_F5_0 DVDEC0.YCTNA_F5
+#define YCTNA_F6_0 DVDEC0.YCTNA_F6
+#define YCTNA_F7_0 DVDEC0.YCTNA_F7
+#define YCTNA_F8_0 DVDEC0.YCTNA_F8
+#define YCTNB_F0_0 DVDEC0.YCTNB_F0
+#define YCTNB_F1_0 DVDEC0.YCTNB_F1
+#define YCTNB_F2_0 DVDEC0.YCTNB_F2
+#define YCTNB_F3_0 DVDEC0.YCTNB_F3
+#define YCTNB_F4_0 DVDEC0.YCTNB_F4
+#define YCTNB_F5_0 DVDEC0.YCTNB_F5
+#define YCTNB_F6_0 DVDEC0.YCTNB_F6
+#define YCTNB_F7_0 DVDEC0.YCTNB_F7
+#define YCTNB_F8_0 DVDEC0.YCTNB_F8
+#define YGAINCR_0 DVDEC0.YGAINCR
+#define CBGAINCR_0 DVDEC0.CBGAINCR
+#define CRGAINCR_0 DVDEC0.CRGAINCR
+#define PGA_UPDATE_0 DVDEC0.PGA_UPDATE
+#define PGACR_0 DVDEC0.PGACR
+#define ADCCR2_0 DVDEC0.ADCCR2
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/ether_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/ether_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/ether_iodefine.h	(revision 270)
@@ -0,0 +1,427 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : ether_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef ETHER_IODEFINE_H
+#define ETHER_IODEFINE_H
+/* ->QAC 0639 : Over 127 members (C90) */
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_ether
+{                                                          /* ETHER            */
+    volatile uint32_t  EDSR0;                                  /*  EDSR0           */
+    volatile uint8_t   dummy207[12];                           /*                  */
+    volatile uint32_t  TDLAR0;                                 /*  TDLAR0          */
+    volatile uint32_t  TDFAR0;                                 /*  TDFAR0          */
+    volatile uint32_t  TDFXR0;                                 /*  TDFXR0          */
+    volatile uint32_t  TDFFR0;                                 /*  TDFFR0          */
+    volatile uint8_t   dummy208[16];                           /*                  */
+    volatile uint32_t  RDLAR0;                                 /*  RDLAR0          */
+    volatile uint32_t  RDFAR0;                                 /*  RDFAR0          */
+    volatile uint32_t  RDFXR0;                                 /*  RDFXR0          */
+    volatile uint32_t  RDFFR0;                                 /*  RDFFR0          */
+    volatile uint8_t   dummy209[960];                          /*                  */
+    volatile uint32_t  EDMR0;                                  /*  EDMR0           */
+    volatile uint8_t   dummy210[4];                            /*                  */
+    volatile uint32_t  EDTRR0;                                 /*  EDTRR0          */
+    volatile uint8_t   dummy211[4];                            /*                  */
+    volatile uint32_t  EDRRR0;                                 /*  EDRRR0          */
+    volatile uint8_t   dummy212[20];                           /*                  */
+    volatile uint32_t  EESR0;                                  /*  EESR0           */
+    volatile uint8_t   dummy213[4];                            /*                  */
+    volatile uint32_t  EESIPR0;                                /*  EESIPR0         */
+    volatile uint8_t   dummy214[4];                            /*                  */
+    volatile uint32_t  TRSCER0;                                /*  TRSCER0         */
+    volatile uint8_t   dummy215[4];                            /*                  */
+    volatile uint32_t  RMFCR0;                                 /*  RMFCR0          */
+    volatile uint8_t   dummy216[4];                            /*                  */
+    volatile uint32_t  TFTR0;                                  /*  TFTR0           */
+    volatile uint8_t   dummy217[4];                            /*                  */
+    volatile uint32_t  FDR0;                                   /*  FDR0            */
+    volatile uint8_t   dummy218[4];                            /*                  */
+    volatile uint32_t  RMCR0;                                  /*  RMCR0           */
+    volatile uint8_t   dummy219[4];                            /*                  */
+    volatile uint32_t  RPADIR0;                                /*  RPADIR0         */
+    volatile uint8_t   dummy220[4];                            /*                  */
+    volatile uint32_t  FCFTR0;                                 /*  FCFTR0          */
+    volatile uint8_t   dummy221[120];                          /*                  */
+    volatile uint32_t  CSMR;                                   /*  CSMR            */
+    volatile uint32_t  CSSBM;                                  /*  CSSBM           */
+    volatile uint32_t  CSSMR;                                  /*  CSSMR           */
+    volatile uint8_t   dummy222[16];                           /*                  */
+    volatile uint32_t  ECMR0;                                  /*  ECMR0           */
+    volatile uint8_t   dummy223[4];                            /*                  */
+    volatile uint32_t  RFLR0;                                  /*  RFLR0           */
+    volatile uint8_t   dummy224[4];                            /*                  */
+    volatile uint32_t  ECSR0;                                  /*  ECSR0           */
+    volatile uint8_t   dummy225[4];                            /*                  */
+    volatile uint32_t  ECSIPR0;                                /*  ECSIPR0         */
+    volatile uint8_t   dummy226[4];                            /*                  */
+    volatile uint32_t  PIR0;                                   /*  PIR0            */
+    volatile uint8_t   dummy227[48];                           /*                  */
+    volatile uint32_t  APR0;                                   /*  APR0            */
+    volatile uint32_t  MPR0;                                   /*  MPR0            */
+    volatile uint32_t  PFTCR0;                                 /*  PFTCR0          */
+    volatile uint32_t  PFRCR0;                                 /*  PFRCR0          */
+    volatile uint32_t  TPAUSER0;                               /*  TPAUSER0        */
+    volatile uint8_t   dummy228[88];                           /*                  */
+    volatile uint32_t  MAHR0;                                  /*  MAHR0           */
+    volatile uint8_t   dummy229[4];                            /*                  */
+    volatile uint32_t  MALR0;                                  /*  MALR0           */
+    volatile uint8_t   dummy230[372];                          /*                  */
+    volatile uint32_t  CEFCR0;                                 /*  CEFCR0          */
+    volatile uint8_t   dummy231[4];                            /*                  */
+    volatile uint32_t  FRECR0;                                 /*  FRECR0          */
+    volatile uint8_t   dummy232[4];                            /*                  */
+    volatile uint32_t  TSFRCR0;                                /*  TSFRCR0         */
+    volatile uint8_t   dummy233[4];                            /*                  */
+    volatile uint32_t  TLFRCR0;                                /*  TLFRCR0         */
+    volatile uint8_t   dummy234[4];                            /*                  */
+    volatile uint32_t  RFCR0;                                  /*  RFCR0           */
+    volatile uint8_t   dummy235[20];                           /*                  */
+    volatile uint32_t  MAFCR0;                                 /*  MAFCR0          */
+    volatile uint8_t   dummy236[4228];                         /*                  */
+    volatile uint32_t  ARSTR;                                  /*  ARSTR           */
+    volatile uint32_t  TSU_CTRST;                              /*  TSU_CTRST       */
+    volatile uint8_t   dummy237[80];                           /*                  */
+    volatile uint32_t  TSU_VTAG0;                              /*  TSU_VTAG0       */
+    volatile uint8_t   dummy238[4];                            /*                  */
+    volatile uint32_t  TSU_ADSBSY;                             /*  TSU_ADSBSY      */
+    volatile uint32_t  TSU_TEN;                                /*  TSU_TEN         */
+    volatile uint8_t   dummy239[24];                           /*                  */
+    volatile uint32_t  TXNLCR0;                                /*  TXNLCR0         */
+    volatile uint32_t  TXALCR0;                                /*  TXALCR0         */
+    volatile uint32_t  RXNLCR0;                                /*  RXNLCR0         */
+    volatile uint32_t  RXALCR0;                                /*  RXALCR0         */
+    volatile uint8_t   dummy240[112];                          /*                  */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH0;                              /*  TSU_ADRH0       */
+    volatile uint32_t  TSU_ADRL0;                              /*  TSU_ADRL0       */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH1;                              /*  TSU_ADRH1       */
+    volatile uint32_t  TSU_ADRL1;                              /*  TSU_ADRL1       */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH2;                              /*  TSU_ADRH2       */
+    volatile uint32_t  TSU_ADRL2;                              /*  TSU_ADRL2       */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH3;                              /*  TSU_ADRH3       */
+    volatile uint32_t  TSU_ADRL3;                              /*  TSU_ADRL3       */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH4;                              /*  TSU_ADRH4       */
+    volatile uint32_t  TSU_ADRL4;                              /*  TSU_ADRL4       */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH5;                              /*  TSU_ADRH5       */
+    volatile uint32_t  TSU_ADRL5;                              /*  TSU_ADRL5       */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH6;                              /*  TSU_ADRH6       */
+    volatile uint32_t  TSU_ADRL6;                              /*  TSU_ADRL6       */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH7;                              /*  TSU_ADRH7       */
+    volatile uint32_t  TSU_ADRL7;                              /*  TSU_ADRL7       */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH8;                              /*  TSU_ADRH8       */
+    volatile uint32_t  TSU_ADRL8;                              /*  TSU_ADRL8       */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH9;                              /*  TSU_ADRH9       */
+    volatile uint32_t  TSU_ADRL9;                              /*  TSU_ADRL9       */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH10;                             /*  TSU_ADRH10      */
+    volatile uint32_t  TSU_ADRL10;                             /*  TSU_ADRL10      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH11;                             /*  TSU_ADRH11      */
+    volatile uint32_t  TSU_ADRL11;                             /*  TSU_ADRL11      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH12;                             /*  TSU_ADRH12      */
+    volatile uint32_t  TSU_ADRL12;                             /*  TSU_ADRL12      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH13;                             /*  TSU_ADRH13      */
+    volatile uint32_t  TSU_ADRL13;                             /*  TSU_ADRL13      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH14;                             /*  TSU_ADRH14      */
+    volatile uint32_t  TSU_ADRL14;                             /*  TSU_ADRL14      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH15;                             /*  TSU_ADRH15      */
+    volatile uint32_t  TSU_ADRL15;                             /*  TSU_ADRL15      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH16;                             /*  TSU_ADRH16      */
+    volatile uint32_t  TSU_ADRL16;                             /*  TSU_ADRL16      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH17;                             /*  TSU_ADRH17      */
+    volatile uint32_t  TSU_ADRL17;                             /*  TSU_ADRL17      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH18;                             /*  TSU_ADRH18      */
+    volatile uint32_t  TSU_ADRL18;                             /*  TSU_ADRL18      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH19;                             /*  TSU_ADRH19      */
+    volatile uint32_t  TSU_ADRL19;                             /*  TSU_ADRL19      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH20;                             /*  TSU_ADRH20      */
+    volatile uint32_t  TSU_ADRL20;                             /*  TSU_ADRL20      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH21;                             /*  TSU_ADRH21      */
+    volatile uint32_t  TSU_ADRL21;                             /*  TSU_ADRL21      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH22;                             /*  TSU_ADRH22      */
+    volatile uint32_t  TSU_ADRL22;                             /*  TSU_ADRL22      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH23;                             /*  TSU_ADRH23      */
+    volatile uint32_t  TSU_ADRL23;                             /*  TSU_ADRL23      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH24;                             /*  TSU_ADRH24      */
+    volatile uint32_t  TSU_ADRL24;                             /*  TSU_ADRL24      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH25;                             /*  TSU_ADRH25      */
+    volatile uint32_t  TSU_ADRL25;                             /*  TSU_ADRL25      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH26;                             /*  TSU_ADRH26      */
+    volatile uint32_t  TSU_ADRL26;                             /*  TSU_ADRL26      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH27;                             /*  TSU_ADRH27      */
+    volatile uint32_t  TSU_ADRL27;                             /*  TSU_ADRL27      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH28;                             /*  TSU_ADRH28      */
+    volatile uint32_t  TSU_ADRL28;                             /*  TSU_ADRL28      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH29;                             /*  TSU_ADRH29      */
+    volatile uint32_t  TSU_ADRL29;                             /*  TSU_ADRL29      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH30;                             /*  TSU_ADRH30      */
+    volatile uint32_t  TSU_ADRL30;                             /*  TSU_ADRL30      */
+/* end of struct st_ether_from_tsu_adrh0 */
+/* start of struct st_ether_from_tsu_adrh0 */
+    volatile uint32_t  TSU_ADRH31;                             /*  TSU_ADRH31      */
+    volatile uint32_t  TSU_ADRL31;                             /*  TSU_ADRL31      */
+/* end of struct st_ether_from_tsu_adrh0 */
+};
+
+
+struct st_ether_from_tsu_adrh0
+{
+    volatile uint32_t  TSU_ADRH0;                              /*  TSU_ADRH0       */
+    volatile uint32_t  TSU_ADRL0;                              /*  TSU_ADRL0       */
+};
+
+
+#define ETHER   (*(struct st_ether   *)0xE8203000uL) /* ETHER */
+
+
+/* Start of channnel array defines of ETHER */
+
+/* Channnel array defines of ETHER_FROM_TSU_ADRH0_ARRAY */
+/*(Sample) value = ETHER_FROM_TSU_ADRH0_ARRAY[ channel ]->TSU_ADRH0; */
+#define ETHER_FROM_TSU_ADRH0_ARRAY_COUNT  32
+#define ETHER_FROM_TSU_ADRH0_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &ETHER_FROM_TSU_ADRH0, &ETHER_FROM_TSU_ADRH1, &ETHER_FROM_TSU_ADRH2, &ETHER_FROM_TSU_ADRH3, &ETHER_FROM_TSU_ADRH4, &ETHER_FROM_TSU_ADRH5, &ETHER_FROM_TSU_ADRH6, &ETHER_FROM_TSU_ADRH7, \
+    &ETHER_FROM_TSU_ADRH8, &ETHER_FROM_TSU_ADRH9, &ETHER_FROM_TSU_ADRH10, &ETHER_FROM_TSU_ADRH11, &ETHER_FROM_TSU_ADRH12, &ETHER_FROM_TSU_ADRH13, &ETHER_FROM_TSU_ADRH14, &ETHER_FROM_TSU_ADRH15, \
+    &ETHER_FROM_TSU_ADRH16, &ETHER_FROM_TSU_ADRH17, &ETHER_FROM_TSU_ADRH18, &ETHER_FROM_TSU_ADRH19, &ETHER_FROM_TSU_ADRH20, &ETHER_FROM_TSU_ADRH21, &ETHER_FROM_TSU_ADRH22, &ETHER_FROM_TSU_ADRH23, \
+    &ETHER_FROM_TSU_ADRH24, &ETHER_FROM_TSU_ADRH25, &ETHER_FROM_TSU_ADRH26, &ETHER_FROM_TSU_ADRH27, &ETHER_FROM_TSU_ADRH28, &ETHER_FROM_TSU_ADRH29, &ETHER_FROM_TSU_ADRH30, &ETHER_FROM_TSU_ADRH31 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define ETHER_FROM_TSU_ADRH0 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH0) /* ETHER_FROM_TSU_ADRH0 */
+#define ETHER_FROM_TSU_ADRH1 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH1) /* ETHER_FROM_TSU_ADRH1 */
+#define ETHER_FROM_TSU_ADRH2 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH2) /* ETHER_FROM_TSU_ADRH2 */
+#define ETHER_FROM_TSU_ADRH3 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH3) /* ETHER_FROM_TSU_ADRH3 */
+#define ETHER_FROM_TSU_ADRH4 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH4) /* ETHER_FROM_TSU_ADRH4 */
+#define ETHER_FROM_TSU_ADRH5 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH5) /* ETHER_FROM_TSU_ADRH5 */
+#define ETHER_FROM_TSU_ADRH6 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH6) /* ETHER_FROM_TSU_ADRH6 */
+#define ETHER_FROM_TSU_ADRH7 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH7) /* ETHER_FROM_TSU_ADRH7 */
+#define ETHER_FROM_TSU_ADRH8 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH8) /* ETHER_FROM_TSU_ADRH8 */
+#define ETHER_FROM_TSU_ADRH9 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH9) /* ETHER_FROM_TSU_ADRH9 */
+#define ETHER_FROM_TSU_ADRH10 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH10) /* ETHER_FROM_TSU_ADRH10 */
+#define ETHER_FROM_TSU_ADRH11 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH11) /* ETHER_FROM_TSU_ADRH11 */
+#define ETHER_FROM_TSU_ADRH12 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH12) /* ETHER_FROM_TSU_ADRH12 */
+#define ETHER_FROM_TSU_ADRH13 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH13) /* ETHER_FROM_TSU_ADRH13 */
+#define ETHER_FROM_TSU_ADRH14 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH14) /* ETHER_FROM_TSU_ADRH14 */
+#define ETHER_FROM_TSU_ADRH15 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH15) /* ETHER_FROM_TSU_ADRH15 */
+#define ETHER_FROM_TSU_ADRH16 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH16) /* ETHER_FROM_TSU_ADRH16 */
+#define ETHER_FROM_TSU_ADRH17 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH17) /* ETHER_FROM_TSU_ADRH17 */
+#define ETHER_FROM_TSU_ADRH18 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH18) /* ETHER_FROM_TSU_ADRH18 */
+#define ETHER_FROM_TSU_ADRH19 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH19) /* ETHER_FROM_TSU_ADRH19 */
+#define ETHER_FROM_TSU_ADRH20 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH20) /* ETHER_FROM_TSU_ADRH20 */
+#define ETHER_FROM_TSU_ADRH21 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH21) /* ETHER_FROM_TSU_ADRH21 */
+#define ETHER_FROM_TSU_ADRH22 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH22) /* ETHER_FROM_TSU_ADRH22 */
+#define ETHER_FROM_TSU_ADRH23 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH23) /* ETHER_FROM_TSU_ADRH23 */
+#define ETHER_FROM_TSU_ADRH24 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH24) /* ETHER_FROM_TSU_ADRH24 */
+#define ETHER_FROM_TSU_ADRH25 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH25) /* ETHER_FROM_TSU_ADRH25 */
+#define ETHER_FROM_TSU_ADRH26 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH26) /* ETHER_FROM_TSU_ADRH26 */
+#define ETHER_FROM_TSU_ADRH27 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH27) /* ETHER_FROM_TSU_ADRH27 */
+#define ETHER_FROM_TSU_ADRH28 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH28) /* ETHER_FROM_TSU_ADRH28 */
+#define ETHER_FROM_TSU_ADRH29 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH29) /* ETHER_FROM_TSU_ADRH29 */
+#define ETHER_FROM_TSU_ADRH30 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH30) /* ETHER_FROM_TSU_ADRH30 */
+#define ETHER_FROM_TSU_ADRH31 (*(struct st_ether_from_tsu_adrh0 *)&ETHER.TSU_ADRH31) /* ETHER_FROM_TSU_ADRH31 */
+
+/* End of channnel array defines of ETHER */
+
+
+#define ETHEREDSR0 ETHER.EDSR0
+#define ETHERTDLAR0 ETHER.TDLAR0
+#define ETHERTDFAR0 ETHER.TDFAR0
+#define ETHERTDFXR0 ETHER.TDFXR0
+#define ETHERTDFFR0 ETHER.TDFFR0
+#define ETHERRDLAR0 ETHER.RDLAR0
+#define ETHERRDFAR0 ETHER.RDFAR0
+#define ETHERRDFXR0 ETHER.RDFXR0
+#define ETHERRDFFR0 ETHER.RDFFR0
+#define ETHEREDMR0 ETHER.EDMR0
+#define ETHEREDTRR0 ETHER.EDTRR0
+#define ETHEREDRRR0 ETHER.EDRRR0
+#define ETHEREESR0 ETHER.EESR0
+#define ETHEREESIPR0 ETHER.EESIPR0
+#define ETHERTRSCER0 ETHER.TRSCER0
+#define ETHERRMFCR0 ETHER.RMFCR0
+#define ETHERTFTR0 ETHER.TFTR0
+#define ETHERFDR0 ETHER.FDR0
+#define ETHERRMCR0 ETHER.RMCR0
+#define ETHERRPADIR0 ETHER.RPADIR0
+#define ETHERFCFTR0 ETHER.FCFTR0
+#define ETHERCSMR ETHER.CSMR
+#define ETHERCSSBM ETHER.CSSBM
+#define ETHERCSSMR ETHER.CSSMR
+#define ETHERECMR0 ETHER.ECMR0
+#define ETHERRFLR0 ETHER.RFLR0
+#define ETHERECSR0 ETHER.ECSR0
+#define ETHERECSIPR0 ETHER.ECSIPR0
+#define ETHERPIR0 ETHER.PIR0
+#define ETHERAPR0 ETHER.APR0
+#define ETHERMPR0 ETHER.MPR0
+#define ETHERPFTCR0 ETHER.PFTCR0
+#define ETHERPFRCR0 ETHER.PFRCR0
+#define ETHERTPAUSER0 ETHER.TPAUSER0
+#define ETHERMAHR0 ETHER.MAHR0
+#define ETHERMALR0 ETHER.MALR0
+#define ETHERCEFCR0 ETHER.CEFCR0
+#define ETHERFRECR0 ETHER.FRECR0
+#define ETHERTSFRCR0 ETHER.TSFRCR0
+#define ETHERTLFRCR0 ETHER.TLFRCR0
+#define ETHERRFCR0 ETHER.RFCR0
+#define ETHERMAFCR0 ETHER.MAFCR0
+#define ETHERARSTR ETHER.ARSTR
+#define ETHERTSU_CTRST ETHER.TSU_CTRST
+#define ETHERTSU_VTAG0 ETHER.TSU_VTAG0
+#define ETHERTSU_ADSBSY ETHER.TSU_ADSBSY
+#define ETHERTSU_TEN ETHER.TSU_TEN
+#define ETHERTXNLCR0 ETHER.TXNLCR0
+#define ETHERTXALCR0 ETHER.TXALCR0
+#define ETHERRXNLCR0 ETHER.RXNLCR0
+#define ETHERRXALCR0 ETHER.RXALCR0
+#define ETHERTSU_ADRH0 ETHER.TSU_ADRH0
+#define ETHERTSU_ADRL0 ETHER.TSU_ADRL0
+#define ETHERTSU_ADRH1 ETHER.TSU_ADRH1
+#define ETHERTSU_ADRL1 ETHER.TSU_ADRL1
+#define ETHERTSU_ADRH2 ETHER.TSU_ADRH2
+#define ETHERTSU_ADRL2 ETHER.TSU_ADRL2
+#define ETHERTSU_ADRH3 ETHER.TSU_ADRH3
+#define ETHERTSU_ADRL3 ETHER.TSU_ADRL3
+#define ETHERTSU_ADRH4 ETHER.TSU_ADRH4
+#define ETHERTSU_ADRL4 ETHER.TSU_ADRL4
+#define ETHERTSU_ADRH5 ETHER.TSU_ADRH5
+#define ETHERTSU_ADRL5 ETHER.TSU_ADRL5
+#define ETHERTSU_ADRH6 ETHER.TSU_ADRH6
+#define ETHERTSU_ADRL6 ETHER.TSU_ADRL6
+#define ETHERTSU_ADRH7 ETHER.TSU_ADRH7
+#define ETHERTSU_ADRL7 ETHER.TSU_ADRL7
+#define ETHERTSU_ADRH8 ETHER.TSU_ADRH8
+#define ETHERTSU_ADRL8 ETHER.TSU_ADRL8
+#define ETHERTSU_ADRH9 ETHER.TSU_ADRH9
+#define ETHERTSU_ADRL9 ETHER.TSU_ADRL9
+#define ETHERTSU_ADRH10 ETHER.TSU_ADRH10
+#define ETHERTSU_ADRL10 ETHER.TSU_ADRL10
+#define ETHERTSU_ADRH11 ETHER.TSU_ADRH11
+#define ETHERTSU_ADRL11 ETHER.TSU_ADRL11
+#define ETHERTSU_ADRH12 ETHER.TSU_ADRH12
+#define ETHERTSU_ADRL12 ETHER.TSU_ADRL12
+#define ETHERTSU_ADRH13 ETHER.TSU_ADRH13
+#define ETHERTSU_ADRL13 ETHER.TSU_ADRL13
+#define ETHERTSU_ADRH14 ETHER.TSU_ADRH14
+#define ETHERTSU_ADRL14 ETHER.TSU_ADRL14
+#define ETHERTSU_ADRH15 ETHER.TSU_ADRH15
+#define ETHERTSU_ADRL15 ETHER.TSU_ADRL15
+#define ETHERTSU_ADRH16 ETHER.TSU_ADRH16
+#define ETHERTSU_ADRL16 ETHER.TSU_ADRL16
+#define ETHERTSU_ADRH17 ETHER.TSU_ADRH17
+#define ETHERTSU_ADRL17 ETHER.TSU_ADRL17
+#define ETHERTSU_ADRH18 ETHER.TSU_ADRH18
+#define ETHERTSU_ADRL18 ETHER.TSU_ADRL18
+#define ETHERTSU_ADRH19 ETHER.TSU_ADRH19
+#define ETHERTSU_ADRL19 ETHER.TSU_ADRL19
+#define ETHERTSU_ADRH20 ETHER.TSU_ADRH20
+#define ETHERTSU_ADRL20 ETHER.TSU_ADRL20
+#define ETHERTSU_ADRH21 ETHER.TSU_ADRH21
+#define ETHERTSU_ADRL21 ETHER.TSU_ADRL21
+#define ETHERTSU_ADRH22 ETHER.TSU_ADRH22
+#define ETHERTSU_ADRL22 ETHER.TSU_ADRL22
+#define ETHERTSU_ADRH23 ETHER.TSU_ADRH23
+#define ETHERTSU_ADRL23 ETHER.TSU_ADRL23
+#define ETHERTSU_ADRH24 ETHER.TSU_ADRH24
+#define ETHERTSU_ADRL24 ETHER.TSU_ADRL24
+#define ETHERTSU_ADRH25 ETHER.TSU_ADRH25
+#define ETHERTSU_ADRL25 ETHER.TSU_ADRL25
+#define ETHERTSU_ADRH26 ETHER.TSU_ADRH26
+#define ETHERTSU_ADRL26 ETHER.TSU_ADRL26
+#define ETHERTSU_ADRH27 ETHER.TSU_ADRH27
+#define ETHERTSU_ADRL27 ETHER.TSU_ADRL27
+#define ETHERTSU_ADRH28 ETHER.TSU_ADRH28
+#define ETHERTSU_ADRL28 ETHER.TSU_ADRL28
+#define ETHERTSU_ADRH29 ETHER.TSU_ADRH29
+#define ETHERTSU_ADRL29 ETHER.TSU_ADRL29
+#define ETHERTSU_ADRH30 ETHER.TSU_ADRH30
+#define ETHERTSU_ADRL30 ETHER.TSU_ADRL30
+#define ETHERTSU_ADRH31 ETHER.TSU_ADRH31
+#define ETHERTSU_ADRL31 ETHER.TSU_ADRL31
+/* <-SEC M1.10.1 */
+/* <-QAC 0639 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/flctl_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/flctl_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/flctl_iodefine.h	(revision 270)
@@ -0,0 +1,72 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : flctl_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef FLCTL_IODEFINE_H
+#define FLCTL_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_flctl
+{                                                          /* FLCTL            */
+    volatile uint32_t  FLCMNCR;                                /*  FLCMNCR         */
+    volatile uint32_t  FLCMDCR;                                /*  FLCMDCR         */
+    volatile uint32_t  FLCMCDR;                                /*  FLCMCDR         */
+    volatile uint32_t  FLADR;                                  /*  FLADR           */
+    volatile uint32_t  FLDATAR;                                /*  FLDATAR         */
+    volatile uint32_t  FLDTCNTR;                               /*  FLDTCNTR        */
+    volatile uint32_t  FLINTDMACR;                             /*  FLINTDMACR      */
+    volatile uint32_t  FLBSYTMR;                               /*  FLBSYTMR        */
+    volatile uint32_t  FLBSYCNT;                               /*  FLBSYCNT        */
+    volatile uint8_t   dummy555[8];                            /*                  */
+    volatile uint8_t   FLTRCR;                                 /*  FLTRCR          */
+    volatile uint8_t   dummy556[15];                           /*                  */
+    volatile uint32_t  FLADR2;                                 /*  FLADR2          */
+    volatile uint8_t   dummy557[16];                           /*                  */
+    volatile uint32_t  FLDTFIFO;                               /*  FLDTFIFO        */
+    volatile uint8_t   dummy558[12];                           /*                  */
+    volatile uint32_t  FLECFIFO;                               /*  FLECFIFO        */
+};
+
+
+#define FLCTL   (*(struct st_flctl   *)0xFCFF4000uL) /* FLCTL */
+
+
+#define FLCTLFLCMNCR FLCTL.FLCMNCR
+#define FLCTLFLCMDCR FLCTL.FLCMDCR
+#define FLCTLFLCMCDR FLCTL.FLCMCDR
+#define FLCTLFLADR FLCTL.FLADR
+#define FLCTLFLDATAR FLCTL.FLDATAR
+#define FLCTLFLDTCNTR FLCTL.FLDTCNTR
+#define FLCTLFLINTDMACR FLCTL.FLINTDMACR
+#define FLCTLFLBSYTMR FLCTL.FLBSYTMR
+#define FLCTLFLBSYCNT FLCTL.FLBSYCNT
+#define FLCTLFLTRCR FLCTL.FLTRCR
+#define FLCTLFLADR2 FLCTL.FLADR2
+#define FLCTLFLDTFIFO FLCTL.FLDTFIFO
+#define FLCTLFLECFIFO FLCTL.FLECFIFO
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/gpio_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/gpio_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/gpio_iodefine.h	(revision 270)
@@ -0,0 +1,1074 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : gpio_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef GPIO_IODEFINE_H
+#define GPIO_IODEFINE_H
+/* ->QAC 0639 : Over 127 members (C90) */
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_gpio
+{                                                          /* GPIO             */
+/* start of struct st_gpio_from_p1 */
+    volatile uint16_t P1;                                     /*  P1              */
+    volatile uint8_t   dummy348[2];                            /*                  */
+/* end of struct st_gpio_from_p1 */
+/* start of struct st_gpio_from_p1 */
+    volatile uint16_t P2;                                     /*  P2              */
+    volatile uint8_t   dummy349[2];                            /*                  */
+/* end of struct st_gpio_from_p1 */
+/* start of struct st_gpio_from_p1 */
+    volatile uint16_t P3;                                     /*  P3              */
+    volatile uint8_t   dummy350[2];                            /*                  */
+/* end of struct st_gpio_from_p1 */
+/* start of struct st_gpio_from_p1 */
+    volatile uint16_t P4;                                     /*  P4              */
+    volatile uint8_t   dummy351[2];                            /*                  */
+/* end of struct st_gpio_from_p1 */
+/* start of struct st_gpio_from_p1 */
+    volatile uint16_t P5;                                     /*  P5              */
+    volatile uint8_t   dummy352[2];                            /*                  */
+/* end of struct st_gpio_from_p1 */
+/* start of struct st_gpio_from_p1 */
+    volatile uint16_t P6;                                     /*  P6              */
+    volatile uint8_t   dummy353[2];                            /*                  */
+/* end of struct st_gpio_from_p1 */
+/* start of struct st_gpio_from_p1 */
+    volatile uint16_t P7;                                     /*  P7              */
+    volatile uint8_t   dummy354[2];                            /*                  */
+/* end of struct st_gpio_from_p1 */
+/* start of struct st_gpio_from_p1 */
+    volatile uint16_t P8;                                     /*  P8              */
+    volatile uint8_t   dummy355[2];                            /*                  */
+/* end of struct st_gpio_from_p1 */
+/* start of struct st_gpio_from_p1 */
+    volatile uint16_t P9;                                     /*  P9              */
+    volatile uint8_t   dummy356[2];                            /*                  */
+/* end of struct st_gpio_from_p1 */
+/* start of struct st_gpio_from_p1 */
+    volatile uint16_t P10;                                    /*  P10             */
+    volatile uint8_t   dummy357[2];                            /*                  */
+/* end of struct st_gpio_from_p1 */
+/* start of struct st_gpio_from_p1 */
+    volatile uint16_t P11;                                    /*  P11             */
+    volatile uint8_t   dummy3580[2];                           /*                  */
+/* end of struct st_gpio_from_p1 */
+    volatile uint8_t   dummy3581[212];                         /*                  */
+#define GPIO_PSRn_COUNT 11
+    volatile uint32_t  PSR1;                                   /*  PSR1            */
+    volatile uint32_t  PSR2;                                   /*  PSR2            */
+    volatile uint32_t  PSR3;                                   /*  PSR3            */
+    volatile uint32_t  PSR4;                                   /*  PSR4            */
+    volatile uint32_t  PSR5;                                   /*  PSR5            */
+    volatile uint32_t  PSR6;                                   /*  PSR6            */
+    volatile uint32_t  PSR7;                                   /*  PSR7            */
+    volatile uint32_t  PSR8;                                   /*  PSR8            */
+    volatile uint32_t  PSR9;                                   /*  PSR9            */
+    volatile uint32_t  PSR10;                                  /*  PSR10           */
+    volatile uint32_t  PSR11;                                  /*  PSR11           */
+    volatile uint8_t   dummy359[208];                          /*                  */
+/* start of struct st_gpio_from_ppr0 */
+    volatile uint16_t PPR0;                                   /*  PPR0            */
+    volatile uint8_t   dummy360[2];                            /*                  */
+/* end of struct st_gpio_from_ppr0 */
+/* start of struct st_gpio_from_ppr0 */
+    volatile uint16_t PPR1;                                   /*  PPR1            */
+    volatile uint8_t   dummy361[2];                            /*                  */
+/* end of struct st_gpio_from_ppr0 */
+/* start of struct st_gpio_from_ppr0 */
+    volatile uint16_t PPR2;                                   /*  PPR2            */
+    volatile uint8_t   dummy362[2];                            /*                  */
+/* end of struct st_gpio_from_ppr0 */
+/* start of struct st_gpio_from_ppr0 */
+    volatile uint16_t PPR3;                                   /*  PPR3            */
+    volatile uint8_t   dummy363[2];                            /*                  */
+/* end of struct st_gpio_from_ppr0 */
+/* start of struct st_gpio_from_ppr0 */
+    volatile uint16_t PPR4;                                   /*  PPR4            */
+    volatile uint8_t   dummy364[2];                            /*                  */
+/* end of struct st_gpio_from_ppr0 */
+/* start of struct st_gpio_from_ppr0 */
+    volatile uint16_t PPR5;                                   /*  PPR5            */
+    volatile uint8_t   dummy365[2];                            /*                  */
+/* end of struct st_gpio_from_ppr0 */
+/* start of struct st_gpio_from_ppr0 */
+    volatile uint16_t PPR6;                                   /*  PPR6            */
+    volatile uint8_t   dummy366[2];                            /*                  */
+/* end of struct st_gpio_from_ppr0 */
+/* start of struct st_gpio_from_ppr0 */
+    volatile uint16_t PPR7;                                   /*  PPR7            */
+    volatile uint8_t   dummy367[2];                            /*                  */
+/* end of struct st_gpio_from_ppr0 */
+/* start of struct st_gpio_from_ppr0 */
+    volatile uint16_t PPR8;                                   /*  PPR8            */
+    volatile uint8_t   dummy368[2];                            /*                  */
+/* end of struct st_gpio_from_ppr0 */
+/* start of struct st_gpio_from_ppr0 */
+    volatile uint16_t PPR9;                                   /*  PPR9            */
+    volatile uint8_t   dummy369[2];                            /*                  */
+/* end of struct st_gpio_from_ppr0 */
+/* start of struct st_gpio_from_ppr0 */
+    volatile uint16_t PPR10;                                  /*  PPR10           */
+    volatile uint8_t   dummy370[2];                            /*                  */
+/* end of struct st_gpio_from_ppr0 */
+/* start of struct st_gpio_from_ppr0 */
+    volatile uint16_t PPR11;                                  /*  PPR11           */
+    volatile uint8_t   dummy3710[2];                           /*                  */
+/* end of struct st_gpio_from_ppr0 */
+    volatile uint8_t   dummy3711[212];                         /*                  */
+/* start of struct st_gpio_from_pm1 */
+    volatile uint16_t PM1;                                    /*  PM1             */
+    volatile uint8_t   dummy372[2];                            /*                  */
+/* end of struct st_gpio_from_pm1 */
+/* start of struct st_gpio_from_pm1 */
+    volatile uint16_t PM2;                                    /*  PM2             */
+    volatile uint8_t   dummy373[2];                            /*                  */
+/* end of struct st_gpio_from_pm1 */
+/* start of struct st_gpio_from_pm1 */
+    volatile uint16_t PM3;                                    /*  PM3             */
+    volatile uint8_t   dummy374[2];                            /*                  */
+/* end of struct st_gpio_from_pm1 */
+/* start of struct st_gpio_from_pm1 */
+    volatile uint16_t PM4;                                    /*  PM4             */
+    volatile uint8_t   dummy375[2];                            /*                  */
+/* end of struct st_gpio_from_pm1 */
+/* start of struct st_gpio_from_pm1 */
+    volatile uint16_t PM5;                                    /*  PM5             */
+    volatile uint8_t   dummy376[2];                            /*                  */
+/* end of struct st_gpio_from_pm1 */
+/* start of struct st_gpio_from_pm1 */
+    volatile uint16_t PM6;                                    /*  PM6             */
+    volatile uint8_t   dummy377[2];                            /*                  */
+/* end of struct st_gpio_from_pm1 */
+/* start of struct st_gpio_from_pm1 */
+    volatile uint16_t PM7;                                    /*  PM7             */
+    volatile uint8_t   dummy378[2];                            /*                  */
+/* end of struct st_gpio_from_pm1 */
+/* start of struct st_gpio_from_pm1 */
+    volatile uint16_t PM8;                                    /*  PM8             */
+    volatile uint8_t   dummy379[2];                            /*                  */
+/* end of struct st_gpio_from_pm1 */
+/* start of struct st_gpio_from_pm1 */
+    volatile uint16_t PM9;                                    /*  PM9             */
+    volatile uint8_t   dummy380[2];                            /*                  */
+/* end of struct st_gpio_from_pm1 */
+/* start of struct st_gpio_from_pm1 */
+    volatile uint16_t PM10;                                   /*  PM10            */
+    volatile uint8_t   dummy381[2];                            /*                  */
+/* end of struct st_gpio_from_pm1 */
+/* start of struct st_gpio_from_pm1 */
+    volatile uint16_t PM11;                                   /*  PM11            */
+    volatile uint8_t   dummy3820[2];                           /*                  */
+/* end of struct st_gpio_from_pm1 */
+    volatile uint8_t   dummy3821[208];                         /*                  */
+/* start of struct st_gpio_from_pmc0 */
+    volatile uint16_t PMC0;                                   /*  PMC0            */
+    volatile uint8_t   dummy383[2];                            /*                  */
+/* end of struct st_gpio_from_pmc0 */
+/* start of struct st_gpio_from_pmc0 */
+    volatile uint16_t PMC1;                                   /*  PMC1            */
+    volatile uint8_t   dummy384[2];                            /*                  */
+/* end of struct st_gpio_from_pmc0 */
+/* start of struct st_gpio_from_pmc0 */
+    volatile uint16_t PMC2;                                   /*  PMC2            */
+    volatile uint8_t   dummy385[2];                            /*                  */
+/* end of struct st_gpio_from_pmc0 */
+/* start of struct st_gpio_from_pmc0 */
+    volatile uint16_t PMC3;                                   /*  PMC3            */
+    volatile uint8_t   dummy386[2];                            /*                  */
+/* end of struct st_gpio_from_pmc0 */
+/* start of struct st_gpio_from_pmc0 */
+    volatile uint16_t PMC4;                                   /*  PMC4            */
+    volatile uint8_t   dummy387[2];                            /*                  */
+/* end of struct st_gpio_from_pmc0 */
+/* start of struct st_gpio_from_pmc0 */
+    volatile uint16_t PMC5;                                   /*  PMC5            */
+    volatile uint8_t   dummy388[2];                            /*                  */
+/* end of struct st_gpio_from_pmc0 */
+/* start of struct st_gpio_from_pmc0 */
+    volatile uint16_t PMC6;                                   /*  PMC6            */
+    volatile uint8_t   dummy389[2];                            /*                  */
+/* end of struct st_gpio_from_pmc0 */
+/* start of struct st_gpio_from_pmc0 */
+    volatile uint16_t PMC7;                                   /*  PMC7            */
+    volatile uint8_t   dummy390[2];                            /*                  */
+/* end of struct st_gpio_from_pmc0 */
+/* start of struct st_gpio_from_pmc0 */
+    volatile uint16_t PMC8;                                   /*  PMC8            */
+    volatile uint8_t   dummy391[2];                            /*                  */
+/* end of struct st_gpio_from_pmc0 */
+/* start of struct st_gpio_from_pmc0 */
+    volatile uint16_t PMC9;                                   /*  PMC9            */
+    volatile uint8_t   dummy392[2];                            /*                  */
+/* end of struct st_gpio_from_pmc0 */
+/* start of struct st_gpio_from_pmc0 */
+    volatile uint16_t PMC10;                                  /*  PMC10           */
+    volatile uint8_t   dummy393[2];                            /*                  */
+/* end of struct st_gpio_from_pmc0 */
+/* start of struct st_gpio_from_pmc0 */
+    volatile uint16_t PMC11;                                  /*  PMC11           */
+    volatile uint8_t   dummy3940[2];                           /*                  */
+/* end of struct st_gpio_from_pmc0 */
+    volatile uint8_t   dummy3941[212];                         /*                  */
+/* start of struct st_gpio_from_pfc1 */
+    volatile uint16_t PFC1;                                   /*  PFC1            */
+    volatile uint8_t   dummy395[2];                            /*                  */
+/* end of struct st_gpio_from_pfc1 */
+/* start of struct st_gpio_from_pfc1 */
+    volatile uint16_t PFC2;                                   /*  PFC2            */
+    volatile uint8_t   dummy396[2];                            /*                  */
+/* end of struct st_gpio_from_pfc1 */
+/* start of struct st_gpio_from_pfc1 */
+    volatile uint16_t PFC3;                                   /*  PFC3            */
+    volatile uint8_t   dummy397[2];                            /*                  */
+/* end of struct st_gpio_from_pfc1 */
+/* start of struct st_gpio_from_pfc1 */
+    volatile uint16_t PFC4;                                   /*  PFC4            */
+    volatile uint8_t   dummy398[2];                            /*                  */
+/* end of struct st_gpio_from_pfc1 */
+/* start of struct st_gpio_from_pfc1 */
+    volatile uint16_t PFC5;                                   /*  PFC5            */
+    volatile uint8_t   dummy399[2];                            /*                  */
+/* end of struct st_gpio_from_pfc1 */
+/* start of struct st_gpio_from_pfc1 */
+    volatile uint16_t PFC6;                                   /*  PFC6            */
+    volatile uint8_t   dummy400[2];                            /*                  */
+/* end of struct st_gpio_from_pfc1 */
+/* start of struct st_gpio_from_pfc1 */
+    volatile uint16_t PFC7;                                   /*  PFC7            */
+    volatile uint8_t   dummy401[2];                            /*                  */
+/* end of struct st_gpio_from_pfc1 */
+/* start of struct st_gpio_from_pfc1 */
+    volatile uint16_t PFC8;                                   /*  PFC8            */
+    volatile uint8_t   dummy402[2];                            /*                  */
+/* end of struct st_gpio_from_pfc1 */
+/* start of struct st_gpio_from_pfc1 */
+    volatile uint16_t PFC9;                                   /*  PFC9            */
+    volatile uint8_t   dummy403[2];                            /*                  */
+/* end of struct st_gpio_from_pfc1 */
+/* start of struct st_gpio_from_pfc1 */
+    volatile uint16_t PFC10;                                  /*  PFC10           */
+    volatile uint8_t   dummy404[2];                            /*                  */
+/* end of struct st_gpio_from_pfc1 */
+/* start of struct st_gpio_from_pfc1 */
+    volatile uint16_t PFC11;                                  /*  PFC11           */
+    volatile uint8_t   dummy4050[2];                           /*                  */
+/* end of struct st_gpio_from_pfc1 */
+    volatile uint8_t   dummy4051[212];                         /*                  */
+/* start of struct st_gpio_from_pfce1 */
+    volatile uint16_t PFCE1;                                  /*  PFCE1           */
+    volatile uint8_t   dummy406[2];                            /*                  */
+/* end of struct st_gpio_from_pfce1 */
+/* start of struct st_gpio_from_pfce1 */
+    volatile uint16_t PFCE2;                                  /*  PFCE2           */
+    volatile uint8_t   dummy407[2];                            /*                  */
+/* end of struct st_gpio_from_pfce1 */
+/* start of struct st_gpio_from_pfce1 */
+    volatile uint16_t PFCE3;                                  /*  PFCE3           */
+    volatile uint8_t   dummy408[2];                            /*                  */
+/* end of struct st_gpio_from_pfce1 */
+/* start of struct st_gpio_from_pfce1 */
+    volatile uint16_t PFCE4;                                  /*  PFCE4           */
+    volatile uint8_t   dummy409[2];                            /*                  */
+/* end of struct st_gpio_from_pfce1 */
+/* start of struct st_gpio_from_pfce1 */
+    volatile uint16_t PFCE5;                                  /*  PFCE5           */
+    volatile uint8_t   dummy410[2];                            /*                  */
+/* end of struct st_gpio_from_pfce1 */
+/* start of struct st_gpio_from_pfce1 */
+    volatile uint16_t PFCE6;                                  /*  PFCE6           */
+    volatile uint8_t   dummy411[2];                            /*                  */
+/* end of struct st_gpio_from_pfce1 */
+/* start of struct st_gpio_from_pfce1 */
+    volatile uint16_t PFCE7;                                  /*  PFCE7           */
+    volatile uint8_t   dummy412[2];                            /*                  */
+/* end of struct st_gpio_from_pfce1 */
+/* start of struct st_gpio_from_pfce1 */
+    volatile uint16_t PFCE8;                                  /*  PFCE8           */
+    volatile uint8_t   dummy413[2];                            /*                  */
+/* end of struct st_gpio_from_pfce1 */
+/* start of struct st_gpio_from_pfce1 */
+    volatile uint16_t PFCE9;                                  /*  PFCE9           */
+    volatile uint8_t   dummy414[2];                            /*                  */
+/* end of struct st_gpio_from_pfce1 */
+/* start of struct st_gpio_from_pfce1 */
+    volatile uint16_t PFCE10;                                 /*  PFCE10          */
+    volatile uint8_t   dummy415[2];                            /*                  */
+/* end of struct st_gpio_from_pfce1 */
+/* start of struct st_gpio_from_pfce1 */
+    volatile uint16_t PFCE11;                                 /*  PFCE11          */
+    volatile uint8_t   dummy4160[2];                           /*                  */
+/* end of struct st_gpio_from_pfce1 */
+    volatile uint8_t   dummy4161[212];                         /*                  */
+/* start of struct st_gpio_from_pnot1 */
+    volatile uint16_t PNOT1;                                  /*  PNOT1           */
+    volatile uint8_t   dummy417[2];                            /*                  */
+/* end of struct st_gpio_from_pnot1 */
+/* start of struct st_gpio_from_pnot1 */
+    volatile uint16_t PNOT2;                                  /*  PNOT2           */
+    volatile uint8_t   dummy418[2];                            /*                  */
+/* end of struct st_gpio_from_pnot1 */
+/* start of struct st_gpio_from_pnot1 */
+    volatile uint16_t PNOT3;                                  /*  PNOT3           */
+    volatile uint8_t   dummy419[2];                            /*                  */
+/* end of struct st_gpio_from_pnot1 */
+/* start of struct st_gpio_from_pnot1 */
+    volatile uint16_t PNOT4;                                  /*  PNOT4           */
+    volatile uint8_t   dummy420[2];                            /*                  */
+/* end of struct st_gpio_from_pnot1 */
+/* start of struct st_gpio_from_pnot1 */
+    volatile uint16_t PNOT5;                                  /*  PNOT5           */
+    volatile uint8_t   dummy421[2];                            /*                  */
+/* end of struct st_gpio_from_pnot1 */
+/* start of struct st_gpio_from_pnot1 */
+    volatile uint16_t PNOT6;                                  /*  PNOT6           */
+    volatile uint8_t   dummy422[2];                            /*                  */
+/* end of struct st_gpio_from_pnot1 */
+/* start of struct st_gpio_from_pnot1 */
+    volatile uint16_t PNOT7;                                  /*  PNOT7           */
+    volatile uint8_t   dummy423[2];                            /*                  */
+/* end of struct st_gpio_from_pnot1 */
+/* start of struct st_gpio_from_pnot1 */
+    volatile uint16_t PNOT8;                                  /*  PNOT8           */
+    volatile uint8_t   dummy424[2];                            /*                  */
+/* end of struct st_gpio_from_pnot1 */
+/* start of struct st_gpio_from_pnot1 */
+    volatile uint16_t PNOT9;                                  /*  PNOT9           */
+    volatile uint8_t   dummy425[2];                            /*                  */
+/* end of struct st_gpio_from_pnot1 */
+/* start of struct st_gpio_from_pnot1 */
+    volatile uint16_t PNOT10;                                 /*  PNOT10          */
+    volatile uint8_t   dummy426[2];                            /*                  */
+/* end of struct st_gpio_from_pnot1 */
+/* start of struct st_gpio_from_pnot1 */
+    volatile uint16_t PNOT11;                                 /*  PNOT11          */
+    volatile uint8_t   dummy4270[2];                           /*                  */
+/* end of struct st_gpio_from_pnot1 */
+    volatile uint8_t   dummy4271[212];                         /*                  */
+#define GPIO_PMSRn_COUNT 11
+    volatile uint32_t  PMSR1;                                  /*  PMSR1           */
+    volatile uint32_t  PMSR2;                                  /*  PMSR2           */
+    volatile uint32_t  PMSR3;                                  /*  PMSR3           */
+    volatile uint32_t  PMSR4;                                  /*  PMSR4           */
+    volatile uint32_t  PMSR5;                                  /*  PMSR5           */
+    volatile uint32_t  PMSR6;                                  /*  PMSR6           */
+    volatile uint32_t  PMSR7;                                  /*  PMSR7           */
+    volatile uint32_t  PMSR8;                                  /*  PMSR8           */
+    volatile uint32_t  PMSR9;                                  /*  PMSR9           */
+    volatile uint32_t  PMSR10;                                 /*  PMSR10          */
+    volatile uint32_t  PMSR11;                                 /*  PMSR11          */
+    volatile uint8_t   dummy428[208];                          /*                  */
+#define GPIO_PMCSRn_COUNT 12
+    volatile uint32_t  PMCSR0;                                 /*  PMCSR0          */
+    volatile uint32_t  PMCSR1;                                 /*  PMCSR1          */
+    volatile uint32_t  PMCSR2;                                 /*  PMCSR2          */
+    volatile uint32_t  PMCSR3;                                 /*  PMCSR3          */
+    volatile uint32_t  PMCSR4;                                 /*  PMCSR4          */
+    volatile uint32_t  PMCSR5;                                 /*  PMCSR5          */
+    volatile uint32_t  PMCSR6;                                 /*  PMCSR6          */
+    volatile uint32_t  PMCSR7;                                 /*  PMCSR7          */
+    volatile uint32_t  PMCSR8;                                 /*  PMCSR8          */
+    volatile uint32_t  PMCSR9;                                 /*  PMCSR9          */
+    volatile uint32_t  PMCSR10;                                /*  PMCSR10         */
+    volatile uint32_t  PMCSR11;                                /*  PMCSR11         */
+    volatile uint8_t   dummy429[212];                          /*                  */
+/* start of struct st_gpio_from_pfcae1 */
+    volatile uint16_t PFCAE1;                                 /*  PFCAE1          */
+    volatile uint8_t   dummy430[2];                            /*                  */
+/* end of struct st_gpio_from_pfcae1 */
+/* start of struct st_gpio_from_pfcae1 */
+    volatile uint16_t PFCAE2;                                 /*  PFCAE2          */
+    volatile uint8_t   dummy431[2];                            /*                  */
+/* end of struct st_gpio_from_pfcae1 */
+/* start of struct st_gpio_from_pfcae1 */
+    volatile uint16_t PFCAE3;                                 /*  PFCAE3          */
+    volatile uint8_t   dummy432[2];                            /*                  */
+/* end of struct st_gpio_from_pfcae1 */
+/* start of struct st_gpio_from_pfcae1 */
+    volatile uint16_t PFCAE4;                                 /*  PFCAE4          */
+    volatile uint8_t   dummy433[2];                            /*                  */
+/* end of struct st_gpio_from_pfcae1 */
+/* start of struct st_gpio_from_pfcae1 */
+    volatile uint16_t PFCAE5;                                 /*  PFCAE5          */
+    volatile uint8_t   dummy434[2];                            /*                  */
+/* end of struct st_gpio_from_pfcae1 */
+/* start of struct st_gpio_from_pfcae1 */
+    volatile uint16_t PFCAE6;                                 /*  PFCAE6          */
+    volatile uint8_t   dummy435[2];                            /*                  */
+/* end of struct st_gpio_from_pfcae1 */
+/* start of struct st_gpio_from_pfcae1 */
+    volatile uint16_t PFCAE7;                                 /*  PFCAE7          */
+    volatile uint8_t   dummy436[2];                            /*                  */
+/* end of struct st_gpio_from_pfcae1 */
+/* start of struct st_gpio_from_pfcae1 */
+    volatile uint16_t PFCAE8;                                 /*  PFCAE8          */
+    volatile uint8_t   dummy437[2];                            /*                  */
+/* end of struct st_gpio_from_pfcae1 */
+/* start of struct st_gpio_from_pfcae1 */
+    volatile uint16_t PFCAE9;                                 /*  PFCAE9          */
+    volatile uint8_t   dummy438[2];                            /*                  */
+/* end of struct st_gpio_from_pfcae1 */
+/* start of struct st_gpio_from_pfcae1 */
+    volatile uint16_t PFCAE10;                                /*  PFCAE10         */
+    volatile uint8_t   dummy439[2];                            /*                  */
+/* end of struct st_gpio_from_pfcae1 */
+/* start of struct st_gpio_from_pfcae1 */
+    volatile uint16_t PFCAE11;                                /*  PFCAE11         */
+    volatile uint8_t   dummy4400[2];                           /*                  */
+/* end of struct st_gpio_from_pfcae1 */
+    volatile uint8_t   dummy4401[464];                         /*                  */
+    volatile uint32_t  SNCR;                                   /*  SNCR            */
+    volatile uint8_t   dummy441[13308];                        /*                  */
+    volatile uint16_t PIBC0;                                  /*  PIBC0           */
+    volatile uint8_t   dummy442[2];                            /*                  */
+/* start of struct st_gpio_from_pibc1 */
+    volatile uint16_t PIBC1;                                  /*  PIBC1           */
+    volatile uint8_t   dummy443[2];                            /*                  */
+/* end of struct st_gpio_from_pibc1 */
+/* start of struct st_gpio_from_pibc1 */
+    volatile uint16_t PIBC2;                                  /*  PIBC2           */
+    volatile uint8_t   dummy444[2];                            /*                  */
+/* end of struct st_gpio_from_pibc1 */
+/* start of struct st_gpio_from_pibc1 */
+    volatile uint16_t PIBC3;                                  /*  PIBC3           */
+    volatile uint8_t   dummy445[2];                            /*                  */
+/* end of struct st_gpio_from_pibc1 */
+/* start of struct st_gpio_from_pibc1 */
+    volatile uint16_t PIBC4;                                  /*  PIBC4           */
+    volatile uint8_t   dummy446[2];                            /*                  */
+/* end of struct st_gpio_from_pibc1 */
+/* start of struct st_gpio_from_pibc1 */
+    volatile uint16_t PIBC5;                                  /*  PIBC5           */
+    volatile uint8_t   dummy447[2];                            /*                  */
+/* end of struct st_gpio_from_pibc1 */
+/* start of struct st_gpio_from_pibc1 */
+    volatile uint16_t PIBC6;                                  /*  PIBC6           */
+    volatile uint8_t   dummy448[2];                            /*                  */
+/* end of struct st_gpio_from_pibc1 */
+/* start of struct st_gpio_from_pibc1 */
+    volatile uint16_t PIBC7;                                  /*  PIBC7           */
+    volatile uint8_t   dummy449[2];                            /*                  */
+/* end of struct st_gpio_from_pibc1 */
+/* start of struct st_gpio_from_pibc1 */
+    volatile uint16_t PIBC8;                                  /*  PIBC8           */
+    volatile uint8_t   dummy450[2];                            /*                  */
+/* end of struct st_gpio_from_pibc1 */
+/* start of struct st_gpio_from_pibc1 */
+    volatile uint16_t PIBC9;                                  /*  PIBC9           */
+    volatile uint8_t   dummy451[2];                            /*                  */
+/* end of struct st_gpio_from_pibc1 */
+/* start of struct st_gpio_from_pibc1 */
+    volatile uint16_t PIBC10;                                 /*  PIBC10          */
+    volatile uint8_t   dummy452[2];                            /*                  */
+/* end of struct st_gpio_from_pibc1 */
+/* start of struct st_gpio_from_pibc1 */
+    volatile uint16_t PIBC11;                                 /*  PIBC11          */
+    volatile uint8_t   dummy4530[2];                           /*                  */
+/* end of struct st_gpio_from_pibc1 */
+    volatile uint8_t   dummy4531[212];                         /*                  */
+/* start of struct st_gpio_from_pbdc1 */
+    volatile uint16_t PBDC1;                                  /*  PBDC1           */
+    volatile uint8_t   dummy454[2];                            /*                  */
+/* end of struct st_gpio_from_pbdc1 */
+/* start of struct st_gpio_from_pbdc1 */
+    volatile uint16_t PBDC2;                                  /*  PBDC2           */
+    volatile uint8_t   dummy455[2];                            /*                  */
+/* end of struct st_gpio_from_pbdc1 */
+/* start of struct st_gpio_from_pbdc1 */
+    volatile uint16_t PBDC3;                                  /*  PBDC3           */
+    volatile uint8_t   dummy456[2];                            /*                  */
+/* end of struct st_gpio_from_pbdc1 */
+/* start of struct st_gpio_from_pbdc1 */
+    volatile uint16_t PBDC4;                                  /*  PBDC4           */
+    volatile uint8_t   dummy457[2];                            /*                  */
+/* end of struct st_gpio_from_pbdc1 */
+/* start of struct st_gpio_from_pbdc1 */
+    volatile uint16_t PBDC5;                                  /*  PBDC5           */
+    volatile uint8_t   dummy458[2];                            /*                  */
+/* end of struct st_gpio_from_pbdc1 */
+/* start of struct st_gpio_from_pbdc1 */
+    volatile uint16_t PBDC6;                                  /*  PBDC6           */
+    volatile uint8_t   dummy459[2];                            /*                  */
+/* end of struct st_gpio_from_pbdc1 */
+/* start of struct st_gpio_from_pbdc1 */
+    volatile uint16_t PBDC7;                                  /*  PBDC7           */
+    volatile uint8_t   dummy460[2];                            /*                  */
+/* end of struct st_gpio_from_pbdc1 */
+/* start of struct st_gpio_from_pbdc1 */
+    volatile uint16_t PBDC8;                                  /*  PBDC8           */
+    volatile uint8_t   dummy461[2];                            /*                  */
+/* end of struct st_gpio_from_pbdc1 */
+/* start of struct st_gpio_from_pbdc1 */
+    volatile uint16_t PBDC9;                                  /*  PBDC9           */
+    volatile uint8_t   dummy462[2];                            /*                  */
+/* end of struct st_gpio_from_pbdc1 */
+/* start of struct st_gpio_from_pbdc1 */
+    volatile uint16_t PBDC10;                                 /*  PBDC10          */
+    volatile uint8_t   dummy463[2];                            /*                  */
+/* end of struct st_gpio_from_pbdc1 */
+/* start of struct st_gpio_from_pbdc1 */
+    volatile uint16_t PBDC11;                                 /*  PBDC11          */
+    volatile uint8_t   dummy4640[2];                           /*                  */
+/* end of struct st_gpio_from_pbdc1 */
+    volatile uint8_t   dummy4641[212];                         /*                  */
+/* start of struct st_gpio_from_pipc1 */
+    volatile uint16_t PIPC1;                                  /*  PIPC1           */
+    volatile uint8_t   dummy465[2];                            /*                  */
+/* end of struct st_gpio_from_pipc1 */
+/* start of struct st_gpio_from_pipc1 */
+    volatile uint16_t PIPC2;                                  /*  PIPC2           */
+    volatile uint8_t   dummy466[2];                            /*                  */
+/* end of struct st_gpio_from_pipc1 */
+/* start of struct st_gpio_from_pipc1 */
+    volatile uint16_t PIPC3;                                  /*  PIPC3           */
+    volatile uint8_t   dummy467[2];                            /*                  */
+/* end of struct st_gpio_from_pipc1 */
+/* start of struct st_gpio_from_pipc1 */
+    volatile uint16_t PIPC4;                                  /*  PIPC4           */
+    volatile uint8_t   dummy468[2];                            /*                  */
+/* end of struct st_gpio_from_pipc1 */
+/* start of struct st_gpio_from_pipc1 */
+    volatile uint16_t PIPC5;                                  /*  PIPC5           */
+    volatile uint8_t   dummy469[2];                            /*                  */
+/* end of struct st_gpio_from_pipc1 */
+/* start of struct st_gpio_from_pipc1 */
+    volatile uint16_t PIPC6;                                  /*  PIPC6           */
+    volatile uint8_t   dummy470[2];                            /*                  */
+/* end of struct st_gpio_from_pipc1 */
+/* start of struct st_gpio_from_pipc1 */
+    volatile uint16_t PIPC7;                                  /*  PIPC7           */
+    volatile uint8_t   dummy471[2];                            /*                  */
+/* end of struct st_gpio_from_pipc1 */
+/* start of struct st_gpio_from_pipc1 */
+    volatile uint16_t PIPC8;                                  /*  PIPC8           */
+    volatile uint8_t   dummy472[2];                            /*                  */
+/* end of struct st_gpio_from_pipc1 */
+/* start of struct st_gpio_from_pipc1 */
+    volatile uint16_t PIPC9;                                  /*  PIPC9           */
+    volatile uint8_t   dummy473[2];                            /*                  */
+/* end of struct st_gpio_from_pipc1 */
+/* start of struct st_gpio_from_pipc1 */
+    volatile uint16_t PIPC10;                                 /*  PIPC10          */
+    volatile uint8_t   dummy474[2];                            /*                  */
+/* end of struct st_gpio_from_pipc1 */
+/* start of struct st_gpio_from_pipc1 */
+    volatile uint16_t PIPC11;                                 /*  PIPC11          */
+    volatile uint8_t   dummy4750[2];                           /*                  */
+/* end of struct st_gpio_from_pipc1 */
+    volatile uint8_t   dummy4751[2288];                        /*                  */
+    volatile uint16_t JPPR0;                                  /*  JPPR0           */
+    volatile uint8_t   dummy476[30];                           /*                  */
+    volatile uint16_t JPMC0;                                  /*  JPMC0           */
+    volatile uint8_t   dummy477[78];                           /*                  */
+    volatile uint32_t  JPMCSR0;                                /*  JPMCSR0         */
+    volatile uint8_t   dummy478[876];                          /*                  */
+    volatile uint16_t JPIBC0;                                 /*  JPIBC0          */
+};
+
+
+struct st_gpio_from_p1
+{
+    volatile uint16_t P1;                                     /*  P1              */
+    volatile uint8_t   dummy1[3];                              /*                  */
+};
+
+
+struct st_gpio_from_ppr0
+{
+    volatile uint16_t PPR0;                                   /*  PPR0            */
+    volatile uint8_t   dummy1[2];                              /*                  */
+};
+
+
+struct st_gpio_from_pm1
+{
+    volatile uint16_t PM1;                                    /*  PM1             */
+    volatile uint8_t   dummy1[2];                              /*                  */
+};
+
+
+struct st_gpio_from_pmc0
+{
+    volatile uint16_t PMC0;                                   /*  PMC0            */
+    volatile uint8_t   dummy1[2];                              /*                  */
+};
+
+
+struct st_gpio_from_pfc1
+{
+    volatile uint16_t PFC1;                                   /*  PFC1            */
+    volatile uint8_t   dummy1[2];                              /*                  */
+};
+
+
+struct st_gpio_from_pfce1
+{
+    volatile uint16_t PFCE1;                                  /*  PFCE1           */
+    volatile uint8_t   dummy1[2];                              /*                  */
+};
+
+
+struct st_gpio_from_pnot1
+{
+    volatile uint16_t PNOT1;                                  /*  PNOT1           */
+    volatile uint8_t   dummy1[2];                              /*                  */
+};
+
+
+struct st_gpio_from_pfcae1
+{
+    volatile uint16_t PFCAE1;                                 /*  PFCAE1          */
+    volatile uint8_t   dummy1[2];                              /*                  */
+};
+
+
+struct st_gpio_from_pibc1
+{
+    volatile uint16_t PIBC1;                                  /*  PIBC1           */
+    volatile uint8_t   dummy1[2];                              /*                  */
+};
+
+
+struct st_gpio_from_pbdc1
+{
+    volatile uint16_t PBDC1;                                  /*  PBDC1           */
+    volatile uint8_t   dummy1[2];                              /*                  */
+};
+
+
+struct st_gpio_from_pipc1
+{
+    volatile uint16_t PIPC1;                                  /*  PIPC1           */
+    volatile uint8_t   dummy1[2];                              /*                  */
+};
+
+
+#define GPIO    (*(struct st_gpio    *)0xFCFE3004uL) /* GPIO */
+
+/* Start of channnel array defines of GPIO */
+
+/* Channnel array defines of GPIO_FROM_PIPC1_ARRAY */
+/*(Sample) value = GPIO_FROM_PIPC1_ARRAY[ channel ]->PIPC1; */
+#define GPIO_FROM_PIPC1_ARRAY_COUNT  11
+#define GPIO_FROM_PIPC1_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &GPIO_FROM_PIPC1, &GPIO_FROM_PIPC2, &GPIO_FROM_PIPC3, &GPIO_FROM_PIPC4, &GPIO_FROM_PIPC5, &GPIO_FROM_PIPC6, &GPIO_FROM_PIPC7, &GPIO_FROM_PIPC8, \
+    &GPIO_FROM_PIPC9, &GPIO_FROM_PIPC10, &GPIO_FROM_PIPC11 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define GPIO_FROM_PIPC1 (*(struct st_gpio_from_pipc1 *)&GPIO.PIPC1) /* GPIO_FROM_PIPC1 */
+#define GPIO_FROM_PIPC2 (*(struct st_gpio_from_pipc1 *)&GPIO.PIPC2) /* GPIO_FROM_PIPC2 */
+#define GPIO_FROM_PIPC3 (*(struct st_gpio_from_pipc1 *)&GPIO.PIPC3) /* GPIO_FROM_PIPC3 */
+#define GPIO_FROM_PIPC4 (*(struct st_gpio_from_pipc1 *)&GPIO.PIPC4) /* GPIO_FROM_PIPC4 */
+#define GPIO_FROM_PIPC5 (*(struct st_gpio_from_pipc1 *)&GPIO.PIPC5) /* GPIO_FROM_PIPC5 */
+#define GPIO_FROM_PIPC6 (*(struct st_gpio_from_pipc1 *)&GPIO.PIPC6) /* GPIO_FROM_PIPC6 */
+#define GPIO_FROM_PIPC7 (*(struct st_gpio_from_pipc1 *)&GPIO.PIPC7) /* GPIO_FROM_PIPC7 */
+#define GPIO_FROM_PIPC8 (*(struct st_gpio_from_pipc1 *)&GPIO.PIPC8) /* GPIO_FROM_PIPC8 */
+#define GPIO_FROM_PIPC9 (*(struct st_gpio_from_pipc1 *)&GPIO.PIPC9) /* GPIO_FROM_PIPC9 */
+#define GPIO_FROM_PIPC10 (*(struct st_gpio_from_pipc1 *)&GPIO.PIPC10) /* GPIO_FROM_PIPC10 */
+#define GPIO_FROM_PIPC11 (*(struct st_gpio_from_pipc1 *)&GPIO.PIPC11) /* GPIO_FROM_PIPC11 */
+
+
+/* Channnel array defines of GPIO_FROM_PBDC1_ARRAY */
+/*(Sample) value = GPIO_FROM_PBDC1_ARRAY[ channel ]->PBDC1; */
+#define GPIO_FROM_PBDC1_ARRAY_COUNT  11
+#define GPIO_FROM_PBDC1_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &GPIO_FROM_PBDC1, &GPIO_FROM_PBDC2, &GPIO_FROM_PBDC3, &GPIO_FROM_PBDC4, &GPIO_FROM_PBDC5, &GPIO_FROM_PBDC6, &GPIO_FROM_PBDC7, &GPIO_FROM_PBDC8, \
+    &GPIO_FROM_PBDC9, &GPIO_FROM_PBDC10, &GPIO_FROM_PBDC11 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define GPIO_FROM_PBDC1 (*(struct st_gpio_from_pbdc1 *)&GPIO.PBDC1) /* GPIO_FROM_PBDC1 */
+#define GPIO_FROM_PBDC2 (*(struct st_gpio_from_pbdc1 *)&GPIO.PBDC2) /* GPIO_FROM_PBDC2 */
+#define GPIO_FROM_PBDC3 (*(struct st_gpio_from_pbdc1 *)&GPIO.PBDC3) /* GPIO_FROM_PBDC3 */
+#define GPIO_FROM_PBDC4 (*(struct st_gpio_from_pbdc1 *)&GPIO.PBDC4) /* GPIO_FROM_PBDC4 */
+#define GPIO_FROM_PBDC5 (*(struct st_gpio_from_pbdc1 *)&GPIO.PBDC5) /* GPIO_FROM_PBDC5 */
+#define GPIO_FROM_PBDC6 (*(struct st_gpio_from_pbdc1 *)&GPIO.PBDC6) /* GPIO_FROM_PBDC6 */
+#define GPIO_FROM_PBDC7 (*(struct st_gpio_from_pbdc1 *)&GPIO.PBDC7) /* GPIO_FROM_PBDC7 */
+#define GPIO_FROM_PBDC8 (*(struct st_gpio_from_pbdc1 *)&GPIO.PBDC8) /* GPIO_FROM_PBDC8 */
+#define GPIO_FROM_PBDC9 (*(struct st_gpio_from_pbdc1 *)&GPIO.PBDC9) /* GPIO_FROM_PBDC9 */
+#define GPIO_FROM_PBDC10 (*(struct st_gpio_from_pbdc1 *)&GPIO.PBDC10) /* GPIO_FROM_PBDC10 */
+#define GPIO_FROM_PBDC11 (*(struct st_gpio_from_pbdc1 *)&GPIO.PBDC11) /* GPIO_FROM_PBDC11 */
+
+
+/* Channnel array defines of GPIO_FROM_PIBC1_ARRAY */
+/*(Sample) value = GPIO_FROM_PIBC1_ARRAY[ channel ]->PIBC1; */
+#define GPIO_FROM_PIBC1_ARRAY_COUNT  11
+#define GPIO_FROM_PIBC1_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &GPIO_FROM_PIBC1, &GPIO_FROM_PIBC2, &GPIO_FROM_PIBC3, &GPIO_FROM_PIBC4, &GPIO_FROM_PIBC5, &GPIO_FROM_PIBC6, &GPIO_FROM_PIBC7, &GPIO_FROM_PIBC8, \
+    &GPIO_FROM_PIBC9, &GPIO_FROM_PIBC10, &GPIO_FROM_PIBC11 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define GPIO_FROM_PIBC1 (*(struct st_gpio_from_pibc1 *)&GPIO.PIBC1) /* GPIO_FROM_PIBC1 */
+#define GPIO_FROM_PIBC2 (*(struct st_gpio_from_pibc1 *)&GPIO.PIBC2) /* GPIO_FROM_PIBC2 */
+#define GPIO_FROM_PIBC3 (*(struct st_gpio_from_pibc1 *)&GPIO.PIBC3) /* GPIO_FROM_PIBC3 */
+#define GPIO_FROM_PIBC4 (*(struct st_gpio_from_pibc1 *)&GPIO.PIBC4) /* GPIO_FROM_PIBC4 */
+#define GPIO_FROM_PIBC5 (*(struct st_gpio_from_pibc1 *)&GPIO.PIBC5) /* GPIO_FROM_PIBC5 */
+#define GPIO_FROM_PIBC6 (*(struct st_gpio_from_pibc1 *)&GPIO.PIBC6) /* GPIO_FROM_PIBC6 */
+#define GPIO_FROM_PIBC7 (*(struct st_gpio_from_pibc1 *)&GPIO.PIBC7) /* GPIO_FROM_PIBC7 */
+#define GPIO_FROM_PIBC8 (*(struct st_gpio_from_pibc1 *)&GPIO.PIBC8) /* GPIO_FROM_PIBC8 */
+#define GPIO_FROM_PIBC9 (*(struct st_gpio_from_pibc1 *)&GPIO.PIBC9) /* GPIO_FROM_PIBC9 */
+#define GPIO_FROM_PIBC10 (*(struct st_gpio_from_pibc1 *)&GPIO.PIBC10) /* GPIO_FROM_PIBC10 */
+#define GPIO_FROM_PIBC11 (*(struct st_gpio_from_pibc1 *)&GPIO.PIBC11) /* GPIO_FROM_PIBC11 */
+
+
+/* Channnel array defines of GPIO_FROM_PFCAE1_ARRAY */
+/*(Sample) value = GPIO_FROM_PFCAE1_ARRAY[ channel ]->PFCAE1; */
+#define GPIO_FROM_PFCAE1_ARRAY_COUNT  11
+#define GPIO_FROM_PFCAE1_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &GPIO_FROM_PFCAE1, &GPIO_FROM_PFCAE2, &GPIO_FROM_PFCAE3, &GPIO_FROM_PFCAE4, &GPIO_FROM_PFCAE5, &GPIO_FROM_PFCAE6, &GPIO_FROM_PFCAE7, &GPIO_FROM_PFCAE8, \
+    &GPIO_FROM_PFCAE9, &GPIO_FROM_PFCAE10, &GPIO_FROM_PFCAE11 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define GPIO_FROM_PFCAE1 (*(struct st_gpio_from_pfcae1 *)&GPIO.PFCAE1) /* GPIO_FROM_PFCAE1 */
+#define GPIO_FROM_PFCAE2 (*(struct st_gpio_from_pfcae1 *)&GPIO.PFCAE2) /* GPIO_FROM_PFCAE2 */
+#define GPIO_FROM_PFCAE3 (*(struct st_gpio_from_pfcae1 *)&GPIO.PFCAE3) /* GPIO_FROM_PFCAE3 */
+#define GPIO_FROM_PFCAE4 (*(struct st_gpio_from_pfcae1 *)&GPIO.PFCAE4) /* GPIO_FROM_PFCAE4 */
+#define GPIO_FROM_PFCAE5 (*(struct st_gpio_from_pfcae1 *)&GPIO.PFCAE5) /* GPIO_FROM_PFCAE5 */
+#define GPIO_FROM_PFCAE6 (*(struct st_gpio_from_pfcae1 *)&GPIO.PFCAE6) /* GPIO_FROM_PFCAE6 */
+#define GPIO_FROM_PFCAE7 (*(struct st_gpio_from_pfcae1 *)&GPIO.PFCAE7) /* GPIO_FROM_PFCAE7 */
+#define GPIO_FROM_PFCAE8 (*(struct st_gpio_from_pfcae1 *)&GPIO.PFCAE8) /* GPIO_FROM_PFCAE8 */
+#define GPIO_FROM_PFCAE9 (*(struct st_gpio_from_pfcae1 *)&GPIO.PFCAE9) /* GPIO_FROM_PFCAE9 */
+#define GPIO_FROM_PFCAE10 (*(struct st_gpio_from_pfcae1 *)&GPIO.PFCAE10) /* GPIO_FROM_PFCAE10 */
+#define GPIO_FROM_PFCAE11 (*(struct st_gpio_from_pfcae1 *)&GPIO.PFCAE11) /* GPIO_FROM_PFCAE11 */
+
+
+/* Channnel array defines of GPIO_FROM_PNOT1_ARRAY */
+/*(Sample) value = GPIO_FROM_PNOT1_ARRAY[ channel ]->PNOT1; */
+#define GPIO_FROM_PNOT1_ARRAY_COUNT  11
+#define GPIO_FROM_PNOT1_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &GPIO_FROM_PNOT1, &GPIO_FROM_PNOT2, &GPIO_FROM_PNOT3, &GPIO_FROM_PNOT4, &GPIO_FROM_PNOT5, &GPIO_FROM_PNOT6, &GPIO_FROM_PNOT7, &GPIO_FROM_PNOT8, \
+    &GPIO_FROM_PNOT9, &GPIO_FROM_PNOT10, &GPIO_FROM_PNOT11 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define GPIO_FROM_PNOT1 (*(struct st_gpio_from_pnot1 *)&GPIO.PNOT1) /* GPIO_FROM_PNOT1 */
+#define GPIO_FROM_PNOT2 (*(struct st_gpio_from_pnot1 *)&GPIO.PNOT2) /* GPIO_FROM_PNOT2 */
+#define GPIO_FROM_PNOT3 (*(struct st_gpio_from_pnot1 *)&GPIO.PNOT3) /* GPIO_FROM_PNOT3 */
+#define GPIO_FROM_PNOT4 (*(struct st_gpio_from_pnot1 *)&GPIO.PNOT4) /* GPIO_FROM_PNOT4 */
+#define GPIO_FROM_PNOT5 (*(struct st_gpio_from_pnot1 *)&GPIO.PNOT5) /* GPIO_FROM_PNOT5 */
+#define GPIO_FROM_PNOT6 (*(struct st_gpio_from_pnot1 *)&GPIO.PNOT6) /* GPIO_FROM_PNOT6 */
+#define GPIO_FROM_PNOT7 (*(struct st_gpio_from_pnot1 *)&GPIO.PNOT7) /* GPIO_FROM_PNOT7 */
+#define GPIO_FROM_PNOT8 (*(struct st_gpio_from_pnot1 *)&GPIO.PNOT8) /* GPIO_FROM_PNOT8 */
+#define GPIO_FROM_PNOT9 (*(struct st_gpio_from_pnot1 *)&GPIO.PNOT9) /* GPIO_FROM_PNOT9 */
+#define GPIO_FROM_PNOT10 (*(struct st_gpio_from_pnot1 *)&GPIO.PNOT10) /* GPIO_FROM_PNOT10 */
+#define GPIO_FROM_PNOT11 (*(struct st_gpio_from_pnot1 *)&GPIO.PNOT11) /* GPIO_FROM_PNOT11 */
+
+
+/* Channnel array defines of GPIO_FROM_PFCE1_ARRAY */
+/*(Sample) value = GPIO_FROM_PFCE1_ARRAY[ channel ]->PFCE1; */
+#define GPIO_FROM_PFCE1_ARRAY_COUNT  11
+#define GPIO_FROM_PFCE1_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &GPIO_FROM_PFCE1, &GPIO_FROM_PFCE2, &GPIO_FROM_PFCE3, &GPIO_FROM_PFCE4, &GPIO_FROM_PFCE5, &GPIO_FROM_PFCE6, &GPIO_FROM_PFCE7, &GPIO_FROM_PFCE8, \
+    &GPIO_FROM_PFCE9, &GPIO_FROM_PFCE10, &GPIO_FROM_PFCE11 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define GPIO_FROM_PFCE1 (*(struct st_gpio_from_pfce1 *)&GPIO.PFCE1) /* GPIO_FROM_PFCE1 */
+#define GPIO_FROM_PFCE2 (*(struct st_gpio_from_pfce1 *)&GPIO.PFCE2) /* GPIO_FROM_PFCE2 */
+#define GPIO_FROM_PFCE3 (*(struct st_gpio_from_pfce1 *)&GPIO.PFCE3) /* GPIO_FROM_PFCE3 */
+#define GPIO_FROM_PFCE4 (*(struct st_gpio_from_pfce1 *)&GPIO.PFCE4) /* GPIO_FROM_PFCE4 */
+#define GPIO_FROM_PFCE5 (*(struct st_gpio_from_pfce1 *)&GPIO.PFCE5) /* GPIO_FROM_PFCE5 */
+#define GPIO_FROM_PFCE6 (*(struct st_gpio_from_pfce1 *)&GPIO.PFCE6) /* GPIO_FROM_PFCE6 */
+#define GPIO_FROM_PFCE7 (*(struct st_gpio_from_pfce1 *)&GPIO.PFCE7) /* GPIO_FROM_PFCE7 */
+#define GPIO_FROM_PFCE8 (*(struct st_gpio_from_pfce1 *)&GPIO.PFCE8) /* GPIO_FROM_PFCE8 */
+#define GPIO_FROM_PFCE9 (*(struct st_gpio_from_pfce1 *)&GPIO.PFCE9) /* GPIO_FROM_PFCE9 */
+#define GPIO_FROM_PFCE10 (*(struct st_gpio_from_pfce1 *)&GPIO.PFCE10) /* GPIO_FROM_PFCE10 */
+#define GPIO_FROM_PFCE11 (*(struct st_gpio_from_pfce1 *)&GPIO.PFCE11) /* GPIO_FROM_PFCE11 */
+
+
+/* Channnel array defines of GPIO_FROM_PFC1_ARRAY */
+/*(Sample) value = GPIO_FROM_PFC1_ARRAY[ channel ]->PFC1; */
+#define GPIO_FROM_PFC1_ARRAY_COUNT  11
+#define GPIO_FROM_PFC1_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &GPIO_FROM_PFC1, &GPIO_FROM_PFC2, &GPIO_FROM_PFC3, &GPIO_FROM_PFC4, &GPIO_FROM_PFC5, &GPIO_FROM_PFC6, &GPIO_FROM_PFC7, &GPIO_FROM_PFC8, \
+    &GPIO_FROM_PFC9, &GPIO_FROM_PFC10, &GPIO_FROM_PFC11 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define GPIO_FROM_PFC1 (*(struct st_gpio_from_pfc1 *)&GPIO.PFC1) /* GPIO_FROM_PFC1 */
+#define GPIO_FROM_PFC2 (*(struct st_gpio_from_pfc1 *)&GPIO.PFC2) /* GPIO_FROM_PFC2 */
+#define GPIO_FROM_PFC3 (*(struct st_gpio_from_pfc1 *)&GPIO.PFC3) /* GPIO_FROM_PFC3 */
+#define GPIO_FROM_PFC4 (*(struct st_gpio_from_pfc1 *)&GPIO.PFC4) /* GPIO_FROM_PFC4 */
+#define GPIO_FROM_PFC5 (*(struct st_gpio_from_pfc1 *)&GPIO.PFC5) /* GPIO_FROM_PFC5 */
+#define GPIO_FROM_PFC6 (*(struct st_gpio_from_pfc1 *)&GPIO.PFC6) /* GPIO_FROM_PFC6 */
+#define GPIO_FROM_PFC7 (*(struct st_gpio_from_pfc1 *)&GPIO.PFC7) /* GPIO_FROM_PFC7 */
+#define GPIO_FROM_PFC8 (*(struct st_gpio_from_pfc1 *)&GPIO.PFC8) /* GPIO_FROM_PFC8 */
+#define GPIO_FROM_PFC9 (*(struct st_gpio_from_pfc1 *)&GPIO.PFC9) /* GPIO_FROM_PFC9 */
+#define GPIO_FROM_PFC10 (*(struct st_gpio_from_pfc1 *)&GPIO.PFC10) /* GPIO_FROM_PFC10 */
+#define GPIO_FROM_PFC11 (*(struct st_gpio_from_pfc1 *)&GPIO.PFC11) /* GPIO_FROM_PFC11 */
+
+
+/* Channnel array defines of GPIO_FROM_PMC0_ARRAY */
+/*(Sample) value = GPIO_FROM_PMC0_ARRAY[ channel ]->PMC0; */
+#define GPIO_FROM_PMC0_ARRAY_COUNT  12
+#define GPIO_FROM_PMC0_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &GPIO_FROM_PMC0, &GPIO_FROM_PMC1, &GPIO_FROM_PMC2, &GPIO_FROM_PMC3, &GPIO_FROM_PMC4, &GPIO_FROM_PMC5, &GPIO_FROM_PMC6, &GPIO_FROM_PMC7, \
+    &GPIO_FROM_PMC8, &GPIO_FROM_PMC9, &GPIO_FROM_PMC10, &GPIO_FROM_PMC11 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define GPIO_FROM_PMC0 (*(struct st_gpio_from_pmc0 *)&GPIO.PMC0) /* GPIO_FROM_PMC0 */
+#define GPIO_FROM_PMC1 (*(struct st_gpio_from_pmc0 *)&GPIO.PMC1) /* GPIO_FROM_PMC1 */
+#define GPIO_FROM_PMC2 (*(struct st_gpio_from_pmc0 *)&GPIO.PMC2) /* GPIO_FROM_PMC2 */
+#define GPIO_FROM_PMC3 (*(struct st_gpio_from_pmc0 *)&GPIO.PMC3) /* GPIO_FROM_PMC3 */
+#define GPIO_FROM_PMC4 (*(struct st_gpio_from_pmc0 *)&GPIO.PMC4) /* GPIO_FROM_PMC4 */
+#define GPIO_FROM_PMC5 (*(struct st_gpio_from_pmc0 *)&GPIO.PMC5) /* GPIO_FROM_PMC5 */
+#define GPIO_FROM_PMC6 (*(struct st_gpio_from_pmc0 *)&GPIO.PMC6) /* GPIO_FROM_PMC6 */
+#define GPIO_FROM_PMC7 (*(struct st_gpio_from_pmc0 *)&GPIO.PMC7) /* GPIO_FROM_PMC7 */
+#define GPIO_FROM_PMC8 (*(struct st_gpio_from_pmc0 *)&GPIO.PMC8) /* GPIO_FROM_PMC8 */
+#define GPIO_FROM_PMC9 (*(struct st_gpio_from_pmc0 *)&GPIO.PMC9) /* GPIO_FROM_PMC9 */
+#define GPIO_FROM_PMC10 (*(struct st_gpio_from_pmc0 *)&GPIO.PMC10) /* GPIO_FROM_PMC10 */
+#define GPIO_FROM_PMC11 (*(struct st_gpio_from_pmc0 *)&GPIO.PMC11) /* GPIO_FROM_PMC11 */
+
+
+/* Channnel array defines of GPIO_FROM_PM1_ARRAY */
+/*(Sample) value = GPIO_FROM_PM1_ARRAY[ channel ]->PM1; */
+#define GPIO_FROM_PM1_ARRAY_COUNT  11
+#define GPIO_FROM_PM1_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &GPIO_FROM_PM1, &GPIO_FROM_PM2, &GPIO_FROM_PM3, &GPIO_FROM_PM4, &GPIO_FROM_PM5, &GPIO_FROM_PM6, &GPIO_FROM_PM7, &GPIO_FROM_PM8, \
+    &GPIO_FROM_PM9, &GPIO_FROM_PM10, &GPIO_FROM_PM11 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define GPIO_FROM_PM1 (*(struct st_gpio_from_pm1 *)&GPIO.PM1)    /* GPIO_FROM_PM1 */
+#define GPIO_FROM_PM2 (*(struct st_gpio_from_pm1 *)&GPIO.PM2)    /* GPIO_FROM_PM2 */
+#define GPIO_FROM_PM3 (*(struct st_gpio_from_pm1 *)&GPIO.PM3)    /* GPIO_FROM_PM3 */
+#define GPIO_FROM_PM4 (*(struct st_gpio_from_pm1 *)&GPIO.PM4)    /* GPIO_FROM_PM4 */
+#define GPIO_FROM_PM5 (*(struct st_gpio_from_pm1 *)&GPIO.PM5)    /* GPIO_FROM_PM5 */
+#define GPIO_FROM_PM6 (*(struct st_gpio_from_pm1 *)&GPIO.PM6)    /* GPIO_FROM_PM6 */
+#define GPIO_FROM_PM7 (*(struct st_gpio_from_pm1 *)&GPIO.PM7)    /* GPIO_FROM_PM7 */
+#define GPIO_FROM_PM8 (*(struct st_gpio_from_pm1 *)&GPIO.PM8)    /* GPIO_FROM_PM8 */
+#define GPIO_FROM_PM9 (*(struct st_gpio_from_pm1 *)&GPIO.PM9)    /* GPIO_FROM_PM9 */
+#define GPIO_FROM_PM10 (*(struct st_gpio_from_pm1 *)&GPIO.PM10)  /* GPIO_FROM_PM10 */
+#define GPIO_FROM_PM11 (*(struct st_gpio_from_pm1 *)&GPIO.PM11)  /* GPIO_FROM_PM11 */
+
+
+/* Channnel array defines of GPIO_FROM_PPR0_ARRAY */
+/*(Sample) value = GPIO_FROM_PPR0_ARRAY[ channel ]->PPR0; */
+#define GPIO_FROM_PPR0_ARRAY_COUNT  12
+#define GPIO_FROM_PPR0_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &GPIO_FROM_PPR0, &GPIO_FROM_PPR1, &GPIO_FROM_PPR2, &GPIO_FROM_PPR3, &GPIO_FROM_PPR4, &GPIO_FROM_PPR5, &GPIO_FROM_PPR6, &GPIO_FROM_PPR7, \
+    &GPIO_FROM_PPR8, &GPIO_FROM_PPR9, &GPIO_FROM_PPR10, &GPIO_FROM_PPR11 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define GPIO_FROM_PPR0 (*(struct st_gpio_from_ppr0 *)&GPIO.PPR0) /* GPIO_FROM_PPR0 */
+#define GPIO_FROM_PPR1 (*(struct st_gpio_from_ppr0 *)&GPIO.PPR1) /* GPIO_FROM_PPR1 */
+#define GPIO_FROM_PPR2 (*(struct st_gpio_from_ppr0 *)&GPIO.PPR2) /* GPIO_FROM_PPR2 */
+#define GPIO_FROM_PPR3 (*(struct st_gpio_from_ppr0 *)&GPIO.PPR3) /* GPIO_FROM_PPR3 */
+#define GPIO_FROM_PPR4 (*(struct st_gpio_from_ppr0 *)&GPIO.PPR4) /* GPIO_FROM_PPR4 */
+#define GPIO_FROM_PPR5 (*(struct st_gpio_from_ppr0 *)&GPIO.PPR5) /* GPIO_FROM_PPR5 */
+#define GPIO_FROM_PPR6 (*(struct st_gpio_from_ppr0 *)&GPIO.PPR6) /* GPIO_FROM_PPR6 */
+#define GPIO_FROM_PPR7 (*(struct st_gpio_from_ppr0 *)&GPIO.PPR7) /* GPIO_FROM_PPR7 */
+#define GPIO_FROM_PPR8 (*(struct st_gpio_from_ppr0 *)&GPIO.PPR8) /* GPIO_FROM_PPR8 */
+#define GPIO_FROM_PPR9 (*(struct st_gpio_from_ppr0 *)&GPIO.PPR9) /* GPIO_FROM_PPR9 */
+#define GPIO_FROM_PPR10 (*(struct st_gpio_from_ppr0 *)&GPIO.PPR10) /* GPIO_FROM_PPR10 */
+#define GPIO_FROM_PPR11 (*(struct st_gpio_from_ppr0 *)&GPIO.PPR11) /* GPIO_FROM_PPR11 */
+
+
+/* Channnel array defines of GPIO_FROM_P1_ARRAY */
+/*(Sample) value = GPIO_FROM_P1_ARRAY[ channel ]->P1; */
+#define GPIO_FROM_P1_ARRAY_COUNT  11
+#define GPIO_FROM_P1_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &GPIO_FROM_P1, &GPIO_FROM_P2, &GPIO_FROM_P3, &GPIO_FROM_P4, &GPIO_FROM_P5, &GPIO_FROM_P6, &GPIO_FROM_P7, &GPIO_FROM_P8, \
+    &GPIO_FROM_P9, &GPIO_FROM_P10, &GPIO_FROM_P11 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define GPIO_FROM_P1 (*(struct st_gpio_from_p1 *)&GPIO.P1)       /* GPIO_FROM_P1 */
+#define GPIO_FROM_P2 (*(struct st_gpio_from_p1 *)&GPIO.P2)       /* GPIO_FROM_P2 */
+#define GPIO_FROM_P3 (*(struct st_gpio_from_p1 *)&GPIO.P3)       /* GPIO_FROM_P3 */
+#define GPIO_FROM_P4 (*(struct st_gpio_from_p1 *)&GPIO.P4)       /* GPIO_FROM_P4 */
+#define GPIO_FROM_P5 (*(struct st_gpio_from_p1 *)&GPIO.P5)       /* GPIO_FROM_P5 */
+#define GPIO_FROM_P6 (*(struct st_gpio_from_p1 *)&GPIO.P6)       /* GPIO_FROM_P6 */
+#define GPIO_FROM_P7 (*(struct st_gpio_from_p1 *)&GPIO.P7)       /* GPIO_FROM_P7 */
+#define GPIO_FROM_P8 (*(struct st_gpio_from_p1 *)&GPIO.P8)       /* GPIO_FROM_P8 */
+#define GPIO_FROM_P9 (*(struct st_gpio_from_p1 *)&GPIO.P9)       /* GPIO_FROM_P9 */
+#define GPIO_FROM_P10 (*(struct st_gpio_from_p1 *)&GPIO.P10)     /* GPIO_FROM_P10 */
+#define GPIO_FROM_P11 (*(struct st_gpio_from_p1 *)&GPIO.P11)     /* GPIO_FROM_P11 */
+
+/* End of channnel array defines of GPIO */
+
+
+#define GPIOP1 GPIO.P1
+#define GPIOP2 GPIO.P2
+#define GPIOP3 GPIO.P3
+#define GPIOP4 GPIO.P4
+#define GPIOP5 GPIO.P5
+#define GPIOP6 GPIO.P6
+#define GPIOP7 GPIO.P7
+#define GPIOP8 GPIO.P8
+#define GPIOP9 GPIO.P9
+#define GPIOP10 GPIO.P10
+#define GPIOP11 GPIO.P11
+#define GPIOPSR1 GPIO.PSR1
+#define GPIOPSR2 GPIO.PSR2
+#define GPIOPSR3 GPIO.PSR3
+#define GPIOPSR4 GPIO.PSR4
+#define GPIOPSR5 GPIO.PSR5
+#define GPIOPSR6 GPIO.PSR6
+#define GPIOPSR7 GPIO.PSR7
+#define GPIOPSR8 GPIO.PSR8
+#define GPIOPSR9 GPIO.PSR9
+#define GPIOPSR10 GPIO.PSR10
+#define GPIOPSR11 GPIO.PSR11
+#define GPIOPPR0 GPIO.PPR0
+#define GPIOPPR1 GPIO.PPR1
+#define GPIOPPR2 GPIO.PPR2
+#define GPIOPPR3 GPIO.PPR3
+#define GPIOPPR4 GPIO.PPR4
+#define GPIOPPR5 GPIO.PPR5
+#define GPIOPPR6 GPIO.PPR6
+#define GPIOPPR7 GPIO.PPR7
+#define GPIOPPR8 GPIO.PPR8
+#define GPIOPPR9 GPIO.PPR9
+#define GPIOPPR10 GPIO.PPR10
+#define GPIOPPR11 GPIO.PPR11
+#define GPIOPM1 GPIO.PM1
+#define GPIOPM2 GPIO.PM2
+#define GPIOPM3 GPIO.PM3
+#define GPIOPM4 GPIO.PM4
+#define GPIOPM5 GPIO.PM5
+#define GPIOPM6 GPIO.PM6
+#define GPIOPM7 GPIO.PM7
+#define GPIOPM8 GPIO.PM8
+#define GPIOPM9 GPIO.PM9
+#define GPIOPM10 GPIO.PM10
+#define GPIOPM11 GPIO.PM11
+#define GPIOPMC0 GPIO.PMC0
+#define GPIOPMC1 GPIO.PMC1
+#define GPIOPMC2 GPIO.PMC2
+#define GPIOPMC3 GPIO.PMC3
+#define GPIOPMC4 GPIO.PMC4
+#define GPIOPMC5 GPIO.PMC5
+#define GPIOPMC6 GPIO.PMC6
+#define GPIOPMC7 GPIO.PMC7
+#define GPIOPMC8 GPIO.PMC8
+#define GPIOPMC9 GPIO.PMC9
+#define GPIOPMC10 GPIO.PMC10
+#define GPIOPMC11 GPIO.PMC11
+#define GPIOPFC1 GPIO.PFC1
+#define GPIOPFC2 GPIO.PFC2
+#define GPIOPFC3 GPIO.PFC3
+#define GPIOPFC4 GPIO.PFC4
+#define GPIOPFC5 GPIO.PFC5
+#define GPIOPFC6 GPIO.PFC6
+#define GPIOPFC7 GPIO.PFC7
+#define GPIOPFC8 GPIO.PFC8
+#define GPIOPFC9 GPIO.PFC9
+#define GPIOPFC10 GPIO.PFC10
+#define GPIOPFC11 GPIO.PFC11
+#define GPIOPFCE1 GPIO.PFCE1
+#define GPIOPFCE2 GPIO.PFCE2
+#define GPIOPFCE3 GPIO.PFCE3
+#define GPIOPFCE4 GPIO.PFCE4
+#define GPIOPFCE5 GPIO.PFCE5
+#define GPIOPFCE6 GPIO.PFCE6
+#define GPIOPFCE7 GPIO.PFCE7
+#define GPIOPFCE8 GPIO.PFCE8
+#define GPIOPFCE9 GPIO.PFCE9
+#define GPIOPFCE10 GPIO.PFCE10
+#define GPIOPFCE11 GPIO.PFCE11
+#define GPIOPNOT1 GPIO.PNOT1
+#define GPIOPNOT2 GPIO.PNOT2
+#define GPIOPNOT3 GPIO.PNOT3
+#define GPIOPNOT4 GPIO.PNOT4
+#define GPIOPNOT5 GPIO.PNOT5
+#define GPIOPNOT6 GPIO.PNOT6
+#define GPIOPNOT7 GPIO.PNOT7
+#define GPIOPNOT8 GPIO.PNOT8
+#define GPIOPNOT9 GPIO.PNOT9
+#define GPIOPNOT10 GPIO.PNOT10
+#define GPIOPNOT11 GPIO.PNOT11
+#define GPIOPMSR1 GPIO.PMSR1
+#define GPIOPMSR2 GPIO.PMSR2
+#define GPIOPMSR3 GPIO.PMSR3
+#define GPIOPMSR4 GPIO.PMSR4
+#define GPIOPMSR5 GPIO.PMSR5
+#define GPIOPMSR6 GPIO.PMSR6
+#define GPIOPMSR7 GPIO.PMSR7
+#define GPIOPMSR8 GPIO.PMSR8
+#define GPIOPMSR9 GPIO.PMSR9
+#define GPIOPMSR10 GPIO.PMSR10
+#define GPIOPMSR11 GPIO.PMSR11
+#define GPIOPMCSR0 GPIO.PMCSR0
+#define GPIOPMCSR1 GPIO.PMCSR1
+#define GPIOPMCSR2 GPIO.PMCSR2
+#define GPIOPMCSR3 GPIO.PMCSR3
+#define GPIOPMCSR4 GPIO.PMCSR4
+#define GPIOPMCSR5 GPIO.PMCSR5
+#define GPIOPMCSR6 GPIO.PMCSR6
+#define GPIOPMCSR7 GPIO.PMCSR7
+#define GPIOPMCSR8 GPIO.PMCSR8
+#define GPIOPMCSR9 GPIO.PMCSR9
+#define GPIOPMCSR10 GPIO.PMCSR10
+#define GPIOPMCSR11 GPIO.PMCSR11
+#define GPIOPFCAE1 GPIO.PFCAE1
+#define GPIOPFCAE2 GPIO.PFCAE2
+#define GPIOPFCAE3 GPIO.PFCAE3
+#define GPIOPFCAE4 GPIO.PFCAE4
+#define GPIOPFCAE5 GPIO.PFCAE5
+#define GPIOPFCAE6 GPIO.PFCAE6
+#define GPIOPFCAE7 GPIO.PFCAE7
+#define GPIOPFCAE8 GPIO.PFCAE8
+#define GPIOPFCAE9 GPIO.PFCAE9
+#define GPIOPFCAE10 GPIO.PFCAE10
+#define GPIOPFCAE11 GPIO.PFCAE11
+#define GPIOSNCR GPIO.SNCR
+#define GPIOPIBC0 GPIO.PIBC0
+#define GPIOPIBC1 GPIO.PIBC1
+#define GPIOPIBC2 GPIO.PIBC2
+#define GPIOPIBC3 GPIO.PIBC3
+#define GPIOPIBC4 GPIO.PIBC4
+#define GPIOPIBC5 GPIO.PIBC5
+#define GPIOPIBC6 GPIO.PIBC6
+#define GPIOPIBC7 GPIO.PIBC7
+#define GPIOPIBC8 GPIO.PIBC8
+#define GPIOPIBC9 GPIO.PIBC9
+#define GPIOPIBC10 GPIO.PIBC10
+#define GPIOPIBC11 GPIO.PIBC11
+#define GPIOPBDC1 GPIO.PBDC1
+#define GPIOPBDC2 GPIO.PBDC2
+#define GPIOPBDC3 GPIO.PBDC3
+#define GPIOPBDC4 GPIO.PBDC4
+#define GPIOPBDC5 GPIO.PBDC5
+#define GPIOPBDC6 GPIO.PBDC6
+#define GPIOPBDC7 GPIO.PBDC7
+#define GPIOPBDC8 GPIO.PBDC8
+#define GPIOPBDC9 GPIO.PBDC9
+#define GPIOPBDC10 GPIO.PBDC10
+#define GPIOPBDC11 GPIO.PBDC11
+#define GPIOPIPC1 GPIO.PIPC1
+#define GPIOPIPC2 GPIO.PIPC2
+#define GPIOPIPC3 GPIO.PIPC3
+#define GPIOPIPC4 GPIO.PIPC4
+#define GPIOPIPC5 GPIO.PIPC5
+#define GPIOPIPC6 GPIO.PIPC6
+#define GPIOPIPC7 GPIO.PIPC7
+#define GPIOPIPC8 GPIO.PIPC8
+#define GPIOPIPC9 GPIO.PIPC9
+#define GPIOPIPC10 GPIO.PIPC10
+#define GPIOPIPC11 GPIO.PIPC11
+#define GPIOJPPR0 GPIO.JPPR0
+#define GPIOJPMC0 GPIO.JPMC0
+#define GPIOJPMCSR0 GPIO.JPMCSR0
+#define GPIOJPIBC0 GPIO.JPIBC0
+/* <-SEC M1.10.1 */
+/* <-QAC 0639 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/ieb_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/ieb_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/ieb_iodefine.h	(revision 270)
@@ -0,0 +1,119 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : ieb_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef IEB_IODEFINE_H
+#define IEB_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_ieb
+{                                                          /* IEB              */
+    volatile uint8_t   B0BCR;                                  /*  B0BCR           */
+    volatile uint8_t   dummy495[3];                            /*                  */
+    volatile uint8_t   B0PSR;                                  /*  B0PSR           */
+    volatile uint8_t   dummy496[3];                            /*                  */
+    volatile uint16_t B0UAR;                                  /*  B0UAR           */
+    volatile uint8_t   dummy497[2];                            /*                  */
+    volatile uint16_t B0SAR;                                  /*  B0SAR           */
+    volatile uint8_t   dummy498[2];                            /*                  */
+    volatile uint16_t B0PAR;                                  /*  B0PAR           */
+    volatile uint8_t   dummy499[2];                            /*                  */
+    volatile uint16_t B0RSA;                                  /*  B0RSA           */
+    volatile uint8_t   dummy500[2];                            /*                  */
+    volatile uint8_t   B0CDR;                                  /*  B0CDR           */
+    volatile uint8_t   dummy501[3];                            /*                  */
+    volatile uint8_t   B0TCD;                                  /*  B0TCD           */
+    volatile uint8_t   dummy502[3];                            /*                  */
+    volatile uint8_t   B0RCD;                                  /*  B0RCD           */
+    volatile uint8_t   dummy503[3];                            /*                  */
+    volatile uint8_t   B0DLR;                                  /*  B0DLR           */
+    volatile uint8_t   dummy504[3];                            /*                  */
+    volatile uint8_t   B0TDL;                                  /*  B0TDL           */
+    volatile uint8_t   dummy505[3];                            /*                  */
+    volatile uint8_t   B0RDL;                                  /*  B0RDL           */
+    volatile uint8_t   dummy506[3];                            /*                  */
+    volatile uint8_t   B0CKS;                                  /*  B0CKS           */
+    volatile uint8_t   dummy507[3];                            /*                  */
+    volatile uint8_t   B0TMS;                                  /*  B0TMS           */
+    volatile uint8_t   dummy508[3];                            /*                  */
+    volatile uint8_t   B0PCR;                                  /*  B0PCR           */
+    volatile uint8_t   dummy509[3];                            /*                  */
+    volatile uint16_t B0BSR;                                  /*  B0BSR           */
+    volatile uint8_t   dummy510[2];                            /*                  */
+    volatile uint8_t   B0SSR;                                  /*  B0SSR           */
+    volatile uint8_t   dummy511[3];                            /*                  */
+    volatile uint8_t   B0USR;                                  /*  B0USR           */
+    volatile uint8_t   dummy512[3];                            /*                  */
+    volatile uint8_t   B0ISR;                                  /*  B0ISR           */
+    volatile uint8_t   dummy513[3];                            /*                  */
+    volatile uint8_t   B0ESR;                                  /*  B0ESR           */
+    volatile uint8_t   dummy514[3];                            /*                  */
+    volatile uint8_t   B0FSR;                                  /*  B0FSR           */
+    volatile uint8_t   dummy515[3];                            /*                  */
+    volatile uint8_t   B0SCR;                                  /*  B0SCR           */
+    volatile uint8_t   dummy516[3];                            /*                  */
+    volatile uint8_t   B0CCR;                                  /*  B0CCR           */
+    volatile uint8_t   dummy517[3];                            /*                  */
+    volatile uint8_t   B0STC0;                                 /*  B0STC0          */
+    volatile uint8_t   dummy518[3];                            /*                  */
+    volatile uint8_t   B0STC1;                                 /*  B0STC1          */
+    volatile uint8_t   dummy519[3];                            /*                  */
+    volatile uint8_t   B0DR;                                   /*  B0DR            */
+};
+
+
+#define IEB     (*(struct st_ieb     *)0xFCFEF000uL) /* IEB */
+
+
+#define IEBB0BCR IEB.B0BCR
+#define IEBB0PSR IEB.B0PSR
+#define IEBB0UAR IEB.B0UAR
+#define IEBB0SAR IEB.B0SAR
+#define IEBB0PAR IEB.B0PAR
+#define IEBB0RSA IEB.B0RSA
+#define IEBB0CDR IEB.B0CDR
+#define IEBB0TCD IEB.B0TCD
+#define IEBB0RCD IEB.B0RCD
+#define IEBB0DLR IEB.B0DLR
+#define IEBB0TDL IEB.B0TDL
+#define IEBB0RDL IEB.B0RDL
+#define IEBB0CKS IEB.B0CKS
+#define IEBB0TMS IEB.B0TMS
+#define IEBB0PCR IEB.B0PCR
+#define IEBB0BSR IEB.B0BSR
+#define IEBB0SSR IEB.B0SSR
+#define IEBB0USR IEB.B0USR
+#define IEBB0ISR IEB.B0ISR
+#define IEBB0ESR IEB.B0ESR
+#define IEBB0FSR IEB.B0FSR
+#define IEBB0SCR IEB.B0SCR
+#define IEBB0CCR IEB.B0CCR
+#define IEBB0STC0 IEB.B0STC0
+#define IEBB0STC1 IEB.B0STC1
+#define IEBB0DR IEB.B0DR
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/inb_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/inb_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/inb_iodefine.h	(revision 270)
@@ -0,0 +1,92 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : inb_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef INB_IODEFINE_H
+#define INB_IODEFINE_H
+
+struct st_inb
+{                                                          /* INB              */
+    volatile uint32_t  RMPR;                                   /*  RMPR            */
+#define INB_AXIBUSCTLn_COUNT 11
+    volatile uint32_t  AXIBUSCTL0;                             /*  AXIBUSCTL0      */
+    volatile uint32_t  AXIBUSCTL1;                             /*  AXIBUSCTL1      */
+    volatile uint32_t  AXIBUSCTL2;                             /*  AXIBUSCTL2      */
+    volatile uint32_t  AXIBUSCTL3;                             /*  AXIBUSCTL3      */
+    volatile uint32_t  AXIBUSCTL4;                             /*  AXIBUSCTL4      */
+    volatile uint32_t  AXIBUSCTL5;                             /*  AXIBUSCTL5      */
+    volatile uint32_t  AXIBUSCTL6;                             /*  AXIBUSCTL6      */
+    volatile uint32_t  AXIBUSCTL7;                             /*  AXIBUSCTL7      */
+    volatile uint32_t  AXIBUSCTL8;                             /*  AXIBUSCTL8      */
+    volatile uint32_t  AXIBUSCTL9;                             /*  AXIBUSCTL9      */
+    volatile uint32_t  AXIBUSCTL10;                            /*  AXIBUSCTL10     */
+#define INB_AXIRERRCTLn_COUNT 4
+    volatile uint32_t  AXIRERRCTL0;                            /*  AXIRERRCTL0     */
+    volatile uint32_t  AXIRERRCTL1;                            /*  AXIRERRCTL1     */
+    volatile uint32_t  AXIRERRCTL2;                            /*  AXIRERRCTL2     */
+    volatile uint32_t  AXIRERRCTL3;                            /*  AXIRERRCTL3     */
+#define INB_AXIRERRSTn_COUNT 4
+    volatile uint32_t  AXIRERRST0;                             /*  AXIRERRST0      */
+    volatile uint32_t  AXIRERRST1;                             /*  AXIRERRST1      */
+    volatile uint32_t  AXIRERRST2;                             /*  AXIRERRST2      */
+    volatile uint32_t  AXIRERRST3;                             /*  AXIRERRST3      */
+#define INB_AXIRERRCLRn_COUNT 4
+    volatile uint32_t  AXIRERRCLR0;                            /*  AXIRERRCLR0     */
+    volatile uint32_t  AXIRERRCLR1;                            /*  AXIRERRCLR1     */
+    volatile uint32_t  AXIRERRCLR2;                            /*  AXIRERRCLR2     */
+    volatile uint32_t  AXIRERRCLR3;                            /*  AXIRERRCLR3     */
+};
+
+
+#define INB     (*(struct st_inb     *)0xFCFE1A00uL) /* INB */
+
+
+#define INBRMPR INB.RMPR
+#define INBAXIBUSCTL0 INB.AXIBUSCTL0
+#define INBAXIBUSCTL1 INB.AXIBUSCTL1
+#define INBAXIBUSCTL2 INB.AXIBUSCTL2
+#define INBAXIBUSCTL3 INB.AXIBUSCTL3
+#define INBAXIBUSCTL4 INB.AXIBUSCTL4
+#define INBAXIBUSCTL5 INB.AXIBUSCTL5
+#define INBAXIBUSCTL6 INB.AXIBUSCTL6
+#define INBAXIBUSCTL7 INB.AXIBUSCTL7
+#define INBAXIBUSCTL8 INB.AXIBUSCTL8
+#define INBAXIBUSCTL9 INB.AXIBUSCTL9
+#define INBAXIBUSCTL10 INB.AXIBUSCTL10
+#define INBAXIRERRCTL0 INB.AXIRERRCTL0
+#define INBAXIRERRCTL1 INB.AXIRERRCTL1
+#define INBAXIRERRCTL2 INB.AXIRERRCTL2
+#define INBAXIRERRCTL3 INB.AXIRERRCTL3
+#define INBAXIRERRST0 INB.AXIRERRST0
+#define INBAXIRERRST1 INB.AXIRERRST1
+#define INBAXIRERRST2 INB.AXIRERRST2
+#define INBAXIRERRST3 INB.AXIRERRST3
+#define INBAXIRERRCLR0 INB.AXIRERRCLR0
+#define INBAXIRERRCLR1 INB.AXIRERRCLR1
+#define INBAXIRERRCLR2 INB.AXIRERRCLR2
+#define INBAXIRERRCLR3 INB.AXIRERRCLR3
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/intc_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/intc_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/intc_iodefine.h	(revision 270)
@@ -0,0 +1,1026 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : intc_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef INTC_IODEFINE_H
+#define INTC_IODEFINE_H
+/* ->QAC 0639 : Over 127 members (C90) */
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_intc
+{                                                          /* INTC             */
+    volatile uint32_t  ICDDCR;                                 /*  ICDDCR          */
+    volatile uint32_t  ICDICTR;                                /*  ICDICTR         */
+    volatile uint32_t  ICDIIDR;                                /*  ICDIIDR         */
+    volatile uint8_t   dummy193[116];                          /*                  */
+#define INTC_ICDISR0_COUNT 19
+    volatile uint32_t  ICDISR0;                                /*  ICDISR0         */
+    volatile uint32_t  ICDISR1;                                /*  ICDISR1         */
+    volatile uint32_t  ICDISR2;                                /*  ICDISR2         */
+    volatile uint32_t  ICDISR3;                                /*  ICDISR3         */
+    volatile uint32_t  ICDISR4;                                /*  ICDISR4         */
+    volatile uint32_t  ICDISR5;                                /*  ICDISR5         */
+    volatile uint32_t  ICDISR6;                                /*  ICDISR6         */
+    volatile uint32_t  ICDISR7;                                /*  ICDISR7         */
+    volatile uint32_t  ICDISR8;                                /*  ICDISR8         */
+    volatile uint32_t  ICDISR9;                                /*  ICDISR9         */
+    volatile uint32_t  ICDISR10;                               /*  ICDISR10        */
+    volatile uint32_t  ICDISR11;                               /*  ICDISR11        */
+    volatile uint32_t  ICDISR12;                               /*  ICDISR12        */
+    volatile uint32_t  ICDISR13;                               /*  ICDISR13        */
+    volatile uint32_t  ICDISR14;                               /*  ICDISR14        */
+    volatile uint32_t  ICDISR15;                               /*  ICDISR15        */
+    volatile uint32_t  ICDISR16;                               /*  ICDISR16        */
+    volatile uint32_t  ICDISR17;                               /*  ICDISR17        */
+    volatile uint32_t  ICDISR18;                               /*  ICDISR18        */
+    volatile uint8_t   dummy194[52];                           /*                  */
+#define INTC_ICDISER0_COUNT 19
+    volatile uint32_t  ICDISER0;                               /*  ICDISER0        */
+    volatile uint32_t  ICDISER1;                               /*  ICDISER1        */
+    volatile uint32_t  ICDISER2;                               /*  ICDISER2        */
+    volatile uint32_t  ICDISER3;                               /*  ICDISER3        */
+    volatile uint32_t  ICDISER4;                               /*  ICDISER4        */
+    volatile uint32_t  ICDISER5;                               /*  ICDISER5        */
+    volatile uint32_t  ICDISER6;                               /*  ICDISER6        */
+    volatile uint32_t  ICDISER7;                               /*  ICDISER7        */
+    volatile uint32_t  ICDISER8;                               /*  ICDISER8        */
+    volatile uint32_t  ICDISER9;                               /*  ICDISER9        */
+    volatile uint32_t  ICDISER10;                              /*  ICDISER10       */
+    volatile uint32_t  ICDISER11;                              /*  ICDISER11       */
+    volatile uint32_t  ICDISER12;                              /*  ICDISER12       */
+    volatile uint32_t  ICDISER13;                              /*  ICDISER13       */
+    volatile uint32_t  ICDISER14;                              /*  ICDISER14       */
+    volatile uint32_t  ICDISER15;                              /*  ICDISER15       */
+    volatile uint32_t  ICDISER16;                              /*  ICDISER16       */
+    volatile uint32_t  ICDISER17;                              /*  ICDISER17       */
+    volatile uint32_t  ICDISER18;                              /*  ICDISER18       */
+    volatile uint8_t   dummy195[52];                           /*                  */
+#define INTC_ICDICER0_COUNT 19
+    volatile uint32_t  ICDICER0;                               /*  ICDICER0        */
+    volatile uint32_t  ICDICER1;                               /*  ICDICER1        */
+    volatile uint32_t  ICDICER2;                               /*  ICDICER2        */
+    volatile uint32_t  ICDICER3;                               /*  ICDICER3        */
+    volatile uint32_t  ICDICER4;                               /*  ICDICER4        */
+    volatile uint32_t  ICDICER5;                               /*  ICDICER5        */
+    volatile uint32_t  ICDICER6;                               /*  ICDICER6        */
+    volatile uint32_t  ICDICER7;                               /*  ICDICER7        */
+    volatile uint32_t  ICDICER8;                               /*  ICDICER8        */
+    volatile uint32_t  ICDICER9;                               /*  ICDICER9        */
+    volatile uint32_t  ICDICER10;                              /*  ICDICER10       */
+    volatile uint32_t  ICDICER11;                              /*  ICDICER11       */
+    volatile uint32_t  ICDICER12;                              /*  ICDICER12       */
+    volatile uint32_t  ICDICER13;                              /*  ICDICER13       */
+    volatile uint32_t  ICDICER14;                              /*  ICDICER14       */
+    volatile uint32_t  ICDICER15;                              /*  ICDICER15       */
+    volatile uint32_t  ICDICER16;                              /*  ICDICER16       */
+    volatile uint32_t  ICDICER17;                              /*  ICDICER17       */
+    volatile uint32_t  ICDICER18;                              /*  ICDICER18       */
+    volatile uint8_t   dummy196[52];                           /*                  */
+#define INTC_ICDISPR0_COUNT 19
+    volatile uint32_t  ICDISPR0;                               /*  ICDISPR0        */
+    volatile uint32_t  ICDISPR1;                               /*  ICDISPR1        */
+    volatile uint32_t  ICDISPR2;                               /*  ICDISPR2        */
+    volatile uint32_t  ICDISPR3;                               /*  ICDISPR3        */
+    volatile uint32_t  ICDISPR4;                               /*  ICDISPR4        */
+    volatile uint32_t  ICDISPR5;                               /*  ICDISPR5        */
+    volatile uint32_t  ICDISPR6;                               /*  ICDISPR6        */
+    volatile uint32_t  ICDISPR7;                               /*  ICDISPR7        */
+    volatile uint32_t  ICDISPR8;                               /*  ICDISPR8        */
+    volatile uint32_t  ICDISPR9;                               /*  ICDISPR9        */
+    volatile uint32_t  ICDISPR10;                              /*  ICDISPR10       */
+    volatile uint32_t  ICDISPR11;                              /*  ICDISPR11       */
+    volatile uint32_t  ICDISPR12;                              /*  ICDISPR12       */
+    volatile uint32_t  ICDISPR13;                              /*  ICDISPR13       */
+    volatile uint32_t  ICDISPR14;                              /*  ICDISPR14       */
+    volatile uint32_t  ICDISPR15;                              /*  ICDISPR15       */
+    volatile uint32_t  ICDISPR16;                              /*  ICDISPR16       */
+    volatile uint32_t  ICDISPR17;                              /*  ICDISPR17       */
+    volatile uint32_t  ICDISPR18;                              /*  ICDISPR18       */
+    volatile uint8_t   dummy197[52];                           /*                  */
+#define INTC_ICDICPR0_COUNT 19
+    volatile uint32_t  ICDICPR0;                               /*  ICDICPR0        */
+    volatile uint32_t  ICDICPR1;                               /*  ICDICPR1        */
+    volatile uint32_t  ICDICPR2;                               /*  ICDICPR2        */
+    volatile uint32_t  ICDICPR3;                               /*  ICDICPR3        */
+    volatile uint32_t  ICDICPR4;                               /*  ICDICPR4        */
+    volatile uint32_t  ICDICPR5;                               /*  ICDICPR5        */
+    volatile uint32_t  ICDICPR6;                               /*  ICDICPR6        */
+    volatile uint32_t  ICDICPR7;                               /*  ICDICPR7        */
+    volatile uint32_t  ICDICPR8;                               /*  ICDICPR8        */
+    volatile uint32_t  ICDICPR9;                               /*  ICDICPR9        */
+    volatile uint32_t  ICDICPR10;                              /*  ICDICPR10       */
+    volatile uint32_t  ICDICPR11;                              /*  ICDICPR11       */
+    volatile uint32_t  ICDICPR12;                              /*  ICDICPR12       */
+    volatile uint32_t  ICDICPR13;                              /*  ICDICPR13       */
+    volatile uint32_t  ICDICPR14;                              /*  ICDICPR14       */
+    volatile uint32_t  ICDICPR15;                              /*  ICDICPR15       */
+    volatile uint32_t  ICDICPR16;                              /*  ICDICPR16       */
+    volatile uint32_t  ICDICPR17;                              /*  ICDICPR17       */
+    volatile uint32_t  ICDICPR18;                              /*  ICDICPR18       */
+    volatile uint8_t   dummy198[52];                           /*                  */
+#define INTC_ICDABR0_COUNT 19
+    volatile uint32_t  ICDABR0;                                /*  ICDABR0         */
+    volatile uint32_t  ICDABR1;                                /*  ICDABR1         */
+    volatile uint32_t  ICDABR2;                                /*  ICDABR2         */
+    volatile uint32_t  ICDABR3;                                /*  ICDABR3         */
+    volatile uint32_t  ICDABR4;                                /*  ICDABR4         */
+    volatile uint32_t  ICDABR5;                                /*  ICDABR5         */
+    volatile uint32_t  ICDABR6;                                /*  ICDABR6         */
+    volatile uint32_t  ICDABR7;                                /*  ICDABR7         */
+    volatile uint32_t  ICDABR8;                                /*  ICDABR8         */
+    volatile uint32_t  ICDABR9;                                /*  ICDABR9         */
+    volatile uint32_t  ICDABR10;                               /*  ICDABR10        */
+    volatile uint32_t  ICDABR11;                               /*  ICDABR11        */
+    volatile uint32_t  ICDABR12;                               /*  ICDABR12        */
+    volatile uint32_t  ICDABR13;                               /*  ICDABR13        */
+    volatile uint32_t  ICDABR14;                               /*  ICDABR14        */
+    volatile uint32_t  ICDABR15;                               /*  ICDABR15        */
+    volatile uint32_t  ICDABR16;                               /*  ICDABR16        */
+    volatile uint32_t  ICDABR17;                               /*  ICDABR17        */
+    volatile uint32_t  ICDABR18;                               /*  ICDABR18        */
+    volatile uint8_t   dummy199[180];                          /*                  */
+#define INTC_ICDIPR0_COUNT 147
+    volatile uint32_t  ICDIPR0;                                /*  ICDIPR0         */
+    volatile uint32_t  ICDIPR1;                                /*  ICDIPR1         */
+    volatile uint32_t  ICDIPR2;                                /*  ICDIPR2         */
+    volatile uint32_t  ICDIPR3;                                /*  ICDIPR3         */
+    volatile uint32_t  ICDIPR4;                                /*  ICDIPR4         */
+    volatile uint32_t  ICDIPR5;                                /*  ICDIPR5         */
+    volatile uint32_t  ICDIPR6;                                /*  ICDIPR6         */
+    volatile uint32_t  ICDIPR7;                                /*  ICDIPR7         */
+    volatile uint32_t  ICDIPR8;                                /*  ICDIPR8         */
+    volatile uint32_t  ICDIPR9;                                /*  ICDIPR9         */
+    volatile uint32_t  ICDIPR10;                               /*  ICDIPR10        */
+    volatile uint32_t  ICDIPR11;                               /*  ICDIPR11        */
+    volatile uint32_t  ICDIPR12;                               /*  ICDIPR12        */
+    volatile uint32_t  ICDIPR13;                               /*  ICDIPR13        */
+    volatile uint32_t  ICDIPR14;                               /*  ICDIPR14        */
+    volatile uint32_t  ICDIPR15;                               /*  ICDIPR15        */
+    volatile uint32_t  ICDIPR16;                               /*  ICDIPR16        */
+    volatile uint32_t  ICDIPR17;                               /*  ICDIPR17        */
+    volatile uint32_t  ICDIPR18;                               /*  ICDIPR18        */
+    volatile uint32_t  ICDIPR19;                               /*  ICDIPR19        */
+    volatile uint32_t  ICDIPR20;                               /*  ICDIPR20        */
+    volatile uint32_t  ICDIPR21;                               /*  ICDIPR21        */
+    volatile uint32_t  ICDIPR22;                               /*  ICDIPR22        */
+    volatile uint32_t  ICDIPR23;                               /*  ICDIPR23        */
+    volatile uint32_t  ICDIPR24;                               /*  ICDIPR24        */
+    volatile uint32_t  ICDIPR25;                               /*  ICDIPR25        */
+    volatile uint32_t  ICDIPR26;                               /*  ICDIPR26        */
+    volatile uint32_t  ICDIPR27;                               /*  ICDIPR27        */
+    volatile uint32_t  ICDIPR28;                               /*  ICDIPR28        */
+    volatile uint32_t  ICDIPR29;                               /*  ICDIPR29        */
+    volatile uint32_t  ICDIPR30;                               /*  ICDIPR30        */
+    volatile uint32_t  ICDIPR31;                               /*  ICDIPR31        */
+    volatile uint32_t  ICDIPR32;                               /*  ICDIPR32        */
+    volatile uint32_t  ICDIPR33;                               /*  ICDIPR33        */
+    volatile uint32_t  ICDIPR34;                               /*  ICDIPR34        */
+    volatile uint32_t  ICDIPR35;                               /*  ICDIPR35        */
+    volatile uint32_t  ICDIPR36;                               /*  ICDIPR36        */
+    volatile uint32_t  ICDIPR37;                               /*  ICDIPR37        */
+    volatile uint32_t  ICDIPR38;                               /*  ICDIPR38        */
+    volatile uint32_t  ICDIPR39;                               /*  ICDIPR39        */
+    volatile uint32_t  ICDIPR40;                               /*  ICDIPR40        */
+    volatile uint32_t  ICDIPR41;                               /*  ICDIPR41        */
+    volatile uint32_t  ICDIPR42;                               /*  ICDIPR42        */
+    volatile uint32_t  ICDIPR43;                               /*  ICDIPR43        */
+    volatile uint32_t  ICDIPR44;                               /*  ICDIPR44        */
+    volatile uint32_t  ICDIPR45;                               /*  ICDIPR45        */
+    volatile uint32_t  ICDIPR46;                               /*  ICDIPR46        */
+    volatile uint32_t  ICDIPR47;                               /*  ICDIPR47        */
+    volatile uint32_t  ICDIPR48;                               /*  ICDIPR48        */
+    volatile uint32_t  ICDIPR49;                               /*  ICDIPR49        */
+    volatile uint32_t  ICDIPR50;                               /*  ICDIPR50        */
+    volatile uint32_t  ICDIPR51;                               /*  ICDIPR51        */
+    volatile uint32_t  ICDIPR52;                               /*  ICDIPR52        */
+    volatile uint32_t  ICDIPR53;                               /*  ICDIPR53        */
+    volatile uint32_t  ICDIPR54;                               /*  ICDIPR54        */
+    volatile uint32_t  ICDIPR55;                               /*  ICDIPR55        */
+    volatile uint32_t  ICDIPR56;                               /*  ICDIPR56        */
+    volatile uint32_t  ICDIPR57;                               /*  ICDIPR57        */
+    volatile uint32_t  ICDIPR58;                               /*  ICDIPR58        */
+    volatile uint32_t  ICDIPR59;                               /*  ICDIPR59        */
+    volatile uint32_t  ICDIPR60;                               /*  ICDIPR60        */
+    volatile uint32_t  ICDIPR61;                               /*  ICDIPR61        */
+    volatile uint32_t  ICDIPR62;                               /*  ICDIPR62        */
+    volatile uint32_t  ICDIPR63;                               /*  ICDIPR63        */
+    volatile uint32_t  ICDIPR64;                               /*  ICDIPR64        */
+    volatile uint32_t  ICDIPR65;                               /*  ICDIPR65        */
+    volatile uint32_t  ICDIPR66;                               /*  ICDIPR66        */
+    volatile uint32_t  ICDIPR67;                               /*  ICDIPR67        */
+    volatile uint32_t  ICDIPR68;                               /*  ICDIPR68        */
+    volatile uint32_t  ICDIPR69;                               /*  ICDIPR69        */
+    volatile uint32_t  ICDIPR70;                               /*  ICDIPR70        */
+    volatile uint32_t  ICDIPR71;                               /*  ICDIPR71        */
+    volatile uint32_t  ICDIPR72;                               /*  ICDIPR72        */
+    volatile uint32_t  ICDIPR73;                               /*  ICDIPR73        */
+    volatile uint32_t  ICDIPR74;                               /*  ICDIPR74        */
+    volatile uint32_t  ICDIPR75;                               /*  ICDIPR75        */
+    volatile uint32_t  ICDIPR76;                               /*  ICDIPR76        */
+    volatile uint32_t  ICDIPR77;                               /*  ICDIPR77        */
+    volatile uint32_t  ICDIPR78;                               /*  ICDIPR78        */
+    volatile uint32_t  ICDIPR79;                               /*  ICDIPR79        */
+    volatile uint32_t  ICDIPR80;                               /*  ICDIPR80        */
+    volatile uint32_t  ICDIPR81;                               /*  ICDIPR81        */
+    volatile uint32_t  ICDIPR82;                               /*  ICDIPR82        */
+    volatile uint32_t  ICDIPR83;                               /*  ICDIPR83        */
+    volatile uint32_t  ICDIPR84;                               /*  ICDIPR84        */
+    volatile uint32_t  ICDIPR85;                               /*  ICDIPR85        */
+    volatile uint32_t  ICDIPR86;                               /*  ICDIPR86        */
+    volatile uint32_t  ICDIPR87;                               /*  ICDIPR87        */
+    volatile uint32_t  ICDIPR88;                               /*  ICDIPR88        */
+    volatile uint32_t  ICDIPR89;                               /*  ICDIPR89        */
+    volatile uint32_t  ICDIPR90;                               /*  ICDIPR90        */
+    volatile uint32_t  ICDIPR91;                               /*  ICDIPR91        */
+    volatile uint32_t  ICDIPR92;                               /*  ICDIPR92        */
+    volatile uint32_t  ICDIPR93;                               /*  ICDIPR93        */
+    volatile uint32_t  ICDIPR94;                               /*  ICDIPR94        */
+    volatile uint32_t  ICDIPR95;                               /*  ICDIPR95        */
+    volatile uint32_t  ICDIPR96;                               /*  ICDIPR96        */
+    volatile uint32_t  ICDIPR97;                               /*  ICDIPR97        */
+    volatile uint32_t  ICDIPR98;                               /*  ICDIPR98        */
+    volatile uint32_t  ICDIPR99;                               /*  ICDIPR99        */
+    volatile uint32_t  ICDIPR100;                              /*  ICDIPR100       */
+    volatile uint32_t  ICDIPR101;                              /*  ICDIPR101       */
+    volatile uint32_t  ICDIPR102;                              /*  ICDIPR102       */
+    volatile uint32_t  ICDIPR103;                              /*  ICDIPR103       */
+    volatile uint32_t  ICDIPR104;                              /*  ICDIPR104       */
+    volatile uint32_t  ICDIPR105;                              /*  ICDIPR105       */
+    volatile uint32_t  ICDIPR106;                              /*  ICDIPR106       */
+    volatile uint32_t  ICDIPR107;                              /*  ICDIPR107       */
+    volatile uint32_t  ICDIPR108;                              /*  ICDIPR108       */
+    volatile uint32_t  ICDIPR109;                              /*  ICDIPR109       */
+    volatile uint32_t  ICDIPR110;                              /*  ICDIPR110       */
+    volatile uint32_t  ICDIPR111;                              /*  ICDIPR111       */
+    volatile uint32_t  ICDIPR112;                              /*  ICDIPR112       */
+    volatile uint32_t  ICDIPR113;                              /*  ICDIPR113       */
+    volatile uint32_t  ICDIPR114;                              /*  ICDIPR114       */
+    volatile uint32_t  ICDIPR115;                              /*  ICDIPR115       */
+    volatile uint32_t  ICDIPR116;                              /*  ICDIPR116       */
+    volatile uint32_t  ICDIPR117;                              /*  ICDIPR117       */
+    volatile uint32_t  ICDIPR118;                              /*  ICDIPR118       */
+    volatile uint32_t  ICDIPR119;                              /*  ICDIPR119       */
+    volatile uint32_t  ICDIPR120;                              /*  ICDIPR120       */
+    volatile uint32_t  ICDIPR121;                              /*  ICDIPR121       */
+    volatile uint32_t  ICDIPR122;                              /*  ICDIPR122       */
+    volatile uint32_t  ICDIPR123;                              /*  ICDIPR123       */
+    volatile uint32_t  ICDIPR124;                              /*  ICDIPR124       */
+    volatile uint32_t  ICDIPR125;                              /*  ICDIPR125       */
+    volatile uint32_t  ICDIPR126;                              /*  ICDIPR126       */
+    volatile uint32_t  ICDIPR127;                              /*  ICDIPR127       */
+    volatile uint32_t  ICDIPR128;                              /*  ICDIPR128       */
+    volatile uint32_t  ICDIPR129;                              /*  ICDIPR129       */
+    volatile uint32_t  ICDIPR130;                              /*  ICDIPR130       */
+    volatile uint32_t  ICDIPR131;                              /*  ICDIPR131       */
+    volatile uint32_t  ICDIPR132;                              /*  ICDIPR132       */
+    volatile uint32_t  ICDIPR133;                              /*  ICDIPR133       */
+    volatile uint32_t  ICDIPR134;                              /*  ICDIPR134       */
+    volatile uint32_t  ICDIPR135;                              /*  ICDIPR135       */
+    volatile uint32_t  ICDIPR136;                              /*  ICDIPR136       */
+    volatile uint32_t  ICDIPR137;                              /*  ICDIPR137       */
+    volatile uint32_t  ICDIPR138;                              /*  ICDIPR138       */
+    volatile uint32_t  ICDIPR139;                              /*  ICDIPR139       */
+    volatile uint32_t  ICDIPR140;                              /*  ICDIPR140       */
+    volatile uint32_t  ICDIPR141;                              /*  ICDIPR141       */
+    volatile uint32_t  ICDIPR142;                              /*  ICDIPR142       */
+    volatile uint32_t  ICDIPR143;                              /*  ICDIPR143       */
+    volatile uint32_t  ICDIPR144;                              /*  ICDIPR144       */
+    volatile uint32_t  ICDIPR145;                              /*  ICDIPR145       */
+    volatile uint32_t  ICDIPR146;                              /*  ICDIPR146       */
+    volatile uint8_t   dummy200[436];                          /*                  */
+#define INTC_ICDIPTR0_COUNT 147
+    volatile uint32_t  ICDIPTR0;                               /*  ICDIPTR0        */
+    volatile uint32_t  ICDIPTR1;                               /*  ICDIPTR1        */
+    volatile uint32_t  ICDIPTR2;                               /*  ICDIPTR2        */
+    volatile uint32_t  ICDIPTR3;                               /*  ICDIPTR3        */
+    volatile uint32_t  ICDIPTR4;                               /*  ICDIPTR4        */
+    volatile uint32_t  ICDIPTR5;                               /*  ICDIPTR5        */
+    volatile uint32_t  ICDIPTR6;                               /*  ICDIPTR6        */
+    volatile uint32_t  ICDIPTR7;                               /*  ICDIPTR7        */
+    volatile uint32_t  ICDIPTR8;                               /*  ICDIPTR8        */
+    volatile uint32_t  ICDIPTR9;                               /*  ICDIPTR9        */
+    volatile uint32_t  ICDIPTR10;                              /*  ICDIPTR10       */
+    volatile uint32_t  ICDIPTR11;                              /*  ICDIPTR11       */
+    volatile uint32_t  ICDIPTR12;                              /*  ICDIPTR12       */
+    volatile uint32_t  ICDIPTR13;                              /*  ICDIPTR13       */
+    volatile uint32_t  ICDIPTR14;                              /*  ICDIPTR14       */
+    volatile uint32_t  ICDIPTR15;                              /*  ICDIPTR15       */
+    volatile uint32_t  ICDIPTR16;                              /*  ICDIPTR16       */
+    volatile uint32_t  ICDIPTR17;                              /*  ICDIPTR17       */
+    volatile uint32_t  ICDIPTR18;                              /*  ICDIPTR18       */
+    volatile uint32_t  ICDIPTR19;                              /*  ICDIPTR19       */
+    volatile uint32_t  ICDIPTR20;                              /*  ICDIPTR20       */
+    volatile uint32_t  ICDIPTR21;                              /*  ICDIPTR21       */
+    volatile uint32_t  ICDIPTR22;                              /*  ICDIPTR22       */
+    volatile uint32_t  ICDIPTR23;                              /*  ICDIPTR23       */
+    volatile uint32_t  ICDIPTR24;                              /*  ICDIPTR24       */
+    volatile uint32_t  ICDIPTR25;                              /*  ICDIPTR25       */
+    volatile uint32_t  ICDIPTR26;                              /*  ICDIPTR26       */
+    volatile uint32_t  ICDIPTR27;                              /*  ICDIPTR27       */
+    volatile uint32_t  ICDIPTR28;                              /*  ICDIPTR28       */
+    volatile uint32_t  ICDIPTR29;                              /*  ICDIPTR29       */
+    volatile uint32_t  ICDIPTR30;                              /*  ICDIPTR30       */
+    volatile uint32_t  ICDIPTR31;                              /*  ICDIPTR31       */
+    volatile uint32_t  ICDIPTR32;                              /*  ICDIPTR32       */
+    volatile uint32_t  ICDIPTR33;                              /*  ICDIPTR33       */
+    volatile uint32_t  ICDIPTR34;                              /*  ICDIPTR34       */
+    volatile uint32_t  ICDIPTR35;                              /*  ICDIPTR35       */
+    volatile uint32_t  ICDIPTR36;                              /*  ICDIPTR36       */
+    volatile uint32_t  ICDIPTR37;                              /*  ICDIPTR37       */
+    volatile uint32_t  ICDIPTR38;                              /*  ICDIPTR38       */
+    volatile uint32_t  ICDIPTR39;                              /*  ICDIPTR39       */
+    volatile uint32_t  ICDIPTR40;                              /*  ICDIPTR40       */
+    volatile uint32_t  ICDIPTR41;                              /*  ICDIPTR41       */
+    volatile uint32_t  ICDIPTR42;                              /*  ICDIPTR42       */
+    volatile uint32_t  ICDIPTR43;                              /*  ICDIPTR43       */
+    volatile uint32_t  ICDIPTR44;                              /*  ICDIPTR44       */
+    volatile uint32_t  ICDIPTR45;                              /*  ICDIPTR45       */
+    volatile uint32_t  ICDIPTR46;                              /*  ICDIPTR46       */
+    volatile uint32_t  ICDIPTR47;                              /*  ICDIPTR47       */
+    volatile uint32_t  ICDIPTR48;                              /*  ICDIPTR48       */
+    volatile uint32_t  ICDIPTR49;                              /*  ICDIPTR49       */
+    volatile uint32_t  ICDIPTR50;                              /*  ICDIPTR50       */
+    volatile uint32_t  ICDIPTR51;                              /*  ICDIPTR51       */
+    volatile uint32_t  ICDIPTR52;                              /*  ICDIPTR52       */
+    volatile uint32_t  ICDIPTR53;                              /*  ICDIPTR53       */
+    volatile uint32_t  ICDIPTR54;                              /*  ICDIPTR54       */
+    volatile uint32_t  ICDIPTR55;                              /*  ICDIPTR55       */
+    volatile uint32_t  ICDIPTR56;                              /*  ICDIPTR56       */
+    volatile uint32_t  ICDIPTR57;                              /*  ICDIPTR57       */
+    volatile uint32_t  ICDIPTR58;                              /*  ICDIPTR58       */
+    volatile uint32_t  ICDIPTR59;                              /*  ICDIPTR59       */
+    volatile uint32_t  ICDIPTR60;                              /*  ICDIPTR60       */
+    volatile uint32_t  ICDIPTR61;                              /*  ICDIPTR61       */
+    volatile uint32_t  ICDIPTR62;                              /*  ICDIPTR62       */
+    volatile uint32_t  ICDIPTR63;                              /*  ICDIPTR63       */
+    volatile uint32_t  ICDIPTR64;                              /*  ICDIPTR64       */
+    volatile uint32_t  ICDIPTR65;                              /*  ICDIPTR65       */
+    volatile uint32_t  ICDIPTR66;                              /*  ICDIPTR66       */
+    volatile uint32_t  ICDIPTR67;                              /*  ICDIPTR67       */
+    volatile uint32_t  ICDIPTR68;                              /*  ICDIPTR68       */
+    volatile uint32_t  ICDIPTR69;                              /*  ICDIPTR69       */
+    volatile uint32_t  ICDIPTR70;                              /*  ICDIPTR70       */
+    volatile uint32_t  ICDIPTR71;                              /*  ICDIPTR71       */
+    volatile uint32_t  ICDIPTR72;                              /*  ICDIPTR72       */
+    volatile uint32_t  ICDIPTR73;                              /*  ICDIPTR73       */
+    volatile uint32_t  ICDIPTR74;                              /*  ICDIPTR74       */
+    volatile uint32_t  ICDIPTR75;                              /*  ICDIPTR75       */
+    volatile uint32_t  ICDIPTR76;                              /*  ICDIPTR76       */
+    volatile uint32_t  ICDIPTR77;                              /*  ICDIPTR77       */
+    volatile uint32_t  ICDIPTR78;                              /*  ICDIPTR78       */
+    volatile uint32_t  ICDIPTR79;                              /*  ICDIPTR79       */
+    volatile uint32_t  ICDIPTR80;                              /*  ICDIPTR80       */
+    volatile uint32_t  ICDIPTR81;                              /*  ICDIPTR81       */
+    volatile uint32_t  ICDIPTR82;                              /*  ICDIPTR82       */
+    volatile uint32_t  ICDIPTR83;                              /*  ICDIPTR83       */
+    volatile uint32_t  ICDIPTR84;                              /*  ICDIPTR84       */
+    volatile uint32_t  ICDIPTR85;                              /*  ICDIPTR85       */
+    volatile uint32_t  ICDIPTR86;                              /*  ICDIPTR86       */
+    volatile uint32_t  ICDIPTR87;                              /*  ICDIPTR87       */
+    volatile uint32_t  ICDIPTR88;                              /*  ICDIPTR88       */
+    volatile uint32_t  ICDIPTR89;                              /*  ICDIPTR89       */
+    volatile uint32_t  ICDIPTR90;                              /*  ICDIPTR90       */
+    volatile uint32_t  ICDIPTR91;                              /*  ICDIPTR91       */
+    volatile uint32_t  ICDIPTR92;                              /*  ICDIPTR92       */
+    volatile uint32_t  ICDIPTR93;                              /*  ICDIPTR93       */
+    volatile uint32_t  ICDIPTR94;                              /*  ICDIPTR94       */
+    volatile uint32_t  ICDIPTR95;                              /*  ICDIPTR95       */
+    volatile uint32_t  ICDIPTR96;                              /*  ICDIPTR96       */
+    volatile uint32_t  ICDIPTR97;                              /*  ICDIPTR97       */
+    volatile uint32_t  ICDIPTR98;                              /*  ICDIPTR98       */
+    volatile uint32_t  ICDIPTR99;                              /*  ICDIPTR99       */
+    volatile uint32_t  ICDIPTR100;                             /*  ICDIPTR100      */
+    volatile uint32_t  ICDIPTR101;                             /*  ICDIPTR101      */
+    volatile uint32_t  ICDIPTR102;                             /*  ICDIPTR102      */
+    volatile uint32_t  ICDIPTR103;                             /*  ICDIPTR103      */
+    volatile uint32_t  ICDIPTR104;                             /*  ICDIPTR104      */
+    volatile uint32_t  ICDIPTR105;                             /*  ICDIPTR105      */
+    volatile uint32_t  ICDIPTR106;                             /*  ICDIPTR106      */
+    volatile uint32_t  ICDIPTR107;                             /*  ICDIPTR107      */
+    volatile uint32_t  ICDIPTR108;                             /*  ICDIPTR108      */
+    volatile uint32_t  ICDIPTR109;                             /*  ICDIPTR109      */
+    volatile uint32_t  ICDIPTR110;                             /*  ICDIPTR110      */
+    volatile uint32_t  ICDIPTR111;                             /*  ICDIPTR111      */
+    volatile uint32_t  ICDIPTR112;                             /*  ICDIPTR112      */
+    volatile uint32_t  ICDIPTR113;                             /*  ICDIPTR113      */
+    volatile uint32_t  ICDIPTR114;                             /*  ICDIPTR114      */
+    volatile uint32_t  ICDIPTR115;                             /*  ICDIPTR115      */
+    volatile uint32_t  ICDIPTR116;                             /*  ICDIPTR116      */
+    volatile uint32_t  ICDIPTR117;                             /*  ICDIPTR117      */
+    volatile uint32_t  ICDIPTR118;                             /*  ICDIPTR118      */
+    volatile uint32_t  ICDIPTR119;                             /*  ICDIPTR119      */
+    volatile uint32_t  ICDIPTR120;                             /*  ICDIPTR120      */
+    volatile uint32_t  ICDIPTR121;                             /*  ICDIPTR121      */
+    volatile uint32_t  ICDIPTR122;                             /*  ICDIPTR122      */
+    volatile uint32_t  ICDIPTR123;                             /*  ICDIPTR123      */
+    volatile uint32_t  ICDIPTR124;                             /*  ICDIPTR124      */
+    volatile uint32_t  ICDIPTR125;                             /*  ICDIPTR125      */
+    volatile uint32_t  ICDIPTR126;                             /*  ICDIPTR126      */
+    volatile uint32_t  ICDIPTR127;                             /*  ICDIPTR127      */
+    volatile uint32_t  ICDIPTR128;                             /*  ICDIPTR128      */
+    volatile uint32_t  ICDIPTR129;                             /*  ICDIPTR129      */
+    volatile uint32_t  ICDIPTR130;                             /*  ICDIPTR130      */
+    volatile uint32_t  ICDIPTR131;                             /*  ICDIPTR131      */
+    volatile uint32_t  ICDIPTR132;                             /*  ICDIPTR132      */
+    volatile uint32_t  ICDIPTR133;                             /*  ICDIPTR133      */
+    volatile uint32_t  ICDIPTR134;                             /*  ICDIPTR134      */
+    volatile uint32_t  ICDIPTR135;                             /*  ICDIPTR135      */
+    volatile uint32_t  ICDIPTR136;                             /*  ICDIPTR136      */
+    volatile uint32_t  ICDIPTR137;                             /*  ICDIPTR137      */
+    volatile uint32_t  ICDIPTR138;                             /*  ICDIPTR138      */
+    volatile uint32_t  ICDIPTR139;                             /*  ICDIPTR139      */
+    volatile uint32_t  ICDIPTR140;                             /*  ICDIPTR140      */
+    volatile uint32_t  ICDIPTR141;                             /*  ICDIPTR141      */
+    volatile uint32_t  ICDIPTR142;                             /*  ICDIPTR142      */
+    volatile uint32_t  ICDIPTR143;                             /*  ICDIPTR143      */
+    volatile uint32_t  ICDIPTR144;                             /*  ICDIPTR144      */
+    volatile uint32_t  ICDIPTR145;                             /*  ICDIPTR145      */
+    volatile uint32_t  ICDIPTR146;                             /*  ICDIPTR146      */
+    volatile uint8_t   dummy201[436];                          /*                  */
+#define INTC_ICDICFR0_COUNT 37
+    volatile uint32_t  ICDICFR0;                               /*  ICDICFR0        */
+    volatile uint32_t  ICDICFR1;                               /*  ICDICFR1        */
+    volatile uint32_t  ICDICFR2;                               /*  ICDICFR2        */
+    volatile uint32_t  ICDICFR3;                               /*  ICDICFR3        */
+    volatile uint32_t  ICDICFR4;                               /*  ICDICFR4        */
+    volatile uint32_t  ICDICFR5;                               /*  ICDICFR5        */
+    volatile uint32_t  ICDICFR6;                               /*  ICDICFR6        */
+    volatile uint32_t  ICDICFR7;                               /*  ICDICFR7        */
+    volatile uint32_t  ICDICFR8;                               /*  ICDICFR8        */
+    volatile uint32_t  ICDICFR9;                               /*  ICDICFR9        */
+    volatile uint32_t  ICDICFR10;                              /*  ICDICFR10       */
+    volatile uint32_t  ICDICFR11;                              /*  ICDICFR11       */
+    volatile uint32_t  ICDICFR12;                              /*  ICDICFR12       */
+    volatile uint32_t  ICDICFR13;                              /*  ICDICFR13       */
+    volatile uint32_t  ICDICFR14;                              /*  ICDICFR14       */
+    volatile uint32_t  ICDICFR15;                              /*  ICDICFR15       */
+    volatile uint32_t  ICDICFR16;                              /*  ICDICFR16       */
+    volatile uint32_t  ICDICFR17;                              /*  ICDICFR17       */
+    volatile uint32_t  ICDICFR18;                              /*  ICDICFR18       */
+    volatile uint32_t  ICDICFR19;                              /*  ICDICFR19       */
+    volatile uint32_t  ICDICFR20;                              /*  ICDICFR20       */
+    volatile uint32_t  ICDICFR21;                              /*  ICDICFR21       */
+    volatile uint32_t  ICDICFR22;                              /*  ICDICFR22       */
+    volatile uint32_t  ICDICFR23;                              /*  ICDICFR23       */
+    volatile uint32_t  ICDICFR24;                              /*  ICDICFR24       */
+    volatile uint32_t  ICDICFR25;                              /*  ICDICFR25       */
+    volatile uint32_t  ICDICFR26;                              /*  ICDICFR26       */
+    volatile uint32_t  ICDICFR27;                              /*  ICDICFR27       */
+    volatile uint32_t  ICDICFR28;                              /*  ICDICFR28       */
+    volatile uint32_t  ICDICFR29;                              /*  ICDICFR29       */
+    volatile uint32_t  ICDICFR30;                              /*  ICDICFR30       */
+    volatile uint32_t  ICDICFR31;                              /*  ICDICFR31       */
+    volatile uint32_t  ICDICFR32;                              /*  ICDICFR32       */
+    volatile uint32_t  ICDICFR33;                              /*  ICDICFR33       */
+    volatile uint32_t  ICDICFR34;                              /*  ICDICFR34       */
+    volatile uint32_t  ICDICFR35;                              /*  ICDICFR35       */
+    volatile uint32_t  ICDICFR36;                              /*  ICDICFR36       */
+    volatile uint8_t   dummy202[108];                          /*                  */
+    volatile uint32_t  PPI_STATUS;                             /*  PPI_STATUS      */
+#define INTC_SPI_STATUS0_COUNT 17
+    volatile uint32_t  SPI_STATUS0;                            /*  SPI_STATUS0     */
+    volatile uint32_t  SPI_STATUS1;                            /*  SPI_STATUS1     */
+    volatile uint32_t  SPI_STATUS2;                            /*  SPI_STATUS2     */
+    volatile uint32_t  SPI_STATUS3;                            /*  SPI_STATUS3     */
+    volatile uint32_t  SPI_STATUS4;                            /*  SPI_STATUS4     */
+    volatile uint32_t  SPI_STATUS5;                            /*  SPI_STATUS5     */
+    volatile uint32_t  SPI_STATUS6;                            /*  SPI_STATUS6     */
+    volatile uint32_t  SPI_STATUS7;                            /*  SPI_STATUS7     */
+    volatile uint32_t  SPI_STATUS8;                            /*  SPI_STATUS8     */
+    volatile uint32_t  SPI_STATUS9;                            /*  SPI_STATUS9     */
+    volatile uint32_t  SPI_STATUS10;                           /*  SPI_STATUS10    */
+    volatile uint32_t  SPI_STATUS11;                           /*  SPI_STATUS11    */
+    volatile uint32_t  SPI_STATUS12;                           /*  SPI_STATUS12    */
+    volatile uint32_t  SPI_STATUS13;                           /*  SPI_STATUS13    */
+    volatile uint32_t  SPI_STATUS14;                           /*  SPI_STATUS14    */
+    volatile uint32_t  SPI_STATUS15;                           /*  SPI_STATUS15    */
+    volatile uint32_t  SPI_STATUS16;                           /*  SPI_STATUS16    */
+    volatile uint8_t   dummy203[440];                          /*                  */
+    volatile uint32_t  ICDSGIR;                                /*  ICDSGIR         */
+    volatile uint8_t   dummy204[252];                          /*                  */
+    volatile uint32_t  ICCICR;                                 /*  ICCICR          */
+    volatile uint32_t  ICCPMR;                                 /*  ICCPMR          */
+    volatile uint32_t  ICCBPR;                                 /*  ICCBPR          */
+    volatile uint32_t  ICCIAR;                                 /*  ICCIAR          */
+    volatile uint32_t  ICCEOIR;                                /*  ICCEOIR         */
+    volatile uint32_t  ICCRPR;                                 /*  ICCRPR          */
+    volatile uint32_t  ICCHPIR;                                /*  ICCHPIR         */
+    volatile uint32_t  ICCABPR;                                /*  ICCABPR         */
+    volatile uint8_t   dummy205[220];                          /*                  */
+    volatile uint32_t  ICCIIDR;                                /*  ICCIIDR         */
+    volatile uint8_t   dummy206[350148352];                    /*                  */
+    volatile uint16_t ICR0;                                   /*  ICR0            */
+    volatile uint16_t ICR1;                                   /*  ICR1            */
+    volatile uint16_t IRQRR;                                  /*  IRQRR           */
+};
+
+
+#define INTC    (*(struct st_intc    *)0xE8201000uL) /* INTC */
+
+
+#define INTCICDDCR INTC.ICDDCR
+#define INTCICDICTR INTC.ICDICTR
+#define INTCICDIIDR INTC.ICDIIDR
+#define INTCICDISR0 INTC.ICDISR0
+#define INTCICDISR1 INTC.ICDISR1
+#define INTCICDISR2 INTC.ICDISR2
+#define INTCICDISR3 INTC.ICDISR3
+#define INTCICDISR4 INTC.ICDISR4
+#define INTCICDISR5 INTC.ICDISR5
+#define INTCICDISR6 INTC.ICDISR6
+#define INTCICDISR7 INTC.ICDISR7
+#define INTCICDISR8 INTC.ICDISR8
+#define INTCICDISR9 INTC.ICDISR9
+#define INTCICDISR10 INTC.ICDISR10
+#define INTCICDISR11 INTC.ICDISR11
+#define INTCICDISR12 INTC.ICDISR12
+#define INTCICDISR13 INTC.ICDISR13
+#define INTCICDISR14 INTC.ICDISR14
+#define INTCICDISR15 INTC.ICDISR15
+#define INTCICDISR16 INTC.ICDISR16
+#define INTCICDISR17 INTC.ICDISR17
+#define INTCICDISR18 INTC.ICDISR18
+#define INTCICDISER0 INTC.ICDISER0
+#define INTCICDISER1 INTC.ICDISER1
+#define INTCICDISER2 INTC.ICDISER2
+#define INTCICDISER3 INTC.ICDISER3
+#define INTCICDISER4 INTC.ICDISER4
+#define INTCICDISER5 INTC.ICDISER5
+#define INTCICDISER6 INTC.ICDISER6
+#define INTCICDISER7 INTC.ICDISER7
+#define INTCICDISER8 INTC.ICDISER8
+#define INTCICDISER9 INTC.ICDISER9
+#define INTCICDISER10 INTC.ICDISER10
+#define INTCICDISER11 INTC.ICDISER11
+#define INTCICDISER12 INTC.ICDISER12
+#define INTCICDISER13 INTC.ICDISER13
+#define INTCICDISER14 INTC.ICDISER14
+#define INTCICDISER15 INTC.ICDISER15
+#define INTCICDISER16 INTC.ICDISER16
+#define INTCICDISER17 INTC.ICDISER17
+#define INTCICDISER18 INTC.ICDISER18
+#define INTCICDICER0 INTC.ICDICER0
+#define INTCICDICER1 INTC.ICDICER1
+#define INTCICDICER2 INTC.ICDICER2
+#define INTCICDICER3 INTC.ICDICER3
+#define INTCICDICER4 INTC.ICDICER4
+#define INTCICDICER5 INTC.ICDICER5
+#define INTCICDICER6 INTC.ICDICER6
+#define INTCICDICER7 INTC.ICDICER7
+#define INTCICDICER8 INTC.ICDICER8
+#define INTCICDICER9 INTC.ICDICER9
+#define INTCICDICER10 INTC.ICDICER10
+#define INTCICDICER11 INTC.ICDICER11
+#define INTCICDICER12 INTC.ICDICER12
+#define INTCICDICER13 INTC.ICDICER13
+#define INTCICDICER14 INTC.ICDICER14
+#define INTCICDICER15 INTC.ICDICER15
+#define INTCICDICER16 INTC.ICDICER16
+#define INTCICDICER17 INTC.ICDICER17
+#define INTCICDICER18 INTC.ICDICER18
+#define INTCICDISPR0 INTC.ICDISPR0
+#define INTCICDISPR1 INTC.ICDISPR1
+#define INTCICDISPR2 INTC.ICDISPR2
+#define INTCICDISPR3 INTC.ICDISPR3
+#define INTCICDISPR4 INTC.ICDISPR4
+#define INTCICDISPR5 INTC.ICDISPR5
+#define INTCICDISPR6 INTC.ICDISPR6
+#define INTCICDISPR7 INTC.ICDISPR7
+#define INTCICDISPR8 INTC.ICDISPR8
+#define INTCICDISPR9 INTC.ICDISPR9
+#define INTCICDISPR10 INTC.ICDISPR10
+#define INTCICDISPR11 INTC.ICDISPR11
+#define INTCICDISPR12 INTC.ICDISPR12
+#define INTCICDISPR13 INTC.ICDISPR13
+#define INTCICDISPR14 INTC.ICDISPR14
+#define INTCICDISPR15 INTC.ICDISPR15
+#define INTCICDISPR16 INTC.ICDISPR16
+#define INTCICDISPR17 INTC.ICDISPR17
+#define INTCICDISPR18 INTC.ICDISPR18
+#define INTCICDICPR0 INTC.ICDICPR0
+#define INTCICDICPR1 INTC.ICDICPR1
+#define INTCICDICPR2 INTC.ICDICPR2
+#define INTCICDICPR3 INTC.ICDICPR3
+#define INTCICDICPR4 INTC.ICDICPR4
+#define INTCICDICPR5 INTC.ICDICPR5
+#define INTCICDICPR6 INTC.ICDICPR6
+#define INTCICDICPR7 INTC.ICDICPR7
+#define INTCICDICPR8 INTC.ICDICPR8
+#define INTCICDICPR9 INTC.ICDICPR9
+#define INTCICDICPR10 INTC.ICDICPR10
+#define INTCICDICPR11 INTC.ICDICPR11
+#define INTCICDICPR12 INTC.ICDICPR12
+#define INTCICDICPR13 INTC.ICDICPR13
+#define INTCICDICPR14 INTC.ICDICPR14
+#define INTCICDICPR15 INTC.ICDICPR15
+#define INTCICDICPR16 INTC.ICDICPR16
+#define INTCICDICPR17 INTC.ICDICPR17
+#define INTCICDICPR18 INTC.ICDICPR18
+#define INTCICDABR0 INTC.ICDABR0
+#define INTCICDABR1 INTC.ICDABR1
+#define INTCICDABR2 INTC.ICDABR2
+#define INTCICDABR3 INTC.ICDABR3
+#define INTCICDABR4 INTC.ICDABR4
+#define INTCICDABR5 INTC.ICDABR5
+#define INTCICDABR6 INTC.ICDABR6
+#define INTCICDABR7 INTC.ICDABR7
+#define INTCICDABR8 INTC.ICDABR8
+#define INTCICDABR9 INTC.ICDABR9
+#define INTCICDABR10 INTC.ICDABR10
+#define INTCICDABR11 INTC.ICDABR11
+#define INTCICDABR12 INTC.ICDABR12
+#define INTCICDABR13 INTC.ICDABR13
+#define INTCICDABR14 INTC.ICDABR14
+#define INTCICDABR15 INTC.ICDABR15
+#define INTCICDABR16 INTC.ICDABR16
+#define INTCICDABR17 INTC.ICDABR17
+#define INTCICDABR18 INTC.ICDABR18
+#define INTCICDIPR0 INTC.ICDIPR0
+#define INTCICDIPR1 INTC.ICDIPR1
+#define INTCICDIPR2 INTC.ICDIPR2
+#define INTCICDIPR3 INTC.ICDIPR3
+#define INTCICDIPR4 INTC.ICDIPR4
+#define INTCICDIPR5 INTC.ICDIPR5
+#define INTCICDIPR6 INTC.ICDIPR6
+#define INTCICDIPR7 INTC.ICDIPR7
+#define INTCICDIPR8 INTC.ICDIPR8
+#define INTCICDIPR9 INTC.ICDIPR9
+#define INTCICDIPR10 INTC.ICDIPR10
+#define INTCICDIPR11 INTC.ICDIPR11
+#define INTCICDIPR12 INTC.ICDIPR12
+#define INTCICDIPR13 INTC.ICDIPR13
+#define INTCICDIPR14 INTC.ICDIPR14
+#define INTCICDIPR15 INTC.ICDIPR15
+#define INTCICDIPR16 INTC.ICDIPR16
+#define INTCICDIPR17 INTC.ICDIPR17
+#define INTCICDIPR18 INTC.ICDIPR18
+#define INTCICDIPR19 INTC.ICDIPR19
+#define INTCICDIPR20 INTC.ICDIPR20
+#define INTCICDIPR21 INTC.ICDIPR21
+#define INTCICDIPR22 INTC.ICDIPR22
+#define INTCICDIPR23 INTC.ICDIPR23
+#define INTCICDIPR24 INTC.ICDIPR24
+#define INTCICDIPR25 INTC.ICDIPR25
+#define INTCICDIPR26 INTC.ICDIPR26
+#define INTCICDIPR27 INTC.ICDIPR27
+#define INTCICDIPR28 INTC.ICDIPR28
+#define INTCICDIPR29 INTC.ICDIPR29
+#define INTCICDIPR30 INTC.ICDIPR30
+#define INTCICDIPR31 INTC.ICDIPR31
+#define INTCICDIPR32 INTC.ICDIPR32
+#define INTCICDIPR33 INTC.ICDIPR33
+#define INTCICDIPR34 INTC.ICDIPR34
+#define INTCICDIPR35 INTC.ICDIPR35
+#define INTCICDIPR36 INTC.ICDIPR36
+#define INTCICDIPR37 INTC.ICDIPR37
+#define INTCICDIPR38 INTC.ICDIPR38
+#define INTCICDIPR39 INTC.ICDIPR39
+#define INTCICDIPR40 INTC.ICDIPR40
+#define INTCICDIPR41 INTC.ICDIPR41
+#define INTCICDIPR42 INTC.ICDIPR42
+#define INTCICDIPR43 INTC.ICDIPR43
+#define INTCICDIPR44 INTC.ICDIPR44
+#define INTCICDIPR45 INTC.ICDIPR45
+#define INTCICDIPR46 INTC.ICDIPR46
+#define INTCICDIPR47 INTC.ICDIPR47
+#define INTCICDIPR48 INTC.ICDIPR48
+#define INTCICDIPR49 INTC.ICDIPR49
+#define INTCICDIPR50 INTC.ICDIPR50
+#define INTCICDIPR51 INTC.ICDIPR51
+#define INTCICDIPR52 INTC.ICDIPR52
+#define INTCICDIPR53 INTC.ICDIPR53
+#define INTCICDIPR54 INTC.ICDIPR54
+#define INTCICDIPR55 INTC.ICDIPR55
+#define INTCICDIPR56 INTC.ICDIPR56
+#define INTCICDIPR57 INTC.ICDIPR57
+#define INTCICDIPR58 INTC.ICDIPR58
+#define INTCICDIPR59 INTC.ICDIPR59
+#define INTCICDIPR60 INTC.ICDIPR60
+#define INTCICDIPR61 INTC.ICDIPR61
+#define INTCICDIPR62 INTC.ICDIPR62
+#define INTCICDIPR63 INTC.ICDIPR63
+#define INTCICDIPR64 INTC.ICDIPR64
+#define INTCICDIPR65 INTC.ICDIPR65
+#define INTCICDIPR66 INTC.ICDIPR66
+#define INTCICDIPR67 INTC.ICDIPR67
+#define INTCICDIPR68 INTC.ICDIPR68
+#define INTCICDIPR69 INTC.ICDIPR69
+#define INTCICDIPR70 INTC.ICDIPR70
+#define INTCICDIPR71 INTC.ICDIPR71
+#define INTCICDIPR72 INTC.ICDIPR72
+#define INTCICDIPR73 INTC.ICDIPR73
+#define INTCICDIPR74 INTC.ICDIPR74
+#define INTCICDIPR75 INTC.ICDIPR75
+#define INTCICDIPR76 INTC.ICDIPR76
+#define INTCICDIPR77 INTC.ICDIPR77
+#define INTCICDIPR78 INTC.ICDIPR78
+#define INTCICDIPR79 INTC.ICDIPR79
+#define INTCICDIPR80 INTC.ICDIPR80
+#define INTCICDIPR81 INTC.ICDIPR81
+#define INTCICDIPR82 INTC.ICDIPR82
+#define INTCICDIPR83 INTC.ICDIPR83
+#define INTCICDIPR84 INTC.ICDIPR84
+#define INTCICDIPR85 INTC.ICDIPR85
+#define INTCICDIPR86 INTC.ICDIPR86
+#define INTCICDIPR87 INTC.ICDIPR87
+#define INTCICDIPR88 INTC.ICDIPR88
+#define INTCICDIPR89 INTC.ICDIPR89
+#define INTCICDIPR90 INTC.ICDIPR90
+#define INTCICDIPR91 INTC.ICDIPR91
+#define INTCICDIPR92 INTC.ICDIPR92
+#define INTCICDIPR93 INTC.ICDIPR93
+#define INTCICDIPR94 INTC.ICDIPR94
+#define INTCICDIPR95 INTC.ICDIPR95
+#define INTCICDIPR96 INTC.ICDIPR96
+#define INTCICDIPR97 INTC.ICDIPR97
+#define INTCICDIPR98 INTC.ICDIPR98
+#define INTCICDIPR99 INTC.ICDIPR99
+#define INTCICDIPR100 INTC.ICDIPR100
+#define INTCICDIPR101 INTC.ICDIPR101
+#define INTCICDIPR102 INTC.ICDIPR102
+#define INTCICDIPR103 INTC.ICDIPR103
+#define INTCICDIPR104 INTC.ICDIPR104
+#define INTCICDIPR105 INTC.ICDIPR105
+#define INTCICDIPR106 INTC.ICDIPR106
+#define INTCICDIPR107 INTC.ICDIPR107
+#define INTCICDIPR108 INTC.ICDIPR108
+#define INTCICDIPR109 INTC.ICDIPR109
+#define INTCICDIPR110 INTC.ICDIPR110
+#define INTCICDIPR111 INTC.ICDIPR111
+#define INTCICDIPR112 INTC.ICDIPR112
+#define INTCICDIPR113 INTC.ICDIPR113
+#define INTCICDIPR114 INTC.ICDIPR114
+#define INTCICDIPR115 INTC.ICDIPR115
+#define INTCICDIPR116 INTC.ICDIPR116
+#define INTCICDIPR117 INTC.ICDIPR117
+#define INTCICDIPR118 INTC.ICDIPR118
+#define INTCICDIPR119 INTC.ICDIPR119
+#define INTCICDIPR120 INTC.ICDIPR120
+#define INTCICDIPR121 INTC.ICDIPR121
+#define INTCICDIPR122 INTC.ICDIPR122
+#define INTCICDIPR123 INTC.ICDIPR123
+#define INTCICDIPR124 INTC.ICDIPR124
+#define INTCICDIPR125 INTC.ICDIPR125
+#define INTCICDIPR126 INTC.ICDIPR126
+#define INTCICDIPR127 INTC.ICDIPR127
+#define INTCICDIPR128 INTC.ICDIPR128
+#define INTCICDIPR129 INTC.ICDIPR129
+#define INTCICDIPR130 INTC.ICDIPR130
+#define INTCICDIPR131 INTC.ICDIPR131
+#define INTCICDIPR132 INTC.ICDIPR132
+#define INTCICDIPR133 INTC.ICDIPR133
+#define INTCICDIPR134 INTC.ICDIPR134
+#define INTCICDIPR135 INTC.ICDIPR135
+#define INTCICDIPR136 INTC.ICDIPR136
+#define INTCICDIPR137 INTC.ICDIPR137
+#define INTCICDIPR138 INTC.ICDIPR138
+#define INTCICDIPR139 INTC.ICDIPR139
+#define INTCICDIPR140 INTC.ICDIPR140
+#define INTCICDIPR141 INTC.ICDIPR141
+#define INTCICDIPR142 INTC.ICDIPR142
+#define INTCICDIPR143 INTC.ICDIPR143
+#define INTCICDIPR144 INTC.ICDIPR144
+#define INTCICDIPR145 INTC.ICDIPR145
+#define INTCICDIPR146 INTC.ICDIPR146
+#define INTCICDIPTR0 INTC.ICDIPTR0
+#define INTCICDIPTR1 INTC.ICDIPTR1
+#define INTCICDIPTR2 INTC.ICDIPTR2
+#define INTCICDIPTR3 INTC.ICDIPTR3
+#define INTCICDIPTR4 INTC.ICDIPTR4
+#define INTCICDIPTR5 INTC.ICDIPTR5
+#define INTCICDIPTR6 INTC.ICDIPTR6
+#define INTCICDIPTR7 INTC.ICDIPTR7
+#define INTCICDIPTR8 INTC.ICDIPTR8
+#define INTCICDIPTR9 INTC.ICDIPTR9
+#define INTCICDIPTR10 INTC.ICDIPTR10
+#define INTCICDIPTR11 INTC.ICDIPTR11
+#define INTCICDIPTR12 INTC.ICDIPTR12
+#define INTCICDIPTR13 INTC.ICDIPTR13
+#define INTCICDIPTR14 INTC.ICDIPTR14
+#define INTCICDIPTR15 INTC.ICDIPTR15
+#define INTCICDIPTR16 INTC.ICDIPTR16
+#define INTCICDIPTR17 INTC.ICDIPTR17
+#define INTCICDIPTR18 INTC.ICDIPTR18
+#define INTCICDIPTR19 INTC.ICDIPTR19
+#define INTCICDIPTR20 INTC.ICDIPTR20
+#define INTCICDIPTR21 INTC.ICDIPTR21
+#define INTCICDIPTR22 INTC.ICDIPTR22
+#define INTCICDIPTR23 INTC.ICDIPTR23
+#define INTCICDIPTR24 INTC.ICDIPTR24
+#define INTCICDIPTR25 INTC.ICDIPTR25
+#define INTCICDIPTR26 INTC.ICDIPTR26
+#define INTCICDIPTR27 INTC.ICDIPTR27
+#define INTCICDIPTR28 INTC.ICDIPTR28
+#define INTCICDIPTR29 INTC.ICDIPTR29
+#define INTCICDIPTR30 INTC.ICDIPTR30
+#define INTCICDIPTR31 INTC.ICDIPTR31
+#define INTCICDIPTR32 INTC.ICDIPTR32
+#define INTCICDIPTR33 INTC.ICDIPTR33
+#define INTCICDIPTR34 INTC.ICDIPTR34
+#define INTCICDIPTR35 INTC.ICDIPTR35
+#define INTCICDIPTR36 INTC.ICDIPTR36
+#define INTCICDIPTR37 INTC.ICDIPTR37
+#define INTCICDIPTR38 INTC.ICDIPTR38
+#define INTCICDIPTR39 INTC.ICDIPTR39
+#define INTCICDIPTR40 INTC.ICDIPTR40
+#define INTCICDIPTR41 INTC.ICDIPTR41
+#define INTCICDIPTR42 INTC.ICDIPTR42
+#define INTCICDIPTR43 INTC.ICDIPTR43
+#define INTCICDIPTR44 INTC.ICDIPTR44
+#define INTCICDIPTR45 INTC.ICDIPTR45
+#define INTCICDIPTR46 INTC.ICDIPTR46
+#define INTCICDIPTR47 INTC.ICDIPTR47
+#define INTCICDIPTR48 INTC.ICDIPTR48
+#define INTCICDIPTR49 INTC.ICDIPTR49
+#define INTCICDIPTR50 INTC.ICDIPTR50
+#define INTCICDIPTR51 INTC.ICDIPTR51
+#define INTCICDIPTR52 INTC.ICDIPTR52
+#define INTCICDIPTR53 INTC.ICDIPTR53
+#define INTCICDIPTR54 INTC.ICDIPTR54
+#define INTCICDIPTR55 INTC.ICDIPTR55
+#define INTCICDIPTR56 INTC.ICDIPTR56
+#define INTCICDIPTR57 INTC.ICDIPTR57
+#define INTCICDIPTR58 INTC.ICDIPTR58
+#define INTCICDIPTR59 INTC.ICDIPTR59
+#define INTCICDIPTR60 INTC.ICDIPTR60
+#define INTCICDIPTR61 INTC.ICDIPTR61
+#define INTCICDIPTR62 INTC.ICDIPTR62
+#define INTCICDIPTR63 INTC.ICDIPTR63
+#define INTCICDIPTR64 INTC.ICDIPTR64
+#define INTCICDIPTR65 INTC.ICDIPTR65
+#define INTCICDIPTR66 INTC.ICDIPTR66
+#define INTCICDIPTR67 INTC.ICDIPTR67
+#define INTCICDIPTR68 INTC.ICDIPTR68
+#define INTCICDIPTR69 INTC.ICDIPTR69
+#define INTCICDIPTR70 INTC.ICDIPTR70
+#define INTCICDIPTR71 INTC.ICDIPTR71
+#define INTCICDIPTR72 INTC.ICDIPTR72
+#define INTCICDIPTR73 INTC.ICDIPTR73
+#define INTCICDIPTR74 INTC.ICDIPTR74
+#define INTCICDIPTR75 INTC.ICDIPTR75
+#define INTCICDIPTR76 INTC.ICDIPTR76
+#define INTCICDIPTR77 INTC.ICDIPTR77
+#define INTCICDIPTR78 INTC.ICDIPTR78
+#define INTCICDIPTR79 INTC.ICDIPTR79
+#define INTCICDIPTR80 INTC.ICDIPTR80
+#define INTCICDIPTR81 INTC.ICDIPTR81
+#define INTCICDIPTR82 INTC.ICDIPTR82
+#define INTCICDIPTR83 INTC.ICDIPTR83
+#define INTCICDIPTR84 INTC.ICDIPTR84
+#define INTCICDIPTR85 INTC.ICDIPTR85
+#define INTCICDIPTR86 INTC.ICDIPTR86
+#define INTCICDIPTR87 INTC.ICDIPTR87
+#define INTCICDIPTR88 INTC.ICDIPTR88
+#define INTCICDIPTR89 INTC.ICDIPTR89
+#define INTCICDIPTR90 INTC.ICDIPTR90
+#define INTCICDIPTR91 INTC.ICDIPTR91
+#define INTCICDIPTR92 INTC.ICDIPTR92
+#define INTCICDIPTR93 INTC.ICDIPTR93
+#define INTCICDIPTR94 INTC.ICDIPTR94
+#define INTCICDIPTR95 INTC.ICDIPTR95
+#define INTCICDIPTR96 INTC.ICDIPTR96
+#define INTCICDIPTR97 INTC.ICDIPTR97
+#define INTCICDIPTR98 INTC.ICDIPTR98
+#define INTCICDIPTR99 INTC.ICDIPTR99
+#define INTCICDIPTR100 INTC.ICDIPTR100
+#define INTCICDIPTR101 INTC.ICDIPTR101
+#define INTCICDIPTR102 INTC.ICDIPTR102
+#define INTCICDIPTR103 INTC.ICDIPTR103
+#define INTCICDIPTR104 INTC.ICDIPTR104
+#define INTCICDIPTR105 INTC.ICDIPTR105
+#define INTCICDIPTR106 INTC.ICDIPTR106
+#define INTCICDIPTR107 INTC.ICDIPTR107
+#define INTCICDIPTR108 INTC.ICDIPTR108
+#define INTCICDIPTR109 INTC.ICDIPTR109
+#define INTCICDIPTR110 INTC.ICDIPTR110
+#define INTCICDIPTR111 INTC.ICDIPTR111
+#define INTCICDIPTR112 INTC.ICDIPTR112
+#define INTCICDIPTR113 INTC.ICDIPTR113
+#define INTCICDIPTR114 INTC.ICDIPTR114
+#define INTCICDIPTR115 INTC.ICDIPTR115
+#define INTCICDIPTR116 INTC.ICDIPTR116
+#define INTCICDIPTR117 INTC.ICDIPTR117
+#define INTCICDIPTR118 INTC.ICDIPTR118
+#define INTCICDIPTR119 INTC.ICDIPTR119
+#define INTCICDIPTR120 INTC.ICDIPTR120
+#define INTCICDIPTR121 INTC.ICDIPTR121
+#define INTCICDIPTR122 INTC.ICDIPTR122
+#define INTCICDIPTR123 INTC.ICDIPTR123
+#define INTCICDIPTR124 INTC.ICDIPTR124
+#define INTCICDIPTR125 INTC.ICDIPTR125
+#define INTCICDIPTR126 INTC.ICDIPTR126
+#define INTCICDIPTR127 INTC.ICDIPTR127
+#define INTCICDIPTR128 INTC.ICDIPTR128
+#define INTCICDIPTR129 INTC.ICDIPTR129
+#define INTCICDIPTR130 INTC.ICDIPTR130
+#define INTCICDIPTR131 INTC.ICDIPTR131
+#define INTCICDIPTR132 INTC.ICDIPTR132
+#define INTCICDIPTR133 INTC.ICDIPTR133
+#define INTCICDIPTR134 INTC.ICDIPTR134
+#define INTCICDIPTR135 INTC.ICDIPTR135
+#define INTCICDIPTR136 INTC.ICDIPTR136
+#define INTCICDIPTR137 INTC.ICDIPTR137
+#define INTCICDIPTR138 INTC.ICDIPTR138
+#define INTCICDIPTR139 INTC.ICDIPTR139
+#define INTCICDIPTR140 INTC.ICDIPTR140
+#define INTCICDIPTR141 INTC.ICDIPTR141
+#define INTCICDIPTR142 INTC.ICDIPTR142
+#define INTCICDIPTR143 INTC.ICDIPTR143
+#define INTCICDIPTR144 INTC.ICDIPTR144
+#define INTCICDIPTR145 INTC.ICDIPTR145
+#define INTCICDIPTR146 INTC.ICDIPTR146
+#define INTCICDICFR0 INTC.ICDICFR0
+#define INTCICDICFR1 INTC.ICDICFR1
+#define INTCICDICFR2 INTC.ICDICFR2
+#define INTCICDICFR3 INTC.ICDICFR3
+#define INTCICDICFR4 INTC.ICDICFR4
+#define INTCICDICFR5 INTC.ICDICFR5
+#define INTCICDICFR6 INTC.ICDICFR6
+#define INTCICDICFR7 INTC.ICDICFR7
+#define INTCICDICFR8 INTC.ICDICFR8
+#define INTCICDICFR9 INTC.ICDICFR9
+#define INTCICDICFR10 INTC.ICDICFR10
+#define INTCICDICFR11 INTC.ICDICFR11
+#define INTCICDICFR12 INTC.ICDICFR12
+#define INTCICDICFR13 INTC.ICDICFR13
+#define INTCICDICFR14 INTC.ICDICFR14
+#define INTCICDICFR15 INTC.ICDICFR15
+#define INTCICDICFR16 INTC.ICDICFR16
+#define INTCICDICFR17 INTC.ICDICFR17
+#define INTCICDICFR18 INTC.ICDICFR18
+#define INTCICDICFR19 INTC.ICDICFR19
+#define INTCICDICFR20 INTC.ICDICFR20
+#define INTCICDICFR21 INTC.ICDICFR21
+#define INTCICDICFR22 INTC.ICDICFR22
+#define INTCICDICFR23 INTC.ICDICFR23
+#define INTCICDICFR24 INTC.ICDICFR24
+#define INTCICDICFR25 INTC.ICDICFR25
+#define INTCICDICFR26 INTC.ICDICFR26
+#define INTCICDICFR27 INTC.ICDICFR27
+#define INTCICDICFR28 INTC.ICDICFR28
+#define INTCICDICFR29 INTC.ICDICFR29
+#define INTCICDICFR30 INTC.ICDICFR30
+#define INTCICDICFR31 INTC.ICDICFR31
+#define INTCICDICFR32 INTC.ICDICFR32
+#define INTCICDICFR33 INTC.ICDICFR33
+#define INTCICDICFR34 INTC.ICDICFR34
+#define INTCICDICFR35 INTC.ICDICFR35
+#define INTCICDICFR36 INTC.ICDICFR36
+#define INTCPPI_STATUS INTC.PPI_STATUS
+#define INTCSPI_STATUS0 INTC.SPI_STATUS0
+#define INTCSPI_STATUS1 INTC.SPI_STATUS1
+#define INTCSPI_STATUS2 INTC.SPI_STATUS2
+#define INTCSPI_STATUS3 INTC.SPI_STATUS3
+#define INTCSPI_STATUS4 INTC.SPI_STATUS4
+#define INTCSPI_STATUS5 INTC.SPI_STATUS5
+#define INTCSPI_STATUS6 INTC.SPI_STATUS6
+#define INTCSPI_STATUS7 INTC.SPI_STATUS7
+#define INTCSPI_STATUS8 INTC.SPI_STATUS8
+#define INTCSPI_STATUS9 INTC.SPI_STATUS9
+#define INTCSPI_STATUS10 INTC.SPI_STATUS10
+#define INTCSPI_STATUS11 INTC.SPI_STATUS11
+#define INTCSPI_STATUS12 INTC.SPI_STATUS12
+#define INTCSPI_STATUS13 INTC.SPI_STATUS13
+#define INTCSPI_STATUS14 INTC.SPI_STATUS14
+#define INTCSPI_STATUS15 INTC.SPI_STATUS15
+#define INTCSPI_STATUS16 INTC.SPI_STATUS16
+#define INTCICDSGIR INTC.ICDSGIR
+#define INTCICCICR INTC.ICCICR
+#define INTCICCPMR INTC.ICCPMR
+#define INTCICCBPR INTC.ICCBPR
+#define INTCICCIAR INTC.ICCIAR
+#define INTCICCEOIR INTC.ICCEOIR
+#define INTCICCRPR INTC.ICCRPR
+#define INTCICCHPIR INTC.ICCHPIR
+#define INTCICCABPR INTC.ICCABPR
+#define INTCICCIIDR INTC.ICCIIDR
+#define INTCICR0 INTC.ICR0
+#define INTCICR1 INTC.ICR1
+#define INTCIRQRR INTC.IRQRR
+/* <-SEC M1.10.1 */
+/* <-QAC 0639 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/irda_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/irda_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/irda_iodefine.h	(revision 270)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : irda_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef IRDA_IODEFINE_H
+#define IRDA_IODEFINE_H
+
+struct st_irda
+{                                                          /* IRDA             */
+    volatile uint8_t   IRCR;                                   /*  IRCR            */
+};
+
+
+#define IRDA    (*(struct st_irda    *)0xE8014000uL) /* IRDA */
+
+
+#define IRDAIRCR IRDA.IRCR
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/jcu_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/jcu_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/jcu_iodefine.h	(revision 270)
@@ -0,0 +1,169 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : jcu_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef JCU_IODEFINE_H
+#define JCU_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_jcu
+{                                                          /* JCU              */
+    volatile uint8_t   JCMOD;                                  /*  JCMOD           */
+    volatile uint8_t   JCCMD;                                  /*  JCCMD           */
+    volatile uint8_t   dummy145[1];                            /*                  */
+    volatile uint8_t   JCQTN;                                  /*  JCQTN           */
+    volatile uint8_t   JCHTN;                                  /*  JCHTN           */
+    volatile uint8_t   JCDRIU;                                 /*  JCDRIU          */
+    volatile uint8_t   JCDRID;                                 /*  JCDRID          */
+    volatile uint8_t   JCVSZU;                                 /*  JCVSZU          */
+    volatile uint8_t   JCVSZD;                                 /*  JCVSZD          */
+    volatile uint8_t   JCHSZU;                                 /*  JCHSZU          */
+    volatile uint8_t   JCHSZD;                                 /*  JCHSZD          */
+    volatile uint8_t   JCDTCU;                                 /*  JCDTCU          */
+    volatile uint8_t   JCDTCM;                                 /*  JCDTCM          */
+    volatile uint8_t   JCDTCD;                                 /*  JCDTCD          */
+    volatile uint8_t   JINTE0;                                 /*  JINTE0          */
+    volatile uint8_t   JINTS0;                                 /*  JINTS0          */
+    volatile uint8_t   JCDERR;                                 /*  JCDERR          */
+    volatile uint8_t   JCRST;                                  /*  JCRST           */
+    volatile uint8_t   dummy146[46];                           /*                  */
+    volatile uint32_t  JIFECNT;                                /*  JIFECNT         */
+    volatile uint32_t  JIFESA;                                 /*  JIFESA          */
+    volatile uint32_t  JIFESOFST;                              /*  JIFESOFST       */
+    volatile uint32_t  JIFEDA;                                 /*  JIFEDA          */
+    volatile uint32_t  JIFESLC;                                /*  JIFESLC         */
+    volatile uint32_t  JIFEDDC;                                /*  JIFEDDC         */
+    volatile uint32_t  JIFDCNT;                                /*  JIFDCNT         */
+    volatile uint32_t  JIFDSA;                                 /*  JIFDSA          */
+    volatile uint32_t  JIFDDOFST;                              /*  JIFDDOFST       */
+    volatile uint32_t  JIFDDA;                                 /*  JIFDDA          */
+    volatile uint32_t  JIFDSDC;                                /*  JIFDSDC         */
+    volatile uint32_t  JIFDDLC;                                /*  JIFDDLC         */
+    volatile uint32_t  JIFDADT;                                /*  JIFDADT         */
+    volatile uint8_t   dummy147[24];                           /*                  */
+    volatile uint32_t  JINTE1;                                 /*  JINTE1          */
+    volatile uint32_t  JINTS1;                                 /*  JINTS1          */
+    volatile uint32_t  JIFESVSZ;                               /*  JIFESVSZ        */
+    volatile uint32_t  JIFESHSZ;                               /*  JIFESHSZ        */
+    volatile uint8_t   dummy148[100];                          /*                  */
+/* start of struct st_jcu_from_jcqtbl0 */
+    volatile uint8_t   JCQTBL0;                                /*  JCQTBL0         */
+    volatile uint8_t   dummy149[63];                           /*                  */
+/* end of struct st_jcu_from_jcqtbl0 */
+/* start of struct st_jcu_from_jcqtbl0 */
+    volatile uint8_t   JCQTBL1;                                /*  JCQTBL1         */
+    volatile uint8_t   dummy150[63];                           /*                  */
+/* end of struct st_jcu_from_jcqtbl0 */
+/* start of struct st_jcu_from_jcqtbl0 */
+    volatile uint8_t   JCQTBL2;                                /*  JCQTBL2         */
+    volatile uint8_t   dummy151[63];                           /*                  */
+/* end of struct st_jcu_from_jcqtbl0 */
+/* start of struct st_jcu_from_jcqtbl0 */
+    volatile uint8_t   JCQTBL3;                                /*  JCQTBL3         */
+    volatile uint8_t   dummy152[63];                           /*                  */
+/* end of struct st_jcu_from_jcqtbl0 */
+    volatile uint8_t   JCHTBD0;                                /*  JCHTBD0         */
+    volatile uint8_t   dummy153[31];                           /*                  */
+    volatile uint8_t   JCHTBA0;                                /*  JCHTBA0         */
+    volatile uint8_t   dummy154[223];                          /*                  */
+    volatile uint8_t   JCHTBD1;                                /*  JCHTBD1         */
+    volatile uint8_t   dummy155[31];                           /*                  */
+    volatile uint8_t   JCHTBA1;                                /*  JCHTBA1         */
+};
+
+
+struct st_jcu_from_jcqtbl0
+{
+    volatile uint8_t   JCQTBL0;                                /*  JCQTBL0         */
+    volatile uint8_t   dummy1[63];                             /*                  */
+};
+
+
+#define JCU     (*(struct st_jcu     *)0xE8017000uL) /* JCU */
+
+
+/* Start of channnel array defines of JCU */
+
+/* Channnel array defines of JCU_JCQTBL0 */
+/*(Sample) value = JCU_JCQTBL0[ channel ]->JCQTBL0; */
+#define JCU_JCQTBL0_COUNT  4
+#define JCU_JCQTBL0_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &JCU_FROM_JCQTBL0, &JCU_FROM_JCQTBL1, &JCU_FROM_JCQTBL2, &JCU_FROM_JCQTBL3 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define JCU_FROM_JCQTBL0 (*(struct st_jcu_from_jcqtbl0 *)&JCU.JCQTBL0) /* JCU_FROM_JCQTBL0 */
+#define JCU_FROM_JCQTBL1 (*(struct st_jcu_from_jcqtbl0 *)&JCU.JCQTBL1) /* JCU_FROM_JCQTBL1 */
+#define JCU_FROM_JCQTBL2 (*(struct st_jcu_from_jcqtbl0 *)&JCU.JCQTBL2) /* JCU_FROM_JCQTBL2 */
+#define JCU_FROM_JCQTBL3 (*(struct st_jcu_from_jcqtbl0 *)&JCU.JCQTBL3) /* JCU_FROM_JCQTBL3 */
+
+/* End of channnel array defines of JCU */
+
+
+#define JCUJCMOD JCU.JCMOD
+#define JCUJCCMD JCU.JCCMD
+#define JCUJCQTN JCU.JCQTN
+#define JCUJCHTN JCU.JCHTN
+#define JCUJCDRIU JCU.JCDRIU
+#define JCUJCDRID JCU.JCDRID
+#define JCUJCVSZU JCU.JCVSZU
+#define JCUJCVSZD JCU.JCVSZD
+#define JCUJCHSZU JCU.JCHSZU
+#define JCUJCHSZD JCU.JCHSZD
+#define JCUJCDTCU JCU.JCDTCU
+#define JCUJCDTCM JCU.JCDTCM
+#define JCUJCDTCD JCU.JCDTCD
+#define JCUJINTE0 JCU.JINTE0
+#define JCUJINTS0 JCU.JINTS0
+#define JCUJCDERR JCU.JCDERR
+#define JCUJCRST JCU.JCRST
+#define JCUJIFECNT JCU.JIFECNT
+#define JCUJIFESA JCU.JIFESA
+#define JCUJIFESOFST JCU.JIFESOFST
+#define JCUJIFEDA JCU.JIFEDA
+#define JCUJIFESLC JCU.JIFESLC
+#define JCUJIFEDDC JCU.JIFEDDC
+#define JCUJIFDCNT JCU.JIFDCNT
+#define JCUJIFDSA JCU.JIFDSA
+#define JCUJIFDDOFST JCU.JIFDDOFST
+#define JCUJIFDDA JCU.JIFDDA
+#define JCUJIFDSDC JCU.JIFDSDC
+#define JCUJIFDDLC JCU.JIFDDLC
+#define JCUJIFDADT JCU.JIFDADT
+#define JCUJINTE1 JCU.JINTE1
+#define JCUJINTS1 JCU.JINTS1
+#define JCUJIFESVSZ JCU.JIFESVSZ
+#define JCUJIFESHSZ JCU.JIFESHSZ
+#define JCUJCQTBL0 JCU.JCQTBL0
+#define JCUJCQTBL1 JCU.JCQTBL1
+#define JCUJCQTBL2 JCU.JCQTBL2
+#define JCUJCQTBL3 JCU.JCQTBL3
+#define JCUJCHTBD0 JCU.JCHTBD0
+#define JCUJCHTBA0 JCU.JCHTBA0
+#define JCUJCHTBD1 JCU.JCHTBD1
+#define JCUJCHTBA1 JCU.JCHTBA1
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/l2c_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/l2c_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/l2c_iodefine.h	(revision 270)
@@ -0,0 +1,195 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : l2c_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef L2C_IODEFINE_H
+#define L2C_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_l2c
+{                                                          /* L2C              */
+    volatile uint32_t  REG0_CACHE_ID;                          /*  REG0_CACHE_ID   */
+    volatile uint32_t  REG0_CACHE_TYPE;                        /*  REG0_CACHE_TYPE */
+    volatile uint8_t   dummy8[248];                            /*                  */
+    volatile uint32_t  REG1_CONTROL;                           /*  REG1_CONTROL    */
+    volatile uint32_t  REG1_AUX_CONTROL;                       /*  REG1_AUX_CONTROL */
+    volatile uint32_t  REG1_TAG_RAM_CONTROL;                   /*  REG1_TAG_RAM_CONTROL */
+    volatile uint32_t  REG1_DATA_RAM_CONTROL;                  /*  REG1_DATA_RAM_CONTROL */
+    volatile uint8_t   dummy9[240];                            /*                  */
+    volatile uint32_t  REG2_EV_COUNTER_CTRL;                   /*  REG2_EV_COUNTER_CTRL */
+    volatile uint32_t  REG2_EV_COUNTER1_CFG;                   /*  REG2_EV_COUNTER1_CFG */
+    volatile uint32_t  REG2_EV_COUNTER0_CFG;                   /*  REG2_EV_COUNTER0_CFG */
+    volatile uint32_t  REG2_EV_COUNTER1;                       /*  REG2_EV_COUNTER1 */
+    volatile uint32_t  REG2_EV_COUNTER0;                       /*  REG2_EV_COUNTER0 */
+    volatile uint32_t  REG2_INT_MASK;                          /*  REG2_INT_MASK   */
+    volatile uint32_t  REG2_INT_MASK_STATUS;                   /*  REG2_INT_MASK_STATUS */
+    volatile uint32_t  REG2_INT_RAW_STATUS;                    /*  REG2_INT_RAW_STATUS */
+    volatile uint32_t  REG2_INT_CLEAR;                         /*  REG2_INT_CLEAR  */
+    volatile uint8_t   dummy10[1292];                          /*                  */
+    volatile uint32_t  REG7_CACHE_SYNC;                        /*  REG7_CACHE_SYNC */
+    volatile uint8_t   dummy11[60];                            /*                  */
+    volatile uint32_t  REG7_INV_PA;                            /*  REG7_INV_PA     */
+    volatile uint8_t   dummy12[8];                             /*                  */
+    volatile uint32_t  REG7_INV_WAY;                           /*  REG7_INV_WAY    */
+    volatile uint8_t   dummy13[48];                            /*                  */
+    volatile uint32_t  REG7_CLEAN_PA;                          /*  REG7_CLEAN_PA   */
+    volatile uint8_t   dummy14[4];                             /*                  */
+    volatile uint32_t  REG7_CLEAN_INDEX;                       /*  REG7_CLEAN_INDEX */
+    volatile uint32_t  REG7_CLEAN_WAY;                         /*  REG7_CLEAN_WAY  */
+    volatile uint8_t   dummy15[48];                            /*                  */
+    volatile uint32_t  REG7_CLEAN_INV_PA;                      /*  REG7_CLEAN_INV_PA */
+    volatile uint8_t   dummy16[4];                             /*                  */
+    volatile uint32_t  REG7_CLEAN_INV_INDEX;                   /*  REG7_CLEAN_INV_INDEX */
+    volatile uint32_t  REG7_CLEAN_INV_WAY;                     /*  REG7_CLEAN_INV_WAY */
+    volatile uint8_t   dummy17[256];                           /*                  */
+/* start of struct st_l2c_from_reg9_d_lockdown0 */
+    volatile uint32_t  REG9_D_LOCKDOWN0;                       /*  REG9_D_LOCKDOWN0 */
+    volatile uint32_t  REG9_I_LOCKDOWN0;                       /*  REG9_I_LOCKDOWN0 */
+/* end of struct st_l2c_from_reg9_d_lockdown0 */
+/* start of struct st_l2c_from_reg9_d_lockdown0 */
+    volatile uint32_t  REG9_D_LOCKDOWN1;                       /*  REG9_D_LOCKDOWN1 */
+    volatile uint32_t  REG9_I_LOCKDOWN1;                       /*  REG9_I_LOCKDOWN1 */
+/* end of struct st_l2c_from_reg9_d_lockdown0 */
+/* start of struct st_l2c_from_reg9_d_lockdown0 */
+    volatile uint32_t  REG9_D_LOCKDOWN2;                       /*  REG9_D_LOCKDOWN2 */
+    volatile uint32_t  REG9_I_LOCKDOWN2;                       /*  REG9_I_LOCKDOWN2 */
+/* end of struct st_l2c_from_reg9_d_lockdown0 */
+/* start of struct st_l2c_from_reg9_d_lockdown0 */
+    volatile uint32_t  REG9_D_LOCKDOWN3;                       /*  REG9_D_LOCKDOWN3 */
+    volatile uint32_t  REG9_I_LOCKDOWN3;                       /*  REG9_I_LOCKDOWN3 */
+/* end of struct st_l2c_from_reg9_d_lockdown0 */
+/* start of struct st_l2c_from_reg9_d_lockdown0 */
+    volatile uint32_t  REG9_D_LOCKDOWN4;                       /*  REG9_D_LOCKDOWN4 */
+    volatile uint32_t  REG9_I_LOCKDOWN4;                       /*  REG9_I_LOCKDOWN4 */
+/* end of struct st_l2c_from_reg9_d_lockdown0 */
+/* start of struct st_l2c_from_reg9_d_lockdown0 */
+    volatile uint32_t  REG9_D_LOCKDOWN5;                       /*  REG9_D_LOCKDOWN5 */
+    volatile uint32_t  REG9_I_LOCKDOWN5;                       /*  REG9_I_LOCKDOWN5 */
+/* end of struct st_l2c_from_reg9_d_lockdown0 */
+/* start of struct st_l2c_from_reg9_d_lockdown0 */
+    volatile uint32_t  REG9_D_LOCKDOWN6;                       /*  REG9_D_LOCKDOWN6 */
+    volatile uint32_t  REG9_I_LOCKDOWN6;                       /*  REG9_I_LOCKDOWN6 */
+/* end of struct st_l2c_from_reg9_d_lockdown0 */
+/* start of struct st_l2c_from_reg9_d_lockdown0 */
+    volatile uint32_t  REG9_D_LOCKDOWN7;                       /*  REG9_D_LOCKDOWN7 */
+    volatile uint32_t  REG9_I_LOCKDOWN7;                       /*  REG9_I_LOCKDOWN7 */
+/* end of struct st_l2c_from_reg9_d_lockdown0 */
+    volatile uint8_t   dummy18[16];                            /*                  */
+    volatile uint32_t  REG9_LOCK_LINE_EN;                      /*  REG9_LOCK_LINE_EN */
+    volatile uint32_t  REG9_UNLOCK_WAY;                        /*  REG9_UNLOCK_WAY */
+    volatile uint8_t   dummy19[680];                           /*                  */
+    volatile uint32_t  REG12_ADDR_FILTERING_START;             /*  REG12_ADDR_FILTERING_START */
+    volatile uint32_t  REG12_ADDR_FILTERING_END;               /*  REG12_ADDR_FILTERING_END */
+    volatile uint8_t   dummy20[824];                           /*                  */
+    volatile uint32_t  REG15_DEBUG_CTRL;                       /*  REG15_DEBUG_CTRL */
+    volatile uint8_t   dummy21[28];                            /*                  */
+    volatile uint32_t  REG15_PREFETCH_CTRL;                    /*  REG15_PREFETCH_CTRL */
+    volatile uint8_t   dummy22[28];                            /*                  */
+    volatile uint32_t  REG15_POWER_CTRL;                       /*  REG15_POWER_CTRL */
+};
+
+
+struct st_l2c_from_reg9_d_lockdown0
+{
+    volatile uint32_t  REG9_D_LOCKDOWN0;                       /*  REG9_D_LOCKDOWN0 */
+    volatile uint32_t  REG9_I_LOCKDOWN0;                       /*  REG9_I_LOCKDOWN0 */
+};
+
+
+#define L2C     (*(struct st_l2c     *)0x3FFFF000uL) /* L2C */
+
+
+/* Start of channnel array defines of L2C */
+
+/* Channnel array defines of L2C_FROM_REG9_D_LOCKDOWN0_ARRAY */
+/*(Sample) value = L2C_FROM_REG9_D_LOCKDOWN0_ARRAY[ channel ]->REG9_D_LOCKDOWN0; */
+#define L2C_FROM_REG9_D_LOCKDOWN0_ARRAY_COUNT  8
+#define L2C_FROM_REG9_D_LOCKDOWN0_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &L2C_FROM_REG9_D_LOCKDOWN0, &L2C_FROM_REG9_D_LOCKDOWN1, &L2C_FROM_REG9_D_LOCKDOWN2, &L2C_FROM_REG9_D_LOCKDOWN3, &L2C_FROM_REG9_D_LOCKDOWN4, &L2C_FROM_REG9_D_LOCKDOWN5, &L2C_FROM_REG9_D_LOCKDOWN6, &L2C_FROM_REG9_D_LOCKDOWN7 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define L2C_FROM_REG9_D_LOCKDOWN0 (*(struct st_l2c_from_reg9_d_lockdown0 *)&L2C.REG9_D_LOCKDOWN0) /* L2C_FROM_REG9_D_LOCKDOWN0 */
+#define L2C_FROM_REG9_D_LOCKDOWN1 (*(struct st_l2c_from_reg9_d_lockdown0 *)&L2C.REG9_D_LOCKDOWN1) /* L2C_FROM_REG9_D_LOCKDOWN1 */
+#define L2C_FROM_REG9_D_LOCKDOWN2 (*(struct st_l2c_from_reg9_d_lockdown0 *)&L2C.REG9_D_LOCKDOWN2) /* L2C_FROM_REG9_D_LOCKDOWN2 */
+#define L2C_FROM_REG9_D_LOCKDOWN3 (*(struct st_l2c_from_reg9_d_lockdown0 *)&L2C.REG9_D_LOCKDOWN3) /* L2C_FROM_REG9_D_LOCKDOWN3 */
+#define L2C_FROM_REG9_D_LOCKDOWN4 (*(struct st_l2c_from_reg9_d_lockdown0 *)&L2C.REG9_D_LOCKDOWN4) /* L2C_FROM_REG9_D_LOCKDOWN4 */
+#define L2C_FROM_REG9_D_LOCKDOWN5 (*(struct st_l2c_from_reg9_d_lockdown0 *)&L2C.REG9_D_LOCKDOWN5) /* L2C_FROM_REG9_D_LOCKDOWN5 */
+#define L2C_FROM_REG9_D_LOCKDOWN6 (*(struct st_l2c_from_reg9_d_lockdown0 *)&L2C.REG9_D_LOCKDOWN6) /* L2C_FROM_REG9_D_LOCKDOWN6 */
+#define L2C_FROM_REG9_D_LOCKDOWN7 (*(struct st_l2c_from_reg9_d_lockdown0 *)&L2C.REG9_D_LOCKDOWN7) /* L2C_FROM_REG9_D_LOCKDOWN7 */
+
+/* End of channnel array defines of L2C */
+
+
+#define L2CREG0_CACHE_ID L2C.REG0_CACHE_ID
+#define L2CREG0_CACHE_TYPE L2C.REG0_CACHE_TYPE
+#define L2CREG1_CONTROL L2C.REG1_CONTROL
+#define L2CREG1_AUX_CONTROL L2C.REG1_AUX_CONTROL
+#define L2CREG1_TAG_RAM_CONTROL L2C.REG1_TAG_RAM_CONTROL
+#define L2CREG1_DATA_RAM_CONTROL L2C.REG1_DATA_RAM_CONTROL
+#define L2CREG2_EV_COUNTER_CTRL L2C.REG2_EV_COUNTER_CTRL
+#define L2CREG2_EV_COUNTER1_CFG L2C.REG2_EV_COUNTER1_CFG
+#define L2CREG2_EV_COUNTER0_CFG L2C.REG2_EV_COUNTER0_CFG
+#define L2CREG2_EV_COUNTER1 L2C.REG2_EV_COUNTER1
+#define L2CREG2_EV_COUNTER0 L2C.REG2_EV_COUNTER0
+#define L2CREG2_INT_MASK L2C.REG2_INT_MASK
+#define L2CREG2_INT_MASK_STATUS L2C.REG2_INT_MASK_STATUS
+#define L2CREG2_INT_RAW_STATUS L2C.REG2_INT_RAW_STATUS
+#define L2CREG2_INT_CLEAR L2C.REG2_INT_CLEAR
+#define L2CREG7_CACHE_SYNC L2C.REG7_CACHE_SYNC
+#define L2CREG7_INV_PA L2C.REG7_INV_PA
+#define L2CREG7_INV_WAY L2C.REG7_INV_WAY
+#define L2CREG7_CLEAN_PA L2C.REG7_CLEAN_PA
+#define L2CREG7_CLEAN_INDEX L2C.REG7_CLEAN_INDEX
+#define L2CREG7_CLEAN_WAY L2C.REG7_CLEAN_WAY
+#define L2CREG7_CLEAN_INV_PA L2C.REG7_CLEAN_INV_PA
+#define L2CREG7_CLEAN_INV_INDEX L2C.REG7_CLEAN_INV_INDEX
+#define L2CREG7_CLEAN_INV_WAY L2C.REG7_CLEAN_INV_WAY
+#define L2CREG9_D_LOCKDOWN0 L2C.REG9_D_LOCKDOWN0
+#define L2CREG9_I_LOCKDOWN0 L2C.REG9_I_LOCKDOWN0
+#define L2CREG9_D_LOCKDOWN1 L2C.REG9_D_LOCKDOWN1
+#define L2CREG9_I_LOCKDOWN1 L2C.REG9_I_LOCKDOWN1
+#define L2CREG9_D_LOCKDOWN2 L2C.REG9_D_LOCKDOWN2
+#define L2CREG9_I_LOCKDOWN2 L2C.REG9_I_LOCKDOWN2
+#define L2CREG9_D_LOCKDOWN3 L2C.REG9_D_LOCKDOWN3
+#define L2CREG9_I_LOCKDOWN3 L2C.REG9_I_LOCKDOWN3
+#define L2CREG9_D_LOCKDOWN4 L2C.REG9_D_LOCKDOWN4
+#define L2CREG9_I_LOCKDOWN4 L2C.REG9_I_LOCKDOWN4
+#define L2CREG9_D_LOCKDOWN5 L2C.REG9_D_LOCKDOWN5
+#define L2CREG9_I_LOCKDOWN5 L2C.REG9_I_LOCKDOWN5
+#define L2CREG9_D_LOCKDOWN6 L2C.REG9_D_LOCKDOWN6
+#define L2CREG9_I_LOCKDOWN6 L2C.REG9_I_LOCKDOWN6
+#define L2CREG9_D_LOCKDOWN7 L2C.REG9_D_LOCKDOWN7
+#define L2CREG9_I_LOCKDOWN7 L2C.REG9_I_LOCKDOWN7
+#define L2CREG9_LOCK_LINE_EN L2C.REG9_LOCK_LINE_EN
+#define L2CREG9_UNLOCK_WAY L2C.REG9_UNLOCK_WAY
+#define L2CREG12_ADDR_FILTERING_START L2C.REG12_ADDR_FILTERING_START
+#define L2CREG12_ADDR_FILTERING_END L2C.REG12_ADDR_FILTERING_END
+#define L2CREG15_DEBUG_CTRL L2C.REG15_DEBUG_CTRL
+#define L2CREG15_PREFETCH_CTRL L2C.REG15_PREFETCH_CTRL
+#define L2CREG15_POWER_CTRL L2C.REG15_POWER_CTRL
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/lin_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/lin_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/lin_iodefine.h	(revision 270)
@@ -0,0 +1,174 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : lin_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef LIN_IODEFINE_H
+#define LIN_IODEFINE_H
+/* ->MISRA 18.4 : Pack unpack union */ /* ->SEC M1.6.2 */
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_lin
+{                                                          /* LIN              */
+    volatile uint8_t   dummy1[1];                              /*                  */
+    volatile uint8_t   RLN3nLWBR;                              /*  RLN3nLWBR       */
+    union iodefine_reg16_8_t  RLN3nLBRP01;                     /*  RLN3nLBRP01 */
+    
+    volatile uint8_t   RLN3nLSTC;                              /*  RLN3nLSTC       */
+    volatile uint8_t   dummy2[3];                              /*                  */
+    volatile uint8_t   RLN3nLMD;                               /*  RLN3nLMD        */
+    volatile uint8_t   RLN3nLBFC;                              /*  RLN3nLBFC       */
+    volatile uint8_t   RLN3nLSC;                               /*  RLN3nLSC        */
+    volatile uint8_t   RLN3nLWUP;                              /*  RLN3nLWUP       */
+    volatile uint8_t   RLN3nLIE;                               /*  RLN3nLIE        */
+    volatile uint8_t   RLN3nLEDE;                              /*  RLN3nLEDE       */
+    volatile uint8_t   RLN3nLCUC;                              /*  RLN3nLCUC       */
+    volatile uint8_t   dummy3[1];                              /*                  */
+    volatile uint8_t   RLN3nLTRC;                              /*  RLN3nLTRC       */
+    volatile uint8_t   RLN3nLMST;                              /*  RLN3nLMST       */
+    volatile uint8_t   RLN3nLST;                               /*  RLN3nLST        */
+    volatile uint8_t   RLN3nLEST;                              /*  RLN3nLEST       */
+    volatile uint8_t   RLN3nLDFC;                              /*  RLN3nLDFC       */
+    volatile uint8_t   RLN3nLIDB;                              /*  RLN3nLIDB       */
+    volatile uint8_t   RLN3nLCBR;                              /*  RLN3nLCBR       */
+    volatile uint8_t   RLN3nLUDB0;                             /*  RLN3nLUDB0      */
+#define LIN_LDBn_COUNT 8
+    volatile uint8_t   RLN3nLDBR1;                             /*  RLN3nLDBR1      */
+    volatile uint8_t   RLN3nLDBR2;                             /*  RLN3nLDBR2      */
+    volatile uint8_t   RLN3nLDBR3;                             /*  RLN3nLDBR3      */
+    volatile uint8_t   RLN3nLDBR4;                             /*  RLN3nLDBR4      */
+    volatile uint8_t   RLN3nLDBR5;                             /*  RLN3nLDBR5      */
+    volatile uint8_t   RLN3nLDBR6;                             /*  RLN3nLDBR6      */
+    volatile uint8_t   RLN3nLDBR7;                             /*  RLN3nLDBR7      */
+    volatile uint8_t   RLN3nLDBR8;                             /*  RLN3nLDBR8      */
+    volatile uint8_t   RLN3nLUOER;                             /*  RLN3nLUOER      */
+    volatile uint8_t   RLN3nLUOR1;                             /*  RLN3nLUOR1      */
+    volatile uint8_t   dummy4[2];                              /*                  */
+    union iodefine_reg16_8_t  RLN3nLUTDR;                      /*  RLN3nLUTDR  */
+    union iodefine_reg16_8_t  RLN3nLURDR;                      /*  RLN3nLURDR  */
+    union iodefine_reg16_8_t  RLN3nLUWTDR;                     /*  RLN3nLUWTDR */
+    
+};
+
+
+#define LIN0    (*(struct st_lin     *)0xFCFE9000uL) /* LIN0 */
+#define LIN1    (*(struct st_lin     *)0xFCFE9800uL) /* LIN1 */
+
+
+/* Start of channnel array defines of LIN */
+
+/* Channnel array defines of LIN */
+/*(Sample) value = LIN[ channel ]->RLN3nLWBR; */
+#define LIN_COUNT  2
+#define LIN_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &LIN0, &LIN1 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+
+/* End of channnel array defines of LIN */
+
+
+#define LIN0RLN30LWBR LIN0.RLN3nLWBR
+#define LIN0RLN30LBRP01 LIN0.RLN3nLBRP01.UINT16
+#define LIN0RLN30LBRP0 LIN0.RLN3nLBRP01.UINT8[L]
+#define LIN0RLN30LBRP1 LIN0.RLN3nLBRP01.UINT8[H]
+#define LIN0RLN30LSTC LIN0.RLN3nLSTC
+#define LIN0RLN30LMD LIN0.RLN3nLMD
+#define LIN0RLN30LBFC LIN0.RLN3nLBFC
+#define LIN0RLN30LSC LIN0.RLN3nLSC
+#define LIN0RLN30LWUP LIN0.RLN3nLWUP
+#define LIN0RLN30LIE LIN0.RLN3nLIE
+#define LIN0RLN30LEDE LIN0.RLN3nLEDE
+#define LIN0RLN30LCUC LIN0.RLN3nLCUC
+#define LIN0RLN30LTRC LIN0.RLN3nLTRC
+#define LIN0RLN30LMST LIN0.RLN3nLMST
+#define LIN0RLN30LST LIN0.RLN3nLST
+#define LIN0RLN30LEST LIN0.RLN3nLEST
+#define LIN0RLN30LDFC LIN0.RLN3nLDFC
+#define LIN0RLN30LIDB LIN0.RLN3nLIDB
+#define LIN0RLN30LCBR LIN0.RLN3nLCBR
+#define LIN0RLN30LUDB0 LIN0.RLN3nLUDB0
+#define LIN0RLN30LDBR1 LIN0.RLN3nLDBR1
+#define LIN0RLN30LDBR2 LIN0.RLN3nLDBR2
+#define LIN0RLN30LDBR3 LIN0.RLN3nLDBR3
+#define LIN0RLN30LDBR4 LIN0.RLN3nLDBR4
+#define LIN0RLN30LDBR5 LIN0.RLN3nLDBR5
+#define LIN0RLN30LDBR6 LIN0.RLN3nLDBR6
+#define LIN0RLN30LDBR7 LIN0.RLN3nLDBR7
+#define LIN0RLN30LDBR8 LIN0.RLN3nLDBR8
+#define LIN0RLN30LUOER LIN0.RLN3nLUOER
+#define LIN0RLN30LUOR1 LIN0.RLN3nLUOR1
+#define LIN0RLN30LUTDR LIN0.RLN3nLUTDR.UINT16
+#define LIN0RLN30LUTDRL LIN0.RLN3nLUTDR.UINT8[L]
+#define LIN0RLN30LUTDRH LIN0.RLN3nLUTDR.UINT8[H]
+#define LIN0RLN30LURDR LIN0.RLN3nLURDR.UINT16
+#define LIN0RLN30LURDRL LIN0.RLN3nLURDR.UINT8[L]
+#define LIN0RLN30LURDRH LIN0.RLN3nLURDR.UINT8[H]
+#define LIN0RLN30LUWTDR LIN0.RLN3nLUWTDR.UINT16
+#define LIN0RLN30LUWTDRL LIN0.RLN3nLUWTDR.UINT8[L]
+#define LIN0RLN30LUWTDRH LIN0.RLN3nLUWTDR.UINT8[H]
+#define LIN1RLN31LWBR LIN1.RLN3nLWBR
+#define LIN1RLN31LBRP01 LIN1.RLN3nLBRP01.UINT16
+#define LIN1RLN31LBRP0 LIN1.RLN3nLBRP01.UINT8[L]
+#define LIN1RLN31LBRP1 LIN1.RLN3nLBRP01.UINT8[H]
+#define LIN1RLN31LSTC LIN1.RLN3nLSTC
+#define LIN1RLN31LMD LIN1.RLN3nLMD
+#define LIN1RLN31LBFC LIN1.RLN3nLBFC
+#define LIN1RLN31LSC LIN1.RLN3nLSC
+#define LIN1RLN31LWUP LIN1.RLN3nLWUP
+#define LIN1RLN31LIE LIN1.RLN3nLIE
+#define LIN1RLN31LEDE LIN1.RLN3nLEDE
+#define LIN1RLN31LCUC LIN1.RLN3nLCUC
+#define LIN1RLN31LTRC LIN1.RLN3nLTRC
+#define LIN1RLN31LMST LIN1.RLN3nLMST
+#define LIN1RLN31LST LIN1.RLN3nLST
+#define LIN1RLN31LEST LIN1.RLN3nLEST
+#define LIN1RLN31LDFC LIN1.RLN3nLDFC
+#define LIN1RLN31LIDB LIN1.RLN3nLIDB
+#define LIN1RLN31LCBR LIN1.RLN3nLCBR
+#define LIN1RLN31LUDB0 LIN1.RLN3nLUDB0
+#define LIN1RLN31LDBR1 LIN1.RLN3nLDBR1
+#define LIN1RLN31LDBR2 LIN1.RLN3nLDBR2
+#define LIN1RLN31LDBR3 LIN1.RLN3nLDBR3
+#define LIN1RLN31LDBR4 LIN1.RLN3nLDBR4
+#define LIN1RLN31LDBR5 LIN1.RLN3nLDBR5
+#define LIN1RLN31LDBR6 LIN1.RLN3nLDBR6
+#define LIN1RLN31LDBR7 LIN1.RLN3nLDBR7
+#define LIN1RLN31LDBR8 LIN1.RLN3nLDBR8
+#define LIN1RLN31LUOER LIN1.RLN3nLUOER
+#define LIN1RLN31LUOR1 LIN1.RLN3nLUOR1
+#define LIN1RLN31LUTDR LIN1.RLN3nLUTDR.UINT16
+#define LIN1RLN31LUTDRL LIN1.RLN3nLUTDR.UINT8[L]
+#define LIN1RLN31LUTDRH LIN1.RLN3nLUTDR.UINT8[H]
+#define LIN1RLN31LURDR LIN1.RLN3nLURDR.UINT16
+#define LIN1RLN31LURDRL LIN1.RLN3nLURDR.UINT8[L]
+#define LIN1RLN31LURDRH LIN1.RLN3nLURDR.UINT8[H]
+#define LIN1RLN31LUWTDR LIN1.RLN3nLUWTDR.UINT16
+#define LIN1RLN31LUWTDRL LIN1.RLN3nLUWTDR.UINT8[L]
+#define LIN1RLN31LUWTDRH LIN1.RLN3nLUWTDR.UINT8[H]
+/* <-SEC M1.10.1 */
+/* <-MISRA 18.4 */ /* <-SEC M1.6.2 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/lvds_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/lvds_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/lvds_iodefine.h	(revision 270)
@@ -0,0 +1,54 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : lvds_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.01a)
+******************************************************************************/
+#ifndef LVDS_IODEFINE_H
+#define LVDS_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_lvds
+{                                                          /* LVDS             */
+    volatile uint32_t  LVDS_UPDATE;                            /*  LVDS_UPDATE     */
+    volatile uint32_t  LVDSFCL;                                /*  LVDSFCL         */
+    volatile uint8_t   dummy608[24];                           /*                  */
+    volatile uint32_t  LCLKSELR;                               /*  LCLKSELR        */
+    volatile uint32_t  LPLLSETR;                               /*  LPLLSETR        */
+    volatile uint8_t   dummy609[4];                            /*                  */
+    volatile uint32_t  LPHYACC;                                /*  LPHYACC         */
+};
+
+
+#define LVDS    (*(struct st_lvds    *)0xFCFF7A30uL) /* LVDS */
+
+
+#define LVDSLVDS_UPDATE LVDS.LVDS_UPDATE
+#define LVDSLVDSFCL LVDS.LVDSFCL
+#define LVDSLCLKSELR LVDS.LCLKSELR
+#define LVDSLPLLSETR LVDS.LPLLSETR
+#define LVDSLPHYACC LVDS.LPHYACC
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/mlb_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/mlb_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/mlb_iodefine.h	(revision 270)
@@ -0,0 +1,498 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : mlb_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef MLB_IODEFINE_H
+#define MLB_IODEFINE_H
+/* ->QAC 0639 : Over 127 members (C90) */
+/* ->QAC 0857 : Over 1024 #define (C90) */
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_mlb
+{                                                          /* MLB              */
+    volatile uint32_t  DCCR;                                   /*  DCCR            */
+    volatile uint32_t  SSCR;                                   /*  SSCR            */
+    volatile uint32_t  SDCR;                                   /*  SDCR            */
+    volatile uint32_t  SMCR;                                   /*  SMCR            */
+    volatile uint8_t   dummy156[12];                           /*                  */
+    volatile uint32_t  VCCR;                                   /*  VCCR            */
+    volatile uint32_t  SBCR;                                   /*  SBCR            */
+    volatile uint32_t  ABCR;                                   /*  ABCR            */
+    volatile uint32_t  CBCR;                                   /*  CBCR            */
+    volatile uint32_t  IBCR;                                   /*  IBCR            */
+    volatile uint32_t  CICR;                                   /*  CICR            */
+    volatile uint8_t   dummy157[12];                           /*                  */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR0;                                  /*  CECR0           */
+    volatile uint32_t  CSCR0;                                  /*  CSCR0           */
+    volatile uint32_t  CCBCR0;                                 /*  CCBCR0          */
+    volatile uint32_t  CNBCR0;                                 /*  CNBCR0          */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR1;                                  /*  CECR1           */
+    volatile uint32_t  CSCR1;                                  /*  CSCR1           */
+    volatile uint32_t  CCBCR1;                                 /*  CCBCR1          */
+    volatile uint32_t  CNBCR1;                                 /*  CNBCR1          */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR2;                                  /*  CECR2           */
+    volatile uint32_t  CSCR2;                                  /*  CSCR2           */
+    volatile uint32_t  CCBCR2;                                 /*  CCBCR2          */
+    volatile uint32_t  CNBCR2;                                 /*  CNBCR2          */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR3;                                  /*  CECR3           */
+    volatile uint32_t  CSCR3;                                  /*  CSCR3           */
+    volatile uint32_t  CCBCR3;                                 /*  CCBCR3          */
+    volatile uint32_t  CNBCR3;                                 /*  CNBCR3          */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR4;                                  /*  CECR4           */
+    volatile uint32_t  CSCR4;                                  /*  CSCR4           */
+    volatile uint32_t  CCBCR4;                                 /*  CCBCR4          */
+    volatile uint32_t  CNBCR4;                                 /*  CNBCR4          */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR5;                                  /*  CECR5           */
+    volatile uint32_t  CSCR5;                                  /*  CSCR5           */
+    volatile uint32_t  CCBCR5;                                 /*  CCBCR5          */
+    volatile uint32_t  CNBCR5;                                 /*  CNBCR5          */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR6;                                  /*  CECR6           */
+    volatile uint32_t  CSCR6;                                  /*  CSCR6           */
+    volatile uint32_t  CCBCR6;                                 /*  CCBCR6          */
+    volatile uint32_t  CNBCR6;                                 /*  CNBCR6          */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR7;                                  /*  CECR7           */
+    volatile uint32_t  CSCR7;                                  /*  CSCR7           */
+    volatile uint32_t  CCBCR7;                                 /*  CCBCR7          */
+    volatile uint32_t  CNBCR7;                                 /*  CNBCR7          */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR8;                                  /*  CECR8           */
+    volatile uint32_t  CSCR8;                                  /*  CSCR8           */
+    volatile uint32_t  CCBCR8;                                 /*  CCBCR8          */
+    volatile uint32_t  CNBCR8;                                 /*  CNBCR8          */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR9;                                  /*  CECR9           */
+    volatile uint32_t  CSCR9;                                  /*  CSCR9           */
+    volatile uint32_t  CCBCR9;                                 /*  CCBCR9          */
+    volatile uint32_t  CNBCR9;                                 /*  CNBCR9          */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR10;                                 /*  CECR10          */
+    volatile uint32_t  CSCR10;                                 /*  CSCR10          */
+    volatile uint32_t  CCBCR10;                                /*  CCBCR10         */
+    volatile uint32_t  CNBCR10;                                /*  CNBCR10         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR11;                                 /*  CECR11          */
+    volatile uint32_t  CSCR11;                                 /*  CSCR11          */
+    volatile uint32_t  CCBCR11;                                /*  CCBCR11         */
+    volatile uint32_t  CNBCR11;                                /*  CNBCR11         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR12;                                 /*  CECR12          */
+    volatile uint32_t  CSCR12;                                 /*  CSCR12          */
+    volatile uint32_t  CCBCR12;                                /*  CCBCR12         */
+    volatile uint32_t  CNBCR12;                                /*  CNBCR12         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR13;                                 /*  CECR13          */
+    volatile uint32_t  CSCR13;                                 /*  CSCR13          */
+    volatile uint32_t  CCBCR13;                                /*  CCBCR13         */
+    volatile uint32_t  CNBCR13;                                /*  CNBCR13         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR14;                                 /*  CECR14          */
+    volatile uint32_t  CSCR14;                                 /*  CSCR14          */
+    volatile uint32_t  CCBCR14;                                /*  CCBCR14         */
+    volatile uint32_t  CNBCR14;                                /*  CNBCR14         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR15;                                 /*  CECR15          */
+    volatile uint32_t  CSCR15;                                 /*  CSCR15          */
+    volatile uint32_t  CCBCR15;                                /*  CCBCR15         */
+    volatile uint32_t  CNBCR15;                                /*  CNBCR15         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR16;                                 /*  CECR16          */
+    volatile uint32_t  CSCR16;                                 /*  CSCR16          */
+    volatile uint32_t  CCBCR16;                                /*  CCBCR16         */
+    volatile uint32_t  CNBCR16;                                /*  CNBCR16         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR17;                                 /*  CECR17          */
+    volatile uint32_t  CSCR17;                                 /*  CSCR17          */
+    volatile uint32_t  CCBCR17;                                /*  CCBCR17         */
+    volatile uint32_t  CNBCR17;                                /*  CNBCR17         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR18;                                 /*  CECR18          */
+    volatile uint32_t  CSCR18;                                 /*  CSCR18          */
+    volatile uint32_t  CCBCR18;                                /*  CCBCR18         */
+    volatile uint32_t  CNBCR18;                                /*  CNBCR18         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR19;                                 /*  CECR19          */
+    volatile uint32_t  CSCR19;                                 /*  CSCR19          */
+    volatile uint32_t  CCBCR19;                                /*  CCBCR19         */
+    volatile uint32_t  CNBCR19;                                /*  CNBCR19         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR20;                                 /*  CECR20          */
+    volatile uint32_t  CSCR20;                                 /*  CSCR20          */
+    volatile uint32_t  CCBCR20;                                /*  CCBCR20         */
+    volatile uint32_t  CNBCR20;                                /*  CNBCR20         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR21;                                 /*  CECR21          */
+    volatile uint32_t  CSCR21;                                 /*  CSCR21          */
+    volatile uint32_t  CCBCR21;                                /*  CCBCR21         */
+    volatile uint32_t  CNBCR21;                                /*  CNBCR21         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR22;                                 /*  CECR22          */
+    volatile uint32_t  CSCR22;                                 /*  CSCR22          */
+    volatile uint32_t  CCBCR22;                                /*  CCBCR22         */
+    volatile uint32_t  CNBCR22;                                /*  CNBCR22         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR23;                                 /*  CECR23          */
+    volatile uint32_t  CSCR23;                                 /*  CSCR23          */
+    volatile uint32_t  CCBCR23;                                /*  CCBCR23         */
+    volatile uint32_t  CNBCR23;                                /*  CNBCR23         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR24;                                 /*  CECR24          */
+    volatile uint32_t  CSCR24;                                 /*  CSCR24          */
+    volatile uint32_t  CCBCR24;                                /*  CCBCR24         */
+    volatile uint32_t  CNBCR24;                                /*  CNBCR24         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR25;                                 /*  CECR25          */
+    volatile uint32_t  CSCR25;                                 /*  CSCR25          */
+    volatile uint32_t  CCBCR25;                                /*  CCBCR25         */
+    volatile uint32_t  CNBCR25;                                /*  CNBCR25         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR26;                                 /*  CECR26          */
+    volatile uint32_t  CSCR26;                                 /*  CSCR26          */
+    volatile uint32_t  CCBCR26;                                /*  CCBCR26         */
+    volatile uint32_t  CNBCR26;                                /*  CNBCR26         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR27;                                 /*  CECR27          */
+    volatile uint32_t  CSCR27;                                 /*  CSCR27          */
+    volatile uint32_t  CCBCR27;                                /*  CCBCR27         */
+    volatile uint32_t  CNBCR27;                                /*  CNBCR27         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR28;                                 /*  CECR28          */
+    volatile uint32_t  CSCR28;                                 /*  CSCR28          */
+    volatile uint32_t  CCBCR28;                                /*  CCBCR28         */
+    volatile uint32_t  CNBCR28;                                /*  CNBCR28         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR29;                                 /*  CECR29          */
+    volatile uint32_t  CSCR29;                                 /*  CSCR29          */
+    volatile uint32_t  CCBCR29;                                /*  CCBCR29         */
+    volatile uint32_t  CNBCR29;                                /*  CNBCR29         */
+/* end of struct st_mlb_from_cecr0 */
+/* start of struct st_mlb_from_cecr0 */
+    volatile uint32_t  CECR30;                                 /*  CECR30          */
+    volatile uint32_t  CSCR30;                                 /*  CSCR30          */
+    volatile uint32_t  CCBCR30;                                /*  CCBCR30         */
+    volatile uint32_t  CNBCR30;                                /*  CNBCR30         */
+/* end of struct st_mlb_from_cecr0 */
+    volatile uint8_t   dummy158[80];                           /*                  */
+#define MLB_LCBCR0_COUNT 31
+    volatile uint32_t  LCBCR0;                                 /*  LCBCR0          */
+    volatile uint32_t  LCBCR1;                                 /*  LCBCR1          */
+    volatile uint32_t  LCBCR2;                                 /*  LCBCR2          */
+    volatile uint32_t  LCBCR3;                                 /*  LCBCR3          */
+    volatile uint32_t  LCBCR4;                                 /*  LCBCR4          */
+    volatile uint32_t  LCBCR5;                                 /*  LCBCR5          */
+    volatile uint32_t  LCBCR6;                                 /*  LCBCR6          */
+    volatile uint32_t  LCBCR7;                                 /*  LCBCR7          */
+    volatile uint32_t  LCBCR8;                                 /*  LCBCR8          */
+    volatile uint32_t  LCBCR9;                                 /*  LCBCR9          */
+    volatile uint32_t  LCBCR10;                                /*  LCBCR10         */
+    volatile uint32_t  LCBCR11;                                /*  LCBCR11         */
+    volatile uint32_t  LCBCR12;                                /*  LCBCR12         */
+    volatile uint32_t  LCBCR13;                                /*  LCBCR13         */
+    volatile uint32_t  LCBCR14;                                /*  LCBCR14         */
+    volatile uint32_t  LCBCR15;                                /*  LCBCR15         */
+    volatile uint32_t  LCBCR16;                                /*  LCBCR16         */
+    volatile uint32_t  LCBCR17;                                /*  LCBCR17         */
+    volatile uint32_t  LCBCR18;                                /*  LCBCR18         */
+    volatile uint32_t  LCBCR19;                                /*  LCBCR19         */
+    volatile uint32_t  LCBCR20;                                /*  LCBCR20         */
+    volatile uint32_t  LCBCR21;                                /*  LCBCR21         */
+    volatile uint32_t  LCBCR22;                                /*  LCBCR22         */
+    volatile uint32_t  LCBCR23;                                /*  LCBCR23         */
+    volatile uint32_t  LCBCR24;                                /*  LCBCR24         */
+    volatile uint32_t  LCBCR25;                                /*  LCBCR25         */
+    volatile uint32_t  LCBCR26;                                /*  LCBCR26         */
+    volatile uint32_t  LCBCR27;                                /*  LCBCR27         */
+    volatile uint32_t  LCBCR28;                                /*  LCBCR28         */
+    volatile uint32_t  LCBCR29;                                /*  LCBCR29         */
+    volatile uint32_t  LCBCR30;                                /*  LCBCR30         */
+};
+
+
+struct st_mlb_from_cecr0
+{
+    volatile uint32_t  CECR0;                                  /*  CECR0           */
+    volatile uint32_t  CSCR0;                                  /*  CSCR0           */
+    volatile uint32_t  CCBCR0;                                 /*  CCBCR0          */
+    volatile uint32_t  CNBCR0;                                 /*  CNBCR0          */
+};
+
+
+#define MLB     (*(struct st_mlb     *)0xE8034000uL) /* MLB */
+
+
+/* Start of channnel array defines of MLB */
+
+/* Channnel array defines of MLB_FROM_CECR0_ARRAY */
+/*(Sample) value = MLB_FROM_CECR0_ARRAY[ channel ]->CECR0; */
+#define MLB_FROM_CECR0_ARRAY_COUNT  31
+#define MLB_FROM_CECR0_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &MLB_FROM_CECR0, &MLB_FROM_CECR1, &MLB_FROM_CECR2, &MLB_FROM_CECR3, &MLB_FROM_CECR4, &MLB_FROM_CECR5, &MLB_FROM_CECR6, &MLB_FROM_CECR7, \
+    &MLB_FROM_CECR8, &MLB_FROM_CECR9, &MLB_FROM_CECR10, &MLB_FROM_CECR11, &MLB_FROM_CECR12, &MLB_FROM_CECR13, &MLB_FROM_CECR14, &MLB_FROM_CECR15, \
+    &MLB_FROM_CECR16, &MLB_FROM_CECR17, &MLB_FROM_CECR18, &MLB_FROM_CECR19, &MLB_FROM_CECR20, &MLB_FROM_CECR21, &MLB_FROM_CECR22, &MLB_FROM_CECR23, \
+    &MLB_FROM_CECR24, &MLB_FROM_CECR25, &MLB_FROM_CECR26, &MLB_FROM_CECR27, &MLB_FROM_CECR28, &MLB_FROM_CECR29, &MLB_FROM_CECR30 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define MLB_FROM_CECR0 (*(struct st_mlb_from_cecr0 *)&MLB.CECR0) /* MLB_FROM_CECR0 */
+#define MLB_FROM_CECR1 (*(struct st_mlb_from_cecr0 *)&MLB.CECR1) /* MLB_FROM_CECR1 */
+#define MLB_FROM_CECR2 (*(struct st_mlb_from_cecr0 *)&MLB.CECR2) /* MLB_FROM_CECR2 */
+#define MLB_FROM_CECR3 (*(struct st_mlb_from_cecr0 *)&MLB.CECR3) /* MLB_FROM_CECR3 */
+#define MLB_FROM_CECR4 (*(struct st_mlb_from_cecr0 *)&MLB.CECR4) /* MLB_FROM_CECR4 */
+#define MLB_FROM_CECR5 (*(struct st_mlb_from_cecr0 *)&MLB.CECR5) /* MLB_FROM_CECR5 */
+#define MLB_FROM_CECR6 (*(struct st_mlb_from_cecr0 *)&MLB.CECR6) /* MLB_FROM_CECR6 */
+#define MLB_FROM_CECR7 (*(struct st_mlb_from_cecr0 *)&MLB.CECR7) /* MLB_FROM_CECR7 */
+#define MLB_FROM_CECR8 (*(struct st_mlb_from_cecr0 *)&MLB.CECR8) /* MLB_FROM_CECR8 */
+#define MLB_FROM_CECR9 (*(struct st_mlb_from_cecr0 *)&MLB.CECR9) /* MLB_FROM_CECR9 */
+#define MLB_FROM_CECR10 (*(struct st_mlb_from_cecr0 *)&MLB.CECR10) /* MLB_FROM_CECR10 */
+#define MLB_FROM_CECR11 (*(struct st_mlb_from_cecr0 *)&MLB.CECR11) /* MLB_FROM_CECR11 */
+#define MLB_FROM_CECR12 (*(struct st_mlb_from_cecr0 *)&MLB.CECR12) /* MLB_FROM_CECR12 */
+#define MLB_FROM_CECR13 (*(struct st_mlb_from_cecr0 *)&MLB.CECR13) /* MLB_FROM_CECR13 */
+#define MLB_FROM_CECR14 (*(struct st_mlb_from_cecr0 *)&MLB.CECR14) /* MLB_FROM_CECR14 */
+#define MLB_FROM_CECR15 (*(struct st_mlb_from_cecr0 *)&MLB.CECR15) /* MLB_FROM_CECR15 */
+#define MLB_FROM_CECR16 (*(struct st_mlb_from_cecr0 *)&MLB.CECR16) /* MLB_FROM_CECR16 */
+#define MLB_FROM_CECR17 (*(struct st_mlb_from_cecr0 *)&MLB.CECR17) /* MLB_FROM_CECR17 */
+#define MLB_FROM_CECR18 (*(struct st_mlb_from_cecr0 *)&MLB.CECR18) /* MLB_FROM_CECR18 */
+#define MLB_FROM_CECR19 (*(struct st_mlb_from_cecr0 *)&MLB.CECR19) /* MLB_FROM_CECR19 */
+#define MLB_FROM_CECR20 (*(struct st_mlb_from_cecr0 *)&MLB.CECR20) /* MLB_FROM_CECR20 */
+#define MLB_FROM_CECR21 (*(struct st_mlb_from_cecr0 *)&MLB.CECR21) /* MLB_FROM_CECR21 */
+#define MLB_FROM_CECR22 (*(struct st_mlb_from_cecr0 *)&MLB.CECR22) /* MLB_FROM_CECR22 */
+#define MLB_FROM_CECR23 (*(struct st_mlb_from_cecr0 *)&MLB.CECR23) /* MLB_FROM_CECR23 */
+#define MLB_FROM_CECR24 (*(struct st_mlb_from_cecr0 *)&MLB.CECR24) /* MLB_FROM_CECR24 */
+#define MLB_FROM_CECR25 (*(struct st_mlb_from_cecr0 *)&MLB.CECR25) /* MLB_FROM_CECR25 */
+#define MLB_FROM_CECR26 (*(struct st_mlb_from_cecr0 *)&MLB.CECR26) /* MLB_FROM_CECR26 */
+#define MLB_FROM_CECR27 (*(struct st_mlb_from_cecr0 *)&MLB.CECR27) /* MLB_FROM_CECR27 */
+#define MLB_FROM_CECR28 (*(struct st_mlb_from_cecr0 *)&MLB.CECR28) /* MLB_FROM_CECR28 */
+#define MLB_FROM_CECR29 (*(struct st_mlb_from_cecr0 *)&MLB.CECR29) /* MLB_FROM_CECR29 */
+#define MLB_FROM_CECR30 (*(struct st_mlb_from_cecr0 *)&MLB.CECR30) /* MLB_FROM_CECR30 */
+
+/* End of channnel array defines of MLB */
+
+
+#define MLBDCCR MLB.DCCR
+#define MLBSSCR MLB.SSCR
+#define MLBSDCR MLB.SDCR
+#define MLBSMCR MLB.SMCR
+#define MLBVCCR MLB.VCCR
+#define MLBSBCR MLB.SBCR
+#define MLBABCR MLB.ABCR
+#define MLBCBCR MLB.CBCR
+#define MLBIBCR MLB.IBCR
+#define MLBCICR MLB.CICR
+#define MLBCECR0 MLB.CECR0
+#define MLBCSCR0 MLB.CSCR0
+#define MLBCCBCR0 MLB.CCBCR0
+#define MLBCNBCR0 MLB.CNBCR0
+#define MLBCECR1 MLB.CECR1
+#define MLBCSCR1 MLB.CSCR1
+#define MLBCCBCR1 MLB.CCBCR1
+#define MLBCNBCR1 MLB.CNBCR1
+#define MLBCECR2 MLB.CECR2
+#define MLBCSCR2 MLB.CSCR2
+#define MLBCCBCR2 MLB.CCBCR2
+#define MLBCNBCR2 MLB.CNBCR2
+#define MLBCECR3 MLB.CECR3
+#define MLBCSCR3 MLB.CSCR3
+#define MLBCCBCR3 MLB.CCBCR3
+#define MLBCNBCR3 MLB.CNBCR3
+#define MLBCECR4 MLB.CECR4
+#define MLBCSCR4 MLB.CSCR4
+#define MLBCCBCR4 MLB.CCBCR4
+#define MLBCNBCR4 MLB.CNBCR4
+#define MLBCECR5 MLB.CECR5
+#define MLBCSCR5 MLB.CSCR5
+#define MLBCCBCR5 MLB.CCBCR5
+#define MLBCNBCR5 MLB.CNBCR5
+#define MLBCECR6 MLB.CECR6
+#define MLBCSCR6 MLB.CSCR6
+#define MLBCCBCR6 MLB.CCBCR6
+#define MLBCNBCR6 MLB.CNBCR6
+#define MLBCECR7 MLB.CECR7
+#define MLBCSCR7 MLB.CSCR7
+#define MLBCCBCR7 MLB.CCBCR7
+#define MLBCNBCR7 MLB.CNBCR7
+#define MLBCECR8 MLB.CECR8
+#define MLBCSCR8 MLB.CSCR8
+#define MLBCCBCR8 MLB.CCBCR8
+#define MLBCNBCR8 MLB.CNBCR8
+#define MLBCECR9 MLB.CECR9
+#define MLBCSCR9 MLB.CSCR9
+#define MLBCCBCR9 MLB.CCBCR9
+#define MLBCNBCR9 MLB.CNBCR9
+#define MLBCECR10 MLB.CECR10
+#define MLBCSCR10 MLB.CSCR10
+#define MLBCCBCR10 MLB.CCBCR10
+#define MLBCNBCR10 MLB.CNBCR10
+#define MLBCECR11 MLB.CECR11
+#define MLBCSCR11 MLB.CSCR11
+#define MLBCCBCR11 MLB.CCBCR11
+#define MLBCNBCR11 MLB.CNBCR11
+#define MLBCECR12 MLB.CECR12
+#define MLBCSCR12 MLB.CSCR12
+#define MLBCCBCR12 MLB.CCBCR12
+#define MLBCNBCR12 MLB.CNBCR12
+#define MLBCECR13 MLB.CECR13
+#define MLBCSCR13 MLB.CSCR13
+#define MLBCCBCR13 MLB.CCBCR13
+#define MLBCNBCR13 MLB.CNBCR13
+#define MLBCECR14 MLB.CECR14
+#define MLBCSCR14 MLB.CSCR14
+#define MLBCCBCR14 MLB.CCBCR14
+#define MLBCNBCR14 MLB.CNBCR14
+#define MLBCECR15 MLB.CECR15
+#define MLBCSCR15 MLB.CSCR15
+#define MLBCCBCR15 MLB.CCBCR15
+#define MLBCNBCR15 MLB.CNBCR15
+#define MLBCECR16 MLB.CECR16
+#define MLBCSCR16 MLB.CSCR16
+#define MLBCCBCR16 MLB.CCBCR16
+#define MLBCNBCR16 MLB.CNBCR16
+#define MLBCECR17 MLB.CECR17
+#define MLBCSCR17 MLB.CSCR17
+#define MLBCCBCR17 MLB.CCBCR17
+#define MLBCNBCR17 MLB.CNBCR17
+#define MLBCECR18 MLB.CECR18
+#define MLBCSCR18 MLB.CSCR18
+#define MLBCCBCR18 MLB.CCBCR18
+#define MLBCNBCR18 MLB.CNBCR18
+#define MLBCECR19 MLB.CECR19
+#define MLBCSCR19 MLB.CSCR19
+#define MLBCCBCR19 MLB.CCBCR19
+#define MLBCNBCR19 MLB.CNBCR19
+#define MLBCECR20 MLB.CECR20
+#define MLBCSCR20 MLB.CSCR20
+#define MLBCCBCR20 MLB.CCBCR20
+#define MLBCNBCR20 MLB.CNBCR20
+#define MLBCECR21 MLB.CECR21
+#define MLBCSCR21 MLB.CSCR21
+#define MLBCCBCR21 MLB.CCBCR21
+#define MLBCNBCR21 MLB.CNBCR21
+#define MLBCECR22 MLB.CECR22
+#define MLBCSCR22 MLB.CSCR22
+#define MLBCCBCR22 MLB.CCBCR22
+#define MLBCNBCR22 MLB.CNBCR22
+#define MLBCECR23 MLB.CECR23
+#define MLBCSCR23 MLB.CSCR23
+#define MLBCCBCR23 MLB.CCBCR23
+#define MLBCNBCR23 MLB.CNBCR23
+#define MLBCECR24 MLB.CECR24
+#define MLBCSCR24 MLB.CSCR24
+#define MLBCCBCR24 MLB.CCBCR24
+#define MLBCNBCR24 MLB.CNBCR24
+#define MLBCECR25 MLB.CECR25
+#define MLBCSCR25 MLB.CSCR25
+#define MLBCCBCR25 MLB.CCBCR25
+#define MLBCNBCR25 MLB.CNBCR25
+#define MLBCECR26 MLB.CECR26
+#define MLBCSCR26 MLB.CSCR26
+#define MLBCCBCR26 MLB.CCBCR26
+#define MLBCNBCR26 MLB.CNBCR26
+#define MLBCECR27 MLB.CECR27
+#define MLBCSCR27 MLB.CSCR27
+#define MLBCCBCR27 MLB.CCBCR27
+#define MLBCNBCR27 MLB.CNBCR27
+#define MLBCECR28 MLB.CECR28
+#define MLBCSCR28 MLB.CSCR28
+#define MLBCCBCR28 MLB.CCBCR28
+#define MLBCNBCR28 MLB.CNBCR28
+#define MLBCECR29 MLB.CECR29
+#define MLBCSCR29 MLB.CSCR29
+#define MLBCCBCR29 MLB.CCBCR29
+#define MLBCNBCR29 MLB.CNBCR29
+#define MLBCECR30 MLB.CECR30
+#define MLBCSCR30 MLB.CSCR30
+#define MLBCCBCR30 MLB.CCBCR30
+#define MLBCNBCR30 MLB.CNBCR30
+#define MLBLCBCR0 MLB.LCBCR0
+#define MLBLCBCR1 MLB.LCBCR1
+#define MLBLCBCR2 MLB.LCBCR2
+#define MLBLCBCR3 MLB.LCBCR3
+#define MLBLCBCR4 MLB.LCBCR4
+#define MLBLCBCR5 MLB.LCBCR5
+#define MLBLCBCR6 MLB.LCBCR6
+#define MLBLCBCR7 MLB.LCBCR7
+#define MLBLCBCR8 MLB.LCBCR8
+#define MLBLCBCR9 MLB.LCBCR9
+#define MLBLCBCR10 MLB.LCBCR10
+#define MLBLCBCR11 MLB.LCBCR11
+#define MLBLCBCR12 MLB.LCBCR12
+#define MLBLCBCR13 MLB.LCBCR13
+#define MLBLCBCR14 MLB.LCBCR14
+#define MLBLCBCR15 MLB.LCBCR15
+#define MLBLCBCR16 MLB.LCBCR16
+#define MLBLCBCR17 MLB.LCBCR17
+#define MLBLCBCR18 MLB.LCBCR18
+#define MLBLCBCR19 MLB.LCBCR19
+#define MLBLCBCR20 MLB.LCBCR20
+#define MLBLCBCR21 MLB.LCBCR21
+#define MLBLCBCR22 MLB.LCBCR22
+#define MLBLCBCR23 MLB.LCBCR23
+#define MLBLCBCR24 MLB.LCBCR24
+#define MLBLCBCR25 MLB.LCBCR25
+#define MLBLCBCR26 MLB.LCBCR26
+#define MLBLCBCR27 MLB.LCBCR27
+#define MLBLCBCR28 MLB.LCBCR28
+#define MLBLCBCR29 MLB.LCBCR29
+#define MLBLCBCR30 MLB.LCBCR30
+/* <-SEC M1.10.1 */
+/* <-QAC 0857 */
+/* <-QAC 0639 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/mmc_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/mmc_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/mmc_iodefine.h	(revision 270)
@@ -0,0 +1,92 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : mmc_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef MMC_IODEFINE_H
+#define MMC_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_mmc
+{                                                          /* MMC              */
+    volatile uint16_t CE_CMD_SETH;                      /*  CE_CMD_SETH */
+    volatile uint16_t CE_CMD_SETL;                      /*  CE_CMD_SETL */
+    volatile uint8_t   dummy182[4];                            /*                  */
+    volatile uint32_t  CE_ARG;                                 /*  CE_ARG          */
+    volatile uint32_t  CE_ARG_CMD12;                           /*  CE_ARG_CMD12    */
+    volatile uint32_t  CE_CMD_CTRL;                            /*  CE_CMD_CTRL     */
+    volatile uint32_t  CE_BLOCK_SET;                           /*  CE_BLOCK_SET    */
+    volatile uint32_t  CE_CLK_CTRL;                            /*  CE_CLK_CTRL     */
+    volatile uint32_t  CE_BUF_ACC;                             /*  CE_BUF_ACC      */
+#define MMC_CE_RESPn_COUNT 4
+    volatile uint32_t  CE_RESP3;                               /*  CE_RESP3        */
+    volatile uint32_t  CE_RESP2;                               /*  CE_RESP2        */
+    volatile uint32_t  CE_RESP1;                               /*  CE_RESP1        */
+    volatile uint32_t  CE_RESP0;                               /*  CE_RESP0        */
+    volatile uint32_t  CE_RESP_CMD12;                          /*  CE_RESP_CMD12   */
+    volatile uint32_t  CE_DATA;                                /*  CE_DATA         */
+    volatile uint8_t   dummy183[8];                            /*                  */
+    volatile uint32_t  CE_INT;                                 /*  CE_INT          */
+    volatile uint32_t  CE_INT_EN;                              /*  CE_INT_EN       */
+    volatile uint32_t  CE_HOST_STS1;                           /*  CE_HOST_STS1    */
+    volatile uint32_t  CE_HOST_STS2;                           /*  CE_HOST_STS2    */
+    volatile uint8_t   dummy184[12];                           /*                  */
+    volatile uint32_t  CE_DMA_MODE;                            /*  CE_DMA_MODE     */
+    volatile uint8_t   dummy185[16];                           /*                  */
+    volatile uint32_t  CE_DETECT;                              /*  CE_DETECT       */
+    volatile uint32_t  CE_ADD_MODE;                            /*  CE_ADD_MODE     */
+    volatile uint8_t   dummy186[4];                            /*                  */
+    volatile uint32_t  CE_VERSION;                             /*  CE_VERSION      */
+};
+
+
+#define MMC     (*(struct st_mmc     *)0xE804C800uL) /* MMC */
+
+
+#define MMCCE_CMD_SETH MMC.CE_CMD_SETH
+#define MMCCE_CMD_SETL MMC.CE_CMD_SETL
+#define MMCCE_ARG MMC.CE_ARG
+#define MMCCE_ARG_CMD12 MMC.CE_ARG_CMD12
+#define MMCCE_CMD_CTRL MMC.CE_CMD_CTRL
+#define MMCCE_BLOCK_SET MMC.CE_BLOCK_SET
+#define MMCCE_CLK_CTRL MMC.CE_CLK_CTRL
+#define MMCCE_BUF_ACC MMC.CE_BUF_ACC
+#define MMCCE_RESP3 MMC.CE_RESP3
+#define MMCCE_RESP2 MMC.CE_RESP2
+#define MMCCE_RESP1 MMC.CE_RESP1
+#define MMCCE_RESP0 MMC.CE_RESP0
+#define MMCCE_RESP_CMD12 MMC.CE_RESP_CMD12
+#define MMCCE_DATA MMC.CE_DATA
+#define MMCCE_INT MMC.CE_INT
+#define MMCCE_INT_EN MMC.CE_INT_EN
+#define MMCCE_HOST_STS1 MMC.CE_HOST_STS1
+#define MMCCE_HOST_STS2 MMC.CE_HOST_STS2
+#define MMCCE_DMA_MODE MMC.CE_DMA_MODE
+#define MMCCE_DETECT MMC.CE_DETECT
+#define MMCCE_ADD_MODE MMC.CE_ADD_MODE
+#define MMCCE_VERSION MMC.CE_VERSION
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/mtu2_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/mtu2_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/mtu2_iodefine.h	(revision 270)
@@ -0,0 +1,217 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : mtu2_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef MTU2_IODEFINE_H
+#define MTU2_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_mtu2
+{                                                          /* MTU2             */
+    volatile uint8_t   TCR_2;                                  /*  TCR_2           */
+    volatile uint8_t   TMDR_2;                                 /*  TMDR_2          */
+    volatile uint8_t   TIOR_2;                                 /*  TIOR_2          */
+    volatile uint8_t   dummy520[1];                            /*                  */
+    volatile uint8_t   TIER_2;                                 /*  TIER_2          */
+    volatile uint8_t   TSR_2;                                  /*  TSR_2           */
+    volatile uint16_t TCNT_2;                                 /*  TCNT_2          */
+    volatile uint16_t TGRA_2;                                 /*  TGRA_2          */
+    volatile uint16_t TGRB_2;                                 /*  TGRB_2          */
+    volatile uint8_t   dummy521[500];                          /*                  */
+    volatile uint8_t   TCR_3;                                  /*  TCR_3           */
+    volatile uint8_t   TCR_4;                                  /*  TCR_4           */
+    volatile uint8_t   TMDR_3;                                 /*  TMDR_3          */
+    volatile uint8_t   TMDR_4;                                 /*  TMDR_4          */
+    volatile uint8_t   TIORH_3;                                /*  TIORH_3         */
+    volatile uint8_t   TIORL_3;                                /*  TIORL_3         */
+    volatile uint8_t   TIORH_4;                                /*  TIORH_4         */
+    volatile uint8_t   TIORL_4;                                /*  TIORL_4         */
+    volatile uint8_t   TIER_3;                                 /*  TIER_3          */
+    volatile uint8_t   TIER_4;                                 /*  TIER_4          */
+    volatile uint8_t   TOER;                                   /*  TOER            */
+    volatile uint8_t   dummy522[2];                            /*                  */
+    volatile uint8_t   TGCR;                                   /*  TGCR            */
+    volatile uint8_t   TOCR1;                                  /*  TOCR1           */
+    volatile uint8_t   TOCR2;                                  /*  TOCR2           */
+    volatile uint16_t TCNT_3;                                 /*  TCNT_3          */
+    volatile uint16_t TCNT_4;                                 /*  TCNT_4          */
+    volatile uint16_t TCDR;                                   /*  TCDR            */
+    volatile uint16_t TDDR;                                   /*  TDDR            */
+    volatile uint16_t TGRA_3;                                 /*  TGRA_3          */
+    volatile uint16_t TGRB_3;                                 /*  TGRB_3          */
+    volatile uint16_t TGRA_4;                                 /*  TGRA_4          */
+    volatile uint16_t TGRB_4;                                 /*  TGRB_4          */
+    volatile uint16_t TCNTS;                                  /*  TCNTS           */
+    volatile uint16_t TCBR;                                   /*  TCBR            */
+    volatile uint16_t TGRC_3;                                 /*  TGRC_3          */
+    volatile uint16_t TGRD_3;                                 /*  TGRD_3          */
+    volatile uint16_t TGRC_4;                                 /*  TGRC_4          */
+    volatile uint16_t TGRD_4;                                 /*  TGRD_4          */
+    volatile uint8_t   TSR_3;                                  /*  TSR_3           */
+    volatile uint8_t   TSR_4;                                  /*  TSR_4           */
+    volatile uint8_t   dummy523[2];                            /*                  */
+    volatile uint8_t   TITCR;                                  /*  TITCR           */
+    volatile uint8_t   TITCNT;                                 /*  TITCNT          */
+    volatile uint8_t   TBTER;                                  /*  TBTER           */
+    volatile uint8_t   dummy524[1];                            /*                  */
+    volatile uint8_t   TDER;                                   /*  TDER            */
+    volatile uint8_t   dummy525[1];                            /*                  */
+    volatile uint8_t   TOLBR;                                  /*  TOLBR           */
+    volatile uint8_t   dummy526[1];                            /*                  */
+    volatile uint8_t   TBTM_3;                                 /*  TBTM_3          */
+    volatile uint8_t   TBTM_4;                                 /*  TBTM_4          */
+    volatile uint8_t   dummy527[6];                            /*                  */
+    volatile uint16_t TADCR;                                  /*  TADCR           */
+    volatile uint8_t   dummy528[2];                            /*                  */
+    volatile uint16_t TADCORA_4;                              /*  TADCORA_4       */
+    volatile uint16_t TADCORB_4;                              /*  TADCORB_4       */
+    volatile uint16_t TADCOBRA_4;                             /*  TADCOBRA_4      */
+    volatile uint16_t TADCOBRB_4;                             /*  TADCOBRB_4      */
+    volatile uint8_t   dummy529[20];                           /*                  */
+    volatile uint8_t   TWCR;                                   /*  TWCR            */
+    volatile uint8_t   dummy530[31];                           /*                  */
+    volatile uint8_t   TSTR;                                   /*  TSTR            */
+    volatile uint8_t   TSYR;                                   /*  TSYR            */
+    volatile uint8_t   dummy531[2];                            /*                  */
+    volatile uint8_t   TRWER;                                  /*  TRWER           */
+    volatile uint8_t   dummy532[123];                          /*                  */
+    volatile uint8_t   TCR_0;                                  /*  TCR_0           */
+    volatile uint8_t   TMDR_0;                                 /*  TMDR_0          */
+    volatile uint8_t   TIORH_0;                                /*  TIORH_0         */
+    volatile uint8_t   TIORL_0;                                /*  TIORL_0         */
+    volatile uint8_t   TIER_0;                                 /*  TIER_0          */
+    volatile uint8_t   TSR_0;                                  /*  TSR_0           */
+    volatile uint16_t TCNT_0;                                 /*  TCNT_0          */
+    volatile uint16_t TGRA_0;                                 /*  TGRA_0          */
+    volatile uint16_t TGRB_0;                                 /*  TGRB_0          */
+    volatile uint16_t TGRC_0;                                 /*  TGRC_0          */
+    volatile uint16_t TGRD_0;                                 /*  TGRD_0          */
+    volatile uint8_t   dummy533[16];                           /*                  */
+    volatile uint16_t TGRE_0;                                 /*  TGRE_0          */
+    volatile uint16_t TGRF_0;                                 /*  TGRF_0          */
+    volatile uint8_t   TIER2_0;                                /*  TIER2_0         */
+    volatile uint8_t   TSR2_0;                                 /*  TSR2_0          */
+    volatile uint8_t   TBTM_0;                                 /*  TBTM_0          */
+    volatile uint8_t   dummy534[89];                           /*                  */
+    volatile uint8_t   TCR_1;                                  /*  TCR_1           */
+    volatile uint8_t   TMDR_1;                                 /*  TMDR_1          */
+    volatile uint8_t   TIOR_1;                                 /*  TIOR_1          */
+    volatile uint8_t   dummy535[1];                            /*                  */
+    volatile uint8_t   TIER_1;                                 /*  TIER_1          */
+    volatile uint8_t   TSR_1;                                  /*  TSR_1           */
+    volatile uint16_t TCNT_1;                                 /*  TCNT_1          */
+    volatile uint16_t TGRA_1;                                 /*  TGRA_1          */
+    volatile uint16_t TGRB_1;                                 /*  TGRB_1          */
+    volatile uint8_t   dummy536[4];                            /*                  */
+    volatile uint8_t   TICCR;                                  /*  TICCR           */
+};
+
+
+#define MTU2    (*(struct st_mtu2    *)0xFCFF0000uL) /* MTU2 */
+
+
+#define MTU2TCR_2 MTU2.TCR_2
+#define MTU2TMDR_2 MTU2.TMDR_2
+#define MTU2TIOR_2 MTU2.TIOR_2
+#define MTU2TIER_2 MTU2.TIER_2
+#define MTU2TSR_2 MTU2.TSR_2
+#define MTU2TCNT_2 MTU2.TCNT_2
+#define MTU2TGRA_2 MTU2.TGRA_2
+#define MTU2TGRB_2 MTU2.TGRB_2
+#define MTU2TCR_3 MTU2.TCR_3
+#define MTU2TCR_4 MTU2.TCR_4
+#define MTU2TMDR_3 MTU2.TMDR_3
+#define MTU2TMDR_4 MTU2.TMDR_4
+#define MTU2TIORH_3 MTU2.TIORH_3
+#define MTU2TIORL_3 MTU2.TIORL_3
+#define MTU2TIORH_4 MTU2.TIORH_4
+#define MTU2TIORL_4 MTU2.TIORL_4
+#define MTU2TIER_3 MTU2.TIER_3
+#define MTU2TIER_4 MTU2.TIER_4
+#define MTU2TOER MTU2.TOER
+#define MTU2TGCR MTU2.TGCR
+#define MTU2TOCR1 MTU2.TOCR1
+#define MTU2TOCR2 MTU2.TOCR2
+#define MTU2TCNT_3 MTU2.TCNT_3
+#define MTU2TCNT_4 MTU2.TCNT_4
+#define MTU2TCDR MTU2.TCDR
+#define MTU2TDDR MTU2.TDDR
+#define MTU2TGRA_3 MTU2.TGRA_3
+#define MTU2TGRB_3 MTU2.TGRB_3
+#define MTU2TGRA_4 MTU2.TGRA_4
+#define MTU2TGRB_4 MTU2.TGRB_4
+#define MTU2TCNTS MTU2.TCNTS
+#define MTU2TCBR MTU2.TCBR
+#define MTU2TGRC_3 MTU2.TGRC_3
+#define MTU2TGRD_3 MTU2.TGRD_3
+#define MTU2TGRC_4 MTU2.TGRC_4
+#define MTU2TGRD_4 MTU2.TGRD_4
+#define MTU2TSR_3 MTU2.TSR_3
+#define MTU2TSR_4 MTU2.TSR_4
+#define MTU2TITCR MTU2.TITCR
+#define MTU2TITCNT MTU2.TITCNT
+#define MTU2TBTER MTU2.TBTER
+#define MTU2TDER MTU2.TDER
+#define MTU2TOLBR MTU2.TOLBR
+#define MTU2TBTM_3 MTU2.TBTM_3
+#define MTU2TBTM_4 MTU2.TBTM_4
+#define MTU2TADCR MTU2.TADCR
+#define MTU2TADCORA_4 MTU2.TADCORA_4
+#define MTU2TADCORB_4 MTU2.TADCORB_4
+#define MTU2TADCOBRA_4 MTU2.TADCOBRA_4
+#define MTU2TADCOBRB_4 MTU2.TADCOBRB_4
+#define MTU2TWCR MTU2.TWCR
+#define MTU2TSTR MTU2.TSTR
+#define MTU2TSYR MTU2.TSYR
+#define MTU2TRWER MTU2.TRWER
+#define MTU2TCR_0 MTU2.TCR_0
+#define MTU2TMDR_0 MTU2.TMDR_0
+#define MTU2TIORH_0 MTU2.TIORH_0
+#define MTU2TIORL_0 MTU2.TIORL_0
+#define MTU2TIER_0 MTU2.TIER_0
+#define MTU2TSR_0 MTU2.TSR_0
+#define MTU2TCNT_0 MTU2.TCNT_0
+#define MTU2TGRA_0 MTU2.TGRA_0
+#define MTU2TGRB_0 MTU2.TGRB_0
+#define MTU2TGRC_0 MTU2.TGRC_0
+#define MTU2TGRD_0 MTU2.TGRD_0
+#define MTU2TGRE_0 MTU2.TGRE_0
+#define MTU2TGRF_0 MTU2.TGRF_0
+#define MTU2TIER2_0 MTU2.TIER2_0
+#define MTU2TSR2_0 MTU2.TSR2_0
+#define MTU2TBTM_0 MTU2.TBTM_0
+#define MTU2TCR_1 MTU2.TCR_1
+#define MTU2TMDR_1 MTU2.TMDR_1
+#define MTU2TIOR_1 MTU2.TIOR_1
+#define MTU2TIER_1 MTU2.TIER_1
+#define MTU2TSR_1 MTU2.TSR_1
+#define MTU2TCNT_1 MTU2.TCNT_1
+#define MTU2TGRA_1 MTU2.TGRA_1
+#define MTU2TGRB_1 MTU2.TGRB_1
+#define MTU2TICCR MTU2.TICCR
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/ostm_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/ostm_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/ostm_iodefine.h	(revision 270)
@@ -0,0 +1,78 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : ostm_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef OSTM_IODEFINE_H
+#define OSTM_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_ostm
+{                                                          /* OSTM             */
+    volatile uint32_t  OSTMnCMP;                               /*  OSTMnCMP        */
+    volatile uint32_t  OSTMnCNT;                               /*  OSTMnCNT        */
+    volatile uint8_t   dummy1[8];                              /*                  */
+    volatile uint8_t   OSTMnTE;                                /*  OSTMnTE         */
+    volatile uint8_t   dummy2[3];                              /*                  */
+    volatile uint8_t   OSTMnTS;                                /*  OSTMnTS         */
+    volatile uint8_t   dummy3[3];                              /*                  */
+    volatile uint8_t   OSTMnTT;                                /*  OSTMnTT         */
+    volatile uint8_t   dummy4[7];                              /*                  */
+    volatile uint8_t   OSTMnCTL;                               /*  OSTMnCTL        */
+};
+
+
+#define OSTM0   (*(struct st_ostm    *)0xFCFEC000uL) /* OSTM0 */
+#define OSTM1   (*(struct st_ostm    *)0xFCFEC400uL) /* OSTM1 */
+
+
+/* Start of channnel array defines of OSTM */
+
+/* Channnel array defines of OSTM */
+/*(Sample) value = OSTM[ channel ]->OSTMnCMP; */
+#define OSTM_COUNT  2
+#define OSTM_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &OSTM0, &OSTM1 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+
+/* End of channnel array defines of OSTM */
+
+
+#define OSTM0CMP OSTM0.OSTMnCMP
+#define OSTM0CNT OSTM0.OSTMnCNT
+#define OSTM0TE OSTM0.OSTMnTE
+#define OSTM0TS OSTM0.OSTMnTS
+#define OSTM0TT OSTM0.OSTMnTT
+#define OSTM0CTL OSTM0.OSTMnCTL
+#define OSTM1CMP OSTM1.OSTMnCMP
+#define OSTM1CNT OSTM1.OSTMnCNT
+#define OSTM1TE OSTM1.OSTMnTE
+#define OSTM1TS OSTM1.OSTMnTS
+#define OSTM1TT OSTM1.OSTMnTT
+#define OSTM1CTL OSTM1.OSTMnCTL
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/pfv_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/pfv_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/pfv_iodefine.h	(revision 270)
@@ -0,0 +1,150 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : pfv_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef PFV_IODEFINE_H
+#define PFV_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_pfv
+{                                                          /* PFV              */
+    volatile uint32_t  PFVCR;                                  /*  PFVCR           */
+    volatile uint32_t  PFVICR;                                 /*  PFVICR          */
+    volatile uint32_t  PFVISR;                                 /*  PFVISR          */
+    volatile uint8_t   dummy1[20];                             /*                  */
+#define PFVID_COUNT 8
+    volatile uint32_t  PFVID0;                                 /*  PFVID0          */
+    volatile uint32_t  PFVID1;                                 /*  PFVID1          */
+    volatile uint32_t  PFVID2;                                 /*  PFVID2          */
+    volatile uint32_t  PFVID3;                                 /*  PFVID3          */
+    volatile uint32_t  PFVID4;                                 /*  PFVID4          */
+    volatile uint32_t  PFVID5;                                 /*  PFVID5          */
+    volatile uint32_t  PFVID6;                                 /*  PFVID6          */
+    volatile uint32_t  PFVID7;                                 /*  PFVID7          */
+#define PFVOD_COUNT 8
+    volatile uint32_t  PFVOD0;                                 /*  PFVOD0          */
+    volatile uint32_t  PFVOD1;                                 /*  PFVOD1          */
+    volatile uint32_t  PFVOD2;                                 /*  PFVOD2          */
+    volatile uint32_t  PFVOD3;                                 /*  PFVOD3          */
+    volatile uint32_t  PFVOD4;                                 /*  PFVOD4          */
+    volatile uint32_t  PFVOD5;                                 /*  PFVOD5          */
+    volatile uint32_t  PFVOD6;                                 /*  PFVOD6          */
+    volatile uint32_t  PFVOD7;                                 /*  PFVOD7          */
+    volatile uint8_t   dummy2[4];                              /*                  */
+    volatile uint32_t  PFVIFSR;                                /*  PFVIFSR         */
+    volatile uint32_t  PFVOFSR;                                /*  PFVOFSR         */
+    volatile uint32_t  PFVACR;                                 /*  PFVACR          */
+    volatile uint32_t  PFV_MTX_MODE;                           /*  PFV_MTX_MODE    */
+    volatile uint32_t  PFV_MTX_YG_ADJ0;                        /*  PFV_MTX_YG_ADJ0 */
+    volatile uint32_t  PFV_MTX_YG_ADJ1;                        /*  PFV_MTX_YG_ADJ1 */
+    volatile uint32_t  PFV_MTX_CBB_ADJ0;                       /*  PFV_MTX_CBB_ADJ0 */
+    volatile uint32_t  PFV_MTX_CBB_ADJ1;                       /*  PFV_MTX_CBB_ADJ1 */
+    volatile uint32_t  PFV_MTX_CRR_ADJ0;                       /*  PFV_MTX_CRR_ADJ0 */
+    volatile uint32_t  PFV_MTX_CRR_ADJ1;                       /*  PFV_MTX_CRR_ADJ1 */
+    volatile uint32_t  PFVSZR;                                 /*  PFVSZR          */
+};
+
+
+#define PFV0    (*(struct st_pfv     *)0xE8205000uL) /* PFV0 */
+#define PFV1    (*(struct st_pfv     *)0xE8205800uL) /* PFV1 */
+
+
+/* Start of channnel array defines of PFV */
+
+/* Channnel array defines of PFV */
+/*(Sample) value = PFV[ channel ]->PFVCR; */
+#define PFV_COUNT  2
+#define PFV_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &PFV0, &PFV1 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+
+/* End of channnel array defines of PFV */
+
+
+#define PFV0PFVCR PFV0.PFVCR
+#define PFV0PFVICR PFV0.PFVICR
+#define PFV0PFVISR PFV0.PFVISR
+#define PFV0PFVID0 PFV0.PFVID0
+#define PFV0PFVID1 PFV0.PFVID1
+#define PFV0PFVID2 PFV0.PFVID2
+#define PFV0PFVID3 PFV0.PFVID3
+#define PFV0PFVID4 PFV0.PFVID4
+#define PFV0PFVID5 PFV0.PFVID5
+#define PFV0PFVID6 PFV0.PFVID6
+#define PFV0PFVID7 PFV0.PFVID7
+#define PFV0PFVOD0 PFV0.PFVOD0
+#define PFV0PFVOD1 PFV0.PFVOD1
+#define PFV0PFVOD2 PFV0.PFVOD2
+#define PFV0PFVOD3 PFV0.PFVOD3
+#define PFV0PFVOD4 PFV0.PFVOD4
+#define PFV0PFVOD5 PFV0.PFVOD5
+#define PFV0PFVOD6 PFV0.PFVOD6
+#define PFV0PFVOD7 PFV0.PFVOD7
+#define PFV0PFVIFSR PFV0.PFVIFSR
+#define PFV0PFVOFSR PFV0.PFVOFSR
+#define PFV0PFVACR PFV0.PFVACR
+#define PFV0PFV_MTX_MODE PFV0.PFV_MTX_MODE
+#define PFV0PFV_MTX_YG_ADJ0 PFV0.PFV_MTX_YG_ADJ0
+#define PFV0PFV_MTX_YG_ADJ1 PFV0.PFV_MTX_YG_ADJ1
+#define PFV0PFV_MTX_CBB_ADJ0 PFV0.PFV_MTX_CBB_ADJ0
+#define PFV0PFV_MTX_CBB_ADJ1 PFV0.PFV_MTX_CBB_ADJ1
+#define PFV0PFV_MTX_CRR_ADJ0 PFV0.PFV_MTX_CRR_ADJ0
+#define PFV0PFV_MTX_CRR_ADJ1 PFV0.PFV_MTX_CRR_ADJ1
+#define PFV0PFVSZR PFV0.PFVSZR
+#define PFV1PFVCR PFV1.PFVCR
+#define PFV1PFVICR PFV1.PFVICR
+#define PFV1PFVISR PFV1.PFVISR
+#define PFV1PFVID0 PFV1.PFVID0
+#define PFV1PFVID1 PFV1.PFVID1
+#define PFV1PFVID2 PFV1.PFVID2
+#define PFV1PFVID3 PFV1.PFVID3
+#define PFV1PFVID4 PFV1.PFVID4
+#define PFV1PFVID5 PFV1.PFVID5
+#define PFV1PFVID6 PFV1.PFVID6
+#define PFV1PFVID7 PFV1.PFVID7
+#define PFV1PFVOD0 PFV1.PFVOD0
+#define PFV1PFVOD1 PFV1.PFVOD1
+#define PFV1PFVOD2 PFV1.PFVOD2
+#define PFV1PFVOD3 PFV1.PFVOD3
+#define PFV1PFVOD4 PFV1.PFVOD4
+#define PFV1PFVOD5 PFV1.PFVOD5
+#define PFV1PFVOD6 PFV1.PFVOD6
+#define PFV1PFVOD7 PFV1.PFVOD7
+#define PFV1PFVIFSR PFV1.PFVIFSR
+#define PFV1PFVOFSR PFV1.PFVOFSR
+#define PFV1PFVACR PFV1.PFVACR
+#define PFV1PFV_MTX_MODE PFV1.PFV_MTX_MODE
+#define PFV1PFV_MTX_YG_ADJ0 PFV1.PFV_MTX_YG_ADJ0
+#define PFV1PFV_MTX_YG_ADJ1 PFV1.PFV_MTX_YG_ADJ1
+#define PFV1PFV_MTX_CBB_ADJ0 PFV1.PFV_MTX_CBB_ADJ0
+#define PFV1PFV_MTX_CBB_ADJ1 PFV1.PFV_MTX_CBB_ADJ1
+#define PFV1PFV_MTX_CRR_ADJ0 PFV1.PFV_MTX_CRR_ADJ0
+#define PFV1PFV_MTX_CRR_ADJ1 PFV1.PFV_MTX_CRR_ADJ1
+#define PFV1PFVSZR PFV1.PFVSZR
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/pwm_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/pwm_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/pwm_iodefine.h	(revision 270)
@@ -0,0 +1,135 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : pwm_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef PWM_IODEFINE_H
+#define PWM_IODEFINE_H
+/* ->MISRA 18.4 : Pack unpack union */ /* ->SEC M1.6.2 */
+/* ->SEC M1.10.1 : Not magic number */
+
+union reg16_8_t
+{
+    volatile uint16_t  UINT16;                                  /*  16-bit Access   */
+    volatile uint8_t   UINT8[2];                                /*  8-bit Access    */
+};
+
+struct st_pwm
+{                                                          /* PWM              */
+    volatile uint8_t   dummy559[2];                            /*                  */
+    union reg16_8_t  PWBTCR;                          /*  PWBTCR      */
+    
+    volatile uint8_t   dummy560[216];                          /*                  */
+    
+/* start of struct st_pwm_common */
+    union reg16_8_t  PWCR_1;                          /*  PWCR_1      */
+    
+    volatile uint8_t   dummy561[2];                            /*                  */
+    union reg16_8_t  PWPR_1;                          /*  PWPR_1      */
+    
+    volatile uint16_t PWCYR_1;                                /*  PWCYR_1         */
+    volatile uint16_t PWBFR_1A;                               /*  PWBFR_1A        */
+    volatile uint16_t PWBFR_1C;                               /*  PWBFR_1C        */
+    volatile uint16_t PWBFR_1E;                               /*  PWBFR_1E        */
+    volatile uint16_t PWBFR_1G;                               /*  PWBFR_1G        */
+/* end of struct st_pwm_common */
+    
+/* start of struct st_pwm_common */
+    union reg16_8_t  PWCR_2;                          /*  PWCR_2      */
+    
+    volatile uint8_t   dummy562[2];                            /*                  */
+    union reg16_8_t  PWPR_2;                          /*  PWPR_2      */
+    
+    volatile uint16_t PWCYR_2;                                /*  PWCYR_2         */
+    volatile uint16_t PWBFR_2A;                               /*  PWBFR_2A        */
+    volatile uint16_t PWBFR_2C;                               /*  PWBFR_2C        */
+    volatile uint16_t PWBFR_2E;                               /*  PWBFR_2E        */
+    volatile uint16_t PWBFR_2G;                               /*  PWBFR_2G        */
+/* end of struct st_pwm_common */
+};
+
+
+struct st_pwm_common
+{
+    union reg16_8_t  PWCR_1;                          /*  PWCR_1      */
+    
+    volatile uint8_t   dummy572[2];                            /*                  */
+    union reg16_8_t  PWPR_1;                          /*  PWPR_1      */
+    
+    volatile uint16_t PWCYR_1;                                /*  PWCYR_1         */
+    volatile uint16_t PWBFR_1A;                               /*  PWBFR_1A        */
+    volatile uint16_t PWBFR_1C;                               /*  PWBFR_1C        */
+    volatile uint16_t PWBFR_1E;                               /*  PWBFR_1E        */
+    volatile uint16_t PWBFR_1G;                               /*  PWBFR_1G        */
+};
+
+
+#define PWM     (*(struct st_pwm     *)0xFCFF5004uL) /* PWM */
+
+
+/* Start of channnel array defines of PWM */
+
+/* Channnel array defines of PWMn */
+/*(Sample) value = PWMn[ channel ]->PWCR_1.UINT16; */
+#define PWMn_COUNT  2
+#define PWMn_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &PWM1, &PWM2 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define PWM1    (*(struct st_pwm_common *)&PWM.PWCR_1)           /* PWM1 */
+#define PWM2    (*(struct st_pwm_common *)&PWM.PWCR_2)           /* PWM2 */
+
+/* End of channnel array defines of PWM */
+
+
+#define PWMPWBTCR PWM.PWBTCR.UINT16
+#define PWMPWBTCR_BYTE_L PWM.PWBTCR.UINT8[0]
+#define PWMPWBTCR_BYTE_H PWM.PWBTCR.UINT8[1]
+#define PWMPWCR_1 PWM.PWCR_1.UINT16
+#define PWMPWCR_1_BYTE_L PWM.PWCR_1.UINT8[0]
+#define PWMPWCR_1_BYTE_H PWM.PWCR_1.UINT8[1]
+#define PWMPWPR_1 PWM.PWPR_1.UINT16
+#define PWMPWPR_1_BYTE_L PWM.PWPR_1.UINT8[0]
+#define PWMPWPR_1_BYTE_H PWM.PWPR_1.UINT8[1]
+#define PWMPWCYR_1 PWM.PWCYR_1
+#define PWMPWBFR_1A PWM.PWBFR_1A
+#define PWMPWBFR_1C PWM.PWBFR_1C
+#define PWMPWBFR_1E PWM.PWBFR_1E
+#define PWMPWBFR_1G PWM.PWBFR_1G
+#define PWMPWCR_2 PWM.PWCR_2.UINT16
+#define PWMPWCR_2_BYTE_L PWM.PWCR_2.UINT8[0]
+#define PWMPWCR_2_BYTE_H PWM.PWCR_2.UINT8[1]
+#define PWMPWPR_2 PWM.PWPR_2.UINT16
+#define PWMPWPR_2_BYTE_L PWM.PWPR_2.UINT8[0]
+#define PWMPWPR_2_BYTE_H PWM.PWPR_2.UINT8[1]
+#define PWMPWCYR_2 PWM.PWCYR_2
+#define PWMPWBFR_2A PWM.PWBFR_2A
+#define PWMPWBFR_2C PWM.PWBFR_2C
+#define PWMPWBFR_2E PWM.PWBFR_2E
+#define PWMPWBFR_2G PWM.PWBFR_2G
+/* <-SEC M1.10.1 */
+/* <-MISRA 18.4 */ /* <-SEC M1.6.2 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/riic_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/riic_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/riic_iodefine.h	(revision 270)
@@ -0,0 +1,556 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : riic_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef RIIC_IODEFINE_H
+#define RIIC_IODEFINE_H
+
+#include "reg32_t.h"
+
+struct st_riic
+{                                                          /* RIIC             */
+#define RIICnCRm_COUNT 2
+    union reg32_t  RIICnCR1;                      /*  RIICnCR1        */
+    union reg32_t  RIICnCR2;                      /*  RIICnCR2        */
+#define RIICnMRm_COUNT 3
+    union reg32_t  RIICnMR1;                      /*  RIICnMR1        */
+    union reg32_t  RIICnMR2;                      /*  RIICnMR2        */
+    union reg32_t  RIICnMR3;                      /*  RIICnMR3        */
+    union reg32_t  RIICnFER;                      /*  RIICnFER        */
+    union reg32_t  RIICnSER;                      /*  RIICnSER        */
+    union reg32_t  RIICnIER;                      /*  RIICnIER        */
+#define RIICnSRm_COUNT 2
+    union reg32_t  RIICnSR1;                      /*  RIICnSR1        */
+    union reg32_t  RIICnSR2;                      /*  RIICnSR2        */
+#define RIICnSARm_COUNT 3
+    union reg32_t  RIICnSAR0;                     /*  RIICnSAR0       */
+    union reg32_t  RIICnSAR1;                     /*  RIICnSAR1       */
+    union reg32_t  RIICnSAR2;                     /*  RIICnSAR2       */
+    union reg32_t  RIICnBRL;                      /*  RIICnBRL        */
+    union reg32_t  RIICnBRH;                      /*  RIICnBRH        */
+    union reg32_t  RIICnDRT;                      /*  RIICnDRT        */
+    union reg32_t  RIICnDRR;                      /*  RIICnDRR        */
+    
+};
+
+
+#define RIIC0   (*(struct st_riic    *)0xFCFEE000uL) /* RIIC0 */
+#define RIIC1   (*(struct st_riic    *)0xFCFEE400uL) /* RIIC1 */
+#define RIIC2   (*(struct st_riic    *)0xFCFEE800uL) /* RIIC2 */
+#define RIIC3   (*(struct st_riic    *)0xFCFEEC00uL) /* RIIC3 */
+
+
+/* Start of channnel array defines of RIIC */
+
+/* Channnel array defines of RIIC */
+/*(Sample) value = RIIC[ channel ]->RIICnCR1.UINT32; */
+#define RIIC_COUNT  4
+#define RIIC_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &RIIC0, &RIIC1, &RIIC2, &RIIC3 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+
+/* End of channnel array defines of RIIC */
+
+
+#define RIIC0CR1 RIIC0.RIICnCR1.UINT32
+#define RIIC0CR1L RIIC0.RIICnCR1.UINT16[L]
+#define RIIC0CR1LL RIIC0.RIICnCR1.UINT8[LL]
+#define RIIC0CR1LH RIIC0.RIICnCR1.UINT8[LH]
+#define RIIC0CR1H RIIC0.RIICnCR1.UINT16[H]
+#define RIIC0CR1HL RIIC0.RIICnCR1.UINT8[HL]
+#define RIIC0CR1HH RIIC0.RIICnCR1.UINT8[HH]
+#define RIIC0CR2 RIIC0.RIICnCR2.UINT32
+#define RIIC0CR2L RIIC0.RIICnCR2.UINT16[L]
+#define RIIC0CR2LL RIIC0.RIICnCR2.UINT8[LL]
+#define RIIC0CR2LH RIIC0.RIICnCR2.UINT8[LH]
+#define RIIC0CR2H RIIC0.RIICnCR2.UINT16[H]
+#define RIIC0CR2HL RIIC0.RIICnCR2.UINT8[HL]
+#define RIIC0CR2HH RIIC0.RIICnCR2.UINT8[HH]
+#define RIIC0MR1 RIIC0.RIICnMR1.UINT32
+#define RIIC0MR1L RIIC0.RIICnMR1.UINT16[L]
+#define RIIC0MR1LL RIIC0.RIICnMR1.UINT8[LL]
+#define RIIC0MR1LH RIIC0.RIICnMR1.UINT8[LH]
+#define RIIC0MR1H RIIC0.RIICnMR1.UINT16[H]
+#define RIIC0MR1HL RIIC0.RIICnMR1.UINT8[HL]
+#define RIIC0MR1HH RIIC0.RIICnMR1.UINT8[HH]
+#define RIIC0MR2 RIIC0.RIICnMR2.UINT32
+#define RIIC0MR2L RIIC0.RIICnMR2.UINT16[L]
+#define RIIC0MR2LL RIIC0.RIICnMR2.UINT8[LL]
+#define RIIC0MR2LH RIIC0.RIICnMR2.UINT8[LH]
+#define RIIC0MR2H RIIC0.RIICnMR2.UINT16[H]
+#define RIIC0MR2HL RIIC0.RIICnMR2.UINT8[HL]
+#define RIIC0MR2HH RIIC0.RIICnMR2.UINT8[HH]
+#define RIIC0MR3 RIIC0.RIICnMR3.UINT32
+#define RIIC0MR3L RIIC0.RIICnMR3.UINT16[L]
+#define RIIC0MR3LL RIIC0.RIICnMR3.UINT8[LL]
+#define RIIC0MR3LH RIIC0.RIICnMR3.UINT8[LH]
+#define RIIC0MR3H RIIC0.RIICnMR3.UINT16[H]
+#define RIIC0MR3HL RIIC0.RIICnMR3.UINT8[HL]
+#define RIIC0MR3HH RIIC0.RIICnMR3.UINT8[HH]
+#define RIIC0FER RIIC0.RIICnFER.UINT32
+#define RIIC0FERL RIIC0.RIICnFER.UINT16[L]
+#define RIIC0FERLL RIIC0.RIICnFER.UINT8[LL]
+#define RIIC0FERLH RIIC0.RIICnFER.UINT8[LH]
+#define RIIC0FERH RIIC0.RIICnFER.UINT16[H]
+#define RIIC0FERHL RIIC0.RIICnFER.UINT8[HL]
+#define RIIC0FERHH RIIC0.RIICnFER.UINT8[HH]
+#define RIIC0SER RIIC0.RIICnSER.UINT32
+#define RIIC0SERL RIIC0.RIICnSER.UINT16[L]
+#define RIIC0SERLL RIIC0.RIICnSER.UINT8[LL]
+#define RIIC0SERLH RIIC0.RIICnSER.UINT8[LH]
+#define RIIC0SERH RIIC0.RIICnSER.UINT16[H]
+#define RIIC0SERHL RIIC0.RIICnSER.UINT8[HL]
+#define RIIC0SERHH RIIC0.RIICnSER.UINT8[HH]
+#define RIIC0IER RIIC0.RIICnIER.UINT32
+#define RIIC0IERL RIIC0.RIICnIER.UINT16[L]
+#define RIIC0IERLL RIIC0.RIICnIER.UINT8[LL]
+#define RIIC0IERLH RIIC0.RIICnIER.UINT8[LH]
+#define RIIC0IERH RIIC0.RIICnIER.UINT16[H]
+#define RIIC0IERHL RIIC0.RIICnIER.UINT8[HL]
+#define RIIC0IERHH RIIC0.RIICnIER.UINT8[HH]
+#define RIIC0SR1 RIIC0.RIICnSR1.UINT32
+#define RIIC0SR1L RIIC0.RIICnSR1.UINT16[L]
+#define RIIC0SR1LL RIIC0.RIICnSR1.UINT8[LL]
+#define RIIC0SR1LH RIIC0.RIICnSR1.UINT8[LH]
+#define RIIC0SR1H RIIC0.RIICnSR1.UINT16[H]
+#define RIIC0SR1HL RIIC0.RIICnSR1.UINT8[HL]
+#define RIIC0SR1HH RIIC0.RIICnSR1.UINT8[HH]
+#define RIIC0SR2 RIIC0.RIICnSR2.UINT32
+#define RIIC0SR2L RIIC0.RIICnSR2.UINT16[L]
+#define RIIC0SR2LL RIIC0.RIICnSR2.UINT8[LL]
+#define RIIC0SR2LH RIIC0.RIICnSR2.UINT8[LH]
+#define RIIC0SR2H RIIC0.RIICnSR2.UINT16[H]
+#define RIIC0SR2HL RIIC0.RIICnSR2.UINT8[HL]
+#define RIIC0SR2HH RIIC0.RIICnSR2.UINT8[HH]
+#define RIIC0SAR0 RIIC0.RIICnSAR0.UINT32
+#define RIIC0SAR0L RIIC0.RIICnSAR0.UINT16[L]
+#define RIIC0SAR0LL RIIC0.RIICnSAR0.UINT8[LL]
+#define RIIC0SAR0LH RIIC0.RIICnSAR0.UINT8[LH]
+#define RIIC0SAR0H RIIC0.RIICnSAR0.UINT16[H]
+#define RIIC0SAR0HL RIIC0.RIICnSAR0.UINT8[HL]
+#define RIIC0SAR0HH RIIC0.RIICnSAR0.UINT8[HH]
+#define RIIC0SAR1 RIIC0.RIICnSAR1.UINT32
+#define RIIC0SAR1L RIIC0.RIICnSAR1.UINT16[L]
+#define RIIC0SAR1LL RIIC0.RIICnSAR1.UINT8[LL]
+#define RIIC0SAR1LH RIIC0.RIICnSAR1.UINT8[LH]
+#define RIIC0SAR1H RIIC0.RIICnSAR1.UINT16[H]
+#define RIIC0SAR1HL RIIC0.RIICnSAR1.UINT8[HL]
+#define RIIC0SAR1HH RIIC0.RIICnSAR1.UINT8[HH]
+#define RIIC0SAR2 RIIC0.RIICnSAR2.UINT32
+#define RIIC0SAR2L RIIC0.RIICnSAR2.UINT16[L]
+#define RIIC0SAR2LL RIIC0.RIICnSAR2.UINT8[LL]
+#define RIIC0SAR2LH RIIC0.RIICnSAR2.UINT8[LH]
+#define RIIC0SAR2H RIIC0.RIICnSAR2.UINT16[H]
+#define RIIC0SAR2HL RIIC0.RIICnSAR2.UINT8[HL]
+#define RIIC0SAR2HH RIIC0.RIICnSAR2.UINT8[HH]
+#define RIIC0BRL RIIC0.RIICnBRL.UINT32
+#define RIIC0BRLL RIIC0.RIICnBRL.UINT16[L]
+#define RIIC0BRLLL RIIC0.RIICnBRL.UINT8[LL]
+#define RIIC0BRLLH RIIC0.RIICnBRL.UINT8[LH]
+#define RIIC0BRLH RIIC0.RIICnBRL.UINT16[H]
+#define RIIC0BRLHL RIIC0.RIICnBRL.UINT8[HL]
+#define RIIC0BRLHH RIIC0.RIICnBRL.UINT8[HH]
+#define RIIC0BRH RIIC0.RIICnBRH.UINT32
+#define RIIC0BRHL RIIC0.RIICnBRH.UINT16[L]
+#define RIIC0BRHLL RIIC0.RIICnBRH.UINT8[LL]
+#define RIIC0BRHLH RIIC0.RIICnBRH.UINT8[LH]
+#define RIIC0BRHH RIIC0.RIICnBRH.UINT16[H]
+#define RIIC0BRHHL RIIC0.RIICnBRH.UINT8[HL]
+#define RIIC0BRHHH RIIC0.RIICnBRH.UINT8[HH]
+#define RIIC0DRT RIIC0.RIICnDRT.UINT32
+#define RIIC0DRTL RIIC0.RIICnDRT.UINT16[L]
+#define RIIC0DRTLL RIIC0.RIICnDRT.UINT8[LL]
+#define RIIC0DRTLH RIIC0.RIICnDRT.UINT8[LH]
+#define RIIC0DRTH RIIC0.RIICnDRT.UINT16[H]
+#define RIIC0DRTHL RIIC0.RIICnDRT.UINT8[HL]
+#define RIIC0DRTHH RIIC0.RIICnDRT.UINT8[HH]
+#define RIIC0DRR RIIC0.RIICnDRR.UINT32
+#define RIIC0DRRL RIIC0.RIICnDRR.UINT16[L]
+#define RIIC0DRRLL RIIC0.RIICnDRR.UINT8[LL]
+#define RIIC0DRRLH RIIC0.RIICnDRR.UINT8[LH]
+#define RIIC0DRRH RIIC0.RIICnDRR.UINT16[H]
+#define RIIC0DRRHL RIIC0.RIICnDRR.UINT8[HL]
+#define RIIC0DRRHH RIIC0.RIICnDRR.UINT8[HH]
+#define RIIC1CR1 RIIC1.RIICnCR1.UINT32
+#define RIIC1CR1L RIIC1.RIICnCR1.UINT16[L]
+#define RIIC1CR1LL RIIC1.RIICnCR1.UINT8[LL]
+#define RIIC1CR1LH RIIC1.RIICnCR1.UINT8[LH]
+#define RIIC1CR1H RIIC1.RIICnCR1.UINT16[H]
+#define RIIC1CR1HL RIIC1.RIICnCR1.UINT8[HL]
+#define RIIC1CR1HH RIIC1.RIICnCR1.UINT8[HH]
+#define RIIC1CR2 RIIC1.RIICnCR2.UINT32
+#define RIIC1CR2L RIIC1.RIICnCR2.UINT16[L]
+#define RIIC1CR2LL RIIC1.RIICnCR2.UINT8[LL]
+#define RIIC1CR2LH RIIC1.RIICnCR2.UINT8[LH]
+#define RIIC1CR2H RIIC1.RIICnCR2.UINT16[H]
+#define RIIC1CR2HL RIIC1.RIICnCR2.UINT8[HL]
+#define RIIC1CR2HH RIIC1.RIICnCR2.UINT8[HH]
+#define RIIC1MR1 RIIC1.RIICnMR1.UINT32
+#define RIIC1MR1L RIIC1.RIICnMR1.UINT16[L]
+#define RIIC1MR1LL RIIC1.RIICnMR1.UINT8[LL]
+#define RIIC1MR1LH RIIC1.RIICnMR1.UINT8[LH]
+#define RIIC1MR1H RIIC1.RIICnMR1.UINT16[H]
+#define RIIC1MR1HL RIIC1.RIICnMR1.UINT8[HL]
+#define RIIC1MR1HH RIIC1.RIICnMR1.UINT8[HH]
+#define RIIC1MR2 RIIC1.RIICnMR2.UINT32
+#define RIIC1MR2L RIIC1.RIICnMR2.UINT16[L]
+#define RIIC1MR2LL RIIC1.RIICnMR2.UINT8[LL]
+#define RIIC1MR2LH RIIC1.RIICnMR2.UINT8[LH]
+#define RIIC1MR2H RIIC1.RIICnMR2.UINT16[H]
+#define RIIC1MR2HL RIIC1.RIICnMR2.UINT8[HL]
+#define RIIC1MR2HH RIIC1.RIICnMR2.UINT8[HH]
+#define RIIC1MR3 RIIC1.RIICnMR3.UINT32
+#define RIIC1MR3L RIIC1.RIICnMR3.UINT16[L]
+#define RIIC1MR3LL RIIC1.RIICnMR3.UINT8[LL]
+#define RIIC1MR3LH RIIC1.RIICnMR3.UINT8[LH]
+#define RIIC1MR3H RIIC1.RIICnMR3.UINT16[H]
+#define RIIC1MR3HL RIIC1.RIICnMR3.UINT8[HL]
+#define RIIC1MR3HH RIIC1.RIICnMR3.UINT8[HH]
+#define RIIC1FER RIIC1.RIICnFER.UINT32
+#define RIIC1FERL RIIC1.RIICnFER.UINT16[L]
+#define RIIC1FERLL RIIC1.RIICnFER.UINT8[LL]
+#define RIIC1FERLH RIIC1.RIICnFER.UINT8[LH]
+#define RIIC1FERH RIIC1.RIICnFER.UINT16[H]
+#define RIIC1FERHL RIIC1.RIICnFER.UINT8[HL]
+#define RIIC1FERHH RIIC1.RIICnFER.UINT8[HH]
+#define RIIC1SER RIIC1.RIICnSER.UINT32
+#define RIIC1SERL RIIC1.RIICnSER.UINT16[L]
+#define RIIC1SERLL RIIC1.RIICnSER.UINT8[LL]
+#define RIIC1SERLH RIIC1.RIICnSER.UINT8[LH]
+#define RIIC1SERH RIIC1.RIICnSER.UINT16[H]
+#define RIIC1SERHL RIIC1.RIICnSER.UINT8[HL]
+#define RIIC1SERHH RIIC1.RIICnSER.UINT8[HH]
+#define RIIC1IER RIIC1.RIICnIER.UINT32
+#define RIIC1IERL RIIC1.RIICnIER.UINT16[L]
+#define RIIC1IERLL RIIC1.RIICnIER.UINT8[LL]
+#define RIIC1IERLH RIIC1.RIICnIER.UINT8[LH]
+#define RIIC1IERH RIIC1.RIICnIER.UINT16[H]
+#define RIIC1IERHL RIIC1.RIICnIER.UINT8[HL]
+#define RIIC1IERHH RIIC1.RIICnIER.UINT8[HH]
+#define RIIC1SR1 RIIC1.RIICnSR1.UINT32
+#define RIIC1SR1L RIIC1.RIICnSR1.UINT16[L]
+#define RIIC1SR1LL RIIC1.RIICnSR1.UINT8[LL]
+#define RIIC1SR1LH RIIC1.RIICnSR1.UINT8[LH]
+#define RIIC1SR1H RIIC1.RIICnSR1.UINT16[H]
+#define RIIC1SR1HL RIIC1.RIICnSR1.UINT8[HL]
+#define RIIC1SR1HH RIIC1.RIICnSR1.UINT8[HH]
+#define RIIC1SR2 RIIC1.RIICnSR2.UINT32
+#define RIIC1SR2L RIIC1.RIICnSR2.UINT16[L]
+#define RIIC1SR2LL RIIC1.RIICnSR2.UINT8[LL]
+#define RIIC1SR2LH RIIC1.RIICnSR2.UINT8[LH]
+#define RIIC1SR2H RIIC1.RIICnSR2.UINT16[H]
+#define RIIC1SR2HL RIIC1.RIICnSR2.UINT8[HL]
+#define RIIC1SR2HH RIIC1.RIICnSR2.UINT8[HH]
+#define RIIC1SAR0 RIIC1.RIICnSAR0.UINT32
+#define RIIC1SAR0L RIIC1.RIICnSAR0.UINT16[L]
+#define RIIC1SAR0LL RIIC1.RIICnSAR0.UINT8[LL]
+#define RIIC1SAR0LH RIIC1.RIICnSAR0.UINT8[LH]
+#define RIIC1SAR0H RIIC1.RIICnSAR0.UINT16[H]
+#define RIIC1SAR0HL RIIC1.RIICnSAR0.UINT8[HL]
+#define RIIC1SAR0HH RIIC1.RIICnSAR0.UINT8[HH]
+#define RIIC1SAR1 RIIC1.RIICnSAR1.UINT32
+#define RIIC1SAR1L RIIC1.RIICnSAR1.UINT16[L]
+#define RIIC1SAR1LL RIIC1.RIICnSAR1.UINT8[LL]
+#define RIIC1SAR1LH RIIC1.RIICnSAR1.UINT8[LH]
+#define RIIC1SAR1H RIIC1.RIICnSAR1.UINT16[H]
+#define RIIC1SAR1HL RIIC1.RIICnSAR1.UINT8[HL]
+#define RIIC1SAR1HH RIIC1.RIICnSAR1.UINT8[HH]
+#define RIIC1SAR2 RIIC1.RIICnSAR2.UINT32
+#define RIIC1SAR2L RIIC1.RIICnSAR2.UINT16[L]
+#define RIIC1SAR2LL RIIC1.RIICnSAR2.UINT8[LL]
+#define RIIC1SAR2LH RIIC1.RIICnSAR2.UINT8[LH]
+#define RIIC1SAR2H RIIC1.RIICnSAR2.UINT16[H]
+#define RIIC1SAR2HL RIIC1.RIICnSAR2.UINT8[HL]
+#define RIIC1SAR2HH RIIC1.RIICnSAR2.UINT8[HH]
+#define RIIC1BRL RIIC1.RIICnBRL.UINT32
+#define RIIC1BRLL RIIC1.RIICnBRL.UINT16[L]
+#define RIIC1BRLLL RIIC1.RIICnBRL.UINT8[LL]
+#define RIIC1BRLLH RIIC1.RIICnBRL.UINT8[LH]
+#define RIIC1BRLH RIIC1.RIICnBRL.UINT16[H]
+#define RIIC1BRLHL RIIC1.RIICnBRL.UINT8[HL]
+#define RIIC1BRLHH RIIC1.RIICnBRL.UINT8[HH]
+#define RIIC1BRH RIIC1.RIICnBRH.UINT32
+#define RIIC1BRHL RIIC1.RIICnBRH.UINT16[L]
+#define RIIC1BRHLL RIIC1.RIICnBRH.UINT8[LL]
+#define RIIC1BRHLH RIIC1.RIICnBRH.UINT8[LH]
+#define RIIC1BRHH RIIC1.RIICnBRH.UINT16[H]
+#define RIIC1BRHHL RIIC1.RIICnBRH.UINT8[HL]
+#define RIIC1BRHHH RIIC1.RIICnBRH.UINT8[HH]
+#define RIIC1DRT RIIC1.RIICnDRT.UINT32
+#define RIIC1DRTL RIIC1.RIICnDRT.UINT16[L]
+#define RIIC1DRTLL RIIC1.RIICnDRT.UINT8[LL]
+#define RIIC1DRTLH RIIC1.RIICnDRT.UINT8[LH]
+#define RIIC1DRTH RIIC1.RIICnDRT.UINT16[H]
+#define RIIC1DRTHL RIIC1.RIICnDRT.UINT8[HL]
+#define RIIC1DRTHH RIIC1.RIICnDRT.UINT8[HH]
+#define RIIC1DRR RIIC1.RIICnDRR.UINT32
+#define RIIC1DRRL RIIC1.RIICnDRR.UINT16[L]
+#define RIIC1DRRLL RIIC1.RIICnDRR.UINT8[LL]
+#define RIIC1DRRLH RIIC1.RIICnDRR.UINT8[LH]
+#define RIIC1DRRH RIIC1.RIICnDRR.UINT16[H]
+#define RIIC1DRRHL RIIC1.RIICnDRR.UINT8[HL]
+#define RIIC1DRRHH RIIC1.RIICnDRR.UINT8[HH]
+#define RIIC2CR1 RIIC2.RIICnCR1.UINT32
+#define RIIC2CR1L RIIC2.RIICnCR1.UINT16[L]
+#define RIIC2CR1LL RIIC2.RIICnCR1.UINT8[LL]
+#define RIIC2CR1LH RIIC2.RIICnCR1.UINT8[LH]
+#define RIIC2CR1H RIIC2.RIICnCR1.UINT16[H]
+#define RIIC2CR1HL RIIC2.RIICnCR1.UINT8[HL]
+#define RIIC2CR1HH RIIC2.RIICnCR1.UINT8[HH]
+#define RIIC2CR2 RIIC2.RIICnCR2.UINT32
+#define RIIC2CR2L RIIC2.RIICnCR2.UINT16[L]
+#define RIIC2CR2LL RIIC2.RIICnCR2.UINT8[LL]
+#define RIIC2CR2LH RIIC2.RIICnCR2.UINT8[LH]
+#define RIIC2CR2H RIIC2.RIICnCR2.UINT16[H]
+#define RIIC2CR2HL RIIC2.RIICnCR2.UINT8[HL]
+#define RIIC2CR2HH RIIC2.RIICnCR2.UINT8[HH]
+#define RIIC2MR1 RIIC2.RIICnMR1.UINT32
+#define RIIC2MR1L RIIC2.RIICnMR1.UINT16[L]
+#define RIIC2MR1LL RIIC2.RIICnMR1.UINT8[LL]
+#define RIIC2MR1LH RIIC2.RIICnMR1.UINT8[LH]
+#define RIIC2MR1H RIIC2.RIICnMR1.UINT16[H]
+#define RIIC2MR1HL RIIC2.RIICnMR1.UINT8[HL]
+#define RIIC2MR1HH RIIC2.RIICnMR1.UINT8[HH]
+#define RIIC2MR2 RIIC2.RIICnMR2.UINT32
+#define RIIC2MR2L RIIC2.RIICnMR2.UINT16[L]
+#define RIIC2MR2LL RIIC2.RIICnMR2.UINT8[LL]
+#define RIIC2MR2LH RIIC2.RIICnMR2.UINT8[LH]
+#define RIIC2MR2H RIIC2.RIICnMR2.UINT16[H]
+#define RIIC2MR2HL RIIC2.RIICnMR2.UINT8[HL]
+#define RIIC2MR2HH RIIC2.RIICnMR2.UINT8[HH]
+#define RIIC2MR3 RIIC2.RIICnMR3.UINT32
+#define RIIC2MR3L RIIC2.RIICnMR3.UINT16[L]
+#define RIIC2MR3LL RIIC2.RIICnMR3.UINT8[LL]
+#define RIIC2MR3LH RIIC2.RIICnMR3.UINT8[LH]
+#define RIIC2MR3H RIIC2.RIICnMR3.UINT16[H]
+#define RIIC2MR3HL RIIC2.RIICnMR3.UINT8[HL]
+#define RIIC2MR3HH RIIC2.RIICnMR3.UINT8[HH]
+#define RIIC2FER RIIC2.RIICnFER.UINT32
+#define RIIC2FERL RIIC2.RIICnFER.UINT16[L]
+#define RIIC2FERLL RIIC2.RIICnFER.UINT8[LL]
+#define RIIC2FERLH RIIC2.RIICnFER.UINT8[LH]
+#define RIIC2FERH RIIC2.RIICnFER.UINT16[H]
+#define RIIC2FERHL RIIC2.RIICnFER.UINT8[HL]
+#define RIIC2FERHH RIIC2.RIICnFER.UINT8[HH]
+#define RIIC2SER RIIC2.RIICnSER.UINT32
+#define RIIC2SERL RIIC2.RIICnSER.UINT16[L]
+#define RIIC2SERLL RIIC2.RIICnSER.UINT8[LL]
+#define RIIC2SERLH RIIC2.RIICnSER.UINT8[LH]
+#define RIIC2SERH RIIC2.RIICnSER.UINT16[H]
+#define RIIC2SERHL RIIC2.RIICnSER.UINT8[HL]
+#define RIIC2SERHH RIIC2.RIICnSER.UINT8[HH]
+#define RIIC2IER RIIC2.RIICnIER.UINT32
+#define RIIC2IERL RIIC2.RIICnIER.UINT16[L]
+#define RIIC2IERLL RIIC2.RIICnIER.UINT8[LL]
+#define RIIC2IERLH RIIC2.RIICnIER.UINT8[LH]
+#define RIIC2IERH RIIC2.RIICnIER.UINT16[H]
+#define RIIC2IERHL RIIC2.RIICnIER.UINT8[HL]
+#define RIIC2IERHH RIIC2.RIICnIER.UINT8[HH]
+#define RIIC2SR1 RIIC2.RIICnSR1.UINT32
+#define RIIC2SR1L RIIC2.RIICnSR1.UINT16[L]
+#define RIIC2SR1LL RIIC2.RIICnSR1.UINT8[LL]
+#define RIIC2SR1LH RIIC2.RIICnSR1.UINT8[LH]
+#define RIIC2SR1H RIIC2.RIICnSR1.UINT16[H]
+#define RIIC2SR1HL RIIC2.RIICnSR1.UINT8[HL]
+#define RIIC2SR1HH RIIC2.RIICnSR1.UINT8[HH]
+#define RIIC2SR2 RIIC2.RIICnSR2.UINT32
+#define RIIC2SR2L RIIC2.RIICnSR2.UINT16[L]
+#define RIIC2SR2LL RIIC2.RIICnSR2.UINT8[LL]
+#define RIIC2SR2LH RIIC2.RIICnSR2.UINT8[LH]
+#define RIIC2SR2H RIIC2.RIICnSR2.UINT16[H]
+#define RIIC2SR2HL RIIC2.RIICnSR2.UINT8[HL]
+#define RIIC2SR2HH RIIC2.RIICnSR2.UINT8[HH]
+#define RIIC2SAR0 RIIC2.RIICnSAR0.UINT32
+#define RIIC2SAR0L RIIC2.RIICnSAR0.UINT16[L]
+#define RIIC2SAR0LL RIIC2.RIICnSAR0.UINT8[LL]
+#define RIIC2SAR0LH RIIC2.RIICnSAR0.UINT8[LH]
+#define RIIC2SAR0H RIIC2.RIICnSAR0.UINT16[H]
+#define RIIC2SAR0HL RIIC2.RIICnSAR0.UINT8[HL]
+#define RIIC2SAR0HH RIIC2.RIICnSAR0.UINT8[HH]
+#define RIIC2SAR1 RIIC2.RIICnSAR1.UINT32
+#define RIIC2SAR1L RIIC2.RIICnSAR1.UINT16[L]
+#define RIIC2SAR1LL RIIC2.RIICnSAR1.UINT8[LL]
+#define RIIC2SAR1LH RIIC2.RIICnSAR1.UINT8[LH]
+#define RIIC2SAR1H RIIC2.RIICnSAR1.UINT16[H]
+#define RIIC2SAR1HL RIIC2.RIICnSAR1.UINT8[HL]
+#define RIIC2SAR1HH RIIC2.RIICnSAR1.UINT8[HH]
+#define RIIC2SAR2 RIIC2.RIICnSAR2.UINT32
+#define RIIC2SAR2L RIIC2.RIICnSAR2.UINT16[L]
+#define RIIC2SAR2LL RIIC2.RIICnSAR2.UINT8[LL]
+#define RIIC2SAR2LH RIIC2.RIICnSAR2.UINT8[LH]
+#define RIIC2SAR2H RIIC2.RIICnSAR2.UINT16[H]
+#define RIIC2SAR2HL RIIC2.RIICnSAR2.UINT8[HL]
+#define RIIC2SAR2HH RIIC2.RIICnSAR2.UINT8[HH]
+#define RIIC2BRL RIIC2.RIICnBRL.UINT32
+#define RIIC2BRLL RIIC2.RIICnBRL.UINT16[L]
+#define RIIC2BRLLL RIIC2.RIICnBRL.UINT8[LL]
+#define RIIC2BRLLH RIIC2.RIICnBRL.UINT8[LH]
+#define RIIC2BRLH RIIC2.RIICnBRL.UINT16[H]
+#define RIIC2BRLHL RIIC2.RIICnBRL.UINT8[HL]
+#define RIIC2BRLHH RIIC2.RIICnBRL.UINT8[HH]
+#define RIIC2BRH RIIC2.RIICnBRH.UINT32
+#define RIIC2BRHL RIIC2.RIICnBRH.UINT16[L]
+#define RIIC2BRHLL RIIC2.RIICnBRH.UINT8[LL]
+#define RIIC2BRHLH RIIC2.RIICnBRH.UINT8[LH]
+#define RIIC2BRHH RIIC2.RIICnBRH.UINT16[H]
+#define RIIC2BRHHL RIIC2.RIICnBRH.UINT8[HL]
+#define RIIC2BRHHH RIIC2.RIICnBRH.UINT8[HH]
+#define RIIC2DRT RIIC2.RIICnDRT.UINT32
+#define RIIC2DRTL RIIC2.RIICnDRT.UINT16[L]
+#define RIIC2DRTLL RIIC2.RIICnDRT.UINT8[LL]
+#define RIIC2DRTLH RIIC2.RIICnDRT.UINT8[LH]
+#define RIIC2DRTH RIIC2.RIICnDRT.UINT16[H]
+#define RIIC2DRTHL RIIC2.RIICnDRT.UINT8[HL]
+#define RIIC2DRTHH RIIC2.RIICnDRT.UINT8[HH]
+#define RIIC2DRR RIIC2.RIICnDRR.UINT32
+#define RIIC2DRRL RIIC2.RIICnDRR.UINT16[L]
+#define RIIC2DRRLL RIIC2.RIICnDRR.UINT8[LL]
+#define RIIC2DRRLH RIIC2.RIICnDRR.UINT8[LH]
+#define RIIC2DRRH RIIC2.RIICnDRR.UINT16[H]
+#define RIIC2DRRHL RIIC2.RIICnDRR.UINT8[HL]
+#define RIIC2DRRHH RIIC2.RIICnDRR.UINT8[HH]
+#define RIIC3CR1 RIIC3.RIICnCR1.UINT32
+#define RIIC3CR1L RIIC3.RIICnCR1.UINT16[L]
+#define RIIC3CR1LL RIIC3.RIICnCR1.UINT8[LL]
+#define RIIC3CR1LH RIIC3.RIICnCR1.UINT8[LH]
+#define RIIC3CR1H RIIC3.RIICnCR1.UINT16[H]
+#define RIIC3CR1HL RIIC3.RIICnCR1.UINT8[HL]
+#define RIIC3CR1HH RIIC3.RIICnCR1.UINT8[HH]
+#define RIIC3CR2 RIIC3.RIICnCR2.UINT32
+#define RIIC3CR2L RIIC3.RIICnCR2.UINT16[L]
+#define RIIC3CR2LL RIIC3.RIICnCR2.UINT8[LL]
+#define RIIC3CR2LH RIIC3.RIICnCR2.UINT8[LH]
+#define RIIC3CR2H RIIC3.RIICnCR2.UINT16[H]
+#define RIIC3CR2HL RIIC3.RIICnCR2.UINT8[HL]
+#define RIIC3CR2HH RIIC3.RIICnCR2.UINT8[HH]
+#define RIIC3MR1 RIIC3.RIICnMR1.UINT32
+#define RIIC3MR1L RIIC3.RIICnMR1.UINT16[L]
+#define RIIC3MR1LL RIIC3.RIICnMR1.UINT8[LL]
+#define RIIC3MR1LH RIIC3.RIICnMR1.UINT8[LH]
+#define RIIC3MR1H RIIC3.RIICnMR1.UINT16[H]
+#define RIIC3MR1HL RIIC3.RIICnMR1.UINT8[HL]
+#define RIIC3MR1HH RIIC3.RIICnMR1.UINT8[HH]
+#define RIIC3MR2 RIIC3.RIICnMR2.UINT32
+#define RIIC3MR2L RIIC3.RIICnMR2.UINT16[L]
+#define RIIC3MR2LL RIIC3.RIICnMR2.UINT8[LL]
+#define RIIC3MR2LH RIIC3.RIICnMR2.UINT8[LH]
+#define RIIC3MR2H RIIC3.RIICnMR2.UINT16[H]
+#define RIIC3MR2HL RIIC3.RIICnMR2.UINT8[HL]
+#define RIIC3MR2HH RIIC3.RIICnMR2.UINT8[HH]
+#define RIIC3MR3 RIIC3.RIICnMR3.UINT32
+#define RIIC3MR3L RIIC3.RIICnMR3.UINT16[L]
+#define RIIC3MR3LL RIIC3.RIICnMR3.UINT8[LL]
+#define RIIC3MR3LH RIIC3.RIICnMR3.UINT8[LH]
+#define RIIC3MR3H RIIC3.RIICnMR3.UINT16[H]
+#define RIIC3MR3HL RIIC3.RIICnMR3.UINT8[HL]
+#define RIIC3MR3HH RIIC3.RIICnMR3.UINT8[HH]
+#define RIIC3FER RIIC3.RIICnFER.UINT32
+#define RIIC3FERL RIIC3.RIICnFER.UINT16[L]
+#define RIIC3FERLL RIIC3.RIICnFER.UINT8[LL]
+#define RIIC3FERLH RIIC3.RIICnFER.UINT8[LH]
+#define RIIC3FERH RIIC3.RIICnFER.UINT16[H]
+#define RIIC3FERHL RIIC3.RIICnFER.UINT8[HL]
+#define RIIC3FERHH RIIC3.RIICnFER.UINT8[HH]
+#define RIIC3SER RIIC3.RIICnSER.UINT32
+#define RIIC3SERL RIIC3.RIICnSER.UINT16[L]
+#define RIIC3SERLL RIIC3.RIICnSER.UINT8[LL]
+#define RIIC3SERLH RIIC3.RIICnSER.UINT8[LH]
+#define RIIC3SERH RIIC3.RIICnSER.UINT16[H]
+#define RIIC3SERHL RIIC3.RIICnSER.UINT8[HL]
+#define RIIC3SERHH RIIC3.RIICnSER.UINT8[HH]
+#define RIIC3IER RIIC3.RIICnIER.UINT32
+#define RIIC3IERL RIIC3.RIICnIER.UINT16[L]
+#define RIIC3IERLL RIIC3.RIICnIER.UINT8[LL]
+#define RIIC3IERLH RIIC3.RIICnIER.UINT8[LH]
+#define RIIC3IERH RIIC3.RIICnIER.UINT16[H]
+#define RIIC3IERHL RIIC3.RIICnIER.UINT8[HL]
+#define RIIC3IERHH RIIC3.RIICnIER.UINT8[HH]
+#define RIIC3SR1 RIIC3.RIICnSR1.UINT32
+#define RIIC3SR1L RIIC3.RIICnSR1.UINT16[L]
+#define RIIC3SR1LL RIIC3.RIICnSR1.UINT8[LL]
+#define RIIC3SR1LH RIIC3.RIICnSR1.UINT8[LH]
+#define RIIC3SR1H RIIC3.RIICnSR1.UINT16[H]
+#define RIIC3SR1HL RIIC3.RIICnSR1.UINT8[HL]
+#define RIIC3SR1HH RIIC3.RIICnSR1.UINT8[HH]
+#define RIIC3SR2 RIIC3.RIICnSR2.UINT32
+#define RIIC3SR2L RIIC3.RIICnSR2.UINT16[L]
+#define RIIC3SR2LL RIIC3.RIICnSR2.UINT8[LL]
+#define RIIC3SR2LH RIIC3.RIICnSR2.UINT8[LH]
+#define RIIC3SR2H RIIC3.RIICnSR2.UINT16[H]
+#define RIIC3SR2HL RIIC3.RIICnSR2.UINT8[HL]
+#define RIIC3SR2HH RIIC3.RIICnSR2.UINT8[HH]
+#define RIIC3SAR0 RIIC3.RIICnSAR0.UINT32
+#define RIIC3SAR0L RIIC3.RIICnSAR0.UINT16[L]
+#define RIIC3SAR0LL RIIC3.RIICnSAR0.UINT8[LL]
+#define RIIC3SAR0LH RIIC3.RIICnSAR0.UINT8[LH]
+#define RIIC3SAR0H RIIC3.RIICnSAR0.UINT16[H]
+#define RIIC3SAR0HL RIIC3.RIICnSAR0.UINT8[HL]
+#define RIIC3SAR0HH RIIC3.RIICnSAR0.UINT8[HH]
+#define RIIC3SAR1 RIIC3.RIICnSAR1.UINT32
+#define RIIC3SAR1L RIIC3.RIICnSAR1.UINT16[L]
+#define RIIC3SAR1LL RIIC3.RIICnSAR1.UINT8[LL]
+#define RIIC3SAR1LH RIIC3.RIICnSAR1.UINT8[LH]
+#define RIIC3SAR1H RIIC3.RIICnSAR1.UINT16[H]
+#define RIIC3SAR1HL RIIC3.RIICnSAR1.UINT8[HL]
+#define RIIC3SAR1HH RIIC3.RIICnSAR1.UINT8[HH]
+#define RIIC3SAR2 RIIC3.RIICnSAR2.UINT32
+#define RIIC3SAR2L RIIC3.RIICnSAR2.UINT16[L]
+#define RIIC3SAR2LL RIIC3.RIICnSAR2.UINT8[LL]
+#define RIIC3SAR2LH RIIC3.RIICnSAR2.UINT8[LH]
+#define RIIC3SAR2H RIIC3.RIICnSAR2.UINT16[H]
+#define RIIC3SAR2HL RIIC3.RIICnSAR2.UINT8[HL]
+#define RIIC3SAR2HH RIIC3.RIICnSAR2.UINT8[HH]
+#define RIIC3BRL RIIC3.RIICnBRL.UINT32
+#define RIIC3BRLL RIIC3.RIICnBRL.UINT16[L]
+#define RIIC3BRLLL RIIC3.RIICnBRL.UINT8[LL]
+#define RIIC3BRLLH RIIC3.RIICnBRL.UINT8[LH]
+#define RIIC3BRLH RIIC3.RIICnBRL.UINT16[H]
+#define RIIC3BRLHL RIIC3.RIICnBRL.UINT8[HL]
+#define RIIC3BRLHH RIIC3.RIICnBRL.UINT8[HH]
+#define RIIC3BRH RIIC3.RIICnBRH.UINT32
+#define RIIC3BRHL RIIC3.RIICnBRH.UINT16[L]
+#define RIIC3BRHLL RIIC3.RIICnBRH.UINT8[LL]
+#define RIIC3BRHLH RIIC3.RIICnBRH.UINT8[LH]
+#define RIIC3BRHH RIIC3.RIICnBRH.UINT16[H]
+#define RIIC3BRHHL RIIC3.RIICnBRH.UINT8[HL]
+#define RIIC3BRHHH RIIC3.RIICnBRH.UINT8[HH]
+#define RIIC3DRT RIIC3.RIICnDRT.UINT32
+#define RIIC3DRTL RIIC3.RIICnDRT.UINT16[L]
+#define RIIC3DRTLL RIIC3.RIICnDRT.UINT8[LL]
+#define RIIC3DRTLH RIIC3.RIICnDRT.UINT8[LH]
+#define RIIC3DRTH RIIC3.RIICnDRT.UINT16[H]
+#define RIIC3DRTHL RIIC3.RIICnDRT.UINT8[HL]
+#define RIIC3DRTHH RIIC3.RIICnDRT.UINT8[HH]
+#define RIIC3DRR RIIC3.RIICnDRR.UINT32
+#define RIIC3DRRL RIIC3.RIICnDRR.UINT16[L]
+#define RIIC3DRRLL RIIC3.RIICnDRR.UINT8[LL]
+#define RIIC3DRRLH RIIC3.RIICnDRR.UINT8[LH]
+#define RIIC3DRRH RIIC3.RIICnDRR.UINT16[H]
+#define RIIC3DRRHL RIIC3.RIICnDRR.UINT8[HL]
+#define RIIC3DRRHH RIIC3.RIICnDRR.UINT8[HH]
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/romdec_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/romdec_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/romdec_iodefine.h	(revision 270)
@@ -0,0 +1,166 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : romdec_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef ROMDEC_IODEFINE_H
+#define ROMDEC_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_romdec
+{                                                          /* ROMDEC           */
+    volatile uint8_t   CROMEN;                                 /*  CROMEN          */
+    volatile uint8_t   CROMSY0;                                /*  CROMSY0         */
+#define ROMDEC_CROMCTL0_COUNT 2
+    volatile uint8_t   CROMCTL0;                               /*  CROMCTL0        */
+    volatile uint8_t   CROMCTL1;                               /*  CROMCTL1        */
+    volatile uint8_t   dummy23[1];                             /*                  */
+    volatile uint8_t   CROMCTL3;                               /*  CROMCTL3        */
+    volatile uint8_t   CROMCTL4;                               /*  CROMCTL4        */
+    volatile uint8_t   CROMCTL5;                               /*  CROMCTL5        */
+#define ROMDEC_CROMST0_COUNT 2
+    volatile uint8_t   CROMST0;                                /*  CROMST0         */
+    volatile uint8_t   CROMST1;                                /*  CROMST1         */
+    volatile uint8_t   dummy24[1];                             /*                  */
+    volatile uint8_t   CROMST3;                                /*  CROMST3         */
+    volatile uint8_t   CROMST4;                                /*  CROMST4         */
+    volatile uint8_t   CROMST5;                                /*  CROMST5         */
+    volatile uint8_t   CROMST6;                                /*  CROMST6         */
+    volatile uint8_t   dummy25[5];                             /*                  */
+#define ROMDEC_CBUFST0_COUNT 3
+    volatile uint8_t   CBUFST0;                                /*  CBUFST0         */
+    volatile uint8_t   CBUFST1;                                /*  CBUFST1         */
+    volatile uint8_t   CBUFST2;                                /*  CBUFST2         */
+    volatile uint8_t   dummy26[1];                             /*                  */
+#define ROMDEC_HEAD00_COUNT 4
+    volatile uint8_t   HEAD00;                                 /*  HEAD00          */
+    volatile uint8_t   HEAD01;                                 /*  HEAD01          */
+    volatile uint8_t   HEAD02;                                 /*  HEAD02          */
+    volatile uint8_t   HEAD03;                                 /*  HEAD03          */
+#define ROMDEC_SHEAD00_COUNT 8
+    volatile uint8_t   SHEAD00;                                /*  SHEAD00         */
+    volatile uint8_t   SHEAD01;                                /*  SHEAD01         */
+    volatile uint8_t   SHEAD02;                                /*  SHEAD02         */
+    volatile uint8_t   SHEAD03;                                /*  SHEAD03         */
+    volatile uint8_t   SHEAD04;                                /*  SHEAD04         */
+    volatile uint8_t   SHEAD05;                                /*  SHEAD05         */
+    volatile uint8_t   SHEAD06;                                /*  SHEAD06         */
+    volatile uint8_t   SHEAD07;                                /*  SHEAD07         */
+#define ROMDEC_HEAD20_COUNT 4
+    volatile uint8_t   HEAD20;                                 /*  HEAD20          */
+    volatile uint8_t   HEAD21;                                 /*  HEAD21          */
+    volatile uint8_t   HEAD22;                                 /*  HEAD22          */
+    volatile uint8_t   HEAD23;                                 /*  HEAD23          */
+#define ROMDEC_SHEAD20_COUNT 8
+    volatile uint8_t   SHEAD20;                                /*  SHEAD20         */
+    volatile uint8_t   SHEAD21;                                /*  SHEAD21         */
+    volatile uint8_t   SHEAD22;                                /*  SHEAD22         */
+    volatile uint8_t   SHEAD23;                                /*  SHEAD23         */
+    volatile uint8_t   SHEAD24;                                /*  SHEAD24         */
+    volatile uint8_t   SHEAD25;                                /*  SHEAD25         */
+    volatile uint8_t   SHEAD26;                                /*  SHEAD26         */
+    volatile uint8_t   SHEAD27;                                /*  SHEAD27         */
+    volatile uint8_t   dummy27[16];                            /*                  */
+#define ROMDEC_CBUFCTL0_COUNT 4
+    volatile uint8_t   CBUFCTL0;                               /*  CBUFCTL0        */
+    volatile uint8_t   CBUFCTL1;                               /*  CBUFCTL1        */
+    volatile uint8_t   CBUFCTL2;                               /*  CBUFCTL2        */
+    volatile uint8_t   CBUFCTL3;                               /*  CBUFCTL3        */
+    volatile uint8_t   dummy28[1];                             /*                  */
+    volatile uint8_t   CROMST0M;                               /*  CROMST0M        */
+    volatile uint8_t   dummy29[186];                           /*                  */
+    volatile uint8_t   ROMDECRST;                              /*  ROMDECRST       */
+    volatile uint8_t   RSTSTAT;                                /*  RSTSTAT         */
+    volatile uint8_t   SSI;                                    /*  SSI             */
+    volatile uint8_t   dummy30[5];                             /*                  */
+    volatile uint8_t   INTHOLD;                                /*  INTHOLD         */
+    volatile uint8_t   INHINT;                                 /*  INHINT          */
+    volatile uint8_t   dummy31[246];                           /*                  */
+#define ROMDEC_STRMDIN0_COUNT 2
+    volatile uint16_t STRMDIN0;                               /*  STRMDIN0        */
+    volatile uint16_t STRMDIN2;                               /*  STRMDIN2        */
+    volatile uint16_t STRMDOUT0;                              /*  STRMDOUT0       */
+};
+
+
+#define ROMDEC  (*(struct st_romdec  *)0xE8005000uL) /* ROMDEC */
+
+
+#define ROMDECCROMEN ROMDEC.CROMEN
+#define ROMDECCROMSY0 ROMDEC.CROMSY0
+#define ROMDECCROMCTL0 ROMDEC.CROMCTL0
+#define ROMDECCROMCTL1 ROMDEC.CROMCTL1
+#define ROMDECCROMCTL3 ROMDEC.CROMCTL3
+#define ROMDECCROMCTL4 ROMDEC.CROMCTL4
+#define ROMDECCROMCTL5 ROMDEC.CROMCTL5
+#define ROMDECCROMST0 ROMDEC.CROMST0
+#define ROMDECCROMST1 ROMDEC.CROMST1
+#define ROMDECCROMST3 ROMDEC.CROMST3
+#define ROMDECCROMST4 ROMDEC.CROMST4
+#define ROMDECCROMST5 ROMDEC.CROMST5
+#define ROMDECCROMST6 ROMDEC.CROMST6
+#define ROMDECCBUFST0 ROMDEC.CBUFST0
+#define ROMDECCBUFST1 ROMDEC.CBUFST1
+#define ROMDECCBUFST2 ROMDEC.CBUFST2
+#define ROMDECHEAD00 ROMDEC.HEAD00
+#define ROMDECHEAD01 ROMDEC.HEAD01
+#define ROMDECHEAD02 ROMDEC.HEAD02
+#define ROMDECHEAD03 ROMDEC.HEAD03
+#define ROMDECSHEAD00 ROMDEC.SHEAD00
+#define ROMDECSHEAD01 ROMDEC.SHEAD01
+#define ROMDECSHEAD02 ROMDEC.SHEAD02
+#define ROMDECSHEAD03 ROMDEC.SHEAD03
+#define ROMDECSHEAD04 ROMDEC.SHEAD04
+#define ROMDECSHEAD05 ROMDEC.SHEAD05
+#define ROMDECSHEAD06 ROMDEC.SHEAD06
+#define ROMDECSHEAD07 ROMDEC.SHEAD07
+#define ROMDECHEAD20 ROMDEC.HEAD20
+#define ROMDECHEAD21 ROMDEC.HEAD21
+#define ROMDECHEAD22 ROMDEC.HEAD22
+#define ROMDECHEAD23 ROMDEC.HEAD23
+#define ROMDECSHEAD20 ROMDEC.SHEAD20
+#define ROMDECSHEAD21 ROMDEC.SHEAD21
+#define ROMDECSHEAD22 ROMDEC.SHEAD22
+#define ROMDECSHEAD23 ROMDEC.SHEAD23
+#define ROMDECSHEAD24 ROMDEC.SHEAD24
+#define ROMDECSHEAD25 ROMDEC.SHEAD25
+#define ROMDECSHEAD26 ROMDEC.SHEAD26
+#define ROMDECSHEAD27 ROMDEC.SHEAD27
+#define ROMDECCBUFCTL0 ROMDEC.CBUFCTL0
+#define ROMDECCBUFCTL1 ROMDEC.CBUFCTL1
+#define ROMDECCBUFCTL2 ROMDEC.CBUFCTL2
+#define ROMDECCBUFCTL3 ROMDEC.CBUFCTL3
+#define ROMDECCROMST0M ROMDEC.CROMST0M
+#define ROMDECROMDECRST ROMDEC.ROMDECRST
+#define ROMDECRSTSTAT ROMDEC.RSTSTAT
+#define ROMDECSSI ROMDEC.SSI
+#define ROMDECINTHOLD ROMDEC.INTHOLD
+#define ROMDECINHINT ROMDEC.INHINT
+#define ROMDECSTRMDIN0 ROMDEC.STRMDIN0
+#define ROMDECSTRMDIN2 ROMDEC.STRMDIN2
+#define ROMDECSTRMDOUT0 ROMDEC.STRMDOUT0
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/rscan0_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/rscan0_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/rscan0_iodefine.h	(revision 270)
@@ -0,0 +1,9038 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : rscan0_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef RSCAN0_IODEFINE_H
+#define RSCAN0_IODEFINE_H
+/* ->QAC 0639 : Over 127 members (C90) */
+/* ->QAC 0857 : Over 1024 #define (C90) */
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_rscan0
+{                                                          /* RSCAN0           */
+/* start of struct st_rscan_from_rscan0cncfg */
+    union iodefine_reg32_t  C0CFG;                         /*  C0CFG           */
+    union iodefine_reg32_t  C0CTR;                         /*  C0CTR           */
+    union iodefine_reg32_t  C0STS;                         /*  C0STS           */
+    union iodefine_reg32_t  C0ERFL;                        /*  C0ERFL          */
+/* end of struct st_rscan_from_rscan0cncfg */
+    
+/* start of struct st_rscan_from_rscan0cncfg */
+    union iodefine_reg32_t  C1CFG;                         /*  C1CFG           */
+    union iodefine_reg32_t  C1CTR;                         /*  C1CTR           */
+    union iodefine_reg32_t  C1STS;                         /*  C1STS           */
+    union iodefine_reg32_t  C1ERFL;                        /*  C1ERFL          */
+/* end of struct st_rscan_from_rscan0cncfg */
+    
+/* start of struct st_rscan_from_rscan0cncfg */
+    union iodefine_reg32_t  C2CFG;                         /*  C2CFG           */
+    union iodefine_reg32_t  C2CTR;                         /*  C2CTR           */
+    union iodefine_reg32_t  C2STS;                         /*  C2STS           */
+    union iodefine_reg32_t  C2ERFL;                        /*  C2ERFL          */
+/* end of struct st_rscan_from_rscan0cncfg */
+    
+/* start of struct st_rscan_from_rscan0cncfg */
+    union iodefine_reg32_t  C3CFG;                         /*  C3CFG           */
+    union iodefine_reg32_t  C3CTR;                         /*  C3CTR           */
+    union iodefine_reg32_t  C3STS;                         /*  C3STS           */
+    union iodefine_reg32_t  C3ERFL;                        /*  C3ERFL          */
+/* end of struct st_rscan_from_rscan0cncfg */
+    
+/* start of struct st_rscan_from_rscan0cncfg */
+    union iodefine_reg32_t  C4CFG;                         /*  C4CFG           */
+    union iodefine_reg32_t  C4CTR;                         /*  C4CTR           */
+    union iodefine_reg32_t  C4STS;                         /*  C4STS           */
+    union iodefine_reg32_t  C4ERFL;                        /*  C4ERFL          */
+/* end of struct st_rscan_from_rscan0cncfg */
+    
+    volatile uint8_t   dummy159[52];                           /*                  */
+    union iodefine_reg32_t  GCFG;                          /*  GCFG            */
+    union iodefine_reg32_t  GCTR;                          /*  GCTR            */
+    union iodefine_reg32_t  GSTS;                          /*  GSTS            */
+    union iodefine_reg32_t  GERFL;                         /*  GERFL           */
+    union iodefine_reg32_16_t  GTSC;                       /*  GTSC            */
+    union iodefine_reg32_t  GAFLECTR;                      /*  GAFLECTR        */
+#define RSCAN0_GAFLCFG0_COUNT 2
+    union iodefine_reg32_t  GAFLCFG0;                      /*  GAFLCFG0        */
+    union iodefine_reg32_t  GAFLCFG1;                      /*  GAFLCFG1        */
+    union iodefine_reg32_t  RMNB;                          /*  RMNB            */
+#define RSCAN0_RMND0_COUNT 3
+    union iodefine_reg32_t  RMND0;                         /*  RMND0           */
+    union iodefine_reg32_t  RMND1;                         /*  RMND1           */
+    union iodefine_reg32_t  RMND2;                         /*  RMND2           */
+    
+    volatile uint8_t   dummy160[4];                            /*                  */
+#define RSCAN0_RFCC0_COUNT 8
+    union iodefine_reg32_t  RFCC0;                         /*  RFCC0           */
+    union iodefine_reg32_t  RFCC1;                         /*  RFCC1           */
+    union iodefine_reg32_t  RFCC2;                         /*  RFCC2           */
+    union iodefine_reg32_t  RFCC3;                         /*  RFCC3           */
+    union iodefine_reg32_t  RFCC4;                         /*  RFCC4           */
+    union iodefine_reg32_t  RFCC5;                         /*  RFCC5           */
+    union iodefine_reg32_t  RFCC6;                         /*  RFCC6           */
+    union iodefine_reg32_t  RFCC7;                         /*  RFCC7           */
+#define RSCAN0_RFSTS0_COUNT 8
+    union iodefine_reg32_t  RFSTS0;                        /*  RFSTS0          */
+    union iodefine_reg32_t  RFSTS1;                        /*  RFSTS1          */
+    union iodefine_reg32_t  RFSTS2;                        /*  RFSTS2          */
+    union iodefine_reg32_t  RFSTS3;                        /*  RFSTS3          */
+    union iodefine_reg32_t  RFSTS4;                        /*  RFSTS4          */
+    union iodefine_reg32_t  RFSTS5;                        /*  RFSTS5          */
+    union iodefine_reg32_t  RFSTS6;                        /*  RFSTS6          */
+    union iodefine_reg32_t  RFSTS7;                        /*  RFSTS7          */
+#define RSCAN0_RFPCTR0_COUNT 8
+    union iodefine_reg32_t  RFPCTR0;                       /*  RFPCTR0         */
+    union iodefine_reg32_t  RFPCTR1;                       /*  RFPCTR1         */
+    union iodefine_reg32_t  RFPCTR2;                       /*  RFPCTR2         */
+    union iodefine_reg32_t  RFPCTR3;                       /*  RFPCTR3         */
+    union iodefine_reg32_t  RFPCTR4;                       /*  RFPCTR4         */
+    union iodefine_reg32_t  RFPCTR5;                       /*  RFPCTR5         */
+    union iodefine_reg32_t  RFPCTR6;                       /*  RFPCTR6         */
+    union iodefine_reg32_t  RFPCTR7;                       /*  RFPCTR7         */
+#define RSCAN0_CFCC0_COUNT 15
+    union iodefine_reg32_t  CFCC0;                         /*  CFCC0           */
+    union iodefine_reg32_t  CFCC1;                         /*  CFCC1           */
+    union iodefine_reg32_t  CFCC2;                         /*  CFCC2           */
+    union iodefine_reg32_t  CFCC3;                         /*  CFCC3           */
+    union iodefine_reg32_t  CFCC4;                         /*  CFCC4           */
+    union iodefine_reg32_t  CFCC5;                         /*  CFCC5           */
+    union iodefine_reg32_t  CFCC6;                         /*  CFCC6           */
+    union iodefine_reg32_t  CFCC7;                         /*  CFCC7           */
+    union iodefine_reg32_t  CFCC8;                         /*  CFCC8           */
+    union iodefine_reg32_t  CFCC9;                         /*  CFCC9           */
+    union iodefine_reg32_t  CFCC10;                        /*  CFCC10          */
+    union iodefine_reg32_t  CFCC11;                        /*  CFCC11          */
+    union iodefine_reg32_t  CFCC12;                        /*  CFCC12          */
+    union iodefine_reg32_t  CFCC13;                        /*  CFCC13          */
+    union iodefine_reg32_t  CFCC14;                        /*  CFCC14          */
+    
+    volatile uint8_t   dummy161[36];                           /*                  */
+#define RSCAN0_CFSTS0_COUNT 15
+    union iodefine_reg32_t  CFSTS0;                        /*  CFSTS0          */
+    union iodefine_reg32_t  CFSTS1;                        /*  CFSTS1          */
+    union iodefine_reg32_t  CFSTS2;                        /*  CFSTS2          */
+    union iodefine_reg32_t  CFSTS3;                        /*  CFSTS3          */
+    union iodefine_reg32_t  CFSTS4;                        /*  CFSTS4          */
+    union iodefine_reg32_t  CFSTS5;                        /*  CFSTS5          */
+    union iodefine_reg32_t  CFSTS6;                        /*  CFSTS6          */
+    union iodefine_reg32_t  CFSTS7;                        /*  CFSTS7          */
+    union iodefine_reg32_t  CFSTS8;                        /*  CFSTS8          */
+    union iodefine_reg32_t  CFSTS9;                        /*  CFSTS9          */
+    union iodefine_reg32_t  CFSTS10;                       /*  CFSTS10         */
+    union iodefine_reg32_t  CFSTS11;                       /*  CFSTS11         */
+    union iodefine_reg32_t  CFSTS12;                       /*  CFSTS12         */
+    union iodefine_reg32_t  CFSTS13;                       /*  CFSTS13         */
+    union iodefine_reg32_t  CFSTS14;                       /*  CFSTS14         */
+    
+    volatile uint8_t   dummy162[36];                           /*                  */
+#define RSCAN0_CFPCTR0_COUNT 15
+    union iodefine_reg32_t  CFPCTR0;                       /*  CFPCTR0         */
+    union iodefine_reg32_t  CFPCTR1;                       /*  CFPCTR1         */
+    union iodefine_reg32_t  CFPCTR2;                       /*  CFPCTR2         */
+    union iodefine_reg32_t  CFPCTR3;                       /*  CFPCTR3         */
+    union iodefine_reg32_t  CFPCTR4;                       /*  CFPCTR4         */
+    union iodefine_reg32_t  CFPCTR5;                       /*  CFPCTR5         */
+    union iodefine_reg32_t  CFPCTR6;                       /*  CFPCTR6         */
+    union iodefine_reg32_t  CFPCTR7;                       /*  CFPCTR7         */
+    union iodefine_reg32_t  CFPCTR8;                       /*  CFPCTR8         */
+    union iodefine_reg32_t  CFPCTR9;                       /*  CFPCTR9         */
+    union iodefine_reg32_t  CFPCTR10;                      /*  CFPCTR10        */
+    union iodefine_reg32_t  CFPCTR11;                      /*  CFPCTR11        */
+    union iodefine_reg32_t  CFPCTR12;                      /*  CFPCTR12        */
+    union iodefine_reg32_t  CFPCTR13;                      /*  CFPCTR13        */
+    union iodefine_reg32_t  CFPCTR14;                      /*  CFPCTR14        */
+    
+    volatile uint8_t   dummy163[36];                           /*                  */
+    union iodefine_reg32_t  FESTS;                         /*  FESTS           */
+    union iodefine_reg32_t  FFSTS;                         /*  FFSTS           */
+    union iodefine_reg32_t  FMSTS;                         /*  FMSTS           */
+    union iodefine_reg32_t  RFISTS;                        /*  RFISTS          */
+    union iodefine_reg32_t  CFRISTS;                       /*  CFRISTS         */
+    union iodefine_reg32_t  CFTISTS;                       /*  CFTISTS         */
+    
+#define RSCAN0_TMC0_COUNT 80
+    volatile uint8_t   TMC0;                                   /*  TMC0            */
+    volatile uint8_t   TMC1;                                   /*  TMC1            */
+    volatile uint8_t   TMC2;                                   /*  TMC2            */
+    volatile uint8_t   TMC3;                                   /*  TMC3            */
+    volatile uint8_t   TMC4;                                   /*  TMC4            */
+    volatile uint8_t   TMC5;                                   /*  TMC5            */
+    volatile uint8_t   TMC6;                                   /*  TMC6            */
+    volatile uint8_t   TMC7;                                   /*  TMC7            */
+    volatile uint8_t   TMC8;                                   /*  TMC8            */
+    volatile uint8_t   TMC9;                                   /*  TMC9            */
+    volatile uint8_t   TMC10;                                  /*  TMC10           */
+    volatile uint8_t   TMC11;                                  /*  TMC11           */
+    volatile uint8_t   TMC12;                                  /*  TMC12           */
+    volatile uint8_t   TMC13;                                  /*  TMC13           */
+    volatile uint8_t   TMC14;                                  /*  TMC14           */
+    volatile uint8_t   TMC15;                                  /*  TMC15           */
+    volatile uint8_t   TMC16;                                  /*  TMC16           */
+    volatile uint8_t   TMC17;                                  /*  TMC17           */
+    volatile uint8_t   TMC18;                                  /*  TMC18           */
+    volatile uint8_t   TMC19;                                  /*  TMC19           */
+    volatile uint8_t   TMC20;                                  /*  TMC20           */
+    volatile uint8_t   TMC21;                                  /*  TMC21           */
+    volatile uint8_t   TMC22;                                  /*  TMC22           */
+    volatile uint8_t   TMC23;                                  /*  TMC23           */
+    volatile uint8_t   TMC24;                                  /*  TMC24           */
+    volatile uint8_t   TMC25;                                  /*  TMC25           */
+    volatile uint8_t   TMC26;                                  /*  TMC26           */
+    volatile uint8_t   TMC27;                                  /*  TMC27           */
+    volatile uint8_t   TMC28;                                  /*  TMC28           */
+    volatile uint8_t   TMC29;                                  /*  TMC29           */
+    volatile uint8_t   TMC30;                                  /*  TMC30           */
+    volatile uint8_t   TMC31;                                  /*  TMC31           */
+    volatile uint8_t   TMC32;                                  /*  TMC32           */
+    volatile uint8_t   TMC33;                                  /*  TMC33           */
+    volatile uint8_t   TMC34;                                  /*  TMC34           */
+    volatile uint8_t   TMC35;                                  /*  TMC35           */
+    volatile uint8_t   TMC36;                                  /*  TMC36           */
+    volatile uint8_t   TMC37;                                  /*  TMC37           */
+    volatile uint8_t   TMC38;                                  /*  TMC38           */
+    volatile uint8_t   TMC39;                                  /*  TMC39           */
+    volatile uint8_t   TMC40;                                  /*  TMC40           */
+    volatile uint8_t   TMC41;                                  /*  TMC41           */
+    volatile uint8_t   TMC42;                                  /*  TMC42           */
+    volatile uint8_t   TMC43;                                  /*  TMC43           */
+    volatile uint8_t   TMC44;                                  /*  TMC44           */
+    volatile uint8_t   TMC45;                                  /*  TMC45           */
+    volatile uint8_t   TMC46;                                  /*  TMC46           */
+    volatile uint8_t   TMC47;                                  /*  TMC47           */
+    volatile uint8_t   TMC48;                                  /*  TMC48           */
+    volatile uint8_t   TMC49;                                  /*  TMC49           */
+    volatile uint8_t   TMC50;                                  /*  TMC50           */
+    volatile uint8_t   TMC51;                                  /*  TMC51           */
+    volatile uint8_t   TMC52;                                  /*  TMC52           */
+    volatile uint8_t   TMC53;                                  /*  TMC53           */
+    volatile uint8_t   TMC54;                                  /*  TMC54           */
+    volatile uint8_t   TMC55;                                  /*  TMC55           */
+    volatile uint8_t   TMC56;                                  /*  TMC56           */
+    volatile uint8_t   TMC57;                                  /*  TMC57           */
+    volatile uint8_t   TMC58;                                  /*  TMC58           */
+    volatile uint8_t   TMC59;                                  /*  TMC59           */
+    volatile uint8_t   TMC60;                                  /*  TMC60           */
+    volatile uint8_t   TMC61;                                  /*  TMC61           */
+    volatile uint8_t   TMC62;                                  /*  TMC62           */
+    volatile uint8_t   TMC63;                                  /*  TMC63           */
+    volatile uint8_t   TMC64;                                  /*  TMC64           */
+    volatile uint8_t   TMC65;                                  /*  TMC65           */
+    volatile uint8_t   TMC66;                                  /*  TMC66           */
+    volatile uint8_t   TMC67;                                  /*  TMC67           */
+    volatile uint8_t   TMC68;                                  /*  TMC68           */
+    volatile uint8_t   TMC69;                                  /*  TMC69           */
+    volatile uint8_t   TMC70;                                  /*  TMC70           */
+    volatile uint8_t   TMC71;                                  /*  TMC71           */
+    volatile uint8_t   TMC72;                                  /*  TMC72           */
+    volatile uint8_t   TMC73;                                  /*  TMC73           */
+    volatile uint8_t   TMC74;                                  /*  TMC74           */
+    volatile uint8_t   TMC75;                                  /*  TMC75           */
+    volatile uint8_t   TMC76;                                  /*  TMC76           */
+    volatile uint8_t   TMC77;                                  /*  TMC77           */
+    volatile uint8_t   TMC78;                                  /*  TMC78           */
+    volatile uint8_t   TMC79;                                  /*  TMC79           */
+    volatile uint8_t   dummy164[48];                           /*                  */
+#define RSCAN0_TMSTS0_COUNT 80
+    volatile uint8_t   TMSTS0;                                 /*  TMSTS0          */
+    volatile uint8_t   TMSTS1;                                 /*  TMSTS1          */
+    volatile uint8_t   TMSTS2;                                 /*  TMSTS2          */
+    volatile uint8_t   TMSTS3;                                 /*  TMSTS3          */
+    volatile uint8_t   TMSTS4;                                 /*  TMSTS4          */
+    volatile uint8_t   TMSTS5;                                 /*  TMSTS5          */
+    volatile uint8_t   TMSTS6;                                 /*  TMSTS6          */
+    volatile uint8_t   TMSTS7;                                 /*  TMSTS7          */
+    volatile uint8_t   TMSTS8;                                 /*  TMSTS8          */
+    volatile uint8_t   TMSTS9;                                 /*  TMSTS9          */
+    volatile uint8_t   TMSTS10;                                /*  TMSTS10         */
+    volatile uint8_t   TMSTS11;                                /*  TMSTS11         */
+    volatile uint8_t   TMSTS12;                                /*  TMSTS12         */
+    volatile uint8_t   TMSTS13;                                /*  TMSTS13         */
+    volatile uint8_t   TMSTS14;                                /*  TMSTS14         */
+    volatile uint8_t   TMSTS15;                                /*  TMSTS15         */
+    volatile uint8_t   TMSTS16;                                /*  TMSTS16         */
+    volatile uint8_t   TMSTS17;                                /*  TMSTS17         */
+    volatile uint8_t   TMSTS18;                                /*  TMSTS18         */
+    volatile uint8_t   TMSTS19;                                /*  TMSTS19         */
+    volatile uint8_t   TMSTS20;                                /*  TMSTS20         */
+    volatile uint8_t   TMSTS21;                                /*  TMSTS21         */
+    volatile uint8_t   TMSTS22;                                /*  TMSTS22         */
+    volatile uint8_t   TMSTS23;                                /*  TMSTS23         */
+    volatile uint8_t   TMSTS24;                                /*  TMSTS24         */
+    volatile uint8_t   TMSTS25;                                /*  TMSTS25         */
+    volatile uint8_t   TMSTS26;                                /*  TMSTS26         */
+    volatile uint8_t   TMSTS27;                                /*  TMSTS27         */
+    volatile uint8_t   TMSTS28;                                /*  TMSTS28         */
+    volatile uint8_t   TMSTS29;                                /*  TMSTS29         */
+    volatile uint8_t   TMSTS30;                                /*  TMSTS30         */
+    volatile uint8_t   TMSTS31;                                /*  TMSTS31         */
+    volatile uint8_t   TMSTS32;                                /*  TMSTS32         */
+    volatile uint8_t   TMSTS33;                                /*  TMSTS33         */
+    volatile uint8_t   TMSTS34;                                /*  TMSTS34         */
+    volatile uint8_t   TMSTS35;                                /*  TMSTS35         */
+    volatile uint8_t   TMSTS36;                                /*  TMSTS36         */
+    volatile uint8_t   TMSTS37;                                /*  TMSTS37         */
+    volatile uint8_t   TMSTS38;                                /*  TMSTS38         */
+    volatile uint8_t   TMSTS39;                                /*  TMSTS39         */
+    volatile uint8_t   TMSTS40;                                /*  TMSTS40         */
+    volatile uint8_t   TMSTS41;                                /*  TMSTS41         */
+    volatile uint8_t   TMSTS42;                                /*  TMSTS42         */
+    volatile uint8_t   TMSTS43;                                /*  TMSTS43         */
+    volatile uint8_t   TMSTS44;                                /*  TMSTS44         */
+    volatile uint8_t   TMSTS45;                                /*  TMSTS45         */
+    volatile uint8_t   TMSTS46;                                /*  TMSTS46         */
+    volatile uint8_t   TMSTS47;                                /*  TMSTS47         */
+    volatile uint8_t   TMSTS48;                                /*  TMSTS48         */
+    volatile uint8_t   TMSTS49;                                /*  TMSTS49         */
+    volatile uint8_t   TMSTS50;                                /*  TMSTS50         */
+    volatile uint8_t   TMSTS51;                                /*  TMSTS51         */
+    volatile uint8_t   TMSTS52;                                /*  TMSTS52         */
+    volatile uint8_t   TMSTS53;                                /*  TMSTS53         */
+    volatile uint8_t   TMSTS54;                                /*  TMSTS54         */
+    volatile uint8_t   TMSTS55;                                /*  TMSTS55         */
+    volatile uint8_t   TMSTS56;                                /*  TMSTS56         */
+    volatile uint8_t   TMSTS57;                                /*  TMSTS57         */
+    volatile uint8_t   TMSTS58;                                /*  TMSTS58         */
+    volatile uint8_t   TMSTS59;                                /*  TMSTS59         */
+    volatile uint8_t   TMSTS60;                                /*  TMSTS60         */
+    volatile uint8_t   TMSTS61;                                /*  TMSTS61         */
+    volatile uint8_t   TMSTS62;                                /*  TMSTS62         */
+    volatile uint8_t   TMSTS63;                                /*  TMSTS63         */
+    volatile uint8_t   TMSTS64;                                /*  TMSTS64         */
+    volatile uint8_t   TMSTS65;                                /*  TMSTS65         */
+    volatile uint8_t   TMSTS66;                                /*  TMSTS66         */
+    volatile uint8_t   TMSTS67;                                /*  TMSTS67         */
+    volatile uint8_t   TMSTS68;                                /*  TMSTS68         */
+    volatile uint8_t   TMSTS69;                                /*  TMSTS69         */
+    volatile uint8_t   TMSTS70;                                /*  TMSTS70         */
+    volatile uint8_t   TMSTS71;                                /*  TMSTS71         */
+    volatile uint8_t   TMSTS72;                                /*  TMSTS72         */
+    volatile uint8_t   TMSTS73;                                /*  TMSTS73         */
+    volatile uint8_t   TMSTS74;                                /*  TMSTS74         */
+    volatile uint8_t   TMSTS75;                                /*  TMSTS75         */
+    volatile uint8_t   TMSTS76;                                /*  TMSTS76         */
+    volatile uint8_t   TMSTS77;                                /*  TMSTS77         */
+    volatile uint8_t   TMSTS78;                                /*  TMSTS78         */
+    volatile uint8_t   TMSTS79;                                /*  TMSTS79         */
+    volatile uint8_t   dummy165[48];                           /*                  */
+#define RSCAN0_TMTRSTS0_COUNT 3
+    union iodefine_reg32_t  TMTRSTS0;                      /*  TMTRSTS0        */
+    union iodefine_reg32_t  TMTRSTS1;                      /*  TMTRSTS1        */
+    union iodefine_reg32_t  TMTRSTS2;                      /*  TMTRSTS2        */
+    
+    volatile uint8_t   dummy166[4];                            /*                  */
+#define RSCAN0_TMTARSTS0_COUNT 3
+    union iodefine_reg32_t  TMTARSTS0;                     /*  TMTARSTS0       */
+    union iodefine_reg32_t  TMTARSTS1;                     /*  TMTARSTS1       */
+    union iodefine_reg32_t  TMTARSTS2;                     /*  TMTARSTS2       */
+    
+    volatile uint8_t   dummy167[4];                            /*                  */
+#define RSCAN0_TMTCSTS0_COUNT 3
+    union iodefine_reg32_t  TMTCSTS0;                      /*  TMTCSTS0        */
+    union iodefine_reg32_t  TMTCSTS1;                      /*  TMTCSTS1        */
+    union iodefine_reg32_t  TMTCSTS2;                      /*  TMTCSTS2        */
+    
+    volatile uint8_t   dummy168[4];                            /*                  */
+#define RSCAN0_TMTASTS0_COUNT 3
+    union iodefine_reg32_t  TMTASTS0;                      /*  TMTASTS0        */
+    union iodefine_reg32_t  TMTASTS1;                      /*  TMTASTS1        */
+    union iodefine_reg32_t  TMTASTS2;                      /*  TMTASTS2        */
+    
+    volatile uint8_t   dummy169[4];                            /*                  */
+#define RSCAN0_TMIEC0_COUNT 3
+    union iodefine_reg32_t  TMIEC0;                        /*  TMIEC0          */
+    union iodefine_reg32_t  TMIEC1;                        /*  TMIEC1          */
+    union iodefine_reg32_t  TMIEC2;                        /*  TMIEC2          */
+    
+    volatile uint8_t   dummy170[4];                            /*                  */
+#define RSCAN0_TXQCC0_COUNT 5
+    union iodefine_reg32_t  TXQCC0;                        /*  TXQCC0          */
+    union iodefine_reg32_t  TXQCC1;                        /*  TXQCC1          */
+    union iodefine_reg32_t  TXQCC2;                        /*  TXQCC2          */
+    union iodefine_reg32_t  TXQCC3;                        /*  TXQCC3          */
+    union iodefine_reg32_t  TXQCC4;                        /*  TXQCC4          */
+    
+    volatile uint8_t   dummy171[12];                           /*                  */
+#define RSCAN0_TXQSTS0_COUNT 5
+    union iodefine_reg32_t  TXQSTS0;                       /*  TXQSTS0         */
+    union iodefine_reg32_t  TXQSTS1;                       /*  TXQSTS1         */
+    union iodefine_reg32_t  TXQSTS2;                       /*  TXQSTS2         */
+    union iodefine_reg32_t  TXQSTS3;                       /*  TXQSTS3         */
+    union iodefine_reg32_t  TXQSTS4;                       /*  TXQSTS4         */
+    
+    volatile uint8_t   dummy172[12];                           /*                  */
+#define RSCAN0_TXQPCTR0_COUNT 5
+    union iodefine_reg32_t  TXQPCTR0;                      /*  TXQPCTR0        */
+    union iodefine_reg32_t  TXQPCTR1;                      /*  TXQPCTR1        */
+    union iodefine_reg32_t  TXQPCTR2;                      /*  TXQPCTR2        */
+    union iodefine_reg32_t  TXQPCTR3;                      /*  TXQPCTR3        */
+    union iodefine_reg32_t  TXQPCTR4;                      /*  TXQPCTR4        */
+    
+    volatile uint8_t   dummy173[12];                           /*                  */
+#define RSCAN0_THLCC0_COUNT 5
+    union iodefine_reg32_t  THLCC0;                        /*  THLCC0          */
+    union iodefine_reg32_t  THLCC1;                        /*  THLCC1          */
+    union iodefine_reg32_t  THLCC2;                        /*  THLCC2          */
+    union iodefine_reg32_t  THLCC3;                        /*  THLCC3          */
+    union iodefine_reg32_t  THLCC4;                        /*  THLCC4          */
+    
+    volatile uint8_t   dummy174[12];                           /*                  */
+#define RSCAN0_THLSTS0_COUNT 5
+    union iodefine_reg32_t  THLSTS0;                       /*  THLSTS0         */
+    union iodefine_reg32_t  THLSTS1;                       /*  THLSTS1         */
+    union iodefine_reg32_t  THLSTS2;                       /*  THLSTS2         */
+    union iodefine_reg32_t  THLSTS3;                       /*  THLSTS3         */
+    union iodefine_reg32_t  THLSTS4;                       /*  THLSTS4         */
+    
+    volatile uint8_t   dummy175[12];                           /*                  */
+#define RSCAN0_THLPCTR0_COUNT 5
+    union iodefine_reg32_t  THLPCTR0;                      /*  THLPCTR0        */
+    union iodefine_reg32_t  THLPCTR1;                      /*  THLPCTR1        */
+    union iodefine_reg32_t  THLPCTR2;                      /*  THLPCTR2        */
+    union iodefine_reg32_t  THLPCTR3;                      /*  THLPCTR3        */
+    union iodefine_reg32_t  THLPCTR4;                      /*  THLPCTR4        */
+    
+    volatile uint8_t   dummy176[12];                           /*                  */
+#define RSCAN0_GTINTSTS0_COUNT 2
+    union iodefine_reg32_t  GTINTSTS0;                     /*  GTINTSTS0       */
+    union iodefine_reg32_t  GTINTSTS1;                     /*  GTINTSTS1       */
+    union iodefine_reg32_t  GTSTCFG;                       /*  GTSTCFG         */
+    union iodefine_reg32_t  GTSTCTR;                       /*  GTSTCTR         */
+    
+    volatile uint8_t   dummy177[12];                           /*                  */
+    union iodefine_reg32_16_t  GLOCKK;                     /*  GLOCKK          */
+    
+    volatile uint8_t   dummy178[128];                          /*                  */
+    
+/* start of struct st_rscan_from_rscan0gaflidj */
+    union iodefine_reg32_t  GAFLID0;                       /*  GAFLID0         */
+    union iodefine_reg32_t  GAFLM0;                        /*  GAFLM0          */
+    union iodefine_reg32_t  GAFLP00;                       /*  GAFLP00         */
+    union iodefine_reg32_t  GAFLP10;                       /*  GAFLP10         */
+/* end of struct st_rscan_from_rscan0gaflidj */
+    
+/* start of struct st_rscan_from_rscan0gaflidj */
+    union iodefine_reg32_t  GAFLID1;                       /*  GAFLID1         */
+    union iodefine_reg32_t  GAFLM1;                        /*  GAFLM1          */
+    union iodefine_reg32_t  GAFLP01;                       /*  GAFLP01         */
+    union iodefine_reg32_t  GAFLP11;                       /*  GAFLP11         */
+/* end of struct st_rscan_from_rscan0gaflidj */
+    
+/* start of struct st_rscan_from_rscan0gaflidj */
+    union iodefine_reg32_t  GAFLID2;                       /*  GAFLID2         */
+    union iodefine_reg32_t  GAFLM2;                        /*  GAFLM2          */
+    union iodefine_reg32_t  GAFLP02;                       /*  GAFLP02         */
+    union iodefine_reg32_t  GAFLP12;                       /*  GAFLP12         */
+/* end of struct st_rscan_from_rscan0gaflidj */
+    
+/* start of struct st_rscan_from_rscan0gaflidj */
+    union iodefine_reg32_t  GAFLID3;                       /*  GAFLID3         */
+    union iodefine_reg32_t  GAFLM3;                        /*  GAFLM3          */
+    union iodefine_reg32_t  GAFLP03;                       /*  GAFLP03         */
+    union iodefine_reg32_t  GAFLP13;                       /*  GAFLP13         */
+/* end of struct st_rscan_from_rscan0gaflidj */
+    
+/* start of struct st_rscan_from_rscan0gaflidj */
+    union iodefine_reg32_t  GAFLID4;                       /*  GAFLID4         */
+    union iodefine_reg32_t  GAFLM4;                        /*  GAFLM4          */
+    union iodefine_reg32_t  GAFLP04;                       /*  GAFLP04         */
+    union iodefine_reg32_t  GAFLP14;                       /*  GAFLP14         */
+/* end of struct st_rscan_from_rscan0gaflidj */
+    
+/* start of struct st_rscan_from_rscan0gaflidj */
+    union iodefine_reg32_t  GAFLID5;                       /*  GAFLID5         */
+    union iodefine_reg32_t  GAFLM5;                        /*  GAFLM5          */
+    union iodefine_reg32_t  GAFLP05;                       /*  GAFLP05         */
+    union iodefine_reg32_t  GAFLP15;                       /*  GAFLP15         */
+/* end of struct st_rscan_from_rscan0gaflidj */
+    
+/* start of struct st_rscan_from_rscan0gaflidj */
+    union iodefine_reg32_t  GAFLID6;                       /*  GAFLID6         */
+    union iodefine_reg32_t  GAFLM6;                        /*  GAFLM6          */
+    union iodefine_reg32_t  GAFLP06;                       /*  GAFLP06         */
+    union iodefine_reg32_t  GAFLP16;                       /*  GAFLP16         */
+/* end of struct st_rscan_from_rscan0gaflidj */
+    
+/* start of struct st_rscan_from_rscan0gaflidj */
+    union iodefine_reg32_t  GAFLID7;                       /*  GAFLID7         */
+    union iodefine_reg32_t  GAFLM7;                        /*  GAFLM7          */
+    union iodefine_reg32_t  GAFLP07;                       /*  GAFLP07         */
+    union iodefine_reg32_t  GAFLP17;                       /*  GAFLP17         */
+/* end of struct st_rscan_from_rscan0gaflidj */
+    
+/* start of struct st_rscan_from_rscan0gaflidj */
+    union iodefine_reg32_t  GAFLID8;                       /*  GAFLID8         */
+    union iodefine_reg32_t  GAFLM8;                        /*  GAFLM8          */
+    union iodefine_reg32_t  GAFLP08;                       /*  GAFLP08         */
+    union iodefine_reg32_t  GAFLP18;                       /*  GAFLP18         */
+/* end of struct st_rscan_from_rscan0gaflidj */
+    
+/* start of struct st_rscan_from_rscan0gaflidj */
+    union iodefine_reg32_t  GAFLID9;                       /*  GAFLID9         */
+    union iodefine_reg32_t  GAFLM9;                        /*  GAFLM9          */
+    union iodefine_reg32_t  GAFLP09;                       /*  GAFLP09         */
+    union iodefine_reg32_t  GAFLP19;                       /*  GAFLP19         */
+/* end of struct st_rscan_from_rscan0gaflidj */
+    
+/* start of struct st_rscan_from_rscan0gaflidj */
+    union iodefine_reg32_t  GAFLID10;                      /*  GAFLID10        */
+    union iodefine_reg32_t  GAFLM10;                       /*  GAFLM10         */
+    union iodefine_reg32_t  GAFLP010;                      /*  GAFLP010        */
+    union iodefine_reg32_t  GAFLP110;                      /*  GAFLP110        */
+/* end of struct st_rscan_from_rscan0gaflidj */
+    
+/* start of struct st_rscan_from_rscan0gaflidj */
+    union iodefine_reg32_t  GAFLID11;                      /*  GAFLID11        */
+    union iodefine_reg32_t  GAFLM11;                       /*  GAFLM11         */
+    union iodefine_reg32_t  GAFLP011;                      /*  GAFLP011        */
+    union iodefine_reg32_t  GAFLP111;                      /*  GAFLP111        */
+/* end of struct st_rscan_from_rscan0gaflidj */
+    
+/* start of struct st_rscan_from_rscan0gaflidj */
+    union iodefine_reg32_t  GAFLID12;                      /*  GAFLID12        */
+    union iodefine_reg32_t  GAFLM12;                       /*  GAFLM12         */
+    union iodefine_reg32_t  GAFLP012;                      /*  GAFLP012        */
+    union iodefine_reg32_t  GAFLP112;                      /*  GAFLP112        */
+/* end of struct st_rscan_from_rscan0gaflidj */
+    
+/* start of struct st_rscan_from_rscan0gaflidj */
+    union iodefine_reg32_t  GAFLID13;                      /*  GAFLID13        */
+    union iodefine_reg32_t  GAFLM13;                       /*  GAFLM13         */
+    union iodefine_reg32_t  GAFLP013;                      /*  GAFLP013        */
+    union iodefine_reg32_t  GAFLP113;                      /*  GAFLP113        */
+/* end of struct st_rscan_from_rscan0gaflidj */
+    
+/* start of struct st_rscan_from_rscan0gaflidj */
+    union iodefine_reg32_t  GAFLID14;                      /*  GAFLID14        */
+    union iodefine_reg32_t  GAFLM14;                       /*  GAFLM14         */
+    union iodefine_reg32_t  GAFLP014;                      /*  GAFLP014        */
+    union iodefine_reg32_t  GAFLP114;                      /*  GAFLP114        */
+/* end of struct st_rscan_from_rscan0gaflidj */
+    
+/* start of struct st_rscan_from_rscan0gaflidj */
+    union iodefine_reg32_t  GAFLID15;                      /*  GAFLID15        */
+    union iodefine_reg32_t  GAFLM15;                       /*  GAFLM15         */
+    union iodefine_reg32_t  GAFLP015;                      /*  GAFLP015        */
+    union iodefine_reg32_t  GAFLP115;                      /*  GAFLP115        */
+/* end of struct st_rscan_from_rscan0gaflidj */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID0;                         /*  RMID0           */
+    union iodefine_reg32_t  RMPTR0;                        /*  RMPTR0          */
+    union iodefine_reg32_t  RMDF00;                        /*  RMDF00          */
+    union iodefine_reg32_t  RMDF10;                        /*  RMDF10          */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID1;                         /*  RMID1           */
+    union iodefine_reg32_t  RMPTR1;                        /*  RMPTR1          */
+    union iodefine_reg32_t  RMDF01;                        /*  RMDF01          */
+    union iodefine_reg32_t  RMDF11;                        /*  RMDF11          */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID2;                         /*  RMID2           */
+    union iodefine_reg32_t  RMPTR2;                        /*  RMPTR2          */
+    union iodefine_reg32_t  RMDF02;                        /*  RMDF02          */
+    union iodefine_reg32_t  RMDF12;                        /*  RMDF12          */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID3;                         /*  RMID3           */
+    union iodefine_reg32_t  RMPTR3;                        /*  RMPTR3          */
+    union iodefine_reg32_t  RMDF03;                        /*  RMDF03          */
+    union iodefine_reg32_t  RMDF13;                        /*  RMDF13          */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID4;                         /*  RMID4           */
+    union iodefine_reg32_t  RMPTR4;                        /*  RMPTR4          */
+    union iodefine_reg32_t  RMDF04;                        /*  RMDF04          */
+    union iodefine_reg32_t  RMDF14;                        /*  RMDF14          */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID5;                         /*  RMID5           */
+    union iodefine_reg32_t  RMPTR5;                        /*  RMPTR5          */
+    union iodefine_reg32_t  RMDF05;                        /*  RMDF05          */
+    union iodefine_reg32_t  RMDF15;                        /*  RMDF15          */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID6;                         /*  RMID6           */
+    union iodefine_reg32_t  RMPTR6;                        /*  RMPTR6          */
+    union iodefine_reg32_t  RMDF06;                        /*  RMDF06          */
+    union iodefine_reg32_t  RMDF16;                        /*  RMDF16          */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID7;                         /*  RMID7           */
+    union iodefine_reg32_t  RMPTR7;                        /*  RMPTR7          */
+    union iodefine_reg32_t  RMDF07;                        /*  RMDF07          */
+    union iodefine_reg32_t  RMDF17;                        /*  RMDF17          */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID8;                         /*  RMID8           */
+    union iodefine_reg32_t  RMPTR8;                        /*  RMPTR8          */
+    union iodefine_reg32_t  RMDF08;                        /*  RMDF08          */
+    union iodefine_reg32_t  RMDF18;                        /*  RMDF18          */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID9;                         /*  RMID9           */
+    union iodefine_reg32_t  RMPTR9;                        /*  RMPTR9          */
+    union iodefine_reg32_t  RMDF09;                        /*  RMDF09          */
+    union iodefine_reg32_t  RMDF19;                        /*  RMDF19          */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID10;                        /*  RMID10          */
+    union iodefine_reg32_t  RMPTR10;                       /*  RMPTR10         */
+    union iodefine_reg32_t  RMDF010;                       /*  RMDF010         */
+    union iodefine_reg32_t  RMDF110;                       /*  RMDF110         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID11;                        /*  RMID11          */
+    union iodefine_reg32_t  RMPTR11;                       /*  RMPTR11         */
+    union iodefine_reg32_t  RMDF011;                       /*  RMDF011         */
+    union iodefine_reg32_t  RMDF111;                       /*  RMDF111         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID12;                        /*  RMID12          */
+    union iodefine_reg32_t  RMPTR12;                       /*  RMPTR12         */
+    union iodefine_reg32_t  RMDF012;                       /*  RMDF012         */
+    union iodefine_reg32_t  RMDF112;                       /*  RMDF112         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID13;                        /*  RMID13          */
+    union iodefine_reg32_t  RMPTR13;                       /*  RMPTR13         */
+    union iodefine_reg32_t  RMDF013;                       /*  RMDF013         */
+    union iodefine_reg32_t  RMDF113;                       /*  RMDF113         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID14;                        /*  RMID14          */
+    union iodefine_reg32_t  RMPTR14;                       /*  RMPTR14         */
+    union iodefine_reg32_t  RMDF014;                       /*  RMDF014         */
+    union iodefine_reg32_t  RMDF114;                       /*  RMDF114         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID15;                        /*  RMID15          */
+    union iodefine_reg32_t  RMPTR15;                       /*  RMPTR15         */
+    union iodefine_reg32_t  RMDF015;                       /*  RMDF015         */
+    union iodefine_reg32_t  RMDF115;                       /*  RMDF115         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID16;                        /*  RMID16          */
+    union iodefine_reg32_t  RMPTR16;                       /*  RMPTR16         */
+    union iodefine_reg32_t  RMDF016;                       /*  RMDF016         */
+    union iodefine_reg32_t  RMDF116;                       /*  RMDF116         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID17;                        /*  RMID17          */
+    union iodefine_reg32_t  RMPTR17;                       /*  RMPTR17         */
+    union iodefine_reg32_t  RMDF017;                       /*  RMDF017         */
+    union iodefine_reg32_t  RMDF117;                       /*  RMDF117         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID18;                        /*  RMID18          */
+    union iodefine_reg32_t  RMPTR18;                       /*  RMPTR18         */
+    union iodefine_reg32_t  RMDF018;                       /*  RMDF018         */
+    union iodefine_reg32_t  RMDF118;                       /*  RMDF118         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID19;                        /*  RMID19          */
+    union iodefine_reg32_t  RMPTR19;                       /*  RMPTR19         */
+    union iodefine_reg32_t  RMDF019;                       /*  RMDF019         */
+    union iodefine_reg32_t  RMDF119;                       /*  RMDF119         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID20;                        /*  RMID20          */
+    union iodefine_reg32_t  RMPTR20;                       /*  RMPTR20         */
+    union iodefine_reg32_t  RMDF020;                       /*  RMDF020         */
+    union iodefine_reg32_t  RMDF120;                       /*  RMDF120         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID21;                        /*  RMID21          */
+    union iodefine_reg32_t  RMPTR21;                       /*  RMPTR21         */
+    union iodefine_reg32_t  RMDF021;                       /*  RMDF021         */
+    union iodefine_reg32_t  RMDF121;                       /*  RMDF121         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID22;                        /*  RMID22          */
+    union iodefine_reg32_t  RMPTR22;                       /*  RMPTR22         */
+    union iodefine_reg32_t  RMDF022;                       /*  RMDF022         */
+    union iodefine_reg32_t  RMDF122;                       /*  RMDF122         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID23;                        /*  RMID23          */
+    union iodefine_reg32_t  RMPTR23;                       /*  RMPTR23         */
+    union iodefine_reg32_t  RMDF023;                       /*  RMDF023         */
+    union iodefine_reg32_t  RMDF123;                       /*  RMDF123         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID24;                        /*  RMID24          */
+    union iodefine_reg32_t  RMPTR24;                       /*  RMPTR24         */
+    union iodefine_reg32_t  RMDF024;                       /*  RMDF024         */
+    union iodefine_reg32_t  RMDF124;                       /*  RMDF124         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID25;                        /*  RMID25          */
+    union iodefine_reg32_t  RMPTR25;                       /*  RMPTR25         */
+    union iodefine_reg32_t  RMDF025;                       /*  RMDF025         */
+    union iodefine_reg32_t  RMDF125;                       /*  RMDF125         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID26;                        /*  RMID26          */
+    union iodefine_reg32_t  RMPTR26;                       /*  RMPTR26         */
+    union iodefine_reg32_t  RMDF026;                       /*  RMDF026         */
+    union iodefine_reg32_t  RMDF126;                       /*  RMDF126         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID27;                        /*  RMID27          */
+    union iodefine_reg32_t  RMPTR27;                       /*  RMPTR27         */
+    union iodefine_reg32_t  RMDF027;                       /*  RMDF027         */
+    union iodefine_reg32_t  RMDF127;                       /*  RMDF127         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID28;                        /*  RMID28          */
+    union iodefine_reg32_t  RMPTR28;                       /*  RMPTR28         */
+    union iodefine_reg32_t  RMDF028;                       /*  RMDF028         */
+    union iodefine_reg32_t  RMDF128;                       /*  RMDF128         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID29;                        /*  RMID29          */
+    union iodefine_reg32_t  RMPTR29;                       /*  RMPTR29         */
+    union iodefine_reg32_t  RMDF029;                       /*  RMDF029         */
+    union iodefine_reg32_t  RMDF129;                       /*  RMDF129         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID30;                        /*  RMID30          */
+    union iodefine_reg32_t  RMPTR30;                       /*  RMPTR30         */
+    union iodefine_reg32_t  RMDF030;                       /*  RMDF030         */
+    union iodefine_reg32_t  RMDF130;                       /*  RMDF130         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID31;                        /*  RMID31          */
+    union iodefine_reg32_t  RMPTR31;                       /*  RMPTR31         */
+    union iodefine_reg32_t  RMDF031;                       /*  RMDF031         */
+    union iodefine_reg32_t  RMDF131;                       /*  RMDF131         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID32;                        /*  RMID32          */
+    union iodefine_reg32_t  RMPTR32;                       /*  RMPTR32         */
+    union iodefine_reg32_t  RMDF032;                       /*  RMDF032         */
+    union iodefine_reg32_t  RMDF132;                       /*  RMDF132         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID33;                        /*  RMID33          */
+    union iodefine_reg32_t  RMPTR33;                       /*  RMPTR33         */
+    union iodefine_reg32_t  RMDF033;                       /*  RMDF033         */
+    union iodefine_reg32_t  RMDF133;                       /*  RMDF133         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID34;                        /*  RMID34          */
+    union iodefine_reg32_t  RMPTR34;                       /*  RMPTR34         */
+    union iodefine_reg32_t  RMDF034;                       /*  RMDF034         */
+    union iodefine_reg32_t  RMDF134;                       /*  RMDF134         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID35;                        /*  RMID35          */
+    union iodefine_reg32_t  RMPTR35;                       /*  RMPTR35         */
+    union iodefine_reg32_t  RMDF035;                       /*  RMDF035         */
+    union iodefine_reg32_t  RMDF135;                       /*  RMDF135         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID36;                        /*  RMID36          */
+    union iodefine_reg32_t  RMPTR36;                       /*  RMPTR36         */
+    union iodefine_reg32_t  RMDF036;                       /*  RMDF036         */
+    union iodefine_reg32_t  RMDF136;                       /*  RMDF136         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID37;                        /*  RMID37          */
+    union iodefine_reg32_t  RMPTR37;                       /*  RMPTR37         */
+    union iodefine_reg32_t  RMDF037;                       /*  RMDF037         */
+    union iodefine_reg32_t  RMDF137;                       /*  RMDF137         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID38;                        /*  RMID38          */
+    union iodefine_reg32_t  RMPTR38;                       /*  RMPTR38         */
+    union iodefine_reg32_t  RMDF038;                       /*  RMDF038         */
+    union iodefine_reg32_t  RMDF138;                       /*  RMDF138         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID39;                        /*  RMID39          */
+    union iodefine_reg32_t  RMPTR39;                       /*  RMPTR39         */
+    union iodefine_reg32_t  RMDF039;                       /*  RMDF039         */
+    union iodefine_reg32_t  RMDF139;                       /*  RMDF139         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID40;                        /*  RMID40          */
+    union iodefine_reg32_t  RMPTR40;                       /*  RMPTR40         */
+    union iodefine_reg32_t  RMDF040;                       /*  RMDF040         */
+    union iodefine_reg32_t  RMDF140;                       /*  RMDF140         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID41;                        /*  RMID41          */
+    union iodefine_reg32_t  RMPTR41;                       /*  RMPTR41         */
+    union iodefine_reg32_t  RMDF041;                       /*  RMDF041         */
+    union iodefine_reg32_t  RMDF141;                       /*  RMDF141         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID42;                        /*  RMID42          */
+    union iodefine_reg32_t  RMPTR42;                       /*  RMPTR42         */
+    union iodefine_reg32_t  RMDF042;                       /*  RMDF042         */
+    union iodefine_reg32_t  RMDF142;                       /*  RMDF142         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID43;                        /*  RMID43          */
+    union iodefine_reg32_t  RMPTR43;                       /*  RMPTR43         */
+    union iodefine_reg32_t  RMDF043;                       /*  RMDF043         */
+    union iodefine_reg32_t  RMDF143;                       /*  RMDF143         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID44;                        /*  RMID44          */
+    union iodefine_reg32_t  RMPTR44;                       /*  RMPTR44         */
+    union iodefine_reg32_t  RMDF044;                       /*  RMDF044         */
+    union iodefine_reg32_t  RMDF144;                       /*  RMDF144         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID45;                        /*  RMID45          */
+    union iodefine_reg32_t  RMPTR45;                       /*  RMPTR45         */
+    union iodefine_reg32_t  RMDF045;                       /*  RMDF045         */
+    union iodefine_reg32_t  RMDF145;                       /*  RMDF145         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID46;                        /*  RMID46          */
+    union iodefine_reg32_t  RMPTR46;                       /*  RMPTR46         */
+    union iodefine_reg32_t  RMDF046;                       /*  RMDF046         */
+    union iodefine_reg32_t  RMDF146;                       /*  RMDF146         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID47;                        /*  RMID47          */
+    union iodefine_reg32_t  RMPTR47;                       /*  RMPTR47         */
+    union iodefine_reg32_t  RMDF047;                       /*  RMDF047         */
+    union iodefine_reg32_t  RMDF147;                       /*  RMDF147         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID48;                        /*  RMID48          */
+    union iodefine_reg32_t  RMPTR48;                       /*  RMPTR48         */
+    union iodefine_reg32_t  RMDF048;                       /*  RMDF048         */
+    union iodefine_reg32_t  RMDF148;                       /*  RMDF148         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID49;                        /*  RMID49          */
+    union iodefine_reg32_t  RMPTR49;                       /*  RMPTR49         */
+    union iodefine_reg32_t  RMDF049;                       /*  RMDF049         */
+    union iodefine_reg32_t  RMDF149;                       /*  RMDF149         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID50;                        /*  RMID50          */
+    union iodefine_reg32_t  RMPTR50;                       /*  RMPTR50         */
+    union iodefine_reg32_t  RMDF050;                       /*  RMDF050         */
+    union iodefine_reg32_t  RMDF150;                       /*  RMDF150         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID51;                        /*  RMID51          */
+    union iodefine_reg32_t  RMPTR51;                       /*  RMPTR51         */
+    union iodefine_reg32_t  RMDF051;                       /*  RMDF051         */
+    union iodefine_reg32_t  RMDF151;                       /*  RMDF151         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID52;                        /*  RMID52          */
+    union iodefine_reg32_t  RMPTR52;                       /*  RMPTR52         */
+    union iodefine_reg32_t  RMDF052;                       /*  RMDF052         */
+    union iodefine_reg32_t  RMDF152;                       /*  RMDF152         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID53;                        /*  RMID53          */
+    union iodefine_reg32_t  RMPTR53;                       /*  RMPTR53         */
+    union iodefine_reg32_t  RMDF053;                       /*  RMDF053         */
+    union iodefine_reg32_t  RMDF153;                       /*  RMDF153         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID54;                        /*  RMID54          */
+    union iodefine_reg32_t  RMPTR54;                       /*  RMPTR54         */
+    union iodefine_reg32_t  RMDF054;                       /*  RMDF054         */
+    union iodefine_reg32_t  RMDF154;                       /*  RMDF154         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID55;                        /*  RMID55          */
+    union iodefine_reg32_t  RMPTR55;                       /*  RMPTR55         */
+    union iodefine_reg32_t  RMDF055;                       /*  RMDF055         */
+    union iodefine_reg32_t  RMDF155;                       /*  RMDF155         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID56;                        /*  RMID56          */
+    union iodefine_reg32_t  RMPTR56;                       /*  RMPTR56         */
+    union iodefine_reg32_t  RMDF056;                       /*  RMDF056         */
+    union iodefine_reg32_t  RMDF156;                       /*  RMDF156         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID57;                        /*  RMID57          */
+    union iodefine_reg32_t  RMPTR57;                       /*  RMPTR57         */
+    union iodefine_reg32_t  RMDF057;                       /*  RMDF057         */
+    union iodefine_reg32_t  RMDF157;                       /*  RMDF157         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID58;                        /*  RMID58          */
+    union iodefine_reg32_t  RMPTR58;                       /*  RMPTR58         */
+    union iodefine_reg32_t  RMDF058;                       /*  RMDF058         */
+    union iodefine_reg32_t  RMDF158;                       /*  RMDF158         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID59;                        /*  RMID59          */
+    union iodefine_reg32_t  RMPTR59;                       /*  RMPTR59         */
+    union iodefine_reg32_t  RMDF059;                       /*  RMDF059         */
+    union iodefine_reg32_t  RMDF159;                       /*  RMDF159         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID60;                        /*  RMID60          */
+    union iodefine_reg32_t  RMPTR60;                       /*  RMPTR60         */
+    union iodefine_reg32_t  RMDF060;                       /*  RMDF060         */
+    union iodefine_reg32_t  RMDF160;                       /*  RMDF160         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID61;                        /*  RMID61          */
+    union iodefine_reg32_t  RMPTR61;                       /*  RMPTR61         */
+    union iodefine_reg32_t  RMDF061;                       /*  RMDF061         */
+    union iodefine_reg32_t  RMDF161;                       /*  RMDF161         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID62;                        /*  RMID62          */
+    union iodefine_reg32_t  RMPTR62;                       /*  RMPTR62         */
+    union iodefine_reg32_t  RMDF062;                       /*  RMDF062         */
+    union iodefine_reg32_t  RMDF162;                       /*  RMDF162         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID63;                        /*  RMID63          */
+    union iodefine_reg32_t  RMPTR63;                       /*  RMPTR63         */
+    union iodefine_reg32_t  RMDF063;                       /*  RMDF063         */
+    union iodefine_reg32_t  RMDF163;                       /*  RMDF163         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID64;                        /*  RMID64          */
+    union iodefine_reg32_t  RMPTR64;                       /*  RMPTR64         */
+    union iodefine_reg32_t  RMDF064;                       /*  RMDF064         */
+    union iodefine_reg32_t  RMDF164;                       /*  RMDF164         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID65;                        /*  RMID65          */
+    union iodefine_reg32_t  RMPTR65;                       /*  RMPTR65         */
+    union iodefine_reg32_t  RMDF065;                       /*  RMDF065         */
+    union iodefine_reg32_t  RMDF165;                       /*  RMDF165         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID66;                        /*  RMID66          */
+    union iodefine_reg32_t  RMPTR66;                       /*  RMPTR66         */
+    union iodefine_reg32_t  RMDF066;                       /*  RMDF066         */
+    union iodefine_reg32_t  RMDF166;                       /*  RMDF166         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID67;                        /*  RMID67          */
+    union iodefine_reg32_t  RMPTR67;                       /*  RMPTR67         */
+    union iodefine_reg32_t  RMDF067;                       /*  RMDF067         */
+    union iodefine_reg32_t  RMDF167;                       /*  RMDF167         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID68;                        /*  RMID68          */
+    union iodefine_reg32_t  RMPTR68;                       /*  RMPTR68         */
+    union iodefine_reg32_t  RMDF068;                       /*  RMDF068         */
+    union iodefine_reg32_t  RMDF168;                       /*  RMDF168         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID69;                        /*  RMID69          */
+    union iodefine_reg32_t  RMPTR69;                       /*  RMPTR69         */
+    union iodefine_reg32_t  RMDF069;                       /*  RMDF069         */
+    union iodefine_reg32_t  RMDF169;                       /*  RMDF169         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID70;                        /*  RMID70          */
+    union iodefine_reg32_t  RMPTR70;                       /*  RMPTR70         */
+    union iodefine_reg32_t  RMDF070;                       /*  RMDF070         */
+    union iodefine_reg32_t  RMDF170;                       /*  RMDF170         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID71;                        /*  RMID71          */
+    union iodefine_reg32_t  RMPTR71;                       /*  RMPTR71         */
+    union iodefine_reg32_t  RMDF071;                       /*  RMDF071         */
+    union iodefine_reg32_t  RMDF171;                       /*  RMDF171         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID72;                        /*  RMID72          */
+    union iodefine_reg32_t  RMPTR72;                       /*  RMPTR72         */
+    union iodefine_reg32_t  RMDF072;                       /*  RMDF072         */
+    union iodefine_reg32_t  RMDF172;                       /*  RMDF172         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID73;                        /*  RMID73          */
+    union iodefine_reg32_t  RMPTR73;                       /*  RMPTR73         */
+    union iodefine_reg32_t  RMDF073;                       /*  RMDF073         */
+    union iodefine_reg32_t  RMDF173;                       /*  RMDF173         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID74;                        /*  RMID74          */
+    union iodefine_reg32_t  RMPTR74;                       /*  RMPTR74         */
+    union iodefine_reg32_t  RMDF074;                       /*  RMDF074         */
+    union iodefine_reg32_t  RMDF174;                       /*  RMDF174         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID75;                        /*  RMID75          */
+    union iodefine_reg32_t  RMPTR75;                       /*  RMPTR75         */
+    union iodefine_reg32_t  RMDF075;                       /*  RMDF075         */
+    union iodefine_reg32_t  RMDF175;                       /*  RMDF175         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID76;                        /*  RMID76          */
+    union iodefine_reg32_t  RMPTR76;                       /*  RMPTR76         */
+    union iodefine_reg32_t  RMDF076;                       /*  RMDF076         */
+    union iodefine_reg32_t  RMDF176;                       /*  RMDF176         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID77;                        /*  RMID77          */
+    union iodefine_reg32_t  RMPTR77;                       /*  RMPTR77         */
+    union iodefine_reg32_t  RMDF077;                       /*  RMDF077         */
+    union iodefine_reg32_t  RMDF177;                       /*  RMDF177         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID78;                        /*  RMID78          */
+    union iodefine_reg32_t  RMPTR78;                       /*  RMPTR78         */
+    union iodefine_reg32_t  RMDF078;                       /*  RMDF078         */
+    union iodefine_reg32_t  RMDF178;                       /*  RMDF178         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+/* start of struct st_rscan_from_rscan0rmidp */
+    union iodefine_reg32_t  RMID79;                        /*  RMID79          */
+    union iodefine_reg32_t  RMPTR79;                       /*  RMPTR79         */
+    union iodefine_reg32_t  RMDF079;                       /*  RMDF079         */
+    union iodefine_reg32_t  RMDF179;                       /*  RMDF179         */
+/* end of struct st_rscan_from_rscan0rmidp */
+    
+    volatile uint8_t   dummy179[768];                          /*                  */
+    
+/* start of struct st_rscan_from_rscan0rfidm */
+    union iodefine_reg32_t  RFID0;                         /*  RFID0           */
+    union iodefine_reg32_t  RFPTR0;                        /*  RFPTR0          */
+    union iodefine_reg32_t  RFDF00;                        /*  RFDF00          */
+    union iodefine_reg32_t  RFDF10;                        /*  RFDF10          */
+/* end of struct st_rscan_from_rscan0rfidm */
+    
+/* start of struct st_rscan_from_rscan0rfidm */
+    union iodefine_reg32_t  RFID1;                         /*  RFID1           */
+    union iodefine_reg32_t  RFPTR1;                        /*  RFPTR1          */
+    union iodefine_reg32_t  RFDF01;                        /*  RFDF01          */
+    union iodefine_reg32_t  RFDF11;                        /*  RFDF11          */
+/* end of struct st_rscan_from_rscan0rfidm */
+    
+/* start of struct st_rscan_from_rscan0rfidm */
+    union iodefine_reg32_t  RFID2;                         /*  RFID2           */
+    union iodefine_reg32_t  RFPTR2;                        /*  RFPTR2          */
+    union iodefine_reg32_t  RFDF02;                        /*  RFDF02          */
+    union iodefine_reg32_t  RFDF12;                        /*  RFDF12          */
+/* end of struct st_rscan_from_rscan0rfidm */
+    
+/* start of struct st_rscan_from_rscan0rfidm */
+    union iodefine_reg32_t  RFID3;                         /*  RFID3           */
+    union iodefine_reg32_t  RFPTR3;                        /*  RFPTR3          */
+    union iodefine_reg32_t  RFDF03;                        /*  RFDF03          */
+    union iodefine_reg32_t  RFDF13;                        /*  RFDF13          */
+/* end of struct st_rscan_from_rscan0rfidm */
+    
+/* start of struct st_rscan_from_rscan0rfidm */
+    union iodefine_reg32_t  RFID4;                         /*  RFID4           */
+    union iodefine_reg32_t  RFPTR4;                        /*  RFPTR4          */
+    union iodefine_reg32_t  RFDF04;                        /*  RFDF04          */
+    union iodefine_reg32_t  RFDF14;                        /*  RFDF14          */
+/* end of struct st_rscan_from_rscan0rfidm */
+    
+/* start of struct st_rscan_from_rscan0rfidm */
+    union iodefine_reg32_t  RFID5;                         /*  RFID5           */
+    union iodefine_reg32_t  RFPTR5;                        /*  RFPTR5          */
+    union iodefine_reg32_t  RFDF05;                        /*  RFDF05          */
+    union iodefine_reg32_t  RFDF15;                        /*  RFDF15          */
+/* end of struct st_rscan_from_rscan0rfidm */
+    
+/* start of struct st_rscan_from_rscan0rfidm */
+    union iodefine_reg32_t  RFID6;                         /*  RFID6           */
+    union iodefine_reg32_t  RFPTR6;                        /*  RFPTR6          */
+    union iodefine_reg32_t  RFDF06;                        /*  RFDF06          */
+    union iodefine_reg32_t  RFDF16;                        /*  RFDF16          */
+/* end of struct st_rscan_from_rscan0rfidm */
+    
+/* start of struct st_rscan_from_rscan0rfidm */
+    union iodefine_reg32_t  RFID7;                         /*  RFID7           */
+    union iodefine_reg32_t  RFPTR7;                        /*  RFPTR7          */
+    union iodefine_reg32_t  RFDF07;                        /*  RFDF07          */
+    union iodefine_reg32_t  RFDF17;                        /*  RFDF17          */
+/* end of struct st_rscan_from_rscan0rfidm */
+    
+/* start of struct st_rscan_from_rscan0cfidm */
+    union iodefine_reg32_t  CFID0;                         /*  CFID0           */
+    union iodefine_reg32_t  CFPTR0;                        /*  CFPTR0          */
+    union iodefine_reg32_t  CFDF00;                        /*  CFDF00          */
+    union iodefine_reg32_t  CFDF10;                        /*  CFDF10          */
+/* end of struct st_rscan_from_rscan0cfidm */
+    
+/* start of struct st_rscan_from_rscan0cfidm */
+    union iodefine_reg32_t  CFID1;                         /*  CFID1           */
+    union iodefine_reg32_t  CFPTR1;                        /*  CFPTR1          */
+    union iodefine_reg32_t  CFDF01;                        /*  CFDF01          */
+    union iodefine_reg32_t  CFDF11;                        /*  CFDF11          */
+/* end of struct st_rscan_from_rscan0cfidm */
+    
+/* start of struct st_rscan_from_rscan0cfidm */
+    union iodefine_reg32_t  CFID2;                         /*  CFID2           */
+    union iodefine_reg32_t  CFPTR2;                        /*  CFPTR2          */
+    union iodefine_reg32_t  CFDF02;                        /*  CFDF02          */
+    union iodefine_reg32_t  CFDF12;                        /*  CFDF12          */
+/* end of struct st_rscan_from_rscan0cfidm */
+    
+/* start of struct st_rscan_from_rscan0cfidm */
+    union iodefine_reg32_t  CFID3;                         /*  CFID3           */
+    union iodefine_reg32_t  CFPTR3;                        /*  CFPTR3          */
+    union iodefine_reg32_t  CFDF03;                        /*  CFDF03          */
+    union iodefine_reg32_t  CFDF13;                        /*  CFDF13          */
+/* end of struct st_rscan_from_rscan0cfidm */
+    
+/* start of struct st_rscan_from_rscan0cfidm */
+    union iodefine_reg32_t  CFID4;                         /*  CFID4           */
+    union iodefine_reg32_t  CFPTR4;                        /*  CFPTR4          */
+    union iodefine_reg32_t  CFDF04;                        /*  CFDF04          */
+    union iodefine_reg32_t  CFDF14;                        /*  CFDF14          */
+/* end of struct st_rscan_from_rscan0cfidm */
+    
+/* start of struct st_rscan_from_rscan0cfidm */
+    union iodefine_reg32_t  CFID5;                         /*  CFID5           */
+    union iodefine_reg32_t  CFPTR5;                        /*  CFPTR5          */
+    union iodefine_reg32_t  CFDF05;                        /*  CFDF05          */
+    union iodefine_reg32_t  CFDF15;                        /*  CFDF15          */
+/* end of struct st_rscan_from_rscan0cfidm */
+    
+/* start of struct st_rscan_from_rscan0cfidm */
+    union iodefine_reg32_t  CFID6;                         /*  CFID6           */
+    union iodefine_reg32_t  CFPTR6;                        /*  CFPTR6          */
+    union iodefine_reg32_t  CFDF06;                        /*  CFDF06          */
+    union iodefine_reg32_t  CFDF16;                        /*  CFDF16          */
+/* end of struct st_rscan_from_rscan0cfidm */
+    
+/* start of struct st_rscan_from_rscan0cfidm */
+    union iodefine_reg32_t  CFID7;                         /*  CFID7           */
+    union iodefine_reg32_t  CFPTR7;                        /*  CFPTR7          */
+    union iodefine_reg32_t  CFDF07;                        /*  CFDF07          */
+    union iodefine_reg32_t  CFDF17;                        /*  CFDF17          */
+/* end of struct st_rscan_from_rscan0cfidm */
+    
+/* start of struct st_rscan_from_rscan0cfidm */
+    union iodefine_reg32_t  CFID8;                         /*  CFID8           */
+    union iodefine_reg32_t  CFPTR8;                        /*  CFPTR8          */
+    union iodefine_reg32_t  CFDF08;                        /*  CFDF08          */
+    union iodefine_reg32_t  CFDF18;                        /*  CFDF18          */
+/* end of struct st_rscan_from_rscan0cfidm */
+    
+/* start of struct st_rscan_from_rscan0cfidm */
+    union iodefine_reg32_t  CFID9;                         /*  CFID9           */
+    union iodefine_reg32_t  CFPTR9;                        /*  CFPTR9          */
+    union iodefine_reg32_t  CFDF09;                        /*  CFDF09          */
+    union iodefine_reg32_t  CFDF19;                        /*  CFDF19          */
+/* end of struct st_rscan_from_rscan0cfidm */
+    
+/* start of struct st_rscan_from_rscan0cfidm */
+    union iodefine_reg32_t  CFID10;                        /*  CFID10          */
+    union iodefine_reg32_t  CFPTR10;                       /*  CFPTR10         */
+    union iodefine_reg32_t  CFDF010;                       /*  CFDF010         */
+    union iodefine_reg32_t  CFDF110;                       /*  CFDF110         */
+/* end of struct st_rscan_from_rscan0cfidm */
+    
+/* start of struct st_rscan_from_rscan0cfidm */
+    union iodefine_reg32_t  CFID11;                        /*  CFID11          */
+    union iodefine_reg32_t  CFPTR11;                       /*  CFPTR11         */
+    union iodefine_reg32_t  CFDF011;                       /*  CFDF011         */
+    union iodefine_reg32_t  CFDF111;                       /*  CFDF111         */
+/* end of struct st_rscan_from_rscan0cfidm */
+    
+/* start of struct st_rscan_from_rscan0cfidm */
+    union iodefine_reg32_t  CFID12;                        /*  CFID12          */
+    union iodefine_reg32_t  CFPTR12;                       /*  CFPTR12         */
+    union iodefine_reg32_t  CFDF012;                       /*  CFDF012         */
+    union iodefine_reg32_t  CFDF112;                       /*  CFDF112         */
+/* end of struct st_rscan_from_rscan0cfidm */
+    
+/* start of struct st_rscan_from_rscan0cfidm */
+    union iodefine_reg32_t  CFID13;                        /*  CFID13          */
+    union iodefine_reg32_t  CFPTR13;                       /*  CFPTR13         */
+    union iodefine_reg32_t  CFDF013;                       /*  CFDF013         */
+    union iodefine_reg32_t  CFDF113;                       /*  CFDF113         */
+/* end of struct st_rscan_from_rscan0cfidm */
+    
+/* start of struct st_rscan_from_rscan0cfidm */
+    union iodefine_reg32_t  CFID14;                        /*  CFID14          */
+    union iodefine_reg32_t  CFPTR14;                       /*  CFPTR14         */
+    union iodefine_reg32_t  CFDF014;                       /*  CFDF014         */
+    union iodefine_reg32_t  CFDF114;                       /*  CFDF114         */
+/* end of struct st_rscan_from_rscan0cfidm */
+    
+    volatile uint8_t   dummy180[144];                          /*                  */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID0;                         /*  TMID0           */
+    union iodefine_reg32_t  TMPTR0;                        /*  TMPTR0          */
+    union iodefine_reg32_t  TMDF00;                        /*  TMDF00          */
+    union iodefine_reg32_t  TMDF10;                        /*  TMDF10          */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID1;                         /*  TMID1           */
+    union iodefine_reg32_t  TMPTR1;                        /*  TMPTR1          */
+    union iodefine_reg32_t  TMDF01;                        /*  TMDF01          */
+    union iodefine_reg32_t  TMDF11;                        /*  TMDF11          */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID2;                         /*  TMID2           */
+    union iodefine_reg32_t  TMPTR2;                        /*  TMPTR2          */
+    union iodefine_reg32_t  TMDF02;                        /*  TMDF02          */
+    union iodefine_reg32_t  TMDF12;                        /*  TMDF12          */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID3;                         /*  TMID3           */
+    union iodefine_reg32_t  TMPTR3;                        /*  TMPTR3          */
+    union iodefine_reg32_t  TMDF03;                        /*  TMDF03          */
+    union iodefine_reg32_t  TMDF13;                        /*  TMDF13          */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID4;                         /*  TMID4           */
+    union iodefine_reg32_t  TMPTR4;                        /*  TMPTR4          */
+    union iodefine_reg32_t  TMDF04;                        /*  TMDF04          */
+    union iodefine_reg32_t  TMDF14;                        /*  TMDF14          */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID5;                         /*  TMID5           */
+    union iodefine_reg32_t  TMPTR5;                        /*  TMPTR5          */
+    union iodefine_reg32_t  TMDF05;                        /*  TMDF05          */
+    union iodefine_reg32_t  TMDF15;                        /*  TMDF15          */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID6;                         /*  TMID6           */
+    union iodefine_reg32_t  TMPTR6;                        /*  TMPTR6          */
+    union iodefine_reg32_t  TMDF06;                        /*  TMDF06          */
+    union iodefine_reg32_t  TMDF16;                        /*  TMDF16          */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID7;                         /*  TMID7           */
+    union iodefine_reg32_t  TMPTR7;                        /*  TMPTR7          */
+    union iodefine_reg32_t  TMDF07;                        /*  TMDF07          */
+    union iodefine_reg32_t  TMDF17;                        /*  TMDF17          */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID8;                         /*  TMID8           */
+    union iodefine_reg32_t  TMPTR8;                        /*  TMPTR8          */
+    union iodefine_reg32_t  TMDF08;                        /*  TMDF08          */
+    union iodefine_reg32_t  TMDF18;                        /*  TMDF18          */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID9;                         /*  TMID9           */
+    union iodefine_reg32_t  TMPTR9;                        /*  TMPTR9          */
+    union iodefine_reg32_t  TMDF09;                        /*  TMDF09          */
+    union iodefine_reg32_t  TMDF19;                        /*  TMDF19          */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID10;                        /*  TMID10          */
+    union iodefine_reg32_t  TMPTR10;                       /*  TMPTR10         */
+    union iodefine_reg32_t  TMDF010;                       /*  TMDF010         */
+    union iodefine_reg32_t  TMDF110;                       /*  TMDF110         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID11;                        /*  TMID11          */
+    union iodefine_reg32_t  TMPTR11;                       /*  TMPTR11         */
+    union iodefine_reg32_t  TMDF011;                       /*  TMDF011         */
+    union iodefine_reg32_t  TMDF111;                       /*  TMDF111         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID12;                        /*  TMID12          */
+    union iodefine_reg32_t  TMPTR12;                       /*  TMPTR12         */
+    union iodefine_reg32_t  TMDF012;                       /*  TMDF012         */
+    union iodefine_reg32_t  TMDF112;                       /*  TMDF112         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID13;                        /*  TMID13          */
+    union iodefine_reg32_t  TMPTR13;                       /*  TMPTR13         */
+    union iodefine_reg32_t  TMDF013;                       /*  TMDF013         */
+    union iodefine_reg32_t  TMDF113;                       /*  TMDF113         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID14;                        /*  TMID14          */
+    union iodefine_reg32_t  TMPTR14;                       /*  TMPTR14         */
+    union iodefine_reg32_t  TMDF014;                       /*  TMDF014         */
+    union iodefine_reg32_t  TMDF114;                       /*  TMDF114         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID15;                        /*  TMID15          */
+    union iodefine_reg32_t  TMPTR15;                       /*  TMPTR15         */
+    union iodefine_reg32_t  TMDF015;                       /*  TMDF015         */
+    union iodefine_reg32_t  TMDF115;                       /*  TMDF115         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID16;                        /*  TMID16          */
+    union iodefine_reg32_t  TMPTR16;                       /*  TMPTR16         */
+    union iodefine_reg32_t  TMDF016;                       /*  TMDF016         */
+    union iodefine_reg32_t  TMDF116;                       /*  TMDF116         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID17;                        /*  TMID17          */
+    union iodefine_reg32_t  TMPTR17;                       /*  TMPTR17         */
+    union iodefine_reg32_t  TMDF017;                       /*  TMDF017         */
+    union iodefine_reg32_t  TMDF117;                       /*  TMDF117         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID18;                        /*  TMID18          */
+    union iodefine_reg32_t  TMPTR18;                       /*  TMPTR18         */
+    union iodefine_reg32_t  TMDF018;                       /*  TMDF018         */
+    union iodefine_reg32_t  TMDF118;                       /*  TMDF118         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID19;                        /*  TMID19          */
+    union iodefine_reg32_t  TMPTR19;                       /*  TMPTR19         */
+    union iodefine_reg32_t  TMDF019;                       /*  TMDF019         */
+    union iodefine_reg32_t  TMDF119;                       /*  TMDF119         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID20;                        /*  TMID20          */
+    union iodefine_reg32_t  TMPTR20;                       /*  TMPTR20         */
+    union iodefine_reg32_t  TMDF020;                       /*  TMDF020         */
+    union iodefine_reg32_t  TMDF120;                       /*  TMDF120         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID21;                        /*  TMID21          */
+    union iodefine_reg32_t  TMPTR21;                       /*  TMPTR21         */
+    union iodefine_reg32_t  TMDF021;                       /*  TMDF021         */
+    union iodefine_reg32_t  TMDF121;                       /*  TMDF121         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID22;                        /*  TMID22          */
+    union iodefine_reg32_t  TMPTR22;                       /*  TMPTR22         */
+    union iodefine_reg32_t  TMDF022;                       /*  TMDF022         */
+    union iodefine_reg32_t  TMDF122;                       /*  TMDF122         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID23;                        /*  TMID23          */
+    union iodefine_reg32_t  TMPTR23;                       /*  TMPTR23         */
+    union iodefine_reg32_t  TMDF023;                       /*  TMDF023         */
+    union iodefine_reg32_t  TMDF123;                       /*  TMDF123         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID24;                        /*  TMID24          */
+    union iodefine_reg32_t  TMPTR24;                       /*  TMPTR24         */
+    union iodefine_reg32_t  TMDF024;                       /*  TMDF024         */
+    union iodefine_reg32_t  TMDF124;                       /*  TMDF124         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID25;                        /*  TMID25          */
+    union iodefine_reg32_t  TMPTR25;                       /*  TMPTR25         */
+    union iodefine_reg32_t  TMDF025;                       /*  TMDF025         */
+    union iodefine_reg32_t  TMDF125;                       /*  TMDF125         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID26;                        /*  TMID26          */
+    union iodefine_reg32_t  TMPTR26;                       /*  TMPTR26         */
+    union iodefine_reg32_t  TMDF026;                       /*  TMDF026         */
+    union iodefine_reg32_t  TMDF126;                       /*  TMDF126         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID27;                        /*  TMID27          */
+    union iodefine_reg32_t  TMPTR27;                       /*  TMPTR27         */
+    union iodefine_reg32_t  TMDF027;                       /*  TMDF027         */
+    union iodefine_reg32_t  TMDF127;                       /*  TMDF127         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID28;                        /*  TMID28          */
+    union iodefine_reg32_t  TMPTR28;                       /*  TMPTR28         */
+    union iodefine_reg32_t  TMDF028;                       /*  TMDF028         */
+    union iodefine_reg32_t  TMDF128;                       /*  TMDF128         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID29;                        /*  TMID29          */
+    union iodefine_reg32_t  TMPTR29;                       /*  TMPTR29         */
+    union iodefine_reg32_t  TMDF029;                       /*  TMDF029         */
+    union iodefine_reg32_t  TMDF129;                       /*  TMDF129         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID30;                        /*  TMID30          */
+    union iodefine_reg32_t  TMPTR30;                       /*  TMPTR30         */
+    union iodefine_reg32_t  TMDF030;                       /*  TMDF030         */
+    union iodefine_reg32_t  TMDF130;                       /*  TMDF130         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID31;                        /*  TMID31          */
+    union iodefine_reg32_t  TMPTR31;                       /*  TMPTR31         */
+    union iodefine_reg32_t  TMDF031;                       /*  TMDF031         */
+    union iodefine_reg32_t  TMDF131;                       /*  TMDF131         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID32;                        /*  TMID32          */
+    union iodefine_reg32_t  TMPTR32;                       /*  TMPTR32         */
+    union iodefine_reg32_t  TMDF032;                       /*  TMDF032         */
+    union iodefine_reg32_t  TMDF132;                       /*  TMDF132         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID33;                        /*  TMID33          */
+    union iodefine_reg32_t  TMPTR33;                       /*  TMPTR33         */
+    union iodefine_reg32_t  TMDF033;                       /*  TMDF033         */
+    union iodefine_reg32_t  TMDF133;                       /*  TMDF133         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID34;                        /*  TMID34          */
+    union iodefine_reg32_t  TMPTR34;                       /*  TMPTR34         */
+    union iodefine_reg32_t  TMDF034;                       /*  TMDF034         */
+    union iodefine_reg32_t  TMDF134;                       /*  TMDF134         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID35;                        /*  TMID35          */
+    union iodefine_reg32_t  TMPTR35;                       /*  TMPTR35         */
+    union iodefine_reg32_t  TMDF035;                       /*  TMDF035         */
+    union iodefine_reg32_t  TMDF135;                       /*  TMDF135         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID36;                        /*  TMID36          */
+    union iodefine_reg32_t  TMPTR36;                       /*  TMPTR36         */
+    union iodefine_reg32_t  TMDF036;                       /*  TMDF036         */
+    union iodefine_reg32_t  TMDF136;                       /*  TMDF136         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID37;                        /*  TMID37          */
+    union iodefine_reg32_t  TMPTR37;                       /*  TMPTR37         */
+    union iodefine_reg32_t  TMDF037;                       /*  TMDF037         */
+    union iodefine_reg32_t  TMDF137;                       /*  TMDF137         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID38;                        /*  TMID38          */
+    union iodefine_reg32_t  TMPTR38;                       /*  TMPTR38         */
+    union iodefine_reg32_t  TMDF038;                       /*  TMDF038         */
+    union iodefine_reg32_t  TMDF138;                       /*  TMDF138         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID39;                        /*  TMID39          */
+    union iodefine_reg32_t  TMPTR39;                       /*  TMPTR39         */
+    union iodefine_reg32_t  TMDF039;                       /*  TMDF039         */
+    union iodefine_reg32_t  TMDF139;                       /*  TMDF139         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID40;                        /*  TMID40          */
+    union iodefine_reg32_t  TMPTR40;                       /*  TMPTR40         */
+    union iodefine_reg32_t  TMDF040;                       /*  TMDF040         */
+    union iodefine_reg32_t  TMDF140;                       /*  TMDF140         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID41;                        /*  TMID41          */
+    union iodefine_reg32_t  TMPTR41;                       /*  TMPTR41         */
+    union iodefine_reg32_t  TMDF041;                       /*  TMDF041         */
+    union iodefine_reg32_t  TMDF141;                       /*  TMDF141         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID42;                        /*  TMID42          */
+    union iodefine_reg32_t  TMPTR42;                       /*  TMPTR42         */
+    union iodefine_reg32_t  TMDF042;                       /*  TMDF042         */
+    union iodefine_reg32_t  TMDF142;                       /*  TMDF142         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID43;                        /*  TMID43          */
+    union iodefine_reg32_t  TMPTR43;                       /*  TMPTR43         */
+    union iodefine_reg32_t  TMDF043;                       /*  TMDF043         */
+    union iodefine_reg32_t  TMDF143;                       /*  TMDF143         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID44;                        /*  TMID44          */
+    union iodefine_reg32_t  TMPTR44;                       /*  TMPTR44         */
+    union iodefine_reg32_t  TMDF044;                       /*  TMDF044         */
+    union iodefine_reg32_t  TMDF144;                       /*  TMDF144         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID45;                        /*  TMID45          */
+    union iodefine_reg32_t  TMPTR45;                       /*  TMPTR45         */
+    union iodefine_reg32_t  TMDF045;                       /*  TMDF045         */
+    union iodefine_reg32_t  TMDF145;                       /*  TMDF145         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID46;                        /*  TMID46          */
+    union iodefine_reg32_t  TMPTR46;                       /*  TMPTR46         */
+    union iodefine_reg32_t  TMDF046;                       /*  TMDF046         */
+    union iodefine_reg32_t  TMDF146;                       /*  TMDF146         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID47;                        /*  TMID47          */
+    union iodefine_reg32_t  TMPTR47;                       /*  TMPTR47         */
+    union iodefine_reg32_t  TMDF047;                       /*  TMDF047         */
+    union iodefine_reg32_t  TMDF147;                       /*  TMDF147         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID48;                        /*  TMID48          */
+    union iodefine_reg32_t  TMPTR48;                       /*  TMPTR48         */
+    union iodefine_reg32_t  TMDF048;                       /*  TMDF048         */
+    union iodefine_reg32_t  TMDF148;                       /*  TMDF148         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID49;                        /*  TMID49          */
+    union iodefine_reg32_t  TMPTR49;                       /*  TMPTR49         */
+    union iodefine_reg32_t  TMDF049;                       /*  TMDF049         */
+    union iodefine_reg32_t  TMDF149;                       /*  TMDF149         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID50;                        /*  TMID50          */
+    union iodefine_reg32_t  TMPTR50;                       /*  TMPTR50         */
+    union iodefine_reg32_t  TMDF050;                       /*  TMDF050         */
+    union iodefine_reg32_t  TMDF150;                       /*  TMDF150         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID51;                        /*  TMID51          */
+    union iodefine_reg32_t  TMPTR51;                       /*  TMPTR51         */
+    union iodefine_reg32_t  TMDF051;                       /*  TMDF051         */
+    union iodefine_reg32_t  TMDF151;                       /*  TMDF151         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID52;                        /*  TMID52          */
+    union iodefine_reg32_t  TMPTR52;                       /*  TMPTR52         */
+    union iodefine_reg32_t  TMDF052;                       /*  TMDF052         */
+    union iodefine_reg32_t  TMDF152;                       /*  TMDF152         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID53;                        /*  TMID53          */
+    union iodefine_reg32_t  TMPTR53;                       /*  TMPTR53         */
+    union iodefine_reg32_t  TMDF053;                       /*  TMDF053         */
+    union iodefine_reg32_t  TMDF153;                       /*  TMDF153         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID54;                        /*  TMID54          */
+    union iodefine_reg32_t  TMPTR54;                       /*  TMPTR54         */
+    union iodefine_reg32_t  TMDF054;                       /*  TMDF054         */
+    union iodefine_reg32_t  TMDF154;                       /*  TMDF154         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID55;                        /*  TMID55          */
+    union iodefine_reg32_t  TMPTR55;                       /*  TMPTR55         */
+    union iodefine_reg32_t  TMDF055;                       /*  TMDF055         */
+    union iodefine_reg32_t  TMDF155;                       /*  TMDF155         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID56;                        /*  TMID56          */
+    union iodefine_reg32_t  TMPTR56;                       /*  TMPTR56         */
+    union iodefine_reg32_t  TMDF056;                       /*  TMDF056         */
+    union iodefine_reg32_t  TMDF156;                       /*  TMDF156         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID57;                        /*  TMID57          */
+    union iodefine_reg32_t  TMPTR57;                       /*  TMPTR57         */
+    union iodefine_reg32_t  TMDF057;                       /*  TMDF057         */
+    union iodefine_reg32_t  TMDF157;                       /*  TMDF157         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID58;                        /*  TMID58          */
+    union iodefine_reg32_t  TMPTR58;                       /*  TMPTR58         */
+    union iodefine_reg32_t  TMDF058;                       /*  TMDF058         */
+    union iodefine_reg32_t  TMDF158;                       /*  TMDF158         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID59;                        /*  TMID59          */
+    union iodefine_reg32_t  TMPTR59;                       /*  TMPTR59         */
+    union iodefine_reg32_t  TMDF059;                       /*  TMDF059         */
+    union iodefine_reg32_t  TMDF159;                       /*  TMDF159         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID60;                        /*  TMID60          */
+    union iodefine_reg32_t  TMPTR60;                       /*  TMPTR60         */
+    union iodefine_reg32_t  TMDF060;                       /*  TMDF060         */
+    union iodefine_reg32_t  TMDF160;                       /*  TMDF160         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID61;                        /*  TMID61          */
+    union iodefine_reg32_t  TMPTR61;                       /*  TMPTR61         */
+    union iodefine_reg32_t  TMDF061;                       /*  TMDF061         */
+    union iodefine_reg32_t  TMDF161;                       /*  TMDF161         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID62;                        /*  TMID62          */
+    union iodefine_reg32_t  TMPTR62;                       /*  TMPTR62         */
+    union iodefine_reg32_t  TMDF062;                       /*  TMDF062         */
+    union iodefine_reg32_t  TMDF162;                       /*  TMDF162         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID63;                        /*  TMID63          */
+    union iodefine_reg32_t  TMPTR63;                       /*  TMPTR63         */
+    union iodefine_reg32_t  TMDF063;                       /*  TMDF063         */
+    union iodefine_reg32_t  TMDF163;                       /*  TMDF163         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID64;                        /*  TMID64          */
+    union iodefine_reg32_t  TMPTR64;                       /*  TMPTR64         */
+    union iodefine_reg32_t  TMDF064;                       /*  TMDF064         */
+    union iodefine_reg32_t  TMDF164;                       /*  TMDF164         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID65;                        /*  TMID65          */
+    union iodefine_reg32_t  TMPTR65;                       /*  TMPTR65         */
+    union iodefine_reg32_t  TMDF065;                       /*  TMDF065         */
+    union iodefine_reg32_t  TMDF165;                       /*  TMDF165         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID66;                        /*  TMID66          */
+    union iodefine_reg32_t  TMPTR66;                       /*  TMPTR66         */
+    union iodefine_reg32_t  TMDF066;                       /*  TMDF066         */
+    union iodefine_reg32_t  TMDF166;                       /*  TMDF166         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID67;                        /*  TMID67          */
+    union iodefine_reg32_t  TMPTR67;                       /*  TMPTR67         */
+    union iodefine_reg32_t  TMDF067;                       /*  TMDF067         */
+    union iodefine_reg32_t  TMDF167;                       /*  TMDF167         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID68;                        /*  TMID68          */
+    union iodefine_reg32_t  TMPTR68;                       /*  TMPTR68         */
+    union iodefine_reg32_t  TMDF068;                       /*  TMDF068         */
+    union iodefine_reg32_t  TMDF168;                       /*  TMDF168         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID69;                        /*  TMID69          */
+    union iodefine_reg32_t  TMPTR69;                       /*  TMPTR69         */
+    union iodefine_reg32_t  TMDF069;                       /*  TMDF069         */
+    union iodefine_reg32_t  TMDF169;                       /*  TMDF169         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID70;                        /*  TMID70          */
+    union iodefine_reg32_t  TMPTR70;                       /*  TMPTR70         */
+    union iodefine_reg32_t  TMDF070;                       /*  TMDF070         */
+    union iodefine_reg32_t  TMDF170;                       /*  TMDF170         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID71;                        /*  TMID71          */
+    union iodefine_reg32_t  TMPTR71;                       /*  TMPTR71         */
+    union iodefine_reg32_t  TMDF071;                       /*  TMDF071         */
+    union iodefine_reg32_t  TMDF171;                       /*  TMDF171         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID72;                        /*  TMID72          */
+    union iodefine_reg32_t  TMPTR72;                       /*  TMPTR72         */
+    union iodefine_reg32_t  TMDF072;                       /*  TMDF072         */
+    union iodefine_reg32_t  TMDF172;                       /*  TMDF172         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID73;                        /*  TMID73          */
+    union iodefine_reg32_t  TMPTR73;                       /*  TMPTR73         */
+    union iodefine_reg32_t  TMDF073;                       /*  TMDF073         */
+    union iodefine_reg32_t  TMDF173;                       /*  TMDF173         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID74;                        /*  TMID74          */
+    union iodefine_reg32_t  TMPTR74;                       /*  TMPTR74         */
+    union iodefine_reg32_t  TMDF074;                       /*  TMDF074         */
+    union iodefine_reg32_t  TMDF174;                       /*  TMDF174         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID75;                        /*  TMID75          */
+    union iodefine_reg32_t  TMPTR75;                       /*  TMPTR75         */
+    union iodefine_reg32_t  TMDF075;                       /*  TMDF075         */
+    union iodefine_reg32_t  TMDF175;                       /*  TMDF175         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID76;                        /*  TMID76          */
+    union iodefine_reg32_t  TMPTR76;                       /*  TMPTR76         */
+    union iodefine_reg32_t  TMDF076;                       /*  TMDF076         */
+    union iodefine_reg32_t  TMDF176;                       /*  TMDF176         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID77;                        /*  TMID77          */
+    union iodefine_reg32_t  TMPTR77;                       /*  TMPTR77         */
+    union iodefine_reg32_t  TMDF077;                       /*  TMDF077         */
+    union iodefine_reg32_t  TMDF177;                       /*  TMDF177         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID78;                        /*  TMID78          */
+    union iodefine_reg32_t  TMPTR78;                       /*  TMPTR78         */
+    union iodefine_reg32_t  TMDF078;                       /*  TMDF078         */
+    union iodefine_reg32_t  TMDF178;                       /*  TMDF178         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+/* start of struct st_rscan_from_rscan0tmidp */
+    union iodefine_reg32_t  TMID79;                        /*  TMID79          */
+    union iodefine_reg32_t  TMPTR79;                       /*  TMPTR79         */
+    union iodefine_reg32_t  TMDF079;                       /*  TMDF079         */
+    union iodefine_reg32_t  TMDF179;                       /*  TMDF179         */
+/* end of struct st_rscan_from_rscan0tmidp */
+    
+    volatile uint8_t   dummy181[768];                          /*                  */
+#define RSCAN0_THLACC0_COUNT 5
+    union iodefine_reg32_t  THLACC0;                       /*  THLACC0         */
+    union iodefine_reg32_t  THLACC1;                       /*  THLACC1         */
+    union iodefine_reg32_t  THLACC2;                       /*  THLACC2         */
+    union iodefine_reg32_t  THLACC3;                       /*  THLACC3         */
+    union iodefine_reg32_t  THLACC4;                       /*  THLACC4         */
+    
+};
+
+
+struct st_rscan_from_rscan0cncfg
+{
+    union iodefine_reg32_t  CnCFG;                         /*  CnCFG           */
+    union iodefine_reg32_t  CnCTR;                         /*  CnCTR           */
+    union iodefine_reg32_t  CnSTS;                         /*  CnSTS           */
+    union iodefine_reg32_t  CnERFL;                        /*  CnERFL          */
+};
+
+
+struct st_rscan_from_rscan0gaflidj
+{
+    union iodefine_reg32_t  GAFLIDj;                       /*  GAFLIDj         */
+    union iodefine_reg32_t  GAFLMj;                        /*  GAFLMj          */
+    union iodefine_reg32_t  GAFLP0j;                       /*  GAFLP0j         */
+    union iodefine_reg32_t  GAFLP1j;                       /*  GAFLP1j         */
+};
+
+
+struct st_rscan_from_rscan0rmidp
+{
+    union iodefine_reg32_t  RMIDp;                         /*  RMIDp           */
+    union iodefine_reg32_t  RMPTRp;                        /*  RMPTRp          */
+    union iodefine_reg32_t  RMDF0p;                        /*  RMDF0p          */
+    union iodefine_reg32_t  RMDF1p;                        /*  RMDF1p          */
+};
+
+
+struct st_rscan_from_rscan0rfidm
+{
+    union iodefine_reg32_t  RFIDm;                         /*  RFIDm           */
+    union iodefine_reg32_t  RFPTRm;                        /*  RFPTRm          */
+    union iodefine_reg32_t  RFDF0m;                        /*  RFDF0m          */
+    union iodefine_reg32_t  RFDF1m;                        /*  RFDF1m          */
+};
+
+
+struct st_rscan_from_rscan0tmidp
+{
+    union iodefine_reg32_t  TMIDp;                         /*  TMIDp           */
+    union iodefine_reg32_t  TMPTRp;                        /*  TMPTRp          */
+    union iodefine_reg32_t  TMDF0p;                        /*  TMDF0p          */
+    union iodefine_reg32_t  TMDF1p;                        /*  TMDF1p          */
+};
+
+
+struct st_rscan_from_rscan0cfidm
+{
+    union iodefine_reg32_t  CFIDm;                         /*  CFIDm           */
+    union iodefine_reg32_t  CFPTRm;                        /*  CFPTRm          */
+    union iodefine_reg32_t  CFDF0m;                        /*  CFDF0m          */
+    union iodefine_reg32_t  CFDF1m;                        /*  CFDF1m          */
+};
+
+
+#define RSCAN0  (*(struct st_rscan0  *)0xE803A000uL) /* RSCAN0 */
+
+
+/* Start of channnel array defines of RSCAN0 */
+
+/* Channnel array defines of RSCAN_FROM_RSCAN0CFIDm */
+/*(Sample) value = RSCAN_FROM_RSCAN0CFIDm[ channel ]->CFIDm.UINT32; */
+#define RSCAN_FROM_RSCAN0CFIDm_COUNT  15
+#define RSCAN_FROM_RSCAN0CFIDm_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &RSCAN_FROM_RSCAN0CFID0, &RSCAN_FROM_RSCAN0CFID1, &RSCAN_FROM_RSCAN0CFID2, &RSCAN_FROM_RSCAN0CFID3, &RSCAN_FROM_RSCAN0CFID4, &RSCAN_FROM_RSCAN0CFID5, &RSCAN_FROM_RSCAN0CFID6, &RSCAN_FROM_RSCAN0CFID7, \
+    &RSCAN_FROM_RSCAN0CFID8, &RSCAN_FROM_RSCAN0CFID9, &RSCAN_FROM_RSCAN0CFID10, &RSCAN_FROM_RSCAN0CFID11, &RSCAN_FROM_RSCAN0CFID12, &RSCAN_FROM_RSCAN0CFID13, &RSCAN_FROM_RSCAN0CFID14 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define RSCAN_FROM_RSCAN0CFID0 (*(struct st_rscan_from_rscan0cfidm *)&RSCAN0.CFID0) /* RSCAN_FROM_RSCAN0CFID0 */
+#define RSCAN_FROM_RSCAN0CFID1 (*(struct st_rscan_from_rscan0cfidm *)&RSCAN0.CFID1) /* RSCAN_FROM_RSCAN0CFID1 */
+#define RSCAN_FROM_RSCAN0CFID2 (*(struct st_rscan_from_rscan0cfidm *)&RSCAN0.CFID2) /* RSCAN_FROM_RSCAN0CFID2 */
+#define RSCAN_FROM_RSCAN0CFID3 (*(struct st_rscan_from_rscan0cfidm *)&RSCAN0.CFID3) /* RSCAN_FROM_RSCAN0CFID3 */
+#define RSCAN_FROM_RSCAN0CFID4 (*(struct st_rscan_from_rscan0cfidm *)&RSCAN0.CFID4) /* RSCAN_FROM_RSCAN0CFID4 */
+#define RSCAN_FROM_RSCAN0CFID5 (*(struct st_rscan_from_rscan0cfidm *)&RSCAN0.CFID5) /* RSCAN_FROM_RSCAN0CFID5 */
+#define RSCAN_FROM_RSCAN0CFID6 (*(struct st_rscan_from_rscan0cfidm *)&RSCAN0.CFID6) /* RSCAN_FROM_RSCAN0CFID6 */
+#define RSCAN_FROM_RSCAN0CFID7 (*(struct st_rscan_from_rscan0cfidm *)&RSCAN0.CFID7) /* RSCAN_FROM_RSCAN0CFID7 */
+#define RSCAN_FROM_RSCAN0CFID8 (*(struct st_rscan_from_rscan0cfidm *)&RSCAN0.CFID8) /* RSCAN_FROM_RSCAN0CFID8 */
+#define RSCAN_FROM_RSCAN0CFID9 (*(struct st_rscan_from_rscan0cfidm *)&RSCAN0.CFID9) /* RSCAN_FROM_RSCAN0CFID9 */
+#define RSCAN_FROM_RSCAN0CFID10 (*(struct st_rscan_from_rscan0cfidm *)&RSCAN0.CFID10) /* RSCAN_FROM_RSCAN0CFID10 */
+#define RSCAN_FROM_RSCAN0CFID11 (*(struct st_rscan_from_rscan0cfidm *)&RSCAN0.CFID11) /* RSCAN_FROM_RSCAN0CFID11 */
+#define RSCAN_FROM_RSCAN0CFID12 (*(struct st_rscan_from_rscan0cfidm *)&RSCAN0.CFID12) /* RSCAN_FROM_RSCAN0CFID12 */
+#define RSCAN_FROM_RSCAN0CFID13 (*(struct st_rscan_from_rscan0cfidm *)&RSCAN0.CFID13) /* RSCAN_FROM_RSCAN0CFID13 */
+#define RSCAN_FROM_RSCAN0CFID14 (*(struct st_rscan_from_rscan0cfidm *)&RSCAN0.CFID14) /* RSCAN_FROM_RSCAN0CFID14 */
+
+
+/* Channnel array defines of RSCAN_FROM_RSCAN0TMIDp */
+/*(Sample) value = RSCAN_FROM_RSCAN0TMIDp[ channel ]->TMIDp.UINT32; */
+#define RSCAN_FROM_RSCAN0TMIDp_COUNT  80
+#define RSCAN_FROM_RSCAN0TMIDp_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &RSCAN_FROM_RSCAN0TMID0, &RSCAN_FROM_RSCAN0TMID1, &RSCAN_FROM_RSCAN0TMID2, &RSCAN_FROM_RSCAN0TMID3, &RSCAN_FROM_RSCAN0TMID4, &RSCAN_FROM_RSCAN0TMID5, &RSCAN_FROM_RSCAN0TMID6, &RSCAN_FROM_RSCAN0TMID7, \
+    &RSCAN_FROM_RSCAN0TMID8, &RSCAN_FROM_RSCAN0TMID9, &RSCAN_FROM_RSCAN0TMID10, &RSCAN_FROM_RSCAN0TMID11, &RSCAN_FROM_RSCAN0TMID12, &RSCAN_FROM_RSCAN0TMID13, &RSCAN_FROM_RSCAN0TMID14, &RSCAN_FROM_RSCAN0TMID15, \
+    &RSCAN_FROM_RSCAN0TMID16, &RSCAN_FROM_RSCAN0TMID17, &RSCAN_FROM_RSCAN0TMID18, &RSCAN_FROM_RSCAN0TMID19, &RSCAN_FROM_RSCAN0TMID20, &RSCAN_FROM_RSCAN0TMID21, &RSCAN_FROM_RSCAN0TMID22, &RSCAN_FROM_RSCAN0TMID23, \
+    &RSCAN_FROM_RSCAN0TMID24, &RSCAN_FROM_RSCAN0TMID25, &RSCAN_FROM_RSCAN0TMID26, &RSCAN_FROM_RSCAN0TMID27, &RSCAN_FROM_RSCAN0TMID28, &RSCAN_FROM_RSCAN0TMID29, &RSCAN_FROM_RSCAN0TMID30, &RSCAN_FROM_RSCAN0TMID31, \
+    &RSCAN_FROM_RSCAN0TMID32, &RSCAN_FROM_RSCAN0TMID33, &RSCAN_FROM_RSCAN0TMID34, &RSCAN_FROM_RSCAN0TMID35, &RSCAN_FROM_RSCAN0TMID36, &RSCAN_FROM_RSCAN0TMID37, &RSCAN_FROM_RSCAN0TMID38, &RSCAN_FROM_RSCAN0TMID39, \
+    &RSCAN_FROM_RSCAN0TMID40, &RSCAN_FROM_RSCAN0TMID41, &RSCAN_FROM_RSCAN0TMID42, &RSCAN_FROM_RSCAN0TMID43, &RSCAN_FROM_RSCAN0TMID44, &RSCAN_FROM_RSCAN0TMID45, &RSCAN_FROM_RSCAN0TMID46, &RSCAN_FROM_RSCAN0TMID47, \
+    &RSCAN_FROM_RSCAN0TMID48, &RSCAN_FROM_RSCAN0TMID49, &RSCAN_FROM_RSCAN0TMID50, &RSCAN_FROM_RSCAN0TMID51, &RSCAN_FROM_RSCAN0TMID52, &RSCAN_FROM_RSCAN0TMID53, &RSCAN_FROM_RSCAN0TMID54, &RSCAN_FROM_RSCAN0TMID55, \
+    &RSCAN_FROM_RSCAN0TMID56, &RSCAN_FROM_RSCAN0TMID57, &RSCAN_FROM_RSCAN0TMID58, &RSCAN_FROM_RSCAN0TMID59, &RSCAN_FROM_RSCAN0TMID60, &RSCAN_FROM_RSCAN0TMID61, &RSCAN_FROM_RSCAN0TMID62, &RSCAN_FROM_RSCAN0TMID63, \
+    &RSCAN_FROM_RSCAN0TMID64, &RSCAN_FROM_RSCAN0TMID65, &RSCAN_FROM_RSCAN0TMID66, &RSCAN_FROM_RSCAN0TMID67, &RSCAN_FROM_RSCAN0TMID68, &RSCAN_FROM_RSCAN0TMID69, &RSCAN_FROM_RSCAN0TMID70, &RSCAN_FROM_RSCAN0TMID71, \
+    &RSCAN_FROM_RSCAN0TMID72, &RSCAN_FROM_RSCAN0TMID73, &RSCAN_FROM_RSCAN0TMID74, &RSCAN_FROM_RSCAN0TMID75, &RSCAN_FROM_RSCAN0TMID76, &RSCAN_FROM_RSCAN0TMID77, &RSCAN_FROM_RSCAN0TMID78, &RSCAN_FROM_RSCAN0TMID79 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define RSCAN_FROM_RSCAN0TMID0 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID0) /* RSCAN_FROM_RSCAN0TMID0 */
+#define RSCAN_FROM_RSCAN0TMID1 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID1) /* RSCAN_FROM_RSCAN0TMID1 */
+#define RSCAN_FROM_RSCAN0TMID2 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID2) /* RSCAN_FROM_RSCAN0TMID2 */
+#define RSCAN_FROM_RSCAN0TMID3 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID3) /* RSCAN_FROM_RSCAN0TMID3 */
+#define RSCAN_FROM_RSCAN0TMID4 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID4) /* RSCAN_FROM_RSCAN0TMID4 */
+#define RSCAN_FROM_RSCAN0TMID5 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID5) /* RSCAN_FROM_RSCAN0TMID5 */
+#define RSCAN_FROM_RSCAN0TMID6 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID6) /* RSCAN_FROM_RSCAN0TMID6 */
+#define RSCAN_FROM_RSCAN0TMID7 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID7) /* RSCAN_FROM_RSCAN0TMID7 */
+#define RSCAN_FROM_RSCAN0TMID8 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID8) /* RSCAN_FROM_RSCAN0TMID8 */
+#define RSCAN_FROM_RSCAN0TMID9 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID9) /* RSCAN_FROM_RSCAN0TMID9 */
+#define RSCAN_FROM_RSCAN0TMID10 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID10) /* RSCAN_FROM_RSCAN0TMID10 */
+#define RSCAN_FROM_RSCAN0TMID11 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID11) /* RSCAN_FROM_RSCAN0TMID11 */
+#define RSCAN_FROM_RSCAN0TMID12 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID12) /* RSCAN_FROM_RSCAN0TMID12 */
+#define RSCAN_FROM_RSCAN0TMID13 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID13) /* RSCAN_FROM_RSCAN0TMID13 */
+#define RSCAN_FROM_RSCAN0TMID14 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID14) /* RSCAN_FROM_RSCAN0TMID14 */
+#define RSCAN_FROM_RSCAN0TMID15 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID15) /* RSCAN_FROM_RSCAN0TMID15 */
+#define RSCAN_FROM_RSCAN0TMID16 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID16) /* RSCAN_FROM_RSCAN0TMID16 */
+#define RSCAN_FROM_RSCAN0TMID17 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID17) /* RSCAN_FROM_RSCAN0TMID17 */
+#define RSCAN_FROM_RSCAN0TMID18 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID18) /* RSCAN_FROM_RSCAN0TMID18 */
+#define RSCAN_FROM_RSCAN0TMID19 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID19) /* RSCAN_FROM_RSCAN0TMID19 */
+#define RSCAN_FROM_RSCAN0TMID20 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID20) /* RSCAN_FROM_RSCAN0TMID20 */
+#define RSCAN_FROM_RSCAN0TMID21 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID21) /* RSCAN_FROM_RSCAN0TMID21 */
+#define RSCAN_FROM_RSCAN0TMID22 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID22) /* RSCAN_FROM_RSCAN0TMID22 */
+#define RSCAN_FROM_RSCAN0TMID23 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID23) /* RSCAN_FROM_RSCAN0TMID23 */
+#define RSCAN_FROM_RSCAN0TMID24 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID24) /* RSCAN_FROM_RSCAN0TMID24 */
+#define RSCAN_FROM_RSCAN0TMID25 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID25) /* RSCAN_FROM_RSCAN0TMID25 */
+#define RSCAN_FROM_RSCAN0TMID26 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID26) /* RSCAN_FROM_RSCAN0TMID26 */
+#define RSCAN_FROM_RSCAN0TMID27 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID27) /* RSCAN_FROM_RSCAN0TMID27 */
+#define RSCAN_FROM_RSCAN0TMID28 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID28) /* RSCAN_FROM_RSCAN0TMID28 */
+#define RSCAN_FROM_RSCAN0TMID29 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID29) /* RSCAN_FROM_RSCAN0TMID29 */
+#define RSCAN_FROM_RSCAN0TMID30 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID30) /* RSCAN_FROM_RSCAN0TMID30 */
+#define RSCAN_FROM_RSCAN0TMID31 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID31) /* RSCAN_FROM_RSCAN0TMID31 */
+#define RSCAN_FROM_RSCAN0TMID32 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID32) /* RSCAN_FROM_RSCAN0TMID32 */
+#define RSCAN_FROM_RSCAN0TMID33 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID33) /* RSCAN_FROM_RSCAN0TMID33 */
+#define RSCAN_FROM_RSCAN0TMID34 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID34) /* RSCAN_FROM_RSCAN0TMID34 */
+#define RSCAN_FROM_RSCAN0TMID35 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID35) /* RSCAN_FROM_RSCAN0TMID35 */
+#define RSCAN_FROM_RSCAN0TMID36 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID36) /* RSCAN_FROM_RSCAN0TMID36 */
+#define RSCAN_FROM_RSCAN0TMID37 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID37) /* RSCAN_FROM_RSCAN0TMID37 */
+#define RSCAN_FROM_RSCAN0TMID38 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID38) /* RSCAN_FROM_RSCAN0TMID38 */
+#define RSCAN_FROM_RSCAN0TMID39 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID39) /* RSCAN_FROM_RSCAN0TMID39 */
+#define RSCAN_FROM_RSCAN0TMID40 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID40) /* RSCAN_FROM_RSCAN0TMID40 */
+#define RSCAN_FROM_RSCAN0TMID41 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID41) /* RSCAN_FROM_RSCAN0TMID41 */
+#define RSCAN_FROM_RSCAN0TMID42 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID42) /* RSCAN_FROM_RSCAN0TMID42 */
+#define RSCAN_FROM_RSCAN0TMID43 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID43) /* RSCAN_FROM_RSCAN0TMID43 */
+#define RSCAN_FROM_RSCAN0TMID44 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID44) /* RSCAN_FROM_RSCAN0TMID44 */
+#define RSCAN_FROM_RSCAN0TMID45 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID45) /* RSCAN_FROM_RSCAN0TMID45 */
+#define RSCAN_FROM_RSCAN0TMID46 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID46) /* RSCAN_FROM_RSCAN0TMID46 */
+#define RSCAN_FROM_RSCAN0TMID47 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID47) /* RSCAN_FROM_RSCAN0TMID47 */
+#define RSCAN_FROM_RSCAN0TMID48 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID48) /* RSCAN_FROM_RSCAN0TMID48 */
+#define RSCAN_FROM_RSCAN0TMID49 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID49) /* RSCAN_FROM_RSCAN0TMID49 */
+#define RSCAN_FROM_RSCAN0TMID50 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID50) /* RSCAN_FROM_RSCAN0TMID50 */
+#define RSCAN_FROM_RSCAN0TMID51 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID51) /* RSCAN_FROM_RSCAN0TMID51 */
+#define RSCAN_FROM_RSCAN0TMID52 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID52) /* RSCAN_FROM_RSCAN0TMID52 */
+#define RSCAN_FROM_RSCAN0TMID53 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID53) /* RSCAN_FROM_RSCAN0TMID53 */
+#define RSCAN_FROM_RSCAN0TMID54 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID54) /* RSCAN_FROM_RSCAN0TMID54 */
+#define RSCAN_FROM_RSCAN0TMID55 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID55) /* RSCAN_FROM_RSCAN0TMID55 */
+#define RSCAN_FROM_RSCAN0TMID56 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID56) /* RSCAN_FROM_RSCAN0TMID56 */
+#define RSCAN_FROM_RSCAN0TMID57 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID57) /* RSCAN_FROM_RSCAN0TMID57 */
+#define RSCAN_FROM_RSCAN0TMID58 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID58) /* RSCAN_FROM_RSCAN0TMID58 */
+#define RSCAN_FROM_RSCAN0TMID59 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID59) /* RSCAN_FROM_RSCAN0TMID59 */
+#define RSCAN_FROM_RSCAN0TMID60 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID60) /* RSCAN_FROM_RSCAN0TMID60 */
+#define RSCAN_FROM_RSCAN0TMID61 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID61) /* RSCAN_FROM_RSCAN0TMID61 */
+#define RSCAN_FROM_RSCAN0TMID62 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID62) /* RSCAN_FROM_RSCAN0TMID62 */
+#define RSCAN_FROM_RSCAN0TMID63 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID63) /* RSCAN_FROM_RSCAN0TMID63 */
+#define RSCAN_FROM_RSCAN0TMID64 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID64) /* RSCAN_FROM_RSCAN0TMID64 */
+#define RSCAN_FROM_RSCAN0TMID65 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID65) /* RSCAN_FROM_RSCAN0TMID65 */
+#define RSCAN_FROM_RSCAN0TMID66 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID66) /* RSCAN_FROM_RSCAN0TMID66 */
+#define RSCAN_FROM_RSCAN0TMID67 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID67) /* RSCAN_FROM_RSCAN0TMID67 */
+#define RSCAN_FROM_RSCAN0TMID68 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID68) /* RSCAN_FROM_RSCAN0TMID68 */
+#define RSCAN_FROM_RSCAN0TMID69 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID69) /* RSCAN_FROM_RSCAN0TMID69 */
+#define RSCAN_FROM_RSCAN0TMID70 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID70) /* RSCAN_FROM_RSCAN0TMID70 */
+#define RSCAN_FROM_RSCAN0TMID71 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID71) /* RSCAN_FROM_RSCAN0TMID71 */
+#define RSCAN_FROM_RSCAN0TMID72 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID72) /* RSCAN_FROM_RSCAN0TMID72 */
+#define RSCAN_FROM_RSCAN0TMID73 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID73) /* RSCAN_FROM_RSCAN0TMID73 */
+#define RSCAN_FROM_RSCAN0TMID74 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID74) /* RSCAN_FROM_RSCAN0TMID74 */
+#define RSCAN_FROM_RSCAN0TMID75 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID75) /* RSCAN_FROM_RSCAN0TMID75 */
+#define RSCAN_FROM_RSCAN0TMID76 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID76) /* RSCAN_FROM_RSCAN0TMID76 */
+#define RSCAN_FROM_RSCAN0TMID77 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID77) /* RSCAN_FROM_RSCAN0TMID77 */
+#define RSCAN_FROM_RSCAN0TMID78 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID78) /* RSCAN_FROM_RSCAN0TMID78 */
+#define RSCAN_FROM_RSCAN0TMID79 (*(struct st_rscan_from_rscan0tmidp *)&RSCAN0.TMID79) /* RSCAN_FROM_RSCAN0TMID79 */
+
+
+/* Channnel array defines of RSCAN_FROM_RSCAN0RFIDm */
+/*(Sample) value = RSCAN_FROM_RSCAN0RFIDm[ channel ]->RFIDm.UINT32; */
+#define RSCAN_FROM_RSCAN0RFIDm_COUNT  8
+#define RSCAN_FROM_RSCAN0RFIDm_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &RSCAN_FROM_RSCAN0RFID0, &RSCAN_FROM_RSCAN0RFID1, &RSCAN_FROM_RSCAN0RFID2, &RSCAN_FROM_RSCAN0RFID3, &RSCAN_FROM_RSCAN0RFID4, &RSCAN_FROM_RSCAN0RFID5, &RSCAN_FROM_RSCAN0RFID6, &RSCAN_FROM_RSCAN0RFID7 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define RSCAN_FROM_RSCAN0RFID0 (*(struct st_rscan_from_rscan0rfidm *)&RSCAN0.RFID0) /* RSCAN_FROM_RSCAN0RFID0 */
+#define RSCAN_FROM_RSCAN0RFID1 (*(struct st_rscan_from_rscan0rfidm *)&RSCAN0.RFID1) /* RSCAN_FROM_RSCAN0RFID1 */
+#define RSCAN_FROM_RSCAN0RFID2 (*(struct st_rscan_from_rscan0rfidm *)&RSCAN0.RFID2) /* RSCAN_FROM_RSCAN0RFID2 */
+#define RSCAN_FROM_RSCAN0RFID3 (*(struct st_rscan_from_rscan0rfidm *)&RSCAN0.RFID3) /* RSCAN_FROM_RSCAN0RFID3 */
+#define RSCAN_FROM_RSCAN0RFID4 (*(struct st_rscan_from_rscan0rfidm *)&RSCAN0.RFID4) /* RSCAN_FROM_RSCAN0RFID4 */
+#define RSCAN_FROM_RSCAN0RFID5 (*(struct st_rscan_from_rscan0rfidm *)&RSCAN0.RFID5) /* RSCAN_FROM_RSCAN0RFID5 */
+#define RSCAN_FROM_RSCAN0RFID6 (*(struct st_rscan_from_rscan0rfidm *)&RSCAN0.RFID6) /* RSCAN_FROM_RSCAN0RFID6 */
+#define RSCAN_FROM_RSCAN0RFID7 (*(struct st_rscan_from_rscan0rfidm *)&RSCAN0.RFID7) /* RSCAN_FROM_RSCAN0RFID7 */
+
+
+/* Channnel array defines of RSCAN_FROM_RSCAN0RMIDp */
+/*(Sample) value = RSCAN_FROM_RSCAN0RMIDp[ channel ]->RMIDp.UINT32; */
+#define RSCAN_FROM_RSCAN0RMIDp_COUNT  80
+#define RSCAN_FROM_RSCAN0RMIDp_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &RSCAN_FROM_RSCAN0RMID0, &RSCAN_FROM_RSCAN0RMID1, &RSCAN_FROM_RSCAN0RMID2, &RSCAN_FROM_RSCAN0RMID3, &RSCAN_FROM_RSCAN0RMID4, &RSCAN_FROM_RSCAN0RMID5, &RSCAN_FROM_RSCAN0RMID6, &RSCAN_FROM_RSCAN0RMID7, \
+    &RSCAN_FROM_RSCAN0RMID8, &RSCAN_FROM_RSCAN0RMID9, &RSCAN_FROM_RSCAN0RMID10, &RSCAN_FROM_RSCAN0RMID11, &RSCAN_FROM_RSCAN0RMID12, &RSCAN_FROM_RSCAN0RMID13, &RSCAN_FROM_RSCAN0RMID14, &RSCAN_FROM_RSCAN0RMID15, \
+    &RSCAN_FROM_RSCAN0RMID16, &RSCAN_FROM_RSCAN0RMID17, &RSCAN_FROM_RSCAN0RMID18, &RSCAN_FROM_RSCAN0RMID19, &RSCAN_FROM_RSCAN0RMID20, &RSCAN_FROM_RSCAN0RMID21, &RSCAN_FROM_RSCAN0RMID22, &RSCAN_FROM_RSCAN0RMID23, \
+    &RSCAN_FROM_RSCAN0RMID24, &RSCAN_FROM_RSCAN0RMID25, &RSCAN_FROM_RSCAN0RMID26, &RSCAN_FROM_RSCAN0RMID27, &RSCAN_FROM_RSCAN0RMID28, &RSCAN_FROM_RSCAN0RMID29, &RSCAN_FROM_RSCAN0RMID30, &RSCAN_FROM_RSCAN0RMID31, \
+    &RSCAN_FROM_RSCAN0RMID32, &RSCAN_FROM_RSCAN0RMID33, &RSCAN_FROM_RSCAN0RMID34, &RSCAN_FROM_RSCAN0RMID35, &RSCAN_FROM_RSCAN0RMID36, &RSCAN_FROM_RSCAN0RMID37, &RSCAN_FROM_RSCAN0RMID38, &RSCAN_FROM_RSCAN0RMID39, \
+    &RSCAN_FROM_RSCAN0RMID40, &RSCAN_FROM_RSCAN0RMID41, &RSCAN_FROM_RSCAN0RMID42, &RSCAN_FROM_RSCAN0RMID43, &RSCAN_FROM_RSCAN0RMID44, &RSCAN_FROM_RSCAN0RMID45, &RSCAN_FROM_RSCAN0RMID46, &RSCAN_FROM_RSCAN0RMID47, \
+    &RSCAN_FROM_RSCAN0RMID48, &RSCAN_FROM_RSCAN0RMID49, &RSCAN_FROM_RSCAN0RMID50, &RSCAN_FROM_RSCAN0RMID51, &RSCAN_FROM_RSCAN0RMID52, &RSCAN_FROM_RSCAN0RMID53, &RSCAN_FROM_RSCAN0RMID54, &RSCAN_FROM_RSCAN0RMID55, \
+    &RSCAN_FROM_RSCAN0RMID56, &RSCAN_FROM_RSCAN0RMID57, &RSCAN_FROM_RSCAN0RMID58, &RSCAN_FROM_RSCAN0RMID59, &RSCAN_FROM_RSCAN0RMID60, &RSCAN_FROM_RSCAN0RMID61, &RSCAN_FROM_RSCAN0RMID62, &RSCAN_FROM_RSCAN0RMID63, \
+    &RSCAN_FROM_RSCAN0RMID64, &RSCAN_FROM_RSCAN0RMID65, &RSCAN_FROM_RSCAN0RMID66, &RSCAN_FROM_RSCAN0RMID67, &RSCAN_FROM_RSCAN0RMID68, &RSCAN_FROM_RSCAN0RMID69, &RSCAN_FROM_RSCAN0RMID70, &RSCAN_FROM_RSCAN0RMID71, \
+    &RSCAN_FROM_RSCAN0RMID72, &RSCAN_FROM_RSCAN0RMID73, &RSCAN_FROM_RSCAN0RMID74, &RSCAN_FROM_RSCAN0RMID75, &RSCAN_FROM_RSCAN0RMID76, &RSCAN_FROM_RSCAN0RMID77, &RSCAN_FROM_RSCAN0RMID78, &RSCAN_FROM_RSCAN0RMID79 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define RSCAN_FROM_RSCAN0RMID0 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID0) /* RSCAN_FROM_RSCAN0RMID0 */
+#define RSCAN_FROM_RSCAN0RMID1 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID1) /* RSCAN_FROM_RSCAN0RMID1 */
+#define RSCAN_FROM_RSCAN0RMID2 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID2) /* RSCAN_FROM_RSCAN0RMID2 */
+#define RSCAN_FROM_RSCAN0RMID3 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID3) /* RSCAN_FROM_RSCAN0RMID3 */
+#define RSCAN_FROM_RSCAN0RMID4 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID4) /* RSCAN_FROM_RSCAN0RMID4 */
+#define RSCAN_FROM_RSCAN0RMID5 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID5) /* RSCAN_FROM_RSCAN0RMID5 */
+#define RSCAN_FROM_RSCAN0RMID6 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID6) /* RSCAN_FROM_RSCAN0RMID6 */
+#define RSCAN_FROM_RSCAN0RMID7 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID7) /* RSCAN_FROM_RSCAN0RMID7 */
+#define RSCAN_FROM_RSCAN0RMID8 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID8) /* RSCAN_FROM_RSCAN0RMID8 */
+#define RSCAN_FROM_RSCAN0RMID9 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID9) /* RSCAN_FROM_RSCAN0RMID9 */
+#define RSCAN_FROM_RSCAN0RMID10 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID10) /* RSCAN_FROM_RSCAN0RMID10 */
+#define RSCAN_FROM_RSCAN0RMID11 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID11) /* RSCAN_FROM_RSCAN0RMID11 */
+#define RSCAN_FROM_RSCAN0RMID12 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID12) /* RSCAN_FROM_RSCAN0RMID12 */
+#define RSCAN_FROM_RSCAN0RMID13 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID13) /* RSCAN_FROM_RSCAN0RMID13 */
+#define RSCAN_FROM_RSCAN0RMID14 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID14) /* RSCAN_FROM_RSCAN0RMID14 */
+#define RSCAN_FROM_RSCAN0RMID15 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID15) /* RSCAN_FROM_RSCAN0RMID15 */
+#define RSCAN_FROM_RSCAN0RMID16 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID16) /* RSCAN_FROM_RSCAN0RMID16 */
+#define RSCAN_FROM_RSCAN0RMID17 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID17) /* RSCAN_FROM_RSCAN0RMID17 */
+#define RSCAN_FROM_RSCAN0RMID18 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID18) /* RSCAN_FROM_RSCAN0RMID18 */
+#define RSCAN_FROM_RSCAN0RMID19 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID19) /* RSCAN_FROM_RSCAN0RMID19 */
+#define RSCAN_FROM_RSCAN0RMID20 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID20) /* RSCAN_FROM_RSCAN0RMID20 */
+#define RSCAN_FROM_RSCAN0RMID21 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID21) /* RSCAN_FROM_RSCAN0RMID21 */
+#define RSCAN_FROM_RSCAN0RMID22 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID22) /* RSCAN_FROM_RSCAN0RMID22 */
+#define RSCAN_FROM_RSCAN0RMID23 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID23) /* RSCAN_FROM_RSCAN0RMID23 */
+#define RSCAN_FROM_RSCAN0RMID24 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID24) /* RSCAN_FROM_RSCAN0RMID24 */
+#define RSCAN_FROM_RSCAN0RMID25 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID25) /* RSCAN_FROM_RSCAN0RMID25 */
+#define RSCAN_FROM_RSCAN0RMID26 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID26) /* RSCAN_FROM_RSCAN0RMID26 */
+#define RSCAN_FROM_RSCAN0RMID27 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID27) /* RSCAN_FROM_RSCAN0RMID27 */
+#define RSCAN_FROM_RSCAN0RMID28 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID28) /* RSCAN_FROM_RSCAN0RMID28 */
+#define RSCAN_FROM_RSCAN0RMID29 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID29) /* RSCAN_FROM_RSCAN0RMID29 */
+#define RSCAN_FROM_RSCAN0RMID30 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID30) /* RSCAN_FROM_RSCAN0RMID30 */
+#define RSCAN_FROM_RSCAN0RMID31 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID31) /* RSCAN_FROM_RSCAN0RMID31 */
+#define RSCAN_FROM_RSCAN0RMID32 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID32) /* RSCAN_FROM_RSCAN0RMID32 */
+#define RSCAN_FROM_RSCAN0RMID33 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID33) /* RSCAN_FROM_RSCAN0RMID33 */
+#define RSCAN_FROM_RSCAN0RMID34 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID34) /* RSCAN_FROM_RSCAN0RMID34 */
+#define RSCAN_FROM_RSCAN0RMID35 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID35) /* RSCAN_FROM_RSCAN0RMID35 */
+#define RSCAN_FROM_RSCAN0RMID36 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID36) /* RSCAN_FROM_RSCAN0RMID36 */
+#define RSCAN_FROM_RSCAN0RMID37 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID37) /* RSCAN_FROM_RSCAN0RMID37 */
+#define RSCAN_FROM_RSCAN0RMID38 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID38) /* RSCAN_FROM_RSCAN0RMID38 */
+#define RSCAN_FROM_RSCAN0RMID39 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID39) /* RSCAN_FROM_RSCAN0RMID39 */
+#define RSCAN_FROM_RSCAN0RMID40 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID40) /* RSCAN_FROM_RSCAN0RMID40 */
+#define RSCAN_FROM_RSCAN0RMID41 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID41) /* RSCAN_FROM_RSCAN0RMID41 */
+#define RSCAN_FROM_RSCAN0RMID42 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID42) /* RSCAN_FROM_RSCAN0RMID42 */
+#define RSCAN_FROM_RSCAN0RMID43 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID43) /* RSCAN_FROM_RSCAN0RMID43 */
+#define RSCAN_FROM_RSCAN0RMID44 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID44) /* RSCAN_FROM_RSCAN0RMID44 */
+#define RSCAN_FROM_RSCAN0RMID45 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID45) /* RSCAN_FROM_RSCAN0RMID45 */
+#define RSCAN_FROM_RSCAN0RMID46 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID46) /* RSCAN_FROM_RSCAN0RMID46 */
+#define RSCAN_FROM_RSCAN0RMID47 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID47) /* RSCAN_FROM_RSCAN0RMID47 */
+#define RSCAN_FROM_RSCAN0RMID48 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID48) /* RSCAN_FROM_RSCAN0RMID48 */
+#define RSCAN_FROM_RSCAN0RMID49 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID49) /* RSCAN_FROM_RSCAN0RMID49 */
+#define RSCAN_FROM_RSCAN0RMID50 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID50) /* RSCAN_FROM_RSCAN0RMID50 */
+#define RSCAN_FROM_RSCAN0RMID51 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID51) /* RSCAN_FROM_RSCAN0RMID51 */
+#define RSCAN_FROM_RSCAN0RMID52 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID52) /* RSCAN_FROM_RSCAN0RMID52 */
+#define RSCAN_FROM_RSCAN0RMID53 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID53) /* RSCAN_FROM_RSCAN0RMID53 */
+#define RSCAN_FROM_RSCAN0RMID54 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID54) /* RSCAN_FROM_RSCAN0RMID54 */
+#define RSCAN_FROM_RSCAN0RMID55 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID55) /* RSCAN_FROM_RSCAN0RMID55 */
+#define RSCAN_FROM_RSCAN0RMID56 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID56) /* RSCAN_FROM_RSCAN0RMID56 */
+#define RSCAN_FROM_RSCAN0RMID57 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID57) /* RSCAN_FROM_RSCAN0RMID57 */
+#define RSCAN_FROM_RSCAN0RMID58 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID58) /* RSCAN_FROM_RSCAN0RMID58 */
+#define RSCAN_FROM_RSCAN0RMID59 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID59) /* RSCAN_FROM_RSCAN0RMID59 */
+#define RSCAN_FROM_RSCAN0RMID60 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID60) /* RSCAN_FROM_RSCAN0RMID60 */
+#define RSCAN_FROM_RSCAN0RMID61 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID61) /* RSCAN_FROM_RSCAN0RMID61 */
+#define RSCAN_FROM_RSCAN0RMID62 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID62) /* RSCAN_FROM_RSCAN0RMID62 */
+#define RSCAN_FROM_RSCAN0RMID63 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID63) /* RSCAN_FROM_RSCAN0RMID63 */
+#define RSCAN_FROM_RSCAN0RMID64 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID64) /* RSCAN_FROM_RSCAN0RMID64 */
+#define RSCAN_FROM_RSCAN0RMID65 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID65) /* RSCAN_FROM_RSCAN0RMID65 */
+#define RSCAN_FROM_RSCAN0RMID66 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID66) /* RSCAN_FROM_RSCAN0RMID66 */
+#define RSCAN_FROM_RSCAN0RMID67 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID67) /* RSCAN_FROM_RSCAN0RMID67 */
+#define RSCAN_FROM_RSCAN0RMID68 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID68) /* RSCAN_FROM_RSCAN0RMID68 */
+#define RSCAN_FROM_RSCAN0RMID69 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID69) /* RSCAN_FROM_RSCAN0RMID69 */
+#define RSCAN_FROM_RSCAN0RMID70 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID70) /* RSCAN_FROM_RSCAN0RMID70 */
+#define RSCAN_FROM_RSCAN0RMID71 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID71) /* RSCAN_FROM_RSCAN0RMID71 */
+#define RSCAN_FROM_RSCAN0RMID72 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID72) /* RSCAN_FROM_RSCAN0RMID72 */
+#define RSCAN_FROM_RSCAN0RMID73 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID73) /* RSCAN_FROM_RSCAN0RMID73 */
+#define RSCAN_FROM_RSCAN0RMID74 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID74) /* RSCAN_FROM_RSCAN0RMID74 */
+#define RSCAN_FROM_RSCAN0RMID75 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID75) /* RSCAN_FROM_RSCAN0RMID75 */
+#define RSCAN_FROM_RSCAN0RMID76 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID76) /* RSCAN_FROM_RSCAN0RMID76 */
+#define RSCAN_FROM_RSCAN0RMID77 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID77) /* RSCAN_FROM_RSCAN0RMID77 */
+#define RSCAN_FROM_RSCAN0RMID78 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID78) /* RSCAN_FROM_RSCAN0RMID78 */
+#define RSCAN_FROM_RSCAN0RMID79 (*(struct st_rscan_from_rscan0rmidp *)&RSCAN0.RMID79) /* RSCAN_FROM_RSCAN0RMID79 */
+
+
+/* Channnel array defines of RSCAN_FROM_RSCAN0GAFLIDj */
+/*(Sample) value = RSCAN_FROM_RSCAN0GAFLIDj[ channel ]->GAFLIDj.UINT32; */
+#define RSCAN_FROM_RSCAN0GAFLIDj_COUNT  16
+#define RSCAN_FROM_RSCAN0GAFLIDj_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &RSCAN_FROM_RSCAN0GAFLID0, &RSCAN_FROM_RSCAN0GAFLID1, &RSCAN_FROM_RSCAN0GAFLID2, &RSCAN_FROM_RSCAN0GAFLID3, &RSCAN_FROM_RSCAN0GAFLID4, &RSCAN_FROM_RSCAN0GAFLID5, &RSCAN_FROM_RSCAN0GAFLID6, &RSCAN_FROM_RSCAN0GAFLID7, \
+    &RSCAN_FROM_RSCAN0GAFLID8, &RSCAN_FROM_RSCAN0GAFLID9, &RSCAN_FROM_RSCAN0GAFLID10, &RSCAN_FROM_RSCAN0GAFLID11, &RSCAN_FROM_RSCAN0GAFLID12, &RSCAN_FROM_RSCAN0GAFLID13, &RSCAN_FROM_RSCAN0GAFLID14, &RSCAN_FROM_RSCAN0GAFLID15 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define RSCAN_FROM_RSCAN0GAFLID0 (*(struct st_rscan_from_rscan0gaflidj *)&RSCAN0.GAFLID0) /* RSCAN_FROM_RSCAN0GAFLID0 */
+#define RSCAN_FROM_RSCAN0GAFLID1 (*(struct st_rscan_from_rscan0gaflidj *)&RSCAN0.GAFLID1) /* RSCAN_FROM_RSCAN0GAFLID1 */
+#define RSCAN_FROM_RSCAN0GAFLID2 (*(struct st_rscan_from_rscan0gaflidj *)&RSCAN0.GAFLID2) /* RSCAN_FROM_RSCAN0GAFLID2 */
+#define RSCAN_FROM_RSCAN0GAFLID3 (*(struct st_rscan_from_rscan0gaflidj *)&RSCAN0.GAFLID3) /* RSCAN_FROM_RSCAN0GAFLID3 */
+#define RSCAN_FROM_RSCAN0GAFLID4 (*(struct st_rscan_from_rscan0gaflidj *)&RSCAN0.GAFLID4) /* RSCAN_FROM_RSCAN0GAFLID4 */
+#define RSCAN_FROM_RSCAN0GAFLID5 (*(struct st_rscan_from_rscan0gaflidj *)&RSCAN0.GAFLID5) /* RSCAN_FROM_RSCAN0GAFLID5 */
+#define RSCAN_FROM_RSCAN0GAFLID6 (*(struct st_rscan_from_rscan0gaflidj *)&RSCAN0.GAFLID6) /* RSCAN_FROM_RSCAN0GAFLID6 */
+#define RSCAN_FROM_RSCAN0GAFLID7 (*(struct st_rscan_from_rscan0gaflidj *)&RSCAN0.GAFLID7) /* RSCAN_FROM_RSCAN0GAFLID7 */
+#define RSCAN_FROM_RSCAN0GAFLID8 (*(struct st_rscan_from_rscan0gaflidj *)&RSCAN0.GAFLID8) /* RSCAN_FROM_RSCAN0GAFLID8 */
+#define RSCAN_FROM_RSCAN0GAFLID9 (*(struct st_rscan_from_rscan0gaflidj *)&RSCAN0.GAFLID9) /* RSCAN_FROM_RSCAN0GAFLID9 */
+#define RSCAN_FROM_RSCAN0GAFLID10 (*(struct st_rscan_from_rscan0gaflidj *)&RSCAN0.GAFLID10) /* RSCAN_FROM_RSCAN0GAFLID10 */
+#define RSCAN_FROM_RSCAN0GAFLID11 (*(struct st_rscan_from_rscan0gaflidj *)&RSCAN0.GAFLID11) /* RSCAN_FROM_RSCAN0GAFLID11 */
+#define RSCAN_FROM_RSCAN0GAFLID12 (*(struct st_rscan_from_rscan0gaflidj *)&RSCAN0.GAFLID12) /* RSCAN_FROM_RSCAN0GAFLID12 */
+#define RSCAN_FROM_RSCAN0GAFLID13 (*(struct st_rscan_from_rscan0gaflidj *)&RSCAN0.GAFLID13) /* RSCAN_FROM_RSCAN0GAFLID13 */
+#define RSCAN_FROM_RSCAN0GAFLID14 (*(struct st_rscan_from_rscan0gaflidj *)&RSCAN0.GAFLID14) /* RSCAN_FROM_RSCAN0GAFLID14 */
+#define RSCAN_FROM_RSCAN0GAFLID15 (*(struct st_rscan_from_rscan0gaflidj *)&RSCAN0.GAFLID15) /* RSCAN_FROM_RSCAN0GAFLID15 */
+
+
+/* Channnel array defines of RSCAN_FROM_RSCAN0CnCFG */
+/*(Sample) value = RSCAN_FROM_RSCAN0CnCFG[ channel ]->CnCFG.UINT32; */
+#define RSCAN_FROM_RSCAN0CnCFG_COUNT  5
+#define RSCAN_FROM_RSCAN0CnCFG_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &RSCAN_FROM_RSCAN0C0CFG, &RSCAN_FROM_RSCAN0C1CFG, &RSCAN_FROM_RSCAN0C2CFG, &RSCAN_FROM_RSCAN0C3CFG, &RSCAN_FROM_RSCAN0C4CFG \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define RSCAN_FROM_RSCAN0C0CFG (*(struct st_rscan_from_rscan0cncfg *)&RSCAN0.C0CFG) /* RSCAN_FROM_RSCAN0C0CFG */
+#define RSCAN_FROM_RSCAN0C1CFG (*(struct st_rscan_from_rscan0cncfg *)&RSCAN0.C1CFG) /* RSCAN_FROM_RSCAN0C1CFG */
+#define RSCAN_FROM_RSCAN0C2CFG (*(struct st_rscan_from_rscan0cncfg *)&RSCAN0.C2CFG) /* RSCAN_FROM_RSCAN0C2CFG */
+#define RSCAN_FROM_RSCAN0C3CFG (*(struct st_rscan_from_rscan0cncfg *)&RSCAN0.C3CFG) /* RSCAN_FROM_RSCAN0C3CFG */
+#define RSCAN_FROM_RSCAN0C4CFG (*(struct st_rscan_from_rscan0cncfg *)&RSCAN0.C4CFG) /* RSCAN_FROM_RSCAN0C4CFG */
+
+/* End of channnel array defines of RSCAN0 */
+
+
+#define RSCAN0C0CFG RSCAN0.C0CFG.UINT32
+#define RSCAN0C0CFGL RSCAN0.C0CFG.UINT16[L]
+#define RSCAN0C0CFGLL RSCAN0.C0CFG.UINT8[LL]
+#define RSCAN0C0CFGLH RSCAN0.C0CFG.UINT8[LH]
+#define RSCAN0C0CFGH RSCAN0.C0CFG.UINT16[H]
+#define RSCAN0C0CFGHL RSCAN0.C0CFG.UINT8[HL]
+#define RSCAN0C0CFGHH RSCAN0.C0CFG.UINT8[HH]
+#define RSCAN0C0CTR RSCAN0.C0CTR.UINT32
+#define RSCAN0C0CTRL RSCAN0.C0CTR.UINT16[L]
+#define RSCAN0C0CTRLL RSCAN0.C0CTR.UINT8[LL]
+#define RSCAN0C0CTRLH RSCAN0.C0CTR.UINT8[LH]
+#define RSCAN0C0CTRH RSCAN0.C0CTR.UINT16[H]
+#define RSCAN0C0CTRHL RSCAN0.C0CTR.UINT8[HL]
+#define RSCAN0C0CTRHH RSCAN0.C0CTR.UINT8[HH]
+#define RSCAN0C0STS RSCAN0.C0STS.UINT32
+#define RSCAN0C0STSL RSCAN0.C0STS.UINT16[L]
+#define RSCAN0C0STSLL RSCAN0.C0STS.UINT8[LL]
+#define RSCAN0C0STSLH RSCAN0.C0STS.UINT8[LH]
+#define RSCAN0C0STSH RSCAN0.C0STS.UINT16[H]
+#define RSCAN0C0STSHL RSCAN0.C0STS.UINT8[HL]
+#define RSCAN0C0STSHH RSCAN0.C0STS.UINT8[HH]
+#define RSCAN0C0ERFL RSCAN0.C0ERFL.UINT32
+#define RSCAN0C0ERFLL RSCAN0.C0ERFL.UINT16[L]
+#define RSCAN0C0ERFLLL RSCAN0.C0ERFL.UINT8[LL]
+#define RSCAN0C0ERFLLH RSCAN0.C0ERFL.UINT8[LH]
+#define RSCAN0C0ERFLH RSCAN0.C0ERFL.UINT16[H]
+#define RSCAN0C0ERFLHL RSCAN0.C0ERFL.UINT8[HL]
+#define RSCAN0C0ERFLHH RSCAN0.C0ERFL.UINT8[HH]
+#define RSCAN0C1CFG RSCAN0.C1CFG.UINT32
+#define RSCAN0C1CFGL RSCAN0.C1CFG.UINT16[L]
+#define RSCAN0C1CFGLL RSCAN0.C1CFG.UINT8[LL]
+#define RSCAN0C1CFGLH RSCAN0.C1CFG.UINT8[LH]
+#define RSCAN0C1CFGH RSCAN0.C1CFG.UINT16[H]
+#define RSCAN0C1CFGHL RSCAN0.C1CFG.UINT8[HL]
+#define RSCAN0C1CFGHH RSCAN0.C1CFG.UINT8[HH]
+#define RSCAN0C1CTR RSCAN0.C1CTR.UINT32
+#define RSCAN0C1CTRL RSCAN0.C1CTR.UINT16[L]
+#define RSCAN0C1CTRLL RSCAN0.C1CTR.UINT8[LL]
+#define RSCAN0C1CTRLH RSCAN0.C1CTR.UINT8[LH]
+#define RSCAN0C1CTRH RSCAN0.C1CTR.UINT16[H]
+#define RSCAN0C1CTRHL RSCAN0.C1CTR.UINT8[HL]
+#define RSCAN0C1CTRHH RSCAN0.C1CTR.UINT8[HH]
+#define RSCAN0C1STS RSCAN0.C1STS.UINT32
+#define RSCAN0C1STSL RSCAN0.C1STS.UINT16[L]
+#define RSCAN0C1STSLL RSCAN0.C1STS.UINT8[LL]
+#define RSCAN0C1STSLH RSCAN0.C1STS.UINT8[LH]
+#define RSCAN0C1STSH RSCAN0.C1STS.UINT16[H]
+#define RSCAN0C1STSHL RSCAN0.C1STS.UINT8[HL]
+#define RSCAN0C1STSHH RSCAN0.C1STS.UINT8[HH]
+#define RSCAN0C1ERFL RSCAN0.C1ERFL.UINT32
+#define RSCAN0C1ERFLL RSCAN0.C1ERFL.UINT16[L]
+#define RSCAN0C1ERFLLL RSCAN0.C1ERFL.UINT8[LL]
+#define RSCAN0C1ERFLLH RSCAN0.C1ERFL.UINT8[LH]
+#define RSCAN0C1ERFLH RSCAN0.C1ERFL.UINT16[H]
+#define RSCAN0C1ERFLHL RSCAN0.C1ERFL.UINT8[HL]
+#define RSCAN0C1ERFLHH RSCAN0.C1ERFL.UINT8[HH]
+#define RSCAN0C2CFG RSCAN0.C2CFG.UINT32
+#define RSCAN0C2CFGL RSCAN0.C2CFG.UINT16[L]
+#define RSCAN0C2CFGLL RSCAN0.C2CFG.UINT8[LL]
+#define RSCAN0C2CFGLH RSCAN0.C2CFG.UINT8[LH]
+#define RSCAN0C2CFGH RSCAN0.C2CFG.UINT16[H]
+#define RSCAN0C2CFGHL RSCAN0.C2CFG.UINT8[HL]
+#define RSCAN0C2CFGHH RSCAN0.C2CFG.UINT8[HH]
+#define RSCAN0C2CTR RSCAN0.C2CTR.UINT32
+#define RSCAN0C2CTRL RSCAN0.C2CTR.UINT16[L]
+#define RSCAN0C2CTRLL RSCAN0.C2CTR.UINT8[LL]
+#define RSCAN0C2CTRLH RSCAN0.C2CTR.UINT8[LH]
+#define RSCAN0C2CTRH RSCAN0.C2CTR.UINT16[H]
+#define RSCAN0C2CTRHL RSCAN0.C2CTR.UINT8[HL]
+#define RSCAN0C2CTRHH RSCAN0.C2CTR.UINT8[HH]
+#define RSCAN0C2STS RSCAN0.C2STS.UINT32
+#define RSCAN0C2STSL RSCAN0.C2STS.UINT16[L]
+#define RSCAN0C2STSLL RSCAN0.C2STS.UINT8[LL]
+#define RSCAN0C2STSLH RSCAN0.C2STS.UINT8[LH]
+#define RSCAN0C2STSH RSCAN0.C2STS.UINT16[H]
+#define RSCAN0C2STSHL RSCAN0.C2STS.UINT8[HL]
+#define RSCAN0C2STSHH RSCAN0.C2STS.UINT8[HH]
+#define RSCAN0C2ERFL RSCAN0.C2ERFL.UINT32
+#define RSCAN0C2ERFLL RSCAN0.C2ERFL.UINT16[L]
+#define RSCAN0C2ERFLLL RSCAN0.C2ERFL.UINT8[LL]
+#define RSCAN0C2ERFLLH RSCAN0.C2ERFL.UINT8[LH]
+#define RSCAN0C2ERFLH RSCAN0.C2ERFL.UINT16[H]
+#define RSCAN0C2ERFLHL RSCAN0.C2ERFL.UINT8[HL]
+#define RSCAN0C2ERFLHH RSCAN0.C2ERFL.UINT8[HH]
+#define RSCAN0C3CFG RSCAN0.C3CFG.UINT32
+#define RSCAN0C3CFGL RSCAN0.C3CFG.UINT16[L]
+#define RSCAN0C3CFGLL RSCAN0.C3CFG.UINT8[LL]
+#define RSCAN0C3CFGLH RSCAN0.C3CFG.UINT8[LH]
+#define RSCAN0C3CFGH RSCAN0.C3CFG.UINT16[H]
+#define RSCAN0C3CFGHL RSCAN0.C3CFG.UINT8[HL]
+#define RSCAN0C3CFGHH RSCAN0.C3CFG.UINT8[HH]
+#define RSCAN0C3CTR RSCAN0.C3CTR.UINT32
+#define RSCAN0C3CTRL RSCAN0.C3CTR.UINT16[L]
+#define RSCAN0C3CTRLL RSCAN0.C3CTR.UINT8[LL]
+#define RSCAN0C3CTRLH RSCAN0.C3CTR.UINT8[LH]
+#define RSCAN0C3CTRH RSCAN0.C3CTR.UINT16[H]
+#define RSCAN0C3CTRHL RSCAN0.C3CTR.UINT8[HL]
+#define RSCAN0C3CTRHH RSCAN0.C3CTR.UINT8[HH]
+#define RSCAN0C3STS RSCAN0.C3STS.UINT32
+#define RSCAN0C3STSL RSCAN0.C3STS.UINT16[L]
+#define RSCAN0C3STSLL RSCAN0.C3STS.UINT8[LL]
+#define RSCAN0C3STSLH RSCAN0.C3STS.UINT8[LH]
+#define RSCAN0C3STSH RSCAN0.C3STS.UINT16[H]
+#define RSCAN0C3STSHL RSCAN0.C3STS.UINT8[HL]
+#define RSCAN0C3STSHH RSCAN0.C3STS.UINT8[HH]
+#define RSCAN0C3ERFL RSCAN0.C3ERFL.UINT32
+#define RSCAN0C3ERFLL RSCAN0.C3ERFL.UINT16[L]
+#define RSCAN0C3ERFLLL RSCAN0.C3ERFL.UINT8[LL]
+#define RSCAN0C3ERFLLH RSCAN0.C3ERFL.UINT8[LH]
+#define RSCAN0C3ERFLH RSCAN0.C3ERFL.UINT16[H]
+#define RSCAN0C3ERFLHL RSCAN0.C3ERFL.UINT8[HL]
+#define RSCAN0C3ERFLHH RSCAN0.C3ERFL.UINT8[HH]
+#define RSCAN0C4CFG RSCAN0.C4CFG.UINT32
+#define RSCAN0C4CFGL RSCAN0.C4CFG.UINT16[L]
+#define RSCAN0C4CFGLL RSCAN0.C4CFG.UINT8[LL]
+#define RSCAN0C4CFGLH RSCAN0.C4CFG.UINT8[LH]
+#define RSCAN0C4CFGH RSCAN0.C4CFG.UINT16[H]
+#define RSCAN0C4CFGHL RSCAN0.C4CFG.UINT8[HL]
+#define RSCAN0C4CFGHH RSCAN0.C4CFG.UINT8[HH]
+#define RSCAN0C4CTR RSCAN0.C4CTR.UINT32
+#define RSCAN0C4CTRL RSCAN0.C4CTR.UINT16[L]
+#define RSCAN0C4CTRLL RSCAN0.C4CTR.UINT8[LL]
+#define RSCAN0C4CTRLH RSCAN0.C4CTR.UINT8[LH]
+#define RSCAN0C4CTRH RSCAN0.C4CTR.UINT16[H]
+#define RSCAN0C4CTRHL RSCAN0.C4CTR.UINT8[HL]
+#define RSCAN0C4CTRHH RSCAN0.C4CTR.UINT8[HH]
+#define RSCAN0C4STS RSCAN0.C4STS.UINT32
+#define RSCAN0C4STSL RSCAN0.C4STS.UINT16[L]
+#define RSCAN0C4STSLL RSCAN0.C4STS.UINT8[LL]
+#define RSCAN0C4STSLH RSCAN0.C4STS.UINT8[LH]
+#define RSCAN0C4STSH RSCAN0.C4STS.UINT16[H]
+#define RSCAN0C4STSHL RSCAN0.C4STS.UINT8[HL]
+#define RSCAN0C4STSHH RSCAN0.C4STS.UINT8[HH]
+#define RSCAN0C4ERFL RSCAN0.C4ERFL.UINT32
+#define RSCAN0C4ERFLL RSCAN0.C4ERFL.UINT16[L]
+#define RSCAN0C4ERFLLL RSCAN0.C4ERFL.UINT8[LL]
+#define RSCAN0C4ERFLLH RSCAN0.C4ERFL.UINT8[LH]
+#define RSCAN0C4ERFLH RSCAN0.C4ERFL.UINT16[H]
+#define RSCAN0C4ERFLHL RSCAN0.C4ERFL.UINT8[HL]
+#define RSCAN0C4ERFLHH RSCAN0.C4ERFL.UINT8[HH]
+#define RSCAN0GCFG RSCAN0.GCFG.UINT32
+#define RSCAN0GCFGL RSCAN0.GCFG.UINT16[L]
+#define RSCAN0GCFGLL RSCAN0.GCFG.UINT8[LL]
+#define RSCAN0GCFGLH RSCAN0.GCFG.UINT8[LH]
+#define RSCAN0GCFGH RSCAN0.GCFG.UINT16[H]
+#define RSCAN0GCFGHL RSCAN0.GCFG.UINT8[HL]
+#define RSCAN0GCFGHH RSCAN0.GCFG.UINT8[HH]
+#define RSCAN0GCTR RSCAN0.GCTR.UINT32
+#define RSCAN0GCTRL RSCAN0.GCTR.UINT16[L]
+#define RSCAN0GCTRLL RSCAN0.GCTR.UINT8[LL]
+#define RSCAN0GCTRLH RSCAN0.GCTR.UINT8[LH]
+#define RSCAN0GCTRH RSCAN0.GCTR.UINT16[H]
+#define RSCAN0GCTRHL RSCAN0.GCTR.UINT8[HL]
+#define RSCAN0GCTRHH RSCAN0.GCTR.UINT8[HH]
+#define RSCAN0GSTS RSCAN0.GSTS.UINT32
+#define RSCAN0GSTSL RSCAN0.GSTS.UINT16[L]
+#define RSCAN0GSTSLL RSCAN0.GSTS.UINT8[LL]
+#define RSCAN0GSTSLH RSCAN0.GSTS.UINT8[LH]
+#define RSCAN0GSTSH RSCAN0.GSTS.UINT16[H]
+#define RSCAN0GSTSHL RSCAN0.GSTS.UINT8[HL]
+#define RSCAN0GSTSHH RSCAN0.GSTS.UINT8[HH]
+#define RSCAN0GERFL RSCAN0.GERFL.UINT32
+#define RSCAN0GERFLL RSCAN0.GERFL.UINT16[L]
+#define RSCAN0GERFLLL RSCAN0.GERFL.UINT8[LL]
+#define RSCAN0GERFLLH RSCAN0.GERFL.UINT8[LH]
+#define RSCAN0GERFLH RSCAN0.GERFL.UINT16[H]
+#define RSCAN0GERFLHL RSCAN0.GERFL.UINT8[HL]
+#define RSCAN0GERFLHH RSCAN0.GERFL.UINT8[HH]
+#define RSCAN0GTSC RSCAN0.GTSC.UINT32
+#define RSCAN0GTSCL RSCAN0.GTSC.UINT16[L]
+#define RSCAN0GTSCH RSCAN0.GTSC.UINT16[H]
+#define RSCAN0GAFLECTR RSCAN0.GAFLECTR.UINT32
+#define RSCAN0GAFLECTRL RSCAN0.GAFLECTR.UINT16[L]
+#define RSCAN0GAFLECTRLL RSCAN0.GAFLECTR.UINT8[LL]
+#define RSCAN0GAFLECTRLH RSCAN0.GAFLECTR.UINT8[LH]
+#define RSCAN0GAFLECTRH RSCAN0.GAFLECTR.UINT16[H]
+#define RSCAN0GAFLECTRHL RSCAN0.GAFLECTR.UINT8[HL]
+#define RSCAN0GAFLECTRHH RSCAN0.GAFLECTR.UINT8[HH]
+#define RSCAN0GAFLCFG0 RSCAN0.GAFLCFG0.UINT32
+#define RSCAN0GAFLCFG0L RSCAN0.GAFLCFG0.UINT16[L]
+#define RSCAN0GAFLCFG0LL RSCAN0.GAFLCFG0.UINT8[LL]
+#define RSCAN0GAFLCFG0LH RSCAN0.GAFLCFG0.UINT8[LH]
+#define RSCAN0GAFLCFG0H RSCAN0.GAFLCFG0.UINT16[H]
+#define RSCAN0GAFLCFG0HL RSCAN0.GAFLCFG0.UINT8[HL]
+#define RSCAN0GAFLCFG0HH RSCAN0.GAFLCFG0.UINT8[HH]
+#define RSCAN0GAFLCFG1 RSCAN0.GAFLCFG1.UINT32
+#define RSCAN0GAFLCFG1L RSCAN0.GAFLCFG1.UINT16[L]
+#define RSCAN0GAFLCFG1LL RSCAN0.GAFLCFG1.UINT8[LL]
+#define RSCAN0GAFLCFG1LH RSCAN0.GAFLCFG1.UINT8[LH]
+#define RSCAN0GAFLCFG1H RSCAN0.GAFLCFG1.UINT16[H]
+#define RSCAN0GAFLCFG1HL RSCAN0.GAFLCFG1.UINT8[HL]
+#define RSCAN0GAFLCFG1HH RSCAN0.GAFLCFG1.UINT8[HH]
+#define RSCAN0RMNB RSCAN0.RMNB.UINT32
+#define RSCAN0RMNBL RSCAN0.RMNB.UINT16[L]
+#define RSCAN0RMNBLL RSCAN0.RMNB.UINT8[LL]
+#define RSCAN0RMNBLH RSCAN0.RMNB.UINT8[LH]
+#define RSCAN0RMNBH RSCAN0.RMNB.UINT16[H]
+#define RSCAN0RMNBHL RSCAN0.RMNB.UINT8[HL]
+#define RSCAN0RMNBHH RSCAN0.RMNB.UINT8[HH]
+#define RSCAN0RMND0 RSCAN0.RMND0.UINT32
+#define RSCAN0RMND0L RSCAN0.RMND0.UINT16[L]
+#define RSCAN0RMND0LL RSCAN0.RMND0.UINT8[LL]
+#define RSCAN0RMND0LH RSCAN0.RMND0.UINT8[LH]
+#define RSCAN0RMND0H RSCAN0.RMND0.UINT16[H]
+#define RSCAN0RMND0HL RSCAN0.RMND0.UINT8[HL]
+#define RSCAN0RMND0HH RSCAN0.RMND0.UINT8[HH]
+#define RSCAN0RMND1 RSCAN0.RMND1.UINT32
+#define RSCAN0RMND1L RSCAN0.RMND1.UINT16[L]
+#define RSCAN0RMND1LL RSCAN0.RMND1.UINT8[LL]
+#define RSCAN0RMND1LH RSCAN0.RMND1.UINT8[LH]
+#define RSCAN0RMND1H RSCAN0.RMND1.UINT16[H]
+#define RSCAN0RMND1HL RSCAN0.RMND1.UINT8[HL]
+#define RSCAN0RMND1HH RSCAN0.RMND1.UINT8[HH]
+#define RSCAN0RMND2 RSCAN0.RMND2.UINT32
+#define RSCAN0RMND2L RSCAN0.RMND2.UINT16[L]
+#define RSCAN0RMND2LL RSCAN0.RMND2.UINT8[LL]
+#define RSCAN0RMND2LH RSCAN0.RMND2.UINT8[LH]
+#define RSCAN0RMND2H RSCAN0.RMND2.UINT16[H]
+#define RSCAN0RMND2HL RSCAN0.RMND2.UINT8[HL]
+#define RSCAN0RMND2HH RSCAN0.RMND2.UINT8[HH]
+#define RSCAN0RFCC0 RSCAN0.RFCC0.UINT32
+#define RSCAN0RFCC0L RSCAN0.RFCC0.UINT16[L]
+#define RSCAN0RFCC0LL RSCAN0.RFCC0.UINT8[LL]
+#define RSCAN0RFCC0LH RSCAN0.RFCC0.UINT8[LH]
+#define RSCAN0RFCC0H RSCAN0.RFCC0.UINT16[H]
+#define RSCAN0RFCC0HL RSCAN0.RFCC0.UINT8[HL]
+#define RSCAN0RFCC0HH RSCAN0.RFCC0.UINT8[HH]
+#define RSCAN0RFCC1 RSCAN0.RFCC1.UINT32
+#define RSCAN0RFCC1L RSCAN0.RFCC1.UINT16[L]
+#define RSCAN0RFCC1LL RSCAN0.RFCC1.UINT8[LL]
+#define RSCAN0RFCC1LH RSCAN0.RFCC1.UINT8[LH]
+#define RSCAN0RFCC1H RSCAN0.RFCC1.UINT16[H]
+#define RSCAN0RFCC1HL RSCAN0.RFCC1.UINT8[HL]
+#define RSCAN0RFCC1HH RSCAN0.RFCC1.UINT8[HH]
+#define RSCAN0RFCC2 RSCAN0.RFCC2.UINT32
+#define RSCAN0RFCC2L RSCAN0.RFCC2.UINT16[L]
+#define RSCAN0RFCC2LL RSCAN0.RFCC2.UINT8[LL]
+#define RSCAN0RFCC2LH RSCAN0.RFCC2.UINT8[LH]
+#define RSCAN0RFCC2H RSCAN0.RFCC2.UINT16[H]
+#define RSCAN0RFCC2HL RSCAN0.RFCC2.UINT8[HL]
+#define RSCAN0RFCC2HH RSCAN0.RFCC2.UINT8[HH]
+#define RSCAN0RFCC3 RSCAN0.RFCC3.UINT32
+#define RSCAN0RFCC3L RSCAN0.RFCC3.UINT16[L]
+#define RSCAN0RFCC3LL RSCAN0.RFCC3.UINT8[LL]
+#define RSCAN0RFCC3LH RSCAN0.RFCC3.UINT8[LH]
+#define RSCAN0RFCC3H RSCAN0.RFCC3.UINT16[H]
+#define RSCAN0RFCC3HL RSCAN0.RFCC3.UINT8[HL]
+#define RSCAN0RFCC3HH RSCAN0.RFCC3.UINT8[HH]
+#define RSCAN0RFCC4 RSCAN0.RFCC4.UINT32
+#define RSCAN0RFCC4L RSCAN0.RFCC4.UINT16[L]
+#define RSCAN0RFCC4LL RSCAN0.RFCC4.UINT8[LL]
+#define RSCAN0RFCC4LH RSCAN0.RFCC4.UINT8[LH]
+#define RSCAN0RFCC4H RSCAN0.RFCC4.UINT16[H]
+#define RSCAN0RFCC4HL RSCAN0.RFCC4.UINT8[HL]
+#define RSCAN0RFCC4HH RSCAN0.RFCC4.UINT8[HH]
+#define RSCAN0RFCC5 RSCAN0.RFCC5.UINT32
+#define RSCAN0RFCC5L RSCAN0.RFCC5.UINT16[L]
+#define RSCAN0RFCC5LL RSCAN0.RFCC5.UINT8[LL]
+#define RSCAN0RFCC5LH RSCAN0.RFCC5.UINT8[LH]
+#define RSCAN0RFCC5H RSCAN0.RFCC5.UINT16[H]
+#define RSCAN0RFCC5HL RSCAN0.RFCC5.UINT8[HL]
+#define RSCAN0RFCC5HH RSCAN0.RFCC5.UINT8[HH]
+#define RSCAN0RFCC6 RSCAN0.RFCC6.UINT32
+#define RSCAN0RFCC6L RSCAN0.RFCC6.UINT16[L]
+#define RSCAN0RFCC6LL RSCAN0.RFCC6.UINT8[LL]
+#define RSCAN0RFCC6LH RSCAN0.RFCC6.UINT8[LH]
+#define RSCAN0RFCC6H RSCAN0.RFCC6.UINT16[H]
+#define RSCAN0RFCC6HL RSCAN0.RFCC6.UINT8[HL]
+#define RSCAN0RFCC6HH RSCAN0.RFCC6.UINT8[HH]
+#define RSCAN0RFCC7 RSCAN0.RFCC7.UINT32
+#define RSCAN0RFCC7L RSCAN0.RFCC7.UINT16[L]
+#define RSCAN0RFCC7LL RSCAN0.RFCC7.UINT8[LL]
+#define RSCAN0RFCC7LH RSCAN0.RFCC7.UINT8[LH]
+#define RSCAN0RFCC7H RSCAN0.RFCC7.UINT16[H]
+#define RSCAN0RFCC7HL RSCAN0.RFCC7.UINT8[HL]
+#define RSCAN0RFCC7HH RSCAN0.RFCC7.UINT8[HH]
+#define RSCAN0RFSTS0 RSCAN0.RFSTS0.UINT32
+#define RSCAN0RFSTS0L RSCAN0.RFSTS0.UINT16[L]
+#define RSCAN0RFSTS0LL RSCAN0.RFSTS0.UINT8[LL]
+#define RSCAN0RFSTS0LH RSCAN0.RFSTS0.UINT8[LH]
+#define RSCAN0RFSTS0H RSCAN0.RFSTS0.UINT16[H]
+#define RSCAN0RFSTS0HL RSCAN0.RFSTS0.UINT8[HL]
+#define RSCAN0RFSTS0HH RSCAN0.RFSTS0.UINT8[HH]
+#define RSCAN0RFSTS1 RSCAN0.RFSTS1.UINT32
+#define RSCAN0RFSTS1L RSCAN0.RFSTS1.UINT16[L]
+#define RSCAN0RFSTS1LL RSCAN0.RFSTS1.UINT8[LL]
+#define RSCAN0RFSTS1LH RSCAN0.RFSTS1.UINT8[LH]
+#define RSCAN0RFSTS1H RSCAN0.RFSTS1.UINT16[H]
+#define RSCAN0RFSTS1HL RSCAN0.RFSTS1.UINT8[HL]
+#define RSCAN0RFSTS1HH RSCAN0.RFSTS1.UINT8[HH]
+#define RSCAN0RFSTS2 RSCAN0.RFSTS2.UINT32
+#define RSCAN0RFSTS2L RSCAN0.RFSTS2.UINT16[L]
+#define RSCAN0RFSTS2LL RSCAN0.RFSTS2.UINT8[LL]
+#define RSCAN0RFSTS2LH RSCAN0.RFSTS2.UINT8[LH]
+#define RSCAN0RFSTS2H RSCAN0.RFSTS2.UINT16[H]
+#define RSCAN0RFSTS2HL RSCAN0.RFSTS2.UINT8[HL]
+#define RSCAN0RFSTS2HH RSCAN0.RFSTS2.UINT8[HH]
+#define RSCAN0RFSTS3 RSCAN0.RFSTS3.UINT32
+#define RSCAN0RFSTS3L RSCAN0.RFSTS3.UINT16[L]
+#define RSCAN0RFSTS3LL RSCAN0.RFSTS3.UINT8[LL]
+#define RSCAN0RFSTS3LH RSCAN0.RFSTS3.UINT8[LH]
+#define RSCAN0RFSTS3H RSCAN0.RFSTS3.UINT16[H]
+#define RSCAN0RFSTS3HL RSCAN0.RFSTS3.UINT8[HL]
+#define RSCAN0RFSTS3HH RSCAN0.RFSTS3.UINT8[HH]
+#define RSCAN0RFSTS4 RSCAN0.RFSTS4.UINT32
+#define RSCAN0RFSTS4L RSCAN0.RFSTS4.UINT16[L]
+#define RSCAN0RFSTS4LL RSCAN0.RFSTS4.UINT8[LL]
+#define RSCAN0RFSTS4LH RSCAN0.RFSTS4.UINT8[LH]
+#define RSCAN0RFSTS4H RSCAN0.RFSTS4.UINT16[H]
+#define RSCAN0RFSTS4HL RSCAN0.RFSTS4.UINT8[HL]
+#define RSCAN0RFSTS4HH RSCAN0.RFSTS4.UINT8[HH]
+#define RSCAN0RFSTS5 RSCAN0.RFSTS5.UINT32
+#define RSCAN0RFSTS5L RSCAN0.RFSTS5.UINT16[L]
+#define RSCAN0RFSTS5LL RSCAN0.RFSTS5.UINT8[LL]
+#define RSCAN0RFSTS5LH RSCAN0.RFSTS5.UINT8[LH]
+#define RSCAN0RFSTS5H RSCAN0.RFSTS5.UINT16[H]
+#define RSCAN0RFSTS5HL RSCAN0.RFSTS5.UINT8[HL]
+#define RSCAN0RFSTS5HH RSCAN0.RFSTS5.UINT8[HH]
+#define RSCAN0RFSTS6 RSCAN0.RFSTS6.UINT32
+#define RSCAN0RFSTS6L RSCAN0.RFSTS6.UINT16[L]
+#define RSCAN0RFSTS6LL RSCAN0.RFSTS6.UINT8[LL]
+#define RSCAN0RFSTS6LH RSCAN0.RFSTS6.UINT8[LH]
+#define RSCAN0RFSTS6H RSCAN0.RFSTS6.UINT16[H]
+#define RSCAN0RFSTS6HL RSCAN0.RFSTS6.UINT8[HL]
+#define RSCAN0RFSTS6HH RSCAN0.RFSTS6.UINT8[HH]
+#define RSCAN0RFSTS7 RSCAN0.RFSTS7.UINT32
+#define RSCAN0RFSTS7L RSCAN0.RFSTS7.UINT16[L]
+#define RSCAN0RFSTS7LL RSCAN0.RFSTS7.UINT8[LL]
+#define RSCAN0RFSTS7LH RSCAN0.RFSTS7.UINT8[LH]
+#define RSCAN0RFSTS7H RSCAN0.RFSTS7.UINT16[H]
+#define RSCAN0RFSTS7HL RSCAN0.RFSTS7.UINT8[HL]
+#define RSCAN0RFSTS7HH RSCAN0.RFSTS7.UINT8[HH]
+#define RSCAN0RFPCTR0 RSCAN0.RFPCTR0.UINT32
+#define RSCAN0RFPCTR0L RSCAN0.RFPCTR0.UINT16[L]
+#define RSCAN0RFPCTR0LL RSCAN0.RFPCTR0.UINT8[LL]
+#define RSCAN0RFPCTR0LH RSCAN0.RFPCTR0.UINT8[LH]
+#define RSCAN0RFPCTR0H RSCAN0.RFPCTR0.UINT16[H]
+#define RSCAN0RFPCTR0HL RSCAN0.RFPCTR0.UINT8[HL]
+#define RSCAN0RFPCTR0HH RSCAN0.RFPCTR0.UINT8[HH]
+#define RSCAN0RFPCTR1 RSCAN0.RFPCTR1.UINT32
+#define RSCAN0RFPCTR1L RSCAN0.RFPCTR1.UINT16[L]
+#define RSCAN0RFPCTR1LL RSCAN0.RFPCTR1.UINT8[LL]
+#define RSCAN0RFPCTR1LH RSCAN0.RFPCTR1.UINT8[LH]
+#define RSCAN0RFPCTR1H RSCAN0.RFPCTR1.UINT16[H]
+#define RSCAN0RFPCTR1HL RSCAN0.RFPCTR1.UINT8[HL]
+#define RSCAN0RFPCTR1HH RSCAN0.RFPCTR1.UINT8[HH]
+#define RSCAN0RFPCTR2 RSCAN0.RFPCTR2.UINT32
+#define RSCAN0RFPCTR2L RSCAN0.RFPCTR2.UINT16[L]
+#define RSCAN0RFPCTR2LL RSCAN0.RFPCTR2.UINT8[LL]
+#define RSCAN0RFPCTR2LH RSCAN0.RFPCTR2.UINT8[LH]
+#define RSCAN0RFPCTR2H RSCAN0.RFPCTR2.UINT16[H]
+#define RSCAN0RFPCTR2HL RSCAN0.RFPCTR2.UINT8[HL]
+#define RSCAN0RFPCTR2HH RSCAN0.RFPCTR2.UINT8[HH]
+#define RSCAN0RFPCTR3 RSCAN0.RFPCTR3.UINT32
+#define RSCAN0RFPCTR3L RSCAN0.RFPCTR3.UINT16[L]
+#define RSCAN0RFPCTR3LL RSCAN0.RFPCTR3.UINT8[LL]
+#define RSCAN0RFPCTR3LH RSCAN0.RFPCTR3.UINT8[LH]
+#define RSCAN0RFPCTR3H RSCAN0.RFPCTR3.UINT16[H]
+#define RSCAN0RFPCTR3HL RSCAN0.RFPCTR3.UINT8[HL]
+#define RSCAN0RFPCTR3HH RSCAN0.RFPCTR3.UINT8[HH]
+#define RSCAN0RFPCTR4 RSCAN0.RFPCTR4.UINT32
+#define RSCAN0RFPCTR4L RSCAN0.RFPCTR4.UINT16[L]
+#define RSCAN0RFPCTR4LL RSCAN0.RFPCTR4.UINT8[LL]
+#define RSCAN0RFPCTR4LH RSCAN0.RFPCTR4.UINT8[LH]
+#define RSCAN0RFPCTR4H RSCAN0.RFPCTR4.UINT16[H]
+#define RSCAN0RFPCTR4HL RSCAN0.RFPCTR4.UINT8[HL]
+#define RSCAN0RFPCTR4HH RSCAN0.RFPCTR4.UINT8[HH]
+#define RSCAN0RFPCTR5 RSCAN0.RFPCTR5.UINT32
+#define RSCAN0RFPCTR5L RSCAN0.RFPCTR5.UINT16[L]
+#define RSCAN0RFPCTR5LL RSCAN0.RFPCTR5.UINT8[LL]
+#define RSCAN0RFPCTR5LH RSCAN0.RFPCTR5.UINT8[LH]
+#define RSCAN0RFPCTR5H RSCAN0.RFPCTR5.UINT16[H]
+#define RSCAN0RFPCTR5HL RSCAN0.RFPCTR5.UINT8[HL]
+#define RSCAN0RFPCTR5HH RSCAN0.RFPCTR5.UINT8[HH]
+#define RSCAN0RFPCTR6 RSCAN0.RFPCTR6.UINT32
+#define RSCAN0RFPCTR6L RSCAN0.RFPCTR6.UINT16[L]
+#define RSCAN0RFPCTR6LL RSCAN0.RFPCTR6.UINT8[LL]
+#define RSCAN0RFPCTR6LH RSCAN0.RFPCTR6.UINT8[LH]
+#define RSCAN0RFPCTR6H RSCAN0.RFPCTR6.UINT16[H]
+#define RSCAN0RFPCTR6HL RSCAN0.RFPCTR6.UINT8[HL]
+#define RSCAN0RFPCTR6HH RSCAN0.RFPCTR6.UINT8[HH]
+#define RSCAN0RFPCTR7 RSCAN0.RFPCTR7.UINT32
+#define RSCAN0RFPCTR7L RSCAN0.RFPCTR7.UINT16[L]
+#define RSCAN0RFPCTR7LL RSCAN0.RFPCTR7.UINT8[LL]
+#define RSCAN0RFPCTR7LH RSCAN0.RFPCTR7.UINT8[LH]
+#define RSCAN0RFPCTR7H RSCAN0.RFPCTR7.UINT16[H]
+#define RSCAN0RFPCTR7HL RSCAN0.RFPCTR7.UINT8[HL]
+#define RSCAN0RFPCTR7HH RSCAN0.RFPCTR7.UINT8[HH]
+#define RSCAN0CFCC0 RSCAN0.CFCC0.UINT32
+#define RSCAN0CFCC0L RSCAN0.CFCC0.UINT16[L]
+#define RSCAN0CFCC0LL RSCAN0.CFCC0.UINT8[LL]
+#define RSCAN0CFCC0LH RSCAN0.CFCC0.UINT8[LH]
+#define RSCAN0CFCC0H RSCAN0.CFCC0.UINT16[H]
+#define RSCAN0CFCC0HL RSCAN0.CFCC0.UINT8[HL]
+#define RSCAN0CFCC0HH RSCAN0.CFCC0.UINT8[HH]
+#define RSCAN0CFCC1 RSCAN0.CFCC1.UINT32
+#define RSCAN0CFCC1L RSCAN0.CFCC1.UINT16[L]
+#define RSCAN0CFCC1LL RSCAN0.CFCC1.UINT8[LL]
+#define RSCAN0CFCC1LH RSCAN0.CFCC1.UINT8[LH]
+#define RSCAN0CFCC1H RSCAN0.CFCC1.UINT16[H]
+#define RSCAN0CFCC1HL RSCAN0.CFCC1.UINT8[HL]
+#define RSCAN0CFCC1HH RSCAN0.CFCC1.UINT8[HH]
+#define RSCAN0CFCC2 RSCAN0.CFCC2.UINT32
+#define RSCAN0CFCC2L RSCAN0.CFCC2.UINT16[L]
+#define RSCAN0CFCC2LL RSCAN0.CFCC2.UINT8[LL]
+#define RSCAN0CFCC2LH RSCAN0.CFCC2.UINT8[LH]
+#define RSCAN0CFCC2H RSCAN0.CFCC2.UINT16[H]
+#define RSCAN0CFCC2HL RSCAN0.CFCC2.UINT8[HL]
+#define RSCAN0CFCC2HH RSCAN0.CFCC2.UINT8[HH]
+#define RSCAN0CFCC3 RSCAN0.CFCC3.UINT32
+#define RSCAN0CFCC3L RSCAN0.CFCC3.UINT16[L]
+#define RSCAN0CFCC3LL RSCAN0.CFCC3.UINT8[LL]
+#define RSCAN0CFCC3LH RSCAN0.CFCC3.UINT8[LH]
+#define RSCAN0CFCC3H RSCAN0.CFCC3.UINT16[H]
+#define RSCAN0CFCC3HL RSCAN0.CFCC3.UINT8[HL]
+#define RSCAN0CFCC3HH RSCAN0.CFCC3.UINT8[HH]
+#define RSCAN0CFCC4 RSCAN0.CFCC4.UINT32
+#define RSCAN0CFCC4L RSCAN0.CFCC4.UINT16[L]
+#define RSCAN0CFCC4LL RSCAN0.CFCC4.UINT8[LL]
+#define RSCAN0CFCC4LH RSCAN0.CFCC4.UINT8[LH]
+#define RSCAN0CFCC4H RSCAN0.CFCC4.UINT16[H]
+#define RSCAN0CFCC4HL RSCAN0.CFCC4.UINT8[HL]
+#define RSCAN0CFCC4HH RSCAN0.CFCC4.UINT8[HH]
+#define RSCAN0CFCC5 RSCAN0.CFCC5.UINT32
+#define RSCAN0CFCC5L RSCAN0.CFCC5.UINT16[L]
+#define RSCAN0CFCC5LL RSCAN0.CFCC5.UINT8[LL]
+#define RSCAN0CFCC5LH RSCAN0.CFCC5.UINT8[LH]
+#define RSCAN0CFCC5H RSCAN0.CFCC5.UINT16[H]
+#define RSCAN0CFCC5HL RSCAN0.CFCC5.UINT8[HL]
+#define RSCAN0CFCC5HH RSCAN0.CFCC5.UINT8[HH]
+#define RSCAN0CFCC6 RSCAN0.CFCC6.UINT32
+#define RSCAN0CFCC6L RSCAN0.CFCC6.UINT16[L]
+#define RSCAN0CFCC6LL RSCAN0.CFCC6.UINT8[LL]
+#define RSCAN0CFCC6LH RSCAN0.CFCC6.UINT8[LH]
+#define RSCAN0CFCC6H RSCAN0.CFCC6.UINT16[H]
+#define RSCAN0CFCC6HL RSCAN0.CFCC6.UINT8[HL]
+#define RSCAN0CFCC6HH RSCAN0.CFCC6.UINT8[HH]
+#define RSCAN0CFCC7 RSCAN0.CFCC7.UINT32
+#define RSCAN0CFCC7L RSCAN0.CFCC7.UINT16[L]
+#define RSCAN0CFCC7LL RSCAN0.CFCC7.UINT8[LL]
+#define RSCAN0CFCC7LH RSCAN0.CFCC7.UINT8[LH]
+#define RSCAN0CFCC7H RSCAN0.CFCC7.UINT16[H]
+#define RSCAN0CFCC7HL RSCAN0.CFCC7.UINT8[HL]
+#define RSCAN0CFCC7HH RSCAN0.CFCC7.UINT8[HH]
+#define RSCAN0CFCC8 RSCAN0.CFCC8.UINT32
+#define RSCAN0CFCC8L RSCAN0.CFCC8.UINT16[L]
+#define RSCAN0CFCC8LL RSCAN0.CFCC8.UINT8[LL]
+#define RSCAN0CFCC8LH RSCAN0.CFCC8.UINT8[LH]
+#define RSCAN0CFCC8H RSCAN0.CFCC8.UINT16[H]
+#define RSCAN0CFCC8HL RSCAN0.CFCC8.UINT8[HL]
+#define RSCAN0CFCC8HH RSCAN0.CFCC8.UINT8[HH]
+#define RSCAN0CFCC9 RSCAN0.CFCC9.UINT32
+#define RSCAN0CFCC9L RSCAN0.CFCC9.UINT16[L]
+#define RSCAN0CFCC9LL RSCAN0.CFCC9.UINT8[LL]
+#define RSCAN0CFCC9LH RSCAN0.CFCC9.UINT8[LH]
+#define RSCAN0CFCC9H RSCAN0.CFCC9.UINT16[H]
+#define RSCAN0CFCC9HL RSCAN0.CFCC9.UINT8[HL]
+#define RSCAN0CFCC9HH RSCAN0.CFCC9.UINT8[HH]
+#define RSCAN0CFCC10 RSCAN0.CFCC10.UINT32
+#define RSCAN0CFCC10L RSCAN0.CFCC10.UINT16[L]
+#define RSCAN0CFCC10LL RSCAN0.CFCC10.UINT8[LL]
+#define RSCAN0CFCC10LH RSCAN0.CFCC10.UINT8[LH]
+#define RSCAN0CFCC10H RSCAN0.CFCC10.UINT16[H]
+#define RSCAN0CFCC10HL RSCAN0.CFCC10.UINT8[HL]
+#define RSCAN0CFCC10HH RSCAN0.CFCC10.UINT8[HH]
+#define RSCAN0CFCC11 RSCAN0.CFCC11.UINT32
+#define RSCAN0CFCC11L RSCAN0.CFCC11.UINT16[L]
+#define RSCAN0CFCC11LL RSCAN0.CFCC11.UINT8[LL]
+#define RSCAN0CFCC11LH RSCAN0.CFCC11.UINT8[LH]
+#define RSCAN0CFCC11H RSCAN0.CFCC11.UINT16[H]
+#define RSCAN0CFCC11HL RSCAN0.CFCC11.UINT8[HL]
+#define RSCAN0CFCC11HH RSCAN0.CFCC11.UINT8[HH]
+#define RSCAN0CFCC12 RSCAN0.CFCC12.UINT32
+#define RSCAN0CFCC12L RSCAN0.CFCC12.UINT16[L]
+#define RSCAN0CFCC12LL RSCAN0.CFCC12.UINT8[LL]
+#define RSCAN0CFCC12LH RSCAN0.CFCC12.UINT8[LH]
+#define RSCAN0CFCC12H RSCAN0.CFCC12.UINT16[H]
+#define RSCAN0CFCC12HL RSCAN0.CFCC12.UINT8[HL]
+#define RSCAN0CFCC12HH RSCAN0.CFCC12.UINT8[HH]
+#define RSCAN0CFCC13 RSCAN0.CFCC13.UINT32
+#define RSCAN0CFCC13L RSCAN0.CFCC13.UINT16[L]
+#define RSCAN0CFCC13LL RSCAN0.CFCC13.UINT8[LL]
+#define RSCAN0CFCC13LH RSCAN0.CFCC13.UINT8[LH]
+#define RSCAN0CFCC13H RSCAN0.CFCC13.UINT16[H]
+#define RSCAN0CFCC13HL RSCAN0.CFCC13.UINT8[HL]
+#define RSCAN0CFCC13HH RSCAN0.CFCC13.UINT8[HH]
+#define RSCAN0CFCC14 RSCAN0.CFCC14.UINT32
+#define RSCAN0CFCC14L RSCAN0.CFCC14.UINT16[L]
+#define RSCAN0CFCC14LL RSCAN0.CFCC14.UINT8[LL]
+#define RSCAN0CFCC14LH RSCAN0.CFCC14.UINT8[LH]
+#define RSCAN0CFCC14H RSCAN0.CFCC14.UINT16[H]
+#define RSCAN0CFCC14HL RSCAN0.CFCC14.UINT8[HL]
+#define RSCAN0CFCC14HH RSCAN0.CFCC14.UINT8[HH]
+#define RSCAN0CFSTS0 RSCAN0.CFSTS0.UINT32
+#define RSCAN0CFSTS0L RSCAN0.CFSTS0.UINT16[L]
+#define RSCAN0CFSTS0LL RSCAN0.CFSTS0.UINT8[LL]
+#define RSCAN0CFSTS0LH RSCAN0.CFSTS0.UINT8[LH]
+#define RSCAN0CFSTS0H RSCAN0.CFSTS0.UINT16[H]
+#define RSCAN0CFSTS0HL RSCAN0.CFSTS0.UINT8[HL]
+#define RSCAN0CFSTS0HH RSCAN0.CFSTS0.UINT8[HH]
+#define RSCAN0CFSTS1 RSCAN0.CFSTS1.UINT32
+#define RSCAN0CFSTS1L RSCAN0.CFSTS1.UINT16[L]
+#define RSCAN0CFSTS1LL RSCAN0.CFSTS1.UINT8[LL]
+#define RSCAN0CFSTS1LH RSCAN0.CFSTS1.UINT8[LH]
+#define RSCAN0CFSTS1H RSCAN0.CFSTS1.UINT16[H]
+#define RSCAN0CFSTS1HL RSCAN0.CFSTS1.UINT8[HL]
+#define RSCAN0CFSTS1HH RSCAN0.CFSTS1.UINT8[HH]
+#define RSCAN0CFSTS2 RSCAN0.CFSTS2.UINT32
+#define RSCAN0CFSTS2L RSCAN0.CFSTS2.UINT16[L]
+#define RSCAN0CFSTS2LL RSCAN0.CFSTS2.UINT8[LL]
+#define RSCAN0CFSTS2LH RSCAN0.CFSTS2.UINT8[LH]
+#define RSCAN0CFSTS2H RSCAN0.CFSTS2.UINT16[H]
+#define RSCAN0CFSTS2HL RSCAN0.CFSTS2.UINT8[HL]
+#define RSCAN0CFSTS2HH RSCAN0.CFSTS2.UINT8[HH]
+#define RSCAN0CFSTS3 RSCAN0.CFSTS3.UINT32
+#define RSCAN0CFSTS3L RSCAN0.CFSTS3.UINT16[L]
+#define RSCAN0CFSTS3LL RSCAN0.CFSTS3.UINT8[LL]
+#define RSCAN0CFSTS3LH RSCAN0.CFSTS3.UINT8[LH]
+#define RSCAN0CFSTS3H RSCAN0.CFSTS3.UINT16[H]
+#define RSCAN0CFSTS3HL RSCAN0.CFSTS3.UINT8[HL]
+#define RSCAN0CFSTS3HH RSCAN0.CFSTS3.UINT8[HH]
+#define RSCAN0CFSTS4 RSCAN0.CFSTS4.UINT32
+#define RSCAN0CFSTS4L RSCAN0.CFSTS4.UINT16[L]
+#define RSCAN0CFSTS4LL RSCAN0.CFSTS4.UINT8[LL]
+#define RSCAN0CFSTS4LH RSCAN0.CFSTS4.UINT8[LH]
+#define RSCAN0CFSTS4H RSCAN0.CFSTS4.UINT16[H]
+#define RSCAN0CFSTS4HL RSCAN0.CFSTS4.UINT8[HL]
+#define RSCAN0CFSTS4HH RSCAN0.CFSTS4.UINT8[HH]
+#define RSCAN0CFSTS5 RSCAN0.CFSTS5.UINT32
+#define RSCAN0CFSTS5L RSCAN0.CFSTS5.UINT16[L]
+#define RSCAN0CFSTS5LL RSCAN0.CFSTS5.UINT8[LL]
+#define RSCAN0CFSTS5LH RSCAN0.CFSTS5.UINT8[LH]
+#define RSCAN0CFSTS5H RSCAN0.CFSTS5.UINT16[H]
+#define RSCAN0CFSTS5HL RSCAN0.CFSTS5.UINT8[HL]
+#define RSCAN0CFSTS5HH RSCAN0.CFSTS5.UINT8[HH]
+#define RSCAN0CFSTS6 RSCAN0.CFSTS6.UINT32
+#define RSCAN0CFSTS6L RSCAN0.CFSTS6.UINT16[L]
+#define RSCAN0CFSTS6LL RSCAN0.CFSTS6.UINT8[LL]
+#define RSCAN0CFSTS6LH RSCAN0.CFSTS6.UINT8[LH]
+#define RSCAN0CFSTS6H RSCAN0.CFSTS6.UINT16[H]
+#define RSCAN0CFSTS6HL RSCAN0.CFSTS6.UINT8[HL]
+#define RSCAN0CFSTS6HH RSCAN0.CFSTS6.UINT8[HH]
+#define RSCAN0CFSTS7 RSCAN0.CFSTS7.UINT32
+#define RSCAN0CFSTS7L RSCAN0.CFSTS7.UINT16[L]
+#define RSCAN0CFSTS7LL RSCAN0.CFSTS7.UINT8[LL]
+#define RSCAN0CFSTS7LH RSCAN0.CFSTS7.UINT8[LH]
+#define RSCAN0CFSTS7H RSCAN0.CFSTS7.UINT16[H]
+#define RSCAN0CFSTS7HL RSCAN0.CFSTS7.UINT8[HL]
+#define RSCAN0CFSTS7HH RSCAN0.CFSTS7.UINT8[HH]
+#define RSCAN0CFSTS8 RSCAN0.CFSTS8.UINT32
+#define RSCAN0CFSTS8L RSCAN0.CFSTS8.UINT16[L]
+#define RSCAN0CFSTS8LL RSCAN0.CFSTS8.UINT8[LL]
+#define RSCAN0CFSTS8LH RSCAN0.CFSTS8.UINT8[LH]
+#define RSCAN0CFSTS8H RSCAN0.CFSTS8.UINT16[H]
+#define RSCAN0CFSTS8HL RSCAN0.CFSTS8.UINT8[HL]
+#define RSCAN0CFSTS8HH RSCAN0.CFSTS8.UINT8[HH]
+#define RSCAN0CFSTS9 RSCAN0.CFSTS9.UINT32
+#define RSCAN0CFSTS9L RSCAN0.CFSTS9.UINT16[L]
+#define RSCAN0CFSTS9LL RSCAN0.CFSTS9.UINT8[LL]
+#define RSCAN0CFSTS9LH RSCAN0.CFSTS9.UINT8[LH]
+#define RSCAN0CFSTS9H RSCAN0.CFSTS9.UINT16[H]
+#define RSCAN0CFSTS9HL RSCAN0.CFSTS9.UINT8[HL]
+#define RSCAN0CFSTS9HH RSCAN0.CFSTS9.UINT8[HH]
+#define RSCAN0CFSTS10 RSCAN0.CFSTS10.UINT32
+#define RSCAN0CFSTS10L RSCAN0.CFSTS10.UINT16[L]
+#define RSCAN0CFSTS10LL RSCAN0.CFSTS10.UINT8[LL]
+#define RSCAN0CFSTS10LH RSCAN0.CFSTS10.UINT8[LH]
+#define RSCAN0CFSTS10H RSCAN0.CFSTS10.UINT16[H]
+#define RSCAN0CFSTS10HL RSCAN0.CFSTS10.UINT8[HL]
+#define RSCAN0CFSTS10HH RSCAN0.CFSTS10.UINT8[HH]
+#define RSCAN0CFSTS11 RSCAN0.CFSTS11.UINT32
+#define RSCAN0CFSTS11L RSCAN0.CFSTS11.UINT16[L]
+#define RSCAN0CFSTS11LL RSCAN0.CFSTS11.UINT8[LL]
+#define RSCAN0CFSTS11LH RSCAN0.CFSTS11.UINT8[LH]
+#define RSCAN0CFSTS11H RSCAN0.CFSTS11.UINT16[H]
+#define RSCAN0CFSTS11HL RSCAN0.CFSTS11.UINT8[HL]
+#define RSCAN0CFSTS11HH RSCAN0.CFSTS11.UINT8[HH]
+#define RSCAN0CFSTS12 RSCAN0.CFSTS12.UINT32
+#define RSCAN0CFSTS12L RSCAN0.CFSTS12.UINT16[L]
+#define RSCAN0CFSTS12LL RSCAN0.CFSTS12.UINT8[LL]
+#define RSCAN0CFSTS12LH RSCAN0.CFSTS12.UINT8[LH]
+#define RSCAN0CFSTS12H RSCAN0.CFSTS12.UINT16[H]
+#define RSCAN0CFSTS12HL RSCAN0.CFSTS12.UINT8[HL]
+#define RSCAN0CFSTS12HH RSCAN0.CFSTS12.UINT8[HH]
+#define RSCAN0CFSTS13 RSCAN0.CFSTS13.UINT32
+#define RSCAN0CFSTS13L RSCAN0.CFSTS13.UINT16[L]
+#define RSCAN0CFSTS13LL RSCAN0.CFSTS13.UINT8[LL]
+#define RSCAN0CFSTS13LH RSCAN0.CFSTS13.UINT8[LH]
+#define RSCAN0CFSTS13H RSCAN0.CFSTS13.UINT16[H]
+#define RSCAN0CFSTS13HL RSCAN0.CFSTS13.UINT8[HL]
+#define RSCAN0CFSTS13HH RSCAN0.CFSTS13.UINT8[HH]
+#define RSCAN0CFSTS14 RSCAN0.CFSTS14.UINT32
+#define RSCAN0CFSTS14L RSCAN0.CFSTS14.UINT16[L]
+#define RSCAN0CFSTS14LL RSCAN0.CFSTS14.UINT8[LL]
+#define RSCAN0CFSTS14LH RSCAN0.CFSTS14.UINT8[LH]
+#define RSCAN0CFSTS14H RSCAN0.CFSTS14.UINT16[H]
+#define RSCAN0CFSTS14HL RSCAN0.CFSTS14.UINT8[HL]
+#define RSCAN0CFSTS14HH RSCAN0.CFSTS14.UINT8[HH]
+#define RSCAN0CFPCTR0 RSCAN0.CFPCTR0.UINT32
+#define RSCAN0CFPCTR0L RSCAN0.CFPCTR0.UINT16[L]
+#define RSCAN0CFPCTR0LL RSCAN0.CFPCTR0.UINT8[LL]
+#define RSCAN0CFPCTR0LH RSCAN0.CFPCTR0.UINT8[LH]
+#define RSCAN0CFPCTR0H RSCAN0.CFPCTR0.UINT16[H]
+#define RSCAN0CFPCTR0HL RSCAN0.CFPCTR0.UINT8[HL]
+#define RSCAN0CFPCTR0HH RSCAN0.CFPCTR0.UINT8[HH]
+#define RSCAN0CFPCTR1 RSCAN0.CFPCTR1.UINT32
+#define RSCAN0CFPCTR1L RSCAN0.CFPCTR1.UINT16[L]
+#define RSCAN0CFPCTR1LL RSCAN0.CFPCTR1.UINT8[LL]
+#define RSCAN0CFPCTR1LH RSCAN0.CFPCTR1.UINT8[LH]
+#define RSCAN0CFPCTR1H RSCAN0.CFPCTR1.UINT16[H]
+#define RSCAN0CFPCTR1HL RSCAN0.CFPCTR1.UINT8[HL]
+#define RSCAN0CFPCTR1HH RSCAN0.CFPCTR1.UINT8[HH]
+#define RSCAN0CFPCTR2 RSCAN0.CFPCTR2.UINT32
+#define RSCAN0CFPCTR2L RSCAN0.CFPCTR2.UINT16[L]
+#define RSCAN0CFPCTR2LL RSCAN0.CFPCTR2.UINT8[LL]
+#define RSCAN0CFPCTR2LH RSCAN0.CFPCTR2.UINT8[LH]
+#define RSCAN0CFPCTR2H RSCAN0.CFPCTR2.UINT16[H]
+#define RSCAN0CFPCTR2HL RSCAN0.CFPCTR2.UINT8[HL]
+#define RSCAN0CFPCTR2HH RSCAN0.CFPCTR2.UINT8[HH]
+#define RSCAN0CFPCTR3 RSCAN0.CFPCTR3.UINT32
+#define RSCAN0CFPCTR3L RSCAN0.CFPCTR3.UINT16[L]
+#define RSCAN0CFPCTR3LL RSCAN0.CFPCTR3.UINT8[LL]
+#define RSCAN0CFPCTR3LH RSCAN0.CFPCTR3.UINT8[LH]
+#define RSCAN0CFPCTR3H RSCAN0.CFPCTR3.UINT16[H]
+#define RSCAN0CFPCTR3HL RSCAN0.CFPCTR3.UINT8[HL]
+#define RSCAN0CFPCTR3HH RSCAN0.CFPCTR3.UINT8[HH]
+#define RSCAN0CFPCTR4 RSCAN0.CFPCTR4.UINT32
+#define RSCAN0CFPCTR4L RSCAN0.CFPCTR4.UINT16[L]
+#define RSCAN0CFPCTR4LL RSCAN0.CFPCTR4.UINT8[LL]
+#define RSCAN0CFPCTR4LH RSCAN0.CFPCTR4.UINT8[LH]
+#define RSCAN0CFPCTR4H RSCAN0.CFPCTR4.UINT16[H]
+#define RSCAN0CFPCTR4HL RSCAN0.CFPCTR4.UINT8[HL]
+#define RSCAN0CFPCTR4HH RSCAN0.CFPCTR4.UINT8[HH]
+#define RSCAN0CFPCTR5 RSCAN0.CFPCTR5.UINT32
+#define RSCAN0CFPCTR5L RSCAN0.CFPCTR5.UINT16[L]
+#define RSCAN0CFPCTR5LL RSCAN0.CFPCTR5.UINT8[LL]
+#define RSCAN0CFPCTR5LH RSCAN0.CFPCTR5.UINT8[LH]
+#define RSCAN0CFPCTR5H RSCAN0.CFPCTR5.UINT16[H]
+#define RSCAN0CFPCTR5HL RSCAN0.CFPCTR5.UINT8[HL]
+#define RSCAN0CFPCTR5HH RSCAN0.CFPCTR5.UINT8[HH]
+#define RSCAN0CFPCTR6 RSCAN0.CFPCTR6.UINT32
+#define RSCAN0CFPCTR6L RSCAN0.CFPCTR6.UINT16[L]
+#define RSCAN0CFPCTR6LL RSCAN0.CFPCTR6.UINT8[LL]
+#define RSCAN0CFPCTR6LH RSCAN0.CFPCTR6.UINT8[LH]
+#define RSCAN0CFPCTR6H RSCAN0.CFPCTR6.UINT16[H]
+#define RSCAN0CFPCTR6HL RSCAN0.CFPCTR6.UINT8[HL]
+#define RSCAN0CFPCTR6HH RSCAN0.CFPCTR6.UINT8[HH]
+#define RSCAN0CFPCTR7 RSCAN0.CFPCTR7.UINT32
+#define RSCAN0CFPCTR7L RSCAN0.CFPCTR7.UINT16[L]
+#define RSCAN0CFPCTR7LL RSCAN0.CFPCTR7.UINT8[LL]
+#define RSCAN0CFPCTR7LH RSCAN0.CFPCTR7.UINT8[LH]
+#define RSCAN0CFPCTR7H RSCAN0.CFPCTR7.UINT16[H]
+#define RSCAN0CFPCTR7HL RSCAN0.CFPCTR7.UINT8[HL]
+#define RSCAN0CFPCTR7HH RSCAN0.CFPCTR7.UINT8[HH]
+#define RSCAN0CFPCTR8 RSCAN0.CFPCTR8.UINT32
+#define RSCAN0CFPCTR8L RSCAN0.CFPCTR8.UINT16[L]
+#define RSCAN0CFPCTR8LL RSCAN0.CFPCTR8.UINT8[LL]
+#define RSCAN0CFPCTR8LH RSCAN0.CFPCTR8.UINT8[LH]
+#define RSCAN0CFPCTR8H RSCAN0.CFPCTR8.UINT16[H]
+#define RSCAN0CFPCTR8HL RSCAN0.CFPCTR8.UINT8[HL]
+#define RSCAN0CFPCTR8HH RSCAN0.CFPCTR8.UINT8[HH]
+#define RSCAN0CFPCTR9 RSCAN0.CFPCTR9.UINT32
+#define RSCAN0CFPCTR9L RSCAN0.CFPCTR9.UINT16[L]
+#define RSCAN0CFPCTR9LL RSCAN0.CFPCTR9.UINT8[LL]
+#define RSCAN0CFPCTR9LH RSCAN0.CFPCTR9.UINT8[LH]
+#define RSCAN0CFPCTR9H RSCAN0.CFPCTR9.UINT16[H]
+#define RSCAN0CFPCTR9HL RSCAN0.CFPCTR9.UINT8[HL]
+#define RSCAN0CFPCTR9HH RSCAN0.CFPCTR9.UINT8[HH]
+#define RSCAN0CFPCTR10 RSCAN0.CFPCTR10.UINT32
+#define RSCAN0CFPCTR10L RSCAN0.CFPCTR10.UINT16[L]
+#define RSCAN0CFPCTR10LL RSCAN0.CFPCTR10.UINT8[LL]
+#define RSCAN0CFPCTR10LH RSCAN0.CFPCTR10.UINT8[LH]
+#define RSCAN0CFPCTR10H RSCAN0.CFPCTR10.UINT16[H]
+#define RSCAN0CFPCTR10HL RSCAN0.CFPCTR10.UINT8[HL]
+#define RSCAN0CFPCTR10HH RSCAN0.CFPCTR10.UINT8[HH]
+#define RSCAN0CFPCTR11 RSCAN0.CFPCTR11.UINT32
+#define RSCAN0CFPCTR11L RSCAN0.CFPCTR11.UINT16[L]
+#define RSCAN0CFPCTR11LL RSCAN0.CFPCTR11.UINT8[LL]
+#define RSCAN0CFPCTR11LH RSCAN0.CFPCTR11.UINT8[LH]
+#define RSCAN0CFPCTR11H RSCAN0.CFPCTR11.UINT16[H]
+#define RSCAN0CFPCTR11HL RSCAN0.CFPCTR11.UINT8[HL]
+#define RSCAN0CFPCTR11HH RSCAN0.CFPCTR11.UINT8[HH]
+#define RSCAN0CFPCTR12 RSCAN0.CFPCTR12.UINT32
+#define RSCAN0CFPCTR12L RSCAN0.CFPCTR12.UINT16[L]
+#define RSCAN0CFPCTR12LL RSCAN0.CFPCTR12.UINT8[LL]
+#define RSCAN0CFPCTR12LH RSCAN0.CFPCTR12.UINT8[LH]
+#define RSCAN0CFPCTR12H RSCAN0.CFPCTR12.UINT16[H]
+#define RSCAN0CFPCTR12HL RSCAN0.CFPCTR12.UINT8[HL]
+#define RSCAN0CFPCTR12HH RSCAN0.CFPCTR12.UINT8[HH]
+#define RSCAN0CFPCTR13 RSCAN0.CFPCTR13.UINT32
+#define RSCAN0CFPCTR13L RSCAN0.CFPCTR13.UINT16[L]
+#define RSCAN0CFPCTR13LL RSCAN0.CFPCTR13.UINT8[LL]
+#define RSCAN0CFPCTR13LH RSCAN0.CFPCTR13.UINT8[LH]
+#define RSCAN0CFPCTR13H RSCAN0.CFPCTR13.UINT16[H]
+#define RSCAN0CFPCTR13HL RSCAN0.CFPCTR13.UINT8[HL]
+#define RSCAN0CFPCTR13HH RSCAN0.CFPCTR13.UINT8[HH]
+#define RSCAN0CFPCTR14 RSCAN0.CFPCTR14.UINT32
+#define RSCAN0CFPCTR14L RSCAN0.CFPCTR14.UINT16[L]
+#define RSCAN0CFPCTR14LL RSCAN0.CFPCTR14.UINT8[LL]
+#define RSCAN0CFPCTR14LH RSCAN0.CFPCTR14.UINT8[LH]
+#define RSCAN0CFPCTR14H RSCAN0.CFPCTR14.UINT16[H]
+#define RSCAN0CFPCTR14HL RSCAN0.CFPCTR14.UINT8[HL]
+#define RSCAN0CFPCTR14HH RSCAN0.CFPCTR14.UINT8[HH]
+#define RSCAN0FESTS RSCAN0.FESTS.UINT32
+#define RSCAN0FESTSL RSCAN0.FESTS.UINT16[L]
+#define RSCAN0FESTSLL RSCAN0.FESTS.UINT8[LL]
+#define RSCAN0FESTSLH RSCAN0.FESTS.UINT8[LH]
+#define RSCAN0FESTSH RSCAN0.FESTS.UINT16[H]
+#define RSCAN0FESTSHL RSCAN0.FESTS.UINT8[HL]
+#define RSCAN0FESTSHH RSCAN0.FESTS.UINT8[HH]
+#define RSCAN0FFSTS RSCAN0.FFSTS.UINT32
+#define RSCAN0FFSTSL RSCAN0.FFSTS.UINT16[L]
+#define RSCAN0FFSTSLL RSCAN0.FFSTS.UINT8[LL]
+#define RSCAN0FFSTSLH RSCAN0.FFSTS.UINT8[LH]
+#define RSCAN0FFSTSH RSCAN0.FFSTS.UINT16[H]
+#define RSCAN0FFSTSHL RSCAN0.FFSTS.UINT8[HL]
+#define RSCAN0FFSTSHH RSCAN0.FFSTS.UINT8[HH]
+#define RSCAN0FMSTS RSCAN0.FMSTS.UINT32
+#define RSCAN0FMSTSL RSCAN0.FMSTS.UINT16[L]
+#define RSCAN0FMSTSLL RSCAN0.FMSTS.UINT8[LL]
+#define RSCAN0FMSTSLH RSCAN0.FMSTS.UINT8[LH]
+#define RSCAN0FMSTSH RSCAN0.FMSTS.UINT16[H]
+#define RSCAN0FMSTSHL RSCAN0.FMSTS.UINT8[HL]
+#define RSCAN0FMSTSHH RSCAN0.FMSTS.UINT8[HH]
+#define RSCAN0RFISTS RSCAN0.RFISTS.UINT32
+#define RSCAN0RFISTSL RSCAN0.RFISTS.UINT16[L]
+#define RSCAN0RFISTSLL RSCAN0.RFISTS.UINT8[LL]
+#define RSCAN0RFISTSLH RSCAN0.RFISTS.UINT8[LH]
+#define RSCAN0RFISTSH RSCAN0.RFISTS.UINT16[H]
+#define RSCAN0RFISTSHL RSCAN0.RFISTS.UINT8[HL]
+#define RSCAN0RFISTSHH RSCAN0.RFISTS.UINT8[HH]
+#define RSCAN0CFRISTS RSCAN0.CFRISTS.UINT32
+#define RSCAN0CFRISTSL RSCAN0.CFRISTS.UINT16[L]
+#define RSCAN0CFRISTSLL RSCAN0.CFRISTS.UINT8[LL]
+#define RSCAN0CFRISTSLH RSCAN0.CFRISTS.UINT8[LH]
+#define RSCAN0CFRISTSH RSCAN0.CFRISTS.UINT16[H]
+#define RSCAN0CFRISTSHL RSCAN0.CFRISTS.UINT8[HL]
+#define RSCAN0CFRISTSHH RSCAN0.CFRISTS.UINT8[HH]
+#define RSCAN0CFTISTS RSCAN0.CFTISTS.UINT32
+#define RSCAN0CFTISTSL RSCAN0.CFTISTS.UINT16[L]
+#define RSCAN0CFTISTSLL RSCAN0.CFTISTS.UINT8[LL]
+#define RSCAN0CFTISTSLH RSCAN0.CFTISTS.UINT8[LH]
+#define RSCAN0CFTISTSH RSCAN0.CFTISTS.UINT16[H]
+#define RSCAN0CFTISTSHL RSCAN0.CFTISTS.UINT8[HL]
+#define RSCAN0CFTISTSHH RSCAN0.CFTISTS.UINT8[HH]
+#define RSCAN0TMC0 RSCAN0.TMC0
+#define RSCAN0TMC1 RSCAN0.TMC1
+#define RSCAN0TMC2 RSCAN0.TMC2
+#define RSCAN0TMC3 RSCAN0.TMC3
+#define RSCAN0TMC4 RSCAN0.TMC4
+#define RSCAN0TMC5 RSCAN0.TMC5
+#define RSCAN0TMC6 RSCAN0.TMC6
+#define RSCAN0TMC7 RSCAN0.TMC7
+#define RSCAN0TMC8 RSCAN0.TMC8
+#define RSCAN0TMC9 RSCAN0.TMC9
+#define RSCAN0TMC10 RSCAN0.TMC10
+#define RSCAN0TMC11 RSCAN0.TMC11
+#define RSCAN0TMC12 RSCAN0.TMC12
+#define RSCAN0TMC13 RSCAN0.TMC13
+#define RSCAN0TMC14 RSCAN0.TMC14
+#define RSCAN0TMC15 RSCAN0.TMC15
+#define RSCAN0TMC16 RSCAN0.TMC16
+#define RSCAN0TMC17 RSCAN0.TMC17
+#define RSCAN0TMC18 RSCAN0.TMC18
+#define RSCAN0TMC19 RSCAN0.TMC19
+#define RSCAN0TMC20 RSCAN0.TMC20
+#define RSCAN0TMC21 RSCAN0.TMC21
+#define RSCAN0TMC22 RSCAN0.TMC22
+#define RSCAN0TMC23 RSCAN0.TMC23
+#define RSCAN0TMC24 RSCAN0.TMC24
+#define RSCAN0TMC25 RSCAN0.TMC25
+#define RSCAN0TMC26 RSCAN0.TMC26
+#define RSCAN0TMC27 RSCAN0.TMC27
+#define RSCAN0TMC28 RSCAN0.TMC28
+#define RSCAN0TMC29 RSCAN0.TMC29
+#define RSCAN0TMC30 RSCAN0.TMC30
+#define RSCAN0TMC31 RSCAN0.TMC31
+#define RSCAN0TMC32 RSCAN0.TMC32
+#define RSCAN0TMC33 RSCAN0.TMC33
+#define RSCAN0TMC34 RSCAN0.TMC34
+#define RSCAN0TMC35 RSCAN0.TMC35
+#define RSCAN0TMC36 RSCAN0.TMC36
+#define RSCAN0TMC37 RSCAN0.TMC37
+#define RSCAN0TMC38 RSCAN0.TMC38
+#define RSCAN0TMC39 RSCAN0.TMC39
+#define RSCAN0TMC40 RSCAN0.TMC40
+#define RSCAN0TMC41 RSCAN0.TMC41
+#define RSCAN0TMC42 RSCAN0.TMC42
+#define RSCAN0TMC43 RSCAN0.TMC43
+#define RSCAN0TMC44 RSCAN0.TMC44
+#define RSCAN0TMC45 RSCAN0.TMC45
+#define RSCAN0TMC46 RSCAN0.TMC46
+#define RSCAN0TMC47 RSCAN0.TMC47
+#define RSCAN0TMC48 RSCAN0.TMC48
+#define RSCAN0TMC49 RSCAN0.TMC49
+#define RSCAN0TMC50 RSCAN0.TMC50
+#define RSCAN0TMC51 RSCAN0.TMC51
+#define RSCAN0TMC52 RSCAN0.TMC52
+#define RSCAN0TMC53 RSCAN0.TMC53
+#define RSCAN0TMC54 RSCAN0.TMC54
+#define RSCAN0TMC55 RSCAN0.TMC55
+#define RSCAN0TMC56 RSCAN0.TMC56
+#define RSCAN0TMC57 RSCAN0.TMC57
+#define RSCAN0TMC58 RSCAN0.TMC58
+#define RSCAN0TMC59 RSCAN0.TMC59
+#define RSCAN0TMC60 RSCAN0.TMC60
+#define RSCAN0TMC61 RSCAN0.TMC61
+#define RSCAN0TMC62 RSCAN0.TMC62
+#define RSCAN0TMC63 RSCAN0.TMC63
+#define RSCAN0TMC64 RSCAN0.TMC64
+#define RSCAN0TMC65 RSCAN0.TMC65
+#define RSCAN0TMC66 RSCAN0.TMC66
+#define RSCAN0TMC67 RSCAN0.TMC67
+#define RSCAN0TMC68 RSCAN0.TMC68
+#define RSCAN0TMC69 RSCAN0.TMC69
+#define RSCAN0TMC70 RSCAN0.TMC70
+#define RSCAN0TMC71 RSCAN0.TMC71
+#define RSCAN0TMC72 RSCAN0.TMC72
+#define RSCAN0TMC73 RSCAN0.TMC73
+#define RSCAN0TMC74 RSCAN0.TMC74
+#define RSCAN0TMC75 RSCAN0.TMC75
+#define RSCAN0TMC76 RSCAN0.TMC76
+#define RSCAN0TMC77 RSCAN0.TMC77
+#define RSCAN0TMC78 RSCAN0.TMC78
+#define RSCAN0TMC79 RSCAN0.TMC79
+#define RSCAN0TMSTS0 RSCAN0.TMSTS0
+#define RSCAN0TMSTS1 RSCAN0.TMSTS1
+#define RSCAN0TMSTS2 RSCAN0.TMSTS2
+#define RSCAN0TMSTS3 RSCAN0.TMSTS3
+#define RSCAN0TMSTS4 RSCAN0.TMSTS4
+#define RSCAN0TMSTS5 RSCAN0.TMSTS5
+#define RSCAN0TMSTS6 RSCAN0.TMSTS6
+#define RSCAN0TMSTS7 RSCAN0.TMSTS7
+#define RSCAN0TMSTS8 RSCAN0.TMSTS8
+#define RSCAN0TMSTS9 RSCAN0.TMSTS9
+#define RSCAN0TMSTS10 RSCAN0.TMSTS10
+#define RSCAN0TMSTS11 RSCAN0.TMSTS11
+#define RSCAN0TMSTS12 RSCAN0.TMSTS12
+#define RSCAN0TMSTS13 RSCAN0.TMSTS13
+#define RSCAN0TMSTS14 RSCAN0.TMSTS14
+#define RSCAN0TMSTS15 RSCAN0.TMSTS15
+#define RSCAN0TMSTS16 RSCAN0.TMSTS16
+#define RSCAN0TMSTS17 RSCAN0.TMSTS17
+#define RSCAN0TMSTS18 RSCAN0.TMSTS18
+#define RSCAN0TMSTS19 RSCAN0.TMSTS19
+#define RSCAN0TMSTS20 RSCAN0.TMSTS20
+#define RSCAN0TMSTS21 RSCAN0.TMSTS21
+#define RSCAN0TMSTS22 RSCAN0.TMSTS22
+#define RSCAN0TMSTS23 RSCAN0.TMSTS23
+#define RSCAN0TMSTS24 RSCAN0.TMSTS24
+#define RSCAN0TMSTS25 RSCAN0.TMSTS25
+#define RSCAN0TMSTS26 RSCAN0.TMSTS26
+#define RSCAN0TMSTS27 RSCAN0.TMSTS27
+#define RSCAN0TMSTS28 RSCAN0.TMSTS28
+#define RSCAN0TMSTS29 RSCAN0.TMSTS29
+#define RSCAN0TMSTS30 RSCAN0.TMSTS30
+#define RSCAN0TMSTS31 RSCAN0.TMSTS31
+#define RSCAN0TMSTS32 RSCAN0.TMSTS32
+#define RSCAN0TMSTS33 RSCAN0.TMSTS33
+#define RSCAN0TMSTS34 RSCAN0.TMSTS34
+#define RSCAN0TMSTS35 RSCAN0.TMSTS35
+#define RSCAN0TMSTS36 RSCAN0.TMSTS36
+#define RSCAN0TMSTS37 RSCAN0.TMSTS37
+#define RSCAN0TMSTS38 RSCAN0.TMSTS38
+#define RSCAN0TMSTS39 RSCAN0.TMSTS39
+#define RSCAN0TMSTS40 RSCAN0.TMSTS40
+#define RSCAN0TMSTS41 RSCAN0.TMSTS41
+#define RSCAN0TMSTS42 RSCAN0.TMSTS42
+#define RSCAN0TMSTS43 RSCAN0.TMSTS43
+#define RSCAN0TMSTS44 RSCAN0.TMSTS44
+#define RSCAN0TMSTS45 RSCAN0.TMSTS45
+#define RSCAN0TMSTS46 RSCAN0.TMSTS46
+#define RSCAN0TMSTS47 RSCAN0.TMSTS47
+#define RSCAN0TMSTS48 RSCAN0.TMSTS48
+#define RSCAN0TMSTS49 RSCAN0.TMSTS49
+#define RSCAN0TMSTS50 RSCAN0.TMSTS50
+#define RSCAN0TMSTS51 RSCAN0.TMSTS51
+#define RSCAN0TMSTS52 RSCAN0.TMSTS52
+#define RSCAN0TMSTS53 RSCAN0.TMSTS53
+#define RSCAN0TMSTS54 RSCAN0.TMSTS54
+#define RSCAN0TMSTS55 RSCAN0.TMSTS55
+#define RSCAN0TMSTS56 RSCAN0.TMSTS56
+#define RSCAN0TMSTS57 RSCAN0.TMSTS57
+#define RSCAN0TMSTS58 RSCAN0.TMSTS58
+#define RSCAN0TMSTS59 RSCAN0.TMSTS59
+#define RSCAN0TMSTS60 RSCAN0.TMSTS60
+#define RSCAN0TMSTS61 RSCAN0.TMSTS61
+#define RSCAN0TMSTS62 RSCAN0.TMSTS62
+#define RSCAN0TMSTS63 RSCAN0.TMSTS63
+#define RSCAN0TMSTS64 RSCAN0.TMSTS64
+#define RSCAN0TMSTS65 RSCAN0.TMSTS65
+#define RSCAN0TMSTS66 RSCAN0.TMSTS66
+#define RSCAN0TMSTS67 RSCAN0.TMSTS67
+#define RSCAN0TMSTS68 RSCAN0.TMSTS68
+#define RSCAN0TMSTS69 RSCAN0.TMSTS69
+#define RSCAN0TMSTS70 RSCAN0.TMSTS70
+#define RSCAN0TMSTS71 RSCAN0.TMSTS71
+#define RSCAN0TMSTS72 RSCAN0.TMSTS72
+#define RSCAN0TMSTS73 RSCAN0.TMSTS73
+#define RSCAN0TMSTS74 RSCAN0.TMSTS74
+#define RSCAN0TMSTS75 RSCAN0.TMSTS75
+#define RSCAN0TMSTS76 RSCAN0.TMSTS76
+#define RSCAN0TMSTS77 RSCAN0.TMSTS77
+#define RSCAN0TMSTS78 RSCAN0.TMSTS78
+#define RSCAN0TMSTS79 RSCAN0.TMSTS79
+#define RSCAN0TMTRSTS0 RSCAN0.TMTRSTS0.UINT32
+#define RSCAN0TMTRSTS0L RSCAN0.TMTRSTS0.UINT16[L]
+#define RSCAN0TMTRSTS0LL RSCAN0.TMTRSTS0.UINT8[LL]
+#define RSCAN0TMTRSTS0LH RSCAN0.TMTRSTS0.UINT8[LH]
+#define RSCAN0TMTRSTS0H RSCAN0.TMTRSTS0.UINT16[H]
+#define RSCAN0TMTRSTS0HL RSCAN0.TMTRSTS0.UINT8[HL]
+#define RSCAN0TMTRSTS0HH RSCAN0.TMTRSTS0.UINT8[HH]
+#define RSCAN0TMTRSTS1 RSCAN0.TMTRSTS1.UINT32
+#define RSCAN0TMTRSTS1L RSCAN0.TMTRSTS1.UINT16[L]
+#define RSCAN0TMTRSTS1LL RSCAN0.TMTRSTS1.UINT8[LL]
+#define RSCAN0TMTRSTS1LH RSCAN0.TMTRSTS1.UINT8[LH]
+#define RSCAN0TMTRSTS1H RSCAN0.TMTRSTS1.UINT16[H]
+#define RSCAN0TMTRSTS1HL RSCAN0.TMTRSTS1.UINT8[HL]
+#define RSCAN0TMTRSTS1HH RSCAN0.TMTRSTS1.UINT8[HH]
+#define RSCAN0TMTRSTS2 RSCAN0.TMTRSTS2.UINT32
+#define RSCAN0TMTRSTS2L RSCAN0.TMTRSTS2.UINT16[L]
+#define RSCAN0TMTRSTS2LL RSCAN0.TMTRSTS2.UINT8[LL]
+#define RSCAN0TMTRSTS2LH RSCAN0.TMTRSTS2.UINT8[LH]
+#define RSCAN0TMTRSTS2H RSCAN0.TMTRSTS2.UINT16[H]
+#define RSCAN0TMTRSTS2HL RSCAN0.TMTRSTS2.UINT8[HL]
+#define RSCAN0TMTRSTS2HH RSCAN0.TMTRSTS2.UINT8[HH]
+#define RSCAN0TMTARSTS0 RSCAN0.TMTARSTS0.UINT32
+#define RSCAN0TMTARSTS0L RSCAN0.TMTARSTS0.UINT16[L]
+#define RSCAN0TMTARSTS0LL RSCAN0.TMTARSTS0.UINT8[LL]
+#define RSCAN0TMTARSTS0LH RSCAN0.TMTARSTS0.UINT8[LH]
+#define RSCAN0TMTARSTS0H RSCAN0.TMTARSTS0.UINT16[H]
+#define RSCAN0TMTARSTS0HL RSCAN0.TMTARSTS0.UINT8[HL]
+#define RSCAN0TMTARSTS0HH RSCAN0.TMTARSTS0.UINT8[HH]
+#define RSCAN0TMTARSTS1 RSCAN0.TMTARSTS1.UINT32
+#define RSCAN0TMTARSTS1L RSCAN0.TMTARSTS1.UINT16[L]
+#define RSCAN0TMTARSTS1LL RSCAN0.TMTARSTS1.UINT8[LL]
+#define RSCAN0TMTARSTS1LH RSCAN0.TMTARSTS1.UINT8[LH]
+#define RSCAN0TMTARSTS1H RSCAN0.TMTARSTS1.UINT16[H]
+#define RSCAN0TMTARSTS1HL RSCAN0.TMTARSTS1.UINT8[HL]
+#define RSCAN0TMTARSTS1HH RSCAN0.TMTARSTS1.UINT8[HH]
+#define RSCAN0TMTARSTS2 RSCAN0.TMTARSTS2.UINT32
+#define RSCAN0TMTARSTS2L RSCAN0.TMTARSTS2.UINT16[L]
+#define RSCAN0TMTARSTS2LL RSCAN0.TMTARSTS2.UINT8[LL]
+#define RSCAN0TMTARSTS2LH RSCAN0.TMTARSTS2.UINT8[LH]
+#define RSCAN0TMTARSTS2H RSCAN0.TMTARSTS2.UINT16[H]
+#define RSCAN0TMTARSTS2HL RSCAN0.TMTARSTS2.UINT8[HL]
+#define RSCAN0TMTARSTS2HH RSCAN0.TMTARSTS2.UINT8[HH]
+#define RSCAN0TMTCSTS0 RSCAN0.TMTCSTS0.UINT32
+#define RSCAN0TMTCSTS0L RSCAN0.TMTCSTS0.UINT16[L]
+#define RSCAN0TMTCSTS0LL RSCAN0.TMTCSTS0.UINT8[LL]
+#define RSCAN0TMTCSTS0LH RSCAN0.TMTCSTS0.UINT8[LH]
+#define RSCAN0TMTCSTS0H RSCAN0.TMTCSTS0.UINT16[H]
+#define RSCAN0TMTCSTS0HL RSCAN0.TMTCSTS0.UINT8[HL]
+#define RSCAN0TMTCSTS0HH RSCAN0.TMTCSTS0.UINT8[HH]
+#define RSCAN0TMTCSTS1 RSCAN0.TMTCSTS1.UINT32
+#define RSCAN0TMTCSTS1L RSCAN0.TMTCSTS1.UINT16[L]
+#define RSCAN0TMTCSTS1LL RSCAN0.TMTCSTS1.UINT8[LL]
+#define RSCAN0TMTCSTS1LH RSCAN0.TMTCSTS1.UINT8[LH]
+#define RSCAN0TMTCSTS1H RSCAN0.TMTCSTS1.UINT16[H]
+#define RSCAN0TMTCSTS1HL RSCAN0.TMTCSTS1.UINT8[HL]
+#define RSCAN0TMTCSTS1HH RSCAN0.TMTCSTS1.UINT8[HH]
+#define RSCAN0TMTCSTS2 RSCAN0.TMTCSTS2.UINT32
+#define RSCAN0TMTCSTS2L RSCAN0.TMTCSTS2.UINT16[L]
+#define RSCAN0TMTCSTS2LL RSCAN0.TMTCSTS2.UINT8[LL]
+#define RSCAN0TMTCSTS2LH RSCAN0.TMTCSTS2.UINT8[LH]
+#define RSCAN0TMTCSTS2H RSCAN0.TMTCSTS2.UINT16[H]
+#define RSCAN0TMTCSTS2HL RSCAN0.TMTCSTS2.UINT8[HL]
+#define RSCAN0TMTCSTS2HH RSCAN0.TMTCSTS2.UINT8[HH]
+#define RSCAN0TMTASTS0 RSCAN0.TMTASTS0.UINT32
+#define RSCAN0TMTASTS0L RSCAN0.TMTASTS0.UINT16[L]
+#define RSCAN0TMTASTS0LL RSCAN0.TMTASTS0.UINT8[LL]
+#define RSCAN0TMTASTS0LH RSCAN0.TMTASTS0.UINT8[LH]
+#define RSCAN0TMTASTS0H RSCAN0.TMTASTS0.UINT16[H]
+#define RSCAN0TMTASTS0HL RSCAN0.TMTASTS0.UINT8[HL]
+#define RSCAN0TMTASTS0HH RSCAN0.TMTASTS0.UINT8[HH]
+#define RSCAN0TMTASTS1 RSCAN0.TMTASTS1.UINT32
+#define RSCAN0TMTASTS1L RSCAN0.TMTASTS1.UINT16[L]
+#define RSCAN0TMTASTS1LL RSCAN0.TMTASTS1.UINT8[LL]
+#define RSCAN0TMTASTS1LH RSCAN0.TMTASTS1.UINT8[LH]
+#define RSCAN0TMTASTS1H RSCAN0.TMTASTS1.UINT16[H]
+#define RSCAN0TMTASTS1HL RSCAN0.TMTASTS1.UINT8[HL]
+#define RSCAN0TMTASTS1HH RSCAN0.TMTASTS1.UINT8[HH]
+#define RSCAN0TMTASTS2 RSCAN0.TMTASTS2.UINT32
+#define RSCAN0TMTASTS2L RSCAN0.TMTASTS2.UINT16[L]
+#define RSCAN0TMTASTS2LL RSCAN0.TMTASTS2.UINT8[LL]
+#define RSCAN0TMTASTS2LH RSCAN0.TMTASTS2.UINT8[LH]
+#define RSCAN0TMTASTS2H RSCAN0.TMTASTS2.UINT16[H]
+#define RSCAN0TMTASTS2HL RSCAN0.TMTASTS2.UINT8[HL]
+#define RSCAN0TMTASTS2HH RSCAN0.TMTASTS2.UINT8[HH]
+#define RSCAN0TMIEC0 RSCAN0.TMIEC0.UINT32
+#define RSCAN0TMIEC0L RSCAN0.TMIEC0.UINT16[L]
+#define RSCAN0TMIEC0LL RSCAN0.TMIEC0.UINT8[LL]
+#define RSCAN0TMIEC0LH RSCAN0.TMIEC0.UINT8[LH]
+#define RSCAN0TMIEC0H RSCAN0.TMIEC0.UINT16[H]
+#define RSCAN0TMIEC0HL RSCAN0.TMIEC0.UINT8[HL]
+#define RSCAN0TMIEC0HH RSCAN0.TMIEC0.UINT8[HH]
+#define RSCAN0TMIEC1 RSCAN0.TMIEC1.UINT32
+#define RSCAN0TMIEC1L RSCAN0.TMIEC1.UINT16[L]
+#define RSCAN0TMIEC1LL RSCAN0.TMIEC1.UINT8[LL]
+#define RSCAN0TMIEC1LH RSCAN0.TMIEC1.UINT8[LH]
+#define RSCAN0TMIEC1H RSCAN0.TMIEC1.UINT16[H]
+#define RSCAN0TMIEC1HL RSCAN0.TMIEC1.UINT8[HL]
+#define RSCAN0TMIEC1HH RSCAN0.TMIEC1.UINT8[HH]
+#define RSCAN0TMIEC2 RSCAN0.TMIEC2.UINT32
+#define RSCAN0TMIEC2L RSCAN0.TMIEC2.UINT16[L]
+#define RSCAN0TMIEC2LL RSCAN0.TMIEC2.UINT8[LL]
+#define RSCAN0TMIEC2LH RSCAN0.TMIEC2.UINT8[LH]
+#define RSCAN0TMIEC2H RSCAN0.TMIEC2.UINT16[H]
+#define RSCAN0TMIEC2HL RSCAN0.TMIEC2.UINT8[HL]
+#define RSCAN0TMIEC2HH RSCAN0.TMIEC2.UINT8[HH]
+#define RSCAN0TXQCC0 RSCAN0.TXQCC0.UINT32
+#define RSCAN0TXQCC0L RSCAN0.TXQCC0.UINT16[L]
+#define RSCAN0TXQCC0LL RSCAN0.TXQCC0.UINT8[LL]
+#define RSCAN0TXQCC0LH RSCAN0.TXQCC0.UINT8[LH]
+#define RSCAN0TXQCC0H RSCAN0.TXQCC0.UINT16[H]
+#define RSCAN0TXQCC0HL RSCAN0.TXQCC0.UINT8[HL]
+#define RSCAN0TXQCC0HH RSCAN0.TXQCC0.UINT8[HH]
+#define RSCAN0TXQCC1 RSCAN0.TXQCC1.UINT32
+#define RSCAN0TXQCC1L RSCAN0.TXQCC1.UINT16[L]
+#define RSCAN0TXQCC1LL RSCAN0.TXQCC1.UINT8[LL]
+#define RSCAN0TXQCC1LH RSCAN0.TXQCC1.UINT8[LH]
+#define RSCAN0TXQCC1H RSCAN0.TXQCC1.UINT16[H]
+#define RSCAN0TXQCC1HL RSCAN0.TXQCC1.UINT8[HL]
+#define RSCAN0TXQCC1HH RSCAN0.TXQCC1.UINT8[HH]
+#define RSCAN0TXQCC2 RSCAN0.TXQCC2.UINT32
+#define RSCAN0TXQCC2L RSCAN0.TXQCC2.UINT16[L]
+#define RSCAN0TXQCC2LL RSCAN0.TXQCC2.UINT8[LL]
+#define RSCAN0TXQCC2LH RSCAN0.TXQCC2.UINT8[LH]
+#define RSCAN0TXQCC2H RSCAN0.TXQCC2.UINT16[H]
+#define RSCAN0TXQCC2HL RSCAN0.TXQCC2.UINT8[HL]
+#define RSCAN0TXQCC2HH RSCAN0.TXQCC2.UINT8[HH]
+#define RSCAN0TXQCC3 RSCAN0.TXQCC3.UINT32
+#define RSCAN0TXQCC3L RSCAN0.TXQCC3.UINT16[L]
+#define RSCAN0TXQCC3LL RSCAN0.TXQCC3.UINT8[LL]
+#define RSCAN0TXQCC3LH RSCAN0.TXQCC3.UINT8[LH]
+#define RSCAN0TXQCC3H RSCAN0.TXQCC3.UINT16[H]
+#define RSCAN0TXQCC3HL RSCAN0.TXQCC3.UINT8[HL]
+#define RSCAN0TXQCC3HH RSCAN0.TXQCC3.UINT8[HH]
+#define RSCAN0TXQCC4 RSCAN0.TXQCC4.UINT32
+#define RSCAN0TXQCC4L RSCAN0.TXQCC4.UINT16[L]
+#define RSCAN0TXQCC4LL RSCAN0.TXQCC4.UINT8[LL]
+#define RSCAN0TXQCC4LH RSCAN0.TXQCC4.UINT8[LH]
+#define RSCAN0TXQCC4H RSCAN0.TXQCC4.UINT16[H]
+#define RSCAN0TXQCC4HL RSCAN0.TXQCC4.UINT8[HL]
+#define RSCAN0TXQCC4HH RSCAN0.TXQCC4.UINT8[HH]
+#define RSCAN0TXQSTS0 RSCAN0.TXQSTS0.UINT32
+#define RSCAN0TXQSTS0L RSCAN0.TXQSTS0.UINT16[L]
+#define RSCAN0TXQSTS0LL RSCAN0.TXQSTS0.UINT8[LL]
+#define RSCAN0TXQSTS0LH RSCAN0.TXQSTS0.UINT8[LH]
+#define RSCAN0TXQSTS0H RSCAN0.TXQSTS0.UINT16[H]
+#define RSCAN0TXQSTS0HL RSCAN0.TXQSTS0.UINT8[HL]
+#define RSCAN0TXQSTS0HH RSCAN0.TXQSTS0.UINT8[HH]
+#define RSCAN0TXQSTS1 RSCAN0.TXQSTS1.UINT32
+#define RSCAN0TXQSTS1L RSCAN0.TXQSTS1.UINT16[L]
+#define RSCAN0TXQSTS1LL RSCAN0.TXQSTS1.UINT8[LL]
+#define RSCAN0TXQSTS1LH RSCAN0.TXQSTS1.UINT8[LH]
+#define RSCAN0TXQSTS1H RSCAN0.TXQSTS1.UINT16[H]
+#define RSCAN0TXQSTS1HL RSCAN0.TXQSTS1.UINT8[HL]
+#define RSCAN0TXQSTS1HH RSCAN0.TXQSTS1.UINT8[HH]
+#define RSCAN0TXQSTS2 RSCAN0.TXQSTS2.UINT32
+#define RSCAN0TXQSTS2L RSCAN0.TXQSTS2.UINT16[L]
+#define RSCAN0TXQSTS2LL RSCAN0.TXQSTS2.UINT8[LL]
+#define RSCAN0TXQSTS2LH RSCAN0.TXQSTS2.UINT8[LH]
+#define RSCAN0TXQSTS2H RSCAN0.TXQSTS2.UINT16[H]
+#define RSCAN0TXQSTS2HL RSCAN0.TXQSTS2.UINT8[HL]
+#define RSCAN0TXQSTS2HH RSCAN0.TXQSTS2.UINT8[HH]
+#define RSCAN0TXQSTS3 RSCAN0.TXQSTS3.UINT32
+#define RSCAN0TXQSTS3L RSCAN0.TXQSTS3.UINT16[L]
+#define RSCAN0TXQSTS3LL RSCAN0.TXQSTS3.UINT8[LL]
+#define RSCAN0TXQSTS3LH RSCAN0.TXQSTS3.UINT8[LH]
+#define RSCAN0TXQSTS3H RSCAN0.TXQSTS3.UINT16[H]
+#define RSCAN0TXQSTS3HL RSCAN0.TXQSTS3.UINT8[HL]
+#define RSCAN0TXQSTS3HH RSCAN0.TXQSTS3.UINT8[HH]
+#define RSCAN0TXQSTS4 RSCAN0.TXQSTS4.UINT32
+#define RSCAN0TXQSTS4L RSCAN0.TXQSTS4.UINT16[L]
+#define RSCAN0TXQSTS4LL RSCAN0.TXQSTS4.UINT8[LL]
+#define RSCAN0TXQSTS4LH RSCAN0.TXQSTS4.UINT8[LH]
+#define RSCAN0TXQSTS4H RSCAN0.TXQSTS4.UINT16[H]
+#define RSCAN0TXQSTS4HL RSCAN0.TXQSTS4.UINT8[HL]
+#define RSCAN0TXQSTS4HH RSCAN0.TXQSTS4.UINT8[HH]
+#define RSCAN0TXQPCTR0 RSCAN0.TXQPCTR0.UINT32
+#define RSCAN0TXQPCTR0L RSCAN0.TXQPCTR0.UINT16[L]
+#define RSCAN0TXQPCTR0LL RSCAN0.TXQPCTR0.UINT8[LL]
+#define RSCAN0TXQPCTR0LH RSCAN0.TXQPCTR0.UINT8[LH]
+#define RSCAN0TXQPCTR0H RSCAN0.TXQPCTR0.UINT16[H]
+#define RSCAN0TXQPCTR0HL RSCAN0.TXQPCTR0.UINT8[HL]
+#define RSCAN0TXQPCTR0HH RSCAN0.TXQPCTR0.UINT8[HH]
+#define RSCAN0TXQPCTR1 RSCAN0.TXQPCTR1.UINT32
+#define RSCAN0TXQPCTR1L RSCAN0.TXQPCTR1.UINT16[L]
+#define RSCAN0TXQPCTR1LL RSCAN0.TXQPCTR1.UINT8[LL]
+#define RSCAN0TXQPCTR1LH RSCAN0.TXQPCTR1.UINT8[LH]
+#define RSCAN0TXQPCTR1H RSCAN0.TXQPCTR1.UINT16[H]
+#define RSCAN0TXQPCTR1HL RSCAN0.TXQPCTR1.UINT8[HL]
+#define RSCAN0TXQPCTR1HH RSCAN0.TXQPCTR1.UINT8[HH]
+#define RSCAN0TXQPCTR2 RSCAN0.TXQPCTR2.UINT32
+#define RSCAN0TXQPCTR2L RSCAN0.TXQPCTR2.UINT16[L]
+#define RSCAN0TXQPCTR2LL RSCAN0.TXQPCTR2.UINT8[LL]
+#define RSCAN0TXQPCTR2LH RSCAN0.TXQPCTR2.UINT8[LH]
+#define RSCAN0TXQPCTR2H RSCAN0.TXQPCTR2.UINT16[H]
+#define RSCAN0TXQPCTR2HL RSCAN0.TXQPCTR2.UINT8[HL]
+#define RSCAN0TXQPCTR2HH RSCAN0.TXQPCTR2.UINT8[HH]
+#define RSCAN0TXQPCTR3 RSCAN0.TXQPCTR3.UINT32
+#define RSCAN0TXQPCTR3L RSCAN0.TXQPCTR3.UINT16[L]
+#define RSCAN0TXQPCTR3LL RSCAN0.TXQPCTR3.UINT8[LL]
+#define RSCAN0TXQPCTR3LH RSCAN0.TXQPCTR3.UINT8[LH]
+#define RSCAN0TXQPCTR3H RSCAN0.TXQPCTR3.UINT16[H]
+#define RSCAN0TXQPCTR3HL RSCAN0.TXQPCTR3.UINT8[HL]
+#define RSCAN0TXQPCTR3HH RSCAN0.TXQPCTR3.UINT8[HH]
+#define RSCAN0TXQPCTR4 RSCAN0.TXQPCTR4.UINT32
+#define RSCAN0TXQPCTR4L RSCAN0.TXQPCTR4.UINT16[L]
+#define RSCAN0TXQPCTR4LL RSCAN0.TXQPCTR4.UINT8[LL]
+#define RSCAN0TXQPCTR4LH RSCAN0.TXQPCTR4.UINT8[LH]
+#define RSCAN0TXQPCTR4H RSCAN0.TXQPCTR4.UINT16[H]
+#define RSCAN0TXQPCTR4HL RSCAN0.TXQPCTR4.UINT8[HL]
+#define RSCAN0TXQPCTR4HH RSCAN0.TXQPCTR4.UINT8[HH]
+#define RSCAN0THLCC0 RSCAN0.THLCC0.UINT32
+#define RSCAN0THLCC0L RSCAN0.THLCC0.UINT16[L]
+#define RSCAN0THLCC0LL RSCAN0.THLCC0.UINT8[LL]
+#define RSCAN0THLCC0LH RSCAN0.THLCC0.UINT8[LH]
+#define RSCAN0THLCC0H RSCAN0.THLCC0.UINT16[H]
+#define RSCAN0THLCC0HL RSCAN0.THLCC0.UINT8[HL]
+#define RSCAN0THLCC0HH RSCAN0.THLCC0.UINT8[HH]
+#define RSCAN0THLCC1 RSCAN0.THLCC1.UINT32
+#define RSCAN0THLCC1L RSCAN0.THLCC1.UINT16[L]
+#define RSCAN0THLCC1LL RSCAN0.THLCC1.UINT8[LL]
+#define RSCAN0THLCC1LH RSCAN0.THLCC1.UINT8[LH]
+#define RSCAN0THLCC1H RSCAN0.THLCC1.UINT16[H]
+#define RSCAN0THLCC1HL RSCAN0.THLCC1.UINT8[HL]
+#define RSCAN0THLCC1HH RSCAN0.THLCC1.UINT8[HH]
+#define RSCAN0THLCC2 RSCAN0.THLCC2.UINT32
+#define RSCAN0THLCC2L RSCAN0.THLCC2.UINT16[L]
+#define RSCAN0THLCC2LL RSCAN0.THLCC2.UINT8[LL]
+#define RSCAN0THLCC2LH RSCAN0.THLCC2.UINT8[LH]
+#define RSCAN0THLCC2H RSCAN0.THLCC2.UINT16[H]
+#define RSCAN0THLCC2HL RSCAN0.THLCC2.UINT8[HL]
+#define RSCAN0THLCC2HH RSCAN0.THLCC2.UINT8[HH]
+#define RSCAN0THLCC3 RSCAN0.THLCC3.UINT32
+#define RSCAN0THLCC3L RSCAN0.THLCC3.UINT16[L]
+#define RSCAN0THLCC3LL RSCAN0.THLCC3.UINT8[LL]
+#define RSCAN0THLCC3LH RSCAN0.THLCC3.UINT8[LH]
+#define RSCAN0THLCC3H RSCAN0.THLCC3.UINT16[H]
+#define RSCAN0THLCC3HL RSCAN0.THLCC3.UINT8[HL]
+#define RSCAN0THLCC3HH RSCAN0.THLCC3.UINT8[HH]
+#define RSCAN0THLCC4 RSCAN0.THLCC4.UINT32
+#define RSCAN0THLCC4L RSCAN0.THLCC4.UINT16[L]
+#define RSCAN0THLCC4LL RSCAN0.THLCC4.UINT8[LL]
+#define RSCAN0THLCC4LH RSCAN0.THLCC4.UINT8[LH]
+#define RSCAN0THLCC4H RSCAN0.THLCC4.UINT16[H]
+#define RSCAN0THLCC4HL RSCAN0.THLCC4.UINT8[HL]
+#define RSCAN0THLCC4HH RSCAN0.THLCC4.UINT8[HH]
+#define RSCAN0THLSTS0 RSCAN0.THLSTS0.UINT32
+#define RSCAN0THLSTS0L RSCAN0.THLSTS0.UINT16[L]
+#define RSCAN0THLSTS0LL RSCAN0.THLSTS0.UINT8[LL]
+#define RSCAN0THLSTS0LH RSCAN0.THLSTS0.UINT8[LH]
+#define RSCAN0THLSTS0H RSCAN0.THLSTS0.UINT16[H]
+#define RSCAN0THLSTS0HL RSCAN0.THLSTS0.UINT8[HL]
+#define RSCAN0THLSTS0HH RSCAN0.THLSTS0.UINT8[HH]
+#define RSCAN0THLSTS1 RSCAN0.THLSTS1.UINT32
+#define RSCAN0THLSTS1L RSCAN0.THLSTS1.UINT16[L]
+#define RSCAN0THLSTS1LL RSCAN0.THLSTS1.UINT8[LL]
+#define RSCAN0THLSTS1LH RSCAN0.THLSTS1.UINT8[LH]
+#define RSCAN0THLSTS1H RSCAN0.THLSTS1.UINT16[H]
+#define RSCAN0THLSTS1HL RSCAN0.THLSTS1.UINT8[HL]
+#define RSCAN0THLSTS1HH RSCAN0.THLSTS1.UINT8[HH]
+#define RSCAN0THLSTS2 RSCAN0.THLSTS2.UINT32
+#define RSCAN0THLSTS2L RSCAN0.THLSTS2.UINT16[L]
+#define RSCAN0THLSTS2LL RSCAN0.THLSTS2.UINT8[LL]
+#define RSCAN0THLSTS2LH RSCAN0.THLSTS2.UINT8[LH]
+#define RSCAN0THLSTS2H RSCAN0.THLSTS2.UINT16[H]
+#define RSCAN0THLSTS2HL RSCAN0.THLSTS2.UINT8[HL]
+#define RSCAN0THLSTS2HH RSCAN0.THLSTS2.UINT8[HH]
+#define RSCAN0THLSTS3 RSCAN0.THLSTS3.UINT32
+#define RSCAN0THLSTS3L RSCAN0.THLSTS3.UINT16[L]
+#define RSCAN0THLSTS3LL RSCAN0.THLSTS3.UINT8[LL]
+#define RSCAN0THLSTS3LH RSCAN0.THLSTS3.UINT8[LH]
+#define RSCAN0THLSTS3H RSCAN0.THLSTS3.UINT16[H]
+#define RSCAN0THLSTS3HL RSCAN0.THLSTS3.UINT8[HL]
+#define RSCAN0THLSTS3HH RSCAN0.THLSTS3.UINT8[HH]
+#define RSCAN0THLSTS4 RSCAN0.THLSTS4.UINT32
+#define RSCAN0THLSTS4L RSCAN0.THLSTS4.UINT16[L]
+#define RSCAN0THLSTS4LL RSCAN0.THLSTS4.UINT8[LL]
+#define RSCAN0THLSTS4LH RSCAN0.THLSTS4.UINT8[LH]
+#define RSCAN0THLSTS4H RSCAN0.THLSTS4.UINT16[H]
+#define RSCAN0THLSTS4HL RSCAN0.THLSTS4.UINT8[HL]
+#define RSCAN0THLSTS4HH RSCAN0.THLSTS4.UINT8[HH]
+#define RSCAN0THLPCTR0 RSCAN0.THLPCTR0.UINT32
+#define RSCAN0THLPCTR0L RSCAN0.THLPCTR0.UINT16[L]
+#define RSCAN0THLPCTR0LL RSCAN0.THLPCTR0.UINT8[LL]
+#define RSCAN0THLPCTR0LH RSCAN0.THLPCTR0.UINT8[LH]
+#define RSCAN0THLPCTR0H RSCAN0.THLPCTR0.UINT16[H]
+#define RSCAN0THLPCTR0HL RSCAN0.THLPCTR0.UINT8[HL]
+#define RSCAN0THLPCTR0HH RSCAN0.THLPCTR0.UINT8[HH]
+#define RSCAN0THLPCTR1 RSCAN0.THLPCTR1.UINT32
+#define RSCAN0THLPCTR1L RSCAN0.THLPCTR1.UINT16[L]
+#define RSCAN0THLPCTR1LL RSCAN0.THLPCTR1.UINT8[LL]
+#define RSCAN0THLPCTR1LH RSCAN0.THLPCTR1.UINT8[LH]
+#define RSCAN0THLPCTR1H RSCAN0.THLPCTR1.UINT16[H]
+#define RSCAN0THLPCTR1HL RSCAN0.THLPCTR1.UINT8[HL]
+#define RSCAN0THLPCTR1HH RSCAN0.THLPCTR1.UINT8[HH]
+#define RSCAN0THLPCTR2 RSCAN0.THLPCTR2.UINT32
+#define RSCAN0THLPCTR2L RSCAN0.THLPCTR2.UINT16[L]
+#define RSCAN0THLPCTR2LL RSCAN0.THLPCTR2.UINT8[LL]
+#define RSCAN0THLPCTR2LH RSCAN0.THLPCTR2.UINT8[LH]
+#define RSCAN0THLPCTR2H RSCAN0.THLPCTR2.UINT16[H]
+#define RSCAN0THLPCTR2HL RSCAN0.THLPCTR2.UINT8[HL]
+#define RSCAN0THLPCTR2HH RSCAN0.THLPCTR2.UINT8[HH]
+#define RSCAN0THLPCTR3 RSCAN0.THLPCTR3.UINT32
+#define RSCAN0THLPCTR3L RSCAN0.THLPCTR3.UINT16[L]
+#define RSCAN0THLPCTR3LL RSCAN0.THLPCTR3.UINT8[LL]
+#define RSCAN0THLPCTR3LH RSCAN0.THLPCTR3.UINT8[LH]
+#define RSCAN0THLPCTR3H RSCAN0.THLPCTR3.UINT16[H]
+#define RSCAN0THLPCTR3HL RSCAN0.THLPCTR3.UINT8[HL]
+#define RSCAN0THLPCTR3HH RSCAN0.THLPCTR3.UINT8[HH]
+#define RSCAN0THLPCTR4 RSCAN0.THLPCTR4.UINT32
+#define RSCAN0THLPCTR4L RSCAN0.THLPCTR4.UINT16[L]
+#define RSCAN0THLPCTR4LL RSCAN0.THLPCTR4.UINT8[LL]
+#define RSCAN0THLPCTR4LH RSCAN0.THLPCTR4.UINT8[LH]
+#define RSCAN0THLPCTR4H RSCAN0.THLPCTR4.UINT16[H]
+#define RSCAN0THLPCTR4HL RSCAN0.THLPCTR4.UINT8[HL]
+#define RSCAN0THLPCTR4HH RSCAN0.THLPCTR4.UINT8[HH]
+#define RSCAN0GTINTSTS0 RSCAN0.GTINTSTS0.UINT32
+#define RSCAN0GTINTSTS0L RSCAN0.GTINTSTS0.UINT16[L]
+#define RSCAN0GTINTSTS0LL RSCAN0.GTINTSTS0.UINT8[LL]
+#define RSCAN0GTINTSTS0LH RSCAN0.GTINTSTS0.UINT8[LH]
+#define RSCAN0GTINTSTS0H RSCAN0.GTINTSTS0.UINT16[H]
+#define RSCAN0GTINTSTS0HL RSCAN0.GTINTSTS0.UINT8[HL]
+#define RSCAN0GTINTSTS0HH RSCAN0.GTINTSTS0.UINT8[HH]
+#define RSCAN0GTINTSTS1 RSCAN0.GTINTSTS1.UINT32
+#define RSCAN0GTINTSTS1L RSCAN0.GTINTSTS1.UINT16[L]
+#define RSCAN0GTINTSTS1LL RSCAN0.GTINTSTS1.UINT8[LL]
+#define RSCAN0GTINTSTS1LH RSCAN0.GTINTSTS1.UINT8[LH]
+#define RSCAN0GTINTSTS1H RSCAN0.GTINTSTS1.UINT16[H]
+#define RSCAN0GTINTSTS1HL RSCAN0.GTINTSTS1.UINT8[HL]
+#define RSCAN0GTINTSTS1HH RSCAN0.GTINTSTS1.UINT8[HH]
+#define RSCAN0GTSTCFG RSCAN0.GTSTCFG.UINT32
+#define RSCAN0GTSTCFGL RSCAN0.GTSTCFG.UINT16[L]
+#define RSCAN0GTSTCFGLL RSCAN0.GTSTCFG.UINT8[LL]
+#define RSCAN0GTSTCFGLH RSCAN0.GTSTCFG.UINT8[LH]
+#define RSCAN0GTSTCFGH RSCAN0.GTSTCFG.UINT16[H]
+#define RSCAN0GTSTCFGHL RSCAN0.GTSTCFG.UINT8[HL]
+#define RSCAN0GTSTCFGHH RSCAN0.GTSTCFG.UINT8[HH]
+#define RSCAN0GTSTCTR RSCAN0.GTSTCTR.UINT32
+#define RSCAN0GTSTCTRL RSCAN0.GTSTCTR.UINT16[L]
+#define RSCAN0GTSTCTRLL RSCAN0.GTSTCTR.UINT8[LL]
+#define RSCAN0GTSTCTRLH RSCAN0.GTSTCTR.UINT8[LH]
+#define RSCAN0GTSTCTRH RSCAN0.GTSTCTR.UINT16[H]
+#define RSCAN0GTSTCTRHL RSCAN0.GTSTCTR.UINT8[HL]
+#define RSCAN0GTSTCTRHH RSCAN0.GTSTCTR.UINT8[HH]
+#define RSCAN0GLOCKK RSCAN0.GLOCKK.UINT32
+#define RSCAN0GLOCKKL RSCAN0.GLOCKK.UINT16[L]
+#define RSCAN0GLOCKKH RSCAN0.GLOCKK.UINT16[H]
+#define RSCAN0GAFLID0 RSCAN0.GAFLID0.UINT32
+#define RSCAN0GAFLID0L RSCAN0.GAFLID0.UINT16[L]
+#define RSCAN0GAFLID0LL RSCAN0.GAFLID0.UINT8[LL]
+#define RSCAN0GAFLID0LH RSCAN0.GAFLID0.UINT8[LH]
+#define RSCAN0GAFLID0H RSCAN0.GAFLID0.UINT16[H]
+#define RSCAN0GAFLID0HL RSCAN0.GAFLID0.UINT8[HL]
+#define RSCAN0GAFLID0HH RSCAN0.GAFLID0.UINT8[HH]
+#define RSCAN0GAFLM0 RSCAN0.GAFLM0.UINT32
+#define RSCAN0GAFLM0L RSCAN0.GAFLM0.UINT16[L]
+#define RSCAN0GAFLM0LL RSCAN0.GAFLM0.UINT8[LL]
+#define RSCAN0GAFLM0LH RSCAN0.GAFLM0.UINT8[LH]
+#define RSCAN0GAFLM0H RSCAN0.GAFLM0.UINT16[H]
+#define RSCAN0GAFLM0HL RSCAN0.GAFLM0.UINT8[HL]
+#define RSCAN0GAFLM0HH RSCAN0.GAFLM0.UINT8[HH]
+#define RSCAN0GAFLP00 RSCAN0.GAFLP00.UINT32
+#define RSCAN0GAFLP00L RSCAN0.GAFLP00.UINT16[L]
+#define RSCAN0GAFLP00LL RSCAN0.GAFLP00.UINT8[LL]
+#define RSCAN0GAFLP00LH RSCAN0.GAFLP00.UINT8[LH]
+#define RSCAN0GAFLP00H RSCAN0.GAFLP00.UINT16[H]
+#define RSCAN0GAFLP00HL RSCAN0.GAFLP00.UINT8[HL]
+#define RSCAN0GAFLP00HH RSCAN0.GAFLP00.UINT8[HH]
+#define RSCAN0GAFLP10 RSCAN0.GAFLP10.UINT32
+#define RSCAN0GAFLP10L RSCAN0.GAFLP10.UINT16[L]
+#define RSCAN0GAFLP10LL RSCAN0.GAFLP10.UINT8[LL]
+#define RSCAN0GAFLP10LH RSCAN0.GAFLP10.UINT8[LH]
+#define RSCAN0GAFLP10H RSCAN0.GAFLP10.UINT16[H]
+#define RSCAN0GAFLP10HL RSCAN0.GAFLP10.UINT8[HL]
+#define RSCAN0GAFLP10HH RSCAN0.GAFLP10.UINT8[HH]
+#define RSCAN0GAFLID1 RSCAN0.GAFLID1.UINT32
+#define RSCAN0GAFLID1L RSCAN0.GAFLID1.UINT16[L]
+#define RSCAN0GAFLID1LL RSCAN0.GAFLID1.UINT8[LL]
+#define RSCAN0GAFLID1LH RSCAN0.GAFLID1.UINT8[LH]
+#define RSCAN0GAFLID1H RSCAN0.GAFLID1.UINT16[H]
+#define RSCAN0GAFLID1HL RSCAN0.GAFLID1.UINT8[HL]
+#define RSCAN0GAFLID1HH RSCAN0.GAFLID1.UINT8[HH]
+#define RSCAN0GAFLM1 RSCAN0.GAFLM1.UINT32
+#define RSCAN0GAFLM1L RSCAN0.GAFLM1.UINT16[L]
+#define RSCAN0GAFLM1LL RSCAN0.GAFLM1.UINT8[LL]
+#define RSCAN0GAFLM1LH RSCAN0.GAFLM1.UINT8[LH]
+#define RSCAN0GAFLM1H RSCAN0.GAFLM1.UINT16[H]
+#define RSCAN0GAFLM1HL RSCAN0.GAFLM1.UINT8[HL]
+#define RSCAN0GAFLM1HH RSCAN0.GAFLM1.UINT8[HH]
+#define RSCAN0GAFLP01 RSCAN0.GAFLP01.UINT32
+#define RSCAN0GAFLP01L RSCAN0.GAFLP01.UINT16[L]
+#define RSCAN0GAFLP01LL RSCAN0.GAFLP01.UINT8[LL]
+#define RSCAN0GAFLP01LH RSCAN0.GAFLP01.UINT8[LH]
+#define RSCAN0GAFLP01H RSCAN0.GAFLP01.UINT16[H]
+#define RSCAN0GAFLP01HL RSCAN0.GAFLP01.UINT8[HL]
+#define RSCAN0GAFLP01HH RSCAN0.GAFLP01.UINT8[HH]
+#define RSCAN0GAFLP11 RSCAN0.GAFLP11.UINT32
+#define RSCAN0GAFLP11L RSCAN0.GAFLP11.UINT16[L]
+#define RSCAN0GAFLP11LL RSCAN0.GAFLP11.UINT8[LL]
+#define RSCAN0GAFLP11LH RSCAN0.GAFLP11.UINT8[LH]
+#define RSCAN0GAFLP11H RSCAN0.GAFLP11.UINT16[H]
+#define RSCAN0GAFLP11HL RSCAN0.GAFLP11.UINT8[HL]
+#define RSCAN0GAFLP11HH RSCAN0.GAFLP11.UINT8[HH]
+#define RSCAN0GAFLID2 RSCAN0.GAFLID2.UINT32
+#define RSCAN0GAFLID2L RSCAN0.GAFLID2.UINT16[L]
+#define RSCAN0GAFLID2LL RSCAN0.GAFLID2.UINT8[LL]
+#define RSCAN0GAFLID2LH RSCAN0.GAFLID2.UINT8[LH]
+#define RSCAN0GAFLID2H RSCAN0.GAFLID2.UINT16[H]
+#define RSCAN0GAFLID2HL RSCAN0.GAFLID2.UINT8[HL]
+#define RSCAN0GAFLID2HH RSCAN0.GAFLID2.UINT8[HH]
+#define RSCAN0GAFLM2 RSCAN0.GAFLM2.UINT32
+#define RSCAN0GAFLM2L RSCAN0.GAFLM2.UINT16[L]
+#define RSCAN0GAFLM2LL RSCAN0.GAFLM2.UINT8[LL]
+#define RSCAN0GAFLM2LH RSCAN0.GAFLM2.UINT8[LH]
+#define RSCAN0GAFLM2H RSCAN0.GAFLM2.UINT16[H]
+#define RSCAN0GAFLM2HL RSCAN0.GAFLM2.UINT8[HL]
+#define RSCAN0GAFLM2HH RSCAN0.GAFLM2.UINT8[HH]
+#define RSCAN0GAFLP02 RSCAN0.GAFLP02.UINT32
+#define RSCAN0GAFLP02L RSCAN0.GAFLP02.UINT16[L]
+#define RSCAN0GAFLP02LL RSCAN0.GAFLP02.UINT8[LL]
+#define RSCAN0GAFLP02LH RSCAN0.GAFLP02.UINT8[LH]
+#define RSCAN0GAFLP02H RSCAN0.GAFLP02.UINT16[H]
+#define RSCAN0GAFLP02HL RSCAN0.GAFLP02.UINT8[HL]
+#define RSCAN0GAFLP02HH RSCAN0.GAFLP02.UINT8[HH]
+#define RSCAN0GAFLP12 RSCAN0.GAFLP12.UINT32
+#define RSCAN0GAFLP12L RSCAN0.GAFLP12.UINT16[L]
+#define RSCAN0GAFLP12LL RSCAN0.GAFLP12.UINT8[LL]
+#define RSCAN0GAFLP12LH RSCAN0.GAFLP12.UINT8[LH]
+#define RSCAN0GAFLP12H RSCAN0.GAFLP12.UINT16[H]
+#define RSCAN0GAFLP12HL RSCAN0.GAFLP12.UINT8[HL]
+#define RSCAN0GAFLP12HH RSCAN0.GAFLP12.UINT8[HH]
+#define RSCAN0GAFLID3 RSCAN0.GAFLID3.UINT32
+#define RSCAN0GAFLID3L RSCAN0.GAFLID3.UINT16[L]
+#define RSCAN0GAFLID3LL RSCAN0.GAFLID3.UINT8[LL]
+#define RSCAN0GAFLID3LH RSCAN0.GAFLID3.UINT8[LH]
+#define RSCAN0GAFLID3H RSCAN0.GAFLID3.UINT16[H]
+#define RSCAN0GAFLID3HL RSCAN0.GAFLID3.UINT8[HL]
+#define RSCAN0GAFLID3HH RSCAN0.GAFLID3.UINT8[HH]
+#define RSCAN0GAFLM3 RSCAN0.GAFLM3.UINT32
+#define RSCAN0GAFLM3L RSCAN0.GAFLM3.UINT16[L]
+#define RSCAN0GAFLM3LL RSCAN0.GAFLM3.UINT8[LL]
+#define RSCAN0GAFLM3LH RSCAN0.GAFLM3.UINT8[LH]
+#define RSCAN0GAFLM3H RSCAN0.GAFLM3.UINT16[H]
+#define RSCAN0GAFLM3HL RSCAN0.GAFLM3.UINT8[HL]
+#define RSCAN0GAFLM3HH RSCAN0.GAFLM3.UINT8[HH]
+#define RSCAN0GAFLP03 RSCAN0.GAFLP03.UINT32
+#define RSCAN0GAFLP03L RSCAN0.GAFLP03.UINT16[L]
+#define RSCAN0GAFLP03LL RSCAN0.GAFLP03.UINT8[LL]
+#define RSCAN0GAFLP03LH RSCAN0.GAFLP03.UINT8[LH]
+#define RSCAN0GAFLP03H RSCAN0.GAFLP03.UINT16[H]
+#define RSCAN0GAFLP03HL RSCAN0.GAFLP03.UINT8[HL]
+#define RSCAN0GAFLP03HH RSCAN0.GAFLP03.UINT8[HH]
+#define RSCAN0GAFLP13 RSCAN0.GAFLP13.UINT32
+#define RSCAN0GAFLP13L RSCAN0.GAFLP13.UINT16[L]
+#define RSCAN0GAFLP13LL RSCAN0.GAFLP13.UINT8[LL]
+#define RSCAN0GAFLP13LH RSCAN0.GAFLP13.UINT8[LH]
+#define RSCAN0GAFLP13H RSCAN0.GAFLP13.UINT16[H]
+#define RSCAN0GAFLP13HL RSCAN0.GAFLP13.UINT8[HL]
+#define RSCAN0GAFLP13HH RSCAN0.GAFLP13.UINT8[HH]
+#define RSCAN0GAFLID4 RSCAN0.GAFLID4.UINT32
+#define RSCAN0GAFLID4L RSCAN0.GAFLID4.UINT16[L]
+#define RSCAN0GAFLID4LL RSCAN0.GAFLID4.UINT8[LL]
+#define RSCAN0GAFLID4LH RSCAN0.GAFLID4.UINT8[LH]
+#define RSCAN0GAFLID4H RSCAN0.GAFLID4.UINT16[H]
+#define RSCAN0GAFLID4HL RSCAN0.GAFLID4.UINT8[HL]
+#define RSCAN0GAFLID4HH RSCAN0.GAFLID4.UINT8[HH]
+#define RSCAN0GAFLM4 RSCAN0.GAFLM4.UINT32
+#define RSCAN0GAFLM4L RSCAN0.GAFLM4.UINT16[L]
+#define RSCAN0GAFLM4LL RSCAN0.GAFLM4.UINT8[LL]
+#define RSCAN0GAFLM4LH RSCAN0.GAFLM4.UINT8[LH]
+#define RSCAN0GAFLM4H RSCAN0.GAFLM4.UINT16[H]
+#define RSCAN0GAFLM4HL RSCAN0.GAFLM4.UINT8[HL]
+#define RSCAN0GAFLM4HH RSCAN0.GAFLM4.UINT8[HH]
+#define RSCAN0GAFLP04 RSCAN0.GAFLP04.UINT32
+#define RSCAN0GAFLP04L RSCAN0.GAFLP04.UINT16[L]
+#define RSCAN0GAFLP04LL RSCAN0.GAFLP04.UINT8[LL]
+#define RSCAN0GAFLP04LH RSCAN0.GAFLP04.UINT8[LH]
+#define RSCAN0GAFLP04H RSCAN0.GAFLP04.UINT16[H]
+#define RSCAN0GAFLP04HL RSCAN0.GAFLP04.UINT8[HL]
+#define RSCAN0GAFLP04HH RSCAN0.GAFLP04.UINT8[HH]
+#define RSCAN0GAFLP14 RSCAN0.GAFLP14.UINT32
+#define RSCAN0GAFLP14L RSCAN0.GAFLP14.UINT16[L]
+#define RSCAN0GAFLP14LL RSCAN0.GAFLP14.UINT8[LL]
+#define RSCAN0GAFLP14LH RSCAN0.GAFLP14.UINT8[LH]
+#define RSCAN0GAFLP14H RSCAN0.GAFLP14.UINT16[H]
+#define RSCAN0GAFLP14HL RSCAN0.GAFLP14.UINT8[HL]
+#define RSCAN0GAFLP14HH RSCAN0.GAFLP14.UINT8[HH]
+#define RSCAN0GAFLID5 RSCAN0.GAFLID5.UINT32
+#define RSCAN0GAFLID5L RSCAN0.GAFLID5.UINT16[L]
+#define RSCAN0GAFLID5LL RSCAN0.GAFLID5.UINT8[LL]
+#define RSCAN0GAFLID5LH RSCAN0.GAFLID5.UINT8[LH]
+#define RSCAN0GAFLID5H RSCAN0.GAFLID5.UINT16[H]
+#define RSCAN0GAFLID5HL RSCAN0.GAFLID5.UINT8[HL]
+#define RSCAN0GAFLID5HH RSCAN0.GAFLID5.UINT8[HH]
+#define RSCAN0GAFLM5 RSCAN0.GAFLM5.UINT32
+#define RSCAN0GAFLM5L RSCAN0.GAFLM5.UINT16[L]
+#define RSCAN0GAFLM5LL RSCAN0.GAFLM5.UINT8[LL]
+#define RSCAN0GAFLM5LH RSCAN0.GAFLM5.UINT8[LH]
+#define RSCAN0GAFLM5H RSCAN0.GAFLM5.UINT16[H]
+#define RSCAN0GAFLM5HL RSCAN0.GAFLM5.UINT8[HL]
+#define RSCAN0GAFLM5HH RSCAN0.GAFLM5.UINT8[HH]
+#define RSCAN0GAFLP05 RSCAN0.GAFLP05.UINT32
+#define RSCAN0GAFLP05L RSCAN0.GAFLP05.UINT16[L]
+#define RSCAN0GAFLP05LL RSCAN0.GAFLP05.UINT8[LL]
+#define RSCAN0GAFLP05LH RSCAN0.GAFLP05.UINT8[LH]
+#define RSCAN0GAFLP05H RSCAN0.GAFLP05.UINT16[H]
+#define RSCAN0GAFLP05HL RSCAN0.GAFLP05.UINT8[HL]
+#define RSCAN0GAFLP05HH RSCAN0.GAFLP05.UINT8[HH]
+#define RSCAN0GAFLP15 RSCAN0.GAFLP15.UINT32
+#define RSCAN0GAFLP15L RSCAN0.GAFLP15.UINT16[L]
+#define RSCAN0GAFLP15LL RSCAN0.GAFLP15.UINT8[LL]
+#define RSCAN0GAFLP15LH RSCAN0.GAFLP15.UINT8[LH]
+#define RSCAN0GAFLP15H RSCAN0.GAFLP15.UINT16[H]
+#define RSCAN0GAFLP15HL RSCAN0.GAFLP15.UINT8[HL]
+#define RSCAN0GAFLP15HH RSCAN0.GAFLP15.UINT8[HH]
+#define RSCAN0GAFLID6 RSCAN0.GAFLID6.UINT32
+#define RSCAN0GAFLID6L RSCAN0.GAFLID6.UINT16[L]
+#define RSCAN0GAFLID6LL RSCAN0.GAFLID6.UINT8[LL]
+#define RSCAN0GAFLID6LH RSCAN0.GAFLID6.UINT8[LH]
+#define RSCAN0GAFLID6H RSCAN0.GAFLID6.UINT16[H]
+#define RSCAN0GAFLID6HL RSCAN0.GAFLID6.UINT8[HL]
+#define RSCAN0GAFLID6HH RSCAN0.GAFLID6.UINT8[HH]
+#define RSCAN0GAFLM6 RSCAN0.GAFLM6.UINT32
+#define RSCAN0GAFLM6L RSCAN0.GAFLM6.UINT16[L]
+#define RSCAN0GAFLM6LL RSCAN0.GAFLM6.UINT8[LL]
+#define RSCAN0GAFLM6LH RSCAN0.GAFLM6.UINT8[LH]
+#define RSCAN0GAFLM6H RSCAN0.GAFLM6.UINT16[H]
+#define RSCAN0GAFLM6HL RSCAN0.GAFLM6.UINT8[HL]
+#define RSCAN0GAFLM6HH RSCAN0.GAFLM6.UINT8[HH]
+#define RSCAN0GAFLP06 RSCAN0.GAFLP06.UINT32
+#define RSCAN0GAFLP06L RSCAN0.GAFLP06.UINT16[L]
+#define RSCAN0GAFLP06LL RSCAN0.GAFLP06.UINT8[LL]
+#define RSCAN0GAFLP06LH RSCAN0.GAFLP06.UINT8[LH]
+#define RSCAN0GAFLP06H RSCAN0.GAFLP06.UINT16[H]
+#define RSCAN0GAFLP06HL RSCAN0.GAFLP06.UINT8[HL]
+#define RSCAN0GAFLP06HH RSCAN0.GAFLP06.UINT8[HH]
+#define RSCAN0GAFLP16 RSCAN0.GAFLP16.UINT32
+#define RSCAN0GAFLP16L RSCAN0.GAFLP16.UINT16[L]
+#define RSCAN0GAFLP16LL RSCAN0.GAFLP16.UINT8[LL]
+#define RSCAN0GAFLP16LH RSCAN0.GAFLP16.UINT8[LH]
+#define RSCAN0GAFLP16H RSCAN0.GAFLP16.UINT16[H]
+#define RSCAN0GAFLP16HL RSCAN0.GAFLP16.UINT8[HL]
+#define RSCAN0GAFLP16HH RSCAN0.GAFLP16.UINT8[HH]
+#define RSCAN0GAFLID7 RSCAN0.GAFLID7.UINT32
+#define RSCAN0GAFLID7L RSCAN0.GAFLID7.UINT16[L]
+#define RSCAN0GAFLID7LL RSCAN0.GAFLID7.UINT8[LL]
+#define RSCAN0GAFLID7LH RSCAN0.GAFLID7.UINT8[LH]
+#define RSCAN0GAFLID7H RSCAN0.GAFLID7.UINT16[H]
+#define RSCAN0GAFLID7HL RSCAN0.GAFLID7.UINT8[HL]
+#define RSCAN0GAFLID7HH RSCAN0.GAFLID7.UINT8[HH]
+#define RSCAN0GAFLM7 RSCAN0.GAFLM7.UINT32
+#define RSCAN0GAFLM7L RSCAN0.GAFLM7.UINT16[L]
+#define RSCAN0GAFLM7LL RSCAN0.GAFLM7.UINT8[LL]
+#define RSCAN0GAFLM7LH RSCAN0.GAFLM7.UINT8[LH]
+#define RSCAN0GAFLM7H RSCAN0.GAFLM7.UINT16[H]
+#define RSCAN0GAFLM7HL RSCAN0.GAFLM7.UINT8[HL]
+#define RSCAN0GAFLM7HH RSCAN0.GAFLM7.UINT8[HH]
+#define RSCAN0GAFLP07 RSCAN0.GAFLP07.UINT32
+#define RSCAN0GAFLP07L RSCAN0.GAFLP07.UINT16[L]
+#define RSCAN0GAFLP07LL RSCAN0.GAFLP07.UINT8[LL]
+#define RSCAN0GAFLP07LH RSCAN0.GAFLP07.UINT8[LH]
+#define RSCAN0GAFLP07H RSCAN0.GAFLP07.UINT16[H]
+#define RSCAN0GAFLP07HL RSCAN0.GAFLP07.UINT8[HL]
+#define RSCAN0GAFLP07HH RSCAN0.GAFLP07.UINT8[HH]
+#define RSCAN0GAFLP17 RSCAN0.GAFLP17.UINT32
+#define RSCAN0GAFLP17L RSCAN0.GAFLP17.UINT16[L]
+#define RSCAN0GAFLP17LL RSCAN0.GAFLP17.UINT8[LL]
+#define RSCAN0GAFLP17LH RSCAN0.GAFLP17.UINT8[LH]
+#define RSCAN0GAFLP17H RSCAN0.GAFLP17.UINT16[H]
+#define RSCAN0GAFLP17HL RSCAN0.GAFLP17.UINT8[HL]
+#define RSCAN0GAFLP17HH RSCAN0.GAFLP17.UINT8[HH]
+#define RSCAN0GAFLID8 RSCAN0.GAFLID8.UINT32
+#define RSCAN0GAFLID8L RSCAN0.GAFLID8.UINT16[L]
+#define RSCAN0GAFLID8LL RSCAN0.GAFLID8.UINT8[LL]
+#define RSCAN0GAFLID8LH RSCAN0.GAFLID8.UINT8[LH]
+#define RSCAN0GAFLID8H RSCAN0.GAFLID8.UINT16[H]
+#define RSCAN0GAFLID8HL RSCAN0.GAFLID8.UINT8[HL]
+#define RSCAN0GAFLID8HH RSCAN0.GAFLID8.UINT8[HH]
+#define RSCAN0GAFLM8 RSCAN0.GAFLM8.UINT32
+#define RSCAN0GAFLM8L RSCAN0.GAFLM8.UINT16[L]
+#define RSCAN0GAFLM8LL RSCAN0.GAFLM8.UINT8[LL]
+#define RSCAN0GAFLM8LH RSCAN0.GAFLM8.UINT8[LH]
+#define RSCAN0GAFLM8H RSCAN0.GAFLM8.UINT16[H]
+#define RSCAN0GAFLM8HL RSCAN0.GAFLM8.UINT8[HL]
+#define RSCAN0GAFLM8HH RSCAN0.GAFLM8.UINT8[HH]
+#define RSCAN0GAFLP08 RSCAN0.GAFLP08.UINT32
+#define RSCAN0GAFLP08L RSCAN0.GAFLP08.UINT16[L]
+#define RSCAN0GAFLP08LL RSCAN0.GAFLP08.UINT8[LL]
+#define RSCAN0GAFLP08LH RSCAN0.GAFLP08.UINT8[LH]
+#define RSCAN0GAFLP08H RSCAN0.GAFLP08.UINT16[H]
+#define RSCAN0GAFLP08HL RSCAN0.GAFLP08.UINT8[HL]
+#define RSCAN0GAFLP08HH RSCAN0.GAFLP08.UINT8[HH]
+#define RSCAN0GAFLP18 RSCAN0.GAFLP18.UINT32
+#define RSCAN0GAFLP18L RSCAN0.GAFLP18.UINT16[L]
+#define RSCAN0GAFLP18LL RSCAN0.GAFLP18.UINT8[LL]
+#define RSCAN0GAFLP18LH RSCAN0.GAFLP18.UINT8[LH]
+#define RSCAN0GAFLP18H RSCAN0.GAFLP18.UINT16[H]
+#define RSCAN0GAFLP18HL RSCAN0.GAFLP18.UINT8[HL]
+#define RSCAN0GAFLP18HH RSCAN0.GAFLP18.UINT8[HH]
+#define RSCAN0GAFLID9 RSCAN0.GAFLID9.UINT32
+#define RSCAN0GAFLID9L RSCAN0.GAFLID9.UINT16[L]
+#define RSCAN0GAFLID9LL RSCAN0.GAFLID9.UINT8[LL]
+#define RSCAN0GAFLID9LH RSCAN0.GAFLID9.UINT8[LH]
+#define RSCAN0GAFLID9H RSCAN0.GAFLID9.UINT16[H]
+#define RSCAN0GAFLID9HL RSCAN0.GAFLID9.UINT8[HL]
+#define RSCAN0GAFLID9HH RSCAN0.GAFLID9.UINT8[HH]
+#define RSCAN0GAFLM9 RSCAN0.GAFLM9.UINT32
+#define RSCAN0GAFLM9L RSCAN0.GAFLM9.UINT16[L]
+#define RSCAN0GAFLM9LL RSCAN0.GAFLM9.UINT8[LL]
+#define RSCAN0GAFLM9LH RSCAN0.GAFLM9.UINT8[LH]
+#define RSCAN0GAFLM9H RSCAN0.GAFLM9.UINT16[H]
+#define RSCAN0GAFLM9HL RSCAN0.GAFLM9.UINT8[HL]
+#define RSCAN0GAFLM9HH RSCAN0.GAFLM9.UINT8[HH]
+#define RSCAN0GAFLP09 RSCAN0.GAFLP09.UINT32
+#define RSCAN0GAFLP09L RSCAN0.GAFLP09.UINT16[L]
+#define RSCAN0GAFLP09LL RSCAN0.GAFLP09.UINT8[LL]
+#define RSCAN0GAFLP09LH RSCAN0.GAFLP09.UINT8[LH]
+#define RSCAN0GAFLP09H RSCAN0.GAFLP09.UINT16[H]
+#define RSCAN0GAFLP09HL RSCAN0.GAFLP09.UINT8[HL]
+#define RSCAN0GAFLP09HH RSCAN0.GAFLP09.UINT8[HH]
+#define RSCAN0GAFLP19 RSCAN0.GAFLP19.UINT32
+#define RSCAN0GAFLP19L RSCAN0.GAFLP19.UINT16[L]
+#define RSCAN0GAFLP19LL RSCAN0.GAFLP19.UINT8[LL]
+#define RSCAN0GAFLP19LH RSCAN0.GAFLP19.UINT8[LH]
+#define RSCAN0GAFLP19H RSCAN0.GAFLP19.UINT16[H]
+#define RSCAN0GAFLP19HL RSCAN0.GAFLP19.UINT8[HL]
+#define RSCAN0GAFLP19HH RSCAN0.GAFLP19.UINT8[HH]
+#define RSCAN0GAFLID10 RSCAN0.GAFLID10.UINT32
+#define RSCAN0GAFLID10L RSCAN0.GAFLID10.UINT16[L]
+#define RSCAN0GAFLID10LL RSCAN0.GAFLID10.UINT8[LL]
+#define RSCAN0GAFLID10LH RSCAN0.GAFLID10.UINT8[LH]
+#define RSCAN0GAFLID10H RSCAN0.GAFLID10.UINT16[H]
+#define RSCAN0GAFLID10HL RSCAN0.GAFLID10.UINT8[HL]
+#define RSCAN0GAFLID10HH RSCAN0.GAFLID10.UINT8[HH]
+#define RSCAN0GAFLM10 RSCAN0.GAFLM10.UINT32
+#define RSCAN0GAFLM10L RSCAN0.GAFLM10.UINT16[L]
+#define RSCAN0GAFLM10LL RSCAN0.GAFLM10.UINT8[LL]
+#define RSCAN0GAFLM10LH RSCAN0.GAFLM10.UINT8[LH]
+#define RSCAN0GAFLM10H RSCAN0.GAFLM10.UINT16[H]
+#define RSCAN0GAFLM10HL RSCAN0.GAFLM10.UINT8[HL]
+#define RSCAN0GAFLM10HH RSCAN0.GAFLM10.UINT8[HH]
+#define RSCAN0GAFLP010 RSCAN0.GAFLP010.UINT32
+#define RSCAN0GAFLP010L RSCAN0.GAFLP010.UINT16[L]
+#define RSCAN0GAFLP010LL RSCAN0.GAFLP010.UINT8[LL]
+#define RSCAN0GAFLP010LH RSCAN0.GAFLP010.UINT8[LH]
+#define RSCAN0GAFLP010H RSCAN0.GAFLP010.UINT16[H]
+#define RSCAN0GAFLP010HL RSCAN0.GAFLP010.UINT8[HL]
+#define RSCAN0GAFLP010HH RSCAN0.GAFLP010.UINT8[HH]
+#define RSCAN0GAFLP110 RSCAN0.GAFLP110.UINT32
+#define RSCAN0GAFLP110L RSCAN0.GAFLP110.UINT16[L]
+#define RSCAN0GAFLP110LL RSCAN0.GAFLP110.UINT8[LL]
+#define RSCAN0GAFLP110LH RSCAN0.GAFLP110.UINT8[LH]
+#define RSCAN0GAFLP110H RSCAN0.GAFLP110.UINT16[H]
+#define RSCAN0GAFLP110HL RSCAN0.GAFLP110.UINT8[HL]
+#define RSCAN0GAFLP110HH RSCAN0.GAFLP110.UINT8[HH]
+#define RSCAN0GAFLID11 RSCAN0.GAFLID11.UINT32
+#define RSCAN0GAFLID11L RSCAN0.GAFLID11.UINT16[L]
+#define RSCAN0GAFLID11LL RSCAN0.GAFLID11.UINT8[LL]
+#define RSCAN0GAFLID11LH RSCAN0.GAFLID11.UINT8[LH]
+#define RSCAN0GAFLID11H RSCAN0.GAFLID11.UINT16[H]
+#define RSCAN0GAFLID11HL RSCAN0.GAFLID11.UINT8[HL]
+#define RSCAN0GAFLID11HH RSCAN0.GAFLID11.UINT8[HH]
+#define RSCAN0GAFLM11 RSCAN0.GAFLM11.UINT32
+#define RSCAN0GAFLM11L RSCAN0.GAFLM11.UINT16[L]
+#define RSCAN0GAFLM11LL RSCAN0.GAFLM11.UINT8[LL]
+#define RSCAN0GAFLM11LH RSCAN0.GAFLM11.UINT8[LH]
+#define RSCAN0GAFLM11H RSCAN0.GAFLM11.UINT16[H]
+#define RSCAN0GAFLM11HL RSCAN0.GAFLM11.UINT8[HL]
+#define RSCAN0GAFLM11HH RSCAN0.GAFLM11.UINT8[HH]
+#define RSCAN0GAFLP011 RSCAN0.GAFLP011.UINT32
+#define RSCAN0GAFLP011L RSCAN0.GAFLP011.UINT16[L]
+#define RSCAN0GAFLP011LL RSCAN0.GAFLP011.UINT8[LL]
+#define RSCAN0GAFLP011LH RSCAN0.GAFLP011.UINT8[LH]
+#define RSCAN0GAFLP011H RSCAN0.GAFLP011.UINT16[H]
+#define RSCAN0GAFLP011HL RSCAN0.GAFLP011.UINT8[HL]
+#define RSCAN0GAFLP011HH RSCAN0.GAFLP011.UINT8[HH]
+#define RSCAN0GAFLP111 RSCAN0.GAFLP111.UINT32
+#define RSCAN0GAFLP111L RSCAN0.GAFLP111.UINT16[L]
+#define RSCAN0GAFLP111LL RSCAN0.GAFLP111.UINT8[LL]
+#define RSCAN0GAFLP111LH RSCAN0.GAFLP111.UINT8[LH]
+#define RSCAN0GAFLP111H RSCAN0.GAFLP111.UINT16[H]
+#define RSCAN0GAFLP111HL RSCAN0.GAFLP111.UINT8[HL]
+#define RSCAN0GAFLP111HH RSCAN0.GAFLP111.UINT8[HH]
+#define RSCAN0GAFLID12 RSCAN0.GAFLID12.UINT32
+#define RSCAN0GAFLID12L RSCAN0.GAFLID12.UINT16[L]
+#define RSCAN0GAFLID12LL RSCAN0.GAFLID12.UINT8[LL]
+#define RSCAN0GAFLID12LH RSCAN0.GAFLID12.UINT8[LH]
+#define RSCAN0GAFLID12H RSCAN0.GAFLID12.UINT16[H]
+#define RSCAN0GAFLID12HL RSCAN0.GAFLID12.UINT8[HL]
+#define RSCAN0GAFLID12HH RSCAN0.GAFLID12.UINT8[HH]
+#define RSCAN0GAFLM12 RSCAN0.GAFLM12.UINT32
+#define RSCAN0GAFLM12L RSCAN0.GAFLM12.UINT16[L]
+#define RSCAN0GAFLM12LL RSCAN0.GAFLM12.UINT8[LL]
+#define RSCAN0GAFLM12LH RSCAN0.GAFLM12.UINT8[LH]
+#define RSCAN0GAFLM12H RSCAN0.GAFLM12.UINT16[H]
+#define RSCAN0GAFLM12HL RSCAN0.GAFLM12.UINT8[HL]
+#define RSCAN0GAFLM12HH RSCAN0.GAFLM12.UINT8[HH]
+#define RSCAN0GAFLP012 RSCAN0.GAFLP012.UINT32
+#define RSCAN0GAFLP012L RSCAN0.GAFLP012.UINT16[L]
+#define RSCAN0GAFLP012LL RSCAN0.GAFLP012.UINT8[LL]
+#define RSCAN0GAFLP012LH RSCAN0.GAFLP012.UINT8[LH]
+#define RSCAN0GAFLP012H RSCAN0.GAFLP012.UINT16[H]
+#define RSCAN0GAFLP012HL RSCAN0.GAFLP012.UINT8[HL]
+#define RSCAN0GAFLP012HH RSCAN0.GAFLP012.UINT8[HH]
+#define RSCAN0GAFLP112 RSCAN0.GAFLP112.UINT32
+#define RSCAN0GAFLP112L RSCAN0.GAFLP112.UINT16[L]
+#define RSCAN0GAFLP112LL RSCAN0.GAFLP112.UINT8[LL]
+#define RSCAN0GAFLP112LH RSCAN0.GAFLP112.UINT8[LH]
+#define RSCAN0GAFLP112H RSCAN0.GAFLP112.UINT16[H]
+#define RSCAN0GAFLP112HL RSCAN0.GAFLP112.UINT8[HL]
+#define RSCAN0GAFLP112HH RSCAN0.GAFLP112.UINT8[HH]
+#define RSCAN0GAFLID13 RSCAN0.GAFLID13.UINT32
+#define RSCAN0GAFLID13L RSCAN0.GAFLID13.UINT16[L]
+#define RSCAN0GAFLID13LL RSCAN0.GAFLID13.UINT8[LL]
+#define RSCAN0GAFLID13LH RSCAN0.GAFLID13.UINT8[LH]
+#define RSCAN0GAFLID13H RSCAN0.GAFLID13.UINT16[H]
+#define RSCAN0GAFLID13HL RSCAN0.GAFLID13.UINT8[HL]
+#define RSCAN0GAFLID13HH RSCAN0.GAFLID13.UINT8[HH]
+#define RSCAN0GAFLM13 RSCAN0.GAFLM13.UINT32
+#define RSCAN0GAFLM13L RSCAN0.GAFLM13.UINT16[L]
+#define RSCAN0GAFLM13LL RSCAN0.GAFLM13.UINT8[LL]
+#define RSCAN0GAFLM13LH RSCAN0.GAFLM13.UINT8[LH]
+#define RSCAN0GAFLM13H RSCAN0.GAFLM13.UINT16[H]
+#define RSCAN0GAFLM13HL RSCAN0.GAFLM13.UINT8[HL]
+#define RSCAN0GAFLM13HH RSCAN0.GAFLM13.UINT8[HH]
+#define RSCAN0GAFLP013 RSCAN0.GAFLP013.UINT32
+#define RSCAN0GAFLP013L RSCAN0.GAFLP013.UINT16[L]
+#define RSCAN0GAFLP013LL RSCAN0.GAFLP013.UINT8[LL]
+#define RSCAN0GAFLP013LH RSCAN0.GAFLP013.UINT8[LH]
+#define RSCAN0GAFLP013H RSCAN0.GAFLP013.UINT16[H]
+#define RSCAN0GAFLP013HL RSCAN0.GAFLP013.UINT8[HL]
+#define RSCAN0GAFLP013HH RSCAN0.GAFLP013.UINT8[HH]
+#define RSCAN0GAFLP113 RSCAN0.GAFLP113.UINT32
+#define RSCAN0GAFLP113L RSCAN0.GAFLP113.UINT16[L]
+#define RSCAN0GAFLP113LL RSCAN0.GAFLP113.UINT8[LL]
+#define RSCAN0GAFLP113LH RSCAN0.GAFLP113.UINT8[LH]
+#define RSCAN0GAFLP113H RSCAN0.GAFLP113.UINT16[H]
+#define RSCAN0GAFLP113HL RSCAN0.GAFLP113.UINT8[HL]
+#define RSCAN0GAFLP113HH RSCAN0.GAFLP113.UINT8[HH]
+#define RSCAN0GAFLID14 RSCAN0.GAFLID14.UINT32
+#define RSCAN0GAFLID14L RSCAN0.GAFLID14.UINT16[L]
+#define RSCAN0GAFLID14LL RSCAN0.GAFLID14.UINT8[LL]
+#define RSCAN0GAFLID14LH RSCAN0.GAFLID14.UINT8[LH]
+#define RSCAN0GAFLID14H RSCAN0.GAFLID14.UINT16[H]
+#define RSCAN0GAFLID14HL RSCAN0.GAFLID14.UINT8[HL]
+#define RSCAN0GAFLID14HH RSCAN0.GAFLID14.UINT8[HH]
+#define RSCAN0GAFLM14 RSCAN0.GAFLM14.UINT32
+#define RSCAN0GAFLM14L RSCAN0.GAFLM14.UINT16[L]
+#define RSCAN0GAFLM14LL RSCAN0.GAFLM14.UINT8[LL]
+#define RSCAN0GAFLM14LH RSCAN0.GAFLM14.UINT8[LH]
+#define RSCAN0GAFLM14H RSCAN0.GAFLM14.UINT16[H]
+#define RSCAN0GAFLM14HL RSCAN0.GAFLM14.UINT8[HL]
+#define RSCAN0GAFLM14HH RSCAN0.GAFLM14.UINT8[HH]
+#define RSCAN0GAFLP014 RSCAN0.GAFLP014.UINT32
+#define RSCAN0GAFLP014L RSCAN0.GAFLP014.UINT16[L]
+#define RSCAN0GAFLP014LL RSCAN0.GAFLP014.UINT8[LL]
+#define RSCAN0GAFLP014LH RSCAN0.GAFLP014.UINT8[LH]
+#define RSCAN0GAFLP014H RSCAN0.GAFLP014.UINT16[H]
+#define RSCAN0GAFLP014HL RSCAN0.GAFLP014.UINT8[HL]
+#define RSCAN0GAFLP014HH RSCAN0.GAFLP014.UINT8[HH]
+#define RSCAN0GAFLP114 RSCAN0.GAFLP114.UINT32
+#define RSCAN0GAFLP114L RSCAN0.GAFLP114.UINT16[L]
+#define RSCAN0GAFLP114LL RSCAN0.GAFLP114.UINT8[LL]
+#define RSCAN0GAFLP114LH RSCAN0.GAFLP114.UINT8[LH]
+#define RSCAN0GAFLP114H RSCAN0.GAFLP114.UINT16[H]
+#define RSCAN0GAFLP114HL RSCAN0.GAFLP114.UINT8[HL]
+#define RSCAN0GAFLP114HH RSCAN0.GAFLP114.UINT8[HH]
+#define RSCAN0GAFLID15 RSCAN0.GAFLID15.UINT32
+#define RSCAN0GAFLID15L RSCAN0.GAFLID15.UINT16[L]
+#define RSCAN0GAFLID15LL RSCAN0.GAFLID15.UINT8[LL]
+#define RSCAN0GAFLID15LH RSCAN0.GAFLID15.UINT8[LH]
+#define RSCAN0GAFLID15H RSCAN0.GAFLID15.UINT16[H]
+#define RSCAN0GAFLID15HL RSCAN0.GAFLID15.UINT8[HL]
+#define RSCAN0GAFLID15HH RSCAN0.GAFLID15.UINT8[HH]
+#define RSCAN0GAFLM15 RSCAN0.GAFLM15.UINT32
+#define RSCAN0GAFLM15L RSCAN0.GAFLM15.UINT16[L]
+#define RSCAN0GAFLM15LL RSCAN0.GAFLM15.UINT8[LL]
+#define RSCAN0GAFLM15LH RSCAN0.GAFLM15.UINT8[LH]
+#define RSCAN0GAFLM15H RSCAN0.GAFLM15.UINT16[H]
+#define RSCAN0GAFLM15HL RSCAN0.GAFLM15.UINT8[HL]
+#define RSCAN0GAFLM15HH RSCAN0.GAFLM15.UINT8[HH]
+#define RSCAN0GAFLP015 RSCAN0.GAFLP015.UINT32
+#define RSCAN0GAFLP015L RSCAN0.GAFLP015.UINT16[L]
+#define RSCAN0GAFLP015LL RSCAN0.GAFLP015.UINT8[LL]
+#define RSCAN0GAFLP015LH RSCAN0.GAFLP015.UINT8[LH]
+#define RSCAN0GAFLP015H RSCAN0.GAFLP015.UINT16[H]
+#define RSCAN0GAFLP015HL RSCAN0.GAFLP015.UINT8[HL]
+#define RSCAN0GAFLP015HH RSCAN0.GAFLP015.UINT8[HH]
+#define RSCAN0GAFLP115 RSCAN0.GAFLP115.UINT32
+#define RSCAN0GAFLP115L RSCAN0.GAFLP115.UINT16[L]
+#define RSCAN0GAFLP115LL RSCAN0.GAFLP115.UINT8[LL]
+#define RSCAN0GAFLP115LH RSCAN0.GAFLP115.UINT8[LH]
+#define RSCAN0GAFLP115H RSCAN0.GAFLP115.UINT16[H]
+#define RSCAN0GAFLP115HL RSCAN0.GAFLP115.UINT8[HL]
+#define RSCAN0GAFLP115HH RSCAN0.GAFLP115.UINT8[HH]
+#define RSCAN0RMID0 RSCAN0.RMID0.UINT32
+#define RSCAN0RMID0L RSCAN0.RMID0.UINT16[L]
+#define RSCAN0RMID0LL RSCAN0.RMID0.UINT8[LL]
+#define RSCAN0RMID0LH RSCAN0.RMID0.UINT8[LH]
+#define RSCAN0RMID0H RSCAN0.RMID0.UINT16[H]
+#define RSCAN0RMID0HL RSCAN0.RMID0.UINT8[HL]
+#define RSCAN0RMID0HH RSCAN0.RMID0.UINT8[HH]
+#define RSCAN0RMPTR0 RSCAN0.RMPTR0.UINT32
+#define RSCAN0RMPTR0L RSCAN0.RMPTR0.UINT16[L]
+#define RSCAN0RMPTR0LL RSCAN0.RMPTR0.UINT8[LL]
+#define RSCAN0RMPTR0LH RSCAN0.RMPTR0.UINT8[LH]
+#define RSCAN0RMPTR0H RSCAN0.RMPTR0.UINT16[H]
+#define RSCAN0RMPTR0HL RSCAN0.RMPTR0.UINT8[HL]
+#define RSCAN0RMPTR0HH RSCAN0.RMPTR0.UINT8[HH]
+#define RSCAN0RMDF00 RSCAN0.RMDF00.UINT32
+#define RSCAN0RMDF00L RSCAN0.RMDF00.UINT16[L]
+#define RSCAN0RMDF00LL RSCAN0.RMDF00.UINT8[LL]
+#define RSCAN0RMDF00LH RSCAN0.RMDF00.UINT8[LH]
+#define RSCAN0RMDF00H RSCAN0.RMDF00.UINT16[H]
+#define RSCAN0RMDF00HL RSCAN0.RMDF00.UINT8[HL]
+#define RSCAN0RMDF00HH RSCAN0.RMDF00.UINT8[HH]
+#define RSCAN0RMDF10 RSCAN0.RMDF10.UINT32
+#define RSCAN0RMDF10L RSCAN0.RMDF10.UINT16[L]
+#define RSCAN0RMDF10LL RSCAN0.RMDF10.UINT8[LL]
+#define RSCAN0RMDF10LH RSCAN0.RMDF10.UINT8[LH]
+#define RSCAN0RMDF10H RSCAN0.RMDF10.UINT16[H]
+#define RSCAN0RMDF10HL RSCAN0.RMDF10.UINT8[HL]
+#define RSCAN0RMDF10HH RSCAN0.RMDF10.UINT8[HH]
+#define RSCAN0RMID1 RSCAN0.RMID1.UINT32
+#define RSCAN0RMID1L RSCAN0.RMID1.UINT16[L]
+#define RSCAN0RMID1LL RSCAN0.RMID1.UINT8[LL]
+#define RSCAN0RMID1LH RSCAN0.RMID1.UINT8[LH]
+#define RSCAN0RMID1H RSCAN0.RMID1.UINT16[H]
+#define RSCAN0RMID1HL RSCAN0.RMID1.UINT8[HL]
+#define RSCAN0RMID1HH RSCAN0.RMID1.UINT8[HH]
+#define RSCAN0RMPTR1 RSCAN0.RMPTR1.UINT32
+#define RSCAN0RMPTR1L RSCAN0.RMPTR1.UINT16[L]
+#define RSCAN0RMPTR1LL RSCAN0.RMPTR1.UINT8[LL]
+#define RSCAN0RMPTR1LH RSCAN0.RMPTR1.UINT8[LH]
+#define RSCAN0RMPTR1H RSCAN0.RMPTR1.UINT16[H]
+#define RSCAN0RMPTR1HL RSCAN0.RMPTR1.UINT8[HL]
+#define RSCAN0RMPTR1HH RSCAN0.RMPTR1.UINT8[HH]
+#define RSCAN0RMDF01 RSCAN0.RMDF01.UINT32
+#define RSCAN0RMDF01L RSCAN0.RMDF01.UINT16[L]
+#define RSCAN0RMDF01LL RSCAN0.RMDF01.UINT8[LL]
+#define RSCAN0RMDF01LH RSCAN0.RMDF01.UINT8[LH]
+#define RSCAN0RMDF01H RSCAN0.RMDF01.UINT16[H]
+#define RSCAN0RMDF01HL RSCAN0.RMDF01.UINT8[HL]
+#define RSCAN0RMDF01HH RSCAN0.RMDF01.UINT8[HH]
+#define RSCAN0RMDF11 RSCAN0.RMDF11.UINT32
+#define RSCAN0RMDF11L RSCAN0.RMDF11.UINT16[L]
+#define RSCAN0RMDF11LL RSCAN0.RMDF11.UINT8[LL]
+#define RSCAN0RMDF11LH RSCAN0.RMDF11.UINT8[LH]
+#define RSCAN0RMDF11H RSCAN0.RMDF11.UINT16[H]
+#define RSCAN0RMDF11HL RSCAN0.RMDF11.UINT8[HL]
+#define RSCAN0RMDF11HH RSCAN0.RMDF11.UINT8[HH]
+#define RSCAN0RMID2 RSCAN0.RMID2.UINT32
+#define RSCAN0RMID2L RSCAN0.RMID2.UINT16[L]
+#define RSCAN0RMID2LL RSCAN0.RMID2.UINT8[LL]
+#define RSCAN0RMID2LH RSCAN0.RMID2.UINT8[LH]
+#define RSCAN0RMID2H RSCAN0.RMID2.UINT16[H]
+#define RSCAN0RMID2HL RSCAN0.RMID2.UINT8[HL]
+#define RSCAN0RMID2HH RSCAN0.RMID2.UINT8[HH]
+#define RSCAN0RMPTR2 RSCAN0.RMPTR2.UINT32
+#define RSCAN0RMPTR2L RSCAN0.RMPTR2.UINT16[L]
+#define RSCAN0RMPTR2LL RSCAN0.RMPTR2.UINT8[LL]
+#define RSCAN0RMPTR2LH RSCAN0.RMPTR2.UINT8[LH]
+#define RSCAN0RMPTR2H RSCAN0.RMPTR2.UINT16[H]
+#define RSCAN0RMPTR2HL RSCAN0.RMPTR2.UINT8[HL]
+#define RSCAN0RMPTR2HH RSCAN0.RMPTR2.UINT8[HH]
+#define RSCAN0RMDF02 RSCAN0.RMDF02.UINT32
+#define RSCAN0RMDF02L RSCAN0.RMDF02.UINT16[L]
+#define RSCAN0RMDF02LL RSCAN0.RMDF02.UINT8[LL]
+#define RSCAN0RMDF02LH RSCAN0.RMDF02.UINT8[LH]
+#define RSCAN0RMDF02H RSCAN0.RMDF02.UINT16[H]
+#define RSCAN0RMDF02HL RSCAN0.RMDF02.UINT8[HL]
+#define RSCAN0RMDF02HH RSCAN0.RMDF02.UINT8[HH]
+#define RSCAN0RMDF12 RSCAN0.RMDF12.UINT32
+#define RSCAN0RMDF12L RSCAN0.RMDF12.UINT16[L]
+#define RSCAN0RMDF12LL RSCAN0.RMDF12.UINT8[LL]
+#define RSCAN0RMDF12LH RSCAN0.RMDF12.UINT8[LH]
+#define RSCAN0RMDF12H RSCAN0.RMDF12.UINT16[H]
+#define RSCAN0RMDF12HL RSCAN0.RMDF12.UINT8[HL]
+#define RSCAN0RMDF12HH RSCAN0.RMDF12.UINT8[HH]
+#define RSCAN0RMID3 RSCAN0.RMID3.UINT32
+#define RSCAN0RMID3L RSCAN0.RMID3.UINT16[L]
+#define RSCAN0RMID3LL RSCAN0.RMID3.UINT8[LL]
+#define RSCAN0RMID3LH RSCAN0.RMID3.UINT8[LH]
+#define RSCAN0RMID3H RSCAN0.RMID3.UINT16[H]
+#define RSCAN0RMID3HL RSCAN0.RMID3.UINT8[HL]
+#define RSCAN0RMID3HH RSCAN0.RMID3.UINT8[HH]
+#define RSCAN0RMPTR3 RSCAN0.RMPTR3.UINT32
+#define RSCAN0RMPTR3L RSCAN0.RMPTR3.UINT16[L]
+#define RSCAN0RMPTR3LL RSCAN0.RMPTR3.UINT8[LL]
+#define RSCAN0RMPTR3LH RSCAN0.RMPTR3.UINT8[LH]
+#define RSCAN0RMPTR3H RSCAN0.RMPTR3.UINT16[H]
+#define RSCAN0RMPTR3HL RSCAN0.RMPTR3.UINT8[HL]
+#define RSCAN0RMPTR3HH RSCAN0.RMPTR3.UINT8[HH]
+#define RSCAN0RMDF03 RSCAN0.RMDF03.UINT32
+#define RSCAN0RMDF03L RSCAN0.RMDF03.UINT16[L]
+#define RSCAN0RMDF03LL RSCAN0.RMDF03.UINT8[LL]
+#define RSCAN0RMDF03LH RSCAN0.RMDF03.UINT8[LH]
+#define RSCAN0RMDF03H RSCAN0.RMDF03.UINT16[H]
+#define RSCAN0RMDF03HL RSCAN0.RMDF03.UINT8[HL]
+#define RSCAN0RMDF03HH RSCAN0.RMDF03.UINT8[HH]
+#define RSCAN0RMDF13 RSCAN0.RMDF13.UINT32
+#define RSCAN0RMDF13L RSCAN0.RMDF13.UINT16[L]
+#define RSCAN0RMDF13LL RSCAN0.RMDF13.UINT8[LL]
+#define RSCAN0RMDF13LH RSCAN0.RMDF13.UINT8[LH]
+#define RSCAN0RMDF13H RSCAN0.RMDF13.UINT16[H]
+#define RSCAN0RMDF13HL RSCAN0.RMDF13.UINT8[HL]
+#define RSCAN0RMDF13HH RSCAN0.RMDF13.UINT8[HH]
+#define RSCAN0RMID4 RSCAN0.RMID4.UINT32
+#define RSCAN0RMID4L RSCAN0.RMID4.UINT16[L]
+#define RSCAN0RMID4LL RSCAN0.RMID4.UINT8[LL]
+#define RSCAN0RMID4LH RSCAN0.RMID4.UINT8[LH]
+#define RSCAN0RMID4H RSCAN0.RMID4.UINT16[H]
+#define RSCAN0RMID4HL RSCAN0.RMID4.UINT8[HL]
+#define RSCAN0RMID4HH RSCAN0.RMID4.UINT8[HH]
+#define RSCAN0RMPTR4 RSCAN0.RMPTR4.UINT32
+#define RSCAN0RMPTR4L RSCAN0.RMPTR4.UINT16[L]
+#define RSCAN0RMPTR4LL RSCAN0.RMPTR4.UINT8[LL]
+#define RSCAN0RMPTR4LH RSCAN0.RMPTR4.UINT8[LH]
+#define RSCAN0RMPTR4H RSCAN0.RMPTR4.UINT16[H]
+#define RSCAN0RMPTR4HL RSCAN0.RMPTR4.UINT8[HL]
+#define RSCAN0RMPTR4HH RSCAN0.RMPTR4.UINT8[HH]
+#define RSCAN0RMDF04 RSCAN0.RMDF04.UINT32
+#define RSCAN0RMDF04L RSCAN0.RMDF04.UINT16[L]
+#define RSCAN0RMDF04LL RSCAN0.RMDF04.UINT8[LL]
+#define RSCAN0RMDF04LH RSCAN0.RMDF04.UINT8[LH]
+#define RSCAN0RMDF04H RSCAN0.RMDF04.UINT16[H]
+#define RSCAN0RMDF04HL RSCAN0.RMDF04.UINT8[HL]
+#define RSCAN0RMDF04HH RSCAN0.RMDF04.UINT8[HH]
+#define RSCAN0RMDF14 RSCAN0.RMDF14.UINT32
+#define RSCAN0RMDF14L RSCAN0.RMDF14.UINT16[L]
+#define RSCAN0RMDF14LL RSCAN0.RMDF14.UINT8[LL]
+#define RSCAN0RMDF14LH RSCAN0.RMDF14.UINT8[LH]
+#define RSCAN0RMDF14H RSCAN0.RMDF14.UINT16[H]
+#define RSCAN0RMDF14HL RSCAN0.RMDF14.UINT8[HL]
+#define RSCAN0RMDF14HH RSCAN0.RMDF14.UINT8[HH]
+#define RSCAN0RMID5 RSCAN0.RMID5.UINT32
+#define RSCAN0RMID5L RSCAN0.RMID5.UINT16[L]
+#define RSCAN0RMID5LL RSCAN0.RMID5.UINT8[LL]
+#define RSCAN0RMID5LH RSCAN0.RMID5.UINT8[LH]
+#define RSCAN0RMID5H RSCAN0.RMID5.UINT16[H]
+#define RSCAN0RMID5HL RSCAN0.RMID5.UINT8[HL]
+#define RSCAN0RMID5HH RSCAN0.RMID5.UINT8[HH]
+#define RSCAN0RMPTR5 RSCAN0.RMPTR5.UINT32
+#define RSCAN0RMPTR5L RSCAN0.RMPTR5.UINT16[L]
+#define RSCAN0RMPTR5LL RSCAN0.RMPTR5.UINT8[LL]
+#define RSCAN0RMPTR5LH RSCAN0.RMPTR5.UINT8[LH]
+#define RSCAN0RMPTR5H RSCAN0.RMPTR5.UINT16[H]
+#define RSCAN0RMPTR5HL RSCAN0.RMPTR5.UINT8[HL]
+#define RSCAN0RMPTR5HH RSCAN0.RMPTR5.UINT8[HH]
+#define RSCAN0RMDF05 RSCAN0.RMDF05.UINT32
+#define RSCAN0RMDF05L RSCAN0.RMDF05.UINT16[L]
+#define RSCAN0RMDF05LL RSCAN0.RMDF05.UINT8[LL]
+#define RSCAN0RMDF05LH RSCAN0.RMDF05.UINT8[LH]
+#define RSCAN0RMDF05H RSCAN0.RMDF05.UINT16[H]
+#define RSCAN0RMDF05HL RSCAN0.RMDF05.UINT8[HL]
+#define RSCAN0RMDF05HH RSCAN0.RMDF05.UINT8[HH]
+#define RSCAN0RMDF15 RSCAN0.RMDF15.UINT32
+#define RSCAN0RMDF15L RSCAN0.RMDF15.UINT16[L]
+#define RSCAN0RMDF15LL RSCAN0.RMDF15.UINT8[LL]
+#define RSCAN0RMDF15LH RSCAN0.RMDF15.UINT8[LH]
+#define RSCAN0RMDF15H RSCAN0.RMDF15.UINT16[H]
+#define RSCAN0RMDF15HL RSCAN0.RMDF15.UINT8[HL]
+#define RSCAN0RMDF15HH RSCAN0.RMDF15.UINT8[HH]
+#define RSCAN0RMID6 RSCAN0.RMID6.UINT32
+#define RSCAN0RMID6L RSCAN0.RMID6.UINT16[L]
+#define RSCAN0RMID6LL RSCAN0.RMID6.UINT8[LL]
+#define RSCAN0RMID6LH RSCAN0.RMID6.UINT8[LH]
+#define RSCAN0RMID6H RSCAN0.RMID6.UINT16[H]
+#define RSCAN0RMID6HL RSCAN0.RMID6.UINT8[HL]
+#define RSCAN0RMID6HH RSCAN0.RMID6.UINT8[HH]
+#define RSCAN0RMPTR6 RSCAN0.RMPTR6.UINT32
+#define RSCAN0RMPTR6L RSCAN0.RMPTR6.UINT16[L]
+#define RSCAN0RMPTR6LL RSCAN0.RMPTR6.UINT8[LL]
+#define RSCAN0RMPTR6LH RSCAN0.RMPTR6.UINT8[LH]
+#define RSCAN0RMPTR6H RSCAN0.RMPTR6.UINT16[H]
+#define RSCAN0RMPTR6HL RSCAN0.RMPTR6.UINT8[HL]
+#define RSCAN0RMPTR6HH RSCAN0.RMPTR6.UINT8[HH]
+#define RSCAN0RMDF06 RSCAN0.RMDF06.UINT32
+#define RSCAN0RMDF06L RSCAN0.RMDF06.UINT16[L]
+#define RSCAN0RMDF06LL RSCAN0.RMDF06.UINT8[LL]
+#define RSCAN0RMDF06LH RSCAN0.RMDF06.UINT8[LH]
+#define RSCAN0RMDF06H RSCAN0.RMDF06.UINT16[H]
+#define RSCAN0RMDF06HL RSCAN0.RMDF06.UINT8[HL]
+#define RSCAN0RMDF06HH RSCAN0.RMDF06.UINT8[HH]
+#define RSCAN0RMDF16 RSCAN0.RMDF16.UINT32
+#define RSCAN0RMDF16L RSCAN0.RMDF16.UINT16[L]
+#define RSCAN0RMDF16LL RSCAN0.RMDF16.UINT8[LL]
+#define RSCAN0RMDF16LH RSCAN0.RMDF16.UINT8[LH]
+#define RSCAN0RMDF16H RSCAN0.RMDF16.UINT16[H]
+#define RSCAN0RMDF16HL RSCAN0.RMDF16.UINT8[HL]
+#define RSCAN0RMDF16HH RSCAN0.RMDF16.UINT8[HH]
+#define RSCAN0RMID7 RSCAN0.RMID7.UINT32
+#define RSCAN0RMID7L RSCAN0.RMID7.UINT16[L]
+#define RSCAN0RMID7LL RSCAN0.RMID7.UINT8[LL]
+#define RSCAN0RMID7LH RSCAN0.RMID7.UINT8[LH]
+#define RSCAN0RMID7H RSCAN0.RMID7.UINT16[H]
+#define RSCAN0RMID7HL RSCAN0.RMID7.UINT8[HL]
+#define RSCAN0RMID7HH RSCAN0.RMID7.UINT8[HH]
+#define RSCAN0RMPTR7 RSCAN0.RMPTR7.UINT32
+#define RSCAN0RMPTR7L RSCAN0.RMPTR7.UINT16[L]
+#define RSCAN0RMPTR7LL RSCAN0.RMPTR7.UINT8[LL]
+#define RSCAN0RMPTR7LH RSCAN0.RMPTR7.UINT8[LH]
+#define RSCAN0RMPTR7H RSCAN0.RMPTR7.UINT16[H]
+#define RSCAN0RMPTR7HL RSCAN0.RMPTR7.UINT8[HL]
+#define RSCAN0RMPTR7HH RSCAN0.RMPTR7.UINT8[HH]
+#define RSCAN0RMDF07 RSCAN0.RMDF07.UINT32
+#define RSCAN0RMDF07L RSCAN0.RMDF07.UINT16[L]
+#define RSCAN0RMDF07LL RSCAN0.RMDF07.UINT8[LL]
+#define RSCAN0RMDF07LH RSCAN0.RMDF07.UINT8[LH]
+#define RSCAN0RMDF07H RSCAN0.RMDF07.UINT16[H]
+#define RSCAN0RMDF07HL RSCAN0.RMDF07.UINT8[HL]
+#define RSCAN0RMDF07HH RSCAN0.RMDF07.UINT8[HH]
+#define RSCAN0RMDF17 RSCAN0.RMDF17.UINT32
+#define RSCAN0RMDF17L RSCAN0.RMDF17.UINT16[L]
+#define RSCAN0RMDF17LL RSCAN0.RMDF17.UINT8[LL]
+#define RSCAN0RMDF17LH RSCAN0.RMDF17.UINT8[LH]
+#define RSCAN0RMDF17H RSCAN0.RMDF17.UINT16[H]
+#define RSCAN0RMDF17HL RSCAN0.RMDF17.UINT8[HL]
+#define RSCAN0RMDF17HH RSCAN0.RMDF17.UINT8[HH]
+#define RSCAN0RMID8 RSCAN0.RMID8.UINT32
+#define RSCAN0RMID8L RSCAN0.RMID8.UINT16[L]
+#define RSCAN0RMID8LL RSCAN0.RMID8.UINT8[LL]
+#define RSCAN0RMID8LH RSCAN0.RMID8.UINT8[LH]
+#define RSCAN0RMID8H RSCAN0.RMID8.UINT16[H]
+#define RSCAN0RMID8HL RSCAN0.RMID8.UINT8[HL]
+#define RSCAN0RMID8HH RSCAN0.RMID8.UINT8[HH]
+#define RSCAN0RMPTR8 RSCAN0.RMPTR8.UINT32
+#define RSCAN0RMPTR8L RSCAN0.RMPTR8.UINT16[L]
+#define RSCAN0RMPTR8LL RSCAN0.RMPTR8.UINT8[LL]
+#define RSCAN0RMPTR8LH RSCAN0.RMPTR8.UINT8[LH]
+#define RSCAN0RMPTR8H RSCAN0.RMPTR8.UINT16[H]
+#define RSCAN0RMPTR8HL RSCAN0.RMPTR8.UINT8[HL]
+#define RSCAN0RMPTR8HH RSCAN0.RMPTR8.UINT8[HH]
+#define RSCAN0RMDF08 RSCAN0.RMDF08.UINT32
+#define RSCAN0RMDF08L RSCAN0.RMDF08.UINT16[L]
+#define RSCAN0RMDF08LL RSCAN0.RMDF08.UINT8[LL]
+#define RSCAN0RMDF08LH RSCAN0.RMDF08.UINT8[LH]
+#define RSCAN0RMDF08H RSCAN0.RMDF08.UINT16[H]
+#define RSCAN0RMDF08HL RSCAN0.RMDF08.UINT8[HL]
+#define RSCAN0RMDF08HH RSCAN0.RMDF08.UINT8[HH]
+#define RSCAN0RMDF18 RSCAN0.RMDF18.UINT32
+#define RSCAN0RMDF18L RSCAN0.RMDF18.UINT16[L]
+#define RSCAN0RMDF18LL RSCAN0.RMDF18.UINT8[LL]
+#define RSCAN0RMDF18LH RSCAN0.RMDF18.UINT8[LH]
+#define RSCAN0RMDF18H RSCAN0.RMDF18.UINT16[H]
+#define RSCAN0RMDF18HL RSCAN0.RMDF18.UINT8[HL]
+#define RSCAN0RMDF18HH RSCAN0.RMDF18.UINT8[HH]
+#define RSCAN0RMID9 RSCAN0.RMID9.UINT32
+#define RSCAN0RMID9L RSCAN0.RMID9.UINT16[L]
+#define RSCAN0RMID9LL RSCAN0.RMID9.UINT8[LL]
+#define RSCAN0RMID9LH RSCAN0.RMID9.UINT8[LH]
+#define RSCAN0RMID9H RSCAN0.RMID9.UINT16[H]
+#define RSCAN0RMID9HL RSCAN0.RMID9.UINT8[HL]
+#define RSCAN0RMID9HH RSCAN0.RMID9.UINT8[HH]
+#define RSCAN0RMPTR9 RSCAN0.RMPTR9.UINT32
+#define RSCAN0RMPTR9L RSCAN0.RMPTR9.UINT16[L]
+#define RSCAN0RMPTR9LL RSCAN0.RMPTR9.UINT8[LL]
+#define RSCAN0RMPTR9LH RSCAN0.RMPTR9.UINT8[LH]
+#define RSCAN0RMPTR9H RSCAN0.RMPTR9.UINT16[H]
+#define RSCAN0RMPTR9HL RSCAN0.RMPTR9.UINT8[HL]
+#define RSCAN0RMPTR9HH RSCAN0.RMPTR9.UINT8[HH]
+#define RSCAN0RMDF09 RSCAN0.RMDF09.UINT32
+#define RSCAN0RMDF09L RSCAN0.RMDF09.UINT16[L]
+#define RSCAN0RMDF09LL RSCAN0.RMDF09.UINT8[LL]
+#define RSCAN0RMDF09LH RSCAN0.RMDF09.UINT8[LH]
+#define RSCAN0RMDF09H RSCAN0.RMDF09.UINT16[H]
+#define RSCAN0RMDF09HL RSCAN0.RMDF09.UINT8[HL]
+#define RSCAN0RMDF09HH RSCAN0.RMDF09.UINT8[HH]
+#define RSCAN0RMDF19 RSCAN0.RMDF19.UINT32
+#define RSCAN0RMDF19L RSCAN0.RMDF19.UINT16[L]
+#define RSCAN0RMDF19LL RSCAN0.RMDF19.UINT8[LL]
+#define RSCAN0RMDF19LH RSCAN0.RMDF19.UINT8[LH]
+#define RSCAN0RMDF19H RSCAN0.RMDF19.UINT16[H]
+#define RSCAN0RMDF19HL RSCAN0.RMDF19.UINT8[HL]
+#define RSCAN0RMDF19HH RSCAN0.RMDF19.UINT8[HH]
+#define RSCAN0RMID10 RSCAN0.RMID10.UINT32
+#define RSCAN0RMID10L RSCAN0.RMID10.UINT16[L]
+#define RSCAN0RMID10LL RSCAN0.RMID10.UINT8[LL]
+#define RSCAN0RMID10LH RSCAN0.RMID10.UINT8[LH]
+#define RSCAN0RMID10H RSCAN0.RMID10.UINT16[H]
+#define RSCAN0RMID10HL RSCAN0.RMID10.UINT8[HL]
+#define RSCAN0RMID10HH RSCAN0.RMID10.UINT8[HH]
+#define RSCAN0RMPTR10 RSCAN0.RMPTR10.UINT32
+#define RSCAN0RMPTR10L RSCAN0.RMPTR10.UINT16[L]
+#define RSCAN0RMPTR10LL RSCAN0.RMPTR10.UINT8[LL]
+#define RSCAN0RMPTR10LH RSCAN0.RMPTR10.UINT8[LH]
+#define RSCAN0RMPTR10H RSCAN0.RMPTR10.UINT16[H]
+#define RSCAN0RMPTR10HL RSCAN0.RMPTR10.UINT8[HL]
+#define RSCAN0RMPTR10HH RSCAN0.RMPTR10.UINT8[HH]
+#define RSCAN0RMDF010 RSCAN0.RMDF010.UINT32
+#define RSCAN0RMDF010L RSCAN0.RMDF010.UINT16[L]
+#define RSCAN0RMDF010LL RSCAN0.RMDF010.UINT8[LL]
+#define RSCAN0RMDF010LH RSCAN0.RMDF010.UINT8[LH]
+#define RSCAN0RMDF010H RSCAN0.RMDF010.UINT16[H]
+#define RSCAN0RMDF010HL RSCAN0.RMDF010.UINT8[HL]
+#define RSCAN0RMDF010HH RSCAN0.RMDF010.UINT8[HH]
+#define RSCAN0RMDF110 RSCAN0.RMDF110.UINT32
+#define RSCAN0RMDF110L RSCAN0.RMDF110.UINT16[L]
+#define RSCAN0RMDF110LL RSCAN0.RMDF110.UINT8[LL]
+#define RSCAN0RMDF110LH RSCAN0.RMDF110.UINT8[LH]
+#define RSCAN0RMDF110H RSCAN0.RMDF110.UINT16[H]
+#define RSCAN0RMDF110HL RSCAN0.RMDF110.UINT8[HL]
+#define RSCAN0RMDF110HH RSCAN0.RMDF110.UINT8[HH]
+#define RSCAN0RMID11 RSCAN0.RMID11.UINT32
+#define RSCAN0RMID11L RSCAN0.RMID11.UINT16[L]
+#define RSCAN0RMID11LL RSCAN0.RMID11.UINT8[LL]
+#define RSCAN0RMID11LH RSCAN0.RMID11.UINT8[LH]
+#define RSCAN0RMID11H RSCAN0.RMID11.UINT16[H]
+#define RSCAN0RMID11HL RSCAN0.RMID11.UINT8[HL]
+#define RSCAN0RMID11HH RSCAN0.RMID11.UINT8[HH]
+#define RSCAN0RMPTR11 RSCAN0.RMPTR11.UINT32
+#define RSCAN0RMPTR11L RSCAN0.RMPTR11.UINT16[L]
+#define RSCAN0RMPTR11LL RSCAN0.RMPTR11.UINT8[LL]
+#define RSCAN0RMPTR11LH RSCAN0.RMPTR11.UINT8[LH]
+#define RSCAN0RMPTR11H RSCAN0.RMPTR11.UINT16[H]
+#define RSCAN0RMPTR11HL RSCAN0.RMPTR11.UINT8[HL]
+#define RSCAN0RMPTR11HH RSCAN0.RMPTR11.UINT8[HH]
+#define RSCAN0RMDF011 RSCAN0.RMDF011.UINT32
+#define RSCAN0RMDF011L RSCAN0.RMDF011.UINT16[L]
+#define RSCAN0RMDF011LL RSCAN0.RMDF011.UINT8[LL]
+#define RSCAN0RMDF011LH RSCAN0.RMDF011.UINT8[LH]
+#define RSCAN0RMDF011H RSCAN0.RMDF011.UINT16[H]
+#define RSCAN0RMDF011HL RSCAN0.RMDF011.UINT8[HL]
+#define RSCAN0RMDF011HH RSCAN0.RMDF011.UINT8[HH]
+#define RSCAN0RMDF111 RSCAN0.RMDF111.UINT32
+#define RSCAN0RMDF111L RSCAN0.RMDF111.UINT16[L]
+#define RSCAN0RMDF111LL RSCAN0.RMDF111.UINT8[LL]
+#define RSCAN0RMDF111LH RSCAN0.RMDF111.UINT8[LH]
+#define RSCAN0RMDF111H RSCAN0.RMDF111.UINT16[H]
+#define RSCAN0RMDF111HL RSCAN0.RMDF111.UINT8[HL]
+#define RSCAN0RMDF111HH RSCAN0.RMDF111.UINT8[HH]
+#define RSCAN0RMID12 RSCAN0.RMID12.UINT32
+#define RSCAN0RMID12L RSCAN0.RMID12.UINT16[L]
+#define RSCAN0RMID12LL RSCAN0.RMID12.UINT8[LL]
+#define RSCAN0RMID12LH RSCAN0.RMID12.UINT8[LH]
+#define RSCAN0RMID12H RSCAN0.RMID12.UINT16[H]
+#define RSCAN0RMID12HL RSCAN0.RMID12.UINT8[HL]
+#define RSCAN0RMID12HH RSCAN0.RMID12.UINT8[HH]
+#define RSCAN0RMPTR12 RSCAN0.RMPTR12.UINT32
+#define RSCAN0RMPTR12L RSCAN0.RMPTR12.UINT16[L]
+#define RSCAN0RMPTR12LL RSCAN0.RMPTR12.UINT8[LL]
+#define RSCAN0RMPTR12LH RSCAN0.RMPTR12.UINT8[LH]
+#define RSCAN0RMPTR12H RSCAN0.RMPTR12.UINT16[H]
+#define RSCAN0RMPTR12HL RSCAN0.RMPTR12.UINT8[HL]
+#define RSCAN0RMPTR12HH RSCAN0.RMPTR12.UINT8[HH]
+#define RSCAN0RMDF012 RSCAN0.RMDF012.UINT32
+#define RSCAN0RMDF012L RSCAN0.RMDF012.UINT16[L]
+#define RSCAN0RMDF012LL RSCAN0.RMDF012.UINT8[LL]
+#define RSCAN0RMDF012LH RSCAN0.RMDF012.UINT8[LH]
+#define RSCAN0RMDF012H RSCAN0.RMDF012.UINT16[H]
+#define RSCAN0RMDF012HL RSCAN0.RMDF012.UINT8[HL]
+#define RSCAN0RMDF012HH RSCAN0.RMDF012.UINT8[HH]
+#define RSCAN0RMDF112 RSCAN0.RMDF112.UINT32
+#define RSCAN0RMDF112L RSCAN0.RMDF112.UINT16[L]
+#define RSCAN0RMDF112LL RSCAN0.RMDF112.UINT8[LL]
+#define RSCAN0RMDF112LH RSCAN0.RMDF112.UINT8[LH]
+#define RSCAN0RMDF112H RSCAN0.RMDF112.UINT16[H]
+#define RSCAN0RMDF112HL RSCAN0.RMDF112.UINT8[HL]
+#define RSCAN0RMDF112HH RSCAN0.RMDF112.UINT8[HH]
+#define RSCAN0RMID13 RSCAN0.RMID13.UINT32
+#define RSCAN0RMID13L RSCAN0.RMID13.UINT16[L]
+#define RSCAN0RMID13LL RSCAN0.RMID13.UINT8[LL]
+#define RSCAN0RMID13LH RSCAN0.RMID13.UINT8[LH]
+#define RSCAN0RMID13H RSCAN0.RMID13.UINT16[H]
+#define RSCAN0RMID13HL RSCAN0.RMID13.UINT8[HL]
+#define RSCAN0RMID13HH RSCAN0.RMID13.UINT8[HH]
+#define RSCAN0RMPTR13 RSCAN0.RMPTR13.UINT32
+#define RSCAN0RMPTR13L RSCAN0.RMPTR13.UINT16[L]
+#define RSCAN0RMPTR13LL RSCAN0.RMPTR13.UINT8[LL]
+#define RSCAN0RMPTR13LH RSCAN0.RMPTR13.UINT8[LH]
+#define RSCAN0RMPTR13H RSCAN0.RMPTR13.UINT16[H]
+#define RSCAN0RMPTR13HL RSCAN0.RMPTR13.UINT8[HL]
+#define RSCAN0RMPTR13HH RSCAN0.RMPTR13.UINT8[HH]
+#define RSCAN0RMDF013 RSCAN0.RMDF013.UINT32
+#define RSCAN0RMDF013L RSCAN0.RMDF013.UINT16[L]
+#define RSCAN0RMDF013LL RSCAN0.RMDF013.UINT8[LL]
+#define RSCAN0RMDF013LH RSCAN0.RMDF013.UINT8[LH]
+#define RSCAN0RMDF013H RSCAN0.RMDF013.UINT16[H]
+#define RSCAN0RMDF013HL RSCAN0.RMDF013.UINT8[HL]
+#define RSCAN0RMDF013HH RSCAN0.RMDF013.UINT8[HH]
+#define RSCAN0RMDF113 RSCAN0.RMDF113.UINT32
+#define RSCAN0RMDF113L RSCAN0.RMDF113.UINT16[L]
+#define RSCAN0RMDF113LL RSCAN0.RMDF113.UINT8[LL]
+#define RSCAN0RMDF113LH RSCAN0.RMDF113.UINT8[LH]
+#define RSCAN0RMDF113H RSCAN0.RMDF113.UINT16[H]
+#define RSCAN0RMDF113HL RSCAN0.RMDF113.UINT8[HL]
+#define RSCAN0RMDF113HH RSCAN0.RMDF113.UINT8[HH]
+#define RSCAN0RMID14 RSCAN0.RMID14.UINT32
+#define RSCAN0RMID14L RSCAN0.RMID14.UINT16[L]
+#define RSCAN0RMID14LL RSCAN0.RMID14.UINT8[LL]
+#define RSCAN0RMID14LH RSCAN0.RMID14.UINT8[LH]
+#define RSCAN0RMID14H RSCAN0.RMID14.UINT16[H]
+#define RSCAN0RMID14HL RSCAN0.RMID14.UINT8[HL]
+#define RSCAN0RMID14HH RSCAN0.RMID14.UINT8[HH]
+#define RSCAN0RMPTR14 RSCAN0.RMPTR14.UINT32
+#define RSCAN0RMPTR14L RSCAN0.RMPTR14.UINT16[L]
+#define RSCAN0RMPTR14LL RSCAN0.RMPTR14.UINT8[LL]
+#define RSCAN0RMPTR14LH RSCAN0.RMPTR14.UINT8[LH]
+#define RSCAN0RMPTR14H RSCAN0.RMPTR14.UINT16[H]
+#define RSCAN0RMPTR14HL RSCAN0.RMPTR14.UINT8[HL]
+#define RSCAN0RMPTR14HH RSCAN0.RMPTR14.UINT8[HH]
+#define RSCAN0RMDF014 RSCAN0.RMDF014.UINT32
+#define RSCAN0RMDF014L RSCAN0.RMDF014.UINT16[L]
+#define RSCAN0RMDF014LL RSCAN0.RMDF014.UINT8[LL]
+#define RSCAN0RMDF014LH RSCAN0.RMDF014.UINT8[LH]
+#define RSCAN0RMDF014H RSCAN0.RMDF014.UINT16[H]
+#define RSCAN0RMDF014HL RSCAN0.RMDF014.UINT8[HL]
+#define RSCAN0RMDF014HH RSCAN0.RMDF014.UINT8[HH]
+#define RSCAN0RMDF114 RSCAN0.RMDF114.UINT32
+#define RSCAN0RMDF114L RSCAN0.RMDF114.UINT16[L]
+#define RSCAN0RMDF114LL RSCAN0.RMDF114.UINT8[LL]
+#define RSCAN0RMDF114LH RSCAN0.RMDF114.UINT8[LH]
+#define RSCAN0RMDF114H RSCAN0.RMDF114.UINT16[H]
+#define RSCAN0RMDF114HL RSCAN0.RMDF114.UINT8[HL]
+#define RSCAN0RMDF114HH RSCAN0.RMDF114.UINT8[HH]
+#define RSCAN0RMID15 RSCAN0.RMID15.UINT32
+#define RSCAN0RMID15L RSCAN0.RMID15.UINT16[L]
+#define RSCAN0RMID15LL RSCAN0.RMID15.UINT8[LL]
+#define RSCAN0RMID15LH RSCAN0.RMID15.UINT8[LH]
+#define RSCAN0RMID15H RSCAN0.RMID15.UINT16[H]
+#define RSCAN0RMID15HL RSCAN0.RMID15.UINT8[HL]
+#define RSCAN0RMID15HH RSCAN0.RMID15.UINT8[HH]
+#define RSCAN0RMPTR15 RSCAN0.RMPTR15.UINT32
+#define RSCAN0RMPTR15L RSCAN0.RMPTR15.UINT16[L]
+#define RSCAN0RMPTR15LL RSCAN0.RMPTR15.UINT8[LL]
+#define RSCAN0RMPTR15LH RSCAN0.RMPTR15.UINT8[LH]
+#define RSCAN0RMPTR15H RSCAN0.RMPTR15.UINT16[H]
+#define RSCAN0RMPTR15HL RSCAN0.RMPTR15.UINT8[HL]
+#define RSCAN0RMPTR15HH RSCAN0.RMPTR15.UINT8[HH]
+#define RSCAN0RMDF015 RSCAN0.RMDF015.UINT32
+#define RSCAN0RMDF015L RSCAN0.RMDF015.UINT16[L]
+#define RSCAN0RMDF015LL RSCAN0.RMDF015.UINT8[LL]
+#define RSCAN0RMDF015LH RSCAN0.RMDF015.UINT8[LH]
+#define RSCAN0RMDF015H RSCAN0.RMDF015.UINT16[H]
+#define RSCAN0RMDF015HL RSCAN0.RMDF015.UINT8[HL]
+#define RSCAN0RMDF015HH RSCAN0.RMDF015.UINT8[HH]
+#define RSCAN0RMDF115 RSCAN0.RMDF115.UINT32
+#define RSCAN0RMDF115L RSCAN0.RMDF115.UINT16[L]
+#define RSCAN0RMDF115LL RSCAN0.RMDF115.UINT8[LL]
+#define RSCAN0RMDF115LH RSCAN0.RMDF115.UINT8[LH]
+#define RSCAN0RMDF115H RSCAN0.RMDF115.UINT16[H]
+#define RSCAN0RMDF115HL RSCAN0.RMDF115.UINT8[HL]
+#define RSCAN0RMDF115HH RSCAN0.RMDF115.UINT8[HH]
+#define RSCAN0RMID16 RSCAN0.RMID16.UINT32
+#define RSCAN0RMID16L RSCAN0.RMID16.UINT16[L]
+#define RSCAN0RMID16LL RSCAN0.RMID16.UINT8[LL]
+#define RSCAN0RMID16LH RSCAN0.RMID16.UINT8[LH]
+#define RSCAN0RMID16H RSCAN0.RMID16.UINT16[H]
+#define RSCAN0RMID16HL RSCAN0.RMID16.UINT8[HL]
+#define RSCAN0RMID16HH RSCAN0.RMID16.UINT8[HH]
+#define RSCAN0RMPTR16 RSCAN0.RMPTR16.UINT32
+#define RSCAN0RMPTR16L RSCAN0.RMPTR16.UINT16[L]
+#define RSCAN0RMPTR16LL RSCAN0.RMPTR16.UINT8[LL]
+#define RSCAN0RMPTR16LH RSCAN0.RMPTR16.UINT8[LH]
+#define RSCAN0RMPTR16H RSCAN0.RMPTR16.UINT16[H]
+#define RSCAN0RMPTR16HL RSCAN0.RMPTR16.UINT8[HL]
+#define RSCAN0RMPTR16HH RSCAN0.RMPTR16.UINT8[HH]
+#define RSCAN0RMDF016 RSCAN0.RMDF016.UINT32
+#define RSCAN0RMDF016L RSCAN0.RMDF016.UINT16[L]
+#define RSCAN0RMDF016LL RSCAN0.RMDF016.UINT8[LL]
+#define RSCAN0RMDF016LH RSCAN0.RMDF016.UINT8[LH]
+#define RSCAN0RMDF016H RSCAN0.RMDF016.UINT16[H]
+#define RSCAN0RMDF016HL RSCAN0.RMDF016.UINT8[HL]
+#define RSCAN0RMDF016HH RSCAN0.RMDF016.UINT8[HH]
+#define RSCAN0RMDF116 RSCAN0.RMDF116.UINT32
+#define RSCAN0RMDF116L RSCAN0.RMDF116.UINT16[L]
+#define RSCAN0RMDF116LL RSCAN0.RMDF116.UINT8[LL]
+#define RSCAN0RMDF116LH RSCAN0.RMDF116.UINT8[LH]
+#define RSCAN0RMDF116H RSCAN0.RMDF116.UINT16[H]
+#define RSCAN0RMDF116HL RSCAN0.RMDF116.UINT8[HL]
+#define RSCAN0RMDF116HH RSCAN0.RMDF116.UINT8[HH]
+#define RSCAN0RMID17 RSCAN0.RMID17.UINT32
+#define RSCAN0RMID17L RSCAN0.RMID17.UINT16[L]
+#define RSCAN0RMID17LL RSCAN0.RMID17.UINT8[LL]
+#define RSCAN0RMID17LH RSCAN0.RMID17.UINT8[LH]
+#define RSCAN0RMID17H RSCAN0.RMID17.UINT16[H]
+#define RSCAN0RMID17HL RSCAN0.RMID17.UINT8[HL]
+#define RSCAN0RMID17HH RSCAN0.RMID17.UINT8[HH]
+#define RSCAN0RMPTR17 RSCAN0.RMPTR17.UINT32
+#define RSCAN0RMPTR17L RSCAN0.RMPTR17.UINT16[L]
+#define RSCAN0RMPTR17LL RSCAN0.RMPTR17.UINT8[LL]
+#define RSCAN0RMPTR17LH RSCAN0.RMPTR17.UINT8[LH]
+#define RSCAN0RMPTR17H RSCAN0.RMPTR17.UINT16[H]
+#define RSCAN0RMPTR17HL RSCAN0.RMPTR17.UINT8[HL]
+#define RSCAN0RMPTR17HH RSCAN0.RMPTR17.UINT8[HH]
+#define RSCAN0RMDF017 RSCAN0.RMDF017.UINT32
+#define RSCAN0RMDF017L RSCAN0.RMDF017.UINT16[L]
+#define RSCAN0RMDF017LL RSCAN0.RMDF017.UINT8[LL]
+#define RSCAN0RMDF017LH RSCAN0.RMDF017.UINT8[LH]
+#define RSCAN0RMDF017H RSCAN0.RMDF017.UINT16[H]
+#define RSCAN0RMDF017HL RSCAN0.RMDF017.UINT8[HL]
+#define RSCAN0RMDF017HH RSCAN0.RMDF017.UINT8[HH]
+#define RSCAN0RMDF117 RSCAN0.RMDF117.UINT32
+#define RSCAN0RMDF117L RSCAN0.RMDF117.UINT16[L]
+#define RSCAN0RMDF117LL RSCAN0.RMDF117.UINT8[LL]
+#define RSCAN0RMDF117LH RSCAN0.RMDF117.UINT8[LH]
+#define RSCAN0RMDF117H RSCAN0.RMDF117.UINT16[H]
+#define RSCAN0RMDF117HL RSCAN0.RMDF117.UINT8[HL]
+#define RSCAN0RMDF117HH RSCAN0.RMDF117.UINT8[HH]
+#define RSCAN0RMID18 RSCAN0.RMID18.UINT32
+#define RSCAN0RMID18L RSCAN0.RMID18.UINT16[L]
+#define RSCAN0RMID18LL RSCAN0.RMID18.UINT8[LL]
+#define RSCAN0RMID18LH RSCAN0.RMID18.UINT8[LH]
+#define RSCAN0RMID18H RSCAN0.RMID18.UINT16[H]
+#define RSCAN0RMID18HL RSCAN0.RMID18.UINT8[HL]
+#define RSCAN0RMID18HH RSCAN0.RMID18.UINT8[HH]
+#define RSCAN0RMPTR18 RSCAN0.RMPTR18.UINT32
+#define RSCAN0RMPTR18L RSCAN0.RMPTR18.UINT16[L]
+#define RSCAN0RMPTR18LL RSCAN0.RMPTR18.UINT8[LL]
+#define RSCAN0RMPTR18LH RSCAN0.RMPTR18.UINT8[LH]
+#define RSCAN0RMPTR18H RSCAN0.RMPTR18.UINT16[H]
+#define RSCAN0RMPTR18HL RSCAN0.RMPTR18.UINT8[HL]
+#define RSCAN0RMPTR18HH RSCAN0.RMPTR18.UINT8[HH]
+#define RSCAN0RMDF018 RSCAN0.RMDF018.UINT32
+#define RSCAN0RMDF018L RSCAN0.RMDF018.UINT16[L]
+#define RSCAN0RMDF018LL RSCAN0.RMDF018.UINT8[LL]
+#define RSCAN0RMDF018LH RSCAN0.RMDF018.UINT8[LH]
+#define RSCAN0RMDF018H RSCAN0.RMDF018.UINT16[H]
+#define RSCAN0RMDF018HL RSCAN0.RMDF018.UINT8[HL]
+#define RSCAN0RMDF018HH RSCAN0.RMDF018.UINT8[HH]
+#define RSCAN0RMDF118 RSCAN0.RMDF118.UINT32
+#define RSCAN0RMDF118L RSCAN0.RMDF118.UINT16[L]
+#define RSCAN0RMDF118LL RSCAN0.RMDF118.UINT8[LL]
+#define RSCAN0RMDF118LH RSCAN0.RMDF118.UINT8[LH]
+#define RSCAN0RMDF118H RSCAN0.RMDF118.UINT16[H]
+#define RSCAN0RMDF118HL RSCAN0.RMDF118.UINT8[HL]
+#define RSCAN0RMDF118HH RSCAN0.RMDF118.UINT8[HH]
+#define RSCAN0RMID19 RSCAN0.RMID19.UINT32
+#define RSCAN0RMID19L RSCAN0.RMID19.UINT16[L]
+#define RSCAN0RMID19LL RSCAN0.RMID19.UINT8[LL]
+#define RSCAN0RMID19LH RSCAN0.RMID19.UINT8[LH]
+#define RSCAN0RMID19H RSCAN0.RMID19.UINT16[H]
+#define RSCAN0RMID19HL RSCAN0.RMID19.UINT8[HL]
+#define RSCAN0RMID19HH RSCAN0.RMID19.UINT8[HH]
+#define RSCAN0RMPTR19 RSCAN0.RMPTR19.UINT32
+#define RSCAN0RMPTR19L RSCAN0.RMPTR19.UINT16[L]
+#define RSCAN0RMPTR19LL RSCAN0.RMPTR19.UINT8[LL]
+#define RSCAN0RMPTR19LH RSCAN0.RMPTR19.UINT8[LH]
+#define RSCAN0RMPTR19H RSCAN0.RMPTR19.UINT16[H]
+#define RSCAN0RMPTR19HL RSCAN0.RMPTR19.UINT8[HL]
+#define RSCAN0RMPTR19HH RSCAN0.RMPTR19.UINT8[HH]
+#define RSCAN0RMDF019 RSCAN0.RMDF019.UINT32
+#define RSCAN0RMDF019L RSCAN0.RMDF019.UINT16[L]
+#define RSCAN0RMDF019LL RSCAN0.RMDF019.UINT8[LL]
+#define RSCAN0RMDF019LH RSCAN0.RMDF019.UINT8[LH]
+#define RSCAN0RMDF019H RSCAN0.RMDF019.UINT16[H]
+#define RSCAN0RMDF019HL RSCAN0.RMDF019.UINT8[HL]
+#define RSCAN0RMDF019HH RSCAN0.RMDF019.UINT8[HH]
+#define RSCAN0RMDF119 RSCAN0.RMDF119.UINT32
+#define RSCAN0RMDF119L RSCAN0.RMDF119.UINT16[L]
+#define RSCAN0RMDF119LL RSCAN0.RMDF119.UINT8[LL]
+#define RSCAN0RMDF119LH RSCAN0.RMDF119.UINT8[LH]
+#define RSCAN0RMDF119H RSCAN0.RMDF119.UINT16[H]
+#define RSCAN0RMDF119HL RSCAN0.RMDF119.UINT8[HL]
+#define RSCAN0RMDF119HH RSCAN0.RMDF119.UINT8[HH]
+#define RSCAN0RMID20 RSCAN0.RMID20.UINT32
+#define RSCAN0RMID20L RSCAN0.RMID20.UINT16[L]
+#define RSCAN0RMID20LL RSCAN0.RMID20.UINT8[LL]
+#define RSCAN0RMID20LH RSCAN0.RMID20.UINT8[LH]
+#define RSCAN0RMID20H RSCAN0.RMID20.UINT16[H]
+#define RSCAN0RMID20HL RSCAN0.RMID20.UINT8[HL]
+#define RSCAN0RMID20HH RSCAN0.RMID20.UINT8[HH]
+#define RSCAN0RMPTR20 RSCAN0.RMPTR20.UINT32
+#define RSCAN0RMPTR20L RSCAN0.RMPTR20.UINT16[L]
+#define RSCAN0RMPTR20LL RSCAN0.RMPTR20.UINT8[LL]
+#define RSCAN0RMPTR20LH RSCAN0.RMPTR20.UINT8[LH]
+#define RSCAN0RMPTR20H RSCAN0.RMPTR20.UINT16[H]
+#define RSCAN0RMPTR20HL RSCAN0.RMPTR20.UINT8[HL]
+#define RSCAN0RMPTR20HH RSCAN0.RMPTR20.UINT8[HH]
+#define RSCAN0RMDF020 RSCAN0.RMDF020.UINT32
+#define RSCAN0RMDF020L RSCAN0.RMDF020.UINT16[L]
+#define RSCAN0RMDF020LL RSCAN0.RMDF020.UINT8[LL]
+#define RSCAN0RMDF020LH RSCAN0.RMDF020.UINT8[LH]
+#define RSCAN0RMDF020H RSCAN0.RMDF020.UINT16[H]
+#define RSCAN0RMDF020HL RSCAN0.RMDF020.UINT8[HL]
+#define RSCAN0RMDF020HH RSCAN0.RMDF020.UINT8[HH]
+#define RSCAN0RMDF120 RSCAN0.RMDF120.UINT32
+#define RSCAN0RMDF120L RSCAN0.RMDF120.UINT16[L]
+#define RSCAN0RMDF120LL RSCAN0.RMDF120.UINT8[LL]
+#define RSCAN0RMDF120LH RSCAN0.RMDF120.UINT8[LH]
+#define RSCAN0RMDF120H RSCAN0.RMDF120.UINT16[H]
+#define RSCAN0RMDF120HL RSCAN0.RMDF120.UINT8[HL]
+#define RSCAN0RMDF120HH RSCAN0.RMDF120.UINT8[HH]
+#define RSCAN0RMID21 RSCAN0.RMID21.UINT32
+#define RSCAN0RMID21L RSCAN0.RMID21.UINT16[L]
+#define RSCAN0RMID21LL RSCAN0.RMID21.UINT8[LL]
+#define RSCAN0RMID21LH RSCAN0.RMID21.UINT8[LH]
+#define RSCAN0RMID21H RSCAN0.RMID21.UINT16[H]
+#define RSCAN0RMID21HL RSCAN0.RMID21.UINT8[HL]
+#define RSCAN0RMID21HH RSCAN0.RMID21.UINT8[HH]
+#define RSCAN0RMPTR21 RSCAN0.RMPTR21.UINT32
+#define RSCAN0RMPTR21L RSCAN0.RMPTR21.UINT16[L]
+#define RSCAN0RMPTR21LL RSCAN0.RMPTR21.UINT8[LL]
+#define RSCAN0RMPTR21LH RSCAN0.RMPTR21.UINT8[LH]
+#define RSCAN0RMPTR21H RSCAN0.RMPTR21.UINT16[H]
+#define RSCAN0RMPTR21HL RSCAN0.RMPTR21.UINT8[HL]
+#define RSCAN0RMPTR21HH RSCAN0.RMPTR21.UINT8[HH]
+#define RSCAN0RMDF021 RSCAN0.RMDF021.UINT32
+#define RSCAN0RMDF021L RSCAN0.RMDF021.UINT16[L]
+#define RSCAN0RMDF021LL RSCAN0.RMDF021.UINT8[LL]
+#define RSCAN0RMDF021LH RSCAN0.RMDF021.UINT8[LH]
+#define RSCAN0RMDF021H RSCAN0.RMDF021.UINT16[H]
+#define RSCAN0RMDF021HL RSCAN0.RMDF021.UINT8[HL]
+#define RSCAN0RMDF021HH RSCAN0.RMDF021.UINT8[HH]
+#define RSCAN0RMDF121 RSCAN0.RMDF121.UINT32
+#define RSCAN0RMDF121L RSCAN0.RMDF121.UINT16[L]
+#define RSCAN0RMDF121LL RSCAN0.RMDF121.UINT8[LL]
+#define RSCAN0RMDF121LH RSCAN0.RMDF121.UINT8[LH]
+#define RSCAN0RMDF121H RSCAN0.RMDF121.UINT16[H]
+#define RSCAN0RMDF121HL RSCAN0.RMDF121.UINT8[HL]
+#define RSCAN0RMDF121HH RSCAN0.RMDF121.UINT8[HH]
+#define RSCAN0RMID22 RSCAN0.RMID22.UINT32
+#define RSCAN0RMID22L RSCAN0.RMID22.UINT16[L]
+#define RSCAN0RMID22LL RSCAN0.RMID22.UINT8[LL]
+#define RSCAN0RMID22LH RSCAN0.RMID22.UINT8[LH]
+#define RSCAN0RMID22H RSCAN0.RMID22.UINT16[H]
+#define RSCAN0RMID22HL RSCAN0.RMID22.UINT8[HL]
+#define RSCAN0RMID22HH RSCAN0.RMID22.UINT8[HH]
+#define RSCAN0RMPTR22 RSCAN0.RMPTR22.UINT32
+#define RSCAN0RMPTR22L RSCAN0.RMPTR22.UINT16[L]
+#define RSCAN0RMPTR22LL RSCAN0.RMPTR22.UINT8[LL]
+#define RSCAN0RMPTR22LH RSCAN0.RMPTR22.UINT8[LH]
+#define RSCAN0RMPTR22H RSCAN0.RMPTR22.UINT16[H]
+#define RSCAN0RMPTR22HL RSCAN0.RMPTR22.UINT8[HL]
+#define RSCAN0RMPTR22HH RSCAN0.RMPTR22.UINT8[HH]
+#define RSCAN0RMDF022 RSCAN0.RMDF022.UINT32
+#define RSCAN0RMDF022L RSCAN0.RMDF022.UINT16[L]
+#define RSCAN0RMDF022LL RSCAN0.RMDF022.UINT8[LL]
+#define RSCAN0RMDF022LH RSCAN0.RMDF022.UINT8[LH]
+#define RSCAN0RMDF022H RSCAN0.RMDF022.UINT16[H]
+#define RSCAN0RMDF022HL RSCAN0.RMDF022.UINT8[HL]
+#define RSCAN0RMDF022HH RSCAN0.RMDF022.UINT8[HH]
+#define RSCAN0RMDF122 RSCAN0.RMDF122.UINT32
+#define RSCAN0RMDF122L RSCAN0.RMDF122.UINT16[L]
+#define RSCAN0RMDF122LL RSCAN0.RMDF122.UINT8[LL]
+#define RSCAN0RMDF122LH RSCAN0.RMDF122.UINT8[LH]
+#define RSCAN0RMDF122H RSCAN0.RMDF122.UINT16[H]
+#define RSCAN0RMDF122HL RSCAN0.RMDF122.UINT8[HL]
+#define RSCAN0RMDF122HH RSCAN0.RMDF122.UINT8[HH]
+#define RSCAN0RMID23 RSCAN0.RMID23.UINT32
+#define RSCAN0RMID23L RSCAN0.RMID23.UINT16[L]
+#define RSCAN0RMID23LL RSCAN0.RMID23.UINT8[LL]
+#define RSCAN0RMID23LH RSCAN0.RMID23.UINT8[LH]
+#define RSCAN0RMID23H RSCAN0.RMID23.UINT16[H]
+#define RSCAN0RMID23HL RSCAN0.RMID23.UINT8[HL]
+#define RSCAN0RMID23HH RSCAN0.RMID23.UINT8[HH]
+#define RSCAN0RMPTR23 RSCAN0.RMPTR23.UINT32
+#define RSCAN0RMPTR23L RSCAN0.RMPTR23.UINT16[L]
+#define RSCAN0RMPTR23LL RSCAN0.RMPTR23.UINT8[LL]
+#define RSCAN0RMPTR23LH RSCAN0.RMPTR23.UINT8[LH]
+#define RSCAN0RMPTR23H RSCAN0.RMPTR23.UINT16[H]
+#define RSCAN0RMPTR23HL RSCAN0.RMPTR23.UINT8[HL]
+#define RSCAN0RMPTR23HH RSCAN0.RMPTR23.UINT8[HH]
+#define RSCAN0RMDF023 RSCAN0.RMDF023.UINT32
+#define RSCAN0RMDF023L RSCAN0.RMDF023.UINT16[L]
+#define RSCAN0RMDF023LL RSCAN0.RMDF023.UINT8[LL]
+#define RSCAN0RMDF023LH RSCAN0.RMDF023.UINT8[LH]
+#define RSCAN0RMDF023H RSCAN0.RMDF023.UINT16[H]
+#define RSCAN0RMDF023HL RSCAN0.RMDF023.UINT8[HL]
+#define RSCAN0RMDF023HH RSCAN0.RMDF023.UINT8[HH]
+#define RSCAN0RMDF123 RSCAN0.RMDF123.UINT32
+#define RSCAN0RMDF123L RSCAN0.RMDF123.UINT16[L]
+#define RSCAN0RMDF123LL RSCAN0.RMDF123.UINT8[LL]
+#define RSCAN0RMDF123LH RSCAN0.RMDF123.UINT8[LH]
+#define RSCAN0RMDF123H RSCAN0.RMDF123.UINT16[H]
+#define RSCAN0RMDF123HL RSCAN0.RMDF123.UINT8[HL]
+#define RSCAN0RMDF123HH RSCAN0.RMDF123.UINT8[HH]
+#define RSCAN0RMID24 RSCAN0.RMID24.UINT32
+#define RSCAN0RMID24L RSCAN0.RMID24.UINT16[L]
+#define RSCAN0RMID24LL RSCAN0.RMID24.UINT8[LL]
+#define RSCAN0RMID24LH RSCAN0.RMID24.UINT8[LH]
+#define RSCAN0RMID24H RSCAN0.RMID24.UINT16[H]
+#define RSCAN0RMID24HL RSCAN0.RMID24.UINT8[HL]
+#define RSCAN0RMID24HH RSCAN0.RMID24.UINT8[HH]
+#define RSCAN0RMPTR24 RSCAN0.RMPTR24.UINT32
+#define RSCAN0RMPTR24L RSCAN0.RMPTR24.UINT16[L]
+#define RSCAN0RMPTR24LL RSCAN0.RMPTR24.UINT8[LL]
+#define RSCAN0RMPTR24LH RSCAN0.RMPTR24.UINT8[LH]
+#define RSCAN0RMPTR24H RSCAN0.RMPTR24.UINT16[H]
+#define RSCAN0RMPTR24HL RSCAN0.RMPTR24.UINT8[HL]
+#define RSCAN0RMPTR24HH RSCAN0.RMPTR24.UINT8[HH]
+#define RSCAN0RMDF024 RSCAN0.RMDF024.UINT32
+#define RSCAN0RMDF024L RSCAN0.RMDF024.UINT16[L]
+#define RSCAN0RMDF024LL RSCAN0.RMDF024.UINT8[LL]
+#define RSCAN0RMDF024LH RSCAN0.RMDF024.UINT8[LH]
+#define RSCAN0RMDF024H RSCAN0.RMDF024.UINT16[H]
+#define RSCAN0RMDF024HL RSCAN0.RMDF024.UINT8[HL]
+#define RSCAN0RMDF024HH RSCAN0.RMDF024.UINT8[HH]
+#define RSCAN0RMDF124 RSCAN0.RMDF124.UINT32
+#define RSCAN0RMDF124L RSCAN0.RMDF124.UINT16[L]
+#define RSCAN0RMDF124LL RSCAN0.RMDF124.UINT8[LL]
+#define RSCAN0RMDF124LH RSCAN0.RMDF124.UINT8[LH]
+#define RSCAN0RMDF124H RSCAN0.RMDF124.UINT16[H]
+#define RSCAN0RMDF124HL RSCAN0.RMDF124.UINT8[HL]
+#define RSCAN0RMDF124HH RSCAN0.RMDF124.UINT8[HH]
+#define RSCAN0RMID25 RSCAN0.RMID25.UINT32
+#define RSCAN0RMID25L RSCAN0.RMID25.UINT16[L]
+#define RSCAN0RMID25LL RSCAN0.RMID25.UINT8[LL]
+#define RSCAN0RMID25LH RSCAN0.RMID25.UINT8[LH]
+#define RSCAN0RMID25H RSCAN0.RMID25.UINT16[H]
+#define RSCAN0RMID25HL RSCAN0.RMID25.UINT8[HL]
+#define RSCAN0RMID25HH RSCAN0.RMID25.UINT8[HH]
+#define RSCAN0RMPTR25 RSCAN0.RMPTR25.UINT32
+#define RSCAN0RMPTR25L RSCAN0.RMPTR25.UINT16[L]
+#define RSCAN0RMPTR25LL RSCAN0.RMPTR25.UINT8[LL]
+#define RSCAN0RMPTR25LH RSCAN0.RMPTR25.UINT8[LH]
+#define RSCAN0RMPTR25H RSCAN0.RMPTR25.UINT16[H]
+#define RSCAN0RMPTR25HL RSCAN0.RMPTR25.UINT8[HL]
+#define RSCAN0RMPTR25HH RSCAN0.RMPTR25.UINT8[HH]
+#define RSCAN0RMDF025 RSCAN0.RMDF025.UINT32
+#define RSCAN0RMDF025L RSCAN0.RMDF025.UINT16[L]
+#define RSCAN0RMDF025LL RSCAN0.RMDF025.UINT8[LL]
+#define RSCAN0RMDF025LH RSCAN0.RMDF025.UINT8[LH]
+#define RSCAN0RMDF025H RSCAN0.RMDF025.UINT16[H]
+#define RSCAN0RMDF025HL RSCAN0.RMDF025.UINT8[HL]
+#define RSCAN0RMDF025HH RSCAN0.RMDF025.UINT8[HH]
+#define RSCAN0RMDF125 RSCAN0.RMDF125.UINT32
+#define RSCAN0RMDF125L RSCAN0.RMDF125.UINT16[L]
+#define RSCAN0RMDF125LL RSCAN0.RMDF125.UINT8[LL]
+#define RSCAN0RMDF125LH RSCAN0.RMDF125.UINT8[LH]
+#define RSCAN0RMDF125H RSCAN0.RMDF125.UINT16[H]
+#define RSCAN0RMDF125HL RSCAN0.RMDF125.UINT8[HL]
+#define RSCAN0RMDF125HH RSCAN0.RMDF125.UINT8[HH]
+#define RSCAN0RMID26 RSCAN0.RMID26.UINT32
+#define RSCAN0RMID26L RSCAN0.RMID26.UINT16[L]
+#define RSCAN0RMID26LL RSCAN0.RMID26.UINT8[LL]
+#define RSCAN0RMID26LH RSCAN0.RMID26.UINT8[LH]
+#define RSCAN0RMID26H RSCAN0.RMID26.UINT16[H]
+#define RSCAN0RMID26HL RSCAN0.RMID26.UINT8[HL]
+#define RSCAN0RMID26HH RSCAN0.RMID26.UINT8[HH]
+#define RSCAN0RMPTR26 RSCAN0.RMPTR26.UINT32
+#define RSCAN0RMPTR26L RSCAN0.RMPTR26.UINT16[L]
+#define RSCAN0RMPTR26LL RSCAN0.RMPTR26.UINT8[LL]
+#define RSCAN0RMPTR26LH RSCAN0.RMPTR26.UINT8[LH]
+#define RSCAN0RMPTR26H RSCAN0.RMPTR26.UINT16[H]
+#define RSCAN0RMPTR26HL RSCAN0.RMPTR26.UINT8[HL]
+#define RSCAN0RMPTR26HH RSCAN0.RMPTR26.UINT8[HH]
+#define RSCAN0RMDF026 RSCAN0.RMDF026.UINT32
+#define RSCAN0RMDF026L RSCAN0.RMDF026.UINT16[L]
+#define RSCAN0RMDF026LL RSCAN0.RMDF026.UINT8[LL]
+#define RSCAN0RMDF026LH RSCAN0.RMDF026.UINT8[LH]
+#define RSCAN0RMDF026H RSCAN0.RMDF026.UINT16[H]
+#define RSCAN0RMDF026HL RSCAN0.RMDF026.UINT8[HL]
+#define RSCAN0RMDF026HH RSCAN0.RMDF026.UINT8[HH]
+#define RSCAN0RMDF126 RSCAN0.RMDF126.UINT32
+#define RSCAN0RMDF126L RSCAN0.RMDF126.UINT16[L]
+#define RSCAN0RMDF126LL RSCAN0.RMDF126.UINT8[LL]
+#define RSCAN0RMDF126LH RSCAN0.RMDF126.UINT8[LH]
+#define RSCAN0RMDF126H RSCAN0.RMDF126.UINT16[H]
+#define RSCAN0RMDF126HL RSCAN0.RMDF126.UINT8[HL]
+#define RSCAN0RMDF126HH RSCAN0.RMDF126.UINT8[HH]
+#define RSCAN0RMID27 RSCAN0.RMID27.UINT32
+#define RSCAN0RMID27L RSCAN0.RMID27.UINT16[L]
+#define RSCAN0RMID27LL RSCAN0.RMID27.UINT8[LL]
+#define RSCAN0RMID27LH RSCAN0.RMID27.UINT8[LH]
+#define RSCAN0RMID27H RSCAN0.RMID27.UINT16[H]
+#define RSCAN0RMID27HL RSCAN0.RMID27.UINT8[HL]
+#define RSCAN0RMID27HH RSCAN0.RMID27.UINT8[HH]
+#define RSCAN0RMPTR27 RSCAN0.RMPTR27.UINT32
+#define RSCAN0RMPTR27L RSCAN0.RMPTR27.UINT16[L]
+#define RSCAN0RMPTR27LL RSCAN0.RMPTR27.UINT8[LL]
+#define RSCAN0RMPTR27LH RSCAN0.RMPTR27.UINT8[LH]
+#define RSCAN0RMPTR27H RSCAN0.RMPTR27.UINT16[H]
+#define RSCAN0RMPTR27HL RSCAN0.RMPTR27.UINT8[HL]
+#define RSCAN0RMPTR27HH RSCAN0.RMPTR27.UINT8[HH]
+#define RSCAN0RMDF027 RSCAN0.RMDF027.UINT32
+#define RSCAN0RMDF027L RSCAN0.RMDF027.UINT16[L]
+#define RSCAN0RMDF027LL RSCAN0.RMDF027.UINT8[LL]
+#define RSCAN0RMDF027LH RSCAN0.RMDF027.UINT8[LH]
+#define RSCAN0RMDF027H RSCAN0.RMDF027.UINT16[H]
+#define RSCAN0RMDF027HL RSCAN0.RMDF027.UINT8[HL]
+#define RSCAN0RMDF027HH RSCAN0.RMDF027.UINT8[HH]
+#define RSCAN0RMDF127 RSCAN0.RMDF127.UINT32
+#define RSCAN0RMDF127L RSCAN0.RMDF127.UINT16[L]
+#define RSCAN0RMDF127LL RSCAN0.RMDF127.UINT8[LL]
+#define RSCAN0RMDF127LH RSCAN0.RMDF127.UINT8[LH]
+#define RSCAN0RMDF127H RSCAN0.RMDF127.UINT16[H]
+#define RSCAN0RMDF127HL RSCAN0.RMDF127.UINT8[HL]
+#define RSCAN0RMDF127HH RSCAN0.RMDF127.UINT8[HH]
+#define RSCAN0RMID28 RSCAN0.RMID28.UINT32
+#define RSCAN0RMID28L RSCAN0.RMID28.UINT16[L]
+#define RSCAN0RMID28LL RSCAN0.RMID28.UINT8[LL]
+#define RSCAN0RMID28LH RSCAN0.RMID28.UINT8[LH]
+#define RSCAN0RMID28H RSCAN0.RMID28.UINT16[H]
+#define RSCAN0RMID28HL RSCAN0.RMID28.UINT8[HL]
+#define RSCAN0RMID28HH RSCAN0.RMID28.UINT8[HH]
+#define RSCAN0RMPTR28 RSCAN0.RMPTR28.UINT32
+#define RSCAN0RMPTR28L RSCAN0.RMPTR28.UINT16[L]
+#define RSCAN0RMPTR28LL RSCAN0.RMPTR28.UINT8[LL]
+#define RSCAN0RMPTR28LH RSCAN0.RMPTR28.UINT8[LH]
+#define RSCAN0RMPTR28H RSCAN0.RMPTR28.UINT16[H]
+#define RSCAN0RMPTR28HL RSCAN0.RMPTR28.UINT8[HL]
+#define RSCAN0RMPTR28HH RSCAN0.RMPTR28.UINT8[HH]
+#define RSCAN0RMDF028 RSCAN0.RMDF028.UINT32
+#define RSCAN0RMDF028L RSCAN0.RMDF028.UINT16[L]
+#define RSCAN0RMDF028LL RSCAN0.RMDF028.UINT8[LL]
+#define RSCAN0RMDF028LH RSCAN0.RMDF028.UINT8[LH]
+#define RSCAN0RMDF028H RSCAN0.RMDF028.UINT16[H]
+#define RSCAN0RMDF028HL RSCAN0.RMDF028.UINT8[HL]
+#define RSCAN0RMDF028HH RSCAN0.RMDF028.UINT8[HH]
+#define RSCAN0RMDF128 RSCAN0.RMDF128.UINT32
+#define RSCAN0RMDF128L RSCAN0.RMDF128.UINT16[L]
+#define RSCAN0RMDF128LL RSCAN0.RMDF128.UINT8[LL]
+#define RSCAN0RMDF128LH RSCAN0.RMDF128.UINT8[LH]
+#define RSCAN0RMDF128H RSCAN0.RMDF128.UINT16[H]
+#define RSCAN0RMDF128HL RSCAN0.RMDF128.UINT8[HL]
+#define RSCAN0RMDF128HH RSCAN0.RMDF128.UINT8[HH]
+#define RSCAN0RMID29 RSCAN0.RMID29.UINT32
+#define RSCAN0RMID29L RSCAN0.RMID29.UINT16[L]
+#define RSCAN0RMID29LL RSCAN0.RMID29.UINT8[LL]
+#define RSCAN0RMID29LH RSCAN0.RMID29.UINT8[LH]
+#define RSCAN0RMID29H RSCAN0.RMID29.UINT16[H]
+#define RSCAN0RMID29HL RSCAN0.RMID29.UINT8[HL]
+#define RSCAN0RMID29HH RSCAN0.RMID29.UINT8[HH]
+#define RSCAN0RMPTR29 RSCAN0.RMPTR29.UINT32
+#define RSCAN0RMPTR29L RSCAN0.RMPTR29.UINT16[L]
+#define RSCAN0RMPTR29LL RSCAN0.RMPTR29.UINT8[LL]
+#define RSCAN0RMPTR29LH RSCAN0.RMPTR29.UINT8[LH]
+#define RSCAN0RMPTR29H RSCAN0.RMPTR29.UINT16[H]
+#define RSCAN0RMPTR29HL RSCAN0.RMPTR29.UINT8[HL]
+#define RSCAN0RMPTR29HH RSCAN0.RMPTR29.UINT8[HH]
+#define RSCAN0RMDF029 RSCAN0.RMDF029.UINT32
+#define RSCAN0RMDF029L RSCAN0.RMDF029.UINT16[L]
+#define RSCAN0RMDF029LL RSCAN0.RMDF029.UINT8[LL]
+#define RSCAN0RMDF029LH RSCAN0.RMDF029.UINT8[LH]
+#define RSCAN0RMDF029H RSCAN0.RMDF029.UINT16[H]
+#define RSCAN0RMDF029HL RSCAN0.RMDF029.UINT8[HL]
+#define RSCAN0RMDF029HH RSCAN0.RMDF029.UINT8[HH]
+#define RSCAN0RMDF129 RSCAN0.RMDF129.UINT32
+#define RSCAN0RMDF129L RSCAN0.RMDF129.UINT16[L]
+#define RSCAN0RMDF129LL RSCAN0.RMDF129.UINT8[LL]
+#define RSCAN0RMDF129LH RSCAN0.RMDF129.UINT8[LH]
+#define RSCAN0RMDF129H RSCAN0.RMDF129.UINT16[H]
+#define RSCAN0RMDF129HL RSCAN0.RMDF129.UINT8[HL]
+#define RSCAN0RMDF129HH RSCAN0.RMDF129.UINT8[HH]
+#define RSCAN0RMID30 RSCAN0.RMID30.UINT32
+#define RSCAN0RMID30L RSCAN0.RMID30.UINT16[L]
+#define RSCAN0RMID30LL RSCAN0.RMID30.UINT8[LL]
+#define RSCAN0RMID30LH RSCAN0.RMID30.UINT8[LH]
+#define RSCAN0RMID30H RSCAN0.RMID30.UINT16[H]
+#define RSCAN0RMID30HL RSCAN0.RMID30.UINT8[HL]
+#define RSCAN0RMID30HH RSCAN0.RMID30.UINT8[HH]
+#define RSCAN0RMPTR30 RSCAN0.RMPTR30.UINT32
+#define RSCAN0RMPTR30L RSCAN0.RMPTR30.UINT16[L]
+#define RSCAN0RMPTR30LL RSCAN0.RMPTR30.UINT8[LL]
+#define RSCAN0RMPTR30LH RSCAN0.RMPTR30.UINT8[LH]
+#define RSCAN0RMPTR30H RSCAN0.RMPTR30.UINT16[H]
+#define RSCAN0RMPTR30HL RSCAN0.RMPTR30.UINT8[HL]
+#define RSCAN0RMPTR30HH RSCAN0.RMPTR30.UINT8[HH]
+#define RSCAN0RMDF030 RSCAN0.RMDF030.UINT32
+#define RSCAN0RMDF030L RSCAN0.RMDF030.UINT16[L]
+#define RSCAN0RMDF030LL RSCAN0.RMDF030.UINT8[LL]
+#define RSCAN0RMDF030LH RSCAN0.RMDF030.UINT8[LH]
+#define RSCAN0RMDF030H RSCAN0.RMDF030.UINT16[H]
+#define RSCAN0RMDF030HL RSCAN0.RMDF030.UINT8[HL]
+#define RSCAN0RMDF030HH RSCAN0.RMDF030.UINT8[HH]
+#define RSCAN0RMDF130 RSCAN0.RMDF130.UINT32
+#define RSCAN0RMDF130L RSCAN0.RMDF130.UINT16[L]
+#define RSCAN0RMDF130LL RSCAN0.RMDF130.UINT8[LL]
+#define RSCAN0RMDF130LH RSCAN0.RMDF130.UINT8[LH]
+#define RSCAN0RMDF130H RSCAN0.RMDF130.UINT16[H]
+#define RSCAN0RMDF130HL RSCAN0.RMDF130.UINT8[HL]
+#define RSCAN0RMDF130HH RSCAN0.RMDF130.UINT8[HH]
+#define RSCAN0RMID31 RSCAN0.RMID31.UINT32
+#define RSCAN0RMID31L RSCAN0.RMID31.UINT16[L]
+#define RSCAN0RMID31LL RSCAN0.RMID31.UINT8[LL]
+#define RSCAN0RMID31LH RSCAN0.RMID31.UINT8[LH]
+#define RSCAN0RMID31H RSCAN0.RMID31.UINT16[H]
+#define RSCAN0RMID31HL RSCAN0.RMID31.UINT8[HL]
+#define RSCAN0RMID31HH RSCAN0.RMID31.UINT8[HH]
+#define RSCAN0RMPTR31 RSCAN0.RMPTR31.UINT32
+#define RSCAN0RMPTR31L RSCAN0.RMPTR31.UINT16[L]
+#define RSCAN0RMPTR31LL RSCAN0.RMPTR31.UINT8[LL]
+#define RSCAN0RMPTR31LH RSCAN0.RMPTR31.UINT8[LH]
+#define RSCAN0RMPTR31H RSCAN0.RMPTR31.UINT16[H]
+#define RSCAN0RMPTR31HL RSCAN0.RMPTR31.UINT8[HL]
+#define RSCAN0RMPTR31HH RSCAN0.RMPTR31.UINT8[HH]
+#define RSCAN0RMDF031 RSCAN0.RMDF031.UINT32
+#define RSCAN0RMDF031L RSCAN0.RMDF031.UINT16[L]
+#define RSCAN0RMDF031LL RSCAN0.RMDF031.UINT8[LL]
+#define RSCAN0RMDF031LH RSCAN0.RMDF031.UINT8[LH]
+#define RSCAN0RMDF031H RSCAN0.RMDF031.UINT16[H]
+#define RSCAN0RMDF031HL RSCAN0.RMDF031.UINT8[HL]
+#define RSCAN0RMDF031HH RSCAN0.RMDF031.UINT8[HH]
+#define RSCAN0RMDF131 RSCAN0.RMDF131.UINT32
+#define RSCAN0RMDF131L RSCAN0.RMDF131.UINT16[L]
+#define RSCAN0RMDF131LL RSCAN0.RMDF131.UINT8[LL]
+#define RSCAN0RMDF131LH RSCAN0.RMDF131.UINT8[LH]
+#define RSCAN0RMDF131H RSCAN0.RMDF131.UINT16[H]
+#define RSCAN0RMDF131HL RSCAN0.RMDF131.UINT8[HL]
+#define RSCAN0RMDF131HH RSCAN0.RMDF131.UINT8[HH]
+#define RSCAN0RMID32 RSCAN0.RMID32.UINT32
+#define RSCAN0RMID32L RSCAN0.RMID32.UINT16[L]
+#define RSCAN0RMID32LL RSCAN0.RMID32.UINT8[LL]
+#define RSCAN0RMID32LH RSCAN0.RMID32.UINT8[LH]
+#define RSCAN0RMID32H RSCAN0.RMID32.UINT16[H]
+#define RSCAN0RMID32HL RSCAN0.RMID32.UINT8[HL]
+#define RSCAN0RMID32HH RSCAN0.RMID32.UINT8[HH]
+#define RSCAN0RMPTR32 RSCAN0.RMPTR32.UINT32
+#define RSCAN0RMPTR32L RSCAN0.RMPTR32.UINT16[L]
+#define RSCAN0RMPTR32LL RSCAN0.RMPTR32.UINT8[LL]
+#define RSCAN0RMPTR32LH RSCAN0.RMPTR32.UINT8[LH]
+#define RSCAN0RMPTR32H RSCAN0.RMPTR32.UINT16[H]
+#define RSCAN0RMPTR32HL RSCAN0.RMPTR32.UINT8[HL]
+#define RSCAN0RMPTR32HH RSCAN0.RMPTR32.UINT8[HH]
+#define RSCAN0RMDF032 RSCAN0.RMDF032.UINT32
+#define RSCAN0RMDF032L RSCAN0.RMDF032.UINT16[L]
+#define RSCAN0RMDF032LL RSCAN0.RMDF032.UINT8[LL]
+#define RSCAN0RMDF032LH RSCAN0.RMDF032.UINT8[LH]
+#define RSCAN0RMDF032H RSCAN0.RMDF032.UINT16[H]
+#define RSCAN0RMDF032HL RSCAN0.RMDF032.UINT8[HL]
+#define RSCAN0RMDF032HH RSCAN0.RMDF032.UINT8[HH]
+#define RSCAN0RMDF132 RSCAN0.RMDF132.UINT32
+#define RSCAN0RMDF132L RSCAN0.RMDF132.UINT16[L]
+#define RSCAN0RMDF132LL RSCAN0.RMDF132.UINT8[LL]
+#define RSCAN0RMDF132LH RSCAN0.RMDF132.UINT8[LH]
+#define RSCAN0RMDF132H RSCAN0.RMDF132.UINT16[H]
+#define RSCAN0RMDF132HL RSCAN0.RMDF132.UINT8[HL]
+#define RSCAN0RMDF132HH RSCAN0.RMDF132.UINT8[HH]
+#define RSCAN0RMID33 RSCAN0.RMID33.UINT32
+#define RSCAN0RMID33L RSCAN0.RMID33.UINT16[L]
+#define RSCAN0RMID33LL RSCAN0.RMID33.UINT8[LL]
+#define RSCAN0RMID33LH RSCAN0.RMID33.UINT8[LH]
+#define RSCAN0RMID33H RSCAN0.RMID33.UINT16[H]
+#define RSCAN0RMID33HL RSCAN0.RMID33.UINT8[HL]
+#define RSCAN0RMID33HH RSCAN0.RMID33.UINT8[HH]
+#define RSCAN0RMPTR33 RSCAN0.RMPTR33.UINT32
+#define RSCAN0RMPTR33L RSCAN0.RMPTR33.UINT16[L]
+#define RSCAN0RMPTR33LL RSCAN0.RMPTR33.UINT8[LL]
+#define RSCAN0RMPTR33LH RSCAN0.RMPTR33.UINT8[LH]
+#define RSCAN0RMPTR33H RSCAN0.RMPTR33.UINT16[H]
+#define RSCAN0RMPTR33HL RSCAN0.RMPTR33.UINT8[HL]
+#define RSCAN0RMPTR33HH RSCAN0.RMPTR33.UINT8[HH]
+#define RSCAN0RMDF033 RSCAN0.RMDF033.UINT32
+#define RSCAN0RMDF033L RSCAN0.RMDF033.UINT16[L]
+#define RSCAN0RMDF033LL RSCAN0.RMDF033.UINT8[LL]
+#define RSCAN0RMDF033LH RSCAN0.RMDF033.UINT8[LH]
+#define RSCAN0RMDF033H RSCAN0.RMDF033.UINT16[H]
+#define RSCAN0RMDF033HL RSCAN0.RMDF033.UINT8[HL]
+#define RSCAN0RMDF033HH RSCAN0.RMDF033.UINT8[HH]
+#define RSCAN0RMDF133 RSCAN0.RMDF133.UINT32
+#define RSCAN0RMDF133L RSCAN0.RMDF133.UINT16[L]
+#define RSCAN0RMDF133LL RSCAN0.RMDF133.UINT8[LL]
+#define RSCAN0RMDF133LH RSCAN0.RMDF133.UINT8[LH]
+#define RSCAN0RMDF133H RSCAN0.RMDF133.UINT16[H]
+#define RSCAN0RMDF133HL RSCAN0.RMDF133.UINT8[HL]
+#define RSCAN0RMDF133HH RSCAN0.RMDF133.UINT8[HH]
+#define RSCAN0RMID34 RSCAN0.RMID34.UINT32
+#define RSCAN0RMID34L RSCAN0.RMID34.UINT16[L]
+#define RSCAN0RMID34LL RSCAN0.RMID34.UINT8[LL]
+#define RSCAN0RMID34LH RSCAN0.RMID34.UINT8[LH]
+#define RSCAN0RMID34H RSCAN0.RMID34.UINT16[H]
+#define RSCAN0RMID34HL RSCAN0.RMID34.UINT8[HL]
+#define RSCAN0RMID34HH RSCAN0.RMID34.UINT8[HH]
+#define RSCAN0RMPTR34 RSCAN0.RMPTR34.UINT32
+#define RSCAN0RMPTR34L RSCAN0.RMPTR34.UINT16[L]
+#define RSCAN0RMPTR34LL RSCAN0.RMPTR34.UINT8[LL]
+#define RSCAN0RMPTR34LH RSCAN0.RMPTR34.UINT8[LH]
+#define RSCAN0RMPTR34H RSCAN0.RMPTR34.UINT16[H]
+#define RSCAN0RMPTR34HL RSCAN0.RMPTR34.UINT8[HL]
+#define RSCAN0RMPTR34HH RSCAN0.RMPTR34.UINT8[HH]
+#define RSCAN0RMDF034 RSCAN0.RMDF034.UINT32
+#define RSCAN0RMDF034L RSCAN0.RMDF034.UINT16[L]
+#define RSCAN0RMDF034LL RSCAN0.RMDF034.UINT8[LL]
+#define RSCAN0RMDF034LH RSCAN0.RMDF034.UINT8[LH]
+#define RSCAN0RMDF034H RSCAN0.RMDF034.UINT16[H]
+#define RSCAN0RMDF034HL RSCAN0.RMDF034.UINT8[HL]
+#define RSCAN0RMDF034HH RSCAN0.RMDF034.UINT8[HH]
+#define RSCAN0RMDF134 RSCAN0.RMDF134.UINT32
+#define RSCAN0RMDF134L RSCAN0.RMDF134.UINT16[L]
+#define RSCAN0RMDF134LL RSCAN0.RMDF134.UINT8[LL]
+#define RSCAN0RMDF134LH RSCAN0.RMDF134.UINT8[LH]
+#define RSCAN0RMDF134H RSCAN0.RMDF134.UINT16[H]
+#define RSCAN0RMDF134HL RSCAN0.RMDF134.UINT8[HL]
+#define RSCAN0RMDF134HH RSCAN0.RMDF134.UINT8[HH]
+#define RSCAN0RMID35 RSCAN0.RMID35.UINT32
+#define RSCAN0RMID35L RSCAN0.RMID35.UINT16[L]
+#define RSCAN0RMID35LL RSCAN0.RMID35.UINT8[LL]
+#define RSCAN0RMID35LH RSCAN0.RMID35.UINT8[LH]
+#define RSCAN0RMID35H RSCAN0.RMID35.UINT16[H]
+#define RSCAN0RMID35HL RSCAN0.RMID35.UINT8[HL]
+#define RSCAN0RMID35HH RSCAN0.RMID35.UINT8[HH]
+#define RSCAN0RMPTR35 RSCAN0.RMPTR35.UINT32
+#define RSCAN0RMPTR35L RSCAN0.RMPTR35.UINT16[L]
+#define RSCAN0RMPTR35LL RSCAN0.RMPTR35.UINT8[LL]
+#define RSCAN0RMPTR35LH RSCAN0.RMPTR35.UINT8[LH]
+#define RSCAN0RMPTR35H RSCAN0.RMPTR35.UINT16[H]
+#define RSCAN0RMPTR35HL RSCAN0.RMPTR35.UINT8[HL]
+#define RSCAN0RMPTR35HH RSCAN0.RMPTR35.UINT8[HH]
+#define RSCAN0RMDF035 RSCAN0.RMDF035.UINT32
+#define RSCAN0RMDF035L RSCAN0.RMDF035.UINT16[L]
+#define RSCAN0RMDF035LL RSCAN0.RMDF035.UINT8[LL]
+#define RSCAN0RMDF035LH RSCAN0.RMDF035.UINT8[LH]
+#define RSCAN0RMDF035H RSCAN0.RMDF035.UINT16[H]
+#define RSCAN0RMDF035HL RSCAN0.RMDF035.UINT8[HL]
+#define RSCAN0RMDF035HH RSCAN0.RMDF035.UINT8[HH]
+#define RSCAN0RMDF135 RSCAN0.RMDF135.UINT32
+#define RSCAN0RMDF135L RSCAN0.RMDF135.UINT16[L]
+#define RSCAN0RMDF135LL RSCAN0.RMDF135.UINT8[LL]
+#define RSCAN0RMDF135LH RSCAN0.RMDF135.UINT8[LH]
+#define RSCAN0RMDF135H RSCAN0.RMDF135.UINT16[H]
+#define RSCAN0RMDF135HL RSCAN0.RMDF135.UINT8[HL]
+#define RSCAN0RMDF135HH RSCAN0.RMDF135.UINT8[HH]
+#define RSCAN0RMID36 RSCAN0.RMID36.UINT32
+#define RSCAN0RMID36L RSCAN0.RMID36.UINT16[L]
+#define RSCAN0RMID36LL RSCAN0.RMID36.UINT8[LL]
+#define RSCAN0RMID36LH RSCAN0.RMID36.UINT8[LH]
+#define RSCAN0RMID36H RSCAN0.RMID36.UINT16[H]
+#define RSCAN0RMID36HL RSCAN0.RMID36.UINT8[HL]
+#define RSCAN0RMID36HH RSCAN0.RMID36.UINT8[HH]
+#define RSCAN0RMPTR36 RSCAN0.RMPTR36.UINT32
+#define RSCAN0RMPTR36L RSCAN0.RMPTR36.UINT16[L]
+#define RSCAN0RMPTR36LL RSCAN0.RMPTR36.UINT8[LL]
+#define RSCAN0RMPTR36LH RSCAN0.RMPTR36.UINT8[LH]
+#define RSCAN0RMPTR36H RSCAN0.RMPTR36.UINT16[H]
+#define RSCAN0RMPTR36HL RSCAN0.RMPTR36.UINT8[HL]
+#define RSCAN0RMPTR36HH RSCAN0.RMPTR36.UINT8[HH]
+#define RSCAN0RMDF036 RSCAN0.RMDF036.UINT32
+#define RSCAN0RMDF036L RSCAN0.RMDF036.UINT16[L]
+#define RSCAN0RMDF036LL RSCAN0.RMDF036.UINT8[LL]
+#define RSCAN0RMDF036LH RSCAN0.RMDF036.UINT8[LH]
+#define RSCAN0RMDF036H RSCAN0.RMDF036.UINT16[H]
+#define RSCAN0RMDF036HL RSCAN0.RMDF036.UINT8[HL]
+#define RSCAN0RMDF036HH RSCAN0.RMDF036.UINT8[HH]
+#define RSCAN0RMDF136 RSCAN0.RMDF136.UINT32
+#define RSCAN0RMDF136L RSCAN0.RMDF136.UINT16[L]
+#define RSCAN0RMDF136LL RSCAN0.RMDF136.UINT8[LL]
+#define RSCAN0RMDF136LH RSCAN0.RMDF136.UINT8[LH]
+#define RSCAN0RMDF136H RSCAN0.RMDF136.UINT16[H]
+#define RSCAN0RMDF136HL RSCAN0.RMDF136.UINT8[HL]
+#define RSCAN0RMDF136HH RSCAN0.RMDF136.UINT8[HH]
+#define RSCAN0RMID37 RSCAN0.RMID37.UINT32
+#define RSCAN0RMID37L RSCAN0.RMID37.UINT16[L]
+#define RSCAN0RMID37LL RSCAN0.RMID37.UINT8[LL]
+#define RSCAN0RMID37LH RSCAN0.RMID37.UINT8[LH]
+#define RSCAN0RMID37H RSCAN0.RMID37.UINT16[H]
+#define RSCAN0RMID37HL RSCAN0.RMID37.UINT8[HL]
+#define RSCAN0RMID37HH RSCAN0.RMID37.UINT8[HH]
+#define RSCAN0RMPTR37 RSCAN0.RMPTR37.UINT32
+#define RSCAN0RMPTR37L RSCAN0.RMPTR37.UINT16[L]
+#define RSCAN0RMPTR37LL RSCAN0.RMPTR37.UINT8[LL]
+#define RSCAN0RMPTR37LH RSCAN0.RMPTR37.UINT8[LH]
+#define RSCAN0RMPTR37H RSCAN0.RMPTR37.UINT16[H]
+#define RSCAN0RMPTR37HL RSCAN0.RMPTR37.UINT8[HL]
+#define RSCAN0RMPTR37HH RSCAN0.RMPTR37.UINT8[HH]
+#define RSCAN0RMDF037 RSCAN0.RMDF037.UINT32
+#define RSCAN0RMDF037L RSCAN0.RMDF037.UINT16[L]
+#define RSCAN0RMDF037LL RSCAN0.RMDF037.UINT8[LL]
+#define RSCAN0RMDF037LH RSCAN0.RMDF037.UINT8[LH]
+#define RSCAN0RMDF037H RSCAN0.RMDF037.UINT16[H]
+#define RSCAN0RMDF037HL RSCAN0.RMDF037.UINT8[HL]
+#define RSCAN0RMDF037HH RSCAN0.RMDF037.UINT8[HH]
+#define RSCAN0RMDF137 RSCAN0.RMDF137.UINT32
+#define RSCAN0RMDF137L RSCAN0.RMDF137.UINT16[L]
+#define RSCAN0RMDF137LL RSCAN0.RMDF137.UINT8[LL]
+#define RSCAN0RMDF137LH RSCAN0.RMDF137.UINT8[LH]
+#define RSCAN0RMDF137H RSCAN0.RMDF137.UINT16[H]
+#define RSCAN0RMDF137HL RSCAN0.RMDF137.UINT8[HL]
+#define RSCAN0RMDF137HH RSCAN0.RMDF137.UINT8[HH]
+#define RSCAN0RMID38 RSCAN0.RMID38.UINT32
+#define RSCAN0RMID38L RSCAN0.RMID38.UINT16[L]
+#define RSCAN0RMID38LL RSCAN0.RMID38.UINT8[LL]
+#define RSCAN0RMID38LH RSCAN0.RMID38.UINT8[LH]
+#define RSCAN0RMID38H RSCAN0.RMID38.UINT16[H]
+#define RSCAN0RMID38HL RSCAN0.RMID38.UINT8[HL]
+#define RSCAN0RMID38HH RSCAN0.RMID38.UINT8[HH]
+#define RSCAN0RMPTR38 RSCAN0.RMPTR38.UINT32
+#define RSCAN0RMPTR38L RSCAN0.RMPTR38.UINT16[L]
+#define RSCAN0RMPTR38LL RSCAN0.RMPTR38.UINT8[LL]
+#define RSCAN0RMPTR38LH RSCAN0.RMPTR38.UINT8[LH]
+#define RSCAN0RMPTR38H RSCAN0.RMPTR38.UINT16[H]
+#define RSCAN0RMPTR38HL RSCAN0.RMPTR38.UINT8[HL]
+#define RSCAN0RMPTR38HH RSCAN0.RMPTR38.UINT8[HH]
+#define RSCAN0RMDF038 RSCAN0.RMDF038.UINT32
+#define RSCAN0RMDF038L RSCAN0.RMDF038.UINT16[L]
+#define RSCAN0RMDF038LL RSCAN0.RMDF038.UINT8[LL]
+#define RSCAN0RMDF038LH RSCAN0.RMDF038.UINT8[LH]
+#define RSCAN0RMDF038H RSCAN0.RMDF038.UINT16[H]
+#define RSCAN0RMDF038HL RSCAN0.RMDF038.UINT8[HL]
+#define RSCAN0RMDF038HH RSCAN0.RMDF038.UINT8[HH]
+#define RSCAN0RMDF138 RSCAN0.RMDF138.UINT32
+#define RSCAN0RMDF138L RSCAN0.RMDF138.UINT16[L]
+#define RSCAN0RMDF138LL RSCAN0.RMDF138.UINT8[LL]
+#define RSCAN0RMDF138LH RSCAN0.RMDF138.UINT8[LH]
+#define RSCAN0RMDF138H RSCAN0.RMDF138.UINT16[H]
+#define RSCAN0RMDF138HL RSCAN0.RMDF138.UINT8[HL]
+#define RSCAN0RMDF138HH RSCAN0.RMDF138.UINT8[HH]
+#define RSCAN0RMID39 RSCAN0.RMID39.UINT32
+#define RSCAN0RMID39L RSCAN0.RMID39.UINT16[L]
+#define RSCAN0RMID39LL RSCAN0.RMID39.UINT8[LL]
+#define RSCAN0RMID39LH RSCAN0.RMID39.UINT8[LH]
+#define RSCAN0RMID39H RSCAN0.RMID39.UINT16[H]
+#define RSCAN0RMID39HL RSCAN0.RMID39.UINT8[HL]
+#define RSCAN0RMID39HH RSCAN0.RMID39.UINT8[HH]
+#define RSCAN0RMPTR39 RSCAN0.RMPTR39.UINT32
+#define RSCAN0RMPTR39L RSCAN0.RMPTR39.UINT16[L]
+#define RSCAN0RMPTR39LL RSCAN0.RMPTR39.UINT8[LL]
+#define RSCAN0RMPTR39LH RSCAN0.RMPTR39.UINT8[LH]
+#define RSCAN0RMPTR39H RSCAN0.RMPTR39.UINT16[H]
+#define RSCAN0RMPTR39HL RSCAN0.RMPTR39.UINT8[HL]
+#define RSCAN0RMPTR39HH RSCAN0.RMPTR39.UINT8[HH]
+#define RSCAN0RMDF039 RSCAN0.RMDF039.UINT32
+#define RSCAN0RMDF039L RSCAN0.RMDF039.UINT16[L]
+#define RSCAN0RMDF039LL RSCAN0.RMDF039.UINT8[LL]
+#define RSCAN0RMDF039LH RSCAN0.RMDF039.UINT8[LH]
+#define RSCAN0RMDF039H RSCAN0.RMDF039.UINT16[H]
+#define RSCAN0RMDF039HL RSCAN0.RMDF039.UINT8[HL]
+#define RSCAN0RMDF039HH RSCAN0.RMDF039.UINT8[HH]
+#define RSCAN0RMDF139 RSCAN0.RMDF139.UINT32
+#define RSCAN0RMDF139L RSCAN0.RMDF139.UINT16[L]
+#define RSCAN0RMDF139LL RSCAN0.RMDF139.UINT8[LL]
+#define RSCAN0RMDF139LH RSCAN0.RMDF139.UINT8[LH]
+#define RSCAN0RMDF139H RSCAN0.RMDF139.UINT16[H]
+#define RSCAN0RMDF139HL RSCAN0.RMDF139.UINT8[HL]
+#define RSCAN0RMDF139HH RSCAN0.RMDF139.UINT8[HH]
+#define RSCAN0RMID40 RSCAN0.RMID40.UINT32
+#define RSCAN0RMID40L RSCAN0.RMID40.UINT16[L]
+#define RSCAN0RMID40LL RSCAN0.RMID40.UINT8[LL]
+#define RSCAN0RMID40LH RSCAN0.RMID40.UINT8[LH]
+#define RSCAN0RMID40H RSCAN0.RMID40.UINT16[H]
+#define RSCAN0RMID40HL RSCAN0.RMID40.UINT8[HL]
+#define RSCAN0RMID40HH RSCAN0.RMID40.UINT8[HH]
+#define RSCAN0RMPTR40 RSCAN0.RMPTR40.UINT32
+#define RSCAN0RMPTR40L RSCAN0.RMPTR40.UINT16[L]
+#define RSCAN0RMPTR40LL RSCAN0.RMPTR40.UINT8[LL]
+#define RSCAN0RMPTR40LH RSCAN0.RMPTR40.UINT8[LH]
+#define RSCAN0RMPTR40H RSCAN0.RMPTR40.UINT16[H]
+#define RSCAN0RMPTR40HL RSCAN0.RMPTR40.UINT8[HL]
+#define RSCAN0RMPTR40HH RSCAN0.RMPTR40.UINT8[HH]
+#define RSCAN0RMDF040 RSCAN0.RMDF040.UINT32
+#define RSCAN0RMDF040L RSCAN0.RMDF040.UINT16[L]
+#define RSCAN0RMDF040LL RSCAN0.RMDF040.UINT8[LL]
+#define RSCAN0RMDF040LH RSCAN0.RMDF040.UINT8[LH]
+#define RSCAN0RMDF040H RSCAN0.RMDF040.UINT16[H]
+#define RSCAN0RMDF040HL RSCAN0.RMDF040.UINT8[HL]
+#define RSCAN0RMDF040HH RSCAN0.RMDF040.UINT8[HH]
+#define RSCAN0RMDF140 RSCAN0.RMDF140.UINT32
+#define RSCAN0RMDF140L RSCAN0.RMDF140.UINT16[L]
+#define RSCAN0RMDF140LL RSCAN0.RMDF140.UINT8[LL]
+#define RSCAN0RMDF140LH RSCAN0.RMDF140.UINT8[LH]
+#define RSCAN0RMDF140H RSCAN0.RMDF140.UINT16[H]
+#define RSCAN0RMDF140HL RSCAN0.RMDF140.UINT8[HL]
+#define RSCAN0RMDF140HH RSCAN0.RMDF140.UINT8[HH]
+#define RSCAN0RMID41 RSCAN0.RMID41.UINT32
+#define RSCAN0RMID41L RSCAN0.RMID41.UINT16[L]
+#define RSCAN0RMID41LL RSCAN0.RMID41.UINT8[LL]
+#define RSCAN0RMID41LH RSCAN0.RMID41.UINT8[LH]
+#define RSCAN0RMID41H RSCAN0.RMID41.UINT16[H]
+#define RSCAN0RMID41HL RSCAN0.RMID41.UINT8[HL]
+#define RSCAN0RMID41HH RSCAN0.RMID41.UINT8[HH]
+#define RSCAN0RMPTR41 RSCAN0.RMPTR41.UINT32
+#define RSCAN0RMPTR41L RSCAN0.RMPTR41.UINT16[L]
+#define RSCAN0RMPTR41LL RSCAN0.RMPTR41.UINT8[LL]
+#define RSCAN0RMPTR41LH RSCAN0.RMPTR41.UINT8[LH]
+#define RSCAN0RMPTR41H RSCAN0.RMPTR41.UINT16[H]
+#define RSCAN0RMPTR41HL RSCAN0.RMPTR41.UINT8[HL]
+#define RSCAN0RMPTR41HH RSCAN0.RMPTR41.UINT8[HH]
+#define RSCAN0RMDF041 RSCAN0.RMDF041.UINT32
+#define RSCAN0RMDF041L RSCAN0.RMDF041.UINT16[L]
+#define RSCAN0RMDF041LL RSCAN0.RMDF041.UINT8[LL]
+#define RSCAN0RMDF041LH RSCAN0.RMDF041.UINT8[LH]
+#define RSCAN0RMDF041H RSCAN0.RMDF041.UINT16[H]
+#define RSCAN0RMDF041HL RSCAN0.RMDF041.UINT8[HL]
+#define RSCAN0RMDF041HH RSCAN0.RMDF041.UINT8[HH]
+#define RSCAN0RMDF141 RSCAN0.RMDF141.UINT32
+#define RSCAN0RMDF141L RSCAN0.RMDF141.UINT16[L]
+#define RSCAN0RMDF141LL RSCAN0.RMDF141.UINT8[LL]
+#define RSCAN0RMDF141LH RSCAN0.RMDF141.UINT8[LH]
+#define RSCAN0RMDF141H RSCAN0.RMDF141.UINT16[H]
+#define RSCAN0RMDF141HL RSCAN0.RMDF141.UINT8[HL]
+#define RSCAN0RMDF141HH RSCAN0.RMDF141.UINT8[HH]
+#define RSCAN0RMID42 RSCAN0.RMID42.UINT32
+#define RSCAN0RMID42L RSCAN0.RMID42.UINT16[L]
+#define RSCAN0RMID42LL RSCAN0.RMID42.UINT8[LL]
+#define RSCAN0RMID42LH RSCAN0.RMID42.UINT8[LH]
+#define RSCAN0RMID42H RSCAN0.RMID42.UINT16[H]
+#define RSCAN0RMID42HL RSCAN0.RMID42.UINT8[HL]
+#define RSCAN0RMID42HH RSCAN0.RMID42.UINT8[HH]
+#define RSCAN0RMPTR42 RSCAN0.RMPTR42.UINT32
+#define RSCAN0RMPTR42L RSCAN0.RMPTR42.UINT16[L]
+#define RSCAN0RMPTR42LL RSCAN0.RMPTR42.UINT8[LL]
+#define RSCAN0RMPTR42LH RSCAN0.RMPTR42.UINT8[LH]
+#define RSCAN0RMPTR42H RSCAN0.RMPTR42.UINT16[H]
+#define RSCAN0RMPTR42HL RSCAN0.RMPTR42.UINT8[HL]
+#define RSCAN0RMPTR42HH RSCAN0.RMPTR42.UINT8[HH]
+#define RSCAN0RMDF042 RSCAN0.RMDF042.UINT32
+#define RSCAN0RMDF042L RSCAN0.RMDF042.UINT16[L]
+#define RSCAN0RMDF042LL RSCAN0.RMDF042.UINT8[LL]
+#define RSCAN0RMDF042LH RSCAN0.RMDF042.UINT8[LH]
+#define RSCAN0RMDF042H RSCAN0.RMDF042.UINT16[H]
+#define RSCAN0RMDF042HL RSCAN0.RMDF042.UINT8[HL]
+#define RSCAN0RMDF042HH RSCAN0.RMDF042.UINT8[HH]
+#define RSCAN0RMDF142 RSCAN0.RMDF142.UINT32
+#define RSCAN0RMDF142L RSCAN0.RMDF142.UINT16[L]
+#define RSCAN0RMDF142LL RSCAN0.RMDF142.UINT8[LL]
+#define RSCAN0RMDF142LH RSCAN0.RMDF142.UINT8[LH]
+#define RSCAN0RMDF142H RSCAN0.RMDF142.UINT16[H]
+#define RSCAN0RMDF142HL RSCAN0.RMDF142.UINT8[HL]
+#define RSCAN0RMDF142HH RSCAN0.RMDF142.UINT8[HH]
+#define RSCAN0RMID43 RSCAN0.RMID43.UINT32
+#define RSCAN0RMID43L RSCAN0.RMID43.UINT16[L]
+#define RSCAN0RMID43LL RSCAN0.RMID43.UINT8[LL]
+#define RSCAN0RMID43LH RSCAN0.RMID43.UINT8[LH]
+#define RSCAN0RMID43H RSCAN0.RMID43.UINT16[H]
+#define RSCAN0RMID43HL RSCAN0.RMID43.UINT8[HL]
+#define RSCAN0RMID43HH RSCAN0.RMID43.UINT8[HH]
+#define RSCAN0RMPTR43 RSCAN0.RMPTR43.UINT32
+#define RSCAN0RMPTR43L RSCAN0.RMPTR43.UINT16[L]
+#define RSCAN0RMPTR43LL RSCAN0.RMPTR43.UINT8[LL]
+#define RSCAN0RMPTR43LH RSCAN0.RMPTR43.UINT8[LH]
+#define RSCAN0RMPTR43H RSCAN0.RMPTR43.UINT16[H]
+#define RSCAN0RMPTR43HL RSCAN0.RMPTR43.UINT8[HL]
+#define RSCAN0RMPTR43HH RSCAN0.RMPTR43.UINT8[HH]
+#define RSCAN0RMDF043 RSCAN0.RMDF043.UINT32
+#define RSCAN0RMDF043L RSCAN0.RMDF043.UINT16[L]
+#define RSCAN0RMDF043LL RSCAN0.RMDF043.UINT8[LL]
+#define RSCAN0RMDF043LH RSCAN0.RMDF043.UINT8[LH]
+#define RSCAN0RMDF043H RSCAN0.RMDF043.UINT16[H]
+#define RSCAN0RMDF043HL RSCAN0.RMDF043.UINT8[HL]
+#define RSCAN0RMDF043HH RSCAN0.RMDF043.UINT8[HH]
+#define RSCAN0RMDF143 RSCAN0.RMDF143.UINT32
+#define RSCAN0RMDF143L RSCAN0.RMDF143.UINT16[L]
+#define RSCAN0RMDF143LL RSCAN0.RMDF143.UINT8[LL]
+#define RSCAN0RMDF143LH RSCAN0.RMDF143.UINT8[LH]
+#define RSCAN0RMDF143H RSCAN0.RMDF143.UINT16[H]
+#define RSCAN0RMDF143HL RSCAN0.RMDF143.UINT8[HL]
+#define RSCAN0RMDF143HH RSCAN0.RMDF143.UINT8[HH]
+#define RSCAN0RMID44 RSCAN0.RMID44.UINT32
+#define RSCAN0RMID44L RSCAN0.RMID44.UINT16[L]
+#define RSCAN0RMID44LL RSCAN0.RMID44.UINT8[LL]
+#define RSCAN0RMID44LH RSCAN0.RMID44.UINT8[LH]
+#define RSCAN0RMID44H RSCAN0.RMID44.UINT16[H]
+#define RSCAN0RMID44HL RSCAN0.RMID44.UINT8[HL]
+#define RSCAN0RMID44HH RSCAN0.RMID44.UINT8[HH]
+#define RSCAN0RMPTR44 RSCAN0.RMPTR44.UINT32
+#define RSCAN0RMPTR44L RSCAN0.RMPTR44.UINT16[L]
+#define RSCAN0RMPTR44LL RSCAN0.RMPTR44.UINT8[LL]
+#define RSCAN0RMPTR44LH RSCAN0.RMPTR44.UINT8[LH]
+#define RSCAN0RMPTR44H RSCAN0.RMPTR44.UINT16[H]
+#define RSCAN0RMPTR44HL RSCAN0.RMPTR44.UINT8[HL]
+#define RSCAN0RMPTR44HH RSCAN0.RMPTR44.UINT8[HH]
+#define RSCAN0RMDF044 RSCAN0.RMDF044.UINT32
+#define RSCAN0RMDF044L RSCAN0.RMDF044.UINT16[L]
+#define RSCAN0RMDF044LL RSCAN0.RMDF044.UINT8[LL]
+#define RSCAN0RMDF044LH RSCAN0.RMDF044.UINT8[LH]
+#define RSCAN0RMDF044H RSCAN0.RMDF044.UINT16[H]
+#define RSCAN0RMDF044HL RSCAN0.RMDF044.UINT8[HL]
+#define RSCAN0RMDF044HH RSCAN0.RMDF044.UINT8[HH]
+#define RSCAN0RMDF144 RSCAN0.RMDF144.UINT32
+#define RSCAN0RMDF144L RSCAN0.RMDF144.UINT16[L]
+#define RSCAN0RMDF144LL RSCAN0.RMDF144.UINT8[LL]
+#define RSCAN0RMDF144LH RSCAN0.RMDF144.UINT8[LH]
+#define RSCAN0RMDF144H RSCAN0.RMDF144.UINT16[H]
+#define RSCAN0RMDF144HL RSCAN0.RMDF144.UINT8[HL]
+#define RSCAN0RMDF144HH RSCAN0.RMDF144.UINT8[HH]
+#define RSCAN0RMID45 RSCAN0.RMID45.UINT32
+#define RSCAN0RMID45L RSCAN0.RMID45.UINT16[L]
+#define RSCAN0RMID45LL RSCAN0.RMID45.UINT8[LL]
+#define RSCAN0RMID45LH RSCAN0.RMID45.UINT8[LH]
+#define RSCAN0RMID45H RSCAN0.RMID45.UINT16[H]
+#define RSCAN0RMID45HL RSCAN0.RMID45.UINT8[HL]
+#define RSCAN0RMID45HH RSCAN0.RMID45.UINT8[HH]
+#define RSCAN0RMPTR45 RSCAN0.RMPTR45.UINT32
+#define RSCAN0RMPTR45L RSCAN0.RMPTR45.UINT16[L]
+#define RSCAN0RMPTR45LL RSCAN0.RMPTR45.UINT8[LL]
+#define RSCAN0RMPTR45LH RSCAN0.RMPTR45.UINT8[LH]
+#define RSCAN0RMPTR45H RSCAN0.RMPTR45.UINT16[H]
+#define RSCAN0RMPTR45HL RSCAN0.RMPTR45.UINT8[HL]
+#define RSCAN0RMPTR45HH RSCAN0.RMPTR45.UINT8[HH]
+#define RSCAN0RMDF045 RSCAN0.RMDF045.UINT32
+#define RSCAN0RMDF045L RSCAN0.RMDF045.UINT16[L]
+#define RSCAN0RMDF045LL RSCAN0.RMDF045.UINT8[LL]
+#define RSCAN0RMDF045LH RSCAN0.RMDF045.UINT8[LH]
+#define RSCAN0RMDF045H RSCAN0.RMDF045.UINT16[H]
+#define RSCAN0RMDF045HL RSCAN0.RMDF045.UINT8[HL]
+#define RSCAN0RMDF045HH RSCAN0.RMDF045.UINT8[HH]
+#define RSCAN0RMDF145 RSCAN0.RMDF145.UINT32
+#define RSCAN0RMDF145L RSCAN0.RMDF145.UINT16[L]
+#define RSCAN0RMDF145LL RSCAN0.RMDF145.UINT8[LL]
+#define RSCAN0RMDF145LH RSCAN0.RMDF145.UINT8[LH]
+#define RSCAN0RMDF145H RSCAN0.RMDF145.UINT16[H]
+#define RSCAN0RMDF145HL RSCAN0.RMDF145.UINT8[HL]
+#define RSCAN0RMDF145HH RSCAN0.RMDF145.UINT8[HH]
+#define RSCAN0RMID46 RSCAN0.RMID46.UINT32
+#define RSCAN0RMID46L RSCAN0.RMID46.UINT16[L]
+#define RSCAN0RMID46LL RSCAN0.RMID46.UINT8[LL]
+#define RSCAN0RMID46LH RSCAN0.RMID46.UINT8[LH]
+#define RSCAN0RMID46H RSCAN0.RMID46.UINT16[H]
+#define RSCAN0RMID46HL RSCAN0.RMID46.UINT8[HL]
+#define RSCAN0RMID46HH RSCAN0.RMID46.UINT8[HH]
+#define RSCAN0RMPTR46 RSCAN0.RMPTR46.UINT32
+#define RSCAN0RMPTR46L RSCAN0.RMPTR46.UINT16[L]
+#define RSCAN0RMPTR46LL RSCAN0.RMPTR46.UINT8[LL]
+#define RSCAN0RMPTR46LH RSCAN0.RMPTR46.UINT8[LH]
+#define RSCAN0RMPTR46H RSCAN0.RMPTR46.UINT16[H]
+#define RSCAN0RMPTR46HL RSCAN0.RMPTR46.UINT8[HL]
+#define RSCAN0RMPTR46HH RSCAN0.RMPTR46.UINT8[HH]
+#define RSCAN0RMDF046 RSCAN0.RMDF046.UINT32
+#define RSCAN0RMDF046L RSCAN0.RMDF046.UINT16[L]
+#define RSCAN0RMDF046LL RSCAN0.RMDF046.UINT8[LL]
+#define RSCAN0RMDF046LH RSCAN0.RMDF046.UINT8[LH]
+#define RSCAN0RMDF046H RSCAN0.RMDF046.UINT16[H]
+#define RSCAN0RMDF046HL RSCAN0.RMDF046.UINT8[HL]
+#define RSCAN0RMDF046HH RSCAN0.RMDF046.UINT8[HH]
+#define RSCAN0RMDF146 RSCAN0.RMDF146.UINT32
+#define RSCAN0RMDF146L RSCAN0.RMDF146.UINT16[L]
+#define RSCAN0RMDF146LL RSCAN0.RMDF146.UINT8[LL]
+#define RSCAN0RMDF146LH RSCAN0.RMDF146.UINT8[LH]
+#define RSCAN0RMDF146H RSCAN0.RMDF146.UINT16[H]
+#define RSCAN0RMDF146HL RSCAN0.RMDF146.UINT8[HL]
+#define RSCAN0RMDF146HH RSCAN0.RMDF146.UINT8[HH]
+#define RSCAN0RMID47 RSCAN0.RMID47.UINT32
+#define RSCAN0RMID47L RSCAN0.RMID47.UINT16[L]
+#define RSCAN0RMID47LL RSCAN0.RMID47.UINT8[LL]
+#define RSCAN0RMID47LH RSCAN0.RMID47.UINT8[LH]
+#define RSCAN0RMID47H RSCAN0.RMID47.UINT16[H]
+#define RSCAN0RMID47HL RSCAN0.RMID47.UINT8[HL]
+#define RSCAN0RMID47HH RSCAN0.RMID47.UINT8[HH]
+#define RSCAN0RMPTR47 RSCAN0.RMPTR47.UINT32
+#define RSCAN0RMPTR47L RSCAN0.RMPTR47.UINT16[L]
+#define RSCAN0RMPTR47LL RSCAN0.RMPTR47.UINT8[LL]
+#define RSCAN0RMPTR47LH RSCAN0.RMPTR47.UINT8[LH]
+#define RSCAN0RMPTR47H RSCAN0.RMPTR47.UINT16[H]
+#define RSCAN0RMPTR47HL RSCAN0.RMPTR47.UINT8[HL]
+#define RSCAN0RMPTR47HH RSCAN0.RMPTR47.UINT8[HH]
+#define RSCAN0RMDF047 RSCAN0.RMDF047.UINT32
+#define RSCAN0RMDF047L RSCAN0.RMDF047.UINT16[L]
+#define RSCAN0RMDF047LL RSCAN0.RMDF047.UINT8[LL]
+#define RSCAN0RMDF047LH RSCAN0.RMDF047.UINT8[LH]
+#define RSCAN0RMDF047H RSCAN0.RMDF047.UINT16[H]
+#define RSCAN0RMDF047HL RSCAN0.RMDF047.UINT8[HL]
+#define RSCAN0RMDF047HH RSCAN0.RMDF047.UINT8[HH]
+#define RSCAN0RMDF147 RSCAN0.RMDF147.UINT32
+#define RSCAN0RMDF147L RSCAN0.RMDF147.UINT16[L]
+#define RSCAN0RMDF147LL RSCAN0.RMDF147.UINT8[LL]
+#define RSCAN0RMDF147LH RSCAN0.RMDF147.UINT8[LH]
+#define RSCAN0RMDF147H RSCAN0.RMDF147.UINT16[H]
+#define RSCAN0RMDF147HL RSCAN0.RMDF147.UINT8[HL]
+#define RSCAN0RMDF147HH RSCAN0.RMDF147.UINT8[HH]
+#define RSCAN0RMID48 RSCAN0.RMID48.UINT32
+#define RSCAN0RMID48L RSCAN0.RMID48.UINT16[L]
+#define RSCAN0RMID48LL RSCAN0.RMID48.UINT8[LL]
+#define RSCAN0RMID48LH RSCAN0.RMID48.UINT8[LH]
+#define RSCAN0RMID48H RSCAN0.RMID48.UINT16[H]
+#define RSCAN0RMID48HL RSCAN0.RMID48.UINT8[HL]
+#define RSCAN0RMID48HH RSCAN0.RMID48.UINT8[HH]
+#define RSCAN0RMPTR48 RSCAN0.RMPTR48.UINT32
+#define RSCAN0RMPTR48L RSCAN0.RMPTR48.UINT16[L]
+#define RSCAN0RMPTR48LL RSCAN0.RMPTR48.UINT8[LL]
+#define RSCAN0RMPTR48LH RSCAN0.RMPTR48.UINT8[LH]
+#define RSCAN0RMPTR48H RSCAN0.RMPTR48.UINT16[H]
+#define RSCAN0RMPTR48HL RSCAN0.RMPTR48.UINT8[HL]
+#define RSCAN0RMPTR48HH RSCAN0.RMPTR48.UINT8[HH]
+#define RSCAN0RMDF048 RSCAN0.RMDF048.UINT32
+#define RSCAN0RMDF048L RSCAN0.RMDF048.UINT16[L]
+#define RSCAN0RMDF048LL RSCAN0.RMDF048.UINT8[LL]
+#define RSCAN0RMDF048LH RSCAN0.RMDF048.UINT8[LH]
+#define RSCAN0RMDF048H RSCAN0.RMDF048.UINT16[H]
+#define RSCAN0RMDF048HL RSCAN0.RMDF048.UINT8[HL]
+#define RSCAN0RMDF048HH RSCAN0.RMDF048.UINT8[HH]
+#define RSCAN0RMDF148 RSCAN0.RMDF148.UINT32
+#define RSCAN0RMDF148L RSCAN0.RMDF148.UINT16[L]
+#define RSCAN0RMDF148LL RSCAN0.RMDF148.UINT8[LL]
+#define RSCAN0RMDF148LH RSCAN0.RMDF148.UINT8[LH]
+#define RSCAN0RMDF148H RSCAN0.RMDF148.UINT16[H]
+#define RSCAN0RMDF148HL RSCAN0.RMDF148.UINT8[HL]
+#define RSCAN0RMDF148HH RSCAN0.RMDF148.UINT8[HH]
+#define RSCAN0RMID49 RSCAN0.RMID49.UINT32
+#define RSCAN0RMID49L RSCAN0.RMID49.UINT16[L]
+#define RSCAN0RMID49LL RSCAN0.RMID49.UINT8[LL]
+#define RSCAN0RMID49LH RSCAN0.RMID49.UINT8[LH]
+#define RSCAN0RMID49H RSCAN0.RMID49.UINT16[H]
+#define RSCAN0RMID49HL RSCAN0.RMID49.UINT8[HL]
+#define RSCAN0RMID49HH RSCAN0.RMID49.UINT8[HH]
+#define RSCAN0RMPTR49 RSCAN0.RMPTR49.UINT32
+#define RSCAN0RMPTR49L RSCAN0.RMPTR49.UINT16[L]
+#define RSCAN0RMPTR49LL RSCAN0.RMPTR49.UINT8[LL]
+#define RSCAN0RMPTR49LH RSCAN0.RMPTR49.UINT8[LH]
+#define RSCAN0RMPTR49H RSCAN0.RMPTR49.UINT16[H]
+#define RSCAN0RMPTR49HL RSCAN0.RMPTR49.UINT8[HL]
+#define RSCAN0RMPTR49HH RSCAN0.RMPTR49.UINT8[HH]
+#define RSCAN0RMDF049 RSCAN0.RMDF049.UINT32
+#define RSCAN0RMDF049L RSCAN0.RMDF049.UINT16[L]
+#define RSCAN0RMDF049LL RSCAN0.RMDF049.UINT8[LL]
+#define RSCAN0RMDF049LH RSCAN0.RMDF049.UINT8[LH]
+#define RSCAN0RMDF049H RSCAN0.RMDF049.UINT16[H]
+#define RSCAN0RMDF049HL RSCAN0.RMDF049.UINT8[HL]
+#define RSCAN0RMDF049HH RSCAN0.RMDF049.UINT8[HH]
+#define RSCAN0RMDF149 RSCAN0.RMDF149.UINT32
+#define RSCAN0RMDF149L RSCAN0.RMDF149.UINT16[L]
+#define RSCAN0RMDF149LL RSCAN0.RMDF149.UINT8[LL]
+#define RSCAN0RMDF149LH RSCAN0.RMDF149.UINT8[LH]
+#define RSCAN0RMDF149H RSCAN0.RMDF149.UINT16[H]
+#define RSCAN0RMDF149HL RSCAN0.RMDF149.UINT8[HL]
+#define RSCAN0RMDF149HH RSCAN0.RMDF149.UINT8[HH]
+#define RSCAN0RMID50 RSCAN0.RMID50.UINT32
+#define RSCAN0RMID50L RSCAN0.RMID50.UINT16[L]
+#define RSCAN0RMID50LL RSCAN0.RMID50.UINT8[LL]
+#define RSCAN0RMID50LH RSCAN0.RMID50.UINT8[LH]
+#define RSCAN0RMID50H RSCAN0.RMID50.UINT16[H]
+#define RSCAN0RMID50HL RSCAN0.RMID50.UINT8[HL]
+#define RSCAN0RMID50HH RSCAN0.RMID50.UINT8[HH]
+#define RSCAN0RMPTR50 RSCAN0.RMPTR50.UINT32
+#define RSCAN0RMPTR50L RSCAN0.RMPTR50.UINT16[L]
+#define RSCAN0RMPTR50LL RSCAN0.RMPTR50.UINT8[LL]
+#define RSCAN0RMPTR50LH RSCAN0.RMPTR50.UINT8[LH]
+#define RSCAN0RMPTR50H RSCAN0.RMPTR50.UINT16[H]
+#define RSCAN0RMPTR50HL RSCAN0.RMPTR50.UINT8[HL]
+#define RSCAN0RMPTR50HH RSCAN0.RMPTR50.UINT8[HH]
+#define RSCAN0RMDF050 RSCAN0.RMDF050.UINT32
+#define RSCAN0RMDF050L RSCAN0.RMDF050.UINT16[L]
+#define RSCAN0RMDF050LL RSCAN0.RMDF050.UINT8[LL]
+#define RSCAN0RMDF050LH RSCAN0.RMDF050.UINT8[LH]
+#define RSCAN0RMDF050H RSCAN0.RMDF050.UINT16[H]
+#define RSCAN0RMDF050HL RSCAN0.RMDF050.UINT8[HL]
+#define RSCAN0RMDF050HH RSCAN0.RMDF050.UINT8[HH]
+#define RSCAN0RMDF150 RSCAN0.RMDF150.UINT32
+#define RSCAN0RMDF150L RSCAN0.RMDF150.UINT16[L]
+#define RSCAN0RMDF150LL RSCAN0.RMDF150.UINT8[LL]
+#define RSCAN0RMDF150LH RSCAN0.RMDF150.UINT8[LH]
+#define RSCAN0RMDF150H RSCAN0.RMDF150.UINT16[H]
+#define RSCAN0RMDF150HL RSCAN0.RMDF150.UINT8[HL]
+#define RSCAN0RMDF150HH RSCAN0.RMDF150.UINT8[HH]
+#define RSCAN0RMID51 RSCAN0.RMID51.UINT32
+#define RSCAN0RMID51L RSCAN0.RMID51.UINT16[L]
+#define RSCAN0RMID51LL RSCAN0.RMID51.UINT8[LL]
+#define RSCAN0RMID51LH RSCAN0.RMID51.UINT8[LH]
+#define RSCAN0RMID51H RSCAN0.RMID51.UINT16[H]
+#define RSCAN0RMID51HL RSCAN0.RMID51.UINT8[HL]
+#define RSCAN0RMID51HH RSCAN0.RMID51.UINT8[HH]
+#define RSCAN0RMPTR51 RSCAN0.RMPTR51.UINT32
+#define RSCAN0RMPTR51L RSCAN0.RMPTR51.UINT16[L]
+#define RSCAN0RMPTR51LL RSCAN0.RMPTR51.UINT8[LL]
+#define RSCAN0RMPTR51LH RSCAN0.RMPTR51.UINT8[LH]
+#define RSCAN0RMPTR51H RSCAN0.RMPTR51.UINT16[H]
+#define RSCAN0RMPTR51HL RSCAN0.RMPTR51.UINT8[HL]
+#define RSCAN0RMPTR51HH RSCAN0.RMPTR51.UINT8[HH]
+#define RSCAN0RMDF051 RSCAN0.RMDF051.UINT32
+#define RSCAN0RMDF051L RSCAN0.RMDF051.UINT16[L]
+#define RSCAN0RMDF051LL RSCAN0.RMDF051.UINT8[LL]
+#define RSCAN0RMDF051LH RSCAN0.RMDF051.UINT8[LH]
+#define RSCAN0RMDF051H RSCAN0.RMDF051.UINT16[H]
+#define RSCAN0RMDF051HL RSCAN0.RMDF051.UINT8[HL]
+#define RSCAN0RMDF051HH RSCAN0.RMDF051.UINT8[HH]
+#define RSCAN0RMDF151 RSCAN0.RMDF151.UINT32
+#define RSCAN0RMDF151L RSCAN0.RMDF151.UINT16[L]
+#define RSCAN0RMDF151LL RSCAN0.RMDF151.UINT8[LL]
+#define RSCAN0RMDF151LH RSCAN0.RMDF151.UINT8[LH]
+#define RSCAN0RMDF151H RSCAN0.RMDF151.UINT16[H]
+#define RSCAN0RMDF151HL RSCAN0.RMDF151.UINT8[HL]
+#define RSCAN0RMDF151HH RSCAN0.RMDF151.UINT8[HH]
+#define RSCAN0RMID52 RSCAN0.RMID52.UINT32
+#define RSCAN0RMID52L RSCAN0.RMID52.UINT16[L]
+#define RSCAN0RMID52LL RSCAN0.RMID52.UINT8[LL]
+#define RSCAN0RMID52LH RSCAN0.RMID52.UINT8[LH]
+#define RSCAN0RMID52H RSCAN0.RMID52.UINT16[H]
+#define RSCAN0RMID52HL RSCAN0.RMID52.UINT8[HL]
+#define RSCAN0RMID52HH RSCAN0.RMID52.UINT8[HH]
+#define RSCAN0RMPTR52 RSCAN0.RMPTR52.UINT32
+#define RSCAN0RMPTR52L RSCAN0.RMPTR52.UINT16[L]
+#define RSCAN0RMPTR52LL RSCAN0.RMPTR52.UINT8[LL]
+#define RSCAN0RMPTR52LH RSCAN0.RMPTR52.UINT8[LH]
+#define RSCAN0RMPTR52H RSCAN0.RMPTR52.UINT16[H]
+#define RSCAN0RMPTR52HL RSCAN0.RMPTR52.UINT8[HL]
+#define RSCAN0RMPTR52HH RSCAN0.RMPTR52.UINT8[HH]
+#define RSCAN0RMDF052 RSCAN0.RMDF052.UINT32
+#define RSCAN0RMDF052L RSCAN0.RMDF052.UINT16[L]
+#define RSCAN0RMDF052LL RSCAN0.RMDF052.UINT8[LL]
+#define RSCAN0RMDF052LH RSCAN0.RMDF052.UINT8[LH]
+#define RSCAN0RMDF052H RSCAN0.RMDF052.UINT16[H]
+#define RSCAN0RMDF052HL RSCAN0.RMDF052.UINT8[HL]
+#define RSCAN0RMDF052HH RSCAN0.RMDF052.UINT8[HH]
+#define RSCAN0RMDF152 RSCAN0.RMDF152.UINT32
+#define RSCAN0RMDF152L RSCAN0.RMDF152.UINT16[L]
+#define RSCAN0RMDF152LL RSCAN0.RMDF152.UINT8[LL]
+#define RSCAN0RMDF152LH RSCAN0.RMDF152.UINT8[LH]
+#define RSCAN0RMDF152H RSCAN0.RMDF152.UINT16[H]
+#define RSCAN0RMDF152HL RSCAN0.RMDF152.UINT8[HL]
+#define RSCAN0RMDF152HH RSCAN0.RMDF152.UINT8[HH]
+#define RSCAN0RMID53 RSCAN0.RMID53.UINT32
+#define RSCAN0RMID53L RSCAN0.RMID53.UINT16[L]
+#define RSCAN0RMID53LL RSCAN0.RMID53.UINT8[LL]
+#define RSCAN0RMID53LH RSCAN0.RMID53.UINT8[LH]
+#define RSCAN0RMID53H RSCAN0.RMID53.UINT16[H]
+#define RSCAN0RMID53HL RSCAN0.RMID53.UINT8[HL]
+#define RSCAN0RMID53HH RSCAN0.RMID53.UINT8[HH]
+#define RSCAN0RMPTR53 RSCAN0.RMPTR53.UINT32
+#define RSCAN0RMPTR53L RSCAN0.RMPTR53.UINT16[L]
+#define RSCAN0RMPTR53LL RSCAN0.RMPTR53.UINT8[LL]
+#define RSCAN0RMPTR53LH RSCAN0.RMPTR53.UINT8[LH]
+#define RSCAN0RMPTR53H RSCAN0.RMPTR53.UINT16[H]
+#define RSCAN0RMPTR53HL RSCAN0.RMPTR53.UINT8[HL]
+#define RSCAN0RMPTR53HH RSCAN0.RMPTR53.UINT8[HH]
+#define RSCAN0RMDF053 RSCAN0.RMDF053.UINT32
+#define RSCAN0RMDF053L RSCAN0.RMDF053.UINT16[L]
+#define RSCAN0RMDF053LL RSCAN0.RMDF053.UINT8[LL]
+#define RSCAN0RMDF053LH RSCAN0.RMDF053.UINT8[LH]
+#define RSCAN0RMDF053H RSCAN0.RMDF053.UINT16[H]
+#define RSCAN0RMDF053HL RSCAN0.RMDF053.UINT8[HL]
+#define RSCAN0RMDF053HH RSCAN0.RMDF053.UINT8[HH]
+#define RSCAN0RMDF153 RSCAN0.RMDF153.UINT32
+#define RSCAN0RMDF153L RSCAN0.RMDF153.UINT16[L]
+#define RSCAN0RMDF153LL RSCAN0.RMDF153.UINT8[LL]
+#define RSCAN0RMDF153LH RSCAN0.RMDF153.UINT8[LH]
+#define RSCAN0RMDF153H RSCAN0.RMDF153.UINT16[H]
+#define RSCAN0RMDF153HL RSCAN0.RMDF153.UINT8[HL]
+#define RSCAN0RMDF153HH RSCAN0.RMDF153.UINT8[HH]
+#define RSCAN0RMID54 RSCAN0.RMID54.UINT32
+#define RSCAN0RMID54L RSCAN0.RMID54.UINT16[L]
+#define RSCAN0RMID54LL RSCAN0.RMID54.UINT8[LL]
+#define RSCAN0RMID54LH RSCAN0.RMID54.UINT8[LH]
+#define RSCAN0RMID54H RSCAN0.RMID54.UINT16[H]
+#define RSCAN0RMID54HL RSCAN0.RMID54.UINT8[HL]
+#define RSCAN0RMID54HH RSCAN0.RMID54.UINT8[HH]
+#define RSCAN0RMPTR54 RSCAN0.RMPTR54.UINT32
+#define RSCAN0RMPTR54L RSCAN0.RMPTR54.UINT16[L]
+#define RSCAN0RMPTR54LL RSCAN0.RMPTR54.UINT8[LL]
+#define RSCAN0RMPTR54LH RSCAN0.RMPTR54.UINT8[LH]
+#define RSCAN0RMPTR54H RSCAN0.RMPTR54.UINT16[H]
+#define RSCAN0RMPTR54HL RSCAN0.RMPTR54.UINT8[HL]
+#define RSCAN0RMPTR54HH RSCAN0.RMPTR54.UINT8[HH]
+#define RSCAN0RMDF054 RSCAN0.RMDF054.UINT32
+#define RSCAN0RMDF054L RSCAN0.RMDF054.UINT16[L]
+#define RSCAN0RMDF054LL RSCAN0.RMDF054.UINT8[LL]
+#define RSCAN0RMDF054LH RSCAN0.RMDF054.UINT8[LH]
+#define RSCAN0RMDF054H RSCAN0.RMDF054.UINT16[H]
+#define RSCAN0RMDF054HL RSCAN0.RMDF054.UINT8[HL]
+#define RSCAN0RMDF054HH RSCAN0.RMDF054.UINT8[HH]
+#define RSCAN0RMDF154 RSCAN0.RMDF154.UINT32
+#define RSCAN0RMDF154L RSCAN0.RMDF154.UINT16[L]
+#define RSCAN0RMDF154LL RSCAN0.RMDF154.UINT8[LL]
+#define RSCAN0RMDF154LH RSCAN0.RMDF154.UINT8[LH]
+#define RSCAN0RMDF154H RSCAN0.RMDF154.UINT16[H]
+#define RSCAN0RMDF154HL RSCAN0.RMDF154.UINT8[HL]
+#define RSCAN0RMDF154HH RSCAN0.RMDF154.UINT8[HH]
+#define RSCAN0RMID55 RSCAN0.RMID55.UINT32
+#define RSCAN0RMID55L RSCAN0.RMID55.UINT16[L]
+#define RSCAN0RMID55LL RSCAN0.RMID55.UINT8[LL]
+#define RSCAN0RMID55LH RSCAN0.RMID55.UINT8[LH]
+#define RSCAN0RMID55H RSCAN0.RMID55.UINT16[H]
+#define RSCAN0RMID55HL RSCAN0.RMID55.UINT8[HL]
+#define RSCAN0RMID55HH RSCAN0.RMID55.UINT8[HH]
+#define RSCAN0RMPTR55 RSCAN0.RMPTR55.UINT32
+#define RSCAN0RMPTR55L RSCAN0.RMPTR55.UINT16[L]
+#define RSCAN0RMPTR55LL RSCAN0.RMPTR55.UINT8[LL]
+#define RSCAN0RMPTR55LH RSCAN0.RMPTR55.UINT8[LH]
+#define RSCAN0RMPTR55H RSCAN0.RMPTR55.UINT16[H]
+#define RSCAN0RMPTR55HL RSCAN0.RMPTR55.UINT8[HL]
+#define RSCAN0RMPTR55HH RSCAN0.RMPTR55.UINT8[HH]
+#define RSCAN0RMDF055 RSCAN0.RMDF055.UINT32
+#define RSCAN0RMDF055L RSCAN0.RMDF055.UINT16[L]
+#define RSCAN0RMDF055LL RSCAN0.RMDF055.UINT8[LL]
+#define RSCAN0RMDF055LH RSCAN0.RMDF055.UINT8[LH]
+#define RSCAN0RMDF055H RSCAN0.RMDF055.UINT16[H]
+#define RSCAN0RMDF055HL RSCAN0.RMDF055.UINT8[HL]
+#define RSCAN0RMDF055HH RSCAN0.RMDF055.UINT8[HH]
+#define RSCAN0RMDF155 RSCAN0.RMDF155.UINT32
+#define RSCAN0RMDF155L RSCAN0.RMDF155.UINT16[L]
+#define RSCAN0RMDF155LL RSCAN0.RMDF155.UINT8[LL]
+#define RSCAN0RMDF155LH RSCAN0.RMDF155.UINT8[LH]
+#define RSCAN0RMDF155H RSCAN0.RMDF155.UINT16[H]
+#define RSCAN0RMDF155HL RSCAN0.RMDF155.UINT8[HL]
+#define RSCAN0RMDF155HH RSCAN0.RMDF155.UINT8[HH]
+#define RSCAN0RMID56 RSCAN0.RMID56.UINT32
+#define RSCAN0RMID56L RSCAN0.RMID56.UINT16[L]
+#define RSCAN0RMID56LL RSCAN0.RMID56.UINT8[LL]
+#define RSCAN0RMID56LH RSCAN0.RMID56.UINT8[LH]
+#define RSCAN0RMID56H RSCAN0.RMID56.UINT16[H]
+#define RSCAN0RMID56HL RSCAN0.RMID56.UINT8[HL]
+#define RSCAN0RMID56HH RSCAN0.RMID56.UINT8[HH]
+#define RSCAN0RMPTR56 RSCAN0.RMPTR56.UINT32
+#define RSCAN0RMPTR56L RSCAN0.RMPTR56.UINT16[L]
+#define RSCAN0RMPTR56LL RSCAN0.RMPTR56.UINT8[LL]
+#define RSCAN0RMPTR56LH RSCAN0.RMPTR56.UINT8[LH]
+#define RSCAN0RMPTR56H RSCAN0.RMPTR56.UINT16[H]
+#define RSCAN0RMPTR56HL RSCAN0.RMPTR56.UINT8[HL]
+#define RSCAN0RMPTR56HH RSCAN0.RMPTR56.UINT8[HH]
+#define RSCAN0RMDF056 RSCAN0.RMDF056.UINT32
+#define RSCAN0RMDF056L RSCAN0.RMDF056.UINT16[L]
+#define RSCAN0RMDF056LL RSCAN0.RMDF056.UINT8[LL]
+#define RSCAN0RMDF056LH RSCAN0.RMDF056.UINT8[LH]
+#define RSCAN0RMDF056H RSCAN0.RMDF056.UINT16[H]
+#define RSCAN0RMDF056HL RSCAN0.RMDF056.UINT8[HL]
+#define RSCAN0RMDF056HH RSCAN0.RMDF056.UINT8[HH]
+#define RSCAN0RMDF156 RSCAN0.RMDF156.UINT32
+#define RSCAN0RMDF156L RSCAN0.RMDF156.UINT16[L]
+#define RSCAN0RMDF156LL RSCAN0.RMDF156.UINT8[LL]
+#define RSCAN0RMDF156LH RSCAN0.RMDF156.UINT8[LH]
+#define RSCAN0RMDF156H RSCAN0.RMDF156.UINT16[H]
+#define RSCAN0RMDF156HL RSCAN0.RMDF156.UINT8[HL]
+#define RSCAN0RMDF156HH RSCAN0.RMDF156.UINT8[HH]
+#define RSCAN0RMID57 RSCAN0.RMID57.UINT32
+#define RSCAN0RMID57L RSCAN0.RMID57.UINT16[L]
+#define RSCAN0RMID57LL RSCAN0.RMID57.UINT8[LL]
+#define RSCAN0RMID57LH RSCAN0.RMID57.UINT8[LH]
+#define RSCAN0RMID57H RSCAN0.RMID57.UINT16[H]
+#define RSCAN0RMID57HL RSCAN0.RMID57.UINT8[HL]
+#define RSCAN0RMID57HH RSCAN0.RMID57.UINT8[HH]
+#define RSCAN0RMPTR57 RSCAN0.RMPTR57.UINT32
+#define RSCAN0RMPTR57L RSCAN0.RMPTR57.UINT16[L]
+#define RSCAN0RMPTR57LL RSCAN0.RMPTR57.UINT8[LL]
+#define RSCAN0RMPTR57LH RSCAN0.RMPTR57.UINT8[LH]
+#define RSCAN0RMPTR57H RSCAN0.RMPTR57.UINT16[H]
+#define RSCAN0RMPTR57HL RSCAN0.RMPTR57.UINT8[HL]
+#define RSCAN0RMPTR57HH RSCAN0.RMPTR57.UINT8[HH]
+#define RSCAN0RMDF057 RSCAN0.RMDF057.UINT32
+#define RSCAN0RMDF057L RSCAN0.RMDF057.UINT16[L]
+#define RSCAN0RMDF057LL RSCAN0.RMDF057.UINT8[LL]
+#define RSCAN0RMDF057LH RSCAN0.RMDF057.UINT8[LH]
+#define RSCAN0RMDF057H RSCAN0.RMDF057.UINT16[H]
+#define RSCAN0RMDF057HL RSCAN0.RMDF057.UINT8[HL]
+#define RSCAN0RMDF057HH RSCAN0.RMDF057.UINT8[HH]
+#define RSCAN0RMDF157 RSCAN0.RMDF157.UINT32
+#define RSCAN0RMDF157L RSCAN0.RMDF157.UINT16[L]
+#define RSCAN0RMDF157LL RSCAN0.RMDF157.UINT8[LL]
+#define RSCAN0RMDF157LH RSCAN0.RMDF157.UINT8[LH]
+#define RSCAN0RMDF157H RSCAN0.RMDF157.UINT16[H]
+#define RSCAN0RMDF157HL RSCAN0.RMDF157.UINT8[HL]
+#define RSCAN0RMDF157HH RSCAN0.RMDF157.UINT8[HH]
+#define RSCAN0RMID58 RSCAN0.RMID58.UINT32
+#define RSCAN0RMID58L RSCAN0.RMID58.UINT16[L]
+#define RSCAN0RMID58LL RSCAN0.RMID58.UINT8[LL]
+#define RSCAN0RMID58LH RSCAN0.RMID58.UINT8[LH]
+#define RSCAN0RMID58H RSCAN0.RMID58.UINT16[H]
+#define RSCAN0RMID58HL RSCAN0.RMID58.UINT8[HL]
+#define RSCAN0RMID58HH RSCAN0.RMID58.UINT8[HH]
+#define RSCAN0RMPTR58 RSCAN0.RMPTR58.UINT32
+#define RSCAN0RMPTR58L RSCAN0.RMPTR58.UINT16[L]
+#define RSCAN0RMPTR58LL RSCAN0.RMPTR58.UINT8[LL]
+#define RSCAN0RMPTR58LH RSCAN0.RMPTR58.UINT8[LH]
+#define RSCAN0RMPTR58H RSCAN0.RMPTR58.UINT16[H]
+#define RSCAN0RMPTR58HL RSCAN0.RMPTR58.UINT8[HL]
+#define RSCAN0RMPTR58HH RSCAN0.RMPTR58.UINT8[HH]
+#define RSCAN0RMDF058 RSCAN0.RMDF058.UINT32
+#define RSCAN0RMDF058L RSCAN0.RMDF058.UINT16[L]
+#define RSCAN0RMDF058LL RSCAN0.RMDF058.UINT8[LL]
+#define RSCAN0RMDF058LH RSCAN0.RMDF058.UINT8[LH]
+#define RSCAN0RMDF058H RSCAN0.RMDF058.UINT16[H]
+#define RSCAN0RMDF058HL RSCAN0.RMDF058.UINT8[HL]
+#define RSCAN0RMDF058HH RSCAN0.RMDF058.UINT8[HH]
+#define RSCAN0RMDF158 RSCAN0.RMDF158.UINT32
+#define RSCAN0RMDF158L RSCAN0.RMDF158.UINT16[L]
+#define RSCAN0RMDF158LL RSCAN0.RMDF158.UINT8[LL]
+#define RSCAN0RMDF158LH RSCAN0.RMDF158.UINT8[LH]
+#define RSCAN0RMDF158H RSCAN0.RMDF158.UINT16[H]
+#define RSCAN0RMDF158HL RSCAN0.RMDF158.UINT8[HL]
+#define RSCAN0RMDF158HH RSCAN0.RMDF158.UINT8[HH]
+#define RSCAN0RMID59 RSCAN0.RMID59.UINT32
+#define RSCAN0RMID59L RSCAN0.RMID59.UINT16[L]
+#define RSCAN0RMID59LL RSCAN0.RMID59.UINT8[LL]
+#define RSCAN0RMID59LH RSCAN0.RMID59.UINT8[LH]
+#define RSCAN0RMID59H RSCAN0.RMID59.UINT16[H]
+#define RSCAN0RMID59HL RSCAN0.RMID59.UINT8[HL]
+#define RSCAN0RMID59HH RSCAN0.RMID59.UINT8[HH]
+#define RSCAN0RMPTR59 RSCAN0.RMPTR59.UINT32
+#define RSCAN0RMPTR59L RSCAN0.RMPTR59.UINT16[L]
+#define RSCAN0RMPTR59LL RSCAN0.RMPTR59.UINT8[LL]
+#define RSCAN0RMPTR59LH RSCAN0.RMPTR59.UINT8[LH]
+#define RSCAN0RMPTR59H RSCAN0.RMPTR59.UINT16[H]
+#define RSCAN0RMPTR59HL RSCAN0.RMPTR59.UINT8[HL]
+#define RSCAN0RMPTR59HH RSCAN0.RMPTR59.UINT8[HH]
+#define RSCAN0RMDF059 RSCAN0.RMDF059.UINT32
+#define RSCAN0RMDF059L RSCAN0.RMDF059.UINT16[L]
+#define RSCAN0RMDF059LL RSCAN0.RMDF059.UINT8[LL]
+#define RSCAN0RMDF059LH RSCAN0.RMDF059.UINT8[LH]
+#define RSCAN0RMDF059H RSCAN0.RMDF059.UINT16[H]
+#define RSCAN0RMDF059HL RSCAN0.RMDF059.UINT8[HL]
+#define RSCAN0RMDF059HH RSCAN0.RMDF059.UINT8[HH]
+#define RSCAN0RMDF159 RSCAN0.RMDF159.UINT32
+#define RSCAN0RMDF159L RSCAN0.RMDF159.UINT16[L]
+#define RSCAN0RMDF159LL RSCAN0.RMDF159.UINT8[LL]
+#define RSCAN0RMDF159LH RSCAN0.RMDF159.UINT8[LH]
+#define RSCAN0RMDF159H RSCAN0.RMDF159.UINT16[H]
+#define RSCAN0RMDF159HL RSCAN0.RMDF159.UINT8[HL]
+#define RSCAN0RMDF159HH RSCAN0.RMDF159.UINT8[HH]
+#define RSCAN0RMID60 RSCAN0.RMID60.UINT32
+#define RSCAN0RMID60L RSCAN0.RMID60.UINT16[L]
+#define RSCAN0RMID60LL RSCAN0.RMID60.UINT8[LL]
+#define RSCAN0RMID60LH RSCAN0.RMID60.UINT8[LH]
+#define RSCAN0RMID60H RSCAN0.RMID60.UINT16[H]
+#define RSCAN0RMID60HL RSCAN0.RMID60.UINT8[HL]
+#define RSCAN0RMID60HH RSCAN0.RMID60.UINT8[HH]
+#define RSCAN0RMPTR60 RSCAN0.RMPTR60.UINT32
+#define RSCAN0RMPTR60L RSCAN0.RMPTR60.UINT16[L]
+#define RSCAN0RMPTR60LL RSCAN0.RMPTR60.UINT8[LL]
+#define RSCAN0RMPTR60LH RSCAN0.RMPTR60.UINT8[LH]
+#define RSCAN0RMPTR60H RSCAN0.RMPTR60.UINT16[H]
+#define RSCAN0RMPTR60HL RSCAN0.RMPTR60.UINT8[HL]
+#define RSCAN0RMPTR60HH RSCAN0.RMPTR60.UINT8[HH]
+#define RSCAN0RMDF060 RSCAN0.RMDF060.UINT32
+#define RSCAN0RMDF060L RSCAN0.RMDF060.UINT16[L]
+#define RSCAN0RMDF060LL RSCAN0.RMDF060.UINT8[LL]
+#define RSCAN0RMDF060LH RSCAN0.RMDF060.UINT8[LH]
+#define RSCAN0RMDF060H RSCAN0.RMDF060.UINT16[H]
+#define RSCAN0RMDF060HL RSCAN0.RMDF060.UINT8[HL]
+#define RSCAN0RMDF060HH RSCAN0.RMDF060.UINT8[HH]
+#define RSCAN0RMDF160 RSCAN0.RMDF160.UINT32
+#define RSCAN0RMDF160L RSCAN0.RMDF160.UINT16[L]
+#define RSCAN0RMDF160LL RSCAN0.RMDF160.UINT8[LL]
+#define RSCAN0RMDF160LH RSCAN0.RMDF160.UINT8[LH]
+#define RSCAN0RMDF160H RSCAN0.RMDF160.UINT16[H]
+#define RSCAN0RMDF160HL RSCAN0.RMDF160.UINT8[HL]
+#define RSCAN0RMDF160HH RSCAN0.RMDF160.UINT8[HH]
+#define RSCAN0RMID61 RSCAN0.RMID61.UINT32
+#define RSCAN0RMID61L RSCAN0.RMID61.UINT16[L]
+#define RSCAN0RMID61LL RSCAN0.RMID61.UINT8[LL]
+#define RSCAN0RMID61LH RSCAN0.RMID61.UINT8[LH]
+#define RSCAN0RMID61H RSCAN0.RMID61.UINT16[H]
+#define RSCAN0RMID61HL RSCAN0.RMID61.UINT8[HL]
+#define RSCAN0RMID61HH RSCAN0.RMID61.UINT8[HH]
+#define RSCAN0RMPTR61 RSCAN0.RMPTR61.UINT32
+#define RSCAN0RMPTR61L RSCAN0.RMPTR61.UINT16[L]
+#define RSCAN0RMPTR61LL RSCAN0.RMPTR61.UINT8[LL]
+#define RSCAN0RMPTR61LH RSCAN0.RMPTR61.UINT8[LH]
+#define RSCAN0RMPTR61H RSCAN0.RMPTR61.UINT16[H]
+#define RSCAN0RMPTR61HL RSCAN0.RMPTR61.UINT8[HL]
+#define RSCAN0RMPTR61HH RSCAN0.RMPTR61.UINT8[HH]
+#define RSCAN0RMDF061 RSCAN0.RMDF061.UINT32
+#define RSCAN0RMDF061L RSCAN0.RMDF061.UINT16[L]
+#define RSCAN0RMDF061LL RSCAN0.RMDF061.UINT8[LL]
+#define RSCAN0RMDF061LH RSCAN0.RMDF061.UINT8[LH]
+#define RSCAN0RMDF061H RSCAN0.RMDF061.UINT16[H]
+#define RSCAN0RMDF061HL RSCAN0.RMDF061.UINT8[HL]
+#define RSCAN0RMDF061HH RSCAN0.RMDF061.UINT8[HH]
+#define RSCAN0RMDF161 RSCAN0.RMDF161.UINT32
+#define RSCAN0RMDF161L RSCAN0.RMDF161.UINT16[L]
+#define RSCAN0RMDF161LL RSCAN0.RMDF161.UINT8[LL]
+#define RSCAN0RMDF161LH RSCAN0.RMDF161.UINT8[LH]
+#define RSCAN0RMDF161H RSCAN0.RMDF161.UINT16[H]
+#define RSCAN0RMDF161HL RSCAN0.RMDF161.UINT8[HL]
+#define RSCAN0RMDF161HH RSCAN0.RMDF161.UINT8[HH]
+#define RSCAN0RMID62 RSCAN0.RMID62.UINT32
+#define RSCAN0RMID62L RSCAN0.RMID62.UINT16[L]
+#define RSCAN0RMID62LL RSCAN0.RMID62.UINT8[LL]
+#define RSCAN0RMID62LH RSCAN0.RMID62.UINT8[LH]
+#define RSCAN0RMID62H RSCAN0.RMID62.UINT16[H]
+#define RSCAN0RMID62HL RSCAN0.RMID62.UINT8[HL]
+#define RSCAN0RMID62HH RSCAN0.RMID62.UINT8[HH]
+#define RSCAN0RMPTR62 RSCAN0.RMPTR62.UINT32
+#define RSCAN0RMPTR62L RSCAN0.RMPTR62.UINT16[L]
+#define RSCAN0RMPTR62LL RSCAN0.RMPTR62.UINT8[LL]
+#define RSCAN0RMPTR62LH RSCAN0.RMPTR62.UINT8[LH]
+#define RSCAN0RMPTR62H RSCAN0.RMPTR62.UINT16[H]
+#define RSCAN0RMPTR62HL RSCAN0.RMPTR62.UINT8[HL]
+#define RSCAN0RMPTR62HH RSCAN0.RMPTR62.UINT8[HH]
+#define RSCAN0RMDF062 RSCAN0.RMDF062.UINT32
+#define RSCAN0RMDF062L RSCAN0.RMDF062.UINT16[L]
+#define RSCAN0RMDF062LL RSCAN0.RMDF062.UINT8[LL]
+#define RSCAN0RMDF062LH RSCAN0.RMDF062.UINT8[LH]
+#define RSCAN0RMDF062H RSCAN0.RMDF062.UINT16[H]
+#define RSCAN0RMDF062HL RSCAN0.RMDF062.UINT8[HL]
+#define RSCAN0RMDF062HH RSCAN0.RMDF062.UINT8[HH]
+#define RSCAN0RMDF162 RSCAN0.RMDF162.UINT32
+#define RSCAN0RMDF162L RSCAN0.RMDF162.UINT16[L]
+#define RSCAN0RMDF162LL RSCAN0.RMDF162.UINT8[LL]
+#define RSCAN0RMDF162LH RSCAN0.RMDF162.UINT8[LH]
+#define RSCAN0RMDF162H RSCAN0.RMDF162.UINT16[H]
+#define RSCAN0RMDF162HL RSCAN0.RMDF162.UINT8[HL]
+#define RSCAN0RMDF162HH RSCAN0.RMDF162.UINT8[HH]
+#define RSCAN0RMID63 RSCAN0.RMID63.UINT32
+#define RSCAN0RMID63L RSCAN0.RMID63.UINT16[L]
+#define RSCAN0RMID63LL RSCAN0.RMID63.UINT8[LL]
+#define RSCAN0RMID63LH RSCAN0.RMID63.UINT8[LH]
+#define RSCAN0RMID63H RSCAN0.RMID63.UINT16[H]
+#define RSCAN0RMID63HL RSCAN0.RMID63.UINT8[HL]
+#define RSCAN0RMID63HH RSCAN0.RMID63.UINT8[HH]
+#define RSCAN0RMPTR63 RSCAN0.RMPTR63.UINT32
+#define RSCAN0RMPTR63L RSCAN0.RMPTR63.UINT16[L]
+#define RSCAN0RMPTR63LL RSCAN0.RMPTR63.UINT8[LL]
+#define RSCAN0RMPTR63LH RSCAN0.RMPTR63.UINT8[LH]
+#define RSCAN0RMPTR63H RSCAN0.RMPTR63.UINT16[H]
+#define RSCAN0RMPTR63HL RSCAN0.RMPTR63.UINT8[HL]
+#define RSCAN0RMPTR63HH RSCAN0.RMPTR63.UINT8[HH]
+#define RSCAN0RMDF063 RSCAN0.RMDF063.UINT32
+#define RSCAN0RMDF063L RSCAN0.RMDF063.UINT16[L]
+#define RSCAN0RMDF063LL RSCAN0.RMDF063.UINT8[LL]
+#define RSCAN0RMDF063LH RSCAN0.RMDF063.UINT8[LH]
+#define RSCAN0RMDF063H RSCAN0.RMDF063.UINT16[H]
+#define RSCAN0RMDF063HL RSCAN0.RMDF063.UINT8[HL]
+#define RSCAN0RMDF063HH RSCAN0.RMDF063.UINT8[HH]
+#define RSCAN0RMDF163 RSCAN0.RMDF163.UINT32
+#define RSCAN0RMDF163L RSCAN0.RMDF163.UINT16[L]
+#define RSCAN0RMDF163LL RSCAN0.RMDF163.UINT8[LL]
+#define RSCAN0RMDF163LH RSCAN0.RMDF163.UINT8[LH]
+#define RSCAN0RMDF163H RSCAN0.RMDF163.UINT16[H]
+#define RSCAN0RMDF163HL RSCAN0.RMDF163.UINT8[HL]
+#define RSCAN0RMDF163HH RSCAN0.RMDF163.UINT8[HH]
+#define RSCAN0RMID64 RSCAN0.RMID64.UINT32
+#define RSCAN0RMID64L RSCAN0.RMID64.UINT16[L]
+#define RSCAN0RMID64LL RSCAN0.RMID64.UINT8[LL]
+#define RSCAN0RMID64LH RSCAN0.RMID64.UINT8[LH]
+#define RSCAN0RMID64H RSCAN0.RMID64.UINT16[H]
+#define RSCAN0RMID64HL RSCAN0.RMID64.UINT8[HL]
+#define RSCAN0RMID64HH RSCAN0.RMID64.UINT8[HH]
+#define RSCAN0RMPTR64 RSCAN0.RMPTR64.UINT32
+#define RSCAN0RMPTR64L RSCAN0.RMPTR64.UINT16[L]
+#define RSCAN0RMPTR64LL RSCAN0.RMPTR64.UINT8[LL]
+#define RSCAN0RMPTR64LH RSCAN0.RMPTR64.UINT8[LH]
+#define RSCAN0RMPTR64H RSCAN0.RMPTR64.UINT16[H]
+#define RSCAN0RMPTR64HL RSCAN0.RMPTR64.UINT8[HL]
+#define RSCAN0RMPTR64HH RSCAN0.RMPTR64.UINT8[HH]
+#define RSCAN0RMDF064 RSCAN0.RMDF064.UINT32
+#define RSCAN0RMDF064L RSCAN0.RMDF064.UINT16[L]
+#define RSCAN0RMDF064LL RSCAN0.RMDF064.UINT8[LL]
+#define RSCAN0RMDF064LH RSCAN0.RMDF064.UINT8[LH]
+#define RSCAN0RMDF064H RSCAN0.RMDF064.UINT16[H]
+#define RSCAN0RMDF064HL RSCAN0.RMDF064.UINT8[HL]
+#define RSCAN0RMDF064HH RSCAN0.RMDF064.UINT8[HH]
+#define RSCAN0RMDF164 RSCAN0.RMDF164.UINT32
+#define RSCAN0RMDF164L RSCAN0.RMDF164.UINT16[L]
+#define RSCAN0RMDF164LL RSCAN0.RMDF164.UINT8[LL]
+#define RSCAN0RMDF164LH RSCAN0.RMDF164.UINT8[LH]
+#define RSCAN0RMDF164H RSCAN0.RMDF164.UINT16[H]
+#define RSCAN0RMDF164HL RSCAN0.RMDF164.UINT8[HL]
+#define RSCAN0RMDF164HH RSCAN0.RMDF164.UINT8[HH]
+#define RSCAN0RMID65 RSCAN0.RMID65.UINT32
+#define RSCAN0RMID65L RSCAN0.RMID65.UINT16[L]
+#define RSCAN0RMID65LL RSCAN0.RMID65.UINT8[LL]
+#define RSCAN0RMID65LH RSCAN0.RMID65.UINT8[LH]
+#define RSCAN0RMID65H RSCAN0.RMID65.UINT16[H]
+#define RSCAN0RMID65HL RSCAN0.RMID65.UINT8[HL]
+#define RSCAN0RMID65HH RSCAN0.RMID65.UINT8[HH]
+#define RSCAN0RMPTR65 RSCAN0.RMPTR65.UINT32
+#define RSCAN0RMPTR65L RSCAN0.RMPTR65.UINT16[L]
+#define RSCAN0RMPTR65LL RSCAN0.RMPTR65.UINT8[LL]
+#define RSCAN0RMPTR65LH RSCAN0.RMPTR65.UINT8[LH]
+#define RSCAN0RMPTR65H RSCAN0.RMPTR65.UINT16[H]
+#define RSCAN0RMPTR65HL RSCAN0.RMPTR65.UINT8[HL]
+#define RSCAN0RMPTR65HH RSCAN0.RMPTR65.UINT8[HH]
+#define RSCAN0RMDF065 RSCAN0.RMDF065.UINT32
+#define RSCAN0RMDF065L RSCAN0.RMDF065.UINT16[L]
+#define RSCAN0RMDF065LL RSCAN0.RMDF065.UINT8[LL]
+#define RSCAN0RMDF065LH RSCAN0.RMDF065.UINT8[LH]
+#define RSCAN0RMDF065H RSCAN0.RMDF065.UINT16[H]
+#define RSCAN0RMDF065HL RSCAN0.RMDF065.UINT8[HL]
+#define RSCAN0RMDF065HH RSCAN0.RMDF065.UINT8[HH]
+#define RSCAN0RMDF165 RSCAN0.RMDF165.UINT32
+#define RSCAN0RMDF165L RSCAN0.RMDF165.UINT16[L]
+#define RSCAN0RMDF165LL RSCAN0.RMDF165.UINT8[LL]
+#define RSCAN0RMDF165LH RSCAN0.RMDF165.UINT8[LH]
+#define RSCAN0RMDF165H RSCAN0.RMDF165.UINT16[H]
+#define RSCAN0RMDF165HL RSCAN0.RMDF165.UINT8[HL]
+#define RSCAN0RMDF165HH RSCAN0.RMDF165.UINT8[HH]
+#define RSCAN0RMID66 RSCAN0.RMID66.UINT32
+#define RSCAN0RMID66L RSCAN0.RMID66.UINT16[L]
+#define RSCAN0RMID66LL RSCAN0.RMID66.UINT8[LL]
+#define RSCAN0RMID66LH RSCAN0.RMID66.UINT8[LH]
+#define RSCAN0RMID66H RSCAN0.RMID66.UINT16[H]
+#define RSCAN0RMID66HL RSCAN0.RMID66.UINT8[HL]
+#define RSCAN0RMID66HH RSCAN0.RMID66.UINT8[HH]
+#define RSCAN0RMPTR66 RSCAN0.RMPTR66.UINT32
+#define RSCAN0RMPTR66L RSCAN0.RMPTR66.UINT16[L]
+#define RSCAN0RMPTR66LL RSCAN0.RMPTR66.UINT8[LL]
+#define RSCAN0RMPTR66LH RSCAN0.RMPTR66.UINT8[LH]
+#define RSCAN0RMPTR66H RSCAN0.RMPTR66.UINT16[H]
+#define RSCAN0RMPTR66HL RSCAN0.RMPTR66.UINT8[HL]
+#define RSCAN0RMPTR66HH RSCAN0.RMPTR66.UINT8[HH]
+#define RSCAN0RMDF066 RSCAN0.RMDF066.UINT32
+#define RSCAN0RMDF066L RSCAN0.RMDF066.UINT16[L]
+#define RSCAN0RMDF066LL RSCAN0.RMDF066.UINT8[LL]
+#define RSCAN0RMDF066LH RSCAN0.RMDF066.UINT8[LH]
+#define RSCAN0RMDF066H RSCAN0.RMDF066.UINT16[H]
+#define RSCAN0RMDF066HL RSCAN0.RMDF066.UINT8[HL]
+#define RSCAN0RMDF066HH RSCAN0.RMDF066.UINT8[HH]
+#define RSCAN0RMDF166 RSCAN0.RMDF166.UINT32
+#define RSCAN0RMDF166L RSCAN0.RMDF166.UINT16[L]
+#define RSCAN0RMDF166LL RSCAN0.RMDF166.UINT8[LL]
+#define RSCAN0RMDF166LH RSCAN0.RMDF166.UINT8[LH]
+#define RSCAN0RMDF166H RSCAN0.RMDF166.UINT16[H]
+#define RSCAN0RMDF166HL RSCAN0.RMDF166.UINT8[HL]
+#define RSCAN0RMDF166HH RSCAN0.RMDF166.UINT8[HH]
+#define RSCAN0RMID67 RSCAN0.RMID67.UINT32
+#define RSCAN0RMID67L RSCAN0.RMID67.UINT16[L]
+#define RSCAN0RMID67LL RSCAN0.RMID67.UINT8[LL]
+#define RSCAN0RMID67LH RSCAN0.RMID67.UINT8[LH]
+#define RSCAN0RMID67H RSCAN0.RMID67.UINT16[H]
+#define RSCAN0RMID67HL RSCAN0.RMID67.UINT8[HL]
+#define RSCAN0RMID67HH RSCAN0.RMID67.UINT8[HH]
+#define RSCAN0RMPTR67 RSCAN0.RMPTR67.UINT32
+#define RSCAN0RMPTR67L RSCAN0.RMPTR67.UINT16[L]
+#define RSCAN0RMPTR67LL RSCAN0.RMPTR67.UINT8[LL]
+#define RSCAN0RMPTR67LH RSCAN0.RMPTR67.UINT8[LH]
+#define RSCAN0RMPTR67H RSCAN0.RMPTR67.UINT16[H]
+#define RSCAN0RMPTR67HL RSCAN0.RMPTR67.UINT8[HL]
+#define RSCAN0RMPTR67HH RSCAN0.RMPTR67.UINT8[HH]
+#define RSCAN0RMDF067 RSCAN0.RMDF067.UINT32
+#define RSCAN0RMDF067L RSCAN0.RMDF067.UINT16[L]
+#define RSCAN0RMDF067LL RSCAN0.RMDF067.UINT8[LL]
+#define RSCAN0RMDF067LH RSCAN0.RMDF067.UINT8[LH]
+#define RSCAN0RMDF067H RSCAN0.RMDF067.UINT16[H]
+#define RSCAN0RMDF067HL RSCAN0.RMDF067.UINT8[HL]
+#define RSCAN0RMDF067HH RSCAN0.RMDF067.UINT8[HH]
+#define RSCAN0RMDF167 RSCAN0.RMDF167.UINT32
+#define RSCAN0RMDF167L RSCAN0.RMDF167.UINT16[L]
+#define RSCAN0RMDF167LL RSCAN0.RMDF167.UINT8[LL]
+#define RSCAN0RMDF167LH RSCAN0.RMDF167.UINT8[LH]
+#define RSCAN0RMDF167H RSCAN0.RMDF167.UINT16[H]
+#define RSCAN0RMDF167HL RSCAN0.RMDF167.UINT8[HL]
+#define RSCAN0RMDF167HH RSCAN0.RMDF167.UINT8[HH]
+#define RSCAN0RMID68 RSCAN0.RMID68.UINT32
+#define RSCAN0RMID68L RSCAN0.RMID68.UINT16[L]
+#define RSCAN0RMID68LL RSCAN0.RMID68.UINT8[LL]
+#define RSCAN0RMID68LH RSCAN0.RMID68.UINT8[LH]
+#define RSCAN0RMID68H RSCAN0.RMID68.UINT16[H]
+#define RSCAN0RMID68HL RSCAN0.RMID68.UINT8[HL]
+#define RSCAN0RMID68HH RSCAN0.RMID68.UINT8[HH]
+#define RSCAN0RMPTR68 RSCAN0.RMPTR68.UINT32
+#define RSCAN0RMPTR68L RSCAN0.RMPTR68.UINT16[L]
+#define RSCAN0RMPTR68LL RSCAN0.RMPTR68.UINT8[LL]
+#define RSCAN0RMPTR68LH RSCAN0.RMPTR68.UINT8[LH]
+#define RSCAN0RMPTR68H RSCAN0.RMPTR68.UINT16[H]
+#define RSCAN0RMPTR68HL RSCAN0.RMPTR68.UINT8[HL]
+#define RSCAN0RMPTR68HH RSCAN0.RMPTR68.UINT8[HH]
+#define RSCAN0RMDF068 RSCAN0.RMDF068.UINT32
+#define RSCAN0RMDF068L RSCAN0.RMDF068.UINT16[L]
+#define RSCAN0RMDF068LL RSCAN0.RMDF068.UINT8[LL]
+#define RSCAN0RMDF068LH RSCAN0.RMDF068.UINT8[LH]
+#define RSCAN0RMDF068H RSCAN0.RMDF068.UINT16[H]
+#define RSCAN0RMDF068HL RSCAN0.RMDF068.UINT8[HL]
+#define RSCAN0RMDF068HH RSCAN0.RMDF068.UINT8[HH]
+#define RSCAN0RMDF168 RSCAN0.RMDF168.UINT32
+#define RSCAN0RMDF168L RSCAN0.RMDF168.UINT16[L]
+#define RSCAN0RMDF168LL RSCAN0.RMDF168.UINT8[LL]
+#define RSCAN0RMDF168LH RSCAN0.RMDF168.UINT8[LH]
+#define RSCAN0RMDF168H RSCAN0.RMDF168.UINT16[H]
+#define RSCAN0RMDF168HL RSCAN0.RMDF168.UINT8[HL]
+#define RSCAN0RMDF168HH RSCAN0.RMDF168.UINT8[HH]
+#define RSCAN0RMID69 RSCAN0.RMID69.UINT32
+#define RSCAN0RMID69L RSCAN0.RMID69.UINT16[L]
+#define RSCAN0RMID69LL RSCAN0.RMID69.UINT8[LL]
+#define RSCAN0RMID69LH RSCAN0.RMID69.UINT8[LH]
+#define RSCAN0RMID69H RSCAN0.RMID69.UINT16[H]
+#define RSCAN0RMID69HL RSCAN0.RMID69.UINT8[HL]
+#define RSCAN0RMID69HH RSCAN0.RMID69.UINT8[HH]
+#define RSCAN0RMPTR69 RSCAN0.RMPTR69.UINT32
+#define RSCAN0RMPTR69L RSCAN0.RMPTR69.UINT16[L]
+#define RSCAN0RMPTR69LL RSCAN0.RMPTR69.UINT8[LL]
+#define RSCAN0RMPTR69LH RSCAN0.RMPTR69.UINT8[LH]
+#define RSCAN0RMPTR69H RSCAN0.RMPTR69.UINT16[H]
+#define RSCAN0RMPTR69HL RSCAN0.RMPTR69.UINT8[HL]
+#define RSCAN0RMPTR69HH RSCAN0.RMPTR69.UINT8[HH]
+#define RSCAN0RMDF069 RSCAN0.RMDF069.UINT32
+#define RSCAN0RMDF069L RSCAN0.RMDF069.UINT16[L]
+#define RSCAN0RMDF069LL RSCAN0.RMDF069.UINT8[LL]
+#define RSCAN0RMDF069LH RSCAN0.RMDF069.UINT8[LH]
+#define RSCAN0RMDF069H RSCAN0.RMDF069.UINT16[H]
+#define RSCAN0RMDF069HL RSCAN0.RMDF069.UINT8[HL]
+#define RSCAN0RMDF069HH RSCAN0.RMDF069.UINT8[HH]
+#define RSCAN0RMDF169 RSCAN0.RMDF169.UINT32
+#define RSCAN0RMDF169L RSCAN0.RMDF169.UINT16[L]
+#define RSCAN0RMDF169LL RSCAN0.RMDF169.UINT8[LL]
+#define RSCAN0RMDF169LH RSCAN0.RMDF169.UINT8[LH]
+#define RSCAN0RMDF169H RSCAN0.RMDF169.UINT16[H]
+#define RSCAN0RMDF169HL RSCAN0.RMDF169.UINT8[HL]
+#define RSCAN0RMDF169HH RSCAN0.RMDF169.UINT8[HH]
+#define RSCAN0RMID70 RSCAN0.RMID70.UINT32
+#define RSCAN0RMID70L RSCAN0.RMID70.UINT16[L]
+#define RSCAN0RMID70LL RSCAN0.RMID70.UINT8[LL]
+#define RSCAN0RMID70LH RSCAN0.RMID70.UINT8[LH]
+#define RSCAN0RMID70H RSCAN0.RMID70.UINT16[H]
+#define RSCAN0RMID70HL RSCAN0.RMID70.UINT8[HL]
+#define RSCAN0RMID70HH RSCAN0.RMID70.UINT8[HH]
+#define RSCAN0RMPTR70 RSCAN0.RMPTR70.UINT32
+#define RSCAN0RMPTR70L RSCAN0.RMPTR70.UINT16[L]
+#define RSCAN0RMPTR70LL RSCAN0.RMPTR70.UINT8[LL]
+#define RSCAN0RMPTR70LH RSCAN0.RMPTR70.UINT8[LH]
+#define RSCAN0RMPTR70H RSCAN0.RMPTR70.UINT16[H]
+#define RSCAN0RMPTR70HL RSCAN0.RMPTR70.UINT8[HL]
+#define RSCAN0RMPTR70HH RSCAN0.RMPTR70.UINT8[HH]
+#define RSCAN0RMDF070 RSCAN0.RMDF070.UINT32
+#define RSCAN0RMDF070L RSCAN0.RMDF070.UINT16[L]
+#define RSCAN0RMDF070LL RSCAN0.RMDF070.UINT8[LL]
+#define RSCAN0RMDF070LH RSCAN0.RMDF070.UINT8[LH]
+#define RSCAN0RMDF070H RSCAN0.RMDF070.UINT16[H]
+#define RSCAN0RMDF070HL RSCAN0.RMDF070.UINT8[HL]
+#define RSCAN0RMDF070HH RSCAN0.RMDF070.UINT8[HH]
+#define RSCAN0RMDF170 RSCAN0.RMDF170.UINT32
+#define RSCAN0RMDF170L RSCAN0.RMDF170.UINT16[L]
+#define RSCAN0RMDF170LL RSCAN0.RMDF170.UINT8[LL]
+#define RSCAN0RMDF170LH RSCAN0.RMDF170.UINT8[LH]
+#define RSCAN0RMDF170H RSCAN0.RMDF170.UINT16[H]
+#define RSCAN0RMDF170HL RSCAN0.RMDF170.UINT8[HL]
+#define RSCAN0RMDF170HH RSCAN0.RMDF170.UINT8[HH]
+#define RSCAN0RMID71 RSCAN0.RMID71.UINT32
+#define RSCAN0RMID71L RSCAN0.RMID71.UINT16[L]
+#define RSCAN0RMID71LL RSCAN0.RMID71.UINT8[LL]
+#define RSCAN0RMID71LH RSCAN0.RMID71.UINT8[LH]
+#define RSCAN0RMID71H RSCAN0.RMID71.UINT16[H]
+#define RSCAN0RMID71HL RSCAN0.RMID71.UINT8[HL]
+#define RSCAN0RMID71HH RSCAN0.RMID71.UINT8[HH]
+#define RSCAN0RMPTR71 RSCAN0.RMPTR71.UINT32
+#define RSCAN0RMPTR71L RSCAN0.RMPTR71.UINT16[L]
+#define RSCAN0RMPTR71LL RSCAN0.RMPTR71.UINT8[LL]
+#define RSCAN0RMPTR71LH RSCAN0.RMPTR71.UINT8[LH]
+#define RSCAN0RMPTR71H RSCAN0.RMPTR71.UINT16[H]
+#define RSCAN0RMPTR71HL RSCAN0.RMPTR71.UINT8[HL]
+#define RSCAN0RMPTR71HH RSCAN0.RMPTR71.UINT8[HH]
+#define RSCAN0RMDF071 RSCAN0.RMDF071.UINT32
+#define RSCAN0RMDF071L RSCAN0.RMDF071.UINT16[L]
+#define RSCAN0RMDF071LL RSCAN0.RMDF071.UINT8[LL]
+#define RSCAN0RMDF071LH RSCAN0.RMDF071.UINT8[LH]
+#define RSCAN0RMDF071H RSCAN0.RMDF071.UINT16[H]
+#define RSCAN0RMDF071HL RSCAN0.RMDF071.UINT8[HL]
+#define RSCAN0RMDF071HH RSCAN0.RMDF071.UINT8[HH]
+#define RSCAN0RMDF171 RSCAN0.RMDF171.UINT32
+#define RSCAN0RMDF171L RSCAN0.RMDF171.UINT16[L]
+#define RSCAN0RMDF171LL RSCAN0.RMDF171.UINT8[LL]
+#define RSCAN0RMDF171LH RSCAN0.RMDF171.UINT8[LH]
+#define RSCAN0RMDF171H RSCAN0.RMDF171.UINT16[H]
+#define RSCAN0RMDF171HL RSCAN0.RMDF171.UINT8[HL]
+#define RSCAN0RMDF171HH RSCAN0.RMDF171.UINT8[HH]
+#define RSCAN0RMID72 RSCAN0.RMID72.UINT32
+#define RSCAN0RMID72L RSCAN0.RMID72.UINT16[L]
+#define RSCAN0RMID72LL RSCAN0.RMID72.UINT8[LL]
+#define RSCAN0RMID72LH RSCAN0.RMID72.UINT8[LH]
+#define RSCAN0RMID72H RSCAN0.RMID72.UINT16[H]
+#define RSCAN0RMID72HL RSCAN0.RMID72.UINT8[HL]
+#define RSCAN0RMID72HH RSCAN0.RMID72.UINT8[HH]
+#define RSCAN0RMPTR72 RSCAN0.RMPTR72.UINT32
+#define RSCAN0RMPTR72L RSCAN0.RMPTR72.UINT16[L]
+#define RSCAN0RMPTR72LL RSCAN0.RMPTR72.UINT8[LL]
+#define RSCAN0RMPTR72LH RSCAN0.RMPTR72.UINT8[LH]
+#define RSCAN0RMPTR72H RSCAN0.RMPTR72.UINT16[H]
+#define RSCAN0RMPTR72HL RSCAN0.RMPTR72.UINT8[HL]
+#define RSCAN0RMPTR72HH RSCAN0.RMPTR72.UINT8[HH]
+#define RSCAN0RMDF072 RSCAN0.RMDF072.UINT32
+#define RSCAN0RMDF072L RSCAN0.RMDF072.UINT16[L]
+#define RSCAN0RMDF072LL RSCAN0.RMDF072.UINT8[LL]
+#define RSCAN0RMDF072LH RSCAN0.RMDF072.UINT8[LH]
+#define RSCAN0RMDF072H RSCAN0.RMDF072.UINT16[H]
+#define RSCAN0RMDF072HL RSCAN0.RMDF072.UINT8[HL]
+#define RSCAN0RMDF072HH RSCAN0.RMDF072.UINT8[HH]
+#define RSCAN0RMDF172 RSCAN0.RMDF172.UINT32
+#define RSCAN0RMDF172L RSCAN0.RMDF172.UINT16[L]
+#define RSCAN0RMDF172LL RSCAN0.RMDF172.UINT8[LL]
+#define RSCAN0RMDF172LH RSCAN0.RMDF172.UINT8[LH]
+#define RSCAN0RMDF172H RSCAN0.RMDF172.UINT16[H]
+#define RSCAN0RMDF172HL RSCAN0.RMDF172.UINT8[HL]
+#define RSCAN0RMDF172HH RSCAN0.RMDF172.UINT8[HH]
+#define RSCAN0RMID73 RSCAN0.RMID73.UINT32
+#define RSCAN0RMID73L RSCAN0.RMID73.UINT16[L]
+#define RSCAN0RMID73LL RSCAN0.RMID73.UINT8[LL]
+#define RSCAN0RMID73LH RSCAN0.RMID73.UINT8[LH]
+#define RSCAN0RMID73H RSCAN0.RMID73.UINT16[H]
+#define RSCAN0RMID73HL RSCAN0.RMID73.UINT8[HL]
+#define RSCAN0RMID73HH RSCAN0.RMID73.UINT8[HH]
+#define RSCAN0RMPTR73 RSCAN0.RMPTR73.UINT32
+#define RSCAN0RMPTR73L RSCAN0.RMPTR73.UINT16[L]
+#define RSCAN0RMPTR73LL RSCAN0.RMPTR73.UINT8[LL]
+#define RSCAN0RMPTR73LH RSCAN0.RMPTR73.UINT8[LH]
+#define RSCAN0RMPTR73H RSCAN0.RMPTR73.UINT16[H]
+#define RSCAN0RMPTR73HL RSCAN0.RMPTR73.UINT8[HL]
+#define RSCAN0RMPTR73HH RSCAN0.RMPTR73.UINT8[HH]
+#define RSCAN0RMDF073 RSCAN0.RMDF073.UINT32
+#define RSCAN0RMDF073L RSCAN0.RMDF073.UINT16[L]
+#define RSCAN0RMDF073LL RSCAN0.RMDF073.UINT8[LL]
+#define RSCAN0RMDF073LH RSCAN0.RMDF073.UINT8[LH]
+#define RSCAN0RMDF073H RSCAN0.RMDF073.UINT16[H]
+#define RSCAN0RMDF073HL RSCAN0.RMDF073.UINT8[HL]
+#define RSCAN0RMDF073HH RSCAN0.RMDF073.UINT8[HH]
+#define RSCAN0RMDF173 RSCAN0.RMDF173.UINT32
+#define RSCAN0RMDF173L RSCAN0.RMDF173.UINT16[L]
+#define RSCAN0RMDF173LL RSCAN0.RMDF173.UINT8[LL]
+#define RSCAN0RMDF173LH RSCAN0.RMDF173.UINT8[LH]
+#define RSCAN0RMDF173H RSCAN0.RMDF173.UINT16[H]
+#define RSCAN0RMDF173HL RSCAN0.RMDF173.UINT8[HL]
+#define RSCAN0RMDF173HH RSCAN0.RMDF173.UINT8[HH]
+#define RSCAN0RMID74 RSCAN0.RMID74.UINT32
+#define RSCAN0RMID74L RSCAN0.RMID74.UINT16[L]
+#define RSCAN0RMID74LL RSCAN0.RMID74.UINT8[LL]
+#define RSCAN0RMID74LH RSCAN0.RMID74.UINT8[LH]
+#define RSCAN0RMID74H RSCAN0.RMID74.UINT16[H]
+#define RSCAN0RMID74HL RSCAN0.RMID74.UINT8[HL]
+#define RSCAN0RMID74HH RSCAN0.RMID74.UINT8[HH]
+#define RSCAN0RMPTR74 RSCAN0.RMPTR74.UINT32
+#define RSCAN0RMPTR74L RSCAN0.RMPTR74.UINT16[L]
+#define RSCAN0RMPTR74LL RSCAN0.RMPTR74.UINT8[LL]
+#define RSCAN0RMPTR74LH RSCAN0.RMPTR74.UINT8[LH]
+#define RSCAN0RMPTR74H RSCAN0.RMPTR74.UINT16[H]
+#define RSCAN0RMPTR74HL RSCAN0.RMPTR74.UINT8[HL]
+#define RSCAN0RMPTR74HH RSCAN0.RMPTR74.UINT8[HH]
+#define RSCAN0RMDF074 RSCAN0.RMDF074.UINT32
+#define RSCAN0RMDF074L RSCAN0.RMDF074.UINT16[L]
+#define RSCAN0RMDF074LL RSCAN0.RMDF074.UINT8[LL]
+#define RSCAN0RMDF074LH RSCAN0.RMDF074.UINT8[LH]
+#define RSCAN0RMDF074H RSCAN0.RMDF074.UINT16[H]
+#define RSCAN0RMDF074HL RSCAN0.RMDF074.UINT8[HL]
+#define RSCAN0RMDF074HH RSCAN0.RMDF074.UINT8[HH]
+#define RSCAN0RMDF174 RSCAN0.RMDF174.UINT32
+#define RSCAN0RMDF174L RSCAN0.RMDF174.UINT16[L]
+#define RSCAN0RMDF174LL RSCAN0.RMDF174.UINT8[LL]
+#define RSCAN0RMDF174LH RSCAN0.RMDF174.UINT8[LH]
+#define RSCAN0RMDF174H RSCAN0.RMDF174.UINT16[H]
+#define RSCAN0RMDF174HL RSCAN0.RMDF174.UINT8[HL]
+#define RSCAN0RMDF174HH RSCAN0.RMDF174.UINT8[HH]
+#define RSCAN0RMID75 RSCAN0.RMID75.UINT32
+#define RSCAN0RMID75L RSCAN0.RMID75.UINT16[L]
+#define RSCAN0RMID75LL RSCAN0.RMID75.UINT8[LL]
+#define RSCAN0RMID75LH RSCAN0.RMID75.UINT8[LH]
+#define RSCAN0RMID75H RSCAN0.RMID75.UINT16[H]
+#define RSCAN0RMID75HL RSCAN0.RMID75.UINT8[HL]
+#define RSCAN0RMID75HH RSCAN0.RMID75.UINT8[HH]
+#define RSCAN0RMPTR75 RSCAN0.RMPTR75.UINT32
+#define RSCAN0RMPTR75L RSCAN0.RMPTR75.UINT16[L]
+#define RSCAN0RMPTR75LL RSCAN0.RMPTR75.UINT8[LL]
+#define RSCAN0RMPTR75LH RSCAN0.RMPTR75.UINT8[LH]
+#define RSCAN0RMPTR75H RSCAN0.RMPTR75.UINT16[H]
+#define RSCAN0RMPTR75HL RSCAN0.RMPTR75.UINT8[HL]
+#define RSCAN0RMPTR75HH RSCAN0.RMPTR75.UINT8[HH]
+#define RSCAN0RMDF075 RSCAN0.RMDF075.UINT32
+#define RSCAN0RMDF075L RSCAN0.RMDF075.UINT16[L]
+#define RSCAN0RMDF075LL RSCAN0.RMDF075.UINT8[LL]
+#define RSCAN0RMDF075LH RSCAN0.RMDF075.UINT8[LH]
+#define RSCAN0RMDF075H RSCAN0.RMDF075.UINT16[H]
+#define RSCAN0RMDF075HL RSCAN0.RMDF075.UINT8[HL]
+#define RSCAN0RMDF075HH RSCAN0.RMDF075.UINT8[HH]
+#define RSCAN0RMDF175 RSCAN0.RMDF175.UINT32
+#define RSCAN0RMDF175L RSCAN0.RMDF175.UINT16[L]
+#define RSCAN0RMDF175LL RSCAN0.RMDF175.UINT8[LL]
+#define RSCAN0RMDF175LH RSCAN0.RMDF175.UINT8[LH]
+#define RSCAN0RMDF175H RSCAN0.RMDF175.UINT16[H]
+#define RSCAN0RMDF175HL RSCAN0.RMDF175.UINT8[HL]
+#define RSCAN0RMDF175HH RSCAN0.RMDF175.UINT8[HH]
+#define RSCAN0RMID76 RSCAN0.RMID76.UINT32
+#define RSCAN0RMID76L RSCAN0.RMID76.UINT16[L]
+#define RSCAN0RMID76LL RSCAN0.RMID76.UINT8[LL]
+#define RSCAN0RMID76LH RSCAN0.RMID76.UINT8[LH]
+#define RSCAN0RMID76H RSCAN0.RMID76.UINT16[H]
+#define RSCAN0RMID76HL RSCAN0.RMID76.UINT8[HL]
+#define RSCAN0RMID76HH RSCAN0.RMID76.UINT8[HH]
+#define RSCAN0RMPTR76 RSCAN0.RMPTR76.UINT32
+#define RSCAN0RMPTR76L RSCAN0.RMPTR76.UINT16[L]
+#define RSCAN0RMPTR76LL RSCAN0.RMPTR76.UINT8[LL]
+#define RSCAN0RMPTR76LH RSCAN0.RMPTR76.UINT8[LH]
+#define RSCAN0RMPTR76H RSCAN0.RMPTR76.UINT16[H]
+#define RSCAN0RMPTR76HL RSCAN0.RMPTR76.UINT8[HL]
+#define RSCAN0RMPTR76HH RSCAN0.RMPTR76.UINT8[HH]
+#define RSCAN0RMDF076 RSCAN0.RMDF076.UINT32
+#define RSCAN0RMDF076L RSCAN0.RMDF076.UINT16[L]
+#define RSCAN0RMDF076LL RSCAN0.RMDF076.UINT8[LL]
+#define RSCAN0RMDF076LH RSCAN0.RMDF076.UINT8[LH]
+#define RSCAN0RMDF076H RSCAN0.RMDF076.UINT16[H]
+#define RSCAN0RMDF076HL RSCAN0.RMDF076.UINT8[HL]
+#define RSCAN0RMDF076HH RSCAN0.RMDF076.UINT8[HH]
+#define RSCAN0RMDF176 RSCAN0.RMDF176.UINT32
+#define RSCAN0RMDF176L RSCAN0.RMDF176.UINT16[L]
+#define RSCAN0RMDF176LL RSCAN0.RMDF176.UINT8[LL]
+#define RSCAN0RMDF176LH RSCAN0.RMDF176.UINT8[LH]
+#define RSCAN0RMDF176H RSCAN0.RMDF176.UINT16[H]
+#define RSCAN0RMDF176HL RSCAN0.RMDF176.UINT8[HL]
+#define RSCAN0RMDF176HH RSCAN0.RMDF176.UINT8[HH]
+#define RSCAN0RMID77 RSCAN0.RMID77.UINT32
+#define RSCAN0RMID77L RSCAN0.RMID77.UINT16[L]
+#define RSCAN0RMID77LL RSCAN0.RMID77.UINT8[LL]
+#define RSCAN0RMID77LH RSCAN0.RMID77.UINT8[LH]
+#define RSCAN0RMID77H RSCAN0.RMID77.UINT16[H]
+#define RSCAN0RMID77HL RSCAN0.RMID77.UINT8[HL]
+#define RSCAN0RMID77HH RSCAN0.RMID77.UINT8[HH]
+#define RSCAN0RMPTR77 RSCAN0.RMPTR77.UINT32
+#define RSCAN0RMPTR77L RSCAN0.RMPTR77.UINT16[L]
+#define RSCAN0RMPTR77LL RSCAN0.RMPTR77.UINT8[LL]
+#define RSCAN0RMPTR77LH RSCAN0.RMPTR77.UINT8[LH]
+#define RSCAN0RMPTR77H RSCAN0.RMPTR77.UINT16[H]
+#define RSCAN0RMPTR77HL RSCAN0.RMPTR77.UINT8[HL]
+#define RSCAN0RMPTR77HH RSCAN0.RMPTR77.UINT8[HH]
+#define RSCAN0RMDF077 RSCAN0.RMDF077.UINT32
+#define RSCAN0RMDF077L RSCAN0.RMDF077.UINT16[L]
+#define RSCAN0RMDF077LL RSCAN0.RMDF077.UINT8[LL]
+#define RSCAN0RMDF077LH RSCAN0.RMDF077.UINT8[LH]
+#define RSCAN0RMDF077H RSCAN0.RMDF077.UINT16[H]
+#define RSCAN0RMDF077HL RSCAN0.RMDF077.UINT8[HL]
+#define RSCAN0RMDF077HH RSCAN0.RMDF077.UINT8[HH]
+#define RSCAN0RMDF177 RSCAN0.RMDF177.UINT32
+#define RSCAN0RMDF177L RSCAN0.RMDF177.UINT16[L]
+#define RSCAN0RMDF177LL RSCAN0.RMDF177.UINT8[LL]
+#define RSCAN0RMDF177LH RSCAN0.RMDF177.UINT8[LH]
+#define RSCAN0RMDF177H RSCAN0.RMDF177.UINT16[H]
+#define RSCAN0RMDF177HL RSCAN0.RMDF177.UINT8[HL]
+#define RSCAN0RMDF177HH RSCAN0.RMDF177.UINT8[HH]
+#define RSCAN0RMID78 RSCAN0.RMID78.UINT32
+#define RSCAN0RMID78L RSCAN0.RMID78.UINT16[L]
+#define RSCAN0RMID78LL RSCAN0.RMID78.UINT8[LL]
+#define RSCAN0RMID78LH RSCAN0.RMID78.UINT8[LH]
+#define RSCAN0RMID78H RSCAN0.RMID78.UINT16[H]
+#define RSCAN0RMID78HL RSCAN0.RMID78.UINT8[HL]
+#define RSCAN0RMID78HH RSCAN0.RMID78.UINT8[HH]
+#define RSCAN0RMPTR78 RSCAN0.RMPTR78.UINT32
+#define RSCAN0RMPTR78L RSCAN0.RMPTR78.UINT16[L]
+#define RSCAN0RMPTR78LL RSCAN0.RMPTR78.UINT8[LL]
+#define RSCAN0RMPTR78LH RSCAN0.RMPTR78.UINT8[LH]
+#define RSCAN0RMPTR78H RSCAN0.RMPTR78.UINT16[H]
+#define RSCAN0RMPTR78HL RSCAN0.RMPTR78.UINT8[HL]
+#define RSCAN0RMPTR78HH RSCAN0.RMPTR78.UINT8[HH]
+#define RSCAN0RMDF078 RSCAN0.RMDF078.UINT32
+#define RSCAN0RMDF078L RSCAN0.RMDF078.UINT16[L]
+#define RSCAN0RMDF078LL RSCAN0.RMDF078.UINT8[LL]
+#define RSCAN0RMDF078LH RSCAN0.RMDF078.UINT8[LH]
+#define RSCAN0RMDF078H RSCAN0.RMDF078.UINT16[H]
+#define RSCAN0RMDF078HL RSCAN0.RMDF078.UINT8[HL]
+#define RSCAN0RMDF078HH RSCAN0.RMDF078.UINT8[HH]
+#define RSCAN0RMDF178 RSCAN0.RMDF178.UINT32
+#define RSCAN0RMDF178L RSCAN0.RMDF178.UINT16[L]
+#define RSCAN0RMDF178LL RSCAN0.RMDF178.UINT8[LL]
+#define RSCAN0RMDF178LH RSCAN0.RMDF178.UINT8[LH]
+#define RSCAN0RMDF178H RSCAN0.RMDF178.UINT16[H]
+#define RSCAN0RMDF178HL RSCAN0.RMDF178.UINT8[HL]
+#define RSCAN0RMDF178HH RSCAN0.RMDF178.UINT8[HH]
+#define RSCAN0RMID79 RSCAN0.RMID79.UINT32
+#define RSCAN0RMID79L RSCAN0.RMID79.UINT16[L]
+#define RSCAN0RMID79LL RSCAN0.RMID79.UINT8[LL]
+#define RSCAN0RMID79LH RSCAN0.RMID79.UINT8[LH]
+#define RSCAN0RMID79H RSCAN0.RMID79.UINT16[H]
+#define RSCAN0RMID79HL RSCAN0.RMID79.UINT8[HL]
+#define RSCAN0RMID79HH RSCAN0.RMID79.UINT8[HH]
+#define RSCAN0RMPTR79 RSCAN0.RMPTR79.UINT32
+#define RSCAN0RMPTR79L RSCAN0.RMPTR79.UINT16[L]
+#define RSCAN0RMPTR79LL RSCAN0.RMPTR79.UINT8[LL]
+#define RSCAN0RMPTR79LH RSCAN0.RMPTR79.UINT8[LH]
+#define RSCAN0RMPTR79H RSCAN0.RMPTR79.UINT16[H]
+#define RSCAN0RMPTR79HL RSCAN0.RMPTR79.UINT8[HL]
+#define RSCAN0RMPTR79HH RSCAN0.RMPTR79.UINT8[HH]
+#define RSCAN0RMDF079 RSCAN0.RMDF079.UINT32
+#define RSCAN0RMDF079L RSCAN0.RMDF079.UINT16[L]
+#define RSCAN0RMDF079LL RSCAN0.RMDF079.UINT8[LL]
+#define RSCAN0RMDF079LH RSCAN0.RMDF079.UINT8[LH]
+#define RSCAN0RMDF079H RSCAN0.RMDF079.UINT16[H]
+#define RSCAN0RMDF079HL RSCAN0.RMDF079.UINT8[HL]
+#define RSCAN0RMDF079HH RSCAN0.RMDF079.UINT8[HH]
+#define RSCAN0RMDF179 RSCAN0.RMDF179.UINT32
+#define RSCAN0RMDF179L RSCAN0.RMDF179.UINT16[L]
+#define RSCAN0RMDF179LL RSCAN0.RMDF179.UINT8[LL]
+#define RSCAN0RMDF179LH RSCAN0.RMDF179.UINT8[LH]
+#define RSCAN0RMDF179H RSCAN0.RMDF179.UINT16[H]
+#define RSCAN0RMDF179HL RSCAN0.RMDF179.UINT8[HL]
+#define RSCAN0RMDF179HH RSCAN0.RMDF179.UINT8[HH]
+#define RSCAN0RFID0 RSCAN0.RFID0.UINT32
+#define RSCAN0RFID0L RSCAN0.RFID0.UINT16[L]
+#define RSCAN0RFID0LL RSCAN0.RFID0.UINT8[LL]
+#define RSCAN0RFID0LH RSCAN0.RFID0.UINT8[LH]
+#define RSCAN0RFID0H RSCAN0.RFID0.UINT16[H]
+#define RSCAN0RFID0HL RSCAN0.RFID0.UINT8[HL]
+#define RSCAN0RFID0HH RSCAN0.RFID0.UINT8[HH]
+#define RSCAN0RFPTR0 RSCAN0.RFPTR0.UINT32
+#define RSCAN0RFPTR0L RSCAN0.RFPTR0.UINT16[L]
+#define RSCAN0RFPTR0LL RSCAN0.RFPTR0.UINT8[LL]
+#define RSCAN0RFPTR0LH RSCAN0.RFPTR0.UINT8[LH]
+#define RSCAN0RFPTR0H RSCAN0.RFPTR0.UINT16[H]
+#define RSCAN0RFPTR0HL RSCAN0.RFPTR0.UINT8[HL]
+#define RSCAN0RFPTR0HH RSCAN0.RFPTR0.UINT8[HH]
+#define RSCAN0RFDF00 RSCAN0.RFDF00.UINT32
+#define RSCAN0RFDF00L RSCAN0.RFDF00.UINT16[L]
+#define RSCAN0RFDF00LL RSCAN0.RFDF00.UINT8[LL]
+#define RSCAN0RFDF00LH RSCAN0.RFDF00.UINT8[LH]
+#define RSCAN0RFDF00H RSCAN0.RFDF00.UINT16[H]
+#define RSCAN0RFDF00HL RSCAN0.RFDF00.UINT8[HL]
+#define RSCAN0RFDF00HH RSCAN0.RFDF00.UINT8[HH]
+#define RSCAN0RFDF10 RSCAN0.RFDF10.UINT32
+#define RSCAN0RFDF10L RSCAN0.RFDF10.UINT16[L]
+#define RSCAN0RFDF10LL RSCAN0.RFDF10.UINT8[LL]
+#define RSCAN0RFDF10LH RSCAN0.RFDF10.UINT8[LH]
+#define RSCAN0RFDF10H RSCAN0.RFDF10.UINT16[H]
+#define RSCAN0RFDF10HL RSCAN0.RFDF10.UINT8[HL]
+#define RSCAN0RFDF10HH RSCAN0.RFDF10.UINT8[HH]
+#define RSCAN0RFID1 RSCAN0.RFID1.UINT32
+#define RSCAN0RFID1L RSCAN0.RFID1.UINT16[L]
+#define RSCAN0RFID1LL RSCAN0.RFID1.UINT8[LL]
+#define RSCAN0RFID1LH RSCAN0.RFID1.UINT8[LH]
+#define RSCAN0RFID1H RSCAN0.RFID1.UINT16[H]
+#define RSCAN0RFID1HL RSCAN0.RFID1.UINT8[HL]
+#define RSCAN0RFID1HH RSCAN0.RFID1.UINT8[HH]
+#define RSCAN0RFPTR1 RSCAN0.RFPTR1.UINT32
+#define RSCAN0RFPTR1L RSCAN0.RFPTR1.UINT16[L]
+#define RSCAN0RFPTR1LL RSCAN0.RFPTR1.UINT8[LL]
+#define RSCAN0RFPTR1LH RSCAN0.RFPTR1.UINT8[LH]
+#define RSCAN0RFPTR1H RSCAN0.RFPTR1.UINT16[H]
+#define RSCAN0RFPTR1HL RSCAN0.RFPTR1.UINT8[HL]
+#define RSCAN0RFPTR1HH RSCAN0.RFPTR1.UINT8[HH]
+#define RSCAN0RFDF01 RSCAN0.RFDF01.UINT32
+#define RSCAN0RFDF01L RSCAN0.RFDF01.UINT16[L]
+#define RSCAN0RFDF01LL RSCAN0.RFDF01.UINT8[LL]
+#define RSCAN0RFDF01LH RSCAN0.RFDF01.UINT8[LH]
+#define RSCAN0RFDF01H RSCAN0.RFDF01.UINT16[H]
+#define RSCAN0RFDF01HL RSCAN0.RFDF01.UINT8[HL]
+#define RSCAN0RFDF01HH RSCAN0.RFDF01.UINT8[HH]
+#define RSCAN0RFDF11 RSCAN0.RFDF11.UINT32
+#define RSCAN0RFDF11L RSCAN0.RFDF11.UINT16[L]
+#define RSCAN0RFDF11LL RSCAN0.RFDF11.UINT8[LL]
+#define RSCAN0RFDF11LH RSCAN0.RFDF11.UINT8[LH]
+#define RSCAN0RFDF11H RSCAN0.RFDF11.UINT16[H]
+#define RSCAN0RFDF11HL RSCAN0.RFDF11.UINT8[HL]
+#define RSCAN0RFDF11HH RSCAN0.RFDF11.UINT8[HH]
+#define RSCAN0RFID2 RSCAN0.RFID2.UINT32
+#define RSCAN0RFID2L RSCAN0.RFID2.UINT16[L]
+#define RSCAN0RFID2LL RSCAN0.RFID2.UINT8[LL]
+#define RSCAN0RFID2LH RSCAN0.RFID2.UINT8[LH]
+#define RSCAN0RFID2H RSCAN0.RFID2.UINT16[H]
+#define RSCAN0RFID2HL RSCAN0.RFID2.UINT8[HL]
+#define RSCAN0RFID2HH RSCAN0.RFID2.UINT8[HH]
+#define RSCAN0RFPTR2 RSCAN0.RFPTR2.UINT32
+#define RSCAN0RFPTR2L RSCAN0.RFPTR2.UINT16[L]
+#define RSCAN0RFPTR2LL RSCAN0.RFPTR2.UINT8[LL]
+#define RSCAN0RFPTR2LH RSCAN0.RFPTR2.UINT8[LH]
+#define RSCAN0RFPTR2H RSCAN0.RFPTR2.UINT16[H]
+#define RSCAN0RFPTR2HL RSCAN0.RFPTR2.UINT8[HL]
+#define RSCAN0RFPTR2HH RSCAN0.RFPTR2.UINT8[HH]
+#define RSCAN0RFDF02 RSCAN0.RFDF02.UINT32
+#define RSCAN0RFDF02L RSCAN0.RFDF02.UINT16[L]
+#define RSCAN0RFDF02LL RSCAN0.RFDF02.UINT8[LL]
+#define RSCAN0RFDF02LH RSCAN0.RFDF02.UINT8[LH]
+#define RSCAN0RFDF02H RSCAN0.RFDF02.UINT16[H]
+#define RSCAN0RFDF02HL RSCAN0.RFDF02.UINT8[HL]
+#define RSCAN0RFDF02HH RSCAN0.RFDF02.UINT8[HH]
+#define RSCAN0RFDF12 RSCAN0.RFDF12.UINT32
+#define RSCAN0RFDF12L RSCAN0.RFDF12.UINT16[L]
+#define RSCAN0RFDF12LL RSCAN0.RFDF12.UINT8[LL]
+#define RSCAN0RFDF12LH RSCAN0.RFDF12.UINT8[LH]
+#define RSCAN0RFDF12H RSCAN0.RFDF12.UINT16[H]
+#define RSCAN0RFDF12HL RSCAN0.RFDF12.UINT8[HL]
+#define RSCAN0RFDF12HH RSCAN0.RFDF12.UINT8[HH]
+#define RSCAN0RFID3 RSCAN0.RFID3.UINT32
+#define RSCAN0RFID3L RSCAN0.RFID3.UINT16[L]
+#define RSCAN0RFID3LL RSCAN0.RFID3.UINT8[LL]
+#define RSCAN0RFID3LH RSCAN0.RFID3.UINT8[LH]
+#define RSCAN0RFID3H RSCAN0.RFID3.UINT16[H]
+#define RSCAN0RFID3HL RSCAN0.RFID3.UINT8[HL]
+#define RSCAN0RFID3HH RSCAN0.RFID3.UINT8[HH]
+#define RSCAN0RFPTR3 RSCAN0.RFPTR3.UINT32
+#define RSCAN0RFPTR3L RSCAN0.RFPTR3.UINT16[L]
+#define RSCAN0RFPTR3LL RSCAN0.RFPTR3.UINT8[LL]
+#define RSCAN0RFPTR3LH RSCAN0.RFPTR3.UINT8[LH]
+#define RSCAN0RFPTR3H RSCAN0.RFPTR3.UINT16[H]
+#define RSCAN0RFPTR3HL RSCAN0.RFPTR3.UINT8[HL]
+#define RSCAN0RFPTR3HH RSCAN0.RFPTR3.UINT8[HH]
+#define RSCAN0RFDF03 RSCAN0.RFDF03.UINT32
+#define RSCAN0RFDF03L RSCAN0.RFDF03.UINT16[L]
+#define RSCAN0RFDF03LL RSCAN0.RFDF03.UINT8[LL]
+#define RSCAN0RFDF03LH RSCAN0.RFDF03.UINT8[LH]
+#define RSCAN0RFDF03H RSCAN0.RFDF03.UINT16[H]
+#define RSCAN0RFDF03HL RSCAN0.RFDF03.UINT8[HL]
+#define RSCAN0RFDF03HH RSCAN0.RFDF03.UINT8[HH]
+#define RSCAN0RFDF13 RSCAN0.RFDF13.UINT32
+#define RSCAN0RFDF13L RSCAN0.RFDF13.UINT16[L]
+#define RSCAN0RFDF13LL RSCAN0.RFDF13.UINT8[LL]
+#define RSCAN0RFDF13LH RSCAN0.RFDF13.UINT8[LH]
+#define RSCAN0RFDF13H RSCAN0.RFDF13.UINT16[H]
+#define RSCAN0RFDF13HL RSCAN0.RFDF13.UINT8[HL]
+#define RSCAN0RFDF13HH RSCAN0.RFDF13.UINT8[HH]
+#define RSCAN0RFID4 RSCAN0.RFID4.UINT32
+#define RSCAN0RFID4L RSCAN0.RFID4.UINT16[L]
+#define RSCAN0RFID4LL RSCAN0.RFID4.UINT8[LL]
+#define RSCAN0RFID4LH RSCAN0.RFID4.UINT8[LH]
+#define RSCAN0RFID4H RSCAN0.RFID4.UINT16[H]
+#define RSCAN0RFID4HL RSCAN0.RFID4.UINT8[HL]
+#define RSCAN0RFID4HH RSCAN0.RFID4.UINT8[HH]
+#define RSCAN0RFPTR4 RSCAN0.RFPTR4.UINT32
+#define RSCAN0RFPTR4L RSCAN0.RFPTR4.UINT16[L]
+#define RSCAN0RFPTR4LL RSCAN0.RFPTR4.UINT8[LL]
+#define RSCAN0RFPTR4LH RSCAN0.RFPTR4.UINT8[LH]
+#define RSCAN0RFPTR4H RSCAN0.RFPTR4.UINT16[H]
+#define RSCAN0RFPTR4HL RSCAN0.RFPTR4.UINT8[HL]
+#define RSCAN0RFPTR4HH RSCAN0.RFPTR4.UINT8[HH]
+#define RSCAN0RFDF04 RSCAN0.RFDF04.UINT32
+#define RSCAN0RFDF04L RSCAN0.RFDF04.UINT16[L]
+#define RSCAN0RFDF04LL RSCAN0.RFDF04.UINT8[LL]
+#define RSCAN0RFDF04LH RSCAN0.RFDF04.UINT8[LH]
+#define RSCAN0RFDF04H RSCAN0.RFDF04.UINT16[H]
+#define RSCAN0RFDF04HL RSCAN0.RFDF04.UINT8[HL]
+#define RSCAN0RFDF04HH RSCAN0.RFDF04.UINT8[HH]
+#define RSCAN0RFDF14 RSCAN0.RFDF14.UINT32
+#define RSCAN0RFDF14L RSCAN0.RFDF14.UINT16[L]
+#define RSCAN0RFDF14LL RSCAN0.RFDF14.UINT8[LL]
+#define RSCAN0RFDF14LH RSCAN0.RFDF14.UINT8[LH]
+#define RSCAN0RFDF14H RSCAN0.RFDF14.UINT16[H]
+#define RSCAN0RFDF14HL RSCAN0.RFDF14.UINT8[HL]
+#define RSCAN0RFDF14HH RSCAN0.RFDF14.UINT8[HH]
+#define RSCAN0RFID5 RSCAN0.RFID5.UINT32
+#define RSCAN0RFID5L RSCAN0.RFID5.UINT16[L]
+#define RSCAN0RFID5LL RSCAN0.RFID5.UINT8[LL]
+#define RSCAN0RFID5LH RSCAN0.RFID5.UINT8[LH]
+#define RSCAN0RFID5H RSCAN0.RFID5.UINT16[H]
+#define RSCAN0RFID5HL RSCAN0.RFID5.UINT8[HL]
+#define RSCAN0RFID5HH RSCAN0.RFID5.UINT8[HH]
+#define RSCAN0RFPTR5 RSCAN0.RFPTR5.UINT32
+#define RSCAN0RFPTR5L RSCAN0.RFPTR5.UINT16[L]
+#define RSCAN0RFPTR5LL RSCAN0.RFPTR5.UINT8[LL]
+#define RSCAN0RFPTR5LH RSCAN0.RFPTR5.UINT8[LH]
+#define RSCAN0RFPTR5H RSCAN0.RFPTR5.UINT16[H]
+#define RSCAN0RFPTR5HL RSCAN0.RFPTR5.UINT8[HL]
+#define RSCAN0RFPTR5HH RSCAN0.RFPTR5.UINT8[HH]
+#define RSCAN0RFDF05 RSCAN0.RFDF05.UINT32
+#define RSCAN0RFDF05L RSCAN0.RFDF05.UINT16[L]
+#define RSCAN0RFDF05LL RSCAN0.RFDF05.UINT8[LL]
+#define RSCAN0RFDF05LH RSCAN0.RFDF05.UINT8[LH]
+#define RSCAN0RFDF05H RSCAN0.RFDF05.UINT16[H]
+#define RSCAN0RFDF05HL RSCAN0.RFDF05.UINT8[HL]
+#define RSCAN0RFDF05HH RSCAN0.RFDF05.UINT8[HH]
+#define RSCAN0RFDF15 RSCAN0.RFDF15.UINT32
+#define RSCAN0RFDF15L RSCAN0.RFDF15.UINT16[L]
+#define RSCAN0RFDF15LL RSCAN0.RFDF15.UINT8[LL]
+#define RSCAN0RFDF15LH RSCAN0.RFDF15.UINT8[LH]
+#define RSCAN0RFDF15H RSCAN0.RFDF15.UINT16[H]
+#define RSCAN0RFDF15HL RSCAN0.RFDF15.UINT8[HL]
+#define RSCAN0RFDF15HH RSCAN0.RFDF15.UINT8[HH]
+#define RSCAN0RFID6 RSCAN0.RFID6.UINT32
+#define RSCAN0RFID6L RSCAN0.RFID6.UINT16[L]
+#define RSCAN0RFID6LL RSCAN0.RFID6.UINT8[LL]
+#define RSCAN0RFID6LH RSCAN0.RFID6.UINT8[LH]
+#define RSCAN0RFID6H RSCAN0.RFID6.UINT16[H]
+#define RSCAN0RFID6HL RSCAN0.RFID6.UINT8[HL]
+#define RSCAN0RFID6HH RSCAN0.RFID6.UINT8[HH]
+#define RSCAN0RFPTR6 RSCAN0.RFPTR6.UINT32
+#define RSCAN0RFPTR6L RSCAN0.RFPTR6.UINT16[L]
+#define RSCAN0RFPTR6LL RSCAN0.RFPTR6.UINT8[LL]
+#define RSCAN0RFPTR6LH RSCAN0.RFPTR6.UINT8[LH]
+#define RSCAN0RFPTR6H RSCAN0.RFPTR6.UINT16[H]
+#define RSCAN0RFPTR6HL RSCAN0.RFPTR6.UINT8[HL]
+#define RSCAN0RFPTR6HH RSCAN0.RFPTR6.UINT8[HH]
+#define RSCAN0RFDF06 RSCAN0.RFDF06.UINT32
+#define RSCAN0RFDF06L RSCAN0.RFDF06.UINT16[L]
+#define RSCAN0RFDF06LL RSCAN0.RFDF06.UINT8[LL]
+#define RSCAN0RFDF06LH RSCAN0.RFDF06.UINT8[LH]
+#define RSCAN0RFDF06H RSCAN0.RFDF06.UINT16[H]
+#define RSCAN0RFDF06HL RSCAN0.RFDF06.UINT8[HL]
+#define RSCAN0RFDF06HH RSCAN0.RFDF06.UINT8[HH]
+#define RSCAN0RFDF16 RSCAN0.RFDF16.UINT32
+#define RSCAN0RFDF16L RSCAN0.RFDF16.UINT16[L]
+#define RSCAN0RFDF16LL RSCAN0.RFDF16.UINT8[LL]
+#define RSCAN0RFDF16LH RSCAN0.RFDF16.UINT8[LH]
+#define RSCAN0RFDF16H RSCAN0.RFDF16.UINT16[H]
+#define RSCAN0RFDF16HL RSCAN0.RFDF16.UINT8[HL]
+#define RSCAN0RFDF16HH RSCAN0.RFDF16.UINT8[HH]
+#define RSCAN0RFID7 RSCAN0.RFID7.UINT32
+#define RSCAN0RFID7L RSCAN0.RFID7.UINT16[L]
+#define RSCAN0RFID7LL RSCAN0.RFID7.UINT8[LL]
+#define RSCAN0RFID7LH RSCAN0.RFID7.UINT8[LH]
+#define RSCAN0RFID7H RSCAN0.RFID7.UINT16[H]
+#define RSCAN0RFID7HL RSCAN0.RFID7.UINT8[HL]
+#define RSCAN0RFID7HH RSCAN0.RFID7.UINT8[HH]
+#define RSCAN0RFPTR7 RSCAN0.RFPTR7.UINT32
+#define RSCAN0RFPTR7L RSCAN0.RFPTR7.UINT16[L]
+#define RSCAN0RFPTR7LL RSCAN0.RFPTR7.UINT8[LL]
+#define RSCAN0RFPTR7LH RSCAN0.RFPTR7.UINT8[LH]
+#define RSCAN0RFPTR7H RSCAN0.RFPTR7.UINT16[H]
+#define RSCAN0RFPTR7HL RSCAN0.RFPTR7.UINT8[HL]
+#define RSCAN0RFPTR7HH RSCAN0.RFPTR7.UINT8[HH]
+#define RSCAN0RFDF07 RSCAN0.RFDF07.UINT32
+#define RSCAN0RFDF07L RSCAN0.RFDF07.UINT16[L]
+#define RSCAN0RFDF07LL RSCAN0.RFDF07.UINT8[LL]
+#define RSCAN0RFDF07LH RSCAN0.RFDF07.UINT8[LH]
+#define RSCAN0RFDF07H RSCAN0.RFDF07.UINT16[H]
+#define RSCAN0RFDF07HL RSCAN0.RFDF07.UINT8[HL]
+#define RSCAN0RFDF07HH RSCAN0.RFDF07.UINT8[HH]
+#define RSCAN0RFDF17 RSCAN0.RFDF17.UINT32
+#define RSCAN0RFDF17L RSCAN0.RFDF17.UINT16[L]
+#define RSCAN0RFDF17LL RSCAN0.RFDF17.UINT8[LL]
+#define RSCAN0RFDF17LH RSCAN0.RFDF17.UINT8[LH]
+#define RSCAN0RFDF17H RSCAN0.RFDF17.UINT16[H]
+#define RSCAN0RFDF17HL RSCAN0.RFDF17.UINT8[HL]
+#define RSCAN0RFDF17HH RSCAN0.RFDF17.UINT8[HH]
+#define RSCAN0CFID0 RSCAN0.CFID0.UINT32
+#define RSCAN0CFID0L RSCAN0.CFID0.UINT16[L]
+#define RSCAN0CFID0LL RSCAN0.CFID0.UINT8[LL]
+#define RSCAN0CFID0LH RSCAN0.CFID0.UINT8[LH]
+#define RSCAN0CFID0H RSCAN0.CFID0.UINT16[H]
+#define RSCAN0CFID0HL RSCAN0.CFID0.UINT8[HL]
+#define RSCAN0CFID0HH RSCAN0.CFID0.UINT8[HH]
+#define RSCAN0CFPTR0 RSCAN0.CFPTR0.UINT32
+#define RSCAN0CFPTR0L RSCAN0.CFPTR0.UINT16[L]
+#define RSCAN0CFPTR0LL RSCAN0.CFPTR0.UINT8[LL]
+#define RSCAN0CFPTR0LH RSCAN0.CFPTR0.UINT8[LH]
+#define RSCAN0CFPTR0H RSCAN0.CFPTR0.UINT16[H]
+#define RSCAN0CFPTR0HL RSCAN0.CFPTR0.UINT8[HL]
+#define RSCAN0CFPTR0HH RSCAN0.CFPTR0.UINT8[HH]
+#define RSCAN0CFDF00 RSCAN0.CFDF00.UINT32
+#define RSCAN0CFDF00L RSCAN0.CFDF00.UINT16[L]
+#define RSCAN0CFDF00LL RSCAN0.CFDF00.UINT8[LL]
+#define RSCAN0CFDF00LH RSCAN0.CFDF00.UINT8[LH]
+#define RSCAN0CFDF00H RSCAN0.CFDF00.UINT16[H]
+#define RSCAN0CFDF00HL RSCAN0.CFDF00.UINT8[HL]
+#define RSCAN0CFDF00HH RSCAN0.CFDF00.UINT8[HH]
+#define RSCAN0CFDF10 RSCAN0.CFDF10.UINT32
+#define RSCAN0CFDF10L RSCAN0.CFDF10.UINT16[L]
+#define RSCAN0CFDF10LL RSCAN0.CFDF10.UINT8[LL]
+#define RSCAN0CFDF10LH RSCAN0.CFDF10.UINT8[LH]
+#define RSCAN0CFDF10H RSCAN0.CFDF10.UINT16[H]
+#define RSCAN0CFDF10HL RSCAN0.CFDF10.UINT8[HL]
+#define RSCAN0CFDF10HH RSCAN0.CFDF10.UINT8[HH]
+#define RSCAN0CFID1 RSCAN0.CFID1.UINT32
+#define RSCAN0CFID1L RSCAN0.CFID1.UINT16[L]
+#define RSCAN0CFID1LL RSCAN0.CFID1.UINT8[LL]
+#define RSCAN0CFID1LH RSCAN0.CFID1.UINT8[LH]
+#define RSCAN0CFID1H RSCAN0.CFID1.UINT16[H]
+#define RSCAN0CFID1HL RSCAN0.CFID1.UINT8[HL]
+#define RSCAN0CFID1HH RSCAN0.CFID1.UINT8[HH]
+#define RSCAN0CFPTR1 RSCAN0.CFPTR1.UINT32
+#define RSCAN0CFPTR1L RSCAN0.CFPTR1.UINT16[L]
+#define RSCAN0CFPTR1LL RSCAN0.CFPTR1.UINT8[LL]
+#define RSCAN0CFPTR1LH RSCAN0.CFPTR1.UINT8[LH]
+#define RSCAN0CFPTR1H RSCAN0.CFPTR1.UINT16[H]
+#define RSCAN0CFPTR1HL RSCAN0.CFPTR1.UINT8[HL]
+#define RSCAN0CFPTR1HH RSCAN0.CFPTR1.UINT8[HH]
+#define RSCAN0CFDF01 RSCAN0.CFDF01.UINT32
+#define RSCAN0CFDF01L RSCAN0.CFDF01.UINT16[L]
+#define RSCAN0CFDF01LL RSCAN0.CFDF01.UINT8[LL]
+#define RSCAN0CFDF01LH RSCAN0.CFDF01.UINT8[LH]
+#define RSCAN0CFDF01H RSCAN0.CFDF01.UINT16[H]
+#define RSCAN0CFDF01HL RSCAN0.CFDF01.UINT8[HL]
+#define RSCAN0CFDF01HH RSCAN0.CFDF01.UINT8[HH]
+#define RSCAN0CFDF11 RSCAN0.CFDF11.UINT32
+#define RSCAN0CFDF11L RSCAN0.CFDF11.UINT16[L]
+#define RSCAN0CFDF11LL RSCAN0.CFDF11.UINT8[LL]
+#define RSCAN0CFDF11LH RSCAN0.CFDF11.UINT8[LH]
+#define RSCAN0CFDF11H RSCAN0.CFDF11.UINT16[H]
+#define RSCAN0CFDF11HL RSCAN0.CFDF11.UINT8[HL]
+#define RSCAN0CFDF11HH RSCAN0.CFDF11.UINT8[HH]
+#define RSCAN0CFID2 RSCAN0.CFID2.UINT32
+#define RSCAN0CFID2L RSCAN0.CFID2.UINT16[L]
+#define RSCAN0CFID2LL RSCAN0.CFID2.UINT8[LL]
+#define RSCAN0CFID2LH RSCAN0.CFID2.UINT8[LH]
+#define RSCAN0CFID2H RSCAN0.CFID2.UINT16[H]
+#define RSCAN0CFID2HL RSCAN0.CFID2.UINT8[HL]
+#define RSCAN0CFID2HH RSCAN0.CFID2.UINT8[HH]
+#define RSCAN0CFPTR2 RSCAN0.CFPTR2.UINT32
+#define RSCAN0CFPTR2L RSCAN0.CFPTR2.UINT16[L]
+#define RSCAN0CFPTR2LL RSCAN0.CFPTR2.UINT8[LL]
+#define RSCAN0CFPTR2LH RSCAN0.CFPTR2.UINT8[LH]
+#define RSCAN0CFPTR2H RSCAN0.CFPTR2.UINT16[H]
+#define RSCAN0CFPTR2HL RSCAN0.CFPTR2.UINT8[HL]
+#define RSCAN0CFPTR2HH RSCAN0.CFPTR2.UINT8[HH]
+#define RSCAN0CFDF02 RSCAN0.CFDF02.UINT32
+#define RSCAN0CFDF02L RSCAN0.CFDF02.UINT16[L]
+#define RSCAN0CFDF02LL RSCAN0.CFDF02.UINT8[LL]
+#define RSCAN0CFDF02LH RSCAN0.CFDF02.UINT8[LH]
+#define RSCAN0CFDF02H RSCAN0.CFDF02.UINT16[H]
+#define RSCAN0CFDF02HL RSCAN0.CFDF02.UINT8[HL]
+#define RSCAN0CFDF02HH RSCAN0.CFDF02.UINT8[HH]
+#define RSCAN0CFDF12 RSCAN0.CFDF12.UINT32
+#define RSCAN0CFDF12L RSCAN0.CFDF12.UINT16[L]
+#define RSCAN0CFDF12LL RSCAN0.CFDF12.UINT8[LL]
+#define RSCAN0CFDF12LH RSCAN0.CFDF12.UINT8[LH]
+#define RSCAN0CFDF12H RSCAN0.CFDF12.UINT16[H]
+#define RSCAN0CFDF12HL RSCAN0.CFDF12.UINT8[HL]
+#define RSCAN0CFDF12HH RSCAN0.CFDF12.UINT8[HH]
+#define RSCAN0CFID3 RSCAN0.CFID3.UINT32
+#define RSCAN0CFID3L RSCAN0.CFID3.UINT16[L]
+#define RSCAN0CFID3LL RSCAN0.CFID3.UINT8[LL]
+#define RSCAN0CFID3LH RSCAN0.CFID3.UINT8[LH]
+#define RSCAN0CFID3H RSCAN0.CFID3.UINT16[H]
+#define RSCAN0CFID3HL RSCAN0.CFID3.UINT8[HL]
+#define RSCAN0CFID3HH RSCAN0.CFID3.UINT8[HH]
+#define RSCAN0CFPTR3 RSCAN0.CFPTR3.UINT32
+#define RSCAN0CFPTR3L RSCAN0.CFPTR3.UINT16[L]
+#define RSCAN0CFPTR3LL RSCAN0.CFPTR3.UINT8[LL]
+#define RSCAN0CFPTR3LH RSCAN0.CFPTR3.UINT8[LH]
+#define RSCAN0CFPTR3H RSCAN0.CFPTR3.UINT16[H]
+#define RSCAN0CFPTR3HL RSCAN0.CFPTR3.UINT8[HL]
+#define RSCAN0CFPTR3HH RSCAN0.CFPTR3.UINT8[HH]
+#define RSCAN0CFDF03 RSCAN0.CFDF03.UINT32
+#define RSCAN0CFDF03L RSCAN0.CFDF03.UINT16[L]
+#define RSCAN0CFDF03LL RSCAN0.CFDF03.UINT8[LL]
+#define RSCAN0CFDF03LH RSCAN0.CFDF03.UINT8[LH]
+#define RSCAN0CFDF03H RSCAN0.CFDF03.UINT16[H]
+#define RSCAN0CFDF03HL RSCAN0.CFDF03.UINT8[HL]
+#define RSCAN0CFDF03HH RSCAN0.CFDF03.UINT8[HH]
+#define RSCAN0CFDF13 RSCAN0.CFDF13.UINT32
+#define RSCAN0CFDF13L RSCAN0.CFDF13.UINT16[L]
+#define RSCAN0CFDF13LL RSCAN0.CFDF13.UINT8[LL]
+#define RSCAN0CFDF13LH RSCAN0.CFDF13.UINT8[LH]
+#define RSCAN0CFDF13H RSCAN0.CFDF13.UINT16[H]
+#define RSCAN0CFDF13HL RSCAN0.CFDF13.UINT8[HL]
+#define RSCAN0CFDF13HH RSCAN0.CFDF13.UINT8[HH]
+#define RSCAN0CFID4 RSCAN0.CFID4.UINT32
+#define RSCAN0CFID4L RSCAN0.CFID4.UINT16[L]
+#define RSCAN0CFID4LL RSCAN0.CFID4.UINT8[LL]
+#define RSCAN0CFID4LH RSCAN0.CFID4.UINT8[LH]
+#define RSCAN0CFID4H RSCAN0.CFID4.UINT16[H]
+#define RSCAN0CFID4HL RSCAN0.CFID4.UINT8[HL]
+#define RSCAN0CFID4HH RSCAN0.CFID4.UINT8[HH]
+#define RSCAN0CFPTR4 RSCAN0.CFPTR4.UINT32
+#define RSCAN0CFPTR4L RSCAN0.CFPTR4.UINT16[L]
+#define RSCAN0CFPTR4LL RSCAN0.CFPTR4.UINT8[LL]
+#define RSCAN0CFPTR4LH RSCAN0.CFPTR4.UINT8[LH]
+#define RSCAN0CFPTR4H RSCAN0.CFPTR4.UINT16[H]
+#define RSCAN0CFPTR4HL RSCAN0.CFPTR4.UINT8[HL]
+#define RSCAN0CFPTR4HH RSCAN0.CFPTR4.UINT8[HH]
+#define RSCAN0CFDF04 RSCAN0.CFDF04.UINT32
+#define RSCAN0CFDF04L RSCAN0.CFDF04.UINT16[L]
+#define RSCAN0CFDF04LL RSCAN0.CFDF04.UINT8[LL]
+#define RSCAN0CFDF04LH RSCAN0.CFDF04.UINT8[LH]
+#define RSCAN0CFDF04H RSCAN0.CFDF04.UINT16[H]
+#define RSCAN0CFDF04HL RSCAN0.CFDF04.UINT8[HL]
+#define RSCAN0CFDF04HH RSCAN0.CFDF04.UINT8[HH]
+#define RSCAN0CFDF14 RSCAN0.CFDF14.UINT32
+#define RSCAN0CFDF14L RSCAN0.CFDF14.UINT16[L]
+#define RSCAN0CFDF14LL RSCAN0.CFDF14.UINT8[LL]
+#define RSCAN0CFDF14LH RSCAN0.CFDF14.UINT8[LH]
+#define RSCAN0CFDF14H RSCAN0.CFDF14.UINT16[H]
+#define RSCAN0CFDF14HL RSCAN0.CFDF14.UINT8[HL]
+#define RSCAN0CFDF14HH RSCAN0.CFDF14.UINT8[HH]
+#define RSCAN0CFID5 RSCAN0.CFID5.UINT32
+#define RSCAN0CFID5L RSCAN0.CFID5.UINT16[L]
+#define RSCAN0CFID5LL RSCAN0.CFID5.UINT8[LL]
+#define RSCAN0CFID5LH RSCAN0.CFID5.UINT8[LH]
+#define RSCAN0CFID5H RSCAN0.CFID5.UINT16[H]
+#define RSCAN0CFID5HL RSCAN0.CFID5.UINT8[HL]
+#define RSCAN0CFID5HH RSCAN0.CFID5.UINT8[HH]
+#define RSCAN0CFPTR5 RSCAN0.CFPTR5.UINT32
+#define RSCAN0CFPTR5L RSCAN0.CFPTR5.UINT16[L]
+#define RSCAN0CFPTR5LL RSCAN0.CFPTR5.UINT8[LL]
+#define RSCAN0CFPTR5LH RSCAN0.CFPTR5.UINT8[LH]
+#define RSCAN0CFPTR5H RSCAN0.CFPTR5.UINT16[H]
+#define RSCAN0CFPTR5HL RSCAN0.CFPTR5.UINT8[HL]
+#define RSCAN0CFPTR5HH RSCAN0.CFPTR5.UINT8[HH]
+#define RSCAN0CFDF05 RSCAN0.CFDF05.UINT32
+#define RSCAN0CFDF05L RSCAN0.CFDF05.UINT16[L]
+#define RSCAN0CFDF05LL RSCAN0.CFDF05.UINT8[LL]
+#define RSCAN0CFDF05LH RSCAN0.CFDF05.UINT8[LH]
+#define RSCAN0CFDF05H RSCAN0.CFDF05.UINT16[H]
+#define RSCAN0CFDF05HL RSCAN0.CFDF05.UINT8[HL]
+#define RSCAN0CFDF05HH RSCAN0.CFDF05.UINT8[HH]
+#define RSCAN0CFDF15 RSCAN0.CFDF15.UINT32
+#define RSCAN0CFDF15L RSCAN0.CFDF15.UINT16[L]
+#define RSCAN0CFDF15LL RSCAN0.CFDF15.UINT8[LL]
+#define RSCAN0CFDF15LH RSCAN0.CFDF15.UINT8[LH]
+#define RSCAN0CFDF15H RSCAN0.CFDF15.UINT16[H]
+#define RSCAN0CFDF15HL RSCAN0.CFDF15.UINT8[HL]
+#define RSCAN0CFDF15HH RSCAN0.CFDF15.UINT8[HH]
+#define RSCAN0CFID6 RSCAN0.CFID6.UINT32
+#define RSCAN0CFID6L RSCAN0.CFID6.UINT16[L]
+#define RSCAN0CFID6LL RSCAN0.CFID6.UINT8[LL]
+#define RSCAN0CFID6LH RSCAN0.CFID6.UINT8[LH]
+#define RSCAN0CFID6H RSCAN0.CFID6.UINT16[H]
+#define RSCAN0CFID6HL RSCAN0.CFID6.UINT8[HL]
+#define RSCAN0CFID6HH RSCAN0.CFID6.UINT8[HH]
+#define RSCAN0CFPTR6 RSCAN0.CFPTR6.UINT32
+#define RSCAN0CFPTR6L RSCAN0.CFPTR6.UINT16[L]
+#define RSCAN0CFPTR6LL RSCAN0.CFPTR6.UINT8[LL]
+#define RSCAN0CFPTR6LH RSCAN0.CFPTR6.UINT8[LH]
+#define RSCAN0CFPTR6H RSCAN0.CFPTR6.UINT16[H]
+#define RSCAN0CFPTR6HL RSCAN0.CFPTR6.UINT8[HL]
+#define RSCAN0CFPTR6HH RSCAN0.CFPTR6.UINT8[HH]
+#define RSCAN0CFDF06 RSCAN0.CFDF06.UINT32
+#define RSCAN0CFDF06L RSCAN0.CFDF06.UINT16[L]
+#define RSCAN0CFDF06LL RSCAN0.CFDF06.UINT8[LL]
+#define RSCAN0CFDF06LH RSCAN0.CFDF06.UINT8[LH]
+#define RSCAN0CFDF06H RSCAN0.CFDF06.UINT16[H]
+#define RSCAN0CFDF06HL RSCAN0.CFDF06.UINT8[HL]
+#define RSCAN0CFDF06HH RSCAN0.CFDF06.UINT8[HH]
+#define RSCAN0CFDF16 RSCAN0.CFDF16.UINT32
+#define RSCAN0CFDF16L RSCAN0.CFDF16.UINT16[L]
+#define RSCAN0CFDF16LL RSCAN0.CFDF16.UINT8[LL]
+#define RSCAN0CFDF16LH RSCAN0.CFDF16.UINT8[LH]
+#define RSCAN0CFDF16H RSCAN0.CFDF16.UINT16[H]
+#define RSCAN0CFDF16HL RSCAN0.CFDF16.UINT8[HL]
+#define RSCAN0CFDF16HH RSCAN0.CFDF16.UINT8[HH]
+#define RSCAN0CFID7 RSCAN0.CFID7.UINT32
+#define RSCAN0CFID7L RSCAN0.CFID7.UINT16[L]
+#define RSCAN0CFID7LL RSCAN0.CFID7.UINT8[LL]
+#define RSCAN0CFID7LH RSCAN0.CFID7.UINT8[LH]
+#define RSCAN0CFID7H RSCAN0.CFID7.UINT16[H]
+#define RSCAN0CFID7HL RSCAN0.CFID7.UINT8[HL]
+#define RSCAN0CFID7HH RSCAN0.CFID7.UINT8[HH]
+#define RSCAN0CFPTR7 RSCAN0.CFPTR7.UINT32
+#define RSCAN0CFPTR7L RSCAN0.CFPTR7.UINT16[L]
+#define RSCAN0CFPTR7LL RSCAN0.CFPTR7.UINT8[LL]
+#define RSCAN0CFPTR7LH RSCAN0.CFPTR7.UINT8[LH]
+#define RSCAN0CFPTR7H RSCAN0.CFPTR7.UINT16[H]
+#define RSCAN0CFPTR7HL RSCAN0.CFPTR7.UINT8[HL]
+#define RSCAN0CFPTR7HH RSCAN0.CFPTR7.UINT8[HH]
+#define RSCAN0CFDF07 RSCAN0.CFDF07.UINT32
+#define RSCAN0CFDF07L RSCAN0.CFDF07.UINT16[L]
+#define RSCAN0CFDF07LL RSCAN0.CFDF07.UINT8[LL]
+#define RSCAN0CFDF07LH RSCAN0.CFDF07.UINT8[LH]
+#define RSCAN0CFDF07H RSCAN0.CFDF07.UINT16[H]
+#define RSCAN0CFDF07HL RSCAN0.CFDF07.UINT8[HL]
+#define RSCAN0CFDF07HH RSCAN0.CFDF07.UINT8[HH]
+#define RSCAN0CFDF17 RSCAN0.CFDF17.UINT32
+#define RSCAN0CFDF17L RSCAN0.CFDF17.UINT16[L]
+#define RSCAN0CFDF17LL RSCAN0.CFDF17.UINT8[LL]
+#define RSCAN0CFDF17LH RSCAN0.CFDF17.UINT8[LH]
+#define RSCAN0CFDF17H RSCAN0.CFDF17.UINT16[H]
+#define RSCAN0CFDF17HL RSCAN0.CFDF17.UINT8[HL]
+#define RSCAN0CFDF17HH RSCAN0.CFDF17.UINT8[HH]
+#define RSCAN0CFID8 RSCAN0.CFID8.UINT32
+#define RSCAN0CFID8L RSCAN0.CFID8.UINT16[L]
+#define RSCAN0CFID8LL RSCAN0.CFID8.UINT8[LL]
+#define RSCAN0CFID8LH RSCAN0.CFID8.UINT8[LH]
+#define RSCAN0CFID8H RSCAN0.CFID8.UINT16[H]
+#define RSCAN0CFID8HL RSCAN0.CFID8.UINT8[HL]
+#define RSCAN0CFID8HH RSCAN0.CFID8.UINT8[HH]
+#define RSCAN0CFPTR8 RSCAN0.CFPTR8.UINT32
+#define RSCAN0CFPTR8L RSCAN0.CFPTR8.UINT16[L]
+#define RSCAN0CFPTR8LL RSCAN0.CFPTR8.UINT8[LL]
+#define RSCAN0CFPTR8LH RSCAN0.CFPTR8.UINT8[LH]
+#define RSCAN0CFPTR8H RSCAN0.CFPTR8.UINT16[H]
+#define RSCAN0CFPTR8HL RSCAN0.CFPTR8.UINT8[HL]
+#define RSCAN0CFPTR8HH RSCAN0.CFPTR8.UINT8[HH]
+#define RSCAN0CFDF08 RSCAN0.CFDF08.UINT32
+#define RSCAN0CFDF08L RSCAN0.CFDF08.UINT16[L]
+#define RSCAN0CFDF08LL RSCAN0.CFDF08.UINT8[LL]
+#define RSCAN0CFDF08LH RSCAN0.CFDF08.UINT8[LH]
+#define RSCAN0CFDF08H RSCAN0.CFDF08.UINT16[H]
+#define RSCAN0CFDF08HL RSCAN0.CFDF08.UINT8[HL]
+#define RSCAN0CFDF08HH RSCAN0.CFDF08.UINT8[HH]
+#define RSCAN0CFDF18 RSCAN0.CFDF18.UINT32
+#define RSCAN0CFDF18L RSCAN0.CFDF18.UINT16[L]
+#define RSCAN0CFDF18LL RSCAN0.CFDF18.UINT8[LL]
+#define RSCAN0CFDF18LH RSCAN0.CFDF18.UINT8[LH]
+#define RSCAN0CFDF18H RSCAN0.CFDF18.UINT16[H]
+#define RSCAN0CFDF18HL RSCAN0.CFDF18.UINT8[HL]
+#define RSCAN0CFDF18HH RSCAN0.CFDF18.UINT8[HH]
+#define RSCAN0CFID9 RSCAN0.CFID9.UINT32
+#define RSCAN0CFID9L RSCAN0.CFID9.UINT16[L]
+#define RSCAN0CFID9LL RSCAN0.CFID9.UINT8[LL]
+#define RSCAN0CFID9LH RSCAN0.CFID9.UINT8[LH]
+#define RSCAN0CFID9H RSCAN0.CFID9.UINT16[H]
+#define RSCAN0CFID9HL RSCAN0.CFID9.UINT8[HL]
+#define RSCAN0CFID9HH RSCAN0.CFID9.UINT8[HH]
+#define RSCAN0CFPTR9 RSCAN0.CFPTR9.UINT32
+#define RSCAN0CFPTR9L RSCAN0.CFPTR9.UINT16[L]
+#define RSCAN0CFPTR9LL RSCAN0.CFPTR9.UINT8[LL]
+#define RSCAN0CFPTR9LH RSCAN0.CFPTR9.UINT8[LH]
+#define RSCAN0CFPTR9H RSCAN0.CFPTR9.UINT16[H]
+#define RSCAN0CFPTR9HL RSCAN0.CFPTR9.UINT8[HL]
+#define RSCAN0CFPTR9HH RSCAN0.CFPTR9.UINT8[HH]
+#define RSCAN0CFDF09 RSCAN0.CFDF09.UINT32
+#define RSCAN0CFDF09L RSCAN0.CFDF09.UINT16[L]
+#define RSCAN0CFDF09LL RSCAN0.CFDF09.UINT8[LL]
+#define RSCAN0CFDF09LH RSCAN0.CFDF09.UINT8[LH]
+#define RSCAN0CFDF09H RSCAN0.CFDF09.UINT16[H]
+#define RSCAN0CFDF09HL RSCAN0.CFDF09.UINT8[HL]
+#define RSCAN0CFDF09HH RSCAN0.CFDF09.UINT8[HH]
+#define RSCAN0CFDF19 RSCAN0.CFDF19.UINT32
+#define RSCAN0CFDF19L RSCAN0.CFDF19.UINT16[L]
+#define RSCAN0CFDF19LL RSCAN0.CFDF19.UINT8[LL]
+#define RSCAN0CFDF19LH RSCAN0.CFDF19.UINT8[LH]
+#define RSCAN0CFDF19H RSCAN0.CFDF19.UINT16[H]
+#define RSCAN0CFDF19HL RSCAN0.CFDF19.UINT8[HL]
+#define RSCAN0CFDF19HH RSCAN0.CFDF19.UINT8[HH]
+#define RSCAN0CFID10 RSCAN0.CFID10.UINT32
+#define RSCAN0CFID10L RSCAN0.CFID10.UINT16[L]
+#define RSCAN0CFID10LL RSCAN0.CFID10.UINT8[LL]
+#define RSCAN0CFID10LH RSCAN0.CFID10.UINT8[LH]
+#define RSCAN0CFID10H RSCAN0.CFID10.UINT16[H]
+#define RSCAN0CFID10HL RSCAN0.CFID10.UINT8[HL]
+#define RSCAN0CFID10HH RSCAN0.CFID10.UINT8[HH]
+#define RSCAN0CFPTR10 RSCAN0.CFPTR10.UINT32
+#define RSCAN0CFPTR10L RSCAN0.CFPTR10.UINT16[L]
+#define RSCAN0CFPTR10LL RSCAN0.CFPTR10.UINT8[LL]
+#define RSCAN0CFPTR10LH RSCAN0.CFPTR10.UINT8[LH]
+#define RSCAN0CFPTR10H RSCAN0.CFPTR10.UINT16[H]
+#define RSCAN0CFPTR10HL RSCAN0.CFPTR10.UINT8[HL]
+#define RSCAN0CFPTR10HH RSCAN0.CFPTR10.UINT8[HH]
+#define RSCAN0CFDF010 RSCAN0.CFDF010.UINT32
+#define RSCAN0CFDF010L RSCAN0.CFDF010.UINT16[L]
+#define RSCAN0CFDF010LL RSCAN0.CFDF010.UINT8[LL]
+#define RSCAN0CFDF010LH RSCAN0.CFDF010.UINT8[LH]
+#define RSCAN0CFDF010H RSCAN0.CFDF010.UINT16[H]
+#define RSCAN0CFDF010HL RSCAN0.CFDF010.UINT8[HL]
+#define RSCAN0CFDF010HH RSCAN0.CFDF010.UINT8[HH]
+#define RSCAN0CFDF110 RSCAN0.CFDF110.UINT32
+#define RSCAN0CFDF110L RSCAN0.CFDF110.UINT16[L]
+#define RSCAN0CFDF110LL RSCAN0.CFDF110.UINT8[LL]
+#define RSCAN0CFDF110LH RSCAN0.CFDF110.UINT8[LH]
+#define RSCAN0CFDF110H RSCAN0.CFDF110.UINT16[H]
+#define RSCAN0CFDF110HL RSCAN0.CFDF110.UINT8[HL]
+#define RSCAN0CFDF110HH RSCAN0.CFDF110.UINT8[HH]
+#define RSCAN0CFID11 RSCAN0.CFID11.UINT32
+#define RSCAN0CFID11L RSCAN0.CFID11.UINT16[L]
+#define RSCAN0CFID11LL RSCAN0.CFID11.UINT8[LL]
+#define RSCAN0CFID11LH RSCAN0.CFID11.UINT8[LH]
+#define RSCAN0CFID11H RSCAN0.CFID11.UINT16[H]
+#define RSCAN0CFID11HL RSCAN0.CFID11.UINT8[HL]
+#define RSCAN0CFID11HH RSCAN0.CFID11.UINT8[HH]
+#define RSCAN0CFPTR11 RSCAN0.CFPTR11.UINT32
+#define RSCAN0CFPTR11L RSCAN0.CFPTR11.UINT16[L]
+#define RSCAN0CFPTR11LL RSCAN0.CFPTR11.UINT8[LL]
+#define RSCAN0CFPTR11LH RSCAN0.CFPTR11.UINT8[LH]
+#define RSCAN0CFPTR11H RSCAN0.CFPTR11.UINT16[H]
+#define RSCAN0CFPTR11HL RSCAN0.CFPTR11.UINT8[HL]
+#define RSCAN0CFPTR11HH RSCAN0.CFPTR11.UINT8[HH]
+#define RSCAN0CFDF011 RSCAN0.CFDF011.UINT32
+#define RSCAN0CFDF011L RSCAN0.CFDF011.UINT16[L]
+#define RSCAN0CFDF011LL RSCAN0.CFDF011.UINT8[LL]
+#define RSCAN0CFDF011LH RSCAN0.CFDF011.UINT8[LH]
+#define RSCAN0CFDF011H RSCAN0.CFDF011.UINT16[H]
+#define RSCAN0CFDF011HL RSCAN0.CFDF011.UINT8[HL]
+#define RSCAN0CFDF011HH RSCAN0.CFDF011.UINT8[HH]
+#define RSCAN0CFDF111 RSCAN0.CFDF111.UINT32
+#define RSCAN0CFDF111L RSCAN0.CFDF111.UINT16[L]
+#define RSCAN0CFDF111LL RSCAN0.CFDF111.UINT8[LL]
+#define RSCAN0CFDF111LH RSCAN0.CFDF111.UINT8[LH]
+#define RSCAN0CFDF111H RSCAN0.CFDF111.UINT16[H]
+#define RSCAN0CFDF111HL RSCAN0.CFDF111.UINT8[HL]
+#define RSCAN0CFDF111HH RSCAN0.CFDF111.UINT8[HH]
+#define RSCAN0CFID12 RSCAN0.CFID12.UINT32
+#define RSCAN0CFID12L RSCAN0.CFID12.UINT16[L]
+#define RSCAN0CFID12LL RSCAN0.CFID12.UINT8[LL]
+#define RSCAN0CFID12LH RSCAN0.CFID12.UINT8[LH]
+#define RSCAN0CFID12H RSCAN0.CFID12.UINT16[H]
+#define RSCAN0CFID12HL RSCAN0.CFID12.UINT8[HL]
+#define RSCAN0CFID12HH RSCAN0.CFID12.UINT8[HH]
+#define RSCAN0CFPTR12 RSCAN0.CFPTR12.UINT32
+#define RSCAN0CFPTR12L RSCAN0.CFPTR12.UINT16[L]
+#define RSCAN0CFPTR12LL RSCAN0.CFPTR12.UINT8[LL]
+#define RSCAN0CFPTR12LH RSCAN0.CFPTR12.UINT8[LH]
+#define RSCAN0CFPTR12H RSCAN0.CFPTR12.UINT16[H]
+#define RSCAN0CFPTR12HL RSCAN0.CFPTR12.UINT8[HL]
+#define RSCAN0CFPTR12HH RSCAN0.CFPTR12.UINT8[HH]
+#define RSCAN0CFDF012 RSCAN0.CFDF012.UINT32
+#define RSCAN0CFDF012L RSCAN0.CFDF012.UINT16[L]
+#define RSCAN0CFDF012LL RSCAN0.CFDF012.UINT8[LL]
+#define RSCAN0CFDF012LH RSCAN0.CFDF012.UINT8[LH]
+#define RSCAN0CFDF012H RSCAN0.CFDF012.UINT16[H]
+#define RSCAN0CFDF012HL RSCAN0.CFDF012.UINT8[HL]
+#define RSCAN0CFDF012HH RSCAN0.CFDF012.UINT8[HH]
+#define RSCAN0CFDF112 RSCAN0.CFDF112.UINT32
+#define RSCAN0CFDF112L RSCAN0.CFDF112.UINT16[L]
+#define RSCAN0CFDF112LL RSCAN0.CFDF112.UINT8[LL]
+#define RSCAN0CFDF112LH RSCAN0.CFDF112.UINT8[LH]
+#define RSCAN0CFDF112H RSCAN0.CFDF112.UINT16[H]
+#define RSCAN0CFDF112HL RSCAN0.CFDF112.UINT8[HL]
+#define RSCAN0CFDF112HH RSCAN0.CFDF112.UINT8[HH]
+#define RSCAN0CFID13 RSCAN0.CFID13.UINT32
+#define RSCAN0CFID13L RSCAN0.CFID13.UINT16[L]
+#define RSCAN0CFID13LL RSCAN0.CFID13.UINT8[LL]
+#define RSCAN0CFID13LH RSCAN0.CFID13.UINT8[LH]
+#define RSCAN0CFID13H RSCAN0.CFID13.UINT16[H]
+#define RSCAN0CFID13HL RSCAN0.CFID13.UINT8[HL]
+#define RSCAN0CFID13HH RSCAN0.CFID13.UINT8[HH]
+#define RSCAN0CFPTR13 RSCAN0.CFPTR13.UINT32
+#define RSCAN0CFPTR13L RSCAN0.CFPTR13.UINT16[L]
+#define RSCAN0CFPTR13LL RSCAN0.CFPTR13.UINT8[LL]
+#define RSCAN0CFPTR13LH RSCAN0.CFPTR13.UINT8[LH]
+#define RSCAN0CFPTR13H RSCAN0.CFPTR13.UINT16[H]
+#define RSCAN0CFPTR13HL RSCAN0.CFPTR13.UINT8[HL]
+#define RSCAN0CFPTR13HH RSCAN0.CFPTR13.UINT8[HH]
+#define RSCAN0CFDF013 RSCAN0.CFDF013.UINT32
+#define RSCAN0CFDF013L RSCAN0.CFDF013.UINT16[L]
+#define RSCAN0CFDF013LL RSCAN0.CFDF013.UINT8[LL]
+#define RSCAN0CFDF013LH RSCAN0.CFDF013.UINT8[LH]
+#define RSCAN0CFDF013H RSCAN0.CFDF013.UINT16[H]
+#define RSCAN0CFDF013HL RSCAN0.CFDF013.UINT8[HL]
+#define RSCAN0CFDF013HH RSCAN0.CFDF013.UINT8[HH]
+#define RSCAN0CFDF113 RSCAN0.CFDF113.UINT32
+#define RSCAN0CFDF113L RSCAN0.CFDF113.UINT16[L]
+#define RSCAN0CFDF113LL RSCAN0.CFDF113.UINT8[LL]
+#define RSCAN0CFDF113LH RSCAN0.CFDF113.UINT8[LH]
+#define RSCAN0CFDF113H RSCAN0.CFDF113.UINT16[H]
+#define RSCAN0CFDF113HL RSCAN0.CFDF113.UINT8[HL]
+#define RSCAN0CFDF113HH RSCAN0.CFDF113.UINT8[HH]
+#define RSCAN0CFID14 RSCAN0.CFID14.UINT32
+#define RSCAN0CFID14L RSCAN0.CFID14.UINT16[L]
+#define RSCAN0CFID14LL RSCAN0.CFID14.UINT8[LL]
+#define RSCAN0CFID14LH RSCAN0.CFID14.UINT8[LH]
+#define RSCAN0CFID14H RSCAN0.CFID14.UINT16[H]
+#define RSCAN0CFID14HL RSCAN0.CFID14.UINT8[HL]
+#define RSCAN0CFID14HH RSCAN0.CFID14.UINT8[HH]
+#define RSCAN0CFPTR14 RSCAN0.CFPTR14.UINT32
+#define RSCAN0CFPTR14L RSCAN0.CFPTR14.UINT16[L]
+#define RSCAN0CFPTR14LL RSCAN0.CFPTR14.UINT8[LL]
+#define RSCAN0CFPTR14LH RSCAN0.CFPTR14.UINT8[LH]
+#define RSCAN0CFPTR14H RSCAN0.CFPTR14.UINT16[H]
+#define RSCAN0CFPTR14HL RSCAN0.CFPTR14.UINT8[HL]
+#define RSCAN0CFPTR14HH RSCAN0.CFPTR14.UINT8[HH]
+#define RSCAN0CFDF014 RSCAN0.CFDF014.UINT32
+#define RSCAN0CFDF014L RSCAN0.CFDF014.UINT16[L]
+#define RSCAN0CFDF014LL RSCAN0.CFDF014.UINT8[LL]
+#define RSCAN0CFDF014LH RSCAN0.CFDF014.UINT8[LH]
+#define RSCAN0CFDF014H RSCAN0.CFDF014.UINT16[H]
+#define RSCAN0CFDF014HL RSCAN0.CFDF014.UINT8[HL]
+#define RSCAN0CFDF014HH RSCAN0.CFDF014.UINT8[HH]
+#define RSCAN0CFDF114 RSCAN0.CFDF114.UINT32
+#define RSCAN0CFDF114L RSCAN0.CFDF114.UINT16[L]
+#define RSCAN0CFDF114LL RSCAN0.CFDF114.UINT8[LL]
+#define RSCAN0CFDF114LH RSCAN0.CFDF114.UINT8[LH]
+#define RSCAN0CFDF114H RSCAN0.CFDF114.UINT16[H]
+#define RSCAN0CFDF114HL RSCAN0.CFDF114.UINT8[HL]
+#define RSCAN0CFDF114HH RSCAN0.CFDF114.UINT8[HH]
+#define RSCAN0TMID0 RSCAN0.TMID0.UINT32
+#define RSCAN0TMID0L RSCAN0.TMID0.UINT16[L]
+#define RSCAN0TMID0LL RSCAN0.TMID0.UINT8[LL]
+#define RSCAN0TMID0LH RSCAN0.TMID0.UINT8[LH]
+#define RSCAN0TMID0H RSCAN0.TMID0.UINT16[H]
+#define RSCAN0TMID0HL RSCAN0.TMID0.UINT8[HL]
+#define RSCAN0TMID0HH RSCAN0.TMID0.UINT8[HH]
+#define RSCAN0TMPTR0 RSCAN0.TMPTR0.UINT32
+#define RSCAN0TMPTR0L RSCAN0.TMPTR0.UINT16[L]
+#define RSCAN0TMPTR0LL RSCAN0.TMPTR0.UINT8[LL]
+#define RSCAN0TMPTR0LH RSCAN0.TMPTR0.UINT8[LH]
+#define RSCAN0TMPTR0H RSCAN0.TMPTR0.UINT16[H]
+#define RSCAN0TMPTR0HL RSCAN0.TMPTR0.UINT8[HL]
+#define RSCAN0TMPTR0HH RSCAN0.TMPTR0.UINT8[HH]
+#define RSCAN0TMDF00 RSCAN0.TMDF00.UINT32
+#define RSCAN0TMDF00L RSCAN0.TMDF00.UINT16[L]
+#define RSCAN0TMDF00LL RSCAN0.TMDF00.UINT8[LL]
+#define RSCAN0TMDF00LH RSCAN0.TMDF00.UINT8[LH]
+#define RSCAN0TMDF00H RSCAN0.TMDF00.UINT16[H]
+#define RSCAN0TMDF00HL RSCAN0.TMDF00.UINT8[HL]
+#define RSCAN0TMDF00HH RSCAN0.TMDF00.UINT8[HH]
+#define RSCAN0TMDF10 RSCAN0.TMDF10.UINT32
+#define RSCAN0TMDF10L RSCAN0.TMDF10.UINT16[L]
+#define RSCAN0TMDF10LL RSCAN0.TMDF10.UINT8[LL]
+#define RSCAN0TMDF10LH RSCAN0.TMDF10.UINT8[LH]
+#define RSCAN0TMDF10H RSCAN0.TMDF10.UINT16[H]
+#define RSCAN0TMDF10HL RSCAN0.TMDF10.UINT8[HL]
+#define RSCAN0TMDF10HH RSCAN0.TMDF10.UINT8[HH]
+#define RSCAN0TMID1 RSCAN0.TMID1.UINT32
+#define RSCAN0TMID1L RSCAN0.TMID1.UINT16[L]
+#define RSCAN0TMID1LL RSCAN0.TMID1.UINT8[LL]
+#define RSCAN0TMID1LH RSCAN0.TMID1.UINT8[LH]
+#define RSCAN0TMID1H RSCAN0.TMID1.UINT16[H]
+#define RSCAN0TMID1HL RSCAN0.TMID1.UINT8[HL]
+#define RSCAN0TMID1HH RSCAN0.TMID1.UINT8[HH]
+#define RSCAN0TMPTR1 RSCAN0.TMPTR1.UINT32
+#define RSCAN0TMPTR1L RSCAN0.TMPTR1.UINT16[L]
+#define RSCAN0TMPTR1LL RSCAN0.TMPTR1.UINT8[LL]
+#define RSCAN0TMPTR1LH RSCAN0.TMPTR1.UINT8[LH]
+#define RSCAN0TMPTR1H RSCAN0.TMPTR1.UINT16[H]
+#define RSCAN0TMPTR1HL RSCAN0.TMPTR1.UINT8[HL]
+#define RSCAN0TMPTR1HH RSCAN0.TMPTR1.UINT8[HH]
+#define RSCAN0TMDF01 RSCAN0.TMDF01.UINT32
+#define RSCAN0TMDF01L RSCAN0.TMDF01.UINT16[L]
+#define RSCAN0TMDF01LL RSCAN0.TMDF01.UINT8[LL]
+#define RSCAN0TMDF01LH RSCAN0.TMDF01.UINT8[LH]
+#define RSCAN0TMDF01H RSCAN0.TMDF01.UINT16[H]
+#define RSCAN0TMDF01HL RSCAN0.TMDF01.UINT8[HL]
+#define RSCAN0TMDF01HH RSCAN0.TMDF01.UINT8[HH]
+#define RSCAN0TMDF11 RSCAN0.TMDF11.UINT32
+#define RSCAN0TMDF11L RSCAN0.TMDF11.UINT16[L]
+#define RSCAN0TMDF11LL RSCAN0.TMDF11.UINT8[LL]
+#define RSCAN0TMDF11LH RSCAN0.TMDF11.UINT8[LH]
+#define RSCAN0TMDF11H RSCAN0.TMDF11.UINT16[H]
+#define RSCAN0TMDF11HL RSCAN0.TMDF11.UINT8[HL]
+#define RSCAN0TMDF11HH RSCAN0.TMDF11.UINT8[HH]
+#define RSCAN0TMID2 RSCAN0.TMID2.UINT32
+#define RSCAN0TMID2L RSCAN0.TMID2.UINT16[L]
+#define RSCAN0TMID2LL RSCAN0.TMID2.UINT8[LL]
+#define RSCAN0TMID2LH RSCAN0.TMID2.UINT8[LH]
+#define RSCAN0TMID2H RSCAN0.TMID2.UINT16[H]
+#define RSCAN0TMID2HL RSCAN0.TMID2.UINT8[HL]
+#define RSCAN0TMID2HH RSCAN0.TMID2.UINT8[HH]
+#define RSCAN0TMPTR2 RSCAN0.TMPTR2.UINT32
+#define RSCAN0TMPTR2L RSCAN0.TMPTR2.UINT16[L]
+#define RSCAN0TMPTR2LL RSCAN0.TMPTR2.UINT8[LL]
+#define RSCAN0TMPTR2LH RSCAN0.TMPTR2.UINT8[LH]
+#define RSCAN0TMPTR2H RSCAN0.TMPTR2.UINT16[H]
+#define RSCAN0TMPTR2HL RSCAN0.TMPTR2.UINT8[HL]
+#define RSCAN0TMPTR2HH RSCAN0.TMPTR2.UINT8[HH]
+#define RSCAN0TMDF02 RSCAN0.TMDF02.UINT32
+#define RSCAN0TMDF02L RSCAN0.TMDF02.UINT16[L]
+#define RSCAN0TMDF02LL RSCAN0.TMDF02.UINT8[LL]
+#define RSCAN0TMDF02LH RSCAN0.TMDF02.UINT8[LH]
+#define RSCAN0TMDF02H RSCAN0.TMDF02.UINT16[H]
+#define RSCAN0TMDF02HL RSCAN0.TMDF02.UINT8[HL]
+#define RSCAN0TMDF02HH RSCAN0.TMDF02.UINT8[HH]
+#define RSCAN0TMDF12 RSCAN0.TMDF12.UINT32
+#define RSCAN0TMDF12L RSCAN0.TMDF12.UINT16[L]
+#define RSCAN0TMDF12LL RSCAN0.TMDF12.UINT8[LL]
+#define RSCAN0TMDF12LH RSCAN0.TMDF12.UINT8[LH]
+#define RSCAN0TMDF12H RSCAN0.TMDF12.UINT16[H]
+#define RSCAN0TMDF12HL RSCAN0.TMDF12.UINT8[HL]
+#define RSCAN0TMDF12HH RSCAN0.TMDF12.UINT8[HH]
+#define RSCAN0TMID3 RSCAN0.TMID3.UINT32
+#define RSCAN0TMID3L RSCAN0.TMID3.UINT16[L]
+#define RSCAN0TMID3LL RSCAN0.TMID3.UINT8[LL]
+#define RSCAN0TMID3LH RSCAN0.TMID3.UINT8[LH]
+#define RSCAN0TMID3H RSCAN0.TMID3.UINT16[H]
+#define RSCAN0TMID3HL RSCAN0.TMID3.UINT8[HL]
+#define RSCAN0TMID3HH RSCAN0.TMID3.UINT8[HH]
+#define RSCAN0TMPTR3 RSCAN0.TMPTR3.UINT32
+#define RSCAN0TMPTR3L RSCAN0.TMPTR3.UINT16[L]
+#define RSCAN0TMPTR3LL RSCAN0.TMPTR3.UINT8[LL]
+#define RSCAN0TMPTR3LH RSCAN0.TMPTR3.UINT8[LH]
+#define RSCAN0TMPTR3H RSCAN0.TMPTR3.UINT16[H]
+#define RSCAN0TMPTR3HL RSCAN0.TMPTR3.UINT8[HL]
+#define RSCAN0TMPTR3HH RSCAN0.TMPTR3.UINT8[HH]
+#define RSCAN0TMDF03 RSCAN0.TMDF03.UINT32
+#define RSCAN0TMDF03L RSCAN0.TMDF03.UINT16[L]
+#define RSCAN0TMDF03LL RSCAN0.TMDF03.UINT8[LL]
+#define RSCAN0TMDF03LH RSCAN0.TMDF03.UINT8[LH]
+#define RSCAN0TMDF03H RSCAN0.TMDF03.UINT16[H]
+#define RSCAN0TMDF03HL RSCAN0.TMDF03.UINT8[HL]
+#define RSCAN0TMDF03HH RSCAN0.TMDF03.UINT8[HH]
+#define RSCAN0TMDF13 RSCAN0.TMDF13.UINT32
+#define RSCAN0TMDF13L RSCAN0.TMDF13.UINT16[L]
+#define RSCAN0TMDF13LL RSCAN0.TMDF13.UINT8[LL]
+#define RSCAN0TMDF13LH RSCAN0.TMDF13.UINT8[LH]
+#define RSCAN0TMDF13H RSCAN0.TMDF13.UINT16[H]
+#define RSCAN0TMDF13HL RSCAN0.TMDF13.UINT8[HL]
+#define RSCAN0TMDF13HH RSCAN0.TMDF13.UINT8[HH]
+#define RSCAN0TMID4 RSCAN0.TMID4.UINT32
+#define RSCAN0TMID4L RSCAN0.TMID4.UINT16[L]
+#define RSCAN0TMID4LL RSCAN0.TMID4.UINT8[LL]
+#define RSCAN0TMID4LH RSCAN0.TMID4.UINT8[LH]
+#define RSCAN0TMID4H RSCAN0.TMID4.UINT16[H]
+#define RSCAN0TMID4HL RSCAN0.TMID4.UINT8[HL]
+#define RSCAN0TMID4HH RSCAN0.TMID4.UINT8[HH]
+#define RSCAN0TMPTR4 RSCAN0.TMPTR4.UINT32
+#define RSCAN0TMPTR4L RSCAN0.TMPTR4.UINT16[L]
+#define RSCAN0TMPTR4LL RSCAN0.TMPTR4.UINT8[LL]
+#define RSCAN0TMPTR4LH RSCAN0.TMPTR4.UINT8[LH]
+#define RSCAN0TMPTR4H RSCAN0.TMPTR4.UINT16[H]
+#define RSCAN0TMPTR4HL RSCAN0.TMPTR4.UINT8[HL]
+#define RSCAN0TMPTR4HH RSCAN0.TMPTR4.UINT8[HH]
+#define RSCAN0TMDF04 RSCAN0.TMDF04.UINT32
+#define RSCAN0TMDF04L RSCAN0.TMDF04.UINT16[L]
+#define RSCAN0TMDF04LL RSCAN0.TMDF04.UINT8[LL]
+#define RSCAN0TMDF04LH RSCAN0.TMDF04.UINT8[LH]
+#define RSCAN0TMDF04H RSCAN0.TMDF04.UINT16[H]
+#define RSCAN0TMDF04HL RSCAN0.TMDF04.UINT8[HL]
+#define RSCAN0TMDF04HH RSCAN0.TMDF04.UINT8[HH]
+#define RSCAN0TMDF14 RSCAN0.TMDF14.UINT32
+#define RSCAN0TMDF14L RSCAN0.TMDF14.UINT16[L]
+#define RSCAN0TMDF14LL RSCAN0.TMDF14.UINT8[LL]
+#define RSCAN0TMDF14LH RSCAN0.TMDF14.UINT8[LH]
+#define RSCAN0TMDF14H RSCAN0.TMDF14.UINT16[H]
+#define RSCAN0TMDF14HL RSCAN0.TMDF14.UINT8[HL]
+#define RSCAN0TMDF14HH RSCAN0.TMDF14.UINT8[HH]
+#define RSCAN0TMID5 RSCAN0.TMID5.UINT32
+#define RSCAN0TMID5L RSCAN0.TMID5.UINT16[L]
+#define RSCAN0TMID5LL RSCAN0.TMID5.UINT8[LL]
+#define RSCAN0TMID5LH RSCAN0.TMID5.UINT8[LH]
+#define RSCAN0TMID5H RSCAN0.TMID5.UINT16[H]
+#define RSCAN0TMID5HL RSCAN0.TMID5.UINT8[HL]
+#define RSCAN0TMID5HH RSCAN0.TMID5.UINT8[HH]
+#define RSCAN0TMPTR5 RSCAN0.TMPTR5.UINT32
+#define RSCAN0TMPTR5L RSCAN0.TMPTR5.UINT16[L]
+#define RSCAN0TMPTR5LL RSCAN0.TMPTR5.UINT8[LL]
+#define RSCAN0TMPTR5LH RSCAN0.TMPTR5.UINT8[LH]
+#define RSCAN0TMPTR5H RSCAN0.TMPTR5.UINT16[H]
+#define RSCAN0TMPTR5HL RSCAN0.TMPTR5.UINT8[HL]
+#define RSCAN0TMPTR5HH RSCAN0.TMPTR5.UINT8[HH]
+#define RSCAN0TMDF05 RSCAN0.TMDF05.UINT32
+#define RSCAN0TMDF05L RSCAN0.TMDF05.UINT16[L]
+#define RSCAN0TMDF05LL RSCAN0.TMDF05.UINT8[LL]
+#define RSCAN0TMDF05LH RSCAN0.TMDF05.UINT8[LH]
+#define RSCAN0TMDF05H RSCAN0.TMDF05.UINT16[H]
+#define RSCAN0TMDF05HL RSCAN0.TMDF05.UINT8[HL]
+#define RSCAN0TMDF05HH RSCAN0.TMDF05.UINT8[HH]
+#define RSCAN0TMDF15 RSCAN0.TMDF15.UINT32
+#define RSCAN0TMDF15L RSCAN0.TMDF15.UINT16[L]
+#define RSCAN0TMDF15LL RSCAN0.TMDF15.UINT8[LL]
+#define RSCAN0TMDF15LH RSCAN0.TMDF15.UINT8[LH]
+#define RSCAN0TMDF15H RSCAN0.TMDF15.UINT16[H]
+#define RSCAN0TMDF15HL RSCAN0.TMDF15.UINT8[HL]
+#define RSCAN0TMDF15HH RSCAN0.TMDF15.UINT8[HH]
+#define RSCAN0TMID6 RSCAN0.TMID6.UINT32
+#define RSCAN0TMID6L RSCAN0.TMID6.UINT16[L]
+#define RSCAN0TMID6LL RSCAN0.TMID6.UINT8[LL]
+#define RSCAN0TMID6LH RSCAN0.TMID6.UINT8[LH]
+#define RSCAN0TMID6H RSCAN0.TMID6.UINT16[H]
+#define RSCAN0TMID6HL RSCAN0.TMID6.UINT8[HL]
+#define RSCAN0TMID6HH RSCAN0.TMID6.UINT8[HH]
+#define RSCAN0TMPTR6 RSCAN0.TMPTR6.UINT32
+#define RSCAN0TMPTR6L RSCAN0.TMPTR6.UINT16[L]
+#define RSCAN0TMPTR6LL RSCAN0.TMPTR6.UINT8[LL]
+#define RSCAN0TMPTR6LH RSCAN0.TMPTR6.UINT8[LH]
+#define RSCAN0TMPTR6H RSCAN0.TMPTR6.UINT16[H]
+#define RSCAN0TMPTR6HL RSCAN0.TMPTR6.UINT8[HL]
+#define RSCAN0TMPTR6HH RSCAN0.TMPTR6.UINT8[HH]
+#define RSCAN0TMDF06 RSCAN0.TMDF06.UINT32
+#define RSCAN0TMDF06L RSCAN0.TMDF06.UINT16[L]
+#define RSCAN0TMDF06LL RSCAN0.TMDF06.UINT8[LL]
+#define RSCAN0TMDF06LH RSCAN0.TMDF06.UINT8[LH]
+#define RSCAN0TMDF06H RSCAN0.TMDF06.UINT16[H]
+#define RSCAN0TMDF06HL RSCAN0.TMDF06.UINT8[HL]
+#define RSCAN0TMDF06HH RSCAN0.TMDF06.UINT8[HH]
+#define RSCAN0TMDF16 RSCAN0.TMDF16.UINT32
+#define RSCAN0TMDF16L RSCAN0.TMDF16.UINT16[L]
+#define RSCAN0TMDF16LL RSCAN0.TMDF16.UINT8[LL]
+#define RSCAN0TMDF16LH RSCAN0.TMDF16.UINT8[LH]
+#define RSCAN0TMDF16H RSCAN0.TMDF16.UINT16[H]
+#define RSCAN0TMDF16HL RSCAN0.TMDF16.UINT8[HL]
+#define RSCAN0TMDF16HH RSCAN0.TMDF16.UINT8[HH]
+#define RSCAN0TMID7 RSCAN0.TMID7.UINT32
+#define RSCAN0TMID7L RSCAN0.TMID7.UINT16[L]
+#define RSCAN0TMID7LL RSCAN0.TMID7.UINT8[LL]
+#define RSCAN0TMID7LH RSCAN0.TMID7.UINT8[LH]
+#define RSCAN0TMID7H RSCAN0.TMID7.UINT16[H]
+#define RSCAN0TMID7HL RSCAN0.TMID7.UINT8[HL]
+#define RSCAN0TMID7HH RSCAN0.TMID7.UINT8[HH]
+#define RSCAN0TMPTR7 RSCAN0.TMPTR7.UINT32
+#define RSCAN0TMPTR7L RSCAN0.TMPTR7.UINT16[L]
+#define RSCAN0TMPTR7LL RSCAN0.TMPTR7.UINT8[LL]
+#define RSCAN0TMPTR7LH RSCAN0.TMPTR7.UINT8[LH]
+#define RSCAN0TMPTR7H RSCAN0.TMPTR7.UINT16[H]
+#define RSCAN0TMPTR7HL RSCAN0.TMPTR7.UINT8[HL]
+#define RSCAN0TMPTR7HH RSCAN0.TMPTR7.UINT8[HH]
+#define RSCAN0TMDF07 RSCAN0.TMDF07.UINT32
+#define RSCAN0TMDF07L RSCAN0.TMDF07.UINT16[L]
+#define RSCAN0TMDF07LL RSCAN0.TMDF07.UINT8[LL]
+#define RSCAN0TMDF07LH RSCAN0.TMDF07.UINT8[LH]
+#define RSCAN0TMDF07H RSCAN0.TMDF07.UINT16[H]
+#define RSCAN0TMDF07HL RSCAN0.TMDF07.UINT8[HL]
+#define RSCAN0TMDF07HH RSCAN0.TMDF07.UINT8[HH]
+#define RSCAN0TMDF17 RSCAN0.TMDF17.UINT32
+#define RSCAN0TMDF17L RSCAN0.TMDF17.UINT16[L]
+#define RSCAN0TMDF17LL RSCAN0.TMDF17.UINT8[LL]
+#define RSCAN0TMDF17LH RSCAN0.TMDF17.UINT8[LH]
+#define RSCAN0TMDF17H RSCAN0.TMDF17.UINT16[H]
+#define RSCAN0TMDF17HL RSCAN0.TMDF17.UINT8[HL]
+#define RSCAN0TMDF17HH RSCAN0.TMDF17.UINT8[HH]
+#define RSCAN0TMID8 RSCAN0.TMID8.UINT32
+#define RSCAN0TMID8L RSCAN0.TMID8.UINT16[L]
+#define RSCAN0TMID8LL RSCAN0.TMID8.UINT8[LL]
+#define RSCAN0TMID8LH RSCAN0.TMID8.UINT8[LH]
+#define RSCAN0TMID8H RSCAN0.TMID8.UINT16[H]
+#define RSCAN0TMID8HL RSCAN0.TMID8.UINT8[HL]
+#define RSCAN0TMID8HH RSCAN0.TMID8.UINT8[HH]
+#define RSCAN0TMPTR8 RSCAN0.TMPTR8.UINT32
+#define RSCAN0TMPTR8L RSCAN0.TMPTR8.UINT16[L]
+#define RSCAN0TMPTR8LL RSCAN0.TMPTR8.UINT8[LL]
+#define RSCAN0TMPTR8LH RSCAN0.TMPTR8.UINT8[LH]
+#define RSCAN0TMPTR8H RSCAN0.TMPTR8.UINT16[H]
+#define RSCAN0TMPTR8HL RSCAN0.TMPTR8.UINT8[HL]
+#define RSCAN0TMPTR8HH RSCAN0.TMPTR8.UINT8[HH]
+#define RSCAN0TMDF08 RSCAN0.TMDF08.UINT32
+#define RSCAN0TMDF08L RSCAN0.TMDF08.UINT16[L]
+#define RSCAN0TMDF08LL RSCAN0.TMDF08.UINT8[LL]
+#define RSCAN0TMDF08LH RSCAN0.TMDF08.UINT8[LH]
+#define RSCAN0TMDF08H RSCAN0.TMDF08.UINT16[H]
+#define RSCAN0TMDF08HL RSCAN0.TMDF08.UINT8[HL]
+#define RSCAN0TMDF08HH RSCAN0.TMDF08.UINT8[HH]
+#define RSCAN0TMDF18 RSCAN0.TMDF18.UINT32
+#define RSCAN0TMDF18L RSCAN0.TMDF18.UINT16[L]
+#define RSCAN0TMDF18LL RSCAN0.TMDF18.UINT8[LL]
+#define RSCAN0TMDF18LH RSCAN0.TMDF18.UINT8[LH]
+#define RSCAN0TMDF18H RSCAN0.TMDF18.UINT16[H]
+#define RSCAN0TMDF18HL RSCAN0.TMDF18.UINT8[HL]
+#define RSCAN0TMDF18HH RSCAN0.TMDF18.UINT8[HH]
+#define RSCAN0TMID9 RSCAN0.TMID9.UINT32
+#define RSCAN0TMID9L RSCAN0.TMID9.UINT16[L]
+#define RSCAN0TMID9LL RSCAN0.TMID9.UINT8[LL]
+#define RSCAN0TMID9LH RSCAN0.TMID9.UINT8[LH]
+#define RSCAN0TMID9H RSCAN0.TMID9.UINT16[H]
+#define RSCAN0TMID9HL RSCAN0.TMID9.UINT8[HL]
+#define RSCAN0TMID9HH RSCAN0.TMID9.UINT8[HH]
+#define RSCAN0TMPTR9 RSCAN0.TMPTR9.UINT32
+#define RSCAN0TMPTR9L RSCAN0.TMPTR9.UINT16[L]
+#define RSCAN0TMPTR9LL RSCAN0.TMPTR9.UINT8[LL]
+#define RSCAN0TMPTR9LH RSCAN0.TMPTR9.UINT8[LH]
+#define RSCAN0TMPTR9H RSCAN0.TMPTR9.UINT16[H]
+#define RSCAN0TMPTR9HL RSCAN0.TMPTR9.UINT8[HL]
+#define RSCAN0TMPTR9HH RSCAN0.TMPTR9.UINT8[HH]
+#define RSCAN0TMDF09 RSCAN0.TMDF09.UINT32
+#define RSCAN0TMDF09L RSCAN0.TMDF09.UINT16[L]
+#define RSCAN0TMDF09LL RSCAN0.TMDF09.UINT8[LL]
+#define RSCAN0TMDF09LH RSCAN0.TMDF09.UINT8[LH]
+#define RSCAN0TMDF09H RSCAN0.TMDF09.UINT16[H]
+#define RSCAN0TMDF09HL RSCAN0.TMDF09.UINT8[HL]
+#define RSCAN0TMDF09HH RSCAN0.TMDF09.UINT8[HH]
+#define RSCAN0TMDF19 RSCAN0.TMDF19.UINT32
+#define RSCAN0TMDF19L RSCAN0.TMDF19.UINT16[L]
+#define RSCAN0TMDF19LL RSCAN0.TMDF19.UINT8[LL]
+#define RSCAN0TMDF19LH RSCAN0.TMDF19.UINT8[LH]
+#define RSCAN0TMDF19H RSCAN0.TMDF19.UINT16[H]
+#define RSCAN0TMDF19HL RSCAN0.TMDF19.UINT8[HL]
+#define RSCAN0TMDF19HH RSCAN0.TMDF19.UINT8[HH]
+#define RSCAN0TMID10 RSCAN0.TMID10.UINT32
+#define RSCAN0TMID10L RSCAN0.TMID10.UINT16[L]
+#define RSCAN0TMID10LL RSCAN0.TMID10.UINT8[LL]
+#define RSCAN0TMID10LH RSCAN0.TMID10.UINT8[LH]
+#define RSCAN0TMID10H RSCAN0.TMID10.UINT16[H]
+#define RSCAN0TMID10HL RSCAN0.TMID10.UINT8[HL]
+#define RSCAN0TMID10HH RSCAN0.TMID10.UINT8[HH]
+#define RSCAN0TMPTR10 RSCAN0.TMPTR10.UINT32
+#define RSCAN0TMPTR10L RSCAN0.TMPTR10.UINT16[L]
+#define RSCAN0TMPTR10LL RSCAN0.TMPTR10.UINT8[LL]
+#define RSCAN0TMPTR10LH RSCAN0.TMPTR10.UINT8[LH]
+#define RSCAN0TMPTR10H RSCAN0.TMPTR10.UINT16[H]
+#define RSCAN0TMPTR10HL RSCAN0.TMPTR10.UINT8[HL]
+#define RSCAN0TMPTR10HH RSCAN0.TMPTR10.UINT8[HH]
+#define RSCAN0TMDF010 RSCAN0.TMDF010.UINT32
+#define RSCAN0TMDF010L RSCAN0.TMDF010.UINT16[L]
+#define RSCAN0TMDF010LL RSCAN0.TMDF010.UINT8[LL]
+#define RSCAN0TMDF010LH RSCAN0.TMDF010.UINT8[LH]
+#define RSCAN0TMDF010H RSCAN0.TMDF010.UINT16[H]
+#define RSCAN0TMDF010HL RSCAN0.TMDF010.UINT8[HL]
+#define RSCAN0TMDF010HH RSCAN0.TMDF010.UINT8[HH]
+#define RSCAN0TMDF110 RSCAN0.TMDF110.UINT32
+#define RSCAN0TMDF110L RSCAN0.TMDF110.UINT16[L]
+#define RSCAN0TMDF110LL RSCAN0.TMDF110.UINT8[LL]
+#define RSCAN0TMDF110LH RSCAN0.TMDF110.UINT8[LH]
+#define RSCAN0TMDF110H RSCAN0.TMDF110.UINT16[H]
+#define RSCAN0TMDF110HL RSCAN0.TMDF110.UINT8[HL]
+#define RSCAN0TMDF110HH RSCAN0.TMDF110.UINT8[HH]
+#define RSCAN0TMID11 RSCAN0.TMID11.UINT32
+#define RSCAN0TMID11L RSCAN0.TMID11.UINT16[L]
+#define RSCAN0TMID11LL RSCAN0.TMID11.UINT8[LL]
+#define RSCAN0TMID11LH RSCAN0.TMID11.UINT8[LH]
+#define RSCAN0TMID11H RSCAN0.TMID11.UINT16[H]
+#define RSCAN0TMID11HL RSCAN0.TMID11.UINT8[HL]
+#define RSCAN0TMID11HH RSCAN0.TMID11.UINT8[HH]
+#define RSCAN0TMPTR11 RSCAN0.TMPTR11.UINT32
+#define RSCAN0TMPTR11L RSCAN0.TMPTR11.UINT16[L]
+#define RSCAN0TMPTR11LL RSCAN0.TMPTR11.UINT8[LL]
+#define RSCAN0TMPTR11LH RSCAN0.TMPTR11.UINT8[LH]
+#define RSCAN0TMPTR11H RSCAN0.TMPTR11.UINT16[H]
+#define RSCAN0TMPTR11HL RSCAN0.TMPTR11.UINT8[HL]
+#define RSCAN0TMPTR11HH RSCAN0.TMPTR11.UINT8[HH]
+#define RSCAN0TMDF011 RSCAN0.TMDF011.UINT32
+#define RSCAN0TMDF011L RSCAN0.TMDF011.UINT16[L]
+#define RSCAN0TMDF011LL RSCAN0.TMDF011.UINT8[LL]
+#define RSCAN0TMDF011LH RSCAN0.TMDF011.UINT8[LH]
+#define RSCAN0TMDF011H RSCAN0.TMDF011.UINT16[H]
+#define RSCAN0TMDF011HL RSCAN0.TMDF011.UINT8[HL]
+#define RSCAN0TMDF011HH RSCAN0.TMDF011.UINT8[HH]
+#define RSCAN0TMDF111 RSCAN0.TMDF111.UINT32
+#define RSCAN0TMDF111L RSCAN0.TMDF111.UINT16[L]
+#define RSCAN0TMDF111LL RSCAN0.TMDF111.UINT8[LL]
+#define RSCAN0TMDF111LH RSCAN0.TMDF111.UINT8[LH]
+#define RSCAN0TMDF111H RSCAN0.TMDF111.UINT16[H]
+#define RSCAN0TMDF111HL RSCAN0.TMDF111.UINT8[HL]
+#define RSCAN0TMDF111HH RSCAN0.TMDF111.UINT8[HH]
+#define RSCAN0TMID12 RSCAN0.TMID12.UINT32
+#define RSCAN0TMID12L RSCAN0.TMID12.UINT16[L]
+#define RSCAN0TMID12LL RSCAN0.TMID12.UINT8[LL]
+#define RSCAN0TMID12LH RSCAN0.TMID12.UINT8[LH]
+#define RSCAN0TMID12H RSCAN0.TMID12.UINT16[H]
+#define RSCAN0TMID12HL RSCAN0.TMID12.UINT8[HL]
+#define RSCAN0TMID12HH RSCAN0.TMID12.UINT8[HH]
+#define RSCAN0TMPTR12 RSCAN0.TMPTR12.UINT32
+#define RSCAN0TMPTR12L RSCAN0.TMPTR12.UINT16[L]
+#define RSCAN0TMPTR12LL RSCAN0.TMPTR12.UINT8[LL]
+#define RSCAN0TMPTR12LH RSCAN0.TMPTR12.UINT8[LH]
+#define RSCAN0TMPTR12H RSCAN0.TMPTR12.UINT16[H]
+#define RSCAN0TMPTR12HL RSCAN0.TMPTR12.UINT8[HL]
+#define RSCAN0TMPTR12HH RSCAN0.TMPTR12.UINT8[HH]
+#define RSCAN0TMDF012 RSCAN0.TMDF012.UINT32
+#define RSCAN0TMDF012L RSCAN0.TMDF012.UINT16[L]
+#define RSCAN0TMDF012LL RSCAN0.TMDF012.UINT8[LL]
+#define RSCAN0TMDF012LH RSCAN0.TMDF012.UINT8[LH]
+#define RSCAN0TMDF012H RSCAN0.TMDF012.UINT16[H]
+#define RSCAN0TMDF012HL RSCAN0.TMDF012.UINT8[HL]
+#define RSCAN0TMDF012HH RSCAN0.TMDF012.UINT8[HH]
+#define RSCAN0TMDF112 RSCAN0.TMDF112.UINT32
+#define RSCAN0TMDF112L RSCAN0.TMDF112.UINT16[L]
+#define RSCAN0TMDF112LL RSCAN0.TMDF112.UINT8[LL]
+#define RSCAN0TMDF112LH RSCAN0.TMDF112.UINT8[LH]
+#define RSCAN0TMDF112H RSCAN0.TMDF112.UINT16[H]
+#define RSCAN0TMDF112HL RSCAN0.TMDF112.UINT8[HL]
+#define RSCAN0TMDF112HH RSCAN0.TMDF112.UINT8[HH]
+#define RSCAN0TMID13 RSCAN0.TMID13.UINT32
+#define RSCAN0TMID13L RSCAN0.TMID13.UINT16[L]
+#define RSCAN0TMID13LL RSCAN0.TMID13.UINT8[LL]
+#define RSCAN0TMID13LH RSCAN0.TMID13.UINT8[LH]
+#define RSCAN0TMID13H RSCAN0.TMID13.UINT16[H]
+#define RSCAN0TMID13HL RSCAN0.TMID13.UINT8[HL]
+#define RSCAN0TMID13HH RSCAN0.TMID13.UINT8[HH]
+#define RSCAN0TMPTR13 RSCAN0.TMPTR13.UINT32
+#define RSCAN0TMPTR13L RSCAN0.TMPTR13.UINT16[L]
+#define RSCAN0TMPTR13LL RSCAN0.TMPTR13.UINT8[LL]
+#define RSCAN0TMPTR13LH RSCAN0.TMPTR13.UINT8[LH]
+#define RSCAN0TMPTR13H RSCAN0.TMPTR13.UINT16[H]
+#define RSCAN0TMPTR13HL RSCAN0.TMPTR13.UINT8[HL]
+#define RSCAN0TMPTR13HH RSCAN0.TMPTR13.UINT8[HH]
+#define RSCAN0TMDF013 RSCAN0.TMDF013.UINT32
+#define RSCAN0TMDF013L RSCAN0.TMDF013.UINT16[L]
+#define RSCAN0TMDF013LL RSCAN0.TMDF013.UINT8[LL]
+#define RSCAN0TMDF013LH RSCAN0.TMDF013.UINT8[LH]
+#define RSCAN0TMDF013H RSCAN0.TMDF013.UINT16[H]
+#define RSCAN0TMDF013HL RSCAN0.TMDF013.UINT8[HL]
+#define RSCAN0TMDF013HH RSCAN0.TMDF013.UINT8[HH]
+#define RSCAN0TMDF113 RSCAN0.TMDF113.UINT32
+#define RSCAN0TMDF113L RSCAN0.TMDF113.UINT16[L]
+#define RSCAN0TMDF113LL RSCAN0.TMDF113.UINT8[LL]
+#define RSCAN0TMDF113LH RSCAN0.TMDF113.UINT8[LH]
+#define RSCAN0TMDF113H RSCAN0.TMDF113.UINT16[H]
+#define RSCAN0TMDF113HL RSCAN0.TMDF113.UINT8[HL]
+#define RSCAN0TMDF113HH RSCAN0.TMDF113.UINT8[HH]
+#define RSCAN0TMID14 RSCAN0.TMID14.UINT32
+#define RSCAN0TMID14L RSCAN0.TMID14.UINT16[L]
+#define RSCAN0TMID14LL RSCAN0.TMID14.UINT8[LL]
+#define RSCAN0TMID14LH RSCAN0.TMID14.UINT8[LH]
+#define RSCAN0TMID14H RSCAN0.TMID14.UINT16[H]
+#define RSCAN0TMID14HL RSCAN0.TMID14.UINT8[HL]
+#define RSCAN0TMID14HH RSCAN0.TMID14.UINT8[HH]
+#define RSCAN0TMPTR14 RSCAN0.TMPTR14.UINT32
+#define RSCAN0TMPTR14L RSCAN0.TMPTR14.UINT16[L]
+#define RSCAN0TMPTR14LL RSCAN0.TMPTR14.UINT8[LL]
+#define RSCAN0TMPTR14LH RSCAN0.TMPTR14.UINT8[LH]
+#define RSCAN0TMPTR14H RSCAN0.TMPTR14.UINT16[H]
+#define RSCAN0TMPTR14HL RSCAN0.TMPTR14.UINT8[HL]
+#define RSCAN0TMPTR14HH RSCAN0.TMPTR14.UINT8[HH]
+#define RSCAN0TMDF014 RSCAN0.TMDF014.UINT32
+#define RSCAN0TMDF014L RSCAN0.TMDF014.UINT16[L]
+#define RSCAN0TMDF014LL RSCAN0.TMDF014.UINT8[LL]
+#define RSCAN0TMDF014LH RSCAN0.TMDF014.UINT8[LH]
+#define RSCAN0TMDF014H RSCAN0.TMDF014.UINT16[H]
+#define RSCAN0TMDF014HL RSCAN0.TMDF014.UINT8[HL]
+#define RSCAN0TMDF014HH RSCAN0.TMDF014.UINT8[HH]
+#define RSCAN0TMDF114 RSCAN0.TMDF114.UINT32
+#define RSCAN0TMDF114L RSCAN0.TMDF114.UINT16[L]
+#define RSCAN0TMDF114LL RSCAN0.TMDF114.UINT8[LL]
+#define RSCAN0TMDF114LH RSCAN0.TMDF114.UINT8[LH]
+#define RSCAN0TMDF114H RSCAN0.TMDF114.UINT16[H]
+#define RSCAN0TMDF114HL RSCAN0.TMDF114.UINT8[HL]
+#define RSCAN0TMDF114HH RSCAN0.TMDF114.UINT8[HH]
+#define RSCAN0TMID15 RSCAN0.TMID15.UINT32
+#define RSCAN0TMID15L RSCAN0.TMID15.UINT16[L]
+#define RSCAN0TMID15LL RSCAN0.TMID15.UINT8[LL]
+#define RSCAN0TMID15LH RSCAN0.TMID15.UINT8[LH]
+#define RSCAN0TMID15H RSCAN0.TMID15.UINT16[H]
+#define RSCAN0TMID15HL RSCAN0.TMID15.UINT8[HL]
+#define RSCAN0TMID15HH RSCAN0.TMID15.UINT8[HH]
+#define RSCAN0TMPTR15 RSCAN0.TMPTR15.UINT32
+#define RSCAN0TMPTR15L RSCAN0.TMPTR15.UINT16[L]
+#define RSCAN0TMPTR15LL RSCAN0.TMPTR15.UINT8[LL]
+#define RSCAN0TMPTR15LH RSCAN0.TMPTR15.UINT8[LH]
+#define RSCAN0TMPTR15H RSCAN0.TMPTR15.UINT16[H]
+#define RSCAN0TMPTR15HL RSCAN0.TMPTR15.UINT8[HL]
+#define RSCAN0TMPTR15HH RSCAN0.TMPTR15.UINT8[HH]
+#define RSCAN0TMDF015 RSCAN0.TMDF015.UINT32
+#define RSCAN0TMDF015L RSCAN0.TMDF015.UINT16[L]
+#define RSCAN0TMDF015LL RSCAN0.TMDF015.UINT8[LL]
+#define RSCAN0TMDF015LH RSCAN0.TMDF015.UINT8[LH]
+#define RSCAN0TMDF015H RSCAN0.TMDF015.UINT16[H]
+#define RSCAN0TMDF015HL RSCAN0.TMDF015.UINT8[HL]
+#define RSCAN0TMDF015HH RSCAN0.TMDF015.UINT8[HH]
+#define RSCAN0TMDF115 RSCAN0.TMDF115.UINT32
+#define RSCAN0TMDF115L RSCAN0.TMDF115.UINT16[L]
+#define RSCAN0TMDF115LL RSCAN0.TMDF115.UINT8[LL]
+#define RSCAN0TMDF115LH RSCAN0.TMDF115.UINT8[LH]
+#define RSCAN0TMDF115H RSCAN0.TMDF115.UINT16[H]
+#define RSCAN0TMDF115HL RSCAN0.TMDF115.UINT8[HL]
+#define RSCAN0TMDF115HH RSCAN0.TMDF115.UINT8[HH]
+#define RSCAN0TMID16 RSCAN0.TMID16.UINT32
+#define RSCAN0TMID16L RSCAN0.TMID16.UINT16[L]
+#define RSCAN0TMID16LL RSCAN0.TMID16.UINT8[LL]
+#define RSCAN0TMID16LH RSCAN0.TMID16.UINT8[LH]
+#define RSCAN0TMID16H RSCAN0.TMID16.UINT16[H]
+#define RSCAN0TMID16HL RSCAN0.TMID16.UINT8[HL]
+#define RSCAN0TMID16HH RSCAN0.TMID16.UINT8[HH]
+#define RSCAN0TMPTR16 RSCAN0.TMPTR16.UINT32
+#define RSCAN0TMPTR16L RSCAN0.TMPTR16.UINT16[L]
+#define RSCAN0TMPTR16LL RSCAN0.TMPTR16.UINT8[LL]
+#define RSCAN0TMPTR16LH RSCAN0.TMPTR16.UINT8[LH]
+#define RSCAN0TMPTR16H RSCAN0.TMPTR16.UINT16[H]
+#define RSCAN0TMPTR16HL RSCAN0.TMPTR16.UINT8[HL]
+#define RSCAN0TMPTR16HH RSCAN0.TMPTR16.UINT8[HH]
+#define RSCAN0TMDF016 RSCAN0.TMDF016.UINT32
+#define RSCAN0TMDF016L RSCAN0.TMDF016.UINT16[L]
+#define RSCAN0TMDF016LL RSCAN0.TMDF016.UINT8[LL]
+#define RSCAN0TMDF016LH RSCAN0.TMDF016.UINT8[LH]
+#define RSCAN0TMDF016H RSCAN0.TMDF016.UINT16[H]
+#define RSCAN0TMDF016HL RSCAN0.TMDF016.UINT8[HL]
+#define RSCAN0TMDF016HH RSCAN0.TMDF016.UINT8[HH]
+#define RSCAN0TMDF116 RSCAN0.TMDF116.UINT32
+#define RSCAN0TMDF116L RSCAN0.TMDF116.UINT16[L]
+#define RSCAN0TMDF116LL RSCAN0.TMDF116.UINT8[LL]
+#define RSCAN0TMDF116LH RSCAN0.TMDF116.UINT8[LH]
+#define RSCAN0TMDF116H RSCAN0.TMDF116.UINT16[H]
+#define RSCAN0TMDF116HL RSCAN0.TMDF116.UINT8[HL]
+#define RSCAN0TMDF116HH RSCAN0.TMDF116.UINT8[HH]
+#define RSCAN0TMID17 RSCAN0.TMID17.UINT32
+#define RSCAN0TMID17L RSCAN0.TMID17.UINT16[L]
+#define RSCAN0TMID17LL RSCAN0.TMID17.UINT8[LL]
+#define RSCAN0TMID17LH RSCAN0.TMID17.UINT8[LH]
+#define RSCAN0TMID17H RSCAN0.TMID17.UINT16[H]
+#define RSCAN0TMID17HL RSCAN0.TMID17.UINT8[HL]
+#define RSCAN0TMID17HH RSCAN0.TMID17.UINT8[HH]
+#define RSCAN0TMPTR17 RSCAN0.TMPTR17.UINT32
+#define RSCAN0TMPTR17L RSCAN0.TMPTR17.UINT16[L]
+#define RSCAN0TMPTR17LL RSCAN0.TMPTR17.UINT8[LL]
+#define RSCAN0TMPTR17LH RSCAN0.TMPTR17.UINT8[LH]
+#define RSCAN0TMPTR17H RSCAN0.TMPTR17.UINT16[H]
+#define RSCAN0TMPTR17HL RSCAN0.TMPTR17.UINT8[HL]
+#define RSCAN0TMPTR17HH RSCAN0.TMPTR17.UINT8[HH]
+#define RSCAN0TMDF017 RSCAN0.TMDF017.UINT32
+#define RSCAN0TMDF017L RSCAN0.TMDF017.UINT16[L]
+#define RSCAN0TMDF017LL RSCAN0.TMDF017.UINT8[LL]
+#define RSCAN0TMDF017LH RSCAN0.TMDF017.UINT8[LH]
+#define RSCAN0TMDF017H RSCAN0.TMDF017.UINT16[H]
+#define RSCAN0TMDF017HL RSCAN0.TMDF017.UINT8[HL]
+#define RSCAN0TMDF017HH RSCAN0.TMDF017.UINT8[HH]
+#define RSCAN0TMDF117 RSCAN0.TMDF117.UINT32
+#define RSCAN0TMDF117L RSCAN0.TMDF117.UINT16[L]
+#define RSCAN0TMDF117LL RSCAN0.TMDF117.UINT8[LL]
+#define RSCAN0TMDF117LH RSCAN0.TMDF117.UINT8[LH]
+#define RSCAN0TMDF117H RSCAN0.TMDF117.UINT16[H]
+#define RSCAN0TMDF117HL RSCAN0.TMDF117.UINT8[HL]
+#define RSCAN0TMDF117HH RSCAN0.TMDF117.UINT8[HH]
+#define RSCAN0TMID18 RSCAN0.TMID18.UINT32
+#define RSCAN0TMID18L RSCAN0.TMID18.UINT16[L]
+#define RSCAN0TMID18LL RSCAN0.TMID18.UINT8[LL]
+#define RSCAN0TMID18LH RSCAN0.TMID18.UINT8[LH]
+#define RSCAN0TMID18H RSCAN0.TMID18.UINT16[H]
+#define RSCAN0TMID18HL RSCAN0.TMID18.UINT8[HL]
+#define RSCAN0TMID18HH RSCAN0.TMID18.UINT8[HH]
+#define RSCAN0TMPTR18 RSCAN0.TMPTR18.UINT32
+#define RSCAN0TMPTR18L RSCAN0.TMPTR18.UINT16[L]
+#define RSCAN0TMPTR18LL RSCAN0.TMPTR18.UINT8[LL]
+#define RSCAN0TMPTR18LH RSCAN0.TMPTR18.UINT8[LH]
+#define RSCAN0TMPTR18H RSCAN0.TMPTR18.UINT16[H]
+#define RSCAN0TMPTR18HL RSCAN0.TMPTR18.UINT8[HL]
+#define RSCAN0TMPTR18HH RSCAN0.TMPTR18.UINT8[HH]
+#define RSCAN0TMDF018 RSCAN0.TMDF018.UINT32
+#define RSCAN0TMDF018L RSCAN0.TMDF018.UINT16[L]
+#define RSCAN0TMDF018LL RSCAN0.TMDF018.UINT8[LL]
+#define RSCAN0TMDF018LH RSCAN0.TMDF018.UINT8[LH]
+#define RSCAN0TMDF018H RSCAN0.TMDF018.UINT16[H]
+#define RSCAN0TMDF018HL RSCAN0.TMDF018.UINT8[HL]
+#define RSCAN0TMDF018HH RSCAN0.TMDF018.UINT8[HH]
+#define RSCAN0TMDF118 RSCAN0.TMDF118.UINT32
+#define RSCAN0TMDF118L RSCAN0.TMDF118.UINT16[L]
+#define RSCAN0TMDF118LL RSCAN0.TMDF118.UINT8[LL]
+#define RSCAN0TMDF118LH RSCAN0.TMDF118.UINT8[LH]
+#define RSCAN0TMDF118H RSCAN0.TMDF118.UINT16[H]
+#define RSCAN0TMDF118HL RSCAN0.TMDF118.UINT8[HL]
+#define RSCAN0TMDF118HH RSCAN0.TMDF118.UINT8[HH]
+#define RSCAN0TMID19 RSCAN0.TMID19.UINT32
+#define RSCAN0TMID19L RSCAN0.TMID19.UINT16[L]
+#define RSCAN0TMID19LL RSCAN0.TMID19.UINT8[LL]
+#define RSCAN0TMID19LH RSCAN0.TMID19.UINT8[LH]
+#define RSCAN0TMID19H RSCAN0.TMID19.UINT16[H]
+#define RSCAN0TMID19HL RSCAN0.TMID19.UINT8[HL]
+#define RSCAN0TMID19HH RSCAN0.TMID19.UINT8[HH]
+#define RSCAN0TMPTR19 RSCAN0.TMPTR19.UINT32
+#define RSCAN0TMPTR19L RSCAN0.TMPTR19.UINT16[L]
+#define RSCAN0TMPTR19LL RSCAN0.TMPTR19.UINT8[LL]
+#define RSCAN0TMPTR19LH RSCAN0.TMPTR19.UINT8[LH]
+#define RSCAN0TMPTR19H RSCAN0.TMPTR19.UINT16[H]
+#define RSCAN0TMPTR19HL RSCAN0.TMPTR19.UINT8[HL]
+#define RSCAN0TMPTR19HH RSCAN0.TMPTR19.UINT8[HH]
+#define RSCAN0TMDF019 RSCAN0.TMDF019.UINT32
+#define RSCAN0TMDF019L RSCAN0.TMDF019.UINT16[L]
+#define RSCAN0TMDF019LL RSCAN0.TMDF019.UINT8[LL]
+#define RSCAN0TMDF019LH RSCAN0.TMDF019.UINT8[LH]
+#define RSCAN0TMDF019H RSCAN0.TMDF019.UINT16[H]
+#define RSCAN0TMDF019HL RSCAN0.TMDF019.UINT8[HL]
+#define RSCAN0TMDF019HH RSCAN0.TMDF019.UINT8[HH]
+#define RSCAN0TMDF119 RSCAN0.TMDF119.UINT32
+#define RSCAN0TMDF119L RSCAN0.TMDF119.UINT16[L]
+#define RSCAN0TMDF119LL RSCAN0.TMDF119.UINT8[LL]
+#define RSCAN0TMDF119LH RSCAN0.TMDF119.UINT8[LH]
+#define RSCAN0TMDF119H RSCAN0.TMDF119.UINT16[H]
+#define RSCAN0TMDF119HL RSCAN0.TMDF119.UINT8[HL]
+#define RSCAN0TMDF119HH RSCAN0.TMDF119.UINT8[HH]
+#define RSCAN0TMID20 RSCAN0.TMID20.UINT32
+#define RSCAN0TMID20L RSCAN0.TMID20.UINT16[L]
+#define RSCAN0TMID20LL RSCAN0.TMID20.UINT8[LL]
+#define RSCAN0TMID20LH RSCAN0.TMID20.UINT8[LH]
+#define RSCAN0TMID20H RSCAN0.TMID20.UINT16[H]
+#define RSCAN0TMID20HL RSCAN0.TMID20.UINT8[HL]
+#define RSCAN0TMID20HH RSCAN0.TMID20.UINT8[HH]
+#define RSCAN0TMPTR20 RSCAN0.TMPTR20.UINT32
+#define RSCAN0TMPTR20L RSCAN0.TMPTR20.UINT16[L]
+#define RSCAN0TMPTR20LL RSCAN0.TMPTR20.UINT8[LL]
+#define RSCAN0TMPTR20LH RSCAN0.TMPTR20.UINT8[LH]
+#define RSCAN0TMPTR20H RSCAN0.TMPTR20.UINT16[H]
+#define RSCAN0TMPTR20HL RSCAN0.TMPTR20.UINT8[HL]
+#define RSCAN0TMPTR20HH RSCAN0.TMPTR20.UINT8[HH]
+#define RSCAN0TMDF020 RSCAN0.TMDF020.UINT32
+#define RSCAN0TMDF020L RSCAN0.TMDF020.UINT16[L]
+#define RSCAN0TMDF020LL RSCAN0.TMDF020.UINT8[LL]
+#define RSCAN0TMDF020LH RSCAN0.TMDF020.UINT8[LH]
+#define RSCAN0TMDF020H RSCAN0.TMDF020.UINT16[H]
+#define RSCAN0TMDF020HL RSCAN0.TMDF020.UINT8[HL]
+#define RSCAN0TMDF020HH RSCAN0.TMDF020.UINT8[HH]
+#define RSCAN0TMDF120 RSCAN0.TMDF120.UINT32
+#define RSCAN0TMDF120L RSCAN0.TMDF120.UINT16[L]
+#define RSCAN0TMDF120LL RSCAN0.TMDF120.UINT8[LL]
+#define RSCAN0TMDF120LH RSCAN0.TMDF120.UINT8[LH]
+#define RSCAN0TMDF120H RSCAN0.TMDF120.UINT16[H]
+#define RSCAN0TMDF120HL RSCAN0.TMDF120.UINT8[HL]
+#define RSCAN0TMDF120HH RSCAN0.TMDF120.UINT8[HH]
+#define RSCAN0TMID21 RSCAN0.TMID21.UINT32
+#define RSCAN0TMID21L RSCAN0.TMID21.UINT16[L]
+#define RSCAN0TMID21LL RSCAN0.TMID21.UINT8[LL]
+#define RSCAN0TMID21LH RSCAN0.TMID21.UINT8[LH]
+#define RSCAN0TMID21H RSCAN0.TMID21.UINT16[H]
+#define RSCAN0TMID21HL RSCAN0.TMID21.UINT8[HL]
+#define RSCAN0TMID21HH RSCAN0.TMID21.UINT8[HH]
+#define RSCAN0TMPTR21 RSCAN0.TMPTR21.UINT32
+#define RSCAN0TMPTR21L RSCAN0.TMPTR21.UINT16[L]
+#define RSCAN0TMPTR21LL RSCAN0.TMPTR21.UINT8[LL]
+#define RSCAN0TMPTR21LH RSCAN0.TMPTR21.UINT8[LH]
+#define RSCAN0TMPTR21H RSCAN0.TMPTR21.UINT16[H]
+#define RSCAN0TMPTR21HL RSCAN0.TMPTR21.UINT8[HL]
+#define RSCAN0TMPTR21HH RSCAN0.TMPTR21.UINT8[HH]
+#define RSCAN0TMDF021 RSCAN0.TMDF021.UINT32
+#define RSCAN0TMDF021L RSCAN0.TMDF021.UINT16[L]
+#define RSCAN0TMDF021LL RSCAN0.TMDF021.UINT8[LL]
+#define RSCAN0TMDF021LH RSCAN0.TMDF021.UINT8[LH]
+#define RSCAN0TMDF021H RSCAN0.TMDF021.UINT16[H]
+#define RSCAN0TMDF021HL RSCAN0.TMDF021.UINT8[HL]
+#define RSCAN0TMDF021HH RSCAN0.TMDF021.UINT8[HH]
+#define RSCAN0TMDF121 RSCAN0.TMDF121.UINT32
+#define RSCAN0TMDF121L RSCAN0.TMDF121.UINT16[L]
+#define RSCAN0TMDF121LL RSCAN0.TMDF121.UINT8[LL]
+#define RSCAN0TMDF121LH RSCAN0.TMDF121.UINT8[LH]
+#define RSCAN0TMDF121H RSCAN0.TMDF121.UINT16[H]
+#define RSCAN0TMDF121HL RSCAN0.TMDF121.UINT8[HL]
+#define RSCAN0TMDF121HH RSCAN0.TMDF121.UINT8[HH]
+#define RSCAN0TMID22 RSCAN0.TMID22.UINT32
+#define RSCAN0TMID22L RSCAN0.TMID22.UINT16[L]
+#define RSCAN0TMID22LL RSCAN0.TMID22.UINT8[LL]
+#define RSCAN0TMID22LH RSCAN0.TMID22.UINT8[LH]
+#define RSCAN0TMID22H RSCAN0.TMID22.UINT16[H]
+#define RSCAN0TMID22HL RSCAN0.TMID22.UINT8[HL]
+#define RSCAN0TMID22HH RSCAN0.TMID22.UINT8[HH]
+#define RSCAN0TMPTR22 RSCAN0.TMPTR22.UINT32
+#define RSCAN0TMPTR22L RSCAN0.TMPTR22.UINT16[L]
+#define RSCAN0TMPTR22LL RSCAN0.TMPTR22.UINT8[LL]
+#define RSCAN0TMPTR22LH RSCAN0.TMPTR22.UINT8[LH]
+#define RSCAN0TMPTR22H RSCAN0.TMPTR22.UINT16[H]
+#define RSCAN0TMPTR22HL RSCAN0.TMPTR22.UINT8[HL]
+#define RSCAN0TMPTR22HH RSCAN0.TMPTR22.UINT8[HH]
+#define RSCAN0TMDF022 RSCAN0.TMDF022.UINT32
+#define RSCAN0TMDF022L RSCAN0.TMDF022.UINT16[L]
+#define RSCAN0TMDF022LL RSCAN0.TMDF022.UINT8[LL]
+#define RSCAN0TMDF022LH RSCAN0.TMDF022.UINT8[LH]
+#define RSCAN0TMDF022H RSCAN0.TMDF022.UINT16[H]
+#define RSCAN0TMDF022HL RSCAN0.TMDF022.UINT8[HL]
+#define RSCAN0TMDF022HH RSCAN0.TMDF022.UINT8[HH]
+#define RSCAN0TMDF122 RSCAN0.TMDF122.UINT32
+#define RSCAN0TMDF122L RSCAN0.TMDF122.UINT16[L]
+#define RSCAN0TMDF122LL RSCAN0.TMDF122.UINT8[LL]
+#define RSCAN0TMDF122LH RSCAN0.TMDF122.UINT8[LH]
+#define RSCAN0TMDF122H RSCAN0.TMDF122.UINT16[H]
+#define RSCAN0TMDF122HL RSCAN0.TMDF122.UINT8[HL]
+#define RSCAN0TMDF122HH RSCAN0.TMDF122.UINT8[HH]
+#define RSCAN0TMID23 RSCAN0.TMID23.UINT32
+#define RSCAN0TMID23L RSCAN0.TMID23.UINT16[L]
+#define RSCAN0TMID23LL RSCAN0.TMID23.UINT8[LL]
+#define RSCAN0TMID23LH RSCAN0.TMID23.UINT8[LH]
+#define RSCAN0TMID23H RSCAN0.TMID23.UINT16[H]
+#define RSCAN0TMID23HL RSCAN0.TMID23.UINT8[HL]
+#define RSCAN0TMID23HH RSCAN0.TMID23.UINT8[HH]
+#define RSCAN0TMPTR23 RSCAN0.TMPTR23.UINT32
+#define RSCAN0TMPTR23L RSCAN0.TMPTR23.UINT16[L]
+#define RSCAN0TMPTR23LL RSCAN0.TMPTR23.UINT8[LL]
+#define RSCAN0TMPTR23LH RSCAN0.TMPTR23.UINT8[LH]
+#define RSCAN0TMPTR23H RSCAN0.TMPTR23.UINT16[H]
+#define RSCAN0TMPTR23HL RSCAN0.TMPTR23.UINT8[HL]
+#define RSCAN0TMPTR23HH RSCAN0.TMPTR23.UINT8[HH]
+#define RSCAN0TMDF023 RSCAN0.TMDF023.UINT32
+#define RSCAN0TMDF023L RSCAN0.TMDF023.UINT16[L]
+#define RSCAN0TMDF023LL RSCAN0.TMDF023.UINT8[LL]
+#define RSCAN0TMDF023LH RSCAN0.TMDF023.UINT8[LH]
+#define RSCAN0TMDF023H RSCAN0.TMDF023.UINT16[H]
+#define RSCAN0TMDF023HL RSCAN0.TMDF023.UINT8[HL]
+#define RSCAN0TMDF023HH RSCAN0.TMDF023.UINT8[HH]
+#define RSCAN0TMDF123 RSCAN0.TMDF123.UINT32
+#define RSCAN0TMDF123L RSCAN0.TMDF123.UINT16[L]
+#define RSCAN0TMDF123LL RSCAN0.TMDF123.UINT8[LL]
+#define RSCAN0TMDF123LH RSCAN0.TMDF123.UINT8[LH]
+#define RSCAN0TMDF123H RSCAN0.TMDF123.UINT16[H]
+#define RSCAN0TMDF123HL RSCAN0.TMDF123.UINT8[HL]
+#define RSCAN0TMDF123HH RSCAN0.TMDF123.UINT8[HH]
+#define RSCAN0TMID24 RSCAN0.TMID24.UINT32
+#define RSCAN0TMID24L RSCAN0.TMID24.UINT16[L]
+#define RSCAN0TMID24LL RSCAN0.TMID24.UINT8[LL]
+#define RSCAN0TMID24LH RSCAN0.TMID24.UINT8[LH]
+#define RSCAN0TMID24H RSCAN0.TMID24.UINT16[H]
+#define RSCAN0TMID24HL RSCAN0.TMID24.UINT8[HL]
+#define RSCAN0TMID24HH RSCAN0.TMID24.UINT8[HH]
+#define RSCAN0TMPTR24 RSCAN0.TMPTR24.UINT32
+#define RSCAN0TMPTR24L RSCAN0.TMPTR24.UINT16[L]
+#define RSCAN0TMPTR24LL RSCAN0.TMPTR24.UINT8[LL]
+#define RSCAN0TMPTR24LH RSCAN0.TMPTR24.UINT8[LH]
+#define RSCAN0TMPTR24H RSCAN0.TMPTR24.UINT16[H]
+#define RSCAN0TMPTR24HL RSCAN0.TMPTR24.UINT8[HL]
+#define RSCAN0TMPTR24HH RSCAN0.TMPTR24.UINT8[HH]
+#define RSCAN0TMDF024 RSCAN0.TMDF024.UINT32
+#define RSCAN0TMDF024L RSCAN0.TMDF024.UINT16[L]
+#define RSCAN0TMDF024LL RSCAN0.TMDF024.UINT8[LL]
+#define RSCAN0TMDF024LH RSCAN0.TMDF024.UINT8[LH]
+#define RSCAN0TMDF024H RSCAN0.TMDF024.UINT16[H]
+#define RSCAN0TMDF024HL RSCAN0.TMDF024.UINT8[HL]
+#define RSCAN0TMDF024HH RSCAN0.TMDF024.UINT8[HH]
+#define RSCAN0TMDF124 RSCAN0.TMDF124.UINT32
+#define RSCAN0TMDF124L RSCAN0.TMDF124.UINT16[L]
+#define RSCAN0TMDF124LL RSCAN0.TMDF124.UINT8[LL]
+#define RSCAN0TMDF124LH RSCAN0.TMDF124.UINT8[LH]
+#define RSCAN0TMDF124H RSCAN0.TMDF124.UINT16[H]
+#define RSCAN0TMDF124HL RSCAN0.TMDF124.UINT8[HL]
+#define RSCAN0TMDF124HH RSCAN0.TMDF124.UINT8[HH]
+#define RSCAN0TMID25 RSCAN0.TMID25.UINT32
+#define RSCAN0TMID25L RSCAN0.TMID25.UINT16[L]
+#define RSCAN0TMID25LL RSCAN0.TMID25.UINT8[LL]
+#define RSCAN0TMID25LH RSCAN0.TMID25.UINT8[LH]
+#define RSCAN0TMID25H RSCAN0.TMID25.UINT16[H]
+#define RSCAN0TMID25HL RSCAN0.TMID25.UINT8[HL]
+#define RSCAN0TMID25HH RSCAN0.TMID25.UINT8[HH]
+#define RSCAN0TMPTR25 RSCAN0.TMPTR25.UINT32
+#define RSCAN0TMPTR25L RSCAN0.TMPTR25.UINT16[L]
+#define RSCAN0TMPTR25LL RSCAN0.TMPTR25.UINT8[LL]
+#define RSCAN0TMPTR25LH RSCAN0.TMPTR25.UINT8[LH]
+#define RSCAN0TMPTR25H RSCAN0.TMPTR25.UINT16[H]
+#define RSCAN0TMPTR25HL RSCAN0.TMPTR25.UINT8[HL]
+#define RSCAN0TMPTR25HH RSCAN0.TMPTR25.UINT8[HH]
+#define RSCAN0TMDF025 RSCAN0.TMDF025.UINT32
+#define RSCAN0TMDF025L RSCAN0.TMDF025.UINT16[L]
+#define RSCAN0TMDF025LL RSCAN0.TMDF025.UINT8[LL]
+#define RSCAN0TMDF025LH RSCAN0.TMDF025.UINT8[LH]
+#define RSCAN0TMDF025H RSCAN0.TMDF025.UINT16[H]
+#define RSCAN0TMDF025HL RSCAN0.TMDF025.UINT8[HL]
+#define RSCAN0TMDF025HH RSCAN0.TMDF025.UINT8[HH]
+#define RSCAN0TMDF125 RSCAN0.TMDF125.UINT32
+#define RSCAN0TMDF125L RSCAN0.TMDF125.UINT16[L]
+#define RSCAN0TMDF125LL RSCAN0.TMDF125.UINT8[LL]
+#define RSCAN0TMDF125LH RSCAN0.TMDF125.UINT8[LH]
+#define RSCAN0TMDF125H RSCAN0.TMDF125.UINT16[H]
+#define RSCAN0TMDF125HL RSCAN0.TMDF125.UINT8[HL]
+#define RSCAN0TMDF125HH RSCAN0.TMDF125.UINT8[HH]
+#define RSCAN0TMID26 RSCAN0.TMID26.UINT32
+#define RSCAN0TMID26L RSCAN0.TMID26.UINT16[L]
+#define RSCAN0TMID26LL RSCAN0.TMID26.UINT8[LL]
+#define RSCAN0TMID26LH RSCAN0.TMID26.UINT8[LH]
+#define RSCAN0TMID26H RSCAN0.TMID26.UINT16[H]
+#define RSCAN0TMID26HL RSCAN0.TMID26.UINT8[HL]
+#define RSCAN0TMID26HH RSCAN0.TMID26.UINT8[HH]
+#define RSCAN0TMPTR26 RSCAN0.TMPTR26.UINT32
+#define RSCAN0TMPTR26L RSCAN0.TMPTR26.UINT16[L]
+#define RSCAN0TMPTR26LL RSCAN0.TMPTR26.UINT8[LL]
+#define RSCAN0TMPTR26LH RSCAN0.TMPTR26.UINT8[LH]
+#define RSCAN0TMPTR26H RSCAN0.TMPTR26.UINT16[H]
+#define RSCAN0TMPTR26HL RSCAN0.TMPTR26.UINT8[HL]
+#define RSCAN0TMPTR26HH RSCAN0.TMPTR26.UINT8[HH]
+#define RSCAN0TMDF026 RSCAN0.TMDF026.UINT32
+#define RSCAN0TMDF026L RSCAN0.TMDF026.UINT16[L]
+#define RSCAN0TMDF026LL RSCAN0.TMDF026.UINT8[LL]
+#define RSCAN0TMDF026LH RSCAN0.TMDF026.UINT8[LH]
+#define RSCAN0TMDF026H RSCAN0.TMDF026.UINT16[H]
+#define RSCAN0TMDF026HL RSCAN0.TMDF026.UINT8[HL]
+#define RSCAN0TMDF026HH RSCAN0.TMDF026.UINT8[HH]
+#define RSCAN0TMDF126 RSCAN0.TMDF126.UINT32
+#define RSCAN0TMDF126L RSCAN0.TMDF126.UINT16[L]
+#define RSCAN0TMDF126LL RSCAN0.TMDF126.UINT8[LL]
+#define RSCAN0TMDF126LH RSCAN0.TMDF126.UINT8[LH]
+#define RSCAN0TMDF126H RSCAN0.TMDF126.UINT16[H]
+#define RSCAN0TMDF126HL RSCAN0.TMDF126.UINT8[HL]
+#define RSCAN0TMDF126HH RSCAN0.TMDF126.UINT8[HH]
+#define RSCAN0TMID27 RSCAN0.TMID27.UINT32
+#define RSCAN0TMID27L RSCAN0.TMID27.UINT16[L]
+#define RSCAN0TMID27LL RSCAN0.TMID27.UINT8[LL]
+#define RSCAN0TMID27LH RSCAN0.TMID27.UINT8[LH]
+#define RSCAN0TMID27H RSCAN0.TMID27.UINT16[H]
+#define RSCAN0TMID27HL RSCAN0.TMID27.UINT8[HL]
+#define RSCAN0TMID27HH RSCAN0.TMID27.UINT8[HH]
+#define RSCAN0TMPTR27 RSCAN0.TMPTR27.UINT32
+#define RSCAN0TMPTR27L RSCAN0.TMPTR27.UINT16[L]
+#define RSCAN0TMPTR27LL RSCAN0.TMPTR27.UINT8[LL]
+#define RSCAN0TMPTR27LH RSCAN0.TMPTR27.UINT8[LH]
+#define RSCAN0TMPTR27H RSCAN0.TMPTR27.UINT16[H]
+#define RSCAN0TMPTR27HL RSCAN0.TMPTR27.UINT8[HL]
+#define RSCAN0TMPTR27HH RSCAN0.TMPTR27.UINT8[HH]
+#define RSCAN0TMDF027 RSCAN0.TMDF027.UINT32
+#define RSCAN0TMDF027L RSCAN0.TMDF027.UINT16[L]
+#define RSCAN0TMDF027LL RSCAN0.TMDF027.UINT8[LL]
+#define RSCAN0TMDF027LH RSCAN0.TMDF027.UINT8[LH]
+#define RSCAN0TMDF027H RSCAN0.TMDF027.UINT16[H]
+#define RSCAN0TMDF027HL RSCAN0.TMDF027.UINT8[HL]
+#define RSCAN0TMDF027HH RSCAN0.TMDF027.UINT8[HH]
+#define RSCAN0TMDF127 RSCAN0.TMDF127.UINT32
+#define RSCAN0TMDF127L RSCAN0.TMDF127.UINT16[L]
+#define RSCAN0TMDF127LL RSCAN0.TMDF127.UINT8[LL]
+#define RSCAN0TMDF127LH RSCAN0.TMDF127.UINT8[LH]
+#define RSCAN0TMDF127H RSCAN0.TMDF127.UINT16[H]
+#define RSCAN0TMDF127HL RSCAN0.TMDF127.UINT8[HL]
+#define RSCAN0TMDF127HH RSCAN0.TMDF127.UINT8[HH]
+#define RSCAN0TMID28 RSCAN0.TMID28.UINT32
+#define RSCAN0TMID28L RSCAN0.TMID28.UINT16[L]
+#define RSCAN0TMID28LL RSCAN0.TMID28.UINT8[LL]
+#define RSCAN0TMID28LH RSCAN0.TMID28.UINT8[LH]
+#define RSCAN0TMID28H RSCAN0.TMID28.UINT16[H]
+#define RSCAN0TMID28HL RSCAN0.TMID28.UINT8[HL]
+#define RSCAN0TMID28HH RSCAN0.TMID28.UINT8[HH]
+#define RSCAN0TMPTR28 RSCAN0.TMPTR28.UINT32
+#define RSCAN0TMPTR28L RSCAN0.TMPTR28.UINT16[L]
+#define RSCAN0TMPTR28LL RSCAN0.TMPTR28.UINT8[LL]
+#define RSCAN0TMPTR28LH RSCAN0.TMPTR28.UINT8[LH]
+#define RSCAN0TMPTR28H RSCAN0.TMPTR28.UINT16[H]
+#define RSCAN0TMPTR28HL RSCAN0.TMPTR28.UINT8[HL]
+#define RSCAN0TMPTR28HH RSCAN0.TMPTR28.UINT8[HH]
+#define RSCAN0TMDF028 RSCAN0.TMDF028.UINT32
+#define RSCAN0TMDF028L RSCAN0.TMDF028.UINT16[L]
+#define RSCAN0TMDF028LL RSCAN0.TMDF028.UINT8[LL]
+#define RSCAN0TMDF028LH RSCAN0.TMDF028.UINT8[LH]
+#define RSCAN0TMDF028H RSCAN0.TMDF028.UINT16[H]
+#define RSCAN0TMDF028HL RSCAN0.TMDF028.UINT8[HL]
+#define RSCAN0TMDF028HH RSCAN0.TMDF028.UINT8[HH]
+#define RSCAN0TMDF128 RSCAN0.TMDF128.UINT32
+#define RSCAN0TMDF128L RSCAN0.TMDF128.UINT16[L]
+#define RSCAN0TMDF128LL RSCAN0.TMDF128.UINT8[LL]
+#define RSCAN0TMDF128LH RSCAN0.TMDF128.UINT8[LH]
+#define RSCAN0TMDF128H RSCAN0.TMDF128.UINT16[H]
+#define RSCAN0TMDF128HL RSCAN0.TMDF128.UINT8[HL]
+#define RSCAN0TMDF128HH RSCAN0.TMDF128.UINT8[HH]
+#define RSCAN0TMID29 RSCAN0.TMID29.UINT32
+#define RSCAN0TMID29L RSCAN0.TMID29.UINT16[L]
+#define RSCAN0TMID29LL RSCAN0.TMID29.UINT8[LL]
+#define RSCAN0TMID29LH RSCAN0.TMID29.UINT8[LH]
+#define RSCAN0TMID29H RSCAN0.TMID29.UINT16[H]
+#define RSCAN0TMID29HL RSCAN0.TMID29.UINT8[HL]
+#define RSCAN0TMID29HH RSCAN0.TMID29.UINT8[HH]
+#define RSCAN0TMPTR29 RSCAN0.TMPTR29.UINT32
+#define RSCAN0TMPTR29L RSCAN0.TMPTR29.UINT16[L]
+#define RSCAN0TMPTR29LL RSCAN0.TMPTR29.UINT8[LL]
+#define RSCAN0TMPTR29LH RSCAN0.TMPTR29.UINT8[LH]
+#define RSCAN0TMPTR29H RSCAN0.TMPTR29.UINT16[H]
+#define RSCAN0TMPTR29HL RSCAN0.TMPTR29.UINT8[HL]
+#define RSCAN0TMPTR29HH RSCAN0.TMPTR29.UINT8[HH]
+#define RSCAN0TMDF029 RSCAN0.TMDF029.UINT32
+#define RSCAN0TMDF029L RSCAN0.TMDF029.UINT16[L]
+#define RSCAN0TMDF029LL RSCAN0.TMDF029.UINT8[LL]
+#define RSCAN0TMDF029LH RSCAN0.TMDF029.UINT8[LH]
+#define RSCAN0TMDF029H RSCAN0.TMDF029.UINT16[H]
+#define RSCAN0TMDF029HL RSCAN0.TMDF029.UINT8[HL]
+#define RSCAN0TMDF029HH RSCAN0.TMDF029.UINT8[HH]
+#define RSCAN0TMDF129 RSCAN0.TMDF129.UINT32
+#define RSCAN0TMDF129L RSCAN0.TMDF129.UINT16[L]
+#define RSCAN0TMDF129LL RSCAN0.TMDF129.UINT8[LL]
+#define RSCAN0TMDF129LH RSCAN0.TMDF129.UINT8[LH]
+#define RSCAN0TMDF129H RSCAN0.TMDF129.UINT16[H]
+#define RSCAN0TMDF129HL RSCAN0.TMDF129.UINT8[HL]
+#define RSCAN0TMDF129HH RSCAN0.TMDF129.UINT8[HH]
+#define RSCAN0TMID30 RSCAN0.TMID30.UINT32
+#define RSCAN0TMID30L RSCAN0.TMID30.UINT16[L]
+#define RSCAN0TMID30LL RSCAN0.TMID30.UINT8[LL]
+#define RSCAN0TMID30LH RSCAN0.TMID30.UINT8[LH]
+#define RSCAN0TMID30H RSCAN0.TMID30.UINT16[H]
+#define RSCAN0TMID30HL RSCAN0.TMID30.UINT8[HL]
+#define RSCAN0TMID30HH RSCAN0.TMID30.UINT8[HH]
+#define RSCAN0TMPTR30 RSCAN0.TMPTR30.UINT32
+#define RSCAN0TMPTR30L RSCAN0.TMPTR30.UINT16[L]
+#define RSCAN0TMPTR30LL RSCAN0.TMPTR30.UINT8[LL]
+#define RSCAN0TMPTR30LH RSCAN0.TMPTR30.UINT8[LH]
+#define RSCAN0TMPTR30H RSCAN0.TMPTR30.UINT16[H]
+#define RSCAN0TMPTR30HL RSCAN0.TMPTR30.UINT8[HL]
+#define RSCAN0TMPTR30HH RSCAN0.TMPTR30.UINT8[HH]
+#define RSCAN0TMDF030 RSCAN0.TMDF030.UINT32
+#define RSCAN0TMDF030L RSCAN0.TMDF030.UINT16[L]
+#define RSCAN0TMDF030LL RSCAN0.TMDF030.UINT8[LL]
+#define RSCAN0TMDF030LH RSCAN0.TMDF030.UINT8[LH]
+#define RSCAN0TMDF030H RSCAN0.TMDF030.UINT16[H]
+#define RSCAN0TMDF030HL RSCAN0.TMDF030.UINT8[HL]
+#define RSCAN0TMDF030HH RSCAN0.TMDF030.UINT8[HH]
+#define RSCAN0TMDF130 RSCAN0.TMDF130.UINT32
+#define RSCAN0TMDF130L RSCAN0.TMDF130.UINT16[L]
+#define RSCAN0TMDF130LL RSCAN0.TMDF130.UINT8[LL]
+#define RSCAN0TMDF130LH RSCAN0.TMDF130.UINT8[LH]
+#define RSCAN0TMDF130H RSCAN0.TMDF130.UINT16[H]
+#define RSCAN0TMDF130HL RSCAN0.TMDF130.UINT8[HL]
+#define RSCAN0TMDF130HH RSCAN0.TMDF130.UINT8[HH]
+#define RSCAN0TMID31 RSCAN0.TMID31.UINT32
+#define RSCAN0TMID31L RSCAN0.TMID31.UINT16[L]
+#define RSCAN0TMID31LL RSCAN0.TMID31.UINT8[LL]
+#define RSCAN0TMID31LH RSCAN0.TMID31.UINT8[LH]
+#define RSCAN0TMID31H RSCAN0.TMID31.UINT16[H]
+#define RSCAN0TMID31HL RSCAN0.TMID31.UINT8[HL]
+#define RSCAN0TMID31HH RSCAN0.TMID31.UINT8[HH]
+#define RSCAN0TMPTR31 RSCAN0.TMPTR31.UINT32
+#define RSCAN0TMPTR31L RSCAN0.TMPTR31.UINT16[L]
+#define RSCAN0TMPTR31LL RSCAN0.TMPTR31.UINT8[LL]
+#define RSCAN0TMPTR31LH RSCAN0.TMPTR31.UINT8[LH]
+#define RSCAN0TMPTR31H RSCAN0.TMPTR31.UINT16[H]
+#define RSCAN0TMPTR31HL RSCAN0.TMPTR31.UINT8[HL]
+#define RSCAN0TMPTR31HH RSCAN0.TMPTR31.UINT8[HH]
+#define RSCAN0TMDF031 RSCAN0.TMDF031.UINT32
+#define RSCAN0TMDF031L RSCAN0.TMDF031.UINT16[L]
+#define RSCAN0TMDF031LL RSCAN0.TMDF031.UINT8[LL]
+#define RSCAN0TMDF031LH RSCAN0.TMDF031.UINT8[LH]
+#define RSCAN0TMDF031H RSCAN0.TMDF031.UINT16[H]
+#define RSCAN0TMDF031HL RSCAN0.TMDF031.UINT8[HL]
+#define RSCAN0TMDF031HH RSCAN0.TMDF031.UINT8[HH]
+#define RSCAN0TMDF131 RSCAN0.TMDF131.UINT32
+#define RSCAN0TMDF131L RSCAN0.TMDF131.UINT16[L]
+#define RSCAN0TMDF131LL RSCAN0.TMDF131.UINT8[LL]
+#define RSCAN0TMDF131LH RSCAN0.TMDF131.UINT8[LH]
+#define RSCAN0TMDF131H RSCAN0.TMDF131.UINT16[H]
+#define RSCAN0TMDF131HL RSCAN0.TMDF131.UINT8[HL]
+#define RSCAN0TMDF131HH RSCAN0.TMDF131.UINT8[HH]
+#define RSCAN0TMID32 RSCAN0.TMID32.UINT32
+#define RSCAN0TMID32L RSCAN0.TMID32.UINT16[L]
+#define RSCAN0TMID32LL RSCAN0.TMID32.UINT8[LL]
+#define RSCAN0TMID32LH RSCAN0.TMID32.UINT8[LH]
+#define RSCAN0TMID32H RSCAN0.TMID32.UINT16[H]
+#define RSCAN0TMID32HL RSCAN0.TMID32.UINT8[HL]
+#define RSCAN0TMID32HH RSCAN0.TMID32.UINT8[HH]
+#define RSCAN0TMPTR32 RSCAN0.TMPTR32.UINT32
+#define RSCAN0TMPTR32L RSCAN0.TMPTR32.UINT16[L]
+#define RSCAN0TMPTR32LL RSCAN0.TMPTR32.UINT8[LL]
+#define RSCAN0TMPTR32LH RSCAN0.TMPTR32.UINT8[LH]
+#define RSCAN0TMPTR32H RSCAN0.TMPTR32.UINT16[H]
+#define RSCAN0TMPTR32HL RSCAN0.TMPTR32.UINT8[HL]
+#define RSCAN0TMPTR32HH RSCAN0.TMPTR32.UINT8[HH]
+#define RSCAN0TMDF032 RSCAN0.TMDF032.UINT32
+#define RSCAN0TMDF032L RSCAN0.TMDF032.UINT16[L]
+#define RSCAN0TMDF032LL RSCAN0.TMDF032.UINT8[LL]
+#define RSCAN0TMDF032LH RSCAN0.TMDF032.UINT8[LH]
+#define RSCAN0TMDF032H RSCAN0.TMDF032.UINT16[H]
+#define RSCAN0TMDF032HL RSCAN0.TMDF032.UINT8[HL]
+#define RSCAN0TMDF032HH RSCAN0.TMDF032.UINT8[HH]
+#define RSCAN0TMDF132 RSCAN0.TMDF132.UINT32
+#define RSCAN0TMDF132L RSCAN0.TMDF132.UINT16[L]
+#define RSCAN0TMDF132LL RSCAN0.TMDF132.UINT8[LL]
+#define RSCAN0TMDF132LH RSCAN0.TMDF132.UINT8[LH]
+#define RSCAN0TMDF132H RSCAN0.TMDF132.UINT16[H]
+#define RSCAN0TMDF132HL RSCAN0.TMDF132.UINT8[HL]
+#define RSCAN0TMDF132HH RSCAN0.TMDF132.UINT8[HH]
+#define RSCAN0TMID33 RSCAN0.TMID33.UINT32
+#define RSCAN0TMID33L RSCAN0.TMID33.UINT16[L]
+#define RSCAN0TMID33LL RSCAN0.TMID33.UINT8[LL]
+#define RSCAN0TMID33LH RSCAN0.TMID33.UINT8[LH]
+#define RSCAN0TMID33H RSCAN0.TMID33.UINT16[H]
+#define RSCAN0TMID33HL RSCAN0.TMID33.UINT8[HL]
+#define RSCAN0TMID33HH RSCAN0.TMID33.UINT8[HH]
+#define RSCAN0TMPTR33 RSCAN0.TMPTR33.UINT32
+#define RSCAN0TMPTR33L RSCAN0.TMPTR33.UINT16[L]
+#define RSCAN0TMPTR33LL RSCAN0.TMPTR33.UINT8[LL]
+#define RSCAN0TMPTR33LH RSCAN0.TMPTR33.UINT8[LH]
+#define RSCAN0TMPTR33H RSCAN0.TMPTR33.UINT16[H]
+#define RSCAN0TMPTR33HL RSCAN0.TMPTR33.UINT8[HL]
+#define RSCAN0TMPTR33HH RSCAN0.TMPTR33.UINT8[HH]
+#define RSCAN0TMDF033 RSCAN0.TMDF033.UINT32
+#define RSCAN0TMDF033L RSCAN0.TMDF033.UINT16[L]
+#define RSCAN0TMDF033LL RSCAN0.TMDF033.UINT8[LL]
+#define RSCAN0TMDF033LH RSCAN0.TMDF033.UINT8[LH]
+#define RSCAN0TMDF033H RSCAN0.TMDF033.UINT16[H]
+#define RSCAN0TMDF033HL RSCAN0.TMDF033.UINT8[HL]
+#define RSCAN0TMDF033HH RSCAN0.TMDF033.UINT8[HH]
+#define RSCAN0TMDF133 RSCAN0.TMDF133.UINT32
+#define RSCAN0TMDF133L RSCAN0.TMDF133.UINT16[L]
+#define RSCAN0TMDF133LL RSCAN0.TMDF133.UINT8[LL]
+#define RSCAN0TMDF133LH RSCAN0.TMDF133.UINT8[LH]
+#define RSCAN0TMDF133H RSCAN0.TMDF133.UINT16[H]
+#define RSCAN0TMDF133HL RSCAN0.TMDF133.UINT8[HL]
+#define RSCAN0TMDF133HH RSCAN0.TMDF133.UINT8[HH]
+#define RSCAN0TMID34 RSCAN0.TMID34.UINT32
+#define RSCAN0TMID34L RSCAN0.TMID34.UINT16[L]
+#define RSCAN0TMID34LL RSCAN0.TMID34.UINT8[LL]
+#define RSCAN0TMID34LH RSCAN0.TMID34.UINT8[LH]
+#define RSCAN0TMID34H RSCAN0.TMID34.UINT16[H]
+#define RSCAN0TMID34HL RSCAN0.TMID34.UINT8[HL]
+#define RSCAN0TMID34HH RSCAN0.TMID34.UINT8[HH]
+#define RSCAN0TMPTR34 RSCAN0.TMPTR34.UINT32
+#define RSCAN0TMPTR34L RSCAN0.TMPTR34.UINT16[L]
+#define RSCAN0TMPTR34LL RSCAN0.TMPTR34.UINT8[LL]
+#define RSCAN0TMPTR34LH RSCAN0.TMPTR34.UINT8[LH]
+#define RSCAN0TMPTR34H RSCAN0.TMPTR34.UINT16[H]
+#define RSCAN0TMPTR34HL RSCAN0.TMPTR34.UINT8[HL]
+#define RSCAN0TMPTR34HH RSCAN0.TMPTR34.UINT8[HH]
+#define RSCAN0TMDF034 RSCAN0.TMDF034.UINT32
+#define RSCAN0TMDF034L RSCAN0.TMDF034.UINT16[L]
+#define RSCAN0TMDF034LL RSCAN0.TMDF034.UINT8[LL]
+#define RSCAN0TMDF034LH RSCAN0.TMDF034.UINT8[LH]
+#define RSCAN0TMDF034H RSCAN0.TMDF034.UINT16[H]
+#define RSCAN0TMDF034HL RSCAN0.TMDF034.UINT8[HL]
+#define RSCAN0TMDF034HH RSCAN0.TMDF034.UINT8[HH]
+#define RSCAN0TMDF134 RSCAN0.TMDF134.UINT32
+#define RSCAN0TMDF134L RSCAN0.TMDF134.UINT16[L]
+#define RSCAN0TMDF134LL RSCAN0.TMDF134.UINT8[LL]
+#define RSCAN0TMDF134LH RSCAN0.TMDF134.UINT8[LH]
+#define RSCAN0TMDF134H RSCAN0.TMDF134.UINT16[H]
+#define RSCAN0TMDF134HL RSCAN0.TMDF134.UINT8[HL]
+#define RSCAN0TMDF134HH RSCAN0.TMDF134.UINT8[HH]
+#define RSCAN0TMID35 RSCAN0.TMID35.UINT32
+#define RSCAN0TMID35L RSCAN0.TMID35.UINT16[L]
+#define RSCAN0TMID35LL RSCAN0.TMID35.UINT8[LL]
+#define RSCAN0TMID35LH RSCAN0.TMID35.UINT8[LH]
+#define RSCAN0TMID35H RSCAN0.TMID35.UINT16[H]
+#define RSCAN0TMID35HL RSCAN0.TMID35.UINT8[HL]
+#define RSCAN0TMID35HH RSCAN0.TMID35.UINT8[HH]
+#define RSCAN0TMPTR35 RSCAN0.TMPTR35.UINT32
+#define RSCAN0TMPTR35L RSCAN0.TMPTR35.UINT16[L]
+#define RSCAN0TMPTR35LL RSCAN0.TMPTR35.UINT8[LL]
+#define RSCAN0TMPTR35LH RSCAN0.TMPTR35.UINT8[LH]
+#define RSCAN0TMPTR35H RSCAN0.TMPTR35.UINT16[H]
+#define RSCAN0TMPTR35HL RSCAN0.TMPTR35.UINT8[HL]
+#define RSCAN0TMPTR35HH RSCAN0.TMPTR35.UINT8[HH]
+#define RSCAN0TMDF035 RSCAN0.TMDF035.UINT32
+#define RSCAN0TMDF035L RSCAN0.TMDF035.UINT16[L]
+#define RSCAN0TMDF035LL RSCAN0.TMDF035.UINT8[LL]
+#define RSCAN0TMDF035LH RSCAN0.TMDF035.UINT8[LH]
+#define RSCAN0TMDF035H RSCAN0.TMDF035.UINT16[H]
+#define RSCAN0TMDF035HL RSCAN0.TMDF035.UINT8[HL]
+#define RSCAN0TMDF035HH RSCAN0.TMDF035.UINT8[HH]
+#define RSCAN0TMDF135 RSCAN0.TMDF135.UINT32
+#define RSCAN0TMDF135L RSCAN0.TMDF135.UINT16[L]
+#define RSCAN0TMDF135LL RSCAN0.TMDF135.UINT8[LL]
+#define RSCAN0TMDF135LH RSCAN0.TMDF135.UINT8[LH]
+#define RSCAN0TMDF135H RSCAN0.TMDF135.UINT16[H]
+#define RSCAN0TMDF135HL RSCAN0.TMDF135.UINT8[HL]
+#define RSCAN0TMDF135HH RSCAN0.TMDF135.UINT8[HH]
+#define RSCAN0TMID36 RSCAN0.TMID36.UINT32
+#define RSCAN0TMID36L RSCAN0.TMID36.UINT16[L]
+#define RSCAN0TMID36LL RSCAN0.TMID36.UINT8[LL]
+#define RSCAN0TMID36LH RSCAN0.TMID36.UINT8[LH]
+#define RSCAN0TMID36H RSCAN0.TMID36.UINT16[H]
+#define RSCAN0TMID36HL RSCAN0.TMID36.UINT8[HL]
+#define RSCAN0TMID36HH RSCAN0.TMID36.UINT8[HH]
+#define RSCAN0TMPTR36 RSCAN0.TMPTR36.UINT32
+#define RSCAN0TMPTR36L RSCAN0.TMPTR36.UINT16[L]
+#define RSCAN0TMPTR36LL RSCAN0.TMPTR36.UINT8[LL]
+#define RSCAN0TMPTR36LH RSCAN0.TMPTR36.UINT8[LH]
+#define RSCAN0TMPTR36H RSCAN0.TMPTR36.UINT16[H]
+#define RSCAN0TMPTR36HL RSCAN0.TMPTR36.UINT8[HL]
+#define RSCAN0TMPTR36HH RSCAN0.TMPTR36.UINT8[HH]
+#define RSCAN0TMDF036 RSCAN0.TMDF036.UINT32
+#define RSCAN0TMDF036L RSCAN0.TMDF036.UINT16[L]
+#define RSCAN0TMDF036LL RSCAN0.TMDF036.UINT8[LL]
+#define RSCAN0TMDF036LH RSCAN0.TMDF036.UINT8[LH]
+#define RSCAN0TMDF036H RSCAN0.TMDF036.UINT16[H]
+#define RSCAN0TMDF036HL RSCAN0.TMDF036.UINT8[HL]
+#define RSCAN0TMDF036HH RSCAN0.TMDF036.UINT8[HH]
+#define RSCAN0TMDF136 RSCAN0.TMDF136.UINT32
+#define RSCAN0TMDF136L RSCAN0.TMDF136.UINT16[L]
+#define RSCAN0TMDF136LL RSCAN0.TMDF136.UINT8[LL]
+#define RSCAN0TMDF136LH RSCAN0.TMDF136.UINT8[LH]
+#define RSCAN0TMDF136H RSCAN0.TMDF136.UINT16[H]
+#define RSCAN0TMDF136HL RSCAN0.TMDF136.UINT8[HL]
+#define RSCAN0TMDF136HH RSCAN0.TMDF136.UINT8[HH]
+#define RSCAN0TMID37 RSCAN0.TMID37.UINT32
+#define RSCAN0TMID37L RSCAN0.TMID37.UINT16[L]
+#define RSCAN0TMID37LL RSCAN0.TMID37.UINT8[LL]
+#define RSCAN0TMID37LH RSCAN0.TMID37.UINT8[LH]
+#define RSCAN0TMID37H RSCAN0.TMID37.UINT16[H]
+#define RSCAN0TMID37HL RSCAN0.TMID37.UINT8[HL]
+#define RSCAN0TMID37HH RSCAN0.TMID37.UINT8[HH]
+#define RSCAN0TMPTR37 RSCAN0.TMPTR37.UINT32
+#define RSCAN0TMPTR37L RSCAN0.TMPTR37.UINT16[L]
+#define RSCAN0TMPTR37LL RSCAN0.TMPTR37.UINT8[LL]
+#define RSCAN0TMPTR37LH RSCAN0.TMPTR37.UINT8[LH]
+#define RSCAN0TMPTR37H RSCAN0.TMPTR37.UINT16[H]
+#define RSCAN0TMPTR37HL RSCAN0.TMPTR37.UINT8[HL]
+#define RSCAN0TMPTR37HH RSCAN0.TMPTR37.UINT8[HH]
+#define RSCAN0TMDF037 RSCAN0.TMDF037.UINT32
+#define RSCAN0TMDF037L RSCAN0.TMDF037.UINT16[L]
+#define RSCAN0TMDF037LL RSCAN0.TMDF037.UINT8[LL]
+#define RSCAN0TMDF037LH RSCAN0.TMDF037.UINT8[LH]
+#define RSCAN0TMDF037H RSCAN0.TMDF037.UINT16[H]
+#define RSCAN0TMDF037HL RSCAN0.TMDF037.UINT8[HL]
+#define RSCAN0TMDF037HH RSCAN0.TMDF037.UINT8[HH]
+#define RSCAN0TMDF137 RSCAN0.TMDF137.UINT32
+#define RSCAN0TMDF137L RSCAN0.TMDF137.UINT16[L]
+#define RSCAN0TMDF137LL RSCAN0.TMDF137.UINT8[LL]
+#define RSCAN0TMDF137LH RSCAN0.TMDF137.UINT8[LH]
+#define RSCAN0TMDF137H RSCAN0.TMDF137.UINT16[H]
+#define RSCAN0TMDF137HL RSCAN0.TMDF137.UINT8[HL]
+#define RSCAN0TMDF137HH RSCAN0.TMDF137.UINT8[HH]
+#define RSCAN0TMID38 RSCAN0.TMID38.UINT32
+#define RSCAN0TMID38L RSCAN0.TMID38.UINT16[L]
+#define RSCAN0TMID38LL RSCAN0.TMID38.UINT8[LL]
+#define RSCAN0TMID38LH RSCAN0.TMID38.UINT8[LH]
+#define RSCAN0TMID38H RSCAN0.TMID38.UINT16[H]
+#define RSCAN0TMID38HL RSCAN0.TMID38.UINT8[HL]
+#define RSCAN0TMID38HH RSCAN0.TMID38.UINT8[HH]
+#define RSCAN0TMPTR38 RSCAN0.TMPTR38.UINT32
+#define RSCAN0TMPTR38L RSCAN0.TMPTR38.UINT16[L]
+#define RSCAN0TMPTR38LL RSCAN0.TMPTR38.UINT8[LL]
+#define RSCAN0TMPTR38LH RSCAN0.TMPTR38.UINT8[LH]
+#define RSCAN0TMPTR38H RSCAN0.TMPTR38.UINT16[H]
+#define RSCAN0TMPTR38HL RSCAN0.TMPTR38.UINT8[HL]
+#define RSCAN0TMPTR38HH RSCAN0.TMPTR38.UINT8[HH]
+#define RSCAN0TMDF038 RSCAN0.TMDF038.UINT32
+#define RSCAN0TMDF038L RSCAN0.TMDF038.UINT16[L]
+#define RSCAN0TMDF038LL RSCAN0.TMDF038.UINT8[LL]
+#define RSCAN0TMDF038LH RSCAN0.TMDF038.UINT8[LH]
+#define RSCAN0TMDF038H RSCAN0.TMDF038.UINT16[H]
+#define RSCAN0TMDF038HL RSCAN0.TMDF038.UINT8[HL]
+#define RSCAN0TMDF038HH RSCAN0.TMDF038.UINT8[HH]
+#define RSCAN0TMDF138 RSCAN0.TMDF138.UINT32
+#define RSCAN0TMDF138L RSCAN0.TMDF138.UINT16[L]
+#define RSCAN0TMDF138LL RSCAN0.TMDF138.UINT8[LL]
+#define RSCAN0TMDF138LH RSCAN0.TMDF138.UINT8[LH]
+#define RSCAN0TMDF138H RSCAN0.TMDF138.UINT16[H]
+#define RSCAN0TMDF138HL RSCAN0.TMDF138.UINT8[HL]
+#define RSCAN0TMDF138HH RSCAN0.TMDF138.UINT8[HH]
+#define RSCAN0TMID39 RSCAN0.TMID39.UINT32
+#define RSCAN0TMID39L RSCAN0.TMID39.UINT16[L]
+#define RSCAN0TMID39LL RSCAN0.TMID39.UINT8[LL]
+#define RSCAN0TMID39LH RSCAN0.TMID39.UINT8[LH]
+#define RSCAN0TMID39H RSCAN0.TMID39.UINT16[H]
+#define RSCAN0TMID39HL RSCAN0.TMID39.UINT8[HL]
+#define RSCAN0TMID39HH RSCAN0.TMID39.UINT8[HH]
+#define RSCAN0TMPTR39 RSCAN0.TMPTR39.UINT32
+#define RSCAN0TMPTR39L RSCAN0.TMPTR39.UINT16[L]
+#define RSCAN0TMPTR39LL RSCAN0.TMPTR39.UINT8[LL]
+#define RSCAN0TMPTR39LH RSCAN0.TMPTR39.UINT8[LH]
+#define RSCAN0TMPTR39H RSCAN0.TMPTR39.UINT16[H]
+#define RSCAN0TMPTR39HL RSCAN0.TMPTR39.UINT8[HL]
+#define RSCAN0TMPTR39HH RSCAN0.TMPTR39.UINT8[HH]
+#define RSCAN0TMDF039 RSCAN0.TMDF039.UINT32
+#define RSCAN0TMDF039L RSCAN0.TMDF039.UINT16[L]
+#define RSCAN0TMDF039LL RSCAN0.TMDF039.UINT8[LL]
+#define RSCAN0TMDF039LH RSCAN0.TMDF039.UINT8[LH]
+#define RSCAN0TMDF039H RSCAN0.TMDF039.UINT16[H]
+#define RSCAN0TMDF039HL RSCAN0.TMDF039.UINT8[HL]
+#define RSCAN0TMDF039HH RSCAN0.TMDF039.UINT8[HH]
+#define RSCAN0TMDF139 RSCAN0.TMDF139.UINT32
+#define RSCAN0TMDF139L RSCAN0.TMDF139.UINT16[L]
+#define RSCAN0TMDF139LL RSCAN0.TMDF139.UINT8[LL]
+#define RSCAN0TMDF139LH RSCAN0.TMDF139.UINT8[LH]
+#define RSCAN0TMDF139H RSCAN0.TMDF139.UINT16[H]
+#define RSCAN0TMDF139HL RSCAN0.TMDF139.UINT8[HL]
+#define RSCAN0TMDF139HH RSCAN0.TMDF139.UINT8[HH]
+#define RSCAN0TMID40 RSCAN0.TMID40.UINT32
+#define RSCAN0TMID40L RSCAN0.TMID40.UINT16[L]
+#define RSCAN0TMID40LL RSCAN0.TMID40.UINT8[LL]
+#define RSCAN0TMID40LH RSCAN0.TMID40.UINT8[LH]
+#define RSCAN0TMID40H RSCAN0.TMID40.UINT16[H]
+#define RSCAN0TMID40HL RSCAN0.TMID40.UINT8[HL]
+#define RSCAN0TMID40HH RSCAN0.TMID40.UINT8[HH]
+#define RSCAN0TMPTR40 RSCAN0.TMPTR40.UINT32
+#define RSCAN0TMPTR40L RSCAN0.TMPTR40.UINT16[L]
+#define RSCAN0TMPTR40LL RSCAN0.TMPTR40.UINT8[LL]
+#define RSCAN0TMPTR40LH RSCAN0.TMPTR40.UINT8[LH]
+#define RSCAN0TMPTR40H RSCAN0.TMPTR40.UINT16[H]
+#define RSCAN0TMPTR40HL RSCAN0.TMPTR40.UINT8[HL]
+#define RSCAN0TMPTR40HH RSCAN0.TMPTR40.UINT8[HH]
+#define RSCAN0TMDF040 RSCAN0.TMDF040.UINT32
+#define RSCAN0TMDF040L RSCAN0.TMDF040.UINT16[L]
+#define RSCAN0TMDF040LL RSCAN0.TMDF040.UINT8[LL]
+#define RSCAN0TMDF040LH RSCAN0.TMDF040.UINT8[LH]
+#define RSCAN0TMDF040H RSCAN0.TMDF040.UINT16[H]
+#define RSCAN0TMDF040HL RSCAN0.TMDF040.UINT8[HL]
+#define RSCAN0TMDF040HH RSCAN0.TMDF040.UINT8[HH]
+#define RSCAN0TMDF140 RSCAN0.TMDF140.UINT32
+#define RSCAN0TMDF140L RSCAN0.TMDF140.UINT16[L]
+#define RSCAN0TMDF140LL RSCAN0.TMDF140.UINT8[LL]
+#define RSCAN0TMDF140LH RSCAN0.TMDF140.UINT8[LH]
+#define RSCAN0TMDF140H RSCAN0.TMDF140.UINT16[H]
+#define RSCAN0TMDF140HL RSCAN0.TMDF140.UINT8[HL]
+#define RSCAN0TMDF140HH RSCAN0.TMDF140.UINT8[HH]
+#define RSCAN0TMID41 RSCAN0.TMID41.UINT32
+#define RSCAN0TMID41L RSCAN0.TMID41.UINT16[L]
+#define RSCAN0TMID41LL RSCAN0.TMID41.UINT8[LL]
+#define RSCAN0TMID41LH RSCAN0.TMID41.UINT8[LH]
+#define RSCAN0TMID41H RSCAN0.TMID41.UINT16[H]
+#define RSCAN0TMID41HL RSCAN0.TMID41.UINT8[HL]
+#define RSCAN0TMID41HH RSCAN0.TMID41.UINT8[HH]
+#define RSCAN0TMPTR41 RSCAN0.TMPTR41.UINT32
+#define RSCAN0TMPTR41L RSCAN0.TMPTR41.UINT16[L]
+#define RSCAN0TMPTR41LL RSCAN0.TMPTR41.UINT8[LL]
+#define RSCAN0TMPTR41LH RSCAN0.TMPTR41.UINT8[LH]
+#define RSCAN0TMPTR41H RSCAN0.TMPTR41.UINT16[H]
+#define RSCAN0TMPTR41HL RSCAN0.TMPTR41.UINT8[HL]
+#define RSCAN0TMPTR41HH RSCAN0.TMPTR41.UINT8[HH]
+#define RSCAN0TMDF041 RSCAN0.TMDF041.UINT32
+#define RSCAN0TMDF041L RSCAN0.TMDF041.UINT16[L]
+#define RSCAN0TMDF041LL RSCAN0.TMDF041.UINT8[LL]
+#define RSCAN0TMDF041LH RSCAN0.TMDF041.UINT8[LH]
+#define RSCAN0TMDF041H RSCAN0.TMDF041.UINT16[H]
+#define RSCAN0TMDF041HL RSCAN0.TMDF041.UINT8[HL]
+#define RSCAN0TMDF041HH RSCAN0.TMDF041.UINT8[HH]
+#define RSCAN0TMDF141 RSCAN0.TMDF141.UINT32
+#define RSCAN0TMDF141L RSCAN0.TMDF141.UINT16[L]
+#define RSCAN0TMDF141LL RSCAN0.TMDF141.UINT8[LL]
+#define RSCAN0TMDF141LH RSCAN0.TMDF141.UINT8[LH]
+#define RSCAN0TMDF141H RSCAN0.TMDF141.UINT16[H]
+#define RSCAN0TMDF141HL RSCAN0.TMDF141.UINT8[HL]
+#define RSCAN0TMDF141HH RSCAN0.TMDF141.UINT8[HH]
+#define RSCAN0TMID42 RSCAN0.TMID42.UINT32
+#define RSCAN0TMID42L RSCAN0.TMID42.UINT16[L]
+#define RSCAN0TMID42LL RSCAN0.TMID42.UINT8[LL]
+#define RSCAN0TMID42LH RSCAN0.TMID42.UINT8[LH]
+#define RSCAN0TMID42H RSCAN0.TMID42.UINT16[H]
+#define RSCAN0TMID42HL RSCAN0.TMID42.UINT8[HL]
+#define RSCAN0TMID42HH RSCAN0.TMID42.UINT8[HH]
+#define RSCAN0TMPTR42 RSCAN0.TMPTR42.UINT32
+#define RSCAN0TMPTR42L RSCAN0.TMPTR42.UINT16[L]
+#define RSCAN0TMPTR42LL RSCAN0.TMPTR42.UINT8[LL]
+#define RSCAN0TMPTR42LH RSCAN0.TMPTR42.UINT8[LH]
+#define RSCAN0TMPTR42H RSCAN0.TMPTR42.UINT16[H]
+#define RSCAN0TMPTR42HL RSCAN0.TMPTR42.UINT8[HL]
+#define RSCAN0TMPTR42HH RSCAN0.TMPTR42.UINT8[HH]
+#define RSCAN0TMDF042 RSCAN0.TMDF042.UINT32
+#define RSCAN0TMDF042L RSCAN0.TMDF042.UINT16[L]
+#define RSCAN0TMDF042LL RSCAN0.TMDF042.UINT8[LL]
+#define RSCAN0TMDF042LH RSCAN0.TMDF042.UINT8[LH]
+#define RSCAN0TMDF042H RSCAN0.TMDF042.UINT16[H]
+#define RSCAN0TMDF042HL RSCAN0.TMDF042.UINT8[HL]
+#define RSCAN0TMDF042HH RSCAN0.TMDF042.UINT8[HH]
+#define RSCAN0TMDF142 RSCAN0.TMDF142.UINT32
+#define RSCAN0TMDF142L RSCAN0.TMDF142.UINT16[L]
+#define RSCAN0TMDF142LL RSCAN0.TMDF142.UINT8[LL]
+#define RSCAN0TMDF142LH RSCAN0.TMDF142.UINT8[LH]
+#define RSCAN0TMDF142H RSCAN0.TMDF142.UINT16[H]
+#define RSCAN0TMDF142HL RSCAN0.TMDF142.UINT8[HL]
+#define RSCAN0TMDF142HH RSCAN0.TMDF142.UINT8[HH]
+#define RSCAN0TMID43 RSCAN0.TMID43.UINT32
+#define RSCAN0TMID43L RSCAN0.TMID43.UINT16[L]
+#define RSCAN0TMID43LL RSCAN0.TMID43.UINT8[LL]
+#define RSCAN0TMID43LH RSCAN0.TMID43.UINT8[LH]
+#define RSCAN0TMID43H RSCAN0.TMID43.UINT16[H]
+#define RSCAN0TMID43HL RSCAN0.TMID43.UINT8[HL]
+#define RSCAN0TMID43HH RSCAN0.TMID43.UINT8[HH]
+#define RSCAN0TMPTR43 RSCAN0.TMPTR43.UINT32
+#define RSCAN0TMPTR43L RSCAN0.TMPTR43.UINT16[L]
+#define RSCAN0TMPTR43LL RSCAN0.TMPTR43.UINT8[LL]
+#define RSCAN0TMPTR43LH RSCAN0.TMPTR43.UINT8[LH]
+#define RSCAN0TMPTR43H RSCAN0.TMPTR43.UINT16[H]
+#define RSCAN0TMPTR43HL RSCAN0.TMPTR43.UINT8[HL]
+#define RSCAN0TMPTR43HH RSCAN0.TMPTR43.UINT8[HH]
+#define RSCAN0TMDF043 RSCAN0.TMDF043.UINT32
+#define RSCAN0TMDF043L RSCAN0.TMDF043.UINT16[L]
+#define RSCAN0TMDF043LL RSCAN0.TMDF043.UINT8[LL]
+#define RSCAN0TMDF043LH RSCAN0.TMDF043.UINT8[LH]
+#define RSCAN0TMDF043H RSCAN0.TMDF043.UINT16[H]
+#define RSCAN0TMDF043HL RSCAN0.TMDF043.UINT8[HL]
+#define RSCAN0TMDF043HH RSCAN0.TMDF043.UINT8[HH]
+#define RSCAN0TMDF143 RSCAN0.TMDF143.UINT32
+#define RSCAN0TMDF143L RSCAN0.TMDF143.UINT16[L]
+#define RSCAN0TMDF143LL RSCAN0.TMDF143.UINT8[LL]
+#define RSCAN0TMDF143LH RSCAN0.TMDF143.UINT8[LH]
+#define RSCAN0TMDF143H RSCAN0.TMDF143.UINT16[H]
+#define RSCAN0TMDF143HL RSCAN0.TMDF143.UINT8[HL]
+#define RSCAN0TMDF143HH RSCAN0.TMDF143.UINT8[HH]
+#define RSCAN0TMID44 RSCAN0.TMID44.UINT32
+#define RSCAN0TMID44L RSCAN0.TMID44.UINT16[L]
+#define RSCAN0TMID44LL RSCAN0.TMID44.UINT8[LL]
+#define RSCAN0TMID44LH RSCAN0.TMID44.UINT8[LH]
+#define RSCAN0TMID44H RSCAN0.TMID44.UINT16[H]
+#define RSCAN0TMID44HL RSCAN0.TMID44.UINT8[HL]
+#define RSCAN0TMID44HH RSCAN0.TMID44.UINT8[HH]
+#define RSCAN0TMPTR44 RSCAN0.TMPTR44.UINT32
+#define RSCAN0TMPTR44L RSCAN0.TMPTR44.UINT16[L]
+#define RSCAN0TMPTR44LL RSCAN0.TMPTR44.UINT8[LL]
+#define RSCAN0TMPTR44LH RSCAN0.TMPTR44.UINT8[LH]
+#define RSCAN0TMPTR44H RSCAN0.TMPTR44.UINT16[H]
+#define RSCAN0TMPTR44HL RSCAN0.TMPTR44.UINT8[HL]
+#define RSCAN0TMPTR44HH RSCAN0.TMPTR44.UINT8[HH]
+#define RSCAN0TMDF044 RSCAN0.TMDF044.UINT32
+#define RSCAN0TMDF044L RSCAN0.TMDF044.UINT16[L]
+#define RSCAN0TMDF044LL RSCAN0.TMDF044.UINT8[LL]
+#define RSCAN0TMDF044LH RSCAN0.TMDF044.UINT8[LH]
+#define RSCAN0TMDF044H RSCAN0.TMDF044.UINT16[H]
+#define RSCAN0TMDF044HL RSCAN0.TMDF044.UINT8[HL]
+#define RSCAN0TMDF044HH RSCAN0.TMDF044.UINT8[HH]
+#define RSCAN0TMDF144 RSCAN0.TMDF144.UINT32
+#define RSCAN0TMDF144L RSCAN0.TMDF144.UINT16[L]
+#define RSCAN0TMDF144LL RSCAN0.TMDF144.UINT8[LL]
+#define RSCAN0TMDF144LH RSCAN0.TMDF144.UINT8[LH]
+#define RSCAN0TMDF144H RSCAN0.TMDF144.UINT16[H]
+#define RSCAN0TMDF144HL RSCAN0.TMDF144.UINT8[HL]
+#define RSCAN0TMDF144HH RSCAN0.TMDF144.UINT8[HH]
+#define RSCAN0TMID45 RSCAN0.TMID45.UINT32
+#define RSCAN0TMID45L RSCAN0.TMID45.UINT16[L]
+#define RSCAN0TMID45LL RSCAN0.TMID45.UINT8[LL]
+#define RSCAN0TMID45LH RSCAN0.TMID45.UINT8[LH]
+#define RSCAN0TMID45H RSCAN0.TMID45.UINT16[H]
+#define RSCAN0TMID45HL RSCAN0.TMID45.UINT8[HL]
+#define RSCAN0TMID45HH RSCAN0.TMID45.UINT8[HH]
+#define RSCAN0TMPTR45 RSCAN0.TMPTR45.UINT32
+#define RSCAN0TMPTR45L RSCAN0.TMPTR45.UINT16[L]
+#define RSCAN0TMPTR45LL RSCAN0.TMPTR45.UINT8[LL]
+#define RSCAN0TMPTR45LH RSCAN0.TMPTR45.UINT8[LH]
+#define RSCAN0TMPTR45H RSCAN0.TMPTR45.UINT16[H]
+#define RSCAN0TMPTR45HL RSCAN0.TMPTR45.UINT8[HL]
+#define RSCAN0TMPTR45HH RSCAN0.TMPTR45.UINT8[HH]
+#define RSCAN0TMDF045 RSCAN0.TMDF045.UINT32
+#define RSCAN0TMDF045L RSCAN0.TMDF045.UINT16[L]
+#define RSCAN0TMDF045LL RSCAN0.TMDF045.UINT8[LL]
+#define RSCAN0TMDF045LH RSCAN0.TMDF045.UINT8[LH]
+#define RSCAN0TMDF045H RSCAN0.TMDF045.UINT16[H]
+#define RSCAN0TMDF045HL RSCAN0.TMDF045.UINT8[HL]
+#define RSCAN0TMDF045HH RSCAN0.TMDF045.UINT8[HH]
+#define RSCAN0TMDF145 RSCAN0.TMDF145.UINT32
+#define RSCAN0TMDF145L RSCAN0.TMDF145.UINT16[L]
+#define RSCAN0TMDF145LL RSCAN0.TMDF145.UINT8[LL]
+#define RSCAN0TMDF145LH RSCAN0.TMDF145.UINT8[LH]
+#define RSCAN0TMDF145H RSCAN0.TMDF145.UINT16[H]
+#define RSCAN0TMDF145HL RSCAN0.TMDF145.UINT8[HL]
+#define RSCAN0TMDF145HH RSCAN0.TMDF145.UINT8[HH]
+#define RSCAN0TMID46 RSCAN0.TMID46.UINT32
+#define RSCAN0TMID46L RSCAN0.TMID46.UINT16[L]
+#define RSCAN0TMID46LL RSCAN0.TMID46.UINT8[LL]
+#define RSCAN0TMID46LH RSCAN0.TMID46.UINT8[LH]
+#define RSCAN0TMID46H RSCAN0.TMID46.UINT16[H]
+#define RSCAN0TMID46HL RSCAN0.TMID46.UINT8[HL]
+#define RSCAN0TMID46HH RSCAN0.TMID46.UINT8[HH]
+#define RSCAN0TMPTR46 RSCAN0.TMPTR46.UINT32
+#define RSCAN0TMPTR46L RSCAN0.TMPTR46.UINT16[L]
+#define RSCAN0TMPTR46LL RSCAN0.TMPTR46.UINT8[LL]
+#define RSCAN0TMPTR46LH RSCAN0.TMPTR46.UINT8[LH]
+#define RSCAN0TMPTR46H RSCAN0.TMPTR46.UINT16[H]
+#define RSCAN0TMPTR46HL RSCAN0.TMPTR46.UINT8[HL]
+#define RSCAN0TMPTR46HH RSCAN0.TMPTR46.UINT8[HH]
+#define RSCAN0TMDF046 RSCAN0.TMDF046.UINT32
+#define RSCAN0TMDF046L RSCAN0.TMDF046.UINT16[L]
+#define RSCAN0TMDF046LL RSCAN0.TMDF046.UINT8[LL]
+#define RSCAN0TMDF046LH RSCAN0.TMDF046.UINT8[LH]
+#define RSCAN0TMDF046H RSCAN0.TMDF046.UINT16[H]
+#define RSCAN0TMDF046HL RSCAN0.TMDF046.UINT8[HL]
+#define RSCAN0TMDF046HH RSCAN0.TMDF046.UINT8[HH]
+#define RSCAN0TMDF146 RSCAN0.TMDF146.UINT32
+#define RSCAN0TMDF146L RSCAN0.TMDF146.UINT16[L]
+#define RSCAN0TMDF146LL RSCAN0.TMDF146.UINT8[LL]
+#define RSCAN0TMDF146LH RSCAN0.TMDF146.UINT8[LH]
+#define RSCAN0TMDF146H RSCAN0.TMDF146.UINT16[H]
+#define RSCAN0TMDF146HL RSCAN0.TMDF146.UINT8[HL]
+#define RSCAN0TMDF146HH RSCAN0.TMDF146.UINT8[HH]
+#define RSCAN0TMID47 RSCAN0.TMID47.UINT32
+#define RSCAN0TMID47L RSCAN0.TMID47.UINT16[L]
+#define RSCAN0TMID47LL RSCAN0.TMID47.UINT8[LL]
+#define RSCAN0TMID47LH RSCAN0.TMID47.UINT8[LH]
+#define RSCAN0TMID47H RSCAN0.TMID47.UINT16[H]
+#define RSCAN0TMID47HL RSCAN0.TMID47.UINT8[HL]
+#define RSCAN0TMID47HH RSCAN0.TMID47.UINT8[HH]
+#define RSCAN0TMPTR47 RSCAN0.TMPTR47.UINT32
+#define RSCAN0TMPTR47L RSCAN0.TMPTR47.UINT16[L]
+#define RSCAN0TMPTR47LL RSCAN0.TMPTR47.UINT8[LL]
+#define RSCAN0TMPTR47LH RSCAN0.TMPTR47.UINT8[LH]
+#define RSCAN0TMPTR47H RSCAN0.TMPTR47.UINT16[H]
+#define RSCAN0TMPTR47HL RSCAN0.TMPTR47.UINT8[HL]
+#define RSCAN0TMPTR47HH RSCAN0.TMPTR47.UINT8[HH]
+#define RSCAN0TMDF047 RSCAN0.TMDF047.UINT32
+#define RSCAN0TMDF047L RSCAN0.TMDF047.UINT16[L]
+#define RSCAN0TMDF047LL RSCAN0.TMDF047.UINT8[LL]
+#define RSCAN0TMDF047LH RSCAN0.TMDF047.UINT8[LH]
+#define RSCAN0TMDF047H RSCAN0.TMDF047.UINT16[H]
+#define RSCAN0TMDF047HL RSCAN0.TMDF047.UINT8[HL]
+#define RSCAN0TMDF047HH RSCAN0.TMDF047.UINT8[HH]
+#define RSCAN0TMDF147 RSCAN0.TMDF147.UINT32
+#define RSCAN0TMDF147L RSCAN0.TMDF147.UINT16[L]
+#define RSCAN0TMDF147LL RSCAN0.TMDF147.UINT8[LL]
+#define RSCAN0TMDF147LH RSCAN0.TMDF147.UINT8[LH]
+#define RSCAN0TMDF147H RSCAN0.TMDF147.UINT16[H]
+#define RSCAN0TMDF147HL RSCAN0.TMDF147.UINT8[HL]
+#define RSCAN0TMDF147HH RSCAN0.TMDF147.UINT8[HH]
+#define RSCAN0TMID48 RSCAN0.TMID48.UINT32
+#define RSCAN0TMID48L RSCAN0.TMID48.UINT16[L]
+#define RSCAN0TMID48LL RSCAN0.TMID48.UINT8[LL]
+#define RSCAN0TMID48LH RSCAN0.TMID48.UINT8[LH]
+#define RSCAN0TMID48H RSCAN0.TMID48.UINT16[H]
+#define RSCAN0TMID48HL RSCAN0.TMID48.UINT8[HL]
+#define RSCAN0TMID48HH RSCAN0.TMID48.UINT8[HH]
+#define RSCAN0TMPTR48 RSCAN0.TMPTR48.UINT32
+#define RSCAN0TMPTR48L RSCAN0.TMPTR48.UINT16[L]
+#define RSCAN0TMPTR48LL RSCAN0.TMPTR48.UINT8[LL]
+#define RSCAN0TMPTR48LH RSCAN0.TMPTR48.UINT8[LH]
+#define RSCAN0TMPTR48H RSCAN0.TMPTR48.UINT16[H]
+#define RSCAN0TMPTR48HL RSCAN0.TMPTR48.UINT8[HL]
+#define RSCAN0TMPTR48HH RSCAN0.TMPTR48.UINT8[HH]
+#define RSCAN0TMDF048 RSCAN0.TMDF048.UINT32
+#define RSCAN0TMDF048L RSCAN0.TMDF048.UINT16[L]
+#define RSCAN0TMDF048LL RSCAN0.TMDF048.UINT8[LL]
+#define RSCAN0TMDF048LH RSCAN0.TMDF048.UINT8[LH]
+#define RSCAN0TMDF048H RSCAN0.TMDF048.UINT16[H]
+#define RSCAN0TMDF048HL RSCAN0.TMDF048.UINT8[HL]
+#define RSCAN0TMDF048HH RSCAN0.TMDF048.UINT8[HH]
+#define RSCAN0TMDF148 RSCAN0.TMDF148.UINT32
+#define RSCAN0TMDF148L RSCAN0.TMDF148.UINT16[L]
+#define RSCAN0TMDF148LL RSCAN0.TMDF148.UINT8[LL]
+#define RSCAN0TMDF148LH RSCAN0.TMDF148.UINT8[LH]
+#define RSCAN0TMDF148H RSCAN0.TMDF148.UINT16[H]
+#define RSCAN0TMDF148HL RSCAN0.TMDF148.UINT8[HL]
+#define RSCAN0TMDF148HH RSCAN0.TMDF148.UINT8[HH]
+#define RSCAN0TMID49 RSCAN0.TMID49.UINT32
+#define RSCAN0TMID49L RSCAN0.TMID49.UINT16[L]
+#define RSCAN0TMID49LL RSCAN0.TMID49.UINT8[LL]
+#define RSCAN0TMID49LH RSCAN0.TMID49.UINT8[LH]
+#define RSCAN0TMID49H RSCAN0.TMID49.UINT16[H]
+#define RSCAN0TMID49HL RSCAN0.TMID49.UINT8[HL]
+#define RSCAN0TMID49HH RSCAN0.TMID49.UINT8[HH]
+#define RSCAN0TMPTR49 RSCAN0.TMPTR49.UINT32
+#define RSCAN0TMPTR49L RSCAN0.TMPTR49.UINT16[L]
+#define RSCAN0TMPTR49LL RSCAN0.TMPTR49.UINT8[LL]
+#define RSCAN0TMPTR49LH RSCAN0.TMPTR49.UINT8[LH]
+#define RSCAN0TMPTR49H RSCAN0.TMPTR49.UINT16[H]
+#define RSCAN0TMPTR49HL RSCAN0.TMPTR49.UINT8[HL]
+#define RSCAN0TMPTR49HH RSCAN0.TMPTR49.UINT8[HH]
+#define RSCAN0TMDF049 RSCAN0.TMDF049.UINT32
+#define RSCAN0TMDF049L RSCAN0.TMDF049.UINT16[L]
+#define RSCAN0TMDF049LL RSCAN0.TMDF049.UINT8[LL]
+#define RSCAN0TMDF049LH RSCAN0.TMDF049.UINT8[LH]
+#define RSCAN0TMDF049H RSCAN0.TMDF049.UINT16[H]
+#define RSCAN0TMDF049HL RSCAN0.TMDF049.UINT8[HL]
+#define RSCAN0TMDF049HH RSCAN0.TMDF049.UINT8[HH]
+#define RSCAN0TMDF149 RSCAN0.TMDF149.UINT32
+#define RSCAN0TMDF149L RSCAN0.TMDF149.UINT16[L]
+#define RSCAN0TMDF149LL RSCAN0.TMDF149.UINT8[LL]
+#define RSCAN0TMDF149LH RSCAN0.TMDF149.UINT8[LH]
+#define RSCAN0TMDF149H RSCAN0.TMDF149.UINT16[H]
+#define RSCAN0TMDF149HL RSCAN0.TMDF149.UINT8[HL]
+#define RSCAN0TMDF149HH RSCAN0.TMDF149.UINT8[HH]
+#define RSCAN0TMID50 RSCAN0.TMID50.UINT32
+#define RSCAN0TMID50L RSCAN0.TMID50.UINT16[L]
+#define RSCAN0TMID50LL RSCAN0.TMID50.UINT8[LL]
+#define RSCAN0TMID50LH RSCAN0.TMID50.UINT8[LH]
+#define RSCAN0TMID50H RSCAN0.TMID50.UINT16[H]
+#define RSCAN0TMID50HL RSCAN0.TMID50.UINT8[HL]
+#define RSCAN0TMID50HH RSCAN0.TMID50.UINT8[HH]
+#define RSCAN0TMPTR50 RSCAN0.TMPTR50.UINT32
+#define RSCAN0TMPTR50L RSCAN0.TMPTR50.UINT16[L]
+#define RSCAN0TMPTR50LL RSCAN0.TMPTR50.UINT8[LL]
+#define RSCAN0TMPTR50LH RSCAN0.TMPTR50.UINT8[LH]
+#define RSCAN0TMPTR50H RSCAN0.TMPTR50.UINT16[H]
+#define RSCAN0TMPTR50HL RSCAN0.TMPTR50.UINT8[HL]
+#define RSCAN0TMPTR50HH RSCAN0.TMPTR50.UINT8[HH]
+#define RSCAN0TMDF050 RSCAN0.TMDF050.UINT32
+#define RSCAN0TMDF050L RSCAN0.TMDF050.UINT16[L]
+#define RSCAN0TMDF050LL RSCAN0.TMDF050.UINT8[LL]
+#define RSCAN0TMDF050LH RSCAN0.TMDF050.UINT8[LH]
+#define RSCAN0TMDF050H RSCAN0.TMDF050.UINT16[H]
+#define RSCAN0TMDF050HL RSCAN0.TMDF050.UINT8[HL]
+#define RSCAN0TMDF050HH RSCAN0.TMDF050.UINT8[HH]
+#define RSCAN0TMDF150 RSCAN0.TMDF150.UINT32
+#define RSCAN0TMDF150L RSCAN0.TMDF150.UINT16[L]
+#define RSCAN0TMDF150LL RSCAN0.TMDF150.UINT8[LL]
+#define RSCAN0TMDF150LH RSCAN0.TMDF150.UINT8[LH]
+#define RSCAN0TMDF150H RSCAN0.TMDF150.UINT16[H]
+#define RSCAN0TMDF150HL RSCAN0.TMDF150.UINT8[HL]
+#define RSCAN0TMDF150HH RSCAN0.TMDF150.UINT8[HH]
+#define RSCAN0TMID51 RSCAN0.TMID51.UINT32
+#define RSCAN0TMID51L RSCAN0.TMID51.UINT16[L]
+#define RSCAN0TMID51LL RSCAN0.TMID51.UINT8[LL]
+#define RSCAN0TMID51LH RSCAN0.TMID51.UINT8[LH]
+#define RSCAN0TMID51H RSCAN0.TMID51.UINT16[H]
+#define RSCAN0TMID51HL RSCAN0.TMID51.UINT8[HL]
+#define RSCAN0TMID51HH RSCAN0.TMID51.UINT8[HH]
+#define RSCAN0TMPTR51 RSCAN0.TMPTR51.UINT32
+#define RSCAN0TMPTR51L RSCAN0.TMPTR51.UINT16[L]
+#define RSCAN0TMPTR51LL RSCAN0.TMPTR51.UINT8[LL]
+#define RSCAN0TMPTR51LH RSCAN0.TMPTR51.UINT8[LH]
+#define RSCAN0TMPTR51H RSCAN0.TMPTR51.UINT16[H]
+#define RSCAN0TMPTR51HL RSCAN0.TMPTR51.UINT8[HL]
+#define RSCAN0TMPTR51HH RSCAN0.TMPTR51.UINT8[HH]
+#define RSCAN0TMDF051 RSCAN0.TMDF051.UINT32
+#define RSCAN0TMDF051L RSCAN0.TMDF051.UINT16[L]
+#define RSCAN0TMDF051LL RSCAN0.TMDF051.UINT8[LL]
+#define RSCAN0TMDF051LH RSCAN0.TMDF051.UINT8[LH]
+#define RSCAN0TMDF051H RSCAN0.TMDF051.UINT16[H]
+#define RSCAN0TMDF051HL RSCAN0.TMDF051.UINT8[HL]
+#define RSCAN0TMDF051HH RSCAN0.TMDF051.UINT8[HH]
+#define RSCAN0TMDF151 RSCAN0.TMDF151.UINT32
+#define RSCAN0TMDF151L RSCAN0.TMDF151.UINT16[L]
+#define RSCAN0TMDF151LL RSCAN0.TMDF151.UINT8[LL]
+#define RSCAN0TMDF151LH RSCAN0.TMDF151.UINT8[LH]
+#define RSCAN0TMDF151H RSCAN0.TMDF151.UINT16[H]
+#define RSCAN0TMDF151HL RSCAN0.TMDF151.UINT8[HL]
+#define RSCAN0TMDF151HH RSCAN0.TMDF151.UINT8[HH]
+#define RSCAN0TMID52 RSCAN0.TMID52.UINT32
+#define RSCAN0TMID52L RSCAN0.TMID52.UINT16[L]
+#define RSCAN0TMID52LL RSCAN0.TMID52.UINT8[LL]
+#define RSCAN0TMID52LH RSCAN0.TMID52.UINT8[LH]
+#define RSCAN0TMID52H RSCAN0.TMID52.UINT16[H]
+#define RSCAN0TMID52HL RSCAN0.TMID52.UINT8[HL]
+#define RSCAN0TMID52HH RSCAN0.TMID52.UINT8[HH]
+#define RSCAN0TMPTR52 RSCAN0.TMPTR52.UINT32
+#define RSCAN0TMPTR52L RSCAN0.TMPTR52.UINT16[L]
+#define RSCAN0TMPTR52LL RSCAN0.TMPTR52.UINT8[LL]
+#define RSCAN0TMPTR52LH RSCAN0.TMPTR52.UINT8[LH]
+#define RSCAN0TMPTR52H RSCAN0.TMPTR52.UINT16[H]
+#define RSCAN0TMPTR52HL RSCAN0.TMPTR52.UINT8[HL]
+#define RSCAN0TMPTR52HH RSCAN0.TMPTR52.UINT8[HH]
+#define RSCAN0TMDF052 RSCAN0.TMDF052.UINT32
+#define RSCAN0TMDF052L RSCAN0.TMDF052.UINT16[L]
+#define RSCAN0TMDF052LL RSCAN0.TMDF052.UINT8[LL]
+#define RSCAN0TMDF052LH RSCAN0.TMDF052.UINT8[LH]
+#define RSCAN0TMDF052H RSCAN0.TMDF052.UINT16[H]
+#define RSCAN0TMDF052HL RSCAN0.TMDF052.UINT8[HL]
+#define RSCAN0TMDF052HH RSCAN0.TMDF052.UINT8[HH]
+#define RSCAN0TMDF152 RSCAN0.TMDF152.UINT32
+#define RSCAN0TMDF152L RSCAN0.TMDF152.UINT16[L]
+#define RSCAN0TMDF152LL RSCAN0.TMDF152.UINT8[LL]
+#define RSCAN0TMDF152LH RSCAN0.TMDF152.UINT8[LH]
+#define RSCAN0TMDF152H RSCAN0.TMDF152.UINT16[H]
+#define RSCAN0TMDF152HL RSCAN0.TMDF152.UINT8[HL]
+#define RSCAN0TMDF152HH RSCAN0.TMDF152.UINT8[HH]
+#define RSCAN0TMID53 RSCAN0.TMID53.UINT32
+#define RSCAN0TMID53L RSCAN0.TMID53.UINT16[L]
+#define RSCAN0TMID53LL RSCAN0.TMID53.UINT8[LL]
+#define RSCAN0TMID53LH RSCAN0.TMID53.UINT8[LH]
+#define RSCAN0TMID53H RSCAN0.TMID53.UINT16[H]
+#define RSCAN0TMID53HL RSCAN0.TMID53.UINT8[HL]
+#define RSCAN0TMID53HH RSCAN0.TMID53.UINT8[HH]
+#define RSCAN0TMPTR53 RSCAN0.TMPTR53.UINT32
+#define RSCAN0TMPTR53L RSCAN0.TMPTR53.UINT16[L]
+#define RSCAN0TMPTR53LL RSCAN0.TMPTR53.UINT8[LL]
+#define RSCAN0TMPTR53LH RSCAN0.TMPTR53.UINT8[LH]
+#define RSCAN0TMPTR53H RSCAN0.TMPTR53.UINT16[H]
+#define RSCAN0TMPTR53HL RSCAN0.TMPTR53.UINT8[HL]
+#define RSCAN0TMPTR53HH RSCAN0.TMPTR53.UINT8[HH]
+#define RSCAN0TMDF053 RSCAN0.TMDF053.UINT32
+#define RSCAN0TMDF053L RSCAN0.TMDF053.UINT16[L]
+#define RSCAN0TMDF053LL RSCAN0.TMDF053.UINT8[LL]
+#define RSCAN0TMDF053LH RSCAN0.TMDF053.UINT8[LH]
+#define RSCAN0TMDF053H RSCAN0.TMDF053.UINT16[H]
+#define RSCAN0TMDF053HL RSCAN0.TMDF053.UINT8[HL]
+#define RSCAN0TMDF053HH RSCAN0.TMDF053.UINT8[HH]
+#define RSCAN0TMDF153 RSCAN0.TMDF153.UINT32
+#define RSCAN0TMDF153L RSCAN0.TMDF153.UINT16[L]
+#define RSCAN0TMDF153LL RSCAN0.TMDF153.UINT8[LL]
+#define RSCAN0TMDF153LH RSCAN0.TMDF153.UINT8[LH]
+#define RSCAN0TMDF153H RSCAN0.TMDF153.UINT16[H]
+#define RSCAN0TMDF153HL RSCAN0.TMDF153.UINT8[HL]
+#define RSCAN0TMDF153HH RSCAN0.TMDF153.UINT8[HH]
+#define RSCAN0TMID54 RSCAN0.TMID54.UINT32
+#define RSCAN0TMID54L RSCAN0.TMID54.UINT16[L]
+#define RSCAN0TMID54LL RSCAN0.TMID54.UINT8[LL]
+#define RSCAN0TMID54LH RSCAN0.TMID54.UINT8[LH]
+#define RSCAN0TMID54H RSCAN0.TMID54.UINT16[H]
+#define RSCAN0TMID54HL RSCAN0.TMID54.UINT8[HL]
+#define RSCAN0TMID54HH RSCAN0.TMID54.UINT8[HH]
+#define RSCAN0TMPTR54 RSCAN0.TMPTR54.UINT32
+#define RSCAN0TMPTR54L RSCAN0.TMPTR54.UINT16[L]
+#define RSCAN0TMPTR54LL RSCAN0.TMPTR54.UINT8[LL]
+#define RSCAN0TMPTR54LH RSCAN0.TMPTR54.UINT8[LH]
+#define RSCAN0TMPTR54H RSCAN0.TMPTR54.UINT16[H]
+#define RSCAN0TMPTR54HL RSCAN0.TMPTR54.UINT8[HL]
+#define RSCAN0TMPTR54HH RSCAN0.TMPTR54.UINT8[HH]
+#define RSCAN0TMDF054 RSCAN0.TMDF054.UINT32
+#define RSCAN0TMDF054L RSCAN0.TMDF054.UINT16[L]
+#define RSCAN0TMDF054LL RSCAN0.TMDF054.UINT8[LL]
+#define RSCAN0TMDF054LH RSCAN0.TMDF054.UINT8[LH]
+#define RSCAN0TMDF054H RSCAN0.TMDF054.UINT16[H]
+#define RSCAN0TMDF054HL RSCAN0.TMDF054.UINT8[HL]
+#define RSCAN0TMDF054HH RSCAN0.TMDF054.UINT8[HH]
+#define RSCAN0TMDF154 RSCAN0.TMDF154.UINT32
+#define RSCAN0TMDF154L RSCAN0.TMDF154.UINT16[L]
+#define RSCAN0TMDF154LL RSCAN0.TMDF154.UINT8[LL]
+#define RSCAN0TMDF154LH RSCAN0.TMDF154.UINT8[LH]
+#define RSCAN0TMDF154H RSCAN0.TMDF154.UINT16[H]
+#define RSCAN0TMDF154HL RSCAN0.TMDF154.UINT8[HL]
+#define RSCAN0TMDF154HH RSCAN0.TMDF154.UINT8[HH]
+#define RSCAN0TMID55 RSCAN0.TMID55.UINT32
+#define RSCAN0TMID55L RSCAN0.TMID55.UINT16[L]
+#define RSCAN0TMID55LL RSCAN0.TMID55.UINT8[LL]
+#define RSCAN0TMID55LH RSCAN0.TMID55.UINT8[LH]
+#define RSCAN0TMID55H RSCAN0.TMID55.UINT16[H]
+#define RSCAN0TMID55HL RSCAN0.TMID55.UINT8[HL]
+#define RSCAN0TMID55HH RSCAN0.TMID55.UINT8[HH]
+#define RSCAN0TMPTR55 RSCAN0.TMPTR55.UINT32
+#define RSCAN0TMPTR55L RSCAN0.TMPTR55.UINT16[L]
+#define RSCAN0TMPTR55LL RSCAN0.TMPTR55.UINT8[LL]
+#define RSCAN0TMPTR55LH RSCAN0.TMPTR55.UINT8[LH]
+#define RSCAN0TMPTR55H RSCAN0.TMPTR55.UINT16[H]
+#define RSCAN0TMPTR55HL RSCAN0.TMPTR55.UINT8[HL]
+#define RSCAN0TMPTR55HH RSCAN0.TMPTR55.UINT8[HH]
+#define RSCAN0TMDF055 RSCAN0.TMDF055.UINT32
+#define RSCAN0TMDF055L RSCAN0.TMDF055.UINT16[L]
+#define RSCAN0TMDF055LL RSCAN0.TMDF055.UINT8[LL]
+#define RSCAN0TMDF055LH RSCAN0.TMDF055.UINT8[LH]
+#define RSCAN0TMDF055H RSCAN0.TMDF055.UINT16[H]
+#define RSCAN0TMDF055HL RSCAN0.TMDF055.UINT8[HL]
+#define RSCAN0TMDF055HH RSCAN0.TMDF055.UINT8[HH]
+#define RSCAN0TMDF155 RSCAN0.TMDF155.UINT32
+#define RSCAN0TMDF155L RSCAN0.TMDF155.UINT16[L]
+#define RSCAN0TMDF155LL RSCAN0.TMDF155.UINT8[LL]
+#define RSCAN0TMDF155LH RSCAN0.TMDF155.UINT8[LH]
+#define RSCAN0TMDF155H RSCAN0.TMDF155.UINT16[H]
+#define RSCAN0TMDF155HL RSCAN0.TMDF155.UINT8[HL]
+#define RSCAN0TMDF155HH RSCAN0.TMDF155.UINT8[HH]
+#define RSCAN0TMID56 RSCAN0.TMID56.UINT32
+#define RSCAN0TMID56L RSCAN0.TMID56.UINT16[L]
+#define RSCAN0TMID56LL RSCAN0.TMID56.UINT8[LL]
+#define RSCAN0TMID56LH RSCAN0.TMID56.UINT8[LH]
+#define RSCAN0TMID56H RSCAN0.TMID56.UINT16[H]
+#define RSCAN0TMID56HL RSCAN0.TMID56.UINT8[HL]
+#define RSCAN0TMID56HH RSCAN0.TMID56.UINT8[HH]
+#define RSCAN0TMPTR56 RSCAN0.TMPTR56.UINT32
+#define RSCAN0TMPTR56L RSCAN0.TMPTR56.UINT16[L]
+#define RSCAN0TMPTR56LL RSCAN0.TMPTR56.UINT8[LL]
+#define RSCAN0TMPTR56LH RSCAN0.TMPTR56.UINT8[LH]
+#define RSCAN0TMPTR56H RSCAN0.TMPTR56.UINT16[H]
+#define RSCAN0TMPTR56HL RSCAN0.TMPTR56.UINT8[HL]
+#define RSCAN0TMPTR56HH RSCAN0.TMPTR56.UINT8[HH]
+#define RSCAN0TMDF056 RSCAN0.TMDF056.UINT32
+#define RSCAN0TMDF056L RSCAN0.TMDF056.UINT16[L]
+#define RSCAN0TMDF056LL RSCAN0.TMDF056.UINT8[LL]
+#define RSCAN0TMDF056LH RSCAN0.TMDF056.UINT8[LH]
+#define RSCAN0TMDF056H RSCAN0.TMDF056.UINT16[H]
+#define RSCAN0TMDF056HL RSCAN0.TMDF056.UINT8[HL]
+#define RSCAN0TMDF056HH RSCAN0.TMDF056.UINT8[HH]
+#define RSCAN0TMDF156 RSCAN0.TMDF156.UINT32
+#define RSCAN0TMDF156L RSCAN0.TMDF156.UINT16[L]
+#define RSCAN0TMDF156LL RSCAN0.TMDF156.UINT8[LL]
+#define RSCAN0TMDF156LH RSCAN0.TMDF156.UINT8[LH]
+#define RSCAN0TMDF156H RSCAN0.TMDF156.UINT16[H]
+#define RSCAN0TMDF156HL RSCAN0.TMDF156.UINT8[HL]
+#define RSCAN0TMDF156HH RSCAN0.TMDF156.UINT8[HH]
+#define RSCAN0TMID57 RSCAN0.TMID57.UINT32
+#define RSCAN0TMID57L RSCAN0.TMID57.UINT16[L]
+#define RSCAN0TMID57LL RSCAN0.TMID57.UINT8[LL]
+#define RSCAN0TMID57LH RSCAN0.TMID57.UINT8[LH]
+#define RSCAN0TMID57H RSCAN0.TMID57.UINT16[H]
+#define RSCAN0TMID57HL RSCAN0.TMID57.UINT8[HL]
+#define RSCAN0TMID57HH RSCAN0.TMID57.UINT8[HH]
+#define RSCAN0TMPTR57 RSCAN0.TMPTR57.UINT32
+#define RSCAN0TMPTR57L RSCAN0.TMPTR57.UINT16[L]
+#define RSCAN0TMPTR57LL RSCAN0.TMPTR57.UINT8[LL]
+#define RSCAN0TMPTR57LH RSCAN0.TMPTR57.UINT8[LH]
+#define RSCAN0TMPTR57H RSCAN0.TMPTR57.UINT16[H]
+#define RSCAN0TMPTR57HL RSCAN0.TMPTR57.UINT8[HL]
+#define RSCAN0TMPTR57HH RSCAN0.TMPTR57.UINT8[HH]
+#define RSCAN0TMDF057 RSCAN0.TMDF057.UINT32
+#define RSCAN0TMDF057L RSCAN0.TMDF057.UINT16[L]
+#define RSCAN0TMDF057LL RSCAN0.TMDF057.UINT8[LL]
+#define RSCAN0TMDF057LH RSCAN0.TMDF057.UINT8[LH]
+#define RSCAN0TMDF057H RSCAN0.TMDF057.UINT16[H]
+#define RSCAN0TMDF057HL RSCAN0.TMDF057.UINT8[HL]
+#define RSCAN0TMDF057HH RSCAN0.TMDF057.UINT8[HH]
+#define RSCAN0TMDF157 RSCAN0.TMDF157.UINT32
+#define RSCAN0TMDF157L RSCAN0.TMDF157.UINT16[L]
+#define RSCAN0TMDF157LL RSCAN0.TMDF157.UINT8[LL]
+#define RSCAN0TMDF157LH RSCAN0.TMDF157.UINT8[LH]
+#define RSCAN0TMDF157H RSCAN0.TMDF157.UINT16[H]
+#define RSCAN0TMDF157HL RSCAN0.TMDF157.UINT8[HL]
+#define RSCAN0TMDF157HH RSCAN0.TMDF157.UINT8[HH]
+#define RSCAN0TMID58 RSCAN0.TMID58.UINT32
+#define RSCAN0TMID58L RSCAN0.TMID58.UINT16[L]
+#define RSCAN0TMID58LL RSCAN0.TMID58.UINT8[LL]
+#define RSCAN0TMID58LH RSCAN0.TMID58.UINT8[LH]
+#define RSCAN0TMID58H RSCAN0.TMID58.UINT16[H]
+#define RSCAN0TMID58HL RSCAN0.TMID58.UINT8[HL]
+#define RSCAN0TMID58HH RSCAN0.TMID58.UINT8[HH]
+#define RSCAN0TMPTR58 RSCAN0.TMPTR58.UINT32
+#define RSCAN0TMPTR58L RSCAN0.TMPTR58.UINT16[L]
+#define RSCAN0TMPTR58LL RSCAN0.TMPTR58.UINT8[LL]
+#define RSCAN0TMPTR58LH RSCAN0.TMPTR58.UINT8[LH]
+#define RSCAN0TMPTR58H RSCAN0.TMPTR58.UINT16[H]
+#define RSCAN0TMPTR58HL RSCAN0.TMPTR58.UINT8[HL]
+#define RSCAN0TMPTR58HH RSCAN0.TMPTR58.UINT8[HH]
+#define RSCAN0TMDF058 RSCAN0.TMDF058.UINT32
+#define RSCAN0TMDF058L RSCAN0.TMDF058.UINT16[L]
+#define RSCAN0TMDF058LL RSCAN0.TMDF058.UINT8[LL]
+#define RSCAN0TMDF058LH RSCAN0.TMDF058.UINT8[LH]
+#define RSCAN0TMDF058H RSCAN0.TMDF058.UINT16[H]
+#define RSCAN0TMDF058HL RSCAN0.TMDF058.UINT8[HL]
+#define RSCAN0TMDF058HH RSCAN0.TMDF058.UINT8[HH]
+#define RSCAN0TMDF158 RSCAN0.TMDF158.UINT32
+#define RSCAN0TMDF158L RSCAN0.TMDF158.UINT16[L]
+#define RSCAN0TMDF158LL RSCAN0.TMDF158.UINT8[LL]
+#define RSCAN0TMDF158LH RSCAN0.TMDF158.UINT8[LH]
+#define RSCAN0TMDF158H RSCAN0.TMDF158.UINT16[H]
+#define RSCAN0TMDF158HL RSCAN0.TMDF158.UINT8[HL]
+#define RSCAN0TMDF158HH RSCAN0.TMDF158.UINT8[HH]
+#define RSCAN0TMID59 RSCAN0.TMID59.UINT32
+#define RSCAN0TMID59L RSCAN0.TMID59.UINT16[L]
+#define RSCAN0TMID59LL RSCAN0.TMID59.UINT8[LL]
+#define RSCAN0TMID59LH RSCAN0.TMID59.UINT8[LH]
+#define RSCAN0TMID59H RSCAN0.TMID59.UINT16[H]
+#define RSCAN0TMID59HL RSCAN0.TMID59.UINT8[HL]
+#define RSCAN0TMID59HH RSCAN0.TMID59.UINT8[HH]
+#define RSCAN0TMPTR59 RSCAN0.TMPTR59.UINT32
+#define RSCAN0TMPTR59L RSCAN0.TMPTR59.UINT16[L]
+#define RSCAN0TMPTR59LL RSCAN0.TMPTR59.UINT8[LL]
+#define RSCAN0TMPTR59LH RSCAN0.TMPTR59.UINT8[LH]
+#define RSCAN0TMPTR59H RSCAN0.TMPTR59.UINT16[H]
+#define RSCAN0TMPTR59HL RSCAN0.TMPTR59.UINT8[HL]
+#define RSCAN0TMPTR59HH RSCAN0.TMPTR59.UINT8[HH]
+#define RSCAN0TMDF059 RSCAN0.TMDF059.UINT32
+#define RSCAN0TMDF059L RSCAN0.TMDF059.UINT16[L]
+#define RSCAN0TMDF059LL RSCAN0.TMDF059.UINT8[LL]
+#define RSCAN0TMDF059LH RSCAN0.TMDF059.UINT8[LH]
+#define RSCAN0TMDF059H RSCAN0.TMDF059.UINT16[H]
+#define RSCAN0TMDF059HL RSCAN0.TMDF059.UINT8[HL]
+#define RSCAN0TMDF059HH RSCAN0.TMDF059.UINT8[HH]
+#define RSCAN0TMDF159 RSCAN0.TMDF159.UINT32
+#define RSCAN0TMDF159L RSCAN0.TMDF159.UINT16[L]
+#define RSCAN0TMDF159LL RSCAN0.TMDF159.UINT8[LL]
+#define RSCAN0TMDF159LH RSCAN0.TMDF159.UINT8[LH]
+#define RSCAN0TMDF159H RSCAN0.TMDF159.UINT16[H]
+#define RSCAN0TMDF159HL RSCAN0.TMDF159.UINT8[HL]
+#define RSCAN0TMDF159HH RSCAN0.TMDF159.UINT8[HH]
+#define RSCAN0TMID60 RSCAN0.TMID60.UINT32
+#define RSCAN0TMID60L RSCAN0.TMID60.UINT16[L]
+#define RSCAN0TMID60LL RSCAN0.TMID60.UINT8[LL]
+#define RSCAN0TMID60LH RSCAN0.TMID60.UINT8[LH]
+#define RSCAN0TMID60H RSCAN0.TMID60.UINT16[H]
+#define RSCAN0TMID60HL RSCAN0.TMID60.UINT8[HL]
+#define RSCAN0TMID60HH RSCAN0.TMID60.UINT8[HH]
+#define RSCAN0TMPTR60 RSCAN0.TMPTR60.UINT32
+#define RSCAN0TMPTR60L RSCAN0.TMPTR60.UINT16[L]
+#define RSCAN0TMPTR60LL RSCAN0.TMPTR60.UINT8[LL]
+#define RSCAN0TMPTR60LH RSCAN0.TMPTR60.UINT8[LH]
+#define RSCAN0TMPTR60H RSCAN0.TMPTR60.UINT16[H]
+#define RSCAN0TMPTR60HL RSCAN0.TMPTR60.UINT8[HL]
+#define RSCAN0TMPTR60HH RSCAN0.TMPTR60.UINT8[HH]
+#define RSCAN0TMDF060 RSCAN0.TMDF060.UINT32
+#define RSCAN0TMDF060L RSCAN0.TMDF060.UINT16[L]
+#define RSCAN0TMDF060LL RSCAN0.TMDF060.UINT8[LL]
+#define RSCAN0TMDF060LH RSCAN0.TMDF060.UINT8[LH]
+#define RSCAN0TMDF060H RSCAN0.TMDF060.UINT16[H]
+#define RSCAN0TMDF060HL RSCAN0.TMDF060.UINT8[HL]
+#define RSCAN0TMDF060HH RSCAN0.TMDF060.UINT8[HH]
+#define RSCAN0TMDF160 RSCAN0.TMDF160.UINT32
+#define RSCAN0TMDF160L RSCAN0.TMDF160.UINT16[L]
+#define RSCAN0TMDF160LL RSCAN0.TMDF160.UINT8[LL]
+#define RSCAN0TMDF160LH RSCAN0.TMDF160.UINT8[LH]
+#define RSCAN0TMDF160H RSCAN0.TMDF160.UINT16[H]
+#define RSCAN0TMDF160HL RSCAN0.TMDF160.UINT8[HL]
+#define RSCAN0TMDF160HH RSCAN0.TMDF160.UINT8[HH]
+#define RSCAN0TMID61 RSCAN0.TMID61.UINT32
+#define RSCAN0TMID61L RSCAN0.TMID61.UINT16[L]
+#define RSCAN0TMID61LL RSCAN0.TMID61.UINT8[LL]
+#define RSCAN0TMID61LH RSCAN0.TMID61.UINT8[LH]
+#define RSCAN0TMID61H RSCAN0.TMID61.UINT16[H]
+#define RSCAN0TMID61HL RSCAN0.TMID61.UINT8[HL]
+#define RSCAN0TMID61HH RSCAN0.TMID61.UINT8[HH]
+#define RSCAN0TMPTR61 RSCAN0.TMPTR61.UINT32
+#define RSCAN0TMPTR61L RSCAN0.TMPTR61.UINT16[L]
+#define RSCAN0TMPTR61LL RSCAN0.TMPTR61.UINT8[LL]
+#define RSCAN0TMPTR61LH RSCAN0.TMPTR61.UINT8[LH]
+#define RSCAN0TMPTR61H RSCAN0.TMPTR61.UINT16[H]
+#define RSCAN0TMPTR61HL RSCAN0.TMPTR61.UINT8[HL]
+#define RSCAN0TMPTR61HH RSCAN0.TMPTR61.UINT8[HH]
+#define RSCAN0TMDF061 RSCAN0.TMDF061.UINT32
+#define RSCAN0TMDF061L RSCAN0.TMDF061.UINT16[L]
+#define RSCAN0TMDF061LL RSCAN0.TMDF061.UINT8[LL]
+#define RSCAN0TMDF061LH RSCAN0.TMDF061.UINT8[LH]
+#define RSCAN0TMDF061H RSCAN0.TMDF061.UINT16[H]
+#define RSCAN0TMDF061HL RSCAN0.TMDF061.UINT8[HL]
+#define RSCAN0TMDF061HH RSCAN0.TMDF061.UINT8[HH]
+#define RSCAN0TMDF161 RSCAN0.TMDF161.UINT32
+#define RSCAN0TMDF161L RSCAN0.TMDF161.UINT16[L]
+#define RSCAN0TMDF161LL RSCAN0.TMDF161.UINT8[LL]
+#define RSCAN0TMDF161LH RSCAN0.TMDF161.UINT8[LH]
+#define RSCAN0TMDF161H RSCAN0.TMDF161.UINT16[H]
+#define RSCAN0TMDF161HL RSCAN0.TMDF161.UINT8[HL]
+#define RSCAN0TMDF161HH RSCAN0.TMDF161.UINT8[HH]
+#define RSCAN0TMID62 RSCAN0.TMID62.UINT32
+#define RSCAN0TMID62L RSCAN0.TMID62.UINT16[L]
+#define RSCAN0TMID62LL RSCAN0.TMID62.UINT8[LL]
+#define RSCAN0TMID62LH RSCAN0.TMID62.UINT8[LH]
+#define RSCAN0TMID62H RSCAN0.TMID62.UINT16[H]
+#define RSCAN0TMID62HL RSCAN0.TMID62.UINT8[HL]
+#define RSCAN0TMID62HH RSCAN0.TMID62.UINT8[HH]
+#define RSCAN0TMPTR62 RSCAN0.TMPTR62.UINT32
+#define RSCAN0TMPTR62L RSCAN0.TMPTR62.UINT16[L]
+#define RSCAN0TMPTR62LL RSCAN0.TMPTR62.UINT8[LL]
+#define RSCAN0TMPTR62LH RSCAN0.TMPTR62.UINT8[LH]
+#define RSCAN0TMPTR62H RSCAN0.TMPTR62.UINT16[H]
+#define RSCAN0TMPTR62HL RSCAN0.TMPTR62.UINT8[HL]
+#define RSCAN0TMPTR62HH RSCAN0.TMPTR62.UINT8[HH]
+#define RSCAN0TMDF062 RSCAN0.TMDF062.UINT32
+#define RSCAN0TMDF062L RSCAN0.TMDF062.UINT16[L]
+#define RSCAN0TMDF062LL RSCAN0.TMDF062.UINT8[LL]
+#define RSCAN0TMDF062LH RSCAN0.TMDF062.UINT8[LH]
+#define RSCAN0TMDF062H RSCAN0.TMDF062.UINT16[H]
+#define RSCAN0TMDF062HL RSCAN0.TMDF062.UINT8[HL]
+#define RSCAN0TMDF062HH RSCAN0.TMDF062.UINT8[HH]
+#define RSCAN0TMDF162 RSCAN0.TMDF162.UINT32
+#define RSCAN0TMDF162L RSCAN0.TMDF162.UINT16[L]
+#define RSCAN0TMDF162LL RSCAN0.TMDF162.UINT8[LL]
+#define RSCAN0TMDF162LH RSCAN0.TMDF162.UINT8[LH]
+#define RSCAN0TMDF162H RSCAN0.TMDF162.UINT16[H]
+#define RSCAN0TMDF162HL RSCAN0.TMDF162.UINT8[HL]
+#define RSCAN0TMDF162HH RSCAN0.TMDF162.UINT8[HH]
+#define RSCAN0TMID63 RSCAN0.TMID63.UINT32
+#define RSCAN0TMID63L RSCAN0.TMID63.UINT16[L]
+#define RSCAN0TMID63LL RSCAN0.TMID63.UINT8[LL]
+#define RSCAN0TMID63LH RSCAN0.TMID63.UINT8[LH]
+#define RSCAN0TMID63H RSCAN0.TMID63.UINT16[H]
+#define RSCAN0TMID63HL RSCAN0.TMID63.UINT8[HL]
+#define RSCAN0TMID63HH RSCAN0.TMID63.UINT8[HH]
+#define RSCAN0TMPTR63 RSCAN0.TMPTR63.UINT32
+#define RSCAN0TMPTR63L RSCAN0.TMPTR63.UINT16[L]
+#define RSCAN0TMPTR63LL RSCAN0.TMPTR63.UINT8[LL]
+#define RSCAN0TMPTR63LH RSCAN0.TMPTR63.UINT8[LH]
+#define RSCAN0TMPTR63H RSCAN0.TMPTR63.UINT16[H]
+#define RSCAN0TMPTR63HL RSCAN0.TMPTR63.UINT8[HL]
+#define RSCAN0TMPTR63HH RSCAN0.TMPTR63.UINT8[HH]
+#define RSCAN0TMDF063 RSCAN0.TMDF063.UINT32
+#define RSCAN0TMDF063L RSCAN0.TMDF063.UINT16[L]
+#define RSCAN0TMDF063LL RSCAN0.TMDF063.UINT8[LL]
+#define RSCAN0TMDF063LH RSCAN0.TMDF063.UINT8[LH]
+#define RSCAN0TMDF063H RSCAN0.TMDF063.UINT16[H]
+#define RSCAN0TMDF063HL RSCAN0.TMDF063.UINT8[HL]
+#define RSCAN0TMDF063HH RSCAN0.TMDF063.UINT8[HH]
+#define RSCAN0TMDF163 RSCAN0.TMDF163.UINT32
+#define RSCAN0TMDF163L RSCAN0.TMDF163.UINT16[L]
+#define RSCAN0TMDF163LL RSCAN0.TMDF163.UINT8[LL]
+#define RSCAN0TMDF163LH RSCAN0.TMDF163.UINT8[LH]
+#define RSCAN0TMDF163H RSCAN0.TMDF163.UINT16[H]
+#define RSCAN0TMDF163HL RSCAN0.TMDF163.UINT8[HL]
+#define RSCAN0TMDF163HH RSCAN0.TMDF163.UINT8[HH]
+#define RSCAN0TMID64 RSCAN0.TMID64.UINT32
+#define RSCAN0TMID64L RSCAN0.TMID64.UINT16[L]
+#define RSCAN0TMID64LL RSCAN0.TMID64.UINT8[LL]
+#define RSCAN0TMID64LH RSCAN0.TMID64.UINT8[LH]
+#define RSCAN0TMID64H RSCAN0.TMID64.UINT16[H]
+#define RSCAN0TMID64HL RSCAN0.TMID64.UINT8[HL]
+#define RSCAN0TMID64HH RSCAN0.TMID64.UINT8[HH]
+#define RSCAN0TMPTR64 RSCAN0.TMPTR64.UINT32
+#define RSCAN0TMPTR64L RSCAN0.TMPTR64.UINT16[L]
+#define RSCAN0TMPTR64LL RSCAN0.TMPTR64.UINT8[LL]
+#define RSCAN0TMPTR64LH RSCAN0.TMPTR64.UINT8[LH]
+#define RSCAN0TMPTR64H RSCAN0.TMPTR64.UINT16[H]
+#define RSCAN0TMPTR64HL RSCAN0.TMPTR64.UINT8[HL]
+#define RSCAN0TMPTR64HH RSCAN0.TMPTR64.UINT8[HH]
+#define RSCAN0TMDF064 RSCAN0.TMDF064.UINT32
+#define RSCAN0TMDF064L RSCAN0.TMDF064.UINT16[L]
+#define RSCAN0TMDF064LL RSCAN0.TMDF064.UINT8[LL]
+#define RSCAN0TMDF064LH RSCAN0.TMDF064.UINT8[LH]
+#define RSCAN0TMDF064H RSCAN0.TMDF064.UINT16[H]
+#define RSCAN0TMDF064HL RSCAN0.TMDF064.UINT8[HL]
+#define RSCAN0TMDF064HH RSCAN0.TMDF064.UINT8[HH]
+#define RSCAN0TMDF164 RSCAN0.TMDF164.UINT32
+#define RSCAN0TMDF164L RSCAN0.TMDF164.UINT16[L]
+#define RSCAN0TMDF164LL RSCAN0.TMDF164.UINT8[LL]
+#define RSCAN0TMDF164LH RSCAN0.TMDF164.UINT8[LH]
+#define RSCAN0TMDF164H RSCAN0.TMDF164.UINT16[H]
+#define RSCAN0TMDF164HL RSCAN0.TMDF164.UINT8[HL]
+#define RSCAN0TMDF164HH RSCAN0.TMDF164.UINT8[HH]
+#define RSCAN0TMID65 RSCAN0.TMID65.UINT32
+#define RSCAN0TMID65L RSCAN0.TMID65.UINT16[L]
+#define RSCAN0TMID65LL RSCAN0.TMID65.UINT8[LL]
+#define RSCAN0TMID65LH RSCAN0.TMID65.UINT8[LH]
+#define RSCAN0TMID65H RSCAN0.TMID65.UINT16[H]
+#define RSCAN0TMID65HL RSCAN0.TMID65.UINT8[HL]
+#define RSCAN0TMID65HH RSCAN0.TMID65.UINT8[HH]
+#define RSCAN0TMPTR65 RSCAN0.TMPTR65.UINT32
+#define RSCAN0TMPTR65L RSCAN0.TMPTR65.UINT16[L]
+#define RSCAN0TMPTR65LL RSCAN0.TMPTR65.UINT8[LL]
+#define RSCAN0TMPTR65LH RSCAN0.TMPTR65.UINT8[LH]
+#define RSCAN0TMPTR65H RSCAN0.TMPTR65.UINT16[H]
+#define RSCAN0TMPTR65HL RSCAN0.TMPTR65.UINT8[HL]
+#define RSCAN0TMPTR65HH RSCAN0.TMPTR65.UINT8[HH]
+#define RSCAN0TMDF065 RSCAN0.TMDF065.UINT32
+#define RSCAN0TMDF065L RSCAN0.TMDF065.UINT16[L]
+#define RSCAN0TMDF065LL RSCAN0.TMDF065.UINT8[LL]
+#define RSCAN0TMDF065LH RSCAN0.TMDF065.UINT8[LH]
+#define RSCAN0TMDF065H RSCAN0.TMDF065.UINT16[H]
+#define RSCAN0TMDF065HL RSCAN0.TMDF065.UINT8[HL]
+#define RSCAN0TMDF065HH RSCAN0.TMDF065.UINT8[HH]
+#define RSCAN0TMDF165 RSCAN0.TMDF165.UINT32
+#define RSCAN0TMDF165L RSCAN0.TMDF165.UINT16[L]
+#define RSCAN0TMDF165LL RSCAN0.TMDF165.UINT8[LL]
+#define RSCAN0TMDF165LH RSCAN0.TMDF165.UINT8[LH]
+#define RSCAN0TMDF165H RSCAN0.TMDF165.UINT16[H]
+#define RSCAN0TMDF165HL RSCAN0.TMDF165.UINT8[HL]
+#define RSCAN0TMDF165HH RSCAN0.TMDF165.UINT8[HH]
+#define RSCAN0TMID66 RSCAN0.TMID66.UINT32
+#define RSCAN0TMID66L RSCAN0.TMID66.UINT16[L]
+#define RSCAN0TMID66LL RSCAN0.TMID66.UINT8[LL]
+#define RSCAN0TMID66LH RSCAN0.TMID66.UINT8[LH]
+#define RSCAN0TMID66H RSCAN0.TMID66.UINT16[H]
+#define RSCAN0TMID66HL RSCAN0.TMID66.UINT8[HL]
+#define RSCAN0TMID66HH RSCAN0.TMID66.UINT8[HH]
+#define RSCAN0TMPTR66 RSCAN0.TMPTR66.UINT32
+#define RSCAN0TMPTR66L RSCAN0.TMPTR66.UINT16[L]
+#define RSCAN0TMPTR66LL RSCAN0.TMPTR66.UINT8[LL]
+#define RSCAN0TMPTR66LH RSCAN0.TMPTR66.UINT8[LH]
+#define RSCAN0TMPTR66H RSCAN0.TMPTR66.UINT16[H]
+#define RSCAN0TMPTR66HL RSCAN0.TMPTR66.UINT8[HL]
+#define RSCAN0TMPTR66HH RSCAN0.TMPTR66.UINT8[HH]
+#define RSCAN0TMDF066 RSCAN0.TMDF066.UINT32
+#define RSCAN0TMDF066L RSCAN0.TMDF066.UINT16[L]
+#define RSCAN0TMDF066LL RSCAN0.TMDF066.UINT8[LL]
+#define RSCAN0TMDF066LH RSCAN0.TMDF066.UINT8[LH]
+#define RSCAN0TMDF066H RSCAN0.TMDF066.UINT16[H]
+#define RSCAN0TMDF066HL RSCAN0.TMDF066.UINT8[HL]
+#define RSCAN0TMDF066HH RSCAN0.TMDF066.UINT8[HH]
+#define RSCAN0TMDF166 RSCAN0.TMDF166.UINT32
+#define RSCAN0TMDF166L RSCAN0.TMDF166.UINT16[L]
+#define RSCAN0TMDF166LL RSCAN0.TMDF166.UINT8[LL]
+#define RSCAN0TMDF166LH RSCAN0.TMDF166.UINT8[LH]
+#define RSCAN0TMDF166H RSCAN0.TMDF166.UINT16[H]
+#define RSCAN0TMDF166HL RSCAN0.TMDF166.UINT8[HL]
+#define RSCAN0TMDF166HH RSCAN0.TMDF166.UINT8[HH]
+#define RSCAN0TMID67 RSCAN0.TMID67.UINT32
+#define RSCAN0TMID67L RSCAN0.TMID67.UINT16[L]
+#define RSCAN0TMID67LL RSCAN0.TMID67.UINT8[LL]
+#define RSCAN0TMID67LH RSCAN0.TMID67.UINT8[LH]
+#define RSCAN0TMID67H RSCAN0.TMID67.UINT16[H]
+#define RSCAN0TMID67HL RSCAN0.TMID67.UINT8[HL]
+#define RSCAN0TMID67HH RSCAN0.TMID67.UINT8[HH]
+#define RSCAN0TMPTR67 RSCAN0.TMPTR67.UINT32
+#define RSCAN0TMPTR67L RSCAN0.TMPTR67.UINT16[L]
+#define RSCAN0TMPTR67LL RSCAN0.TMPTR67.UINT8[LL]
+#define RSCAN0TMPTR67LH RSCAN0.TMPTR67.UINT8[LH]
+#define RSCAN0TMPTR67H RSCAN0.TMPTR67.UINT16[H]
+#define RSCAN0TMPTR67HL RSCAN0.TMPTR67.UINT8[HL]
+#define RSCAN0TMPTR67HH RSCAN0.TMPTR67.UINT8[HH]
+#define RSCAN0TMDF067 RSCAN0.TMDF067.UINT32
+#define RSCAN0TMDF067L RSCAN0.TMDF067.UINT16[L]
+#define RSCAN0TMDF067LL RSCAN0.TMDF067.UINT8[LL]
+#define RSCAN0TMDF067LH RSCAN0.TMDF067.UINT8[LH]
+#define RSCAN0TMDF067H RSCAN0.TMDF067.UINT16[H]
+#define RSCAN0TMDF067HL RSCAN0.TMDF067.UINT8[HL]
+#define RSCAN0TMDF067HH RSCAN0.TMDF067.UINT8[HH]
+#define RSCAN0TMDF167 RSCAN0.TMDF167.UINT32
+#define RSCAN0TMDF167L RSCAN0.TMDF167.UINT16[L]
+#define RSCAN0TMDF167LL RSCAN0.TMDF167.UINT8[LL]
+#define RSCAN0TMDF167LH RSCAN0.TMDF167.UINT8[LH]
+#define RSCAN0TMDF167H RSCAN0.TMDF167.UINT16[H]
+#define RSCAN0TMDF167HL RSCAN0.TMDF167.UINT8[HL]
+#define RSCAN0TMDF167HH RSCAN0.TMDF167.UINT8[HH]
+#define RSCAN0TMID68 RSCAN0.TMID68.UINT32
+#define RSCAN0TMID68L RSCAN0.TMID68.UINT16[L]
+#define RSCAN0TMID68LL RSCAN0.TMID68.UINT8[LL]
+#define RSCAN0TMID68LH RSCAN0.TMID68.UINT8[LH]
+#define RSCAN0TMID68H RSCAN0.TMID68.UINT16[H]
+#define RSCAN0TMID68HL RSCAN0.TMID68.UINT8[HL]
+#define RSCAN0TMID68HH RSCAN0.TMID68.UINT8[HH]
+#define RSCAN0TMPTR68 RSCAN0.TMPTR68.UINT32
+#define RSCAN0TMPTR68L RSCAN0.TMPTR68.UINT16[L]
+#define RSCAN0TMPTR68LL RSCAN0.TMPTR68.UINT8[LL]
+#define RSCAN0TMPTR68LH RSCAN0.TMPTR68.UINT8[LH]
+#define RSCAN0TMPTR68H RSCAN0.TMPTR68.UINT16[H]
+#define RSCAN0TMPTR68HL RSCAN0.TMPTR68.UINT8[HL]
+#define RSCAN0TMPTR68HH RSCAN0.TMPTR68.UINT8[HH]
+#define RSCAN0TMDF068 RSCAN0.TMDF068.UINT32
+#define RSCAN0TMDF068L RSCAN0.TMDF068.UINT16[L]
+#define RSCAN0TMDF068LL RSCAN0.TMDF068.UINT8[LL]
+#define RSCAN0TMDF068LH RSCAN0.TMDF068.UINT8[LH]
+#define RSCAN0TMDF068H RSCAN0.TMDF068.UINT16[H]
+#define RSCAN0TMDF068HL RSCAN0.TMDF068.UINT8[HL]
+#define RSCAN0TMDF068HH RSCAN0.TMDF068.UINT8[HH]
+#define RSCAN0TMDF168 RSCAN0.TMDF168.UINT32
+#define RSCAN0TMDF168L RSCAN0.TMDF168.UINT16[L]
+#define RSCAN0TMDF168LL RSCAN0.TMDF168.UINT8[LL]
+#define RSCAN0TMDF168LH RSCAN0.TMDF168.UINT8[LH]
+#define RSCAN0TMDF168H RSCAN0.TMDF168.UINT16[H]
+#define RSCAN0TMDF168HL RSCAN0.TMDF168.UINT8[HL]
+#define RSCAN0TMDF168HH RSCAN0.TMDF168.UINT8[HH]
+#define RSCAN0TMID69 RSCAN0.TMID69.UINT32
+#define RSCAN0TMID69L RSCAN0.TMID69.UINT16[L]
+#define RSCAN0TMID69LL RSCAN0.TMID69.UINT8[LL]
+#define RSCAN0TMID69LH RSCAN0.TMID69.UINT8[LH]
+#define RSCAN0TMID69H RSCAN0.TMID69.UINT16[H]
+#define RSCAN0TMID69HL RSCAN0.TMID69.UINT8[HL]
+#define RSCAN0TMID69HH RSCAN0.TMID69.UINT8[HH]
+#define RSCAN0TMPTR69 RSCAN0.TMPTR69.UINT32
+#define RSCAN0TMPTR69L RSCAN0.TMPTR69.UINT16[L]
+#define RSCAN0TMPTR69LL RSCAN0.TMPTR69.UINT8[LL]
+#define RSCAN0TMPTR69LH RSCAN0.TMPTR69.UINT8[LH]
+#define RSCAN0TMPTR69H RSCAN0.TMPTR69.UINT16[H]
+#define RSCAN0TMPTR69HL RSCAN0.TMPTR69.UINT8[HL]
+#define RSCAN0TMPTR69HH RSCAN0.TMPTR69.UINT8[HH]
+#define RSCAN0TMDF069 RSCAN0.TMDF069.UINT32
+#define RSCAN0TMDF069L RSCAN0.TMDF069.UINT16[L]
+#define RSCAN0TMDF069LL RSCAN0.TMDF069.UINT8[LL]
+#define RSCAN0TMDF069LH RSCAN0.TMDF069.UINT8[LH]
+#define RSCAN0TMDF069H RSCAN0.TMDF069.UINT16[H]
+#define RSCAN0TMDF069HL RSCAN0.TMDF069.UINT8[HL]
+#define RSCAN0TMDF069HH RSCAN0.TMDF069.UINT8[HH]
+#define RSCAN0TMDF169 RSCAN0.TMDF169.UINT32
+#define RSCAN0TMDF169L RSCAN0.TMDF169.UINT16[L]
+#define RSCAN0TMDF169LL RSCAN0.TMDF169.UINT8[LL]
+#define RSCAN0TMDF169LH RSCAN0.TMDF169.UINT8[LH]
+#define RSCAN0TMDF169H RSCAN0.TMDF169.UINT16[H]
+#define RSCAN0TMDF169HL RSCAN0.TMDF169.UINT8[HL]
+#define RSCAN0TMDF169HH RSCAN0.TMDF169.UINT8[HH]
+#define RSCAN0TMID70 RSCAN0.TMID70.UINT32
+#define RSCAN0TMID70L RSCAN0.TMID70.UINT16[L]
+#define RSCAN0TMID70LL RSCAN0.TMID70.UINT8[LL]
+#define RSCAN0TMID70LH RSCAN0.TMID70.UINT8[LH]
+#define RSCAN0TMID70H RSCAN0.TMID70.UINT16[H]
+#define RSCAN0TMID70HL RSCAN0.TMID70.UINT8[HL]
+#define RSCAN0TMID70HH RSCAN0.TMID70.UINT8[HH]
+#define RSCAN0TMPTR70 RSCAN0.TMPTR70.UINT32
+#define RSCAN0TMPTR70L RSCAN0.TMPTR70.UINT16[L]
+#define RSCAN0TMPTR70LL RSCAN0.TMPTR70.UINT8[LL]
+#define RSCAN0TMPTR70LH RSCAN0.TMPTR70.UINT8[LH]
+#define RSCAN0TMPTR70H RSCAN0.TMPTR70.UINT16[H]
+#define RSCAN0TMPTR70HL RSCAN0.TMPTR70.UINT8[HL]
+#define RSCAN0TMPTR70HH RSCAN0.TMPTR70.UINT8[HH]
+#define RSCAN0TMDF070 RSCAN0.TMDF070.UINT32
+#define RSCAN0TMDF070L RSCAN0.TMDF070.UINT16[L]
+#define RSCAN0TMDF070LL RSCAN0.TMDF070.UINT8[LL]
+#define RSCAN0TMDF070LH RSCAN0.TMDF070.UINT8[LH]
+#define RSCAN0TMDF070H RSCAN0.TMDF070.UINT16[H]
+#define RSCAN0TMDF070HL RSCAN0.TMDF070.UINT8[HL]
+#define RSCAN0TMDF070HH RSCAN0.TMDF070.UINT8[HH]
+#define RSCAN0TMDF170 RSCAN0.TMDF170.UINT32
+#define RSCAN0TMDF170L RSCAN0.TMDF170.UINT16[L]
+#define RSCAN0TMDF170LL RSCAN0.TMDF170.UINT8[LL]
+#define RSCAN0TMDF170LH RSCAN0.TMDF170.UINT8[LH]
+#define RSCAN0TMDF170H RSCAN0.TMDF170.UINT16[H]
+#define RSCAN0TMDF170HL RSCAN0.TMDF170.UINT8[HL]
+#define RSCAN0TMDF170HH RSCAN0.TMDF170.UINT8[HH]
+#define RSCAN0TMID71 RSCAN0.TMID71.UINT32
+#define RSCAN0TMID71L RSCAN0.TMID71.UINT16[L]
+#define RSCAN0TMID71LL RSCAN0.TMID71.UINT8[LL]
+#define RSCAN0TMID71LH RSCAN0.TMID71.UINT8[LH]
+#define RSCAN0TMID71H RSCAN0.TMID71.UINT16[H]
+#define RSCAN0TMID71HL RSCAN0.TMID71.UINT8[HL]
+#define RSCAN0TMID71HH RSCAN0.TMID71.UINT8[HH]
+#define RSCAN0TMPTR71 RSCAN0.TMPTR71.UINT32
+#define RSCAN0TMPTR71L RSCAN0.TMPTR71.UINT16[L]
+#define RSCAN0TMPTR71LL RSCAN0.TMPTR71.UINT8[LL]
+#define RSCAN0TMPTR71LH RSCAN0.TMPTR71.UINT8[LH]
+#define RSCAN0TMPTR71H RSCAN0.TMPTR71.UINT16[H]
+#define RSCAN0TMPTR71HL RSCAN0.TMPTR71.UINT8[HL]
+#define RSCAN0TMPTR71HH RSCAN0.TMPTR71.UINT8[HH]
+#define RSCAN0TMDF071 RSCAN0.TMDF071.UINT32
+#define RSCAN0TMDF071L RSCAN0.TMDF071.UINT16[L]
+#define RSCAN0TMDF071LL RSCAN0.TMDF071.UINT8[LL]
+#define RSCAN0TMDF071LH RSCAN0.TMDF071.UINT8[LH]
+#define RSCAN0TMDF071H RSCAN0.TMDF071.UINT16[H]
+#define RSCAN0TMDF071HL RSCAN0.TMDF071.UINT8[HL]
+#define RSCAN0TMDF071HH RSCAN0.TMDF071.UINT8[HH]
+#define RSCAN0TMDF171 RSCAN0.TMDF171.UINT32
+#define RSCAN0TMDF171L RSCAN0.TMDF171.UINT16[L]
+#define RSCAN0TMDF171LL RSCAN0.TMDF171.UINT8[LL]
+#define RSCAN0TMDF171LH RSCAN0.TMDF171.UINT8[LH]
+#define RSCAN0TMDF171H RSCAN0.TMDF171.UINT16[H]
+#define RSCAN0TMDF171HL RSCAN0.TMDF171.UINT8[HL]
+#define RSCAN0TMDF171HH RSCAN0.TMDF171.UINT8[HH]
+#define RSCAN0TMID72 RSCAN0.TMID72.UINT32
+#define RSCAN0TMID72L RSCAN0.TMID72.UINT16[L]
+#define RSCAN0TMID72LL RSCAN0.TMID72.UINT8[LL]
+#define RSCAN0TMID72LH RSCAN0.TMID72.UINT8[LH]
+#define RSCAN0TMID72H RSCAN0.TMID72.UINT16[H]
+#define RSCAN0TMID72HL RSCAN0.TMID72.UINT8[HL]
+#define RSCAN0TMID72HH RSCAN0.TMID72.UINT8[HH]
+#define RSCAN0TMPTR72 RSCAN0.TMPTR72.UINT32
+#define RSCAN0TMPTR72L RSCAN0.TMPTR72.UINT16[L]
+#define RSCAN0TMPTR72LL RSCAN0.TMPTR72.UINT8[LL]
+#define RSCAN0TMPTR72LH RSCAN0.TMPTR72.UINT8[LH]
+#define RSCAN0TMPTR72H RSCAN0.TMPTR72.UINT16[H]
+#define RSCAN0TMPTR72HL RSCAN0.TMPTR72.UINT8[HL]
+#define RSCAN0TMPTR72HH RSCAN0.TMPTR72.UINT8[HH]
+#define RSCAN0TMDF072 RSCAN0.TMDF072.UINT32
+#define RSCAN0TMDF072L RSCAN0.TMDF072.UINT16[L]
+#define RSCAN0TMDF072LL RSCAN0.TMDF072.UINT8[LL]
+#define RSCAN0TMDF072LH RSCAN0.TMDF072.UINT8[LH]
+#define RSCAN0TMDF072H RSCAN0.TMDF072.UINT16[H]
+#define RSCAN0TMDF072HL RSCAN0.TMDF072.UINT8[HL]
+#define RSCAN0TMDF072HH RSCAN0.TMDF072.UINT8[HH]
+#define RSCAN0TMDF172 RSCAN0.TMDF172.UINT32
+#define RSCAN0TMDF172L RSCAN0.TMDF172.UINT16[L]
+#define RSCAN0TMDF172LL RSCAN0.TMDF172.UINT8[LL]
+#define RSCAN0TMDF172LH RSCAN0.TMDF172.UINT8[LH]
+#define RSCAN0TMDF172H RSCAN0.TMDF172.UINT16[H]
+#define RSCAN0TMDF172HL RSCAN0.TMDF172.UINT8[HL]
+#define RSCAN0TMDF172HH RSCAN0.TMDF172.UINT8[HH]
+#define RSCAN0TMID73 RSCAN0.TMID73.UINT32
+#define RSCAN0TMID73L RSCAN0.TMID73.UINT16[L]
+#define RSCAN0TMID73LL RSCAN0.TMID73.UINT8[LL]
+#define RSCAN0TMID73LH RSCAN0.TMID73.UINT8[LH]
+#define RSCAN0TMID73H RSCAN0.TMID73.UINT16[H]
+#define RSCAN0TMID73HL RSCAN0.TMID73.UINT8[HL]
+#define RSCAN0TMID73HH RSCAN0.TMID73.UINT8[HH]
+#define RSCAN0TMPTR73 RSCAN0.TMPTR73.UINT32
+#define RSCAN0TMPTR73L RSCAN0.TMPTR73.UINT16[L]
+#define RSCAN0TMPTR73LL RSCAN0.TMPTR73.UINT8[LL]
+#define RSCAN0TMPTR73LH RSCAN0.TMPTR73.UINT8[LH]
+#define RSCAN0TMPTR73H RSCAN0.TMPTR73.UINT16[H]
+#define RSCAN0TMPTR73HL RSCAN0.TMPTR73.UINT8[HL]
+#define RSCAN0TMPTR73HH RSCAN0.TMPTR73.UINT8[HH]
+#define RSCAN0TMDF073 RSCAN0.TMDF073.UINT32
+#define RSCAN0TMDF073L RSCAN0.TMDF073.UINT16[L]
+#define RSCAN0TMDF073LL RSCAN0.TMDF073.UINT8[LL]
+#define RSCAN0TMDF073LH RSCAN0.TMDF073.UINT8[LH]
+#define RSCAN0TMDF073H RSCAN0.TMDF073.UINT16[H]
+#define RSCAN0TMDF073HL RSCAN0.TMDF073.UINT8[HL]
+#define RSCAN0TMDF073HH RSCAN0.TMDF073.UINT8[HH]
+#define RSCAN0TMDF173 RSCAN0.TMDF173.UINT32
+#define RSCAN0TMDF173L RSCAN0.TMDF173.UINT16[L]
+#define RSCAN0TMDF173LL RSCAN0.TMDF173.UINT8[LL]
+#define RSCAN0TMDF173LH RSCAN0.TMDF173.UINT8[LH]
+#define RSCAN0TMDF173H RSCAN0.TMDF173.UINT16[H]
+#define RSCAN0TMDF173HL RSCAN0.TMDF173.UINT8[HL]
+#define RSCAN0TMDF173HH RSCAN0.TMDF173.UINT8[HH]
+#define RSCAN0TMID74 RSCAN0.TMID74.UINT32
+#define RSCAN0TMID74L RSCAN0.TMID74.UINT16[L]
+#define RSCAN0TMID74LL RSCAN0.TMID74.UINT8[LL]
+#define RSCAN0TMID74LH RSCAN0.TMID74.UINT8[LH]
+#define RSCAN0TMID74H RSCAN0.TMID74.UINT16[H]
+#define RSCAN0TMID74HL RSCAN0.TMID74.UINT8[HL]
+#define RSCAN0TMID74HH RSCAN0.TMID74.UINT8[HH]
+#define RSCAN0TMPTR74 RSCAN0.TMPTR74.UINT32
+#define RSCAN0TMPTR74L RSCAN0.TMPTR74.UINT16[L]
+#define RSCAN0TMPTR74LL RSCAN0.TMPTR74.UINT8[LL]
+#define RSCAN0TMPTR74LH RSCAN0.TMPTR74.UINT8[LH]
+#define RSCAN0TMPTR74H RSCAN0.TMPTR74.UINT16[H]
+#define RSCAN0TMPTR74HL RSCAN0.TMPTR74.UINT8[HL]
+#define RSCAN0TMPTR74HH RSCAN0.TMPTR74.UINT8[HH]
+#define RSCAN0TMDF074 RSCAN0.TMDF074.UINT32
+#define RSCAN0TMDF074L RSCAN0.TMDF074.UINT16[L]
+#define RSCAN0TMDF074LL RSCAN0.TMDF074.UINT8[LL]
+#define RSCAN0TMDF074LH RSCAN0.TMDF074.UINT8[LH]
+#define RSCAN0TMDF074H RSCAN0.TMDF074.UINT16[H]
+#define RSCAN0TMDF074HL RSCAN0.TMDF074.UINT8[HL]
+#define RSCAN0TMDF074HH RSCAN0.TMDF074.UINT8[HH]
+#define RSCAN0TMDF174 RSCAN0.TMDF174.UINT32
+#define RSCAN0TMDF174L RSCAN0.TMDF174.UINT16[L]
+#define RSCAN0TMDF174LL RSCAN0.TMDF174.UINT8[LL]
+#define RSCAN0TMDF174LH RSCAN0.TMDF174.UINT8[LH]
+#define RSCAN0TMDF174H RSCAN0.TMDF174.UINT16[H]
+#define RSCAN0TMDF174HL RSCAN0.TMDF174.UINT8[HL]
+#define RSCAN0TMDF174HH RSCAN0.TMDF174.UINT8[HH]
+#define RSCAN0TMID75 RSCAN0.TMID75.UINT32
+#define RSCAN0TMID75L RSCAN0.TMID75.UINT16[L]
+#define RSCAN0TMID75LL RSCAN0.TMID75.UINT8[LL]
+#define RSCAN0TMID75LH RSCAN0.TMID75.UINT8[LH]
+#define RSCAN0TMID75H RSCAN0.TMID75.UINT16[H]
+#define RSCAN0TMID75HL RSCAN0.TMID75.UINT8[HL]
+#define RSCAN0TMID75HH RSCAN0.TMID75.UINT8[HH]
+#define RSCAN0TMPTR75 RSCAN0.TMPTR75.UINT32
+#define RSCAN0TMPTR75L RSCAN0.TMPTR75.UINT16[L]
+#define RSCAN0TMPTR75LL RSCAN0.TMPTR75.UINT8[LL]
+#define RSCAN0TMPTR75LH RSCAN0.TMPTR75.UINT8[LH]
+#define RSCAN0TMPTR75H RSCAN0.TMPTR75.UINT16[H]
+#define RSCAN0TMPTR75HL RSCAN0.TMPTR75.UINT8[HL]
+#define RSCAN0TMPTR75HH RSCAN0.TMPTR75.UINT8[HH]
+#define RSCAN0TMDF075 RSCAN0.TMDF075.UINT32
+#define RSCAN0TMDF075L RSCAN0.TMDF075.UINT16[L]
+#define RSCAN0TMDF075LL RSCAN0.TMDF075.UINT8[LL]
+#define RSCAN0TMDF075LH RSCAN0.TMDF075.UINT8[LH]
+#define RSCAN0TMDF075H RSCAN0.TMDF075.UINT16[H]
+#define RSCAN0TMDF075HL RSCAN0.TMDF075.UINT8[HL]
+#define RSCAN0TMDF075HH RSCAN0.TMDF075.UINT8[HH]
+#define RSCAN0TMDF175 RSCAN0.TMDF175.UINT32
+#define RSCAN0TMDF175L RSCAN0.TMDF175.UINT16[L]
+#define RSCAN0TMDF175LL RSCAN0.TMDF175.UINT8[LL]
+#define RSCAN0TMDF175LH RSCAN0.TMDF175.UINT8[LH]
+#define RSCAN0TMDF175H RSCAN0.TMDF175.UINT16[H]
+#define RSCAN0TMDF175HL RSCAN0.TMDF175.UINT8[HL]
+#define RSCAN0TMDF175HH RSCAN0.TMDF175.UINT8[HH]
+#define RSCAN0TMID76 RSCAN0.TMID76.UINT32
+#define RSCAN0TMID76L RSCAN0.TMID76.UINT16[L]
+#define RSCAN0TMID76LL RSCAN0.TMID76.UINT8[LL]
+#define RSCAN0TMID76LH RSCAN0.TMID76.UINT8[LH]
+#define RSCAN0TMID76H RSCAN0.TMID76.UINT16[H]
+#define RSCAN0TMID76HL RSCAN0.TMID76.UINT8[HL]
+#define RSCAN0TMID76HH RSCAN0.TMID76.UINT8[HH]
+#define RSCAN0TMPTR76 RSCAN0.TMPTR76.UINT32
+#define RSCAN0TMPTR76L RSCAN0.TMPTR76.UINT16[L]
+#define RSCAN0TMPTR76LL RSCAN0.TMPTR76.UINT8[LL]
+#define RSCAN0TMPTR76LH RSCAN0.TMPTR76.UINT8[LH]
+#define RSCAN0TMPTR76H RSCAN0.TMPTR76.UINT16[H]
+#define RSCAN0TMPTR76HL RSCAN0.TMPTR76.UINT8[HL]
+#define RSCAN0TMPTR76HH RSCAN0.TMPTR76.UINT8[HH]
+#define RSCAN0TMDF076 RSCAN0.TMDF076.UINT32
+#define RSCAN0TMDF076L RSCAN0.TMDF076.UINT16[L]
+#define RSCAN0TMDF076LL RSCAN0.TMDF076.UINT8[LL]
+#define RSCAN0TMDF076LH RSCAN0.TMDF076.UINT8[LH]
+#define RSCAN0TMDF076H RSCAN0.TMDF076.UINT16[H]
+#define RSCAN0TMDF076HL RSCAN0.TMDF076.UINT8[HL]
+#define RSCAN0TMDF076HH RSCAN0.TMDF076.UINT8[HH]
+#define RSCAN0TMDF176 RSCAN0.TMDF176.UINT32
+#define RSCAN0TMDF176L RSCAN0.TMDF176.UINT16[L]
+#define RSCAN0TMDF176LL RSCAN0.TMDF176.UINT8[LL]
+#define RSCAN0TMDF176LH RSCAN0.TMDF176.UINT8[LH]
+#define RSCAN0TMDF176H RSCAN0.TMDF176.UINT16[H]
+#define RSCAN0TMDF176HL RSCAN0.TMDF176.UINT8[HL]
+#define RSCAN0TMDF176HH RSCAN0.TMDF176.UINT8[HH]
+#define RSCAN0TMID77 RSCAN0.TMID77.UINT32
+#define RSCAN0TMID77L RSCAN0.TMID77.UINT16[L]
+#define RSCAN0TMID77LL RSCAN0.TMID77.UINT8[LL]
+#define RSCAN0TMID77LH RSCAN0.TMID77.UINT8[LH]
+#define RSCAN0TMID77H RSCAN0.TMID77.UINT16[H]
+#define RSCAN0TMID77HL RSCAN0.TMID77.UINT8[HL]
+#define RSCAN0TMID77HH RSCAN0.TMID77.UINT8[HH]
+#define RSCAN0TMPTR77 RSCAN0.TMPTR77.UINT32
+#define RSCAN0TMPTR77L RSCAN0.TMPTR77.UINT16[L]
+#define RSCAN0TMPTR77LL RSCAN0.TMPTR77.UINT8[LL]
+#define RSCAN0TMPTR77LH RSCAN0.TMPTR77.UINT8[LH]
+#define RSCAN0TMPTR77H RSCAN0.TMPTR77.UINT16[H]
+#define RSCAN0TMPTR77HL RSCAN0.TMPTR77.UINT8[HL]
+#define RSCAN0TMPTR77HH RSCAN0.TMPTR77.UINT8[HH]
+#define RSCAN0TMDF077 RSCAN0.TMDF077.UINT32
+#define RSCAN0TMDF077L RSCAN0.TMDF077.UINT16[L]
+#define RSCAN0TMDF077LL RSCAN0.TMDF077.UINT8[LL]
+#define RSCAN0TMDF077LH RSCAN0.TMDF077.UINT8[LH]
+#define RSCAN0TMDF077H RSCAN0.TMDF077.UINT16[H]
+#define RSCAN0TMDF077HL RSCAN0.TMDF077.UINT8[HL]
+#define RSCAN0TMDF077HH RSCAN0.TMDF077.UINT8[HH]
+#define RSCAN0TMDF177 RSCAN0.TMDF177.UINT32
+#define RSCAN0TMDF177L RSCAN0.TMDF177.UINT16[L]
+#define RSCAN0TMDF177LL RSCAN0.TMDF177.UINT8[LL]
+#define RSCAN0TMDF177LH RSCAN0.TMDF177.UINT8[LH]
+#define RSCAN0TMDF177H RSCAN0.TMDF177.UINT16[H]
+#define RSCAN0TMDF177HL RSCAN0.TMDF177.UINT8[HL]
+#define RSCAN0TMDF177HH RSCAN0.TMDF177.UINT8[HH]
+#define RSCAN0TMID78 RSCAN0.TMID78.UINT32
+#define RSCAN0TMID78L RSCAN0.TMID78.UINT16[L]
+#define RSCAN0TMID78LL RSCAN0.TMID78.UINT8[LL]
+#define RSCAN0TMID78LH RSCAN0.TMID78.UINT8[LH]
+#define RSCAN0TMID78H RSCAN0.TMID78.UINT16[H]
+#define RSCAN0TMID78HL RSCAN0.TMID78.UINT8[HL]
+#define RSCAN0TMID78HH RSCAN0.TMID78.UINT8[HH]
+#define RSCAN0TMPTR78 RSCAN0.TMPTR78.UINT32
+#define RSCAN0TMPTR78L RSCAN0.TMPTR78.UINT16[L]
+#define RSCAN0TMPTR78LL RSCAN0.TMPTR78.UINT8[LL]
+#define RSCAN0TMPTR78LH RSCAN0.TMPTR78.UINT8[LH]
+#define RSCAN0TMPTR78H RSCAN0.TMPTR78.UINT16[H]
+#define RSCAN0TMPTR78HL RSCAN0.TMPTR78.UINT8[HL]
+#define RSCAN0TMPTR78HH RSCAN0.TMPTR78.UINT8[HH]
+#define RSCAN0TMDF078 RSCAN0.TMDF078.UINT32
+#define RSCAN0TMDF078L RSCAN0.TMDF078.UINT16[L]
+#define RSCAN0TMDF078LL RSCAN0.TMDF078.UINT8[LL]
+#define RSCAN0TMDF078LH RSCAN0.TMDF078.UINT8[LH]
+#define RSCAN0TMDF078H RSCAN0.TMDF078.UINT16[H]
+#define RSCAN0TMDF078HL RSCAN0.TMDF078.UINT8[HL]
+#define RSCAN0TMDF078HH RSCAN0.TMDF078.UINT8[HH]
+#define RSCAN0TMDF178 RSCAN0.TMDF178.UINT32
+#define RSCAN0TMDF178L RSCAN0.TMDF178.UINT16[L]
+#define RSCAN0TMDF178LL RSCAN0.TMDF178.UINT8[LL]
+#define RSCAN0TMDF178LH RSCAN0.TMDF178.UINT8[LH]
+#define RSCAN0TMDF178H RSCAN0.TMDF178.UINT16[H]
+#define RSCAN0TMDF178HL RSCAN0.TMDF178.UINT8[HL]
+#define RSCAN0TMDF178HH RSCAN0.TMDF178.UINT8[HH]
+#define RSCAN0TMID79 RSCAN0.TMID79.UINT32
+#define RSCAN0TMID79L RSCAN0.TMID79.UINT16[L]
+#define RSCAN0TMID79LL RSCAN0.TMID79.UINT8[LL]
+#define RSCAN0TMID79LH RSCAN0.TMID79.UINT8[LH]
+#define RSCAN0TMID79H RSCAN0.TMID79.UINT16[H]
+#define RSCAN0TMID79HL RSCAN0.TMID79.UINT8[HL]
+#define RSCAN0TMID79HH RSCAN0.TMID79.UINT8[HH]
+#define RSCAN0TMPTR79 RSCAN0.TMPTR79.UINT32
+#define RSCAN0TMPTR79L RSCAN0.TMPTR79.UINT16[L]
+#define RSCAN0TMPTR79LL RSCAN0.TMPTR79.UINT8[LL]
+#define RSCAN0TMPTR79LH RSCAN0.TMPTR79.UINT8[LH]
+#define RSCAN0TMPTR79H RSCAN0.TMPTR79.UINT16[H]
+#define RSCAN0TMPTR79HL RSCAN0.TMPTR79.UINT8[HL]
+#define RSCAN0TMPTR79HH RSCAN0.TMPTR79.UINT8[HH]
+#define RSCAN0TMDF079 RSCAN0.TMDF079.UINT32
+#define RSCAN0TMDF079L RSCAN0.TMDF079.UINT16[L]
+#define RSCAN0TMDF079LL RSCAN0.TMDF079.UINT8[LL]
+#define RSCAN0TMDF079LH RSCAN0.TMDF079.UINT8[LH]
+#define RSCAN0TMDF079H RSCAN0.TMDF079.UINT16[H]
+#define RSCAN0TMDF079HL RSCAN0.TMDF079.UINT8[HL]
+#define RSCAN0TMDF079HH RSCAN0.TMDF079.UINT8[HH]
+#define RSCAN0TMDF179 RSCAN0.TMDF179.UINT32
+#define RSCAN0TMDF179L RSCAN0.TMDF179.UINT16[L]
+#define RSCAN0TMDF179LL RSCAN0.TMDF179.UINT8[LL]
+#define RSCAN0TMDF179LH RSCAN0.TMDF179.UINT8[LH]
+#define RSCAN0TMDF179H RSCAN0.TMDF179.UINT16[H]
+#define RSCAN0TMDF179HL RSCAN0.TMDF179.UINT8[HL]
+#define RSCAN0TMDF179HH RSCAN0.TMDF179.UINT8[HH]
+#define RSCAN0THLACC0 RSCAN0.THLACC0.UINT32
+#define RSCAN0THLACC0L RSCAN0.THLACC0.UINT16[L]
+#define RSCAN0THLACC0LL RSCAN0.THLACC0.UINT8[LL]
+#define RSCAN0THLACC0LH RSCAN0.THLACC0.UINT8[LH]
+#define RSCAN0THLACC0H RSCAN0.THLACC0.UINT16[H]
+#define RSCAN0THLACC0HL RSCAN0.THLACC0.UINT8[HL]
+#define RSCAN0THLACC0HH RSCAN0.THLACC0.UINT8[HH]
+#define RSCAN0THLACC1 RSCAN0.THLACC1.UINT32
+#define RSCAN0THLACC1L RSCAN0.THLACC1.UINT16[L]
+#define RSCAN0THLACC1LL RSCAN0.THLACC1.UINT8[LL]
+#define RSCAN0THLACC1LH RSCAN0.THLACC1.UINT8[LH]
+#define RSCAN0THLACC1H RSCAN0.THLACC1.UINT16[H]
+#define RSCAN0THLACC1HL RSCAN0.THLACC1.UINT8[HL]
+#define RSCAN0THLACC1HH RSCAN0.THLACC1.UINT8[HH]
+#define RSCAN0THLACC2 RSCAN0.THLACC2.UINT32
+#define RSCAN0THLACC2L RSCAN0.THLACC2.UINT16[L]
+#define RSCAN0THLACC2LL RSCAN0.THLACC2.UINT8[LL]
+#define RSCAN0THLACC2LH RSCAN0.THLACC2.UINT8[LH]
+#define RSCAN0THLACC2H RSCAN0.THLACC2.UINT16[H]
+#define RSCAN0THLACC2HL RSCAN0.THLACC2.UINT8[HL]
+#define RSCAN0THLACC2HH RSCAN0.THLACC2.UINT8[HH]
+#define RSCAN0THLACC3 RSCAN0.THLACC3.UINT32
+#define RSCAN0THLACC3L RSCAN0.THLACC3.UINT16[L]
+#define RSCAN0THLACC3LL RSCAN0.THLACC3.UINT8[LL]
+#define RSCAN0THLACC3LH RSCAN0.THLACC3.UINT8[LH]
+#define RSCAN0THLACC3H RSCAN0.THLACC3.UINT16[H]
+#define RSCAN0THLACC3HL RSCAN0.THLACC3.UINT8[HL]
+#define RSCAN0THLACC3HH RSCAN0.THLACC3.UINT8[HH]
+#define RSCAN0THLACC4 RSCAN0.THLACC4.UINT32
+#define RSCAN0THLACC4L RSCAN0.THLACC4.UINT16[L]
+#define RSCAN0THLACC4LL RSCAN0.THLACC4.UINT8[LL]
+#define RSCAN0THLACC4LH RSCAN0.THLACC4.UINT8[LH]
+#define RSCAN0THLACC4H RSCAN0.THLACC4.UINT16[H]
+#define RSCAN0THLACC4HL RSCAN0.THLACC4.UINT8[HL]
+#define RSCAN0THLACC4HH RSCAN0.THLACC4.UINT8[HH]
+/* <-SEC M1.10.1 */
+/* <-QAC 0857 */
+/* <-QAC 0639 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/rspi_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/rspi_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/rspi_iodefine.h	(revision 270)
@@ -0,0 +1,204 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : rspi_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef RSPI_IODEFINE_H
+#define RSPI_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+#include "reg32_t.h"
+
+struct st_rspi
+{                                                          /* RSPI             */
+    volatile uint8_t   SPCR;                                   /*  SPCR            */
+    volatile uint8_t   SSLP;                                   /*  SSLP            */
+    volatile uint8_t   SPPCR;                                  /*  SPPCR           */
+    volatile uint8_t   SPSR;                                   /*  SPSR            */
+    union reg32_t  SPDR;                          /*  SPDR            */
+    
+    volatile uint8_t   SPSCR;                                  /*  SPSCR           */
+    volatile uint8_t   SPSSR;                                  /*  SPSSR           */
+    volatile uint8_t   SPBR;                                   /*  SPBR            */
+    volatile uint8_t   SPDCR;                                  /*  SPDCR           */
+    volatile uint8_t   SPCKD;                                  /*  SPCKD           */
+    volatile uint8_t   SSLND;                                  /*  SSLND           */
+    volatile uint8_t   SPND;                                   /*  SPND            */
+    volatile uint8_t   dummy1[1];                              /*                  */
+#define SPCMD_COUNT 4
+    volatile uint16_t SPCMD0;                                 /*  SPCMD0          */
+    volatile uint16_t SPCMD1;                                 /*  SPCMD1          */
+    volatile uint16_t SPCMD2;                                 /*  SPCMD2          */
+    volatile uint16_t SPCMD3;                                 /*  SPCMD3          */
+    volatile uint8_t   dummy2[8];                              /*                  */
+    volatile uint8_t   SPBFCR;                                 /*  SPBFCR          */
+    volatile uint8_t   dummy3[1];                              /*                  */
+    volatile uint16_t SPBFDR;                                 /*  SPBFDR          */
+};
+
+
+#define RSPI0   (*(struct st_rspi    *)0xE800C800uL) /* RSPI0 */
+#define RSPI1   (*(struct st_rspi    *)0xE800D000uL) /* RSPI1 */
+#define RSPI2   (*(struct st_rspi    *)0xE800D800uL) /* RSPI2 */
+#define RSPI3   (*(struct st_rspi    *)0xE800E000uL) /* RSPI3 */
+#define RSPI4   (*(struct st_rspi    *)0xE800E800uL) /* RSPI4 */
+
+
+/* Start of channnel array defines of RSPI */
+
+/* Channnel array defines of RSPI */
+/*(Sample) value = RSPI[ channel ]->SPCR; */
+#define RSPI_COUNT  5
+#define RSPI_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &RSPI0, &RSPI1, &RSPI2, &RSPI3, &RSPI4 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+
+/* End of channnel array defines of RSPI */
+
+
+#define SPCR_0 RSPI0.SPCR
+#define SSLP_0 RSPI0.SSLP
+#define SPPCR_0 RSPI0.SPPCR
+#define SPSR_0 RSPI0.SPSR
+#define SPDR_0   RSPI0.SPDR.UINT32
+#define SPDR_0L  RSPI0.SPDR.UINT16[L]
+#define SPDR_0H  RSPI0.SPDR.UINT16[H]
+#define SPDR_0LL RSPI0.SPDR.UINT8[LL]
+#define SPDR_0LH RSPI0.SPDR.UINT8[LH]
+#define SPDR_0HL RSPI0.SPDR.UINT8[HL]
+#define SPDR_0HH RSPI0.SPDR.UINT8[HH]
+#define SPSCR_0 RSPI0.SPSCR
+#define SPSSR_0 RSPI0.SPSSR
+#define SPBR_0 RSPI0.SPBR
+#define SPDCR_0 RSPI0.SPDCR
+#define SPCKD_0 RSPI0.SPCKD
+#define SSLND_0 RSPI0.SSLND
+#define SPND_0 RSPI0.SPND
+#define SPCMD0_0 RSPI0.SPCMD0
+#define SPCMD1_0 RSPI0.SPCMD1
+#define SPCMD2_0 RSPI0.SPCMD2
+#define SPCMD3_0 RSPI0.SPCMD3
+#define SPBFCR_0 RSPI0.SPBFCR
+#define SPBFDR_0 RSPI0.SPBFDR
+#define SPCR_1 RSPI1.SPCR
+#define SSLP_1 RSPI1.SSLP
+#define SPPCR_1 RSPI1.SPPCR
+#define SPSR_1 RSPI1.SPSR
+#define SPDR_1   RSPI1.SPDR.UINT32
+#define SPDR_1L  RSPI1.SPDR.UINT16[L]
+#define SPDR_1H  RSPI1.SPDR.UINT16[H]
+#define SPDR_1LL RSPI1.SPDR.UINT8[LL]
+#define SPDR_1LH RSPI1.SPDR.UINT8[LH]
+#define SPDR_1HL RSPI1.SPDR.UINT8[HL]
+#define SPDR_1HH RSPI1.SPDR.UINT8[HH]
+#define SPSCR_1 RSPI1.SPSCR
+#define SPSSR_1 RSPI1.SPSSR
+#define SPBR_1 RSPI1.SPBR
+#define SPDCR_1 RSPI1.SPDCR
+#define SPCKD_1 RSPI1.SPCKD
+#define SSLND_1 RSPI1.SSLND
+#define SPND_1 RSPI1.SPND
+#define SPCMD0_1 RSPI1.SPCMD0
+#define SPCMD1_1 RSPI1.SPCMD1
+#define SPCMD2_1 RSPI1.SPCMD2
+#define SPCMD3_1 RSPI1.SPCMD3
+#define SPBFCR_1 RSPI1.SPBFCR
+#define SPBFDR_1 RSPI1.SPBFDR
+#define SPCR_2 RSPI2.SPCR
+#define SSLP_2 RSPI2.SSLP
+#define SPPCR_2 RSPI2.SPPCR
+#define SPSR_2 RSPI2.SPSR
+#define SPDR_2   RSPI2.SPDR.UINT32
+#define SPDR_2L  RSPI2.SPDR.UINT16[L]
+#define SPDR_2H  RSPI2.SPDR.UINT16[H]
+#define SPDR_2LL RSPI2.SPDR.UINT8[LL]
+#define SPDR_2LH RSPI2.SPDR.UINT8[LH]
+#define SPDR_2HL RSPI2.SPDR.UINT8[HL]
+#define SPDR_2HH RSPI2.SPDR.UINT8[HH]
+#define SPSCR_2 RSPI2.SPSCR
+#define SPSSR_2 RSPI2.SPSSR
+#define SPBR_2 RSPI2.SPBR
+#define SPDCR_2 RSPI2.SPDCR
+#define SPCKD_2 RSPI2.SPCKD
+#define SSLND_2 RSPI2.SSLND
+#define SPND_2 RSPI2.SPND
+#define SPCMD0_2 RSPI2.SPCMD0
+#define SPCMD1_2 RSPI2.SPCMD1
+#define SPCMD2_2 RSPI2.SPCMD2
+#define SPCMD3_2 RSPI2.SPCMD3
+#define SPBFCR_2 RSPI2.SPBFCR
+#define SPBFDR_2 RSPI2.SPBFDR
+#define SPCR_3 RSPI3.SPCR
+#define SSLP_3 RSPI3.SSLP
+#define SPPCR_3 RSPI3.SPPCR
+#define SPSR_3 RSPI3.SPSR
+#define SPDR_3   RSPI3.SPDR.UINT32
+#define SPDR_3L  RSPI3.SPDR.UINT16[L]
+#define SPDR_3H  RSPI3.SPDR.UINT16[H]
+#define SPDR_3LL RSPI3.SPDR.UINT8[LL]
+#define SPDR_3LH RSPI3.SPDR.UINT8[LH]
+#define SPDR_3HL RSPI3.SPDR.UINT8[HL]
+#define SPDR_3HH RSPI3.SPDR.UINT8[HH]
+#define SPSCR_3 RSPI3.SPSCR
+#define SPSSR_3 RSPI3.SPSSR
+#define SPBR_3 RSPI3.SPBR
+#define SPDCR_3 RSPI3.SPDCR
+#define SPCKD_3 RSPI3.SPCKD
+#define SSLND_3 RSPI3.SSLND
+#define SPND_3 RSPI3.SPND
+#define SPCMD0_3 RSPI3.SPCMD0
+#define SPCMD1_3 RSPI3.SPCMD1
+#define SPCMD2_3 RSPI3.SPCMD2
+#define SPCMD3_3 RSPI3.SPCMD3
+#define SPBFCR_3 RSPI3.SPBFCR
+#define SPBFDR_3 RSPI3.SPBFDR
+#define SPCR_4 RSPI4.SPCR
+#define SSLP_4 RSPI4.SSLP
+#define SPPCR_4 RSPI4.SPPCR
+#define SPSR_4 RSPI4.SPSR
+#define SPDR_4   RSPI4.SPDR.UINT32
+#define SPDR_4L  RSPI4.SPDR.UINT16[L]
+#define SPDR_4H  RSPI4.SPDR.UINT16[H]
+#define SPDR_4LL RSPI4.SPDR.UINT8[LL]
+#define SPDR_4LH RSPI4.SPDR.UINT8[LH]
+#define SPDR_4HL RSPI4.SPDR.UINT8[HL]
+#define SPDR_4HH RSPI4.SPDR.UINT8[HH]
+#define SPSCR_4 RSPI4.SPSCR
+#define SPSSR_4 RSPI4.SPSSR
+#define SPBR_4 RSPI4.SPBR
+#define SPDCR_4 RSPI4.SPDCR
+#define SPCKD_4 RSPI4.SPCKD
+#define SSLND_4 RSPI4.SSLND
+#define SPND_4 RSPI4.SPND
+#define SPCMD0_4 RSPI4.SPCMD0
+#define SPCMD1_4 RSPI4.SPCMD1
+#define SPCMD2_4 RSPI4.SPCMD2
+#define SPCMD3_4 RSPI4.SPCMD3
+#define SPBFCR_4 RSPI4.SPBFCR
+#define SPBFDR_4 RSPI4.SPBFDR
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/rtc_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/rtc_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/rtc_iodefine.h	(revision 270)
@@ -0,0 +1,102 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : rtc_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef RTC_IODEFINE_H
+#define RTC_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_rtc
+{                                                          /* RTC              */
+    volatile uint8_t   R64CNT;                                 /*  R64CNT          */
+    volatile uint8_t   dummy537[1];                            /*                  */
+    volatile uint8_t   RSECCNT;                                /*  RSECCNT         */
+    volatile uint8_t   dummy538[1];                            /*                  */
+    volatile uint8_t   RMINCNT;                                /*  RMINCNT         */
+    volatile uint8_t   dummy539[1];                            /*                  */
+    volatile uint8_t   RHRCNT;                                 /*  RHRCNT          */
+    volatile uint8_t   dummy540[1];                            /*                  */
+    volatile uint8_t   RWKCNT;                                 /*  RWKCNT          */
+    volatile uint8_t   dummy541[1];                            /*                  */
+    volatile uint8_t   RDAYCNT;                                /*  RDAYCNT         */
+    volatile uint8_t   dummy542[1];                            /*                  */
+    volatile uint8_t   RMONCNT;                                /*  RMONCNT         */
+    volatile uint8_t   dummy543[1];                            /*                  */
+    volatile uint16_t RYRCNT;                                 /*  RYRCNT          */
+    volatile uint8_t   RSECAR;                                 /*  RSECAR          */
+    volatile uint8_t   dummy544[1];                            /*                  */
+    volatile uint8_t   RMINAR;                                 /*  RMINAR          */
+    volatile uint8_t   dummy545[1];                            /*                  */
+    volatile uint8_t   RHRAR;                                  /*  RHRAR           */
+    volatile uint8_t   dummy546[1];                            /*                  */
+    volatile uint8_t   RWKAR;                                  /*  RWKAR           */
+    volatile uint8_t   dummy547[1];                            /*                  */
+    volatile uint8_t   RDAYAR;                                 /*  RDAYAR          */
+    volatile uint8_t   dummy548[1];                            /*                  */
+    volatile uint8_t   RMONAR;                                 /*  RMONAR          */
+    volatile uint8_t   dummy549[1];                            /*                  */
+    volatile uint8_t   RCR1;                                   /*  RCR1            */
+    volatile uint8_t   dummy550[1];                            /*                  */
+    volatile uint8_t   RCR2;                                   /*  RCR2            */
+    volatile uint8_t   dummy551[1];                            /*                  */
+    volatile uint16_t RYRAR;                                  /*  RYRAR           */
+    volatile uint8_t   dummy552[2];                            /*                  */
+    volatile uint8_t   RCR3;                                   /*  RCR3            */
+    volatile uint8_t   dummy553[1];                            /*                  */
+    volatile uint8_t   RCR5;                                   /*  RCR5            */
+    volatile uint8_t   dummy554[3];                            /*                  */
+    volatile uint16_t RFRH;                                   /*  RFRH            */
+    volatile uint16_t RFRL;                                   /*  RFRL            */
+};
+
+
+#define RTC     (*(struct st_rtc     *)0xFCFF1000uL) /* RTC */
+
+
+#define RTCR64CNT RTC.R64CNT
+#define RTCRSECCNT RTC.RSECCNT
+#define RTCRMINCNT RTC.RMINCNT
+#define RTCRHRCNT RTC.RHRCNT
+#define RTCRWKCNT RTC.RWKCNT
+#define RTCRDAYCNT RTC.RDAYCNT
+#define RTCRMONCNT RTC.RMONCNT
+#define RTCRYRCNT RTC.RYRCNT
+#define RTCRSECAR RTC.RSECAR
+#define RTCRMINAR RTC.RMINAR
+#define RTCRHRAR RTC.RHRAR
+#define RTCRWKAR RTC.RWKAR
+#define RTCRDAYAR RTC.RDAYAR
+#define RTCRMONAR RTC.RMONAR
+#define RTCRCR1 RTC.RCR1
+#define RTCRCR2 RTC.RCR2
+#define RTCRYRAR RTC.RYRAR
+#define RTCRCR3 RTC.RCR3
+#define RTCRCR5 RTC.RCR5
+#define RTCRFRH RTC.RFRH
+#define RTCRFRL RTC.RFRL
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/scif_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/scif_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/scif_iodefine.h	(revision 270)
@@ -0,0 +1,182 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : scif_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef SCIF_IODEFINE_H
+#define SCIF_IODEFINE_H
+/* ->QAC 0857 : Over 1024 #define (C90) */
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_scif
+{                                                          /* SCIF             */
+    volatile uint16_t SCSMR;                                  /*  SCSMR           */
+    volatile uint8_t   dummy1[2];                              /*                  */
+    volatile uint8_t   SCBRR;                                  /*  SCBRR           */
+    volatile uint8_t   dummy2[3];                              /*                  */
+    volatile uint16_t SCSCR;                                  /*  SCSCR           */
+    volatile uint8_t   dummy3[2];                              /*                  */
+    volatile uint8_t   SCFTDR;                                 /*  SCFTDR          */
+    volatile uint8_t   dummy4[3];                              /*                  */
+    volatile uint16_t SCFSR;                                  /*  SCFSR           */
+    volatile uint8_t   dummy5[2];                              /*                  */
+    volatile uint8_t   SCFRDR;                                 /*  SCFRDR          */
+    volatile uint8_t   dummy6[3];                              /*                  */
+    volatile uint16_t SCFCR;                                  /*  SCFCR           */
+    volatile uint8_t   dummy7[2];                              /*                  */
+    volatile uint16_t SCFDR;                                  /*  SCFDR           */
+    volatile uint8_t   dummy8[2];                              /*                  */
+    volatile uint16_t SCSPTR;                                 /*  SCSPTR          */
+    volatile uint8_t   dummy9[2];                              /*                  */
+    volatile uint16_t SCLSR;                                  /*  SCLSR           */
+    volatile uint8_t   dummy10[2];                             /*                  */
+    volatile uint16_t SCEMR;                                  /*  SCEMR           */
+};
+
+
+#define SCIF0   (*(struct st_scif    *)0xE8007000uL) /* SCIF0 */
+#define SCIF1   (*(struct st_scif    *)0xE8007800uL) /* SCIF1 */
+#define SCIF2   (*(struct st_scif    *)0xE8008000uL) /* SCIF2 */
+#define SCIF3   (*(struct st_scif    *)0xE8008800uL) /* SCIF3 */
+#define SCIF4   (*(struct st_scif    *)0xE8009000uL) /* SCIF4 */
+#define SCIF5   (*(struct st_scif    *)0xE8009800uL) /* SCIF5 */
+#define SCIF6   (*(struct st_scif    *)0xE800A000uL) /* SCIF6 */
+#define SCIF7   (*(struct st_scif    *)0xE800A800uL) /* SCIF7 */
+
+#define P_SCIF0   (0xE8007000uL) /* SCIF0 */
+#define P_SCIF1   (0xE8007800uL) /* SCIF1 */
+#define P_SCIF2   (0xE8008000uL) /* SCIF2 */
+#define P_SCIF3   (0xE8008800uL) /* SCIF3 */
+#define P_SCIF4   (0xE8009000uL) /* SCIF4 */
+#define P_SCIF5   (0xE8009800uL) /* SCIF5 */
+#define P_SCIF6   (0xE800A000uL) /* SCIF6 */
+#define P_SCIF7   (0xE800A800uL) /* SCIF7 */
+
+
+/* Start of channnel array defines of SCIF */
+
+/* Channnel array defines of SCIF */
+/*(Sample) value = SCIF[ channel ]->SCSMR; */
+#define SCIF_COUNT  8
+#define SCIF_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &SCIF0, &SCIF1, &SCIF2, &SCIF3, &SCIF4, &SCIF5, &SCIF6, &SCIF7 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+
+/* End of channnel array defines of SCIF */
+
+
+#define SCSMR_0 SCIF0.SCSMR
+#define SCBRR_0 SCIF0.SCBRR
+#define SCSCR_0 SCIF0.SCSCR
+#define SCFTDR_0 SCIF0.SCFTDR
+#define SCFSR_0 SCIF0.SCFSR
+#define SCFRDR_0 SCIF0.SCFRDR
+#define SCFCR_0 SCIF0.SCFCR
+#define SCFDR_0 SCIF0.SCFDR
+#define SCSPTR_0 SCIF0.SCSPTR
+#define SCLSR_0 SCIF0.SCLSR
+#define SCEMR_0 SCIF0.SCEMR
+#define SCSMR_1 SCIF1.SCSMR
+#define SCBRR_1 SCIF1.SCBRR
+#define SCSCR_1 SCIF1.SCSCR
+#define SCFTDR_1 SCIF1.SCFTDR
+#define SCFSR_1 SCIF1.SCFSR
+#define SCFRDR_1 SCIF1.SCFRDR
+#define SCFCR_1 SCIF1.SCFCR
+#define SCFDR_1 SCIF1.SCFDR
+#define SCSPTR_1 SCIF1.SCSPTR
+#define SCLSR_1 SCIF1.SCLSR
+#define SCEMR_1 SCIF1.SCEMR
+#define SCSMR_2 SCIF2.SCSMR
+#define SCBRR_2 SCIF2.SCBRR
+#define SCSCR_2 SCIF2.SCSCR
+#define SCFTDR_2 SCIF2.SCFTDR
+#define SCFSR_2 SCIF2.SCFSR
+#define SCFRDR_2 SCIF2.SCFRDR
+#define SCFCR_2 SCIF2.SCFCR
+#define SCFDR_2 SCIF2.SCFDR
+#define SCSPTR_2 SCIF2.SCSPTR
+#define SCLSR_2 SCIF2.SCLSR
+#define SCEMR_2 SCIF2.SCEMR
+#define SCSMR_3 SCIF3.SCSMR
+#define SCBRR_3 SCIF3.SCBRR
+#define SCSCR_3 SCIF3.SCSCR
+#define SCFTDR_3 SCIF3.SCFTDR
+#define SCFSR_3 SCIF3.SCFSR
+#define SCFRDR_3 SCIF3.SCFRDR
+#define SCFCR_3 SCIF3.SCFCR
+#define SCFDR_3 SCIF3.SCFDR
+#define SCSPTR_3 SCIF3.SCSPTR
+#define SCLSR_3 SCIF3.SCLSR
+#define SCEMR_3 SCIF3.SCEMR
+#define SCSMR_4 SCIF4.SCSMR
+#define SCBRR_4 SCIF4.SCBRR
+#define SCSCR_4 SCIF4.SCSCR
+#define SCFTDR_4 SCIF4.SCFTDR
+#define SCFSR_4 SCIF4.SCFSR
+#define SCFRDR_4 SCIF4.SCFRDR
+#define SCFCR_4 SCIF4.SCFCR
+#define SCFDR_4 SCIF4.SCFDR
+#define SCSPTR_4 SCIF4.SCSPTR
+#define SCLSR_4 SCIF4.SCLSR
+#define SCEMR_4 SCIF4.SCEMR
+#define SCSMR_5 SCIF5.SCSMR
+#define SCBRR_5 SCIF5.SCBRR
+#define SCSCR_5 SCIF5.SCSCR
+#define SCFTDR_5 SCIF5.SCFTDR
+#define SCFSR_5 SCIF5.SCFSR
+#define SCFRDR_5 SCIF5.SCFRDR
+#define SCFCR_5 SCIF5.SCFCR
+#define SCFDR_5 SCIF5.SCFDR
+#define SCSPTR_5 SCIF5.SCSPTR
+#define SCLSR_5 SCIF5.SCLSR
+#define SCEMR_5 SCIF5.SCEMR
+#define SCSMR_6 SCIF6.SCSMR
+#define SCBRR_6 SCIF6.SCBRR
+#define SCSCR_6 SCIF6.SCSCR
+#define SCFTDR_6 SCIF6.SCFTDR
+#define SCFSR_6 SCIF6.SCFSR
+#define SCFRDR_6 SCIF6.SCFRDR
+#define SCFCR_6 SCIF6.SCFCR
+#define SCFDR_6 SCIF6.SCFDR
+#define SCSPTR_6 SCIF6.SCSPTR
+#define SCLSR_6 SCIF6.SCLSR
+#define SCEMR_6 SCIF6.SCEMR
+#define SCSMR_7 SCIF7.SCSMR
+#define SCBRR_7 SCIF7.SCBRR
+#define SCSCR_7 SCIF7.SCSCR
+#define SCFTDR_7 SCIF7.SCFTDR
+#define SCFSR_7 SCIF7.SCFSR
+#define SCFRDR_7 SCIF7.SCFRDR
+#define SCFCR_7 SCIF7.SCFCR
+#define SCFDR_7 SCIF7.SCFDR
+#define SCSPTR_7 SCIF7.SCSPTR
+#define SCLSR_7 SCIF7.SCLSR
+#define SCEMR_7 SCIF7.SCEMR
+/* <-SEC M1.10.1 */
+/* <-QAC 0857 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/scim_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/scim_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/scim_iodefine.h	(revision 270)
@@ -0,0 +1,87 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : scim_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef SCIM_IODEFINE_H
+#define SCIM_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_scim
+{                                                          /* SCIM             */
+    volatile uint8_t   SMR;                                    /*  SMR             */
+    volatile uint8_t   BRR;                                    /*  BRR             */
+    volatile uint8_t   SCR;                                    /*  SCR             */
+    volatile uint8_t   TDR;                                    /*  TDR             */
+    volatile uint8_t   SSR;                                    /*  SSR             */
+    volatile uint8_t   RDR;                                    /*  RDR             */
+    volatile uint8_t   SCMR;                                   /*  SCMR            */
+    volatile uint8_t   SEMR;                                   /*  SEMR            */
+    volatile uint8_t   SNFR;                                   /*  SNFR            */
+    volatile uint8_t   dummy1[4];                              /*                  */
+    volatile uint8_t   SECR;                                   /*  SECR            */
+};
+
+
+#define SCIM0   (*(struct st_scim    *)0xE800B000uL) /* SCIM0 */
+#define SCIM1   (*(struct st_scim    *)0xE800B800uL) /* SCIM1 */
+
+
+/* Start of channnel array defines of SCIM */
+
+/* Channnel array defines of SCIM */
+/*(Sample) value = SCIM[ channel ]->SMR; */
+#define SCIM_COUNT  2
+#define SCIM_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &SCIM0, &SCIM1 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+
+/* End of channnel array defines of SCIM */
+
+
+#define SMR0 SCIM0.SMR
+#define BRR0 SCIM0.BRR
+#define SCR0 SCIM0.SCR
+#define TDR0 SCIM0.TDR
+#define SSR0 SCIM0.SSR
+#define RDR0 SCIM0.RDR
+#define SCMR0 SCIM0.SCMR
+#define SEMR0 SCIM0.SEMR
+#define SNFR0 SCIM0.SNFR
+#define SECR0 SCIM0.SECR
+#define SMR1 SCIM1.SMR
+#define BRR1 SCIM1.BRR
+#define SCR1 SCIM1.SCR
+#define TDR1 SCIM1.TDR
+#define SSR1 SCIM1.SSR
+#define RDR1 SCIM1.RDR
+#define SCMR1 SCIM1.SCMR
+#define SEMR1 SCIM1.SEMR
+#define SNFR1 SCIM1.SNFR
+#define SECR1 SCIM1.SECR
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/scux_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/scux_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/scux_iodefine.h	(revision 270)
@@ -0,0 +1,808 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : scux_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef SCUX_IODEFINE_H
+#define SCUX_IODEFINE_H
+/* ->QAC 0639 : Over 127 members (C90) */
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_scux
+{                                                          /* SCUX             */
+/* start of struct st_scux_from_ipcir_ipc0_n */
+    volatile uint32_t  IPCIR_IPC0_0;                           /*  IPCIR_IPC0_0    */
+    volatile uint32_t  IPSLR_IPC0_0;                           /*  IPSLR_IPC0_0    */
+    volatile uint8_t   dummy259[248];                          /*                  */
+/* end of struct st_scux_from_ipcir_ipc0_n */
+/* start of struct st_scux_from_ipcir_ipc0_n */
+    volatile uint32_t  IPCIR_IPC0_1;                           /*  IPCIR_IPC0_1    */
+    volatile uint32_t  IPSLR_IPC0_1;                           /*  IPSLR_IPC0_1    */
+    volatile uint8_t   dummy260[248];                          /*                  */
+/* end of struct st_scux_from_ipcir_ipc0_n */
+/* start of struct st_scux_from_ipcir_ipc0_n */
+    volatile uint32_t  IPCIR_IPC0_2;                           /*  IPCIR_IPC0_2    */
+    volatile uint32_t  IPSLR_IPC0_2;                           /*  IPSLR_IPC0_2    */
+    volatile uint8_t   dummy261[248];                          /*                  */
+/* end of struct st_scux_from_ipcir_ipc0_n */
+/* start of struct st_scux_from_ipcir_ipc0_n */
+    volatile uint32_t  IPCIR_IPC0_3;                           /*  IPCIR_IPC0_3    */
+    volatile uint32_t  IPSLR_IPC0_3;                           /*  IPSLR_IPC0_3    */
+    volatile uint8_t   dummy262[248];                          /*                  */
+/* end of struct st_scux_from_ipcir_ipc0_n */
+/* start of struct st_scux_from_opcir_opc0_n */
+    volatile uint32_t  OPCIR_OPC0_0;                           /*  OPCIR_OPC0_0    */
+    volatile uint32_t  OPSLR_OPC0_0;                           /*  OPSLR_OPC0_0    */
+    volatile uint8_t   dummy263[248];                          /*                  */
+/* end of struct st_scux_from_opcir_opc0_n */
+/* start of struct st_scux_from_opcir_opc0_n */
+    volatile uint32_t  OPCIR_OPC0_1;                           /*  OPCIR_OPC0_1    */
+    volatile uint32_t  OPSLR_OPC0_1;                           /*  OPSLR_OPC0_1    */
+    volatile uint8_t   dummy264[248];                          /*                  */
+/* end of struct st_scux_from_opcir_opc0_n */
+/* start of struct st_scux_from_opcir_opc0_n */
+    volatile uint32_t  OPCIR_OPC0_2;                           /*  OPCIR_OPC0_2    */
+    volatile uint32_t  OPSLR_OPC0_2;                           /*  OPSLR_OPC0_2    */
+    volatile uint8_t   dummy265[248];                          /*                  */
+/* end of struct st_scux_from_opcir_opc0_n */
+/* start of struct st_scux_from_opcir_opc0_n */
+    volatile uint32_t  OPCIR_OPC0_3;                           /*  OPCIR_OPC0_3    */
+    volatile uint32_t  OPSLR_OPC0_3;                           /*  OPSLR_OPC0_3    */
+    volatile uint8_t   dummy266[248];                          /*                  */
+/* end of struct st_scux_from_opcir_opc0_n */
+/* start of struct st_scux_from_ffdir_ffd0_n */
+    volatile uint32_t  FFDIR_FFD0_0;                           /*  FFDIR_FFD0_0    */
+    volatile uint32_t  FDAIR_FFD0_0;                           /*  FDAIR_FFD0_0    */
+    volatile uint32_t  DRQSR_FFD0_0;                           /*  DRQSR_FFD0_0    */
+    volatile uint32_t  FFDPR_FFD0_0;                           /*  FFDPR_FFD0_0    */
+    volatile uint32_t  FFDBR_FFD0_0;                           /*  FFDBR_FFD0_0    */
+    volatile uint32_t  DEVMR_FFD0_0;                           /*  DEVMR_FFD0_0    */
+    volatile uint8_t   dummy267[4];                            /*                  */
+    volatile uint32_t  DEVCR_FFD0_0;                           /*  DEVCR_FFD0_0    */
+/* end of struct st_scux_from_ffdir_ffd0_n */
+    volatile uint8_t   dummy268[224];                          /*                  */
+/* start of struct st_scux_from_ffdir_ffd0_n */
+    volatile uint32_t  FFDIR_FFD0_1;                           /*  FFDIR_FFD0_1    */
+    volatile uint32_t  FDAIR_FFD0_1;                           /*  FDAIR_FFD0_1    */
+    volatile uint32_t  DRQSR_FFD0_1;                           /*  DRQSR_FFD0_1    */
+    volatile uint32_t  FFDPR_FFD0_1;                           /*  FFDPR_FFD0_1    */
+    volatile uint32_t  FFDBR_FFD0_1;                           /*  FFDBR_FFD0_1    */
+    volatile uint32_t  DEVMR_FFD0_1;                           /*  DEVMR_FFD0_1    */
+    volatile uint8_t   dummy269[4];                            /*                  */
+    volatile uint32_t  DEVCR_FFD0_1;                           /*  DEVCR_FFD0_1    */
+/* end of struct st_scux_from_ffdir_ffd0_n */
+    volatile uint8_t   dummy270[224];                          /*                  */
+/* start of struct st_scux_from_ffdir_ffd0_n */
+    volatile uint32_t  FFDIR_FFD0_2;                           /*  FFDIR_FFD0_2    */
+    volatile uint32_t  FDAIR_FFD0_2;                           /*  FDAIR_FFD0_2    */
+    volatile uint32_t  DRQSR_FFD0_2;                           /*  DRQSR_FFD0_2    */
+    volatile uint32_t  FFDPR_FFD0_2;                           /*  FFDPR_FFD0_2    */
+    volatile uint32_t  FFDBR_FFD0_2;                           /*  FFDBR_FFD0_2    */
+    volatile uint32_t  DEVMR_FFD0_2;                           /*  DEVMR_FFD0_2    */
+    volatile uint8_t   dummy271[4];                            /*                  */
+    volatile uint32_t  DEVCR_FFD0_2;                           /*  DEVCR_FFD0_2    */
+/* end of struct st_scux_from_ffdir_ffd0_n */
+    volatile uint8_t   dummy272[224];                          /*                  */
+/* start of struct st_scux_from_ffdir_ffd0_n */
+    volatile uint32_t  FFDIR_FFD0_3;                           /*  FFDIR_FFD0_3    */
+    volatile uint32_t  FDAIR_FFD0_3;                           /*  FDAIR_FFD0_3    */
+    volatile uint32_t  DRQSR_FFD0_3;                           /*  DRQSR_FFD0_3    */
+    volatile uint32_t  FFDPR_FFD0_3;                           /*  FFDPR_FFD0_3    */
+    volatile uint32_t  FFDBR_FFD0_3;                           /*  FFDBR_FFD0_3    */
+    volatile uint32_t  DEVMR_FFD0_3;                           /*  DEVMR_FFD0_3    */
+    volatile uint8_t   dummy273[4];                            /*                  */
+    volatile uint32_t  DEVCR_FFD0_3;                           /*  DEVCR_FFD0_3    */
+/* end of struct st_scux_from_ffdir_ffd0_n */
+    volatile uint8_t   dummy274[224];                          /*                  */
+/* start of struct st_scux_from_ffuir_ffu0_n */
+    volatile uint32_t  FFUIR_FFU0_0;                           /*  FFUIR_FFU0_0    */
+    volatile uint32_t  FUAIR_FFU0_0;                           /*  FUAIR_FFU0_0    */
+    volatile uint32_t  URQSR_FFU0_0;                           /*  URQSR_FFU0_0    */
+    volatile uint32_t  FFUPR_FFU0_0;                           /*  FFUPR_FFU0_0    */
+    volatile uint32_t  UEVMR_FFU0_0;                           /*  UEVMR_FFU0_0    */
+    volatile uint8_t   dummy275[4];                            /*                  */
+    volatile uint32_t  UEVCR_FFU0_0;                           /*  UEVCR_FFU0_0    */
+/* end of struct st_scux_from_ffuir_ffu0_n */
+    volatile uint8_t   dummy276[228];                          /*                  */
+/* start of struct st_scux_from_ffuir_ffu0_n */
+    volatile uint32_t  FFUIR_FFU0_1;                           /*  FFUIR_FFU0_1    */
+    volatile uint32_t  FUAIR_FFU0_1;                           /*  FUAIR_FFU0_1    */
+    volatile uint32_t  URQSR_FFU0_1;                           /*  URQSR_FFU0_1    */
+    volatile uint32_t  FFUPR_FFU0_1;                           /*  FFUPR_FFU0_1    */
+    volatile uint32_t  UEVMR_FFU0_1;                           /*  UEVMR_FFU0_1    */
+    volatile uint8_t   dummy277[4];                            /*                  */
+    volatile uint32_t  UEVCR_FFU0_1;                           /*  UEVCR_FFU0_1    */
+/* end of struct st_scux_from_ffuir_ffu0_n */
+    volatile uint8_t   dummy278[228];                          /*                  */
+/* start of struct st_scux_from_ffuir_ffu0_n */
+    volatile uint32_t  FFUIR_FFU0_2;                           /*  FFUIR_FFU0_2    */
+    volatile uint32_t  FUAIR_FFU0_2;                           /*  FUAIR_FFU0_2    */
+    volatile uint32_t  URQSR_FFU0_2;                           /*  URQSR_FFU0_2    */
+    volatile uint32_t  FFUPR_FFU0_2;                           /*  FFUPR_FFU0_2    */
+    volatile uint32_t  UEVMR_FFU0_2;                           /*  UEVMR_FFU0_2    */
+    volatile uint8_t   dummy279[4];                            /*                  */
+    volatile uint32_t  UEVCR_FFU0_2;                           /*  UEVCR_FFU0_2    */
+/* end of struct st_scux_from_ffuir_ffu0_n */
+    volatile uint8_t   dummy280[228];                          /*                  */
+/* start of struct st_scux_from_ffuir_ffu0_n */
+    volatile uint32_t  FFUIR_FFU0_3;                           /*  FFUIR_FFU0_3    */
+    volatile uint32_t  FUAIR_FFU0_3;                           /*  FUAIR_FFU0_3    */
+    volatile uint32_t  URQSR_FFU0_3;                           /*  URQSR_FFU0_3    */
+    volatile uint32_t  FFUPR_FFU0_3;                           /*  FFUPR_FFU0_3    */
+    volatile uint32_t  UEVMR_FFU0_3;                           /*  UEVMR_FFU0_3    */
+    volatile uint8_t   dummy281[4];                            /*                  */
+    volatile uint32_t  UEVCR_FFU0_3;                           /*  UEVCR_FFU0_3    */
+/* end of struct st_scux_from_ffuir_ffu0_n */
+    volatile uint8_t   dummy282[228];                          /*                  */
+/* start of struct st_scux_from_srcir0_2src0_n */
+    volatile uint32_t  SRCIR0_2SRC0_0;                         /*  SRCIR0_2SRC0_0  */
+    volatile uint32_t  SADIR0_2SRC0_0;                         /*  SADIR0_2SRC0_0  */
+    volatile uint32_t  SRCBR0_2SRC0_0;                         /*  SRCBR0_2SRC0_0  */
+    volatile uint32_t  IFSCR0_2SRC0_0;                         /*  IFSCR0_2SRC0_0  */
+    volatile uint32_t  IFSVR0_2SRC0_0;                         /*  IFSVR0_2SRC0_0  */
+    volatile uint32_t  SRCCR0_2SRC0_0;                         /*  SRCCR0_2SRC0_0  */
+    volatile uint32_t  MNFSR0_2SRC0_0;                         /*  MNFSR0_2SRC0_0  */
+    volatile uint32_t  BFSSR0_2SRC0_0;                         /*  BFSSR0_2SRC0_0  */
+    volatile uint32_t  SC2SR0_2SRC0_0;                         /*  SC2SR0_2SRC0_0  */
+    volatile uint32_t  WATSR0_2SRC0_0;                         /*  WATSR0_2SRC0_0  */
+    volatile uint32_t  SEVMR0_2SRC0_0;                         /*  SEVMR0_2SRC0_0  */
+    volatile uint8_t   dummy283[4];                            /*                  */
+    volatile uint32_t  SEVCR0_2SRC0_0;                         /*  SEVCR0_2SRC0_0  */
+    volatile uint32_t  SRCIR1_2SRC0_0;                         /*  SRCIR1_2SRC0_0  */
+    volatile uint32_t  SADIR1_2SRC0_0;                         /*  SADIR1_2SRC0_0  */
+    volatile uint32_t  SRCBR1_2SRC0_0;                         /*  SRCBR1_2SRC0_0  */
+    volatile uint32_t  IFSCR1_2SRC0_0;                         /*  IFSCR1_2SRC0_0  */
+    volatile uint32_t  IFSVR1_2SRC0_0;                         /*  IFSVR1_2SRC0_0  */
+    volatile uint32_t  SRCCR1_2SRC0_0;                         /*  SRCCR1_2SRC0_0  */
+    volatile uint32_t  MNFSR1_2SRC0_0;                         /*  MNFSR1_2SRC0_0  */
+    volatile uint32_t  BFSSR1_2SRC0_0;                         /*  BFSSR1_2SRC0_0  */
+    volatile uint32_t  SC2SR1_2SRC0_0;                         /*  SC2SR1_2SRC0_0  */
+    volatile uint32_t  WATSR1_2SRC0_0;                         /*  WATSR1_2SRC0_0  */
+    volatile uint32_t  SEVMR1_2SRC0_0;                         /*  SEVMR1_2SRC0_0  */
+    volatile uint8_t   dummy284[4];                            /*                  */
+    volatile uint32_t  SEVCR1_2SRC0_0;                         /*  SEVCR1_2SRC0_0  */
+    volatile uint32_t  SRCIRR_2SRC0_0;                         /*  SRCIRR_2SRC0_0  */
+/* end of struct st_scux_from_srcir0_2src0_n */
+    volatile uint8_t   dummy285[148];                          /*                  */
+/* start of struct st_scux_from_srcir0_2src0_n */
+    volatile uint32_t  SRCIR0_2SRC0_1;                         /*  SRCIR0_2SRC0_1  */
+    volatile uint32_t  SADIR0_2SRC0_1;                         /*  SADIR0_2SRC0_1  */
+    volatile uint32_t  SRCBR0_2SRC0_1;                         /*  SRCBR0_2SRC0_1  */
+    volatile uint32_t  IFSCR0_2SRC0_1;                         /*  IFSCR0_2SRC0_1  */
+    volatile uint32_t  IFSVR0_2SRC0_1;                         /*  IFSVR0_2SRC0_1  */
+    volatile uint32_t  SRCCR0_2SRC0_1;                         /*  SRCCR0_2SRC0_1  */
+    volatile uint32_t  MNFSR0_2SRC0_1;                         /*  MNFSR0_2SRC0_1  */
+    volatile uint32_t  BFSSR0_2SRC0_1;                         /*  BFSSR0_2SRC0_1  */
+    volatile uint32_t  SC2SR0_2SRC0_1;                         /*  SC2SR0_2SRC0_1  */
+    volatile uint32_t  WATSR0_2SRC0_1;                         /*  WATSR0_2SRC0_1  */
+    volatile uint32_t  SEVMR0_2SRC0_1;                         /*  SEVMR0_2SRC0_1  */
+    volatile uint8_t   dummy286[4];                            /*                  */
+    volatile uint32_t  SEVCR0_2SRC0_1;                         /*  SEVCR0_2SRC0_1  */
+    volatile uint32_t  SRCIR1_2SRC0_1;                         /*  SRCIR1_2SRC0_1  */
+    volatile uint32_t  SADIR1_2SRC0_1;                         /*  SADIR1_2SRC0_1  */
+    volatile uint32_t  SRCBR1_2SRC0_1;                         /*  SRCBR1_2SRC0_1  */
+    volatile uint32_t  IFSCR1_2SRC0_1;                         /*  IFSCR1_2SRC0_1  */
+    volatile uint32_t  IFSVR1_2SRC0_1;                         /*  IFSVR1_2SRC0_1  */
+    volatile uint32_t  SRCCR1_2SRC0_1;                         /*  SRCCR1_2SRC0_1  */
+    volatile uint32_t  MNFSR1_2SRC0_1;                         /*  MNFSR1_2SRC0_1  */
+    volatile uint32_t  BFSSR1_2SRC0_1;                         /*  BFSSR1_2SRC0_1  */
+    volatile uint32_t  SC2SR1_2SRC0_1;                         /*  SC2SR1_2SRC0_1  */
+    volatile uint32_t  WATSR1_2SRC0_1;                         /*  WATSR1_2SRC0_1  */
+    volatile uint32_t  SEVMR1_2SRC0_1;                         /*  SEVMR1_2SRC0_1  */
+    volatile uint8_t   dummy287[4];                            /*                  */
+    volatile uint32_t  SEVCR1_2SRC0_1;                         /*  SEVCR1_2SRC0_1  */
+    volatile uint32_t  SRCIRR_2SRC0_1;                         /*  SRCIRR_2SRC0_1  */
+/* end of struct st_scux_from_srcir0_2src0_n */
+    volatile uint8_t   dummy288[148];                          /*                  */
+/* start of struct st_scux_from_dvuir_dvu0_n */
+    volatile uint32_t  DVUIR_DVU0_0;                           /*  DVUIR_DVU0_0    */
+    volatile uint32_t  VADIR_DVU0_0;                           /*  VADIR_DVU0_0    */
+    volatile uint32_t  DVUBR_DVU0_0;                           /*  DVUBR_DVU0_0    */
+    volatile uint32_t  DVUCR_DVU0_0;                           /*  DVUCR_DVU0_0    */
+    volatile uint32_t  ZCMCR_DVU0_0;                           /*  ZCMCR_DVU0_0    */
+    volatile uint32_t  VRCTR_DVU0_0;                           /*  VRCTR_DVU0_0    */
+    volatile uint32_t  VRPDR_DVU0_0;                           /*  VRPDR_DVU0_0    */
+    volatile uint32_t  VRDBR_DVU0_0;                           /*  VRDBR_DVU0_0    */
+    volatile uint32_t  VRWTR_DVU0_0;                           /*  VRWTR_DVU0_0    */
+    volatile uint32_t  VOL0R_DVU0_0;                           /*  VOL0R_DVU0_0    */
+    volatile uint32_t  VOL1R_DVU0_0;                           /*  VOL1R_DVU0_0    */
+    volatile uint32_t  VOL2R_DVU0_0;                           /*  VOL2R_DVU0_0    */
+    volatile uint32_t  VOL3R_DVU0_0;                           /*  VOL3R_DVU0_0    */
+    volatile uint32_t  VOL4R_DVU0_0;                           /*  VOL4R_DVU0_0    */
+    volatile uint32_t  VOL5R_DVU0_0;                           /*  VOL5R_DVU0_0    */
+    volatile uint32_t  VOL6R_DVU0_0;                           /*  VOL6R_DVU0_0    */
+    volatile uint32_t  VOL7R_DVU0_0;                           /*  VOL7R_DVU0_0    */
+    volatile uint32_t  DVUER_DVU0_0;                           /*  DVUER_DVU0_0    */
+    volatile uint32_t  DVUSR_DVU0_0;                           /*  DVUSR_DVU0_0    */
+    volatile uint32_t  VEVMR_DVU0_0;                           /*  VEVMR_DVU0_0    */
+    volatile uint8_t   dummy289[4];                            /*                  */
+    volatile uint32_t  VEVCR_DVU0_0;                           /*  VEVCR_DVU0_0    */
+/* end of struct st_scux_from_dvuir_dvu0_n */
+    volatile uint8_t   dummy290[168];                          /*                  */
+/* start of struct st_scux_from_dvuir_dvu0_n */
+    volatile uint32_t  DVUIR_DVU0_1;                           /*  DVUIR_DVU0_1    */
+    volatile uint32_t  VADIR_DVU0_1;                           /*  VADIR_DVU0_1    */
+    volatile uint32_t  DVUBR_DVU0_1;                           /*  DVUBR_DVU0_1    */
+    volatile uint32_t  DVUCR_DVU0_1;                           /*  DVUCR_DVU0_1    */
+    volatile uint32_t  ZCMCR_DVU0_1;                           /*  ZCMCR_DVU0_1    */
+    volatile uint32_t  VRCTR_DVU0_1;                           /*  VRCTR_DVU0_1    */
+    volatile uint32_t  VRPDR_DVU0_1;                           /*  VRPDR_DVU0_1    */
+    volatile uint32_t  VRDBR_DVU0_1;                           /*  VRDBR_DVU0_1    */
+    volatile uint32_t  VRWTR_DVU0_1;                           /*  VRWTR_DVU0_1    */
+    volatile uint32_t  VOL0R_DVU0_1;                           /*  VOL0R_DVU0_1    */
+    volatile uint32_t  VOL1R_DVU0_1;                           /*  VOL1R_DVU0_1    */
+    volatile uint32_t  VOL2R_DVU0_1;                           /*  VOL2R_DVU0_1    */
+    volatile uint32_t  VOL3R_DVU0_1;                           /*  VOL3R_DVU0_1    */
+    volatile uint32_t  VOL4R_DVU0_1;                           /*  VOL4R_DVU0_1    */
+    volatile uint32_t  VOL5R_DVU0_1;                           /*  VOL5R_DVU0_1    */
+    volatile uint32_t  VOL6R_DVU0_1;                           /*  VOL6R_DVU0_1    */
+    volatile uint32_t  VOL7R_DVU0_1;                           /*  VOL7R_DVU0_1    */
+    volatile uint32_t  DVUER_DVU0_1;                           /*  DVUER_DVU0_1    */
+    volatile uint32_t  DVUSR_DVU0_1;                           /*  DVUSR_DVU0_1    */
+    volatile uint32_t  VEVMR_DVU0_1;                           /*  VEVMR_DVU0_1    */
+    volatile uint8_t   dummy291[4];                            /*                  */
+    volatile uint32_t  VEVCR_DVU0_1;                           /*  VEVCR_DVU0_1    */
+/* end of struct st_scux_from_dvuir_dvu0_n */
+    volatile uint8_t   dummy292[168];                          /*                  */
+/* start of struct st_scux_from_dvuir_dvu0_n */
+    volatile uint32_t  DVUIR_DVU0_2;                           /*  DVUIR_DVU0_2    */
+    volatile uint32_t  VADIR_DVU0_2;                           /*  VADIR_DVU0_2    */
+    volatile uint32_t  DVUBR_DVU0_2;                           /*  DVUBR_DVU0_2    */
+    volatile uint32_t  DVUCR_DVU0_2;                           /*  DVUCR_DVU0_2    */
+    volatile uint32_t  ZCMCR_DVU0_2;                           /*  ZCMCR_DVU0_2    */
+    volatile uint32_t  VRCTR_DVU0_2;                           /*  VRCTR_DVU0_2    */
+    volatile uint32_t  VRPDR_DVU0_2;                           /*  VRPDR_DVU0_2    */
+    volatile uint32_t  VRDBR_DVU0_2;                           /*  VRDBR_DVU0_2    */
+    volatile uint32_t  VRWTR_DVU0_2;                           /*  VRWTR_DVU0_2    */
+    volatile uint32_t  VOL0R_DVU0_2;                           /*  VOL0R_DVU0_2    */
+    volatile uint32_t  VOL1R_DVU0_2;                           /*  VOL1R_DVU0_2    */
+    volatile uint32_t  VOL2R_DVU0_2;                           /*  VOL2R_DVU0_2    */
+    volatile uint32_t  VOL3R_DVU0_2;                           /*  VOL3R_DVU0_2    */
+    volatile uint32_t  VOL4R_DVU0_2;                           /*  VOL4R_DVU0_2    */
+    volatile uint32_t  VOL5R_DVU0_2;                           /*  VOL5R_DVU0_2    */
+    volatile uint32_t  VOL6R_DVU0_2;                           /*  VOL6R_DVU0_2    */
+    volatile uint32_t  VOL7R_DVU0_2;                           /*  VOL7R_DVU0_2    */
+    volatile uint32_t  DVUER_DVU0_2;                           /*  DVUER_DVU0_2    */
+    volatile uint32_t  DVUSR_DVU0_2;                           /*  DVUSR_DVU0_2    */
+    volatile uint32_t  VEVMR_DVU0_2;                           /*  VEVMR_DVU0_2    */
+    volatile uint8_t   dummy293[4];                            /*                  */
+    volatile uint32_t  VEVCR_DVU0_2;                           /*  VEVCR_DVU0_2    */
+/* end of struct st_scux_from_dvuir_dvu0_n */
+    volatile uint8_t   dummy294[168];                          /*                  */
+/* start of struct st_scux_from_dvuir_dvu0_n */
+    volatile uint32_t  DVUIR_DVU0_3;                           /*  DVUIR_DVU0_3    */
+    volatile uint32_t  VADIR_DVU0_3;                           /*  VADIR_DVU0_3    */
+    volatile uint32_t  DVUBR_DVU0_3;                           /*  DVUBR_DVU0_3    */
+    volatile uint32_t  DVUCR_DVU0_3;                           /*  DVUCR_DVU0_3    */
+    volatile uint32_t  ZCMCR_DVU0_3;                           /*  ZCMCR_DVU0_3    */
+    volatile uint32_t  VRCTR_DVU0_3;                           /*  VRCTR_DVU0_3    */
+    volatile uint32_t  VRPDR_DVU0_3;                           /*  VRPDR_DVU0_3    */
+    volatile uint32_t  VRDBR_DVU0_3;                           /*  VRDBR_DVU0_3    */
+    volatile uint32_t  VRWTR_DVU0_3;                           /*  VRWTR_DVU0_3    */
+    volatile uint32_t  VOL0R_DVU0_3;                           /*  VOL0R_DVU0_3    */
+    volatile uint32_t  VOL1R_DVU0_3;                           /*  VOL1R_DVU0_3    */
+    volatile uint32_t  VOL2R_DVU0_3;                           /*  VOL2R_DVU0_3    */
+    volatile uint32_t  VOL3R_DVU0_3;                           /*  VOL3R_DVU0_3    */
+    volatile uint32_t  VOL4R_DVU0_3;                           /*  VOL4R_DVU0_3    */
+    volatile uint32_t  VOL5R_DVU0_3;                           /*  VOL5R_DVU0_3    */
+    volatile uint32_t  VOL6R_DVU0_3;                           /*  VOL6R_DVU0_3    */
+    volatile uint32_t  VOL7R_DVU0_3;                           /*  VOL7R_DVU0_3    */
+    volatile uint32_t  DVUER_DVU0_3;                           /*  DVUER_DVU0_3    */
+    volatile uint32_t  DVUSR_DVU0_3;                           /*  DVUSR_DVU0_3    */
+    volatile uint32_t  VEVMR_DVU0_3;                           /*  VEVMR_DVU0_3    */
+    volatile uint8_t   dummy295[4];                            /*                  */
+    volatile uint32_t  VEVCR_DVU0_3;                           /*  VEVCR_DVU0_3    */
+/* end of struct st_scux_from_dvuir_dvu0_n */
+    volatile uint8_t   dummy296[168];                          /*                  */
+    volatile uint32_t  MIXIR_MIX0_0;                           /*  MIXIR_MIX0_0    */
+    volatile uint32_t  MADIR_MIX0_0;                           /*  MADIR_MIX0_0    */
+    volatile uint32_t  MIXBR_MIX0_0;                           /*  MIXBR_MIX0_0    */
+    volatile uint32_t  MIXMR_MIX0_0;                           /*  MIXMR_MIX0_0    */
+    volatile uint32_t  MVPDR_MIX0_0;                           /*  MVPDR_MIX0_0    */
+    volatile uint32_t  MDBAR_MIX0_0;                           /*  MDBAR_MIX0_0    */
+    volatile uint32_t  MDBBR_MIX0_0;                           /*  MDBBR_MIX0_0    */
+    volatile uint32_t  MDBCR_MIX0_0;                           /*  MDBCR_MIX0_0    */
+    volatile uint32_t  MDBDR_MIX0_0;                           /*  MDBDR_MIX0_0    */
+    volatile uint32_t  MDBER_MIX0_0;                           /*  MDBER_MIX0_0    */
+    volatile uint32_t  MIXSR_MIX0_0;                           /*  MIXSR_MIX0_0    */
+    volatile uint8_t   dummy297[212];                          /*                  */
+    volatile uint32_t  SWRSR_CIM;                              /*  SWRSR_CIM       */
+    volatile uint32_t  DMACR_CIM;                              /*  DMACR_CIM       */
+#define SCUX_DMATDn_CIM_COUNT 4
+    union iodefine_reg32_16_t  DMATD0_CIM;                 /*  DMATD0_CIM      */
+    union iodefine_reg32_16_t  DMATD1_CIM;                 /*  DMATD1_CIM      */
+    union iodefine_reg32_16_t  DMATD2_CIM;                 /*  DMATD2_CIM      */
+    union iodefine_reg32_16_t  DMATD3_CIM;                 /*  DMATD3_CIM      */
+#define SCUX_DMATUn_CIM_COUNT 4
+    union iodefine_reg32_16_t  DMATU0_CIM;                 /*  DMATU0_CIM      */
+    union iodefine_reg32_16_t  DMATU1_CIM;                 /*  DMATU1_CIM      */
+    union iodefine_reg32_16_t  DMATU2_CIM;                 /*  DMATU2_CIM      */
+    union iodefine_reg32_16_t  DMATU3_CIM;                 /*  DMATU3_CIM      */
+    
+    volatile uint8_t   dummy298[16];                           /*                  */
+    volatile uint32_t  SSIRSEL_CIM;                            /*  SSIRSEL_CIM     */
+#define SCUX_FDTSELn_CIM_COUNT 4
+    volatile uint32_t  FDTSEL0_CIM;                            /*  FDTSEL0_CIM     */
+    volatile uint32_t  FDTSEL1_CIM;                            /*  FDTSEL1_CIM     */
+    volatile uint32_t  FDTSEL2_CIM;                            /*  FDTSEL2_CIM     */
+    volatile uint32_t  FDTSEL3_CIM;                            /*  FDTSEL3_CIM     */
+#define SCUX_FUTSELn_CIM_COUNT 4
+    volatile uint32_t  FUTSEL0_CIM;                            /*  FUTSEL0_CIM     */
+    volatile uint32_t  FUTSEL1_CIM;                            /*  FUTSEL1_CIM     */
+    volatile uint32_t  FUTSEL2_CIM;                            /*  FUTSEL2_CIM     */
+    volatile uint32_t  FUTSEL3_CIM;                            /*  FUTSEL3_CIM     */
+    volatile uint32_t  SSIPMD_CIM;                             /*  SSIPMD_CIM      */
+    volatile uint32_t  SSICTRL_CIM;                            /*  SSICTRL_CIM     */
+#define SCUX_SRCRSELn_CIM_COUNT 4
+    volatile uint32_t  SRCRSEL0_CIM;                           /*  SRCRSEL0_CIM    */
+    volatile uint32_t  SRCRSEL1_CIM;                           /*  SRCRSEL1_CIM    */
+    volatile uint32_t  SRCRSEL2_CIM;                           /*  SRCRSEL2_CIM    */
+    volatile uint32_t  SRCRSEL3_CIM;                           /*  SRCRSEL3_CIM    */
+    volatile uint32_t  MIXRSEL_CIM;                            /*  MIXRSEL_CIM     */
+};
+
+
+struct st_scux_from_ipcir_ipc0_n
+{
+    volatile uint32_t  IPCIR_IPC0_0;                           /*  IPCIR_IPC0_0    */
+    volatile uint32_t  IPSLR_IPC0_0;                           /*  IPSLR_IPC0_0    */
+    volatile uint8_t   dummy1[248];                            /*                  */
+};
+
+
+struct st_scux_from_opcir_opc0_n
+{
+    volatile uint32_t  OPCIR_OPC0_0;                           /*  OPCIR_OPC0_0    */
+    volatile uint32_t  OPSLR_OPC0_0;                           /*  OPSLR_OPC0_0    */
+    volatile uint8_t   dummy1[248];                            /*                  */
+};
+
+
+struct st_scux_from_ffdir_ffd0_n
+{
+    volatile uint32_t  FFDIR_FFD0_0;                           /*  FFDIR_FFD0_0    */
+    volatile uint32_t  FDAIR_FFD0_0;                           /*  FDAIR_FFD0_0    */
+    volatile uint32_t  DRQSR_FFD0_0;                           /*  DRQSR_FFD0_0    */
+    volatile uint32_t  FFDPR_FFD0_0;                           /*  FFDPR_FFD0_0    */
+    volatile uint32_t  FFDBR_FFD0_0;                           /*  FFDBR_FFD0_0    */
+    volatile uint32_t  DEVMR_FFD0_0;                           /*  DEVMR_FFD0_0    */
+    volatile uint8_t   dummy1[4];                              /*                  */
+    volatile uint32_t  DEVCR_FFD0_0;                           /*  DEVCR_FFD0_0    */
+};
+
+
+struct st_scux_from_ffuir_ffu0_n
+{
+    volatile uint32_t  FFUIR_FFU0_0;                           /*  FFUIR_FFU0_0    */
+    volatile uint32_t  FUAIR_FFU0_0;                           /*  FUAIR_FFU0_0    */
+    volatile uint32_t  URQSR_FFU0_0;                           /*  URQSR_FFU0_0    */
+    volatile uint32_t  FFUPR_FFU0_0;                           /*  FFUPR_FFU0_0    */
+    volatile uint32_t  UEVMR_FFU0_0;                           /*  UEVMR_FFU0_0    */
+    volatile uint8_t   dummy1[4];                              /*                  */
+    volatile uint32_t  UEVCR_FFU0_0;                           /*  UEVCR_FFU0_0    */
+};
+
+
+struct st_scux_from_srcir0_2src0_n
+{
+    volatile uint32_t  SRCIR0_2SRC0_0;                         /*  SRCIR0_2SRC0_0  */
+    volatile uint32_t  SADIR0_2SRC0_0;                         /*  SADIR0_2SRC0_0  */
+    volatile uint32_t  SRCBR0_2SRC0_0;                         /*  SRCBR0_2SRC0_0  */
+    volatile uint32_t  IFSCR0_2SRC0_0;                         /*  IFSCR0_2SRC0_0  */
+    volatile uint32_t  IFSVR0_2SRC0_0;                         /*  IFSVR0_2SRC0_0  */
+    volatile uint32_t  SRCCR0_2SRC0_0;                         /*  SRCCR0_2SRC0_0  */
+    volatile uint32_t  MNFSR0_2SRC0_0;                         /*  MNFSR0_2SRC0_0  */
+    volatile uint32_t  BFSSR0_2SRC0_0;                         /*  BFSSR0_2SRC0_0  */
+    volatile uint32_t  SC2SR0_2SRC0_0;                         /*  SC2SR0_2SRC0_0  */
+    volatile uint32_t  WATSR0_2SRC0_0;                         /*  WATSR0_2SRC0_0  */
+    volatile uint32_t  SEVMR0_2SRC0_0;                         /*  SEVMR0_2SRC0_0  */
+    volatile uint8_t   dummy1[4];                              /*                  */
+    volatile uint32_t  SEVCR0_2SRC0_0;                         /*  SEVCR0_2SRC0_0  */
+    volatile uint32_t  SRCIR1_2SRC0_0;                         /*  SRCIR1_2SRC0_0  */
+    volatile uint32_t  SADIR1_2SRC0_0;                         /*  SADIR1_2SRC0_0  */
+    volatile uint32_t  SRCBR1_2SRC0_0;                         /*  SRCBR1_2SRC0_0  */
+    volatile uint32_t  IFSCR1_2SRC0_0;                         /*  IFSCR1_2SRC0_0  */
+    volatile uint32_t  IFSVR1_2SRC0_0;                         /*  IFSVR1_2SRC0_0  */
+    volatile uint32_t  SRCCR1_2SRC0_0;                         /*  SRCCR1_2SRC0_0  */
+    volatile uint32_t  MNFSR1_2SRC0_0;                         /*  MNFSR1_2SRC0_0  */
+    volatile uint32_t  BFSSR1_2SRC0_0;                         /*  BFSSR1_2SRC0_0  */
+    volatile uint32_t  SC2SR1_2SRC0_0;                         /*  SC2SR1_2SRC0_0  */
+    volatile uint32_t  WATSR1_2SRC0_0;                         /*  WATSR1_2SRC0_0  */
+    volatile uint32_t  SEVMR1_2SRC0_0;                         /*  SEVMR1_2SRC0_0  */
+    volatile uint8_t   dummy2[4];                              /*                  */
+    volatile uint32_t  SEVCR1_2SRC0_0;                         /*  SEVCR1_2SRC0_0  */
+    volatile uint32_t  SRCIRR_2SRC0_0;                         /*  SRCIRR_2SRC0_0  */
+};
+
+
+struct st_scux_from_dvuir_dvu0_n
+{
+    volatile uint32_t  DVUIR_DVU0_0;                           /*  DVUIR_DVU0_0    */
+    volatile uint32_t  VADIR_DVU0_0;                           /*  VADIR_DVU0_0    */
+    volatile uint32_t  DVUBR_DVU0_0;                           /*  DVUBR_DVU0_0    */
+    volatile uint32_t  DVUCR_DVU0_0;                           /*  DVUCR_DVU0_0    */
+    volatile uint32_t  ZCMCR_DVU0_0;                           /*  ZCMCR_DVU0_0    */
+    volatile uint32_t  VRCTR_DVU0_0;                           /*  VRCTR_DVU0_0    */
+    volatile uint32_t  VRPDR_DVU0_0;                           /*  VRPDR_DVU0_0    */
+    volatile uint32_t  VRDBR_DVU0_0;                           /*  VRDBR_DVU0_0    */
+    volatile uint32_t  VRWTR_DVU0_0;                           /*  VRWTR_DVU0_0    */
+    volatile uint32_t  VOL0R_DVU0_0;                           /*  VOL0R_DVU0_0    */
+    volatile uint32_t  VOL1R_DVU0_0;                           /*  VOL1R_DVU0_0    */
+    volatile uint32_t  VOL2R_DVU0_0;                           /*  VOL2R_DVU0_0    */
+    volatile uint32_t  VOL3R_DVU0_0;                           /*  VOL3R_DVU0_0    */
+    volatile uint32_t  VOL4R_DVU0_0;                           /*  VOL4R_DVU0_0    */
+    volatile uint32_t  VOL5R_DVU0_0;                           /*  VOL5R_DVU0_0    */
+    volatile uint32_t  VOL6R_DVU0_0;                           /*  VOL6R_DVU0_0    */
+    volatile uint32_t  VOL7R_DVU0_0;                           /*  VOL7R_DVU0_0    */
+    volatile uint32_t  DVUER_DVU0_0;                           /*  DVUER_DVU0_0    */
+    volatile uint32_t  DVUSR_DVU0_0;                           /*  DVUSR_DVU0_0    */
+    volatile uint32_t  VEVMR_DVU0_0;                           /*  VEVMR_DVU0_0    */
+    volatile uint8_t   dummy1[4];                              /*                  */
+    volatile uint32_t  VEVCR_DVU0_0;                           /*  VEVCR_DVU0_0    */
+};
+
+
+#define SCUX    (*(struct st_scux    *)0xE8208000uL) /* SCUX */
+
+
+/* Start of channnel array defines of SCUX */
+
+/* Channnel array defines of SCUX_FROM_DVUIR_DVU0_0_ARRAY */
+/*(Sample) value = SCUX_FROM_DVUIR_DVU0_0_ARRAY[ channel ]->DVUIR_DVU0_0; */
+#define SCUX_FROM_DVUIR_DVU0_0_ARRAY_COUNT  4
+#define SCUX_FROM_DVUIR_DVU0_0_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &SCUX_FROM_DVUIR_DVU0_0, &SCUX_FROM_DVUIR_DVU0_1, &SCUX_FROM_DVUIR_DVU0_2, &SCUX_FROM_DVUIR_DVU0_3 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define SCUX_FROM_DVUIR_DVU0_0 (*(struct st_scux_from_dvuir_dvu0_n *)&SCUX.DVUIR_DVU0_0) /* SCUX_FROM_DVUIR_DVU0_0 */
+#define SCUX_FROM_DVUIR_DVU0_1 (*(struct st_scux_from_dvuir_dvu0_n *)&SCUX.DVUIR_DVU0_1) /* SCUX_FROM_DVUIR_DVU0_1 */
+#define SCUX_FROM_DVUIR_DVU0_2 (*(struct st_scux_from_dvuir_dvu0_n *)&SCUX.DVUIR_DVU0_2) /* SCUX_FROM_DVUIR_DVU0_2 */
+#define SCUX_FROM_DVUIR_DVU0_3 (*(struct st_scux_from_dvuir_dvu0_n *)&SCUX.DVUIR_DVU0_3) /* SCUX_FROM_DVUIR_DVU0_3 */
+
+
+/* Channnel array defines of SCUX_FROM_SRCIR0_2SRC0_0_ARRAY */
+/*(Sample) value = SCUX_FROM_SRCIR0_2SRC0_0_ARRAY[ channel ]->SRCIR0_2SRC0_0; */
+#define SCUX_FROM_SRCIR0_2SRC0_0_ARRAY_COUNT  2
+#define SCUX_FROM_SRCIR0_2SRC0_0_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &SCUX_FROM_SRCIR0_2SRC0_0, &SCUX_FROM_SRCIR0_2SRC0_1 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define SCUX_FROM_SRCIR0_2SRC0_0 (*(struct st_scux_from_srcir0_2src0_n *)&SCUX.SRCIR0_2SRC0_0) /* SCUX_FROM_SRCIR0_2SRC0_0 */
+#define SCUX_FROM_SRCIR0_2SRC0_1 (*(struct st_scux_from_srcir0_2src0_n *)&SCUX.SRCIR0_2SRC0_1) /* SCUX_FROM_SRCIR0_2SRC0_1 */
+
+
+/* Channnel array defines of SCUX_FROM_FFUIR_FFU0_0_ARRAY */
+/*(Sample) value = SCUX_FROM_FFUIR_FFU0_0_ARRAY[ channel ]->FFUIR_FFU0_0; */
+#define SCUX_FROM_FFUIR_FFU0_0_ARRAY_COUNT  4
+#define SCUX_FROM_FFUIR_FFU0_0_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &SCUX_FROM_FFUIR_FFU0_0, &SCUX_FROM_FFUIR_FFU0_1, &SCUX_FROM_FFUIR_FFU0_2, &SCUX_FROM_FFUIR_FFU0_3 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define SCUX_FROM_FFUIR_FFU0_0 (*(struct st_scux_from_ffuir_ffu0_n *)&SCUX.FFUIR_FFU0_0) /* SCUX_FROM_FFUIR_FFU0_0 */
+#define SCUX_FROM_FFUIR_FFU0_1 (*(struct st_scux_from_ffuir_ffu0_n *)&SCUX.FFUIR_FFU0_1) /* SCUX_FROM_FFUIR_FFU0_1 */
+#define SCUX_FROM_FFUIR_FFU0_2 (*(struct st_scux_from_ffuir_ffu0_n *)&SCUX.FFUIR_FFU0_2) /* SCUX_FROM_FFUIR_FFU0_2 */
+#define SCUX_FROM_FFUIR_FFU0_3 (*(struct st_scux_from_ffuir_ffu0_n *)&SCUX.FFUIR_FFU0_3) /* SCUX_FROM_FFUIR_FFU0_3 */
+
+
+/* Channnel array defines of SCUX_FROM_FFDIR_FFD0_0_ARRAY */
+/*(Sample) value = SCUX_FROM_FFDIR_FFD0_0_ARRAY[ channel ]->FFDIR_FFD0_0; */
+#define SCUX_FROM_FFDIR_FFD0_0_ARRAY_COUNT  4
+#define SCUX_FROM_FFDIR_FFD0_0_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &SCUX_FROM_FFDIR_FFD0_0, &SCUX_FROM_FFDIR_FFD0_1, &SCUX_FROM_FFDIR_FFD0_2, &SCUX_FROM_FFDIR_FFD0_3 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define SCUX_FROM_FFDIR_FFD0_0 (*(struct st_scux_from_ffdir_ffd0_n *)&SCUX.FFDIR_FFD0_0) /* SCUX_FROM_FFDIR_FFD0_0 */
+#define SCUX_FROM_FFDIR_FFD0_1 (*(struct st_scux_from_ffdir_ffd0_n *)&SCUX.FFDIR_FFD0_1) /* SCUX_FROM_FFDIR_FFD0_1 */
+#define SCUX_FROM_FFDIR_FFD0_2 (*(struct st_scux_from_ffdir_ffd0_n *)&SCUX.FFDIR_FFD0_2) /* SCUX_FROM_FFDIR_FFD0_2 */
+#define SCUX_FROM_FFDIR_FFD0_3 (*(struct st_scux_from_ffdir_ffd0_n *)&SCUX.FFDIR_FFD0_3) /* SCUX_FROM_FFDIR_FFD0_3 */
+
+
+/* Channnel array defines of SCUX_FROM_OPCIR_OPC0_0_ARRAY */
+/*(Sample) value = SCUX_FROM_OPCIR_OPC0_0_ARRAY[ channel ]->OPCIR_OPC0_0; */
+#define SCUX_FROM_OPCIR_OPC0_0_ARRAY_COUNT  4
+#define SCUX_FROM_OPCIR_OPC0_0_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &SCUX_FROM_OPCIR_OPC0_0, &SCUX_FROM_OPCIR_OPC0_1, &SCUX_FROM_OPCIR_OPC0_2, &SCUX_FROM_OPCIR_OPC0_3 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define SCUX_FROM_OPCIR_OPC0_0 (*(struct st_scux_from_opcir_opc0_n *)&SCUX.OPCIR_OPC0_0) /* SCUX_FROM_OPCIR_OPC0_0 */
+#define SCUX_FROM_OPCIR_OPC0_1 (*(struct st_scux_from_opcir_opc0_n *)&SCUX.OPCIR_OPC0_1) /* SCUX_FROM_OPCIR_OPC0_1 */
+#define SCUX_FROM_OPCIR_OPC0_2 (*(struct st_scux_from_opcir_opc0_n *)&SCUX.OPCIR_OPC0_2) /* SCUX_FROM_OPCIR_OPC0_2 */
+#define SCUX_FROM_OPCIR_OPC0_3 (*(struct st_scux_from_opcir_opc0_n *)&SCUX.OPCIR_OPC0_3) /* SCUX_FROM_OPCIR_OPC0_3 */
+
+
+/* Channnel array defines of SCUX_FROM_IPCIR_IPC0_0_ARRAY */
+/*(Sample) value = SCUX_FROM_IPCIR_IPC0_0_ARRAY[ channel ]->IPCIR_IPC0_0; */
+#define SCUX_FROM_IPCIR_IPC0_0_ARRAY_COUNT  4
+#define SCUX_FROM_IPCIR_IPC0_0_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &SCUX_FROM_IPCIR_IPC0_0, &SCUX_FROM_IPCIR_IPC0_1, &SCUX_FROM_IPCIR_IPC0_2, &SCUX_FROM_IPCIR_IPC0_3 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define SCUX_FROM_IPCIR_IPC0_0 (*(struct st_scux_from_ipcir_ipc0_n *)&SCUX.IPCIR_IPC0_0) /* SCUX_FROM_IPCIR_IPC0_0 */
+#define SCUX_FROM_IPCIR_IPC0_1 (*(struct st_scux_from_ipcir_ipc0_n *)&SCUX.IPCIR_IPC0_1) /* SCUX_FROM_IPCIR_IPC0_1 */
+#define SCUX_FROM_IPCIR_IPC0_2 (*(struct st_scux_from_ipcir_ipc0_n *)&SCUX.IPCIR_IPC0_2) /* SCUX_FROM_IPCIR_IPC0_2 */
+#define SCUX_FROM_IPCIR_IPC0_3 (*(struct st_scux_from_ipcir_ipc0_n *)&SCUX.IPCIR_IPC0_3) /* SCUX_FROM_IPCIR_IPC0_3 */
+
+/* End of channnel array defines of SCUX */
+
+
+#define SCUXIPCIR_IPC0_0 SCUX.IPCIR_IPC0_0
+#define SCUXIPSLR_IPC0_0 SCUX.IPSLR_IPC0_0
+#define SCUXIPCIR_IPC0_1 SCUX.IPCIR_IPC0_1
+#define SCUXIPSLR_IPC0_1 SCUX.IPSLR_IPC0_1
+#define SCUXIPCIR_IPC0_2 SCUX.IPCIR_IPC0_2
+#define SCUXIPSLR_IPC0_2 SCUX.IPSLR_IPC0_2
+#define SCUXIPCIR_IPC0_3 SCUX.IPCIR_IPC0_3
+#define SCUXIPSLR_IPC0_3 SCUX.IPSLR_IPC0_3
+#define SCUXOPCIR_OPC0_0 SCUX.OPCIR_OPC0_0
+#define SCUXOPSLR_OPC0_0 SCUX.OPSLR_OPC0_0
+#define SCUXOPCIR_OPC0_1 SCUX.OPCIR_OPC0_1
+#define SCUXOPSLR_OPC0_1 SCUX.OPSLR_OPC0_1
+#define SCUXOPCIR_OPC0_2 SCUX.OPCIR_OPC0_2
+#define SCUXOPSLR_OPC0_2 SCUX.OPSLR_OPC0_2
+#define SCUXOPCIR_OPC0_3 SCUX.OPCIR_OPC0_3
+#define SCUXOPSLR_OPC0_3 SCUX.OPSLR_OPC0_3
+#define SCUXFFDIR_FFD0_0 SCUX.FFDIR_FFD0_0
+#define SCUXFDAIR_FFD0_0 SCUX.FDAIR_FFD0_0
+#define SCUXDRQSR_FFD0_0 SCUX.DRQSR_FFD0_0
+#define SCUXFFDPR_FFD0_0 SCUX.FFDPR_FFD0_0
+#define SCUXFFDBR_FFD0_0 SCUX.FFDBR_FFD0_0
+#define SCUXDEVMR_FFD0_0 SCUX.DEVMR_FFD0_0
+#define SCUXDEVCR_FFD0_0 SCUX.DEVCR_FFD0_0
+#define SCUXFFDIR_FFD0_1 SCUX.FFDIR_FFD0_1
+#define SCUXFDAIR_FFD0_1 SCUX.FDAIR_FFD0_1
+#define SCUXDRQSR_FFD0_1 SCUX.DRQSR_FFD0_1
+#define SCUXFFDPR_FFD0_1 SCUX.FFDPR_FFD0_1
+#define SCUXFFDBR_FFD0_1 SCUX.FFDBR_FFD0_1
+#define SCUXDEVMR_FFD0_1 SCUX.DEVMR_FFD0_1
+#define SCUXDEVCR_FFD0_1 SCUX.DEVCR_FFD0_1
+#define SCUXFFDIR_FFD0_2 SCUX.FFDIR_FFD0_2
+#define SCUXFDAIR_FFD0_2 SCUX.FDAIR_FFD0_2
+#define SCUXDRQSR_FFD0_2 SCUX.DRQSR_FFD0_2
+#define SCUXFFDPR_FFD0_2 SCUX.FFDPR_FFD0_2
+#define SCUXFFDBR_FFD0_2 SCUX.FFDBR_FFD0_2
+#define SCUXDEVMR_FFD0_2 SCUX.DEVMR_FFD0_2
+#define SCUXDEVCR_FFD0_2 SCUX.DEVCR_FFD0_2
+#define SCUXFFDIR_FFD0_3 SCUX.FFDIR_FFD0_3
+#define SCUXFDAIR_FFD0_3 SCUX.FDAIR_FFD0_3
+#define SCUXDRQSR_FFD0_3 SCUX.DRQSR_FFD0_3
+#define SCUXFFDPR_FFD0_3 SCUX.FFDPR_FFD0_3
+#define SCUXFFDBR_FFD0_3 SCUX.FFDBR_FFD0_3
+#define SCUXDEVMR_FFD0_3 SCUX.DEVMR_FFD0_3
+#define SCUXDEVCR_FFD0_3 SCUX.DEVCR_FFD0_3
+#define SCUXFFUIR_FFU0_0 SCUX.FFUIR_FFU0_0
+#define SCUXFUAIR_FFU0_0 SCUX.FUAIR_FFU0_0
+#define SCUXURQSR_FFU0_0 SCUX.URQSR_FFU0_0
+#define SCUXFFUPR_FFU0_0 SCUX.FFUPR_FFU0_0
+#define SCUXUEVMR_FFU0_0 SCUX.UEVMR_FFU0_0
+#define SCUXUEVCR_FFU0_0 SCUX.UEVCR_FFU0_0
+#define SCUXFFUIR_FFU0_1 SCUX.FFUIR_FFU0_1
+#define SCUXFUAIR_FFU0_1 SCUX.FUAIR_FFU0_1
+#define SCUXURQSR_FFU0_1 SCUX.URQSR_FFU0_1
+#define SCUXFFUPR_FFU0_1 SCUX.FFUPR_FFU0_1
+#define SCUXUEVMR_FFU0_1 SCUX.UEVMR_FFU0_1
+#define SCUXUEVCR_FFU0_1 SCUX.UEVCR_FFU0_1
+#define SCUXFFUIR_FFU0_2 SCUX.FFUIR_FFU0_2
+#define SCUXFUAIR_FFU0_2 SCUX.FUAIR_FFU0_2
+#define SCUXURQSR_FFU0_2 SCUX.URQSR_FFU0_2
+#define SCUXFFUPR_FFU0_2 SCUX.FFUPR_FFU0_2
+#define SCUXUEVMR_FFU0_2 SCUX.UEVMR_FFU0_2
+#define SCUXUEVCR_FFU0_2 SCUX.UEVCR_FFU0_2
+#define SCUXFFUIR_FFU0_3 SCUX.FFUIR_FFU0_3
+#define SCUXFUAIR_FFU0_3 SCUX.FUAIR_FFU0_3
+#define SCUXURQSR_FFU0_3 SCUX.URQSR_FFU0_3
+#define SCUXFFUPR_FFU0_3 SCUX.FFUPR_FFU0_3
+#define SCUXUEVMR_FFU0_3 SCUX.UEVMR_FFU0_3
+#define SCUXUEVCR_FFU0_3 SCUX.UEVCR_FFU0_3
+#define SCUXSRCIR0_2SRC0_0 SCUX.SRCIR0_2SRC0_0
+#define SCUXSADIR0_2SRC0_0 SCUX.SADIR0_2SRC0_0
+#define SCUXSRCBR0_2SRC0_0 SCUX.SRCBR0_2SRC0_0
+#define SCUXIFSCR0_2SRC0_0 SCUX.IFSCR0_2SRC0_0
+#define SCUXIFSVR0_2SRC0_0 SCUX.IFSVR0_2SRC0_0
+#define SCUXSRCCR0_2SRC0_0 SCUX.SRCCR0_2SRC0_0
+#define SCUXMNFSR0_2SRC0_0 SCUX.MNFSR0_2SRC0_0
+#define SCUXBFSSR0_2SRC0_0 SCUX.BFSSR0_2SRC0_0
+#define SCUXSC2SR0_2SRC0_0 SCUX.SC2SR0_2SRC0_0
+#define SCUXWATSR0_2SRC0_0 SCUX.WATSR0_2SRC0_0
+#define SCUXSEVMR0_2SRC0_0 SCUX.SEVMR0_2SRC0_0
+#define SCUXSEVCR0_2SRC0_0 SCUX.SEVCR0_2SRC0_0
+#define SCUXSRCIR1_2SRC0_0 SCUX.SRCIR1_2SRC0_0
+#define SCUXSADIR1_2SRC0_0 SCUX.SADIR1_2SRC0_0
+#define SCUXSRCBR1_2SRC0_0 SCUX.SRCBR1_2SRC0_0
+#define SCUXIFSCR1_2SRC0_0 SCUX.IFSCR1_2SRC0_0
+#define SCUXIFSVR1_2SRC0_0 SCUX.IFSVR1_2SRC0_0
+#define SCUXSRCCR1_2SRC0_0 SCUX.SRCCR1_2SRC0_0
+#define SCUXMNFSR1_2SRC0_0 SCUX.MNFSR1_2SRC0_0
+#define SCUXBFSSR1_2SRC0_0 SCUX.BFSSR1_2SRC0_0
+#define SCUXSC2SR1_2SRC0_0 SCUX.SC2SR1_2SRC0_0
+#define SCUXWATSR1_2SRC0_0 SCUX.WATSR1_2SRC0_0
+#define SCUXSEVMR1_2SRC0_0 SCUX.SEVMR1_2SRC0_0
+#define SCUXSEVCR1_2SRC0_0 SCUX.SEVCR1_2SRC0_0
+#define SCUXSRCIRR_2SRC0_0 SCUX.SRCIRR_2SRC0_0
+#define SCUXSRCIR0_2SRC0_1 SCUX.SRCIR0_2SRC0_1
+#define SCUXSADIR0_2SRC0_1 SCUX.SADIR0_2SRC0_1
+#define SCUXSRCBR0_2SRC0_1 SCUX.SRCBR0_2SRC0_1
+#define SCUXIFSCR0_2SRC0_1 SCUX.IFSCR0_2SRC0_1
+#define SCUXIFSVR0_2SRC0_1 SCUX.IFSVR0_2SRC0_1
+#define SCUXSRCCR0_2SRC0_1 SCUX.SRCCR0_2SRC0_1
+#define SCUXMNFSR0_2SRC0_1 SCUX.MNFSR0_2SRC0_1
+#define SCUXBFSSR0_2SRC0_1 SCUX.BFSSR0_2SRC0_1
+#define SCUXSC2SR0_2SRC0_1 SCUX.SC2SR0_2SRC0_1
+#define SCUXWATSR0_2SRC0_1 SCUX.WATSR0_2SRC0_1
+#define SCUXSEVMR0_2SRC0_1 SCUX.SEVMR0_2SRC0_1
+#define SCUXSEVCR0_2SRC0_1 SCUX.SEVCR0_2SRC0_1
+#define SCUXSRCIR1_2SRC0_1 SCUX.SRCIR1_2SRC0_1
+#define SCUXSADIR1_2SRC0_1 SCUX.SADIR1_2SRC0_1
+#define SCUXSRCBR1_2SRC0_1 SCUX.SRCBR1_2SRC0_1
+#define SCUXIFSCR1_2SRC0_1 SCUX.IFSCR1_2SRC0_1
+#define SCUXIFSVR1_2SRC0_1 SCUX.IFSVR1_2SRC0_1
+#define SCUXSRCCR1_2SRC0_1 SCUX.SRCCR1_2SRC0_1
+#define SCUXMNFSR1_2SRC0_1 SCUX.MNFSR1_2SRC0_1
+#define SCUXBFSSR1_2SRC0_1 SCUX.BFSSR1_2SRC0_1
+#define SCUXSC2SR1_2SRC0_1 SCUX.SC2SR1_2SRC0_1
+#define SCUXWATSR1_2SRC0_1 SCUX.WATSR1_2SRC0_1
+#define SCUXSEVMR1_2SRC0_1 SCUX.SEVMR1_2SRC0_1
+#define SCUXSEVCR1_2SRC0_1 SCUX.SEVCR1_2SRC0_1
+#define SCUXSRCIRR_2SRC0_1 SCUX.SRCIRR_2SRC0_1
+#define SCUXDVUIR_DVU0_0 SCUX.DVUIR_DVU0_0
+#define SCUXVADIR_DVU0_0 SCUX.VADIR_DVU0_0
+#define SCUXDVUBR_DVU0_0 SCUX.DVUBR_DVU0_0
+#define SCUXDVUCR_DVU0_0 SCUX.DVUCR_DVU0_0
+#define SCUXZCMCR_DVU0_0 SCUX.ZCMCR_DVU0_0
+#define SCUXVRCTR_DVU0_0 SCUX.VRCTR_DVU0_0
+#define SCUXVRPDR_DVU0_0 SCUX.VRPDR_DVU0_0
+#define SCUXVRDBR_DVU0_0 SCUX.VRDBR_DVU0_0
+#define SCUXVRWTR_DVU0_0 SCUX.VRWTR_DVU0_0
+#define SCUXVOL0R_DVU0_0 SCUX.VOL0R_DVU0_0
+#define SCUXVOL1R_DVU0_0 SCUX.VOL1R_DVU0_0
+#define SCUXVOL2R_DVU0_0 SCUX.VOL2R_DVU0_0
+#define SCUXVOL3R_DVU0_0 SCUX.VOL3R_DVU0_0
+#define SCUXVOL4R_DVU0_0 SCUX.VOL4R_DVU0_0
+#define SCUXVOL5R_DVU0_0 SCUX.VOL5R_DVU0_0
+#define SCUXVOL6R_DVU0_0 SCUX.VOL6R_DVU0_0
+#define SCUXVOL7R_DVU0_0 SCUX.VOL7R_DVU0_0
+#define SCUXDVUER_DVU0_0 SCUX.DVUER_DVU0_0
+#define SCUXDVUSR_DVU0_0 SCUX.DVUSR_DVU0_0
+#define SCUXVEVMR_DVU0_0 SCUX.VEVMR_DVU0_0
+#define SCUXVEVCR_DVU0_0 SCUX.VEVCR_DVU0_0
+#define SCUXDVUIR_DVU0_1 SCUX.DVUIR_DVU0_1
+#define SCUXVADIR_DVU0_1 SCUX.VADIR_DVU0_1
+#define SCUXDVUBR_DVU0_1 SCUX.DVUBR_DVU0_1
+#define SCUXDVUCR_DVU0_1 SCUX.DVUCR_DVU0_1
+#define SCUXZCMCR_DVU0_1 SCUX.ZCMCR_DVU0_1
+#define SCUXVRCTR_DVU0_1 SCUX.VRCTR_DVU0_1
+#define SCUXVRPDR_DVU0_1 SCUX.VRPDR_DVU0_1
+#define SCUXVRDBR_DVU0_1 SCUX.VRDBR_DVU0_1
+#define SCUXVRWTR_DVU0_1 SCUX.VRWTR_DVU0_1
+#define SCUXVOL0R_DVU0_1 SCUX.VOL0R_DVU0_1
+#define SCUXVOL1R_DVU0_1 SCUX.VOL1R_DVU0_1
+#define SCUXVOL2R_DVU0_1 SCUX.VOL2R_DVU0_1
+#define SCUXVOL3R_DVU0_1 SCUX.VOL3R_DVU0_1
+#define SCUXVOL4R_DVU0_1 SCUX.VOL4R_DVU0_1
+#define SCUXVOL5R_DVU0_1 SCUX.VOL5R_DVU0_1
+#define SCUXVOL6R_DVU0_1 SCUX.VOL6R_DVU0_1
+#define SCUXVOL7R_DVU0_1 SCUX.VOL7R_DVU0_1
+#define SCUXDVUER_DVU0_1 SCUX.DVUER_DVU0_1
+#define SCUXDVUSR_DVU0_1 SCUX.DVUSR_DVU0_1
+#define SCUXVEVMR_DVU0_1 SCUX.VEVMR_DVU0_1
+#define SCUXVEVCR_DVU0_1 SCUX.VEVCR_DVU0_1
+#define SCUXDVUIR_DVU0_2 SCUX.DVUIR_DVU0_2
+#define SCUXVADIR_DVU0_2 SCUX.VADIR_DVU0_2
+#define SCUXDVUBR_DVU0_2 SCUX.DVUBR_DVU0_2
+#define SCUXDVUCR_DVU0_2 SCUX.DVUCR_DVU0_2
+#define SCUXZCMCR_DVU0_2 SCUX.ZCMCR_DVU0_2
+#define SCUXVRCTR_DVU0_2 SCUX.VRCTR_DVU0_2
+#define SCUXVRPDR_DVU0_2 SCUX.VRPDR_DVU0_2
+#define SCUXVRDBR_DVU0_2 SCUX.VRDBR_DVU0_2
+#define SCUXVRWTR_DVU0_2 SCUX.VRWTR_DVU0_2
+#define SCUXVOL0R_DVU0_2 SCUX.VOL0R_DVU0_2
+#define SCUXVOL1R_DVU0_2 SCUX.VOL1R_DVU0_2
+#define SCUXVOL2R_DVU0_2 SCUX.VOL2R_DVU0_2
+#define SCUXVOL3R_DVU0_2 SCUX.VOL3R_DVU0_2
+#define SCUXVOL4R_DVU0_2 SCUX.VOL4R_DVU0_2
+#define SCUXVOL5R_DVU0_2 SCUX.VOL5R_DVU0_2
+#define SCUXVOL6R_DVU0_2 SCUX.VOL6R_DVU0_2
+#define SCUXVOL7R_DVU0_2 SCUX.VOL7R_DVU0_2
+#define SCUXDVUER_DVU0_2 SCUX.DVUER_DVU0_2
+#define SCUXDVUSR_DVU0_2 SCUX.DVUSR_DVU0_2
+#define SCUXVEVMR_DVU0_2 SCUX.VEVMR_DVU0_2
+#define SCUXVEVCR_DVU0_2 SCUX.VEVCR_DVU0_2
+#define SCUXDVUIR_DVU0_3 SCUX.DVUIR_DVU0_3
+#define SCUXVADIR_DVU0_3 SCUX.VADIR_DVU0_3
+#define SCUXDVUBR_DVU0_3 SCUX.DVUBR_DVU0_3
+#define SCUXDVUCR_DVU0_3 SCUX.DVUCR_DVU0_3
+#define SCUXZCMCR_DVU0_3 SCUX.ZCMCR_DVU0_3
+#define SCUXVRCTR_DVU0_3 SCUX.VRCTR_DVU0_3
+#define SCUXVRPDR_DVU0_3 SCUX.VRPDR_DVU0_3
+#define SCUXVRDBR_DVU0_3 SCUX.VRDBR_DVU0_3
+#define SCUXVRWTR_DVU0_3 SCUX.VRWTR_DVU0_3
+#define SCUXVOL0R_DVU0_3 SCUX.VOL0R_DVU0_3
+#define SCUXVOL1R_DVU0_3 SCUX.VOL1R_DVU0_3
+#define SCUXVOL2R_DVU0_3 SCUX.VOL2R_DVU0_3
+#define SCUXVOL3R_DVU0_3 SCUX.VOL3R_DVU0_3
+#define SCUXVOL4R_DVU0_3 SCUX.VOL4R_DVU0_3
+#define SCUXVOL5R_DVU0_3 SCUX.VOL5R_DVU0_3
+#define SCUXVOL6R_DVU0_3 SCUX.VOL6R_DVU0_3
+#define SCUXVOL7R_DVU0_3 SCUX.VOL7R_DVU0_3
+#define SCUXDVUER_DVU0_3 SCUX.DVUER_DVU0_3
+#define SCUXDVUSR_DVU0_3 SCUX.DVUSR_DVU0_3
+#define SCUXVEVMR_DVU0_3 SCUX.VEVMR_DVU0_3
+#define SCUXVEVCR_DVU0_3 SCUX.VEVCR_DVU0_3
+#define SCUXMIXIR_MIX0_0 SCUX.MIXIR_MIX0_0
+#define SCUXMADIR_MIX0_0 SCUX.MADIR_MIX0_0
+#define SCUXMIXBR_MIX0_0 SCUX.MIXBR_MIX0_0
+#define SCUXMIXMR_MIX0_0 SCUX.MIXMR_MIX0_0
+#define SCUXMVPDR_MIX0_0 SCUX.MVPDR_MIX0_0
+#define SCUXMDBAR_MIX0_0 SCUX.MDBAR_MIX0_0
+#define SCUXMDBBR_MIX0_0 SCUX.MDBBR_MIX0_0
+#define SCUXMDBCR_MIX0_0 SCUX.MDBCR_MIX0_0
+#define SCUXMDBDR_MIX0_0 SCUX.MDBDR_MIX0_0
+#define SCUXMDBER_MIX0_0 SCUX.MDBER_MIX0_0
+#define SCUXMIXSR_MIX0_0 SCUX.MIXSR_MIX0_0
+#define SCUXSWRSR_CIM SCUX.SWRSR_CIM
+#define SCUXDMACR_CIM SCUX.DMACR_CIM
+#define SCUXDMATD0_CIM SCUX.DMATD0_CIM.UINT32
+#define SCUXDMATD0_CIML SCUX.DMATD0_CIM.UINT16[L]
+#define SCUXDMATD0_CIMH SCUX.DMATD0_CIM.UINT16[H]
+#define SCUXDMATD1_CIM SCUX.DMATD1_CIM.UINT32
+#define SCUXDMATD1_CIML SCUX.DMATD1_CIM.UINT16[L]
+#define SCUXDMATD1_CIMH SCUX.DMATD1_CIM.UINT16[H]
+#define SCUXDMATD2_CIM SCUX.DMATD2_CIM.UINT32
+#define SCUXDMATD2_CIML SCUX.DMATD2_CIM.UINT16[L]
+#define SCUXDMATD2_CIMH SCUX.DMATD2_CIM.UINT16[H]
+#define SCUXDMATD3_CIM SCUX.DMATD3_CIM.UINT32
+#define SCUXDMATD3_CIML SCUX.DMATD3_CIM.UINT16[L]
+#define SCUXDMATD3_CIMH SCUX.DMATD3_CIM.UINT16[H]
+#define SCUXDMATU0_CIM SCUX.DMATU0_CIM.UINT32
+#define SCUXDMATU0_CIML SCUX.DMATU0_CIM.UINT16[L]
+#define SCUXDMATU0_CIMH SCUX.DMATU0_CIM.UINT16[H]
+#define SCUXDMATU1_CIM SCUX.DMATU1_CIM.UINT32
+#define SCUXDMATU1_CIML SCUX.DMATU1_CIM.UINT16[L]
+#define SCUXDMATU1_CIMH SCUX.DMATU1_CIM.UINT16[H]
+#define SCUXDMATU2_CIM SCUX.DMATU2_CIM.UINT32
+#define SCUXDMATU2_CIML SCUX.DMATU2_CIM.UINT16[L]
+#define SCUXDMATU2_CIMH SCUX.DMATU2_CIM.UINT16[H]
+#define SCUXDMATU3_CIM SCUX.DMATU3_CIM.UINT32
+#define SCUXDMATU3_CIML SCUX.DMATU3_CIM.UINT16[L]
+#define SCUXDMATU3_CIMH SCUX.DMATU3_CIM.UINT16[H]
+#define SCUXSSIRSEL_CIM SCUX.SSIRSEL_CIM
+#define SCUXFDTSEL0_CIM SCUX.FDTSEL0_CIM
+#define SCUXFDTSEL1_CIM SCUX.FDTSEL1_CIM
+#define SCUXFDTSEL2_CIM SCUX.FDTSEL2_CIM
+#define SCUXFDTSEL3_CIM SCUX.FDTSEL3_CIM
+#define SCUXFUTSEL0_CIM SCUX.FUTSEL0_CIM
+#define SCUXFUTSEL1_CIM SCUX.FUTSEL1_CIM
+#define SCUXFUTSEL2_CIM SCUX.FUTSEL2_CIM
+#define SCUXFUTSEL3_CIM SCUX.FUTSEL3_CIM
+#define SCUXSSIPMD_CIM SCUX.SSIPMD_CIM
+#define SCUXSSICTRL_CIM SCUX.SSICTRL_CIM
+#define SCUXSRCRSEL0_CIM SCUX.SRCRSEL0_CIM
+#define SCUXSRCRSEL1_CIM SCUX.SRCRSEL1_CIM
+#define SCUXSRCRSEL2_CIM SCUX.SRCRSEL2_CIM
+#define SCUXSRCRSEL3_CIM SCUX.SRCRSEL3_CIM
+#define SCUXMIXRSEL_CIM SCUX.MIXRSEL_CIM
+/* <-SEC M1.10.1 */
+/* <-QAC 0639 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/sdg_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/sdg_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/sdg_iodefine.h	(revision 270)
@@ -0,0 +1,86 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : sdg_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef SDG_IODEFINE_H
+#define SDG_IODEFINE_H
+
+struct st_sdg
+{                                                          /* SDG              */
+    volatile uint8_t   SGCR1;                                  /*  SGCR1           */
+    volatile uint8_t   SGCSR;                                  /*  SGCSR           */
+    volatile uint8_t   SGCR2;                                  /*  SGCR2           */
+    volatile uint8_t   SGLR;                                   /*  SGLR            */
+    volatile uint8_t   SGTFR;                                  /*  SGTFR           */
+    volatile uint8_t   SGSFR;                                  /*  SGSFR           */
+};
+
+
+#define SDG0    (*(struct st_sdg     *)0xFCFF4800uL) /* SDG0 */
+#define SDG1    (*(struct st_sdg     *)0xFCFF4A00uL) /* SDG1 */
+#define SDG2    (*(struct st_sdg     *)0xFCFF4C00uL) /* SDG2 */
+#define SDG3    (*(struct st_sdg     *)0xFCFF4E00uL) /* SDG3 */
+
+
+/* Start of channnel array defines of SDG */
+
+/* Channnel array defines of SDG */
+/*(Sample) value = SDG[ channel ]->SGCR1; */
+#define SDG_COUNT  4
+#define SDG_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &SDG0, &SDG1, &SDG2, &SDG3 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+
+/* End of channnel array defines of SDG */
+
+
+#define SGCR1_0 SDG0.SGCR1
+#define SGCSR_0 SDG0.SGCSR
+#define SGCR2_0 SDG0.SGCR2
+#define SGLR_0 SDG0.SGLR
+#define SGTFR_0 SDG0.SGTFR
+#define SGSFR_0 SDG0.SGSFR
+#define SGCR1_1 SDG1.SGCR1
+#define SGCSR_1 SDG1.SGCSR
+#define SGCR2_1 SDG1.SGCR2
+#define SGLR_1 SDG1.SGLR
+#define SGTFR_1 SDG1.SGTFR
+#define SGSFR_1 SDG1.SGSFR
+#define SGCR1_2 SDG2.SGCR1
+#define SGCSR_2 SDG2.SGCSR
+#define SGCR2_2 SDG2.SGCR2
+#define SGLR_2 SDG2.SGLR
+#define SGTFR_2 SDG2.SGTFR
+#define SGSFR_2 SDG2.SGSFR
+#define SGCR1_3 SDG3.SGCR1
+#define SGCSR_3 SDG3.SGCSR
+#define SGCR2_3 SDG3.SGCR2
+#define SGLR_3 SDG3.SGLR
+#define SGTFR_3 SDG3.SGTFR
+#define SGSFR_3 SDG3.SGSFR
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/spdif_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/spdif_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/spdif_iodefine.h	(revision 270)
@@ -0,0 +1,68 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : spdif_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef SPDIF_IODEFINE_H
+#define SPDIF_IODEFINE_H
+
+struct st_spdif
+{                                                          /* SPDIF            */
+    volatile uint32_t  TLCA;                                   /*  TLCA            */
+    volatile uint32_t  TRCA;                                   /*  TRCA            */
+    volatile uint32_t  TLCS;                                   /*  TLCS            */
+    volatile uint32_t  TRCS;                                   /*  TRCS            */
+    volatile uint32_t  TUI;                                    /*  TUI             */
+    volatile uint32_t  RLCA;                                   /*  RLCA            */
+    volatile uint32_t  RRCA;                                   /*  RRCA            */
+    volatile uint32_t  RLCS;                                   /*  RLCS            */
+    volatile uint32_t  RRCS;                                   /*  RRCS            */
+    volatile uint32_t  RUI;                                    /*  RUI             */
+    volatile uint32_t  CTRL;                                   /*  CTRL            */
+    volatile uint32_t  STAT;                                   /*  STAT            */
+    volatile uint32_t  TDAD;                                   /*  TDAD            */
+    volatile uint32_t  RDAD;                                   /*  RDAD            */
+};
+
+
+#define SPDIF   (*(struct st_spdif   *)0xE8012000uL) /* SPDIF */
+
+
+#define SPDIFTLCA SPDIF.TLCA
+#define SPDIFTRCA SPDIF.TRCA
+#define SPDIFTLCS SPDIF.TLCS
+#define SPDIFTRCS SPDIF.TRCS
+#define SPDIFTUI SPDIF.TUI
+#define SPDIFRLCA SPDIF.RLCA
+#define SPDIFRRCA SPDIF.RRCA
+#define SPDIFRLCS SPDIF.RLCS
+#define SPDIFRRCS SPDIF.RRCS
+#define SPDIFRUI SPDIF.RUI
+#define SPDIFCTRL SPDIF.CTRL
+#define SPDIFSTAT SPDIF.STAT
+#define SPDIFTDAD SPDIF.TDAD
+#define SPDIFRDAD SPDIF.RDAD
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/spibsc_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/spibsc_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/spibsc_iodefine.h	(revision 270)
@@ -0,0 +1,173 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : spibsc_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef SPIBSC_IODEFINE_H
+#define SPIBSC_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_spibsc
+{                                                          /* SPIBSC           */
+    volatile uint32_t  CMNCR;                                  /*  CMNCR           */
+    volatile uint32_t  SSLDR;                                  /*  SSLDR           */
+    volatile uint32_t  SPBCR;                                  /*  SPBCR           */
+    volatile uint32_t  DRCR;                                   /*  DRCR            */
+    volatile uint32_t  DRCMR;                                  /*  DRCMR           */
+    volatile uint32_t  DREAR;                                  /*  DREAR           */
+    volatile uint32_t  DROPR;                                  /*  DROPR           */
+    volatile uint32_t  DRENR;                                  /*  DRENR           */
+    volatile uint32_t  SMCR;                                   /*  SMCR            */
+    volatile uint32_t  SMCMR;                                  /*  SMCMR           */
+    volatile uint32_t  SMADR;                                  /*  SMADR           */
+    volatile uint32_t  SMOPR;                                  /*  SMOPR           */
+    volatile uint32_t  SMENR;                                  /*  SMENR           */
+    volatile uint8_t   dummy1[4];                              /*                  */
+    union iodefine_reg32_t  SMRDR0;                        /*  SMRDR0          */
+    union iodefine_reg32_t  SMRDR1;                        /*  SMRDR1          */
+    union iodefine_reg32_t  SMWDR0;                        /*  SMWDR0          */
+    union iodefine_reg32_t  SMWDR1;                        /*  SMWDR1          */
+    
+    volatile uint32_t  CMNSR;                                  /*  CMNSR           */
+    volatile uint8_t   dummy2[12];                             /*                  */
+    volatile uint32_t  DRDMCR;                                 /*  DRDMCR          */
+    volatile uint32_t  DRDRENR;                                /*  DRDRENR         */
+    volatile uint32_t  SMDMCR;                                 /*  SMDMCR          */
+    volatile uint32_t  SMDRENR;                                /*  SMDRENR         */
+};
+
+
+#define SPIBSC0 (*(struct st_spibsc  *)0x3FEFA000uL) /* SPIBSC0 */
+#define SPIBSC1 (*(struct st_spibsc  *)0x3FEFB000uL) /* SPIBSC1 */
+
+
+/* Start of channnel array defines of SPIBSC */
+
+/* Channnel array defines of SPIBSC */
+/*(Sample) value = SPIBSC[ channel ]->CMNCR; */
+#define SPIBSC_COUNT  2
+#define SPIBSC_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &SPIBSC0, &SPIBSC1 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+
+/* End of channnel array defines of SPIBSC */
+
+
+#define CMNCR_0 SPIBSC0.CMNCR
+#define SSLDR_0 SPIBSC0.SSLDR
+#define SPBCR_0 SPIBSC0.SPBCR
+#define DRCR_0 SPIBSC0.DRCR
+#define DRCMR_0 SPIBSC0.DRCMR
+#define DREAR_0 SPIBSC0.DREAR
+#define DROPR_0 SPIBSC0.DROPR
+#define DRENR_0 SPIBSC0.DRENR
+#define SMCR_0 SPIBSC0.SMCR
+#define SMCMR_0 SPIBSC0.SMCMR
+#define SMADR_0 SPIBSC0.SMADR
+#define SMOPR_0 SPIBSC0.SMOPR
+#define SMENR_0 SPIBSC0.SMENR
+#define SMRDR0_0   SPIBSC0.SMRDR0.UINT32
+#define SMRDR0_0L  SPIBSC0.SMRDR0.UINT16[L]
+#define SMRDR0_0H  SPIBSC0.SMRDR0.UINT16[H]
+#define SMRDR0_0LL SPIBSC0.SMRDR0.UINT8[LL]
+#define SMRDR0_0LH SPIBSC0.SMRDR0.UINT8[LH]
+#define SMRDR0_0HL SPIBSC0.SMRDR0.UINT8[HL]
+#define SMRDR0_0HH SPIBSC0.SMRDR0.UINT8[HH]
+#define SMRDR1_0   SPIBSC0.SMRDR1.UINT32
+#define SMRDR1_0L  SPIBSC0.SMRDR1.UINT16[L]
+#define SMRDR1_0H  SPIBSC0.SMRDR1.UINT16[H]
+#define SMRDR1_0LL SPIBSC0.SMRDR1.UINT8[LL]
+#define SMRDR1_0LH SPIBSC0.SMRDR1.UINT8[LH]
+#define SMRDR1_0HL SPIBSC0.SMRDR1.UINT8[HL]
+#define SMRDR1_0HH SPIBSC0.SMRDR1.UINT8[HH]
+#define SMWDR0_0   SPIBSC0.SMWDR0.UINT32
+#define SMWDR0_0L  SPIBSC0.SMWDR0.UINT16[L]
+#define SMWDR0_0H  SPIBSC0.SMWDR0.UINT16[H]
+#define SMWDR0_0LL SPIBSC0.SMWDR0.UINT8[LL]
+#define SMWDR0_0LH SPIBSC0.SMWDR0.UINT8[LH]
+#define SMWDR0_0HL SPIBSC0.SMWDR0.UINT8[HL]
+#define SMWDR0_0HH SPIBSC0.SMWDR0.UINT8[HH]
+#define SMWDR1_0   SPIBSC0.SMWDR1.UINT32
+#define SMWDR1_0L  SPIBSC0.SMWDR1.UINT16[L]
+#define SMWDR1_0H  SPIBSC0.SMWDR1.UINT16[H]
+#define SMWDR1_0LL SPIBSC0.SMWDR1.UINT8[LL]
+#define SMWDR1_0LH SPIBSC0.SMWDR1.UINT8[LH]
+#define SMWDR1_0HL SPIBSC0.SMWDR1.UINT8[HL]
+#define SMWDR1_0HH SPIBSC0.SMWDR1.UINT8[HH]
+#define CMNSR_0 SPIBSC0.CMNSR
+#define DRDMCR_0 SPIBSC0.DRDMCR
+#define DRDRENR_0 SPIBSC0.DRDRENR
+#define SMDMCR_0 SPIBSC0.SMDMCR
+#define SMDRENR_0 SPIBSC0.SMDRENR
+#define CMNCR_1 SPIBSC1.CMNCR
+#define SSLDR_1 SPIBSC1.SSLDR
+#define SPBCR_1 SPIBSC1.SPBCR
+#define DRCR_1 SPIBSC1.DRCR
+#define DRCMR_1 SPIBSC1.DRCMR
+#define DREAR_1 SPIBSC1.DREAR
+#define DROPR_1 SPIBSC1.DROPR
+#define DRENR_1 SPIBSC1.DRENR
+#define SMCR_1 SPIBSC1.SMCR
+#define SMCMR_1 SPIBSC1.SMCMR
+#define SMADR_1 SPIBSC1.SMADR
+#define SMOPR_1 SPIBSC1.SMOPR
+#define SMENR_1 SPIBSC1.SMENR
+#define SMRDR0_1   SPIBSC1.SMRDR0.UINT32
+#define SMRDR0_1L  SPIBSC1.SMRDR0.UINT16[L]
+#define SMRDR0_1H  SPIBSC1.SMRDR0.UINT16[H]
+#define SMRDR0_1LL SPIBSC1.SMRDR0.UINT8[LL]
+#define SMRDR0_1LH SPIBSC1.SMRDR0.UINT8[LH]
+#define SMRDR0_1HL SPIBSC1.SMRDR0.UINT8[HL]
+#define SMRDR0_1HH SPIBSC1.SMRDR0.UINT8[HH]
+#define SMRDR1_1   SPIBSC1.SMRDR1.UINT32
+#define SMRDR1_1L  SPIBSC1.SMRDR1.UINT16[L]
+#define SMRDR1_1H  SPIBSC1.SMRDR1.UINT16[H]
+#define SMRDR1_1LL SPIBSC1.SMRDR1.UINT8[LL]
+#define SMRDR1_1LH SPIBSC1.SMRDR1.UINT8[LH]
+#define SMRDR1_1HL SPIBSC1.SMRDR1.UINT8[HL]
+#define SMRDR1_1HH SPIBSC1.SMRDR1.UINT8[HH]
+#define SMWDR0_1   SPIBSC1.SMWDR0.UINT32
+#define SMWDR0_1L  SPIBSC1.SMWDR0.UINT16[L]
+#define SMWDR0_1H  SPIBSC1.SMWDR0.UINT16[H]
+#define SMWDR0_1LL SPIBSC1.SMWDR0.UINT8[LL]
+#define SMWDR0_1LH SPIBSC1.SMWDR0.UINT8[LH]
+#define SMWDR0_1HL SPIBSC1.SMWDR0.UINT8[HL]
+#define SMWDR0_1HH SPIBSC1.SMWDR0.UINT8[HH]
+#define SMWDR1_1   SPIBSC1.SMWDR1.UINT32
+#define SMWDR1_1L  SPIBSC1.SMWDR1.UINT16[L]
+#define SMWDR1_1H  SPIBSC1.SMWDR1.UINT16[H]
+#define SMWDR1_1LL SPIBSC1.SMWDR1.UINT8[LL]
+#define SMWDR1_1LH SPIBSC1.SMWDR1.UINT8[LH]
+#define SMWDR1_1HL SPIBSC1.SMWDR1.UINT8[HL]
+#define SMWDR1_1HH SPIBSC1.SMWDR1.UINT8[HH]
+#define CMNSR_1 SPIBSC1.CMNSR
+#define DRDMCR_1 SPIBSC1.DRDMCR
+#define DRDRENR_1 SPIBSC1.DRDRENR
+#define SMDMCR_1 SPIBSC1.SMDMCR
+#define SMDRENR_1 SPIBSC1.SMDRENR
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/ssif_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/ssif_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/ssif_iodefine.h	(revision 270)
@@ -0,0 +1,131 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : ssif_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef SSIF_IODEFINE_H
+#define SSIF_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_ssif
+{                                                          /* SSIF             */
+    volatile uint32_t  SSICR;                                  /*  SSICR           */
+    volatile uint32_t  SSISR;                                  /*  SSISR           */
+    volatile uint8_t   dummy1[8];                              /*                  */
+    volatile uint32_t  SSIFCR;                                 /*  SSIFCR          */
+    volatile uint32_t  SSIFSR;                                 /*  SSIFSR          */
+    volatile uint32_t  SSIFTDR;                                /*  SSIFTDR         */
+    volatile uint32_t  SSIFRDR;                                /*  SSIFRDR         */
+    volatile uint32_t  SSITDMR;                                /*  SSITDMR         */
+    volatile uint32_t  SSIFCCR;                                /*  SSIFCCR         */
+    volatile uint32_t  SSIFCMR;                                /*  SSIFCMR         */
+    volatile uint32_t  SSIFCSR;                                /*  SSIFCSR         */
+};
+
+
+#define SSIF0   (*(struct st_ssif    *)0xE820B000uL) /* SSIF0 */
+#define SSIF1   (*(struct st_ssif    *)0xE820B800uL) /* SSIF1 */
+#define SSIF2   (*(struct st_ssif    *)0xE820C000uL) /* SSIF2 */
+#define SSIF3   (*(struct st_ssif    *)0xE820C800uL) /* SSIF3 */
+#define SSIF4   (*(struct st_ssif    *)0xE820D000uL) /* SSIF4 */
+#define SSIF5   (*(struct st_ssif    *)0xE820D800uL) /* SSIF5 */
+
+
+/* Start of channnel array defines of SSIF */
+
+/* Channnel array defines of SSIF */
+/*(Sample) value = SSIF[ channel ]->SSICR; */
+#define SSIF_COUNT  6
+#define SSIF_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &SSIF0, &SSIF1, &SSIF2, &SSIF3, &SSIF4, &SSIF5 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+
+/* End of channnel array defines of SSIF */
+
+
+#define SSICR_0 SSIF0.SSICR
+#define SSISR_0 SSIF0.SSISR
+#define SSIFCR_0 SSIF0.SSIFCR
+#define SSIFSR_0 SSIF0.SSIFSR
+#define SSIFTDR_0 SSIF0.SSIFTDR
+#define SSIFRDR_0 SSIF0.SSIFRDR
+#define SSITDMR_0 SSIF0.SSITDMR
+#define SSIFCCR_0 SSIF0.SSIFCCR
+#define SSIFCMR_0 SSIF0.SSIFCMR
+#define SSIFCSR_0 SSIF0.SSIFCSR
+#define SSICR_1 SSIF1.SSICR
+#define SSISR_1 SSIF1.SSISR
+#define SSIFCR_1 SSIF1.SSIFCR
+#define SSIFSR_1 SSIF1.SSIFSR
+#define SSIFTDR_1 SSIF1.SSIFTDR
+#define SSIFRDR_1 SSIF1.SSIFRDR
+#define SSITDMR_1 SSIF1.SSITDMR
+#define SSIFCCR_1 SSIF1.SSIFCCR
+#define SSIFCMR_1 SSIF1.SSIFCMR
+#define SSIFCSR_1 SSIF1.SSIFCSR
+#define SSICR_2 SSIF2.SSICR
+#define SSISR_2 SSIF2.SSISR
+#define SSIFCR_2 SSIF2.SSIFCR
+#define SSIFSR_2 SSIF2.SSIFSR
+#define SSIFTDR_2 SSIF2.SSIFTDR
+#define SSIFRDR_2 SSIF2.SSIFRDR
+#define SSITDMR_2 SSIF2.SSITDMR
+#define SSIFCCR_2 SSIF2.SSIFCCR
+#define SSIFCMR_2 SSIF2.SSIFCMR
+#define SSIFCSR_2 SSIF2.SSIFCSR
+#define SSICR_3 SSIF3.SSICR
+#define SSISR_3 SSIF3.SSISR
+#define SSIFCR_3 SSIF3.SSIFCR
+#define SSIFSR_3 SSIF3.SSIFSR
+#define SSIFTDR_3 SSIF3.SSIFTDR
+#define SSIFRDR_3 SSIF3.SSIFRDR
+#define SSITDMR_3 SSIF3.SSITDMR
+#define SSIFCCR_3 SSIF3.SSIFCCR
+#define SSIFCMR_3 SSIF3.SSIFCMR
+#define SSIFCSR_3 SSIF3.SSIFCSR
+#define SSICR_4 SSIF4.SSICR
+#define SSISR_4 SSIF4.SSISR
+#define SSIFCR_4 SSIF4.SSIFCR
+#define SSIFSR_4 SSIF4.SSIFSR
+#define SSIFTDR_4 SSIF4.SSIFTDR
+#define SSIFRDR_4 SSIF4.SSIFRDR
+#define SSITDMR_4 SSIF4.SSITDMR
+#define SSIFCCR_4 SSIF4.SSIFCCR
+#define SSIFCMR_4 SSIF4.SSIFCMR
+#define SSIFCSR_4 SSIF4.SSIFCSR
+#define SSICR_5 SSIF5.SSICR
+#define SSISR_5 SSIF5.SSISR
+#define SSIFCR_5 SSIF5.SSIFCR
+#define SSIFSR_5 SSIF5.SSIFSR
+#define SSIFTDR_5 SSIF5.SSIFTDR
+#define SSIFRDR_5 SSIF5.SSIFRDR
+#define SSITDMR_5 SSIF5.SSITDMR
+#define SSIFCCR_5 SSIF5.SSIFCCR
+#define SSIFCMR_5 SSIF5.SSIFCMR
+#define SSIFCSR_5 SSIF5.SSIFCSR
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/usb20_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/usb20_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/usb20_iodefine.h	(revision 270)
@@ -0,0 +1,546 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : usb20_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef USB20_IODEFINE_H
+#define USB20_IODEFINE_H
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_usb20
+{                                                          /* USB20            */
+    volatile uint16_t SYSCFG0;                                /*  SYSCFG0         */
+    volatile uint16_t BUSWAIT;                                /*  BUSWAIT         */
+    volatile uint16_t SYSSTS0;                                /*  SYSSTS0         */
+    volatile uint8_t   dummy1[2];                              /*                  */
+    volatile uint16_t DVSTCTR0;                               /*  DVSTCTR0        */
+    volatile uint8_t   dummy2[2];                              /*                  */
+    volatile uint16_t TESTMODE;                               /*  TESTMODE        */
+    volatile uint8_t   dummy3[2];                              /*                  */
+#define USB20_D0FBCFG_COUNT 2
+    volatile uint16_t D0FBCFG;                                /*  D0FBCFG         */
+    volatile uint16_t D1FBCFG;                                /*  D1FBCFG         */
+    union iodefine_reg32_t  CFIFO;                         /*  CFIFO           */
+#define USB20_D0FIFO_COUNT 2
+    union iodefine_reg32_t  D0FIFO;                        /*  D0FIFO          */
+    union iodefine_reg32_t  D1FIFO;                        /*  D1FIFO          */
+    
+    volatile uint16_t CFIFOSEL;                               /*  CFIFOSEL        */
+    volatile uint16_t CFIFOCTR;                               /*  CFIFOCTR        */
+    volatile uint8_t   dummy4[4];                              /*                  */
+/* start of struct st_usb20_from_d0fifosel */
+    volatile uint16_t D0FIFOSEL;                              /*  D0FIFOSEL       */
+    volatile uint16_t D0FIFOCTR;                              /*  D0FIFOCTR       */
+/* end of struct st_usb20_from_d0fifosel */
+/* start of struct st_usb20_from_d0fifosel */
+    volatile uint16_t D1FIFOSEL;                              /*  D1FIFOSEL       */
+    volatile uint16_t D1FIFOCTR;                              /*  D1FIFOCTR       */
+/* end of struct st_usb20_from_d0fifosel */
+#define USB20_INTENB0_COUNT 2
+    volatile uint16_t INTENB0;                                /*  INTENB0         */
+    volatile uint16_t INTENB1;                                /*  INTENB1         */
+    volatile uint8_t   dummy5[2];                              /*                  */
+    volatile uint16_t BRDYENB;                                /*  BRDYENB         */
+    volatile uint16_t NRDYENB;                                /*  NRDYENB         */
+    volatile uint16_t BEMPENB;                                /*  BEMPENB         */
+    volatile uint16_t SOFCFG;                                 /*  SOFCFG          */
+    volatile uint8_t   dummy6[2];                              /*                  */
+#define USB20_INTSTS0_COUNT 2
+    volatile uint16_t INTSTS0;                                /*  INTSTS0         */
+    volatile uint16_t INTSTS1;                                /*  INTSTS1         */
+    volatile uint8_t   dummy7[2];                              /*                  */
+    volatile uint16_t BRDYSTS;                                /*  BRDYSTS         */
+    volatile uint16_t NRDYSTS;                                /*  NRDYSTS         */
+    volatile uint16_t BEMPSTS;                                /*  BEMPSTS         */
+    volatile uint16_t FRMNUM;                                 /*  FRMNUM          */
+    volatile uint16_t UFRMNUM;                                /*  UFRMNUM         */
+    volatile uint16_t USBADDR;                                /*  USBADDR         */
+    volatile uint8_t   dummy8[2];                              /*                  */
+    volatile uint16_t USBREQ;                                 /*  USBREQ          */
+    volatile uint16_t USBVAL;                                 /*  USBVAL          */
+    volatile uint16_t USBINDX;                                /*  USBINDX         */
+    volatile uint16_t USBLENG;                                /*  USBLENG         */
+    volatile uint16_t DCPCFG;                                 /*  DCPCFG          */
+    volatile uint16_t DCPMAXP;                                /*  DCPMAXP         */
+    volatile uint16_t DCPCTR;                                 /*  DCPCTR          */
+    volatile uint8_t   dummy9[2];                              /*                  */
+    volatile uint16_t PIPESEL;                                /*  PIPESEL         */
+    volatile uint8_t   dummy10[2];                             /*                  */
+    volatile uint16_t PIPECFG;                                /*  PIPECFG         */
+    volatile uint16_t PIPEBUF;                                /*  PIPEBUF         */
+    volatile uint16_t PIPEMAXP;                               /*  PIPEMAXP        */
+    volatile uint16_t PIPEPERI;                               /*  PIPEPERI        */
+#define USB20_PIPE1CTR_COUNT 0xF
+    volatile uint16_t PIPE1CTR;                               /*  PIPE1CTR        */
+    volatile uint16_t PIPE2CTR;                               /*  PIPE2CTR        */
+    volatile uint16_t PIPE3CTR;                               /*  PIPE3CTR        */
+    volatile uint16_t PIPE4CTR;                               /*  PIPE4CTR        */
+    volatile uint16_t PIPE5CTR;                               /*  PIPE5CTR        */
+    volatile uint16_t PIPE6CTR;                               /*  PIPE6CTR        */
+    volatile uint16_t PIPE7CTR;                               /*  PIPE7CTR        */
+    volatile uint16_t PIPE8CTR;                               /*  PIPE8CTR        */
+    volatile uint16_t PIPE9CTR;                               /*  PIPE9CTR        */
+    volatile uint16_t PIPEACTR;                               /*  PIPEACTR        */
+    volatile uint16_t PIPEBCTR;                               /*  PIPEBCTR        */
+    volatile uint16_t PIPECCTR;                               /*  PIPECCTR        */
+    volatile uint16_t PIPEDCTR;                               /*  PIPEDCTR        */
+    volatile uint16_t PIPEECTR;                               /*  PIPEECTR        */
+    volatile uint16_t PIPEFCTR;                               /*  PIPEFCTR        */
+    volatile uint8_t   dummy11[2];                             /*                  */
+/* start of struct st_usb20_from_pipe1tre */
+    volatile uint16_t PIPE1TRE;                               /*  PIPE1TRE        */
+    volatile uint16_t PIPE1TRN;                               /*  PIPE1TRN        */
+/* end of struct st_usb20_from_pipe1tre */
+/* start of struct st_usb20_from_pipe1tre */
+    volatile uint16_t PIPE2TRE;                               /*  PIPE2TRE        */
+    volatile uint16_t PIPE2TRN;                               /*  PIPE2TRN        */
+/* end of struct st_usb20_from_pipe1tre */
+/* start of struct st_usb20_from_pipe1tre */
+    volatile uint16_t PIPE3TRE;                               /*  PIPE3TRE        */
+    volatile uint16_t PIPE3TRN;                               /*  PIPE3TRN        */
+/* end of struct st_usb20_from_pipe1tre */
+/* start of struct st_usb20_from_pipe1tre */
+    volatile uint16_t PIPE4TRE;                               /*  PIPE4TRE        */
+    volatile uint16_t PIPE4TRN;                               /*  PIPE4TRN        */
+/* end of struct st_usb20_from_pipe1tre */
+/* start of struct st_usb20_from_pipe1tre */
+    volatile uint16_t PIPE5TRE;                               /*  PIPE5TRE        */
+    volatile uint16_t PIPE5TRN;                               /*  PIPE5TRN        */
+/* end of struct st_usb20_from_pipe1tre */
+    volatile uint16_t PIPEBTRE;                               /*  PIPEBTRE        */
+    volatile uint16_t PIPEBTRN;                               /*  PIPEBTRN        */
+    volatile uint16_t PIPECTRE;                               /*  PIPECTRE        */
+    volatile uint16_t PIPECTRN;                               /*  PIPECTRN        */
+    volatile uint16_t PIPEDTRE;                               /*  PIPEDTRE        */
+    volatile uint16_t PIPEDTRN;                               /*  PIPEDTRN        */
+    volatile uint16_t PIPEETRE;                               /*  PIPEETRE        */
+    volatile uint16_t PIPEETRN;                               /*  PIPEETRN        */
+    volatile uint16_t PIPEFTRE;                               /*  PIPEFTRE        */
+    volatile uint16_t PIPEFTRN;                               /*  PIPEFTRN        */
+    volatile uint16_t PIPE9TRE;                               /*  PIPE9TRE        */
+    volatile uint16_t PIPE9TRN;                               /*  PIPE9TRN        */
+    volatile uint16_t PIPEATRE;                               /*  PIPEATRE        */
+    volatile uint16_t PIPEATRN;                               /*  PIPEATRN        */
+    volatile uint8_t   dummy12[16];                            /*                  */
+#define USB20_DEVADD0_COUNT 0xB
+    volatile uint16_t DEVADD0;                                /*  DEVADD0         */
+    volatile uint16_t DEVADD1;                                /*  DEVADD1         */
+    volatile uint16_t DEVADD2;                                /*  DEVADD2         */
+    volatile uint16_t DEVADD3;                                /*  DEVADD3         */
+    volatile uint16_t DEVADD4;                                /*  DEVADD4         */
+    volatile uint16_t DEVADD5;                                /*  DEVADD5         */
+    volatile uint16_t DEVADD6;                                /*  DEVADD6         */
+    volatile uint16_t DEVADD7;                                /*  DEVADD7         */
+    volatile uint16_t DEVADD8;                                /*  DEVADD8         */
+    volatile uint16_t DEVADD9;                                /*  DEVADD9         */
+    volatile uint16_t DEVADDA;                                /*  DEVADDA         */
+    volatile uint8_t   dummy13[28];                            /*                  */
+    volatile uint16_t SUSPMODE;                               /*  SUSPMODE        */
+    volatile uint8_t   dummy14[92];                            /*                  */
+/* start of struct st_usb20_from_dmfifob0 */
+    volatile uint32_t  D0FIFOB0;                               /*  D0FIFOB0        */
+    volatile uint32_t  D0FIFOB1;                               /*  D0FIFOB1        */
+    volatile uint32_t  D0FIFOB2;                               /*  D0FIFOB2        */
+    volatile uint32_t  D0FIFOB3;                               /*  D0FIFOB3        */
+    volatile uint32_t  D0FIFOB4;                               /*  D0FIFOB4        */
+    volatile uint32_t  D0FIFOB5;                               /*  D0FIFOB5        */
+    volatile uint32_t  D0FIFOB6;                               /*  D0FIFOB6        */
+    volatile uint32_t  D0FIFOB7;                               /*  D0FIFOB7        */
+/* end of struct st_usb20_from_dmfifob0 */
+/* start of struct st_usb20_from_dmfifob0 */
+    volatile uint32_t  D1FIFOB0;                               /*  D1FIFOB0        */
+    volatile uint32_t  D1FIFOB1;                               /*  D1FIFOB1        */
+    volatile uint32_t  D1FIFOB2;                               /*  D1FIFOB2        */
+    volatile uint32_t  D1FIFOB3;                               /*  D1FIFOB3        */
+    volatile uint32_t  D1FIFOB4;                               /*  D1FIFOB4        */
+    volatile uint32_t  D1FIFOB5;                               /*  D1FIFOB5        */
+    volatile uint32_t  D1FIFOB6;                               /*  D1FIFOB6        */
+    volatile uint32_t  D1FIFOB7;                               /*  D1FIFOB7        */
+/* end of struct st_usb20_from_dmfifob0 */
+};
+
+
+struct st_usb20_from_d0fifosel
+{
+    volatile uint16_t D0FIFOSEL;                              /*  D0FIFOSEL       */
+    volatile uint16_t D0FIFOCTR;                              /*  D0FIFOCTR       */
+};
+
+
+struct st_usb20_from_pipe1tre
+{
+    volatile uint16_t PIPE1TRE;                               /*  PIPE1TRE        */
+    volatile uint16_t PIPE1TRN;                               /*  PIPE1TRN        */
+};
+
+
+struct st_usb20_from_dmfifob0
+{
+#define USB20_D0FIFOB0_COUNT 0x8
+    volatile uint32_t  D0FIFOB0;                               /*  D0FIFOB0        */
+    volatile uint32_t  D0FIFOB1;                               /*  D0FIFOB1        */
+    volatile uint32_t  D0FIFOB2;                               /*  D0FIFOB2        */
+    volatile uint32_t  D0FIFOB3;                               /*  D0FIFOB3        */
+    volatile uint32_t  D0FIFOB4;                               /*  D0FIFOB4        */
+    volatile uint32_t  D0FIFOB5;                               /*  D0FIFOB5        */
+    volatile uint32_t  D0FIFOB6;                               /*  D0FIFOB6        */
+    volatile uint32_t  D0FIFOB7;                               /*  D0FIFOB7        */
+};
+
+
+#define USB200  (*(struct st_usb20   *)0xE8010000uL) /* USB200 */
+#define USB201  (*(struct st_usb20   *)0xE8207000uL) /* USB201 */
+
+
+/* Start of channnel array defines of USB20 */
+
+/* Channnel array defines of USB20 */
+/*(Sample) value = USB20[ channel ]->SYSCFG0; */
+#define USB20_COUNT  2
+#define USB20_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &USB200, &USB201 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+
+
+
+/* Channnel array defines of USB20_FROM_D0FIFOB0 */
+/*(Sample) value = USB20_FROM_D0FIFOB0[ channel ][ index ]->D0FIFOB0; */
+#define USB20_FROM_D0FIFOB0_COUNT  2
+#define USB20_FROM_D0FIFOB0_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+{ \
+    &USB200_FROM_D0FIFOB0, &USB200_FROM_D1FIFOB0 },{ \
+    &USB201_FROM_D0FIFOB0, &USB201_FROM_D1FIFOB0 \
+} \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define USB200_FROM_D0FIFOB0 (*(struct st_usb20_from_dmfifob0 *)&USB200.D0FIFOB0) /* USB200_FROM_D0FIFOB0 */
+#define USB200_FROM_D1FIFOB0 (*(struct st_usb20_from_dmfifob0 *)&USB200.D1FIFOB0) /* USB200_FROM_D1FIFOB0 */
+#define USB201_FROM_D0FIFOB0 (*(struct st_usb20_from_dmfifob0 *)&USB201.D0FIFOB0) /* USB201_FROM_D0FIFOB0 */
+#define USB201_FROM_D1FIFOB0 (*(struct st_usb20_from_dmfifob0 *)&USB201.D1FIFOB0) /* USB201_FROM_D1FIFOB0 */
+
+
+
+
+/* Channnel array defines of USB20_FROM_PIPE1ATRE */
+/*(Sample) value = USB20_FROM_PIPE1ATRE[ channel ][ index ]->PIPE1TRE; */
+#define USB20_FROM_PIPE1ATRE_COUNT  5
+#define USB20_FROM_PIPE1ATRE_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+{ \
+    &USB200_FROM_PIPE1TRE, &USB200_FROM_PIPE2TRE, &USB200_FROM_PIPE3TRE, &USB200_FROM_PIPE4TRE, &USB200_FROM_PIPE5TRE },{ \
+    &USB201_FROM_PIPE1TRE, &USB201_FROM_PIPE2TRE, &USB201_FROM_PIPE3TRE, &USB201_FROM_PIPE4TRE, &USB201_FROM_PIPE5TRE \
+} \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define USB200_FROM_PIPE1TRE (*(struct st_usb20_from_pipe1tre *)&USB200.PIPE1TRE) /* USB200_FROM_PIPE1TRE */
+#define USB200_FROM_PIPE2TRE (*(struct st_usb20_from_pipe1tre *)&USB200.PIPE2TRE) /* USB200_FROM_PIPE2TRE */
+#define USB200_FROM_PIPE3TRE (*(struct st_usb20_from_pipe1tre *)&USB200.PIPE3TRE) /* USB200_FROM_PIPE3TRE */
+#define USB200_FROM_PIPE4TRE (*(struct st_usb20_from_pipe1tre *)&USB200.PIPE4TRE) /* USB200_FROM_PIPE4TRE */
+#define USB200_FROM_PIPE5TRE (*(struct st_usb20_from_pipe1tre *)&USB200.PIPE5TRE) /* USB200_FROM_PIPE5TRE */
+#define USB201_FROM_PIPE1TRE (*(struct st_usb20_from_pipe1tre *)&USB201.PIPE1TRE) /* USB201_FROM_PIPE1TRE */
+#define USB201_FROM_PIPE2TRE (*(struct st_usb20_from_pipe1tre *)&USB201.PIPE2TRE) /* USB201_FROM_PIPE2TRE */
+#define USB201_FROM_PIPE3TRE (*(struct st_usb20_from_pipe1tre *)&USB201.PIPE3TRE) /* USB201_FROM_PIPE3TRE */
+#define USB201_FROM_PIPE4TRE (*(struct st_usb20_from_pipe1tre *)&USB201.PIPE4TRE) /* USB201_FROM_PIPE4TRE */
+#define USB201_FROM_PIPE5TRE (*(struct st_usb20_from_pipe1tre *)&USB201.PIPE5TRE) /* USB201_FROM_PIPE5TRE */
+
+
+
+
+/* Channnel array defines of USB20_FROM_D0FIFOSEL */
+/*(Sample) value = USB20_FROM_D0FIFOSEL[ channel ][ index ]->D0FIFOSEL; */
+#define USB20_FROM_D0FIFOSEL_COUNT  2
+#define USB20_FROM_D0FIFOSEL_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+{ \
+    &USB200_FROM_D0FIFOSEL, &USB200_FROM_D1FIFOSEL },{ \
+    &USB201_FROM_D0FIFOSEL, &USB201_FROM_D1FIFOSEL \
+} \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define USB200_FROM_D0FIFOSEL (*(struct st_usb20_from_d0fifosel *)&USB200.D0FIFOSEL) /* USB200_FROM_D0FIFOSEL */
+#define USB200_FROM_D1FIFOSEL (*(struct st_usb20_from_d0fifosel *)&USB200.D1FIFOSEL) /* USB200_FROM_D1FIFOSEL */
+#define USB201_FROM_D0FIFOSEL (*(struct st_usb20_from_d0fifosel *)&USB201.D0FIFOSEL) /* USB201_FROM_D0FIFOSEL */
+#define USB201_FROM_D1FIFOSEL (*(struct st_usb20_from_d0fifosel *)&USB201.D1FIFOSEL) /* USB201_FROM_D1FIFOSEL */
+
+
+/* End of channnel array defines of USB20 */
+
+
+#define SYSCFG0_0 USB200.SYSCFG0
+#define BUSWAIT_0 USB200.BUSWAIT
+#define SYSSTS0_0 USB200.SYSSTS0
+#define DVSTCTR0_0 USB200.DVSTCTR0
+#define TESTMODE_0 USB200.TESTMODE
+#define D0FBCFG_0 USB200.D0FBCFG
+#define D1FBCFG_0 USB200.D1FBCFG
+#define CFIFO_0   USB200.CFIFO.UINT32
+#define CFIFO_0L  USB200.CFIFO.UINT16[L]
+#define CFIFO_0H  USB200.CFIFO.UINT16[H]
+#define CFIFO_0LL USB200.CFIFO.UINT8[LL]
+#define CFIFO_0LH USB200.CFIFO.UINT8[LH]
+#define CFIFO_0HL USB200.CFIFO.UINT8[HL]
+#define CFIFO_0HH USB200.CFIFO.UINT8[HH]
+#define D0FIFO_0   USB200.D0FIFO.UINT32
+#define D0FIFO_0L  USB200.D0FIFO.UINT16[L]
+#define D0FIFO_0H  USB200.D0FIFO.UINT16[H]
+#define D0FIFO_0LL USB200.D0FIFO.UINT8[LL]
+#define D0FIFO_0LH USB200.D0FIFO.UINT8[LH]
+#define D0FIFO_0HL USB200.D0FIFO.UINT8[HL]
+#define D0FIFO_0HH USB200.D0FIFO.UINT8[HH]
+#define D1FIFO_0   USB200.D1FIFO.UINT32
+#define D1FIFO_0L  USB200.D1FIFO.UINT16[L]
+#define D1FIFO_0H  USB200.D1FIFO.UINT16[H]
+#define D1FIFO_0LL USB200.D1FIFO.UINT8[LL]
+#define D1FIFO_0LH USB200.D1FIFO.UINT8[LH]
+#define D1FIFO_0HL USB200.D1FIFO.UINT8[HL]
+#define D1FIFO_0HH USB200.D1FIFO.UINT8[HH]
+#define CFIFOSEL_0 USB200.CFIFOSEL
+#define CFIFOCTR_0 USB200.CFIFOCTR
+#define D0FIFOSEL_0 USB200.D0FIFOSEL
+#define D0FIFOCTR_0 USB200.D0FIFOCTR
+#define D1FIFOSEL_0 USB200.D1FIFOSEL
+#define D1FIFOCTR_0 USB200.D1FIFOCTR
+#define INTENB0_0 USB200.INTENB0
+#define INTENB1_0 USB200.INTENB1
+#define BRDYENB_0 USB200.BRDYENB
+#define NRDYENB_0 USB200.NRDYENB
+#define BEMPENB_0 USB200.BEMPENB
+#define SOFCFG_0 USB200.SOFCFG
+#define INTSTS0_0 USB200.INTSTS0
+#define INTSTS1_0 USB200.INTSTS1
+#define BRDYSTS_0 USB200.BRDYSTS
+#define NRDYSTS_0 USB200.NRDYSTS
+#define BEMPSTS_0 USB200.BEMPSTS
+#define FRMNUM_0 USB200.FRMNUM
+#define UFRMNUM_0 USB200.UFRMNUM
+#define USBADDR_0 USB200.USBADDR
+#define USBREQ_0 USB200.USBREQ
+#define USBVAL_0 USB200.USBVAL
+#define USBINDX_0 USB200.USBINDX
+#define USBLENG_0 USB200.USBLENG
+#define DCPCFG_0 USB200.DCPCFG
+#define DCPMAXP_0 USB200.DCPMAXP
+#define DCPCTR_0 USB200.DCPCTR
+#define PIPESEL_0 USB200.PIPESEL
+#define PIPECFG_0 USB200.PIPECFG
+#define PIPEBUF_0 USB200.PIPEBUF
+#define PIPEMAXP_0 USB200.PIPEMAXP
+#define PIPEPERI_0 USB200.PIPEPERI
+#define PIPE1CTR_0 USB200.PIPE1CTR
+#define PIPE2CTR_0 USB200.PIPE2CTR
+#define PIPE3CTR_0 USB200.PIPE3CTR
+#define PIPE4CTR_0 USB200.PIPE4CTR
+#define PIPE5CTR_0 USB200.PIPE5CTR
+#define PIPE6CTR_0 USB200.PIPE6CTR
+#define PIPE7CTR_0 USB200.PIPE7CTR
+#define PIPE8CTR_0 USB200.PIPE8CTR
+#define PIPE9CTR_0 USB200.PIPE9CTR
+#define PIPEACTR_0 USB200.PIPEACTR
+#define PIPEBCTR_0 USB200.PIPEBCTR
+#define PIPECCTR_0 USB200.PIPECCTR
+#define PIPEDCTR_0 USB200.PIPEDCTR
+#define PIPEECTR_0 USB200.PIPEECTR
+#define PIPEFCTR_0 USB200.PIPEFCTR
+#define PIPE1TRE_0 USB200.PIPE1TRE
+#define PIPE1TRN_0 USB200.PIPE1TRN
+#define PIPE2TRE_0 USB200.PIPE2TRE
+#define PIPE2TRN_0 USB200.PIPE2TRN
+#define PIPE3TRE_0 USB200.PIPE3TRE
+#define PIPE3TRN_0 USB200.PIPE3TRN
+#define PIPE4TRE_0 USB200.PIPE4TRE
+#define PIPE4TRN_0 USB200.PIPE4TRN
+#define PIPE5TRE_0 USB200.PIPE5TRE
+#define PIPE5TRN_0 USB200.PIPE5TRN
+#define PIPEBTRE_0 USB200.PIPEBTRE
+#define PIPEBTRN_0 USB200.PIPEBTRN
+#define PIPECTRE_0 USB200.PIPECTRE
+#define PIPECTRN_0 USB200.PIPECTRN
+#define PIPEDTRE_0 USB200.PIPEDTRE
+#define PIPEDTRN_0 USB200.PIPEDTRN
+#define PIPEETRE_0 USB200.PIPEETRE
+#define PIPEETRN_0 USB200.PIPEETRN
+#define PIPEFTRE_0 USB200.PIPEFTRE
+#define PIPEFTRN_0 USB200.PIPEFTRN
+#define PIPE9TRE_0 USB200.PIPE9TRE
+#define PIPE9TRN_0 USB200.PIPE9TRN
+#define PIPEATRE_0 USB200.PIPEATRE
+#define PIPEATRN_0 USB200.PIPEATRN
+#define DEVADD0_0 USB200.DEVADD0
+#define DEVADD1_0 USB200.DEVADD1
+#define DEVADD2_0 USB200.DEVADD2
+#define DEVADD3_0 USB200.DEVADD3
+#define DEVADD4_0 USB200.DEVADD4
+#define DEVADD5_0 USB200.DEVADD5
+#define DEVADD6_0 USB200.DEVADD6
+#define DEVADD7_0 USB200.DEVADD7
+#define DEVADD8_0 USB200.DEVADD8
+#define DEVADD9_0 USB200.DEVADD9
+#define DEVADDA_0 USB200.DEVADDA
+#define SUSPMODE_0 USB200.SUSPMODE
+#define D0FIFOB0_0 USB200.D0FIFOB0
+#define D0FIFOB1_0 USB200.D0FIFOB1
+#define D0FIFOB2_0 USB200.D0FIFOB2
+#define D0FIFOB3_0 USB200.D0FIFOB3
+#define D0FIFOB4_0 USB200.D0FIFOB4
+#define D0FIFOB5_0 USB200.D0FIFOB5
+#define D0FIFOB6_0 USB200.D0FIFOB6
+#define D0FIFOB7_0 USB200.D0FIFOB7
+#define D1FIFOB0_0 USB200.D1FIFOB0
+#define D1FIFOB1_0 USB200.D1FIFOB1
+#define D1FIFOB2_0 USB200.D1FIFOB2
+#define D1FIFOB3_0 USB200.D1FIFOB3
+#define D1FIFOB4_0 USB200.D1FIFOB4
+#define D1FIFOB5_0 USB200.D1FIFOB5
+#define D1FIFOB6_0 USB200.D1FIFOB6
+#define D1FIFOB7_0 USB200.D1FIFOB7
+#define SYSCFG0_1 USB201.SYSCFG0
+#define BUSWAIT_1 USB201.BUSWAIT
+#define SYSSTS0_1 USB201.SYSSTS0
+#define DVSTCTR0_1 USB201.DVSTCTR0
+#define TESTMODE_1 USB201.TESTMODE
+#define D0FBCFG_1 USB201.D0FBCFG
+#define D1FBCFG_1 USB201.D1FBCFG
+#define CFIFO_1   USB201.CFIFO.UINT32
+#define CFIFO_1L  USB201.CFIFO.UINT16[L]
+#define CFIFO_1H  USB201.CFIFO.UINT16[H]
+#define CFIFO_1LL USB201.CFIFO.UINT8[LL]
+#define CFIFO_1LH USB201.CFIFO.UINT8[LH]
+#define CFIFO_1HL USB201.CFIFO.UINT8[HL]
+#define CFIFO_1HH USB201.CFIFO.UINT8[HH]
+#define D0FIFO_1   USB201.D0FIFO.UINT32
+#define D0FIFO_1L  USB201.D0FIFO.UINT16[L]
+#define D0FIFO_1H  USB201.D0FIFO.UINT16[H]
+#define D0FIFO_1LL USB201.D0FIFO.UINT8[LL]
+#define D0FIFO_1LH USB201.D0FIFO.UINT8[LH]
+#define D0FIFO_1HL USB201.D0FIFO.UINT8[HL]
+#define D0FIFO_1HH USB201.D0FIFO.UINT8[HH]
+#define D1FIFO_1   USB201.D1FIFO.UINT32
+#define D1FIFO_1L  USB201.D1FIFO.UINT16[L]
+#define D1FIFO_1H  USB201.D1FIFO.UINT16[H]
+#define D1FIFO_1LL USB201.D1FIFO.UINT8[LL]
+#define D1FIFO_1LH USB201.D1FIFO.UINT8[LH]
+#define D1FIFO_1HL USB201.D1FIFO.UINT8[HL]
+#define D1FIFO_1HH USB201.D1FIFO.UINT8[HH]
+#define CFIFOSEL_1 USB201.CFIFOSEL
+#define CFIFOCTR_1 USB201.CFIFOCTR
+#define D0FIFOSEL_1 USB201.D0FIFOSEL
+#define D0FIFOCTR_1 USB201.D0FIFOCTR
+#define D1FIFOSEL_1 USB201.D1FIFOSEL
+#define D1FIFOCTR_1 USB201.D1FIFOCTR
+#define INTENB0_1 USB201.INTENB0
+#define INTENB1_1 USB201.INTENB1
+#define BRDYENB_1 USB201.BRDYENB
+#define NRDYENB_1 USB201.NRDYENB
+#define BEMPENB_1 USB201.BEMPENB
+#define SOFCFG_1 USB201.SOFCFG
+#define INTSTS0_1 USB201.INTSTS0
+#define INTSTS1_1 USB201.INTSTS1
+#define BRDYSTS_1 USB201.BRDYSTS
+#define NRDYSTS_1 USB201.NRDYSTS
+#define BEMPSTS_1 USB201.BEMPSTS
+#define FRMNUM_1 USB201.FRMNUM
+#define UFRMNUM_1 USB201.UFRMNUM
+#define USBADDR_1 USB201.USBADDR
+#define USBREQ_1 USB201.USBREQ
+#define USBVAL_1 USB201.USBVAL
+#define USBINDX_1 USB201.USBINDX
+#define USBLENG_1 USB201.USBLENG
+#define DCPCFG_1 USB201.DCPCFG
+#define DCPMAXP_1 USB201.DCPMAXP
+#define DCPCTR_1 USB201.DCPCTR
+#define PIPESEL_1 USB201.PIPESEL
+#define PIPECFG_1 USB201.PIPECFG
+#define PIPEBUF_1 USB201.PIPEBUF
+#define PIPEMAXP_1 USB201.PIPEMAXP
+#define PIPEPERI_1 USB201.PIPEPERI
+#define PIPE1CTR_1 USB201.PIPE1CTR
+#define PIPE2CTR_1 USB201.PIPE2CTR
+#define PIPE3CTR_1 USB201.PIPE3CTR
+#define PIPE4CTR_1 USB201.PIPE4CTR
+#define PIPE5CTR_1 USB201.PIPE5CTR
+#define PIPE6CTR_1 USB201.PIPE6CTR
+#define PIPE7CTR_1 USB201.PIPE7CTR
+#define PIPE8CTR_1 USB201.PIPE8CTR
+#define PIPE9CTR_1 USB201.PIPE9CTR
+#define PIPEACTR_1 USB201.PIPEACTR
+#define PIPEBCTR_1 USB201.PIPEBCTR
+#define PIPECCTR_1 USB201.PIPECCTR
+#define PIPEDCTR_1 USB201.PIPEDCTR
+#define PIPEECTR_1 USB201.PIPEECTR
+#define PIPEFCTR_1 USB201.PIPEFCTR
+#define PIPE1TRE_1 USB201.PIPE1TRE
+#define PIPE1TRN_1 USB201.PIPE1TRN
+#define PIPE2TRE_1 USB201.PIPE2TRE
+#define PIPE2TRN_1 USB201.PIPE2TRN
+#define PIPE3TRE_1 USB201.PIPE3TRE
+#define PIPE3TRN_1 USB201.PIPE3TRN
+#define PIPE4TRE_1 USB201.PIPE4TRE
+#define PIPE4TRN_1 USB201.PIPE4TRN
+#define PIPE5TRE_1 USB201.PIPE5TRE
+#define PIPE5TRN_1 USB201.PIPE5TRN
+#define PIPEBTRE_1 USB201.PIPEBTRE
+#define PIPEBTRN_1 USB201.PIPEBTRN
+#define PIPECTRE_1 USB201.PIPECTRE
+#define PIPECTRN_1 USB201.PIPECTRN
+#define PIPEDTRE_1 USB201.PIPEDTRE
+#define PIPEDTRN_1 USB201.PIPEDTRN
+#define PIPEETRE_1 USB201.PIPEETRE
+#define PIPEETRN_1 USB201.PIPEETRN
+#define PIPEFTRE_1 USB201.PIPEFTRE
+#define PIPEFTRN_1 USB201.PIPEFTRN
+#define PIPE9TRE_1 USB201.PIPE9TRE
+#define PIPE9TRN_1 USB201.PIPE9TRN
+#define PIPEATRE_1 USB201.PIPEATRE
+#define PIPEATRN_1 USB201.PIPEATRN
+#define DEVADD0_1 USB201.DEVADD0
+#define DEVADD1_1 USB201.DEVADD1
+#define DEVADD2_1 USB201.DEVADD2
+#define DEVADD3_1 USB201.DEVADD3
+#define DEVADD4_1 USB201.DEVADD4
+#define DEVADD5_1 USB201.DEVADD5
+#define DEVADD6_1 USB201.DEVADD6
+#define DEVADD7_1 USB201.DEVADD7
+#define DEVADD8_1 USB201.DEVADD8
+#define DEVADD9_1 USB201.DEVADD9
+#define DEVADDA_1 USB201.DEVADDA
+#define SUSPMODE_1 USB201.SUSPMODE
+#define D0FIFOB0_1 USB201.D0FIFOB0
+#define D0FIFOB1_1 USB201.D0FIFOB1
+#define D0FIFOB2_1 USB201.D0FIFOB2
+#define D0FIFOB3_1 USB201.D0FIFOB3
+#define D0FIFOB4_1 USB201.D0FIFOB4
+#define D0FIFOB5_1 USB201.D0FIFOB5
+#define D0FIFOB6_1 USB201.D0FIFOB6
+#define D0FIFOB7_1 USB201.D0FIFOB7
+#define D1FIFOB0_1 USB201.D1FIFOB0
+#define D1FIFOB1_1 USB201.D1FIFOB1
+#define D1FIFOB2_1 USB201.D1FIFOB2
+#define D1FIFOB3_1 USB201.D1FIFOB3
+#define D1FIFOB4_1 USB201.D1FIFOB4
+#define D1FIFOB5_1 USB201.D1FIFOB5
+#define D1FIFOB6_1 USB201.D1FIFOB6
+#define D1FIFOB7_1 USB201.D1FIFOB7
+/* <-SEC M1.10.1 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/vdc5_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/vdc5_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/vdc5_iodefine.h	(revision 270)
@@ -0,0 +1,1596 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : vdc5_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef VDC5_IODEFINE_H
+#define VDC5_IODEFINE_H
+/* ->QAC 0639 : Over 127 members (C90) */
+/* ->SEC M1.10.1 : Not magic number */
+
+struct st_vdc5
+{                                                          /* VDC5             */
+    volatile uint32_t  INP_UPDATE;                             /*  INP_UPDATE      */
+    volatile uint32_t  INP_SEL_CNT;                            /*  INP_SEL_CNT     */
+    volatile uint32_t  INP_EXT_SYNC_CNT;                       /*  INP_EXT_SYNC_CNT */
+    volatile uint32_t  INP_VSYNC_PH_ADJ;                       /*  INP_VSYNC_PH_ADJ */
+    volatile uint32_t  INP_DLY_ADJ;                            /*  INP_DLY_ADJ     */
+    volatile uint8_t   dummy1[108];                            /*                  */
+    volatile uint32_t  IMGCNT_UPDATE;                          /*  IMGCNT_UPDATE   */
+#define VDC5_IMGCNT_NR_CNT0_COUNT 2
+    volatile uint32_t  IMGCNT_NR_CNT0;                         /*  IMGCNT_NR_CNT0  */
+    volatile uint32_t  IMGCNT_NR_CNT1;                         /*  IMGCNT_NR_CNT1  */
+    volatile uint8_t   dummy2[20];                             /*                  */
+    volatile uint32_t  IMGCNT_MTX_MODE;                        /*  IMGCNT_MTX_MODE */
+    volatile uint32_t  IMGCNT_MTX_YG_ADJ0;                     /*  IMGCNT_MTX_YG_ADJ0 */
+    volatile uint32_t  IMGCNT_MTX_YG_ADJ1;                     /*  IMGCNT_MTX_YG_ADJ1 */
+    volatile uint32_t  IMGCNT_MTX_CBB_ADJ0;                    /*  IMGCNT_MTX_CBB_ADJ0 */
+    volatile uint32_t  IMGCNT_MTX_CBB_ADJ1;                    /*  IMGCNT_MTX_CBB_ADJ1 */
+    volatile uint32_t  IMGCNT_MTX_CRR_ADJ0;                    /*  IMGCNT_MTX_CRR_ADJ0 */
+    volatile uint32_t  IMGCNT_MTX_CRR_ADJ1;                    /*  IMGCNT_MTX_CRR_ADJ1 */
+    volatile uint8_t   dummy3[4];                              /*                  */
+    volatile uint32_t  IMGCNT_DRC_REG;                         /*  IMGCNT_DRC_REG  */
+    volatile uint8_t   dummy4[60];                             /*                  */
+/* start of struct st_vdc5_from_sc0_scl0_update */
+    volatile uint32_t  SC0_SCL0_UPDATE;                        /*  SC0_SCL0_UPDATE */
+#define VDC5_SC0_SCL0_FRC1_COUNT 7
+    volatile uint32_t  SC0_SCL0_FRC1;                          /*  SC0_SCL0_FRC1   */
+    volatile uint32_t  SC0_SCL0_FRC2;                          /*  SC0_SCL0_FRC2   */
+    volatile uint32_t  SC0_SCL0_FRC3;                          /*  SC0_SCL0_FRC3   */
+    volatile uint32_t  SC0_SCL0_FRC4;                          /*  SC0_SCL0_FRC4   */
+    volatile uint32_t  SC0_SCL0_FRC5;                          /*  SC0_SCL0_FRC5   */
+    volatile uint32_t  SC0_SCL0_FRC6;                          /*  SC0_SCL0_FRC6   */
+    volatile uint32_t  SC0_SCL0_FRC7;                          /*  SC0_SCL0_FRC7   */
+    volatile uint8_t   dummy5[4];                              /*                  */
+    volatile uint32_t  SC0_SCL0_FRC9;                          /*  SC0_SCL0_FRC9   */
+    volatile uint16_t SC0_SCL0_MON0;                          /*  SC0_SCL0_MON0   */
+    volatile uint16_t SC0_SCL0_INT;                           /*  SC0_SCL0_INT    */
+#define VDC5_SC0_SCL0_DS1_COUNT 7
+    volatile uint32_t  SC0_SCL0_DS1;                           /*  SC0_SCL0_DS1    */
+    volatile uint32_t  SC0_SCL0_DS2;                           /*  SC0_SCL0_DS2    */
+    volatile uint32_t  SC0_SCL0_DS3;                           /*  SC0_SCL0_DS3    */
+    volatile uint32_t  SC0_SCL0_DS4;                           /*  SC0_SCL0_DS4    */
+    volatile uint32_t  SC0_SCL0_DS5;                           /*  SC0_SCL0_DS5    */
+    volatile uint32_t  SC0_SCL0_DS6;                           /*  SC0_SCL0_DS6    */
+    volatile uint32_t  SC0_SCL0_DS7;                           /*  SC0_SCL0_DS7    */
+#define VDC5_SC0_SCL0_US1_COUNT 8
+    volatile uint32_t  SC0_SCL0_US1;                           /*  SC0_SCL0_US1    */
+    volatile uint32_t  SC0_SCL0_US2;                           /*  SC0_SCL0_US2    */
+    volatile uint32_t  SC0_SCL0_US3;                           /*  SC0_SCL0_US3    */
+    volatile uint32_t  SC0_SCL0_US4;                           /*  SC0_SCL0_US4    */
+    volatile uint32_t  SC0_SCL0_US5;                           /*  SC0_SCL0_US5    */
+    volatile uint32_t  SC0_SCL0_US6;                           /*  SC0_SCL0_US6    */
+    volatile uint32_t  SC0_SCL0_US7;                           /*  SC0_SCL0_US7    */
+    volatile uint32_t  SC0_SCL0_US8;                           /*  SC0_SCL0_US8    */
+    volatile uint8_t   dummy6[4];                              /*                  */
+    volatile uint32_t  SC0_SCL0_OVR1;                          /*  SC0_SCL0_OVR1   */
+    volatile uint8_t   dummy7[16];                             /*                  */
+    volatile uint32_t  SC0_SCL1_UPDATE;                        /*  SC0_SCL1_UPDATE */
+    volatile uint8_t   dummy8[4];                              /*                  */
+#define VDC5_SC0_SCL1_WR1_COUNT 4
+    volatile uint32_t  SC0_SCL1_WR1;                           /*  SC0_SCL1_WR1    */
+    volatile uint32_t  SC0_SCL1_WR2;                           /*  SC0_SCL1_WR2    */
+    volatile uint32_t  SC0_SCL1_WR3;                           /*  SC0_SCL1_WR3    */
+    volatile uint32_t  SC0_SCL1_WR4;                           /*  SC0_SCL1_WR4    */
+    volatile uint8_t   dummy9[4];                              /*                  */
+    volatile uint32_t  SC0_SCL1_WR5;                           /*  SC0_SCL1_WR5    */
+    volatile uint32_t  SC0_SCL1_WR6;                           /*  SC0_SCL1_WR6    */
+    volatile uint32_t  SC0_SCL1_WR7;                           /*  SC0_SCL1_WR7    */
+    volatile uint32_t  SC0_SCL1_WR8;                           /*  SC0_SCL1_WR8    */
+    volatile uint32_t  SC0_SCL1_WR9;                           /*  SC0_SCL1_WR9    */
+    volatile uint32_t  SC0_SCL1_WR10;                          /*  SC0_SCL1_WR10   */
+/* end of struct st_vdc5_from_sc0_scl0_update */
+    volatile uint32_t  SC0_SCL1_WR11;                          /*  SC0_SCL1_WR11   */
+    volatile uint32_t  SC0_SCL1_MON1;                          /*  SC0_SCL1_MON1   */
+/* start of struct st_vdc5_from_sc0_scl1_pbuf0 */
+#define VDC5_SC0_SCL1_PBUF0_COUNT 4
+    volatile uint32_t  SC0_SCL1_PBUF0;                         /*  SC0_SCL1_PBUF0  */
+    volatile uint32_t  SC0_SCL1_PBUF1;                         /*  SC0_SCL1_PBUF1  */
+    volatile uint32_t  SC0_SCL1_PBUF2;                         /*  SC0_SCL1_PBUF2  */
+    volatile uint32_t  SC0_SCL1_PBUF3;                         /*  SC0_SCL1_PBUF3  */
+    volatile uint32_t  SC0_SCL1_PBUF_FLD;                      /*  SC0_SCL1_PBUF_FLD */
+    volatile uint32_t  SC0_SCL1_PBUF_CNT;                      /*  SC0_SCL1_PBUF_CNT */
+/* end of struct st_vdc5_from_sc0_scl1_pbuf0 */
+    volatile uint8_t   dummy10[44];                            /*                  */
+/* start of struct st_vdc5_from_gr0_update */
+    volatile uint32_t  GR0_UPDATE;                             /*  GR0_UPDATE      */
+    volatile uint32_t  GR0_FLM_RD;                             /*  GR0_FLM_RD      */
+#define VDC5_GR0_FLM1_COUNT 6
+    volatile uint32_t  GR0_FLM1;                               /*  GR0_FLM1        */
+    volatile uint32_t  GR0_FLM2;                               /*  GR0_FLM2        */
+    volatile uint32_t  GR0_FLM3;                               /*  GR0_FLM3        */
+    volatile uint32_t  GR0_FLM4;                               /*  GR0_FLM4        */
+    volatile uint32_t  GR0_FLM5;                               /*  GR0_FLM5        */
+    volatile uint32_t  GR0_FLM6;                               /*  GR0_FLM6        */
+#define VDC5_GR0_AB1_COUNT 3
+    volatile uint32_t  GR0_AB1;                                /*  GR0_AB1         */
+    volatile uint32_t  GR0_AB2;                                /*  GR0_AB2         */
+    volatile uint32_t  GR0_AB3;                                /*  GR0_AB3         */
+/* end of struct st_vdc5_from_gr0_update */
+    volatile uint8_t   dummy11[12];                            /*                  */
+/* start of struct st_vdc5_from_gr0_ab7 */
+    volatile uint32_t  GR0_AB7;                                /*  GR0_AB7         */
+    volatile uint32_t  GR0_AB8;                                /*  GR0_AB8         */
+    volatile uint32_t  GR0_AB9;                                /*  GR0_AB9         */
+    volatile uint32_t  GR0_AB10;                               /*  GR0_AB10        */
+    volatile uint32_t  GR0_AB11;                               /*  GR0_AB11        */
+    volatile uint32_t  GR0_BASE;                               /*  GR0_BASE        */
+/* end of struct st_vdc5_from_gr0_ab7 */
+    volatile uint32_t  GR0_CLUT;                               /*  GR0_CLUT        */
+    volatile uint8_t   dummy12[44];                            /*                  */
+/* start of struct st_vdc5_from_adj0_update */
+    volatile uint32_t  ADJ0_UPDATE;                            /*  ADJ0_UPDATE     */
+    volatile uint32_t  ADJ0_BKSTR_SET;                         /*  ADJ0_BKSTR_SET  */
+#define VDC5_ADJ0_ENH_TIM1_COUNT 3
+    volatile uint32_t  ADJ0_ENH_TIM1;                          /*  ADJ0_ENH_TIM1   */
+    volatile uint32_t  ADJ0_ENH_TIM2;                          /*  ADJ0_ENH_TIM2   */
+    volatile uint32_t  ADJ0_ENH_TIM3;                          /*  ADJ0_ENH_TIM3   */
+#define VDC5_ADJ0_ENH_SHP1_COUNT 6
+    volatile uint32_t  ADJ0_ENH_SHP1;                          /*  ADJ0_ENH_SHP1   */
+    volatile uint32_t  ADJ0_ENH_SHP2;                          /*  ADJ0_ENH_SHP2   */
+    volatile uint32_t  ADJ0_ENH_SHP3;                          /*  ADJ0_ENH_SHP3   */
+    volatile uint32_t  ADJ0_ENH_SHP4;                          /*  ADJ0_ENH_SHP4   */
+    volatile uint32_t  ADJ0_ENH_SHP5;                          /*  ADJ0_ENH_SHP5   */
+    volatile uint32_t  ADJ0_ENH_SHP6;                          /*  ADJ0_ENH_SHP6   */
+#define VDC5_ADJ0_ENH_LTI1_COUNT 2
+    volatile uint32_t  ADJ0_ENH_LTI1;                          /*  ADJ0_ENH_LTI1   */
+    volatile uint32_t  ADJ0_ENH_LTI2;                          /*  ADJ0_ENH_LTI2   */
+    volatile uint32_t  ADJ0_MTX_MODE;                          /*  ADJ0_MTX_MODE   */
+    volatile uint32_t  ADJ0_MTX_YG_ADJ0;                       /*  ADJ0_MTX_YG_ADJ0 */
+    volatile uint32_t  ADJ0_MTX_YG_ADJ1;                       /*  ADJ0_MTX_YG_ADJ1 */
+    volatile uint32_t  ADJ0_MTX_CBB_ADJ0;                      /*  ADJ0_MTX_CBB_ADJ0 */
+    volatile uint32_t  ADJ0_MTX_CBB_ADJ1;                      /*  ADJ0_MTX_CBB_ADJ1 */
+    volatile uint32_t  ADJ0_MTX_CRR_ADJ0;                      /*  ADJ0_MTX_CRR_ADJ0 */
+    volatile uint32_t  ADJ0_MTX_CRR_ADJ1;                      /*  ADJ0_MTX_CRR_ADJ1 */
+/* end of struct st_vdc5_from_adj0_update */
+    volatile uint8_t   dummy13[48];                            /*                  */
+/* start of struct st_vdc5_from_gr0_update */
+    volatile uint32_t  GR2_UPDATE;                             /*  GR2_UPDATE      */
+    volatile uint32_t  GR2_FLM_RD;                             /*  GR2_FLM_RD      */
+#define VDC5_GR2_FLM1_COUNT 6
+    volatile uint32_t  GR2_FLM1;                               /*  GR2_FLM1        */
+    volatile uint32_t  GR2_FLM2;                               /*  GR2_FLM2        */
+    volatile uint32_t  GR2_FLM3;                               /*  GR2_FLM3        */
+    volatile uint32_t  GR2_FLM4;                               /*  GR2_FLM4        */
+    volatile uint32_t  GR2_FLM5;                               /*  GR2_FLM5        */
+    volatile uint32_t  GR2_FLM6;                               /*  GR2_FLM6        */
+#define VDC5_GR2_AB1_COUNT 3
+    volatile uint32_t  GR2_AB1;                                /*  GR2_AB1         */
+    volatile uint32_t  GR2_AB2;                                /*  GR2_AB2         */
+    volatile uint32_t  GR2_AB3;                                /*  GR2_AB3         */
+/* end of struct st_vdc5_from_gr0_update */
+    volatile uint32_t  GR2_AB4;                                /*  GR2_AB4         */
+    volatile uint32_t  GR2_AB5;                                /*  GR2_AB5         */
+    volatile uint32_t  GR2_AB6;                                /*  GR2_AB6         */
+/* start of struct st_vdc5_from_gr0_ab7 */
+    volatile uint32_t  GR2_AB7;                                /*  GR2_AB7         */
+    volatile uint32_t  GR2_AB8;                                /*  GR2_AB8         */
+    volatile uint32_t  GR2_AB9;                                /*  GR2_AB9         */
+    volatile uint32_t  GR2_AB10;                               /*  GR2_AB10        */
+    volatile uint32_t  GR2_AB11;                               /*  GR2_AB11        */
+    volatile uint32_t  GR2_BASE;                               /*  GR2_BASE        */
+/* end of struct st_vdc5_from_gr0_ab7 */
+    volatile uint32_t  GR2_CLUT;                               /*  GR2_CLUT        */
+    volatile uint32_t  GR2_MON;                                /*  GR2_MON         */
+    volatile uint8_t   dummy14[40];                            /*                  */
+/* start of struct st_vdc5_from_gr0_update */
+    volatile uint32_t  GR3_UPDATE;                             /*  GR3_UPDATE      */
+    volatile uint32_t  GR3_FLM_RD;                             /*  GR3_FLM_RD      */
+#define VDC5_GR3_FLM1_COUNT 6
+    volatile uint32_t  GR3_FLM1;                               /*  GR3_FLM1        */
+    volatile uint32_t  GR3_FLM2;                               /*  GR3_FLM2        */
+    volatile uint32_t  GR3_FLM3;                               /*  GR3_FLM3        */
+    volatile uint32_t  GR3_FLM4;                               /*  GR3_FLM4        */
+    volatile uint32_t  GR3_FLM5;                               /*  GR3_FLM5        */
+    volatile uint32_t  GR3_FLM6;                               /*  GR3_FLM6        */
+#define VDC5_GR3_AB1_COUNT 3
+    volatile uint32_t  GR3_AB1;                                /*  GR3_AB1         */
+    volatile uint32_t  GR3_AB2;                                /*  GR3_AB2         */
+    volatile uint32_t  GR3_AB3;                                /*  GR3_AB3         */
+/* end of struct st_vdc5_from_gr0_update */
+    volatile uint32_t  GR3_AB4;                                /*  GR3_AB4         */
+    volatile uint32_t  GR3_AB5;                                /*  GR3_AB5         */
+    volatile uint32_t  GR3_AB6;                                /*  GR3_AB6         */
+/* start of struct st_vdc5_from_gr0_ab7 */
+    volatile uint32_t  GR3_AB7;                                /*  GR3_AB7         */
+    volatile uint32_t  GR3_AB8;                                /*  GR3_AB8         */
+    volatile uint32_t  GR3_AB9;                                /*  GR3_AB9         */
+    volatile uint32_t  GR3_AB10;                               /*  GR3_AB10        */
+    volatile uint32_t  GR3_AB11;                               /*  GR3_AB11        */
+    volatile uint32_t  GR3_BASE;                               /*  GR3_BASE        */
+/* end of struct st_vdc5_from_gr0_ab7 */
+    volatile uint32_t  GR3_CLUT_INT;                           /*  GR3_CLUT_INT    */
+    volatile uint32_t  GR3_MON;                                /*  GR3_MON         */
+    volatile uint8_t   dummy15[40];                            /*                  */
+    volatile uint32_t  GAM_G_UPDATE;                           /*  GAM_G_UPDATE    */
+    volatile uint32_t  GAM_SW;                                 /*  GAM_SW          */
+#define VDC5_GAM_G_LUT1_COUNT 16
+    volatile uint32_t  GAM_G_LUT1;                             /*  GAM_G_LUT1      */
+    volatile uint32_t  GAM_G_LUT2;                             /*  GAM_G_LUT2      */
+    volatile uint32_t  GAM_G_LUT3;                             /*  GAM_G_LUT3      */
+    volatile uint32_t  GAM_G_LUT4;                             /*  GAM_G_LUT4      */
+    volatile uint32_t  GAM_G_LUT5;                             /*  GAM_G_LUT5      */
+    volatile uint32_t  GAM_G_LUT6;                             /*  GAM_G_LUT6      */
+    volatile uint32_t  GAM_G_LUT7;                             /*  GAM_G_LUT7      */
+    volatile uint32_t  GAM_G_LUT8;                             /*  GAM_G_LUT8      */
+    volatile uint32_t  GAM_G_LUT9;                             /*  GAM_G_LUT9      */
+    volatile uint32_t  GAM_G_LUT10;                            /*  GAM_G_LUT10     */
+    volatile uint32_t  GAM_G_LUT11;                            /*  GAM_G_LUT11     */
+    volatile uint32_t  GAM_G_LUT12;                            /*  GAM_G_LUT12     */
+    volatile uint32_t  GAM_G_LUT13;                            /*  GAM_G_LUT13     */
+    volatile uint32_t  GAM_G_LUT14;                            /*  GAM_G_LUT14     */
+    volatile uint32_t  GAM_G_LUT15;                            /*  GAM_G_LUT15     */
+    volatile uint32_t  GAM_G_LUT16;                            /*  GAM_G_LUT16     */
+#define VDC5_GAM_G_AREA1_COUNT 8
+    volatile uint32_t  GAM_G_AREA1;                            /*  GAM_G_AREA1     */
+    volatile uint32_t  GAM_G_AREA2;                            /*  GAM_G_AREA2     */
+    volatile uint32_t  GAM_G_AREA3;                            /*  GAM_G_AREA3     */
+    volatile uint32_t  GAM_G_AREA4;                            /*  GAM_G_AREA4     */
+    volatile uint32_t  GAM_G_AREA5;                            /*  GAM_G_AREA5     */
+    volatile uint32_t  GAM_G_AREA6;                            /*  GAM_G_AREA6     */
+    volatile uint32_t  GAM_G_AREA7;                            /*  GAM_G_AREA7     */
+    volatile uint32_t  GAM_G_AREA8;                            /*  GAM_G_AREA8     */
+    volatile uint8_t   dummy16[24];                            /*                  */
+    volatile uint32_t  GAM_B_UPDATE;                           /*  GAM_B_UPDATE    */
+    volatile uint8_t   dummy17[4];                             /*                  */
+#define VDC5_GAM_B_LUT1_COUNT 16
+    volatile uint32_t  GAM_B_LUT1;                             /*  GAM_B_LUT1      */
+    volatile uint32_t  GAM_B_LUT2;                             /*  GAM_B_LUT2      */
+    volatile uint32_t  GAM_B_LUT3;                             /*  GAM_B_LUT3      */
+    volatile uint32_t  GAM_B_LUT4;                             /*  GAM_B_LUT4      */
+    volatile uint32_t  GAM_B_LUT5;                             /*  GAM_B_LUT5      */
+    volatile uint32_t  GAM_B_LUT6;                             /*  GAM_B_LUT6      */
+    volatile uint32_t  GAM_B_LUT7;                             /*  GAM_B_LUT7      */
+    volatile uint32_t  GAM_B_LUT8;                             /*  GAM_B_LUT8      */
+    volatile uint32_t  GAM_B_LUT9;                             /*  GAM_B_LUT9      */
+    volatile uint32_t  GAM_B_LUT10;                            /*  GAM_B_LUT10     */
+    volatile uint32_t  GAM_B_LUT11;                            /*  GAM_B_LUT11     */
+    volatile uint32_t  GAM_B_LUT12;                            /*  GAM_B_LUT12     */
+    volatile uint32_t  GAM_B_LUT13;                            /*  GAM_B_LUT13     */
+    volatile uint32_t  GAM_B_LUT14;                            /*  GAM_B_LUT14     */
+    volatile uint32_t  GAM_B_LUT15;                            /*  GAM_B_LUT15     */
+    volatile uint32_t  GAM_B_LUT16;                            /*  GAM_B_LUT16     */
+#define VDC5_GAM_B_AREA1_COUNT 8
+    volatile uint32_t  GAM_B_AREA1;                            /*  GAM_B_AREA1     */
+    volatile uint32_t  GAM_B_AREA2;                            /*  GAM_B_AREA2     */
+    volatile uint32_t  GAM_B_AREA3;                            /*  GAM_B_AREA3     */
+    volatile uint32_t  GAM_B_AREA4;                            /*  GAM_B_AREA4     */
+    volatile uint32_t  GAM_B_AREA5;                            /*  GAM_B_AREA5     */
+    volatile uint32_t  GAM_B_AREA6;                            /*  GAM_B_AREA6     */
+    volatile uint32_t  GAM_B_AREA7;                            /*  GAM_B_AREA7     */
+    volatile uint32_t  GAM_B_AREA8;                            /*  GAM_B_AREA8     */
+    volatile uint8_t   dummy18[24];                            /*                  */
+    volatile uint32_t  GAM_R_UPDATE;                           /*  GAM_R_UPDATE    */
+    volatile uint8_t   dummy19[4];                             /*                  */
+#define VDC5_GAM_R_LUT1_COUNT 16
+    volatile uint32_t  GAM_R_LUT1;                             /*  GAM_R_LUT1      */
+    volatile uint32_t  GAM_R_LUT2;                             /*  GAM_R_LUT2      */
+    volatile uint32_t  GAM_R_LUT3;                             /*  GAM_R_LUT3      */
+    volatile uint32_t  GAM_R_LUT4;                             /*  GAM_R_LUT4      */
+    volatile uint32_t  GAM_R_LUT5;                             /*  GAM_R_LUT5      */
+    volatile uint32_t  GAM_R_LUT6;                             /*  GAM_R_LUT6      */
+    volatile uint32_t  GAM_R_LUT7;                             /*  GAM_R_LUT7      */
+    volatile uint32_t  GAM_R_LUT8;                             /*  GAM_R_LUT8      */
+    volatile uint32_t  GAM_R_LUT9;                             /*  GAM_R_LUT9      */
+    volatile uint32_t  GAM_R_LUT10;                            /*  GAM_R_LUT10     */
+    volatile uint32_t  GAM_R_LUT11;                            /*  GAM_R_LUT11     */
+    volatile uint32_t  GAM_R_LUT12;                            /*  GAM_R_LUT12     */
+    volatile uint32_t  GAM_R_LUT13;                            /*  GAM_R_LUT13     */
+    volatile uint32_t  GAM_R_LUT14;                            /*  GAM_R_LUT14     */
+    volatile uint32_t  GAM_R_LUT15;                            /*  GAM_R_LUT15     */
+    volatile uint32_t  GAM_R_LUT16;                            /*  GAM_R_LUT16     */
+#define VDC5_GAM_R_AREA1_COUNT 8
+    volatile uint32_t  GAM_R_AREA1;                            /*  GAM_R_AREA1     */
+    volatile uint32_t  GAM_R_AREA2;                            /*  GAM_R_AREA2     */
+    volatile uint32_t  GAM_R_AREA3;                            /*  GAM_R_AREA3     */
+    volatile uint32_t  GAM_R_AREA4;                            /*  GAM_R_AREA4     */
+    volatile uint32_t  GAM_R_AREA5;                            /*  GAM_R_AREA5     */
+    volatile uint32_t  GAM_R_AREA6;                            /*  GAM_R_AREA6     */
+    volatile uint32_t  GAM_R_AREA7;                            /*  GAM_R_AREA7     */
+    volatile uint32_t  GAM_R_AREA8;                            /*  GAM_R_AREA8     */
+    volatile uint8_t   dummy20[24];                            /*                  */
+    volatile uint32_t  TCON_UPDATE;                            /*  TCON_UPDATE     */
+    volatile uint32_t  TCON_TIM;                               /*  TCON_TIM        */
+#define VDC5_TCON_TIM_STVA1_COUNT 2
+    volatile uint32_t  TCON_TIM_STVA1;                         /*  TCON_TIM_STVA1  */
+    volatile uint32_t  TCON_TIM_STVA2;                         /*  TCON_TIM_STVA2  */
+#define VDC5_TCON_TIM_STVB1_COUNT 2
+    volatile uint32_t  TCON_TIM_STVB1;                         /*  TCON_TIM_STVB1  */
+    volatile uint32_t  TCON_TIM_STVB2;                         /*  TCON_TIM_STVB2  */
+#define VDC5_TCON_TIM_STH1_COUNT 2
+    volatile uint32_t  TCON_TIM_STH1;                          /*  TCON_TIM_STH1   */
+    volatile uint32_t  TCON_TIM_STH2;                          /*  TCON_TIM_STH2   */
+#define VDC5_TCON_TIM_STB1_COUNT 2
+    volatile uint32_t  TCON_TIM_STB1;                          /*  TCON_TIM_STB1   */
+    volatile uint32_t  TCON_TIM_STB2;                          /*  TCON_TIM_STB2   */
+#define VDC5_TCON_TIM_CPV1_COUNT 2
+    volatile uint32_t  TCON_TIM_CPV1;                          /*  TCON_TIM_CPV1   */
+    volatile uint32_t  TCON_TIM_CPV2;                          /*  TCON_TIM_CPV2   */
+#define VDC5_TCON_TIM_POLA1_COUNT 2
+    volatile uint32_t  TCON_TIM_POLA1;                         /*  TCON_TIM_POLA1  */
+    volatile uint32_t  TCON_TIM_POLA2;                         /*  TCON_TIM_POLA2  */
+#define VDC5_TCON_TIM_POLB1_COUNT 2
+    volatile uint32_t  TCON_TIM_POLB1;                         /*  TCON_TIM_POLB1  */
+    volatile uint32_t  TCON_TIM_POLB2;                         /*  TCON_TIM_POLB2  */
+    volatile uint32_t  TCON_TIM_DE;                            /*  TCON_TIM_DE     */
+    volatile uint8_t   dummy21[60];                            /*                  */
+    volatile uint32_t  OUT_UPDATE;                             /*  OUT_UPDATE      */
+    volatile uint32_t  OUT_SET;                                /*  OUT_SET         */
+#define VDC5_OUT_BRIGHT1_COUNT 2
+    volatile uint32_t  OUT_BRIGHT1;                            /*  OUT_BRIGHT1     */
+    volatile uint32_t  OUT_BRIGHT2;                            /*  OUT_BRIGHT2     */
+    volatile uint32_t  OUT_CONTRAST;                           /*  OUT_CONTRAST    */
+    volatile uint32_t  OUT_PDTHA;                              /*  OUT_PDTHA       */
+    volatile uint8_t   dummy22[12];                            /*                  */
+    volatile uint32_t  OUT_CLK_PHASE;                          /*  OUT_CLK_PHASE   */
+    volatile uint8_t   dummy23[88];                            /*                  */
+#define VDC5_SYSCNT_INT1_COUNT 6
+    volatile uint32_t  SYSCNT_INT1;                            /*  SYSCNT_INT1     */
+    volatile uint32_t  SYSCNT_INT2;                            /*  SYSCNT_INT2     */
+    volatile uint32_t  SYSCNT_INT3;                            /*  SYSCNT_INT3     */
+    volatile uint32_t  SYSCNT_INT4;                            /*  SYSCNT_INT4     */
+    volatile uint32_t  SYSCNT_INT5;                            /*  SYSCNT_INT5     */
+    volatile uint32_t  SYSCNT_INT6;                            /*  SYSCNT_INT6     */
+    volatile uint16_t SYSCNT_PANEL_CLK;                       /*  SYSCNT_PANEL_CLK */
+    volatile uint16_t SYSCNT_CLUT;                            /*  SYSCNT_CLUT     */
+    volatile uint8_t   dummy24[356];                           /*                  */
+/* start of struct st_vdc5_from_sc0_scl0_update */
+    volatile uint32_t  SC1_SCL0_UPDATE;                        /*  SC1_SCL0_UPDATE */
+#define VDC5_SC1_SCL0_FRC1_COUNT 7
+    volatile uint32_t  SC1_SCL0_FRC1;                          /*  SC1_SCL0_FRC1   */
+    volatile uint32_t  SC1_SCL0_FRC2;                          /*  SC1_SCL0_FRC2   */
+    volatile uint32_t  SC1_SCL0_FRC3;                          /*  SC1_SCL0_FRC3   */
+    volatile uint32_t  SC1_SCL0_FRC4;                          /*  SC1_SCL0_FRC4   */
+    volatile uint32_t  SC1_SCL0_FRC5;                          /*  SC1_SCL0_FRC5   */
+    volatile uint32_t  SC1_SCL0_FRC6;                          /*  SC1_SCL0_FRC6   */
+    volatile uint32_t  SC1_SCL0_FRC7;                          /*  SC1_SCL0_FRC7   */
+    volatile uint8_t   dummy25[4];                             /*                  */
+    volatile uint32_t  SC1_SCL0_FRC9;                          /*  SC1_SCL0_FRC9   */
+    volatile uint16_t SC1_SCL0_MON0;                          /*  SC1_SCL0_MON0   */
+    volatile uint16_t SC1_SCL0_INT;                           /*  SC1_SCL0_INT    */
+#define VDC5_SC1_SC1_SCL0_DS1_COUNT 7
+    volatile uint32_t  SC1_SCL0_DS1;                           /*  SC1_SCL0_DS1    */
+    volatile uint32_t  SC1_SCL0_DS2;                           /*  SC1_SCL0_DS2    */
+    volatile uint32_t  SC1_SCL0_DS3;                           /*  SC1_SCL0_DS3    */
+    volatile uint32_t  SC1_SCL0_DS4;                           /*  SC1_SCL0_DS4    */
+    volatile uint32_t  SC1_SCL0_DS5;                           /*  SC1_SCL0_DS5    */
+    volatile uint32_t  SC1_SCL0_DS6;                           /*  SC1_SCL0_DS6    */
+    volatile uint32_t  SC1_SCL0_DS7;                           /*  SC1_SCL0_DS7    */
+#define VDC5_SC1_SC1_SCL0_US1_COUNT 8
+    volatile uint32_t  SC1_SCL0_US1;                           /*  SC1_SCL0_US1    */
+    volatile uint32_t  SC1_SCL0_US2;                           /*  SC1_SCL0_US2    */
+    volatile uint32_t  SC1_SCL0_US3;                           /*  SC1_SCL0_US3    */
+    volatile uint32_t  SC1_SCL0_US4;                           /*  SC1_SCL0_US4    */
+    volatile uint32_t  SC1_SCL0_US5;                           /*  SC1_SCL0_US5    */
+    volatile uint32_t  SC1_SCL0_US6;                           /*  SC1_SCL0_US6    */
+    volatile uint32_t  SC1_SCL0_US7;                           /*  SC1_SCL0_US7    */
+    volatile uint32_t  SC1_SCL0_US8;                           /*  SC1_SCL0_US8    */
+    volatile uint8_t   dummy26[4];                             /*                  */
+    volatile uint32_t  SC1_SCL0_OVR1;                          /*  SC1_SCL0_OVR1   */
+    volatile uint8_t   dummy27[16];                            /*                  */
+    volatile uint32_t  SC1_SCL1_UPDATE;                        /*  SC1_SCL1_UPDATE */
+    volatile uint8_t   dummy28[4];                             /*                  */
+#define VDC5_SC1_SCL1_WR1_COUNT 4
+    volatile uint32_t  SC1_SCL1_WR1;                           /*  SC1_SCL1_WR1    */
+    volatile uint32_t  SC1_SCL1_WR2;                           /*  SC1_SCL1_WR2    */
+    volatile uint32_t  SC1_SCL1_WR3;                           /*  SC1_SCL1_WR3    */
+    volatile uint32_t  SC1_SCL1_WR4;                           /*  SC1_SCL1_WR4    */
+    volatile uint8_t   dummy29[4];                             /*                  */
+    volatile uint32_t  SC1_SCL1_WR5;                           /*  SC1_SCL1_WR5    */
+    volatile uint32_t  SC1_SCL1_WR6;                           /*  SC1_SCL1_WR6    */
+    volatile uint32_t  SC1_SCL1_WR7;                           /*  SC1_SCL1_WR7    */
+    volatile uint32_t  SC1_SCL1_WR8;                           /*  SC1_SCL1_WR8    */
+    volatile uint32_t  SC1_SCL1_WR9;                           /*  SC1_SCL1_WR9    */
+    volatile uint32_t  SC1_SCL1_WR10;                          /*  SC1_SCL1_WR10   */
+/* end of struct st_vdc5_from_sc0_scl0_update */
+    volatile uint32_t  SC1_SCL1_WR11;                          /*  SC1_SCL1_WR11   */
+    volatile uint32_t  SC1_SCL1_MON1;                          /*  SC1_SCL1_MON1   */
+/* start of struct st_vdc5_from_sc0_scl1_pbuf0 */
+#define VDC5_SC1_SCL1_PBUF0_COUNT 4
+    volatile uint32_t  SC1_SCL1_PBUF0;                         /*  SC1_SCL1_PBUF0  */
+    volatile uint32_t  SC1_SCL1_PBUF1;                         /*  SC1_SCL1_PBUF1  */
+    volatile uint32_t  SC1_SCL1_PBUF2;                         /*  SC1_SCL1_PBUF2  */
+    volatile uint32_t  SC1_SCL1_PBUF3;                         /*  SC1_SCL1_PBUF3  */
+    volatile uint32_t  SC1_SCL1_PBUF_FLD;                      /*  SC1_SCL1_PBUF_FLD */
+    volatile uint32_t  SC1_SCL1_PBUF_CNT;                      /*  SC1_SCL1_PBUF_CNT */
+/* end of struct st_vdc5_from_sc0_scl1_pbuf0 */
+    volatile uint8_t   dummy30[44];                            /*                  */
+/* start of struct st_vdc5_from_gr0_update */
+    volatile uint32_t  GR1_UPDATE;                             /*  GR1_UPDATE      */
+    volatile uint32_t  GR1_FLM_RD;                             /*  GR1_FLM_RD      */
+#define VDC5_GR1_FLM1_COUNT 6
+    volatile uint32_t  GR1_FLM1;                               /*  GR1_FLM1        */
+    volatile uint32_t  GR1_FLM2;                               /*  GR1_FLM2        */
+    volatile uint32_t  GR1_FLM3;                               /*  GR1_FLM3        */
+    volatile uint32_t  GR1_FLM4;                               /*  GR1_FLM4        */
+    volatile uint32_t  GR1_FLM5;                               /*  GR1_FLM5        */
+    volatile uint32_t  GR1_FLM6;                               /*  GR1_FLM6        */
+#define VDC5_GR1_AB1_COUNT 3
+    volatile uint32_t  GR1_AB1;                                /*  GR1_AB1         */
+    volatile uint32_t  GR1_AB2;                                /*  GR1_AB2         */
+    volatile uint32_t  GR1_AB3;                                /*  GR1_AB3         */
+/* end of struct st_vdc5_from_gr0_update */
+    volatile uint32_t  GR1_AB4;                                /*  GR1_AB4         */
+    volatile uint32_t  GR1_AB5;                                /*  GR1_AB5         */
+    volatile uint32_t  GR1_AB6;                                /*  GR1_AB6         */
+/* start of struct st_vdc5_from_gr0_ab7 */
+    volatile uint32_t  GR1_AB7;                                /*  GR1_AB7         */
+    volatile uint32_t  GR1_AB8;                                /*  GR1_AB8         */
+    volatile uint32_t  GR1_AB9;                                /*  GR1_AB9         */
+    volatile uint32_t  GR1_AB10;                               /*  GR1_AB10        */
+    volatile uint32_t  GR1_AB11;                               /*  GR1_AB11        */
+    volatile uint32_t  GR1_BASE;                               /*  GR1_BASE        */
+/* end of struct st_vdc5_from_gr0_ab7 */
+    volatile uint32_t  GR1_CLUT;                               /*  GR1_CLUT        */
+    volatile uint32_t  GR1_MON;                                /*  GR1_MON         */
+    volatile uint8_t   dummy31[40];                            /*                  */
+/* start of struct st_vdc5_from_adj0_update */
+    volatile uint32_t  ADJ1_UPDATE;                            /*  ADJ1_UPDATE     */
+    volatile uint32_t  ADJ1_BKSTR_SET;                         /*  ADJ1_BKSTR_SET  */
+#define VDC5_ADJ1_ENH_TIM1_COUNT 3
+    volatile uint32_t  ADJ1_ENH_TIM1;                          /*  ADJ1_ENH_TIM1   */
+    volatile uint32_t  ADJ1_ENH_TIM2;                          /*  ADJ1_ENH_TIM2   */
+    volatile uint32_t  ADJ1_ENH_TIM3;                          /*  ADJ1_ENH_TIM3   */
+#define VDC5_ADJ1_ENH_SHP1_COUNT 6
+    volatile uint32_t  ADJ1_ENH_SHP1;                          /*  ADJ1_ENH_SHP1   */
+    volatile uint32_t  ADJ1_ENH_SHP2;                          /*  ADJ1_ENH_SHP2   */
+    volatile uint32_t  ADJ1_ENH_SHP3;                          /*  ADJ1_ENH_SHP3   */
+    volatile uint32_t  ADJ1_ENH_SHP4;                          /*  ADJ1_ENH_SHP4   */
+    volatile uint32_t  ADJ1_ENH_SHP5;                          /*  ADJ1_ENH_SHP5   */
+    volatile uint32_t  ADJ1_ENH_SHP6;                          /*  ADJ1_ENH_SHP6   */
+#define VDC5_ADJ1_ENH_LTI1_COUNT 2
+    volatile uint32_t  ADJ1_ENH_LTI1;                          /*  ADJ1_ENH_LTI1   */
+    volatile uint32_t  ADJ1_ENH_LTI2;                          /*  ADJ1_ENH_LTI2   */
+    volatile uint32_t  ADJ1_MTX_MODE;                          /*  ADJ1_MTX_MODE   */
+    volatile uint32_t  ADJ1_MTX_YG_ADJ0;                       /*  ADJ1_MTX_YG_ADJ0 */
+    volatile uint32_t  ADJ1_MTX_YG_ADJ1;                       /*  ADJ1_MTX_YG_ADJ1 */
+    volatile uint32_t  ADJ1_MTX_CBB_ADJ0;                      /*  ADJ1_MTX_CBB_ADJ0 */
+    volatile uint32_t  ADJ1_MTX_CBB_ADJ1;                      /*  ADJ1_MTX_CBB_ADJ1 */
+    volatile uint32_t  ADJ1_MTX_CRR_ADJ0;                      /*  ADJ1_MTX_CRR_ADJ0 */
+    volatile uint32_t  ADJ1_MTX_CRR_ADJ1;                      /*  ADJ1_MTX_CRR_ADJ1 */
+/* end of struct st_vdc5_from_adj0_update */
+    volatile uint8_t   dummy32[48];                            /*                  */
+    volatile uint32_t  GR_VIN_UPDATE;                          /*  GR_VIN_UPDATE   */
+    volatile uint8_t   dummy33[28];                            /*                  */
+#define VDC5_GR_VIN_AB1_COUNT 7
+    volatile uint32_t  GR_VIN_AB1;                             /*  GR_VIN_AB1      */
+    volatile uint32_t  GR_VIN_AB2;                             /*  GR_VIN_AB2      */
+    volatile uint32_t  GR_VIN_AB3;                             /*  GR_VIN_AB3      */
+    volatile uint32_t  GR_VIN_AB4;                             /*  GR_VIN_AB4      */
+    volatile uint32_t  GR_VIN_AB5;                             /*  GR_VIN_AB5      */
+    volatile uint32_t  GR_VIN_AB6;                             /*  GR_VIN_AB6      */
+    volatile uint32_t  GR_VIN_AB7;                             /*  GR_VIN_AB7      */
+    volatile uint8_t   dummy34[16];                            /*                  */
+    volatile uint32_t  GR_VIN_BASE;                            /*  GR_VIN_BASE     */
+    volatile uint8_t   dummy35[4];                             /*                  */
+    volatile uint32_t  GR_VIN_MON;                             /*  GR_VIN_MON      */
+    volatile uint8_t   dummy36[40];                            /*                  */
+    volatile uint32_t  OIR_SCL0_UPDATE;                        /*  OIR_SCL0_UPDATE */
+#define VDC5_OIR_SCL0_FRC1_COUNT 7
+    volatile uint32_t  OIR_SCL0_FRC1;                          /*  OIR_SCL0_FRC1   */
+    volatile uint32_t  OIR_SCL0_FRC2;                          /*  OIR_SCL0_FRC2   */
+    volatile uint32_t  OIR_SCL0_FRC3;                          /*  OIR_SCL0_FRC3   */
+    volatile uint32_t  OIR_SCL0_FRC4;                          /*  OIR_SCL0_FRC4   */
+    volatile uint32_t  OIR_SCL0_FRC5;                          /*  OIR_SCL0_FRC5   */
+    volatile uint32_t  OIR_SCL0_FRC6;                          /*  OIR_SCL0_FRC6   */
+    volatile uint32_t  OIR_SCL0_FRC7;                          /*  OIR_SCL0_FRC7   */
+    volatile uint8_t   dummy37[12];                            /*                  */
+#define VDC5_OIR_SCL0_DS1_COUNT 3
+    volatile uint32_t  OIR_SCL0_DS1;                           /*  OIR_SCL0_DS1    */
+    volatile uint32_t  OIR_SCL0_DS2;                           /*  OIR_SCL0_DS2    */
+    volatile uint32_t  OIR_SCL0_DS3;                           /*  OIR_SCL0_DS3    */
+    volatile uint8_t   dummy38[12];                            /*                  */
+    volatile uint32_t  OIR_SCL0_DS7;                           /*  OIR_SCL0_DS7    */
+    volatile uint32_t  OIR_SCL0_US1;                           /*  OIR_SCL0_US1    */
+    volatile uint32_t  OIR_SCL0_US2;                           /*  OIR_SCL0_US2    */
+    volatile uint32_t  OIR_SCL0_US3;                           /*  OIR_SCL0_US3    */
+    volatile uint8_t   dummy39[16];                            /*                  */
+    volatile uint32_t  OIR_SCL0_US8;                           /*  OIR_SCL0_US8    */
+    volatile uint8_t   dummy40[4];                             /*                  */
+    volatile uint32_t  OIR_SCL0_OVR1;                          /*  OIR_SCL0_OVR1   */
+    volatile uint8_t   dummy41[16];                            /*                  */
+    volatile uint32_t  OIR_SCL1_UPDATE;                        /*  OIR_SCL1_UPDATE */
+    volatile uint8_t   dummy42[4];                             /*                  */
+#define VDC5_OIR_SCL1_WR1_COUNT 4
+    volatile uint32_t  OIR_SCL1_WR1;                           /*  OIR_SCL1_WR1    */
+    volatile uint32_t  OIR_SCL1_WR2;                           /*  OIR_SCL1_WR2    */
+    volatile uint32_t  OIR_SCL1_WR3;                           /*  OIR_SCL1_WR3    */
+    volatile uint32_t  OIR_SCL1_WR4;                           /*  OIR_SCL1_WR4    */
+    volatile uint8_t   dummy43[4];                             /*                  */
+    volatile uint32_t  OIR_SCL1_WR5;                           /*  OIR_SCL1_WR5    */
+    volatile uint32_t  OIR_SCL1_WR6;                           /*  OIR_SCL1_WR6    */
+    volatile uint32_t  OIR_SCL1_WR7;                           /*  OIR_SCL1_WR7    */
+    volatile uint8_t   dummy44[88];                            /*                  */
+    volatile uint32_t  GR_OIR_UPDATE;                          /*  GR_OIR_UPDATE   */
+    volatile uint32_t  GR_OIR_FLM_RD;                          /*  GR_OIR_FLM_RD   */
+#define VDC5_GR_OIR_FLM1_COUNT 6
+    volatile uint32_t  GR_OIR_FLM1;                            /*  GR_OIR_FLM1     */
+    volatile uint32_t  GR_OIR_FLM2;                            /*  GR_OIR_FLM2     */
+    volatile uint32_t  GR_OIR_FLM3;                            /*  GR_OIR_FLM3     */
+    volatile uint32_t  GR_OIR_FLM4;                            /*  GR_OIR_FLM4     */
+    volatile uint32_t  GR_OIR_FLM5;                            /*  GR_OIR_FLM5     */
+    volatile uint32_t  GR_OIR_FLM6;                            /*  GR_OIR_FLM6     */
+#define VDC5_GR_OIR_AB1_COUNT 3
+    volatile uint32_t  GR_OIR_AB1;                             /*  GR_OIR_AB1      */
+    volatile uint32_t  GR_OIR_AB2;                             /*  GR_OIR_AB2      */
+    volatile uint32_t  GR_OIR_AB3;                             /*  GR_OIR_AB3      */
+    volatile uint8_t   dummy45[12];                            /*                  */
+    volatile uint32_t  GR_OIR_AB7;                             /*  GR_OIR_AB7      */
+    volatile uint32_t  GR_OIR_AB8;                             /*  GR_OIR_AB8      */
+    volatile uint32_t  GR_OIR_AB9;                             /*  GR_OIR_AB9      */
+    volatile uint32_t  GR_OIR_AB10;                            /*  GR_OIR_AB10     */
+    volatile uint32_t  GR_OIR_AB11;                            /*  GR_OIR_AB11     */
+    volatile uint32_t  GR_OIR_BASE;                            /*  GR_OIR_BASE     */
+    volatile uint32_t  GR_OIR_CLUT;                            /*  GR_OIR_CLUT     */
+    volatile uint32_t  GR_OIR_MON;                             /*  GR_OIR_MON      */
+};
+
+
+struct st_vdc5_from_gr0_update
+{
+    volatile uint32_t  GR0_UPDATE;                             /*  GR0_UPDATE      */
+    volatile uint32_t  GR0_FLM_RD;                             /*  GR0_FLM_RD      */
+    volatile uint32_t  GR0_FLM1;                               /*  GR0_FLM1        */
+    volatile uint32_t  GR0_FLM2;                               /*  GR0_FLM2        */
+    volatile uint32_t  GR0_FLM3;                               /*  GR0_FLM3        */
+    volatile uint32_t  GR0_FLM4;                               /*  GR0_FLM4        */
+    volatile uint32_t  GR0_FLM5;                               /*  GR0_FLM5        */
+    volatile uint32_t  GR0_FLM6;                               /*  GR0_FLM6        */
+    volatile uint32_t  GR0_AB1;                                /*  GR0_AB1         */
+    volatile uint32_t  GR0_AB2;                                /*  GR0_AB2         */
+    volatile uint32_t  GR0_AB3;                                /*  GR0_AB3         */
+};
+
+
+struct st_vdc5_from_gr0_ab7
+{
+    volatile uint32_t  GR0_AB7;                                /*  GR0_AB7         */
+    volatile uint32_t  GR0_AB8;                                /*  GR0_AB8         */
+    volatile uint32_t  GR0_AB9;                                /*  GR0_AB9         */
+    volatile uint32_t  GR0_AB10;                               /*  GR0_AB10        */
+    volatile uint32_t  GR0_AB11;                               /*  GR0_AB11        */
+    volatile uint32_t  GR0_BASE;                               /*  GR0_BASE        */
+};
+
+
+struct st_vdc5_from_adj0_update
+{
+    volatile uint32_t  ADJ0_UPDATE;                            /*  ADJ0_UPDATE     */
+    volatile uint32_t  ADJ0_BKSTR_SET;                         /*  ADJ0_BKSTR_SET  */
+    volatile uint32_t  ADJ0_ENH_TIM1;                          /*  ADJ0_ENH_TIM1   */
+    volatile uint32_t  ADJ0_ENH_TIM2;                          /*  ADJ0_ENH_TIM2   */
+    volatile uint32_t  ADJ0_ENH_TIM3;                          /*  ADJ0_ENH_TIM3   */
+    volatile uint32_t  ADJ0_ENH_SHP1;                          /*  ADJ0_ENH_SHP1   */
+    volatile uint32_t  ADJ0_ENH_SHP2;                          /*  ADJ0_ENH_SHP2   */
+    volatile uint32_t  ADJ0_ENH_SHP3;                          /*  ADJ0_ENH_SHP3   */
+    volatile uint32_t  ADJ0_ENH_SHP4;                          /*  ADJ0_ENH_SHP4   */
+    volatile uint32_t  ADJ0_ENH_SHP5;                          /*  ADJ0_ENH_SHP5   */
+    volatile uint32_t  ADJ0_ENH_SHP6;                          /*  ADJ0_ENH_SHP6   */
+    volatile uint32_t  ADJ0_ENH_LTI1;                          /*  ADJ0_ENH_LTI1   */
+    volatile uint32_t  ADJ0_ENH_LTI2;                          /*  ADJ0_ENH_LTI2   */
+    volatile uint32_t  ADJ0_MTX_MODE;                          /*  ADJ0_MTX_MODE   */
+    volatile uint32_t  ADJ0_MTX_YG_ADJ0;                       /*  ADJ0_MTX_YG_ADJ0 */
+    volatile uint32_t  ADJ0_MTX_YG_ADJ1;                       /*  ADJ0_MTX_YG_ADJ1 */
+    volatile uint32_t  ADJ0_MTX_CBB_ADJ0;                      /*  ADJ0_MTX_CBB_ADJ0 */
+    volatile uint32_t  ADJ0_MTX_CBB_ADJ1;                      /*  ADJ0_MTX_CBB_ADJ1 */
+    volatile uint32_t  ADJ0_MTX_CRR_ADJ0;                      /*  ADJ0_MTX_CRR_ADJ0 */
+    volatile uint32_t  ADJ0_MTX_CRR_ADJ1;                      /*  ADJ0_MTX_CRR_ADJ1 */
+};
+
+
+struct st_vdc5_from_sc0_scl0_update
+{
+    volatile uint32_t  SC0_SCL0_UPDATE;                        /*  SC0_SCL0_UPDATE */
+    volatile uint32_t  SC0_SCL0_FRC1;                          /*  SC0_SCL0_FRC1   */
+    volatile uint32_t  SC0_SCL0_FRC2;                          /*  SC0_SCL0_FRC2   */
+    volatile uint32_t  SC0_SCL0_FRC3;                          /*  SC0_SCL0_FRC3   */
+    volatile uint32_t  SC0_SCL0_FRC4;                          /*  SC0_SCL0_FRC4   */
+    volatile uint32_t  SC0_SCL0_FRC5;                          /*  SC0_SCL0_FRC5   */
+    volatile uint32_t  SC0_SCL0_FRC6;                          /*  SC0_SCL0_FRC6   */
+    volatile uint32_t  SC0_SCL0_FRC7;                          /*  SC0_SCL0_FRC7   */
+    volatile uint8_t   dummy5[4];                              /*                  */
+    volatile uint32_t  SC0_SCL0_FRC9;                          /*  SC0_SCL0_FRC9   */
+    volatile uint16_t SC0_SCL0_MON0;                          /*  SC0_SCL0_MON0   */
+    volatile uint16_t SC0_SCL0_INT;                           /*  SC0_SCL0_INT    */
+    volatile uint32_t  SC0_SCL0_DS1;                           /*  SC0_SCL0_DS1    */
+    volatile uint32_t  SC0_SCL0_DS2;                           /*  SC0_SCL0_DS2    */
+    volatile uint32_t  SC0_SCL0_DS3;                           /*  SC0_SCL0_DS3    */
+    volatile uint32_t  SC0_SCL0_DS4;                           /*  SC0_SCL0_DS4    */
+    volatile uint32_t  SC0_SCL0_DS5;                           /*  SC0_SCL0_DS5    */
+    volatile uint32_t  SC0_SCL0_DS6;                           /*  SC0_SCL0_DS6    */
+    volatile uint32_t  SC0_SCL0_DS7;                           /*  SC0_SCL0_DS7    */
+    volatile uint32_t  SC0_SCL0_US1;                           /*  SC0_SCL0_US1    */
+    volatile uint32_t  SC0_SCL0_US2;                           /*  SC0_SCL0_US2    */
+    volatile uint32_t  SC0_SCL0_US3;                           /*  SC0_SCL0_US3    */
+    volatile uint32_t  SC0_SCL0_US4;                           /*  SC0_SCL0_US4    */
+    volatile uint32_t  SC0_SCL0_US5;                           /*  SC0_SCL0_US5    */
+    volatile uint32_t  SC0_SCL0_US6;                           /*  SC0_SCL0_US6    */
+    volatile uint32_t  SC0_SCL0_US7;                           /*  SC0_SCL0_US7    */
+    volatile uint32_t  SC0_SCL0_US8;                           /*  SC0_SCL0_US8    */
+    volatile uint8_t   dummy6[4];                              /*                  */
+    volatile uint32_t  SC0_SCL0_OVR1;                          /*  SC0_SCL0_OVR1   */
+    volatile uint8_t   dummy7[16];                             /*                  */
+    volatile uint32_t  SC0_SCL1_UPDATE;                        /*  SC0_SCL1_UPDATE */
+    volatile uint8_t   dummy8[4];                              /*                  */
+    volatile uint32_t  SC0_SCL1_WR1;                           /*  SC0_SCL1_WR1    */
+    volatile uint32_t  SC0_SCL1_WR2;                           /*  SC0_SCL1_WR2    */
+    volatile uint32_t  SC0_SCL1_WR3;                           /*  SC0_SCL1_WR3    */
+    volatile uint32_t  SC0_SCL1_WR4;                           /*  SC0_SCL1_WR4    */
+    volatile uint8_t   dummy9[4];                              /*                  */
+    volatile uint32_t  SC0_SCL1_WR5;                           /*  SC0_SCL1_WR5    */
+    volatile uint32_t  SC0_SCL1_WR6;                           /*  SC0_SCL1_WR6    */
+    volatile uint32_t  SC0_SCL1_WR7;                           /*  SC0_SCL1_WR7    */
+    volatile uint32_t  SC0_SCL1_WR8;                           /*  SC0_SCL1_WR8    */
+    volatile uint32_t  SC0_SCL1_WR9;                           /*  SC0_SCL1_WR9    */
+    volatile uint32_t  SC0_SCL1_WR10;                          /*  SC0_SCL1_WR10   */
+};
+
+
+struct st_vdc5_from_sc0_scl1_pbuf0
+{
+    volatile uint32_t  SC0_SCL1_PBUF0;                         /*  SC0_SCL1_PBUF0  */
+    volatile uint32_t  SC0_SCL1_PBUF1;                         /*  SC0_SCL1_PBUF1  */
+    volatile uint32_t  SC0_SCL1_PBUF2;                         /*  SC0_SCL1_PBUF2  */
+    volatile uint32_t  SC0_SCL1_PBUF3;                         /*  SC0_SCL1_PBUF3  */
+    volatile uint32_t  SC0_SCL1_PBUF_FLD;                      /*  SC0_SCL1_PBUF_FLD */
+    volatile uint32_t  SC0_SCL1_PBUF_CNT;                      /*  SC0_SCL1_PBUF_CNT */
+};
+
+
+#define VDC50   (*(struct st_vdc5    *)0xFCFF7400uL) /* VDC50 */
+#define VDC51   (*(struct st_vdc5    *)0xFCFF9400uL) /* VDC51 */
+
+
+/* Start of channnel array defines of VDC5 */
+
+/* Channnel array defines of VDC5 */
+/*(Sample) value = VDC5[ channel ]->INP_UPDATE; */
+#define VDC5_COUNT  2
+#define VDC5_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+    &VDC50, &VDC51 \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+
+
+
+/* Channnel array defines of VDC5n_FROM_GR2_AB7_ARRAY */
+/*(Sample) value = VDC5n_FROM_GR2_AB7_ARRAY[ channel ][ index ]->GR0_AB7; */
+#define VDC5n_FROM_GR2_AB7_ARRAY_COUNT  2
+#define VDC5n_FROM_GR2_AB7_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+{ \
+    &VDC50_FROM_GR2_AB7, &VDC50_FROM_GR3_AB7 },{ \
+    &VDC51_FROM_GR2_AB7, &VDC51_FROM_GR3_AB7 \
+} \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define VDC50_FROM_GR2_AB7 (*(struct st_vdc5_from_gr0_ab7 *)&VDC50.GR2_AB7) /* VDC50_FROM_GR2_AB7 */
+#define VDC50_FROM_GR3_AB7 (*(struct st_vdc5_from_gr0_ab7 *)&VDC50.GR3_AB7) /* VDC50_FROM_GR3_AB7 */
+#define VDC51_FROM_GR2_AB7 (*(struct st_vdc5_from_gr0_ab7 *)&VDC51.GR2_AB7) /* VDC51_FROM_GR2_AB7 */
+#define VDC51_FROM_GR3_AB7 (*(struct st_vdc5_from_gr0_ab7 *)&VDC51.GR3_AB7) /* VDC51_FROM_GR3_AB7 */
+
+
+
+
+/* Channnel array defines of VDC5n_FROM_GR2_UPDATE_ARRAY */
+/*(Sample) value = VDC5n_FROM_GR2_UPDATE_ARRAY[ channel ][ index ]->GR0_UPDATE; */
+#define VDC5n_FROM_GR2_UPDATE_ARRAY_COUNT  2
+#define VDC5n_FROM_GR2_UPDATE_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+{ \
+    &VDC50_FROM_GR2_UPDATE, &VDC50_FROM_GR3_UPDATE },{ \
+    &VDC51_FROM_GR2_UPDATE, &VDC51_FROM_GR3_UPDATE \
+} \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define VDC50_FROM_GR2_UPDATE (*(struct st_vdc5_from_gr0_update *)&VDC50.GR2_UPDATE) /* VDC50_FROM_GR2_UPDATE */
+#define VDC50_FROM_GR3_UPDATE (*(struct st_vdc5_from_gr0_update *)&VDC50.GR3_UPDATE) /* VDC50_FROM_GR3_UPDATE */
+#define VDC51_FROM_GR2_UPDATE (*(struct st_vdc5_from_gr0_update *)&VDC51.GR2_UPDATE) /* VDC51_FROM_GR2_UPDATE */
+#define VDC51_FROM_GR3_UPDATE (*(struct st_vdc5_from_gr0_update *)&VDC51.GR3_UPDATE) /* VDC51_FROM_GR3_UPDATE */
+
+
+
+
+/* Channnel array defines of VDC5n_FROM_SC0_SCL1_PBUF0_ARRAY */
+/*(Sample) value = VDC5n_FROM_SC0_SCL1_PBUF0_ARRAY[ channel ][ index ]->SC0_SCL1_PBUF0; */
+#define VDC5n_FROM_SC0_SCL1_PBUF0_ARRAY_COUNT  2
+#define VDC5n_FROM_SC0_SCL1_PBUF0_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+{ \
+    &VDC50_FROM_SC0_SCL1_PBUF0, &VDC50_FROM_SC1_SCL1_PBUF0 },{ \
+    &VDC51_FROM_SC0_SCL1_PBUF0, &VDC51_FROM_SC1_SCL1_PBUF0 \
+} \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define VDC50_FROM_SC0_SCL1_PBUF0 (*(struct st_vdc5_from_sc0_scl1_pbuf0 *)&VDC50.SC0_SCL1_PBUF0) /* VDC50_FROM_SC0_SCL1_PBUF0 */
+#define VDC50_FROM_SC1_SCL1_PBUF0 (*(struct st_vdc5_from_sc0_scl1_pbuf0 *)&VDC50.SC1_SCL1_PBUF0) /* VDC50_FROM_SC1_SCL1_PBUF0 */
+#define VDC51_FROM_SC0_SCL1_PBUF0 (*(struct st_vdc5_from_sc0_scl1_pbuf0 *)&VDC51.SC0_SCL1_PBUF0) /* VDC51_FROM_SC0_SCL1_PBUF0 */
+#define VDC51_FROM_SC1_SCL1_PBUF0 (*(struct st_vdc5_from_sc0_scl1_pbuf0 *)&VDC51.SC1_SCL1_PBUF0) /* VDC51_FROM_SC1_SCL1_PBUF0 */
+
+
+
+
+/* Channnel array defines of VDC5n_FROM_SC0_SCL0_UPDATE_ARRAY */
+/*(Sample) value = VDC5n_FROM_SC0_SCL0_UPDATE_ARRAY[ channel ][ index ]->SC0_SCL0_UPDATE; */
+#define VDC5n_FROM_SC0_SCL0_UPDATE_ARRAY_COUNT  2
+#define VDC5n_FROM_SC0_SCL0_UPDATE_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+{ \
+    &VDC50_FROM_SC0_SCL0_UPDATE, &VDC50_FROM_SC1_SCL0_UPDATE },{ \
+    &VDC51_FROM_SC0_SCL0_UPDATE, &VDC51_FROM_SC1_SCL0_UPDATE \
+} \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define VDC50_FROM_SC0_SCL0_UPDATE (*(struct st_vdc5_from_sc0_scl0_update *)&VDC50.SC0_SCL0_UPDATE) /* VDC50_FROM_SC0_SCL0_UPDATE */
+#define VDC50_FROM_SC1_SCL0_UPDATE (*(struct st_vdc5_from_sc0_scl0_update *)&VDC50.SC1_SCL0_UPDATE) /* VDC50_FROM_SC1_SCL0_UPDATE */
+#define VDC51_FROM_SC0_SCL0_UPDATE (*(struct st_vdc5_from_sc0_scl0_update *)&VDC51.SC0_SCL0_UPDATE) /* VDC51_FROM_SC0_SCL0_UPDATE */
+#define VDC51_FROM_SC1_SCL0_UPDATE (*(struct st_vdc5_from_sc0_scl0_update *)&VDC51.SC1_SCL0_UPDATE) /* VDC51_FROM_SC1_SCL0_UPDATE */
+
+
+
+
+/* Channnel array defines of VDC5n_FROM_ADJ0_UPDATE_ARRAY */
+/*(Sample) value = VDC5n_FROM_ADJ0_UPDATE_ARRAY[ channel ][ index ]->ADJ0_UPDATE; */
+#define VDC5n_FROM_ADJ0_UPDATE_ARRAY_COUNT  2
+#define VDC5n_FROM_ADJ0_UPDATE_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+{ \
+    &VDC50_FROM_ADJ0_UPDATE, &VDC50_FROM_ADJ1_UPDATE },{ \
+    &VDC51_FROM_ADJ0_UPDATE, &VDC51_FROM_ADJ1_UPDATE \
+} \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define VDC50_FROM_ADJ0_UPDATE (*(struct st_vdc5_from_adj0_update *)&VDC50.ADJ0_UPDATE) /* VDC50_FROM_ADJ0_UPDATE */
+#define VDC50_FROM_ADJ1_UPDATE (*(struct st_vdc5_from_adj0_update *)&VDC50.ADJ1_UPDATE) /* VDC50_FROM_ADJ1_UPDATE */
+#define VDC51_FROM_ADJ0_UPDATE (*(struct st_vdc5_from_adj0_update *)&VDC51.ADJ0_UPDATE) /* VDC51_FROM_ADJ0_UPDATE */
+#define VDC51_FROM_ADJ1_UPDATE (*(struct st_vdc5_from_adj0_update *)&VDC51.ADJ1_UPDATE) /* VDC51_FROM_ADJ1_UPDATE */
+
+
+
+
+/* Channnel array defines of VDC5n_FROM_GR0_AB7_ARRAY */
+/*(Sample) value = VDC5n_FROM_GR0_AB7_ARRAY[ channel ][ index ]->GR0_AB7; */
+#define VDC5n_FROM_GR0_AB7_ARRAY_COUNT  2
+#define VDC5n_FROM_GR0_AB7_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+{ \
+    &VDC50_FROM_GR0_AB7, &VDC50_FROM_GR1_AB7 },{ \
+    &VDC51_FROM_GR0_AB7, &VDC51_FROM_GR1_AB7 \
+} \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define VDC50_FROM_GR0_AB7 (*(struct st_vdc5_from_gr0_ab7 *)&VDC50.GR0_AB7) /* VDC50_FROM_GR0_AB7 */
+#define VDC50_FROM_GR1_AB7 (*(struct st_vdc5_from_gr0_ab7 *)&VDC50.GR1_AB7) /* VDC50_FROM_GR1_AB7 */
+#define VDC51_FROM_GR0_AB7 (*(struct st_vdc5_from_gr0_ab7 *)&VDC51.GR0_AB7) /* VDC51_FROM_GR0_AB7 */
+#define VDC51_FROM_GR1_AB7 (*(struct st_vdc5_from_gr0_ab7 *)&VDC51.GR1_AB7) /* VDC51_FROM_GR1_AB7 */
+
+
+
+
+/* Channnel array defines of VDC5n_FROM_GR0_UPDATE_ARRAY */
+/*(Sample) value = VDC5n_FROM_GR0_UPDATE_ARRAY[ channel ][ index ]->GR0_UPDATE; */
+#define VDC5n_FROM_GR0_UPDATE_ARRAY_COUNT  2
+#define VDC5n_FROM_GR0_UPDATE_ARRAY_ADDRESS_LIST \
+{   /* ->MISRA 11.3 */ /* ->SEC R2.7.1 */ \
+{ \
+    &VDC50_FROM_GR0_UPDATE, &VDC50_FROM_GR1_UPDATE },{ \
+    &VDC51_FROM_GR0_UPDATE, &VDC51_FROM_GR1_UPDATE \
+} \
+}   /* <-MISRA 11.3 */ /* <-SEC R2.7.1 */ /* { } is for MISRA 19.4 */
+#define VDC50_FROM_GR0_UPDATE (*(struct st_vdc5_from_gr0_update *)&VDC50.GR0_UPDATE) /* VDC50_FROM_GR0_UPDATE */
+#define VDC50_FROM_GR1_UPDATE (*(struct st_vdc5_from_gr0_update *)&VDC50.GR1_UPDATE) /* VDC50_FROM_GR1_UPDATE */
+#define VDC51_FROM_GR0_UPDATE (*(struct st_vdc5_from_gr0_update *)&VDC51.GR0_UPDATE) /* VDC51_FROM_GR0_UPDATE */
+#define VDC51_FROM_GR1_UPDATE (*(struct st_vdc5_from_gr0_update *)&VDC51.GR1_UPDATE) /* VDC51_FROM_GR1_UPDATE */
+
+
+/* End of channnel array defines of VDC5 */
+
+
+#define VDC50INP_UPDATE VDC50.INP_UPDATE
+#define VDC50INP_SEL_CNT VDC50.INP_SEL_CNT
+#define VDC50INP_EXT_SYNC_CNT VDC50.INP_EXT_SYNC_CNT
+#define VDC50INP_VSYNC_PH_ADJ VDC50.INP_VSYNC_PH_ADJ
+#define VDC50INP_DLY_ADJ VDC50.INP_DLY_ADJ
+#define VDC50IMGCNT_UPDATE VDC50.IMGCNT_UPDATE
+#define VDC50IMGCNT_NR_CNT0 VDC50.IMGCNT_NR_CNT0
+#define VDC50IMGCNT_NR_CNT1 VDC50.IMGCNT_NR_CNT1
+#define VDC50IMGCNT_MTX_MODE VDC50.IMGCNT_MTX_MODE
+#define VDC50IMGCNT_MTX_YG_ADJ0 VDC50.IMGCNT_MTX_YG_ADJ0
+#define VDC50IMGCNT_MTX_YG_ADJ1 VDC50.IMGCNT_MTX_YG_ADJ1
+#define VDC50IMGCNT_MTX_CBB_ADJ0 VDC50.IMGCNT_MTX_CBB_ADJ0
+#define VDC50IMGCNT_MTX_CBB_ADJ1 VDC50.IMGCNT_MTX_CBB_ADJ1
+#define VDC50IMGCNT_MTX_CRR_ADJ0 VDC50.IMGCNT_MTX_CRR_ADJ0
+#define VDC50IMGCNT_MTX_CRR_ADJ1 VDC50.IMGCNT_MTX_CRR_ADJ1
+#define VDC50IMGCNT_DRC_REG VDC50.IMGCNT_DRC_REG
+#define VDC50SC0_SCL0_UPDATE VDC50.SC0_SCL0_UPDATE
+#define VDC50SC0_SCL0_FRC1 VDC50.SC0_SCL0_FRC1
+#define VDC50SC0_SCL0_FRC2 VDC50.SC0_SCL0_FRC2
+#define VDC50SC0_SCL0_FRC3 VDC50.SC0_SCL0_FRC3
+#define VDC50SC0_SCL0_FRC4 VDC50.SC0_SCL0_FRC4
+#define VDC50SC0_SCL0_FRC5 VDC50.SC0_SCL0_FRC5
+#define VDC50SC0_SCL0_FRC6 VDC50.SC0_SCL0_FRC6
+#define VDC50SC0_SCL0_FRC7 VDC50.SC0_SCL0_FRC7
+#define VDC50SC0_SCL0_FRC9 VDC50.SC0_SCL0_FRC9
+#define VDC50SC0_SCL0_MON0 VDC50.SC0_SCL0_MON0
+#define VDC50SC0_SCL0_INT VDC50.SC0_SCL0_INT
+#define VDC50SC0_SCL0_DS1 VDC50.SC0_SCL0_DS1
+#define VDC50SC0_SCL0_DS2 VDC50.SC0_SCL0_DS2
+#define VDC50SC0_SCL0_DS3 VDC50.SC0_SCL0_DS3
+#define VDC50SC0_SCL0_DS4 VDC50.SC0_SCL0_DS4
+#define VDC50SC0_SCL0_DS5 VDC50.SC0_SCL0_DS5
+#define VDC50SC0_SCL0_DS6 VDC50.SC0_SCL0_DS6
+#define VDC50SC0_SCL0_DS7 VDC50.SC0_SCL0_DS7
+#define VDC50SC0_SCL0_US1 VDC50.SC0_SCL0_US1
+#define VDC50SC0_SCL0_US2 VDC50.SC0_SCL0_US2
+#define VDC50SC0_SCL0_US3 VDC50.SC0_SCL0_US3
+#define VDC50SC0_SCL0_US4 VDC50.SC0_SCL0_US4
+#define VDC50SC0_SCL0_US5 VDC50.SC0_SCL0_US5
+#define VDC50SC0_SCL0_US6 VDC50.SC0_SCL0_US6
+#define VDC50SC0_SCL0_US7 VDC50.SC0_SCL0_US7
+#define VDC50SC0_SCL0_US8 VDC50.SC0_SCL0_US8
+#define VDC50SC0_SCL0_OVR1 VDC50.SC0_SCL0_OVR1
+#define VDC50SC0_SCL1_UPDATE VDC50.SC0_SCL1_UPDATE
+#define VDC50SC0_SCL1_WR1 VDC50.SC0_SCL1_WR1
+#define VDC50SC0_SCL1_WR2 VDC50.SC0_SCL1_WR2
+#define VDC50SC0_SCL1_WR3 VDC50.SC0_SCL1_WR3
+#define VDC50SC0_SCL1_WR4 VDC50.SC0_SCL1_WR4
+#define VDC50SC0_SCL1_WR5 VDC50.SC0_SCL1_WR5
+#define VDC50SC0_SCL1_WR6 VDC50.SC0_SCL1_WR6
+#define VDC50SC0_SCL1_WR7 VDC50.SC0_SCL1_WR7
+#define VDC50SC0_SCL1_WR8 VDC50.SC0_SCL1_WR8
+#define VDC50SC0_SCL1_WR9 VDC50.SC0_SCL1_WR9
+#define VDC50SC0_SCL1_WR10 VDC50.SC0_SCL1_WR10
+#define VDC50SC0_SCL1_WR11 VDC50.SC0_SCL1_WR11
+#define VDC50SC0_SCL1_MON1 VDC50.SC0_SCL1_MON1
+#define VDC50SC0_SCL1_PBUF0 VDC50.SC0_SCL1_PBUF0
+#define VDC50SC0_SCL1_PBUF1 VDC50.SC0_SCL1_PBUF1
+#define VDC50SC0_SCL1_PBUF2 VDC50.SC0_SCL1_PBUF2
+#define VDC50SC0_SCL1_PBUF3 VDC50.SC0_SCL1_PBUF3
+#define VDC50SC0_SCL1_PBUF_FLD VDC50.SC0_SCL1_PBUF_FLD
+#define VDC50SC0_SCL1_PBUF_CNT VDC50.SC0_SCL1_PBUF_CNT
+#define VDC50GR0_UPDATE VDC50.GR0_UPDATE
+#define VDC50GR0_FLM_RD VDC50.GR0_FLM_RD
+#define VDC50GR0_FLM1 VDC50.GR0_FLM1
+#define VDC50GR0_FLM2 VDC50.GR0_FLM2
+#define VDC50GR0_FLM3 VDC50.GR0_FLM3
+#define VDC50GR0_FLM4 VDC50.GR0_FLM4
+#define VDC50GR0_FLM5 VDC50.GR0_FLM5
+#define VDC50GR0_FLM6 VDC50.GR0_FLM6
+#define VDC50GR0_AB1 VDC50.GR0_AB1
+#define VDC50GR0_AB2 VDC50.GR0_AB2
+#define VDC50GR0_AB3 VDC50.GR0_AB3
+#define VDC50GR0_AB7 VDC50.GR0_AB7
+#define VDC50GR0_AB8 VDC50.GR0_AB8
+#define VDC50GR0_AB9 VDC50.GR0_AB9
+#define VDC50GR0_AB10 VDC50.GR0_AB10
+#define VDC50GR0_AB11 VDC50.GR0_AB11
+#define VDC50GR0_BASE VDC50.GR0_BASE
+#define VDC50GR0_CLUT VDC50.GR0_CLUT
+#define VDC50ADJ0_UPDATE VDC50.ADJ0_UPDATE
+#define VDC50ADJ0_BKSTR_SET VDC50.ADJ0_BKSTR_SET
+#define VDC50ADJ0_ENH_TIM1 VDC50.ADJ0_ENH_TIM1
+#define VDC50ADJ0_ENH_TIM2 VDC50.ADJ0_ENH_TIM2
+#define VDC50ADJ0_ENH_TIM3 VDC50.ADJ0_ENH_TIM3
+#define VDC50ADJ0_ENH_SHP1 VDC50.ADJ0_ENH_SHP1
+#define VDC50ADJ0_ENH_SHP2 VDC50.ADJ0_ENH_SHP2
+#define VDC50ADJ0_ENH_SHP3 VDC50.ADJ0_ENH_SHP3
+#define VDC50ADJ0_ENH_SHP4 VDC50.ADJ0_ENH_SHP4
+#define VDC50ADJ0_ENH_SHP5 VDC50.ADJ0_ENH_SHP5
+#define VDC50ADJ0_ENH_SHP6 VDC50.ADJ0_ENH_SHP6
+#define VDC50ADJ0_ENH_LTI1 VDC50.ADJ0_ENH_LTI1
+#define VDC50ADJ0_ENH_LTI2 VDC50.ADJ0_ENH_LTI2
+#define VDC50ADJ0_MTX_MODE VDC50.ADJ0_MTX_MODE
+#define VDC50ADJ0_MTX_YG_ADJ0 VDC50.ADJ0_MTX_YG_ADJ0
+#define VDC50ADJ0_MTX_YG_ADJ1 VDC50.ADJ0_MTX_YG_ADJ1
+#define VDC50ADJ0_MTX_CBB_ADJ0 VDC50.ADJ0_MTX_CBB_ADJ0
+#define VDC50ADJ0_MTX_CBB_ADJ1 VDC50.ADJ0_MTX_CBB_ADJ1
+#define VDC50ADJ0_MTX_CRR_ADJ0 VDC50.ADJ0_MTX_CRR_ADJ0
+#define VDC50ADJ0_MTX_CRR_ADJ1 VDC50.ADJ0_MTX_CRR_ADJ1
+#define VDC50GR2_UPDATE VDC50.GR2_UPDATE
+#define VDC50GR2_FLM_RD VDC50.GR2_FLM_RD
+#define VDC50GR2_FLM1 VDC50.GR2_FLM1
+#define VDC50GR2_FLM2 VDC50.GR2_FLM2
+#define VDC50GR2_FLM3 VDC50.GR2_FLM3
+#define VDC50GR2_FLM4 VDC50.GR2_FLM4
+#define VDC50GR2_FLM5 VDC50.GR2_FLM5
+#define VDC50GR2_FLM6 VDC50.GR2_FLM6
+#define VDC50GR2_AB1 VDC50.GR2_AB1
+#define VDC50GR2_AB2 VDC50.GR2_AB2
+#define VDC50GR2_AB3 VDC50.GR2_AB3
+#define VDC50GR2_AB4 VDC50.GR2_AB4
+#define VDC50GR2_AB5 VDC50.GR2_AB5
+#define VDC50GR2_AB6 VDC50.GR2_AB6
+#define VDC50GR2_AB7 VDC50.GR2_AB7
+#define VDC50GR2_AB8 VDC50.GR2_AB8
+#define VDC50GR2_AB9 VDC50.GR2_AB9
+#define VDC50GR2_AB10 VDC50.GR2_AB10
+#define VDC50GR2_AB11 VDC50.GR2_AB11
+#define VDC50GR2_BASE VDC50.GR2_BASE
+#define VDC50GR2_CLUT VDC50.GR2_CLUT
+#define VDC50GR2_MON VDC50.GR2_MON
+#define VDC50GR3_UPDATE VDC50.GR3_UPDATE
+#define VDC50GR3_FLM_RD VDC50.GR3_FLM_RD
+#define VDC50GR3_FLM1 VDC50.GR3_FLM1
+#define VDC50GR3_FLM2 VDC50.GR3_FLM2
+#define VDC50GR3_FLM3 VDC50.GR3_FLM3
+#define VDC50GR3_FLM4 VDC50.GR3_FLM4
+#define VDC50GR3_FLM5 VDC50.GR3_FLM5
+#define VDC50GR3_FLM6 VDC50.GR3_FLM6
+#define VDC50GR3_AB1 VDC50.GR3_AB1
+#define VDC50GR3_AB2 VDC50.GR3_AB2
+#define VDC50GR3_AB3 VDC50.GR3_AB3
+#define VDC50GR3_AB4 VDC50.GR3_AB4
+#define VDC50GR3_AB5 VDC50.GR3_AB5
+#define VDC50GR3_AB6 VDC50.GR3_AB6
+#define VDC50GR3_AB7 VDC50.GR3_AB7
+#define VDC50GR3_AB8 VDC50.GR3_AB8
+#define VDC50GR3_AB9 VDC50.GR3_AB9
+#define VDC50GR3_AB10 VDC50.GR3_AB10
+#define VDC50GR3_AB11 VDC50.GR3_AB11
+#define VDC50GR3_BASE VDC50.GR3_BASE
+#define VDC50GR3_CLUT_INT VDC50.GR3_CLUT_INT
+#define VDC50GR3_MON VDC50.GR3_MON
+#define VDC50GAM_G_UPDATE VDC50.GAM_G_UPDATE
+#define VDC50GAM_SW VDC50.GAM_SW
+#define VDC50GAM_G_LUT1 VDC50.GAM_G_LUT1
+#define VDC50GAM_G_LUT2 VDC50.GAM_G_LUT2
+#define VDC50GAM_G_LUT3 VDC50.GAM_G_LUT3
+#define VDC50GAM_G_LUT4 VDC50.GAM_G_LUT4
+#define VDC50GAM_G_LUT5 VDC50.GAM_G_LUT5
+#define VDC50GAM_G_LUT6 VDC50.GAM_G_LUT6
+#define VDC50GAM_G_LUT7 VDC50.GAM_G_LUT7
+#define VDC50GAM_G_LUT8 VDC50.GAM_G_LUT8
+#define VDC50GAM_G_LUT9 VDC50.GAM_G_LUT9
+#define VDC50GAM_G_LUT10 VDC50.GAM_G_LUT10
+#define VDC50GAM_G_LUT11 VDC50.GAM_G_LUT11
+#define VDC50GAM_G_LUT12 VDC50.GAM_G_LUT12
+#define VDC50GAM_G_LUT13 VDC50.GAM_G_LUT13
+#define VDC50GAM_G_LUT14 VDC50.GAM_G_LUT14
+#define VDC50GAM_G_LUT15 VDC50.GAM_G_LUT15
+#define VDC50GAM_G_LUT16 VDC50.GAM_G_LUT16
+#define VDC50GAM_G_AREA1 VDC50.GAM_G_AREA1
+#define VDC50GAM_G_AREA2 VDC50.GAM_G_AREA2
+#define VDC50GAM_G_AREA3 VDC50.GAM_G_AREA3
+#define VDC50GAM_G_AREA4 VDC50.GAM_G_AREA4
+#define VDC50GAM_G_AREA5 VDC50.GAM_G_AREA5
+#define VDC50GAM_G_AREA6 VDC50.GAM_G_AREA6
+#define VDC50GAM_G_AREA7 VDC50.GAM_G_AREA7
+#define VDC50GAM_G_AREA8 VDC50.GAM_G_AREA8
+#define VDC50GAM_B_UPDATE VDC50.GAM_B_UPDATE
+#define VDC50GAM_B_LUT1 VDC50.GAM_B_LUT1
+#define VDC50GAM_B_LUT2 VDC50.GAM_B_LUT2
+#define VDC50GAM_B_LUT3 VDC50.GAM_B_LUT3
+#define VDC50GAM_B_LUT4 VDC50.GAM_B_LUT4
+#define VDC50GAM_B_LUT5 VDC50.GAM_B_LUT5
+#define VDC50GAM_B_LUT6 VDC50.GAM_B_LUT6
+#define VDC50GAM_B_LUT7 VDC50.GAM_B_LUT7
+#define VDC50GAM_B_LUT8 VDC50.GAM_B_LUT8
+#define VDC50GAM_B_LUT9 VDC50.GAM_B_LUT9
+#define VDC50GAM_B_LUT10 VDC50.GAM_B_LUT10
+#define VDC50GAM_B_LUT11 VDC50.GAM_B_LUT11
+#define VDC50GAM_B_LUT12 VDC50.GAM_B_LUT12
+#define VDC50GAM_B_LUT13 VDC50.GAM_B_LUT13
+#define VDC50GAM_B_LUT14 VDC50.GAM_B_LUT14
+#define VDC50GAM_B_LUT15 VDC50.GAM_B_LUT15
+#define VDC50GAM_B_LUT16 VDC50.GAM_B_LUT16
+#define VDC50GAM_B_AREA1 VDC50.GAM_B_AREA1
+#define VDC50GAM_B_AREA2 VDC50.GAM_B_AREA2
+#define VDC50GAM_B_AREA3 VDC50.GAM_B_AREA3
+#define VDC50GAM_B_AREA4 VDC50.GAM_B_AREA4
+#define VDC50GAM_B_AREA5 VDC50.GAM_B_AREA5
+#define VDC50GAM_B_AREA6 VDC50.GAM_B_AREA6
+#define VDC50GAM_B_AREA7 VDC50.GAM_B_AREA7
+#define VDC50GAM_B_AREA8 VDC50.GAM_B_AREA8
+#define VDC50GAM_R_UPDATE VDC50.GAM_R_UPDATE
+#define VDC50GAM_R_LUT1 VDC50.GAM_R_LUT1
+#define VDC50GAM_R_LUT2 VDC50.GAM_R_LUT2
+#define VDC50GAM_R_LUT3 VDC50.GAM_R_LUT3
+#define VDC50GAM_R_LUT4 VDC50.GAM_R_LUT4
+#define VDC50GAM_R_LUT5 VDC50.GAM_R_LUT5
+#define VDC50GAM_R_LUT6 VDC50.GAM_R_LUT6
+#define VDC50GAM_R_LUT7 VDC50.GAM_R_LUT7
+#define VDC50GAM_R_LUT8 VDC50.GAM_R_LUT8
+#define VDC50GAM_R_LUT9 VDC50.GAM_R_LUT9
+#define VDC50GAM_R_LUT10 VDC50.GAM_R_LUT10
+#define VDC50GAM_R_LUT11 VDC50.GAM_R_LUT11
+#define VDC50GAM_R_LUT12 VDC50.GAM_R_LUT12
+#define VDC50GAM_R_LUT13 VDC50.GAM_R_LUT13
+#define VDC50GAM_R_LUT14 VDC50.GAM_R_LUT14
+#define VDC50GAM_R_LUT15 VDC50.GAM_R_LUT15
+#define VDC50GAM_R_LUT16 VDC50.GAM_R_LUT16
+#define VDC50GAM_R_AREA1 VDC50.GAM_R_AREA1
+#define VDC50GAM_R_AREA2 VDC50.GAM_R_AREA2
+#define VDC50GAM_R_AREA3 VDC50.GAM_R_AREA3
+#define VDC50GAM_R_AREA4 VDC50.GAM_R_AREA4
+#define VDC50GAM_R_AREA5 VDC50.GAM_R_AREA5
+#define VDC50GAM_R_AREA6 VDC50.GAM_R_AREA6
+#define VDC50GAM_R_AREA7 VDC50.GAM_R_AREA7
+#define VDC50GAM_R_AREA8 VDC50.GAM_R_AREA8
+#define VDC50TCON_UPDATE VDC50.TCON_UPDATE
+#define VDC50TCON_TIM VDC50.TCON_TIM
+#define VDC50TCON_TIM_STVA1 VDC50.TCON_TIM_STVA1
+#define VDC50TCON_TIM_STVA2 VDC50.TCON_TIM_STVA2
+#define VDC50TCON_TIM_STVB1 VDC50.TCON_TIM_STVB1
+#define VDC50TCON_TIM_STVB2 VDC50.TCON_TIM_STVB2
+#define VDC50TCON_TIM_STH1 VDC50.TCON_TIM_STH1
+#define VDC50TCON_TIM_STH2 VDC50.TCON_TIM_STH2
+#define VDC50TCON_TIM_STB1 VDC50.TCON_TIM_STB1
+#define VDC50TCON_TIM_STB2 VDC50.TCON_TIM_STB2
+#define VDC50TCON_TIM_CPV1 VDC50.TCON_TIM_CPV1
+#define VDC50TCON_TIM_CPV2 VDC50.TCON_TIM_CPV2
+#define VDC50TCON_TIM_POLA1 VDC50.TCON_TIM_POLA1
+#define VDC50TCON_TIM_POLA2 VDC50.TCON_TIM_POLA2
+#define VDC50TCON_TIM_POLB1 VDC50.TCON_TIM_POLB1
+#define VDC50TCON_TIM_POLB2 VDC50.TCON_TIM_POLB2
+#define VDC50TCON_TIM_DE VDC50.TCON_TIM_DE
+#define VDC50OUT_UPDATE VDC50.OUT_UPDATE
+#define VDC50OUT_SET VDC50.OUT_SET
+#define VDC50OUT_BRIGHT1 VDC50.OUT_BRIGHT1
+#define VDC50OUT_BRIGHT2 VDC50.OUT_BRIGHT2
+#define VDC50OUT_CONTRAST VDC50.OUT_CONTRAST
+#define VDC50OUT_PDTHA VDC50.OUT_PDTHA
+#define VDC50OUT_CLK_PHASE VDC50.OUT_CLK_PHASE
+#define VDC50SYSCNT_INT1 VDC50.SYSCNT_INT1
+#define VDC50SYSCNT_INT2 VDC50.SYSCNT_INT2
+#define VDC50SYSCNT_INT3 VDC50.SYSCNT_INT3
+#define VDC50SYSCNT_INT4 VDC50.SYSCNT_INT4
+#define VDC50SYSCNT_INT5 VDC50.SYSCNT_INT5
+#define VDC50SYSCNT_INT6 VDC50.SYSCNT_INT6
+#define VDC50SYSCNT_PANEL_CLK VDC50.SYSCNT_PANEL_CLK
+#define VDC50SYSCNT_CLUT VDC50.SYSCNT_CLUT
+#define VDC50SC1_SCL0_UPDATE VDC50.SC1_SCL0_UPDATE
+#define VDC50SC1_SCL0_FRC1 VDC50.SC1_SCL0_FRC1
+#define VDC50SC1_SCL0_FRC2 VDC50.SC1_SCL0_FRC2
+#define VDC50SC1_SCL0_FRC3 VDC50.SC1_SCL0_FRC3
+#define VDC50SC1_SCL0_FRC4 VDC50.SC1_SCL0_FRC4
+#define VDC50SC1_SCL0_FRC5 VDC50.SC1_SCL0_FRC5
+#define VDC50SC1_SCL0_FRC6 VDC50.SC1_SCL0_FRC6
+#define VDC50SC1_SCL0_FRC7 VDC50.SC1_SCL0_FRC7
+#define VDC50SC1_SCL0_FRC9 VDC50.SC1_SCL0_FRC9
+#define VDC50SC1_SCL0_MON0 VDC50.SC1_SCL0_MON0
+#define VDC50SC1_SCL0_INT VDC50.SC1_SCL0_INT
+#define VDC50SC1_SCL0_DS1 VDC50.SC1_SCL0_DS1
+#define VDC50SC1_SCL0_DS2 VDC50.SC1_SCL0_DS2
+#define VDC50SC1_SCL0_DS3 VDC50.SC1_SCL0_DS3
+#define VDC50SC1_SCL0_DS4 VDC50.SC1_SCL0_DS4
+#define VDC50SC1_SCL0_DS5 VDC50.SC1_SCL0_DS5
+#define VDC50SC1_SCL0_DS6 VDC50.SC1_SCL0_DS6
+#define VDC50SC1_SCL0_DS7 VDC50.SC1_SCL0_DS7
+#define VDC50SC1_SCL0_US1 VDC50.SC1_SCL0_US1
+#define VDC50SC1_SCL0_US2 VDC50.SC1_SCL0_US2
+#define VDC50SC1_SCL0_US3 VDC50.SC1_SCL0_US3
+#define VDC50SC1_SCL0_US4 VDC50.SC1_SCL0_US4
+#define VDC50SC1_SCL0_US5 VDC50.SC1_SCL0_US5
+#define VDC50SC1_SCL0_US6 VDC50.SC1_SCL0_US6
+#define VDC50SC1_SCL0_US7 VDC50.SC1_SCL0_US7
+#define VDC50SC1_SCL0_US8 VDC50.SC1_SCL0_US8
+#define VDC50SC1_SCL0_OVR1 VDC50.SC1_SCL0_OVR1
+#define VDC50SC1_SCL1_UPDATE VDC50.SC1_SCL1_UPDATE
+#define VDC50SC1_SCL1_WR1 VDC50.SC1_SCL1_WR1
+#define VDC50SC1_SCL1_WR2 VDC50.SC1_SCL1_WR2
+#define VDC50SC1_SCL1_WR3 VDC50.SC1_SCL1_WR3
+#define VDC50SC1_SCL1_WR4 VDC50.SC1_SCL1_WR4
+#define VDC50SC1_SCL1_WR5 VDC50.SC1_SCL1_WR5
+#define VDC50SC1_SCL1_WR6 VDC50.SC1_SCL1_WR6
+#define VDC50SC1_SCL1_WR7 VDC50.SC1_SCL1_WR7
+#define VDC50SC1_SCL1_WR8 VDC50.SC1_SCL1_WR8
+#define VDC50SC1_SCL1_WR9 VDC50.SC1_SCL1_WR9
+#define VDC50SC1_SCL1_WR10 VDC50.SC1_SCL1_WR10
+#define VDC50SC1_SCL1_WR11 VDC50.SC1_SCL1_WR11
+#define VDC50SC1_SCL1_MON1 VDC50.SC1_SCL1_MON1
+#define VDC50SC1_SCL1_PBUF0 VDC50.SC1_SCL1_PBUF0
+#define VDC50SC1_SCL1_PBUF1 VDC50.SC1_SCL1_PBUF1
+#define VDC50SC1_SCL1_PBUF2 VDC50.SC1_SCL1_PBUF2
+#define VDC50SC1_SCL1_PBUF3 VDC50.SC1_SCL1_PBUF3
+#define VDC50SC1_SCL1_PBUF_FLD VDC50.SC1_SCL1_PBUF_FLD
+#define VDC50SC1_SCL1_PBUF_CNT VDC50.SC1_SCL1_PBUF_CNT
+#define VDC50GR1_UPDATE VDC50.GR1_UPDATE
+#define VDC50GR1_FLM_RD VDC50.GR1_FLM_RD
+#define VDC50GR1_FLM1 VDC50.GR1_FLM1
+#define VDC50GR1_FLM2 VDC50.GR1_FLM2
+#define VDC50GR1_FLM3 VDC50.GR1_FLM3
+#define VDC50GR1_FLM4 VDC50.GR1_FLM4
+#define VDC50GR1_FLM5 VDC50.GR1_FLM5
+#define VDC50GR1_FLM6 VDC50.GR1_FLM6
+#define VDC50GR1_AB1 VDC50.GR1_AB1
+#define VDC50GR1_AB2 VDC50.GR1_AB2
+#define VDC50GR1_AB3 VDC50.GR1_AB3
+#define VDC50GR1_AB4 VDC50.GR1_AB4
+#define VDC50GR1_AB5 VDC50.GR1_AB5
+#define VDC50GR1_AB6 VDC50.GR1_AB6
+#define VDC50GR1_AB7 VDC50.GR1_AB7
+#define VDC50GR1_AB8 VDC50.GR1_AB8
+#define VDC50GR1_AB9 VDC50.GR1_AB9
+#define VDC50GR1_AB10 VDC50.GR1_AB10
+#define VDC50GR1_AB11 VDC50.GR1_AB11
+#define VDC50GR1_BASE VDC50.GR1_BASE
+#define VDC50GR1_CLUT VDC50.GR1_CLUT
+#define VDC50GR1_MON VDC50.GR1_MON
+#define VDC50ADJ1_UPDATE VDC50.ADJ1_UPDATE
+#define VDC50ADJ1_BKSTR_SET VDC50.ADJ1_BKSTR_SET
+#define VDC50ADJ1_ENH_TIM1 VDC50.ADJ1_ENH_TIM1
+#define VDC50ADJ1_ENH_TIM2 VDC50.ADJ1_ENH_TIM2
+#define VDC50ADJ1_ENH_TIM3 VDC50.ADJ1_ENH_TIM3
+#define VDC50ADJ1_ENH_SHP1 VDC50.ADJ1_ENH_SHP1
+#define VDC50ADJ1_ENH_SHP2 VDC50.ADJ1_ENH_SHP2
+#define VDC50ADJ1_ENH_SHP3 VDC50.ADJ1_ENH_SHP3
+#define VDC50ADJ1_ENH_SHP4 VDC50.ADJ1_ENH_SHP4
+#define VDC50ADJ1_ENH_SHP5 VDC50.ADJ1_ENH_SHP5
+#define VDC50ADJ1_ENH_SHP6 VDC50.ADJ1_ENH_SHP6
+#define VDC50ADJ1_ENH_LTI1 VDC50.ADJ1_ENH_LTI1
+#define VDC50ADJ1_ENH_LTI2 VDC50.ADJ1_ENH_LTI2
+#define VDC50ADJ1_MTX_MODE VDC50.ADJ1_MTX_MODE
+#define VDC50ADJ1_MTX_YG_ADJ0 VDC50.ADJ1_MTX_YG_ADJ0
+#define VDC50ADJ1_MTX_YG_ADJ1 VDC50.ADJ1_MTX_YG_ADJ1
+#define VDC50ADJ1_MTX_CBB_ADJ0 VDC50.ADJ1_MTX_CBB_ADJ0
+#define VDC50ADJ1_MTX_CBB_ADJ1 VDC50.ADJ1_MTX_CBB_ADJ1
+#define VDC50ADJ1_MTX_CRR_ADJ0 VDC50.ADJ1_MTX_CRR_ADJ0
+#define VDC50ADJ1_MTX_CRR_ADJ1 VDC50.ADJ1_MTX_CRR_ADJ1
+#define VDC50GR_VIN_UPDATE VDC50.GR_VIN_UPDATE
+#define VDC50GR_VIN_AB1 VDC50.GR_VIN_AB1
+#define VDC50GR_VIN_AB2 VDC50.GR_VIN_AB2
+#define VDC50GR_VIN_AB3 VDC50.GR_VIN_AB3
+#define VDC50GR_VIN_AB4 VDC50.GR_VIN_AB4
+#define VDC50GR_VIN_AB5 VDC50.GR_VIN_AB5
+#define VDC50GR_VIN_AB6 VDC50.GR_VIN_AB6
+#define VDC50GR_VIN_AB7 VDC50.GR_VIN_AB7
+#define VDC50GR_VIN_BASE VDC50.GR_VIN_BASE
+#define VDC50GR_VIN_MON VDC50.GR_VIN_MON
+#define VDC50OIR_SCL0_UPDATE VDC50.OIR_SCL0_UPDATE
+#define VDC50OIR_SCL0_FRC1 VDC50.OIR_SCL0_FRC1
+#define VDC50OIR_SCL0_FRC2 VDC50.OIR_SCL0_FRC2
+#define VDC50OIR_SCL0_FRC3 VDC50.OIR_SCL0_FRC3
+#define VDC50OIR_SCL0_FRC4 VDC50.OIR_SCL0_FRC4
+#define VDC50OIR_SCL0_FRC5 VDC50.OIR_SCL0_FRC5
+#define VDC50OIR_SCL0_FRC6 VDC50.OIR_SCL0_FRC6
+#define VDC50OIR_SCL0_FRC7 VDC50.OIR_SCL0_FRC7
+#define VDC50OIR_SCL0_DS1 VDC50.OIR_SCL0_DS1
+#define VDC50OIR_SCL0_DS2 VDC50.OIR_SCL0_DS2
+#define VDC50OIR_SCL0_DS3 VDC50.OIR_SCL0_DS3
+#define VDC50OIR_SCL0_DS7 VDC50.OIR_SCL0_DS7
+#define VDC50OIR_SCL0_US1 VDC50.OIR_SCL0_US1
+#define VDC50OIR_SCL0_US2 VDC50.OIR_SCL0_US2
+#define VDC50OIR_SCL0_US3 VDC50.OIR_SCL0_US3
+#define VDC50OIR_SCL0_US8 VDC50.OIR_SCL0_US8
+#define VDC50OIR_SCL0_OVR1 VDC50.OIR_SCL0_OVR1
+#define VDC50OIR_SCL1_UPDATE VDC50.OIR_SCL1_UPDATE
+#define VDC50OIR_SCL1_WR1 VDC50.OIR_SCL1_WR1
+#define VDC50OIR_SCL1_WR2 VDC50.OIR_SCL1_WR2
+#define VDC50OIR_SCL1_WR3 VDC50.OIR_SCL1_WR3
+#define VDC50OIR_SCL1_WR4 VDC50.OIR_SCL1_WR4
+#define VDC50OIR_SCL1_WR5 VDC50.OIR_SCL1_WR5
+#define VDC50OIR_SCL1_WR6 VDC50.OIR_SCL1_WR6
+#define VDC50OIR_SCL1_WR7 VDC50.OIR_SCL1_WR7
+#define VDC50GR_OIR_UPDATE VDC50.GR_OIR_UPDATE
+#define VDC50GR_OIR_FLM_RD VDC50.GR_OIR_FLM_RD
+#define VDC50GR_OIR_FLM1 VDC50.GR_OIR_FLM1
+#define VDC50GR_OIR_FLM2 VDC50.GR_OIR_FLM2
+#define VDC50GR_OIR_FLM3 VDC50.GR_OIR_FLM3
+#define VDC50GR_OIR_FLM4 VDC50.GR_OIR_FLM4
+#define VDC50GR_OIR_FLM5 VDC50.GR_OIR_FLM5
+#define VDC50GR_OIR_FLM6 VDC50.GR_OIR_FLM6
+#define VDC50GR_OIR_AB1 VDC50.GR_OIR_AB1
+#define VDC50GR_OIR_AB2 VDC50.GR_OIR_AB2
+#define VDC50GR_OIR_AB3 VDC50.GR_OIR_AB3
+#define VDC50GR_OIR_AB7 VDC50.GR_OIR_AB7
+#define VDC50GR_OIR_AB8 VDC50.GR_OIR_AB8
+#define VDC50GR_OIR_AB9 VDC50.GR_OIR_AB9
+#define VDC50GR_OIR_AB10 VDC50.GR_OIR_AB10
+#define VDC50GR_OIR_AB11 VDC50.GR_OIR_AB11
+#define VDC50GR_OIR_BASE VDC50.GR_OIR_BASE
+#define VDC50GR_OIR_CLUT VDC50.GR_OIR_CLUT
+#define VDC50GR_OIR_MON VDC50.GR_OIR_MON
+#define VDC51INP_UPDATE VDC51.INP_UPDATE
+#define VDC51INP_SEL_CNT VDC51.INP_SEL_CNT
+#define VDC51INP_EXT_SYNC_CNT VDC51.INP_EXT_SYNC_CNT
+#define VDC51INP_VSYNC_PH_ADJ VDC51.INP_VSYNC_PH_ADJ
+#define VDC51INP_DLY_ADJ VDC51.INP_DLY_ADJ
+#define VDC51IMGCNT_UPDATE VDC51.IMGCNT_UPDATE
+#define VDC51IMGCNT_NR_CNT0 VDC51.IMGCNT_NR_CNT0
+#define VDC51IMGCNT_NR_CNT1 VDC51.IMGCNT_NR_CNT1
+#define VDC51IMGCNT_MTX_MODE VDC51.IMGCNT_MTX_MODE
+#define VDC51IMGCNT_MTX_YG_ADJ0 VDC51.IMGCNT_MTX_YG_ADJ0
+#define VDC51IMGCNT_MTX_YG_ADJ1 VDC51.IMGCNT_MTX_YG_ADJ1
+#define VDC51IMGCNT_MTX_CBB_ADJ0 VDC51.IMGCNT_MTX_CBB_ADJ0
+#define VDC51IMGCNT_MTX_CBB_ADJ1 VDC51.IMGCNT_MTX_CBB_ADJ1
+#define VDC51IMGCNT_MTX_CRR_ADJ0 VDC51.IMGCNT_MTX_CRR_ADJ0
+#define VDC51IMGCNT_MTX_CRR_ADJ1 VDC51.IMGCNT_MTX_CRR_ADJ1
+#define VDC51IMGCNT_DRC_REG VDC51.IMGCNT_DRC_REG
+#define VDC51SC0_SCL0_UPDATE VDC51.SC0_SCL0_UPDATE
+#define VDC51SC0_SCL0_FRC1 VDC51.SC0_SCL0_FRC1
+#define VDC51SC0_SCL0_FRC2 VDC51.SC0_SCL0_FRC2
+#define VDC51SC0_SCL0_FRC3 VDC51.SC0_SCL0_FRC3
+#define VDC51SC0_SCL0_FRC4 VDC51.SC0_SCL0_FRC4
+#define VDC51SC0_SCL0_FRC5 VDC51.SC0_SCL0_FRC5
+#define VDC51SC0_SCL0_FRC6 VDC51.SC0_SCL0_FRC6
+#define VDC51SC0_SCL0_FRC7 VDC51.SC0_SCL0_FRC7
+#define VDC51SC0_SCL0_FRC9 VDC51.SC0_SCL0_FRC9
+#define VDC51SC0_SCL0_MON0 VDC51.SC0_SCL0_MON0
+#define VDC51SC0_SCL0_INT VDC51.SC0_SCL0_INT
+#define VDC51SC0_SCL0_DS1 VDC51.SC0_SCL0_DS1
+#define VDC51SC0_SCL0_DS2 VDC51.SC0_SCL0_DS2
+#define VDC51SC0_SCL0_DS3 VDC51.SC0_SCL0_DS3
+#define VDC51SC0_SCL0_DS4 VDC51.SC0_SCL0_DS4
+#define VDC51SC0_SCL0_DS5 VDC51.SC0_SCL0_DS5
+#define VDC51SC0_SCL0_DS6 VDC51.SC0_SCL0_DS6
+#define VDC51SC0_SCL0_DS7 VDC51.SC0_SCL0_DS7
+#define VDC51SC0_SCL0_US1 VDC51.SC0_SCL0_US1
+#define VDC51SC0_SCL0_US2 VDC51.SC0_SCL0_US2
+#define VDC51SC0_SCL0_US3 VDC51.SC0_SCL0_US3
+#define VDC51SC0_SCL0_US4 VDC51.SC0_SCL0_US4
+#define VDC51SC0_SCL0_US5 VDC51.SC0_SCL0_US5
+#define VDC51SC0_SCL0_US6 VDC51.SC0_SCL0_US6
+#define VDC51SC0_SCL0_US7 VDC51.SC0_SCL0_US7
+#define VDC51SC0_SCL0_US8 VDC51.SC0_SCL0_US8
+#define VDC51SC0_SCL0_OVR1 VDC51.SC0_SCL0_OVR1
+#define VDC51SC0_SCL1_UPDATE VDC51.SC0_SCL1_UPDATE
+#define VDC51SC0_SCL1_WR1 VDC51.SC0_SCL1_WR1
+#define VDC51SC0_SCL1_WR2 VDC51.SC0_SCL1_WR2
+#define VDC51SC0_SCL1_WR3 VDC51.SC0_SCL1_WR3
+#define VDC51SC0_SCL1_WR4 VDC51.SC0_SCL1_WR4
+#define VDC51SC0_SCL1_WR5 VDC51.SC0_SCL1_WR5
+#define VDC51SC0_SCL1_WR6 VDC51.SC0_SCL1_WR6
+#define VDC51SC0_SCL1_WR7 VDC51.SC0_SCL1_WR7
+#define VDC51SC0_SCL1_WR8 VDC51.SC0_SCL1_WR8
+#define VDC51SC0_SCL1_WR9 VDC51.SC0_SCL1_WR9
+#define VDC51SC0_SCL1_WR10 VDC51.SC0_SCL1_WR10
+#define VDC51SC0_SCL1_WR11 VDC51.SC0_SCL1_WR11
+#define VDC51SC0_SCL1_MON1 VDC51.SC0_SCL1_MON1
+#define VDC51SC0_SCL1_PBUF0 VDC51.SC0_SCL1_PBUF0
+#define VDC51SC0_SCL1_PBUF1 VDC51.SC0_SCL1_PBUF1
+#define VDC51SC0_SCL1_PBUF2 VDC51.SC0_SCL1_PBUF2
+#define VDC51SC0_SCL1_PBUF3 VDC51.SC0_SCL1_PBUF3
+#define VDC51SC0_SCL1_PBUF_FLD VDC51.SC0_SCL1_PBUF_FLD
+#define VDC51SC0_SCL1_PBUF_CNT VDC51.SC0_SCL1_PBUF_CNT
+#define VDC51GR0_UPDATE VDC51.GR0_UPDATE
+#define VDC51GR0_FLM_RD VDC51.GR0_FLM_RD
+#define VDC51GR0_FLM1 VDC51.GR0_FLM1
+#define VDC51GR0_FLM2 VDC51.GR0_FLM2
+#define VDC51GR0_FLM3 VDC51.GR0_FLM3
+#define VDC51GR0_FLM4 VDC51.GR0_FLM4
+#define VDC51GR0_FLM5 VDC51.GR0_FLM5
+#define VDC51GR0_FLM6 VDC51.GR0_FLM6
+#define VDC51GR0_AB1 VDC51.GR0_AB1
+#define VDC51GR0_AB2 VDC51.GR0_AB2
+#define VDC51GR0_AB3 VDC51.GR0_AB3
+#define VDC51GR0_AB7 VDC51.GR0_AB7
+#define VDC51GR0_AB8 VDC51.GR0_AB8
+#define VDC51GR0_AB9 VDC51.GR0_AB9
+#define VDC51GR0_AB10 VDC51.GR0_AB10
+#define VDC51GR0_AB11 VDC51.GR0_AB11
+#define VDC51GR0_BASE VDC51.GR0_BASE
+#define VDC51GR0_CLUT VDC51.GR0_CLUT
+#define VDC51ADJ0_UPDATE VDC51.ADJ0_UPDATE
+#define VDC51ADJ0_BKSTR_SET VDC51.ADJ0_BKSTR_SET
+#define VDC51ADJ0_ENH_TIM1 VDC51.ADJ0_ENH_TIM1
+#define VDC51ADJ0_ENH_TIM2 VDC51.ADJ0_ENH_TIM2
+#define VDC51ADJ0_ENH_TIM3 VDC51.ADJ0_ENH_TIM3
+#define VDC51ADJ0_ENH_SHP1 VDC51.ADJ0_ENH_SHP1
+#define VDC51ADJ0_ENH_SHP2 VDC51.ADJ0_ENH_SHP2
+#define VDC51ADJ0_ENH_SHP3 VDC51.ADJ0_ENH_SHP3
+#define VDC51ADJ0_ENH_SHP4 VDC51.ADJ0_ENH_SHP4
+#define VDC51ADJ0_ENH_SHP5 VDC51.ADJ0_ENH_SHP5
+#define VDC51ADJ0_ENH_SHP6 VDC51.ADJ0_ENH_SHP6
+#define VDC51ADJ0_ENH_LTI1 VDC51.ADJ0_ENH_LTI1
+#define VDC51ADJ0_ENH_LTI2 VDC51.ADJ0_ENH_LTI2
+#define VDC51ADJ0_MTX_MODE VDC51.ADJ0_MTX_MODE
+#define VDC51ADJ0_MTX_YG_ADJ0 VDC51.ADJ0_MTX_YG_ADJ0
+#define VDC51ADJ0_MTX_YG_ADJ1 VDC51.ADJ0_MTX_YG_ADJ1
+#define VDC51ADJ0_MTX_CBB_ADJ0 VDC51.ADJ0_MTX_CBB_ADJ0
+#define VDC51ADJ0_MTX_CBB_ADJ1 VDC51.ADJ0_MTX_CBB_ADJ1
+#define VDC51ADJ0_MTX_CRR_ADJ0 VDC51.ADJ0_MTX_CRR_ADJ0
+#define VDC51ADJ0_MTX_CRR_ADJ1 VDC51.ADJ0_MTX_CRR_ADJ1
+#define VDC51GR2_UPDATE VDC51.GR2_UPDATE
+#define VDC51GR2_FLM_RD VDC51.GR2_FLM_RD
+#define VDC51GR2_FLM1 VDC51.GR2_FLM1
+#define VDC51GR2_FLM2 VDC51.GR2_FLM2
+#define VDC51GR2_FLM3 VDC51.GR2_FLM3
+#define VDC51GR2_FLM4 VDC51.GR2_FLM4
+#define VDC51GR2_FLM5 VDC51.GR2_FLM5
+#define VDC51GR2_FLM6 VDC51.GR2_FLM6
+#define VDC51GR2_AB1 VDC51.GR2_AB1
+#define VDC51GR2_AB2 VDC51.GR2_AB2
+#define VDC51GR2_AB3 VDC51.GR2_AB3
+#define VDC51GR2_AB4 VDC51.GR2_AB4
+#define VDC51GR2_AB5 VDC51.GR2_AB5
+#define VDC51GR2_AB6 VDC51.GR2_AB6
+#define VDC51GR2_AB7 VDC51.GR2_AB7
+#define VDC51GR2_AB8 VDC51.GR2_AB8
+#define VDC51GR2_AB9 VDC51.GR2_AB9
+#define VDC51GR2_AB10 VDC51.GR2_AB10
+#define VDC51GR2_AB11 VDC51.GR2_AB11
+#define VDC51GR2_BASE VDC51.GR2_BASE
+#define VDC51GR2_CLUT VDC51.GR2_CLUT
+#define VDC51GR2_MON VDC51.GR2_MON
+#define VDC51GR3_UPDATE VDC51.GR3_UPDATE
+#define VDC51GR3_FLM_RD VDC51.GR3_FLM_RD
+#define VDC51GR3_FLM1 VDC51.GR3_FLM1
+#define VDC51GR3_FLM2 VDC51.GR3_FLM2
+#define VDC51GR3_FLM3 VDC51.GR3_FLM3
+#define VDC51GR3_FLM4 VDC51.GR3_FLM4
+#define VDC51GR3_FLM5 VDC51.GR3_FLM5
+#define VDC51GR3_FLM6 VDC51.GR3_FLM6
+#define VDC51GR3_AB1 VDC51.GR3_AB1
+#define VDC51GR3_AB2 VDC51.GR3_AB2
+#define VDC51GR3_AB3 VDC51.GR3_AB3
+#define VDC51GR3_AB4 VDC51.GR3_AB4
+#define VDC51GR3_AB5 VDC51.GR3_AB5
+#define VDC51GR3_AB6 VDC51.GR3_AB6
+#define VDC51GR3_AB7 VDC51.GR3_AB7
+#define VDC51GR3_AB8 VDC51.GR3_AB8
+#define VDC51GR3_AB9 VDC51.GR3_AB9
+#define VDC51GR3_AB10 VDC51.GR3_AB10
+#define VDC51GR3_AB11 VDC51.GR3_AB11
+#define VDC51GR3_BASE VDC51.GR3_BASE
+#define VDC51GR3_CLUT_INT VDC51.GR3_CLUT_INT
+#define VDC51GR3_MON VDC51.GR3_MON
+#define VDC51GAM_G_UPDATE VDC51.GAM_G_UPDATE
+#define VDC51GAM_SW VDC51.GAM_SW
+#define VDC51GAM_G_LUT1 VDC51.GAM_G_LUT1
+#define VDC51GAM_G_LUT2 VDC51.GAM_G_LUT2
+#define VDC51GAM_G_LUT3 VDC51.GAM_G_LUT3
+#define VDC51GAM_G_LUT4 VDC51.GAM_G_LUT4
+#define VDC51GAM_G_LUT5 VDC51.GAM_G_LUT5
+#define VDC51GAM_G_LUT6 VDC51.GAM_G_LUT6
+#define VDC51GAM_G_LUT7 VDC51.GAM_G_LUT7
+#define VDC51GAM_G_LUT8 VDC51.GAM_G_LUT8
+#define VDC51GAM_G_LUT9 VDC51.GAM_G_LUT9
+#define VDC51GAM_G_LUT10 VDC51.GAM_G_LUT10
+#define VDC51GAM_G_LUT11 VDC51.GAM_G_LUT11
+#define VDC51GAM_G_LUT12 VDC51.GAM_G_LUT12
+#define VDC51GAM_G_LUT13 VDC51.GAM_G_LUT13
+#define VDC51GAM_G_LUT14 VDC51.GAM_G_LUT14
+#define VDC51GAM_G_LUT15 VDC51.GAM_G_LUT15
+#define VDC51GAM_G_LUT16 VDC51.GAM_G_LUT16
+#define VDC51GAM_G_AREA1 VDC51.GAM_G_AREA1
+#define VDC51GAM_G_AREA2 VDC51.GAM_G_AREA2
+#define VDC51GAM_G_AREA3 VDC51.GAM_G_AREA3
+#define VDC51GAM_G_AREA4 VDC51.GAM_G_AREA4
+#define VDC51GAM_G_AREA5 VDC51.GAM_G_AREA5
+#define VDC51GAM_G_AREA6 VDC51.GAM_G_AREA6
+#define VDC51GAM_G_AREA7 VDC51.GAM_G_AREA7
+#define VDC51GAM_G_AREA8 VDC51.GAM_G_AREA8
+#define VDC51GAM_B_UPDATE VDC51.GAM_B_UPDATE
+#define VDC51GAM_B_LUT1 VDC51.GAM_B_LUT1
+#define VDC51GAM_B_LUT2 VDC51.GAM_B_LUT2
+#define VDC51GAM_B_LUT3 VDC51.GAM_B_LUT3
+#define VDC51GAM_B_LUT4 VDC51.GAM_B_LUT4
+#define VDC51GAM_B_LUT5 VDC51.GAM_B_LUT5
+#define VDC51GAM_B_LUT6 VDC51.GAM_B_LUT6
+#define VDC51GAM_B_LUT7 VDC51.GAM_B_LUT7
+#define VDC51GAM_B_LUT8 VDC51.GAM_B_LUT8
+#define VDC51GAM_B_LUT9 VDC51.GAM_B_LUT9
+#define VDC51GAM_B_LUT10 VDC51.GAM_B_LUT10
+#define VDC51GAM_B_LUT11 VDC51.GAM_B_LUT11
+#define VDC51GAM_B_LUT12 VDC51.GAM_B_LUT12
+#define VDC51GAM_B_LUT13 VDC51.GAM_B_LUT13
+#define VDC51GAM_B_LUT14 VDC51.GAM_B_LUT14
+#define VDC51GAM_B_LUT15 VDC51.GAM_B_LUT15
+#define VDC51GAM_B_LUT16 VDC51.GAM_B_LUT16
+#define VDC51GAM_B_AREA1 VDC51.GAM_B_AREA1
+#define VDC51GAM_B_AREA2 VDC51.GAM_B_AREA2
+#define VDC51GAM_B_AREA3 VDC51.GAM_B_AREA3
+#define VDC51GAM_B_AREA4 VDC51.GAM_B_AREA4
+#define VDC51GAM_B_AREA5 VDC51.GAM_B_AREA5
+#define VDC51GAM_B_AREA6 VDC51.GAM_B_AREA6
+#define VDC51GAM_B_AREA7 VDC51.GAM_B_AREA7
+#define VDC51GAM_B_AREA8 VDC51.GAM_B_AREA8
+#define VDC51GAM_R_UPDATE VDC51.GAM_R_UPDATE
+#define VDC51GAM_R_LUT1 VDC51.GAM_R_LUT1
+#define VDC51GAM_R_LUT2 VDC51.GAM_R_LUT2
+#define VDC51GAM_R_LUT3 VDC51.GAM_R_LUT3
+#define VDC51GAM_R_LUT4 VDC51.GAM_R_LUT4
+#define VDC51GAM_R_LUT5 VDC51.GAM_R_LUT5
+#define VDC51GAM_R_LUT6 VDC51.GAM_R_LUT6
+#define VDC51GAM_R_LUT7 VDC51.GAM_R_LUT7
+#define VDC51GAM_R_LUT8 VDC51.GAM_R_LUT8
+#define VDC51GAM_R_LUT9 VDC51.GAM_R_LUT9
+#define VDC51GAM_R_LUT10 VDC51.GAM_R_LUT10
+#define VDC51GAM_R_LUT11 VDC51.GAM_R_LUT11
+#define VDC51GAM_R_LUT12 VDC51.GAM_R_LUT12
+#define VDC51GAM_R_LUT13 VDC51.GAM_R_LUT13
+#define VDC51GAM_R_LUT14 VDC51.GAM_R_LUT14
+#define VDC51GAM_R_LUT15 VDC51.GAM_R_LUT15
+#define VDC51GAM_R_LUT16 VDC51.GAM_R_LUT16
+#define VDC51GAM_R_AREA1 VDC51.GAM_R_AREA1
+#define VDC51GAM_R_AREA2 VDC51.GAM_R_AREA2
+#define VDC51GAM_R_AREA3 VDC51.GAM_R_AREA3
+#define VDC51GAM_R_AREA4 VDC51.GAM_R_AREA4
+#define VDC51GAM_R_AREA5 VDC51.GAM_R_AREA5
+#define VDC51GAM_R_AREA6 VDC51.GAM_R_AREA6
+#define VDC51GAM_R_AREA7 VDC51.GAM_R_AREA7
+#define VDC51GAM_R_AREA8 VDC51.GAM_R_AREA8
+#define VDC51TCON_UPDATE VDC51.TCON_UPDATE
+#define VDC51TCON_TIM VDC51.TCON_TIM
+#define VDC51TCON_TIM_STVA1 VDC51.TCON_TIM_STVA1
+#define VDC51TCON_TIM_STVA2 VDC51.TCON_TIM_STVA2
+#define VDC51TCON_TIM_STVB1 VDC51.TCON_TIM_STVB1
+#define VDC51TCON_TIM_STVB2 VDC51.TCON_TIM_STVB2
+#define VDC51TCON_TIM_STH1 VDC51.TCON_TIM_STH1
+#define VDC51TCON_TIM_STH2 VDC51.TCON_TIM_STH2
+#define VDC51TCON_TIM_STB1 VDC51.TCON_TIM_STB1
+#define VDC51TCON_TIM_STB2 VDC51.TCON_TIM_STB2
+#define VDC51TCON_TIM_CPV1 VDC51.TCON_TIM_CPV1
+#define VDC51TCON_TIM_CPV2 VDC51.TCON_TIM_CPV2
+#define VDC51TCON_TIM_POLA1 VDC51.TCON_TIM_POLA1
+#define VDC51TCON_TIM_POLA2 VDC51.TCON_TIM_POLA2
+#define VDC51TCON_TIM_POLB1 VDC51.TCON_TIM_POLB1
+#define VDC51TCON_TIM_POLB2 VDC51.TCON_TIM_POLB2
+#define VDC51TCON_TIM_DE VDC51.TCON_TIM_DE
+#define VDC51OUT_UPDATE VDC51.OUT_UPDATE
+#define VDC51OUT_SET VDC51.OUT_SET
+#define VDC51OUT_BRIGHT1 VDC51.OUT_BRIGHT1
+#define VDC51OUT_BRIGHT2 VDC51.OUT_BRIGHT2
+#define VDC51OUT_CONTRAST VDC51.OUT_CONTRAST
+#define VDC51OUT_PDTHA VDC51.OUT_PDTHA
+#define VDC51OUT_CLK_PHASE VDC51.OUT_CLK_PHASE
+#define VDC51SYSCNT_INT1 VDC51.SYSCNT_INT1
+#define VDC51SYSCNT_INT2 VDC51.SYSCNT_INT2
+#define VDC51SYSCNT_INT3 VDC51.SYSCNT_INT3
+#define VDC51SYSCNT_INT4 VDC51.SYSCNT_INT4
+#define VDC51SYSCNT_INT5 VDC51.SYSCNT_INT5
+#define VDC51SYSCNT_INT6 VDC51.SYSCNT_INT6
+#define VDC51SYSCNT_PANEL_CLK VDC51.SYSCNT_PANEL_CLK
+#define VDC51SYSCNT_CLUT VDC51.SYSCNT_CLUT
+#define VDC51SC1_SCL0_UPDATE VDC51.SC1_SCL0_UPDATE
+#define VDC51SC1_SCL0_FRC1 VDC51.SC1_SCL0_FRC1
+#define VDC51SC1_SCL0_FRC2 VDC51.SC1_SCL0_FRC2
+#define VDC51SC1_SCL0_FRC3 VDC51.SC1_SCL0_FRC3
+#define VDC51SC1_SCL0_FRC4 VDC51.SC1_SCL0_FRC4
+#define VDC51SC1_SCL0_FRC5 VDC51.SC1_SCL0_FRC5
+#define VDC51SC1_SCL0_FRC6 VDC51.SC1_SCL0_FRC6
+#define VDC51SC1_SCL0_FRC7 VDC51.SC1_SCL0_FRC7
+#define VDC51SC1_SCL0_FRC9 VDC51.SC1_SCL0_FRC9
+#define VDC51SC1_SCL0_MON0 VDC51.SC1_SCL0_MON0
+#define VDC51SC1_SCL0_INT VDC51.SC1_SCL0_INT
+#define VDC51SC1_SCL0_DS1 VDC51.SC1_SCL0_DS1
+#define VDC51SC1_SCL0_DS2 VDC51.SC1_SCL0_DS2
+#define VDC51SC1_SCL0_DS3 VDC51.SC1_SCL0_DS3
+#define VDC51SC1_SCL0_DS4 VDC51.SC1_SCL0_DS4
+#define VDC51SC1_SCL0_DS5 VDC51.SC1_SCL0_DS5
+#define VDC51SC1_SCL0_DS6 VDC51.SC1_SCL0_DS6
+#define VDC51SC1_SCL0_DS7 VDC51.SC1_SCL0_DS7
+#define VDC51SC1_SCL0_US1 VDC51.SC1_SCL0_US1
+#define VDC51SC1_SCL0_US2 VDC51.SC1_SCL0_US2
+#define VDC51SC1_SCL0_US3 VDC51.SC1_SCL0_US3
+#define VDC51SC1_SCL0_US4 VDC51.SC1_SCL0_US4
+#define VDC51SC1_SCL0_US5 VDC51.SC1_SCL0_US5
+#define VDC51SC1_SCL0_US6 VDC51.SC1_SCL0_US6
+#define VDC51SC1_SCL0_US7 VDC51.SC1_SCL0_US7
+#define VDC51SC1_SCL0_US8 VDC51.SC1_SCL0_US8
+#define VDC51SC1_SCL0_OVR1 VDC51.SC1_SCL0_OVR1
+#define VDC51SC1_SCL1_UPDATE VDC51.SC1_SCL1_UPDATE
+#define VDC51SC1_SCL1_WR1 VDC51.SC1_SCL1_WR1
+#define VDC51SC1_SCL1_WR2 VDC51.SC1_SCL1_WR2
+#define VDC51SC1_SCL1_WR3 VDC51.SC1_SCL1_WR3
+#define VDC51SC1_SCL1_WR4 VDC51.SC1_SCL1_WR4
+#define VDC51SC1_SCL1_WR5 VDC51.SC1_SCL1_WR5
+#define VDC51SC1_SCL1_WR6 VDC51.SC1_SCL1_WR6
+#define VDC51SC1_SCL1_WR7 VDC51.SC1_SCL1_WR7
+#define VDC51SC1_SCL1_WR8 VDC51.SC1_SCL1_WR8
+#define VDC51SC1_SCL1_WR9 VDC51.SC1_SCL1_WR9
+#define VDC51SC1_SCL1_WR10 VDC51.SC1_SCL1_WR10
+#define VDC51SC1_SCL1_WR11 VDC51.SC1_SCL1_WR11
+#define VDC51SC1_SCL1_MON1 VDC51.SC1_SCL1_MON1
+#define VDC51SC1_SCL1_PBUF0 VDC51.SC1_SCL1_PBUF0
+#define VDC51SC1_SCL1_PBUF1 VDC51.SC1_SCL1_PBUF1
+#define VDC51SC1_SCL1_PBUF2 VDC51.SC1_SCL1_PBUF2
+#define VDC51SC1_SCL1_PBUF3 VDC51.SC1_SCL1_PBUF3
+#define VDC51SC1_SCL1_PBUF_FLD VDC51.SC1_SCL1_PBUF_FLD
+#define VDC51SC1_SCL1_PBUF_CNT VDC51.SC1_SCL1_PBUF_CNT
+#define VDC51GR1_UPDATE VDC51.GR1_UPDATE
+#define VDC51GR1_FLM_RD VDC51.GR1_FLM_RD
+#define VDC51GR1_FLM1 VDC51.GR1_FLM1
+#define VDC51GR1_FLM2 VDC51.GR1_FLM2
+#define VDC51GR1_FLM3 VDC51.GR1_FLM3
+#define VDC51GR1_FLM4 VDC51.GR1_FLM4
+#define VDC51GR1_FLM5 VDC51.GR1_FLM5
+#define VDC51GR1_FLM6 VDC51.GR1_FLM6
+#define VDC51GR1_AB1 VDC51.GR1_AB1
+#define VDC51GR1_AB2 VDC51.GR1_AB2
+#define VDC51GR1_AB3 VDC51.GR1_AB3
+#define VDC51GR1_AB4 VDC51.GR1_AB4
+#define VDC51GR1_AB5 VDC51.GR1_AB5
+#define VDC51GR1_AB6 VDC51.GR1_AB6
+#define VDC51GR1_AB7 VDC51.GR1_AB7
+#define VDC51GR1_AB8 VDC51.GR1_AB8
+#define VDC51GR1_AB9 VDC51.GR1_AB9
+#define VDC51GR1_AB10 VDC51.GR1_AB10
+#define VDC51GR1_AB11 VDC51.GR1_AB11
+#define VDC51GR1_BASE VDC51.GR1_BASE
+#define VDC51GR1_CLUT VDC51.GR1_CLUT
+#define VDC51GR1_MON VDC51.GR1_MON
+#define VDC51ADJ1_UPDATE VDC51.ADJ1_UPDATE
+#define VDC51ADJ1_BKSTR_SET VDC51.ADJ1_BKSTR_SET
+#define VDC51ADJ1_ENH_TIM1 VDC51.ADJ1_ENH_TIM1
+#define VDC51ADJ1_ENH_TIM2 VDC51.ADJ1_ENH_TIM2
+#define VDC51ADJ1_ENH_TIM3 VDC51.ADJ1_ENH_TIM3
+#define VDC51ADJ1_ENH_SHP1 VDC51.ADJ1_ENH_SHP1
+#define VDC51ADJ1_ENH_SHP2 VDC51.ADJ1_ENH_SHP2
+#define VDC51ADJ1_ENH_SHP3 VDC51.ADJ1_ENH_SHP3
+#define VDC51ADJ1_ENH_SHP4 VDC51.ADJ1_ENH_SHP4
+#define VDC51ADJ1_ENH_SHP5 VDC51.ADJ1_ENH_SHP5
+#define VDC51ADJ1_ENH_SHP6 VDC51.ADJ1_ENH_SHP6
+#define VDC51ADJ1_ENH_LTI1 VDC51.ADJ1_ENH_LTI1
+#define VDC51ADJ1_ENH_LTI2 VDC51.ADJ1_ENH_LTI2
+#define VDC51ADJ1_MTX_MODE VDC51.ADJ1_MTX_MODE
+#define VDC51ADJ1_MTX_YG_ADJ0 VDC51.ADJ1_MTX_YG_ADJ0
+#define VDC51ADJ1_MTX_YG_ADJ1 VDC51.ADJ1_MTX_YG_ADJ1
+#define VDC51ADJ1_MTX_CBB_ADJ0 VDC51.ADJ1_MTX_CBB_ADJ0
+#define VDC51ADJ1_MTX_CBB_ADJ1 VDC51.ADJ1_MTX_CBB_ADJ1
+#define VDC51ADJ1_MTX_CRR_ADJ0 VDC51.ADJ1_MTX_CRR_ADJ0
+#define VDC51ADJ1_MTX_CRR_ADJ1 VDC51.ADJ1_MTX_CRR_ADJ1
+#define VDC51GR_VIN_UPDATE VDC51.GR_VIN_UPDATE
+#define VDC51GR_VIN_AB1 VDC51.GR_VIN_AB1
+#define VDC51GR_VIN_AB2 VDC51.GR_VIN_AB2
+#define VDC51GR_VIN_AB3 VDC51.GR_VIN_AB3
+#define VDC51GR_VIN_AB4 VDC51.GR_VIN_AB4
+#define VDC51GR_VIN_AB5 VDC51.GR_VIN_AB5
+#define VDC51GR_VIN_AB6 VDC51.GR_VIN_AB6
+#define VDC51GR_VIN_AB7 VDC51.GR_VIN_AB7
+#define VDC51GR_VIN_BASE VDC51.GR_VIN_BASE
+#define VDC51GR_VIN_MON VDC51.GR_VIN_MON
+#define VDC51OIR_SCL0_UPDATE VDC51.OIR_SCL0_UPDATE
+#define VDC51OIR_SCL0_FRC1 VDC51.OIR_SCL0_FRC1
+#define VDC51OIR_SCL0_FRC2 VDC51.OIR_SCL0_FRC2
+#define VDC51OIR_SCL0_FRC3 VDC51.OIR_SCL0_FRC3
+#define VDC51OIR_SCL0_FRC4 VDC51.OIR_SCL0_FRC4
+#define VDC51OIR_SCL0_FRC5 VDC51.OIR_SCL0_FRC5
+#define VDC51OIR_SCL0_FRC6 VDC51.OIR_SCL0_FRC6
+#define VDC51OIR_SCL0_FRC7 VDC51.OIR_SCL0_FRC7
+#define VDC51OIR_SCL0_DS1 VDC51.OIR_SCL0_DS1
+#define VDC51OIR_SCL0_DS2 VDC51.OIR_SCL0_DS2
+#define VDC51OIR_SCL0_DS3 VDC51.OIR_SCL0_DS3
+#define VDC51OIR_SCL0_DS7 VDC51.OIR_SCL0_DS7
+#define VDC51OIR_SCL0_US1 VDC51.OIR_SCL0_US1
+#define VDC51OIR_SCL0_US2 VDC51.OIR_SCL0_US2
+#define VDC51OIR_SCL0_US3 VDC51.OIR_SCL0_US3
+#define VDC51OIR_SCL0_US8 VDC51.OIR_SCL0_US8
+#define VDC51OIR_SCL0_OVR1 VDC51.OIR_SCL0_OVR1
+#define VDC51OIR_SCL1_UPDATE VDC51.OIR_SCL1_UPDATE
+#define VDC51OIR_SCL1_WR1 VDC51.OIR_SCL1_WR1
+#define VDC51OIR_SCL1_WR2 VDC51.OIR_SCL1_WR2
+#define VDC51OIR_SCL1_WR3 VDC51.OIR_SCL1_WR3
+#define VDC51OIR_SCL1_WR4 VDC51.OIR_SCL1_WR4
+#define VDC51OIR_SCL1_WR5 VDC51.OIR_SCL1_WR5
+#define VDC51OIR_SCL1_WR6 VDC51.OIR_SCL1_WR6
+#define VDC51OIR_SCL1_WR7 VDC51.OIR_SCL1_WR7
+#define VDC51GR_OIR_UPDATE VDC51.GR_OIR_UPDATE
+#define VDC51GR_OIR_FLM_RD VDC51.GR_OIR_FLM_RD
+#define VDC51GR_OIR_FLM1 VDC51.GR_OIR_FLM1
+#define VDC51GR_OIR_FLM2 VDC51.GR_OIR_FLM2
+#define VDC51GR_OIR_FLM3 VDC51.GR_OIR_FLM3
+#define VDC51GR_OIR_FLM4 VDC51.GR_OIR_FLM4
+#define VDC51GR_OIR_FLM5 VDC51.GR_OIR_FLM5
+#define VDC51GR_OIR_FLM6 VDC51.GR_OIR_FLM6
+#define VDC51GR_OIR_AB1 VDC51.GR_OIR_AB1
+#define VDC51GR_OIR_AB2 VDC51.GR_OIR_AB2
+#define VDC51GR_OIR_AB3 VDC51.GR_OIR_AB3
+#define VDC51GR_OIR_AB7 VDC51.GR_OIR_AB7
+#define VDC51GR_OIR_AB8 VDC51.GR_OIR_AB8
+#define VDC51GR_OIR_AB9 VDC51.GR_OIR_AB9
+#define VDC51GR_OIR_AB10 VDC51.GR_OIR_AB10
+#define VDC51GR_OIR_AB11 VDC51.GR_OIR_AB11
+#define VDC51GR_OIR_BASE VDC51.GR_OIR_BASE
+#define VDC51GR_OIR_CLUT VDC51.GR_OIR_CLUT
+#define VDC51GR_OIR_MON VDC51.GR_OIR_MON
+/* <-SEC M1.10.1 */
+/* <-QAC 0639 */
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/wdt_iodefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/wdt_iodefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines/wdt_iodefine.h	(revision 270)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer*
+* Copyright (C) 2013-2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : wdt_iodefine.h
+* $Rev: $
+* $Date::                           $
+* Description : Definition of I/O Register (V1.00a)
+******************************************************************************/
+#ifndef WDT_IODEFINE_H
+#define WDT_IODEFINE_H
+
+struct st_wdt
+{                                                          /* WDT              */
+    volatile uint16_t WTCSR;                                  /*  WTCSR           */
+    volatile uint16_t WTCNT;                                  /*  WTCNT           */
+    volatile uint16_t WRCSR;                                  /*  WRCSR           */
+};
+
+
+#define WDT     (*(struct st_wdt     *)0xFCFE0000uL) /* WDT */
+
+
+#define WDTWTCSR WDT.WTCSR
+#define WDTWTCNT WDT.WTCNT
+#define WDTWRCSR WDT.WRCSR
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/reg32_t.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/reg32_t.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/reg32_t.h	(revision 270)
@@ -0,0 +1,11 @@
+#ifndef __REG32_T
+#define __REG32_T
+
+union reg32_t {
+    volatile uint32_t UINT32;
+    volatile uint16_t UINT16[2];
+    volatile uint8_t  UINT8[4];
+};
+
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/rza_io_regrw.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/rza_io_regrw.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/rza_io_regrw.h	(revision 270)
@@ -0,0 +1,83 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name   : rza_io_regrw.h
+* $Rev: 1135 $
+* $Date:: 2014-08-08 10:11:30 +0900#$
+* Description : Low level register read/write header
+*******************************************************************************/
+#ifndef RZA_IO_REGRW_H
+#define RZA_IO_REGRW_H
+
+/******************************************************************************
+Includes   <System Includes> , "Project Includes"
+******************************************************************************/
+/* ==== includes each bit mask header ==== */
+#include "cpg_iobitmask.h"
+#include "intc_iobitmask.h"
+#include "bsc_iobitmask.h"
+#include "dmac_iobitmask.h"
+#include "mtu2_iobitmask.h"
+#include "ostm_iobitmask.h"
+#include "scif_iobitmask.h"
+#include "rspi_iobitmask.h"
+#include "riic_iobitmask.h"
+#include "usb_iobitmask.h"
+#include "gpio_iobitmask.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************
+Typedef definitions
+******************************************************************************/
+
+
+/******************************************************************************
+Macro definitions
+******************************************************************************/
+
+
+/******************************************************************************
+Variable Externs
+******************************************************************************/
+
+
+/******************************************************************************
+Functions Prototypes
+******************************************************************************/
+void     RZA_IO_RegWrite_8 (volatile uint8_t  * ioreg, uint8_t  write_value, uint8_t  shift, uint8_t  mask);
+void     RZA_IO_RegWrite_16(volatile uint16_t * ioreg, uint16_t write_value, uint16_t shift, uint16_t mask);
+void     RZA_IO_RegWrite_32(volatile uint32_t * ioreg, uint32_t write_value, uint32_t shift, uint32_t mask);
+uint8_t  RZA_IO_RegRead_8  (volatile uint8_t  * ioreg, uint8_t  shift, uint8_t  mask);
+uint16_t RZA_IO_RegRead_16 (volatile uint16_t * ioreg, uint16_t shift, uint16_t mask);
+uint32_t RZA_IO_RegRead_32 (volatile uint32_t * ioreg, uint32_t shift, uint32_t mask);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  /* RZA_IO_REGRW_H */
+
+/* End of File */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/mbed_sf_boot.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/mbed_sf_boot.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/mbed_sf_boot.c	(revision 270)
@@ -0,0 +1,826 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/**************************************************************************//**
+* @file         mbed_sf_boot.c
+* $Rev: $
+* $Date::                           $
+* @brief        RZ_A1 serial flash boot loader
+******************************************************************************/
+#if defined  (__CC_ARM)
+#pragma arm section rodata = "BOOT_LOADER"
+const char boot_loader[]  __attribute__((used)) =
+
+#else
+const char boot_loader[]  __attribute__ ((section(".boot_loader"), used)) =
+
+#endif
+{
+    0x18,0xF0,0x9F,0xE5,0x18,0xF0,0x9F,0xE5,0x18,0xF0,0x9F,0xE5,0x18,0xF0,0x9F,0xE5,
+    0x18,0xF0,0x9F,0xE5,0x18,0xF0,0x9F,0xE5,0x18,0xF0,0x9F,0xE5,0x18,0xF0,0x9F,0xE5,
+    0x00,0x30,0x00,0x18,0x74,0x30,0x00,0x18,0x78,0x30,0x00,0x18,0x7C,0x30,0x00,0x18,
+    0x80,0x30,0x00,0x18,0x84,0x30,0x00,0x18,0x88,0x30,0x00,0x18,0x8C,0x30,0x00,0x18,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0x2C,0x30,0x9F,0xE5,0x00,0x20,0xA0,0xE3,0x28,0x10,0x9F,0xE5,0x28,0x00,0x9F,0xE5,
+    0x10,0x40,0x2D,0xE9,0x23,0x31,0xA0,0xE1,0x02,0x00,0x00,0xEA,0x04,0x40,0x91,0xE4,
+    0x01,0x20,0x82,0xE2,0x04,0x40,0x80,0xE4,0x03,0x00,0x52,0xE1,0xFA,0xFF,0xFF,0xBA,
+    0x10,0x80,0xBD,0xE8,0x97,0x28,0x00,0x00,0x00,0x04,0x00,0x18,0x00,0x02,0x02,0x20,
+    0x70,0x40,0x2D,0xE9,0x02,0x29,0xA0,0xE3,0xC8,0x40,0x9F,0xE5,0x0F,0x10,0xA0,0xE3,
+    0x04,0x00,0xA0,0xE1,0x4C,0x00,0x00,0xEB,0x01,0x00,0x50,0xE3,0x06,0x00,0x00,0x1A,
+    0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x04,0x00,0xA0,0xE1,
+    0x33,0x00,0x00,0xEB,0x08,0x00,0x44,0xE2,0xB8,0x00,0xD0,0xE1,0x01,0x34,0xA0,0xE3,
+    0x94,0x50,0x9F,0xE5,0x18,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,
+    0x32,0x00,0x00,0xEB,0x3C,0x40,0x85,0xE2,0x02,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x04,0x00,0xA0,0xE1,0x3C,0x00,0x00,0xEB,0x00,0x00,0x50,0xE3,0xF9,0xFF,0xFF,0x1A,
+    0x01,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x04,0x00,0xA0,0xE1,0x36,0x00,0x00,0xEB,
+    0x01,0x00,0x50,0xE3,0xF9,0xFF,0xFF,0x1A,0x00,0x00,0xA0,0xE3,0x4C,0x10,0x9F,0xE5,
+    0x04,0x00,0x81,0xE5,0x00,0x20,0xA0,0xE1,0x44,0x40,0x9F,0xE5,0x00,0x10,0xA0,0xE1,
+    0x03,0x30,0xA0,0xE3,0x04,0x00,0xA0,0xE1,0x1C,0x00,0x00,0xEB,0xFF,0x3C,0xA0,0xE3,
+    0x08,0x20,0xA0,0xE3,0x02,0x10,0xA0,0xE3,0x04,0x00,0xA0,0xE1,0x17,0x00,0x00,0xEB,
+    0x05,0x00,0xA0,0xE1,0x01,0x3C,0xA0,0xE3,0x70,0x40,0xBD,0xE8,0x08,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x11,0x00,0x00,0xEA,0x08,0x18,0xFF,0xFC,0x0C,0xA0,0xEF,0x3F,
+    0x00,0xA0,0xEF,0x3F,0x08,0xA0,0xEF,0x3F,0x10,0x40,0x2D,0xE9,0x00,0x40,0xD0,0xE5,
+    0x11,0x12,0xA0,0xE1,0x03,0x20,0xC4,0xE1,0x02,0x10,0x81,0xE1,0x00,0x10,0xC0,0xE5,
+    0x10,0x80,0xBD,0xE8,0x10,0x40,0x2D,0xE9,0xB0,0x40,0xD0,0xE1,0x11,0x12,0xA0,0xE1,
+    0x03,0x20,0xC4,0xE1,0x02,0x10,0x81,0xE1,0xB0,0x10,0xC0,0xE1,0x10,0x80,0xBD,0xE8,
+    0x10,0x40,0x2D,0xE9,0x00,0x40,0x90,0xE5,0x11,0x12,0xA0,0xE1,0x03,0x20,0xC4,0xE1,
+    0x02,0x10,0x81,0xE1,0x00,0x10,0x80,0xE5,0x10,0x80,0xBD,0xE8,0x00,0x00,0xD0,0xE5,
+    0x02,0x00,0x00,0xE0,0x30,0x01,0xA0,0xE1,0x1E,0xFF,0x2F,0xE1,0xB0,0x00,0xD0,0xE1,
+    0x02,0x00,0x00,0xE0,0x30,0x01,0xA0,0xE1,0x1E,0xFF,0x2F,0xE1,0x00,0x00,0x90,0xE5,
+    0x02,0x00,0x00,0xE0,0x30,0x01,0xA0,0xE1,0x1E,0xFF,0x2F,0xE1,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0x10,0xFF,0x2F,0xE1,0x10,0x40,0x2D,0xE9,0x00,0x00,0xA0,0xE3,0x7D,0x03,0x00,0xEB,
+    0x2C,0x10,0x9F,0xE5,0x00,0x00,0xA0,0xE3,0x7B,0x03,0x00,0xEB,0x20,0x20,0x9F,0xE5,
+    0x00,0x10,0xA0,0xE3,0x01,0x00,0xA0,0xE1,0x51,0x03,0x00,0xEB,0x00,0x00,0x50,0xE3,
+    0x00,0x00,0x00,0x0A,0xFE,0xFF,0xFF,0xEA,0x10,0x40,0xBD,0xE8,0x04,0x00,0x9F,0xE5,
+    0xEE,0xFF,0xFF,0xEA,0x94,0x2A,0x02,0x20,0x00,0x40,0x00,0x18,0xF0,0x41,0x2D,0xE9,
+    0x00,0x40,0xA0,0xE1,0x03,0x70,0xA0,0xE1,0x02,0x50,0xA0,0xE1,0x18,0x60,0x9D,0xE5,
+    0x01,0x80,0xA0,0xE1,0x01,0x00,0xA0,0xE1,0xD9,0x01,0x00,0xEB,0x00,0x00,0x50,0xE3,
+    0xF0,0x81,0xBD,0x18,0x00,0x00,0xA0,0xE3,0x01,0x20,0xA0,0xE3,0x0F,0x00,0x56,0xE3,
+    0x54,0x16,0x9F,0xE5,0x18,0x30,0x81,0xE2,0x00,0x00,0x81,0xE5,0x08,0x00,0x81,0xE5,
+    0x14,0x20,0x81,0xE5,0xD8,0x20,0xA0,0x13,0x41,0x00,0x83,0xE8,0xDC,0x20,0xA0,0x03,
+    0x20,0x00,0x81,0xE5,0x01,0x00,0x55,0xE3,0x24,0x00,0x81,0xE5,0x28,0x00,0x81,0xE5,
+    0x2C,0x00,0x81,0xE5,0x30,0x00,0x81,0xE5,0x46,0x20,0xC1,0xE5,0xA4,0x20,0xA0,0x01,
+    0x48,0x20,0x81,0x05,0x48,0x40,0x81,0x15,0x34,0x00,0x81,0xE5,0x38,0x00,0x81,0xE5,
+    0x3C,0x00,0x81,0xE5,0x40,0x00,0x81,0xE5,0x08,0x00,0xA0,0xE1,0xF8,0x15,0x9F,0xE5,
+    0x91,0x08,0x00,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x81,0xBD,0x18,0x07,0x20,0xA0,0xE1,
+    0x05,0x10,0xA0,0xE1,0x08,0x00,0xA0,0xE1,0xF0,0x41,0xBD,0xE8,0x9E,0x01,0x00,0xEA,
+    0xFF,0x5F,0x2D,0xE9,0x00,0xB0,0xA0,0xE1,0x02,0x70,0xA0,0xE1,0x01,0x60,0xA0,0xE1,
+    0x0C,0x00,0x9D,0xE5,0x40,0x80,0x9D,0xE5,0x3C,0x90,0x9D,0xE5,0x38,0xA0,0x9D,0xE5,
+    0xAB,0x01,0x00,0xEB,0x00,0x00,0x50,0xE3,0x7A,0x00,0x00,0x1A,0x00,0x50,0xA0,0xE3,
+    0xA4,0x45,0x9F,0xE5,0x01,0x00,0xA0,0xE3,0x00,0x00,0x59,0xE3,0x14,0x10,0x84,0xE2,
+    0x00,0x50,0x84,0xE5,0x08,0x50,0x84,0xE5,0x21,0x01,0x81,0xE8,0x28,0x10,0x84,0xE2,
+    0x20,0x50,0x84,0xE5,0x24,0x50,0x84,0xE5,0x21,0x00,0x81,0xE8,0x30,0x50,0x84,0xE5,
+    0x34,0x50,0x84,0xE5,0x38,0x50,0x84,0xE5,0x3C,0x50,0x84,0xE5,0x40,0x50,0x84,0xE5,
+    0x22,0x00,0x00,0x0A,0x0F,0x00,0x58,0xE3,0x34,0x00,0xA0,0x03,0x32,0x00,0xA0,0x13,
+    0x01,0x00,0x5A,0xE3,0x50,0x15,0x9F,0xE5,0x46,0x00,0xC4,0xE5,0xAB,0x00,0xA0,0x01,
+    0x48,0x00,0x84,0x05,0x48,0xB0,0x84,0x15,0x0C,0x00,0x9D,0xE5,0x62,0x08,0x00,0xEB,
+    0x00,0x00,0x50,0xE3,0x5B,0x00,0x00,0x1A,0x14,0x50,0x84,0xE5,0x10,0x90,0x84,0xE5,
+    0x01,0x30,0xA0,0xE3,0x18,0x50,0x84,0xE5,0x01,0x00,0x5A,0xE3,0x1C,0x50,0x84,0xE5,
+    0x0F,0x00,0xA0,0xE3,0x20,0x50,0x84,0xE5,0x08,0x10,0xA0,0xE3,0x30,0x30,0x84,0xE5,
+    0x0C,0x20,0xA0,0xE3,0x2C,0x50,0x84,0xE5,0x0C,0x00,0x00,0x0A,0x03,0x00,0x17,0xE3,
+    0x20,0x00,0x00,0x0A,0x01,0x00,0x17,0xE3,0x23,0x00,0x00,0x0A,0x00,0x00,0x57,0xE3,
+    0x01,0x80,0xA0,0xE3,0x24,0x10,0x84,0xE5,0x42,0x00,0x00,0xDA,0x2C,0x00,0x00,0xEA,
+    0x0F,0x00,0x58,0xE3,0x02,0x00,0xA0,0x13,0x12,0x00,0xA0,0x03,0xDB,0xFF,0xFF,0xEA,
+    0x07,0x00,0x17,0xE3,0x09,0x00,0x00,0x0A,0x03,0x00,0x17,0xE3,0x0C,0x00,0x00,0x0A,
+    0x01,0x00,0x17,0xE3,0x00,0x00,0xE0,0x13,0x3A,0x00,0x00,0x1A,0x00,0x00,0x57,0xE3,
+    0x02,0x80,0xA0,0xE3,0x24,0x10,0x84,0xE5,0x1F,0x00,0x00,0xCA,0x31,0x00,0x00,0xEA,
+    0x00,0x00,0x57,0xE3,0x08,0x80,0xA0,0xE3,0x24,0x00,0x84,0xE5,0x1E,0x00,0x00,0xCA,
+    0x2C,0x00,0x00,0xEA,0x00,0x00,0x57,0xE3,0x04,0x80,0xA0,0xE3,0x24,0x20,0x84,0xE5,
+    0x17,0x00,0x00,0xCA,0x27,0x00,0x00,0xEA,0x00,0x00,0x57,0xE3,0x04,0x80,0xA0,0xE3,
+    0x24,0x00,0x84,0xE5,0x12,0x00,0x00,0xCA,0x22,0x00,0x00,0xEA,0x00,0x00,0x57,0xE3,
+    0x02,0x80,0xA0,0xE3,0x24,0x20,0x84,0xE5,0x0B,0x00,0x00,0xCA,0x1D,0x00,0x00,0xEA,
+    0x01,0x00,0x58,0xE3,0x06,0x00,0x00,0x0A,0x02,0x00,0x58,0xE3,0x06,0x00,0x00,0x0A,
+    0x04,0x00,0x58,0xE3,0x06,0x00,0x00,0x0A,0x08,0x00,0x58,0xE3,0x0A,0x00,0x00,0x1A,
+    0x05,0x00,0x00,0xEA,0x00,0x00,0xD6,0xE5,0x06,0x00,0x00,0xEA,0xB0,0x00,0xD6,0xE1,
+    0x04,0x00,0x00,0xEA,0x00,0x00,0x96,0xE5,0x02,0x00,0x00,0xEA,0x00,0x10,0x96,0xE5,
+    0x5C,0x10,0x84,0xE5,0x04,0x00,0x96,0xE5,0x58,0x00,0x84,0xE5,0x08,0x70,0x47,0xE0,
+    0x00,0x00,0x57,0xE3,0xF0,0x13,0x9F,0xE5,0x28,0x50,0x84,0xD5,0x08,0x60,0x86,0xE0,
+    0x0C,0x00,0x9D,0xE5,0x0C,0x08,0x00,0xEB,0x00,0x00,0x50,0xE3,0x05,0x00,0x00,0x1A,
+    0x00,0x00,0x57,0xE3,0xE1,0xFF,0xFF,0xCA,0x0C,0x00,0x9D,0xE5,0x09,0x20,0xA0,0xE1,
+    0x0A,0x10,0xA0,0xE1,0x18,0x01,0x00,0xEB,0x10,0xD0,0x8D,0xE2,0xF0,0x9F,0xBD,0xE8,
+    0xF0,0x47,0x2D,0xE9,0x01,0x50,0xA0,0xE1,0xAC,0x43,0x9F,0xE5,0x00,0x70,0xA0,0xE3,
+    0x24,0x10,0x9D,0xE5,0x01,0x80,0xA0,0xE3,0x20,0x90,0x9D,0xE5,0x02,0x60,0xA0,0xE1,
+    0x1C,0x20,0x84,0xE2,0x03,0xA0,0xA0,0xE1,0x00,0x70,0x84,0xE5,0x0F,0x00,0x51,0xE3,
+    0x08,0x70,0x84,0xE5,0x14,0x80,0x84,0xE5,0x18,0x70,0x84,0xE5,0x82,0x00,0x82,0xE8,
+    0x24,0x20,0x84,0xE2,0x6C,0x10,0xA0,0x03,0x6B,0x10,0xA0,0x13,0x80,0x01,0x82,0xE8,
+    0x01,0x00,0x59,0xE3,0x2C,0x70,0x84,0xE5,0xA0,0x00,0xA0,0x01,0x30,0x70,0x84,0xE5,
+    0x46,0x10,0xC4,0xE5,0x07,0x10,0xA0,0xE3,0x34,0x80,0x84,0xE5,0x44,0x70,0xC4,0xE5,
+    0x45,0x10,0xC4,0xE5,0x38,0x70,0x84,0xE5,0x3C,0x70,0x84,0xE5,0x38,0x13,0x9F,0xE5,
+    0x40,0x70,0x84,0xE5,0x48,0x00,0x84,0xE5,0x03,0x00,0xA0,0xE1,0xDE,0x07,0x00,0xEB,
+    0x00,0x00,0x50,0xE3,0xF0,0x87,0xBD,0x18,0x02,0x30,0xA0,0xE3,0x10,0xC0,0x84,0xE2,
+    0x01,0x00,0x59,0xE3,0x0F,0x00,0xA0,0xE3,0x08,0x10,0xA0,0xE3,0x88,0x00,0x8C,0xE8,
+    0x0C,0x20,0xA0,0xE3,0x18,0x70,0x84,0xE5,0x1C,0x70,0x84,0xE5,0x20,0x70,0x84,0xE5,
+    0x2C,0x80,0x84,0xE5,0x30,0x70,0x84,0xE5,0x34,0x70,0x84,0xE5,0x04,0x00,0x00,0x0A,
+    0x04,0x00,0x56,0xE3,0x1F,0x00,0x00,0x0A,0x02,0x00,0x56,0xE3,0x1F,0x00,0x00,0x0A,
+    0x06,0x00,0x00,0xEA,0x08,0x00,0x56,0xE3,0x1A,0x00,0x00,0x0A,0x04,0x00,0x56,0xE3,
+    0x1A,0x00,0x00,0x0A,0x02,0x00,0x56,0xE3,0x00,0x00,0xE0,0x13,0xF0,0x87,0xBD,0x18,
+    0x24,0x10,0x84,0xE5,0x0A,0x00,0xA0,0xE1,0x28,0x70,0x84,0xE5,0xA8,0x12,0x9F,0xE5,
+    0xBD,0x07,0x00,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x87,0xBD,0x18,0x01,0x00,0x56,0xE3,
+    0x50,0x00,0xD4,0x05,0x00,0x00,0xC5,0x05,0x12,0x00,0x00,0x0A,0x02,0x00,0x56,0xE3,
+    0xB0,0x05,0xD4,0x01,0xB0,0x00,0xC5,0x01,0x0E,0x00,0x00,0x0A,0x04,0x00,0x56,0xE3,
+    0x50,0x00,0x94,0x05,0x00,0x00,0x85,0x05,0x0A,0x00,0x00,0x0A,0x08,0x00,0x56,0xE3,
+    0x04,0x00,0x00,0x0A,0x07,0x00,0x00,0xEA,0x24,0x00,0x84,0xE5,0xE8,0xFF,0xFF,0xEA,
+    0x24,0x20,0x84,0xE5,0xE6,0xFF,0xFF,0xEA,0x54,0x00,0x94,0xE5,0x00,0x00,0x85,0xE5,
+    0x50,0x00,0x94,0xE5,0x04,0x00,0x85,0xE5,0x00,0x00,0xA0,0xE3,0xF0,0x87,0xBD,0xE8,
+    0xF0,0x5F,0x2D,0xE9,0x01,0x60,0xA0,0xE1,0x2C,0x42,0x9F,0xE5,0x00,0x50,0xA0,0xE3,
+    0x2C,0x10,0x9D,0xE5,0x01,0x80,0xA0,0xE3,0x28,0xA0,0x9D,0xE5,0x02,0x70,0xA0,0xE1,
+    0x1C,0x20,0x84,0xE2,0x0C,0x90,0xA0,0xE3,0x00,0x50,0x84,0xE5,0x0F,0x00,0x51,0xE3,
+    0x08,0x50,0x84,0xE5,0x03,0xB0,0xA0,0xE1,0x14,0x80,0x84,0xE5,0x18,0x50,0x84,0xE5,
+    0x22,0x00,0x82,0xE8,0x24,0x20,0x84,0xE2,0x0B,0x10,0xA0,0x13,0x20,0x01,0x82,0xE8,
+    0x2C,0x50,0x84,0xE5,0x30,0x50,0x84,0xE5,0x46,0x90,0xC4,0x05,0x46,0x10,0xC4,0x15,
+    0x07,0x10,0xA0,0xE3,0x34,0x80,0x84,0xE5,0x01,0x00,0x5A,0xE3,0x44,0x50,0xC4,0xE5,
+    0xA0,0x00,0xA0,0x01,0x45,0x10,0xC4,0xE5,0x38,0x50,0x84,0xE5,0x3C,0x50,0x84,0xE5,
+    0xB4,0x11,0x9F,0xE5,0x40,0x50,0x84,0xE5,0x48,0x00,0x84,0xE5,0x03,0x00,0xA0,0xE1,
+    0x7D,0x07,0x00,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x9F,0xBD,0x18,0x0F,0x00,0xA0,0xE3,
+    0x01,0x00,0x5A,0xE3,0x08,0x10,0xA0,0xE3,0x10,0x50,0x84,0xE5,0x14,0x50,0x84,0xE5,
+    0x18,0x50,0x84,0xE5,0x1C,0x50,0x84,0xE5,0x20,0x50,0x84,0xE5,0x2C,0x80,0x84,0xE5,
+    0x30,0x50,0x84,0xE5,0x34,0x50,0x84,0xE5,0x04,0x00,0x00,0x0A,0x04,0x00,0x57,0xE3,
+    0x1F,0x00,0x00,0x0A,0x02,0x00,0x57,0xE3,0x1F,0x00,0x00,0x0A,0x06,0x00,0x00,0xEA,
+    0x08,0x00,0x57,0xE3,0x1A,0x00,0x00,0x0A,0x04,0x00,0x57,0xE3,0x1A,0x00,0x00,0x0A,
+    0x02,0x00,0x57,0xE3,0x00,0x00,0xE0,0x13,0xF0,0x9F,0xBD,0x18,0x24,0x10,0x84,0xE5,
+    0x0B,0x00,0xA0,0xE1,0x28,0x50,0x84,0xE5,0x2C,0x11,0x9F,0xE5,0x5E,0x07,0x00,0xEB,
+    0x00,0x00,0x50,0xE3,0xF0,0x9F,0xBD,0x18,0x01,0x00,0x57,0xE3,0x50,0x00,0xD4,0x05,
+    0x00,0x00,0xC6,0x05,0x12,0x00,0x00,0x0A,0x02,0x00,0x57,0xE3,0xB0,0x05,0xD4,0x01,
+    0xB0,0x00,0xC6,0x01,0x0E,0x00,0x00,0x0A,0x04,0x00,0x57,0xE3,0x50,0x00,0x94,0x05,
+    0x00,0x00,0x86,0x05,0x0A,0x00,0x00,0x0A,0x08,0x00,0x57,0xE3,0x04,0x00,0x00,0x0A,
+    0x07,0x00,0x00,0xEA,0x24,0x00,0x84,0xE5,0xE8,0xFF,0xFF,0xEA,0x24,0x90,0x84,0xE5,
+    0xE6,0xFF,0xFF,0xEA,0x54,0x00,0x94,0xE5,0x00,0x00,0x86,0xE5,0x50,0x00,0x94,0xE5,
+    0x04,0x00,0x86,0xE5,0x00,0x00,0xA0,0xE3,0xF0,0x9F,0xBD,0xE8,0xFC,0x5F,0x2D,0xE9,
+    0x00,0x80,0xA0,0xE1,0x30,0x00,0x8D,0xE2,0x03,0xB0,0xA0,0xE1,0x38,0x90,0x9D,0xE5,
+    0x02,0x50,0xA0,0xE1,0x40,0x04,0x90,0xE8,0x01,0x70,0xA0,0xE1,0x01,0x00,0x56,0xE3,
+    0x00,0x00,0xA0,0xE3,0x05,0x00,0x00,0x0A,0x03,0x00,0x15,0xE3,0x0D,0x00,0x00,0x0A,
+    0x01,0x00,0x15,0xE3,0x01,0x40,0xA0,0x13,0x08,0x00,0x00,0x0A,0x0A,0x00,0x00,0xEA,
+    0x07,0x00,0x15,0xE3,0x08,0x40,0xA0,0x03,0x07,0x00,0x00,0x0A,0x03,0x00,0x15,0xE3,
+    0x04,0x00,0x00,0x0A,0x01,0x00,0x15,0xE3,0x00,0x00,0xE0,0x13,0x11,0x00,0x00,0x1A,
+    0x02,0x40,0xA0,0xE3,0x00,0x00,0x00,0xEA,0x04,0x40,0xA0,0xE3,0x00,0x00,0x55,0xE3,
+    0x0C,0x00,0x00,0xDA,0x00,0x00,0x5A,0xE3,0x40,0x02,0x8D,0xE8,0x0B,0x30,0xA0,0xE1,
+    0x04,0x20,0xA0,0xE1,0x07,0x10,0xA0,0xE1,0x08,0x00,0xA0,0xE1,0x06,0x00,0x00,0x0A,
+    0x1A,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x04,0x80,0x88,0x00,0x04,0x70,0x87,0x00,
+    0x04,0x50,0x45,0x00,0xF0,0xFF,0xFF,0x0A,0xFC,0x9F,0xBD,0xE8,0x73,0xFF,0xFF,0xEB,
+    0xF7,0xFF,0xFF,0xEA,0x14,0x07,0x00,0xEA,0xB1,0x00,0x00,0xEA,0xA4,0x2A,0x02,0x20,
+    0xF0,0x41,0x2D,0xE9,0x00,0x50,0xA0,0xE3,0x64,0x45,0x9F,0xE5,0x03,0x60,0xB0,0xE1,
+    0x00,0x80,0xA0,0xE1,0x01,0x00,0xA0,0xE3,0x01,0x70,0xA0,0xE1,0x08,0x10,0xA0,0xE3,
+    0x14,0x30,0x84,0xE2,0x00,0x50,0x84,0xE5,0x10,0x50,0x84,0xE5,0x21,0x00,0x83,0xE8,
+    0x1C,0x50,0x84,0xE5,0x24,0x10,0x84,0xE5,0x05,0x10,0xA0,0xE3,0x20,0x50,0x84,0xE5,
+    0x2C,0x00,0x84,0xE5,0x28,0x50,0x84,0xE5,0x30,0x00,0x84,0xE5,0x02,0x00,0xA0,0xE1,
+    0x46,0x10,0xC4,0xE5,0x00,0x10,0x84,0xE2,0x58,0x50,0x84,0xE5,0x5C,0x50,0x84,0xE5,
+    0x34,0x50,0x84,0xE5,0x38,0x50,0x84,0xE5,0x3C,0x50,0x84,0xE5,0x40,0x50,0x84,0xE5,
+    0xDF,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x81,0xBD,0x18,0x00,0x00,0x56,0xE3,
+    0x50,0x10,0xD4,0xE5,0x00,0x10,0xC8,0xE5,0xB0,0x15,0xD4,0x11,0x21,0x14,0xA0,0x11,
+    0x00,0x10,0xC7,0x15,0x00,0x50,0xC7,0x05,0xF0,0x81,0xBD,0xE8,0xFE,0x40,0x2D,0xE9,
+    0x02,0x50,0xA0,0xE1,0x01,0x40,0xA0,0xE1,0x00,0x60,0xA0,0xE1,0x04,0x30,0xA0,0xE1,
+    0x06,0x20,0xA0,0xE1,0x08,0x10,0x8D,0xE2,0x04,0x00,0x8D,0xE2,0x00,0x50,0x8D,0xE5,
+    0xCE,0xFF,0xFF,0xEB,0x01,0x00,0x54,0xE3,0x04,0x10,0xDD,0x05,0x08,0x20,0xDD,0x05,
+    0x02,0x10,0x81,0x01,0x03,0x00,0x00,0x0A,0x00,0x00,0x54,0xE3,0x04,0x10,0xDD,0x05,
+    0x00,0x00,0xE0,0x13,0x01,0x00,0x00,0x1A,0x01,0x00,0x11,0xE3,0xEE,0xFF,0xFF,0x1A,
+    0xFE,0x80,0xBD,0xE8,0x78,0x14,0x9F,0xE5,0x00,0x20,0xA0,0xE3,0x01,0x30,0xA0,0xE3,
+    0x00,0x20,0x81,0xE5,0x14,0x30,0x81,0xE5,0x06,0x30,0xA0,0xE3,0x18,0x20,0x81,0xE5,
+    0x1C,0x20,0x81,0xE5,0x20,0x20,0x81,0xE5,0x24,0x20,0x81,0xE5,0x28,0x20,0x81,0xE5,
+    0x2C,0x20,0x81,0xE5,0x30,0x20,0x81,0xE5,0x46,0x30,0xC1,0xE5,0x34,0x20,0x81,0xE5,
+    0x38,0x20,0x81,0xE5,0x3C,0x20,0x81,0xE5,0x40,0x20,0x81,0xE5,0xAC,0xFF,0xFF,0xEA,
+    0xF0,0x41,0x2D,0xE9,0x80,0x00,0x10,0xE3,0x03,0x60,0xA0,0xE1,0x02,0x70,0xA0,0xE1,
+    0x18,0x80,0x9D,0xE5,0x01,0x50,0xA0,0xE1,0x00,0x40,0xA0,0xE1,0x07,0x00,0x00,0x0A,
+    0x80,0x40,0xC4,0xE3,0x06,0x20,0xA0,0xE1,0x08,0x30,0xA0,0xE1,0x07,0x10,0xA0,0xE1,
+    0x04,0x00,0xA0,0xE1,0x7F,0x00,0x00,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x81,0xBD,0x18,
+    0x07,0x00,0xA0,0xE1,0xDA,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x81,0xBD,0x18,
+    0x00,0x10,0xA0,0xE3,0x01,0x20,0xA0,0xE3,0x0C,0x30,0xA0,0xE3,0xD0,0x03,0x9F,0xE5,
+    0x1C,0xC0,0x80,0xE2,0x00,0x10,0x80,0xE5,0x0C,0x10,0x80,0xE5,0x14,0x20,0x80,0xE5,
+    0x18,0x10,0x80,0xE5,0x0A,0x00,0x8C,0xE8,0x24,0x10,0x80,0xE5,0x28,0x10,0x80,0xE5,
+    0x2C,0x10,0x80,0xE5,0x30,0x10,0x80,0xE5,0x46,0x20,0xC0,0xE5,0x4C,0x40,0xC0,0xE5,
+    0x4D,0x50,0xC0,0xE5,0x4E,0x10,0xC0,0xE5,0x4F,0x10,0xC0,0xE5,0x34,0x10,0x80,0xE5,
+    0x38,0x10,0x80,0xE5,0x3C,0x10,0x80,0xE5,0x40,0x10,0x80,0xE5,0x00,0x10,0x80,0xE2,
+    0x07,0x00,0xA0,0xE1,0x7E,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x81,0xBD,0x18,
+    0x08,0x20,0xA0,0xE1,0x06,0x10,0xA0,0xE1,0x07,0x00,0xA0,0xE1,0xF0,0x41,0xBD,0xE8,
+    0xA1,0xFF,0xFF,0xEA,0xF0,0x41,0x2D,0xE9,0x00,0x50,0xA0,0xE3,0x50,0x43,0x9F,0xE5,
+    0x03,0x60,0xB0,0xE1,0x00,0x80,0xA0,0xE1,0x01,0x00,0xA0,0xE3,0x01,0x70,0xA0,0xE1,
+    0x08,0x10,0xA0,0xE3,0x14,0x30,0x84,0xE2,0x00,0x50,0x84,0xE5,0x10,0x50,0x84,0xE5,
+    0x21,0x00,0x83,0xE8,0x1C,0x50,0x84,0xE5,0x24,0x10,0x84,0xE5,0x35,0x10,0xA0,0xE3,
+    0x20,0x50,0x84,0xE5,0x2C,0x00,0x84,0xE5,0x28,0x50,0x84,0xE5,0x30,0x00,0x84,0xE5,
+    0x02,0x00,0xA0,0xE1,0x46,0x10,0xC4,0xE5,0x00,0x10,0x84,0xE2,0x58,0x50,0x84,0xE5,
+    0x5C,0x50,0x84,0xE5,0x34,0x50,0x84,0xE5,0x38,0x50,0x84,0xE5,0x3C,0x50,0x84,0xE5,
+    0x40,0x50,0x84,0xE5,0x5A,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x81,0xBD,0x18,
+    0x00,0x00,0x56,0xE3,0x50,0x10,0xD4,0xE5,0x00,0x10,0xC8,0xE5,0xB0,0x15,0xD4,0x11,
+    0x21,0x14,0xA0,0x11,0x00,0x10,0xC7,0x15,0x00,0x50,0xC7,0x05,0xF0,0x81,0xBD,0xE8,
+    0x38,0x40,0x2D,0xE9,0x10,0x40,0x9D,0xE5,0x00,0x40,0x8D,0xE5,0x57,0x00,0x00,0xEB,
+    0x38,0x80,0xBD,0xE8,0xF0,0x40,0x2D,0xE9,0x03,0x40,0xA0,0xE1,0x14,0xD0,0x4D,0xE2,
+    0x00,0x50,0xA0,0xE1,0x02,0x60,0xA0,0xE1,0x01,0x70,0xA0,0xE1,0x00,0x30,0x8D,0xE5,
+    0x02,0x30,0xA0,0xE1,0x01,0x20,0xA0,0xE1,0x0C,0x10,0x8D,0xE2,0x04,0x00,0x8D,0xE2,
+    0x42,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x1C,0x00,0x00,0x1A,0x06,0x30,0xA0,0xE1,
+    0x07,0x20,0xA0,0xE1,0x10,0x10,0x8D,0xE2,0x08,0x00,0x8D,0xE2,0x00,0x40,0x8D,0xE5,
+    0xBF,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x14,0x00,0x00,0x1A,0x06,0x30,0xA0,0xE1,
+    0x08,0x00,0xDD,0xE5,0x07,0x20,0xA0,0xE1,0x00,0x40,0x8D,0xE5,0x01,0x10,0xC0,0xE3,
+    0x04,0x00,0xDD,0xE5,0x81,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x0B,0x00,0x00,0x1A,
+    0x01,0x00,0x55,0xE3,0x04,0x00,0xDD,0xE5,0x06,0x30,0xA0,0xE1,0x07,0x20,0xA0,0xE1,
+    0x00,0x40,0x8D,0xE5,0x1C,0x00,0x80,0x13,0x1C,0x00,0xC0,0x03,0x04,0x00,0xCD,0xE5,
+    0x08,0x00,0xDD,0xE5,0x01,0x10,0x80,0xE3,0x04,0x00,0xDD,0xE5,0x73,0xFF,0xFF,0xEB,
+    0x14,0xD0,0x8D,0xE2,0xF0,0x80,0xBD,0xE8,0xF0,0x41,0x2D,0xE9,0x00,0x40,0xA0,0xE1,
+    0x03,0x50,0xA0,0xE1,0x02,0x60,0xA0,0xE1,0x01,0x70,0xA0,0xE1,0x01,0x00,0xA0,0xE1,
+    0x57,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x81,0xBD,0x18,0x00,0x10,0xA0,0xE3,
+    0x01,0x20,0xA0,0xE3,0x08,0x30,0xA0,0xE3,0xC4,0x01,0x9F,0xE5,0x1C,0x80,0x80,0xE2,
+    0x00,0x10,0x80,0xE5,0x0C,0x10,0x80,0xE5,0x14,0x20,0x80,0xE5,0x18,0x10,0x80,0xE5,
+    0x0A,0x00,0x88,0xE8,0x24,0x10,0x80,0xE5,0x28,0x10,0x80,0xE5,0x2C,0x10,0x80,0xE5,
+    0x30,0x10,0x80,0xE5,0x46,0x20,0xC0,0xE5,0x4C,0x40,0xC0,0xE5,0x4D,0x10,0xC0,0xE5,
+    0x4E,0x10,0xC0,0xE5,0x4F,0x10,0xC0,0xE5,0x34,0x10,0x80,0xE5,0x38,0x10,0x80,0xE5,
+    0x3C,0x10,0x80,0xE5,0x40,0x10,0x80,0xE5,0x00,0x10,0x80,0xE2,0x07,0x00,0xA0,0xE1,
+    0xFB,0xFE,0xFF,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x81,0xBD,0x18,0x05,0x20,0xA0,0xE1,
+    0x06,0x10,0xA0,0xE1,0x07,0x00,0xA0,0xE1,0xF0,0x41,0xBD,0xE8,0x1E,0xFF,0xFF,0xEA,
+    0xF0,0x40,0x2D,0xE9,0x03,0x40,0xA0,0xE1,0x1C,0xD0,0x4D,0xE2,0x02,0x50,0xA0,0xE1,
+    0x01,0x60,0xA0,0xE1,0x00,0x70,0xA0,0xE1,0x00,0x20,0xA0,0xE1,0x00,0x30,0x8D,0xE5,
+    0x01,0x30,0xA0,0xE1,0x0C,0x10,0x8D,0xE2,0x08,0x00,0x8D,0xE2,0xEB,0xFE,0xFF,0xEB,
+    0x00,0x00,0x50,0xE3,0x1F,0x00,0x00,0x1A,0x06,0x30,0xA0,0xE1,0x07,0x20,0xA0,0xE1,
+    0x10,0x10,0x8D,0xE2,0x04,0x00,0x8D,0xE2,0x00,0x40,0x8D,0xE5,0x68,0xFF,0xFF,0xEB,
+    0x00,0x00,0x50,0xE3,0x17,0x00,0x00,0x1A,0x06,0x30,0xA0,0xE1,0x07,0x20,0xA0,0xE1,
+    0x18,0x10,0x8D,0xE2,0x14,0x00,0x8D,0xE2,0x00,0x40,0x8D,0xE5,0x13,0x00,0x00,0xEB,
+    0x00,0x00,0x50,0xE3,0x0F,0x00,0x00,0x1A,0x02,0x00,0x55,0xE3,0x04,0x00,0xDD,0x05,
+    0x02,0x00,0xC0,0x03,0x04,0x00,0x00,0x0A,0x03,0x00,0x55,0xE3,0x04,0x00,0xDD,0x05,
+    0x02,0x00,0x80,0x03,0x00,0x00,0xE0,0x13,0x06,0x00,0x00,0x1A,0x3F,0x10,0x00,0xE2,
+    0x08,0x00,0xDD,0xE5,0x06,0x30,0xA0,0xE1,0x04,0x10,0xCD,0xE5,0x07,0x20,0xA0,0xE1,
+    0x00,0x40,0x8D,0xE5,0x19,0xFF,0xFF,0xEB,0x1C,0xD0,0x8D,0xE2,0xF0,0x80,0xBD,0xE8,
+    0xF0,0x41,0x2D,0xE9,0x00,0x50,0xA0,0xE3,0x84,0x40,0x9F,0xE5,0x03,0x80,0xA0,0xE1,
+    0x00,0x70,0xA0,0xE1,0x01,0x00,0xA0,0xE3,0x01,0x60,0xA0,0xE1,0x08,0x10,0xA0,0xE3,
+    0x14,0x30,0x84,0xE2,0x00,0x50,0x84,0xE5,0x10,0x50,0x84,0xE5,0x21,0x00,0x83,0xE8,
+    0x24,0x30,0x84,0xE2,0x1C,0x50,0x84,0xE5,0x20,0x50,0x84,0xE5,0x22,0x00,0x83,0xE8,
+    0x16,0x10,0xA0,0xE3,0x2C,0x00,0x84,0xE5,0x30,0x00,0x84,0xE5,0x02,0x00,0xA0,0xE1,
+    0x46,0x10,0xC4,0xE5,0x00,0x10,0x84,0xE2,0x58,0x50,0x84,0xE5,0x5C,0x50,0x84,0xE5,
+    0x34,0x50,0x84,0xE5,0x38,0x50,0x84,0xE5,0x3C,0x50,0x84,0xE5,0x40,0x50,0x84,0xE5,
+    0xA7,0xFE,0xFF,0xEB,0x50,0x10,0xD4,0xE5,0x00,0x00,0x58,0xE3,0x00,0x10,0xC7,0xE5,
+    0xB0,0x15,0xD4,0x11,0x00,0x50,0xC6,0x05,0x21,0x14,0xA0,0x11,0x00,0x10,0xC6,0x15,
+    0xF0,0x81,0xBD,0xE8,0xA4,0x2A,0x02,0x20,0x89,0x05,0x00,0xEA,0x9D,0x05,0x00,0xEA,
+    0x73,0x05,0x00,0xEA,0xF8,0x40,0x2D,0xE9,0x02,0x40,0xA0,0xE1,0x18,0x20,0x8D,0xE2,
+    0x03,0xC0,0xA0,0xE1,0x01,0x60,0xA0,0xE1,0x00,0x70,0xA0,0xE1,0x28,0x00,0x92,0xE8,
+    0x0C,0x20,0xA0,0xE1,0x00,0x40,0x8D,0xE5,0x2E,0x04,0x00,0xEB,0x00,0x00,0x50,0xE3,
+    0x0B,0x00,0x00,0x1A,0x00,0x00,0x54,0xE3,0x02,0x20,0xA0,0x03,0x03,0x00,0x00,0x0A,
+    0x02,0x00,0x54,0xE3,0x03,0x20,0xA0,0x03,0x00,0x00,0xE0,0x13,0x04,0x00,0x00,0x1A,
+    0x04,0x30,0xA0,0xE1,0x06,0x10,0xA0,0xE1,0x07,0x00,0xA0,0xE1,0x00,0x50,0x8D,0xE5,
+    0x32,0xFF,0xFF,0xEB,0xF8,0x80,0xBD,0xE8,0x70,0x40,0x2D,0xE9,0x01,0x00,0x50,0xE3,
+    0x02,0x40,0xA0,0xE1,0x00,0x50,0xA0,0xE1,0x00,0x00,0xE0,0x83,0x70,0x80,0xBD,0x88,
+    0x00,0x00,0x51,0xE3,0x00,0x10,0xA0,0x03,0x01,0x10,0xA0,0x13,0x0B,0x20,0xD4,0xE5,
+    0xE9,0x03,0x00,0xEB,0x00,0x00,0x50,0xE3,0x70,0x80,0xBD,0x18,0x04,0x10,0xA0,0xE1,
+    0x05,0x00,0xA0,0xE1,0x70,0x40,0xBD,0xE8,0x9D,0x04,0x00,0xEA,0x01,0x20,0xD1,0xE5,
+    0x02,0x00,0x52,0xE3,0x0E,0x00,0xD1,0x95,0x02,0x00,0x50,0x93,0x12,0x00,0x00,0x8A,
+    0x06,0x00,0xD1,0xE5,0x0F,0x00,0x50,0xE3,0x07,0x00,0xD1,0x95,0x02,0x00,0x50,0x93,
+    0x0D,0x00,0x00,0x8A,0x08,0x00,0xD1,0xE5,0x07,0x00,0x50,0xE3,0x09,0x00,0xD1,0x95,
+    0x01,0x00,0x50,0x93,0x08,0x00,0x00,0x8A,0x0A,0x00,0xD1,0xE5,0x02,0x00,0x50,0xE3,
+    0x0B,0x00,0xD1,0x95,0x02,0x00,0x50,0x93,0x03,0x00,0x00,0x8A,0x0D,0x00,0xD1,0xE5,
+    0x03,0x00,0x50,0xE3,0x00,0x00,0xA0,0x93,0x1E,0xFF,0x2F,0x91,0x00,0x00,0xE0,0xE3,
+    0x1E,0xFF,0x2F,0xE1,0xF8,0x40,0x2D,0xE9,0x01,0x50,0xA0,0xE1,0x02,0x40,0xA0,0xE1,
+    0x00,0x60,0xA0,0xE1,0x02,0x10,0xA0,0xE1,0xDF,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,
+    0x1B,0x00,0x00,0x1A,0x05,0x10,0xA0,0xE1,0x0B,0x00,0xD4,0xE5,0x00,0x00,0x8D,0xE5,
+    0x06,0x00,0xA0,0xE1,0x0D,0x30,0xD4,0xE5,0x0C,0x20,0xD4,0xE5,0xE5,0x03,0x00,0xEB,
+    0x00,0x00,0x50,0xE3,0x12,0x00,0x00,0x1A,0x0B,0x30,0xD4,0xE5,0x00,0x00,0x53,0xE3,
+    0x02,0x20,0xA0,0x03,0x03,0x00,0x00,0x0A,0x02,0x00,0x53,0xE3,0x03,0x20,0xA0,0x03,
+    0x00,0x00,0xE0,0x13,0x0A,0x00,0x00,0x1A,0x05,0x10,0xA0,0xE1,0x0F,0x00,0xD4,0xE5,
+    0x00,0x00,0x8D,0xE5,0x06,0x00,0xA0,0xE1,0xE8,0xFE,0xFF,0xEB,0x00,0x00,0x50,0xE3,
+    0x03,0x00,0x00,0x1A,0x04,0x20,0xA0,0xE1,0x05,0x10,0xA0,0xE1,0x06,0x00,0xA0,0xE1,
+    0xB0,0xFF,0xFF,0xEB,0xF8,0x80,0xBD,0xE8,0x52,0x04,0x00,0xEA,0x70,0x40,0x2D,0xE9,
+    0x01,0x40,0xA0,0xE1,0x00,0x50,0xA0,0xE1,0x7F,0x06,0x00,0xEB,0x04,0x10,0xA0,0xE1,
+    0x05,0x00,0xA0,0xE1,0x70,0x40,0xBD,0xE8,0xB7,0xFF,0xFF,0xEA,0xF7,0x4F,0x2D,0xE9,
+    0x01,0x00,0x50,0xE3,0x01,0x40,0xA0,0xE1,0x00,0x00,0xE0,0x83,0x92,0x03,0x00,0x8A,
+    0x00,0x00,0x50,0xE3,0xE5,0x00,0x00,0x0A,0x01,0x3A,0xA0,0xE3,0x3C,0x5E,0x9F,0xE5,
+    0x0C,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0x38,0xFC,0xFF,0xEB,
+    0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x43,0x62,0x85,0xE1,
+    0x06,0x00,0xA0,0xE1,0x32,0xFC,0xFF,0xEB,0x3D,0x7C,0x45,0xE2,0x01,0x3A,0xA0,0xE3,
+    0x0C,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x2C,0xFC,0xFF,0xEB,
+    0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x43,0x82,0x87,0xE0,
+    0x08,0x00,0xA0,0xE1,0x26,0xFC,0xFF,0xEB,0x0C,0x20,0xA0,0xE3,0x01,0x3A,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x02,0x93,0x26,0xE0,0x09,0x00,0xA0,0xE1,0x20,0xFC,0xFF,0xEB,
+    0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,
+    0x1B,0xFC,0xFF,0xEB,0x0C,0x20,0xA0,0xE3,0x01,0x3A,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x82,0xA3,0x27,0xE0,0x0A,0x00,0xA0,0xE1,0x15,0xFC,0xFF,0xEB,0x01,0x10,0xA0,0xE3,
+    0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x01,0xB4,0x8A,0xE0,0x0B,0x00,0xA0,0xE1,
+    0x0F,0xFC,0xFF,0xEB,0x0C,0x20,0xA0,0xE3,0x01,0x3A,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x82,0x03,0x88,0xE0,0x0A,0xFC,0xFF,0xEB,0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0x05,0xFC,0xFF,0xEB,0x01,0x3A,0xA0,0xE3,
+    0x0C,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0x00,0xFC,0xFF,0xEB,
+    0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,
+    0xFB,0xFB,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x06,0x00,0xA0,0xE1,0xF6,0xFB,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0xF1,0xFB,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,
+    0x0D,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0xEC,0xFB,0xFF,0xEB,
+    0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,
+    0xE7,0xFB,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x06,0x00,0xA0,0xE1,0xE2,0xFB,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x0A,0x00,0xA0,0xE1,0xDD,0xFB,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,
+    0x0D,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,0xD8,0xFB,0xFF,0xEB,
+    0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0xC3,0x01,0x8B,0xE0,
+    0xD3,0xFB,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x09,0x00,0xA0,0xE1,0xCE,0xFB,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0xC9,0xFB,0xFF,0xEB,0x01,0x39,0xA0,0xE3,
+    0x0E,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0xC4,0xFB,0xFF,0xEB,
+    0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,
+    0xBF,0xFB,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x07,0x00,0xA0,0xE1,0xBA,0xFB,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0xB5,0xFB,0xFF,0xEB,0x01,0x39,0xA0,0xE3,
+    0x0E,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0xB0,0xFB,0xFF,0xEB,
+    0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,
+    0xAB,0xFB,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x0A,0x00,0xA0,0xE1,0xA6,0xFB,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,0xA1,0xFB,0xFF,0xEB,0x0E,0x20,0xA0,0xE3,
+    0x01,0x39,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x82,0x03,0x87,0xE0,0x9C,0xFB,0xFF,0xEB,
+    0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,
+    0x97,0xFB,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x08,0x00,0xA0,0xE1,0x92,0xFB,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0x8D,0xFB,0xFF,0xEB,0x02,0x39,0xA0,0xE3,
+    0x0F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x88,0xFB,0xFF,0xEB,
+    0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,
+    0x83,0xFB,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x08,0x00,0xA0,0xE1,0x7E,0xFB,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0x79,0xFB,0xFF,0xEB,0x02,0x39,0xA0,0xE3,
+    0x0F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x74,0xFB,0xFF,0xEB,
+    0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x0A,0x00,0xA0,0xE1,
+    0x6F,0xFB,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x0B,0x00,0xA0,0xE1,0x6A,0xFB,0xFF,0xEB,0x0F,0x20,0xA0,0xE3,0x02,0x39,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x02,0x04,0x2A,0xE0,0x65,0xFB,0xFF,0xEB,0x02,0x39,0xA0,0xE3,
+    0x0F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0x60,0xFB,0xFF,0xEB,
+    0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,
+    0x5B,0xFB,0xFF,0xEB,0x02,0x00,0x54,0xE3,0x3B,0x02,0x00,0x0A,0xA9,0x02,0x00,0xEA,
+    0xAC,0x5A,0x9F,0xE5,0x04,0x30,0xA0,0xE3,0x02,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x05,0x00,0xA0,0xE1,0x52,0xFB,0xFF,0xEB,0x02,0x20,0xA0,0xE3,0x04,0x30,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x82,0x63,0x85,0xE1,0x06,0x00,0xA0,0xE1,0x4C,0xFB,0xFF,0xEB,
+    0x3D,0x7C,0x45,0xE2,0x04,0x30,0xA0,0xE3,0x02,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x07,0x00,0xA0,0xE1,0x46,0xFB,0xFF,0xEB,0x02,0x20,0xA0,0xE3,0x04,0x30,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x82,0x83,0x87,0xE0,0x08,0x00,0xA0,0xE1,0x40,0xFB,0xFF,0xEB,
+    0x02,0x20,0xA0,0xE3,0x04,0x30,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x82,0x93,0x86,0xE0,
+    0x09,0x00,0xA0,0xE1,0x3A,0xFB,0xFF,0xEB,0x04,0x30,0xA0,0xE3,0x02,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x35,0xFB,0xFF,0xEB,0x01,0x10,0xA0,0xE3,
+    0x04,0x30,0xA0,0xE3,0x02,0x20,0xA0,0xE3,0x01,0xA4,0x88,0xE1,0x0A,0x00,0xA0,0xE1,
+    0x2F,0xFB,0xFF,0xEB,0x02,0x20,0xA0,0xE3,0x04,0x30,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x82,0xB3,0x8A,0xE0,0x0B,0x00,0xA0,0xE1,0x29,0xFB,0xFF,0xEB,0x02,0x20,0xA0,0xE3,
+    0x04,0x30,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x82,0x04,0x8B,0xE0,0x24,0xFB,0xFF,0xEB,
+    0x04,0x30,0xA0,0xE3,0x02,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,
+    0x1F,0xFB,0xFF,0xEB,0x04,0x30,0xA0,0xE3,0x02,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x08,0x00,0xA0,0xE1,0x1A,0xFB,0xFF,0xEB,0x08,0x30,0xA0,0xE3,0x03,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0x15,0xFB,0xFF,0xEB,0x08,0x30,0xA0,0xE3,
+    0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x10,0xFB,0xFF,0xEB,
+    0x08,0x30,0xA0,0xE3,0x03,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,
+    0x0B,0xFB,0xFF,0xEB,0x08,0x30,0xA0,0xE3,0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x08,0x00,0xA0,0xE1,0x06,0xFB,0xFF,0xEB,0x08,0x30,0xA0,0xE3,0x03,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0x01,0xFB,0xFF,0xEB,0x08,0x30,0xA0,0xE3,
+    0x03,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0xFC,0xFA,0xFF,0xEB,
+    0x08,0x30,0xA0,0xE3,0x03,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x0A,0x00,0xA0,0xE1,
+    0xF7,0xFA,0xFF,0xEB,0x08,0x30,0xA0,0xE3,0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x0B,0x00,0xA0,0xE1,0xF2,0xFA,0xFF,0xEB,0x03,0x20,0xA0,0xE3,0x08,0x30,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x82,0x04,0x88,0xE0,0xED,0xFA,0xFF,0xEB,0x08,0x30,0xA0,0xE3,
+    0x03,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0xE8,0xFA,0xFF,0xEB,
+    0x08,0x30,0xA0,0xE3,0x03,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,
+    0xE3,0xFA,0xFF,0xEB,0x10,0x30,0xA0,0xE3,0x04,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x05,0x00,0xA0,0xE1,0xDE,0xFA,0xFF,0xEB,0x10,0x30,0xA0,0xE3,0x04,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0xD9,0xFA,0xFF,0xEB,0x10,0x30,0xA0,0xE3,
+    0x04,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0xD4,0xFA,0xFF,0xEB,
+    0x10,0x30,0xA0,0xE3,0x04,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,
+    0xCF,0xFA,0xFF,0xEB,0x10,0x30,0xA0,0xE3,0x04,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x09,0x00,0xA0,0xE1,0xCA,0xFA,0xFF,0xEB,0x10,0x30,0xA0,0xE3,0x04,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0xC5,0xFA,0xFF,0xEB,0x10,0x30,0xA0,0xE3,
+    0x04,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x0A,0x00,0xA0,0xE1,0xC0,0xFA,0xFF,0xEB,
+    0x10,0x30,0xA0,0xE3,0x04,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,
+    0xBB,0xFA,0xFF,0xEB,0x04,0x20,0xA0,0xE3,0x10,0x30,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x02,0x04,0x8B,0xE0,0xB6,0xFA,0xFF,0xEB,0x10,0x30,0xA0,0xE3,0x04,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0xB1,0xFA,0xFF,0xEB,0x10,0x30,0xA0,0xE3,
+    0x04,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0xAC,0xFA,0xFF,0xEB,
+    0x20,0x30,0xA0,0xE3,0x05,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,
+    0xA7,0xFA,0xFF,0xEB,0x20,0x30,0xA0,0xE3,0x05,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x06,0x00,0xA0,0xE1,0xA2,0xFA,0xFF,0xEB,0x20,0x30,0xA0,0xE3,0x05,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x9D,0xFA,0xFF,0xEB,0x20,0x30,0xA0,0xE3,
+    0x05,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0x98,0xFA,0xFF,0xEB,
+    0x20,0x30,0xA0,0xE3,0x05,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,
+    0x93,0xFA,0xFF,0xEB,0x20,0x30,0xA0,0xE3,0x05,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x06,0x00,0xA0,0xE1,0x8E,0xFA,0xFF,0xEB,0x20,0x30,0xA0,0xE3,0x05,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x0A,0x00,0xA0,0xE1,0x89,0xFA,0xFF,0xEB,0x20,0x30,0xA0,0xE3,
+    0x05,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,0x84,0xFA,0xFF,0xEB,
+    0x05,0x20,0xA0,0xE3,0x20,0x30,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x02,0x04,0x8A,0xE0,
+    0x7F,0xFA,0xFF,0xEB,0x20,0x30,0xA0,0xE3,0x05,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x09,0x00,0xA0,0xE1,0x7A,0xFA,0xFF,0xEB,0x20,0x30,0xA0,0xE3,0x05,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0x75,0xFA,0xFF,0xEB,0x02,0x00,0x54,0xE3,
+    0xC4,0x01,0x00,0x1A,0x40,0x30,0xA0,0xE3,0x06,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x05,0x00,0xA0,0xE1,0x6E,0xFA,0xFF,0xEB,0x40,0x30,0xA0,0xE3,0x06,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x69,0xFA,0xFF,0xEB,0x40,0x30,0xA0,0xE3,
+    0x06,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x64,0xFA,0xFF,0xEB,
+    0x40,0x30,0xA0,0xE3,0x06,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,
+    0x5F,0xFA,0xFF,0xEB,0x40,0x30,0xA0,0xE3,0x06,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x09,0x00,0xA0,0xE1,0x5A,0xFA,0xFF,0xEB,0x40,0x30,0xA0,0xE3,0x06,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x55,0xFA,0xFF,0xEB,0x40,0x30,0xA0,0xE3,
+    0x06,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x0A,0x00,0xA0,0xE1,0x50,0xFA,0xFF,0xEB,
+    0x40,0x30,0xA0,0xE3,0x06,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,
+    0x4B,0xFA,0xFF,0xEB,0x06,0x20,0xA0,0xE3,0x40,0x30,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x02,0x44,0x88,0xE0,0x04,0x00,0xA0,0xE1,0x45,0xFA,0xFF,0xEB,0x40,0x30,0xA0,0xE3,
+    0x06,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0x40,0xFA,0xFF,0xEB,
+    0x40,0x30,0xA0,0xE3,0x06,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,
+    0x3B,0xFA,0xFF,0xEB,0x80,0x30,0xA0,0xE3,0x07,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x05,0x00,0xA0,0xE1,0x36,0xFA,0xFF,0xEB,0x80,0x30,0xA0,0xE3,0x07,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x31,0xFA,0xFF,0xEB,0x80,0x30,0xA0,0xE3,
+    0x07,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x2C,0xFA,0xFF,0xEB,
+    0x80,0x30,0xA0,0xE3,0x07,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,
+    0x27,0xFA,0xFF,0xEB,0x80,0x30,0xA0,0xE3,0x07,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x09,0x00,0xA0,0xE1,0x22,0xFA,0xFF,0xEB,0x80,0x30,0xA0,0xE3,0x07,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x1D,0xFA,0xFF,0xEB,0x80,0x30,0xA0,0xE3,
+    0x07,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x0A,0x00,0xA0,0xE1,0x18,0xFA,0xFF,0xEB,
+    0x80,0x30,0xA0,0xE3,0x07,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,
+    0x13,0xFA,0xFF,0xEB,0x80,0x30,0xA0,0xE3,0x07,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x04,0x00,0xA0,0xE1,0x0E,0xFA,0xFF,0xEB,0x80,0x30,0xA0,0xE3,0x07,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0x09,0xFA,0xFF,0xEB,0x80,0x30,0xA0,0xE3,
+    0x07,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0x04,0xFA,0xFF,0xEB,
+    0x08,0x00,0x9D,0xE5,0x01,0x00,0x50,0xE3,0x52,0x01,0x00,0x1A,0x1C,0x40,0x45,0xE2,
+    0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x04,0x00,0xA0,0xE1,
+    0xFB,0xF9,0xFF,0xEB,0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x43,0x52,0x84,0xE1,0x05,0x00,0xA0,0xE1,0xF5,0xF9,0xFF,0xEB,0x3D,0x6C,0x44,0xE2,
+    0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,
+    0xEF,0xF9,0xFF,0xEB,0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x43,0x72,0x86,0xE0,0x07,0x00,0xA0,0xE1,0xE9,0xF9,0xFF,0xEB,0x0C,0x20,0xA0,0xE3,
+    0x01,0x3A,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x02,0x83,0x25,0xE0,0x08,0x00,0xA0,0xE1,
+    0xE3,0xF9,0xFF,0xEB,0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x05,0x00,0xA0,0xE1,0xDE,0xF9,0xFF,0xEB,0x01,0x10,0xA0,0xE3,0x01,0x3A,0xA0,0xE3,
+    0x0C,0x20,0xA0,0xE3,0x01,0x94,0x87,0xE1,0x09,0x00,0xA0,0xE1,0xD8,0xF9,0xFF,0xEB,
+    0x01,0x10,0xA0,0xE3,0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x01,0xA4,0x89,0xE0,
+    0x0A,0x00,0xA0,0xE1,0xD2,0xF9,0xFF,0xEB,0x0C,0x20,0xA0,0xE3,0x01,0x3A,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x82,0xB3,0x87,0xE0,0x0B,0x00,0xA0,0xE1,0xCC,0xF9,0xFF,0xEB,
+    0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,
+    0xC7,0xF9,0xFF,0xEB,0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x07,0x00,0xA0,0xE1,0xC2,0xF9,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x04,0x00,0xA0,0xE1,0xBD,0xF9,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,
+    0x0D,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0xB8,0xF9,0xFF,0xEB,
+    0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,
+    0xB3,0xF9,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x07,0x00,0xA0,0xE1,0xAE,0xF9,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0xA9,0xF9,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,
+    0x0D,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0xA4,0xF9,0xFF,0xEB,
+    0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,
+    0x9F,0xF9,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x0A,0x00,0xA0,0xE1,0x9A,0xF9,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,0x95,0xF9,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,
+    0x0D,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0x90,0xF9,0xFF,0xEB,
+    0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,
+    0x8B,0xF9,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x04,0x00,0xA0,0xE1,0x86,0xF9,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0x81,0xF9,0xFF,0xEB,0x01,0x39,0xA0,0xE3,
+    0x0E,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x7C,0xF9,0xFF,0xEB,
+    0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,
+    0x77,0xF9,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x08,0x00,0xA0,0xE1,0x72,0xF9,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0x6D,0xF9,0xFF,0xEB,0x01,0x39,0xA0,0xE3,
+    0x0E,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0x68,0xF9,0xFF,0xEB,
+    0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x0A,0x00,0xA0,0xE1,
+    0x63,0xF9,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x0B,0x00,0xA0,0xE1,0x5E,0xF9,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0x59,0xF9,0xFF,0xEB,0x01,0x39,0xA0,0xE3,
+    0x0E,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x54,0xF9,0xFF,0xEB,
+    0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x04,0x00,0xA0,0xE1,
+    0x4F,0xF9,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x05,0x00,0xA0,0xE1,0x4A,0xF9,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x45,0xF9,0xFF,0xEB,0x02,0x39,0xA0,0xE3,
+    0x0F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x40,0xF9,0xFF,0xEB,
+    0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,
+    0x3B,0xF9,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x05,0x00,0xA0,0xE1,0x36,0xF9,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0x31,0xF9,0xFF,0xEB,0x02,0x39,0xA0,0xE3,
+    0x0F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x0A,0x00,0xA0,0xE1,0x2C,0xF9,0xFF,0xEB,
+    0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,
+    0x27,0xF9,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x08,0x00,0xA0,0xE1,0x22,0xF9,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x6D,0x00,0x00,0xEA,0x01,0x3B,0xA0,0xE3,
+    0x0A,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0x18,0xF9,0xFF,0xEB,
+    0x01,0x3B,0xA0,0xE3,0x0A,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,
+    0x13,0xF9,0xFF,0xEB,0x01,0x3B,0xA0,0xE3,0x0A,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x07,0x00,0xA0,0xE1,0x0E,0xF9,0xFF,0xEB,0x01,0x3B,0xA0,0xE3,0x0A,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0x09,0xF9,0xFF,0xEB,0x01,0x3B,0xA0,0xE3,
+    0x0A,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0x04,0xF9,0xFF,0xEB,
+    0x01,0x3B,0xA0,0xE3,0x0A,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,
+    0xFF,0xF8,0xFF,0xEB,0x01,0x3B,0xA0,0xE3,0x0A,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x0A,0x00,0xA0,0xE1,0xFA,0xF8,0xFF,0xEB,0x01,0x3B,0xA0,0xE3,0x0A,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,0xF5,0xF8,0xFF,0xEB,0x24,0x41,0x9F,0xE5,
+    0x01,0x3B,0xA0,0xE3,0x0A,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x04,0x00,0xA0,0xE1,
+    0xEF,0xF8,0xFF,0xEB,0x01,0x3B,0xA0,0xE3,0x0A,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x09,0x00,0xA0,0xE1,0xEA,0xF8,0xFF,0xEB,0x01,0x3B,0xA0,0xE3,0x0A,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0xE5,0xF8,0xFF,0xEB,0x02,0x3B,0xA0,0xE3,
+    0x0B,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0xE0,0xF8,0xFF,0xEB,
+    0x02,0x3B,0xA0,0xE3,0x0B,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,
+    0xDB,0xF8,0xFF,0xEB,0x02,0x3B,0xA0,0xE3,0x0B,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x07,0x00,0xA0,0xE1,0xD6,0xF8,0xFF,0xEB,0x02,0x3B,0xA0,0xE3,0x0B,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0xD1,0xF8,0xFF,0xEB,0x02,0x3B,0xA0,0xE3,
+    0x0B,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0xCC,0xF8,0xFF,0xEB,
+    0x02,0x3B,0xA0,0xE3,0x0B,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,
+    0xC7,0xF8,0xFF,0xEB,0x02,0x3B,0xA0,0xE3,0x0B,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x0A,0x00,0xA0,0xE1,0xC2,0xF8,0xFF,0xEB,0x02,0x3B,0xA0,0xE3,0x0B,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,0xBD,0xF8,0xFF,0xEB,0x02,0x3B,0xA0,0xE3,
+    0x0B,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x04,0x00,0xA0,0xE1,0xB8,0xF8,0xFF,0xEB,
+    0x02,0x3B,0xA0,0xE3,0x0B,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,
+    0xB3,0xF8,0xFF,0xEB,0x02,0x3B,0xA0,0xE3,0x0B,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x08,0x00,0xA0,0xE1,0xAE,0xF8,0xFF,0xEB,0x00,0x00,0xA0,0xE3,0xFE,0x8F,0xBD,0xE8,
+    0x20,0x70,0xFE,0xFC,0x24,0x70,0xFE,0xFC,0x20,0x3A,0xFE,0xFC,0xF0,0x41,0x2D,0xE9,
+    0x01,0x00,0x50,0xE3,0x02,0x70,0xA0,0xE1,0x01,0x50,0xA0,0xE1,0x00,0x40,0xA0,0xE1,
+    0x15,0x00,0x00,0x8A,0x54,0x6B,0x9F,0xE5,0x01,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x04,0x01,0x96,0xE7,0x48,0x00,0x80,0xE2,0xB3,0xF8,0xFF,0xEB,0x01,0x00,0x50,0xE3,
+    0x0D,0x00,0x00,0x1A,0x04,0x01,0x96,0xE7,0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0xAD,0xF8,0xFF,0xEB,0x05,0x00,0x50,0xE1,0x14,0x00,0x00,0x0A,0x01,0x00,0x55,0xE3,
+    0x07,0x00,0x00,0x1A,0x05,0x20,0xA0,0xE1,0x07,0x10,0xA0,0xE1,0x04,0x00,0xA0,0xE1,
+    0x49,0xFC,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x01,0x00,0x00,0xAA,0x00,0x00,0xE0,0xE3,
+    0xF0,0x81,0xBD,0xE8,0x04,0x01,0x96,0xE7,0x03,0x30,0xA0,0xE3,0x00,0x20,0xA0,0xE3,
+    0x05,0x10,0xA0,0xE1,0x8D,0xF8,0xFF,0xEB,0x04,0x01,0x96,0xE7,0x02,0x3C,0xA0,0xE3,
+    0x09,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x0C,0x00,0x80,0xE2,0x87,0xF8,0xFF,0xEB,
+    0x00,0x00,0xA0,0xE3,0xF0,0x81,0xBD,0xE8,0xF0,0x47,0x2D,0xE9,0x01,0x00,0x50,0xE3,
+    0x03,0x70,0xA0,0xE1,0x02,0x80,0xA0,0xE1,0x20,0x60,0x9D,0xE5,0x01,0x90,0xA0,0xE1,
+    0x00,0x40,0xA0,0xE1,0x71,0x00,0x00,0x8A,0x01,0x20,0xA0,0xE1,0x06,0x10,0xA0,0xE1,
+    0x2D,0xFC,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x6C,0x00,0x00,0xBA,0x01,0x20,0xA0,0xE3,
+    0x88,0x5A,0x9F,0xE5,0x00,0x10,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x48,0x00,0x80,0xE2,
+    0x81,0xF8,0xFF,0xEB,0x01,0x00,0x50,0xE3,0x64,0x00,0x00,0x1A,0x04,0x01,0x95,0xE7,
+    0x03,0x35,0xA0,0xE3,0x16,0x20,0xA0,0xE3,0x03,0x10,0xA0,0xE3,0x6B,0xF8,0xFF,0xEB,
+    0x04,0x01,0x95,0xE7,0x03,0x36,0xA0,0xE3,0x14,0x20,0xA0,0xE3,0x03,0x10,0xA0,0xE3,
+    0x66,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x03,0x37,0xA0,0xE3,0x12,0x20,0xA0,0xE3,
+    0x03,0x10,0xA0,0xE3,0x61,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x03,0x38,0xA0,0xE3,
+    0x10,0x20,0xA0,0xE3,0x03,0x10,0xA0,0xE3,0x5C,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0x03,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x03,0x10,0xA0,0xE3,0x57,0xF8,0xFF,0xEB,
+    0x04,0x01,0x95,0xE7,0x03,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x03,0x10,0xA0,0xE3,
+    0x52,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x03,0x3C,0xA0,0xE3,0x08,0x20,0xA0,0xE3,
+    0x03,0x10,0xA0,0xE3,0x4D,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x01,0x34,0xA0,0xE3,
+    0x18,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x48,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0x40,0x30,0xA0,0xE3,0x06,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x43,0xF8,0xFF,0xEB,
+    0x04,0x01,0x95,0xE7,0x20,0x30,0xA0,0xE3,0x05,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x3E,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x10,0x30,0xA0,0xE3,0x04,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x39,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x08,0x30,0xA0,0xE3,
+    0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x34,0xF8,0xFF,0xEB,0x06,0x20,0xA0,0xE1,
+    0x09,0x10,0xA0,0xE1,0x04,0x00,0xA0,0xE1,0x7F,0xFF,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0x07,0x38,0xA0,0xE3,0x10,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x04,0x00,0x80,0xE2,
+    0x2A,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x07,0x3C,0xA0,0xE3,0x08,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x04,0x00,0x80,0xE2,0x24,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0x00,0x20,0xA0,0xE3,0x07,0x30,0xA0,0xE3,0x02,0x10,0xA0,0xE1,0x04,0x00,0x80,0xE2,
+    0x1E,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,0xFF,0x3C,0xA0,0xE3,0x08,0x20,0xA0,0xE3,
+    0x08,0x10,0xA0,0xE1,0x08,0x00,0x80,0xE2,0x18,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0x03,0x30,0xA0,0xE3,0x00,0x20,0xA0,0xE3,0x07,0x10,0xA0,0xE1,0x08,0x00,0x80,0xE2,
+    0x12,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x02,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x48,0x00,0x80,0xE2,0x1C,0xF8,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x01,0x00,0x00,0x0A,
+    0x00,0x00,0xE0,0xE3,0xF0,0x87,0xBD,0xE8,0x04,0x11,0x95,0xE7,0x08,0x05,0x0A,0xE3,
+    0x50,0x00,0x81,0xE5,0x04,0x11,0x95,0xE7,0xC4,0x08,0x9F,0xE5,0x68,0x00,0x81,0xE5,
+    0x00,0x00,0xA0,0xE3,0xF0,0x87,0xBD,0xE8,0x70,0x40,0x2D,0xE9,0x00,0x40,0xA0,0xE1,
+    0xA8,0x58,0x9F,0xE5,0x01,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x48,0x00,0x80,0xE2,0x08,0xF8,0xFF,0xEB,0x01,0x00,0x50,0xE3,0xF8,0xFF,0xFF,0x1A,
+    0x70,0x80,0xBD,0xE8,0x70,0x40,0x2D,0xE9,0x01,0x00,0x50,0xE3,0x01,0x60,0xA0,0xE1,
+    0x00,0x40,0xA0,0xE1,0x07,0x00,0x00,0x8A,0x01,0x20,0xA0,0xE3,0x6C,0x58,0x9F,0xE5,
+    0x00,0x10,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x48,0x00,0x80,0xE2,0xFA,0xF7,0xFF,0xEB,
+    0x01,0x00,0x50,0xE3,0x01,0x00,0x00,0x0A,0x00,0x00,0xE0,0xE3,0x70,0x80,0xBD,0xE8,
+    0x04,0x01,0x95,0xE7,0x02,0x31,0xA0,0xE3,0x1F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0xE2,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x0F,0x38,0xA0,0xE3,0x10,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x0C,0x00,0x80,0xE2,0xDC,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0x01,0x3C,0xA0,0xE3,0x08,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x0C,0x00,0x80,0xE2,
+    0xD6,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x01,0x30,0xA0,0xE3,0x00,0x20,0xA0,0xE3,
+    0x03,0x10,0xA0,0xE1,0x0C,0x00,0x80,0xE2,0xD0,0xF7,0xFF,0xEB,0x00,0x10,0xD6,0xE5,
+    0xFF,0x38,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x10,0x20,0xA0,0xE3,0x10,0x00,0x80,0xE2,
+    0xCA,0xF7,0xFF,0xEB,0x01,0x10,0xD6,0xE5,0x03,0x31,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x1E,0x20,0xA0,0xE3,0x1C,0x00,0x80,0xE2,0xC4,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x1C,0x00,0x80,0xE2,
+    0xBE,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x00,0x20,0xA0,0xE3,0xFF,0x30,0xA0,0xE3,
+    0x02,0x10,0xA0,0xE1,0x10,0x00,0x80,0xE2,0xB8,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0x03,0x32,0xA0,0xE3,0x1C,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x1C,0x00,0x80,0xE2,
+    0xB2,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x1C,0x00,0x80,0xE2,0xAC,0xF7,0xFF,0xEB,0x0E,0x10,0xD6,0xE5,
+    0x03,0x34,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x18,0x20,0xA0,0xE3,0x1C,0x00,0x80,0xE2,
+    0xA6,0xF7,0xFF,0xEB,0x0F,0x10,0xD6,0xE5,0x0F,0x3C,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x08,0x20,0xA0,0xE3,0x1C,0x00,0x80,0xE2,0xA0,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0xFF,0x38,0xA0,0xE3,0x10,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x14,0x00,0x80,0xE2,
+    0x9A,0xF7,0xFF,0xEB,0x02,0x10,0xD6,0xE5,0xFF,0x34,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x18,0x20,0xA0,0xE3,0x18,0x00,0x80,0xE2,0x94,0xF7,0xFF,0xEB,0x03,0x10,0xD6,0xE5,
+    0xFF,0x38,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x10,0x20,0xA0,0xE3,0x18,0x00,0x80,0xE2,
+    0x8E,0xF7,0xFF,0xEB,0x04,0x10,0xD6,0xE5,0xFF,0x3C,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x08,0x20,0xA0,0xE3,0x18,0x00,0x80,0xE2,0x88,0xF7,0xFF,0xEB,0x05,0x10,0xD6,0xE5,
+    0xFF,0x30,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x00,0x20,0xA0,0xE3,0x18,0x00,0x80,0xE2,
+    0x82,0xF7,0xFF,0xEB,0x07,0x10,0xD6,0xE5,0x03,0x36,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x14,0x20,0xA0,0xE3,0x1C,0x00,0x80,0xE2,0x7C,0xF7,0xFF,0xEB,0x06,0x10,0xD6,0xE5,
+    0xF0,0x30,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x04,0x20,0xA0,0xE3,0x1C,0x00,0x80,0xE2,
+    0x76,0xF7,0xFF,0xEB,0x0B,0x10,0xD6,0xE5,0x03,0x38,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x10,0x20,0xA0,0xE3,0x1C,0x00,0x80,0xE2,0x70,0xF7,0xFF,0xEB,0x09,0x10,0xD6,0xE5,
+    0x02,0x39,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x0F,0x20,0xA0,0xE3,0x1C,0x00,0x80,0xE2,
+    0x6A,0xF7,0xFF,0xEB,0x0A,0x10,0xD6,0xE5,0x03,0x38,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x10,0x20,0xA0,0xE3,0x58,0x00,0x80,0xE2,0x64,0xF7,0xFF,0xEB,0x08,0x10,0xD6,0xE5,
+    0x07,0x30,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x00,0x20,0xA0,0xE3,0x58,0x00,0x80,0xE2,
+    0x5E,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x01,0x3C,0xA0,0xE3,0x08,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x5C,0x00,0x80,0xE2,0x58,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0x10,0x30,0xA0,0xE3,0x04,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x5C,0x00,0x80,0xE2,
+    0x52,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x00,0x20,0xA0,0xE3,0x01,0x30,0xA0,0xE3,
+    0x02,0x10,0xA0,0xE1,0x5C,0x00,0x80,0xE2,0x4C,0xF7,0xFF,0xEB,0x00,0x00,0xA0,0xE3,
+    0x70,0x80,0xBD,0xE8,0x70,0x40,0x2D,0xE9,0x01,0x00,0x50,0xE3,0x00,0x40,0xA0,0xE1,
+    0x00,0x00,0xE0,0x83,0x70,0x80,0xBD,0x88,0x01,0x34,0xA0,0xE3,0x18,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0xB4,0x55,0x9F,0xE5,0x04,0x01,0x95,0xE7,0x0C,0x00,0x80,0xE2,
+    0x3E,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x02,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x48,0x00,0x80,0xE2,0x48,0xF7,0xFF,0xEB,0x00,0x00,0x50,0xE3,0xF8,0xFF,0xFF,0x1A,
+    0x70,0x80,0xBD,0xE8,0x70,0x40,0x2D,0xE9,0x00,0x40,0xA0,0xE1,0x7C,0x55,0x9F,0xE5,
+    0x02,0x21,0xA0,0xE3,0x1F,0x10,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x3E,0xF7,0xFF,0xEB,
+    0x00,0x00,0x50,0xE3,0x09,0x00,0x00,0x0A,0x04,0x00,0xA0,0xE1,0xE0,0xFF,0xFF,0xEB,
+    0x00,0x00,0x50,0xE3,0x00,0x00,0xE0,0xB3,0x70,0x80,0xBD,0xB8,0x02,0x31,0xA0,0xE3,
+    0x1F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x23,0xF7,0xFF,0xEB,
+    0x00,0x00,0xA0,0xE3,0x70,0x80,0xBD,0xE8,0x70,0x40,0x2D,0xE9,0x00,0x40,0xA0,0xE1,
+    0x28,0x55,0x9F,0xE5,0x02,0x21,0xA0,0xE3,0x1F,0x10,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x29,0xF7,0xFF,0xEB,0x01,0x00,0x50,0xE3,0x09,0x00,0x00,0x0A,0x04,0x00,0xA0,0xE1,
+    0xCB,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x00,0x00,0xE0,0xB3,0x70,0x80,0xBD,0xB8,
+    0x02,0x31,0xA0,0xE3,0x1F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x0E,0xF7,0xFF,0xEB,0x00,0x00,0xA0,0xE3,0x70,0x80,0xBD,0xE8,0xF0,0x41,0x2D,0xE9,
+    0x01,0x00,0x50,0xE3,0x01,0x40,0xA0,0xE1,0x00,0x50,0xA0,0xE1,0x19,0x00,0x00,0x8A,
+    0x02,0x21,0xA0,0xE3,0xC4,0x64,0x9F,0xE5,0x1F,0x10,0xA0,0xE3,0x05,0x01,0x96,0xE7,
+    0x11,0xF7,0xFF,0xEB,0x01,0x00,0x50,0xE3,0x0B,0x00,0x00,0x0A,0x05,0x01,0x96,0xE7,
+    0x02,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x48,0x00,0x80,0xE2,0x0A,0xF7,0xFF,0xEB,
+    0x00,0x00,0x50,0xE3,0x0B,0x00,0x00,0x1A,0x05,0x01,0x96,0xE7,0x02,0x31,0xA0,0xE3,
+    0x1F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0xF4,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,
+    0x01,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x48,0x00,0x80,0xE2,0xFE,0xF6,0xFF,0xEB,
+    0x01,0x00,0x50,0xE3,0x01,0x00,0x00,0x0A,0x00,0x00,0xE0,0xE3,0xF0,0x81,0xBD,0xE8,
+    0x05,0x01,0x96,0xE7,0x01,0x39,0xA0,0xE3,0x14,0x10,0x94,0xE5,0x0E,0x20,0xA0,0xE3,
+    0x30,0x00,0x80,0xE2,0xE5,0xF6,0xFF,0xEB,0x14,0x00,0x94,0xE5,0x00,0x00,0x50,0xE3,
+    0x0B,0x00,0x00,0x0A,0x05,0x01,0x96,0xE7,0x46,0x10,0xD4,0xE5,0xFF,0x38,0xA0,0xE3,
+    0x24,0x00,0x80,0xE2,0x10,0x20,0xA0,0xE3,0xDC,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,
+    0x03,0x31,0xA0,0xE3,0x00,0x10,0x94,0xE5,0x1E,0x20,0xA0,0xE3,0x30,0x00,0x80,0xE2,
+    0xD6,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,0x01,0x3A,0xA0,0xE3,0x18,0x10,0x94,0xE5,
+    0x0C,0x20,0xA0,0xE3,0x30,0x00,0x80,0xE2,0xD0,0xF6,0xFF,0xEB,0x18,0x00,0x94,0xE5,
+    0x00,0x00,0x50,0xE3,0x0B,0x00,0x00,0x0A,0x05,0x01,0x96,0xE7,0x47,0x10,0xD4,0xE5,
+    0xFF,0x30,0xA0,0xE3,0x24,0x00,0x80,0xE2,0x00,0x20,0xA0,0xE3,0xC7,0xF6,0xFF,0xEB,
+    0x05,0x01,0x96,0xE7,0x03,0x32,0xA0,0xE3,0x04,0x10,0x94,0xE5,0x1C,0x20,0xA0,0xE3,
+    0x30,0x00,0x80,0xE2,0xC1,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,0x0F,0x3C,0xA0,0xE3,
+    0x1C,0x10,0x94,0xE5,0x08,0x20,0xA0,0xE3,0x30,0x00,0x80,0xE2,0xBB,0xF6,0xFF,0xEB,
+    0x1C,0x00,0x94,0xE5,0x00,0x00,0x50,0xE3,0x0B,0x00,0x00,0x0A,0x05,0x01,0x96,0xE7,
+    0x48,0x10,0x94,0xE5,0x00,0x30,0xE0,0xE3,0x00,0x20,0xA0,0xE3,0x28,0x00,0x80,0xE2,
+    0xB2,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,0x03,0x34,0xA0,0xE3,0x08,0x10,0x94,0xE5,
+    0x18,0x20,0xA0,0xE3,0x30,0x00,0x80,0xE2,0xAC,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,
+    0xF0,0x30,0xA0,0xE3,0x20,0x10,0x94,0xE5,0x04,0x20,0xA0,0xE3,0x30,0x00,0x80,0xE2,
+    0xA6,0xF6,0xFF,0xEB,0x20,0x00,0x94,0xE5,0x00,0x00,0x50,0xE3,0x1D,0x00,0x00,0x0A,
+    0x05,0x01,0x96,0xE7,0x4C,0x10,0xD4,0xE5,0xFF,0x34,0xA0,0xE3,0x2C,0x00,0x80,0xE2,
+    0x18,0x20,0xA0,0xE3,0x9D,0xF6,0xFF,0xEB,0x4D,0x10,0xD4,0xE5,0xFF,0x38,0xA0,0xE3,
+    0x05,0x01,0x96,0xE7,0x10,0x20,0xA0,0xE3,0x2C,0x00,0x80,0xE2,0x97,0xF6,0xFF,0xEB,
+    0x4E,0x10,0xD4,0xE5,0xFF,0x3C,0xA0,0xE3,0x05,0x01,0x96,0xE7,0x08,0x20,0xA0,0xE3,
+    0x2C,0x00,0x80,0xE2,0x91,0xF6,0xFF,0xEB,0x4F,0x10,0xD4,0xE5,0xFF,0x30,0xA0,0xE3,
+    0x05,0x01,0x96,0xE7,0x00,0x20,0xA0,0xE3,0x2C,0x00,0x80,0xE2,0x8B,0xF6,0xFF,0xEB,
+    0x05,0x01,0x96,0xE7,0x03,0x36,0xA0,0xE3,0x0C,0x10,0x94,0xE5,0x14,0x20,0xA0,0xE3,
+    0x30,0x00,0x80,0xE2,0x85,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,0x02,0x39,0xA0,0xE3,
+    0x34,0x10,0x94,0xE5,0x0F,0x20,0xA0,0xE3,0x30,0x00,0x80,0xE2,0x7F,0xF6,0xFF,0xEB,
+    0x34,0x00,0x94,0xE5,0x00,0x00,0x50,0xE3,0x0B,0x00,0x00,0x0A,0x05,0x01,0x96,0xE7,
+    0x44,0x10,0xD4,0xE5,0x03,0x38,0xA0,0xE3,0x60,0x00,0x80,0xE2,0x10,0x20,0xA0,0xE3,
+    0x76,0xF6,0xFF,0xEB,0x45,0x10,0xD4,0xE5,0x07,0x30,0xA0,0xE3,0x05,0x01,0x96,0xE7,
+    0x00,0x20,0xA0,0xE3,0x60,0x00,0x80,0xE2,0x70,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,
+    0x0F,0x30,0xA0,0xE3,0x24,0x10,0x94,0xE5,0x00,0x20,0xA0,0xE3,0x30,0x00,0x80,0xE2,
+    0x6A,0xF6,0xFF,0xEB,0x24,0x00,0x94,0xE5,0x58,0x72,0x9F,0xE5,0x00,0x00,0x50,0xE3,
+    0x2C,0x00,0x00,0x0A,0x08,0x00,0x50,0xE3,0x04,0x00,0x00,0x0A,0x0C,0x00,0x50,0xE3,
+    0x0C,0x00,0x00,0x0A,0x0F,0x00,0x50,0xE3,0x14,0x00,0x00,0x0A,0x1F,0x00,0x00,0xEA,
+    0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x6A,0xF6,0xFF,0xEB,
+    0x00,0x00,0x50,0xE3,0x58,0x00,0xD4,0x05,0x05,0x11,0x96,0x07,0x40,0x00,0xC1,0x05,
+    0x06,0x00,0x00,0x1A,0x15,0x00,0x00,0xEA,0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x07,0x00,0xA0,0xE1,0x60,0xF6,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x53,0x00,0x00,0x1A,
+    0x05,0x11,0x96,0xE7,0xB8,0x05,0xD4,0xE1,0xB0,0x04,0xC1,0xE1,0x0B,0x00,0x00,0xEA,
+    0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x56,0xF6,0xFF,0xEB,
+    0x00,0x00,0x50,0xE3,0x49,0x00,0x00,0x0A,0x05,0x11,0x96,0xE7,0x58,0x00,0x94,0xE5,
+    0x40,0x00,0x81,0xE5,0x05,0x01,0x96,0xE7,0x5C,0x10,0x94,0xE5,0x44,0x10,0x80,0xE5,
+    0x03,0x38,0xA0,0xE3,0x05,0x01,0x96,0xE7,0x10,0x20,0xA0,0xE3,0x10,0x10,0x94,0xE5,
+    0x30,0x00,0x80,0xE2,0x39,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,0x01,0x3C,0xA0,0xE3,
+    0x28,0x10,0x94,0xE5,0x08,0x20,0xA0,0xE3,0x20,0x00,0x80,0xE2,0x33,0xF6,0xFF,0xEB,
+    0x10,0x00,0x94,0xE5,0x00,0x00,0x50,0xE3,0x24,0x00,0x94,0x15,0x00,0x00,0x50,0x13,
+    0x04,0x00,0x00,0x0A,0x2C,0x00,0x94,0xE5,0x01,0x00,0x50,0xE3,0x30,0x00,0x94,0x05,
+    0x01,0x00,0x50,0x03,0x3B,0xFF,0xFF,0x0A,0x05,0x01,0x96,0xE7,0x2C,0x10,0x94,0xE5,
+    0x04,0x30,0xA0,0xE3,0x02,0x20,0xA0,0xE3,0x20,0x00,0x80,0xE2,0x23,0xF6,0xFF,0xEB,
+    0x05,0x01,0x96,0xE7,0x02,0x30,0xA0,0xE3,0x30,0x10,0x94,0xE5,0x01,0x20,0xA0,0xE3,
+    0x20,0x00,0x80,0xE2,0x1D,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,0x01,0x3C,0xA0,0xE3,
+    0x38,0x10,0x94,0xE5,0x08,0x20,0xA0,0xE3,0x64,0x00,0x80,0xE2,0x17,0xF6,0xFF,0xEB,
+    0x05,0x01,0x96,0xE7,0x10,0x30,0xA0,0xE3,0x3C,0x10,0x94,0xE5,0x04,0x20,0xA0,0xE3,
+    0x64,0x00,0x80,0xE2,0x11,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,0x01,0x30,0xA0,0xE3,
+    0x40,0x10,0x94,0xE5,0x00,0x20,0xA0,0xE3,0x64,0x00,0x80,0xE2,0x0B,0xF6,0xFF,0xEB,
+    0x05,0x01,0x96,0xE7,0x01,0x30,0xA0,0xE3,0x00,0x20,0xA0,0xE3,0x03,0x10,0xA0,0xE1,
+    0x20,0x00,0x80,0xE2,0x05,0xF6,0xFF,0xEB,0x05,0x00,0xA0,0xE1,0xAD,0xF9,0xFF,0xEB,
+    0x24,0x00,0x94,0xE5,0x08,0x00,0x50,0xE3,0x08,0x00,0x00,0x0A,0x0C,0x00,0x50,0xE3,
+    0x11,0x00,0x00,0x0A,0x0F,0x00,0x50,0xE3,0x16,0x00,0x00,0x0A,0x21,0x00,0x00,0xEA,
+    0x05,0x11,0x96,0xE7,0x58,0x00,0x94,0xE5,0x40,0x00,0x81,0xE5,0xB7,0xFF,0xFF,0xEA,
+    0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x02,0xF6,0xFF,0xEB,
+    0x00,0x00,0x50,0xE3,0x05,0x01,0x96,0x07,0x38,0x00,0xD0,0x05,0x19,0x00,0x00,0x0A,
+    0x05,0x01,0x96,0xE7,0xB8,0x03,0xD0,0xE1,0x16,0x00,0x00,0xEA,0x03,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0xF7,0xF5,0xFF,0xEB,0x00,0x00,0x50,0xE3,
+    0x0E,0x00,0x00,0x1A,0xF5,0xFF,0xFF,0xEA,0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x07,0x00,0xA0,0xE1,0xF0,0xF5,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x07,0x00,0x00,0x0A,
+    0x05,0x01,0x96,0xE7,0x38,0x00,0x90,0xE5,0x50,0x00,0x84,0xE5,0x05,0x01,0x96,0xE7,
+    0x3C,0x00,0x90,0xE5,0x54,0x00,0x84,0xE5,0x00,0x00,0xA0,0xE3,0xF0,0x81,0xBD,0xE8,
+    0x05,0x01,0x96,0xE7,0x38,0x00,0x90,0xE5,0x50,0x00,0x84,0xE5,0xF9,0xFF,0xFF,0xEA,
+    0x8C,0x2A,0x02,0x20,0x63,0x63,0x00,0xA5,0x00,0xA0,0xEF,0x3F,0xF0,0x40,0x2D,0xE9,
+    0xEB,0xC0,0xA0,0xE3,0x00,0xC0,0xC1,0xE5,0x08,0x70,0xA0,0xE3,0x06,0x70,0xC1,0xE5,
+    0x03,0x60,0xA0,0xE3,0x08,0x60,0xC1,0xE5,0x55,0x50,0xA0,0xE3,0x02,0x50,0xC1,0xE5,
+    0x01,0x40,0xA0,0xE3,0x09,0x40,0xC1,0xE5,0x02,0x30,0xA0,0xE3,0x0E,0x30,0xC1,0xE5,
+    0x00,0x20,0xA0,0xE3,0x07,0x30,0xC1,0xE5,0x00,0x00,0x50,0xE3,0x0B,0x30,0xC1,0xE5,
+    0x07,0x00,0xA0,0xE3,0x01,0x20,0xC1,0xE5,0x03,0x20,0xC1,0xE5,0x04,0x20,0xC1,0xE5,
+    0x05,0x20,0xC1,0xE5,0x0A,0x20,0xC1,0xE5,0x0C,0x40,0xC1,0x05,0x0C,0x30,0xC1,0x15,
+    0x0D,0x20,0xC1,0xE5,0x0F,0x00,0xC1,0xE5,0xF0,0x80,0xBD,0xE8,0x00,0xA0,0xEF,0x3F,
+    0x00,0xB0,0xEF,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0x5C,0x00,0x9F,0xE5,0x01,0x10,0xA0,0xE3,0x00,0x10,0x80,0xE5,0x00,0x00,0x90,0xE5,
+    0x50,0x00,0x9F,0xE5,0x35,0x10,0x01,0xE3,0xB0,0x10,0xC0,0xE1,0x00,0x00,0x90,0xE5,
+    0x44,0x00,0x9F,0xE5,0x01,0x10,0xA0,0xE3,0xB0,0x10,0xC0,0xE1,0x00,0x00,0x90,0xE5,
+    0x10,0x0F,0x11,0xEE,0x02,0x0A,0xC0,0xE3,0x01,0x0A,0xC0,0xE3,0x04,0x00,0xC0,0xE3,
+    0x01,0x00,0xC0,0xE3,0x10,0x0F,0x01,0xEE,0x26,0x00,0x00,0xEB,0x1C,0xD0,0x9F,0xE5,
+    0x14,0x00,0x00,0xEB,0x0D,0x00,0x00,0xEB,0x0E,0x00,0x00,0xEB,0x0F,0x00,0x00,0xEB,
+    0xFE,0xFF,0xFF,0xEA,0x80,0xFF,0xFF,0x3F,0x10,0x00,0xFE,0xFC,0x14,0x00,0xFE,0xFC,
+    0x00,0x00,0x03,0x20,0xFE,0xFF,0xFF,0xEA,0xFE,0xFF,0xFF,0xEA,0xFE,0xFF,0xFF,0xEA,
+    0xFE,0xFF,0xFF,0xEA,0xFE,0xFF,0xFF,0xEA,0xFE,0xFF,0xFF,0xEA,0xFE,0xFF,0xFF,0xEA,
+    0x04,0xF0,0x1F,0xE5,0x40,0x00,0x02,0x20,0x04,0xF0,0x1F,0xE5,0x00,0x00,0x02,0x20,
+    0x04,0xF0,0x1F,0xE5,0x04,0x02,0x02,0x20,0x2C,0x30,0x9F,0xE5,0x00,0x20,0xA0,0xE3,
+    0x28,0x10,0x9F,0xE5,0x28,0x00,0x9F,0xE5,0x10,0x40,0x2D,0xE9,0x23,0x31,0xA0,0xE1,
+    0x02,0x00,0x00,0xEA,0x04,0x40,0x91,0xE4,0x01,0x20,0x82,0xE2,0x04,0x40,0x80,0xE4,
+    0x03,0x00,0x52,0xE1,0xFA,0xFF,0xFF,0xBA,0x10,0x80,0xBD,0xE8,0xAF,0x01,0x00,0x00,
+    0x00,0x02,0x00,0x18,0x00,0x00,0x02,0x20,0x04,0x00,0x9F,0xE5,0x10,0x0F,0x0C,0xEE,
+    0x1E,0xFF,0x2F,0xE1,0x00,0x00,0x00,0x18,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+};
+#if defined  (__CC_ARM)
+#pragma arm section
+#endif
+
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/mmu_Renesas_RZ_A1.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/mmu_Renesas_RZ_A1.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/mmu_Renesas_RZ_A1.c	(revision 270)
@@ -0,0 +1,192 @@
+/**************************************************************************//**
+ * @file     mmu_Renesas_RZ_A1.c
+ * @brief    MMU Startup File for
+ *           mmu_Renesas_RZ_A1 Device Series
+ * @version  V1.01
+ * @date     2 Aug 2013
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2011 - 2013 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+
+#define Renesas_RZ_A1_SPI_MIO_BASE                 (0x3fe00000UL)                        /*!< (SPI_MIO   ) Base Address */
+#define Renesas_RZ_A1_BSC_BASE                     (0x3ff00000UL)                        /*!< (BSC       ) Base Address */
+#define Renesas_RZ_A1_PERIPH_BASE0                 (0xe8000000UL)                        /*!< (PERIPH0   ) Base Address */
+#define Renesas_RZ_A1_PERIPH_BASE1                 (0xfcf00000UL)                        /*!< (PERIPH1   ) Base Address */
+// L1 Cache info and restrictions about architecture of the caches (CCSIR register):
+// Write-Through support *not* available
+// Write-Back support available.
+// Read allocation support available.
+// Write allocation support available.
+
+//Note: You should use the Shareable attribute carefully.
+//For cores without coherency logic (such as SCU) marking a region as shareable forces the processor to not cache that region regardless the inner cache settings.
+//CA9-RTX uses LDREX/STREX instructions relying on Local monitors. Local monitors will be used only when the region gets cached, regions that are not cached will use the Global Monitor.
+//Some A9 implementations does not include Global Monitors, so wrongly setting the attribute Shareable may cause STREX to fail.
+
+//Recall: When the Shareable attribute is applied to a memory region that is not Write-Back, Normal memory, data held in this region is treated as Non-cacheable.
+//When SMP bit = 0, Inner WB/WA Cacheable Shareable attributes are treated as Non-cacheable.
+//When SMP bit = 1, Inner WB/WA Cacheable Shareable attributes are treated as Cacheable.
+
+
+//Following MMU configuration is expected
+//SCTLR.AFE == 1 (Simplified access permissions model - AP[2:1] define access permissions, AP[0] is an access flag)
+//SCTLR.TRE == 0 (TEX remap disabled, so memory type and attributes are described directly by bits in the descriptor)
+//Domain 0 is always the Client domain
+//Descriptors place all memory in domain 0
+//There are no restrictions by privilege level (PL0 can access all memory)
+
+#include <stdint.h>
+#include "MBRZA1H.h"
+
+//Import symbols from linker
+extern uint32_t Image$$VECTORS$$Base;
+extern uint32_t Image$$RO_DATA$$Base;
+extern uint32_t Image$$RW_DATA$$Base;
+extern uint32_t Image$$ZI_DATA$$Base;
+extern uint32_t Image$$TTB$$ZI$$Base;
+#if defined( __CC_ARM )
+#else
+extern uint32_t Image$$RW_DATA_NC$$Base;
+extern uint32_t Image$$ZI_DATA_NC$$Base;
+#endif
+
+extern uint32_t Image$$VECTORS$$Limit;
+extern uint32_t Image$$RO_DATA$$Limit;
+extern uint32_t Image$$RW_DATA$$Limit;
+extern uint32_t Image$$ZI_DATA$$Limit;
+#if defined( __CC_ARM )
+#else
+extern uint32_t Image$$RW_DATA_NC$$Limit;
+extern uint32_t Image$$ZI_DATA_NC$$Limit;
+#endif
+
+#define VECTORS_SIZE    (((uint32_t)&Image$$VECTORS$$Limit >> 20) - ((uint32_t)&Image$$VECTORS$$Base >> 20) + 1)
+#define RO_DATA_SIZE    (((uint32_t)&Image$$RO_DATA$$Limit >> 20) - ((uint32_t)&Image$$RO_DATA$$Base >> 20) + 1)
+#define RW_DATA_SIZE    (((uint32_t)&Image$$RW_DATA$$Limit >> 20) - ((uint32_t)&Image$$RW_DATA$$Base >> 20) + 1)
+#define ZI_DATA_SIZE    (((uint32_t)&Image$$ZI_DATA$$Limit >> 20) - ((uint32_t)&Image$$ZI_DATA$$Base >> 20) + 1)
+#if defined( __CC_ARM )
+#else
+#define RW_DATA_NC_SIZE (((uint32_t)&Image$$RW_DATA_NC$$Limit >> 20) - ((uint32_t)&Image$$RW_DATA_NC$$Base >> 20) + 1)
+#define ZI_DATA_NC_SIZE (((uint32_t)&Image$$ZI_DATA_NC$$Limit >> 20) - ((uint32_t)&Image$$ZI_DATA_NC$$Base >> 20) + 1)
+#endif
+
+static uint32_t Sect_Normal;     //outer & inner wb/wa, non-shareable, executable, rw, domain 0, base addr 0
+static uint32_t Sect_Normal_NC;  //non-shareable, non-executable, rw, domain 0, base addr 0
+static uint32_t Sect_Normal_Cod; //outer & inner wb/wa, non-shareable, executable, ro, domain 0, base addr 0
+static uint32_t Sect_Normal_RO;  //as Sect_Normal_Cod, but not executable
+static uint32_t Sect_Normal_RW;  //as Sect_Normal_Cod, but writeable and not executable
+static uint32_t Sect_Device_RO;  //device, non-shareable, non-executable, ro, domain 0, base addr 0
+static uint32_t Sect_Device_RW;  //as Sect_Device_RO, but writeable
+
+/* Define global descriptors */
+static uint32_t Page_L1_4k  = 0x0;  //generic
+static uint32_t Page_L1_64k = 0x0;  //generic
+static uint32_t Page_4k_Device_RW;  //Shared device, not executable, rw, domain 0
+static uint32_t Page_64k_Device_RW; //Shared device, not executable, rw, domain 0
+
+void create_translation_table(void)
+{
+    mmu_region_attributes_Type region;
+
+    /*
+     * Generate descriptors. Refer to MBRZA1H.h to get information about attributes
+     *
+     */
+    //Create descriptors for Vectors, RO, RW, ZI sections
+    section_normal(Sect_Normal, region);
+    section_normal_cod(Sect_Normal_Cod, region);
+    section_normal_ro(Sect_Normal_RO, region);
+    section_normal_rw(Sect_Normal_RW, region);
+    //Create descriptors for peripherals
+    section_device_ro(Sect_Device_RO, region);
+    section_device_rw(Sect_Device_RW, region);
+    section_normal_nc(Sect_Normal_NC, region);
+    //Create descriptors for 64k pages
+    page64k_device_rw(Page_L1_64k, Page_64k_Device_RW, region);
+    //Create descriptors for 4k pages
+    page4k_device_rw(Page_L1_4k, Page_4k_Device_RW, region);
+
+    /*
+     *  Define MMU flat-map regions and attributes
+     *
+     */
+
+    //Create 4GB of faulting entries
+    __TTSection (&Image$$TTB$$ZI$$Base, 0, 4096, DESCRIPTOR_FAULT);
+
+    // R7S72100 memory map.
+    __TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_NORFLASH_BASE0    , 64, Sect_Normal_RO);
+    __TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_NORFLASH_BASE1    , 64, Sect_Normal_RO);
+    __TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_SDRAM_BASE0       , 64, Sect_Normal_RW);
+    __TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_SDRAM_BASE1       , 64, Sect_Normal_RW);
+    __TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_USER_AREA0        , 64, Sect_Normal_RW);
+    __TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_USER_AREA1        , 64, Sect_Normal_RW);
+    __TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_SPI_IO0           , 64, Sect_Normal_RO);
+    __TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_SPI_IO1           , 64, Sect_Normal_RO);
+    __TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_ONCHIP_SRAM_BASE  , 10, Sect_Normal_RW);
+    __TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_SPI_MIO_BASE      ,  1, Sect_Device_RW);
+    __TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_BSC_BASE          ,  1, Sect_Device_RW);
+    __TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_PERIPH_BASE0      ,  3, Sect_Device_RW);
+    __TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_PERIPH_BASE1      , 49, Sect_Device_RW);
+
+    //Define Image
+    __TTSection (&Image$$TTB$$ZI$$Base, (uint32_t)&Image$$RO_DATA$$Base, RO_DATA_SIZE, Sect_Normal_RO);
+    __TTSection (&Image$$TTB$$ZI$$Base, (uint32_t)&Image$$VECTORS$$Base, VECTORS_SIZE, Sect_Normal_Cod);
+    __TTSection (&Image$$TTB$$ZI$$Base, (uint32_t)&Image$$RW_DATA$$Base, RW_DATA_SIZE, Sect_Normal_RW);
+    __TTSection (&Image$$TTB$$ZI$$Base, (uint32_t)&Image$$ZI_DATA$$Base, ZI_DATA_SIZE, Sect_Normal_RW);
+#if defined( __CC_ARM )
+    __TTSection (&Image$$TTB$$ZI$$Base, Renesas_RZ_A1_ONCHIP_SRAM_NC_BASE,         10, Sect_Normal_NC);
+#else
+    __TTSection (&Image$$TTB$$ZI$$Base, (uint32_t)&Image$$RW_DATA_NC$$Base, RW_DATA_NC_SIZE, Sect_Normal_NC);
+    __TTSection (&Image$$TTB$$ZI$$Base, (uint32_t)&Image$$ZI_DATA_NC$$Base, ZI_DATA_NC_SIZE, Sect_Normal_NC);
+#endif
+
+    /* Set location of level 1 page table
+    ; 31:14 - Translation table base addr (31:14-TTBCR.N, TTBCR.N is 0 out of reset)
+    ; 13:7  - 0x0
+    ; 6     - IRGN[0] 0x0 (Inner WB WA)
+    ; 5     - NOS     0x0 (Non-shared)
+    ; 4:3   - RGN     0x1 (Outer WB WA)
+    ; 2     - IMP     0x0 (Implementation Defined)
+    ; 1     - S       0x0 (Non-shared)
+    ; 0     - IRGN[1] 0x1 (Inner WB WA) */
+    __set_TTBR0(((uint32_t)&Image$$TTB$$ZI$$Base) | 9);
+
+    /* Set up domain access control register
+    ; We set domain 0 to Client and all other domains to No Access.
+    ; All translation table entries specify domain 0 */
+    __set_DACR(1);
+}
+
+
+/*----------------------------------------------------------------------------
+ * end of file
+ *---------------------------------------------------------------------------*/
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/nvic_wrapper.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/nvic_wrapper.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/nvic_wrapper.c	(revision 270)
@@ -0,0 +1,229 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2015 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/**************************************************************************//**
+* @file         nvic_wrapper.c
+* $Rev:  $
+* $Date:: $
+* @brief        Wrapper between NVIC(for Cortex-M) and GIC(for Cortex-A9)
+******************************************************************************/
+
+/******************************************************************************
+Includes   <System Includes> , "Project Includes"
+******************************************************************************/
+#include "MBRZA1H.h"
+#include "wdt_iodefine.h"
+#include "nvic_wrapper.h"
+#include "gic.h"
+
+/******************************************************************************
+Typedef definitions
+******************************************************************************/
+
+/******************************************************************************
+Macro definitions
+******************************************************************************/
+#define PRIO_BITS            (7)   /* Set binary point to 0 in gic.c */
+#define WDT_WTCNT_WRITE      (0x5A00)
+#define WDT_WTCSR_WRITE      (0xA500)
+#define WDT_WRCSR_WOVF_WRITE (0xA500)
+#define WDT_WRCSR_RSTE_WRITE (0x5A00)
+
+/******************************************************************************
+Imported global variables and functions (from other files)
+******************************************************************************/
+
+/******************************************************************************
+Exported global variables and functions (to be accessed by other files)
+******************************************************************************/
+
+/******************************************************************************
+Private global variables and functions
+******************************************************************************/
+
+
+
+/* ##########################   NVIC functions  #################################### */
+void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
+{
+    GIC_SetBinaryPoint(PriorityGroup);
+}
+
+
+uint32_t NVIC_GetPriorityGrouping(void)
+{
+    return GIC_GetBinaryPoint(0);
+}
+
+
+void NVIC_EnableIRQ(IRQn_Type IRQn)
+{
+    GIC_EnableIRQ(IRQn);
+}
+
+
+void NVIC_DisableIRQ(IRQn_Type IRQn)
+{
+    GIC_DisableIRQ(IRQn);
+}
+
+
+uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
+{
+    uint32_t pending;
+    
+    pending = GIC_GetIRQStatus(IRQn);
+    pending = (pending & 0x00000001);
+    
+    return pending;
+}
+
+
+void NVIC_SetPendingIRQ(IRQn_Type IRQn)
+{
+    GIC_SetPendingIRQ(IRQn);
+}
+
+
+void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
+{
+    GIC_ClearPendingIRQ(IRQn);
+}
+
+
+uint32_t NVIC_GetActive(IRQn_Type IRQn)
+{
+    uint32_t active;
+    
+    active = GIC_GetIRQStatus(IRQn);
+    active = ((active >> 1) & 0x00000001);
+    
+    return active;
+}
+
+
+void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
+{
+    GIC_SetPriority(IRQn, (priority << 3));
+}
+
+
+uint32_t NVIC_GetPriority(IRQn_Type IRQn)
+{
+    uint32_t priority_field;
+    
+    priority_field = GIC_GetPriority(IRQn);
+    priority_field = (priority_field >> 3);
+    return priority_field;
+}
+
+
+uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)
+{
+    uint32_t PriorityGroupTmp = (PriorityGroup & 0x07);          /* only values 0..7 are used          */
+    uint32_t PreemptPriorityBits;
+    uint32_t SubPriorityBits;
+
+    PreemptPriorityBits = ((7 - PriorityGroupTmp) > PRIO_BITS) ? PRIO_BITS : 7 - PriorityGroupTmp;
+    SubPriorityBits     = ((PriorityGroupTmp + PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + PRIO_BITS;
+
+    return (
+             ((PreemptPriority & ((1 << (PreemptPriorityBits)) - 1)) << SubPriorityBits) |
+             ((SubPriority     & ((1 << (SubPriorityBits    )) - 1)))
+           );
+}
+
+
+void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority)
+{
+    uint32_t PriorityGroupTmp = (PriorityGroup & 0x07);          /* only values 0..7 are used          */
+    uint32_t PreemptPriorityBits;
+    uint32_t SubPriorityBits;
+
+    PreemptPriorityBits = ((7 - PriorityGroupTmp) > PRIO_BITS) ? PRIO_BITS : 7 - PriorityGroupTmp;
+    SubPriorityBits     = ((PriorityGroupTmp + PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + PRIO_BITS;
+
+    *pPreemptPriority = (Priority >> SubPriorityBits) & ((1 << (PreemptPriorityBits)) - 1);
+    *pSubPriority     = (Priority                   ) & ((1 << (SubPriorityBits    )) - 1);
+}
+
+void NVIC_SystemReset(void)
+{
+    uint16_t reg;
+    uint8_t  dummy_read;
+    /* Use Watch Dog Timer to system reset */
+    
+    /* Set WT/IT bit of WTCSR to 1 = Watch Dog */
+    /* CLK = 000, 1xP0phi(=33.3333MHz) = 7.7us */
+    reg = (WDT_WTCSR_WRITE | 0x0058);
+    WDTWTCSR = reg;
+    
+    /* Clear Count reg */
+    reg = (WDT_WTCNT_WRITE | 0x0000);
+    WDTWTCNT = reg;
+    
+    /* Clear WOVF flag */
+    dummy_read = WDTWRCSR;
+    reg = (WDT_WRCSR_WOVF_WRITE | (dummy_read & 0x0000));
+    WDTWRCSR = reg;
+    /* Enable Internal Reset */
+    reg = (WDT_WRCSR_RSTE_WRITE | 0x005F);
+    WDTWRCSR = reg;
+    
+    /* Watch Dog start */
+    reg = (WDT_WTCSR_WRITE | 0x0078);
+    WDTWTCSR = reg;
+    
+    while(1);                      /* wait Internal Reset */
+}
+
+/* ##################################    SysTick function  ############################################ */
+uint32_t SysTick_Config(uint32_t ticks)
+{
+    /* Not support this function */
+    /* Use mbed Ticker */
+    return (1);     /* impossible */
+}
+
+
+/* ##################################### Debug In/Output function ########################################### */
+uint32_t ITM_SendChar (uint32_t ch)
+{
+    /* Not support this function */
+    /* Use mbed Serial */
+    return (ch);
+}
+
+
+int32_t ITM_ReceiveChar (void) {
+    /* Not support this function */
+    /* Use mbed Serial */
+    return (-1);    /* no character available */
+}
+
+
+int32_t ITM_CheckChar (void) {
+    /* Not support this function */
+    /* Use mbed Serial */
+    return (0);                                 /* no character available */
+}
+
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/nvic_wrapper.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/nvic_wrapper.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/nvic_wrapper.h	(revision 270)
@@ -0,0 +1,84 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2015 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/**************************************************************************//**
+* @file         nvic_wrapper.h
+* $Rev:  $
+* $Date:: $
+* @brief        Wrapper between NVIC(for Cortex-M) and GIC(for Cortex-A9)
+******************************************************************************/
+
+#ifndef NVIC_WRAPPER_H
+#define NVIC_WRAPPER_H
+
+
+/******************************************************************************
+Includes   <System Includes> , "Project Includes"
+******************************************************************************/
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+/******************************************************************************
+Typedef definitions
+******************************************************************************/
+
+/******************************************************************************
+Macro definitions
+******************************************************************************/
+
+/******************************************************************************
+Variable Externs
+******************************************************************************/
+
+/******************************************************************************
+Functions Prototypes
+******************************************************************************/
+
+/* NVIC functions */
+void     NVIC_SetPriorityGrouping(uint32_t PriorityGroup);
+uint32_t NVIC_GetPriorityGrouping(void);
+void     NVIC_EnableIRQ(IRQn_Type IRQn);
+void     NVIC_DisableIRQ(IRQn_Type IRQn);
+uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn);
+void     NVIC_SetPendingIRQ(IRQn_Type IRQn);
+void     NVIC_ClearPendingIRQ(IRQn_Type IRQn);
+uint32_t NVIC_GetActive(IRQn_Type IRQn);
+void     NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority);
+uint32_t NVIC_GetPriority(IRQn_Type IRQn);
+uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority);
+void     NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority);
+void     NVIC_SystemReset(void);
+/* SysTick function */
+uint32_t SysTick_Config(uint32_t ticks);
+/* Debug In/Output function */
+uint32_t ITM_SendChar (uint32_t ch);
+int32_t  ITM_ReceiveChar (void);
+int32_t  ITM_CheckChar (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* NVIC_WRAPPER_H */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/pl310.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/pl310.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/pl310.c	(revision 270)
@@ -0,0 +1,128 @@
+/**************************************************************************//**
+ * @file     pl310.c
+ * @brief    Implementation of PL310 PrimeCell Level 2 Cache Controller functions
+ * @version
+ * @date     3 December 2014
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2011 - 2013 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+#include "MBRZA1H.h"
+
+//Cache Sync operation
+void PL310_Sync(void)
+{
+    PL310->CACHE_SYNC = 0x0;
+}
+
+//return Cache controller cache ID
+int PL310_GetID (void)
+{
+    return PL310->CACHE_ID;
+}
+
+//return Cache controller cache Type
+int PL310_GetType (void)
+{
+    return PL310->CACHE_TYPE;
+}
+
+//Invalidate all cache by way
+void PL310_InvAllByWay (void)
+{
+    unsigned int assoc;
+
+    if (PL310->AUX_CNT & (1<<16))
+        assoc = 16;
+    else
+        assoc =  8;
+
+    PL310->INV_WAY = (1 << assoc) - 1;
+    while(PL310->INV_WAY & ((1 << assoc) - 1)); //poll invalidate
+
+    PL310_Sync();
+}
+
+//Clean and Invalidate all cache by way
+void PL310_CleanInvAllByWay (void)
+{
+    unsigned int assoc;
+
+    if (PL310->AUX_CNT & (1<<16))
+        assoc = 16;
+    else
+        assoc =  8;
+
+    PL310->CLEAN_INV_WAY = (1 << assoc) - 1;
+    while(PL310->CLEAN_INV_WAY & ((1 << assoc) - 1)); //poll invalidate
+
+    PL310_Sync();
+}
+
+//Enable Cache
+void PL310_Enable(void)
+{
+    PL310->CONTROL = 0;
+    PL310->INTERRUPT_CLEAR = 0x000001FFuL;
+    PL310->DEBUG_CONTROL = 0;
+    PL310->DATA_LOCK_0_WAY = 0;
+    PL310->CACHE_SYNC = 0;
+
+    PL310->CONTROL = 0x01;
+    PL310_Sync();
+}
+//Disable Cache
+void PL310_Disable(void)
+{
+    PL310->CONTROL = 0x00;
+    PL310_Sync();
+}
+
+//Invalidate cache by physical address
+void PL310_InvPa (void *pa)
+{
+    PL310->INV_LINE_PA = (unsigned int)pa;
+    PL310_Sync();
+}
+
+//Clean cache by physical address
+void PL310_CleanPa (void *pa)
+{
+    PL310->CLEAN_LINE_PA = (unsigned int)pa;
+    PL310_Sync();
+}
+
+//Clean and invalidate cache by physical address
+void PL310_CleanInvPa (void *pa)
+{
+    PL310->CLEAN_INV_LINE_PA = (unsigned int)pa;
+    PL310_Sync();
+}
+
+
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/pl310.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/pl310.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/pl310.h	(revision 270)
@@ -0,0 +1,114 @@
+/**************************************************************************//**
+ * @file     pl310.h
+ * @brief    Implementation of pl310 functions
+ * @version
+ * @date     11 June 2013
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2011 - 2013 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+#ifndef __PL310
+#define __PL310
+
+typedef struct
+{
+  __I  uint32_t CACHE_ID;                   /*!< Offset: 0x0000   Cache ID Register               */
+  __I  uint32_t CACHE_TYPE;                 /*!< Offset: 0x0004   Cache Type Register             */
+       uint32_t RESERVED0[0x3e];
+  __IO uint32_t CONTROL;                    /*!< Offset: 0x0100   Control Register                */
+  __IO uint32_t AUX_CNT;                    /*!< Offset: 0x0104   Auxiliary Control               */
+       uint32_t RESERVED1[0x3e];
+  __IO uint32_t EVENT_CONTROL;              /*!< Offset: 0x0200   Event Counter Control           */
+  __IO uint32_t EVENT_COUNTER1_CONF;        /*!< Offset: 0x0204   Event Counter 1 Configuration   */
+  __IO uint32_t EVENT_COUNTER0_CONF;        /*!< Offset: 0x0208   Event Counter 1 Configuration   */
+       uint32_t RESERVED2[0x2];
+  __IO uint32_t INTERRUPT_MASK;             /*!< Offset: 0x0214   Interrupt Mask                  */
+  __I  uint32_t MASKED_INT_STATUS;          /*!< Offset: 0x0218   Masked Interrupt Status         */
+  __I  uint32_t RAW_INT_STATUS;             /*!< Offset: 0x021c   Raw Interrupt Status            */
+  __O  uint32_t INTERRUPT_CLEAR;            /*!< Offset: 0x0220   Interrupt Clear                 */
+       uint32_t RESERVED3[0x143];
+  __IO uint32_t CACHE_SYNC;                 /*!< Offset: 0x0730   Cache Sync                      */
+       uint32_t RESERVED4[0xf];
+  __IO uint32_t INV_LINE_PA;                /*!< Offset: 0x0770   Invalidate Line By PA           */
+       uint32_t RESERVED6[2];
+  __IO uint32_t INV_WAY;                    /*!< Offset: 0x077c   Invalidate by Way               */
+       uint32_t RESERVED5[0xc];
+  __IO uint32_t CLEAN_LINE_PA;              /*!< Offset: 0x07b0   Clean Line by PA                */
+       uint32_t RESERVED7[1];
+  __IO uint32_t CLEAN_LINE_INDEX_WAY;       /*!< Offset: 0x07b8   Clean Line by Index/Way         */
+  __IO uint32_t CLEAN_WAY;                  /*!< Offset: 0x07bc   Clean by Way                    */
+       uint32_t RESERVED8[0xc];
+  __IO uint32_t CLEAN_INV_LINE_PA;          /*!< Offset: 0x07f0   Clean and Invalidate Line by PA  */
+       uint32_t RESERVED9[1];
+  __IO uint32_t CLEAN_INV_LINE_INDEX_WAY;   /*!< Offset: 0x07f8   Clean and Invalidate Line by Index/Way  */
+  __IO uint32_t CLEAN_INV_WAY;              /*!< Offset: 0x07fc   Clean and Invalidate by Way     */
+       uint32_t RESERVED10[0x40];
+  __IO uint32_t DATA_LOCK_0_WAY;            /*!< Offset: 0x0900   Data Lockdown 0 by Way          */
+  __IO uint32_t INST_LOCK_0_WAY;            /*!< Offset: 0x0904   Instruction Lockdown 0 by Way   */
+  __IO uint32_t DATA_LOCK_1_WAY;            /*!< Offset: 0x0908   Data Lockdown 1 by Way          */
+  __IO uint32_t INST_LOCK_1_WAY;            /*!< Offset: 0x090c   Instruction Lockdown 1 by Way   */
+  __IO uint32_t DATA_LOCK_2_WAY;            /*!< Offset: 0x0910   Data Lockdown 2 by Way          */
+  __IO uint32_t INST_LOCK_2_WAY;            /*!< Offset: 0x0914   Instruction Lockdown 2 by Way   */
+  __IO uint32_t DATA_LOCK_3_WAY;            /*!< Offset: 0x0918   Data Lockdown 3 by Way          */
+  __IO uint32_t INST_LOCK_3_WAY;            /*!< Offset: 0x091c   Instruction Lockdown 3 by Way   */
+  __IO uint32_t DATA_LOCK_4_WAY;            /*!< Offset: 0x0920   Data Lockdown 4 by Way          */
+  __IO uint32_t INST_LOCK_4_WAY;            /*!< Offset: 0x0924   Instruction Lockdown 4 by Way   */
+  __IO uint32_t DATA_LOCK_5_WAY;            /*!< Offset: 0x0928   Data Lockdown 5 by Way          */
+  __IO uint32_t INST_LOCK_5_WAY;            /*!< Offset: 0x092c   Instruction Lockdown 5 by Way   */
+  __IO uint32_t DATA_LOCK_6_WAY;            /*!< Offset: 0x0930   Data Lockdown 5 by Way          */
+  __IO uint32_t INST_LOCK_6_WAY;            /*!< Offset: 0x0934   Instruction Lockdown 5 by Way   */
+  __IO uint32_t DATA_LOCK_7_WAY;            /*!< Offset: 0x0938   Data Lockdown 6 by Way          */
+  __IO uint32_t INST_LOCK_7_WAY;            /*!< Offset: 0x093c   Instruction Lockdown 6 by Way   */
+       uint32_t RESERVED11[0x4];
+  __IO uint32_t LOCK_LINE_EN;               /*!< Offset: 0x0950   Lockdown by Line Enable         */
+  __IO uint32_t UNLOCK_ALL_BY_WAY;          /*!< Offset: 0x0954   Unlock All Lines by Way         */
+       uint32_t RESERVED12[0xaa];
+  __IO uint32_t ADDRESS_FILTER_START;       /*!< Offset: 0x0c00   Address Filtering Start         */
+  __IO uint32_t ADDRESS_FILTER_END;         /*!< Offset: 0x0c04   Address Filtering End           */
+       uint32_t RESERVED13[0xce];
+  __IO uint32_t DEBUG_CONTROL;              /*!< Offset: 0x0f40   Debug Control Register          */
+
+} PL310_TypeDef;
+
+#define PL310           ((PL310_TypeDef *)Renesas_RZ_A1_PL310_BASE) /*!< PL310 Declaration */
+
+extern int PL310_GetID (void);
+extern int PL310_GetType (void);
+extern void PL310_InvAllByWay (void);
+extern void PL310_CleanInvAllByWay(void);
+extern void PL310_Enable(void);
+extern void PL310_Disable(void);
+extern void PL310_InvPa (void *);
+extern void PL310_CleanPa (void *);
+extern void PL310_CleanInvPa (void *);
+
+#endif
+
+
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/r_typedefs.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/r_typedefs.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/r_typedefs.h	(revision 270)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2013 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name : r_typedefs.h
+* $Rev: 788 $
+* $Date:: 2014-04-07 18:57:13 +0900#$
+* Description : basic type definition
+******************************************************************************/
+#ifndef R_TYPEDEFS_H
+#define R_TYPEDEFS_H
+
+/******************************************************************************
+Includes <System Includes> , "Project Includes"
+******************************************************************************/
+#include <stddef.h>
+#include <stdbool.h>
+#include <stdint.h>
+
+#if defined(__ARM_NEON__)
+
+#include <arm_neon.h>
+
+#else /* __ARM_NEON__ */
+
+typedef float               float32_t;
+typedef double              float64_t;
+
+#endif /* __ARM_NEON__ */
+
+/******************************************************************************
+Typedef definitions
+******************************************************************************/
+typedef char                char_t;
+typedef int                 bool_t;
+typedef int                 int_t;
+typedef long double         float128_t;
+typedef signed long         long_t;
+typedef unsigned long       ulong_t;
+
+#endif /* R_TYPEDEFS_H */
+
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/rza_io_regrw.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/rza_io_regrw.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/rza_io_regrw.c	(revision 270)
@@ -0,0 +1,200 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+/*******************************************************************************
+* File Name   : rza_io_regrw.c
+* $Rev: 1121 $
+* $Date:: 2014-08-06 17:09:53 +0900#$
+* Description : Low level register read/write
+*******************************************************************************/
+
+/******************************************************************************
+Includes   <System Includes> , "Project Includes"
+******************************************************************************/
+#include "r_typedefs.h"
+
+#ifdef __CC_ARM
+#pragma arm section code   = "CODE_IO_REGRW"
+#pragma arm section rodata = "CONST_IO_REGRW"
+#pragma arm section rwdata = "DATA_IO_REGRW"
+#pragma arm section zidata = "BSS_IO_REGRW"
+#endif
+
+/******************************************************************************
+Typedef definitions
+******************************************************************************/
+
+
+/******************************************************************************
+Macro definitions
+******************************************************************************/
+
+
+/******************************************************************************
+Imported global variables and functions (from other files)
+******************************************************************************/
+
+
+/******************************************************************************
+Exported global variables and functions (to be accessed by other files)
+******************************************************************************/
+
+
+/******************************************************************************
+Private global variables and functions
+******************************************************************************/
+
+
+/******************************************************************************
+* Function Name: RZA_IO_RegWrite_8
+* Description  : IO register 8-bit write
+* Arguments    : volatile uint8_t * ioreg : IO register for writing
+*              :                          : Use register definition name of the
+*              :                          : iodefine.h
+*              : uint8_t write_value      : Write value for the IO register
+*              : uint8_t shift            : The number of left shifts to the 
+*              :                          : target bit
+*              : uint8_t mask             : Mask value for the IO register
+*              :                          : (Target bit : "1")
+* Return Value : None
+******************************************************************************/
+void RZA_IO_RegWrite_8(volatile uint8_t * ioreg, uint8_t write_value, uint8_t shift, uint8_t mask)
+{
+    uint8_t reg_value;
+
+    reg_value = *ioreg;                                         /* Read from register */
+    reg_value = (reg_value & (~mask)) | (write_value << shift); /* Modify value       */
+    *ioreg    = reg_value;                                      /* Write to register  */
+}
+
+/******************************************************************************
+* Function Name: RZA_IO_RegWrite_16
+* Description  : IO register 16-bit write
+* Arguments    : volatile uint16_t * ioreg : IO register for writing
+*              :                           : Use register definition name of the
+*              :                           : iodefine.h
+*              : uint16_t write_value      : Write value for the IO register
+*              : uint16_t shift            : The number of left shifts to the 
+*              :                           : target bit
+*              : uint16_t mask             : Mask value for the IO register
+*              :                           : (Target bit : "1")
+* Return Value : None
+******************************************************************************/
+void RZA_IO_RegWrite_16(volatile uint16_t * ioreg, uint16_t write_value, uint16_t shift, uint16_t mask)
+{
+    uint16_t reg_value;
+
+    reg_value = *ioreg;                                         /* Read from register */
+    reg_value = (reg_value & (~mask)) | (write_value << shift); /* Modify value       */
+    *ioreg    = reg_value;                                      /* Write to register  */
+}
+
+/******************************************************************************
+* Function Name: RZA_IO_RegWrite_32
+* Description  : IO register 32-bit write
+* Arguments    : volatile uint32_t * ioreg : IO register for writing
+*              :                           : Use register definition name of the
+*              :                           : iodefine.h
+*              : uint32_t write_value      : Write value for the IO register
+*              : uint32_t shift            : The number of left shifts to the 
+*              :                           : target bit
+*              : uint32_t mask             : Mask value for the IO register
+*              :                           : (Target bit : "1")
+* Return Value : None
+******************************************************************************/
+void RZA_IO_RegWrite_32(volatile uint32_t * ioreg, uint32_t write_value, uint32_t shift, uint32_t mask)
+{
+    uint32_t reg_value;
+
+    reg_value = *ioreg;                                         /* Read from register */
+    reg_value = (reg_value & (~mask)) | (write_value << shift); /* Modify value       */
+    *ioreg    = reg_value;                                      /* Write to register  */
+}
+
+/******************************************************************************
+* Function Name: RZA_IO_RegRead_8
+* Description  : IO register 8-bit read
+* Arguments    : volatile uint8_t * ioreg : IO register for reading
+*              :                          : Use register definition name of the 
+*              :                          : iodefine.h
+*              : uint8_t shift            : The number of right shifts to the 
+*              :                          : target bit
+*              : uint8_t mask             : Mask bit for the IO register
+*              :                          : (Target bit: "1")
+* Return Value : uint8_t : Value of the obtained target bit
+******************************************************************************/
+uint8_t RZA_IO_RegRead_8(volatile uint8_t * ioreg, uint8_t shift, uint8_t mask)
+{
+    uint8_t reg_value;
+
+    reg_value = *ioreg;                         /* Read from register            */
+    reg_value = (reg_value & mask) >> shift;    /* Clear other bit and Bit shift */
+
+    return reg_value;
+}
+
+/******************************************************************************
+* Function Name: RZA_IO_RegRead_16
+* Description  : IO register 16-bit read
+* Arguments    : volatile uint16_t * ioreg : IO register for reading
+*              :                           : Use register definition name of the 
+*              :                           : iodefine.h
+*              : uint16_t shift            : The number of right shifts to the 
+*              :                           : target bit
+*              : uint16_t mask             : Mask bit for the IO register
+*              :                           : (Target bit: "1")
+* Return Value : uint16_t : Value of the obtained target bit
+******************************************************************************/
+uint16_t RZA_IO_RegRead_16(volatile uint16_t * ioreg, uint16_t shift, uint16_t mask)
+{
+    uint16_t reg_value;
+
+    reg_value = *ioreg;                         /* Read from register            */
+    reg_value = (reg_value & mask) >> shift;    /* Clear other bit and Bit shift */
+
+    return reg_value;
+}
+
+/******************************************************************************
+* Function Name: RZA_IO_RegRead_32
+* Description  : IO register 32-bit read
+* Arguments    : volatile uint32_t * ioreg : IO register for reading
+*              :                           : Use register definition name of the 
+*              :                           : iodefine.h
+*              : uint32_t shift            : The number of right shifts to the 
+*              :                           : target bit
+*              : uint32_t mask             : Mask bit for the IO register
+*              :                           : (Target bit: "1")
+* Return Value : uint32_t : Value of the obtained target bit
+******************************************************************************/
+uint32_t RZA_IO_RegRead_32(volatile uint32_t * ioreg, uint32_t shift, uint32_t mask)
+{
+    uint32_t reg_value;
+
+    reg_value = *ioreg;                         /* Read from register            */
+    reg_value = (reg_value & mask) >> shift;    /* Clear other bit and Bit shift */
+
+    return reg_value;
+}
+
+
+/* End of File */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/system_MBRZA1H.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/system_MBRZA1H.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/system_MBRZA1H.c	(revision 270)
@@ -0,0 +1,452 @@
+/**************************************************************************//**
+ * @file     system_MBRZA1H.c
+ * @brief    CMSIS Device System Source File for
+ *           ARM Cortex-A9 Device Series
+ * @version  V1.00
+ * @date     09 January 2015
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2011 - 2015 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+
+#include <stdint.h>
+#include "MBRZA1H.h"
+#include "RZ_A1_Init.h"
+
+
+#if defined(__ARMCC_VERSION)
+extern void $Super$$main(void);
+__asm void FPUEnable(void);
+#else 
+void FPUEnable(void); 
+
+#endif
+
+extern uint32_t IRQNestLevel;
+unsigned char seen_id0_active = 0; // single byte to hold a flag used in the workaround for GIC errata 733075
+
+
+/**
+ * Initialize the cache.
+ *
+ * @param  none
+ * @return none
+ *
+ * @brief Initialise caches. Requires PL1, so implemented as an SVC in case threads are USR mode.
+ */
+#if defined(__ARMCC_VERSION)
+#pragma push
+#pragma arm
+
+void InitMemorySubsystem(void) {
+
+    /* This SVC is specific for reset where data / tlb / btac may contain undefined data, therefore before
+     * enabling the cache you must invalidate the instruction cache, the data cache, TLB, and BTAC.
+     * You are not required to invalidate the main TLB, even though it is recommended for safety
+     * reasons. This ensures compatibility with future revisions of the processor. */
+
+    unsigned int l2_id;
+
+    /* Invalidate undefined data */
+    __ca9u_inv_tlb_all();
+    __v7_inv_icache_all();
+    __v7_inv_dcache_all();
+    __v7_inv_btac();
+
+    /* Don't use this function during runtime since caches may contain valid data. For a correct cache maintenance you may need to execute a clean and
+     * invalidate in order to flush the valid data to the next level cache.
+     */
+    __enable_mmu();
+
+    /* After MMU is enabled and data has been invalidated, enable caches and BTAC */
+    __enable_caches();
+    __enable_btac();
+
+    /* If present, you may also need to Invalidate and Enable L2 cache here */
+    l2_id = PL310_GetID();
+    if (l2_id)
+    {
+       PL310_InvAllByWay();
+       PL310_Enable();
+    }
+}
+#pragma pop
+
+#elif defined(__GNUC__) 
+
+void InitMemorySubsystem(void) { 
+ 
+    /* This SVC is specific for reset where data / tlb / btac may contain undefined data, therefore before 
+     * enabling the cache you must invalidate the instruction cache, the data cache, TLB, and BTAC. 
+     * You are not required to invalidate the main TLB, even though it is recommended for safety 
+     * reasons. This ensures compatibility with future revisions of the processor. */ 
+ 
+    unsigned int l2_id; 
+ 
+    /* Invalidate undefined data */ 
+    __ca9u_inv_tlb_all(); 
+    __v7_inv_icache_all(); 
+    __v7_inv_dcache_all(); 
+    __v7_inv_btac(); 
+ 
+    /* Don't use this function during runtime since caches may contain valid data. For a correct cache maintenance you may need to execute a clean and 
+     * invalidate in order to flush the valid data to the next level cache. 
+     */ 
+    __enable_mmu(); 
+ 
+    /* After MMU is enabled and data has been invalidated, enable caches and BTAC */ 
+    __enable_caches(); 
+    __enable_btac(); 
+ 
+    /* If present, you may also need to Invalidate and Enable L2 cache here */ 
+    l2_id = PL310_GetID(); 
+    if (l2_id) 
+    { 
+       PL310_InvAllByWay(); 
+       PL310_Enable(); 
+    } 
+} 
+#else 
+
+#endif 
+
+
+extern IRQHandler IRQTable[Renesas_RZ_A1_IRQ_MAX+1];
+
+uint32_t IRQCount = sizeof IRQTable / 4;
+
+uint32_t InterruptHandlerRegister (IRQn_Type irq, IRQHandler handler)
+{
+    if (irq < IRQCount) {
+        IRQTable[irq] = handler;
+        return 0;
+    }
+    else {
+        return 1;
+    }
+}
+
+uint32_t InterruptHandlerUnregister (IRQn_Type irq)
+{
+    if (irq < IRQCount) {
+        IRQTable[irq] = 0;
+        return 0;
+    }
+    else {
+        return 1;
+    }
+}
+
+/**
+ * Initialize the system
+ *
+ * @param  none
+ * @return none
+ *
+ * @brief  Setup the microcontroller system.
+ *         Initialize the System.
+ */
+void SystemInit (void)
+{
+    IRQNestLevel = 0;
+/*       do not use global variables because this function is called before
+         reaching pre-main. RW section maybe overwritten afterwards.          */
+    RZ_A1_InitClock();
+    RZ_A1_InitBus();
+
+	//Configure GIC ICDICFR GIC_SetICDICFR()
+    GIC_Enable();
+    __enable_irq();
+
+}
+
+
+//Fault Status Register (IFSR/DFSR) definitions
+#define FSR_ALIGNMENT_FAULT                  0x01   //DFSR only. Fault on first lookup
+#define FSR_INSTRUCTION_CACHE_MAINTENANCE    0x04   //DFSR only - async/external
+#define FSR_SYNC_EXT_TTB_WALK_FIRST          0x0c   //sync/external
+#define FSR_SYNC_EXT_TTB_WALK_SECOND         0x0e   //sync/external
+#define FSR_SYNC_PARITY_TTB_WALK_FIRST       0x1c   //sync/external
+#define FSR_SYNC_PARITY_TTB_WALK_SECOND      0x1e   //sync/external
+#define FSR_TRANSLATION_FAULT_FIRST          0x05   //MMU Fault - internal
+#define FSR_TRANSLATION_FAULT_SECOND         0x07   //MMU Fault - internal
+#define FSR_ACCESS_FLAG_FAULT_FIRST          0x03   //MMU Fault - internal
+#define FSR_ACCESS_FLAG_FAULT_SECOND         0x06   //MMU Fault - internal
+#define FSR_DOMAIN_FAULT_FIRST               0x09   //MMU Fault - internal
+#define FSR_DOMAIN_FAULT_SECOND              0x0b   //MMU Fault - internal
+#define FSR_PERMISION_FAULT_FIRST            0x0f   //MMU Fault - internal
+#define FSR_PERMISION_FAULT_SECOND           0x0d   //MMU Fault - internal
+#define FSR_DEBUG_EVENT                      0x02   //internal
+#define FSR_SYNC_EXT_ABORT                   0x08   //sync/external
+#define FSR_TLB_CONFLICT_ABORT               0x10   //sync/external
+#define FSR_LOCKDOWN                         0x14   //internal
+#define FSR_COPROCESSOR_ABORT                0x1a   //internal
+#define FSR_SYNC_PARITY_ERROR                0x19   //sync/external
+#define FSR_ASYNC_EXTERNAL_ABORT             0x16   //DFSR only - async/external
+#define FSR_ASYNC_PARITY_ERROR               0x18   //DFSR only - async/external
+
+void CDAbtHandler(uint32_t DFSR, uint32_t DFAR, uint32_t LR) {
+    uint32_t FS = (DFSR & (1 << 10)) >> 6 | (DFSR & 0x0f); //Store Fault Status
+
+    switch(FS) {
+        //Synchronous parity errors - retry
+        case FSR_SYNC_PARITY_ERROR:
+        case FSR_SYNC_PARITY_TTB_WALK_FIRST:
+        case FSR_SYNC_PARITY_TTB_WALK_SECOND:
+            return;
+
+        //Your code here. Value in DFAR is invalid for some fault statuses.
+        case FSR_ALIGNMENT_FAULT:
+        case FSR_INSTRUCTION_CACHE_MAINTENANCE:
+        case FSR_SYNC_EXT_TTB_WALK_FIRST:
+        case FSR_SYNC_EXT_TTB_WALK_SECOND:
+        case FSR_TRANSLATION_FAULT_FIRST:
+        case FSR_TRANSLATION_FAULT_SECOND:
+        case FSR_ACCESS_FLAG_FAULT_FIRST:
+        case FSR_ACCESS_FLAG_FAULT_SECOND:
+        case FSR_DOMAIN_FAULT_FIRST:
+        case FSR_DOMAIN_FAULT_SECOND:
+        case FSR_PERMISION_FAULT_FIRST:
+        case FSR_PERMISION_FAULT_SECOND:
+        case FSR_DEBUG_EVENT:
+        case FSR_SYNC_EXT_ABORT:
+        case FSR_TLB_CONFLICT_ABORT:
+        case FSR_LOCKDOWN:
+        case FSR_COPROCESSOR_ABORT:
+        case FSR_ASYNC_EXTERNAL_ABORT: //DFAR invalid
+        case FSR_ASYNC_PARITY_ERROR:   //DFAR invalid
+        default:
+        	_kernel_default_exc_handler();
+    }
+}
+
+void CPAbtHandler(uint32_t IFSR, uint32_t IFAR, uint32_t LR) {
+    uint32_t FS = (IFSR & (1 << 10)) >> 6 | (IFSR & 0x0f); //Store Fault Status
+
+    switch(FS) {
+        //Synchronous parity errors - retry
+        case FSR_SYNC_PARITY_ERROR:
+        case FSR_SYNC_PARITY_TTB_WALK_FIRST:
+        case FSR_SYNC_PARITY_TTB_WALK_SECOND:
+            return;
+
+        //Your code here. Value in IFAR is invalid for some fault statuses.
+        case FSR_SYNC_EXT_TTB_WALK_FIRST:
+        case FSR_SYNC_EXT_TTB_WALK_SECOND:
+        case FSR_TRANSLATION_FAULT_FIRST:
+        case FSR_TRANSLATION_FAULT_SECOND:
+        case FSR_ACCESS_FLAG_FAULT_FIRST:
+        case FSR_ACCESS_FLAG_FAULT_SECOND:
+        case FSR_DOMAIN_FAULT_FIRST:
+        case FSR_DOMAIN_FAULT_SECOND:
+        case FSR_PERMISION_FAULT_FIRST:
+        case FSR_PERMISION_FAULT_SECOND:
+        case FSR_DEBUG_EVENT: //IFAR invalid
+        case FSR_SYNC_EXT_ABORT:
+        case FSR_TLB_CONFLICT_ABORT:
+        case FSR_LOCKDOWN:
+        case FSR_COPROCESSOR_ABORT:
+        default:
+            _kernel_default_exc_handler();
+    }
+}
+
+//returns amount to decrement lr by
+//this will be 0 when we have emulated the instruction and want to execute the next instruction
+//this will be 2 when we have performed some maintenance and want to retry the instruction in Thumb (state == 2)
+//this will be 4 when we have performed some maintenance and want to retry the instruction in ARM (state == 4)
+uint32_t CUndefHandler(uint32_t opcode, uint32_t state, uint32_t LR) {
+    const unsigned int THUMB = 2;
+    const unsigned int ARM = 4;
+    //Lazy VFP/NEON initialisation and switching
+
+    // (ARM ARM section A7.5) VFP data processing instruction?
+    // (ARM ARM section A7.6) VFP/NEON register load/store instruction?
+    // (ARM ARM section A7.8) VFP/NEON register data transfer instruction?
+    // (ARM ARM section A7.9) VFP/NEON 64-bit register data transfer instruction?
+    if ((state == ARM   && ((opcode & 0x0C000000) >> 26 == 0x03)) ||
+        (state == THUMB && ((opcode & 0xEC000000) >> 26 == 0x3B))) {
+        if (((opcode & 0x00000E00) >> 9) == 5) {
+            FPUEnable();
+            return state;
+        }
+    }
+
+    // (ARM ARM section A7.4) NEON data processing instruction?
+    if ((state == ARM   && ((opcode & 0xFE000000) >> 24 == 0xF2)) ||
+        (state == THUMB && ((opcode & 0xEF000000) >> 24 == 0xEF)) ||
+    // (ARM ARM section A7.7) NEON load/store instruction?
+        (state == ARM   && ((opcode >> 24) == 0xF4)) ||
+        (state == THUMB && ((opcode >> 24) == 0xF9))) {
+        FPUEnable();
+        return state;
+    }
+
+    //Add code here for other Undef cases
+    _kernel_default_exc_handler();
+    return 0;
+}
+
+#if defined(__ARMCC_VERSION)
+#pragma push
+#pragma arm
+//Critical section, called from undef handler, so systick is disabled
+__asm void FPUEnable(void) {
+        ARM
+
+        //Permit access to VFP/NEON, registers by modifying CPACR
+        MRC     p15,0,R1,c1,c0,2
+        ORR     R1,R1,#0x00F00000
+        MCR     p15,0,R1,c1,c0,2
+
+        //Ensure that subsequent instructions occur in the context of VFP/NEON access permitted
+        ISB
+
+        //Enable VFP/NEON
+        VMRS    R1,FPEXC
+        ORR     R1,R1,#0x40000000
+        VMSR    FPEXC,R1
+
+        //Initialise VFP/NEON registers to 0
+        MOV     R2,#0
+        //Initialise D16 registers to 0
+        VMOV    D0, R2,R2
+        VMOV    D1, R2,R2
+        VMOV    D2, R2,R2
+        VMOV    D3, R2,R2
+        VMOV    D4, R2,R2
+        VMOV    D5, R2,R2
+        VMOV    D6, R2,R2
+        VMOV    D7, R2,R2
+        VMOV    D8, R2,R2
+        VMOV    D9, R2,R2
+        VMOV    D10,R2,R2
+        VMOV    D11,R2,R2
+        VMOV    D12,R2,R2
+        VMOV    D13,R2,R2
+        VMOV    D14,R2,R2
+        VMOV    D15,R2,R2
+        //Initialise D32 registers to 0
+        VMOV    D16,R2,R2
+        VMOV    D17,R2,R2
+        VMOV    D18,R2,R2
+        VMOV    D19,R2,R2
+        VMOV    D20,R2,R2
+        VMOV    D21,R2,R2
+        VMOV    D22,R2,R2
+        VMOV    D23,R2,R2
+        VMOV    D24,R2,R2
+        VMOV    D25,R2,R2
+        VMOV    D26,R2,R2
+        VMOV    D27,R2,R2
+        VMOV    D28,R2,R2
+        VMOV    D29,R2,R2
+        VMOV    D30,R2,R2
+        VMOV    D31,R2,R2
+        //Initialise FPSCR to a known state
+        VMRS    R2,FPSCR
+        LDR     R3,=0x00086060 //Mask off all bits that do not have to be preserved. Non-preserved bits can/should be zero.
+        AND     R2,R2,R3
+        VMSR    FPSCR,R2
+
+        BX      LR
+}
+#pragma pop
+
+#elif defined(__GNUC__)
+void FPUEnable(void) {
+    __asm__ (
+        ".ARM;"
+
+        //Permit access to VFP/NEON, registers by modifying CPACR
+        "MRC     p15,0,R1,c1,c0,2;"
+        "ORR     R1,R1,#0x00F00000;"
+        "MCR     p15,0,R1,c1,c0,2;"
+
+        //Ensure that subsequent instructions occur in the context of VFP/NEON access permitted
+        "ISB;"
+
+        //Enable VFP/NEON
+        "VMRS    R1,FPEXC;"
+        "ORR     R1,R1,#0x40000000;"
+        "VMSR    FPEXC,R1;"
+
+        //Initialise VFP/NEON registers to 0
+        "MOV     R2,#0;"
+        //Initialise D16 registers to 0
+        "VMOV    D0, R2,R2;"
+        "VMOV    D1, R2,R2;"
+        "VMOV    D2, R2,R2;"
+        "VMOV    D3, R2,R2;"
+        "VMOV    D4, R2,R2;"
+        "VMOV    D5, R2,R2;"
+        "VMOV    D6, R2,R2;"
+        "VMOV    D7, R2,R2;"
+        "VMOV    D8, R2,R2;"
+        "VMOV    D9, R2,R2;"
+        "VMOV    D10,R2,R2;"
+        "VMOV    D11,R2,R2;"
+        "VMOV    D12,R2,R2;"
+        "VMOV    D13,R2,R2;"
+        "VMOV    D14,R2,R2;"
+        "VMOV    D15,R2,R2;"
+        //Initialise D32 registers to 0
+        "VMOV    D16,R2,R2;"
+        "VMOV    D17,R2,R2;"
+        "VMOV    D18,R2,R2;"
+        "VMOV    D19,R2,R2;"
+        "VMOV    D20,R2,R2;"
+        "VMOV    D21,R2,R2;"
+        "VMOV    D22,R2,R2;"
+        "VMOV    D23,R2,R2;"
+        "VMOV    D24,R2,R2;"
+        "VMOV    D25,R2,R2;"
+        "VMOV    D26,R2,R2;"
+        "VMOV    D27,R2,R2;"
+        "VMOV    D28,R2,R2;"
+        "VMOV    D29,R2,R2;"
+        "VMOV    D30,R2,R2;"
+        "VMOV    D31,R2,R2;"
+
+        //Initialise FPSCR to a known state
+        "VMRS    R2,FPSCR;"
+        "LDR     R3,=0x00086060;" //Mask off all bits that do not have to be preserved. Non-preserved bits can/should be zero.
+        "AND     R2,R2,R3;"
+        "VMSR    FPSCR,R2;"
+
+        //"BX      LR;"
+             :
+             :
+             :"r1", "r2", "r3");
+    return;
+}
+#else
+#endif
+
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/system_MBRZA1H.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/system_MBRZA1H.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/system_MBRZA1H.h	(revision 270)
@@ -0,0 +1,65 @@
+/**************************************************************************//**
+ * @file     system_MBRZA1H.h
+ * @brief    CMSIS Device System Header File for
+ *           ARMCA9 Device Series
+ * @version  V1.00
+ * @date     11 June 2013
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2011 - 2013 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+
+#ifndef __SYSTEM_MBRZA1H
+#define __SYSTEM_MBRZA1H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void(*IRQHandler)();
+uint32_t InterruptHandlerRegister(IRQn_Type, IRQHandler);
+uint32_t InterruptHandlerUnregister(IRQn_Type);
+
+/**
+ * Initialize the system
+ *
+ * @param  none
+ * @return none
+ *
+ * @brief  Setup the microcontroller system.
+ *         Initialize the System and update the Systd short        int16_t;emCoreClock variable.
+ */
+extern void SystemInit (void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SYSTEM_MBRZA1H */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TOOLCHAIN_GCC/TARGET_CORTEX_A/cache.S
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TOOLCHAIN_GCC/TARGET_CORTEX_A/cache.S	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/TOOLCHAIN_GCC/TARGET_CORTEX_A/cache.S	(revision 270)
@@ -0,0 +1,94 @@
+/* Copyright (c) 2009 - 2012 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+ *      Functions
+ *---------------------------------------------------------------------------*/
+    .text
+    .global __v7_all_cache
+/*
+ * __STATIC_ASM void __v7_all_cache(uint32_t op) {
+ */
+__v7_all_cache:
+        .arm
+
+        PUSH    {R4-R11}
+
+        MRC     p15, 1, R6, c0, c0, 1      /* Read CLIDR */
+        ANDS    R3, R6, #0x07000000        /* Extract coherency level */
+        MOV     R3, R3, LSR #23            /* Total cache levels << 1 */
+        BEQ     Finished                   /* If 0, no need to clean */
+
+        MOV     R10, #0                    /* R10 holds current cache level << 1 */
+Loop1:  ADD     R2, R10, R10, LSR #1       /* R2 holds cache "Set" position */
+        MOV     R1, R6, LSR R2             /* Bottom 3 bits are the Cache-type for this level */
+        AND     R1, R1, #7                 /* Isolate those lower 3 bits */
+        CMP     R1, #2
+        BLT     Skip                       /* No cache or only instruction cache at this level */
+
+        MCR     p15, 2, R10, c0, c0, 0     /* Write the Cache Size selection register */
+        ISB                                /* ISB to sync the change to the CacheSizeID reg */
+        MRC     p15, 1, R1, c0, c0, 0      /* Reads current Cache Size ID register */
+        AND     R2, R1, #7                 /* Extract the line length field */
+        ADD     R2, R2, #4                 /* Add 4 for the line length offset (log2 16 bytes) */
+        LDR     R4, =0x3FF
+        ANDS    R4, R4, R1, LSR #3         /* R4 is the max number on the way size (right aligned) */
+        CLZ     R5, R4                     /* R5 is the bit position of the way size increment */
+        LDR     R7, =0x7FFF
+        ANDS    R7, R7, R1, LSR #13        /* R7 is the max number of the index size (right aligned) */
+
+Loop2:  MOV     R9, R4                     /* R9 working copy of the max way size (right aligned) */
+
+Loop3:  ORR     R11, R10, R9, LSL R5       /* Factor in the Way number and cache number into R11 */
+        ORR     R11, R11, R7, LSL R2       /* Factor in the Set number */
+        CMP     R0, #0
+        BNE     Dccsw
+        MCR     p15, 0, R11, c7, c6, 2     /* DCISW. Invalidate by Set/Way */
+        B       cont
+Dccsw:  CMP     R0, #1
+        BNE     Dccisw
+        MCR     p15, 0, R11, c7, c10, 2    /* DCCSW. Clean by Set/Way */
+        B       cont
+Dccisw: MCR     p15, 0, R11, c7, c14, 2    /* DCCISW, Clean and Invalidate by Set/Way */
+cont:   SUBS    R9, R9, #1                 /* Decrement the Way number */
+        BGE     Loop3
+        SUBS    R7, R7, #1                 /* Decrement the Set number */
+        BGE     Loop2
+Skip:   ADD     R10, R10, #2               /* increment the cache number */
+        CMP     R3, R10
+        BGT     Loop1
+
+Finished:
+        DSB
+        POP    {R4-R11}
+        BX     lr
+
+
+    .END
+/*----------------------------------------------------------------------------
+ * end of file
+ *---------------------------------------------------------------------------*/
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_ca9.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_ca9.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_ca9.h	(revision 270)
@@ -0,0 +1,271 @@
+/**************************************************************************//**
+ * @file     core_ca9.h
+ * @brief    CMSIS Cortex-A9 Core Peripheral Access Layer Header File
+ * @version
+ * @date     25 March 2013
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2009 - 2012 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+
+#if defined ( __ICCARM__ )
+ #pragma system_include  /* treat file as system include file for MISRA check */
+#endif
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+#ifndef __CORE_CA9_H_GENERIC
+#define __CORE_CA9_H_GENERIC
+
+
+/** \page CMSIS_MISRA_Exceptions  MISRA-C:2004 Compliance Exceptions
+  CMSIS violates the following MISRA-C:2004 rules:
+
+   \li Required Rule 8.5, object/function definition in header file.<br>
+     Function definitions in header files are used to allow 'inlining'.
+
+   \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.<br>
+     Unions are used for effective representation of core registers.
+
+   \li Advisory Rule 19.7, Function-like macro defined.<br>
+     Function-like macros are used to allow more efficient code.
+ */
+
+
+/*******************************************************************************
+ *                 CMSIS definitions
+ ******************************************************************************/
+/** \ingroup Cortex_A9
+  @{
+ */
+
+/*  CMSIS CA9 definitions */
+#define __CA9_CMSIS_VERSION_MAIN  (0x03)                                   /*!< [31:16] CMSIS HAL main version   */
+#define __CA9_CMSIS_VERSION_SUB   (0x10)                                   /*!< [15:0]  CMSIS HAL sub version    */
+#define __CA9_CMSIS_VERSION       ((__CA9_CMSIS_VERSION_MAIN << 16) | \
+                                    __CA9_CMSIS_VERSION_SUB          )     /*!< CMSIS HAL version number         */
+
+#define __CORTEX_A                (0x09)                                   /*!< Cortex-A Core                    */
+
+
+#if   defined ( __CC_ARM )
+  #define __ASM            __asm                                      /*!< asm keyword for ARM Compiler          */
+  #define __INLINE         __inline                                   /*!< inline keyword for ARM Compiler       */
+  #define __STATIC_INLINE  static __inline
+  #define __STATIC_ASM     static __asm
+
+#elif defined ( __ICCARM__ )
+  #define __ASM            __asm                                      /*!< asm keyword for IAR Compiler          */
+  #define __INLINE         inline                                     /*!< inline keyword for IAR Compiler. Only available in High optimization mode! */
+  #define __STATIC_INLINE  static inline
+  #define __STATIC_ASM     static __asm
+
+#elif defined ( __TMS470__ )
+  #define __ASM            __asm                                      /*!< asm keyword for TI CCS Compiler       */
+  #define __STATIC_INLINE  static inline
+  #define __STATIC_ASM     static __asm
+
+#elif defined ( __GNUC__ )
+  #define __ASM            __asm                                      /*!< asm keyword for GNU Compiler          */
+  #define __INLINE         inline                                     /*!< inline keyword for GNU Compiler       */
+  #define __STATIC_INLINE  static inline
+  #define __STATIC_ASM     static __asm
+
+#elif defined ( __TASKING__ )
+  #define __ASM            __asm                                      /*!< asm keyword for TASKING Compiler      */
+  #define __INLINE         inline                                     /*!< inline keyword for TASKING Compiler   */
+  #define __STATIC_INLINE  static inline
+  #define __STATIC_ASM     static __asm
+
+#endif
+
+/** __FPU_USED indicates whether an FPU is used or not. For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions.
+*/
+#if defined ( __CC_ARM )
+  #if defined __TARGET_FPU_VFP
+    #if (__FPU_PRESENT == 1)
+      #define __FPU_USED       1
+    #else
+      #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+      #define __FPU_USED       0
+    #endif
+  #else
+    #define __FPU_USED         0
+  #endif
+
+#elif defined ( __ICCARM__ )
+  #if defined __ARMVFP__
+    #if (__FPU_PRESENT == 1)
+      #define __FPU_USED       1
+    #else
+      #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+      #define __FPU_USED       0
+    #endif
+  #else
+    #define __FPU_USED         0
+  #endif
+
+#elif defined ( __TMS470__ )
+  #if defined __TI_VFP_SUPPORT__
+    #if (__FPU_PRESENT == 1)
+      #define __FPU_USED       1
+    #else
+      #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+      #define __FPU_USED       0
+    #endif
+  #else
+    #define __FPU_USED         0
+  #endif
+
+#elif defined ( __GNUC__ )
+  #if defined (__VFP_FP__) && !defined(__SOFTFP__)
+    #if (__FPU_PRESENT == 1)
+      #define __FPU_USED       1
+    #else
+      #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+      #define __FPU_USED       0
+    #endif
+  #else
+    #define __FPU_USED         0
+  #endif
+
+#elif defined ( __TASKING__ )
+  #if defined __FPU_VFP__
+    #if (__FPU_PRESENT == 1)
+      #define __FPU_USED       1
+    #else
+      #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+      #define __FPU_USED       0
+    #endif
+  #else
+    #define __FPU_USED         0
+  #endif
+#endif
+
+#include <stdint.h>                      /*!< standard types definitions                      */
+#include "core_caInstr.h"                /*!< Core Instruction Access                         */
+#include "core_caFunc.h"                 /*!< Core Function Access                            */
+#include "core_cm4_simd.h"               /*!< Compiler specific SIMD Intrinsics               */
+
+#endif /* __CORE_CA9_H_GENERIC */
+
+#ifndef __CMSIS_GENERIC
+
+#ifndef __CORE_CA9_H_DEPENDANT
+#define __CORE_CA9_H_DEPENDANT
+
+/* check device defines and use defaults */
+#if defined __CHECK_DEVICE_DEFINES
+  #ifndef __CA9_REV
+    #define __CA9_REV               0x0000
+    #warning "__CA9_REV not defined in device header file; using default!"
+  #endif
+
+  #ifndef __FPU_PRESENT
+    #define __FPU_PRESENT             1
+    #warning "__FPU_PRESENT not defined in device header file; using default!"
+  #endif
+
+  #ifndef __Vendor_SysTickConfig
+    #define __Vendor_SysTickConfig    1
+  #endif
+
+  #if __Vendor_SysTickConfig == 0
+    #error "__Vendor_SysTickConfig set to 0, but vendor systick timer must be supplied for Cortex-A9"
+  #endif
+#endif
+
+/* IO definitions (access restrictions to peripheral registers) */
+/**
+    \defgroup CMSIS_glob_defs CMSIS Global Defines
+
+    <strong>IO Type Qualifiers</strong> are used
+    \li to specify the access to peripheral variables.
+    \li for automatic generation of peripheral register debug information.
+*/
+#ifdef __cplusplus
+  #define   __I     volatile             /*!< Defines 'read only' permissions                 */
+#else
+  #define   __I     volatile const       /*!< Defines 'read only' permissions                 */
+#endif
+#define     __O     volatile             /*!< Defines 'write only' permissions                */
+#define     __IO    volatile             /*!< Defines 'read / write' permissions              */
+
+/*@} end of group Cortex_A9 */
+
+
+/*******************************************************************************
+ *                 Register Abstraction
+ ******************************************************************************/
+/** \defgroup CMSIS_core_register Defines and Type Definitions
+    \brief Type definitions and defines for Cortex-A processor based devices.
+*/
+
+/** \ingroup    CMSIS_core_register
+    \defgroup   CMSIS_CORE  Status and Control Registers
+    \brief  Core Register type definitions.
+  @{
+ */
+
+/** \brief  Union type to access the Application Program Status Register (APSR).
+ */
+typedef union
+{
+  struct
+  {
+    uint32_t _reserved0:16;              /*!< bit:  0..15  Reserved                           */
+    uint32_t GE:4;                       /*!< bit: 16..19  Greater than or Equal flags        */
+    uint32_t reserved1:7;                /*!< bit: 20..23  Reserved                           */
+    uint32_t Q:1;                        /*!< bit:     27  Saturation condition flag          */
+    uint32_t V:1;                        /*!< bit:     28  Overflow condition code flag       */
+    uint32_t C:1;                        /*!< bit:     29  Carry condition code flag          */
+    uint32_t Z:1;                        /*!< bit:     30  Zero condition code flag           */
+    uint32_t N:1;                        /*!< bit:     31  Negative condition code flag       */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */ 
+} APSR_Type;
+
+
+/*@} end of group CMSIS_CORE */
+
+/*@} end of CMSIS_Core_FPUFunctions */
+
+
+#endif /* __CORE_CA9_H_GENERIC */
+
+#endif /* __CMSIS_GENERIC */
+
+#ifdef __cplusplus
+}
+
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_caFunc.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_caFunc.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_caFunc.h	(revision 270)
@@ -0,0 +1,1177 @@
+/**************************************************************************//**
+ * @file     core_caFunc.h
+ * @brief    CMSIS Cortex-A Core Function Access Header File
+ * @version  V3.10
+ * @date     30 Oct 2013
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2009 - 2013 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+
+#ifndef __CORE_CAFUNC_H__
+#define __CORE_CAFUNC_H__
+
+
+/* ###########################  Core Function Access  ########################### */
+/** \ingroup  CMSIS_Core_FunctionInterface
+    \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
+  @{
+ */
+
+#if   defined ( __CC_ARM ) /*------------------RealView Compiler -----------------*/
+/* ARM armcc specific functions */
+
+#if (__ARMCC_VERSION < 400677)
+  #error "Please use ARM Compiler Toolchain V4.0.677 or later!"
+#endif
+
+#define MODE_USR 0x10
+#define MODE_FIQ 0x11
+#define MODE_IRQ 0x12
+#define MODE_SVC 0x13
+#define MODE_MON 0x16
+#define MODE_ABT 0x17
+#define MODE_HYP 0x1A
+#define MODE_UND 0x1B
+#define MODE_SYS 0x1F
+
+/** \brief  Get APSR Register
+
+    This function returns the content of the APSR Register.
+
+    \return               APSR Register value
+ */
+__STATIC_INLINE uint32_t __get_APSR(void)
+{
+  register uint32_t __regAPSR          __ASM("apsr");
+  return(__regAPSR);
+}
+
+
+/** \brief  Get CPSR Register
+
+    This function returns the content of the CPSR Register.
+
+    \return               CPSR Register value
+ */
+__STATIC_INLINE uint32_t __get_CPSR(void)
+{
+  register uint32_t __regCPSR          __ASM("cpsr");
+  return(__regCPSR);
+}
+
+/** \brief  Set Stack Pointer
+
+    This function assigns the given value to the current stack pointer.
+
+    \param [in]    topOfStack  Stack Pointer value to set
+ */
+register uint32_t __regSP              __ASM("sp");
+__STATIC_INLINE void __set_SP(uint32_t topOfStack)
+{
+    __regSP = topOfStack;
+}
+
+
+/** \brief  Get link register
+
+    This function returns the value of the link register
+
+    \return    Value of link register
+ */
+register uint32_t __reglr         __ASM("lr");
+__STATIC_INLINE uint32_t __get_LR(void)
+{
+  return(__reglr);
+}
+
+/** \brief  Set link register
+
+    This function sets the value of the link register
+
+    \param [in]    lr  LR value to set
+ */
+__STATIC_INLINE void __set_LR(uint32_t lr)
+{
+  __reglr = lr;
+}
+
+/** \brief  Set Process Stack Pointer
+
+    This function assigns the given value to the USR/SYS Stack Pointer (PSP).
+
+    \param [in]    topOfProcStack  USR/SYS Stack Pointer value to set
+ */
+__STATIC_ASM void __set_PSP(uint32_t topOfProcStack)
+{
+    ARM
+    PRESERVE8
+
+    BIC     R0, R0, #7  ;ensure stack is 8-byte aligned
+    MRS     R1, CPSR
+    CPS     #MODE_SYS   ;no effect in USR mode
+    MOV     SP, R0
+    MSR     CPSR_c, R1  ;no effect in USR mode
+    ISB
+    BX      LR
+
+}
+
+/** \brief  Set User Mode
+
+    This function changes the processor state to User Mode
+ */
+__STATIC_ASM void __set_CPS_USR(void)
+{
+    ARM 
+
+    CPS  #MODE_USR  
+    BX   LR
+}
+
+
+/** \brief  Enable FIQ
+
+    This function enables FIQ interrupts by clearing the F-bit in the CPSR.
+    Can only be executed in Privileged modes.
+ */
+#define __enable_fault_irq                __enable_fiq
+
+
+/** \brief  Disable FIQ
+
+    This function disables FIQ interrupts by setting the F-bit in the CPSR.
+    Can only be executed in Privileged modes.
+ */
+#define __disable_fault_irq               __disable_fiq
+
+
+/** \brief  Get FPSCR
+
+    This function returns the current value of the Floating Point Status/Control register.
+
+    \return               Floating Point Status/Control register value
+ */
+__STATIC_INLINE uint32_t __get_FPSCR(void)
+{
+#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
+  register uint32_t __regfpscr         __ASM("fpscr");
+  return(__regfpscr);
+#else
+   return(0);
+#endif
+}
+
+
+/** \brief  Set FPSCR
+
+    This function assigns the given value to the Floating Point Status/Control register.
+
+    \param [in]    fpscr  Floating Point Status/Control value to set
+ */
+__STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
+{
+#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
+  register uint32_t __regfpscr         __ASM("fpscr");
+  __regfpscr = (fpscr);
+#endif
+}
+
+/** \brief  Get FPEXC
+
+    This function returns the current value of the Floating Point Exception Control register.
+
+    \return               Floating Point Exception Control register value
+ */
+__STATIC_INLINE uint32_t __get_FPEXC(void)
+{
+#if (__FPU_PRESENT == 1)
+  register uint32_t __regfpexc         __ASM("fpexc");
+  return(__regfpexc);
+#else
+   return(0);
+#endif
+}
+
+
+/** \brief  Set FPEXC
+
+    This function assigns the given value to the Floating Point Exception Control register.
+
+    \param [in]    fpscr  Floating Point Exception Control value to set
+ */
+__STATIC_INLINE void __set_FPEXC(uint32_t fpexc)
+{
+#if (__FPU_PRESENT == 1)
+  register uint32_t __regfpexc         __ASM("fpexc");
+  __regfpexc = (fpexc);
+#endif
+}
+
+/** \brief  Get CPACR
+
+    This function returns the current value of the Coprocessor Access Control register.
+
+    \return               Coprocessor Access Control register value
+ */
+__STATIC_INLINE uint32_t __get_CPACR(void)
+{
+    register uint32_t __regCPACR         __ASM("cp15:0:c1:c0:2");
+    return __regCPACR;
+}
+
+/** \brief  Set CPACR
+
+    This function assigns the given value to the Coprocessor Access Control register.
+
+    \param [in]    cpacr  Coprocessor Acccess Control value to set
+ */
+__STATIC_INLINE void __set_CPACR(uint32_t cpacr)
+{
+    register uint32_t __regCPACR         __ASM("cp15:0:c1:c0:2");
+    __regCPACR = cpacr;
+    __ISB();
+}
+
+/** \brief  Get CBAR
+
+    This function returns the value of the Configuration Base Address register.
+
+    \return               Configuration Base Address register value
+ */
+__STATIC_INLINE uint32_t __get_CBAR() {
+    register uint32_t __regCBAR         __ASM("cp15:4:c15:c0:0");
+    return(__regCBAR);
+}
+
+/** \brief  Get TTBR0
+
+    This function returns the value of the Translation Table Base Register 0.
+
+    \return               Translation Table Base Register 0 value
+ */
+__STATIC_INLINE uint32_t __get_TTBR0() {
+    register uint32_t __regTTBR0        __ASM("cp15:0:c2:c0:0");
+    return(__regTTBR0);
+}
+
+/** \brief  Set TTBR0
+
+    This function assigns the given value to the Translation Table Base Register 0.
+
+    \param [in]    ttbr0  Translation Table Base Register 0 value to set
+ */
+__STATIC_INLINE void __set_TTBR0(uint32_t ttbr0) {
+    register uint32_t __regTTBR0        __ASM("cp15:0:c2:c0:0");
+    __regTTBR0 = ttbr0;
+    __ISB();
+}
+
+/** \brief  Get DACR
+
+    This function returns the value of the Domain Access Control Register.
+
+    \return               Domain Access Control Register value
+ */
+__STATIC_INLINE uint32_t __get_DACR() {
+    register uint32_t __regDACR         __ASM("cp15:0:c3:c0:0");
+    return(__regDACR);
+}
+
+/** \brief  Set DACR
+
+    This function assigns the given value to the Domain Access Control Register.
+
+    \param [in]    dacr   Domain Access Control Register value to set
+ */
+__STATIC_INLINE void __set_DACR(uint32_t dacr) {
+    register uint32_t __regDACR         __ASM("cp15:0:c3:c0:0");
+    __regDACR = dacr;
+    __ISB();
+}
+
+/******************************** Cache and BTAC enable  ****************************************************/
+
+/** \brief  Set SCTLR
+
+    This function assigns the given value to the System Control Register.
+
+    \param [in]    sctlr  System Control Register value to set
+ */
+__STATIC_INLINE void __set_SCTLR(uint32_t sctlr)
+{
+    register uint32_t __regSCTLR         __ASM("cp15:0:c1:c0:0");
+    __regSCTLR = sctlr;
+}
+
+/** \brief  Get SCTLR
+
+    This function returns the value of the System Control Register.
+
+    \return               System Control Register value
+ */
+__STATIC_INLINE uint32_t __get_SCTLR() {
+    register uint32_t __regSCTLR         __ASM("cp15:0:c1:c0:0");
+    return(__regSCTLR);
+}
+
+/** \brief  Enable Caches
+
+    Enable Caches
+ */
+__STATIC_INLINE void __enable_caches(void) {
+    // Set I bit 12 to enable I Cache
+    // Set C bit  2 to enable D Cache
+    __set_SCTLR( __get_SCTLR() | (1 << 12) | (1 << 2));
+}
+
+/** \brief  Disable Caches
+
+    Disable Caches
+ */
+__STATIC_INLINE void __disable_caches(void) {
+    // Clear I bit 12 to disable I Cache
+    // Clear C bit  2 to disable D Cache
+    __set_SCTLR( __get_SCTLR() & ~(1 << 12) & ~(1 << 2));
+    __ISB();
+}
+
+/** \brief  Enable BTAC
+
+    Enable BTAC
+ */
+__STATIC_INLINE void __enable_btac(void) {
+    // Set Z bit 11 to enable branch prediction
+    __set_SCTLR( __get_SCTLR() | (1 << 11));
+    __ISB();
+}
+
+/** \brief  Disable BTAC
+
+    Disable BTAC
+ */
+__STATIC_INLINE void __disable_btac(void) {
+    // Clear Z bit 11 to disable branch prediction
+    __set_SCTLR( __get_SCTLR() & ~(1 << 11));
+}
+
+
+/** \brief  Enable MMU
+
+    Enable MMU
+ */
+__STATIC_INLINE void __enable_mmu(void) {
+    // Set M bit 0 to enable the MMU
+    // Set AFE bit to enable simplified access permissions model
+    // Clear TRE bit to disable TEX remap and A bit to disable strict alignment fault checking
+    __set_SCTLR( (__get_SCTLR() & ~(1 << 28) & ~(1 << 1)) | 1 | (1 << 29));
+    __ISB();
+}
+
+/** \brief  Disable MMU
+
+    Disable MMU
+ */
+__STATIC_INLINE void __disable_mmu(void) {
+    // Clear M bit 0 to disable the MMU
+    __set_SCTLR( __get_SCTLR() & ~1);
+    __ISB();
+}
+
+/******************************** TLB maintenance operations ************************************************/
+/** \brief  Invalidate the whole tlb
+
+    TLBIALL. Invalidate the whole tlb
+ */
+
+__STATIC_INLINE void __ca9u_inv_tlb_all(void) {
+    register uint32_t __TLBIALL         __ASM("cp15:0:c8:c7:0");
+    __TLBIALL = 0;
+    __DSB();
+    __ISB();
+}
+
+/******************************** BTB maintenance operations ************************************************/
+/** \brief  Invalidate entire branch predictor array
+
+    BPIALL. Branch Predictor Invalidate All.
+ */
+
+__STATIC_INLINE void __v7_inv_btac(void) {
+    register uint32_t __BPIALL          __ASM("cp15:0:c7:c5:6");
+    __BPIALL  = 0;
+    __DSB();     //ensure completion of the invalidation
+    __ISB();     //ensure instruction fetch path sees new state
+}
+
+
+/******************************** L1 cache operations ******************************************************/
+
+/** \brief  Invalidate the whole I$
+
+    ICIALLU. Instruction Cache Invalidate All to PoU
+ */
+__STATIC_INLINE void __v7_inv_icache_all(void) {
+    register uint32_t __ICIALLU         __ASM("cp15:0:c7:c5:0");
+    __ICIALLU = 0;
+    __DSB();     //ensure completion of the invalidation
+    __ISB();     //ensure instruction fetch path sees new I cache state
+}
+
+/** \brief  Clean D$ by MVA
+
+    DCCMVAC. Data cache clean by MVA to PoC
+ */
+__STATIC_INLINE void __v7_clean_dcache_mva(void *va) {
+    register uint32_t __DCCMVAC         __ASM("cp15:0:c7:c10:1");
+    __DCCMVAC = (uint32_t)va;
+    __DMB();     //ensure the ordering of data cache maintenance operations and their effects
+}
+
+/** \brief  Invalidate D$ by MVA
+
+    DCIMVAC. Data cache invalidate by MVA to PoC
+ */
+__STATIC_INLINE void __v7_inv_dcache_mva(void *va) {
+    register uint32_t __DCIMVAC         __ASM("cp15:0:c7:c6:1");
+    __DCIMVAC = (uint32_t)va;
+    __DMB();     //ensure the ordering of data cache maintenance operations and their effects
+}
+
+/** \brief  Clean and Invalidate D$ by MVA
+
+    DCCIMVAC. Data cache clean and invalidate by MVA to PoC
+ */
+__STATIC_INLINE void __v7_clean_inv_dcache_mva(void *va) {
+    register uint32_t __DCCIMVAC        __ASM("cp15:0:c7:c14:1");
+    __DCCIMVAC = (uint32_t)va;
+    __DMB();     //ensure the ordering of data cache maintenance operations and their effects
+}
+
+/** \brief  Clean and Invalidate the entire data or unified cache
+
+    Generic mechanism for cleaning/invalidating the entire data or unified cache to the point of coherency.
+ */
+#pragma push
+#pragma arm
+__STATIC_ASM void __v7_all_cache(uint32_t op) {
+        ARM 
+
+        PUSH    {R4-R11}
+
+        MRC     p15, 1, R6, c0, c0, 1      // Read CLIDR
+        ANDS    R3, R6, #0x07000000        // Extract coherency level
+        MOV     R3, R3, LSR #23            // Total cache levels << 1
+        BEQ     Finished                   // If 0, no need to clean
+
+        MOV     R10, #0                    // R10 holds current cache level << 1
+Loop1   ADD     R2, R10, R10, LSR #1       // R2 holds cache "Set" position
+        MOV     R1, R6, LSR R2             // Bottom 3 bits are the Cache-type for this level
+        AND     R1, R1, #7                 // Isolate those lower 3 bits
+        CMP     R1, #2
+        BLT     Skip                       // No cache or only instruction cache at this level
+
+        MCR     p15, 2, R10, c0, c0, 0     // Write the Cache Size selection register
+        ISB                                // ISB to sync the change to the CacheSizeID reg
+        MRC     p15, 1, R1, c0, c0, 0      // Reads current Cache Size ID register
+        AND     R2, R1, #7                 // Extract the line length field
+        ADD     R2, R2, #4                 // Add 4 for the line length offset (log2 16 bytes)
+        LDR     R4, =0x3FF
+        ANDS    R4, R4, R1, LSR #3         // R4 is the max number on the way size (right aligned)
+        CLZ     R5, R4                     // R5 is the bit position of the way size increment
+        LDR     R7, =0x7FFF
+        ANDS    R7, R7, R1, LSR #13        // R7 is the max number of the index size (right aligned)
+
+Loop2   MOV     R9, R4                     // R9 working copy of the max way size (right aligned)
+
+Loop3   ORR     R11, R10, R9, LSL R5       // Factor in the Way number and cache number into R11
+        ORR     R11, R11, R7, LSL R2       // Factor in the Set number
+        CMP     R0, #0
+        BNE     Dccsw
+        MCR     p15, 0, R11, c7, c6, 2     // DCISW. Invalidate by Set/Way
+        B       cont
+Dccsw   CMP     R0, #1
+        BNE     Dccisw
+        MCR     p15, 0, R11, c7, c10, 2    // DCCSW. Clean by Set/Way
+        B       cont
+Dccisw  MCR     p15, 0, R11, c7, c14, 2    // DCCISW. Clean and Invalidate by Set/Way
+cont    SUBS    R9, R9, #1                 // Decrement the Way number
+        BGE     Loop3
+        SUBS    R7, R7, #1                 // Decrement the Set number
+        BGE     Loop2
+Skip    ADD     R10, R10, #2               // Increment the cache number
+        CMP     R3, R10
+        BGT     Loop1
+
+Finished
+        DSB
+        POP    {R4-R11}
+        BX     lr
+
+}
+#pragma pop
+
+
+/** \brief  Invalidate the whole D$
+
+    DCISW. Invalidate by Set/Way
+ */
+
+__STATIC_INLINE void __v7_inv_dcache_all(void) {
+    __v7_all_cache(0);
+}
+
+/** \brief  Clean the whole D$
+
+    DCCSW. Clean by Set/Way
+ */
+
+__STATIC_INLINE void __v7_clean_dcache_all(void) {
+    __v7_all_cache(1);
+}
+
+/** \brief  Clean and invalidate the whole D$
+
+    DCCISW. Clean and Invalidate by Set/Way
+ */
+
+__STATIC_INLINE void __v7_clean_inv_dcache_all(void) {
+    __v7_all_cache(2);
+}
+
+#include "core_ca_mmu.h"
+
+#elif (defined (__ICCARM__)) /*---------------- ICC Compiler ---------------------*/
+
+#error IAR Compiler support not implemented for Cortex-A
+
+#elif (defined (__GNUC__)) /*------------------ GNU Compiler ---------------------*/
+/* GNU gcc specific functions */
+
+#define MODE_USR 0x10
+#define MODE_FIQ 0x11
+#define MODE_IRQ 0x12
+#define MODE_SVC 0x13
+#define MODE_MON 0x16
+#define MODE_ABT 0x17
+#define MODE_HYP 0x1A
+#define MODE_UND 0x1B
+#define MODE_SYS 0x1F
+
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_irq(void)
+{
+    __ASM volatile ("cpsie i");
+}
+
+/** \brief  Disable IRQ Interrupts
+
+  This function disables IRQ interrupts by setting the I-bit in the CPSR.
+  Can only be executed in Privileged modes.
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __disable_irq(void)
+{
+    uint32_t result;
+
+    __ASM volatile ("mrs %0, cpsr" : "=r" (result));
+    __ASM volatile ("cpsid i");
+    return(result & 0x80);
+}
+
+
+/** \brief  Get APSR Register
+
+    This function returns the content of the APSR Register.
+
+    \return               APSR Register value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_APSR(void)
+{
+#if 1
+  register uint32_t __regAPSR;
+  __ASM volatile ("mrs %0, apsr" : "=r" (__regAPSR) );
+#else
+  register uint32_t __regAPSR          __ASM("apsr");
+#endif
+  return(__regAPSR);
+}
+
+
+/** \brief  Get CPSR Register
+
+    This function returns the content of the CPSR Register.
+
+    \return               CPSR Register value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_CPSR(void)
+{
+#if 1
+  register uint32_t __regCPSR;
+  __ASM volatile ("mrs %0, cpsr" : "=r" (__regCPSR));
+#else
+  register uint32_t __regCPSR          __ASM("cpsr");
+#endif
+  return(__regCPSR);
+}
+
+#if 0
+/** \brief  Set Stack Pointer
+
+    This function assigns the given value to the current stack pointer.
+
+    \param [in]    topOfStack  Stack Pointer value to set
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_SP(uint32_t topOfStack)
+{
+    register uint32_t __regSP       __ASM("sp");
+    __regSP = topOfStack;
+}
+#endif
+
+/** \brief  Get link register
+
+    This function returns the value of the link register
+
+    \return    Value of link register
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_LR(void)
+{
+  register uint32_t __reglr         __ASM("lr");
+  return(__reglr);
+}
+
+#if 0
+/** \brief  Set link register
+
+    This function sets the value of the link register
+
+    \param [in]    lr  LR value to set
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_LR(uint32_t lr)
+{
+  register uint32_t __reglr         __ASM("lr");
+  __reglr = lr;
+}
+#endif
+
+/** \brief  Set Process Stack Pointer
+
+    This function assigns the given value to the USR/SYS Stack Pointer (PSP).
+
+    \param [in]    topOfProcStack  USR/SYS Stack Pointer value to set
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
+{
+    __asm__ volatile (
+    ".ARM;"
+    ".eabi_attribute Tag_ABI_align8_preserved,1;"
+
+    "BIC     R0, R0, #7;" /* ;ensure stack is 8-byte aligned */
+    "MRS     R1, CPSR;"
+    "CPS     %0;"         /* ;no effect in USR mode */
+    "MOV     SP, R0;"
+    "MSR     CPSR_c, R1;" /* ;no effect in USR mode */
+    "ISB;"
+    //"BX      LR;"
+    :
+    : "i"(MODE_SYS)
+    : "r0", "r1");
+    return;
+}
+
+/** \brief  Set User Mode
+
+    This function changes the processor state to User Mode
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_CPS_USR(void)
+{
+    __asm__ volatile (
+    ".ARM;"
+
+    "CPS  %0;"
+    //"BX   LR;"
+    :
+    : "i"(MODE_USR)
+    : );
+    return;
+}
+
+
+/** \brief  Enable FIQ
+
+    This function enables FIQ interrupts by clearing the F-bit in the CPSR.
+    Can only be executed in Privileged modes.
+ */
+#define __enable_fault_irq()                __asm__ volatile ("cpsie f")
+
+
+/** \brief  Disable FIQ
+
+    This function disables FIQ interrupts by setting the F-bit in the CPSR.
+    Can only be executed in Privileged modes.
+ */
+#define __disable_fault_irq()               __asm__ volatile ("cpsid f")
+
+
+/** \brief  Get FPSCR
+
+    This function returns the current value of the Floating Point Status/Control register.
+
+    \return               Floating Point Status/Control register value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_FPSCR(void)
+{
+#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
+#if 1
+    uint32_t result;
+
+    __ASM volatile ("vmrs %0, fpscr" : "=r" (result) );
+    return (result);
+#else
+  register uint32_t __regfpscr         __ASM("fpscr");
+  return(__regfpscr);
+#endif
+#else
+   return(0);
+#endif
+}
+
+
+/** \brief  Set FPSCR
+
+    This function assigns the given value to the Floating Point Status/Control register.
+
+    \param [in]    fpscr  Floating Point Status/Control value to set
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
+{
+#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
+#if 1
+    __ASM volatile ("vmsr fpscr, %0" : : "r" (fpscr) );
+#else
+  register uint32_t __regfpscr         __ASM("fpscr");
+  __regfpscr = (fpscr);
+#endif
+#endif
+}
+
+/** \brief  Get FPEXC
+
+    This function returns the current value of the Floating Point Exception Control register.
+
+    \return               Floating Point Exception Control register value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_FPEXC(void)
+{
+#if (__FPU_PRESENT == 1)
+#if 1
+    uint32_t result;
+
+    __ASM volatile ("vmrs %0, fpexc" : "=r" (result));
+    return (result);
+#else
+  register uint32_t __regfpexc         __ASM("fpexc");
+  return(__regfpexc);
+#endif
+#else
+   return(0);
+#endif
+}
+
+
+/** \brief  Set FPEXC
+
+    This function assigns the given value to the Floating Point Exception Control register.
+
+    \param [in]    fpscr  Floating Point Exception Control value to set
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_FPEXC(uint32_t fpexc)
+{
+#if (__FPU_PRESENT == 1)
+#if 1
+    __ASM volatile ("vmsr fpexc, %0" : : "r" (fpexc));
+#else
+  register uint32_t __regfpexc         __ASM("fpexc");
+  __regfpexc = (fpexc);
+#endif
+#endif
+}
+
+/** \brief  Get CPACR
+
+    This function returns the current value of the Coprocessor Access Control register.
+
+    \return               Coprocessor Access Control register value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_CPACR(void)
+{
+#if 1
+    register uint32_t __regCPACR;
+    __ASM volatile ("mrc p15, 0, %0, c1, c0, 2" : "=r" (__regCPACR));
+#else
+    register uint32_t __regCPACR         __ASM("cp15:0:c1:c0:2");
+#endif
+    return __regCPACR;
+}
+
+/** \brief  Set CPACR
+
+    This function assigns the given value to the Coprocessor Access Control register.
+
+    \param [in]    cpacr  Coprocessor Acccess Control value to set
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_CPACR(uint32_t cpacr)
+{
+#if 1
+    __ASM volatile ("mcr p15, 0, %0, c1, c0, 2" : : "r" (cpacr));
+#else
+    register uint32_t __regCPACR         __ASM("cp15:0:c1:c0:2");
+    __regCPACR = cpacr;
+#endif
+    __ISB();
+}
+
+/** \brief  Get CBAR
+
+    This function returns the value of the Configuration Base Address register.
+
+    \return               Configuration Base Address register value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_CBAR() {
+#if 1
+    register uint32_t __regCBAR;
+    __ASM volatile ("mrc p15, 4, %0, c15, c0, 0" : "=r" (__regCBAR));
+#else
+    register uint32_t __regCBAR         __ASM("cp15:4:c15:c0:0");
+#endif
+    return(__regCBAR);
+}
+
+/** \brief  Get TTBR0
+
+    This function returns the value of the Translation Table Base Register 0.
+
+    \return               Translation Table Base Register 0 value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_TTBR0() {
+#if 1
+    register uint32_t __regTTBR0;
+    __ASM volatile ("mrc p15, 0, %0, c2, c0, 0" : "=r" (__regTTBR0));
+#else
+    register uint32_t __regTTBR0        __ASM("cp15:0:c2:c0:0");
+#endif
+    return(__regTTBR0);
+}
+
+/** \brief  Set TTBR0
+
+    This function assigns the given value to the Translation Table Base Register 0.
+
+    \param [in]    ttbr0  Translation Table Base Register 0 value to set
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_TTBR0(uint32_t ttbr0) {
+#if 1
+	__ASM volatile ("mcr p15, 0, %0, c2, c0, 0" : : "r" (ttbr0));
+#else
+    register uint32_t __regTTBR0        __ASM("cp15:0:c2:c0:0");
+    __regTTBR0 = ttbr0;
+#endif
+    __ISB();
+}
+
+/** \brief  Get DACR
+
+    This function returns the value of the Domain Access Control Register.
+
+    \return               Domain Access Control Register value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_DACR() {
+#if 1
+    register uint32_t __regDACR;
+    __ASM volatile ("mrc p15, 0, %0, c3, c0, 0" : "=r" (__regDACR));
+#else
+    register uint32_t __regDACR         __ASM("cp15:0:c3:c0:0");
+#endif
+    return(__regDACR);
+}
+
+/** \brief  Set DACR
+
+    This function assigns the given value to the Domain Access Control Register.
+
+    \param [in]    dacr   Domain Access Control Register value to set
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_DACR(uint32_t dacr) {
+#if 1
+	__ASM volatile ("mcr p15, 0, %0, c3, c0, 0" : : "r" (dacr));
+#else
+    register uint32_t __regDACR         __ASM("cp15:0:c3:c0:0");
+    __regDACR = dacr;
+#endif
+    __ISB();
+}
+
+/******************************** Cache and BTAC enable  ****************************************************/
+
+/** \brief  Set SCTLR
+
+    This function assigns the given value to the System Control Register.
+
+    \param [in]    sctlr  System Control Register value to set
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_SCTLR(uint32_t sctlr)
+{
+#if 1
+	__ASM volatile ("mcr p15, 0, %0, c1, c0, 0" : : "r" (sctlr));
+#else
+    register uint32_t __regSCTLR         __ASM("cp15:0:c1:c0:0");
+    __regSCTLR = sctlr;
+#endif
+}
+
+/** \brief  Get SCTLR
+
+    This function returns the value of the System Control Register.
+
+    \return               System Control Register value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_SCTLR() {
+#if 1
+	register uint32_t __regSCTLR;
+	__ASM volatile ("mrc p15, 0, %0, c1, c0, 0" : "=r" (__regSCTLR));
+#else
+    register uint32_t __regSCTLR         __ASM("cp15:0:c1:c0:0");
+#endif
+    return(__regSCTLR);
+}
+
+/** \brief  Enable Caches
+
+    Enable Caches
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_caches(void) {
+    // Set I bit 12 to enable I Cache
+    // Set C bit  2 to enable D Cache
+    __set_SCTLR( __get_SCTLR() | (1 << 12) | (1 << 2));
+}
+
+/** \brief  Disable Caches
+
+    Disable Caches
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __disable_caches(void) {
+    // Clear I bit 12 to disable I Cache
+    // Clear C bit  2 to disable D Cache
+    __set_SCTLR( __get_SCTLR() & ~(1 << 12) & ~(1 << 2));
+    __ISB();
+}
+
+/** \brief  Enable BTAC
+
+    Enable BTAC
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_btac(void) {
+    // Set Z bit 11 to enable branch prediction
+    __set_SCTLR( __get_SCTLR() | (1 << 11));
+    __ISB();
+}
+
+/** \brief  Disable BTAC
+
+    Disable BTAC
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __disable_btac(void) {
+    // Clear Z bit 11 to disable branch prediction
+    __set_SCTLR( __get_SCTLR() & ~(1 << 11));
+}
+
+
+/** \brief  Enable MMU
+
+    Enable MMU
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_mmu(void) {
+    // Set M bit 0 to enable the MMU
+    // Set AFE bit to enable simplified access permissions model
+    // Clear TRE bit to disable TEX remap and A bit to disable strict alignment fault checking
+    __set_SCTLR( (__get_SCTLR() & ~(1 << 28) & ~(1 << 1)) | 1 | (1 << 29));
+    __ISB();
+}
+
+/** \brief  Disable MMU
+
+    Disable MMU
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __disable_mmu(void) {
+    // Clear M bit 0 to disable the MMU
+    __set_SCTLR( __get_SCTLR() & ~1);
+    __ISB();
+}
+
+/******************************** TLB maintenance operations ************************************************/
+/** \brief  Invalidate the whole tlb
+
+    TLBIALL. Invalidate the whole tlb
+ */
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __ca9u_inv_tlb_all(void) {
+#if 1
+	__ASM volatile ("mcr p15, 0, %0, c8, c7, 0" : : "r" (0));
+#else
+    register uint32_t __TLBIALL         __ASM("cp15:0:c8:c7:0");
+    __TLBIALL = 0;
+#endif
+    __DSB();
+    __ISB();
+}
+
+/******************************** BTB maintenance operations ************************************************/
+/** \brief  Invalidate entire branch predictor array
+
+    BPIALL. Branch Predictor Invalidate All.
+ */
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __v7_inv_btac(void) {
+#if 1
+	__ASM volatile ("mcr p15, 0, %0, c7, c5, 6" : : "r" (0));
+#else
+    register uint32_t __BPIALL          __ASM("cp15:0:c7:c5:6");
+    __BPIALL  = 0;
+#endif
+    __DSB();     //ensure completion of the invalidation
+    __ISB();     //ensure instruction fetch path sees new state
+}
+
+
+/******************************** L1 cache operations ******************************************************/
+
+/** \brief  Invalidate the whole I$
+
+    ICIALLU. Instruction Cache Invalidate All to PoU
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __v7_inv_icache_all(void) {
+#if 1
+	__ASM volatile ("mcr p15, 0, %0, c7, c5, 0" : : "r" (0));
+#else
+    register uint32_t __ICIALLU         __ASM("cp15:0:c7:c5:0");
+    __ICIALLU = 0;
+#endif
+    __DSB();     //ensure completion of the invalidation
+    __ISB();     //ensure instruction fetch path sees new I cache state
+}
+
+/** \brief  Clean D$ by MVA
+
+    DCCMVAC. Data cache clean by MVA to PoC
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __v7_clean_dcache_mva(void *va) {
+#if 1
+    __ASM volatile ("mcr p15, 0, %0, c7, c10, 1" : : "r" ((uint32_t)va));
+#else
+    register uint32_t __DCCMVAC         __ASM("cp15:0:c7:c10:1");
+    __DCCMVAC = (uint32_t)va;
+#endif
+    __DMB();     //ensure the ordering of data cache maintenance operations and their effects
+}
+
+/** \brief  Invalidate D$ by MVA
+
+    DCIMVAC. Data cache invalidate by MVA to PoC
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __v7_inv_dcache_mva(void *va) {
+#if 1
+    __ASM volatile ("mcr p15, 0, %0, c7, c6, 1" : : "r" ((uint32_t)va));
+#else
+    register uint32_t __DCIMVAC         __ASM("cp15:0:c7:c6:1");
+    __DCIMVAC = (uint32_t)va;
+#endif
+    __DMB();     //ensure the ordering of data cache maintenance operations and their effects
+}
+
+/** \brief  Clean and Invalidate D$ by MVA
+
+    DCCIMVAC. Data cache clean and invalidate by MVA to PoC
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __v7_clean_inv_dcache_mva(void *va) {
+#if 1
+    __ASM volatile ("mcr p15, 0, %0, c7, c14, 1" : : "r" ((uint32_t)va));
+#else
+    register uint32_t __DCCIMVAC        __ASM("cp15:0:c7:c14:1");
+    __DCCIMVAC = (uint32_t)va;
+#endif
+    __DMB();     //ensure the ordering of data cache maintenance operations and their effects
+}
+
+/** \brief  Clean and Invalidate the entire data or unified cache
+
+    Generic mechanism for cleaning/invalidating the entire data or unified cache to the point of coherency.
+ */
+extern void __v7_all_cache(uint32_t op);
+
+
+/** \brief  Invalidate the whole D$
+
+    DCISW. Invalidate by Set/Way
+ */
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __v7_inv_dcache_all(void) {
+    __v7_all_cache(0);
+}
+
+/** \brief  Clean the whole D$
+
+    DCCSW. Clean by Set/Way
+ */
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __v7_clean_dcache_all(void) {
+    __v7_all_cache(1);
+}
+
+/** \brief  Clean and invalidate the whole D$
+
+    DCCISW. Clean and Invalidate by Set/Way
+ */
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __v7_clean_inv_dcache_all(void) {
+    __v7_all_cache(2);
+}
+
+#include "core_ca_mmu.h"
+
+#elif (defined (__TASKING__)) /*--------------- TASKING Compiler -----------------*/
+
+#error TASKING Compiler support not implemented for Cortex-A
+
+#endif
+
+/*@} end of CMSIS_Core_RegAccFunctions */
+
+
+#endif /* __CORE_CAFUNC_H__ */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_caInstr.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_caInstr.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_caInstr.h	(revision 270)
@@ -0,0 +1,45 @@
+/**************************************************************************//**
+ * @file     core_caInstr.h
+ * @brief    CMSIS Cortex-A9 Core Peripheral Access Layer Header File
+ * @version
+ * @date     04. December 2012
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2009 - 2012 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+#ifndef __CORE_CAINSTR_H__
+#define __CORE_CAINSTR_H__
+
+#define __CORTEX_M 0x3
+#include "core_cmInstr.h"
+#undef  __CORTEX_M
+
+#endif
+
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_ca_mmu.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_ca_mmu.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_ca_mmu.h	(revision 270)
@@ -0,0 +1,847 @@
+;/**************************************************************************//**
+; * @file     core_ca_mmu.h
+; * @brief    MMU Startup File for A9_MP Device Series
+; * @version  V1.01
+; * @date     10 Sept 2014
+; *
+; * @note
+; *
+; ******************************************************************************/
+;/* Copyright (c) 2012-2014 ARM LIMITED
+;
+;   All rights reserved.
+;   Redistribution and use in source and binary forms, with or without
+;   modification, are permitted provided that the following conditions are met:
+;   - Redistributions of source code must retain the above copyright
+;     notice, this list of conditions and the following disclaimer.
+;   - Redistributions in binary form must reproduce the above copyright
+;     notice, this list of conditions and the following disclaimer in the
+;     documentation and/or other materials provided with the distribution.
+;   - Neither the name of ARM nor the names of its contributors may be used
+;     to endorse or promote products derived from this software without
+;     specific prior written permission.
+;   *
+;   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+;   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+;   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+;   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+;   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+;   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+;   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+;   POSSIBILITY OF SUCH DAMAGE.
+;   ---------------------------------------------------------------------------*/
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+#ifndef _MMU_FUNC_H
+#define _MMU_FUNC_H
+
+#define SECTION_DESCRIPTOR      (0x2)
+#define SECTION_MASK            (0xFFFFFFFC)
+
+#define SECTION_TEXCB_MASK      (0xFFFF8FF3)
+#define SECTION_B_SHIFT         (2)
+#define SECTION_C_SHIFT         (3)
+#define SECTION_TEX0_SHIFT      (12)
+#define SECTION_TEX1_SHIFT      (13)
+#define SECTION_TEX2_SHIFT      (14)
+
+#define SECTION_XN_MASK         (0xFFFFFFEF)
+#define SECTION_XN_SHIFT        (4)
+
+#define SECTION_DOMAIN_MASK     (0xFFFFFE1F)
+#define SECTION_DOMAIN_SHIFT    (5)
+
+#define SECTION_P_MASK          (0xFFFFFDFF)
+#define SECTION_P_SHIFT         (9)
+
+#define SECTION_AP_MASK         (0xFFFF73FF)
+#define SECTION_AP_SHIFT        (10)
+#define SECTION_AP2_SHIFT       (15)
+
+#define SECTION_S_MASK          (0xFFFEFFFF)
+#define SECTION_S_SHIFT         (16)
+
+#define SECTION_NG_MASK         (0xFFFDFFFF)
+#define SECTION_NG_SHIFT        (17)
+
+#define SECTION_NS_MASK         (0xFFF7FFFF)
+#define SECTION_NS_SHIFT        (19)
+
+
+#define PAGE_L1_DESCRIPTOR      (0x1)
+#define PAGE_L1_MASK            (0xFFFFFFFC)
+
+#define PAGE_L2_4K_DESC         (0x2)
+#define PAGE_L2_4K_MASK         (0xFFFFFFFD)
+
+#define PAGE_L2_64K_DESC        (0x1)
+#define PAGE_L2_64K_MASK        (0xFFFFFFFC)
+
+#define PAGE_4K_TEXCB_MASK      (0xFFFFFE33)
+#define PAGE_4K_B_SHIFT         (2)
+#define PAGE_4K_C_SHIFT         (3)
+#define PAGE_4K_TEX0_SHIFT      (6)
+#define PAGE_4K_TEX1_SHIFT      (7)
+#define PAGE_4K_TEX2_SHIFT      (8)
+
+#define PAGE_64K_TEXCB_MASK     (0xFFFF8FF3)
+#define PAGE_64K_B_SHIFT        (2)
+#define PAGE_64K_C_SHIFT        (3)
+#define PAGE_64K_TEX0_SHIFT     (12)
+#define PAGE_64K_TEX1_SHIFT     (13)
+#define PAGE_64K_TEX2_SHIFT     (14)
+
+#define PAGE_TEXCB_MASK         (0xFFFF8FF3)
+#define PAGE_B_SHIFT            (2)
+#define PAGE_C_SHIFT            (3)
+#define PAGE_TEX_SHIFT          (12)
+
+#define PAGE_XN_4K_MASK         (0xFFFFFFFE)
+#define PAGE_XN_4K_SHIFT        (0)
+#define PAGE_XN_64K_MASK        (0xFFFF7FFF)
+#define PAGE_XN_64K_SHIFT       (15)
+
+
+#define PAGE_DOMAIN_MASK        (0xFFFFFE1F)
+#define PAGE_DOMAIN_SHIFT       (5)
+
+#define PAGE_P_MASK             (0xFFFFFDFF)
+#define PAGE_P_SHIFT            (9)
+
+#define PAGE_AP_MASK            (0xFFFFFDCF)
+#define PAGE_AP_SHIFT           (4)
+#define PAGE_AP2_SHIFT          (9)
+
+#define PAGE_S_MASK             (0xFFFFFBFF)
+#define PAGE_S_SHIFT            (10)
+
+#define PAGE_NG_MASK            (0xFFFFF7FF)
+#define PAGE_NG_SHIFT           (11)
+
+#define PAGE_NS_MASK            (0xFFFFFFF7)
+#define PAGE_NS_SHIFT           (3)
+
+#define OFFSET_1M               (0x00100000)
+#define OFFSET_64K              (0x00010000)
+#define OFFSET_4K               (0x00001000)
+
+#define DESCRIPTOR_FAULT        (0x00000000)
+
+/* ###########################  MMU Function Access  ########################### */
+/** \ingroup  MMU_FunctionInterface
+    \defgroup MMU_Functions MMU Functions Interface
+  @{
+ */
+
+/* Attributes enumerations */
+
+/* Region size attributes */
+typedef enum
+{
+   SECTION,
+   PAGE_4k,
+   PAGE_64k,
+} mmu_region_size_Type;
+
+/* Region type attributes */
+typedef enum
+{
+   NORMAL,
+   DEVICE,
+   SHARED_DEVICE,
+   NON_SHARED_DEVICE,
+   STRONGLY_ORDERED
+} mmu_memory_Type;
+
+/* Region cacheability attributes */
+typedef enum
+{
+   NON_CACHEABLE,
+   WB_WA,
+   WT,
+   WB_NO_WA,
+} mmu_cacheability_Type;
+
+/* Region parity check attributes */
+typedef enum
+{
+   ECC_DISABLED,
+   ECC_ENABLED,
+} mmu_ecc_check_Type;
+
+/* Region execution attributes */
+typedef enum
+{
+   EXECUTE,
+   NON_EXECUTE,
+} mmu_execute_Type;
+
+/* Region global attributes */
+typedef enum
+{
+   GLOBAL,
+   NON_GLOBAL,
+} mmu_global_Type;
+
+/* Region shareability attributes */
+typedef enum
+{
+   NON_SHARED,
+   SHARED,
+} mmu_shared_Type;
+
+/* Region security attributes */
+typedef enum
+{
+   SECURE,
+   NON_SECURE,
+} mmu_secure_Type;
+
+/* Region access attributes */
+typedef enum
+{
+   NO_ACCESS,
+   RW,
+   READ,
+} mmu_access_Type;
+
+/* Memory Region definition */
+typedef struct RegionStruct {
+    mmu_region_size_Type rg_t;
+    mmu_memory_Type mem_t;
+    uint8_t domain;
+    mmu_cacheability_Type inner_norm_t;
+    mmu_cacheability_Type outer_norm_t;
+    mmu_ecc_check_Type e_t;
+    mmu_execute_Type xn_t;
+    mmu_global_Type g_t;
+    mmu_secure_Type sec_t;
+    mmu_access_Type priv_t;
+    mmu_access_Type user_t;
+    mmu_shared_Type sh_t;
+
+} mmu_region_attributes_Type;
+
+/** \brief  Set section execution-never attribute
+
+    The function sets section execution-never attribute
+
+    \param [out]    descriptor_l1  L1 descriptor.
+    \param [in]                xn  Section execution-never attribute : EXECUTE , NON_EXECUTE.
+
+    \return          0  
+ */
+__STATIC_INLINE int __xn_section(uint32_t *descriptor_l1, mmu_execute_Type xn)
+{
+    *descriptor_l1 &= SECTION_XN_MASK;
+    *descriptor_l1 |= ((xn & 0x1) << SECTION_XN_SHIFT);
+    return 0;
+}
+
+/** \brief  Set section domain
+
+    The function sets section domain
+
+    \param [out]    descriptor_l1  L1 descriptor.
+    \param [in]            domain  Section domain
+
+    \return          0  
+ */
+__STATIC_INLINE int __domain_section(uint32_t *descriptor_l1, uint8_t domain)
+{
+    *descriptor_l1 &= SECTION_DOMAIN_MASK;
+    *descriptor_l1 |= ((domain & 0xF) << SECTION_DOMAIN_SHIFT);
+    return 0;
+}
+
+/** \brief  Set section parity check
+
+    The function sets section parity check
+
+    \param [out]    descriptor_l1  L1 descriptor.
+    \param [in]              p_bit Parity check: ECC_DISABLED, ECC_ENABLED
+
+    \return          0  
+ */
+__STATIC_INLINE int __p_section(uint32_t *descriptor_l1, mmu_ecc_check_Type p_bit)
+{
+    *descriptor_l1 &= SECTION_P_MASK;
+    *descriptor_l1 |= ((p_bit & 0x1) << SECTION_P_SHIFT);
+    return 0;
+}
+
+/** \brief  Set section access privileges
+
+    The function sets section access privileges
+
+    \param [out]    descriptor_l1  L1 descriptor.
+    \param [in]              user  User Level Access: NO_ACCESS, RW, READ
+    \param [in]              priv  Privilege Level Access: NO_ACCESS, RW, READ
+    \param [in]               afe  Access flag enable
+
+    \return          0  
+ */
+__STATIC_INLINE int __ap_section(uint32_t *descriptor_l1, mmu_access_Type user, mmu_access_Type priv,  uint32_t afe)
+{
+    uint32_t ap = 0;
+
+    if (afe == 0) { //full access
+        if ((priv == NO_ACCESS) && (user == NO_ACCESS)) { ap = 0x0; }
+        else if ((priv == RW) && (user == NO_ACCESS))   { ap = 0x1; }
+        else if ((priv == RW) && (user == READ))        { ap = 0x2; }
+        else if ((priv == RW) && (user == RW))          { ap = 0x3; }
+        else if ((priv == READ) && (user == NO_ACCESS)) { ap = 0x5; }
+        else if ((priv == READ) && (user == READ))      { ap = 0x7; }
+    }
+
+    else { //Simplified access
+        if ((priv == RW) && (user == NO_ACCESS))        { ap = 0x1; }
+        else if ((priv == RW) && (user == RW))          { ap = 0x3; }
+        else if ((priv == READ) && (user == NO_ACCESS)) { ap = 0x5; }
+        else if ((priv == READ) && (user == READ))      { ap = 0x7; }
+    }
+
+    *descriptor_l1 &= SECTION_AP_MASK;
+    *descriptor_l1 |= (ap & 0x3) << SECTION_AP_SHIFT;
+    *descriptor_l1 |= ((ap & 0x4)>>2) << SECTION_AP2_SHIFT;
+
+    return 0;
+}
+
+/** \brief  Set section shareability
+
+    The function sets section shareability
+
+    \param [out]    descriptor_l1  L1 descriptor.
+    \param [in]             s_bit  Section shareability: NON_SHARED, SHARED
+
+    \return          0  
+ */
+__STATIC_INLINE int __shared_section(uint32_t *descriptor_l1, mmu_shared_Type s_bit)
+{
+    *descriptor_l1 &= SECTION_S_MASK;
+    *descriptor_l1 |= ((s_bit & 0x1) << SECTION_S_SHIFT);
+    return 0;
+}
+
+/** \brief  Set section Global attribute
+
+    The function sets section Global attribute
+
+    \param [out]    descriptor_l1  L1 descriptor.
+    \param [in]             g_bit  Section attribute: GLOBAL, NON_GLOBAL
+
+    \return          0  
+ */
+__STATIC_INLINE int __global_section(uint32_t *descriptor_l1, mmu_global_Type g_bit)
+{
+    *descriptor_l1 &= SECTION_NG_MASK;
+    *descriptor_l1 |= ((g_bit & 0x1) << SECTION_NG_SHIFT);
+    return 0;
+}
+
+/** \brief  Set section Security attribute
+
+    The function sets section Global attribute
+
+    \param [out]    descriptor_l1  L1 descriptor.
+    \param [in]             s_bit  Section Security attribute: SECURE, NON_SECURE
+
+    \return          0  
+ */
+__STATIC_INLINE int __secure_section(uint32_t *descriptor_l1, mmu_secure_Type s_bit)
+{
+    *descriptor_l1 &= SECTION_NS_MASK;
+    *descriptor_l1 |= ((s_bit & 0x1) << SECTION_NS_SHIFT);
+    return 0;
+}
+
+/* Page 4k or 64k */
+/** \brief  Set 4k/64k page execution-never attribute
+
+    The function sets 4k/64k page execution-never attribute
+
+    \param [out]    descriptor_l2  L2 descriptor.
+    \param [in]                xn  Page execution-never attribute : EXECUTE , NON_EXECUTE.
+    \param [in]              page  Page size: PAGE_4k, PAGE_64k,
+   
+    \return          0  
+ */
+__STATIC_INLINE int __xn_page(uint32_t *descriptor_l2, mmu_execute_Type xn, mmu_region_size_Type page)
+{
+    if (page == PAGE_4k)
+    {
+        *descriptor_l2 &= PAGE_XN_4K_MASK;
+        *descriptor_l2 |= ((xn & 0x1) << PAGE_XN_4K_SHIFT);
+    }
+    else
+    {
+        *descriptor_l2 &= PAGE_XN_64K_MASK;
+        *descriptor_l2 |= ((xn & 0x1) << PAGE_XN_64K_SHIFT);
+    }
+    return 0;
+}
+
+/** \brief  Set 4k/64k page domain
+
+    The function sets 4k/64k page domain
+
+    \param [out]    descriptor_l1  L1 descriptor.
+    \param [in]            domain  Page domain
+
+    \return          0  
+ */
+__STATIC_INLINE int __domain_page(uint32_t *descriptor_l1, uint8_t domain)
+{
+    *descriptor_l1 &= PAGE_DOMAIN_MASK;
+    *descriptor_l1 |= ((domain & 0xf) << PAGE_DOMAIN_SHIFT);
+    return 0;
+}
+
+/** \brief  Set 4k/64k page parity check
+
+    The function sets 4k/64k page parity check
+
+    \param [out]    descriptor_l1  L1 descriptor.
+    \param [in]              p_bit Parity check: ECC_DISABLED, ECC_ENABLED
+
+    \return          0  
+ */
+__STATIC_INLINE int __p_page(uint32_t *descriptor_l1, mmu_ecc_check_Type p_bit)
+{
+    *descriptor_l1 &= SECTION_P_MASK;
+    *descriptor_l1 |= ((p_bit & 0x1) << SECTION_P_SHIFT);
+    return 0;
+}
+
+/** \brief  Set 4k/64k page access privileges
+
+    The function sets 4k/64k page access privileges
+
+    \param [out]    descriptor_l2  L2 descriptor.
+    \param [in]              user  User Level Access: NO_ACCESS, RW, READ
+    \param [in]              priv  Privilege Level Access: NO_ACCESS, RW, READ
+    \param [in]               afe  Access flag enable
+
+    \return          0  
+ */
+__STATIC_INLINE int __ap_page(uint32_t *descriptor_l2, mmu_access_Type user, mmu_access_Type priv,  uint32_t afe)
+{
+    uint32_t ap = 0;
+
+    if (afe == 0) { //full access
+        if ((priv == NO_ACCESS) && (user == NO_ACCESS)) { ap = 0x0; }
+        else if ((priv == RW) && (user == NO_ACCESS))   { ap = 0x1; }
+        else if ((priv == RW) && (user == READ))        { ap = 0x2; }
+        else if ((priv == RW) && (user == RW))          { ap = 0x3; }
+        else if ((priv == READ) && (user == NO_ACCESS)) { ap = 0x5; }
+        else if ((priv == READ) && (user == READ))      { ap = 0x6; }
+    }
+
+    else { //Simplified access
+        if ((priv == RW) && (user == NO_ACCESS))        { ap = 0x1; }
+        else if ((priv == RW) && (user == RW))          { ap = 0x3; }
+        else if ((priv == READ) && (user == NO_ACCESS)) { ap = 0x5; }
+        else if ((priv == READ) && (user == READ))      { ap = 0x7; }
+    }
+
+    *descriptor_l2 &= PAGE_AP_MASK;
+    *descriptor_l2 |= (ap & 0x3) << PAGE_AP_SHIFT;
+    *descriptor_l2 |= ((ap & 0x4)>>2) << PAGE_AP2_SHIFT;
+
+    return 0;
+}
+
+/** \brief  Set 4k/64k page shareability
+
+    The function sets 4k/64k page shareability
+
+    \param [out]    descriptor_l2  L2 descriptor.
+    \param [in]             s_bit  4k/64k page shareability: NON_SHARED, SHARED
+
+    \return          0  
+ */
+__STATIC_INLINE int __shared_page(uint32_t *descriptor_l2, mmu_shared_Type s_bit)
+{
+    *descriptor_l2 &= PAGE_S_MASK;
+    *descriptor_l2 |= ((s_bit & 0x1) << PAGE_S_SHIFT);
+    return 0;
+}
+
+/** \brief  Set 4k/64k page Global attribute
+
+    The function sets 4k/64k page Global attribute
+
+    \param [out]    descriptor_l2  L2 descriptor.
+    \param [in]             g_bit  4k/64k page attribute: GLOBAL, NON_GLOBAL
+
+    \return          0  
+ */
+__STATIC_INLINE int __global_page(uint32_t *descriptor_l2, mmu_global_Type g_bit)
+{
+    *descriptor_l2 &= PAGE_NG_MASK;
+    *descriptor_l2 |= ((g_bit & 0x1) << PAGE_NG_SHIFT);
+    return 0;
+}
+
+/** \brief  Set 4k/64k page Security attribute
+
+    The function sets 4k/64k page Global attribute
+
+    \param [out]    descriptor_l1  L1 descriptor.
+    \param [in]             s_bit  4k/64k page Security attribute: SECURE, NON_SECURE
+
+    \return          0  
+ */
+__STATIC_INLINE int __secure_page(uint32_t *descriptor_l1, mmu_secure_Type s_bit)
+{
+    *descriptor_l1 &= PAGE_NS_MASK;
+    *descriptor_l1 |= ((s_bit & 0x1) << PAGE_NS_SHIFT);
+    return 0;
+}
+
+
+/** \brief  Set Section memory attributes
+
+    The function sets section memory attributes
+
+    \param [out]    descriptor_l1  L1 descriptor.
+    \param [in]               mem  Section memory type: NORMAL, DEVICE, SHARED_DEVICE, NON_SHARED_DEVICE, STRONGLY_ORDERED
+    \param [in]             outer  Outer cacheability: NON_CACHEABLE, WB_WA, WT, WB_NO_WA,
+    \param [in]             inner  Inner cacheability: NON_CACHEABLE, WB_WA, WT, WB_NO_WA,
+
+    \return          0  
+ */
+__STATIC_INLINE int __memory_section(uint32_t *descriptor_l1, mmu_memory_Type mem, mmu_cacheability_Type outer, mmu_cacheability_Type inner)
+{
+    *descriptor_l1 &= SECTION_TEXCB_MASK;
+
+    if (STRONGLY_ORDERED == mem)
+    {
+        return 0;
+    }
+    else if (SHARED_DEVICE == mem)
+    {
+        *descriptor_l1 |= (1 << SECTION_B_SHIFT);
+    }
+    else if (NON_SHARED_DEVICE == mem)
+    {
+        *descriptor_l1 |= (1 << SECTION_TEX1_SHIFT);
+    }
+    else if (NORMAL == mem)
+    {
+           *descriptor_l1 |= 1 << SECTION_TEX2_SHIFT;
+           switch(inner)
+           {
+            case NON_CACHEABLE:
+            break;
+            case WB_WA:
+                *descriptor_l1 |= (1 << SECTION_B_SHIFT);
+                break;
+            case WT:
+                *descriptor_l1 |= 1 << SECTION_C_SHIFT;
+                break;
+            case WB_NO_WA:
+                *descriptor_l1 |= (1 << SECTION_B_SHIFT) | (1 << SECTION_C_SHIFT);
+                break;
+        }
+        switch(outer)
+        {
+            case NON_CACHEABLE:
+             break;
+            case WB_WA:
+                *descriptor_l1 |= (1 << SECTION_TEX0_SHIFT);
+                break;
+            case WT:
+                *descriptor_l1 |= 1 << SECTION_TEX1_SHIFT;
+                break;
+            case WB_NO_WA:
+                *descriptor_l1 |= (1 << SECTION_TEX0_SHIFT) | (1 << SECTION_TEX0_SHIFT);
+                break;
+        }
+    }
+
+    return 0;
+}
+
+/** \brief  Set 4k/64k page memory attributes
+
+    The function sets 4k/64k page memory attributes
+
+    \param [out]    descriptor_l2  L2 descriptor.
+    \param [in]               mem  4k/64k page memory type: NORMAL, DEVICE, SHARED_DEVICE, NON_SHARED_DEVICE, STRONGLY_ORDERED
+    \param [in]             outer  Outer cacheability: NON_CACHEABLE, WB_WA, WT, WB_NO_WA,
+    \param [in]             inner  Inner cacheability: NON_CACHEABLE, WB_WA, WT, WB_NO_WA,
+
+    \return          0  
+ */
+__STATIC_INLINE int __memory_page(uint32_t *descriptor_l2, mmu_memory_Type mem, mmu_cacheability_Type outer, mmu_cacheability_Type inner, mmu_region_size_Type page)
+{
+    *descriptor_l2 &= PAGE_4K_TEXCB_MASK;
+
+    if (page == PAGE_64k)
+    {
+        //same as section
+        __memory_section(descriptor_l2, mem, outer, inner);
+    }
+    else
+    {
+        if (STRONGLY_ORDERED == mem)
+        {
+            return 0;
+        }
+        else if (SHARED_DEVICE == mem)
+        {
+            *descriptor_l2 |= (1 << PAGE_4K_B_SHIFT);
+        }
+        else if (NON_SHARED_DEVICE == mem)
+        {
+             *descriptor_l2 |= (1 << PAGE_4K_TEX1_SHIFT);
+        }
+        else if (NORMAL == mem)
+        {
+            *descriptor_l2 |= 1 << PAGE_4K_TEX2_SHIFT;
+            switch(inner)
+            {
+                case NON_CACHEABLE:
+                break;
+                case WB_WA:
+                     *descriptor_l2 |= (1 << PAGE_4K_B_SHIFT);
+                     break;
+                case WT:
+                    *descriptor_l2 |= 1 << PAGE_4K_C_SHIFT;
+                     break;
+                case WB_NO_WA:
+                    *descriptor_l2 |= (1 << PAGE_4K_B_SHIFT) | (1 << PAGE_4K_C_SHIFT);
+                    break;
+            }
+            switch(outer)
+            {
+                case NON_CACHEABLE:
+                break;
+                case WB_WA:
+                      *descriptor_l2 |= (1 << PAGE_4K_TEX0_SHIFT);
+                    break;
+                case WT:
+                     *descriptor_l2 |= 1 << PAGE_4K_TEX1_SHIFT;
+                    break;
+                case WB_NO_WA:
+                    *descriptor_l2 |= (1 << PAGE_4K_TEX0_SHIFT) | (1 << PAGE_4K_TEX0_SHIFT);
+                    break;
+            }
+        }
+    }
+
+    return 0;
+}
+
+/** \brief  Create a L1 section descriptor
+
+    The function creates a section descriptor.
+    
+    Assumptions:
+    - 16MB super sections not supported
+    - TEX remap disabled, so memory type and attributes are described directly by bits in the descriptor
+    - Functions always return 0
+
+    \param [out]       descriptor  L1 descriptor
+    \param [out]      descriptor2  L2 descriptor
+    \param [in]               reg  Section attributes
+
+    \return          0  
+ */
+__STATIC_INLINE int __get_section_descriptor(uint32_t *descriptor, mmu_region_attributes_Type reg)
+{
+    *descriptor  = 0;
+
+   __memory_section(descriptor, reg.mem_t, reg.outer_norm_t, reg.inner_norm_t);
+   __xn_section(descriptor,reg.xn_t);
+   __domain_section(descriptor, reg.domain);
+   __p_section(descriptor, reg.e_t);
+   __ap_section(descriptor, reg.priv_t, reg.user_t, 1);
+   __shared_section(descriptor,reg.sh_t);
+   __global_section(descriptor,reg.g_t);
+   __secure_section(descriptor,reg.sec_t);
+   *descriptor &= SECTION_MASK;
+   *descriptor |= SECTION_DESCRIPTOR;
+
+   return 0;
+
+}
+
+
+/** \brief  Create a L1 and L2 4k/64k page descriptor
+
+    The function creates a 4k/64k page descriptor.
+    Assumptions:
+    - TEX remap disabled, so memory type and attributes are described directly by bits in the descriptor
+    - Functions always return 0
+
+    \param [out]       descriptor  L1 descriptor
+    \param [out]      descriptor2  L2 descriptor
+    \param [in]               reg  4k/64k page attributes
+
+    \return          0  
+ */
+__STATIC_INLINE int __get_page_descriptor(uint32_t *descriptor, uint32_t *descriptor2, mmu_region_attributes_Type reg)
+{
+    *descriptor  = 0;
+    *descriptor2 = 0;
+
+    switch (reg.rg_t)
+    {
+        case PAGE_4k:
+            __memory_page(descriptor2, reg.mem_t, reg.outer_norm_t, reg.inner_norm_t, PAGE_4k);
+            __xn_page(descriptor2, reg.xn_t, PAGE_4k);
+            __domain_page(descriptor, reg.domain);
+            __p_page(descriptor, reg.e_t);
+            __ap_page(descriptor2, reg.priv_t, reg.user_t, 1);
+            __shared_page(descriptor2,reg.sh_t);
+            __global_page(descriptor2,reg.g_t);
+            __secure_page(descriptor,reg.sec_t);
+            *descriptor &= PAGE_L1_MASK;
+            *descriptor |= PAGE_L1_DESCRIPTOR;
+            *descriptor2 &= PAGE_L2_4K_MASK;
+            *descriptor2 |= PAGE_L2_4K_DESC;
+            break;
+
+        case PAGE_64k:
+            __memory_page(descriptor2, reg.mem_t, reg.outer_norm_t, reg.inner_norm_t, PAGE_64k);
+            __xn_page(descriptor2, reg.xn_t, PAGE_64k);
+            __domain_page(descriptor, reg.domain);
+            __p_page(descriptor, reg.e_t);
+            __ap_page(descriptor2, reg.priv_t, reg.user_t, 1);
+            __shared_page(descriptor2,reg.sh_t);
+            __global_page(descriptor2,reg.g_t);
+            __secure_page(descriptor,reg.sec_t);
+            *descriptor &= PAGE_L1_MASK;
+            *descriptor |= PAGE_L1_DESCRIPTOR;
+            *descriptor2 &= PAGE_L2_64K_MASK;
+            *descriptor2 |= PAGE_L2_64K_DESC;
+            break;
+
+        case SECTION:
+            //error
+            break;    
+
+    }
+
+   return 0;
+
+}
+
+/** \brief  Create a 1MB Section
+
+    \param [in]               ttb  Translation table base address
+    \param [in]      base_address  Section base address
+    \param [in]             count  Number of sections to create
+    \param [in]     descriptor_l1  L1 descriptor (region attributes) 
+
+ */
+__STATIC_INLINE void __TTSection(uint32_t *ttb, uint32_t base_address, uint32_t count, uint32_t descriptor_l1)
+{
+    uint32_t offset;
+    uint32_t entry;
+    uint32_t i;
+
+    offset = base_address >> 20;
+    entry  = (base_address & 0xFFF00000) | descriptor_l1;
+
+    //4 bytes aligned
+    ttb = ttb + offset;
+
+    for (i = 0; i < count; i++ )
+    {
+        //4 bytes aligned
+       *ttb++ = entry;
+       entry += OFFSET_1M;
+    }
+}
+
+/** \brief  Create a 4k page entry
+
+    \param [in]               ttb  L1 table base address
+    \param [in]      base_address  4k base address
+    \param [in]             count  Number of 4k pages to create
+    \param [in]     descriptor_l1  L1 descriptor (region attributes) 
+    \param [in]            ttb_l2  L2 table base address
+    \param [in]     descriptor_l2  L2 descriptor (region attributes) 
+
+ */
+__STATIC_INLINE void __TTPage_4k(uint32_t *ttb, uint32_t base_address, uint32_t count, uint32_t descriptor_l1, uint32_t *ttb_l2, uint32_t descriptor_l2 )
+{
+
+    uint32_t offset, offset2;
+    uint32_t entry, entry2;
+    uint32_t i;
+
+
+    offset = base_address >> 20;
+    entry  = ((int)ttb_l2 & 0xFFFFFC00) | descriptor_l1;
+
+    //4 bytes aligned
+    ttb += offset;
+    //create l1_entry
+    *ttb = entry;
+
+    offset2 = (base_address & 0xff000) >> 12;
+    ttb_l2 += offset2;
+    entry2 = (base_address & 0xFFFFF000) | descriptor_l2;
+    for (i = 0; i < count; i++ )
+    {
+        //4 bytes aligned
+       *ttb_l2++ = entry2;
+       entry2 += OFFSET_4K;
+    }
+}
+
+/** \brief  Create a 64k page entry
+
+    \param [in]               ttb  L1 table base address
+    \param [in]      base_address  64k base address
+    \param [in]             count  Number of 64k pages to create
+    \param [in]     descriptor_l1  L1 descriptor (region attributes) 
+    \param [in]            ttb_l2  L2 table base address
+    \param [in]     descriptor_l2  L2 descriptor (region attributes) 
+
+ */
+__STATIC_INLINE void __TTPage_64k(uint32_t *ttb, uint32_t base_address, uint32_t count, uint32_t descriptor_l1, uint32_t *ttb_l2, uint32_t descriptor_l2 )
+{
+    uint32_t offset, offset2;
+    uint32_t entry, entry2;
+    uint32_t i,j;
+
+
+    offset = base_address >> 20;
+    entry  = ((int)ttb_l2 & 0xFFFFFC00) | descriptor_l1;
+
+    //4 bytes aligned
+    ttb += offset;
+    //create l1_entry
+    *ttb = entry;
+
+    offset2 = (base_address & 0xff000) >> 12;
+    ttb_l2 += offset2;
+    entry2 = (base_address & 0xFFFF0000) | descriptor_l2;
+    for (i = 0; i < count; i++ )
+    {
+        //create 16 entries
+        for (j = 0; j < 16; j++)
+            //4 bytes aligned
+            *ttb_l2++ = entry2;
+        entry2 += OFFSET_64K;
+    }
+}
+
+/*@} end of MMU_Functions */
+#endif
+
+#ifdef __cplusplus
+}
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cm0.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cm0.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cm0.h	(revision 270)
@@ -0,0 +1,682 @@
+/**************************************************************************//**
+ * @file     core_cm0.h
+ * @brief    CMSIS Cortex-M0 Core Peripheral Access Layer Header File
+ * @version  V3.20
+ * @date     25. February 2013
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2009 - 2013 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+
+#if defined ( __ICCARM__ )
+ #pragma system_include  /* treat file as system include file for MISRA check */
+#endif
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+#ifndef __CORE_CM0_H_GENERIC
+#define __CORE_CM0_H_GENERIC
+
+/** \page CMSIS_MISRA_Exceptions  MISRA-C:2004 Compliance Exceptions
+  CMSIS violates the following MISRA-C:2004 rules:
+
+   \li Required Rule 8.5, object/function definition in header file.<br>
+     Function definitions in header files are used to allow 'inlining'.
+
+   \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.<br>
+     Unions are used for effective representation of core registers.
+
+   \li Advisory Rule 19.7, Function-like macro defined.<br>
+     Function-like macros are used to allow more efficient code.
+ */
+
+
+/*******************************************************************************
+ *                 CMSIS definitions
+ ******************************************************************************/
+/** \ingroup Cortex_M0
+  @{
+ */
+
+/*  CMSIS CM0 definitions */
+#define __CM0_CMSIS_VERSION_MAIN  (0x03)                                   /*!< [31:16] CMSIS HAL main version   */
+#define __CM0_CMSIS_VERSION_SUB   (0x20)                                   /*!< [15:0]  CMSIS HAL sub version    */
+#define __CM0_CMSIS_VERSION       ((__CM0_CMSIS_VERSION_MAIN << 16) | \
+                                    __CM0_CMSIS_VERSION_SUB          )     /*!< CMSIS HAL version number         */
+
+#define __CORTEX_M                (0x00)                                   /*!< Cortex-M Core                    */
+
+
+#if   defined ( __CC_ARM )
+  #define __ASM            __asm                                      /*!< asm keyword for ARM Compiler          */
+  #define __INLINE         __inline                                   /*!< inline keyword for ARM Compiler       */
+  #define __STATIC_INLINE  static __inline
+
+#elif defined ( __ICCARM__ )
+  #define __ASM            __asm                                      /*!< asm keyword for IAR Compiler          */
+  #define __INLINE         inline                                     /*!< inline keyword for IAR Compiler. Only available in High optimization mode! */
+  #define __STATIC_INLINE  static inline
+
+#elif defined ( __GNUC__ )
+  #define __ASM            __asm                                      /*!< asm keyword for GNU Compiler          */
+  #define __INLINE         inline                                     /*!< inline keyword for GNU Compiler       */
+  #define __STATIC_INLINE  static inline
+
+#elif defined ( __TASKING__ )
+  #define __ASM            __asm                                      /*!< asm keyword for TASKING Compiler      */
+  #define __INLINE         inline                                     /*!< inline keyword for TASKING Compiler   */
+  #define __STATIC_INLINE  static inline
+
+#endif
+
+/** __FPU_USED indicates whether an FPU is used or not. This core does not support an FPU at all
+*/
+#define __FPU_USED       0
+
+#if defined ( __CC_ARM )
+  #if defined __TARGET_FPU_VFP
+    #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+  #endif
+
+#elif defined ( __ICCARM__ )
+  #if defined __ARMVFP__
+    #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+  #endif
+
+#elif defined ( __GNUC__ )
+  #if defined (__VFP_FP__) && !defined(__SOFTFP__)
+    #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+  #endif
+
+#elif defined ( __TASKING__ )
+  #if defined __FPU_VFP__
+    #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+  #endif
+#endif
+
+#include <stdint.h>                      /* standard types definitions                      */
+#include <core_cmInstr.h>                /* Core Instruction Access                         */
+#include <core_cmFunc.h>                 /* Core Function Access                            */
+
+#endif /* __CORE_CM0_H_GENERIC */
+
+#ifndef __CMSIS_GENERIC
+
+#ifndef __CORE_CM0_H_DEPENDANT
+#define __CORE_CM0_H_DEPENDANT
+
+/* check device defines and use defaults */
+#if defined __CHECK_DEVICE_DEFINES
+  #ifndef __CM0_REV
+    #define __CM0_REV               0x0000
+    #warning "__CM0_REV not defined in device header file; using default!"
+  #endif
+
+  #ifndef __NVIC_PRIO_BITS
+    #define __NVIC_PRIO_BITS          2
+    #warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
+  #endif
+
+  #ifndef __Vendor_SysTickConfig
+    #define __Vendor_SysTickConfig    0
+    #warning "__Vendor_SysTickConfig not defined in device header file; using default!"
+  #endif
+#endif
+
+/* IO definitions (access restrictions to peripheral registers) */
+/**
+    \defgroup CMSIS_glob_defs CMSIS Global Defines
+
+    <strong>IO Type Qualifiers</strong> are used
+    \li to specify the access to peripheral variables.
+    \li for automatic generation of peripheral register debug information.
+*/
+#ifdef __cplusplus
+  #define   __I     volatile             /*!< Defines 'read only' permissions                 */
+#else
+  #define   __I     volatile const       /*!< Defines 'read only' permissions                 */
+#endif
+#define     __O     volatile             /*!< Defines 'write only' permissions                */
+#define     __IO    volatile             /*!< Defines 'read / write' permissions              */
+
+/*@} end of group Cortex_M0 */
+
+
+
+/*******************************************************************************
+ *                 Register Abstraction
+  Core Register contain:
+  - Core Register
+  - Core NVIC Register
+  - Core SCB Register
+  - Core SysTick Register
+ ******************************************************************************/
+/** \defgroup CMSIS_core_register Defines and Type Definitions
+    \brief Type definitions and defines for Cortex-M processor based devices.
+*/
+
+/** \ingroup    CMSIS_core_register
+    \defgroup   CMSIS_CORE  Status and Control Registers
+    \brief  Core Register type definitions.
+  @{
+ */
+
+/** \brief  Union type to access the Application Program Status Register (APSR).
+ */
+typedef union
+{
+  struct
+  {
+#if (__CORTEX_M != 0x04)
+    uint32_t _reserved0:27;              /*!< bit:  0..26  Reserved                           */
+#else
+    uint32_t _reserved0:16;              /*!< bit:  0..15  Reserved                           */
+    uint32_t GE:4;                       /*!< bit: 16..19  Greater than or Equal flags        */
+    uint32_t _reserved1:7;               /*!< bit: 20..26  Reserved                           */
+#endif
+    uint32_t Q:1;                        /*!< bit:     27  Saturation condition flag          */
+    uint32_t V:1;                        /*!< bit:     28  Overflow condition code flag       */
+    uint32_t C:1;                        /*!< bit:     29  Carry condition code flag          */
+    uint32_t Z:1;                        /*!< bit:     30  Zero condition code flag           */
+    uint32_t N:1;                        /*!< bit:     31  Negative condition code flag       */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} APSR_Type;
+
+
+/** \brief  Union type to access the Interrupt Program Status Register (IPSR).
+ */
+typedef union
+{
+  struct
+  {
+    uint32_t ISR:9;                      /*!< bit:  0.. 8  Exception number                   */
+    uint32_t _reserved0:23;              /*!< bit:  9..31  Reserved                           */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} IPSR_Type;
+
+
+/** \brief  Union type to access the Special-Purpose Program Status Registers (xPSR).
+ */
+typedef union
+{
+  struct
+  {
+    uint32_t ISR:9;                      /*!< bit:  0.. 8  Exception number                   */
+#if (__CORTEX_M != 0x04)
+    uint32_t _reserved0:15;              /*!< bit:  9..23  Reserved                           */
+#else
+    uint32_t _reserved0:7;               /*!< bit:  9..15  Reserved                           */
+    uint32_t GE:4;                       /*!< bit: 16..19  Greater than or Equal flags        */
+    uint32_t _reserved1:4;               /*!< bit: 20..23  Reserved                           */
+#endif
+    uint32_t T:1;                        /*!< bit:     24  Thumb bit        (read 0)          */
+    uint32_t IT:2;                       /*!< bit: 25..26  saved IT state   (read 0)          */
+    uint32_t Q:1;                        /*!< bit:     27  Saturation condition flag          */
+    uint32_t V:1;                        /*!< bit:     28  Overflow condition code flag       */
+    uint32_t C:1;                        /*!< bit:     29  Carry condition code flag          */
+    uint32_t Z:1;                        /*!< bit:     30  Zero condition code flag           */
+    uint32_t N:1;                        /*!< bit:     31  Negative condition code flag       */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} xPSR_Type;
+
+
+/** \brief  Union type to access the Control Registers (CONTROL).
+ */
+typedef union
+{
+  struct
+  {
+    uint32_t nPRIV:1;                    /*!< bit:      0  Execution privilege in Thread mode */
+    uint32_t SPSEL:1;                    /*!< bit:      1  Stack to be used                   */
+    uint32_t FPCA:1;                     /*!< bit:      2  FP extension active flag           */
+    uint32_t _reserved0:29;              /*!< bit:  3..31  Reserved                           */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} CONTROL_Type;
+
+/*@} end of group CMSIS_CORE */
+
+
+/** \ingroup    CMSIS_core_register
+    \defgroup   CMSIS_NVIC  Nested Vectored Interrupt Controller (NVIC)
+    \brief      Type definitions for the NVIC Registers
+  @{
+ */
+
+/** \brief  Structure type to access the Nested Vectored Interrupt Controller (NVIC).
+ */
+typedef struct
+{
+  __IO uint32_t ISER[1];                 /*!< Offset: 0x000 (R/W)  Interrupt Set Enable Register           */
+       uint32_t RESERVED0[31];
+  __IO uint32_t ICER[1];                 /*!< Offset: 0x080 (R/W)  Interrupt Clear Enable Register          */
+       uint32_t RSERVED1[31];
+  __IO uint32_t ISPR[1];                 /*!< Offset: 0x100 (R/W)  Interrupt Set Pending Register           */
+       uint32_t RESERVED2[31];
+  __IO uint32_t ICPR[1];                 /*!< Offset: 0x180 (R/W)  Interrupt Clear Pending Register         */
+       uint32_t RESERVED3[31];
+       uint32_t RESERVED4[64];
+  __IO uint32_t IP[8];                   /*!< Offset: 0x300 (R/W)  Interrupt Priority Register              */
+}  NVIC_Type;
+
+/*@} end of group CMSIS_NVIC */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_SCB     System Control Block (SCB)
+    \brief      Type definitions for the System Control Block Registers
+  @{
+ */
+
+/** \brief  Structure type to access the System Control Block (SCB).
+ */
+typedef struct
+{
+  __I  uint32_t CPUID;                   /*!< Offset: 0x000 (R/ )  CPUID Base Register                                   */
+  __IO uint32_t ICSR;                    /*!< Offset: 0x004 (R/W)  Interrupt Control and State Register                  */
+       uint32_t RESERVED0;
+  __IO uint32_t AIRCR;                   /*!< Offset: 0x00C (R/W)  Application Interrupt and Reset Control Register      */
+  __IO uint32_t SCR;                     /*!< Offset: 0x010 (R/W)  System Control Register                               */
+  __IO uint32_t CCR;                     /*!< Offset: 0x014 (R/W)  Configuration Control Register                        */
+       uint32_t RESERVED1;
+  __IO uint32_t SHP[2];                  /*!< Offset: 0x01C (R/W)  System Handlers Priority Registers. [0] is RESERVED   */
+  __IO uint32_t SHCSR;                   /*!< Offset: 0x024 (R/W)  System Handler Control and State Register             */
+} SCB_Type;
+
+/* SCB CPUID Register Definitions */
+#define SCB_CPUID_IMPLEMENTER_Pos          24                                             /*!< SCB CPUID: IMPLEMENTER Position */
+#define SCB_CPUID_IMPLEMENTER_Msk          (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos)          /*!< SCB CPUID: IMPLEMENTER Mask */
+
+#define SCB_CPUID_VARIANT_Pos              20                                             /*!< SCB CPUID: VARIANT Position */
+#define SCB_CPUID_VARIANT_Msk              (0xFUL << SCB_CPUID_VARIANT_Pos)               /*!< SCB CPUID: VARIANT Mask */
+
+#define SCB_CPUID_ARCHITECTURE_Pos         16                                             /*!< SCB CPUID: ARCHITECTURE Position */
+#define SCB_CPUID_ARCHITECTURE_Msk         (0xFUL << SCB_CPUID_ARCHITECTURE_Pos)          /*!< SCB CPUID: ARCHITECTURE Mask */
+
+#define SCB_CPUID_PARTNO_Pos                4                                             /*!< SCB CPUID: PARTNO Position */
+#define SCB_CPUID_PARTNO_Msk               (0xFFFUL << SCB_CPUID_PARTNO_Pos)              /*!< SCB CPUID: PARTNO Mask */
+
+#define SCB_CPUID_REVISION_Pos              0                                             /*!< SCB CPUID: REVISION Position */
+#define SCB_CPUID_REVISION_Msk             (0xFUL << SCB_CPUID_REVISION_Pos)              /*!< SCB CPUID: REVISION Mask */
+
+/* SCB Interrupt Control State Register Definitions */
+#define SCB_ICSR_NMIPENDSET_Pos            31                                             /*!< SCB ICSR: NMIPENDSET Position */
+#define SCB_ICSR_NMIPENDSET_Msk            (1UL << SCB_ICSR_NMIPENDSET_Pos)               /*!< SCB ICSR: NMIPENDSET Mask */
+
+#define SCB_ICSR_PENDSVSET_Pos             28                                             /*!< SCB ICSR: PENDSVSET Position */
+#define SCB_ICSR_PENDSVSET_Msk             (1UL << SCB_ICSR_PENDSVSET_Pos)                /*!< SCB ICSR: PENDSVSET Mask */
+
+#define SCB_ICSR_PENDSVCLR_Pos             27                                             /*!< SCB ICSR: PENDSVCLR Position */
+#define SCB_ICSR_PENDSVCLR_Msk             (1UL << SCB_ICSR_PENDSVCLR_Pos)                /*!< SCB ICSR: PENDSVCLR Mask */
+
+#define SCB_ICSR_PENDSTSET_Pos             26                                             /*!< SCB ICSR: PENDSTSET Position */
+#define SCB_ICSR_PENDSTSET_Msk             (1UL << SCB_ICSR_PENDSTSET_Pos)                /*!< SCB ICSR: PENDSTSET Mask */
+
+#define SCB_ICSR_PENDSTCLR_Pos             25                                             /*!< SCB ICSR: PENDSTCLR Position */
+#define SCB_ICSR_PENDSTCLR_Msk             (1UL << SCB_ICSR_PENDSTCLR_Pos)                /*!< SCB ICSR: PENDSTCLR Mask */
+
+#define SCB_ICSR_ISRPREEMPT_Pos            23                                             /*!< SCB ICSR: ISRPREEMPT Position */
+#define SCB_ICSR_ISRPREEMPT_Msk            (1UL << SCB_ICSR_ISRPREEMPT_Pos)               /*!< SCB ICSR: ISRPREEMPT Mask */
+
+#define SCB_ICSR_ISRPENDING_Pos            22                                             /*!< SCB ICSR: ISRPENDING Position */
+#define SCB_ICSR_ISRPENDING_Msk            (1UL << SCB_ICSR_ISRPENDING_Pos)               /*!< SCB ICSR: ISRPENDING Mask */
+
+#define SCB_ICSR_VECTPENDING_Pos           12                                             /*!< SCB ICSR: VECTPENDING Position */
+#define SCB_ICSR_VECTPENDING_Msk           (0x1FFUL << SCB_ICSR_VECTPENDING_Pos)          /*!< SCB ICSR: VECTPENDING Mask */
+
+#define SCB_ICSR_VECTACTIVE_Pos             0                                             /*!< SCB ICSR: VECTACTIVE Position */
+#define SCB_ICSR_VECTACTIVE_Msk            (0x1FFUL << SCB_ICSR_VECTACTIVE_Pos)           /*!< SCB ICSR: VECTACTIVE Mask */
+
+/* SCB Application Interrupt and Reset Control Register Definitions */
+#define SCB_AIRCR_VECTKEY_Pos              16                                             /*!< SCB AIRCR: VECTKEY Position */
+#define SCB_AIRCR_VECTKEY_Msk              (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos)            /*!< SCB AIRCR: VECTKEY Mask */
+
+#define SCB_AIRCR_VECTKEYSTAT_Pos          16                                             /*!< SCB AIRCR: VECTKEYSTAT Position */
+#define SCB_AIRCR_VECTKEYSTAT_Msk          (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos)        /*!< SCB AIRCR: VECTKEYSTAT Mask */
+
+#define SCB_AIRCR_ENDIANESS_Pos            15                                             /*!< SCB AIRCR: ENDIANESS Position */
+#define SCB_AIRCR_ENDIANESS_Msk            (1UL << SCB_AIRCR_ENDIANESS_Pos)               /*!< SCB AIRCR: ENDIANESS Mask */
+
+#define SCB_AIRCR_SYSRESETREQ_Pos           2                                             /*!< SCB AIRCR: SYSRESETREQ Position */
+#define SCB_AIRCR_SYSRESETREQ_Msk          (1UL << SCB_AIRCR_SYSRESETREQ_Pos)             /*!< SCB AIRCR: SYSRESETREQ Mask */
+
+#define SCB_AIRCR_VECTCLRACTIVE_Pos         1                                             /*!< SCB AIRCR: VECTCLRACTIVE Position */
+#define SCB_AIRCR_VECTCLRACTIVE_Msk        (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos)           /*!< SCB AIRCR: VECTCLRACTIVE Mask */
+
+/* SCB System Control Register Definitions */
+#define SCB_SCR_SEVONPEND_Pos               4                                             /*!< SCB SCR: SEVONPEND Position */
+#define SCB_SCR_SEVONPEND_Msk              (1UL << SCB_SCR_SEVONPEND_Pos)                 /*!< SCB SCR: SEVONPEND Mask */
+
+#define SCB_SCR_SLEEPDEEP_Pos               2                                             /*!< SCB SCR: SLEEPDEEP Position */
+#define SCB_SCR_SLEEPDEEP_Msk              (1UL << SCB_SCR_SLEEPDEEP_Pos)                 /*!< SCB SCR: SLEEPDEEP Mask */
+
+#define SCB_SCR_SLEEPONEXIT_Pos             1                                             /*!< SCB SCR: SLEEPONEXIT Position */
+#define SCB_SCR_SLEEPONEXIT_Msk            (1UL << SCB_SCR_SLEEPONEXIT_Pos)               /*!< SCB SCR: SLEEPONEXIT Mask */
+
+/* SCB Configuration Control Register Definitions */
+#define SCB_CCR_STKALIGN_Pos                9                                             /*!< SCB CCR: STKALIGN Position */
+#define SCB_CCR_STKALIGN_Msk               (1UL << SCB_CCR_STKALIGN_Pos)                  /*!< SCB CCR: STKALIGN Mask */
+
+#define SCB_CCR_UNALIGN_TRP_Pos             3                                             /*!< SCB CCR: UNALIGN_TRP Position */
+#define SCB_CCR_UNALIGN_TRP_Msk            (1UL << SCB_CCR_UNALIGN_TRP_Pos)               /*!< SCB CCR: UNALIGN_TRP Mask */
+
+/* SCB System Handler Control and State Register Definitions */
+#define SCB_SHCSR_SVCALLPENDED_Pos         15                                             /*!< SCB SHCSR: SVCALLPENDED Position */
+#define SCB_SHCSR_SVCALLPENDED_Msk         (1UL << SCB_SHCSR_SVCALLPENDED_Pos)            /*!< SCB SHCSR: SVCALLPENDED Mask */
+
+/*@} end of group CMSIS_SCB */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_SysTick     System Tick Timer (SysTick)
+    \brief      Type definitions for the System Timer Registers.
+  @{
+ */
+
+/** \brief  Structure type to access the System Timer (SysTick).
+ */
+typedef struct
+{
+  __IO uint32_t CTRL;                    /*!< Offset: 0x000 (R/W)  SysTick Control and Status Register */
+  __IO uint32_t LOAD;                    /*!< Offset: 0x004 (R/W)  SysTick Reload Value Register       */
+  __IO uint32_t VAL;                     /*!< Offset: 0x008 (R/W)  SysTick Current Value Register      */
+  __I  uint32_t CALIB;                   /*!< Offset: 0x00C (R/ )  SysTick Calibration Register        */
+} SysTick_Type;
+
+/* SysTick Control / Status Register Definitions */
+#define SysTick_CTRL_COUNTFLAG_Pos         16                                             /*!< SysTick CTRL: COUNTFLAG Position */
+#define SysTick_CTRL_COUNTFLAG_Msk         (1UL << SysTick_CTRL_COUNTFLAG_Pos)            /*!< SysTick CTRL: COUNTFLAG Mask */
+
+#define SysTick_CTRL_CLKSOURCE_Pos          2                                             /*!< SysTick CTRL: CLKSOURCE Position */
+#define SysTick_CTRL_CLKSOURCE_Msk         (1UL << SysTick_CTRL_CLKSOURCE_Pos)            /*!< SysTick CTRL: CLKSOURCE Mask */
+
+#define SysTick_CTRL_TICKINT_Pos            1                                             /*!< SysTick CTRL: TICKINT Position */
+#define SysTick_CTRL_TICKINT_Msk           (1UL << SysTick_CTRL_TICKINT_Pos)              /*!< SysTick CTRL: TICKINT Mask */
+
+#define SysTick_CTRL_ENABLE_Pos             0                                             /*!< SysTick CTRL: ENABLE Position */
+#define SysTick_CTRL_ENABLE_Msk            (1UL << SysTick_CTRL_ENABLE_Pos)               /*!< SysTick CTRL: ENABLE Mask */
+
+/* SysTick Reload Register Definitions */
+#define SysTick_LOAD_RELOAD_Pos             0                                             /*!< SysTick LOAD: RELOAD Position */
+#define SysTick_LOAD_RELOAD_Msk            (0xFFFFFFUL << SysTick_LOAD_RELOAD_Pos)        /*!< SysTick LOAD: RELOAD Mask */
+
+/* SysTick Current Register Definitions */
+#define SysTick_VAL_CURRENT_Pos             0                                             /*!< SysTick VAL: CURRENT Position */
+#define SysTick_VAL_CURRENT_Msk            (0xFFFFFFUL << SysTick_VAL_CURRENT_Pos)        /*!< SysTick VAL: CURRENT Mask */
+
+/* SysTick Calibration Register Definitions */
+#define SysTick_CALIB_NOREF_Pos            31                                             /*!< SysTick CALIB: NOREF Position */
+#define SysTick_CALIB_NOREF_Msk            (1UL << SysTick_CALIB_NOREF_Pos)               /*!< SysTick CALIB: NOREF Mask */
+
+#define SysTick_CALIB_SKEW_Pos             30                                             /*!< SysTick CALIB: SKEW Position */
+#define SysTick_CALIB_SKEW_Msk             (1UL << SysTick_CALIB_SKEW_Pos)                /*!< SysTick CALIB: SKEW Mask */
+
+#define SysTick_CALIB_TENMS_Pos             0                                             /*!< SysTick CALIB: TENMS Position */
+#define SysTick_CALIB_TENMS_Msk            (0xFFFFFFUL << SysTick_VAL_CURRENT_Pos)        /*!< SysTick CALIB: TENMS Mask */
+
+/*@} end of group CMSIS_SysTick */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_CoreDebug       Core Debug Registers (CoreDebug)
+    \brief      Cortex-M0 Core Debug Registers (DCB registers, SHCSR, and DFSR)
+                are only accessible over DAP and not via processor. Therefore
+                they are not covered by the Cortex-M0 header file.
+  @{
+ */
+/*@} end of group CMSIS_CoreDebug */
+
+
+/** \ingroup    CMSIS_core_register
+    \defgroup   CMSIS_core_base     Core Definitions
+    \brief      Definitions for base addresses, unions, and structures.
+  @{
+ */
+
+/* Memory mapping of Cortex-M0 Hardware */
+#define SCS_BASE            (0xE000E000UL)                            /*!< System Control Space Base Address */
+#define SysTick_BASE        (SCS_BASE +  0x0010UL)                    /*!< SysTick Base Address              */
+#define NVIC_BASE           (SCS_BASE +  0x0100UL)                    /*!< NVIC Base Address                 */
+#define SCB_BASE            (SCS_BASE +  0x0D00UL)                    /*!< System Control Block Base Address */
+
+#define SCB                 ((SCB_Type       *)     SCB_BASE      )   /*!< SCB configuration struct           */
+#define SysTick             ((SysTick_Type   *)     SysTick_BASE  )   /*!< SysTick configuration struct       */
+#define NVIC                ((NVIC_Type      *)     NVIC_BASE     )   /*!< NVIC configuration struct          */
+
+
+/*@} */
+
+
+
+/*******************************************************************************
+ *                Hardware Abstraction Layer
+  Core Function Interface contains:
+  - Core NVIC Functions
+  - Core SysTick Functions
+  - Core Register Access Functions
+ ******************************************************************************/
+/** \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference
+*/
+
+
+
+/* ##########################   NVIC functions  #################################### */
+/** \ingroup  CMSIS_Core_FunctionInterface
+    \defgroup CMSIS_Core_NVICFunctions NVIC Functions
+    \brief      Functions that manage interrupts and exceptions via the NVIC.
+    @{
+ */
+
+/* Interrupt Priorities are WORD accessible only under ARMv6M                   */
+/* The following MACROS handle generation of the register offset and byte masks */
+#define _BIT_SHIFT(IRQn)         (  (((uint32_t)(IRQn)       )    &  0x03) * 8 )
+#define _SHP_IDX(IRQn)           ( ((((uint32_t)(IRQn) & 0x0F)-8) >>    2)     )
+#define _IP_IDX(IRQn)            (   ((uint32_t)(IRQn)            >>    2)     )
+
+
+/** \brief  Enable External Interrupt
+
+    The function enables a device-specific interrupt in the NVIC interrupt controller.
+
+    \param [in]      IRQn  External interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
+{
+  NVIC->ISER[0] = (1 << ((uint32_t)(IRQn) & 0x1F));
+}
+
+
+/** \brief  Disable External Interrupt
+
+    The function disables a device-specific interrupt in the NVIC interrupt controller.
+
+    \param [in]      IRQn  External interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_DisableIRQ(IRQn_Type IRQn)
+{
+  NVIC->ICER[0] = (1 << ((uint32_t)(IRQn) & 0x1F));
+}
+
+
+/** \brief  Get Pending Interrupt
+
+    The function reads the pending register in the NVIC and returns the pending bit
+    for the specified interrupt.
+
+    \param [in]      IRQn  Interrupt number.
+
+    \return             0  Interrupt status is not pending.
+    \return             1  Interrupt status is pending.
+ */
+__STATIC_INLINE uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
+{
+  return((uint32_t) ((NVIC->ISPR[0] & (1 << ((uint32_t)(IRQn) & 0x1F)))?1:0));
+}
+
+
+/** \brief  Set Pending Interrupt
+
+    The function sets the pending bit of an external interrupt.
+
+    \param [in]      IRQn  Interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_SetPendingIRQ(IRQn_Type IRQn)
+{
+  NVIC->ISPR[0] = (1 << ((uint32_t)(IRQn) & 0x1F));
+}
+
+
+/** \brief  Clear Pending Interrupt
+
+    The function clears the pending bit of an external interrupt.
+
+    \param [in]      IRQn  External interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
+{
+  NVIC->ICPR[0] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* Clear pending interrupt */
+}
+
+
+/** \brief  Set Interrupt Priority
+
+    The function sets the priority of an interrupt.
+
+    \note The priority cannot be set for every core interrupt.
+
+    \param [in]      IRQn  Interrupt number.
+    \param [in]  priority  Priority to set.
+ */
+__STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
+{
+  if(IRQn < 0) {
+    SCB->SHP[_SHP_IDX(IRQn)] = (SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFF << _BIT_SHIFT(IRQn))) |
+        (((priority << (8 - __NVIC_PRIO_BITS)) & 0xFF) << _BIT_SHIFT(IRQn)); }
+  else {
+    NVIC->IP[_IP_IDX(IRQn)] = (NVIC->IP[_IP_IDX(IRQn)] & ~(0xFF << _BIT_SHIFT(IRQn))) |
+        (((priority << (8 - __NVIC_PRIO_BITS)) & 0xFF) << _BIT_SHIFT(IRQn)); }
+}
+
+
+/** \brief  Get Interrupt Priority
+
+    The function reads the priority of an interrupt. The interrupt
+    number can be positive to specify an external (device specific)
+    interrupt, or negative to specify an internal (core) interrupt.
+
+
+    \param [in]   IRQn  Interrupt number.
+    \return             Interrupt Priority. Value is aligned automatically to the implemented
+                        priority bits of the microcontroller.
+ */
+__STATIC_INLINE uint32_t NVIC_GetPriority(IRQn_Type IRQn)
+{
+
+  if(IRQn < 0) {
+    return((uint32_t)(((SCB->SHP[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & 0xFF) >> (8 - __NVIC_PRIO_BITS)));  } /* get priority for Cortex-M0 system interrupts */
+  else {
+    return((uint32_t)(((NVIC->IP[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & 0xFF) >> (8 - __NVIC_PRIO_BITS)));  } /* get priority for device specific interrupts  */
+}
+
+
+/** \brief  System Reset
+
+    The function initiates a system reset request to reset the MCU.
+ */
+__STATIC_INLINE void NVIC_SystemReset(void)
+{
+  __DSB();                                                     /* Ensure all outstanding memory accesses included
+                                                                  buffered write are completed before reset */
+  SCB->AIRCR  = ((0x5FA << SCB_AIRCR_VECTKEY_Pos)      |
+                 SCB_AIRCR_SYSRESETREQ_Msk);
+  __DSB();                                                     /* Ensure completion of memory access */
+  while(1);                                                    /* wait until reset */
+}
+
+/*@} end of CMSIS_Core_NVICFunctions */
+
+
+
+/* ##################################    SysTick function  ############################################ */
+/** \ingroup  CMSIS_Core_FunctionInterface
+    \defgroup CMSIS_Core_SysTickFunctions SysTick Functions
+    \brief      Functions that configure the System.
+  @{
+ */
+
+#if (__Vendor_SysTickConfig == 0)
+
+/** \brief  System Tick Configuration
+
+    The function initializes the System Timer and its interrupt, and starts the System Tick Timer.
+    Counter is in free running mode to generate periodic interrupts.
+
+    \param [in]  ticks  Number of ticks between two interrupts.
+
+    \return          0  Function succeeded.
+    \return          1  Function failed.
+
+    \note     When the variable <b>__Vendor_SysTickConfig</b> is set to 1, then the
+    function <b>SysTick_Config</b> is not included. In this case, the file <b><i>device</i>.h</b>
+    must contain a vendor-specific implementation of this function.
+
+ */
+__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
+{
+  if ((ticks - 1) > SysTick_LOAD_RELOAD_Msk)  return (1);      /* Reload value impossible */
+
+  SysTick->LOAD  = ticks - 1;                                  /* set reload register */
+  NVIC_SetPriority (SysTick_IRQn, (1<<__NVIC_PRIO_BITS) - 1);  /* set Priority for Systick Interrupt */
+  SysTick->VAL   = 0;                                          /* Load the SysTick Counter Value */
+  SysTick->CTRL  = SysTick_CTRL_CLKSOURCE_Msk |
+                   SysTick_CTRL_TICKINT_Msk   |
+                   SysTick_CTRL_ENABLE_Msk;                    /* Enable SysTick IRQ and SysTick Timer */
+  return (0);                                                  /* Function successful */
+}
+
+#endif
+
+/*@} end of CMSIS_Core_SysTickFunctions */
+
+
+
+
+#endif /* __CORE_CM0_H_DEPENDANT */
+
+#endif /* __CMSIS_GENERIC */
+
+#ifdef __cplusplus
+}
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cm0plus.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cm0plus.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cm0plus.h	(revision 270)
@@ -0,0 +1,793 @@
+/**************************************************************************//**
+ * @file     core_cm0plus.h
+ * @brief    CMSIS Cortex-M0+ Core Peripheral Access Layer Header File
+ * @version  V3.20
+ * @date     25. February 2013
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2009 - 2013 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+
+#if defined ( __ICCARM__ )
+ #pragma system_include  /* treat file as system include file for MISRA check */
+#endif
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+#ifndef __CORE_CM0PLUS_H_GENERIC
+#define __CORE_CM0PLUS_H_GENERIC
+
+/** \page CMSIS_MISRA_Exceptions  MISRA-C:2004 Compliance Exceptions
+  CMSIS violates the following MISRA-C:2004 rules:
+
+   \li Required Rule 8.5, object/function definition in header file.<br>
+     Function definitions in header files are used to allow 'inlining'.
+
+   \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.<br>
+     Unions are used for effective representation of core registers.
+
+   \li Advisory Rule 19.7, Function-like macro defined.<br>
+     Function-like macros are used to allow more efficient code.
+ */
+
+
+/*******************************************************************************
+ *                 CMSIS definitions
+ ******************************************************************************/
+/** \ingroup Cortex-M0+
+  @{
+ */
+
+/*  CMSIS CM0P definitions */
+#define __CM0PLUS_CMSIS_VERSION_MAIN (0x03)                                /*!< [31:16] CMSIS HAL main version   */
+#define __CM0PLUS_CMSIS_VERSION_SUB  (0x20)                                /*!< [15:0]  CMSIS HAL sub version    */
+#define __CM0PLUS_CMSIS_VERSION      ((__CM0PLUS_CMSIS_VERSION_MAIN << 16) | \
+                                       __CM0PLUS_CMSIS_VERSION_SUB)        /*!< CMSIS HAL version number         */
+
+#define __CORTEX_M                (0x00)                                   /*!< Cortex-M Core                    */
+
+
+#if   defined ( __CC_ARM )
+  #define __ASM            __asm                                      /*!< asm keyword for ARM Compiler          */
+  #define __INLINE         __inline                                   /*!< inline keyword for ARM Compiler       */
+  #define __STATIC_INLINE  static __inline
+
+#elif defined ( __ICCARM__ )
+  #define __ASM            __asm                                      /*!< asm keyword for IAR Compiler          */
+  #define __INLINE         inline                                     /*!< inline keyword for IAR Compiler. Only available in High optimization mode! */
+  #define __STATIC_INLINE  static inline
+
+#elif defined ( __GNUC__ )
+  #define __ASM            __asm                                      /*!< asm keyword for GNU Compiler          */
+  #define __INLINE         inline                                     /*!< inline keyword for GNU Compiler       */
+  #define __STATIC_INLINE  static inline
+
+#elif defined ( __TASKING__ )
+  #define __ASM            __asm                                      /*!< asm keyword for TASKING Compiler      */
+  #define __INLINE         inline                                     /*!< inline keyword for TASKING Compiler   */
+  #define __STATIC_INLINE  static inline
+
+#endif
+
+/** __FPU_USED indicates whether an FPU is used or not. This core does not support an FPU at all
+*/
+#define __FPU_USED       0
+
+#if defined ( __CC_ARM )
+  #if defined __TARGET_FPU_VFP
+    #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+  #endif
+
+#elif defined ( __ICCARM__ )
+  #if defined __ARMVFP__
+    #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+  #endif
+
+#elif defined ( __GNUC__ )
+  #if defined (__VFP_FP__) && !defined(__SOFTFP__)
+    #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+  #endif
+
+#elif defined ( __TASKING__ )
+  #if defined __FPU_VFP__
+    #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+  #endif
+#endif
+
+#include <stdint.h>                      /* standard types definitions                      */
+#include <core_cmInstr.h>                /* Core Instruction Access                         */
+#include <core_cmFunc.h>                 /* Core Function Access                            */
+
+#endif /* __CORE_CM0PLUS_H_GENERIC */
+
+#ifndef __CMSIS_GENERIC
+
+#ifndef __CORE_CM0PLUS_H_DEPENDANT
+#define __CORE_CM0PLUS_H_DEPENDANT
+
+/* check device defines and use defaults */
+#if defined __CHECK_DEVICE_DEFINES
+  #ifndef __CM0PLUS_REV
+    #define __CM0PLUS_REV             0x0000
+    #warning "__CM0PLUS_REV not defined in device header file; using default!"
+  #endif
+
+  #ifndef __MPU_PRESENT
+    #define __MPU_PRESENT             0
+    #warning "__MPU_PRESENT not defined in device header file; using default!"
+  #endif
+
+  #ifndef __VTOR_PRESENT
+    #define __VTOR_PRESENT            0
+    #warning "__VTOR_PRESENT not defined in device header file; using default!"
+  #endif
+
+  #ifndef __NVIC_PRIO_BITS
+    #define __NVIC_PRIO_BITS          2
+    #warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
+  #endif
+
+  #ifndef __Vendor_SysTickConfig
+    #define __Vendor_SysTickConfig    0
+    #warning "__Vendor_SysTickConfig not defined in device header file; using default!"
+  #endif
+#endif
+
+/* IO definitions (access restrictions to peripheral registers) */
+/**
+    \defgroup CMSIS_glob_defs CMSIS Global Defines
+
+    <strong>IO Type Qualifiers</strong> are used
+    \li to specify the access to peripheral variables.
+    \li for automatic generation of peripheral register debug information.
+*/
+#ifdef __cplusplus
+  #define   __I     volatile             /*!< Defines 'read only' permissions                 */
+#else
+  #define   __I     volatile const       /*!< Defines 'read only' permissions                 */
+#endif
+#define     __O     volatile             /*!< Defines 'write only' permissions                */
+#define     __IO    volatile             /*!< Defines 'read / write' permissions              */
+
+/*@} end of group Cortex-M0+ */
+
+
+
+/*******************************************************************************
+ *                 Register Abstraction
+  Core Register contain:
+  - Core Register
+  - Core NVIC Register
+  - Core SCB Register
+  - Core SysTick Register
+  - Core MPU Register
+ ******************************************************************************/
+/** \defgroup CMSIS_core_register Defines and Type Definitions
+    \brief Type definitions and defines for Cortex-M processor based devices.
+*/
+
+/** \ingroup    CMSIS_core_register
+    \defgroup   CMSIS_CORE  Status and Control Registers
+    \brief  Core Register type definitions.
+  @{
+ */
+
+/** \brief  Union type to access the Application Program Status Register (APSR).
+ */
+typedef union
+{
+  struct
+  {
+#if (__CORTEX_M != 0x04)
+    uint32_t _reserved0:27;              /*!< bit:  0..26  Reserved                           */
+#else
+    uint32_t _reserved0:16;              /*!< bit:  0..15  Reserved                           */
+    uint32_t GE:4;                       /*!< bit: 16..19  Greater than or Equal flags        */
+    uint32_t _reserved1:7;               /*!< bit: 20..26  Reserved                           */
+#endif
+    uint32_t Q:1;                        /*!< bit:     27  Saturation condition flag          */
+    uint32_t V:1;                        /*!< bit:     28  Overflow condition code flag       */
+    uint32_t C:1;                        /*!< bit:     29  Carry condition code flag          */
+    uint32_t Z:1;                        /*!< bit:     30  Zero condition code flag           */
+    uint32_t N:1;                        /*!< bit:     31  Negative condition code flag       */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} APSR_Type;
+
+
+/** \brief  Union type to access the Interrupt Program Status Register (IPSR).
+ */
+typedef union
+{
+  struct
+  {
+    uint32_t ISR:9;                      /*!< bit:  0.. 8  Exception number                   */
+    uint32_t _reserved0:23;              /*!< bit:  9..31  Reserved                           */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} IPSR_Type;
+
+
+/** \brief  Union type to access the Special-Purpose Program Status Registers (xPSR).
+ */
+typedef union
+{
+  struct
+  {
+    uint32_t ISR:9;                      /*!< bit:  0.. 8  Exception number                   */
+#if (__CORTEX_M != 0x04)
+    uint32_t _reserved0:15;              /*!< bit:  9..23  Reserved                           */
+#else
+    uint32_t _reserved0:7;               /*!< bit:  9..15  Reserved                           */
+    uint32_t GE:4;                       /*!< bit: 16..19  Greater than or Equal flags        */
+    uint32_t _reserved1:4;               /*!< bit: 20..23  Reserved                           */
+#endif
+    uint32_t T:1;                        /*!< bit:     24  Thumb bit        (read 0)          */
+    uint32_t IT:2;                       /*!< bit: 25..26  saved IT state   (read 0)          */
+    uint32_t Q:1;                        /*!< bit:     27  Saturation condition flag          */
+    uint32_t V:1;                        /*!< bit:     28  Overflow condition code flag       */
+    uint32_t C:1;                        /*!< bit:     29  Carry condition code flag          */
+    uint32_t Z:1;                        /*!< bit:     30  Zero condition code flag           */
+    uint32_t N:1;                        /*!< bit:     31  Negative condition code flag       */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} xPSR_Type;
+
+
+/** \brief  Union type to access the Control Registers (CONTROL).
+ */
+typedef union
+{
+  struct
+  {
+    uint32_t nPRIV:1;                    /*!< bit:      0  Execution privilege in Thread mode */
+    uint32_t SPSEL:1;                    /*!< bit:      1  Stack to be used                   */
+    uint32_t FPCA:1;                     /*!< bit:      2  FP extension active flag           */
+    uint32_t _reserved0:29;              /*!< bit:  3..31  Reserved                           */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} CONTROL_Type;
+
+/*@} end of group CMSIS_CORE */
+
+
+/** \ingroup    CMSIS_core_register
+    \defgroup   CMSIS_NVIC  Nested Vectored Interrupt Controller (NVIC)
+    \brief      Type definitions for the NVIC Registers
+  @{
+ */
+
+/** \brief  Structure type to access the Nested Vectored Interrupt Controller (NVIC).
+ */
+typedef struct
+{
+  __IO uint32_t ISER[1];                 /*!< Offset: 0x000 (R/W)  Interrupt Set Enable Register           */
+       uint32_t RESERVED0[31];
+  __IO uint32_t ICER[1];                 /*!< Offset: 0x080 (R/W)  Interrupt Clear Enable Register          */
+       uint32_t RSERVED1[31];
+  __IO uint32_t ISPR[1];                 /*!< Offset: 0x100 (R/W)  Interrupt Set Pending Register           */
+       uint32_t RESERVED2[31];
+  __IO uint32_t ICPR[1];                 /*!< Offset: 0x180 (R/W)  Interrupt Clear Pending Register         */
+       uint32_t RESERVED3[31];
+       uint32_t RESERVED4[64];
+  __IO uint32_t IP[8];                   /*!< Offset: 0x300 (R/W)  Interrupt Priority Register              */
+}  NVIC_Type;
+
+/*@} end of group CMSIS_NVIC */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_SCB     System Control Block (SCB)
+    \brief      Type definitions for the System Control Block Registers
+  @{
+ */
+
+/** \brief  Structure type to access the System Control Block (SCB).
+ */
+typedef struct
+{
+  __I  uint32_t CPUID;                   /*!< Offset: 0x000 (R/ )  CPUID Base Register                                   */
+  __IO uint32_t ICSR;                    /*!< Offset: 0x004 (R/W)  Interrupt Control and State Register                  */
+#if (__VTOR_PRESENT == 1)
+  __IO uint32_t VTOR;                    /*!< Offset: 0x008 (R/W)  Vector Table Offset Register                          */
+#else
+       uint32_t RESERVED0;
+#endif
+  __IO uint32_t AIRCR;                   /*!< Offset: 0x00C (R/W)  Application Interrupt and Reset Control Register      */
+  __IO uint32_t SCR;                     /*!< Offset: 0x010 (R/W)  System Control Register                               */
+  __IO uint32_t CCR;                     /*!< Offset: 0x014 (R/W)  Configuration Control Register                        */
+       uint32_t RESERVED1;
+  __IO uint32_t SHP[2];                  /*!< Offset: 0x01C (R/W)  System Handlers Priority Registers. [0] is RESERVED   */
+  __IO uint32_t SHCSR;                   /*!< Offset: 0x024 (R/W)  System Handler Control and State Register             */
+} SCB_Type;
+
+/* SCB CPUID Register Definitions */
+#define SCB_CPUID_IMPLEMENTER_Pos          24                                             /*!< SCB CPUID: IMPLEMENTER Position */
+#define SCB_CPUID_IMPLEMENTER_Msk          (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos)          /*!< SCB CPUID: IMPLEMENTER Mask */
+
+#define SCB_CPUID_VARIANT_Pos              20                                             /*!< SCB CPUID: VARIANT Position */
+#define SCB_CPUID_VARIANT_Msk              (0xFUL << SCB_CPUID_VARIANT_Pos)               /*!< SCB CPUID: VARIANT Mask */
+
+#define SCB_CPUID_ARCHITECTURE_Pos         16                                             /*!< SCB CPUID: ARCHITECTURE Position */
+#define SCB_CPUID_ARCHITECTURE_Msk         (0xFUL << SCB_CPUID_ARCHITECTURE_Pos)          /*!< SCB CPUID: ARCHITECTURE Mask */
+
+#define SCB_CPUID_PARTNO_Pos                4                                             /*!< SCB CPUID: PARTNO Position */
+#define SCB_CPUID_PARTNO_Msk               (0xFFFUL << SCB_CPUID_PARTNO_Pos)              /*!< SCB CPUID: PARTNO Mask */
+
+#define SCB_CPUID_REVISION_Pos              0                                             /*!< SCB CPUID: REVISION Position */
+#define SCB_CPUID_REVISION_Msk             (0xFUL << SCB_CPUID_REVISION_Pos)              /*!< SCB CPUID: REVISION Mask */
+
+/* SCB Interrupt Control State Register Definitions */
+#define SCB_ICSR_NMIPENDSET_Pos            31                                             /*!< SCB ICSR: NMIPENDSET Position */
+#define SCB_ICSR_NMIPENDSET_Msk            (1UL << SCB_ICSR_NMIPENDSET_Pos)               /*!< SCB ICSR: NMIPENDSET Mask */
+
+#define SCB_ICSR_PENDSVSET_Pos             28                                             /*!< SCB ICSR: PENDSVSET Position */
+#define SCB_ICSR_PENDSVSET_Msk             (1UL << SCB_ICSR_PENDSVSET_Pos)                /*!< SCB ICSR: PENDSVSET Mask */
+
+#define SCB_ICSR_PENDSVCLR_Pos             27                                             /*!< SCB ICSR: PENDSVCLR Position */
+#define SCB_ICSR_PENDSVCLR_Msk             (1UL << SCB_ICSR_PENDSVCLR_Pos)                /*!< SCB ICSR: PENDSVCLR Mask */
+
+#define SCB_ICSR_PENDSTSET_Pos             26                                             /*!< SCB ICSR: PENDSTSET Position */
+#define SCB_ICSR_PENDSTSET_Msk             (1UL << SCB_ICSR_PENDSTSET_Pos)                /*!< SCB ICSR: PENDSTSET Mask */
+
+#define SCB_ICSR_PENDSTCLR_Pos             25                                             /*!< SCB ICSR: PENDSTCLR Position */
+#define SCB_ICSR_PENDSTCLR_Msk             (1UL << SCB_ICSR_PENDSTCLR_Pos)                /*!< SCB ICSR: PENDSTCLR Mask */
+
+#define SCB_ICSR_ISRPREEMPT_Pos            23                                             /*!< SCB ICSR: ISRPREEMPT Position */
+#define SCB_ICSR_ISRPREEMPT_Msk            (1UL << SCB_ICSR_ISRPREEMPT_Pos)               /*!< SCB ICSR: ISRPREEMPT Mask */
+
+#define SCB_ICSR_ISRPENDING_Pos            22                                             /*!< SCB ICSR: ISRPENDING Position */
+#define SCB_ICSR_ISRPENDING_Msk            (1UL << SCB_ICSR_ISRPENDING_Pos)               /*!< SCB ICSR: ISRPENDING Mask */
+
+#define SCB_ICSR_VECTPENDING_Pos           12                                             /*!< SCB ICSR: VECTPENDING Position */
+#define SCB_ICSR_VECTPENDING_Msk           (0x1FFUL << SCB_ICSR_VECTPENDING_Pos)          /*!< SCB ICSR: VECTPENDING Mask */
+
+#define SCB_ICSR_VECTACTIVE_Pos             0                                             /*!< SCB ICSR: VECTACTIVE Position */
+#define SCB_ICSR_VECTACTIVE_Msk            (0x1FFUL << SCB_ICSR_VECTACTIVE_Pos)           /*!< SCB ICSR: VECTACTIVE Mask */
+
+#if (__VTOR_PRESENT == 1)
+/* SCB Interrupt Control State Register Definitions */
+#define SCB_VTOR_TBLOFF_Pos                 8                                             /*!< SCB VTOR: TBLOFF Position */
+#define SCB_VTOR_TBLOFF_Msk                (0xFFFFFFUL << SCB_VTOR_TBLOFF_Pos)            /*!< SCB VTOR: TBLOFF Mask */
+#endif
+
+/* SCB Application Interrupt and Reset Control Register Definitions */
+#define SCB_AIRCR_VECTKEY_Pos              16                                             /*!< SCB AIRCR: VECTKEY Position */
+#define SCB_AIRCR_VECTKEY_Msk              (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos)            /*!< SCB AIRCR: VECTKEY Mask */
+
+#define SCB_AIRCR_VECTKEYSTAT_Pos          16                                             /*!< SCB AIRCR: VECTKEYSTAT Position */
+#define SCB_AIRCR_VECTKEYSTAT_Msk          (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos)        /*!< SCB AIRCR: VECTKEYSTAT Mask */
+
+#define SCB_AIRCR_ENDIANESS_Pos            15                                             /*!< SCB AIRCR: ENDIANESS Position */
+#define SCB_AIRCR_ENDIANESS_Msk            (1UL << SCB_AIRCR_ENDIANESS_Pos)               /*!< SCB AIRCR: ENDIANESS Mask */
+
+#define SCB_AIRCR_SYSRESETREQ_Pos           2                                             /*!< SCB AIRCR: SYSRESETREQ Position */
+#define SCB_AIRCR_SYSRESETREQ_Msk          (1UL << SCB_AIRCR_SYSRESETREQ_Pos)             /*!< SCB AIRCR: SYSRESETREQ Mask */
+
+#define SCB_AIRCR_VECTCLRACTIVE_Pos         1                                             /*!< SCB AIRCR: VECTCLRACTIVE Position */
+#define SCB_AIRCR_VECTCLRACTIVE_Msk        (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos)           /*!< SCB AIRCR: VECTCLRACTIVE Mask */
+
+/* SCB System Control Register Definitions */
+#define SCB_SCR_SEVONPEND_Pos               4                                             /*!< SCB SCR: SEVONPEND Position */
+#define SCB_SCR_SEVONPEND_Msk              (1UL << SCB_SCR_SEVONPEND_Pos)                 /*!< SCB SCR: SEVONPEND Mask */
+
+#define SCB_SCR_SLEEPDEEP_Pos               2                                             /*!< SCB SCR: SLEEPDEEP Position */
+#define SCB_SCR_SLEEPDEEP_Msk              (1UL << SCB_SCR_SLEEPDEEP_Pos)                 /*!< SCB SCR: SLEEPDEEP Mask */
+
+#define SCB_SCR_SLEEPONEXIT_Pos             1                                             /*!< SCB SCR: SLEEPONEXIT Position */
+#define SCB_SCR_SLEEPONEXIT_Msk            (1UL << SCB_SCR_SLEEPONEXIT_Pos)               /*!< SCB SCR: SLEEPONEXIT Mask */
+
+/* SCB Configuration Control Register Definitions */
+#define SCB_CCR_STKALIGN_Pos                9                                             /*!< SCB CCR: STKALIGN Position */
+#define SCB_CCR_STKALIGN_Msk               (1UL << SCB_CCR_STKALIGN_Pos)                  /*!< SCB CCR: STKALIGN Mask */
+
+#define SCB_CCR_UNALIGN_TRP_Pos             3                                             /*!< SCB CCR: UNALIGN_TRP Position */
+#define SCB_CCR_UNALIGN_TRP_Msk            (1UL << SCB_CCR_UNALIGN_TRP_Pos)               /*!< SCB CCR: UNALIGN_TRP Mask */
+
+/* SCB System Handler Control and State Register Definitions */
+#define SCB_SHCSR_SVCALLPENDED_Pos         15                                             /*!< SCB SHCSR: SVCALLPENDED Position */
+#define SCB_SHCSR_SVCALLPENDED_Msk         (1UL << SCB_SHCSR_SVCALLPENDED_Pos)            /*!< SCB SHCSR: SVCALLPENDED Mask */
+
+/*@} end of group CMSIS_SCB */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_SysTick     System Tick Timer (SysTick)
+    \brief      Type definitions for the System Timer Registers.
+  @{
+ */
+
+/** \brief  Structure type to access the System Timer (SysTick).
+ */
+typedef struct
+{
+  __IO uint32_t CTRL;                    /*!< Offset: 0x000 (R/W)  SysTick Control and Status Register */
+  __IO uint32_t LOAD;                    /*!< Offset: 0x004 (R/W)  SysTick Reload Value Register       */
+  __IO uint32_t VAL;                     /*!< Offset: 0x008 (R/W)  SysTick Current Value Register      */
+  __I  uint32_t CALIB;                   /*!< Offset: 0x00C (R/ )  SysTick Calibration Register        */
+} SysTick_Type;
+
+/* SysTick Control / Status Register Definitions */
+#define SysTick_CTRL_COUNTFLAG_Pos         16                                             /*!< SysTick CTRL: COUNTFLAG Position */
+#define SysTick_CTRL_COUNTFLAG_Msk         (1UL << SysTick_CTRL_COUNTFLAG_Pos)            /*!< SysTick CTRL: COUNTFLAG Mask */
+
+#define SysTick_CTRL_CLKSOURCE_Pos          2                                             /*!< SysTick CTRL: CLKSOURCE Position */
+#define SysTick_CTRL_CLKSOURCE_Msk         (1UL << SysTick_CTRL_CLKSOURCE_Pos)            /*!< SysTick CTRL: CLKSOURCE Mask */
+
+#define SysTick_CTRL_TICKINT_Pos            1                                             /*!< SysTick CTRL: TICKINT Position */
+#define SysTick_CTRL_TICKINT_Msk           (1UL << SysTick_CTRL_TICKINT_Pos)              /*!< SysTick CTRL: TICKINT Mask */
+
+#define SysTick_CTRL_ENABLE_Pos             0                                             /*!< SysTick CTRL: ENABLE Position */
+#define SysTick_CTRL_ENABLE_Msk            (1UL << SysTick_CTRL_ENABLE_Pos)               /*!< SysTick CTRL: ENABLE Mask */
+
+/* SysTick Reload Register Definitions */
+#define SysTick_LOAD_RELOAD_Pos             0                                             /*!< SysTick LOAD: RELOAD Position */
+#define SysTick_LOAD_RELOAD_Msk            (0xFFFFFFUL << SysTick_LOAD_RELOAD_Pos)        /*!< SysTick LOAD: RELOAD Mask */
+
+/* SysTick Current Register Definitions */
+#define SysTick_VAL_CURRENT_Pos             0                                             /*!< SysTick VAL: CURRENT Position */
+#define SysTick_VAL_CURRENT_Msk            (0xFFFFFFUL << SysTick_VAL_CURRENT_Pos)        /*!< SysTick VAL: CURRENT Mask */
+
+/* SysTick Calibration Register Definitions */
+#define SysTick_CALIB_NOREF_Pos            31                                             /*!< SysTick CALIB: NOREF Position */
+#define SysTick_CALIB_NOREF_Msk            (1UL << SysTick_CALIB_NOREF_Pos)               /*!< SysTick CALIB: NOREF Mask */
+
+#define SysTick_CALIB_SKEW_Pos             30                                             /*!< SysTick CALIB: SKEW Position */
+#define SysTick_CALIB_SKEW_Msk             (1UL << SysTick_CALIB_SKEW_Pos)                /*!< SysTick CALIB: SKEW Mask */
+
+#define SysTick_CALIB_TENMS_Pos             0                                             /*!< SysTick CALIB: TENMS Position */
+#define SysTick_CALIB_TENMS_Msk            (0xFFFFFFUL << SysTick_VAL_CURRENT_Pos)        /*!< SysTick CALIB: TENMS Mask */
+
+/*@} end of group CMSIS_SysTick */
+
+#if (__MPU_PRESENT == 1)
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_MPU     Memory Protection Unit (MPU)
+    \brief      Type definitions for the Memory Protection Unit (MPU)
+  @{
+ */
+
+/** \brief  Structure type to access the Memory Protection Unit (MPU).
+ */
+typedef struct
+{
+  __I  uint32_t TYPE;                    /*!< Offset: 0x000 (R/ )  MPU Type Register                              */
+  __IO uint32_t CTRL;                    /*!< Offset: 0x004 (R/W)  MPU Control Register                           */
+  __IO uint32_t RNR;                     /*!< Offset: 0x008 (R/W)  MPU Region RNRber Register                     */
+  __IO uint32_t RBAR;                    /*!< Offset: 0x00C (R/W)  MPU Region Base Address Register               */
+  __IO uint32_t RASR;                    /*!< Offset: 0x010 (R/W)  MPU Region Attribute and Size Register         */
+} MPU_Type;
+
+/* MPU Type Register */
+#define MPU_TYPE_IREGION_Pos               16                                             /*!< MPU TYPE: IREGION Position */
+#define MPU_TYPE_IREGION_Msk               (0xFFUL << MPU_TYPE_IREGION_Pos)               /*!< MPU TYPE: IREGION Mask */
+
+#define MPU_TYPE_DREGION_Pos                8                                             /*!< MPU TYPE: DREGION Position */
+#define MPU_TYPE_DREGION_Msk               (0xFFUL << MPU_TYPE_DREGION_Pos)               /*!< MPU TYPE: DREGION Mask */
+
+#define MPU_TYPE_SEPARATE_Pos               0                                             /*!< MPU TYPE: SEPARATE Position */
+#define MPU_TYPE_SEPARATE_Msk              (1UL << MPU_TYPE_SEPARATE_Pos)                 /*!< MPU TYPE: SEPARATE Mask */
+
+/* MPU Control Register */
+#define MPU_CTRL_PRIVDEFENA_Pos             2                                             /*!< MPU CTRL: PRIVDEFENA Position */
+#define MPU_CTRL_PRIVDEFENA_Msk            (1UL << MPU_CTRL_PRIVDEFENA_Pos)               /*!< MPU CTRL: PRIVDEFENA Mask */
+
+#define MPU_CTRL_HFNMIENA_Pos               1                                             /*!< MPU CTRL: HFNMIENA Position */
+#define MPU_CTRL_HFNMIENA_Msk              (1UL << MPU_CTRL_HFNMIENA_Pos)                 /*!< MPU CTRL: HFNMIENA Mask */
+
+#define MPU_CTRL_ENABLE_Pos                 0                                             /*!< MPU CTRL: ENABLE Position */
+#define MPU_CTRL_ENABLE_Msk                (1UL << MPU_CTRL_ENABLE_Pos)                   /*!< MPU CTRL: ENABLE Mask */
+
+/* MPU Region Number Register */
+#define MPU_RNR_REGION_Pos                  0                                             /*!< MPU RNR: REGION Position */
+#define MPU_RNR_REGION_Msk                 (0xFFUL << MPU_RNR_REGION_Pos)                 /*!< MPU RNR: REGION Mask */
+
+/* MPU Region Base Address Register */
+#define MPU_RBAR_ADDR_Pos                   8                                             /*!< MPU RBAR: ADDR Position */
+#define MPU_RBAR_ADDR_Msk                  (0xFFFFFFUL << MPU_RBAR_ADDR_Pos)              /*!< MPU RBAR: ADDR Mask */
+
+#define MPU_RBAR_VALID_Pos                  4                                             /*!< MPU RBAR: VALID Position */
+#define MPU_RBAR_VALID_Msk                 (1UL << MPU_RBAR_VALID_Pos)                    /*!< MPU RBAR: VALID Mask */
+
+#define MPU_RBAR_REGION_Pos                 0                                             /*!< MPU RBAR: REGION Position */
+#define MPU_RBAR_REGION_Msk                (0xFUL << MPU_RBAR_REGION_Pos)                 /*!< MPU RBAR: REGION Mask */
+
+/* MPU Region Attribute and Size Register */
+#define MPU_RASR_ATTRS_Pos                 16                                             /*!< MPU RASR: MPU Region Attribute field Position */
+#define MPU_RASR_ATTRS_Msk                 (0xFFFFUL << MPU_RASR_ATTRS_Pos)               /*!< MPU RASR: MPU Region Attribute field Mask */
+
+#define MPU_RASR_XN_Pos                    28                                             /*!< MPU RASR: ATTRS.XN Position */
+#define MPU_RASR_XN_Msk                    (1UL << MPU_RASR_XN_Pos)                       /*!< MPU RASR: ATTRS.XN Mask */
+
+#define MPU_RASR_AP_Pos                    24                                             /*!< MPU RASR: ATTRS.AP Position */
+#define MPU_RASR_AP_Msk                    (0x7UL << MPU_RASR_AP_Pos)                     /*!< MPU RASR: ATTRS.AP Mask */
+
+#define MPU_RASR_TEX_Pos                   19                                             /*!< MPU RASR: ATTRS.TEX Position */
+#define MPU_RASR_TEX_Msk                   (0x7UL << MPU_RASR_TEX_Pos)                    /*!< MPU RASR: ATTRS.TEX Mask */
+
+#define MPU_RASR_S_Pos                     18                                             /*!< MPU RASR: ATTRS.S Position */
+#define MPU_RASR_S_Msk                     (1UL << MPU_RASR_S_Pos)                        /*!< MPU RASR: ATTRS.S Mask */
+
+#define MPU_RASR_C_Pos                     17                                             /*!< MPU RASR: ATTRS.C Position */
+#define MPU_RASR_C_Msk                     (1UL << MPU_RASR_C_Pos)                        /*!< MPU RASR: ATTRS.C Mask */
+
+#define MPU_RASR_B_Pos                     16                                             /*!< MPU RASR: ATTRS.B Position */
+#define MPU_RASR_B_Msk                     (1UL << MPU_RASR_B_Pos)                        /*!< MPU RASR: ATTRS.B Mask */
+
+#define MPU_RASR_SRD_Pos                    8                                             /*!< MPU RASR: Sub-Region Disable Position */
+#define MPU_RASR_SRD_Msk                   (0xFFUL << MPU_RASR_SRD_Pos)                   /*!< MPU RASR: Sub-Region Disable Mask */
+
+#define MPU_RASR_SIZE_Pos                   1                                             /*!< MPU RASR: Region Size Field Position */
+#define MPU_RASR_SIZE_Msk                  (0x1FUL << MPU_RASR_SIZE_Pos)                  /*!< MPU RASR: Region Size Field Mask */
+
+#define MPU_RASR_ENABLE_Pos                 0                                             /*!< MPU RASR: Region enable bit Position */
+#define MPU_RASR_ENABLE_Msk                (1UL << MPU_RASR_ENABLE_Pos)                   /*!< MPU RASR: Region enable bit Disable Mask */
+
+/*@} end of group CMSIS_MPU */
+#endif
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_CoreDebug       Core Debug Registers (CoreDebug)
+    \brief      Cortex-M0+ Core Debug Registers (DCB registers, SHCSR, and DFSR)
+                are only accessible over DAP and not via processor. Therefore
+                they are not covered by the Cortex-M0 header file.
+  @{
+ */
+/*@} end of group CMSIS_CoreDebug */
+
+
+/** \ingroup    CMSIS_core_register
+    \defgroup   CMSIS_core_base     Core Definitions
+    \brief      Definitions for base addresses, unions, and structures.
+  @{
+ */
+
+/* Memory mapping of Cortex-M0+ Hardware */
+#define SCS_BASE            (0xE000E000UL)                            /*!< System Control Space Base Address */
+#define SysTick_BASE        (SCS_BASE +  0x0010UL)                    /*!< SysTick Base Address              */
+#define NVIC_BASE           (SCS_BASE +  0x0100UL)                    /*!< NVIC Base Address                 */
+#define SCB_BASE            (SCS_BASE +  0x0D00UL)                    /*!< System Control Block Base Address */
+
+#define SCB                 ((SCB_Type       *)     SCB_BASE      )   /*!< SCB configuration struct           */
+#define SysTick             ((SysTick_Type   *)     SysTick_BASE  )   /*!< SysTick configuration struct       */
+#define NVIC                ((NVIC_Type      *)     NVIC_BASE     )   /*!< NVIC configuration struct          */
+
+#if (__MPU_PRESENT == 1)
+  #define MPU_BASE          (SCS_BASE +  0x0D90UL)                    /*!< Memory Protection Unit             */
+  #define MPU               ((MPU_Type       *)     MPU_BASE      )   /*!< Memory Protection Unit             */
+#endif
+
+/*@} */
+
+
+
+/*******************************************************************************
+ *                Hardware Abstraction Layer
+  Core Function Interface contains:
+  - Core NVIC Functions
+  - Core SysTick Functions
+  - Core Register Access Functions
+ ******************************************************************************/
+/** \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference
+*/
+
+
+
+/* ##########################   NVIC functions  #################################### */
+/** \ingroup  CMSIS_Core_FunctionInterface
+    \defgroup CMSIS_Core_NVICFunctions NVIC Functions
+    \brief      Functions that manage interrupts and exceptions via the NVIC.
+    @{
+ */
+
+/* Interrupt Priorities are WORD accessible only under ARMv6M                   */
+/* The following MACROS handle generation of the register offset and byte masks */
+#define _BIT_SHIFT(IRQn)         (  (((uint32_t)(IRQn)       )    &  0x03) * 8 )
+#define _SHP_IDX(IRQn)           ( ((((uint32_t)(IRQn) & 0x0F)-8) >>    2)     )
+#define _IP_IDX(IRQn)            (   ((uint32_t)(IRQn)            >>    2)     )
+
+
+/** \brief  Enable External Interrupt
+
+    The function enables a device-specific interrupt in the NVIC interrupt controller.
+
+    \param [in]      IRQn  External interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
+{
+  NVIC->ISER[0] = (1 << ((uint32_t)(IRQn) & 0x1F));
+}
+
+
+/** \brief  Disable External Interrupt
+
+    The function disables a device-specific interrupt in the NVIC interrupt controller.
+
+    \param [in]      IRQn  External interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_DisableIRQ(IRQn_Type IRQn)
+{
+  NVIC->ICER[0] = (1 << ((uint32_t)(IRQn) & 0x1F));
+}
+
+
+/** \brief  Get Pending Interrupt
+
+    The function reads the pending register in the NVIC and returns the pending bit
+    for the specified interrupt.
+
+    \param [in]      IRQn  Interrupt number.
+
+    \return             0  Interrupt status is not pending.
+    \return             1  Interrupt status is pending.
+ */
+__STATIC_INLINE uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
+{
+  return((uint32_t) ((NVIC->ISPR[0] & (1 << ((uint32_t)(IRQn) & 0x1F)))?1:0));
+}
+
+
+/** \brief  Set Pending Interrupt
+
+    The function sets the pending bit of an external interrupt.
+
+    \param [in]      IRQn  Interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_SetPendingIRQ(IRQn_Type IRQn)
+{
+  NVIC->ISPR[0] = (1 << ((uint32_t)(IRQn) & 0x1F));
+}
+
+
+/** \brief  Clear Pending Interrupt
+
+    The function clears the pending bit of an external interrupt.
+
+    \param [in]      IRQn  External interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
+{
+  NVIC->ICPR[0] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* Clear pending interrupt */
+}
+
+
+/** \brief  Set Interrupt Priority
+
+    The function sets the priority of an interrupt.
+
+    \note The priority cannot be set for every core interrupt.
+
+    \param [in]      IRQn  Interrupt number.
+    \param [in]  priority  Priority to set.
+ */
+__STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
+{
+  if(IRQn < 0) {
+    SCB->SHP[_SHP_IDX(IRQn)] = (SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFF << _BIT_SHIFT(IRQn))) |
+        (((priority << (8 - __NVIC_PRIO_BITS)) & 0xFF) << _BIT_SHIFT(IRQn)); }
+  else {
+    NVIC->IP[_IP_IDX(IRQn)] = (NVIC->IP[_IP_IDX(IRQn)] & ~(0xFF << _BIT_SHIFT(IRQn))) |
+        (((priority << (8 - __NVIC_PRIO_BITS)) & 0xFF) << _BIT_SHIFT(IRQn)); }
+}
+
+
+/** \brief  Get Interrupt Priority
+
+    The function reads the priority of an interrupt. The interrupt
+    number can be positive to specify an external (device specific)
+    interrupt, or negative to specify an internal (core) interrupt.
+
+
+    \param [in]   IRQn  Interrupt number.
+    \return             Interrupt Priority. Value is aligned automatically to the implemented
+                        priority bits of the microcontroller.
+ */
+__STATIC_INLINE uint32_t NVIC_GetPriority(IRQn_Type IRQn)
+{
+
+  if(IRQn < 0) {
+    return((uint32_t)(((SCB->SHP[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & 0xFF) >> (8 - __NVIC_PRIO_BITS)));  } /* get priority for Cortex-M0 system interrupts */
+  else {
+    return((uint32_t)(((NVIC->IP[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & 0xFF) >> (8 - __NVIC_PRIO_BITS)));  } /* get priority for device specific interrupts  */
+}
+
+
+/** \brief  System Reset
+
+    The function initiates a system reset request to reset the MCU.
+ */
+__STATIC_INLINE void NVIC_SystemReset(void)
+{
+  __DSB();                                                     /* Ensure all outstanding memory accesses included
+                                                                  buffered write are completed before reset */
+  SCB->AIRCR  = ((0x5FA << SCB_AIRCR_VECTKEY_Pos)      |
+                 SCB_AIRCR_SYSRESETREQ_Msk);
+  __DSB();                                                     /* Ensure completion of memory access */
+  while(1);                                                    /* wait until reset */
+}
+
+/*@} end of CMSIS_Core_NVICFunctions */
+
+
+
+/* ##################################    SysTick function  ############################################ */
+/** \ingroup  CMSIS_Core_FunctionInterface
+    \defgroup CMSIS_Core_SysTickFunctions SysTick Functions
+    \brief      Functions that configure the System.
+  @{
+ */
+
+#if (__Vendor_SysTickConfig == 0)
+
+/** \brief  System Tick Configuration
+
+    The function initializes the System Timer and its interrupt, and starts the System Tick Timer.
+    Counter is in free running mode to generate periodic interrupts.
+
+    \param [in]  ticks  Number of ticks between two interrupts.
+
+    \return          0  Function succeeded.
+    \return          1  Function failed.
+
+    \note     When the variable <b>__Vendor_SysTickConfig</b> is set to 1, then the
+    function <b>SysTick_Config</b> is not included. In this case, the file <b><i>device</i>.h</b>
+    must contain a vendor-specific implementation of this function.
+
+ */
+__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
+{
+  if ((ticks - 1) > SysTick_LOAD_RELOAD_Msk)  return (1);      /* Reload value impossible */
+
+  SysTick->LOAD  = ticks - 1;                                  /* set reload register */
+  NVIC_SetPriority (SysTick_IRQn, (1<<__NVIC_PRIO_BITS) - 1);  /* set Priority for Systick Interrupt */
+  SysTick->VAL   = 0;                                          /* Load the SysTick Counter Value */
+  SysTick->CTRL  = SysTick_CTRL_CLKSOURCE_Msk |
+                   SysTick_CTRL_TICKINT_Msk   |
+                   SysTick_CTRL_ENABLE_Msk;                    /* Enable SysTick IRQ and SysTick Timer */
+  return (0);                                                  /* Function successful */
+}
+
+#endif
+
+/*@} end of CMSIS_Core_SysTickFunctions */
+
+
+
+
+#endif /* __CORE_CM0PLUS_H_DEPENDANT */
+
+#endif /* __CMSIS_GENERIC */
+
+#ifdef __cplusplus
+}
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cm3.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cm3.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cm3.h	(revision 270)
@@ -0,0 +1,1627 @@
+/**************************************************************************//**
+ * @file     core_cm3.h
+ * @brief    CMSIS Cortex-M3 Core Peripheral Access Layer Header File
+ * @version  V3.20
+ * @date     25. February 2013
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2009 - 2013 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+
+#if defined ( __ICCARM__ )
+ #pragma system_include  /* treat file as system include file for MISRA check */
+#endif
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+#ifndef __CORE_CM3_H_GENERIC
+#define __CORE_CM3_H_GENERIC
+
+/** \page CMSIS_MISRA_Exceptions  MISRA-C:2004 Compliance Exceptions
+  CMSIS violates the following MISRA-C:2004 rules:
+
+   \li Required Rule 8.5, object/function definition in header file.<br>
+     Function definitions in header files are used to allow 'inlining'.
+
+   \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.<br>
+     Unions are used for effective representation of core registers.
+
+   \li Advisory Rule 19.7, Function-like macro defined.<br>
+     Function-like macros are used to allow more efficient code.
+ */
+
+
+/*******************************************************************************
+ *                 CMSIS definitions
+ ******************************************************************************/
+/** \ingroup Cortex_M3
+  @{
+ */
+
+/*  CMSIS CM3 definitions */
+#define __CM3_CMSIS_VERSION_MAIN  (0x03)                                   /*!< [31:16] CMSIS HAL main version   */
+#define __CM3_CMSIS_VERSION_SUB   (0x20)                                   /*!< [15:0]  CMSIS HAL sub version    */
+#define __CM3_CMSIS_VERSION       ((__CM3_CMSIS_VERSION_MAIN << 16) | \
+                                    __CM3_CMSIS_VERSION_SUB          )     /*!< CMSIS HAL version number         */
+
+#define __CORTEX_M                (0x03)                                   /*!< Cortex-M Core                    */
+
+
+#if   defined ( __CC_ARM )
+  #define __ASM            __asm                                      /*!< asm keyword for ARM Compiler          */
+  #define __INLINE         __inline                                   /*!< inline keyword for ARM Compiler       */
+  #define __STATIC_INLINE  static __inline
+
+#elif defined ( __ICCARM__ )
+  #define __ASM            __asm                                      /*!< asm keyword for IAR Compiler          */
+  #define __INLINE         inline                                     /*!< inline keyword for IAR Compiler. Only available in High optimization mode! */
+  #define __STATIC_INLINE  static inline
+
+#elif defined ( __TMS470__ )
+  #define __ASM            __asm                                      /*!< asm keyword for TI CCS Compiler       */
+  #define __STATIC_INLINE  static inline
+
+#elif defined ( __GNUC__ )
+  #define __ASM            __asm                                      /*!< asm keyword for GNU Compiler          */
+  #define __INLINE         inline                                     /*!< inline keyword for GNU Compiler       */
+  #define __STATIC_INLINE  static inline
+
+#elif defined ( __TASKING__ )
+  #define __ASM            __asm                                      /*!< asm keyword for TASKING Compiler      */
+  #define __INLINE         inline                                     /*!< inline keyword for TASKING Compiler   */
+  #define __STATIC_INLINE  static inline
+
+#endif
+
+/** __FPU_USED indicates whether an FPU is used or not. This core does not support an FPU at all
+*/
+#define __FPU_USED       0
+
+#if defined ( __CC_ARM )
+  #if defined __TARGET_FPU_VFP
+    #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+  #endif
+
+#elif defined ( __ICCARM__ )
+  #if defined __ARMVFP__
+    #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+  #endif
+
+#elif defined ( __TMS470__ )
+  #if defined __TI__VFP_SUPPORT____
+    #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+  #endif
+
+#elif defined ( __GNUC__ )
+  #if defined (__VFP_FP__) && !defined(__SOFTFP__)
+    #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+  #endif
+
+#elif defined ( __TASKING__ )
+  #if defined __FPU_VFP__
+    #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+  #endif
+#endif
+
+#include <stdint.h>                      /* standard types definitions                      */
+#include <core_cmInstr.h>                /* Core Instruction Access                         */
+#include <core_cmFunc.h>                 /* Core Function Access                            */
+
+#endif /* __CORE_CM3_H_GENERIC */
+
+#ifndef __CMSIS_GENERIC
+
+#ifndef __CORE_CM3_H_DEPENDANT
+#define __CORE_CM3_H_DEPENDANT
+
+/* check device defines and use defaults */
+#if defined __CHECK_DEVICE_DEFINES
+  #ifndef __CM3_REV
+    #define __CM3_REV               0x0200
+    #warning "__CM3_REV not defined in device header file; using default!"
+  #endif
+
+  #ifndef __MPU_PRESENT
+    #define __MPU_PRESENT             0
+    #warning "__MPU_PRESENT not defined in device header file; using default!"
+  #endif
+
+  #ifndef __NVIC_PRIO_BITS
+    #define __NVIC_PRIO_BITS          4
+    #warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
+  #endif
+
+  #ifndef __Vendor_SysTickConfig
+    #define __Vendor_SysTickConfig    0
+    #warning "__Vendor_SysTickConfig not defined in device header file; using default!"
+  #endif
+#endif
+
+/* IO definitions (access restrictions to peripheral registers) */
+/**
+    \defgroup CMSIS_glob_defs CMSIS Global Defines
+
+    <strong>IO Type Qualifiers</strong> are used
+    \li to specify the access to peripheral variables.
+    \li for automatic generation of peripheral register debug information.
+*/
+#ifdef __cplusplus
+  #define   __I     volatile             /*!< Defines 'read only' permissions                 */
+#else
+  #define   __I     volatile const       /*!< Defines 'read only' permissions                 */
+#endif
+#define     __O     volatile             /*!< Defines 'write only' permissions                */
+#define     __IO    volatile             /*!< Defines 'read / write' permissions              */
+
+/*@} end of group Cortex_M3 */
+
+
+
+/*******************************************************************************
+ *                 Register Abstraction
+  Core Register contain:
+  - Core Register
+  - Core NVIC Register
+  - Core SCB Register
+  - Core SysTick Register
+  - Core Debug Register
+  - Core MPU Register
+ ******************************************************************************/
+/** \defgroup CMSIS_core_register Defines and Type Definitions
+    \brief Type definitions and defines for Cortex-M processor based devices.
+*/
+
+/** \ingroup    CMSIS_core_register
+    \defgroup   CMSIS_CORE  Status and Control Registers
+    \brief  Core Register type definitions.
+  @{
+ */
+
+/** \brief  Union type to access the Application Program Status Register (APSR).
+ */
+typedef union
+{
+  struct
+  {
+#if (__CORTEX_M != 0x04)
+    uint32_t _reserved0:27;              /*!< bit:  0..26  Reserved                           */
+#else
+    uint32_t _reserved0:16;              /*!< bit:  0..15  Reserved                           */
+    uint32_t GE:4;                       /*!< bit: 16..19  Greater than or Equal flags        */
+    uint32_t _reserved1:7;               /*!< bit: 20..26  Reserved                           */
+#endif
+    uint32_t Q:1;                        /*!< bit:     27  Saturation condition flag          */
+    uint32_t V:1;                        /*!< bit:     28  Overflow condition code flag       */
+    uint32_t C:1;                        /*!< bit:     29  Carry condition code flag          */
+    uint32_t Z:1;                        /*!< bit:     30  Zero condition code flag           */
+    uint32_t N:1;                        /*!< bit:     31  Negative condition code flag       */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} APSR_Type;
+
+
+/** \brief  Union type to access the Interrupt Program Status Register (IPSR).
+ */
+typedef union
+{
+  struct
+  {
+    uint32_t ISR:9;                      /*!< bit:  0.. 8  Exception number                   */
+    uint32_t _reserved0:23;              /*!< bit:  9..31  Reserved                           */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} IPSR_Type;
+
+
+/** \brief  Union type to access the Special-Purpose Program Status Registers (xPSR).
+ */
+typedef union
+{
+  struct
+  {
+    uint32_t ISR:9;                      /*!< bit:  0.. 8  Exception number                   */
+#if (__CORTEX_M != 0x04)
+    uint32_t _reserved0:15;              /*!< bit:  9..23  Reserved                           */
+#else
+    uint32_t _reserved0:7;               /*!< bit:  9..15  Reserved                           */
+    uint32_t GE:4;                       /*!< bit: 16..19  Greater than or Equal flags        */
+    uint32_t _reserved1:4;               /*!< bit: 20..23  Reserved                           */
+#endif
+    uint32_t T:1;                        /*!< bit:     24  Thumb bit        (read 0)          */
+    uint32_t IT:2;                       /*!< bit: 25..26  saved IT state   (read 0)          */
+    uint32_t Q:1;                        /*!< bit:     27  Saturation condition flag          */
+    uint32_t V:1;                        /*!< bit:     28  Overflow condition code flag       */
+    uint32_t C:1;                        /*!< bit:     29  Carry condition code flag          */
+    uint32_t Z:1;                        /*!< bit:     30  Zero condition code flag           */
+    uint32_t N:1;                        /*!< bit:     31  Negative condition code flag       */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} xPSR_Type;
+
+
+/** \brief  Union type to access the Control Registers (CONTROL).
+ */
+typedef union
+{
+  struct
+  {
+    uint32_t nPRIV:1;                    /*!< bit:      0  Execution privilege in Thread mode */
+    uint32_t SPSEL:1;                    /*!< bit:      1  Stack to be used                   */
+    uint32_t FPCA:1;                     /*!< bit:      2  FP extension active flag           */
+    uint32_t _reserved0:29;              /*!< bit:  3..31  Reserved                           */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} CONTROL_Type;
+
+/*@} end of group CMSIS_CORE */
+
+
+/** \ingroup    CMSIS_core_register
+    \defgroup   CMSIS_NVIC  Nested Vectored Interrupt Controller (NVIC)
+    \brief      Type definitions for the NVIC Registers
+  @{
+ */
+
+/** \brief  Structure type to access the Nested Vectored Interrupt Controller (NVIC).
+ */
+typedef struct
+{
+  __IO uint32_t ISER[8];                 /*!< Offset: 0x000 (R/W)  Interrupt Set Enable Register           */
+       uint32_t RESERVED0[24];
+  __IO uint32_t ICER[8];                 /*!< Offset: 0x080 (R/W)  Interrupt Clear Enable Register         */
+       uint32_t RSERVED1[24];
+  __IO uint32_t ISPR[8];                 /*!< Offset: 0x100 (R/W)  Interrupt Set Pending Register          */
+       uint32_t RESERVED2[24];
+  __IO uint32_t ICPR[8];                 /*!< Offset: 0x180 (R/W)  Interrupt Clear Pending Register        */
+       uint32_t RESERVED3[24];
+  __IO uint32_t IABR[8];                 /*!< Offset: 0x200 (R/W)  Interrupt Active bit Register           */
+       uint32_t RESERVED4[56];
+  __IO uint8_t  IP[240];                 /*!< Offset: 0x300 (R/W)  Interrupt Priority Register (8Bit wide) */
+       uint32_t RESERVED5[644];
+  __O  uint32_t STIR;                    /*!< Offset: 0xE00 ( /W)  Software Trigger Interrupt Register     */
+}  NVIC_Type;
+
+/* Software Triggered Interrupt Register Definitions */
+#define NVIC_STIR_INTID_Pos                 0                                          /*!< STIR: INTLINESNUM Position */
+#define NVIC_STIR_INTID_Msk                (0x1FFUL << NVIC_STIR_INTID_Pos)            /*!< STIR: INTLINESNUM Mask */
+
+/*@} end of group CMSIS_NVIC */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_SCB     System Control Block (SCB)
+    \brief      Type definitions for the System Control Block Registers
+  @{
+ */
+
+/** \brief  Structure type to access the System Control Block (SCB).
+ */
+typedef struct
+{
+  __I  uint32_t CPUID;                   /*!< Offset: 0x000 (R/ )  CPUID Base Register                                   */
+  __IO uint32_t ICSR;                    /*!< Offset: 0x004 (R/W)  Interrupt Control and State Register                  */
+  __IO uint32_t VTOR;                    /*!< Offset: 0x008 (R/W)  Vector Table Offset Register                          */
+  __IO uint32_t AIRCR;                   /*!< Offset: 0x00C (R/W)  Application Interrupt and Reset Control Register      */
+  __IO uint32_t SCR;                     /*!< Offset: 0x010 (R/W)  System Control Register                               */
+  __IO uint32_t CCR;                     /*!< Offset: 0x014 (R/W)  Configuration Control Register                        */
+  __IO uint8_t  SHP[12];                 /*!< Offset: 0x018 (R/W)  System Handlers Priority Registers (4-7, 8-11, 12-15) */
+  __IO uint32_t SHCSR;                   /*!< Offset: 0x024 (R/W)  System Handler Control and State Register             */
+  __IO uint32_t CFSR;                    /*!< Offset: 0x028 (R/W)  Configurable Fault Status Register                    */
+  __IO uint32_t HFSR;                    /*!< Offset: 0x02C (R/W)  HardFault Status Register                             */
+  __IO uint32_t DFSR;                    /*!< Offset: 0x030 (R/W)  Debug Fault Status Register                           */
+  __IO uint32_t MMFAR;                   /*!< Offset: 0x034 (R/W)  MemManage Fault Address Register                      */
+  __IO uint32_t BFAR;                    /*!< Offset: 0x038 (R/W)  BusFault Address Register                             */
+  __IO uint32_t AFSR;                    /*!< Offset: 0x03C (R/W)  Auxiliary Fault Status Register                       */
+  __I  uint32_t PFR[2];                  /*!< Offset: 0x040 (R/ )  Processor Feature Register                            */
+  __I  uint32_t DFR;                     /*!< Offset: 0x048 (R/ )  Debug Feature Register                                */
+  __I  uint32_t ADR;                     /*!< Offset: 0x04C (R/ )  Auxiliary Feature Register                            */
+  __I  uint32_t MMFR[4];                 /*!< Offset: 0x050 (R/ )  Memory Model Feature Register                         */
+  __I  uint32_t ISAR[5];                 /*!< Offset: 0x060 (R/ )  Instruction Set Attributes Register                   */
+       uint32_t RESERVED0[5];
+  __IO uint32_t CPACR;                   /*!< Offset: 0x088 (R/W)  Coprocessor Access Control Register                   */
+} SCB_Type;
+
+/* SCB CPUID Register Definitions */
+#define SCB_CPUID_IMPLEMENTER_Pos          24                                             /*!< SCB CPUID: IMPLEMENTER Position */
+#define SCB_CPUID_IMPLEMENTER_Msk          (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos)          /*!< SCB CPUID: IMPLEMENTER Mask */
+
+#define SCB_CPUID_VARIANT_Pos              20                                             /*!< SCB CPUID: VARIANT Position */
+#define SCB_CPUID_VARIANT_Msk              (0xFUL << SCB_CPUID_VARIANT_Pos)               /*!< SCB CPUID: VARIANT Mask */
+
+#define SCB_CPUID_ARCHITECTURE_Pos         16                                             /*!< SCB CPUID: ARCHITECTURE Position */
+#define SCB_CPUID_ARCHITECTURE_Msk         (0xFUL << SCB_CPUID_ARCHITECTURE_Pos)          /*!< SCB CPUID: ARCHITECTURE Mask */
+
+#define SCB_CPUID_PARTNO_Pos                4                                             /*!< SCB CPUID: PARTNO Position */
+#define SCB_CPUID_PARTNO_Msk               (0xFFFUL << SCB_CPUID_PARTNO_Pos)              /*!< SCB CPUID: PARTNO Mask */
+
+#define SCB_CPUID_REVISION_Pos              0                                             /*!< SCB CPUID: REVISION Position */
+#define SCB_CPUID_REVISION_Msk             (0xFUL << SCB_CPUID_REVISION_Pos)              /*!< SCB CPUID: REVISION Mask */
+
+/* SCB Interrupt Control State Register Definitions */
+#define SCB_ICSR_NMIPENDSET_Pos            31                                             /*!< SCB ICSR: NMIPENDSET Position */
+#define SCB_ICSR_NMIPENDSET_Msk            (1UL << SCB_ICSR_NMIPENDSET_Pos)               /*!< SCB ICSR: NMIPENDSET Mask */
+
+#define SCB_ICSR_PENDSVSET_Pos             28                                             /*!< SCB ICSR: PENDSVSET Position */
+#define SCB_ICSR_PENDSVSET_Msk             (1UL << SCB_ICSR_PENDSVSET_Pos)                /*!< SCB ICSR: PENDSVSET Mask */
+
+#define SCB_ICSR_PENDSVCLR_Pos             27                                             /*!< SCB ICSR: PENDSVCLR Position */
+#define SCB_ICSR_PENDSVCLR_Msk             (1UL << SCB_ICSR_PENDSVCLR_Pos)                /*!< SCB ICSR: PENDSVCLR Mask */
+
+#define SCB_ICSR_PENDSTSET_Pos             26                                             /*!< SCB ICSR: PENDSTSET Position */
+#define SCB_ICSR_PENDSTSET_Msk             (1UL << SCB_ICSR_PENDSTSET_Pos)                /*!< SCB ICSR: PENDSTSET Mask */
+
+#define SCB_ICSR_PENDSTCLR_Pos             25                                             /*!< SCB ICSR: PENDSTCLR Position */
+#define SCB_ICSR_PENDSTCLR_Msk             (1UL << SCB_ICSR_PENDSTCLR_Pos)                /*!< SCB ICSR: PENDSTCLR Mask */
+
+#define SCB_ICSR_ISRPREEMPT_Pos            23                                             /*!< SCB ICSR: ISRPREEMPT Position */
+#define SCB_ICSR_ISRPREEMPT_Msk            (1UL << SCB_ICSR_ISRPREEMPT_Pos)               /*!< SCB ICSR: ISRPREEMPT Mask */
+
+#define SCB_ICSR_ISRPENDING_Pos            22                                             /*!< SCB ICSR: ISRPENDING Position */
+#define SCB_ICSR_ISRPENDING_Msk            (1UL << SCB_ICSR_ISRPENDING_Pos)               /*!< SCB ICSR: ISRPENDING Mask */
+
+#define SCB_ICSR_VECTPENDING_Pos           12                                             /*!< SCB ICSR: VECTPENDING Position */
+#define SCB_ICSR_VECTPENDING_Msk           (0x1FFUL << SCB_ICSR_VECTPENDING_Pos)          /*!< SCB ICSR: VECTPENDING Mask */
+
+#define SCB_ICSR_RETTOBASE_Pos             11                                             /*!< SCB ICSR: RETTOBASE Position */
+#define SCB_ICSR_RETTOBASE_Msk             (1UL << SCB_ICSR_RETTOBASE_Pos)                /*!< SCB ICSR: RETTOBASE Mask */
+
+#define SCB_ICSR_VECTACTIVE_Pos             0                                             /*!< SCB ICSR: VECTACTIVE Position */
+#define SCB_ICSR_VECTACTIVE_Msk            (0x1FFUL << SCB_ICSR_VECTACTIVE_Pos)           /*!< SCB ICSR: VECTACTIVE Mask */
+
+/* SCB Vector Table Offset Register Definitions */
+#if (__CM3_REV < 0x0201)                   /* core r2p1 */
+#define SCB_VTOR_TBLBASE_Pos               29                                             /*!< SCB VTOR: TBLBASE Position */
+#define SCB_VTOR_TBLBASE_Msk               (1UL << SCB_VTOR_TBLBASE_Pos)                  /*!< SCB VTOR: TBLBASE Mask */
+
+#define SCB_VTOR_TBLOFF_Pos                 7                                             /*!< SCB VTOR: TBLOFF Position */
+#define SCB_VTOR_TBLOFF_Msk                (0x3FFFFFUL << SCB_VTOR_TBLOFF_Pos)            /*!< SCB VTOR: TBLOFF Mask */
+#else
+#define SCB_VTOR_TBLOFF_Pos                 7                                             /*!< SCB VTOR: TBLOFF Position */
+#define SCB_VTOR_TBLOFF_Msk                (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos)           /*!< SCB VTOR: TBLOFF Mask */
+#endif
+
+/* SCB Application Interrupt and Reset Control Register Definitions */
+#define SCB_AIRCR_VECTKEY_Pos              16                                             /*!< SCB AIRCR: VECTKEY Position */
+#define SCB_AIRCR_VECTKEY_Msk              (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos)            /*!< SCB AIRCR: VECTKEY Mask */
+
+#define SCB_AIRCR_VECTKEYSTAT_Pos          16                                             /*!< SCB AIRCR: VECTKEYSTAT Position */
+#define SCB_AIRCR_VECTKEYSTAT_Msk          (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos)        /*!< SCB AIRCR: VECTKEYSTAT Mask */
+
+#define SCB_AIRCR_ENDIANESS_Pos            15                                             /*!< SCB AIRCR: ENDIANESS Position */
+#define SCB_AIRCR_ENDIANESS_Msk            (1UL << SCB_AIRCR_ENDIANESS_Pos)               /*!< SCB AIRCR: ENDIANESS Mask */
+
+#define SCB_AIRCR_PRIGROUP_Pos              8                                             /*!< SCB AIRCR: PRIGROUP Position */
+#define SCB_AIRCR_PRIGROUP_Msk             (7UL << SCB_AIRCR_PRIGROUP_Pos)                /*!< SCB AIRCR: PRIGROUP Mask */
+
+#define SCB_AIRCR_SYSRESETREQ_Pos           2                                             /*!< SCB AIRCR: SYSRESETREQ Position */
+#define SCB_AIRCR_SYSRESETREQ_Msk          (1UL << SCB_AIRCR_SYSRESETREQ_Pos)             /*!< SCB AIRCR: SYSRESETREQ Mask */
+
+#define SCB_AIRCR_VECTCLRACTIVE_Pos         1                                             /*!< SCB AIRCR: VECTCLRACTIVE Position */
+#define SCB_AIRCR_VECTCLRACTIVE_Msk        (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos)           /*!< SCB AIRCR: VECTCLRACTIVE Mask */
+
+#define SCB_AIRCR_VECTRESET_Pos             0                                             /*!< SCB AIRCR: VECTRESET Position */
+#define SCB_AIRCR_VECTRESET_Msk            (1UL << SCB_AIRCR_VECTRESET_Pos)               /*!< SCB AIRCR: VECTRESET Mask */
+
+/* SCB System Control Register Definitions */
+#define SCB_SCR_SEVONPEND_Pos               4                                             /*!< SCB SCR: SEVONPEND Position */
+#define SCB_SCR_SEVONPEND_Msk              (1UL << SCB_SCR_SEVONPEND_Pos)                 /*!< SCB SCR: SEVONPEND Mask */
+
+#define SCB_SCR_SLEEPDEEP_Pos               2                                             /*!< SCB SCR: SLEEPDEEP Position */
+#define SCB_SCR_SLEEPDEEP_Msk              (1UL << SCB_SCR_SLEEPDEEP_Pos)                 /*!< SCB SCR: SLEEPDEEP Mask */
+
+#define SCB_SCR_SLEEPONEXIT_Pos             1                                             /*!< SCB SCR: SLEEPONEXIT Position */
+#define SCB_SCR_SLEEPONEXIT_Msk            (1UL << SCB_SCR_SLEEPONEXIT_Pos)               /*!< SCB SCR: SLEEPONEXIT Mask */
+
+/* SCB Configuration Control Register Definitions */
+#define SCB_CCR_STKALIGN_Pos                9                                             /*!< SCB CCR: STKALIGN Position */
+#define SCB_CCR_STKALIGN_Msk               (1UL << SCB_CCR_STKALIGN_Pos)                  /*!< SCB CCR: STKALIGN Mask */
+
+#define SCB_CCR_BFHFNMIGN_Pos               8                                             /*!< SCB CCR: BFHFNMIGN Position */
+#define SCB_CCR_BFHFNMIGN_Msk              (1UL << SCB_CCR_BFHFNMIGN_Pos)                 /*!< SCB CCR: BFHFNMIGN Mask */
+
+#define SCB_CCR_DIV_0_TRP_Pos               4                                             /*!< SCB CCR: DIV_0_TRP Position */
+#define SCB_CCR_DIV_0_TRP_Msk              (1UL << SCB_CCR_DIV_0_TRP_Pos)                 /*!< SCB CCR: DIV_0_TRP Mask */
+
+#define SCB_CCR_UNALIGN_TRP_Pos             3                                             /*!< SCB CCR: UNALIGN_TRP Position */
+#define SCB_CCR_UNALIGN_TRP_Msk            (1UL << SCB_CCR_UNALIGN_TRP_Pos)               /*!< SCB CCR: UNALIGN_TRP Mask */
+
+#define SCB_CCR_USERSETMPEND_Pos            1                                             /*!< SCB CCR: USERSETMPEND Position */
+#define SCB_CCR_USERSETMPEND_Msk           (1UL << SCB_CCR_USERSETMPEND_Pos)              /*!< SCB CCR: USERSETMPEND Mask */
+
+#define SCB_CCR_NONBASETHRDENA_Pos          0                                             /*!< SCB CCR: NONBASETHRDENA Position */
+#define SCB_CCR_NONBASETHRDENA_Msk         (1UL << SCB_CCR_NONBASETHRDENA_Pos)            /*!< SCB CCR: NONBASETHRDENA Mask */
+
+/* SCB System Handler Control and State Register Definitions */
+#define SCB_SHCSR_USGFAULTENA_Pos          18                                             /*!< SCB SHCSR: USGFAULTENA Position */
+#define SCB_SHCSR_USGFAULTENA_Msk          (1UL << SCB_SHCSR_USGFAULTENA_Pos)             /*!< SCB SHCSR: USGFAULTENA Mask */
+
+#define SCB_SHCSR_BUSFAULTENA_Pos          17                                             /*!< SCB SHCSR: BUSFAULTENA Position */
+#define SCB_SHCSR_BUSFAULTENA_Msk          (1UL << SCB_SHCSR_BUSFAULTENA_Pos)             /*!< SCB SHCSR: BUSFAULTENA Mask */
+
+#define SCB_SHCSR_MEMFAULTENA_Pos          16                                             /*!< SCB SHCSR: MEMFAULTENA Position */
+#define SCB_SHCSR_MEMFAULTENA_Msk          (1UL << SCB_SHCSR_MEMFAULTENA_Pos)             /*!< SCB SHCSR: MEMFAULTENA Mask */
+
+#define SCB_SHCSR_SVCALLPENDED_Pos         15                                             /*!< SCB SHCSR: SVCALLPENDED Position */
+#define SCB_SHCSR_SVCALLPENDED_Msk         (1UL << SCB_SHCSR_SVCALLPENDED_Pos)            /*!< SCB SHCSR: SVCALLPENDED Mask */
+
+#define SCB_SHCSR_BUSFAULTPENDED_Pos       14                                             /*!< SCB SHCSR: BUSFAULTPENDED Position */
+#define SCB_SHCSR_BUSFAULTPENDED_Msk       (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos)          /*!< SCB SHCSR: BUSFAULTPENDED Mask */
+
+#define SCB_SHCSR_MEMFAULTPENDED_Pos       13                                             /*!< SCB SHCSR: MEMFAULTPENDED Position */
+#define SCB_SHCSR_MEMFAULTPENDED_Msk       (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos)          /*!< SCB SHCSR: MEMFAULTPENDED Mask */
+
+#define SCB_SHCSR_USGFAULTPENDED_Pos       12                                             /*!< SCB SHCSR: USGFAULTPENDED Position */
+#define SCB_SHCSR_USGFAULTPENDED_Msk       (1UL << SCB_SHCSR_USGFAULTPENDED_Pos)          /*!< SCB SHCSR: USGFAULTPENDED Mask */
+
+#define SCB_SHCSR_SYSTICKACT_Pos           11                                             /*!< SCB SHCSR: SYSTICKACT Position */
+#define SCB_SHCSR_SYSTICKACT_Msk           (1UL << SCB_SHCSR_SYSTICKACT_Pos)              /*!< SCB SHCSR: SYSTICKACT Mask */
+
+#define SCB_SHCSR_PENDSVACT_Pos            10                                             /*!< SCB SHCSR: PENDSVACT Position */
+#define SCB_SHCSR_PENDSVACT_Msk            (1UL << SCB_SHCSR_PENDSVACT_Pos)               /*!< SCB SHCSR: PENDSVACT Mask */
+
+#define SCB_SHCSR_MONITORACT_Pos            8                                             /*!< SCB SHCSR: MONITORACT Position */
+#define SCB_SHCSR_MONITORACT_Msk           (1UL << SCB_SHCSR_MONITORACT_Pos)              /*!< SCB SHCSR: MONITORACT Mask */
+
+#define SCB_SHCSR_SVCALLACT_Pos             7                                             /*!< SCB SHCSR: SVCALLACT Position */
+#define SCB_SHCSR_SVCALLACT_Msk            (1UL << SCB_SHCSR_SVCALLACT_Pos)               /*!< SCB SHCSR: SVCALLACT Mask */
+
+#define SCB_SHCSR_USGFAULTACT_Pos           3                                             /*!< SCB SHCSR: USGFAULTACT Position */
+#define SCB_SHCSR_USGFAULTACT_Msk          (1UL << SCB_SHCSR_USGFAULTACT_Pos)             /*!< SCB SHCSR: USGFAULTACT Mask */
+
+#define SCB_SHCSR_BUSFAULTACT_Pos           1                                             /*!< SCB SHCSR: BUSFAULTACT Position */
+#define SCB_SHCSR_BUSFAULTACT_Msk          (1UL << SCB_SHCSR_BUSFAULTACT_Pos)             /*!< SCB SHCSR: BUSFAULTACT Mask */
+
+#define SCB_SHCSR_MEMFAULTACT_Pos           0                                             /*!< SCB SHCSR: MEMFAULTACT Position */
+#define SCB_SHCSR_MEMFAULTACT_Msk          (1UL << SCB_SHCSR_MEMFAULTACT_Pos)             /*!< SCB SHCSR: MEMFAULTACT Mask */
+
+/* SCB Configurable Fault Status Registers Definitions */
+#define SCB_CFSR_USGFAULTSR_Pos            16                                             /*!< SCB CFSR: Usage Fault Status Register Position */
+#define SCB_CFSR_USGFAULTSR_Msk            (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos)          /*!< SCB CFSR: Usage Fault Status Register Mask */
+
+#define SCB_CFSR_BUSFAULTSR_Pos             8                                             /*!< SCB CFSR: Bus Fault Status Register Position */
+#define SCB_CFSR_BUSFAULTSR_Msk            (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos)            /*!< SCB CFSR: Bus Fault Status Register Mask */
+
+#define SCB_CFSR_MEMFAULTSR_Pos             0                                             /*!< SCB CFSR: Memory Manage Fault Status Register Position */
+#define SCB_CFSR_MEMFAULTSR_Msk            (0xFFUL << SCB_CFSR_MEMFAULTSR_Pos)            /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
+
+/* SCB Hard Fault Status Registers Definitions */
+#define SCB_HFSR_DEBUGEVT_Pos              31                                             /*!< SCB HFSR: DEBUGEVT Position */
+#define SCB_HFSR_DEBUGEVT_Msk              (1UL << SCB_HFSR_DEBUGEVT_Pos)                 /*!< SCB HFSR: DEBUGEVT Mask */
+
+#define SCB_HFSR_FORCED_Pos                30                                             /*!< SCB HFSR: FORCED Position */
+#define SCB_HFSR_FORCED_Msk                (1UL << SCB_HFSR_FORCED_Pos)                   /*!< SCB HFSR: FORCED Mask */
+
+#define SCB_HFSR_VECTTBL_Pos                1                                             /*!< SCB HFSR: VECTTBL Position */
+#define SCB_HFSR_VECTTBL_Msk               (1UL << SCB_HFSR_VECTTBL_Pos)                  /*!< SCB HFSR: VECTTBL Mask */
+
+/* SCB Debug Fault Status Register Definitions */
+#define SCB_DFSR_EXTERNAL_Pos               4                                             /*!< SCB DFSR: EXTERNAL Position */
+#define SCB_DFSR_EXTERNAL_Msk              (1UL << SCB_DFSR_EXTERNAL_Pos)                 /*!< SCB DFSR: EXTERNAL Mask */
+
+#define SCB_DFSR_VCATCH_Pos                 3                                             /*!< SCB DFSR: VCATCH Position */
+#define SCB_DFSR_VCATCH_Msk                (1UL << SCB_DFSR_VCATCH_Pos)                   /*!< SCB DFSR: VCATCH Mask */
+
+#define SCB_DFSR_DWTTRAP_Pos                2                                             /*!< SCB DFSR: DWTTRAP Position */
+#define SCB_DFSR_DWTTRAP_Msk               (1UL << SCB_DFSR_DWTTRAP_Pos)                  /*!< SCB DFSR: DWTTRAP Mask */
+
+#define SCB_DFSR_BKPT_Pos                   1                                             /*!< SCB DFSR: BKPT Position */
+#define SCB_DFSR_BKPT_Msk                  (1UL << SCB_DFSR_BKPT_Pos)                     /*!< SCB DFSR: BKPT Mask */
+
+#define SCB_DFSR_HALTED_Pos                 0                                             /*!< SCB DFSR: HALTED Position */
+#define SCB_DFSR_HALTED_Msk                (1UL << SCB_DFSR_HALTED_Pos)                   /*!< SCB DFSR: HALTED Mask */
+
+/*@} end of group CMSIS_SCB */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB)
+    \brief      Type definitions for the System Control and ID Register not in the SCB
+  @{
+ */
+
+/** \brief  Structure type to access the System Control and ID Register not in the SCB.
+ */
+typedef struct
+{
+       uint32_t RESERVED0[1];
+  __I  uint32_t ICTR;                    /*!< Offset: 0x004 (R/ )  Interrupt Controller Type Register      */
+#if ((defined __CM3_REV) && (__CM3_REV >= 0x200))
+  __IO uint32_t ACTLR;                   /*!< Offset: 0x008 (R/W)  Auxiliary Control Register      */
+#else
+       uint32_t RESERVED1[1];
+#endif
+} SCnSCB_Type;
+
+/* Interrupt Controller Type Register Definitions */
+#define SCnSCB_ICTR_INTLINESNUM_Pos         0                                          /*!< ICTR: INTLINESNUM Position */
+#define SCnSCB_ICTR_INTLINESNUM_Msk        (0xFUL << SCnSCB_ICTR_INTLINESNUM_Pos)      /*!< ICTR: INTLINESNUM Mask */
+
+/* Auxiliary Control Register Definitions */
+
+#define SCnSCB_ACTLR_DISFOLD_Pos            2                                          /*!< ACTLR: DISFOLD Position */
+#define SCnSCB_ACTLR_DISFOLD_Msk           (1UL << SCnSCB_ACTLR_DISFOLD_Pos)           /*!< ACTLR: DISFOLD Mask */
+
+#define SCnSCB_ACTLR_DISDEFWBUF_Pos         1                                          /*!< ACTLR: DISDEFWBUF Position */
+#define SCnSCB_ACTLR_DISDEFWBUF_Msk        (1UL << SCnSCB_ACTLR_DISDEFWBUF_Pos)        /*!< ACTLR: DISDEFWBUF Mask */
+
+#define SCnSCB_ACTLR_DISMCYCINT_Pos         0                                          /*!< ACTLR: DISMCYCINT Position */
+#define SCnSCB_ACTLR_DISMCYCINT_Msk        (1UL << SCnSCB_ACTLR_DISMCYCINT_Pos)        /*!< ACTLR: DISMCYCINT Mask */
+
+/*@} end of group CMSIS_SCnotSCB */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_SysTick     System Tick Timer (SysTick)
+    \brief      Type definitions for the System Timer Registers.
+  @{
+ */
+
+/** \brief  Structure type to access the System Timer (SysTick).
+ */
+typedef struct
+{
+  __IO uint32_t CTRL;                    /*!< Offset: 0x000 (R/W)  SysTick Control and Status Register */
+  __IO uint32_t LOAD;                    /*!< Offset: 0x004 (R/W)  SysTick Reload Value Register       */
+  __IO uint32_t VAL;                     /*!< Offset: 0x008 (R/W)  SysTick Current Value Register      */
+  __I  uint32_t CALIB;                   /*!< Offset: 0x00C (R/ )  SysTick Calibration Register        */
+} SysTick_Type;
+
+/* SysTick Control / Status Register Definitions */
+#define SysTick_CTRL_COUNTFLAG_Pos         16                                             /*!< SysTick CTRL: COUNTFLAG Position */
+#define SysTick_CTRL_COUNTFLAG_Msk         (1UL << SysTick_CTRL_COUNTFLAG_Pos)            /*!< SysTick CTRL: COUNTFLAG Mask */
+
+#define SysTick_CTRL_CLKSOURCE_Pos          2                                             /*!< SysTick CTRL: CLKSOURCE Position */
+#define SysTick_CTRL_CLKSOURCE_Msk         (1UL << SysTick_CTRL_CLKSOURCE_Pos)            /*!< SysTick CTRL: CLKSOURCE Mask */
+
+#define SysTick_CTRL_TICKINT_Pos            1                                             /*!< SysTick CTRL: TICKINT Position */
+#define SysTick_CTRL_TICKINT_Msk           (1UL << SysTick_CTRL_TICKINT_Pos)              /*!< SysTick CTRL: TICKINT Mask */
+
+#define SysTick_CTRL_ENABLE_Pos             0                                             /*!< SysTick CTRL: ENABLE Position */
+#define SysTick_CTRL_ENABLE_Msk            (1UL << SysTick_CTRL_ENABLE_Pos)               /*!< SysTick CTRL: ENABLE Mask */
+
+/* SysTick Reload Register Definitions */
+#define SysTick_LOAD_RELOAD_Pos             0                                             /*!< SysTick LOAD: RELOAD Position */
+#define SysTick_LOAD_RELOAD_Msk            (0xFFFFFFUL << SysTick_LOAD_RELOAD_Pos)        /*!< SysTick LOAD: RELOAD Mask */
+
+/* SysTick Current Register Definitions */
+#define SysTick_VAL_CURRENT_Pos             0                                             /*!< SysTick VAL: CURRENT Position */
+#define SysTick_VAL_CURRENT_Msk            (0xFFFFFFUL << SysTick_VAL_CURRENT_Pos)        /*!< SysTick VAL: CURRENT Mask */
+
+/* SysTick Calibration Register Definitions */
+#define SysTick_CALIB_NOREF_Pos            31                                             /*!< SysTick CALIB: NOREF Position */
+#define SysTick_CALIB_NOREF_Msk            (1UL << SysTick_CALIB_NOREF_Pos)               /*!< SysTick CALIB: NOREF Mask */
+
+#define SysTick_CALIB_SKEW_Pos             30                                             /*!< SysTick CALIB: SKEW Position */
+#define SysTick_CALIB_SKEW_Msk             (1UL << SysTick_CALIB_SKEW_Pos)                /*!< SysTick CALIB: SKEW Mask */
+
+#define SysTick_CALIB_TENMS_Pos             0                                             /*!< SysTick CALIB: TENMS Position */
+#define SysTick_CALIB_TENMS_Msk            (0xFFFFFFUL << SysTick_VAL_CURRENT_Pos)        /*!< SysTick CALIB: TENMS Mask */
+
+/*@} end of group CMSIS_SysTick */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_ITM     Instrumentation Trace Macrocell (ITM)
+    \brief      Type definitions for the Instrumentation Trace Macrocell (ITM)
+  @{
+ */
+
+/** \brief  Structure type to access the Instrumentation Trace Macrocell Register (ITM).
+ */
+typedef struct
+{
+  __O  union
+  {
+    __O  uint8_t    u8;                  /*!< Offset: 0x000 ( /W)  ITM Stimulus Port 8-bit                   */
+    __O  uint16_t   u16;                 /*!< Offset: 0x000 ( /W)  ITM Stimulus Port 16-bit                  */
+    __O  uint32_t   u32;                 /*!< Offset: 0x000 ( /W)  ITM Stimulus Port 32-bit                  */
+  }  PORT [32];                          /*!< Offset: 0x000 ( /W)  ITM Stimulus Port Registers               */
+       uint32_t RESERVED0[864];
+  __IO uint32_t TER;                     /*!< Offset: 0xE00 (R/W)  ITM Trace Enable Register                 */
+       uint32_t RESERVED1[15];
+  __IO uint32_t TPR;                     /*!< Offset: 0xE40 (R/W)  ITM Trace Privilege Register              */
+       uint32_t RESERVED2[15];
+  __IO uint32_t TCR;                     /*!< Offset: 0xE80 (R/W)  ITM Trace Control Register                */
+       uint32_t RESERVED3[29];
+  __O  uint32_t IWR;                     /*!< Offset: 0xEF8 ( /W)  ITM Integration Write Register            */
+  __I  uint32_t IRR;                     /*!< Offset: 0xEFC (R/ )  ITM Integration Read Register             */
+  __IO uint32_t IMCR;                    /*!< Offset: 0xF00 (R/W)  ITM Integration Mode Control Register     */
+       uint32_t RESERVED4[43];
+  __O  uint32_t LAR;                     /*!< Offset: 0xFB0 ( /W)  ITM Lock Access Register                  */
+  __I  uint32_t LSR;                     /*!< Offset: 0xFB4 (R/ )  ITM Lock Status Register                  */
+       uint32_t RESERVED5[6];
+  __I  uint32_t PID4;                    /*!< Offset: 0xFD0 (R/ )  ITM Peripheral Identification Register #4 */
+  __I  uint32_t PID5;                    /*!< Offset: 0xFD4 (R/ )  ITM Peripheral Identification Register #5 */
+  __I  uint32_t PID6;                    /*!< Offset: 0xFD8 (R/ )  ITM Peripheral Identification Register #6 */
+  __I  uint32_t PID7;                    /*!< Offset: 0xFDC (R/ )  ITM Peripheral Identification Register #7 */
+  __I  uint32_t PID0;                    /*!< Offset: 0xFE0 (R/ )  ITM Peripheral Identification Register #0 */
+  __I  uint32_t PID1;                    /*!< Offset: 0xFE4 (R/ )  ITM Peripheral Identification Register #1 */
+  __I  uint32_t PID2;                    /*!< Offset: 0xFE8 (R/ )  ITM Peripheral Identification Register #2 */
+  __I  uint32_t PID3;                    /*!< Offset: 0xFEC (R/ )  ITM Peripheral Identification Register #3 */
+  __I  uint32_t CID0;                    /*!< Offset: 0xFF0 (R/ )  ITM Component  Identification Register #0 */
+  __I  uint32_t CID1;                    /*!< Offset: 0xFF4 (R/ )  ITM Component  Identification Register #1 */
+  __I  uint32_t CID2;                    /*!< Offset: 0xFF8 (R/ )  ITM Component  Identification Register #2 */
+  __I  uint32_t CID3;                    /*!< Offset: 0xFFC (R/ )  ITM Component  Identification Register #3 */
+} ITM_Type;
+
+/* ITM Trace Privilege Register Definitions */
+#define ITM_TPR_PRIVMASK_Pos                0                                             /*!< ITM TPR: PRIVMASK Position */
+#define ITM_TPR_PRIVMASK_Msk               (0xFUL << ITM_TPR_PRIVMASK_Pos)                /*!< ITM TPR: PRIVMASK Mask */
+
+/* ITM Trace Control Register Definitions */
+#define ITM_TCR_BUSY_Pos                   23                                             /*!< ITM TCR: BUSY Position */
+#define ITM_TCR_BUSY_Msk                   (1UL << ITM_TCR_BUSY_Pos)                      /*!< ITM TCR: BUSY Mask */
+
+#define ITM_TCR_TraceBusID_Pos             16                                             /*!< ITM TCR: ATBID Position */
+#define ITM_TCR_TraceBusID_Msk             (0x7FUL << ITM_TCR_TraceBusID_Pos)             /*!< ITM TCR: ATBID Mask */
+
+#define ITM_TCR_GTSFREQ_Pos                10                                             /*!< ITM TCR: Global timestamp frequency Position */
+#define ITM_TCR_GTSFREQ_Msk                (3UL << ITM_TCR_GTSFREQ_Pos)                   /*!< ITM TCR: Global timestamp frequency Mask */
+
+#define ITM_TCR_TSPrescale_Pos              8                                             /*!< ITM TCR: TSPrescale Position */
+#define ITM_TCR_TSPrescale_Msk             (3UL << ITM_TCR_TSPrescale_Pos)                /*!< ITM TCR: TSPrescale Mask */
+
+#define ITM_TCR_SWOENA_Pos                  4                                             /*!< ITM TCR: SWOENA Position */
+#define ITM_TCR_SWOENA_Msk                 (1UL << ITM_TCR_SWOENA_Pos)                    /*!< ITM TCR: SWOENA Mask */
+
+#define ITM_TCR_DWTENA_Pos                  3                                             /*!< ITM TCR: DWTENA Position */
+#define ITM_TCR_DWTENA_Msk                 (1UL << ITM_TCR_DWTENA_Pos)                    /*!< ITM TCR: DWTENA Mask */
+
+#define ITM_TCR_SYNCENA_Pos                 2                                             /*!< ITM TCR: SYNCENA Position */
+#define ITM_TCR_SYNCENA_Msk                (1UL << ITM_TCR_SYNCENA_Pos)                   /*!< ITM TCR: SYNCENA Mask */
+
+#define ITM_TCR_TSENA_Pos                   1                                             /*!< ITM TCR: TSENA Position */
+#define ITM_TCR_TSENA_Msk                  (1UL << ITM_TCR_TSENA_Pos)                     /*!< ITM TCR: TSENA Mask */
+
+#define ITM_TCR_ITMENA_Pos                  0                                             /*!< ITM TCR: ITM Enable bit Position */
+#define ITM_TCR_ITMENA_Msk                 (1UL << ITM_TCR_ITMENA_Pos)                    /*!< ITM TCR: ITM Enable bit Mask */
+
+/* ITM Integration Write Register Definitions */
+#define ITM_IWR_ATVALIDM_Pos                0                                             /*!< ITM IWR: ATVALIDM Position */
+#define ITM_IWR_ATVALIDM_Msk               (1UL << ITM_IWR_ATVALIDM_Pos)                  /*!< ITM IWR: ATVALIDM Mask */
+
+/* ITM Integration Read Register Definitions */
+#define ITM_IRR_ATREADYM_Pos                0                                             /*!< ITM IRR: ATREADYM Position */
+#define ITM_IRR_ATREADYM_Msk               (1UL << ITM_IRR_ATREADYM_Pos)                  /*!< ITM IRR: ATREADYM Mask */
+
+/* ITM Integration Mode Control Register Definitions */
+#define ITM_IMCR_INTEGRATION_Pos            0                                             /*!< ITM IMCR: INTEGRATION Position */
+#define ITM_IMCR_INTEGRATION_Msk           (1UL << ITM_IMCR_INTEGRATION_Pos)              /*!< ITM IMCR: INTEGRATION Mask */
+
+/* ITM Lock Status Register Definitions */
+#define ITM_LSR_ByteAcc_Pos                 2                                             /*!< ITM LSR: ByteAcc Position */
+#define ITM_LSR_ByteAcc_Msk                (1UL << ITM_LSR_ByteAcc_Pos)                   /*!< ITM LSR: ByteAcc Mask */
+
+#define ITM_LSR_Access_Pos                  1                                             /*!< ITM LSR: Access Position */
+#define ITM_LSR_Access_Msk                 (1UL << ITM_LSR_Access_Pos)                    /*!< ITM LSR: Access Mask */
+
+#define ITM_LSR_Present_Pos                 0                                             /*!< ITM LSR: Present Position */
+#define ITM_LSR_Present_Msk                (1UL << ITM_LSR_Present_Pos)                   /*!< ITM LSR: Present Mask */
+
+/*@}*/ /* end of group CMSIS_ITM */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_DWT     Data Watchpoint and Trace (DWT)
+    \brief      Type definitions for the Data Watchpoint and Trace (DWT)
+  @{
+ */
+
+/** \brief  Structure type to access the Data Watchpoint and Trace Register (DWT).
+ */
+typedef struct
+{
+  __IO uint32_t CTRL;                    /*!< Offset: 0x000 (R/W)  Control Register                          */
+  __IO uint32_t CYCCNT;                  /*!< Offset: 0x004 (R/W)  Cycle Count Register                      */
+  __IO uint32_t CPICNT;                  /*!< Offset: 0x008 (R/W)  CPI Count Register                        */
+  __IO uint32_t EXCCNT;                  /*!< Offset: 0x00C (R/W)  Exception Overhead Count Register         */
+  __IO uint32_t SLEEPCNT;                /*!< Offset: 0x010 (R/W)  Sleep Count Register                      */
+  __IO uint32_t LSUCNT;                  /*!< Offset: 0x014 (R/W)  LSU Count Register                        */
+  __IO uint32_t FOLDCNT;                 /*!< Offset: 0x018 (R/W)  Folded-instruction Count Register         */
+  __I  uint32_t PCSR;                    /*!< Offset: 0x01C (R/ )  Program Counter Sample Register           */
+  __IO uint32_t COMP0;                   /*!< Offset: 0x020 (R/W)  Comparator Register 0                     */
+  __IO uint32_t MASK0;                   /*!< Offset: 0x024 (R/W)  Mask Register 0                           */
+  __IO uint32_t FUNCTION0;               /*!< Offset: 0x028 (R/W)  Function Register 0                       */
+       uint32_t RESERVED0[1];
+  __IO uint32_t COMP1;                   /*!< Offset: 0x030 (R/W)  Comparator Register 1                     */
+  __IO uint32_t MASK1;                   /*!< Offset: 0x034 (R/W)  Mask Register 1                           */
+  __IO uint32_t FUNCTION1;               /*!< Offset: 0x038 (R/W)  Function Register 1                       */
+       uint32_t RESERVED1[1];
+  __IO uint32_t COMP2;                   /*!< Offset: 0x040 (R/W)  Comparator Register 2                     */
+  __IO uint32_t MASK2;                   /*!< Offset: 0x044 (R/W)  Mask Register 2                           */
+  __IO uint32_t FUNCTION2;               /*!< Offset: 0x048 (R/W)  Function Register 2                       */
+       uint32_t RESERVED2[1];
+  __IO uint32_t COMP3;                   /*!< Offset: 0x050 (R/W)  Comparator Register 3                     */
+  __IO uint32_t MASK3;                   /*!< Offset: 0x054 (R/W)  Mask Register 3                           */
+  __IO uint32_t FUNCTION3;               /*!< Offset: 0x058 (R/W)  Function Register 3                       */
+} DWT_Type;
+
+/* DWT Control Register Definitions */
+#define DWT_CTRL_NUMCOMP_Pos               28                                          /*!< DWT CTRL: NUMCOMP Position */
+#define DWT_CTRL_NUMCOMP_Msk               (0xFUL << DWT_CTRL_NUMCOMP_Pos)             /*!< DWT CTRL: NUMCOMP Mask */
+
+#define DWT_CTRL_NOTRCPKT_Pos              27                                          /*!< DWT CTRL: NOTRCPKT Position */
+#define DWT_CTRL_NOTRCPKT_Msk              (0x1UL << DWT_CTRL_NOTRCPKT_Pos)            /*!< DWT CTRL: NOTRCPKT Mask */
+
+#define DWT_CTRL_NOEXTTRIG_Pos             26                                          /*!< DWT CTRL: NOEXTTRIG Position */
+#define DWT_CTRL_NOEXTTRIG_Msk             (0x1UL << DWT_CTRL_NOEXTTRIG_Pos)           /*!< DWT CTRL: NOEXTTRIG Mask */
+
+#define DWT_CTRL_NOCYCCNT_Pos              25                                          /*!< DWT CTRL: NOCYCCNT Position */
+#define DWT_CTRL_NOCYCCNT_Msk              (0x1UL << DWT_CTRL_NOCYCCNT_Pos)            /*!< DWT CTRL: NOCYCCNT Mask */
+
+#define DWT_CTRL_NOPRFCNT_Pos              24                                          /*!< DWT CTRL: NOPRFCNT Position */
+#define DWT_CTRL_NOPRFCNT_Msk              (0x1UL << DWT_CTRL_NOPRFCNT_Pos)            /*!< DWT CTRL: NOPRFCNT Mask */
+
+#define DWT_CTRL_CYCEVTENA_Pos             22                                          /*!< DWT CTRL: CYCEVTENA Position */
+#define DWT_CTRL_CYCEVTENA_Msk             (0x1UL << DWT_CTRL_CYCEVTENA_Pos)           /*!< DWT CTRL: CYCEVTENA Mask */
+
+#define DWT_CTRL_FOLDEVTENA_Pos            21                                          /*!< DWT CTRL: FOLDEVTENA Position */
+#define DWT_CTRL_FOLDEVTENA_Msk            (0x1UL << DWT_CTRL_FOLDEVTENA_Pos)          /*!< DWT CTRL: FOLDEVTENA Mask */
+
+#define DWT_CTRL_LSUEVTENA_Pos             20                                          /*!< DWT CTRL: LSUEVTENA Position */
+#define DWT_CTRL_LSUEVTENA_Msk             (0x1UL << DWT_CTRL_LSUEVTENA_Pos)           /*!< DWT CTRL: LSUEVTENA Mask */
+
+#define DWT_CTRL_SLEEPEVTENA_Pos           19                                          /*!< DWT CTRL: SLEEPEVTENA Position */
+#define DWT_CTRL_SLEEPEVTENA_Msk           (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos)         /*!< DWT CTRL: SLEEPEVTENA Mask */
+
+#define DWT_CTRL_EXCEVTENA_Pos             18                                          /*!< DWT CTRL: EXCEVTENA Position */
+#define DWT_CTRL_EXCEVTENA_Msk             (0x1UL << DWT_CTRL_EXCEVTENA_Pos)           /*!< DWT CTRL: EXCEVTENA Mask */
+
+#define DWT_CTRL_CPIEVTENA_Pos             17                                          /*!< DWT CTRL: CPIEVTENA Position */
+#define DWT_CTRL_CPIEVTENA_Msk             (0x1UL << DWT_CTRL_CPIEVTENA_Pos)           /*!< DWT CTRL: CPIEVTENA Mask */
+
+#define DWT_CTRL_EXCTRCENA_Pos             16                                          /*!< DWT CTRL: EXCTRCENA Position */
+#define DWT_CTRL_EXCTRCENA_Msk             (0x1UL << DWT_CTRL_EXCTRCENA_Pos)           /*!< DWT CTRL: EXCTRCENA Mask */
+
+#define DWT_CTRL_PCSAMPLENA_Pos            12                                          /*!< DWT CTRL: PCSAMPLENA Position */
+#define DWT_CTRL_PCSAMPLENA_Msk            (0x1UL << DWT_CTRL_PCSAMPLENA_Pos)          /*!< DWT CTRL: PCSAMPLENA Mask */
+
+#define DWT_CTRL_SYNCTAP_Pos               10                                          /*!< DWT CTRL: SYNCTAP Position */
+#define DWT_CTRL_SYNCTAP_Msk               (0x3UL << DWT_CTRL_SYNCTAP_Pos)             /*!< DWT CTRL: SYNCTAP Mask */
+
+#define DWT_CTRL_CYCTAP_Pos                 9                                          /*!< DWT CTRL: CYCTAP Position */
+#define DWT_CTRL_CYCTAP_Msk                (0x1UL << DWT_CTRL_CYCTAP_Pos)              /*!< DWT CTRL: CYCTAP Mask */
+
+#define DWT_CTRL_POSTINIT_Pos               5                                          /*!< DWT CTRL: POSTINIT Position */
+#define DWT_CTRL_POSTINIT_Msk              (0xFUL << DWT_CTRL_POSTINIT_Pos)            /*!< DWT CTRL: POSTINIT Mask */
+
+#define DWT_CTRL_POSTPRESET_Pos             1                                          /*!< DWT CTRL: POSTPRESET Position */
+#define DWT_CTRL_POSTPRESET_Msk            (0xFUL << DWT_CTRL_POSTPRESET_Pos)          /*!< DWT CTRL: POSTPRESET Mask */
+
+#define DWT_CTRL_CYCCNTENA_Pos              0                                          /*!< DWT CTRL: CYCCNTENA Position */
+#define DWT_CTRL_CYCCNTENA_Msk             (0x1UL << DWT_CTRL_CYCCNTENA_Pos)           /*!< DWT CTRL: CYCCNTENA Mask */
+
+/* DWT CPI Count Register Definitions */
+#define DWT_CPICNT_CPICNT_Pos               0                                          /*!< DWT CPICNT: CPICNT Position */
+#define DWT_CPICNT_CPICNT_Msk              (0xFFUL << DWT_CPICNT_CPICNT_Pos)           /*!< DWT CPICNT: CPICNT Mask */
+
+/* DWT Exception Overhead Count Register Definitions */
+#define DWT_EXCCNT_EXCCNT_Pos               0                                          /*!< DWT EXCCNT: EXCCNT Position */
+#define DWT_EXCCNT_EXCCNT_Msk              (0xFFUL << DWT_EXCCNT_EXCCNT_Pos)           /*!< DWT EXCCNT: EXCCNT Mask */
+
+/* DWT Sleep Count Register Definitions */
+#define DWT_SLEEPCNT_SLEEPCNT_Pos           0                                          /*!< DWT SLEEPCNT: SLEEPCNT Position */
+#define DWT_SLEEPCNT_SLEEPCNT_Msk          (0xFFUL << DWT_SLEEPCNT_SLEEPCNT_Pos)       /*!< DWT SLEEPCNT: SLEEPCNT Mask */
+
+/* DWT LSU Count Register Definitions */
+#define DWT_LSUCNT_LSUCNT_Pos               0                                          /*!< DWT LSUCNT: LSUCNT Position */
+#define DWT_LSUCNT_LSUCNT_Msk              (0xFFUL << DWT_LSUCNT_LSUCNT_Pos)           /*!< DWT LSUCNT: LSUCNT Mask */
+
+/* DWT Folded-instruction Count Register Definitions */
+#define DWT_FOLDCNT_FOLDCNT_Pos             0                                          /*!< DWT FOLDCNT: FOLDCNT Position */
+#define DWT_FOLDCNT_FOLDCNT_Msk            (0xFFUL << DWT_FOLDCNT_FOLDCNT_Pos)         /*!< DWT FOLDCNT: FOLDCNT Mask */
+
+/* DWT Comparator Mask Register Definitions */
+#define DWT_MASK_MASK_Pos                   0                                          /*!< DWT MASK: MASK Position */
+#define DWT_MASK_MASK_Msk                  (0x1FUL << DWT_MASK_MASK_Pos)               /*!< DWT MASK: MASK Mask */
+
+/* DWT Comparator Function Register Definitions */
+#define DWT_FUNCTION_MATCHED_Pos           24                                          /*!< DWT FUNCTION: MATCHED Position */
+#define DWT_FUNCTION_MATCHED_Msk           (0x1UL << DWT_FUNCTION_MATCHED_Pos)         /*!< DWT FUNCTION: MATCHED Mask */
+
+#define DWT_FUNCTION_DATAVADDR1_Pos        16                                          /*!< DWT FUNCTION: DATAVADDR1 Position */
+#define DWT_FUNCTION_DATAVADDR1_Msk        (0xFUL << DWT_FUNCTION_DATAVADDR1_Pos)      /*!< DWT FUNCTION: DATAVADDR1 Mask */
+
+#define DWT_FUNCTION_DATAVADDR0_Pos        12                                          /*!< DWT FUNCTION: DATAVADDR0 Position */
+#define DWT_FUNCTION_DATAVADDR0_Msk        (0xFUL << DWT_FUNCTION_DATAVADDR0_Pos)      /*!< DWT FUNCTION: DATAVADDR0 Mask */
+
+#define DWT_FUNCTION_DATAVSIZE_Pos         10                                          /*!< DWT FUNCTION: DATAVSIZE Position */
+#define DWT_FUNCTION_DATAVSIZE_Msk         (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos)       /*!< DWT FUNCTION: DATAVSIZE Mask */
+
+#define DWT_FUNCTION_LNK1ENA_Pos            9                                          /*!< DWT FUNCTION: LNK1ENA Position */
+#define DWT_FUNCTION_LNK1ENA_Msk           (0x1UL << DWT_FUNCTION_LNK1ENA_Pos)         /*!< DWT FUNCTION: LNK1ENA Mask */
+
+#define DWT_FUNCTION_DATAVMATCH_Pos         8                                          /*!< DWT FUNCTION: DATAVMATCH Position */
+#define DWT_FUNCTION_DATAVMATCH_Msk        (0x1UL << DWT_FUNCTION_DATAVMATCH_Pos)      /*!< DWT FUNCTION: DATAVMATCH Mask */
+
+#define DWT_FUNCTION_CYCMATCH_Pos           7                                          /*!< DWT FUNCTION: CYCMATCH Position */
+#define DWT_FUNCTION_CYCMATCH_Msk          (0x1UL << DWT_FUNCTION_CYCMATCH_Pos)        /*!< DWT FUNCTION: CYCMATCH Mask */
+
+#define DWT_FUNCTION_EMITRANGE_Pos          5                                          /*!< DWT FUNCTION: EMITRANGE Position */
+#define DWT_FUNCTION_EMITRANGE_Msk         (0x1UL << DWT_FUNCTION_EMITRANGE_Pos)       /*!< DWT FUNCTION: EMITRANGE Mask */
+
+#define DWT_FUNCTION_FUNCTION_Pos           0                                          /*!< DWT FUNCTION: FUNCTION Position */
+#define DWT_FUNCTION_FUNCTION_Msk          (0xFUL << DWT_FUNCTION_FUNCTION_Pos)        /*!< DWT FUNCTION: FUNCTION Mask */
+
+/*@}*/ /* end of group CMSIS_DWT */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_TPI     Trace Port Interface (TPI)
+    \brief      Type definitions for the Trace Port Interface (TPI)
+  @{
+ */
+
+/** \brief  Structure type to access the Trace Port Interface Register (TPI).
+ */
+typedef struct
+{
+  __IO uint32_t SSPSR;                   /*!< Offset: 0x000 (R/ )  Supported Parallel Port Size Register     */
+  __IO uint32_t CSPSR;                   /*!< Offset: 0x004 (R/W)  Current Parallel Port Size Register */
+       uint32_t RESERVED0[2];
+  __IO uint32_t ACPR;                    /*!< Offset: 0x010 (R/W)  Asynchronous Clock Prescaler Register */
+       uint32_t RESERVED1[55];
+  __IO uint32_t SPPR;                    /*!< Offset: 0x0F0 (R/W)  Selected Pin Protocol Register */
+       uint32_t RESERVED2[131];
+  __I  uint32_t FFSR;                    /*!< Offset: 0x300 (R/ )  Formatter and Flush Status Register */
+  __IO uint32_t FFCR;                    /*!< Offset: 0x304 (R/W)  Formatter and Flush Control Register */
+  __I  uint32_t FSCR;                    /*!< Offset: 0x308 (R/ )  Formatter Synchronization Counter Register */
+       uint32_t RESERVED3[759];
+  __I  uint32_t TRIGGER;                 /*!< Offset: 0xEE8 (R/ )  TRIGGER */
+  __I  uint32_t FIFO0;                   /*!< Offset: 0xEEC (R/ )  Integration ETM Data */
+  __I  uint32_t ITATBCTR2;               /*!< Offset: 0xEF0 (R/ )  ITATBCTR2 */
+       uint32_t RESERVED4[1];
+  __I  uint32_t ITATBCTR0;               /*!< Offset: 0xEF8 (R/ )  ITATBCTR0 */
+  __I  uint32_t FIFO1;                   /*!< Offset: 0xEFC (R/ )  Integration ITM Data */
+  __IO uint32_t ITCTRL;                  /*!< Offset: 0xF00 (R/W)  Integration Mode Control */
+       uint32_t RESERVED5[39];
+  __IO uint32_t CLAIMSET;                /*!< Offset: 0xFA0 (R/W)  Claim tag set */
+  __IO uint32_t CLAIMCLR;                /*!< Offset: 0xFA4 (R/W)  Claim tag clear */
+       uint32_t RESERVED7[8];
+  __I  uint32_t DEVID;                   /*!< Offset: 0xFC8 (R/ )  TPIU_DEVID */
+  __I  uint32_t DEVTYPE;                 /*!< Offset: 0xFCC (R/ )  TPIU_DEVTYPE */
+} TPI_Type;
+
+/* TPI Asynchronous Clock Prescaler Register Definitions */
+#define TPI_ACPR_PRESCALER_Pos              0                                          /*!< TPI ACPR: PRESCALER Position */
+#define TPI_ACPR_PRESCALER_Msk             (0x1FFFUL << TPI_ACPR_PRESCALER_Pos)        /*!< TPI ACPR: PRESCALER Mask */
+
+/* TPI Selected Pin Protocol Register Definitions */
+#define TPI_SPPR_TXMODE_Pos                 0                                          /*!< TPI SPPR: TXMODE Position */
+#define TPI_SPPR_TXMODE_Msk                (0x3UL << TPI_SPPR_TXMODE_Pos)              /*!< TPI SPPR: TXMODE Mask */
+
+/* TPI Formatter and Flush Status Register Definitions */
+#define TPI_FFSR_FtNonStop_Pos              3                                          /*!< TPI FFSR: FtNonStop Position */
+#define TPI_FFSR_FtNonStop_Msk             (0x1UL << TPI_FFSR_FtNonStop_Pos)           /*!< TPI FFSR: FtNonStop Mask */
+
+#define TPI_FFSR_TCPresent_Pos              2                                          /*!< TPI FFSR: TCPresent Position */
+#define TPI_FFSR_TCPresent_Msk             (0x1UL << TPI_FFSR_TCPresent_Pos)           /*!< TPI FFSR: TCPresent Mask */
+
+#define TPI_FFSR_FtStopped_Pos              1                                          /*!< TPI FFSR: FtStopped Position */
+#define TPI_FFSR_FtStopped_Msk             (0x1UL << TPI_FFSR_FtStopped_Pos)           /*!< TPI FFSR: FtStopped Mask */
+
+#define TPI_FFSR_FlInProg_Pos               0                                          /*!< TPI FFSR: FlInProg Position */
+#define TPI_FFSR_FlInProg_Msk              (0x1UL << TPI_FFSR_FlInProg_Pos)            /*!< TPI FFSR: FlInProg Mask */
+
+/* TPI Formatter and Flush Control Register Definitions */
+#define TPI_FFCR_TrigIn_Pos                 8                                          /*!< TPI FFCR: TrigIn Position */
+#define TPI_FFCR_TrigIn_Msk                (0x1UL << TPI_FFCR_TrigIn_Pos)              /*!< TPI FFCR: TrigIn Mask */
+
+#define TPI_FFCR_EnFCont_Pos                1                                          /*!< TPI FFCR: EnFCont Position */
+#define TPI_FFCR_EnFCont_Msk               (0x1UL << TPI_FFCR_EnFCont_Pos)             /*!< TPI FFCR: EnFCont Mask */
+
+/* TPI TRIGGER Register Definitions */
+#define TPI_TRIGGER_TRIGGER_Pos             0                                          /*!< TPI TRIGGER: TRIGGER Position */
+#define TPI_TRIGGER_TRIGGER_Msk            (0x1UL << TPI_TRIGGER_TRIGGER_Pos)          /*!< TPI TRIGGER: TRIGGER Mask */
+
+/* TPI Integration ETM Data Register Definitions (FIFO0) */
+#define TPI_FIFO0_ITM_ATVALID_Pos          29                                          /*!< TPI FIFO0: ITM_ATVALID Position */
+#define TPI_FIFO0_ITM_ATVALID_Msk          (0x3UL << TPI_FIFO0_ITM_ATVALID_Pos)        /*!< TPI FIFO0: ITM_ATVALID Mask */
+
+#define TPI_FIFO0_ITM_bytecount_Pos        27                                          /*!< TPI FIFO0: ITM_bytecount Position */
+#define TPI_FIFO0_ITM_bytecount_Msk        (0x3UL << TPI_FIFO0_ITM_bytecount_Pos)      /*!< TPI FIFO0: ITM_bytecount Mask */
+
+#define TPI_FIFO0_ETM_ATVALID_Pos          26                                          /*!< TPI FIFO0: ETM_ATVALID Position */
+#define TPI_FIFO0_ETM_ATVALID_Msk          (0x3UL << TPI_FIFO0_ETM_ATVALID_Pos)        /*!< TPI FIFO0: ETM_ATVALID Mask */
+
+#define TPI_FIFO0_ETM_bytecount_Pos        24                                          /*!< TPI FIFO0: ETM_bytecount Position */
+#define TPI_FIFO0_ETM_bytecount_Msk        (0x3UL << TPI_FIFO0_ETM_bytecount_Pos)      /*!< TPI FIFO0: ETM_bytecount Mask */
+
+#define TPI_FIFO0_ETM2_Pos                 16                                          /*!< TPI FIFO0: ETM2 Position */
+#define TPI_FIFO0_ETM2_Msk                 (0xFFUL << TPI_FIFO0_ETM2_Pos)              /*!< TPI FIFO0: ETM2 Mask */
+
+#define TPI_FIFO0_ETM1_Pos                  8                                          /*!< TPI FIFO0: ETM1 Position */
+#define TPI_FIFO0_ETM1_Msk                 (0xFFUL << TPI_FIFO0_ETM1_Pos)              /*!< TPI FIFO0: ETM1 Mask */
+
+#define TPI_FIFO0_ETM0_Pos                  0                                          /*!< TPI FIFO0: ETM0 Position */
+#define TPI_FIFO0_ETM0_Msk                 (0xFFUL << TPI_FIFO0_ETM0_Pos)              /*!< TPI FIFO0: ETM0 Mask */
+
+/* TPI ITATBCTR2 Register Definitions */
+#define TPI_ITATBCTR2_ATREADY_Pos           0                                          /*!< TPI ITATBCTR2: ATREADY Position */
+#define TPI_ITATBCTR2_ATREADY_Msk          (0x1UL << TPI_ITATBCTR2_ATREADY_Pos)        /*!< TPI ITATBCTR2: ATREADY Mask */
+
+/* TPI Integration ITM Data Register Definitions (FIFO1) */
+#define TPI_FIFO1_ITM_ATVALID_Pos          29                                          /*!< TPI FIFO1: ITM_ATVALID Position */
+#define TPI_FIFO1_ITM_ATVALID_Msk          (0x3UL << TPI_FIFO1_ITM_ATVALID_Pos)        /*!< TPI FIFO1: ITM_ATVALID Mask */
+
+#define TPI_FIFO1_ITM_bytecount_Pos        27                                          /*!< TPI FIFO1: ITM_bytecount Position */
+#define TPI_FIFO1_ITM_bytecount_Msk        (0x3UL << TPI_FIFO1_ITM_bytecount_Pos)      /*!< TPI FIFO1: ITM_bytecount Mask */
+
+#define TPI_FIFO1_ETM_ATVALID_Pos          26                                          /*!< TPI FIFO1: ETM_ATVALID Position */
+#define TPI_FIFO1_ETM_ATVALID_Msk          (0x3UL << TPI_FIFO1_ETM_ATVALID_Pos)        /*!< TPI FIFO1: ETM_ATVALID Mask */
+
+#define TPI_FIFO1_ETM_bytecount_Pos        24                                          /*!< TPI FIFO1: ETM_bytecount Position */
+#define TPI_FIFO1_ETM_bytecount_Msk        (0x3UL << TPI_FIFO1_ETM_bytecount_Pos)      /*!< TPI FIFO1: ETM_bytecount Mask */
+
+#define TPI_FIFO1_ITM2_Pos                 16                                          /*!< TPI FIFO1: ITM2 Position */
+#define TPI_FIFO1_ITM2_Msk                 (0xFFUL << TPI_FIFO1_ITM2_Pos)              /*!< TPI FIFO1: ITM2 Mask */
+
+#define TPI_FIFO1_ITM1_Pos                  8                                          /*!< TPI FIFO1: ITM1 Position */
+#define TPI_FIFO1_ITM1_Msk                 (0xFFUL << TPI_FIFO1_ITM1_Pos)              /*!< TPI FIFO1: ITM1 Mask */
+
+#define TPI_FIFO1_ITM0_Pos                  0                                          /*!< TPI FIFO1: ITM0 Position */
+#define TPI_FIFO1_ITM0_Msk                 (0xFFUL << TPI_FIFO1_ITM0_Pos)              /*!< TPI FIFO1: ITM0 Mask */
+
+/* TPI ITATBCTR0 Register Definitions */
+#define TPI_ITATBCTR0_ATREADY_Pos           0                                          /*!< TPI ITATBCTR0: ATREADY Position */
+#define TPI_ITATBCTR0_ATREADY_Msk          (0x1UL << TPI_ITATBCTR0_ATREADY_Pos)        /*!< TPI ITATBCTR0: ATREADY Mask */
+
+/* TPI Integration Mode Control Register Definitions */
+#define TPI_ITCTRL_Mode_Pos                 0                                          /*!< TPI ITCTRL: Mode Position */
+#define TPI_ITCTRL_Mode_Msk                (0x1UL << TPI_ITCTRL_Mode_Pos)              /*!< TPI ITCTRL: Mode Mask */
+
+/* TPI DEVID Register Definitions */
+#define TPI_DEVID_NRZVALID_Pos             11                                          /*!< TPI DEVID: NRZVALID Position */
+#define TPI_DEVID_NRZVALID_Msk             (0x1UL << TPI_DEVID_NRZVALID_Pos)           /*!< TPI DEVID: NRZVALID Mask */
+
+#define TPI_DEVID_MANCVALID_Pos            10                                          /*!< TPI DEVID: MANCVALID Position */
+#define TPI_DEVID_MANCVALID_Msk            (0x1UL << TPI_DEVID_MANCVALID_Pos)          /*!< TPI DEVID: MANCVALID Mask */
+
+#define TPI_DEVID_PTINVALID_Pos             9                                          /*!< TPI DEVID: PTINVALID Position */
+#define TPI_DEVID_PTINVALID_Msk            (0x1UL << TPI_DEVID_PTINVALID_Pos)          /*!< TPI DEVID: PTINVALID Mask */
+
+#define TPI_DEVID_MinBufSz_Pos              6                                          /*!< TPI DEVID: MinBufSz Position */
+#define TPI_DEVID_MinBufSz_Msk             (0x7UL << TPI_DEVID_MinBufSz_Pos)           /*!< TPI DEVID: MinBufSz Mask */
+
+#define TPI_DEVID_AsynClkIn_Pos             5                                          /*!< TPI DEVID: AsynClkIn Position */
+#define TPI_DEVID_AsynClkIn_Msk            (0x1UL << TPI_DEVID_AsynClkIn_Pos)          /*!< TPI DEVID: AsynClkIn Mask */
+
+#define TPI_DEVID_NrTraceInput_Pos          0                                          /*!< TPI DEVID: NrTraceInput Position */
+#define TPI_DEVID_NrTraceInput_Msk         (0x1FUL << TPI_DEVID_NrTraceInput_Pos)      /*!< TPI DEVID: NrTraceInput Mask */
+
+/* TPI DEVTYPE Register Definitions */
+#define TPI_DEVTYPE_SubType_Pos             0                                          /*!< TPI DEVTYPE: SubType Position */
+#define TPI_DEVTYPE_SubType_Msk            (0xFUL << TPI_DEVTYPE_SubType_Pos)          /*!< TPI DEVTYPE: SubType Mask */
+
+#define TPI_DEVTYPE_MajorType_Pos           4                                          /*!< TPI DEVTYPE: MajorType Position */
+#define TPI_DEVTYPE_MajorType_Msk          (0xFUL << TPI_DEVTYPE_MajorType_Pos)        /*!< TPI DEVTYPE: MajorType Mask */
+
+/*@}*/ /* end of group CMSIS_TPI */
+
+
+#if (__MPU_PRESENT == 1)
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_MPU     Memory Protection Unit (MPU)
+    \brief      Type definitions for the Memory Protection Unit (MPU)
+  @{
+ */
+
+/** \brief  Structure type to access the Memory Protection Unit (MPU).
+ */
+typedef struct
+{
+  __I  uint32_t TYPE;                    /*!< Offset: 0x000 (R/ )  MPU Type Register                              */
+  __IO uint32_t CTRL;                    /*!< Offset: 0x004 (R/W)  MPU Control Register                           */
+  __IO uint32_t RNR;                     /*!< Offset: 0x008 (R/W)  MPU Region RNRber Register                     */
+  __IO uint32_t RBAR;                    /*!< Offset: 0x00C (R/W)  MPU Region Base Address Register               */
+  __IO uint32_t RASR;                    /*!< Offset: 0x010 (R/W)  MPU Region Attribute and Size Register         */
+  __IO uint32_t RBAR_A1;                 /*!< Offset: 0x014 (R/W)  MPU Alias 1 Region Base Address Register       */
+  __IO uint32_t RASR_A1;                 /*!< Offset: 0x018 (R/W)  MPU Alias 1 Region Attribute and Size Register */
+  __IO uint32_t RBAR_A2;                 /*!< Offset: 0x01C (R/W)  MPU Alias 2 Region Base Address Register       */
+  __IO uint32_t RASR_A2;                 /*!< Offset: 0x020 (R/W)  MPU Alias 2 Region Attribute and Size Register */
+  __IO uint32_t RBAR_A3;                 /*!< Offset: 0x024 (R/W)  MPU Alias 3 Region Base Address Register       */
+  __IO uint32_t RASR_A3;                 /*!< Offset: 0x028 (R/W)  MPU Alias 3 Region Attribute and Size Register */
+} MPU_Type;
+
+/* MPU Type Register */
+#define MPU_TYPE_IREGION_Pos               16                                             /*!< MPU TYPE: IREGION Position */
+#define MPU_TYPE_IREGION_Msk               (0xFFUL << MPU_TYPE_IREGION_Pos)               /*!< MPU TYPE: IREGION Mask */
+
+#define MPU_TYPE_DREGION_Pos                8                                             /*!< MPU TYPE: DREGION Position */
+#define MPU_TYPE_DREGION_Msk               (0xFFUL << MPU_TYPE_DREGION_Pos)               /*!< MPU TYPE: DREGION Mask */
+
+#define MPU_TYPE_SEPARATE_Pos               0                                             /*!< MPU TYPE: SEPARATE Position */
+#define MPU_TYPE_SEPARATE_Msk              (1UL << MPU_TYPE_SEPARATE_Pos)                 /*!< MPU TYPE: SEPARATE Mask */
+
+/* MPU Control Register */
+#define MPU_CTRL_PRIVDEFENA_Pos             2                                             /*!< MPU CTRL: PRIVDEFENA Position */
+#define MPU_CTRL_PRIVDEFENA_Msk            (1UL << MPU_CTRL_PRIVDEFENA_Pos)               /*!< MPU CTRL: PRIVDEFENA Mask */
+
+#define MPU_CTRL_HFNMIENA_Pos               1                                             /*!< MPU CTRL: HFNMIENA Position */
+#define MPU_CTRL_HFNMIENA_Msk              (1UL << MPU_CTRL_HFNMIENA_Pos)                 /*!< MPU CTRL: HFNMIENA Mask */
+
+#define MPU_CTRL_ENABLE_Pos                 0                                             /*!< MPU CTRL: ENABLE Position */
+#define MPU_CTRL_ENABLE_Msk                (1UL << MPU_CTRL_ENABLE_Pos)                   /*!< MPU CTRL: ENABLE Mask */
+
+/* MPU Region Number Register */
+#define MPU_RNR_REGION_Pos                  0                                             /*!< MPU RNR: REGION Position */
+#define MPU_RNR_REGION_Msk                 (0xFFUL << MPU_RNR_REGION_Pos)                 /*!< MPU RNR: REGION Mask */
+
+/* MPU Region Base Address Register */
+#define MPU_RBAR_ADDR_Pos                   5                                             /*!< MPU RBAR: ADDR Position */
+#define MPU_RBAR_ADDR_Msk                  (0x7FFFFFFUL << MPU_RBAR_ADDR_Pos)             /*!< MPU RBAR: ADDR Mask */
+
+#define MPU_RBAR_VALID_Pos                  4                                             /*!< MPU RBAR: VALID Position */
+#define MPU_RBAR_VALID_Msk                 (1UL << MPU_RBAR_VALID_Pos)                    /*!< MPU RBAR: VALID Mask */
+
+#define MPU_RBAR_REGION_Pos                 0                                             /*!< MPU RBAR: REGION Position */
+#define MPU_RBAR_REGION_Msk                (0xFUL << MPU_RBAR_REGION_Pos)                 /*!< MPU RBAR: REGION Mask */
+
+/* MPU Region Attribute and Size Register */
+#define MPU_RASR_ATTRS_Pos                 16                                             /*!< MPU RASR: MPU Region Attribute field Position */
+#define MPU_RASR_ATTRS_Msk                 (0xFFFFUL << MPU_RASR_ATTRS_Pos)               /*!< MPU RASR: MPU Region Attribute field Mask */
+
+#define MPU_RASR_XN_Pos                    28                                             /*!< MPU RASR: ATTRS.XN Position */
+#define MPU_RASR_XN_Msk                    (1UL << MPU_RASR_XN_Pos)                       /*!< MPU RASR: ATTRS.XN Mask */
+
+#define MPU_RASR_AP_Pos                    24                                             /*!< MPU RASR: ATTRS.AP Position */
+#define MPU_RASR_AP_Msk                    (0x7UL << MPU_RASR_AP_Pos)                     /*!< MPU RASR: ATTRS.AP Mask */
+
+#define MPU_RASR_TEX_Pos                   19                                             /*!< MPU RASR: ATTRS.TEX Position */
+#define MPU_RASR_TEX_Msk                   (0x7UL << MPU_RASR_TEX_Pos)                    /*!< MPU RASR: ATTRS.TEX Mask */
+
+#define MPU_RASR_S_Pos                     18                                             /*!< MPU RASR: ATTRS.S Position */
+#define MPU_RASR_S_Msk                     (1UL << MPU_RASR_S_Pos)                        /*!< MPU RASR: ATTRS.S Mask */
+
+#define MPU_RASR_C_Pos                     17                                             /*!< MPU RASR: ATTRS.C Position */
+#define MPU_RASR_C_Msk                     (1UL << MPU_RASR_C_Pos)                        /*!< MPU RASR: ATTRS.C Mask */
+
+#define MPU_RASR_B_Pos                     16                                             /*!< MPU RASR: ATTRS.B Position */
+#define MPU_RASR_B_Msk                     (1UL << MPU_RASR_B_Pos)                        /*!< MPU RASR: ATTRS.B Mask */
+
+#define MPU_RASR_SRD_Pos                    8                                             /*!< MPU RASR: Sub-Region Disable Position */
+#define MPU_RASR_SRD_Msk                   (0xFFUL << MPU_RASR_SRD_Pos)                   /*!< MPU RASR: Sub-Region Disable Mask */
+
+#define MPU_RASR_SIZE_Pos                   1                                             /*!< MPU RASR: Region Size Field Position */
+#define MPU_RASR_SIZE_Msk                  (0x1FUL << MPU_RASR_SIZE_Pos)                  /*!< MPU RASR: Region Size Field Mask */
+
+#define MPU_RASR_ENABLE_Pos                 0                                             /*!< MPU RASR: Region enable bit Position */
+#define MPU_RASR_ENABLE_Msk                (1UL << MPU_RASR_ENABLE_Pos)                   /*!< MPU RASR: Region enable bit Disable Mask */
+
+/*@} end of group CMSIS_MPU */
+#endif
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_CoreDebug       Core Debug Registers (CoreDebug)
+    \brief      Type definitions for the Core Debug Registers
+  @{
+ */
+
+/** \brief  Structure type to access the Core Debug Register (CoreDebug).
+ */
+typedef struct
+{
+  __IO uint32_t DHCSR;                   /*!< Offset: 0x000 (R/W)  Debug Halting Control and Status Register    */
+  __O  uint32_t DCRSR;                   /*!< Offset: 0x004 ( /W)  Debug Core Register Selector Register        */
+  __IO uint32_t DCRDR;                   /*!< Offset: 0x008 (R/W)  Debug Core Register Data Register            */
+  __IO uint32_t DEMCR;                   /*!< Offset: 0x00C (R/W)  Debug Exception and Monitor Control Register */
+} CoreDebug_Type;
+
+/* Debug Halting Control and Status Register */
+#define CoreDebug_DHCSR_DBGKEY_Pos         16                                             /*!< CoreDebug DHCSR: DBGKEY Position */
+#define CoreDebug_DHCSR_DBGKEY_Msk         (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos)       /*!< CoreDebug DHCSR: DBGKEY Mask */
+
+#define CoreDebug_DHCSR_S_RESET_ST_Pos     25                                             /*!< CoreDebug DHCSR: S_RESET_ST Position */
+#define CoreDebug_DHCSR_S_RESET_ST_Msk     (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos)        /*!< CoreDebug DHCSR: S_RESET_ST Mask */
+
+#define CoreDebug_DHCSR_S_RETIRE_ST_Pos    24                                             /*!< CoreDebug DHCSR: S_RETIRE_ST Position */
+#define CoreDebug_DHCSR_S_RETIRE_ST_Msk    (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos)       /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */
+
+#define CoreDebug_DHCSR_S_LOCKUP_Pos       19                                             /*!< CoreDebug DHCSR: S_LOCKUP Position */
+#define CoreDebug_DHCSR_S_LOCKUP_Msk       (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos)          /*!< CoreDebug DHCSR: S_LOCKUP Mask */
+
+#define CoreDebug_DHCSR_S_SLEEP_Pos        18                                             /*!< CoreDebug DHCSR: S_SLEEP Position */
+#define CoreDebug_DHCSR_S_SLEEP_Msk        (1UL << CoreDebug_DHCSR_S_SLEEP_Pos)           /*!< CoreDebug DHCSR: S_SLEEP Mask */
+
+#define CoreDebug_DHCSR_S_HALT_Pos         17                                             /*!< CoreDebug DHCSR: S_HALT Position */
+#define CoreDebug_DHCSR_S_HALT_Msk         (1UL << CoreDebug_DHCSR_S_HALT_Pos)            /*!< CoreDebug DHCSR: S_HALT Mask */
+
+#define CoreDebug_DHCSR_S_REGRDY_Pos       16                                             /*!< CoreDebug DHCSR: S_REGRDY Position */
+#define CoreDebug_DHCSR_S_REGRDY_Msk       (1UL << CoreDebug_DHCSR_S_REGRDY_Pos)          /*!< CoreDebug DHCSR: S_REGRDY Mask */
+
+#define CoreDebug_DHCSR_C_SNAPSTALL_Pos     5                                             /*!< CoreDebug DHCSR: C_SNAPSTALL Position */
+#define CoreDebug_DHCSR_C_SNAPSTALL_Msk    (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos)       /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */
+
+#define CoreDebug_DHCSR_C_MASKINTS_Pos      3                                             /*!< CoreDebug DHCSR: C_MASKINTS Position */
+#define CoreDebug_DHCSR_C_MASKINTS_Msk     (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos)        /*!< CoreDebug DHCSR: C_MASKINTS Mask */
+
+#define CoreDebug_DHCSR_C_STEP_Pos          2                                             /*!< CoreDebug DHCSR: C_STEP Position */
+#define CoreDebug_DHCSR_C_STEP_Msk         (1UL << CoreDebug_DHCSR_C_STEP_Pos)            /*!< CoreDebug DHCSR: C_STEP Mask */
+
+#define CoreDebug_DHCSR_C_HALT_Pos          1                                             /*!< CoreDebug DHCSR: C_HALT Position */
+#define CoreDebug_DHCSR_C_HALT_Msk         (1UL << CoreDebug_DHCSR_C_HALT_Pos)            /*!< CoreDebug DHCSR: C_HALT Mask */
+
+#define CoreDebug_DHCSR_C_DEBUGEN_Pos       0                                             /*!< CoreDebug DHCSR: C_DEBUGEN Position */
+#define CoreDebug_DHCSR_C_DEBUGEN_Msk      (1UL << CoreDebug_DHCSR_C_DEBUGEN_Pos)         /*!< CoreDebug DHCSR: C_DEBUGEN Mask */
+
+/* Debug Core Register Selector Register */
+#define CoreDebug_DCRSR_REGWnR_Pos         16                                             /*!< CoreDebug DCRSR: REGWnR Position */
+#define CoreDebug_DCRSR_REGWnR_Msk         (1UL << CoreDebug_DCRSR_REGWnR_Pos)            /*!< CoreDebug DCRSR: REGWnR Mask */
+
+#define CoreDebug_DCRSR_REGSEL_Pos          0                                             /*!< CoreDebug DCRSR: REGSEL Position */
+#define CoreDebug_DCRSR_REGSEL_Msk         (0x1FUL << CoreDebug_DCRSR_REGSEL_Pos)         /*!< CoreDebug DCRSR: REGSEL Mask */
+
+/* Debug Exception and Monitor Control Register */
+#define CoreDebug_DEMCR_TRCENA_Pos         24                                             /*!< CoreDebug DEMCR: TRCENA Position */
+#define CoreDebug_DEMCR_TRCENA_Msk         (1UL << CoreDebug_DEMCR_TRCENA_Pos)            /*!< CoreDebug DEMCR: TRCENA Mask */
+
+#define CoreDebug_DEMCR_MON_REQ_Pos        19                                             /*!< CoreDebug DEMCR: MON_REQ Position */
+#define CoreDebug_DEMCR_MON_REQ_Msk        (1UL << CoreDebug_DEMCR_MON_REQ_Pos)           /*!< CoreDebug DEMCR: MON_REQ Mask */
+
+#define CoreDebug_DEMCR_MON_STEP_Pos       18                                             /*!< CoreDebug DEMCR: MON_STEP Position */
+#define CoreDebug_DEMCR_MON_STEP_Msk       (1UL << CoreDebug_DEMCR_MON_STEP_Pos)          /*!< CoreDebug DEMCR: MON_STEP Mask */
+
+#define CoreDebug_DEMCR_MON_PEND_Pos       17                                             /*!< CoreDebug DEMCR: MON_PEND Position */
+#define CoreDebug_DEMCR_MON_PEND_Msk       (1UL << CoreDebug_DEMCR_MON_PEND_Pos)          /*!< CoreDebug DEMCR: MON_PEND Mask */
+
+#define CoreDebug_DEMCR_MON_EN_Pos         16                                             /*!< CoreDebug DEMCR: MON_EN Position */
+#define CoreDebug_DEMCR_MON_EN_Msk         (1UL << CoreDebug_DEMCR_MON_EN_Pos)            /*!< CoreDebug DEMCR: MON_EN Mask */
+
+#define CoreDebug_DEMCR_VC_HARDERR_Pos     10                                             /*!< CoreDebug DEMCR: VC_HARDERR Position */
+#define CoreDebug_DEMCR_VC_HARDERR_Msk     (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos)        /*!< CoreDebug DEMCR: VC_HARDERR Mask */
+
+#define CoreDebug_DEMCR_VC_INTERR_Pos       9                                             /*!< CoreDebug DEMCR: VC_INTERR Position */
+#define CoreDebug_DEMCR_VC_INTERR_Msk      (1UL << CoreDebug_DEMCR_VC_INTERR_Pos)         /*!< CoreDebug DEMCR: VC_INTERR Mask */
+
+#define CoreDebug_DEMCR_VC_BUSERR_Pos       8                                             /*!< CoreDebug DEMCR: VC_BUSERR Position */
+#define CoreDebug_DEMCR_VC_BUSERR_Msk      (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos)         /*!< CoreDebug DEMCR: VC_BUSERR Mask */
+
+#define CoreDebug_DEMCR_VC_STATERR_Pos      7                                             /*!< CoreDebug DEMCR: VC_STATERR Position */
+#define CoreDebug_DEMCR_VC_STATERR_Msk     (1UL << CoreDebug_DEMCR_VC_STATERR_Pos)        /*!< CoreDebug DEMCR: VC_STATERR Mask */
+
+#define CoreDebug_DEMCR_VC_CHKERR_Pos       6                                             /*!< CoreDebug DEMCR: VC_CHKERR Position */
+#define CoreDebug_DEMCR_VC_CHKERR_Msk      (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos)         /*!< CoreDebug DEMCR: VC_CHKERR Mask */
+
+#define CoreDebug_DEMCR_VC_NOCPERR_Pos      5                                             /*!< CoreDebug DEMCR: VC_NOCPERR Position */
+#define CoreDebug_DEMCR_VC_NOCPERR_Msk     (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos)        /*!< CoreDebug DEMCR: VC_NOCPERR Mask */
+
+#define CoreDebug_DEMCR_VC_MMERR_Pos        4                                             /*!< CoreDebug DEMCR: VC_MMERR Position */
+#define CoreDebug_DEMCR_VC_MMERR_Msk       (1UL << CoreDebug_DEMCR_VC_MMERR_Pos)          /*!< CoreDebug DEMCR: VC_MMERR Mask */
+
+#define CoreDebug_DEMCR_VC_CORERESET_Pos    0                                             /*!< CoreDebug DEMCR: VC_CORERESET Position */
+#define CoreDebug_DEMCR_VC_CORERESET_Msk   (1UL << CoreDebug_DEMCR_VC_CORERESET_Pos)      /*!< CoreDebug DEMCR: VC_CORERESET Mask */
+
+/*@} end of group CMSIS_CoreDebug */
+
+
+/** \ingroup    CMSIS_core_register
+    \defgroup   CMSIS_core_base     Core Definitions
+    \brief      Definitions for base addresses, unions, and structures.
+  @{
+ */
+
+/* Memory mapping of Cortex-M3 Hardware */
+#define SCS_BASE            (0xE000E000UL)                            /*!< System Control Space Base Address  */
+#define ITM_BASE            (0xE0000000UL)                            /*!< ITM Base Address                   */
+#define DWT_BASE            (0xE0001000UL)                            /*!< DWT Base Address                   */
+#define TPI_BASE            (0xE0040000UL)                            /*!< TPI Base Address                   */
+#define CoreDebug_BASE      (0xE000EDF0UL)                            /*!< Core Debug Base Address            */
+#define SysTick_BASE        (SCS_BASE +  0x0010UL)                    /*!< SysTick Base Address               */
+#define NVIC_BASE           (SCS_BASE +  0x0100UL)                    /*!< NVIC Base Address                  */
+#define SCB_BASE            (SCS_BASE +  0x0D00UL)                    /*!< System Control Block Base Address  */
+
+#define SCnSCB              ((SCnSCB_Type    *)     SCS_BASE      )   /*!< System control Register not in SCB */
+#define SCB                 ((SCB_Type       *)     SCB_BASE      )   /*!< SCB configuration struct           */
+#define SysTick             ((SysTick_Type   *)     SysTick_BASE  )   /*!< SysTick configuration struct       */
+#define NVIC                ((NVIC_Type      *)     NVIC_BASE     )   /*!< NVIC configuration struct          */
+#define ITM                 ((ITM_Type       *)     ITM_BASE      )   /*!< ITM configuration struct           */
+#define DWT                 ((DWT_Type       *)     DWT_BASE      )   /*!< DWT configuration struct           */
+#define TPI                 ((TPI_Type       *)     TPI_BASE      )   /*!< TPI configuration struct           */
+#define CoreDebug           ((CoreDebug_Type *)     CoreDebug_BASE)   /*!< Core Debug configuration struct    */
+
+#if (__MPU_PRESENT == 1)
+  #define MPU_BASE          (SCS_BASE +  0x0D90UL)                    /*!< Memory Protection Unit             */
+  #define MPU               ((MPU_Type       *)     MPU_BASE      )   /*!< Memory Protection Unit             */
+#endif
+
+/*@} */
+
+
+
+/*******************************************************************************
+ *                Hardware Abstraction Layer
+  Core Function Interface contains:
+  - Core NVIC Functions
+  - Core SysTick Functions
+  - Core Debug Functions
+  - Core Register Access Functions
+ ******************************************************************************/
+/** \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference
+*/
+
+
+
+/* ##########################   NVIC functions  #################################### */
+/** \ingroup  CMSIS_Core_FunctionInterface
+    \defgroup CMSIS_Core_NVICFunctions NVIC Functions
+    \brief      Functions that manage interrupts and exceptions via the NVIC.
+    @{
+ */
+
+/** \brief  Set Priority Grouping
+
+  The function sets the priority grouping field using the required unlock sequence.
+  The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field.
+  Only values from 0..7 are used.
+  In case of a conflict between priority grouping and available
+  priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set.
+
+    \param [in]      PriorityGroup  Priority grouping field.
+ */
+__STATIC_INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
+{
+  uint32_t reg_value;
+  uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07);               /* only values 0..7 are used          */
+
+  reg_value  =  SCB->AIRCR;                                                   /* read old register configuration    */
+  reg_value &= ~(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk);             /* clear bits to change               */
+  reg_value  =  (reg_value                                 |
+                ((uint32_t)0x5FA << SCB_AIRCR_VECTKEY_Pos) |
+                (PriorityGroupTmp << 8));                                     /* Insert write key and priorty group */
+  SCB->AIRCR =  reg_value;
+}
+
+
+/** \brief  Get Priority Grouping
+
+  The function reads the priority grouping field from the NVIC Interrupt Controller.
+
+    \return                Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field).
+ */
+__STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void)
+{
+  return ((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos);   /* read priority grouping field */
+}
+
+
+/** \brief  Enable External Interrupt
+
+    The function enables a device-specific interrupt in the NVIC interrupt controller.
+
+    \param [in]      IRQn  External interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
+{
+  NVIC->ISER[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* enable interrupt */
+}
+
+
+/** \brief  Disable External Interrupt
+
+    The function disables a device-specific interrupt in the NVIC interrupt controller.
+
+    \param [in]      IRQn  External interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_DisableIRQ(IRQn_Type IRQn)
+{
+  NVIC->ICER[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* disable interrupt */
+}
+
+
+/** \brief  Get Pending Interrupt
+
+    The function reads the pending register in the NVIC and returns the pending bit
+    for the specified interrupt.
+
+    \param [in]      IRQn  Interrupt number.
+
+    \return             0  Interrupt status is not pending.
+    \return             1  Interrupt status is pending.
+ */
+__STATIC_INLINE uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
+{
+  return((uint32_t) ((NVIC->ISPR[(uint32_t)(IRQn) >> 5] & (1 << ((uint32_t)(IRQn) & 0x1F)))?1:0)); /* Return 1 if pending else 0 */
+}
+
+
+/** \brief  Set Pending Interrupt
+
+    The function sets the pending bit of an external interrupt.
+
+    \param [in]      IRQn  Interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_SetPendingIRQ(IRQn_Type IRQn)
+{
+  NVIC->ISPR[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* set interrupt pending */
+}
+
+
+/** \brief  Clear Pending Interrupt
+
+    The function clears the pending bit of an external interrupt.
+
+    \param [in]      IRQn  External interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
+{
+  NVIC->ICPR[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* Clear pending interrupt */
+}
+
+
+/** \brief  Get Active Interrupt
+
+    The function reads the active register in NVIC and returns the active bit.
+
+    \param [in]      IRQn  Interrupt number.
+
+    \return             0  Interrupt status is not active.
+    \return             1  Interrupt status is active.
+ */
+__STATIC_INLINE uint32_t NVIC_GetActive(IRQn_Type IRQn)
+{
+  return((uint32_t)((NVIC->IABR[(uint32_t)(IRQn) >> 5] & (1 << ((uint32_t)(IRQn) & 0x1F)))?1:0)); /* Return 1 if active else 0 */
+}
+
+
+/** \brief  Set Interrupt Priority
+
+    The function sets the priority of an interrupt.
+
+    \note The priority cannot be set for every core interrupt.
+
+    \param [in]      IRQn  Interrupt number.
+    \param [in]  priority  Priority to set.
+ */
+__STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
+{
+  if(IRQn < 0) {
+    SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for Cortex-M  System Interrupts */
+  else {
+    NVIC->IP[(uint32_t)(IRQn)] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff);    }        /* set Priority for device specific Interrupts  */
+}
+
+
+/** \brief  Get Interrupt Priority
+
+    The function reads the priority of an interrupt. The interrupt
+    number can be positive to specify an external (device specific)
+    interrupt, or negative to specify an internal (core) interrupt.
+
+
+    \param [in]   IRQn  Interrupt number.
+    \return             Interrupt Priority. Value is aligned automatically to the implemented
+                        priority bits of the microcontroller.
+ */
+__STATIC_INLINE uint32_t NVIC_GetPriority(IRQn_Type IRQn)
+{
+
+  if(IRQn < 0) {
+    return((uint32_t)(SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] >> (8 - __NVIC_PRIO_BITS)));  } /* get priority for Cortex-M  system interrupts */
+  else {
+    return((uint32_t)(NVIC->IP[(uint32_t)(IRQn)]           >> (8 - __NVIC_PRIO_BITS)));  } /* get priority for device specific interrupts  */
+}
+
+
+/** \brief  Encode Priority
+
+    The function encodes the priority for an interrupt with the given priority group,
+    preemptive priority value, and subpriority value.
+    In case of a conflict between priority grouping and available
+    priority bits (__NVIC_PRIO_BITS), the samllest possible priority group is set.
+
+    \param [in]     PriorityGroup  Used priority group.
+    \param [in]   PreemptPriority  Preemptive priority value (starting from 0).
+    \param [in]       SubPriority  Subpriority value (starting from 0).
+    \return                        Encoded priority. Value can be used in the function \ref NVIC_SetPriority().
+ */
+__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)
+{
+  uint32_t PriorityGroupTmp = (PriorityGroup & 0x07);          /* only values 0..7 are used          */
+  uint32_t PreemptPriorityBits;
+  uint32_t SubPriorityBits;
+
+  PreemptPriorityBits = ((7 - PriorityGroupTmp) > __NVIC_PRIO_BITS) ? __NVIC_PRIO_BITS : 7 - PriorityGroupTmp;
+  SubPriorityBits     = ((PriorityGroupTmp + __NVIC_PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + __NVIC_PRIO_BITS;
+
+  return (
+           ((PreemptPriority & ((1 << (PreemptPriorityBits)) - 1)) << SubPriorityBits) |
+           ((SubPriority     & ((1 << (SubPriorityBits    )) - 1)))
+         );
+}
+
+
+/** \brief  Decode Priority
+
+    The function decodes an interrupt priority value with a given priority group to
+    preemptive priority value and subpriority value.
+    In case of a conflict between priority grouping and available
+    priority bits (__NVIC_PRIO_BITS) the samllest possible priority group is set.
+
+    \param [in]         Priority   Priority value, which can be retrieved with the function \ref NVIC_GetPriority().
+    \param [in]     PriorityGroup  Used priority group.
+    \param [out] pPreemptPriority  Preemptive priority value (starting from 0).
+    \param [out]     pSubPriority  Subpriority value (starting from 0).
+ */
+__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority)
+{
+  uint32_t PriorityGroupTmp = (PriorityGroup & 0x07);          /* only values 0..7 are used          */
+  uint32_t PreemptPriorityBits;
+  uint32_t SubPriorityBits;
+
+  PreemptPriorityBits = ((7 - PriorityGroupTmp) > __NVIC_PRIO_BITS) ? __NVIC_PRIO_BITS : 7 - PriorityGroupTmp;
+  SubPriorityBits     = ((PriorityGroupTmp + __NVIC_PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + __NVIC_PRIO_BITS;
+
+  *pPreemptPriority = (Priority >> SubPriorityBits) & ((1 << (PreemptPriorityBits)) - 1);
+  *pSubPriority     = (Priority                   ) & ((1 << (SubPriorityBits    )) - 1);
+}
+
+
+/** \brief  System Reset
+
+    The function initiates a system reset request to reset the MCU.
+ */
+__STATIC_INLINE void NVIC_SystemReset(void)
+{
+  __DSB();                                                     /* Ensure all outstanding memory accesses included
+                                                                  buffered write are completed before reset */
+  SCB->AIRCR  = ((0x5FA << SCB_AIRCR_VECTKEY_Pos)      |
+                 (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) |
+                 SCB_AIRCR_SYSRESETREQ_Msk);                   /* Keep priority group unchanged */
+  __DSB();                                                     /* Ensure completion of memory access */
+  while(1);                                                    /* wait until reset */
+}
+
+/*@} end of CMSIS_Core_NVICFunctions */
+
+
+
+/* ##################################    SysTick function  ############################################ */
+/** \ingroup  CMSIS_Core_FunctionInterface
+    \defgroup CMSIS_Core_SysTickFunctions SysTick Functions
+    \brief      Functions that configure the System.
+  @{
+ */
+
+#if (__Vendor_SysTickConfig == 0)
+
+/** \brief  System Tick Configuration
+
+    The function initializes the System Timer and its interrupt, and starts the System Tick Timer.
+    Counter is in free running mode to generate periodic interrupts.
+
+    \param [in]  ticks  Number of ticks between two interrupts.
+
+    \return          0  Function succeeded.
+    \return          1  Function failed.
+
+    \note     When the variable <b>__Vendor_SysTickConfig</b> is set to 1, then the
+    function <b>SysTick_Config</b> is not included. In this case, the file <b><i>device</i>.h</b>
+    must contain a vendor-specific implementation of this function.
+
+ */
+__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
+{
+  if ((ticks - 1) > SysTick_LOAD_RELOAD_Msk)  return (1);      /* Reload value impossible */
+
+  SysTick->LOAD  = ticks - 1;                                  /* set reload register */
+  NVIC_SetPriority (SysTick_IRQn, (1<<__NVIC_PRIO_BITS) - 1);  /* set Priority for Systick Interrupt */
+  SysTick->VAL   = 0;                                          /* Load the SysTick Counter Value */
+  SysTick->CTRL  = SysTick_CTRL_CLKSOURCE_Msk |
+                   SysTick_CTRL_TICKINT_Msk   |
+                   SysTick_CTRL_ENABLE_Msk;                    /* Enable SysTick IRQ and SysTick Timer */
+  return (0);                                                  /* Function successful */
+}
+
+#endif
+
+/*@} end of CMSIS_Core_SysTickFunctions */
+
+
+
+/* ##################################### Debug In/Output function ########################################### */
+/** \ingroup  CMSIS_Core_FunctionInterface
+    \defgroup CMSIS_core_DebugFunctions ITM Functions
+    \brief   Functions that access the ITM debug interface.
+  @{
+ */
+
+extern volatile int32_t ITM_RxBuffer;                    /*!< External variable to receive characters.                         */
+#define                 ITM_RXBUFFER_EMPTY    0x5AA55AA5 /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */
+
+
+/** \brief  ITM Send Character
+
+    The function transmits a character via the ITM channel 0, and
+    \li Just returns when no debugger is connected that has booked the output.
+    \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted.
+
+    \param [in]     ch  Character to transmit.
+
+    \returns            Character to transmit.
+ */
+__STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch)
+{
+  if ((ITM->TCR & ITM_TCR_ITMENA_Msk)                  &&      /* ITM enabled */
+      (ITM->TER & (1UL << 0)        )                    )     /* ITM Port #0 enabled */
+  {
+    while (ITM->PORT[0].u32 == 0);
+    ITM->PORT[0].u8 = (uint8_t) ch;
+  }
+  return (ch);
+}
+
+
+/** \brief  ITM Receive Character
+
+    The function inputs a character via the external variable \ref ITM_RxBuffer.
+
+    \return             Received character.
+    \return         -1  No character pending.
+ */
+__STATIC_INLINE int32_t ITM_ReceiveChar (void) {
+  int32_t ch = -1;                           /* no character available */
+
+  if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) {
+    ch = ITM_RxBuffer;
+    ITM_RxBuffer = ITM_RXBUFFER_EMPTY;       /* ready for next character */
+  }
+
+  return (ch);
+}
+
+
+/** \brief  ITM Check Character
+
+    The function checks whether a character is pending for reading in the variable \ref ITM_RxBuffer.
+
+    \return          0  No character available.
+    \return          1  Character available.
+ */
+__STATIC_INLINE int32_t ITM_CheckChar (void) {
+
+  if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) {
+    return (0);                                 /* no character available */
+  } else {
+    return (1);                                 /*    character available */
+  }
+}
+
+/*@} end of CMSIS_core_DebugFunctions */
+
+#endif /* __CORE_CM3_H_DEPENDANT */
+
+#endif /* __CMSIS_GENERIC */
+
+#ifdef __cplusplus
+}
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cm4.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cm4.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cm4.h	(revision 270)
@@ -0,0 +1,1772 @@
+/**************************************************************************//**
+ * @file     core_cm4.h
+ * @brief    CMSIS Cortex-M4 Core Peripheral Access Layer Header File
+ * @version  V3.20
+ * @date     25. February 2013
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2009 - 2013 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+
+#if defined ( __ICCARM__ )
+ #pragma system_include  /* treat file as system include file for MISRA check */
+#endif
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+#ifndef __CORE_CM4_H_GENERIC
+#define __CORE_CM4_H_GENERIC
+
+/** \page CMSIS_MISRA_Exceptions  MISRA-C:2004 Compliance Exceptions
+  CMSIS violates the following MISRA-C:2004 rules:
+
+   \li Required Rule 8.5, object/function definition in header file.<br>
+     Function definitions in header files are used to allow 'inlining'.
+
+   \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.<br>
+     Unions are used for effective representation of core registers.
+
+   \li Advisory Rule 19.7, Function-like macro defined.<br>
+     Function-like macros are used to allow more efficient code.
+ */
+
+
+/*******************************************************************************
+ *                 CMSIS definitions
+ ******************************************************************************/
+/** \ingroup Cortex_M4
+  @{
+ */
+
+/*  CMSIS CM4 definitions */
+#define __CM4_CMSIS_VERSION_MAIN  (0x03)                                   /*!< [31:16] CMSIS HAL main version   */
+#define __CM4_CMSIS_VERSION_SUB   (0x20)                                   /*!< [15:0]  CMSIS HAL sub version    */
+#define __CM4_CMSIS_VERSION       ((__CM4_CMSIS_VERSION_MAIN << 16) | \
+                                    __CM4_CMSIS_VERSION_SUB          )     /*!< CMSIS HAL version number         */
+
+#define __CORTEX_M                (0x04)                                   /*!< Cortex-M Core                    */
+
+
+#if   defined ( __CC_ARM )
+  #define __ASM            __asm                                      /*!< asm keyword for ARM Compiler          */
+  #define __INLINE         __inline                                   /*!< inline keyword for ARM Compiler       */
+  #define __STATIC_INLINE  static __inline
+
+#elif defined ( __ICCARM__ )
+  #define __ASM            __asm                                      /*!< asm keyword for IAR Compiler          */
+  #define __INLINE         inline                                     /*!< inline keyword for IAR Compiler. Only available in High optimization mode! */
+  #define __STATIC_INLINE  static inline
+
+#elif defined ( __TMS470__ )
+  #define __ASM            __asm                                      /*!< asm keyword for TI CCS Compiler       */
+  #define __STATIC_INLINE  static inline
+
+#elif defined ( __GNUC__ )
+  #define __ASM            __asm                                      /*!< asm keyword for GNU Compiler          */
+  #define __INLINE         inline                                     /*!< inline keyword for GNU Compiler       */
+  #define __STATIC_INLINE  static inline
+
+#elif defined ( __TASKING__ )
+  #define __ASM            __asm                                      /*!< asm keyword for TASKING Compiler      */
+  #define __INLINE         inline                                     /*!< inline keyword for TASKING Compiler   */
+  #define __STATIC_INLINE  static inline
+
+#endif
+
+/** __FPU_USED indicates whether an FPU is used or not. For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions.
+*/
+#if defined ( __CC_ARM )
+  #if defined __TARGET_FPU_VFP
+    #if (__FPU_PRESENT == 1)
+      #define __FPU_USED       1
+    #else
+      #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+      #define __FPU_USED       0
+    #endif
+  #else
+    #define __FPU_USED         0
+  #endif
+
+#elif defined ( __ICCARM__ )
+  #if defined __ARMVFP__
+    #if (__FPU_PRESENT == 1)
+      #define __FPU_USED       1
+    #else
+      #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+      #define __FPU_USED       0
+    #endif
+  #else
+    #define __FPU_USED         0
+  #endif
+
+#elif defined ( __TMS470__ )
+  #if defined __TI_VFP_SUPPORT__
+    #if (__FPU_PRESENT == 1)
+      #define __FPU_USED       1
+    #else
+      #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+      #define __FPU_USED       0
+    #endif
+  #else
+    #define __FPU_USED         0
+  #endif
+
+#elif defined ( __GNUC__ )
+  #if defined (__VFP_FP__) && !defined(__SOFTFP__)
+    #if (__FPU_PRESENT == 1)
+      #define __FPU_USED       1
+    #else
+      #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+      #define __FPU_USED       0
+    #endif
+  #else
+    #define __FPU_USED         0
+  #endif
+
+#elif defined ( __TASKING__ )
+  #if defined __FPU_VFP__
+    #if (__FPU_PRESENT == 1)
+      #define __FPU_USED       1
+    #else
+      #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+      #define __FPU_USED       0
+    #endif
+  #else
+    #define __FPU_USED         0
+  #endif
+#endif
+
+#include <stdint.h>                      /* standard types definitions                      */
+#include <core_cmInstr.h>                /* Core Instruction Access                         */
+#include <core_cmFunc.h>                 /* Core Function Access                            */
+#include <core_cm4_simd.h>               /* Compiler specific SIMD Intrinsics               */
+
+#endif /* __CORE_CM4_H_GENERIC */
+
+#ifndef __CMSIS_GENERIC
+
+#ifndef __CORE_CM4_H_DEPENDANT
+#define __CORE_CM4_H_DEPENDANT
+
+/* check device defines and use defaults */
+#if defined __CHECK_DEVICE_DEFINES
+  #ifndef __CM4_REV
+    #define __CM4_REV               0x0000
+    #warning "__CM4_REV not defined in device header file; using default!"
+  #endif
+
+  #ifndef __FPU_PRESENT
+    #define __FPU_PRESENT             0
+    #warning "__FPU_PRESENT not defined in device header file; using default!"
+  #endif
+
+  #ifndef __MPU_PRESENT
+    #define __MPU_PRESENT             0
+    #warning "__MPU_PRESENT not defined in device header file; using default!"
+  #endif
+
+  #ifndef __NVIC_PRIO_BITS
+    #define __NVIC_PRIO_BITS          4
+    #warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
+  #endif
+
+  #ifndef __Vendor_SysTickConfig
+    #define __Vendor_SysTickConfig    0
+    #warning "__Vendor_SysTickConfig not defined in device header file; using default!"
+  #endif
+#endif
+
+/* IO definitions (access restrictions to peripheral registers) */
+/**
+    \defgroup CMSIS_glob_defs CMSIS Global Defines
+
+    <strong>IO Type Qualifiers</strong> are used
+    \li to specify the access to peripheral variables.
+    \li for automatic generation of peripheral register debug information.
+*/
+#ifdef __cplusplus
+  #define   __I     volatile             /*!< Defines 'read only' permissions                 */
+#else
+  #define   __I     volatile const       /*!< Defines 'read only' permissions                 */
+#endif
+#define     __O     volatile             /*!< Defines 'write only' permissions                */
+#define     __IO    volatile             /*!< Defines 'read / write' permissions              */
+
+/*@} end of group Cortex_M4 */
+
+
+
+/*******************************************************************************
+ *                 Register Abstraction
+  Core Register contain:
+  - Core Register
+  - Core NVIC Register
+  - Core SCB Register
+  - Core SysTick Register
+  - Core Debug Register
+  - Core MPU Register
+  - Core FPU Register
+ ******************************************************************************/
+/** \defgroup CMSIS_core_register Defines and Type Definitions
+    \brief Type definitions and defines for Cortex-M processor based devices.
+*/
+
+/** \ingroup    CMSIS_core_register
+    \defgroup   CMSIS_CORE  Status and Control Registers
+    \brief  Core Register type definitions.
+  @{
+ */
+
+/** \brief  Union type to access the Application Program Status Register (APSR).
+ */
+typedef union
+{
+  struct
+  {
+#if (__CORTEX_M != 0x04)
+    uint32_t _reserved0:27;              /*!< bit:  0..26  Reserved                           */
+#else
+    uint32_t _reserved0:16;              /*!< bit:  0..15  Reserved                           */
+    uint32_t GE:4;                       /*!< bit: 16..19  Greater than or Equal flags        */
+    uint32_t _reserved1:7;               /*!< bit: 20..26  Reserved                           */
+#endif
+    uint32_t Q:1;                        /*!< bit:     27  Saturation condition flag          */
+    uint32_t V:1;                        /*!< bit:     28  Overflow condition code flag       */
+    uint32_t C:1;                        /*!< bit:     29  Carry condition code flag          */
+    uint32_t Z:1;                        /*!< bit:     30  Zero condition code flag           */
+    uint32_t N:1;                        /*!< bit:     31  Negative condition code flag       */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} APSR_Type;
+
+
+/** \brief  Union type to access the Interrupt Program Status Register (IPSR).
+ */
+typedef union
+{
+  struct
+  {
+    uint32_t ISR:9;                      /*!< bit:  0.. 8  Exception number                   */
+    uint32_t _reserved0:23;              /*!< bit:  9..31  Reserved                           */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} IPSR_Type;
+
+
+/** \brief  Union type to access the Special-Purpose Program Status Registers (xPSR).
+ */
+typedef union
+{
+  struct
+  {
+    uint32_t ISR:9;                      /*!< bit:  0.. 8  Exception number                   */
+#if (__CORTEX_M != 0x04)
+    uint32_t _reserved0:15;              /*!< bit:  9..23  Reserved                           */
+#else
+    uint32_t _reserved0:7;               /*!< bit:  9..15  Reserved                           */
+    uint32_t GE:4;                       /*!< bit: 16..19  Greater than or Equal flags        */
+    uint32_t _reserved1:4;               /*!< bit: 20..23  Reserved                           */
+#endif
+    uint32_t T:1;                        /*!< bit:     24  Thumb bit        (read 0)          */
+    uint32_t IT:2;                       /*!< bit: 25..26  saved IT state   (read 0)          */
+    uint32_t Q:1;                        /*!< bit:     27  Saturation condition flag          */
+    uint32_t V:1;                        /*!< bit:     28  Overflow condition code flag       */
+    uint32_t C:1;                        /*!< bit:     29  Carry condition code flag          */
+    uint32_t Z:1;                        /*!< bit:     30  Zero condition code flag           */
+    uint32_t N:1;                        /*!< bit:     31  Negative condition code flag       */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} xPSR_Type;
+
+
+/** \brief  Union type to access the Control Registers (CONTROL).
+ */
+typedef union
+{
+  struct
+  {
+    uint32_t nPRIV:1;                    /*!< bit:      0  Execution privilege in Thread mode */
+    uint32_t SPSEL:1;                    /*!< bit:      1  Stack to be used                   */
+    uint32_t FPCA:1;                     /*!< bit:      2  FP extension active flag           */
+    uint32_t _reserved0:29;              /*!< bit:  3..31  Reserved                           */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} CONTROL_Type;
+
+/*@} end of group CMSIS_CORE */
+
+
+/** \ingroup    CMSIS_core_register
+    \defgroup   CMSIS_NVIC  Nested Vectored Interrupt Controller (NVIC)
+    \brief      Type definitions for the NVIC Registers
+  @{
+ */
+
+/** \brief  Structure type to access the Nested Vectored Interrupt Controller (NVIC).
+ */
+typedef struct
+{
+  __IO uint32_t ISER[8];                 /*!< Offset: 0x000 (R/W)  Interrupt Set Enable Register           */
+       uint32_t RESERVED0[24];
+  __IO uint32_t ICER[8];                 /*!< Offset: 0x080 (R/W)  Interrupt Clear Enable Register         */
+       uint32_t RSERVED1[24];
+  __IO uint32_t ISPR[8];                 /*!< Offset: 0x100 (R/W)  Interrupt Set Pending Register          */
+       uint32_t RESERVED2[24];
+  __IO uint32_t ICPR[8];                 /*!< Offset: 0x180 (R/W)  Interrupt Clear Pending Register        */
+       uint32_t RESERVED3[24];
+  __IO uint32_t IABR[8];                 /*!< Offset: 0x200 (R/W)  Interrupt Active bit Register           */
+       uint32_t RESERVED4[56];
+  __IO uint8_t  IP[240];                 /*!< Offset: 0x300 (R/W)  Interrupt Priority Register (8Bit wide) */
+       uint32_t RESERVED5[644];
+  __O  uint32_t STIR;                    /*!< Offset: 0xE00 ( /W)  Software Trigger Interrupt Register     */
+}  NVIC_Type;
+
+/* Software Triggered Interrupt Register Definitions */
+#define NVIC_STIR_INTID_Pos                 0                                          /*!< STIR: INTLINESNUM Position */
+#define NVIC_STIR_INTID_Msk                (0x1FFUL << NVIC_STIR_INTID_Pos)            /*!< STIR: INTLINESNUM Mask */
+
+/*@} end of group CMSIS_NVIC */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_SCB     System Control Block (SCB)
+    \brief      Type definitions for the System Control Block Registers
+  @{
+ */
+
+/** \brief  Structure type to access the System Control Block (SCB).
+ */
+typedef struct
+{
+  __I  uint32_t CPUID;                   /*!< Offset: 0x000 (R/ )  CPUID Base Register                                   */
+  __IO uint32_t ICSR;                    /*!< Offset: 0x004 (R/W)  Interrupt Control and State Register                  */
+  __IO uint32_t VTOR;                    /*!< Offset: 0x008 (R/W)  Vector Table Offset Register                          */
+  __IO uint32_t AIRCR;                   /*!< Offset: 0x00C (R/W)  Application Interrupt and Reset Control Register      */
+  __IO uint32_t SCR;                     /*!< Offset: 0x010 (R/W)  System Control Register                               */
+  __IO uint32_t CCR;                     /*!< Offset: 0x014 (R/W)  Configuration Control Register                        */
+  __IO uint8_t  SHP[12];                 /*!< Offset: 0x018 (R/W)  System Handlers Priority Registers (4-7, 8-11, 12-15) */
+  __IO uint32_t SHCSR;                   /*!< Offset: 0x024 (R/W)  System Handler Control and State Register             */
+  __IO uint32_t CFSR;                    /*!< Offset: 0x028 (R/W)  Configurable Fault Status Register                    */
+  __IO uint32_t HFSR;                    /*!< Offset: 0x02C (R/W)  HardFault Status Register                             */
+  __IO uint32_t DFSR;                    /*!< Offset: 0x030 (R/W)  Debug Fault Status Register                           */
+  __IO uint32_t MMFAR;                   /*!< Offset: 0x034 (R/W)  MemManage Fault Address Register                      */
+  __IO uint32_t BFAR;                    /*!< Offset: 0x038 (R/W)  BusFault Address Register                             */
+  __IO uint32_t AFSR;                    /*!< Offset: 0x03C (R/W)  Auxiliary Fault Status Register                       */
+  __I  uint32_t PFR[2];                  /*!< Offset: 0x040 (R/ )  Processor Feature Register                            */
+  __I  uint32_t DFR;                     /*!< Offset: 0x048 (R/ )  Debug Feature Register                                */
+  __I  uint32_t ADR;                     /*!< Offset: 0x04C (R/ )  Auxiliary Feature Register                            */
+  __I  uint32_t MMFR[4];                 /*!< Offset: 0x050 (R/ )  Memory Model Feature Register                         */
+  __I  uint32_t ISAR[5];                 /*!< Offset: 0x060 (R/ )  Instruction Set Attributes Register                   */
+       uint32_t RESERVED0[5];
+  __IO uint32_t CPACR;                   /*!< Offset: 0x088 (R/W)  Coprocessor Access Control Register                   */
+} SCB_Type;
+
+/* SCB CPUID Register Definitions */
+#define SCB_CPUID_IMPLEMENTER_Pos          24                                             /*!< SCB CPUID: IMPLEMENTER Position */
+#define SCB_CPUID_IMPLEMENTER_Msk          (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos)          /*!< SCB CPUID: IMPLEMENTER Mask */
+
+#define SCB_CPUID_VARIANT_Pos              20                                             /*!< SCB CPUID: VARIANT Position */
+#define SCB_CPUID_VARIANT_Msk              (0xFUL << SCB_CPUID_VARIANT_Pos)               /*!< SCB CPUID: VARIANT Mask */
+
+#define SCB_CPUID_ARCHITECTURE_Pos         16                                             /*!< SCB CPUID: ARCHITECTURE Position */
+#define SCB_CPUID_ARCHITECTURE_Msk         (0xFUL << SCB_CPUID_ARCHITECTURE_Pos)          /*!< SCB CPUID: ARCHITECTURE Mask */
+
+#define SCB_CPUID_PARTNO_Pos                4                                             /*!< SCB CPUID: PARTNO Position */
+#define SCB_CPUID_PARTNO_Msk               (0xFFFUL << SCB_CPUID_PARTNO_Pos)              /*!< SCB CPUID: PARTNO Mask */
+
+#define SCB_CPUID_REVISION_Pos              0                                             /*!< SCB CPUID: REVISION Position */
+#define SCB_CPUID_REVISION_Msk             (0xFUL << SCB_CPUID_REVISION_Pos)              /*!< SCB CPUID: REVISION Mask */
+
+/* SCB Interrupt Control State Register Definitions */
+#define SCB_ICSR_NMIPENDSET_Pos            31                                             /*!< SCB ICSR: NMIPENDSET Position */
+#define SCB_ICSR_NMIPENDSET_Msk            (1UL << SCB_ICSR_NMIPENDSET_Pos)               /*!< SCB ICSR: NMIPENDSET Mask */
+
+#define SCB_ICSR_PENDSVSET_Pos             28                                             /*!< SCB ICSR: PENDSVSET Position */
+#define SCB_ICSR_PENDSVSET_Msk             (1UL << SCB_ICSR_PENDSVSET_Pos)                /*!< SCB ICSR: PENDSVSET Mask */
+
+#define SCB_ICSR_PENDSVCLR_Pos             27                                             /*!< SCB ICSR: PENDSVCLR Position */
+#define SCB_ICSR_PENDSVCLR_Msk             (1UL << SCB_ICSR_PENDSVCLR_Pos)                /*!< SCB ICSR: PENDSVCLR Mask */
+
+#define SCB_ICSR_PENDSTSET_Pos             26                                             /*!< SCB ICSR: PENDSTSET Position */
+#define SCB_ICSR_PENDSTSET_Msk             (1UL << SCB_ICSR_PENDSTSET_Pos)                /*!< SCB ICSR: PENDSTSET Mask */
+
+#define SCB_ICSR_PENDSTCLR_Pos             25                                             /*!< SCB ICSR: PENDSTCLR Position */
+#define SCB_ICSR_PENDSTCLR_Msk             (1UL << SCB_ICSR_PENDSTCLR_Pos)                /*!< SCB ICSR: PENDSTCLR Mask */
+
+#define SCB_ICSR_ISRPREEMPT_Pos            23                                             /*!< SCB ICSR: ISRPREEMPT Position */
+#define SCB_ICSR_ISRPREEMPT_Msk            (1UL << SCB_ICSR_ISRPREEMPT_Pos)               /*!< SCB ICSR: ISRPREEMPT Mask */
+
+#define SCB_ICSR_ISRPENDING_Pos            22                                             /*!< SCB ICSR: ISRPENDING Position */
+#define SCB_ICSR_ISRPENDING_Msk            (1UL << SCB_ICSR_ISRPENDING_Pos)               /*!< SCB ICSR: ISRPENDING Mask */
+
+#define SCB_ICSR_VECTPENDING_Pos           12                                             /*!< SCB ICSR: VECTPENDING Position */
+#define SCB_ICSR_VECTPENDING_Msk           (0x1FFUL << SCB_ICSR_VECTPENDING_Pos)          /*!< SCB ICSR: VECTPENDING Mask */
+
+#define SCB_ICSR_RETTOBASE_Pos             11                                             /*!< SCB ICSR: RETTOBASE Position */
+#define SCB_ICSR_RETTOBASE_Msk             (1UL << SCB_ICSR_RETTOBASE_Pos)                /*!< SCB ICSR: RETTOBASE Mask */
+
+#define SCB_ICSR_VECTACTIVE_Pos             0                                             /*!< SCB ICSR: VECTACTIVE Position */
+#define SCB_ICSR_VECTACTIVE_Msk            (0x1FFUL << SCB_ICSR_VECTACTIVE_Pos)           /*!< SCB ICSR: VECTACTIVE Mask */
+
+/* SCB Vector Table Offset Register Definitions */
+#define SCB_VTOR_TBLOFF_Pos                 7                                             /*!< SCB VTOR: TBLOFF Position */
+#define SCB_VTOR_TBLOFF_Msk                (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos)           /*!< SCB VTOR: TBLOFF Mask */
+
+/* SCB Application Interrupt and Reset Control Register Definitions */
+#define SCB_AIRCR_VECTKEY_Pos              16                                             /*!< SCB AIRCR: VECTKEY Position */
+#define SCB_AIRCR_VECTKEY_Msk              (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos)            /*!< SCB AIRCR: VECTKEY Mask */
+
+#define SCB_AIRCR_VECTKEYSTAT_Pos          16                                             /*!< SCB AIRCR: VECTKEYSTAT Position */
+#define SCB_AIRCR_VECTKEYSTAT_Msk          (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos)        /*!< SCB AIRCR: VECTKEYSTAT Mask */
+
+#define SCB_AIRCR_ENDIANESS_Pos            15                                             /*!< SCB AIRCR: ENDIANESS Position */
+#define SCB_AIRCR_ENDIANESS_Msk            (1UL << SCB_AIRCR_ENDIANESS_Pos)               /*!< SCB AIRCR: ENDIANESS Mask */
+
+#define SCB_AIRCR_PRIGROUP_Pos              8                                             /*!< SCB AIRCR: PRIGROUP Position */
+#define SCB_AIRCR_PRIGROUP_Msk             (7UL << SCB_AIRCR_PRIGROUP_Pos)                /*!< SCB AIRCR: PRIGROUP Mask */
+
+#define SCB_AIRCR_SYSRESETREQ_Pos           2                                             /*!< SCB AIRCR: SYSRESETREQ Position */
+#define SCB_AIRCR_SYSRESETREQ_Msk          (1UL << SCB_AIRCR_SYSRESETREQ_Pos)             /*!< SCB AIRCR: SYSRESETREQ Mask */
+
+#define SCB_AIRCR_VECTCLRACTIVE_Pos         1                                             /*!< SCB AIRCR: VECTCLRACTIVE Position */
+#define SCB_AIRCR_VECTCLRACTIVE_Msk        (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos)           /*!< SCB AIRCR: VECTCLRACTIVE Mask */
+
+#define SCB_AIRCR_VECTRESET_Pos             0                                             /*!< SCB AIRCR: VECTRESET Position */
+#define SCB_AIRCR_VECTRESET_Msk            (1UL << SCB_AIRCR_VECTRESET_Pos)               /*!< SCB AIRCR: VECTRESET Mask */
+
+/* SCB System Control Register Definitions */
+#define SCB_SCR_SEVONPEND_Pos               4                                             /*!< SCB SCR: SEVONPEND Position */
+#define SCB_SCR_SEVONPEND_Msk              (1UL << SCB_SCR_SEVONPEND_Pos)                 /*!< SCB SCR: SEVONPEND Mask */
+
+#define SCB_SCR_SLEEPDEEP_Pos               2                                             /*!< SCB SCR: SLEEPDEEP Position */
+#define SCB_SCR_SLEEPDEEP_Msk              (1UL << SCB_SCR_SLEEPDEEP_Pos)                 /*!< SCB SCR: SLEEPDEEP Mask */
+
+#define SCB_SCR_SLEEPONEXIT_Pos             1                                             /*!< SCB SCR: SLEEPONEXIT Position */
+#define SCB_SCR_SLEEPONEXIT_Msk            (1UL << SCB_SCR_SLEEPONEXIT_Pos)               /*!< SCB SCR: SLEEPONEXIT Mask */
+
+/* SCB Configuration Control Register Definitions */
+#define SCB_CCR_STKALIGN_Pos                9                                             /*!< SCB CCR: STKALIGN Position */
+#define SCB_CCR_STKALIGN_Msk               (1UL << SCB_CCR_STKALIGN_Pos)                  /*!< SCB CCR: STKALIGN Mask */
+
+#define SCB_CCR_BFHFNMIGN_Pos               8                                             /*!< SCB CCR: BFHFNMIGN Position */
+#define SCB_CCR_BFHFNMIGN_Msk              (1UL << SCB_CCR_BFHFNMIGN_Pos)                 /*!< SCB CCR: BFHFNMIGN Mask */
+
+#define SCB_CCR_DIV_0_TRP_Pos               4                                             /*!< SCB CCR: DIV_0_TRP Position */
+#define SCB_CCR_DIV_0_TRP_Msk              (1UL << SCB_CCR_DIV_0_TRP_Pos)                 /*!< SCB CCR: DIV_0_TRP Mask */
+
+#define SCB_CCR_UNALIGN_TRP_Pos             3                                             /*!< SCB CCR: UNALIGN_TRP Position */
+#define SCB_CCR_UNALIGN_TRP_Msk            (1UL << SCB_CCR_UNALIGN_TRP_Pos)               /*!< SCB CCR: UNALIGN_TRP Mask */
+
+#define SCB_CCR_USERSETMPEND_Pos            1                                             /*!< SCB CCR: USERSETMPEND Position */
+#define SCB_CCR_USERSETMPEND_Msk           (1UL << SCB_CCR_USERSETMPEND_Pos)              /*!< SCB CCR: USERSETMPEND Mask */
+
+#define SCB_CCR_NONBASETHRDENA_Pos          0                                             /*!< SCB CCR: NONBASETHRDENA Position */
+#define SCB_CCR_NONBASETHRDENA_Msk         (1UL << SCB_CCR_NONBASETHRDENA_Pos)            /*!< SCB CCR: NONBASETHRDENA Mask */
+
+/* SCB System Handler Control and State Register Definitions */
+#define SCB_SHCSR_USGFAULTENA_Pos          18                                             /*!< SCB SHCSR: USGFAULTENA Position */
+#define SCB_SHCSR_USGFAULTENA_Msk          (1UL << SCB_SHCSR_USGFAULTENA_Pos)             /*!< SCB SHCSR: USGFAULTENA Mask */
+
+#define SCB_SHCSR_BUSFAULTENA_Pos          17                                             /*!< SCB SHCSR: BUSFAULTENA Position */
+#define SCB_SHCSR_BUSFAULTENA_Msk          (1UL << SCB_SHCSR_BUSFAULTENA_Pos)             /*!< SCB SHCSR: BUSFAULTENA Mask */
+
+#define SCB_SHCSR_MEMFAULTENA_Pos          16                                             /*!< SCB SHCSR: MEMFAULTENA Position */
+#define SCB_SHCSR_MEMFAULTENA_Msk          (1UL << SCB_SHCSR_MEMFAULTENA_Pos)             /*!< SCB SHCSR: MEMFAULTENA Mask */
+
+#define SCB_SHCSR_SVCALLPENDED_Pos         15                                             /*!< SCB SHCSR: SVCALLPENDED Position */
+#define SCB_SHCSR_SVCALLPENDED_Msk         (1UL << SCB_SHCSR_SVCALLPENDED_Pos)            /*!< SCB SHCSR: SVCALLPENDED Mask */
+
+#define SCB_SHCSR_BUSFAULTPENDED_Pos       14                                             /*!< SCB SHCSR: BUSFAULTPENDED Position */
+#define SCB_SHCSR_BUSFAULTPENDED_Msk       (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos)          /*!< SCB SHCSR: BUSFAULTPENDED Mask */
+
+#define SCB_SHCSR_MEMFAULTPENDED_Pos       13                                             /*!< SCB SHCSR: MEMFAULTPENDED Position */
+#define SCB_SHCSR_MEMFAULTPENDED_Msk       (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos)          /*!< SCB SHCSR: MEMFAULTPENDED Mask */
+
+#define SCB_SHCSR_USGFAULTPENDED_Pos       12                                             /*!< SCB SHCSR: USGFAULTPENDED Position */
+#define SCB_SHCSR_USGFAULTPENDED_Msk       (1UL << SCB_SHCSR_USGFAULTPENDED_Pos)          /*!< SCB SHCSR: USGFAULTPENDED Mask */
+
+#define SCB_SHCSR_SYSTICKACT_Pos           11                                             /*!< SCB SHCSR: SYSTICKACT Position */
+#define SCB_SHCSR_SYSTICKACT_Msk           (1UL << SCB_SHCSR_SYSTICKACT_Pos)              /*!< SCB SHCSR: SYSTICKACT Mask */
+
+#define SCB_SHCSR_PENDSVACT_Pos            10                                             /*!< SCB SHCSR: PENDSVACT Position */
+#define SCB_SHCSR_PENDSVACT_Msk            (1UL << SCB_SHCSR_PENDSVACT_Pos)               /*!< SCB SHCSR: PENDSVACT Mask */
+
+#define SCB_SHCSR_MONITORACT_Pos            8                                             /*!< SCB SHCSR: MONITORACT Position */
+#define SCB_SHCSR_MONITORACT_Msk           (1UL << SCB_SHCSR_MONITORACT_Pos)              /*!< SCB SHCSR: MONITORACT Mask */
+
+#define SCB_SHCSR_SVCALLACT_Pos             7                                             /*!< SCB SHCSR: SVCALLACT Position */
+#define SCB_SHCSR_SVCALLACT_Msk            (1UL << SCB_SHCSR_SVCALLACT_Pos)               /*!< SCB SHCSR: SVCALLACT Mask */
+
+#define SCB_SHCSR_USGFAULTACT_Pos           3                                             /*!< SCB SHCSR: USGFAULTACT Position */
+#define SCB_SHCSR_USGFAULTACT_Msk          (1UL << SCB_SHCSR_USGFAULTACT_Pos)             /*!< SCB SHCSR: USGFAULTACT Mask */
+
+#define SCB_SHCSR_BUSFAULTACT_Pos           1                                             /*!< SCB SHCSR: BUSFAULTACT Position */
+#define SCB_SHCSR_BUSFAULTACT_Msk          (1UL << SCB_SHCSR_BUSFAULTACT_Pos)             /*!< SCB SHCSR: BUSFAULTACT Mask */
+
+#define SCB_SHCSR_MEMFAULTACT_Pos           0                                             /*!< SCB SHCSR: MEMFAULTACT Position */
+#define SCB_SHCSR_MEMFAULTACT_Msk          (1UL << SCB_SHCSR_MEMFAULTACT_Pos)             /*!< SCB SHCSR: MEMFAULTACT Mask */
+
+/* SCB Configurable Fault Status Registers Definitions */
+#define SCB_CFSR_USGFAULTSR_Pos            16                                             /*!< SCB CFSR: Usage Fault Status Register Position */
+#define SCB_CFSR_USGFAULTSR_Msk            (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos)          /*!< SCB CFSR: Usage Fault Status Register Mask */
+
+#define SCB_CFSR_BUSFAULTSR_Pos             8                                             /*!< SCB CFSR: Bus Fault Status Register Position */
+#define SCB_CFSR_BUSFAULTSR_Msk            (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos)            /*!< SCB CFSR: Bus Fault Status Register Mask */
+
+#define SCB_CFSR_MEMFAULTSR_Pos             0                                             /*!< SCB CFSR: Memory Manage Fault Status Register Position */
+#define SCB_CFSR_MEMFAULTSR_Msk            (0xFFUL << SCB_CFSR_MEMFAULTSR_Pos)            /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
+
+/* SCB Hard Fault Status Registers Definitions */
+#define SCB_HFSR_DEBUGEVT_Pos              31                                             /*!< SCB HFSR: DEBUGEVT Position */
+#define SCB_HFSR_DEBUGEVT_Msk              (1UL << SCB_HFSR_DEBUGEVT_Pos)                 /*!< SCB HFSR: DEBUGEVT Mask */
+
+#define SCB_HFSR_FORCED_Pos                30                                             /*!< SCB HFSR: FORCED Position */
+#define SCB_HFSR_FORCED_Msk                (1UL << SCB_HFSR_FORCED_Pos)                   /*!< SCB HFSR: FORCED Mask */
+
+#define SCB_HFSR_VECTTBL_Pos                1                                             /*!< SCB HFSR: VECTTBL Position */
+#define SCB_HFSR_VECTTBL_Msk               (1UL << SCB_HFSR_VECTTBL_Pos)                  /*!< SCB HFSR: VECTTBL Mask */
+
+/* SCB Debug Fault Status Register Definitions */
+#define SCB_DFSR_EXTERNAL_Pos               4                                             /*!< SCB DFSR: EXTERNAL Position */
+#define SCB_DFSR_EXTERNAL_Msk              (1UL << SCB_DFSR_EXTERNAL_Pos)                 /*!< SCB DFSR: EXTERNAL Mask */
+
+#define SCB_DFSR_VCATCH_Pos                 3                                             /*!< SCB DFSR: VCATCH Position */
+#define SCB_DFSR_VCATCH_Msk                (1UL << SCB_DFSR_VCATCH_Pos)                   /*!< SCB DFSR: VCATCH Mask */
+
+#define SCB_DFSR_DWTTRAP_Pos                2                                             /*!< SCB DFSR: DWTTRAP Position */
+#define SCB_DFSR_DWTTRAP_Msk               (1UL << SCB_DFSR_DWTTRAP_Pos)                  /*!< SCB DFSR: DWTTRAP Mask */
+
+#define SCB_DFSR_BKPT_Pos                   1                                             /*!< SCB DFSR: BKPT Position */
+#define SCB_DFSR_BKPT_Msk                  (1UL << SCB_DFSR_BKPT_Pos)                     /*!< SCB DFSR: BKPT Mask */
+
+#define SCB_DFSR_HALTED_Pos                 0                                             /*!< SCB DFSR: HALTED Position */
+#define SCB_DFSR_HALTED_Msk                (1UL << SCB_DFSR_HALTED_Pos)                   /*!< SCB DFSR: HALTED Mask */
+
+/*@} end of group CMSIS_SCB */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB)
+    \brief      Type definitions for the System Control and ID Register not in the SCB
+  @{
+ */
+
+/** \brief  Structure type to access the System Control and ID Register not in the SCB.
+ */
+typedef struct
+{
+       uint32_t RESERVED0[1];
+  __I  uint32_t ICTR;                    /*!< Offset: 0x004 (R/ )  Interrupt Controller Type Register      */
+  __IO uint32_t ACTLR;                   /*!< Offset: 0x008 (R/W)  Auxiliary Control Register              */
+} SCnSCB_Type;
+
+/* Interrupt Controller Type Register Definitions */
+#define SCnSCB_ICTR_INTLINESNUM_Pos         0                                          /*!< ICTR: INTLINESNUM Position */
+#define SCnSCB_ICTR_INTLINESNUM_Msk        (0xFUL << SCnSCB_ICTR_INTLINESNUM_Pos)      /*!< ICTR: INTLINESNUM Mask */
+
+/* Auxiliary Control Register Definitions */
+#define SCnSCB_ACTLR_DISOOFP_Pos            9                                          /*!< ACTLR: DISOOFP Position */
+#define SCnSCB_ACTLR_DISOOFP_Msk           (1UL << SCnSCB_ACTLR_DISOOFP_Pos)           /*!< ACTLR: DISOOFP Mask */
+
+#define SCnSCB_ACTLR_DISFPCA_Pos            8                                          /*!< ACTLR: DISFPCA Position */
+#define SCnSCB_ACTLR_DISFPCA_Msk           (1UL << SCnSCB_ACTLR_DISFPCA_Pos)           /*!< ACTLR: DISFPCA Mask */
+
+#define SCnSCB_ACTLR_DISFOLD_Pos            2                                          /*!< ACTLR: DISFOLD Position */
+#define SCnSCB_ACTLR_DISFOLD_Msk           (1UL << SCnSCB_ACTLR_DISFOLD_Pos)           /*!< ACTLR: DISFOLD Mask */
+
+#define SCnSCB_ACTLR_DISDEFWBUF_Pos         1                                          /*!< ACTLR: DISDEFWBUF Position */
+#define SCnSCB_ACTLR_DISDEFWBUF_Msk        (1UL << SCnSCB_ACTLR_DISDEFWBUF_Pos)        /*!< ACTLR: DISDEFWBUF Mask */
+
+#define SCnSCB_ACTLR_DISMCYCINT_Pos         0                                          /*!< ACTLR: DISMCYCINT Position */
+#define SCnSCB_ACTLR_DISMCYCINT_Msk        (1UL << SCnSCB_ACTLR_DISMCYCINT_Pos)        /*!< ACTLR: DISMCYCINT Mask */
+
+/*@} end of group CMSIS_SCnotSCB */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_SysTick     System Tick Timer (SysTick)
+    \brief      Type definitions for the System Timer Registers.
+  @{
+ */
+
+/** \brief  Structure type to access the System Timer (SysTick).
+ */
+typedef struct
+{
+  __IO uint32_t CTRL;                    /*!< Offset: 0x000 (R/W)  SysTick Control and Status Register */
+  __IO uint32_t LOAD;                    /*!< Offset: 0x004 (R/W)  SysTick Reload Value Register       */
+  __IO uint32_t VAL;                     /*!< Offset: 0x008 (R/W)  SysTick Current Value Register      */
+  __I  uint32_t CALIB;                   /*!< Offset: 0x00C (R/ )  SysTick Calibration Register        */
+} SysTick_Type;
+
+/* SysTick Control / Status Register Definitions */
+#define SysTick_CTRL_COUNTFLAG_Pos         16                                             /*!< SysTick CTRL: COUNTFLAG Position */
+#define SysTick_CTRL_COUNTFLAG_Msk         (1UL << SysTick_CTRL_COUNTFLAG_Pos)            /*!< SysTick CTRL: COUNTFLAG Mask */
+
+#define SysTick_CTRL_CLKSOURCE_Pos          2                                             /*!< SysTick CTRL: CLKSOURCE Position */
+#define SysTick_CTRL_CLKSOURCE_Msk         (1UL << SysTick_CTRL_CLKSOURCE_Pos)            /*!< SysTick CTRL: CLKSOURCE Mask */
+
+#define SysTick_CTRL_TICKINT_Pos            1                                             /*!< SysTick CTRL: TICKINT Position */
+#define SysTick_CTRL_TICKINT_Msk           (1UL << SysTick_CTRL_TICKINT_Pos)              /*!< SysTick CTRL: TICKINT Mask */
+
+#define SysTick_CTRL_ENABLE_Pos             0                                             /*!< SysTick CTRL: ENABLE Position */
+#define SysTick_CTRL_ENABLE_Msk            (1UL << SysTick_CTRL_ENABLE_Pos)               /*!< SysTick CTRL: ENABLE Mask */
+
+/* SysTick Reload Register Definitions */
+#define SysTick_LOAD_RELOAD_Pos             0                                             /*!< SysTick LOAD: RELOAD Position */
+#define SysTick_LOAD_RELOAD_Msk            (0xFFFFFFUL << SysTick_LOAD_RELOAD_Pos)        /*!< SysTick LOAD: RELOAD Mask */
+
+/* SysTick Current Register Definitions */
+#define SysTick_VAL_CURRENT_Pos             0                                             /*!< SysTick VAL: CURRENT Position */
+#define SysTick_VAL_CURRENT_Msk            (0xFFFFFFUL << SysTick_VAL_CURRENT_Pos)        /*!< SysTick VAL: CURRENT Mask */
+
+/* SysTick Calibration Register Definitions */
+#define SysTick_CALIB_NOREF_Pos            31                                             /*!< SysTick CALIB: NOREF Position */
+#define SysTick_CALIB_NOREF_Msk            (1UL << SysTick_CALIB_NOREF_Pos)               /*!< SysTick CALIB: NOREF Mask */
+
+#define SysTick_CALIB_SKEW_Pos             30                                             /*!< SysTick CALIB: SKEW Position */
+#define SysTick_CALIB_SKEW_Msk             (1UL << SysTick_CALIB_SKEW_Pos)                /*!< SysTick CALIB: SKEW Mask */
+
+#define SysTick_CALIB_TENMS_Pos             0                                             /*!< SysTick CALIB: TENMS Position */
+#define SysTick_CALIB_TENMS_Msk            (0xFFFFFFUL << SysTick_VAL_CURRENT_Pos)        /*!< SysTick CALIB: TENMS Mask */
+
+/*@} end of group CMSIS_SysTick */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_ITM     Instrumentation Trace Macrocell (ITM)
+    \brief      Type definitions for the Instrumentation Trace Macrocell (ITM)
+  @{
+ */
+
+/** \brief  Structure type to access the Instrumentation Trace Macrocell Register (ITM).
+ */
+typedef struct
+{
+  __O  union
+  {
+    __O  uint8_t    u8;                  /*!< Offset: 0x000 ( /W)  ITM Stimulus Port 8-bit                   */
+    __O  uint16_t   u16;                 /*!< Offset: 0x000 ( /W)  ITM Stimulus Port 16-bit                  */
+    __O  uint32_t   u32;                 /*!< Offset: 0x000 ( /W)  ITM Stimulus Port 32-bit                  */
+  }  PORT [32];                          /*!< Offset: 0x000 ( /W)  ITM Stimulus Port Registers               */
+       uint32_t RESERVED0[864];
+  __IO uint32_t TER;                     /*!< Offset: 0xE00 (R/W)  ITM Trace Enable Register                 */
+       uint32_t RESERVED1[15];
+  __IO uint32_t TPR;                     /*!< Offset: 0xE40 (R/W)  ITM Trace Privilege Register              */
+       uint32_t RESERVED2[15];
+  __IO uint32_t TCR;                     /*!< Offset: 0xE80 (R/W)  ITM Trace Control Register                */
+       uint32_t RESERVED3[29];
+  __O  uint32_t IWR;                     /*!< Offset: 0xEF8 ( /W)  ITM Integration Write Register            */
+  __I  uint32_t IRR;                     /*!< Offset: 0xEFC (R/ )  ITM Integration Read Register             */
+  __IO uint32_t IMCR;                    /*!< Offset: 0xF00 (R/W)  ITM Integration Mode Control Register     */
+       uint32_t RESERVED4[43];
+  __O  uint32_t LAR;                     /*!< Offset: 0xFB0 ( /W)  ITM Lock Access Register                  */
+  __I  uint32_t LSR;                     /*!< Offset: 0xFB4 (R/ )  ITM Lock Status Register                  */
+       uint32_t RESERVED5[6];
+  __I  uint32_t PID4;                    /*!< Offset: 0xFD0 (R/ )  ITM Peripheral Identification Register #4 */
+  __I  uint32_t PID5;                    /*!< Offset: 0xFD4 (R/ )  ITM Peripheral Identification Register #5 */
+  __I  uint32_t PID6;                    /*!< Offset: 0xFD8 (R/ )  ITM Peripheral Identification Register #6 */
+  __I  uint32_t PID7;                    /*!< Offset: 0xFDC (R/ )  ITM Peripheral Identification Register #7 */
+  __I  uint32_t PID0;                    /*!< Offset: 0xFE0 (R/ )  ITM Peripheral Identification Register #0 */
+  __I  uint32_t PID1;                    /*!< Offset: 0xFE4 (R/ )  ITM Peripheral Identification Register #1 */
+  __I  uint32_t PID2;                    /*!< Offset: 0xFE8 (R/ )  ITM Peripheral Identification Register #2 */
+  __I  uint32_t PID3;                    /*!< Offset: 0xFEC (R/ )  ITM Peripheral Identification Register #3 */
+  __I  uint32_t CID0;                    /*!< Offset: 0xFF0 (R/ )  ITM Component  Identification Register #0 */
+  __I  uint32_t CID1;                    /*!< Offset: 0xFF4 (R/ )  ITM Component  Identification Register #1 */
+  __I  uint32_t CID2;                    /*!< Offset: 0xFF8 (R/ )  ITM Component  Identification Register #2 */
+  __I  uint32_t CID3;                    /*!< Offset: 0xFFC (R/ )  ITM Component  Identification Register #3 */
+} ITM_Type;
+
+/* ITM Trace Privilege Register Definitions */
+#define ITM_TPR_PRIVMASK_Pos                0                                             /*!< ITM TPR: PRIVMASK Position */
+#define ITM_TPR_PRIVMASK_Msk               (0xFUL << ITM_TPR_PRIVMASK_Pos)                /*!< ITM TPR: PRIVMASK Mask */
+
+/* ITM Trace Control Register Definitions */
+#define ITM_TCR_BUSY_Pos                   23                                             /*!< ITM TCR: BUSY Position */
+#define ITM_TCR_BUSY_Msk                   (1UL << ITM_TCR_BUSY_Pos)                      /*!< ITM TCR: BUSY Mask */
+
+#define ITM_TCR_TraceBusID_Pos             16                                             /*!< ITM TCR: ATBID Position */
+#define ITM_TCR_TraceBusID_Msk             (0x7FUL << ITM_TCR_TraceBusID_Pos)             /*!< ITM TCR: ATBID Mask */
+
+#define ITM_TCR_GTSFREQ_Pos                10                                             /*!< ITM TCR: Global timestamp frequency Position */
+#define ITM_TCR_GTSFREQ_Msk                (3UL << ITM_TCR_GTSFREQ_Pos)                   /*!< ITM TCR: Global timestamp frequency Mask */
+
+#define ITM_TCR_TSPrescale_Pos              8                                             /*!< ITM TCR: TSPrescale Position */
+#define ITM_TCR_TSPrescale_Msk             (3UL << ITM_TCR_TSPrescale_Pos)                /*!< ITM TCR: TSPrescale Mask */
+
+#define ITM_TCR_SWOENA_Pos                  4                                             /*!< ITM TCR: SWOENA Position */
+#define ITM_TCR_SWOENA_Msk                 (1UL << ITM_TCR_SWOENA_Pos)                    /*!< ITM TCR: SWOENA Mask */
+
+#define ITM_TCR_DWTENA_Pos                  3                                             /*!< ITM TCR: DWTENA Position */
+#define ITM_TCR_DWTENA_Msk                 (1UL << ITM_TCR_DWTENA_Pos)                    /*!< ITM TCR: DWTENA Mask */
+
+#define ITM_TCR_SYNCENA_Pos                 2                                             /*!< ITM TCR: SYNCENA Position */
+#define ITM_TCR_SYNCENA_Msk                (1UL << ITM_TCR_SYNCENA_Pos)                   /*!< ITM TCR: SYNCENA Mask */
+
+#define ITM_TCR_TSENA_Pos                   1                                             /*!< ITM TCR: TSENA Position */
+#define ITM_TCR_TSENA_Msk                  (1UL << ITM_TCR_TSENA_Pos)                     /*!< ITM TCR: TSENA Mask */
+
+#define ITM_TCR_ITMENA_Pos                  0                                             /*!< ITM TCR: ITM Enable bit Position */
+#define ITM_TCR_ITMENA_Msk                 (1UL << ITM_TCR_ITMENA_Pos)                    /*!< ITM TCR: ITM Enable bit Mask */
+
+/* ITM Integration Write Register Definitions */
+#define ITM_IWR_ATVALIDM_Pos                0                                             /*!< ITM IWR: ATVALIDM Position */
+#define ITM_IWR_ATVALIDM_Msk               (1UL << ITM_IWR_ATVALIDM_Pos)                  /*!< ITM IWR: ATVALIDM Mask */
+
+/* ITM Integration Read Register Definitions */
+#define ITM_IRR_ATREADYM_Pos                0                                             /*!< ITM IRR: ATREADYM Position */
+#define ITM_IRR_ATREADYM_Msk               (1UL << ITM_IRR_ATREADYM_Pos)                  /*!< ITM IRR: ATREADYM Mask */
+
+/* ITM Integration Mode Control Register Definitions */
+#define ITM_IMCR_INTEGRATION_Pos            0                                             /*!< ITM IMCR: INTEGRATION Position */
+#define ITM_IMCR_INTEGRATION_Msk           (1UL << ITM_IMCR_INTEGRATION_Pos)              /*!< ITM IMCR: INTEGRATION Mask */
+
+/* ITM Lock Status Register Definitions */
+#define ITM_LSR_ByteAcc_Pos                 2                                             /*!< ITM LSR: ByteAcc Position */
+#define ITM_LSR_ByteAcc_Msk                (1UL << ITM_LSR_ByteAcc_Pos)                   /*!< ITM LSR: ByteAcc Mask */
+
+#define ITM_LSR_Access_Pos                  1                                             /*!< ITM LSR: Access Position */
+#define ITM_LSR_Access_Msk                 (1UL << ITM_LSR_Access_Pos)                    /*!< ITM LSR: Access Mask */
+
+#define ITM_LSR_Present_Pos                 0                                             /*!< ITM LSR: Present Position */
+#define ITM_LSR_Present_Msk                (1UL << ITM_LSR_Present_Pos)                   /*!< ITM LSR: Present Mask */
+
+/*@}*/ /* end of group CMSIS_ITM */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_DWT     Data Watchpoint and Trace (DWT)
+    \brief      Type definitions for the Data Watchpoint and Trace (DWT)
+  @{
+ */
+
+/** \brief  Structure type to access the Data Watchpoint and Trace Register (DWT).
+ */
+typedef struct
+{
+  __IO uint32_t CTRL;                    /*!< Offset: 0x000 (R/W)  Control Register                          */
+  __IO uint32_t CYCCNT;                  /*!< Offset: 0x004 (R/W)  Cycle Count Register                      */
+  __IO uint32_t CPICNT;                  /*!< Offset: 0x008 (R/W)  CPI Count Register                        */
+  __IO uint32_t EXCCNT;                  /*!< Offset: 0x00C (R/W)  Exception Overhead Count Register         */
+  __IO uint32_t SLEEPCNT;                /*!< Offset: 0x010 (R/W)  Sleep Count Register                      */
+  __IO uint32_t LSUCNT;                  /*!< Offset: 0x014 (R/W)  LSU Count Register                        */
+  __IO uint32_t FOLDCNT;                 /*!< Offset: 0x018 (R/W)  Folded-instruction Count Register         */
+  __I  uint32_t PCSR;                    /*!< Offset: 0x01C (R/ )  Program Counter Sample Register           */
+  __IO uint32_t COMP0;                   /*!< Offset: 0x020 (R/W)  Comparator Register 0                     */
+  __IO uint32_t MASK0;                   /*!< Offset: 0x024 (R/W)  Mask Register 0                           */
+  __IO uint32_t FUNCTION0;               /*!< Offset: 0x028 (R/W)  Function Register 0                       */
+       uint32_t RESERVED0[1];
+  __IO uint32_t COMP1;                   /*!< Offset: 0x030 (R/W)  Comparator Register 1                     */
+  __IO uint32_t MASK1;                   /*!< Offset: 0x034 (R/W)  Mask Register 1                           */
+  __IO uint32_t FUNCTION1;               /*!< Offset: 0x038 (R/W)  Function Register 1                       */
+       uint32_t RESERVED1[1];
+  __IO uint32_t COMP2;                   /*!< Offset: 0x040 (R/W)  Comparator Register 2                     */
+  __IO uint32_t MASK2;                   /*!< Offset: 0x044 (R/W)  Mask Register 2                           */
+  __IO uint32_t FUNCTION2;               /*!< Offset: 0x048 (R/W)  Function Register 2                       */
+       uint32_t RESERVED2[1];
+  __IO uint32_t COMP3;                   /*!< Offset: 0x050 (R/W)  Comparator Register 3                     */
+  __IO uint32_t MASK3;                   /*!< Offset: 0x054 (R/W)  Mask Register 3                           */
+  __IO uint32_t FUNCTION3;               /*!< Offset: 0x058 (R/W)  Function Register 3                       */
+} DWT_Type;
+
+/* DWT Control Register Definitions */
+#define DWT_CTRL_NUMCOMP_Pos               28                                          /*!< DWT CTRL: NUMCOMP Position */
+#define DWT_CTRL_NUMCOMP_Msk               (0xFUL << DWT_CTRL_NUMCOMP_Pos)             /*!< DWT CTRL: NUMCOMP Mask */
+
+#define DWT_CTRL_NOTRCPKT_Pos              27                                          /*!< DWT CTRL: NOTRCPKT Position */
+#define DWT_CTRL_NOTRCPKT_Msk              (0x1UL << DWT_CTRL_NOTRCPKT_Pos)            /*!< DWT CTRL: NOTRCPKT Mask */
+
+#define DWT_CTRL_NOEXTTRIG_Pos             26                                          /*!< DWT CTRL: NOEXTTRIG Position */
+#define DWT_CTRL_NOEXTTRIG_Msk             (0x1UL << DWT_CTRL_NOEXTTRIG_Pos)           /*!< DWT CTRL: NOEXTTRIG Mask */
+
+#define DWT_CTRL_NOCYCCNT_Pos              25                                          /*!< DWT CTRL: NOCYCCNT Position */
+#define DWT_CTRL_NOCYCCNT_Msk              (0x1UL << DWT_CTRL_NOCYCCNT_Pos)            /*!< DWT CTRL: NOCYCCNT Mask */
+
+#define DWT_CTRL_NOPRFCNT_Pos              24                                          /*!< DWT CTRL: NOPRFCNT Position */
+#define DWT_CTRL_NOPRFCNT_Msk              (0x1UL << DWT_CTRL_NOPRFCNT_Pos)            /*!< DWT CTRL: NOPRFCNT Mask */
+
+#define DWT_CTRL_CYCEVTENA_Pos             22                                          /*!< DWT CTRL: CYCEVTENA Position */
+#define DWT_CTRL_CYCEVTENA_Msk             (0x1UL << DWT_CTRL_CYCEVTENA_Pos)           /*!< DWT CTRL: CYCEVTENA Mask */
+
+#define DWT_CTRL_FOLDEVTENA_Pos            21                                          /*!< DWT CTRL: FOLDEVTENA Position */
+#define DWT_CTRL_FOLDEVTENA_Msk            (0x1UL << DWT_CTRL_FOLDEVTENA_Pos)          /*!< DWT CTRL: FOLDEVTENA Mask */
+
+#define DWT_CTRL_LSUEVTENA_Pos             20                                          /*!< DWT CTRL: LSUEVTENA Position */
+#define DWT_CTRL_LSUEVTENA_Msk             (0x1UL << DWT_CTRL_LSUEVTENA_Pos)           /*!< DWT CTRL: LSUEVTENA Mask */
+
+#define DWT_CTRL_SLEEPEVTENA_Pos           19                                          /*!< DWT CTRL: SLEEPEVTENA Position */
+#define DWT_CTRL_SLEEPEVTENA_Msk           (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos)         /*!< DWT CTRL: SLEEPEVTENA Mask */
+
+#define DWT_CTRL_EXCEVTENA_Pos             18                                          /*!< DWT CTRL: EXCEVTENA Position */
+#define DWT_CTRL_EXCEVTENA_Msk             (0x1UL << DWT_CTRL_EXCEVTENA_Pos)           /*!< DWT CTRL: EXCEVTENA Mask */
+
+#define DWT_CTRL_CPIEVTENA_Pos             17                                          /*!< DWT CTRL: CPIEVTENA Position */
+#define DWT_CTRL_CPIEVTENA_Msk             (0x1UL << DWT_CTRL_CPIEVTENA_Pos)           /*!< DWT CTRL: CPIEVTENA Mask */
+
+#define DWT_CTRL_EXCTRCENA_Pos             16                                          /*!< DWT CTRL: EXCTRCENA Position */
+#define DWT_CTRL_EXCTRCENA_Msk             (0x1UL << DWT_CTRL_EXCTRCENA_Pos)           /*!< DWT CTRL: EXCTRCENA Mask */
+
+#define DWT_CTRL_PCSAMPLENA_Pos            12                                          /*!< DWT CTRL: PCSAMPLENA Position */
+#define DWT_CTRL_PCSAMPLENA_Msk            (0x1UL << DWT_CTRL_PCSAMPLENA_Pos)          /*!< DWT CTRL: PCSAMPLENA Mask */
+
+#define DWT_CTRL_SYNCTAP_Pos               10                                          /*!< DWT CTRL: SYNCTAP Position */
+#define DWT_CTRL_SYNCTAP_Msk               (0x3UL << DWT_CTRL_SYNCTAP_Pos)             /*!< DWT CTRL: SYNCTAP Mask */
+
+#define DWT_CTRL_CYCTAP_Pos                 9                                          /*!< DWT CTRL: CYCTAP Position */
+#define DWT_CTRL_CYCTAP_Msk                (0x1UL << DWT_CTRL_CYCTAP_Pos)              /*!< DWT CTRL: CYCTAP Mask */
+
+#define DWT_CTRL_POSTINIT_Pos               5                                          /*!< DWT CTRL: POSTINIT Position */
+#define DWT_CTRL_POSTINIT_Msk              (0xFUL << DWT_CTRL_POSTINIT_Pos)            /*!< DWT CTRL: POSTINIT Mask */
+
+#define DWT_CTRL_POSTPRESET_Pos             1                                          /*!< DWT CTRL: POSTPRESET Position */
+#define DWT_CTRL_POSTPRESET_Msk            (0xFUL << DWT_CTRL_POSTPRESET_Pos)          /*!< DWT CTRL: POSTPRESET Mask */
+
+#define DWT_CTRL_CYCCNTENA_Pos              0                                          /*!< DWT CTRL: CYCCNTENA Position */
+#define DWT_CTRL_CYCCNTENA_Msk             (0x1UL << DWT_CTRL_CYCCNTENA_Pos)           /*!< DWT CTRL: CYCCNTENA Mask */
+
+/* DWT CPI Count Register Definitions */
+#define DWT_CPICNT_CPICNT_Pos               0                                          /*!< DWT CPICNT: CPICNT Position */
+#define DWT_CPICNT_CPICNT_Msk              (0xFFUL << DWT_CPICNT_CPICNT_Pos)           /*!< DWT CPICNT: CPICNT Mask */
+
+/* DWT Exception Overhead Count Register Definitions */
+#define DWT_EXCCNT_EXCCNT_Pos               0                                          /*!< DWT EXCCNT: EXCCNT Position */
+#define DWT_EXCCNT_EXCCNT_Msk              (0xFFUL << DWT_EXCCNT_EXCCNT_Pos)           /*!< DWT EXCCNT: EXCCNT Mask */
+
+/* DWT Sleep Count Register Definitions */
+#define DWT_SLEEPCNT_SLEEPCNT_Pos           0                                          /*!< DWT SLEEPCNT: SLEEPCNT Position */
+#define DWT_SLEEPCNT_SLEEPCNT_Msk          (0xFFUL << DWT_SLEEPCNT_SLEEPCNT_Pos)       /*!< DWT SLEEPCNT: SLEEPCNT Mask */
+
+/* DWT LSU Count Register Definitions */
+#define DWT_LSUCNT_LSUCNT_Pos               0                                          /*!< DWT LSUCNT: LSUCNT Position */
+#define DWT_LSUCNT_LSUCNT_Msk              (0xFFUL << DWT_LSUCNT_LSUCNT_Pos)           /*!< DWT LSUCNT: LSUCNT Mask */
+
+/* DWT Folded-instruction Count Register Definitions */
+#define DWT_FOLDCNT_FOLDCNT_Pos             0                                          /*!< DWT FOLDCNT: FOLDCNT Position */
+#define DWT_FOLDCNT_FOLDCNT_Msk            (0xFFUL << DWT_FOLDCNT_FOLDCNT_Pos)         /*!< DWT FOLDCNT: FOLDCNT Mask */
+
+/* DWT Comparator Mask Register Definitions */
+#define DWT_MASK_MASK_Pos                   0                                          /*!< DWT MASK: MASK Position */
+#define DWT_MASK_MASK_Msk                  (0x1FUL << DWT_MASK_MASK_Pos)               /*!< DWT MASK: MASK Mask */
+
+/* DWT Comparator Function Register Definitions */
+#define DWT_FUNCTION_MATCHED_Pos           24                                          /*!< DWT FUNCTION: MATCHED Position */
+#define DWT_FUNCTION_MATCHED_Msk           (0x1UL << DWT_FUNCTION_MATCHED_Pos)         /*!< DWT FUNCTION: MATCHED Mask */
+
+#define DWT_FUNCTION_DATAVADDR1_Pos        16                                          /*!< DWT FUNCTION: DATAVADDR1 Position */
+#define DWT_FUNCTION_DATAVADDR1_Msk        (0xFUL << DWT_FUNCTION_DATAVADDR1_Pos)      /*!< DWT FUNCTION: DATAVADDR1 Mask */
+
+#define DWT_FUNCTION_DATAVADDR0_Pos        12                                          /*!< DWT FUNCTION: DATAVADDR0 Position */
+#define DWT_FUNCTION_DATAVADDR0_Msk        (0xFUL << DWT_FUNCTION_DATAVADDR0_Pos)      /*!< DWT FUNCTION: DATAVADDR0 Mask */
+
+#define DWT_FUNCTION_DATAVSIZE_Pos         10                                          /*!< DWT FUNCTION: DATAVSIZE Position */
+#define DWT_FUNCTION_DATAVSIZE_Msk         (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos)       /*!< DWT FUNCTION: DATAVSIZE Mask */
+
+#define DWT_FUNCTION_LNK1ENA_Pos            9                                          /*!< DWT FUNCTION: LNK1ENA Position */
+#define DWT_FUNCTION_LNK1ENA_Msk           (0x1UL << DWT_FUNCTION_LNK1ENA_Pos)         /*!< DWT FUNCTION: LNK1ENA Mask */
+
+#define DWT_FUNCTION_DATAVMATCH_Pos         8                                          /*!< DWT FUNCTION: DATAVMATCH Position */
+#define DWT_FUNCTION_DATAVMATCH_Msk        (0x1UL << DWT_FUNCTION_DATAVMATCH_Pos)      /*!< DWT FUNCTION: DATAVMATCH Mask */
+
+#define DWT_FUNCTION_CYCMATCH_Pos           7                                          /*!< DWT FUNCTION: CYCMATCH Position */
+#define DWT_FUNCTION_CYCMATCH_Msk          (0x1UL << DWT_FUNCTION_CYCMATCH_Pos)        /*!< DWT FUNCTION: CYCMATCH Mask */
+
+#define DWT_FUNCTION_EMITRANGE_Pos          5                                          /*!< DWT FUNCTION: EMITRANGE Position */
+#define DWT_FUNCTION_EMITRANGE_Msk         (0x1UL << DWT_FUNCTION_EMITRANGE_Pos)       /*!< DWT FUNCTION: EMITRANGE Mask */
+
+#define DWT_FUNCTION_FUNCTION_Pos           0                                          /*!< DWT FUNCTION: FUNCTION Position */
+#define DWT_FUNCTION_FUNCTION_Msk          (0xFUL << DWT_FUNCTION_FUNCTION_Pos)        /*!< DWT FUNCTION: FUNCTION Mask */
+
+/*@}*/ /* end of group CMSIS_DWT */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_TPI     Trace Port Interface (TPI)
+    \brief      Type definitions for the Trace Port Interface (TPI)
+  @{
+ */
+
+/** \brief  Structure type to access the Trace Port Interface Register (TPI).
+ */
+typedef struct
+{
+  __IO uint32_t SSPSR;                   /*!< Offset: 0x000 (R/ )  Supported Parallel Port Size Register     */
+  __IO uint32_t CSPSR;                   /*!< Offset: 0x004 (R/W)  Current Parallel Port Size Register */
+       uint32_t RESERVED0[2];
+  __IO uint32_t ACPR;                    /*!< Offset: 0x010 (R/W)  Asynchronous Clock Prescaler Register */
+       uint32_t RESERVED1[55];
+  __IO uint32_t SPPR;                    /*!< Offset: 0x0F0 (R/W)  Selected Pin Protocol Register */
+       uint32_t RESERVED2[131];
+  __I  uint32_t FFSR;                    /*!< Offset: 0x300 (R/ )  Formatter and Flush Status Register */
+  __IO uint32_t FFCR;                    /*!< Offset: 0x304 (R/W)  Formatter and Flush Control Register */
+  __I  uint32_t FSCR;                    /*!< Offset: 0x308 (R/ )  Formatter Synchronization Counter Register */
+       uint32_t RESERVED3[759];
+  __I  uint32_t TRIGGER;                 /*!< Offset: 0xEE8 (R/ )  TRIGGER */
+  __I  uint32_t FIFO0;                   /*!< Offset: 0xEEC (R/ )  Integration ETM Data */
+  __I  uint32_t ITATBCTR2;               /*!< Offset: 0xEF0 (R/ )  ITATBCTR2 */
+       uint32_t RESERVED4[1];
+  __I  uint32_t ITATBCTR0;               /*!< Offset: 0xEF8 (R/ )  ITATBCTR0 */
+  __I  uint32_t FIFO1;                   /*!< Offset: 0xEFC (R/ )  Integration ITM Data */
+  __IO uint32_t ITCTRL;                  /*!< Offset: 0xF00 (R/W)  Integration Mode Control */
+       uint32_t RESERVED5[39];
+  __IO uint32_t CLAIMSET;                /*!< Offset: 0xFA0 (R/W)  Claim tag set */
+  __IO uint32_t CLAIMCLR;                /*!< Offset: 0xFA4 (R/W)  Claim tag clear */
+       uint32_t RESERVED7[8];
+  __I  uint32_t DEVID;                   /*!< Offset: 0xFC8 (R/ )  TPIU_DEVID */
+  __I  uint32_t DEVTYPE;                 /*!< Offset: 0xFCC (R/ )  TPIU_DEVTYPE */
+} TPI_Type;
+
+/* TPI Asynchronous Clock Prescaler Register Definitions */
+#define TPI_ACPR_PRESCALER_Pos              0                                          /*!< TPI ACPR: PRESCALER Position */
+#define TPI_ACPR_PRESCALER_Msk             (0x1FFFUL << TPI_ACPR_PRESCALER_Pos)        /*!< TPI ACPR: PRESCALER Mask */
+
+/* TPI Selected Pin Protocol Register Definitions */
+#define TPI_SPPR_TXMODE_Pos                 0                                          /*!< TPI SPPR: TXMODE Position */
+#define TPI_SPPR_TXMODE_Msk                (0x3UL << TPI_SPPR_TXMODE_Pos)              /*!< TPI SPPR: TXMODE Mask */
+
+/* TPI Formatter and Flush Status Register Definitions */
+#define TPI_FFSR_FtNonStop_Pos              3                                          /*!< TPI FFSR: FtNonStop Position */
+#define TPI_FFSR_FtNonStop_Msk             (0x1UL << TPI_FFSR_FtNonStop_Pos)           /*!< TPI FFSR: FtNonStop Mask */
+
+#define TPI_FFSR_TCPresent_Pos              2                                          /*!< TPI FFSR: TCPresent Position */
+#define TPI_FFSR_TCPresent_Msk             (0x1UL << TPI_FFSR_TCPresent_Pos)           /*!< TPI FFSR: TCPresent Mask */
+
+#define TPI_FFSR_FtStopped_Pos              1                                          /*!< TPI FFSR: FtStopped Position */
+#define TPI_FFSR_FtStopped_Msk             (0x1UL << TPI_FFSR_FtStopped_Pos)           /*!< TPI FFSR: FtStopped Mask */
+
+#define TPI_FFSR_FlInProg_Pos               0                                          /*!< TPI FFSR: FlInProg Position */
+#define TPI_FFSR_FlInProg_Msk              (0x1UL << TPI_FFSR_FlInProg_Pos)            /*!< TPI FFSR: FlInProg Mask */
+
+/* TPI Formatter and Flush Control Register Definitions */
+#define TPI_FFCR_TrigIn_Pos                 8                                          /*!< TPI FFCR: TrigIn Position */
+#define TPI_FFCR_TrigIn_Msk                (0x1UL << TPI_FFCR_TrigIn_Pos)              /*!< TPI FFCR: TrigIn Mask */
+
+#define TPI_FFCR_EnFCont_Pos                1                                          /*!< TPI FFCR: EnFCont Position */
+#define TPI_FFCR_EnFCont_Msk               (0x1UL << TPI_FFCR_EnFCont_Pos)             /*!< TPI FFCR: EnFCont Mask */
+
+/* TPI TRIGGER Register Definitions */
+#define TPI_TRIGGER_TRIGGER_Pos             0                                          /*!< TPI TRIGGER: TRIGGER Position */
+#define TPI_TRIGGER_TRIGGER_Msk            (0x1UL << TPI_TRIGGER_TRIGGER_Pos)          /*!< TPI TRIGGER: TRIGGER Mask */
+
+/* TPI Integration ETM Data Register Definitions (FIFO0) */
+#define TPI_FIFO0_ITM_ATVALID_Pos          29                                          /*!< TPI FIFO0: ITM_ATVALID Position */
+#define TPI_FIFO0_ITM_ATVALID_Msk          (0x3UL << TPI_FIFO0_ITM_ATVALID_Pos)        /*!< TPI FIFO0: ITM_ATVALID Mask */
+
+#define TPI_FIFO0_ITM_bytecount_Pos        27                                          /*!< TPI FIFO0: ITM_bytecount Position */
+#define TPI_FIFO0_ITM_bytecount_Msk        (0x3UL << TPI_FIFO0_ITM_bytecount_Pos)      /*!< TPI FIFO0: ITM_bytecount Mask */
+
+#define TPI_FIFO0_ETM_ATVALID_Pos          26                                          /*!< TPI FIFO0: ETM_ATVALID Position */
+#define TPI_FIFO0_ETM_ATVALID_Msk          (0x3UL << TPI_FIFO0_ETM_ATVALID_Pos)        /*!< TPI FIFO0: ETM_ATVALID Mask */
+
+#define TPI_FIFO0_ETM_bytecount_Pos        24                                          /*!< TPI FIFO0: ETM_bytecount Position */
+#define TPI_FIFO0_ETM_bytecount_Msk        (0x3UL << TPI_FIFO0_ETM_bytecount_Pos)      /*!< TPI FIFO0: ETM_bytecount Mask */
+
+#define TPI_FIFO0_ETM2_Pos                 16                                          /*!< TPI FIFO0: ETM2 Position */
+#define TPI_FIFO0_ETM2_Msk                 (0xFFUL << TPI_FIFO0_ETM2_Pos)              /*!< TPI FIFO0: ETM2 Mask */
+
+#define TPI_FIFO0_ETM1_Pos                  8                                          /*!< TPI FIFO0: ETM1 Position */
+#define TPI_FIFO0_ETM1_Msk                 (0xFFUL << TPI_FIFO0_ETM1_Pos)              /*!< TPI FIFO0: ETM1 Mask */
+
+#define TPI_FIFO0_ETM0_Pos                  0                                          /*!< TPI FIFO0: ETM0 Position */
+#define TPI_FIFO0_ETM0_Msk                 (0xFFUL << TPI_FIFO0_ETM0_Pos)              /*!< TPI FIFO0: ETM0 Mask */
+
+/* TPI ITATBCTR2 Register Definitions */
+#define TPI_ITATBCTR2_ATREADY_Pos           0                                          /*!< TPI ITATBCTR2: ATREADY Position */
+#define TPI_ITATBCTR2_ATREADY_Msk          (0x1UL << TPI_ITATBCTR2_ATREADY_Pos)        /*!< TPI ITATBCTR2: ATREADY Mask */
+
+/* TPI Integration ITM Data Register Definitions (FIFO1) */
+#define TPI_FIFO1_ITM_ATVALID_Pos          29                                          /*!< TPI FIFO1: ITM_ATVALID Position */
+#define TPI_FIFO1_ITM_ATVALID_Msk          (0x3UL << TPI_FIFO1_ITM_ATVALID_Pos)        /*!< TPI FIFO1: ITM_ATVALID Mask */
+
+#define TPI_FIFO1_ITM_bytecount_Pos        27                                          /*!< TPI FIFO1: ITM_bytecount Position */
+#define TPI_FIFO1_ITM_bytecount_Msk        (0x3UL << TPI_FIFO1_ITM_bytecount_Pos)      /*!< TPI FIFO1: ITM_bytecount Mask */
+
+#define TPI_FIFO1_ETM_ATVALID_Pos          26                                          /*!< TPI FIFO1: ETM_ATVALID Position */
+#define TPI_FIFO1_ETM_ATVALID_Msk          (0x3UL << TPI_FIFO1_ETM_ATVALID_Pos)        /*!< TPI FIFO1: ETM_ATVALID Mask */
+
+#define TPI_FIFO1_ETM_bytecount_Pos        24                                          /*!< TPI FIFO1: ETM_bytecount Position */
+#define TPI_FIFO1_ETM_bytecount_Msk        (0x3UL << TPI_FIFO1_ETM_bytecount_Pos)      /*!< TPI FIFO1: ETM_bytecount Mask */
+
+#define TPI_FIFO1_ITM2_Pos                 16                                          /*!< TPI FIFO1: ITM2 Position */
+#define TPI_FIFO1_ITM2_Msk                 (0xFFUL << TPI_FIFO1_ITM2_Pos)              /*!< TPI FIFO1: ITM2 Mask */
+
+#define TPI_FIFO1_ITM1_Pos                  8                                          /*!< TPI FIFO1: ITM1 Position */
+#define TPI_FIFO1_ITM1_Msk                 (0xFFUL << TPI_FIFO1_ITM1_Pos)              /*!< TPI FIFO1: ITM1 Mask */
+
+#define TPI_FIFO1_ITM0_Pos                  0                                          /*!< TPI FIFO1: ITM0 Position */
+#define TPI_FIFO1_ITM0_Msk                 (0xFFUL << TPI_FIFO1_ITM0_Pos)              /*!< TPI FIFO1: ITM0 Mask */
+
+/* TPI ITATBCTR0 Register Definitions */
+#define TPI_ITATBCTR0_ATREADY_Pos           0                                          /*!< TPI ITATBCTR0: ATREADY Position */
+#define TPI_ITATBCTR0_ATREADY_Msk          (0x1UL << TPI_ITATBCTR0_ATREADY_Pos)        /*!< TPI ITATBCTR0: ATREADY Mask */
+
+/* TPI Integration Mode Control Register Definitions */
+#define TPI_ITCTRL_Mode_Pos                 0                                          /*!< TPI ITCTRL: Mode Position */
+#define TPI_ITCTRL_Mode_Msk                (0x1UL << TPI_ITCTRL_Mode_Pos)              /*!< TPI ITCTRL: Mode Mask */
+
+/* TPI DEVID Register Definitions */
+#define TPI_DEVID_NRZVALID_Pos             11                                          /*!< TPI DEVID: NRZVALID Position */
+#define TPI_DEVID_NRZVALID_Msk             (0x1UL << TPI_DEVID_NRZVALID_Pos)           /*!< TPI DEVID: NRZVALID Mask */
+
+#define TPI_DEVID_MANCVALID_Pos            10                                          /*!< TPI DEVID: MANCVALID Position */
+#define TPI_DEVID_MANCVALID_Msk            (0x1UL << TPI_DEVID_MANCVALID_Pos)          /*!< TPI DEVID: MANCVALID Mask */
+
+#define TPI_DEVID_PTINVALID_Pos             9                                          /*!< TPI DEVID: PTINVALID Position */
+#define TPI_DEVID_PTINVALID_Msk            (0x1UL << TPI_DEVID_PTINVALID_Pos)          /*!< TPI DEVID: PTINVALID Mask */
+
+#define TPI_DEVID_MinBufSz_Pos              6                                          /*!< TPI DEVID: MinBufSz Position */
+#define TPI_DEVID_MinBufSz_Msk             (0x7UL << TPI_DEVID_MinBufSz_Pos)           /*!< TPI DEVID: MinBufSz Mask */
+
+#define TPI_DEVID_AsynClkIn_Pos             5                                          /*!< TPI DEVID: AsynClkIn Position */
+#define TPI_DEVID_AsynClkIn_Msk            (0x1UL << TPI_DEVID_AsynClkIn_Pos)          /*!< TPI DEVID: AsynClkIn Mask */
+
+#define TPI_DEVID_NrTraceInput_Pos          0                                          /*!< TPI DEVID: NrTraceInput Position */
+#define TPI_DEVID_NrTraceInput_Msk         (0x1FUL << TPI_DEVID_NrTraceInput_Pos)      /*!< TPI DEVID: NrTraceInput Mask */
+
+/* TPI DEVTYPE Register Definitions */
+#define TPI_DEVTYPE_SubType_Pos             0                                          /*!< TPI DEVTYPE: SubType Position */
+#define TPI_DEVTYPE_SubType_Msk            (0xFUL << TPI_DEVTYPE_SubType_Pos)          /*!< TPI DEVTYPE: SubType Mask */
+
+#define TPI_DEVTYPE_MajorType_Pos           4                                          /*!< TPI DEVTYPE: MajorType Position */
+#define TPI_DEVTYPE_MajorType_Msk          (0xFUL << TPI_DEVTYPE_MajorType_Pos)        /*!< TPI DEVTYPE: MajorType Mask */
+
+/*@}*/ /* end of group CMSIS_TPI */
+
+
+#if (__MPU_PRESENT == 1)
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_MPU     Memory Protection Unit (MPU)
+    \brief      Type definitions for the Memory Protection Unit (MPU)
+  @{
+ */
+
+/** \brief  Structure type to access the Memory Protection Unit (MPU).
+ */
+typedef struct
+{
+  __I  uint32_t TYPE;                    /*!< Offset: 0x000 (R/ )  MPU Type Register                              */
+  __IO uint32_t CTRL;                    /*!< Offset: 0x004 (R/W)  MPU Control Register                           */
+  __IO uint32_t RNR;                     /*!< Offset: 0x008 (R/W)  MPU Region RNRber Register                     */
+  __IO uint32_t RBAR;                    /*!< Offset: 0x00C (R/W)  MPU Region Base Address Register               */
+  __IO uint32_t RASR;                    /*!< Offset: 0x010 (R/W)  MPU Region Attribute and Size Register         */
+  __IO uint32_t RBAR_A1;                 /*!< Offset: 0x014 (R/W)  MPU Alias 1 Region Base Address Register       */
+  __IO uint32_t RASR_A1;                 /*!< Offset: 0x018 (R/W)  MPU Alias 1 Region Attribute and Size Register */
+  __IO uint32_t RBAR_A2;                 /*!< Offset: 0x01C (R/W)  MPU Alias 2 Region Base Address Register       */
+  __IO uint32_t RASR_A2;                 /*!< Offset: 0x020 (R/W)  MPU Alias 2 Region Attribute and Size Register */
+  __IO uint32_t RBAR_A3;                 /*!< Offset: 0x024 (R/W)  MPU Alias 3 Region Base Address Register       */
+  __IO uint32_t RASR_A3;                 /*!< Offset: 0x028 (R/W)  MPU Alias 3 Region Attribute and Size Register */
+} MPU_Type;
+
+/* MPU Type Register */
+#define MPU_TYPE_IREGION_Pos               16                                             /*!< MPU TYPE: IREGION Position */
+#define MPU_TYPE_IREGION_Msk               (0xFFUL << MPU_TYPE_IREGION_Pos)               /*!< MPU TYPE: IREGION Mask */
+
+#define MPU_TYPE_DREGION_Pos                8                                             /*!< MPU TYPE: DREGION Position */
+#define MPU_TYPE_DREGION_Msk               (0xFFUL << MPU_TYPE_DREGION_Pos)               /*!< MPU TYPE: DREGION Mask */
+
+#define MPU_TYPE_SEPARATE_Pos               0                                             /*!< MPU TYPE: SEPARATE Position */
+#define MPU_TYPE_SEPARATE_Msk              (1UL << MPU_TYPE_SEPARATE_Pos)                 /*!< MPU TYPE: SEPARATE Mask */
+
+/* MPU Control Register */
+#define MPU_CTRL_PRIVDEFENA_Pos             2                                             /*!< MPU CTRL: PRIVDEFENA Position */
+#define MPU_CTRL_PRIVDEFENA_Msk            (1UL << MPU_CTRL_PRIVDEFENA_Pos)               /*!< MPU CTRL: PRIVDEFENA Mask */
+
+#define MPU_CTRL_HFNMIENA_Pos               1                                             /*!< MPU CTRL: HFNMIENA Position */
+#define MPU_CTRL_HFNMIENA_Msk              (1UL << MPU_CTRL_HFNMIENA_Pos)                 /*!< MPU CTRL: HFNMIENA Mask */
+
+#define MPU_CTRL_ENABLE_Pos                 0                                             /*!< MPU CTRL: ENABLE Position */
+#define MPU_CTRL_ENABLE_Msk                (1UL << MPU_CTRL_ENABLE_Pos)                   /*!< MPU CTRL: ENABLE Mask */
+
+/* MPU Region Number Register */
+#define MPU_RNR_REGION_Pos                  0                                             /*!< MPU RNR: REGION Position */
+#define MPU_RNR_REGION_Msk                 (0xFFUL << MPU_RNR_REGION_Pos)                 /*!< MPU RNR: REGION Mask */
+
+/* MPU Region Base Address Register */
+#define MPU_RBAR_ADDR_Pos                   5                                             /*!< MPU RBAR: ADDR Position */
+#define MPU_RBAR_ADDR_Msk                  (0x7FFFFFFUL << MPU_RBAR_ADDR_Pos)             /*!< MPU RBAR: ADDR Mask */
+
+#define MPU_RBAR_VALID_Pos                  4                                             /*!< MPU RBAR: VALID Position */
+#define MPU_RBAR_VALID_Msk                 (1UL << MPU_RBAR_VALID_Pos)                    /*!< MPU RBAR: VALID Mask */
+
+#define MPU_RBAR_REGION_Pos                 0                                             /*!< MPU RBAR: REGION Position */
+#define MPU_RBAR_REGION_Msk                (0xFUL << MPU_RBAR_REGION_Pos)                 /*!< MPU RBAR: REGION Mask */
+
+/* MPU Region Attribute and Size Register */
+#define MPU_RASR_ATTRS_Pos                 16                                             /*!< MPU RASR: MPU Region Attribute field Position */
+#define MPU_RASR_ATTRS_Msk                 (0xFFFFUL << MPU_RASR_ATTRS_Pos)               /*!< MPU RASR: MPU Region Attribute field Mask */
+
+#define MPU_RASR_XN_Pos                    28                                             /*!< MPU RASR: ATTRS.XN Position */
+#define MPU_RASR_XN_Msk                    (1UL << MPU_RASR_XN_Pos)                       /*!< MPU RASR: ATTRS.XN Mask */
+
+#define MPU_RASR_AP_Pos                    24                                             /*!< MPU RASR: ATTRS.AP Position */
+#define MPU_RASR_AP_Msk                    (0x7UL << MPU_RASR_AP_Pos)                     /*!< MPU RASR: ATTRS.AP Mask */
+
+#define MPU_RASR_TEX_Pos                   19                                             /*!< MPU RASR: ATTRS.TEX Position */
+#define MPU_RASR_TEX_Msk                   (0x7UL << MPU_RASR_TEX_Pos)                    /*!< MPU RASR: ATTRS.TEX Mask */
+
+#define MPU_RASR_S_Pos                     18                                             /*!< MPU RASR: ATTRS.S Position */
+#define MPU_RASR_S_Msk                     (1UL << MPU_RASR_S_Pos)                        /*!< MPU RASR: ATTRS.S Mask */
+
+#define MPU_RASR_C_Pos                     17                                             /*!< MPU RASR: ATTRS.C Position */
+#define MPU_RASR_C_Msk                     (1UL << MPU_RASR_C_Pos)                        /*!< MPU RASR: ATTRS.C Mask */
+
+#define MPU_RASR_B_Pos                     16                                             /*!< MPU RASR: ATTRS.B Position */
+#define MPU_RASR_B_Msk                     (1UL << MPU_RASR_B_Pos)                        /*!< MPU RASR: ATTRS.B Mask */
+
+#define MPU_RASR_SRD_Pos                    8                                             /*!< MPU RASR: Sub-Region Disable Position */
+#define MPU_RASR_SRD_Msk                   (0xFFUL << MPU_RASR_SRD_Pos)                   /*!< MPU RASR: Sub-Region Disable Mask */
+
+#define MPU_RASR_SIZE_Pos                   1                                             /*!< MPU RASR: Region Size Field Position */
+#define MPU_RASR_SIZE_Msk                  (0x1FUL << MPU_RASR_SIZE_Pos)                  /*!< MPU RASR: Region Size Field Mask */
+
+#define MPU_RASR_ENABLE_Pos                 0                                             /*!< MPU RASR: Region enable bit Position */
+#define MPU_RASR_ENABLE_Msk                (1UL << MPU_RASR_ENABLE_Pos)                   /*!< MPU RASR: Region enable bit Disable Mask */
+
+/*@} end of group CMSIS_MPU */
+#endif
+
+
+#if (__FPU_PRESENT == 1)
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_FPU     Floating Point Unit (FPU)
+    \brief      Type definitions for the Floating Point Unit (FPU)
+  @{
+ */
+
+/** \brief  Structure type to access the Floating Point Unit (FPU).
+ */
+typedef struct
+{
+       uint32_t RESERVED0[1];
+  __IO uint32_t FPCCR;                   /*!< Offset: 0x004 (R/W)  Floating-Point Context Control Register               */
+  __IO uint32_t FPCAR;                   /*!< Offset: 0x008 (R/W)  Floating-Point Context Address Register               */
+  __IO uint32_t FPDSCR;                  /*!< Offset: 0x00C (R/W)  Floating-Point Default Status Control Register        */
+  __I  uint32_t MVFR0;                   /*!< Offset: 0x010 (R/ )  Media and FP Feature Register 0                       */
+  __I  uint32_t MVFR1;                   /*!< Offset: 0x014 (R/ )  Media and FP Feature Register 1                       */
+} FPU_Type;
+
+/* Floating-Point Context Control Register */
+#define FPU_FPCCR_ASPEN_Pos                31                                             /*!< FPCCR: ASPEN bit Position */
+#define FPU_FPCCR_ASPEN_Msk                (1UL << FPU_FPCCR_ASPEN_Pos)                   /*!< FPCCR: ASPEN bit Mask */
+
+#define FPU_FPCCR_LSPEN_Pos                30                                             /*!< FPCCR: LSPEN Position */
+#define FPU_FPCCR_LSPEN_Msk                (1UL << FPU_FPCCR_LSPEN_Pos)                   /*!< FPCCR: LSPEN bit Mask */
+
+#define FPU_FPCCR_MONRDY_Pos                8                                             /*!< FPCCR: MONRDY Position */
+#define FPU_FPCCR_MONRDY_Msk               (1UL << FPU_FPCCR_MONRDY_Pos)                  /*!< FPCCR: MONRDY bit Mask */
+
+#define FPU_FPCCR_BFRDY_Pos                 6                                             /*!< FPCCR: BFRDY Position */
+#define FPU_FPCCR_BFRDY_Msk                (1UL << FPU_FPCCR_BFRDY_Pos)                   /*!< FPCCR: BFRDY bit Mask */
+
+#define FPU_FPCCR_MMRDY_Pos                 5                                             /*!< FPCCR: MMRDY Position */
+#define FPU_FPCCR_MMRDY_Msk                (1UL << FPU_FPCCR_MMRDY_Pos)                   /*!< FPCCR: MMRDY bit Mask */
+
+#define FPU_FPCCR_HFRDY_Pos                 4                                             /*!< FPCCR: HFRDY Position */
+#define FPU_FPCCR_HFRDY_Msk                (1UL << FPU_FPCCR_HFRDY_Pos)                   /*!< FPCCR: HFRDY bit Mask */
+
+#define FPU_FPCCR_THREAD_Pos                3                                             /*!< FPCCR: processor mode bit Position */
+#define FPU_FPCCR_THREAD_Msk               (1UL << FPU_FPCCR_THREAD_Pos)                  /*!< FPCCR: processor mode active bit Mask */
+
+#define FPU_FPCCR_USER_Pos                  1                                             /*!< FPCCR: privilege level bit Position */
+#define FPU_FPCCR_USER_Msk                 (1UL << FPU_FPCCR_USER_Pos)                    /*!< FPCCR: privilege level bit Mask */
+
+#define FPU_FPCCR_LSPACT_Pos                0                                             /*!< FPCCR: Lazy state preservation active bit Position */
+#define FPU_FPCCR_LSPACT_Msk               (1UL << FPU_FPCCR_LSPACT_Pos)                  /*!< FPCCR: Lazy state preservation active bit Mask */
+
+/* Floating-Point Context Address Register */
+#define FPU_FPCAR_ADDRESS_Pos               3                                             /*!< FPCAR: ADDRESS bit Position */
+#define FPU_FPCAR_ADDRESS_Msk              (0x1FFFFFFFUL << FPU_FPCAR_ADDRESS_Pos)        /*!< FPCAR: ADDRESS bit Mask */
+
+/* Floating-Point Default Status Control Register */
+#define FPU_FPDSCR_AHP_Pos                 26                                             /*!< FPDSCR: AHP bit Position */
+#define FPU_FPDSCR_AHP_Msk                 (1UL << FPU_FPDSCR_AHP_Pos)                    /*!< FPDSCR: AHP bit Mask */
+
+#define FPU_FPDSCR_DN_Pos                  25                                             /*!< FPDSCR: DN bit Position */
+#define FPU_FPDSCR_DN_Msk                  (1UL << FPU_FPDSCR_DN_Pos)                     /*!< FPDSCR: DN bit Mask */
+
+#define FPU_FPDSCR_FZ_Pos                  24                                             /*!< FPDSCR: FZ bit Position */
+#define FPU_FPDSCR_FZ_Msk                  (1UL << FPU_FPDSCR_FZ_Pos)                     /*!< FPDSCR: FZ bit Mask */
+
+#define FPU_FPDSCR_RMode_Pos               22                                             /*!< FPDSCR: RMode bit Position */
+#define FPU_FPDSCR_RMode_Msk               (3UL << FPU_FPDSCR_RMode_Pos)                  /*!< FPDSCR: RMode bit Mask */
+
+/* Media and FP Feature Register 0 */
+#define FPU_MVFR0_FP_rounding_modes_Pos    28                                             /*!< MVFR0: FP rounding modes bits Position */
+#define FPU_MVFR0_FP_rounding_modes_Msk    (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos)     /*!< MVFR0: FP rounding modes bits Mask */
+
+#define FPU_MVFR0_Short_vectors_Pos        24                                             /*!< MVFR0: Short vectors bits Position */
+#define FPU_MVFR0_Short_vectors_Msk        (0xFUL << FPU_MVFR0_Short_vectors_Pos)         /*!< MVFR0: Short vectors bits Mask */
+
+#define FPU_MVFR0_Square_root_Pos          20                                             /*!< MVFR0: Square root bits Position */
+#define FPU_MVFR0_Square_root_Msk          (0xFUL << FPU_MVFR0_Square_root_Pos)           /*!< MVFR0: Square root bits Mask */
+
+#define FPU_MVFR0_Divide_Pos               16                                             /*!< MVFR0: Divide bits Position */
+#define FPU_MVFR0_Divide_Msk               (0xFUL << FPU_MVFR0_Divide_Pos)                /*!< MVFR0: Divide bits Mask */
+
+#define FPU_MVFR0_FP_excep_trapping_Pos    12                                             /*!< MVFR0: FP exception trapping bits Position */
+#define FPU_MVFR0_FP_excep_trapping_Msk    (0xFUL << FPU_MVFR0_FP_excep_trapping_Pos)     /*!< MVFR0: FP exception trapping bits Mask */
+
+#define FPU_MVFR0_Double_precision_Pos      8                                             /*!< MVFR0: Double-precision bits Position */
+#define FPU_MVFR0_Double_precision_Msk     (0xFUL << FPU_MVFR0_Double_precision_Pos)      /*!< MVFR0: Double-precision bits Mask */
+
+#define FPU_MVFR0_Single_precision_Pos      4                                             /*!< MVFR0: Single-precision bits Position */
+#define FPU_MVFR0_Single_precision_Msk     (0xFUL << FPU_MVFR0_Single_precision_Pos)      /*!< MVFR0: Single-precision bits Mask */
+
+#define FPU_MVFR0_A_SIMD_registers_Pos      0                                             /*!< MVFR0: A_SIMD registers bits Position */
+#define FPU_MVFR0_A_SIMD_registers_Msk     (0xFUL << FPU_MVFR0_A_SIMD_registers_Pos)      /*!< MVFR0: A_SIMD registers bits Mask */
+
+/* Media and FP Feature Register 1 */
+#define FPU_MVFR1_FP_fused_MAC_Pos         28                                             /*!< MVFR1: FP fused MAC bits Position */
+#define FPU_MVFR1_FP_fused_MAC_Msk         (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos)          /*!< MVFR1: FP fused MAC bits Mask */
+
+#define FPU_MVFR1_FP_HPFP_Pos              24                                             /*!< MVFR1: FP HPFP bits Position */
+#define FPU_MVFR1_FP_HPFP_Msk              (0xFUL << FPU_MVFR1_FP_HPFP_Pos)               /*!< MVFR1: FP HPFP bits Mask */
+
+#define FPU_MVFR1_D_NaN_mode_Pos            4                                             /*!< MVFR1: D_NaN mode bits Position */
+#define FPU_MVFR1_D_NaN_mode_Msk           (0xFUL << FPU_MVFR1_D_NaN_mode_Pos)            /*!< MVFR1: D_NaN mode bits Mask */
+
+#define FPU_MVFR1_FtZ_mode_Pos              0                                             /*!< MVFR1: FtZ mode bits Position */
+#define FPU_MVFR1_FtZ_mode_Msk             (0xFUL << FPU_MVFR1_FtZ_mode_Pos)              /*!< MVFR1: FtZ mode bits Mask */
+
+/*@} end of group CMSIS_FPU */
+#endif
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_CoreDebug       Core Debug Registers (CoreDebug)
+    \brief      Type definitions for the Core Debug Registers
+  @{
+ */
+
+/** \brief  Structure type to access the Core Debug Register (CoreDebug).
+ */
+typedef struct
+{
+  __IO uint32_t DHCSR;                   /*!< Offset: 0x000 (R/W)  Debug Halting Control and Status Register    */
+  __O  uint32_t DCRSR;                   /*!< Offset: 0x004 ( /W)  Debug Core Register Selector Register        */
+  __IO uint32_t DCRDR;                   /*!< Offset: 0x008 (R/W)  Debug Core Register Data Register            */
+  __IO uint32_t DEMCR;                   /*!< Offset: 0x00C (R/W)  Debug Exception and Monitor Control Register */
+} CoreDebug_Type;
+
+/* Debug Halting Control and Status Register */
+#define CoreDebug_DHCSR_DBGKEY_Pos         16                                             /*!< CoreDebug DHCSR: DBGKEY Position */
+#define CoreDebug_DHCSR_DBGKEY_Msk         (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos)       /*!< CoreDebug DHCSR: DBGKEY Mask */
+
+#define CoreDebug_DHCSR_S_RESET_ST_Pos     25                                             /*!< CoreDebug DHCSR: S_RESET_ST Position */
+#define CoreDebug_DHCSR_S_RESET_ST_Msk     (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos)        /*!< CoreDebug DHCSR: S_RESET_ST Mask */
+
+#define CoreDebug_DHCSR_S_RETIRE_ST_Pos    24                                             /*!< CoreDebug DHCSR: S_RETIRE_ST Position */
+#define CoreDebug_DHCSR_S_RETIRE_ST_Msk    (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos)       /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */
+
+#define CoreDebug_DHCSR_S_LOCKUP_Pos       19                                             /*!< CoreDebug DHCSR: S_LOCKUP Position */
+#define CoreDebug_DHCSR_S_LOCKUP_Msk       (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos)          /*!< CoreDebug DHCSR: S_LOCKUP Mask */
+
+#define CoreDebug_DHCSR_S_SLEEP_Pos        18                                             /*!< CoreDebug DHCSR: S_SLEEP Position */
+#define CoreDebug_DHCSR_S_SLEEP_Msk        (1UL << CoreDebug_DHCSR_S_SLEEP_Pos)           /*!< CoreDebug DHCSR: S_SLEEP Mask */
+
+#define CoreDebug_DHCSR_S_HALT_Pos         17                                             /*!< CoreDebug DHCSR: S_HALT Position */
+#define CoreDebug_DHCSR_S_HALT_Msk         (1UL << CoreDebug_DHCSR_S_HALT_Pos)            /*!< CoreDebug DHCSR: S_HALT Mask */
+
+#define CoreDebug_DHCSR_S_REGRDY_Pos       16                                             /*!< CoreDebug DHCSR: S_REGRDY Position */
+#define CoreDebug_DHCSR_S_REGRDY_Msk       (1UL << CoreDebug_DHCSR_S_REGRDY_Pos)          /*!< CoreDebug DHCSR: S_REGRDY Mask */
+
+#define CoreDebug_DHCSR_C_SNAPSTALL_Pos     5                                             /*!< CoreDebug DHCSR: C_SNAPSTALL Position */
+#define CoreDebug_DHCSR_C_SNAPSTALL_Msk    (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos)       /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */
+
+#define CoreDebug_DHCSR_C_MASKINTS_Pos      3                                             /*!< CoreDebug DHCSR: C_MASKINTS Position */
+#define CoreDebug_DHCSR_C_MASKINTS_Msk     (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos)        /*!< CoreDebug DHCSR: C_MASKINTS Mask */
+
+#define CoreDebug_DHCSR_C_STEP_Pos          2                                             /*!< CoreDebug DHCSR: C_STEP Position */
+#define CoreDebug_DHCSR_C_STEP_Msk         (1UL << CoreDebug_DHCSR_C_STEP_Pos)            /*!< CoreDebug DHCSR: C_STEP Mask */
+
+#define CoreDebug_DHCSR_C_HALT_Pos          1                                             /*!< CoreDebug DHCSR: C_HALT Position */
+#define CoreDebug_DHCSR_C_HALT_Msk         (1UL << CoreDebug_DHCSR_C_HALT_Pos)            /*!< CoreDebug DHCSR: C_HALT Mask */
+
+#define CoreDebug_DHCSR_C_DEBUGEN_Pos       0                                             /*!< CoreDebug DHCSR: C_DEBUGEN Position */
+#define CoreDebug_DHCSR_C_DEBUGEN_Msk      (1UL << CoreDebug_DHCSR_C_DEBUGEN_Pos)         /*!< CoreDebug DHCSR: C_DEBUGEN Mask */
+
+/* Debug Core Register Selector Register */
+#define CoreDebug_DCRSR_REGWnR_Pos         16                                             /*!< CoreDebug DCRSR: REGWnR Position */
+#define CoreDebug_DCRSR_REGWnR_Msk         (1UL << CoreDebug_DCRSR_REGWnR_Pos)            /*!< CoreDebug DCRSR: REGWnR Mask */
+
+#define CoreDebug_DCRSR_REGSEL_Pos          0                                             /*!< CoreDebug DCRSR: REGSEL Position */
+#define CoreDebug_DCRSR_REGSEL_Msk         (0x1FUL << CoreDebug_DCRSR_REGSEL_Pos)         /*!< CoreDebug DCRSR: REGSEL Mask */
+
+/* Debug Exception and Monitor Control Register */
+#define CoreDebug_DEMCR_TRCENA_Pos         24                                             /*!< CoreDebug DEMCR: TRCENA Position */
+#define CoreDebug_DEMCR_TRCENA_Msk         (1UL << CoreDebug_DEMCR_TRCENA_Pos)            /*!< CoreDebug DEMCR: TRCENA Mask */
+
+#define CoreDebug_DEMCR_MON_REQ_Pos        19                                             /*!< CoreDebug DEMCR: MON_REQ Position */
+#define CoreDebug_DEMCR_MON_REQ_Msk        (1UL << CoreDebug_DEMCR_MON_REQ_Pos)           /*!< CoreDebug DEMCR: MON_REQ Mask */
+
+#define CoreDebug_DEMCR_MON_STEP_Pos       18                                             /*!< CoreDebug DEMCR: MON_STEP Position */
+#define CoreDebug_DEMCR_MON_STEP_Msk       (1UL << CoreDebug_DEMCR_MON_STEP_Pos)          /*!< CoreDebug DEMCR: MON_STEP Mask */
+
+#define CoreDebug_DEMCR_MON_PEND_Pos       17                                             /*!< CoreDebug DEMCR: MON_PEND Position */
+#define CoreDebug_DEMCR_MON_PEND_Msk       (1UL << CoreDebug_DEMCR_MON_PEND_Pos)          /*!< CoreDebug DEMCR: MON_PEND Mask */
+
+#define CoreDebug_DEMCR_MON_EN_Pos         16                                             /*!< CoreDebug DEMCR: MON_EN Position */
+#define CoreDebug_DEMCR_MON_EN_Msk         (1UL << CoreDebug_DEMCR_MON_EN_Pos)            /*!< CoreDebug DEMCR: MON_EN Mask */
+
+#define CoreDebug_DEMCR_VC_HARDERR_Pos     10                                             /*!< CoreDebug DEMCR: VC_HARDERR Position */
+#define CoreDebug_DEMCR_VC_HARDERR_Msk     (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos)        /*!< CoreDebug DEMCR: VC_HARDERR Mask */
+
+#define CoreDebug_DEMCR_VC_INTERR_Pos       9                                             /*!< CoreDebug DEMCR: VC_INTERR Position */
+#define CoreDebug_DEMCR_VC_INTERR_Msk      (1UL << CoreDebug_DEMCR_VC_INTERR_Pos)         /*!< CoreDebug DEMCR: VC_INTERR Mask */
+
+#define CoreDebug_DEMCR_VC_BUSERR_Pos       8                                             /*!< CoreDebug DEMCR: VC_BUSERR Position */
+#define CoreDebug_DEMCR_VC_BUSERR_Msk      (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos)         /*!< CoreDebug DEMCR: VC_BUSERR Mask */
+
+#define CoreDebug_DEMCR_VC_STATERR_Pos      7                                             /*!< CoreDebug DEMCR: VC_STATERR Position */
+#define CoreDebug_DEMCR_VC_STATERR_Msk     (1UL << CoreDebug_DEMCR_VC_STATERR_Pos)        /*!< CoreDebug DEMCR: VC_STATERR Mask */
+
+#define CoreDebug_DEMCR_VC_CHKERR_Pos       6                                             /*!< CoreDebug DEMCR: VC_CHKERR Position */
+#define CoreDebug_DEMCR_VC_CHKERR_Msk      (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos)         /*!< CoreDebug DEMCR: VC_CHKERR Mask */
+
+#define CoreDebug_DEMCR_VC_NOCPERR_Pos      5                                             /*!< CoreDebug DEMCR: VC_NOCPERR Position */
+#define CoreDebug_DEMCR_VC_NOCPERR_Msk     (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos)        /*!< CoreDebug DEMCR: VC_NOCPERR Mask */
+
+#define CoreDebug_DEMCR_VC_MMERR_Pos        4                                             /*!< CoreDebug DEMCR: VC_MMERR Position */
+#define CoreDebug_DEMCR_VC_MMERR_Msk       (1UL << CoreDebug_DEMCR_VC_MMERR_Pos)          /*!< CoreDebug DEMCR: VC_MMERR Mask */
+
+#define CoreDebug_DEMCR_VC_CORERESET_Pos    0                                             /*!< CoreDebug DEMCR: VC_CORERESET Position */
+#define CoreDebug_DEMCR_VC_CORERESET_Msk   (1UL << CoreDebug_DEMCR_VC_CORERESET_Pos)      /*!< CoreDebug DEMCR: VC_CORERESET Mask */
+
+/*@} end of group CMSIS_CoreDebug */
+
+
+/** \ingroup    CMSIS_core_register
+    \defgroup   CMSIS_core_base     Core Definitions
+    \brief      Definitions for base addresses, unions, and structures.
+  @{
+ */
+
+/* Memory mapping of Cortex-M4 Hardware */
+#define SCS_BASE            (0xE000E000UL)                            /*!< System Control Space Base Address  */
+#define ITM_BASE            (0xE0000000UL)                            /*!< ITM Base Address                   */
+#define DWT_BASE            (0xE0001000UL)                            /*!< DWT Base Address                   */
+#define TPI_BASE            (0xE0040000UL)                            /*!< TPI Base Address                   */
+#define CoreDebug_BASE      (0xE000EDF0UL)                            /*!< Core Debug Base Address            */
+#define SysTick_BASE        (SCS_BASE +  0x0010UL)                    /*!< SysTick Base Address               */
+#define NVIC_BASE           (SCS_BASE +  0x0100UL)                    /*!< NVIC Base Address                  */
+#define SCB_BASE            (SCS_BASE +  0x0D00UL)                    /*!< System Control Block Base Address  */
+
+#define SCnSCB              ((SCnSCB_Type    *)     SCS_BASE      )   /*!< System control Register not in SCB */
+#define SCB                 ((SCB_Type       *)     SCB_BASE      )   /*!< SCB configuration struct           */
+#define SysTick             ((SysTick_Type   *)     SysTick_BASE  )   /*!< SysTick configuration struct       */
+#define NVIC                ((NVIC_Type      *)     NVIC_BASE     )   /*!< NVIC configuration struct          */
+#define ITM                 ((ITM_Type       *)     ITM_BASE      )   /*!< ITM configuration struct           */
+#define DWT                 ((DWT_Type       *)     DWT_BASE      )   /*!< DWT configuration struct           */
+#define TPI                 ((TPI_Type       *)     TPI_BASE      )   /*!< TPI configuration struct           */
+#define CoreDebug           ((CoreDebug_Type *)     CoreDebug_BASE)   /*!< Core Debug configuration struct    */
+
+#if (__MPU_PRESENT == 1)
+  #define MPU_BASE          (SCS_BASE +  0x0D90UL)                    /*!< Memory Protection Unit             */
+  #define MPU               ((MPU_Type       *)     MPU_BASE      )   /*!< Memory Protection Unit             */
+#endif
+
+#if (__FPU_PRESENT == 1)
+  #define FPU_BASE          (SCS_BASE +  0x0F30UL)                    /*!< Floating Point Unit                */
+  #define FPU               ((FPU_Type       *)     FPU_BASE      )   /*!< Floating Point Unit                */
+#endif
+
+/*@} */
+
+
+
+/*******************************************************************************
+ *                Hardware Abstraction Layer
+  Core Function Interface contains:
+  - Core NVIC Functions
+  - Core SysTick Functions
+  - Core Debug Functions
+  - Core Register Access Functions
+ ******************************************************************************/
+/** \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference
+*/
+
+
+
+/* ##########################   NVIC functions  #################################### */
+/** \ingroup  CMSIS_Core_FunctionInterface
+    \defgroup CMSIS_Core_NVICFunctions NVIC Functions
+    \brief      Functions that manage interrupts and exceptions via the NVIC.
+    @{
+ */
+
+/** \brief  Set Priority Grouping
+
+  The function sets the priority grouping field using the required unlock sequence.
+  The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field.
+  Only values from 0..7 are used.
+  In case of a conflict between priority grouping and available
+  priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set.
+
+    \param [in]      PriorityGroup  Priority grouping field.
+ */
+__STATIC_INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
+{
+  uint32_t reg_value;
+  uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07);               /* only values 0..7 are used          */
+
+  reg_value  =  SCB->AIRCR;                                                   /* read old register configuration    */
+  reg_value &= ~(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk);             /* clear bits to change               */
+  reg_value  =  (reg_value                                 |
+                ((uint32_t)0x5FA << SCB_AIRCR_VECTKEY_Pos) |
+                (PriorityGroupTmp << 8));                                     /* Insert write key and priorty group */
+  SCB->AIRCR =  reg_value;
+}
+
+
+/** \brief  Get Priority Grouping
+
+  The function reads the priority grouping field from the NVIC Interrupt Controller.
+
+    \return                Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field).
+ */
+__STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void)
+{
+  return ((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos);   /* read priority grouping field */
+}
+
+
+/** \brief  Enable External Interrupt
+
+    The function enables a device-specific interrupt in the NVIC interrupt controller.
+
+    \param [in]      IRQn  External interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
+{
+/*  NVIC->ISER[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F));  enable interrupt */
+  NVIC->ISER[(uint32_t)((int32_t)IRQn) >> 5] = (uint32_t)(1 << ((uint32_t)((int32_t)IRQn) & (uint32_t)0x1F)); /* enable interrupt */
+}
+
+
+/** \brief  Disable External Interrupt
+
+    The function disables a device-specific interrupt in the NVIC interrupt controller.
+
+    \param [in]      IRQn  External interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_DisableIRQ(IRQn_Type IRQn)
+{
+  NVIC->ICER[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* disable interrupt */
+}
+
+
+/** \brief  Get Pending Interrupt
+
+    The function reads the pending register in the NVIC and returns the pending bit
+    for the specified interrupt.
+
+    \param [in]      IRQn  Interrupt number.
+
+    \return             0  Interrupt status is not pending.
+    \return             1  Interrupt status is pending.
+ */
+__STATIC_INLINE uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
+{
+  return((uint32_t) ((NVIC->ISPR[(uint32_t)(IRQn) >> 5] & (1 << ((uint32_t)(IRQn) & 0x1F)))?1:0)); /* Return 1 if pending else 0 */
+}
+
+
+/** \brief  Set Pending Interrupt
+
+    The function sets the pending bit of an external interrupt.
+
+    \param [in]      IRQn  Interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_SetPendingIRQ(IRQn_Type IRQn)
+{
+  NVIC->ISPR[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* set interrupt pending */
+}
+
+
+/** \brief  Clear Pending Interrupt
+
+    The function clears the pending bit of an external interrupt.
+
+    \param [in]      IRQn  External interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
+{
+  NVIC->ICPR[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); /* Clear pending interrupt */
+}
+
+
+/** \brief  Get Active Interrupt
+
+    The function reads the active register in NVIC and returns the active bit.
+
+    \param [in]      IRQn  Interrupt number.
+
+    \return             0  Interrupt status is not active.
+    \return             1  Interrupt status is active.
+ */
+__STATIC_INLINE uint32_t NVIC_GetActive(IRQn_Type IRQn)
+{
+  return((uint32_t)((NVIC->IABR[(uint32_t)(IRQn) >> 5] & (1 << ((uint32_t)(IRQn) & 0x1F)))?1:0)); /* Return 1 if active else 0 */
+}
+
+
+/** \brief  Set Interrupt Priority
+
+    The function sets the priority of an interrupt.
+
+    \note The priority cannot be set for every core interrupt.
+
+    \param [in]      IRQn  Interrupt number.
+    \param [in]  priority  Priority to set.
+ */
+__STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
+{
+  if(IRQn < 0) {
+    SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for Cortex-M  System Interrupts */
+  else {
+    NVIC->IP[(uint32_t)(IRQn)] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff);    }        /* set Priority for device specific Interrupts  */
+}
+
+
+/** \brief  Get Interrupt Priority
+
+    The function reads the priority of an interrupt. The interrupt
+    number can be positive to specify an external (device specific)
+    interrupt, or negative to specify an internal (core) interrupt.
+
+
+    \param [in]   IRQn  Interrupt number.
+    \return             Interrupt Priority. Value is aligned automatically to the implemented
+                        priority bits of the microcontroller.
+ */
+__STATIC_INLINE uint32_t NVIC_GetPriority(IRQn_Type IRQn)
+{
+
+  if(IRQn < 0) {
+    return((uint32_t)(SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] >> (8 - __NVIC_PRIO_BITS)));  } /* get priority for Cortex-M  system interrupts */
+  else {
+    return((uint32_t)(NVIC->IP[(uint32_t)(IRQn)]           >> (8 - __NVIC_PRIO_BITS)));  } /* get priority for device specific interrupts  */
+}
+
+
+/** \brief  Encode Priority
+
+    The function encodes the priority for an interrupt with the given priority group,
+    preemptive priority value, and subpriority value.
+    In case of a conflict between priority grouping and available
+    priority bits (__NVIC_PRIO_BITS), the samllest possible priority group is set.
+
+    \param [in]     PriorityGroup  Used priority group.
+    \param [in]   PreemptPriority  Preemptive priority value (starting from 0).
+    \param [in]       SubPriority  Subpriority value (starting from 0).
+    \return                        Encoded priority. Value can be used in the function \ref NVIC_SetPriority().
+ */
+__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)
+{
+  uint32_t PriorityGroupTmp = (PriorityGroup & 0x07);          /* only values 0..7 are used          */
+  uint32_t PreemptPriorityBits;
+  uint32_t SubPriorityBits;
+
+  PreemptPriorityBits = ((7 - PriorityGroupTmp) > __NVIC_PRIO_BITS) ? __NVIC_PRIO_BITS : 7 - PriorityGroupTmp;
+  SubPriorityBits     = ((PriorityGroupTmp + __NVIC_PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + __NVIC_PRIO_BITS;
+
+  return (
+           ((PreemptPriority & ((1 << (PreemptPriorityBits)) - 1)) << SubPriorityBits) |
+           ((SubPriority     & ((1 << (SubPriorityBits    )) - 1)))
+         );
+}
+
+
+/** \brief  Decode Priority
+
+    The function decodes an interrupt priority value with a given priority group to
+    preemptive priority value and subpriority value.
+    In case of a conflict between priority grouping and available
+    priority bits (__NVIC_PRIO_BITS) the samllest possible priority group is set.
+
+    \param [in]         Priority   Priority value, which can be retrieved with the function \ref NVIC_GetPriority().
+    \param [in]     PriorityGroup  Used priority group.
+    \param [out] pPreemptPriority  Preemptive priority value (starting from 0).
+    \param [out]     pSubPriority  Subpriority value (starting from 0).
+ */
+__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority)
+{
+  uint32_t PriorityGroupTmp = (PriorityGroup & 0x07);          /* only values 0..7 are used          */
+  uint32_t PreemptPriorityBits;
+  uint32_t SubPriorityBits;
+
+  PreemptPriorityBits = ((7 - PriorityGroupTmp) > __NVIC_PRIO_BITS) ? __NVIC_PRIO_BITS : 7 - PriorityGroupTmp;
+  SubPriorityBits     = ((PriorityGroupTmp + __NVIC_PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + __NVIC_PRIO_BITS;
+
+  *pPreemptPriority = (Priority >> SubPriorityBits) & ((1 << (PreemptPriorityBits)) - 1);
+  *pSubPriority     = (Priority                   ) & ((1 << (SubPriorityBits    )) - 1);
+}
+
+
+/** \brief  System Reset
+
+    The function initiates a system reset request to reset the MCU.
+ */
+__STATIC_INLINE void NVIC_SystemReset(void)
+{
+  __DSB();                                                     /* Ensure all outstanding memory accesses included
+                                                                  buffered write are completed before reset */
+  SCB->AIRCR  = ((0x5FA << SCB_AIRCR_VECTKEY_Pos)      |
+                 (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) |
+                 SCB_AIRCR_SYSRESETREQ_Msk);                   /* Keep priority group unchanged */
+  __DSB();                                                     /* Ensure completion of memory access */
+  while(1);                                                    /* wait until reset */
+}
+
+/*@} end of CMSIS_Core_NVICFunctions */
+
+
+
+/* ##################################    SysTick function  ############################################ */
+/** \ingroup  CMSIS_Core_FunctionInterface
+    \defgroup CMSIS_Core_SysTickFunctions SysTick Functions
+    \brief      Functions that configure the System.
+  @{
+ */
+
+#if (__Vendor_SysTickConfig == 0)
+
+/** \brief  System Tick Configuration
+
+    The function initializes the System Timer and its interrupt, and starts the System Tick Timer.
+    Counter is in free running mode to generate periodic interrupts.
+
+    \param [in]  ticks  Number of ticks between two interrupts.
+
+    \return          0  Function succeeded.
+    \return          1  Function failed.
+
+    \note     When the variable <b>__Vendor_SysTickConfig</b> is set to 1, then the
+    function <b>SysTick_Config</b> is not included. In this case, the file <b><i>device</i>.h</b>
+    must contain a vendor-specific implementation of this function.
+
+ */
+__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
+{
+  if ((ticks - 1) > SysTick_LOAD_RELOAD_Msk)  return (1);      /* Reload value impossible */
+
+  SysTick->LOAD  = ticks - 1;                                  /* set reload register */
+  NVIC_SetPriority (SysTick_IRQn, (1<<__NVIC_PRIO_BITS) - 1);  /* set Priority for Systick Interrupt */
+  SysTick->VAL   = 0;                                          /* Load the SysTick Counter Value */
+  SysTick->CTRL  = SysTick_CTRL_CLKSOURCE_Msk |
+                   SysTick_CTRL_TICKINT_Msk   |
+                   SysTick_CTRL_ENABLE_Msk;                    /* Enable SysTick IRQ and SysTick Timer */
+  return (0);                                                  /* Function successful */
+}
+
+#endif
+
+/*@} end of CMSIS_Core_SysTickFunctions */
+
+
+
+/* ##################################### Debug In/Output function ########################################### */
+/** \ingroup  CMSIS_Core_FunctionInterface
+    \defgroup CMSIS_core_DebugFunctions ITM Functions
+    \brief   Functions that access the ITM debug interface.
+  @{
+ */
+
+extern volatile int32_t ITM_RxBuffer;                    /*!< External variable to receive characters.                         */
+#define                 ITM_RXBUFFER_EMPTY    0x5AA55AA5 /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */
+
+
+/** \brief  ITM Send Character
+
+    The function transmits a character via the ITM channel 0, and
+    \li Just returns when no debugger is connected that has booked the output.
+    \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted.
+
+    \param [in]     ch  Character to transmit.
+
+    \returns            Character to transmit.
+ */
+__STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch)
+{
+  if ((ITM->TCR & ITM_TCR_ITMENA_Msk)                  &&      /* ITM enabled */
+      (ITM->TER & (1UL << 0)        )                    )     /* ITM Port #0 enabled */
+  {
+    while (ITM->PORT[0].u32 == 0);
+    ITM->PORT[0].u8 = (uint8_t) ch;
+  }
+  return (ch);
+}
+
+
+/** \brief  ITM Receive Character
+
+    The function inputs a character via the external variable \ref ITM_RxBuffer.
+
+    \return             Received character.
+    \return         -1  No character pending.
+ */
+__STATIC_INLINE int32_t ITM_ReceiveChar (void) {
+  int32_t ch = -1;                           /* no character available */
+
+  if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) {
+    ch = ITM_RxBuffer;
+    ITM_RxBuffer = ITM_RXBUFFER_EMPTY;       /* ready for next character */
+  }
+
+  return (ch);
+}
+
+
+/** \brief  ITM Check Character
+
+    The function checks whether a character is pending for reading in the variable \ref ITM_RxBuffer.
+
+    \return          0  No character available.
+    \return          1  Character available.
+ */
+__STATIC_INLINE int32_t ITM_CheckChar (void) {
+
+  if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) {
+    return (0);                                 /* no character available */
+  } else {
+    return (1);                                 /*    character available */
+  }
+}
+
+/*@} end of CMSIS_core_DebugFunctions */
+
+#endif /* __CORE_CM4_H_DEPENDANT */
+
+#endif /* __CMSIS_GENERIC */
+
+#ifdef __cplusplus
+}
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cm4_simd.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cm4_simd.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cm4_simd.h	(revision 270)
@@ -0,0 +1,673 @@
+/**************************************************************************//**
+ * @file     core_cm4_simd.h
+ * @brief    CMSIS Cortex-M4 SIMD Header File
+ * @version  V3.20
+ * @date     25. February 2013
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2009 - 2013 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+#ifndef __CORE_CM4_SIMD_H
+#define __CORE_CM4_SIMD_H
+
+
+/*******************************************************************************
+ *                Hardware Abstraction Layer
+ ******************************************************************************/
+
+
+/* ###################  Compiler specific Intrinsics  ########################### */
+/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics
+  Access to dedicated SIMD instructions
+  @{
+*/
+
+#if   defined ( __CC_ARM ) /*------------------RealView Compiler -----------------*/
+/* ARM armcc specific functions */
+
+/*------ CM4 SIMD Intrinsics -----------------------------------------------------*/
+#define __SADD8                           __sadd8
+#define __QADD8                           __qadd8
+#define __SHADD8                          __shadd8
+#define __UADD8                           __uadd8
+#define __UQADD8                          __uqadd8
+#define __UHADD8                          __uhadd8
+#define __SSUB8                           __ssub8
+#define __QSUB8                           __qsub8
+#define __SHSUB8                          __shsub8
+#define __USUB8                           __usub8
+#define __UQSUB8                          __uqsub8
+#define __UHSUB8                          __uhsub8
+#define __SADD16                          __sadd16
+#define __QADD16                          __qadd16
+#define __SHADD16                         __shadd16
+#define __UADD16                          __uadd16
+#define __UQADD16                         __uqadd16
+#define __UHADD16                         __uhadd16
+#define __SSUB16                          __ssub16
+#define __QSUB16                          __qsub16
+#define __SHSUB16                         __shsub16
+#define __USUB16                          __usub16
+#define __UQSUB16                         __uqsub16
+#define __UHSUB16                         __uhsub16
+#define __SASX                            __sasx
+#define __QASX                            __qasx
+#define __SHASX                           __shasx
+#define __UASX                            __uasx
+#define __UQASX                           __uqasx
+#define __UHASX                           __uhasx
+#define __SSAX                            __ssax
+#define __QSAX                            __qsax
+#define __SHSAX                           __shsax
+#define __USAX                            __usax
+#define __UQSAX                           __uqsax
+#define __UHSAX                           __uhsax
+#define __USAD8                           __usad8
+#define __USADA8                          __usada8
+#define __SSAT16                          __ssat16
+#define __USAT16                          __usat16
+#define __UXTB16                          __uxtb16
+#define __UXTAB16                         __uxtab16
+#define __SXTB16                          __sxtb16
+#define __SXTAB16                         __sxtab16
+#define __SMUAD                           __smuad
+#define __SMUADX                          __smuadx
+#define __SMLAD                           __smlad
+#define __SMLADX                          __smladx
+#define __SMLALD                          __smlald
+#define __SMLALDX                         __smlaldx
+#define __SMUSD                           __smusd
+#define __SMUSDX                          __smusdx
+#define __SMLSD                           __smlsd
+#define __SMLSDX                          __smlsdx
+#define __SMLSLD                          __smlsld
+#define __SMLSLDX                         __smlsldx
+#define __SEL                             __sel
+#define __QADD                            __qadd
+#define __QSUB                            __qsub
+
+#define __PKHBT(ARG1,ARG2,ARG3)          ( ((((uint32_t)(ARG1))          ) & 0x0000FFFFUL) |  \
+                                           ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL)  )
+
+#define __PKHTB(ARG1,ARG2,ARG3)          ( ((((uint32_t)(ARG1))          ) & 0xFFFF0000UL) |  \
+                                           ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL)  )
+
+#define __SMMLA(ARG1,ARG2,ARG3)          ( (int32_t)((((int64_t)(ARG1) * (ARG2)) + \
+                                                      ((int64_t)(ARG3) << 32)      ) >> 32))
+
+/*-- End CM4 SIMD Intrinsics -----------------------------------------------------*/
+
+
+
+#elif defined ( __ICCARM__ ) /*------------------ ICC Compiler -------------------*/
+/* IAR iccarm specific functions */
+
+/*------ CM4 SIMD Intrinsics -----------------------------------------------------*/
+#include <cmsis_iar.h>
+
+/*-- End CM4 SIMD Intrinsics -----------------------------------------------------*/
+
+
+
+#elif defined ( __TMS470__ ) /*---------------- TI CCS Compiler ------------------*/
+/* TI CCS specific functions */
+
+/*------ CM4 SIMD Intrinsics -----------------------------------------------------*/
+#include <cmsis_ccs.h>
+
+/*-- End CM4 SIMD Intrinsics -----------------------------------------------------*/
+
+
+
+#elif defined ( __GNUC__ ) /*------------------ GNU Compiler ---------------------*/
+/* GNU gcc specific functions */
+
+/*------ CM4 SIMD Intrinsics -----------------------------------------------------*/
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SADD8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("sadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QADD8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("qadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SHADD8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("shadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UADD8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UQADD8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uqadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UHADD8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uhadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SSUB8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("ssub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QSUB8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("qsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SHSUB8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("shsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __USUB8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("usub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UQSUB8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uqsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UHSUB8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uhsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SADD16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("sadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QADD16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("qadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SHADD16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("shadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UADD16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UQADD16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uqadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UHADD16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uhadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SSUB16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("ssub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QSUB16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("qsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SHSUB16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("shsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __USUB16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("usub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UQSUB16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uqsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UHSUB16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uhsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SASX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("sasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QASX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("qasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SHASX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("shasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UASX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UQASX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uqasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UHASX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uhasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SSAX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("ssax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QSAX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("qsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SHSAX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("shsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __USAX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("usax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UQSAX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uqsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UHSAX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uhsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __USAD8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("usad8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __USADA8(uint32_t op1, uint32_t op2, uint32_t op3)
+{
+  uint32_t result;
+
+  __ASM volatile ("usada8 %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
+  return(result);
+}
+
+#define __SSAT16(ARG1,ARG2) \
+({                          \
+  uint32_t __RES, __ARG1 = (ARG1); \
+  __ASM ("ssat16 %0, %1, %2" : "=r" (__RES) :  "I" (ARG2), "r" (__ARG1) ); \
+  __RES; \
+ })
+
+#define __USAT16(ARG1,ARG2) \
+({                          \
+  uint32_t __RES, __ARG1 = (ARG1); \
+  __ASM ("usat16 %0, %1, %2" : "=r" (__RES) :  "I" (ARG2), "r" (__ARG1) ); \
+  __RES; \
+ })
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UXTB16(uint32_t op1)
+{
+  uint32_t result;
+
+  __ASM volatile ("uxtb16 %0, %1" : "=r" (result) : "r" (op1));
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UXTAB16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SXTB16(uint32_t op1)
+{
+  uint32_t result;
+
+  __ASM volatile ("sxtb16 %0, %1" : "=r" (result) : "r" (op1));
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SXTAB16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("sxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMUAD  (uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("smuad %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMUADX (uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("smuadx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMLAD (uint32_t op1, uint32_t op2, uint32_t op3)
+{
+  uint32_t result;
+
+  __ASM volatile ("smlad %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMLADX (uint32_t op1, uint32_t op2, uint32_t op3)
+{
+  uint32_t result;
+
+  __ASM volatile ("smladx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
+  return(result);
+}
+
+#define __SMLALD(ARG1,ARG2,ARG3) \
+({ \
+  uint32_t __ARG1 = (ARG1), __ARG2 = (ARG2), __ARG3_H = (uint32_t)((uint64_t)(ARG3) >> 32), __ARG3_L = (uint32_t)((uint64_t)(ARG3) & 0xFFFFFFFFUL); \
+  __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (__ARG3_L), "=r" (__ARG3_H) : "r" (__ARG1), "r" (__ARG2), "0" (__ARG3_L), "1" (__ARG3_H) ); \
+  (uint64_t)(((uint64_t)__ARG3_H << 32) | __ARG3_L); \
+ })
+
+#define __SMLALDX(ARG1,ARG2,ARG3) \
+({ \
+  uint32_t __ARG1 = (ARG1), __ARG2 = (ARG2), __ARG3_H = (uint32_t)((uint64_t)(ARG3) >> 32), __ARG3_L = (uint32_t)((uint64_t)(ARG3) & 0xFFFFFFFFUL); \
+  __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (__ARG3_L), "=r" (__ARG3_H) : "r" (__ARG1), "r" (__ARG2), "0" (__ARG3_L), "1" (__ARG3_H) ); \
+  (uint64_t)(((uint64_t)__ARG3_H << 32) | __ARG3_L); \
+ })
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMUSD  (uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("smusd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMUSDX (uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("smusdx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMLSD (uint32_t op1, uint32_t op2, uint32_t op3)
+{
+  uint32_t result;
+
+  __ASM volatile ("smlsd %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMLSDX (uint32_t op1, uint32_t op2, uint32_t op3)
+{
+  uint32_t result;
+
+  __ASM volatile ("smlsdx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
+  return(result);
+}
+
+#define __SMLSLD(ARG1,ARG2,ARG3) \
+({ \
+  uint32_t __ARG1 = (ARG1), __ARG2 = (ARG2), __ARG3_H = (uint32_t)((ARG3) >> 32), __ARG3_L = (uint32_t)((ARG3) & 0xFFFFFFFFUL); \
+  __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (__ARG3_L), "=r" (__ARG3_H) : "r" (__ARG1), "r" (__ARG2), "0" (__ARG3_L), "1" (__ARG3_H) ); \
+  (uint64_t)(((uint64_t)__ARG3_H << 32) | __ARG3_L); \
+ })
+
+#define __SMLSLDX(ARG1,ARG2,ARG3) \
+({ \
+  uint32_t __ARG1 = (ARG1), __ARG2 = (ARG2), __ARG3_H = (uint32_t)((ARG3) >> 32), __ARG3_L = (uint32_t)((ARG3) & 0xFFFFFFFFUL); \
+  __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (__ARG3_L), "=r" (__ARG3_H) : "r" (__ARG1), "r" (__ARG2), "0" (__ARG3_L), "1" (__ARG3_H) ); \
+  (uint64_t)(((uint64_t)__ARG3_H << 32) | __ARG3_L); \
+ })
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SEL  (uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("sel %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QADD(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("qadd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QSUB(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("qsub %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+#define __PKHBT(ARG1,ARG2,ARG3) \
+({                          \
+  uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \
+  __ASM ("pkhbt %0, %1, %2, lsl %3" : "=r" (__RES) :  "r" (__ARG1), "r" (__ARG2), "I" (ARG3)  ); \
+  __RES; \
+ })
+
+#define __PKHTB(ARG1,ARG2,ARG3) \
+({                          \
+  uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \
+  if (ARG3 == 0) \
+    __ASM ("pkhtb %0, %1, %2" : "=r" (__RES) :  "r" (__ARG1), "r" (__ARG2)  ); \
+  else \
+    __ASM ("pkhtb %0, %1, %2, asr %3" : "=r" (__RES) :  "r" (__ARG1), "r" (__ARG2), "I" (ARG3)  ); \
+  __RES; \
+ })
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMMLA (int32_t op1, int32_t op2, int32_t op3)
+{
+ int32_t result;
+
+ __ASM volatile ("smmla %0, %1, %2, %3" : "=r" (result): "r"  (op1), "r" (op2), "r" (op3) );
+ return(result);
+}
+
+/*-- End CM4 SIMD Intrinsics -----------------------------------------------------*/
+
+
+
+#elif defined ( __TASKING__ ) /*------------------ TASKING Compiler --------------*/
+/* TASKING carm specific functions */
+
+
+/*------ CM4 SIMD Intrinsics -----------------------------------------------------*/
+/* not yet supported */
+/*-- End CM4 SIMD Intrinsics -----------------------------------------------------*/
+
+
+#endif
+
+/*@} end of group CMSIS_SIMD_intrinsics */
+
+
+#endif /* __CORE_CM4_SIMD_H */
+
+#ifdef __cplusplus
+}
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cm7.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cm7.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cm7.h	(revision 270)
@@ -0,0 +1,2397 @@
+/**************************************************************************//**
+ * @file     core_cm7.h
+ * @brief    CMSIS Cortex-M7 Core Peripheral Access Layer Header File
+ * @version  V4.10
+ * @date     18. March 2015
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2009 - 2015 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+
+#if defined ( __ICCARM__ )
+ #pragma system_include  /* treat file as system include file for MISRA check */
+#endif
+
+#ifndef __CORE_CM7_H_GENERIC
+#define __CORE_CM7_H_GENERIC
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/** \page CMSIS_MISRA_Exceptions  MISRA-C:2004 Compliance Exceptions
+  CMSIS violates the following MISRA-C:2004 rules:
+
+   \li Required Rule 8.5, object/function definition in header file.<br>
+     Function definitions in header files are used to allow 'inlining'.
+
+   \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.<br>
+     Unions are used for effective representation of core registers.
+
+   \li Advisory Rule 19.7, Function-like macro defined.<br>
+     Function-like macros are used to allow more efficient code.
+ */
+
+
+/*******************************************************************************
+ *                 CMSIS definitions
+ ******************************************************************************/
+/** \ingroup Cortex_M7
+  @{
+ */
+
+/*  CMSIS CM7 definitions */
+#define __CM7_CMSIS_VERSION_MAIN  (0x04)                                   /*!< [31:16] CMSIS HAL main version   */
+#define __CM7_CMSIS_VERSION_SUB   (0x00)                                   /*!< [15:0]  CMSIS HAL sub version    */
+#define __CM7_CMSIS_VERSION       ((__CM7_CMSIS_VERSION_MAIN << 16) | \
+                                    __CM7_CMSIS_VERSION_SUB          )     /*!< CMSIS HAL version number         */
+
+#define __CORTEX_M                (0x07)                                   /*!< Cortex-M Core                    */
+
+
+#if   defined ( __CC_ARM )
+  #define __ASM            __asm                                      /*!< asm keyword for ARM Compiler          */
+  #define __INLINE         __inline                                   /*!< inline keyword for ARM Compiler       */
+  #define __STATIC_INLINE  static __inline
+
+#elif defined ( __GNUC__ )
+  #define __ASM            __asm                                      /*!< asm keyword for GNU Compiler          */
+  #define __INLINE         inline                                     /*!< inline keyword for GNU Compiler       */
+  #define __STATIC_INLINE  static inline
+
+#elif defined ( __ICCARM__ )
+  #define __ASM            __asm                                      /*!< asm keyword for IAR Compiler          */
+  #define __INLINE         inline                                     /*!< inline keyword for IAR Compiler. Only available in High optimization mode! */
+  #define __STATIC_INLINE  static inline
+
+#elif defined ( __TMS470__ )
+  #define __ASM            __asm                                      /*!< asm keyword for TI CCS Compiler       */
+  #define __STATIC_INLINE  static inline
+
+#elif defined ( __TASKING__ )
+  #define __ASM            __asm                                      /*!< asm keyword for TASKING Compiler      */
+  #define __INLINE         inline                                     /*!< inline keyword for TASKING Compiler   */
+  #define __STATIC_INLINE  static inline
+
+#elif defined ( __CSMC__ )
+  #define __packed
+  #define __ASM            _asm                                      /*!< asm keyword for COSMIC Compiler      */
+  #define __INLINE         inline                                    /*use -pc99 on compile line !< inline keyword for COSMIC Compiler   */
+  #define __STATIC_INLINE  static inline
+
+#endif
+
+/** __FPU_USED indicates whether an FPU is used or not.
+    For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions.
+*/
+#if defined ( __CC_ARM )
+  #if defined __TARGET_FPU_VFP
+    #if (__FPU_PRESENT == 1)
+      #define __FPU_USED       1
+    #else
+      #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+      #define __FPU_USED       0
+    #endif
+  #else
+    #define __FPU_USED         0
+  #endif
+
+#elif defined ( __GNUC__ )
+  #if defined (__VFP_FP__) && !defined(__SOFTFP__)
+    #if (__FPU_PRESENT == 1)
+      #define __FPU_USED       1
+    #else
+      #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+      #define __FPU_USED       0
+    #endif
+  #else
+    #define __FPU_USED         0
+  #endif
+
+#elif defined ( __ICCARM__ )
+  #if defined __ARMVFP__
+    #if (__FPU_PRESENT == 1)
+      #define __FPU_USED       1
+    #else
+      #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+      #define __FPU_USED       0
+    #endif
+  #else
+    #define __FPU_USED         0
+  #endif
+
+#elif defined ( __TMS470__ )
+  #if defined __TI_VFP_SUPPORT__
+    #if (__FPU_PRESENT == 1)
+      #define __FPU_USED       1
+    #else
+      #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+      #define __FPU_USED       0
+    #endif
+  #else
+    #define __FPU_USED         0
+  #endif
+
+#elif defined ( __TASKING__ )
+  #if defined __FPU_VFP__
+    #if (__FPU_PRESENT == 1)
+      #define __FPU_USED       1
+    #else
+      #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+      #define __FPU_USED       0
+    #endif
+  #else
+    #define __FPU_USED         0
+  #endif
+
+#elif defined ( __CSMC__ )		/* Cosmic */
+  #if ( __CSMC__ & 0x400)		// FPU present for parser
+    #if (__FPU_PRESENT == 1)
+      #define __FPU_USED       1
+    #else
+      #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
+      #define __FPU_USED       0
+    #endif
+  #else
+    #define __FPU_USED         0
+  #endif
+#endif
+
+#include <stdint.h>                      /* standard types definitions                      */
+#include <core_cmInstr.h>                /* Core Instruction Access                         */
+#include <core_cmFunc.h>                 /* Core Function Access                            */
+#include <core_cmSimd.h>                 /* Compiler specific SIMD Intrinsics               */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CORE_CM7_H_GENERIC */
+
+#ifndef __CMSIS_GENERIC
+
+#ifndef __CORE_CM7_H_DEPENDANT
+#define __CORE_CM7_H_DEPENDANT
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* check device defines and use defaults */
+#if defined __CHECK_DEVICE_DEFINES
+  #ifndef __CM7_REV
+    #define __CM7_REV               0x0000
+    #warning "__CM7_REV not defined in device header file; using default!"
+  #endif
+
+  #ifndef __FPU_PRESENT
+    #define __FPU_PRESENT             0
+    #warning "__FPU_PRESENT not defined in device header file; using default!"
+  #endif
+
+  #ifndef __MPU_PRESENT
+    #define __MPU_PRESENT             0
+    #warning "__MPU_PRESENT not defined in device header file; using default!"
+  #endif
+
+  #ifndef __ICACHE_PRESENT
+    #define __ICACHE_PRESENT          0
+    #warning "__ICACHE_PRESENT not defined in device header file; using default!"
+  #endif
+
+  #ifndef __DCACHE_PRESENT
+    #define __DCACHE_PRESENT          0
+    #warning "__DCACHE_PRESENT not defined in device header file; using default!"
+  #endif
+
+  #ifndef __DTCM_PRESENT
+    #define __DTCM_PRESENT            0
+    #warning "__DTCM_PRESENT        not defined in device header file; using default!"
+  #endif
+
+  #ifndef __NVIC_PRIO_BITS
+    #define __NVIC_PRIO_BITS          3
+    #warning "__NVIC_PRIO_BITS not defined in device header file; using default!"
+  #endif
+
+  #ifndef __Vendor_SysTickConfig
+    #define __Vendor_SysTickConfig    0
+    #warning "__Vendor_SysTickConfig not defined in device header file; using default!"
+  #endif
+#endif
+
+/* IO definitions (access restrictions to peripheral registers) */
+/**
+    \defgroup CMSIS_glob_defs CMSIS Global Defines
+
+    <strong>IO Type Qualifiers</strong> are used
+    \li to specify the access to peripheral variables.
+    \li for automatic generation of peripheral register debug information.
+*/
+#ifdef __cplusplus
+  #define   __I     volatile             /*!< Defines 'read only' permissions                 */
+#else
+  #define   __I     volatile const       /*!< Defines 'read only' permissions                 */
+#endif
+#define     __O     volatile             /*!< Defines 'write only' permissions                */
+#define     __IO    volatile             /*!< Defines 'read / write' permissions              */
+
+/*@} end of group Cortex_M7 */
+
+
+
+/*******************************************************************************
+ *                 Register Abstraction
+  Core Register contain:
+  - Core Register
+  - Core NVIC Register
+  - Core SCB Register
+  - Core SysTick Register
+  - Core Debug Register
+  - Core MPU Register
+  - Core FPU Register
+ ******************************************************************************/
+/** \defgroup CMSIS_core_register Defines and Type Definitions
+    \brief Type definitions and defines for Cortex-M processor based devices.
+*/
+
+/** \ingroup    CMSIS_core_register
+    \defgroup   CMSIS_CORE  Status and Control Registers
+    \brief  Core Register type definitions.
+  @{
+ */
+
+/** \brief  Union type to access the Application Program Status Register (APSR).
+ */
+typedef union
+{
+  struct
+  {
+    uint32_t _reserved0:16;              /*!< bit:  0..15  Reserved                           */
+    uint32_t GE:4;                       /*!< bit: 16..19  Greater than or Equal flags        */
+    uint32_t _reserved1:7;               /*!< bit: 20..26  Reserved                           */
+    uint32_t Q:1;                        /*!< bit:     27  Saturation condition flag          */
+    uint32_t V:1;                        /*!< bit:     28  Overflow condition code flag       */
+    uint32_t C:1;                        /*!< bit:     29  Carry condition code flag          */
+    uint32_t Z:1;                        /*!< bit:     30  Zero condition code flag           */
+    uint32_t N:1;                        /*!< bit:     31  Negative condition code flag       */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} APSR_Type;
+
+/* APSR Register Definitions */
+#define APSR_N_Pos                         31                                             /*!< APSR: N Position */
+#define APSR_N_Msk                         (1UL << APSR_N_Pos)                            /*!< APSR: N Mask */
+
+#define APSR_Z_Pos                         30                                             /*!< APSR: Z Position */
+#define APSR_Z_Msk                         (1UL << APSR_Z_Pos)                            /*!< APSR: Z Mask */
+
+#define APSR_C_Pos                         29                                             /*!< APSR: C Position */
+#define APSR_C_Msk                         (1UL << APSR_C_Pos)                            /*!< APSR: C Mask */
+
+#define APSR_V_Pos                         28                                             /*!< APSR: V Position */
+#define APSR_V_Msk                         (1UL << APSR_V_Pos)                            /*!< APSR: V Mask */
+
+#define APSR_Q_Pos                         27                                             /*!< APSR: Q Position */
+#define APSR_Q_Msk                         (1UL << APSR_Q_Pos)                            /*!< APSR: Q Mask */
+
+#define APSR_GE_Pos                        16                                             /*!< APSR: GE Position */
+#define APSR_GE_Msk                        (0xFUL << APSR_GE_Pos)                         /*!< APSR: GE Mask */
+
+
+/** \brief  Union type to access the Interrupt Program Status Register (IPSR).
+ */
+typedef union
+{
+  struct
+  {
+    uint32_t ISR:9;                      /*!< bit:  0.. 8  Exception number                   */
+    uint32_t _reserved0:23;              /*!< bit:  9..31  Reserved                           */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} IPSR_Type;
+
+/* IPSR Register Definitions */
+#define IPSR_ISR_Pos                        0                                             /*!< IPSR: ISR Position */
+#define IPSR_ISR_Msk                       (0x1FFUL /*<< IPSR_ISR_Pos*/)                  /*!< IPSR: ISR Mask */
+
+
+/** \brief  Union type to access the Special-Purpose Program Status Registers (xPSR).
+ */
+typedef union
+{
+  struct
+  {
+    uint32_t ISR:9;                      /*!< bit:  0.. 8  Exception number                   */
+    uint32_t _reserved0:7;               /*!< bit:  9..15  Reserved                           */
+    uint32_t GE:4;                       /*!< bit: 16..19  Greater than or Equal flags        */
+    uint32_t _reserved1:4;               /*!< bit: 20..23  Reserved                           */
+    uint32_t T:1;                        /*!< bit:     24  Thumb bit        (read 0)          */
+    uint32_t IT:2;                       /*!< bit: 25..26  saved IT state   (read 0)          */
+    uint32_t Q:1;                        /*!< bit:     27  Saturation condition flag          */
+    uint32_t V:1;                        /*!< bit:     28  Overflow condition code flag       */
+    uint32_t C:1;                        /*!< bit:     29  Carry condition code flag          */
+    uint32_t Z:1;                        /*!< bit:     30  Zero condition code flag           */
+    uint32_t N:1;                        /*!< bit:     31  Negative condition code flag       */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} xPSR_Type;
+
+/* xPSR Register Definitions */
+#define xPSR_N_Pos                         31                                             /*!< xPSR: N Position */
+#define xPSR_N_Msk                         (1UL << xPSR_N_Pos)                            /*!< xPSR: N Mask */
+
+#define xPSR_Z_Pos                         30                                             /*!< xPSR: Z Position */
+#define xPSR_Z_Msk                         (1UL << xPSR_Z_Pos)                            /*!< xPSR: Z Mask */
+
+#define xPSR_C_Pos                         29                                             /*!< xPSR: C Position */
+#define xPSR_C_Msk                         (1UL << xPSR_C_Pos)                            /*!< xPSR: C Mask */
+
+#define xPSR_V_Pos                         28                                             /*!< xPSR: V Position */
+#define xPSR_V_Msk                         (1UL << xPSR_V_Pos)                            /*!< xPSR: V Mask */
+
+#define xPSR_Q_Pos                         27                                             /*!< xPSR: Q Position */
+#define xPSR_Q_Msk                         (1UL << xPSR_Q_Pos)                            /*!< xPSR: Q Mask */
+
+#define xPSR_IT_Pos                        25                                             /*!< xPSR: IT Position */
+#define xPSR_IT_Msk                        (3UL << xPSR_IT_Pos)                           /*!< xPSR: IT Mask */
+
+#define xPSR_T_Pos                         24                                             /*!< xPSR: T Position */
+#define xPSR_T_Msk                         (1UL << xPSR_T_Pos)                            /*!< xPSR: T Mask */
+
+#define xPSR_GE_Pos                        16                                             /*!< xPSR: GE Position */
+#define xPSR_GE_Msk                        (0xFUL << xPSR_GE_Pos)                         /*!< xPSR: GE Mask */
+
+#define xPSR_ISR_Pos                        0                                             /*!< xPSR: ISR Position */
+#define xPSR_ISR_Msk                       (0x1FFUL /*<< xPSR_ISR_Pos*/)                  /*!< xPSR: ISR Mask */
+
+
+/** \brief  Union type to access the Control Registers (CONTROL).
+ */
+typedef union
+{
+  struct
+  {
+    uint32_t nPRIV:1;                    /*!< bit:      0  Execution privilege in Thread mode */
+    uint32_t SPSEL:1;                    /*!< bit:      1  Stack to be used                   */
+    uint32_t FPCA:1;                     /*!< bit:      2  FP extension active flag           */
+    uint32_t _reserved0:29;              /*!< bit:  3..31  Reserved                           */
+  } b;                                   /*!< Structure used for bit  access                  */
+  uint32_t w;                            /*!< Type      used for word access                  */
+} CONTROL_Type;
+
+/* CONTROL Register Definitions */
+#define CONTROL_FPCA_Pos                    2                                             /*!< CONTROL: FPCA Position */
+#define CONTROL_FPCA_Msk                   (1UL << CONTROL_FPCA_Pos)                      /*!< CONTROL: FPCA Mask */
+
+#define CONTROL_SPSEL_Pos                   1                                             /*!< CONTROL: SPSEL Position */
+#define CONTROL_SPSEL_Msk                  (1UL << CONTROL_SPSEL_Pos)                     /*!< CONTROL: SPSEL Mask */
+
+#define CONTROL_nPRIV_Pos                   0                                             /*!< CONTROL: nPRIV Position */
+#define CONTROL_nPRIV_Msk                  (1UL /*<< CONTROL_nPRIV_Pos*/)                 /*!< CONTROL: nPRIV Mask */
+
+/*@} end of group CMSIS_CORE */
+
+
+/** \ingroup    CMSIS_core_register
+    \defgroup   CMSIS_NVIC  Nested Vectored Interrupt Controller (NVIC)
+    \brief      Type definitions for the NVIC Registers
+  @{
+ */
+
+/** \brief  Structure type to access the Nested Vectored Interrupt Controller (NVIC).
+ */
+typedef struct
+{
+  __IO uint32_t ISER[8];                 /*!< Offset: 0x000 (R/W)  Interrupt Set Enable Register           */
+       uint32_t RESERVED0[24];
+  __IO uint32_t ICER[8];                 /*!< Offset: 0x080 (R/W)  Interrupt Clear Enable Register         */
+       uint32_t RSERVED1[24];
+  __IO uint32_t ISPR[8];                 /*!< Offset: 0x100 (R/W)  Interrupt Set Pending Register          */
+       uint32_t RESERVED2[24];
+  __IO uint32_t ICPR[8];                 /*!< Offset: 0x180 (R/W)  Interrupt Clear Pending Register        */
+       uint32_t RESERVED3[24];
+  __IO uint32_t IABR[8];                 /*!< Offset: 0x200 (R/W)  Interrupt Active bit Register           */
+       uint32_t RESERVED4[56];
+  __IO uint8_t  IP[240];                 /*!< Offset: 0x300 (R/W)  Interrupt Priority Register (8Bit wide) */
+       uint32_t RESERVED5[644];
+  __O  uint32_t STIR;                    /*!< Offset: 0xE00 ( /W)  Software Trigger Interrupt Register     */
+}  NVIC_Type;
+
+/* Software Triggered Interrupt Register Definitions */
+#define NVIC_STIR_INTID_Pos                 0                                          /*!< STIR: INTLINESNUM Position */
+#define NVIC_STIR_INTID_Msk                (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/)        /*!< STIR: INTLINESNUM Mask */
+
+/*@} end of group CMSIS_NVIC */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_SCB     System Control Block (SCB)
+    \brief      Type definitions for the System Control Block Registers
+  @{
+ */
+
+/** \brief  Structure type to access the System Control Block (SCB).
+ */
+typedef struct
+{
+  __I  uint32_t CPUID;                   /*!< Offset: 0x000 (R/ )  CPUID Base Register                                   */
+  __IO uint32_t ICSR;                    /*!< Offset: 0x004 (R/W)  Interrupt Control and State Register                  */
+  __IO uint32_t VTOR;                    /*!< Offset: 0x008 (R/W)  Vector Table Offset Register                          */
+  __IO uint32_t AIRCR;                   /*!< Offset: 0x00C (R/W)  Application Interrupt and Reset Control Register      */
+  __IO uint32_t SCR;                     /*!< Offset: 0x010 (R/W)  System Control Register                               */
+  __IO uint32_t CCR;                     /*!< Offset: 0x014 (R/W)  Configuration Control Register                        */
+  __IO uint8_t  SHPR[12];                /*!< Offset: 0x018 (R/W)  System Handlers Priority Registers (4-7, 8-11, 12-15) */
+  __IO uint32_t SHCSR;                   /*!< Offset: 0x024 (R/W)  System Handler Control and State Register             */
+  __IO uint32_t CFSR;                    /*!< Offset: 0x028 (R/W)  Configurable Fault Status Register                    */
+  __IO uint32_t HFSR;                    /*!< Offset: 0x02C (R/W)  HardFault Status Register                             */
+  __IO uint32_t DFSR;                    /*!< Offset: 0x030 (R/W)  Debug Fault Status Register                           */
+  __IO uint32_t MMFAR;                   /*!< Offset: 0x034 (R/W)  MemManage Fault Address Register                      */
+  __IO uint32_t BFAR;                    /*!< Offset: 0x038 (R/W)  BusFault Address Register                             */
+  __IO uint32_t AFSR;                    /*!< Offset: 0x03C (R/W)  Auxiliary Fault Status Register                       */
+  __I  uint32_t ID_PFR[2];               /*!< Offset: 0x040 (R/ )  Processor Feature Register                            */
+  __I  uint32_t ID_DFR;                  /*!< Offset: 0x048 (R/ )  Debug Feature Register                                */
+  __I  uint32_t ID_AFR;                  /*!< Offset: 0x04C (R/ )  Auxiliary Feature Register                            */
+  __I  uint32_t ID_MFR[4];               /*!< Offset: 0x050 (R/ )  Memory Model Feature Register                         */
+  __I  uint32_t ID_ISAR[5];              /*!< Offset: 0x060 (R/ )  Instruction Set Attributes Register                   */
+       uint32_t RESERVED0[1];
+  __I  uint32_t CLIDR;                   /*!< Offset: 0x078 (R/ )  Cache Level ID register                               */
+  __I  uint32_t CTR;                     /*!< Offset: 0x07C (R/ )  Cache Type register                                   */
+  __I  uint32_t CCSIDR;                  /*!< Offset: 0x080 (R/ )  Cache Size ID Register                                */
+  __IO uint32_t CSSELR;                  /*!< Offset: 0x084 (R/W)  Cache Size Selection Register                         */
+  __IO uint32_t CPACR;                   /*!< Offset: 0x088 (R/W)  Coprocessor Access Control Register                   */
+       uint32_t RESERVED3[93];
+  __O  uint32_t STIR;                    /*!< Offset: 0x200 ( /W)  Software Triggered Interrupt Register                 */
+       uint32_t RESERVED4[15];
+  __I  uint32_t MVFR0;                   /*!< Offset: 0x240 (R/ )  Media and VFP Feature Register 0                      */
+  __I  uint32_t MVFR1;                   /*!< Offset: 0x244 (R/ )  Media and VFP Feature Register 1                      */
+  __I  uint32_t MVFR2;                   /*!< Offset: 0x248 (R/ )  Media and VFP Feature Register 1                      */
+       uint32_t RESERVED5[1];
+  __O  uint32_t ICIALLU;                 /*!< Offset: 0x250 ( /W)  I-Cache Invalidate All to PoU                         */
+       uint32_t RESERVED6[1];
+  __O  uint32_t ICIMVAU;                 /*!< Offset: 0x258 ( /W)  I-Cache Invalidate by MVA to PoU                      */
+  __O  uint32_t DCIMVAC;                 /*!< Offset: 0x25C ( /W)  D-Cache Invalidate by MVA to PoC                      */
+  __O  uint32_t DCISW;                   /*!< Offset: 0x260 ( /W)  D-Cache Invalidate by Set-way                         */
+  __O  uint32_t DCCMVAU;                 /*!< Offset: 0x264 ( /W)  D-Cache Clean by MVA to PoU                           */
+  __O  uint32_t DCCMVAC;                 /*!< Offset: 0x268 ( /W)  D-Cache Clean by MVA to PoC                           */
+  __O  uint32_t DCCSW;                   /*!< Offset: 0x26C ( /W)  D-Cache Clean by Set-way                              */
+  __O  uint32_t DCCIMVAC;                /*!< Offset: 0x270 ( /W)  D-Cache Clean and Invalidate by MVA to PoC            */
+  __O  uint32_t DCCISW;                  /*!< Offset: 0x274 ( /W)  D-Cache Clean and Invalidate by Set-way               */
+       uint32_t RESERVED7[6];
+  __IO uint32_t ITCMCR;                  /*!< Offset: 0x290 (R/W)  Instruction Tightly-Coupled Memory Control Register   */
+  __IO uint32_t DTCMCR;                  /*!< Offset: 0x294 (R/W)  Data Tightly-Coupled Memory Control Registers         */
+  __IO uint32_t AHBPCR;                  /*!< Offset: 0x298 (R/W)  AHBP Control Register                                 */
+  __IO uint32_t CACR;                    /*!< Offset: 0x29C (R/W)  L1 Cache Control Register                             */
+  __IO uint32_t AHBSCR;                  /*!< Offset: 0x2A0 (R/W)  AHB Slave Control Register                            */
+       uint32_t RESERVED8[1];
+  __IO uint32_t ABFSR;                   /*!< Offset: 0x2A8 (R/W)  Auxiliary Bus Fault Status Register                   */
+} SCB_Type;
+
+/* SCB CPUID Register Definitions */
+#define SCB_CPUID_IMPLEMENTER_Pos          24                                             /*!< SCB CPUID: IMPLEMENTER Position */
+#define SCB_CPUID_IMPLEMENTER_Msk          (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos)          /*!< SCB CPUID: IMPLEMENTER Mask */
+
+#define SCB_CPUID_VARIANT_Pos              20                                             /*!< SCB CPUID: VARIANT Position */
+#define SCB_CPUID_VARIANT_Msk              (0xFUL << SCB_CPUID_VARIANT_Pos)               /*!< SCB CPUID: VARIANT Mask */
+
+#define SCB_CPUID_ARCHITECTURE_Pos         16                                             /*!< SCB CPUID: ARCHITECTURE Position */
+#define SCB_CPUID_ARCHITECTURE_Msk         (0xFUL << SCB_CPUID_ARCHITECTURE_Pos)          /*!< SCB CPUID: ARCHITECTURE Mask */
+
+#define SCB_CPUID_PARTNO_Pos                4                                             /*!< SCB CPUID: PARTNO Position */
+#define SCB_CPUID_PARTNO_Msk               (0xFFFUL << SCB_CPUID_PARTNO_Pos)              /*!< SCB CPUID: PARTNO Mask */
+
+#define SCB_CPUID_REVISION_Pos              0                                             /*!< SCB CPUID: REVISION Position */
+#define SCB_CPUID_REVISION_Msk             (0xFUL /*<< SCB_CPUID_REVISION_Pos*/)          /*!< SCB CPUID: REVISION Mask */
+
+/* SCB Interrupt Control State Register Definitions */
+#define SCB_ICSR_NMIPENDSET_Pos            31                                             /*!< SCB ICSR: NMIPENDSET Position */
+#define SCB_ICSR_NMIPENDSET_Msk            (1UL << SCB_ICSR_NMIPENDSET_Pos)               /*!< SCB ICSR: NMIPENDSET Mask */
+
+#define SCB_ICSR_PENDSVSET_Pos             28                                             /*!< SCB ICSR: PENDSVSET Position */
+#define SCB_ICSR_PENDSVSET_Msk             (1UL << SCB_ICSR_PENDSVSET_Pos)                /*!< SCB ICSR: PENDSVSET Mask */
+
+#define SCB_ICSR_PENDSVCLR_Pos             27                                             /*!< SCB ICSR: PENDSVCLR Position */
+#define SCB_ICSR_PENDSVCLR_Msk             (1UL << SCB_ICSR_PENDSVCLR_Pos)                /*!< SCB ICSR: PENDSVCLR Mask */
+
+#define SCB_ICSR_PENDSTSET_Pos             26                                             /*!< SCB ICSR: PENDSTSET Position */
+#define SCB_ICSR_PENDSTSET_Msk             (1UL << SCB_ICSR_PENDSTSET_Pos)                /*!< SCB ICSR: PENDSTSET Mask */
+
+#define SCB_ICSR_PENDSTCLR_Pos             25                                             /*!< SCB ICSR: PENDSTCLR Position */
+#define SCB_ICSR_PENDSTCLR_Msk             (1UL << SCB_ICSR_PENDSTCLR_Pos)                /*!< SCB ICSR: PENDSTCLR Mask */
+
+#define SCB_ICSR_ISRPREEMPT_Pos            23                                             /*!< SCB ICSR: ISRPREEMPT Position */
+#define SCB_ICSR_ISRPREEMPT_Msk            (1UL << SCB_ICSR_ISRPREEMPT_Pos)               /*!< SCB ICSR: ISRPREEMPT Mask */
+
+#define SCB_ICSR_ISRPENDING_Pos            22                                             /*!< SCB ICSR: ISRPENDING Position */
+#define SCB_ICSR_ISRPENDING_Msk            (1UL << SCB_ICSR_ISRPENDING_Pos)               /*!< SCB ICSR: ISRPENDING Mask */
+
+#define SCB_ICSR_VECTPENDING_Pos           12                                             /*!< SCB ICSR: VECTPENDING Position */
+#define SCB_ICSR_VECTPENDING_Msk           (0x1FFUL << SCB_ICSR_VECTPENDING_Pos)          /*!< SCB ICSR: VECTPENDING Mask */
+
+#define SCB_ICSR_RETTOBASE_Pos             11                                             /*!< SCB ICSR: RETTOBASE Position */
+#define SCB_ICSR_RETTOBASE_Msk             (1UL << SCB_ICSR_RETTOBASE_Pos)                /*!< SCB ICSR: RETTOBASE Mask */
+
+#define SCB_ICSR_VECTACTIVE_Pos             0                                             /*!< SCB ICSR: VECTACTIVE Position */
+#define SCB_ICSR_VECTACTIVE_Msk            (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/)       /*!< SCB ICSR: VECTACTIVE Mask */
+
+/* SCB Vector Table Offset Register Definitions */
+#define SCB_VTOR_TBLOFF_Pos                 7                                             /*!< SCB VTOR: TBLOFF Position */
+#define SCB_VTOR_TBLOFF_Msk                (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos)           /*!< SCB VTOR: TBLOFF Mask */
+
+/* SCB Application Interrupt and Reset Control Register Definitions */
+#define SCB_AIRCR_VECTKEY_Pos              16                                             /*!< SCB AIRCR: VECTKEY Position */
+#define SCB_AIRCR_VECTKEY_Msk              (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos)            /*!< SCB AIRCR: VECTKEY Mask */
+
+#define SCB_AIRCR_VECTKEYSTAT_Pos          16                                             /*!< SCB AIRCR: VECTKEYSTAT Position */
+#define SCB_AIRCR_VECTKEYSTAT_Msk          (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos)        /*!< SCB AIRCR: VECTKEYSTAT Mask */
+
+#define SCB_AIRCR_ENDIANESS_Pos            15                                             /*!< SCB AIRCR: ENDIANESS Position */
+#define SCB_AIRCR_ENDIANESS_Msk            (1UL << SCB_AIRCR_ENDIANESS_Pos)               /*!< SCB AIRCR: ENDIANESS Mask */
+
+#define SCB_AIRCR_PRIGROUP_Pos              8                                             /*!< SCB AIRCR: PRIGROUP Position */
+#define SCB_AIRCR_PRIGROUP_Msk             (7UL << SCB_AIRCR_PRIGROUP_Pos)                /*!< SCB AIRCR: PRIGROUP Mask */
+
+#define SCB_AIRCR_SYSRESETREQ_Pos           2                                             /*!< SCB AIRCR: SYSRESETREQ Position */
+#define SCB_AIRCR_SYSRESETREQ_Msk          (1UL << SCB_AIRCR_SYSRESETREQ_Pos)             /*!< SCB AIRCR: SYSRESETREQ Mask */
+
+#define SCB_AIRCR_VECTCLRACTIVE_Pos         1                                             /*!< SCB AIRCR: VECTCLRACTIVE Position */
+#define SCB_AIRCR_VECTCLRACTIVE_Msk        (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos)           /*!< SCB AIRCR: VECTCLRACTIVE Mask */
+
+#define SCB_AIRCR_VECTRESET_Pos             0                                             /*!< SCB AIRCR: VECTRESET Position */
+#define SCB_AIRCR_VECTRESET_Msk            (1UL /*<< SCB_AIRCR_VECTRESET_Pos*/)           /*!< SCB AIRCR: VECTRESET Mask */
+
+/* SCB System Control Register Definitions */
+#define SCB_SCR_SEVONPEND_Pos               4                                             /*!< SCB SCR: SEVONPEND Position */
+#define SCB_SCR_SEVONPEND_Msk              (1UL << SCB_SCR_SEVONPEND_Pos)                 /*!< SCB SCR: SEVONPEND Mask */
+
+#define SCB_SCR_SLEEPDEEP_Pos               2                                             /*!< SCB SCR: SLEEPDEEP Position */
+#define SCB_SCR_SLEEPDEEP_Msk              (1UL << SCB_SCR_SLEEPDEEP_Pos)                 /*!< SCB SCR: SLEEPDEEP Mask */
+
+#define SCB_SCR_SLEEPONEXIT_Pos             1                                             /*!< SCB SCR: SLEEPONEXIT Position */
+#define SCB_SCR_SLEEPONEXIT_Msk            (1UL << SCB_SCR_SLEEPONEXIT_Pos)               /*!< SCB SCR: SLEEPONEXIT Mask */
+
+/* SCB Configuration Control Register Definitions */
+#define SCB_CCR_BP_Pos                      18                                            /*!< SCB CCR: Branch prediction enable bit Position */
+#define SCB_CCR_BP_Msk                     (1UL << SCB_CCR_BP_Pos)                        /*!< SCB CCR: Branch prediction enable bit Mask */
+
+#define SCB_CCR_IC_Pos                      17                                            /*!< SCB CCR: Instruction cache enable bit Position */
+#define SCB_CCR_IC_Msk                     (1UL << SCB_CCR_IC_Pos)                        /*!< SCB CCR: Instruction cache enable bit Mask */
+
+#define SCB_CCR_DC_Pos                      16                                            /*!< SCB CCR: Cache enable bit Position */
+#define SCB_CCR_DC_Msk                     (1UL << SCB_CCR_DC_Pos)                        /*!< SCB CCR: Cache enable bit Mask */
+
+#define SCB_CCR_STKALIGN_Pos                9                                             /*!< SCB CCR: STKALIGN Position */
+#define SCB_CCR_STKALIGN_Msk               (1UL << SCB_CCR_STKALIGN_Pos)                  /*!< SCB CCR: STKALIGN Mask */
+
+#define SCB_CCR_BFHFNMIGN_Pos               8                                             /*!< SCB CCR: BFHFNMIGN Position */
+#define SCB_CCR_BFHFNMIGN_Msk              (1UL << SCB_CCR_BFHFNMIGN_Pos)                 /*!< SCB CCR: BFHFNMIGN Mask */
+
+#define SCB_CCR_DIV_0_TRP_Pos               4                                             /*!< SCB CCR: DIV_0_TRP Position */
+#define SCB_CCR_DIV_0_TRP_Msk              (1UL << SCB_CCR_DIV_0_TRP_Pos)                 /*!< SCB CCR: DIV_0_TRP Mask */
+
+#define SCB_CCR_UNALIGN_TRP_Pos             3                                             /*!< SCB CCR: UNALIGN_TRP Position */
+#define SCB_CCR_UNALIGN_TRP_Msk            (1UL << SCB_CCR_UNALIGN_TRP_Pos)               /*!< SCB CCR: UNALIGN_TRP Mask */
+
+#define SCB_CCR_USERSETMPEND_Pos            1                                             /*!< SCB CCR: USERSETMPEND Position */
+#define SCB_CCR_USERSETMPEND_Msk           (1UL << SCB_CCR_USERSETMPEND_Pos)              /*!< SCB CCR: USERSETMPEND Mask */
+
+#define SCB_CCR_NONBASETHRDENA_Pos          0                                             /*!< SCB CCR: NONBASETHRDENA Position */
+#define SCB_CCR_NONBASETHRDENA_Msk         (1UL /*<< SCB_CCR_NONBASETHRDENA_Pos*/)        /*!< SCB CCR: NONBASETHRDENA Mask */
+
+/* SCB System Handler Control and State Register Definitions */
+#define SCB_SHCSR_USGFAULTENA_Pos          18                                             /*!< SCB SHCSR: USGFAULTENA Position */
+#define SCB_SHCSR_USGFAULTENA_Msk          (1UL << SCB_SHCSR_USGFAULTENA_Pos)             /*!< SCB SHCSR: USGFAULTENA Mask */
+
+#define SCB_SHCSR_BUSFAULTENA_Pos          17                                             /*!< SCB SHCSR: BUSFAULTENA Position */
+#define SCB_SHCSR_BUSFAULTENA_Msk          (1UL << SCB_SHCSR_BUSFAULTENA_Pos)             /*!< SCB SHCSR: BUSFAULTENA Mask */
+
+#define SCB_SHCSR_MEMFAULTENA_Pos          16                                             /*!< SCB SHCSR: MEMFAULTENA Position */
+#define SCB_SHCSR_MEMFAULTENA_Msk          (1UL << SCB_SHCSR_MEMFAULTENA_Pos)             /*!< SCB SHCSR: MEMFAULTENA Mask */
+
+#define SCB_SHCSR_SVCALLPENDED_Pos         15                                             /*!< SCB SHCSR: SVCALLPENDED Position */
+#define SCB_SHCSR_SVCALLPENDED_Msk         (1UL << SCB_SHCSR_SVCALLPENDED_Pos)            /*!< SCB SHCSR: SVCALLPENDED Mask */
+
+#define SCB_SHCSR_BUSFAULTPENDED_Pos       14                                             /*!< SCB SHCSR: BUSFAULTPENDED Position */
+#define SCB_SHCSR_BUSFAULTPENDED_Msk       (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos)          /*!< SCB SHCSR: BUSFAULTPENDED Mask */
+
+#define SCB_SHCSR_MEMFAULTPENDED_Pos       13                                             /*!< SCB SHCSR: MEMFAULTPENDED Position */
+#define SCB_SHCSR_MEMFAULTPENDED_Msk       (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos)          /*!< SCB SHCSR: MEMFAULTPENDED Mask */
+
+#define SCB_SHCSR_USGFAULTPENDED_Pos       12                                             /*!< SCB SHCSR: USGFAULTPENDED Position */
+#define SCB_SHCSR_USGFAULTPENDED_Msk       (1UL << SCB_SHCSR_USGFAULTPENDED_Pos)          /*!< SCB SHCSR: USGFAULTPENDED Mask */
+
+#define SCB_SHCSR_SYSTICKACT_Pos           11                                             /*!< SCB SHCSR: SYSTICKACT Position */
+#define SCB_SHCSR_SYSTICKACT_Msk           (1UL << SCB_SHCSR_SYSTICKACT_Pos)              /*!< SCB SHCSR: SYSTICKACT Mask */
+
+#define SCB_SHCSR_PENDSVACT_Pos            10                                             /*!< SCB SHCSR: PENDSVACT Position */
+#define SCB_SHCSR_PENDSVACT_Msk            (1UL << SCB_SHCSR_PENDSVACT_Pos)               /*!< SCB SHCSR: PENDSVACT Mask */
+
+#define SCB_SHCSR_MONITORACT_Pos            8                                             /*!< SCB SHCSR: MONITORACT Position */
+#define SCB_SHCSR_MONITORACT_Msk           (1UL << SCB_SHCSR_MONITORACT_Pos)              /*!< SCB SHCSR: MONITORACT Mask */
+
+#define SCB_SHCSR_SVCALLACT_Pos             7                                             /*!< SCB SHCSR: SVCALLACT Position */
+#define SCB_SHCSR_SVCALLACT_Msk            (1UL << SCB_SHCSR_SVCALLACT_Pos)               /*!< SCB SHCSR: SVCALLACT Mask */
+
+#define SCB_SHCSR_USGFAULTACT_Pos           3                                             /*!< SCB SHCSR: USGFAULTACT Position */
+#define SCB_SHCSR_USGFAULTACT_Msk          (1UL << SCB_SHCSR_USGFAULTACT_Pos)             /*!< SCB SHCSR: USGFAULTACT Mask */
+
+#define SCB_SHCSR_BUSFAULTACT_Pos           1                                             /*!< SCB SHCSR: BUSFAULTACT Position */
+#define SCB_SHCSR_BUSFAULTACT_Msk          (1UL << SCB_SHCSR_BUSFAULTACT_Pos)             /*!< SCB SHCSR: BUSFAULTACT Mask */
+
+#define SCB_SHCSR_MEMFAULTACT_Pos           0                                             /*!< SCB SHCSR: MEMFAULTACT Position */
+#define SCB_SHCSR_MEMFAULTACT_Msk          (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/)         /*!< SCB SHCSR: MEMFAULTACT Mask */
+
+/* SCB Configurable Fault Status Registers Definitions */
+#define SCB_CFSR_USGFAULTSR_Pos            16                                             /*!< SCB CFSR: Usage Fault Status Register Position */
+#define SCB_CFSR_USGFAULTSR_Msk            (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos)          /*!< SCB CFSR: Usage Fault Status Register Mask */
+
+#define SCB_CFSR_BUSFAULTSR_Pos             8                                             /*!< SCB CFSR: Bus Fault Status Register Position */
+#define SCB_CFSR_BUSFAULTSR_Msk            (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos)            /*!< SCB CFSR: Bus Fault Status Register Mask */
+
+#define SCB_CFSR_MEMFAULTSR_Pos             0                                             /*!< SCB CFSR: Memory Manage Fault Status Register Position */
+#define SCB_CFSR_MEMFAULTSR_Msk            (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/)        /*!< SCB CFSR: Memory Manage Fault Status Register Mask */
+
+/* SCB Hard Fault Status Registers Definitions */
+#define SCB_HFSR_DEBUGEVT_Pos              31                                             /*!< SCB HFSR: DEBUGEVT Position */
+#define SCB_HFSR_DEBUGEVT_Msk              (1UL << SCB_HFSR_DEBUGEVT_Pos)                 /*!< SCB HFSR: DEBUGEVT Mask */
+
+#define SCB_HFSR_FORCED_Pos                30                                             /*!< SCB HFSR: FORCED Position */
+#define SCB_HFSR_FORCED_Msk                (1UL << SCB_HFSR_FORCED_Pos)                   /*!< SCB HFSR: FORCED Mask */
+
+#define SCB_HFSR_VECTTBL_Pos                1                                             /*!< SCB HFSR: VECTTBL Position */
+#define SCB_HFSR_VECTTBL_Msk               (1UL << SCB_HFSR_VECTTBL_Pos)                  /*!< SCB HFSR: VECTTBL Mask */
+
+/* SCB Debug Fault Status Register Definitions */
+#define SCB_DFSR_EXTERNAL_Pos               4                                             /*!< SCB DFSR: EXTERNAL Position */
+#define SCB_DFSR_EXTERNAL_Msk              (1UL << SCB_DFSR_EXTERNAL_Pos)                 /*!< SCB DFSR: EXTERNAL Mask */
+
+#define SCB_DFSR_VCATCH_Pos                 3                                             /*!< SCB DFSR: VCATCH Position */
+#define SCB_DFSR_VCATCH_Msk                (1UL << SCB_DFSR_VCATCH_Pos)                   /*!< SCB DFSR: VCATCH Mask */
+
+#define SCB_DFSR_DWTTRAP_Pos                2                                             /*!< SCB DFSR: DWTTRAP Position */
+#define SCB_DFSR_DWTTRAP_Msk               (1UL << SCB_DFSR_DWTTRAP_Pos)                  /*!< SCB DFSR: DWTTRAP Mask */
+
+#define SCB_DFSR_BKPT_Pos                   1                                             /*!< SCB DFSR: BKPT Position */
+#define SCB_DFSR_BKPT_Msk                  (1UL << SCB_DFSR_BKPT_Pos)                     /*!< SCB DFSR: BKPT Mask */
+
+#define SCB_DFSR_HALTED_Pos                 0                                             /*!< SCB DFSR: HALTED Position */
+#define SCB_DFSR_HALTED_Msk                (1UL /*<< SCB_DFSR_HALTED_Pos*/)               /*!< SCB DFSR: HALTED Mask */
+
+/* Cache Level ID register */
+#define SCB_CLIDR_LOUU_Pos                 27                                             /*!< SCB CLIDR: LoUU Position */
+#define SCB_CLIDR_LOUU_Msk                 (7UL << SCB_CLIDR_LOUU_Pos)                    /*!< SCB CLIDR: LoUU Mask */
+
+#define SCB_CLIDR_LOC_Pos                  24                                             /*!< SCB CLIDR: LoC Position */
+#define SCB_CLIDR_LOC_Msk                  (7UL << SCB_CLIDR_FORMAT_Pos)                  /*!< SCB CLIDR: LoC Mask */
+
+/* Cache Type register */
+#define SCB_CTR_FORMAT_Pos                 29                                             /*!< SCB CTR: Format Position */
+#define SCB_CTR_FORMAT_Msk                 (7UL << SCB_CTR_FORMAT_Pos)                    /*!< SCB CTR: Format Mask */
+
+#define SCB_CTR_CWG_Pos                    24                                             /*!< SCB CTR: CWG Position */
+#define SCB_CTR_CWG_Msk                    (0xFUL << SCB_CTR_CWG_Pos)                     /*!< SCB CTR: CWG Mask */
+
+#define SCB_CTR_ERG_Pos                    20                                             /*!< SCB CTR: ERG Position */
+#define SCB_CTR_ERG_Msk                    (0xFUL << SCB_CTR_ERG_Pos)                     /*!< SCB CTR: ERG Mask */
+
+#define SCB_CTR_DMINLINE_Pos               16                                             /*!< SCB CTR: DminLine Position */
+#define SCB_CTR_DMINLINE_Msk               (0xFUL << SCB_CTR_DMINLINE_Pos)                /*!< SCB CTR: DminLine Mask */
+
+#define SCB_CTR_IMINLINE_Pos                0                                             /*!< SCB CTR: ImInLine Position */
+#define SCB_CTR_IMINLINE_Msk               (0xFUL /*<< SCB_CTR_IMINLINE_Pos*/)            /*!< SCB CTR: ImInLine Mask */
+
+/* Cache Size ID Register */
+#define SCB_CCSIDR_WT_Pos                  31                                             /*!< SCB CCSIDR: WT Position */
+#define SCB_CCSIDR_WT_Msk                  (7UL << SCB_CCSIDR_WT_Pos)                     /*!< SCB CCSIDR: WT Mask */
+
+#define SCB_CCSIDR_WB_Pos                  30                                             /*!< SCB CCSIDR: WB Position */
+#define SCB_CCSIDR_WB_Msk                  (7UL << SCB_CCSIDR_WB_Pos)                     /*!< SCB CCSIDR: WB Mask */
+
+#define SCB_CCSIDR_RA_Pos                  29                                             /*!< SCB CCSIDR: RA Position */
+#define SCB_CCSIDR_RA_Msk                  (7UL << SCB_CCSIDR_RA_Pos)                     /*!< SCB CCSIDR: RA Mask */
+
+#define SCB_CCSIDR_WA_Pos                  28                                             /*!< SCB CCSIDR: WA Position */
+#define SCB_CCSIDR_WA_Msk                  (7UL << SCB_CCSIDR_WA_Pos)                     /*!< SCB CCSIDR: WA Mask */
+
+#define SCB_CCSIDR_NUMSETS_Pos             13                                             /*!< SCB CCSIDR: NumSets Position */
+#define SCB_CCSIDR_NUMSETS_Msk             (0x7FFFUL << SCB_CCSIDR_NUMSETS_Pos)           /*!< SCB CCSIDR: NumSets Mask */
+
+#define SCB_CCSIDR_ASSOCIATIVITY_Pos        3                                             /*!< SCB CCSIDR: Associativity Position */
+#define SCB_CCSIDR_ASSOCIATIVITY_Msk       (0x3FFUL << SCB_CCSIDR_ASSOCIATIVITY_Pos)      /*!< SCB CCSIDR: Associativity Mask */
+
+#define SCB_CCSIDR_LINESIZE_Pos             0                                             /*!< SCB CCSIDR: LineSize Position */
+#define SCB_CCSIDR_LINESIZE_Msk            (7UL /*<< SCB_CCSIDR_LINESIZE_Pos*/)           /*!< SCB CCSIDR: LineSize Mask */
+
+/* Cache Size Selection Register */
+#define SCB_CSSELR_LEVEL_Pos                1                                             /*!< SCB CSSELR: Level Position */
+#define SCB_CSSELR_LEVEL_Msk               (7UL << SCB_CSSELR_LEVEL_Pos)                  /*!< SCB CSSELR: Level Mask */
+
+#define SCB_CSSELR_IND_Pos                  0                                             /*!< SCB CSSELR: InD Position */
+#define SCB_CSSELR_IND_Msk                 (1UL /*<< SCB_CSSELR_IND_Pos*/)                /*!< SCB CSSELR: InD Mask */
+
+/* SCB Software Triggered Interrupt Register */
+#define SCB_STIR_INTID_Pos                  0                                             /*!< SCB STIR: INTID Position */
+#define SCB_STIR_INTID_Msk                 (0x1FFUL /*<< SCB_STIR_INTID_Pos*/)            /*!< SCB STIR: INTID Mask */
+
+/* Instruction Tightly-Coupled Memory Control Register*/
+#define SCB_ITCMCR_SZ_Pos                   3                                             /*!< SCB ITCMCR: SZ Position */
+#define SCB_ITCMCR_SZ_Msk                  (0xFUL << SCB_ITCMCR_SZ_Pos)                   /*!< SCB ITCMCR: SZ Mask */
+
+#define SCB_ITCMCR_RETEN_Pos                2                                             /*!< SCB ITCMCR: RETEN Position */
+#define SCB_ITCMCR_RETEN_Msk               (1UL << SCB_ITCMCR_RETEN_Pos)                  /*!< SCB ITCMCR: RETEN Mask */
+
+#define SCB_ITCMCR_RMW_Pos                  1                                             /*!< SCB ITCMCR: RMW Position */
+#define SCB_ITCMCR_RMW_Msk                 (1UL << SCB_ITCMCR_RMW_Pos)                    /*!< SCB ITCMCR: RMW Mask */
+
+#define SCB_ITCMCR_EN_Pos                   0                                             /*!< SCB ITCMCR: EN Position */
+#define SCB_ITCMCR_EN_Msk                  (1UL /*<< SCB_ITCMCR_EN_Pos*/)                 /*!< SCB ITCMCR: EN Mask */
+
+/* Data Tightly-Coupled Memory Control Registers */
+#define SCB_DTCMCR_SZ_Pos                   3                                             /*!< SCB DTCMCR: SZ Position */
+#define SCB_DTCMCR_SZ_Msk                  (0xFUL << SCB_DTCMCR_SZ_Pos)                   /*!< SCB DTCMCR: SZ Mask */
+
+#define SCB_DTCMCR_RETEN_Pos                2                                             /*!< SCB DTCMCR: RETEN Position */
+#define SCB_DTCMCR_RETEN_Msk               (1UL << SCB_DTCMCR_RETEN_Pos)                   /*!< SCB DTCMCR: RETEN Mask */
+
+#define SCB_DTCMCR_RMW_Pos                  1                                             /*!< SCB DTCMCR: RMW Position */
+#define SCB_DTCMCR_RMW_Msk                 (1UL << SCB_DTCMCR_RMW_Pos)                    /*!< SCB DTCMCR: RMW Mask */
+
+#define SCB_DTCMCR_EN_Pos                   0                                             /*!< SCB DTCMCR: EN Position */
+#define SCB_DTCMCR_EN_Msk                  (1UL /*<< SCB_DTCMCR_EN_Pos*/)                 /*!< SCB DTCMCR: EN Mask */
+
+/* AHBP Control Register */
+#define SCB_AHBPCR_SZ_Pos                   1                                             /*!< SCB AHBPCR: SZ Position */
+#define SCB_AHBPCR_SZ_Msk                  (7UL << SCB_AHBPCR_SZ_Pos)                     /*!< SCB AHBPCR: SZ Mask */
+
+#define SCB_AHBPCR_EN_Pos                   0                                             /*!< SCB AHBPCR: EN Position */
+#define SCB_AHBPCR_EN_Msk                  (1UL /*<< SCB_AHBPCR_EN_Pos*/)                 /*!< SCB AHBPCR: EN Mask */
+
+/* L1 Cache Control Register */
+#define SCB_CACR_FORCEWT_Pos                2                                             /*!< SCB CACR: FORCEWT Position */
+#define SCB_CACR_FORCEWT_Msk               (1UL << SCB_CACR_FORCEWT_Pos)                  /*!< SCB CACR: FORCEWT Mask */
+
+#define SCB_CACR_ECCEN_Pos                  1                                             /*!< SCB CACR: ECCEN Position */
+#define SCB_CACR_ECCEN_Msk                 (1UL << SCB_CACR_ECCEN_Pos)                    /*!< SCB CACR: ECCEN Mask */
+
+#define SCB_CACR_SIWT_Pos                   0                                             /*!< SCB CACR: SIWT Position */
+#define SCB_CACR_SIWT_Msk                  (1UL /*<< SCB_CACR_SIWT_Pos*/)                 /*!< SCB CACR: SIWT Mask */
+
+/* AHBS control register */
+#define SCB_AHBSCR_INITCOUNT_Pos           11                                             /*!< SCB AHBSCR: INITCOUNT Position */
+#define SCB_AHBSCR_INITCOUNT_Msk           (0x1FUL << SCB_AHBPCR_INITCOUNT_Pos)           /*!< SCB AHBSCR: INITCOUNT Mask */
+
+#define SCB_AHBSCR_TPRI_Pos                 2                                             /*!< SCB AHBSCR: TPRI Position */
+#define SCB_AHBSCR_TPRI_Msk                (0x1FFUL << SCB_AHBPCR_TPRI_Pos)               /*!< SCB AHBSCR: TPRI Mask */
+
+#define SCB_AHBSCR_CTL_Pos                  0                                             /*!< SCB AHBSCR: CTL Position*/
+#define SCB_AHBSCR_CTL_Msk                 (3UL /*<< SCB_AHBPCR_CTL_Pos*/)                /*!< SCB AHBSCR: CTL Mask */
+
+/* Auxiliary Bus Fault Status Register */
+#define SCB_ABFSR_AXIMTYPE_Pos              8                                             /*!< SCB ABFSR: AXIMTYPE Position*/
+#define SCB_ABFSR_AXIMTYPE_Msk             (3UL << SCB_ABFSR_AXIMTYPE_Pos)                /*!< SCB ABFSR: AXIMTYPE Mask */
+
+#define SCB_ABFSR_EPPB_Pos                  4                                             /*!< SCB ABFSR: EPPB Position*/
+#define SCB_ABFSR_EPPB_Msk                 (1UL << SCB_ABFSR_EPPB_Pos)                    /*!< SCB ABFSR: EPPB Mask */
+
+#define SCB_ABFSR_AXIM_Pos                  3                                             /*!< SCB ABFSR: AXIM Position*/
+#define SCB_ABFSR_AXIM_Msk                 (1UL << SCB_ABFSR_AXIM_Pos)                    /*!< SCB ABFSR: AXIM Mask */
+
+#define SCB_ABFSR_AHBP_Pos                  2                                             /*!< SCB ABFSR: AHBP Position*/
+#define SCB_ABFSR_AHBP_Msk                 (1UL << SCB_ABFSR_AHBP_Pos)                    /*!< SCB ABFSR: AHBP Mask */
+
+#define SCB_ABFSR_DTCM_Pos                  1                                             /*!< SCB ABFSR: DTCM Position*/
+#define SCB_ABFSR_DTCM_Msk                 (1UL << SCB_ABFSR_DTCM_Pos)                    /*!< SCB ABFSR: DTCM Mask */
+
+#define SCB_ABFSR_ITCM_Pos                  0                                             /*!< SCB ABFSR: ITCM Position*/
+#define SCB_ABFSR_ITCM_Msk                 (1UL /*<< SCB_ABFSR_ITCM_Pos*/)                /*!< SCB ABFSR: ITCM Mask */
+
+/*@} end of group CMSIS_SCB */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB)
+    \brief      Type definitions for the System Control and ID Register not in the SCB
+  @{
+ */
+
+/** \brief  Structure type to access the System Control and ID Register not in the SCB.
+ */
+typedef struct
+{
+       uint32_t RESERVED0[1];
+  __I  uint32_t ICTR;                    /*!< Offset: 0x004 (R/ )  Interrupt Controller Type Register      */
+  __IO uint32_t ACTLR;                   /*!< Offset: 0x008 (R/W)  Auxiliary Control Register              */
+} SCnSCB_Type;
+
+/* Interrupt Controller Type Register Definitions */
+#define SCnSCB_ICTR_INTLINESNUM_Pos         0                                          /*!< ICTR: INTLINESNUM Position */
+#define SCnSCB_ICTR_INTLINESNUM_Msk        (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/)  /*!< ICTR: INTLINESNUM Mask */
+
+/* Auxiliary Control Register Definitions */
+#define SCnSCB_ACTLR_DISITMATBFLUSH_Pos    12                                          /*!< ACTLR: DISITMATBFLUSH Position */
+#define SCnSCB_ACTLR_DISITMATBFLUSH_Msk    (1UL << SCnSCB_ACTLR_DISITMATBFLUSH_Pos)    /*!< ACTLR: DISITMATBFLUSH Mask */
+
+#define SCnSCB_ACTLR_DISRAMODE_Pos         11                                          /*!< ACTLR: DISRAMODE Position */
+#define SCnSCB_ACTLR_DISRAMODE_Msk         (1UL << SCnSCB_ACTLR_DISRAMODE_Pos)         /*!< ACTLR: DISRAMODE Mask */
+
+#define SCnSCB_ACTLR_FPEXCODIS_Pos         10                                          /*!< ACTLR: FPEXCODIS Position */
+#define SCnSCB_ACTLR_FPEXCODIS_Msk         (1UL << SCnSCB_ACTLR_FPEXCODIS_Pos)         /*!< ACTLR: FPEXCODIS Mask */
+
+#define SCnSCB_ACTLR_DISFOLD_Pos            2                                          /*!< ACTLR: DISFOLD Position */
+#define SCnSCB_ACTLR_DISFOLD_Msk           (1UL << SCnSCB_ACTLR_DISFOLD_Pos)           /*!< ACTLR: DISFOLD Mask */
+
+#define SCnSCB_ACTLR_DISMCYCINT_Pos         0                                          /*!< ACTLR: DISMCYCINT Position */
+#define SCnSCB_ACTLR_DISMCYCINT_Msk        (1UL /*<< SCnSCB_ACTLR_DISMCYCINT_Pos*/)    /*!< ACTLR: DISMCYCINT Mask */
+
+/*@} end of group CMSIS_SCnotSCB */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_SysTick     System Tick Timer (SysTick)
+    \brief      Type definitions for the System Timer Registers.
+  @{
+ */
+
+/** \brief  Structure type to access the System Timer (SysTick).
+ */
+typedef struct
+{
+  __IO uint32_t CTRL;                    /*!< Offset: 0x000 (R/W)  SysTick Control and Status Register */
+  __IO uint32_t LOAD;                    /*!< Offset: 0x004 (R/W)  SysTick Reload Value Register       */
+  __IO uint32_t VAL;                     /*!< Offset: 0x008 (R/W)  SysTick Current Value Register      */
+  __I  uint32_t CALIB;                   /*!< Offset: 0x00C (R/ )  SysTick Calibration Register        */
+} SysTick_Type;
+
+/* SysTick Control / Status Register Definitions */
+#define SysTick_CTRL_COUNTFLAG_Pos         16                                             /*!< SysTick CTRL: COUNTFLAG Position */
+#define SysTick_CTRL_COUNTFLAG_Msk         (1UL << SysTick_CTRL_COUNTFLAG_Pos)            /*!< SysTick CTRL: COUNTFLAG Mask */
+
+#define SysTick_CTRL_CLKSOURCE_Pos          2                                             /*!< SysTick CTRL: CLKSOURCE Position */
+#define SysTick_CTRL_CLKSOURCE_Msk         (1UL << SysTick_CTRL_CLKSOURCE_Pos)            /*!< SysTick CTRL: CLKSOURCE Mask */
+
+#define SysTick_CTRL_TICKINT_Pos            1                                             /*!< SysTick CTRL: TICKINT Position */
+#define SysTick_CTRL_TICKINT_Msk           (1UL << SysTick_CTRL_TICKINT_Pos)              /*!< SysTick CTRL: TICKINT Mask */
+
+#define SysTick_CTRL_ENABLE_Pos             0                                             /*!< SysTick CTRL: ENABLE Position */
+#define SysTick_CTRL_ENABLE_Msk            (1UL /*<< SysTick_CTRL_ENABLE_Pos*/)           /*!< SysTick CTRL: ENABLE Mask */
+
+/* SysTick Reload Register Definitions */
+#define SysTick_LOAD_RELOAD_Pos             0                                             /*!< SysTick LOAD: RELOAD Position */
+#define SysTick_LOAD_RELOAD_Msk            (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/)    /*!< SysTick LOAD: RELOAD Mask */
+
+/* SysTick Current Register Definitions */
+#define SysTick_VAL_CURRENT_Pos             0                                             /*!< SysTick VAL: CURRENT Position */
+#define SysTick_VAL_CURRENT_Msk            (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/)    /*!< SysTick VAL: CURRENT Mask */
+
+/* SysTick Calibration Register Definitions */
+#define SysTick_CALIB_NOREF_Pos            31                                             /*!< SysTick CALIB: NOREF Position */
+#define SysTick_CALIB_NOREF_Msk            (1UL << SysTick_CALIB_NOREF_Pos)               /*!< SysTick CALIB: NOREF Mask */
+
+#define SysTick_CALIB_SKEW_Pos             30                                             /*!< SysTick CALIB: SKEW Position */
+#define SysTick_CALIB_SKEW_Msk             (1UL << SysTick_CALIB_SKEW_Pos)                /*!< SysTick CALIB: SKEW Mask */
+
+#define SysTick_CALIB_TENMS_Pos             0                                             /*!< SysTick CALIB: TENMS Position */
+#define SysTick_CALIB_TENMS_Msk            (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/)    /*!< SysTick CALIB: TENMS Mask */
+
+/*@} end of group CMSIS_SysTick */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_ITM     Instrumentation Trace Macrocell (ITM)
+    \brief      Type definitions for the Instrumentation Trace Macrocell (ITM)
+  @{
+ */
+
+/** \brief  Structure type to access the Instrumentation Trace Macrocell Register (ITM).
+ */
+typedef struct
+{
+  __O  union
+  {
+    __O  uint8_t    u8;                  /*!< Offset: 0x000 ( /W)  ITM Stimulus Port 8-bit                   */
+    __O  uint16_t   u16;                 /*!< Offset: 0x000 ( /W)  ITM Stimulus Port 16-bit                  */
+    __O  uint32_t   u32;                 /*!< Offset: 0x000 ( /W)  ITM Stimulus Port 32-bit                  */
+  }  PORT [32];                          /*!< Offset: 0x000 ( /W)  ITM Stimulus Port Registers               */
+       uint32_t RESERVED0[864];
+  __IO uint32_t TER;                     /*!< Offset: 0xE00 (R/W)  ITM Trace Enable Register                 */
+       uint32_t RESERVED1[15];
+  __IO uint32_t TPR;                     /*!< Offset: 0xE40 (R/W)  ITM Trace Privilege Register              */
+       uint32_t RESERVED2[15];
+  __IO uint32_t TCR;                     /*!< Offset: 0xE80 (R/W)  ITM Trace Control Register                */
+       uint32_t RESERVED3[29];
+  __O  uint32_t IWR;                     /*!< Offset: 0xEF8 ( /W)  ITM Integration Write Register            */
+  __I  uint32_t IRR;                     /*!< Offset: 0xEFC (R/ )  ITM Integration Read Register             */
+  __IO uint32_t IMCR;                    /*!< Offset: 0xF00 (R/W)  ITM Integration Mode Control Register     */
+       uint32_t RESERVED4[43];
+  __O  uint32_t LAR;                     /*!< Offset: 0xFB0 ( /W)  ITM Lock Access Register                  */
+  __I  uint32_t LSR;                     /*!< Offset: 0xFB4 (R/ )  ITM Lock Status Register                  */
+       uint32_t RESERVED5[6];
+  __I  uint32_t PID4;                    /*!< Offset: 0xFD0 (R/ )  ITM Peripheral Identification Register #4 */
+  __I  uint32_t PID5;                    /*!< Offset: 0xFD4 (R/ )  ITM Peripheral Identification Register #5 */
+  __I  uint32_t PID6;                    /*!< Offset: 0xFD8 (R/ )  ITM Peripheral Identification Register #6 */
+  __I  uint32_t PID7;                    /*!< Offset: 0xFDC (R/ )  ITM Peripheral Identification Register #7 */
+  __I  uint32_t PID0;                    /*!< Offset: 0xFE0 (R/ )  ITM Peripheral Identification Register #0 */
+  __I  uint32_t PID1;                    /*!< Offset: 0xFE4 (R/ )  ITM Peripheral Identification Register #1 */
+  __I  uint32_t PID2;                    /*!< Offset: 0xFE8 (R/ )  ITM Peripheral Identification Register #2 */
+  __I  uint32_t PID3;                    /*!< Offset: 0xFEC (R/ )  ITM Peripheral Identification Register #3 */
+  __I  uint32_t CID0;                    /*!< Offset: 0xFF0 (R/ )  ITM Component  Identification Register #0 */
+  __I  uint32_t CID1;                    /*!< Offset: 0xFF4 (R/ )  ITM Component  Identification Register #1 */
+  __I  uint32_t CID2;                    /*!< Offset: 0xFF8 (R/ )  ITM Component  Identification Register #2 */
+  __I  uint32_t CID3;                    /*!< Offset: 0xFFC (R/ )  ITM Component  Identification Register #3 */
+} ITM_Type;
+
+/* ITM Trace Privilege Register Definitions */
+#define ITM_TPR_PRIVMASK_Pos                0                                             /*!< ITM TPR: PRIVMASK Position */
+#define ITM_TPR_PRIVMASK_Msk               (0xFUL /*<< ITM_TPR_PRIVMASK_Pos*/)            /*!< ITM TPR: PRIVMASK Mask */
+
+/* ITM Trace Control Register Definitions */
+#define ITM_TCR_BUSY_Pos                   23                                             /*!< ITM TCR: BUSY Position */
+#define ITM_TCR_BUSY_Msk                   (1UL << ITM_TCR_BUSY_Pos)                      /*!< ITM TCR: BUSY Mask */
+
+#define ITM_TCR_TraceBusID_Pos             16                                             /*!< ITM TCR: ATBID Position */
+#define ITM_TCR_TraceBusID_Msk             (0x7FUL << ITM_TCR_TraceBusID_Pos)             /*!< ITM TCR: ATBID Mask */
+
+#define ITM_TCR_GTSFREQ_Pos                10                                             /*!< ITM TCR: Global timestamp frequency Position */
+#define ITM_TCR_GTSFREQ_Msk                (3UL << ITM_TCR_GTSFREQ_Pos)                   /*!< ITM TCR: Global timestamp frequency Mask */
+
+#define ITM_TCR_TSPrescale_Pos              8                                             /*!< ITM TCR: TSPrescale Position */
+#define ITM_TCR_TSPrescale_Msk             (3UL << ITM_TCR_TSPrescale_Pos)                /*!< ITM TCR: TSPrescale Mask */
+
+#define ITM_TCR_SWOENA_Pos                  4                                             /*!< ITM TCR: SWOENA Position */
+#define ITM_TCR_SWOENA_Msk                 (1UL << ITM_TCR_SWOENA_Pos)                    /*!< ITM TCR: SWOENA Mask */
+
+#define ITM_TCR_DWTENA_Pos                  3                                             /*!< ITM TCR: DWTENA Position */
+#define ITM_TCR_DWTENA_Msk                 (1UL << ITM_TCR_DWTENA_Pos)                    /*!< ITM TCR: DWTENA Mask */
+
+#define ITM_TCR_SYNCENA_Pos                 2                                             /*!< ITM TCR: SYNCENA Position */
+#define ITM_TCR_SYNCENA_Msk                (1UL << ITM_TCR_SYNCENA_Pos)                   /*!< ITM TCR: SYNCENA Mask */
+
+#define ITM_TCR_TSENA_Pos                   1                                             /*!< ITM TCR: TSENA Position */
+#define ITM_TCR_TSENA_Msk                  (1UL << ITM_TCR_TSENA_Pos)                     /*!< ITM TCR: TSENA Mask */
+
+#define ITM_TCR_ITMENA_Pos                  0                                             /*!< ITM TCR: ITM Enable bit Position */
+#define ITM_TCR_ITMENA_Msk                 (1UL /*<< ITM_TCR_ITMENA_Pos*/)                /*!< ITM TCR: ITM Enable bit Mask */
+
+/* ITM Integration Write Register Definitions */
+#define ITM_IWR_ATVALIDM_Pos                0                                             /*!< ITM IWR: ATVALIDM Position */
+#define ITM_IWR_ATVALIDM_Msk               (1UL /*<< ITM_IWR_ATVALIDM_Pos*/)              /*!< ITM IWR: ATVALIDM Mask */
+
+/* ITM Integration Read Register Definitions */
+#define ITM_IRR_ATREADYM_Pos                0                                             /*!< ITM IRR: ATREADYM Position */
+#define ITM_IRR_ATREADYM_Msk               (1UL /*<< ITM_IRR_ATREADYM_Pos*/)              /*!< ITM IRR: ATREADYM Mask */
+
+/* ITM Integration Mode Control Register Definitions */
+#define ITM_IMCR_INTEGRATION_Pos            0                                             /*!< ITM IMCR: INTEGRATION Position */
+#define ITM_IMCR_INTEGRATION_Msk           (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/)          /*!< ITM IMCR: INTEGRATION Mask */
+
+/* ITM Lock Status Register Definitions */
+#define ITM_LSR_ByteAcc_Pos                 2                                             /*!< ITM LSR: ByteAcc Position */
+#define ITM_LSR_ByteAcc_Msk                (1UL << ITM_LSR_ByteAcc_Pos)                   /*!< ITM LSR: ByteAcc Mask */
+
+#define ITM_LSR_Access_Pos                  1                                             /*!< ITM LSR: Access Position */
+#define ITM_LSR_Access_Msk                 (1UL << ITM_LSR_Access_Pos)                    /*!< ITM LSR: Access Mask */
+
+#define ITM_LSR_Present_Pos                 0                                             /*!< ITM LSR: Present Position */
+#define ITM_LSR_Present_Msk                (1UL /*<< ITM_LSR_Present_Pos*/)               /*!< ITM LSR: Present Mask */
+
+/*@}*/ /* end of group CMSIS_ITM */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_DWT     Data Watchpoint and Trace (DWT)
+    \brief      Type definitions for the Data Watchpoint and Trace (DWT)
+  @{
+ */
+
+/** \brief  Structure type to access the Data Watchpoint and Trace Register (DWT).
+ */
+typedef struct
+{
+  __IO uint32_t CTRL;                    /*!< Offset: 0x000 (R/W)  Control Register                          */
+  __IO uint32_t CYCCNT;                  /*!< Offset: 0x004 (R/W)  Cycle Count Register                      */
+  __IO uint32_t CPICNT;                  /*!< Offset: 0x008 (R/W)  CPI Count Register                        */
+  __IO uint32_t EXCCNT;                  /*!< Offset: 0x00C (R/W)  Exception Overhead Count Register         */
+  __IO uint32_t SLEEPCNT;                /*!< Offset: 0x010 (R/W)  Sleep Count Register                      */
+  __IO uint32_t LSUCNT;                  /*!< Offset: 0x014 (R/W)  LSU Count Register                        */
+  __IO uint32_t FOLDCNT;                 /*!< Offset: 0x018 (R/W)  Folded-instruction Count Register         */
+  __I  uint32_t PCSR;                    /*!< Offset: 0x01C (R/ )  Program Counter Sample Register           */
+  __IO uint32_t COMP0;                   /*!< Offset: 0x020 (R/W)  Comparator Register 0                     */
+  __IO uint32_t MASK0;                   /*!< Offset: 0x024 (R/W)  Mask Register 0                           */
+  __IO uint32_t FUNCTION0;               /*!< Offset: 0x028 (R/W)  Function Register 0                       */
+       uint32_t RESERVED0[1];
+  __IO uint32_t COMP1;                   /*!< Offset: 0x030 (R/W)  Comparator Register 1                     */
+  __IO uint32_t MASK1;                   /*!< Offset: 0x034 (R/W)  Mask Register 1                           */
+  __IO uint32_t FUNCTION1;               /*!< Offset: 0x038 (R/W)  Function Register 1                       */
+       uint32_t RESERVED1[1];
+  __IO uint32_t COMP2;                   /*!< Offset: 0x040 (R/W)  Comparator Register 2                     */
+  __IO uint32_t MASK2;                   /*!< Offset: 0x044 (R/W)  Mask Register 2                           */
+  __IO uint32_t FUNCTION2;               /*!< Offset: 0x048 (R/W)  Function Register 2                       */
+       uint32_t RESERVED2[1];
+  __IO uint32_t COMP3;                   /*!< Offset: 0x050 (R/W)  Comparator Register 3                     */
+  __IO uint32_t MASK3;                   /*!< Offset: 0x054 (R/W)  Mask Register 3                           */
+  __IO uint32_t FUNCTION3;               /*!< Offset: 0x058 (R/W)  Function Register 3                       */
+       uint32_t RESERVED3[981];
+  __O  uint32_t LAR;                     /*!< Offset: 0xFB0 (  W)  Lock Access Register                      */
+  __I  uint32_t LSR;                     /*!< Offset: 0xFB4 (R  )  Lock Status Register                      */
+} DWT_Type;
+
+/* DWT Control Register Definitions */
+#define DWT_CTRL_NUMCOMP_Pos               28                                          /*!< DWT CTRL: NUMCOMP Position */
+#define DWT_CTRL_NUMCOMP_Msk               (0xFUL << DWT_CTRL_NUMCOMP_Pos)             /*!< DWT CTRL: NUMCOMP Mask */
+
+#define DWT_CTRL_NOTRCPKT_Pos              27                                          /*!< DWT CTRL: NOTRCPKT Position */
+#define DWT_CTRL_NOTRCPKT_Msk              (0x1UL << DWT_CTRL_NOTRCPKT_Pos)            /*!< DWT CTRL: NOTRCPKT Mask */
+
+#define DWT_CTRL_NOEXTTRIG_Pos             26                                          /*!< DWT CTRL: NOEXTTRIG Position */
+#define DWT_CTRL_NOEXTTRIG_Msk             (0x1UL << DWT_CTRL_NOEXTTRIG_Pos)           /*!< DWT CTRL: NOEXTTRIG Mask */
+
+#define DWT_CTRL_NOCYCCNT_Pos              25                                          /*!< DWT CTRL: NOCYCCNT Position */
+#define DWT_CTRL_NOCYCCNT_Msk              (0x1UL << DWT_CTRL_NOCYCCNT_Pos)            /*!< DWT CTRL: NOCYCCNT Mask */
+
+#define DWT_CTRL_NOPRFCNT_Pos              24                                          /*!< DWT CTRL: NOPRFCNT Position */
+#define DWT_CTRL_NOPRFCNT_Msk              (0x1UL << DWT_CTRL_NOPRFCNT_Pos)            /*!< DWT CTRL: NOPRFCNT Mask */
+
+#define DWT_CTRL_CYCEVTENA_Pos             22                                          /*!< DWT CTRL: CYCEVTENA Position */
+#define DWT_CTRL_CYCEVTENA_Msk             (0x1UL << DWT_CTRL_CYCEVTENA_Pos)           /*!< DWT CTRL: CYCEVTENA Mask */
+
+#define DWT_CTRL_FOLDEVTENA_Pos            21                                          /*!< DWT CTRL: FOLDEVTENA Position */
+#define DWT_CTRL_FOLDEVTENA_Msk            (0x1UL << DWT_CTRL_FOLDEVTENA_Pos)          /*!< DWT CTRL: FOLDEVTENA Mask */
+
+#define DWT_CTRL_LSUEVTENA_Pos             20                                          /*!< DWT CTRL: LSUEVTENA Position */
+#define DWT_CTRL_LSUEVTENA_Msk             (0x1UL << DWT_CTRL_LSUEVTENA_Pos)           /*!< DWT CTRL: LSUEVTENA Mask */
+
+#define DWT_CTRL_SLEEPEVTENA_Pos           19                                          /*!< DWT CTRL: SLEEPEVTENA Position */
+#define DWT_CTRL_SLEEPEVTENA_Msk           (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos)         /*!< DWT CTRL: SLEEPEVTENA Mask */
+
+#define DWT_CTRL_EXCEVTENA_Pos             18                                          /*!< DWT CTRL: EXCEVTENA Position */
+#define DWT_CTRL_EXCEVTENA_Msk             (0x1UL << DWT_CTRL_EXCEVTENA_Pos)           /*!< DWT CTRL: EXCEVTENA Mask */
+
+#define DWT_CTRL_CPIEVTENA_Pos             17                                          /*!< DWT CTRL: CPIEVTENA Position */
+#define DWT_CTRL_CPIEVTENA_Msk             (0x1UL << DWT_CTRL_CPIEVTENA_Pos)           /*!< DWT CTRL: CPIEVTENA Mask */
+
+#define DWT_CTRL_EXCTRCENA_Pos             16                                          /*!< DWT CTRL: EXCTRCENA Position */
+#define DWT_CTRL_EXCTRCENA_Msk             (0x1UL << DWT_CTRL_EXCTRCENA_Pos)           /*!< DWT CTRL: EXCTRCENA Mask */
+
+#define DWT_CTRL_PCSAMPLENA_Pos            12                                          /*!< DWT CTRL: PCSAMPLENA Position */
+#define DWT_CTRL_PCSAMPLENA_Msk            (0x1UL << DWT_CTRL_PCSAMPLENA_Pos)          /*!< DWT CTRL: PCSAMPLENA Mask */
+
+#define DWT_CTRL_SYNCTAP_Pos               10                                          /*!< DWT CTRL: SYNCTAP Position */
+#define DWT_CTRL_SYNCTAP_Msk               (0x3UL << DWT_CTRL_SYNCTAP_Pos)             /*!< DWT CTRL: SYNCTAP Mask */
+
+#define DWT_CTRL_CYCTAP_Pos                 9                                          /*!< DWT CTRL: CYCTAP Position */
+#define DWT_CTRL_CYCTAP_Msk                (0x1UL << DWT_CTRL_CYCTAP_Pos)              /*!< DWT CTRL: CYCTAP Mask */
+
+#define DWT_CTRL_POSTINIT_Pos               5                                          /*!< DWT CTRL: POSTINIT Position */
+#define DWT_CTRL_POSTINIT_Msk              (0xFUL << DWT_CTRL_POSTINIT_Pos)            /*!< DWT CTRL: POSTINIT Mask */
+
+#define DWT_CTRL_POSTPRESET_Pos             1                                          /*!< DWT CTRL: POSTPRESET Position */
+#define DWT_CTRL_POSTPRESET_Msk            (0xFUL << DWT_CTRL_POSTPRESET_Pos)          /*!< DWT CTRL: POSTPRESET Mask */
+
+#define DWT_CTRL_CYCCNTENA_Pos              0                                          /*!< DWT CTRL: CYCCNTENA Position */
+#define DWT_CTRL_CYCCNTENA_Msk             (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/)       /*!< DWT CTRL: CYCCNTENA Mask */
+
+/* DWT CPI Count Register Definitions */
+#define DWT_CPICNT_CPICNT_Pos               0                                          /*!< DWT CPICNT: CPICNT Position */
+#define DWT_CPICNT_CPICNT_Msk              (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/)       /*!< DWT CPICNT: CPICNT Mask */
+
+/* DWT Exception Overhead Count Register Definitions */
+#define DWT_EXCCNT_EXCCNT_Pos               0                                          /*!< DWT EXCCNT: EXCCNT Position */
+#define DWT_EXCCNT_EXCCNT_Msk              (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/)       /*!< DWT EXCCNT: EXCCNT Mask */
+
+/* DWT Sleep Count Register Definitions */
+#define DWT_SLEEPCNT_SLEEPCNT_Pos           0                                          /*!< DWT SLEEPCNT: SLEEPCNT Position */
+#define DWT_SLEEPCNT_SLEEPCNT_Msk          (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/)   /*!< DWT SLEEPCNT: SLEEPCNT Mask */
+
+/* DWT LSU Count Register Definitions */
+#define DWT_LSUCNT_LSUCNT_Pos               0                                          /*!< DWT LSUCNT: LSUCNT Position */
+#define DWT_LSUCNT_LSUCNT_Msk              (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/)       /*!< DWT LSUCNT: LSUCNT Mask */
+
+/* DWT Folded-instruction Count Register Definitions */
+#define DWT_FOLDCNT_FOLDCNT_Pos             0                                          /*!< DWT FOLDCNT: FOLDCNT Position */
+#define DWT_FOLDCNT_FOLDCNT_Msk            (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/)     /*!< DWT FOLDCNT: FOLDCNT Mask */
+
+/* DWT Comparator Mask Register Definitions */
+#define DWT_MASK_MASK_Pos                   0                                          /*!< DWT MASK: MASK Position */
+#define DWT_MASK_MASK_Msk                  (0x1FUL /*<< DWT_MASK_MASK_Pos*/)           /*!< DWT MASK: MASK Mask */
+
+/* DWT Comparator Function Register Definitions */
+#define DWT_FUNCTION_MATCHED_Pos           24                                          /*!< DWT FUNCTION: MATCHED Position */
+#define DWT_FUNCTION_MATCHED_Msk           (0x1UL << DWT_FUNCTION_MATCHED_Pos)         /*!< DWT FUNCTION: MATCHED Mask */
+
+#define DWT_FUNCTION_DATAVADDR1_Pos        16                                          /*!< DWT FUNCTION: DATAVADDR1 Position */
+#define DWT_FUNCTION_DATAVADDR1_Msk        (0xFUL << DWT_FUNCTION_DATAVADDR1_Pos)      /*!< DWT FUNCTION: DATAVADDR1 Mask */
+
+#define DWT_FUNCTION_DATAVADDR0_Pos        12                                          /*!< DWT FUNCTION: DATAVADDR0 Position */
+#define DWT_FUNCTION_DATAVADDR0_Msk        (0xFUL << DWT_FUNCTION_DATAVADDR0_Pos)      /*!< DWT FUNCTION: DATAVADDR0 Mask */
+
+#define DWT_FUNCTION_DATAVSIZE_Pos         10                                          /*!< DWT FUNCTION: DATAVSIZE Position */
+#define DWT_FUNCTION_DATAVSIZE_Msk         (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos)       /*!< DWT FUNCTION: DATAVSIZE Mask */
+
+#define DWT_FUNCTION_LNK1ENA_Pos            9                                          /*!< DWT FUNCTION: LNK1ENA Position */
+#define DWT_FUNCTION_LNK1ENA_Msk           (0x1UL << DWT_FUNCTION_LNK1ENA_Pos)         /*!< DWT FUNCTION: LNK1ENA Mask */
+
+#define DWT_FUNCTION_DATAVMATCH_Pos         8                                          /*!< DWT FUNCTION: DATAVMATCH Position */
+#define DWT_FUNCTION_DATAVMATCH_Msk        (0x1UL << DWT_FUNCTION_DATAVMATCH_Pos)      /*!< DWT FUNCTION: DATAVMATCH Mask */
+
+#define DWT_FUNCTION_CYCMATCH_Pos           7                                          /*!< DWT FUNCTION: CYCMATCH Position */
+#define DWT_FUNCTION_CYCMATCH_Msk          (0x1UL << DWT_FUNCTION_CYCMATCH_Pos)        /*!< DWT FUNCTION: CYCMATCH Mask */
+
+#define DWT_FUNCTION_EMITRANGE_Pos          5                                          /*!< DWT FUNCTION: EMITRANGE Position */
+#define DWT_FUNCTION_EMITRANGE_Msk         (0x1UL << DWT_FUNCTION_EMITRANGE_Pos)       /*!< DWT FUNCTION: EMITRANGE Mask */
+
+#define DWT_FUNCTION_FUNCTION_Pos           0                                          /*!< DWT FUNCTION: FUNCTION Position */
+#define DWT_FUNCTION_FUNCTION_Msk          (0xFUL /*<< DWT_FUNCTION_FUNCTION_Pos*/)    /*!< DWT FUNCTION: FUNCTION Mask */
+
+/*@}*/ /* end of group CMSIS_DWT */
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_TPI     Trace Port Interface (TPI)
+    \brief      Type definitions for the Trace Port Interface (TPI)
+  @{
+ */
+
+/** \brief  Structure type to access the Trace Port Interface Register (TPI).
+ */
+typedef struct
+{
+  __IO uint32_t SSPSR;                   /*!< Offset: 0x000 (R/ )  Supported Parallel Port Size Register     */
+  __IO uint32_t CSPSR;                   /*!< Offset: 0x004 (R/W)  Current Parallel Port Size Register */
+       uint32_t RESERVED0[2];
+  __IO uint32_t ACPR;                    /*!< Offset: 0x010 (R/W)  Asynchronous Clock Prescaler Register */
+       uint32_t RESERVED1[55];
+  __IO uint32_t SPPR;                    /*!< Offset: 0x0F0 (R/W)  Selected Pin Protocol Register */
+       uint32_t RESERVED2[131];
+  __I  uint32_t FFSR;                    /*!< Offset: 0x300 (R/ )  Formatter and Flush Status Register */
+  __IO uint32_t FFCR;                    /*!< Offset: 0x304 (R/W)  Formatter and Flush Control Register */
+  __I  uint32_t FSCR;                    /*!< Offset: 0x308 (R/ )  Formatter Synchronization Counter Register */
+       uint32_t RESERVED3[759];
+  __I  uint32_t TRIGGER;                 /*!< Offset: 0xEE8 (R/ )  TRIGGER */
+  __I  uint32_t FIFO0;                   /*!< Offset: 0xEEC (R/ )  Integration ETM Data */
+  __I  uint32_t ITATBCTR2;               /*!< Offset: 0xEF0 (R/ )  ITATBCTR2 */
+       uint32_t RESERVED4[1];
+  __I  uint32_t ITATBCTR0;               /*!< Offset: 0xEF8 (R/ )  ITATBCTR0 */
+  __I  uint32_t FIFO1;                   /*!< Offset: 0xEFC (R/ )  Integration ITM Data */
+  __IO uint32_t ITCTRL;                  /*!< Offset: 0xF00 (R/W)  Integration Mode Control */
+       uint32_t RESERVED5[39];
+  __IO uint32_t CLAIMSET;                /*!< Offset: 0xFA0 (R/W)  Claim tag set */
+  __IO uint32_t CLAIMCLR;                /*!< Offset: 0xFA4 (R/W)  Claim tag clear */
+       uint32_t RESERVED7[8];
+  __I  uint32_t DEVID;                   /*!< Offset: 0xFC8 (R/ )  TPIU_DEVID */
+  __I  uint32_t DEVTYPE;                 /*!< Offset: 0xFCC (R/ )  TPIU_DEVTYPE */
+} TPI_Type;
+
+/* TPI Asynchronous Clock Prescaler Register Definitions */
+#define TPI_ACPR_PRESCALER_Pos              0                                          /*!< TPI ACPR: PRESCALER Position */
+#define TPI_ACPR_PRESCALER_Msk             (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/)    /*!< TPI ACPR: PRESCALER Mask */
+
+/* TPI Selected Pin Protocol Register Definitions */
+#define TPI_SPPR_TXMODE_Pos                 0                                          /*!< TPI SPPR: TXMODE Position */
+#define TPI_SPPR_TXMODE_Msk                (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/)          /*!< TPI SPPR: TXMODE Mask */
+
+/* TPI Formatter and Flush Status Register Definitions */
+#define TPI_FFSR_FtNonStop_Pos              3                                          /*!< TPI FFSR: FtNonStop Position */
+#define TPI_FFSR_FtNonStop_Msk             (0x1UL << TPI_FFSR_FtNonStop_Pos)           /*!< TPI FFSR: FtNonStop Mask */
+
+#define TPI_FFSR_TCPresent_Pos              2                                          /*!< TPI FFSR: TCPresent Position */
+#define TPI_FFSR_TCPresent_Msk             (0x1UL << TPI_FFSR_TCPresent_Pos)           /*!< TPI FFSR: TCPresent Mask */
+
+#define TPI_FFSR_FtStopped_Pos              1                                          /*!< TPI FFSR: FtStopped Position */
+#define TPI_FFSR_FtStopped_Msk             (0x1UL << TPI_FFSR_FtStopped_Pos)           /*!< TPI FFSR: FtStopped Mask */
+
+#define TPI_FFSR_FlInProg_Pos               0                                          /*!< TPI FFSR: FlInProg Position */
+#define TPI_FFSR_FlInProg_Msk              (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/)        /*!< TPI FFSR: FlInProg Mask */
+
+/* TPI Formatter and Flush Control Register Definitions */
+#define TPI_FFCR_TrigIn_Pos                 8                                          /*!< TPI FFCR: TrigIn Position */
+#define TPI_FFCR_TrigIn_Msk                (0x1UL << TPI_FFCR_TrigIn_Pos)              /*!< TPI FFCR: TrigIn Mask */
+
+#define TPI_FFCR_EnFCont_Pos                1                                          /*!< TPI FFCR: EnFCont Position */
+#define TPI_FFCR_EnFCont_Msk               (0x1UL << TPI_FFCR_EnFCont_Pos)             /*!< TPI FFCR: EnFCont Mask */
+
+/* TPI TRIGGER Register Definitions */
+#define TPI_TRIGGER_TRIGGER_Pos             0                                          /*!< TPI TRIGGER: TRIGGER Position */
+#define TPI_TRIGGER_TRIGGER_Msk            (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/)      /*!< TPI TRIGGER: TRIGGER Mask */
+
+/* TPI Integration ETM Data Register Definitions (FIFO0) */
+#define TPI_FIFO0_ITM_ATVALID_Pos          29                                          /*!< TPI FIFO0: ITM_ATVALID Position */
+#define TPI_FIFO0_ITM_ATVALID_Msk          (0x3UL << TPI_FIFO0_ITM_ATVALID_Pos)        /*!< TPI FIFO0: ITM_ATVALID Mask */
+
+#define TPI_FIFO0_ITM_bytecount_Pos        27                                          /*!< TPI FIFO0: ITM_bytecount Position */
+#define TPI_FIFO0_ITM_bytecount_Msk        (0x3UL << TPI_FIFO0_ITM_bytecount_Pos)      /*!< TPI FIFO0: ITM_bytecount Mask */
+
+#define TPI_FIFO0_ETM_ATVALID_Pos          26                                          /*!< TPI FIFO0: ETM_ATVALID Position */
+#define TPI_FIFO0_ETM_ATVALID_Msk          (0x3UL << TPI_FIFO0_ETM_ATVALID_Pos)        /*!< TPI FIFO0: ETM_ATVALID Mask */
+
+#define TPI_FIFO0_ETM_bytecount_Pos        24                                          /*!< TPI FIFO0: ETM_bytecount Position */
+#define TPI_FIFO0_ETM_bytecount_Msk        (0x3UL << TPI_FIFO0_ETM_bytecount_Pos)      /*!< TPI FIFO0: ETM_bytecount Mask */
+
+#define TPI_FIFO0_ETM2_Pos                 16                                          /*!< TPI FIFO0: ETM2 Position */
+#define TPI_FIFO0_ETM2_Msk                 (0xFFUL << TPI_FIFO0_ETM2_Pos)              /*!< TPI FIFO0: ETM2 Mask */
+
+#define TPI_FIFO0_ETM1_Pos                  8                                          /*!< TPI FIFO0: ETM1 Position */
+#define TPI_FIFO0_ETM1_Msk                 (0xFFUL << TPI_FIFO0_ETM1_Pos)              /*!< TPI FIFO0: ETM1 Mask */
+
+#define TPI_FIFO0_ETM0_Pos                  0                                          /*!< TPI FIFO0: ETM0 Position */
+#define TPI_FIFO0_ETM0_Msk                 (0xFFUL /*<< TPI_FIFO0_ETM0_Pos*/)          /*!< TPI FIFO0: ETM0 Mask */
+
+/* TPI ITATBCTR2 Register Definitions */
+#define TPI_ITATBCTR2_ATREADY_Pos           0                                          /*!< TPI ITATBCTR2: ATREADY Position */
+#define TPI_ITATBCTR2_ATREADY_Msk          (0x1UL /*<< TPI_ITATBCTR2_ATREADY_Pos*/)    /*!< TPI ITATBCTR2: ATREADY Mask */
+
+/* TPI Integration ITM Data Register Definitions (FIFO1) */
+#define TPI_FIFO1_ITM_ATVALID_Pos          29                                          /*!< TPI FIFO1: ITM_ATVALID Position */
+#define TPI_FIFO1_ITM_ATVALID_Msk          (0x3UL << TPI_FIFO1_ITM_ATVALID_Pos)        /*!< TPI FIFO1: ITM_ATVALID Mask */
+
+#define TPI_FIFO1_ITM_bytecount_Pos        27                                          /*!< TPI FIFO1: ITM_bytecount Position */
+#define TPI_FIFO1_ITM_bytecount_Msk        (0x3UL << TPI_FIFO1_ITM_bytecount_Pos)      /*!< TPI FIFO1: ITM_bytecount Mask */
+
+#define TPI_FIFO1_ETM_ATVALID_Pos          26                                          /*!< TPI FIFO1: ETM_ATVALID Position */
+#define TPI_FIFO1_ETM_ATVALID_Msk          (0x3UL << TPI_FIFO1_ETM_ATVALID_Pos)        /*!< TPI FIFO1: ETM_ATVALID Mask */
+
+#define TPI_FIFO1_ETM_bytecount_Pos        24                                          /*!< TPI FIFO1: ETM_bytecount Position */
+#define TPI_FIFO1_ETM_bytecount_Msk        (0x3UL << TPI_FIFO1_ETM_bytecount_Pos)      /*!< TPI FIFO1: ETM_bytecount Mask */
+
+#define TPI_FIFO1_ITM2_Pos                 16                                          /*!< TPI FIFO1: ITM2 Position */
+#define TPI_FIFO1_ITM2_Msk                 (0xFFUL << TPI_FIFO1_ITM2_Pos)              /*!< TPI FIFO1: ITM2 Mask */
+
+#define TPI_FIFO1_ITM1_Pos                  8                                          /*!< TPI FIFO1: ITM1 Position */
+#define TPI_FIFO1_ITM1_Msk                 (0xFFUL << TPI_FIFO1_ITM1_Pos)              /*!< TPI FIFO1: ITM1 Mask */
+
+#define TPI_FIFO1_ITM0_Pos                  0                                          /*!< TPI FIFO1: ITM0 Position */
+#define TPI_FIFO1_ITM0_Msk                 (0xFFUL /*<< TPI_FIFO1_ITM0_Pos*/)          /*!< TPI FIFO1: ITM0 Mask */
+
+/* TPI ITATBCTR0 Register Definitions */
+#define TPI_ITATBCTR0_ATREADY_Pos           0                                          /*!< TPI ITATBCTR0: ATREADY Position */
+#define TPI_ITATBCTR0_ATREADY_Msk          (0x1UL /*<< TPI_ITATBCTR0_ATREADY_Pos*/)    /*!< TPI ITATBCTR0: ATREADY Mask */
+
+/* TPI Integration Mode Control Register Definitions */
+#define TPI_ITCTRL_Mode_Pos                 0                                          /*!< TPI ITCTRL: Mode Position */
+#define TPI_ITCTRL_Mode_Msk                (0x1UL /*<< TPI_ITCTRL_Mode_Pos*/)          /*!< TPI ITCTRL: Mode Mask */
+
+/* TPI DEVID Register Definitions */
+#define TPI_DEVID_NRZVALID_Pos             11                                          /*!< TPI DEVID: NRZVALID Position */
+#define TPI_DEVID_NRZVALID_Msk             (0x1UL << TPI_DEVID_NRZVALID_Pos)           /*!< TPI DEVID: NRZVALID Mask */
+
+#define TPI_DEVID_MANCVALID_Pos            10                                          /*!< TPI DEVID: MANCVALID Position */
+#define TPI_DEVID_MANCVALID_Msk            (0x1UL << TPI_DEVID_MANCVALID_Pos)          /*!< TPI DEVID: MANCVALID Mask */
+
+#define TPI_DEVID_PTINVALID_Pos             9                                          /*!< TPI DEVID: PTINVALID Position */
+#define TPI_DEVID_PTINVALID_Msk            (0x1UL << TPI_DEVID_PTINVALID_Pos)          /*!< TPI DEVID: PTINVALID Mask */
+
+#define TPI_DEVID_MinBufSz_Pos              6                                          /*!< TPI DEVID: MinBufSz Position */
+#define TPI_DEVID_MinBufSz_Msk             (0x7UL << TPI_DEVID_MinBufSz_Pos)           /*!< TPI DEVID: MinBufSz Mask */
+
+#define TPI_DEVID_AsynClkIn_Pos             5                                          /*!< TPI DEVID: AsynClkIn Position */
+#define TPI_DEVID_AsynClkIn_Msk            (0x1UL << TPI_DEVID_AsynClkIn_Pos)          /*!< TPI DEVID: AsynClkIn Mask */
+
+#define TPI_DEVID_NrTraceInput_Pos          0                                          /*!< TPI DEVID: NrTraceInput Position */
+#define TPI_DEVID_NrTraceInput_Msk         (0x1FUL /*<< TPI_DEVID_NrTraceInput_Pos*/)  /*!< TPI DEVID: NrTraceInput Mask */
+
+/* TPI DEVTYPE Register Definitions */
+#define TPI_DEVTYPE_MajorType_Pos           4                                          /*!< TPI DEVTYPE: MajorType Position */
+#define TPI_DEVTYPE_MajorType_Msk          (0xFUL << TPI_DEVTYPE_MajorType_Pos)        /*!< TPI DEVTYPE: MajorType Mask */
+
+#define TPI_DEVTYPE_SubType_Pos             0                                          /*!< TPI DEVTYPE: SubType Position */
+#define TPI_DEVTYPE_SubType_Msk            (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/)      /*!< TPI DEVTYPE: SubType Mask */
+
+/*@}*/ /* end of group CMSIS_TPI */
+
+
+#if (__MPU_PRESENT == 1)
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_MPU     Memory Protection Unit (MPU)
+    \brief      Type definitions for the Memory Protection Unit (MPU)
+  @{
+ */
+
+/** \brief  Structure type to access the Memory Protection Unit (MPU).
+ */
+typedef struct
+{
+  __I  uint32_t TYPE;                    /*!< Offset: 0x000 (R/ )  MPU Type Register                              */
+  __IO uint32_t CTRL;                    /*!< Offset: 0x004 (R/W)  MPU Control Register                           */
+  __IO uint32_t RNR;                     /*!< Offset: 0x008 (R/W)  MPU Region RNRber Register                     */
+  __IO uint32_t RBAR;                    /*!< Offset: 0x00C (R/W)  MPU Region Base Address Register               */
+  __IO uint32_t RASR;                    /*!< Offset: 0x010 (R/W)  MPU Region Attribute and Size Register         */
+  __IO uint32_t RBAR_A1;                 /*!< Offset: 0x014 (R/W)  MPU Alias 1 Region Base Address Register       */
+  __IO uint32_t RASR_A1;                 /*!< Offset: 0x018 (R/W)  MPU Alias 1 Region Attribute and Size Register */
+  __IO uint32_t RBAR_A2;                 /*!< Offset: 0x01C (R/W)  MPU Alias 2 Region Base Address Register       */
+  __IO uint32_t RASR_A2;                 /*!< Offset: 0x020 (R/W)  MPU Alias 2 Region Attribute and Size Register */
+  __IO uint32_t RBAR_A3;                 /*!< Offset: 0x024 (R/W)  MPU Alias 3 Region Base Address Register       */
+  __IO uint32_t RASR_A3;                 /*!< Offset: 0x028 (R/W)  MPU Alias 3 Region Attribute and Size Register */
+} MPU_Type;
+
+/* MPU Type Register */
+#define MPU_TYPE_IREGION_Pos               16                                             /*!< MPU TYPE: IREGION Position */
+#define MPU_TYPE_IREGION_Msk               (0xFFUL << MPU_TYPE_IREGION_Pos)               /*!< MPU TYPE: IREGION Mask */
+
+#define MPU_TYPE_DREGION_Pos                8                                             /*!< MPU TYPE: DREGION Position */
+#define MPU_TYPE_DREGION_Msk               (0xFFUL << MPU_TYPE_DREGION_Pos)               /*!< MPU TYPE: DREGION Mask */
+
+#define MPU_TYPE_SEPARATE_Pos               0                                             /*!< MPU TYPE: SEPARATE Position */
+#define MPU_TYPE_SEPARATE_Msk              (1UL /*<< MPU_TYPE_SEPARATE_Pos*/)             /*!< MPU TYPE: SEPARATE Mask */
+
+/* MPU Control Register */
+#define MPU_CTRL_PRIVDEFENA_Pos             2                                             /*!< MPU CTRL: PRIVDEFENA Position */
+#define MPU_CTRL_PRIVDEFENA_Msk            (1UL << MPU_CTRL_PRIVDEFENA_Pos)               /*!< MPU CTRL: PRIVDEFENA Mask */
+
+#define MPU_CTRL_HFNMIENA_Pos               1                                             /*!< MPU CTRL: HFNMIENA Position */
+#define MPU_CTRL_HFNMIENA_Msk              (1UL << MPU_CTRL_HFNMIENA_Pos)                 /*!< MPU CTRL: HFNMIENA Mask */
+
+#define MPU_CTRL_ENABLE_Pos                 0                                             /*!< MPU CTRL: ENABLE Position */
+#define MPU_CTRL_ENABLE_Msk                (1UL /*<< MPU_CTRL_ENABLE_Pos*/)               /*!< MPU CTRL: ENABLE Mask */
+
+/* MPU Region Number Register */
+#define MPU_RNR_REGION_Pos                  0                                             /*!< MPU RNR: REGION Position */
+#define MPU_RNR_REGION_Msk                 (0xFFUL /*<< MPU_RNR_REGION_Pos*/)             /*!< MPU RNR: REGION Mask */
+
+/* MPU Region Base Address Register */
+#define MPU_RBAR_ADDR_Pos                   5                                             /*!< MPU RBAR: ADDR Position */
+#define MPU_RBAR_ADDR_Msk                  (0x7FFFFFFUL << MPU_RBAR_ADDR_Pos)             /*!< MPU RBAR: ADDR Mask */
+
+#define MPU_RBAR_VALID_Pos                  4                                             /*!< MPU RBAR: VALID Position */
+#define MPU_RBAR_VALID_Msk                 (1UL << MPU_RBAR_VALID_Pos)                    /*!< MPU RBAR: VALID Mask */
+
+#define MPU_RBAR_REGION_Pos                 0                                             /*!< MPU RBAR: REGION Position */
+#define MPU_RBAR_REGION_Msk                (0xFUL /*<< MPU_RBAR_REGION_Pos*/)             /*!< MPU RBAR: REGION Mask */
+
+/* MPU Region Attribute and Size Register */
+#define MPU_RASR_ATTRS_Pos                 16                                             /*!< MPU RASR: MPU Region Attribute field Position */
+#define MPU_RASR_ATTRS_Msk                 (0xFFFFUL << MPU_RASR_ATTRS_Pos)               /*!< MPU RASR: MPU Region Attribute field Mask */
+
+#define MPU_RASR_XN_Pos                    28                                             /*!< MPU RASR: ATTRS.XN Position */
+#define MPU_RASR_XN_Msk                    (1UL << MPU_RASR_XN_Pos)                       /*!< MPU RASR: ATTRS.XN Mask */
+
+#define MPU_RASR_AP_Pos                    24                                             /*!< MPU RASR: ATTRS.AP Position */
+#define MPU_RASR_AP_Msk                    (0x7UL << MPU_RASR_AP_Pos)                     /*!< MPU RASR: ATTRS.AP Mask */
+
+#define MPU_RASR_TEX_Pos                   19                                             /*!< MPU RASR: ATTRS.TEX Position */
+#define MPU_RASR_TEX_Msk                   (0x7UL << MPU_RASR_TEX_Pos)                    /*!< MPU RASR: ATTRS.TEX Mask */
+
+#define MPU_RASR_S_Pos                     18                                             /*!< MPU RASR: ATTRS.S Position */
+#define MPU_RASR_S_Msk                     (1UL << MPU_RASR_S_Pos)                        /*!< MPU RASR: ATTRS.S Mask */
+
+#define MPU_RASR_C_Pos                     17                                             /*!< MPU RASR: ATTRS.C Position */
+#define MPU_RASR_C_Msk                     (1UL << MPU_RASR_C_Pos)                        /*!< MPU RASR: ATTRS.C Mask */
+
+#define MPU_RASR_B_Pos                     16                                             /*!< MPU RASR: ATTRS.B Position */
+#define MPU_RASR_B_Msk                     (1UL << MPU_RASR_B_Pos)                        /*!< MPU RASR: ATTRS.B Mask */
+
+#define MPU_RASR_SRD_Pos                    8                                             /*!< MPU RASR: Sub-Region Disable Position */
+#define MPU_RASR_SRD_Msk                   (0xFFUL << MPU_RASR_SRD_Pos)                   /*!< MPU RASR: Sub-Region Disable Mask */
+
+#define MPU_RASR_SIZE_Pos                   1                                             /*!< MPU RASR: Region Size Field Position */
+#define MPU_RASR_SIZE_Msk                  (0x1FUL << MPU_RASR_SIZE_Pos)                  /*!< MPU RASR: Region Size Field Mask */
+
+#define MPU_RASR_ENABLE_Pos                 0                                             /*!< MPU RASR: Region enable bit Position */
+#define MPU_RASR_ENABLE_Msk                (1UL /*<< MPU_RASR_ENABLE_Pos*/)               /*!< MPU RASR: Region enable bit Disable Mask */
+
+/*@} end of group CMSIS_MPU */
+#endif
+
+
+#if (__FPU_PRESENT == 1)
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_FPU     Floating Point Unit (FPU)
+    \brief      Type definitions for the Floating Point Unit (FPU)
+  @{
+ */
+
+/** \brief  Structure type to access the Floating Point Unit (FPU).
+ */
+typedef struct
+{
+       uint32_t RESERVED0[1];
+  __IO uint32_t FPCCR;                   /*!< Offset: 0x004 (R/W)  Floating-Point Context Control Register               */
+  __IO uint32_t FPCAR;                   /*!< Offset: 0x008 (R/W)  Floating-Point Context Address Register               */
+  __IO uint32_t FPDSCR;                  /*!< Offset: 0x00C (R/W)  Floating-Point Default Status Control Register        */
+  __I  uint32_t MVFR0;                   /*!< Offset: 0x010 (R/ )  Media and FP Feature Register 0                       */
+  __I  uint32_t MVFR1;                   /*!< Offset: 0x014 (R/ )  Media and FP Feature Register 1                       */
+  __I  uint32_t MVFR2;                   /*!< Offset: 0x018 (R/ )  Media and FP Feature Register 2                       */
+} FPU_Type;
+
+/* Floating-Point Context Control Register */
+#define FPU_FPCCR_ASPEN_Pos                31                                             /*!< FPCCR: ASPEN bit Position */
+#define FPU_FPCCR_ASPEN_Msk                (1UL << FPU_FPCCR_ASPEN_Pos)                   /*!< FPCCR: ASPEN bit Mask */
+
+#define FPU_FPCCR_LSPEN_Pos                30                                             /*!< FPCCR: LSPEN Position */
+#define FPU_FPCCR_LSPEN_Msk                (1UL << FPU_FPCCR_LSPEN_Pos)                   /*!< FPCCR: LSPEN bit Mask */
+
+#define FPU_FPCCR_MONRDY_Pos                8                                             /*!< FPCCR: MONRDY Position */
+#define FPU_FPCCR_MONRDY_Msk               (1UL << FPU_FPCCR_MONRDY_Pos)                  /*!< FPCCR: MONRDY bit Mask */
+
+#define FPU_FPCCR_BFRDY_Pos                 6                                             /*!< FPCCR: BFRDY Position */
+#define FPU_FPCCR_BFRDY_Msk                (1UL << FPU_FPCCR_BFRDY_Pos)                   /*!< FPCCR: BFRDY bit Mask */
+
+#define FPU_FPCCR_MMRDY_Pos                 5                                             /*!< FPCCR: MMRDY Position */
+#define FPU_FPCCR_MMRDY_Msk                (1UL << FPU_FPCCR_MMRDY_Pos)                   /*!< FPCCR: MMRDY bit Mask */
+
+#define FPU_FPCCR_HFRDY_Pos                 4                                             /*!< FPCCR: HFRDY Position */
+#define FPU_FPCCR_HFRDY_Msk                (1UL << FPU_FPCCR_HFRDY_Pos)                   /*!< FPCCR: HFRDY bit Mask */
+
+#define FPU_FPCCR_THREAD_Pos                3                                             /*!< FPCCR: processor mode bit Position */
+#define FPU_FPCCR_THREAD_Msk               (1UL << FPU_FPCCR_THREAD_Pos)                  /*!< FPCCR: processor mode active bit Mask */
+
+#define FPU_FPCCR_USER_Pos                  1                                             /*!< FPCCR: privilege level bit Position */
+#define FPU_FPCCR_USER_Msk                 (1UL << FPU_FPCCR_USER_Pos)                    /*!< FPCCR: privilege level bit Mask */
+
+#define FPU_FPCCR_LSPACT_Pos                0                                             /*!< FPCCR: Lazy state preservation active bit Position */
+#define FPU_FPCCR_LSPACT_Msk               (1UL /*<< FPU_FPCCR_LSPACT_Pos*/)              /*!< FPCCR: Lazy state preservation active bit Mask */
+
+/* Floating-Point Context Address Register */
+#define FPU_FPCAR_ADDRESS_Pos               3                                             /*!< FPCAR: ADDRESS bit Position */
+#define FPU_FPCAR_ADDRESS_Msk              (0x1FFFFFFFUL << FPU_FPCAR_ADDRESS_Pos)        /*!< FPCAR: ADDRESS bit Mask */
+
+/* Floating-Point Default Status Control Register */
+#define FPU_FPDSCR_AHP_Pos                 26                                             /*!< FPDSCR: AHP bit Position */
+#define FPU_FPDSCR_AHP_Msk                 (1UL << FPU_FPDSCR_AHP_Pos)                    /*!< FPDSCR: AHP bit Mask */
+
+#define FPU_FPDSCR_DN_Pos                  25                                             /*!< FPDSCR: DN bit Position */
+#define FPU_FPDSCR_DN_Msk                  (1UL << FPU_FPDSCR_DN_Pos)                     /*!< FPDSCR: DN bit Mask */
+
+#define FPU_FPDSCR_FZ_Pos                  24                                             /*!< FPDSCR: FZ bit Position */
+#define FPU_FPDSCR_FZ_Msk                  (1UL << FPU_FPDSCR_FZ_Pos)                     /*!< FPDSCR: FZ bit Mask */
+
+#define FPU_FPDSCR_RMode_Pos               22                                             /*!< FPDSCR: RMode bit Position */
+#define FPU_FPDSCR_RMode_Msk               (3UL << FPU_FPDSCR_RMode_Pos)                  /*!< FPDSCR: RMode bit Mask */
+
+/* Media and FP Feature Register 0 */
+#define FPU_MVFR0_FP_rounding_modes_Pos    28                                             /*!< MVFR0: FP rounding modes bits Position */
+#define FPU_MVFR0_FP_rounding_modes_Msk    (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos)     /*!< MVFR0: FP rounding modes bits Mask */
+
+#define FPU_MVFR0_Short_vectors_Pos        24                                             /*!< MVFR0: Short vectors bits Position */
+#define FPU_MVFR0_Short_vectors_Msk        (0xFUL << FPU_MVFR0_Short_vectors_Pos)         /*!< MVFR0: Short vectors bits Mask */
+
+#define FPU_MVFR0_Square_root_Pos          20                                             /*!< MVFR0: Square root bits Position */
+#define FPU_MVFR0_Square_root_Msk          (0xFUL << FPU_MVFR0_Square_root_Pos)           /*!< MVFR0: Square root bits Mask */
+
+#define FPU_MVFR0_Divide_Pos               16                                             /*!< MVFR0: Divide bits Position */
+#define FPU_MVFR0_Divide_Msk               (0xFUL << FPU_MVFR0_Divide_Pos)                /*!< MVFR0: Divide bits Mask */
+
+#define FPU_MVFR0_FP_excep_trapping_Pos    12                                             /*!< MVFR0: FP exception trapping bits Position */
+#define FPU_MVFR0_FP_excep_trapping_Msk    (0xFUL << FPU_MVFR0_FP_excep_trapping_Pos)     /*!< MVFR0: FP exception trapping bits Mask */
+
+#define FPU_MVFR0_Double_precision_Pos      8                                             /*!< MVFR0: Double-precision bits Position */
+#define FPU_MVFR0_Double_precision_Msk     (0xFUL << FPU_MVFR0_Double_precision_Pos)      /*!< MVFR0: Double-precision bits Mask */
+
+#define FPU_MVFR0_Single_precision_Pos      4                                             /*!< MVFR0: Single-precision bits Position */
+#define FPU_MVFR0_Single_precision_Msk     (0xFUL << FPU_MVFR0_Single_precision_Pos)      /*!< MVFR0: Single-precision bits Mask */
+
+#define FPU_MVFR0_A_SIMD_registers_Pos      0                                             /*!< MVFR0: A_SIMD registers bits Position */
+#define FPU_MVFR0_A_SIMD_registers_Msk     (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/)  /*!< MVFR0: A_SIMD registers bits Mask */
+
+/* Media and FP Feature Register 1 */
+#define FPU_MVFR1_FP_fused_MAC_Pos         28                                             /*!< MVFR1: FP fused MAC bits Position */
+#define FPU_MVFR1_FP_fused_MAC_Msk         (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos)          /*!< MVFR1: FP fused MAC bits Mask */
+
+#define FPU_MVFR1_FP_HPFP_Pos              24                                             /*!< MVFR1: FP HPFP bits Position */
+#define FPU_MVFR1_FP_HPFP_Msk              (0xFUL << FPU_MVFR1_FP_HPFP_Pos)               /*!< MVFR1: FP HPFP bits Mask */
+
+#define FPU_MVFR1_D_NaN_mode_Pos            4                                             /*!< MVFR1: D_NaN mode bits Position */
+#define FPU_MVFR1_D_NaN_mode_Msk           (0xFUL << FPU_MVFR1_D_NaN_mode_Pos)            /*!< MVFR1: D_NaN mode bits Mask */
+
+#define FPU_MVFR1_FtZ_mode_Pos              0                                             /*!< MVFR1: FtZ mode bits Position */
+#define FPU_MVFR1_FtZ_mode_Msk             (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/)          /*!< MVFR1: FtZ mode bits Mask */
+
+/* Media and FP Feature Register 2 */
+
+/*@} end of group CMSIS_FPU */
+#endif
+
+
+/** \ingroup  CMSIS_core_register
+    \defgroup CMSIS_CoreDebug       Core Debug Registers (CoreDebug)
+    \brief      Type definitions for the Core Debug Registers
+  @{
+ */
+
+/** \brief  Structure type to access the Core Debug Register (CoreDebug).
+ */
+typedef struct
+{
+  __IO uint32_t DHCSR;                   /*!< Offset: 0x000 (R/W)  Debug Halting Control and Status Register    */
+  __O  uint32_t DCRSR;                   /*!< Offset: 0x004 ( /W)  Debug Core Register Selector Register        */
+  __IO uint32_t DCRDR;                   /*!< Offset: 0x008 (R/W)  Debug Core Register Data Register            */
+  __IO uint32_t DEMCR;                   /*!< Offset: 0x00C (R/W)  Debug Exception and Monitor Control Register */
+} CoreDebug_Type;
+
+/* Debug Halting Control and Status Register */
+#define CoreDebug_DHCSR_DBGKEY_Pos         16                                             /*!< CoreDebug DHCSR: DBGKEY Position */
+#define CoreDebug_DHCSR_DBGKEY_Msk         (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos)       /*!< CoreDebug DHCSR: DBGKEY Mask */
+
+#define CoreDebug_DHCSR_S_RESET_ST_Pos     25                                             /*!< CoreDebug DHCSR: S_RESET_ST Position */
+#define CoreDebug_DHCSR_S_RESET_ST_Msk     (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos)        /*!< CoreDebug DHCSR: S_RESET_ST Mask */
+
+#define CoreDebug_DHCSR_S_RETIRE_ST_Pos    24                                             /*!< CoreDebug DHCSR: S_RETIRE_ST Position */
+#define CoreDebug_DHCSR_S_RETIRE_ST_Msk    (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos)       /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */
+
+#define CoreDebug_DHCSR_S_LOCKUP_Pos       19                                             /*!< CoreDebug DHCSR: S_LOCKUP Position */
+#define CoreDebug_DHCSR_S_LOCKUP_Msk       (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos)          /*!< CoreDebug DHCSR: S_LOCKUP Mask */
+
+#define CoreDebug_DHCSR_S_SLEEP_Pos        18                                             /*!< CoreDebug DHCSR: S_SLEEP Position */
+#define CoreDebug_DHCSR_S_SLEEP_Msk        (1UL << CoreDebug_DHCSR_S_SLEEP_Pos)           /*!< CoreDebug DHCSR: S_SLEEP Mask */
+
+#define CoreDebug_DHCSR_S_HALT_Pos         17                                             /*!< CoreDebug DHCSR: S_HALT Position */
+#define CoreDebug_DHCSR_S_HALT_Msk         (1UL << CoreDebug_DHCSR_S_HALT_Pos)            /*!< CoreDebug DHCSR: S_HALT Mask */
+
+#define CoreDebug_DHCSR_S_REGRDY_Pos       16                                             /*!< CoreDebug DHCSR: S_REGRDY Position */
+#define CoreDebug_DHCSR_S_REGRDY_Msk       (1UL << CoreDebug_DHCSR_S_REGRDY_Pos)          /*!< CoreDebug DHCSR: S_REGRDY Mask */
+
+#define CoreDebug_DHCSR_C_SNAPSTALL_Pos     5                                             /*!< CoreDebug DHCSR: C_SNAPSTALL Position */
+#define CoreDebug_DHCSR_C_SNAPSTALL_Msk    (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos)       /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */
+
+#define CoreDebug_DHCSR_C_MASKINTS_Pos      3                                             /*!< CoreDebug DHCSR: C_MASKINTS Position */
+#define CoreDebug_DHCSR_C_MASKINTS_Msk     (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos)        /*!< CoreDebug DHCSR: C_MASKINTS Mask */
+
+#define CoreDebug_DHCSR_C_STEP_Pos          2                                             /*!< CoreDebug DHCSR: C_STEP Position */
+#define CoreDebug_DHCSR_C_STEP_Msk         (1UL << CoreDebug_DHCSR_C_STEP_Pos)            /*!< CoreDebug DHCSR: C_STEP Mask */
+
+#define CoreDebug_DHCSR_C_HALT_Pos          1                                             /*!< CoreDebug DHCSR: C_HALT Position */
+#define CoreDebug_DHCSR_C_HALT_Msk         (1UL << CoreDebug_DHCSR_C_HALT_Pos)            /*!< CoreDebug DHCSR: C_HALT Mask */
+
+#define CoreDebug_DHCSR_C_DEBUGEN_Pos       0                                             /*!< CoreDebug DHCSR: C_DEBUGEN Position */
+#define CoreDebug_DHCSR_C_DEBUGEN_Msk      (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/)     /*!< CoreDebug DHCSR: C_DEBUGEN Mask */
+
+/* Debug Core Register Selector Register */
+#define CoreDebug_DCRSR_REGWnR_Pos         16                                             /*!< CoreDebug DCRSR: REGWnR Position */
+#define CoreDebug_DCRSR_REGWnR_Msk         (1UL << CoreDebug_DCRSR_REGWnR_Pos)            /*!< CoreDebug DCRSR: REGWnR Mask */
+
+#define CoreDebug_DCRSR_REGSEL_Pos          0                                             /*!< CoreDebug DCRSR: REGSEL Position */
+#define CoreDebug_DCRSR_REGSEL_Msk         (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/)     /*!< CoreDebug DCRSR: REGSEL Mask */
+
+/* Debug Exception and Monitor Control Register */
+#define CoreDebug_DEMCR_TRCENA_Pos         24                                             /*!< CoreDebug DEMCR: TRCENA Position */
+#define CoreDebug_DEMCR_TRCENA_Msk         (1UL << CoreDebug_DEMCR_TRCENA_Pos)            /*!< CoreDebug DEMCR: TRCENA Mask */
+
+#define CoreDebug_DEMCR_MON_REQ_Pos        19                                             /*!< CoreDebug DEMCR: MON_REQ Position */
+#define CoreDebug_DEMCR_MON_REQ_Msk        (1UL << CoreDebug_DEMCR_MON_REQ_Pos)           /*!< CoreDebug DEMCR: MON_REQ Mask */
+
+#define CoreDebug_DEMCR_MON_STEP_Pos       18                                             /*!< CoreDebug DEMCR: MON_STEP Position */
+#define CoreDebug_DEMCR_MON_STEP_Msk       (1UL << CoreDebug_DEMCR_MON_STEP_Pos)          /*!< CoreDebug DEMCR: MON_STEP Mask */
+
+#define CoreDebug_DEMCR_MON_PEND_Pos       17                                             /*!< CoreDebug DEMCR: MON_PEND Position */
+#define CoreDebug_DEMCR_MON_PEND_Msk       (1UL << CoreDebug_DEMCR_MON_PEND_Pos)          /*!< CoreDebug DEMCR: MON_PEND Mask */
+
+#define CoreDebug_DEMCR_MON_EN_Pos         16                                             /*!< CoreDebug DEMCR: MON_EN Position */
+#define CoreDebug_DEMCR_MON_EN_Msk         (1UL << CoreDebug_DEMCR_MON_EN_Pos)            /*!< CoreDebug DEMCR: MON_EN Mask */
+
+#define CoreDebug_DEMCR_VC_HARDERR_Pos     10                                             /*!< CoreDebug DEMCR: VC_HARDERR Position */
+#define CoreDebug_DEMCR_VC_HARDERR_Msk     (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos)        /*!< CoreDebug DEMCR: VC_HARDERR Mask */
+
+#define CoreDebug_DEMCR_VC_INTERR_Pos       9                                             /*!< CoreDebug DEMCR: VC_INTERR Position */
+#define CoreDebug_DEMCR_VC_INTERR_Msk      (1UL << CoreDebug_DEMCR_VC_INTERR_Pos)         /*!< CoreDebug DEMCR: VC_INTERR Mask */
+
+#define CoreDebug_DEMCR_VC_BUSERR_Pos       8                                             /*!< CoreDebug DEMCR: VC_BUSERR Position */
+#define CoreDebug_DEMCR_VC_BUSERR_Msk      (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos)         /*!< CoreDebug DEMCR: VC_BUSERR Mask */
+
+#define CoreDebug_DEMCR_VC_STATERR_Pos      7                                             /*!< CoreDebug DEMCR: VC_STATERR Position */
+#define CoreDebug_DEMCR_VC_STATERR_Msk     (1UL << CoreDebug_DEMCR_VC_STATERR_Pos)        /*!< CoreDebug DEMCR: VC_STATERR Mask */
+
+#define CoreDebug_DEMCR_VC_CHKERR_Pos       6                                             /*!< CoreDebug DEMCR: VC_CHKERR Position */
+#define CoreDebug_DEMCR_VC_CHKERR_Msk      (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos)         /*!< CoreDebug DEMCR: VC_CHKERR Mask */
+
+#define CoreDebug_DEMCR_VC_NOCPERR_Pos      5                                             /*!< CoreDebug DEMCR: VC_NOCPERR Position */
+#define CoreDebug_DEMCR_VC_NOCPERR_Msk     (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos)        /*!< CoreDebug DEMCR: VC_NOCPERR Mask */
+
+#define CoreDebug_DEMCR_VC_MMERR_Pos        4                                             /*!< CoreDebug DEMCR: VC_MMERR Position */
+#define CoreDebug_DEMCR_VC_MMERR_Msk       (1UL << CoreDebug_DEMCR_VC_MMERR_Pos)          /*!< CoreDebug DEMCR: VC_MMERR Mask */
+
+#define CoreDebug_DEMCR_VC_CORERESET_Pos    0                                             /*!< CoreDebug DEMCR: VC_CORERESET Position */
+#define CoreDebug_DEMCR_VC_CORERESET_Msk   (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/)  /*!< CoreDebug DEMCR: VC_CORERESET Mask */
+
+/*@} end of group CMSIS_CoreDebug */
+
+
+/** \ingroup    CMSIS_core_register
+    \defgroup   CMSIS_core_base     Core Definitions
+    \brief      Definitions for base addresses, unions, and structures.
+  @{
+ */
+
+/* Memory mapping of Cortex-M4 Hardware */
+#define SCS_BASE            (0xE000E000UL)                            /*!< System Control Space Base Address  */
+#define ITM_BASE            (0xE0000000UL)                            /*!< ITM Base Address                   */
+#define DWT_BASE            (0xE0001000UL)                            /*!< DWT Base Address                   */
+#define TPI_BASE            (0xE0040000UL)                            /*!< TPI Base Address                   */
+#define CoreDebug_BASE      (0xE000EDF0UL)                            /*!< Core Debug Base Address            */
+#define SysTick_BASE        (SCS_BASE +  0x0010UL)                    /*!< SysTick Base Address               */
+#define NVIC_BASE           (SCS_BASE +  0x0100UL)                    /*!< NVIC Base Address                  */
+#define SCB_BASE            (SCS_BASE +  0x0D00UL)                    /*!< System Control Block Base Address  */
+
+#define SCnSCB              ((SCnSCB_Type    *)     SCS_BASE      )   /*!< System control Register not in SCB */
+#define SCB                 ((SCB_Type       *)     SCB_BASE      )   /*!< SCB configuration struct           */
+#define SysTick             ((SysTick_Type   *)     SysTick_BASE  )   /*!< SysTick configuration struct       */
+#define NVIC                ((NVIC_Type      *)     NVIC_BASE     )   /*!< NVIC configuration struct          */
+#define ITM                 ((ITM_Type       *)     ITM_BASE      )   /*!< ITM configuration struct           */
+#define DWT                 ((DWT_Type       *)     DWT_BASE      )   /*!< DWT configuration struct           */
+#define TPI                 ((TPI_Type       *)     TPI_BASE      )   /*!< TPI configuration struct           */
+#define CoreDebug           ((CoreDebug_Type *)     CoreDebug_BASE)   /*!< Core Debug configuration struct    */
+
+#if (__MPU_PRESENT == 1)
+  #define MPU_BASE          (SCS_BASE +  0x0D90UL)                    /*!< Memory Protection Unit             */
+  #define MPU               ((MPU_Type       *)     MPU_BASE      )   /*!< Memory Protection Unit             */
+#endif
+
+#if (__FPU_PRESENT == 1)
+  #define FPU_BASE          (SCS_BASE +  0x0F30UL)                    /*!< Floating Point Unit                */
+  #define FPU               ((FPU_Type       *)     FPU_BASE      )   /*!< Floating Point Unit                */
+#endif
+
+/*@} */
+
+
+
+/*******************************************************************************
+ *                Hardware Abstraction Layer
+  Core Function Interface contains:
+  - Core NVIC Functions
+  - Core SysTick Functions
+  - Core Debug Functions
+  - Core Register Access Functions
+ ******************************************************************************/
+/** \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference
+*/
+
+
+
+/* ##########################   NVIC functions  #################################### */
+/** \ingroup  CMSIS_Core_FunctionInterface
+    \defgroup CMSIS_Core_NVICFunctions NVIC Functions
+    \brief      Functions that manage interrupts and exceptions via the NVIC.
+    @{
+ */
+
+/** \brief  Set Priority Grouping
+
+  The function sets the priority grouping field using the required unlock sequence.
+  The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field.
+  Only values from 0..7 are used.
+  In case of a conflict between priority grouping and available
+  priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set.
+
+    \param [in]      PriorityGroup  Priority grouping field.
+ */
+__STATIC_INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
+{
+  uint32_t reg_value;
+  uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL);             /* only values 0..7 are used          */
+
+  reg_value  =  SCB->AIRCR;                                                   /* read old register configuration    */
+  reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk));             /* clear bits to change               */
+  reg_value  =  (reg_value                                   |
+                ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
+                (PriorityGroupTmp << 8)                       );              /* Insert write key and priorty group */
+  SCB->AIRCR =  reg_value;
+}
+
+
+/** \brief  Get Priority Grouping
+
+  The function reads the priority grouping field from the NVIC Interrupt Controller.
+
+    \return                Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field).
+ */
+__STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void)
+{
+  return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos));
+}
+
+
+/** \brief  Enable External Interrupt
+
+    The function enables a device-specific interrupt in the NVIC interrupt controller.
+
+    \param [in]      IRQn  External interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
+{
+  NVIC->ISER[(((uint32_t)(int32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)(int32_t)IRQn) & 0x1FUL));
+}
+
+
+/** \brief  Disable External Interrupt
+
+    The function disables a device-specific interrupt in the NVIC interrupt controller.
+
+    \param [in]      IRQn  External interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_DisableIRQ(IRQn_Type IRQn)
+{
+  NVIC->ICER[(((uint32_t)(int32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)(int32_t)IRQn) & 0x1FUL));
+}
+
+
+/** \brief  Get Pending Interrupt
+
+    The function reads the pending register in the NVIC and returns the pending bit
+    for the specified interrupt.
+
+    \param [in]      IRQn  Interrupt number.
+
+    \return             0  Interrupt status is not pending.
+    \return             1  Interrupt status is pending.
+ */
+__STATIC_INLINE uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
+{
+  return((uint32_t)(((NVIC->ISPR[(((uint32_t)(int32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)(int32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
+}
+
+
+/** \brief  Set Pending Interrupt
+
+    The function sets the pending bit of an external interrupt.
+
+    \param [in]      IRQn  Interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_SetPendingIRQ(IRQn_Type IRQn)
+{
+  NVIC->ISPR[(((uint32_t)(int32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)(int32_t)IRQn) & 0x1FUL));
+}
+
+
+/** \brief  Clear Pending Interrupt
+
+    The function clears the pending bit of an external interrupt.
+
+    \param [in]      IRQn  External interrupt number. Value cannot be negative.
+ */
+__STATIC_INLINE void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
+{
+  NVIC->ICPR[(((uint32_t)(int32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)(int32_t)IRQn) & 0x1FUL));
+}
+
+
+/** \brief  Get Active Interrupt
+
+    The function reads the active register in NVIC and returns the active bit.
+
+    \param [in]      IRQn  Interrupt number.
+
+    \return             0  Interrupt status is not active.
+    \return             1  Interrupt status is active.
+ */
+__STATIC_INLINE uint32_t NVIC_GetActive(IRQn_Type IRQn)
+{
+  return((uint32_t)(((NVIC->IABR[(((uint32_t)(int32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)(int32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
+}
+
+
+/** \brief  Set Interrupt Priority
+
+    The function sets the priority of an interrupt.
+
+    \note The priority cannot be set for every core interrupt.
+
+    \param [in]      IRQn  Interrupt number.
+    \param [in]  priority  Priority to set.
+ */
+__STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
+{
+  if((int32_t)IRQn < 0) {
+    SCB->SHPR[(((uint32_t)(int32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8 - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
+  }
+  else {
+    NVIC->IP[((uint32_t)(int32_t)IRQn)]                = (uint8_t)((priority << (8 - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
+  }
+}
+
+
+/** \brief  Get Interrupt Priority
+
+    The function reads the priority of an interrupt. The interrupt
+    number can be positive to specify an external (device specific)
+    interrupt, or negative to specify an internal (core) interrupt.
+
+
+    \param [in]   IRQn  Interrupt number.
+    \return             Interrupt Priority. Value is aligned automatically to the implemented
+                        priority bits of the microcontroller.
+ */
+__STATIC_INLINE uint32_t NVIC_GetPriority(IRQn_Type IRQn)
+{
+
+  if((int32_t)IRQn < 0) {
+    return(((uint32_t)SCB->SHPR[(((uint32_t)(int32_t)IRQn) & 0xFUL)-4UL] >> (8 - __NVIC_PRIO_BITS)));
+  }
+  else {
+    return(((uint32_t)NVIC->IP[((uint32_t)(int32_t)IRQn)]               >> (8 - __NVIC_PRIO_BITS)));
+  }
+}
+
+
+/** \brief  Encode Priority
+
+    The function encodes the priority for an interrupt with the given priority group,
+    preemptive priority value, and subpriority value.
+    In case of a conflict between priority grouping and available
+    priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set.
+
+    \param [in]     PriorityGroup  Used priority group.
+    \param [in]   PreemptPriority  Preemptive priority value (starting from 0).
+    \param [in]       SubPriority  Subpriority value (starting from 0).
+    \return                        Encoded priority. Value can be used in the function \ref NVIC_SetPriority().
+ */
+__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority)
+{
+  uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL);   /* only values 0..7 are used          */
+  uint32_t PreemptPriorityBits;
+  uint32_t SubPriorityBits;
+
+  PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp);
+  SubPriorityBits     = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS));
+
+  return (
+           ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
+           ((SubPriority     & (uint32_t)((1UL << (SubPriorityBits    )) - 1UL)))
+         );
+}
+
+
+/** \brief  Decode Priority
+
+    The function decodes an interrupt priority value with a given priority group to
+    preemptive priority value and subpriority value.
+    In case of a conflict between priority grouping and available
+    priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set.
+
+    \param [in]         Priority   Priority value, which can be retrieved with the function \ref NVIC_GetPriority().
+    \param [in]     PriorityGroup  Used priority group.
+    \param [out] pPreemptPriority  Preemptive priority value (starting from 0).
+    \param [out]     pSubPriority  Subpriority value (starting from 0).
+ */
+__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority)
+{
+  uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL);   /* only values 0..7 are used          */
+  uint32_t PreemptPriorityBits;
+  uint32_t SubPriorityBits;
+
+  PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp);
+  SubPriorityBits     = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS));
+
+  *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL);
+  *pSubPriority     = (Priority                   ) & (uint32_t)((1UL << (SubPriorityBits    )) - 1UL);
+}
+
+
+/** \brief  System Reset
+
+    The function initiates a system reset request to reset the MCU.
+ */
+__STATIC_INLINE void NVIC_SystemReset(void)
+{
+  __DSB();                                                          /* Ensure all outstanding memory accesses included
+                                                                       buffered write are completed before reset */
+  SCB->AIRCR  = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos)    |
+                           (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) |
+                            SCB_AIRCR_SYSRESETREQ_Msk    );         /* Keep priority group unchanged */
+  __DSB();                                                          /* Ensure completion of memory access */
+  while(1) { __NOP(); }                                             /* wait until reset */
+}
+
+/*@} end of CMSIS_Core_NVICFunctions */
+
+
+/* ##########################  FPU functions  #################################### */
+/** \ingroup  CMSIS_Core_FunctionInterface
+    \defgroup CMSIS_Core_FpuFunctions FPU Functions
+    \brief      Function that provides FPU type.
+    @{
+ */
+
+/**
+  \fn          uint32_t SCB_GetFPUType(void)
+  \brief       get FPU type
+  \returns
+   - \b  0: No FPU
+   - \b  1: Single precision FPU
+   - \b  2: Double + Single precision FPU
+ */
+__STATIC_INLINE uint32_t SCB_GetFPUType(void)
+{
+  uint32_t mvfr0;
+
+  mvfr0 = SCB->MVFR0;
+  if        ((mvfr0 & 0x00000FF0UL) == 0x220UL) {
+    return 2UL;           // Double + Single precision FPU
+  } else if ((mvfr0 & 0x00000FF0UL) == 0x020UL) {
+    return 1UL;           // Single precision FPU
+  } else {
+    return 0UL;           // No FPU
+  }
+}
+
+
+/*@} end of CMSIS_Core_FpuFunctions */
+
+
+
+/* ##########################  Cache functions  #################################### */
+/** \ingroup  CMSIS_Core_FunctionInterface
+    \defgroup CMSIS_Core_CacheFunctions Cache Functions
+    \brief      Functions that configure Instruction and Data cache.
+    @{
+ */
+
+/* Cache Size ID Register Macros */
+#define CCSIDR_WAYS(x)         (((x) & SCB_CCSIDR_ASSOCIATIVITY_Msk) >> SCB_CCSIDR_ASSOCIATIVITY_Pos)
+#define CCSIDR_SETS(x)         (((x) & SCB_CCSIDR_NUMSETS_Msk      ) >> SCB_CCSIDR_NUMSETS_Pos      )
+#define CCSIDR_LSSHIFT(x)      (((x) & SCB_CCSIDR_LINESIZE_Msk     ) /*>> SCB_CCSIDR_LINESIZE_Pos*/ )
+
+
+/** \brief Enable I-Cache
+
+    The function turns on I-Cache
+  */
+__STATIC_INLINE void SCB_EnableICache (void)
+{
+  #if (__ICACHE_PRESENT == 1)
+    __DSB();
+    __ISB();
+    SCB->ICIALLU = 0UL;                     // invalidate I-Cache
+    SCB->CCR |=  (uint32_t)SCB_CCR_IC_Msk;  // enable I-Cache
+    __DSB();
+    __ISB();
+  #endif
+}
+
+
+/** \brief Disable I-Cache
+
+    The function turns off I-Cache
+  */
+__STATIC_INLINE void SCB_DisableICache (void)
+{
+  #if (__ICACHE_PRESENT == 1)
+    __DSB();
+    __ISB();
+    SCB->CCR &= ~(uint32_t)SCB_CCR_IC_Msk;  // disable I-Cache
+    SCB->ICIALLU = 0UL;                     // invalidate I-Cache
+    __DSB();
+    __ISB();
+  #endif
+}
+
+
+/** \brief Invalidate I-Cache
+
+    The function invalidates I-Cache
+  */
+__STATIC_INLINE void SCB_InvalidateICache (void)
+{
+  #if (__ICACHE_PRESENT == 1)
+    __DSB();
+    __ISB();
+    SCB->ICIALLU = 0UL;
+    __DSB();
+    __ISB();
+  #endif
+}
+
+
+/** \brief Enable D-Cache
+
+    The function turns on D-Cache
+  */
+__STATIC_INLINE void SCB_EnableDCache (void)
+{
+  #if (__DCACHE_PRESENT == 1)
+    uint32_t ccsidr, sshift, wshift, sw;
+    uint32_t sets, ways;
+
+    SCB->CSSELR = (0UL << 1) | 0UL;         // Level 1 data cache
+    ccsidr  = SCB->CCSIDR;
+    sets    = (uint32_t)(CCSIDR_SETS(ccsidr));
+    sshift  = (uint32_t)(CCSIDR_LSSHIFT(ccsidr) + 4UL);
+    ways    = (uint32_t)(CCSIDR_WAYS(ccsidr));
+    wshift  = (uint32_t)((uint32_t)__CLZ(ways) & 0x1FUL);
+
+    __DSB();
+
+    do {                                   // invalidate D-Cache
+         uint32_t tmpways = ways;
+         do {
+              sw = ((tmpways << wshift) | (sets << sshift));
+              SCB->DCISW = sw;
+            } while(tmpways--);
+        } while(sets--);
+    __DSB();
+
+    SCB->CCR |=  (uint32_t)SCB_CCR_DC_Msk;   // enable D-Cache
+
+    __DSB();
+    __ISB();
+  #endif
+}
+
+
+/** \brief Disable D-Cache
+
+    The function turns off D-Cache
+  */
+__STATIC_INLINE void SCB_DisableDCache (void)
+{
+  #if (__DCACHE_PRESENT == 1)
+    uint32_t ccsidr, sshift, wshift, sw;
+    uint32_t sets, ways;
+
+    SCB->CSSELR = (0UL << 1) | 0UL;         // Level 1 data cache
+    ccsidr  = SCB->CCSIDR;
+    sets    = (uint32_t)(CCSIDR_SETS(ccsidr));
+    sshift  = (uint32_t)(CCSIDR_LSSHIFT(ccsidr) + 4UL);
+    ways    = (uint32_t)(CCSIDR_WAYS(ccsidr));
+    wshift  = (uint32_t)((uint32_t)__CLZ(ways) & 0x1FUL);
+
+    __DSB();
+
+    SCB->CCR &= ~(uint32_t)SCB_CCR_DC_Msk;  // disable D-Cache
+
+    do {                                    // clean & invalidate D-Cache
+         uint32_t tmpways = ways;
+         do {
+              sw = ((tmpways << wshift) | (sets << sshift));
+              SCB->DCCISW = sw;
+            } while(tmpways--);
+        } while(sets--);
+
+
+    __DSB();
+    __ISB();
+  #endif
+}
+
+
+/** \brief Invalidate D-Cache
+
+    The function invalidates D-Cache
+  */
+__STATIC_INLINE void SCB_InvalidateDCache (void)
+{
+  #if (__DCACHE_PRESENT == 1)
+    uint32_t ccsidr, sshift, wshift, sw;
+    uint32_t sets, ways;
+
+    SCB->CSSELR = (0UL << 1) | 0UL;         // Level 1 data cache
+    ccsidr  = SCB->CCSIDR;
+    sets    = (uint32_t)(CCSIDR_SETS(ccsidr));
+    sshift  = (uint32_t)(CCSIDR_LSSHIFT(ccsidr) + 4UL);
+    ways    = (uint32_t)(CCSIDR_WAYS(ccsidr));
+    wshift  = (uint32_t)((uint32_t)__CLZ(ways) & 0x1FUL);
+
+    __DSB();
+
+    do {                                    // invalidate D-Cache
+         uint32_t tmpways = ways;
+         do {
+              sw = ((tmpways << wshift) | (sets << sshift));
+              SCB->DCISW = sw;
+            } while(tmpways--);
+        } while(sets--);
+
+    __DSB();
+    __ISB();
+  #endif
+}
+
+
+/** \brief Clean D-Cache
+
+    The function cleans D-Cache
+  */
+__STATIC_INLINE void SCB_CleanDCache (void)
+{
+  #if (__DCACHE_PRESENT == 1)
+    uint32_t ccsidr, sshift, wshift, sw;
+    uint32_t sets, ways;
+
+    SCB->CSSELR = (0UL << 1) | 0UL;         // Level 1 data cache
+    ccsidr  = SCB->CCSIDR;
+    sets    = (uint32_t)(CCSIDR_SETS(ccsidr));
+    sshift  = (uint32_t)(CCSIDR_LSSHIFT(ccsidr) + 4UL);
+    ways    = (uint32_t)(CCSIDR_WAYS(ccsidr));
+    wshift  = (uint32_t)((uint32_t)__CLZ(ways) & 0x1FUL);
+
+    __DSB();
+
+    do {                                    // clean D-Cache
+         uint32_t tmpways = ways;
+         do {
+              sw = ((tmpways << wshift) | (sets << sshift));
+              SCB->DCCSW = sw;
+            } while(tmpways--);
+        } while(sets--);
+
+    __DSB();
+    __ISB();
+  #endif
+}
+
+
+/** \brief Clean & Invalidate D-Cache
+
+    The function cleans and Invalidates D-Cache
+  */
+__STATIC_INLINE void SCB_CleanInvalidateDCache (void)
+{
+  #if (__DCACHE_PRESENT == 1)
+    uint32_t ccsidr, sshift, wshift, sw;
+    uint32_t sets, ways;
+
+    SCB->CSSELR = (0UL << 1) | 0UL;         // Level 1 data cache
+    ccsidr  = SCB->CCSIDR;
+    sets    = (uint32_t)(CCSIDR_SETS(ccsidr));
+    sshift  = (uint32_t)(CCSIDR_LSSHIFT(ccsidr) + 4UL);
+    ways    = (uint32_t)(CCSIDR_WAYS(ccsidr));
+    wshift  = (uint32_t)((uint32_t)__CLZ(ways) & 0x1FUL);
+
+    __DSB();
+
+    do {                                    // clean & invalidate D-Cache
+         uint32_t tmpways = ways;
+         do {
+              sw = ((tmpways << wshift) | (sets << sshift));
+              SCB->DCCISW = sw;
+            } while(tmpways--);
+        } while(sets--);
+
+    __DSB();
+    __ISB();
+  #endif
+}
+
+
+/**
+  \fn          void SCB_InvalidateDCache_by_Addr(volatile uint32_t *addr, int32_t dsize)
+  \brief       D-Cache Invalidate by address
+  \param[in]   addr    address (aligned to 32-byte boundary)
+  \param[in]   dsize   size of memory block (in number of bytes)
+*/
+__STATIC_INLINE void SCB_InvalidateDCache_by_Addr (uint32_t *addr, int32_t dsize)
+{
+  #if (__DCACHE_PRESENT == 1)
+    int32_t  op_size = dsize;
+    uint32_t op_addr = (uint32_t)addr;
+    uint32_t linesize = 32UL;               // in Cortex-M7 size of cache line is fixed to 8 words (32 bytes)
+
+    __DSB();
+
+    while (op_size > 0) {
+      SCB->DCIMVAC = op_addr;
+      op_addr +=          linesize;
+      op_size -= (int32_t)linesize;
+    }
+
+    __DSB();
+    __ISB();
+  #endif
+}
+
+
+/**
+  \fn          void SCB_CleanDCache_by_Addr(volatile uint32_t *addr, int32_t dsize)
+  \brief       D-Cache Clean by address
+  \param[in]   addr    address (aligned to 32-byte boundary)
+  \param[in]   dsize   size of memory block (in number of bytes)
+*/
+__STATIC_INLINE void SCB_CleanDCache_by_Addr (uint32_t *addr, int32_t dsize)
+{
+  #if (__DCACHE_PRESENT == 1)
+    int32_t  op_size = dsize;
+    uint32_t op_addr = (uint32_t) addr;
+    uint32_t linesize = 32UL;               // in Cortex-M7 size of cache line is fixed to 8 words (32 bytes)
+
+    __DSB();
+
+    while (op_size > 0) {
+      SCB->DCCMVAC = op_addr;
+      op_addr +=          linesize;
+      op_size -= (int32_t)linesize;
+    }
+
+    __DSB();
+    __ISB();
+  #endif
+}
+
+
+/**
+  \fn          void SCB_CleanInvalidateDCache_by_Addr(volatile uint32_t *addr, int32_t dsize)
+  \brief       D-Cache Clean and Invalidate by address
+  \param[in]   addr    address (aligned to 32-byte boundary)
+  \param[in]   dsize   size of memory block (in number of bytes)
+*/
+__STATIC_INLINE void SCB_CleanInvalidateDCache_by_Addr (uint32_t *addr, int32_t dsize)
+{
+  #if (__DCACHE_PRESENT == 1)
+    int32_t  op_size = dsize;
+    uint32_t op_addr = (uint32_t) addr;
+    uint32_t linesize = 32UL;               // in Cortex-M7 size of cache line is fixed to 8 words (32 bytes)
+
+    __DSB();
+
+    while (op_size > 0) {
+      SCB->DCCIMVAC = op_addr;
+      op_addr +=          linesize;
+      op_size -= (int32_t)linesize;
+    }
+
+    __DSB();
+    __ISB();
+  #endif
+}
+
+
+/*@} end of CMSIS_Core_CacheFunctions */
+
+
+
+/* ##################################    SysTick function  ############################################ */
+/** \ingroup  CMSIS_Core_FunctionInterface
+    \defgroup CMSIS_Core_SysTickFunctions SysTick Functions
+    \brief      Functions that configure the System.
+  @{
+ */
+
+#if (__Vendor_SysTickConfig == 0)
+
+/** \brief  System Tick Configuration
+
+    The function initializes the System Timer and its interrupt, and starts the System Tick Timer.
+    Counter is in free running mode to generate periodic interrupts.
+
+    \param [in]  ticks  Number of ticks between two interrupts.
+
+    \return          0  Function succeeded.
+    \return          1  Function failed.
+
+    \note     When the variable <b>__Vendor_SysTickConfig</b> is set to 1, then the
+    function <b>SysTick_Config</b> is not included. In this case, the file <b><i>device</i>.h</b>
+    must contain a vendor-specific implementation of this function.
+
+ */
+__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks)
+{
+  if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) { return (1UL); }    /* Reload value impossible */
+
+  SysTick->LOAD  = (uint32_t)(ticks - 1UL);                         /* set reload register */
+  NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */
+  SysTick->VAL   = 0UL;                                             /* Load the SysTick Counter Value */
+  SysTick->CTRL  = SysTick_CTRL_CLKSOURCE_Msk |
+                   SysTick_CTRL_TICKINT_Msk   |
+                   SysTick_CTRL_ENABLE_Msk;                         /* Enable SysTick IRQ and SysTick Timer */
+  return (0UL);                                                     /* Function successful */
+}
+
+#endif
+
+/*@} end of CMSIS_Core_SysTickFunctions */
+
+
+
+/* ##################################### Debug In/Output function ########################################### */
+/** \ingroup  CMSIS_Core_FunctionInterface
+    \defgroup CMSIS_core_DebugFunctions ITM Functions
+    \brief   Functions that access the ITM debug interface.
+  @{
+ */
+
+extern volatile int32_t ITM_RxBuffer;                    /*!< External variable to receive characters.                         */
+#define                 ITM_RXBUFFER_EMPTY    0x5AA55AA5 /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */
+
+
+/** \brief  ITM Send Character
+
+    The function transmits a character via the ITM channel 0, and
+    \li Just returns when no debugger is connected that has booked the output.
+    \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted.
+
+    \param [in]     ch  Character to transmit.
+
+    \returns            Character to transmit.
+ */
+__STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch)
+{
+  if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) &&      /* ITM enabled */
+      ((ITM->TER & 1UL               ) != 0UL)   )     /* ITM Port #0 enabled */
+  {
+    while (ITM->PORT[0].u32 == 0UL) { __NOP(); }
+    ITM->PORT[0].u8 = (uint8_t)ch;
+  }
+  return (ch);
+}
+
+
+/** \brief  ITM Receive Character
+
+    The function inputs a character via the external variable \ref ITM_RxBuffer.
+
+    \return             Received character.
+    \return         -1  No character pending.
+ */
+__STATIC_INLINE int32_t ITM_ReceiveChar (void) {
+  int32_t ch = -1;                           /* no character available */
+
+  if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) {
+    ch = ITM_RxBuffer;
+    ITM_RxBuffer = ITM_RXBUFFER_EMPTY;       /* ready for next character */
+  }
+
+  return (ch);
+}
+
+
+/** \brief  ITM Check Character
+
+    The function checks whether a character is pending for reading in the variable \ref ITM_RxBuffer.
+
+    \return          0  No character available.
+    \return          1  Character available.
+ */
+__STATIC_INLINE int32_t ITM_CheckChar (void) {
+
+  if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) {
+    return (0);                                 /* no character available */
+  } else {
+    return (1);                                 /*    character available */
+  }
+}
+
+/*@} end of CMSIS_core_DebugFunctions */
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CORE_CM7_H_DEPENDANT */
+
+#endif /* __CMSIS_GENERIC */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cmFunc.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cmFunc.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cmFunc.h	(revision 270)
@@ -0,0 +1,636 @@
+/**************************************************************************//**
+ * @file     core_cmFunc.h
+ * @brief    CMSIS Cortex-M Core Function Access Header File
+ * @version  V3.20
+ * @date     25. February 2013
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2009 - 2013 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+
+#ifndef __CORE_CMFUNC_H
+#define __CORE_CMFUNC_H
+
+
+/* ###########################  Core Function Access  ########################### */
+/** \ingroup  CMSIS_Core_FunctionInterface
+    \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
+  @{
+ */
+
+#if   defined ( __CC_ARM ) /*------------------RealView Compiler -----------------*/
+/* ARM armcc specific functions */
+
+#if (__ARMCC_VERSION < 400677)
+  #error "Please use ARM Compiler Toolchain V4.0.677 or later!"
+#endif
+
+/* intrinsic void __enable_irq();     */
+/* intrinsic void __disable_irq();    */
+
+/** \brief  Get Control Register
+
+    This function returns the content of the Control Register.
+
+    \return               Control Register value
+ */
+__STATIC_INLINE uint32_t __get_CONTROL(void)
+{
+  register uint32_t __regControl         __ASM("control");
+  return(__regControl);
+}
+
+
+/** \brief  Set Control Register
+
+    This function writes the given value to the Control Register.
+
+    \param [in]    control  Control Register value to set
+ */
+__STATIC_INLINE void __set_CONTROL(uint32_t control)
+{
+  register uint32_t __regControl         __ASM("control");
+  __regControl = control;
+}
+
+
+/** \brief  Get IPSR Register
+
+    This function returns the content of the IPSR Register.
+
+    \return               IPSR Register value
+ */
+__STATIC_INLINE uint32_t __get_IPSR(void)
+{
+  register uint32_t __regIPSR          __ASM("ipsr");
+  return(__regIPSR);
+}
+
+
+/** \brief  Get APSR Register
+
+    This function returns the content of the APSR Register.
+
+    \return               APSR Register value
+ */
+__STATIC_INLINE uint32_t __get_APSR(void)
+{
+  register uint32_t __regAPSR          __ASM("apsr");
+  return(__regAPSR);
+}
+
+
+/** \brief  Get xPSR Register
+
+    This function returns the content of the xPSR Register.
+
+    \return               xPSR Register value
+ */
+__STATIC_INLINE uint32_t __get_xPSR(void)
+{
+  register uint32_t __regXPSR          __ASM("xpsr");
+  return(__regXPSR);
+}
+
+
+/** \brief  Get Process Stack Pointer
+
+    This function returns the current value of the Process Stack Pointer (PSP).
+
+    \return               PSP Register value
+ */
+__STATIC_INLINE uint32_t __get_PSP(void)
+{
+  register uint32_t __regProcessStackPointer  __ASM("psp");
+  return(__regProcessStackPointer);
+}
+
+
+/** \brief  Set Process Stack Pointer
+
+    This function assigns the given value to the Process Stack Pointer (PSP).
+
+    \param [in]    topOfProcStack  Process Stack Pointer value to set
+ */
+__STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
+{
+  register uint32_t __regProcessStackPointer  __ASM("psp");
+  __regProcessStackPointer = topOfProcStack;
+}
+
+
+/** \brief  Get Main Stack Pointer
+
+    This function returns the current value of the Main Stack Pointer (MSP).
+
+    \return               MSP Register value
+ */
+__STATIC_INLINE uint32_t __get_MSP(void)
+{
+  register uint32_t __regMainStackPointer     __ASM("msp");
+  return(__regMainStackPointer);
+}
+
+
+/** \brief  Set Main Stack Pointer
+
+    This function assigns the given value to the Main Stack Pointer (MSP).
+
+    \param [in]    topOfMainStack  Main Stack Pointer value to set
+ */
+__STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
+{
+  register uint32_t __regMainStackPointer     __ASM("msp");
+  __regMainStackPointer = topOfMainStack;
+}
+
+
+/** \brief  Get Priority Mask
+
+    This function returns the current state of the priority mask bit from the Priority Mask Register.
+
+    \return               Priority Mask value
+ */
+__STATIC_INLINE uint32_t __get_PRIMASK(void)
+{
+  register uint32_t __regPriMask         __ASM("primask");
+  return(__regPriMask);
+}
+
+
+/** \brief  Set Priority Mask
+
+    This function assigns the given value to the Priority Mask Register.
+
+    \param [in]    priMask  Priority Mask
+ */
+__STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
+{
+  register uint32_t __regPriMask         __ASM("primask");
+  __regPriMask = (priMask);
+}
+
+
+#if       (__CORTEX_M >= 0x03)
+
+/** \brief  Enable FIQ
+
+    This function enables FIQ interrupts by clearing the F-bit in the CPSR.
+    Can only be executed in Privileged modes.
+ */
+#define __enable_fault_irq                __enable_fiq
+
+
+/** \brief  Disable FIQ
+
+    This function disables FIQ interrupts by setting the F-bit in the CPSR.
+    Can only be executed in Privileged modes.
+ */
+#define __disable_fault_irq               __disable_fiq
+
+
+/** \brief  Get Base Priority
+
+    This function returns the current value of the Base Priority register.
+
+    \return               Base Priority register value
+ */
+__STATIC_INLINE uint32_t  __get_BASEPRI(void)
+{
+  register uint32_t __regBasePri         __ASM("basepri");
+  return(__regBasePri);
+}
+
+
+/** \brief  Set Base Priority
+
+    This function assigns the given value to the Base Priority register.
+
+    \param [in]    basePri  Base Priority value to set
+ */
+__STATIC_INLINE void __set_BASEPRI(uint32_t basePri)
+{
+  register uint32_t __regBasePri         __ASM("basepri");
+  __regBasePri = (basePri & 0xff);
+}
+
+
+/** \brief  Get Fault Mask
+
+    This function returns the current value of the Fault Mask register.
+
+    \return               Fault Mask register value
+ */
+__STATIC_INLINE uint32_t __get_FAULTMASK(void)
+{
+  register uint32_t __regFaultMask       __ASM("faultmask");
+  return(__regFaultMask);
+}
+
+
+/** \brief  Set Fault Mask
+
+    This function assigns the given value to the Fault Mask register.
+
+    \param [in]    faultMask  Fault Mask value to set
+ */
+__STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
+{
+  register uint32_t __regFaultMask       __ASM("faultmask");
+  __regFaultMask = (faultMask & (uint32_t)1);
+}
+
+#endif /* (__CORTEX_M >= 0x03) */
+
+
+#if       (__CORTEX_M == 0x04)
+
+/** \brief  Get FPSCR
+
+    This function returns the current value of the Floating Point Status/Control register.
+
+    \return               Floating Point Status/Control register value
+ */
+__STATIC_INLINE uint32_t __get_FPSCR(void)
+{
+#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
+  register uint32_t __regfpscr         __ASM("fpscr");
+  return(__regfpscr);
+#else
+   return(0);
+#endif
+}
+
+
+/** \brief  Set FPSCR
+
+    This function assigns the given value to the Floating Point Status/Control register.
+
+    \param [in]    fpscr  Floating Point Status/Control value to set
+ */
+__STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
+{
+#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
+  register uint32_t __regfpscr         __ASM("fpscr");
+  __regfpscr = (fpscr);
+#endif
+}
+
+#endif /* (__CORTEX_M == 0x04) */
+
+
+#elif defined ( __ICCARM__ ) /*------------------ ICC Compiler -------------------*/
+/* IAR iccarm specific functions */
+
+#include <cmsis_iar.h>
+
+
+#elif defined ( __TMS470__ ) /*---------------- TI CCS Compiler ------------------*/
+/* TI CCS specific functions */
+
+#include <cmsis_ccs.h>
+
+
+#elif defined ( __GNUC__ ) /*------------------ GNU Compiler ---------------------*/
+/* GNU gcc specific functions */
+
+/** \brief  Enable IRQ Interrupts
+
+  This function enables IRQ interrupts by clearing the I-bit in the CPSR.
+  Can only be executed in Privileged modes.
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_irq(void)
+{
+  __ASM volatile ("cpsie i" : : : "memory");
+}
+
+
+/** \brief  Disable IRQ Interrupts
+
+  This function disables IRQ interrupts by setting the I-bit in the CPSR.
+  Can only be executed in Privileged modes.
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __disable_irq(void)
+{
+  __ASM volatile ("cpsid i" : : : "memory");
+}
+
+
+/** \brief  Get Control Register
+
+    This function returns the content of the Control Register.
+
+    \return               Control Register value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_CONTROL(void)
+{
+  uint32_t result;
+
+  __ASM volatile ("MRS %0, control" : "=r" (result) );
+  return(result);
+}
+
+
+/** \brief  Set Control Register
+
+    This function writes the given value to the Control Register.
+
+    \param [in]    control  Control Register value to set
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_CONTROL(uint32_t control)
+{
+  __ASM volatile ("MSR control, %0" : : "r" (control) : "memory");
+}
+
+
+/** \brief  Get IPSR Register
+
+    This function returns the content of the IPSR Register.
+
+    \return               IPSR Register value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_IPSR(void)
+{
+  uint32_t result;
+
+  __ASM volatile ("MRS %0, ipsr" : "=r" (result) );
+  return(result);
+}
+
+
+/** \brief  Get APSR Register
+
+    This function returns the content of the APSR Register.
+
+    \return               APSR Register value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_APSR(void)
+{
+  uint32_t result;
+
+  __ASM volatile ("MRS %0, apsr" : "=r" (result) );
+  return(result);
+}
+
+
+/** \brief  Get xPSR Register
+
+    This function returns the content of the xPSR Register.
+
+    \return               xPSR Register value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_xPSR(void)
+{
+  uint32_t result;
+
+  __ASM volatile ("MRS %0, xpsr" : "=r" (result) );
+  return(result);
+}
+
+
+/** \brief  Get Process Stack Pointer
+
+    This function returns the current value of the Process Stack Pointer (PSP).
+
+    \return               PSP Register value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PSP(void)
+{
+  register uint32_t result;
+
+  __ASM volatile ("MRS %0, psp\n"  : "=r" (result) );
+  return(result);
+}
+
+
+/** \brief  Set Process Stack Pointer
+
+    This function assigns the given value to the Process Stack Pointer (PSP).
+
+    \param [in]    topOfProcStack  Process Stack Pointer value to set
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
+{
+  __ASM volatile ("MSR psp, %0\n" : : "r" (topOfProcStack) : "sp");
+}
+
+
+/** \brief  Get Main Stack Pointer
+
+    This function returns the current value of the Main Stack Pointer (MSP).
+
+    \return               MSP Register value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_MSP(void)
+{
+  register uint32_t result;
+
+  __ASM volatile ("MRS %0, msp\n" : "=r" (result) );
+  return(result);
+}
+
+
+/** \brief  Set Main Stack Pointer
+
+    This function assigns the given value to the Main Stack Pointer (MSP).
+
+    \param [in]    topOfMainStack  Main Stack Pointer value to set
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
+{
+  __ASM volatile ("MSR msp, %0\n" : : "r" (topOfMainStack) : "sp");
+}
+
+
+/** \brief  Get Priority Mask
+
+    This function returns the current state of the priority mask bit from the Priority Mask Register.
+
+    \return               Priority Mask value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PRIMASK(void)
+{
+  uint32_t result;
+
+  __ASM volatile ("MRS %0, primask" : "=r" (result) );
+  return(result);
+}
+
+
+/** \brief  Set Priority Mask
+
+    This function assigns the given value to the Priority Mask Register.
+
+    \param [in]    priMask  Priority Mask
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
+{
+  __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
+}
+
+
+#if       (__CORTEX_M >= 0x03)
+
+/** \brief  Enable FIQ
+
+    This function enables FIQ interrupts by clearing the F-bit in the CPSR.
+    Can only be executed in Privileged modes.
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_fault_irq(void)
+{
+  __ASM volatile ("cpsie f" : : : "memory");
+}
+
+
+/** \brief  Disable FIQ
+
+    This function disables FIQ interrupts by setting the F-bit in the CPSR.
+    Can only be executed in Privileged modes.
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __disable_fault_irq(void)
+{
+  __ASM volatile ("cpsid f" : : : "memory");
+}
+
+
+/** \brief  Get Base Priority
+
+    This function returns the current value of the Base Priority register.
+
+    \return               Base Priority register value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_BASEPRI(void)
+{
+  uint32_t result;
+
+  __ASM volatile ("MRS %0, basepri_max" : "=r" (result) );
+  return(result);
+}
+
+
+/** \brief  Set Base Priority
+
+    This function assigns the given value to the Base Priority register.
+
+    \param [in]    basePri  Base Priority value to set
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_BASEPRI(uint32_t value)
+{
+  __ASM volatile ("MSR basepri, %0" : : "r" (value) : "memory");
+}
+
+
+/** \brief  Get Fault Mask
+
+    This function returns the current value of the Fault Mask register.
+
+    \return               Fault Mask register value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_FAULTMASK(void)
+{
+  uint32_t result;
+
+  __ASM volatile ("MRS %0, faultmask" : "=r" (result) );
+  return(result);
+}
+
+
+/** \brief  Set Fault Mask
+
+    This function assigns the given value to the Fault Mask register.
+
+    \param [in]    faultMask  Fault Mask value to set
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
+{
+  __ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) : "memory");
+}
+
+#endif /* (__CORTEX_M >= 0x03) */
+
+
+#if       (__CORTEX_M == 0x04)
+
+/** \brief  Get FPSCR
+
+    This function returns the current value of the Floating Point Status/Control register.
+
+    \return               Floating Point Status/Control register value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_FPSCR(void)
+{
+#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
+  uint32_t result;
+
+  /* Empty asm statement works as a scheduling barrier */
+  __ASM volatile ("");
+  __ASM volatile ("VMRS %0, fpscr" : "=r" (result) );
+  __ASM volatile ("");
+  return(result);
+#else
+   return(0);
+#endif
+}
+
+
+/** \brief  Set FPSCR
+
+    This function assigns the given value to the Floating Point Status/Control register.
+
+    \param [in]    fpscr  Floating Point Status/Control value to set
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
+{
+#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
+  /* Empty asm statement works as a scheduling barrier */
+  __ASM volatile ("");
+  __ASM volatile ("VMSR fpscr, %0" : : "r" (fpscr) : "vfpcc");
+  __ASM volatile ("");
+#endif
+}
+
+#endif /* (__CORTEX_M == 0x04) */
+
+
+#elif defined ( __TASKING__ ) /*------------------ TASKING Compiler --------------*/
+/* TASKING carm specific functions */
+
+/*
+ * The CMSIS functions have been implemented as intrinsics in the compiler.
+ * Please use "carm -?i" to get an up to date list of all instrinsics,
+ * Including the CMSIS ones.
+ */
+
+#endif
+
+/*@} end of CMSIS_Core_RegAccFunctions */
+
+
+#endif /* __CORE_CMFUNC_H */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cmInstr.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cmInstr.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cmInstr.h	(revision 270)
@@ -0,0 +1,688 @@
+/**************************************************************************//**
+ * @file     core_cmInstr.h
+ * @brief    CMSIS Cortex-M Core Instruction Access Header File
+ * @version  V3.20
+ * @date     05. March 2013
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2009 - 2013 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+
+#ifndef __CORE_CMINSTR_H
+#define __CORE_CMINSTR_H
+
+
+/* ##########################  Core Instruction Access  ######################### */
+/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface
+  Access to dedicated instructions
+  @{
+*/
+
+#if   defined ( __CC_ARM ) /*------------------RealView Compiler -----------------*/
+/* ARM armcc specific functions */
+
+#if (__ARMCC_VERSION < 400677)
+  #error "Please use ARM Compiler Toolchain V4.0.677 or later!"
+#endif
+
+
+/** \brief  No Operation
+
+    No Operation does nothing. This instruction can be used for code alignment purposes.
+ */
+#define __NOP                             __nop
+
+
+/** \brief  Wait For Interrupt
+
+    Wait For Interrupt is a hint instruction that suspends execution
+    until one of a number of events occurs.
+ */
+#define __WFI                             __wfi
+
+
+/** \brief  Wait For Event
+
+    Wait For Event is a hint instruction that permits the processor to enter
+    a low-power state until one of a number of events occurs.
+ */
+#define __WFE                             __wfe
+
+
+/** \brief  Send Event
+
+    Send Event is a hint instruction. It causes an event to be signaled to the CPU.
+ */
+#define __SEV                             __sev
+
+
+/** \brief  Instruction Synchronization Barrier
+
+    Instruction Synchronization Barrier flushes the pipeline in the processor,
+    so that all instructions following the ISB are fetched from cache or
+    memory, after the instruction has been completed.
+ */
+#define __ISB()                           __isb(0xF)
+
+
+/** \brief  Data Synchronization Barrier
+
+    This function acts as a special kind of Data Memory Barrier.
+    It completes when all explicit memory accesses before this instruction complete.
+ */
+#define __DSB()                           __dsb(0xF)
+
+
+/** \brief  Data Memory Barrier
+
+    This function ensures the apparent order of the explicit memory operations before
+    and after the instruction, without ensuring their completion.
+ */
+#define __DMB()                           __dmb(0xF)
+
+
+/** \brief  Reverse byte order (32 bit)
+
+    This function reverses the byte order in integer value.
+
+    \param [in]    value  Value to reverse
+    \return               Reversed value
+ */
+#define __REV                             __rev
+
+
+/** \brief  Reverse byte order (16 bit)
+
+    This function reverses the byte order in two unsigned short values.
+
+    \param [in]    value  Value to reverse
+    \return               Reversed value
+ */
+#ifndef __NO_EMBEDDED_ASM
+__attribute__((section(".rev16_text"))) __STATIC_INLINE __ASM uint32_t __REV16(uint32_t value)
+{
+  rev16 r0, r0
+  bx lr
+}
+#endif
+
+/** \brief  Reverse byte order in signed short value
+
+    This function reverses the byte order in a signed short value with sign extension to integer.
+
+    \param [in]    value  Value to reverse
+    \return               Reversed value
+ */
+#ifndef __NO_EMBEDDED_ASM
+__attribute__((section(".revsh_text"))) __STATIC_INLINE __ASM int32_t __REVSH(int32_t value)
+{
+  revsh r0, r0
+  bx lr
+}
+#endif
+
+
+/** \brief  Rotate Right in unsigned value (32 bit)
+
+    This function Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits.
+
+    \param [in]    value  Value to rotate
+    \param [in]    value  Number of Bits to rotate
+    \return               Rotated value
+ */
+#define __ROR                             __ror
+
+
+/** \brief  Breakpoint
+
+    This function causes the processor to enter Debug state.
+    Debug tools can use this to investigate system state when the instruction at a particular address is reached.
+
+    \param [in]    value  is ignored by the processor.
+                   If required, a debugger can use it to store additional information about the breakpoint.
+ */
+#define __BKPT(value)                       __breakpoint(value)
+
+
+#if       (__CORTEX_M >= 0x03)
+
+/** \brief  Reverse bit order of value
+
+    This function reverses the bit order of the given value.
+
+    \param [in]    value  Value to reverse
+    \return               Reversed value
+ */
+#define __RBIT                            __rbit
+
+
+/** \brief  LDR Exclusive (8 bit)
+
+    This function performs a exclusive LDR command for 8 bit value.
+
+    \param [in]    ptr  Pointer to data
+    \return             value of type uint8_t at (*ptr)
+ */
+#define __LDREXB(ptr)                     ((uint8_t ) __ldrex(ptr))
+
+
+/** \brief  LDR Exclusive (16 bit)
+
+    This function performs a exclusive LDR command for 16 bit values.
+
+    \param [in]    ptr  Pointer to data
+    \return        value of type uint16_t at (*ptr)
+ */
+#define __LDREXH(ptr)                     ((uint16_t) __ldrex(ptr))
+
+
+/** \brief  LDR Exclusive (32 bit)
+
+    This function performs a exclusive LDR command for 32 bit values.
+
+    \param [in]    ptr  Pointer to data
+    \return        value of type uint32_t at (*ptr)
+ */
+#define __LDREXW(ptr)                     ((uint32_t ) __ldrex(ptr))
+
+
+/** \brief  STR Exclusive (8 bit)
+
+    This function performs a exclusive STR command for 8 bit values.
+
+    \param [in]  value  Value to store
+    \param [in]    ptr  Pointer to location
+    \return          0  Function succeeded
+    \return          1  Function failed
+ */
+#define __STREXB(value, ptr)              __strex(value, ptr)
+
+
+/** \brief  STR Exclusive (16 bit)
+
+    This function performs a exclusive STR command for 16 bit values.
+
+    \param [in]  value  Value to store
+    \param [in]    ptr  Pointer to location
+    \return          0  Function succeeded
+    \return          1  Function failed
+ */
+#define __STREXH(value, ptr)              __strex(value, ptr)
+
+
+/** \brief  STR Exclusive (32 bit)
+
+    This function performs a exclusive STR command for 32 bit values.
+
+    \param [in]  value  Value to store
+    \param [in]    ptr  Pointer to location
+    \return          0  Function succeeded
+    \return          1  Function failed
+ */
+#define __STREXW(value, ptr)              __strex(value, ptr)
+
+
+/** \brief  Remove the exclusive lock
+
+    This function removes the exclusive lock which is created by LDREX.
+
+ */
+#define __CLREX                           __clrex
+
+
+/** \brief  Signed Saturate
+
+    This function saturates a signed value.
+
+    \param [in]  value  Value to be saturated
+    \param [in]    sat  Bit position to saturate to (1..32)
+    \return             Saturated value
+ */
+#define __SSAT                            __ssat
+
+
+/** \brief  Unsigned Saturate
+
+    This function saturates an unsigned value.
+
+    \param [in]  value  Value to be saturated
+    \param [in]    sat  Bit position to saturate to (0..31)
+    \return             Saturated value
+ */
+#define __USAT                            __usat
+
+
+/** \brief  Count leading zeros
+
+    This function counts the number of leading zeros of a data value.
+
+    \param [in]  value  Value to count the leading zeros
+    \return             number of leading zeros in value
+ */
+#define __CLZ                             __clz
+
+#endif /* (__CORTEX_M >= 0x03) */
+
+
+
+#elif defined ( __ICCARM__ ) /*------------------ ICC Compiler -------------------*/
+/* IAR iccarm specific functions */
+
+#include <cmsis_iar.h>
+
+
+#elif defined ( __TMS470__ ) /*---------------- TI CCS Compiler ------------------*/
+/* TI CCS specific functions */
+
+#include <cmsis_ccs.h>
+
+
+#elif defined ( __GNUC__ ) /*------------------ GNU Compiler ---------------------*/
+/* GNU gcc specific functions */
+
+/* Define macros for porting to both thumb1 and thumb2.
+ * For thumb1, use low register (r0-r7), specified by constrant "l"
+ * Otherwise, use general registers, specified by constrant "r" */
+#if defined (__thumb__) && !defined (__thumb2__)
+#define __CMSIS_GCC_OUT_REG(r) "=l" (r)
+#define __CMSIS_GCC_USE_REG(r) "l" (r)
+#else
+#define __CMSIS_GCC_OUT_REG(r) "=r" (r)
+#define __CMSIS_GCC_USE_REG(r) "r" (r)
+#endif
+
+/** \brief  No Operation
+
+    No Operation does nothing. This instruction can be used for code alignment purposes.
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __NOP(void)
+{
+  __ASM volatile ("nop");
+}
+
+
+/** \brief  Wait For Interrupt
+
+    Wait For Interrupt is a hint instruction that suspends execution
+    until one of a number of events occurs.
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __WFI(void)
+{
+  __ASM volatile ("wfi");
+}
+
+
+/** \brief  Wait For Event
+
+    Wait For Event is a hint instruction that permits the processor to enter
+    a low-power state until one of a number of events occurs.
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __WFE(void)
+{
+  __ASM volatile ("wfe");
+}
+
+
+/** \brief  Send Event
+
+    Send Event is a hint instruction. It causes an event to be signaled to the CPU.
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __SEV(void)
+{
+  __ASM volatile ("sev");
+}
+
+
+/** \brief  Instruction Synchronization Barrier
+
+    Instruction Synchronization Barrier flushes the pipeline in the processor,
+    so that all instructions following the ISB are fetched from cache or
+    memory, after the instruction has been completed.
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __ISB(void)
+{
+  __ASM volatile ("isb");
+}
+
+
+/** \brief  Data Synchronization Barrier
+
+    This function acts as a special kind of Data Memory Barrier.
+    It completes when all explicit memory accesses before this instruction complete.
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __DSB(void)
+{
+  __ASM volatile ("dsb");
+}
+
+
+/** \brief  Data Memory Barrier
+
+    This function ensures the apparent order of the explicit memory operations before
+    and after the instruction, without ensuring their completion.
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __DMB(void)
+{
+  __ASM volatile ("dmb");
+}
+
+
+/** \brief  Reverse byte order (32 bit)
+
+    This function reverses the byte order in integer value.
+
+    \param [in]    value  Value to reverse
+    \return               Reversed value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __REV(uint32_t value)
+{
+#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
+  return __builtin_bswap32(value);
+#else
+  uint32_t result;
+
+  __ASM volatile ("rev %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) );
+  return(result);
+#endif
+}
+
+
+/** \brief  Reverse byte order (16 bit)
+
+    This function reverses the byte order in two unsigned short values.
+
+    \param [in]    value  Value to reverse
+    \return               Reversed value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __REV16(uint32_t value)
+{
+  uint32_t result;
+
+  __ASM volatile ("rev16 %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) );
+  return(result);
+}
+
+
+/** \brief  Reverse byte order in signed short value
+
+    This function reverses the byte order in a signed short value with sign extension to integer.
+
+    \param [in]    value  Value to reverse
+    \return               Reversed value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE int32_t __REVSH(int32_t value)
+{
+#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
+  return (short)__builtin_bswap16(value);
+#else
+  uint32_t result;
+
+  __ASM volatile ("revsh %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) );
+  return(result);
+#endif
+}
+
+
+/** \brief  Rotate Right in unsigned value (32 bit)
+
+    This function Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits.
+
+    \param [in]    value  Value to rotate
+    \param [in]    value  Number of Bits to rotate
+    \return               Rotated value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __ROR(uint32_t op1, uint32_t op2)
+{
+  return (op1 >> op2) | (op1 << (32 - op2)); 
+}
+
+
+/** \brief  Breakpoint
+
+    This function causes the processor to enter Debug state.
+    Debug tools can use this to investigate system state when the instruction at a particular address is reached.
+
+    \param [in]    value  is ignored by the processor.
+                   If required, a debugger can use it to store additional information about the breakpoint.
+ */
+#define __BKPT(value)                       __ASM volatile ("bkpt "#value)
+
+
+#if       (__CORTEX_M >= 0x03)
+
+/** \brief  Reverse bit order of value
+
+    This function reverses the bit order of the given value.
+
+    \param [in]    value  Value to reverse
+    \return               Reversed value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __RBIT(uint32_t value)
+{
+  uint32_t result;
+
+   __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) );
+   return(result);
+}
+
+
+/** \brief  LDR Exclusive (8 bit)
+
+    This function performs a exclusive LDR command for 8 bit value.
+
+    \param [in]    ptr  Pointer to data
+    \return             value of type uint8_t at (*ptr)
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint8_t __LDREXB(volatile uint8_t *addr)
+{
+    uint32_t result;
+
+#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
+   __ASM volatile ("ldrexb %0, %1" : "=r" (result) : "Q" (*addr) );
+#else
+    /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not
+       accepted by assembler. So has to use following less efficient pattern.
+    */
+   __ASM volatile ("ldrexb %0, [%1]" : "=r" (result) : "r" (addr) : "memory" );
+#endif
+   return(result);
+}
+
+
+/** \brief  LDR Exclusive (16 bit)
+
+    This function performs a exclusive LDR command for 16 bit values.
+
+    \param [in]    ptr  Pointer to data
+    \return        value of type uint16_t at (*ptr)
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint16_t __LDREXH(volatile uint16_t *addr)
+{
+    uint32_t result;
+
+#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
+   __ASM volatile ("ldrexh %0, %1" : "=r" (result) : "Q" (*addr) );
+#else
+    /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not
+       accepted by assembler. So has to use following less efficient pattern.
+    */
+   __ASM volatile ("ldrexh %0, [%1]" : "=r" (result) : "r" (addr) : "memory" );
+#endif
+   return(result);
+}
+
+
+/** \brief  LDR Exclusive (32 bit)
+
+    This function performs a exclusive LDR command for 32 bit values.
+
+    \param [in]    ptr  Pointer to data
+    \return        value of type uint32_t at (*ptr)
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __LDREXW(volatile uint32_t *addr)
+{
+    uint32_t result;
+
+   __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) );
+   return(result);
+}
+
+
+/** \brief  STR Exclusive (8 bit)
+
+    This function performs a exclusive STR command for 8 bit values.
+
+    \param [in]  value  Value to store
+    \param [in]    ptr  Pointer to location
+    \return          0  Function succeeded
+    \return          1  Function failed
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __STREXB(uint8_t value, volatile uint8_t *addr)
+{
+   uint32_t result;
+
+   __ASM volatile ("strexb %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) );
+   return(result);
+}
+
+
+/** \brief  STR Exclusive (16 bit)
+
+    This function performs a exclusive STR command for 16 bit values.
+
+    \param [in]  value  Value to store
+    \param [in]    ptr  Pointer to location
+    \return          0  Function succeeded
+    \return          1  Function failed
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __STREXH(uint16_t value, volatile uint16_t *addr)
+{
+   uint32_t result;
+
+   __ASM volatile ("strexh %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) );
+   return(result);
+}
+
+
+/** \brief  STR Exclusive (32 bit)
+
+    This function performs a exclusive STR command for 32 bit values.
+
+    \param [in]  value  Value to store
+    \param [in]    ptr  Pointer to location
+    \return          0  Function succeeded
+    \return          1  Function failed
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __STREXW(uint32_t value, volatile uint32_t *addr)
+{
+   uint32_t result;
+
+   __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) );
+   return(result);
+}
+
+
+/** \brief  Remove the exclusive lock
+
+    This function removes the exclusive lock which is created by LDREX.
+
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE void __CLREX(void)
+{
+  __ASM volatile ("clrex" ::: "memory");
+}
+
+
+/** \brief  Signed Saturate
+
+    This function saturates a signed value.
+
+    \param [in]  value  Value to be saturated
+    \param [in]    sat  Bit position to saturate to (1..32)
+    \return             Saturated value
+ */
+#define __SSAT(ARG1,ARG2) \
+({                          \
+  uint32_t __RES, __ARG1 = (ARG1); \
+  __ASM ("ssat %0, %1, %2" : "=r" (__RES) :  "I" (ARG2), "r" (__ARG1) ); \
+  __RES; \
+ })
+
+
+/** \brief  Unsigned Saturate
+
+    This function saturates an unsigned value.
+
+    \param [in]  value  Value to be saturated
+    \param [in]    sat  Bit position to saturate to (0..31)
+    \return             Saturated value
+ */
+#define __USAT(ARG1,ARG2) \
+({                          \
+  uint32_t __RES, __ARG1 = (ARG1); \
+  __ASM ("usat %0, %1, %2" : "=r" (__RES) :  "I" (ARG2), "r" (__ARG1) ); \
+  __RES; \
+ })
+
+
+/** \brief  Count leading zeros
+
+    This function counts the number of leading zeros of a data value.
+
+    \param [in]  value  Value to count the leading zeros
+    \return             number of leading zeros in value
+ */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint8_t __CLZ(uint32_t value)
+{
+   uint32_t result;
+
+  __ASM volatile ("clz %0, %1" : "=r" (result) : "r" (value) );
+  return(result);
+}
+
+#endif /* (__CORTEX_M >= 0x03) */
+
+
+
+
+#elif defined ( __TASKING__ ) /*------------------ TASKING Compiler --------------*/
+/* TASKING carm specific functions */
+
+/*
+ * The CMSIS functions have been implemented as intrinsics in the compiler.
+ * Please use "carm -?i" to get an up to date list of all intrinsics,
+ * Including the CMSIS ones.
+ */
+
+#endif
+
+/*@}*/ /* end of group CMSIS_Core_InstructionInterface */
+
+#endif /* __CORE_CMINSTR_H */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cmSimd.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cmSimd.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/cmsis/core_cmSimd.h	(revision 270)
@@ -0,0 +1,697 @@
+/**************************************************************************//**
+ * @file     core_cmSimd.h
+ * @brief    CMSIS Cortex-M SIMD Header File
+ * @version  V4.10
+ * @date     18. March 2015
+ *
+ * @note
+ *
+ ******************************************************************************/
+/* Copyright (c) 2009 - 2014 ARM LIMITED
+
+   All rights reserved.
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+   - Neither the name of ARM nor the names of its contributors may be used
+     to endorse or promote products derived from this software without
+     specific prior written permission.
+   *
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
+   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+   POSSIBILITY OF SUCH DAMAGE.
+   ---------------------------------------------------------------------------*/
+
+
+#if defined ( __ICCARM__ )
+ #pragma system_include  /* treat file as system include file for MISRA check */
+#endif
+
+#ifndef __CORE_CMSIMD_H
+#define __CORE_CMSIMD_H
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+
+/*******************************************************************************
+ *                Hardware Abstraction Layer
+ ******************************************************************************/
+
+
+/* ###################  Compiler specific Intrinsics  ########################### */
+/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics
+  Access to dedicated SIMD instructions
+  @{
+*/
+
+#if   defined ( __CC_ARM ) /*------------------RealView Compiler -----------------*/
+/* ARM armcc specific functions */
+#define __SADD8                           __sadd8
+#define __QADD8                           __qadd8
+#define __SHADD8                          __shadd8
+#define __UADD8                           __uadd8
+#define __UQADD8                          __uqadd8
+#define __UHADD8                          __uhadd8
+#define __SSUB8                           __ssub8
+#define __QSUB8                           __qsub8
+#define __SHSUB8                          __shsub8
+#define __USUB8                           __usub8
+#define __UQSUB8                          __uqsub8
+#define __UHSUB8                          __uhsub8
+#define __SADD16                          __sadd16
+#define __QADD16                          __qadd16
+#define __SHADD16                         __shadd16
+#define __UADD16                          __uadd16
+#define __UQADD16                         __uqadd16
+#define __UHADD16                         __uhadd16
+#define __SSUB16                          __ssub16
+#define __QSUB16                          __qsub16
+#define __SHSUB16                         __shsub16
+#define __USUB16                          __usub16
+#define __UQSUB16                         __uqsub16
+#define __UHSUB16                         __uhsub16
+#define __SASX                            __sasx
+#define __QASX                            __qasx
+#define __SHASX                           __shasx
+#define __UASX                            __uasx
+#define __UQASX                           __uqasx
+#define __UHASX                           __uhasx
+#define __SSAX                            __ssax
+#define __QSAX                            __qsax
+#define __SHSAX                           __shsax
+#define __USAX                            __usax
+#define __UQSAX                           __uqsax
+#define __UHSAX                           __uhsax
+#define __USAD8                           __usad8
+#define __USADA8                          __usada8
+#define __SSAT16                          __ssat16
+#define __USAT16                          __usat16
+#define __UXTB16                          __uxtb16
+#define __UXTAB16                         __uxtab16
+#define __SXTB16                          __sxtb16
+#define __SXTAB16                         __sxtab16
+#define __SMUAD                           __smuad
+#define __SMUADX                          __smuadx
+#define __SMLAD                           __smlad
+#define __SMLADX                          __smladx
+#define __SMLALD                          __smlald
+#define __SMLALDX                         __smlaldx
+#define __SMUSD                           __smusd
+#define __SMUSDX                          __smusdx
+#define __SMLSD                           __smlsd
+#define __SMLSDX                          __smlsdx
+#define __SMLSLD                          __smlsld
+#define __SMLSLDX                         __smlsldx
+#define __SEL                             __sel
+#define __QADD                            __qadd
+#define __QSUB                            __qsub
+
+#define __PKHBT(ARG1,ARG2,ARG3)          ( ((((uint32_t)(ARG1))          ) & 0x0000FFFFUL) |  \
+                                           ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL)  )
+
+#define __PKHTB(ARG1,ARG2,ARG3)          ( ((((uint32_t)(ARG1))          ) & 0xFFFF0000UL) |  \
+                                           ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL)  )
+
+#define __SMMLA(ARG1,ARG2,ARG3)          ( (int32_t)((((int64_t)(ARG1) * (ARG2)) + \
+                                                      ((int64_t)(ARG3) << 32)      ) >> 32))
+
+
+#elif defined ( __GNUC__ ) /*------------------ GNU Compiler ---------------------*/
+/* GNU gcc specific functions */
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SADD8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("sadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QADD8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("qadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SHADD8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("shadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UADD8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UQADD8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uqadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UHADD8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uhadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SSUB8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("ssub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QSUB8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("qsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SHSUB8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("shsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __USUB8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("usub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UQSUB8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uqsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UHSUB8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uhsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SADD16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("sadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QADD16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("qadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SHADD16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("shadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UADD16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UQADD16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uqadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UHADD16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uhadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SSUB16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("ssub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QSUB16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("qsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SHSUB16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("shsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __USUB16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("usub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UQSUB16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uqsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UHSUB16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uhsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SASX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("sasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QASX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("qasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SHASX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("shasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UASX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UQASX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uqasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UHASX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uhasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SSAX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("ssax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QSAX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("qsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SHSAX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("shsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __USAX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("usax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UQSAX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uqsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UHSAX(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uhsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __USAD8(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("usad8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __USADA8(uint32_t op1, uint32_t op2, uint32_t op3)
+{
+  uint32_t result;
+
+  __ASM volatile ("usada8 %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
+  return(result);
+}
+
+#define __SSAT16(ARG1,ARG2) \
+({                          \
+  uint32_t __RES, __ARG1 = (ARG1); \
+  __ASM ("ssat16 %0, %1, %2" : "=r" (__RES) :  "I" (ARG2), "r" (__ARG1) ); \
+  __RES; \
+ })
+
+#define __USAT16(ARG1,ARG2) \
+({                          \
+  uint32_t __RES, __ARG1 = (ARG1); \
+  __ASM ("usat16 %0, %1, %2" : "=r" (__RES) :  "I" (ARG2), "r" (__ARG1) ); \
+  __RES; \
+ })
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UXTB16(uint32_t op1)
+{
+  uint32_t result;
+
+  __ASM volatile ("uxtb16 %0, %1" : "=r" (result) : "r" (op1));
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __UXTAB16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("uxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SXTB16(uint32_t op1)
+{
+  uint32_t result;
+
+  __ASM volatile ("sxtb16 %0, %1" : "=r" (result) : "r" (op1));
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SXTAB16(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("sxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMUAD  (uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("smuad %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMUADX (uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("smuadx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMLAD (uint32_t op1, uint32_t op2, uint32_t op3)
+{
+  uint32_t result;
+
+  __ASM volatile ("smlad %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMLADX (uint32_t op1, uint32_t op2, uint32_t op3)
+{
+  uint32_t result;
+
+  __ASM volatile ("smladx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint64_t __SMLALD (uint32_t op1, uint32_t op2, uint64_t acc)
+{
+  union llreg_u{
+    uint32_t w32[2];
+    uint64_t w64;
+  } llr;
+  llr.w64 = acc;
+
+#ifndef __ARMEB__   // Little endian
+  __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) );
+#else               // Big endian
+  __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) );
+#endif
+
+  return(llr.w64);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint64_t __SMLALDX (uint32_t op1, uint32_t op2, uint64_t acc)
+{
+  union llreg_u{
+    uint32_t w32[2];
+    uint64_t w64;
+  } llr;
+  llr.w64 = acc;
+
+#ifndef __ARMEB__   // Little endian
+  __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) );
+#else               // Big endian
+  __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) );
+#endif
+
+  return(llr.w64);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMUSD  (uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("smusd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMUSDX (uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("smusdx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMLSD (uint32_t op1, uint32_t op2, uint32_t op3)
+{
+  uint32_t result;
+
+  __ASM volatile ("smlsd %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMLSDX (uint32_t op1, uint32_t op2, uint32_t op3)
+{
+  uint32_t result;
+
+  __ASM volatile ("smlsdx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint64_t __SMLSLD (uint32_t op1, uint32_t op2, uint64_t acc)
+{
+  union llreg_u{
+    uint32_t w32[2];
+    uint64_t w64;
+  } llr;
+  llr.w64 = acc;
+
+#ifndef __ARMEB__   // Little endian
+  __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) );
+#else               // Big endian
+  __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) );
+#endif
+
+  return(llr.w64);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint64_t __SMLSLDX (uint32_t op1, uint32_t op2, uint64_t acc)
+{
+  union llreg_u{
+    uint32_t w32[2];
+    uint64_t w64;
+  } llr;
+  llr.w64 = acc;
+
+#ifndef __ARMEB__   // Little endian
+  __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) );
+#else               // Big endian
+  __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) );
+#endif
+
+  return(llr.w64);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SEL  (uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("sel %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QADD(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("qadd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QSUB(uint32_t op1, uint32_t op2)
+{
+  uint32_t result;
+
+  __ASM volatile ("qsub %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
+  return(result);
+}
+
+#define __PKHBT(ARG1,ARG2,ARG3) \
+({                          \
+  uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \
+  __ASM ("pkhbt %0, %1, %2, lsl %3" : "=r" (__RES) :  "r" (__ARG1), "r" (__ARG2), "I" (ARG3)  ); \
+  __RES; \
+ })
+
+#define __PKHTB(ARG1,ARG2,ARG3) \
+({                          \
+  uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \
+  if (ARG3 == 0) \
+    __ASM ("pkhtb %0, %1, %2" : "=r" (__RES) :  "r" (__ARG1), "r" (__ARG2)  ); \
+  else \
+    __ASM ("pkhtb %0, %1, %2, asr %3" : "=r" (__RES) :  "r" (__ARG1), "r" (__ARG2), "I" (ARG3)  ); \
+  __RES; \
+ })
+
+__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __SMMLA (int32_t op1, int32_t op2, int32_t op3)
+{
+ int32_t result;
+
+ __ASM volatile ("smmla %0, %1, %2, %3" : "=r" (result): "r"  (op1), "r" (op2), "r" (op3) );
+ return(result);
+}
+
+
+#elif defined ( __ICCARM__ ) /*------------------ ICC Compiler -------------------*/
+/* IAR iccarm specific functions */
+#include <cmsis_iar.h>
+
+
+#elif defined ( __TMS470__ ) /*---------------- TI CCS Compiler ------------------*/
+/* TI CCS specific functions */
+#include <cmsis_ccs.h>
+
+
+#elif defined ( __TASKING__ ) /*------------------ TASKING Compiler --------------*/
+/* TASKING carm specific functions */
+/* not yet supported */
+
+
+#elif defined ( __CSMC__ ) /*------------------ COSMIC Compiler -------------------*/
+/* Cosmic specific functions */
+#include <cmsis_csm.h>
+
+#endif
+
+/*@} end of group CMSIS_SIMD_intrinsics */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CORE_CMSIMD_H */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/PeripheralNames.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/PeripheralNames.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/PeripheralNames.h	(revision 270)
@@ -0,0 +1,158 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_PERIPHERALNAMES_H
+#define MBED_PERIPHERALNAMES_H
+
+#include "cmsis.h"
+#include "PinNames.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+    UART0,
+    UART1,
+    UART2,
+    UART3,
+    UART4,
+    UART5,
+    UART6,
+    UART7,
+} UARTName;
+
+// PWMType & 1 == 1 then have to use PWDTR[12] == 1
+typedef enum {
+    PWM1A  = 0,
+    PWM1B,
+    PWM1C,
+    PWM1D,
+    PWM1E,
+    PWM1F,
+    PWM1G,
+    PWM1H,
+    PWM2A  = 0x10,
+    PWM2B,
+    PWM2C,
+    PWM2D,
+    PWM2E,
+    PWM2F,
+    PWM2G,
+    PWM2H,
+} PWMType;
+
+typedef enum {
+    TIOC0A  = 0,
+    TIOC0B,
+    TIOC0C,
+    TIOC0D,
+    TIOC1A = 0x10,
+    TIOC1B,
+    TIOC2A = 0x20,
+    TIOC2B,
+    TIOC3A = 0x30,
+    TIOC3B,
+    TIOC3C,
+    TIOC3D,
+    TIOC4A = 0x40,
+    TIOC4B,
+    TIOC4C,
+    TIOC4D,
+} MTU2_PWMType;
+
+typedef enum {
+    PWM0_PIN  = 0,
+    PWM1_PIN,
+    PWM2_PIN,
+    PWM3_PIN,
+    PWM4_PIN,
+    PWM5_PIN,
+    PWM6_PIN,
+    PWM7_PIN,
+    PWM8_PIN,
+    PWM9_PIN,
+    PWM10_PIN,
+    PWM11_PIN,
+    PWM12_PIN,
+    PWM13_PIN,
+    MTU2_PWM0_PIN = 0x20,
+    MTU2_PWM1_PIN,
+    MTU2_PWM2_PIN,
+    MTU2_PWM3_PIN,
+    MTU2_PWM4_PIN,
+    MTU2_PWM5_PIN,
+    MTU2_PWM6_PIN,
+    MTU2_PWM7_PIN,
+    MTU2_PWM8_PIN,
+    MTU2_PWM9_PIN,
+    MTU2_PWM10_PIN,
+    MTU2_PWM11_PIN,
+    MTU2_PWM12_PIN,
+    MTU2_PWM13_PIN,
+    MTU2_PWM14_PIN,
+    MTU2_PWM15_PIN,
+    MTU2_PWM16_PIN,
+    MTU2_PWM17_PIN,
+    MTU2_PWM18_PIN,
+    MTU2_PWM19_PIN,
+    MTU2_PWM20_PIN,
+    MTU2_PWM21_PIN,
+} PWMName;
+
+typedef enum {
+    AN0= 0,
+    AN1= 1,
+    AN2= 2,
+    AN3= 3,
+    AN4= 4,
+    AN5= 5,
+    AN6= 6,
+    AN7= 7,
+} ADCName;
+
+typedef enum {
+    SPI_0 = 0,
+    SPI_1,
+    SPI_2,
+} SPIName;
+
+typedef enum {
+    I2C_0 = 0,
+    I2C_1,
+    I2C_2,
+    I2C_3 
+} I2CName;
+
+typedef enum {
+    CAN_0 = 0,
+    CAN_1,
+    CAN_2,
+    CAN_3, 
+    CAN_4
+} CANName;
+
+
+#define STDIO_UART_TX     USBTX
+#define STDIO_UART_RX     USBRX
+#define STDIO_UART        UART2
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/PinNames.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/PinNames.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/PinNames.h	(revision 270)
@@ -0,0 +1,110 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_PINNAMES_H
+#define MBED_PINNAMES_H
+
+#include "cmsis.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+    PIN_INPUT,
+    PIN_OUTPUT
+} PinDirection;
+
+#define PORT_SHIFT  4
+
+typedef enum {
+    P0_0 = 0,
+          P0_1, P0_2, P0_3, P0_4, P0_5,_P0_6,_P0_7,_P0_8,_P0_9,_P0_10,_P0_11,_P0_12,_P0_13,_P0_14,_P0_15,
+    P1_0, P1_1, P1_2, P1_3, P1_4, P1_5, P1_6, P1_7, P1_8, P1_9, P1_10, P1_11, P1_12, P1_13, P1_14, P1_15, 
+    P2_0, P2_1, P2_2, P2_3, P2_4, P2_5, P2_6, P2_7, P2_8, P2_9, P2_10, P2_11, P2_12, P2_13, P2_14, P2_15, 
+    P3_0, P3_1, P3_2, P3_3, P3_4, P3_5, P3_6, P3_7, P3_8, P3_9, P3_10, P3_11, P3_12, P3_13, P3_14, P3_15, 
+    P4_0, P4_1, P4_2, P4_3, P4_4, P4_5, P4_6, P4_7, P4_8, P4_9, P4_10, P4_11, P4_12, P4_13, P4_14, P4_15, 
+    P5_0, P5_1, P5_2, P5_3, P5_4, P5_5, P5_6, P5_7, P5_8, P5_9, P5_10, P5_11, P5_12, P5_13, P5_14, P5_15, 
+    P6_0, P6_1, P6_2, P6_3, P6_4, P6_5, P6_6, P6_7, P6_8, P6_9, P6_10, P6_11, P6_12, P6_13, P6_14, P6_15, 
+    P7_0, P7_1, P7_2, P7_3, P7_4, P7_5, P7_6, P7_7, P7_8, P7_9, P7_10, P7_11, P7_12, P7_13, P7_14, P7_15, 
+    P8_0, P8_1, P8_2, P8_3, P8_4, P8_5, P8_6, P8_7, P8_8, P8_9, P8_10, P8_11, P8_12, P8_13, P8_14, P8_15, 
+    P9_0, P9_1, P9_2, P9_3, P9_4, P9_5, P9_6, P9_7, P9_8, P9_9, P9_10, P9_11, P9_12, P9_13, P9_14, P9_15, 
+    P10_0,P10_1,P10_2,P10_3,P10_4,P10_5,P10_6,P10_7,P10_8,P10_9,P10_10,P10_11,P10_12,P10_13,P10_14,P10_15,
+    P11_0,P11_1,P11_2,P11_3,P11_4,P11_5,P11_6,P11_7,P11_8,P11_9,P11_10,P11_11,P11_12,P11_13,P11_14,P11_15, 
+
+    // mbed Pin Names
+    LED1 = P6_13,
+    LED2 = P6_14,
+    LED3 = P6_15,
+    LED4 = P6_12,
+
+    LED_RED  = LED1,
+    LED_GREEN= LED2,
+    LED_BLUE = LED3,
+    LED_USER = LED4,
+
+    USBTX = P6_3,
+    USBRX = P6_2,
+
+    // Arduiono Pin Names
+    D0 = P2_15,
+    D1 = P2_14,
+    D2 = P4_7,
+    D3 = P4_6,
+    D4 = P4_5,
+    D5 = P4_4,
+    D6 = P8_13,
+    D7 = P8_11,
+    D8 = P8_15,
+    D9 = P8_14,
+    D10 = P10_13,
+    D11 = P10_14,
+    D12 = P10_15,
+    D13 = P10_12,
+    D14 = P1_3,
+    D15 = P1_2,
+
+    A0 = P1_8,
+    A1 = P1_9,
+    A2 = P1_10,
+    A3 = P1_11,
+    A4 = P1_13,
+    A5 = P1_15,
+
+    I2C_SCL = D15,
+    I2C_SDA = D14,
+
+    USER_BUTTON0 = P6_0,
+
+    // Not connected
+    NC = (int)0xFFFFFFFF
+} PinName;
+
+typedef enum {
+    PullUp = 0,
+    PullDown = 3,
+    PullNone = 2,
+    OpenDrain = 4,
+    PullDefault = PullDown
+} PinMode;
+
+#define PINGROUP(pin) (((pin)>>PORT_SHIFT)&0x0f)
+#define PINNO(pin) ((pin)&0x0f)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/PortNames.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/PortNames.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/PortNames.h	(revision 270)
@@ -0,0 +1,34 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_PORTNAMES_H
+#define MBED_PORTNAMES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+    Port0 = 0,
+    Port1 = 1,
+    Port2 = 2,
+    Port3 = 3,
+    Port4 = 4
+} PortName;
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/TARGET_MBED_MBRZA1H/reserved_pins.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/TARGET_MBED_MBRZA1H/reserved_pins.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/TARGET_MBED_MBRZA1H/reserved_pins.h	(revision 270)
@@ -0,0 +1,6 @@
+#ifndef RESERVED_PINS_H
+#define RESERVED_PINS_H
+
+#define TARGET_RESERVED_PINS {}
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/analogin_api.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/analogin_api.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/analogin_api.c	(revision 270)
@@ -0,0 +1,120 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "mbed_assert.h"
+#include "analogin_api.h"
+
+#include "cmsis.h"
+#include "pinmap.h"
+
+#include "adc_iodefine.h"
+#include "cpg_iodefine.h"
+
+#define ANALOGIN_MEDIAN_FILTER      0
+
+static const PinMap PinMap_ADC[] = {
+    {P1_8,  AN0, 1},
+    {P1_9,  AN1, 1},
+    {P1_10, AN2, 1},
+    {P1_11, AN3, 1},
+    {P1_12, AN3, 1},
+    {P1_13, AN5, 1},
+    {P1_14, AN5, 1},
+    {P1_15, AN7, 1},
+    {NC,    NC,  0}
+};
+
+static volatile uint16_t *ADCDR[] = {
+    &ADCADDRA,
+    &ADCADDRB,
+    &ADCADDRC,
+    &ADCADDRD,
+    &ADCADDRE,
+    &ADCADDRF,
+    &ADCADDRG,
+    &ADCADDRH,
+};
+
+void analogin_init(analogin_t *obj, PinName pin) {
+    obj->adc = (ADCName)pinmap_peripheral(pin, PinMap_ADC);
+    MBED_ASSERT(obj->adc != (ADCName)NC);
+
+    CPGSTBCR3 &= ~(1 << 1);
+    CPGSTBCR6 &= ~(1 << 7);
+
+    // 15: ADF 14: ADIE 13: ADST, [12:9] TRGS..0 
+    //    [8:6] CKS 010 :: 340tclk 
+    //    [5:3] MDS 000 :: single mode 
+    //    [2:0] CH  000 :: AN0 
+    ADCADCSR = 0x0080; 
+
+    pinmap_pinout(pin, PinMap_ADC);
+}
+
+static inline uint32_t adc_read(analogin_t *obj) {
+    volatile uint16_t data;
+
+    // Select the appropriate channel and start conversion
+    ADCADCSR &= 0xfff8;
+    ADCADCSR |= (1 << 13 | (obj->adc & 0x7));
+
+    // Wait end of conversion
+    do {
+        data = ADCADCSR;
+    } while (((data & (1 << 15)) == 0) || ((data & (1 << 13)) != 0));
+
+    // clear flag
+    ADCADCSR &= ~(1 << 15);
+
+    return ((*(ADCDR[obj->adc])) >> 4) & 0x0FFF;   // 12 bits range
+}
+
+#if ANALOGIN_MEDIAN_FILTER
+static inline void order(uint32_t *a, uint32_t *b) {
+    if (*a > *b) {
+        uint32_t t = *a;
+        *a = *b;
+        *b = t;
+    }
+}
+#endif
+
+static inline uint32_t adc_read_u32(analogin_t *obj) {
+    uint32_t value;
+#if ANALOGIN_MEDIAN_FILTER
+    uint32_t v1 = adc_read(obj);
+    uint32_t v2 = adc_read(obj);
+    uint32_t v3 = adc_read(obj);
+    order(&v1, &v2);
+    order(&v2, &v3);
+    order(&v1, &v2);
+    value = v2;
+#else
+    value = adc_read(obj);
+#endif
+    return value;
+}
+
+uint16_t analogin_read_u16(analogin_t *obj) {
+    uint32_t value = adc_read_u32(obj);
+
+    return (value << 4) | ((value >> 8) & 0x000F); // 12-bit to 16-bit conversion
+}
+
+float analogin_read(analogin_t *obj) {
+    uint32_t value = adc_read_u32(obj);
+
+    return (float)value * (1.0f / (float)0x0FFF);  // 12 bits range
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/can_api.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/can_api.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/can_api.c	(revision 270)
@@ -0,0 +1,1009 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <string.h>
+#include "mbed_assert.h"
+#include "can_api.h"
+#include "RZ_A1_Init.h"
+#include "cmsis.h"
+#include "pinmap.h"
+#include "rscan0_iodefine.h"
+#include "r_typedefs.h"
+#include "MBRZA1H.h"
+
+#define CAN_NUM         5
+#define CAN_SND_RCV     2
+#define IRQ_NUM         8
+
+static void can_rec_irq(uint32_t ch);
+static void can_trx_irq(uint32_t ch);
+static void can_err_irq(uint32_t ch, CanIrqType type);
+static void can0_rec_irq(void);
+static void can1_rec_irq(void);
+static void can2_rec_irq(void);
+static void can3_rec_irq(void);
+static void can4_rec_irq(void);
+static void can0_trx_irq(void);
+static void can1_trx_irq(void);
+static void can2_trx_irq(void);
+static void can3_trx_irq(void);
+static void can4_trx_irq(void);
+static void can0_err_warning_irq(void);
+static void can1_err_warning_irq(void);
+static void can2_err_warning_irq(void);
+static void can3_err_warning_irq(void);
+static void can4_err_warning_irq(void);
+static void can0_overrun_irq(void);
+static void can1_overrun_irq(void);
+static void can2_overrun_irq(void);
+static void can3_overrun_irq(void);
+static void can4_overrun_irq(void);
+static void can0_passive_irq(void);
+static void can1_passive_irq(void);
+static void can2_passive_irq(void);
+static void can3_passive_irq(void);
+static void can4_passive_irq(void);
+static void can0_arb_lost_irq(void);
+static void can1_arb_lost_irq(void);
+static void can2_arb_lost_irq(void);
+static void can3_arb_lost_irq(void);
+static void can4_arb_lost_irq(void);
+static void can0_bus_err_irq(void);
+static void can1_bus_err_irq(void);
+static void can2_bus_err_irq(void);
+static void can3_bus_err_irq(void);
+static void can4_bus_err_irq(void);
+static void can_reset_reg(can_t *obj);
+static void can_reset_recv_rule(can_t *obj);
+static void can_reset_buffer(can_t *obj);
+static void can_reconfigure_channel(void);
+static void can_set_frequency(can_t *obj, int f);
+static void can_set_global_mode(int mode);
+static void can_set_channel_mode(uint32_t ch, int mode);
+
+typedef enum {
+    CAN_SEND = 0,
+    CAN_RECV
+} CANfunc;
+
+typedef enum {
+    GL_OPE = 0,
+    GL_RESET,
+    GL_TEST
+} Globalmode;
+
+typedef enum {
+    CH_COMM = 0,
+    CH_RESET,
+    CH_HOLD
+} Channelmode;
+
+typedef struct {
+    IRQn_Type   int_num;    /* Interrupt number */
+    IRQHandler  handler;    /* Interrupt handler */
+} can_info_int_t;
+
+static can_irq_handler irq_handler;
+static uint32_t can_irq_id[CAN_NUM];
+static int can_initialized[CAN_NUM] = {0};
+
+static const PinMap PinMap_CAN_RD[] = {
+    {P7_8  , CAN_0, 4},
+    {P9_1  , CAN_0, 3},
+    {P1_4  , CAN_1, 3},
+    {P5_9  , CAN_1, 5},
+    {P7_11 , CAN_1, 4},
+    {P11_12, CAN_1, 1},
+    {P4_9  , CAN_2, 6},
+    {P6_4  , CAN_2, 3},
+    {P7_2  , CAN_2, 5},
+    {P2_12 , CAN_3, 5},
+    {P4_2  , CAN_3, 4},
+    {P1_5  , CAN_4, 3},
+    {P2_14 , CAN_4, 5},
+    {NC    , NC   , 0}
+};
+
+static const PinMap PinMap_CAN_TD[] = {
+    {P7_9  , CAN_0, 4},
+    {P9_0  , CAN_0, 3},
+    {P5_10 , CAN_1, 5},
+    {P7_10 , CAN_1, 4},
+    {P11_13, CAN_1, 1},
+    {P4_8  , CAN_2, 6},
+    {P6_5  , CAN_2, 3},
+    {P7_3  , CAN_2, 5},
+    {P2_13 , CAN_3, 5},
+    {P4_3  , CAN_3, 4},
+    {P4_11 , CAN_4, 6},
+    {P8_10 , CAN_4, 5},
+    {NC    , NC   , 0}
+};
+
+static __IO uint32_t *CTR_MATCH[] = {
+    &RSCAN0C0CTR,
+    &RSCAN0C1CTR,
+    &RSCAN0C2CTR,
+    &RSCAN0C3CTR,
+    &RSCAN0C4CTR,
+};
+
+static __IO uint32_t *CFG_MATCH[] = {
+    &RSCAN0C0CFG,
+    &RSCAN0C1CFG,
+    &RSCAN0C2CFG,
+    &RSCAN0C3CFG,
+    &RSCAN0C4CFG,
+};
+
+static __IO uint32_t *RFCC_MATCH[] = {
+    &RSCAN0RFCC0,
+    &RSCAN0RFCC1,
+    &RSCAN0RFCC2,
+    &RSCAN0RFCC3,
+    &RSCAN0RFCC4,
+    &RSCAN0RFCC5,
+    &RSCAN0RFCC6,
+    &RSCAN0RFCC7
+};
+
+static __IO uint32_t *TXQCC_MATCH[] = {
+    &RSCAN0TXQCC0,
+    &RSCAN0TXQCC1,
+    &RSCAN0TXQCC2,
+    &RSCAN0TXQCC3,
+    &RSCAN0TXQCC4,
+};
+
+static __IO uint32_t *THLCC_MATCH[] = {
+    &RSCAN0THLCC0,
+    &RSCAN0THLCC1,
+    &RSCAN0THLCC2,
+    &RSCAN0THLCC3,
+    &RSCAN0THLCC4,
+};
+
+static __IO uint32_t *STS_MATCH[] = {
+    &RSCAN0C0STS,
+    &RSCAN0C1STS,
+    &RSCAN0C2STS,
+    &RSCAN0C3STS,
+    &RSCAN0C4STS,
+};
+
+static __IO uint32_t *ERFL_MATCH[] = {
+    &RSCAN0C0ERFL,
+    &RSCAN0C1ERFL,
+    &RSCAN0C2ERFL,
+    &RSCAN0C3ERFL,
+    &RSCAN0C4ERFL,
+};
+
+static __IO uint32_t *CFCC_TBL[CAN_NUM][CAN_SND_RCV] = {
+    { &RSCAN0CFCC0 , &RSCAN0CFCC1  },
+    { &RSCAN0CFCC3 , &RSCAN0CFCC4  },
+    { &RSCAN0CFCC6 , &RSCAN0CFCC7  },
+    { &RSCAN0CFCC9 , &RSCAN0CFCC10 },
+    { &RSCAN0CFCC12, &RSCAN0CFCC13 }
+};
+
+static __IO uint32_t *CFSTS_TBL[CAN_NUM][CAN_SND_RCV] = {
+    { &RSCAN0CFSTS0 , &RSCAN0CFSTS1  },
+    { &RSCAN0CFSTS3 , &RSCAN0CFSTS4  },
+    { &RSCAN0CFSTS6 , &RSCAN0CFSTS7  },
+    { &RSCAN0CFSTS9 , &RSCAN0CFSTS10 },
+    { &RSCAN0CFSTS12, &RSCAN0CFSTS13 }
+};
+
+static __IO uint32_t *CFPCTR_TBL[CAN_NUM][CAN_SND_RCV] = {
+    { &RSCAN0CFPCTR0 , &RSCAN0CFPCTR1  },
+    { &RSCAN0CFPCTR3 , &RSCAN0CFPCTR4  },
+    { &RSCAN0CFPCTR6 , &RSCAN0CFPCTR7  },
+    { &RSCAN0CFPCTR9 , &RSCAN0CFPCTR10 },
+    { &RSCAN0CFPCTR12, &RSCAN0CFPCTR13 }
+};
+
+static __IO uint32_t *CFID_TBL[CAN_NUM][CAN_SND_RCV] = {
+    { &RSCAN0CFID0 , &RSCAN0CFID1  },
+    { &RSCAN0CFID3 , &RSCAN0CFID4  },
+    { &RSCAN0CFID6 , &RSCAN0CFID7  },
+    { &RSCAN0CFID9 , &RSCAN0CFID10 },
+    { &RSCAN0CFID12, &RSCAN0CFID13 }
+};
+
+static __IO uint32_t *CFPTR_TBL[CAN_NUM][CAN_SND_RCV] = {
+    { &RSCAN0CFPTR0 , &RSCAN0CFPTR1  },
+    { &RSCAN0CFPTR3 , &RSCAN0CFPTR4  },
+    { &RSCAN0CFPTR6 , &RSCAN0CFPTR7  },
+    { &RSCAN0CFPTR9 , &RSCAN0CFPTR10 },
+    { &RSCAN0CFPTR12, &RSCAN0CFPTR13 }
+};
+
+static __IO uint32_t *CFDF0_TBL[CAN_NUM][CAN_SND_RCV] = {
+    { &RSCAN0CFDF00 , &RSCAN0CFDF01  },
+    { &RSCAN0CFDF03 , &RSCAN0CFDF04  },
+    { &RSCAN0CFDF06 , &RSCAN0CFDF07  },
+    { &RSCAN0CFDF09 , &RSCAN0CFDF010 },
+    { &RSCAN0CFDF012, &RSCAN0CFDF013 }
+};
+
+static __IO uint32_t *CFDF1_TBL[CAN_NUM][CAN_SND_RCV] = {
+    { &RSCAN0CFDF10 , &RSCAN0CFDF11  },
+    { &RSCAN0CFDF13 , &RSCAN0CFDF14  },
+    { &RSCAN0CFDF16 , &RSCAN0CFDF17  },
+    { &RSCAN0CFDF19 , &RSCAN0CFDF110 },
+    { &RSCAN0CFDF112, &RSCAN0CFDF113 }
+};
+
+static const can_info_int_t can_int_info[CAN_NUM][IRQ_NUM] = 
+{
+    {   /* ch0 */
+        { INTRCAN0REC_IRQn, can0_rec_irq         }, /* RxIrq */
+        { INTRCAN0TRX_IRQn, can0_trx_irq         }, /* TxIrq */
+        { INTRCAN0ERR_IRQn, can0_err_warning_irq }, /* EwIrq */
+        { INTRCAN0ERR_IRQn, can0_overrun_irq     }, /* DoIrq */
+        { INTRCAN0ERR_IRQn, NULL                 }, /* WuIrq(not supported) */
+        { INTRCAN0ERR_IRQn, can0_passive_irq     }, /* EpIrq */
+        { INTRCAN0ERR_IRQn, can0_arb_lost_irq    }, /* AlIrq */
+        { INTRCAN0ERR_IRQn, can0_bus_err_irq     }  /* BeIrq */
+    },
+    {   /* ch1 */
+        { INTRCAN1REC_IRQn, can1_rec_irq         }, /* RxIrq */
+        { INTRCAN1TRX_IRQn, can1_trx_irq         }, /* TxIrq */
+        { INTRCAN1ERR_IRQn, can1_err_warning_irq }, /* EwIrq */
+        { INTRCAN1ERR_IRQn, can1_overrun_irq     }, /* DoIrq */
+        { INTRCAN1ERR_IRQn, NULL                 }, /* WuIrq(not supported) */
+        { INTRCAN1ERR_IRQn, can1_passive_irq     }, /* EpIrq */
+        { INTRCAN1ERR_IRQn, can1_arb_lost_irq    }, /* AlIrq */
+        { INTRCAN1ERR_IRQn, can1_bus_err_irq     }  /* BeIrq */
+    },
+    {   /* ch2 */
+        { INTRCAN2REC_IRQn, can2_rec_irq         }, /* RxIrq */
+        { INTRCAN2TRX_IRQn, can2_trx_irq         }, /* TxIrq */
+        { INTRCAN2ERR_IRQn, can2_err_warning_irq }, /* EwIrq */
+        { INTRCAN2ERR_IRQn, can2_overrun_irq     }, /* DoIrq */
+        { INTRCAN2ERR_IRQn, NULL                 }, /* WuIrq(not supported) */
+        { INTRCAN2ERR_IRQn, can2_passive_irq     }, /* EpIrq */
+        { INTRCAN2ERR_IRQn, can2_arb_lost_irq    }, /* AlIrq */
+        { INTRCAN2ERR_IRQn, can2_bus_err_irq     }  /* BeIrq */
+    },
+    {   /* ch3 */
+        { INTRCAN3REC_IRQn, can3_rec_irq         }, /* RxIrq */
+        { INTRCAN3TRX_IRQn, can3_trx_irq         }, /* TxIrq */
+        { INTRCAN3ERR_IRQn, can3_err_warning_irq }, /* EwIrq */
+        { INTRCAN3ERR_IRQn, can3_overrun_irq     }, /* DoIrq */
+        { INTRCAN3ERR_IRQn, NULL                 }, /* WuIrq(not supported) */
+        { INTRCAN3ERR_IRQn, can3_passive_irq     }, /* EpIrq */
+        { INTRCAN3ERR_IRQn, can3_arb_lost_irq    }, /* AlIrq */
+        { INTRCAN3ERR_IRQn, can3_bus_err_irq     }  /* BeIrq */
+    },
+    {   /* ch4 */
+        { INTRCAN4REC_IRQn, can4_rec_irq         }, /* RxIrq */
+        { INTRCAN4TRX_IRQn, can4_trx_irq         }, /* TxIrq */
+        { INTRCAN4ERR_IRQn, can4_err_warning_irq }, /* EwIrq */
+        { INTRCAN4ERR_IRQn, can4_overrun_irq     }, /* DoIrq */
+        { INTRCAN4ERR_IRQn, NULL                 }, /* WuIrq(not supported) */
+        { INTRCAN4ERR_IRQn, can4_passive_irq     }, /* EpIrq */
+        { INTRCAN4ERR_IRQn, can4_arb_lost_irq    }, /* AlIrq */
+        { INTRCAN4ERR_IRQn, can4_bus_err_irq     }  /* BeIrq */
+    }
+};
+
+static __IO uint32_t *dmy_gaflid = &RSCAN0GAFLID0;
+static __IO uint32_t *dmy_gaflm  = &RSCAN0GAFLM0;
+static __IO uint32_t *dmy_gaflp0 = &RSCAN0GAFLP00;
+static __IO uint32_t *dmy_gaflp1 = &RSCAN0GAFLP10;
+
+void can_irq_init(can_t *obj, can_irq_handler handler, uint32_t id) {
+    irq_handler = handler;
+    can_irq_id[obj->ch] = id;
+}
+
+void can_irq_free(can_t *obj) {
+    can_irq_id[obj->ch] = 0;
+}
+
+void can_irq_set(can_t *obj, CanIrqType type, uint32_t enable) {
+    __IO uint32_t *dmy_ctr;
+
+    /* Wake-up Irq is not supported */
+    if (type != IRQ_WAKEUP) {
+        if (enable) {
+            dmy_ctr = CTR_MATCH[obj->ch];
+            if (type == IRQ_ERROR) {
+                /* EWIE interrupts is enable */
+                *dmy_ctr |= 0x00000200;
+            } else if (type == IRQ_OVERRUN) {
+                /* OLIE interrupts is enable */
+                *dmy_ctr |= 0x00002000;
+            } else if (type == IRQ_PASSIVE) {
+                /* EPIE interrupts is enable */
+                *dmy_ctr |= 0x00000400;
+            } else if (type == IRQ_ARB) {
+                /* ALIE interrupts is enable */
+                *dmy_ctr |= 0x00008000;
+            } else if (type == IRQ_BUS) {
+                /* BEIE interrupts is enable */
+                *dmy_ctr |= 0x00000100;
+            }
+            InterruptHandlerRegister(can_int_info[obj->ch][type].int_num, can_int_info[obj->ch][type].handler);
+            GIC_SetPriority(can_int_info[obj->ch][type].int_num, 5);
+            GIC_EnableIRQ(can_int_info[obj->ch][type].int_num);
+        } else {
+            GIC_DisableIRQ(can_int_info[obj->ch][type].int_num);
+        }
+    }
+}
+
+static void can_rec_irq(uint32_t ch) {
+    __IO uint32_t *dmy_cfsts;
+
+    dmy_cfsts = CFSTS_TBL[ch][CAN_RECV];
+    *dmy_cfsts &= 0xFFFFFFF7;           // Clear CFRXIF
+
+    irq_handler(can_irq_id[ch], IRQ_RX);
+}
+
+static void can_trx_irq(uint32_t ch) {
+    __IO uint32_t *dmy_cfsts;
+
+    dmy_cfsts = CFSTS_TBL[ch][CAN_SEND];
+    *dmy_cfsts &= 0xFFFFFFEF;           // Clear CFTXIF
+
+    irq_handler(can_irq_id[ch], IRQ_TX);
+}
+
+static void can_err_irq(uint32_t ch, CanIrqType type) {
+    __IO uint32_t *dmy_erfl;
+    int val = 1;
+    
+    dmy_erfl = ERFL_MATCH[ch];
+    switch (type) {
+        case IRQ_ERROR:
+            *dmy_erfl &= 0xFFFFFFFD;    // Clear EWF
+            break;
+        case IRQ_OVERRUN:
+            *dmy_erfl &= 0xFFFFFFDF;    // Clear OVLF
+            break;
+        case IRQ_PASSIVE:
+            *dmy_erfl &= 0xFFFFFFFB;    // Clear EPF
+            break;
+        case IRQ_ARB:
+            *dmy_erfl &= 0xFFFFFF7F;    // Clear ALF
+            break;
+        case IRQ_BUS:
+            *dmy_erfl &= 0xFFFF00FF;    // Clear ADERR, B0ERR, B1ERR, CERR, AERR, FERR, SERR
+            *dmy_erfl &= 0xFFFFFFFE;    // Clear BEF
+            break;
+        case IRQ_WAKEUP:
+            /* not supported */
+            /* fall through */
+        default:
+            val = 0;
+            break;
+    }
+    if (val == 1) {
+        irq_handler(can_irq_id[ch], type);
+    }
+}
+
+static void can0_rec_irq(void) {
+    can_rec_irq(CAN_0);
+}
+
+static void can1_rec_irq(void) {
+    can_rec_irq(CAN_1);
+}
+
+static void can2_rec_irq(void) {
+    can_rec_irq(CAN_2);
+}
+
+static void can3_rec_irq(void) {
+    can_rec_irq(CAN_3);
+}
+
+static void can4_rec_irq(void) {
+    can_rec_irq(CAN_4);
+}
+
+static void can0_trx_irq(void) {
+    can_trx_irq(CAN_0);
+}
+
+static void can1_trx_irq(void) {
+    can_trx_irq(CAN_1);
+}
+
+static void can2_trx_irq(void) {
+    can_trx_irq(CAN_2);
+}
+
+static void can3_trx_irq(void) {
+    can_trx_irq(CAN_3);
+}
+
+static void can4_trx_irq(void) {
+    can_trx_irq(CAN_4);
+}
+
+static void can0_err_warning_irq(void) {
+    can_err_irq(CAN_0, IRQ_ERROR);
+}
+
+static void can1_err_warning_irq(void) {
+    can_err_irq(CAN_1, IRQ_ERROR);
+}
+
+static void can2_err_warning_irq(void) {
+    can_err_irq(CAN_2, IRQ_ERROR);
+}
+
+static void can3_err_warning_irq(void) {
+    can_err_irq(CAN_3, IRQ_ERROR);
+}
+
+static void can4_err_warning_irq(void) {
+    can_err_irq(CAN_4, IRQ_ERROR);
+}
+
+static void can0_overrun_irq(void) {
+    can_err_irq(CAN_0, IRQ_OVERRUN);
+}
+
+static void can1_overrun_irq(void) {
+    can_err_irq(CAN_1, IRQ_OVERRUN);
+}
+
+static void can2_overrun_irq(void) {
+    can_err_irq(CAN_2, IRQ_OVERRUN);
+}
+
+static void can3_overrun_irq(void) {
+    can_err_irq(CAN_3, IRQ_OVERRUN);
+}
+
+static void can4_overrun_irq(void) {
+    can_err_irq(CAN_4, IRQ_OVERRUN);
+}
+
+static void can0_passive_irq(void) {
+    can_err_irq(CAN_0, IRQ_PASSIVE);
+}
+
+static void can1_passive_irq(void) {
+    can_err_irq(CAN_1, IRQ_PASSIVE);
+}
+
+static void can2_passive_irq(void) {
+    can_err_irq(CAN_2, IRQ_PASSIVE);
+}
+
+static void can3_passive_irq(void) {
+    can_err_irq(CAN_3, IRQ_PASSIVE);
+}
+
+static void can4_passive_irq(void) {
+    can_err_irq(CAN_4, IRQ_PASSIVE);
+}
+
+static void can0_arb_lost_irq(void) {
+    can_err_irq(CAN_0, IRQ_ARB);
+}
+
+static void can1_arb_lost_irq(void) {
+    can_err_irq(CAN_1, IRQ_ARB);
+}
+
+static void can2_arb_lost_irq(void) {
+    can_err_irq(CAN_2, IRQ_ARB);
+}
+
+static void can3_arb_lost_irq(void) {
+    can_err_irq(CAN_3, IRQ_ARB);
+}
+
+static void can4_arb_lost_irq(void) {
+    can_err_irq(CAN_4, IRQ_ARB);
+}
+
+static void can0_bus_err_irq(void) {
+    can_err_irq(CAN_0, IRQ_BUS);
+}
+
+static void can1_bus_err_irq(void) {
+    can_err_irq(CAN_1, IRQ_BUS);
+}
+
+static void can2_bus_err_irq(void) {
+    can_err_irq(CAN_2, IRQ_BUS);
+}
+
+static void can3_bus_err_irq(void) {
+    can_err_irq(CAN_3, IRQ_BUS);
+}
+
+static void can4_bus_err_irq(void) {
+    can_err_irq(CAN_4, IRQ_BUS);
+}
+
+void can_init(can_t *obj, PinName rd, PinName td) {
+    __IO uint32_t *dmy_ctr;
+
+    /* determine the CAN to use */
+    uint32_t can_rx = pinmap_peripheral(rd, PinMap_CAN_RD);
+    uint32_t can_tx = pinmap_peripheral(td, PinMap_CAN_TD);
+    obj->ch = pinmap_merge(can_tx, can_rx);
+    MBED_ASSERT((int)obj->ch != NC);
+
+    /* enable CAN clock */
+    CPGSTBCR3 &= ~(CPG_STBCR3_BIT_MSTP32);
+    /* Has CAN RAM initialisation completed ? */
+    while ((RSCAN0GSTS & 0x08) == 0x08) {
+        __NOP();
+    }
+    /* clear Global Stop mode bit */
+    RSCAN0GCTR &= 0xFFFFFFFB;
+    /* clear Channel Stop mode bit */
+    dmy_ctr = CTR_MATCH[obj->ch];
+    *dmy_ctr &= 0xFFFFFFFB;
+    /* Enter global reset mode */
+    can_set_global_mode(GL_RESET);
+    /* Enter channel reset mode */
+    can_set_channel_mode(obj->ch, CH_RESET);
+    /* reset register */
+    can_reset_reg(obj);
+
+    can_initialized[obj->ch] = 1;
+    /* reconfigure channel which is already initialized */
+    can_reconfigure_channel();
+    
+    /* pin out the can pins */
+    pinmap_pinout(rd, PinMap_CAN_RD);
+    pinmap_pinout(td, PinMap_CAN_TD);
+}
+
+void can_free(can_t *obj) {
+    /* disable CAN clock */
+    CPGSTBCR3 |= CPG_STBCR3_BIT_MSTP32;
+}
+
+int can_frequency(can_t *obj, int f) {
+    int retval = 0;
+    
+    if (f <= 1000000) {
+        /* less than 1Mhz */
+        /* set Channel Reset mode */
+        can_set_channel_mode(obj->ch, CH_RESET);
+        can_set_frequency(obj, f);
+        /* set Channel Communication mode */
+        can_set_channel_mode(obj->ch, CH_COMM);
+        retval = 1;
+    }
+
+    return retval;
+}
+
+void can_reset(can_t *obj) {
+    /* Enter global reset mode */
+    can_set_global_mode(GL_RESET);
+    /* Enter channel reset mode */
+    can_set_channel_mode(obj->ch, CH_RESET);
+    /* reset register */
+    can_reset_reg(obj);
+    /* reconfigure channel which is already initialized */
+    can_reconfigure_channel();
+}
+
+int can_write(can_t *obj, CAN_Message msg, int cc) {
+    __IO uint32_t *dmy_sts;
+    __IO uint32_t *dmy_cfsts;
+    __IO uint32_t *dmy_cfid;
+    __IO uint32_t *dmy_cfptr;
+    __IO uint32_t *dmy_cfdf0;
+    __IO uint32_t *dmy_cfdf1;
+    __IO uint32_t *dmy_cfpctr;
+    int retval = 0;
+
+    /* Wait to become channel communication mode */
+    dmy_sts = STS_MATCH[obj->ch];
+    while ((*dmy_sts & 0x07) != 0) {
+        __NOP();
+    }
+    
+    if (((msg.format == CANStandard) && (msg.id <= 0x07FF)) || ((msg.format == CANExtended) && (msg.id <= 0x03FFFF))) {
+        /* send/receive FIFO buffer isn't full */
+        dmy_cfsts = CFSTS_TBL[obj->ch][CAN_SEND];
+        if ((*dmy_cfsts & 0x02) != 0x02) {
+            /* set format, frame type and send/receive FIFO buffer ID(b10-0 or b28-11) */
+            dmy_cfid = CFID_TBL[obj->ch][CAN_SEND];
+            *dmy_cfid = ((msg.format << 31) | (msg.type << 30));
+            if (msg.format == CANStandard) {
+                *dmy_cfid |= (msg.id & 0x07FF);
+            } else {
+                *dmy_cfid |= ((msg.id & 0x03FFFF) << 11);
+            }
+            /* set length */
+            dmy_cfptr = CFPTR_TBL[obj->ch][CAN_SEND];
+            *dmy_cfptr = msg.len << 28;
+            /* set data */
+            dmy_cfdf0 = CFDF0_TBL[obj->ch][CAN_SEND];
+            memcpy((void *)dmy_cfdf0, &msg.data[0], 4);
+            dmy_cfdf1 = CFDF1_TBL[obj->ch][CAN_SEND];
+            memcpy((void *)dmy_cfdf1, &msg.data[4], 4);
+            /* send request */
+            dmy_cfpctr = CFPCTR_TBL[obj->ch][CAN_SEND];
+            *dmy_cfpctr = 0xFF;
+            retval = 1;
+        }
+    }
+    
+    return retval;
+}
+
+int can_read(can_t *obj, CAN_Message *msg, int handle) {
+    __IO uint32_t *dmy_sts;
+    __IO uint32_t *dmy_cfsts;
+    __IO uint32_t *dmy_cfid;
+    __IO uint32_t *dmy_cfptr;
+    __IO uint32_t *dmy_cfdf0;
+    __IO uint32_t *dmy_cfdf1;
+    __IO uint32_t *dmy_cfpctr;
+    int retval = 0;
+
+    /* Wait to become channel communication mode */
+    dmy_sts = STS_MATCH[obj->ch];
+    while ((*dmy_sts & 0x07) != 0) {
+        __NOP();
+    }
+    
+    /* send/receive FIFO buffer isn't empty */
+    dmy_cfsts = CFSTS_TBL[obj->ch][CAN_RECV];
+    while ((*dmy_cfsts & 0x01) != 0x01) {
+        /* get format, frame type and send/receive FIFO buffer ID(b10-0 or b28-11) */
+        dmy_cfid = CFID_TBL[obj->ch][CAN_RECV];
+        msg->format = (CANFormat)(*dmy_cfid >> 31);
+        msg->type = (CANType)(*dmy_cfid >> 30);
+        if (msg->format == CANStandard) {
+            msg->id = (*dmy_cfid & 0x07FF);
+        } else {
+            msg->id = ((*dmy_cfid >> 11) & 0x03FFFF);
+        }
+        /* get length */
+        dmy_cfptr = CFPTR_TBL[obj->ch][CAN_RECV];
+        msg->len = (unsigned char)(*dmy_cfptr >> 28);
+        /* get data */
+        dmy_cfdf0 = CFDF0_TBL[obj->ch][CAN_RECV];
+        memcpy(&msg->data[0], (void *)dmy_cfdf0, 4);
+        dmy_cfdf1 = CFDF1_TBL[obj->ch][CAN_RECV];
+        memcpy(&msg->data[4], (void *)dmy_cfdf1, 4);
+        /* receive(next data) request */
+        dmy_cfpctr = CFPCTR_TBL[obj->ch][CAN_RECV];
+        *dmy_cfpctr = 0xFF;
+        retval = 1;
+    }
+    
+    return retval;
+}
+
+unsigned char can_rderror(can_t *obj) {
+    __IO uint32_t *dmy_sts;
+    
+    dmy_sts = STS_MATCH[obj->ch];
+    return (unsigned char)((*dmy_sts >> 16) & 0xFF);
+}
+
+unsigned char can_tderror(can_t *obj) {
+    __IO uint32_t *dmy_sts;
+    
+    dmy_sts = STS_MATCH[obj->ch];
+    return (unsigned char)((*dmy_sts >> 24) & 0xFF);
+}
+
+int can_mode(can_t *obj, CanMode mode) {
+    __IO uint32_t *dmy_ctr;
+    __IO uint32_t *dmy_sts;
+    __IO uint32_t *dmy_cfcc;
+    int ch_cnt;
+    can_t *tmp_obj;
+    tmp_obj = obj;
+    int retval = 1;
+    
+    switch (mode) {
+        case MODE_RESET:
+            can_set_global_mode(GL_RESET);
+            can_set_channel_mode(obj->ch, CH_RESET);
+            for (ch_cnt = 0; ch_cnt < CAN_NUM; ch_cnt++) {
+                can_initialized[ch_cnt] = 0;
+            }
+            break;
+        case MODE_NORMAL:
+            can_set_global_mode(GL_OPE);
+            can_set_channel_mode(obj->ch, CH_COMM);
+            break;
+        case MODE_SILENT:
+            can_set_channel_mode(obj->ch, CH_HOLD);
+            /* set listen only mode, enable communication test mode */
+            dmy_ctr = CTR_MATCH[obj->ch];
+            *dmy_ctr = ((*dmy_ctr & 0x00FFFFFF) | 0x03000000);
+            can_set_channel_mode(obj->ch, CH_COMM);
+            break;
+        case MODE_TEST_LOCAL:
+            can_set_channel_mode(obj->ch, CH_HOLD);
+            /* set self test mode 0, enable communication test mode */
+            dmy_ctr = CTR_MATCH[obj->ch];
+            *dmy_ctr = ((*dmy_ctr & 0x00FFFFFF) | 0x05000000);
+            can_set_channel_mode(obj->ch, CH_COMM);
+            break;
+        case MODE_TEST_GLOBAL:
+            /* set the channel between the communication test on channel 1 and channel 2 */
+            /* set Channel Hold mode */
+            for (tmp_obj->ch = CAN_1; tmp_obj->ch <= CAN_2; tmp_obj->ch++) {
+                dmy_sts = STS_MATCH[tmp_obj->ch];
+                if ((*dmy_sts & 0x04) == 0x04) {
+                    /* Channel Stop mode */
+                    /* clear Channel Stop mode bit */
+                    dmy_ctr = CTR_MATCH[tmp_obj->ch];
+                    *dmy_ctr &= 0xFFFFFFFB;
+                    can_set_channel_mode(tmp_obj->ch, CH_RESET);
+                }
+                can_set_channel_mode(tmp_obj->ch, CH_HOLD);
+            }
+            can_set_global_mode(GL_TEST);
+            /* enable communication test between channel1 and channel2 */
+            RSCAN0GTSTCFG = 0x06;
+            RSCAN0GTSTCTR = 0x01;
+            /* send and receive setting of channel1 and channel2 */
+            for (tmp_obj->ch = CAN_1; tmp_obj->ch <= CAN_2; tmp_obj->ch++) {
+                can_reset_buffer(tmp_obj);
+                /* set global interrrupt */
+                /* THLEIE, MEIE and DEIE interrupts are disable */
+                RSCAN0GCTR &= 0xFFFFF8FF;
+                /* BLIE, OLIE, BORIE and BOEIE interrupts are disable */
+                /* TAIE, ALIE, EPIE, EWIE and BEIE interrupts are enable */
+                dmy_ctr = CTR_MATCH[tmp_obj->ch];
+                *dmy_ctr &= 0x00018700;
+                can_set_global_mode(GL_OPE);
+                can_set_channel_mode(tmp_obj->ch, CH_COMM);
+                /* Use send/receive FIFO buffer */
+                dmy_cfcc = CFCC_TBL[tmp_obj->ch][CAN_SEND];
+                *dmy_cfcc |= 0x01;
+                dmy_cfcc = CFCC_TBL[tmp_obj->ch][CAN_RECV];
+                *dmy_cfcc |= 0x01;
+            }
+            break;
+        case MODE_TEST_SILENT:
+            /* not supported */
+            /* fall through */
+        default:
+            retval = 0;
+            break;
+    }
+    
+    return retval;
+}
+
+int can_filter(can_t *obj, uint32_t id, uint32_t mask, CANFormat format, int32_t handle) {
+    int retval = 0;
+    
+    if ((format == CANStandard) || (format == CANExtended)) {
+        if (((format == CANStandard) && (id <= 0x07FF)) || ((format == CANExtended) && (id <= 0x03FFFF))) {
+            /* set Global Reset mode and Channel Reset mode */
+            can_set_global_mode(GL_RESET);
+            can_set_channel_mode(obj->ch, CH_RESET);
+            /* enable receive rule table writing */
+            RSCAN0GAFLECTR = 0x00000100;
+            /* set the page number of receive rule table(page number = 0) */
+            RSCAN0GAFLECTR |= (obj->ch * 4);
+            /* set IDE format */
+            *dmy_gaflid = (format << 31);
+            if (format == CANExtended) {
+                /* set receive rule ID for bit28-11 */
+                *dmy_gaflid |= (id << 11);
+            } else {
+                /* set receive rule ID for bit10-0 */
+                *dmy_gaflid |= id;
+            }
+            /* set ID mask bit */
+            *dmy_gaflm = (0xC0000000 | mask);
+            /* disable receive rule table writing */
+            RSCAN0GAFLECTR &= 0xFFFFFEFF;
+            /* reconfigure channel which is already initialized */
+            can_reconfigure_channel();
+            retval = 1;
+        }
+    }
+    
+    return retval;
+}
+
+void can_monitor(can_t *obj, int silent) {
+    __IO uint32_t *dmy_ctr;
+
+    /* set Channel Hold mode */
+    can_set_channel_mode(obj->ch, CH_HOLD);
+    if (silent) {
+        /* set listen only mode, enable communication test mode */
+        dmy_ctr = CTR_MATCH[obj->ch];
+        *dmy_ctr = ((*dmy_ctr & 0x00FFFFFF) | 0x03000000);
+        can_set_channel_mode(obj->ch, CH_COMM);
+    } else {
+        /* set normal test mode, disable communication test mode */
+        dmy_ctr = CTR_MATCH[obj->ch];
+        *dmy_ctr &= 0x00FFFFFF;
+        /* reset register */
+        can_reset_reg(obj);
+        /* reconfigure channel which is already initialized */
+        can_reconfigure_channel();
+    }
+}
+
+static void can_reset_reg(can_t *obj) {
+    __IO uint32_t *dmy_ctr;
+
+    /* time stamp source uses peripheral clock (pclk(P1_phi)/2), CAN clock uses clkc(P1_phi/2),           */
+    /* mirror off, DLC not transfer, DLC check permit, transmit buffer priority, clock source not divided */
+    RSCAN0GCFG = 0x00000003;
+    /* set default frequency at 100k */
+    can_set_frequency(obj, 100000);
+    /* set receive rule */
+    can_reset_recv_rule(obj);
+    /* set buffer */
+    can_reset_buffer(obj);
+    /* set global interrrupt */
+    /* THLEIE, MEIE and DEIE interrupts are disable */
+    RSCAN0GCTR &= 0xFFFFF8FF;
+    /* ALIE, BLIE, OLIE, BORIE, BOEIE, EPIE, EWIE and BEIE interrupts are disable */
+    dmy_ctr = CTR_MATCH[obj->ch];
+    *dmy_ctr &= 0xFFFF00FF;
+}
+
+static void can_reset_recv_rule(can_t *obj) {
+    /* number of receive rules of each chanel = 64 */
+    RSCAN0GAFLCFG0 = 0x40404040;
+    RSCAN0GAFLCFG1 = 0x40000000;
+    /* enable receive rule table writing */
+    RSCAN0GAFLECTR = 0x00000100;
+    /* set the page number of receive rule table(ex: id ch = 1, page number = 4) */
+    RSCAN0GAFLECTR |= (obj->ch * 4);
+    /* set standard ID, data frame and receive rule ID */
+    *dmy_gaflid = 0x07FF;
+    /* IDE bit, RTR bit and ID bit(28-0) are not compared */
+    *dmy_gaflm = 0;
+    /* DLC check is 1 bytes, not use a receive buffer */
+    *dmy_gaflp0 = 0x10000000;
+    /* use a send/receive FIFO buffer(ex: if ch = 1, FIFO buffer number = 4 and bit = 12) */
+    *dmy_gaflp1 = (1 << ((obj->ch + 3) * 3));
+    /* disable receive rule table writing */
+    RSCAN0GAFLECTR &= 0xFFFFFEFF;
+}
+
+static void can_reset_buffer(can_t *obj) {
+    __IO uint32_t *dmy_rfcc;
+    __IO uint32_t *dmy_cfcc;
+    __IO uint32_t *dmy_txqcc;
+    __IO uint32_t *dmy_thlcc;
+    int cnt;
+    
+    /* set linked send buffer number(ex: if ch = 1 and mode = send, buffer number = 16), interval timer is pclk/2 */
+    /* number of rows of send/receive FIFO buffer = 4 */
+    dmy_cfcc = CFCC_TBL[obj->ch][CAN_SEND];
+    *dmy_cfcc = 0x00011100;                 /* send/receive FIFO mode is send */
+    dmy_cfcc = CFCC_TBL[obj->ch][CAN_RECV];
+    *dmy_cfcc = 0x00001100;                 /* send/receive FIFO mode is receive */
+    /* receive buffer is not used */
+    RSCAN0RMNB = 0;
+    /* receive FIFO buffer is not used */
+    for (cnt = 0; cnt < 8; cnt++) {
+        dmy_rfcc = RFCC_MATCH[cnt];
+        *dmy_rfcc = 0;
+    }
+    /* send queue is not used */
+    dmy_txqcc = TXQCC_MATCH[obj->ch];
+    *dmy_txqcc = 0;
+    /* send history is not used */
+    dmy_thlcc = THLCC_MATCH[obj->ch];
+    *dmy_thlcc = 0;
+
+    /* CFTXIE and CFRXIE interrupts are enable */
+    dmy_cfcc = CFCC_TBL[obj->ch][CAN_SEND];
+    *dmy_cfcc |= 0x04;
+    dmy_cfcc = CFCC_TBL[obj->ch][CAN_RECV];
+    *dmy_cfcc |= 0x02;
+    /* TMIEp interrupt is disable */
+    RSCAN0TMIEC0 = 0x00000000;
+    RSCAN0TMIEC1 = 0x00000000;
+    RSCAN0TMIEC2 = 0x00000000;
+}
+
+static void can_reconfigure_channel(void) {
+    __IO uint32_t *dmy_cfcc;
+    int ch_cnt;
+
+    for (ch_cnt = 0; ch_cnt < CAN_NUM; ch_cnt++) {
+        if (can_initialized[ch_cnt] == 1) {
+            /* set Global Operation mode and Channel Communication mode */
+            can_set_global_mode(GL_OPE);
+            can_set_channel_mode(ch_cnt, CH_COMM);
+            /* Use send/receive FIFO buffer */
+            dmy_cfcc = CFCC_TBL[ch_cnt][CAN_SEND];
+            *dmy_cfcc |= 0x01;
+            dmy_cfcc = CFCC_TBL[ch_cnt][CAN_RECV];
+            *dmy_cfcc |= 0x01;
+        }
+    }
+}
+
+static void can_set_frequency(can_t *obj, int f) {
+    __IO uint32_t *dmy_cfg;
+    int oldfreq = 0;
+    int newfreq = 0;
+    uint32_t  clkc_val;
+    uint8_t tmp_tq;
+    uint8_t tq = 0;
+    uint8_t tmp_brp;
+    uint8_t brp = 0;
+    uint8_t tseg1 = 0;
+    uint8_t tseg2 = 0;
+    
+    /* set clkc */
+    if (RZ_A1_IsClockMode0() == false) {
+        clkc_val = CM1_RENESAS_RZ_A1_P1_CLK / 2;
+    } else {
+        clkc_val = CM0_RENESAS_RZ_A1_P1_CLK / 2;
+    }
+    /* calculate BRP bit and Choose max value of calculated frequency */
+    for (tmp_tq = 8; tmp_tq <= 25; tmp_tq++) {
+        /* f = fCAN / ((BRP+1) * Tq) */
+        /* BRP = (fCAN / (f * Tq)) - 1 */
+        tmp_brp = ((clkc_val / (f * tmp_tq)) - 1) + 1;   // carry(decimal point is carry)
+        newfreq = clkc_val / ((tmp_brp + 1) * tmp_tq);
+        if (newfreq >= oldfreq) {
+            oldfreq  = newfreq;
+            tq       = tmp_tq;
+            brp      = tmp_brp;
+        }
+    }
+    /* calculate TSEG1 bit and TSEG2 bit */
+    tseg1 = (tq - 1) * 0.666666667;
+    tseg2 = (tq - 1) - tseg1;
+    /* set RSCAN0CmCFG register */
+    dmy_cfg = CFG_MATCH[obj->ch];
+    *dmy_cfg = ((tseg2 - 1) << 20) | ((tseg1 - 1) << 16) | brp;
+}
+
+static void can_set_global_mode(int mode) {
+    /* set Global mode */
+    RSCAN0GCTR = ((RSCAN0GCTR & 0xFFFFFFFC) | mode);
+    /* Wait to cahnge into Global XXXX mode */
+    while ((RSCAN0GSTS & 0x07) != mode) {
+        __NOP();
+    }
+}
+
+static void can_set_channel_mode(uint32_t ch, int mode) {
+    __IO uint32_t *dmy_ctr;
+    __IO uint32_t *dmy_sts;
+
+    /* set Channel mode */
+    dmy_ctr = CTR_MATCH[ch];
+    *dmy_ctr = ((*dmy_ctr & 0xFFFFFFFC) | mode);
+    /* Wait to cahnge into Channel XXXX mode */
+    dmy_sts = STS_MATCH[ch];
+    while ((*dmy_sts & 0x07) != mode) {
+        __NOP();
+    }
+}
+
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/device.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/device.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/device.h	(revision 270)
@@ -0,0 +1,68 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_DEVICE_H
+#define MBED_DEVICE_H
+
+/* ->Take measures about optimization problems of web compiler */
+   /* Web compiler has problem that inlining code may not be generated correctly */
+   /* when "-O3 -Otime" was specified. */
+#if defined(__CC_ARM) && (__ARMCC_VERSION <= 5040027)
+#pragma Ospace
+#endif
+/* <-Take measures about optimization problems of web compiler */
+
+#define DEVICE_PORTIN           1
+#define DEVICE_PORTOUT          1
+#define DEVICE_PORTINOUT        1
+
+#define DEVICE_INTERRUPTIN      1
+
+#define DEVICE_ANALOGIN         1
+#define DEVICE_ANALOGOUT        0
+
+#define DEVICE_SERIAL           1
+#define DEVICE_SERIAL_FC        1
+
+#define DEVICE_I2C              1
+#define DEVICE_I2CSLAVE         1
+
+#define DEVICE_SPI              1
+#define DEVICE_SPISLAVE         1
+
+#define DEVICE_CAN              1
+
+#define DEVICE_RTC              1
+
+#define DEVICE_ETHERNET         1
+
+#define DEVICE_PWMOUT           1
+
+#define DEVICE_SEMIHOST         0
+#define DEVICE_LOCALFILESYSTEM  0
+#define DEVICE_ID_LENGTH       32
+#define DEVICE_MAC_OFFSET      20
+
+#define DEVICE_SLEEP            0
+
+#define DEVICE_DEBUG_AWARENESS  1
+
+#define DEVICE_STDIO_MESSAGES   1
+
+#define DEVICE_ERROR_PATTERN    1
+
+#include "objects.h"
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/ethernet_api.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/ethernet_api.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/ethernet_api.c	(revision 270)
@@ -0,0 +1,694 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <string.h>
+#include "ethernet_api.h"
+#include "cmsis.h"
+#include "mbed_interface.h"
+#include "toolchain.h"
+#include "mbed_error.h"
+#include "ether_iodefine.h"
+#include "ethernetext_api.h"
+
+/* Descriptor info */
+#define SIZE_OF_BUFFER          (1600)     /* Must be an integral multiple of 32 */
+#define MAX_SEND_SIZE           (1514)
+/* Ethernet Descriptor Value Define */
+#define TD0_TFP_TOP_BOTTOM      (0x30000000)
+#define TD0_TACT                (0x80000000)
+#define TD0_TDLE                (0x40000000)
+#define RD0_RACT                (0x80000000)
+#define RD0_RDLE                (0x40000000)
+#define RD0_RFE                 (0x08000000)
+#define RD0_RCSE                (0x04000000)
+#define RD0_RFS                 (0x03FF0000)
+#define RD0_RCS                 (0x0000FFFF)
+#define RD0_RFS_RFOF            (0x02000000)
+#define RD0_RFS_RUAF            (0x00400000)
+#define RD0_RFS_RRF             (0x00100000)
+#define RD0_RFS_RTLF            (0x00080000)
+#define RD0_RFS_RTSF            (0x00040000)
+#define RD0_RFS_PRE             (0x00020000)
+#define RD0_RFS_CERF            (0x00010000)
+#define RD0_RFS_ERROR           (RD0_RFS_RFOF | RD0_RFS_RUAF | RD0_RFS_RRF | RD0_RFS_RTLF | \
+                                 RD0_RFS_RTSF | RD0_RFS_PRE | RD0_RFS_CERF)
+#define RD1_RDL_MSK             (0x0000FFFF)
+/* PHY Register */
+#define BASIC_MODE_CONTROL_REG  (0)
+#define BASIC_MODE_STATUS_REG   (1)
+#define PHY_IDENTIFIER1_REG     (2)
+#define PHY_IDENTIFIER2_REG     (3)
+#define PHY_SP_CTL_STS_REG      (31)
+/* MII management interface access */
+#define PHY_ADDR                (0)        /* Confirm the pin connection of the PHY-LSI */
+#define PHY_ST                  (1)
+#define PHY_WRITE               (1)
+#define PHY_READ                (2)
+#define MDC_WAIT                (6)        /* 400ns/4 */
+#define BASIC_STS_MSK_LINK      (0x0004)   /* Link Status */
+#define BASIC_STS_MSK_AUTO_CMP  (0x0010)   /* Auto-Negotiate Complete */
+#define M_PHY_ID                (0xFFFFFFF0)
+#define PHY_ID_LAN8710A         (0x0007C0F0)
+/* ETHERPIR0 */
+#define PIR0_MDI                (0x00000008)
+#define PIR0_MDO                (0x00000004)
+#define PIR0_MMD                (0x00000002)
+#define PIR0_MDC                (0x00000001)
+#define PIR0_MDC_HIGH           (0x00000001)
+#define PIR0_MDC_LOW            (0x00000000)
+/* ETHEREDRRR0 */
+#define EDRRR0_RR               (0x00000001)
+/* ETHEREDTRR0 */
+#define EDTRR0_TR               (0x00000003)
+/* software wait */
+#define LOOP_100us              (6700)     /* Loop counter for software wait  6666=100us/((1/400MHz)*6cyc) */
+
+#define EDMAC_EESIPR_INI_RECV   (0x0205001F)    /* 0x02000000 : Detect reception suspended */
+                                                /* 0x00040000 : Detect frame reception */
+                                                /* 0x00010000 : Receive FIFO overflow */
+                                                /* 0x00000010 : Residual bit frame reception */
+                                                /* 0x00000008 : Long frame reception */
+                                                /* 0x00000004 : Short frame reception */
+                                                /* 0x00000002 : PHY-LSI reception error */
+                                                /* 0x00000001 : Receive frame CRC error */
+#define EDMAC_EESIPR_INI_EtherC (0x00400000)    /* 0x00400000 : E-MAC status register */
+
+/* Send descriptor */
+typedef struct tag_edmac_send_desc {
+    uint32_t    td0;
+    uint32_t    td1;
+    uint8_t     *td2;
+    uint32_t    padding4;
+} edmac_send_desc_t;
+
+/* Receive descriptor */
+typedef struct tag_edmac_recv_desc {
+    uint32_t    rd0;
+    uint32_t    rd1;
+    uint8_t     *rd2;
+    uint32_t    padding4;
+} edmac_recv_desc_t;
+
+/* memory */
+/* The whole transmit/receive descriptors (must be allocated in 16-byte boundaries) */
+/* Transmit/receive buffers (must be allocated in 16-byte boundaries) */
+static uint8_t ehernet_nc_memory[(sizeof(edmac_send_desc_t) * NUM_OF_TX_DESCRIPTOR) +
+                                 (sizeof(edmac_recv_desc_t) * NUM_OF_RX_DESCRIPTOR) +
+                                 (NUM_OF_TX_DESCRIPTOR * SIZE_OF_BUFFER) +
+                                 (NUM_OF_RX_DESCRIPTOR * SIZE_OF_BUFFER)]
+                                 __attribute((section("NC_BSS"),aligned(16)));  //16 bytes aligned!
+static int32_t            rx_read_offset;   /* read offset */
+static int32_t            tx_wite_offset;   /* write offset */
+static uint32_t           send_top_index;
+static uint32_t           recv_top_index;
+static int32_t            Interrupt_priority;
+static edmac_send_desc_t  *p_eth_desc_dsend = NULL;
+static edmac_recv_desc_t  *p_eth_desc_drecv = NULL;
+static edmac_recv_desc_t  *p_recv_end_desc  = NULL;
+static ethernetext_cb_fnc *p_recv_cb_fnc    = NULL;
+static char               mac_addr[6]       = {0x00, 0x02, 0xF7, 0xF0, 0x00, 0x00}; /* MAC Address */
+static uint32_t           phy_id            = 0;
+static uint32_t           start_stop        = 1;  /* 0:stop  1:start */
+
+/* function */
+static void lan_reg_reset(void);
+static void lan_desc_create(void);
+static void lan_reg_set(int32_t link);
+static uint16_t phy_reg_read(uint16_t reg_addr);
+static void phy_reg_write(uint16_t reg_addr, uint16_t data);
+static void mii_preamble(void);
+static void mii_cmd(uint16_t reg_addr, uint32_t option);
+static void mii_reg_read(uint16_t *data);
+static void mii_reg_write(uint16_t data);
+static void mii_z(void);
+static void mii_write_1(void);
+static void mii_write_0(void);
+static void set_ether_pir(uint32_t set_data);
+static void wait_100us(int32_t wait_cnt);
+
+
+int ethernetext_init(ethernet_cfg_t *p_ethcfg) {
+    int32_t  i;
+    uint16_t val;
+
+    CPGSTBCR7 &= ~(CPG_STBCR7_BIT_MSTP74);  /* enable ETHER clock */
+
+    /* P4_2(PHY Reset) */
+    GPIOP4      &= ~0x0004;         /* Outputs low level */
+    GPIOPMC4    &= ~0x0004;         /* Port mode */
+    GPIOPM4     &= ~0x0004;         /* Output mode */
+
+    /* GPIO P1  P1_14(ET_COL) */
+    GPIOPMC1    |=  0x4000;
+    GPIOPFCAE1  &= ~0x4000;
+    GPIOPFCE1   |=  0x4000;
+    GPIOPFC1    |=  0x4000;
+
+    /* P3_0(ET_TXCLK), P3_3(ET_MDIO), P3_4(ET_RXCLK), P3_5(ET_RXER), P3_6(ET_RXDV) */
+    GPIOPMC3    |=  0x0079;
+    GPIOPFCAE3  &= ~0x0079;
+    GPIOPFCE3   &= ~0x0079;
+    GPIOPFC3    |=  0x0079;
+    GPIOPIPC3   |=  0x0079;
+
+    /* P5_9(ET_MDC) */
+    GPIOPMC5    |=  0x0200;
+    GPIOPFCAE5  &= ~0x0200;
+    GPIOPFCE5   &= ~0x0200;
+    GPIOPFC5    |=  0x0200;
+    GPIOPIPC5   |=  0x0200;
+
+    /* P10_1(ET_TXER), P10_2(ET_TXEN), P10_3(ET_CRS), P10_4(ET_TXD0), P10_5(ET_TXD1) */
+    /* P10_6(ET_TXD2), P10_7(ET_TXD3), P10_8(ET_RXD0), P10_9(ET_RXD1), P10_10(ET_RXD2), P10_11(ET_RXD3) */
+    GPIOPMC10   |=  0x0FFE;
+    GPIOPFCAE10 &= ~0x0FFE;
+    GPIOPFCE10  |=  0x0FFE;
+    GPIOPFC10   |=  0x0FFE;
+    GPIOPIPC10  |=  0x0FFE;
+
+    /* Resets the E-MAC,E-DMAC */
+    lan_reg_reset();
+
+    /* PHY Reset */
+    GPIOP4      &= ~0x0004;         /* P4_2 Outputs low level */
+    wait_100us(250);                /* 25msec */
+    GPIOP4      |=  0x0004;         /* P4_2 Outputs high level */
+    wait_100us(100);                /* 10msec */
+
+    /* Resets the PHY-LSI */
+    phy_reg_write(BASIC_MODE_CONTROL_REG, 0x8000);
+    for (i = 10000; i > 0; i--) {
+        val = phy_reg_read(BASIC_MODE_CONTROL_REG);
+        if (((uint32_t)val & 0x8000uL) == 0) {
+            break;                  /* Reset complete */
+        }
+    }
+
+    phy_id = ((uint32_t)phy_reg_read(PHY_IDENTIFIER1_REG) << 16)
+           |  (uint32_t)phy_reg_read(PHY_IDENTIFIER2_REG);
+
+    Interrupt_priority = p_ethcfg->int_priority;
+    p_recv_cb_fnc      = p_ethcfg->recv_cb;
+    start_stop         = 1;
+
+    if (p_ethcfg->ether_mac != NULL) {
+        (void)memcpy(mac_addr, p_ethcfg->ether_mac, sizeof(mac_addr));
+    } else {
+		ethernet_address(mac_addr); /* Get MAC Address */
+    }
+
+    return 0;
+}
+
+void ethernetext_start_stop(int32_t mode) {
+    if (mode == 1) {
+        /* start */
+        ETHEREDTRR0 |= EDTRR0_TR;
+        ETHEREDRRR0 |= EDRRR0_RR;
+        start_stop   = 1;
+    } else {
+        /* stop */
+        ETHEREDTRR0 &= ~EDTRR0_TR;
+        ETHEREDRRR0 &= ~EDRRR0_RR;
+        start_stop   = 0;
+    }
+}
+
+int ethernetext_chk_link_mode(void) {
+    int32_t  link;
+    uint16_t data;
+
+    if ((phy_id & M_PHY_ID) == PHY_ID_LAN8710A) {
+        data = phy_reg_read(PHY_SP_CTL_STS_REG);
+        switch (((uint32_t)data >> 2) & 0x00000007) {
+            case 0x0001:
+                link = HALF_10M;
+                break;
+            case 0x0005:
+                link = FULL_10M;
+                break;
+            case 0x0002:
+                link = HALF_TX;
+                break;
+            case 0x0006:
+                link = FULL_TX;
+                break;
+            default:
+                link = NEGO_FAIL;
+                break;
+        }
+    } else {
+        link = NEGO_FAIL;
+    }
+
+    return link;
+}
+
+void ethernetext_set_link_mode(int32_t link) {
+    lan_reg_reset();            /* Resets the E-MAC,E-DMAC */
+    lan_desc_create();          /* Initialize of buffer memory */
+    lan_reg_set(link);          /* E-DMAC, E-MAC initialization */
+}
+
+int ethernet_init() {
+    ethernet_cfg_t ethcfg;
+
+    ethcfg.int_priority = 5;
+    ethcfg.recv_cb      = NULL;
+    ethcfg.ether_mac    = NULL;
+    ethernetext_init(&ethcfg);
+    ethernet_set_link(-1, 0);   /* Auto-Negotiation */
+
+    return 0;
+}
+
+void ethernet_free() {
+    ETHERARSTR |= 0x00000001;            /* ETHER software reset */
+    CPGSTBCR7  |= CPG_STBCR7_BIT_MSTP74; /* disable ETHER clock */
+}
+
+int ethernet_write(const char *data, int slen) {
+    edmac_send_desc_t *p_send_desc;
+    int32_t           copy_size;
+
+    if ((p_eth_desc_dsend == NULL) || (data == NULL) || (slen < 0)
+     || (tx_wite_offset < 0) || (tx_wite_offset >= MAX_SEND_SIZE)) {
+        copy_size = 0;
+    } else {
+        p_send_desc = &p_eth_desc_dsend[send_top_index];   /* Current descriptor */
+        if ((p_send_desc->td0 & TD0_TACT) != 0) {
+            copy_size = 0;
+        } else {
+            copy_size = MAX_SEND_SIZE - tx_wite_offset;
+            if (copy_size > slen) {
+                copy_size = slen;
+            }
+            (void)memcpy(&p_send_desc->td2[tx_wite_offset], data, copy_size);
+            tx_wite_offset += copy_size;
+        }
+    }
+
+    return copy_size;
+}
+
+int ethernet_send() {
+    edmac_send_desc_t *p_send_desc;
+    int32_t           ret;
+
+    if ((p_eth_desc_dsend == NULL) || (tx_wite_offset <= 0)) {
+        ret = 0;
+    } else {
+        /* Transfer 1 frame */
+        p_send_desc = &p_eth_desc_dsend[send_top_index];   /* Current descriptor */
+
+        /* Sets the frame length */
+        p_send_desc->td1 = ((uint32_t)tx_wite_offset << 16);
+        tx_wite_offset   = 0;
+
+        /* Sets the transmit descriptor to transmit again */
+        p_send_desc->td0 &= (TD0_TACT | TD0_TDLE | TD0_TFP_TOP_BOTTOM);
+        p_send_desc->td0 |= TD0_TACT;
+        if ((start_stop == 1) && ((ETHEREDTRR0 & EDTRR0_TR) != EDTRR0_TR)) {
+            ETHEREDTRR0 |= EDTRR0_TR;
+        }
+
+        /* Update the current descriptor */
+        send_top_index++;
+        if (send_top_index >= NUM_OF_TX_DESCRIPTOR) {
+            send_top_index = 0;
+        }
+        ret = 1;
+    }
+
+    return ret;
+}
+
+int ethernet_receive() {
+    edmac_recv_desc_t *p_recv_desc;
+    int32_t           receive_size = 0;
+
+    if (p_eth_desc_drecv != NULL) {
+        if (p_recv_end_desc != NULL) {
+            /* Sets the receive descriptor to receive again */
+            p_recv_end_desc->rd0 &= (RD0_RACT | RD0_RDLE);
+            p_recv_end_desc->rd0 |= RD0_RACT;
+            if ((start_stop == 1) && ((ETHEREDRRR0 & EDRRR0_RR) == 0)) {
+                ETHEREDRRR0 |= EDRRR0_RR;
+            }
+            p_recv_end_desc = NULL;
+        }
+
+        p_recv_desc = &p_eth_desc_drecv[recv_top_index];   /* Current descriptor */
+        if ((p_recv_desc->rd0 & RD0_RACT) == 0) {
+            /* Receives 1 frame */
+            if (((p_recv_desc->rd0 & RD0_RFE) != 0) && ((p_recv_desc->rd0 & RD0_RFS_ERROR) != 0)) {
+                /* Receive frame error */
+                /* Sets the receive descriptor to receive again */
+                p_recv_desc->rd0 &= (RD0_RACT | RD0_RDLE);
+                p_recv_desc->rd0 |= RD0_RACT;
+                if ((start_stop == 1) && ((ETHEREDRRR0 & EDRRR0_RR) == 0)) {
+                    ETHEREDRRR0 |= EDRRR0_RR;
+                }
+            } else {
+                /* Copies the received frame */
+                rx_read_offset  = 0;
+                p_recv_end_desc = p_recv_desc;
+                receive_size    = (p_recv_desc->rd1 & RD1_RDL_MSK);    /* number of bytes received */
+            }
+
+            /* Update the current descriptor */
+            recv_top_index++;
+            if (recv_top_index >= NUM_OF_TX_DESCRIPTOR) {
+                recv_top_index = 0;
+            }
+        }
+    }
+
+    return receive_size;
+}
+
+int ethernet_read(char *data, int dlen) {
+    edmac_recv_desc_t *p_recv_desc = p_recv_end_desc;                   /* Read top descriptor */
+    int32_t           copy_size;
+
+    if ((data == NULL) || (dlen < 0) || (p_recv_desc == NULL)) {
+        copy_size = 0;
+    } else {
+        copy_size = (p_recv_desc->rd1 & RD1_RDL_MSK) - rx_read_offset;
+        if (copy_size > dlen) {
+            copy_size = dlen;
+        }
+        (void)memcpy(data, &p_recv_desc->rd2[rx_read_offset], (size_t)copy_size);
+        rx_read_offset += copy_size;
+    }
+
+    return copy_size;
+}
+
+void ethernet_address(char *mac) {
+    if (mac != NULL) {
+		mbed_mac_address(mac); /* Get MAC Address */
+    }
+}
+
+int ethernet_link(void) {
+    int32_t  ret;
+    uint16_t data;
+
+    data = phy_reg_read(BASIC_MODE_STATUS_REG);
+    if (((uint32_t)data & BASIC_STS_MSK_LINK) != 0) {
+        ret = 1;
+    } else {
+        ret = 0;
+    }
+
+    return ret;
+}
+
+void ethernet_set_link(int speed, int duplex) {
+    uint16_t data;
+    int32_t  i;
+    int32_t  link;
+
+    if ((speed < 0) || (speed > 1)) {
+        data = 0x1000;      /* Auto-Negotiation Enable */
+        phy_reg_write(BASIC_MODE_CONTROL_REG, data);
+        data = phy_reg_read(BASIC_MODE_STATUS_REG);
+        for (i = 0; i < 1000; i++) {
+            if (((uint32_t)data & BASIC_STS_MSK_AUTO_CMP) != 0) {
+                break;
+            }
+            wait_100us(10);
+        }
+    } else {
+        data = (uint16_t)(((uint32_t)speed << 13) | ((uint32_t)duplex << 8));
+        phy_reg_write(BASIC_MODE_CONTROL_REG, data);
+        wait_100us(1);
+    }
+
+    link = ethernetext_chk_link_mode();
+    ethernetext_set_link_mode(link);
+}
+
+void INT_Ether(void) {
+    uint32_t stat_edmac;
+    uint32_t stat_etherc;
+
+    /* Clear the interrupt request flag */
+    stat_edmac = (ETHEREESR0 & ETHEREESIPR0);       /* Targets are restricted to allowed interrupts */
+    ETHEREESR0 = stat_edmac;
+    /* Reception-related */
+    if (stat_edmac & EDMAC_EESIPR_INI_RECV) {
+        if (p_recv_cb_fnc != NULL) {
+            p_recv_cb_fnc();
+        }
+    }
+    /* E-MAC-related */
+    if (stat_edmac & EDMAC_EESIPR_INI_EtherC) {
+        /* Clear the interrupt request flag */
+        stat_etherc = (ETHERECSR0 & ETHERECSIPR0);  /* Targets are restricted to allowed interrupts */
+        ETHERECSR0  = stat_etherc;
+    }
+}
+
+static void lan_reg_reset(void) {
+    volatile int32_t j = 400;    /* Wait for B dia 256 cycles  ((I dia/B dia)*256)/6cyc = 8*256/6 = 342 */
+
+    ETHERARSTR      |= 0x00000001;      /* ETHER software reset */
+    while (j--) {
+        /* Do Nothing */
+    }
+
+    ETHEREDSR0      |= 0x00000003;      /* E-DMAC software reset */
+    ETHEREDMR0      |= 0x00000003;      /* Set SWRR and SWRT simultaneously */
+
+    /* Check clear software reset */
+    while ((ETHEREDMR0 & 0x00000003) != 0) {
+        /* Do Nothing */
+    }
+}
+
+static void lan_desc_create(void) {
+    int32_t i;
+    uint8_t *p_memory_top;
+
+    (void)memset((void *)ehernet_nc_memory, 0, sizeof(ehernet_nc_memory));
+    p_memory_top = ehernet_nc_memory;
+
+    /* Descriptor area configuration */
+    p_eth_desc_dsend  = (edmac_send_desc_t *)p_memory_top;
+    p_memory_top     += (sizeof(edmac_send_desc_t) * NUM_OF_TX_DESCRIPTOR);
+    p_eth_desc_drecv  = (edmac_recv_desc_t *)p_memory_top;
+    p_memory_top     += (sizeof(edmac_recv_desc_t) * NUM_OF_RX_DESCRIPTOR);
+
+    /* Transmit descriptor */
+    for (i = 0; i < NUM_OF_TX_DESCRIPTOR; i++) {
+        p_eth_desc_dsend[i].td2  = p_memory_top;                     /* TD2 TBA */
+        p_memory_top            += SIZE_OF_BUFFER;
+        p_eth_desc_dsend[i].td1  = 0;                                /* TD1 TDL */
+        p_eth_desc_dsend[i].td0  = TD0_TFP_TOP_BOTTOM;               /* TD0:1frame/1buf1buf, transmission disabled */
+    }
+    p_eth_desc_dsend[i - 1].td0 |= TD0_TDLE;                         /* Set the last descriptor */
+
+    /* Receive descriptor */
+    for (i = 0; i < NUM_OF_RX_DESCRIPTOR; i++) {
+        p_eth_desc_drecv[i].rd2  = p_memory_top;                     /* RD2 RBA */
+        p_memory_top            += SIZE_OF_BUFFER;
+        p_eth_desc_drecv[i].rd1  = ((uint32_t)SIZE_OF_BUFFER << 16); /* RD1 RBL */
+        p_eth_desc_drecv[i].rd0  = RD0_RACT;                         /* RD0:reception enabled */
+    }
+    p_eth_desc_drecv[i - 1].rd0 |= RD0_RDLE;                         /* Set the last descriptor */
+
+    /* Initialize descriptor management information */
+    send_top_index  = 0;
+    recv_top_index  = 0;
+    rx_read_offset  = 0;
+    tx_wite_offset  = 0;
+    p_recv_end_desc = NULL;
+}
+
+static void lan_reg_set(int32_t link) {
+    /* MAC address setting */
+    ETHERMAHR0      = ((uint32_t)mac_addr[0] << 24)
+                    | ((uint32_t)mac_addr[1] << 16)
+                    | ((uint32_t)mac_addr[2] << 8)
+                    |  (uint32_t)mac_addr[3];
+    ETHERMALR0      = ((uint32_t)mac_addr[4] << 8)
+                    |  (uint32_t)mac_addr[5];
+
+    /* E-DMAC */
+    ETHERTDLAR0     = (uint32_t)&p_eth_desc_dsend[0];
+    ETHERRDLAR0     = (uint32_t)&p_eth_desc_drecv[0];
+    ETHERTDFAR0     = (uint32_t)&p_eth_desc_dsend[0];
+    ETHERRDFAR0     = (uint32_t)&p_eth_desc_drecv[0];
+    ETHERTDFXR0     = (uint32_t)&p_eth_desc_dsend[NUM_OF_TX_DESCRIPTOR - 1];
+    ETHERRDFXR0     = (uint32_t)&p_eth_desc_drecv[NUM_OF_RX_DESCRIPTOR - 1];
+    ETHERTDFFR0    |=  0x00000001;      /* TDLF  Transmit Descriptor Queue Last Flag : Last descriptor (1) */
+    ETHERRDFFR0    |=  0x00000001;      /* RDLF  Receive Descriptor Queue Last Flag : Last descriptor (1) */
+    ETHEREDMR0     |=  0x00000040;      /* Little endian */
+    ETHERTRSCER0   &= ~0x0003009F;      /* All clear */
+    ETHERTFTR0     &= ~0x000007FF;      /* TFT[10:0]  Transmit FIFO Threshold : Store and forward modes (H'000) */
+    ETHERFDR0      |=  0x00000707;      /* Transmit FIFO Size:2048 bytes, Receive FIFO Size:2048 bytes */
+    ETHERRMCR0     |=  0x00000001;      /* RNC  Receive Enable Control : Continuous reception enabled (1) */
+    ETHERFCFTR0    &= ~0x001F00FF;
+    ETHERFCFTR0    |=  0x00070007;
+    ETHERRPADIR0   &= ~0x001FFFFF;      /* Padding Size:No padding insertion, Padding Slot:Inserts at first byte */
+
+    /* E-MAC */
+    ETHERECMR0     &= ~0x04BF2063;      /* All clear */
+    ETHERRFLR0     &= ~0x0003FFFF;      /* RFL[17:0]  Receive Frame Length : 1518 bytes (H'00000) */
+    ETHERAPR0      &= ~0x0000FFFF;      /* AP[15:0]   Automatic PAUSE : Flow control is disabled (H'0000) */
+    ETHERMPR0      &= ~0x0000FFFF;      /* MP[15:0]   Manual PAUSE : Flow control is disabled (H'0000) */
+    ETHERTPAUSER0  &= ~0x0000FFFF;      /* Upper Limit for Automatic PAUSE Frame : Retransmit count is unlimited */
+    ETHERCSMR      &= ~0xC000003F;      /* The result of checksum is not written back to the receive descriptor */
+    if ((link == FULL_TX) || (link == FULL_10M) || (link == NEGO_FAIL)) {
+        ETHERECMR0 |= 0x00000002;       /* Set to full-duplex mode */
+    } else {
+        ETHERECMR0 &= ~0x00000002;      /* Set to half-duplex mode */
+    }
+
+    /* Interrupt-related */
+    if (p_recv_cb_fnc != NULL) {
+        ETHEREESR0     |=  0xFF7F009F;                     /* Clear all status (by writing 1) */
+        ETHEREESIPR0   |=  0x00040000;                     /* FR  Frame Reception (1) */
+        ETHERECSR0     |=  0x00000011;                     /* Clear all status (clear by writing 1) */
+        ETHERECSIPR0   &= ~0x00000011;                     /* PFROIP Disable, ICDIP Disable */
+        /*InterruptHandlerRegister(ETHERI_IRQn, INT_Ether);  /* Ethernet interrupt handler registration */
+        GIC_SetPriority(ETHERI_IRQn, Interrupt_priority);  /* Ethernet interrupt priority */
+        GIC_EnableIRQ(ETHERI_IRQn);                        /* Enables the E-DMAC interrupt */
+    }
+
+    ETHERECMR0     |=  0x00000060;      /* RE Enable, TE Enable */
+
+    /* Enable transmission/reception */
+    if ((start_stop == 1) && ((ETHEREDRRR0 & 0x00000001) == 0)) {
+        ETHEREDRRR0 |= 0x00000001;       /* RR */
+    }
+}
+
+static uint16_t phy_reg_read(uint16_t reg_addr) {
+    uint16_t data;
+
+    mii_preamble();
+    mii_cmd(reg_addr, PHY_READ);
+    mii_z();
+    mii_reg_read(&data);
+    mii_z();
+
+    return data;
+}
+
+static void phy_reg_write(uint16_t reg_addr, uint16_t data) {
+    mii_preamble();
+    mii_cmd(reg_addr, PHY_WRITE);
+    mii_write_1();
+    mii_write_0();
+    mii_reg_write(data);
+    mii_z();
+}
+
+static void mii_preamble(void) {
+    int32_t i = 32;
+
+    for (i = 32; i > 0; i--) {
+        /* 1 is output via the MII (Media Independent Interface) block. */
+        mii_write_1();
+    }
+}
+
+static void mii_cmd(uint16_t reg_addr, uint32_t option) {
+    int32_t  i;
+    uint16_t data = 0;
+
+    data |= (PHY_ST << 14);             /* ST code      */
+    data |= (option << 12);             /* OP code      */
+    data |= (PHY_ADDR << 7);            /* PHY Address  */
+    data |= (uint16_t)(reg_addr << 2);  /* Reg Address  */
+    for (i = 14; i > 0; i--) {
+        if ((data & 0x8000) == 0) {
+            mii_write_0();
+        } else {
+            mii_write_1();
+        }
+        data <<= 1;
+    }
+}
+
+static void mii_reg_read(uint16_t *data) {
+    int32_t  i;
+    uint16_t reg_data = 0;
+
+    /* Data are read in one bit at a time */
+    for (i = 16; i > 0; i--) {
+        set_ether_pir(PIR0_MDC_LOW);
+        set_ether_pir(PIR0_MDC_HIGH);
+        reg_data <<= 1;
+        reg_data |= (uint16_t)((ETHERPIR0 & PIR0_MDI) >> 3);  /* MDI read */
+        set_ether_pir(PIR0_MDC_HIGH);
+        set_ether_pir(PIR0_MDC_LOW);
+    }
+    *data = reg_data;
+}
+
+static void mii_reg_write(uint16_t data) {
+    int32_t i;
+
+    /* Data are written one bit at a time */
+    for (i = 16; i > 0; i--) {
+        if ((data & 0x8000) == 0) {
+            mii_write_0();
+        } else {
+            mii_write_1();
+        }
+        data <<= 1;
+    }
+}
+
+static void mii_z(void) {
+    set_ether_pir(PIR0_MDC_LOW);
+    set_ether_pir(PIR0_MDC_HIGH);
+    set_ether_pir(PIR0_MDC_HIGH);
+    set_ether_pir(PIR0_MDC_LOW);
+}
+
+static void mii_write_1(void) {
+    set_ether_pir(PIR0_MDO | PIR0_MMD);
+    set_ether_pir(PIR0_MDO | PIR0_MMD | PIR0_MDC);
+    set_ether_pir(PIR0_MDO | PIR0_MMD | PIR0_MDC);
+    set_ether_pir(PIR0_MDO | PIR0_MMD);
+}
+
+static void mii_write_0(void) {
+    set_ether_pir(PIR0_MMD);
+    set_ether_pir(PIR0_MMD | PIR0_MDC);
+    set_ether_pir(PIR0_MMD | PIR0_MDC);
+    set_ether_pir(PIR0_MMD);
+}
+
+static void set_ether_pir(uint32_t set_data) {
+    int32_t i;
+
+    for (i = MDC_WAIT; i > 0; i--) {
+        ETHERPIR0 = set_data;
+    }
+}
+
+static void wait_100us(int32_t wait_cnt) {
+    volatile int32_t j = LOOP_100us * wait_cnt;
+
+    while (--j) {
+        /* Do Nothing */
+    }
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/ethernetext_api.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/ethernetext_api.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/ethernetext_api.h	(revision 270)
@@ -0,0 +1,20 @@
+
+/* PHY link mode */
+#define NEGO_FAIL               (0)
+#define HALF_10M                (1)
+#define FULL_10M                (2)
+#define HALF_TX                 (3)
+#define FULL_TX                 (4)
+
+typedef void (ethernetext_cb_fnc)(void);
+
+typedef struct tag_ethernet_cfg {
+    int                  int_priority;
+    ethernetext_cb_fnc   *recv_cb;
+    char                 *ether_mac;
+} ethernet_cfg_t;
+
+extern int ethernetext_init(ethernet_cfg_t *p_ethcfg);
+extern void ethernetext_start_stop(int32_t mode);
+extern int ethernetext_chk_link_mode(void);
+extern void ethernetext_set_link_mode(int32_t link);
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/gpio_addrdefine.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/gpio_addrdefine.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/gpio_addrdefine.h	(revision 270)
@@ -0,0 +1,22 @@
+#ifndef __GPIO_ADDRDEFINE__
+#define __GPIO_ADDRDEFINE__
+
+#define GPIO_BASE  ((long)0xFCFE3000uL) /* GPIO */
+
+#define PORT(n)    (volatile unsigned short *)(GPIO_BASE + 0x000 + ((n)*4))
+#define PSR(n)     (volatile unsigned  long *)(GPIO_BASE + 0x100 + ((n)*4))
+#define PPR(n)     (volatile unsigned short *)(GPIO_BASE + 0x200 + ((n)*4))
+#define PM(n)      (volatile unsigned short *)(GPIO_BASE + 0x300 + ((n)*4))
+#define PMC(n)     (volatile unsigned short *)(GPIO_BASE + 0x400 + ((n)*4))
+#define PFC(n)     (volatile unsigned short *)(GPIO_BASE + 0x500 + ((n)*4))
+#define PFCE(n)    (volatile unsigned short *)(GPIO_BASE + 0x600 + ((n)*4))
+#define PNOT(n)    (volatile unsigned short *)(GPIO_BASE + 0x700 + ((n)*4))
+#define PMSR(n)    (volatile unsigned  long *)(GPIO_BASE + 0x800 + ((n)*4))
+#define PMCSR(n)   (volatile unsigned  long *)(GPIO_BASE + 0x900 + ((n)*4))
+#define PFCAE(n)   (volatile unsigned short *)(GPIO_BASE + 0xa00 + ((n)*4))
+#define PIBC(n)    (volatile unsigned short *)(GPIO_BASE + 0x4000 +((n)*4))
+#define PBDC(n)    (volatile unsigned short *)(GPIO_BASE + 0x4100 +((n)*4))
+#define PIPC(n)    (volatile unsigned short *)(GPIO_BASE + 0x4200 +((n)*4))
+
+#endif/*__GPIO_ADDRDEFINE__*/
+
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/gpio_api.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/gpio_api.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/gpio_api.c	(revision 270)
@@ -0,0 +1,57 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "gpio_api.h"
+#include "pinmap.h"
+#include "gpio_addrdefine.h"
+
+
+uint32_t gpio_set(PinName pin) {
+    pin_function(pin, 0);
+    return (1 << PINNO(pin));
+}
+
+void gpio_init(gpio_t *obj, PinName pin) {
+    int group ;
+    obj->pin = pin;
+    if(pin == NC) return;
+    
+    obj->mask = gpio_set(pin);
+
+    group = PINGROUP(pin);
+    if (group > 11) return;
+
+    obj->reg_set = (volatile uint32_t *) PSR(group);
+    obj->reg_in  = (volatile uint32_t *) PPR(group);
+    obj->reg_dir = (volatile uint32_t *)PMSR(group);
+    obj->reg_buf = (volatile uint32_t *)PIBC(group);
+}
+
+void gpio_mode(gpio_t *obj, PinMode mode) {
+/* Pull up and Pull down settings aren't supported because RZ/A1H doesn't have pull up/down for pins(signals). */
+}
+
+void gpio_dir(gpio_t *obj, PinDirection direction) {
+    switch (direction) {
+        case PIN_INPUT :
+            *obj->reg_dir = (obj->mask << 16) | obj->mask;
+            *obj->reg_buf |=  obj->mask;
+            break;
+        case PIN_OUTPUT:
+            *obj->reg_dir = (obj->mask << 16) | 0;
+            *obj->reg_buf &= ~obj->mask;
+            break;
+    }
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/gpio_irq_api.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/gpio_irq_api.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/gpio_irq_api.c	(revision 270)
@@ -0,0 +1,226 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <stddef.h>
+
+#include "gpio_irq_api.h"
+#include "intc_iodefine.h"
+#include "pinmap.h"
+#include "cmsis.h"
+#include "gpio_addrdefine.h"
+
+#define CHANNEL_NUM     8
+
+static void gpio_irq0(void);
+static void gpio_irq1(void);
+static void gpio_irq2(void);
+static void gpio_irq3(void);
+static void gpio_irq4(void);
+static void gpio_irq5(void);
+static void gpio_irq6(void);
+static void gpio_irq7(void);
+
+static gpio_irq_t *channel_obj[CHANNEL_NUM] = {NULL};
+static gpio_irq_handler irq_handler;
+static const int nIRQn_h = 32;
+extern PinName gpio_multi_guard;
+
+enum {
+    IRQ0,IRQ1, 
+    IRQ2,IRQ3, 
+    IRQ4,IRQ5, 
+    IRQ6,IRQ7, 
+
+} IRQNo;
+
+static const IRQHandler irq_tbl[CHANNEL_NUM] = {
+    &gpio_irq0,
+    &gpio_irq1,
+    &gpio_irq2,
+    &gpio_irq3,
+    &gpio_irq4,
+    &gpio_irq5,
+    &gpio_irq6,
+    &gpio_irq7,
+};
+
+static const PinMap PinMap_IRQ[] = {
+    {P1_0,  IRQ0, 4}, {P1_1,  IRQ1, 4}, {P1_2,  IRQ2, 4},
+    {P1_3,  IRQ3, 4}, {P1_4,  IRQ4, 4}, {P1_5,  IRQ5, 4},
+    {P1_6,  IRQ6, 4}, {P1_7,  IRQ7, 4}, {P1_8,  IRQ2, 3},
+    {P1_9,  IRQ3, 3}, {P1_10, IRQ4, 3}, {P1_11, IRQ5, 3}, // 11
+    {P2_0,  IRQ5, 6}, {P2_12, IRQ6, 6}, {P2_13, IRQ7, 8},
+    {P2_14, IRQ0, 8}, {P2_15, IRQ1, 8}, // 16
+    {P3_0,  IRQ2, 3}, {P3_1,  IRQ6, 3}, {P3_3,  IRQ4, 3},
+    {P3_9,  IRQ6, 8}, // 20
+    {P4_8,  IRQ0, 8}, {P4_9,  IRQ1, 8}, {P4_10, IRQ2, 8},
+    {P4_11, IRQ3, 8}, {P4_12, IRQ4, 8}, {P4_13, IRQ5, 8},
+    {P4_14, IRQ6, 8}, {P4_15, IRQ7, 8}, // 28
+    {P5_6,  IRQ6, 6}, {P5_8,  IRQ0, 2}, {P5_9,  IRQ2, 4}, // 31
+    {P6_0,  IRQ5, 6}, {P6_1,  IRQ4, 4}, {P6_2,  IRQ7, 4},
+    {P6_3,  IRQ2, 4}, {P6_4,  IRQ3, 4}, {P6_8,  IRQ0, 8},
+    {P6_9,  IRQ1, 8}, {P6_10, IRQ2, 8}, {P6_11, IRQ3, 8},
+    {P6_12, IRQ4, 8}, {P6_13, IRQ5, 8}, {P6_14, IRQ6, 8},
+    {P6_15, IRQ7, 8}, // 44
+    {P7_8,  IRQ1, 8}, {P7_9,  IRQ0, 8}, {P7_10, IRQ2, 8},
+    {P7_11, IRQ3, 8}, {P7_12, IRQ4, 8}, {P7_13, IRQ5, 8},
+    {P7_14, IRQ6, 8}, // 51
+    {P8_2,  IRQ0, 5}, {P8_3,  IRQ1, 6}, {P8_7,  IRQ5, 4},
+    {P9_1,  IRQ0, 4}, // 55
+    {P11_12,IRQ3, 3}, {P11_15,IRQ1, 3}, // 57
+
+    {NC,    NC,     0}
+};
+
+static void handle_interrupt_in(int irq_num) {
+    uint16_t irqs;
+    uint16_t edge_req;
+    gpio_irq_t *obj;
+    gpio_irq_event irq_event;
+
+    irqs = INTCIRQRR;
+    if (irqs & (1 << irq_num)) {
+        obj = channel_obj[irq_num];
+        if (obj != NULL) {
+            edge_req = ((INTCICR1 >> (obj->ch * 2)) & 3);
+            if (edge_req == 1) {
+                irq_event = IRQ_FALL;
+            } else if (edge_req == 2) {
+                irq_event = IRQ_RISE;
+            } else {
+                uint32_t      mask    = (1 << (obj->pin & 0x0F));
+                __I  uint32_t *reg_in = (volatile uint32_t *) PPR((int)PINGROUP(obj->pin));
+
+                if ((*reg_in & mask) == 0) {
+                    irq_event = IRQ_FALL;
+                } else {
+                    irq_event = IRQ_RISE;
+                }
+	        }
+            irq_handler(obj->port, irq_event);
+        }
+        INTCIRQRR &= ~(1 << irq_num);
+    }
+}
+
+static void gpio_irq0(void) {
+    handle_interrupt_in(0);
+}
+
+static void gpio_irq1(void) {
+    handle_interrupt_in(1);
+}
+
+static void gpio_irq2(void) {
+    handle_interrupt_in(2);
+}
+
+static void gpio_irq3(void) {
+    handle_interrupt_in(3);
+}
+
+static void gpio_irq4(void) {
+    handle_interrupt_in(4);
+}
+
+static void gpio_irq5(void) {
+    handle_interrupt_in(5);
+}
+
+static void gpio_irq6(void) {
+    handle_interrupt_in(6);
+}
+
+static void gpio_irq7(void) {
+    handle_interrupt_in(7);
+}
+
+int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32_t id) {
+    int shift;
+    if (pin == NC) return -1;
+
+    obj->ch = pinmap_peripheral(pin, PinMap_IRQ);
+    obj->pin = (int)pin ;
+    obj->port = (int)id ;
+
+    shift = obj->ch*2;
+    channel_obj[obj->ch] = obj;
+    irq_handler = handler;
+    
+    pinmap_pinout(pin, PinMap_IRQ);
+    gpio_multi_guard = pin;           /* Set multi guard */
+
+    // INTC settings
+    InterruptHandlerRegister((IRQn_Type)(nIRQn_h+obj->ch), (void (*)(uint32_t))irq_tbl[obj->ch]);
+    INTCICR1 &= ~(0x3 << shift);
+    INTCICR1 |= (0x3 << shift);
+    GIC_SetPriority((IRQn_Type)(nIRQn_h+obj->ch), 5);
+    GIC_EnableIRQ((IRQn_Type)(nIRQn_h+obj->ch));
+    obj->int_enable = 1;
+    __enable_irq();
+
+    return 0;
+}
+
+void gpio_irq_free(gpio_irq_t *obj) {
+    channel_obj[obj->ch] = NULL;
+}
+
+void gpio_irq_set(gpio_irq_t *obj, gpio_irq_event event, uint32_t enable) {
+    int shift = obj->ch*2;
+    uint16_t val = event == IRQ_RISE ? 2 : 
+                   event == IRQ_FALL ? 1 : 0;
+    uint16_t work_icr_val;
+
+    /* check edge interrupt setting */
+    work_icr_val = INTCICR1;
+    if (enable == 1) {
+        /* Set interrupt serect */
+        work_icr_val |=  (val << shift);
+    } else {
+        /* Clear interrupt serect */
+        work_icr_val &= ~(val << shift);
+    }
+
+    if ((work_icr_val & (3 << shift)) == 0) {
+        /* No edge interrupt setting */
+        GIC_DisableIRQ((IRQn_Type)(nIRQn_h+obj->ch));
+        /* Clear Interrupt flags */
+        INTCIRQRR &= ~(1 << obj->ch);
+        INTCICR1  = work_icr_val;
+    } else if (obj->int_enable == 1) {
+        INTCICR1  = work_icr_val;
+        GIC_EnableIRQ((IRQn_Type)(nIRQn_h + obj->ch));
+    } else {
+        INTCICR1  = work_icr_val;
+    }
+}
+
+void gpio_irq_enable(gpio_irq_t *obj) {
+    int shift = obj->ch*2;
+    uint16_t work_icr_val = INTCICR1;
+
+    /* check edge interrupt setting */
+    if ((work_icr_val & (3 << shift)) != 0) {
+        GIC_EnableIRQ((IRQn_Type)(nIRQn_h + obj->ch));
+    }
+    obj->int_enable = 1;
+}
+
+void gpio_irq_disable(gpio_irq_t *obj) {
+    GIC_DisableIRQ((IRQn_Type)(nIRQn_h + obj->ch));
+    obj->int_enable = 0;
+}
+
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/gpio_object.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/gpio_object.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/gpio_object.h	(revision 270)
@@ -0,0 +1,51 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_GPIO_OBJECT_H
+#define MBED_GPIO_OBJECT_H
+
+#include "mbed_assert.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+    PinName  pin;
+    uint32_t mask;
+
+    __IO uint32_t *reg_dir;
+    __IO uint32_t *reg_set;
+    __I  uint32_t *reg_in;
+    __IO uint32_t *reg_buf;
+} gpio_t;
+
+static inline void gpio_write(gpio_t *obj, int value) {
+    *obj->reg_set = (obj->mask << 16) | ((value != 0) ? obj->mask : 0);
+}
+
+static inline int gpio_read(gpio_t *obj) {
+    return ((*obj->reg_in & obj->mask) ? 1 : 0);
+}
+
+static inline int gpio_is_connected(const gpio_t *obj) {
+    return obj->pin != (PinName)NC;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/i2c_api.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/i2c_api.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/i2c_api.c	(revision 270)
@@ -0,0 +1,751 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "mbed_assert.h"
+#include "i2c_api.h"
+#include "cmsis.h"
+#include "pinmap.h"
+#include "r_typedefs.h"
+
+#include "riic_iodefine.h"
+#include "RZ_A1_Init.h"
+#include "MBRZA1H.h"
+
+volatile struct st_riic *RIIC[] = RIIC_ADDRESS_LIST;
+
+#define REG(N) \
+    RIIC[obj->i2c]->RIICn##N
+
+/* RIICnCR1 */
+#define CR1_RST   (1 << 6)
+#define CR1_ICE   (1 << 7)
+
+/* RIICnCR2 */
+#define CR2_ST    (1 << 1)
+#define CR2_RS    (1 << 2)
+#define CR2_SP    (1 << 3)
+#define CR2_TRS   (1 << 5)
+#define CR2_BBSY  (1 << 7)
+
+/* RIICnMR3 */
+#define MR3_ACKBT (1 << 3)
+#define MR3_ACKWP (1 << 4)
+#define MR3_WAIT  (1 << 6)
+
+/* RIICnSER */
+#define SER_SAR0E (1 << 0)
+
+/* RIICnSR1 */
+#define SR1_AAS0  (1 << 0)
+
+/* RIICnSR2 */
+#define SR2_START (1 << 2)
+#define SR2_STOP  (1 << 3)
+#define SR2_NACKF (1 << 4)
+#define SR2_RDRF  (1 << 5)
+#define SR2_TEND  (1 << 6)
+#define SR2_TDRE  (1 << 7)
+
+#define WAIT_TIMEOUT    (3600000)  /* Loop counter : Time-out is about 1s. By 3600000 loops, measured value is 969ms. */
+
+static const PinMap PinMap_I2C_SDA[] = {
+    {P1_1 , I2C_0, 1},
+    {P1_3 , I2C_1, 1},
+    {P1_7 , I2C_3, 1},
+    {NC   , NC   , 0}
+};
+
+static const PinMap PinMap_I2C_SCL[] = {
+    {P1_0 , I2C_0, 1},
+    {P1_2 , I2C_1, 1},
+    {P1_6 , I2C_3, 1},
+    {NC   , NC,    0}
+};
+
+
+static inline int i2c_status(i2c_t *obj) {
+    return REG(SR2.UINT8[0]);
+}
+
+static void i2c_reg_reset(i2c_t *obj) {
+    /* full reset */
+    REG(CR1.UINT8[0]) &= ~CR1_ICE; // CR1.ICE off
+    REG(CR1.UINT8[0]) |=  CR1_RST; // CR1.IICRST on
+    REG(CR1.UINT8[0]) |=  CR1_ICE; // CR1.ICE on
+
+    REG(MR1.UINT8[0])  =  0x08;    // P_phi /x  9bit (including Ack)
+    REG(SER.UINT8[0])  =  0x00;    // no slave addr enabled
+
+    /* set frequency */
+    REG(MR1.UINT8[0]) |=  obj->pclk_bit;
+    REG(BRL.UINT8[0])  =  obj->width_low;
+    REG(BRH.UINT8[0])  =  obj->width_hi;
+
+    REG(MR2.UINT8[0])  =  0x07;
+    REG(MR3.UINT8[0])  =  0x00;
+
+    REG(FER.UINT8[0])  =  0x72;    // SCLE, NFE enabled, TMOT
+    REG(IER.UINT8[0])  =  0x00;    // no interrupt
+
+    REG(CR1.UINT32) &= ~CR1_RST;   // CR1.IICRST negate reset
+}
+
+static inline int i2c_wait_RDRF(i2c_t *obj) {
+    int timeout = 0;
+    
+    /* There is no timeout, but the upper limit value is set to avoid an infinite loop. */
+    while ((i2c_status(obj) & SR2_RDRF) == 0) {
+        timeout ++;
+        if (timeout >= WAIT_TIMEOUT) {
+            return -1;
+        }
+    }
+
+    return 0;
+}
+
+static int i2c_wait_TDRE(i2c_t *obj) {
+    int timeout = 0;
+
+    /* There is no timeout, but the upper limit value is set to avoid an infinite loop. */
+    while ((i2c_status(obj) & SR2_TDRE) == 0) {
+        timeout ++;
+        if (timeout >= WAIT_TIMEOUT) {
+            return -1;
+        }
+    }
+
+    return 0;
+}
+
+static int i2c_wait_TEND(i2c_t *obj) {
+    int timeout = 0;
+    
+    /* There is no timeout, but the upper limit value is set to avoid an infinite loop. */
+    while ((i2c_status(obj) & SR2_TEND) == 0) {
+        timeout ++;
+        if (timeout >= WAIT_TIMEOUT) {
+            return -1;
+        }
+    }
+
+    return 0;
+}
+
+
+static int i2c_wait_START(i2c_t *obj) {
+    int timeout = 0;
+    
+    /* There is no timeout, but the upper limit value is set to avoid an infinite loop. */
+    while ((i2c_status(obj) & SR2_START) == 0) {
+        timeout ++;
+        if (timeout >= WAIT_TIMEOUT) {
+            return -1;
+        }
+    }
+
+    return 0;
+}
+
+static int i2c_wait_STOP(i2c_t *obj) {
+    int timeout = 0;
+    
+    /* There is no timeout, but the upper limit value is set to avoid an infinite loop. */
+    while ((i2c_status(obj) & SR2_STOP) == 0) {
+        timeout ++;
+        if (timeout >= WAIT_TIMEOUT) {
+            return -1;
+        }
+    }
+
+    return 0;
+}
+
+static int i2c_set_STOP(i2c_t *obj) {
+    /* SR2.STOP = 0 */
+    REG(SR2.UINT32) &= ~SR2_STOP;
+    /* Stop condition */
+    REG(CR2.UINT32) |= CR2_SP;
+
+    return 0;
+}
+
+static void i2c_set_SR2_NACKF_STOP(i2c_t *obj) {
+    /* SR2.NACKF = 0 */
+    REG(SR2.UINT32) &= ~SR2_NACKF;
+    /* SR2.STOP = 0 */
+    REG(SR2.UINT32) &= ~SR2_STOP;
+}
+
+static void i2c_set_MR3_NACK(i2c_t *obj) {
+    /* send a NOT ACK */
+    REG(MR3.UINT32) |=  MR3_ACKWP;
+    REG(MR3.UINT32) |=  MR3_ACKBT;
+    REG(MR3.UINT32) &= ~MR3_ACKWP;
+}
+
+static void i2c_set_MR3_ACK(i2c_t *obj) {
+    /* send a ACK */
+    REG(MR3.UINT32) |=  MR3_ACKWP;
+    REG(MR3.UINT32) &= ~MR3_ACKBT;
+    REG(MR3.UINT32) &= ~MR3_ACKWP;
+}
+
+static inline void i2c_power_enable(i2c_t *obj) {
+    volatile uint8_t dummy;
+    switch ((int)obj->i2c) {
+        case I2C_0:
+            CPGSTBCR9 &= ~(0x80);
+            break;
+        case I2C_1:
+            CPGSTBCR9 &= ~(0x40);
+            break;
+        case I2C_2:
+            CPGSTBCR9 &= ~(0x20);
+            break;
+        case I2C_3:
+            CPGSTBCR9 &= ~(0x10);
+            break;
+    }
+    dummy = CPGSTBCR9;
+}
+
+void i2c_init(i2c_t *obj, PinName sda, PinName scl) {
+    /* determine the I2C to use */
+    I2CName i2c_sda = (I2CName)pinmap_peripheral(sda, PinMap_I2C_SDA);
+    I2CName i2c_scl = (I2CName)pinmap_peripheral(scl, PinMap_I2C_SCL);
+    obj->i2c = pinmap_merge(i2c_sda, i2c_scl);
+    MBED_ASSERT((int)obj->i2c != NC);
+
+    /* enable power */
+    i2c_power_enable(obj);
+
+    /* set default frequency at 100k */
+    i2c_frequency(obj, 100000);
+
+    pinmap_pinout(sda, PinMap_I2C_SDA);
+    pinmap_pinout(scl, PinMap_I2C_SCL);
+    
+    obj->last_stop_flag = 1;
+}
+
+inline int i2c_start(i2c_t *obj) {
+    int timeout = 0;
+
+    while ((REG(CR2.UINT32) & CR2_BBSY) != 0) {
+        timeout ++;
+        if (timeout >= obj->bbsy_wait_cnt) {
+            break;
+        }
+    }
+    /* Start Condition */
+    REG(CR2.UINT8[0]) |= CR2_ST;
+
+    return 0;
+}
+
+static inline int i2c_restart(i2c_t *obj) {
+    /* SR2.START = 0 */
+    REG(SR2.UINT32) &= ~SR2_START;
+    /* ReStart condition */
+    REG(CR2.UINT32) |= CR2_RS;
+
+    return 0;
+}
+
+inline int i2c_stop(i2c_t *obj) {
+    (void)i2c_set_STOP(obj);
+    (void)i2c_wait_STOP(obj);
+    i2c_set_SR2_NACKF_STOP(obj);
+    
+    return 0;
+}
+
+static void i2c_set_err_noslave(i2c_t *obj) {
+    (void)i2c_set_STOP(obj);
+    (void)i2c_wait_STOP(obj);
+    i2c_set_SR2_NACKF_STOP(obj);
+    obj->last_stop_flag = 1;
+}
+
+static inline int i2c_do_write(i2c_t *obj, int value) {
+    int timeout = 0;
+
+    /* There is no timeout, but the upper limit value is set to avoid an infinite loop. */
+    while ((i2c_status(obj) & SR2_TDRE) == 0) {
+        timeout ++;
+        if (timeout >= WAIT_TIMEOUT) {
+            return -1;
+        }
+    }
+    /* write the data */
+    REG(DRT.UINT32) = value;
+
+    return 0;
+}
+
+static inline int i2c_read_address_write(i2c_t *obj, int value) {
+    int status;
+    
+    status = i2c_wait_TDRE(obj);
+    if (status == 0) {
+        /* write the data */
+        REG(DRT.UINT32) = value;
+    }
+    
+    return status;
+
+}
+
+static inline int i2c_do_read(i2c_t *obj, int last) {
+    if (last == 2) {
+        /* this time is befor last byte read */
+        /* Set MR3 WAIT bit is 1 */;
+        REG(MR3.UINT32) |= MR3_WAIT;
+    } else if (last == 1) {
+        i2c_set_MR3_NACK(obj);
+    } else {
+        i2c_set_MR3_ACK(obj);
+    }
+
+    /* return the data */
+    return (REG(DRR.UINT32) & 0xFF);
+}
+
+void i2c_frequency(i2c_t *obj, int hz) {
+    float64_t pclk_val;
+    float64_t wait_utime;
+    volatile float64_t bps;
+    volatile float64_t L_time;         /* H Width period */
+    volatile float64_t H_time;         /* L Width period */
+    uint32_t tmp_L_width;
+    uint32_t tmp_H_width;
+    uint32_t remainder;
+    uint32_t wk_cks = 0;
+
+    /* set PCLK */
+    if (false == RZ_A1_IsClockMode0()) {
+        pclk_val = (float64_t)CM1_RENESAS_RZ_A1_P0_CLK;
+    } else {
+        pclk_val = (float64_t)CM0_RENESAS_RZ_A1_P0_CLK;
+    }
+
+    /* Min 10kHz, Max 400kHz */
+    if (hz < 10000) {
+        bps = 10000;
+    } else if (hz > 400000) {
+        bps = 400000;
+    } else {
+        bps = (float64_t)hz;
+    }
+
+    /* Calculation L width time */
+    L_time = (1 / (2 * bps));   /* Harf period of frequency */
+    H_time = L_time;
+
+    /* Check I2C mode of Speed */
+    if (bps > 100000) {
+        /* Fast-mode */
+        L_time -= 102E-9;    /* Falling time of SCL clock. */
+        H_time -= 138E-9;    /* Rising time of SCL clock. */
+        /* Check L wideth */
+        if (L_time < 1.3E-6) {
+            /* Wnen L width less than 1.3us */
+            /* Subtract Rise up and down time for SCL from H/L width */
+            L_time = 1.3E-6;
+            H_time = (1 / bps) - L_time - 138E-9 - 102E-9;
+        }
+    }
+
+    tmp_L_width   = (uint32_t)(L_time * pclk_val * 10);
+    tmp_L_width >>= 1;
+    wk_cks++;
+    while (tmp_L_width >= 341) {
+        tmp_L_width >>= 1;
+        wk_cks++;
+    }
+    remainder   = tmp_L_width % 10;
+    tmp_L_width = ((tmp_L_width + 9) / 10) - 3;       /* carry */
+
+    tmp_H_width   = (uint32_t)(H_time * pclk_val * 10);
+    tmp_H_width >>= wk_cks;
+    if (remainder == 0) {
+        tmp_H_width   = ((tmp_H_width + 9) / 10) - 3; /* carry */
+    } else {
+        remainder    += tmp_H_width % 10;
+        tmp_H_width   = (tmp_H_width / 10) - 3;
+        if (remainder > 10) {
+            tmp_H_width += 1;                         /* fine adjustment */
+        }
+    }
+    /* timeout of BBSY bit is minimum low width by frequency */
+    /* so timeout calculates "(low width) * 2" by frequency */
+    wait_utime = (L_time * 2) * 1000000;
+    /* 1 wait of BBSY bit is about 0.3us. if it's below 0.3us, wait count is set as 1. */
+    if (wait_utime <= 0.3) {
+        obj->bbsy_wait_cnt = 1;
+    } else {
+        obj->bbsy_wait_cnt = (int)(wait_utime / 0.3);
+    }
+
+
+    /* I2C Rate */
+    obj->pclk_bit  = (uint8_t)(0x10 * wk_cks);        /* P_phi / xx */
+    obj->width_low = (uint8_t)(tmp_L_width | 0x000000E0);
+    obj->width_hi  = (uint8_t)(tmp_H_width | 0x000000E0);
+
+    /* full reset */
+    i2c_reg_reset(obj);
+}
+
+int i2c_read(i2c_t *obj, int address, char *data, int length, int stop) {
+    int count = 0;
+    int status;
+    int value;
+    volatile uint32_t work_reg = 0;
+
+    if(length <= 0) {
+        return 0;
+    }
+    i2c_set_MR3_ACK(obj);
+    /* There is a STOP condition for last processing */
+    if (obj->last_stop_flag != 0) {
+        status = i2c_start(obj);
+        if (status != 0) {
+            i2c_set_err_noslave(obj);
+            return I2C_ERROR_BUS_BUSY;
+        }
+    }
+    obj->last_stop_flag = stop;
+    /*  Send Slave address */
+    status = i2c_read_address_write(obj, (address | 0x01));
+    if (status != 0) {
+        i2c_set_err_noslave(obj);
+        return I2C_ERROR_NO_SLAVE;
+    }
+    /* wait RDRF */
+    status = i2c_wait_RDRF(obj);
+    /* check ACK/NACK */
+    if ((status != 0) || ((REG(SR2.UINT32) & SR2_NACKF) != 0)) {
+        /* Slave sends NACK */
+        (void)i2c_set_STOP(obj);
+        /* dummy read */
+        value = REG(DRR.UINT32);
+        (void)i2c_wait_STOP(obj);
+        i2c_set_SR2_NACKF_STOP(obj);
+        obj->last_stop_flag = 1;
+        return I2C_ERROR_NO_SLAVE;
+    }
+    /* Read in all except last byte */
+    if (length > 2) {
+        /* dummy read */
+        value = REG(DRR.UINT32);
+        for (count = 0; count < (length - 1); count++) {
+            /* wait for it to arrive */
+            status = i2c_wait_RDRF(obj);
+            if (status != 0) {
+                i2c_set_err_noslave(obj);
+                return I2C_ERROR_NO_SLAVE;
+            }
+            /* Recieve the data */
+            if (count == (length - 2)) {
+                value = i2c_do_read(obj, 1);
+            } else if ((length >= 3) && (count == (length - 3))) {
+                value = i2c_do_read(obj, 2);
+            } else {
+                value = i2c_do_read(obj, 0);
+            }
+            data[count] = (char)value;
+        }
+    } else if (length == 2) {
+        /* Set MR3 WATI bit is 1 */
+        REG(MR3.UINT32) |= MR3_WAIT;
+        /* dummy read */
+        value = REG(DRR.UINT32);
+        /* wait for it to arrive */
+        status = i2c_wait_RDRF(obj);
+        if (status != 0) {
+            i2c_set_err_noslave(obj);
+            return I2C_ERROR_NO_SLAVE;
+        }
+        i2c_set_MR3_NACK(obj);
+        data[count] = (char)REG(DRR.UINT32);
+        count++;
+    } else {
+        /* length == 1 */
+        /* Set MR3 WATI bit is 1 */;
+        REG(MR3.UINT32) |=  MR3_WAIT;
+        i2c_set_MR3_NACK(obj);
+        /* dummy read */
+        value = REG(DRR.UINT32);
+    }
+    /* wait for it to arrive */
+    status = i2c_wait_RDRF(obj);
+    if (status != 0) {
+        i2c_set_err_noslave(obj);
+        return I2C_ERROR_NO_SLAVE;
+    }
+
+    /* If not repeated start, send stop. */
+    if (stop) {
+        (void)i2c_set_STOP(obj);
+        /* RIICnDRR read */
+        value = (REG(DRR.UINT32) & 0xFF);
+        data[count] = (char)value;
+        /* RIICnMR3.WAIT = 0 */
+        REG(MR3.UINT32) &= ~MR3_WAIT;
+        (void)i2c_wait_STOP(obj);
+        i2c_set_SR2_NACKF_STOP(obj);
+    } else {
+        (void)i2c_restart(obj);
+        /* RIICnDRR read */
+        value = (REG(DRR.UINT32) & 0xFF);
+        data[count] = (char)value;
+        /* RIICnMR3.WAIT = 0 */
+        REG(MR3.UINT32) &= ~MR3_WAIT;
+        (void)i2c_wait_START(obj);
+        /* SR2.START = 0 */
+        REG(SR2.UINT32) &= ~SR2_START;
+    }
+
+    return length;
+}
+
+int i2c_write(i2c_t *obj, int address, const char *data, int length, int stop) {
+    int cnt;
+    int status;
+
+    if(length <= 0) {
+        return 0;
+    }
+
+    /* There is a STOP condition for last processing */
+    if (obj->last_stop_flag != 0) {
+        status = i2c_start(obj);
+        if (status != 0) {
+            i2c_set_err_noslave(obj);
+            return I2C_ERROR_BUS_BUSY;
+        }
+    }
+    obj->last_stop_flag = stop;
+    /*  Send Slave address */
+    status = i2c_do_write(obj, address);
+    if (status != 0) {
+        i2c_set_err_noslave(obj);
+        return I2C_ERROR_NO_SLAVE;
+    }
+    /* Wait send end */
+    status = i2c_wait_TEND(obj);
+    if ((status != 0) || ((REG(SR2.UINT32) & SR2_NACKF) != 0)) {
+        /* Slave sends NACK */
+        i2c_set_err_noslave(obj);
+        return I2C_ERROR_NO_SLAVE;
+    }
+    /* Send Write data */
+    for (cnt=0; cnt<length; cnt++) {
+        status = i2c_do_write(obj, data[cnt]);
+        if(status != 0) {
+            i2c_set_err_noslave(obj);
+            return cnt;
+        } else {
+            /* Wait send end */
+            status = i2c_wait_TEND(obj);
+            if ((status != 0) || ((REG(SR2.UINT32) & SR2_NACKF) != 0)) {
+                /* Slave sends NACK */
+                i2c_set_err_noslave(obj);
+                return I2C_ERROR_NO_SLAVE;
+            }
+        }
+    }
+    /* If not repeated start, send stop. */
+    if (stop) {
+        (void)i2c_set_STOP(obj);
+        (void)i2c_wait_STOP(obj);
+        i2c_set_SR2_NACKF_STOP(obj);
+    } else {
+        (void)i2c_restart(obj);
+        (void)i2c_wait_START(obj);
+        /* SR2.START = 0 */
+        REG(SR2.UINT32) &= ~SR2_START;
+
+    }
+    
+    return length;
+}
+
+void i2c_reset(i2c_t *obj) {
+    (void)i2c_set_STOP(obj);
+    (void)i2c_wait_STOP(obj);
+    i2c_set_SR2_NACKF_STOP(obj);
+}
+
+int i2c_byte_read(i2c_t *obj, int last) {
+    int status;
+    int data;
+
+    data = i2c_do_read(obj, last);
+    /* wait for it to arrive */
+    status = i2c_wait_RDRF(obj);
+    if (status != 0) {
+        i2c_set_SR2_NACKF_STOP(obj);
+        return I2C_ERROR_NO_SLAVE;
+    }
+    
+    return data;
+}
+
+int i2c_byte_write(i2c_t *obj, int data) {
+    int ack = 0;
+    int status;
+    int timeout = 0;
+    
+    status = i2c_do_write(obj, (data & 0xFF));
+    if (status != 0) {
+        i2c_set_SR2_NACKF_STOP(obj);
+    } else {
+        while (((i2c_status(obj) & SR2_RDRF) == 0) && ((i2c_status(obj) & SR2_TEND) == 0)) {
+            timeout++;
+            if (timeout >= WAIT_TIMEOUT) {
+                return ack;
+            }
+        }
+        /* check ACK/NACK */
+        if ((REG(SR2.UINT32) & SR2_NACKF) != 0) {
+            /* NACK */
+            i2c_set_SR2_NACKF_STOP(obj);
+        } else {
+            ack = 1;
+        }
+    }
+
+    return ack;
+}
+
+void i2c_slave_mode(i2c_t *obj, int enable_slave) {
+    if (enable_slave != 0) {
+        REG(SER.UINT32) |= SER_SAR0E;   // only slave addr 0 is enabled
+    } else {
+        REG(SER.UINT32) &= ~SER_SAR0E;  // no slave addr enabled
+    }
+}
+
+int i2c_slave_receive(i2c_t *obj) {
+    int status;
+    int retval;
+
+    status = (REG(SR1.UINT8[0]) & SR1_AAS0);
+    status |= (REG(CR2.UINT8[0]) & CR2_TRS) >> 4;
+
+    switch(status) {
+        case 0x01:
+            /* the master is writing to this slave */
+            retval = 3;
+            break;
+        case 0x02:
+            /* the master is writing to all slave  */
+            retval = 2;
+            break;
+        case 0x03:
+            /* the master has requested a read from this slave */
+            retval = 1;
+            break;
+        default :
+            /* no data */
+            retval = 0;
+            break;
+    }
+
+    return retval;
+}
+
+int i2c_slave_read(i2c_t *obj, char *data, int length) {
+    int timeout = 0;
+    int count;
+    int break_flg = 0;
+
+    if(length <= 0) {
+        return 0;
+    }
+    for (count = 0; ((count < (length + 1)) && (break_flg == 0)); count++) {
+        /* There is no timeout, but the upper limit value is set to avoid an infinite loop. */
+        while (((i2c_status(obj) & SR2_STOP) != 0) || ((i2c_status(obj) & SR2_RDRF) == 0)) {
+            if ((i2c_status(obj) & SR2_STOP) != 0) {
+                break_flg = 1;
+                break;
+            }
+            timeout ++;
+            if (timeout >= WAIT_TIMEOUT) {
+                return -1;
+            }
+        }
+        if (break_flg == 0) {
+            if (count == 0) {
+                /* dummy read */
+                (void)REG(DRR.UINT32);
+            } else {
+                data[count - 1] = (char)(REG(DRR.UINT32) & 0xFF);
+            }
+        }
+    }
+    if (break_flg == 0) {
+        (void)i2c_wait_STOP(obj);
+    } else {
+        if ((i2c_status(obj) & SR2_RDRF) != 0) {
+            if (count <= 1) {
+                /* fail safe */
+                /* dummy read */
+                (void)REG(DRR.UINT32);
+            } else {
+                data[count - 2] = (char)(REG(DRR.UINT32) & 0xFF);
+            }
+        }
+    }
+    /* SR2.STOP = 0 */
+    REG(SR2.UINT32) &= ~SR2_STOP;
+
+    return (count - 1);
+}
+
+int i2c_slave_write(i2c_t *obj, const char *data, int length) {
+    int count = 0;
+    int status = 0;
+
+    if(length <= 0) {
+        return 0;
+    }
+
+    while ((count < length) && (status == 0)) {
+        status = i2c_do_write(obj, data[count]);
+        if(status == 0) {
+            /* Wait send end */
+            status = i2c_wait_TEND(obj);
+            if ((status != 0) || ((count < (length - 1)) && ((REG(SR2.UINT32) & SR2_NACKF) != 0))) {
+                /* NACK */
+                break;
+            }
+        }
+        count++;
+    }
+    /* dummy read */
+    (void)REG(DRR.UINT32);
+    (void)i2c_wait_STOP(obj);
+    i2c_set_SR2_NACKF_STOP(obj);
+
+    return count;
+}
+
+void i2c_slave_address(i2c_t *obj, int idx, uint32_t address, uint32_t mask) {
+    REG(SAR0.UINT32) = (address & 0xfffffffe);
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/objects.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/objects.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/objects.h	(revision 270)
@@ -0,0 +1,83 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef MBED_OBJECTS_H
+#define MBED_OBJECTS_H
+
+#include <stdint.h>
+#include "cmsis.h"
+#include "PortNames.h"
+#include "PeripheralNames.h"
+#include "PinNames.h"
+#include "gpio_object.h"
+#include "rspi_iodefine.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct i2c_s {
+    uint32_t i2c;
+    uint32_t dummy;
+    uint8_t  pclk_bit;
+    uint8_t  width_low;
+    uint8_t  width_hi;
+    int      bbsy_wait_cnt;
+    int      last_stop_flag;
+};
+
+struct spi_s {
+    struct st_rspi *spi;
+    uint32_t       bits;
+};
+
+struct gpio_irq_s {
+    uint32_t port;
+    uint32_t pin;
+    uint32_t ch;
+    uint8_t  int_enable;
+};
+
+struct port_s {
+    __IO uint32_t *reg_dir;
+    __IO uint32_t *reg_out;
+    __I  uint32_t *reg_in;
+    PortName port;
+    uint32_t mask;
+};
+
+struct serial_s {
+    struct st_scif *uart;
+    int index;
+};
+
+struct pwmout_s {
+    uint32_t ch;
+    PWMName pwm;
+};
+
+struct analogin_s {
+    ADCName adc;
+};
+
+struct can_s {
+    uint32_t ch;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/pinmap.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/pinmap.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/pinmap.c	(revision 270)
@@ -0,0 +1,172 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "pinmap.h"
+#include "mbed_error.h"
+#include "gpio_addrdefine.h"
+
+PinName gpio_multi_guard = (PinName)NC; /* If set pin name here, setting of the "pin" is just one time */
+
+typedef struct {
+    PinName pin;
+    int function;
+    int pm;
+} PinFunc;
+
+static const PinFunc PIPC_0_tbl[] = {
+//   pin      func     pm
+    {P4_0   , 2      , -1}, /* TIOC0A */
+    {P5_0   , 6      , -1}, /* TIOC0A */
+    {P7_0   , 7      , -1}, /* TIOC0A */
+    {P10_4  , 2      , -1}, /* TIOC0A */
+    {P4_1   , 2      , -1}, /* TIOC0B */
+    {P5_1   , 6      , -1}, /* TIOC0B */
+    {P7_1   , 7      , -1}, /* TIOC0B */
+    {P10_5  , 2      , -1}, /* TIOC0B */
+    {P4_2   , 2      , -1}, /* TIOC0C */
+    {P5_5   , 6      , -1}, /* TIOC0C */
+    {P7_2   , 7      , -1}, /* TIOC0C */
+    {P10_6  , 2      , -1}, /* TIOC0C */
+    {P4_3   , 2      , -1}, /* TIOC0D */
+    {P5_7   , 6      , -1}, /* TIOC0D */
+    {P7_3   , 7      , -1}, /* TIOC0D */
+    {P10_7  , 2      , -1}, /* TIOC0D */
+    {P2_11  , 5      , -1}, /* TIOC1A */
+    {P6_0   , 5      , -1}, /* TIOC1A */
+    {P7_4   , 7      , -1}, /* TIOC1A */
+    {P8_8   , 5      , -1}, /* TIOC1A */
+    {P9_7   , 4      , -1}, /* TIOC1A */
+    {P10_8  , 2      , -1}, /* TIOC1A */
+    {P2_12  , 8      , -1}, /* TIOC1B */
+    {P5_2   , 6      , -1}, /* TIOC1B */
+    {P6_1   , 5      , -1}, /* TIOC1B */
+    {P7_5   , 7      , -1}, /* TIOC1B */
+    {P8_9   , 5      , -1}, /* TIOC1B */
+    {P10_9  , 2      , -1}, /* TIOC1B */
+    {P2_1   , 6      , -1}, /* TIOC2A */
+    {P6_2   , 6      , -1}, /* TIOC2A */
+    {P7_6   , 7      , -1}, /* TIOC2A */
+    {P8_14  , 4      , -1}, /* TIOC2A */
+    {P10_10 , 2      , -1}, /* TIOC2A */
+    {P2_2   , 6      , -1}, /* TIOC2B */
+    {P6_3   , 6      , -1}, /* TIOC2B */
+    {P7_7   , 7      , -1}, /* TIOC2B */
+    {P8_15  , 4      , -1}, /* TIOC2B */
+    {P10_11 , 2      , -1}, /* TIOC2B */
+    {P10_11 , 2      , -1}, /* TIOC2B */
+    {P3_4   , 6      , -1}, /* TIOC3A */
+    {P7_8   , 7      , -1}, /* TIOC3A */
+    {P8_10  , 4      , -1}, /* TIOC3A */
+    {P3_5   , 6      , -1}, /* TIOC3B */
+    {P7_9   , 7      , -1}, /* TIOC3B */
+    {P8_11  , 4      , -1}, /* TIOC3B */
+    {P3_6   , 6      , -1}, /* TIOC3C */
+    {P5_3   , 6      , -1}, /* TIOC3C */
+    {P7_10  , 7      , -1}, /* TIOC3C */
+    {P8_12  , 4      , -1}, /* TIOC3C */
+    {P3_7   , 6      , -1}, /* TIOC3D */
+    {P5_4   , 6      , -1}, /* TIOC3D */
+    {P7_11  , 7      , -1}, /* TIOC3D */
+    {P8_13  , 4      , -1}, /* TIOC3D */
+    {P3_8   , 6      , -1}, /* TIOC4A */
+    {P4_4   , 3      , -1}, /* TIOC4A */
+    {P7_12  , 7      , -1}, /* TIOC4A */
+    {P11_0  , 2      , -1}, /* TIOC4A */
+    {P3_9   , 6      , -1}, /* TIOC4B */
+    {P4_5   , 3      , -1}, /* TIOC4B */
+    {P7_13  , 7      , -1}, /* TIOC4B */
+    {P11_1  , 2      , -1}, /* TIOC4B */
+    {P3_10  , 6      , -1}, /* TIOC4C */
+    {P4_6   , 3      , -1}, /* TIOC4C */
+    {P7_14  , 7      , -1}, /* TIOC4C */
+    {P11_2  , 2      , -1}, /* TIOC4C */
+    {P3_11  , 6      , -1}, /* TIOC4D */
+    {P4_7   , 3      , -1}, /* TIOC4D */
+    {P7_15  , 7      , -1}, /* TIOC4D */
+    {P11_3  , 2      , -1}, /* TIOC4D */
+    {P5_7   , 1      , 1 }, /* TXOUT0M   */
+    {P5_6   , 1      , 1 }, /* TXOUT0P   */
+    {P5_5   , 1      , 1 }, /* TXOUT1M   */
+    {P5_4   , 1      , 1 }, /* TXOUT1P   */
+    {P5_3   , 1      , 1 }, /* TXOUT2M   */
+    {P5_2   , 1      , 1 }, /* TXOUT2P   */
+    {P5_1   , 1      , 1 }, /* TXCLKOUTM */
+    {P5_0   , 1      , 1 }, /* TXCLKOUTP */
+    {P2_11  , 4      , 0 }, /* SSITxD0 */
+    {P4_7   , 5      , 0 }, /* SSITxD0 */
+    {P7_4   , 6      , 0 }, /* SSITxD1 */
+    {P10_15 , 2      , 0 }, /* SSITxD1 */
+    {P4_15  , 6      , 0 }, /* SSITxD3 */
+    {P7_11  , 2      , 0 }, /* SSITxD3 */
+    {P2_7   , 4      , 0 }, /* SSITxD5 */
+    {P4_11  , 5      , 0 }, /* SSITxD5 */
+    {P8_10  , 8      , 0 }, /* SSITxD5 */
+    {P3_7   , 8      , 0 }, /* WDTOVF */
+    {NC     , 0      , -1}
+};
+
+void pin_function(PinName pin, int function) {
+    if (pin == (PinName)NC) return;
+    
+    int n = pin >> 4;
+    int bitmask = 1<<(pin  & 0xf);
+    const PinFunc * Pipc_0_func = PIPC_0_tbl;
+    int pipc_data = 1;
+    
+    if (gpio_multi_guard != pin) {
+        if (function == 0) {
+            // means GPIO mode
+            *PMC(n) &= ~bitmask;
+        } else {
+            // alt-function mode
+            --function;
+
+            if (function & (1 << 2)) { *PFCAE(n) |= bitmask;}else  { *PFCAE(n) &= ~bitmask;}
+            if (function & (1 << 1)) { *PFCE(n) |= bitmask;}else  { *PFCE(n) &= ~bitmask;}
+            if (function & (1 << 0)) { *PFC(n) |= bitmask;}else  { *PFC(n) &= ~bitmask;}
+
+            while (Pipc_0_func->pin != NC) {
+                if ((Pipc_0_func->pin == pin) && ((Pipc_0_func->function - 1) == function)) {
+                    pipc_data = 0;
+                    if (Pipc_0_func->pm == 0) {
+                        *PMSR(n) = (bitmask << 16) | 0;
+                    } else if (Pipc_0_func->pm == 1) {
+                        *PMSR(n) = (bitmask << 16) | bitmask;
+                    } else {
+                        // Do Nothing
+                    }
+                    break;
+                }
+                Pipc_0_func++;
+            }
+            if (pipc_data == 1) {
+            *PIPC(n) |= bitmask;
+            } else {
+                *PIPC(n) &= ~bitmask;
+            }
+
+            if (P1_0 <= pin && pin <= P1_7 && function == 0) {
+                *PBDC(n) |= bitmask;
+            }
+            *PMC(n) |= bitmask;
+        }
+    } else {
+        gpio_multi_guard = (PinName)NC;
+    }
+}
+
+void pin_mode(PinName pin, PinMode mode) {
+//    if (pin == (PinName)NC) { return; }
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/port_api.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/port_api.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/port_api.c	(revision 270)
@@ -0,0 +1,65 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "port_api.h"
+#include "pinmap.h"
+#include "gpio_api.h"
+
+PinName port_pin(PortName port, int pin_n) {
+    return (PinName)(0);
+}
+
+void port_init(port_t *obj, PortName port, int mask, PinDirection dir) {
+    obj->port = port;
+    obj->mask = mask;
+    
+    // Do not use masking, because it prevents the use of the unmasked pins
+    // port_reg->FIOMASK = ~mask;
+    
+    uint32_t i;
+    // The function is set per pin: reuse gpio logic
+    for (i=0; i<32; i++) {
+        if (obj->mask & (1<<i)) {
+            gpio_set(port_pin(obj->port, i));
+        }
+    }
+
+    port_dir(obj, dir);
+}
+
+void port_mode(port_t *obj, PinMode mode) {
+    uint32_t i;
+    // The mode is set per pin: reuse pinmap logic
+    for (i=0; i<32; i++) {
+        if (obj->mask & (1<<i)) {
+            pin_mode(port_pin(obj->port, i), mode);
+        }
+    }
+}
+
+void port_dir(port_t *obj, PinDirection dir) {
+    switch (dir) {
+        case PIN_INPUT : *obj->reg_dir &= ~obj->mask; break;
+        case PIN_OUTPUT: *obj->reg_dir |=  obj->mask; break;
+    }
+}
+
+void port_write(port_t *obj, int value) {
+    *obj->reg_out = (*obj->reg_in & ~obj->mask) | (value & obj->mask);
+}
+
+int port_read(port_t *obj) {
+    return (*obj->reg_in & obj->mask);
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/pwmout_api.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/pwmout_api.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/pwmout_api.c	(revision 270)
@@ -0,0 +1,572 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "mbed_assert.h"
+#include "pwmout_api.h"
+#include "cmsis.h"
+#include "pinmap.h"
+#include "RZ_A1_Init.h"
+#include "cpg_iodefine.h"
+#include "pwm_iodefine.h"
+#include "gpio_addrdefine.h"
+
+#define MTU2_PWM_NUM            22
+#define MTU2_PWM_SIGNAL         2
+#define MTU2_PWM_OFFSET         0x20
+
+//  PORT ID, PWM ID, Pin function
+static const PinMap PinMap_PWM[] = {
+    {P2_1     , MTU2_PWM0_PIN  , 6},
+    {P2_11    , MTU2_PWM1_PIN  , 5},
+    {P3_8     , MTU2_PWM2_PIN  , 6},
+    {P3_10    , MTU2_PWM3_PIN  , 6},
+    {P4_0     , MTU2_PWM4_PIN  , 2},
+    {P4_4     , MTU2_PWM5_PIN  , 3},
+    {P4_6     , MTU2_PWM6_PIN  , 3},
+    {P5_0     , MTU2_PWM7_PIN  , 6},
+    {P5_3     , MTU2_PWM8_PIN  , 6},
+    {P5_5     , MTU2_PWM9_PIN  , 6},
+    {P7_2     , MTU2_PWM10_PIN , 7},
+    {P7_4     , MTU2_PWM11_PIN , 7},
+    {P7_6     , MTU2_PWM12_PIN , 7},
+    {P7_10    , MTU2_PWM13_PIN , 7},
+    {P7_12    , MTU2_PWM14_PIN , 7},
+    {P7_14    , MTU2_PWM15_PIN , 7},
+    {P8_8     , MTU2_PWM16_PIN , 5},
+    {P8_10    , MTU2_PWM17_PIN , 4},
+    {P8_12    , MTU2_PWM18_PIN , 4},
+    {P8_14    , MTU2_PWM19_PIN , 4},
+    {P11_0    , MTU2_PWM20_PIN , 2},
+    {P11_2    , MTU2_PWM21_PIN , 2},
+    {P4_4     , PWM0_PIN       , 4},
+    {P3_2     , PWM1_PIN       , 7},
+    {P4_6     , PWM2_PIN       , 4},
+    {P4_7     , PWM3_PIN       , 4},
+    {P8_14    , PWM4_PIN       , 6},
+    {P8_15    , PWM5_PIN       , 6},
+    {P8_13    , PWM6_PIN       , 6},
+    {P8_11    , PWM7_PIN       , 6},
+    {P8_8     , PWM8_PIN       , 6},
+    {P10_0    , PWM9_PIN       , 3},
+    {P8_12    , PWM10_PIN      , 6},
+    {P8_9     , PWM11_PIN      , 6},
+    {P8_10    , PWM12_PIN      , 6},
+    {P4_5     , PWM13_PIN      , 4},
+    {NC       , NC             , 0}
+};
+
+static const PWMType PORT[] = {
+     PWM2E,          // PWM0_PIN
+     PWM2C,          // PWM1_PIN
+     PWM2G,          // PWM2_PIN
+     PWM2H,          // PWM3_PIN
+     PWM1G,          // PWM4_PIN
+     PWM1H,          // PWM5_PIN
+     PWM1F,          // PWM6_PIN
+     PWM1D,          // PWM7_PIN
+     PWM1A,          // PWM8_PIN
+     PWM2A,          // PWM9_PIN
+     PWM1E,          // PWM10_PIN
+     PWM1B,          // PWM11_PIN
+     PWM1C,          // PWM12_PIN
+     PWM2F,          // PWM13_PIN
+};
+
+static const MTU2_PWMType MTU2_PORT[] = {
+     TIOC2A,         // MTU2_PWM0_PIN
+     TIOC1A,         // MTU2_PWM1_PIN
+     TIOC4A,         // MTU2_PWM2_PIN
+     TIOC4C,         // MTU2_PWM3_PIN
+     TIOC0A,         // MTU2_PWM4_PIN
+     TIOC4A,         // MTU2_PWM5_PIN
+     TIOC4C,         // MTU2_PWM6_PIN
+     TIOC0A,         // MTU2_PWM7_PIN
+     TIOC3C,         // MTU2_PWM8_PIN
+     TIOC0C,         // MTU2_PWM9_PIN
+     TIOC0C,         // MTU2_PWM10_PIN
+     TIOC1A,         // MTU2_PWM11_PIN
+     TIOC2A,         // MTU2_PWM12_PIN
+     TIOC3C,         // MTU2_PWM13_PIN
+     TIOC4A,         // MTU2_PWM14_PIN
+     TIOC4C,         // MTU2_PWM15_PIN
+     TIOC1A,         // MTU2_PWM16_PIN
+     TIOC3A,         // MTU2_PWM17_PIN
+     TIOC3C,         // MTU2_PWM18_PIN
+     TIOC2A,         // MTU2_PWM19_PIN
+     TIOC4A,         // MTU2_PWM20_PIN
+     TIOC4C,         // MTU2_PWM21_PIN
+};
+
+static __IO uint16_t *PWM_MATCH[] = {
+    &PWMPWBFR_2E,    // PWM0_PIN
+    &PWMPWBFR_2C,    // PWM1_PIN
+    &PWMPWBFR_2G,    // PWM2_PIN
+    &PWMPWBFR_2G,    // PWM3_PIN
+    &PWMPWBFR_1G,    // PWM4_PIN
+    &PWMPWBFR_1G,    // PWM5_PIN
+    &PWMPWBFR_1E,    // PWM6_PIN
+    &PWMPWBFR_1C,    // PWM7_PIN
+    &PWMPWBFR_1A,    // PWM8_PIN
+    &PWMPWBFR_2A,    // PWM9_PIN
+    &PWMPWBFR_1E,    // PWM10_PIN
+    &PWMPWBFR_1A,    // PWM11_PIN
+    &PWMPWBFR_1C,    // PWM12_PIN
+    &PWMPWBFR_2E,    // PWM13_PIN
+};
+
+static __IO uint16_t *MTU2_PWM_MATCH[MTU2_PWM_NUM][MTU2_PWM_SIGNAL] = {
+    { &MTU2TGRA_2, &MTU2TGRB_2 },       // MTU2_PWM0_PIN
+    { &MTU2TGRA_1, &MTU2TGRB_1 },       // MTU2_PWM1_PIN
+    { &MTU2TGRA_4, &MTU2TGRB_4 },       // MTU2_PWM2_PIN
+    { &MTU2TGRC_4, &MTU2TGRD_4 },       // MTU2_PWM3_PIN
+    { &MTU2TGRA_0, &MTU2TGRB_0 },       // MTU2_PWM4_PIN
+    { &MTU2TGRA_4, &MTU2TGRB_4 },       // MTU2_PWM5_PIN
+    { &MTU2TGRC_4, &MTU2TGRD_4 },       // MTU2_PWM6_PIN
+    { &MTU2TGRA_0, &MTU2TGRB_0 },       // MTU2_PWM7_PIN
+    { &MTU2TGRC_3, &MTU2TGRD_3 },       // MTU2_PWM8_PIN
+    { &MTU2TGRC_0, &MTU2TGRD_0 },       // MTU2_PWM9_PIN
+    { &MTU2TGRC_0, &MTU2TGRD_0 },       // MTU2_PWM10_PIN
+    { &MTU2TGRA_1, &MTU2TGRB_1 },       // MTU2_PWM11_PIN
+    { &MTU2TGRA_2, &MTU2TGRB_2 },       // MTU2_PWM12_PIN
+    { &MTU2TGRC_3, &MTU2TGRD_3 },       // MTU2_PWM13_PIN
+    { &MTU2TGRA_4, &MTU2TGRB_4 },       // MTU2_PWM14_PIN
+    { &MTU2TGRC_4, &MTU2TGRD_4 },       // MTU2_PWM15_PIN
+    { &MTU2TGRA_1, &MTU2TGRB_1 },       // MTU2_PWM16_PIN
+    { &MTU2TGRA_3, &MTU2TGRB_3 },       // MTU2_PWM17_PIN
+    { &MTU2TGRC_3, &MTU2TGRD_3 },       // MTU2_PWM18_PIN
+    { &MTU2TGRA_2, &MTU2TGRB_2 },       // MTU2_PWM19_PIN
+    { &MTU2TGRA_4, &MTU2TGRB_4 },       // MTU2_PWM20_PIN
+    { &MTU2TGRC_4, &MTU2TGRD_4 }        // MTU2_PWM21_PIN
+};
+
+static __IO uint8_t *TCR_MATCH[] = {
+    &MTU2TCR_0,
+    &MTU2TCR_1,
+    &MTU2TCR_2,
+    &MTU2TCR_3,
+    &MTU2TCR_4,
+};
+
+static __IO uint8_t *TIORH_MATCH[] = {
+    &MTU2TIORH_0,
+    &MTU2TIOR_1,
+    &MTU2TIOR_2,
+    &MTU2TIORH_3,
+    &MTU2TIORH_4,
+};
+
+static __IO uint8_t *TIORL_MATCH[] = {
+    &MTU2TIORL_0,
+    NULL,
+    NULL,
+    &MTU2TIORL_3,
+    &MTU2TIORL_4,
+};
+
+static __IO uint16_t *TGRA_MATCH[] = {
+    &MTU2TGRA_0,
+    &MTU2TGRA_1,
+    &MTU2TGRA_2,
+    &MTU2TGRA_3,
+    &MTU2TGRA_4,
+};
+
+static __IO uint16_t *TGRC_MATCH[] = {
+    &MTU2TGRC_0,
+    NULL,
+    NULL,
+    &MTU2TGRC_3,
+    &MTU2TGRC_4,
+};
+
+static __IO uint8_t *TMDR_MATCH[] = {
+    &MTU2TMDR_0,
+    &MTU2TMDR_1,
+    &MTU2TMDR_2,
+    &MTU2TMDR_3,
+    &MTU2TMDR_4,
+};
+
+static int MAX_PERIOD[] = {
+    125000,
+    503000,
+    2000000,
+    2000000,
+    2000000,
+};
+
+typedef enum {
+    MODE_PWM = 0,
+    MODE_MTU2
+} PWMmode;
+
+typedef enum {
+    MTU2_PULSE = 0,
+    MTU2_PERIOD
+} MTU2Signal;
+
+static int pwm_mode = MODE_PWM;
+static uint16_t init_period_ch1 = 0;
+static uint16_t init_period_ch2 = 0;
+static uint16_t init_mtu2_period_ch[5] = {0};
+static int32_t  period_ch1 = 1;
+static int32_t  period_ch2 = 1;
+static int32_t  mtu2_period_ch[5] = {1, 1, 1, 1, 1};
+
+void pwmout_init(pwmout_t* obj, PinName pin) {
+    // determine the channel
+    PWMName pwm = (PWMName)pinmap_peripheral(pin, PinMap_PWM);
+    MBED_ASSERT(pwm != (PWMName)NC);
+
+    if (pwm >= MTU2_PWM_OFFSET) {
+        /* PWM by MTU2 */
+        int tmp_pwm;
+        
+        pwm_mode = MODE_MTU2;
+        // power on
+        CPGSTBCR3 &= ~(CPG_STBCR3_BIT_MSTP33);
+        
+        obj->pwm = pwm;
+        tmp_pwm = (int)(obj->pwm - MTU2_PWM_OFFSET);
+        if (((uint32_t)MTU2_PORT[tmp_pwm] & 0x00000040) == 0x00000040) {
+            obj->ch  = 4;
+            MTU2TOER |= 0x36;
+        } else if (((uint32_t)MTU2_PORT[tmp_pwm] & 0x00000030) == 0x00000030) {
+            obj->ch  = 3;
+            MTU2TOER |= 0x09;
+        } else if (((uint32_t)MTU2_PORT[tmp_pwm] & 0x00000020) == 0x00000020) {
+            obj->ch  = 2;
+        } else if (((uint32_t)MTU2_PORT[tmp_pwm] & 0x00000010) == 0x00000010) {
+            obj->ch  = 1;
+        } else {
+            obj->ch  = 0;
+        }
+        // Wire pinout
+        pinmap_pinout(pin, PinMap_PWM);
+
+        int bitmask = 1 << (pin  & 0xf);
+
+        *PMSR(PINGROUP(pin)) = (bitmask << 16) | 0;
+
+        // default duty 0.0f
+        pwmout_write(obj, 0);
+        if (init_mtu2_period_ch[obj->ch] == 0) {
+            // default period 1ms
+            pwmout_period_us(obj, 1000);
+            init_mtu2_period_ch[obj->ch] = 1;
+        }
+    } else {
+        /* PWM */
+        pwm_mode = MODE_PWM;
+        // power on
+        CPGSTBCR3 &= ~(CPG_STBCR3_BIT_MSTP30);
+
+        obj->pwm = pwm;
+        if (((uint32_t)PORT[obj->pwm] & 0x00000010) == 0x00000010) {
+            obj->ch  = 2;
+            PWMPWPR_2_BYTE_L = 0x00;
+        } else {
+            obj->ch  = 1;
+            PWMPWPR_1_BYTE_L = 0x00;
+        }
+
+        // Wire pinout
+        pinmap_pinout(pin, PinMap_PWM);
+
+        // default to 491us: standard for servos, and fine for e.g. brightness control
+        pwmout_write(obj, 0);
+        if ((obj->ch == 2) && (init_period_ch2 == 0)) {
+            pwmout_period_us(obj, 491);
+            init_period_ch2 = 1;
+        }
+        if ((obj->ch == 1) && (init_period_ch1 == 0)) {
+            pwmout_period_us(obj, 491);
+            init_period_ch1 = 1;
+        }
+    }
+}
+
+void pwmout_free(pwmout_t* obj) {
+    pwmout_write(obj, 0);
+}
+
+void pwmout_write(pwmout_t* obj, float value) {
+    uint32_t wk_cycle;
+    uint16_t v;
+
+    if (pwm_mode == MODE_MTU2) {
+        /* PWM by MTU2 */
+        int tmp_pwm;
+        
+        if (value < 0.0f) {
+            value = 0.0f;
+        } else if (value > 1.0f) {
+            value = 1.0f;
+        } else {
+            // Do Nothing
+        }
+        tmp_pwm = (int)(obj->pwm - MTU2_PWM_OFFSET);
+        wk_cycle = *MTU2_PWM_MATCH[tmp_pwm][MTU2_PERIOD] & 0xffff;
+        // set channel match to percentage
+        *MTU2_PWM_MATCH[tmp_pwm][MTU2_PULSE] = (uint16_t)((float)wk_cycle * value);
+    } else {
+        /* PWM */
+        if (value < 0.0f) {
+            value = 0.0f;
+        } else if (value > 1.0f) {
+            value = 1.0f;
+        } else {
+            // Do Nothing
+        }
+
+        if (obj->ch == 2) {
+            wk_cycle = PWMPWCYR_2 & 0x03ff;
+        } else {
+            wk_cycle = PWMPWCYR_1 & 0x03ff;
+        }
+
+        // set channel match to percentage
+        v = (uint16_t)((float)wk_cycle * value);
+        *PWM_MATCH[obj->pwm] = (v | ((PORT[obj->pwm] & 1) << 12));
+    }
+}
+
+float pwmout_read(pwmout_t* obj) {
+    uint32_t wk_cycle;
+    float value;
+
+    if (pwm_mode == MODE_MTU2) {
+        /* PWM by MTU2 */
+        uint32_t wk_pulse;
+        int tmp_pwm;
+        
+        tmp_pwm = (int)(obj->pwm - MTU2_PWM_OFFSET);
+        wk_cycle = *MTU2_PWM_MATCH[tmp_pwm][MTU2_PERIOD] & 0xffff;
+        wk_pulse = *MTU2_PWM_MATCH[tmp_pwm][MTU2_PULSE] & 0xffff;
+        value = ((float)wk_pulse / (float)wk_cycle);
+    } else {
+        /* PWM */
+        if (obj->ch == 2) {
+            wk_cycle = PWMPWCYR_2 & 0x03ff;
+        } else {
+            wk_cycle = PWMPWCYR_1 & 0x03ff;
+        }
+        value = ((float)(*PWM_MATCH[obj->pwm] & 0x03ff) / (float)wk_cycle);
+    }
+
+    return (value > 1.0f) ? (1.0f) : (value);
+}
+
+void pwmout_period(pwmout_t* obj, float seconds) {
+    pwmout_period_us(obj, seconds * 1000000.0f);
+}
+
+void pwmout_period_ms(pwmout_t* obj, int ms) {
+    pwmout_period_us(obj, ms * 1000);
+}
+
+static void set_duty_again(__IO uint16_t *p_pwmpbfr, uint16_t last_cycle, uint16_t new_cycle){
+    uint16_t wk_pwmpbfr;
+    float    value;
+    uint16_t v;
+
+    wk_pwmpbfr = *p_pwmpbfr;
+    value      = ((float)(wk_pwmpbfr & 0x03ff) / (float)last_cycle);
+    v          = (uint16_t)((float)new_cycle * value);
+    *p_pwmpbfr = (v | (wk_pwmpbfr & 0x1000));
+}
+
+static void set_mtu2_duty_again(__IO uint16_t *p_pwmpbfr, uint16_t last_cycle, uint16_t new_cycle){
+    uint16_t wk_pwmpbfr;
+    float    value;
+
+    wk_pwmpbfr = *p_pwmpbfr;
+    value      = ((float)(wk_pwmpbfr & 0xffff) / (float)last_cycle);
+    *p_pwmpbfr = (uint16_t)((float)new_cycle * value);
+}
+
+// Set the PWM period, keeping the duty cycle the same.
+void pwmout_period_us(pwmout_t* obj, int us) {
+    uint64_t wk_cycle_mtu2;
+    uint32_t pclk_base;
+    uint32_t wk_cycle;
+    uint32_t wk_cks = 0;
+    uint16_t wk_last_cycle;
+    int      max_us = 0;
+
+    if (pwm_mode == MODE_MTU2) {
+        /* PWM by MTU2 */
+        int tmp_pwm;
+        uint16_t tmp_tgra;
+        uint16_t tmp_tgrc;
+        uint8_t tmp_tcr_up;
+        uint8_t tmp_tstr_sp;
+        uint8_t tmp_tstr_st;
+        
+        max_us = MAX_PERIOD[obj->ch];
+        if (us > max_us) {
+            us = max_us;
+        } else if (us < 1) {
+            us = 1;
+        } else {
+            // Do Nothing
+        }
+
+        if (RZ_A1_IsClockMode0() == false) {
+            pclk_base = (uint32_t)CM1_RENESAS_RZ_A1_P0_CLK;
+        } else {
+            pclk_base = (uint32_t)CM0_RENESAS_RZ_A1_P0_CLK;
+        }
+
+        wk_cycle_mtu2 = (uint64_t)pclk_base * us;
+        while (wk_cycle_mtu2 >= 65535000000) {
+            if ((obj->ch == 1) && (wk_cks == 3)) {
+                wk_cks+=2;
+            } else if ((obj->ch == 2) && (wk_cks == 3)) {
+                wk_cycle_mtu2 >>= 2;
+                wk_cks+=3;
+            }
+            wk_cycle_mtu2 >>= 2;
+            wk_cks++;
+        }
+        wk_cycle = (uint32_t)(wk_cycle_mtu2 / 1000000);
+        
+        tmp_pwm = (int)(obj->pwm - MTU2_PWM_OFFSET);
+        if (((uint8_t)MTU2_PORT[tmp_pwm] & 0x02) == 0x02) {
+            tmp_tcr_up = 0xC0;
+        } else {
+            tmp_tcr_up = 0x40;
+        }
+        if ((obj->ch == 4) || (obj->ch == 3)) {
+            tmp_tstr_sp = ~(0x38 | (1 << (obj->ch + 3)));
+            tmp_tstr_st = (1 << (obj->ch + 3));
+        } else {
+            tmp_tstr_sp = ~(0x38 | (1 << obj->ch));
+            tmp_tstr_st = (1 << obj->ch);
+        }
+        // Counter Stop
+        MTU2TSTR &= tmp_tstr_sp;
+        wk_last_cycle = *MTU2_PWM_MATCH[tmp_pwm][MTU2_PERIOD] & 0xffff;
+        *TCR_MATCH[obj->ch] = tmp_tcr_up | wk_cks;
+        *TIORH_MATCH[obj->ch] = 0x21;
+        if ((obj->ch == 0) || (obj->ch == 3) || (obj->ch == 4)) {
+            *TIORL_MATCH[obj->ch] = 0x21;
+        }
+        *MTU2_PWM_MATCH[tmp_pwm][MTU2_PERIOD] = (uint16_t)wk_cycle;     // Set period
+
+        // Set duty again(TGRA)
+        tmp_tgra = *TGRA_MATCH[obj->ch];
+        set_mtu2_duty_again(&tmp_tgra, wk_last_cycle, wk_cycle);
+        if ((obj->ch == 0) || (obj->ch == 3) || (obj->ch == 4)) {
+            // Set duty again(TGRC)
+            tmp_tgrc = *TGRC_MATCH[obj->ch];
+            set_mtu2_duty_again(&tmp_tgrc, wk_last_cycle, wk_cycle);
+        }
+        *TMDR_MATCH[obj->ch] = 0x02;                                    // PWM mode 1
+
+        // Counter Start
+        MTU2TSTR |= tmp_tstr_st;
+        // Save for future use
+        mtu2_period_ch[obj->ch] = us;
+    } else {
+        /* PWM */
+        if (us > 491) {
+            us = 491;
+        } else if (us < 1) {
+            us = 1;
+        } else {
+            // Do Nothing
+        }
+
+        if (RZ_A1_IsClockMode0() == false) {
+            pclk_base = (uint32_t)CM1_RENESAS_RZ_A1_P0_CLK / 10000;
+        } else {
+            pclk_base = (uint32_t)CM0_RENESAS_RZ_A1_P0_CLK / 10000;
+        }
+
+        wk_cycle = pclk_base * us;
+        while (wk_cycle >= 102350) {
+            wk_cycle >>= 1;
+            wk_cks++;
+        }
+        wk_cycle = (wk_cycle + 50) / 100;
+
+        if (obj->ch == 2) {
+            wk_last_cycle    = PWMPWCYR_2 & 0x03ff;
+            PWMPWCR_2_BYTE_L = 0xc0 | wk_cks;
+            PWMPWCYR_2       = (uint16_t)wk_cycle;
+
+            // Set duty again
+            set_duty_again(&PWMPWBFR_2A, wk_last_cycle, wk_cycle);
+            set_duty_again(&PWMPWBFR_2C, wk_last_cycle, wk_cycle);
+            set_duty_again(&PWMPWBFR_2E, wk_last_cycle, wk_cycle);
+            set_duty_again(&PWMPWBFR_2G, wk_last_cycle, wk_cycle);
+
+            // Counter Start
+            PWMPWCR_2_BYTE_L |= 0x08;
+
+            // Save for future use
+            period_ch2 = us;
+        } else {
+            wk_last_cycle    = PWMPWCYR_1 & 0x03ff;
+            PWMPWCR_1_BYTE_L = 0xc0 | wk_cks;
+            PWMPWCYR_1       = (uint16_t)wk_cycle;
+
+            // Set duty again
+            set_duty_again(&PWMPWBFR_1A, wk_last_cycle, wk_cycle);
+            set_duty_again(&PWMPWBFR_1C, wk_last_cycle, wk_cycle);
+            set_duty_again(&PWMPWBFR_1E, wk_last_cycle, wk_cycle);
+            set_duty_again(&PWMPWBFR_1G, wk_last_cycle, wk_cycle);
+
+            // Counter Start
+            PWMPWCR_1_BYTE_L |= 0x08;
+
+            // Save for future use
+            period_ch1 = us;
+        }
+    }
+}
+
+void pwmout_pulsewidth(pwmout_t* obj, float seconds) {
+    pwmout_pulsewidth_us(obj, seconds * 1000000.0f);
+}
+
+void pwmout_pulsewidth_ms(pwmout_t* obj, int ms) {
+    pwmout_pulsewidth_us(obj, ms * 1000);
+}
+
+void pwmout_pulsewidth_us(pwmout_t* obj, int us) {
+    float value = 0;
+
+    if (pwm_mode == MODE_MTU2) {
+        /* PWM by MTU2 */
+        if (mtu2_period_ch[obj->ch] != 0) {
+            value = (float)us / (float)mtu2_period_ch[obj->ch];
+        }
+    } else {
+        /* PWM */
+        if (obj->ch == 2) {
+            if (period_ch2 != 0) {
+                value = (float)us / (float)period_ch2;
+            }
+        } else {
+            if (period_ch1 != 0) {
+                value = (float)us / (float)period_ch1;
+            }
+        }
+
+        pwmout_write(obj, value);
+    }
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/rtc_api.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/rtc_api.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/rtc_api.c	(revision 270)
@@ -0,0 +1,374 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2015 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "mbed_assert.h"
+#include "device.h"
+
+#if DEVICE_RTC
+
+#include "rtc_api.h"
+#include "rtc_iodefine.h"
+
+
+#define RCR1_VAL_ON      (0x08u) // AIE = 1
+#define RCR1_VAL_OFF     (0x00u)
+#define RCR2_VAL_ALLSTOP (0x00u)
+#define RCR2_VAL_START   (0x01u) // START = 1
+#define RCR2_VAL_RESET   (0x02u) // RESET = 1
+#define RCR3_VAL         (0x00u)
+#define RCR5_VAL_EXTAL   (0x01u) // RCKSEL = connect EXTAL
+#define RCR5_VAL_RTCX1   (0x00u) // RCKSEL = disconnect EXTAL
+#define RFRH_VAL_13333   (0x8003u) // 13.3333MHz (= 64Hz * 0x32DCD) 
+#define RFRL_VAL_13333   (0x2DCDu) //
+#define RFRH_VAL_MAX     (0x0007u) // MAX value (= 128Hz * 0x7FFFF)
+#define RFRL_VAL_MAX     (0xFFFFu) //
+
+#define MASK_00_03_POS   (0x000Fu)
+#define MASK_04_07_POS   (0x00F0u)
+#define MASK_08_11_POS   (0x0F00u)
+#define MASK_12_15_POS   (0xF000u)
+#define MASK_16_20_POS   (0x000F0000u)
+#define SHIFT_1_HBYTE    (4u)
+#define SHIFT_2_HBYTE    (8u)
+#define SHIFT_3_HBYTE    (12u)
+#define SHIFT_1BYTE      (8u)
+#define SHIFT_2BYTE      (16u)
+
+#define TIME_ERROR_VAL   (0xFFFFFFFFu)
+
+static int rtc_dec8_to_hex(uint8_t dec_val, uint8_t offset, int *hex_val);
+static int rtc_dec16_to_hex(uint16_t dec_val, uint16_t offset, int *hex_val);
+static uint8_t rtc_hex8_to_dec(uint8_t hex_val);
+static uint16_t rtc_hex16_to_dec(uint16_t hex_val);
+
+
+/*
+ * Setup the RTC based on a time structure.
+ * The rtc_init function should be executed first.
+ * [in]
+ * None.
+ * [out]
+ * None.
+ */
+void rtc_init(void) {
+    volatile uint8_t dummy_read;
+
+    // Set control register
+    RTC.RCR2 = RCR2_VAL_ALLSTOP;
+    RTC.RCR1 = RCR1_VAL_ON;
+    RTC.RCR3 = RCR3_VAL;
+    RTC.RCR5 = RCR5_VAL_EXTAL;
+    RTC.RFRH = RFRH_VAL_13333;
+    RTC.RFRL = RFRL_VAL_13333;
+
+    // Dummy read
+    dummy_read = RTC.RCR2;
+    dummy_read = RTC.RCR2;
+
+    RTC.RCR2 = RCR2_VAL_RESET; // RESET = 1
+
+    // Dummy read
+    dummy_read = RTC.RCR2;
+    dummy_read = RTC.RCR2;
+
+    // Set timer and alarm. Default value :01-01-1970 00:00:00
+    RTC.RSECCNT = 0;
+    RTC.RMINCNT = 0;
+    RTC.RHRCNT  = 0;
+    RTC.RWKCNT  = 0;
+    RTC.RDAYCNT = 1;
+    RTC.RMONCNT = 1;
+    RTC.RYRCNT  = 0x1970;
+    RTC.RSECAR  = 0;
+    RTC.RMINAR  = 0;
+    RTC.RHRAR   = 0;
+    RTC.RWKAR   = 0;
+    RTC.RDAYAR  = 1;
+    RTC.RMONAR  = 1;
+    RTC.RYRAR   = 0x1970;
+
+    // Dummy read
+    dummy_read = RTC.RYRCNT;
+    dummy_read = RTC.RYRCNT;
+
+}
+
+
+/*
+ * Release the RTC based on a time structure.
+ * [in]
+ * None.
+ * [out]
+ * None.
+ */
+void rtc_free(void) {
+    volatile uint8_t dummy_read;
+
+    // Set control register
+    RTC.RCR2 = RCR2_VAL_ALLSTOP;
+    RTC.RCR1 = RCR1_VAL_OFF;
+    RTC.RCR3 = RCR3_VAL;
+    RTC.RCR5 = RCR5_VAL_RTCX1;
+    RTC.RFRH = RFRH_VAL_MAX;
+    RTC.RFRL = RFRL_VAL_MAX;
+
+    // Dummy read
+    dummy_read = RTC.RCR2;
+    dummy_read = RTC.RCR2;
+    RTC.RCR2 = RCR2_VAL_RESET; // RESET = 1
+
+    // Dummy read
+    dummy_read = RTC.RCR2;
+    dummy_read = RTC.RCR2;
+
+    // Set timer and alarm. Default value :01-01-1970 00:00:00
+    RTC.RSECCNT = 0;
+    RTC.RMINCNT = 0;
+    RTC.RHRCNT  = 0;
+    RTC.RWKCNT  = 0;
+    RTC.RDAYCNT = 1;
+    RTC.RMONCNT = 1;
+    RTC.RYRCNT  = 0x1970;
+    RTC.RSECAR  = 0;
+    RTC.RMINAR  = 0;
+    RTC.RHRAR   = 0;
+    RTC.RWKAR   = 0;
+    RTC.RDAYAR  = 1;
+    RTC.RMONAR  = 1;
+    RTC.RYRAR   = 0x1970;
+
+    // Dummy read
+    dummy_read = RTC.RYRCNT;
+    dummy_read = RTC.RYRCNT;
+
+}
+
+
+/*
+ * Check the RTC has been enabled.
+ * Clock Control Register RTC.RCR1(bit3): 0 = Disabled, 1 = Enabled.
+ * [in]
+ * None.
+ * [out]
+ * 0:Disabled, 1:Enabled.
+ */
+int rtc_isenabled(void) {
+    int ret_val = 0;
+
+    if ((RTC.RCR1 & RCR1_VAL_ON) != 0) { // RTC ON ?
+        ret_val = 1;
+    }
+
+    return ret_val;
+}
+
+
+/*
+ * RTC read function.
+ * [in]
+ * None.
+ * [out]
+ * UNIX timestamp value.
+ */
+time_t rtc_read(void) {
+
+    struct tm timeinfo;
+    int    err = 0;
+    uint8_t tmp_regdata;
+    time_t t;
+
+    if (rtc_isenabled() != 0) {
+        RTC.RCR1 &= ~0x10u; // CIE = 0
+        do {
+            // before reading process
+            tmp_regdata  = RTC.RCR1;
+            tmp_regdata &= ~0x80u; // CF = 0
+            tmp_regdata |= 0x01u;  // AF = 1
+            RTC.RCR1 = tmp_regdata;
+
+            // Read RTC register
+            err  = rtc_dec8_to_hex(RTC.RSECCNT , 0    , &timeinfo.tm_sec);
+            err += rtc_dec8_to_hex(RTC.RMINCNT , 0    , &timeinfo.tm_min);
+            err += rtc_dec8_to_hex(RTC.RHRCNT  , 0    , &timeinfo.tm_hour);
+            err += rtc_dec8_to_hex(RTC.RDAYCNT , 0    , &timeinfo.tm_mday);
+            err += rtc_dec8_to_hex(RTC.RMONCNT , 1    , &timeinfo.tm_mon);
+            err += rtc_dec16_to_hex(RTC.RYRCNT , 1900 , &timeinfo.tm_year);
+        } while ((RTC.RCR1 & 0x80u) != 0);
+    } else {
+        err = 1;
+    }
+
+    if (err == 0) {
+        // Convert to timestamp
+        t = mktime(&timeinfo);
+    } else {
+        // Error
+        t = TIME_ERROR_VAL;
+    }
+
+    return t;
+}
+
+/*
+ * Dec(8bit) to Hex function for RTC.
+ * [in]
+ * dec_val:Decimal value (from 0x00 to 0x99).
+ * offset:Subtract offset from dec_val.
+ * hex_val:Pointer of output hexadecimal value.
+ * [out]
+ * 0:Success
+ * 1:Error
+ */
+static int rtc_dec8_to_hex(uint8_t dec_val, uint8_t offset, int *hex_val) {
+    int err = 0;
+    uint8_t ret_val;
+
+    if (hex_val != NULL) {
+        if (((dec_val & MASK_04_07_POS) >= (0x0A << SHIFT_1_HBYTE)) ||
+            ((dec_val & MASK_00_03_POS) >=  0x0A)) {
+            err = 1;
+        } else {
+            ret_val = ((dec_val & MASK_04_07_POS) >> SHIFT_1_HBYTE) * 10 +
+                       (dec_val & MASK_00_03_POS);
+            if (ret_val < offset) {
+                err = 1;
+            } else {
+                *hex_val = ret_val - offset;
+            }
+        }
+    } else {
+        err = 1;
+    }
+
+    return err;
+}
+
+/*
+ * Dec(16bit) to Hex function for RTC
+ * [in]
+ * dec_val:Decimal value (from 0x0000 to 0x9999).
+ * offset:Subtract offset from dec_val.
+ * hex_val:Pointer of output hexadecimal value.
+ * [out]
+ * 0:Success
+ * 1:Error
+ */
+static int rtc_dec16_to_hex(uint16_t dec_val, uint16_t offset, int *hex_val) {
+    int err = 0;
+    uint16_t ret_val;
+
+    if (hex_val != NULL) {
+        if (((dec_val & MASK_12_15_POS) >= (0x0A << SHIFT_3_HBYTE)) ||
+            ((dec_val & MASK_08_11_POS) >= (0x0A << SHIFT_2_HBYTE)) ||
+            ((dec_val & MASK_04_07_POS) >= (0x0A << SHIFT_1_HBYTE)) ||
+            ((dec_val & MASK_00_03_POS) >=  0x0A)) {
+            err = 1;
+            *hex_val = 0;
+        } else {
+            ret_val = (((dec_val & MASK_12_15_POS)) >> SHIFT_3_HBYTE) * 1000 +
+                      (((dec_val & MASK_08_11_POS)) >> SHIFT_2_HBYTE) * 100 +
+                      (((dec_val & MASK_04_07_POS)) >> SHIFT_1_HBYTE) * 10 +
+                        (dec_val & MASK_00_03_POS);
+            if (ret_val < offset) {
+                err = 1;
+            } else {
+                *hex_val = ret_val - offset;
+            }
+        }
+    } else {
+        err = 1;
+    }
+    return err;
+}
+
+/*
+ * RTC write function
+ * [in]
+ * t:UNIX timestamp value
+ * [out]
+ * None.
+ */
+void rtc_write(time_t t) {
+
+    struct tm *timeinfo = localtime(&t);
+    volatile uint16_t dummy_read;
+
+    if (rtc_isenabled() != 0) {
+        RTC.RCR2    = RCR2_VAL_ALLSTOP;
+        dummy_read  = (uint16_t)RTC.RCR2;
+        dummy_read  = (uint16_t)RTC.RCR2;
+        RTC.RCR2    = RCR2_VAL_RESET; // RESET = 1
+        dummy_read  = (uint16_t)RTC.RCR2;
+        dummy_read  = (uint16_t)RTC.RCR2;
+
+        RTC.RSECCNT = rtc_hex8_to_dec(timeinfo->tm_sec);
+        RTC.RMINCNT = rtc_hex8_to_dec(timeinfo->tm_min);
+        RTC.RHRCNT  = rtc_hex8_to_dec(timeinfo->tm_hour);
+        RTC.RDAYCNT = rtc_hex8_to_dec(timeinfo->tm_mday);
+        RTC.RMONCNT = rtc_hex8_to_dec(timeinfo->tm_mon + 1);
+        RTC.RYRCNT  = rtc_hex16_to_dec(timeinfo->tm_year + 1900);
+        dummy_read  = (uint16_t)RTC.RYRCNT;
+        dummy_read  = (uint16_t)RTC.RYRCNT;
+
+        RTC.RCR2    = RCR2_VAL_START; // START = 1
+
+        dummy_read  = (uint16_t)RTC.RCR2;
+        dummy_read  = (uint16_t)RTC.RCR2;
+    }
+}
+
+/*
+ * HEX to Dec(8bit) function for RTC.
+ * [in]
+ * hex_val:Hexadecimal value.
+ * [out]
+ * decimal value:From 0x00 to 0x99.
+ */
+static uint8_t rtc_hex8_to_dec(uint8_t hex_val) {
+    uint32_t calc_data;
+
+    calc_data  = hex_val / 10 * 0x10;
+    calc_data += hex_val % 10;
+
+    if (calc_data > 0x99) {
+        calc_data = 0;
+    }
+
+    return (uint8_t)calc_data;
+}
+
+/*
+ * HEX to Dec(16bit) function for RTC.
+ * [in]
+ * hex_val:Hexadecimal value.
+ * [out]
+ * decimal value:From 0x0000 to 0x9999.
+ */
+static uint16_t rtc_hex16_to_dec(uint16_t hex_val) {
+    uint32_t calc_data;
+    calc_data  =   hex_val / 1000       * 0x1000;
+    calc_data += ((hex_val / 100) % 10) * 0x100;
+    calc_data += ((hex_val / 10)  % 10) * 0x10;
+    calc_data +=   hex_val        % 10;
+
+    if (calc_data > 0x9999) {
+        calc_data = 0;
+    }
+    return (uint16_t)calc_data;
+
+}
+
+#endif /* DEVICE_RTC */
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/serial_api.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/serial_api.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/serial_api.c	(revision 270)
@@ -0,0 +1,636 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2015 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// math.h required for floating point operations for baud rate calculation
+#include "mbed_assert.h"
+#include <math.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "serial_api.h"
+#include "cmsis.h"
+#include "pinmap.h"
+#include "gpio_api.h"
+
+#include "scif_iodefine.h"
+#include "cpg_iodefine.h"
+
+/******************************************************************************
+ * INITIALIZATION
+ ******************************************************************************/
+#define PCLK (66666666)     // Define the peripheral clock P1 frequency.
+
+#define UART_NUM    8
+#define IRQ_NUM     2
+
+static void uart0_tx_irq(void);
+static void uart1_tx_irq(void);
+static void uart2_tx_irq(void);
+static void uart3_tx_irq(void);
+static void uart4_tx_irq(void);
+static void uart5_tx_irq(void);
+static void uart6_tx_irq(void);
+static void uart7_tx_irq(void);
+static void uart0_rx_irq(void);
+static void uart1_rx_irq(void);
+static void uart2_rx_irq(void);
+static void uart3_rx_irq(void);
+static void uart4_rx_irq(void);
+static void uart5_rx_irq(void);
+static void uart6_rx_irq(void);
+static void uart7_rx_irq(void);
+
+
+static const PinMap PinMap_UART_TX[] = {
+    {P2_14 , UART0, 6},
+    {P2_5  , UART1, 6},
+    {P4_12 , UART1, 7},
+    {P6_3  , UART2, 7},
+    {P4_14 , UART2, 7},
+    {P5_3  , UART3, 5},
+    {P8_8  , UART3, 7},
+    {P5_0  , UART4, 5},
+    {P8_14 , UART4, 7},
+    {P8_13 , UART5, 5},
+    {P11_10, UART5, 3},
+    {P6_6  , UART5, 5},
+    {P5_6  , UART6, 5},
+    {P11_1 , UART6, 4},
+    {P7_4  , UART7, 4},
+    {NC    , NC   , 0}
+};
+
+static const PinMap PinMap_UART_RX[] = {
+    {P2_15 , UART0, 6},
+    {P2_6  , UART1, 6},
+    {P4_13 , UART1, 7},
+    {P6_2  , UART2, 7},
+    {P4_15 , UART2, 7},
+    {P5_4  , UART3, 5},
+    {P8_9  , UART3, 7},
+    {P5_1  , UART4, 5},
+    {P8_15 , UART4, 7},
+    {P8_11 , UART5, 5},
+    {P11_11, UART5, 3},
+    {P6_7  , UART5, 5},
+    {P5_7  , UART6, 5},
+    {P11_2 , UART6, 4},
+    {P7_5  , UART7, 4},
+    {NC    , NC   , 0}
+};
+
+static const PinMap PinMap_UART_CTS[] = {
+    {P2_3  , UART1, 6},
+    {P11_7 , UART5, 3},
+    {P7_6  , UART7, 4},
+    {NC    , NC   , 0}
+};
+static const PinMap PinMap_UART_RTS[] = {
+    {P2_7  , UART1, 6},
+    {P11_8 , UART5, 3},
+    {P7_7  , UART7, 4},
+    {NC    , NC   , 0}
+};
+
+
+
+static const struct st_scif *SCIF[] = SCIF_ADDRESS_LIST;
+static uart_irq_handler irq_handler;
+
+int stdio_uart_inited = 0;
+serial_t stdio_uart;
+
+struct serial_global_data_s {
+    uint32_t serial_irq_id;
+    gpio_t sw_rts, sw_cts;
+    uint8_t count, rx_irq_set_flow, rx_irq_set_api;
+};
+
+static struct serial_global_data_s uart_data[UART_NUM];
+
+static const IRQn_Type irq_set_tbl[UART_NUM][IRQ_NUM] = {
+    {SCIFRXI0_IRQn, SCIFTXI0_IRQn},
+    {SCIFRXI1_IRQn, SCIFTXI1_IRQn},
+    {SCIFRXI2_IRQn, SCIFTXI2_IRQn},
+    {SCIFRXI3_IRQn, SCIFTXI3_IRQn},
+    {SCIFRXI4_IRQn, SCIFTXI4_IRQn},
+    {SCIFRXI5_IRQn, SCIFTXI5_IRQn},
+    {SCIFRXI6_IRQn, SCIFTXI6_IRQn},
+    {SCIFRXI7_IRQn, SCIFTXI7_IRQn}
+};
+
+static const IRQHandler hander_set_tbl[UART_NUM][IRQ_NUM] = {
+    {uart0_rx_irq, uart0_tx_irq},
+    {uart1_rx_irq, uart1_tx_irq},
+    {uart2_rx_irq, uart2_tx_irq},
+    {uart3_rx_irq, uart3_tx_irq},
+    {uart4_rx_irq, uart4_tx_irq},
+    {uart5_rx_irq, uart5_tx_irq},
+    {uart6_rx_irq, uart6_tx_irq},
+    {uart7_rx_irq, uart7_tx_irq}
+};
+
+static __IO uint16_t *SCSCR_MATCH[] = {
+    &SCSCR_0,
+    &SCSCR_1,
+    &SCSCR_2,
+    &SCSCR_3,
+    &SCSCR_4,
+    &SCSCR_5,
+    &SCSCR_6,
+    &SCSCR_7,
+};
+
+static __IO uint16_t *SCFSR_MATCH[] = {
+    &SCFSR_0,
+    &SCFSR_1,
+    &SCFSR_2,
+    &SCFSR_3,
+    &SCFSR_4,
+    &SCFSR_5,
+    &SCFSR_6,
+    &SCFSR_7,
+};
+
+
+void serial_init(serial_t *obj, PinName tx, PinName rx) {
+    volatile uint8_t dummy ;
+    int is_stdio_uart = 0;
+    // determine the UART to use
+    uint32_t uart_tx = pinmap_peripheral(tx, PinMap_UART_TX);
+    uint32_t uart_rx = pinmap_peripheral(rx, PinMap_UART_RX);
+    uint32_t uart = pinmap_merge(uart_tx, uart_rx);
+
+    MBED_ASSERT((int)uart != NC);
+
+    obj->uart = (struct st_scif *)SCIF[uart];
+    // enable power
+    switch (uart) {
+    case UART0:
+        CPG.STBCR4 &= ~(1 <<  7);
+        break;
+    case UART1:
+        CPG.STBCR4 &= ~(1 <<  6);
+        break;
+    case UART2:
+        CPG.STBCR4 &= ~(1 <<  5);
+        break;
+    case UART3:
+        CPG.STBCR4 &= ~(1 <<  4);
+        break;
+    case UART4:
+        CPG.STBCR4 &= ~(1 <<  3);
+        break;
+    case UART5:
+        CPG.STBCR4 &= ~(1 <<  2);
+        break;
+    case UART6:
+        CPG.STBCR4 &= ~(1 <<  1);
+        break;
+    case UART7:
+        CPG.STBCR4 &= ~(1 <<  0);
+        break;
+    }
+    dummy = CPG.STBCR4;
+
+    /* ==== SCIF initial setting ==== */
+    /* ---- Serial control register (SCSCR) setting ---- */
+    /* B'00 : Internal CLK */
+    obj->uart->SCSCR = 0x0000u;          /* SCIF transmitting and receiving operations stop */
+
+    /* ---- FIFO control register (SCFCR) setting ---- */
+    /* Transmit FIFO reset & Receive FIFO data register reset */
+    obj->uart->SCFCR = 0x0006;
+
+    /* ---- Serial status register (SCFSR) setting ---- */
+    dummy = obj->uart->SCFSR;
+    obj->uart->SCFSR = (dummy & 0xFF6Cu);         /* ER,BRK,DR bit clear */
+
+    /* ---- Line status register (SCLSR) setting ---- */
+    /* ORER bit clear */
+    obj->uart->SCLSR = 0;
+
+    /* ---- Serial extension mode register (SCEMR) setting ----
+    b7 BGDM - Baud rate generator double-speed mode  : Normal mode
+    b0 ABCS - Base clock select in asynchronous mode : Base clock is 16 times the bit rate */
+    obj->uart->SCEMR = 0x0000u;
+
+    /* ---- Bit rate register (SCBRR) setting ---- */
+    serial_baud  (obj, 9600);
+    serial_format(obj, 8, ParityNone, 1);
+
+    /* ---- FIFO control register (SCFCR) setting ---- */
+    obj->uart->SCFCR = 0x0030u;
+
+    /* ---- Serial port register (SCSPTR) setting ----
+    b1 SPB2IO - Serial port break output : disabled
+    b0 SPB2DT - Serial port break data   : High-level */
+    obj->uart->SCSPTR = 0x0003u;    // SPB2IO = 1, SPB2DT = 1
+
+    /* ---- Line status register (SCLSR) setting ----
+    b0 ORER - Overrun error detect : clear */
+
+    if (obj->uart->SCLSR & 0x0001) {
+        obj->uart->SCLSR = 0u;      // ORER clear
+    }
+
+    // pinout the chosen uart
+    pinmap_pinout(tx, PinMap_UART_TX);
+    pinmap_pinout(rx, PinMap_UART_RX);
+
+    switch (uart) {
+    case UART0:
+        obj->index = 0;
+        break;
+    case UART1:
+        obj->index = 1;
+        break;
+    case UART2:
+        obj->index = 2;
+        break;
+    case UART3:
+        obj->index = 3;
+        break;
+    case UART4:
+        obj->index = 4;
+        break;
+    case UART5:
+        obj->index = 5;
+        break;
+    case UART6:
+        obj->index = 6;
+        break;
+    case UART7:
+        obj->index = 7;
+        break;
+    }
+    uart_data[obj->index].sw_rts.pin = NC;
+    uart_data[obj->index].sw_cts.pin = NC;
+
+    /* ---- Serial control register (SCSCR) setting ---- */
+    /* Setting the TE and RE bits enables the TxD and RxD pins to be used. */
+    obj->uart->SCSCR = 0x00F0;
+
+    is_stdio_uart = (uart == STDIO_UART) ? (1) : (0);
+
+    if (is_stdio_uart) {
+        stdio_uart_inited = 1;
+        memcpy(&stdio_uart, obj, sizeof(serial_t));
+    }
+}
+
+void serial_free(serial_t *obj) {
+    uart_data[obj->index].serial_irq_id = 0;
+}
+
+// serial_baud
+// set the baud rate, taking in to account the current SystemFrequency
+void serial_baud(serial_t *obj, int baudrate) {
+    uint16_t DL;
+
+    obj->uart->SCSMR &= ~0x0003;
+
+    if (baudrate > 32552) {
+        obj->uart->SCEMR = 0x0081;  // BGDM = 1, ABCS = 1
+        DL = PCLK / (8 * baudrate);
+        if (DL > 0) {
+            DL--;
+        }
+        obj->uart->SCBRR = (uint8_t)DL;
+    } else if (baudrate > 16276) {
+        obj->uart->SCEMR = 0x0080;  // BGDM = 1
+        obj->uart->SCBRR = PCLK / (16 * baudrate) - 1;
+    } else if (baudrate > 8138) {
+        obj->uart->SCEMR = 0x0000;
+        obj->uart->SCBRR = PCLK / (32 * baudrate) - 1;
+    } else if (baudrate > 4169) {
+        obj->uart->SCSMR |= 0x0001;
+        obj->uart->SCEMR = 0x0080;  // BGDM = 1
+        obj->uart->SCBRR = PCLK / (64 * baudrate) - 1;
+    } else if (baudrate > 2034) {
+        obj->uart->SCSMR |= 0x0001;
+        obj->uart->SCEMR = 0x0000;
+        obj->uart->SCBRR = PCLK / (128 * baudrate) - 1;
+    } else if (baudrate > 1017) {
+        obj->uart->SCSMR |= 0x0002;
+        obj->uart->SCEMR = 0x0080;  // BGDM = 1
+        obj->uart->SCBRR = PCLK / (256 * baudrate) - 1;
+    } else if (baudrate > 508) {
+        obj->uart->SCSMR |= 0x0002;
+        obj->uart->SCEMR = 0x0000;
+        obj->uart->SCBRR = PCLK / (512 * baudrate) - 1;
+    } else if (baudrate > 254) {
+        obj->uart->SCSMR |= 0x0003;
+        obj->uart->SCEMR = 0x0080;  // BGDM = 1
+        obj->uart->SCBRR = PCLK / (1024 * baudrate) - 1;
+    } else if (baudrate > 127) {
+        obj->uart->SCSMR |= 0x0003;
+        obj->uart->SCEMR = 0x0000;
+        obj->uart->SCBRR = PCLK / (2048 * baudrate) - 1;
+    } else {
+        obj->uart->SCSMR |= 0x0003;
+        obj->uart->SCEMR = 0x0000;
+        obj->uart->SCBRR = 0xFFu;
+    }
+}
+
+void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_bits) {
+    int parity_enable;
+    int parity_select;
+
+    MBED_ASSERT((stop_bits == 1) || (stop_bits == 2)); // 0: 1 stop bits, 1: 2 stop bits
+    MBED_ASSERT((data_bits > 4) && (data_bits < 9)); // 5: 5 data bits ... 3: 8 data bits
+    MBED_ASSERT((parity == ParityNone) || (parity == ParityOdd) || (parity == ParityEven) ||
+                (parity == ParityForced1) || (parity == ParityForced0));
+
+    stop_bits = (stop_bits == 1)? 0:
+                (stop_bits == 2)? 1:
+                0; // must not to be
+
+    data_bits = (data_bits == 8)? 0:
+                (data_bits == 7)? 1:
+                0; // must not to be
+
+    switch (parity) {
+    case ParityNone:
+        parity_enable = 0;
+        parity_select = 0;
+        break;
+    case ParityOdd:
+        parity_enable = 1;
+        parity_select = 1;
+        break;
+    case ParityEven:
+        parity_enable = 1;
+        parity_select = 0;
+        break;
+    case ParityForced1:
+    case ParityForced0:
+    default:
+        parity_enable = 0;
+        parity_select = 0;
+        break;
+    }
+
+    obj->uart->SCSMR = data_bits          << 6
+                       | parity_enable    << 5
+                       | parity_select    << 4
+                       | stop_bits        << 3;
+}
+
+/******************************************************************************
+ * INTERRUPTS HANDLING
+ ******************************************************************************/
+
+static void uart_tx_irq(IRQn_Type irq_num, uint32_t index) {
+    __IO uint16_t *dmy_rd_scscr;
+    __IO uint16_t *dmy_rd_scfsr;
+
+    dmy_rd_scscr = SCSCR_MATCH[index];
+    *dmy_rd_scscr &= 0x007B;                    // Clear TIE and Write to bit15~8,2 is always 0
+    dmy_rd_scfsr = SCFSR_MATCH[index];
+    *dmy_rd_scfsr = (*dmy_rd_scfsr & ~0x0020);  // Clear TDFE
+
+    irq_handler(uart_data[index].serial_irq_id, TxIrq);
+}
+
+static void uart_rx_irq(IRQn_Type irq_num, uint32_t index) {
+    __IO uint16_t *dmy_rd_scscr;
+    __IO uint16_t *dmy_rd_scfsr;
+
+    dmy_rd_scscr = SCSCR_MATCH[index];
+    *dmy_rd_scscr &= 0x00B3;                    // Clear RIE,REIE and Write to bit15~8,2 is always 0
+    dmy_rd_scfsr = SCFSR_MATCH[index];
+    *dmy_rd_scfsr = (*dmy_rd_scfsr & ~0x0003);  // Clear RDF,DR
+
+    irq_handler(uart_data[index].serial_irq_id, RxIrq);
+}
+
+/* TX handler */
+static void uart0_tx_irq(void)  {
+    uart_tx_irq(SCIFTXI0_IRQn, 0);
+}
+static void uart1_tx_irq(void)  {
+    uart_tx_irq(SCIFTXI1_IRQn, 1);
+}
+static void uart2_tx_irq(void)  {
+    uart_tx_irq(SCIFTXI2_IRQn, 2);
+}
+static void uart3_tx_irq(void)  {
+    uart_tx_irq(SCIFTXI3_IRQn, 3);
+}
+static void uart4_tx_irq(void)  {
+    uart_tx_irq(SCIFTXI4_IRQn, 4);
+}
+static void uart5_tx_irq(void)  {
+    uart_tx_irq(SCIFTXI5_IRQn, 5);
+}
+static void uart6_tx_irq(void)  {
+    uart_tx_irq(SCIFTXI6_IRQn, 6);
+}
+static void uart7_tx_irq(void)  {
+    uart_tx_irq(SCIFTXI7_IRQn, 7);
+}
+/* RX handler */
+static void uart0_rx_irq(void)  {
+    uart_rx_irq(SCIFRXI0_IRQn, 0);
+}
+static void uart1_rx_irq(void)  {
+    uart_rx_irq(SCIFRXI1_IRQn, 1);
+}
+static void uart2_rx_irq(void)  {
+    uart_rx_irq(SCIFRXI2_IRQn, 2);
+}
+static void uart3_rx_irq(void)  {
+    uart_rx_irq(SCIFRXI3_IRQn, 3);
+}
+static void uart4_rx_irq(void)  {
+    uart_rx_irq(SCIFRXI4_IRQn, 4);
+}
+static void uart5_rx_irq(void)  {
+    uart_rx_irq(SCIFRXI5_IRQn, 5);
+}
+static void uart6_rx_irq(void)  {
+    uart_rx_irq(SCIFRXI6_IRQn, 6);
+}
+static void uart7_rx_irq(void)  {
+    uart_rx_irq(SCIFRXI7_IRQn, 7);
+}
+
+void serial_irq_handler(serial_t *obj, uart_irq_handler handler, uint32_t id) {
+    irq_handler = handler;
+    uart_data[obj->index].serial_irq_id = id;
+}
+
+static void serial_irq_set_internal(serial_t *obj, SerialIrq irq, uint32_t enable) {
+    IRQn_Type IRQn;
+    IRQHandler handler;
+
+    IRQn = irq_set_tbl[obj->index][irq];
+    handler = hander_set_tbl[obj->index][irq];
+
+    if ((obj->index >= 0) && (obj->index <= 7)) {
+        if (enable) {
+            InterruptHandlerRegister(IRQn, (void (*)(uint32_t))handler);
+            GIC_SetPriority(IRQn, 5);
+            GIC_EnableIRQ(IRQn);
+        } else {
+            GIC_DisableIRQ(IRQn);
+        }
+    }
+}
+
+void serial_irq_set(serial_t *obj, SerialIrq irq, uint32_t enable) {
+    if (RxIrq == irq) {
+        uart_data[obj->index].rx_irq_set_api = enable;
+    }
+    serial_irq_set_internal(obj, irq, enable);
+}
+
+static void serial_flow_irq_set(serial_t *obj, uint32_t enable) {
+    uart_data[obj->index].rx_irq_set_flow = enable;
+    serial_irq_set_internal(obj, RxIrq, enable);
+}
+
+/******************************************************************************
+ * READ/WRITE
+ ******************************************************************************/
+int serial_getc(serial_t *obj) {
+    uint16_t err_read;
+    int data;
+    int was_masked;
+
+    was_masked = __disable_irq();
+    if (obj->uart->SCFSR & 0x93) {
+        err_read = obj->uart->SCFSR;
+        obj->uart->SCFSR = (err_read & ~0x93);
+    }
+    obj->uart->SCSCR |= 0x0040;     // Set RIE
+    if (!was_masked) {
+        __enable_irq();
+    }
+
+    if (obj->uart->SCLSR & 0x0001) {
+        obj->uart->SCLSR = 0u;      // ORER clear
+    }
+
+    while (!serial_readable(obj));
+    data = obj->uart->SCFRDR & 0xff;
+
+    was_masked = __disable_irq();
+    err_read = obj->uart->SCFSR;
+    obj->uart->SCFSR = (err_read & 0xfffD);     // Clear RDF
+    if (!was_masked) {
+        __enable_irq();
+    }
+
+    if (err_read & 0x80) {
+        data = -1;  //err
+    }
+    return data;
+}
+
+void serial_putc(serial_t *obj, int c) {
+    uint16_t dummy_read;
+    int was_masked;
+
+    was_masked = __disable_irq();
+    obj->uart->SCSCR |= 0x0080;     // Set TIE
+    if (!was_masked) {
+        __enable_irq();
+    }
+    while (!serial_writable(obj));
+    obj->uart->SCFTDR = c;
+    was_masked = __disable_irq();
+    dummy_read = obj->uart->SCFSR;
+    obj->uart->SCFSR = (dummy_read & 0xff9f);  // Clear TEND/TDFE
+    if (!was_masked) {
+        __enable_irq();
+    }
+    uart_data[obj->index].count++;
+}
+
+int serial_readable(serial_t *obj) {
+    return ((obj->uart->SCFSR & 0x02) != 0);  // RDF
+}
+
+int serial_writable(serial_t *obj) {
+    return ((obj->uart->SCFSR & 0x20) != 0);  // TDFE
+}
+
+void serial_clear(serial_t *obj) {
+    int was_masked;
+    was_masked = __disable_irq();
+
+    obj->uart->SCFCR |=  0x06;          // TFRST = 1, RFRST = 1
+    obj->uart->SCFCR &= ~0x06;          // TFRST = 0, RFRST = 0
+    obj->uart->SCFSR &= ~0x0093u;       // ER, BRK, RDF, DR = 0
+
+    if (!was_masked) {
+        __enable_irq();
+    }
+}
+
+void serial_pinout_tx(PinName tx) {
+    pinmap_pinout(tx, PinMap_UART_TX);
+}
+
+void serial_break_set(serial_t *obj) {
+    int was_masked;
+    was_masked = __disable_irq();
+    // TxD Output(L)
+    obj->uart->SCSPTR &= ~0x0001u;  // SPB2DT = 0
+    obj->uart->SCSCR &= ~0x0020u;   // TE = 0 (Output disable)
+    if (!was_masked) {
+        __enable_irq();
+    }
+}
+
+void serial_break_clear(serial_t *obj) {
+    int was_masked;
+    was_masked = __disable_irq();
+    obj->uart->SCSCR |= 0x0020u; // TE = 1 (Output enable)
+    obj->uart->SCSPTR |= 0x0001u; // SPB2DT = 1
+    if (!was_masked) {
+        __enable_irq();
+    }
+}
+
+void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, PinName txflow) {
+    // determine the UART to use
+    int was_masked;
+
+    serial_flow_irq_set(obj, 0);
+
+    if (type == FlowControlRTSCTS) {
+        was_masked = __disable_irq();
+        obj->uart->SCFCR = 0x0008u;   // CTS/RTS enable
+        if (!was_masked) {
+            __enable_irq();
+        }
+        pinmap_pinout(rxflow, PinMap_UART_RTS);
+        pinmap_pinout(txflow, PinMap_UART_CTS);
+    } else {
+        was_masked = __disable_irq();
+        obj->uart->SCFCR = 0x0000u; // CTS/RTS diable
+        if (!was_masked) {
+            __enable_irq();
+        }
+    }
+}
+
+
+
+
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/spi_api.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/spi_api.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/spi_api.c	(revision 270)
@@ -0,0 +1,267 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "mbed_assert.h"
+#include <math.h>
+
+#include "spi_api.h"
+#include "cmsis.h"
+#include "pinmap.h"
+#include "mbed_error.h"
+#include "RZ_A1_Init.h"
+
+static const PinMap PinMap_SPI_SCLK[] = {
+    {P10_12, SPI_0, 4},
+    {P4_4  , SPI_1, 2},
+    {P11_12, SPI_1, 2},
+    {P8_3  , SPI_2, 3},
+    {NC    , NC   , 0}
+};
+
+static const PinMap PinMap_SPI_SSEL[] = {
+    {P10_13, SPI_0, 4},
+    {P4_5  , SPI_1, 2},
+    {P11_13, SPI_1, 2},
+    {P8_4  , SPI_2, 3},
+    {NC    , NC   , 0}
+};
+
+static const PinMap PinMap_SPI_MOSI[] = {
+    {P10_14, SPI_0, 4},
+    {P4_6  , SPI_1, 2},
+    {P11_14, SPI_1, 2},
+    {P8_5  , SPI_2, 3},
+    {NC    , NC   , 0}
+};
+
+static const PinMap PinMap_SPI_MISO[] = {
+    {P10_15, SPI_0, 4},
+    {P4_7  , SPI_1, 2},
+    {P11_15, SPI_1, 2},
+    {P8_6  , SPI_2, 3},
+    {NC    , NC   , 0}
+};
+
+static const struct st_rspi *RSPI[] = RSPI_ADDRESS_LIST;
+
+static inline void spi_disable(spi_t *obj);
+static inline void spi_enable(spi_t *obj);
+static inline int spi_readable(spi_t *obj);
+static inline void spi_write(spi_t *obj, int value);
+static inline int spi_read(spi_t *obj);
+
+void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk, PinName ssel) {
+    // determine the SPI to use
+    volatile uint8_t dummy;
+    uint32_t spi_mosi = pinmap_peripheral(mosi, PinMap_SPI_MOSI);
+    uint32_t spi_miso = pinmap_peripheral(miso, PinMap_SPI_MISO);
+    uint32_t spi_sclk = pinmap_peripheral(sclk, PinMap_SPI_SCLK);
+    uint32_t spi_ssel = pinmap_peripheral(ssel, PinMap_SPI_SSEL);
+    uint32_t spi_data = pinmap_merge(spi_mosi, spi_miso);
+    uint32_t spi_cntl = pinmap_merge(spi_sclk, spi_ssel);
+    uint32_t spi      = pinmap_merge(spi_data, spi_cntl);
+
+    MBED_ASSERT((int)spi != NC);
+
+    obj->spi = (struct st_rspi *)RSPI[spi];
+
+    // enable power and clocking
+    switch (spi) {
+        case SPI_0: CPGSTBCR10 &= ~(0x80); break;
+        case SPI_1: CPGSTBCR10 &= ~(0x40); break;
+        case SPI_2: CPGSTBCR10 &= ~(0x20); break;
+    }
+    dummy = CPGSTBCR10;
+
+    obj->spi->SPCR   = 0x00;  // CTRL to 0
+    obj->spi->SPSCR  = 0x00;  // no sequential operation
+    obj->spi->SSLP   = 0x00;  // SSL 'L' active 
+    obj->spi->SPDCR  = 0x20;  // byte access
+    obj->spi->SPCKD  = 0x00;  // SSL -> enable CLK delay : 1RSPCK
+    obj->spi->SSLND  = 0x00;  // CLK end -> SSL neg delay : 1RSPCK
+    obj->spi->SPND   = 0x00;  // delay between CMD : 1RSPCK + 2P1CLK
+    obj->spi->SPPCR  = 0x20;  // MOSI Idle fixed value equals 0
+    obj->spi->SPBFCR = 0xf0;  // and set trigger count: read 1, write 1
+    obj->spi->SPBFCR = 0x30;  // and reset buffer
+
+    // pin out the spi pins
+    pinmap_pinout(mosi, PinMap_SPI_MOSI);
+    pinmap_pinout(miso, PinMap_SPI_MISO);
+    pinmap_pinout(sclk, PinMap_SPI_SCLK);
+    if ((int)ssel != NC) {
+        pinmap_pinout(ssel, PinMap_SPI_SSEL);
+    }
+}
+
+void spi_free(spi_t *obj) {}
+
+void spi_format(spi_t *obj, int bits, int mode, int slave) {
+    int      DSS;      // DSS (data select size)
+    int      polarity  = (mode & 0x2) ? 1 : 0;
+    int      phase     = (mode & 0x1) ? 1 : 0;
+    uint16_t tmp       = 0;
+    uint16_t mask      = 0xf03;
+    uint16_t wk_spcmd0;
+    uint8_t  splw;
+
+    switch (mode) {
+        case 0:
+        case 1:
+        case 2:
+        case 3:
+            // Do Nothing
+            break;
+        default:
+            error("SPI format error");
+            return;
+    }
+
+    switch (bits) {
+        case 8:
+            DSS  = 0x7;
+            splw = 0x20;
+            break;
+        case 16:
+            DSS  = 0xf;
+            splw = 0x40;
+            break;
+        case 32:
+            DSS  = 0x2;
+            splw = 0x60;
+            break;
+        default:
+            error("SPI module don't support other than 8/16/32bits");
+            return;
+    }
+    tmp |= phase;
+    tmp |= (polarity << 1);
+    tmp |= (DSS << 8);
+    obj->bits = bits;
+
+    spi_disable(obj);
+    wk_spcmd0 = obj->spi->SPCMD0;
+    wk_spcmd0 &= ~mask;
+    wk_spcmd0 |= (mask & tmp);
+    obj->spi->SPCMD0 = wk_spcmd0;
+    obj->spi->SPDCR   = splw;
+    if (slave) {
+        obj->spi->SPCR &=~(1 << 3);  // MSTR to 0
+    } else {
+        obj->spi->SPCR |= (1 << 3);  // MSTR to 1
+    }
+    spi_enable(obj);
+}
+
+void spi_frequency(spi_t *obj, int hz) {
+    uint32_t  pclk_base;
+    uint32_t  div;
+    uint32_t  brdv = 0;
+    uint32_t  hz_max;
+    uint32_t  hz_min;
+    uint16_t  mask = 0x000c;
+    uint16_t  wk_spcmd0;
+
+    /* set PCLK */
+    if (RZ_A1_IsClockMode0() == false) {
+        pclk_base = CM1_RENESAS_RZ_A1_P1_CLK;
+    } else {
+        pclk_base = CM0_RENESAS_RZ_A1_P1_CLK;
+    }
+
+    hz_min = pclk_base / 2 / 256 / 8;
+    hz_max = pclk_base / 2;
+    if ((hz < hz_min) || (hz > hz_max)) {
+        error("Couldn't setup requested SPI frequency");
+        return;
+    }
+
+    div = (pclk_base / hz / 2);
+    while (div > 256) {
+        div >>= 1;
+        brdv++;
+    }
+    div  -= 1;
+    brdv  = (brdv << 2);
+
+    spi_disable(obj);
+    obj->spi->SPBR = div;
+    wk_spcmd0 = obj->spi->SPCMD0;
+    wk_spcmd0 &= ~mask;
+    wk_spcmd0 |= (mask & brdv);
+    obj->spi->SPCMD0 = wk_spcmd0;
+    spi_enable(obj);
+}
+
+static inline void spi_disable(spi_t *obj) {
+    obj->spi->SPCR &= ~(1 << 6);       // SPE to 0
+}
+
+static inline void spi_enable(spi_t *obj) {
+    obj->spi->SPCR |=  (1 << 6);       // SPE to 1
+}
+
+static inline int spi_readable(spi_t *obj) {
+    return obj->spi->SPSR & (1 << 7);  // SPRF
+}
+
+static inline int spi_tend(spi_t *obj) {
+    return obj->spi->SPSR & (1 << 6);  // TEND
+}
+
+static inline void spi_write(spi_t *obj, int value) {
+    if (obj->bits == 8) {
+        obj->spi->SPDR.UINT8[0]  = (uint8_t)value;
+    } else if (obj->bits == 16) {
+        obj->spi->SPDR.UINT16[0] = (uint16_t)value;
+    } else {
+        obj->spi->SPDR.UINT32    = (uint32_t)value;
+    }
+}
+
+static inline int spi_read(spi_t *obj) {
+    int read_data;
+
+    if (obj->bits == 8) {
+        read_data = obj->spi->SPDR.UINT8[0];
+    } else if (obj->bits == 16) {
+        read_data = obj->spi->SPDR.UINT16[0];
+    } else {
+        read_data = obj->spi->SPDR.UINT32;
+    }
+
+    return read_data;
+}
+
+int spi_master_write(spi_t *obj, int value) {
+    spi_write(obj, value);
+    while(!spi_tend(obj));
+    return spi_read(obj);
+}
+
+int spi_slave_receive(spi_t *obj) {
+    return (spi_readable(obj) && !spi_busy(obj)) ? (1) : (0);
+}
+
+int spi_slave_read(spi_t *obj) {
+    return spi_read(obj);
+}
+
+void spi_slave_write(spi_t *obj, int value) {
+    spi_write(obj, value);
+}
+
+int spi_busy(spi_t *obj) {
+    return 0;
+}
Index: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/us_ticker.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/us_ticker.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/us_ticker.c	(revision 270)
@@ -0,0 +1,135 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <stddef.h>
+#include "us_ticker_api.h"
+#include "PeripheralNames.h"
+#include "ostm_iodefine.h"
+
+#include "RZ_A1_Init.h"
+#include "MBRZA1H.h"
+
+#define US_TICKER_TIMER_IRQn (OSTMI1TINT_IRQn)
+#define CPG_STBCR5_BIT_MSTP50   (0x01u) /* OSTM1 */
+
+#define US_TICKER_CLOCK_US_DEV (1000000)
+
+int us_ticker_inited = 0;
+static double count_clock = 0;
+static uint32_t last_read = 0;
+static uint32_t wrap_arround = 0;
+static uint64_t ticker_us_last64 = 0;
+
+void us_ticker_interrupt(void) {
+    us_ticker_irq_handler();
+}
+
+void us_ticker_init(void) {
+    if (us_ticker_inited) return;
+    us_ticker_inited = 1;
+
+    /* set Counter Clock(us) */
+    if (false == RZ_A1_IsClockMode0()) {
+        count_clock = ((double)CM1_RENESAS_RZ_A1_P0_CLK / (double)US_TICKER_CLOCK_US_DEV);
+    } else {
+        count_clock = ((double)CM0_RENESAS_RZ_A1_P0_CLK / (double)US_TICKER_CLOCK_US_DEV);
+    }
+
+    /* Power Control for Peripherals      */
+    CPGSTBCR5 &= ~(CPG_STBCR5_BIT_MSTP50); /* enable OSTM1 clock */
+
+    // timer settings
+    OSTM1TT   = 0x01;    /* Stop the counter and clears the OSTM1TE bit.     */
+    OSTM1CTL  = 0x02;    /* Free running timer mode. Interrupt disabled when star counter  */
+
+    OSTM1TS   = 0x1;    /* Start the counter and sets the OSTM0TE bit.     */
+
+    // INTC settings
+    InterruptHandlerRegister(US_TICKER_TIMER_IRQn, (void (*)(uint32_t))us_ticker_interrupt);
+    GIC_SetPriority(US_TICKER_TIMER_IRQn, 5);
+    GIC_EnableIRQ(US_TICKER_TIMER_IRQn);
+}
+
+static uint64_t ticker_read_counter64(void) {
+    uint32_t cnt_val;
+    uint64_t cnt_val64;
+
+    if (!us_ticker_inited)
+        us_ticker_init();
+
+    /* read counter */
+    cnt_val = OSTM1CNT;
+    if (last_read > cnt_val) {
+        wrap_arround++;
+    }
+    last_read = cnt_val;
+    cnt_val64 = ((uint64_t)wrap_arround << 32) + cnt_val;
+
+    return cnt_val64;
+}
+
+uint32_t us_ticker_read() {
+    uint64_t cnt_val64;
+    uint64_t us_val64;
+    int check_irq_masked;
+
+    check_irq_masked = __disable_irq();
+
+    cnt_val64        = ticker_read_counter64();
+    us_val64         = (cnt_val64 / count_clock);
+    ticker_us_last64 = us_val64;
+
+    if (!check_irq_masked) {
+        __enable_irq();
+    }
+
+    /* clock to us */
+    return (uint32_t)us_val64;
+}
+
+void us_ticker_set_interrupt(timestamp_t timestamp) {
+    // set match value
+    uint64_t timestamp64;
+    uint64_t set_cmp_val64;
+    volatile uint32_t set_cmp_val;
+    uint64_t count_val_64;
+
+    /* calc compare mach timestamp */
+    timestamp64 = (ticker_us_last64 & 0xFFFFFFFF00000000) + timestamp;
+    if (timestamp < (ticker_us_last64 & 0x00000000FFFFFFFF)) {
+        /* This event is wrap arround */
+        timestamp64 += 0x100000000;
+    }
+
+    /* calc compare mach timestamp */
+    set_cmp_val64  = timestamp64 * count_clock;
+    set_cmp_val    = (uint32_t)(set_cmp_val64 & 0x00000000FFFFFFFF);
+    count_val_64   = ticker_read_counter64();
+    if (set_cmp_val64 <= (count_val_64 + 500)) {
+        GIC_SetPendingIRQ(US_TICKER_TIMER_IRQn);
+        GIC_EnableIRQ(US_TICKER_TIMER_IRQn);
+        return;
+    }
+    OSTM1CMP = set_cmp_val;
+    GIC_EnableIRQ(US_TICKER_TIMER_IRQn);
+}
+
+void us_ticker_disable_interrupt(void) {
+    GIC_DisableIRQ(US_TICKER_TIMER_IRQn);
+}
+
+void us_ticker_clear_interrupt(void) {
+    GIC_ClearPendingIRQ(US_TICKER_TIMER_IRQn);
+}
Index: EcnlProtoTool/trunk/asp3_dcre/sample/Makefile
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/sample/Makefile	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/sample/Makefile	(revision 270)
@@ -0,0 +1,622 @@
+#
+#  TOPPERS/ASP Kernel
+#      Toyohashi Open Platform for Embedded Real-Time Systems/
+#      Advanced Standard Profile Kernel
+# 
+#  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+# 
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+# 
+#  $Id: Makefile 735 2016-04-03 14:11:07Z ertl-hiro $
+# 
+
+#
+#  ã¿ã¼ã²ããã®æå®ï¼Makefile.targetã§ä¸æ¸ããããã®ãé²ãããï¼
+#
+all:
+
+#
+#  ã¿ã¼ã²ããç¥ç§°ã®å®ç¾©
+#
+TARGET = @(TARGET)
+
+#
+#  ãã­ã°ã©ãã³ã°è¨èªã®å®ç¾©
+#
+SRCLANG = @(SRCLANG)
+ifeq ($(SRCLANG),c)
+	LIBS = -lc
+endif
+ifeq ($(SRCLANG),c++)
+	USE_CXX = true
+	CXXLIBS = -lstdc++ -lm -lc
+	CXXRTS = cxxrt.o newlibrt.o
+endif
+
+#
+#  ã½ã¼ã¹ãã¡ã¤ã«ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+SRCDIR = @(SRCDIR)
+
+#
+#  ãªãã¸ã§ã¯ããã¡ã¤ã«åã®æ¡å¼µå­ã®è¨­å®
+#
+OBJEXT = @(OBJEXT)
+
+#
+#  ã«ã¼ãã«ã©ã¤ãã©ãªï¼libkernel.aï¼ã®ãã£ã¬ã¯ããªå
+#  ï¼ã«ã¼ãã«ã©ã¤ãã©ãªãmakeå¯¾è±¡ã«ããæã¯ï¼ç©ºã«å®ç¾©ããï¼
+#
+KERNEL_LIB = @(KERNEL_LIB)
+
+#
+#  ã«ã¼ãã«ãé¢æ°åä½ã§ã³ã³ãã¤ã«ãããã©ããã®å®ç¾©
+#
+KERNEL_FUNCOBJS = @(KERNEL_FUNCOBJS)
+
+#
+#  TECSãå¤ããã©ããã®å®ç¾©
+#
+OMIT_TECS = @(OMIT_TECS)
+
+#
+#  ãã¬ã¼ã¹ã­ã°ãåå¾ãããã©ããã®å®ç¾©
+#
+ENABLE_TRACE = @(ENABLE_TRACE)
+
+#
+#  éçºãã¼ã«ï¼ã³ã³ãã¤ã©ç­ï¼ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+DEVTOOLDIR = @(DEVTOOLDIR)
+
+#
+#  ã¦ã¼ãã£ãªãã£ãã­ã°ã©ã ã®åç§°
+#
+CFG = @(CFG)
+TECSGEN = @(TECSGEN)
+
+#
+#  ãªãã¸ã§ã¯ããã¡ã¤ã«åã®å®ç¾©
+#
+OBJNAME = asp
+ifdef OBJEXT
+	OBJFILE = $(OBJNAME).$(OBJEXT)
+	CFG1_OUT = cfg1_out.$(OBJEXT)
+else
+	OBJFILE = $(OBJNAME)
+	CFG1_OUT = cfg1_out
+endif
+
+#
+#  ä¾å­é¢ä¿ãã¡ã¤ã«ãç½®ããã£ã¬ã¯ããªã®å®ç¾©
+#
+DEPDIR = @(DEPDIR)
+
+#
+#  ã¿ã¼ã²ããä¾å­é¨ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+TARGETDIR = $(SRCDIR)/target/$(TARGET)
+
+#
+#  ã¿ã¼ã²ããä¾å­ã®å®ç¾©ã®ã¤ã³ã¯ã«ã¼ã
+#
+include $(TARGETDIR)/Makefile.target
+
+#
+#  TECSçæãã¡ã¤ã«ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+TECSGENDIR = ./gen
+ifndef OMIT_TECS
+	TECSGEN_TIMESTAMP = $(TECSGENDIR)/tecsgen.timestamp
+	INIT_TECS_COBJ = init_tecs.o
+endif
+
+#
+#  TECSãçæããå®ç¾©ã®ã¤ã³ã¯ã«ã¼ã
+#
+ifndef OMIT_TECS
+	GEN_DIR = $(TECSGENDIR)
+	-include $(TECSGENDIR)/Makefile.tecsgen
+endif
+
+#
+#  mbedãµã¼ãã¹ã®å®ç¾©
+#
+
+include $(SRCDIR)/mbed/Makefile.mbed
+
+#
+#  å
+±éã³ã³ãã¤ã«ãªãã·ã§ã³ã®å®ç¾©
+#
+COPTS := -g @(COPTS) $(COPTS)
+ifndef OMIT_WARNING_ALL
+	COPTS := -Wall $(COPTS)
+endif
+ifndef OMIT_OPTIMIZATION
+	COPTS := -O2 $(COPTS)
+endif
+ifdef OMIT_TECS
+	CDEFS := -DTOPPERS_OMIT_TECS $(CDEFS)
+endif
+CDEFS := $(CDEFS) @(CDEFS)
+INCLUDES := -I. -I$(SRCDIR)/include $(INCLUDES) -I$(SRCDIR)
+LDFLAGS := $(LDFLAGS) @(LDFLAGS)
+LIBS := $(LIBS) $(CXXLIBS)
+CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
+
+#
+#  ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ã«é¢ããå®ç¾©
+#
+APPLNAME = @(APPLNAME)
+APPLDIRS = @(APPLDIRS)
+APPL_CFG = @(CFGFILE)
+APPL_CDL = @(CDLFILE)
+
+APPL_DIRS := $(APPLDIRS) $(SRCDIR)/library
+APPL_ASMOBJS :=
+ifdef USE_CXX
+	APPL_CXXOBJS := @(APPLOBJS)
+	APPL_COBJS :=
+else
+	APPL_COBJS := @(APPLOBJS)
+endif
+APPL_COBJS := $(APPL_COBJS) log_output.o vasyslog.o t_perror.o strerror.o
+APPL_CFLAGS := $(APPL_CFLAGS)
+ifdef APPLDIRS
+	INCLUDES := $(INCLUDES) $(foreach dir,$(APPLDIRS),-I$(dir))
+endif
+
+#
+#  ãããã¯ã¼ã¯ãµã¼ãã¹ã®å®ç¾©
+#
+
+NO_USE_TINET_LIBRARY = true
+
+#  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®é¸æãä½ããä¸ã¤é¸æããã
+
+NET_IF = ether
+
+#  ã¤ã¼ãµãããã»ãã£ãã¤ã¹ãã©ã¤ãã®é¸æ
+
+NET_DEV = if_mbed
+
+#  ãããã¯ã¼ã¯å±¤ã®é¸æ
+
+#SUPPORT_INET6 = true
+SUPPORT_INET4 = true
+
+#  API ã«çµè¾¼ãæ©è½ã®é¸æ
+
+#API_CFG_IP4MAPPED_ADDR = true
+
+#  ãã©ã³ã¹ãã¼ãå±¤ã®é¸æ
+
+SUPPORT_TCP = true
+#SUPPORT_UDP = true
+
+#
+#  ã·ã¹ãã ãµã¼ãã¹ã® Makefile ã®ã¤ã³ã¯ã«ã¼ã
+#
+include $(SRCDIR)/tinet/Makefile.tinet
+
+#
+#  ã·ã¹ãã ãµã¼ãã¹ã«é¢ããå®ç¾©
+#
+SYSSVC_DIRS := $(TECSGENDIR) $(SRCDIR)/tecs_kernel \
+				$(SYSSVC_DIRS) $(SRCDIR)/syssvc
+SYSSVC_ASMOBJS := $(SYSSVC_ASMOBJS)
+SYSSVC_COBJS := $(INIT_TECS_COBJ) $(TECS_COBJS) $(SYSSVC_COBJS) \
+				@(SYSSVCOBJS) $(CXXRTS)
+SYSSVC_CFLAGS := $(SYSSVC_CFLAGS)
+INCLUDES := $(INCLUDES) -I$(TECSGENDIR) -I$(SRCDIR)/tecs_kernel
+
+#
+#  ã¿ã¼ã²ãããã¡ã¤ã«
+#
+.PHONY: all
+ifndef OMIT_TECS
+all: tecs
+#	@$(MAKE) check
+	@$(MAKE) check $(OBJNAME).bin
+#	@$(MAKE) check $(OBJNAME).srec
+else
+#all: check
+all: check $(OBJNAME).bin
+#all: check $(OBJNAME).srec
+endif
+
+##### ä»¥ä¸ã¯ç·¨éããªããã¨ #####
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«é¢ããå®ç¾©
+#
+CFG_TABS := --api-table $(SRCDIR)/tinet/tcpip_api.def:tcpip \
+			--api-table $(SRCDIR)/kernel/kernel_api.def:kernel \
+			--symval-table $(SRCDIR)/tinet/tcpip_sym.def \
+			--symval-table $(SRCDIR)/kernel/kernel_sym.def $(CFG_TABS)
+CFG_ASMOBJS := $(CFG_ASMOBJS)
+CFG_COBJS := kernel_cfg.o $(CFG_COBJS)
+CFG_OBJS := $(CFG_ASMOBJS) $(CFG_COBJS)
+CFG2_OUT_SRCS := kernel_cfg.h kernel_cfg.c $(CFG2_OUT_SRCS)
+CFG_CFLAGS := -DTOPPERS_CB_TYPE_ONLY $(CFG_CFLAGS)
+
+#
+#  ã«ã¼ãã«ã«é¢ããå®ç¾©
+#
+#  KERNEL_ASMOBJS: ã«ã¼ãã«ã©ã¤ãã©ãªã«å«ããï¼ã½ã¼ã¹ãã¢ã»ã³ããªè¨èªã®
+#				   ãªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#  KERNEL_COBJS: ã«ã¼ãã«ã®ã©ã¤ãã©ãªã«å«ããï¼ã½ã¼ã¹ãCè¨èªã§ï¼ã½ã¼ã¹
+#				 ãã¡ã¤ã«ã¨1å¯¾1ã«å¯¾å¿ãããªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#  KERNEL_LCSRCS: ã«ã¼ãã«ã®ã©ã¤ãã©ãªã«å«ããCè¨èªã®ã½ã¼ã¹ãã¡ã¤ã«ã§ï¼
+#				  1ã¤ã®ã½ã¼ã¹ãã¡ã¤ã«ããè¤æ°ã®ãªãã¸ã§ã¯ããã¡ã¤ã«ãç
+#				  æãããã®ï¼
+#  KERNEL_LCOBJS: ä¸ã®ã½ã¼ã¹ãã¡ã¤ã«ããçæããããªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#
+KERNEL_DIRS := $(KERNEL_DIRS) $(SRCDIR)/kernel
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS)
+KERNEL_COBJS := $(KERNEL_COBJS)
+KERNEL_CFLAGS := $(KERNEL_CFLAGS) -I$(SRCDIR)/kernel
+
+#
+#  ã«ã¼ãã«ã®ãã¡ã¤ã«æ§æã®å®ç¾©
+#
+include $(SRCDIR)/kernel/Makefile.kernel
+ifdef KERNEL_FUNCOBJS
+	KERNEL_LCSRCS := $(KERNEL_FCSRCS)
+	KERNEL_LCOBJS := $(foreach file,$(KERNEL_FCSRCS),$($(file:.c=)))
+else
+	KERNEL_CFLAGS := -DALLFUNC $(KERNEL_CFLAGS)
+	KERNEL_COBJS := $(KERNEL_COBJS) \
+					$(foreach file,$(KERNEL_FCSRCS),$(file:.c=.o))
+endif
+ifdef OMIT_OFFSET_H
+	OFFSET_H =
+else
+	OFFSET_H = offset.h
+endif
+ifndef TARGET_OFFSET_TRB
+	TARGET_OFFSET_TRB := $(TARGETDIR)/target_offset.trb
+endif
+ifndef TARGET_KERNEL_TRB
+	TARGET_KERNEL_TRB := $(TARGETDIR)/target_kernel.trb
+endif
+ifndef TARGET_CHECK_TRB
+	TARGET_CHECK_TRB := $(TARGETDIR)/target_check.trb
+endif
+ifndef TARGET_KERNEL_CFG
+	TARGET_KERNEL_CFG := $(TARGETDIR)/target_kernel.cfg
+endif
+ifndef TARGET_TCPIP_TRB
+	TARGET_TCPIP_TRB := $(SRCDIR)/tinet/tinet.trb
+endif
+
+#
+#  ã½ã¼ã¹ãã¡ã¤ã«ã®ãããã£ã¬ã¯ããªã«é¢ããå®ç¾©
+#
+vpath %.c $(KERNEL_DIRS) $(SYSSVC_DIRS) $(APPL_DIRS)
+vpath %.S $(KERNEL_DIRS) $(SYSSVC_DIRS) $(APPL_DIRS)
+vpath %.cfg $(APPL_DIRS)
+vpath %.cdl $(APPL_DIRS)
+
+#
+#  ã³ã³ãã¤ã«ã®ããã®å¤æ°ã®å®ç¾©
+#
+KERNEL_LIB_OBJS = $(KERNEL_ASMOBJS) $(KERNEL_COBJS) $(KERNEL_LCOBJS)
+SYSSVC_OBJS = $(SYSSVC_ASMOBJS) $(SYSSVC_COBJS)
+APPL_OBJS = $(APPL_ASMOBJS) $(APPL_COBJS) $(APPL_CXXOBJS)
+ALL_OBJS = $(START_OBJS) $(APPL_OBJS) $(SYSSVC_OBJS) $(CFG_OBJS) \
+											$(END_OBJS) $(HIDDEN_OBJS)
+ALL_LIBS = -lkernel $(LIBS)
+ifdef KERNEL_LIB
+	LIBS_DEP = $(KERNEL_LIB)/libkernel.a $(filter %.a,$(LIBS))
+	OBJ_LDFLAGS := $(OBJ_LDFLAGS) -L$(KERNEL_LIB)
+	REALCLEAN_FILES := libkernel.a $(REALCLEAN_FILES)
+else
+	LIBS_DEP = libkernel.a $(filter %.a,$(LIBS))
+	OBJ_LDFLAGS := $(OBJ_LDFLAGS) -L.
+endif
+
+ifdef TEXT_START_ADDRESS
+	LDFLAGS := $(LDFLAGS) -Wl,-Ttext,$(TEXT_START_ADDRESS)
+endif
+ifdef DATA_START_ADDRESS
+	LDFLAGS := $(LDFLAGS) -Wl,-Tdata,$(DATA_START_ADDRESS)
+endif
+ifdef LDSCRIPT
+	LDFLAGS := $(LDFLAGS) -T $(LDSCRIPT)
+endif
+
+#
+#  tecsgenããCããªãã­ã»ããµãå¼ã³åºãéã®ãªãã·ã§ã³ã®å®ç¾©
+#
+TECS_CPP = $(CC) $(CDEFS) $(INCLUDES) $(SYSSVC_CFLAGS) -D TECSGEN -E
+
+#
+#  tecsgenã®å¼åºã
+#
+.PHONY: tecs
+tecs $(TECSGEN_SRCS) $(TECS_HEADERS): $(TECSGEN_TIMESTAMP) ;
+$(TECSGEN_TIMESTAMP): $(APPL_CDL) $(TECS_IMPORTS)
+	$(TECSGEN) $< -R $(INCLUDES) --cpp "$(TECS_CPP)" -g $(TECSGENDIR)
+
+#
+#  ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®çæ
+#
+cfg1_out.c cfg1_out.db: cfg1_out.timestamp ;
+cfg1_out.timestamp: $(APPL_CFG) $(TECSGEN_TIMESTAMP)
+	$(CFG) --pass 1 --kernel asp $(INCLUDES) $(CFG_TABS) \
+						-M $(DEPDIR)/cfg1_out_c.d $(TARGET_KERNEL_CFG) $<
+
+$(CFG1_OUT): $(START_OBJS) cfg1_out.o $(CFG_DMY) $(END_OBJS) $(HIDDEN_OBJS)
+	$(LINK) $(CFLAGS) $(LDFLAGS) $(CFG1_OUT_LDFLAGS) -o $(CFG1_OUT) \
+						$(START_OBJS) cfg1_out.o $(CFG_DMY) $(END_OBJS)
+
+cfg1_out.syms: $(CFG1_OUT)
+	$(NM) -n $(CFG1_OUT) > cfg1_out.syms
+
+cfg1_out.srec: $(CFG1_OUT)
+	$(OBJCOPY) -O srec -S $(CFG1_OUT) cfg1_out.srec
+
+$(CFG2_OUT_SRCS) cfg2_out.db: kernel_cfg.timestamp ;
+kernel_cfg.timestamp: cfg1_out.db cfg1_out.syms cfg1_out.srec
+	$(CFG) --pass 2 --kernel asp $(INCLUDES) -T $(TARGET_TCPIP_TRB):tcpip -T $(TARGET_KERNEL_TRB):kernel
+
+#
+#  ãªãã»ãããã¡ã¤ã«ï¼offset.hï¼ã®çæè¦å
+#
+$(OFFSET_H): offset.timestamp ;
+offset.timestamp: cfg1_out.db cfg1_out.syms cfg1_out.srec
+	$(CFG) --pass 2 -O --kernel asp $(INCLUDES) -T $(TARGET_OFFSET_TRB) \
+				--rom-symbol cfg1_out.syms --rom-image cfg1_out.srec
+
+#
+#  ã«ã¼ãã«ã©ã¤ãã©ãªãã¡ã¤ã«ã®çæ
+#
+libkernel.a: $(OFFSET_H) $(KERNEL_LIB_OBJS)
+	rm -f libkernel.a
+	$(AR) -rcs libkernel.a $(KERNEL_LIB_OBJS)
+	$(RANLIB) libkernel.a
+
+#
+#  ç¹å¥ãªä¾å­é¢ä¿ã®å®ç¾©
+#
+tBannerMain.o: $(filter-out tBannerMain.o,$(ALL_OBJS)) $(LIBS_DEP)
+
+#
+#  å
+¨ä½ã®ãªã³ã¯
+#
+$(OBJFILE): $(ALL_OBJS) $(LIBS_DEP)
+	$(LINK) $(CFLAGS) $(LDFLAGS) $(OBJ_LDFLAGS) -o $(OBJFILE) \
+			$(START_OBJS) $(APPL_OBJS) $(SYSSVC_OBJS) $(CFG_OBJS) \
+			$(ALL_LIBS) $(END_OBJS)
+
+#
+#  ã·ã³ãã«ãã¡ã¤ã«ã®çæ
+#
+$(OBJNAME).syms: $(OBJFILE)
+	$(NM) -n $(OBJFILE) > $(OBJNAME).syms
+
+#
+#  ãã¤ããªãã¡ã¤ã«ã®çæ
+#
+$(OBJNAME).bin: $(OBJFILE)
+	$(OBJCOPY) -O binary -S $(OBJFILE) $(OBJNAME).bin
+
+#
+#  Sã¬ã³ã¼ããã¡ã¤ã«ã®çæ
+#
+$(OBJNAME).srec: $(OBJFILE)
+	$(OBJCOPY) -O srec -S $(OBJFILE) $(OBJNAME).srec
+
+#
+#  ã¨ã©ã¼ãã§ãã¯å¦ç
+#
+.PHONY: check
+check: check.timestamp ;
+check.timestamp: cfg2_out.db $(OBJNAME).syms $(OBJNAME).srec
+	$(CFG) --pass 3 --kernel asp -O $(INCLUDES) -T $(TARGET_CHECK_TRB) \
+				--rom-symbol $(OBJNAME).syms --rom-image $(OBJNAME).srec
+	@echo "configuration check passed"
+
+#
+#  ã³ã³ãã¤ã«çµæã®æ¶å»
+#
+.PHONY: clean
+clean:
+	rm -f \#* *~ *.o $(DEPDIR)/*.d $(CLEAN_FILES) check.timestamp
+	rm -f $(OBJFILE) $(OBJNAME).syms $(OBJNAME).srec $(OBJNAME).bin
+	rm -f kernel_cfg.timestamp $(CFG2_OUT_SRCS) cfg2_out.db
+	rm -f offset.timestamp $(OFFSET_H)
+	rm -f cfg1_out.syms cfg1_out.srec $(CFG1_OUT)
+	rm -f cfg1_out.timestamp cfg1_out.c cfg1_out.db
+	rm -rf $(TECSGENDIR)
+ifndef KERNEL_LIB
+	rm -f libkernel.a
+endif
+
+.PHONY: cleankernel
+cleankernel:
+	rm -f $(OFFSET_H) $(KERNEL_LIB_OBJS)
+	rm -f $(KERNEL_LIB_OBJS:%.o=$(DEPDIR)/%.d)
+
+.PHONY: realclean
+realclean: clean
+	rm -f $(REALCLEAN_FILES)
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãçæãããã¡ã¤ã«ã®ã³ã³ãã¤ã«ã«ã¼ã«ã®å®ç¾©
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãçæãããã¡ã¤ã«ã¯ï¼å
+±éã®ã³ã³ãã¤ã«ãªãã·ã§ã³
+#  ã®ã¿ãä»ãã¦ã³ã³ãã¤ã«ããï¼
+#
+ALL_CFG_COBJS = $(CFG_COBJS) cfg1_out.o
+ALL_CFG_ASMOBJS = $(CFG_ASMOBJS)
+
+$(ALL_CFG_COBJS): %.o: %.c
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(CFG_CFLAGS) $<
+
+$(ALL_CFG_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(CFG_CFLAGS) $<
+
+$(ALL_CFG_ASMOBJS): %.o: %.S
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(CFG_CFLAGS) $<
+
+#
+#  ä¾å­é¢ä¿ãã¡ã¤ã«ã®ã¤ã³ã¯ã«ã¼ã
+#
+-include $(DEPDIR)/*.d
+
+#
+#  éçºãã¼ã«ã®ã³ãã³ãåã®å®ç¾©
+#
+ifeq ($(TOOL),gcc)
+	#
+	#  GNUéçºç°å¢ç¨
+	#
+	ifdef GCC_TARGET
+		GCC_TARGET_PREFIX = $(GCC_TARGET)-
+	else
+		GCC_TARGET_PREFIX =
+	endif
+	CC := $(GCC_TARGET_PREFIX)gcc
+	CXX := $(GCC_TARGET_PREFIX)g++
+	AS := $(GCC_TARGET_PREFIX)as
+	LD := $(GCC_TARGET_PREFIX)ld
+	AR := $(GCC_TARGET_PREFIX)ar
+	NM := $(GCC_TARGET_PREFIX)nm
+	RANLIB := $(GCC_TARGET_PREFIX)ranlib
+	OBJCOPY := $(GCC_TARGET_PREFIX)objcopy
+	OBJDUMP := $(GCC_TARGET_PREFIX)objdump
+endif
+
+ifdef DEVTOOLDIR
+	CC := $(DEVTOOLDIR)/$(CC)
+	CXX := $(DEVTOOLDIR)/$(CXX)
+	AS := $(DEVTOOLDIR)/$(AS)
+	LD := $(DEVTOOLDIR)/$(LD)
+	AR := $(DEVTOOLDIR)/$(AR)
+	NM := $(DEVTOOLDIR)/$(NM)
+	RANLIB := $(DEVTOOLDIR)/$(RANLIB)
+	OBJCOPY := $(DEVTOOLDIR)/$(OBJCOPY)
+	OBJDUMP := $(DEVTOOLDIR)/$(OBJDUMP)
+endif
+
+ifdef USE_CXX
+	LINK = $(CXX)
+else
+	LINK = $(CC)
+endif
+
+#
+#  ã³ã³ãã¤ã«ã«ã¼ã«ã®å®ç¾©
+#
+$(KERNEL_COBJS): %.o: %.c
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_LCOBJS): %.o:
+	$(CC) -DTOPPERS_$(*F) -o $@ -c -MD -MP -MF $(DEPDIR)/$*.d \
+									$(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_LCOBJS:.o=.s): %.s:
+	$(CC) -DTOPPERS_$(*F) -o $@ -S $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_ASMOBJS): %.o: %.S
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(SYSSVC_COBJS): %.o: %.c
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(SYSSVC_CFLAGS) $<
+
+$(SYSSVC_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(SYSSVC_CFLAGS) $<
+
+$(SYSSVC_ASMOBJS): %.o: %.S
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(SYSSVC_CFLAGS) $<
+
+$(APPL_COBJS): %.o: %.c
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_CXXOBJS): %.o: %.cpp
+	$(CXX) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_CXXOBJS:.o=.s): %.s: %.cpp
+	$(CXX) -S $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_ASMOBJS): %.o: %.S
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(APPL_CFLAGS) $<
+
+#
+#  ããã©ã«ãã³ã³ãã¤ã«ã«ã¼ã«ãä¸æ¸ã
+#
+%.o: %.c
+	@echo "*** Default compile rules should not be used."
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $<
+
+%.s: %.c
+	@echo "*** Default compile rules should not be used."
+	$(CC) -S $(CFLAGS) $<
+
+%.o: %.cpp
+	@echo "*** Default compile rules should not be used."
+	$(CXX) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $<
+
+%.s: %.cpp
+	@echo "*** Default compile rules should not be used."
+	$(CXX) -S $(CFLAGS) $<
+
+%.o: %.S
+	@echo "*** Default compile rules should not be used."
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $<
Index: EcnlProtoTool/trunk/asp3_dcre/sample/route_cfg.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/sample/route_cfg.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/sample/route_cfg.c	(revision 270)
@@ -0,0 +1,113 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  ã«ã¼ãã£ã³ã°è¡¨
+ */
+
+#include <kernel.h>
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+
+/* IPv4 ã«é¢ããå®ç¾© */
+
+#ifdef SUPPORT_INET4
+
+#ifdef SUPPORT_LOOP
+
+T_IN4_RTENTRY routing_tbl[NUM_ROUTE_ENTRY] = {
+	{ 0, 0, 0 },
+	};
+
+#endif	/* of #ifdef SUPPORT_LOOP */
+
+#ifdef SUPPORT_PPP
+
+T_IN4_RTENTRY routing_tbl[NUM_ROUTE_ENTRY] = {
+	{ 0, 0, 0 },
+	};
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#ifdef SUPPORT_ETHER
+
+T_IN4_RTENTRY routing_tbl[NUM_ROUTE_ENTRY] = {
+
+	/* ç°ãªã LANãdefault gateway ã«ããéæ¥é
+é	*/
+	{ 0,			0,			IPV4_ADDR_DEFAULT_GW	},
+
+	/* åä¸ LAN å
+ãç´æ¥é
+é				*/
+	{ IPV4_ADDR_LOCAL &
+	  IPV4_ADDR_LOCAL_MASK,	IPV4_ADDR_LOCAL_MASK,	0			},
+
+	/* åä¸ LAN å
+ã¸ã®ãã­ã¼ãã­ã£ã¹ããç´æ¥é
+é	*/
+	{ 0xffffffff,		0xffffffff,		0			},
+
+	};
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+/* IPv6 ã«é¢ããå®ç¾© */
+
+#ifdef SUPPORT_INET6
+
+#if NUM_ROUTE_ENTRY > 0
+
+T_IN6_RTENTRY routing_tbl[NUM_ROUTE_ENTRY] = { };
+
+#endif	/* of #if NUM_ROUTE_ENTRY > 0 */
+
+#endif	/* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/asp3_dcre/sample/sample1.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/sample/sample1.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/sample/sample1.c	(revision 270)
@@ -0,0 +1,606 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/* 
+ *  ãµã³ãã«ãã­ã°ã©ã (1)ã®æ¬ä½
+ *
+ *  ASPã«ã¼ãã«ã®åºæ¬çãªåä½ãç¢ºèªããããã®ãµã³ãã«ãã­ã°ã©ã ï¼
+ *
+ *  ãã­ã°ã©ã ã®æ¦è¦:
+ *
+ *  ã¦ã¼ã¶ã¤ã³ã¿ãã§ã¼ã¹ãåãæã¤ã¡ã¤ã³ã¿ã¹ã¯ï¼ã¿ã¹ã¯ID: MAIN_TASKï¼åª
+ *  å
+åº¦: MAIN_PRIORITYï¼ã¨ï¼3ã¤ã®ä¸¦è¡å®è¡ãããã¿ã¹ã¯ï¼ã¿ã¹ã¯ID:
+ *  TASK1ï½TASK3ï¼åæåªå
+åº¦: MID_PRIORITYï¼ã§æ§æãããï¼ã¾ãï¼èµ·åå¨
+ *  æã2ç§ã®å¨æãã³ãã©ï¼å¨æãã³ãã©ID: CYCHDR1ï¼ãç¨ããï¼
+ *
+ *  ä¸¦è¡å®è¡ãããã¿ã¹ã¯ã¯ï¼task_loopåç©ºã«ã¼ããå®è¡ããåº¦ã«ï¼ã¿ã¹ã¯ã
+ *  å®è¡ä¸­ã§ãããã¨ãããããã¡ãã»ã¼ã¸ãè¡¨ç¤ºããï¼ç©ºã«ã¼ããå®è¡ãã
+ *  ã®ã¯ï¼ç©ºã«ã¼ããªãã§ã¡ãã»ã¼ã¸ãåºåããã¨ï¼å¤éã®ã¡ãã»ã¼ã¸ãåºå
+ *  ããï¼ãã­ã°ã©ã ã®åä½ãç¢ºèªãããããªãããã§ããï¼ã¾ãï¼ä½éãªã·
+ *  ãªã¢ã«ãã¼ããç¨ãã¦ã¡ãã»ã¼ã¸ãåºåããå ´åã«ï¼ãã¹ã¦ã®ã¡ãã»ã¼ã¸
+ *  ãåºåã§ããããã«ï¼ã¡ãã»ã¼ã¸ã®éãå¶éããã¨ããçç±ãããï¼
+ *
+ *  å¨æãã³ãã©ã¯ï¼ä¸ã¤ã®åªå
+åº¦ï¼HIGH_PRIORITYï¼MID_PRIORITYï¼
+ *  LOW_PRIORITYï¼ã®ã¬ãã£ã­ã¥ã¼ãåè»¢ãããï¼ãã­ã°ã©ã ã®èµ·åç´å¾ã¯ï¼
+ *  å¨æãã³ãã©ã¯åæ­¢ç¶æ
+ã«ãªã£ã¦ããï¼
+ *
+ *  ã¡ã¤ã³ã¿ã¹ã¯ã¯ï¼ã·ãªã¢ã«I/Oãã¼ãããã®æå­å
+¥åãè¡ãï¼æå­å
+¥åã
+ *  å¾
+ã£ã¦ããéã¯ï¼ä¸¦è¡å®è¡ãããã¿ã¹ã¯ãå®è¡ããã¦ããï¼ï¼å
+¥åããã
+ *  æå­ã«å¯¾å¿ããå¦çãå®è¡ããï¼å
+¥åãããæå­ã¨å¦çã®é¢ä¿ã¯æ¬¡ã®éãï¼
+ *  Control-Cã¾ãã¯'Q'ãå
+¥åãããã¨ï¼ãã­ã°ã©ã ãçµäºããï¼
+ *
+ *  '1' : å¯¾è±¡ã¿ã¹ã¯ãTASK1ã«åãæããï¼åæè¨­å®ï¼ï¼
+ *  '2' : å¯¾è±¡ã¿ã¹ã¯ãTASK2ã«åãæããï¼
+ *  '3' : å¯¾è±¡ã¿ã¹ã¯ãTASK3ã«åãæããï¼
+ *  'a' : å¯¾è±¡ã¿ã¹ã¯ãact_tskã«ããèµ·åããï¼
+ *  'A' : å¯¾è±¡ã¿ã¹ã¯ã«å¯¾ããèµ·åè¦æ±ãcan_actã«ããã­ã£ã³ã»ã«ããï¼
+ *  'e' : å¯¾è±¡ã¿ã¹ã¯ã«ext_tskãå¼ã³åºããï¼çµäºãããï¼
+ *  't' : å¯¾è±¡ã¿ã¹ã¯ãter_tskã«ããå¼·å¶çµäºããï¼
+ *  '>' : å¯¾è±¡ã¿ã¹ã¯ã®åªå
+åº¦ãHIGH_PRIORITYã«ããï¼
+ *  '=' : å¯¾è±¡ã¿ã¹ã¯ã®åªå
+åº¦ãMID_PRIORITYã«ããï¼
+ *  '<' : å¯¾è±¡ã¿ã¹ã¯ã®åªå
+åº¦ãLOW_PRIORITYã«ããï¼
+ *  'G' : å¯¾è±¡ã¿ã¹ã¯ã®åªå
+åº¦ãget_priã§èª­ã¿åºãï¼
+ *  's' : å¯¾è±¡ã¿ã¹ã¯ã«slp_tskãå¼ã³åºããï¼èµ·åºå¾
+ã¡ã«ãããï¼
+ *  'S' : å¯¾è±¡ã¿ã¹ã¯ã«tslp_tsk(10ç§)ãå¼ã³åºããï¼èµ·åºå¾
+ã¡ã«ãããï¼
+ *  'w' : å¯¾è±¡ã¿ã¹ã¯ãwup_tskã«ããèµ·åºããï¼
+ *  'W' : å¯¾è±¡ã¿ã¹ã¯ã«å¯¾ããèµ·åºè¦æ±ãcan_wupã«ããã­ã£ã³ã»ã«ããï¼
+ *  'l' : å¯¾è±¡ã¿ã¹ã¯ãrel_waiã«ããå¼·å¶çã«å¾
+ã¡è§£é¤ã«ããï¼
+ *  'u' : å¯¾è±¡ã¿ã¹ã¯ãsus_tskã«ããå¼·å¶å¾
+ã¡ç¶æ
+ã«ããï¼
+ *  'm' : å¯¾è±¡ã¿ã¹ã¯ã®å¼·å¶å¾
+ã¡ç¶æ
+ãrsm_tskã«ããè§£é¤ããï¼
+ *  'd' : å¯¾è±¡ã¿ã¹ã¯ã«dly_tsk(10ç§)ãå¼ã³åºããï¼æéçµéå¾
+ã¡ã«ãããï¼
+ *  'x' : å¯¾è±¡ã¿ã¹ã¯ã«ras_terã«ããçµäºè¦æ±ããï¼
+ *  'y' : å¯¾è±¡ã¿ã¹ã¯ã«dis_terãå¼ã³åºããï¼ã¿ã¹ã¯çµäºãç¦æ­¢ããï¼
+ *  'Y' : å¯¾è±¡ã¿ã¹ã¯ã«ena_terãå¼ã³åºããï¼ã¿ã¹ã¯çµäºãè¨±å¯ããï¼
+ *  'r' : 3ã¤ã®åªå
+åº¦ï¼HIGH_PRIORITYï¼MID_PRIORITYï¼LOW_PRIORITYï¼ã®ã¬
+ *        ãã£ã­ã¥ã¼ãåè»¢ãããï¼
+ *  'c' : å¨æãã³ãã©ãåä½éå§ãããï¼
+ *  'C' : å¨æãã³ãã©ãåä½åæ­¢ãããï¼
+ *  'b' : ã¢ã©ã¼ã ãã³ãã©ã5ç§å¾ã«èµ·åããããåä½éå§ãããï¼
+ *  'B' : ã¢ã©ã¼ã ãã³ãã©ãåä½åæ­¢ãããï¼
+ *  'z' : å¯¾è±¡ã¿ã¹ã¯ã«CPUä¾å¤ãçºçãããï¼ã¿ã¹ã¯ãçµäºãããï¼ï¼
+ *  'Z' : å¯¾è±¡ã¿ã¹ã¯ã«CPUã­ãã¯ç¶æ
+ã§CPUä¾å¤ãçºçãããï¼ãã­ã°ã©ã ã
+ *        çµäºããï¼ï¼
+ *  '@' : ã¿ã¹ã¯3ãacre_tskã«ããçæããï¼
+ *  '!' : å¯¾è±¡ã¿ã¹ã¯ãdel_tskã«ããåé¤ããï¼
+ *  '$' : ã¢ã©ã¼ã ãã³ãã©ãacre_almã«ããçæããï¼
+ *  '#' : ã¢ã©ã¼ã ãã³ãã©ãdel_almã«ããåé¤ããï¼
+ *  'V' : fch_hrtã§é«åè§£è½ã¿ã¤ãã2åèª­ãï¼
+ *  'v' : çºè¡ããã·ã¹ãã ã³ã¼ã«ãè¡¨ç¤ºããï¼ããã©ã«ãï¼ï¼
+ *  'q' : çºè¡ããã·ã¹ãã ã³ã¼ã«ãè¡¨ç¤ºããªãï¼
+ */
+
+#include <kernel.h>
+#include <t_syslog.h>
+#include <t_stdlib.h>
+#include "syssvc/serial.h"
+#include "syssvc/syslog.h"
+#include "kernel_cfg.h"
+#include "sample1.h"
+#include "sample1n.h"
+
+/*
+ *  ãµã¼ãã¹ã³ã¼ã«ã®ã¨ã©ã¼ã®ã­ã°åºå
+ */
+Inline void
+svc_perror(const char *file, int_t line, const char *expr, ER ercd)
+{
+	if (ercd < 0) {
+		t_perror(LOG_ERROR, file, line, expr, ercd);
+	}
+}
+
+#define	SVC_PERROR(expr)	svc_perror(__FILE__, __LINE__, #expr, (expr))
+
+/*
+ *  ä¸¦è¡å®è¡ãããã¿ã¹ã¯ã¸ã®ã¡ãã»ã¼ã¸é å
+ */
+char	message[3];
+
+/*
+ *  ã«ã¼ãåæ°
+ */
+ulong_t	task_loop;		/* ã¿ã¹ã¯å
+ã§ã®ã«ã¼ãåæ° */
+
+/*
+ *  ä¸¦è¡å®è¡ãããã¿ã¹ã¯
+ */
+void task(intptr_t exinf)
+{
+	volatile ulong_t	i;
+	int_t		n = 0;
+	int_t		tskno = (int_t) exinf;
+	const char	*graph[] = { "|", "  +", "    *" };
+	char		c;
+
+	while (true) {
+		syslog(LOG_NOTICE, "task%d is running (%03d).   %s",
+										tskno, ++n, graph[tskno-1]);
+		for (i = 0; i < task_loop; i++);
+		c = message[tskno-1];
+		message[tskno-1] = 0;
+		switch (c) {
+		case 'e':
+			syslog(LOG_INFO, "#%d#ext_tsk()", tskno);
+			SVC_PERROR(ext_tsk());
+			assert(0);
+		case 's':
+			syslog(LOG_INFO, "#%d#slp_tsk()", tskno);
+			SVC_PERROR(slp_tsk());
+			break;
+		case 'S':
+			syslog(LOG_INFO, "#%d#tslp_tsk(10000000)", tskno);
+			SVC_PERROR(tslp_tsk(10000000));
+			break;
+		case 'd':
+			syslog(LOG_INFO, "#%d#dly_tsk(10000000)", tskno);
+			SVC_PERROR(dly_tsk(10000000));
+			break;
+		case 'y':
+			syslog(LOG_INFO, "#%d#dis_ter()", tskno);
+			SVC_PERROR(dis_ter());
+			break;
+		case 'Y':
+			syslog(LOG_INFO, "#%d#ena_ter()", tskno);
+			SVC_PERROR(ena_ter());
+			break;
+#ifdef CPUEXC1
+		case 'z':
+			syslog(LOG_NOTICE, "#%d#raise CPU exception", tskno);
+			RAISE_CPU_EXCEPTION;
+			break;
+		case 'Z':
+			SVC_PERROR(loc_cpu());
+			syslog(LOG_NOTICE, "#%d#raise CPU exception", tskno);
+			RAISE_CPU_EXCEPTION;
+			SVC_PERROR(unl_cpu());
+			break;
+#endif /* CPUEXC1 */
+		default:
+			break;
+		}
+	}
+}
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©
+ */
+#ifdef INTNO1
+
+void intno1_isr(intptr_t exinf)
+{
+	intno1_clear();
+	SVC_PERROR(rot_rdq(HIGH_PRIORITY));
+	SVC_PERROR(rot_rdq(MID_PRIORITY));
+	SVC_PERROR(rot_rdq(LOW_PRIORITY));
+}
+
+#endif /* INTNO1 */
+
+/*
+ *  CPUä¾å¤ãã³ãã©
+ */
+ID	cpuexc_tskid;		/* CPUä¾å¤ãèµ·ãããã¿ã¹ã¯ã®ID */
+
+#ifdef CPUEXC1
+
+void
+cpuexc_handler(void *p_excinf)
+{
+	syslog(LOG_NOTICE, "CPU exception handler (p_excinf = %08p).", p_excinf);
+	if (sns_ctx() != true) {
+		syslog(LOG_WARNING,
+					"sns_ctx() is not true in CPU exception handler.");
+	}
+	if (sns_dpn() != true) {
+		syslog(LOG_WARNING,
+					"sns_dpn() is not true in CPU exception handler.");
+	}
+	syslog(LOG_INFO, "sns_loc = %d sns_dsp = %d xsns_dpn = %d",
+								sns_loc(), sns_dsp(), xsns_dpn(p_excinf));
+
+	if (xsns_dpn(p_excinf)) {
+		syslog(LOG_NOTICE, "Sample program ends with exception.");
+		SVC_PERROR(ext_ker());
+		assert(0);
+	}
+
+#ifdef PREPARE_RETURN_CPUEXC
+	PREPARE_RETURN_CPUEXC;
+	SVC_PERROR(get_tid(&cpuexc_tskid));
+	SVC_PERROR(act_tsk(EXC_TASK));
+#else /* PREPARE_RETURN_CPUEXC */
+	syslog(LOG_NOTICE, "Sample program ends with exception.");
+	SVC_PERROR(ext_ker());
+	assert(0);
+#endif /* PREPARE_RETURN_CPUEXC */
+}
+
+#endif /* CPUEXC1 */
+
+/*
+ *  å¨æãã³ãã©
+ *
+ *  HIGH_PRIORITYï¼MID_PRIORITYï¼LOW_PRIORITY ã®ååªå
+åº¦ã®ã¬ãã£ã­ã¥ã¼
+ *  ãåè»¢ãããï¼
+ */
+void cyclic_handler(intptr_t exinf)
+{
+	SVC_PERROR(rot_rdq(HIGH_PRIORITY));
+	SVC_PERROR(rot_rdq(MID_PRIORITY));
+	SVC_PERROR(rot_rdq(LOW_PRIORITY));
+}
+
+/*
+ *  ã¢ã©ã¼ã ãã³ãã©
+ *
+ *  HIGH_PRIORITYï¼MID_PRIORITYï¼LOW_PRIORITY ã®ååªå
+åº¦ã®ã¬ãã£ã­ã¥ã¼
+ *  ãåè»¢ãããï¼
+ */
+void alarm_handler(intptr_t exinf)
+{
+	SVC_PERROR(rot_rdq(HIGH_PRIORITY));
+	SVC_PERROR(rot_rdq(MID_PRIORITY));
+	SVC_PERROR(rot_rdq(LOW_PRIORITY));
+}
+
+/*
+ *  ä¾å¤å¦çã¿ã¹ã¯
+ */
+void exc_task(intptr_t exinf)
+{
+	SVC_PERROR(ras_ter(cpuexc_tskid));
+}
+
+/*
+ *  ã¡ã¤ã³ã¿ã¹ã¯
+ */
+void main_task(intptr_t exinf)
+{
+	char	c;
+	ID		tskid = TASK1;
+	int_t	tskno = 1;
+	ER_UINT	ercd;
+	PRI		tskpri;
+#ifndef TASK_LOOP
+	volatile ulong_t	i;
+	SYSTIM	stime1, stime2;
+#endif /* TASK_LOOP */
+	HRTCNT	hrtcnt1, hrtcnt2;
+	T_CTSK	ctsk;
+	ID		TASK3 = -1;
+	T_CALM	calm;
+	ID		ALMHDR1 = -1;
+
+	SVC_PERROR(syslog_msk_log(LOG_UPTO(LOG_INFO), LOG_UPTO(LOG_EMERG)));
+	syslog(LOG_NOTICE, "Sample program starts (exinf = %d).", (int_t) exinf);
+
+	/*
+	 *  ã·ãªã¢ã«ãã¼ãã®åæå
+	 *
+	 *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¨åãã·ãªã¢ã«ãã¼ããä½¿ãå ´åãªã©ï¼ã·ãªã¢ã«
+	 *  ãã¼ãããªã¼ãã³æ¸ã¿ã®å ´åã«ã¯ããã§E_OBJã¨ã©ã¼ã«ãªããï¼æ¯éã¯
+	 *  ãªãï¼
+	 */
+	ercd = serial_opn_por(TASK_PORTID);
+	if (ercd < 0 && MERCD(ercd) != E_OBJ) {
+		syslog(LOG_ERROR, "%s (%d) reported by `serial_opn_por'.",
+									itron_strerror(ercd), SERCD(ercd));
+	}
+	SVC_PERROR(serial_ctl_por(TASK_PORTID,
+							(IOCTL_CRLF | IOCTL_FCSND | IOCTL_FCRCV)));
+
+	/*
+ 	 *  ã«ã¼ãåæ°ã®è¨­å®
+	 *
+	 *  ä¸¦è¡å®è¡ãããã¿ã¹ã¯å
+ã§ã®ç©ºã«ã¼ãã®åæ°ï¼task_loopï¼ã¯ï¼ç©ºã«ã¼
+	 *  ãã®å®è¡æéãç´0.4ç§ã«ãªãããã«è¨­å®ããï¼ãã®è¨­å®ã®ããã«ï¼
+	 *  LOOP_REFåã®ç©ºã«ã¼ãã®å®è¡æéãï¼ãã®åå¾ã§get_timãå¼ã¶ãã¨ã§
+	 *  æ¸¬å®ãï¼ãã®æ¸¬å®çµæããç©ºã«ã¼ãã®å®è¡æéã0.4ç§ã«ãªãã«ã¼ãå
+	 *  æ°ãæ±ãï¼task_loopã«è¨­å®ããï¼
+	 *
+	 *  LOOP_REFã¯ï¼ããã©ã«ãã§ã¯1,000,000ã«è¨­å®ãã¦ãããï¼æ³å®ããã
+	 *  ãé
+ããã­ã»ããµã§ã¯ï¼ãµã³ãã«ãã­ã°ã©ã ã®å®è¡éå§ã«æéããã
+	 *  ããããã¨ããåé¡ãçããï¼éã«æ³å®ããããéããã­ã»ããµã§ã¯ï¼
+	 *  LOOP_REFåã®ç©ºã«ã¼ãã®å®è¡æéãç­ããªãï¼task_loopã«è¨­å®ããå¤
+	 *  ã®èª¤å·®ãå¤§ãããªãã¨ããåé¡ãããï¼
+	 *
+	 *  ããã§ï¼ãã®ãããªã¿ã¼ã²ããã§ã¯ï¼target_test.hã§ï¼LOOP_REFãé©
+	 *  åãªå¤ã«å®ç¾©ããã®ãæã¾ããï¼
+	 *
+	 *  ã¾ãï¼task_loopã®å¤ãåºå®ãããå ´åã«ã¯ï¼ãã®å¤ãTASK_LOOPã«ã
+	 *  ã¯ã­å®ç¾©ããï¼TASK_LOOPããã¯ã­å®ç¾©ããã¦ããå ´åï¼ä¸è¨ã®æ¸¬å®ã
+	 *  è¡ããã«ï¼TASK_LOOPã«å®ç¾©ãããå¤ãç©ºã«ã¼ãã®åæ°ã¨ããï¼
+	 *
+	 * ã¿ã¼ã²ããã«ãã£ã¦ã¯ï¼ç©ºã«ã¼ãã®å®è¡æéã®1åç®ã®æ¸¬å®ã§ï¼æ¬æ¥ã
+	 * ããé·ãã«ãªããã®ãããï¼ãã®ãããªã¿ã¼ã²ããã§ã¯ï¼MEASURE_TWICE
+	 * ããã¯ã­å®ç¾©ãããã¨ã§ï¼1åç®ã®æ¸¬å®çµæãæ¨ã¦ã¦ï¼2åç®ã®æ¸¬å®çµæ
+	 * ãä½¿ãï¼
+	 */
+#ifdef TASK_LOOP
+	task_loop = TASK_LOOP;
+#else /* TASK_LOOP */
+
+#ifdef MEASURE_TWICE
+	task_loop = LOOP_REF;
+	SVC_PERROR(get_tim(&stime1));
+	for (i = 0; i < task_loop; i++);
+	SVC_PERROR(get_tim(&stime2));
+#endif /* MEASURE_TWICE */
+
+	task_loop = LOOP_REF;
+	SVC_PERROR(get_tim(&stime1));
+	for (i = 0; i < task_loop; i++);
+	SVC_PERROR(get_tim(&stime2));
+	task_loop = LOOP_REF * 400LU / (ulong_t)(stime2 - stime1) * 1000LU;
+
+#endif /* TASK_LOOP */
+
+	/*
+ 	 *  ã¿ã¹ã¯ã®èµ·å
+	 */
+	SVC_PERROR(act_tsk(TASK1));
+	SVC_PERROR(act_tsk(TASK2));
+
+	/*
+ 	 *  ã¡ã¤ã³ã«ã¼ã
+	 */
+	do {
+		SVC_PERROR(serial_rea_dat(TASK_PORTID, &c, 1));
+		switch (c) {
+		case 'e':
+		case 's':
+		case 'S':
+		case 'd':
+		case 'y':
+		case 'Y':
+		case 'z':
+		case 'Z':
+			message[tskno-1] = c;
+			break;
+		case '1':
+			tskno = 1;
+			tskid = TASK1;
+			break;
+		case '2':
+			tskno = 2;
+			tskid = TASK2;
+			break;
+		case '3':
+			tskno = 3;
+			tskid = TASK3;
+			break;
+		case 'a':
+			syslog(LOG_INFO, "#act_tsk(%d)", tskno);
+			SVC_PERROR(act_tsk(tskid));
+			break;
+		case 'A':
+			syslog(LOG_INFO, "#can_act(%d)", tskno);
+			SVC_PERROR(ercd = can_act(tskid));
+			if (ercd >= 0) {
+				syslog(LOG_NOTICE, "can_act(%d) returns %d", tskno, ercd);
+			}
+			break;
+		case 't':
+			syslog(LOG_INFO, "#ter_tsk(%d)", tskno);
+			SVC_PERROR(ter_tsk(tskid));
+			break;
+		case '>':
+			syslog(LOG_INFO, "#chg_pri(%d, HIGH_PRIORITY)", tskno);
+			SVC_PERROR(chg_pri(tskid, HIGH_PRIORITY));
+			break;
+		case '=':
+			syslog(LOG_INFO, "#chg_pri(%d, MID_PRIORITY)", tskno);
+			SVC_PERROR(chg_pri(tskid, MID_PRIORITY));
+			break;
+		case '<':
+			syslog(LOG_INFO, "#chg_pri(%d, LOW_PRIORITY)", tskno);
+			SVC_PERROR(chg_pri(tskid, LOW_PRIORITY));
+			break;
+		case 'G':
+			syslog(LOG_INFO, "#get_pri(%d, &tskpri)", tskno);
+			SVC_PERROR(ercd = get_pri(tskid, &tskpri));
+			if (ercd >= 0) {
+				syslog(LOG_NOTICE, "priority of task %d is %d", tskno, tskpri);
+			}
+			break;
+		case 'w':
+			syslog(LOG_INFO, "#wup_tsk(%d)", tskno);
+			SVC_PERROR(wup_tsk(tskid));
+			break;
+		case 'W':
+			syslog(LOG_INFO, "#can_wup(%d)", tskno);
+			SVC_PERROR(ercd = can_wup(tskid));
+			if (ercd >= 0) {
+				syslog(LOG_NOTICE, "can_wup(%d) returns %d", tskno, ercd);
+			}
+			break;
+		case 'l':
+			syslog(LOG_INFO, "#rel_wai(%d)", tskno);
+			SVC_PERROR(rel_wai(tskid));
+			break;
+		case 'u':
+			syslog(LOG_INFO, "#sus_tsk(%d)", tskno);
+			SVC_PERROR(sus_tsk(tskid));
+			break;
+		case 'm':
+			syslog(LOG_INFO, "#rsm_tsk(%d)", tskno);
+			SVC_PERROR(rsm_tsk(tskid));
+			break;
+		case 'x':
+			syslog(LOG_INFO, "#ras_ter(%d)", tskno);
+			SVC_PERROR(ras_ter(tskid));
+			break;
+		case 'r':
+			syslog(LOG_INFO, "#rot_rdq(three priorities)");
+			SVC_PERROR(rot_rdq(HIGH_PRIORITY));
+			SVC_PERROR(rot_rdq(MID_PRIORITY));
+			SVC_PERROR(rot_rdq(LOW_PRIORITY));
+			break;
+		case 'c':
+			syslog(LOG_INFO, "#sta_cyc(1)");
+			SVC_PERROR(sta_cyc(CYCHDR1));
+			break;
+		case 'C':
+			syslog(LOG_INFO, "#stp_cyc(1)");
+			SVC_PERROR(stp_cyc(CYCHDR1));
+			break;
+		case 'b':
+			syslog(LOG_INFO, "#sta_alm(1, 5000000)");
+			SVC_PERROR(sta_alm(ALMHDR1, 5000000));
+			break;
+		case 'B':
+			syslog(LOG_INFO, "#stp_alm(1)");
+			SVC_PERROR(stp_alm(ALMHDR1));
+			break;
+		case '@':
+			ctsk.tskatr = TA_NULL;
+			ctsk.exinf = 3;
+			ctsk.task = task;
+			ctsk.itskpri = MID_PRIORITY;
+			ctsk.stksz = STACK_SIZE;
+			ctsk.stk = NULL;
+			SVC_PERROR(TASK3 = acre_tsk(&ctsk));
+			syslog(LOG_NOTICE, "task3 is created with tskid = %d.",
+														(int_t) TASK3);
+			break;
+		case '!':
+			syslog(LOG_INFO, "#del_tsk(%d)", tskno);
+			SVC_PERROR(del_tsk(tskid));
+			break;
+		case '$':
+			calm.almatr = TA_NULL;
+			calm.nfyinfo.nfymode = TNFY_HANDLER;
+			calm.nfyinfo.nfy.handler.exinf = (intptr_t) 0;
+			calm.nfyinfo.nfy.handler.tmehdr = (TMEHDR) alarm_handler;
+			SVC_PERROR(ALMHDR1 = acre_alm(&calm));
+			syslog(LOG_NOTICE, "alarm handler is created with almid = %d.",
+														(int_t) ALMHDR1);
+			break;
+		case '#':
+			syslog(LOG_INFO, "#del_alm(1)");
+			SVC_PERROR(del_alm(ALMHDR1));
+			break;
+
+		case 'V':
+			hrtcnt1 = fch_hrt();
+			hrtcnt2 = fch_hrt();
+			syslog(LOG_NOTICE, "hrtcnt1 = %tu, hrtcnt2 = %tu",
+										hrtcnt1, hrtcnt2);
+			break;
+
+		case 'v':
+			SVC_PERROR(syslog_msk_log(LOG_UPTO(LOG_INFO),
+										LOG_UPTO(LOG_EMERG)));
+			break;
+		case 'q':
+			SVC_PERROR(syslog_msk_log(LOG_UPTO(LOG_NOTICE),
+										LOG_UPTO(LOG_EMERG)));
+			break;
+
+#ifdef BIT_KERNEL
+		case ' ':
+			SVC_PERROR(loc_cpu());
+			{
+				extern ER	bit_kernel(void);
+
+				SVC_PERROR(ercd = bit_kernel());
+				if (ercd >= 0) {
+					syslog(LOG_NOTICE, "bit_kernel passed.");
+				}
+			}
+			SVC_PERROR(unl_cpu());
+			break;
+#endif /* BIT_KERNEL */
+
+		default:
+			break;
+		}
+	} while (c != '\003' && c != 'Q');
+
+	syslog(LOG_NOTICE, "Sample program ends.");
+	SVC_PERROR(ext_ker());
+	assert(0);
+}
Index: EcnlProtoTool/trunk/asp3_dcre/sample/sample1.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/sample/sample1.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/sample/sample1.cdl	(revision 270)
@@ -0,0 +1,125 @@
+/*
+ *		ãµã³ãã«ãã­ã°ã©ã (1)ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+ *
+ *  $Id$
+ */
+/*
+ *  ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å®ç¾©
+ */
+import(<kernel.cdl>);
+
+/*
+ *  ã¿ã¼ã²ããéä¾å­ã®ã»ã«ã¿ã¤ãã®å®ç¾©
+ */
+import("syssvc/tSerialPort.cdl");
+import("syssvc/tSerialAdapter.cdl");
+import("syssvc/tSysLog.cdl");
+import("syssvc/tSysLogAdapter.cdl");
+import("syssvc/tLogTask.cdl");
+import("syssvc/tBanner.cdl");
+
+/*
+ *  ã¿ã¼ã²ããä¾å­é¨ã®åãè¾¼ã¿
+ */
+import("target.cdl");
+
+/*
+ *  ãã»ã«ã®çµä¸ãè¨è¿°ãã¨ã¯ï¼"cell"ã§å§ã¾ãè¡ããï¼ããã«å¯¾å¿ãã"};"
+ *  ã®è¡ã¾ã§ã®ãã¨ãè¨ãï¼
+ */
+
+/*
+ *  ã·ã¹ãã ã­ã°æ©è½ã®çµä¸ãè¨è¿°
+ *
+ *  ã·ã¹ãã ã­ã°æ©è½ãå¤ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°ãåé¤ãï¼ã³
+ *  ã³ãã¤ã«ãªãã·ã§ã³ã«-DTOPPERS_OMIT_SYSLOGãè¿½å ããã°ããï¼ãã ãï¼
+ *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¯ã·ã¹ãã ã­ã°æ©è½ãä½¿ç¨ããããï¼ãããå¤ããã¨
+ *  ãå¿
+è¦ã§ããï¼ã¾ãï¼ã·ã¹ãã ã­ã°æ©è½ã®ã¢ããã¿ãå¤ããªããã°ãªããª
+ *  ãï¼tecsgenãè­¦åã¡ãã»ã¼ã¸ãåºããï¼ç¡è¦ãã¦ããï¼
+ */
+cell tSysLog SysLog {
+	logBufferSize = 32;					/* ã­ã°ãããã¡ã®ãµã¤ãº */
+	initLogMask = C_EXP("LOG_UPTO(LOG_NOTICE)");
+										/* ã­ã°ãããã¡ã«è¨é²ãã¹ãéè¦åº¦ */
+	initLowMask = C_EXP("LOG_UPTO(LOG_EMERG)");
+									   	/* ä½ã¬ãã«åºåãã¹ãéè¦åº¦ */
+	/* ä½ã¬ãã«åºåã¨ã®çµå */
+	cPutLog = PutLogTarget.ePutLog;
+};
+
+/*
+ *  Cè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããï¼TECSãã¼ã¹ã®ã·ã¹ãã ã­ã°æ©è½
+ *  ãå¼ã³åºãããã®ã¢ããã¿ã®çµä¸ãè¨è¿°
+ *
+ *  ã·ã¹ãã ã­ã°æ©è½ã®ãµã¼ãã¹ã³ã¼ã«ï¼syslogé¢æ°ã¨syslog_0é¢æ°ï½syslog_5
+ *  é¢æ°ä»¥å¤ã®ãã®ï¼ã«ãCè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããå¼ã³åºããª
+ *  ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°ãåé¤ããã°ããï¼
+ */
+cell tSysLogAdapter SysLogAdapter {
+	cSysLog = SysLog.eSysLog;
+};
+
+/*
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®çµä¸ãè¨è¿°
+ *
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ããå¤ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨
+ *  è¿°ãåé¤ããã°ããï¼ãã ãï¼ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¯ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼
+ *  ã¹ãã©ã¤ããä½¿ç¨ããããï¼ãããå¤ããã¨ãå¿
+è¦ã§ããï¼ã¾ãï¼ã·ãªã¢
+ *  ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¢ããã¿ãå¤ããªããã°ãªããªãï¼
+ */
+cell tSerialPort SerialPort1 {
+	receiveBufferSize = 256;			/* åä¿¡ãããã¡ã®ãµã¤ãº */
+	sendBufferSize    = 256;			/* éä¿¡ãããã¡ã®ãµã¤ãº */
+
+	/* ã¿ã¼ã²ããä¾å­é¨ã¨ã®çµå */
+	cSIOPort = SIOPortTarget1.eSIOPort;
+	eiSIOCBR <= SIOPortTarget1.ciSIOCBR;	/* ã³ã¼ã«ããã¯ */
+};
+
+/*
+ *  Cè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããï¼TECSãã¼ã¹ã®ã·ãªã¢ã«ã¤ã³ã¿
+ *  ãã§ã¼ã¹ãã©ã¤ããå¼ã³åºãããã®ã¢ããã¿ã®çµä¸ãè¨è¿°
+ *
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ãµã¼ãã¹ã³ã¼ã«ãCè¨èªã§è¨è¿°ãããã¢
+ *  ããªã±ã¼ã·ã§ã³ããå¼ã³åºããªãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°ãå
+ *  é¤ããã°ããï¼
+ */
+cell tSerialAdapter SerialAdapter {
+	cSerialPort[0] = SerialPort1.eSerialPort;
+};
+
+/*
+ *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®çµä¸ãè¨è¿°
+ *
+ *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ãå¤ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°ãåé¤ãã
+ *  ã°ããï¼
+ */
+cell tLogTask LogTask {
+	priority  = 3;					/* ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®åªå
+åº¦ */
+	stackSize = LogTaskStackSize;	/* ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº */
+
+	/* ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã¨ã®çµå */
+	cSerialPort        = SerialPort1.eSerialPort;
+	cnSerialPortManage = SerialPort1.enSerialPortManage;
+
+	/* ã·ã¹ãã ã­ã°æ©è½ã¨ã®çµå */
+	cSysLog = SysLog.eSysLog;
+
+	/* ä½ã¬ãã«åºåã¨ã®çµå */
+	cPutLog = PutLogTarget.ePutLog;
+};
+
+/*
+ *  ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸åºåã®çµä¸ãè¨è¿°
+ *
+ *  ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºåãå¤ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°
+ *  ãåé¤ããã°ããï¼
+ */
+cell tBanner Banner {
+	/* å±æ§ã®è¨­å® */
+	targetName      = BannerTargetName;
+	copyrightNotice = BannerCopyrightNotice;
+};
Index: EcnlProtoTool/trunk/asp3_dcre/sample/sample1.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/sample/sample1.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/sample/sample1.cfg	(revision 270)
@@ -0,0 +1,23 @@
+/*
+ *		ãµã³ãã«ãã­ã°ã©ã (1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ *
+ *  $Id$
+ */
+INCLUDE("tecsgen.cfg");
+
+#include "sample1.h"
+CRE_TSK(TASK1, { TA_NULL, 1, task, MID_PRIORITY, STACK_SIZE, NULL });
+CRE_TSK(TASK2, { TA_NULL, 2, task, MID_PRIORITY, STACK_SIZE, NULL });
+CRE_TSK(MAIN_TASK, { TA_ACT, 0, main_task, MAIN_PRIORITY, STACK_SIZE, NULL });
+CRE_TSK(EXC_TASK, { TA_NULL, 0, exc_task, EXC_PRIORITY, STACK_SIZE, NULL });
+AID_TSK(3);
+CRE_CYC(CYCHDR1, { TA_NULL, { TNFY_HANDLER, 0, cyclic_handler }, 2000000, 0 });
+AID_ALM(1);
+#ifdef INTNO1
+CFG_INT(INTNO1, { INTNO1_INTATR, INTNO1_INTPRI });
+CRE_ISR(INTNO1_ISR, { TA_NULL, 0, INTNO1, intno1_isr, 1 });
+#endif /* INTNO1 */
+#ifdef CPUEXC1
+DEF_EXC(CPUEXC1, { TA_NULL, cpuexc_handler });
+#endif /* CPUEXC1 */
+DEF_KMM({ KMM_SIZE, NULL });
Index: EcnlProtoTool/trunk/asp3_dcre/sample/sample1.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/sample/sample1.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/sample/sample1.h	(revision 270)
@@ -0,0 +1,123 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+/*
+ *		ãµã³ãã«ãã­ã°ã©ã (1)ã®ããããã¡ã¤ã«
+ */
+
+#include <kernel.h>
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®å®ç¾©
+ */
+#include "target_test.h"
+
+/*
+ *  åã¿ã¹ã¯ã®åªå
+åº¦ã®å®ç¾©
+ */
+
+#define EXC_PRIORITY	1		/* ä¾å¤å¦çã¿ã¹ã¯ã®åªå
+åº¦ */
+#define MAIN_PRIORITY	6		/* ã¡ã¤ã³ã¿ã¹ã¯ã®åªå
+åº¦ */
+								/* HIGH_PRIORITYããé«ããããã¨ */
+
+#define HIGH_PRIORITY	9		/* ä¸¦è¡å®è¡ãããã¿ã¹ã¯ã®åªå
+åº¦ */
+#define MID_PRIORITY	10
+#define LOW_PRIORITY	11
+
+/*
+ *  ã¿ã¼ã²ããã«ä¾å­ããå¯è½æ§ã®ããå®æ°ã®å®ç¾©
+ */
+
+#ifndef TASK_PORTID
+#define	TASK_PORTID		1			/* æå­å
+¥åããã·ãªã¢ã«ãã¼ãID */
+#endif /* TASK_PORTID */
+
+#ifndef STACK_SIZE
+#define	STACK_SIZE		4096		/* ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº */
+#endif /* STACK_SIZE */
+
+#ifndef KMM_SIZE
+#define	KMM_SIZE		(STACK_SIZE * 16)	/* ã«ã¼ãã«ãå²ãä»ãã   */
+#endif /* KMM_SIZE */						/*     ã¡ã¢ãªé åã®ãµã¤ãº */
+
+#ifndef LOOP_REF
+#define LOOP_REF		ULONG_C(1000000)	/* éåº¦è¨æ¸¬ç¨ã®ã«ã¼ãåæ° */
+#endif /* LOOP_REF */
+
+/*
+ *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+extern void	task(intptr_t exinf);
+extern void	main_task(intptr_t exinf);
+extern void exc_task(intptr_t exinf);
+#ifdef INTNO1
+extern void intno1_isr(intptr_t exinf);
+#endif /* INTNO1 */
+#ifdef CPUEXC1
+extern void	cpuexc_handler(void *p_excinf);
+#endif /* CPUEXC1 */
+extern void	cyclic_handler(intptr_t exinf);
+extern void	alarm_handler(intptr_t exinf);
+
+#endif /* TOPPERS_MACRO_ONLY */
Index: EcnlProtoTool/trunk/asp3_dcre/sample/sample1n.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/sample/sample1n.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/sample/sample1n.c	(revision 270)
@@ -0,0 +1,764 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  ãããã¯ã¼ã¯åãµã³ãã«ãã­ã°ã©ã (1)ã®æ¬ä½
+ */
+
+#include <stdarg.h>
+
+#include <kernel.h>
+#include <t_syslog.h>
+#include "syssvc/serial.h"
+#include "kernel_cfg.h"
+#include "tinet_cfg.h"
+
+#include <netinet/in.h>
+#include <netinet/in_itron.h>
+
+#include "sample1n.h"
+
+/*
+ *  ãã¯ã­å®ç¾©
+ */
+
+/*  ãªãã¼ã ã®è§£é¤  */
+
+#undef syslog
+#undef serial_rea_dat
+#undef serial_ctl_por
+
+#define EOF		(-1)
+
+/*  TELNET ãªãã·ã§ã³ */
+
+#define TELNET_OPT_SE		(240)
+#define TELNET_OPT_NOP		(241)
+#define TELNET_OPT_DM		(242)
+#define TELNET_OPT_BRK		(243)
+#define TELNET_OPT_IP		(244)
+#define TELNET_OPT_AO		(245)
+#define TELNET_OPT_AYT		(246)
+#define TELNET_OPT_EC		(247)
+#define TELNET_OPT_EL		(248)
+#define TELNET_OPT_GA		(249)
+#define TELNET_OPT_SB		(250)
+#define TELNET_OPT_WILL		(251)
+#define TELNET_OPT_WONT		(252)
+#define TELNET_OPT_DO		(253)
+#define TELNET_OPT_DONT		(254)
+#define TELNET_OPT_IAC		(255)
+
+/*
+ *  å¤æ°
+ */
+
+/*  TCP éåä¿¡ã¦ã£ã³ããããã¡  */
+
+uint8_t tcp_swbuf[TCP_SWBUF_SIZE];
+uint8_t tcp_rwbuf[TCP_RWBUF_SIZE];
+
+bool_t		connected	= false;	/* ã³ãã¯ã·ã§ã³ã®ç¶æ
+	*/
+bool_t		wait_accept	= false;	/* æ¥ç¶è¦æ±å¾
+ã¡ä¸­	*/
+
+#ifdef SUPPORT_INET4
+
+T_IPV4EP	dst;
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+T_IPV6EP	dst;
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+uint8_t		*snd_buff	= NULL;
+uint8_t		*rcv_buff	= NULL;
+uint_t		snd_off		= 0;
+uint_t		rcv_off		= 0;
+ER_UINT		snd_len		= 0;
+ER_UINT		rcv_len		= 0;
+uint_t		net_ioctl	= IOCTL_NULL;
+uint8_t		addr[sizeof("0123:4567:89ab:cdef:0123:4567:89ab:cdef")];
+
+/*
+ *  ãããã¯ã¼ã¯å±¤ã®é¸æ
+ */
+
+#ifdef SUPPORT_INET4
+
+#define TCP_ACP_CEP(c,r,d,t)	tcp_acp_cep(c,r,d,t)
+#define IP2STR(s,a)		ip2str(s,a)
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+#define TCP_ACP_CEP(c,r,d,t)	tcp6_acp_cep(c,r,d,t)
+#define IP2STR(s,a)		ipv62str(s,a)
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+/*
+ *  ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã®ã³ã¼ã«ããã¯é¢æ°
+ */
+
+ER
+callback_nblk_tcp (ID cepid, FN fncd, void *p_parblk)
+{
+	ER	error = E_OK;
+
+	switch (fncd) {
+
+	case TFN_TCP_ACP_CEP:
+		IP2STR(addr, &dst.ipaddr);
+		syslog(LOG_NOTICE, "connected:    %s.%d", addr, dst.portno);
+		if (*(ER*)p_parblk == E_OK)
+			connected = true;
+		snd_len = snd_off = rcv_len = rcv_off = 0;
+		wait_accept = false;
+		break;
+
+	case TFN_TCP_CLS_CEP:
+	case TFN_TCP_RCV_BUF:
+	case TFN_TCP_GET_BUF:
+	case TFN_TCP_RCV_DAT:
+	case TFN_TCP_SND_DAT:
+	case TFN_TCP_CON_CEP:
+	case TFN_TCP_SND_OOB:
+	default:
+		error = E_PAR;
+		break;
+		}
+	return error;
+	}
+
+/*
+ *  ã³ãã¯ã·ã§ã³ãåæ­
+ */
+
+ER
+disconnecting (void)
+{
+	ER	error = E_OK;
+
+	if (connected) {
+		syscall(wai_sem(SEM_NET_SEND));
+		if (snd_off > 0)
+			tcp_snd_buf(TCP_CEPID, snd_off);
+		tcp_sht_cep(TCP_CEPID);
+		tcp_cls_cep(TCP_CEPID, TMO_FEVR);
+		connected = false;
+		syscall(sig_sem(SEM_NET_SEND));
+		IP2STR(addr, &dst.ipaddr);
+		syslog(LOG_NOTICE, "disconnected: %s.%d", addr, dst.portno);
+		}
+	return error;
+	}
+
+/*
+ *  éä¿¡ãããã¡ã®ãã©ãã·ã¥
+ */
+
+void
+flush_snd_buff (ID cepid)
+{
+	if (connected) {
+		syscall(wai_sem(SEM_NET_SEND));
+		if (snd_off > 0) {
+			tcp_snd_buf(cepid, snd_off);
+			snd_len = snd_off = 0;
+			}
+		syscall(sig_sem(SEM_NET_SEND));
+		}
+	return;
+	}
+
+/*
+ *  æå­éä¿¡
+ */
+
+void
+put_char (ID cepid, char ch)
+{
+	if (connected) {
+		if (ch == '\n' && (net_ioctl & IOCTL_CRLF) != 0)
+			put_char(cepid, '\r');
+		syscall(wai_sem(SEM_NET_SEND));
+		if (snd_off >= snd_len) {
+			if (tcp_snd_buf(cepid, snd_off) != E_OK) {
+				syscall(sig_sem(SEM_NET_SEND));
+				return;
+				}
+			snd_off = 0;
+			if ((snd_len = tcp_get_buf(cepid, (void**)&snd_buff, TMO_FEVR)) <= 0) {
+				syscall(sig_sem(SEM_NET_SEND));
+				return;
+				}
+			}
+		snd_buff[snd_off ++] = ch;
+		syscall(sig_sem(SEM_NET_SEND));
+		}
+	}
+
+/*
+ *  æå­åä¿¡ï¼å¤æãªãï¼
+ */
+
+int_t
+get_char_raw (ID cepid)
+{
+	if (connected) {
+		if (rcv_off >= rcv_len) {
+			rcv_off = 0;
+			if (tcp_rel_buf(TCP_CEPID, rcv_len) != E_OK) {
+				disconnecting();
+				return EOF;
+				}
+			if ((rcv_len = tcp_rcv_buf(TCP_CEPID, (void**)&rcv_buff, TMO_FEVR)) == 0) {
+				disconnecting();
+				return EOF;
+				}
+			else if (rcv_len < 0) {
+				disconnecting();
+				return EOF;
+				}
+			}
+		return rcv_buff[rcv_off ++];
+		}
+	else
+		return EOF;
+	}
+
+/*
+ *  æå­åä¿¡ï¼TELNET ãªãã·ã§ã³ãã¹ã­ããï¼
+ */
+
+int_t
+get_char (ID cepid)
+{
+	int_t	ch, req;
+
+	while ((ch = get_char_raw(cepid)) == TELNET_OPT_IAC || ch == '\0') {
+		if (ch != '\0') {
+			switch (ch = get_char_raw(cepid)) {
+			case TELNET_OPT_WILL:
+			case TELNET_OPT_WONT:
+			case TELNET_OPT_DO:
+			case TELNET_OPT_DONT:
+				req = get_char_raw(cepid);
+				break;
+			case TELNET_OPT_SB:
+				while ((ch = get_char_raw(cepid)) != EOF && ch != TELNET_OPT_IAC) {
+					if ((ch = get_char_raw(cepid)) == EOF || ch == TELNET_OPT_SE)
+						break;
+					}
+				break;
+			default:
+				break;
+				}
+			}
+		}
+	return ch;
+	}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãããã®èª­åºã
+ */
+
+ER_UINT
+net_serial_rea_dat (ID portid, char *buf, uint_t len)
+{
+	T_SERIAL_RPOR	rpor;
+	uint_t		off;
+	int_t		ch;
+
+	if (!wait_accept && !connected) {
+		wait_accept = true;
+		if (TCP_ACP_CEP(TCP_CEPID, TCP_REPID, &dst, TMO_NBLK) != E_WBLK)
+			return 0;
+		}
+
+	while (true) {
+		if (connected) {
+			off = 0;
+			while (off < len && (ch = get_char(TCP_CEPID)) != EOF) {
+				*(buf + off ++) = ch;
+				if ((net_ioctl & IOCTL_ECHO) != 0) {
+					put_char(TCP_CEPID, ch);
+					flush_snd_buff(TCP_CEPID);
+					}
+				}
+			return off;
+			}
+		else if (serial_ref_por(portid, &rpor) == E_OK && rpor.reacnt > 0) {
+			return serial_rea_dat(portid, buf, len);
+			}
+		dly_tsk(500);
+		}
+	return off;
+	}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãã®å¶å¾¡
+ */
+
+ER
+net_serial_ctl_por (ID portid, uint_t ioctl)
+{
+	net_ioctl = ioctl;
+	return serial_ctl_por(portid, ioctl);
+	}
+
+/*
+ *  ãã£ã¨ãé·ãæ´æ°å (LONGEST) ã¨ç¬¦å·ãªãæ´æ°å (ULONGEST)
+ */
+
+#ifdef LONGLONG_TYPE
+
+typedef LONGLONG_TYPE		LONGEST;
+typedef unsigned LONGLONG_TYPE	ULONGEST;
+
+#else	/* of #ifdef LONGLONG_TYPE */
+
+#ifdef LONG_TYPE
+
+typedef LONG_TYPE		LONGEST;
+typedef unsigned LONG_TYPE	ULONGEST;
+
+#else	/* of #ifdef LONG_TYPE */
+
+typedef int_t			LONGEST;
+typedef uint_t			ULONGEST;
+
+#endif	/* of #ifdef LONG_TYPE */
+
+#endif	/* of #ifdef LONGLONG_TYPE */
+
+/*
+ *  ã­ã°ã®ã·ãã¥ã¬ã¼ã·ã§ã³
+ */
+
+/*  æ°å¤å¤æã®ããã®å¤æè¡¨  */
+
+static const char radhex[] = "0123456789abcdef";
+static const char radHEX[] = "0123456789ABCDEF";
+
+/*
+ *  put_num -- printf ã®æ°å¤å¤æ
+ */
+
+int_t
+put_num(ID cepid, ULONGEST val, int_t radix, const char *radchar, int_t width, bool_t minus, char padchar)
+{
+	char	digits[24];
+	int_t	ix, pad, pchars;
+	bool_t	left;
+
+	if (width < 0) {
+		width = -width;
+		left = true;
+		}
+	else
+		left = false;
+
+	ix = 0;
+	do {
+		digits[ix ++] = radchar[val % radix];
+		val /= radix;
+		} while (val != 0);
+
+	if (minus)
+		digits[ix ++] = '-';
+
+	if (width > ix)
+		pchars = width;
+	else
+		pchars = ix;
+
+	pad = ix;
+	if (!left)	/* å³è©°ã */
+		for ( ; pad < width; pad ++)
+			put_char(cepid, padchar);
+
+	while (ix -- > 0)
+		put_char(cepid, digits[ix]);
+
+	if (left)	/* å·¦è©°ã */
+		for ( ; pad < width; pad ++)
+			put_char(cepid, padchar);
+
+	return pchars;
+	}
+
+#ifdef SUPPORT_INET4
+
+/*
+ *  put_ipv4addr -- IPv4 ã¢ãã¬ã¹åºå
+ */
+
+static int_t
+put_ipv4addr (ID cepid, ULONGEST *addr, int_t width)
+{
+	int_t len = 3;	/* 3 ã¯ '.' ã®æå­æ° */
+
+#if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN
+
+	len += put_num(cepid, (*addr >> 24) & 0xff, 10, radhex, 0, false, ' '); 
+	put_char(cepid, '.');
+	len += put_num(cepid, (*addr >> 16) & 0xff, 10, radhex, 0, false, ' '); 
+	put_char(cepid, '.');
+	len += put_num(cepid, (*addr >>  8) & 0xff, 10, radhex, 0, false, ' '); 
+	put_char(cepid, '.');
+	len += put_num(cepid,  *addr        & 0xff, 10, radhex, 0, false, ' '); 
+
+#else	/* of #if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN */
+
+	len += put_num(cepid,  *addr        & 0xff, 10, radhex, 0, false, ' '); 
+	put_char(cepid, '.');
+	len += put_num(cepid, (*addr >>  8) & 0xff, 10, radhex, 0, false, ' '); 
+	put_char(cepid, '.');
+	len += put_num(cepid, (*addr >> 16) & 0xff, 10, radhex, 0, false, ' '); 
+	put_char(cepid, '.');
+	len += put_num(cepid, (*addr >> 24) & 0xff, 10, radhex, 0, false, ' '); 
+
+#endif	/* of #if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN */
+
+	for ( ; len < width; len ++)
+		put_char(cepid, ' ');
+
+	return len;
+	}
+
+#define PUT_IPADDR(p,a,w)	put_ipv4addr(p,a,w)
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  ipv6addr -- IPv6 ã¢ãã¬ã¹åºå
+ */
+
+static int_t
+put_ipv6addr (ID cepid, const T_IN6_ADDR *addr, int_t width)
+{
+	int_t	len = 0, ix;
+	bool_t	omit = false, zero = false;
+
+	if (addr == NULL) {
+		put_char(cepid, '0');
+		put_char(cepid, ':');
+		put_char(cepid, ':');
+		put_char(cepid, '0');
+		len = 4;
+		}
+	else {
+		for (ix = 0; ix < sizeof(T_IN6_ADDR) / 2; ix ++) {
+			if (omit) {
+				len += put_num(cepid, addr->s6_addr16[ix], 16, radhex, 0, false, ' '); 
+				if (ix < 7) {
+					put_char(cepid, ':');
+					len ++;
+					}
+				}
+			else if (ix > 0 && ix < 7 && addr->s6_addr16[ix] == 0)
+				zero = true;
+			else {
+				if (zero) {
+					omit = true;
+					put_char(cepid, ':');
+					len ++;
+					}
+				len += put_num(cepid, addr->s6_addr16[ix], 16, radhex, 0, false, ' '); 
+				if (ix < 7) {
+					put_char(cepid, ':');
+					len ++;
+					}
+				}
+			}
+
+		for ( ; len < width; len ++)
+			put_char(cepid, ' ');
+		}
+	return len;
+	}
+
+#define PUT_IPADDR(p,a,w)	put_ipv6addr(p,a,w)
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+/*
+ *  put_macaddr -- MAC ã¢ãã¬ã¹åºå
+ */
+
+static int_t
+put_macaddr (ID cepid, char *mac, int_t width)
+{
+	int_t oct, len;
+
+	for (oct = 5; oct -- > 0; ) {
+		put_num(cepid, *mac ++, 16, radhex, 2, false, '0'); 
+		put_char(cepid, ':');
+		}
+	put_num(cepid, *mac, 16, radhex, 2, false, '0'); 
+
+	for (len = 17; len < width; len ++)
+		put_char(cepid, ' ');
+
+	return len;
+	}
+
+/*
+ *  å¼æ°ãåãåºãããã®ãã¯ã­
+ */
+
+#ifdef LONGLONG_TYPE
+
+#ifdef LONG_TYPE
+
+#define GET_ARG(ap,lf)	((lf > 1) ? va_arg(ap, LONGLONG_TYPE)	\
+			 (lf      ? va_arg(ap, LONG_TYPE)	\
+			          : va_arg(ap, int_t)))
+
+#else	/* of #ifdef LONG_TYPE */
+
+#define GET_ARG(ap,lf)	((lf > 1) ? va_arg(ap, LONGLONG_TYPE)	\
+			          : va_arg(ap, int_t))
+
+#endif	/* of #ifdef LONG_TYPE */
+
+#else	/* of #ifdef LONGLONG_TYPE */
+
+#ifdef LONG_TYPE
+
+#define GET_ARG(ap,lf)	 (lf      ? va_arg(ap, LONG_TYPE)	\
+			          : va_arg(ap, int_t))
+
+#else	/* of #ifdef LONG_TYPE */
+
+#define GET_ARG(ap,lf)	(va_arg(ap, int_t))
+
+#endif	/* of #ifdef LONG_TYPE */
+
+#endif	/* of #ifdef LONGLONG_TYPE */
+
+/*
+ *  ã­ã°åºå
+ */
+
+void
+net_syslog (uint_t prio, const char *format, ...)
+{
+	LONGEST	val;
+	SYSLOG	log;
+	va_list	ap;
+	char	padchar, *str;
+	int_t	ch, width, longflag, left, i, c;
+
+	if (connected) {
+		syscall(wai_sem(SEM_TCP_SYSLOG));
+		va_start(ap, format);
+		while ((ch = *format ++) != '\0') {
+			if (ch != '%') {		/* æ¸å¼æå®ä»¥å¤ */
+				put_char(TCP_CEPID, (char)ch);
+				continue;
+				}
+
+			width = longflag = 0;
+			padchar = ' ';
+
+			if (ch == '-') {		/* å·¦è©°ã */
+				format ++;
+				left = -1;
+				}
+			else
+				left = 1;
+
+			if ((ch = *format ++) == '0') {	/* ä¸ä½æ¡ã® 0 */
+				padchar = '0';
+				ch = *format ++;
+				}
+
+			while ('0' <= ch && ch <= '9') {	/* åºåå¹
+ */
+				width = width * 10 + ch - '0';
+				ch = *format ++;
+				}
+
+			while (ch == 'l') {		/* long (long) ã®æå® */
+				longflag ++;
+				ch = *format ++;
+				}
+
+			switch (ch) {
+			case 'd':
+				val = GET_ARG(ap, longflag);
+				if (val >= 0)
+					put_num(TCP_CEPID,  val, 10, radhex, width * left, false, padchar);
+				else
+					put_num(TCP_CEPID, -val, 10, radhex, width * left, true, padchar);
+				break;
+
+			case 'u':
+				val = GET_ARG(ap, longflag);
+				put_num(TCP_CEPID, val, 10, radhex, width * left, false, padchar);
+				break;
+
+			case 'x':
+				val = GET_ARG(ap, longflag);
+				put_num(TCP_CEPID, val, 16, radhex, width * left, false, padchar);
+				break;
+
+			case 'X':
+				val = GET_ARG(ap, longflag);
+				put_num(TCP_CEPID, val, 16, radHEX, width * left, false, padchar);
+				break;
+
+			case 'c':
+				ch = va_arg(ap, int_t);
+				put_char(TCP_CEPID, (char)ch);
+				break;
+
+			case 's':
+				str = va_arg(ap, char*);
+				while ((ch = *str ++) != '\0') {
+					put_char(TCP_CEPID, (char)ch);
+					width --;
+					}
+				while (width -- > 0)
+					put_char(TCP_CEPID, ' ');
+				break;
+
+			case 'I':
+
+#ifdef SUPPORT_INET4
+
+				val = GET_ARG(ap, longflag);
+				put_ipv4addr(TCP_CEPID, (ULONGEST *)val, width);
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+				str = va_arg(ap, char*);
+				put_ipv6addr(TCP_CEPID, (T_IN6_ADDR *)str, width);
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+				break;
+
+			case 'M':
+				str = va_arg(ap, char*);
+				put_macaddr(TCP_CEPID, str, width);
+				break;
+
+			case '%':
+				put_char(TCP_CEPID, '%');
+				break;
+
+			case '0':
+				format --;
+				break;
+
+			default:
+				break;
+				}
+
+			}
+		va_end(ap);
+		put_char(TCP_CEPID, '\n');
+		flush_snd_buff(TCP_CEPID);
+		syscall(sig_sem(SEM_TCP_SYSLOG));
+		return E_OK;
+		}
+	else {
+		log.logtype = LOG_TYPE_COMMENT;
+		log.logpar[0] = (intptr_t)format;
+		i = 1;
+		va_start(ap, format);
+
+		while ((c = *format++) != '\0' && i < TNUM_LOGPAR) {
+			if (c != '%') {
+				continue;
+				}
+
+			c = *format++;
+			while ('0' <= c && c <= '9') {
+				c = *format++;
+				}
+			switch (c) {
+			case 'd':
+				log.logpar[i++] = (intptr_t)va_arg(ap, int_t);
+				break;
+			case 'u':
+			case 'x':
+			case 'X':
+				log.logpar[i++] = (intptr_t)va_arg(ap, uint_t);
+				break;
+			case 'p':
+				log.logpar[i++] = (intptr_t)va_arg(ap, void *);
+				break;
+			case 'c':
+				log.logpar[i++] = (intptr_t)va_arg(ap, int_t);
+				break;
+			case 's':
+				log.logpar[i++] = (intptr_t)va_arg(ap, const char *);
+				break;
+			case '\0':
+				format--;
+				break;
+			default:
+				break;
+				}
+			}
+		va_end(ap);
+		syslog_wri_log(prio, &log);
+		return;
+		}
+	}
Index: EcnlProtoTool/trunk/asp3_dcre/sample/sample1n.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/sample/sample1n.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/sample/sample1n.cdl	(revision 270)
@@ -0,0 +1,125 @@
+/*
+ *		ãµã³ãã«ãã­ã°ã©ã (1)ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+ *
+ *  $Id$
+ */
+/*
+ *  ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å®ç¾©
+ */
+import(<kernel.cdl>);
+
+/*
+ *  ã¿ã¼ã²ããéä¾å­ã®ã»ã«ã¿ã¤ãã®å®ç¾©
+ */
+import("syssvc/tSerialPort.cdl");
+import("syssvc/tSerialAdapter.cdl");
+import("syssvc/tSysLog.cdl");
+import("syssvc/tSysLogAdapter.cdl");
+import("syssvc/tLogTask.cdl");
+import("syssvc/tBanner.cdl");
+
+/*
+ *  ã¿ã¼ã²ããä¾å­é¨ã®åãè¾¼ã¿
+ */
+import("target.cdl");
+
+/*
+ *  ãã»ã«ã®çµä¸ãè¨è¿°ãã¨ã¯ï¼"cell"ã§å§ã¾ãè¡ããï¼ããã«å¯¾å¿ãã"};"
+ *  ã®è¡ã¾ã§ã®ãã¨ãè¨ãï¼
+ */
+
+/*
+ *  ã·ã¹ãã ã­ã°æ©è½ã®çµä¸ãè¨è¿°
+ *
+ *  ã·ã¹ãã ã­ã°æ©è½ãå¤ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°ãåé¤ãï¼ã³
+ *  ã³ãã¤ã«ãªãã·ã§ã³ã«-DTOPPERS_OMIT_SYSLOGãè¿½å ããã°ããï¼ãã ãï¼
+ *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¯ã·ã¹ãã ã­ã°æ©è½ãä½¿ç¨ããããï¼ãããå¤ããã¨
+ *  ãå¿
+è¦ã§ããï¼ã¾ãï¼ã·ã¹ãã ã­ã°æ©è½ã®ã¢ããã¿ãå¤ããªããã°ãªããª
+ *  ãï¼tecsgenãè­¦åã¡ãã»ã¼ã¸ãåºããï¼ç¡è¦ãã¦ããï¼
+ */
+cell tSysLog SysLog {
+	logBufferSize = 32;					/* ã­ã°ãããã¡ã®ãµã¤ãº */
+	initLogMask = C_EXP("LOG_UPTO(LOG_NOTICE)");
+										/* ã­ã°ãããã¡ã«è¨é²ãã¹ãéè¦åº¦ */
+	initLowMask = C_EXP("LOG_UPTO(LOG_EMERG)");
+									   	/* ä½ã¬ãã«åºåãã¹ãéè¦åº¦ */
+	/* ä½ã¬ãã«åºåã¨ã®çµå */
+	cPutLog = PutLogTarget.ePutLog;
+};
+
+/*
+ *  Cè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããï¼TECSãã¼ã¹ã®ã·ã¹ãã ã­ã°æ©è½
+ *  ãå¼ã³åºãããã®ã¢ããã¿ã®çµä¸ãè¨è¿°
+ *
+ *  ã·ã¹ãã ã­ã°æ©è½ã®ãµã¼ãã¹ã³ã¼ã«ï¼syslogé¢æ°ã¨syslog_0é¢æ°ï½syslog_5
+ *  é¢æ°ä»¥å¤ã®ãã®ï¼ã«ãCè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããå¼ã³åºããª
+ *  ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°ãåé¤ããã°ããï¼
+ */
+cell tSysLogAdapter SysLogAdapter {
+	cSysLog = SysLog.eSysLog;
+};
+
+/*
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®çµä¸ãè¨è¿°
+ *
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ããå¤ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨
+ *  è¿°ãåé¤ããã°ããï¼ãã ãï¼ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¯ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼
+ *  ã¹ãã©ã¤ããä½¿ç¨ããããï¼ãããå¤ããã¨ãå¿
+è¦ã§ããï¼ã¾ãï¼ã·ãªã¢
+ *  ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¢ããã¿ãå¤ããªããã°ãªããªãï¼
+ */
+cell tSerialPort SerialPort1 {
+	receiveBufferSize = 256;			/* åä¿¡ãããã¡ã®ãµã¤ãº */
+	sendBufferSize    = 256;			/* éä¿¡ãããã¡ã®ãµã¤ãº */
+
+	/* ã¿ã¼ã²ããä¾å­é¨ã¨ã®çµå */
+	cSIOPort = SIOPortTarget1.eSIOPort;
+	eiSIOCBR <= SIOPortTarget1.ciSIOCBR;	/* ã³ã¼ã«ããã¯ */
+};
+
+/*
+ *  Cè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããï¼TECSãã¼ã¹ã®ã·ãªã¢ã«ã¤ã³ã¿
+ *  ãã§ã¼ã¹ãã©ã¤ããå¼ã³åºãããã®ã¢ããã¿ã®çµä¸ãè¨è¿°
+ *
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ãµã¼ãã¹ã³ã¼ã«ãCè¨èªã§è¨è¿°ãããã¢
+ *  ããªã±ã¼ã·ã§ã³ããå¼ã³åºããªãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°ãå
+ *  é¤ããã°ããï¼
+ */
+cell tSerialAdapter SerialAdapter {
+	cSerialPort[0] = SerialPort1.eSerialPort;
+};
+
+/*
+ *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®çµä¸ãè¨è¿°
+ *
+ *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ãå¤ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°ãåé¤ãã
+ *  ã°ããï¼
+ */
+cell tLogTask LogTask {
+	priority  = 3;					/* ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®åªå
+åº¦ */
+	stackSize = LogTaskStackSize;	/* ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº */
+
+	/* ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã¨ã®çµå */
+	cSerialPort        = SerialPort1.eSerialPort;
+	cnSerialPortManage = SerialPort1.enSerialPortManage;
+
+	/* ã·ã¹ãã ã­ã°æ©è½ã¨ã®çµå */
+	cSysLog = SysLog.eSysLog;
+
+	/* ä½ã¬ãã«åºåã¨ã®çµå */
+	cPutLog = PutLogTarget.ePutLog;
+};
+
+/*
+ *  ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸åºåã®çµä¸ãè¨è¿°
+ *
+ *  ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºåãå¤ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°
+ *  ãåé¤ããã°ããï¼
+ */
+cell tBanner Banner {
+	/* å±æ§ã®è¨­å® */
+	targetName      = BannerTargetName;
+	copyrightNotice = BannerCopyrightNotice;
+};
Index: EcnlProtoTool/trunk/asp3_dcre/sample/sample1n.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/sample/sample1n.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/sample/sample1n.cfg	(revision 270)
@@ -0,0 +1,22 @@
+/*
+ *  @(#) $Id$
+ */
+
+/*
+ *  ãããã¯ã¼ã¯å¯¾å¿ãµã³ãã«ãã­ã°ã©ã (1)ã®
+ *  ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+
+#include "sample1n.h"
+
+INCLUDE("sample1.cfg");
+
+INCLUDE("../tinet/tinet_asp.cfg");
+
+INCLUDE("tinet_sample1n.cfg");
+
+/* ã»ããã© */
+
+CRE_SEM(SEM_TCP_SYSLOG, { TA_TPRI, 1, 1 });
+CRE_SEM(SEM_NET_SEND,   { TA_TPRI, 1, 1 });
Index: EcnlProtoTool/trunk/asp3_dcre/sample/sample1n.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/sample/sample1n.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/sample/sample1n.h	(revision 270)
@@ -0,0 +1,85 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _SAMPLE1N_H_
+#define _SAMPLE1N_H_
+
+#include <tinet_defs.h>
+
+/*
+ *  ãããã¯ã¼ã¯å¯¾å¿ãµã³ãã«ãã­ã°ã©ã (1)ã®ããããã¡ã¤ã«
+ */
+
+/*  TCP éåä¿¡ã¦ã£ã³ããããã¡ãµã¤ãº  */
+
+#define TCP_SWBUF_SIZE	512
+#define TCP_RWBUF_SIZE	512
+
+/*  ãªãã¼ã   */
+
+#define syslog		net_syslog
+#define serial_rea_dat	net_serial_rea_dat
+#define serial_ctl_por	net_serial_ctl_por
+
+#ifndef _MACRO_ONLY
+
+/*  TCP éåä¿¡ã¦ã£ã³ããããã¡  */
+
+extern uint8_t tcp_swbuf[];
+extern uint8_t tcp_rwbuf[];
+
+/*  ãããã¯ã¼ã¯å¯¾å¿åé¢æ°  */
+
+extern void net_syslog(uint_t prio, const char *format, ...) throw();
+extern ER_UINT	net_serial_rea_dat(ID portid, char *buf, uint_t len) throw();
+extern ER	net_serial_ctl_por(ID portid, uint_t ioctl) throw();
+
+/*  ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã®ã³ã¼ã«ããã¯é¢æ°  */
+
+extern ER	callback_nblk_tcp(ID cepid, FN fncd, void *p_parblk);
+
+#endif /* _MACRO_ONLY */
+
+#endif	/* of #ifndef _SAMPLE1N_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/sample/tSample2.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/sample/tSample2.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/sample/tSample2.c	(revision 270)
@@ -0,0 +1,688 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ *
+ *  Copyright (C) 2015-2016 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/* 
+ *  ãµã³ãã«ãã­ã°ã©ã (1)ã®æ¬ä½
+ *
+ *  ASPã«ã¼ãã«ã®åºæ¬çãªåä½ãç¢ºèªããããã®ãµã³ãã«ãã­ã°ã©ã ï¼
+ *
+ *  ãã­ã°ã©ã ã®æ¦è¦:
+ *
+ *  ã¦ã¼ã¶ã¤ã³ã¿ãã§ã¼ã¹ãåãæã¤ã¡ã¤ã³ã¿ã¹ã¯ï¼ã¿ã¹ã¯ID: MAIN_TASKï¼åª
+ *  å
+åº¦: MAIN_PRIORITYï¼ã¨ï¼3ã¤ã®ä¸¦è¡å®è¡ãããã¿ã¹ã¯ï¼ã¿ã¹ã¯ID:
+ *  TASK1ï½TASK3ï¼åæåªå
+åº¦: MID_PRIORITYï¼ã§æ§æãããï¼ã¾ãï¼èµ·åå¨
+ *  æã2ç§ã®å¨æãã³ãã©ï¼å¨æãã³ãã©ID: CYCHDR1ï¼ãç¨ããï¼
+ *
+ *  ä¸¦è¡å®è¡ãããã¿ã¹ã¯ã¯ï¼task_loopåç©ºã«ã¼ããå®è¡ããåº¦ã«ï¼ã¿ã¹ã¯ã
+ *  å®è¡ä¸­ã§ãããã¨ãããããã¡ãã»ã¼ã¸ãè¡¨ç¤ºããï¼ç©ºã«ã¼ããå®è¡ãã
+ *  ã®ã¯ï¼ç©ºã«ã¼ããªãã§ã¡ãã»ã¼ã¸ãåºåããã¨ï¼å¤éã®ã¡ãã»ã¼ã¸ãåºå
+ *  ããï¼ãã­ã°ã©ã ã®åä½ãç¢ºèªãããããªãããã§ããï¼ã¾ãï¼ä½éãªã·
+ *  ãªã¢ã«ãã¼ããç¨ãã¦ã¡ãã»ã¼ã¸ãåºåããå ´åã«ï¼ãã¹ã¦ã®ã¡ãã»ã¼ã¸
+ *  ãåºåã§ããããã«ï¼ã¡ãã»ã¼ã¸ã®éãå¶éããã¨ããçç±ãããï¼
+ *
+ *  å¨æãã³ãã©ã¯ï¼ä¸ã¤ã®åªå
+åº¦ï¼HIGH_PRIORITYï¼MID_PRIORITYï¼
+ *  LOW_PRIORITYï¼ã®ã¬ãã£ã­ã¥ã¼ãåè»¢ãããï¼ãã­ã°ã©ã ã®èµ·åç´å¾ã¯ï¼
+ *  å¨æãã³ãã©ã¯åæ­¢ç¶æ
+ã«ãªã£ã¦ããï¼
+ *
+ *  ã¡ã¤ã³ã¿ã¹ã¯ã¯ï¼ã·ãªã¢ã«I/Oãã¼ãããã®æå­å
+¥åãè¡ãï¼æå­å
+¥åã
+ *  å¾
+ã£ã¦ããéã¯ï¼ä¸¦åå®è¡ãããã¿ã¹ã¯ãå®è¡ããã¦ããï¼ï¼å
+¥åããã
+ *  æå­ã«å¯¾å¿ããå¦çãå®è¡ããï¼å
+¥åãããæå­ã¨å¦çã®é¢ä¿ã¯æ¬¡ã®éãï¼
+ *  Control-Cã¾ãã¯'Q'ãå
+¥åãããã¨ï¼ãã­ã°ã©ã ãçµäºããï¼
+ *
+ *  '1' : å¯¾è±¡ã¿ã¹ã¯ãTASK1ã«åãæããï¼åæè¨­å®ï¼ï¼
+ *  '2' : å¯¾è±¡ã¿ã¹ã¯ãTASK2ã«åãæããï¼
+ *  '3' : å¯¾è±¡ã¿ã¹ã¯ãTASK3ã«åãæããï¼
+ *  'a' : å¯¾è±¡ã¿ã¹ã¯ãcTask_activateã«ããèµ·åããï¼
+ *  'A' : å¯¾è±¡ã¿ã¹ã¯ã«å¯¾ããèµ·åè¦æ±ãcTask_cancelActivateã«ããã­ã£ã³ã»ã«ããï¼
+ *  'e' : å¯¾è±¡ã¿ã¹ã¯ã«exitTaskãå¼ã³åºããï¼çµäºãããï¼
+ *  't' : å¯¾è±¡ã¿ã¹ã¯ãcTask_terminateã«ããå¼·å¶çµäºããï¼
+ *  '>' : å¯¾è±¡ã¿ã¹ã¯ã®åªå
+åº¦ãHIGH_PRIORITYã«ããï¼
+ *  '=' : å¯¾è±¡ã¿ã¹ã¯ã®åªå
+åº¦ãMID_PRIORITYã«ããï¼
+ *  '<' : å¯¾è±¡ã¿ã¹ã¯ã®åªå
+åº¦ãLOW_PRIORITYã«ããï¼
+ *  'G' : å¯¾è±¡ã¿ã¹ã¯ã®åªå
+åº¦ãcTask_getPriorityã§èª­ã¿åºãï¼
+ *  's' : å¯¾è±¡ã¿ã¹ã¯ã«sleepãå¼ã³åºããï¼èµ·åºå¾
+ã¡ã«ãããï¼
+ *  'S' : å¯¾è±¡ã¿ã¹ã¯ã«sleepTimeout10ç§)ãå¼ã³åºããï¼èµ·åºå¾
+ã¡ã«ãããï¼
+ *  'w' : å¯¾è±¡ã¿ã¹ã¯ãcTask_wakeupã«ããèµ·åºããï¼
+ *  'W' : å¯¾è±¡ã¿ã¹ã¯ã«å¯¾ããèµ·åºè¦æ±ãcTask_cancelWakeupã«ããã­ã£ã³ã»ã«ããï¼
+ *  'l' : å¯¾è±¡ã¿ã¹ã¯ãcTask_releaseWaitã«ããå¼·å¶çã«å¾
+ã¡è§£é¤ã«ããï¼
+ *  'u' : å¯¾è±¡ã¿ã¹ã¯ãcTask_suspendã«ããå¼·å¶å¾
+ã¡ç¶æ
+ã«ããï¼
+ *  'm' : å¯¾è±¡ã¿ã¹ã¯ã®å¼·å¶å¾
+ã¡ç¶æ
+ãcTask_resumeã«ããè§£é¤ããï¼
+ *  'd' : å¯¾è±¡ã¿ã¹ã¯ã«delay(10ç§)ãå¼ã³åºããï¼æéçµéå¾
+ã¡ã«ãããï¼
+ *  'x' : å¯¾è±¡ã¿ã¹ã¯ã«raiseTerminateã«ããçµäºè¦æ±ããï¼
+ *  'y' : å¯¾è±¡ã¿ã¹ã¯ã«disableTerminateãå¼ã³åºããï¼ã¿ã¹ã¯çµäºãç¦æ­¢ããï¼
+ *  'Y' : å¯¾è±¡ã¿ã¹ã¯ã«enableTerminateãå¼ã³åºããï¼ã¿ã¹ã¯çµäºãè¨±å¯ããï¼
+ *  'r' : 3ã¤ã®åªå
+åº¦ï¼HIGH_PRIORITYï¼MID_PRIORITYï¼LOW_PRIORITYï¼ã®ã¬
+ *        ãã£ã­ã¥ã¼ãåè»¢ãããï¼
+ *  'c' : å¨æãã³ãã©ãåä½éå§ãããï¼
+ *  'C' : å¨æãã³ãã©ãåä½åæ­¢ãããï¼
+ *  'b' : ã¢ã©ã¼ã ãã³ãã©ã5ç§å¾ã«èµ·åããããåä½éå§ãããï¼
+ *  'B' : ã¢ã©ã¼ã ãã³ãã©ãåä½åæ­¢ãããï¼
+ *  'z' : å¯¾è±¡ã¿ã¹ã¯ã«CPUä¾å¤ãçºçãããï¼ã¿ã¹ã¯ãçµäºãããï¼ï¼
+ *  'Z' : å¯¾è±¡ã¿ã¹ã¯ã«CPUã­ãã¯ç¶æ
+ã§CPUä¾å¤ãçºçãããï¼ãã­ã°ã©ã ã
+ *        çµäºããï¼ï¼
+ *  'V' : fetchHighResolutionTimerã§é«åè§£è½ã¿ã¤ãã2åèª­ãï¼
+ *  'v' : çºè¡ããã·ã¹ãã ã³ã¼ã«ãè¡¨ç¤ºããï¼ããã©ã«ãï¼ï¼
+ *  'q' : çºè¡ããã·ã¹ãã ã³ã¼ã«ãè¡¨ç¤ºããªãï¼
+ * å¼ã³å£é¢æ° #_TCPF_#
+ * require port: signature:sKernel context:task
+ *   ER             getExtendedInformation( intptr_t* p_exinf );
+ *   ER             sleep( );
+ *   ER             sleepTimeout( TMO timeout );
+ *   ER             delay( RELTIM delayTime );
+ *   ER             exit( );
+ *   ER             disableTerminate( );
+ *   ER             enableTerminate( );
+ *   bool_t         senseTerminate( );
+ *   ER             setTime( SYSTIM systemTime );
+ *   ER             getTime( SYSTIM* p_systemTime );
+ *   ER             adjustTime( int32_t adjustTime );
+ *   HRTCNT         fetchHighResolutionTimer( );
+ *   ER             rotateReadyQueue( PRI taskPriority );
+ *   ER             getTaskId( ID* p_taskId );
+ *   ER             getLoad( PRI taskPriority, uint_t* p_load );
+ *   ER             getNthTask( PRI taskPriority, uint_t nth, ID* p_taskID );
+ *   ER             lockCpu( );
+ *   ER             unlockCpu( );
+ *   ER             disableDispatch( );
+ *   ER             enableDispatch( );
+ *   bool_t         senseContext( );
+ *   bool_t         senseLock( );
+ *   bool_t         senseDispatch( );
+ *   bool_t         senseDispatchPendingState( );
+ *   bool_t         senseKernel( );
+ *   ER             exitKernel( );
+ *   ER             changeInterruptPriorityMask( PRI interruptPriority );
+ *   ER             getInterruptPriorityMask( PRI* p_interruptPriority );
+ * require port: signature:siKernel context:non-task
+ *   HRTCNT         ciKernel_fetchHighResolutionTimer( );
+ *   ER             ciKernel_rotateReadyQueue( PRI taskPriority );
+ *   ER             ciKernel_getTaskId( ID* p_taskId );
+ *   ER             ciKernel_lockCpu( );
+ *   ER             ciKernel_unlockCpu( );
+ *   bool_t         ciKernel_senseContext( );
+ *   bool_t         ciKernel_senseLock( );
+ *   bool_t         ciKernel_senseDispatch( );
+ *   bool_t         ciKernel_senseDispatchPendingState( );
+ *   bool_t         ciKernel_senseKernel( );
+ *   ER             ciKernel_exitKernel( );
+ *   bool_t         ciKernel_exceptionSenseDispatchPendingState( const void* p_exceptionInformation );
+ * call port: cTask signature: sTask context:task
+ *   ER             cTask_activate( subscript );
+ *   ER_UINT        cTask_cancelActivate( subscript );
+ *   ER             cTask_getTaskState( subscript, STAT* p_tskstat );
+ *   ER             cTask_changePriority( subscript, PRI priority );
+ *   ER             cTask_getPriority( subscript, PRI* p_priority );
+ *   ER             cTask_refer( subscript, T_RTSK* pk_taskStatus );
+ *   ER             cTask_wakeup( subscript );
+ *   ER_UINT        cTask_cancelWakeup( subscript );
+ *   ER             cTask_releaseWait( subscript );
+ *   ER             cTask_suspend( subscript );
+ *   ER             cTask_resume( subscript );
+ *   ER             cTask_raiseTerminate( subscript );
+ *   ER             cTask_terminate( subscript );
+ *       subscript:  0...(NCP_cTask-1)
+ * call port: cExceptionTask signature: sTask context:task
+ *   ER             cExceptionTask_activate( );
+ *   ER_UINT        cExceptionTask_cancelActivate( );
+ *   ER             cExceptionTask_getTaskState( STAT* p_tskstat );
+ *   ER             cExceptionTask_changePriority( PRI priority );
+ *   ER             cExceptionTask_getPriority( PRI* p_priority );
+ *   ER             cExceptionTask_refer( T_RTSK* pk_taskStatus );
+ *   ER             cExceptionTask_wakeup( );
+ *   ER_UINT        cExceptionTask_cancelWakeup( );
+ *   ER             cExceptionTask_releaseWait( );
+ *   ER             cExceptionTask_suspend( );
+ *   ER             cExceptionTask_resume( );
+ *   ER             cExceptionTask_raiseTerminate( );
+ *   ER             cExceptionTask_terminate( );
+ * call port: cCyclic signature: sCyclic context:task
+ *   ER             cCyclic_start( );
+ *   ER             cCyclic_stop( );
+ *   ER             cCyclic_refer( T_RCYC* pk_cyclicHandlerStatus );
+ * call port: cAlarm signature: sAlarm context:task
+ *   ER             cAlarm_start( RELTIM alarmTime );
+ *   ER             cAlarm_stop( );
+ *   ER             cAlarm_refer( T_RALM* pk_alarmStatus );
+ * call port: cSerialPort signature: sSerialPort context:task optional:true
+ *   bool_t     is_cSerialPort_joined()                     check if joined
+ *   ER             cSerialPort_open( );
+ *   ER             cSerialPort_close( );
+ *   ER_UINT        cSerialPort_read( char* buffer, uint_t length );
+ *   ER_UINT        cSerialPort_write( const char* buffer, uint_t length );
+ *   ER             cSerialPort_control( uint_t ioControl );
+ *   ER             cSerialPort_refer( T_SERIAL_RPOR* pk_rpor );
+ * call port: cSysLog signature: sSysLog context:task
+ *   ER             cSysLog_write( uint_t priority, const SYSLOG* p_syslog );
+ *   ER_UINT        cSysLog_read( SYSLOG* p_syslog );
+ *   ER             cSysLog_mask( uint_t logMask, uint_t lowMask );
+ *   ER             cSysLog_refer( T_SYSLOG_RLOG* pk_rlog );
+ *   ER             cSysLog_flush( );
+ * #[</PREAMBLE>]# */  
+
+#include "tSample2_tecsgen.h"
+#include <kernel.h>
+#include <t_syslog.h>
+#include <t_stdlib.h>
+#include "kernel_cfg.h"
+#include "tSample2.h"
+
+/*
+ *  ãµã¼ãã¹ã³ã¼ã«ã®ã¨ã©ã¼ã®ã­ã°åºå
+ */
+Inline void
+svc_perror(const char *file, int_t line, const char *expr, ER ercd)
+{
+	if (ercd < 0) {
+		t_perror(LOG_ERROR, file, line, expr, ercd);
+	}
+}
+
+#define	SVC_PERROR(expr)	svc_perror(__FILE__, __LINE__, #expr, (expr))
+
+/*
+ *  ä¸¦è¡å®è¡ãããã¿ã¹ã¯ã¸ã®ã¡ãã»ã¼ã¸é å
+ */
+char	message[3];
+
+/*
+ *  ã«ã¼ãåæ°
+ */
+ulong_t	task_loop;		/* ã¿ã¹ã¯å
+ã§ã®ã«ã¼ãåæ° */
+
+/*
+ *  ä¸¦è¡å®è¡ãããã¿ã¹ã¯
+ */
+void eSampleTask_main(int_t subscript)
+{
+	volatile ulong_t	i;
+	int_t		n = 0;
+	int_t		tskno = subscript + 1; 
+	const char	*graph[] = { "|", "  +", "    *" };
+	char		c;
+
+	while (true) {
+		syslog(LOG_NOTICE, "task%d is running (%03d).   %s",
+										tskno, ++n, graph[tskno-1]);
+		for (i = 0; i < task_loop; i++);
+		c = message[tskno-1];
+		message[tskno-1] = 0;
+		switch (c) {
+		case 'e':
+			syslog(LOG_INFO, "#%d#exit()", tskno);
+			SVC_PERROR(exit());
+			assert(0);
+		case 's':
+			syslog(LOG_INFO, "#%d#sleep()", tskno);
+			SVC_PERROR(sleep());
+			break;
+		case 'S':
+			syslog(LOG_INFO, "#%d#sleepTimeout(10000)", tskno);
+			SVC_PERROR(sleepTimeout(10000));
+			break;
+		case 'd':
+			syslog(LOG_INFO, "#%d#delay(10000)", tskno);
+			SVC_PERROR(delay(10000));
+			break;
+		case 'y':
+			syslog(LOG_INFO, "#%d#disableTerminate()", tskno);
+			SVC_PERROR(disableTerminate());
+			break;
+		case 'Y':
+			syslog(LOG_INFO, "#%d#enableTerminate()", tskno);
+			SVC_PERROR(enableTerminate());
+			break;
+#ifdef CPUEXC1
+		case 'z':
+			syslog(LOG_NOTICE, "#%d#raise CPU exception", tskno);
+			RAISE_CPU_EXCEPTION;
+			break;
+		case 'Z':
+			SVC_PERROR(lockCpu());
+			syslog(LOG_NOTICE, "#%d#raise CPU exception", tskno);
+			RAISE_CPU_EXCEPTION;
+			SVC_PERROR(unlockCpu());
+			break;
+#endif /* CPUEXC1 */
+		default:
+			break;
+		}
+	}
+}
+
+/*
+ *  CPUä¾å¤ãã³ãã©
+ */
+
+ID	cpuexc_tskid;		/* CPUä¾å¤ãèµ·ãããã¿ã¹ã¯ã®ID */
+
+#ifdef CPUEXC1
+
+void
+cpuexc_handler(void *p_excinf)
+{
+	
+	syslog(LOG_NOTICE, "CPU exception handler (p_excinf = %08p).", p_excinf);
+	if (ciKernel_senseContext() != true) {
+		syslog(LOG_WARNING,
+					"ciKernel_senseContext() is not true in CPU exception handler.");
+	}
+	if (ciKernel_senseDispatchPendingState() != true) {
+		syslog(LOG_WARNING,
+					"ciKernel_senseDispatchPendingState() is not true in CPU exception handler.");
+	}
+	syslog(LOG_INFO, "ciKernel_senseLock() = %d ciKernel_senseDispatch() = %d ciKernel_exceptionSenseDispatchPendingState() = %d",
+		   ciKernel_senseLock(), ciKernel_senseDispatch(), ciKernel_exceptionSenseDispatchPendingState(p_excinf));
+
+	if (ciKernel_exceptionSenseDispatchPendingState(p_excinf)) {
+		syslog(LOG_NOTICE, "Sample program ends with exception.");
+		SVC_PERROR(ciKernel_senseKernel());
+		assert(0);
+	}
+
+#ifdef PREPARE_RETURN_CPUEXC
+	PREPARE_RETURN_CPUEXC;
+	SVC_PERROR(ciKernel_getTaskId(&cpuexc_tskid));
+	cExceptionTask_activate();
+#else /* PREPARE_RETURN_CPUEXC */
+	syslog(LOG_NOTICE, "Sample program ends with exception.");
+	SVC_PERROR(ciKernel_exitKernel());
+	assert(0);
+#endif /* PREPARE_RETURN_CPUEXC */
+}
+
+#endif /* CPUEXC1 */
+
+/*
+ *  å¨æãã³ãã©
+ *
+ *  HIGH_PRIORITYï¼MID_PRIORITYï¼LOW_PRIORITY ã®ååªå
+åº¦ã®ã¬ãã£ã­ã¥ã¼
+ *  ãåè»¢ãããï¼
+ */
+/* #[<ENTRY_FUNC>]# eiCyclicHandler_main
+ * name:         eiCyclicHandler_main
+ * global_name:  tSample2_eiCyclicHandler_main
+ * oneway:       
+ * #[/ENTRY_FUNC>]# */
+void
+eiCyclicHandler_main()
+{
+	SVC_PERROR(ciKernel_rotateReadyQueue(HIGH_PRIORITY));
+	SVC_PERROR(ciKernel_rotateReadyQueue(MID_PRIORITY));
+	SVC_PERROR(ciKernel_rotateReadyQueue(LOW_PRIORITY));
+}
+
+/*
+ *  ã¢ã©ã¼ã ãã³ãã©
+ *
+ *  HIGH_PRIORITYï¼MID_PRIORITYï¼LOW_PRIORITY ã®ååªå
+åº¦ã®ã¬ãã£ã­ã¥ã¼
+ *  ãåè»¢ãããï¼
+ */
+/* #[<ENTRY_FUNC>]# eiAlarmHandler_main
+ * name:         eiAlarmHandler_main
+ * global_name:  tSample2_eiAlarmHandler_main
+ * oneway:       
+ * #[/ENTRY_FUNC>]# */
+void
+eiAlarmHandler_main()
+{
+	SVC_PERROR(ciKernel_rotateReadyQueue(HIGH_PRIORITY));
+	SVC_PERROR(ciKernel_rotateReadyQueue(MID_PRIORITY));
+	SVC_PERROR(ciKernel_rotateReadyQueue(LOW_PRIORITY));
+}
+/*
+ *  ä¾å¤å¦çã¿ã¹ã¯
+ */
+/* #[<ENTRY_FUNC>]# eExceptionTask_main
+ * name:         eExceptionTask_main
+ * global_name:  tSample2_eExceptionTask_main
+ * oneway:       
+ * #[/ENTRY_FUNC>]# */
+void eExceptionTask_main()
+{
+	SVC_PERROR(ras_ter(cpuexc_tskid));
+}
+/*
+ *  ã¡ã¤ã³ã¿ã¹ã¯
+ */
+/* å±æ§ã®è¨­å® *//* #[<ENTRY_FUNC>]# eMainTask_main
+ * name:         eMainTask_main
+ * global_name:  tSample2_eMainTask_main
+ * oneway:       
+ * #[/ENTRY_FUNC>]# */
+void
+eMainTask_main()
+{
+	char	c;
+	volatile ulong_t	i;
+	ulong_t j;
+	int_t	tskno = 1;
+	ER_UINT	ercd;
+	PRI		tskpri;
+	SYSTIM	stime1, stime2;
+	HRTCNT	hrtcnt1, hrtcnt2;
+
+	if (is_cSerialPort_joined()) {
+		SVC_PERROR(cSysLog_mask(LOG_UPTO(LOG_INFO), LOG_UPTO(LOG_ERROR)));
+	} else {
+		/*
+		 *  ã·ãªã¢ã«åºåãã§ããªãå ´åãã­ã°ã¡ãã»ã¼ã¸ãå
+¨ã¦
+		 *  ä½ã¬ãã«åºåã«ããåºåããã
+		 */
+		SVC_PERROR(cSysLog_mask(LOG_UPTO(LOG_INFO), LOG_UPTO(LOG_DEBUG)));
+	}
+	syslog(LOG_NOTICE, "Sample program starts.");
+
+	/*
+	 *  ã·ãªã¢ã«ãã¼ãã®åæå
+	 *
+	 *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¨åãã·ãªã¢ã«ãã¼ããä½¿ãå ´åãªã©ï¼ã·ãªã¢ã«
+	 *  ãã¼ãããªã¼ãã³æ¸ã¿ã®å ´åã«ã¯ããã§E_OBJã¨ã©ã¼ã«ãªããï¼æ¯éã¯
+	 *  ãªãï¼
+	 */
+
+	if (is_cSerialPort_joined()) {
+		ercd = cSerialPort_open();
+		if (ercd < 0 && MERCD(ercd) != E_OBJ) {
+			syslog(LOG_ERROR, "%s (%d) reported by `cSerialPort_open'.",
+										itron_strerror(ercd), SERCD(ercd));
+		}
+		SVC_PERROR(cSerialPort_control(IOCTL_CRLF | IOCTL_FCSND | IOCTL_FCRCV));
+	}
+
+	/*
+ 	 *  ã«ã¼ãåæ°ã®è¨­å®
+	 *
+	 *  ä¸¦è¡å®è¡ãããã¿ã¹ã¯å
+ã§ã®ç©ºã«ã¼ãã®åæ°ï¼task_loopï¼ã¯ï¼ç©ºã«ã¼
+	 *  ãã®å®è¡æéãç´0.4ç§ã«ãªãããã«è¨­å®ããï¼ãã®è¨­å®ã®ããã«ï¼
+	 *  LOOP_REFåã®ç©ºã«ã¼ãã®å®è¡æéãï¼ãã®åå¾ã§get_timãå¼ã¶ãã¨ã§
+	 *  æ¸¬å®ãï¼ãã®æ¸¬å®çµæããç©ºã«ã¼ãã®å®è¡æéã0.4ç§ã«ãªãã«ã¼ãå
+	 *  æ°ãæ±ãï¼task_loopã«è¨­å®ããï¼
+	 *
+	 *  LOOP_REFã¯ï¼ããã©ã«ãã§ã¯1,000,000ã«è¨­å®ãã¦ãããï¼æ³å®ããã
+	 *  ãé
+ããã­ã»ããµã§ã¯ï¼ãµã³ãã«ãã­ã°ã©ã ã®å®è¡éå§ã«æéããã
+	 *  ããããã¨ããåé¡ãçããï¼éã«æ³å®ããããéããã­ã»ããµã§ã¯ï¼
+	 *  LOOP_REFåã®ç©ºã«ã¼ãã®å®è¡æéãç­ããªãï¼task_loopã«è¨­å®ããå¤
+	 *  ã®èª¤å·®ãå¤§ãããªãã¨ããåé¡ãããï¼
+	 *
+	 *  ããã§ï¼ãã®ãããªã¿ã¼ã²ããã§ã¯ï¼target_test.hã§ï¼LOOP_REFãé©
+	 *  åãªå¤ã«å®ç¾©ããã®ãæã¾ããï¼
+	 *
+	 *  ã¾ãï¼task_loopã®å¤ãåºå®ãããå ´åã«ã¯ï¼ãã®å¤ãTASK_LOOPã«ã
+	 *  ã¯ã­å®ç¾©ããï¼TASK_LOOPããã¯ã­å®ç¾©ããã¦ããå ´åï¼ä¸è¨ã®æ¸¬å®ã
+	 *  è¡ããã«ï¼TASK_LOOPã«å®ç¾©ãããå¤ãç©ºã«ã¼ãã®åæ°ã¨ããï¼
+	 *
+	 * ã¿ã¼ã²ããã«ãã£ã¦ã¯ï¼ç©ºã«ã¼ãã®å®è¡æéã®1åç®ã®æ¸¬å®ã§ï¼æ¬æ¥ã
+	 * ããé·ãã«ãªããã®ãããï¼ãã®ãããªã¿ã¼ã²ããã§ã¯ï¼MEASURE_TWICE
+	 * ããã¯ã­å®ç¾©ãããã¨ã§ï¼1åç®ã®æ¸¬å®çµæãæ¨ã¦ã¦ï¼2åç®ã®æ¸¬å®çµæ
+	 * ãä½¿ãï¼
+	 */
+#ifdef TASK_LOOP
+	task_loop = TASK_LOOP;
+#else /* TASK_LOOP */
+
+#ifdef MEASURE_TWICE
+	task_loop = LOOP_REF;
+	SVC_PERROR(get_tim(&stime1));
+	for (i = 0; i < task_loop; i++);
+	SVC_PERROR(get_tim(&stime2));
+#endif /* MEASURE_TWICE */
+
+	task_loop = LOOP_REF;
+	SVC_PERROR(get_tim(&stime1));
+	for (i = 0; i < task_loop; i++);
+	SVC_PERROR(get_tim(&stime2));
+	task_loop = LOOP_REF * 400LU / (ulong_t)(stime2 - stime1) * 1000LU;
+
+#endif /* TASK_LOOP */
+
+	/*
+ 	 *  ã¿ã¹ã¯ã®èµ·å
+	 */
+
+	SVC_PERROR(cTask_activate( 1 ));
+	SVC_PERROR(cTask_activate( 2 ));
+	SVC_PERROR(cTask_activate( 3 ));
+
+	/*
+ 	 *  ã¡ã¤ã³ã«ã¼ã
+	 */
+	if (is_cSerialPort_joined()) {
+		do {
+			SVC_PERROR(cSerialPort_read(&c, 1));
+			switch (c) {
+			case 'e':
+			case 's':
+			case 'S':
+			case 'd':
+			case 'y':
+			case 'Y':
+			case 'z':
+			case 'Z':
+				message[tskno-1] = c;
+				break;
+			case '1':
+				tskno = 1;
+				break;
+			case '2':
+				tskno = 2;
+				break;
+			case '3':
+				tskno = 3;
+				break;
+			case 'a':
+				syslog(LOG_INFO, "#cTask_activate(%d)", tskno);
+				SVC_PERROR(cTask_activate(tskno));
+				break;
+			case 'A':
+				syslog(LOG_INFO, "#cTask_cancelActivate(%d)", tskno);
+				SVC_PERROR(cTask_cancelActivate(tskno));
+
+				if (ercd >= 0) {
+					syslog(LOG_NOTICE, "cTask_cancelActivate(%d) returns %d", tskno, ercd);
+				}
+				break;
+			case 't':
+				syslog(LOG_INFO, "#cTask_terminate(%d)", tskno);
+				SVC_PERROR(cTask_terminate(tskno));
+				break;
+			case '>':
+				syslog(LOG_INFO, "#cTask_changePriority(%d, HIGH_PRIORITY)", tskno);
+				SVC_PERROR(cTask_changePriority(tskno, HIGH_PRIORITY));
+				break;
+			case '=':
+				syslog(LOG_INFO, "#cTask_changePriority(%d, MID_PRIORITY)", tskno);
+				SVC_PERROR(cTask_changePriority(tskno, MID_PRIORITY));
+				break;
+			case '<':
+				syslog(LOG_INFO, "#(cTask_changePriority(%d, LOW_PRIORITY)", tskno);
+				SVC_PERROR(cTask_changePriority(tskno, LOW_PRIORITY));
+				break;
+			case 'G':
+				syslog(LOG_INFO, "#cTask_getPriority(%d, &tskpri)", tskno);
+				SVC_PERROR(ercd = cTask_getPriority(tskno, &tskpri));
+				if (ercd >= 0) {
+					syslog(LOG_NOTICE, "priority of task %d is %d", tskno, tskpri);
+				}
+				break;
+			case 'w':
+				syslog(LOG_INFO, "#cTask_wakeup(%d)", tskno);
+				SVC_PERROR(cTask_wakeup(tskno));
+				break;
+			case 'W':
+				syslog(LOG_INFO, "#cTask_cancelWakeup(%d)", tskno);
+				SVC_PERROR(ercd = cTask_cancelWakeup(tskno));
+				if (ercd >= 0) {
+					syslog(LOG_NOTICE, "cTask_cancelWakeup(%d) returns %d", tskno, ercd);
+				}
+				break;
+			case 'l':
+				syslog(LOG_INFO, "#cTask_releaseWait(%d)", tskno);
+				SVC_PERROR(cTask_releaseWait(tskno));
+				break;
+			case 'u':
+				syslog(LOG_INFO, "#cTask_suspend(%d)", tskno);
+				SVC_PERROR(cTask_suspend(tskno));
+				break;
+			case 'm':
+				syslog(LOG_INFO, "#cTask_resume(%d)", tskno);
+				SVC_PERROR(cTask_resume(tskno));
+				break;
+			case 'x':
+				syslog(LOG_INFO, "#cTask_raiseTerminate(%d)", tskno);
+				SVC_PERROR(cTask_raiseTerminate(tskno));
+				break;
+			case 'X':
+				syslog(LOG_INFO, "#cTask_raiseTerminate(%d)", tskno);
+				SVC_PERROR(cTask_raiseTerminate(tskno));
+				break;
+			case 'r':
+				syslog(LOG_INFO, "#rotateReadyQueue(three priorities)");
+				SVC_PERROR(rotateReadyQueue(HIGH_PRIORITY));
+				SVC_PERROR(rotateReadyQueue(MID_PRIORITY));
+				SVC_PERROR(rotateReadyQueue(LOW_PRIORITY));
+				break;
+			case 'c':
+				syslog(LOG_INFO, "#cCyclic_start(1)");
+				SVC_PERROR(cCyclic_start());
+				break;
+			case 'C':
+				syslog(LOG_INFO, "#cCyclic_stop(1)");
+				SVC_PERROR(cCyclic_stop());
+				break;
+			case 'b':
+				syslog(LOG_INFO, "#cAlarm_start(1, 5000000)");
+				SVC_PERROR(cAlarm_start(5000000));
+				break;
+			case 'B':
+				syslog(LOG_INFO, "#cAlarm_stop()(1)");
+				SVC_PERROR(cAlarm_stop());
+				break;
+			case 'V':
+				hrtcnt1 = fetchHighResolutionTimer();
+				hrtcnt2 = fetchHighResolutionTimer();
+				syslog(LOG_NOTICE, "hrtcnt1 = %tu, hrtcnt2 = %tu",
+											hrtcnt1, hrtcnt2);
+				break;
+			case 'v':
+				SVC_PERROR(cSysLog_mask(LOG_UPTO(LOG_INFO),
+											LOG_UPTO(LOG_EMERG)));
+				break;
+			case 'q':
+				SVC_PERROR(cSysLog_mask(LOG_UPTO(LOG_NOTICE),
+											LOG_UPTO(LOG_EMERG)));
+				break;
+#ifdef BIT_KERNEL
+			case ' ':
+				SVC_PERROR(lockCpu());
+				{
+					extern ER	bit_kernel(void);
+
+					SVC_PERROR(ercd = bit_kernel());
+					if (ercd >= 0) {
+						syslog(LOG_NOTICE, "bit_kernel passed.");
+					}
+				}
+				SVC_PERROR(unlockCpu());
+				break;
+#endif /* BIT_KERNEL */
+
+			default:
+				break;
+			}
+		} while (c != '\003' && c != 'Q');
+	} else {
+		syslog(LOG_NOTICE, "cSerialPort of tSample2 is not joined.");
+		syslog(LOG_NOTICE, "Sample program will halt after 40 seconds.");
+		for (j = 0; j < 100; j++) {
+			for (i = 0; i < task_loop; i++);
+		}
+	}
+
+	syslog(LOG_NOTICE, "Sample program ends.");
+	SVC_PERROR(ciKernel_exitKernel());
+	assert(0);
+}
Index: EcnlProtoTool/trunk/asp3_dcre/sample/tSample2.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/sample/tSample2.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/sample/tSample2.cdl	(revision 270)
@@ -0,0 +1,203 @@
+/*
+ *		ãµã³ãã«ãã­ã°ã©ã (2)ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+ *
+ *  $Id$
+ */
+/*
+ *  ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å®ç¾©
+ */
+import("kernel.cdl");
+
+/*
+ *  ã¿ã¼ã²ããéä¾å­ã®ã»ã«ã¿ã¤ãã®å®ç¾©
+ */
+import("syssvc/tSerialPort.cdl");
+import("syssvc/tSysLog.cdl");
+import("syssvc/tLogTask.cdl");
+import("syssvc/tBanner.cdl");
+
+/*
+ *  ã¿ã¼ã²ããä¾å­é¨ã®åãè¾¼ã¿
+ */
+import("target.cdl");
+
+/*
+ *  ãã»ã«ã®çµä¸ãè¨è¿°ãã¨ã¯ï¼"cell"ã§å§ã¾ãè¡ããï¼ããã«å¯¾å¿ãã"};"
+ *  ã®è¡ã¾ã§ã®ãã¨ãè¨ãï¼
+ */
+
+/*
+ *  ã·ã¹ãã ã­ã°æ©è½ã®çµä¸ãè¨è¿°
+ *
+ *  ã·ã¹ãã ã­ã°æ©è½ãå¤ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°ãåé¤ãï¼ã³
+ *  ã³ãã¤ã«ãªãã·ã§ã³ã«-DTOPPERS_OMIT_SYSLOGãè¿½å ããã°ããï¼ãã ãï¼
+ *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¯ã·ã¹ãã ã­ã°æ©è½ãä½¿ç¨ããããï¼ãããå¤ããã¨
+ *  ãå¿
+è¦ã§ããï¼ã¾ãï¼ã·ã¹ãã ã­ã°æ©è½ã®ã¢ããã¿ãå¤ããªããã°ãªããª
+ *  ãï¼tecsgenãè­¦åã¡ãã»ã¼ã¸ãåºããï¼ç¡è¦ãã¦ããï¼
+ */
+cell tSysLog SysLog {
+	logBufferSize = 32;					/* ã­ã°ãããã¡ã®ãµã¤ãº */
+	initLogMask = C_EXP("LOG_UPTO(LOG_NOTICE)");
+										/* ã­ã°ãããã¡ã«è¨é²ãã¹ãéè¦åº¦ */
+	initLowMask = C_EXP("LOG_UPTO(LOG_EMERG)");
+									   	/* ä½ã¬ãã«åºåãã¹ãéè¦åº¦ */
+
+	/* ä½ã¬ãã«åºåã¨ã®çµå */
+	cPutLog = PutLogTarget.ePutLog;
+};
+
+/*
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®çµä¸ãè¨è¿°
+ *
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ããå¤ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨
+ *  è¿°ãåé¤ããã°ããï¼ãã ãï¼ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¯ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼
+ *  ã¹ãã©ã¤ããä½¿ç¨ããããï¼ãããå¤ããã¨ãå¿
+è¦ã§ããï¼ã¾ãï¼ã·ãªã¢
+ *  ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¢ããã¿ãå¤ããªããã°ãªããªãï¼
+ */
+cell tSerialPort SerialPort1 {
+	receiveBufferSize = 256;			/* åä¿¡ãããã¡ã®ãµã¤ãº */
+	sendBufferSize    = 256;			/* éä¿¡ãããã¡ã®ãµã¤ãº */
+
+	/* ã¿ã¼ã²ããä¾å­é¨ã¨ã®çµå */
+	cSIOPort = SIOPortTarget1.eSIOPort;
+	eiSIOCBR <= SIOPortTarget1.ciSIOCBR;	/* ã³ã¼ã«ããã¯ */
+};
+
+/*
+ *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®çµä¸ãè¨è¿°
+ *
+ *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ãå¤ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°ãåé¤ãã
+ *  ã°ããï¼
+ */
+cell tLogTask LogTask {
+	priority  = 3;					/* ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®åªå
+åº¦ */
+	stackSize = LogTaskStackSize;	/* ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº */
+
+	/* ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã¨ã®çµå */
+	cSerialPort        = SerialPort1.eSerialPort;
+	cnSerialPortManage = SerialPort1.enSerialPortManage;
+
+	/* ã·ã¹ãã ã­ã°æ©è½ã¨ã®çµå */
+	cSysLog = SysLog.eSysLog;
+
+	/* ä½ã¬ãã«åºåã¨ã®çµå */
+	cPutLog = PutLogTarget.ePutLog;
+};
+
+/*
+ *  ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸åºåã®çµä¸ãè¨è¿°
+ *
+ *  ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºåãå¤ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°
+ *  ãåé¤ããã°ããï¼
+ */
+cell tBanner Banner {
+	/* å±æ§ã®è¨­å® */
+	targetName      = BannerTargetName;
+	copyrightNotice = BannerCopyrightNotice;
+};
+
+/*
+ *  ãµã³ãã«ãã­ã°ã©ã ã®å®ç¾©
+ */
+[singleton]
+celltype tSample2 {
+	require tKernel.eKernel;			/* å¼ã³å£åãªãï¼ä¾ï¼delayï¼*/
+	/*require cKernel = tKernel.eKernel;/* å¼ã³å£åããï¼ä¾ï¼cKernel_delayï¼*/
+	require ciKernel = tKernel.eiKernel;/* å¼ã³å£åããï¼ä¾ï¼ciKernel_ï¼*/
+
+	call sTask		    cTask[4];		/* ã¿ã¹ã¯æä½ */
+	call sTask 			cExceptionTask;
+	call sCyclic        cCyclic;
+	call sAlarm         cAlarm;
+
+	[optional] call sSerialPort	cSerialPort;/* ã·ãªã¢ã«ãã©ã¤ãã¨ã®æ¥ç¶ */
+	call sSysLog		cSysLog;		/* ã·ã¹ãã ã­ã°æ©è½ã¨ã®æ¥ç¶ */
+	
+	entry sTaskBody		eMainTask;	  	/* Mainã¿ã¹ã¯ */
+	entry sTaskBody		eSampleTask[3];	/* ä¸¦è¡å®è¡ãããã¿ã¹ã¯ */
+	entry sTaskBody		eExceptionTask;	/* ä¾å¤å¦çã¿ã¹ã¯ */
+	
+	entry siHandlerBody eiCyclicHandler;/* å¨æãã³ãã©*/
+	entry siHandlerBody eiAlarmHandler; /* ã¢ã©ã¼ã ãã³ãã© */
+};
+
+/*
+ *  çµã¿ä¸ãè¨è¿°
+ */
+
+/* Sample2ã®ãã­ãã¿ã¤ãå®£è¨ */
+cell tSample2 Sample2;
+
+cell tKernel ASPKernel{
+};
+
+cell tTask MainTask {
+	/* å¼ã³å£ã®çµå */
+	cTaskBody = Sample2.eMainTask;
+	/* å±æ§ã®è¨­å® */
+	attribute = C_EXP("TA_ACT");
+	priority = C_EXP("MAIN_PRIORITY");
+	stackSize = C_EXP("STACK_SIZE");
+};
+
+cell tTask Task1 {
+	/* å¼ã³å£ã®çµå */
+	cTaskBody = Sample2.eSampleTask[0];
+	  /* å±æ§ã®è¨­å® */
+	priority = C_EXP("MID_PRIORITY");
+	stackSize = C_EXP("STACK_SIZE");
+};
+
+cell tTask Task2 {
+	/* å¼ã³å£ã®çµå */
+	cTaskBody = Sample2.eSampleTask[1];
+	/* å±æ§ã®è¨­å® */
+	priority = C_EXP("MID_PRIORITY");
+	stackSize = C_EXP("STACK_SIZE");
+};
+
+cell tTask Task3 {
+	/* å¼ã³å£ã®çµå */
+	cTaskBody = Sample2.eSampleTask[2];
+	/* å±æ§ã®è¨­å® */
+	priority = C_EXP("MID_PRIORITY");
+	stackSize = C_EXP("STACK_SIZE");
+};
+
+cell tTask ExceptionTask {
+	/* å¼ã³å£ã®çµå */
+	cTaskBody = Sample2.eExceptionTask;
+	/* å±æ§ã®è¨­å® */
+	priority = C_EXP("EXC_PRIORITY");
+	stackSize = C_EXP("STACK_SIZE");
+};
+
+cell tCyclicHandler CyclicHandler {
+	/* å¼ã³å£ã®çµå */
+	ciHandlerBody = Sample2.eiCyclicHandler;
+	/* å±æ§ã®è¨­å® */
+	cycleTime = 2000000;
+};
+
+cell tAlarmHandler AlarmHandler {
+	ciHandlerBody = Sample2.eiAlarmHandler;
+};
+
+cell tSample2 Sample2 {
+	/* å¼ã³å£ã®çµå */
+	cTask[ 0 ] = MainTask.eTask;
+	cTask[ 1 ] = Task1.eTask;
+	cTask[ 2 ] = Task2.eTask;
+	cTask[ 3 ] = Task3.eTask;
+
+	cExceptionTask = ExceptionTask.eTask;
+
+	cCyclic = CyclicHandler.eCyclic;
+	cAlarm  = AlarmHandler.eAlarm;
+
+	cSerialPort = SerialPort1.eSerialPort;
+	cSysLog = SysLog.eSysLog;
+};
Index: EcnlProtoTool/trunk/asp3_dcre/sample/tSample2.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/sample/tSample2.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/sample/tSample2.cfg	(revision 270)
@@ -0,0 +1,12 @@
+/*
+ *		ãµã³ãã«ãã­ã°ã©ã (2)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ *
+ *  $Id$
+ */
+INCLUDE("gen/tecsgen.cfg");
+
+#include "tSample2.h"
+
+#ifdef CPUEXC1
+DEF_EXC(CPUEXC1, { TA_NULL, cpuexc_handler });
+#endif /* CPUEXC1 */
Index: EcnlProtoTool/trunk/asp3_dcre/sample/tSample2.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/sample/tSample2.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/sample/tSample2.h	(revision 270)
@@ -0,0 +1,106 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2007 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+/*
+ *		ãµã³ãã«ãã­ã°ã©ã (2)ã®ããããã¡ã¤ã«
+ */
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®å®ç¾©
+ */
+#include "target_test.h"
+
+/*
+ *  åã¿ã¹ã¯ã®åªå
+åº¦ã®å®ç¾©
+ */
+
+#define EXC_PRIORITY	1		/* ä¾å¤å¦çã¿ã¹ã¯ã®åªå
+åº¦ */
+#define MAIN_PRIORITY	6		/* ã¡ã¤ã³ã¿ã¹ã¯ã®åªå
+åº¦ */
+								/* HIGH_PRIORITYããé«ããããã¨ */
+
+#define HIGH_PRIORITY	9		/* ä¸¦åã«å®è¡ãããã¿ã¹ã¯ã®åªå
+åº¦ */
+#define MID_PRIORITY	10
+#define LOW_PRIORITY	11
+
+/*
+ *  ã¿ã¼ã²ããã«ä¾å­ããå¯è½æ§ã®ããå®æ°ã®å®ç¾©
+ */
+
+#ifndef STACK_SIZE
+#define	STACK_SIZE		4096		/* ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº */
+#endif /* STACK_SIZE */
+
+#ifndef LOOP_REF
+#define LOOP_REF		ULONG_C(1000000)	/* éåº¦è¨æ¸¬ç¨ã®ã«ã¼ãåæ° */
+#endif /* LOOP_REF */
+
+/*
+ *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+//extern void	task(intptr_t exinf);
+extern void	main_task(intptr_t exinf);
+extern void	cyclic_handler(intptr_t exinf);
+extern void	alarm_handler(intptr_t exinf);
+extern void	cpuexc_handler(void *p_excinf);
+
+#endif /* TOPPERS_MACRO_ONLY */
Index: EcnlProtoTool/trunk/asp3_dcre/sample/tinet_app_config.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/sample/tinet_app_config.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/sample/tinet_app_config.h	(revision 270)
@@ -0,0 +1,637 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _TINET_APP_CONFIG_H_
+#define _TINET_APP_CONFIG_H_
+
+/*
+ *  ã¤ã³ã¿ã¼ããããã­ãã³ã«ãã¡ããªã¼ã®ãµãã¼ã
+ *
+ *    Makefile ã§æå®ãã¦ãè¯ã
+ */
+
+/*#define SUPPORT_INET4		TCP/IP,IPv4		*/
+/*#define SUPPORT_INET6		TCP/IP,IPv6		*/
+/*#define SUPPORT_TCP		TCP			*/
+/*#define SUPPORT_UDP		UDP			*/
+
+/*ãã¼ã¿ãªã³ã¯å±¤ã®ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ãé¸æãã	*/
+/*ããããä¸ã¤ã ãé¸æã§ããã				*/
+
+/*#define SUPPORT_PPP		PointtoPointProtocol	*/
+/*#define SUPPORT_LOOP		LocalLoopBack		*/
+/*#define SUPPORT_ETHER		Ethernet		*/
+
+/*#define SUPPORT_MIB		MIB(SNMP)		*/
+
+/*
+ *  TCP/IP ã«é¢ããå®ç¾©
+ */
+
+/* TCP ã«é¢ããå®ç¾© */
+
+/*
+ *  TCPã®è½åãªã¼ãã³ã®ã¿ãµãã¼ããããã¨ãæå®ããã
+ */
+
+#ifdef UNDEF_TCP_CFG_PASSIVE_OPEN
+#undef TCP_CFG_PASSIVE_OPEN
+#endif
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®éåä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½
+ *    æ³¨æ: Makefile ã§æå®ãã¦ããã
+ */
+/*#define TCP_CFG_RWBUF_CSAVE_ONLY*/
+			/* TCP éä¿¡ç«¯ç¹ã®åä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ã®ã¿æå¹ã«ããã	*/
+/*#define TCP_CFG_RWBUF_CSAVE*/
+			/* TCP éä¿¡ç«¯ç¹ã®åä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãæå¹ã«ããã	*/
+/*#define TCP_CFG_SWBUF_CSAVE_ONLY*/
+			/* TCP éä¿¡ç«¯ç¹ã®éä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ã®ã¿æå¹ã«ããã	*/
+/*#define TCP_CFG_SWBUF_CSAVE*/
+			/* TCP éä¿¡ç«¯ç¹ã®éä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãæå¹ã«ããã	*/
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®åä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ã®ã
+ *  åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®æå¤§ã¨ã³ããªæ°ã
+ *  ãã ããæ­£å¸¸ã«åä¿¡ããã»ã°ã¡ã³ããç ´æ£ãããããåéåæ°ãå¢å ããã
+ *  ã¾ããæå®ããªãã¨å¶éããªãã
+ */
+/*#define TCP_CFG_RWBUF_CSAVE_MAX_QUEUES	2*/
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®éä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ã§ã
+ *  éä¿¡ã¦ã£ã³ããããã¡ã«ä½¿ç¨ãããããã¯ã¼ã¯ãããã¡ã®ãµã¤ãºã
+ */
+
+#ifdef USE_TCP_MSS_SEG
+
+#ifdef SUPPORT_INET4
+#define TCP_CFG_SWBUF_CSAVE_MAX_SIZE	(IF_HDR_SIZE + IP4_MSS)		/* æå¤§ãµã¤ãº */
+#endif
+
+#ifdef SUPPORT_INET6
+#define TCP_CFG_SWBUF_CSAVE_MAX_SIZE	(IF_HDR_SIZE + IPV6_MMTU)	/* æå¤§ãµã¤ãº */
+#endif
+
+#else	/* of #ifdef USE_TCP_MSS_SEG */
+
+#define TCP_CFG_SWBUF_CSAVE_MAX_SIZE	IF_PDU_SIZE			/* æå¤§ãµã¤ãº */
+
+#endif	/* of #ifdef USE_TCP_MSS_SEG */
+
+#define TCP_CFG_SWBUF_CSAVE_MIN_SIZE	0				/* æå°ãµã¤ãº */
+
+/*
+ *  TCP ã®ãã³ãã­ãã­ã³ã°ã³ã¼ã«æ©è½
+ */
+
+#ifdef UNDEF_TCP_CFG_NON_BLOCKING
+#undef TCP_CFG_NON_BLOCKING
+#endif
+
+/*
+ *  MAX_TCP_SND_SEG: éä¿¡ã»ã°ã¡ã³ããµã¤ãºã®æå¤§å¤
+ *
+ *    ç¸æãã MSS ãªãã·ã§ã³ã§ã»ã°ã¡ã³ããµã¤ãºãæå®ããã¦ãã
+ *    ãã®å¤ã§ãã»ã°ã¡ã³ããµã¤ãºãå¶éã§ããã
+ */
+
+#ifdef USE_TCP_MSS_SEG
+
+#ifdef MAX_TCP_SND_SEG
+#undef MAX_TCP_SND_SEG
+#endif
+
+#ifdef SUPPORT_INET4
+#define MAX_TCP_SND_SEG			TCP_MSS
+#endif
+
+#ifdef SUPPORT_INET6
+#define MAX_TCP_SND_SEG			TCP6_MSS
+#endif
+
+#endif	/* of #ifdef USE_TCP_MSS_SEG */
+
+/*
+ *  DEF_TCP_RCV_SEG: åä¿¡ã»ã°ã¡ã³ããµã¤ãºã®è¦å®å¤
+ */
+
+#ifdef USE_TCP_MSS_SEG
+
+#ifdef DEF_TCP_RCV_SEG
+#undef DEF_TCP_RCV_SEG
+#endif
+
+#ifdef SUPPORT_INET4
+#define DEF_TCP_RCV_SEG			TCP_MSS
+#endif
+
+#ifdef SUPPORT_INET6
+#define DEF_TCP_RCV_SEG			TCP6_MSS
+#endif
+
+#endif	/* of #ifdef USE_TCP_MSS_SEG */
+
+/*
+ *  ã¿ã¹ã¯ããã® Time Wait ç¶æ
+ã® TCP éä¿¡ç«¯ç¹åé¢æ©è½
+ *
+ *  Time Wait ç¶æ
+ã® TCP éä¿¡ç«¯ç¹ã®ã¨ã³ããªæ°ãæå®ããã
+ *  æå®ããªããã0 ãæå®ããã¨ã
+ *  ã¿ã¹ã¯ãã Time Wait ç¶æ
+ã® TCP éä¿¡ç«¯ç¹ãåé¢ããæ©è½ã¯çµè¾¼ã¾ãªãã
+ */
+#if defined(USE_TCP_MSS_SEG)
+#define NUM_TCP_TW_CEP_ENTRY		3
+#else
+#define NUM_TCP_TW_CEP_ENTRY		6
+#endif
+
+/*
+ *  TCP ãããã®ãã¬ã¼ã¹åºåæ©è½
+ */
+//#define TCP_CFG_TRACE
+
+/*
+ *  ãã¬ã¼ã¹åºåå¯¾è±¡ã®ãªã¢ã¼ããã¹ãã® IPv4 ã¢ãã¬ã¹
+ *  IPV4_ADDRANY ãæå®ããã¨ãå
+¨ã¦ã®ãã¹ããå¯¾è±¡ã¨ããã
+ */
+#define TCP_CFG_TRACE_IPV4_RADDR	IPV4_ADDRANY
+
+/*
+ *  ãã¬ã¼ã¹åºåå¯¾è±¡ã®ãªã¢ã¼ããã¹ãã®ãã¼ãçªå·
+ *  TCP_PORTANY ãæå®ããã¨ãå
+¨ã¦ã®ãã¼ãçªå·ãå¯¾è±¡ã«ããã
+ */
+#define TCP_CFG_TRACE_RPORTNO		TCP_PORTANY
+//#define TCP_CFG_TRACE_RPORTNO		UINT_C(7)
+
+/*
+ *  ãã¬ã¼ã¹åºåå¯¾è±¡ã®ã­ã¼ã«ã«ãã¹ãã®ãã¼ãçªå·
+ *  TCP_PORTANY ãæå®ããã¨ãå
+¨ã¦ã®ãã¼ãçªå·ãå¯¾è±¡ã«ããã
+ */
+#define TCP_CFG_TRACE_LPORTNO		TCP_PORTANY
+//#define TCP_CFG_TRACE_LPORTNO		UINT_C(7)
+
+/*
+ *  ITRON TCP/IP APIãTCP ã®æ¡å¼µæ©è½
+ */
+//#define TCP_CFG_EXTENTIONS
+
+/*
+ *  TCP_CFG_URG_OFFSET: ç·æ¥ãã¼ã¿ã®æå¾ã®ãã¤ãã®ãªãã»ãã
+ *
+ *    -1: BSD ã®å®è£
+ãç·æ¥ãã¤ã³ã¿ã¯ãç·æ¥ãã¼ã¿ã®æå¾ã®ãã¤ãã®æ¬¡ã®ãã¤ããå·®ãã
+ *     0: RFC1122 ã®è¦å®ãç·æ¥ãã¤ã³ã¿ã¯ãç·æ¥ãã¼ã¿ã®æå¾ã®ãã¤ããå·®ãã
+ */
+
+//#define TCP_CFG_URG_OFFSET	-1
+//#define TCP_CFG_URG_OFFSET	0
+
+/* UDP ã«é¢ããå®ç¾© */
+
+/*
+ *  UDP ã®ãã³ãã­ãã­ã³ã°ã³ã¼ã«æ©è½
+ */
+
+#ifdef UNDEF_UDP_CFG_NON_BLOCKING
+#undef UDP_CFG_NON_BLOCKING
+#endif
+
+/*
+ *  ITRON TCP/IP APIãUDP ã®æ¡å¼µæ©è½
+ */
+//#define UDP_CFG_EXTENTIONS
+
+/* IPv4 ã«é¢ããå®ç¾© */
+
+#ifdef SUPPORT_INET4
+
+#ifdef SUPPORT_PPP
+
+#if 1
+#define IPV4_ADDR_LOCAL			MAKE_IPV4_ADDR(192,168,1,21)
+#else
+#define IPV4_ADDR_LOCAL			MAKE_IPV4_ADDR(0,0,0,0)		/* ç¸æã«å²ãå½ã¦ã¦ãããå ´å	*/
+#endif
+
+#if 1
+#define IPV4_ADDR_REMOTE		MAKE_IPV4_ADDR(192,168,1,31)
+#else
+#define IPV4_ADDR_REMOTE		MAKE_IPV4_ADDR(0,0,0,0)		/* ç¸æã«å²ãå½ã¦ã¦ãããå ´å	*/
+#endif
+
+#define NUM_STATIC_ROUTE_ENTRY		1
+#define NUM_REDIRECT_ROUTE_ENTRY	0
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#ifdef SUPPORT_ETHER
+
+#ifdef DHCP_CFG
+
+#define IPV4_ADDR_LOCAL			MAKE_IPV4_ADDR(0,0,0,0)
+#define IPV4_ADDR_LOCAL_MASK		MAKE_IPV4_ADDR(0,0,0,0)
+#define IPV4_ADDR_DEFAULT_GW		MAKE_IPV4_ADDR(0,0,0,0)
+
+#else	/* of #ifdef DHCP_CFG */
+
+#define IPV4_ADDR_LOCAL			MAKE_IPV4_ADDR(172,25,129,205)
+#define IPV4_ADDR_LOCAL_MASK		MAKE_IPV4_ADDR(255,255,255,0)
+#define IPV4_ADDR_DEFAULT_GW		MAKE_IPV4_ADDR(172,25,129,140)
+
+#endif	/* of #ifdef DHCP_CFG */
+
+#define NUM_STATIC_ROUTE_ENTRY		3
+#define NUM_REDIRECT_ROUTE_ENTRY	1
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#ifdef SUPPORT_LOOP
+
+#define NUM_STATIC_ROUTE_ENTRY		1
+#define NUM_REDIRECT_ROUTE_ENTRY	0
+
+#endif	/* of #ifdef SUPPORT_LOOP */
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+/* IPv6 ã«é¢ããå®ç¾© */
+
+#ifdef SUPPORT_INET6
+
+#ifdef SUPPORT_PPP
+
+#define NUM_STATIC_ROUTE_ENTRY		0
+#define NUM_REDIRECT_ROUTE_ENTRY	0
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#ifdef SUPPORT_LOOP
+
+#define NUM_STATIC_ROUTE_ENTRY		0
+#define NUM_REDIRECT_ROUTE_ENTRY	0
+
+#endif	/* of #ifdef SUPPORT_LOOP */
+
+#ifdef SUPPORT_ETHER
+
+#define NUM_STATIC_ROUTE_ENTRY		0
+#define NUM_REDIRECT_ROUTE_ENTRY	1
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+/*
+ *  ãã¼ã¿ãªã³ã¯å±¤ (ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹) ã«é¢ããå®ç¾©
+ */
+
+/*
+ *  ã¤ã¼ãµãããã«é¢ããå®ç¾©
+ */
+
+/*
+ *  PPP ã«é¢ããå®ç¾©
+ */
+
+#define HDLC_PORTID			1	/* HDLC(PPP)ã«ç¨ããã·ãªã¢ã«ãã¼ãçªå·	*/
+
+/*#define PPP_IDLE_TIMEOUT		(180*NET_TIMER_HZ)*/
+					/* åæ­ã¾ã§ã®ã¢ã¤ãã«æéã		*/
+					/* åæ­ããªãå ´åã¯ã³ã¡ã³ãã¢ã¦ãããã	*/
+
+/*#define PPP_CFG_MODEM			 ã¢ãã æ¥ç¶ã®å ´åã¯ã³ã¡ã³ããå¤ãã	*/
+
+#define MODEM_CFG_INIT			"ATE1&D0&S0\\V0\\Q1S0=1"
+					/* ã¢ãã åæåæå­å			*/
+					/* NTT DoComo ã¢ãã¤ã«ã¢ããã¿ 96F ç¨	*/
+					/*   E1: ã¨ã³ã¼ããã¯ãã			*/
+					/*  &D0: ERä¿¡å·ç¡è¦			*/
+					/*  &S0: DRä¿¡å·å¸¸æ ON			*/
+					/*  \V0: ãªã¶ã«ãã³ã¼ã TYPE 1		*/
+					/*  \Q1: XON/XOFF ãã­ã¼å¶å¾¡		*/
+					/* S0=1: èªåçä¿¡ãªã³ã°åæ° = 1 å	*/
+
+#define MODEM_CFG_PHONE_NUMBER		"090-xxxx-9242"
+
+					/* èªæ§ææ
+å ±ã®è¦å®å¤			*/
+#define DEF_LCP_LOCAL_CFGS		(LCP_CFG_MRU|LCP_CFG_ACCM|LCP_CFG_MAGIC|\
+					 LCP_CFG_ACCOMP|LCP_CFG_PCOMP|LCP_CFG_PAP)
+
+					/* ç¸æã«è¨±ãæ§ææ
+å ±ã®è¦å®å¤		*/
+#define DEF_LCP_REMOTE_CFGS		(LCP_CFG_MRU|LCP_CFG_ACCM|LCP_CFG_MAGIC|\
+					 LCP_CFG_ACCOMP|LCP_CFG_PCOMP|LCP_CFG_PAP)
+
+/*
+ *  èªè¨¼ã«é¢ããå®ç¾©
+ */
+
+#define AUTH_CFG_CLIENT		   	/* èªè¨¼ã¯ã©ã¤ã¢ã³ãã¢ã¼ãã®æã¯ã³ã¡ã³ããå¤ãã	*/
+#define AUTH_CFG_SERVER			/* èªè¨¼ãµã¼ãã¢ã¼ãã®æã¯ã³ã¡ã³ããå¤ãã		*/
+
+#define AUTH_LOCAL_USER			"h8"		/* èªãã¹ãã¸ã®ã­ã°ã¤ã³èªè¨¼ã¦ã¼ã¶å	*/
+#define AUTH_LOCAL_PASSWD		"3048f"		/* èªãã¹ãã¸ã®ã­ã°ã¤ã³èªè¨¼ãã¹ã¯ã¼ã	*/
+#define AUTH_REMOTE_USER		"pen3"		/* ç¸æã¸ã®ã­ã°ã¤ã³èªè¨¼ã¦ã¼ã¶å		*/
+#define AUTH_REMOTE_PASSWD		"600MHz"	/* ç¸æã¸ã®ã­ã°ã¤ã³èªè¨¼ãã¹ã¯ã¼ã		*/
+
+/*
+ *  ARP ã«é¢ããå®ç¾©
+ */
+
+/*#define ARP_CFG_CALLBACK_DUPLICATED*/	/* IP ã¢ãã¬ã¹éè¤æ¤åºã³ã¼ã«ããã¯é¢æ°ã	*/
+					/* å®ç¾©ããå ´åã¯ã³ã¡ã³ããå¤ãã		*/
+
+/*
+ *  ICMPv4/v6 ã«é¢ããå®ç¾©
+ */
+
+#ifdef USE_PING
+
+#define ICMP_CFG_CALLBACK_ECHO_REPLY	/* ICMP ECHO å¿ç­ãåä¿¡ããã¨ãå¼åºãã³ã¼ã«ããã¯é¢æ°ã	*/
+					/* å®ç¾©ããå ´åã¯ã³ã¡ã³ããå¤ãã			*/
+
+#endif	/* of #ifdef USE_PING */
+
+/*
+ *  ãããã¯ã¼ã¯ãããã¡ã«é¢ããå®ç¾©
+ */
+
+#ifdef SUPPORT_ETHER
+
+/*
+ *  ã¤ã¼ãµãããã®å ´åã®ãããã¯ã¼ã¯ãããã¡æ°ã®å²ãå½ã¦
+ */
+
+/*
+ *  64 ãªã¯ããã
+ *
+ *    IPv4 ã§ã®ã¿å²ãå½ã¦ãã
+ *
+ *    IPv6 ã§ã¯ãTCP å¶å¾¡ã»ã°ã¡ã³ãï¼CSEGãSDU ãªãï¼ãµã¤ãºã®
+ *    ãããã¯ã¼ã¯ãããã¡ï¼IF + IPv6 + TCP = 74ï¼ä»¥ä¸ã®
+ *    ãããã¯ã¼ã¯ãããã¡ã¯ä¸è¦ã§ããã
+ */
+
+#ifdef NUM_MPF_NET_BUF_64
+#undef NUM_MPF_NET_BUF_64
+#endif
+
+#ifdef SUPPORT_INET4
+#define NUM_MPF_NET_BUF_64		2
+#else
+#define NUM_MPF_NET_BUF_64		0
+#endif
+
+/*
+ *  CSEGï¼IF + IP + TCPï¼
+ *
+ *    IPv6 ã§ã®ã¿å²ãå½ã¦ãã
+ *
+ *    NE2000 äºæ NIC ã®ãã£ãã¤ã¹ãã©ã¤ãï¼if_edï¼ã®æä½å²å½ã¦é·ã¯ã
+ *    ã¤ã¼ãµããããã¬ã¼ã ã®æç­é·ã§ãã 60ï¼CRC ã® 4 ãªã¯ããããé¤ãã
+ *    æ´ã«ã¢ã©ã¤ã³ãã¦ 62ï¼ãªã¯ãããã§ããã
+ *    å¾ã£ã¦ãIPv4 ã§ã¯ãCSEG ãµã¤ãºã®ãããã¯ã¼ã¯ãããã¡
+ *   ï¼IF + IPv4 + TCP = 54ï¼ã¯ä¸è¦ã§ããã
+ */
+
+#ifdef NUM_MPF_NET_BUF_CSEG
+#undef NUM_MPF_NET_BUF_CSEG
+#endif
+
+#ifdef SUPPORT_INET6
+#define NUM_MPF_NET_BUF_CSEG		2
+#else
+#define NUM_MPF_NET_BUF_CSEG		0
+#endif
+
+/*
+ *  128 ãªã¯ããã
+ *
+ *    IPv4 ã§ãTCP MSSï¼IP MSSãIF + 576 ãªã¯ãããï¼ã®
+ *    ãããã¯ã¼ã¯ãããã¡ãå²ãå½ã¦ãå ´åã
+ *    128 ãªã¯ãããã®ãããã¯ã¼ã¯ãããã¡ã¯å²ãå½ã¦ãªãã
+ */
+
+#ifdef NUM_MPF_NET_BUF_128
+#undef NUM_MPF_NET_BUF_128
+#endif
+
+#if defined(USE_TCP_MSS_SEG)
+#define NUM_MPF_NET_BUF_128		0
+#else
+#define NUM_MPF_NET_BUF_128		1
+#endif
+
+/*
+ *  256 ãªã¯ããã
+ *
+ *    IPv4 ã§ãTCP MSSï¼IP MSSãIF + 576 ãªã¯ãããï¼ã®
+ *    ãããã¯ã¼ã¯ãããã¡ãå²ãå½ã¦ãå ´åã
+ *    256 ãªã¯ãããã®ãããã¯ã¼ã¯ãããã¡ã¯å²ãå½ã¦ãªãã
+ */
+
+#ifdef NUM_MPF_NET_BUF_256
+#undef NUM_MPF_NET_BUF_256
+#endif
+
+#if defined(USE_TCP_MSS_SEG)
+#define NUM_MPF_NET_BUF_256		0
+#else
+#define NUM_MPF_NET_BUF_256		1
+#endif
+
+/*
+ *  512 ãªã¯ããã	
+ *
+ *    IPv4 ã§ãTCP MSSï¼IP MSSãIF + 576 ãªã¯ãããï¼ã®
+ *    ãããã¯ã¼ã¯ãããã¡ãå²ãå½ã¦ãå ´åã
+ *    512 ãªã¯ãããã®ãããã¯ã¼ã¯ãããã¡ã¯å²ãå½ã¦ãªãã
+ */
+
+#ifdef NUM_MPF_NET_BUF_512
+#undef NUM_MPF_NET_BUF_512
+#endif
+
+#if defined(USE_TCP_MSS_SEG)
+#define NUM_MPF_NET_BUF_512		0
+#else
+#define NUM_MPF_NET_BUF_512		1
+#endif
+
+/*
+ *  TCP MSSï¼IP MSSãIF + 576 ãªã¯ãããï¼
+ *
+ *   ã»IPv4 ã§ã®ã¿å²ãå½ã¦ãã
+ *   ã»éåä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãæå¹ã§ã
+ *     çã³ãã¼ API ãä½¿ç¨ããã¨ãã¯ã+1 å²ãå½ã¦ãã
+ */
+
+#ifdef NUM_MPF_NET_BUF_IP_MSS
+#undef NUM_MPF_NET_BUF_IP_MSS
+#endif
+
+#if defined(SUPPORT_INET4) && defined(USE_TCP_MSS_SEG)
+
+#if (defined(TCP_CFG_RWBUF_CSAVE)      || defined(TCP_CFG_SWBUF_CSAVE) ||	\
+     defined(TCP_CFG_RWBUF_CSAVE_ONLY) || defined(TCP_CFG_SWBUF_CSAVE_ONLY)) && defined(USE_COPYSAVE_API)
+#define NUM_MPF_NET_BUF_IP_MSS		3
+#else
+#define NUM_MPF_NET_BUF_IP_MSS		2	/* IF + 576 ãªã¯ããã	*/
+#endif
+
+#else	/* of #if defined(SUPPORT_INET4) && defined(USE_TCP_MSS_SEG) */
+
+#define NUM_MPF_NET_BUF_IP_MSS		0	/* IF + 576 ãªã¯ããã	*/
+
+#endif	/* of #if defined(SUPPORT_INET4) && defined(USE_TCP_MSS_SEG) */
+
+/*
+ *  1024 ãªã¯ããã	
+ *
+ *    TCP MSS ã®ãããã¯ã¼ã¯ãããã¡ãå²ãå½ã¦ãå ´åã
+ *    1024 ãªã¯ãããã®ãããã¯ã¼ã¯ãããã¡ã¯å²ãå½ã¦ãªãã
+ */
+
+#ifdef NUM_MPF_NET_BUF_1024
+#undef NUM_MPF_NET_BUF_1024
+#endif
+
+#if defined(USE_TCP_MSS_SEG)
+#define NUM_MPF_NET_BUF_1024		0	/* 1024 ãªã¯ããã	*/
+#else
+#define NUM_MPF_NET_BUF_1024		1	/* 1024 ãªã¯ããã	*/
+#endif
+
+/*
+ *  TCP MSSï¼IPV6 MMTUãIF + 1280 ãªã¯ãããï¼
+ *
+ *   ã»IPv6 ã§ã®ã¿å²ãå½ã¦ãã
+ *   ã»éåä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãæå¹ã§ã
+ *     çã³ãã¼ API ãä½¿ç¨ããã¨ãã¯ã+1 å²ãå½ã¦ãã
+ */
+
+#ifdef NUM_MPF_NET_BUF_IPV6_MMTU
+#undef NUM_MPF_NET_BUF_IPV6_MMTU
+#endif
+
+#if defined(SUPPORT_INET6) && (defined(USE_TCP_MSS_SEG) || defined(USE_IPV6_MMTU))
+
+#if (defined(TCP_CFG_RWBUF_CSAVE)      || defined(TCP_CFG_SWBUF_CSAVE) ||	\
+     defined(TCP_CFG_RWBUF_CSAVE_ONLY) || defined(TCP_CFG_SWBUF_CSAVE_ONLY)) && defined(USE_COPYSAVE_API)
+#define NUM_MPF_NET_BUF_IPV6_MMTU	3	/* IF + 1280	*/
+#else
+#define NUM_MPF_NET_BUF_IPV6_MMTU	2	/* IF + 1280	*/
+#endif
+
+#else	/* of #if defined(SUPPORT_INET6) && (defined(USE_TCP_MSS_SEG) || defined(USE_IPV6_MMTU)) */
+
+#define NUM_MPF_NET_BUF_IPV6_MMTU	0	/* IF + 1280	*/
+
+#endif	/* of #if defined(SUPPORT_INET6) && (defined(USE_TCP_MSS_SEG) || defined(USE_IPV6_MMTU)) */
+
+/*
+ *  IF æå¤§ PDU ãµã¤ãº
+ *
+ *   ã»TCP MSS ã®ãããã¯ã¼ã¯ãããã¡ãå²ãå½ã¦ãå ´åã
+ *     IF æå¤§ PDU ãµã¤ãºã®ãããã¯ã¼ã¯ãããã¡ã¯å²ãå½ã¦ãªãã
+ *   ã»éåä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãæå¹ã§ã
+ *     çã³ãã¼ API ãä½¿ç¨ããã¨ãã¯ã+1 å²ãå½ã¦ãã
+ */
+
+#ifdef NUM_MPF_NET_BUF_IF_PDU
+#undef NUM_MPF_NET_BUF_IF_PDU
+#endif
+
+#ifdef USE_TCP_MSS_SEG
+
+#define NUM_MPF_NET_BUF_IF_PDU		0
+
+#else	/* of #ifdef USE_TCP_MSS_SEG */
+
+#if (defined(TCP_CFG_RWBUF_CSAVE) || defined(TCP_CFG_SWBUF_CSAVE)) && defined(USE_COPYSAVE_API)
+#define NUM_MPF_NET_BUF_IF_PDU		6
+#else
+#define NUM_MPF_NET_BUF_IF_PDU		5
+#endif
+
+#endif	/* of #ifdef USE_TCP_MSS_SEG */
+
+/*
+ *  65536 ãªã¯ããã
+ *
+ *  ã»NET_BUF_CFG_LONG_LEN ãå®ç¾©ããã¨ãã®ã¿å²ãå½ã¦ãã
+ */
+
+#ifdef NET_BUF_CFG_LONG_LEN
+
+/* IPv6 ç¨ */
+
+#ifdef NUM_MPF_NET_BUF6_65536
+#undef NUM_MPF_NET_BUF6_65536
+#endif
+
+#if defined(USE_TCP_MSS_SEG)
+#define NUM_MPF_NET_BUF6_65536	0
+#else
+#define NUM_MPF_NET_BUF6_65536	2
+#endif
+
+#else	/* of ifdef NET_BUF_CFG_LONG_LEN */
+
+#define NUM_MPF_NET_BUF6_65536	0
+
+#endif	/* of ifdef NET_BUF_CFG_LONG_LEN */
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#endif /* _TINET_APP_CONFIG_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/sample/tinet_sample1n.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/sample/tinet_sample1n.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/sample/tinet_sample1n.cfg	(revision 270)
@@ -0,0 +1,92 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  ãããã¯ã¼ã¯å¯¾å¿ sample1.c ãã­ã°ã©ã ã® TCP/IP ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#include "sample1n.h"
+
+/* TCP åä»å£ */
+
+#ifdef SUPPORT_INET4
+
+TCP_CRE_REP (TCP_REPID,	 { 0, { IPV4_ADDRANY, 23 } } );
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+TCP6_CRE_REP (TCP_REPID, { 0, { IPV6_ADDRANY, 23 } } );
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+/* TCP éä¿¡ç«¯ç¹ */
+
+#ifdef SUPPORT_INET4
+
+TCP_CRE_CEP (TCP_CEPID, {
+	0,
+	tcp_swbuf,
+	TCP_SWBUF_SIZE,
+	tcp_rwbuf,
+	TCP_RWBUF_SIZE,
+	(FP)callback_nblk_tcp
+	} );
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+TCP6_CRE_CEP (TCP_CEPID, {
+	0,
+	tcp_swbuf,
+	TCP_SWBUF_SIZE,
+	tcp_rwbuf,
+	TCP_RWBUF_SIZE,
+	(FP)callback_nblk_tcp
+	} );
+
+#endif	/* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/histogram.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/histogram.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/histogram.h	(revision 270)
@@ -0,0 +1,92 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		å®è¡æéåå¸éè¨ãµã¼ãã¹
+ */
+
+#ifndef TOPPERS_HISTOGRAM_H
+#define TOPPERS_HISTOGRAM_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <t_stddef.h>
+
+/*
+ *  å®è¡æéåå¸è¨æ¸¬ã®åæå
+ */
+extern void	init_hist(ID histid);
+
+/*
+ *  å®è¡æéè¨æ¸¬ã®éå§
+ */
+extern void	begin_measure(ID histid);
+
+/*
+ *  å®è¡æéè¨æ¸¬ã®çµäº
+ */
+extern void	end_measure(ID histid);
+
+/*
+ *  å®è¡æéåå¸è¨æ¸¬ã®è¡¨ç¤º
+ */
+extern void	print_hist(ID histid);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TOPPERS_HISTOGRAM_H */
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/serial.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/serial.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/serial.h	(revision 270)
@@ -0,0 +1,105 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ã
+ */
+
+#ifndef TOPPERS_SERIAL_H
+#define TOPPERS_SERIAL_H
+
+#include <kernel.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ç¨ãããã±ãã
+ */
+typedef struct {
+	uint_t		reacnt;			/* åä¿¡ãããã¡ä¸­ã®æå­æ° */
+	uint_t		wricnt;			/* éä¿¡ãããã¡ä¸­ã®æå­æ° */
+} T_SERIAL_RPOR;
+
+/*
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ãµã¼ãã¹ã³ã¼ã«
+ */
+extern ER		serial_opn_por(ID portid) throw();
+extern ER		serial_cls_por(ID portid) throw();
+extern ER_UINT	serial_rea_dat(ID portid, char *buf, uint_t len) throw();
+extern ER_UINT	serial_wri_dat(ID portid, const char *buf, uint_t len) throw();
+extern ER		serial_ctl_por(ID portid, uint_t ioctl) throw();
+extern ER		serial_ref_por(ID portid, T_SERIAL_RPOR *pk_rpor) throw();
+
+/*
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®åä½å¶å¾¡ç¨ã®ããã®å®æ°
+ *
+ *  ä»¥ä¸ã®å®æ°ã¯ï¼ãããæ¯ã«è«çåãã¨ã£ã¦ç¨ããï¼
+ */
+#define	IOCTL_NULL	0U			/* æå®ãªã */
+#define	IOCTL_ECHO	0x0001U		/* åä¿¡ããæå­ãã¨ã³ã¼ããã¯ */
+#define	IOCTL_CRLF	0x0010U		/* LFãéä¿¡ããåã«CRãä»å  */
+#define	IOCTL_FCSND	0x0100U		/* éä¿¡ã«å¯¾ãã¦ãã­ã¼å¶å¾¡ãè¡ã */
+#define	IOCTL_FCANY	0x0200U		/* ã©ã®ãããªæå­ã§ãéä¿¡åé */
+#define	IOCTL_FCRCV	0x0400U		/* åä¿¡ã«å¯¾ãã¦ãã­ã¼å¶å¾¡ãè¡ã */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TOPPERS_SERIAL_H */
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/syslog.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/syslog.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/syslog.h	(revision 270)
@@ -0,0 +1,107 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ã¹ãã ã­ã°æ©è½
+ */
+
+#ifndef TOPPERS_SYSLOG_H
+#define TOPPERS_SYSLOG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <t_stddef.h>
+#include <t_syslog.h>
+
+/*
+ *  ã­ã°æ
+å ±ã®åºå
+ */
+extern ER	syslog_wri_log(uint_t prio, const SYSLOG *p_syslog) throw();
+
+/*
+ *  ã­ã°ãããã¡ããã®ã­ã°æ
+å ±ã®èª­åºã
+ */
+extern ER_UINT	syslog_rea_log(SYSLOG *p_syslog) throw();
+
+/*
+ *  åºåãã¹ãã­ã°æ
+å ±ã®éè¦åº¦ã®è¨­å®
+ */
+extern ER	syslog_msk_log(uint_t logmask, uint_t lowmask) throw();
+
+/*
+ *  ã­ã°ãããã¡ã®ç¶æ
+åç
+§
+ */
+extern ER	syslog_ref_log(T_SYSLOG_RLOG *pk_rlog) throw();
+
+/*
+ *  ä½ã¬ãã«åºåã«ãããã¹ã¦ã®ã­ã°æ
+å ±ã®åºå
+ */
+extern ER	syslog_fls_log(void) throw();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TOPPERS_SYSLOG_H */
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tBanner.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tBanner.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tBanner.cdl	(revision 270)
@@ -0,0 +1,89 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *  ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸åºåã®æ¬ä½ã®ã»ã«ã¿ã¤ã
+ */
+[singleton]
+celltype tBannerMain {
+	entry	sRoutineBody	eBannerInitialize;
+
+	attr {
+		char	*targetName;			/* ã¿ã¼ã²ããå */
+		char	*copyrightNotice;		/* èä½æ¨©è¡¨ç¤º */
+	};
+};
+
+/*
+ *  ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸åºåï¼è¤åã³ã³ãã¼ãã³ãï¼ã®ã»ã«ã¿ã¤ã
+ */
+[singleton,active]
+composite tBanner {
+	attr {
+		char	*targetName;			/* ã¿ã¼ã²ããå */
+		char	*copyrightNotice;		/* èä½æ¨©è¡¨ç¤º */
+	};
+
+	cell tBannerMain BannerMain {
+		/* å±æ§ã®ç¶æ¿ */
+		targetName      = composite.targetName;
+		copyrightNotice = composite.copyrightNotice;
+	};
+
+	cell tInitializeRoutine InitializeRoutine {
+		/* å¼ã³å£ */
+		cInitializeRoutineBody = BannerMain.eBannerInitialize;
+	};
+};
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tBannerMain.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tBannerMain.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tBannerMain.c	(revision 270)
@@ -0,0 +1,89 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2017 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸åºåã®æ¬ä½
+ */
+
+#include "tBannerMain_tecsgen.h"
+#include <t_syslog.h>
+
+/*
+ *  ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸
+ */
+static const char banner[] = "\n"
+"TOPPERS/ASP3 Kernel Release %d.%X.%d for %s"
+" (" __DATE__ ", " __TIME__ ")\n"
+"Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory\n"
+"                            Toyohashi Univ. of Technology, JAPAN\n"
+"Copyright (C) 2004-2017 by Embedded and Real-Time Systems Laboratory\n"
+"            Graduate School of Information Science, Nagoya Univ., JAPAN\n"
+"%s";
+
+/*
+ *  ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºåï¼åãå£é¢æ°ï¼
+ */
+void
+eBannerInitialize_main(intptr_t exinf)
+{
+	syslog_5(LOG_NOTICE, banner,
+				(TKERNEL_PRVER >> 12) & 0x0fU,
+				(TKERNEL_PRVER >> 4) & 0xffU,
+				TKERNEL_PRVER & 0x0fU,
+				ATTR_targetName,
+				ATTR_copyrightNotice);
+}
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tHistogram.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tHistogram.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tHistogram.c	(revision 270)
@@ -0,0 +1,142 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		å®è¡æéåå¸éè¨ãµã¼ãã¹
+ */
+
+#include "tHistogram_tecsgen.h"
+#define syslog_write	cSysLog_write
+#include <t_syslog.h>
+#include <log_output.h>
+
+/* 
+ *  å®è¡æéåå¸è¨æ¸¬ã®åæåï¼åãå£é¢æ°ï¼
+ */
+void
+eHistogram_initialize(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	uint_t	i;
+
+	for (i = 0; i <= ATTR_maxTime; i++) {
+		VAR_histarea[i] = 0U;
+	}
+	VAR_over = 0U;
+	VAR_under = 0U;
+}
+
+/*
+ *  å®è¡æéè¨æ¸¬ã®éå§ï¼åãå£é¢æ°ï¼
+ */
+void
+eHistogram_beginMeasure(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+
+	HIST_BM_HOOK();
+	HIST_GET_TIM(&VAR_begin_time);
+}
+
+/*
+ *  å®è¡æéè¨æ¸¬ã®çµäºï¼åãå£é¢æ°ï¼
+ */
+void
+eHistogram_endMeasure(CELLIDX idx)
+{
+	CELLCB		*p_cellcb = GET_CELLCB(idx);
+	histtim_t	end_time, timediff;
+	uint_t		val;
+
+	HIST_GET_TIM(&end_time);
+
+	timediff = end_time - VAR_begin_time;
+#ifdef HISTTIM_CYCLE
+	if (end_time < VAR_begin_time) {
+		timediff += HISTTIM_CYCLE;
+	}
+#endif /* HISTTIM_CYCLE */
+	val = HIST_CONV_TIM(timediff);
+	if (val <= ATTR_maxTime) {
+		VAR_histarea[val]++;
+	}
+	else if (val <= ((uint_t) INT_MAX)) {
+		VAR_over++;
+	}
+	else {
+		VAR_under++;
+	}
+}
+
+/*
+ *  å®è¡æéåå¸è¨æ¸¬ã®è¡¨ç¤ºï¼åãå£é¢æ°ï¼
+ */
+void
+eHistogram_print(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	uint_t	i;
+
+	for (i = 0; i <= ATTR_maxTime; i++) {
+		if (VAR_histarea[i] > 0) {
+			syslog_2(LOG_NOTICE, "%d : %d", i, VAR_histarea[i]);
+		}
+	}
+	if (VAR_over > 0) {
+		syslog_2(LOG_NOTICE, "> %d : %d", ATTR_maxTime, VAR_over);
+	}
+	if (VAR_under > 0) {
+		syslog_1(LOG_NOTICE, "> INT_MAX : %d", VAR_under);
+	}
+}
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tHistogram.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tHistogram.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tHistogram.cdl	(revision 270)
@@ -0,0 +1,103 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		å®è¡æéåå¸éè¨ãµã¼ãã¹ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+ */
+
+import_C("syssvc/tHistogram.h");
+
+/*
+ *  å®è¡æéåå¸éè¨ãµã¼ãã¹ã®ã·ã°ããã£
+ */
+signature sHistogram {
+	/*
+	 *  å®è¡æéåå¸è¨æ¸¬ã®åæå
+   	 */
+	void	initialize(void);
+
+	/*
+	 *  å®è¡æéè¨æ¸¬ã®éå§
+	 */
+	void	beginMeasure(void);
+
+	/*
+	 *  å®è¡æéè¨æ¸¬ã®çµäº
+	 */
+	void	endMeasure(void);
+
+	/*
+	 *  å®è¡æéåå¸è¨æ¸¬ã®è¡¨ç¤º
+	 */
+	void	print(void);
+};
+
+/*
+ *  å®è¡æéåå¸éè¨ãµã¼ãã¹ã®ã»ã«ã¿ã¤ã
+ */
+celltype tHistogram {
+	entry	sHistogram		eHistogram;
+
+	attr {
+		uint_t		maxTime = 1000;		/* åå¸ãè¨é²ããæå¤§æé */
+	};
+	var {
+		[size_is(maxTime + 1)] uint_t	*histarea;
+										/* åå¸ãè¨é²ããã¡ã¢ãªé å */
+		histtim_t	begin_time;			/* è¨æ¸¬éå§æå» */
+		uint_t		over;				/* æå¤§æéãè¶
+ããåº¦æ° */
+		uint_t		under;				/* æéã®éè»¢ãçãããåº¦æ° */
+	};
+};
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tHistogram.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tHistogram.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tHistogram.h	(revision 270)
@@ -0,0 +1,92 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		å®è¡æéåå¸éè¨ãµã¼ãã¹ã®ããããã¡ã¤ã«
+ */
+
+#ifndef TOPPERS_THISTOGRAM_H
+#define TOPPERS_THISTOGRAM_H
+
+#include "target_syssvc.h"
+
+/*
+ *  ã¿ã¼ã²ããä¾å­é¨ã§è¨­å®å¤æ´ããããã®ãã¯ã­
+ */
+#ifndef HISTTIM						/* å®è¡æéè¨æ¸¬ç¨ã®æå»ã®ãã¼ã¿å */
+#define HISTTIM					HRTCNT
+
+#ifdef TCYC_HRTCNT					/* å®è¡æéè¨æ¸¬ç¨ã®æå»ã®å¨æ */
+#define HISTTIM_CYCLE			TCYC_HRTCNT
+#endif /* TCYC_HRTCNT */
+#endif /* HISTTIM */
+
+#ifndef HIST_GET_TIM				/* å®è¡æéè¨æ¸¬ç¨ã®ç¾å¨æå»ã®åå¾ */
+#define HIST_GET_TIM(p_time)	(*(p_time) = fch_hrt())
+#endif /* HIST_GET_TIM */
+
+#ifndef HIST_CONV_TIM				/* æå»ã®å·®ããå®è¡æéã¸ã®å¤æ */
+#define HIST_CONV_TIM(time)		((uint_t)(time))
+#endif /* HIST_CONV_TIM */
+
+#ifndef HIST_BM_HOOK				/* å®è¡æéè¨æ¸¬ç´åã«è¡ãã¹ãå¦ç */
+#define HIST_BM_HOOK()			((void) 0)
+#endif
+
+/*
+ *  å®è¡æéè¨æ¸¬ç¨ã®æå»ã®ãã¼ã¿åã®å®ç¾©
+ */
+typedef HISTTIM	histtim_t;
+
+#endif /* TOPPERS_THISTOGRAM_H */
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tHistogramAdapter.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tHistogramAdapter.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tHistogramAdapter.c	(revision 270)
@@ -0,0 +1,102 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		Cè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããï¼TECSãã¼ã¹ã®å®è¡æéåå¸
+ *		éè¨ãµã¼ãã¹ãå¼ã³åºãããã®ã¢ããã¿
+ */
+
+#include "tHistogramAdapter_tecsgen.h"
+#include "histogram.h"
+
+/*
+ *  å®è¡æéåå¸è¨æ¸¬ã®åæåï¼ãµã¼ãã¹ã³ã¼ã«ï¼
+ */
+void
+init_hist(ID histid)
+{
+	assert(1 <= histid && histid <= N_CP_cHistogram);
+	return(cHistogram_initialize(histid - 1));
+}
+
+/*
+ *  å®è¡æéè¨æ¸¬ã®éå§
+ */
+void
+begin_measure(ID histid)
+{
+	assert(1 <= histid && histid <= N_CP_cHistogram);
+	return(cHistogram_beginMeasure(histid - 1));
+}
+
+/*
+ *  å®è¡æéè¨æ¸¬ã®çµäº
+ */
+void
+end_measure(ID histid)
+{
+	assert(1 <= histid && histid <= N_CP_cHistogram);
+	return(cHistogram_endMeasure(histid - 1));
+}
+
+/*
+ *  å®è¡æéåå¸è¨æ¸¬ã®è¡¨ç¤º
+ */
+void
+print_hist(ID histid)
+{
+	assert(1 <= histid && histid <= N_CP_cHistogram);
+	return(cHistogram_print(histid - 1));
+}
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tHistogramAdapter.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tHistogramAdapter.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tHistogramAdapter.cdl	(revision 270)
@@ -0,0 +1,10 @@
+/*
+ *		Cè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããï¼TECSãã¼ã¹ã®å®è¡æéåå¸
+ *		éè¨ãµã¼ãã¹ãå¼ã³åºãããã®ã¢ããã¿ç¨ã»ã«ã¿ã¤ãã®å®ç¾©
+ * 
+ *  $Id$
+ */
+[singleton, active]
+celltype tHistogramAdapter {
+	call	sHistogram		cHistogram[];
+};
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tLogTask.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tLogTask.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tLogTask.cdl	(revision 270)
@@ -0,0 +1,143 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+ */
+
+/*
+ *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ã·ã°ããã£
+ */
+signature sLogTask {
+	ER		flush([in] uint_t count);
+};
+
+/*
+ *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®æ¬ä½ã®ã»ã«ã¿ã¤ã
+ */
+[singleton]
+celltype tLogTaskMain {
+	entry	sTaskBody		eLogTaskBody;
+	entry	sRoutineBody	eLogTaskTerminate;
+	entry	sLogTask		eLogTask;
+
+	call	sSerialPort		cSerialPort;	/* ã·ãªã¢ã«ãã©ã¤ãã¨ã®æ¥ç¶ */
+	call	snSerialPortManage	cnSerialPortManage;
+											/* ã·ãªã¢ã«ãã©ã¤ãç®¡çã¨ã®æ¥ç¶ */
+	call	sSysLog			cSysLog;		/* ã·ã¹ãã ã­ã°æ©è½ã¨ã®æ¥ç¶ */
+	call	sPutLog			cPutLog;		/* ä½ã¬ãã«åºåã¨ã®æ¥ç¶ */
+
+	attr {
+		RELTIM	interval;				/* ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®åä½éé */
+		RELTIM	flushWait;				/* ãã©ãã·ã¥å¾
+ã¡ã®åä½æé */
+	};
+};
+
+/*
+ *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ï¼è¤åã³ã³ãã¼ãã³ãï¼ã®ã»ã«ã¿ã¤ã
+ */
+[singleton, active]
+composite tLogTask {
+	entry	sLogTask	eLogTask;		/* ã·ã¹ãã ã­ã°ã¿ã¹ã¯æä½ */
+	
+	call	sSerialPort	cSerialPort;	/* ã·ãªã¢ã«ãã©ã¤ãã¨ã®æ¥ç¶ */
+	call	snSerialPortManage	cnSerialPortManage;
+										/* ã·ãªã¢ã«ãã©ã¤ãç®¡çã¨ã®æ¥ç¶ */
+	call	sSysLog		cSysLog;		/* ã·ã¹ãã ã­ã°æ©è½ã¨ã®æ¥ç¶ */
+	call	sPutLog		cPutLog;		/* ä½ã¬ãã«åºåã¨ã®æ¥ç¶ */
+
+	attr {
+		[omit] ATR		attribute = C_EXP("TA_ACT");	/* ã¿ã¹ã¯å±æ§ */
+		[omit] PRI  	priority;		/* ã¿ã¹ã¯ã®åæåªå
+åº¦ */
+		[omit] size_t 	stackSize;		/* ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº */
+		RELTIM		interval = 10000;	/* ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®åä½éé */
+		RELTIM		flushWait = 1000;	/* ãã©ãã·ã¥å¾
+ã¡ã®åä½æé */
+	};
+
+	cell tLogTaskMain LogTaskMain {
+		/* å¼ã³å£ã®çµå */
+		cSerialPort        => composite.cSerialPort;
+		cnSerialPortManage => composite.cnSerialPortManage;
+		cSysLog            => composite.cSysLog;
+		cPutLog            => composite.cPutLog;
+
+		/* å±æ§ã®ç¶æ¿ */
+		interval  = composite.interval;
+		flushWait = composite.flushWait;
+	};
+
+	cell tTask Task {
+		/* å¼ã³å£ã®çµå */
+		cTaskBody = LogTaskMain.eLogTaskBody;
+
+		/* å±æ§ã®ç¶æ¿ */
+		attribute = composite.attribute;
+		priority  = composite.priority;
+		stackSize = composite.stackSize;
+	};
+
+	cell tTerminateRoutine TerminateRoutine {
+		/* å¼ã³å£ */
+		cTerminateRoutineBody = LogTaskMain.eLogTaskTerminate;
+	};
+
+	/* åãå£ã®çµå */
+	composite.eLogTask => LogTaskMain.eLogTask;
+};
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tLogTaskMain.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tLogTaskMain.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tLogTaskMain.c	(revision 270)
@@ -0,0 +1,216 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ã¹ãã ã­ã°ã¿ã¹ã¯
+ */
+
+#include <kernel.h>
+#include "tLogTaskMain_tecsgen.h"
+#include <t_syslog.h>
+#include <log_output.h>
+
+/*
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ã¸ã®1æå­åºå
+ */
+static void
+logtask_putc(char c)
+{
+	cSerialPort_write(&c, 1);
+}
+
+/*
+ *  ä½ã¬ãã«åºåã¸ã®1æå­åºå
+ */
+static void
+target_fput_log(char c)
+{
+	cPutLog_putChar(c);
+}
+
+/*
+ *  ã·ã¹ãã ã­ã°åºåã®å¾
+ã¡åããï¼åãå£é¢æ°ï¼
+ */
+ER
+eLogTask_flush(uint_t count)
+{
+	T_SYSLOG_RLOG	rlog;
+	T_SERIAL_RPOR	rpor;
+	ER				ercd, rercd;
+
+	if (sns_dpn()) {
+		ercd = E_CTX;
+	}
+	else {
+		for (;;) {
+			if (cSysLog_refer(&rlog) < 0) {
+				ercd = E_SYS;
+				goto error_exit;
+			}
+			if (rlog.count <= count) {
+				if (count == 0U) {
+					/*
+					 *  countã0ã®å ´åã«ã¯ï¼ã·ãªã¢ã«ãããã¡ãç©ºããç¢º
+					 *  èªããï¼
+					 */
+					if (cSerialPort_refer(&rpor) < 0) {
+						ercd = E_SYS;
+						goto error_exit;
+					}
+					if (rpor.wricnt == 0U) {
+						ercd = E_OK;
+						goto error_exit;
+					}
+				}
+				else {
+					ercd = E_OK;
+					goto error_exit;
+				}
+			}
+
+			/*
+			 *  ãã©ãã·ã¥å¾
+ã¡ã®åä½æéï¼ATTR_flushWaitÎ¼ç§ï¼å¾
+ã¤ï¼
+			 */
+			rercd = dly_tsk(ATTR_flushWait);
+			if (rercd < 0) {
+				ercd = (rercd == E_RLWAI) ? rercd : E_SYS;
+				goto error_exit;
+			}
+		}
+	}
+
+  error_exit:
+	return(ercd);
+}
+
+/*
+ *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®æ¬ä½ï¼åãå£é¢æ°ï¼
+ */
+void
+eLogTaskBody_main(void)
+{
+	SYSLOG	syslog;
+	uint_t	lost;
+	ER_UINT	rercd;
+
+	cSerialPort_open();
+	syslog_0(LOG_NOTICE, "System logging task is started.");
+
+	for (;;) {
+		lost = 0U;
+		while ((rercd = cSysLog_read(&syslog)) >= 0) {
+			lost += (uint_t) rercd;
+			if (lost > 0U) {
+				syslog_lostmsg(lost, logtask_putc);
+				lost = 0U;
+			}
+			syslog_print(&syslog, logtask_putc);
+			logtask_putc('\n');
+		}
+		if (lost > 0U) {
+			syslog_lostmsg(lost, logtask_putc);
+		}
+		dly_tsk(ATTR_interval);
+	}
+}
+
+/*
+ *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®çµäºå¦çï¼åãå£é¢æ°ï¼
+ */
+void
+eLogTaskTerminate_main(intptr_t exinf)
+{
+	char	c;
+	SYSLOG	syslog;
+	bool_t	msgflg = false;
+	ER_UINT	rercd;
+
+	/*
+	 *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®éä¿¡ãããã¡ã«èç©ããããã¼ã¿
+	 *  ãï¼ä½ã¬ãã«åºåæ©è½ãç¨ãã¦åºåããï¼
+	 */
+	while (cnSerialPortManage_getChar(&c)) {
+		target_fput_log(c);
+	}
+
+	/*
+	 *  ã­ã°ãããã¡ã«è¨é²ãããã­ã°æ
+å ±ãï¼ä½ã¬ãã«åºåæ©è½ãç¨ãã¦åº
+	 *  åããï¼
+	 */
+	while ((rercd = cSysLog_read(&syslog)) >= 0) {
+		if (!msgflg) {
+			/*
+			 *  ã­ã°ãããã¡ã«æ®ã£ãã­ã°æ
+å ±ã§ãããã¨ãç¤ºãæå­åãåº
+			 *  åããï¼
+			 */
+			syslog_printf("-- buffered messages --\n", NULL, target_fput_log);
+			msgflg = true;
+		}
+		if (rercd > 0) {
+			syslog_lostmsg((uint_t) rercd, target_fput_log);
+		}
+		if (syslog.logtype >= LOG_TYPE_COMMENT) {
+			syslog_print(&syslog, target_fput_log);
+			target_fput_log('\n');
+		}
+	}
+}
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tSerialAdapter.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tSerialAdapter.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tSerialAdapter.c	(revision 270)
@@ -0,0 +1,160 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		Cè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããï¼TECSãã¼ã¹ã®ã·ãªã¢ã«ã¤ã³
+ *		ã¿ãã§ã¼ã¹ãã©ã¤ããå¼ã³åºãããã®ã¢ããã¿
+ */
+
+#include "tSerialAdapter_tecsgen.h"
+#include "serial.h"
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãã®ãªã¼ãã³ï¼ãµã¼ãã¹ã³ã¼ã«ï¼
+ */
+ER
+serial_opn_por(ID portid)
+{
+	if (sns_dpn()) {				/* ã³ã³ãã­ã¹ãã®ãã§ãã¯ */
+		return(E_CTX);
+	}
+	if (!(1 <= portid && portid <= N_CP_cSerialPort)) {
+		return(E_ID);				/* ãã¼ãçªå·ã®ãã§ãã¯ */
+	}
+
+	return(cSerialPort_open(portid - 1));
+}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãã®ã¯ã­ã¼ãºï¼ãµã¼ãã¹ã³ã¼ã«ï¼
+ */
+ER
+serial_cls_por(ID portid)
+{
+	if (sns_dpn()) {				/* ã³ã³ãã­ã¹ãã®ãã§ãã¯ */
+		return(E_CTX);
+	}
+	if (!(1 <= portid && portid <= N_CP_cSerialPort)) {
+		return(E_ID);				/* ãã¼ãçªå·ã®ãã§ãã¯ */
+	}
+
+	return(cSerialPort_close(portid - 1));
+}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãããã®æå­ååä¿¡ï¼ãµã¼ãã¹ã³ã¼ã«ï¼
+ */
+ER_UINT
+serial_rea_dat(ID portid, char *buf, uint_t len)
+{
+	if (sns_dpn()) {				/* ã³ã³ãã­ã¹ãã®ãã§ãã¯ */
+		return(E_CTX);
+	}
+	if (!(1 <= portid && portid <= N_CP_cSerialPort)) {
+		return(E_ID);				/* ãã¼ãçªå·ã®ãã§ãã¯ */
+	}
+
+	return(cSerialPort_read(portid - 1, buf, len));
+}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãã¸ã®æå­åéä¿¡ï¼ãµã¼ãã¹ã³ã¼ã«ï¼
+ */
+ER_UINT
+serial_wri_dat(ID portid, const char *buf, uint_t len)
+{
+	if (sns_dpn()) {				/* ã³ã³ãã­ã¹ãã®ãã§ãã¯ */
+		return(E_CTX);
+	}
+	if (!(1 <= portid && portid <= N_CP_cSerialPort)) {
+		return(E_ID);				/* ãã¼ãçªå·ã®ãã§ãã¯ */
+	}
+
+	return(cSerialPort_write(portid - 1, buf, len));
+}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãã®å¶å¾¡ï¼ãµã¼ãã¹ã³ã¼ã«ï¼
+ */
+ER
+serial_ctl_por(ID portid, uint_t ioctl)
+{
+	if (sns_dpn()) {				/* ã³ã³ãã­ã¹ãã®ãã§ãã¯ */
+		return(E_CTX);
+	}
+	if (!(1 <= portid && portid <= N_CP_cSerialPort)) {
+		return(E_ID);				/* ãã¼ãçªå·ã®ãã§ãã¯ */
+	}
+
+	return(cSerialPort_control(portid - 1, ioctl));
+}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãç¶æ
+ã®åç
+§ï¼ãµã¼ãã¹ã³ã¼ã«ï¼
+ */
+ER
+serial_ref_por(ID portid, T_SERIAL_RPOR *pk_rpor)
+{
+	if (sns_dpn()) {				/* ã³ã³ãã­ã¹ãã®ãã§ãã¯ */
+		return(E_CTX);
+	}
+	if (!(1 <= portid && portid <= N_CP_cSerialPort)) {
+		return(E_ID);				/* ãã¼ãçªå·ã®ãã§ãã¯ */
+	}
+
+	return(cSerialPort_refer(portid - 1, pk_rpor));
+}
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tSerialAdapter.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tSerialAdapter.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tSerialAdapter.cdl	(revision 270)
@@ -0,0 +1,10 @@
+/*
+ *		Cè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããï¼TECSãã¼ã¹ã®ã·ãªã¢ã«ã¤ã³
+ *		ã¿ãã§ã¼ã¹ãã©ã¤ããå¼ã³åºãããã®ã¢ããã¿ç¨ã»ã«ã¿ã¤ãã®å®ç¾©
+ * 
+ *  $Id$
+ */
+[singleton, active]
+celltype tSerialAdapter {
+	call	sSerialPort		cSerialPort[];
+};
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tSerialPort.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tSerialPort.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tSerialPort.cdl	(revision 270)
@@ -0,0 +1,209 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+ */
+
+/*
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ããTECSãç¨ããã«å¼ã³åºãããã«ãå¿
+è¦
+ *  ãªå®ç¾©ã®åè¾¼ã¿
+ */
+import_C("syssvc/serial.h");
+
+/*
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã·ã°ããã£
+ */
+signature sSerialPort {
+	ER		open(void);
+	ER		close(void);
+	ER_UINT	read([out,size_is(length)] char *buffer, [in] uint_t length);
+	ER_UINT	write([in,size_is(length)] const char *buffer, [in] uint_t length);
+	ER		control([in] uint_t ioControl);
+	ER		refer([out] T_SERIAL_RPOR *pk_rpor);
+};
+
+/*
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨ãæä¾ããé¢æ°
+ */
+signature sSIOPort {
+	void	open(void);
+	void	close(void);
+	bool_t	putChar([in] char c);
+	int_t	getChar(void);
+	void	enableCBR([in] uint_t cbrtn);
+	void	disableCBR([in] uint_t cbrtn);
+};
+
+/*
+ *  ã³ã¼ã«ããã¯ã«ã¼ãã³ã®è­å¥çªå·ï¼cbrtnãã©ã¡ã¼ã¿ã«ç¨ããï¼
+ */
+const uint_t SIOSendReady = 1;		/* éä¿¡å¯è½ã³ã¼ã«ããã¯ */
+const uint_t SIOReceiveReady = 2;	/* åä¿¡éç¥ã³ã¼ã«ããã¯ */
+
+/*
+ *  ã¿ã¼ã²ããä¾å­é¨ããã®ã³ã¼ã«ããã¯
+ */
+[callback]
+signature siSIOCBR {
+	void	readySend(void);
+	void	readyReceive(void);
+};
+
+/*
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãç®¡çç¨ã®ã·ã°ããã£ï¼çµäºå¦çã«ã¼ãã³
+ *  ããã®ä½¿ç¨ãæ³å®ï¼
+ */
+signature snSerialPortManage {
+	bool_t	getChar([out] char *p_char);
+};
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãã®å¶å¾¡é¨ã®ã»ã«ã¿ã¤ã
+ */
+celltype tSerialPortMain {
+	entry	sSerialPort			eSerialPort;
+	entry	snSerialPortManage	enSerialPortManage;
+
+	call	sSIOPort	cSIOPort;			/* ç°¡æSIOãã©ã¤ãã¨ã®æ¥ç¶ */
+	entry	siSIOCBR	eiSIOCBR;
+	
+	call	sSemaphore	cSendSemaphore;		/* éä¿¡ç¨ã»ããã©ã¨ã®æ¥ç¶ */
+	call	siSemaphore	ciSendSemaphore;
+	call	sSemaphore	cReceiveSemaphore;	/* åä¿¡ç¨ã»ããã©ã¨ã®æ¥ç¶ */
+	call	siSemaphore	ciReceiveSemaphore;
+	
+	attr {
+		uint_t	receiveBufferSize = 256;	/* åä¿¡ãããã¡ãµã¤ãº */
+		uint_t	sendBufferSize = 256;		/* éä¿¡ãããã¡ãµã¤ãº */
+	};
+	var {
+		bool_t	openFlag = C_EXP("false");	/* ãªã¼ãã³æ¸ã¿ãã©ã° */
+		bool_t	errorFlag;					/* ã¨ã©ã¼ãã©ã° */
+		uint_t	ioControl;					/* åä½å¶å¾¡ã®è¨­å®å¤ */
+
+		[size_is(receiveBufferSize)] char *receiveBuffer;	/* åä¿¡ãããã¡ */
+		uint_t	receiveReadPointer;			/* åä¿¡ãããã¡èª­åºããã¤ã³ã¿ */
+		uint_t	receiveWritePointer;		/* åä¿¡ãããã¡æ¸è¾¼ã¿ãã¤ã³ã¿ */
+		uint_t	receiveCount;				/* åä¿¡ãããã¡ä¸­ã®æå­æ° */
+		char  	receiveFlowControl;			/* éãã¹ãSTART/STOP */
+		bool_t	receiveStopped;				/* STOPãéã£ãç¶æ
+ãï¼ */
+
+		[size_is(sendBufferSize)] char *sendBuffer;		/* éä¿¡ãããã¡ */
+		uint_t	sendReadPointer;			/* éä¿¡ãããã¡èª­åºããã¤ã³ã¿ */
+		uint_t	sendWritePointer;			/* éä¿¡ãããã¡æ¸è¾¼ã¿ãã¤ã³ã¿ */
+		uint_t	sendCount;					/* éä¿¡ãããã¡ä¸­ã®æå­æ° */
+		bool_t	sendStopped;				/* STOPãåãåã£ãç¶æ
+ãï¼ */
+	};
+};
+
+/*
+ *  ã·ãªã¢ã«ãã¼ããã©ã¤ãï¼è¤åã»ã«ï¼ã®ã»ã«ã¿ã¤ã
+ *
+ *  ã·ãªã¢ã«ãã¼ãã®å¶å¾¡é¨ã¨ï¼ãããä½¿ç¨ãã2ã¤ã®ã»ããã©ï¼åä¿¡ç¨ã¨é
+ *  ä¿¡ç¨ï¼ãè¤ååãã¦ï¼1ã¤ã®ã³ã³ãã¼ãã³ãã¨ãã¦ããï¼
+ */
+composite tSerialPort {
+	entry	sSerialPort			eSerialPort;
+	entry	snSerialPortManage	enSerialPortManage;
+
+	call	sSIOPort		cSIOPort;		/* ç°¡æSIOãã©ã¤ãã¨ã®æ¥ç¶ */
+	entry	siSIOCBR		eiSIOCBR;
+	
+	attr {
+		uint_t	receiveBufferSize = 256;	/* åä¿¡ãããã¡ãµã¤ãº */
+		uint_t	sendBufferSize = 256;		/* éä¿¡ãããã¡ãµã¤ãº */
+	};
+
+	/* åä¿¡ç¨ã®ã»ããã© */
+	cell tSemaphore ReceiveSemaphore {
+		attribute = C_EXP("TA_NULL");
+		initialCount = 0;
+		maxCount =1;
+	};
+
+	/* éä¿¡ç¨ã®ã»ããã© */
+	cell tSemaphore SendSemaphore {
+		attribute = C_EXP("TA_NULL");
+		initialCount = 1;
+		maxCount =1;
+	};
+
+	/* ã·ãªã¢ã«ãã¼ãã®å¶å¾¡é¨ */
+	cell tSerialPortMain SerialPortMain {
+		/* ã»ããã©ã¨ã®çµå */
+		cReceiveSemaphore  = ReceiveSemaphore.eSemaphore;
+		ciReceiveSemaphore = ReceiveSemaphore.eiSemaphore;
+		cSendSemaphore     = SendSemaphore.eSemaphore;
+		ciSendSemaphore    = SendSemaphore.eiSemaphore;
+
+		/* å¼ã³å£ã®ã¨ã¯ã¹ãã¼ã */
+		cSIOPort          => composite.cSIOPort;
+
+		/* å±æ§ã®ç¶æ¿ */
+		receiveBufferSize = composite.receiveBufferSize;
+		sendBufferSize    = composite.sendBufferSize;
+	};
+
+	/* åãå£ã®ã¨ã¯ã¹ãã¼ã */
+	composite.eSerialPort        => SerialPortMain.eSerialPort;
+	composite.enSerialPortManage => SerialPortMain.enSerialPortManage;
+	composite.eiSIOCBR           => SerialPortMain.eiSIOCBR;
+};
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tSerialPortMain.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tSerialPortMain.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tSerialPortMain.c	(revision 270)
@@ -0,0 +1,669 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2006-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ã
+ */
+
+#include <kernel.h>
+#include "tSerialPortMain_tecsgen.h"
+#include <t_syslog.h>
+
+/*
+ *  ãã­ã¼å¶å¾¡ã«é¢é£ããå®æ°ã¨ãã¯ã­
+ */
+#define	FC_STOP			'\023'		/* ã³ã³ãã­ã¼ã«-S */
+#define	FC_START		'\021'		/* ã³ã³ãã­ã¼ã«-Q */
+
+#define BUFCNT_STOP(bufsz)		((bufsz) * 3 / 4)	/* STOPãéãåºæºæå­æ° */
+#define BUFCNT_START(bufsz)		((bufsz) / 2)		/* STARTãéãåºæºæå­æ° */
+
+/*
+ *  ãã¤ã³ã¿ã®ã¤ã³ã¯ãªã¡ã³ã
+ */
+#define INC_PTR(ptr, bufsz) do {	\
+	if (++(ptr) == (bufsz)) {		\
+		(ptr) = 0;					\
+	 }								\
+} while (false)
+
+/*
+ *  ãµã¼ãã¹ã³ã¼ã«å¼åºããã¯ã­
+ *
+ *  ãµã¼ãã¹ã³ã¼ã«å¼åºããå«ãå¼expãè©ä¾¡ãï¼è¿å¤ãã¨ã©ã¼ï¼è² ã®å¤ï¼ã®å ´
+ *  åã«ã¯ï¼ercã«ercd_expãè©ä¾¡ããå¤ãä»£å
+¥ãï¼error_exitã«gotoããï¼
+ */
+#define SVC(exp, ercd_exp) do {		\
+	if ((exp) < 0) {				\
+		ercd = (ercd_exp);			\
+		goto error_exit;			\
+	}								\
+} while (false)
+
+/*
+ *  E_SYSã¨ã©ã¼ã®çæ
+ */
+static ER
+gen_ercd_sys(CELLCB *p_cellcb)
+{
+	VAR_errorFlag = true;
+	return(E_SYS);
+}
+
+/*
+ *  å¾
+ã¡ã«å
+¥ããµã¼ãã¹ã³ã¼ã«ããã®ã¨ã©ã¼ã®å¤æ
+ */
+static ER
+gen_ercd_wait(ER rercd, CELLCB *p_cellcb)
+{
+	switch (MERCD(rercd)) {
+	case E_RLWAI:
+	case E_DLT:
+	case E_RASTER:
+		return(rercd);
+	default:
+		VAR_errorFlag = true;
+		return(E_SYS);
+	}
+}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãã®ãªã¼ãã³ï¼åãå£é¢æ°ï¼
+ */
+ER
+eSerialPort_open(CELLIDX idx)
+{
+	CELLCB	*p_cellcb;
+	ER		ercd;
+
+	if (sns_dpn()) {				/* ã³ã³ãã­ã¹ãã®ãã§ãã¯ */
+		return(E_CTX);
+	}
+	if (!VALID_IDX(idx)) {
+		return(E_ID);				/* ãã¼ãçªå·ã®ãã§ãã¯ */
+	}
+	p_cellcb = GET_CELLCB(idx);
+
+	SVC(dis_dsp(), gen_ercd_sys(p_cellcb));
+	if (VAR_openFlag) {				/* ãªã¼ãã³æ¸ã¿ãã®ãã§ãã¯ */
+		ercd = E_OBJ;
+	}
+	else {
+		/*
+		 *  å¤æ°ã®åæå
+		 */
+		VAR_ioControl = (IOCTL_ECHO | IOCTL_CRLF | IOCTL_FCSND | IOCTL_FCRCV);
+
+		VAR_receiveReadPointer = 0U;
+		VAR_receiveWritePointer = 0U;
+		VAR_receiveCount = 0U;
+		VAR_receiveFlowControl = '\0';
+		VAR_receiveStopped = false;
+
+		VAR_sendReadPointer = 0U;
+		VAR_sendWritePointer = 0U;
+		VAR_sendCount = 0U;
+		VAR_sendStopped = false;
+
+		/*
+		 *  ããä»¥éï¼å²è¾¼ã¿ãç¦æ­¢ããï¼
+		 */
+		if (loc_cpu() < 0) {
+			ercd = E_SYS;
+			goto error_exit_enadsp;
+		}
+
+		/*
+		 *  ãã¼ãã¦ã§ã¢ä¾å­ã®ãªã¼ãã³å¦ç
+		 */
+		cSIOPort_open();
+
+		/*
+		 *  åä¿¡éç¥ã³ã¼ã«ããã¯ãè¨±å¯ããï¼
+		 */
+		cSIOPort_enableCBR(SIOReceiveReady);
+		VAR_openFlag = true;
+		VAR_errorFlag = false;
+
+		if (unl_cpu() < 0) {
+			VAR_errorFlag = true;
+			ercd = E_SYS;
+			goto error_exit_enadsp;
+		}
+		ercd = E_OK;
+	}
+
+  error_exit_enadsp:
+	SVC(ena_dsp(), gen_ercd_sys(p_cellcb));
+
+  error_exit:
+	return(ercd);
+}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãã®ã¯ã­ã¼ãºï¼åãå£é¢æ°ï¼
+ */
+ER
+eSerialPort_close(CELLIDX idx)
+{
+	CELLCB	*p_cellcb;
+	ER		ercd;
+	bool_t	eflag = false;
+
+	if (sns_dpn()) {				/* ã³ã³ãã­ã¹ãã®ãã§ãã¯ */
+		return(E_CTX);
+	}
+	if (!VALID_IDX(idx)) {
+		return(E_ID);				/* ãã¼ãçªå·ã®ãã§ãã¯ */
+	}
+	p_cellcb = GET_CELLCB(idx);
+
+	SVC(dis_dsp(), gen_ercd_sys(p_cellcb));
+	if (!VAR_openFlag) {			/* ãªã¼ãã³æ¸ã¿ãã®ãã§ãã¯ */
+		ercd = E_OBJ;
+	}
+	else {
+		/*
+		 *  ãã¼ãã¦ã§ã¢ä¾å­ã®ã¯ã­ã¼ãºå¦ç
+		 */
+		if (loc_cpu() < 0) {
+			eflag = true;
+		}
+		cSIOPort_close();
+		VAR_openFlag = false;
+		if (unl_cpu() < 0) {
+			eflag = true;
+		}
+
+		/*
+		 *  ã»ããã©ã®åæå
+		 */
+		if (cSendSemaphore_initialize() < 0) {
+			eflag = true;
+		}
+		if (cReceiveSemaphore_initialize() < 0) {
+			eflag = true;
+		}
+
+		/*
+		 *  ã¨ã©ã¼ã³ã¼ãã®è¨­å®
+		 */
+		if (eflag) {
+			ercd = gen_ercd_sys(p_cellcb);
+		}
+		else {
+			ercd = E_OK;
+		}
+	}
+	SVC(ena_dsp(), gen_ercd_sys(p_cellcb));
+
+  error_exit:
+	return(ercd);
+}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãã¸ã®æå­éä¿¡
+ *
+ *  p_cellcbã§æå®ãããSIOãã¼ãã«å¯¾ãã¦ï¼æå­cãéä¿¡ããï¼æå­ãéä¿¡
+ *  ã¬ã¸ã¹ã¿ã«ãããå ´åã«ã¯trueãè¿ãï¼ããã§ãªãå ´åã«ã¯ï¼éä¿¡ã¬ã¸ã¹
+ *  ã¿ãç©ºãããã¨ãéç¥ããã³ã¼ã«ããã¯é¢æ°ãè¨±å¯ãï¼falseãè¿ãï¼ãã®
+ *  é¢æ°ã¯ï¼CPUã­ãã¯ç¶æ
+ã§å¼ã³åºãããï¼
+ */
+Inline bool_t
+serialPort_sendChar(CELLCB *p_cellcb, char c)
+{
+	if (cSIOPort_putChar(c)) {
+		return(true);
+	}
+	else {
+		cSIOPort_enableCBR(SIOSendReady);
+		return(false);
+	}
+}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãã¸ã®1æå­éä¿¡
+ */
+static ER_BOOL
+serialPort_writeChar(CELLCB *p_cellcb, char c)
+{
+	bool_t	buffer_full;
+	ER		ercd, rercd;
+
+	/*
+	 *  LFã®åã«CRãéä¿¡ããï¼
+	 */
+	if (c == '\n' && (VAR_ioControl & IOCTL_CRLF) != 0U) {
+		/*
+		 *  ä»¥ä¸ã®ã³ã¼ãã¯åå¸°å¼åºãã«ãªã£ã¦ãããï¼å¼æ°cã'\n'ã®å ´åã«
+		 *  å¼æ°cã'\r'ã¨ãã¦å¼ã³åºããã¨ããï¼ãã®åå¸°å¼åºãã¯2åç®ã®
+		 *  å¼ã³åºãã§å¿
+ãæ­¢ã¾ãï¼
+		 */
+		SVC(rercd = serialPort_writeChar(p_cellcb, '\r'), rercd);
+		if ((bool_t) rercd) {
+			SVC(rercd = cSendSemaphore_wait(),
+										gen_ercd_wait(rercd, p_cellcb));
+		}
+	}
+
+	SVC(loc_cpu(), gen_ercd_sys(p_cellcb));
+	if (VAR_sendCount == 0U && !VAR_sendStopped
+								&& serialPort_sendChar(p_cellcb, c)) {
+		/*
+		 *  SIOã®éä¿¡ã¬ã¸ã¹ã¿ã«æå­ãå
+¥ãããã¨ã«æåããå ´åï¼
+		 */
+		buffer_full = false;
+	}
+	else {
+		/*
+		 *  éä¿¡ãããã¡ã«æå­ãå
+¥ããï¼
+		 */
+		VAR_sendBuffer[VAR_sendWritePointer] = c;
+		INC_PTR(VAR_sendWritePointer, ATTR_sendBufferSize);
+		VAR_sendCount++;
+		buffer_full = (VAR_sendCount == ATTR_sendBufferSize);
+	}
+
+	SVC(unl_cpu(), gen_ercd_sys(p_cellcb));
+	ercd = (ER_BOOL) buffer_full;
+
+  error_exit:
+	return(ercd);
+}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãã¸ã®æå­åéä¿¡ï¼åãå£é¢æ°ï¼
+ */
+ER_UINT
+eSerialPort_write(CELLIDX idx, const char *buffer, uint_t length)
+{
+	CELLCB	*p_cellcb;
+	bool_t	buffer_full;
+	uint_t	wricnt = 0U;
+	ER		ercd, rercd;
+
+	if (sns_dpn()) {				/* ã³ã³ãã­ã¹ãã®ãã§ãã¯ */
+		return(E_CTX);
+	}
+	if (!VALID_IDX(idx)) {			/* ãã¼ãçªå·ã®ãã§ãã¯ */
+		return(E_ID);
+	}
+
+	p_cellcb = GET_CELLCB(idx);
+	if (!VAR_openFlag) {			/* ãªã¼ãã³æ¸ã¿ãã®ãã§ãã¯ */
+		return(E_OBJ);
+	}
+	if (VAR_errorFlag) {			/* ã¨ã©ã¼ç¶æ
+ãã®ãã§ãã¯ */
+		return(E_SYS);
+	}
+
+	buffer_full = true;				/* ã«ã¼ãã®1åãã¯wai_semãã */
+	while (wricnt < length) {
+		if (buffer_full) {
+			SVC(rercd = cSendSemaphore_wait(),
+										gen_ercd_wait(rercd, p_cellcb));
+		}
+		SVC(rercd = serialPort_writeChar(p_cellcb, *buffer++), rercd);
+		wricnt++;
+		buffer_full = (bool_t) rercd;
+	}
+	if (!buffer_full) {
+		SVC(cSendSemaphore_signal(), gen_ercd_sys(p_cellcb));
+	}
+	ercd = E_OK;
+
+  error_exit:
+	return(wricnt > 0U ? (ER_UINT) wricnt : ercd);
+}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãããã®1æå­åä¿¡
+ */
+static bool_t
+serialPort_readChar(CELLCB *p_cellcb, char *p_c)
+{
+	bool_t	buffer_empty;
+	ER		ercd;
+
+	SVC(loc_cpu(), gen_ercd_sys(p_cellcb));
+
+	/*
+	 *  åä¿¡ãããã¡ããæå­ãåãåºãï¼
+	 */
+	*p_c = VAR_receiveBuffer[VAR_receiveReadPointer];
+	INC_PTR(VAR_receiveReadPointer, ATTR_receiveBufferSize);
+	VAR_receiveCount--;
+	buffer_empty = (VAR_receiveCount == 0U);
+
+	/*
+	 *  STARTãéä¿¡ããï¼
+	 */
+	if (VAR_receiveStopped && VAR_receiveCount
+								<= BUFCNT_START(ATTR_receiveBufferSize)) {
+		if (!serialPort_sendChar(p_cellcb, FC_START)) {
+			VAR_receiveFlowControl = FC_START;
+		}
+		VAR_receiveStopped = false;
+	}
+
+	SVC(unl_cpu(), gen_ercd_sys(p_cellcb));
+	ercd = (ER_BOOL) buffer_empty;
+
+  error_exit:
+	return(ercd);
+}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãããã®æå­ååä¿¡ï¼åãå£é¢æ°ï¼
+ */
+ER_UINT
+eSerialPort_read(CELLIDX idx, char *buffer, uint_t length)
+{
+	CELLCB	*p_cellcb;
+	bool_t	buffer_empty;
+	uint_t	reacnt = 0U;
+	char	c = '\0';		/* ã³ã³ãã¤ã©ã®è­¦åãææ­¢ããããã«åæåãã */
+	ER		ercd, rercd;
+
+	if (sns_dpn()) {				/* ã³ã³ãã­ã¹ãã®ãã§ãã¯ */
+		return(E_CTX);
+	}
+	if (!VALID_IDX(idx)) {			/* ãã¼ãçªå·ã®ãã§ãã¯ */
+		return(E_ID);
+	}
+
+	p_cellcb = GET_CELLCB(idx);
+	if (!VAR_openFlag) {			/* ãªã¼ãã³æ¸ã¿ãã®ãã§ãã¯ */
+		return(E_OBJ);
+	}
+	if (VAR_errorFlag) {			/* ã¨ã©ã¼ç¶æ
+ãã®ãã§ãã¯ */
+		return(E_SYS);
+	}
+
+	buffer_empty = true;			/* ã«ã¼ãã®1åãã¯wai_semãã */
+	while (reacnt < length) {
+		if (buffer_empty) {
+			SVC(rercd = cReceiveSemaphore_wait(),
+										gen_ercd_wait(rercd, p_cellcb));
+		}
+		SVC(rercd = serialPort_readChar(p_cellcb, &c), rercd);
+		*buffer++ = c;
+		reacnt++;
+		buffer_empty = (bool_t) rercd;
+
+		/*
+		 *  ã¨ã³ã¼ããã¯å¦çï¼
+		 */
+		if ((VAR_ioControl & IOCTL_ECHO) != 0U) {
+			SVC(rercd = cSendSemaphore_wait(),
+										gen_ercd_wait(rercd, p_cellcb));
+			SVC(rercd = serialPort_writeChar(p_cellcb, c), rercd);
+			if (!((bool_t) rercd)) {
+				SVC(cSendSemaphore_signal(), gen_ercd_sys(p_cellcb));
+			}
+		}
+	}
+	if (!buffer_empty) {
+		SVC(cReceiveSemaphore_signal(), gen_ercd_sys(p_cellcb));
+	}
+	ercd = E_OK;
+
+  error_exit:
+	return(reacnt > 0U ? (ER_UINT) reacnt : ercd);
+}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãã®å¶å¾¡ï¼åãå£é¢æ°ï¼
+ */
+ER
+eSerialPort_control(CELLIDX idx, uint_t ioctl)
+{
+	CELLCB	*p_cellcb;
+
+	if (sns_dpn()) {				/* ã³ã³ãã­ã¹ãã®ãã§ãã¯ */
+		return(E_CTX);
+	}
+	if (!VALID_IDX(idx)) {
+		return(E_ID);				/* ãã¼ãçªå·ã®ãã§ãã¯ */
+	}
+
+	p_cellcb = GET_CELLCB(idx);
+	if (!VAR_openFlag) {			/* ãªã¼ãã³æ¸ã¿ãã®ãã§ãã¯ */
+		return(E_OBJ);
+	}
+	if (VAR_errorFlag) {			/* ã¨ã©ã¼ç¶æ
+ãã®ãã§ãã¯ */
+		return(E_SYS);
+	}
+
+	VAR_ioControl = ioctl;
+	return(E_OK);
+}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãç¶æ
+ã®åç
+§ï¼åãå£é¢æ°ï¼
+ */
+ER
+eSerialPort_refer(CELLIDX idx, T_SERIAL_RPOR* pk_rpor)
+{
+	CELLCB	*p_cellcb;
+
+	if (sns_dpn()) {				/* ã³ã³ãã­ã¹ãã®ãã§ãã¯ */
+		return(E_CTX);
+	}
+	if (!VALID_IDX(idx)) {
+		return(E_ID);				/* ãã¼ãçªå·ã®ãã§ãã¯ */
+	}
+
+	p_cellcb = GET_CELLCB(idx);
+	if (!VAR_openFlag) {			/* ãªã¼ãã³æ¸ã¿ãã®ãã§ãã¯ */
+		return(E_OBJ);
+	}
+	if (VAR_errorFlag) {			/* ã¨ã©ã¼ç¶æ
+ãã®ãã§ãã¯ */
+		return(E_SYS);
+	}
+
+	pk_rpor->reacnt = VAR_receiveCount;
+	pk_rpor->wricnt = VAR_sendCount;
+	return(E_OK);
+}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãããã®éä¿¡å¯è½ã³ã¼ã«ããã¯ï¼åãå£é¢æ°ï¼
+ */
+void
+eiSIOCBR_readySend(CELLIDX idx)
+{
+	CELLCB	*p_cellcb;
+
+	assert(VALID_IDX(idx));
+	p_cellcb = GET_CELLCB(idx);
+	if (VAR_receiveFlowControl != '\0') {
+		/*
+		 *  START/STOP ãéä¿¡ããï¼
+		 */
+		(void) cSIOPort_putChar(VAR_receiveFlowControl);
+		VAR_receiveFlowControl = '\0';
+	}
+	else if (!VAR_sendStopped && VAR_sendCount > 0U) {
+		/*
+		 *  éä¿¡ãããã¡ä¸­ããæå­ãåãåºãã¦éä¿¡ããï¼
+		 */
+		(void) cSIOPort_putChar(VAR_sendBuffer[VAR_sendReadPointer]);
+		INC_PTR(VAR_sendReadPointer, ATTR_sendBufferSize);
+		if (VAR_sendCount == ATTR_sendBufferSize) {
+			if (ciSendSemaphore_signal() < 0) {
+				VAR_errorFlag = true;
+			}
+		}
+		VAR_sendCount--;
+	}
+	else {
+		/*
+		 *  éä¿¡ãã¹ãæå­ããªãå ´åã¯ï¼éä¿¡å¯è½ã³ã¼ã«ããã¯ãç¦æ­¢ããï¼
+		 */
+		cSIOPort_disableCBR(SIOSendReady);
+	}
+}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãããã®åä¿¡éç¥ã³ã¼ã«ããã¯ï¼åãå£é¢æ°ï¼
+ */
+void
+eiSIOCBR_readyReceive(CELLIDX idx)
+{
+	CELLCB	*p_cellcb;
+	char	c;
+
+	assert(VALID_IDX(idx));
+	p_cellcb = GET_CELLCB(idx);
+	c = (char) cSIOPort_getChar();
+	if ((VAR_ioControl & IOCTL_FCSND) != 0U && c == FC_STOP) {
+		/*
+		 *  éä¿¡ãä¸æåæ­¢ããï¼éä¿¡ä¸­ã®æå­ã¯ãã®ã¾ã¾éä¿¡ããï¼
+		 */
+		VAR_sendStopped = true;
+	}
+	else if (VAR_sendStopped && (c == FC_START
+				|| (VAR_ioControl & IOCTL_FCANY) != 0U)) {
+		/*
+		 *  éä¿¡ãåéããï¼
+		 */
+		VAR_sendStopped = false;
+		if (VAR_sendCount > 0U) {
+			c = VAR_sendBuffer[VAR_sendReadPointer];
+			if (serialPort_sendChar(p_cellcb, c)) {
+				INC_PTR(VAR_sendReadPointer, ATTR_sendBufferSize);
+				if (VAR_sendCount == ATTR_sendBufferSize) {
+					if (ciSendSemaphore_signal() < 0) {
+						VAR_errorFlag = true;
+					}
+				}
+				VAR_sendCount--;
+			}
+		}
+	}
+	else if ((VAR_ioControl & IOCTL_FCSND) != 0U && c == FC_START) {
+		/*
+		 *  éä¿¡ã«å¯¾ãã¦ãã­ã¼å¶å¾¡ãã¦ããå ´åï¼START ã¯æ¨ã¦ãï¼
+		 */
+	}
+	else if (VAR_receiveCount == ATTR_receiveBufferSize) {
+		/*
+		 *  ãããã¡ãã«ã®å ´åï¼åä¿¡ããæå­ãæ¨ã¦ãï¼
+		 */
+	}
+	else {
+		/*
+		 *  åä¿¡ããæå­ãåä¿¡ãããã¡ã«å
+¥ããï¼
+		 */
+		VAR_receiveBuffer[VAR_receiveWritePointer] = c;
+		INC_PTR(VAR_receiveWritePointer, ATTR_receiveBufferSize);
+		if (VAR_receiveCount == 0U) {
+			if (ciReceiveSemaphore_signal() < 0) {
+				VAR_errorFlag = true;
+			}
+		}
+		VAR_receiveCount++;
+
+		/*
+		 *  STOPãéä¿¡ããï¼
+		 */
+		if ((VAR_ioControl & IOCTL_FCRCV) != 0U && !VAR_receiveStopped
+				&& VAR_receiveCount >= BUFCNT_STOP(ATTR_receiveBufferSize)) {
+			if (!serialPort_sendChar(p_cellcb, FC_STOP)) {
+				VAR_receiveFlowControl = FC_STOP;
+			}
+			VAR_receiveStopped = true;
+		}
+	}
+}
+
+/*
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãããã®æªéä¿¡æå­ã®ååºã
+ */
+bool_t
+enSerialPortManage_getChar(CELLIDX idx, char *p_c)
+{
+	CELLCB	*p_cellcb;
+
+	if (VALID_IDX(idx)) {						/* ãã¼ãçªå·ã®ãã§ãã¯ */
+		p_cellcb = GET_CELLCB(idx);
+		if (VAR_openFlag) {						/* ãªã¼ãã³æ¸ã¿ãã®ãã§ãã¯ */
+			if (VAR_sendCount > 0U) {
+				*p_c = VAR_sendBuffer[VAR_sendReadPointer];
+				INC_PTR(VAR_sendReadPointer, ATTR_sendBufferSize);
+				VAR_sendCount--;
+				return(true);
+			}
+		}
+	}
+	return(false);
+}
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tSysLog.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tSysLog.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tSysLog.c	(revision 270)
@@ -0,0 +1,251 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ã¹ãã ã­ã°æ©è½
+ */
+
+#include <sil.h>
+#include "tSysLog_tecsgen.h"
+#undef TOPPERS_OMIT_SYSLOG
+#include <t_syslog.h>
+#include <log_output.h>
+#include "target_syssvc.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ *
+ *  ã·ã¹ãã ã­ã°ã«åºåãããã­ã°æ
+å ±ããã¬ã¼ã¹ã­ã°ã«ãè¨é²ã§ããããã«ï¼
+ *  eSyslog_writeã®å
+¥å£ã«ãã¬ã¼ã¹ã­ã°ãã¯ã­ãç½®ãï¼
+ */
+#ifndef LOG_TSYSLOG_ESYSLOG_WRITE_ENTER
+#define LOG_TSYSLOG_ESYSLOG_WRITE_ENTER(priority, p_syslog)
+#endif /* LOG_TSYSLOG_ESYSLOG_WRITE_ENTER */
+
+/*
+ *  ã­ã°æå»ã®åãåºã
+ *
+ *  ããã©ã«ãã§ã¯ï¼ã­ã°æå»ã¨ãã¦ï¼é«åè§£è½ã¿ã¤ãã®ã«ã¦ã³ãå¤ãç¨ãã¦
+ *  ããï¼ã¿ã¼ã²ããä¾å­ã§å¤æ´ããå ´åã«ã¯ï¼SYSLOG_GET_LOGTIMã«ï¼ã­ã°æ
+ *  å»ãåãåºããã¯ã­ãå®ç¾©ããï¼
+ */
+#ifndef SYSLOG_GET_LOGTIM
+#define target_hrt_get_current		_kernel_target_hrt_get_current
+#include "target_timer.h"
+#define SYSLOG_GET_LOGTIM(p_logtim) \
+				(*(p_logtim) = _kernel_target_hrt_get_current())
+#endif /* SYSLOG_GET_LOGTIM */
+
+/*
+ *  ä½ã¬ãã«åºåã®å¼åºãé¢æ°
+ */
+static void
+low_putchar(char c)
+{
+	cPutLog_putChar(c);
+}
+
+/*
+ *  ã­ã°æ
+å ±ã®åºåï¼åãå£é¢æ°ï¼
+ *
+ *  CPUã­ãã¯ç¶æ
+ãå®è¡ã³ã³ãã­ã¹ãã«ãããåä½ã§ããããã«å®è£
+ãã¦ããï¼
+ */
+ER
+eSysLog_write(uint_t priority, const SYSLOG *p_syslog)
+{
+	SIL_PRE_LOC;
+
+	LOG_TSYSLOG_ESYSLOG_WRITE_ENTER(priority, p_syslog);
+	SIL_LOC_INT();
+
+	/*
+	 *  ã­ã°æå»ã®è¨­å®
+	 */
+	SYSLOG_GET_LOGTIM(&(((SYSLOG *) p_syslog)->logtim));
+
+	/*
+	 *  ã­ã°ãããã¡ã«è¨é²
+	 */
+	if ((VAR_logMask & LOG_MASK(priority)) != 0U) {
+		VAR_logBuffer[VAR_tail] = *p_syslog;
+		VAR_tail++;
+		if (VAR_tail >= ATTR_logBufferSize) {
+			VAR_tail = 0U;
+		}
+		if (VAR_count < ATTR_logBufferSize) {
+			VAR_count++;
+		}
+		else {
+			VAR_head = VAR_tail;
+			VAR_lost++;
+		}
+	}
+
+	/*
+	 *  ä½ã¬ãã«åºå
+	 */
+	if ((VAR_lowMask & LOG_MASK(priority)) != 0U) {
+		syslog_print(p_syslog, low_putchar);
+		low_putchar('\n');
+	}
+
+	SIL_UNL_INT();
+	return(E_OK);
+}
+
+/*
+ *  ã­ã°ãããã¡ããã®èª­åºãï¼åãå£é¢æ°ï¼
+ *
+ *  CPUã­ãã¯ç¶æ
+ãå®è¡ã³ã³ãã­ã¹ãã«ãããåä½ã§ããããã«å®è£
+ãã¦ããï¼
+ */
+ER_UINT
+eSysLog_read(SYSLOG *p_syslog)
+{
+	ER_UINT	ercd;
+	SIL_PRE_LOC;
+
+	SIL_LOC_INT();
+
+	/*
+	 *  ã­ã°ãããã¡ããã®ååºã
+	 */
+	if (VAR_count > 0U) {
+		*p_syslog = VAR_logBuffer[VAR_head];
+		VAR_count--;
+		VAR_head++;
+		if (VAR_head >= ATTR_logBufferSize) {
+			VAR_head = 0U;
+		}
+		ercd = (ER_UINT) VAR_lost;
+		VAR_lost = 0U;
+	}
+	else {
+		ercd = E_OBJ;
+	}
+
+	SIL_UNL_INT();
+	return(ercd);
+}
+
+/* 
+ *  åºåãã¹ãã­ã°æ
+å ±ã®éè¦åº¦ã®è¨­å®ï¼åãå£é¢æ°ï¼
+ */
+ER
+eSysLog_mask(uint_t logMask, uint_t lowMask)
+{
+	SIL_PRE_LOC;
+
+	SIL_LOC_INT();
+	VAR_logMask = logMask;
+	VAR_lowMask = lowMask;
+	SIL_UNL_INT();
+	return(E_OK);
+}
+
+/*
+ *  ã­ã°ãããã¡ã®ç¶æ
+åç
+§ï¼åãå£é¢æ°ï¼
+ */
+ER_UINT
+eSysLog_refer(T_SYSLOG_RLOG *pk_rlog)
+{
+	SIL_PRE_LOC;
+
+	SIL_LOC_INT();
+	pk_rlog->count = VAR_count;
+	pk_rlog->lost = VAR_lost;
+	pk_rlog->logmask = VAR_logMask;
+	pk_rlog->lowmask = VAR_lowMask;
+	SIL_UNL_INT();
+	return(E_OK);
+}
+
+/* 
+ *  ä½ã¬ãã«åºåã«ãããã¹ã¦ã®ã­ã°æ
+å ±ã®åºåï¼åãå£é¢æ°ï¼
+ */
+ER
+eSysLog_flush(void)
+{
+	SYSLOG	logbuf;
+	ER_UINT	rercd;
+	SIL_PRE_LOC;
+
+	SIL_LOC_INT();
+
+	while ((rercd = eSysLog_read(&logbuf)) >= 0) {
+		if (rercd > 0) {
+			syslog_lostmsg((uint_t) rercd, low_putchar);
+		}
+		if (logbuf.logtype >= LOG_TYPE_COMMENT) {
+			syslog_print(&logbuf, low_putchar);
+			low_putchar('\n');
+		}
+	}
+
+	SIL_UNL_INT();
+	return(E_OK);
+}
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tSysLog.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tSysLog.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tSysLog.cdl	(revision 270)
@@ -0,0 +1,134 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ã¹ãã ã­ã°æ©è½ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+ */
+
+/*
+ *  ã·ã¹ãã ã­ã°åºåã«é¢ããå®ç¾©
+ */
+import_C("t_syslog.h");
+
+/*
+ *  ä½ã¬ãã«åºåã®ã·ã°ããã£
+ */
+signature sPutLog {
+	void	putChar([in] char c);
+};
+
+/*
+ *  ã·ã¹ãã ã­ã°æ©è½ã®ã·ã°ããã£
+ */
+signature sSysLog {
+	/*
+	 *  ã­ã°æ
+å ±ã®åºå
+	 */
+	ER		write([in] uint_t priority, [in] const SYSLOG *p_syslog);
+
+	/*
+	 *  ã­ã°ãããã¡ããã®ã­ã°æ
+å ±ã®èª­åºã
+	 */
+	ER_UINT	read([out] SYSLOG *p_syslog);
+
+	/*
+	 *  åºåãã¹ãã­ã°æ
+å ±ã®éè¦åº¦ã®è¨­å®
+	 */
+	ER		mask([in] uint_t logMask, [in] uint_t lowMask);
+
+	/*
+	 *  ä½ã¬ãã«åºåã«ãããã¹ã¦ã®ã­ã°æ
+å ±ã®åºå
+	 */
+	ER		refer([out] T_SYSLOG_RLOG *pk_rlog);
+
+	/*
+	 *  ä½ã¬ãã«åºåã«ãããã¹ã¦ã®ã­ã°æ
+å ±ã®åºå
+	 */
+	ER		flush(void);
+};
+
+/*
+ *  ã·ã¹ãã ã­ã°æ©è½ã®ã»ã«ã¿ã¤ã
+ */
+[singleton]
+celltype tSysLog {
+	entry	sSysLog		eSysLog;
+	call	sPutLog		cPutLog;		/* ä½ã¬ãã«åºåã¨ã®æ¥ç¶ */
+
+	attr {
+		uint_t	logBufferSize;			/* ã­ã°ãããã¡ãµã¤ãº */
+		uint_t	initLogMask = C_EXP("LOG_UPTO(LOG_DEBUG)");
+										/* ã­ã°ãããã¡ã«è¨é²ãã¹ãéè¦åº¦ */
+		uint_t	initLowMask = C_EXP("LOG_UPTO(LOG_EMERG)");
+									   	/* ä½ã¬ãã«åºåãã¹ãéè¦åº¦ */
+	};
+	var {
+		[size_is(logBufferSize)] SYSLOG	*logBuffer;	/* ã­ã°ãããã¡ */
+		uint_t	count = 0;				/* ã­ã°ãããã¡ä¸­ã®ã­ã°ã®æ° */
+		uint_t	head = 0;				/* å
+é ­ã®ã­ã°ã®æ ¼ç´ä½ç½® */
+		uint_t	tail = 0;				/* æ¬¡ã®ã­ã°ã®æ ¼ç´ä½ç½® */
+		uint_t	lost = 0;				/* å¤±ãããã­ã°ã®æ° */
+		uint_t	logMask = initLogMask;	/* ã­ã°ãããã¡ã«è¨é²ãã¹ãéè¦åº¦ */
+		uint_t	lowMask = initLowMask;	/* ä½ã¬ãã«åºåãã¹ãéè¦åº¦ */
+	};
+};
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tSysLogAdapter.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tSysLogAdapter.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tSysLogAdapter.c	(revision 270)
@@ -0,0 +1,113 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		Cè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããï¼TECSãã¼ã¹ã®ã·ã¹ãã ã­ã°
+ *		æ©è½ãå¼ã³åºãããã®ã¢ããã¿
+ */
+
+#include "tSysLogAdapter_tecsgen.h"
+#include "syslog.h"
+
+/*
+ *  ã­ã°æ
+å ±ã®åºå
+ */
+ER
+syslog_wri_log(uint_t prio, const SYSLOG *p_syslog)
+{
+	return(cSysLog_write(prio, p_syslog));
+}
+
+/*
+ *  ã­ã°ãããã¡ããã®ã­ã°æ
+å ±ã®èª­åºã
+ */
+ER_UINT
+syslog_rea_log(SYSLOG *p_syslog)
+{
+	return(cSysLog_read(p_syslog));
+}
+
+/*
+ *  åºåãã¹ãã­ã°æ
+å ±ã®éè¦åº¦ã®è¨­å®
+ */
+ER
+syslog_msk_log(uint_t logmask, uint_t lowmask)
+{
+	return(cSysLog_mask(logmask, lowmask));
+}
+
+/*
+ *  ã­ã°ãããã¡ã®ç¶æ
+åç
+§
+ */
+ER
+syslog_ref_log(T_SYSLOG_RLOG *pk_rlog)
+{
+	return(cSysLog_refer(pk_rlog));
+}
+
+/*
+ *  ä½ã¬ãã«åºåã«ãããã¹ã¦ã®ã­ã°æ
+å ±ã®åºå
+ */
+ER
+syslog_fls_log(void)
+{
+	return(cSysLog_flush());
+}
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tSysLogAdapter.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tSysLogAdapter.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tSysLogAdapter.cdl	(revision 270)
@@ -0,0 +1,10 @@
+/*
+ *		Cè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããï¼TECSãã¼ã¹ã®ã·ã¹ãã ã­ã°
+ *		æ©è½ãå¼ã³åºãããã®ã¢ããã¿ç¨ã»ã«ã¿ã¤ãã®å®ç¾©
+ *
+ *  $Id$
+ */
+[singleton, active]
+celltype tSysLogAdapter {
+	call	sSysLog		cSysLog;
+};
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tTestService.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tTestService.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tTestService.c	(revision 270)
@@ -0,0 +1,198 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹
+ */
+
+#include "tTestService_tecsgen.h"
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include <t_stdlib.h>
+
+/*
+ *  ãã¹ããã­ã°ã©ã ã®éå§ï¼åãå£é¢æ°ï¼
+ */
+void
+eTestService_start(const char *progname)
+{
+	syslog_1(LOG_NOTICE, "Test program: %s", progname);
+	VAR_check_count = 0U;
+}
+
+/*
+ *	èªå·±è¨ºæ­é¢æ°ã®è¨­å®
+ */
+void
+eTestService_setBuiltInTest(Descriptor(sBuiltInTest) desc)
+{
+	cBuiltInTest_set_descriptor(desc);
+}
+
+/*
+ *	ãã¹ããã­ã°ã©ã ã®çµäº
+ */
+static void
+test_finish(void)
+{
+	SIL_PRE_LOC;
+
+	SIL_LOC_INT();
+	(void) cSysLog_flush();
+	(void) ext_ker();
+
+	/* ããã¸æ¥ããã¨ã¯ãªãã¯ã */
+	SIL_UNL_INT();
+}
+
+/*
+ *	ãã§ãã¯ãã¤ã³ãï¼åãå£é¢æ°ï¼
+ */
+void
+eTestService_checkPoint(uint_t count)
+{
+	bool_t	errorflag = false;
+	ER		rercd;
+	SIL_PRE_LOC;
+
+	/*
+	 *  å²è¾¼ã¿ã­ãã¯ç¶æ
+ã«
+	 */
+	SIL_LOC_INT();
+
+	/*
+	 *  ã·ã¼ã±ã³ã¹ãã§ãã¯
+	 */
+	if (++VAR_check_count == count) {
+		syslog_1(LOG_NOTICE, "Check point %d passed.", count);
+	}
+	else {
+		syslog_1(LOG_ERROR, "## Unexpected check point %d.\007", count);
+		errorflag = true;
+	}
+
+	/*
+	 *  ã«ã¼ãã«ã®å
+é¨ç¶æ
+ã®æ¤æ»
+	 */
+	if (is_cBuiltInTest_joined()) {
+		rercd = cBuiltInTest_builtInTest();
+		if (rercd < 0) {
+			syslog_2(LOG_ERROR, "## Internal inconsistency detected (%s, %d)."
+								"\007", itron_strerror(rercd), SERCD(rercd));
+			errorflag = true;
+		}
+	}
+
+	/*
+	 *  ã¨ã©ã¼ãæ¤åºãããå ´åã¯ï¼ãã¹ããã­ã°ã©ã ãçµäºããï¼
+	 */
+	if (errorflag) {
+		test_finish();
+	}
+
+	/*
+	 *  å²è¾¼ã¿ã­ãã¯ç¶æ
+ãè§£é¤
+	 */
+	SIL_UNL_INT();
+}
+
+/*
+ *	å®äºãã§ãã¯ãã¤ã³ãï¼åãå£é¢æ°ï¼
+ */
+void
+eTestService_finishPoint(uint_t count)
+{
+	if (count > 0U) {
+		eTestService_checkPoint(count);
+		syslog_0(LOG_NOTICE, "All check points passed.");
+	}
+	test_finish();
+}
+
+/*
+ *	æ¡ä»¶ãã§ãã¯ã®ã¨ã©ã¼å¦çï¼åãå£é¢æ°ï¼
+ */
+void
+eTestService_assertError(const char *expr, const char *file, int_t line)
+{
+	syslog_3(LOG_ERROR, "## Assertion `%s' failed at %s:%u.\007",
+												expr, file, line);
+	test_finish();
+}
+
+/*
+ *	ã¨ã©ã¼ã³ã¼ããã§ãã¯ã®ã¨ã©ã¼å¦çï¼åãå£é¢æ°ï¼
+ */
+void
+eTestService_serviceError(ER ercd, const char *file, int_t line)
+{
+	syslog_3(LOG_ERROR, "## Unexpected error %s detected at %s:%u.\007",
+										itron_strerror(ercd), file, line);
+	test_finish();
+}
+
+/*
+ *	ã¨ã©ã¼ã³ã¼ããã§ãã¯ã®ã¨ã©ã¼å¦çï¼åãå£é¢æ°ï¼
+ */
+ER
+eTestService_getInterruptPriorityMask(PRI *p_ipm)
+{
+	return(get_ipm(p_ipm));
+}
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/tTestService.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/tTestService.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/tTestService.cdl	(revision 270)
@@ -0,0 +1,121 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+ */
+
+/*
+ *  èªå·±è¨ºæ­ãµã¼ãã¹ã®ã·ã°ããã£
+ */
+signature sBuiltInTest {
+	ER		builtInTest(void);
+};
+
+/*
+ *  ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ã®ã·ã°ããã£
+ *
+ *  setBuiltInTestã¯ï¼TECSã®ä¸­ã§ã¯åççµåãä½¿ã£ã¦å®ç¾ãã¹ãã§ãããï¼
+ *  Cè¨èªã®ã¢ããªã±ã¼ã·ã§ã³ããå¼ã³åºããããããããã«ï¼TECSã®ä½æ³é
+ *  åã®ã³ã¼ãã¨ãªã£ã¦ããï¼
+ *
+ *  getInterruptPriorityMaskã¯ï¼ãã®ã¾ã¾ã«ã¼ãã«ãå¼ã³åºãã ãã®é¢æ°ã§
+ *  ããï¼ä¿è­·æ©è½å¯¾å¿ã§ãªãã«ã¼ãã«ã§ã¯ãã®ã¾ã¾ã«ã¼ãã«ãå¼ã¹ã°è¯ããï¼
+ *  ä¿è­·æ©è½å¯¾å¿ã«ã¼ãã«ã§ã¯ã«ã¼ãã«ãç´æ¥å¼ã³åºããã¨ã¯éããªãã®ã§ï¼
+ *  ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ï¼ã«ã¼ãã«ãã¡ã¤ã³ã§åä½ãããã¨ãæ³å®ï¼
+ *  ã¨ãã¦ç¨æãã¦ããï¼
+ */
+signature sTestService {
+	void	start([in, string] const char *progname);
+	void	setBuiltInTest([in] Descriptor(sBuiltInTest) desc);
+	void	checkPoint([in] uint_t count);
+	void	finishPoint([in] uint_t count);
+	void	assertError([in, string] const char *expr,
+							[in, string] const char *file, [in] int_t line);
+	void	serviceError([in] ER ercd,
+							[in, string] const char *file, [in] int_t line);
+	ER		getInterruptPriorityMask([out] PRI *p_ipm);
+};
+
+/*
+ *  ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ã®ã»ã«ã¿ã¤ã
+ */
+[singleton, active]
+celltype tTestService {
+	entry		sTestService	eTestService;
+	[dynamic, optional] call	sBuiltInTest	cBuiltInTest;
+	call		sSysLog			cSysLog;
+
+	var {
+		uint_t		check_count;	/* æå¾ã«ééãããã§ãã¯ãã¤ã³ã */
+	};
+};
+
+/*
+ *  èªå·±è¨ºæ­ãµã¼ãã¹ã®ãã£ã¹ã¯ãªãã¿ãåå¾ããã·ã°ããã£
+ */
+signature sGetBuiltInTestDescriptor {
+	ER		getDescriptor([out] Descriptor(sBuiltInTest) *p_desc,
+														[in] int_t i);
+};
+
+/*
+ *  èªå·±è¨ºæ­ãµã¼ãã¹ã®ãã£ã¹ã¯ãªãã¿ãåå¾ããã»ã«ã¿ã¤ã
+ */
+[singleton, active]
+celltype tBuiltInTestAdaptor {
+	[ref_desc] call	sBuiltInTest				cBuiltInTest[];
+	entry			sGetBuiltInTestDescriptor	eGetBuiltInTestDescriptor;
+};
Index: EcnlProtoTool/trunk/asp3_dcre/syssvc/test_svc.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/syssvc/test_svc.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/syssvc/test_svc.h	(revision 270)
@@ -0,0 +1,206 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/* 
+ *		ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹
+ */
+
+#ifndef TOPPERS_TEST_SVC_H
+#define TOPPERS_TEST_SVC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <kernel.h>
+#include "target_test.h"
+
+/*
+ *  TECSã§è¨è¿°ããããã¹ããã­ã°ã©ã ç¨ã®ãµã¼ãã¹ãç´æ¥å¼ã³åºãããã®å®ç¾©
+ *
+ *  Cè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããï¼TECSã§è¨è¿°ããããã¹ããã­ã°
+ *  ã©ã ç¨ã®ãµã¼ãã¹ãå¼ã³åºãããã«ã¯ï¼ã¢ããã¿ãç¨ããã®ãæ­£å½ãªæ¹æ³
+ *  ã§ãããï¼ãã¹ããã­ã°ã©ã ç¨ã®ãµã¼ãã¹ãã·ã³ã°ã«ãã³ã§ãããã¨ãå©
+ *  ç¨ãã¦ç´æ¥å¼ã³åºãï¼
+ */
+extern void	tTestService_eTestService_start(const char* progname);
+extern void	tTestService_eTestService_setBuiltInTest(void *desc);
+extern void	tTestService_eTestService_checkPoint(uint_t count);
+extern void	tTestService_eTestService_finishPoint(uint_t count);
+extern void	tTestService_eTestService_assertError(const char* expr,
+											const char* file, int_t line);
+extern void	tTestService_eTestService_serviceError(ER ercd,
+											const char* file, int_t line);
+extern ER	tTestService_eTestService_getInterruptPriorityMask(PRI* p_ipm);
+
+/*
+ *  ãã¹ããã­ã°ã©ã ã®éå§
+ */
+Inline void
+test_start(const char *progname)
+{
+	tTestService_eTestService_start(progname);
+}
+
+/*
+ *	èªå·±è¨ºæ­é¢æ°ã®è¨­å®
+ */
+Inline void
+set_bit_service(void *bit_service)
+{
+	tTestService_eTestService_setBuiltInTest(bit_service);
+}
+
+/*
+ *	ãã§ãã¯ãã¤ã³ã
+ */
+Inline void
+check_point(uint_t count)
+{
+	tTestService_eTestService_checkPoint(count);
+}
+
+/*
+ *	å®äºãã§ãã¯ãã¤ã³ã
+ */
+Inline void
+check_finish(uint_t count)
+{
+	tTestService_eTestService_finishPoint(count);
+}
+
+/*
+ *	æ¡ä»¶ãã§ãã¯
+ */
+Inline void
+check_assert_error(const char *expr, const char *file, int_t line)
+{
+	tTestService_eTestService_assertError(expr, file, line);
+}
+
+#define check_assert(exp) \
+	((void)(!(exp) ? (check_assert_error(#exp, __FILE__, __LINE__), 0) : 0))
+
+/*
+ *	ã¨ã©ã¼ã³ã¼ããã§ãã¯
+ */
+Inline void
+check_ercd_error(ER ercd, const char *file, int_t line)
+{
+	tTestService_eTestService_serviceError(ercd, file, line);
+}
+
+#define check_ercd(ercd, expected_ercd) \
+	((void)((ercd) != (expected_ercd) ? \
+					(check_ercd_error(ercd, __FILE__, __LINE__), 0) : 0))
+
+/*
+ *	ã·ã¹ãã ç¶æ
+ã®ãã§ãã¯
+ */
+#define check_state(ctx, loc, dsp, dpn, ter) do {	\
+	check_assert(sns_ctx() == ctx);					\
+	check_assert(sns_loc() == loc);					\
+	check_assert(sns_dsp() == dsp);					\
+	check_assert(sns_dpn() == dpn);					\
+	check_assert(sns_ter() == ter);					\
+} while (false);
+
+/*
+ *	å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®ãã§ãã¯
+ */
+#define check_ipm(ipm) do {												\
+	PRI		intpri;														\
+	ER		ercd;														\
+																		\
+	ercd = tTestService_eTestService_getInterruptPriorityMask(&intpri);	\
+	check_ercd(ercd, E_OK);												\
+	check_assert(intpri == ipm);										\
+} while (false);
+
+#ifdef __cplusplus
+}
+#endif
+
+/*
+ *  TECSã§è¨è¿°ãããèªå·±è¨ºæ­ãµã¼ãã¹ãç´æ¥å¼ã³åºãããã®å®ç¾©
+ *
+ *  Cè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããï¼TECSã§è¨è¿°ãããèªå·±è¨ºæ­ãµã¼
+ *  ãã¹ãå¼ã³åºãããã«ã¯ï¼ã¢ããã¿ãç¨ããã®ãæ­£å½ãªæ¹æ³ã§ãããï¼èª
+ *  å·±è¨ºæ­ãµã¼ãã¹ãã·ã³ã°ã«ãã³ã§ãããã¨ãå©ç¨ãã¦ç´æ¥å¼ã³åºãï¼
+ */
+extern ER	tBuiltInTestAdaptor_eGetBuiltInTestDescriptor_getDescriptor
+												(void **p_desc, int_t i);
+
+Inline void *
+get_bit_kernel(void)
+{
+	void	*desc;
+
+	tBuiltInTestAdaptor_eGetBuiltInTestDescriptor_getDescriptor(&desc, 0);
+	return(desc);
+}
+
+Inline void *
+get_bit_mutex(void)
+{
+	void	*desc;
+
+	tBuiltInTestAdaptor_eGetBuiltInTestDescriptor_getDescriptor(&desc, 1);
+	return(desc);
+}
+
+#endif /* TOPPERS_TEST_SVC_H */
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/E_PACKAGE
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/E_PACKAGE	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/E_PACKAGE	(revision 270)
@@ -0,0 +1,6 @@
+E_PACKAGE asp3_gr_peach_gcc
+VERSION %date
+
+INCLUDE ../../MANIFEST
+INCLUDE ../../arch/arm_gcc/MANIFEST
+INCLUDE ../../tecsgen/MANIFEST_for_asp3
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/MANIFEST
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/MANIFEST	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/MANIFEST	(revision 270)
@@ -0,0 +1,35 @@
+PACKAGE asp3_arch_arm_gcc
+
+E_PACKAGE
+MANIFEST
+Makefile.target
+gdb_ram.ini
+gdb_rom.ini
+gr_peach.h
+gr_peach_ram.ld
+gr_peach_rom.ld
+renesas_rza1h_swd.cfg
+sf_boot.c
+tPutLogGRPeach.c
+tPutLogGRPeach.cdl
+tSIOPortGRPeach.cdl
+tSIOPortGRPeachMain_inline.h
+target.cdl
+target_cfg1_out.h
+target_check.trb
+target_kernel.cfg
+target_kernel.h
+target_kernel.trb
+target_kernel_impl.c
+target_kernel_impl.h
+target_rename.def
+target_rename.h
+target_sil.h
+target_stddef.h
+target_support.S
+target_syssvc.h
+target_test.h
+target_timer.cfg
+target_timer.h
+target_unrename.h
+target_user.txt
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/Makefile.target
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/Makefile.target	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/Makefile.target	(revision 270)
@@ -0,0 +1,81 @@
+#
+#		Makefile ã®ã¿ã¼ã²ããä¾å­é¨ï¼GR-PEACHç¨ï¼
+#
+#  $Id: Makefile.target 732 2016-04-03 03:08:05Z ertl-hiro $
+# 
+
+#
+#  ã·ã¹ãã åï¼ãããåï¼ã³ã¢åï¼éçºç°å¢åã®å®ç¾©
+#
+SYS = gr_peach
+CHIP = rza1
+CORE = arm
+TOOL = gcc
+
+#
+#  å®è¡å½¢æ
+
+#
+#  ãã©ãã·ã¥ã¡ã¢ãªï¼ROMï¼ã«æ¸ãè¾¼ããï¼RAMã«ã­ã¼ããã¦å®è¡ããããé¸æ
+#  ããï¼
+#
+ifndef EXECUTE_ON
+EXECUTE_ON = ROM
+endif
+
+#
+#  ãã¼ãã­ã¼ãã®çµè¾¼ã¿
+#
+ifeq ($(EXECUTE_ON),ROM)
+	SYSSVC_COBJS := $(SYSSVC_COBJS)
+endif
+
+#
+#  MPCoreã®ç¨®é¡ã®å®ç¾©
+#
+MPCORE_TYPE = CA9
+
+#
+#  ã³ã³ãã¤ã«ãªãã·ã§ã³
+#
+INCLUDES := $(INCLUDES) -I$(TARGETDIR)
+COPTS := $(COPTS) -mlittle-endian
+LDFLAGS := $(LDFLAGS) -mlittle-endian
+
+#
+#  ã«ã¼ãã«ã«é¢ããå®ç¾©
+#
+KERNEL_DIRS := $(KERNEL_DIRS) $(TARGETDIR)
+KERNEL_COBJS := $(KERNEL_COBJS) target_kernel_impl.o core_pl310.o
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS) target_support.o
+
+#
+#  ã³ã³ãã¤ã«ãªãã·ã§ã³ã¨ãªã³ã«ã¹ã¯ãªããã®å®ç¾©
+#
+ifeq ($(EXECUTE_ON),ROM)
+	CDEFS := $(CDEFS) -DTOPPERS_EXECUTE_ON_ROM
+	#LDSCRIPT = $(TARGETDIR)/gr_peach_rom.ld
+	LDSCRIPT = $(SRCDIR)/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/TOOLCHAIN_GCC_ARM/RZA1H.ld
+else
+	CDEFS := $(CDEFS) -DTOPPERS_EXECUTE_ON_RAM
+	LDSCRIPT = $(TARGETDIR)/gr_peach_ram.ld
+endif
+
+#
+#  GNUéçºç°å¢ã®ã¿ã¼ã²ããã¢ã¼ã­ãã¯ãã£ã®å®ç¾©
+#
+GCC_TARGET = arm-none-eabi
+#GCC_TARGET = arm-atollic-eabi
+
+#
+#  ãã¬ã¼ã¹ã­ã°è¨é²ã®ãµã³ãã«ã³ã¼ãã«é¢ããå®ç¾©
+#
+ifeq ($(ENABLE_TRACE),true)
+	COPTS := $(COPTS) -DTOPPERS_ENABLE_TRACE
+	SYSSVC_DIRS := $(SYSSVC_DIRS) $(SRCDIR)/arch/tracelog
+endif
+
+#
+#  ãããä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ã
+#
+include $(SRCDIR)/arch/arm_gcc/rza1/Makefile.chip
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/Makefile.tinet
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/Makefile.tinet	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/Makefile.tinet	(revision 270)
@@ -0,0 +1,53 @@
+#
+#   TINET (TCP/IP Protocol Stack)
+#  
+#   Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+#                    Tomakomai National College of Technology, JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+#   ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+#   è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+#   ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+#   å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+#   å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+#   æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+#  
+#   @(#) $Id: Makefile.tinet,v 1.6 2012/07/18 04:17:01 abe Exp abe $
+#
+
+#
+#  Makefile.tinet ã®ã·ã¹ãã ä¾å­é¨åï¼GR-PEACHç¨ï¼
+
+ifeq ($(NET_IF),ether)
+
+	TINET_COBJS := $(TINET_COBJS) tinet_target_config.o
+
+endif
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/cfg_dmy.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/cfg_dmy.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/cfg_dmy.c	(revision 270)
@@ -0,0 +1,31 @@
+#include "MBRZA1H.h"
+
+IRQHandler _kernel_inh_table[Renesas_RZ_A1_IRQ_MAX+1];
+uint32_t _kernel_excpt_nest_count = 0;
+
+void _kernel_default_exc_handler()
+{
+}
+
+void _kernel_undef_handler()
+{
+}
+
+void _kernel_svc_handler()
+{
+}
+
+void _kernel_pabort_handler()
+{
+}
+
+void _kernel_dabort_handler()
+{
+}
+void _kernel_irq_handler()
+{
+}
+
+void _kernel_fiq_handler()
+{
+}
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/gdb_ram.ini
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/gdb_ram.ini	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/gdb_ram.ini	(revision 270)
@@ -0,0 +1,17 @@
+target remote :3333
+monitor init
+monitor reset
+monitor halt
+
+# Release L2 cache standby
+set {unsigned int}0x3fffff80=0x00000001
+
+# Allow write access for RAM     
+set {unsigned char}0xfcfe0400=0x3f
+x/b 0xfcfe0400
+set {unsigned char}0xfcfe0404=0x3f
+x/b 0xfcfe0404
+set {unsigned char}0xfcfe0408=0x0f
+x/b 0xfcfe0408
+
+load
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/gdb_rom.ini
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/gdb_rom.ini	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/gdb_rom.ini	(revision 270)
@@ -0,0 +1,4 @@
+target remote :3333
+monitor init
+monitor reset
+monitor halt
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/gr_peach.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/gr_peach.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/gr_peach.h	(revision 270)
@@ -0,0 +1,86 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ *
+ *  Copyright (C) 2011-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ */
+
+/*
+ *		GR-PEACHã®ãã¼ãã¦ã§ã¢è³æºã®å®ç¾©
+ */
+
+#ifndef TOPPERS_GR_PEACH_H
+#define TOPPERS_GR_PEACH_H
+
+#include <t_stddef.h>
+
+/*
+ *  åã¯ã­ãã¯å¨æ³¢æ°ã®å®ç¾©
+ */
+#define RZA1_CLK_I			400000000UL		/* 400MHz */
+#define RZA1_CLK_I_MHZ		400				/* 400MHz */
+#define RZA1_CLK_G			266666667UL		/* 266.66â¦MHz */
+#define RZA1_CLK_B			133333333UL		/* 133.33â¦MHz */
+#define RZA1_CLK_P1			66666667UL		/* 66.66â¦MHz */
+#define RZA1_CLK_P0			33333333UL		/* 33.33â¦MHz */
+
+/*
+ *  LEDã®ç¹ç¯ï¼æ¶ç¯
+ */
+#define GR_PEACH_LED_RED	13
+#define GR_PEACH_LED_GREEN	14
+#define GR_PEACH_LED_BLUE	15
+#define GR_PEACH_LED_USER	12
+
+#ifndef TOPPERS_MACRO_ONLY
+extern void gr_peach_set_led(uint_t led, uint_t set);
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_GR_PEACH_H */
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/gr_peach_ram.ld
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/gr_peach_ram.ld	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/gr_peach_ram.ld	(revision 270)
@@ -0,0 +1,111 @@
+/*
+ *  $Id: gr_peach_ram.ld 720 2016-04-01 22:16:17Z ertl-hiro $
+ */
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm","elf32-littlearm") 
+OUTPUT_ARCH(arm)
+ENTRY(start);
+
+MEMORY {
+	ROM (rx)  : ORIGIN = 0x20000000, LENGTH = 1M
+	RAM (xrw) : ORIGIN = 0x20100000, LENGTH = 9M
+}
+
+PROVIDE(hardware_init_hook = 0);
+PROVIDE(software_init_hook = 0);
+PROVIDE(software_term_hook = 0);
+
+SECTIONS {
+	.text : {
+		__start_text = .;
+		*(.vector)
+		*(.text)
+		*(.glue_7t)
+		*(.glue_7)
+		__end_kernel = .;
+	} > ROM
+	_etext = .;
+	PROVIDE(etext = .);
+
+	.rodata ALIGN(4) : {
+		__start_rodata = .;
+		*(.rodata)
+		__end_rodata = .;
+	} > ROM
+	.preinit_array ALIGN(4) : {
+		PROVIDE_HIDDEN (__preinit_array_start = .);
+		KEEP (*(.preinit_array))
+		PROVIDE_HIDDEN (__preinit_array_end = .);
+	} > ROM
+	.init_array ALIGN(4) : {
+		PROVIDE_HIDDEN (__init_array_start = .);
+		KEEP (*(SORT(.init_array.*)))
+		KEEP (*(.init_array))
+		PROVIDE_HIDDEN (__init_array_end = .);
+	} > ROM
+	.fini_array ALIGN(4) : {
+		PROVIDE_HIDDEN (__fini_array_start = .);
+		KEEP (*(SORT(.fini_array.*)))
+		KEEP (*(.fini_array))
+		PROVIDE_HIDDEN (__fini_array_end = .);
+	} > ROM
+	.ARM.exidx ALIGN(4) : {
+		__exidx_start = .;
+		*(.ARM.exidx* .gnu.linkonce.armexidx.*)
+		__exidx_end = .;
+	} > ROM
+
+	.data : ALIGN(4) {
+		__start_data = .;
+		*(.data)
+		__end_data = .;
+	} > RAM AT > ROM
+	__start_idata = LOADADDR(.data);
+	. = ALIGN(4);
+	_edata = .;
+	PROVIDE(edata = .);
+
+	.bss ALIGN(4) : {
+		__start_bss = .;
+		*(.bss)
+		*(COMMON)
+		__end_bss = .;
+	} > RAM
+	. = ALIGN(4);
+	_end = .;
+	PROVIDE(end = .);
+	.comment 0 : { *(.comment) }	
+
+	/*
+	 *  DWARF debug sections.
+	 *  Symbols in the DWARF debugging sections are relative to
+	 *  the beginning of the section so we begin them at 0.
+	 */
+
+	/* DWARF 1 */
+	.debug			0 : { *(.debug) }
+	.line			0 : { *(.line) }
+
+	/* GNU DWARF 1 extensions */
+	.debug_srcinfo	0 : { *(.debug_srcinfo) }
+	.debug_sfnames	0 : { *(.debug_sfnames) }
+
+	/* DWARF 1.1 and DWARF 2 */
+	.debug_aranges	0 : { *(.debug_aranges) }
+	.debug_pubnames	0 : { *(.debug_pubnames) }
+
+	/* DWARF 2 */
+	.debug_info		0 : { *(.debug_info) }
+	.debug_abbrev	0 : { *(.debug_abbrev) }
+	.debug_line		0 : { *(.debug_line) }
+	.debug_frame	0 : { *(.debug_frame) }
+	.debug_str		0 : { *(.debug_str) }
+	.debug_loc		0 : { *(.debug_loc) }
+	.debug_macinfo	0 : { *(.debug_macinfo) }
+
+	/* SGI/MIPS DWARF 2 extensions */
+	.debug_weaknames 0 : { *(.debug_weaknames) }
+	.debug_funcnames 0 : { *(.debug_funcnames) }
+	.debug_typenames 0 : { *(.debug_typenames) }
+	.debug_varnames  0 : { *(.debug_varnames) }
+}	
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/gr_peach_rom.ld
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/gr_peach_rom.ld	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/gr_peach_rom.ld	(revision 270)
@@ -0,0 +1,116 @@
+/*
+ *  $Id: gr_peach_rom.ld 720 2016-04-01 22:16:17Z ertl-hiro $
+ */
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm","elf32-littlearm") 
+OUTPUT_ARCH(arm)
+ENTRY(start);
+
+MEMORY {
+	BOOT_LOADER (rx) : ORIGIN = 0x18000000, LENGTH = 0x00004000
+	ROM (rx)         : ORIGIN = 0x18004000, LENGTH = 0x07FFC000
+	RAM (xrw)        : ORIGIN = 0x20000000, LENGTH = 10M
+}
+
+PROVIDE(hardware_init_hook = 0);
+PROVIDE(software_init_hook = 0);
+PROVIDE(software_term_hook = 0);
+
+SECTIONS {
+	.boot : {
+		KEEP(*(.boot_loader)) 
+	} > BOOT_LOADER 
+
+	.text : {
+		__start_text = .;
+		*(.vector)
+		*(.text)
+		*(.glue_7t)
+		*(.glue_7)
+		__end_kernel = .;
+	} > ROM
+	_etext = .;
+	PROVIDE(etext = .);
+
+	.rodata ALIGN(4) : {
+		__start_rodata = .;
+		*(.rodata)
+		__end_rodata = .;
+	} > ROM
+	.preinit_array ALIGN(4) : {
+		PROVIDE_HIDDEN (__preinit_array_start = .);
+		KEEP (*(.preinit_array))
+		PROVIDE_HIDDEN (__preinit_array_end = .);
+	} > ROM
+	.init_array ALIGN(4) : {
+		PROVIDE_HIDDEN (__init_array_start = .);
+		KEEP (*(SORT(.init_array.*)))
+		KEEP (*(.init_array))
+		PROVIDE_HIDDEN (__init_array_end = .);
+	} > ROM
+	.fini_array ALIGN(4) : {
+		PROVIDE_HIDDEN (__fini_array_start = .);
+		KEEP (*(SORT(.fini_array.*)))
+		KEEP (*(.fini_array))
+		PROVIDE_HIDDEN (__fini_array_end = .);
+	} > ROM
+	.ARM.exidx ALIGN(4) : {
+		__exidx_start = .;
+		*(.ARM.exidx* .gnu.linkonce.armexidx.*)
+		__exidx_end = .;
+	} > ROM
+
+	.data : ALIGN(4) {
+		__start_data = .;
+		*(.data)
+		__end_data = .;
+	} > RAM AT > ROM
+	__start_idata = LOADADDR(.data);
+	. = ALIGN(4);
+	_edata = .;
+	PROVIDE(edata = .);
+
+	.bss ALIGN(4) : {
+		__start_bss = .;
+		*(.bss)
+		*(COMMON)
+		__end_bss = .;
+	} > RAM
+	. = ALIGN(4);
+	_end = .;
+	PROVIDE(end = .);
+	.comment 0 : { *(.comment) }	
+
+	/*
+	 *  DWARF debug sections.
+	 *  Symbols in the DWARF debugging sections are relative to
+	 *  the beginning of the section so we begin them at 0.
+	 */
+
+	/* DWARF 1 */
+	.debug			0 : { *(.debug) }
+	.line			0 : { *(.line) }
+
+	/* GNU DWARF 1 extensions */
+	.debug_srcinfo	0 : { *(.debug_srcinfo) }
+	.debug_sfnames	0 : { *(.debug_sfnames) }
+
+	/* DWARF 1.1 and DWARF 2 */
+	.debug_aranges	0 : { *(.debug_aranges) }
+	.debug_pubnames	0 : { *(.debug_pubnames) }
+
+	/* DWARF 2 */
+	.debug_info		0 : { *(.debug_info) }
+	.debug_abbrev	0 : { *(.debug_abbrev) }
+	.debug_line		0 : { *(.debug_line) }
+	.debug_frame	0 : { *(.debug_frame) }
+	.debug_str		0 : { *(.debug_str) }
+	.debug_loc		0 : { *(.debug_loc) }
+	.debug_macinfo	0 : { *(.debug_macinfo) }
+
+	/* SGI/MIPS DWARF 2 extensions */
+	.debug_weaknames 0 : { *(.debug_weaknames) }
+	.debug_funcnames 0 : { *(.debug_funcnames) }
+	.debug_typenames 0 : { *(.debug_typenames) }
+	.debug_varnames  0 : { *(.debug_varnames) }
+}	
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/renesas_rza1h_swd.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/renesas_rza1h_swd.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/renesas_rza1h_swd.cfg	(revision 270)
@@ -0,0 +1,28 @@
+# Renesas RZ/A1H
+
+source [find target/swj-dp.tcl]
+
+set _CHIPNAME rza1h
+swj_newdap $_CHIPNAME cpu -expected-id 0x00000000
+
+set ENDIAN little
+
+set _TARGETNAME $_CHIPNAME.cpu
+target create $_TARGETNAME cortex_a -chain-position $_TARGETNAME
+
+#debug_level 3
+adapter_khz 1000
+adapter_nsrst_delay 400
+reset_config  srst_only
+
+gdb_target_description disable
+gdb_breakpoint_override hard
+
+init
+cortex_a dbginit
+cortex_a maskisr on
+
+${_TARGETNAME} configure -event reset-assert-post "cortex_a dbginit"
+
+reset
+halt
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/sf_boot.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/sf_boot.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/sf_boot.c	(revision 270)
@@ -0,0 +1,809 @@
+/*******************************************************************************
+* DISCLAIMER
+* This software is supplied by Renesas Electronics Corporation and is only
+* intended for use with Renesas products. No other uses are authorized. This
+* software is owned by Renesas Electronics Corporation and is protected under
+* all applicable laws, including copyright laws.
+* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
+* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
+* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
+* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
+* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
+* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
+* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
+* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
+* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+* Renesas reserves the right, without notice, to make changes to this software
+* and to discontinue the availability of this software. By using this software,
+* you agree to the additional terms and conditions found by accessing the
+* following link:
+* http://www.renesas.com/disclaimer
+* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
+*******************************************************************************/
+const char boot_loader[]  __attribute__ ((section(".boot_loader"), used)) =
+{
+    0x18,0xF0,0x9F,0xE5,0x18,0xF0,0x9F,0xE5,0x18,0xF0,0x9F,0xE5,0x18,0xF0,0x9F,0xE5,
+    0x18,0xF0,0x9F,0xE5,0x18,0xF0,0x9F,0xE5,0x18,0xF0,0x9F,0xE5,0x18,0xF0,0x9F,0xE5,
+    0x00,0x30,0x00,0x18,0x74,0x30,0x00,0x18,0x78,0x30,0x00,0x18,0x7C,0x30,0x00,0x18,
+    0x80,0x30,0x00,0x18,0x84,0x30,0x00,0x18,0x88,0x30,0x00,0x18,0x8C,0x30,0x00,0x18,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0x2C,0x30,0x9F,0xE5,0x00,0x20,0xA0,0xE3,0x28,0x10,0x9F,0xE5,0x28,0x00,0x9F,0xE5,
+    0x10,0x40,0x2D,0xE9,0x23,0x31,0xA0,0xE1,0x02,0x00,0x00,0xEA,0x04,0x40,0x91,0xE4,
+    0x01,0x20,0x82,0xE2,0x04,0x40,0x80,0xE4,0x03,0x00,0x52,0xE1,0xFA,0xFF,0xFF,0xBA,
+    0x10,0x80,0xBD,0xE8,0x97,0x28,0x00,0x00,0x00,0x04,0x00,0x18,0x00,0x02,0x02,0x20,
+    0x70,0x40,0x2D,0xE9,0x02,0x29,0xA0,0xE3,0xC8,0x40,0x9F,0xE5,0x0F,0x10,0xA0,0xE3,
+    0x04,0x00,0xA0,0xE1,0x4C,0x00,0x00,0xEB,0x01,0x00,0x50,0xE3,0x06,0x00,0x00,0x1A,
+    0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x04,0x00,0xA0,0xE1,
+    0x33,0x00,0x00,0xEB,0x08,0x00,0x44,0xE2,0xB8,0x00,0xD0,0xE1,0x01,0x34,0xA0,0xE3,
+    0x94,0x50,0x9F,0xE5,0x18,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,
+    0x32,0x00,0x00,0xEB,0x3C,0x40,0x85,0xE2,0x02,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x04,0x00,0xA0,0xE1,0x3C,0x00,0x00,0xEB,0x00,0x00,0x50,0xE3,0xF9,0xFF,0xFF,0x1A,
+    0x01,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x04,0x00,0xA0,0xE1,0x36,0x00,0x00,0xEB,
+    0x01,0x00,0x50,0xE3,0xF9,0xFF,0xFF,0x1A,0x00,0x00,0xA0,0xE3,0x4C,0x10,0x9F,0xE5,
+    0x04,0x00,0x81,0xE5,0x00,0x20,0xA0,0xE1,0x44,0x40,0x9F,0xE5,0x00,0x10,0xA0,0xE1,
+    0x03,0x30,0xA0,0xE3,0x04,0x00,0xA0,0xE1,0x1C,0x00,0x00,0xEB,0xFF,0x3C,0xA0,0xE3,
+    0x08,0x20,0xA0,0xE3,0x02,0x10,0xA0,0xE3,0x04,0x00,0xA0,0xE1,0x17,0x00,0x00,0xEB,
+    0x05,0x00,0xA0,0xE1,0x01,0x3C,0xA0,0xE3,0x70,0x40,0xBD,0xE8,0x08,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x11,0x00,0x00,0xEA,0x08,0x18,0xFF,0xFC,0x0C,0xA0,0xEF,0x3F,
+    0x00,0xA0,0xEF,0x3F,0x08,0xA0,0xEF,0x3F,0x10,0x40,0x2D,0xE9,0x00,0x40,0xD0,0xE5,
+    0x11,0x12,0xA0,0xE1,0x03,0x20,0xC4,0xE1,0x02,0x10,0x81,0xE1,0x00,0x10,0xC0,0xE5,
+    0x10,0x80,0xBD,0xE8,0x10,0x40,0x2D,0xE9,0xB0,0x40,0xD0,0xE1,0x11,0x12,0xA0,0xE1,
+    0x03,0x20,0xC4,0xE1,0x02,0x10,0x81,0xE1,0xB0,0x10,0xC0,0xE1,0x10,0x80,0xBD,0xE8,
+    0x10,0x40,0x2D,0xE9,0x00,0x40,0x90,0xE5,0x11,0x12,0xA0,0xE1,0x03,0x20,0xC4,0xE1,
+    0x02,0x10,0x81,0xE1,0x00,0x10,0x80,0xE5,0x10,0x80,0xBD,0xE8,0x00,0x00,0xD0,0xE5,
+    0x02,0x00,0x00,0xE0,0x30,0x01,0xA0,0xE1,0x1E,0xFF,0x2F,0xE1,0xB0,0x00,0xD0,0xE1,
+    0x02,0x00,0x00,0xE0,0x30,0x01,0xA0,0xE1,0x1E,0xFF,0x2F,0xE1,0x00,0x00,0x90,0xE5,
+    0x02,0x00,0x00,0xE0,0x30,0x01,0xA0,0xE1,0x1E,0xFF,0x2F,0xE1,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0x10,0xFF,0x2F,0xE1,0x10,0x40,0x2D,0xE9,0x00,0x00,0xA0,0xE3,0x7D,0x03,0x00,0xEB,
+    0x2C,0x10,0x9F,0xE5,0x00,0x00,0xA0,0xE3,0x7B,0x03,0x00,0xEB,0x20,0x20,0x9F,0xE5,
+    0x00,0x10,0xA0,0xE3,0x01,0x00,0xA0,0xE1,0x51,0x03,0x00,0xEB,0x00,0x00,0x50,0xE3,
+    0x00,0x00,0x00,0x0A,0xFE,0xFF,0xFF,0xEA,0x10,0x40,0xBD,0xE8,0x04,0x00,0x9F,0xE5,
+    0xEE,0xFF,0xFF,0xEA,0x94,0x2A,0x02,0x20,0x00,0x40,0x00,0x18,0xF0,0x41,0x2D,0xE9,
+    0x00,0x40,0xA0,0xE1,0x03,0x70,0xA0,0xE1,0x02,0x50,0xA0,0xE1,0x18,0x60,0x9D,0xE5,
+    0x01,0x80,0xA0,0xE1,0x01,0x00,0xA0,0xE1,0xD9,0x01,0x00,0xEB,0x00,0x00,0x50,0xE3,
+    0xF0,0x81,0xBD,0x18,0x00,0x00,0xA0,0xE3,0x01,0x20,0xA0,0xE3,0x0F,0x00,0x56,0xE3,
+    0x54,0x16,0x9F,0xE5,0x18,0x30,0x81,0xE2,0x00,0x00,0x81,0xE5,0x08,0x00,0x81,0xE5,
+    0x14,0x20,0x81,0xE5,0xD8,0x20,0xA0,0x13,0x41,0x00,0x83,0xE8,0xDC,0x20,0xA0,0x03,
+    0x20,0x00,0x81,0xE5,0x01,0x00,0x55,0xE3,0x24,0x00,0x81,0xE5,0x28,0x00,0x81,0xE5,
+    0x2C,0x00,0x81,0xE5,0x30,0x00,0x81,0xE5,0x46,0x20,0xC1,0xE5,0xA4,0x20,0xA0,0x01,
+    0x48,0x20,0x81,0x05,0x48,0x40,0x81,0x15,0x34,0x00,0x81,0xE5,0x38,0x00,0x81,0xE5,
+    0x3C,0x00,0x81,0xE5,0x40,0x00,0x81,0xE5,0x08,0x00,0xA0,0xE1,0xF8,0x15,0x9F,0xE5,
+    0x91,0x08,0x00,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x81,0xBD,0x18,0x07,0x20,0xA0,0xE1,
+    0x05,0x10,0xA0,0xE1,0x08,0x00,0xA0,0xE1,0xF0,0x41,0xBD,0xE8,0x9E,0x01,0x00,0xEA,
+    0xFF,0x5F,0x2D,0xE9,0x00,0xB0,0xA0,0xE1,0x02,0x70,0xA0,0xE1,0x01,0x60,0xA0,0xE1,
+    0x0C,0x00,0x9D,0xE5,0x40,0x80,0x9D,0xE5,0x3C,0x90,0x9D,0xE5,0x38,0xA0,0x9D,0xE5,
+    0xAB,0x01,0x00,0xEB,0x00,0x00,0x50,0xE3,0x7A,0x00,0x00,0x1A,0x00,0x50,0xA0,0xE3,
+    0xA4,0x45,0x9F,0xE5,0x01,0x00,0xA0,0xE3,0x00,0x00,0x59,0xE3,0x14,0x10,0x84,0xE2,
+    0x00,0x50,0x84,0xE5,0x08,0x50,0x84,0xE5,0x21,0x01,0x81,0xE8,0x28,0x10,0x84,0xE2,
+    0x20,0x50,0x84,0xE5,0x24,0x50,0x84,0xE5,0x21,0x00,0x81,0xE8,0x30,0x50,0x84,0xE5,
+    0x34,0x50,0x84,0xE5,0x38,0x50,0x84,0xE5,0x3C,0x50,0x84,0xE5,0x40,0x50,0x84,0xE5,
+    0x22,0x00,0x00,0x0A,0x0F,0x00,0x58,0xE3,0x34,0x00,0xA0,0x03,0x32,0x00,0xA0,0x13,
+    0x01,0x00,0x5A,0xE3,0x50,0x15,0x9F,0xE5,0x46,0x00,0xC4,0xE5,0xAB,0x00,0xA0,0x01,
+    0x48,0x00,0x84,0x05,0x48,0xB0,0x84,0x15,0x0C,0x00,0x9D,0xE5,0x62,0x08,0x00,0xEB,
+    0x00,0x00,0x50,0xE3,0x5B,0x00,0x00,0x1A,0x14,0x50,0x84,0xE5,0x10,0x90,0x84,0xE5,
+    0x01,0x30,0xA0,0xE3,0x18,0x50,0x84,0xE5,0x01,0x00,0x5A,0xE3,0x1C,0x50,0x84,0xE5,
+    0x0F,0x00,0xA0,0xE3,0x20,0x50,0x84,0xE5,0x08,0x10,0xA0,0xE3,0x30,0x30,0x84,0xE5,
+    0x0C,0x20,0xA0,0xE3,0x2C,0x50,0x84,0xE5,0x0C,0x00,0x00,0x0A,0x03,0x00,0x17,0xE3,
+    0x20,0x00,0x00,0x0A,0x01,0x00,0x17,0xE3,0x23,0x00,0x00,0x0A,0x00,0x00,0x57,0xE3,
+    0x01,0x80,0xA0,0xE3,0x24,0x10,0x84,0xE5,0x42,0x00,0x00,0xDA,0x2C,0x00,0x00,0xEA,
+    0x0F,0x00,0x58,0xE3,0x02,0x00,0xA0,0x13,0x12,0x00,0xA0,0x03,0xDB,0xFF,0xFF,0xEA,
+    0x07,0x00,0x17,0xE3,0x09,0x00,0x00,0x0A,0x03,0x00,0x17,0xE3,0x0C,0x00,0x00,0x0A,
+    0x01,0x00,0x17,0xE3,0x00,0x00,0xE0,0x13,0x3A,0x00,0x00,0x1A,0x00,0x00,0x57,0xE3,
+    0x02,0x80,0xA0,0xE3,0x24,0x10,0x84,0xE5,0x1F,0x00,0x00,0xCA,0x31,0x00,0x00,0xEA,
+    0x00,0x00,0x57,0xE3,0x08,0x80,0xA0,0xE3,0x24,0x00,0x84,0xE5,0x1E,0x00,0x00,0xCA,
+    0x2C,0x00,0x00,0xEA,0x00,0x00,0x57,0xE3,0x04,0x80,0xA0,0xE3,0x24,0x20,0x84,0xE5,
+    0x17,0x00,0x00,0xCA,0x27,0x00,0x00,0xEA,0x00,0x00,0x57,0xE3,0x04,0x80,0xA0,0xE3,
+    0x24,0x00,0x84,0xE5,0x12,0x00,0x00,0xCA,0x22,0x00,0x00,0xEA,0x00,0x00,0x57,0xE3,
+    0x02,0x80,0xA0,0xE3,0x24,0x20,0x84,0xE5,0x0B,0x00,0x00,0xCA,0x1D,0x00,0x00,0xEA,
+    0x01,0x00,0x58,0xE3,0x06,0x00,0x00,0x0A,0x02,0x00,0x58,0xE3,0x06,0x00,0x00,0x0A,
+    0x04,0x00,0x58,0xE3,0x06,0x00,0x00,0x0A,0x08,0x00,0x58,0xE3,0x0A,0x00,0x00,0x1A,
+    0x05,0x00,0x00,0xEA,0x00,0x00,0xD6,0xE5,0x06,0x00,0x00,0xEA,0xB0,0x00,0xD6,0xE1,
+    0x04,0x00,0x00,0xEA,0x00,0x00,0x96,0xE5,0x02,0x00,0x00,0xEA,0x00,0x10,0x96,0xE5,
+    0x5C,0x10,0x84,0xE5,0x04,0x00,0x96,0xE5,0x58,0x00,0x84,0xE5,0x08,0x70,0x47,0xE0,
+    0x00,0x00,0x57,0xE3,0xF0,0x13,0x9F,0xE5,0x28,0x50,0x84,0xD5,0x08,0x60,0x86,0xE0,
+    0x0C,0x00,0x9D,0xE5,0x0C,0x08,0x00,0xEB,0x00,0x00,0x50,0xE3,0x05,0x00,0x00,0x1A,
+    0x00,0x00,0x57,0xE3,0xE1,0xFF,0xFF,0xCA,0x0C,0x00,0x9D,0xE5,0x09,0x20,0xA0,0xE1,
+    0x0A,0x10,0xA0,0xE1,0x18,0x01,0x00,0xEB,0x10,0xD0,0x8D,0xE2,0xF0,0x9F,0xBD,0xE8,
+    0xF0,0x47,0x2D,0xE9,0x01,0x50,0xA0,0xE1,0xAC,0x43,0x9F,0xE5,0x00,0x70,0xA0,0xE3,
+    0x24,0x10,0x9D,0xE5,0x01,0x80,0xA0,0xE3,0x20,0x90,0x9D,0xE5,0x02,0x60,0xA0,0xE1,
+    0x1C,0x20,0x84,0xE2,0x03,0xA0,0xA0,0xE1,0x00,0x70,0x84,0xE5,0x0F,0x00,0x51,0xE3,
+    0x08,0x70,0x84,0xE5,0x14,0x80,0x84,0xE5,0x18,0x70,0x84,0xE5,0x82,0x00,0x82,0xE8,
+    0x24,0x20,0x84,0xE2,0x6C,0x10,0xA0,0x03,0x6B,0x10,0xA0,0x13,0x80,0x01,0x82,0xE8,
+    0x01,0x00,0x59,0xE3,0x2C,0x70,0x84,0xE5,0xA0,0x00,0xA0,0x01,0x30,0x70,0x84,0xE5,
+    0x46,0x10,0xC4,0xE5,0x07,0x10,0xA0,0xE3,0x34,0x80,0x84,0xE5,0x44,0x70,0xC4,0xE5,
+    0x45,0x10,0xC4,0xE5,0x38,0x70,0x84,0xE5,0x3C,0x70,0x84,0xE5,0x38,0x13,0x9F,0xE5,
+    0x40,0x70,0x84,0xE5,0x48,0x00,0x84,0xE5,0x03,0x00,0xA0,0xE1,0xDE,0x07,0x00,0xEB,
+    0x00,0x00,0x50,0xE3,0xF0,0x87,0xBD,0x18,0x02,0x30,0xA0,0xE3,0x10,0xC0,0x84,0xE2,
+    0x01,0x00,0x59,0xE3,0x0F,0x00,0xA0,0xE3,0x08,0x10,0xA0,0xE3,0x88,0x00,0x8C,0xE8,
+    0x0C,0x20,0xA0,0xE3,0x18,0x70,0x84,0xE5,0x1C,0x70,0x84,0xE5,0x20,0x70,0x84,0xE5,
+    0x2C,0x80,0x84,0xE5,0x30,0x70,0x84,0xE5,0x34,0x70,0x84,0xE5,0x04,0x00,0x00,0x0A,
+    0x04,0x00,0x56,0xE3,0x1F,0x00,0x00,0x0A,0x02,0x00,0x56,0xE3,0x1F,0x00,0x00,0x0A,
+    0x06,0x00,0x00,0xEA,0x08,0x00,0x56,0xE3,0x1A,0x00,0x00,0x0A,0x04,0x00,0x56,0xE3,
+    0x1A,0x00,0x00,0x0A,0x02,0x00,0x56,0xE3,0x00,0x00,0xE0,0x13,0xF0,0x87,0xBD,0x18,
+    0x24,0x10,0x84,0xE5,0x0A,0x00,0xA0,0xE1,0x28,0x70,0x84,0xE5,0xA8,0x12,0x9F,0xE5,
+    0xBD,0x07,0x00,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x87,0xBD,0x18,0x01,0x00,0x56,0xE3,
+    0x50,0x00,0xD4,0x05,0x00,0x00,0xC5,0x05,0x12,0x00,0x00,0x0A,0x02,0x00,0x56,0xE3,
+    0xB0,0x05,0xD4,0x01,0xB0,0x00,0xC5,0x01,0x0E,0x00,0x00,0x0A,0x04,0x00,0x56,0xE3,
+    0x50,0x00,0x94,0x05,0x00,0x00,0x85,0x05,0x0A,0x00,0x00,0x0A,0x08,0x00,0x56,0xE3,
+    0x04,0x00,0x00,0x0A,0x07,0x00,0x00,0xEA,0x24,0x00,0x84,0xE5,0xE8,0xFF,0xFF,0xEA,
+    0x24,0x20,0x84,0xE5,0xE6,0xFF,0xFF,0xEA,0x54,0x00,0x94,0xE5,0x00,0x00,0x85,0xE5,
+    0x50,0x00,0x94,0xE5,0x04,0x00,0x85,0xE5,0x00,0x00,0xA0,0xE3,0xF0,0x87,0xBD,0xE8,
+    0xF0,0x5F,0x2D,0xE9,0x01,0x60,0xA0,0xE1,0x2C,0x42,0x9F,0xE5,0x00,0x50,0xA0,0xE3,
+    0x2C,0x10,0x9D,0xE5,0x01,0x80,0xA0,0xE3,0x28,0xA0,0x9D,0xE5,0x02,0x70,0xA0,0xE1,
+    0x1C,0x20,0x84,0xE2,0x0C,0x90,0xA0,0xE3,0x00,0x50,0x84,0xE5,0x0F,0x00,0x51,0xE3,
+    0x08,0x50,0x84,0xE5,0x03,0xB0,0xA0,0xE1,0x14,0x80,0x84,0xE5,0x18,0x50,0x84,0xE5,
+    0x22,0x00,0x82,0xE8,0x24,0x20,0x84,0xE2,0x0B,0x10,0xA0,0x13,0x20,0x01,0x82,0xE8,
+    0x2C,0x50,0x84,0xE5,0x30,0x50,0x84,0xE5,0x46,0x90,0xC4,0x05,0x46,0x10,0xC4,0x15,
+    0x07,0x10,0xA0,0xE3,0x34,0x80,0x84,0xE5,0x01,0x00,0x5A,0xE3,0x44,0x50,0xC4,0xE5,
+    0xA0,0x00,0xA0,0x01,0x45,0x10,0xC4,0xE5,0x38,0x50,0x84,0xE5,0x3C,0x50,0x84,0xE5,
+    0xB4,0x11,0x9F,0xE5,0x40,0x50,0x84,0xE5,0x48,0x00,0x84,0xE5,0x03,0x00,0xA0,0xE1,
+    0x7D,0x07,0x00,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x9F,0xBD,0x18,0x0F,0x00,0xA0,0xE3,
+    0x01,0x00,0x5A,0xE3,0x08,0x10,0xA0,0xE3,0x10,0x50,0x84,0xE5,0x14,0x50,0x84,0xE5,
+    0x18,0x50,0x84,0xE5,0x1C,0x50,0x84,0xE5,0x20,0x50,0x84,0xE5,0x2C,0x80,0x84,0xE5,
+    0x30,0x50,0x84,0xE5,0x34,0x50,0x84,0xE5,0x04,0x00,0x00,0x0A,0x04,0x00,0x57,0xE3,
+    0x1F,0x00,0x00,0x0A,0x02,0x00,0x57,0xE3,0x1F,0x00,0x00,0x0A,0x06,0x00,0x00,0xEA,
+    0x08,0x00,0x57,0xE3,0x1A,0x00,0x00,0x0A,0x04,0x00,0x57,0xE3,0x1A,0x00,0x00,0x0A,
+    0x02,0x00,0x57,0xE3,0x00,0x00,0xE0,0x13,0xF0,0x9F,0xBD,0x18,0x24,0x10,0x84,0xE5,
+    0x0B,0x00,0xA0,0xE1,0x28,0x50,0x84,0xE5,0x2C,0x11,0x9F,0xE5,0x5E,0x07,0x00,0xEB,
+    0x00,0x00,0x50,0xE3,0xF0,0x9F,0xBD,0x18,0x01,0x00,0x57,0xE3,0x50,0x00,0xD4,0x05,
+    0x00,0x00,0xC6,0x05,0x12,0x00,0x00,0x0A,0x02,0x00,0x57,0xE3,0xB0,0x05,0xD4,0x01,
+    0xB0,0x00,0xC6,0x01,0x0E,0x00,0x00,0x0A,0x04,0x00,0x57,0xE3,0x50,0x00,0x94,0x05,
+    0x00,0x00,0x86,0x05,0x0A,0x00,0x00,0x0A,0x08,0x00,0x57,0xE3,0x04,0x00,0x00,0x0A,
+    0x07,0x00,0x00,0xEA,0x24,0x00,0x84,0xE5,0xE8,0xFF,0xFF,0xEA,0x24,0x90,0x84,0xE5,
+    0xE6,0xFF,0xFF,0xEA,0x54,0x00,0x94,0xE5,0x00,0x00,0x86,0xE5,0x50,0x00,0x94,0xE5,
+    0x04,0x00,0x86,0xE5,0x00,0x00,0xA0,0xE3,0xF0,0x9F,0xBD,0xE8,0xFC,0x5F,0x2D,0xE9,
+    0x00,0x80,0xA0,0xE1,0x30,0x00,0x8D,0xE2,0x03,0xB0,0xA0,0xE1,0x38,0x90,0x9D,0xE5,
+    0x02,0x50,0xA0,0xE1,0x40,0x04,0x90,0xE8,0x01,0x70,0xA0,0xE1,0x01,0x00,0x56,0xE3,
+    0x00,0x00,0xA0,0xE3,0x05,0x00,0x00,0x0A,0x03,0x00,0x15,0xE3,0x0D,0x00,0x00,0x0A,
+    0x01,0x00,0x15,0xE3,0x01,0x40,0xA0,0x13,0x08,0x00,0x00,0x0A,0x0A,0x00,0x00,0xEA,
+    0x07,0x00,0x15,0xE3,0x08,0x40,0xA0,0x03,0x07,0x00,0x00,0x0A,0x03,0x00,0x15,0xE3,
+    0x04,0x00,0x00,0x0A,0x01,0x00,0x15,0xE3,0x00,0x00,0xE0,0x13,0x11,0x00,0x00,0x1A,
+    0x02,0x40,0xA0,0xE3,0x00,0x00,0x00,0xEA,0x04,0x40,0xA0,0xE3,0x00,0x00,0x55,0xE3,
+    0x0C,0x00,0x00,0xDA,0x00,0x00,0x5A,0xE3,0x40,0x02,0x8D,0xE8,0x0B,0x30,0xA0,0xE1,
+    0x04,0x20,0xA0,0xE1,0x07,0x10,0xA0,0xE1,0x08,0x00,0xA0,0xE1,0x06,0x00,0x00,0x0A,
+    0x1A,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x04,0x80,0x88,0x00,0x04,0x70,0x87,0x00,
+    0x04,0x50,0x45,0x00,0xF0,0xFF,0xFF,0x0A,0xFC,0x9F,0xBD,0xE8,0x73,0xFF,0xFF,0xEB,
+    0xF7,0xFF,0xFF,0xEA,0x14,0x07,0x00,0xEA,0xB1,0x00,0x00,0xEA,0xA4,0x2A,0x02,0x20,
+    0xF0,0x41,0x2D,0xE9,0x00,0x50,0xA0,0xE3,0x64,0x45,0x9F,0xE5,0x03,0x60,0xB0,0xE1,
+    0x00,0x80,0xA0,0xE1,0x01,0x00,0xA0,0xE3,0x01,0x70,0xA0,0xE1,0x08,0x10,0xA0,0xE3,
+    0x14,0x30,0x84,0xE2,0x00,0x50,0x84,0xE5,0x10,0x50,0x84,0xE5,0x21,0x00,0x83,0xE8,
+    0x1C,0x50,0x84,0xE5,0x24,0x10,0x84,0xE5,0x05,0x10,0xA0,0xE3,0x20,0x50,0x84,0xE5,
+    0x2C,0x00,0x84,0xE5,0x28,0x50,0x84,0xE5,0x30,0x00,0x84,0xE5,0x02,0x00,0xA0,0xE1,
+    0x46,0x10,0xC4,0xE5,0x00,0x10,0x84,0xE2,0x58,0x50,0x84,0xE5,0x5C,0x50,0x84,0xE5,
+    0x34,0x50,0x84,0xE5,0x38,0x50,0x84,0xE5,0x3C,0x50,0x84,0xE5,0x40,0x50,0x84,0xE5,
+    0xDF,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x81,0xBD,0x18,0x00,0x00,0x56,0xE3,
+    0x50,0x10,0xD4,0xE5,0x00,0x10,0xC8,0xE5,0xB0,0x15,0xD4,0x11,0x21,0x14,0xA0,0x11,
+    0x00,0x10,0xC7,0x15,0x00,0x50,0xC7,0x05,0xF0,0x81,0xBD,0xE8,0xFE,0x40,0x2D,0xE9,
+    0x02,0x50,0xA0,0xE1,0x01,0x40,0xA0,0xE1,0x00,0x60,0xA0,0xE1,0x04,0x30,0xA0,0xE1,
+    0x06,0x20,0xA0,0xE1,0x08,0x10,0x8D,0xE2,0x04,0x00,0x8D,0xE2,0x00,0x50,0x8D,0xE5,
+    0xCE,0xFF,0xFF,0xEB,0x01,0x00,0x54,0xE3,0x04,0x10,0xDD,0x05,0x08,0x20,0xDD,0x05,
+    0x02,0x10,0x81,0x01,0x03,0x00,0x00,0x0A,0x00,0x00,0x54,0xE3,0x04,0x10,0xDD,0x05,
+    0x00,0x00,0xE0,0x13,0x01,0x00,0x00,0x1A,0x01,0x00,0x11,0xE3,0xEE,0xFF,0xFF,0x1A,
+    0xFE,0x80,0xBD,0xE8,0x78,0x14,0x9F,0xE5,0x00,0x20,0xA0,0xE3,0x01,0x30,0xA0,0xE3,
+    0x00,0x20,0x81,0xE5,0x14,0x30,0x81,0xE5,0x06,0x30,0xA0,0xE3,0x18,0x20,0x81,0xE5,
+    0x1C,0x20,0x81,0xE5,0x20,0x20,0x81,0xE5,0x24,0x20,0x81,0xE5,0x28,0x20,0x81,0xE5,
+    0x2C,0x20,0x81,0xE5,0x30,0x20,0x81,0xE5,0x46,0x30,0xC1,0xE5,0x34,0x20,0x81,0xE5,
+    0x38,0x20,0x81,0xE5,0x3C,0x20,0x81,0xE5,0x40,0x20,0x81,0xE5,0xAC,0xFF,0xFF,0xEA,
+    0xF0,0x41,0x2D,0xE9,0x80,0x00,0x10,0xE3,0x03,0x60,0xA0,0xE1,0x02,0x70,0xA0,0xE1,
+    0x18,0x80,0x9D,0xE5,0x01,0x50,0xA0,0xE1,0x00,0x40,0xA0,0xE1,0x07,0x00,0x00,0x0A,
+    0x80,0x40,0xC4,0xE3,0x06,0x20,0xA0,0xE1,0x08,0x30,0xA0,0xE1,0x07,0x10,0xA0,0xE1,
+    0x04,0x00,0xA0,0xE1,0x7F,0x00,0x00,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x81,0xBD,0x18,
+    0x07,0x00,0xA0,0xE1,0xDA,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x81,0xBD,0x18,
+    0x00,0x10,0xA0,0xE3,0x01,0x20,0xA0,0xE3,0x0C,0x30,0xA0,0xE3,0xD0,0x03,0x9F,0xE5,
+    0x1C,0xC0,0x80,0xE2,0x00,0x10,0x80,0xE5,0x0C,0x10,0x80,0xE5,0x14,0x20,0x80,0xE5,
+    0x18,0x10,0x80,0xE5,0x0A,0x00,0x8C,0xE8,0x24,0x10,0x80,0xE5,0x28,0x10,0x80,0xE5,
+    0x2C,0x10,0x80,0xE5,0x30,0x10,0x80,0xE5,0x46,0x20,0xC0,0xE5,0x4C,0x40,0xC0,0xE5,
+    0x4D,0x50,0xC0,0xE5,0x4E,0x10,0xC0,0xE5,0x4F,0x10,0xC0,0xE5,0x34,0x10,0x80,0xE5,
+    0x38,0x10,0x80,0xE5,0x3C,0x10,0x80,0xE5,0x40,0x10,0x80,0xE5,0x00,0x10,0x80,0xE2,
+    0x07,0x00,0xA0,0xE1,0x7E,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x81,0xBD,0x18,
+    0x08,0x20,0xA0,0xE1,0x06,0x10,0xA0,0xE1,0x07,0x00,0xA0,0xE1,0xF0,0x41,0xBD,0xE8,
+    0xA1,0xFF,0xFF,0xEA,0xF0,0x41,0x2D,0xE9,0x00,0x50,0xA0,0xE3,0x50,0x43,0x9F,0xE5,
+    0x03,0x60,0xB0,0xE1,0x00,0x80,0xA0,0xE1,0x01,0x00,0xA0,0xE3,0x01,0x70,0xA0,0xE1,
+    0x08,0x10,0xA0,0xE3,0x14,0x30,0x84,0xE2,0x00,0x50,0x84,0xE5,0x10,0x50,0x84,0xE5,
+    0x21,0x00,0x83,0xE8,0x1C,0x50,0x84,0xE5,0x24,0x10,0x84,0xE5,0x35,0x10,0xA0,0xE3,
+    0x20,0x50,0x84,0xE5,0x2C,0x00,0x84,0xE5,0x28,0x50,0x84,0xE5,0x30,0x00,0x84,0xE5,
+    0x02,0x00,0xA0,0xE1,0x46,0x10,0xC4,0xE5,0x00,0x10,0x84,0xE2,0x58,0x50,0x84,0xE5,
+    0x5C,0x50,0x84,0xE5,0x34,0x50,0x84,0xE5,0x38,0x50,0x84,0xE5,0x3C,0x50,0x84,0xE5,
+    0x40,0x50,0x84,0xE5,0x5A,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x81,0xBD,0x18,
+    0x00,0x00,0x56,0xE3,0x50,0x10,0xD4,0xE5,0x00,0x10,0xC8,0xE5,0xB0,0x15,0xD4,0x11,
+    0x21,0x14,0xA0,0x11,0x00,0x10,0xC7,0x15,0x00,0x50,0xC7,0x05,0xF0,0x81,0xBD,0xE8,
+    0x38,0x40,0x2D,0xE9,0x10,0x40,0x9D,0xE5,0x00,0x40,0x8D,0xE5,0x57,0x00,0x00,0xEB,
+    0x38,0x80,0xBD,0xE8,0xF0,0x40,0x2D,0xE9,0x03,0x40,0xA0,0xE1,0x14,0xD0,0x4D,0xE2,
+    0x00,0x50,0xA0,0xE1,0x02,0x60,0xA0,0xE1,0x01,0x70,0xA0,0xE1,0x00,0x30,0x8D,0xE5,
+    0x02,0x30,0xA0,0xE1,0x01,0x20,0xA0,0xE1,0x0C,0x10,0x8D,0xE2,0x04,0x00,0x8D,0xE2,
+    0x42,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x1C,0x00,0x00,0x1A,0x06,0x30,0xA0,0xE1,
+    0x07,0x20,0xA0,0xE1,0x10,0x10,0x8D,0xE2,0x08,0x00,0x8D,0xE2,0x00,0x40,0x8D,0xE5,
+    0xBF,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x14,0x00,0x00,0x1A,0x06,0x30,0xA0,0xE1,
+    0x08,0x00,0xDD,0xE5,0x07,0x20,0xA0,0xE1,0x00,0x40,0x8D,0xE5,0x01,0x10,0xC0,0xE3,
+    0x04,0x00,0xDD,0xE5,0x81,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x0B,0x00,0x00,0x1A,
+    0x01,0x00,0x55,0xE3,0x04,0x00,0xDD,0xE5,0x06,0x30,0xA0,0xE1,0x07,0x20,0xA0,0xE1,
+    0x00,0x40,0x8D,0xE5,0x1C,0x00,0x80,0x13,0x1C,0x00,0xC0,0x03,0x04,0x00,0xCD,0xE5,
+    0x08,0x00,0xDD,0xE5,0x01,0x10,0x80,0xE3,0x04,0x00,0xDD,0xE5,0x73,0xFF,0xFF,0xEB,
+    0x14,0xD0,0x8D,0xE2,0xF0,0x80,0xBD,0xE8,0xF0,0x41,0x2D,0xE9,0x00,0x40,0xA0,0xE1,
+    0x03,0x50,0xA0,0xE1,0x02,0x60,0xA0,0xE1,0x01,0x70,0xA0,0xE1,0x01,0x00,0xA0,0xE1,
+    0x57,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x81,0xBD,0x18,0x00,0x10,0xA0,0xE3,
+    0x01,0x20,0xA0,0xE3,0x08,0x30,0xA0,0xE3,0xC4,0x01,0x9F,0xE5,0x1C,0x80,0x80,0xE2,
+    0x00,0x10,0x80,0xE5,0x0C,0x10,0x80,0xE5,0x14,0x20,0x80,0xE5,0x18,0x10,0x80,0xE5,
+    0x0A,0x00,0x88,0xE8,0x24,0x10,0x80,0xE5,0x28,0x10,0x80,0xE5,0x2C,0x10,0x80,0xE5,
+    0x30,0x10,0x80,0xE5,0x46,0x20,0xC0,0xE5,0x4C,0x40,0xC0,0xE5,0x4D,0x10,0xC0,0xE5,
+    0x4E,0x10,0xC0,0xE5,0x4F,0x10,0xC0,0xE5,0x34,0x10,0x80,0xE5,0x38,0x10,0x80,0xE5,
+    0x3C,0x10,0x80,0xE5,0x40,0x10,0x80,0xE5,0x00,0x10,0x80,0xE2,0x07,0x00,0xA0,0xE1,
+    0xFB,0xFE,0xFF,0xEB,0x00,0x00,0x50,0xE3,0xF0,0x81,0xBD,0x18,0x05,0x20,0xA0,0xE1,
+    0x06,0x10,0xA0,0xE1,0x07,0x00,0xA0,0xE1,0xF0,0x41,0xBD,0xE8,0x1E,0xFF,0xFF,0xEA,
+    0xF0,0x40,0x2D,0xE9,0x03,0x40,0xA0,0xE1,0x1C,0xD0,0x4D,0xE2,0x02,0x50,0xA0,0xE1,
+    0x01,0x60,0xA0,0xE1,0x00,0x70,0xA0,0xE1,0x00,0x20,0xA0,0xE1,0x00,0x30,0x8D,0xE5,
+    0x01,0x30,0xA0,0xE1,0x0C,0x10,0x8D,0xE2,0x08,0x00,0x8D,0xE2,0xEB,0xFE,0xFF,0xEB,
+    0x00,0x00,0x50,0xE3,0x1F,0x00,0x00,0x1A,0x06,0x30,0xA0,0xE1,0x07,0x20,0xA0,0xE1,
+    0x10,0x10,0x8D,0xE2,0x04,0x00,0x8D,0xE2,0x00,0x40,0x8D,0xE5,0x68,0xFF,0xFF,0xEB,
+    0x00,0x00,0x50,0xE3,0x17,0x00,0x00,0x1A,0x06,0x30,0xA0,0xE1,0x07,0x20,0xA0,0xE1,
+    0x18,0x10,0x8D,0xE2,0x14,0x00,0x8D,0xE2,0x00,0x40,0x8D,0xE5,0x13,0x00,0x00,0xEB,
+    0x00,0x00,0x50,0xE3,0x0F,0x00,0x00,0x1A,0x02,0x00,0x55,0xE3,0x04,0x00,0xDD,0x05,
+    0x02,0x00,0xC0,0x03,0x04,0x00,0x00,0x0A,0x03,0x00,0x55,0xE3,0x04,0x00,0xDD,0x05,
+    0x02,0x00,0x80,0x03,0x00,0x00,0xE0,0x13,0x06,0x00,0x00,0x1A,0x3F,0x10,0x00,0xE2,
+    0x08,0x00,0xDD,0xE5,0x06,0x30,0xA0,0xE1,0x04,0x10,0xCD,0xE5,0x07,0x20,0xA0,0xE1,
+    0x00,0x40,0x8D,0xE5,0x19,0xFF,0xFF,0xEB,0x1C,0xD0,0x8D,0xE2,0xF0,0x80,0xBD,0xE8,
+    0xF0,0x41,0x2D,0xE9,0x00,0x50,0xA0,0xE3,0x84,0x40,0x9F,0xE5,0x03,0x80,0xA0,0xE1,
+    0x00,0x70,0xA0,0xE1,0x01,0x00,0xA0,0xE3,0x01,0x60,0xA0,0xE1,0x08,0x10,0xA0,0xE3,
+    0x14,0x30,0x84,0xE2,0x00,0x50,0x84,0xE5,0x10,0x50,0x84,0xE5,0x21,0x00,0x83,0xE8,
+    0x24,0x30,0x84,0xE2,0x1C,0x50,0x84,0xE5,0x20,0x50,0x84,0xE5,0x22,0x00,0x83,0xE8,
+    0x16,0x10,0xA0,0xE3,0x2C,0x00,0x84,0xE5,0x30,0x00,0x84,0xE5,0x02,0x00,0xA0,0xE1,
+    0x46,0x10,0xC4,0xE5,0x00,0x10,0x84,0xE2,0x58,0x50,0x84,0xE5,0x5C,0x50,0x84,0xE5,
+    0x34,0x50,0x84,0xE5,0x38,0x50,0x84,0xE5,0x3C,0x50,0x84,0xE5,0x40,0x50,0x84,0xE5,
+    0xA7,0xFE,0xFF,0xEB,0x50,0x10,0xD4,0xE5,0x00,0x00,0x58,0xE3,0x00,0x10,0xC7,0xE5,
+    0xB0,0x15,0xD4,0x11,0x00,0x50,0xC6,0x05,0x21,0x14,0xA0,0x11,0x00,0x10,0xC6,0x15,
+    0xF0,0x81,0xBD,0xE8,0xA4,0x2A,0x02,0x20,0x89,0x05,0x00,0xEA,0x9D,0x05,0x00,0xEA,
+    0x73,0x05,0x00,0xEA,0xF8,0x40,0x2D,0xE9,0x02,0x40,0xA0,0xE1,0x18,0x20,0x8D,0xE2,
+    0x03,0xC0,0xA0,0xE1,0x01,0x60,0xA0,0xE1,0x00,0x70,0xA0,0xE1,0x28,0x00,0x92,0xE8,
+    0x0C,0x20,0xA0,0xE1,0x00,0x40,0x8D,0xE5,0x2E,0x04,0x00,0xEB,0x00,0x00,0x50,0xE3,
+    0x0B,0x00,0x00,0x1A,0x00,0x00,0x54,0xE3,0x02,0x20,0xA0,0x03,0x03,0x00,0x00,0x0A,
+    0x02,0x00,0x54,0xE3,0x03,0x20,0xA0,0x03,0x00,0x00,0xE0,0x13,0x04,0x00,0x00,0x1A,
+    0x04,0x30,0xA0,0xE1,0x06,0x10,0xA0,0xE1,0x07,0x00,0xA0,0xE1,0x00,0x50,0x8D,0xE5,
+    0x32,0xFF,0xFF,0xEB,0xF8,0x80,0xBD,0xE8,0x70,0x40,0x2D,0xE9,0x01,0x00,0x50,0xE3,
+    0x02,0x40,0xA0,0xE1,0x00,0x50,0xA0,0xE1,0x00,0x00,0xE0,0x83,0x70,0x80,0xBD,0x88,
+    0x00,0x00,0x51,0xE3,0x00,0x10,0xA0,0x03,0x01,0x10,0xA0,0x13,0x0B,0x20,0xD4,0xE5,
+    0xE9,0x03,0x00,0xEB,0x00,0x00,0x50,0xE3,0x70,0x80,0xBD,0x18,0x04,0x10,0xA0,0xE1,
+    0x05,0x00,0xA0,0xE1,0x70,0x40,0xBD,0xE8,0x9D,0x04,0x00,0xEA,0x01,0x20,0xD1,0xE5,
+    0x02,0x00,0x52,0xE3,0x0E,0x00,0xD1,0x95,0x02,0x00,0x50,0x93,0x12,0x00,0x00,0x8A,
+    0x06,0x00,0xD1,0xE5,0x0F,0x00,0x50,0xE3,0x07,0x00,0xD1,0x95,0x02,0x00,0x50,0x93,
+    0x0D,0x00,0x00,0x8A,0x08,0x00,0xD1,0xE5,0x07,0x00,0x50,0xE3,0x09,0x00,0xD1,0x95,
+    0x01,0x00,0x50,0x93,0x08,0x00,0x00,0x8A,0x0A,0x00,0xD1,0xE5,0x02,0x00,0x50,0xE3,
+    0x0B,0x00,0xD1,0x95,0x02,0x00,0x50,0x93,0x03,0x00,0x00,0x8A,0x0D,0x00,0xD1,0xE5,
+    0x03,0x00,0x50,0xE3,0x00,0x00,0xA0,0x93,0x1E,0xFF,0x2F,0x91,0x00,0x00,0xE0,0xE3,
+    0x1E,0xFF,0x2F,0xE1,0xF8,0x40,0x2D,0xE9,0x01,0x50,0xA0,0xE1,0x02,0x40,0xA0,0xE1,
+    0x00,0x60,0xA0,0xE1,0x02,0x10,0xA0,0xE1,0xDF,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,
+    0x1B,0x00,0x00,0x1A,0x05,0x10,0xA0,0xE1,0x0B,0x00,0xD4,0xE5,0x00,0x00,0x8D,0xE5,
+    0x06,0x00,0xA0,0xE1,0x0D,0x30,0xD4,0xE5,0x0C,0x20,0xD4,0xE5,0xE5,0x03,0x00,0xEB,
+    0x00,0x00,0x50,0xE3,0x12,0x00,0x00,0x1A,0x0B,0x30,0xD4,0xE5,0x00,0x00,0x53,0xE3,
+    0x02,0x20,0xA0,0x03,0x03,0x00,0x00,0x0A,0x02,0x00,0x53,0xE3,0x03,0x20,0xA0,0x03,
+    0x00,0x00,0xE0,0x13,0x0A,0x00,0x00,0x1A,0x05,0x10,0xA0,0xE1,0x0F,0x00,0xD4,0xE5,
+    0x00,0x00,0x8D,0xE5,0x06,0x00,0xA0,0xE1,0xE8,0xFE,0xFF,0xEB,0x00,0x00,0x50,0xE3,
+    0x03,0x00,0x00,0x1A,0x04,0x20,0xA0,0xE1,0x05,0x10,0xA0,0xE1,0x06,0x00,0xA0,0xE1,
+    0xB0,0xFF,0xFF,0xEB,0xF8,0x80,0xBD,0xE8,0x52,0x04,0x00,0xEA,0x70,0x40,0x2D,0xE9,
+    0x01,0x40,0xA0,0xE1,0x00,0x50,0xA0,0xE1,0x7F,0x06,0x00,0xEB,0x04,0x10,0xA0,0xE1,
+    0x05,0x00,0xA0,0xE1,0x70,0x40,0xBD,0xE8,0xB7,0xFF,0xFF,0xEA,0xF7,0x4F,0x2D,0xE9,
+    0x01,0x00,0x50,0xE3,0x01,0x40,0xA0,0xE1,0x00,0x00,0xE0,0x83,0x92,0x03,0x00,0x8A,
+    0x00,0x00,0x50,0xE3,0xE5,0x00,0x00,0x0A,0x01,0x3A,0xA0,0xE3,0x3C,0x5E,0x9F,0xE5,
+    0x0C,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0x38,0xFC,0xFF,0xEB,
+    0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x43,0x62,0x85,0xE1,
+    0x06,0x00,0xA0,0xE1,0x32,0xFC,0xFF,0xEB,0x3D,0x7C,0x45,0xE2,0x01,0x3A,0xA0,0xE3,
+    0x0C,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x2C,0xFC,0xFF,0xEB,
+    0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x43,0x82,0x87,0xE0,
+    0x08,0x00,0xA0,0xE1,0x26,0xFC,0xFF,0xEB,0x0C,0x20,0xA0,0xE3,0x01,0x3A,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x02,0x93,0x26,0xE0,0x09,0x00,0xA0,0xE1,0x20,0xFC,0xFF,0xEB,
+    0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,
+    0x1B,0xFC,0xFF,0xEB,0x0C,0x20,0xA0,0xE3,0x01,0x3A,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x82,0xA3,0x27,0xE0,0x0A,0x00,0xA0,0xE1,0x15,0xFC,0xFF,0xEB,0x01,0x10,0xA0,0xE3,
+    0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x01,0xB4,0x8A,0xE0,0x0B,0x00,0xA0,0xE1,
+    0x0F,0xFC,0xFF,0xEB,0x0C,0x20,0xA0,0xE3,0x01,0x3A,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x82,0x03,0x88,0xE0,0x0A,0xFC,0xFF,0xEB,0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0x05,0xFC,0xFF,0xEB,0x01,0x3A,0xA0,0xE3,
+    0x0C,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0x00,0xFC,0xFF,0xEB,
+    0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,
+    0xFB,0xFB,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x06,0x00,0xA0,0xE1,0xF6,0xFB,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0xF1,0xFB,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,
+    0x0D,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0xEC,0xFB,0xFF,0xEB,
+    0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,
+    0xE7,0xFB,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x06,0x00,0xA0,0xE1,0xE2,0xFB,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x0A,0x00,0xA0,0xE1,0xDD,0xFB,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,
+    0x0D,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,0xD8,0xFB,0xFF,0xEB,
+    0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0xC3,0x01,0x8B,0xE0,
+    0xD3,0xFB,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x09,0x00,0xA0,0xE1,0xCE,0xFB,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0xC9,0xFB,0xFF,0xEB,0x01,0x39,0xA0,0xE3,
+    0x0E,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0xC4,0xFB,0xFF,0xEB,
+    0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,
+    0xBF,0xFB,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x07,0x00,0xA0,0xE1,0xBA,0xFB,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0xB5,0xFB,0xFF,0xEB,0x01,0x39,0xA0,0xE3,
+    0x0E,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0xB0,0xFB,0xFF,0xEB,
+    0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,
+    0xAB,0xFB,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x0A,0x00,0xA0,0xE1,0xA6,0xFB,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,0xA1,0xFB,0xFF,0xEB,0x0E,0x20,0xA0,0xE3,
+    0x01,0x39,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x82,0x03,0x87,0xE0,0x9C,0xFB,0xFF,0xEB,
+    0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,
+    0x97,0xFB,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x08,0x00,0xA0,0xE1,0x92,0xFB,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0x8D,0xFB,0xFF,0xEB,0x02,0x39,0xA0,0xE3,
+    0x0F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x88,0xFB,0xFF,0xEB,
+    0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,
+    0x83,0xFB,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x08,0x00,0xA0,0xE1,0x7E,0xFB,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0x79,0xFB,0xFF,0xEB,0x02,0x39,0xA0,0xE3,
+    0x0F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x74,0xFB,0xFF,0xEB,
+    0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x0A,0x00,0xA0,0xE1,
+    0x6F,0xFB,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x0B,0x00,0xA0,0xE1,0x6A,0xFB,0xFF,0xEB,0x0F,0x20,0xA0,0xE3,0x02,0x39,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x02,0x04,0x2A,0xE0,0x65,0xFB,0xFF,0xEB,0x02,0x39,0xA0,0xE3,
+    0x0F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0x60,0xFB,0xFF,0xEB,
+    0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,
+    0x5B,0xFB,0xFF,0xEB,0x02,0x00,0x54,0xE3,0x3B,0x02,0x00,0x0A,0xA9,0x02,0x00,0xEA,
+    0xAC,0x5A,0x9F,0xE5,0x04,0x30,0xA0,0xE3,0x02,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x05,0x00,0xA0,0xE1,0x52,0xFB,0xFF,0xEB,0x02,0x20,0xA0,0xE3,0x04,0x30,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x82,0x63,0x85,0xE1,0x06,0x00,0xA0,0xE1,0x4C,0xFB,0xFF,0xEB,
+    0x3D,0x7C,0x45,0xE2,0x04,0x30,0xA0,0xE3,0x02,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x07,0x00,0xA0,0xE1,0x46,0xFB,0xFF,0xEB,0x02,0x20,0xA0,0xE3,0x04,0x30,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x82,0x83,0x87,0xE0,0x08,0x00,0xA0,0xE1,0x40,0xFB,0xFF,0xEB,
+    0x02,0x20,0xA0,0xE3,0x04,0x30,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x82,0x93,0x86,0xE0,
+    0x09,0x00,0xA0,0xE1,0x3A,0xFB,0xFF,0xEB,0x04,0x30,0xA0,0xE3,0x02,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x35,0xFB,0xFF,0xEB,0x01,0x10,0xA0,0xE3,
+    0x04,0x30,0xA0,0xE3,0x02,0x20,0xA0,0xE3,0x01,0xA4,0x88,0xE1,0x0A,0x00,0xA0,0xE1,
+    0x2F,0xFB,0xFF,0xEB,0x02,0x20,0xA0,0xE3,0x04,0x30,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x82,0xB3,0x8A,0xE0,0x0B,0x00,0xA0,0xE1,0x29,0xFB,0xFF,0xEB,0x02,0x20,0xA0,0xE3,
+    0x04,0x30,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x82,0x04,0x8B,0xE0,0x24,0xFB,0xFF,0xEB,
+    0x04,0x30,0xA0,0xE3,0x02,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,
+    0x1F,0xFB,0xFF,0xEB,0x04,0x30,0xA0,0xE3,0x02,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x08,0x00,0xA0,0xE1,0x1A,0xFB,0xFF,0xEB,0x08,0x30,0xA0,0xE3,0x03,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0x15,0xFB,0xFF,0xEB,0x08,0x30,0xA0,0xE3,
+    0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x10,0xFB,0xFF,0xEB,
+    0x08,0x30,0xA0,0xE3,0x03,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,
+    0x0B,0xFB,0xFF,0xEB,0x08,0x30,0xA0,0xE3,0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x08,0x00,0xA0,0xE1,0x06,0xFB,0xFF,0xEB,0x08,0x30,0xA0,0xE3,0x03,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0x01,0xFB,0xFF,0xEB,0x08,0x30,0xA0,0xE3,
+    0x03,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0xFC,0xFA,0xFF,0xEB,
+    0x08,0x30,0xA0,0xE3,0x03,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x0A,0x00,0xA0,0xE1,
+    0xF7,0xFA,0xFF,0xEB,0x08,0x30,0xA0,0xE3,0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x0B,0x00,0xA0,0xE1,0xF2,0xFA,0xFF,0xEB,0x03,0x20,0xA0,0xE3,0x08,0x30,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x82,0x04,0x88,0xE0,0xED,0xFA,0xFF,0xEB,0x08,0x30,0xA0,0xE3,
+    0x03,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0xE8,0xFA,0xFF,0xEB,
+    0x08,0x30,0xA0,0xE3,0x03,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,
+    0xE3,0xFA,0xFF,0xEB,0x10,0x30,0xA0,0xE3,0x04,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x05,0x00,0xA0,0xE1,0xDE,0xFA,0xFF,0xEB,0x10,0x30,0xA0,0xE3,0x04,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0xD9,0xFA,0xFF,0xEB,0x10,0x30,0xA0,0xE3,
+    0x04,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0xD4,0xFA,0xFF,0xEB,
+    0x10,0x30,0xA0,0xE3,0x04,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,
+    0xCF,0xFA,0xFF,0xEB,0x10,0x30,0xA0,0xE3,0x04,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x09,0x00,0xA0,0xE1,0xCA,0xFA,0xFF,0xEB,0x10,0x30,0xA0,0xE3,0x04,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0xC5,0xFA,0xFF,0xEB,0x10,0x30,0xA0,0xE3,
+    0x04,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x0A,0x00,0xA0,0xE1,0xC0,0xFA,0xFF,0xEB,
+    0x10,0x30,0xA0,0xE3,0x04,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,
+    0xBB,0xFA,0xFF,0xEB,0x04,0x20,0xA0,0xE3,0x10,0x30,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x02,0x04,0x8B,0xE0,0xB6,0xFA,0xFF,0xEB,0x10,0x30,0xA0,0xE3,0x04,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0xB1,0xFA,0xFF,0xEB,0x10,0x30,0xA0,0xE3,
+    0x04,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0xAC,0xFA,0xFF,0xEB,
+    0x20,0x30,0xA0,0xE3,0x05,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,
+    0xA7,0xFA,0xFF,0xEB,0x20,0x30,0xA0,0xE3,0x05,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x06,0x00,0xA0,0xE1,0xA2,0xFA,0xFF,0xEB,0x20,0x30,0xA0,0xE3,0x05,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x9D,0xFA,0xFF,0xEB,0x20,0x30,0xA0,0xE3,
+    0x05,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0x98,0xFA,0xFF,0xEB,
+    0x20,0x30,0xA0,0xE3,0x05,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,
+    0x93,0xFA,0xFF,0xEB,0x20,0x30,0xA0,0xE3,0x05,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x06,0x00,0xA0,0xE1,0x8E,0xFA,0xFF,0xEB,0x20,0x30,0xA0,0xE3,0x05,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x0A,0x00,0xA0,0xE1,0x89,0xFA,0xFF,0xEB,0x20,0x30,0xA0,0xE3,
+    0x05,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,0x84,0xFA,0xFF,0xEB,
+    0x05,0x20,0xA0,0xE3,0x20,0x30,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x02,0x04,0x8A,0xE0,
+    0x7F,0xFA,0xFF,0xEB,0x20,0x30,0xA0,0xE3,0x05,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x09,0x00,0xA0,0xE1,0x7A,0xFA,0xFF,0xEB,0x20,0x30,0xA0,0xE3,0x05,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0x75,0xFA,0xFF,0xEB,0x02,0x00,0x54,0xE3,
+    0xC4,0x01,0x00,0x1A,0x40,0x30,0xA0,0xE3,0x06,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x05,0x00,0xA0,0xE1,0x6E,0xFA,0xFF,0xEB,0x40,0x30,0xA0,0xE3,0x06,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x69,0xFA,0xFF,0xEB,0x40,0x30,0xA0,0xE3,
+    0x06,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x64,0xFA,0xFF,0xEB,
+    0x40,0x30,0xA0,0xE3,0x06,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,
+    0x5F,0xFA,0xFF,0xEB,0x40,0x30,0xA0,0xE3,0x06,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x09,0x00,0xA0,0xE1,0x5A,0xFA,0xFF,0xEB,0x40,0x30,0xA0,0xE3,0x06,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x55,0xFA,0xFF,0xEB,0x40,0x30,0xA0,0xE3,
+    0x06,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x0A,0x00,0xA0,0xE1,0x50,0xFA,0xFF,0xEB,
+    0x40,0x30,0xA0,0xE3,0x06,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,
+    0x4B,0xFA,0xFF,0xEB,0x06,0x20,0xA0,0xE3,0x40,0x30,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x02,0x44,0x88,0xE0,0x04,0x00,0xA0,0xE1,0x45,0xFA,0xFF,0xEB,0x40,0x30,0xA0,0xE3,
+    0x06,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0x40,0xFA,0xFF,0xEB,
+    0x40,0x30,0xA0,0xE3,0x06,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,
+    0x3B,0xFA,0xFF,0xEB,0x80,0x30,0xA0,0xE3,0x07,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x05,0x00,0xA0,0xE1,0x36,0xFA,0xFF,0xEB,0x80,0x30,0xA0,0xE3,0x07,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x31,0xFA,0xFF,0xEB,0x80,0x30,0xA0,0xE3,
+    0x07,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x2C,0xFA,0xFF,0xEB,
+    0x80,0x30,0xA0,0xE3,0x07,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,
+    0x27,0xFA,0xFF,0xEB,0x80,0x30,0xA0,0xE3,0x07,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x09,0x00,0xA0,0xE1,0x22,0xFA,0xFF,0xEB,0x80,0x30,0xA0,0xE3,0x07,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x1D,0xFA,0xFF,0xEB,0x80,0x30,0xA0,0xE3,
+    0x07,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x0A,0x00,0xA0,0xE1,0x18,0xFA,0xFF,0xEB,
+    0x80,0x30,0xA0,0xE3,0x07,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,
+    0x13,0xFA,0xFF,0xEB,0x80,0x30,0xA0,0xE3,0x07,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x04,0x00,0xA0,0xE1,0x0E,0xFA,0xFF,0xEB,0x80,0x30,0xA0,0xE3,0x07,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0x09,0xFA,0xFF,0xEB,0x80,0x30,0xA0,0xE3,
+    0x07,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0x04,0xFA,0xFF,0xEB,
+    0x08,0x00,0x9D,0xE5,0x01,0x00,0x50,0xE3,0x52,0x01,0x00,0x1A,0x1C,0x40,0x45,0xE2,
+    0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x04,0x00,0xA0,0xE1,
+    0xFB,0xF9,0xFF,0xEB,0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x43,0x52,0x84,0xE1,0x05,0x00,0xA0,0xE1,0xF5,0xF9,0xFF,0xEB,0x3D,0x6C,0x44,0xE2,
+    0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,
+    0xEF,0xF9,0xFF,0xEB,0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x43,0x72,0x86,0xE0,0x07,0x00,0xA0,0xE1,0xE9,0xF9,0xFF,0xEB,0x0C,0x20,0xA0,0xE3,
+    0x01,0x3A,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x02,0x83,0x25,0xE0,0x08,0x00,0xA0,0xE1,
+    0xE3,0xF9,0xFF,0xEB,0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x05,0x00,0xA0,0xE1,0xDE,0xF9,0xFF,0xEB,0x01,0x10,0xA0,0xE3,0x01,0x3A,0xA0,0xE3,
+    0x0C,0x20,0xA0,0xE3,0x01,0x94,0x87,0xE1,0x09,0x00,0xA0,0xE1,0xD8,0xF9,0xFF,0xEB,
+    0x01,0x10,0xA0,0xE3,0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x01,0xA4,0x89,0xE0,
+    0x0A,0x00,0xA0,0xE1,0xD2,0xF9,0xFF,0xEB,0x0C,0x20,0xA0,0xE3,0x01,0x3A,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x82,0xB3,0x87,0xE0,0x0B,0x00,0xA0,0xE1,0xCC,0xF9,0xFF,0xEB,
+    0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,
+    0xC7,0xF9,0xFF,0xEB,0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x07,0x00,0xA0,0xE1,0xC2,0xF9,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x04,0x00,0xA0,0xE1,0xBD,0xF9,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,
+    0x0D,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0xB8,0xF9,0xFF,0xEB,
+    0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,
+    0xB3,0xF9,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x07,0x00,0xA0,0xE1,0xAE,0xF9,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0xA9,0xF9,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,
+    0x0D,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0xA4,0xF9,0xFF,0xEB,
+    0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,
+    0x9F,0xF9,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x0A,0x00,0xA0,0xE1,0x9A,0xF9,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,0x95,0xF9,0xFF,0xEB,0x02,0x3A,0xA0,0xE3,
+    0x0D,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0x90,0xF9,0xFF,0xEB,
+    0x02,0x3A,0xA0,0xE3,0x0D,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,
+    0x8B,0xF9,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x04,0x00,0xA0,0xE1,0x86,0xF9,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0x81,0xF9,0xFF,0xEB,0x01,0x39,0xA0,0xE3,
+    0x0E,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x7C,0xF9,0xFF,0xEB,
+    0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,
+    0x77,0xF9,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x08,0x00,0xA0,0xE1,0x72,0xF9,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0x6D,0xF9,0xFF,0xEB,0x01,0x39,0xA0,0xE3,
+    0x0E,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0x68,0xF9,0xFF,0xEB,
+    0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x0A,0x00,0xA0,0xE1,
+    0x63,0xF9,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x0B,0x00,0xA0,0xE1,0x5E,0xF9,0xFF,0xEB,0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0x59,0xF9,0xFF,0xEB,0x01,0x39,0xA0,0xE3,
+    0x0E,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x54,0xF9,0xFF,0xEB,
+    0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x04,0x00,0xA0,0xE1,
+    0x4F,0xF9,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x05,0x00,0xA0,0xE1,0x4A,0xF9,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,0x45,0xF9,0xFF,0xEB,0x02,0x39,0xA0,0xE3,
+    0x0F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x40,0xF9,0xFF,0xEB,
+    0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,
+    0x3B,0xF9,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x05,0x00,0xA0,0xE1,0x36,0xF9,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0x31,0xF9,0xFF,0xEB,0x02,0x39,0xA0,0xE3,
+    0x0F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x0A,0x00,0xA0,0xE1,0x2C,0xF9,0xFF,0xEB,
+    0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,
+    0x27,0xF9,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x08,0x00,0xA0,0xE1,0x22,0xF9,0xFF,0xEB,0x02,0x39,0xA0,0xE3,0x0F,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x6D,0x00,0x00,0xEA,0x01,0x3B,0xA0,0xE3,
+    0x0A,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0x18,0xF9,0xFF,0xEB,
+    0x01,0x3B,0xA0,0xE3,0x0A,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,
+    0x13,0xF9,0xFF,0xEB,0x01,0x3B,0xA0,0xE3,0x0A,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x07,0x00,0xA0,0xE1,0x0E,0xF9,0xFF,0xEB,0x01,0x3B,0xA0,0xE3,0x0A,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0x09,0xF9,0xFF,0xEB,0x01,0x3B,0xA0,0xE3,
+    0x0A,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0x04,0xF9,0xFF,0xEB,
+    0x01,0x3B,0xA0,0xE3,0x0A,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,
+    0xFF,0xF8,0xFF,0xEB,0x01,0x3B,0xA0,0xE3,0x0A,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x0A,0x00,0xA0,0xE1,0xFA,0xF8,0xFF,0xEB,0x01,0x3B,0xA0,0xE3,0x0A,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,0xF5,0xF8,0xFF,0xEB,0x24,0x41,0x9F,0xE5,
+    0x01,0x3B,0xA0,0xE3,0x0A,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x04,0x00,0xA0,0xE1,
+    0xEF,0xF8,0xFF,0xEB,0x01,0x3B,0xA0,0xE3,0x0A,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x09,0x00,0xA0,0xE1,0xEA,0xF8,0xFF,0xEB,0x01,0x3B,0xA0,0xE3,0x0A,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0xE5,0xF8,0xFF,0xEB,0x02,0x3B,0xA0,0xE3,
+    0x0B,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x05,0x00,0xA0,0xE1,0xE0,0xF8,0xFF,0xEB,
+    0x02,0x3B,0xA0,0xE3,0x0B,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,
+    0xDB,0xF8,0xFF,0xEB,0x02,0x3B,0xA0,0xE3,0x0B,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x07,0x00,0xA0,0xE1,0xD6,0xF8,0xFF,0xEB,0x02,0x3B,0xA0,0xE3,0x0B,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x08,0x00,0xA0,0xE1,0xD1,0xF8,0xFF,0xEB,0x02,0x3B,0xA0,0xE3,
+    0x0B,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,0xCC,0xF8,0xFF,0xEB,
+    0x02,0x3B,0xA0,0xE3,0x0B,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x06,0x00,0xA0,0xE1,
+    0xC7,0xF8,0xFF,0xEB,0x02,0x3B,0xA0,0xE3,0x0B,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x0A,0x00,0xA0,0xE1,0xC2,0xF8,0xFF,0xEB,0x02,0x3B,0xA0,0xE3,0x0B,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x0B,0x00,0xA0,0xE1,0xBD,0xF8,0xFF,0xEB,0x02,0x3B,0xA0,0xE3,
+    0x0B,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x04,0x00,0xA0,0xE1,0xB8,0xF8,0xFF,0xEB,
+    0x02,0x3B,0xA0,0xE3,0x0B,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x09,0x00,0xA0,0xE1,
+    0xB3,0xF8,0xFF,0xEB,0x02,0x3B,0xA0,0xE3,0x0B,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x08,0x00,0xA0,0xE1,0xAE,0xF8,0xFF,0xEB,0x00,0x00,0xA0,0xE3,0xFE,0x8F,0xBD,0xE8,
+    0x20,0x70,0xFE,0xFC,0x24,0x70,0xFE,0xFC,0x20,0x3A,0xFE,0xFC,0xF0,0x41,0x2D,0xE9,
+    0x01,0x00,0x50,0xE3,0x02,0x70,0xA0,0xE1,0x01,0x50,0xA0,0xE1,0x00,0x40,0xA0,0xE1,
+    0x15,0x00,0x00,0x8A,0x54,0x6B,0x9F,0xE5,0x01,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x04,0x01,0x96,0xE7,0x48,0x00,0x80,0xE2,0xB3,0xF8,0xFF,0xEB,0x01,0x00,0x50,0xE3,
+    0x0D,0x00,0x00,0x1A,0x04,0x01,0x96,0xE7,0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0xAD,0xF8,0xFF,0xEB,0x05,0x00,0x50,0xE1,0x14,0x00,0x00,0x0A,0x01,0x00,0x55,0xE3,
+    0x07,0x00,0x00,0x1A,0x05,0x20,0xA0,0xE1,0x07,0x10,0xA0,0xE1,0x04,0x00,0xA0,0xE1,
+    0x49,0xFC,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x01,0x00,0x00,0xAA,0x00,0x00,0xE0,0xE3,
+    0xF0,0x81,0xBD,0xE8,0x04,0x01,0x96,0xE7,0x03,0x30,0xA0,0xE3,0x00,0x20,0xA0,0xE3,
+    0x05,0x10,0xA0,0xE1,0x8D,0xF8,0xFF,0xEB,0x04,0x01,0x96,0xE7,0x02,0x3C,0xA0,0xE3,
+    0x09,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x0C,0x00,0x80,0xE2,0x87,0xF8,0xFF,0xEB,
+    0x00,0x00,0xA0,0xE3,0xF0,0x81,0xBD,0xE8,0xF0,0x47,0x2D,0xE9,0x01,0x00,0x50,0xE3,
+    0x03,0x70,0xA0,0xE1,0x02,0x80,0xA0,0xE1,0x20,0x60,0x9D,0xE5,0x01,0x90,0xA0,0xE1,
+    0x00,0x40,0xA0,0xE1,0x71,0x00,0x00,0x8A,0x01,0x20,0xA0,0xE1,0x06,0x10,0xA0,0xE1,
+    0x2D,0xFC,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x6C,0x00,0x00,0xBA,0x01,0x20,0xA0,0xE3,
+    0x88,0x5A,0x9F,0xE5,0x00,0x10,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x48,0x00,0x80,0xE2,
+    0x81,0xF8,0xFF,0xEB,0x01,0x00,0x50,0xE3,0x64,0x00,0x00,0x1A,0x04,0x01,0x95,0xE7,
+    0x03,0x35,0xA0,0xE3,0x16,0x20,0xA0,0xE3,0x03,0x10,0xA0,0xE3,0x6B,0xF8,0xFF,0xEB,
+    0x04,0x01,0x95,0xE7,0x03,0x36,0xA0,0xE3,0x14,0x20,0xA0,0xE3,0x03,0x10,0xA0,0xE3,
+    0x66,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x03,0x37,0xA0,0xE3,0x12,0x20,0xA0,0xE3,
+    0x03,0x10,0xA0,0xE3,0x61,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x03,0x38,0xA0,0xE3,
+    0x10,0x20,0xA0,0xE3,0x03,0x10,0xA0,0xE3,0x5C,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0x03,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x03,0x10,0xA0,0xE3,0x57,0xF8,0xFF,0xEB,
+    0x04,0x01,0x95,0xE7,0x03,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,0x03,0x10,0xA0,0xE3,
+    0x52,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x03,0x3C,0xA0,0xE3,0x08,0x20,0xA0,0xE3,
+    0x03,0x10,0xA0,0xE3,0x4D,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x01,0x34,0xA0,0xE3,
+    0x18,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x48,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0x40,0x30,0xA0,0xE3,0x06,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x43,0xF8,0xFF,0xEB,
+    0x04,0x01,0x95,0xE7,0x20,0x30,0xA0,0xE3,0x05,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x3E,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x10,0x30,0xA0,0xE3,0x04,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x39,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x08,0x30,0xA0,0xE3,
+    0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x34,0xF8,0xFF,0xEB,0x06,0x20,0xA0,0xE1,
+    0x09,0x10,0xA0,0xE1,0x04,0x00,0xA0,0xE1,0x7F,0xFF,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0x07,0x38,0xA0,0xE3,0x10,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x04,0x00,0x80,0xE2,
+    0x2A,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x07,0x3C,0xA0,0xE3,0x08,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x04,0x00,0x80,0xE2,0x24,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0x00,0x20,0xA0,0xE3,0x07,0x30,0xA0,0xE3,0x02,0x10,0xA0,0xE1,0x04,0x00,0x80,0xE2,
+    0x1E,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,0xFF,0x3C,0xA0,0xE3,0x08,0x20,0xA0,0xE3,
+    0x08,0x10,0xA0,0xE1,0x08,0x00,0x80,0xE2,0x18,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0x03,0x30,0xA0,0xE3,0x00,0x20,0xA0,0xE3,0x07,0x10,0xA0,0xE1,0x08,0x00,0x80,0xE2,
+    0x12,0xF8,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x02,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x48,0x00,0x80,0xE2,0x1C,0xF8,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x01,0x00,0x00,0x0A,
+    0x00,0x00,0xE0,0xE3,0xF0,0x87,0xBD,0xE8,0x04,0x11,0x95,0xE7,0x08,0x05,0x0A,0xE3,
+    0x50,0x00,0x81,0xE5,0x04,0x11,0x95,0xE7,0xC4,0x08,0x9F,0xE5,0x68,0x00,0x81,0xE5,
+    0x00,0x00,0xA0,0xE3,0xF0,0x87,0xBD,0xE8,0x70,0x40,0x2D,0xE9,0x00,0x40,0xA0,0xE1,
+    0xA8,0x58,0x9F,0xE5,0x01,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x48,0x00,0x80,0xE2,0x08,0xF8,0xFF,0xEB,0x01,0x00,0x50,0xE3,0xF8,0xFF,0xFF,0x1A,
+    0x70,0x80,0xBD,0xE8,0x70,0x40,0x2D,0xE9,0x01,0x00,0x50,0xE3,0x01,0x60,0xA0,0xE1,
+    0x00,0x40,0xA0,0xE1,0x07,0x00,0x00,0x8A,0x01,0x20,0xA0,0xE3,0x6C,0x58,0x9F,0xE5,
+    0x00,0x10,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x48,0x00,0x80,0xE2,0xFA,0xF7,0xFF,0xEB,
+    0x01,0x00,0x50,0xE3,0x01,0x00,0x00,0x0A,0x00,0x00,0xE0,0xE3,0x70,0x80,0xBD,0xE8,
+    0x04,0x01,0x95,0xE7,0x02,0x31,0xA0,0xE3,0x1F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0xE2,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x0F,0x38,0xA0,0xE3,0x10,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0x0C,0x00,0x80,0xE2,0xDC,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0x01,0x3C,0xA0,0xE3,0x08,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x0C,0x00,0x80,0xE2,
+    0xD6,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x01,0x30,0xA0,0xE3,0x00,0x20,0xA0,0xE3,
+    0x03,0x10,0xA0,0xE1,0x0C,0x00,0x80,0xE2,0xD0,0xF7,0xFF,0xEB,0x00,0x10,0xD6,0xE5,
+    0xFF,0x38,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x10,0x20,0xA0,0xE3,0x10,0x00,0x80,0xE2,
+    0xCA,0xF7,0xFF,0xEB,0x01,0x10,0xD6,0xE5,0x03,0x31,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x1E,0x20,0xA0,0xE3,0x1C,0x00,0x80,0xE2,0xC4,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0x01,0x39,0xA0,0xE3,0x0E,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x1C,0x00,0x80,0xE2,
+    0xBE,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x00,0x20,0xA0,0xE3,0xFF,0x30,0xA0,0xE3,
+    0x02,0x10,0xA0,0xE1,0x10,0x00,0x80,0xE2,0xB8,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0x03,0x32,0xA0,0xE3,0x1C,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x1C,0x00,0x80,0xE2,
+    0xB2,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x01,0x3A,0xA0,0xE3,0x0C,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x1C,0x00,0x80,0xE2,0xAC,0xF7,0xFF,0xEB,0x0E,0x10,0xD6,0xE5,
+    0x03,0x34,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x18,0x20,0xA0,0xE3,0x1C,0x00,0x80,0xE2,
+    0xA6,0xF7,0xFF,0xEB,0x0F,0x10,0xD6,0xE5,0x0F,0x3C,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x08,0x20,0xA0,0xE3,0x1C,0x00,0x80,0xE2,0xA0,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0xFF,0x38,0xA0,0xE3,0x10,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x14,0x00,0x80,0xE2,
+    0x9A,0xF7,0xFF,0xEB,0x02,0x10,0xD6,0xE5,0xFF,0x34,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x18,0x20,0xA0,0xE3,0x18,0x00,0x80,0xE2,0x94,0xF7,0xFF,0xEB,0x03,0x10,0xD6,0xE5,
+    0xFF,0x38,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x10,0x20,0xA0,0xE3,0x18,0x00,0x80,0xE2,
+    0x8E,0xF7,0xFF,0xEB,0x04,0x10,0xD6,0xE5,0xFF,0x3C,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x08,0x20,0xA0,0xE3,0x18,0x00,0x80,0xE2,0x88,0xF7,0xFF,0xEB,0x05,0x10,0xD6,0xE5,
+    0xFF,0x30,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x00,0x20,0xA0,0xE3,0x18,0x00,0x80,0xE2,
+    0x82,0xF7,0xFF,0xEB,0x07,0x10,0xD6,0xE5,0x03,0x36,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x14,0x20,0xA0,0xE3,0x1C,0x00,0x80,0xE2,0x7C,0xF7,0xFF,0xEB,0x06,0x10,0xD6,0xE5,
+    0xF0,0x30,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x04,0x20,0xA0,0xE3,0x1C,0x00,0x80,0xE2,
+    0x76,0xF7,0xFF,0xEB,0x0B,0x10,0xD6,0xE5,0x03,0x38,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x10,0x20,0xA0,0xE3,0x1C,0x00,0x80,0xE2,0x70,0xF7,0xFF,0xEB,0x09,0x10,0xD6,0xE5,
+    0x02,0x39,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x0F,0x20,0xA0,0xE3,0x1C,0x00,0x80,0xE2,
+    0x6A,0xF7,0xFF,0xEB,0x0A,0x10,0xD6,0xE5,0x03,0x38,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x10,0x20,0xA0,0xE3,0x58,0x00,0x80,0xE2,0x64,0xF7,0xFF,0xEB,0x08,0x10,0xD6,0xE5,
+    0x07,0x30,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x00,0x20,0xA0,0xE3,0x58,0x00,0x80,0xE2,
+    0x5E,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x01,0x3C,0xA0,0xE3,0x08,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x5C,0x00,0x80,0xE2,0x58,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,
+    0x10,0x30,0xA0,0xE3,0x04,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x5C,0x00,0x80,0xE2,
+    0x52,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x00,0x20,0xA0,0xE3,0x01,0x30,0xA0,0xE3,
+    0x02,0x10,0xA0,0xE1,0x5C,0x00,0x80,0xE2,0x4C,0xF7,0xFF,0xEB,0x00,0x00,0xA0,0xE3,
+    0x70,0x80,0xBD,0xE8,0x70,0x40,0x2D,0xE9,0x01,0x00,0x50,0xE3,0x00,0x40,0xA0,0xE1,
+    0x00,0x00,0xE0,0x83,0x70,0x80,0xBD,0x88,0x01,0x34,0xA0,0xE3,0x18,0x20,0xA0,0xE3,
+    0x01,0x10,0xA0,0xE3,0xB4,0x55,0x9F,0xE5,0x04,0x01,0x95,0xE7,0x0C,0x00,0x80,0xE2,
+    0x3E,0xF7,0xFF,0xEB,0x04,0x01,0x95,0xE7,0x02,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,
+    0x48,0x00,0x80,0xE2,0x48,0xF7,0xFF,0xEB,0x00,0x00,0x50,0xE3,0xF8,0xFF,0xFF,0x1A,
+    0x70,0x80,0xBD,0xE8,0x70,0x40,0x2D,0xE9,0x00,0x40,0xA0,0xE1,0x7C,0x55,0x9F,0xE5,
+    0x02,0x21,0xA0,0xE3,0x1F,0x10,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x3E,0xF7,0xFF,0xEB,
+    0x00,0x00,0x50,0xE3,0x09,0x00,0x00,0x0A,0x04,0x00,0xA0,0xE1,0xE0,0xFF,0xFF,0xEB,
+    0x00,0x00,0x50,0xE3,0x00,0x00,0xE0,0xB3,0x70,0x80,0xBD,0xB8,0x02,0x31,0xA0,0xE3,
+    0x1F,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x04,0x01,0x95,0xE7,0x23,0xF7,0xFF,0xEB,
+    0x00,0x00,0xA0,0xE3,0x70,0x80,0xBD,0xE8,0x70,0x40,0x2D,0xE9,0x00,0x40,0xA0,0xE1,
+    0x28,0x55,0x9F,0xE5,0x02,0x21,0xA0,0xE3,0x1F,0x10,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x29,0xF7,0xFF,0xEB,0x01,0x00,0x50,0xE3,0x09,0x00,0x00,0x0A,0x04,0x00,0xA0,0xE1,
+    0xCB,0xFF,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x00,0x00,0xE0,0xB3,0x70,0x80,0xBD,0xB8,
+    0x02,0x31,0xA0,0xE3,0x1F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x04,0x01,0x95,0xE7,
+    0x0E,0xF7,0xFF,0xEB,0x00,0x00,0xA0,0xE3,0x70,0x80,0xBD,0xE8,0xF0,0x41,0x2D,0xE9,
+    0x01,0x00,0x50,0xE3,0x01,0x40,0xA0,0xE1,0x00,0x50,0xA0,0xE1,0x19,0x00,0x00,0x8A,
+    0x02,0x21,0xA0,0xE3,0xC4,0x64,0x9F,0xE5,0x1F,0x10,0xA0,0xE3,0x05,0x01,0x96,0xE7,
+    0x11,0xF7,0xFF,0xEB,0x01,0x00,0x50,0xE3,0x0B,0x00,0x00,0x0A,0x05,0x01,0x96,0xE7,
+    0x02,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0x48,0x00,0x80,0xE2,0x0A,0xF7,0xFF,0xEB,
+    0x00,0x00,0x50,0xE3,0x0B,0x00,0x00,0x1A,0x05,0x01,0x96,0xE7,0x02,0x31,0xA0,0xE3,
+    0x1F,0x20,0xA0,0xE3,0x01,0x10,0xA0,0xE3,0xF4,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,
+    0x01,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x48,0x00,0x80,0xE2,0xFE,0xF6,0xFF,0xEB,
+    0x01,0x00,0x50,0xE3,0x01,0x00,0x00,0x0A,0x00,0x00,0xE0,0xE3,0xF0,0x81,0xBD,0xE8,
+    0x05,0x01,0x96,0xE7,0x01,0x39,0xA0,0xE3,0x14,0x10,0x94,0xE5,0x0E,0x20,0xA0,0xE3,
+    0x30,0x00,0x80,0xE2,0xE5,0xF6,0xFF,0xEB,0x14,0x00,0x94,0xE5,0x00,0x00,0x50,0xE3,
+    0x0B,0x00,0x00,0x0A,0x05,0x01,0x96,0xE7,0x46,0x10,0xD4,0xE5,0xFF,0x38,0xA0,0xE3,
+    0x24,0x00,0x80,0xE2,0x10,0x20,0xA0,0xE3,0xDC,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,
+    0x03,0x31,0xA0,0xE3,0x00,0x10,0x94,0xE5,0x1E,0x20,0xA0,0xE3,0x30,0x00,0x80,0xE2,
+    0xD6,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,0x01,0x3A,0xA0,0xE3,0x18,0x10,0x94,0xE5,
+    0x0C,0x20,0xA0,0xE3,0x30,0x00,0x80,0xE2,0xD0,0xF6,0xFF,0xEB,0x18,0x00,0x94,0xE5,
+    0x00,0x00,0x50,0xE3,0x0B,0x00,0x00,0x0A,0x05,0x01,0x96,0xE7,0x47,0x10,0xD4,0xE5,
+    0xFF,0x30,0xA0,0xE3,0x24,0x00,0x80,0xE2,0x00,0x20,0xA0,0xE3,0xC7,0xF6,0xFF,0xEB,
+    0x05,0x01,0x96,0xE7,0x03,0x32,0xA0,0xE3,0x04,0x10,0x94,0xE5,0x1C,0x20,0xA0,0xE3,
+    0x30,0x00,0x80,0xE2,0xC1,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,0x0F,0x3C,0xA0,0xE3,
+    0x1C,0x10,0x94,0xE5,0x08,0x20,0xA0,0xE3,0x30,0x00,0x80,0xE2,0xBB,0xF6,0xFF,0xEB,
+    0x1C,0x00,0x94,0xE5,0x00,0x00,0x50,0xE3,0x0B,0x00,0x00,0x0A,0x05,0x01,0x96,0xE7,
+    0x48,0x10,0x94,0xE5,0x00,0x30,0xE0,0xE3,0x00,0x20,0xA0,0xE3,0x28,0x00,0x80,0xE2,
+    0xB2,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,0x03,0x34,0xA0,0xE3,0x08,0x10,0x94,0xE5,
+    0x18,0x20,0xA0,0xE3,0x30,0x00,0x80,0xE2,0xAC,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,
+    0xF0,0x30,0xA0,0xE3,0x20,0x10,0x94,0xE5,0x04,0x20,0xA0,0xE3,0x30,0x00,0x80,0xE2,
+    0xA6,0xF6,0xFF,0xEB,0x20,0x00,0x94,0xE5,0x00,0x00,0x50,0xE3,0x1D,0x00,0x00,0x0A,
+    0x05,0x01,0x96,0xE7,0x4C,0x10,0xD4,0xE5,0xFF,0x34,0xA0,0xE3,0x2C,0x00,0x80,0xE2,
+    0x18,0x20,0xA0,0xE3,0x9D,0xF6,0xFF,0xEB,0x4D,0x10,0xD4,0xE5,0xFF,0x38,0xA0,0xE3,
+    0x05,0x01,0x96,0xE7,0x10,0x20,0xA0,0xE3,0x2C,0x00,0x80,0xE2,0x97,0xF6,0xFF,0xEB,
+    0x4E,0x10,0xD4,0xE5,0xFF,0x3C,0xA0,0xE3,0x05,0x01,0x96,0xE7,0x08,0x20,0xA0,0xE3,
+    0x2C,0x00,0x80,0xE2,0x91,0xF6,0xFF,0xEB,0x4F,0x10,0xD4,0xE5,0xFF,0x30,0xA0,0xE3,
+    0x05,0x01,0x96,0xE7,0x00,0x20,0xA0,0xE3,0x2C,0x00,0x80,0xE2,0x8B,0xF6,0xFF,0xEB,
+    0x05,0x01,0x96,0xE7,0x03,0x36,0xA0,0xE3,0x0C,0x10,0x94,0xE5,0x14,0x20,0xA0,0xE3,
+    0x30,0x00,0x80,0xE2,0x85,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,0x02,0x39,0xA0,0xE3,
+    0x34,0x10,0x94,0xE5,0x0F,0x20,0xA0,0xE3,0x30,0x00,0x80,0xE2,0x7F,0xF6,0xFF,0xEB,
+    0x34,0x00,0x94,0xE5,0x00,0x00,0x50,0xE3,0x0B,0x00,0x00,0x0A,0x05,0x01,0x96,0xE7,
+    0x44,0x10,0xD4,0xE5,0x03,0x38,0xA0,0xE3,0x60,0x00,0x80,0xE2,0x10,0x20,0xA0,0xE3,
+    0x76,0xF6,0xFF,0xEB,0x45,0x10,0xD4,0xE5,0x07,0x30,0xA0,0xE3,0x05,0x01,0x96,0xE7,
+    0x00,0x20,0xA0,0xE3,0x60,0x00,0x80,0xE2,0x70,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,
+    0x0F,0x30,0xA0,0xE3,0x24,0x10,0x94,0xE5,0x00,0x20,0xA0,0xE3,0x30,0x00,0x80,0xE2,
+    0x6A,0xF6,0xFF,0xEB,0x24,0x00,0x94,0xE5,0x58,0x72,0x9F,0xE5,0x00,0x00,0x50,0xE3,
+    0x2C,0x00,0x00,0x0A,0x08,0x00,0x50,0xE3,0x04,0x00,0x00,0x0A,0x0C,0x00,0x50,0xE3,
+    0x0C,0x00,0x00,0x0A,0x0F,0x00,0x50,0xE3,0x14,0x00,0x00,0x0A,0x1F,0x00,0x00,0xEA,
+    0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x6A,0xF6,0xFF,0xEB,
+    0x00,0x00,0x50,0xE3,0x58,0x00,0xD4,0x05,0x05,0x11,0x96,0x07,0x40,0x00,0xC1,0x05,
+    0x06,0x00,0x00,0x1A,0x15,0x00,0x00,0xEA,0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x07,0x00,0xA0,0xE1,0x60,0xF6,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x53,0x00,0x00,0x1A,
+    0x05,0x11,0x96,0xE7,0xB8,0x05,0xD4,0xE1,0xB0,0x04,0xC1,0xE1,0x0B,0x00,0x00,0xEA,
+    0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x56,0xF6,0xFF,0xEB,
+    0x00,0x00,0x50,0xE3,0x49,0x00,0x00,0x0A,0x05,0x11,0x96,0xE7,0x58,0x00,0x94,0xE5,
+    0x40,0x00,0x81,0xE5,0x05,0x01,0x96,0xE7,0x5C,0x10,0x94,0xE5,0x44,0x10,0x80,0xE5,
+    0x03,0x38,0xA0,0xE3,0x05,0x01,0x96,0xE7,0x10,0x20,0xA0,0xE3,0x10,0x10,0x94,0xE5,
+    0x30,0x00,0x80,0xE2,0x39,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,0x01,0x3C,0xA0,0xE3,
+    0x28,0x10,0x94,0xE5,0x08,0x20,0xA0,0xE3,0x20,0x00,0x80,0xE2,0x33,0xF6,0xFF,0xEB,
+    0x10,0x00,0x94,0xE5,0x00,0x00,0x50,0xE3,0x24,0x00,0x94,0x15,0x00,0x00,0x50,0x13,
+    0x04,0x00,0x00,0x0A,0x2C,0x00,0x94,0xE5,0x01,0x00,0x50,0xE3,0x30,0x00,0x94,0x05,
+    0x01,0x00,0x50,0x03,0x3B,0xFF,0xFF,0x0A,0x05,0x01,0x96,0xE7,0x2C,0x10,0x94,0xE5,
+    0x04,0x30,0xA0,0xE3,0x02,0x20,0xA0,0xE3,0x20,0x00,0x80,0xE2,0x23,0xF6,0xFF,0xEB,
+    0x05,0x01,0x96,0xE7,0x02,0x30,0xA0,0xE3,0x30,0x10,0x94,0xE5,0x01,0x20,0xA0,0xE3,
+    0x20,0x00,0x80,0xE2,0x1D,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,0x01,0x3C,0xA0,0xE3,
+    0x38,0x10,0x94,0xE5,0x08,0x20,0xA0,0xE3,0x64,0x00,0x80,0xE2,0x17,0xF6,0xFF,0xEB,
+    0x05,0x01,0x96,0xE7,0x10,0x30,0xA0,0xE3,0x3C,0x10,0x94,0xE5,0x04,0x20,0xA0,0xE3,
+    0x64,0x00,0x80,0xE2,0x11,0xF6,0xFF,0xEB,0x05,0x01,0x96,0xE7,0x01,0x30,0xA0,0xE3,
+    0x40,0x10,0x94,0xE5,0x00,0x20,0xA0,0xE3,0x64,0x00,0x80,0xE2,0x0B,0xF6,0xFF,0xEB,
+    0x05,0x01,0x96,0xE7,0x01,0x30,0xA0,0xE3,0x00,0x20,0xA0,0xE3,0x03,0x10,0xA0,0xE1,
+    0x20,0x00,0x80,0xE2,0x05,0xF6,0xFF,0xEB,0x05,0x00,0xA0,0xE1,0xAD,0xF9,0xFF,0xEB,
+    0x24,0x00,0x94,0xE5,0x08,0x00,0x50,0xE3,0x08,0x00,0x00,0x0A,0x0C,0x00,0x50,0xE3,
+    0x11,0x00,0x00,0x0A,0x0F,0x00,0x50,0xE3,0x16,0x00,0x00,0x0A,0x21,0x00,0x00,0xEA,
+    0x05,0x11,0x96,0xE7,0x58,0x00,0x94,0xE5,0x40,0x00,0x81,0xE5,0xB7,0xFF,0xFF,0xEA,
+    0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0x02,0xF6,0xFF,0xEB,
+    0x00,0x00,0x50,0xE3,0x05,0x01,0x96,0x07,0x38,0x00,0xD0,0x05,0x19,0x00,0x00,0x0A,
+    0x05,0x01,0x96,0xE7,0xB8,0x03,0xD0,0xE1,0x16,0x00,0x00,0xEA,0x03,0x20,0xA0,0xE3,
+    0x00,0x10,0xA0,0xE3,0x07,0x00,0xA0,0xE1,0xF7,0xF5,0xFF,0xEB,0x00,0x00,0x50,0xE3,
+    0x0E,0x00,0x00,0x1A,0xF5,0xFF,0xFF,0xEA,0x03,0x20,0xA0,0xE3,0x00,0x10,0xA0,0xE3,
+    0x07,0x00,0xA0,0xE1,0xF0,0xF5,0xFF,0xEB,0x00,0x00,0x50,0xE3,0x07,0x00,0x00,0x0A,
+    0x05,0x01,0x96,0xE7,0x38,0x00,0x90,0xE5,0x50,0x00,0x84,0xE5,0x05,0x01,0x96,0xE7,
+    0x3C,0x00,0x90,0xE5,0x54,0x00,0x84,0xE5,0x00,0x00,0xA0,0xE3,0xF0,0x81,0xBD,0xE8,
+    0x05,0x01,0x96,0xE7,0x38,0x00,0x90,0xE5,0x50,0x00,0x84,0xE5,0xF9,0xFF,0xFF,0xEA,
+    0x8C,0x2A,0x02,0x20,0x63,0x63,0x00,0xA5,0x00,0xA0,0xEF,0x3F,0xF0,0x40,0x2D,0xE9,
+    0xEB,0xC0,0xA0,0xE3,0x00,0xC0,0xC1,0xE5,0x08,0x70,0xA0,0xE3,0x06,0x70,0xC1,0xE5,
+    0x03,0x60,0xA0,0xE3,0x08,0x60,0xC1,0xE5,0x55,0x50,0xA0,0xE3,0x02,0x50,0xC1,0xE5,
+    0x01,0x40,0xA0,0xE3,0x09,0x40,0xC1,0xE5,0x02,0x30,0xA0,0xE3,0x0E,0x30,0xC1,0xE5,
+    0x00,0x20,0xA0,0xE3,0x07,0x30,0xC1,0xE5,0x00,0x00,0x50,0xE3,0x0B,0x30,0xC1,0xE5,
+    0x07,0x00,0xA0,0xE3,0x01,0x20,0xC1,0xE5,0x03,0x20,0xC1,0xE5,0x04,0x20,0xC1,0xE5,
+    0x05,0x20,0xC1,0xE5,0x0A,0x20,0xC1,0xE5,0x0C,0x40,0xC1,0x05,0x0C,0x30,0xC1,0x15,
+    0x0D,0x20,0xC1,0xE5,0x0F,0x00,0xC1,0xE5,0xF0,0x80,0xBD,0xE8,0x00,0xA0,0xEF,0x3F,
+    0x00,0xB0,0xEF,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0x5C,0x00,0x9F,0xE5,0x01,0x10,0xA0,0xE3,0x00,0x10,0x80,0xE5,0x00,0x00,0x90,0xE5,
+    0x50,0x00,0x9F,0xE5,0x35,0x10,0x01,0xE3,0xB0,0x10,0xC0,0xE1,0x00,0x00,0x90,0xE5,
+    0x44,0x00,0x9F,0xE5,0x01,0x10,0xA0,0xE3,0xB0,0x10,0xC0,0xE1,0x00,0x00,0x90,0xE5,
+    0x10,0x0F,0x11,0xEE,0x02,0x0A,0xC0,0xE3,0x01,0x0A,0xC0,0xE3,0x04,0x00,0xC0,0xE3,
+    0x01,0x00,0xC0,0xE3,0x10,0x0F,0x01,0xEE,0x26,0x00,0x00,0xEB,0x1C,0xD0,0x9F,0xE5,
+    0x14,0x00,0x00,0xEB,0x0D,0x00,0x00,0xEB,0x0E,0x00,0x00,0xEB,0x0F,0x00,0x00,0xEB,
+    0xFE,0xFF,0xFF,0xEA,0x80,0xFF,0xFF,0x3F,0x10,0x00,0xFE,0xFC,0x14,0x00,0xFE,0xFC,
+    0x00,0x00,0x03,0x20,0xFE,0xFF,0xFF,0xEA,0xFE,0xFF,0xFF,0xEA,0xFE,0xFF,0xFF,0xEA,
+    0xFE,0xFF,0xFF,0xEA,0xFE,0xFF,0xFF,0xEA,0xFE,0xFF,0xFF,0xEA,0xFE,0xFF,0xFF,0xEA,
+    0x04,0xF0,0x1F,0xE5,0x40,0x00,0x02,0x20,0x04,0xF0,0x1F,0xE5,0x00,0x00,0x02,0x20,
+    0x04,0xF0,0x1F,0xE5,0x04,0x02,0x02,0x20,0x2C,0x30,0x9F,0xE5,0x00,0x20,0xA0,0xE3,
+    0x28,0x10,0x9F,0xE5,0x28,0x00,0x9F,0xE5,0x10,0x40,0x2D,0xE9,0x23,0x31,0xA0,0xE1,
+    0x02,0x00,0x00,0xEA,0x04,0x40,0x91,0xE4,0x01,0x20,0x82,0xE2,0x04,0x40,0x80,0xE4,
+    0x03,0x00,0x52,0xE1,0xFA,0xFF,0xFF,0xBA,0x10,0x80,0xBD,0xE8,0xAF,0x01,0x00,0x00,
+    0x00,0x02,0x00,0x18,0x00,0x00,0x02,0x20,0x04,0x00,0x9F,0xE5,0x10,0x0F,0x0C,0xEE,
+    0x1E,0xFF,0x2F,0xE1,0x00,0x00,0x00,0x18,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+};
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tPutLogGRPeach.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tPutLogGRPeach.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tPutLogGRPeach.c	(revision 270)
@@ -0,0 +1,86 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºå
+ */
+
+#include "tPutLogGRPeach_tecsgen.h"
+
+/*
+ *  ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºåã®ããã®åæå
+ *
+ *  åæåã«ã¼ãã³ãå¼ã³åºãããåã«åæåããããã«ï¼ã«ã¼ãã«ã®ã¿ã¼ã²ã
+ *  ãä¾å­é¨ããç´æ¥å¼ã³åºãããã®é¢æ°ï¼
+ */
+void
+tPutLogGRPeach_initialize(void)
+{
+	cSIOPort_open();
+}
+
+/*
+ *  ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºåã®ããã®æå­åºåï¼åãå£é¢æ°ï¼
+ *
+ *  SIOãã¼ãã«æå­ãéä¿¡ã§ããã¾ã§ãã¼ãªã³ã°ããï¼
+ */
+void
+ePutLog_putChar(char c)
+{
+	if(c == '\n'){
+		while(!cSIOPort_putChar('\r'));
+	}
+	while(!cSIOPort_putChar(c));
+}
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tPutLogGRPeach.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tPutLogGRPeach.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tPutLogGRPeach.cdl	(revision 270)
@@ -0,0 +1,69 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºåã®ã³ã³ãã¼ãã³ãè¨è¿°
+ */
+
+/*
+ *  ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºåã®ã»ã«ã¿ã¤ã
+ */
+[singleton]
+celltype tPutLogGRPeach {
+	entry	sPutLog		ePutLog;
+	call	sSIOPort	cSIOPort;
+};
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tSIOPortGRPeach.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tSIOPortGRPeach.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tSIOPortGRPeach.cdl	(revision 270)
@@ -0,0 +1,244 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨ï¼GR-PEACHç¨ï¼
+ *		ã®ã³ã³ãã¼ãã³ãè¨è¿°
+ */
+
+/*
+ *  GR-PEACHã¨RZ/A1ã«é¢ããå®ç¾©
+ */
+import_C("gr_peach.h");
+import_C("rza1.h");
+
+/*
+ *  FIFOå
+èµã·ãªã¢ã«ã³ãã¥ãã±ã¼ã·ã§ã³ã¤ã³ã¿ãã§ã¼ã¹ç¨ ç°¡æSIOãã©ã¤ã
+ */
+import("tSCIF.cdl");
+
+/*
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨ã®æ¬ä½ï¼ã·ãªã¢ã«ã¤
+ *  ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã¨SIOãã©ã¤ããæ¥ç¶ããé¨åï¼ã®ã»ã«ã¿ã¤ã
+ */
+celltype tSIOPortGRPeachMain {
+	/*
+	 *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã¨ã®çµå
+	 */
+	[inline] entry		sSIOPort	eSIOPort;
+	[optional] call		siSIOCBR	ciSIOCBR;
+
+	/*
+	 *  SIOãã©ã¤ãã¨ã®çµå
+	 */
+	call			sSIOPort	cSIOPort;
+	[inline] entry	siSIOCBR	eiSIOCBR;
+
+	/*
+	 *  å²è¾¼ã¿è¦æ±ã©ã¤ã³æä½ã®ããã®çµå
+	 */
+	call	sInterruptRequest	cRxInterruptRequest;
+	call	sInterruptRequest	cTxInterruptRequest;
+};
+
+/*
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨ï¼è¤åã³ã³ãã¼ãã³
+ *  ãï¼ã®ã»ã«ã¿ã¤ã
+ */
+[active]
+composite tSIOPortGRPeach {
+	/*
+	 *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã¨ã®çµå
+	 */
+	entry				sSIOPort	eSIOPort;
+	[optional] call		siSIOCBR	ciSIOCBR;
+
+	/*
+	 *  å±æ§ã®å®ç¾©
+	 */
+	attr {
+		uintptr_t	baseAddress;				/* ãã¼ã¹ã¢ãã¬ã¹ */
+		INTNO		rxInterruptNumber;			/* åä¿¡å²è¾¼ã¿çªå· */
+		INTNO		txInterruptNumber;			/* éä¿¡å²è¾¼ã¿çªå· */
+		PRI			isrPriority = 1;			/* ISRåªå
+åº¦ */
+		PRI			interruptPriority = -4;		/* å²è¾¼ã¿åªå
+åº¦ */
+		uint32_t	baudRate = 115200;			/* ãã¼ã¬ã¼ãã®è¨­å®å¤ */
+	};
+
+	/*
+	 *  SIOãã©ã¤ã
+	 */
+	cell tSCIF SCIF {
+		baseAddress = composite.baseAddress;
+		baudRate    = composite.baudRate;
+		ciSIOCBR    = SIOPortMain.eiSIOCBR;
+	};
+
+	/*
+	 *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨ã®æ¬ä½
+	 */
+	cell tSIOPortGRPeachMain SIOPortMain {
+		ciSIOCBR            => composite.ciSIOCBR;
+		cSIOPort            = SCIF.eSIOPort;
+		cRxInterruptRequest = RxInterruptRequest.eInterruptRequest;
+		cTxInterruptRequest = TxInterruptRequest.eInterruptRequest;
+	};
+	composite.eSIOPort => SIOPortMain.eSIOPort;
+
+	/*
+	 *  SIOã®åä¿¡å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã¨å²è¾¼ã¿è¦æ±ã©ã¤ã³
+	 */
+	cell tISR RxISRInstance {
+		interruptNumber = composite.rxInterruptNumber;
+		isrPriority     = composite.isrPriority;
+		ciISRBody       = SCIF.eiRxISR;
+	};
+	cell tInterruptRequest RxInterruptRequest {
+		interruptNumber   = composite.rxInterruptNumber;
+		interruptPriority = composite.interruptPriority;
+	};
+
+	/*
+	 *  SIOã®åä¿¡å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã¨å²è¾¼ã¿è¦æ±ã©ã¤ã³
+	 */
+	cell tISR TxISRInstance {
+		interruptNumber = composite.txInterruptNumber;
+		isrPriority     = composite.isrPriority;
+		ciISRBody       = SCIF.eiTxISR;
+	};
+	cell tInterruptRequest TxInterruptRequest {
+		interruptNumber   = composite.txInterruptNumber;
+		interruptPriority = composite.interruptPriority;
+	};
+};
+
+/*
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨ã®ãã­ãã¿ã¤ã
+ *
+ *  ãµã³ãã«ãã­ã°ã©ã ãä½¿ããã¼ããï¼SIOPortTarget1ã«åºå®ããã¦ããã
+ *  ãï¼ãã¼ã1ã¨ãã¼ã3ãå
+¥ãæãã¦ããï¼å
+·ä½çã«ã¯ï¼SIOPortTarget1ã¯
+ *  SCIFã®ãã£ãã«2ï¼ãã£ãã«çªå·ã¯0ããå§ã¾ãã®ã§ï¼ãã¼ã3ã®ãã¨ï¼ã«ï¼
+ *  SIOPortTarget3ã¯SCIFã®ãã£ãã«0ã«ã¤ãªãã£ã¦ããï¼
+ */
+[prototype]
+cell tSIOPortGRPeach SIOPortTarget1 {
+	/* å±æ§ã®è¨­å® */
+	baseAddress       = C_EXP("SCIF2_BASE");
+	rxInterruptNumber = C_EXP("INTNO_SCIF2_RXI");
+	txInterruptNumber = C_EXP("INTNO_SCIF2_TXI");
+};
+
+[prototype]
+cell tSIOPortGRPeach SIOPortTarget2 {
+	/* å±æ§ã®è¨­å® */
+	baseAddress       = C_EXP("SCIF1_BASE");
+	rxInterruptNumber = C_EXP("INTNO_SCIF1_RXI");
+	txInterruptNumber = C_EXP("INTNO_SCIF1_TXI");
+};
+
+[prototype]
+cell tSIOPortGRPeach SIOPortTarget3 {
+	/* å±æ§ã®è¨­å® */
+	baseAddress       = C_EXP("SCIF0_BASE");
+	rxInterruptNumber = C_EXP("INTNO_SCIF0_RXI");
+	txInterruptNumber = C_EXP("INTNO_SCIF0_TXI");
+};
+
+[prototype]
+cell tSIOPortGRPeach SIOPortTarget4 {
+	/* å±æ§ã®è¨­å® */
+	baseAddress       = C_EXP("SCIF3_BASE");
+	rxInterruptNumber = C_EXP("INTNO_SCIF3_RXI");
+	txInterruptNumber = C_EXP("INTNO_SCIF3_TXI");
+};
+
+[prototype]
+cell tSIOPortGRPeach SIOPortTarget5 {
+	/* å±æ§ã®è¨­å® */
+	baseAddress       = C_EXP("SCIF4_BASE");
+	rxInterruptNumber = C_EXP("INTNO_SCIF4_RXI");
+	txInterruptNumber = C_EXP("INTNO_SCIF4_TXI");
+};
+
+[prototype]
+cell tSIOPortGRPeach SIOPortTarget6 {
+	/* å±æ§ã®è¨­å® */
+	baseAddress       = C_EXP("SCIF5_BASE");
+	rxInterruptNumber = C_EXP("INTNO_SCIF5_RXI");
+	txInterruptNumber = C_EXP("INTNO_SCIF5_TXI");
+};
+
+[prototype]
+cell tSIOPortGRPeach SIOPortTarget7 {
+	/* å±æ§ã®è¨­å® */
+	baseAddress       = C_EXP("SCIF6_BASE");
+	rxInterruptNumber = C_EXP("INTNO_SCIF6_RXI");
+	txInterruptNumber = C_EXP("INTNO_SCIF6_TXI");
+};
+
+[prototype]
+cell tSIOPortGRPeach SIOPortTarget8 {
+	/* å±æ§ã®è¨­å® */
+	baseAddress       = C_EXP("SCIF7_BASE");
+	rxInterruptNumber = C_EXP("INTNO_SCIF7_RXI");
+	txInterruptNumber = C_EXP("INTNO_SCIF7_TXI");
+};
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tSIOPortGRPeachMain_inline.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tSIOPortGRPeachMain_inline.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tSIOPortGRPeachMain_inline.h	(revision 270)
@@ -0,0 +1,170 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨ï¼GR-PEACHç¨ï¼
+ */
+
+/*
+ *  SIOãã¼ãã®ãªã¼ãã³
+ */
+Inline void
+eSIOPort_open(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+
+	/*
+	 *  ããã¤ã¹ä¾å­ã®ãªã¼ãã³å¦ç
+	 */
+	cSIOPort_open();
+
+	/*
+	 *  SIOã®å²è¾¼ã¿ãã¹ã¯ãè§£é¤ããï¼
+	 */
+	cRxInterruptRequest_enable();
+	cTxInterruptRequest_enable();
+}
+
+/*
+ *  SIOãã¼ãã®ã¯ã­ã¼ãº
+ */
+Inline void
+eSIOPort_close(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+
+	/*
+	 *  ããã¤ã¹ä¾å­ã®ã¯ã­ã¼ãºå¦ç
+	 */
+	cSIOPort_close();
+
+	/*
+	 *  SIOã®å²è¾¼ã¿ããã¹ã¯ããï¼
+	 */
+	cRxInterruptRequest_disable();
+	cTxInterruptRequest_disable();
+}
+
+/*
+ *  SIOãã¼ãã¸ã®æå­éä¿¡
+ */
+Inline bool_t
+eSIOPort_putChar(CELLIDX idx, char c)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+
+	return(cSIOPort_putChar(c));
+}
+
+/*
+ *  SIOãã¼ãããã®æå­åä¿¡
+ */
+Inline int_t
+eSIOPort_getChar(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+
+	return(cSIOPort_getChar());
+}
+
+/*
+ *  SIOãã¼ãããã®ã³ã¼ã«ããã¯ã®è¨±å¯
+ */
+Inline void
+eSIOPort_enableCBR(CELLIDX idx, uint_t cbrtn)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+
+	cSIOPort_enableCBR(cbrtn);
+}
+
+/*
+ *  SIOãã¼ãããã®ã³ã¼ã«ããã¯ã®ç¦æ­¢
+ */
+Inline void
+eSIOPort_disableCBR(CELLIDX idx, uint_t cbrtn)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+
+	cSIOPort_disableCBR(cbrtn);
+}
+
+/*
+ *  SIOãã¼ãããã®éä¿¡å¯è½ã³ã¼ã«ããã¯
+ */
+Inline void
+eiSIOCBR_readySend(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+
+	if (is_ciSIOCBR_joined()) {
+		ciSIOCBR_readySend();
+	}
+}
+
+/*
+ *  SIOãã¼ãããã®åä¿¡éç¥ã³ã¼ã«ããã¯
+ */
+Inline void
+eiSIOCBR_readyReceive(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	
+	if (is_ciSIOCBR_joined()) {
+		ciSIOCBR_readyReceive();
+	}
+}
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target.cdl	(revision 270)
@@ -0,0 +1,92 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *  ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãºã®ããã©ã«ã
+ */
+const size_t DefaultTaskStackSize = 4096;		/* ã¹ã¿ãã¯ãµã¤ãºï¼4KBï¼*/
+
+/*
+ *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãºã®å®ç¾©
+ */
+const size_t LogTaskStackSize = DefaultTaskStackSize;
+
+/*
+ *  ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã«é¢ããå®ç¾©
+ */
+const char *const BannerTargetName = "GR-PEACH";		/* ã¿ã¼ã²ããå */
+const char *const BannerCopyrightNotice = "";			/* èä½æ¨©è¡¨ç¤º */
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®ã»ã«ã¿ã¤ãã®å®ç¾©
+ */
+import("tPutLogGRPeach.cdl");
+import("tSIOPortGRPeach.cdl");
+
+/*
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨ã®çµã¿ä¸ãè¨è¿°
+ */
+cell tSIOPortGRPeach SIOPortTarget1 {
+};
+
+/*
+ *  ä½ã¬ãã«åºåã®çµã¿ä¸ãè¨è¿°
+ */
+cell tPutLogGRPeach PutLogTarget {
+	/* SIOãã©ã¤ãã¨ã®çµå */
+	cSIOPort = SIOPortTarget1.eSIOPort;
+};
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_cfg1_out.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_cfg1_out.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_cfg1_out.h	(revision 270)
@@ -0,0 +1,11 @@
+/*
+ *		cfg1_out.cããªã³ã¯ããããã«å¿
+è¦ãªã¹ã¿ãã®å®ç¾©
+ *
+ *  $Id$
+ */
+
+/*
+ *  ã³ã¢ä¾å­ã®ã¹ã¿ãã®å®ç¾©ï¼ãããä¾å­é¨ã¯é£ã°ãï¼
+ */
+#include "core_cfg1_out.h"
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_check.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_check.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_check.trb	(revision 270)
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+#
+#		ãã¹3ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨ï¼GR-PEACHç¨ï¼
+#
+
+#
+#  çæã¹ã¯ãªããã®ã³ã¢ä¾å­é¨ï¼ãããä¾å­é¨ã¯é£ã°ãï¼
+#
+IncludeTrb("core_check.trb")
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_kernel.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_kernel.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_kernel.cfg	(revision 270)
@@ -0,0 +1,7 @@
+/*
+ *		ã«ã¼ãã«å®è£
+ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ *
+ *  $Id$
+ */
+INCLUDE("target_timer.cfg")
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_kernel.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_kernel.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_kernel.h	(revision 270)
@@ -0,0 +1,73 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ *
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+/*
+ *		kernel.hã®ã¿ã¼ã²ããä¾å­é¨ï¼GR-PEACHç¨ï¼
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼kernel.hããã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡ã¤ã«
+ *  ããç´æ¥ã¤ã³ã¯ã«ã¼ããããã¨ã¯ãªãï¼ãã®ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ããã
+ *  åã«ï¼t_stddef.hãã¤ã³ã¯ã«ã¼ããããã®ã§ï¼ããã«ä¾å­ãã¦ãããï¼
+ */
+
+#ifndef TOPPERS_TARGET_KERNEL_H
+#define TOPPERS_TARGET_KERNEL_H
+
+/*
+ *  ãããã§å
+±éãªå®ç¾©
+ */
+#include "chip_kernel.h"
+
+#endif /* TOPPERS_TARGET_KERNEL_H */
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_kernel.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_kernel.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_kernel.trb	(revision 270)
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+#
+#		ãã¹2ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨ï¼GR-PEACHç¨ï¼
+#
+
+#
+#  çæã¹ã¯ãªããã®ãããä¾å­é¨
+#
+IncludeTrb("chip_kernel.trb")
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_kernel_impl.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_kernel_impl.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_kernel_impl.c	(revision 270)
@@ -0,0 +1,370 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ *
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+/*
+ *		ã«ã¼ãã«ã®ã¿ã¼ã²ããä¾å­é¨ï¼GR-PEACHç¨ï¼
+ */
+
+#include "kernel_impl.h"
+#include <sil.h>
+#include "arm.h"
+#include "rza1.h"
+#include "scif.h"
+#include "core_pl310.h"
+#include "us_ticker_api.h"
+
+/*
+ *  ã«ã¼ãã«åä½æã®ã¡ã¢ãªãããã¨é¢é£ããå®ç¾©
+ *
+ *  0x18000000 - 0x1fffffffï¼ã·ãªã¢ã«ãã©ãã·ã¥ã¡ã¢ãªï¼128MBï¼
+ *  0x20000000 - 0x209fffffï¼å
+èµSRAMï¼10MBï¼
+ *  0x3fe00000 - 0x3fffffffï¼I/Oé åï¼2MBï¼ï¼äºç´é åãå«ã
+ *  0xe8000000 - 0xffffffffï¼I/Oé åï¼384MBï¼ï¼äºç´é åãå«ã
+ */
+
+/*
+ *  MMUã¸ã®è¨­å®å±æ§ï¼ç¬¬1ã¬ãã«ãã£ã¹ã¯ãªãã¿ï¼
+ */
+#define MMU_ATTR_RAM	(ARM_MMU_DSCR1_SHARED|ARMV6_MMU_DSCR1_APX0 \
+							|ARM_MMU_DSCR1_TEX001|ARM_MMU_DSCR1_AP11 \
+							|ARM_MMU_DSCR1_CB11)
+#define MMU_ATTR_IODEV	(ARM_MMU_DSCR1_SHARED|ARMV6_MMU_DSCR1_APX0 \
+							|ARM_MMU_DSCR1_TEX000|ARM_MMU_DSCR1_AP11 \
+							|ARM_MMU_DSCR1_CB01|ARMV6_MMU_DSCR1_NOEXEC)
+/*
+ *  MMUã®è¨­å®æ
+å ±ï¼ã¡ã¢ãªã¨ãªã¢ã®æ
+å ±ï¼
+ */
+ARM_MMU_CONFIG arm_memory_area[] = {
+	{ SPI_ADDR, SPI_ADDR, SPI_SIZE, MMU_ATTR_RAM },
+	{ SRAM_ADDR, SRAM_ADDR, SRAM_SIZE, MMU_ATTR_RAM },
+	{ IO1_ADDR, IO1_ADDR, IO1_SIZE, MMU_ATTR_IODEV },
+	{ IO2_ADDR, IO2_ADDR, IO2_SIZE, MMU_ATTR_IODEV }
+};
+
+/*
+ *  MMUã®è¨­å®æ
+å ±ã®æ°ï¼ã¡ã¢ãªã¨ãªã¢ã®æ°ï¼
+ */
+const uint_t arm_tnum_memory_area
+					= sizeof(arm_memory_area) / sizeof(ARM_MMU_CONFIG);
+
+/*
+ *  ä½æ¶è²»é»åã¢ã¼ãã®åæå
+ */
+static void
+lowpower_initialize(void)
+{
+	/* ã¹ã¿ã³ãã¤ã¢ã¼ãæã«ç«¯å­ç¶æ
+ãç¶­æããï¼CoreSightåä½ */
+	sil_wrb_mem(RZA1_STBCR2, 0x6a);
+	(void) sil_reb_mem(RZA1_STBCR2);		/* ããã¼ãªã¼ã */
+
+	/* IEBus, irDA, LIN0, LIN1, MTU2, RSCAN2, ASC, PWMåä½ */
+	sil_wrb_mem(RZA1_STBCR3, 0x00);
+	(void) sil_reb_mem(RZA1_STBCR3);		/* ããã¼ãªã¼ã */
+
+	/* SCIF0, SCIF1, SCIF2, SCIF3, SCIF4, SCIF5, SCIF6, SCIF7åä½ */
+	sil_wrb_mem(RZA1_STBCR4, 0x00);
+	(void) sil_reb_mem(RZA1_STBCR4);		/* ããã¼ãªã¼ã */
+
+	/* SCIM0, SCIM1, SDG0, SDG1, SDG2, SDG3, OSTM0, OSTM1åä½ */
+	sil_wrb_mem(RZA1_STBCR5, 0x00);
+	(void) sil_reb_mem(RZA1_STBCR5);		/* ããã¼ãªã¼ã */
+
+	/* A/D, CEU, DISCOM0, DISCOM1, DRC0, DRC1, JCU, RTClockåä½ */
+	sil_wrb_mem(RZA1_STBCR6, 0x00);
+	(void) sil_reb_mem(RZA1_STBCR6);		/* ããã¼ãªã¼ã */
+
+	/* DVDEC0, DVDEC1, ETHER, FLCTL, USB0, USB1åä½ */
+	sil_wrb_mem(RZA1_STBCR7, 0x24);
+	(void) sil_reb_mem(RZA1_STBCR7);		/* ããã¼ãªã¼ã */
+
+	/* IMR-LS20, IMR-LS21, IMR-LSD, MMCIF, MOST50, SCUXåä½ */
+	sil_wrb_mem(RZA1_STBCR8, 0x05);
+	(void) sil_reb_mem(RZA1_STBCR8);		/* ããã¼ãªã¼ã */
+
+	/* I2C0, I2C1, I2C2, I2C3, SPIBSC0, SPIBSC1, VDC50, VDC51åä½ */
+	sil_wrb_mem(RZA1_STBCR9, 0x00);
+	(void) sil_reb_mem(RZA1_STBCR9);		/* ããã¼ãªã¼ã */
+
+	/* RSPI0, RSPI1, RSPI2, RSPI3, RSPI4, CD-ROMDEC, RSPDIF, RGPVGåä½ */
+	sil_wrb_mem(RZA1_STBCR10, 0x00);
+	(void) sil_reb_mem(RZA1_STBCR10);		/* ããã¼ãªã¼ã */
+
+	/* SSIF0, SSIF1, SSIF2, SSIF3, SSIF4, SSIF5åä½ */
+	sil_wrb_mem(RZA1_STBCR11, 0xc0);
+	(void) sil_reb_mem(RZA1_STBCR11);		/* ããã¼ãªã¼ã */
+
+	/* SDHI00, SDHI01, SDHI10, SDHI11åä½ */
+	sil_wrb_mem(RZA1_STBCR12, 0xf0);
+	(void) sil_reb_mem(RZA1_STBCR12);		/* ããã¼ãªã¼ã */
+}
+
+/*
+ *  æ±ç¨å
+¥åºåãã¼ãã®åæåï¼ãã¼ãï¼ããªãã§ã©ã«å
+¼ç¨ãã³ã®ã¢ãµã¤ã³ã®è¨­å®ï¼
+ */
+static void
+port_initialize(void)
+{
+	/* ãã¼ã6:ããã3ï¼TxD2ï¼ã®è¨­å® */
+	rza1_config_port(RZA1_PORT_PIBC(6),  3, 0);
+	rza1_config_port(RZA1_PORT_PBDC(6),  3, 0);
+	rza1_config_port(RZA1_PORT_PIPC(6),  3, 1);
+	/* ç¬¬7å
+¼ç¨æ©è½ï¼TxD2ï¼ï¼åºå */
+	rza1_config_port(RZA1_PORT_PMC(6),   3, 1);
+	rza1_config_port(RZA1_PORT_PFCAE(6), 3, 1);
+	rza1_config_port(RZA1_PORT_PFCE(6),  3, 1);
+	rza1_config_port(RZA1_PORT_PFC(6),   3, 0);
+	rza1_config_port(RZA1_PORT_PM(6),    3, 0);
+
+	/* ãã¼ã6:ããã2ï¼RxD2ï¼ã®è¨­å® */
+	rza1_config_port(RZA1_PORT_PIBC(6),  2, 0);
+	rza1_config_port(RZA1_PORT_PBDC(6),  2, 0);
+	rza1_config_port(RZA1_PORT_PIPC(6),  2, 1);
+	/* ç¬¬7å
+¼ç¨æ©è½ï¼RxD2ï¼ï¼å
+¥å */
+	rza1_config_port(RZA1_PORT_PMC(6),   2, 1);
+	rza1_config_port(RZA1_PORT_PFCAE(6), 2, 1);
+	rza1_config_port(RZA1_PORT_PFCE(6),  2, 1);
+	rza1_config_port(RZA1_PORT_PFC(6),   2, 0);
+	rza1_config_port(RZA1_PORT_PM(6),    2, 1);
+
+	/* ãã¼ã6:ããã13ï¼LED1ï¼èµ¤ï¼ã®è¨­å® */
+	rza1_config_port(RZA1_PORT_PIBC(6),  13, 0);
+	rza1_config_port(RZA1_PORT_PBDC(6),  13, 0);
+	/* ãã¼ãã¢ã¼ãï¼åºå */
+	rza1_config_port(RZA1_PORT_PMC(6),   13, 0);
+	rza1_config_port(RZA1_PORT_PM(6),    13, 0);
+
+	/* ãã¼ã6:ããã14ï¼LED2ï¼ç·ï¼ã®è¨­å® */
+	rza1_config_port(RZA1_PORT_PIBC(6),  14, 0);
+	rza1_config_port(RZA1_PORT_PBDC(6),  14, 0);
+	/* ãã¼ãã¢ã¼ãï¼åºå */
+	rza1_config_port(RZA1_PORT_PMC(6),   14, 0);
+	rza1_config_port(RZA1_PORT_PM(6),    14, 0);
+
+	/* ãã¼ã6:ããã15ï¼LED3ï¼éï¼ã®è¨­å® */
+	rza1_config_port(RZA1_PORT_PIBC(6),  15, 0);
+	rza1_config_port(RZA1_PORT_PBDC(6),  15, 0);
+	/* ãã¼ãã¢ã¼ãï¼åºå */
+	rza1_config_port(RZA1_PORT_PMC(6),   15, 0);
+	rza1_config_port(RZA1_PORT_PM(6),    15, 0);
+
+	/* ãã¼ã6:ããã12ï¼LED4ï¼ã¦ã¼ã¶ï¼ã®è¨­å® */
+	rza1_config_port(RZA1_PORT_PIBC(6),  12, 0);
+	rza1_config_port(RZA1_PORT_PBDC(6),  12, 0);
+	/* ãã¼ãã¢ã¼ãï¼åºå */
+	rza1_config_port(RZA1_PORT_PMC(6),   12, 0);
+	rza1_config_port(RZA1_PORT_PM(6),    12, 0);
+
+	/* ãã¼ã6:ããã0ï¼ã¦ã¼ã¶ãã¿ã³ï¼ã®è¨­å® */
+	rza1_config_port(RZA1_PORT_PIBC(6),  0, 1);
+	rza1_config_port(RZA1_PORT_PBDC(6),  0, 0);
+	/* ç¬¬6å
+¼ç¨æ©è½ï¼IRQ5ï¼ï¼å
+¥å */
+	rza1_config_port(RZA1_PORT_PMC(6),   0, 1);
+	rza1_config_port(RZA1_PORT_PFCAE(6), 0, 1);
+	rza1_config_port(RZA1_PORT_PFCE(6),  0, 0);
+	rza1_config_port(RZA1_PORT_PFC(6),   0, 1);
+	rza1_config_port(RZA1_PORT_PM(6),    0, 1);
+}
+
+/*
+ *  ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºåã®ããã®åæå
+ *
+ *  ã»ã«ã¿ã¤ãtPutLogGRPeachå
+ã«å®è£
+ããã¦ããé¢æ°ãç´æ¥å¼ã³åºãï¼
+ */
+extern void	tPutLogGRPeach_initialize(void);
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®åæå
+ */
+void
+target_initialize(void)
+{
+	extern void	*vector_table;		/* ãã¯ã¿ãã¼ãã« */
+
+	/*
+	 *  Low exception vectorsãä½¿ç¨
+	 */
+	/*arm_set_low_vectors();*/
+
+	/*
+	 *  ãããä¾å­ã®åæå
+	 */
+	/*chip_initialize();*/
+
+	/*
+	 *  ä½æ¶è²»é»åã¢ã¼ãã®åæå
+	 */
+	lowpower_initialize();
+
+	/*
+	 *  æ±ç¨å
+¥åºåãã¼ãã®åæåï¼ãã¼ãï¼ããªãã§ã©ã«å
+¼ç¨ãã³ã®ã¢ãµã¤ã³ã®è¨­å®ï¼
+	 */
+	port_initialize();
+
+	/*
+	 *  ãã¯ã¿ãã¼ãã«ã®è¨­å®
+	 */
+	/*CP15_WRITE_VBAR((uint32_t) &vector_table);*/
+
+	/*
+	 *  L2ã­ã£ãã·ã¥ã³ã³ãã­ã¼ã©ï¼PL310ï¼ã®åæå
+	 */
+	/*pl310_initialize(0x0U, ~0x0U);*/
+
+	/*
+	 *  LEDãéè²ã«ç¹ç¯ããã
+	 */
+	gr_peach_set_led(GR_PEACH_LED_BLUE, 1);
+
+	/*
+	 *  ä½ã¬ãã«åºåç¨ã«SIOãåæå
+	 */
+#ifndef TOPPERS_OMIT_TECS
+	tPutLogGRPeach_initialize();
+#endif /* TOPPERS_OMIT_TECS */
+}
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®çµäºå¦ç
+ */
+void
+target_exit(void)
+{
+	/*
+	 *  ãããä¾å­ã®çµäºå¦ç
+	 */
+	chip_terminate();
+
+	/*
+	 *  bkptå½ä»¤ã«ãããããã¬ã«å¶å¾¡ãç§»ãï¼ãã©ã¡ã¼ã¿ãä½ãè¯ããæªæ¤è¨ï¼
+	 */
+	Asm("bkpt #0");
+
+	while (true) ;
+}
+
+/*
+ *  LEDã®ç¹ç¯ï¼æ¶ç¯
+ */
+void
+gr_peach_set_led(uint_t led, uint_t set)
+{
+	rza1_config_port(RZA1_PORT_P(6), led, set);
+}
+
+void us_ticker_init(void)
+{
+}
+
+uint32_t us_ticker_read()
+{
+	ER ret;
+	SYSTIM now;
+
+	ret = get_tim(&now);
+	if(ret != E_OK)
+		return 0;
+
+	return now;
+}
+
+void us_ticker_set_interrupt(timestamp_t timestamp)
+{
+	Asm("bkpt #0");
+}
+
+void us_ticker_disable_interrupt(void)
+{
+}
+
+void us_ticker_clear_interrupt(void)
+{
+}
+
+void wait(float s)
+{
+	wait_us(s * 1000000.0f);
+}
+
+void wait_ms(int ms)
+{
+	wait_us(ms * 1000);
+}
+
+void wait_us(int us)
+{
+	ER ret;
+
+	ret = dly_tsk(us);
+	if (ret == E_CTX){
+		uint32_t start = us_ticker_read();
+		while ((us_ticker_read() - start) < (uint32_t)us);
+	}
+}
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_kernel_impl.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_kernel_impl.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_kernel_impl.h	(revision 270)
@@ -0,0 +1,112 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+/*
+ *		ã«ã¼ãã«ã®ã¿ã¼ã²ããä¾å­é¨ã«é¢ããå®ç¾©ï¼GR-PEACHç¨ï¼
+ *
+ *  ã«ã¼ãã«ã®ã¿ã¼ã²ããä¾å­é¨ã®ããããã¡ã¤ã«ï¼kernel_impl.hã®ã¿ã¼ã²ã
+ *  ãä¾å­é¨ã®ä½ç½®ä»ãã¨ãªãï¼
+ */
+
+#ifndef TOPPERS_TARGET_KERNEL_IMPL_H
+#define TOPPERS_TARGET_KERNEL_IMPL_H
+
+/*
+ *  ã¿ã¼ã²ããã®ãã¼ãã¦ã§ã¢è³æºã®å®ç¾©
+ */
+#include "gr_peach.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã«é¢ããè¨­å®
+ */
+#ifdef TOPPERS_ENABLE_TRACE
+#include "arch/tracelog/trace_log.h"
+#endif /* TOPPERS_ENABLE_TRACE */
+
+/*
+ *  ããã©ã«ãã®éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã®å®ç¾©
+ */
+#define DEFAULT_ISTKSZ  0x2000U		/* 8KB */
+
+/*
+ *  å¾®å°æéå¾
+ã¡ã®ããã®å®ç¾©ï¼æ¬æ¥ã¯SILã®ã¿ã¼ã²ããä¾å­é¨ï¼
+ */
+#define SIL_DLY_TIM1    352
+#define SIL_DLY_TIM2    200
+
+/*
+ *  ãããä¾å­é¨ï¼RZ/A1ç¨ï¼
+ */
+#include "chip_kernel_impl.h"
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ã¿ã¼ã²ããã·ã¹ãã ä¾å­ã®åæå
+ */
+extern void target_initialize(void);
+
+/*
+ *  ã¿ã¼ã²ããã·ã¹ãã ã®çµäº
+ *
+ *  ã·ã¹ãã ãçµäºããæã«ä½¿ãï¼
+ */
+extern void target_exit(void) NoReturn;
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_TARGET_KERNEL_IMPL_H */
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_rename.def
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_rename.def	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_rename.def	(revision 270)
@@ -0,0 +1,13 @@
+# target_kernel_impl.c
+target_initialize
+target_exit
+
+# tTraceLog.c
+log_dsp_enter
+log_dsp_leave
+log_inh_enter
+log_inh_leave
+log_exc_enter
+log_exc_leave
+
+INCLUDE "chip"
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_rename.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_rename.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_rename.h	(revision 270)
@@ -0,0 +1,25 @@
+/* This file is generated from target_rename.def by genrename. */
+
+#ifndef TOPPERS_TARGET_RENAME_H
+#define TOPPERS_TARGET_RENAME_H
+
+/*
+ *  target_kernel_impl.c
+ */
+#define target_initialize			_kernel_target_initialize
+#define target_exit					_kernel_target_exit
+
+/*
+ *  tTraceLog.c
+ */
+#define log_dsp_enter				_kernel_log_dsp_enter
+#define log_dsp_leave				_kernel_log_dsp_leave
+#define log_inh_enter				_kernel_log_inh_enter
+#define log_inh_leave				_kernel_log_inh_leave
+#define log_exc_enter				_kernel_log_exc_enter
+#define log_exc_leave				_kernel_log_exc_leave
+
+
+#include "chip_rename.h"
+
+#endif /* TOPPERS_TARGET_RENAME_H */
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_sil.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_sil.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_sil.h	(revision 270)
@@ -0,0 +1,79 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *
+ *  Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+/*
+ *		sil.hã®ãããä¾å­é¨ï¼GR-PEACHç¨ï¼
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼sil.hããã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡ã¤ã«ãã
+ *  ç´æ¥ã¤ã³ã¯ã«ã¼ããããã¨ã¯ãªãï¼ãã®ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ãããåã«ï¼
+ *  t_stddef.hãã¤ã³ã¯ã«ã¼ããããã®ã§ï¼ããã«ä¾å­ãã¦ãããï¼
+ */
+
+#ifndef TOPPERS_TARGET_SIL_H
+#define TOPPERS_TARGET_SIL_H
+
+/*
+ *  ãã­ã»ããµã®ã¨ã³ãã£ã¢ã³
+ */
+#define SIL_ENDIAN_LITTLE
+
+/*
+ *  ã³ã¢ã§å
+±éãªå®ç¾©ï¼ãããä¾å­é¨ã¯é£ã°ãï¼
+ */
+#ifndef TECSGEN
+#include "core_sil.h"
+#endif /* TECSGEN */
+
+#endif /* TOPPERS_TARGET_SIL_H */
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_stddef.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_stddef.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_stddef.h	(revision 270)
@@ -0,0 +1,106 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		t_stddef.hã®ã¿ã¼ã²ããä¾å­é¨ï¼GR-PEACHç¨ï¼
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼t_stddef.hã®å
+é ­ã§ã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡
+ *  ã¤ã«ããã¯ç´æ¥ã¤ã³ã¯ã«ã¼ããããã¨ã¯ãªãï¼ä»ã®ããããã¡ã¤ã«ã«å
+ç«ã£
+ *  ã¦å¦çãããããï¼ä»ã®ããããã¡ã¤ã«ã«ä¾å­ãã¦ã¯ãªããªãï¼
+ */
+
+#ifndef TOPPERS_TARGET_STDDEF_H
+#define TOPPERS_TARGET_STDDEF_H
+
+/*
+ *  ã¿ã¼ã²ãããè­å¥ããããã®ãã¯ã­ã®å®ç¾©
+ */
+#define TOPPERS_GR_PEACH				/* ã·ã¹ãã ç¥ç§° */
+#define TOPPERS_RZA1H					/* RZ/A1H */
+
+/*
+ *  éçºç°å¢ã§å
+±éãªå®ç¾©
+ */
+#ifndef TOPPERS_MACRO_ONLY
+#include <stdint.h>
+#endif /* TOPPERS_MACRO_ONLY */
+
+#define TOPPERS_STDFLOAT_TYPE1
+#include "tool_stddef.h"
+
+/*
+ *  ãããä¾å­ã§å
+±éãªå®ç¾©
+ */
+#include "chip_stddef.h"
+
+/*
+ *  ã¢ãµã¼ã·ã§ã³ã®å¤±ææã®å®è¡ä¸­æ­å¦ç
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+Inline void
+TOPPERS_assert_abort(void)
+{
+	/*
+	 *  bkptå½ä»¤ã«ãããããã¬ã«å¶å¾¡ãç§»ãï¼ãã©ã¡ã¼ã¿ãä½ãè¯ããæªæ¤è¨ï¼
+	 */
+	Asm("bkpt #0");
+}
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_TARGET_STDDEF_H */
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_support.S
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_support.S	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_support.S	(revision 270)
@@ -0,0 +1,154 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã«ã¼ãã«ã®ã¿ã¼ã²ããä¾å­é¨ã®ã¢ã»ã³ããªè¨èªé¨ï¼GR-PEACHç¨ï¼
+ */
+
+#define TOPPERS_MACRO_ONLY
+#define TOPPERS_ASM_MACRO
+#define UINT_C(val)			(val)		/* uint_tåã®å®æ°ãä½ããã¯ã­ */
+#define ULONG_C(val)		(val)		/* ulong_tåã®å®æ°ãä½ããã¯ã­ */
+#define CAST(type, val)		(val)		/* åã­ã£ã¹ããè¡ããã¯ã­ */
+#include "kernel_impl.h"
+#include "core_pl310.h"
+#include "core_asm.inc"
+
+/*
+ *  ä½ã¬ãã«ã®ã¿ã¼ã²ããã·ã¹ãã ä¾å­ã®åæå
+ *
+ *  ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼ã«ã®ä¸­ã§ï¼ã¡ã¢ãªåæåã®åã«å¼ã³åºãããï¼
+ */
+	ATEXT
+	AALIGN(2)
+	AGLOBAL(hardware_init_hook)
+ALABEL(hardware_init_hook)
+	/*
+	 *  å
+èµRAMã¸ã®ã¢ã¯ã»ã¹ï¼æ¸è¾¼ã¿è¨±å¯
+	 */
+	ldr		r2, =(RZA1_SYSCR3)
+	ldr		r0, =0x0f
+	strb	r0, [r2]		/* å
+èµä¿æç¨RAMã®ãã¼ã¸0ï½3ã¸ã®æ¸è¾¼ã¿è¨±å¯ */
+	ldrb	r0, [r2]		/* ããã¼ãªã¼ã */
+
+	/* 
+	 *  ã¯ã­ãã¯é¢ä¿ã®åæå
+	 *
+	 *  ä»¥ä¸ã®è¨­å®ã¨ããï¼
+	 *		å
+¥åå¨æ³¢æ°ï¼13.33MHzï¼CKIOï¼66.67MHz
+	 *		CPUã¯ã­ãã¯ï¼IÏï¼ï¼400.00MHz
+	 *		ç»åå¦çã¯ã­ãã¯ï¼GÏï¼ï¼266.67MHz
+	 *		å
+é¨ãã¹ã¯ã­ãã¯ï¼BÏï¼ï¼133.33MHz
+	 *		å¨è¾ºã¯ã­ãã¯1ï¼P1Ïï¼ï¼66.67MHz
+	 *		å¨è¾ºã¯ã­ãã¯0ï¼P0Ïï¼ï¼33.33MHz
+	 */
+	
+	/*
+	 *  L2ã­ã£ãã·ã¥ã®ã¹ã¿ã³ãã¤ã¢ã¼ããã¤ãã¼ãã«ï¼å¨æ³¢æ°å¤æ´æã«å¿
+è¦ï¼
+	 */
+	ldr		r2, =(PL310_POWER_CTRL)
+	ldr		r0, [r2]
+	orr		r0, r0, #0x01	/* ã¹ã¿ã³ãã¤ã¢ã¼ãã« */
+	str		r0, [r2]
+
+ALABEL(set_frqcr)
+	/*
+	 *  CPUã¯ã­ãã¯ããÃ1åãã«ï¼400MHzï¼
+	 */
+	ldr		r2, =(RZA1_FRQCR)
+	ldr		r0, =0x1035
+	strh	r0, [r2]
+	ldrh	r1, [r2]
+	cmp		r0, r1
+	bne		set_frqcr
+
+#ifdef TOPPERS_RZA1H
+	/* 
+	 *  ç»åå¦çã¯ã­ãã¯ããÃ2/3ãã«ï¼266.67MHzï¼
+	 */
+ALABEL(set_frqcr2)
+	ldr		r2, =(RZA1_FRQCR2)
+	ldr		r0, =0x0001
+	strh	r0, [r2]
+	ldrh	r1, [r2]
+	cmp		r0, r1
+	bne		set_frqcr2
+#endif /* TOPPERS_RZA1H */
+
+	/* 
+	 *  ã½ããã¦ã§ã¢ã¹ã¿ã³ãã¤å¾©å¸°ä¸­ã§ãªããªãã¾ã§å¾
+ã¤
+	 */
+wait_isbusy:
+	ldr		r2, =(RZA1_CPUSTS)
+	ldrb	r0, [r2]
+	tst		r0, #0x10
+	bne		wait_isbusy
+
+	/*
+	 *  L2ã­ã£ãã·ã¥ã®ã¹ã¿ã³ãã¤ã¢ã¼ãããã£ã¹ã¨ã¼ãã«
+	 */
+	ldr		r2, =(PL310_POWER_CTRL)
+	ldr		r0, [r2]
+	bfc		r0, #0, #1		/* ã¹ã¿ã³ãã¤ã¢ã¼ãããã£ã¹ã¨ã¼ãã« */
+	str		r0, [r2]
+	bx		lr
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_syssvc.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_syssvc.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_syssvc.h	(revision 270)
@@ -0,0 +1,84 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+/*
+ *		ã·ã¹ãã ãµã¼ãã¹ã®ã¿ã¼ã²ããä¾å­é¨ï¼GR-PEACHç¨ï¼
+ *
+ *  ã·ã¹ãã ãµã¼ãã¹ã®ã¿ã¼ã²ããä¾å­é¨ã®ããããã¡ã¤ã«ï¼ã·ã¹ãã ãµã¼ã
+ *  ã¹ã®ã¿ã¼ã²ããä¾å­ã®è¨­å®ã¯ï¼ã§ããéãã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ã§
+ *  è¨è¿°ãï¼ãã®ãã¡ã¤ã«ã«è¨è¿°ãããã®ã¯æå°éã¨ããï¼
+ */
+
+#ifndef TOPPERS_TARGET_SYSSVC_H
+#define TOPPERS_TARGET_SYSSVC_H
+
+#include "gr_peach.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã«é¢ããè¨­å®
+ */
+#ifdef TOPPERS_ENABLE_TRACE
+#include "arch/tracelog/trace_log.h"
+#endif /* TOPPERS_ENABLE_TRACE */
+
+/*
+ *  ã³ã¢ã§å
+±éãªå®ç¾©ï¼ãããä¾å­é¨ã¯é£ã°ãï¼
+ */
+#include "core_syssvc.h"
+
+#endif /* TOPPERS_TARGET_SYSSVC_H */
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_test.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_test.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_test.h	(revision 270)
@@ -0,0 +1,84 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ *
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+/*
+ *		ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©ï¼GR-PEACHç¨ï¼
+ */
+
+#ifndef TOPPERS_TARGET_TEST_H
+#define TOPPERS_TARGET_TEST_H
+
+#include "rza1.h"
+
+/*
+ *  ãµã³ãã«ãã­ã°ã©ã ã§ä½¿ç¨ããå²è¾¼ã¿ã«é¢ããå®ç¾©
+ */
+#define INTNO1				INTNO_IRQ5
+#define INTNO1_INTATR		TA_ENAINT|TA_NEGEDGE
+#define INTNO1_INTPRI		-15
+#define intno1_clear()		rza1_clear_irq(INTNO_IRQ5)
+
+/*
+ *  ãã¹ããã­ã°ã©ã ã§ä½¿ç¨ããæéãã©ã¡ã¼ã¿ã«é¢ããå®ç¾©
+ */
+#define TEST_TIME_CP	4000U		/* 115200bpsãæ³å® */
+
+/*
+ *  ã³ã¢ã§å
+±éãªå®ç¾©ï¼ãããä¾å­é¨ã¯é£ã°ãï¼
+ */
+#include "core_test.h"
+
+#endif /* TOPPERS_TARGET_TEST_H */
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_timer.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_timer.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_timer.cfg	(revision 270)
@@ -0,0 +1,13 @@
+/*
+ *		ã¿ã¤ããã©ã¤ãã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ *
+ *  $Id$
+ */
+
+#include "gr_peach.h"
+#include "target_timer.h"
+
+/*
+ *  ãããä¾å­é¨ï¼RZ/A1ç¨ï¼
+ */
+INCLUDE("chip_timer.cfg");
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_timer.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_timer.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_timer.h	(revision 270)
@@ -0,0 +1,69 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ *
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+/*
+ *		ã¿ã¤ããã©ã¤ãï¼GR-PEACHç¨ï¼
+ */
+
+#ifndef TOPPERS_TARGET_TIMER_H
+#define TOPPERS_TARGET_TIMER_H
+
+/*
+ *  ãããã§å
+±éãªå®ç¾©ï¼RZ/A1ç¨ï¼
+ */
+#include "chip_timer.h"
+
+#endif /* TOPPERS_TARGET_TIMER_H */
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_unrename.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_unrename.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_unrename.h	(revision 270)
@@ -0,0 +1,26 @@
+/* This file is generated from target_rename.def by genrename. */
+
+/* This file is included only when target_rename.h has been included. */
+#ifdef TOPPERS_TARGET_RENAME_H
+#undef TOPPERS_TARGET_RENAME_H
+
+/*
+ *  target_kernel_impl.c
+ */
+#undef target_initialize
+#undef target_exit
+
+/*
+ *  tTraceLog.c
+ */
+#undef log_dsp_enter
+#undef log_dsp_leave
+#undef log_inh_enter
+#undef log_inh_leave
+#undef log_exc_enter
+#undef log_exc_leave
+
+
+#include "chip_unrename.h"
+
+#endif /* TOPPERS_TARGET_RENAME_H */
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_user.txt
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_user.txt	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/target_user.txt	(revision 270)
@@ -0,0 +1,378 @@
+
+		TOPPERS/ASP3ã«ã¼ãã«
+		GR-PEACHä¾å­é¨ ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«
+
+		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.1
+		æçµæ´æ°: 2016å¹´4æ2æ¥
+
+ãã®ãã­ã¥ã¡ã³ãã¯ï¼TOPPERS/ASP3ã«ã¼ãã«ã®GR-PEACHã¿ã¼ã²ããä¾å­é¨ãä½¿
+ç¨ããããã«å¿
+è¦ãªäºé 
+ãèª¬æãããã®ã§ããï¼
+
+----------------------------------------------------------------------
+ TOPPERS/ASP Kernel
+     Toyohashi Open Platform for Embedded Real-Time Systems/
+     Advanced Standard Profile Kernel
+
+ Copyright (C) 2008-2016 by Embedded and Real-Time Systems Laboratory
+             Graduate School of Information Science, Nagoya Univ., JAPAN
+ 
+ ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+     æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+     ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+     ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+     è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+     ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+     ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+     ã¨ï¼
+   (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+       ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+   (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+       å ±åãããã¨ï¼
+ (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+     å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+     ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+     ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+     å
+è²¬ãããã¨ï¼
+ 
+ æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ ã®è²¬ä»»ãè² ããªãï¼
+ 
+ $Id$
+----------------------------------------------------------------------
+
+âã©ã¤ã»ã³ã¹ã«é¢ããæ³¨æäºé 
+
+
+GR-PEACHã¿ã¼ã²ããä¾å­é¨ã«ã¯ï¼ROMå®è¡ã®ããã®ãã¼ãã­ã¼ãï¼sf_boot.cï¼
+ãå«ãã§ãããï¼ãã®ã½ããã¦ã§ã¢ã¯ã«ããµã¹ã¨ã¬ã¯ãã­ãã¯ã¹ãéçºããã
+ã®ã§ããï¼ã©ã¤ã»ã³ã¹æ¡ä»¶ãã«ããµã¹ã¨ã¬ã¯ãã­ãã¯ã¹ç¬èªã®ãã®ã§ããï¼
+TOPPERSã©ã¤ã»ã³ã¹ã§ãªãããæ³¨æãããã¨ï¼
+
+âç®æ¬¡
+
+
+ï¼ï¼GR-PEACHã¿ã¼ã²ããä¾å­é¨ã®æ¦è¦
+
+GR-PEACHã¿ã¼ã²ããä¾å­é¨ï¼GNUéçºç°å¢åãï¼ã¯ï¼TOPPERS/ASP3ã«ã¼ãã«ãï¼
+ã«ããµã¹ RZ/A1Hãæ­è¼ããGR-PEACHãã¼ãä¸ã§åä½ãããç°å¢ãæ§ç¯ãããã
+ã®ãã®ã§ããï¼
+
+1.1 å¯¾å¿ããã¿ã¼ã²ããã·ã¹ãã ã¨ã¿ã¼ã²ããç¥ç§°
+
+GR-PEACHã¿ã¼ã²ããä¾å­é¨ï¼GNUéçºç°å¢åãï¼ã®åä½ç¢ºèªã¯ï¼å®æ©ãç¨ãã¦è¡ã£
+ã¦ããï¼GR-PEACHã«é¢ããæ
+å ±ã¯ï¼ä»¥ä¸ã®ã¦ã§ããµã¤ãã«ããï¼
+
+	http://gadget.renesas.com/ja/product/peach.html
+
+ãã­ã°ã©ã ããã©ãã·ã¥ã¡ã¢ãªã«æ¸ãè¾¼ãã§å®è¡ããæ¹æ³ï¼ROMå®è¡ï¼ã¨ï¼ããã
+ã¬ã«ããRAMã«ãã¦ã³ã­ã¼ããã¦å®è¡ããæ¹æ³ï¼RAMå®è¡ï¼ããµãã¼ããã¦ããï¼
+
+ã¿ã¼ã²ããç¥ç§°ç­ã¯æ¬¡ã®éãï¼
+
+	ã¿ã¼ã²ããç¥ç§°ï¼gr_peach_gcc
+	ã·ã¹ãã ç¥ç§°ï¼gr_peach
+	éçºç°å¢ç¥ç§°ï¼gcc
+
+1.2 ã¿ã¼ã²ããä¾å­é¨ã®æ§æ
+
+GR-PEACHã¿ã¼ã²ããä¾å­é¨ï¼GNUéçºç°å¢åãï¼ã¯ï¼ãããä¾å­é¨ã¨ãã¦RZ/A1
+ãããä¾å­é¨ï¼GNUéçºç°å¢åãï¼ãï¼ã³ã¢ä¾å­é¨ã¨ãã¦ARMã³ã¢ä¾å­é¨ï¼GNUé
+çºç°å¢åãï¼ãä½¿ç¨ãã¦ããï¼
+
+ã¿ã¼ã²ããä¾å­é¨ï¼targetãã£ã¬ã¯ããªï¼ããã³ã¿ã¼ã²ããä¾å­é¨ã®å
+±éé¨
+ï¼archãã£ã¬ã¯ããªï¼ã®ãã£ã¬ã¯ããªã¯æ¬¡ã®éãï¼
+
+	target/
+		gr_peach_gcc/		GR-PEACHã¿ã¼ã²ããä¾å­é¨
+
+	arch/
+		arm_gcc/common/		ARMã³ã¢ä¾å­é¨
+		arm_gcc/rza1/		RZ/A1ãããä¾å­é¨
+		arm_gcc/doc/		ARMä¾å­é¨ã«é¢ãããã­ã¥ã¡ã³ã
+		gcc/				GCCéçºç°å¢ä¾å­é¨
+		tracelog/			ãã¬ã¼ã¹ã­ã°è¨é²ã®ãµã³ãã«ã³ã¼ã
+
+1.3 ä¾å­ãã¦ããåå¥ããã±ã¼ã¸ã®ãã¼ã¸ã§ã³çªå·
+
+GR-PEACHã¿ã¼ã²ããä¾å­é¨ï¼ãã¼ã¸ã§ã³ 3.1.0ï¼ã®åå¥ããã±ã¼ã¸ãä¾å­ãã¦
+ããåå¥ããã±ã¼ã¸ã¨ï¼åä½ç¢ºèªãè¡ã£ããã¼ã¸ã§ã³ã¯æ¬¡ã®éãï¼
+
+	åå¥ããã±ã¼ã¸ã®åç§°	ãã¼ã¸ã§ã³	åå¥ããã±ã¼ã¸ãã¡ã¤ã«å
+	------------------------------------------------------------------
+	ã¿ã¼ã²ããéä¾å­é¨		3.1.0		asp3-3.1.0.tar.gz
+
+1.4 éçºç°å¢ï¼ãããã°ç°å¢ã¨åä½ç¢ºèªæ¡ä»¶
+
+éçºç°å¢ã¨ãã¦ï¼ä»¥ä¸ã®URLããããªãã«ãçããã¦ã³ã­ã¼ããããã¨ãã§ãã
+GCC ARM Embeddedãç¨ãã¦ããï¼
+
+	https://launchpad.net/gcc-arm-embedded/
+
+åä½ç¢ºèªãè¡ã£ããã¼ã¸ã§ã³ã¯æ¬¡ã®éãï¼
+
+	gcc: version 4.8.3 20140228
+	binutilsï¼objcopyï¼objdumpï¼ï¼2.23.2.20140228
+
+ãããã°ç°å¢ã¨ãã¦ï¼ãªã³ãã¼ãã®CMSIS-DAPããï¼OpenOCDãçµç±ãã¦ï¼GDBã
+ç¨ããç°å¢ã§åä½ç¢ºèªãè¡ã£ã¦ããï¼åä½ç¢ºèªãè¡ã£ããããã°ç°å¢ã®ãã¼ã¸ã§
+ã³ã¯æ¬¡ã®éãï¼
+
+	gdb: 7.6.0.20140228-cvs
+	openocd: 0.10.0-dev-00287-g85cec24
+
+å¤ããã¼ã¸ã§ã³ã®OpenOCDã§ã¯æ­£ããåä½ããªããã¨ãå ±åããã¦ããããï¼æ³¨
+æãå¿
+è¦ã§ããï¼
+
+GUIãã¼ã¹ã®éçºç°å¢ï¼ãããã°ç°å¢ã¨ãã¦ï¼Atollic TrueStudioãç¨ãããã¨
+ãã§ããï¼
+
+1.5 ã¡ã¢ãªããã
+
+ROMå®è¡ã®å ´åã¯ï¼ä»¥ä¸ã®ã¡ã¢ãªããããæ³å®ãã¦ããï¼
+
+	0x18000000 - 0x1fffffffï¼ã·ãªã¢ã«ãã©ãã·ã¥ã¡ã¢ãªï¼128MBï¼
+	0x20000000 - 0x209fffffï¼å
+èµSRAMï¼10MBï¼
+	0x3fe00000 - 0x3fffffffï¼I/Oé åï¼2MBï¼ï¼äºç´é åãå«ã
+	0xe8000000 - 0xffffffffï¼I/Oé åï¼384MBï¼ï¼äºç´é åãå«ã
+
+å
+èµSRAMé åã®å
+é ­ã®16KBã¯ï¼ãã¼ãã­ã¼ããç½®ãããã«ä½¿ç¨ããï¼
+
+RAMå®è¡ã®å ´åã¯ï¼ä»¥ä¸ã®ã¡ã¢ãªããããæ³å®ãã¦ããï¼
+
+	0x20000000 - 0x200fffffï¼å
+èµSRAMï¼1MBï¼â¦ ROMé åã¨ãã¦ä½¿ç¨
+	0x20100000 - 0x209fffffï¼å
+èµSRAMï¼9MBï¼
+	0x3fe00000 - 0x3fffffffï¼I/Oé åï¼2MBï¼ï¼äºç´é åãå«ã
+	0xe8000000 - 0xffffffffï¼I/Oé åï¼384MBï¼ï¼äºç´é åãå«ã
+
+ãã­ã°ã©ã ããã³å®æ°ãã¼ã¿é åã¯ï¼å
+èµSRAMé åã®å
+é ­ã®1MBã«ç½®ãæ³å®ã¨ã
+ã¦ï¼ï¼å®æ°ã§ãªãï¼ãã¼ã¿é åã¯ï¼ãã®å¾ã«é
+ç½®ããï¼
+
+ã¡ã¢ãªããããå¤æ´ããå ´åã«ã¯ï¼target_kernel_impl.cã¨gr_peach_rom.ld
+ï¼ã¾ãã¯ï¼pr_peach_ram.kdï¼ãä¿®æ­£ããå¿
+è¦ãããï¼
+
+
+ï¼ï¼ã¿ã¼ã²ããå®ç¾©äºé 
+ã®è¦å®
+
+GR-PEACHã¿ã¼ã²ããä¾å­é¨ã¯ï¼ARMã³ã¢ä¾å­é¨ã¨RZ/A1ãããä¾å­é¨ãç¨ãã¦å®
+è£
+ããã¦ããï¼ARMã³ã¢ä¾å­é¨ããã³RZ/A1ãããä¾å­é¨ã«ãããã¿ã¼ã²ããå®
+ç¾©äºé 
+ã®è¦å®ã«ã¤ãã¦ã¯ï¼ãARMä¾å­é¨ ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«ããåç
+§ããã
+ã¨ï¼ãããã®è¦å®ä»¥å¤ã«ï¼GR-PEACHã¿ã¼ã²ããå®ç¾©ã®äºé 
+ã¯ãªãï¼
+
+
+ï¼ï¼ãã©ã¤ãé¢é£ã®æ
+å ±
+
+3.1 ã¿ã¤ããã©ã¤ã
+
+é«åè§£è½ã¿ã¤ãã¯ï¼RZ/A1Hãæã¤2ãã£ã³ãã«ã®OSã¿ã¤ãã®å
+ã®1ã¤ãç¨ãã¦å®
+ç¾ãã¦ããï¼ã¾ãï¼ãã1ã¤ã®OSã¿ã¤ããç¨ãã¦ï¼ãªã¼ãã©ã³ã¿ã¤ããå®ç¾ãã¦
+ããï¼
+
+3.2 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ã
+
+ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã¯ï¼RZ/A1Hãæã¤8ãã¼ãã®FIFOå
+èµã·ãªã¢ã«
+ã³ãã¥ãã±ã¼ã·ã§ã³ã¤ã³ã¿ãã§ã¼ã¹ããµãã¼ããã¦ããï¼
+
+USBçµç±ã§ãã¹ãã¨æ¥ç¶ã§ãããã¼ãã¯ï¼SCIFã®ãã£ãã«2ï¼ãã£ãã«çªå·ã¯0ã
+ãå§ã¾ãã®ã§ï¼ãã¼ã3ã«ç¸å½ï¼ã§ããï¼ä¸æ¹ï¼sample1.cdlã§ã¯ï¼ã­ã°ã¿ã¹ã¯
+ããã³ãµã³ãã«ãã­ã°ã©ã ãä½¿ããã¼ãããã¼ã1ã¨ãªã£ã¦ããããï¼ãã¼ã1
+ã¨ãã¼ã3ãå
+¥ãæãã¦ããï¼ããªãã¡ï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ãã¼
+ã1ãSCIFã®ãã£ãã«2ï¼ãã¼ã2ããã£ãã«1ï¼ãã¼ã3ããã£ãã«0ï¼ãã¼ã4ã
+ãã£ãã«3ï¼â¦ã«å¯¾å¿ãã¦ããï¼
+
+	ãã¼ã¬ã¼ãï¼115200bps
+	ãã¼ã¿ï¼8ããã
+	ããªãã£ï¼ãªã
+	ã¹ããããããï¼1ããã
+	ãã­ã¼å¶å¾¡ï¼ãªã
+
+ãã®å¯¾å¿ãå¤æ´ããã«ã¯ï¼tSIOPortGRPeach.cdlãä¿®æ­£ããå¿
+è¦ãããï¼
+
+3.3 ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºå
+
+ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºåã¯ï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ãã¼ã1ã¨
+åããã£ãã«ï¼ããªãã¡ï¼SCIFã®ãã£ãã«2ï¼ã«å¯¾ãã¦ï¼ãã¼ãªã³ã°ã«ããæå­
+ãåºåããæ¹æ³ã§å®ç¾ãã¦ããï¼
+
+ç¨ãããã¼ããå¤æ´ããå ´åã«ã¯ï¼target.cdlãä¿®æ­£ããå¿
+è¦ãããï¼
+
+
+ï¼ï¼ã·ã¹ãã æ§ç¯æé ã¨å®è¡æé 
+
+GR-PEACHç¨ã®ASP3ã«ã¼ãã«ããã³ãµã³ãã«ãã­ã°ã©ã ãæ§ç¯ããæé ã¯ï¼åºæ¬
+çã«ã¯ï¼ãTOPPERS/ASP3ã«ã¼ãã« ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«ãã®ãï¼ï¼ã¯ã¤ãã¯ã¹
+ã¿ã¼ãã¬ã¤ããã®ç« ã«è¨è¿°ããã¦ããéãã§ãããï¼ROMå®è¡ãRAMå®è¡ãã«ãã£
+ã¦ï¼æ§ç¯æé ã¨å®è¡æé ã«éããããï¼
+
+4.1 ROMå®è¡ã®å ´åã®æ§ç¯æé ã¨å®è¡æé 
+
+ã«ã¼ãã«ã®æ§ç¯åã«ï¼GR-PEACHã¿ã¼ã²ããä¾å­é¨ã®Makefile.targetãç·¨éãï¼
+ä»¥ä¸ã®è¡ãæå¹ã«ããï¼ã³ã¡ã³ãã¢ã¦ãããï¼ï¼
+
+	EXECUTE_ON = ROM
+
+ROMå®è¡ããå ´åã«ã¯ï¼ãã¤ããªå½¢å¼ãå¿
+è¦ã§ããããï¼ãµã³ãã«ãã­ã°ã©ã ã®
+æ§ç¯å¾ã«ï¼ä»¥ä¸ã®ã³ãã³ããå®è¡ããï¼
+
+	% make asp.bin
+
+GR-PEACHã®USBãã¼ãã¨PCãæ¥ç¶ããã¨ï¼GR-PEACHããã©ã¤ãã¨ãã¦èªè­ããã
+ããï¼ãã®ãã©ã¤ãã«asp.binãæ¸ãè¾¼ããã¨ã§ï¼GR-PEACHã®ãã©ãã·ã¥ã¡ã¢ãª
+ã«ãã­ã°ã©ã ãæ¸ãè¾¼ã¾ããï¼
+
+æ¸ãè¾¼ã¿å¾ï¼ãªã»ãããã¿ã³ãæ¼ããã¨ã«ããï¼ãã­ã°ã©ã ã®å®è¡ãéå§ãã
+ãï¼
+
+4.2 RAMå®è¡ã®å ´åã®æ§ç¯æé ã¨å®è¡æé 
+
+ã«ã¼ãã«ã®æ§ç¯åã«ï¼GR-PEACHã¿ã¼ã²ããä¾å­é¨ã®Makefile.targetãç·¨éãï¼
+ä»¥ä¸ã®è¡ãæå¹ã«ããï¼ã³ã¡ã³ãã¢ã¦ãããï¼ï¼
+
+	EXECUTE_ON = RAM
+
+ä»¥ä¸ï¼ASP3ã«ã¼ãã«ãç½®ãããã£ã¬ã¯ããªã<SRCDIR>ï¼OpenOCDãã¤ã³ã¹ãã¼ã«
+ãããã£ã¬ã¯ããªã<OPENOCD_DIR>ã¨æ¸ãï¼openocdã®å®è¡ãã­ã°ã©ã ã¯ï¼å®è¡
+ãã¹ã«æå®ããããã£ã¬ã¯ããªã«ã³ãã¼ã¾ãã¯ã·ã³ããªãã¯ãªã³ã¯ãã¦ããï¼
+
+	% cd /usr/local/bin
+	% ln -s <OPENOCD_DIR>/bin/openocd .
+
+ã¾ãï¼GR-PEACHã¿ã¼ã²ããä¾å­é¨ã®ãã£ã¬ã¯ããªã«ããrenesas_rza1h_swd.cfg
+ãï¼<OPENOCD_DIR>/scripts/targetsã«ã³ãã¼ãã¦ããï¼
+
+æ¬¡ã«ï¼GR-PEACHã®USBãã¼ãã¨PCãæ¥ç¶ãï¼ä»¥ä¸ã®ã³ãã³ãã§openocdãèµ·åããï¼
+
+	% setenv OPENOCD_SCRIPTS <OPENOCD_DIR>/scripts
+	% openocd -f interface/cmsis-dap.cfg -f target/renesas_rza1h_swd.cfg
+
+ä»¥ä¸ã®ã³ãã³ãã§gdbãèµ·åãï¼aspãã­ã¼ãããå¾ï¼continueã³ãã³ãã§ãã­
+ã°ã©ã ã®å®è¡ãéå§ãããï¼
+
+	% arm-none-eabi-gdb asp -x <SRCDIR>/target/gr_peach_gcc/gdb_ram.ini
+	(gdb) continue
+
+<SRCDIR>/target/gr_peach_gcc/gdb_ram.iniãï¼ã«ã¬ã³ããã£ã¬ã¯ããªã®
+.gdbinitã«ã³ãã¼ãã¦ãããã¨ã§ï¼gdbã®èµ·åæ¯ã«ã¹ã¯ãªãããæå®ããå¿
+è¦ã
+ãªããªãï¼
+
+4.3 ãã©ã¤ãã®ã¤ã³ã¹ãã¼ã«
+
+GR-PEACHã®USBãã¼ãã¨PCãæ¥ç¶ãã¦ãï¼GR-PEACHãã·ãªã¢ã«ãã¼ãã¨ãã¦èªè­
+ãããªãå ´åã«ã¯ï¼USBã·ãªã¢ã«ãã©ã¤ããã¤ã³ã¹ãã¼ã«ããå¿
+è¦ãããï¼
+
+Windowsåãã®ãã©ã¤ãã¯ï¼ä»¥ä¸ã®URLã«ããï¼
+
+	https://developer.mbed.org/handbook/Windows-serial-configuration
+
+MacOS Xç¨ã®USBã·ãªã¢ã«ãã©ã¤ãã¯ï¼ä¾ãã°ï¼ä»¥ä¸ã®URLã«ãããã®ãä½¿ç¨ãã
+ãã¨ãã§ããï¼
+
+	http://www.ftdichip.com/Drivers/VCP.htm
+
+
+ï¼ï¼ãªãã¡ã¬ã³ã¹
+
+5.1 ãã£ã¬ã¯ããªæ§æã»ãã¡ã¤ã«æ§æ
+
+	target/gr_peach_gcc/
+		E_PACKAGE				ç°¡æããã±ã¼ã¸ã®ãã¡ã¤ã«ãªã¹ã
+		MANIFEST				åå¥ããã±ã¼ã¸ã®ãã¡ã¤ã«ãªã¹ã
+		Makefile.target			Makefileã®ã¿ã¼ã²ããä¾å­é¨
+		gdb_ram.ini				GDBã®èµ·åã¹ã¯ãªããï¼RAMå®è¡ç¨ï¼
+		gdb_rom.ini				GDBã®èµ·åã¹ã¯ãªããï¼ROMå®è¡ç¨ï¼
+		gr_peach.h				ã¿ã¼ã²ããã®ãã¼ãã¦ã§ã¢è³æºã®å®ç¾©
+		gr_peach_ram.ld			æ¨æºã®ãªã³ã«ã¹ã¯ãªããï¼RAMå®è¡ç¨ï¼
+		gr_peach_rom.ld			æ¨æºã®ãªã³ã«ã¹ã¯ãªããï¼ROMå®è¡ç¨ï¼
+		renesas_rza1h_swd.cfg	OpenOCDã®èµ·åã¹ã¯ãªãã
+		sf_boot.c				ãã¼ãã­ã¼ãï¼ROMå®è¡ç¨ï¼
+		tPutLogGRPeach.c		ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºå
+		tPutLogGRPeach.cdl		ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºåã®ã³ã³ãã¼ãã³ãè¨è¿°
+		tSIOPortGRPeach.cdl		ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ãã
+								ä¾å­é¨ï¼GR-PEACHç¨ï¼ã®ã³ã³ãã¼ãã³ãè¨è¿°
+		tSIOPortGRPeachMain_inline.h	ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®
+								ã¿ã¼ã²ããä¾å­é¨ï¼GR-PEACHç¨ï¼
+		target.cdl				ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨
+		target_cfg1_out.h		cfg1_out.cã®ãªã³ã¯ã«å¿
+è¦ãªã¹ã¿ãã®å®ç¾©
+		target_kernel.cfg		ã«ã¼ãã«å®è£
+ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+		target_kernel.h			kernel.hã®ã¿ã¼ã²ããä¾å­é¨
+		target_kernel.trb		kernel.trbã®ã¿ã¼ã²ããä¾å­é¨
+		target_check.trb		kernel_check.trbã®ã¿ã¼ã²ããä¾å­é¨
+		target_kernel_impl.c	ã«ã¼ãã«å®è£
+ã®ã¿ã¼ã²ããä¾å­é¨
+		target_kernel_impl.h	ã«ã¼ãã«å®è£
+ã®ã¿ã¼ã²ããä¾å­é¨ã«é¢ããå®ç¾©
+		target_rename.def		ã¿ã¼ã²ããä¾å­é¨ã®å
+é¨è­å¥åã®ãªãã¼ã å®ç¾©
+		target_rename.h			ã¿ã¼ã²ããä¾å­é¨ã®å
+é¨è­å¥åã®ãªãã¼ã 
+		target_sil.h			sil.hã®ã¿ã¼ã²ããä¾å­é¨
+		target_stddef.h			t_stddef.hã®ã¿ã¼ã²ããä¾å­é¨
+		target_support.S		ã«ã¼ãã«å®è£
+ã®ã¿ã¼ã²ããä¾å­é¨ï¼ã¢ã»ã³ã
+								ãªè¨èªã§è¨è¿°ããé¨åï¼
+		target_syssvc.h			ã·ã¹ãã ãµã¼ãã¹ã®ã¿ã¼ã²ããä¾å­å®ç¾©
+		target_test.h			ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©
+		target_timer.cfg		ã¿ã¤ããã©ã¤ãã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+		target_timer.h			ã¿ã¤ããã©ã¤ããä½¿ç¨ããããã®å®ç¾©
+		target_unrename.h		ã¿ã¼ã²ããä¾å­é¨ã®å
+é¨è­å¥åã®ãªãã¼ã è§£é¤
+		target_user.txt			ã¿ã¼ã²ããä¾å­é¨ã®ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«
+
+5.2 ãã¼ã¸ã§ã³å±¥æ­´
+
+	2016å¹´5æ15æ¥	Release	3.1.0		æåã®ä¸è¬å
+¬é
+
+ä»¥ä¸
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tinet_target_config.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tinet_target_config.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tinet_target_config.c	(revision 270)
@@ -0,0 +1,89 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã¢ã¸ã¥ã¼ã«ï¼GR-PEACHç¨ï¼
+ */
+
+#include <sil.h>
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#if defined(SUPPORT_ETHER)
+
+/*
+ *  mbed_bus_init -- ã¿ã¼ã²ããä¾å­é¨ã®ãã¹ã®åæå
+ */
+
+void
+mbed_bus_init (void)
+{
+#ifdef INMEM_ONLY
+
+	/* å¤é¨ãã¹ãæå¹ã«ããã*/
+	sil_orb_ddr(IO_PORT1,	0x1f);		/* Enable A0 - A4	*/
+	sil_orb_ddr(IO_PORT3,	0xff);		/* Enable D8 - D15	*/
+	sil_orb_ddr(IO_PORT8,	H8P8DDR_CS1);	/* Enable CS1		*/
+	sil_orb_ddr(IO_PORTB,	H8PBDDR_UCAS);	/* Enable UCAS		*/
+
+#endif	/* of #ifdef INMEM_ONLY */
+	}
+
+/*
+ *  mbed_inter_init -- ã¿ã¼ã²ããä¾å­é¨ã®å²è¾¼ã¿ã®åæå
+ */
+
+void
+mbed_inter_init (void)
+{
+	}
+
+#endif	/* of #if defined(SUPPORT_ETHER) */
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tinet_target_config.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tinet_target_config.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tinet_target_config.h	(revision 270)
@@ -0,0 +1,509 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _TINET_TARGET_CONFIG_H_
+#define _TINET_TARGET_CONFIG_H_
+
+/*
+ *  TCP/IP ã«é¢ããå®ç¾©
+ */
+
+/* TCP ã«é¢ããå®ç¾© */
+
+/*
+ *  MAX_TCP_SND_SEG: éä¿¡ã»ã°ã¡ã³ããµã¤ãºã®æå¤§å¤
+ *
+ *    ç¸æãã MSS ãªãã·ã§ã³ã§ã»ã°ã¡ã³ããµã¤ãºãæå®ããã¦ãã
+ *    ãã®å¤ã§ãã»ã°ã¡ã³ããµã¤ãºãå¶éã§ããã
+ */
+
+#ifndef MAX_TCP_SND_SEG
+#define MAX_TCP_SND_SEG		(IF_MTU - (IP_HDR_SIZE + TCP_HDR_SIZE))
+#endif	/* of #ifndef MAX_TCP_SND_SEG */
+
+/*
+ *  DEF_TCP_RCV_SEG: åä¿¡ã»ã°ã¡ã³ããµã¤ãºã®è¦å®å¤
+ */
+
+#ifndef DEF_TCP_RCV_SEG
+#define DEF_TCP_RCV_SEG		(IF_MTU - (IP_HDR_SIZE + TCP_HDR_SIZE))
+#endif	/* of #ifndef DEF_TCP_RCV_SEG */
+
+/* 
+ *  ã»ã°ã¡ã³ãã®é çªãå
+¥ãæ¿ããã¨ãã«æ°ãã«ãããã¯ã¼ã¯ãããã¡ãå²å½ã¦ã¦ã
+ *  ãã¼ã¿ãã³ãã¼ãããµã¤ãºã®ãããå¤
+ */
+#define MAX_TCP_REALLOC_SIZE	1024	
+
+#define TCP_CFG_OPT_MSS		/* ã³ãã¯ã·ã§ã³éè¨­æã«ãã»ã°ã¡ã³ããµã¤ãºãªãã·ã§ã³ãã¤ãã¦éä¿¡ããã*/
+#define TCP_CFG_DELAY_ACK	/* ACK ãé
+ãããã¨ãã¯ã³ã¡ã³ããå¤ãã			*/
+#define TCP_CFG_ALWAYS_KEEP	/* å¸¸ã«ã­ã¼ãã¢ã©ã¤ãããæã¯ã³ã¡ã³ããå¤ãã		*/
+
+/* UDP ã«é¢ããå®ç¾© */
+
+#define UDP_CFG_IN_CHECKSUM	/* UDP ã®å
+¥åãã§ãã¯ãµã ãè¡ãå ´åã¯ã³ã¡ã³ããå¤ãã	*/
+#define UDP_CFG_OUT_CHECKSUM	/* UDP ã®åºåãã§ãã¯ãµã ãè¡ãå ´åã¯ã³ã¡ã³ããå¤ãã	*/
+
+/* ICMPv4/v6 ã«é¢ããå®ç¾© */
+
+#define ICMP_REPLY_ERROR		/* ICMP ã¨ã©ã¼ã¡ãã»ã¼ã¸ãéä¿¡ããå ´åã¯ã³ã¡ã³ããå¤ãã*/
+
+/* IPv4 ã«é¢ããå®ç¾© */
+
+#define IP4_CFG_FRAGMENT		/* ãã¼ã¿ã°ã©ã ã®åå²ã»åæ§æè¡ãå ´åã¯ã³ã¡ã³ããå¤ãã	*/
+#define NUM_IP4_FRAG_QUEUE	2	/* ãã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼ãµã¤ãº			*/
+#define IP4_CFG_FRAG_REASSM_SIZE	4096	/* IPv4 åæ§æãããã¡ãµã¤ãº			*/
+
+/* IPv6 ã«é¢ããå®ç¾© */
+
+#define NUM_IP6_DAD_COUNT	1	/* éè¤ã¢ãã¬ã¹æ¤åºã§éä¿¡ããè¿é£è¦è«ã®åæ°ã		*/
+					/*  0 ãæå®ããã¨ãéè¤ã¢ãã¬ã¹æ¤åºãè¡ããªãã	*/
+#define NUM_ND6_CACHE_ENTRY	10	/* è¿é£ã­ã£ãã·ã¥ã®ã¨ã³ããªæ°			*/
+
+/*
+ *  IPv6 ç¨ãã¹ãã­ã£ãã·ã¥ã®ã¨ã³ããªæ°ã
+ *  0 ãæå®ããã¨IPv6 ç¨ãã¹ãã­ã£ãã·ã¥ãçµè¾¼ã¾ãªãã
+ */
+#define NUM_IN6_HOSTCACHE_ENTRY	4
+
+#ifdef SUPPORT_ETHER
+
+#define IP6_CFG_AUTO_LINKLOCAL		/* ãªã³ã¯ã­ã¼ã«ã«ã¢ãã¬ã¹ã®èªåè¨­å®ãè¡ãå ´åã¯ã³ã¡ã³ããå¤ãã*/
+
+/*
+ *  ãã£ãã©ã«ãã«ã¼ã¿ãªã¹ãã«é¢ããå®ç¾©
+ */
+
+/*
+ *  ãã£ãã©ã«ãã«ã¼ã¿ãªã¹ãã®ã¨ã³ããªæ°ã
+ *  æå¤§å¤ã¯ 16ã0 ãæå®ããã¨ã«ã¼ã¿éç¥ãåä¿¡ããªãã
+ */
+#define NUM_ND6_DEF_RTR_ENTRY		4
+
+/*
+ *  ãã¬ãã£ãã¯ã¹ãªã¹ãã«é¢ããå®ç¾©ã
+ *  æå¤§å¤ã¯ 16ã
+ */
+#define NUM_ND6_PREFIX_ENTRY		4	/*  ãã¬ãã£ãã¯ã¹ãªã¹ãã®ã¨ã³ããªæ°			*/
+
+/*
+ *  èµ·åæã®ã«ã¼ã¿è¦è«åºååæ°ã
+ *  0 ãæå®ããã¨ã«ã¼ã¿è¦è«ãåºåããªãã
+ */
+#define NUM_ND6_RTR_SOL_RETRY	3	
+
+#define IP6_CFG_FRAGMENT		/* ãã¼ã¿ã°ã©ã ã®åå²ã»åæ§æè¡ãå ´åã¯ã³ã¡ã³ããå¤ãã	*/
+#define NUM_IP6_FRAG_QUEUE	2	/* ãã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼ãµã¤ãº			*/
+#define IP6_CFG_FRAG_REASSM_SIZE	4096	/* IPv6 åæ§æãããã¡ãµã¤ãº			*/
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+/*
+ *  ãã¼ã¿ãªã³ã¯å±¤ (ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹) ã«é¢ããå®ç¾©
+ */
+
+/*
+ *  PPPãã¢ãã ã«é¢ããå®ç¾©
+ */
+
+#define MODEM_CFG_DIAL		"ATD"	/* ãã¤ã¢ã«ã³ãã³ãæå­å			*/
+#define MODEM_CFG_RETRY_CNT	3	/* ãã¤ã¢ã«ãªãã©ã¤åæ°			*/
+#define MODEM_CFG_RETRY_WAIT	10000	/* ãã¤ã¢ã«ãªãã©ã¤ã¾ã§ã®å¾
+ã¡æé [ms]	*/
+
+/*
+ *  PPPãHDLC ã«é¢ããå®ç¾©
+ */
+
+#define DEF_LOCAL_ACCM		ULONG_C(0x000a0000)	/* èªåã® ACCMãXON ã¨ XOFF ã®ã¿å¤æ	*/
+#define DEF_REMOTE_ACCM		ULONG_C(0xffffffff)	/* ç¸æã® ACCMãåæå¤ã¯å
+¨ã¦å¤æ		*/
+
+/*
+ *  PPPãLCP ã«é¢ããå®ç¾©
+ */
+
+#define LCP_CFG_MRU		UINT_C(0x0001)	/* MRU					*/
+#define LCP_CFG_ACCM		UINT_C(0x0002)	/* ACCM					*/
+#define LCP_CFG_MAGIC		UINT_C(0x0004)	/* ãã¸ãã¯çªå·				*/
+#define LCP_CFG_PCOMP		UINT_C(0x0008)	/* ãã­ãã³ã«é¨å§ç¸®æ©è½			*/
+#define LCP_CFG_ACCOMP		UINT_C(0x0010)	/* ã¢ãã¬ã¹ã»å¶å¾¡é¨å§ç¸®			*/
+#define LCP_CFG_PAP		UINT_C(0x0020)	/* PAP					*/
+/*#define LCP_CFG_CHAP		UINT_C(0x0040)	   CHAP ã¯å®è£
+äºå®			*/
+
+#ifdef LCP_CFG_MAGIC
+
+#define LCP_ECHO_INTERVAL	(20*NET_TIMER_HZ)	/* ã¤ã³ã¿ã¼ãã«æé		*/
+#define LCP_ECHO_FAILS		9			/* å¤±æé¾å¤			*/
+
+#endif	/* of #ifdef LCP_CFG_MAGIC */
+
+/*
+ *  PPPãPAP ã«é¢ããå®ç¾©
+ */
+
+#define DEF_PAP_TIMEOUT		(3*NET_TIMER_HZ)
+#define DEF_PAP_REQTIME		(30*NET_TIMER_HZ)	/* ã¿ã¤ã ã¢ã¦ãå¦çãè¡ãã¨ãã¯ã³ã¡ã³ããå¤ãã*/
+#define MAX_PAP_REXMT		10			/* èªè¨¼è¦æ±ã®æå¤§åéåæ°	*/
+
+/*
+ *  MBED Ethernet Controler ã«é¢ããå®ç¾©
+ */
+
+#define NUM_IF_MBED_TXBUF		NUM_OF_TX_DESCRIPTOR	/* éä¿¡ãããã¡æ°			*/
+#define NUM_IF_MBED_RXBUF		NUM_OF_RX_DESCRIPTOR	/* åä¿¡ãããã¡æ°			*/
+
+#define TMO_IF_MBED_GET_NET_BUF	1000	/* [ms]ãåä¿¡ç¨ net_buf ç²å¾ã¿ã¤ã ã¢ã¦ã	*/
+					/* [s]ã éä¿¡ã¿ã¤ã ã¢ã¦ã			*/
+#define TMO_IF_MBED_XMIT		(2*IF_TIMER_HZ)
+
+/*#define IF_MBED_CFG_ACCEPT_ALL		 ãã«ãã­ã£ã¹ããã¨ã©ã¼ãã¬ã¼ã ãåä¿¡ããã¨ãã¯ã³ã¡ã³ããå¤ãã*/
+
+/*
+ *  ã¤ã¼ãµãããåºåæã«ãNIC ã§ net_buf ãéæ¾ããå ´åã«æå®ããã
+ *
+ *  æ³¨æ: ä»¥ä¸ã®æå®ã¯ãæå®ä¾ã§ãããif_mbed ã§ã¯ã
+ *        éæ¾ããªãã®ã§ãä»¥ä¸ã®ã³ã¡ã³ããå¤ãã¦ã¯ãªããªãã
+ */
+
+/*#define ETHER_NIC_CFG_RELEASE_NET_BUF*/
+
+/*
+ *  MBED Ethernet Controler ã«é¢ããå®ç¾©
+ */
+
+#define INHNO_IF_MBED		ETHERI_IRQn		/* IRQ5 */
+#define INTNO_IF_MBED		ETHERI_IRQn		/* IRQ5 */
+#define INTATR_IF_MBED		(TA_NULL)		/* å²è¾¼ã¿å±æ§	*/
+#define INTPRI_IF_MBED		(-1)			/* å²è¾¼ã¿åªå
+åº¦	*/
+
+/*
+ *  ARP ã«é¢ããå®ç¾©
+ */
+
+#define NUM_ARP_ENTRY		10			/* ARP ã­ã£ãã·ã¥ã¨ã³ããªæ°	*/
+
+/*
+ *  DHCP ã«é¢ããå®ç¾©
+ *
+ *    ã»æ³¨æ: TINET ã¯ãDHCP ãå®è£
+ãã¦ããªããå¿ç¨ãã­ã°ã©ã ã§ã
+ *            DHCP ã¡ãã»ã¼ã¸ãåä¿¡ããããã®å®ç¾©ã§ããã
+ *            ã¾ããç¾å¨ã¯ IPv4 ã®ã¿æå¹ã§ããã
+ */
+
+/*#define DHCP_CFG					 DHCP ãå¦çããå ´åã¯ã³ã¡ã³ããå¤ãã*/
+
+/*
+ *  Ethernet ã«é¢ããå®ç¾©
+ */
+
+/*#define ETHER_CFG_ACCEPT_ALL		 ãã«ãã­ã£ã¹ããã¨ã©ã¼ãã¬ã¼ã ãåä¿¡ããã¨ãã¯ã³ã¡ã³ããå¤ãã	*/
+/*#define ETHER_CFG_UNEXP_WARNING	 éãµãã¼ããã¬ã¼ã ã®è­¦åãè¡¨ç¤ºããã¨ãã¯ã³ã¡ã³ããå¤ãã		*/
+/*#define ETHER_CFG_802_WARNING		 IEEE 802.3 ãã¬ã¼ã ã®è­¦åãè¡¨ç¤ºããã¨ãã¯ã³ã¡ã³ããå¤ãã		*/
+/*#define ETHER_CFG_MCAST_WARNING	 ãã«ãã­ã£ã¹ãã®è­¦åãè¡¨ç¤ºããã¨ãã¯ã³ã¡ã³ããå¤ãã		*/
+#define ETHER_CFG_MULTICAST			/* ãã«ãã­ã£ã¹ããéåä¿¡ */
+
+/*
+ *  ã¢ãã¬ã¹ãªã¹ãã«é¢ããå®ç¾©ã
+ */
+#define NUM_IN6_IFADDR_ENTRY		5	/*  ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹ãªã¹ãã®ã¨ã³ããªæ°		*/
+
+/*
+ *  æ±ç¨ãããã¯ã¼ã¯ã«é¢ããå®ç¾©
+ */
+
+/*
+ *  ãããã¯ã¼ã¯ãããã¡ã«é¢ããå®ç¾©
+ */
+
+/* ãããã¯ã¼ã¯ãããã¡æ° */
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  PPP ã§ã¯ãåä¿¡ç¨ã® ãããã¯ã¼ã¯ãããã¡ã¯ PDU (1502) ãµã¤ãºãå¸¸ã«
+ *  å²ãå½ã¦ãªããã°ãªããªãã®ã§ PDU ãµã¤ãºãå¤ãã«ç¢ºä¿ããã
+ */
+
+#ifndef NUM_MPF_NET_BUF_CSEG
+#define NUM_MPF_NET_BUF_CSEG	2	/* IF + IP + TCPã2 ä»¥ä¸*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_CSEG */
+
+#ifndef NUM_MPF_NET_BUF_64
+#define NUM_MPF_NET_BUF_64	0	/* 64 ãªã¯ããã	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_64 */
+
+#ifndef NUM_MPF_NET_BUF_128
+#define NUM_MPF_NET_BUF_128	0	/* 128 ãªã¯ããã	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_128 */
+
+#ifndef NUM_MPF_NET_BUF_256
+#define NUM_MPF_NET_BUF_256	0	/* 256 ãªã¯ããã	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_256 */
+
+#ifndef NUM_MPF_NET_BUF_512
+#define NUM_MPF_NET_BUF_512	0	/* 512 ãªã¯ããã	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_512 */
+
+#ifndef NUM_MPF_NET_BUF_1024
+#define NUM_MPF_NET_BUF_1024	0	/* 1024 ãªã¯ããã	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_1024 */
+
+#ifndef NUM_MPF_NET_BUF_IF_PDU
+#define NUM_MPF_NET_BUF_IF_PDU	2	/* IF æå¤§ PDU ãµã¤ãº	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_IF_PDU */
+
+#ifndef NUM_MPF_NET_BUF4_REASSM
+
+#if defined(SUPPORT_INET4) && defined(IP4_CFG_FRAGMENT)
+#define NUM_MPF_NET_BUF4_REASSM	2	/* IPv4 åæ§æãããã¡ãµã¤ãº	*/
+#else
+#define NUM_MPF_NET_BUF4_REASSM	0	/* IPv4 åæ§æãããã¡ãµã¤ãº	*/
+#endif
+
+#endif	/* of #ifndef NUM_MPF_NET_BUF4_REASSM */
+
+#ifndef NUM_MPF_NET_BUF6_REASSM
+
+#if defined(SUPPORT_INET6) && defined(IP6_CFG_FRAGMENT)
+#define NUM_MPF_NET_BUF6_REASSM	2	/* IPv6 åæ§æãããã¡ãµã¤ãº	*/
+#else
+#define NUM_MPF_NET_BUF6_REASSM	0	/* IPv6 åæ§æãããã¡ãµã¤ãº	*/
+#endif
+
+#endif	/* of #ifndef NUM_MPF_NET_BUF6_REASSM */
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#ifdef SUPPORT_ETHER
+
+/*
+ *  ã¤ã¼ãµãããã®å ´åã®ãããã¯ã¼ã¯ãããã¡æ°ã®å²ãå½ã¦
+ */
+
+/*
+ *  æ³¨æ!!
+ *
+ *  MBED Ethernet Controler ã®ãã£ãã¤ã¹ãã©ã¤ãï¼if_mbedï¼ã®æä½å²å½ã¦é·ã¯
+ *  60ï¼ã¢ã©ã¤ã³ãã¦ 62ï¼ãªã¯ãããã®ãã IF + IP +TCP ããã¯
+ *  64 ãªã¯ãããã®ãããã¯ã¼ã¯ãããã¡ã®æ¹ãæé©ã§ããã
+ */
+
+#ifndef NUM_MPF_NET_BUF_CSEG
+#define NUM_MPF_NET_BUF_CSEG	0	/* IF + IP + TCP	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_CSEG */
+
+#ifndef NUM_MPF_NET_BUF_64
+#define NUM_MPF_NET_BUF_64	2	/* 64 ãªã¯ããã	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_64 */
+
+#ifndef NUM_MPF_NET_BUF_128
+#define NUM_MPF_NET_BUF_128	0	/* 128 ãªã¯ããã	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_128 */
+
+#ifndef NUM_MPF_NET_BUF_256
+#define NUM_MPF_NET_BUF_256	0	/* 256 ãªã¯ããã	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_256 */
+
+#ifndef NUM_MPF_NET_BUF_512
+#define NUM_MPF_NET_BUF_512	0	/* 512 ãªã¯ããã	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_512 */
+
+#if defined(SUPPORT_INET4)
+
+#ifndef NUM_MPF_NET_BUF_IP_MSS
+#define NUM_MPF_NET_BUF_IP_MSS	0	/* IF + 576 ãªã¯ããã	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_IP_MSS */
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#ifndef NUM_MPF_NET_BUF_1024
+#define NUM_MPF_NET_BUF_1024	0	/* 1024 ãªã¯ããã	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_1024 */
+
+#if defined(SUPPORT_INET6)
+
+#ifndef NUM_MPF_NET_BUF_IPV6_MMTU
+#define NUM_MPF_NET_BUF_IPV6_MMTU	0	/* IF + 1280	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_IPV6_MMTU */
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+#ifndef NUM_MPF_NET_BUF_IF_PDU
+#define NUM_MPF_NET_BUF_IF_PDU	4	/* IF æå¤§ PDU ãµã¤ãº	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_IF_PDU */
+
+#ifndef NUM_MPF_NET_BUF4_REASSM
+
+#if defined(SUPPORT_INET4) && defined(IP4_CFG_FRAGMENT)
+#define NUM_MPF_NET_BUF4_REASSM	2	/* IPv4 åæ§æãããã¡ãµã¤ãº	*/
+#else
+#define NUM_MPF_NET_BUF4_REASSM	0	/* IPv4 åæ§æãããã¡ãµã¤ãº	*/
+#endif
+
+#endif	/* of #ifndef NUM_MPF_NET_BUF4_REASSM */
+
+#ifndef NUM_MPF_NET_BUF6_REASSM
+
+#if defined(SUPPORT_INET6) && defined(IP6_CFG_FRAGMENT)
+#define NUM_MPF_NET_BUF6_REASSM	2	/* IPv6 åæ§æãããã¡ãµã¤ãº	*/
+#else
+#define NUM_MPF_NET_BUF6_REASSM	0	/* IPv6 åæ§æãããã¡ãµã¤ãº	*/
+#endif
+
+#endif	/* of #ifndef NUM_MPF_NET_BUF6_REASSM */
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#ifdef SUPPORT_LOOP
+
+#ifndef NUM_MPF_NET_BUF_CSEG
+#define NUM_MPF_NET_BUF_CSEG	2	/* IF + IP + TCP	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_CSEG */
+
+#ifndef NUM_MPF_NET_BUF_64
+#define NUM_MPF_NET_BUF_64	0	/* 64 ãªã¯ããã	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_64 */
+
+#ifndef NUM_MPF_NET_BUF_128
+#define NUM_MPF_NET_BUF_128	0	/* 128 ãªã¯ãããã2 ä»¥ä¸	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_128 */
+
+#ifndef NUM_MPF_NET_BUF_256
+#define NUM_MPF_NET_BUF_256	0	/* 256 ãªã¯ããã	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_256 */
+
+#ifndef NUM_MPF_NET_BUF_512
+#define NUM_MPF_NET_BUF_512	0	/* 512 ãªã¯ããã	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_512 */
+
+#ifndef NUM_MPF_NET_BUF_1024
+#define NUM_MPF_NET_BUF_1024	0	/* 1024 ãªã¯ããã	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_1024 */
+
+#ifndef NUM_MPF_NET_BUF_IF_PDU
+#define NUM_MPF_NET_BUF_IF_PDU	4	/* IF æå¤§ PDU ãµã¤ãº	*/
+#endif	/* of #ifndef NUM_MPF_NET_BUF_IF_PDU */
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+/*
+ *  ãããã¯ã¼ã¯çµ±è¨æ
+å ±ã®è¨æ¸¬
+ *
+ *  ãããã¯ã¼ã¯çµ±è¨æ
+å ±ã®è¨æ¸¬ãè¡ãå ´åã¯ãtinet/include/net/net.h
+ *  ã§å®ç¾©ããã¦ãããã­ãã³ã«è­å¥ãã©ã°ãæå®ããã
+ */
+
+#if 1
+
+#ifdef SUPPORT_INET4
+
+#define NET_COUNT_ENABLE	(0			\
+				| PROTO_FLG_PPP_HDLC	\
+				| PROTO_FLG_PPP_PAP	\
+				| PROTO_FLG_PPP_LCP	\
+				| PROTO_FLG_PPP_IPCP	\
+				| PROTO_FLG_PPP		\
+				| PROTO_FLG_LOOP	\
+				| PROTO_FLG_ETHER_NIC	\
+				| PROTO_FLG_ETHER	\
+				| PROTO_FLG_ARP		\
+				| PROTO_FLG_IP4		\
+				| PROTO_FLG_ICMP4	\
+				| PROTO_FLG_UDP		\
+				| PROTO_FLG_TCP		\
+				| PROTO_FLG_NET_BUF	\
+				)
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+#define NET_COUNT_ENABLE	(0			\
+				| PROTO_FLG_PPP_HDLC	\
+				| PROTO_FLG_PPP_PAP	\
+				| PROTO_FLG_PPP_LCP	\
+				| PROTO_FLG_PPP_IPCP	\
+				| PROTO_FLG_PPP		\
+				| PROTO_FLG_LOOP	\
+				| PROTO_FLG_ETHER_NIC	\
+				| PROTO_FLG_ETHER	\
+				| PROTO_FLG_IP6		\
+				| PROTO_FLG_ICMP6	\
+				| PROTO_FLG_ND6		\
+				| PROTO_FLG_UDP		\
+				| PROTO_FLG_TCP		\
+				| PROTO_FLG_NET_BUF	\
+				)
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#else	/* of #if 0 */
+
+#define NET_COUNT_ENABLE	(0			\
+				)
+
+#endif	/* of #if 0 */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  é¢æ°
+ */
+
+extern void mbed_bus_init (void);
+extern void mbed_inter_init (void);
+
+#endif	/* of #ifndef TOPPERS_MACRO_ONLY */
+
+#endif /* _TINET_TARGET_CONFIG_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tinet_target_defs.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tinet_target_defs.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/target/gr_peach_gcc/tinet_target_defs.h	(revision 270)
@@ -0,0 +1,62 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _TINET_TARGET_DEFS_H_
+#define _TINET_TARGET_DEFS_H_
+
+/*
+ *  ãããã¯ã¼ã¯ã«é¢ããå®ç¾©
+ */
+
+/*
+ *  CPU ã®ã¢ã©ã¤ã¡ã³ãã«é¢ããå®ç¾©
+ *
+ *  4 ãªã¯ãããåä½ã§ãã¢ã©ã¤ã³ããå¿
+è¦ãããå ´åã¯ 4 ãæå®ããã
+ */
+
+#define CPU_NET_ALIGN		2
+
+#endif /* _TINET_TARGET_DEFS_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/init_tecs.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/init_tecs.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/init_tecs.c	(revision 270)
@@ -0,0 +1,13 @@
+/*
+ *		TECSã®åæåå¦ç
+ *
+ *  $Id$
+ */
+
+#include "global_tecsgen.h"
+
+void
+initialize_tecs(void)
+{
+	INITIALIZE_TECS();
+}
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/kernel.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/kernel.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/kernel.cdl	(revision 270)
@@ -0,0 +1,815 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015,2016 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		TOPPERS/ASPã«ã¼ãã«ãªãã¸ã§ã¯ã ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+ */
+
+/*
+ *  ã«ã¼ãã«ãªãã¸ã§ã¯ãã®ã³ã³ãã¼ãã³ãåã®ããã®ããããã¡ã¤ã«
+ */
+import_C("tecs_kernel.h");
+
+/*
+ *  ã«ã¼ãã«æä½ã®ã·ã°ããã£ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+signature sKernel {
+	ER		getExtendedInformation([out] intptr_t *p_exinf);
+
+	ER		sleep(void);
+	ER		sleepTimeout([in] TMO timeout);
+	ER		delay([in] RELTIM delayTime);
+
+	ER		exit(void);
+	ER		disableTerminate(void);
+	ER		enableTerminate(void);
+	bool_t	senseTerminate(void);
+
+	ER		setTime([in] SYSTIM systemTime);
+	ER		getTime([out] SYSTIM *p_systemTime);
+	ER		adjustTime([in] int32_t adjustTime);
+	HRTCNT	fetchHighResolutionTimer(void);
+
+	ER		rotateReadyQueue([in] PRI taskPriority);
+	ER		getTaskId([out] ID *p_taskId);
+	ER		getLoad([in] PRI taskPriority, [out] uint_t *p_load);
+	ER		getNthTask([in] PRI taskPriority, [in] uint_t nth,
+												[out] ID *p_taskID);
+	ER		lockCpu(void);
+	ER		unlockCpu(void);
+	ER		disableDispatch(void);
+	ER		enableDispatch(void);
+	bool_t	senseContext(void);
+	bool_t	senseLock(void);
+	bool_t	senseDispatch(void);
+	bool_t	senseDispatchPendingState(void);
+	bool_t	senseKernel(void);
+	ER		exitKernel(void);
+
+	ER		changeInterruptPriorityMask([in] PRI interruptPriority);
+	ER		getInterruptPriorityMask([out] PRI *p_interruptPriority);
+};
+
+/*
+ *  ã«ã¼ãã«æä½ã®ã·ã°ããã£ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+[context("non-task")]
+signature siKernel {
+	HRTCNT	fetchHighResolutionTimer(void);
+
+	ER		rotateReadyQueue([in] PRI taskPriority);
+	ER		getTaskId([out]ID *p_taskId);
+	ER		lockCpu(void);
+	ER		unlockCpu(void);
+	bool_t	senseContext(void);
+	bool_t	senseLock(void);
+	bool_t	senseDispatch(void);
+	bool_t	senseDispatchPendingState(void);
+	bool_t	senseKernel(void);
+	ER		exitKernel(void);
+
+	/* CPUä¾å¤ãã³ãã©ä¸­ã§ä½¿ç¨ãã */
+	bool_t	exceptionSenseDispatchPendingState
+						([in] const void *p_exceptionInformation);
+};
+
+/*
+ *  ã«ã¼ãã«ã®ã»ã«ã¿ã¤ã
+ */
+[singleton]
+celltype tKernel {
+	[inline] entry	sKernel		eKernel;
+	[inline] entry	siKernel	eiKernel;
+};
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ãéç¥ãåãåãããã®ã·ã°ããã£
+ */
+[context("non-task")]
+signature siNotificationHandler {
+};
+
+/*
+ *  ã¿ã¹ã¯æ¬ä½ã®ã·ã°ããã£
+ */
+signature sTaskBody {
+	void	main(void);
+};
+
+/*
+ *  ã¿ã¹ã¯æä½ã®ã·ã°ããã£ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+signature sTask {
+	ER		activate(void);
+	ER_UINT	cancelActivate(void);
+	ER		getTaskState([out] STAT *p_tskstat);
+	ER		changePriority([in] PRI priority);
+	ER		getPriority([out] PRI *p_priority);
+	ER		refer([out] T_RTSK *pk_taskStatus);
+
+	ER		wakeup(void);
+	ER_UINT	cancelWakeup(void);
+	ER		releaseWait(void);
+	ER		suspend(void);
+	ER		resume(void);
+
+	ER		raiseTerminate(void);
+	ER		terminate(void);
+};
+
+/*
+ *  ã¿ã¹ã¯æä½ã®ã·ã°ããã£ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+[context("non-task")]
+signature siTask {
+	ER		activate(void);
+	ER		wakeup(void);
+	ER		releaseWait(void);
+};
+
+/*
+ *  ã¿ã¹ã¯ã®ã»ã«ã¿ã¤ã
+ */
+[active]
+celltype tTask {
+	[inline] entry	sTask	eTask;
+	[inline] entry	siTask	eiTask;
+	call	sTaskBody	cTaskBody;
+
+	[inline] entry	siNotificationHandler	eiActivateNotificationHandler;
+	[inline] entry	siNotificationHandler	eiWakeUpNotificationHandler;
+
+	attr {
+		ID				id = C_EXP("TSKID_$id$");
+		[omit] ATR		attribute = C_EXP("TA_NULL");
+		[omit] PRI		priority;
+		[omit] size_t	stackSize;
+	};
+
+	factory {
+		write("tecsgen.cfg",
+				"CRE_TSK(%s, { %s, $cbp$, tTask_start, %s, %s, NULL });",
+									id, attribute, priority, stackSize);
+	};
+	FACTORY {
+		write("tecsgen.cfg", "#include \"$ct$_tecsgen.h\"");
+		write("$ct$_factory.h", "#include \"kernel_cfg.h\"");
+	};
+};
+
+/*
+ *  ã»ããã©æä½ã®ã·ã°ããã£ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+signature sSemaphore {
+	ER		signal(void);
+	ER		wait(void);
+	ER		waitPolling(void);
+	ER		waitTimeout([in] TMO timeout);
+	ER		initialize(void);
+	ER		refer([out] T_RSEM *pk_semaphoreStatus);
+};
+
+/*
+ *  ã»ããã©æä½ã®ã·ã°ããã£ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+[context("non-task")]
+signature siSemaphore {
+	ER		signal(void);
+};
+
+/*
+ *  ã»ããã©ã®ã»ã«ã¿ã¤ã
+ */
+celltype tSemaphore {
+	[inline] entry	sSemaphore	eSemaphore;
+	[inline] entry	siSemaphore	eiSemaphore;
+
+	[inline] entry	siNotificationHandler	eiNotificationHandler;
+
+	attr {
+		ID				id = C_EXP("SEMID_$id$");
+		[omit] ATR		attribute = C_EXP("TA_NULL");
+		[omit] uint_t	initialCount;
+		[omit] uint_t	maxCount = 1;
+	};
+
+	factory {
+		write("tecsgen.cfg", "CRE_SEM(%s, { %s, %s, %s });",
+								id, attribute, initialCount, maxCount);
+	};
+	FACTORY {
+		write("$ct$_factory.h", "#include \"kernel_cfg.h\"");
+	};
+};
+
+/*
+ *  ã¤ãã³ããã©ã°æä½ã®ã·ã°ããã£ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+signature sEventflag {
+	ER		set([in] FLGPTN setPattern);
+	ER		clear([in] FLGPTN clearPattern);
+	ER		wait([in] FLGPTN waitPattern, [in] MODE waitMode,
+											[out] FLGPTN *p_flagPattern);
+	ER		waitPolling([in] FLGPTN waitPattern, [in] MODE waitMode,
+											[out] FLGPTN *p_flagPattern);
+	ER		waitTimeout([in] FLGPTN waitPattern, [in] MODE waitMode,
+							[out] FLGPTN *p_flagPattern, [in] TMO timeout);
+	ER		initialize(void);
+	ER		refer([out] T_RFLG *pk_eventflagStatus);
+};
+
+/*
+ *  ã¤ãã³ããã©ã°æä½ã®ã·ã°ããã£ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+[context("non-task")]
+signature siEventflag {
+	ER		set([in] FLGPTN setPattern);
+};
+
+/*
+ *  ã¤ãã³ããã©ã°ã®ã»ã«ã¿ã¤ã
+ */
+celltype tEventflag {
+	[inline] entry	sEventflag	eEventflag;
+	[inline] entry	siEventflag	eiEventflag;
+
+	[inline] entry	siNotificationHandler	eiNotificationHandler;
+
+	attr {
+		ID				id = C_EXP("FLGID_$id$");
+		[omit] ATR		attribute = C_EXP("TA_NULL");
+		[omit] FLGPTN	flagPattern;
+	};
+
+	factory {
+		write("tecsgen.cfg", "CRE_FLG(%s, { %s, %s });",
+									id, attribute, flagPattern);
+	};
+	FACTORY {
+		write("$ct$_factory.h", "#include \"kernel_cfg.h\"");
+	};
+};
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼æä½ã®ã·ã°ããã£ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+signature sDataqueue {
+	ER 		send([in] intptr_t data);
+	ER 		sendPolling([in] intptr_t data);
+	ER 		sendTimeout([in] intptr_t data, [in] TMO timeout);
+	ER 		sendForce([in] intptr_t data);
+	ER 		receive([out] intptr_t *p_data);
+	ER 		receivePolling([out] intptr_t *p_Data);
+	ER 		receiveTimeout([out] intptr_t *p_data, [in] TMO timeout);
+	ER 		initialize(void);
+	ER 		refer([out] T_RDTQ *pk_dataqueueStatus);
+};
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼æä½ã®ã·ã°ããã£ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+[context("non-task")]
+signature siDataqueue {
+	ER		sendPolling([in] intptr_t data);
+	ER		sendForce([in] intptr_t data);
+};
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã®ã»ã«ã¿ã¤ã
+ */
+celltype tDataqueue {
+	[inline] entry	sDataqueue	eDataqueue;
+	[inline] entry	siDataqueue	eiDataqueue;
+
+	[inline] entry	siNotificationHandler	eiNotificationHandler;
+
+	attr {
+		ID				id = C_EXP("DTQID_$id$");
+		[omit] ATR		attribute = C_EXP("TA_NULL");
+		[omit] uint_t	dataCount = 1;
+		[omit] void		*dataqueueManagementBuffer = C_EXP("NULL");
+	};
+
+	factory {
+		write("tecsgen.cfg", "CRE_DTQ(%s, { %s, %s, %s });",
+						id, attribute, dataCount, dataqueueManagementBuffer);
+	};
+	FACTORY {
+		write("$ct$_factory.h", "#include \"kernel_cfg.h\"");
+	};
+};
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼æä½ã®ã·ã°ããã£ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+signature sPriorityDataqueue {
+	ER 		send([in] intptr_t data, [in] PRI dataPriority);
+	ER 		sendPolling([in] intptr_t data, [in] PRI dataPriority);
+	ER 		sendTimeout([in] intptr_t data, [in] PRI dataPriority,
+													[in] TMO timeout);
+	ER 		receive([out] intptr_t *p_data, [out] PRI *p_dataPriority);
+	ER 		receivePolling([out] intptr_t *p_data, [out] PRI *p_dataPriority);
+ 	ER 		receiveTimeout([out] intptr_t *p_data, [out] PRI *p_dataPriority,
+													[in] TMO timeout);
+	ER 		initialize(void);
+	ER 		refer([out] T_RPDQ *pk_priorityDataqueueStatus);
+};
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼æä½ã®ã·ã°ããã£ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+[context("non-task")]
+signature siPriorityDataqueue {
+	ER		sendPolling([in] intptr_t data, [in] PRI dataPriority);
+};
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã®ã»ã«ã¿ã¤ã
+ */
+celltype tPriorityDataqueue {
+	[inline] entry	sPriorityDataqueue	ePriorityDataqueue;
+	[inline] entry	siPriorityDataqueue	eiPriorityDataqueue;
+
+	attr {
+		ID				id = C_EXP("PDTQID_$id$");
+		[omit] ATR		attribute = C_EXP("TA_NULL");
+		[omit] uint_t	dataCount = 1;
+		[omit] PRI		maxDataPriority;
+		[omit] void		*priorityDataqueueManagementBuffer = C_EXP("NULL");
+	};
+
+	factory {
+		write("tecsgen.cfg", "CRE_PDQ(%s, { %s, %s, %s, %s});",
+								id, attribute, dataCount, maxDataPriority,
+								priorityDataqueueManagementBuffer);
+	};
+	FACTORY {
+		write("$ct$_factory.h", "#include \"kernel_cfg.h\"");
+	};
+};
+
+/*
+ *  ãã¥ã¼ããã¯ã¹æä½ã®ã·ã°ããã£ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+signature sMutex {
+	ER		lock(void);
+	ER		lockPolling(void);
+	ER		lockTimeout([in] TMO timeout);
+	ER		unlock(void);
+	ER		initialize(void);
+	ER		refer([out] T_RSEM *pk_mutexStatus);
+};
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®ã»ã«ã¿ã¤ã
+ */
+celltype tMutex {
+	[inline] entry	sMutex	eMutex;
+
+	attr {
+		ID				id = C_EXP("MTXID_$id$");
+		[omit] ATR		attribute = C_EXP("TA_NULL");
+		[omit] PRI		ceilingPriority;
+	};
+
+	factory {
+		write("tecsgen.cfg", "CRE_MTX(%s, { %s, %s });",
+								id, attribute, ceilingPriority);
+	};
+	FACTORY {
+		write("$ct$_factory.h", "#include \"kernel_cfg.h\"");
+	};
+};
+
+/*
+ *  åºå®é·ã¡ã¢ãªã¡ã¢ãªãã¼ã«æä½ã®ã·ã°ããã£ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+[deviate]
+signature sFixedSizeMemoryPool {
+	ER 		get([out] void **p_block);
+	ER 		getPolling([out] void **p_block);
+	ER 		getTimeout([out] void **p_block, [in] TMO timeout);
+	ER 		release([in] const void *block);
+	ER 		initialize(void);
+	ER 		refer([out] T_RMPF *pk_fixedSizeMemoryPoolStatus);
+};
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«ã®ã»ã«ã¿ã¤ã
+ */
+celltype tFixedSizeMemoryPool {
+	[inline] entry	sFixedSizeMemoryPool	eFixedSizeMemoryPool;
+
+	attr {
+		ID				id = C_EXP("MPFID_$id$");
+		[omit] ATR		attribute = C_EXP("TA_NULL");
+		[omit] uint_t	blockCount;
+		[omit] uint_t	blockSize;
+		[omit] MPF_T	*memoryPool = C_EXP("NULL");
+		[omit] void 	*memoryPoolManagementBuffer = C_EXP("NULL");
+	};
+
+	factory {
+		write("tecsgen.cfg", "CRE_MPF(%s, {%s, %s, %s, %s, %s});",
+								id, attribute, blockCount, blockSize,
+								memoryPool, memoryPoolManagementBuffer);
+	};
+	FACTORY {
+		write("$ct$_factory.h", "#include \"kernel_cfg.h\"");
+	};
+};
+
+/*
+ *  ãã³ãã©æ¬ä½ã®ã·ã°ããã£
+ */
+[context("non-task")]
+signature siHandlerBody {
+	void	main(void);
+};
+
+/*
+ *  ã¿ã¤ã ã¤ãã³ããã³ãã©ãæå®ããããã®ã»ã«ã¿ã¤ã
+ */
+celltype tTimeEventHandler {
+	entry		siNotificationHandler	eiNotificationHandler;
+	[omit] call	siHandlerBody			ciHandlerBody;
+
+	FACTORY {
+		write("tecsgen.cfg", "#include \"$ct$_tecsgen.h\"");
+	};
+};
+
+/*
+ *  å¨æéç¥ãæä½ããããã®ã·ã°ããã£ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+signature sCyclic {
+	ER		start(void);
+	ER		stop(void);
+	ER		refer([out]T_RCYC *pk_cyclicHandlerStatus);
+};
+
+/*
+ *  å¨æéç¥ã®ã»ã«ã¿ã¤ã
+ */
+[active, generate(NotifierPlugin,
+	"factory=\"CRE_CYC({{id}}, { {{attribute}}, { {{_handler_params_}} }, "
+	"{{cycleTime}}, {{cyclePhase}} });\", output_file=tecsgen.cfg")]
+celltype tCyclicNotifier {
+	[inline] entry	sCyclic		eCyclic;
+
+	call			siNotificationHandler	ciNotificationHandler;
+	[optional] call siNotificationHandler	ciErrorNotificationHandler;
+
+	attr {
+		ID				id = C_EXP("ALMID_$id$");
+		[omit] ATR		attribute = C_EXP("TA_NULL");
+		[omit] bool_t	ignoreErrors = false;
+		[omit] RELTIM	cycleTime;
+		[omit] RELTIM	cyclePhase = 0;
+
+		/* å¤æ°ã®è¨­å®ã«ããéç¥ï¼TNFY_SETVARï¼*/
+		[omit] intptr_t *setVariableAddress = 0;
+		[omit] intptr_t setVariableValue = 0;
+
+		/* å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ãã«ããéç¥ï¼TNFY_INCVARï¼*/
+		[omit] intptr_t *incrementedVariableAddress = 0;
+
+		/* ã¤ãã³ããã©ã°ã®ã»ããã«ããéç¥ï¼TNFY_SETFLGï¼*/
+		[omit] FLGPTN flagPattern = 0;
+
+		/* ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããéç¥ï¼TNFY_SNDDTQï¼*/
+		[omit] intptr_t dataqueueSentValue = 0;
+
+		/* å¤æ°ã®è¨­å®ã«ããã¨ã©ã¼éç¥ï¼TENFY_SETVARï¼*/
+		[omit] intptr_t *setVariableAddressForError = 0;
+
+		/* å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ãã«ããã¨ã©ã¼éç¥ï¼TENFY_INCVARï¼*/
+		[omit] intptr_t *incrementedVariableAddressForError = 0;
+
+		/* ã¤ãã³ããã©ã°ã®ã»ããã«ããã¨ã©ã¼éç¥ï¼TENFY_SETFLGï¼*/
+		[omit] FLGPTN flagPatternForError = 0;
+	};
+
+	FACTORY {
+		write("$ct$_factory.h", "#include \"kernel_cfg.h\"");
+	};
+};
+
+/*
+ *  å¨æéç¥ã«ã¦ã¼ã¶ã¼ãã³ãã©ãæå®ããããã®è¤åã»ã«ã¿ã¤ã
+ */
+[active]
+composite tCyclicHandler {
+	entry		sCyclic			eCyclic;
+	[omit] call	siHandlerBody	ciHandlerBody;
+
+	attr {
+		ID				id = C_EXP("ALMID_$id$");
+		[omit] ATR		attribute = C_EXP("TA_NULL");
+		[omit] RELTIM	cycleTime;
+		[omit] RELTIM	cyclePhase = 0;
+	};
+
+	cell tCyclicNotifier CyclicNotifier {
+		id = composite.id;
+		attribute = composite.attribute;
+		ciNotificationHandler = TimeEventHandler.eiNotificationHandler;
+		cycleTime = composite.cycleTime;
+		cyclePhase = composite.cyclePhase;
+	};
+
+	cell tTimeEventHandler TimeEventHandler {
+		ciHandlerBody => composite.ciHandlerBody;
+	};
+
+	eCyclic => CyclicNotifier.eCyclic;
+};
+
+/*
+ *  ã¢ã©ã¼ã éç¥ãæä½ããããã®ã·ã°ããã£ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+signature sAlarm {
+	ER		start([in] RELTIM alarmTime);
+	ER		stop(void);
+	ER		refer([out]T_RALM *pk_alarmStatus);
+};
+
+/*
+ *  ã¢ã©ã¼ã éç¥ãæä½ããããã®ã·ã°ããã£ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+[context("non-task")]
+signature siAlarm {
+	ER		start([in] RELTIM alarmTime);
+	ER		stop(void);
+};
+
+/*
+ *  ã¢ã©ã¼ã éç¥ã®ã»ã«ã¿ã¤ã
+ */
+[active, generate(NotifierPlugin,
+	"factory=\"CRE_ALM({{id}}, { {{attribute}}, {{{_handler_params_}}} });\", "
+	"output_file=tecsgen.cfg")]
+celltype tAlarmNotifier {
+	[inline] entry	sAlarm		eAlarm;
+	[inline] entry	siAlarm		eiAlarm;
+
+	call			siNotificationHandler	ciNotificationHandler;
+	[optional] call	siNotificationHandler	ciErrorNotificationHandler;
+
+	attr {
+		ID				id = C_EXP("ALMID_$id$");
+		[omit] ATR		attribute = C_EXP("TA_NULL");
+		[omit] bool_t	ignoreErrors = false;
+
+		/* å¤æ°ã®è¨­å®ã«ããéç¥ï¼TNFY_SETVARï¼*/
+		[omit] intptr_t *setVariableAddress = 0;
+		[omit] intptr_t setVariableValue = 0;
+
+		/* å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ãã«ããéç¥ï¼TNFY_INCVARï¼*/
+		[omit] intptr_t *incrementedVariableAddress = 0;
+
+		/* ã¤ãã³ããã©ã°ã®ã»ããã«ããéç¥ï¼TNFY_SETFLGï¼*/
+		[omit] FLGPTN flagPattern = 0;
+
+		/* ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããéç¥ï¼TNFY_SNDDTQï¼*/
+		[omit] intptr_t dataqueueSentValue = 0;
+
+		/* å¤æ°ã®è¨­å®ã«ããã¨ã©ã¼éç¥ï¼TENFY_SETVARï¼*/
+		[omit] intptr_t *setVariableAddressForError = 0;
+
+		/* å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ãã«ããã¨ã©ã¼éç¥ï¼TENFY_INCVARï¼*/
+		[omit] intptr_t *incrementedVariableAddressForError = 0;
+
+		/* ã¤ãã³ããã©ã°ã®ã»ããã«ããã¨ã©ã¼éç¥ï¼TENFY_SETFLGï¼*/
+		[omit] FLGPTN flagPatternForError = 0;
+	};
+
+	FACTORY {
+		write("$ct$_factory.h", "#include \"kernel_cfg.h\"");
+	};
+};
+
+/*
+ *  ã¢ã©ã¼ã éç¥ã«ã¦ã¼ã¶ã¼ãã³ãã©ãæå®ããããã®è¤åã»ã«ã¿ã¤ã
+ */
+[active]
+composite tAlarmHandler {
+	entry		sAlarm			eAlarm;
+	entry		siAlarm			eiAlarm;
+	[omit] call	siHandlerBody	ciHandlerBody;
+
+	attr {
+		ID			id = C_EXP("ALMID_$id$");
+		[omit] ATR	attribute = C_EXP("TA_NULL");
+	};
+
+	cell tAlarmNotifier AlarmNotifier {
+		id = composite.id;
+		attribute = composite.attribute;
+		ciNotificationHandler = TimeEventHandler.eiNotificationHandler;
+	};
+
+	cell tTimeEventHandler TimeEventHandler {
+		ciHandlerBody => composite.ciHandlerBody;
+	};
+
+	eAlarm => AlarmNotifier.eAlarm;
+	eiAlarm => AlarmNotifier.eiAlarm;
+};
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³æä½ã®ã·ã°ããã£ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+signature sInterruptRequest {
+	ER		disable(void);
+	ER		enable(void);
+};
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®ã»ã«ã¿ã¤ã
+ */
+celltype tInterruptRequest {
+	[inline] entry	sInterruptRequest	eInterruptRequest;
+
+	attr {
+		INTNO			interruptNumber;
+		[omit] ATR		attribute = C_EXP("TA_NULL");
+		[omit] PRI		interruptPriority;
+	};
+
+	factory {
+		write("tecsgen.cfg", "CFG_INT(%s, { %s, %s });",
+							interruptNumber, attribute, interruptPriority);
+	};
+};
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®ã»ã«ã¿ã¤ã
+ */
+[active]
+celltype tISR {
+	call	siHandlerBody	ciISRBody;
+
+	attr {
+		ID				id = C_EXP("ISRID_$id$");
+		[omit] ATR		attribute = C_EXP("TA_NULL");
+		[omit] INTNO	interruptNumber;
+		[omit] PRI		isrPriority = 1;
+	};
+
+	factory {
+		write("tecsgen.cfg", "CRE_ISR(%s, { %s, $cbp$, %s, tISR_start, %s });",
+								id, attribute, interruptNumber, isrPriority);
+	};
+	FACTORY {
+		write("tecsgen.cfg", "#include \"$ct$_tecsgen.h\"");
+		write("$ct$_factory.h", "#include \"kernel_cfg.h\"");
+	};
+};
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©ã®ã»ã«ã¿ã¤ã
+ */
+[active]
+celltype tInterruptHandler {
+	call	siHandlerBody	ciInterruptHandlerBody;
+
+	attr {
+		INHNO			interruptHandlerNumber;
+		[omit] ATR		attribute = C_EXP("TA_NULL");
+	};
+
+	factory {
+		write("tecsgen.cfg",
+				"DEF_INH(%s, { %s, tInterruptHandler_start });", attribute);
+	};
+	FACTORY {
+		write("tecsgen.cfg", "#include \"$ct$_tecsgen.h\"");
+	};
+};
+
+/*
+ *  CPUä¾å¤ãã³ãã©ã®ã»ã«ã¿ã¤ã
+ */
+[active]
+celltype tCpuExceptionHandler {
+	call	siHandlerBody	ciCpuExceptionHandlerBody;
+
+	attr {
+		EXCNO			cpuExceptionHandlerNumber;
+		[omit] ATR		attribute = C_EXP("TA_NULL");
+	};
+
+	factory {
+		write("tecsgen.cfg",
+				"DEF_EXC(%s, { %s, tCpuExceptionHandler_start });", attribute);
+	};
+	FACTORY {
+		write("tecsgen.cfg", "#include \"$ct$_tecsgen.h\"");
+	};
+};
+
+/*
+ *  åæåï¼çµäºå¦çã«ã¼ãã³æ¬ä½ã®ã·ã°ããã£
+ */
+signature sRoutineBody {
+	void	main(void);
+};
+
+/*
+ *  åæåã«ã¼ãã³ã®ã»ã«ã¿ã¤ã
+ */
+[active]
+celltype tInitializeRoutine {
+	call	sRoutineBody	cInitializeRoutineBody;
+
+	attr {
+		[omit] ATR		attribute = C_EXP("TA_NULL");
+	};
+
+	factory {
+		write("tecsgen.cfg",
+				"ATT_INI({ %s, $cbp$, tInitializeRoutine_start });",
+															attribute);
+	};
+	FACTORY {
+		write("tecsgen.cfg", "#include \"$ct$_tecsgen.h\"");
+	};
+};
+
+/*
+ *  çµäºå¦çã«ã¼ãã³ã®ã»ã«ã¿ã¤ã
+ */
+[active]
+celltype tTerminateRoutine {
+	call	sRoutineBody	cTerminateRoutineBody;
+
+	attr {
+		[omit] ATR		attribute = C_EXP("TA_NULL");
+	};
+
+	factory {
+		write("tecsgen.cfg",
+				"ATT_TER({ %s, $cbp$, tTerminateRoutine_start });", attribute);
+	};
+	FACTORY {
+		write("tecsgen.cfg", "#include \"$ct$_tecsgen.h\"");
+	};
+};
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tAlarmNotifier.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tAlarmNotifier.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tAlarmNotifier.c	(revision 270)
@@ -0,0 +1,58 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+#include "tAlarmNotifier_tecsgen.h"
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tAlarmNotifier_inline.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tAlarmNotifier_inline.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tAlarmNotifier_inline.h	(revision 270)
@@ -0,0 +1,113 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+#ifndef TOPPERS_TALARMHANDLER_INLINE_H
+#define TOPPERS_TALARMHANDLER_INLINE_H
+
+/*
+ *  ã¢ã©ã¼ã éç¥ã®åä½éå§
+ */
+Inline ER
+eAlarm_start(CELLIDX idx, RELTIM alarmTime)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(sta_alm(ATTR_id, alarmTime));
+}
+
+/*
+ *  ã¢ã©ã¼ã éç¥ã®åä½åæ­¢
+ */
+Inline ER
+eAlarm_stop(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(stp_alm(ATTR_id));
+}
+
+/*
+ *  ã¢ã©ã¼ã éç¥ã®ç¶æ
+åç
+§
+ */
+Inline ER
+eAlarm_refer(CELLIDX idx, T_RALM* pk_alarmStatus)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ref_alm(ATTR_id, pk_alarmStatus));
+}
+
+/*
+ *  ã¢ã©ã¼ã éç¥ã®åä½éå§ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline ER
+eiAlarm_start(CELLIDX idx, RELTIM alarmTime)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ista_alm(ATTR_id, alarmTime));
+}
+
+/*
+ *  ã¢ã©ã¼ã éç¥ã®åä½åæ­¢ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline ER
+eiAlarm_stop(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(istp_alm(ATTR_id));
+}
+
+#endif /* TOPPERS_TALARMHANDLER_INLINE_H */
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tCpuExceptionHandler.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tCpuExceptionHandler.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tCpuExceptionHandler.c	(revision 270)
@@ -0,0 +1,69 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+#include "tCpuExceptionHandler_tecsgen.h"
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©æ¬ä½ã®å¼åºã
+ */
+void
+tCpuExceptionHandler_start(intptr_t exinf)
+{
+	CELLCB	*p_cellcb = (CELLCB *) exinf;
+
+	ciCpuExceptionHandlerBody_main();
+}
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tCyclicNotifier.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tCyclicNotifier.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tCyclicNotifier.c	(revision 270)
@@ -0,0 +1,58 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+#include "tCyclicNotifier_tecsgen.h"
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tCyclicNotifier_inline.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tCyclicNotifier_inline.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tCyclicNotifier_inline.h	(revision 270)
@@ -0,0 +1,93 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+#ifndef TOPPERS_TCYCLICHANDLER_INLINE_H
+#define TOPPERS_TCYCLICHANDLER_INLINE_H
+
+/*
+ *  å¨æéç¥ã®åä½éå§
+ */
+Inline ER
+eCyclic_start(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(sta_cyc(ATTR_id));
+}
+
+/*
+ *  å¨æéç¥ã®åä½åæ­¢
+ */
+Inline ER
+eCyclic_stop(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(stp_cyc(ATTR_id));
+}
+
+/*
+ *  å¨æéç¥ã®ç¶æ
+åç
+§
+ */
+Inline ER
+eCyclic_refer(CELLIDX idx, T_RCYC* pk_cyclicHandlerStatus)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ref_cyc(ATTR_id, pk_cyclicHandlerStatus));
+}
+
+#endif /* TOPPERS_TCYCLICHANDLER_INLINE_H */
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tDataqueue_inline.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tDataqueue_inline.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tDataqueue_inline.h	(revision 270)
@@ -0,0 +1,173 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+#ifndef TOPPERS_TDATAQUEUE_INLINE_H
+#define TOPPERS_TDATAQUEUE_INLINE_H
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
+ */
+Inline ER
+eDataqueue_send(CELLIDX idx, intptr_t data)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(snd_dtq(ATTR_id, data));
+}
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ï¼ãã¼ãªã³ã°ï¼
+ */
+Inline ER
+eDataqueue_sendPolling(CELLIDX idx, intptr_t data)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(psnd_dtq(ATTR_id, data));
+}
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ï¼ã¿ã¤ã ã¢ã¦ãããï¼
+ */
+Inline ER
+eDataqueue_sendTimeout(CELLIDX idx, intptr_t data, TMO timeout)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(tsnd_dtq(ATTR_id, data, timeout));
+}
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã¸ã®å¼·å¶éä¿¡
+ */
+Inline ER
+eDataqueue_sendForce(CELLIDX idx, intptr_t data)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(fsnd_dtq(ATTR_id, data));
+}
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ããã®åä¿¡
+ */
+Inline ER
+eDataqueue_receive(CELLIDX idx, intptr_t* p_data)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(rcv_dtq(ATTR_id, p_data));
+}
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ããã®åä¿¡ï¼ãã¼ãªã³ã°ï¼
+ */
+Inline ER
+eDataqueue_receivePolling(CELLIDX idx, intptr_t* p_data)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(prcv_dtq(ATTR_id, p_data));
+}
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ããã®åä¿¡ï¼ã¿ã¤ã ã¢ã¦ãããï¼
+ */
+Inline ER
+eDataqueue_receiveTimeout(CELLIDX idx, intptr_t* p_data, TMO timeout)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(trcv_dtq(ATTR_id, p_data, timeout));
+}
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã®ååæå
+ */
+Inline ER
+eDataqueue_initialize(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ini_dtq(ATTR_id));
+}
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã®ç¶æ
+åç
+§
+ */
+Inline ER
+eDataqueue_refer(CELLIDX idx, T_RDTQ* pk_dataqueueStatus)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ref_dtq(ATTR_id, pk_dataqueueStatus));
+}
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ï¼ãã¼ãªã³ã°ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline ER
+eiDataqueue_sendPolling(CELLIDX idx, intptr_t data)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(psnd_dtq(ATTR_id, data));
+}
+
+/*
+ *  ãã¼ã¿ã­ã¥ã¼ã¸ã®å¼·å¶éä¿¡ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline ER
+eiDataqueue_sendForce(CELLIDX idx, intptr_t data)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(fsnd_dtq(ATTR_id,  data));
+}
+
+#endif /* TOPPERS_TDATAQUEUE_INLINE_H */
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tEventflag_inline.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tEventflag_inline.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tEventflag_inline.h	(revision 270)
@@ -0,0 +1,150 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+#ifndef TOPPERS_TEVENTFLAG_INLINE_H
+#define TOPPERS_TEVENTFLAG_INLINE_H
+
+/*
+ *  ã¤ãã³ããã©ã°ã®ã»ãã
+ */
+Inline ER
+eEventflag_set(CELLIDX idx, FLGPTN setPattern)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(set_flg(ATTR_id, setPattern));
+}
+
+/*
+ *  ã¤ãã³ããã©ã°ã®ã¯ãªã¢
+ */
+Inline ER
+eEventflag_clear(CELLIDX idx, FLGPTN clearPattern)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(clr_flg(ATTR_id, clearPattern));
+}
+
+/*
+ *  ã¤ãã³ããã©ã°å¾
+ã¡
+ */
+Inline ER
+eEventflag_wait(CELLIDX idx, FLGPTN waitPattern,
+							MODE waitFlagMode, FLGPTN* p_flagPattern)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(wai_flg(ATTR_id, waitPattern, waitFlagMode, p_flagPattern));
+}
+
+/*
+ *  ã¤ãã³ããã©ã°å¾
+ã¡ï¼ãã¼ãªã³ã°ï¼
+ */
+Inline ER
+eEventflag_waitPolling(CELLIDX idx, FLGPTN waitPattern,
+							MODE waitFlagMode, FLGPTN* p_flagPattern)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(pol_flg(ATTR_id, waitPattern, waitFlagMode, p_flagPattern));
+}
+
+/*
+ *  ã¤ãã³ããã©ã°å¾
+ã¡ï¼ã¿ã¤ã ã¢ã¦ãããï¼
+ */
+Inline ER
+eEventflag_waitTimeout(CELLIDX idx, FLGPTN waitPattern,
+				MODE waitFlagMode, FLGPTN* p_flagPattern, TMO timeout)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(twai_flg(ATTR_id, waitPattern, waitFlagMode,
+											p_flagPattern, timeout));
+}
+
+/*
+ *  ã¤ãã³ããã©ã°ã®ååæå
+ */
+Inline ER
+eEventflag_initialize(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ini_flg(ATTR_id));
+}
+
+/*
+ *  ã¤ãã³ããã©ã°ã®ç¶æ
+åç
+§
+ */
+Inline ER
+eEventflag_refer(CELLIDX idx, T_RFLG* pk_eventflagStatus)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ref_flg(ATTR_id, pk_eventflagStatus));
+}
+
+/*
+ *  ã¤ãã³ããã©ã°ã®ã»ããï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline ER
+eiEventflag_set(CELLIDX idx, FLGPTN setPattern)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(set_flg(ATTR_id, setPattern));
+}
+
+#endif /* TOPPERS_TEVENTFLAG_INLINE_H */
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tFixedSizeMemoryPool_inline.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tFixedSizeMemoryPool_inline.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tFixedSizeMemoryPool_inline.h	(revision 270)
@@ -0,0 +1,123 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+#ifndef TOPPERS_TFIXEDSIZEMEMORYPOOL_INLINE_H
+#define TOPPERS_TFIXEDSIZEMEMORYPOOL_INLINE_H
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã­ãã¯ã®ç²å¾
+ */
+Inline ER
+eFixedSizeMemoryPool_get(CELLIDX idx, void **p_block)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(get_mpf( ATTR_id, p_block));
+}
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã­ãã¯ã®ç²å¾ï¼ãã¼ãªã³ã°ï¼
+ */
+Inline ER
+eFixedSizeMemoryPool_getPolling(CELLIDX idx, void **p_block)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(pget_mpf(ATTR_id, p_block));
+}
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã­ãã¯ã®ç²å¾ï¼ã¿ã¤ã ã¢ã¦ãããï¼
+ */
+Inline ER
+eFixedSizeMemoryPool_getTimeout(CELLIDX idx, void **p_block, TMO timeout)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(tget_mpf(ATTR_id, p_block, timeout));
+}
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã­ãã¯ã®è¿å´
+ */
+Inline ER
+eFixedSizeMemoryPool_release(CELLIDX idx, const void *block)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(rel_mpf(ATTR_id, (void *) block));
+}
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«ã®ååæå
+ */
+Inline ER
+eFixedSizeMemoryPool_initialize(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ini_mpf(ATTR_id));
+}
+
+/*
+ *  åºå®é·ã¡ã¢ãªãã¼ã«ã®ç¶æ
+åç
+§
+ */
+Inline ER
+eFixedSizeMemoryPool_refer(CELLIDX idx, T_RMPF *pk_fixedSizeMemoryPoolStatus)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ref_mpf(ATTR_id, pk_memoryPoolFixedSizeStatus));
+}
+
+#endif /* TOPPERS_TFIXEDSIZEMEMORYPOOL_INLINE_H */
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tISR.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tISR.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tISR.c	(revision 270)
@@ -0,0 +1,69 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+#include "tISR_tecsgen.h"
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã«ã«ã¼ãã³æ¬ä½ã®å¼åºã
+ */
+void
+tISR_start(intptr_t exinf)
+{
+	CELLCB	*p_cellcb = (CELLCB *) exinf;
+
+	ciISRBody_main();
+}
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tInitializeRoutine.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tInitializeRoutine.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tInitializeRoutine.c	(revision 270)
@@ -0,0 +1,68 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+#include "tInitializeRoutine_tecsgen.h"
+
+/*
+ *  åæåã«ã¼ãã³æ¬ä½ã®å¼åºã
+ */
+void  tInitializeRoutine_start(intptr_t exinf)
+{
+	CELLCB	*p_cellcb = (CELLCB *) exinf;
+
+	cInitializeRoutineBody_main();
+}
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tInterruptHandler.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tInterruptHandler.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tInterruptHandler.c	(revision 270)
@@ -0,0 +1,69 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+#include "tInterruptHandler_tecsgen.h"
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©æ¬ä½ã®å¼åºã
+ */
+void
+tInterruptHandler_start(intptr_t exinf)
+{
+	CELLCB	*p_cellcb = (CELLCB *) exinf;
+
+	ciInterruptHandlerBody_main();
+}
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tInterruptRequest_inline.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tInterruptRequest_inline.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tInterruptRequest_inline.h	(revision 270)
@@ -0,0 +1,81 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$  
+ */
+
+#ifndef TOPPERS_TINTERRUPTREQUEST_INLINE_H
+#define TOPPERS_TINTERRUPTREQUEST_INLINE_H
+
+/*
+ *  å²è¾¼ã¿ã®ç¦æ­¢
+ */
+Inline ER
+eInterruptRequest_disable(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(dis_int(ATTR_interruptNumber));
+}
+
+/*
+ *  å²è¾¼ã¿ã®è¨±å¯
+ */
+Inline ER
+eInterruptRequest_enable(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ena_int(ATTR_interruptNumber));
+}
+
+#endif /* TOPPERS_TINTERRUPTREQUEST_INLINE_H */
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tKernel_inline.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tKernel_inline.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tKernel_inline.h	(revision 270)
@@ -0,0 +1,466 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+#ifndef TOPPERS_TKERNEL_INLINE_H
+#define TOPPERS_TKERNEL_INLINE_H
+
+/*
+ *  èªã¿ã¹ã¯ã®æ¡å¼µæ
+å ±ã®åç
+§
+ */
+Inline ER
+eKernel_getExtendedInformation(intptr_t* p_exinf)
+{
+	return(get_inf(p_exinf));
+}
+
+/*
+ *  èµ·åºå¾
+ã¡
+ */
+Inline ER
+eKernel_sleep(void)
+{
+	return(slp_tsk());
+}
+
+/*
+ *  èµ·åºå¾
+ã¡ï¼ã¿ã¤ã ã¢ã¦ãããï¼
+ */
+Inline ER
+eKernel_sleepTimeout(TMO timeout)
+{
+	return(tslp_tsk(timeout));
+}
+
+/*
+ *  èªã¿ã¹ã¯ã®é
+å»¶
+ */
+Inline ER
+eKernel_delay(RELTIM delayTime)
+{
+	return(dly_tsk(delayTime));
+}
+
+/*
+ *  èªã¿ã¹ã¯ã®çµäº
+ */
+Inline ER
+eKernel_exit(void)
+{
+	return(ext_tsk());
+}
+
+/*
+ *  ã¿ã¹ã¯çµäºã®ç¦æ­¢
+ */
+Inline ER
+eKernel_disableTerminate(void)
+{
+	return(dis_ter());
+}
+
+/*
+ *  ã¿ã¹ã¯çµäºã®è¨±å¯
+ */
+Inline ER
+eKernel_enableTerminate(void)
+{
+	return(ena_ter());
+}
+
+/*
+ *  ã¿ã¹ã¯çµäºç¦æ­¢ç¶æ
+ã®åç
+§
+ */
+Inline bool_t
+eKernel_senseTerminate(void)
+{
+	return(sns_ter());
+}
+
+/*
+ *  ã·ã¹ãã æå»ã®è¨­å®
+ */
+Inline ER
+eKernel_setTime(SYSTIM systemTime)
+{
+	return(set_tim(systemTime));
+}
+
+/*
+ *  ã·ã¹ãã æå»ã®åç
+§
+ */
+Inline ER
+eKernel_getTime(SYSTIM* p_systemTime)
+{
+	return(get_tim(p_systemTime));
+}
+
+/*
+ *  ã·ã¹ãã æå»ã®èª¿æ´
+ */
+Inline ER
+eKernel_adjustTime(int32_t adjustTime)
+{
+	return(adj_tim(adjustTime));
+}
+
+/*
+ *  é«åè§£è½ã¿ã¤ãã®åç
+§
+ */
+Inline HRTCNT
+eKernel_fetchHighResolutionTimer(void)
+{
+	return(fch_hrt());
+}
+
+/*
+ *  ã¿ã¹ã¯ã®åªå
+é ä½ã®åè»¢
+ */
+Inline ER
+eKernel_rotateReadyQueue(PRI taskPriority)
+{
+	return(rot_rdq(taskPriority));
+}
+
+/*
+ *  å®è¡ç¶æ
+ã®ã¿ã¹ã¯IDã®åç
+§
+ */
+Inline ER
+eKernel_getTaskId(ID *p_taskId)
+{
+	return(get_tid(p_taskId));
+}
+
+/*
+ *  å®è¡ã§ããã¿ã¹ã¯ã®æ°ã®åç
+§
+ */
+Inline ER
+eKernel_getLoad(PRI taskPriority, uint_t* p_load)
+{
+	return(get_lod(taskPriority, p_load));
+}
+
+/*
+ *  æå®ããåªå
+é ä½ã®ã¿ã¹ã¯IDã®åç
+§
+ */
+Inline ER
+eKernel_getNthTask(PRI taskPriority, uint_t nth, ID* p_taskID)
+{
+	return (get_nth(taskPriority, nth, p_taskID));
+}
+/*
+ *  CPUã­ãã¯ç¶æ
+ã¸ã®é·ç§»
+ */
+Inline ER
+eKernel_lockCpu()
+{
+	return(loc_cpu());
+}
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã®è§£é¤
+ */
+Inline ER
+eKernel_unlockCpu()
+{
+	return(unl_cpu());
+}
+
+/*
+ *  ãã£ã¹ãããã®ç¦æ­¢
+ */
+Inline ER
+eKernel_disableDispatch()
+{
+	return(dis_dsp());
+}
+
+/*
+ *  ãã£ã¹ãããã®è¨±å¯
+ */
+Inline ER
+eKernel_enableDispatch()
+{
+	return(ena_dsp());
+}
+
+/*
+ *  ã³ã³ãã­ã¹ãã®åç
+§
+ */
+Inline bool_t
+eKernel_senseContext()
+{
+	return(sns_ctx());
+}
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã®åç
+§
+ */
+Inline bool_t
+eKernel_senseLock()
+{
+	return(sns_loc());
+}
+
+/*
+ *  ãã£ã¹ãããç¦æ­¢ç¶æ
+ã®åç
+§
+ */
+Inline bool_t
+eKernel_senseDispatch()
+{
+	return(sns_dsp());
+}
+
+/*
+ *  ãã£ã¹ãããä¿çç¶æ
+ã®åç
+§
+ */
+Inline bool_t
+eKernel_senseDispatchPendingState()
+{
+	return(sns_dpn());
+}
+
+/*
+ *  ã«ã¼ãã«éåä½ç¶æ
+ã®åç
+§
+ */
+Inline bool_t
+eKernel_senseKernel()
+{
+	return(sns_ker());
+}
+
+/*
+ *  ã«ã¼ãã«ã®çµäº
+ */
+Inline ER
+eKernel_exitKernel()
+{
+	return(ext_ker());
+}
+
+/*
+ *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®å¤æ´
+ */
+Inline ER
+eKernel_changeInterruptPriorityMask(PRI interruptPriority)
+{
+	return(chg_ipm(interruptPriority));
+}
+
+/*
+ *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®åç
+§
+ */
+Inline ER
+eKernel_getInterruptPriorityMask(PRI* p_interruptPriority)
+{
+	return(get_ipm(p_interruptPriority));
+}
+
+/*
+ *  é«åè§£è½ã¿ã¤ãã®åç
+§ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline HRTCNT
+eiKernel_fetchHighResolutionTimer(void)
+{
+	return(fch_hrt());
+}
+
+/*
+ *  ã¿ã¹ã¯ã®åªå
+é ä½ã®åè»¢ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline ER
+eiKernel_rotateReadyQueue(PRI taskPriority)
+{
+	return(rot_rdq(taskPriority));
+}
+
+/*
+ *  å®è¡ç¶æ
+ã®ã¿ã¹ã¯IDã®åç
+§ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline ER
+eiKernel_getTaskId(ID* p_taskId)
+{
+	return(get_tid(p_taskId));
+}
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã¸ã®é·ç§»ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline ER
+eiKernel_lockCpu()
+{
+	return(loc_cpu());
+}
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã®è§£é¤ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline ER
+eiKernel_unlockCpu()
+{
+	return(unl_cpu());
+}
+
+/*
+ *  ã³ã³ãã­ã¹ãã®åç
+§ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline bool_t
+eiKernel_senseContext()
+{
+	return(sns_ctx());
+}
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã®åç
+§ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline bool_t
+eiKernel_senseLock()
+{
+	return(sns_loc());
+}
+
+/*
+ *  ãã£ã¹ãããç¦æ­¢ç¶æ
+ã®åç
+§ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline bool_t
+eiKernel_senseDispatch()
+{
+	return(sns_dsp());
+}
+
+/*
+ *  ãã£ã¹ãããä¿çç¶æ
+ã®åç
+§ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline bool_t
+eiKernel_senseDispatchPendingState()
+{
+	return(sns_dpn());
+}
+
+/*
+ *  ã«ã¼ãã«éåä½ç¶æ
+ã®åç
+§ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline bool_t
+eiKernel_senseKernel()
+{
+	return(sns_ker());
+}
+
+/*
+ *  ã«ã¼ãã«ã®çµäºï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline ER
+eiKernel_exitKernel()
+{
+	return(ext_ker());
+}
+
+/*
+ *  CPUä¾å¤çºçæã®ãã£ã¹ãããä¿çç¶æ
+ã®åç
+§
+ */
+Inline bool_t
+eiKernel_exceptionSenseDispatchPendingState(const void *p_exceptionInformation)
+{
+	return(xsns_dpn((void *) p_exceptionInformation));
+}
+
+#endif /* TOPPERS_TKERNEL_INLINE_H */
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tMutex_inline.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tMutex_inline.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tMutex_inline.h	(revision 270)
@@ -0,0 +1,123 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+#ifndef TOPPERS_TMUTEX_INLINE_H
+#define TOPPERS_TMUTEX_INLINE_H
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®ã­ãã¯
+ */
+Inline ER
+eMutex_lock(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(loc_mtx(ATTR_id));
+}
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®ã­ãã¯ï¼ãã¼ãªã³ã°ï¼
+ */
+Inline ER
+eMutex_lockPolling(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ploc_mtx(ATTR_id));
+}
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®ã­ãã¯ï¼ã¿ã¤ã ã¢ã¦ãããï¼
+ */
+Inline ER
+eMutex_lockTimeout(CELLIDX idx, TMO timeout)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ploc_mtx(ATTR_id, timeout));
+}
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®ã­ãã¯è§£é¤
+ */
+Inline ER
+eMutex_unlock(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(unl_mtx(ATTR_id));
+}
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®ååæå
+ */
+Inline ER
+eMutex_initialize(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ini_mtx(ATTR_id));
+}
+
+/*
+ *  ãã¥ã¼ããã¯ã¹ã®ç¶æ
+åç
+§
+ */
+Inline ER
+eMutex_refer(CELLIDX idx, T_RMTX *pk_mutexStatus)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ref_mtx(ATTR_id, pk_mutexStatus));
+}
+
+#endif /* TOPPERS_TMUTEX_INLINE_H */
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tPriorityDataqueue_inline.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tPriorityDataqueue_inline.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tPriorityDataqueue_inline.h	(revision 270)
@@ -0,0 +1,165 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+#ifndef TOPPERS_TPRIORITYDATAQUEUE_INLINE_H
+#define TOPPERS_TPRIORITYDATAQUEUE_INLINE_H
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
+ */
+Inline ER
+ePriorityDataqueue_send(CELLIDX idx, intptr_t data, PRI dataPriority)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(snd_pdq(ATTR_id, data, dataPriority));
+}
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ï¼ãã¼ãªã³ã°ï¼
+ */
+Inline ER
+ePriorityDataqueue_sendPolling(CELLIDX idx, intptr_t data, PRI dataPriority)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(psnd_pdq(ATTR_id, data, dataPriority));
+}
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ï¼ã¿ã¤ã ã¢ã¦ãããï¼
+ */
+Inline ER
+ePriorityDataqueue_sendTimeout(CELLIDX idx, intptr_t data,
+									PRI dataPriority, TMO timeout)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(tsnd_pdq(ATTR_id, data, dataPriority, timeout));
+}
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ããã®åä¿¡
+ */
+Inline ER
+ePriorityDataqueue_receive(CELLIDX idx, intptr_t *p_data, PRI *p_dataPriority)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(rcv_pdq(ATTR_id, p_data, p_dataPriority));
+}
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ããã®åä¿¡ï¼ãã¼ãªã³ã°ï¼
+ */
+Inline ER
+ePriorityDataqueue_receivePolling(CELLIDX idx, intptr_t *p_data,
+														PRI *p_dataPriority)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(prcv_pdq(ATTR_id, p_data, p_dataPriority));
+}
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ããã®åä¿¡ï¼ã¿ã¤ã ã¢ã¦ãããï¼
+ */
+Inline ER
+ePriorityDataqueue_receiveTimeout(CELLIDX idx, intptr_t *p_data,
+											PRI *p_dataPriority, TMO timeout)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(trcv_pdq(ATTR_id, p_data, p_dataPriority, timeout));
+}
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã®ååæå
+ */
+Inline ER
+ePriorityDataqueue_initialize(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ini_pdq(ATTR_id));
+}
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã®ç¶æ
+åç
+§
+ */
+Inline ER
+ePriorityDataqueue_refer(CELLIDX idx, T_RPDQ* pk_priorityDataqueueStatus)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ref_pdq(ATTR_id, pk_priorityDataqueueStatus));
+}
+
+/*
+ *  åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ï¼ãã¼ãªã³ã°ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline ER
+eiPriorityDataqueue_sendPolling(CELLIDX idx, intptr_t data, PRI dataPriority)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(psnd_pdq(ATTR_id, data, dataPriority));
+}
+
+#endif /* TOPPERS_TPRIORITYDATAQUEUE_INLINE_H */
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tSemaphore_inline.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tSemaphore_inline.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tSemaphore_inline.h	(revision 270)
@@ -0,0 +1,133 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+#ifndef TOPPERS_TSEMAPHORE_INLINE_H
+#define TOPPERS_TSEMAPHORE_INLINE_H
+
+/*
+ *  ã»ããã©è³æºã®è¿å´
+ */
+Inline ER
+eSemaphore_signal(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(sig_sem(ATTR_id));
+}
+
+/*
+ *  ã»ããã©è³æºã®ç²å¾
+ */
+Inline ER
+eSemaphore_wait(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(wai_sem(ATTR_id));
+}
+
+/*
+ *  ã»ããã©è³æºã®ç²å¾ï¼ãã¼ãªã³ã°ï¼
+ */
+Inline ER
+eSemaphore_waitPolling(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(pol_sem(ATTR_id));
+}
+
+/*
+ *  ã»ããã©è³æºã®ç²å¾ï¼ã¿ã¤ã ã¢ã¦ãããï¼
+ */
+Inline ER
+eSemaphore_waitTimeout(CELLIDX idx, TMO timeout)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(twai_sem(ATTR_id, timeout));
+}
+
+/*
+ *  ã»ããã©ã®ååæå
+ */
+Inline ER
+eSemaphore_initialize(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ini_sem(ATTR_id));
+}
+
+/*
+ *  ã»ããã©ã®ç¶æ
+åç
+§
+ */
+Inline ER
+eSemaphore_refer(CELLIDX idx, T_RSEM *pk_semaphoreStatus)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ref_sem(ATTR_id, pk_semaphoreStatus));
+}
+
+/*
+ *  ã»ããã©è³æºã®è¿å´ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline ER
+eiSemaphore_signal(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(sig_sem(ATTR_id));
+}
+
+#endif /* TOPPERS_TSEMAPHORE_INLINE_H */
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tTask.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tTask.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tTask.c	(revision 270)
@@ -0,0 +1,69 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+#include "tTask_tecsgen.h"
+
+/*
+ *  ã¿ã¹ã¯æ¬ä½ã®å¼åºã
+ */
+void
+tTask_start(intptr_t exinf)
+{
+	CELLCB	*p_cellcb = (CELLCB *) exinf;
+
+	cTaskBody_main();
+}
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tTask_inline.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tTask_inline.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tTask_inline.h	(revision 270)
@@ -0,0 +1,236 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+#ifndef TOPPERS_TTASK_INLINE_H
+#define TOPPERS_TTASK_INLINE_H
+
+/*
+ *  ã¿ã¹ã¯ã®èµ·å
+ */
+Inline ER
+eTask_activate(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(act_tsk(ATTR_id));
+}
+
+/*
+ *  ã¿ã¹ã¯èµ·åè¦æ±ã®ã­ã£ã³ã»ã«
+ */
+Inline ER_UINT
+eTask_cancelActivate(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(can_act(ATTR_id));
+}
+
+/*
+ *  ã¿ã¹ã¯ç¶æ
+ã®åç
+§
+ */
+Inline ER
+eTask_getTaskState(CELLIDX idx, STAT *p_tskstat)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(get_tst(ATTR_id, p_tskstat));
+}
+
+/*
+ *  ã¿ã¹ã¯ã®ãã¼ã¹åªå
+åº¦ã®å¤æ´
+ */
+Inline ER
+eTask_changePriority(CELLIDX idx, PRI priority)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(chg_pri(ATTR_id, priority));
+}
+
+/*
+ *  ã¿ã¹ã¯åªå
+åº¦ã®åç
+§
+ */
+Inline ER
+eTask_getPriority(CELLIDX idx, PRI *p_priority)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(get_pri(ATTR_id, p_priority));
+}
+
+/*
+ *  ã¿ã¹ã¯ã®ç¶æ
+åç
+§
+ */
+Inline ER
+eTask_refer(CELLIDX idx, T_RTSK *pk_taskStatus)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ref_tsk(ATTR_id, pk_taskStatus));
+}
+
+/*
+ *  ã¿ã¹ã¯ã®èµ·åº
+ */
+Inline ER
+eTask_wakeup(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(wup_tsk(ATTR_id));
+}
+
+/*
+ *  ã¿ã¹ã¯èµ·åºè¦æ±ã®ã­ã£ã³ã»ã«
+ */
+Inline ER_UINT
+eTask_cancelWakeup(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(can_wup(ATTR_id));
+}
+
+/*
+ *  å¾
+ã¡ç¶æ
+ã®å¼·å¶è§£é¤
+ */
+Inline ER
+eTask_releaseWait(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(rel_wai(ATTR_id));
+}
+
+/*
+ *  å¼·å¶å¾
+ã¡ç¶æ
+ã¸ã®ç§»è¡
+ */
+Inline ER
+eTask_suspend(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(sus_tsk(ATTR_id));
+}
+
+/*
+ *  å¼·å¶å¾
+ã¡ç¶æ
+ããã®åé
+ */
+Inline ER
+eTask_resume(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(rsm_tsk(ATTR_id));
+}
+
+/*
+ *  ã¿ã¹ã¯ã®çµäºè¦æ±ï¼»NGKI3469ï¼½
+ */
+Inline ER
+eTask_raiseTerminate(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ras_ter(ATTR_id));
+}
+
+/*
+ *  ã¿ã¹ã¯ã®å¼·å¶çµäº
+ */
+Inline ER
+eTask_terminate(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(ter_tsk(ATTR_id));
+}
+
+/*
+ *  ã¿ã¹ã¯ã®èµ·åï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline ER
+eiTask_activate(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(act_tsk(ATTR_id));
+}
+
+/*
+ *  ã¿ã¹ã¯ã®èµ·åºï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline ER
+eiTask_wakeup(CELLIDX idx)
+{
+	CELLCB	*p_cellcb= GET_CELLCB(idx);
+	return(iwup_tsk(ATTR_id));
+}
+
+/*
+ *  å¾
+ã¡ç¶æ
+ã®å¼·å¶è§£é¤ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ï¼
+ */
+Inline ER
+eiTask_releaseWait(CELLIDX idx)
+{
+	CELLCB	*p_cellcb = GET_CELLCB(idx);
+	return(irel_wai(ATTR_id));
+}
+
+#endif /* TOPPERS_TTASK_INLINE_H */
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tTerminateRoutine.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tTerminateRoutine.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tTerminateRoutine.c	(revision 270)
@@ -0,0 +1,69 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+#include "tTerminateRoutine_tecsgen.h"
+
+/*
+ *  çµäºå¦çã«ã¼ãã³æ¬ä½ã®å¼åºã
+ */
+
+void  tTerminateRoutine_start(intptr_t exinf)
+{
+	CELLCB	*p_cellcb = (CELLCB *) exinf;
+
+	cTerminateRoutineBody_main();
+}
Index: EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tecs_kernel.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tecs_kernel.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecs_kernel/tecs_kernel.h	(revision 270)
@@ -0,0 +1,73 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2015 by Ushio Laboratory
+ *              Graduate School of Engineering Science, Osaka Univ., JAPAN
+ *  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		ã«ã¼ãã«ãªãã¸ã§ã¯ãã®ã³ã³ãã¼ãã³ãåã®ããã®ããããã¡ã¤ã«
+ */
+
+#include <kernel.h>
+
+extern void	tTask_start(intptr_t exinf);
+
+extern void tTimeEventHandler_start(intptr_t exinf);
+
+extern void tISR_start(intptr_t exinf);
+extern void tInterruptHandler_start(void);
+extern void tCpuExceptionHandler_start(void *p_excinf);
+
+extern void tInitializeRoutine_start(intptr_t exinf);
+extern void tTerminateRoutine_start(intptr_t exinf);
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/MANIFEST_for_asp3
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/MANIFEST_for_asp3	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/MANIFEST_for_asp3	(revision 270)
@@ -0,0 +1,98 @@
+MANIFEST_for_asp3
+
+tecsgen
+tecsgen.rb
+tecsmerge
+tecsmerge.rb
+
+tecslib/version.rb
+
+tecslib/core/C_parser.tab.rb
+tecslib/core/C_parser.y.rb
+tecslib/core/bnf.tab.rb
+tecslib/core/bnf.y.rb
+tecslib/core/componentobj.rb
+tecslib/core/ctypes.rb
+tecslib/core/expression.rb
+tecslib/core/gen_xml.rb
+tecslib/core/generate.rb
+tecslib/core/location.rb
+tecslib/core/messages.rb
+tecslib/core/optimize.rb
+tecslib/core/plugin.rb
+tecslib/core/pluginModule.rb
+tecslib/core/syntaxobj.rb
+tecslib/core/tecs_lang.rb
+tecslib/core/tecsgen.rb
+tecslib/core/types.rb
+tecslib/core/value.rb
+
+tecslib/messages/messages_console_en_US.rb
+tecslib/messages/messages_console_ja_JP.rb
+tecslib/messages/messages_file_en_US.rb
+tecslib/messages/messages_file_ja_JP.rb
+
+tecslib/plugin/C2TECSBridgePlugin.rb
+tecslib/plugin/CellPlugin.rb
+tecslib/plugin/CelltypePlugin.rb
+tecslib/plugin/DomainPlugin.rb
+tecslib/plugin/Mruby2CBridgePlugin.rb
+tecslib/plugin/MrubyBridgePlugin.rb
+tecslib/plugin/NotifierPlugin.rb
+tecslib/plugin/RPCPlugin.rb
+tecslib/plugin/SignaturePlugin.rb
+tecslib/plugin/TECS2CBridgePlugin.rb
+tecslib/plugin/ThroughPlugin.rb
+tecslib/plugin/TracePlugin.rb
+tecslib/plugin/lib/GenParamCopy.rb
+tecslib/plugin/lib/GenTransparentMarshaler.rb
+
+tecs/tecs.h
+tecs/tecs.xsd
+
+tecs/mruby/TECSPointer.h
+tecs/mruby/TECSStruct.h
+tecs/mruby/mruby.cdl
+tecs/mruby/mrubyInitializer.cdl
+tecs/mruby/mrubyPointers.cdl
+tecs/mruby/mrubyVMs.cdl
+tecs/mruby/nMruby_tBoolPointer.c
+tecs/mruby/nMruby_tCharPointer.c
+tecs/mruby/nMruby_tDouble64Pointer.c
+tecs/mruby/nMruby_tFloat32Pointer.c
+tecs/mruby/nMruby_tInt16Pointer.c
+tecs/mruby/nMruby_tInt32Pointer.c
+tecs/mruby/nMruby_tInt64Pointer.c
+tecs/mruby/nMruby_tInt8Pointer.c
+tecs/mruby/nMruby_tIntPointer.c
+tecs/mruby/nMruby_tLongPointer.c
+tecs/mruby/nMruby_tMruby.c
+tecs/mruby/nMruby_tSCharPointer.c
+tecs/mruby/nMruby_tShortPointer.c
+tecs/mruby/nMruby_tTECSInitializer.c
+tecs/mruby/nMruby_tUCharPointer.c
+tecs/mruby/nMruby_tUInt16Pointer.c
+tecs/mruby/nMruby_tUInt32Pointer.c
+tecs/mruby/nMruby_tUInt64Pointer.c
+tecs/mruby/nMruby_tUInt8Pointer.c
+tecs/mruby/nMruby_tUIntPointer.c
+tecs/mruby/nMruby_tULongPointer.c
+tecs/mruby/nMruby_tUShortPointer.c
+tecs/mruby/tMruby.cdl
+tecs/mruby/tecs_mruby.h
+
+tecs/posix/posix.cdl
+
+tecs/rpc/PPAllocator.cdl
+tecs/rpc/RPCTask.cdl
+tecs/rpc/TDR.cdl
+tecs/rpc/rpc.cdl
+tecs/rpc/rpc_string.h
+tecs/rpc/sChannel.cdl
+tecs/rpc/sRPCErrorHandler.cdl
+tecs/rpc/tDataqueueAdaptor_inline.h
+tecs/rpc/tDataqueueOWChannel.cdl
+tecs/rpc/tPPAllocator.c
+tecs/rpc/tRPCDedicatedTaskMain.c
+tecs/rpc/tTDR_inline.h
+tecs/rpc/tecs_rpc.h
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/MANIFEST_tecsgen_body
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/MANIFEST_tecsgen_body	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/MANIFEST_tecsgen_body	(revision 270)
@@ -0,0 +1,138 @@
+MANIFEST_tecsgen_body
+
+Makefile
+
+tecsgen
+tecsgen.rb
+tecsmerge
+tecsmerge.rb
+tecslib/version.rb
+
+tecslib/core/C_parser.tab.rb
+tecslib/core/C_parser.y.rb
+tecslib/core/bnf.tab.rb
+tecslib/core/bnf.y.rb
+tecslib/core/componentobj.rb
+tecslib/core/ctypes.rb
+tecslib/core/expression.rb
+tecslib/core/gen_xml.rb
+tecslib/core/generate.rb
+tecslib/core/location.rb
+tecslib/core/messages.rb
+tecslib/core/optimize.rb
+tecslib/core/plugin.rb
+tecslib/core/pluginModule.rb
+tecslib/core/syntaxobj.rb
+tecslib/core/tecs_lang.rb
+tecslib/core/tecsgen.rb
+tecslib/core/types.rb
+tecslib/core/value.rb
+
+tecslib/messages/messages_console_en_US.rb
+tecslib/messages/messages_console_ja_JP.rb
+tecslib/messages/messages_file_en_US.rb
+tecslib/messages/messages_file_ja_JP.rb
+
+tecslib/plugin/ATK1AlarmPlugin.rb
+tecslib/plugin/ATK1DelayTaskPlugin.rb
+tecslib/plugin/ATK1EventPlugin.rb
+tecslib/plugin/ATK1ISRPlugin.rb
+tecslib/plugin/ATK1KernelPlugin.rb
+tecslib/plugin/ATK1ResourcePlugin.rb
+tecslib/plugin/ATK1TaskPlugin.rb
+tecslib/plugin/C2TECSBridgePlugin.rb
+tecslib/plugin/CellPlugin.rb
+tecslib/plugin/CelltypePlugin.rb
+tecslib/plugin/DomainPlugin.rb
+tecslib/plugin/HRP2AlarmHandlerPlugin.rb
+tecslib/plugin/HRP2Cache.rb
+tecslib/plugin/HRP2CyclicHandlerPlugin.rb
+tecslib/plugin/HRP2DataqueuePlugin.rb
+tecslib/plugin/HRP2EventflagPlugin.rb
+tecslib/plugin/HRP2FixedSizeMemoryPoolPlugin.rb
+tecslib/plugin/HRP2HandlerPlugin.rb
+tecslib/plugin/HRP2KernelObjectPlugin.rb
+tecslib/plugin/HRP2ObjectPlugin.rb
+tecslib/plugin/HRP2Plugin.rb
+tecslib/plugin/HRP2PostHook.rb
+tecslib/plugin/HRP2PriorityDataqueuePlugin.rb
+tecslib/plugin/HRP2RPCPlugin.rb
+tecslib/plugin/HRP2SVCPlugin.rb
+tecslib/plugin/HRP2SemaphorePlugin.rb
+tecslib/plugin/HRP2TaskPlugin.rb
+tecslib/plugin/Mruby2CBridgePlugin.rb
+tecslib/plugin/MrubyBridgePlugin.rb
+tecslib/plugin/NotifierPlugin.rb
+tecslib/plugin/OpaqueMarshalerPlugin.rb
+tecslib/plugin/OpaqueRPCPlugin.rb
+tecslib/plugin/RPCPlugin.rb
+tecslib/plugin/SharedOpaqueRPCPlugin.rb
+tecslib/plugin/SharedRPCPlugin.rb
+tecslib/plugin/SignaturePlugin.rb
+tecslib/plugin/TECS2CBridgePlugin.rb
+tecslib/plugin/ThroughPlugin.rb
+tecslib/plugin/TracePlugin.rb
+tecslib/plugin/lib/GenHRP2Marshaler.rb
+tecslib/plugin/lib/GenOpaqueMarshaler.rb
+tecslib/plugin/lib/GenParamCopy.rb
+tecslib/plugin/lib/GenTransparentMarshaler.rb
+
+tecs/mruby/TECSPointer.h
+tecs/mruby/TECSStruct.h
+tecs/mruby/mruby.cdl
+tecs/mruby/mrubyInitializer.cdl
+tecs/mruby/mrubyPointers.cdl
+tecs/mruby/mrubyVMs.cdl
+tecs/mruby/nMruby_tBoolPointer.c
+tecs/mruby/nMruby_tCharPointer.c
+tecs/mruby/nMruby_tDouble64Pointer.c
+tecs/mruby/nMruby_tFloat32Pointer.c
+tecs/mruby/nMruby_tInt16Pointer.c
+tecs/mruby/nMruby_tInt32Pointer.c
+tecs/mruby/nMruby_tInt64Pointer.c
+tecs/mruby/nMruby_tInt8Pointer.c
+tecs/mruby/nMruby_tIntPointer.c
+tecs/mruby/nMruby_tLongPointer.c
+tecs/mruby/nMruby_tMruby.c
+tecs/mruby/nMruby_tMrubyProc.c
+tecs/mruby/nMruby_tMrubyProc_1_0.c
+tecs/mruby/nMruby_tSCharPointer.c
+tecs/mruby/nMruby_tShortPointer.c
+tecs/mruby/nMruby_tTECSInitializer.c
+tecs/mruby/nMruby_tUCharPointer.c
+tecs/mruby/nMruby_tUInt16Pointer.c
+tecs/mruby/nMruby_tUInt32Pointer.c
+tecs/mruby/nMruby_tUInt64Pointer.c
+tecs/mruby/nMruby_tUInt8Pointer.c
+tecs/mruby/nMruby_tUIntPointer.c
+tecs/mruby/nMruby_tULongPointer.c
+tecs/mruby/nMruby_tUShortPointer.c
+tecs/mruby/tMruby.cdl
+tecs/mruby/tecs_mruby.h
+tecs/posix/posix.cdl
+tecs/rpc/PPAllocator.cdl
+tecs/rpc/RPCTask.cdl
+tecs/rpc/TDR.cdl
+tecs/rpc/rpc.cdl
+tecs/rpc/rpc_string.h
+tecs/rpc/sChannel.cdl
+tecs/rpc/sRPCErrorHandler.cdl
+tecs/rpc/tDataqueueAdaptor_inline.h
+tecs/rpc/tDataqueueOWChannel.cdl
+tecs/rpc/tNBOTDR_inline.h
+tecs/rpc/tPPAllocator.c
+tecs/rpc/tRPCDedicatedTaskMain.c
+tecs/rpc/tRPCDedicatedTaskMainWithOpener.c
+tecs/rpc/tRPCSharedChannelMan.c
+tecs/rpc/tRPCSharedTaskMain.c
+tecs/rpc/tRPCSharedTaskMainWithOpener.c
+tecs/rpc/tSocketChannel.cdl
+tecs/rpc/tSocketClient.c
+tecs/rpc/tSocketServer.c
+tecs/rpc/tTDR_inline.h
+tecs/rpc/tTINETChannel.cdl
+tecs/rpc/tTINETClient.c
+tecs/rpc/tTINETServer.c
+tecs/rpc/tecs_rpc.h
+tecs/tecs.h
+tecs/tecs.xsd
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/Makefile
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/Makefile	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/Makefile	(revision 270)
@@ -0,0 +1,169 @@
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2013 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: Makefile 84 2008-05-04 14:19:09Z okuma-top $
+#++
+
+LIB_PATH= tecslib/core
+PLUGIN_PATH= tecslib/plugin
+GEN_SRC =   tecsgen.rb\
+  $(LIB_PATH)/bnf.tab.rb\
+  $(LIB_PATH)/bnf.y.rb\
+  $(LIB_PATH)/componentobj.rb\
+  $(LIB_PATH)/ctypes.rb\
+  $(LIB_PATH)/C_parser.tab.rb\
+  $(LIB_PATH)/C_parser.y.rb\
+  $(LIB_PATH)/expression.rb\
+  $(LIB_PATH)/generate.rb\
+  $(LIB_PATH)/messages.rb\
+  $(LIB_PATH)/optimize.rb\
+  $(LIB_PATH)/pluginModule.rb\
+  $(LIB_PATH)/syntaxobj.rb\
+  $(LIB_PATH)/types.rb\
+  $(LIB_PATH)/value.rb\
+  tecslib/version.rb
+
+PLUGIN_SRC = \
+  $(PLUGIN_PATH)/CellPlugin.rb\
+  $(PLUGIN_PATH)/CelltypePlugin.rb\
+  $(PLUGIN_PATH)/lib/GenTransparentMarshaler.rb\
+  $(PLUGIN_PATH)/lib/GenOpaqueMarshaler.rb\
+  $(PLUGIN_PATH)/lib/GenParamCopy.rb\
+  $(PLUGIN_PATH)/OpaqueRPCPlugin.rb\
+  $(PLUGIN_PATH)/RPCPlugin.rb\
+  $(PLUGIN_PATH)/SharedRPCPlugin.rb\
+  $(PLUGIN_PATH)/SignaturePlugin.rb\
+  $(PLUGIN_PATH)/ThroughPlugin.rb\
+  $(PLUGIN_PATH)/TracePlugin.rb
+
+
+BNF = $(LIB_PATH)/bnf.y.rb
+GEN_TAB =  $(LIB_PATH)/bnf.tab.rb
+GEN_TAB_DEB =  $(LIB_PATH)/bnf-deb.tab.rb
+C_PARSER = $(LIB_PATH)/C_parser.y.rb
+C_TAB = $(LIB_PATH)/C_parser.tab.rb
+EXERB_EXE = tecsgen.exe
+EXERB_EXY = tecsgen.exy
+
+all: generator
+
+debug : yydebug
+
+generator : $(GEN_TAB) $(GEN_SRC) $(PLUGIN_SRC) $(C_TAB)
+
+clean : clean2
+	rm -f $(GEN_TAB) $(GEN_TAB_DEB) $(C_TAB)
+
+clean2 :
+	rm -f $(LIB_PATH)/bnf.output $(LIB_PATH)/C_parser.output
+	rm -rf rdoc
+
+real_clean : clean
+	rm -f $(EXERB_EXE)
+
+$(GEN_TAB) : $(BNF)
+	racc -O -v $(BNF)
+
+$(C_TAB) : $(C_PARSER)
+	racc -O -v $(C_PARSER)
+
+yydebug : $(GEN_TAB_DEB)
+
+$(GEN_TAB_DEB) : $(BNF) $(GEN_SRC) $(PLUGIN_SRC)
+	racc -v -g -o $(GEN_TAB_DEB) $(BNF)	# yydebug ãæå¹ã«ãã
+
+# exerb : $(EXERB_EXE)
+exerb :
+	@echo "!!! please build using ActiveScriptRuby !!!"
+	exit 1
+
+# $(EXERB_EXE) : $(EXERB_EXY) $(GEN_SRC) $(PLUGIN_SRC)
+#	exerb  $(EXERB_EXY)
+# tecsgen.exy.ini ãã tecsgen.exy ãçæããã®ã¯ util/release.sh ã«ããè¡ããã
+# MANIFEST ã«è¨è¼ã®ãã¼ã¸ã§ã³çªå·ããtecsgen.exy.ini ã®æå­åç½®æã«ãããåãè¾¼ã¾ãã
+
+exerb_check : $(EXERB_EXE)
+
+$(EXERB_EXE) : $(EXERB_EXY) $(GEN_SRC) $(PLUGIN_SRC)
+	@echo "### Need make_tecsgen_exerb on ActiveScriptRuby to update tecsgen.exerb ###"
+
+print_error :	# ã¨ã©ã¼ã¡ãã»ã¼ã¸ãæ¾ãåºã
+	grep -e "Generator\.error" -e cdl_error $(LIB_PATH)/*.rb \
+		| grep -v bnf.tab.rb \
+		| sed -e "s/\s*Generator\.error(/  /" -e "s/\s*cdl_error(//" -e "s/).*$$//"
+
+print_error2 :	# ã¨ã©ã¼ã¡ãã»ã¼ã¸ãæ¾ãåºã
+	grep '[^A-Z][A-VXYZ][0-9][0-9][0-9][0-9]' $(LIB_PATH)/*.rb \
+		| grep -v bnf.tab.rb \
+		| grep -v '^Makefile' \
+		| sed -e "s/.*\([A-Z][0-9][0-9][0-9][0-9].*\)/\1/" \
+		| sed -e 's/\(.*\)".*/\1/'
+
+print_warning : # ã¦ã©ã¼ãã³ã°ã¡ãã»ã¼ã¸ãæ¾ãåºã
+	grep -e 'Generator\.warning' -e cdl_warning $(LIB_PATH)/*.rb \
+		| grep -v bnf.tab.rb \
+		| sed -e "s/\s*Generator\.warning(/  /" -e "s/).*$$//"
+
+print_expr_token :
+	# Expression ã«å«ã¾ãããã¼ã¯ã³ãæ¾ãåºã
+	# OP_... ããå¾ãã¯å¼ã¨ã¯é¢ä¿ãªããã¼ã¯ã³
+	grep ':[A-Z]' bnf.y.rb | sed -e 's/.*\(:[A-Z]\w*\).*/\1/'
+
+print_mikan : # è¨­è¨æªå®é¨åãæ¾ãåºã
+	grep mikan $(LIB_PATH)/*.rb 
+
+print_def :
+	grep -e '^ *def' -e '^ *class' $(LIB_PATH)/*.rb | grep -v bnf.tab.rb
+
+print_class :
+	grep '^ *class' $(LIB_PATH)/*.rb | grep -v bnf.tab.rb
+
+rdoc :
+	rdoc --charset euc --op rdoc $(GEN_SRC) $(PLUGIN_SRC)
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/in_exerb.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/in_exerb.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/in_exerb.rb	(revision 270)
@@ -0,0 +1,131 @@
+# coding: utf-8
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2015 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: in_exerb.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+# exerb çã§æåã«èª­ã¿ãã¾ãããã¡ã¤ã«
+# ãã®ãã¡ã¤ã«ãã generate.rb ãèª­ã¿ãã¾ãã
+
+$IN_EXERB=true
+
+# ãã®å¤æ°ã¯ exerb çã®ã¿
+$path = ENV[ 'PATH' ]
+
+#=== cygwin ã®ãã¹ã Windows ãã¹ã«å¤æ
+# cygpath ã³ãã³ããæ¢ãã¦ãè¦ã¤ããã°å¤æãã
+# å¤æã§ããªãã£ããã¾ãã¯å¤æå¾ã®ãã¹ãè¦ã¤ãããªãå ´åãdefault ãè¿ã
+def cygpath( path, default = nil )
+  if ! $IN_EXERB then
+    return default
+  end
+  if File.exist? path then
+    return default
+  end
+
+  found = false
+  $path.split( ";" ).each{ |path2|
+    cygpath_path = "#{path2}\\cygpath.exe"
+    if File.exist?( cygpath_path )  then
+      path3 = nil
+      dbgPrint "in_exerb: cygpath: found\n"
+      IO.popen( "cygpath -m #{path}", "r"){ |io|
+        path3 = io.gets.chomp!
+      }
+      dbgPrint "in_exerb: cygpath: '#{path}' => '#{path3}'\n"
+      # File.stat( path3.to_s )
+
+      if File.exist?( path3 )
+        dbgPrint "in_exerb: cygpath: '#{path3}' found\n"
+        return path3
+      else
+        break
+      end
+    end
+  }
+  dbgPrint "cygpath '#{path}' not found\n"
+  return default
+end
+
+# gcc ã®ãã¹ãè¨­å®ãã
+#  cygwin ã®ãããã¼ã¸ã§ã³ã§ã¯ gcc ã¯ gcc-3.exe ã¾ãã¯ gcc-4.exe ã¸ã®ã·ã³ããªãã¯ãªã³ã¯ã¨ãªã£ã¦ãã
+#  exerb çã§ã¯ã·ã³ããªãã¯ãªã³ã¯ãè¾¿ããªããã gcc ã® exe ãæ¢ã
+#  cygwin ã®ãªã³ã¯ã¯ãã·ã¹ãã å±æ§ãä»ããããã³ãã³ããã­ã³ããä¸ã§ã¯ dir /A:S ãæå®ããªãã¨è¡¨ç¤ºãããªã
+#  (cygwin ã®ãã¼ã¸ã§ã³ã§å®è£
+ãç°ãªããããããªã)
+#  ãã¡ã¤ã«ã®å
+é ­2ãã¤ããèª­åºã PE ãã©ã¼ãããã®ãã¸ãã¯ã«ä¸è´ãããèª¿ã¹ã
+$gcc = "gcc"
+$path.split( ";" ).each{ |path|
+  found = false
+  [ "gcc.exe", "gcc-3.exe", "gcc-4.exe" ].each{ |gcc|
+    gcc_path = "#{path}\\#{gcc}"
+    if File.exist?( gcc_path )  then
+      begin
+        magic = File.read( gcc_path, 2 )
+        if magic == "MZ"                  # ãã¸ãã¯ããã§ãã¯
+          $gcc = gcc
+          found = true
+          break
+        end
+      rescue
+        # magic ã®èª­åºãã«å¤±æãç¡è¦
+      end
+    end
+  }
+  break if found
+}
+
+# cpp ã³ãã³ããè¨­å®ãã
+$cpp = "#{$gcc} -E -D TECSGEN"
+
+# exerb ç TECS ã¸ã§ãã¬ã¼ã¿ã®å®è¡ãéå§
+require "tecsgen.rb"
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/TECSPointer.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/TECSPointer.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/TECSPointer.h	(revision 270)
@@ -0,0 +1,600 @@
+/*
+ *  mruby => TECS brige
+ *  
+ *   Copyright (C) 2008-2012 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$ 
+ */
+
+#ifndef TECSPointer_h__
+#define TECSPointer_h__
+
+#include <string.h>
+#include <stdint.h>
+#include <limits.h>
+
+#ifndef CHAR_T_DEFINED
+typedef	int		bool_t;
+typedef	char	char_t;
+typedef	double	double64_t;
+typedef	float	float32_t;
+#endif /* CHAR_T_DEFINED */
+
+////  define Pointer classes ////
+#define POINTER_BODY( Type, TYPE )										\
+																		\
+	struct Type ## PointerBody {										\
+		uint32_t	length;												\
+		TYPE 		buf[ /* length */ ];								\
+	};
+
+
+// struct TypePointerBody
+POINTER_BODY( Bool,  bool_t )		/* struct BoolPointerBody */
+POINTER_BODY( Double64, double64_t )/* struct Double64PointerBody */
+POINTER_BODY( Float32, float32_t )	/* struct Float32PointerBody */
+
+POINTER_BODY( Int8,  int8_t )		/* struct Int8PointerBody */
+POINTER_BODY( Int16, int16_t )		/* struct Int16PointerBody */
+POINTER_BODY( Int32, int32_t )		/* struct Int32PointerBody */
+POINTER_BODY( Int64, int64_t )		/* struct Int64PointerBody */
+POINTER_BODY( Char,  char_t )		/* struct CharPointerBody */
+POINTER_BODY( Int,   int )			/* struct IntPointerBody */
+POINTER_BODY( Short, short )		/* struct ShortPointerBody */
+POINTER_BODY( Long,  long )			/* struct LongPointerBody */
+
+POINTER_BODY( UInt8,  uint8_t )		/* struct UInt8PointerBody */
+POINTER_BODY( UInt16, uint16_t )	/* struct UInt16PointerBody */
+POINTER_BODY( UInt32, uint32_t )	/* struct UInt32PointerBody */
+POINTER_BODY( UInt64, uint64_t )	/* struct UInt64PointerBody */
+POINTER_BODY( UChar,  uint8_t )		/* struct UCharPointerBody */
+POINTER_BODY( UInt,   unsigned int )	/* struct UIntPointerBody */
+POINTER_BODY( UShort, unsigned short )	/* struct UShortPointerBody */
+POINTER_BODY( ULong,  unsigned long )	/* struct ULongPointerBody */
+
+POINTER_BODY( SChar,  char_t )		/* struct SCharPointerBody */
+
+// â  TECS_NO_VAL_CHECK ã define ããã¨ãå¤ãã§ãã¯ãçç¥ãã
+#ifndef TECS_NO_VAL_CHECK
+#define	VALCHECK_INT(Type, TYPE, type )									\
+	/*  check before assigning mrb_int val to intN_t */					\
+	static inline void													\
+	VALCHECK_ ## Type( mrb_state *mrb, mrb_int val )					\
+	{																	\
+		if( sizeof( mrb_int ) > sizeof( type ) ){						\
+			if( val > TYPE ## _MAX || val < TYPE ## _MIN ) 				\
+				mrb_raise(mrb, E_ARGUMENT_ERROR, "too large or too small for "  #type "_t"); \
+		}																\
+	}
+#define	VALCHECK_MRB_INT(Type, TYPE, type )								\
+	/*  check before assigning val (intN_t) to mrb_int */				\
+	static inline void													\
+	VALCHECK_MRB_ ## Type( mrb_state *mrb, type val )					\
+	{																	\
+		if( sizeof( type ) > sizeof( mrb_int ) ){						\
+			if( val >= (((type)1) << (sizeof(mrb_int)*8-1))				\
+				|| val < -(((type)1) << (sizeof(mrb_int)*8-1)) )		\
+				/* '=' unecessary for negative value	*/				\
+				/* ignore warning on int32_t */							\
+				mrb_raise(mrb, E_ARGUMENT_ERROR, "too large or too small for mrb_int"); \
+		}																\
+	}
+
+#define	VALCHECK_UINT(Type, TYPE, type )								\
+	/*  check before assigning mrb_int val to intN_t */					\
+	static inline void													\
+	VALCHECK_ ## Type( mrb_state *mrb, mrb_int  val )					\
+	{																	\
+		if( sizeof( mrb_int ) > sizeof( type ) ){						\
+			if( val > TYPE ## _MAX || val < 0 ) 						\
+				mrb_raise(mrb, E_ARGUMENT_ERROR, "too large or too small for "  #type "_t"); \
+		}																\
+	}
+#define	VALCHECK_MRB_UINT(Type, TYPE, type )							\
+	/*  check before assigning val (intN_t) to mrb_int */				\
+	static inline void													\
+	VALCHECK_MRB_ ## Type( mrb_state *mrb, type val )					\
+	{																	\
+		if( sizeof( type ) > sizeof( mrb_int ) ){						\
+			if( val >= (((type)1) << (sizeof(mrb_int)*8)))				\
+				/* '=' unecessary for negative value	*/				\
+				/* ignore warning on int32_t */							\
+				mrb_raise(mrb, E_ARGUMENT_ERROR, "too large or too small for mrb_int"); \
+		}																\
+	}
+#else // TECS_NO_VAL_CHECK
+
+#define	VALCHECK_INT(Type, TYPE, type )
+#define	VALCHECK_UINT(Type, TYPE, type )
+
+#endif // TECS_NO_VAL_CHECK
+
+// define VALCHECK function
+#define VALCHECK_Bool( mrb, val )
+#define	VALCHECK_MRB_Bool( mrb, val )
+
+VALCHECK_INT( Int8, INT8, int8_t )
+VALCHECK_MRB_INT( Int8, INT8, int8_t )
+VALCHECK_INT( Int16, INT16, int16_t )
+VALCHECK_MRB_INT( Int16, INT16, int16_t )
+VALCHECK_UINT( UInt8, UINT8, uint8_t )
+#define	VALCHECK_MRB_UInt8
+VALCHECK_UINT( UInt16, UINT16, uint16_t )
+#define	VALCHECK_MRB_UInt16
+VALCHECK_INT( Int32, INT32, int32_t )
+#define VALCHECK_MRB_Int32
+VALCHECK_UINT( UInt32, UINT32, uint32_t )
+#define VALCHECK_MRB_UInt32
+
+VALCHECK_INT( Int64, INT64, int64_t )
+VALCHECK_UINT( UInt64, UINT64, uint64_t )
+#ifndef mrb_int_IS_int64
+	 // â  int 32 bit ãä»®å®ãã¦ãã. 64 bit ã§ããã° mrb_int_IS_64 ã define ãã
+VALCHECK_MRB_INT( Int64, INT64, int64_t )
+VALCHECK_MRB_UINT( UInt64, UINT64, uint64_t )
+#else
+#define VALCHECK_MRB_Int64      // ç¯å²ãã§ãã¯ãç¡æå³ã§ãããããè­¦åãåºãã®ãåé¿ãã
+#define VALCHECK_MRB_UInt64      // ç¯å²ãã§ãã¯ãç¡æå³ã§ãããããè­¦åãåºãã®ãåé¿ãã
+#endif
+
+#ifndef TECS_NO_VAL_CHECK
+	 // â  char_t ã¯ unsigned ã¨ã¿ãªã
+static inline void
+VALCHECK_Char( mrb_state *mrb, mrb_int  val )
+{
+	if( val > 0xff || val < 0 )	
+		mrb_raise(mrb, E_ARGUMENT_ERROR, "too large or too small for char_t");
+}
+#define	VALCHECK_MRB_Char( mrb, val )
+
+VALCHECK_INT( Short, SHRT, short )
+#define	VALCHECK_MRB_Short( mrb, val )
+
+VALCHECK_INT( Int, INT, int )
+#define	VALCHECK_MRB_Int( mrb, val )
+
+VALCHECK_INT( Long, LONG, long )
+#define	VALCHECK_MRB_Long( mrb, val )
+
+VALCHECK_INT( SChar, SCHAR, signed char )
+#define	VALCHECK_MRB_SChar( mrb, val )
+
+VALCHECK_UINT( UChar, UCHAR, unsigned char )
+#define	VALCHECK_MRB_UChar( mrb, val )
+
+VALCHECK_UINT( UInt, UINT, unsigned int )
+#define	VALCHECK_MRB_UInt( mrb, val )
+
+VALCHECK_UINT( UShort, USHRT, unsigned short )
+#define	VALCHECK_MRB_UShort( mrb, val )
+
+VALCHECK_UINT( ULong, ULONG, unsigned long )
+#define	VALCHECK_MRB_ULong( mrb, val )
+
+#else // TECS_NO_VAL_CHECK
+
+#define VALCHECK_Char( mrb, val )
+#define	VALCHECK_MRB_Char( mrb, val )
+#define VALCHECK_Int( mrb, val )
+#define	VALCHECK_MRB_Int( mrb, val )
+#define	VALCHECK_Short( mrb, val )
+#define	VALCHECK_MRB_Short( mrb, val )
+#define	VALCHECK_Long( mrb, val )
+#define	VALCHECK_MRB_Long( mrb, val )
+#define	VALCHECK_SChar( mrb, val )
+#define	VALCHECK_MRB_SChar( mrb, val )
+#define	VALCHECK_UChar( mrb, val )
+#define	VALCHECK_MRB_UChar( mrb, val )
+#define	VALCHECK_UInt( mrb, val )
+#define	VALCHECK_MRB_UInt( mrb, val )
+#define	VALCHECK_UShort( mrb, val )
+#define	VALCHECK_MRB_UShort( mrb, val )
+#define	VALCHECK_ULong( mrb, val )
+#define	VALCHECK_MRB_ULong( mrb, val )
+
+#endif // TECS_NO_VAL_CHECK
+
+#define CHECK_AND_GET_POINTER( Type, type )								\
+	type *CheckAndGet ## Type ## Pointer( mrb_state *mrb, mrb_value value, int32_t len ) \
+	{																	\
+		if( mrb_type(value) != MRB_TT_DATA								\
+			|| DATA_TYPE( value ) == 0									\
+			|| strcmp( DATA_TYPE( value )->struct_name,  "TECS::" #Type "Pointer" ) ) \
+			mrb_raise(mrb, E_TYPE_ERROR, "not PointerType or unexpected PointerType"); \
+		if( len != -1 && ((struct Type ## PointerBody *)DATA_PTR( value ))->length < len ) \
+			mrb_raise(mrb, E_ARGUMENT_ERROR, "size_is too short");		\
+		return ((struct Type##PointerBody*)(DATA_PTR(value)))->buf;		\
+	}																	\
+																		\
+	type *CheckAndGet ## Type ## PointerNullable( mrb_state *mrb, mrb_value value, int32_t len ) \
+	{																	\
+		if( mrb_nil_p(value) )											\
+			return NULL;												\
+		return CheckAndGet ## Type ## Pointer( mrb, value, len );		\
+	}
+
+
+/*
+ * CHECK_AND_GET_CHAR_POINTER & CHECK_AND_GET_CHAR_POINTER_MOD are used 
+ * in case that the macro TECS_Use_MrbString_for_CharPointer is defined.
+ * This does not work as str_modify is static funcion.
+ */
+#define CHECK_AND_GET_CHAR_POINTER( Type, type )								\
+	type *CheckAndGet ## Type ## Pointer( mrb_state *mrb, mrb_value value, int32_t len ) \
+	{																	\
+		if( mrb_type(value) != MRB_TT_STRING )							\
+			mrb_raise(mrb, E_TYPE_ERROR, "not String Type");			\
+		if( len != -1 && RSTRING_LEN(value) < len )						\
+			mrb_raise(mrb, E_ARGUMENT_ERROR, "size_is too short");		\
+		return RSTRING_PTR(value);										\
+	}																	\
+																		\
+	type *CheckAndGet ## Type ## PointerNullable( mrb_state *mrb, mrb_value value, int32_t len ) \
+	{																	\
+		if( mrb_nil_p(value) )											\
+			return NULL;												\
+		return CheckAndGet ## Type ## Pointer( mrb, value, len );		\
+	}
+
+#define CHECK_AND_GET_CHAR_POINTER_MOD( Type, type )					\
+	type *CheckAndGet ## Type ## PointerMod( mrb_state *mrb, mrb_value value, int32_t len ) \
+	{																	\
+		char *ptr;														\
+		if( mrb_type(value) != MRB_TT_STRING )							\
+			mrb_raise(mrb, E_TYPE_ERROR, "not String Type");			\
+		str_modify(mrb,RSTRING(value));									\
+		if( len == -1 || RSTRING_LEN(value) < len )						\
+			mrb_raise(mrb, E_ARGUMENT_ERROR, "size_is too short");		\
+		ptr = RSTRING_PTR(value);										\
+		ptr[len] = '\0';												\
+		return (type *)ptr;												\
+	}																	\
+																		\
+	type *CheckAndGet ## Type ## PointerModNullable( mrb_state *mrb, mrb_value value, int32_t len ) \
+	{																	\
+		if( mrb_nil_p(value) )											\
+			return NULL;												\
+		return CheckAndGet ## Type ## Pointer( mrb, value, len );		\
+	}
+
+#define CHECK_AND_GET_POINTER_PROTO( Type, type )						\
+	type *CheckAndGet ## Type ## Pointer( mrb_state *mrb, mrb_value value, int32_t len ); \
+	type *CheckAndGet ## Type ## PointerNullable( mrb_state *mrb, mrb_value value, int32_t len )
+#define CHECK_AND_GET_POINTER_MOD_PROTO( Type, type )					\
+	type *CheckAndGet ## Type ## PointerMod( mrb_state *mrb, mrb_value value, int32_t len ); \
+	type *CheckAndGet ## Type ## PointerModNullable( mrb_state *mrb, mrb_value value, int32_t len )
+
+CHECK_AND_GET_POINTER_PROTO( Bool,  bool_t );		/* Bool pointer */
+CHECK_AND_GET_POINTER_PROTO( Double64, double64_t );/* Double64 pointer */
+CHECK_AND_GET_POINTER_PROTO( Float32, float32_t );	/* Float32 pointer */
+
+CHECK_AND_GET_POINTER_PROTO( Int8,  int8_t );		/* Int8 pointer */
+CHECK_AND_GET_POINTER_PROTO( Int16, int16_t );		/* Int16 pointer */
+CHECK_AND_GET_POINTER_PROTO( Int32, int32_t );		/* Int32 pointer */
+CHECK_AND_GET_POINTER_PROTO( Int64, int64_t );		/* Int64 pointer */
+CHECK_AND_GET_POINTER_PROTO( Int,   int );			/* Int pointer */
+CHECK_AND_GET_POINTER_PROTO( Short, short );		/* Short pointer */
+CHECK_AND_GET_POINTER_PROTO( Long,  long );			/* Long pointer */
+
+CHECK_AND_GET_POINTER_PROTO( UInt8,  uint8_t );		/* UInt8 pointer */
+CHECK_AND_GET_POINTER_PROTO( UInt16, uint16_t );	/* UInt16 pointer */
+CHECK_AND_GET_POINTER_PROTO( UInt32, uint32_t );	/* UInt32 pointer */
+CHECK_AND_GET_POINTER_PROTO( UInt64, uint64_t );	/* UInt64 pointer */
+CHECK_AND_GET_POINTER_PROTO( UInt,   unsigned int );/* UInt pointer */
+CHECK_AND_GET_POINTER_PROTO( UShort, unsigned short );	/* UShort pointer */
+CHECK_AND_GET_POINTER_PROTO( ULong,  unsigned long );	/* ULong pointer */
+
+#ifndef TECS_Use_MrbString_for_CharPointer
+CHECK_AND_GET_POINTER_PROTO( Char,  char_t );		/* Char pointer */
+CHECK_AND_GET_POINTER_PROTO( SChar,  char_t );		/* SChar pointer */
+//CHECK_AND_GET_POINTER_PROTO( SChar,  schar_t );		/* SChar pointer */
+CHECK_AND_GET_POINTER_PROTO( UChar,  uint8_t );		/* UChar pointer */
+//CHECK_AND_GET_POINTER_PROTO( UChar,  uchar_t );		/* UChar pointer */
+#define CheckAndGetCharPointerMod	CheckAndGetCharPointer
+#define CheckAndGetSCharPointerMod	CheckAndGetSCharPointer
+#define CheckAndGetUCharPointerMod	CheckAndGetUCharPointer
+#define CheckAndGetCharPointerModNullable	CheckAndGetCharPointerNullable
+#define CheckAndGetSCharPointerModNullable	CheckAndGetSCharPointerNullable
+#define CheckAndGetUCharPointerModNullable	CheckAndGetUCharPointerNullable
+#else
+CHECK_AND_GET_POINTER_PROTO( Char,  char_t );		/* Char pointer */
+CHECK_AND_GET_POINTER_PROTO( SChar,  char_t );		/* SChar pointer */
+CHECK_AND_GET_POINTER_PROTO( UChar,  uint8_t );		/* UChar pointer */
+CHECK_AND_GET_POINTER_MOD_PROTO( Char,  char_t );	/* Char pointer */
+CHECK_AND_GET_POINTER_MOD_PROTO( SChar,  char_t );	/* SChar pointer */
+CHECK_AND_GET_POINTER_MOD_PROTO( UChar,  uint8_t );	/* UChar pointer */
+#endif /* TECS_Use_MrbString_for_CharPointer */
+
+#define GET_SET_BOOL( Type, TYPE )										\
+	static mrb_value													\
+	Type ## Pointer_aget(mrb_state *mrb, mrb_value self)				\
+	{																	\
+		struct Type ## PointerBody *pointerBody = DATA_PTR( self );		\
+		mrb_int	subscript;												\
+		TYPE	val;													\
+																		\
+		mrb_get_args(mrb, "i", &subscript );							\
+		if( subscript < 0 || subscript >= pointerBody->length )			\
+			mrb_raise(mrb, E_INDEX_ERROR, "index is out of array (get)"); \
+		val = pointerBody->buf[ subscript ];							\
+		VALCHECK_MRB_ ## Type( mrb, val );								\
+		return val ? mrb_true_value() : mrb_false_value();				\
+	}																	\
+																		\
+	static mrb_value													\
+	Type ## Pointer_aset(mrb_state *mrb, mrb_value self)				\
+	{																	\
+		struct Type ## PointerBody *pointerBody = DATA_PTR( self ); 	\
+		mrb_int	subscript;												\
+		mrb_value	val;													\
+																		\
+		mrb_get_args(mrb, "io", &subscript, &val );						\
+																		\
+		if( subscript < 0 || subscript >= pointerBody->length )			\
+			mrb_raise(mrb, E_INDEX_ERROR, "index is out of array (set)"); \
+		pointerBody->buf[ subscript ] = mrb_test( val );				\
+																		\
+		return self;													\
+	}																	\
+																		\
+	static mrb_value													\
+	Type ## Pointer_get_val(mrb_state *mrb, mrb_value self)				\
+	{																	\
+		struct Type ## PointerBody *pointerBody = DATA_PTR( self );		\
+		TYPE	val;													\
+																		\
+		val = *pointerBody->buf;										\
+		VALCHECK_MRB_ ## Type( mrb, val );								\
+		return val ? mrb_true_value() : mrb_false_value();				\
+	}																	\
+																		\
+	static mrb_value													\
+	Type ## Pointer_set_val(mrb_state *mrb, mrb_value self)				\
+	{																	\
+		struct Type ## PointerBody *pointerBody = DATA_PTR( self ); 	\
+		mrb_value	val;												\
+																		\
+		mrb_get_args(mrb, "o", &val );									\
+																		\
+		*pointerBody->buf = mrb_test( val );							\
+		return self;													\
+	}
+
+#define GET_SET_CHAR( Type, TYPE )		GET_SET_INT( Type, TYPE )
+#define GET_SET_INT( Type, TYPE )										\
+	static mrb_value													\
+	Type ## Pointer_aget(mrb_state *mrb, mrb_value self)				\
+	{																	\
+		struct Type ## PointerBody *pointerBody = DATA_PTR( self );		\
+		mrb_int	subscript;												\
+		TYPE	val;													\
+																		\
+		mrb_get_args(mrb, "i", &subscript );							\
+		if( subscript < 0 || subscript >= pointerBody->length )			\
+			mrb_raise(mrb, E_INDEX_ERROR, "index is out of array (get)"); \
+		val = pointerBody->buf[ subscript ];							\
+		VALCHECK_MRB_ ## Type( mrb, val );								\
+		return mrb_fixnum_value( val );									\
+	}																	\
+																		\
+	static mrb_value													\
+	Type ## Pointer_aset(mrb_state *mrb, mrb_value self)				\
+	{																	\
+		struct Type ## PointerBody *pointerBody = DATA_PTR( self ); 	\
+		mrb_int	subscript;												\
+		mrb_int	val;													\
+																		\
+		mrb_get_args(mrb, "ii", &subscript, &val );						\
+																		\
+		if( subscript < 0 || subscript >= pointerBody->length )			\
+			mrb_raise(mrb, E_INDEX_ERROR, "index is out of array (set)"); \
+		VALCHECK_ ## Type ( mrb, val );									\
+		pointerBody->buf[ subscript ] = val;							\
+																		\
+		return self;													\
+	}																	\
+																		\
+	static mrb_value													\
+	Type ## Pointer_get_val(mrb_state *mrb, mrb_value self)				\
+	{																	\
+		struct Type ## PointerBody *pointerBody = DATA_PTR( self );		\
+		TYPE	val;													\
+																		\
+		val = *pointerBody->buf;										\
+		VALCHECK_MRB_ ## Type( mrb, val );								\
+		return mrb_fixnum_value( val );									\
+	}																	\
+																		\
+	static mrb_value													\
+	Type ## Pointer_set_val(mrb_state *mrb, mrb_value self)				\
+	{																	\
+		struct Type ## PointerBody *pointerBody = DATA_PTR( self ); 	\
+		mrb_int	val;													\
+																		\
+		mrb_get_args(mrb, "i", &val );									\
+																		\
+		VALCHECK_ ## Type ( mrb, val );									\
+		*pointerBody->buf = val;										\
+																		\
+		return self;													\
+	}
+
+#define GET_SET_FLOAT( Type, TYPE )										\
+	static mrb_value													\
+	Type ## Pointer_aget(mrb_state *mrb, mrb_value self)				\
+	{																	\
+		struct Type ## PointerBody *pointerBody = DATA_PTR( self );		\
+		mrb_int	subscript;												\
+																		\
+		mrb_get_args(mrb, "i", &subscript );							\
+		if( subscript < 0 || subscript >= pointerBody->length )			\
+			mrb_raise(mrb, E_INDEX_ERROR, "index is out of array (get)"); \
+		return mrb_float_value( mrb, pointerBody->buf[ subscript ] );   \
+	}																	\
+																		\
+	static mrb_value													\
+	Type ## Pointer_aset(mrb_state *mrb, mrb_value self)				\
+	{																	\
+		struct Type ## PointerBody *pointerBody = DATA_PTR( self ); 	\
+		mrb_int	subscript;												\
+		mrb_float	val;												\
+																		\
+		mrb_get_args(mrb, "if", &subscript, &val );						\
+																		\
+		if( subscript < 0 || subscript >= pointerBody->length )			\
+			mrb_raise(mrb, E_INDEX_ERROR, "index is out of array (set)"); \
+		pointerBody->buf[ subscript ] = val;							\
+																		\
+		return self;													\
+	}																	\
+																		\
+	static mrb_value													\
+	Type ## Pointer_get_val(mrb_state *mrb, mrb_value self)				\
+	{																	\
+		struct Type ## PointerBody *pointerBody = DATA_PTR( self );		\
+																		\
+		return mrb_float_value( mrb, *pointerBody->buf );               \
+	}																	\
+																		\
+	static mrb_value													\
+	Type ## Pointer_set_val(mrb_state *mrb, mrb_value self)				\
+	{																	\
+		struct Type ## PointerBody *pointerBody = DATA_PTR( self ); 	\
+		mrb_float	val;												\
+																		\
+		mrb_get_args(mrb, "f", &val );									\
+																		\
+		*pointerBody->buf = val;										\
+																		\
+		return self;													\
+	}
+
+////  define Pointer classes ////
+#define POINTER_CLASS( Type, TYPE )										\
+																		\
+	static void															\
+	Type ## PointerBody_free( mrb_state *mrb, void *p )					\
+	{																	\
+		(void)mrb_free( mrb, p );										\
+	}																	\
+																		\
+	struct mrb_data_type Type ## PointerBody_mrb_data_type =			\
+		{																\
+			"TECS::" #Type "Pointer",									\
+			Type ## PointerBody_free									\
+		};																\
+																		\
+	static mrb_value													\
+	Type ## Pointer_initialize( mrb_state *mrb, mrb_value self)			\
+	{																	\
+		mrb_int	length;													\
+		struct Type ## PointerBody *pointerBody;						\
+																		\
+		mrb_get_args(mrb, "i", &length );								\
+		if( length < 0 )												\
+			mrb_raise(mrb, E_INDEX_ERROR, "negative length");			\
+		DATA_TYPE( self ) = &Type ## PointerBody_mrb_data_type;			\
+		pointerBody = (struct Type ## PointerBody *)mrb_malloc(mrb, sizeof(struct Type ## PointerBody) + length * sizeof( TYPE ) ); \
+		pointerBody->length = length;									\
+		DATA_PTR( self ) = (void *)pointerBody;							\
+						 												\
+		return self;													\
+	}																	\
+																		\
+	static mrb_value													\
+	Type ## Pointer_size(mrb_state *mrb, mrb_value self)				\
+	{																	\
+		struct Type ## PointerBody *pointerBody = DATA_PTR( self );		\
+																		\
+		return mrb_fixnum_value( pointerBody->length );					\
+	}																	\
+																		\
+	struct RClass *														\
+	tecs_init_## Type ## Pointer(mrb_state *mrb, struct RClass *TECS)	\
+	{																	\
+		struct RClass *a;												\
+																		\
+		a = mrb_define_class_under(mrb, TECS, #Type "Pointer", mrb->object_class); \
+		MRB_SET_INSTANCE_TT(a, MRB_TT_DATA);							\
+																		\
+		mrb_define_method(mrb, a, "initialize",      Type ## Pointer_initialize,   MRB_ARGS_REQ(1)); \
+		mrb_define_method(mrb, a, "[]",              Type ## Pointer_aget,         MRB_ARGS_REQ(1)); \
+		mrb_define_method(mrb, a, "value",           Type ## Pointer_get_val,      MRB_ARGS_NONE()); \
+		mrb_define_method(mrb, a, "[]=",             Type ## Pointer_aset,         MRB_ARGS_REQ(2)); \
+		mrb_define_method(mrb, a, "value=",          Type ## Pointer_set_val,      MRB_ARGS_REQ(1)); \
+		mrb_define_method(mrb, a, "size",            Type ## Pointer_size,         MRB_ARGS_NONE()); \
+		mrb_define_method(mrb, a, "length",          Type ## Pointer_size,         MRB_ARGS_NONE()); \
+		return	a;														\
+	}
+
+static inline mrb_value
+CharPointer_to_s( mrb_state *mrb, mrb_value self )
+{
+	struct CharPointerBody *pointerBody = DATA_PTR( self );
+	return mrb_str_new( mrb, pointerBody->buf, strnlen( pointerBody->buf, pointerBody->length ) );
+}
+
+static inline mrb_value
+CharPointer_from_s( mrb_state *mrb, mrb_value self )
+{
+	mrb_value str;
+	struct CharPointerBody *pointerBody = DATA_PTR( self );
+
+	mrb_get_args(mrb, "o", &str );
+	if( mrb_type( str ) != MRB_TT_STRING ){
+		mrb_raise(mrb, E_ARGUMENT_ERROR, "Not String");
+	}
+
+	strncpy( pointerBody->buf, RSTRING_PTR(str), pointerBody->length );
+	return self;
+}
+
+/* Initialize TECSPointer classes */
+void	init_TECSPointer( mrb_state *mrb, struct RClass *TECS );
+
+#endif /* TECSPointer_h__ */
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/TECSStruct.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/TECSStruct.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/TECSStruct.h	(revision 270)
@@ -0,0 +1,158 @@
+/*
+ *  mruby => TECS brige
+ *  
+ *   Copyright (C) 2008-2012 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$ 
+ */
+
+#ifndef TECSStruct_h__
+#define TECSStruct_h__
+
+#define MEMBER_GET_SET_INT( TAG, MEMBER, Type, TYPE )					\
+	static mrb_value													\
+	Struct_ ## TAG ## _ ## MEMBER ## _aget(mrb_state *mrb, mrb_value self)	\
+	{																	\
+		struct TAG *st = DATA_PTR( self );								\
+		TYPE ## _t	val;												\
+																		\
+		val = st->MEMBER;												\
+		VALCHECK_MRB_ ## Type( mrb, val );								\
+		return mrb_fixnum_value( val );									\
+	}																	\
+																		\
+	static mrb_value													\
+	Struct_ ## TAG ## _ ## MEMBER ## _aset(mrb_state *mrb, mrb_value self)	\
+	{																	\
+		struct TAG *st = DATA_PTR( self );								\
+		mrb_int	val;													\
+																		\
+		mrb_get_args(mrb, "i", &val );									\
+																		\
+		VALCHECK_ ## Type ( mrb, val );									\
+		st->MEMBER = val;												\
+																		\
+		return self;													\
+	}
+
+#define MEMBER_GET_SET_FLOAT( TAG, MEMBER )								\
+	static mrb_value													\
+	Struct_ ## TAG ## _ ## MEMBER ## _aget(mrb_state *mrb, mrb_value self)	\
+	{																	\
+		struct TAG *st = DATA_PTR( self );								\
+																		\
+		return mrb_float_value( mrb, st->MEMBER );                      \
+	}																	\
+																		\
+	static mrb_value													\
+	Struct_ ## TAG ## _ ## MEMBER ## _aset(mrb_state *mrb, mrb_value self)	\
+	{																	\
+		struct TAG *st = DATA_PTR( self );								\
+		mrb_float	val;												\
+																		\
+		mrb_get_args(mrb, "f", &val );									\
+																		\
+		st->MEMBER = val;												\
+																		\
+		return self;													\
+	}
+
+////  define Struct class ////
+#define STRUCT_CLASS( TAG )												\
+																		\
+	static void															\
+	Struct ## TAG ## Body_free( mrb_state *mrb, void *p )				\
+	{																	\
+		(void)mrb_free( mrb, p );										\
+	}																	\
+																		\
+	struct mrb_data_type Struct ## TAG ## Body_mrb_data_type =			\
+		{																\
+			"TECS::Struct" #TAG,										\
+			Struct ## TAG ## Body_free									\
+		};																\
+																		\
+	static mrb_value													\
+	Struct_ ## TAG ## _initialize( mrb_state *mrb, mrb_value self)		\
+	{																	\
+		mrb_int	length;													\
+		struct  TAG *structBody;										\
+																		\
+		DATA_TYPE( self ) = &Struct ## TAG ## Body_mrb_data_type;		\
+		DATA_PTR( self ) = mrb_malloc(mrb, sizeof(struct TAG)); 		\
+						 												\
+		return self;													\
+	}
+
+#define  STRUCT_INIT_BEGIN( TAG )										\
+	struct RClass *														\
+	tecs_init_Struct_## TAG(mrb_state *mrb, struct RClass *TECS)		\
+	{																	\
+		struct RClass *a;												\
+																		\
+		a = mrb_define_class_under(mrb, TECS, "Struct" #TAG, mrb->object_class); \
+		MRB_SET_INSTANCE_TT(a, MRB_TT_DATA);							\
+																		\
+		mrb_define_method(mrb, a, "initialize", Struct_ ## TAG ## _initialize,            MRB_ARGS_NONE());
+
+#define  STRUCT_INIT_MEMBER( TAG, MEMBER )								\
+		mrb_define_method(mrb, a, #MEMBER,      Struct_ ## TAG ## _ ## MEMBER ## _aget,   MRB_ARGS_NONE()); \
+		mrb_define_method(mrb, a, #MEMBER "=",  Struct_ ## TAG ## _ ## MEMBER ## _aset,   MRB_ARGS_REQ(1));
+
+
+#define  STRUCT_INIT_END( TAG )											\
+	}
+
+#define CHECK_STRUCT( tag, value )										\
+	do {																\
+		if( mrb_type(value) != MRB_TT_DATA								\
+			|| DATA_TYPE( value ) == 0									\
+			|| strcmp( DATA_TYPE( value )->struct_name, "TECS::Struct" #tag ) ) \
+			mrb_raise(mrb, E_TYPE_ERROR, "not Struct or tag mismatch"); \
+	}while(0)
+
+#endif /* TECSStruct_h__ */
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/mruby.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/mruby.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/mruby.cdl	(revision 270)
@@ -0,0 +1,5 @@
+import_C( "tecs_mruby.h" );
+
+import( <mrubyInitializer.cdl> );
+import( <mrubyPointers.cdl> );
+import( <mrubyVMs.cdl> );
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/mrubyInitializer.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/mrubyInitializer.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/mrubyInitializer.cdl	(revision 270)
@@ -0,0 +1,20 @@
+
+namespace nMruby{
+
+	signature sInitializeBridge {
+		void initializeBridge( [in]const mrb_state *mrb );
+	};
+
+	signature sInitializeTECSBridge {
+		void initializeBridge( [inout]mrb_state *mrb, [inout]struct RClass *TECS );
+	};
+
+	// tTECSInitializer creates classes under "TECS" module in mruby VM
+	celltype tTECSInitializer {
+		entry sInitializeBridge eInitialize;
+		call  sInitializeTECSBridge cInitialize[];
+		var{
+			struct RClass *TECS = 0;
+		};
+	};
+};
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/mrubyPointers.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/mrubyPointers.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/mrubyPointers.cdl	(revision 270)
@@ -0,0 +1,35 @@
+// Pointer celltypes
+
+namespace nMruby {
+	// Pointer to Bool
+	[singleton]celltype tBoolPointer	 {	entry  sInitializeTECSBridge eInitialize; };
+
+	// Pointer to Chars
+	[singleton]celltype tCharPointer	 {	entry  sInitializeTECSBridge eInitialize; };
+	[singleton]celltype tSCharPointer	 {	entry  sInitializeTECSBridge eInitialize; };
+	[singleton]celltype tUCharPointer	 {	entry  sInitializeTECSBridge eInitialize; };
+
+	// Pointer to Signed Integers
+	[singleton]celltype tInt8Pointer	 {	entry  sInitializeTECSBridge eInitialize; };
+	[singleton]celltype tInt16Pointer	 {	entry  sInitializeTECSBridge eInitialize; };
+	[singleton]celltype tInt32Pointer	 {	entry  sInitializeTECSBridge eInitialize; };
+	[singleton]celltype tInt64Pointer	 {	entry  sInitializeTECSBridge eInitialize; };
+
+	// Pointer to Unsigned Integers
+	[singleton]celltype tUInt8Pointer	 {	entry  sInitializeTECSBridge eInitialize; };
+	[singleton]celltype tUInt16Pointer	 {	entry  sInitializeTECSBridge eInitialize; };
+	[singleton]celltype tUInt32Pointer	 {	entry  sInitializeTECSBridge eInitialize; };
+	[singleton]celltype tUInt64Pointer	 {	entry  sInitializeTECSBridge eInitialize; };
+
+	// Pointer to Floating types
+	[singleton]celltype tFloat32Pointer	 {	entry  sInitializeTECSBridge eInitialize; };
+	[singleton]celltype tDouble64Pointer	 {	entry  sInitializeTECSBridge eInitialize; };
+
+	// Pointer to Integers (unrecommended)
+	[singleton]celltype tIntPointer	 {	entry  sInitializeTECSBridge eInitialize; };
+	[singleton]celltype tShortPointer	 {	entry  sInitializeTECSBridge eInitialize; };
+	[singleton]celltype tLongPointer	 {	entry  sInitializeTECSBridge eInitialize; };
+	[singleton]celltype tUIntPointer	 {	entry  sInitializeTECSBridge eInitialize; };
+	[singleton]celltype tUShortPointer	 {	entry  sInitializeTECSBridge eInitialize; };
+	[singleton]celltype tULongPointer	 {	entry  sInitializeTECSBridge eInitialize; };
+};
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/mrubyVMs.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/mrubyVMs.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/mrubyVMs.cdl	(revision 270)
@@ -0,0 +1,17 @@
+import( <posix.cdl> );
+
+/*
+ * tools/mruby/mruby.c ãã cInit_initializeBridge( mrb ) ãå¼ã³åºãããã«å¤æ´ãããã®
+ */
+namespace nMruby{
+	[active]
+	celltype tMrubyProc {
+	    entry nPosix::sMain eMain;
+
+		[optional]
+			call sInitializeBridge cInit;
+		var {
+			mrb_state *mrb;
+		};
+	};
+};
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tBoolPointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tBoolPointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tBoolPointer.c	(revision 270)
@@ -0,0 +1,40 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tBoolPointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_BOOL( Bool, bool_t )
+POINTER_CLASS( Bool, bool_t )
+CHECK_AND_GET_POINTER( Bool, bool_t )
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tBoolPointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	(void)tecs_init_BoolPointer( mrb, TECS );
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tCharPointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tCharPointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tCharPointer.c	(revision 270)
@@ -0,0 +1,50 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tCharPointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_INT( Char, char_t )
+POINTER_CLASS( Char, char_t )
+#ifndef  TECS_Use_MrbString_for_CharPointer
+CHECK_AND_GET_POINTER( Char, char_t )
+#else
+CHECK_AND_GET_CHAR_POINTER( Char, char_t )
+CHECK_AND_GET_CHAR_POINTER_MOD( Char, char_t )
+#endif
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tCharPointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	struct  RClass *c;
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	c = tecs_init_CharPointer( mrb, TECS );
+	mrb_define_method(mrb, c, "to_s", CharPointer_to_s, MRB_ARGS_NONE());
+	mrb_define_method(mrb, c, "from_s", CharPointer_from_s, MRB_ARGS_REQ(1));
+
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tDouble64Pointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tDouble64Pointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tDouble64Pointer.c	(revision 270)
@@ -0,0 +1,40 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tDouble64Pointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_FLOAT( Double64, double64_t )
+POINTER_CLASS( Double64, double64_t )
+CHECK_AND_GET_POINTER( Double64, double64_t )
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tDouble64Pointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	(void)tecs_init_Double64Pointer( mrb, TECS );
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tFloat32Pointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tFloat32Pointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tFloat32Pointer.c	(revision 270)
@@ -0,0 +1,40 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tFloat32Pointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_FLOAT( Float32, float32_t )
+POINTER_CLASS( Float32, float32_t )
+CHECK_AND_GET_POINTER( Float32, float32_t )
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tFloat32Pointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	(void)tecs_init_Float32Pointer( mrb, TECS );
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tInt16Pointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tInt16Pointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tInt16Pointer.c	(revision 270)
@@ -0,0 +1,40 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tInt16Pointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_INT( Int16, int16_t )
+POINTER_CLASS( Int16, int16_t )
+CHECK_AND_GET_POINTER( Int16, int16_t )
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tInt16Pointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	(void)tecs_init_Int16Pointer( mrb, TECS );
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tInt32Pointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tInt32Pointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tInt32Pointer.c	(revision 270)
@@ -0,0 +1,40 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tInt32Pointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_INT( Int32, int32_t )
+POINTER_CLASS( Int32, int32_t )
+CHECK_AND_GET_POINTER( Int32, int32_t )
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tInt32Pointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	(void)tecs_init_Int32Pointer( mrb, TECS );
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tInt64Pointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tInt64Pointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tInt64Pointer.c	(revision 270)
@@ -0,0 +1,40 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tInt64Pointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_INT( Int64, int64_t )
+POINTER_CLASS( Int64, int64_t )
+CHECK_AND_GET_POINTER( Int64, int64_t )
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tInt64Pointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	(void)tecs_init_Int64Pointer( mrb, TECS );
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tInt8Pointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tInt8Pointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tInt8Pointer.c	(revision 270)
@@ -0,0 +1,40 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tInt8Pointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_INT( Int8, int8_t )
+POINTER_CLASS( Int8, int8_t )
+CHECK_AND_GET_POINTER( Int8, int8_t )
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tInt8Pointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	(void)tecs_init_Int8Pointer( mrb, TECS );
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tIntPointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tIntPointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tIntPointer.c	(revision 270)
@@ -0,0 +1,40 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tIntPointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_INT( Int, int )
+POINTER_CLASS( Int, int )
+CHECK_AND_GET_POINTER( Int, int )
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tIntPointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	(void)tecs_init_IntPointer( mrb, TECS );
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tLongPointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tLongPointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tLongPointer.c	(revision 270)
@@ -0,0 +1,40 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tLongPointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_INT( Long, long )
+POINTER_CLASS( Long, long )
+CHECK_AND_GET_POINTER( Long, long )
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tLongPointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	(void)tecs_init_LongPointer( mrb, TECS );
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tMruby.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tMruby.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tMruby.c	(revision 270)
@@ -0,0 +1,193 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ * å¼ã³å£é¢æ° #_TCPF_#
+ * call port : cSerialPort  signature: sSerialPort context: task
+ *   ER             cSerialPort_open( );
+ *   ER             cSerialPort_close( );
+ *   ER_UINT        cSerialPort_read( char_t* buffer, uint_t length );
+ *   ER_UINT        cSerialPort_write( const char_t* buffer, uint_t length );
+ *   ER             cSerialPort_control( uint_t ioControl );
+ *   ER             cSerialPort_refer( T_SERIAL_RPOR* pk_rpor );
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tMruby_tecsgen.h"
+#include <string.h>
+
+#include <mruby.h>
+#include <mruby/proc.h>
+#include <mruby/data.h>
+#include <mruby/compile.h>
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+#define MEM_SIZE 1024*1024 // 1MB
+//#define VM_EVAL
+//#define MALLOC_EVAL
+
+#include <t_syslog.h>
+
+void mrb_init_mrb(CELLCB *p_cellcb, mrb_state *mrb);
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eMrubyBody
+ * entry port: eMrubyBody
+ * signature:  sMrubyBody
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eMrubyBody_main
+ * name:         eMrubyBody_main
+ * global_name:  nMruby_tMruby_eMrubyBody_main
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eMrubyBody_main(CELLIDX idx)
+{
+#ifdef VM_EVAL
+  SYSUTM tstart, tend;
+#endif
+  
+  CELLCB	*p_cellcb;
+  mrb_state *mrb;
+  
+  if (VALID_IDX(idx)) {
+    p_cellcb = GET_CELLCB(idx);
+  }
+#ifdef VM_EVAL
+  get_utm(&tstart);
+#endif
+
+  /* new interpreter instance */
+  mrb = mrb_open();
+  if (mrb == NULL) {
+    syslog(LOG_EMERG, "Invalid mrb_state, exiting test driver");
+//    cSerialPort_write("Invalid mrb_state, exiting test driver\n", 39);
+    return;
+  }
+
+#ifdef VM_EVAL
+  get_utm(&tend);
+  syslog(LOG_EMERG, "mrb_open time = %d micro sec", tend - tstart);
+#endif
+  if(is_cInit_joined()){
+    // TECS Bridge
+    cInit_initializeBridge( mrb );
+  }
+  mrb_init_mrb(p_cellcb, mrb);
+	syslog(LOG_EMERG, "end of mruby program");
+#ifdef VM_EVAL
+  get_utm(&tstart);
+#endif
+  mrb_close(mrb);
+#ifdef VM_EVAL
+  get_utm(&tend);
+  syslog(LOG_EMERG, "mrb_close time = %d micro sec", tend - tstart);
+#endif
+}
+
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
+
+void
+mrb_init_mrb(CELLCB	*p_cellcb, mrb_state *mrb)
+{
+  mrb_irep *irep = mrb_read_irep(mrb, ATTR_irep);
+  
+  mrb_run(mrb, mrb_proc_new(mrb, irep), mrb_top_self(mrb));
+  if (mrb->exc) {
+    mrb_p(mrb, mrb_obj_value(mrb->exc));
+    exit(0);
+  }
+}
+
+/*
+extern void debug_print(char * str);
+extern void debug_print_address(char * str, int address);
+extern void debug_print_int(char * str, int data);
+#include <errno.h>
+void *
+_sbrk(size_t incr)
+{
+  // TODO: æ­£ãããã¼ããµã¤ãºãæå®ãããã¨ (EV3ã¯RAM 64MB)
+  extern char __heap_start;
+  static uint32_t cs3_heap_end = &__heap_start + MEM_SIZE; // ãã¼ãã®æå¾ã¢ãã¬ã¹
+  static char *heap_end = &__heap_start;
+  char *prev_heap_end;
+  uint16_t incr2;
+  
+  char str[20];
+  
+#ifdef MALLOC_EVAL
+  syslog(LOG_EMERG, "heap_start = %x", &__heap_start);
+#endif
+
+  prev_heap_end = heap_end;
+  incr2 = (uint16_t)incr;
+  
+  if (heap_end + incr2 > cs3_heap_end) {
+    errno = ENOMEM;
+    return (void *)-1;
+  }
+  heap_end += incr2;
+
+#ifdef MALLOC_EVAL
+  syslog(LOG_EMERG, "heap_end = %x", heap_end);
+#endif
+
+#ifdef DEBUG_MALLOC	
+  debug_print_int("incr",incr);
+  debug_print_address("prev_heap_end",(int) prev_heap_end);
+  dly_tsk(50);
+#endif
+  return (void *) prev_heap_end;
+}
+*/
+extern intptr_t bt_snd_chr(intptr_t c);
+extern intptr_t uart_snd_chr(intptr_t c) ;
+extern void initialize_lcd_dri();
+#define UART1	(*(volatile struct st_uart *)0x01D0C000)
+size_t fwrite(const void *buf, size_t size, size_t n, FILE *fp){
+  intptr_t intp;
+  char *cp;
+  cp = (char*)buf;
+  /* ã·ãªã¢ã«ãã¼ããçµåããã¦ããå ´åã®ã¿å¼ã³åºã
+  if(is_cSerialPort_joined()){
+    //cSerialPort_write(buf, size);
+   
+  }*/
+    
+  for(int i = 0;i < size; i++){
+    intp = *cp++;
+    if (intp == '\n') {
+	    bt_snd_chr('\r');
+	    while(!uart_send(&UART1, '\r'));
+    } 
+	bt_snd_chr(intp);
+    while(!uart_send(&UART1, intp));
+
+  }
+    return size;
+};
+
+#ifndef EV3_SOUND
+void _write(){}
+void _close(){}
+void _lseek(){}
+void _read(){}
+//void _fstat(){}
+//void _isatty(){}
+#endif
+
+//void _exit(){}
+//void _getpid(){}
+//void _kill(){}
+void _gettimeofday(){}
+void _fini(){}
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tMrubyProc.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tMrubyProc.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tMrubyProc.c	(revision 270)
@@ -0,0 +1,266 @@
+/*
+ * This file comes from mruby. (renamed from tools/mruby/mruby.c)
+ * This file is distributed under ruby's license. (not under TOPPERS license)
+ *   see https://github.com/mruby/mruby
+ * A little modification is done to to call initializer registering TECS components.
+ *
+ * ãã®ãã¡ã¤ã«ã¯ãmruby ã®ãã®ã§ãã
+ * mruby ã®ã©ã¤ã»ã³ã¹ã®ãã¨ã§ãé
+å¸ããã¾ãã(TOPPERS ã©ã¤ã»ã³ã¹ã§ã¯ããã¾ãã)
+ *  åç
+§ï¼  https://github.com/mruby/mruby
+ * TECS ã³ã³ãã¼ãã³ããç»é²ããåæåå­ãå¼ã¶ãããå°ãã®ä¿®æ­£ããªããã¦ãã¾ãã
+ */
+
+#include "nMruby_tMrubyProc_tecsgen.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mruby.h"
+#include "mruby/array.h"
+#include "mruby/compile.h"
+#include "mruby/dump.h"
+#include "mruby/variable.h"
+
+#ifndef ENABLE_STDIO
+static void
+p(mrb_state *mrb, mrb_value obj)
+{
+  obj = mrb_funcall(mrb, obj, "inspect", 0);
+  fwrite(RSTRING_PTR(obj), RSTRING_LEN(obj), 1, stdout);
+  putc('\n', stdout);
+}
+#else
+#define p(mrb,obj) mrb_p(mrb,obj)
+#endif
+
+void mrb_show_version(mrb_state *);
+void mrb_show_copyright(mrb_state *);
+
+struct _args {
+  FILE *rfp;
+  char* cmdline;
+  mrb_bool fname        : 1;
+  mrb_bool mrbfile      : 1;
+  mrb_bool check_syntax : 1;
+  mrb_bool verbose      : 1;
+  int argc;
+  char** argv;
+};
+
+static void
+usage(const char *name)
+{
+  static const char *const usage_msg[] = {
+  "switches:",
+  "-b           load and execute RiteBinary (mrb) file",
+  "-c           check syntax only",
+  "-e 'command' one line of script",
+  "-v           print version number, then run in verbose mode",
+  "--verbose    run in verbose mode",
+  "--version    print the version",
+  "--copyright  print the copyright",
+  NULL
+  };
+  const char *const *p = usage_msg;
+
+  printf("Usage: %s [switches] programfile\n", name);
+  while (*p)
+    printf("  %s\n", *p++);
+}
+
+static int
+parse_args(mrb_state *mrb, int argc, char **argv, struct _args *args)
+{
+  char **origargv = argv;
+  static const struct _args args_zero = { 0 };
+
+  *args = args_zero;
+
+  for (argc--,argv++; argc > 0; argc--,argv++) {
+    char *item;
+    if (argv[0][0] != '-') break;
+
+    if (strlen(*argv) <= 1) {
+      argc--; argv++;
+      args->rfp = stdin;
+      break;
+    }
+
+    item = argv[0] + 1;
+    switch (*item++) {
+    case 'b':
+      args->mrbfile = TRUE;
+      break;
+    case 'c':
+      args->check_syntax = TRUE;
+      break;
+    case 'e':
+      if (item[0]) {
+        goto append_cmdline;
+      }
+      else if (argc > 1) {
+        argc--; argv++;
+        item = argv[0];
+append_cmdline:
+        if (!args->cmdline) {
+          size_t buflen;
+          char *buf;
+
+          buflen = strlen(item) + 1;
+          buf = (char *)mrb_malloc(mrb, buflen);
+          memcpy(buf, item, buflen);
+          args->cmdline = buf;
+        }
+        else {
+          size_t cmdlinelen;
+          size_t itemlen;
+
+          cmdlinelen = strlen(args->cmdline);
+          itemlen = strlen(item);
+          args->cmdline =
+            (char *)mrb_realloc(mrb, args->cmdline, cmdlinelen + itemlen + 2);
+          args->cmdline[cmdlinelen] = '\n';
+          memcpy(args->cmdline + cmdlinelen + 1, item, itemlen + 1);
+        }
+      }
+      else {
+        printf("%s: No code specified for -e\n", *origargv);
+        return EXIT_SUCCESS;
+      }
+      break;
+    case 'v':
+      if (!args->verbose) mrb_show_version(mrb);
+      args->verbose = TRUE;
+      break;
+    case '-':
+      if (strcmp((*argv) + 2, "version") == 0) {
+        mrb_show_version(mrb);
+        exit(EXIT_SUCCESS);
+      }
+      else if (strcmp((*argv) + 2, "verbose") == 0) {
+        args->verbose = TRUE;
+        break;
+      }
+      else if (strcmp((*argv) + 2, "copyright") == 0) {
+        mrb_show_copyright(mrb);
+        exit(EXIT_SUCCESS);
+      }
+    default:
+      return EXIT_FAILURE;
+    }
+  }
+
+  if (args->rfp == NULL && args->cmdline == NULL) {
+    if (*argv == NULL) args->rfp = stdin;
+    else {
+      args->rfp = fopen(argv[0], args->mrbfile ? "rb" : "r");
+      if (args->rfp == NULL) {
+        printf("%s: Cannot open program file. (%s)\n", *origargv, *argv);
+        return EXIT_FAILURE;
+      }
+      args->fname = TRUE;
+      args->cmdline = argv[0];
+      argc--; argv++;
+    }
+  }
+  args->argv = (char **)mrb_realloc(mrb, args->argv, sizeof(char*) * (argc + 1));
+  memcpy(args->argv, argv, (argc+1) * sizeof(char*));
+  args->argc = argc;
+
+  return EXIT_SUCCESS;
+}
+
+static void
+cleanup(mrb_state *mrb, struct _args *args)
+{
+  if (args->rfp && args->rfp != stdin)
+    fclose(args->rfp);
+  if (args->cmdline && !args->fname)
+    mrb_free(mrb, args->cmdline);
+  if (args->argv)
+    mrb_free(mrb, args->argv);
+  mrb_close(mrb);
+}
+
+int
+// main(int argc, char **argv)
+eMain_main( CELLIDX idx, int argc, const char **argv)
+
+{
+  CELLCB   *p_cellcb = GET_CELLCB( idx );
+  mrb_state *mrb = mrb_open();
+  int n = -1;
+  int i;
+  struct _args args;
+  mrb_value ARGV;
+  mrbc_context *c;
+  mrb_value v;
+  mrb_sym zero_sym;
+
+  cInit_initializeBridge( mrb );    // TECS
+
+
+  if (mrb == NULL) {
+    fputs("Invalid mrb_state, exiting mruby\n", stderr);
+    return EXIT_FAILURE;
+  }
+
+  n = parse_args(mrb, argc, (char **)argv, &args);
+  if (n == EXIT_FAILURE || (args.cmdline == NULL && args.rfp == NULL)) {
+    cleanup(mrb, &args);
+    usage(argv[0]);
+    return n;
+  }
+
+  ARGV = mrb_ary_new_capa(mrb, args.argc);
+  for (i = 0; i < args.argc; i++) {
+    mrb_ary_push(mrb, ARGV, mrb_str_new_cstr(mrb, args.argv[i]));
+  }
+  mrb_define_global_const(mrb, "ARGV", ARGV);
+
+  c = mrbc_context_new(mrb);
+  if (args.verbose)
+    c->dump_result = TRUE;
+  if (args.check_syntax)
+    c->no_exec = TRUE;
+
+  /* Set $0 */
+  zero_sym = mrb_intern_lit(mrb, "$0");
+  if (args.rfp) {
+    char *cmdline;
+    cmdline = args.cmdline ? args.cmdline : "-";
+    mrbc_filename(mrb, c, cmdline);
+    mrb_gv_set(mrb, zero_sym, mrb_str_new_cstr(mrb, cmdline));
+  }
+  else {
+    mrbc_filename(mrb, c, "-e");
+    mrb_gv_set(mrb, zero_sym, mrb_str_new_lit(mrb, "-e"));
+  }
+
+  /* Load program */
+  if (args.mrbfile) {
+    v = mrb_load_irep_file_cxt(mrb, args.rfp, c);
+  }
+  else if (args.rfp) {
+    v = mrb_load_file_cxt(mrb, args.rfp, c);
+  }
+  else {
+    v = mrb_load_string_cxt(mrb, args.cmdline, c);
+  }
+
+  mrbc_context_free(mrb, c);
+  if (mrb->exc) {
+    if (!mrb_undef_p(v)) {
+      mrb_print_error(mrb);
+    }
+    n = -1;
+  }
+  else if (args.check_syntax) {
+    printf("Syntax OK\n");
+  }
+  cleanup(mrb, &args);
+
+  return n == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
+}
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tMrubyProc_1_0.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tMrubyProc_1_0.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tMrubyProc_1_0.c	(revision 270)
@@ -0,0 +1,306 @@
+/*
+ * This file comes from mruby. (renamed from tools/mruby/mruby.c)
+ * This file is distributed under ruby's license. (not under TOPPERS license)
+ *   see https://github.com/mruby/mruby
+ * A little modification is done to to call initializer registering TECS components.
+ *
+ * ãã®ãã¡ã¤ã«ã¯ãmruby ã®ãã®ã§ãã
+ * mruby ã®ã©ã¤ã»ã³ã¹ã®ãã¨ã§ãé
+å¸ããã¾ãã(TOPPERS ã©ã¤ã»ã³ã¹ã§ã¯ããã¾ãã)
+ *  åç
+§ï¼  https://github.com/mruby/mruby
+ * TECS ã³ã³ãã¼ãã³ããç»é²ããåæåå­ãå¼ã¶ãããå°ãã®ä¿®æ­£ããªããã¦ãã¾ãã
+ */
+
+#include "nMruby_tMrubyProc_tecsgen.h"
+
+#include "mruby.h"
+#include "mruby/proc.h"
+#include "mruby/array.h"
+#include "mruby/string.h"
+#include "mruby/compile.h"
+#include "mruby/dump.h"
+#include "mruby/variable.h"
+#include <stdio.h>
+#include <string.h>
+
+#ifndef ENABLE_STDIO
+static void
+p(mrb_state *mrb, mrb_value obj)
+{
+  obj = mrb_funcall(mrb, obj, "inspect", 0);
+  fwrite(RSTRING_PTR(obj), RSTRING_LEN(obj), 1, stdout);
+  putc('\n', stdout);
+}
+#else
+#define p(mrb,obj) mrb_p(mrb,obj)
+#endif
+
+void mrb_show_version(mrb_state *);
+void mrb_show_copyright(mrb_state *);
+
+struct _args {
+  FILE *rfp;
+  char* cmdline;
+  int fname        : 1;
+  int mrbfile      : 1;
+  int check_syntax : 1;
+  int verbose      : 1;
+  int argc;
+  char** argv;
+};
+
+static void
+usage(const char *name)
+{
+  static const char *const usage_msg[] = {
+  "switches:",
+  "-b           load and execute RiteBinary (mrb) file",
+  "-c           check syntax only",
+  "-e 'command' one line of script",
+  "-v           print version number, then run in verbose mode",
+  "--verbose    run in verbose mode",
+  "--version    print the version",
+  "--copyright  print the copyright",
+  NULL
+  };
+  const char *const *p = usage_msg;
+
+  printf("Usage: %s [switches] programfile\n", name);
+  while(*p)
+  printf("  %s\n", *p++);
+}
+
+static int
+parse_args(mrb_state *mrb, int argc, char **argv, struct _args *args)
+{
+  char **origargv = argv;
+  static const struct _args args_zero = { 0 };
+
+  *args = args_zero;
+
+  for (argc--,argv++; argc > 0; argc--,argv++) {
+    char *item;
+    if (argv[0][0] != '-') break;
+
+    if (strlen(*argv) <= 1) {
+      argc--; argv++;
+      args->rfp = stdin;
+      break;
+    }
+
+    item = argv[0] + 1;
+    switch (*item++) {
+    case 'b':
+      args->mrbfile = 1;
+      break;
+    case 'c':
+      args->check_syntax = 1;
+      break;
+    case 'e':
+      if (item[0]) {
+        goto append_cmdline;
+      }
+      else if (argc > 1) {
+        argc--; argv++;
+        item = argv[0];
+append_cmdline:
+        if (!args->cmdline) {
+          char *buf;
+
+          buf = (char *)mrb_malloc(mrb, strlen(item)+1);
+          strcpy(buf, item);
+          args->cmdline = buf;
+        }
+        else {
+          args->cmdline = (char *)mrb_realloc(mrb, args->cmdline, strlen(args->cmdline)+strlen(item)+2);
+          strcat(args->cmdline, "\n");
+          strcat(args->cmdline, item);
+        }
+      }
+      else {
+        printf("%s: No code specified for -e\n", *origargv);
+        return 0;
+      }
+      break;
+    case 'v':
+      mrb_show_version(mrb);
+      args->verbose = 1;
+      break;
+    case '-':
+      if (strcmp((*argv) + 2, "version") == 0) {
+        mrb_show_version(mrb);
+        exit(0);
+      }
+      else if (strcmp((*argv) + 2, "verbose") == 0) {
+        args->verbose = 1;
+        break;
+      }
+      else if (strcmp((*argv) + 2, "copyright") == 0) {
+        mrb_show_copyright(mrb);
+        exit(0);
+      }
+      else return -3;
+      return 0;
+    default:
+      return -4;
+    }
+  }
+
+  if (args->rfp == NULL && args->cmdline == NULL) {
+    if (*argv == NULL) args->rfp = stdin;
+    else {
+      args->rfp = fopen(argv[0], args->mrbfile ? "rb" : "r");
+      if (args->rfp == NULL) {
+        printf("%s: Cannot open program file. (%s)\n", *origargv, *argv);
+        return 0;
+      }
+      args->fname = 1;
+      args->cmdline = argv[0];
+      argc--; argv++;
+    }
+  }
+  args->argv = (char **)mrb_realloc(mrb, args->argv, sizeof(char*) * (argc + 1));
+  memcpy(args->argv, argv, (argc+1) * sizeof(char*));
+  args->argc = argc;
+
+  return 0;
+}
+
+static void
+cleanup(mrb_state *mrb, struct _args *args)
+{
+  if (args->rfp && args->rfp != stdin)
+    fclose(args->rfp);
+  if (args->cmdline && !args->fname)
+    mrb_free(mrb, args->cmdline);
+  if (args->argv)
+    mrb_free(mrb, args->argv);
+  mrb_close(mrb);
+}
+
+static void
+showcallinfo(mrb_state *mrb)
+{
+  mrb_callinfo *ci;
+  mrb_int ciidx;
+  const char *filename, *method, *sep;
+  int i, line;
+
+  printf("trace:\n");
+  ciidx = mrb_fixnum(mrb_obj_iv_get(mrb, mrb->exc, mrb_intern(mrb, "ciidx")));
+  if (ciidx >= mrb->ciend - mrb->cibase)
+    ciidx = 10; /* ciidx is broken... */
+
+  for (i = ciidx; i >= 0; i--) {
+    ci = &mrb->cibase[i];
+    filename = "(unknown)";
+    line = -1;
+
+    if (MRB_PROC_CFUNC_P(ci->proc)) {
+      continue;
+    }
+    else {
+      mrb_irep *irep = ci->proc->body.irep;
+      if (irep->filename != NULL)
+        filename = irep->filename;
+      if (irep->lines != NULL && i+1 <= ciidx) {
+        mrb_code *pc = mrb->cibase[i+1].pc;
+        if (irep->iseq <= pc && pc < irep->iseq + irep->ilen) {
+          line = irep->lines[pc - irep->iseq - 1];
+        }
+      }
+    }
+    if (ci->target_class == ci->proc->target_class)
+      sep = ".";
+    else
+      sep = "#";
+
+    method = mrb_sym2name(mrb, ci->mid);
+    printf("\t[%d] %s:%d%s%s%s%s\n",
+    	   i, filename, line,
+	   method ? ":in " : "",
+	   method ? mrb_class_name(mrb, ci->proc->target_class) : "",
+	   method ? sep : "",
+	   method ? method : "");
+  }
+}
+
+int
+eMain_main( CELLIDX idx, int argc, const char **argv)
+{
+  CELLCB   *p_cellcb = GET_CELLCB( idx );
+  mrb_state *mrb = mrb_open();
+  int n = -1;
+  int i;
+  struct _args args;
+  mrb_value ARGV;
+
+  cInit_initializeBridge( mrb );
+
+  if (mrb == NULL) {
+    fprintf(stderr, "Invalid mrb_state, exiting mruby\n");
+    return EXIT_FAILURE;
+  }
+
+  n = parse_args(mrb, argc, (char **)argv, &args);
+  if (n < 0 || (args.cmdline == NULL && args.rfp == NULL)) {
+    cleanup(mrb, &args);
+    usage(argv[0]);
+    return n;
+  }
+
+  ARGV = mrb_ary_new_capa(mrb, args.argc);
+  for (i = 0; i < args.argc; i++) {
+    mrb_ary_push(mrb, ARGV, mrb_str_new(mrb, args.argv[i], strlen(args.argv[i])));
+  }
+  mrb_define_global_const(mrb, "ARGV", ARGV);
+
+  if (args.mrbfile) {
+    n = mrb_load_irep(mrb, args.rfp);
+    if (n < 0) {
+      fprintf(stderr, "failed to load mrb file: %s\n", args.cmdline);
+    }
+    else if (!args.check_syntax) {
+      mrb_run(mrb, mrb_proc_new(mrb, mrb->irep[n]), mrb_top_self(mrb));
+      n = 0;
+      if (mrb->exc) {
+        showcallinfo(mrb);
+        p(mrb, mrb_obj_value(mrb->exc));
+        n = -1;
+      }
+    }
+  }
+  else {
+    mrbc_context *c = mrbc_context_new(mrb);
+    mrb_value v;
+
+    if (args.verbose)
+      c->dump_result = 1;
+    if (args.check_syntax)
+      c->no_exec = 1;
+
+    if (args.rfp) {
+      mrbc_filename(mrb, c, args.cmdline ? args.cmdline : "-");
+      v = mrb_load_file_cxt(mrb, args.rfp, c);
+    }
+    else {
+      mrbc_filename(mrb, c, "-e");
+      v = mrb_load_string_cxt(mrb, args.cmdline, c);
+    }
+    mrbc_context_free(mrb, c);
+    if (mrb->exc) {
+      if (!mrb_undef_p(v)) {
+        showcallinfo(mrb);
+        p(mrb, mrb_obj_value(mrb->exc));
+      }
+      n = -1;
+    }
+    else if (args.check_syntax) {
+      printf("Syntax OK\n");
+    }
+  }
+  cleanup(mrb, &args);
+
+  return n == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
+}
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tSCharPointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tSCharPointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tSCharPointer.c	(revision 270)
@@ -0,0 +1,52 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tSCharPointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+//GET_SET_INT( SChar, schar_t )
+//POINTER_CLASS( SChar, schar_t )
+GET_SET_INT( SChar, char_t )
+POINTER_CLASS( SChar, char_t )
+#ifndef  TECS_Use_MrbString_for_CharPointer
+//CHECK_AND_GET_POINTER( SChar, schar_t )
+CHECK_AND_GET_POINTER( SChar, char_t )
+#else
+CHECK_AND_GET_CHAR_POINTER( SChar, schar_t )
+CHECK_AND_GET_CHAR_POINTER_MOD( SChar, schar_t )
+#endif
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tSCharPointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	struct RClass *c;
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	c=tecs_init_SCharPointer( mrb, TECS );
+	mrb_define_method(mrb, c, "to_s", CharPointer_to_s, MRB_ARGS_NONE());
+	mrb_define_method(mrb, c, "from_s", CharPointer_from_s, MRB_ARGS_REQ(1));
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tShortPointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tShortPointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tShortPointer.c	(revision 270)
@@ -0,0 +1,40 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tShortPointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_INT( Short, short )
+POINTER_CLASS( Short, short )
+CHECK_AND_GET_POINTER( Short, short )
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tShortPointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	(void)tecs_init_ShortPointer( mrb, TECS );
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tTECSInitializer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tTECSInitializer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tTECSInitializer.c	(revision 270)
@@ -0,0 +1,60 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * å±æ§ã¢ã¯ã»ã¹ãã¯ã­ #_CAAM_#
+ * TECS             struct RClass *  VAR_TECS        
+ *
+ * å¼ã³å£é¢æ° #_TCPF_#
+ * call port : cInitialize  signature: nMruby_sInitializeTECSBridge context: task
+ *   void           cInitialize_initializeBridge( subscript, const mrb_state* mrb, const struct RClass * TECS );
+ *       subscript:  0...(NCP_cInitialize-1)
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tTECSInitializer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tTECSInitializer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(CELLIDX idx, const mrb_state* mrb)
+{
+	CELLCB	*p_cellcb;
+	int      i;
+	struct RClass *TECS;
+
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		/* ã¨ã©ã¼å¦çã³ã¼ããããã«è¨è¿°ãã¾ã */
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	TECS = mrb_define_module( (mrb_state *)mrb, "TECS" );
+	// mrb: const mrb_state * => mrb_state *
+    VAR_TECS = TECS;
+
+	for( i = 0; i < NCP_cInitialize; i++ )
+		cInitialize_initializeBridge( i, (mrb_state*)mrb, TECS );
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUCharPointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUCharPointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUCharPointer.c	(revision 270)
@@ -0,0 +1,49 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tUCharPointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_INT( UChar, uchar_t )
+POINTER_CLASS( UChar, uchar_t )
+#ifndef  TECS_Use_MrbString_for_CharPointer
+CHECK_AND_GET_POINTER( UChar, uchar_t )
+#else
+CHECK_AND_GET_CHAR_POINTER( UChar, uchar_t )
+CHECK_AND_GET_CHAR_POINTER_MOD( UChar, uchar_t )
+#endif
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tUCharPointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	struct RClass *c;
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	c=tecs_init_UCharPointer( mrb, TECS );
+	mrb_define_method(mrb, c, "to_s", CharPointer_to_s, MRB_ARGS_NONE());
+	mrb_define_method(mrb, c, "from_s", CharPointer_from_s, MRB_ARGS_REQ(1));
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUInt16Pointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUInt16Pointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUInt16Pointer.c	(revision 270)
@@ -0,0 +1,40 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tUInt16Pointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_INT( UInt16, uint16_t )
+POINTER_CLASS( UInt16, uint16_t )
+CHECK_AND_GET_POINTER( UInt16, uint16_t )
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tUInt16Pointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	(void)tecs_init_UInt16Pointer( mrb, TECS );
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUInt32Pointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUInt32Pointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUInt32Pointer.c	(revision 270)
@@ -0,0 +1,40 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tUInt32Pointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_INT( UInt32, uint32_t )
+POINTER_CLASS( UInt32, uint32_t )
+CHECK_AND_GET_POINTER( UInt32, uint32_t )
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tUInt32Pointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	(void)tecs_init_UInt32Pointer( mrb, TECS );
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUInt64Pointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUInt64Pointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUInt64Pointer.c	(revision 270)
@@ -0,0 +1,41 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tUInt64Pointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_INT( UInt64, uint64_t )
+POINTER_CLASS( UInt64, uint64_t )
+CHECK_AND_GET_POINTER( UInt64, uint64_t )
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tUInt64Pointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	(void)tecs_init_UInt64Pointer( mrb, TECS );
+
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUInt8Pointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUInt8Pointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUInt8Pointer.c	(revision 270)
@@ -0,0 +1,41 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tUInt8Pointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_INT( UInt8, uint8_t )
+POINTER_CLASS( UInt8, uint8_t )
+CHECK_AND_GET_POINTER( UInt8, uint8_t )
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tUInt8Pointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	(void)tecs_init_UInt8Pointer( mrb, TECS );
+
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUIntPointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUIntPointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUIntPointer.c	(revision 270)
@@ -0,0 +1,41 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tUIntPointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_INT( UInt, unsigned int )
+POINTER_CLASS( UInt, unsigned int )
+CHECK_AND_GET_POINTER( UInt, unsigned int )
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tUIntPointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	(void)tecs_init_UIntPointer( mrb, TECS );
+
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tULongPointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tULongPointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tULongPointer.c	(revision 270)
@@ -0,0 +1,40 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tULongPointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_INT( ULong, unsigned long )
+POINTER_CLASS( ULong, unsigned long )
+CHECK_AND_GET_POINTER( ULong, unsigned long )
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tULongPointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	(void)tecs_init_ULongPointer( mrb, TECS );
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUShortPointer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUShortPointer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/nMruby_tUShortPointer.c	(revision 270)
@@ -0,0 +1,40 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "nMruby_tUShortPointer_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+GET_SET_INT( UShort, unsigned short )
+POINTER_CLASS( UShort, unsigned short )
+CHECK_AND_GET_POINTER( UShort, unsigned short )
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eInitialize
+ * entry port: eInitialize
+ * signature:  nMruby_sInitializeTECSBridge
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eInitialize_initializeBridge
+ * name:         eInitialize_initializeBridge
+ * global_name:  nMruby_tUShortPointer_eInitialize_initializeBridge
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eInitialize_initializeBridge(mrb_state* mrb, struct RClass * TECS)
+{
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	(void)tecs_init_UShortPointer( mrb, TECS );
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/tMruby.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/tMruby.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/tMruby.cdl	(revision 270)
@@ -0,0 +1,82 @@
+
+/*
+ *  Copyright (C) 2012 by Ubiquitous Computing and Networking Laboratory
+ *                Ritsumeikan Univ., JAPAN
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+//import(<syssvc/tSerialPort.cdl>);
+//import(<kernel.cdl>);
+
+import(<mruby.cdl>);
+
+namespace nMruby{
+  celltype tMruby{
+    entry sTaskBody eMrubyBody;
+    attr{
+      [omit]char_t *mrubyFile;
+      char_t *irep=C_EXP("&$cell_global$_irep");
+    };
+    
+    /* writeé¢æ°ã®æ¥ç¶å
+ */
+//    [optional] 	call sSerialPort cSerialPort;
+    [optional]  call sInitializeBridge cInit;
+    
+    FACTORY{
+      write("Makefile.tecsgen", "clean_mrb_c :");
+      write("Makefile.tecsgen", "	rm -f $(MRB_C)"); 
+    };
+    factory{
+      write("Makefile.tecsgen", "POST_TECSGEN_TARGET := $(POST_TECSGEN_TARGET) $cell_global$_mrb.c");
+      write("Makefile.tecsgen", "$cell_global$_mrb.c : %s tecs.timestamp Makefile", mrubyFile);
+      write("Makefile.tecsgen", "	$(MRBC) -B$cell_global$_irep -o$cell_global$_mrb.c %s", mrubyFile);
+      write("Makefile.tecsgen", "TECS_COBJS := $(TECS_COBJS) $cell_global$_mrb.o");
+      write("Makefile.tecsgen", "MRB_C := $(MRB_C) $cell_global$_mrb.c");
+      write("$ct_global$_factory.h","extern const char_t *$cell_global$_irep;");
+    };
+  };
+};
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/tecs_mruby.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/tecs_mruby.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/tecs_mruby.h	(revision 270)
@@ -0,0 +1,47 @@
+#ifndef tecs_mruby_h__
+#define tecs_mruby_h__
+
+#ifndef TECSGEN
+
+// tecsgen doesn't include actual mruby.h
+#include "mruby.h"
+#include "mruby/class.h"
+#include "mruby/data.h"
+#include "mruby/string.h"
+
+#include "TECSPointer.h"
+#include "TECSStruct.h"
+
+#if  ! defined( MRUBY_RELEASE_MAJOR ) || MRUBY_RELEASE_MAJOR == 1 && MRUBY_RELEASE_MINOR < 2
+#ifndef MRB_ARGS_REQ
+#define MRB_ARGS_REQ(n)     ARGS_REQ(n)
+#define MRB_ARGS_OPT(n)     ARGS_OPT(n)
+#define MRB_ARGS_ARG(n1,n2) ARGS_ARG(n1,n2)
+#define MRB_ARGS_REST()     ARGS_REST()
+#define MRB_ARGS_POST(n)    ARGS_POST(n)
+#define MRB_ARGS_KEY(n1,n2) ARGS_KEY(n1,n2)
+#define MRB_ARGS_BLOCK()    ARGS_BLOCK()
+#define MRB_ARGS_ANY()      ARGS_ANY()
+#define MRB_ARGS_NONE()     ARGS_NONE()
+#endif /* MRB_ARGS_REQ */
+#endif
+
+#if  ! defined( MRUBY_RELEASE_MAJOR )
+#define mrb_float_value( mrb, val )  mrb_float_value( val )
+#endif
+
+#else
+
+/*
+ * fake tecsgen because tecsgen cannot accept actual mruby.h in case of below.
+ *   types:   long long, long long int
+ *   special keyword __attribute__(x), __extension__
+ */
+typedef int mrb_state;
+struct  RClass {int dummy;};
+
+typedef int CELLCB;
+
+#endif /* TECSGEN */
+
+#endif /* tecs_mruby_h__ */
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/posix/posix.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/posix/posix.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/posix/posix.cdl	(revision 270)
@@ -0,0 +1,7 @@
+
+namespace nPosix {
+	signature sMain{
+		int  main( [in]int argc, [in,size_is(argc),string]const char **argv );
+	};
+};
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/PPAllocator.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/PPAllocator.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/PPAllocator.cdl	(revision 270)
@@ -0,0 +1,103 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+/*
+ * PPAlloc: Push Pop Allocator
+ *
+ * allocate ããéé ã§ deallocate ããªãã¦ã¯ãªããªã
+ * deallocate ã¯ãã¾ã¨ãã¦è¡ããã¨ãã§ãã
+ * ä¾ãã°æåã« allocate ãããé åã deallocate ããã¨ããã¹ã¦ã® allocate ãããé åã deallocate ãããã¨ã«ãªã
+ * æä»å¶å¾¡ãã¦ããªãããåä¸ã®ã¿ã¹ã¯ã«å²ä»ãã¦ä½¿ç¨ãã
+ */
+
+[deviate]   // alloc ãé¸è±ã«ãªã
+signature sPPAllocator {
+	/*
+	 * size ã§æå®ãããå¤§ããã®ã¡ã¢ãªé åãã¢ã­ã±ã¼ããã
+	 * ã¡ã¢ãªé åãç¢ºä¿ãããå ´å *ptr ã«ã¡ã¢ãªé åã®ã¢ãã¬ã¹ãæ ¼ç´ãã¦ E_OK ãè¿ã
+	 * ååãªç©ºãé åããªãå ´å E_NOMEM ãè¿ã
+	 */
+	ER  alloc( [in]uint32_t size, [out]void **ptr );
+	/*
+	 * ã¡ã¢ãªããã¢ã­ã±ã¼ããã
+	 * alloc ã§ç²å¾ãããã¤ã³ã¿ãå¼ãæ° ptr ã«æå®ãã
+	 * alloc ã§ç²å¾ããã¡ã¢ãªé åã alloc ããã®ã¨ã¯éé ã« dealloc ããªãã¦ã¯ãªããªã
+	 * ãã¹ã¦ã dealloc ããã«ã¯ãæåã« alloc ãããã¡ã¢ãªé åã dealloc ãããã¨ã§è¡ããã¨ãã§ãã
+	 * alloc ãç²å¾ããã¡ã¢ãªé åããã¹ã¦ dealloc ããåã«ãåã³ alloc ãããã¨ã¯ã§ãã
+	 * ãã®å ´åã§ããdealloc ãã¦ããªãã¡ã¢ãªé åã alloc ããã®ã¨ã¯éé ã« dealloc ããªãã¦ã¯ãªããªã
+	 *
+	 * ptr ã®å¤ã buf <= ptr < buf+allocated_size ãæºãããã©ããæ¤æ»ããã
+	 * ptr ã®å¤ãä¸æ­£ã®å ´å E_PAR ãè¿ã
+	 */
+	ER  dealloc( [in]const void *ptr );
+
+    /*
+	 * PPAllocator ã»ã«ã®å²ä»ãæ¸ã¿ã¡ã¢ãªããã¹ã¦è§£æ¾ãã
+	 * ãã®é¢æ°ã¯å¿
+ãæåãã
+	 */
+    ER  dealloc_all(void);
+};
+
+celltype tPPAllocator {
+	entry  sPPAllocator ePPAllocator;
+	attr {
+		uint32_t   heapSize;
+	};
+	var {
+		[size_is(heapSize)]
+			int8_t  *buf;
+		uint32_t   allocatedSize;
+	};
+};
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/RPCTask.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/RPCTask.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/RPCTask.cdl	(revision 270)
@@ -0,0 +1,142 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+/*
+ * unmarshaler ã® main ã®ã·ã°ããã£
+ */
+signature sUnmarshalerMain {
+	ER	main(void);
+};
+
+///////////////// å°æãã£ã³ãã«ç¨ã®å®ç¾© ////////////////
+/*
+ * CELLTYPE: å°æãã£ã³ãã«ç¨ã®ã¿ã¹ã¯ã¡ã¤ã³
+ */
+celltype tRPCDedicatedTaskMain {			// Transparent RPC ã§ç¨ãã
+	entry	sTaskBody			eMain;
+	call	sUnmarshalerMain	cMain;
+};
+
+celltype tRPCDedicatedTaskMainWithOpener {	// Opaque RPC ã§ç¨ãã
+	entry	sTaskBody				eMain;
+	call	sUnmarshalerMain		cMain;
+	call	sServerChannelOpener	cOpener;
+	attr {
+		RELTIM	initialDelay = 0;	// sec
+		RELTIM	reopenDelay = 1;	// sec
+	};
+	require tKernel.eKernel;
+};
+
+///////////////// å
+±æãã£ã³ãã«ç¨ã®å®ç¾© ////////////////
+/*
+ * CONST: å
+±æãã£ã³ãã«ãããã®ãã¸ãã¯
+ */
+const uint16_t RPC_CHANNEL_MAN_SOP_MAGIC   = (0x3141);  // Beginning of using shared channel
+const uint16_t RPC_CHANNEL_MAN_EOP_MAGIC   = (0x2718);  // End of using shared channel
+
+/*
+ * CELLTYPE: å
+±æãã£ã³ãã«ããã¼ã¸ã£
+ * REM:      å¼ã³å
+å´ã«ç½®ããã£ã³ãã«ããã¼ã¸ã£
+ *           eSemaphore ãå¼ã³åºãããã¨ããã£ã³ãã«ãã­ãã¯ããã¨ã¨ãã«ã
+ *           ãã£ã³ãã«çªå·ãéåºãã
+ */
+celltype tRPCSharedChannelMan {
+	entry	sSemaphore	eSemaphore[];
+	call	sSemaphore	cSemaphore;
+	call	sTDR		cClientSideTDR;
+};
+
+
+/*
+ * CELLTYPE: å
+±æãã£ã³ãã«ç¨ã®ã¿ã¹ã¯ã¡ã¤ã³
+ * REM:      å¼ã³å
+å´ã«ç½®ãã¿ã¹ã¯
+ *           ãã£ã³ãã«çªå·ãåãåºãããã£ã³ãã«çªå·ã® cTaskBody ãå¼ã³åºã
+ */
+celltype tRPCSharedTaskMain {
+	entry	sTaskBody	eMain;
+
+	call	sUnmarshalerMain	cUnmarshalAndCallFunction[];
+	call	sTDR		cServerSideTDR;
+
+	require	tSysLog.eSysLog;
+
+	var {
+		int16_t	channelNo;	/* é
+åæ·»æ° + 1 */
+	};
+};
+
+celltype tRPCSharedTaskMainWithOpener {	// Opaque RPC ã§ç¨ãã
+	entry	sTaskBody			eMain;
+	call	sUnmarshalerMain	cUnmarshalAndCallFunction[];
+	call	sTDR				cServerSideTDR;
+	call	sServerChannelOpener cOpener;
+	require	tSysLog.eSysLog;
+	require tKernel.eKernel;
+
+	attr {
+		RELTIM	initialDelay = 0;	// sec
+		RELTIM	reopenDelay = 1;	// sec
+	};
+	var {
+		int16_t	channelNo;	/* é
+åæ·»æ° + 1 */
+	};
+};
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/TDR.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/TDR.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/TDR.cdl	(revision 270)
@@ -0,0 +1,193 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+import_C( "tecs_rpc.h" );
+
+// Straight Order TDR
+const uint32_t TDR_SOP_MAGIC1   = (0x672A);  // Client to Server
+const uint32_t TDR_SOP_MAGIC2   = (0x561E);  // Server to Client
+const uint32_t TDR_EOP_MAGIC1   = (0x5A3C);  // è¿ä¿¡ãå¾
+ã¤ (åæå¼åºã)
+const uint32_t TDR_EOP_MAGIC2   = (0x6D5E);  // è¿ä¿¡ãå¾
+ããªã(éåæå¼åºãã¾ãã¯ãªã¿ã¼ã³)
+
+// Straight Order TDR for SharedChannel
+const uint32_t TDR_SHSOP_MAGIC1   = (0x98D5);  // Client to Server
+const uint32_t TDR_SHSOP_MAGIC2   = (0xA9E1);  // Server to Client
+const uint32_t TDR_SHEOP_MAGIC1   = (0xB5C3);  // è¿ä¿¡ãå¾
+ã¤ (åæå¼åºã)
+const uint32_t TDR_SHEOP_MAGIC2   = (0x92A1);  // è¿ä¿¡ãå¾
+ããªã(éåæå¼åºãã¾ãã¯ãªã¿ã¼ã³)
+
+/*
+ * TDR: TECS Data Representation layer
+ */
+[deviate]         /* get_intptr ãé¸è±ã«ãªã */
+signature sTDR {  /* TECS Data Representation */
+
+	/* å¶å¾¡é¢æ° */
+
+	/* ãã£ã³ãã«ã®ãªã»ãã */
+	ER	reset( void );	/* éä¿¡ãã£ã³ãã«ã®ãªã»ãã */
+						/* éä¸­ã§ã¨ã©ã¼ãçºçããéä¿¡ã¾ãã¯åä¿¡ãç¶è¡ã§ããªãã£ãã¨ãã¯ãªã»ãããã */
+						/* ä¸æ¹ããªã»ããããããã¨ãä»æ¹ã¯ RESET ã¨ã©ã¼ãè¿ã */
+						/* ç¢ºèªã§ããªãã¨ãã¯ããã®ãã£ãã«ã¯æ¾æ£ãããããªã */
+
+	/* ãã¸ãã¯ã³ã¼ãã®éåä¿¡ */
+	ER	sendSOP( [in]bool_t b_client );     /* StartOfPacket magic ãéä¿¡ */
+	ER	receiveSOP( [in]bool_t b_client );  /* StartOfPacket magic ãåä¿¡ */
+						 /* b_client: ã¯ã©ã¤ã¢ã³ãå´ãªã true, ãµã¼ãã¼å´ãªã false */
+
+	/* ãã¸ãã¯ã³ã¼ãã®éåä¿¡ */
+	//	ER	sendSHSOP( [in]bool_t b_client );     /* StartOfPacket magic ãéä¿¡ */
+	//	ER	receiveSHSOP( [in]bool_t b_client );  /* StartOfPacket magic ãåä¿¡ */
+						 /* b_client: ã¯ã©ã¤ã¢ã³ãå´ãªã true, ãµã¼ãã¼å´ãªã false */
+
+	ER	sendEOP( [in]bool_t b_continue );   /* EndOfPacket magic ãéä¿¡ï¼ãã±ããã®æãã ããè¡ãï¼ */
+	ER	receiveEOP( [in]bool_t b_continue );/* EndOfPacket magic ãåä¿¡ */
+                        /* b_continue: åæå¼ã³åºãã®ã¯ã©ã¤ã¢ã³ãå´ãªã true,
+                           éåæå¼ã³åºãã®ã¯ã©ã¤ã¢ã³ãå´ã¾ãã¯ãµã¼ãã¼å´ãªã false */
+
+	/* ãã¼ã¿éåä¿¡é¢æ° */
+
+	/* æ´æ°å (æ¨å¥¨) */
+	ER	putInt8( [in]int8_t in ); 
+	ER	putInt16( [in]int16_t in ); 
+	ER	putInt32( [in]int32_t in ); 
+	ER	putInt64( [in]int64_t in ); 
+	ER	putInt128( [in]int128_t in ); 
+  
+	ER	getInt8( [out]int8_t *out );
+	ER	getInt16( [out]int16_t *out );
+	ER	getInt32( [out]int32_t *out );
+	ER	getInt64( [out]int64_t *out );
+	ER	getInt128( [out]int128_t *out );
+
+	/* ç¡ç¬¦å·æ´æ°å (æ¨å¥¨) */
+	ER	putUInt8( [in]uint8_t in ); 
+	ER	putUInt16( [in]uint16_t in ); 
+	ER	putUInt32( [in]uint32_t in ); 
+	ER	putUInt64( [in]uint64_t in ); 
+	ER	putUInt128( [in]uint128_t in ); 
+  
+	ER	getUInt8( [out]uint8_t *out );
+	ER	getUInt16( [out]uint16_t *out );
+	ER	getUInt32( [out]uint32_t *out );
+	ER	getUInt64( [out]uint64_t *out );
+	ER	getUInt128( [out]uint128_t *out );
+
+	/* æå­åï¼æ¨å¥¨ã8bitï¼ */
+	ER	putChar( [in]char_t in ); 
+	ER	getChar( [out]char_t *out ); 
+
+	/* Bool å */
+	ER	putBool( [in]bool_t in ); 
+	ER	getBool( [out]bool_t *out ); 
+
+	/* æµ®åå°æ°å */
+	ER	putFloat32( [in]float32_t in );
+	ER	putDouble64( [in]double64_t in );
+	ER	getFloat32( [out]float32_t *out );
+	ER	getDouble64( [out]double64_t *out );
+
+
+	/* éæ¨å¥¨ã®å(æç¬¦å·) */
+	ER	putSChar( [in]schar_t in );
+	ER	putShort( [in]short_t in ); 
+	ER	putInt( [in]int_t in ); 
+	ER	putLong( [in]long_t in ); 
+
+	ER	getSChar( [out]schar_t *out ); 
+	ER	getShort( [out]short_t *out ); 
+	ER	getInt( [out]int_t *out ); 
+	ER	getLong( [out]long_t *out ); 
+
+
+	/* éæ¨å¥¨ã®å(ç¡ç¬¦å·) */
+	ER	putUChar( [in]uchar_t in ); 
+	ER	putUShort( [in]ushort_t in ); 
+	ER	putUInt( [in]uint_t in ); 
+	ER	putULong( [in]ulong_t in ); 
+
+	ER	getUChar( [out]unsigned char *out ); 
+	ER	getUShort( [out]ushort_t *out ); 
+	ER	getUInt( [out]uint_t *out ); 
+	ER	getULong( [out]ulong_t *out ); 
+
+	ER	putIntptr( [in]const intptr_t ptr );
+	ER	getIntptr( [out]intptr_t *ptr );
+};
+
+// Straight Order TECS Data Representation (Straight means no endian-conversion is done)
+celltype tTDR {
+	call	sChannel	cChannel;
+	[inline]
+		entry	sTDR	eTDR;
+
+	var {
+		TMO	tmo = C_EXP( "TMO_FEVR" );
+	};
+	require tSysLog.eSysLog;
+};
+
+// Network Byte Order (Big-endian) TECS Data Representation (Data are always sent in big-endian)
+celltype tNBOTDR {
+	call	sChannel	cChannel;
+	[inline]
+		entry	sTDR	eTDR;
+
+	var {
+		TMO	tmo = C_EXP( "TMO_FEVR" );
+	};
+	require tSysLog.eSysLog;
+};
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/rpc.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/rpc.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/rpc.cdl	(revision 270)
@@ -0,0 +1,75 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+/*
+ * TECS RPC ã«é¢ããå®ç¾©
+ */
+
+/* ãã£ã³ãã« ã·ã°ããã£ */
+import( <sChannel.cdl> );
+
+/* TDR ã·ã°ããã£ & ã»ã«ã¿ã¤ã */
+import( <TDR.cdl> );
+
+/* ãã£ã³ãã«ã»ã«ã¿ã¤ã */
+/* ãã£ã³ãã«ã»ã«ã¿ã¤ãã¯ãå¿
+è¦ãªãã®ãåã¢ããªã±ã¼ã·ã§ã³ã§ import ãã */
+// import( <tDataqueueOWChannel.cdl> );
+// import( <tSocketChannel.cdl> );
+// import( <tTINETChannel.cdl> );
+
+/* ã¿ã¹ã¯ ã»ã«ã¿ã¤ã */
+import( <RPCTask.cdl> );
+import( <PPAllocator.cdl> );
+
+import( <sRPCErrorHandler.cdl> );
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/rpc_string.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/rpc_string.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/rpc_string.h	(revision 270)
@@ -0,0 +1,173 @@
+/*
+ *
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+#ifndef RPC_STRING_H
+#define RPC_STRING_H
+
+#include <string.h>
+
+/* GenParamCopy.rb ã§çæãã STRLEN, STRNLEN é¢æ°ã®å®ç¾© */
+/* ç¾ç¶ã§ã¯ short, int, long, int128_t ããµãã¼ãããªã */
+
+#define   STRLEN8( str )    strlen( (char *)str )
+
+/*
+ * STRNLEN
+ *  marshaler, unmarshaler ã¯ strnlen ãä½¿ãï¼
+ *  ãããã¡ãªã¼ãã¼ã©ã³ã¸ã®èæ§ãæç¢ºã«ããããï¼
+ *  ããããstrnlen ã¯ ANSI-C æ¨æºã®ã©ã¤ãã©ãªé¢æ°ã§ã¯ãªããããå®è£
+ããã¦ããªãã±ã¼ã¹ããã
+ *  GNU (Linux), VC++ ã§ã¯ä½¿ç¨ã§ããããMacOS ã§ã¯ä½¿ç¨ã§ããªã
+ *  ï¼ä»ã®çµè¾¼ã¿ç¨ OS ã§ã®å®è£
+ç¶æ³ãä¸æï¼
+ *  å°ããªé¢æ°ã§ããã®ã§ inline é¢æ°ã¨ãã¦å®è£
+ãã¦ãã
+ */
+
+#ifndef USE_STRNLEN_LIB
+#define   STRNLEN8( str, n )    strnlen( (char *)str, n )
+
+#else
+
+Inline size_t
+#define   STRNLEN8( str, n )    STRNLEN8_( (uint8_t *)str, n )
+STRNLEN8_(const uint8_t *s, size_t maxlen)
+{
+    size_t  i;
+    for( i = 0; i < maxlen; i++ )
+        if( *s++ == 0 )
+            break;
+
+    return  i;
+}
+
+#endif
+
+#define	STRLEN16( s )			STRLEN16_( (uint16_t *)s )
+#define	STRLEN32( s )			STRLEN32_( (uint32_t *)s )
+#define	STRLEN64( s )			STRLEN64_( (uint64_t *)s )
+
+#define	STRNLEN16( s, maxlen )	STRLEN16_( (uint16_t *)s, maxlen )
+#define	STRNLEN32( s, maxlen )	STRLEN32_( (uint32_t *)s, maxlen )
+#define	STRNLEN64( s, maxlen )	STRLEN64_( (uint64_t *)s, maxlen )
+
+/** STRLENnn_ nn:16,32,64**/
+Inline size_t
+STRLEN16_(const uint16_t *s )
+{
+    size_t  i;
+    for( i = 0; ; i++ )
+        if( *s++ == 0 )
+            break;
+
+    return  i;
+}
+
+Inline size_t
+STRLEN32_(const uint32_t *s )
+{
+    size_t  i;
+    for( i = 0; ; i++ )
+        if( *s++ == 0 )
+            break;
+
+    return  i;
+}
+
+Inline size_t
+STRLEN64_(const uint64_t *s )
+{
+    size_t  i;
+    for( i = 0; ; i++ )
+        if( *s++ == 0 )
+            break;
+
+    return  i;
+}
+
+/** STRNLENnn_ nn:16,32,64**/
+Inline size_t
+STRNLEN16_(const uint16_t *s, size_t maxlen)
+{
+    size_t  i;
+    for( i = 0; i < maxlen; i++ )
+        if( *s++ == 0 )
+            break;
+
+    return  i;
+}
+
+Inline size_t
+STRNLEN32_(const uint32_t *s, size_t maxlen)
+{
+    size_t  i;
+    for( i = 0; i < maxlen; i++ )
+        if( *s++ == 0 )
+            break;
+
+    return  i;
+}
+
+Inline size_t
+STRNLEN64_(const uint64_t *s, size_t maxlen)
+{
+    size_t  i;
+    for( i = 0; i < maxlen; i++ )
+        if( *s++ == 0 )
+            break;
+
+    return  i;
+}
+
+
+#endif /* RPC_STRING_H */
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/sChannel.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/sChannel.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/sChannel.cdl	(revision 270)
@@ -0,0 +1,74 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+signature	sServerChannelOpener {
+	ER		open( void );
+	ER		close( void );
+};
+
+signature	sChannel {
+	/* éã */
+	ER		send( [in,size_is(size)] const int8_t  *buf, [in]int16_t  size, [in]TMO tmo );
+	/* éä¿¡çµããã®æãåºãï¼ãã±ããã®çµããã§ä¸åã ãå¼åºã */
+	ER		flush( [in]TMO tmo );       /* ãããã¡ãªã³ã°ãã¦ããå ´åã®æãã ã */
+
+	/* åãåã */
+	ER_UINT	receive( [out,size_is(size)] int8_t  *buf, [in]int16_t  size, [in]TMO tmo );
+
+	/* ãã±ããã®çµããã¾ã§åä¿¡ãã (flush ã®é)ãçµããã«éãã¦ããªãå ´å E_ILUSE */
+	ER		end_receive( void );
+
+	/* ãªã»ãã */
+	ER		reset( void );       /* ãã£ã³ãã«ããªã»ãã */
+};
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/sRPCErrorHandler.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/sRPCErrorHandler.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/sRPCErrorHandler.cdl	(revision 270)
@@ -0,0 +1,92 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+
+/* client side state */
+const	int16_t	RPCSTATE_CLIENT_GET_SEM		= 1;
+const	int16_t	RPCSTATE_CLIENT_SEND_SOP	= 2;
+const	int16_t	RPCSTATE_CLIENT_SEND_BODY	= 3;
+const	int16_t	RPCSTATE_CLIENT_SEND_EOP	= 4;
+const	int16_t	RPCSTATE_CLIENT_EXEC		= 5;
+const	int16_t	RPCSTATE_CLIENT_RECV_SOP	= 6;
+const	int16_t	RPCSTATE_CLIENT_RECV_BODY	= 7;
+const	int16_t	RPCSTATE_CLIENT_RECV_EOP	= 8;
+const	int16_t	RPCSTATE_CLIENT_RELEASE_SEM	= 9;
+
+/* server side state */
+const	int16_t	RPCSTATE_SERVER_GET_SEM		= 11;
+const	int16_t	RPCSTATE_SERVER_RECV_SOP	= 12;
+const	int16_t	RPCSTATE_SERVER_RECV_BODY	= 13;
+const	int16_t	RPCSTATE_SERVER_RECV_EOP	= 14;
+const	int16_t	RPCSTATE_SERVER_EXEC		= 15;
+const	int16_t	RPCSTATE_SERVER_SEND_SOP	= 16;
+const	int16_t	RPCSTATE_SERVER_SEND_BODY	= 17;
+const	int16_t	RPCSTATE_SERVER_SEND_EOP	= 18;
+const	int16_t	RPCSTATE_SERVER_RELEASE_SEM	= 19;
+
+/* error hadler */
+signature sRPCErrorHandler {
+	ER	errorOccured( [in]int16_t func_id, [in]ER er, [in]int16_t state );
+};
+
+/*
+ * å¼ã³å
+å´ã§ã¯ state ã RPCSTATE_CLIENT_EXEC ã¨ç­ãããå¤§ããå ´åã
+ * å¼ã³å
+å´ã§ã¯ state ã RPCSTATE_SERVER_EXEC ã¨ç­ãããå¤§ããå ´åã
+ * å¼ã³å
+é¢æ°ã®å¼ã³åºãã«ã¯æåãã¦ããã
+ *
+ * RPCErrorHandler ãå¼ã³åºãããæç¹ã§ãsend/receive å¼æ°ã®è§£æ¾ã¯çµãã£ã¦ããã
+ * ãã®ãããRPCErrorHandler ã®ä¸­ã§å¦çãæã¡åã£ã¦ã(ã¿ã¹ã¯ã®åèµ·åãªã©ãè¡ã£ã¦ã)ããããã«ããã¡ã¢ãªãªã¼ã¯ãèµ·ããªãã
+ */
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tDataqueueAdaptor_inline.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tDataqueueAdaptor_inline.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tDataqueueAdaptor_inline.h	(revision 270)
@@ -0,0 +1,236 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eChannel
+ * entry port: eChannel
+ * signature:  sChannel
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eChannel_open
+ * name:         eChannel_open
+ * global_name:  tDataqueueAdaptor_eChannel_open
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eChannel_open(CELLIDX idx, const int8_t* arg, int16_t size, TMO tmo)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eChannel_close
+ * name:         eChannel_close
+ * global_name:  tDataqueueAdaptor_eChannel_close
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eChannel_close(CELLIDX idx)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eChannel_reset
+ * name:         eChannel_reset
+ * global_name:  tDataqueueAdaptor_eChannel_reset
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eChannel_reset(CELLIDX idx)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	cEventflag_clear( 0 );
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eChannel_send
+ * name:         eChannel_send
+ * global_name:  tDataqueueAdaptor_eChannel_send
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eChannel_send(CELLIDX idx, const int8_t* buf, int16_t size, TMO tmo)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	int     i;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	ercd = 0;
+	for( i = 0; i < size; i++ )
+		ercd |= cDataqueue_send( (intptr_t)((uint8_t)buf[ i ]) );
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eChannel_flush
+ * name:         eChannel_flush
+ * global_name:  tDataqueueAdaptor_eChannel_flush
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eChannel_flush(CELLIDX idx, TMO tmo)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eChannel_receive
+ * name:         eChannel_receive
+ * global_name:  tDataqueueAdaptor_eChannel_receive
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER_UINT
+eChannel_receive(CELLIDX idx, int8_t* buf, int16_t size, TMO tmo)
+{
+	ER_UINT ercd = E_OK;
+	CELLCB	*p_cellcb;
+	intptr_t data;
+	int     i;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	/* printf( "DQA: receive(%d) ", size ); */
+	for( i = 0; i < size; i++ ){
+		ercd = cDataqueue_receive( &data );
+		buf[i] = (int8_t)data;
+		if( ercd != E_OK )
+			break;
+	}
+	if( ercd != E_OK )
+		return(ercd);
+	else
+		return i;
+}
+
+/* #[<ENTRY_FUNC>]# eChannel_end_receive
+ * name:         eChannel_end_receive
+ * global_name:  tDataqueueAdaptor_eChannel_end_receive
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eChannel_end_receive(CELLIDX idx)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+
+	return(ercd);
+}
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tDataqueueOWChannel.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tDataqueueOWChannel.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tDataqueueOWChannel.cdl	(revision 270)
@@ -0,0 +1,95 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+
+/*
+ *celltype::tDataqueueAdaptor
+ */
+celltype tDataqueueAdaptor {
+	[inline]
+		entry sChannel   eChannel;
+	call  sDataqueue cDataqueue;
+	call  sEventflag cEventflag;
+};
+
+/*
+ *composite::tDataqueueOWChannel
+ */
+composite tDataqueueOWChannel {
+	entry sTDR       eTDR;
+	entry sDataqueue eDataqueue;
+	entry sEventflag eEventflag;
+	attr {
+		// Queue ã®ããã©ã«ãã®ãµã¤ãº
+		uint_t	queueSize = 64;
+	};
+
+	cell  tDataqueue Dataqueue{
+		count = composite.queueSize;
+
+	};
+	cell  tEventflag Eventflag{
+		flagPattern = 0;
+	};
+	cell  tDataqueueAdaptor DataqueueAdaptor{
+		cDataqueue = Dataqueue.eDataqueue;
+		cEventflag = Eventflag.eEventflag;
+	};
+	cell  tTDR TDR {
+		cChannel = DataqueueAdaptor.eChannel;
+	};
+
+	composite.eTDR       => TDR.eTDR;
+	composite.eDataqueue => Dataqueue.eDataqueue;
+	composite.eEventflag => Eventflag.eEventflag;
+};
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tNBOTDR_inline.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tNBOTDR_inline.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tNBOTDR_inline.h	(revision 270)
@@ -0,0 +1,1668 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * å±æ§ã¢ã¯ã»ã¹ãã¯ã­ #_CAAM_#
+ * tmo              TMO              VAR_tmo         
+ *
+ * å¼ã³å£é¢æ° #_TCPF_#
+ * call port: cChannel signature: sChannel context:task 
+ *   ER             cChannel_send( const int8_t* buf, int16_t size, TMO tmo );
+ *   ER             cChannel_flush( TMO tmo );
+ *   ER_UINT        cChannel_receive( int8_t* buf, int16_t size, TMO tmo );
+ *   ER             cChannel_end_receive( );
+ *   ER             cChannel_reset( );
+ * require port: signature:sSysLog context:task
+ *   ER             write( uint_t prio, const SYSLOG* p_syslog );
+ *   ER_UINT        read( SYSLOG* p_syslog );
+ *   ER             mask( uint_t logmask, uint_t lowmask );
+ *   ER             refer( T_SYSLOG_RLOG* pk_rlog );
+ *
+ * #[</PREAMBLE>]# */
+
+/*
+ * marhaler, unmarshaler ãä½¿ç¨ãã STRLEN é¢æ°ãå®ç¾©ãã
+ *  marshaler, unmarshaler ã¯å¿
+ã TDR ã¯ ã«çµåããããã
+ */
+#include	"rpc_string.h"
+
+/*
+ * Network Byte Order TECS Data Representation
+ *
+ *  NBOTDR is one of sTDR implementation and is default TDR for OpaqueRPC.
+ *  NBOTDR always sends and receives data in Big Endian (Network Byte Order).
+ *  So NBOTDR is useful with distributed hybrid systems.
+ */
+
+/*
+ * Macro Symbols:
+ * 1) endian
+ *  NBOTDR_BIGENDIAN
+ *  NBOTDR_LITTLEENDIAN
+ *   if these macros are not specified, endian is automatically decided.
+ * 2) size of each type in bits.
+ *  NBOTDR_LONG_BIT (32)
+ *  NBOTDR_SHORT_BIT (16)
+ *  NBOTDR_INT_BIT (32)
+ *  NBOTDR_INTPTR_BIT (32)
+ *   default value in parenthesises
+ *   normally use default value
+ */
+
+/*
+ * ç¡èª¿æ´åã ããããããæ«å®çãªå®è£
+ã«ãªã£ã¦ãã
+ * ã»ntohX(), htonX() ã¯ int64_t åã«å®ç¾©ããã¦ãã (32bitãªããªã¼ããããå¤§)
+ * ã»int128_t, uint128_t ã¯ tecs.h ã§ typedef ãããåã§ãã
+ * ã»BIGENDIAN å¤å®ã¯åçã«ãªã£ã¦ãã (æããæé©åã§å®æ°å¤å®ã«ããããã¨ã¯ãªã)
+ */
+
+#if defined( NBOTDR_BIGENDIAN )
+#define	IS_BIGENDIAN()	(1)
+# if defined( NBOTDR_LITTLEENDIAN )
+#   error  "Don't specify both NBOTDR_LITTLEENDIAN and NBOTDR_BIGENDIAN"
+# endif
+#elif defined( NBOTDR_LITTLEENDIAN )
+#define	IS_BIGENDIAN()	(0)
+#else
+/* BIGENDIAN ãã©ããèªåå¤å® */
+static const uint16_t	endian_check = 0xff00;
+#define	IS_BIGENDIAN()	(*(uint8_t *)&endian_check)
+#warning "it is better to specify -D NBOTDR_BIGENDIAN or -D NBOTDR_LITTLEENDIAN"
+#endif
+
+#if ! defined( NBOTDR_LONG_BIT )
+#define	NBOTDR_LONG_BIT	32
+#endif
+#if NBOTDR_LONG_BIT == 32
+#  define  NTOHL( d, sz )	ntoh32( d )
+#  define  HTONL( d, sz )	hton32( d )
+typedef		int32_t		TDR_LONG;
+typedef		uint32_t	TDR_ULONG;
+#elif NBOTDR_LONG_BIT == 64
+#  define  NTOHL( d, sz )	ntoh64( d )
+#  define  HTONL( d, sz )	hton64( d )
+typedef		int64_t		TDR_LONG;
+typedef		uint64_t	TDR_ULONG;
+#elif NBOTDR_LONG_BIT == 128
+#  define  NTOHL( d, sz )	ntoh128( d )
+#  define  HTONL( d, sz )	hton128( d )
+typedef		int128_t	TDR_LONG;
+typedef		uint128_t	TDR_ULONG;
+#elif ! defined( NBOTDR_LONG_BIT )
+#  define  NTOHL	ntohX
+#  define  HTONL	htonX
+#  warning "it is better to specify -D NBOTDR_LONG_BIT=N  N: 32, 64, 128"
+#else
+#  error  "NBOTDR_LONG_BIT must be 32, 64 or 128"
+#endif
+
+#if ! defined( NBOTDR_SHORT_BIT )
+#define	NBOTDR_SHORT_BIT	16
+#endif
+#if NBOTDR_SHORT_BIT == 16
+#  define  NTOHS( d, sz )	ntoh16( d )
+#  define  HTONS( d, sz )	hton16( d )
+typedef		int16_t		TDR_SHORT;
+typedef		uint16_t	TDR_USHORT;
+#elif NBOTDR_SHORT_BIT == 32
+#  define  NTOHS( d, sz )	ntoh32( d )
+#  define  HTONS( d, sz )	hton32( d )
+typedef		int32_t		TDR_SHORT;
+typedef		uint32_t	TDR_USHORT;
+#elif NBOTDR_SHORT_BIT == 64
+#  define  NTOHS( d, sz )	ntoh64( d )
+#  define  HTONS( d, sz )	hton64( d )
+typedef		int64_t		TDR_SHORT;
+typedef		uint64_t	TDR_USHORT;
+#elif ! defined( NBOTDR_SHORT_BIT )
+#  define  NTOHS( d, sz )	ntohX( d, sz )
+#  define  HTONS( d, sz )	htonX( d, sz )
+#  warning "it is better to specify -D NBOTDR_SHORT_BIT=N  N: 16, 32, 64"
+#else
+#  error  "NBOTDR_SHORT_BIT must be 16, 32 or 64"
+#endif
+
+#if ! defined( NBOTDR_INT_BIT )
+#define	NBOTDR_INT_BIT	32
+#endif
+#if NBOTDR_INT_BIT == 16
+#  define  NTOHI( d, sz )	ntoh16( d )
+#  define  HTONI( d, sz )	hton16( d )
+typedef		int16_t		TDR_INT;
+typedef		uint16_t	TDR_UINT;
+#elif NBOTDR_INT_BIT == 32
+#  define  NTOHI( d, sz )	ntoh32( d )
+#  define  HTONI( d, sz )	hton32( d )
+typedef		int32_t		TDR_INT;
+typedef		uint32_t	TDR_UINT;
+#elif NBOTDR_INT_BIT == 64
+#  define  NTOHI( d, sz )	ntoh64( d )
+#  define  HTONI( d, sz )	hton64( d )
+typedef		int64_t		TDR_INT;
+typedef		uint64_t	TDR_UINT;
+#elif NBOTDR_INT_BIT == 128
+#  define  NTOHI( d, sz )	ntoh128( d )
+#  define  HTONI( d, sz )	hton128( d )
+typedef		int128_t	TDR_INT;
+typedef		uint128_t	TDR_UINT;
+#elif ! defined( NBOTDR_INT_BIT )
+#  define  NTOHI( d, sz )	ntohX( d, sz )
+#  define  HTONI( d, sz )	htonX( d, sz )
+#  warning "it is better to specify -D NBOTDR_INT_BIT=N  N: 16, 32, 64, 128"
+#else
+#  error  "NBOTDR_INT_BIT must be 16, 32, 64 or 128"
+#endif
+
+#if ! defined( NBOTDR_INTPTR_BIT )
+#define	NBOTDR_INTPTR_BIT	32
+#endif
+#if NBOTDR_INTPTR_BIT == 16
+#  define  NTOHIP( d, sz )	ntoh16( d )
+#  define  HTONIP( d, sz )	hton16( d )
+typedef		int16_t		TDR_INTPTR;
+#elif NBOTDR_INTPTR_BIT == 32
+#  define  NTOHIP( d, sz )	ntoh32( d )
+#  define  HTONIP( d, sz )	hton32( d )
+typedef		int32_t		TDR_INTPTR;
+#elif NBOTDR_INTPTR_BIT == 64
+#  define  NTOHIP( d, sz )	ntoh64( d )
+#  define  HTONIP( d, sz )	hton64( d )
+typedef		int64_t		TDR_INTPTR;
+#elif NBOTDR_INTPTR_BIT == 128
+#  define  NTOHIP( d, sz )	ntoh128( d )
+#  define  HTONIP( d, sz )	hton128( d )
+typedef		int128_t	TDR_INTPTR;
+#elif ! defined( NBOTDR_INTPTR_BIT )
+#  define  NTOHIP( d, sz )		ntohX( d, sz )
+#  define  HTONIP( d, sz )		htonX( d, sz )
+#  warning "it is better to specify -D NBOTDR_INTPTR_BIT=N  N: 16, 32, 64, 128"
+#else
+#  error  "NBOTDR_INTPTR_BIT must be 16, 32, 64 or 128 "
+#endif
+
+Inline int16_t
+hton16( int16_t d )
+{
+	if( IS_BIGENDIAN() )
+		return d;		// big endian
+	else{
+		union  {
+			int8_t	by[2];
+			int16_t	d;
+		} d0, d1;
+		// syslog( LOG_INFO, "### little endian ###" );
+		d0.d = d;
+		d1.by[0] = d0.by[1];
+		d1.by[1] = d0.by[0];
+		return d1.d;
+	}
+}
+
+Inline int32_t
+hton32( int32_t d )
+{
+	if( IS_BIGENDIAN() )
+		return d;
+	else{
+		union  {
+			int8_t	by[4];
+			int32_t	d;
+		} d0, d1;
+		d0.d = d;
+		d1.by[0] = d0.by[3];
+		d1.by[1] = d0.by[2];
+		d1.by[2] = d0.by[1];
+		d1.by[3] = d0.by[0];
+		return d1.d;
+	}
+}
+
+Inline int64_t
+hton64( int64_t d )
+{
+	if( IS_BIGENDIAN() )
+		return d;
+	else{
+		union  {
+			int8_t	by[8];
+			int64_t	d;
+		} d0, d1;
+		d0.d = d;
+		d1.by[0] = d0.by[7];
+		d1.by[1] = d0.by[6];
+		d1.by[2] = d0.by[5];
+		d1.by[3] = d0.by[4];
+		d1.by[4] = d0.by[3];
+		d1.by[5] = d0.by[2];
+		d1.by[6] = d0.by[1];
+		d1.by[7] = d0.by[0];
+		return d1.d;
+	}
+}
+
+Inline int128_t
+hton128( int128_t d )
+{
+	if( IS_BIGENDIAN() )
+		return d;
+	else{
+		/* ãã®å®è£
+ã¯ tecs.h ã§ typedef ãã int128_t ã«é©å */
+		int128_t d1;
+		d1.hi = hton64( d.lo );
+		d1.lo = hton64( d.hi );
+		return	d1;
+	}
+}
+
+Inline int16_t
+ntoh16( int16_t d )
+{
+	if( IS_BIGENDIAN() )
+		return d;
+	else{
+		union  {
+			int8_t	by[2];
+			int16_t	d;
+		} d0, d1;
+		d0.d = d;
+		d1.by[0] = d0.by[1];
+		d1.by[1] = d0.by[0];
+		return d1.d;
+	}
+}
+
+Inline int32_t
+ntoh32( int32_t d )
+{
+	if( IS_BIGENDIAN() )
+		return d;
+	else{
+		union  {
+			int8_t	by[4];
+			int32_t	d;
+		} d0, d1;
+		d0.d = d;
+		d1.by[0] = d0.by[3];
+		d1.by[1] = d0.by[2];
+		d1.by[2] = d0.by[1];
+		d1.by[3] = d0.by[0];
+		return d1.d;
+	}
+}
+
+Inline int64_t
+ntoh64( int64_t d )
+{
+	if( IS_BIGENDIAN() )
+		return d;
+	else{
+		union  {
+			int8_t	by[8];
+			int64_t	d;
+		} d0, d1;
+		d0.d = d;
+		d1.by[0] = d0.by[7];
+		d1.by[1] = d0.by[6];
+		d1.by[2] = d0.by[5];
+		d1.by[3] = d0.by[4];
+		d1.by[4] = d0.by[3];
+		d1.by[5] = d0.by[2];
+		d1.by[6] = d0.by[1];
+		d1.by[7] = d0.by[0];
+		return d1.d;
+	}
+}
+
+/*** unsigned ç¨ã®é¢æ° (128 bit çã®ã¿ç¨æ) ***/
+Inline int128_t
+ntoh128( int128_t d )
+{
+	if( IS_BIGENDIAN() )
+		return d;
+	else{
+		/* ãã®å®è£
+ã¯ tecs.h ã§ typedef ãã int128_t ã«é©å */
+		int128_t d1;
+		d1.hi = ntoh64( d.lo );
+		d1.lo = ntoh64( d.hi );
+		return	d1;
+	}
+}
+
+Inline uint128_t
+hton128u( uint128_t d )
+{
+	if( IS_BIGENDIAN() )
+		return d;
+	else{
+		/* ãã®å®è£
+ã¯ tecs.h ã§ typedef ãã int128_t ã«é©å */
+		uint128_t d1;
+		d1.hi = hton64( d.lo );
+		d1.lo = hton64( d.hi );
+		return	d1;
+	}
+}
+
+Inline uint128_t
+ntoh128u( uint128_t d )
+{
+	if( IS_BIGENDIAN() )
+		return d;
+	else{
+		/* ãã®å®è£
+ã¯ tecs.h ã§ typedef ãã int128_t ã«é©å */
+		uint128_t d1;
+		d1.hi = ntoh64( d.lo );
+		d1.lo = ntoh64( d.hi );
+		return	d1;
+	}
+}
+
+/************************************************
+ *  htonX, ntohX ã¯ 16, 32, 64 ã«ã®ã¿å¯¾å¿ã§ãã *
+ ************************************************/
+Inline int64_t
+htonX( int64_t d, int_t sz )
+{
+	switch( sz ){
+	case	2:	return	hton16( d );
+	case	4:	return	hton32( d );
+	case	8:	return	hton64( d );
+	default:	return	0;			// # mikan
+	};
+}
+
+Inline int64_t
+ntohX( int64_t d, int_t sz )
+{
+	switch( sz ){
+	case	2:	return	ntoh16( d );
+	case	4:	return	ntoh32( d );
+	case	8:	return	ntoh64( d );
+	default:	return	0;			// # mikan
+	};
+}
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eTDR
+ * entry port: eTDR
+ * signature:  sTDR
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eTDR_reset
+ * name:         eTDR_reset
+ * global_name:  tNBOTDR_eTDR_reset
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_reset(CELLIDX idx)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+
+	syslog( LOG_INFO, "TDR: resetting channel" );
+	ercd = cChannel_reset();
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_sendSOP
+ * name:         eTDR_sendSOP
+ * global_name:  tNBOTDR_eTDR_sendSOP
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_sendSOP(CELLIDX idx, bool_t b_client )
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	uint16_t sopMagic;
+	uint8_t	val;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+#ifdef RPC_DEBUG
+	syslog(LOG_INFO, "eTDR_sendSOP(b_client=%d)", b_client);
+#endif
+    if( b_client )
+		sopMagic = TDR_SOP_MAGIC1;
+	else
+		sopMagic = TDR_SOP_MAGIC2;
+
+	/*
+	 * SOP ãã±ããã®éä¿¡
+	 * ãã±ããã·ã¼ã±ã³ã¹ãå¤å°å´©ãã¦ãåå¾©ã§ããããã«ããã¤ãåä½ã§éã
+	 * ä¸ä½ãã¤ããä¸ä½ãã¤ãã®é ã«éã
+	 */
+
+	val = (uint8_t)(sopMagic>>8);
+	ercd = eTDR_putUInt8( idx, val );		/* ä¸ä½8ããã */
+	if( ercd != E_OK )
+		return	ercd;
+
+	val = (uint8_t)(sopMagic&0xff);			/* ä¸ä½8ããã */
+	ercd = eTDR_putUInt8( idx, val );
+
+	return	ercd;
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_receiveSOP
+ * name:         eTDR_receiveSOP
+ * global_name:  tNBOTDR_eTDR_receiveSOP
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_receiveSOP(CELLIDX idx, bool_t b_client )
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	uint16_t sopMagic;
+	uint8_t val;
+
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+#ifdef RPC_DEBUG
+	syslog(LOG_INFO, "eTDR_receiveSOP(b_client=%d)", b_client);
+#endif
+
+    if( b_client )
+		sopMagic = TDR_SOP_MAGIC2;
+	else
+		sopMagic = TDR_SOP_MAGIC1;
+
+	if( (ercd=eTDR_getUInt8( idx, &val )) != E_OK )
+		;
+	else if( val != (uint8_t)(sopMagic>>8) ){
+		ercd = E_MAGIC;
+	}
+	else if((ercd=eTDR_getUInt8( idx, &val )) != E_OK )
+		;
+	else if( val != (uint8_t)sopMagic ){
+		ercd = E_MAGIC;
+	}
+
+	if( ercd != E_OK )
+		syslog( LOG_INFO, "receiveSOP: ERCD=%d", ercd );
+
+	return ercd;
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_sendEOP
+ * name:         eTDR_sendEOP
+ * global_name:  tNBOTDR_eTDR_sendEOP
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_sendEOP(CELLIDX idx, bool_t b_continue )
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	uint16_t magic;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+#ifdef RPC_DEBUG
+	syslog(LOG_INFO, "eTDR_sendEOP(b_continue=%d)", b_continue);
+#endif
+
+	if( b_continue )
+		magic = TDR_EOP_MAGIC1;
+	else
+		magic = TDR_EOP_MAGIC2;
+
+	/* EOP magic ã®éä¿¡ */
+	if( (ercd = eTDR_putUInt16( idx, magic )) != E_OK )
+		return ercd;
+
+	return cChannel_flush(VAR_tmo);
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_receiveEOP
+ * name:         eTDR_receiveEOP
+ * global_name:  tNBOTDR_eTDR_receiveEOP
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_receiveEOP(CELLIDX idx, bool_t b_continue)
+{
+	ER		ercd = E_OK, er2;
+	CELLCB	*p_cellcb;
+	uint16_t magic;
+
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+#ifdef RPC_DEBUG
+	syslog(LOG_INFO, "eTDR_receiveEOP(b_continue=%d)",b_continue);
+#endif
+/* mikan cChannel EOF get_* */
+/* mikan magic EOF */
+
+	if( (ercd=eTDR_getUInt16( idx, &magic )) == E_OK ){
+		if( (b_continue && magic == TDR_EOP_MAGIC1) || (!b_continue && magic == TDR_EOP_MAGIC2) ){
+		} else {
+			ercd = E_MAGIC;
+		}
+	}
+	er2 = cChannel_end_receive();
+	return ercd != E_OK ? ercd : er2;
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putInt8
+ * name:         eTDR_putInt8
+ * global_name:  tNBOTDR_eTDR_putInt8
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putInt8(CELLIDX idx, int8_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putInt16
+ * name:         eTDR_putInt16
+ * global_name:  tNBOTDR_eTDR_putInt16
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putInt16(CELLIDX idx, int16_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	in = hton16( in );
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putInt32
+ * name:         eTDR_putInt32
+ * global_name:  tNBOTDR_eTDR_putInt32
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putInt32(CELLIDX idx, int32_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	in = hton32( in );
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putInt64
+ * name:         eTDR_putInt64
+ * global_name:  tNBOTDR_eTDR_putInt64
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putInt64(CELLIDX idx, int64_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	in = hton64( in );
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putInt128
+ * name:         eTDR_putInt128
+ * global_name:  tNBOTDR_eTDR_putInt128
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putInt128(CELLIDX idx, int128_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	in = hton128( in );
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getInt8
+ * name:         eTDR_getInt8
+ * global_name:  tNBOTDR_eTDR_getInt8
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getInt8(CELLIDX idx, int8_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	 *p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getInt16
+ * name:         eTDR_getInt16
+ * global_name:  tNBOTDR_eTDR_getInt16
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getInt16(CELLIDX idx, int16_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	*out = ntoh16( *out );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getInt32
+ * name:         eTDR_getInt32
+ * global_name:  tNBOTDR_eTDR_getInt32
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getInt32(CELLIDX idx, int32_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	*out = ntoh32( *out );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getInt64
+ * name:         eTDR_getInt64
+ * global_name:  tNBOTDR_eTDR_getInt64
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getInt64(CELLIDX idx, int64_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	*out = ntoh64( *out );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getInt128
+ * name:         eTDR_getInt128
+ * global_name:  tNBOTDR_eTDR_getInt128
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getInt128(CELLIDX idx, int128_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	*out = ntoh128( *out );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putUInt8
+ * name:         eTDR_putUInt8
+ * global_name:  tNBOTDR_eTDR_putUInt8
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putUInt8(CELLIDX idx, uint8_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putUInt16
+ * name:         eTDR_putUInt16
+ * global_name:  tNBOTDR_eTDR_putUInt16
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putUInt16(CELLIDX idx, uint16_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	in = hton16( in );
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putUInt32
+ * name:         eTDR_putUInt32
+ * global_name:  tNBOTDR_eTDR_putUInt32
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putUInt32(CELLIDX idx, uint32_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	in = hton32( in );
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putUInt64
+ * name:         eTDR_putUInt64
+ * global_name:  tNBOTDR_eTDR_putUInt64
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putUInt64(CELLIDX idx, uint64_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	in = hton64( in );
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putUInt128
+ * name:         eTDR_putUInt128
+ * global_name:  tNBOTDR_eTDR_putUInt128
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putUInt128(CELLIDX idx, uint128_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	in = hton128u( in );
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getUInt8
+ * name:         eTDR_getUInt8
+ * global_name:  tNBOTDR_eTDR_getUInt8
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getUInt8(CELLIDX idx, uint8_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getUInt16
+ * name:         eTDR_getUInt16
+ * global_name:  tNBOTDR_eTDR_getUInt16
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getUInt16(CELLIDX idx, uint16_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	*out = ntoh16( *out );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getUInt32
+ * name:         eTDR_getUInt32
+ * global_name:  tNBOTDR_eTDR_getUInt32
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getUInt32(CELLIDX idx, uint32_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	*out = ntoh32( *out );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getUInt64
+ * name:         eTDR_getUInt64
+ * global_name:  tNBOTDR_eTDR_getUInt64
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getUInt64(CELLIDX idx, uint64_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	*out = ntoh64( *out );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getUInt128
+ * name:         eTDR_getUInt128
+ * global_name:  tNBOTDR_eTDR_getUInt128
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getUInt128(CELLIDX idx, uint128_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	*out = ntoh128u( *out );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putChar
+ * name:         eTDR_putChar
+ * global_name:  tNBOTDR_eTDR_putChar
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putChar(CELLIDX idx, char_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getChar
+ * name:         eTDR_getChar
+ * global_name:  tNBOTDR_eTDR_getChar
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getChar(CELLIDX idx, char_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putBool
+ * name:         eTDR_putBool
+ * global_name:  tNBOTDR_eTDR_putBool
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putBool(CELLIDX idx, bool_t in)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	eTDR_putUInt8(idx, (uint8_t)(in != 0) );
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getBool
+ * name:         eTDR_getBool
+ * global_name:  tNBOTDR_eTDR_getBool
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getBool(CELLIDX idx, bool_t* out)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	uint8_t	val;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	ercd = eTDR_getUInt8(idx, &val );
+	if( ercd != E_OK )
+		return ercd;
+	*out = (val != 0);
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putFloat32
+ * name:         eTDR_putFloat32
+ * global_name:  tNBOTDR_eTDR_putFloat32
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putFloat32(CELLIDX idx, float32_t in)
+{
+	CELLCB	*p_cellcb;
+    int32_t val;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	val = hton32( *(int32_t*)&in );
+	return cChannel_send( (int8_t *)&val, (int16_t)sizeof( val ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putDouble64
+ * name:         eTDR_putDouble64
+ * global_name:  tNBOTDR_eTDR_putDouble64
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putDouble64(CELLIDX idx, double64_t in)
+{
+    int64_t val;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+    val = *(int64_t *)&in;
+	val = hton64( val );
+	return cChannel_send( (int8_t *)&val, (int16_t)sizeof( val ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getFloat32
+ * name:         eTDR_getFloat32
+ * global_name:  tNBOTDR_eTDR_getFloat32
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getFloat32(CELLIDX idx, float32_t* out)
+{
+	ER_UINT		er_sz = E_OK;
+    int32_t   val;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)&val, (int16_t)sizeof( val ), VAR_tmo );
+	val = ntoh32( val );
+    *out = *(float32_t *)&val;
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getDouble64
+ * name:         eTDR_getDouble64
+ * global_name:  tNBOTDR_eTDR_getDouble64
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getDouble64(CELLIDX idx, double64_t* out)
+{
+	ER_UINT		er_sz = E_OK;
+    int64_t     val;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)&val, (int16_t)sizeof( val ), VAR_tmo );
+	val = ntoh64( val );
+    *out = *(double64_t *)&val;
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putSChar
+ * name:         eTDR_putSChar
+ * global_name:  tNBOTDR_eTDR_putSChar
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putSChar(CELLIDX idx, signed char in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putShort
+ * name:         eTDR_putShort
+ * global_name:  tNBOTDR_eTDR_putShort
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putShort(CELLIDX idx, short_t in)
+{
+	CELLCB	*p_cellcb;
+	TDR_SHORT	IN = in;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	IN = HTONS( IN, sizeof IN );
+	return cChannel_send( (int8_t *)&IN, (int16_t)sizeof( IN ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putInt
+ * name:         eTDR_putInt
+ * global_name:  tNBOTDR_eTDR_putInt
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putInt(CELLIDX idx, int_t in)
+{
+	CELLCB	*p_cellcb;
+	TDR_INT	IN = in;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	IN = HTONI( IN, sizeof IN );
+	return cChannel_send( (int8_t *)&IN, (int16_t)sizeof( IN ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putLong
+ * name:         eTDR_putLong
+ * global_name:  tNBOTDR_eTDR_putLong
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putLong(CELLIDX idx, long_t in)
+{
+	CELLCB	*p_cellcb;
+	TDR_LONG	IN = in;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	IN = HTONL( IN, sizeof IN );
+	return cChannel_send( (int8_t *)&IN, (int16_t)sizeof( IN ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getSChar
+ * name:         eTDR_getSChar
+ * global_name:  tNBOTDR_eTDR_getSChar
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getSChar(CELLIDX idx, signed char* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getShort
+ * name:         eTDR_getShort
+ * global_name:  tNBOTDR_eTDR_getShort
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getShort(CELLIDX idx, short* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	TDR_SHORT	OUT;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)&OUT, (int16_t)sizeof( OUT ), VAR_tmo );
+	*out = NTOHS( OUT, sizeof OUT );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( OUT ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getInt
+ * name:         eTDR_getInt
+ * global_name:  tNBOTDR_eTDR_getInt
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getInt(CELLIDX idx, int_t* out)
+{
+	ER_UINT		 er_sz;
+	CELLCB		*p_cellcb;
+	TDR_INT	OUT;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)&OUT, (int16_t)sizeof( OUT ), VAR_tmo );
+	*out = NTOHI( OUT, sizeof OUT );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( OUT ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getLong
+ * name:         eTDR_getLong
+ * global_name:  tNBOTDR_eTDR_getLong
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getLong(CELLIDX idx, long_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	TDR_LONG	OUT;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)&OUT, (int16_t)sizeof( OUT ), VAR_tmo );
+	*out = NTOHL( OUT, sizeof OUT );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( OUT ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putUChar
+ * name:         eTDR_putUChar
+ * global_name:  tNBOTDR_eTDR_putUChar
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putUChar(CELLIDX idx, unsigned char in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putUShort
+ * name:         eTDR_putUShort
+ * global_name:  tNBOTDR_eTDR_putUShort
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putUShort(CELLIDX idx, ushort_t in)
+{
+	CELLCB	*p_cellcb;
+	TDR_USHORT	IN = in;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	IN = HTONS( IN, sizeof IN );
+	return cChannel_send( (int8_t *)&IN, (int16_t)sizeof( IN ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putUInt
+ * name:         eTDR_putUInt
+ * global_name:  tNBOTDR_eTDR_putUInt
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putUInt(CELLIDX idx, uint_t in)
+{
+	CELLCB		*p_cellcb;
+	TDR_UINT	IN = in;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	IN = HTONI( IN, sizeof IN );
+	return cChannel_send( (int8_t *)&IN, (int16_t)sizeof( IN ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putULong
+ * name:         eTDR_putULong
+ * global_name:  tNBOTDR_eTDR_putULong
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putULong(CELLIDX idx, ulong_t in)
+{
+	CELLCB	*p_cellcb;
+	TDR_ULONG	IN = in;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	IN = HTONL( IN, sizeof IN );
+	return cChannel_send( (int8_t *)&IN, (int16_t)sizeof( IN ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getUChar
+ * name:         eTDR_getUChar
+ * global_name:  tNBOTDR_eTDR_getUChar
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getUChar(CELLIDX idx, unsigned char* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getUShort
+ * name:         eTDR_getUShort
+ * global_name:  tNBOTDR_eTDR_getUShort
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getUShort(CELLIDX idx, unsigned short* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	TDR_USHORT	OUT;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)&OUT, (int16_t)sizeof( OUT ), VAR_tmo );
+	*out = NTOHS( OUT, sizeof OUT );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( OUT ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getUInt
+ * name:         eTDR_getUInt
+ * global_name:  tNBOTDR_eTDR_getUInt
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getUInt(CELLIDX idx, uint_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	TDR_UINT	OUT;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)&OUT, (int16_t)sizeof( OUT ), VAR_tmo );
+	*out = NTOHI( OUT, sizeof OUT );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( OUT ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getULong
+ * name:         eTDR_getULong
+ * global_name:  tNBOTDR_eTDR_getULong
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getULong(CELLIDX idx, ulong_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	TDR_ULONG	OUT;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)&OUT, (int16_t)sizeof( OUT ), VAR_tmo );
+	*out = NTOHL( OUT, sizeof OUT );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( OUT ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putIntptr
+ * name:         eTDR_putIntptr
+ * global_name:  tNBOTDR_eTDR_putIntptr
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putIntptr(CELLIDX idx, const intptr_t ptr)
+{
+	CELLCB	*p_cellcb;
+	TDR_INTPTR	IN = ptr;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	IN = HTONIP( IN, sizeof IN );
+	return cChannel_send( (int8_t *)&IN, (int16_t)sizeof( IN ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getIntptr
+ * name:         eTDR_getIntptr
+ * global_name:  tNBOTDR_eTDR_getIntptr
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getIntptr(CELLIDX idx, intptr_t* ptr)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	TDR_INTPTR	OUT;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)&OUT, (int16_t)sizeof( OUT ), VAR_tmo );
+	*ptr = NTOHIP( OUT, sizeof OUT );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( OUT ) ? E_OK : E_BOVR );
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tPPAllocator.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tPPAllocator.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tPPAllocator.c	(revision 270)
@@ -0,0 +1,161 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * å±æ§ã¢ã¯ã»ã¹ãã¯ã­ #_CAAM_#
+ * heap_size        uint32_t         ATTR_heap_size  
+ * buf              int8_t*          VAR_buf         
+ * allocated_size   uint32_t         VAR_allocated_size
+ *
+ * #[</PREAMBLE>]# */
+
+#include "tPPAllocator_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# ePPAllocator
+ * entry port: ePPAllocator
+ * signature:  sPPAllocator
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# ePPAllocator_alloc
+ * name:         ePPAllocator_alloc
+ * global_name:  tPPAllocator_ePPAllocator_alloc
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+ePPAllocator_alloc(CELLIDX idx, uint32_t size, void** ptr)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	if( size + VAR_allocatedSize > ATTR_heapSize ){
+		ercd = E_NOMEM;
+	}
+	else {
+		*ptr = (void *)(VAR_buf+VAR_allocatedSize);
+		VAR_allocatedSize += size;
+	}
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# ePPAllocator_dealloc
+ * name:         ePPAllocator_dealloc
+ * global_name:  tPPAllocator_ePPAllocator_dealloc
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+ePPAllocator_dealloc(CELLIDX idx, const void* ptr)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	if( (uintptr_t)ptr < (uintptr_t)VAR_buf || (uintptr_t)ptr >= (uintptr_t)(VAR_buf+VAR_allocatedSize) ){
+		ercd = E_PAR;
+	}
+	else {
+		VAR_allocatedSize = (uintptr_t)ptr - (uintptr_t)VAR_buf;
+	}
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# ePPAllocator_dealloc_all
+ * name:         ePPAllocator_dealloc_all
+ * global_name:  tPPAllocator_ePPAllocator_dealloc_all
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+ePPAllocator_dealloc_all(CELLIDX idx)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	VAR_allocatedSize = 0;
+
+	return(ercd);
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tRPCDedicatedTaskMain.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tRPCDedicatedTaskMain.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tRPCDedicatedTaskMain.c	(revision 270)
@@ -0,0 +1,101 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * å¼ã³å£é¢æ° #_TCPF_#
+ * call port : cMain  signature: sTaskBody context: task
+ *   void           cMain_main( );
+ *
+ * #[</PREAMBLE>]# */
+
+#include "tRPCDedicatedTaskMain_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eMain
+ * entry port: eMain
+ * signature:  sTaskBody
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eMain_main
+ * name:         eMain_main
+ * global_name:  tRPCDedicatedTaskMain_eMain_main
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eMain_main(CELLIDX idx)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		/* ã¨ã©ã¼å¦çã³ã¼ããããã«è¨è¿°ãã¾ã */
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	while( cMain_main() == E_OK ){
+	}
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tRPCDedicatedTaskMainWithOpener.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tRPCDedicatedTaskMainWithOpener.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tRPCDedicatedTaskMainWithOpener.c	(revision 270)
@@ -0,0 +1,114 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * å¼ã³å£é¢æ° #_TCPF_#
+ * call port : cMain  signature: sTaskBody context: task
+ *   void           cMain_main( );
+ *
+ * #[</PREAMBLE>]# */
+
+#include "tRPCDedicatedTaskMainWithOpener_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eMain
+ * entry port: eMain
+ * signature:  sTaskBody
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eMain_main
+ * name:         eMain_main
+ * global_name:  tRPCDedicatedTaskMain_eMain_main
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eMain_main(CELLIDX idx)
+{
+	CELLCB	*p_cellcb;
+	ER		er;
+
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		/* ã¨ã©ã¼å¦çã³ã¼ããããã«è¨è¿°ãã¾ã */
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	while(1){
+#ifdef RPC_DEBUG
+		syslog(LOG_INFO, "begin RPC unmarshaler task" );
+		syslog(LOG_INFO, "Opening RPC server channel" );
+#endif
+		delay( ATTR_initialDelay );
+		er = cOpener_open();
+		syslog(LOG_INFO, "opened" );
+		while( cMain_main() == E_OK ){
+		}
+		delay( ATTR_reopenDelay );
+		er = cOpener_close();
+	}
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tRPCSharedChannelMan.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tRPCSharedChannelMan.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tRPCSharedChannelMan.c	(revision 270)
@@ -0,0 +1,269 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * å¼ã³å£é¢æ° #_TCPF_#
+ * call port : cSemaphore  signature: sSemaphore context: task
+ *   ER             cSemaphore_signal( );
+ *   ER             cSemaphore_wait( );
+ *   ER             cSemaphore_waitPolling( );
+ *   ER             cSemaphore_waitTimeout( TMO timeout );
+ *   ER             cSemaphore_initialize( );
+ *   ER             cSemaphore_refer( T_RSEM* pk_semaphore_status );
+ * call port : cClientSideTDR  signature: sTDR context: task
+ *   ER             cClientSideTDR_open( const int8_t* arg, int16_t size, TMO tmo );
+ *   ER             cClientSideTDR_close( );
+ *   ER             cClientSideTDR_reset( );
+ *   ER             cClientSideTDR_sop( int_t no );
+ *   ER             cClientSideTDR_is_sop( int_t no );
+ *   ER             cClientSideTDR_eop( int_t no );
+ *   ER             cClientSideTDR_is_eop( int_t no );
+ *   ER             cClientSideTDR_set_tmo( TMO tmo );
+ *   ER             cClientSideTDR_put_int8( int8_t in );
+ *   ER             cClientSideTDR_put_int16( int16_t in );
+ *   ER             cClientSideTDR_put_int32( int32_t in );
+ *   ER             cClientSideTDR_put_int64( int64_t in );
+ *   ER             cClientSideTDR_put_int128( int128_t in );
+ *   ER             cClientSideTDR_get_int8( int8_t* out );
+ *   ER             cClientSideTDR_get_int16( int16_t* out );
+ *   ER             cClientSideTDR_get_int32( int32_t* out );
+ *   ER             cClientSideTDR_get_int64( int64_t* out );
+ *   ER             cClientSideTDR_get_int128( int128_t* out );
+ *   ER             cClientSideTDR_put_char( char_t in );
+ *   ER             cClientSideTDR_put_short( short in );
+ *   ER             cClientSideTDR_put_int( int_t in );
+ *   ER             cClientSideTDR_put_long( long_t in );
+ *   ER             cClientSideTDR_get_char( char_t* out );
+ *   ER             cClientSideTDR_get_short( short* out );
+ *   ER             cClientSideTDR_get_int( int_t* out );
+ *   ER             cClientSideTDR_get_long( long_t* out );
+ *   ER             cClientSideTDR_put_intptr( const void* ptr );
+ *   ER             cClientSideTDR_get_intptr( void** ptr );
+ *
+ * #[</PREAMBLE>]# */
+
+#include "tRPCSharedChannelMan_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eSemaphore
+ * entry port: eSemaphore
+ * signature:  sSemaphore
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eSemaphore_signal
+ * name:         eSemaphore_signal
+ * global_name:  tRPCSharedTaskMain_eSemaphore_signal
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eSemaphore_signal(CELLIDX idx, int_t subscript)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	cClientSideTDR_putInt16( RPC_CHANNEL_MAN_EOP_MAGIC );
+	ercd = cSemaphore_signal();
+	// syslog( LOG_INFO, "tRPCSharedTaskMain: cSemaphore_signal" );
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eSemaphore_wait
+ * name:         eSemaphore_wait
+ * global_name:  tRPCSharedTaskMain_eSemaphore_wait
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eSemaphore_wait(CELLIDX idx, int_t subscript)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	ercd = cSemaphore_wait();
+	if( ercd == E_OK ){
+		// syslog( LOG_INFO, "tRPCSharedTaskMain: cSemaphore_wait" );
+
+		cClientSideTDR_putInt16( RPC_CHANNEL_MAN_SOP_MAGIC );
+		cClientSideTDR_putInt16( subscript );
+	}
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eSemaphore_waitPolling
+ * name:         eSemaphore_waitPolling
+ * global_name:  tRPCSharedTaskMain_eSemaphore_waitPolling
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eSemaphore_waitPolling(CELLIDX idx, int_t subscript)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	ercd = cSemaphore_waitPolling();
+	if( ercd == E_OK ){
+		cClientSideTDR_putInt16( RPC_CHANNEL_MAN_SOP_MAGIC );
+		cClientSideTDR_putInt16( subscript );
+	}
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eSemaphore_waitTimeout
+ * name:         eSemaphore_waitTimeout
+ * global_name:  tRPCSharedTaskMain_eSemaphore_waitTimeout
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eSemaphore_waitTimeout(CELLIDX idx, int_t subscript, TMO timeout)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	ercd = cSemaphore_waitTimeout(timeout);
+	if( ercd == E_OK ){
+		// syslog( LOG_INFO, "tRPCSharedTaskMain: cSemaphore_waitTimeout" );
+
+		cClientSideTDR_putInt16( RPC_CHANNEL_MAN_SOP_MAGIC );
+		cClientSideTDR_putInt16( subscript );
+	}
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eSemaphore_initialize
+ * name:         eSemaphore_initialize
+ * global_name:  tRPCSharedTaskMain_eSemaphore_initialize
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eSemaphore_initialize(CELLIDX idx, int_t subscript)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eSemaphore_refer
+ * name:         eSemaphore_refer
+ * global_name:  tRPCSharedTaskMain_eSemaphore_refer
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eSemaphore_refer(CELLIDX idx, int_t subscript, T_RSEM* pk_semaphore_status)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+
+	return(ercd);
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tRPCSharedTaskMain.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tRPCSharedTaskMain.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tRPCSharedTaskMain.c	(revision 270)
@@ -0,0 +1,175 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * å±æ§ã¢ã¯ã»ã¹ãã¯ã­ #_CAAM_#
+ * channelNo        int16_t          VAR_channelNo   
+ *
+ * å¼ã³å£é¢æ° #_TCPF_#
+ * call port : cUnmarshalAndCallFunction  signature: sTaskBody context: task
+ *   void           cUnmarshalAndCallFunction_main( subscript );
+ * call port : cServerSideTDR  signature: sTDR context: task
+ *   ER             cServerSideTDR_reset( );
+ *   ER             cServerSideTDR_sendSOP( bool_t b_client );
+ *   ER             cServerSideTDR_receiveSOP( bool_t b_client );
+ *   ER             cServerSideTDR_sendEOP( bool_t b_continue );
+ *   ER             cServerSideTDR_receiveEOP( bool_t b_continue );
+ *   ER             cServerSideTDR_putInt8( int8_t in );
+ *   ER             cServerSideTDR_putInt16( int16_t in );
+ *   ER             cServerSideTDR_putInt32( int32_t in );
+ *   ER             cServerSideTDR_putInt64( int64_t in );
+ *   ER             cServerSideTDR_putInt128( int128_t in );
+ *   ER             cServerSideTDR_getInt8( int8_t* out );
+ *   ER             cServerSideTDR_getInt16( int16_t* out );
+ *   ER             cServerSideTDR_getInt32( int32_t* out );
+ *   ER             cServerSideTDR_getInt64( int64_t* out );
+ *   ER             cServerSideTDR_getInt128( int128_t* out );
+ *   ER             cServerSideTDR_putFloat32( float32_t in );
+ *   ER             cServerSideTDR_putDouble64( double64_t in );
+ *   ER             cServerSideTDR_getFloat32( float32_t* out );
+ *   ER             cServerSideTDR_getDouble64( double64_t* out );
+ *   ER             cServerSideTDR_putChar( char_t in );
+ *   ER             cServerSideTDR_putShort( short in );
+ *   ER             cServerSideTDR_putInt( int_t in );
+ *   ER             cServerSideTDR_putLong( long_t in );
+ *   ER             cServerSideTDR_getChar( char_t* out );
+ *   ER             cServerSideTDR_getShort( short* out );
+ *   ER             cServerSideTDR_getInt( int_t* out );
+ *   ER             cServerSideTDR_getLong( long_t* out );
+ *   ER             cServerSideTDR_putIntptr( const intptr_t ptr );
+ *   ER             cServerSideTDR_getIntptr( intptr_t* ptr );
+ * require port : signature: sSysLog context: task
+ *   ER             write( uint_t prio, const SYSLOG* p_syslog );
+ *   ER_UINT        read( SYSLOG* p_syslog );
+ *   ER             mask( uint_t logmask, uint_t lowmask );
+ *   ER             refer( T_SYSLOG_RLOG* pk_rlog );
+ *
+ * #[</PREAMBLE>]# */
+
+#include "tRPCSharedTaskMain_tecsgen.h"
+#include "t_syslog.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eMain
+ * entry port: eMain
+ * signature:  sTaskBody
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eMain_main
+ * name:         eMain_main
+ * global_name:  tRPCSharedTaskMain_eMain_main
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eMain_main(CELLIDX idx)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		/* ã¨ã©ã¼å¦çã³ã¼ããããã«è¨è¿°ãã¾ã */
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	syslog( LOG_INFO, "Shared RPC server task started." );
+	while(1){
+		int16_t magic;
+		ER      er;
+
+		er = cServerSideTDR_getInt16( &magic );
+		if( er != E_OK ){
+			syslog( LOG_INFO, "err: getInt16 for SOP_MAGIC(%X)", er );
+			continue;
+		}
+		if( magic != RPC_CHANNEL_MAN_SOP_MAGIC ){
+			syslog( LOG_INFO, "illegal SOP magic(%X): retrying", (uint16_t)magic );
+			continue;
+		}
+		er = cServerSideTDR_getInt16( &VAR_channelNo );
+		if( er != E_OK ){
+			syslog( LOG_INFO, "err: getInt16 for channelNo(%X)", er );
+			continue;
+		}
+		if( VAR_channelNo < 0 || VAR_channelNo >= N_CP_cUnmarshalAndCallFunction(p_cellcb) ){
+			syslog( LOG_INFO, "illegal channel number(%X): retrying", (uint16_t)VAR_channelNo );
+			continue;
+		}
+		syslog( LOG_INFO, "Shared Channel: servicing channel No. %d", VAR_channelNo );
+		
+		cUnmarshalAndCallFunction_main( VAR_channelNo );
+
+		er = cServerSideTDR_getInt16( &magic );
+		if( er != E_OK ){
+			syslog( LOG_INFO, "err: getInt16 for EOP_MAGIC(%X)", er );
+			continue;
+		}
+		if( magic != RPC_CHANNEL_MAN_EOP_MAGIC ){
+			syslog( LOG_INFO, "illegal EOP magic(%X): retrying", (uint16_t)magic );
+			continue;
+		}
+	}
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tRPCSharedTaskMainWithOpener.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tRPCSharedTaskMainWithOpener.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tRPCSharedTaskMainWithOpener.c	(revision 270)
@@ -0,0 +1,205 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+/*
+ * ãã®ãã¡ã¤ã«ã¯ tecsgen ã«ãããã³ãã¬ã¼ãã¨ãã¦èªåçæããã¾ãã
+ * ãã®ãã¡ã¤ã«ãç·¨éãã¦ä½¿ç¨ãããã¨ãæå³ããã¦ãã¾ãã
+ * tecsgen ã®åå®è¡ã«ããä¸æ¸ãããã¦ãã¾ããããéå¸¸
+ *   gen/tRPCSharedTaskMainWithOpener_template.c => src/tRPCSharedTaskMainWithOpener.c
+ * ã®ããã«åå, ãã©ã«ããå¤æ´ãã¦ããä¿®æ­£ãã¾ã
+ */
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * å±æ§ã¢ã¯ã»ã¹ãã¯ã­ #_CAAM_#
+ * initialDelay     RELTIM           ATTR_initialDelay
+ * reopenDelay      RELTIM           ATTR_reopenDelay
+ * channelNo        int16_t          VAR_channelNo   
+ *
+ * å¼ã³å£é¢æ° #_TCPF_#
+ * call port : cUnmarshalAndCallFunction  signature: sTaskBody context: task
+ *   void           cUnmarshalAndCallFunction_main( subscript );
+ * call port : cServerSideTDR  signature: sTDR context: task
+ *   ER             cServerSideTDR_reset( );
+ *   ER             cServerSideTDR_sendSOP( bool_t b_client );
+ *   ER             cServerSideTDR_receiveSOP( bool_t b_client );
+ *   ER             cServerSideTDR_sendEOP( bool_t b_continue );
+ *   ER             cServerSideTDR_receiveEOP( bool_t b_continue );
+ *   ER             cServerSideTDR_putInt8( int8_t in );
+ *   ER             cServerSideTDR_putInt16( int16_t in );
+ *   ER             cServerSideTDR_putInt32( int32_t in );
+ *   ER             cServerSideTDR_putInt64( int64_t in );
+ *   ER             cServerSideTDR_putInt128( int128_t in );
+ *   ER             cServerSideTDR_getInt8( int8_t* out );
+ *   ER             cServerSideTDR_getInt16( int16_t* out );
+ *   ER             cServerSideTDR_getInt32( int32_t* out );
+ *   ER             cServerSideTDR_getInt64( int64_t* out );
+ *   ER             cServerSideTDR_getInt128( int128_t* out );
+ *   ER             cServerSideTDR_putFloat32( float32_t in );
+ *   ER             cServerSideTDR_putDouble64( double64_t in );
+ *   ER             cServerSideTDR_getFloat32( float32_t* out );
+ *   ER             cServerSideTDR_getDouble64( double64_t* out );
+ *   ER             cServerSideTDR_putChar( char_t in );
+ *   ER             cServerSideTDR_putShort( short in );
+ *   ER             cServerSideTDR_putInt( int_t in );
+ *   ER             cServerSideTDR_putLong( long_t in );
+ *   ER             cServerSideTDR_getChar( char_t* out );
+ *   ER             cServerSideTDR_getShort( short* out );
+ *   ER             cServerSideTDR_getInt( int_t* out );
+ *   ER             cServerSideTDR_getLong( long_t* out );
+ *   ER             cServerSideTDR_putIntptr( const intptr_t ptr );
+ *   ER             cServerSideTDR_getIntptr( intptr_t* ptr );
+ * call port : cOpener  signature: sServerChannelOpener context: task
+ *   ER             cOpener_open( );
+ *   ER             cOpener_close( );
+ * require port : signature: sSysLog context: task
+ *   ER             write( uint_t prio, const SYSLOG* p_syslog );
+ *   ER_UINT        read( SYSLOG* p_syslog );
+ *   ER             mask( uint_t logmask, uint_t lowmask );
+ *   ER             refer( T_SYSLOG_RLOG* pk_rlog );
+ * require port : signature: sKernel context: task
+ *   ER             delay( RELTIM delay_time );
+ *   ER             exitTask( );
+ *   ER             getTime( SYSTIM* p_system_time );
+ *   ER             getMicroTime( SYSUTM* p_system_micro_time );
+ *   ER             exitKernel( );
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã */
+#include "tRPCSharedTaskMainWithOpener_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eMain
+ * entry port: eMain
+ * signature:  sTaskBody
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eMain_main
+ * name:         eMain_main
+ * global_name:  tRPCSharedTaskMainWithOpener_eMain_main
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eMain_main(CELLIDX idx)
+{
+	CELLCB	*p_cellcb;
+	ER		er;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		/* ã¨ã©ã¼å¦çã³ã¼ããããã«è¨è¿°ãã¾ã */
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	delay( ATTR_initialDelay );
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	while(1){
+#ifdef RPC_DEBUG
+		syslog(LOG_INFO, "begin RPC unmarshaler task" );
+		syslog(LOG_INFO, "Opening RPC server channel" );
+#endif
+
+		er = cOpener_open();
+		syslog(LOG_INFO, "opened" );
+		while(1){
+			int16_t magic;
+
+			er = cServerSideTDR_getInt16( &magic );
+			if( er != E_OK ){
+				syslog( LOG_INFO, "err: getInt16 for SOP_MAGIC(%X)", er );
+				continue;
+			}
+			if( magic != RPC_CHANNEL_MAN_SOP_MAGIC ){
+				syslog( LOG_INFO, "illegal SOP magic(%X): retrying", (uint16_t)magic );
+				continue;
+			}
+			er = cServerSideTDR_getInt16( &VAR_channelNo );
+			if( er != E_OK ){
+				syslog( LOG_INFO, "err: getInt16 for channelNo(%X)", er );
+				continue;
+			}
+			if( VAR_channelNo < 0 || VAR_channelNo >= N_CP_cUnmarshalAndCallFunction(p_cellcb) ){
+				syslog( LOG_INFO, "illegal channel number(%X): retrying", (uint16_t)VAR_channelNo );
+				continue;
+			}
+			syslog( LOG_INFO, "Shared Channel: servicing channel No. %d", VAR_channelNo );
+		
+			cUnmarshalAndCallFunction_main( VAR_channelNo );
+
+			er = cServerSideTDR_getInt16( &magic );
+			if( er != E_OK ){
+				syslog( LOG_INFO, "err: getInt16 for EOP_MAGIC(%X)", er );
+				continue;
+			}
+			if( magic != RPC_CHANNEL_MAN_EOP_MAGIC ){
+				syslog( LOG_INFO, "illegal EOP magic(%X): retrying", (uint16_t)magic );
+				continue;
+			}
+		}
+		er = cOpener_close();
+		delay( ATTR_reopenDelay );
+	}
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tSocketChannel.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tSocketChannel.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tSocketChannel.cdl	(revision 270)
@@ -0,0 +1,84 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+const	uint16_t	SOCKET_DEFAULT_PORT_NO  = 8931;
+
+signature sSocketClientOpener {
+	ER		open( [in,string]const char_t *serverAddr, [in]uint16_t portNo, [in]TMO tmo );
+	ER		simpleOpen( [in]TMO tmo );      // attr ã®è¨­å®ã«å¾ã£ã¦éã
+	ER		close( [in]TMO tmo );
+};
+
+celltype tSocketClient {
+	entry	sChannel			eC0;
+	entry	sSocketClientOpener	eOpener;
+	attr {
+		// simpleOpen ã§ç¨ããããã¢ãã¬ã¹ããã³ãã¼ãçªå·
+		int16_t	portNo = SOCKET_DEFAULT_PORT_NO;
+		char_t  *serverAddr = "127.0.0.1";       // Loop back address
+	};
+	var {
+		int_t	sd;
+	};
+};
+
+celltype tSocketServer {
+	entry	sChannel				eC1;
+	entry	sServerChannelOpener	eOpener;
+	attr {
+		int16_t	portNo = SOCKET_DEFAULT_PORT_NO;
+	};
+	var {
+		int_t    sd;
+	};
+};
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tSocketClient.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tSocketClient.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tSocketClient.c	(revision 270)
@@ -0,0 +1,367 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+/* #[<PREAMBLE>]#
+ * Don't edit the comments between #[<...>]# and #[</...>]#
+ * These comment are used by tecsmerege when merging.
+ *
+ * attr access macro #_CAAM_#
+ * portNo           int16_t          ATTR_portNo    
+ * serverAddr       char_t*          ATTR_serverAddr
+ * sd               int_t            VAR_sd          
+ *
+ * #[</PREAMBLE>]# */
+
+#include "tSocketClient_tecsgen.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+#include "errno2ER.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* æ­£å¸¸çµäº */
+#define	E_ID	(-18)	/* ä¸æ­£IDçªå· */
+#endif
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eC0
+ * entry port: eC0
+ * signature:  sChannel
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eC0_send
+ * name:         eC0_send
+ * global_name:  tSocketClient_eC0_send
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eC0_send(CELLIDX idx, const int8_t* buf, int16_t size, TMO tmo)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	ssize_t sz;
+
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã */
+	// mikan BUG  buf ã®ä½ç½®ãæ´æ°ãã¦ããªã
+	while(size>0){
+		if((sz=write( VAR_sd, buf, (ssize_t)size )) < 0 ){
+#ifdef RPC_DEBUG
+			perror( "eC0_send" );
+			syslog( LOG_INFO, "eC0_send: sd %d, writing %d bytes, ercd=%d", VAR_sd, size, ercd );
+#endif
+			ercd = errno2ER( errno );
+			break;
+		}
+		else{
+			size -= sz;
+		}
+	}
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eC0_flush
+ * name:         eC0_flush
+ * global_name:  tSocketClient_eC0_flush
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eC0_flush(CELLIDX idx, TMO tmo)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã */
+	/* write ã¯ãããã¡ãªã³ã°ãªããªã®ã§ flush ããªã */
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eC0_receive
+ * name:         eC0_receive
+ * global_name:  tSocketClient_eC0_receive
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER_UINT
+eC0_receive(CELLIDX idx, int8_t* buf, int16_t size, TMO tmo)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	ssize_t  sz;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã */
+	sz = read( VAR_sd, buf, (ssize_t)size );
+	ercd = errno2ER( errno );
+#ifdef DEBUG
+	{
+		int i;
+		for( i = 0; i < sz; i++ ){
+			printf( "%02X ", (unsigned char)buf[i] );
+			if( i % 8 == 7 )
+				putchar( '\n' );
+		}
+		putchar( '\n' );
+	}
+#endif
+	/* mikan ä¸çºã§å
+¨ã¦èª­ããã¨ä»®å® */
+	if( sz >= 0 )
+		ercd = sz;
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eC0_end_receive
+ * name:         eC0_end_receive
+ * global_name:  tSocketClient_eC0_end_receive
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eC0_end_receive(CELLIDX idx)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eC0_reset
+ * name:         eC0_reset
+ * global_name:  tSocketClient_eC0_reset
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eC0_reset(CELLIDX idx)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã */
+
+	return(ercd);
+}
+
+/* #[<ENTRY_PORT>]# eOpener
+ * entry port: eOpener
+ * signature:  sSocketClientOpener
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eOpener_open
+ * name:         eOpener_open
+ * global_name:  tSocketClient_eOpener_open
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eOpener_open(CELLIDX idx, const char_t* serverAddr, uint16_t portNo, TMO tmo)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	int		soc;
+	struct sockaddr_in addr={AF_INET};
+
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	soc=socket(AF_INET, SOCK_STREAM, 0);
+	if(soc<0){
+		ercd = errno2ER( errno );
+		syslog( LOG_INFO, "SocketClient: socket failed");
+		return ercd;
+	}
+
+#if 0
+/* ãã³ãã­ãã¯ã«å¤æ´ */
+	int flag=fcntl(soc, F_GETFL, 0);
+	if(flag<0) perror("fcntl(GET) error");
+	if(fcntl(soc, F_SETFL, flag|O_NONBLOCK)<0) perror("fcntl(NONBLOCK) error");
+#endif /* 0 */
+
+	puts( "connecting" );
+	inet_aton( serverAddr, &addr.sin_addr );
+	addr.sin_port=htons(portNo);
+	if(connect(soc, (struct sockaddr*)&addr, sizeof(addr))<0){
+		ercd = errno2ER( errno );
+		close( soc );
+		printf( "connect fail errno=%d, ercd=%d\n", errno, ercd );
+		syslog( LOG_INFO, "SocketClient: connect" );
+		return ercd;
+	}
+	VAR_sd = soc;
+
+#if 0
+	if(errno!=EINPROGRESS)
+		perror("connect error");
+	//EINPROGRESS:ã³ãã¯ã·ã§ã³è¦æ±ã¯å§ã¾ã£ãããã¾ã å®äºãã¦ããªã
+
+	fd_set rmask,wmask;FD_ZERO(&rmask);FD_SET(soc,&rmask);wmask=rmask;
+	struct timeval tv={ ã¿ã¤ã ã¢ã¦ãæé[ç§],[Î¼ç§] };
+	int rc=select(soc+1, &rmask, &wmask, NULL, &tv);
+	if(rc<0) perror("connect-select error");
+	if(rc==0){ ã¿ã¤ã ã¢ã¦ãå¦ç }
+	if(rc==2){ //èª­ã¿æ¸ããåæã«åºæ¥ãå ´å
+#if Solaris
+		int val;
+		socklen_t len=sizeof(val);
+		if(getsockopt(soc,SOL_SOCKET,SO_ERROR, &val,&len)>=0) {
+#elif Linux
+			struct sockaddr_in name;
+			socklen_t len=sizeof(name);
+			if(getpeername(soc,(struct sockaddr*)&name,&len)>=0) {
+#endif
+				// æ¢ã«ãã¼ã¿ãæ¥ã¦ãã
+			}else{
+				// ã³ãã¯ãå¤±æ
+			}
+		}
+	}
+//ãã©ã°ãå
+ã«æ»ã
+	if(fcntl(soc, F_SETFL, flag)<0) perror("fcntl(END) error");
+#endif /* 0 */
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eOpener_simpleOpen
+ * name:         eOpener_simpleOpen
+ * global_name:  tSocketClient_eOpener_simpleOpen
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eOpener_simpleOpen(CELLIDX idx, TMO tmo)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* Put statements here #_TEFB_# */
+	ercd = eOpener_open(idx, ATTR_serverAddr, ATTR_portNo, tmo);
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eOpener_close
+ * name:         eOpener_close
+ * global_name:  tSocketClient_eOpener_close
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eOpener_close(CELLIDX idx, TMO tmo)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	close( VAR_sd );       /* mikan ã¨ã©ã¼å¦ç */
+
+	return(ercd);
+}
+
+/* #[<POSTAMBLE>]#
+ *   Put non-entry functions below.
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tSocketServer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tSocketServer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tSocketServer.c	(revision 270)
@@ -0,0 +1,318 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * å±æ§ã¢ã¯ã»ã¹ãã¯ã­ #_CAAM_#
+ * portNo           int16_t          ATTR_portNo    
+ * sd               int_t            VAR_sd          
+ *
+ * #[</PREAMBLE>]# */
+
+#include "tSocketServer_tecsgen.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+#include "errno2ER.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* æ­£å¸¸çµäº */
+#define	E_ID	(-18)	/* ä¸æ­£IDçªå· */
+#endif
+
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eC1
+ * entry port: eC1
+ * signature:  sChannel
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eC1_send
+ * name:         eC1_send
+ * global_name:  tSocketServer_eC1_send
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eC1_send(CELLIDX idx, const int8_t* buf, int16_t size, TMO tmo)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	int     sz;
+
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã */
+#ifdef DEBUG
+	syslog( LOG_INFO, "tSocketServer: send" );
+	{
+		int i;
+		for( i = 0; i < size; i++ ){
+			printf( "%02X ", (unsigned char)buf[i] );
+			if( i % 8 == 7 )
+				putchar( '\n' );
+		}
+		putchar( '\n' );
+	}
+#endif
+	while(size>0){
+		if((sz=write( VAR_sd, buf, (size_t)size )) < 0 ){
+			ercd = errno2ER( errno );
+			break;
+		}
+		else{
+			size -= sz;
+		}
+	}
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eC1_flush
+ * name:         eC1_flush
+ * global_name:  tSocketServer_eC1_flush
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eC1_flush(CELLIDX idx, TMO tmo)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã */
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eC1_receive
+ * name:         eC1_receive
+ * global_name:  tSocketServer_eC1_receive
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER_UINT
+eC1_receive(CELLIDX idx, int8_t* buf, int16_t size, TMO tmo)
+{
+	ER		ercd = E_OK;
+	ER_UINT sz;
+	CELLCB	*p_cellcb;
+
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã */
+	if( (sz=read( VAR_sd, buf, (size_t)size )) < 0 )
+		ercd = errno2ER( errno );
+	else
+		ercd = sz;
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eC1_end_receive
+ * name:         eC1_end_receive
+ * global_name:  tSocketServer_eC1_end_receive
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eC1_end_receive(CELLIDX idx)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã */
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eC1_reset
+ * name:         eC1_reset
+ * global_name:  tSocketServer_eC1_reset
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eC1_reset(CELLIDX idx)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã */
+	syslog( LOG_INFO, "tSocketServer: reset" );
+
+	return(ercd);
+}
+
+/* #[<ENTRY_PORT>]# eOpener
+ * entry port: eOpener
+ * signature:  sServerChannelOpener
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eOpener_open
+ * name:         eOpener_open
+ * global_name:  tSocketServer_eOpener_open
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eOpener_open(CELLIDX idx)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	int		ssoc, soc;
+	struct sockaddr_in addr={ AF_INET };
+
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	syslog( LOG_INFO, "tSocketServer: open" );
+
+	ssoc=socket(AF_INET,SOCK_STREAM,0);
+	if(ssoc<0){
+		ercd = errno2ER( errno );
+		syslog( LOG_INFO, "tSocketServer: socket failed" );
+		return ercd;
+	}
+
+	addr.sin_port = htons(ATTR_portNo);
+	addr.sin_addr.s_addr = INADDR_ANY;
+	if(bind(ssoc,(struct sockaddr*)&addr,sizeof(addr))<0){
+		ercd = errno2ER( errno );
+		syslog( LOG_INFO, "tSocketServer: bind failed" );
+		return ercd;
+	}
+
+	if(listen(ssoc, 1 )<0){
+		ercd = errno2ER( errno );
+		syslog( LOG_INFO, "tSocketServer: listen failed" );
+		return ercd;
+	}
+
+    soc=accept(ssoc, NULL, NULL);
+    if(soc<0){
+		ercd = errno2ER( errno );
+		syslog( LOG_INFO, "tSocketServer: accept failed" );
+		return ercd;
+	}
+	syslog( LOG_INFO, "tSocketServer: accepted" );
+
+	close( ssoc );
+	VAR_sd = soc;
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eOpener_close
+ * name:         eOpener_close
+ * global_name:  tSocketServer_eOpener_close
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eOpener_close(CELLIDX idx)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	syslog( LOG_INFO, "tSocketServer: close" );
+	if( close( VAR_sd ) < 0 )
+		ercd = errno2ER( errno );
+
+	return(ercd);
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tTDR_inline.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tTDR_inline.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tTDR_inline.h	(revision 270)
@@ -0,0 +1,1244 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * å±æ§ã¢ã¯ã»ã¹ãã¯ã­ #_CAAM_#
+ * tmo              TMO              VAR_tmo         
+ *
+ * #[</PREAMBLE>]# */
+
+/*
+ * marhaler, unmarshaler ãä½¿ç¨ãã STRLEN é¢æ°ãå®ç¾©ãã
+ *  marshaler, unmarshaler ã¯å¿
+ã TDR ã¯ ã«çµåããããã
+ */
+#include	"rpc_string.h"
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eTDR
+ * entry port: eTDR
+ * signature:  sTDR
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eTDR_reset
+ * name:         eTDR_reset
+ * global_name:  tTDR_eTDR_reset
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_reset(CELLIDX idx)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	syslog( LOG_INFO, "TDR: resetting channel" );
+	ercd = cChannel_reset();
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_sendSOP
+ * name:         eTDR_sendSOP
+ * global_name:  tTDR_eTDR_sendSOP
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_sendSOP(CELLIDX idx, bool_t b_client )
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	const uint16_t *p_sopMagic;
+	const uint16_t SOP_MAGIC1 = TDR_SOP_MAGIC1;
+	const uint16_t SOP_MAGIC2 = TDR_SOP_MAGIC2;
+	uint8_t		   val;
+
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+#ifdef RPC_DEBUG
+	syslog(LOG_INFO, "eTDR_sendSOP(b_client=%d)", b_client);
+#endif
+    if( b_client )
+		p_sopMagic = &SOP_MAGIC1;
+	else
+		p_sopMagic = &SOP_MAGIC2;
+
+	/*
+	 * SOP ãã±ããã®éä¿¡
+	 * ãã±ããã·ã¼ã±ã³ã¹ãå¤å°å´©ãã¦ãåå¾©ã§ããããã«ããã¤ãåä½ã§éã
+	 * ä¸ä½ã¢ãã¬ã¹ãä¸ä½ã¢ãã¬ã¹ã®é ã«éã
+	 */
+
+	val = (uint8_t)(*((uint8_t *)p_sopMagic));
+	ercd = eTDR_putUInt8( idx, val );
+	// syslog( LOG_INFO, "sendSOP:1 %02X", val );
+	if( ercd != E_OK )
+		return	ercd;
+	val = (uint8_t)*(((uint8_t *)p_sopMagic)+1);
+	ercd = eTDR_putUInt8( idx, val );
+	// syslog( LOG_INFO, "sendSOP:2 %02X", val );
+
+	return	ercd;
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_receiveSOP
+ * name:         eTDR_receiveSOP
+ * global_name:  tTDR_eTDR_receiveSOP
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_receiveSOP(CELLIDX idx, bool_t b_client)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	const uint16_t SOP_MAGIC1 = TDR_SOP_MAGIC1;
+	const uint16_t SOP_MAGIC2 = TDR_SOP_MAGIC2;
+	const uint16_t *p_sopMagic;
+	uint16_t magic;
+
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+#ifdef RPC_DEBUG
+	syslog(LOG_INFO, "eTDR_receiveSOP(b_client=%d)", b_client);
+#endif
+
+    if( b_client )
+		p_sopMagic = &SOP_MAGIC2;
+	else
+		p_sopMagic = &SOP_MAGIC1;
+
+	if( (ercd=eTDR_getUInt8( idx, (uint8_t *)&magic )) != E_OK )
+		;
+	else if( (uint8_t)magic != (uint8_t)(*((uint8_t *)p_sopMagic)) ){
+		// syslog( LOG_INFO, "receiveSOP:1 %02X expecting=%02X", (uint8_t)magic, (int8_t)(*((int8_t *)p_sopMagic)) );
+		ercd = E_MAGIC;
+	}
+	else if((ercd=eTDR_getUInt8( idx, ((uint8_t *)&magic)+1 )) != E_OK )
+		;
+	else if( magic != *p_sopMagic){
+		// syslog( LOG_INFO, "receiveSOP:2 %04X expecting=%04X", magic, *p_sopMagic );
+		ercd = E_MAGIC;
+	}
+
+	if( ercd != E_OK )
+		syslog( LOG_INFO, "receiveSOP: ERCD=%d", ercd );
+
+	return ercd;
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_sendEOP
+ * name:         eTDR_sendEOP
+ * global_name:  tTDR_eTDR_sendEOP
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_sendEOP(CELLIDX idx, bool_t b_continue )
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	uint16_t magic;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+#ifdef RPC_DEBUG
+	syslog(LOG_INFO, "eTDR_sendEOP(b_continue=%d)", b_continue);
+#endif
+
+	if( b_continue )
+		magic = TDR_EOP_MAGIC1;
+	else
+		magic = TDR_EOP_MAGIC2;
+
+	/* EOP magic ã®éä¿¡ */
+	if( (ercd = eTDR_putInt16( idx, (int16_t)magic )) != E_OK )
+		return ercd;
+
+	return cChannel_flush(VAR_tmo);
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_receiveEOP
+ * name:         eTDR_receiveEOP
+ * global_name:  tTDR_eTDR_receiveEOP
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_receiveEOP(CELLIDX idx, bool_t b_continue)
+{
+	ER		ercd = E_OK, er2;
+	CELLCB	*p_cellcb;
+	uint16_t magic;
+
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+#ifdef RPC_DEBUG
+	syslog(LOG_INFO, "eTDR_receiveEOP(b_continue=%d)",b_continue);
+#endif
+/* mikan cChannel EOF get_* */
+/* mikan magic EOF */
+
+	if( (ercd=eTDR_getInt16( idx, (int16_t *)&magic )) == E_OK ){
+		if( (b_continue && magic == TDR_EOP_MAGIC1) || (!b_continue && magic == TDR_EOP_MAGIC2) ){
+		} else {
+			ercd = E_MAGIC;
+		}
+	}
+	er2 = cChannel_end_receive();
+	return ercd != E_OK ? ercd : er2;
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putInt8
+ * name:         eTDR_putInt8
+ * global_name:  tTDR_eTDR_putInt8
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putInt8(CELLIDX idx, int8_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putInt16
+ * name:         eTDR_putInt16
+ * global_name:  tTDR_eTDR_putInt16
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putInt16(CELLIDX idx, int16_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putInt32
+ * name:         eTDR_putInt32
+ * global_name:  tTDR_eTDR_putInt32
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putInt32(CELLIDX idx, int32_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putInt64
+ * name:         eTDR_putInt64
+ * global_name:  tTDR_eTDR_putInt64
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putInt64(CELLIDX idx, int64_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putInt128
+ * name:         eTDR_putInt128
+ * global_name:  tTDR_eTDR_putInt128
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putInt128(CELLIDX idx, int128_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getInt8
+ * name:         eTDR_getInt8
+ * global_name:  tTDR_eTDR_getInt8
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getInt8(CELLIDX idx, int8_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	 *p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getInt16
+ * name:         eTDR_getInt16
+ * global_name:  tTDR_eTDR_getInt16
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getInt16(CELLIDX idx, int16_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getInt32
+ * name:         eTDR_getInt32
+ * global_name:  tTDR_eTDR_getInt32
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getInt32(CELLIDX idx, int32_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getInt64
+ * name:         eTDR_getInt64
+ * global_name:  tTDR_eTDR_getInt64
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getInt64(CELLIDX idx, int64_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getInt128
+ * name:         eTDR_getInt128
+ * global_name:  tTDR_eTDR_getInt128
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getInt128(CELLIDX idx, int128_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putUInt8
+ * name:         eTDR_putUInt8
+ * global_name:  tTDR_eTDR_putUInt8
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putUInt8(CELLIDX idx, uint8_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putUInt16
+ * name:         eTDR_putUInt16
+ * global_name:  tTDR_eTDR_putUInt16
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putUInt16(CELLIDX idx, uint16_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putUInt32
+ * name:         eTDR_putUInt32
+ * global_name:  tTDR_eTDR_putUInt32
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putUInt32(CELLIDX idx, uint32_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putUInt64
+ * name:         eTDR_putUInt64
+ * global_name:  tTDR_eTDR_putUInt64
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putUInt64(CELLIDX idx, uint64_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putUInt128
+ * name:         eTDR_putUInt128
+ * global_name:  tTDR_eTDR_putUInt128
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putUInt128(CELLIDX idx, uint128_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getUInt8
+ * name:         eTDR_getUInt8
+ * global_name:  tTDR_eTDR_getUInt8
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getUInt8(CELLIDX idx, uint8_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getUInt16
+ * name:         eTDR_getUInt16
+ * global_name:  tTDR_eTDR_getUInt16
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getUInt16(CELLIDX idx, uint16_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getUInt32
+ * name:         eTDR_getUInt32
+ * global_name:  tTDR_eTDR_getUInt32
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getUInt32(CELLIDX idx, uint32_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getUInt64
+ * name:         eTDR_getUInt64
+ * global_name:  tTDR_eTDR_getUInt64
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getUInt64(CELLIDX idx, uint64_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getUInt128
+ * name:         eTDR_getUInt128
+ * global_name:  tTDR_eTDR_getUInt128
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getUInt128(CELLIDX idx, uint128_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putBool
+ * name:         eTDR_putBool
+ * global_name:  tNBOTDR_eTDR_putBool
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putBool(CELLIDX idx, bool_t in)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	eTDR_putUInt8(idx, (uint8_t)(in != 0) );
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getBool
+ * name:         eTDR_getBool
+ * global_name:  tNBOTDR_eTDR_getBool
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getBool(CELLIDX idx, bool_t* out)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	uint8_t	val;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	ercd = eTDR_getUInt8(idx, &val );
+	if( ercd != E_OK )
+		return ercd;
+	*out = (val != 0);
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putFloat32
+ * name:         eTDR_putFloat32
+ * global_name:  tTDR_eTDR_putFloat32
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putFloat32(CELLIDX idx, float32_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putDouble64
+ * name:         eTDR_putDouble64
+ * global_name:  tTDR_eTDR_putDouble64
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putDouble64(CELLIDX idx, double64_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getFloat32
+ * name:         eTDR_getFloat32
+ * global_name:  tTDR_eTDR_getFloat32
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getFloat32(CELLIDX idx, float32_t* out)
+{
+	ER_UINT		er_sz = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getDouble64
+ * name:         eTDR_getDouble64
+ * global_name:  tTDR_eTDR_getDouble64
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getDouble64(CELLIDX idx, double64_t* out)
+{
+	ER_UINT		er_sz = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putChar
+ * name:         eTDR_putChar
+ * global_name:  tTDR_eTDR_putChar
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putChar(CELLIDX idx, char_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getChar
+ * name:         eTDR_getChar
+ * global_name:  tTDR_eTDR_getChar
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getChar(CELLIDX idx, char_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putSChar
+ * name:         eTDR_putSChar
+ * global_name:  tTDR_eTDR_putSChar
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putSChar(CELLIDX idx, signed char in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putShort
+ * name:         eTDR_putShort
+ * global_name:  tTDR_eTDR_putShort
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putShort(CELLIDX idx, short_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putInt
+ * name:         eTDR_putInt
+ * global_name:  tTDR_eTDR_putInt
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putInt(CELLIDX idx, int_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putLong
+ * name:         eTDR_putLong
+ * global_name:  tTDR_eTDR_putLong
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putLong(CELLIDX idx, long_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getSChar
+ * name:         eTDR_getSChar
+ * global_name:  tTDR_eTDR_getSChar
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getSChar(CELLIDX idx, signed char* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getShort
+ * name:         eTDR_getShort
+ * global_name:  tTDR_eTDR_getShort
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getShort(CELLIDX idx, short* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getInt
+ * name:         eTDR_getInt
+ * global_name:  tTDR_eTDR_getInt
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getInt(CELLIDX idx, int_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getLong
+ * name:         eTDR_getLong
+ * global_name:  tTDR_eTDR_getLong
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getLong(CELLIDX idx, long_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putUChar
+ * name:         eTDR_putUChar
+ * global_name:  tTDR_eTDR_putUChar
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putUChar(CELLIDX idx, unsigned char in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putUShort
+ * name:         eTDR_putUShort
+ * global_name:  tTDR_eTDR_putUShort
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putUShort(CELLIDX idx, ushort_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putUInt
+ * name:         eTDR_putUInt
+ * global_name:  tTDR_eTDR_putUInt
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putUInt(CELLIDX idx, uint_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putULong
+ * name:         eTDR_putULong
+ * global_name:  tTDR_eTDR_putULong
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putULong(CELLIDX idx, ulong_t in)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&in, (int16_t)sizeof( in ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getUChar
+ * name:         eTDR_getUChar
+ * global_name:  tTDR_eTDR_getUChar
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getUChar(CELLIDX idx, unsigned char* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getUShort
+ * name:         eTDR_getUShort
+ * global_name:  tTDR_eTDR_getUShort
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getUShort(CELLIDX idx, unsigned short* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getUInt
+ * name:         eTDR_getUInt
+ * global_name:  tTDR_eTDR_getUInt
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getUInt(CELLIDX idx, uint_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getULong
+ * name:         eTDR_getULong
+ * global_name:  tTDR_eTDR_getULong
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getULong(CELLIDX idx, ulong_t* out)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)out, (int16_t)sizeof( *out ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *out ) ? E_OK : E_BOVR );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_putIntptr
+ * name:         eTDR_putIntptr
+ * global_name:  tTDR_eTDR_putIntptr
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_putIntptr(CELLIDX idx, const intptr_t ptr)
+{
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	return cChannel_send( (int8_t *)&ptr, (int16_t)sizeof( ptr ), VAR_tmo );
+}
+
+/* #[<ENTRY_FUNC>]# eTDR_getIntptr
+ * name:         eTDR_getIntptr
+ * global_name:  tTDR_eTDR_getIntptr
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+Inline ER
+eTDR_getIntptr(CELLIDX idx, intptr_t* ptr)
+{
+	ER_UINT	 er_sz;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	er_sz = cChannel_receive( (int8_t *)ptr, (int16_t)sizeof( *ptr ), VAR_tmo );
+	return  er_sz < 0 ? er_sz : ( er_sz == sizeof( *ptr ) ? E_OK : E_BOVR );
+}
+
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tTINETChannel.cdl
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tTINETChannel.cdl	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tTINETChannel.cdl	(revision 270)
@@ -0,0 +1,125 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+import_C( "netinet/in.h" );
+
+const	uint16_t	TINETIPV4_DEFAULT_PORT_NO  = 8931;
+
+signature sTINETClientOpenerIPV4 {
+	ER		open( [in]const T_IPV4EP *clientAddr, [in]TMO tmo );
+	ER		close( [in]TMO tmo );
+};
+
+signature sIPV4AcceptCheck {
+	bool_t	check( [in]const T_IPV4EP *clientAddr );
+};
+
+celltype tTINETClient {
+	entry	sChannel				eC0;
+	entry	sTINETClientOpenerIPV4	eOpener;
+	attr {
+		ID				cep_id = C_EXP( "$id$_CEPID" );
+		[omit]
+			uint16_t	recv_buf_size = C_EXP( "TCP_MSS" );
+		[omit]
+			uint16_t	send_buf_size = C_EXP( "TCP_MSS" );
+	};
+	FACTORY {
+		write( "$ct$_factory.h", "#include \"netinet/tcp.h\"\n" );
+		write( "$ct$_tecsgen.h", "#include \"tinet_cfg.h\"\n" );
+		write( "tinet_tecsgen.cfg", "#include \"$ct$_factory.h\"\n" );
+	};
+	factory {
+		write( "$ct$_factory.h", "int8_t $id$_recv_buf[%s];\n", recv_buf_size );
+		write( "$ct$_factory.h", "int8_t $id$_send_buf[%s];\n", send_buf_size );
+		write( "tinet_tecsgen.cfg", "TCP_CRE_CEP ($id$_CEPID, {\n"
+								"	0,\n"
+								"	$id$_send_buf,\n"
+								"	%s,\n"
+								"	$id$_recv_buf,\n"
+								"	%s,\n"
+								"	NULL \n"
+								"	} );\n",
+			   send_buf_size, recv_buf_size );
+	};
+};
+
+celltype tTINETServer {
+
+	entry	sChannel				eC1;
+	entry	sServerChannelOpener	eOpener;
+	[optional]
+		call  sIPV4AcceptCheck  cCheck;
+	attr {
+		ID				cep_id = C_EXP( "$id$_CEPID" );
+		ID				rep_id = C_EXP( "$id$_REPID" );
+		[omit]
+			int16_t		portNo  = TINETIPV4_DEFAULT_PORT_NO;
+		[omit]
+			uint16_t	recv_buf_size = C_EXP( "TCP_MSS" );
+		[omit]
+			uint16_t	send_buf_size = C_EXP( "TCP_MSS" );
+	};
+	FACTORY {
+		write( "$ct$_factory.h", "#include \"netinet/tcp.h\"\n" );
+		write( "$ct$_tecsgen.h", "#include \"tinet_cfg.h\"\n" );
+		write( "tinet_tecsgen.cfg", "#include \"$ct$_factory.h\"\n" );
+	};
+	factory {
+		write( "$ct$_factory.h", "int8_t $id$_recv_buf[%s];\n", recv_buf_size );
+		write( "$ct$_factory.h", "int8_t $id$_send_buf[%s];\n", send_buf_size );
+		write( "tinet_tecsgen.cfg", "TCP_CRE_REP ($id$_REPID,	{ 0, { IPV4_ADDRANY, %s } } );\n", portNo );
+		write( "tinet_tecsgen.cfg", "TCP_CRE_CEP ($id$_CEPID, {0, $id$_send_buf, %s, $id$_recv_buf, %s, NULL } );\n",
+				   send_buf_size, recv_buf_size );
+	};
+};
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tTINETClient.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tTINETClient.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tTINETClient.c	(revision 270)
@@ -0,0 +1,279 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * å±æ§ã¢ã¯ã»ã¹ãã¯ã­ #_CAAM_#
+ * cep_id           ID               ATTR_cep_id     
+ *
+ * #[</PREAMBLE>]# */
+
+#include "tTINETClient_tecsgen.h"
+#include "tTINETClient_factory.h"
+
+#include <string.h>
+
+#include <netinet/in.h>
+#include <netinet/in_itron.h>
+#include <netinet/tcp.h>
+
+#ifndef E_OK
+#define	E_OK	0		/* æ­£å¸¸çµäº */
+#define	E_ID	(-18)	/* ä¸æ­£IDçªå· */
+#endif
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eC0
+ * entry port: eC0
+ * signature:  sChannel
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eC0_send
+ * name:         eC0_send
+ * global_name:  tTINETClient_eC0_send
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eC0_send(CELLIDX idx, const int8_t* buf, int16_t size, TMO tmo)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	int     sz;
+
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã */
+#ifdef DEBUG
+	syslog( LOG_INFO, "tTINETServer: send" );
+	{
+		int i;
+		for( i = 0; i < size; i++ ){
+			printf( "%02X ", (unsigned char)buf[i] );
+			if( i % 8 == 7 )
+				putchar( '\n' );
+		}
+		putchar( '\n' );
+	}
+#endif
+	while(size>0){
+		if((sz=tcp_snd_dat( ATTR_cep_id, (intptr_t *)buf, (size_t)size, tmo )) < 0 ){
+			ercd = sz;
+			break;
+		}
+		else{
+			size -= sz;
+		}
+	}
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eC0_flush
+ * name:         eC0_flush
+ * global_name:  tTINETClient_eC0_flush
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eC0_flush(CELLIDX idx, TMO tmo)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã */
+	/* write ã¯ãããã¡ãªã³ã°ãªããªã®ã§ flush ããªã */
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eC0_receive
+ * name:         eC0_receive
+ * global_name:  tTINETClient_eC0_receive
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER_UINT
+eC0_receive(CELLIDX idx, int8_t* buf, int16_t size, TMO tmo)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã */
+	ercd = tcp_rcv_dat( ATTR_cep_id, buf, (size_t)size, tmo );
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eC0_end_receive
+ * name:         eC0_end_receive
+ * global_name:  tTINETClient_eC0_end_receive
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eC0_end_receive(CELLIDX idx)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eC0_reset
+ * name:         eC0_reset
+ * global_name:  tTINETClient_eC0_reset
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eC0_reset(CELLIDX idx)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã */
+
+	return(ercd);
+}
+
+/* #[<ENTRY_PORT>]# eOpener
+ * entry port: eOpener
+ * signature:  sTINETClientOpenerIPV4
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eOpener_open
+ * name:         eOpener_open
+ * global_name:  tTINETClient_eOpener_open
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eOpener_open(CELLIDX idx, const T_IPV4EP* clientAddr, TMO tmo)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	puts("opening");
+	ercd=tcp_con_cep(ATTR_cep_id, NADR, clientAddr, tmo);
+	if(ercd<0){
+		puts("failed");
+		syslog( LOG_INFO, "TINETClient: connect failed");
+	}
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eOpener_close
+ * name:         eOpener_close
+ * global_name:  tTINETClient_eOpener_close
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eOpener_close(CELLIDX idx, TMO tmo)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	ercd = tcp_cls_cep( ATTR_cep_id, 0 );       /* mikan ã¨ã©ã¼å¦ç */
+
+	return(ercd);
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tTINETServer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tTINETServer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tTINETServer.c	(revision 270)
@@ -0,0 +1,290 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * å±æ§ã¢ã¯ã»ã¹ãã¯ã­ #_CAAM_#
+ * cep_id           ID               ATTR_cep_id     
+ * rep_id           ID               ATTR_rep_id     
+ *
+ * å¼ã³å£é¢æ° #_TCPF_#
+ * call port : cCheck  signature: sIPV4AcceptCheck context: task
+ *   bool_t         cCheck_check( const T_IPV4EP* clientAddr );
+ *
+ * #[</PREAMBLE>]# */
+
+#include "tTINETServer_tecsgen.h"
+#include "tTINETServer_factory.h"
+
+#include <string.h>
+
+#include <netinet/in.h>
+#include <netinet/in_itron.h>
+#include <netinet/tcp.h>
+
+
+#ifndef E_OK
+#define	E_OK	0		/* æ­£å¸¸çµäº */
+#define	E_ID	(-18)	/* ä¸æ­£IDçªå· */
+#endif
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eC1
+ * entry port: eC1
+ * signature:  sChannel
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eC1_send
+ * name:         eC1_send
+ * global_name:  tTINETServer_eC1_send
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eC1_send(CELLIDX idx, const int8_t* buf, int16_t size, TMO tmo)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	int     sz;
+
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã */
+#ifdef DEBUG
+	syslog( LOG_INFO, "tTINETServer: send" );
+	{
+		int i;
+		for( i = 0; i < size; i++ ){
+			printf( "%02X ", (unsigned char)buf[i] );
+			if( i % 8 == 7 )
+				putchar( '\n' );
+		}
+		putchar( '\n' );
+	}
+#endif
+	while(size>0){
+		if((sz=tcp_snd_dat( ATTR_cep_id, buf, (size_t)size, tmo )) < 0 ){
+			ercd = sz;
+			break;
+		}
+		else{
+			size -= sz;
+		}
+	}
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eC1_flush
+ * name:         eC1_flush
+ * global_name:  tTINETServer_eC1_flush
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eC1_flush(CELLIDX idx, TMO tmo)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã */
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eC1_receive
+ * name:         eC1_receive
+ * global_name:  tTINETServer_eC1_receive
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER_UINT
+eC1_receive(CELLIDX idx, int8_t* buf, int16_t size, TMO tmo)
+{
+	ER		ercd = E_OK;
+	ER_UINT sz;
+	CELLCB	*p_cellcb;
+
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã */
+	ercd = tcp_rcv_dat( ATTR_cep_id, buf, (size_t)size, tmo );
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eC1_end_receive
+ * name:         eC1_end_receive
+ * global_name:  tTINETServer_eC1_end_receive
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eC1_end_receive(CELLIDX idx)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã */
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eC1_reset
+ * name:         eC1_reset
+ * global_name:  tTINETServer_eC1_reset
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eC1_reset(CELLIDX idx)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã */
+	syslog( LOG_INFO, "tTINETServer: reset" );
+
+	return(ercd);
+}
+
+/* #[<ENTRY_PORT>]# eOpener
+ * entry port: eOpener
+ * signature:  sServerChannelOpener
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eOpener_open
+ * name:         eOpener_open
+ * global_name:  tTINETServer_eOpener_open
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eOpener_open(CELLIDX idx)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	T_IPV4EP		dst;
+
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	syslog( LOG_INFO, "tTINETServer: open" );
+	if( (ercd=tcp_acp_cep(ATTR_cep_id, ATTR_rep_id, &dst, TMO_FEVR)) != E_OK ){
+		syslog( LOG_INFO, "tTINETServer: accept failed" );
+		return ercd;
+	}
+
+	syslog( LOG_INFO, "tTINETServer: accepted" );
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eOpener_close
+ * name:         eOpener_close
+ * global_name:  tTINETServer_eOpener_close
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eOpener_close(CELLIDX idx)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	}
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	syslog( LOG_INFO, "tTINETServer: close" );
+	ercd = tcp_cls_cep( ATTR_cep_id, TMO_FEVR );
+
+	return(ercd);
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tecs_rpc.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tecs_rpc.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/rpc/tecs_rpc.h	(revision 270)
@@ -0,0 +1,82 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+#ifndef  tecs_rpc_h__
+#define  tecs_rpc_h__
+
+#include "tecs.h"
+
+#ifndef E_RPC
+
+#define E_RPC    (-68)
+
+/* minor error code */
+#define E_RESET  (-101)
+#define E_MAGIC  (-102)
+
+#endif /* E_RPC */
+
+
+/*
+ * marshaler, unmarshaler å
+ã®ç¶æ
+å¤ãè¨­å®ãããã¯ã­
+ * val ã¯ sRPCErrorHandler.cdl ã§å®ç¾©ãã
+ */
+#if ! defined( NO_NEED_RPC_STATE ) && ! defined( NO_NEED_RPC_ERROR_HANDLER )
+#define SET_RPC_STATE( state, val )		(state)=(val)
+#else
+#define SET_RPC_STATE( state, val )
+#endif /* NO_NEED_RPC_STATE */
+
+#endif /* tecs_rpc_h__ */
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/tecs.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/tecs.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/tecs.h	(revision 270)
@@ -0,0 +1,79 @@
+/*
+ *  TECS Generator
+ *      Generator for TOPPERS Embedded Component System
+ *  
+ *   Copyright (C) 2008-2013 by TOPPERS Project
+ *--
+ *   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *       ã¨ï¼
+ *     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *         å ±åãããã¨ï¼
+ *   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *       å
+è²¬ãããã¨ï¼
+ *  
+ *   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *   ã®è²¬ä»»ãè² ããªãï¼
+ *  
+ *   $Id$
+ */
+
+#ifndef  tecs_h__
+#define  tecs_h__
+
+#include "t_stddef.h"
+
+#ifndef INT128_DEFINED
+#define INT128_DEFINED
+typedef struct tag_int128_t { int64_t  hi; int64_t  lo; } int128_t;
+typedef struct tag_uint128_t { int64_t  hi; int64_t  lo; } uint128_t;
+#endif /* end INT128_T_DEFINED */
+
+#ifndef SHORT_T_DEFINED
+#define SHORT_T_DEFINED
+typedef short short_t;
+typedef unsigned short ushort_t;
+#endif /* end SHORT_T_DEFINED */
+
+#ifndef CHAR_T_DEFINED				/* t_stddef.h ASP 1.7.0 ä»¥åã§ã¯éè¤ãã */
+#define CHAR_T_DEFINED
+typedef char  char_t;				/* signed, unsigned æªå® */
+#endif /* end CHAR_T_DEFINED */
+
+typedef signed char		schar_t;	/* signed */
+typedef unsigned char	uchar_t;	/* unsigned */
+
+#endif /* end tecs_h__ */
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/tecs.xsd
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/tecs.xsd	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/tecs.xsd	(revision 270)
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsd:schema
+    xmlns="http://www.toppers.jp/tecs.html"
+    targetNamespace="http://www.toppers.jp/tecs.html"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
+
+  <!-- 1st element -->
+  <xsd:element name="GUI_Tool">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element minOccurs="0" maxOccurs="unbounded" ref="import" />
+          <xsd:element minOccurs="0" maxOccurs="unbounded" ref="namespace" />
+          <xsd:element minOccurs="0" maxOccurs="unbounded" ref="signature" />
+          <xsd:element minOccurs="0" maxOccurs="unbounded" ref="celltype"  />
+          <xsd:element minOccurs="0" maxOccurs="unbounded" ref="cell" />
+          <xsd:element minOccurs="0" maxOccurs="unbounded" ref="region" />
+        </xsd:choice>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <!--
+    * All elements MUST BE TOP LEVEL to assign global name.
+	* In XML file, all names are treated as global name.
+    * Note: inner elements have local name.
+	 -->
+
+  <!-- elements of statement -->
+  <xsd:element name="import"    type="importType" />
+  <xsd:element name="signature" type="signatureType" />
+  <xsd:element name="celltype"  type="celltypeType" />
+  <xsd:element name="cell"      type="cellType" />
+  <xsd:element name="namespace" type="namespaceType" />
+  <xsd:element name="region"    type="regionType" />
+
+  <!-- elements of name, type, expression(rhs, initializer, subscript)  -->
+  <xsd:element name="name"      type="xsd:string" />
+  <xsd:element name="signame"   type="xsd:string" />
+  <xsd:element name="rettype"   type="xsd:string" />
+  <xsd:element name="type"      type="xsd:string" />
+  <xsd:element name="subscript" type="xsd:string" />
+  <xsd:element name="rhs"       type="xsd:string" />
+  <xsd:element name="initializer" type="xsd:string" />
+  <xsd:element name="choiceElement" type="xsd:string" />
+  <xsd:element name="composite" />                       <!-- treat composite as celltype with 'composite' specifier -->
+  <xsd:element name="singleton" />
+  <xsd:element name="active" />
+
+  <!-- elements for signature -->
+  <xsd:element name="param">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element ref="name"/>
+        <xsd:element ref="type"/>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="func">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element ref="name"/>
+        <xsd:element ref="rettype" />
+        <xsd:element minOccurs="0" maxOccurs="unbounded" ref="param" />
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <!-- elements for celltype -->
+  <xsd:element name="attr">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element ref="name"/>
+        <xsd:element ref="type" />
+        <xsd:element minOccurs="0" ref="initializer" />
+        <xsd:element minOccurs="0" maxOccurs="1" ref="choice" />
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="choice">
+    <xsd:complexType>
+      <xsd:sequence>
+      <xsd:element minOccurs="1" maxOccurs="unbounded" ref="choiceElement"/>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="call">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element ref="name"/>
+        <xsd:element ref="signame" />
+        <xsd:element minOccurs="0" ref="subscript" />
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="entry">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element ref="name"/>
+        <xsd:element ref="signame" />
+        <xsd:element minOccurs="0" ref="subscript" />
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <!-- elements for cell -->
+  <xsd:element name="attr_join">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element ref="name"/>
+        <xsd:element ref="rhs" />
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="call_join">
+    <xsd:complexType>
+     <xsd:sequence>
+        <xsd:element ref="name"/>
+        <xsd:element minOccurs="0" ref="subscript" />
+        <xsd:element ref="rhs" />
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <!-- ***** complex types ***** -->
+  <xsd:complexType name="signatureType">
+    <xsd:sequence>
+      <xsd:element ref="name"/>
+      <xsd:element minOccurs="1" maxOccurs="unbounded" ref="func" />
+    </xsd:sequence>
+  </xsd:complexType>
+
+  <xsd:complexType name="celltypeType">
+    <xsd:sequence>
+      <xsd:choice maxOccurs="unbounded">
+        <xsd:element ref="name"/>
+        <xsd:element maxOccurs="1" ref="composite" />
+        <xsd:element maxOccurs="1" ref="singleton" />
+        <xsd:element maxOccurs="1" ref="active" />
+        <xsd:element maxOccurs="unbounded" ref="attr" />
+        <xsd:element maxOccurs="unbounded" ref="call" />
+        <xsd:element maxOccurs="unbounded" ref="entry" />
+      </xsd:choice>
+    </xsd:sequence>
+  </xsd:complexType>
+
+  <xsd:complexType name="cellType">
+    <xsd:sequence>
+      <xsd:choice maxOccurs="unbounded">
+        <xsd:element ref="name"/>
+        <xsd:element maxOccurs="unbounded" ref="attr_join" />
+        <xsd:element maxOccurs="unbounded" ref="call_join" />
+      </xsd:choice>
+    </xsd:sequence>
+  </xsd:complexType>
+
+  <xsd:complexType name="namespaceType">
+    <xsd:sequence maxOccurs="unbounded" >
+      <xsd:element ref="name"/>
+      <xsd:element minOccurs="0" maxOccurs="unbounded" ref="signature" />
+      <xsd:element minOccurs="0" maxOccurs="unbounded" ref="celltype" />
+      <xsd:element minOccurs="0" maxOccurs="unbounded" ref="namespace" />
+    </xsd:sequence>
+  </xsd:complexType>
+
+  <xsd:complexType name="regionType">
+    <xsd:sequence maxOccurs="unbounded" >
+      <xsd:element ref="name"/>
+      <xsd:element minOccurs="0" maxOccurs="unbounded" ref="cell" />
+      <xsd:element minOccurs="0" maxOccurs="unbounded" ref="import" />  <!-- inner: cell, region only -->
+      <xsd:element minOccurs="0" maxOccurs="unbounded" ref="region" />
+    </xsd:sequence>
+  </xsd:complexType>
+
+  <xsd:complexType name="importType">
+  	<xsd:sequence>
+      <xsd:element minOccurs="0" maxOccurs="unbounded" ref="import" />
+      <xsd:element minOccurs="0" maxOccurs="unbounded" ref="signature" />
+      <xsd:element minOccurs="0" maxOccurs="unbounded" ref="celltype"  />
+      <xsd:element minOccurs="0" maxOccurs="unbounded" ref="cell" />
+      <xsd:element minOccurs="0" maxOccurs="unbounded" ref="region" />
+    </xsd:sequence>
+    <xsd:attribute name="path" type="xsd:string" use="required" />
+  </xsd:complexType>
+
+</xsd:schema>
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsgen
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsgen	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsgen	(revision 270)
@@ -0,0 +1,58 @@
+#! /bin/sh
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2013 by TOPPERS Project
+#
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: tecsgen 2027 2014-01-20 08:36:17Z okuma-top $
+
+#ruby -w $TECSPATH/../tecsgen/tecsgen.rb "$@"
+tecsgen.rb "$@"
+exit $?
+
+# ç´æ¥ tecsgen.rb ãå¼åºãã±ã¼ã¹ãããããããããã®ã¹ã¯ãªããã§å¦çãè¡ãã¹ãã§ãªã
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsgen.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsgen.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsgen.rb	(revision 270)
@@ -0,0 +1,634 @@
+#!/usr/bin/env ruby
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2016 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: tecsgen.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+#= tecsgen  : TECS ã®ã¸ã§ãã¬ã¼ã¿
+#
+#Authors::    ç³å·ãæä¹(HRP2Plugin)
+#Authors::    åããæ(åççµåä»æ§)
+#Authors::    æ²³ç°ãæºæ(NotifierPlugin)
+#Authors::    é«ç°ãåºç« (ASP3 ã¸ã® TECS çµè¾¼ã¿)
+#Authors::    é«æ¨ãä¿¡å°(ã©ã³ã¿ã¤ã ããã)
+#Authors::    æç¬ãæç¾(TECS flow å®è£
+)
+#Authors::    éµé£¼ãæ¬å¹¸(ATK1Plugin)
+#Authors::    å¤§å±±ãåå¸(ã¸ã§ãã¬ã¼ã¿å®è£
+, RPCPlugin, TracePlugin, MrubyBridgePlugin)
+#Authors::    å±±æ¬ãå°ä¹(ã¸ã§ãã¬ã¼ã¿åæãã­ãã¿ã¤ãå®è£
+)
+#Authors::    å°åãéé(ãã¹ãã³ã¼ãã®ä¸é¨)
+#Authors::    å®ç©ãåä¹(ASP+TECS, EV3RT+TECS, mruby on TECSç­å®è£
+)
+#  Authors list is in i-ro-ha order.
+#Version::   see version.rb
+$Copyright = "Copyright(c) 2008-2016, TOPPERS project. All rights reserved."
+$License   = "TOPPERS License"
+
+# This doesn't work as expected in exerb version (Ruby 1.8.7?)
+$tecsgen_base_path = File.dirname( File.expand_path __FILE__ )
+
+
+###
+#= Array  initializer ã® '{', '}' ã§å²ã¾ããå ´å
+# mikan AggregateInitializer ãªã©ãã¯ã©ã¹ãå¤æ´ãã¹ãã§ãã
+class Array
+  #=== CDL ã®æå­åãçæãã
+  def to_CDL_str
+    str = '{ '
+    delim = ''
+    self.each{ |v|
+      str += delim + v.to_CDL_str
+      delim = ', '
+    }
+    str += ' }'
+    return str
+  end
+
+  def show_tree( indent )
+    indent.times{ print "  " }
+    print( "Array\n" )
+    self.each{ |m|
+      m.show_tree( indent+1 )
+    }
+  end
+end
+
+#=== RUBY ã©ã¤ãã©ãªãã­ã¼ããã
+#
+# -L, $RUBYLIB, ã·ã¹ãã (/usr/lib/rub..ãªã©) ã®é ã«ãµã¼ããè¡ããã
+# exerb å¯¾å¿ã®ãããä¸è¨ãã¹ã«ãã¡ã¤ã«ãè¦ã¤ãããªãå ´å require ãå®è¡ãã¦ã¿ã
+#
+# ãã©ã°ã¤ã³ã®å ´åã¯ b_fatal = false ãæå®ããã¡ã¤ã«ããªãã¦ãã¨ã©ã¼åºåå¾ãå¦çç¶è¡
+# b_fatal = false ã®å ´å tecslib/core ããµã¼ããã¹ã«è¿½å ããã
+#RETURN::Bool   : true=æåã false=å¤±æ   å¤±æããå ´åãGenerator.error ã¯å¼ã³å
+ã§åºåãã
+def require_tecsgen_lib( fname, b_fatal = true )
+  dbgPrint( "require_lib: #{fname}\n")
+  set_kcode $KCODE_TECSGEN
+  begin  
+    b_require = false
+    b_exception = false
+
+    # -L ã $RUBYLIB ã§æå®ããããã¹ããã³ã·ã¹ãã ã®ãã¹ãããµã¼ã
+    #   exerb ã§ã¯ $LOAD_PATH ã¯ ["."] ã®ã¿å
+¥ã£ã¦ããããã 
+    ($library_path+$LOAD_PATH).each{ |path|
+      [ "", "tecslib/plugin/" ].each { |lp|
+        lib = File.expand_path( path ) + '/' + lp + fname
+        
+        if File.exist? lib then  # ãã¡ã¤ã«å­å¦ã¨ä»ã®ã¨ã©ã¼ãåºå¥ããããå­å¨ç¢ºèªããã
+          begin
+            require( lib )
+            b_require = true
+          rescue Exception => evar
+            b_exception = true
+            print_exception( evar )
+          end
+          break
+        end
+      }
+      if b_require then
+        break
+      end
+    }
+
+    if b_require == false && b_exception == false then
+      # exerb å¯¾å¿ "." ããµã¼ããã¹ã®æåã«å ãã
+      #   "tecslib/" ã¯ RPCPlugin.rb, TracePlugin.rb ã®ããã«ç¨æãã¦ãã
+      #   RPCPlugin.rb, TracePlugin.rb ã tecslib ä¸ã§ãªããã°ä¸è¦ã«ãªããããã®ããã«ãã¦ãã
+      ["","tecslib/plugin/"].each{ |lp|
+        path = lp + fname
+        begin
+          require path
+          return true
+        rescue LoadError => e
+          # p "LoadError to load #{fname}"
+          # 2015.12.18 exerb çã§ãã©ã°ã¤ã³ã®ã­ã¼ãã§ã¨ã©ã¼ãåºãã®ã§ãç¡è¦ãã. ããããæããã¨ã©ã¼ã¯åºã¦ãã
+          # print_exception( e )
+        rescue Exception => e
+          b_exception = true
+          # ææ³ã¨ã©ã¼ãªã©ãçºç
+          print_exception( e )
+          break
+        end
+      }
+    end
+
+    if b_require == false then
+      # è¦ã¤ãããªãã£ã
+      if b_exception == false then
+        STDERR << "tecsgen: Fail to load #{fname}. Check $RUBYLIB environment variable or -L option\n"
+      end
+      # tecsgen ãæ§æãããã¡ã¤ã«ã®å ´åã¯ä¸­æ­¢ãã
+      if b_fatal then
+        STDERR << "tecsgen: Exit because of unrecoverble error\n"
+        exit 1
+      end
+      return false
+    end
+    return true
+  ensure
+    # $KCODE ã CDL ã®æå­ã³ã¼ãã«æ»ãã¦ãã
+    set_kcode $KCODE_CDL
+  end
+end
+
+#=== ä¾å¤ã®è¡¨ç¤º
+#evar:: Exception
+def print_exception( evar )
+# ããã¹ã¿ãã¯ãã¬ã¼ã¹ãåºãã¾ã§ãæéãããããããªãã°ãæ¬¡ãã³ã¡ã³ãã¢ã¦ããã¦ã¿ãã¹ã
+  print "*** Begin Ruby exception message ***\n"
+  puts( evar.to_s )
+
+  if $debug then
+    puts "#### stack trace ####"
+    pp evar.backtrace
+  end
+  print "*** End Ruby exception message ***\n"
+end
+
+def dbgPrint( str )
+  if $debug then
+    print str
+  end
+end
+
+def dbgPrintf( *param )
+  if $debug then
+    printf *param
+  end
+end
+
+#=== ã¨ã©ã¼ããã³è­¦åã®ã¬ãã¼ã
+def print_report
+  msg = nil
+
+  if Generator.get_n_error != 0 then
+    msg = "#{Generator.get_n_error} error"
+    msg = "#{msg}s" if Generator.get_n_error >= 2
+  end
+
+  if Generator.get_n_warning != 0 then
+    msg = "#{msg}  " if msg
+    msg = "#{msg}#{Generator.get_n_warning} warning"
+    msg = "#{msg}s" if Generator.get_n_warning >= 2
+  end
+
+  puts msg if msg
+end
+
+#=== $KCODE ãè¨­å®
+def set_kcode kcode
+  if ! $b_no_kcode then
+    $KCODE = kcode
+  end
+end
+#----- class TECSGEN -------#
+class TECSGEN
+
+  @@current_tecsgen = nil
+
+  def self.init( addtional_option_parser = nil )
+    initialize_global_var
+    analyze_option addtional_option_parser
+    load_modules
+    setup
+        
+    dbgPrint  "tecspath: #{$tecsgen_base_path}, __FILE__=#{__FILE__}\n"
+    dbgPrint  "ARGV(remained): #{ARGV}, argments=#{$arguments}\n"
+  end
+
+  #----- initialize -------#
+  def initialize
+    @cell_list = nil
+    @cell_list2 = nil
+    @celltype_list = nil
+    @root_namespace = nil
+
+    #--- obsolete ---#   replaced to TOOL_INFO
+    @cell_location_list = []
+    @join_location_list = []
+  end
+
+  def run1
+    @@current_tecsgen = self
+
+    syntax_analisys ARGV
+    semantics_analisys_1
+    semantics_analisys_2
+
+    @celltype_list = Celltype.get_celltype_list
+    @cell_list = Cell.get_cell_list
+    @cell_list2 = Cell.get_cell_list2
+
+    @@current_tecsgen = nil
+  end
+
+  def run2
+    @@current_tecsgen = self
+
+    optimize_and_generate
+    finalize
+
+    @@current_tecsgen = nil
+  end
+
+  #-----  initialize_global_var -----#
+  def self.initialize_global_var
+
+    require 'optparse'
+    #2.0 require 'runit/assert.rb'
+    require 'kconv'
+    $b_no_kcode = RUBY_VERSION >= "1.9.0" ? true : false
+	       # Use Ruby 1.9 M17N code (use Ruby 1.8 code if false).
+    if ! $b_no_kcode then
+      require 'jcode'
+    end
+    require 'pp'
+    # include RUNIT::Assert
+
+    ### ã°ã­ã¼ãã«å¤æ°å®ç¾© ###
+
+    # ã³ãã³ãã©ã¤ã³å¼æ°ã (Makefile.templ ã¸åºå)
+    $arguments = ""
+    ARGV.each { |a| $arguments += " " + a }
+
+    $unopt     = false     # bool:   disable optimizing
+    $gen_base  = "gen"     # string: folder path to place generated files
+    $gen       = $gen_base # string: folder path to place generated files
+    $generate_all_template = false   # bool:   generarete template files for all celltypes (if non cell exist or system celltypes)
+    $generate_no_template = false    # bool:   generarete no template file (neither celltype code nor Makefile)
+    $idx_is_id = false     # bool:   all components are idx_is_id
+    $unique_id = false     # bool:   assign unique id to each cell (otherwise begin from 1 for each celltype)
+    $debug     = false     # bool:   tecsgen debug message
+    $dryrun    = false     # bool:   dryrun mode: syntax is checked, but not generate any files
+    $show_tree = false     # bool:   show parsing tree
+    $verbose   = false     # bool:   verbose mode: show some messages
+    $yydebug   = false     # bool:   yydebug: parser debug mode (need bnf-deb.tab.rb)
+    $run_dir   = Dir.pwd   # string: tecsgen/tecscde start up directory
+    $base_dir  = {  }      # string=>bool: base dir for import_path (key:base_dir, val:actually used or specified directly)
+    $import_path = [ "." ] # string array : import/import_C path
+    $import_path_opt = []  # [String]
+    $library_path = [ $tecsgen_base_path ] # string array : path to dir where tecsgen.rb placed
+    $define    = [ ]       # string array : define
+    $ram_initializer = false # bool: generate ram initializer
+    $region_list = {}      #string array : region path which is generated
+    $generating_region = nil # Region:  Region to optimisze & generate code   # ã³ãã³ãã©ã¤ã³ãªãã·ã§ã³ã§ã¯ãªã
+		 #           Cell#is_generate? ã«ã¦åç
+§ããã
+    $unit_test = false     # bool:   unit test verification
+    $kcode     = nil       # nil | String: Kanji code type "euc"|"sjis"|"none"|"utf8"
+    $force_overwrite = false # bool:  force overwrite all files if file contents not differ
+    $no_banner = false     # bool:   not print banner
+    $print_version = false # bool:   print version
+    $target    = "tecs"    # String: target name, ARGV[0] ããåè¨­å®ããï¼"tecs" ã¯ä»®ã®ã¿ã¼ã²ãã)
+    $no_default_import_path = false  # bool: no default import path
+    $c_suffix  = "c"       # suffix for C progorams (for C++ source)
+    $h_suffix  = "h"       # suffix for C progoram headers (for C++ source)
+
+    if ENV['TECSGEN_DEFAULT_RAM'] then
+      rom_ram_defalult = "ram"
+    else
+      rom_ram_defalult = "rom"
+    end
+    if rom_ram_defalult == "rom" then
+      $rom       = true      # bool:   ROM support : generate CB separately
+    else
+      $rom       = false     # bool:   ROM support : generate CB separately
+    end
+    $b_cpp_specified = false
+    if $cpp == nil then
+      $cpp       = "gcc -E -DTECSGEN"
+    end
+    if ENV[ 'TECS_CPP' ]then
+      $cpp = ENV[ 'TECS_CPP' ]
+      $b_cpp_specified = true
+    end
+    if ENV[ 'TECSPATH' ] then
+      $tecspath = ENV[ 'TECSPATH' ]
+    else
+      $tecspath = "#{$tecsgen_base_path}/tecs"
+    end
+
+    # # æå­ã³ã¼ãã®è¨­å®
+    if $IN_EXERB then
+      # KCODE_CDL, $KCONV_CDL ãä»®ã«è¨­å®ãã (tecs_lang.rb ã§ããã«åè¨­å®ããã)
+      $KCODE_CDL = "SJIS"          # string: "EUC" | "SJIS" | "NONE" | "UTF8"
+      $KCONV_CDL = Kconv::SJIS     # const: NONE ã«ã¯ ASCII ãå¯¾å¿ããã
+    else
+      $KCODE_CDL = "EUC"           # string: "EUC" | "SJIS" | "NONE" | "UTF8"
+      $KCONV_CDL = Kconv::EUC      # const: NONE ã«ã¯ ASCII ãå¯¾å¿ããã
+    end
+    # $KCODE_TECSGEN, $KCONV_TECSGEN ãä»®ã«è¨­å®ãã (tecs_lang.rb ã§ããã«åè¨­å®ããã)
+    $KCODE_TECSGEN = "UTF8"      # string: "EUC"  ãã®ãã¡ã¤ã«ã®æå­ã³ã¼ãï¼ãªãã·ã§ã³ã§ã¯ãªãå®æ°ï¼
+    $KCONV_TECSGEN = Kconv::UTF8 # const: 
+    set_kcode( $KCODE_TECSGEN )  # ãã®ãã¡ã¤ã«ã®æå­ã³ã¼ããè¨­å®
+
+  end # initialize_global_var
+
+  def self.analyze_option( additional_option_parser )
+
+    ###  tecsgen ã³ãã³ããªãã·ã§ã³è§£æ  ###
+    ARGV.options {|parser|
+      parser.banner = "Usage: tecsgen [options] files"
+      parser.on('-D', '--define=def', 'define cpp symbol for import_C') { |define|
+        $define << define
+      }
+      parser.on('-G', '--generate-region=path', 'generate region') { |path|
+        if path =~ /^::/ then
+          gen_path = path
+        else
+          gen_path = "::" + path
+        end
+        $region_list[ gen_path ] = true
+      }
+      parser.on('-I', '--import-path=path', 'imoprt/import_C path') { |path|
+        $import_path << path
+        $import_path_opt << path
+      }
+      parser.on('-L', '--library-path=path', 'path to dir where tecsgen.rb (obsolete, unnecessary to specify -L, those passes are gotten from tecsgen.rb') { |path|
+        $library_path << path
+      }
+      parser.on('-R', '--RAM-initializer',   'generate RAM initializer. INITIALIZE_TECS() must be called before running any TECS code.' ){
+        $ram_initializer = true
+      }
+      parser.on('-U', '--unoptimize', 'unoptimize') {
+        $unopt = true
+      }
+      parser.on('-c', '--cpp=cpp_cmd', 'C pre-processor command used import_C (default: gcc -E -DTECSGEN), you can also specify by environment variable TECS_CPP' ){
+        |arg|
+        $cpp = arg
+        $b_cpp_specified = true
+      }
+      parser.on('-d', '--dryrun',      'dryrun' ){
+        $dryrun = true
+      }
+      parser.on('-f', '--force-overwrite', 'force overwrite all files') {
+        $force_overwrite = true
+      }
+      parser.on('-g', '--gen=dir',     'generate dir') { |dir|
+        $gen = $gen_base = dir
+      }
+      parser.on('-i', '--idx_is_id',   'set idx_is_id to all celltypes') {
+        $idx_is_id = true
+      }
+      #  parser.on('-k', '--kcode=code',  'set kanji code: euc|sjis|none|utf8, none is default') { |code|
+      parser.on('-k', '--kcode=code',  "set kanji code: euc|sjis|none|utf8") { |code|
+        $kcode = code
+      }
+      #  old_mode ã¯ V1.0.C.22 ã§å»æ­¢
+      #  parser.on('-o', '--old-mode',    'old mode' ){
+      #    $old_mode = true
+      #  }
+      parser.on('-r', '--ram',     'RAM only' ){
+        $rom = false
+      }
+      parser.on('-s', '--show-tree',   'show parsing tree' ){
+        $show_tree = true
+      }
+      parser.on('-t', '--generator-debug', 'generator debug' ){
+        $debug = true
+        $verbose = true
+      }
+      parser.on('-u', '--unique-id', 'assign unique id for each cell' ){
+        $unique_id = true
+      }
+      parser.on('-v', '--verbose',     'verbose mode' ){
+        $verbose = true
+      }
+      parser.on('-y', '--yydebug',     'yydebug' ){
+        $yydebug = true
+      }
+      parser.on( '--no-banner', 'not display banner') {
+        $no_banner = true
+      }
+      parser.on( '--version', 'print version') {
+        $print_version = true
+      }
+      parser.on( '--unit-test', 'unit verification (test tecsgen itself)') {
+        $unit_test = true
+      }
+      parser.on( '--generate-all-template', 'generate all celltypes\' templates') {
+        $generate_all_template = true
+      }
+      parser.on( '--generate-no-template',  'generate no template') {
+        $generate_no_template = true
+      }
+      parser.on( '--no-default-import-path', 'no default import path' ){
+        $no_default_import_path = true
+      }
+      parser.on( '--c-suffix=c', 'C program suffix (default: c)' ){
+        | suffix |
+        $c_suffix = suffix
+      }
+      parser.on( '--h-suffix=h', 'C program header suffix (default: h)' ){
+        | suffix |
+        $h_suffix = suffix
+      }
+      #  parser.on(  '--include_path_opt_format',  'cpp include path option format, default: "-I %s"' ){
+      #  }
+      parser.version = #{$version}
+      parser.release = nil
+      if additional_option_parser
+        additional_option_parser.call( parser )
+      end
+      parser.parse!
+    }
+
+    if ARGV.empty? && ! $print_version && ! $unit_test
+      ARGV.options{|parser|
+        puts parser.help
+        exit 1
+      }
+    end
+
+  end # analyze_option
+
+  def self.load_modules
+    ### tecsgen ã¢ã¸ã¥ã¼ã«ã®ã­ã¼ã ####
+    # -L ã§ãã¹æå®å¯è½ã¨ãããããããããã­ã¼ããéå§ãã
+
+    #  tecsgen ãã¼ã¸ã§ã³ãã¡ã¤ã«ã®ã­ã¼ã
+    # ãããå®è¡ããã¾ã§ tecsgen ã®ãã¼ã¸ã§ã³ãè¡¨ç¤ºã§ããªã
+    # ãã®ãã¡ã¤ã«ãèª¤ã£ã¦èª­ã¿è¾¼ãã¨ãç°ãªããã¼ã¸ã§ã³åãè¡¨ç¤ºãã¦ãã¾ã
+    require_tecsgen_lib 'tecslib/version.rb'
+    if ! $no_banner || $print_version
+      STDERR << "tecsgen  version #{$version}  #{$Copyright}\n"
+    end
+    if $verbose then
+      STDERR << "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE} patchlevel #{RUBY_PATCHLEVEL}) [#{RUBY_PLATFORM}]\n"
+    end
+    if $print_version && ARGV.empty?
+      exit
+    end
+
+    # æå­ã³ã¼ãæ±ºå®ã®ããæåã«èª­ã¿ãã
+    require_tecsgen_lib 'tecslib/core/tecs_lang.rb'
+
+    unless $yydebug then
+      require_tecsgen_lib 'tecslib/core/bnf.tab.rb'
+    else
+      require_tecsgen_lib 'tecslib/core/bnf-deb.tab.rb'
+    end
+
+    # syntaxobj.rb ã«ã¯ Node ãå®ç¾©ããã¦ããã®ã§ãæ©ãæ®µéã§ require 
+    require_tecsgen_lib 'tecslib/core/syntaxobj.rb'
+    require_tecsgen_lib 'tecslib/core/pluginModule.rb'
+    require_tecsgen_lib 'tecslib/core/plugin.rb'
+    require_tecsgen_lib 'tecslib/core/messages.rb'
+    require_tecsgen_lib 'tecslib/core/types.rb'
+    require_tecsgen_lib 'tecslib/core/value.rb'
+    require_tecsgen_lib 'tecslib/core/componentobj.rb'
+    require_tecsgen_lib 'tecslib/core/expression.rb'
+    require_tecsgen_lib 'tecslib/core/optimize.rb'
+    require_tecsgen_lib 'tecslib/core/tecsgen.rb'
+    require_tecsgen_lib 'tecslib/core/generate.rb'
+    require_tecsgen_lib 'tecslib/core/gen_xml.rb'
+#    require_tecsgen_lib 'tecslib/core/tool_info.rb'
+    require_tecsgen_lib 'tecslib/plugin/CelltypePlugin.rb'
+    require_tecsgen_lib 'tecslib/plugin/CellPlugin.rb'
+    require_tecsgen_lib 'tecslib/plugin/SignaturePlugin.rb'
+    require_tecsgen_lib 'tecslib/plugin/ThroughPlugin.rb'
+    require_tecsgen_lib 'tecslib/plugin/DomainPlugin.rb'
+
+    # C è¨èªãã¼ãµ
+    require_tecsgen_lib 'tecslib/core/C_parser.tab.rb'
+    require_tecsgen_lib 'tecslib/core/ctypes.rb'
+
+    if $unit_test then
+      exit 1
+    end
+
+  end # load_modules
+
+  def self.setup
+    # $import_path, $tecspath ãèª¿æ´
+    TECSGEN.adjust_exerb_path
+
+    # $import_path ã«ç°å¢å¤æ° $TECSGEN ããã³ãã®ç´ä¸ãè¿½å 
+    if $no_default_import_path == false then
+      # $TECSGEN ããã³ããã®ç´ä¸ã®ãã£ã¬ã¯ããªããã¹ã«è¿½å 
+      if $tecspath != "." then
+        TECSGEN.add_import_path $tecspath
+        dir = nil
+        begin
+          Dir.foreach( $tecspath ){ |f|
+            if f != "." && f != ".." && File.directory?( $tecspath + '/' + f ) then
+              TECSGEN.add_import_path( $tecspath + '/' + f )
+            end
+          }
+        rescue
+          # ç¡è¦
+        end
+      end
+    end
+
+    # ããã©ã«ãè¨­å®
+    TECSGEN.set_default_config
+
+    # $target ã®è¨­å®
+    $target = ARGV[0]
+    pos = $target.rindex( /[:\\\/]/ )
+    if pos then
+      $target = $target[pos+1..-1]  # ãã£ã¬ã¯ããªåºåããé¤ããæå­å
+    end
+    pos = $target.rindex( /\./ )
+    if pos then
+      $target = $target[0..pos-1]   # æ¡å¼µå­ãåãé¤ããæå­å
+    end
+
+    # gen ãã£ã¬ã¯ããªã®ä½æ
+    begin
+      if ! File.directory?( $gen_base ) then
+        Dir.mkdir( $gen_base )
+      end
+    rescue
+      print( "Cannot mkdir #{$gen_base}. If the path has hierarchy, please create directory by manual.\n" )
+      exit 1
+    end
+  end # setup
+
+  #=== TECSGEN#get_celltype_list
+  def get_celltype_list
+    @celltype_list
+  end
+
+  #=== TECSGEN#get_cell_list
+  def get_cell_list
+    @cell_list
+  end
+
+  def get_root_namespace
+    @root_namespace
+  end
+end # TECSGEN
+
+# è¤æ°ã®ã¸ã§ãã¬ã¼ã¿ã¤ã³ã¹ã¿ã³ã¹ãçæãããã¨ã¯ãå¯è½ã ããä»¥ä¸ã®åé¡ããã
+#  ã¯ã©ã¹å¤æ°ã®ãªã»ãããç¢ºå®ã«è¡ãå¿
+è¦ããã
+
+if $TECSCDE != true then
+  begin
+    TECSGEN.init
+    tecsgen = TECSGEN.new
+    tecsgen.run1
+    tecsgen.run2
+  rescue => evar
+    print_exception( evar )
+    STDERR << "tecsgen: exit because of unrecoverble error.\n"
+    STDERR << "   please retry after resolve early error.\n"
+    STDERR << "   if no error has occured, please report to TOPPERS TECS WG (users@toppers.jp or com-wg@toppers.jp).\n"
+    exit 1
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsgen_rcov
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsgen_rcov	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsgen_rcov	(revision 270)
@@ -0,0 +1,13 @@
+#! /bin/sh
+# å¼æ°ã¯ "$@" ã¨ãã¦ãªãã¨ãå
+ã®å¼æ°ã« "--cpp=gcc-3 -E -DTECS" ã®ãããª '"' ã§å²ã¾ãããã®ãæå¾
+ããã¨ããã«æ±ããªã
+# --aggregate ã®å¼æ°ã¯ test/Makefile ã¨ä¸è´ãããå¿
+è¦ããã
+# rcov å®è¡æ pretty.rb ã§ ruby ä¾å¤çºçãããTrac #601 åç
+§ã
+
+do="rcov -t --no-html --aggregate $TECSPATH/../test/coverage.data $TECSPATH/../tecsgen/tecsgen.rb --"
+echo $do "$@"
+$do "$@"
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsgen_rcov.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsgen_rcov.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsgen_rcov.rb	(revision 270)
@@ -0,0 +1,77 @@
+#!/usr/bin/env ruby
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2016 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: tecsgen_rcov.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+# ã«ãã¬ãã¸ãåãããã® tecsgen ã³ãã³ã
+# SimpleCov ãä½¿ç¨ãããããruby V1.9 ä»¥éãå¿
+è¦
+#
+# Usage: tecsgen_rcov.rb [options] CDL-file.cdl
+#
+require 'simplecov'
+SimpleCov.command_name "tecsgen#{$$}"
+SimpleCov.root File.dirname( File.expand_path __FILE__ )
+SimpleCov.at_exit do
+  SimpleCov.result.format!
+end
+SimpleCov.start
+# SimpleCov.start do
+#    # add_filter "//"
+# end
+
+print "simplecov begin\n"
+
+require 'tecsgen'
+
+print "simplecov end\n"
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/C_parser.tab.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/C_parser.tab.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/C_parser.tab.rb	(revision 270)
@@ -0,0 +1,2407 @@
+#
+# DO NOT MODIFY!!!!
+# This file is automatically generated by Racc 1.4.12
+# from Racc grammer file "".
+#
+
+require 'racc/parser.rb'
+class C_parser < Racc::Parser
+
+module_eval(<<'...end C_parser.y.rb/module_eval...', 'C_parser.y.rb', 715)
+
+  RESERVED = {
+    # keyword
+    'typedef' => :TYPEDEF,
+    'struct' => :STRUCT,
+    'union' => :UNION,
+    'sizeof' => :SIZEOF,
+    'throw' => :THROW,
+
+    # specifier
+    # types
+    'void'    => :VOID,
+    'char'    => :CHAR,
+    'short'   => :SHORT,
+
+    'volatile'=> :VOLATILE,
+    'const'   => :CONST,
+    'extern'   => :EXTERN,
+
+    'long'    => :LONG,
+    'float'   => :FLOAT,
+    'double'  => :DOUBLE,
+    'signed'  => :SIGNED,
+    'unsigned'=> :UNSIGNED,
+
+    'int'     => :INT,
+    'enum'    => :ENUM,
+
+    'if'      => :IF,
+    'else'    => :ELSE,
+    'while'   => :WHILE,
+    'do'      => :DO,
+    'for'     => :FOR,
+    'case'    => :CASE,
+    'default' => :DEFAULT,
+    'goto'    => :GOTO,
+    'continue' => :CONTINUE,
+    'break'   => :BREAK,
+    'return'  => :RETURN,
+    '__inline__'  => :__INLINE__,
+    'inline'  => :INLINE,
+    '__inline'  => :__INLINE,
+    'Inline'  => :CINLINE,        # inline starting with Capital letter
+    'static'  => :STATIC,
+    'register' => :REGISTER,
+    'auto'    => :AUTO,
+    '__extension__'    => :EXTENSION,
+
+  }
+
+  @@generator_nest = -1
+  @@generator_stack = []
+  @@current_locale = []
+
+  def finalize
+
+    # mikan Namespace.pop
+    Celltype.pop
+    Cell.pop
+    CompositeCelltype.pop
+    Region.pop
+
+  end
+
+  def set_plugin( plugin )
+    @plugin = plugin
+  end
+
+  def self.get_plugin
+    @@generator_stack[@@generator_nest].get_plugin
+  end
+
+  def get_plugin
+    @plugin
+  end
+
+  def parse(files)
+
+    # mikan Namespace.push
+    Celltype.push
+    Cell.push
+    CompositeCelltype.push
+    Region.push
+
+    @@generator_nest += 1
+    @@generator_stack[@@generator_nest] = self
+    @b_no_type_name = false
+
+   begin
+
+    @q = []
+    comment = false
+
+    # euc ã®ã³ã¡ã³ãã utf8 ã¨ãã¦æ±ãã¨ãã³ã¡ã³ãã®çµãããèª¤ãåé¡ã®å¯¾ç­
+    TECS_LANG::set_kcode_binary
+
+    # 800U, 0xffLL ãªã© (æ´æ°ãªãã©ã«ã«å
+±éã®ä¿®é£¾å­)
+    integer_qualifier = "([Uu][Ll][Ll]|[Uu][Ll]|[Uu]|[Ll][Ll]|[Ll])?"
+
+    files.each {|file|
+      lineno = 1
+     begin
+#2.0       IO.foreach(file) {|line|
+       TECSIO.foreach(file) {|line|
+        col = 1
+        line.rstrip!
+
+        until line.empty?
+
+          if comment
+            case line
+            # ã³ã¡ã³ãçµäº
+            when /\A\*\//
+              comment = false
+            when /\A./
+              ;
+            end
+          else
+            case line
+            # ç©ºç½ãããªãã­ã»ã¹ãã£ã¬ã¯ãã£ã
+            when /\A\s+/
+              ;
+            # è­å¥å­
+            when /\A[a-zA-Z_]\w*/
+              word = $&
+              @q << [RESERVED[word] || :IDENTIFIER, Token.new(word.intern, file, lineno, col)]
+            # 16 é²æ°å®æ°
+            when /\A0x[0-9A-Fa-f]+#{integer_qualifier}/
+              @q << [:HEX_CONSTANT, Token.new($&, file, lineno, col)]
+            # 8 é²æ°å®æ°
+            when /\A0[0-7]+#{integer_qualifier}/
+              @q << [:OCTAL_CONSTANT, Token.new($&, file, lineno, col)]
+            # æµ®åå°æ°å®æ°
+            when /\A[0-9]+\.([0-9]*)?([Ee][+-]?[0-9]+)?/
+              @q << [:FLOATING_CONSTANT, Token.new($&, file, lineno, col)]
+            # æ´æ°å®æ°
+            when /\A\d+#{integer_qualifier}/
+            # when /\A\d+/
+              @q << [:INTEGER_CONSTANT, Token.new($&.to_i, file, lineno, col)]
+            # æå­
+            when /\A'(?:[^'\\]|\\.)'/
+              @q << [:CHARACTER_LITERAL, Token.new($&, file, lineno, col)]
+            # æå­å
+#              "#include  #include #include \"../systask/logtask.cfg\"       æå¾ã® " å¿ã)ã§ç¡éã«ã¼ã
+#            when /\A"(?:[^"\\]+|\\.)*"/
+            when /\A"(?:[^"\\]|\\.)*"/   # ããã¯ãã¾ãè¡ãããã 
+              @q << [:STRING_LITERAL, Token.new($&, file, lineno, col)]
+            # è¡ã³ã¡ã³ã
+            when /\A\/\/.*$/
+              # èª­ã¿é£ã°ãã ã
+            # ã³ã¡ã³ãéå§
+            when /\A\/\*/
+              comment = true
+            when /\A>>=/, /\A<<=/, /\A>>/,  /\A<</
+              @q << [$&, Token.new($&, file, lineno, col)]
+            when /\A\+=/, /\A\-=/, /\A\*=/, /\A\/=/, /\A%=/, /\A&=/, /\A\|=/, /\A\^=/
+              @q << [$&, Token.new($&, file, lineno, col)]
+            when /\A::/, /\A==/, /\A!=/, /\A>=/, /\A<=/, /\A\->/, /\A\+\+/, /\A\-\-/
+              @q << [$&, Token.new($&, file, lineno, col)]
+            when /\A./
+              @q << [$&, Token.new($&, file, lineno, col)]
+            else
+              raise
+            end
+          end
+
+          line = $'
+          col += $&.length
+        end
+
+        lineno += 1
+      }
+
+     rescue => evar
+       Generator.error( "B1002 while open or reading \'$1\'" , file )
+       print_exception( evar )
+     end
+    }
+
+    # çµäºã®å°
+    @q << nil
+
+    @yydebug = true
+    do_parse
+
+   ensure
+    @@generator_nest -= 1
+    TECS_LANG::reset_kcode
+   end
+
+  end
+
+
+  def next_token
+    token = @q.shift
+
+    if token then
+      @@current_locale[@@generator_nest] = token[1].locale
+
+      case token[1].val
+      when ";", ":", ",", "(", ")", "{", "}"
+        set_no_type_name false
+      when ".", "->"
+        set_no_type_name true
+      end
+
+      # TYPE_NAME ãã¼ã¯ã³ã¸ç½®ãæã
+      if @b_no_type_name == false
+        if token[0] == :IDENTIFIER && Namespace.is_typename?( token[1].val ) then
+          token[0] = :TYPE_NAME
+        end
+      end
+
+      if $debug then     # 070107 token ç¡å¹æãããéããªããããã (through å¯¾å¿ -d ã®æã«ä¾å¤çºç) 
+        locale = @@current_locale[@@generator_nest]
+        if token then
+          print( "#{locale[0]}: line #{locale[1]} : #{token[0]} '#{token[1].val}'\n" )
+        else
+          print( "#{locale[0]}: line #{locale[1]} : EOF\n" )
+        end
+      end
+    end
+
+    token
+  end
+
+  def on_error(t, v, vstack)
+    if v == "$" then
+     Generator.error( "B1003 Unexpected EOF"  )
+    else
+     Generator.error( "B1004 syntax error near \'$1\'" , v.val )
+    end
+
+  end
+
+  def self.current_locale
+    @@current_locale[ @@generator_nest ]
+  end
+
+  @@n_error = 0
+  @@n_warning = 0
+
+  # ãã®ã¡ã½ããã¯æ§æè§£æãæå³è§£æããã®ã¿å¼åºãå¯ï¼ã³ã¼ãçæã§ã¨ã©ã¼çºçã¯ä¸é©åï¼
+  def self.error( msg )
+    @@n_error += 1
+    locale = @@current_locale[ @@generator_nest ]
+
+    if locale then
+      Console.puts "error: #{locale[0]}: line #{locale[1]} #{msg}"
+    else
+      Console.puts "error: #{msg}"
+    end
+  end
+
+  # ãã®ã¡ã½ããã¯æ§æè§£æãæå³è§£æããã®ã¿å¼åºãå¯ï¼ã³ã¼ãçæã§ã¦ã©ã¼ãã³ã°çºçã¯ä¸é©åï¼
+  def self.warning( msg )
+    @@n_warning += 1
+    locale = @@current_locale[ @@generator_nest ]
+    Console.puts "warning: #{locale[0]}: line #{locale[1]} #{msg}"
+  end
+
+  def self.get_n_error
+    @@n_error
+  end
+
+  def self.get_n_warning
+    @@n_warning
+  end
+
+  def self.get_nest
+    @@generator_nest
+  end
+
+  def set_no_type_name b_no_type_name
+    # print "b_no_type_name=#{b_no_type_name}\n"
+    @b_no_type_name = b_no_type_name
+  end
+
+...end C_parser.y.rb/module_eval...
+##### State transition tables begin ###
+
+clist = [
+'104,105,106,107,108,110,68,111,66,179,300,141,53,116,117,206,115,118',
+'119,120,121,122,123,104,105,106,107,108,110,168,111,203,204,207,141',
+'74,116,117,168,115,118,119,120,121,122,123,303,208,67,299,65,26,27,104',
+'105,106,107,108,110,73,111,26,27,75,141,348,116,117,167,115,118,119',
+'120,121,122,123,77,265,195,196,160,304,305,306,307,308,309,310,311,312',
+'313,262,351,142,8,9,10,11,15,16,17,18,19,20,21,22,53,192,23,25,26,27',
+'193,194,343,261,142,104,105,106,107,108,110,344,111,172,340,151,141',
+'272,116,117,251,115,118,119,120,121,122,123,104,105,106,107,108,110',
+'142,111,355,171,339,141,81,116,117,80,115,118,119,120,121,122,123,104',
+'105,106,107,108,110,52,111,195,196,3,141,51,116,117,359,115,118,119',
+'120,121,122,123,104,105,106,107,108,110,373,111,96,335,361,141,334,116',
+'117,344,115,118,119,120,121,122,123,79,142,247,335,272,251,334,251,51',
+'104,105,106,107,108,110,81,111,53,80,362,234,363,116,117,142,115,118',
+'119,120,121,122,123,247,52,364,251,197,198,51,51,197,198,79,197,198',
+'53,53,142,228,365,8,9,10,11,15,16,17,18,19,20,21,22,77,192,23,25,26',
+'27,193,194,142,229,95,230,231,232,233,87,235,236,238,239,240,241,192',
+'199,200,201,202,193,194,197,198,370,37,38,39,40,41,42,43,44,142,104',
+'105,106,107,108,110,86,111,203,204,85,141,375,116,117,376,115,118,119',
+'120,121,122,123,104,105,106,107,108,110,377,111,195,196,378,141,379',
+'116,117,380,115,118,119,120,121,122,123,104,105,106,107,108,110,382',
+'111,383,35,384,141,63,116,117,60,115,118,119,120,121,122,123,104,105',
+'106,107,108,110,389,111,209,210,390,141,391,116,117,392,115,118,119',
+'120,121,122,123,59,142,394,34,396,8,9,10,11,15,16,17,18,19,20,21,22',
+'52,278,23,25,26,27,51,142,36,52,52,52,35,53,52,51,51,51,197,198,51,45',
+'53,53,53,277,275,53,269,268,142,267,37,38,39,40,41,42,43,44,181,95,182',
+'254,183,184,185,199,200,201,202,253,34,142,8,9,10,11,15,16,17,18,19',
+'20,21,22,245,244,23,25,26,27,243,30,36,104,105,106,107,108,110,214,111',
+'213,208,207,141,206,116,117,205,115,118,119,120,121,122,123,37,38,39',
+'40,41,42,43,44,301,104,105,106,107,108,110,314,111,315,317,318,234,319',
+'116,117,321,115,118,119,120,121,122,123,52,52,52,322,52,323,51,51,51',
+'324,51,327,174,53,53,53,228,53,8,9,10,11,15,16,17,18,19,20,21,22,77',
+'173,23,25,26,27,75,95,142,229,169,230,231,232,233,161,235,236,238,239',
+'240,241,199,200,201,202,346,347,205,,,,37,38,39,40,41,42,43,44,142,104',
+'105,106,107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122,123',
+',,104,105,106,107,108,110,,111,,,,234,,116,117,,115,118,119,120,121',
+'122,123,,,,,,,,,,,,,,,,,228,,8,9,10,11,15,16,17,18,19,20,21,22,77,,23',
+'25,26,27,,,,229,,230,231,232,233,142,235,236,238,239,240,241,,,,,,,',
+',,,37,38,39,40,41,42,43,44,142,104,105,106,107,108,110,,111,,,,234,',
+'116,117,,115,118,119,120,121,122,123,,,,,,,,,,,,,,,,,228,,8,9,10,11',
+'15,16,17,18,19,20,21,22,77,,23,25,26,27,,,,229,,230,231,232,233,,235',
+'236,238,239,240,241,,,,,,,,,,,37,38,39,40,41,42,43,44,142,104,105,106',
+'107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122,123,104,105',
+'106,107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122,123,104',
+'105,106,107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122,123',
+'104,105,106,107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122',
+'123,,142,,,,,,,,104,105,106,107,108,110,,111,,,,141,,116,117,142,115',
+'118,119,120,121,122,123,104,105,106,107,108,110,,111,,366,,141,,116',
+'117,142,115,118,119,120,121,122,123,,,,,,,,104,105,106,107,108,110,',
+'111,142,,,234,,116,117,,115,118,119,120,121,122,123,,,,,,,,,,,,,,,,',
+'228,142,8,9,10,11,15,16,17,18,19,20,21,22,77,,23,25,26,27,,,,229,142',
+'230,231,232,233,,235,236,238,239,240,241,,,,,,,,,,,37,38,39,40,41,42',
+'43,44,142,104,105,106,107,108,110,,111,,,,234,,116,117,,115,118,119',
+'120,121,122,123,,,,,,,,,,,,,,,,,228,,8,9,10,11,15,16,17,18,19,20,21',
+'22,77,,23,25,26,27,,,,229,,230,231,232,233,,235,236,238,239,240,241',
+',,,,,,,,,,37,38,39,40,41,42,43,44,142,104,105,106,107,108,110,,111,',
+',,234,,116,117,,115,118,119,120,121,122,123,,,,,,,,,,,,,,,,,228,,8,9',
+'10,11,15,16,17,18,19,20,21,22,77,,23,25,26,27,,,,229,,230,231,232,233',
+',235,236,238,239,240,241,,,,,,,,,,,37,38,39,40,41,42,43,44,142,104,105',
+'106,107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122,123,104',
+'105,106,107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122,123',
+'104,105,106,107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122',
+'123,104,105,106,107,108,110,,111,,,,141,,116,117,,115,118,119,120,121',
+'122,123,,142,,,,,,139,,,,,,140,104,105,106,107,108,110,,111,,145,142',
+'141,,116,117,,115,118,119,120,121,122,123,104,105,106,107,108,110,,111',
+',,142,141,,116,117,,115,118,119,120,121,122,123,104,105,106,107,108',
+'110,,111,,,142,141,,116,117,,115,118,119,120,121,122,123,104,105,106',
+'107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122,123,,142,',
+',,,,,,104,105,106,107,108,110,,111,,,,141,,116,117,142,115,118,119,120',
+'121,122,123,104,105,106,107,108,110,,111,,,,141,,116,117,142,115,118',
+'119,120,121,122,123,104,105,106,107,108,110,,111,,,,141,,116,117,142',
+'115,118,119,120,121,122,123,104,105,106,107,108,110,,111,,,,141,,116',
+'117,,115,118,119,120,121,122,123,,142,,,,,,139,349,,,,,140,104,105,106',
+'107,108,110,,111,,,142,141,,116,117,,115,118,119,120,121,122,123,104',
+'105,106,107,108,110,,111,,,142,141,,116,117,,115,118,119,120,121,122',
+'123,104,105,106,107,108,110,,111,,,142,141,,116,117,,115,118,119,120',
+'121,122,123,104,105,106,107,108,110,,111,,,,141,,116,117,,115,118,119',
+'120,121,122,123,,142,,,,,,,,104,105,106,107,108,110,,111,,,,141,,116',
+'117,142,115,118,119,120,121,122,123,104,105,106,107,108,110,,111,,,',
+'141,,116,117,142,115,118,119,120,121,122,123,104,105,106,107,108,110',
+',111,,,,141,,116,117,142,115,118,119,120,121,122,123,,,,,,,,,,104,105',
+'106,107,108,110,,111,,,,234,,116,117,142,115,118,119,120,121,122,123',
+',,,,,,,,,,,,,,,142,228,,8,9,10,11,15,16,17,18,19,20,21,22,77,237,23',
+'25,26,27,,,142,229,,230,231,232,233,,235,236,238,239,240,241,,,,,,,',
+',,,37,38,39,40,41,42,43,44,142,104,105,106,107,108,110,,111,,336,,141',
+',116,117,,115,118,119,120,121,122,123,104,105,106,107,108,110,,111,',
+',,141,,116,117,,115,118,119,120,121,122,123,8,9,10,11,15,16,17,18,19',
+'20,21,22,,,23,25,26,27,8,9,10,11,15,16,17,18,19,20,21,22,,,23,25,26',
+'27,,104,105,106,107,108,110,,111,,,142,141,,116,117,,115,118,119,120',
+'121,122,123,104,105,106,107,108,110,,111,,,142,141,,116,117,,115,118',
+'119,120,121,122,123,104,105,106,107,108,110,,111,,,,141,,116,117,,115',
+'118,119,120,121,122,123,104,105,106,107,108,187,,111,,,,141,,116,117',
+',115,118,119,120,121,122,123,,142,,,,,,,,104,105,106,107,108,189,,111',
+',,,141,,116,117,142,115,118,119,120,121,122,123,104,105,106,107,108',
+'189,,111,,,,141,,116,117,142,115,118,119,120,121,122,123,104,105,106',
+'107,108,110,,111,,,,141,,116,117,142,115,118,119,120,121,122,123,104',
+'105,106,107,108,110,,111,,,,141,,116,117,,115,118,119,120,121,122,123',
+',142,,,,,,139,,,,,,140,272,332,326,251,104,105,106,107,108,110,142,111',
+',53,,141,,116,117,,115,118,119,120,121,122,123,,,,,,,142,,,8,9,10,11',
+'15,16,17,18,19,20,21,22,,,23,25,26,27,,,142,104,105,106,107,108,110',
+',111,,,,234,,116,117,,115,118,119,120,121,122,123,37,38,39,40,41,42',
+'43,44,,,,,,,,,228,142,8,9,10,11,15,16,17,18,19,20,21,22,77,,23,25,26',
+'27,,,,229,,230,231,232,233,,235,236,238,239,240,241,368,,,,,,,,,,37',
+'38,39,40,41,42,43,44,142,247,332,,251,,,51,,,,,,,53,,,8,9,10,11,15,16',
+'17,18,19,20,21,22,,,23,25,26,27,,,8,9,10,11,15,16,17,18,19,20,21,22',
+',,23,25,26,27,147,,,,,,37,38,39,40,41,42,43,44,,,,,,,,,328,,,,37,38',
+'39,40,41,42,43,44,,8,9,10,11,15,16,17,18,19,20,21,22,,,23,25,26,27,8',
+'9,10,11,15,16,17,18,19,20,21,22,,,23,25,26,27,,,,,,,,,37,38,39,40,41',
+'42,43,44,,,,,,,,,,,37,38,39,40,41,42,43,44,8,9,10,11,15,16,17,18,19',
+'20,21,22,,,23,25,26,27,8,9,10,11,15,16,17,18,19,20,21,22,,338,23,25',
+'26,27,,,,,,,,,37,38,39,40,41,42,43,44,,,,,,,,,,,37,38,39,40,41,42,43',
+'44,8,9,10,11,15,16,17,18,19,20,21,22,,162,23,25,26,27,8,9,10,11,15,16',
+'17,18,19,20,21,22,,,23,25,26,27,,,,,,,,,37,38,39,40,41,42,43,44,,,,',
+',,,,,,37,38,39,40,41,42,43,44,8,9,10,11,15,16,17,18,19,20,21,22,,,23',
+'25,26,27,8,9,10,11,15,16,17,18,19,20,21,22,,,23,25,26,27,,,,,,,,,37',
+'38,39,40,41,42,43,44,,,,,,,,,,,37,38,39,40,41,42,43,44,8,9,10,11,15',
+'16,17,18,19,20,21,22,,255,23,25,26,27,8,9,10,11,15,16,17,18,19,20,21',
+'22,,,23,25,26,27,,,,,,,,,37,38,39,40,41,42,43,44,,,,,,,,,,,37,38,39',
+'40,41,42,43,44,8,9,10,11,15,16,17,18,19,20,21,22,,260,23,25,26,27,8',
+'9,10,11,15,16,17,18,19,20,21,22,,,23,25,26,27,,,,,,,,,37,38,39,40,41',
+'42,43,44,,,,,,,,,,,37,38,39,40,41,42,43,44,8,9,10,11,15,16,17,18,19',
+'20,21,22,,,23,25,26,27,8,9,10,11,15,16,17,18,19,20,21,22,,,23,25,26',
+'27,,,,,,,,,37,38,39,40,41,42,43,44,8,9,10,11,15,16,17,18,19,20,21,22',
+',,23,25,26,27' ]
+        racc_action_table = arr = ::Array.new(2877, nil)
+        idx = 0
+        clist.each do |str|
+          str.split(',', -1).each do |i|
+            arr[idx] = i.to_i unless i.empty?
+            idx += 1
+          end
+        end
+
+clist = [
+'208,208,208,208,208,208,24,208,23,112,211,208,53,208,208,295,208,208',
+'208,208,208,208,208,209,209,209,209,209,209,93,209,130,130,296,209,46',
+'209,209,170,209,209,209,209,209,209,209,215,297,24,211,23,53,53,187',
+'187,187,187,187,187,46,187,112,112,48,187,298,187,187,93,187,187,187',
+'187,187,187,187,48,170,285,285,88,215,215,215,215,215,215,215,215,215',
+'215,164,301,208,187,187,187,187,187,187,187,187,187,187,187,187,83,283',
+'187,187,187,187,283,283,273,164,209,392,392,392,392,392,392,273,392',
+'99,257,82,392,271,392,392,271,392,392,392,392,392,392,392,179,179,179',
+'179,179,179,187,179,316,99,257,179,50,179,179,50,179,179,179,179,179',
+'179,179,192,192,192,192,192,192,49,192,286,286,1,192,49,192,192,320',
+'192,192,192,192,192,192,192,193,193,193,193,193,193,345,193,68,250,322',
+'193,250,193,193,345,193,193,193,193,193,193,193,49,392,246,330,178,246',
+'330,178,246,390,390,390,390,390,390,78,390,178,78,325,390,328,390,390',
+'179,390,390,390,390,390,390,390,150,158,331,150,287,287,150,158,288',
+'288,246,289,289,150,158,192,390,333,390,390,390,390,390,390,390,390',
+'390,390,390,390,390,284,390,390,390,390,284,284,193,390,67,390,390,390',
+'390,64,390,390,390,390,390,390,126,129,129,129,129,126,126,290,290,337',
+'390,390,390,390,390,390,390,390,390,379,379,379,379,379,379,62,379,293',
+'293,61,379,352,379,379,353,379,379,379,379,379,379,379,378,378,378,378',
+'378,378,354,378,127,127,355,378,356,378,378,357,378,378,378,378,378',
+'378,378,194,194,194,194,194,194,363,194,367,30,369,194,22,194,194,14',
+'194,194,194,194,194,194,194,195,195,195,195,195,195,380,195,135,135',
+'385,195,387,195,195,388,195,195,195,195,195,195,195,12,379,391,30,395',
+'30,30,30,30,30,30,30,30,30,30,30,30,92,183,30,30,30,30,92,378,30,262',
+'74,4,2,92,72,262,74,4,128,128,72,3,262,74,4,182,180,72,176,175,194,173',
+'30,30,30,30,30,30,30,30,113,168,113,155,113,113,113,291,291,291,291',
+'154,2,195,2,2,2,2,2,2,2,2,2,2,2,2,148,146,2,2,2,2,144,2,2,196,196,196',
+'196,196,196,142,196,140,134,133,196,132,196,196,131,196,196,196,196',
+'196,196,196,2,2,2,2,2,2,2,2,213,377,377,377,377,377,377,229,377,230',
+'232,233,377,234,377,377,236,377,377,377,377,377,377,377,340,216,172',
+'238,52,239,340,216,172,240,52,242,109,340,216,172,377,52,377,377,377',
+'377,377,377,377,377,377,377,377,377,377,103,377,377,377,377,102,96,196',
+'377,95,377,377,377,377,89,377,377,377,377,377,377,292,292,292,292,276',
+'279,294,,,,377,377,377,377,377,377,377,377,377,169,169,169,169,169,169',
+',169,,,,169,,169,169,,169,169,169,169,169,169,169,,,376,376,376,376',
+'376,376,,376,,,,376,,376,376,,376,376,376,376,376,376,376,,,,,,,,,,',
+',,,,,,376,,376,376,376,376,376,376,376,376,376,376,376,376,376,,376',
+'376,376,376,,,,376,,376,376,376,376,169,376,376,376,376,376,376,,,,',
+',,,,,,376,376,376,376,376,376,376,376,376,359,359,359,359,359,359,,359',
+',,,359,,359,359,,359,359,359,359,359,359,359,,,,,,,,,,,,,,,,,359,,359',
+'359,359,359,359,359,359,359,359,359,359,359,359,,359,359,359,359,,,',
+'359,,359,359,359,359,,359,359,359,359,359,359,,,,,,,,,,,359,359,359',
+'359,359,359,359,359,359,197,197,197,197,197,197,,197,,,,197,,197,197',
+',197,197,197,197,197,197,197,348,348,348,348,348,348,,348,,,,348,,348',
+'348,,348,348,348,348,348,348,348,344,344,344,344,344,344,,344,,,,344',
+',344,344,,344,344,344,344,344,344,344,189,189,189,189,189,189,,189,',
+',,189,,189,189,,189,189,189,189,189,189,189,,197,,,,,,,,198,198,198',
+'198,198,198,,198,,,,198,,198,198,348,198,198,198,198,198,198,198,334',
+'334,334,334,334,334,,334,,334,,334,,334,334,344,334,334,334,334,334',
+'334,334,,,,,,,,321,321,321,321,321,321,,321,189,,,321,,321,321,,321',
+'321,321,321,321,321,321,,,,,,,,,,,,,,,,,321,198,321,321,321,321,321',
+'321,321,321,321,321,321,321,321,,321,321,321,321,,,,321,334,321,321',
+'321,321,,321,321,321,321,321,321,,,,,,,,,,,321,321,321,321,321,321,321',
+'321,321,319,319,319,319,319,319,,319,,,,319,,319,319,,319,319,319,319',
+'319,319,319,,,,,,,,,,,,,,,,,319,,319,319,319,319,319,319,319,319,319',
+'319,319,319,319,,319,319,319,319,,,,319,,319,319,319,319,,319,319,319',
+'319,319,319,,,,,,,,,,,319,319,319,319,319,319,319,319,319,396,396,396',
+'396,396,396,,396,,,,396,,396,396,,396,396,396,396,396,396,396,,,,,,',
+',,,,,,,,,,396,,396,396,396,396,396,396,396,396,396,396,396,396,396,',
+'396,396,396,396,,,,396,,396,396,396,396,,396,396,396,396,396,396,,,',
+',,,,,,,396,396,396,396,396,396,396,396,396,318,318,318,318,318,318,',
+'318,,,,318,,318,318,,318,318,318,318,318,318,318,317,317,317,317,317',
+'317,,317,,,,317,,317,317,,317,317,317,317,317,317,317,75,75,75,75,75',
+'75,,75,,,,75,,75,75,,75,75,75,75,75,75,75,315,315,315,315,315,315,,315',
+',,,315,,315,315,,315,315,315,315,315,315,315,,318,,,,,,75,,,,,,75,80',
+'80,80,80,80,80,,80,,80,317,80,,80,80,,80,80,80,80,80,80,80,181,181,181',
+'181,181,181,,181,,,75,181,,181,181,,181,181,181,181,181,181,181,314',
+'314,314,314,314,314,,314,,,315,314,,314,314,,314,314,314,314,314,314',
+'314,302,302,302,302,302,302,,302,,,,302,,302,302,,302,302,302,302,302',
+'302,302,,80,,,,,,,,199,199,199,199,199,199,,199,,,,199,,199,199,181',
+'199,199,199,199,199,199,199,200,200,200,200,200,200,,200,,,,200,,200',
+'200,314,200,200,200,200,200,200,200,300,300,300,300,300,300,,300,,,',
+'300,,300,300,302,300,300,300,300,300,300,300,275,275,275,275,275,275',
+',275,,,,275,,275,275,,275,275,275,275,275,275,275,,199,,,,,,300,300',
+',,,,300,201,201,201,201,201,201,,201,,,200,201,,201,201,,201,201,201',
+'201,201,201,201,207,207,207,207,207,207,,207,,,300,207,,207,207,,207',
+'207,207,207,207,207,207,210,210,210,210,210,210,,210,,,275,210,,210',
+'210,,210,210,210,210,210,210,210,202,202,202,202,202,202,,202,,,,202',
+',202,202,,202,202,202,202,202,202,202,,201,,,,,,,,269,269,269,269,269',
+'269,,269,,,,269,,269,269,207,269,269,269,269,269,269,269,203,203,203',
+'203,203,203,,203,,,,203,,203,203,210,203,203,203,203,203,203,203,204',
+'204,204,204,204,204,,204,,,,204,,204,204,202,204,204,204,204,204,204',
+'204,,,,,,,,,,143,143,143,143,143,143,,143,,,,143,,143,143,269,143,143',
+'143,143,143,143,143,,,,,,,,,,,,,,,,203,143,,143,143,143,143,143,143',
+'143,143,143,143,143,143,143,143,143,143,143,143,,,204,143,,143,143,143',
+'143,,143,143,143,143,143,143,,,,,,,,,,,143,143,143,143,143,143,143,143',
+'143,251,251,251,251,251,251,,251,,251,,251,,251,251,,251,251,251,251',
+'251,251,251,110,110,110,110,110,110,,110,,,,110,,110,110,,110,110,110',
+'110,110,110,110,70,70,70,70,70,70,70,70,70,70,70,70,,,70,70,70,70,110',
+'110,110,110,110,110,110,110,110,110,110,110,,,110,110,110,110,,205,205',
+'205,205,205,205,,205,,,251,205,,205,205,,205,205,205,205,205,205,205',
+'206,206,206,206,206,206,,206,,,110,206,,206,206,,206,206,206,206,206',
+'206,206,114,114,114,114,114,114,,114,,,,114,,114,114,,114,114,114,114',
+'114,114,114,115,115,115,115,115,115,,115,,,,115,,115,115,,115,115,115',
+'115,115,115,115,,205,,,,,,,,116,116,116,116,116,116,,116,,,,116,,116',
+'116,206,116,116,116,116,116,116,116,117,117,117,117,117,117,,117,,,',
+'117,,117,117,114,117,117,117,117,117,117,117,139,139,139,139,139,139',
+',139,,,,139,,139,139,115,139,139,139,139,139,139,139,241,241,241,241',
+'241,241,,241,,,,241,,241,241,,241,241,241,241,241,241,241,,116,,,,,',
+'139,,,,,,139,272,272,241,272,235,235,235,235,235,235,117,235,,272,,235',
+',235,235,,235,235,235,235,235,235,235,,,,,,,139,,,272,272,272,272,272',
+'272,272,272,272,272,272,272,,,272,272,272,272,,,241,231,231,231,231',
+'231,231,,231,,,,231,,231,231,,231,231,231,231,231,231,231,272,272,272',
+'272,272,272,272,272,,,,,,,,,231,235,231,231,231,231,231,231,231,231',
+'231,231,231,231,231,,231,231,231,231,,,,231,,231,231,231,231,,231,231',
+'231,231,231,231,335,,,,,,,,,,231,231,231,231,231,231,231,231,231,247',
+'247,,247,,,247,,,,,,,247,,,335,335,335,335,335,335,335,335,335,335,335',
+'335,,,335,335,335,335,,,247,247,247,247,247,247,247,247,247,247,247',
+'247,,,247,247,247,247,81,,,,,,335,335,335,335,335,335,335,335,,,,,,',
+',,245,,,,247,247,247,247,247,247,247,247,,81,81,81,81,81,81,81,81,81',
+'81,81,81,,,81,81,81,81,245,245,245,245,245,245,245,245,245,245,245,245',
+',,245,245,245,245,,,,,,,,,81,81,81,81,81,81,81,81,,,,,,,,,,,245,245',
+'245,245,245,245,245,245,5,5,5,5,5,5,5,5,5,5,5,5,,,5,5,5,5,252,252,252',
+'252,252,252,252,252,252,252,252,252,,252,252,252,252,252,,,,,,,,,5,5',
+'5,5,5,5,5,5,,,,,,,,,,,252,252,252,252,252,252,252,252,90,90,90,90,90',
+'90,90,90,90,90,90,90,,90,90,90,90,90,153,153,153,153,153,153,153,153',
+'153,153,153,153,,,153,153,153,153,,,,,,,,,90,90,90,90,90,90,90,90,,',
+',,,,,,,,153,153,153,153,153,153,153,153,87,87,87,87,87,87,87,87,87,87',
+'87,87,,,87,87,87,87,86,86,86,86,86,86,86,86,86,86,86,86,,,86,86,86,86',
+',,,,,,,,87,87,87,87,87,87,87,87,,,,,,,,,,,86,86,86,86,86,86,86,86,156',
+'156,156,156,156,156,156,156,156,156,156,156,,156,156,156,156,156,65',
+'65,65,65,65,65,65,65,65,65,65,65,,,65,65,65,65,,,,,,,,,156,156,156,156',
+'156,156,156,156,,,,,,,,,,,65,65,65,65,65,65,65,65,159,159,159,159,159',
+'159,159,159,159,159,159,159,,159,159,159,159,159,7,7,7,7,7,7,7,7,7,7',
+'7,7,,,7,7,7,7,,,,,,,,,159,159,159,159,159,159,159,159,,,,,,,,,,,7,7',
+'7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,,,6,6,6,6,36,36,36,36,36,36,36,36',
+'36,36,36,36,,,36,36,36,36,,,,,,,,,6,6,6,6,6,6,6,6,71,71,71,71,71,71',
+'71,71,71,71,71,71,,,71,71,71,71' ]
+        racc_action_check = arr = ::Array.new(2877, nil)
+        idx = 0
+        clist.each do |str|
+          str.split(',', -1).each do |i|
+            arr[idx] = i.to_i unless i.empty?
+            idx += 1
+          end
+        end
+
+racc_action_pointer = [
+   nil,   173,   432,   442,   425,  2414,  2764,  2712,   nil,   nil,
+   nil,   nil,   363,   nil,   332,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   357,    -5,    -7,   nil,   nil,   nil,   nil,   nil,
+   366,   nil,   nil,   nil,   nil,   nil,  2782,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,    18,   nil,    21,   162,
+   145,   nil,   548,    -8,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   267,   263,   nil,   231,  2642,   nil,   268,   139,   nil,
+  1860,  2816,   428,   nil,   424,  1315,   nil,   nil,   217,   nil,
+  1375,  2344,   119,    86,   nil,   nil,  2572,  2554,    39,   555,
+  2484,   nil,   414,    12,   nil,   549,   575,   nil,   nil,   108,
+   nil,   nil,   545,   487,   nil,   nil,   nil,   nil,   nil,   554,
+  1878,   nil,     2,   451,  1984,  2007,  2039,  2062,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   273,   322,   412,   265,
+    -2,   492,   473,   470,   468,   351,   nil,   nil,   nil,  2085,
+   497,   nil,   489,  1761,   482,   nil,   480,   nil,   470,   nil,
+   234,   nil,   nil,  2502,   431,   423,  2624,   nil,   235,  2694,
+   nil,   nil,   nil,   nil,    74,   nil,   nil,   nil,   449,   620,
+    21,   nil,   546,   439,   nil,   442,   441,   nil,   206,   138,
+   440,  1398,   433,   409,   nil,   nil,   nil,    51,   nil,   902,
+   nil,   nil,   161,   184,   356,   379,   494,   833,   934,  1476,
+  1499,  1582,  1651,  1706,  1729,  1938,  1961,  1605,    -2,    21,
+  1628,    -7,   nil,   518,   nil,     4,   545,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   527,
+   529,  2202,   530,   531,   500,  2149,   503,   nil,   541,   515,
+   519,  2108,   521,   nil,   nil,  2362,   204,  2291,   nil,   nil,
+   188,  1855,  2432,   nil,   nil,   nil,   nil,   109,   nil,   nil,
+   nil,   nil,   423,   nil,   nil,   nil,   nil,   nil,   nil,  1683,
+   nil,   122,  2140,   106,   nil,  1545,   596,   nil,   nil,   600,
+   nil,   nil,   nil,    87,   252,    57,   150,   218,   222,   225,
+   273,   439,   574,   287,   590,   -20,    -3,    10,    25,   nil,
+  1522,    84,  1444,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,  1421,  1338,    82,  1292,  1269,  1081,
+   138,   987,   155,   nil,   nil,   187,   nil,   nil,   218,   nil,
+   205,   235,   nil,   250,   957,  2271,   nil,   291,   nil,   nil,
+   544,   nil,   nil,   nil,   879,   184,   nil,   nil,   856,   nil,
+   nil,   nil,   283,   319,   333,   338,   306,   342,   nil,   739,
+   nil,   nil,   nil,   352,   nil,   nil,   nil,   355,   nil,   360,
+   nil,   nil,   nil,   nil,   nil,   nil,   645,   526,   333,   310,
+   317,   nil,   nil,   nil,   nil,   326,   nil,   385,   355,   nil,
+   216,   365,   115,   nil,   nil,   400,  1175,   nil ]
+
+racc_action_default = [
+  -174,  -241,    -1,  -241,  -241,   -70,   -71,   -72,   -80,   -81,
+   -82,   -83,   -84,   -85,   -86,   -87,   -88,   -89,   -90,   -91,
+   -92,   -93,   -96,  -241,  -241,  -127,  -132,  -133,  -175,  -176,
+  -241,  -178,  -179,  -182,  -183,  -184,  -241,  -230,  -231,  -232,
+  -233,  -234,  -235,  -236,  -237,   398,  -241,   -76,   -78,  -241,
+  -135,  -137,  -241,  -143,   -73,   -84,   -86,   -74,   -75,  -181,
+  -180,   -98,  -241,  -101,  -114,  -241,  -117,  -241,  -126,  -177,
+  -105,  -107,  -241,   -69,  -241,  -241,  -188,  -189,  -134,  -136,
+  -241,  -241,  -241,  -144,  -145,   -94,  -241,  -241,   -84,   -85,
+  -241,  -115,  -241,  -241,  -128,  -130,  -241,  -106,  -108,  -241,
+  -186,   -77,   -78,    -2,    -3,    -4,    -5,    -6,    -7,    -8,
+  -241,   -10,   -12,   -23,  -241,  -241,  -241,  -241,   -29,   -30,
+   -31,   -32,   -33,   -34,   -35,   -37,   -41,   -44,   -47,   -52,
+   -55,   -57,   -59,   -61,   -63,   -65,   -68,   -79,  -168,  -241,
+  -241,  -238,  -241,  -241,  -241,  -140,  -241,  -142,  -147,  -149,
+  -153,  -138,  -146,  -241,   -84,   -85,  -241,   -99,  -241,  -241,
+  -120,  -119,  -113,  -116,  -241,  -121,  -123,  -124,  -241,  -241,
+  -241,  -185,  -241,  -241,   -11,  -241,  -241,   -67,  -154,   -20,
+  -241,  -241,  -241,  -241,   -18,   -19,   -24,  -241,   -25,  -241,
+   -27,   -28,  -241,  -241,  -241,  -241,  -241,  -241,  -241,  -241,
+  -241,  -241,  -241,  -241,  -241,  -241,  -241,  -241,  -241,  -241,
+  -241,  -241,  -172,  -241,  -239,   -35,  -241,  -190,  -191,  -192,
+  -193,  -194,  -195,  -196,  -197,  -198,  -199,  -200,  -201,  -241,
+  -241,  -241,  -241,  -241,  -238,  -241,  -241,  -211,  -241,  -241,
+  -241,  -241,  -241,  -139,  -141,  -241,  -156,  -241,  -151,  -152,
+  -157,  -241,  -241,  -104,  -103,   -97,  -100,  -241,  -109,  -111,
+  -112,  -118,  -241,  -129,  -131,  -125,  -187,  -240,    -9,  -241,
+  -155,  -156,  -241,  -241,   -21,   -20,  -241,   -16,   -17,  -241,
+   -38,   -39,   -40,   -42,   -43,   -45,   -46,   -48,   -49,   -50,
+   -51,   -53,   -54,   -56,   -58,   -60,   -62,   -64,  -241,  -169,
+  -241,  -241,  -241,  -219,  -220,  -221,  -222,  -223,  -224,  -225,
+  -226,  -227,  -228,  -229,  -241,  -241,  -241,  -241,  -241,  -241,
+  -241,  -241,  -241,  -213,  -214,  -241,  -216,  -217,  -241,  -150,
+  -158,  -241,  -164,  -241,  -241,  -241,  -160,  -241,   -95,  -102,
+  -241,  -122,   -36,   -13,  -241,  -241,   -15,   -26,  -241,  -170,
+  -173,  -171,  -241,  -241,  -241,  -241,  -241,  -241,  -208,  -241,
+  -210,  -212,  -215,  -241,  -159,  -165,  -162,  -241,  -166,  -241,
+  -161,  -110,   -22,   -14,   -66,  -218,  -241,  -241,  -241,  -241,
+  -241,  -209,  -148,  -163,  -167,  -202,  -204,  -241,  -241,  -207,
+  -241,  -241,  -241,  -203,  -205,  -241,  -241,  -206 ]
+
+racc_goto_table = [
+    48,     4,   144,   146,    54,    57,    58,   217,    84,    12,
+   136,   137,    78,   175,   258,   136,   273,   165,   188,   190,
+   191,   186,    72,    89,   256,    93,   176,   163,    70,     4,
+    33,   156,   249,    29,   283,   284,   302,    12,   152,    14,
+   330,     2,    71,   293,   155,    89,   215,    90,    89,   287,
+   288,   289,   290,   294,   170,   295,    97,    98,    33,    83,
+   270,    69,    70,    70,    92,   330,   296,    14,   100,   159,
+   102,   297,    88,   101,   136,   212,    71,    71,   285,   286,
+   150,    61,   274,   153,   276,   158,    92,    62,   166,    92,
+   175,   264,   175,   154,    88,   316,   163,    88,   252,   280,
+   281,   282,    70,   279,   136,   246,   291,   292,   257,    64,
+   164,   155,   345,   298,   155,   263,    71,    89,   180,   329,
+   256,   211,    28,    99,    76,   143,     1,   nil,   nil,   nil,
+   nil,   nil,   nil,   271,   215,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   325,   nil,   248,   nil,   nil,   nil,
+   nil,   nil,   158,   nil,   259,   158,   nil,   320,    92,   nil,
+   154,   nil,   nil,   154,   nil,   nil,    88,   nil,   266,   nil,
+   136,   nil,   nil,   337,   nil,   nil,   342,   nil,   274,    70,
+   nil,   nil,   nil,   358,   nil,   360,   136,   341,   nil,   nil,
+   nil,   nil,   nil,    71,   nil,   nil,   371,   nil,   nil,   nil,
+   nil,   nil,   246,   nil,   nil,   352,   nil,   nil,   nil,    78,
+   155,   nil,   102,   nil,   nil,   nil,   nil,   353,   354,   nil,
+   356,   357,   215,   381,   215,   nil,   nil,   271,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   136,   350,   nil,   nil,   nil,
+   385,   386,   nil,   nil,   150,   nil,   150,   372,   nil,   nil,
+   nil,   158,   nil,   nil,   393,   nil,   367,   369,   166,   154,
+   397,   nil,   215,   nil,   nil,   nil,   nil,   nil,   nil,   136,
+   nil,   150,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   215,
+   215,   387,   388,   374,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   215,   nil,   395,   nil,   nil,   nil,   215,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   150,   nil,   259 ]
+
+racc_goto_check = [
+    32,    27,    25,    55,    27,    27,    27,    68,    53,    34,
+    24,    33,    54,     6,    44,    24,     8,    49,    10,    10,
+    10,    12,    43,    35,    41,    51,    13,    47,    30,    27,
+    26,    38,    58,    62,    14,    14,    77,    34,    53,    36,
+    59,     2,     9,    18,    35,    35,    10,    46,    35,    16,
+    16,    16,    16,    19,    51,    20,    43,    43,    26,     9,
+    58,    62,    30,    30,    27,    59,    21,    36,    32,    46,
+    32,    22,    34,    31,    24,    33,     9,     9,    15,    15,
+    27,    37,     6,    39,     6,    27,    27,    40,    32,    27,
+     6,    25,     6,    34,    34,    68,    47,    34,    38,    12,
+    12,    12,    30,    13,    24,    53,    17,    17,    42,    45,
+    48,    35,     8,     6,    35,    52,     9,    35,     9,    57,
+    41,    60,    61,    65,    66,    67,     1,   nil,   nil,   nil,
+   nil,   nil,   nil,    53,    10,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,     6,   nil,    32,   nil,   nil,   nil,
+   nil,   nil,    27,   nil,    32,    27,   nil,    25,    27,   nil,
+    34,   nil,   nil,    34,   nil,   nil,    34,   nil,    32,   nil,
+    24,   nil,   nil,    25,   nil,   nil,    12,   nil,     6,    30,
+   nil,   nil,   nil,    68,   nil,    68,    24,    49,   nil,   nil,
+   nil,   nil,   nil,     9,   nil,   nil,    44,   nil,   nil,   nil,
+   nil,   nil,    53,   nil,   nil,     6,   nil,   nil,   nil,    54,
+    35,   nil,    32,   nil,   nil,   nil,   nil,     6,     6,   nil,
+     6,     6,    10,    68,    10,   nil,   nil,    53,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,    24,    33,   nil,   nil,   nil,
+    68,    68,   nil,   nil,    27,   nil,    27,     6,   nil,   nil,
+   nil,    27,   nil,   nil,    68,   nil,    25,    55,    32,    34,
+    68,   nil,    10,   nil,   nil,   nil,   nil,   nil,   nil,    24,
+   nil,    27,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    10,
+    10,     6,     6,    24,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,    10,   nil,     6,   nil,   nil,   nil,    10,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,    27,   nil,    32 ]
+
+racc_goto_pointer = [
+   nil,   126,    41,   nil,   nil,   nil,   -97,   nil,  -163,     6,
+   -97,   nil,   -93,   -84,  -161,  -119,  -150,   -97,  -162,  -153,
+  -152,  -142,  -138,   nil,   -65,   -78,    28,    -1,   nil,   nil,
+    -8,    -1,    -4,   -64,     7,   -42,    37,    59,   -55,    -2,
+    65,  -132,   -50,   -14,  -144,    86,   -18,   -63,    18,   -75,
+   nil,   -42,   -53,   -45,   -37,   -78,   nil,  -126,  -118,  -206,
+   -18,   120,    31,   nil,   nil,    51,    76,    48,  -136,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,  -179 ]
+
+racc_goto_default = [
+   nil,   nil,   nil,   112,   103,   109,   242,   113,   nil,     7,
+   124,   114,   125,   nil,   126,   127,   128,   129,   130,   131,
+   132,   133,   134,   135,   177,   138,   218,   216,    46,     5,
+     6,    47,    82,   nil,    55,    13,    56,   nil,   nil,   nil,
+   nil,   157,   nil,   178,   nil,   nil,   nil,    91,   nil,   nil,
+    24,   nil,    94,    49,    50,   333,   148,   149,   331,   250,
+   nil,   nil,   nil,    31,    32,   nil,   225,   nil,   nil,   219,
+   220,   221,   222,   223,   224,   226,   227,   nil ]
+
+racc_reduce_table = [
+  0, 0, :racc_error,
+  1, 97, :_reduce_none,
+  1, 99, :_reduce_2,
+  1, 99, :_reduce_3,
+  1, 99, :_reduce_4,
+  1, 99, :_reduce_5,
+  1, 99, :_reduce_6,
+  1, 99, :_reduce_7,
+  1, 99, :_reduce_8,
+  3, 99, :_reduce_9,
+  1, 101, :_reduce_10,
+  2, 101, :_reduce_11,
+  1, 103, :_reduce_none,
+  4, 103, :_reduce_none,
+  5, 103, :_reduce_none,
+  4, 103, :_reduce_15,
+  3, 103, :_reduce_16,
+  3, 103, :_reduce_17,
+  2, 103, :_reduce_18,
+  2, 103, :_reduce_19,
+  0, 104, :_reduce_none,
+  1, 104, :_reduce_none,
+  3, 104, :_reduce_none,
+  1, 106, :_reduce_none,
+  2, 106, :_reduce_24,
+  2, 106, :_reduce_25,
+  4, 106, :_reduce_26,
+  2, 106, :_reduce_27,
+  2, 106, :_reduce_28,
+  1, 107, :_reduce_29,
+  1, 107, :_reduce_30,
+  1, 107, :_reduce_31,
+  1, 107, :_reduce_32,
+  1, 107, :_reduce_33,
+  1, 107, :_reduce_34,
+  1, 108, :_reduce_none,
+  4, 108, :_reduce_36,
+  1, 110, :_reduce_none,
+  3, 110, :_reduce_38,
+  3, 110, :_reduce_39,
+  3, 110, :_reduce_40,
+  1, 111, :_reduce_none,
+  3, 111, :_reduce_42,
+  3, 111, :_reduce_43,
+  1, 112, :_reduce_none,
+  3, 112, :_reduce_45,
+  3, 112, :_reduce_46,
+  1, 113, :_reduce_none,
+  3, 113, :_reduce_48,
+  3, 113, :_reduce_49,
+  3, 113, :_reduce_50,
+  3, 113, :_reduce_51,
+  1, 114, :_reduce_none,
+  3, 114, :_reduce_53,
+  3, 114, :_reduce_54,
+  1, 115, :_reduce_none,
+  3, 115, :_reduce_56,
+  1, 116, :_reduce_none,
+  3, 116, :_reduce_58,
+  1, 117, :_reduce_none,
+  3, 117, :_reduce_60,
+  1, 118, :_reduce_none,
+  3, 118, :_reduce_62,
+  1, 119, :_reduce_none,
+  3, 119, :_reduce_64,
+  1, 120, :_reduce_none,
+  5, 120, :_reduce_66,
+  1, 102, :_reduce_67,
+  1, 121, :_reduce_68,
+  3, 122, :_reduce_none,
+  1, 123, :_reduce_70,
+  1, 123, :_reduce_none,
+  1, 123, :_reduce_72,
+  2, 123, :_reduce_73,
+  2, 123, :_reduce_74,
+  2, 123, :_reduce_75,
+  1, 124, :_reduce_76,
+  3, 124, :_reduce_77,
+  1, 127, :_reduce_none,
+  3, 127, :_reduce_79,
+  1, 126, :_reduce_80,
+  1, 126, :_reduce_81,
+  1, 126, :_reduce_82,
+  1, 126, :_reduce_83,
+  1, 126, :_reduce_84,
+  1, 126, :_reduce_85,
+  1, 126, :_reduce_86,
+  1, 126, :_reduce_87,
+  1, 126, :_reduce_88,
+  1, 126, :_reduce_89,
+  1, 126, :_reduce_90,
+  1, 126, :_reduce_91,
+  1, 126, :_reduce_92,
+  1, 126, :_reduce_93,
+  0, 135, :_reduce_94,
+  6, 130, :_reduce_95,
+  0, 136, :_reduce_96,
+  5, 130, :_reduce_97,
+  2, 130, :_reduce_98,
+  1, 134, :_reduce_none,
+  2, 134, :_reduce_none,
+  1, 133, :_reduce_101,
+  3, 137, :_reduce_102,
+  2, 137, :_reduce_none,
+  2, 137, :_reduce_none,
+  1, 139, :_reduce_none,
+  2, 139, :_reduce_106,
+  1, 139, :_reduce_107,
+  2, 139, :_reduce_108,
+  1, 138, :_reduce_109,
+  3, 138, :_reduce_110,
+  1, 140, :_reduce_none,
+  5, 131, :_reduce_none,
+  4, 131, :_reduce_none,
+  2, 131, :_reduce_none,
+  1, 142, :_reduce_none,
+  2, 142, :_reduce_none,
+  1, 141, :_reduce_none,
+  3, 143, :_reduce_none,
+  2, 143, :_reduce_none,
+  2, 143, :_reduce_none,
+  1, 144, :_reduce_none,
+  3, 144, :_reduce_none,
+  1, 145, :_reduce_none,
+  4, 132, :_reduce_none,
+  5, 132, :_reduce_none,
+  2, 132, :_reduce_none,
+  1, 146, :_reduce_127,
+  1, 147, :_reduce_none,
+  3, 147, :_reduce_none,
+  1, 148, :_reduce_none,
+  3, 148, :_reduce_none,
+  1, 105, :_reduce_132,
+  1, 105, :_reduce_133,
+  2, 128, :_reduce_134,
+  1, 128, :_reduce_none,
+  2, 128, :_reduce_136,
+  1, 150, :_reduce_137,
+  3, 150, :_reduce_138,
+  4, 150, :_reduce_139,
+  3, 150, :_reduce_140,
+  4, 150, :_reduce_141,
+  3, 150, :_reduce_142,
+  1, 149, :_reduce_143,
+  2, 149, :_reduce_144,
+  2, 149, :_reduce_145,
+  3, 149, :_reduce_146,
+  1, 151, :_reduce_none,
+  5, 151, :_reduce_none,
+  1, 152, :_reduce_none,
+  3, 152, :_reduce_none,
+  2, 153, :_reduce_none,
+  2, 153, :_reduce_none,
+  1, 153, :_reduce_none,
+  1, 109, :_reduce_none,
+  2, 109, :_reduce_none,
+  1, 154, :_reduce_none,
+  1, 154, :_reduce_none,
+  2, 154, :_reduce_none,
+  3, 155, :_reduce_none,
+  2, 155, :_reduce_none,
+  3, 155, :_reduce_none,
+  3, 155, :_reduce_none,
+  4, 155, :_reduce_none,
+  2, 155, :_reduce_164,
+  3, 155, :_reduce_none,
+  3, 155, :_reduce_166,
+  4, 155, :_reduce_none,
+  1, 129, :_reduce_168,
+  3, 129, :_reduce_169,
+  4, 129, :_reduce_170,
+  4, 129, :_reduce_171,
+  1, 156, :_reduce_172,
+  3, 156, :_reduce_173,
+  0, 98, :_reduce_none,
+  2, 98, :_reduce_none,
+  1, 157, :_reduce_none,
+  2, 157, :_reduce_none,
+  1, 158, :_reduce_none,
+  1, 158, :_reduce_none,
+  2, 158, :_reduce_none,
+  2, 158, :_reduce_none,
+  1, 158, :_reduce_none,
+  1, 158, :_reduce_none,
+  1, 158, :_reduce_none,
+  4, 159, :_reduce_185,
+  1, 161, :_reduce_186,
+  3, 161, :_reduce_187,
+  3, 160, :_reduce_none,
+  0, 163, :_reduce_none,
+  2, 163, :_reduce_none,
+  1, 164, :_reduce_none,
+  1, 164, :_reduce_none,
+  1, 164, :_reduce_none,
+  1, 164, :_reduce_none,
+  1, 164, :_reduce_none,
+  1, 164, :_reduce_none,
+  1, 164, :_reduce_none,
+  1, 164, :_reduce_none,
+  1, 164, :_reduce_none,
+  1, 164, :_reduce_none,
+  1, 164, :_reduce_none,
+  5, 165, :_reduce_none,
+  7, 165, :_reduce_none,
+  5, 166, :_reduce_none,
+  7, 167, :_reduce_none,
+  9, 168, :_reduce_none,
+  5, 169, :_reduce_none,
+  3, 170, :_reduce_none,
+  4, 170, :_reduce_none,
+  3, 170, :_reduce_none,
+  3, 162, :_reduce_none,
+  3, 171, :_reduce_none,
+  2, 171, :_reduce_none,
+  2, 171, :_reduce_none,
+  3, 171, :_reduce_none,
+  2, 171, :_reduce_none,
+  2, 172, :_reduce_none,
+  4, 172, :_reduce_none,
+  1, 173, :_reduce_none,
+  1, 173, :_reduce_none,
+  1, 173, :_reduce_none,
+  1, 173, :_reduce_none,
+  1, 173, :_reduce_none,
+  1, 173, :_reduce_none,
+  1, 173, :_reduce_none,
+  1, 173, :_reduce_none,
+  1, 173, :_reduce_none,
+  1, 173, :_reduce_none,
+  1, 173, :_reduce_none,
+  1, 125, :_reduce_none,
+  1, 125, :_reduce_none,
+  1, 125, :_reduce_none,
+  1, 125, :_reduce_none,
+  1, 125, :_reduce_none,
+  1, 125, :_reduce_none,
+  1, 125, :_reduce_none,
+  1, 125, :_reduce_none,
+  1, 100, :_reduce_238,
+  2, 100, :_reduce_239,
+  3, 100, :_reduce_240 ]
+
+racc_reduce_n = 241
+
+racc_shift_n = 398
+
+racc_token_table = {
+  false => 0,
+  :error => 1,
+  :INTEGER_CONSTANT => 2,
+  :FLOATING_CONSTANT => 3,
+  :OCTAL_CONSTANT => 4,
+  :HEX_CONSTANT => 5,
+  :CHARACTER_LITERAL => 6,
+  "(" => 7,
+  ")" => 8,
+  :STRING_LITERAL => 9,
+  "[" => 10,
+  "]" => 11,
+  "." => 12,
+  :IDENTIFIER => 13,
+  "->" => 14,
+  "++" => 15,
+  "--" => 16,
+  "," => 17,
+  :SIZEOF => 18,
+  "&" => 19,
+  "*" => 20,
+  "+" => 21,
+  "-" => 22,
+  "~" => 23,
+  "!" => 24,
+  "/" => 25,
+  "%" => 26,
+  "<<" => 27,
+  ">>" => 28,
+  "<" => 29,
+  ">" => 30,
+  "<=" => 31,
+  ">=" => 32,
+  "==" => 33,
+  "!=" => 34,
+  "^" => 35,
+  "|" => 36,
+  "&&" => 37,
+  "||" => 38,
+  "?" => 39,
+  ":" => 40,
+  ";" => 41,
+  "=" => 42,
+  :VOID => 43,
+  :FLOAT => 44,
+  :DOUBLE => 45,
+  :BOOL => 46,
+  :TYPE_NAME => 47,
+  :CHAR => 48,
+  :SHORT => 49,
+  :INT => 50,
+  :LONG => 51,
+  :SIGNED => 52,
+  :UNSIGNED => 53,
+  :STRUCT => 54,
+  "{" => 55,
+  "}" => 56,
+  :UNION => 57,
+  :ENUM => 58,
+  :CONST => 59,
+  :VOLATILE => 60,
+  :C_EXP => 61,
+  :EXTENSION => 62,
+  :TYPEDEF => 63,
+  :IF => 64,
+  :ELSE => 65,
+  :WHILE => 66,
+  :DO => 67,
+  :FOR => 68,
+  :SWITCH => 69,
+  :infunc_statment => 70,
+  :CASE => 71,
+  :DEFAULT => 72,
+  :GOTO => 73,
+  :CONTINUE => 74,
+  :BREAK => 75,
+  :RETURN => 76,
+  "+=" => 77,
+  "-=" => 78,
+  "*=" => 79,
+  "/=" => 80,
+  "%=" => 81,
+  "<<=" => 82,
+  ">>=" => 83,
+  "&=" => 84,
+  "|=" => 85,
+  "^=" => 86,
+  :__INLINE__ => 87,
+  :INLINE => 88,
+  :__INLINE => 89,
+  :CINLINE => 90,
+  :EXTERN => 91,
+  :STATIC => 92,
+  :AUTO => 93,
+  :REGISTER => 94,
+  "::" => 95 }
+
+racc_nt_base = 96
+
+racc_use_result_var = true
+
+Racc_arg = [
+  racc_action_table,
+  racc_action_check,
+  racc_action_default,
+  racc_action_pointer,
+  racc_goto_table,
+  racc_goto_check,
+  racc_goto_default,
+  racc_goto_pointer,
+  racc_nt_base,
+  racc_reduce_table,
+  racc_token_table,
+  racc_shift_n,
+  racc_reduce_n,
+  racc_use_result_var ]
+
+Racc_token_to_s_table = [
+  "$end",
+  "error",
+  "INTEGER_CONSTANT",
+  "FLOATING_CONSTANT",
+  "OCTAL_CONSTANT",
+  "HEX_CONSTANT",
+  "CHARACTER_LITERAL",
+  "\"(\"",
+  "\")\"",
+  "STRING_LITERAL",
+  "\"[\"",
+  "\"]\"",
+  "\".\"",
+  "IDENTIFIER",
+  "\"->\"",
+  "\"++\"",
+  "\"--\"",
+  "\",\"",
+  "SIZEOF",
+  "\"&\"",
+  "\"*\"",
+  "\"+\"",
+  "\"-\"",
+  "\"~\"",
+  "\"!\"",
+  "\"/\"",
+  "\"%\"",
+  "\"<<\"",
+  "\">>\"",
+  "\"<\"",
+  "\">\"",
+  "\"<=\"",
+  "\">=\"",
+  "\"==\"",
+  "\"!=\"",
+  "\"^\"",
+  "\"|\"",
+  "\"&&\"",
+  "\"||\"",
+  "\"?\"",
+  "\":\"",
+  "\";\"",
+  "\"=\"",
+  "VOID",
+  "FLOAT",
+  "DOUBLE",
+  "BOOL",
+  "TYPE_NAME",
+  "CHAR",
+  "SHORT",
+  "INT",
+  "LONG",
+  "SIGNED",
+  "UNSIGNED",
+  "STRUCT",
+  "\"{\"",
+  "\"}\"",
+  "UNION",
+  "ENUM",
+  "CONST",
+  "VOLATILE",
+  "C_EXP",
+  "EXTENSION",
+  "TYPEDEF",
+  "IF",
+  "ELSE",
+  "WHILE",
+  "DO",
+  "FOR",
+  "SWITCH",
+  "infunc_statment",
+  "CASE",
+  "DEFAULT",
+  "GOTO",
+  "CONTINUE",
+  "BREAK",
+  "RETURN",
+  "\"+=\"",
+  "\"-=\"",
+  "\"*=\"",
+  "\"/=\"",
+  "\"%=\"",
+  "\"<<=\"",
+  "\">>=\"",
+  "\"&=\"",
+  "\"|=\"",
+  "\"^=\"",
+  "__INLINE__",
+  "INLINE",
+  "__INLINE",
+  "CINLINE",
+  "EXTERN",
+  "STATIC",
+  "AUTO",
+  "REGISTER",
+  "\"::\"",
+  "$start",
+  "all",
+  "C_parser",
+  "primary_expression",
+  "namespace_identifier",
+  "string_literal_list",
+  "expression",
+  "postfix_expression",
+  "argument_list",
+  "type_qualifier",
+  "unary_expression",
+  "unary_operator",
+  "cast_expression",
+  "type_name",
+  "multiplicative_expression",
+  "additive_expression",
+  "shift_expression",
+  "relational_expression",
+  "equality_expression",
+  "and_expression",
+  "exclusive_or_expression",
+  "inclusive_or_expression",
+  "logical_and_expression",
+  "logical_or_expression",
+  "conditional_expression",
+  "constant_expression",
+  "declaration",
+  "declaration_specifiers",
+  "init_declarator_list",
+  "storage_class",
+  "type_specifier",
+  "init_declarator",
+  "declarator",
+  "initializer",
+  "struct_specifier",
+  "union_specifier",
+  "enum_specifier",
+  "struct_tag",
+  "struct_declaration_list",
+  "@1",
+  "@2",
+  "struct_declaration",
+  "struct_declarator_list",
+  "type_specifier_qualifier_list",
+  "struct_declarator",
+  "union_tag",
+  "union_declaration_list",
+  "union_declaration",
+  "union_declarator_list",
+  "union_declarator",
+  "enum_type",
+  "enumerator_list",
+  "enumerator",
+  "pointer",
+  "direct_declarator",
+  "parameter_type_list",
+  "parameter_list",
+  "parameter_declaration",
+  "abstract_declarator",
+  "direct_abstract_declarator",
+  "initializer_list",
+  "extension_statement",
+  "statement",
+  "typedef",
+  "func_def",
+  "declarator_list",
+  "compoundstatement",
+  "infunc_statement_list",
+  "infunc_statement",
+  "ifstatement",
+  "whilestatement",
+  "dowhilestatement",
+  "forstatement",
+  "switchstatement",
+  "labelstatement",
+  "gotostatement",
+  "expressionstatement",
+  "assignment_operator" ]
+
+Racc_debug_parser = false
+
+##### State transition tables end #####
+
+# reduce 0 omitted
+
+# reduce 1 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 52)
+  def _reduce_2(val, _values, result)
+     result = [ :IDENTIFIER, val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 60)
+  def _reduce_3(val, _values, result)
+     result = [ :INTEGER_CONSTANT, val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 62)
+  def _reduce_4(val, _values, result)
+     result = [ :FLOATING_CONSTANT, val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 64)
+  def _reduce_5(val, _values, result)
+     result = [ :OCTAL_CONSTANT, val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 66)
+  def _reduce_6(val, _values, result)
+     result = [ :HEX_CONSTANT, val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 68)
+  def _reduce_7(val, _values, result)
+     result = [ :CHARACTER_LITERAL, val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 70)
+  def _reduce_8(val, _values, result)
+     result = [ :STRING_LITERAL_LIST, val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 72)
+  def _reduce_9(val, _values, result)
+     result = [ :PARENTHESES, val[1].get_elements ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 76)
+  def _reduce_10(val, _values, result)
+     result = [val[0]] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 78)
+  def _reduce_11(val, _values, result)
+     result << val[1] 
+    result
+  end
+.,.,
+
+# reduce 12 omitted
+
+# reduce 13 omitted
+
+# reduce 14 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 86)
+  def _reduce_15(val, _values, result)
+     result = [ :OP_SUBSC, val[0], val[2] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 88)
+  def _reduce_16(val, _values, result)
+     result = [ :OP_DOT, val[0], val[2] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 90)
+  def _reduce_17(val, _values, result)
+     result = [ :OP_REF, val[0], val[2] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 91)
+  def _reduce_18(val, _values, result)
+     result = val[0] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 92)
+  def _reduce_19(val, _values, result)
+     result = val[0] 
+    result
+  end
+.,.,
+
+# reduce 20 omitted
+
+# reduce 21 omitted
+
+# reduce 22 omitted
+
+# reduce 23 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 104)
+  def _reduce_24(val, _values, result)
+     result = [ val[0], val[1] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 106)
+  def _reduce_25(val, _values, result)
+     result = [ :OP_SIZEOF_EXPR, val[1] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 108)
+  def _reduce_26(val, _values, result)
+     result = [ :OP_SIZEOF_TYPE, val[1] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 109)
+  def _reduce_27(val, _values, result)
+     result = val[1] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 110)
+  def _reduce_28(val, _values, result)
+     result = val[1] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 113)
+  def _reduce_29(val, _values, result)
+     result = :OP_U_AMP 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 114)
+  def _reduce_30(val, _values, result)
+     result = :OP_U_ASTER 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 115)
+  def _reduce_31(val, _values, result)
+     result = :OP_U_PLUS 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 116)
+  def _reduce_32(val, _values, result)
+     result = :OP_U_MINUS 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 117)
+  def _reduce_33(val, _values, result)
+     result = :OP_U_TILDE 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 118)
+  def _reduce_34(val, _values, result)
+     result = :OP_U_EXCLAM 
+    result
+  end
+.,.,
+
+# reduce 35 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 123)
+  def _reduce_36(val, _values, result)
+      result = [ :CAST, val[1], val[3] ] 
+    result
+  end
+.,.,
+
+# reduce 37 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 128)
+  def _reduce_38(val, _values, result)
+     result = [ :OP_MULT, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 130)
+  def _reduce_39(val, _values, result)
+     result = [ :OP_DIV, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 132)
+  def _reduce_40(val, _values, result)
+     result = [ :OP_REMAIN, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 41 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 137)
+  def _reduce_42(val, _values, result)
+     result = [ :OP_ADD, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 139)
+  def _reduce_43(val, _values, result)
+     result = [ :OP_SUB, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 44 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 144)
+  def _reduce_45(val, _values, result)
+     result = [ :OP_LSFT, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 146)
+  def _reduce_46(val, _values, result)
+     result = [ :OP_RSFT, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 47 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 151)
+  def _reduce_48(val, _values, result)
+     result = [ :OP_LT, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 153)
+  def _reduce_49(val, _values, result)
+     result = [ :OP_GT, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 155)
+  def _reduce_50(val, _values, result)
+     result = [ :OP_LE, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 157)
+  def _reduce_51(val, _values, result)
+     result = [ :OP_GE, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 52 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 162)
+  def _reduce_53(val, _values, result)
+     result = [ :OP_EQ, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 164)
+  def _reduce_54(val, _values, result)
+     result = [ :OP_NE, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 55 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 169)
+  def _reduce_56(val, _values, result)
+     result = [ :OP_AND, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 57 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 174)
+  def _reduce_58(val, _values, result)
+     result = [ :OP_EOR, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 59 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 179)
+  def _reduce_60(val, _values, result)
+     result = [ :OP_OR, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 61 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 184)
+  def _reduce_62(val, _values, result)
+     result = [ :OP_LAND, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 63 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 189)
+  def _reduce_64(val, _values, result)
+     result = [ :OP_LOR, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 65 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 194)
+  def _reduce_66(val, _values, result)
+     result = [ :OP_CEX, val[0], val[2].get_elements, val[4] ]  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 201)
+  def _reduce_67(val, _values, result)
+    			result = Expression.new( val[0] )
+			# result.print
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 208)
+  def _reduce_68(val, _values, result)
+    			result = Expression.new( val[0] )
+			# result.print
+#			res = result.eval_const( nil )
+
+			# if res then
+			#   puts "val: #{res}"
+			# else
+			#   puts "val: nil"
+			# end
+		
+    result
+  end
+.,.,
+
+# reduce 69 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 237)
+  def _reduce_70(val, _values, result)
+    			result = CIntType.new( -3 )    # storage class ã¯ç¡è¦
+		
+    result
+  end
+.,.,
+
+# reduce 71 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 242)
+  def _reduce_72(val, _values, result)
+    			result = CIntType.new( -3 )
+			result.set_qualifier val[0]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 247)
+  def _reduce_73(val, _values, result)
+    			result = val[1]                # storage class ã¯ç¡è¦
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 251)
+  def _reduce_74(val, _values, result)
+    			result = val[1].merge val[0]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 255)
+  def _reduce_75(val, _values, result)
+    			val[1].set_qualifier val[0]
+                        result = val[1]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 262)
+  def _reduce_76(val, _values, result)
+     result = [val[0]] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 264)
+  def _reduce_77(val, _values, result)
+     result << val[2] 
+    result
+  end
+.,.,
+
+# reduce 78 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 269)
+  def _reduce_79(val, _values, result)
+     val[0].set_initializer( val[2] ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 272)
+  def _reduce_80(val, _values, result)
+     set_no_type_name true; result = CVoidType.new 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 273)
+  def _reduce_81(val, _values, result)
+     set_no_type_name true; result = CFloatType.new(-32) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 274)
+  def _reduce_82(val, _values, result)
+     set_no_type_name true; result = CFloatType.new(-64) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 275)
+  def _reduce_83(val, _values, result)
+     set_no_type_name true; result = CBoolType.new 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 276)
+  def _reduce_84(val, _values, result)
+     set_no_type_name true; result = val[0] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 277)
+  def _reduce_85(val, _values, result)
+     set_no_type_name true; result = CVoidType.new 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 278)
+  def _reduce_86(val, _values, result)
+     set_no_type_name true; result = CVoidType.new 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 279)
+  def _reduce_87(val, _values, result)
+     set_no_type_name true; result = CDefinedType.new( val[0].val ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 281)
+  def _reduce_88(val, _values, result)
+     set_no_type_name true; result = CIntType.new(-11 ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 282)
+  def _reduce_89(val, _values, result)
+     set_no_type_name true; result = CIntType.new( -2 ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 283)
+  def _reduce_90(val, _values, result)
+     set_no_type_name true; result = CIntType.new( -3 ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 284)
+  def _reduce_91(val, _values, result)
+     set_no_type_name true; result = CIntType.new( -4 ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 287)
+  def _reduce_92(val, _values, result)
+    			set_no_type_name true
+			result = CIntType.new( -3 )
+			result.set_sign :SIGNED
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 293)
+  def _reduce_93(val, _values, result)
+    			set_no_type_name true
+			result = CIntType.new( -3 )
+			result.set_sign :UNSIGNED
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 301)
+  def _reduce_94(val, _values, result)
+     StructType.set_define( true )  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 304)
+  def _reduce_95(val, _values, result)
+    			StructType.end_of_parse
+			result = val[1]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 309)
+  def _reduce_96(val, _values, result)
+    			result = CStructType.new()
+			StructType.set_define( true )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 314)
+  def _reduce_97(val, _values, result)
+    			StructType.end_of_parse
+			result = val[1]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 319)
+  def _reduce_98(val, _values, result)
+    			StructType.set_define( false )
+			StructType.end_of_parse
+			result = val[1]
+		
+    result
+  end
+.,.,
+
+# reduce 99 omitted
+
+# reduce 100 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 331)
+  def _reduce_101(val, _values, result)
+    			result = CStructType.new( val[0].val )
+			set_no_type_name true
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 340)
+  def _reduce_102(val, _values, result)
+    			val[1].each { |i|	# i: Decl
+				i.set_type( val[0] )
+				i.set_kind( :MEMBER )
+				i.check
+				CStructType.new_member( i )
+			}
+			result = val[1]
+		
+    result
+  end
+.,.,
+
+# reduce 103 omitted
+
+# reduce 104 omitted
+
+# reduce 105 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 359)
+  def _reduce_106(val, _values, result)
+    			result = val[1].merge val[0]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 363)
+  def _reduce_107(val, _values, result)
+    			result = CIntType.new( -3 )
+			result.set_qualifier val[0]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 368)
+  def _reduce_108(val, _values, result)
+    			val[1].set_qualifier val[0]
+                        result = val[1]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 374)
+  def _reduce_109(val, _values, result)
+     result = [ val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 376)
+  def _reduce_110(val, _values, result)
+     result << val[2] 
+    result
+  end
+.,.,
+
+# reduce 111 omitted
+
+# reduce 112 omitted
+
+# reduce 113 omitted
+
+# reduce 114 omitted
+
+# reduce 115 omitted
+
+# reduce 116 omitted
+
+# reduce 117 omitted
+
+# reduce 118 omitted
+
+# reduce 119 omitted
+
+# reduce 120 omitted
+
+# reduce 121 omitted
+
+# reduce 122 omitted
+
+# reduce 123 omitted
+
+# reduce 124 omitted
+
+# reduce 125 omitted
+
+# reduce 126 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 418)
+  def _reduce_127(val, _values, result)
+     result = CEnumType.new( -1 ) 
+    result
+  end
+.,.,
+
+# reduce 128 omitted
+
+# reduce 129 omitted
+
+# reduce 130 omitted
+
+# reduce 131 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 434)
+  def _reduce_132(val, _values, result)
+     result = :CONST 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 435)
+  def _reduce_133(val, _values, result)
+     result = :VOLATILE 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 440)
+  def _reduce_134(val, _values, result)
+    			val[1].set_type( val[0] )
+			result = val[1]
+		
+    result
+  end
+.,.,
+
+# reduce 135 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 446)
+  def _reduce_136(val, _values, result)
+    			result = Decl.new( val[1].val )
+			result.set_type( val[0] )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 452)
+  def _reduce_137(val, _values, result)
+     result = Decl.new( val[0].val ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 454)
+  def _reduce_138(val, _values, result)
+     result = val[1] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 457)
+  def _reduce_139(val, _values, result)
+    			val[0].set_type( CArrayType.new( val[2] ) )
+			result = val[0]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 462)
+  def _reduce_140(val, _values, result)
+    			val[0].set_type( CArrayType.new )
+			result = val[0]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 467)
+  def _reduce_141(val, _values, result)
+    		# 	Generator.warning( "W6001 need 'void' for no parameter"  )
+			val[0].set_type( CFuncType.new )
+			result = val[0]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 475)
+  def _reduce_142(val, _values, result)
+    		# 	Generator.warning( "W6002 need 'void' for no parameter"  )
+			val[0].set_type( CFuncType.new )
+			result = val[0]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 482)
+  def _reduce_143(val, _values, result)
+     result = CPtrType.new 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 485)
+  def _reduce_144(val, _values, result)
+    			result = CPtrType.new
+			result.set_qualifier( val[1] )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 490)
+  def _reduce_145(val, _values, result)
+    			val[1].set_type(CPtrType.new)
+			result = val[1]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 495)
+  def _reduce_146(val, _values, result)
+    			ptrtype = CPtrType.new
+			ptrtype.set_qualifier( val[1] )
+			val[2].set_type( ptrtype )
+			result = val[2]
+		
+    result
+  end
+.,.,
+
+# reduce 147 omitted
+
+# reduce 148 omitted
+
+# reduce 149 omitted
+
+# reduce 150 omitted
+
+# reduce 151 omitted
+
+# reduce 152 omitted
+
+# reduce 153 omitted
+
+# reduce 154 omitted
+
+# reduce 155 omitted
+
+# reduce 156 omitted
+
+# reduce 157 omitted
+
+# reduce 158 omitted
+
+# reduce 159 omitted
+
+# reduce 160 omitted
+
+# reduce 161 omitted
+
+# reduce 162 omitted
+
+# reduce 163 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 559)
+  def _reduce_164(val, _values, result)
+    			Generator.warning( "W6003 need 'void' for no parameter"  )
+		
+    result
+  end
+.,.,
+
+# reduce 165 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 564)
+  def _reduce_166(val, _values, result)
+    			Generator.warning( "W6004 need 'void' for no parameter"  )
+		
+    result
+  end
+.,.,
+
+# reduce 167 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 571)
+  def _reduce_168(val, _values, result)
+     result = val[0] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 573)
+  def _reduce_169(val, _values, result)
+     result = val[1] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 575)
+  def _reduce_170(val, _values, result)
+     result = val[1] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 577)
+  def _reduce_171(val, _values, result)
+     result = C_EXP.new( val[2] ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 582)
+  def _reduce_172(val, _values, result)
+    			result = [ val[0] ]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 586)
+  def _reduce_173(val, _values, result)
+    			val[0] << val[2]
+			result = val[0]
+		
+    result
+  end
+.,.,
+
+# reduce 174 omitted
+
+# reduce 175 omitted
+
+# reduce 176 omitted
+
+# reduce 177 omitted
+
+# reduce 178 omitted
+
+# reduce 179 omitted
+
+# reduce 180 omitted
+
+# reduce 181 omitted
+
+# reduce 182 omitted
+
+# reduce 183 omitted
+
+# reduce 184 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 614)
+  def _reduce_185(val, _values, result)
+    			val[2].each{ |i|
+			   i.set_kind( :TYPEDEF )
+			}
+			Typedef.new_decl_list( val[1], val[2] )
+                        # val[1].show_tree 0
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 623)
+  def _reduce_186(val, _values, result)
+     result = [ val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 625)
+  def _reduce_187(val, _values, result)
+     result << val[2] 
+    result
+  end
+.,.,
+
+# reduce 188 omitted
+
+# reduce 189 omitted
+
+# reduce 190 omitted
+
+# reduce 191 omitted
+
+# reduce 192 omitted
+
+# reduce 193 omitted
+
+# reduce 194 omitted
+
+# reduce 195 omitted
+
+# reduce 196 omitted
+
+# reduce 197 omitted
+
+# reduce 198 omitted
+
+# reduce 199 omitted
+
+# reduce 200 omitted
+
+# reduce 201 omitted
+
+# reduce 202 omitted
+
+# reduce 203 omitted
+
+# reduce 204 omitted
+
+# reduce 205 omitted
+
+# reduce 206 omitted
+
+# reduce 207 omitted
+
+# reduce 208 omitted
+
+# reduce 209 omitted
+
+# reduce 210 omitted
+
+# reduce 211 omitted
+
+# reduce 212 omitted
+
+# reduce 213 omitted
+
+# reduce 214 omitted
+
+# reduce 215 omitted
+
+# reduce 216 omitted
+
+# reduce 217 omitted
+
+# reduce 218 omitted
+
+# reduce 219 omitted
+
+# reduce 220 omitted
+
+# reduce 221 omitted
+
+# reduce 222 omitted
+
+# reduce 223 omitted
+
+# reduce 224 omitted
+
+# reduce 225 omitted
+
+# reduce 226 omitted
+
+# reduce 227 omitted
+
+# reduce 228 omitted
+
+# reduce 229 omitted
+
+# reduce 230 omitted
+
+# reduce 231 omitted
+
+# reduce 232 omitted
+
+# reduce 233 omitted
+
+# reduce 234 omitted
+
+# reduce 235 omitted
+
+# reduce 236 omitted
+
+# reduce 237 omitted
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 706)
+  def _reduce_238(val, _values, result)
+     result = NamespacePath.new( val[0].val, false ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 707)
+  def _reduce_239(val, _values, result)
+     result = NamespacePath.new( val[1].val, true ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'C_parser.y.rb', 709)
+  def _reduce_240(val, _values, result)
+     result = val[0].append!( val[2].val ) 
+    result
+  end
+.,.,
+
+def _reduce_none(val, _values, result)
+  val[0]
+end
+
+end   # class C_parser
+
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/C_parser.y.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/C_parser.y.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/C_parser.y.rb	(revision 270)
@@ -0,0 +1,1015 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: C_parser.y.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+class C_parser
+rule
+# ãããã¬ãã«ã®æ§æè¦ç´ ã¯ C_parser
+all: C_parser
+
+# Expr
+##########################  å¼  ##########################
+# K&Rã®ææ³(ãã­ã°ã©ãã³ã°è¨èªC ç¬¬2ç ä»é²)ã¨ä¸é¨ç°ãªã
+# argument_expression_list(é¢æ°å¼æ°), assignment_expression(ä»£å
+¥)ããªã
+# å¼ã® result ã¯ããã¹ã¦é
+åã§ç¬¬ä¸è¦ç´ ãè­å¥ã·ã³ãã«ãç¬¬äºè¦ç´ ä»¥ä¸ãå¼æ°
+
+primary_expression
+        : namespace_identifier
+		{ result = [ :IDENTIFIER, val[0] ] }     #1ok
+#        : IDENTIFIER	# mikan namespace ã¸ã®å¯¾å¿
+#		{ result = [ :IDENTIFIER, val[0] ] }
+#        | TRUE
+#		{ result = [ :BOOL_CONSTANT, true ] }
+#        | FALSE
+#		{ result = [ :BOOL_CONSTANT, false ] }
+        | INTEGER_CONSTANT
+		{ result = [ :INTEGER_CONSTANT, val[0] ] }
+        | FLOATING_CONSTANT
+		{ result = [ :FLOATING_CONSTANT, val[0] ] }
+        | OCTAL_CONSTANT
+		{ result = [ :OCTAL_CONSTANT, val[0] ] }
+        | HEX_CONSTANT
+		{ result = [ :HEX_CONSTANT, val[0] ] }
+        | CHARACTER_LITERAL
+		{ result = [ :CHARACTER_LITERAL, val[0] ] }
+        | string_literal_list
+		{ result = [ :STRING_LITERAL_LIST, val[0] ] }
+        | '(' expression ')'
+		{ result = [ :PARENTHESES, val[1].get_elements ] }
+
+string_literal_list
+        : STRING_LITERAL
+		{ result = [val[0]] }
+        | string_literal_list STRING_LITERAL
+		{ result << val[1] }
+
+# é¢æ°å¼ã³åºãã¨å¾ç½®ã¤ã³ã¯ãªã¡ã³ãããã¯ãªã¡ã³ãæ¼ç®å­ããªã
+postfix_expression
+        : primary_expression
+        | primary_expression '(' argument_list ')'
+        | primary_expression type_qualifier '(' argument_list ')'    # intended __asm volatile ( "   MNEMONIC  OPERAND" );
+        | postfix_expression '[' expression ']'
+		{ result = [ :OP_SUBSC, val[0], val[2] ] }
+        | postfix_expression '.' IDENTIFIER
+		{ result = [ :OP_DOT, val[0], val[2] ] }
+        | postfix_expression '->' IDENTIFIER
+		{ result = [ :OP_REF, val[0], val[2] ] }
+        | postfix_expression '++'	{ result = val[0] }   # ++, -- ã¯ç¡è¦ãã
+        | postfix_expression '--'	{ result = val[0] }
+
+argument_list
+        :
+        | expression
+        | argument_list ',' expression
+
+
+# åç½®ã¤ã³ã¯ãªã¡ã³ãããã¯ãªã¡ã³ãæ¼ç®å­ããªã
+unary_expression
+        : postfix_expression
+        | unary_operator cast_expression
+		{ result = [ val[0], val[1] ] }
+        | SIZEOF unary_expression
+		{ result = [ :OP_SIZEOF_EXPR, val[1] ] }
+        | SIZEOF '(' type_name ')'
+		{ result = [ :OP_SIZEOF_TYPE, val[1] ] }
+		| '++' unary_expression			{ result = val[1] }   # ++, -- ã¯ç¡è¦ãã
+		| '--' unary_expression			{ result = val[1] }
+
+unary_operator
+        : '&'	{ result = :OP_U_AMP }
+        | '*'	{ result = :OP_U_ASTER }
+        | '+'	{ result = :OP_U_PLUS }
+        | '-'	{ result = :OP_U_MINUS }
+        | '~'	{ result = :OP_U_TILDE }
+        | '!'	{ result = :OP_U_EXCLAM }
+
+cast_expression
+        : unary_expression
+        | '(' type_name ')' cast_expression
+		{  result = [ :CAST, val[1], val[3] ] }
+
+multiplicative_expression
+        : cast_expression
+        | multiplicative_expression '*' cast_expression
+		{ result = [ :OP_MULT, val[0], val[2] ]  }
+        | multiplicative_expression '/' cast_expression
+		{ result = [ :OP_DIV, val[0], val[2] ]  }
+        | multiplicative_expression '%' cast_expression
+		{ result = [ :OP_REMAIN, val[0], val[2] ]  }
+
+additive_expression
+        : multiplicative_expression
+        | additive_expression '+' multiplicative_expression
+		{ result = [ :OP_ADD, val[0], val[2] ]  }
+        | additive_expression '-' multiplicative_expression
+		{ result = [ :OP_SUB, val[0], val[2] ]  }
+
+shift_expression
+        : additive_expression
+        | shift_expression '<<' additive_expression
+		{ result = [ :OP_LSFT, val[0], val[2] ]  }
+        | shift_expression '>>' additive_expression
+		{ result = [ :OP_RSFT, val[0], val[2] ]  }
+
+relational_expression
+        : shift_expression
+        | relational_expression '<' shift_expression
+		{ result = [ :OP_LT, val[0], val[2] ]  }
+        | relational_expression '>' shift_expression
+		{ result = [ :OP_GT, val[0], val[2] ]  }
+        | relational_expression '<=' shift_expression
+		{ result = [ :OP_LE, val[0], val[2] ]  }
+        | relational_expression '>=' shift_expression
+		{ result = [ :OP_GE, val[0], val[2] ]  }
+
+equality_expression
+        : relational_expression
+        | equality_expression '==' relational_expression
+		{ result = [ :OP_EQ, val[0], val[2] ]  }
+        | equality_expression '!=' relational_expression
+		{ result = [ :OP_NE, val[0], val[2] ]  }
+
+and_expression
+        : equality_expression
+        | and_expression '&' equality_expression
+		{ result = [ :OP_AND, val[0], val[2] ]  }
+
+exclusive_or_expression
+        : and_expression
+        | exclusive_or_expression '^' and_expression
+		{ result = [ :OP_EOR, val[0], val[2] ]  }
+
+inclusive_or_expression
+        : exclusive_or_expression
+        | inclusive_or_expression '|' exclusive_or_expression
+		{ result = [ :OP_OR, val[0], val[2] ]  }
+
+logical_and_expression
+        : inclusive_or_expression
+        | logical_and_expression '&&' inclusive_or_expression
+		{ result = [ :OP_LAND, val[0], val[2] ]  }
+
+logical_or_expression
+        : logical_and_expression
+        | logical_or_expression '||' logical_and_expression
+		{ result = [ :OP_LOR, val[0], val[2] ]  }
+
+conditional_expression
+        : logical_or_expression
+        | logical_or_expression '?' expression ':' conditional_expression
+		{ result = [ :OP_CEX, val[0], val[2].get_elements, val[4] ]  }
+
+
+# ã³ã³ãæ¼ç®å­ãä½¿ããªã
+expression
+        : conditional_expression
+		{
+			result = Expression.new( val[0] )
+			# result.print
+		}
+
+constant_expression
+        : conditional_expression
+		{
+			result = Expression.new( val[0] )
+			# result.print
+#			res = result.eval_const( nil )
+
+			# if res then
+			#   puts "val: #{res}"
+			# else
+			#   puts "val: nil"
+			# end
+		}
+
+
+
+# Types
+##########################  å®£è¨  ##########################
+# å®£è¨ãK&Rã¨ä¸é¨ç°ãªã
+
+# declarationã¯ã»ã«ã®å±æ§ã§ä½¿ããã
+# K&Rã¨ã®éã: storage classãæå®ã§ããªããåãçç¥ã§ããªã
+declaration
+        : declaration_specifiers init_declarator_list ';'
+#        : type_specifier_qualifier_list init_declarator_list ';'
+
+# declaration_specifiersã¯é¢æ°ã®ãã©ã¡ã¼ã¿ã§ä½¿ããããã
+# type_specifier_qualifier_listã§ååãããããªã
+
+declaration_specifiers
+        : storage_class
+		{
+			result = CIntType.new( -3 )    # storage class ã¯ç¡è¦
+		}
+        | type_specifier
+        | type_qualifier
+		{
+			result = CIntType.new( -3 )
+			result.set_qualifier val[0]
+		}
+        | storage_class declaration_specifiers
+		{
+			result = val[1]                # storage class ã¯ç¡è¦
+		}
+        | type_specifier declaration_specifiers
+		{
+			result = val[1].merge val[0]
+		}
+        | type_qualifier declaration_specifiers
+		{
+			val[1].set_qualifier val[0]
+                        result = val[1]
+		}
+
+
+init_declarator_list
+        : init_declarator
+		{ result = [val[0]] }
+        | init_declarator_list ',' init_declarator
+		{ result << val[2] }
+
+init_declarator
+        : declarator
+        | declarator '=' initializer
+		{ val[0].set_initializer( val[2] ) }
+
+type_specifier
+        : VOID	{ set_no_type_name true; result = CVoidType.new }
+        | FLOAT	{ set_no_type_name true; result = CFloatType.new(-32) }
+        | DOUBLE	{ set_no_type_name true; result = CFloatType.new(-64) }
+        | BOOL	{ set_no_type_name true; result = CBoolType.new }
+        | struct_specifier	{ set_no_type_name true; result = val[0] } # set_no_type_name true ã¯ struct_tag ã§ãå¼ã°ãã
+        | union_specifier	{ set_no_type_name true; result = CVoidType.new }  # void ãå®£è¨ãããã¨ãã
+        | enum_specifier	{ set_no_type_name true; result = CVoidType.new }  # void ãå®£è¨ãããã¨ãã
+        | TYPE_NAME	{ set_no_type_name true; result = CDefinedType.new( val[0].val ) }
+
+        | CHAR	{ set_no_type_name true; result = CIntType.new(-11 ) }
+        | SHORT	{ set_no_type_name true; result = CIntType.new( -2 ) }
+        | INT		{ set_no_type_name true; result = CIntType.new( -3 ) }
+        | LONG	{ set_no_type_name true; result = CIntType.new( -4 ) }
+        | SIGNED
+		{
+			set_no_type_name true
+			result = CIntType.new( -3 )
+			result.set_sign :SIGNED
+		}
+        | UNSIGNED
+		{
+			set_no_type_name true
+			result = CIntType.new( -3 )
+			result.set_sign :UNSIGNED
+		}
+
+# mikan K&Rã®struct_or_union_specifierã«ç¸å½ããããunionã¯ä½¿ããªã, bit field ã«ãå¯¾å¿ããªã
+struct_specifier		# mikan
+        : STRUCT struct_tag '{'
+		{ StructType.set_define( true )  }
+	   struct_declaration_list '}'
+		{
+			StructType.end_of_parse
+			result = val[1]
+		}
+        | STRUCT
+		{
+			result = CStructType.new()
+			StructType.set_define( true )
+		}
+	   '{' struct_declaration_list '}'
+		{
+			StructType.end_of_parse
+			result = val[1]
+		}
+        | STRUCT struct_tag   # mikan struct_tag ã¯ namespace å¯¾å¿ãå¿
+è¦
+		{
+			StructType.set_define( false )
+			StructType.end_of_parse
+			result = val[1]
+		}
+
+struct_declaration_list
+        : struct_declaration
+        | struct_declaration_list struct_declaration
+
+struct_tag:
+        IDENTIFIER
+		{
+			result = CStructType.new( val[0].val )
+			set_no_type_name true
+		}
+
+# ãã¤ã³ã¿ä¿®é£¾å­ãè¿½å 
+struct_declaration
+        : declaration_specifiers struct_declarator_list ';'
+#        :                                type_specifier_qualifier_list struct_declarator_list ';'
+		{
+			val[1].each { |i|	# i: Decl
+				i.set_type( val[0] )
+				i.set_kind( :MEMBER )
+				i.check
+				CStructType.new_member( i )
+			}
+			result = val[1]
+		}
+        | union_specifier ';'                       # ç¡å
+        | struct_specifier ';'                       # ç¡å
+
+
+
+# K&Rã®specifier_qualifier_listã¨åã
+# ååãã¾ãããããã£ãã®ã§type_ãä»ãã
+type_specifier_qualifier_list
+        : type_specifier
+        | type_specifier type_specifier_qualifier_list
+		{
+			result = val[1].merge val[0]
+		}
+        | type_qualifier
+		{
+			result = CIntType.new( -3 )
+			result.set_qualifier val[0]
+		}
+        | type_qualifier type_specifier_qualifier_list
+		{
+			val[1].set_qualifier val[0]
+                        result = val[1]
+		}
+
+struct_declarator_list
+        : struct_declarator
+		{ result = [ val[0] ] }
+        | struct_declarator_list ',' struct_declarator
+		{ result << val[2] }
+
+# ããããã£ã¼ã«ãã¯ä½¿ããªã
+struct_declarator
+        : declarator
+
+
+
+union_specifier
+        : UNION union_tag '{' union_declaration_list '}'
+        | UNION '{' union_declaration_list '}'
+        | UNION union_tag   # mikan struct_tag ã¯ namespace å¯¾å¿ãå¿
+è¦
+
+union_declaration_list
+        : union_declaration
+        | union_declaration_list union_declaration
+
+union_tag:
+	IDENTIFIER
+
+union_declaration
+        : declaration_specifiers union_declarator_list ';'
+		| union_specifier ';'                       # ç¡å
+		| struct_specifier ';'                      # ç¡å
+
+union_declarator_list
+        : union_declarator
+        | union_declarator_list ',' union_declarator
+
+# ããããã£ã¼ã«ãã¯ä½¿ããªã
+union_declarator
+        : declarator
+
+
+
+# enumã®ç¨®é¡ãè¿½å 
+enum_specifier		# mikan
+        : enum_type            '{' enumerator_list '}'
+        | enum_type IDENTIFIER '{' enumerator_list '}'
+        | enum_type IDENTIFIER
+
+enum_type
+        : ENUM	{ result = CEnumType.new( -1 ) }
+#        | ENUM8	{ result = CEnumType.new( 8 ) }
+#        | ENUM16	{ result = CEnumType.new( 16 ) }
+#        | ENUM32	{ result = CEnumType.new( 32 ) }
+#        | ENUM64	{ result = CEnumType.new( 64 ) }
+#        | ENUM128	{ result = CEnumType.new( 128 ) }
+
+enumerator_list
+        : enumerator
+        | enumerator_list ',' enumerator
+
+enumerator
+        : IDENTIFIER
+        | IDENTIFIER '=' constant_expression
+
+type_qualifier
+        : CONST	{ result = :CONST }
+        | VOLATILE	{ result = :VOLATILE }
+
+declarator
+        : pointer direct_declarator
+		{
+			val[1].set_type( val[0] )
+			result = val[1]
+		}
+        | direct_declarator
+        | pointer TYPE_NAME     # é¢æ°ãã¤ã³ã¿ã® typedef ãäºéå®ç¾©ã®å ´å
+		{
+			result = Decl.new( val[1].val )
+			result.set_type( val[0] )
+		}
+
+direct_declarator		# mikan
+        : IDENTIFIER
+		{ result = Decl.new( val[0].val ) }
+        | '(' declarator ')'
+		{ result = val[1] }
+        | direct_declarator '[' constant_expression ']'
+		{
+			val[0].set_type( CArrayType.new( val[2] ) )
+			result = val[0]
+		}
+        | direct_declarator '[' ']'
+		{
+			val[0].set_type( CArrayType.new )
+			result = val[0]
+		}
+        | direct_declarator '(' parameter_type_list ')'
+		{
+		# 	Generator.warning( "W6001 need 'void' for no parameter"  )
+			val[0].set_type( CFuncType.new )
+			result = val[0]
+		}
+
+#        | direct_declarator '(' identifier_list ')'  # ããã¯ä½ã®ããã«å¿
+è¦ï¼ 060211
+        | direct_declarator '(' ')'
+		{
+		# 	Generator.warning( "W6002 need 'void' for no parameter"  )
+			val[0].set_type( CFuncType.new )
+			result = val[0]
+		}
+
+pointer
+        : '*'
+		{ result = CPtrType.new }
+        | '*' type_qualifier
+		{
+			result = CPtrType.new
+			result.set_qualifier( val[1] )
+		}
+        | '*' pointer
+		{
+			val[1].set_type(CPtrType.new)
+			result = val[1]
+		}
+        | '*' type_qualifier pointer
+		{
+			ptrtype = CPtrType.new
+			ptrtype.set_qualifier( val[1] )
+			val[2].set_type( ptrtype )
+			result = val[2]
+		}
+
+
+parameter_type_list
+        : parameter_list
+        | parameter_list ',' '.' '.' '.'
+		# mikan å¯å¤é·ãã©ã¡ã¼ã¿,  ... ã®éã®ã¹ãã¼ã¹ãè¨±ãããï¼ææãï¼
+
+parameter_list
+        : parameter_declaration
+#		{ result = ParamList.new( val[0] ) }
+        | parameter_list ',' parameter_declaration
+#		{
+#			val[0].add_param( val[2] )
+#			# result = val[0] ä¸è¦
+#		}
+
+
+# ãã©ã¡ã¼ã¿ä¿®é£¾å­ãè¿½å 
+parameter_declaration
+        : declaration_specifiers declarator
+#		{
+#			decl = ParamDecl.new( val[1], val[0], [] )
+#			val[1].set_kind( :PARAMETER )
+#			result = decl
+#		}
+
+	# ä»¥ä¸ã¯ã¨ã©ã¼ã¨ãã
+#        | declaration_specifiers	# ä»®å¼æ°ãªãã¯ãã¨ããããæ±ããªã 060210
+#		{
+#			unless val[0].kind_of?( VoidType ) then
+#				Generator.error( "B1001 need parameter name"  )
+#			end
+#			result = nil
+#		}
+        | declaration_specifiers abstract_declarator	# ä»®å¼æ°ãªã
+        | declaration_specifiers						# ä»®å¼æ°ãªã
+
+
+#identifier_list       # 060211  ä¸ç¨ã«ãªã£ã
+#        : IDENTIFIER
+#        | identifier_list ',' IDENTIFIER
+
+type_name
+        : type_specifier_qualifier_list
+        | type_specifier_qualifier_list abstract_declarator
+
+abstract_declarator		# mikan
+        : pointer
+        | direct_abstract_declarator
+        | pointer direct_abstract_declarator
+
+direct_abstract_declarator
+        : '(' abstract_declarator ')'
+        | '[' ']'
+        | '[' constant_expression ']'
+        | direct_abstract_declarator '[' ']'
+        | direct_abstract_declarator '[' constant_expression ']'
+        | '(' ')'
+		{
+			Generator.warning( "W6003 need 'void' for no parameter"  )
+		}
+        | '(' parameter_type_list ')'
+        | direct_abstract_declarator '(' ')'
+		{
+			Generator.warning( "W6004 need 'void' for no parameter"  )
+		}
+        | direct_abstract_declarator '(' parameter_type_list ')'
+
+# assignment_expressionãconstant_expressionã«å¤æ´
+initializer			# mikan
+        : constant_expression
+		{ result = val[0] }
+        | '{' initializer_list '}'
+		{ result = val[1] }
+        | '{' initializer_list ',' '}'
+		{ result = val[1] }
+	| C_EXP '(' STRING_LITERAL ')'
+		{ result = C_EXP.new( val[2] ) }
+
+initializer_list
+        : initializer
+		{
+			result = [ val[0] ]
+		}
+        | initializer_list ',' initializer
+		{
+			val[0] << val[2]
+			result = val[0]
+		}
+
+
+##########################  ããããã¯CDLç¬èª  ##########################
+
+#ãããã¬ãã«ã®æ§æè¦å
+C_parser
+        :
+        | C_parser extension_statement
+
+extension_statement
+        : statement
+        | EXTENSION statement
+
+statement
+        : typedef
+        | func_def
+        | enum_specifier ';'
+        | struct_specifier ';'
+        | declaration
+        | ';'
+        | error   # ã¨ã©ã¼åå¾©ãã¤ã³ã
+
+typedef
+        : TYPEDEF type_specifier_qualifier_list declarator_list ';'
+		{
+			val[2].each{ |i|
+			   i.set_kind( :TYPEDEF )
+			}
+			Typedef.new_decl_list( val[1], val[2] )
+                        # val[1].show_tree 0
+		}
+
+declarator_list
+        : declarator
+		{ result = [ val[0] ] }
+        | declarator_list ',' declarator
+		{ result << val[2] }
+
+func_def
+        : declaration_specifiers declarator compoundstatement
+
+infunc_statement_list
+        :
+        | infunc_statement_list infunc_statement
+
+infunc_statement
+        : declaration
+        | ifstatement
+        | whilestatement
+        | dowhilestatement
+        | forstatement
+        | switchstatement
+        | labelstatement
+        | compoundstatement
+        | gotostatement
+        | expressionstatement
+        | ';'
+
+ifstatement
+        : IF '(' expression ')' infunc_statement
+        | IF '(' expression ')' infunc_statement ELSE infunc_statement
+
+whilestatement
+        : WHILE '(' expression ')' infunc_statement
+
+dowhilestatement
+        : DO infunc_statement WHILE '(' expression ')' ';'
+
+forstatement
+        : FOR '(' expression ';' expression ';' expression ')' infunc_statement
+
+switchstatement
+        : SWITCH '(' expression ')'  infunc_statment
+
+labelstatement
+        : IDENTIFIER ':' infunc_statement
+        | CASE constant_expression ':' infunc_statement
+        | DEFAULT ':' infunc_statement
+
+compoundstatement
+        : '{' infunc_statement_list '}'
+
+gotostatement
+        : GOTO IDENTIFIER ';'
+        | CONTINUE ';'
+        | BREAK ';'
+        | RETURN expression ';'
+        | RETURN ';'
+
+expressionstatement
+        : expression ';'
+        | unary_expression assignment_operator expression ';'
+
+assignment_operator
+        : '='
+        | '+='
+        | '-='
+        | '*='
+        | '/='
+        | '%='
+        | '<<='
+        | '>>='
+        | '&='
+        | '|='
+        | '^='
+
+storage_class
+        : __INLINE__
+        | INLINE
+        | __INLINE
+        | CINLINE
+        | EXTERN
+        | STATIC
+        | AUTO
+        | REGISTER
+
+namespace_identifier
+        : IDENTIFIER		{ result = NamespacePath.new( val[0].val, false ) }
+        | '::' IDENTIFIER	{ result = NamespacePath.new( val[1].val, true ) }
+        | namespace_identifier '::' IDENTIFIER
+		{ result = val[0].append!( val[2].val ) }
+
+end
+
+---- inner
+
+  RESERVED = {
+    # keyword
+    'typedef' => :TYPEDEF,
+    'struct' => :STRUCT,
+    'union' => :UNION,
+    'sizeof' => :SIZEOF,
+    'throw' => :THROW,
+
+    # specifier
+    # types
+    'void'    => :VOID,
+    'char'    => :CHAR,
+    'short'   => :SHORT,
+
+    'volatile'=> :VOLATILE,
+    'const'   => :CONST,
+    'extern'   => :EXTERN,
+
+    'long'    => :LONG,
+    'float'   => :FLOAT,
+    'double'  => :DOUBLE,
+    'signed'  => :SIGNED,
+    'unsigned'=> :UNSIGNED,
+
+    'int'     => :INT,
+    'enum'    => :ENUM,
+
+    'if'      => :IF,
+    'else'    => :ELSE,
+    'while'   => :WHILE,
+    'do'      => :DO,
+    'for'     => :FOR,
+    'case'    => :CASE,
+    'default' => :DEFAULT,
+    'goto'    => :GOTO,
+    'continue' => :CONTINUE,
+    'break'   => :BREAK,
+    'return'  => :RETURN,
+    '__inline__'  => :__INLINE__,
+    'inline'  => :INLINE,
+    '__inline'  => :__INLINE,
+    'Inline'  => :CINLINE,        # inline starting with Capital letter
+    'static'  => :STATIC,
+    'register' => :REGISTER,
+    'auto'    => :AUTO,
+    '__extension__'    => :EXTENSION,
+
+  }
+
+  @@generator_nest = -1
+  @@generator_stack = []
+  @@current_locale = []
+
+  def finalize
+
+    # mikan Namespace.pop
+    Celltype.pop
+    Cell.pop
+    CompositeCelltype.pop
+    Region.pop
+
+  end
+
+  def set_plugin( plugin )
+    @plugin = plugin
+  end
+
+  def self.get_plugin
+    @@generator_stack[@@generator_nest].get_plugin
+  end
+
+  def get_plugin
+    @plugin
+  end
+
+  def parse(files)
+
+    # mikan Namespace.push
+    Celltype.push
+    Cell.push
+    CompositeCelltype.push
+    Region.push
+
+    @@generator_nest += 1
+    @@generator_stack[@@generator_nest] = self
+    @b_no_type_name = false
+
+   begin
+
+    @q = []
+    comment = false
+
+    # euc ã®ã³ã¡ã³ãã utf8 ã¨ãã¦æ±ãã¨ãã³ã¡ã³ãã®çµãããèª¤ãåé¡ã®å¯¾ç­
+    TECS_LANG::set_kcode_binary
+
+    # 800U, 0xffLL ãªã© (æ´æ°ãªãã©ã«ã«å
+±éã®ä¿®é£¾å­)
+    integer_qualifier = "([Uu][Ll][Ll]|[Uu][Ll]|[Uu]|[Ll][Ll]|[Ll])?"
+
+    files.each {|file|
+      lineno = 1
+     begin
+#2.0       IO.foreach(file) {|line|
+       TECSIO.foreach(file) {|line|
+        col = 1
+        line.rstrip!
+
+        until line.empty?
+
+          if comment
+            case line
+            # ã³ã¡ã³ãçµäº
+            when /\A\*\//
+              comment = false
+            when /\A./
+              ;
+            end
+          else
+            case line
+            # ç©ºç½ãããªãã­ã»ã¹ãã£ã¬ã¯ãã£ã
+            when /\A\s+/
+              ;
+            # è­å¥å­
+            when /\A[a-zA-Z_]\w*/
+              word = $&
+              @q << [RESERVED[word] || :IDENTIFIER, Token.new(word.intern, file, lineno, col)]
+            # 16 é²æ°å®æ°
+            when /\A0x[0-9A-Fa-f]+#{integer_qualifier}/
+              @q << [:HEX_CONSTANT, Token.new($&, file, lineno, col)]
+            # 8 é²æ°å®æ°
+            when /\A0[0-7]+#{integer_qualifier}/
+              @q << [:OCTAL_CONSTANT, Token.new($&, file, lineno, col)]
+            # æµ®åå°æ°å®æ°
+            when /\A[0-9]+\.([0-9]*)?([Ee][+-]?[0-9]+)?/
+              @q << [:FLOATING_CONSTANT, Token.new($&, file, lineno, col)]
+            # æ´æ°å®æ°
+            when /\A\d+#{integer_qualifier}/
+            # when /\A\d+/
+              @q << [:INTEGER_CONSTANT, Token.new($&.to_i, file, lineno, col)]
+            # æå­
+            when /\A'(?:[^'\\]|\\.)'/
+              @q << [:CHARACTER_LITERAL, Token.new($&, file, lineno, col)]
+            # æå­å
+#              "#include  #include #include \"../systask/logtask.cfg\"       æå¾ã® " å¿ã)ã§ç¡éã«ã¼ã
+#            when /\A"(?:[^"\\]+|\\.)*"/
+            when /\A"(?:[^"\\]|\\.)*"/   # ããã¯ãã¾ãè¡ãããã 
+              @q << [:STRING_LITERAL, Token.new($&, file, lineno, col)]
+            # è¡ã³ã¡ã³ã
+            when /\A\/\/.*$/
+              # èª­ã¿é£ã°ãã ã
+            # ã³ã¡ã³ãéå§
+            when /\A\/\*/
+              comment = true
+            when /\A>>=/, /\A<<=/, /\A>>/,  /\A<</
+              @q << [$&, Token.new($&, file, lineno, col)]
+            when /\A\+=/, /\A\-=/, /\A\*=/, /\A\/=/, /\A%=/, /\A&=/, /\A\|=/, /\A\^=/
+              @q << [$&, Token.new($&, file, lineno, col)]
+            when /\A::/, /\A==/, /\A!=/, /\A>=/, /\A<=/, /\A\->/, /\A\+\+/, /\A\-\-/
+              @q << [$&, Token.new($&, file, lineno, col)]
+            when /\A./
+              @q << [$&, Token.new($&, file, lineno, col)]
+            else
+              raise
+            end
+          end
+
+          line = $'
+          col += $&.length
+        end
+
+        lineno += 1
+      }
+
+     rescue => evar
+       Generator.error( "B1002 while open or reading \'$1\'" , file )
+       print_exception( evar )
+     end
+    }
+
+    # çµäºã®å°
+    @q << nil
+
+    @yydebug = true
+    do_parse
+
+   ensure
+    @@generator_nest -= 1
+    TECS_LANG::reset_kcode
+   end
+
+  end
+
+
+  def next_token
+    token = @q.shift
+
+    if token then
+      @@current_locale[@@generator_nest] = token[1].locale
+
+      case token[1].val
+      when ";", ":", ",", "(", ")", "{", "}"
+        set_no_type_name false
+      when ".", "->"
+        set_no_type_name true
+      end
+
+      # TYPE_NAME ãã¼ã¯ã³ã¸ç½®ãæã
+      if @b_no_type_name == false
+        if token[0] == :IDENTIFIER && Namespace.is_typename?( token[1].val ) then
+          token[0] = :TYPE_NAME
+        end
+      end
+
+      if $debug then     # 070107 token ç¡å¹æãããéããªããããã (through å¯¾å¿ -d ã®æã«ä¾å¤çºç) 
+        locale = @@current_locale[@@generator_nest]
+        if token then
+          print( "#{locale[0]}: line #{locale[1]} : #{token[0]} '#{token[1].val}'\n" )
+        else
+          print( "#{locale[0]}: line #{locale[1]} : EOF\n" )
+        end
+      end
+    end
+
+    token
+  end
+
+  def on_error(t, v, vstack)
+    if v == "$" then
+     Generator.error( "B1003 Unexpected EOF"  )
+    else
+     Generator.error( "B1004 syntax error near \'$1\'" , v.val )
+    end
+
+  end
+
+  def self.current_locale
+    @@current_locale[ @@generator_nest ]
+  end
+
+  @@n_error = 0
+  @@n_warning = 0
+
+  # ãã®ã¡ã½ããã¯æ§æè§£æãæå³è§£æããã®ã¿å¼åºãå¯ï¼ã³ã¼ãçæã§ã¨ã©ã¼çºçã¯ä¸é©åï¼
+  def self.error( msg )
+    @@n_error += 1
+    locale = @@current_locale[ @@generator_nest ]
+
+    if locale then
+      Console.puts "error: #{locale[0]}: line #{locale[1]} #{msg}"
+    else
+      Console.puts "error: #{msg}"
+    end
+  end
+
+  # ãã®ã¡ã½ããã¯æ§æè§£æãæå³è§£æããã®ã¿å¼åºãå¯ï¼ã³ã¼ãçæã§ã¦ã©ã¼ãã³ã°çºçã¯ä¸é©åï¼
+  def self.warning( msg )
+    @@n_warning += 1
+    locale = @@current_locale[ @@generator_nest ]
+    Console.puts "warning: #{locale[0]}: line #{locale[1]} #{msg}"
+  end
+
+  def self.get_n_error
+    @@n_error
+  end
+
+  def self.get_n_warning
+    @@n_warning
+  end
+
+  def self.get_nest
+    @@generator_nest
+  end
+
+  def set_no_type_name b_no_type_name
+    # print "b_no_type_name=#{b_no_type_name}\n"
+    @b_no_type_name = b_no_type_name
+  end
+
+---- footer
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/bnf.tab.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/bnf.tab.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/bnf.tab.rb	(revision 270)
@@ -0,0 +1,4971 @@
+#
+# DO NOT MODIFY!!!!
+# This file is automatically generated by Racc 1.4.12
+# from Racc grammer file "".
+#
+
+require 'racc/parser.rb'
+class Generator < Racc::Parser
+
+module_eval(<<'...end bnf.y.rb/module_eval...', 'bnf.y.rb', 1504)
+
+  RESERVED = {
+    # keyword
+    'namespace' => :NAMESPACE,
+    'signature' => :SIGNATURE,
+    'celltype' => :CELLTYPE,
+    'cell' => :CELL,
+    'attr' => :ATTRIBUTE,
+    'var' => :VAR,
+    'call' => :CALL,
+    'entry' => :ENTRY,
+    'composite' => :COMPOSITE,
+    'require' => :REQUIRE,
+    'factory' => :FACTORY,
+    'FACTORY' => :CTFACTORY,
+    'typedef' => :TYPEDEF,
+    'struct' => :STRUCT,
+    'region' => :REGION,
+    'import' => :IMPORT,
+    'import_C' => :IMPORT_C,
+    'generate' => :GENERATE,
+
+    # types
+    'void'    => :VOID,
+
+    'volatile'=> :VOLATILE,
+    'const'   => :CONST,
+
+    'signed'  => :SIGNED,
+    'unsigned'=> :UNSIGNED,
+
+    'int8_t'    => :INT8_T,
+    'int16_t'   => :INT16_T,
+    'int32_t'   => :INT32_T,
+    'int64_t'   => :INT64_T,
+    'int128_t'  => :INT128_T,
+    'uint8_t'   => :UINT8_T,
+    'uint16_t'  => :UINT16_T,
+    'uint32_t'  => :UINT32_T,
+    'uint64_t'  => :UINT64_T,
+    'uint128_t' => :UINT128_T,
+
+    'float32_t'   => :FLOAT32_T,
+    'double64_t'  => :DOUBLE64_T,
+    'bool_t'      => :BOOL_T,
+    'char_t'  => :CHAR_T,
+    'schar_t'  => :SCHAR_T,
+    'uchar_t'  => :UCHAR_T,
+
+    # unrecommened types
+    'int'     => :INT,
+#   'intptr'  => :INTPTR,
+    'short'   => :SHORT,
+    'long'    => :LONG,
+
+    # obsolete types
+    'char'    => :CHAR,
+#    'int8'    => :INT8,
+#    'int16'   => :INT16,
+#    'int32'   => :INT32,
+#    'int64'   => :INT64,
+#    'int128'  => :INT128,
+#    'float'   => :FLOAT,
+#    'double'  => :DOUBLE,
+#    'bool'    => :BOOL,
+
+    'enum'    => :ENUM,
+    'enum8'   => :ENUM8,
+    'enum16'  => :ENUM16,
+    'enum32'  => :ENUM32,
+    'enum64'  => :ENUM64,
+
+    'true'    => :TRUE,
+    'false'   => :FALSE,
+
+    'C_EXP'   => :C_EXP,
+
+    'Descriptor'   => :DESCRIPTOR,
+
+    # location information for TECSCDE
+    '__location_information__' => :__LOCATION_INFORMATION__,
+    '__cell__' => :__CELL__,
+    '__join__' => :__JOIN__,
+  }
+
+  # æå®å­ '[]' å
+ã§ã®ã¿ä½¿ç¨ã§ããã­ã¼ã¯ã¼ã
+  RESERVED2 = {
+    # specifier
+    'id' => :ID,
+
+    # signature
+    'callback' => :CALLBACK,
+    'context' => :CONTEXT,
+    'deviate' => :DEVIATE,
+
+    # celltype
+    'singleton' => :SINGLETON,
+    'idx_is_id' => :IDX_IS_ID,
+    'active' => :ACTIVE,
+
+    # port (entry)
+    'inline' => :INLINE,
+    'ref_desc' => :REF_DESC,   # call ãå¯
+
+    # port (call)
+    'optional' => :OPTIONAL,
+    'dynamic' => :DYNAMIC,
+
+    # port (call), attribute
+    'omit' => :OMIT,
+
+    # attribute
+    'choice' => :CHOICE,
+
+    # cell
+    'allocator' => :ALLOCATOR,
+    'prototype' => :PROTOTYPE,
+    'restrict'  => :RESTRICT,
+
+    # FuncType
+    'oneway' => :ONEWAY,
+
+    # parameter (basic)
+    'in' => :IN,
+    'out' => :OUT,
+    'inout' => :INOUT,
+    'send' => :SEND,
+    'receive' => :RECEIVE,
+
+    # parameter 
+    'size_is' => :SIZE_IS,
+    'count_is' => :COUNT_IS,
+    'string' => :STRING,
+    'nullable' => :NULLABLE,
+
+    'through' => :THROUGH,
+    'in_through' => :IN_THROUGH,
+    'out_through' => :OUT_THROUGH,
+    'to_through' => :TO_THROUGH,
+
+    'node' => :NODE,
+    'linkunit' => :LINKUNIT ,
+    'domain' => :DOMAIN,
+    'class' => :CLASS,
+  }
+
+  # åå¸°çãªãã¼ãµã®ããã®ã¹ã¿ãã¯
+  @@generator_nest = -1
+  @@generator_stack = []
+  @@current_locale = []
+
+  # import_C ä¸­ã§ãã
+  @@import_C = false
+
+  # ãã¹ã¦ã®æ§æè§£æãå®äºãã
+  @@b_end_all_parse = false
+
+  def self.parse( file_name, plugin = nil, b_reuse = false )
+    # ãã¼ãµã¤ã³ã¹ã¿ã³ã¹ãçæ(å¥ãã¼ãµã§èª­ã¿è¾¼ã)
+    parser = Generator.new
+
+    # plugin ãã import ããã¦ããå ´åã® plugin è¨­å®
+    parser.set_plugin plugin
+
+    # reuse ãã©ã°ãè¨­å®
+    parser.set_reuse b_reuse
+
+    # cdl ããã¼ã¹
+    parser.parse( [file_name] )
+
+    # çµæåããã¼ãµã¹ã¿ãã¯ãæ»ã
+    parser.finalize
+  end
+
+  def finalize
+
+    # mikan Namespace.pop
+    Namespace.pop
+    Signature.pop
+    Celltype.pop
+    Cell.pop
+    CompositeCelltype.pop
+  end
+
+  def set_plugin( plugin )
+    @plugin = plugin
+  end
+
+  def self.get_plugin
+    if @@generator_stack[@@generator_nest] then
+      # tecsgen å¼æ°ã® cdl ã import ãããå ´åã¯ nil
+      return @@generator_stack[@@generator_nest].get_plugin
+    else
+      return nil
+    end
+  end
+
+  def get_plugin
+    @plugin
+  end
+
+  def set_reuse( b_reuse )
+    @b_reuse = b_reuse
+  end
+
+  def self.is_reuse?
+    if @@generator_stack[@@generator_nest] then
+      # tecsgen å¼æ°ã® cdl ã import ãããå ´åã¯ nil
+      return @@generator_stack[@@generator_nest].is_reuse?
+    else
+      return false
+    end
+  end
+
+  def is_reuse?
+    @b_reuse
+  end
+
+  def parse(files)
+
+    # mikan Namespace.push
+    Namespace.push
+    Signature.push
+    Celltype.push
+    Cell.push
+    CompositeCelltype.push
+
+    @@generator_nest += 1
+    @@generator_stack[@@generator_nest] = self
+    @in_specifier = false
+
+    begin
+
+      @q = []
+      b_in_comment = false
+      b_in_string = false
+
+      # euc ã®ã³ã¡ã³ãã utf8 ã¨ãã¦æ±ãã¨ãã³ã¡ã³ãã®çµãããèª¤ãåé¡ã®å¯¾ç­
+      TECS_LANG::set_kcode_binary
+
+      files.each {|file|
+        lineno = 1
+        begin
+          string = ""
+#2.0          IO.foreach(file) {|line|
+          TECSIO.foreach(file) {|line|
+            col = 1
+#            line.rstrip!         æ¹è¡å«ãæå­åãæ±ãããã«ãªã£ãã®ã§ãããã§ç©ºç½ãåãé¤ããªããªã£ã
+
+            until line.empty?
+
+              if b_in_comment
+                case line
+                  # ã³ã¡ã³ãçµäº
+                when /\A\*\//
+                  b_in_comment = false
+                when /\A./
+                  ;
+                when /\s+/     # line.rstrip! ãæ­¢ãããã \n ãªã©ã®ç©ºç½æå­ã¨ã¾ã£ã¡ããã«ã¼ã«ãå¿
+è¦ã«ãªã£ã
+                  ;
+                end
+              elsif b_in_string
+                if line =~ /\A(?:[^"\\]|\\.)*"/
+                  string = "#{string}#{$&}"
+                  @q <<  [:STRING_LITERAL, Token.new(string, file, lineno, col)]
+                  b_in_string = false
+                elsif line =~ /\A.*\\\n/     # æ¹è¡ \n ã¯ '.' ã«ãããããªã
+                  string += $&
+                elsif line =~ /\A.*\n/     # æ¹è¡ \n ã¯ '.' ã«ãããããªã
+                  string += line
+                  # ãã®ä½ç½®ã§ã¯ error ã¡ã½ããã¯ä½¿ããªã (token èª­åºãå)
+                  puts "error: #{file} line #{lineno}: string literal has newline without escape"
+                  @@n_error += 1
+                end
+              else
+                case line
+                # ç©ºç½ãããªãã­ã»ã¹ãã£ã¬ã¯ãã£ã
+                when /\A\s+/
+                  ;
+                # è­å¥å­
+                when /\A[a-zA-Z_]\w*/
+                  word = $&
+                  @q << [RESERVED[word] || :IDENTIFIER, Token.new(word.intern, file, lineno, col)]
+                # 16 é²æ°å®æ°
+                when /\A0x[0-9A-Fa-f]+/
+                  @q << [:HEX_CONSTANT, Token.new($&, file, lineno, col)]
+                # 8 é²æ°å®æ°
+                when /\A0[0-7]+/
+                  @q << [:OCTAL_CONSTANT, Token.new($&, file, lineno, col)]
+                # æµ®åå°æ°å®æ°
+                when /\A[0-9]+\.([0-9]*)?([Ee][+-]?[0-9]+)?/
+                  @q << [:FLOATING_CONSTANT, Token.new($&, file, lineno, col)]
+                # æ´æ°å®æ°
+                when /\A\d+/
+                  @q << [:INTEGER_CONSTANT, Token.new($&.to_i, file, lineno, col)]
+                # æå­å®æ°
+                when /\A'(?:[^'\\]|\\.)'/
+                  @q << [:CHARACTER_LITERAL, Token.new($&, file, lineno, col)]
+                # æå­å
+#                "#include  #include #include \"../systask/logtask.cfg\"       æå¾ã® " å¿ã)ã§ç¡éã«ã¼ã
+#                when /\A"(?:[^"\\]+|\\.)*"/
+                when /\A"(?:[^"\\]|\\.)*"/   # ããã¯ãã¾ãè¡ãããã 
+                  @q << [:STRING_LITERAL, Token.new($&, file, lineno, col)]
+                # æå­å (æ¹è¡ãã)
+                when /\A"(?:[^"\\]|\\.)*\\\n$/
+                  string = $&
+                  b_in_string = true
+                # æå­å (æ¹è¡ãã, escape ãªã)
+                when /\A("(?:[^"\\]|\e\.)*)\n$/
+                  string = $1 + "\\\n"
+                  b_in_string = true
+                  # ãã®ä½ç½®ã§ã¯ error ã¡ã½ããã¯ä½¿ããªã (token èª­åºãå) # mikan cdl_error ã§ã¯ãªã
+                  puts "error: #{file} line #{lineno}: string literal has newline without escape"
+                  @@n_error += 1
+                # å±±æ¬å¼§ã§å²ã¾ããæå­å
+                when /\A<[0-9A-Za-z_\. \/]+>/   # AB: angle bracke
+                  @q << [:AB_STRING_LITERAL, Token.new($&, file, lineno, col)]
+                # è¡ã³ã¡ã³ã
+                when /\A\/\/.*$/
+                  # èª­ã¿é£ã°ãã ã
+                # ã³ã¡ã³ãéå§
+                when /\A\/\*/
+                  b_in_comment = true
+                # '>>', '<<' ãªã©
+                when /\A>>/, /\A<</, /\A==/, /\A!=/, /\A\&\&/, /\A\|\|/
+                  @q << [$&, Token.new($&, file, lineno, col)]
+                when /\A::/, /\A=>/, /\A<=/, /\A>=/
+                  @q << [$&, Token.new($&, file, lineno, col)]
+                # '(', ')' ãªã©ä¸æå­ã®è¨å·ãã¾ãã¯æªç¥ã®è¨å·
+                when /\A./
+                  @q << [$&, Token.new($&, file, lineno, col)]
+                else
+                  raise
+                end
+              end
+
+              line = $'
+              col += $&.length
+            end
+
+            lineno += 1
+          }
+
+        rescue => evar
+          Generator.error( "G1014 while open or reading \'$1\'" , file )
+          if $debug then
+            p puts( evar )
+            pp $@
+          end
+        end
+      }
+
+      # çµäºã®å°
+      @q << nil
+
+      @yydebug = true
+      do_parse
+
+    ensure
+      @@generator_nest -= 1
+      TECS_LANG::reset_kcode
+    end
+
+  end
+
+  def next_token
+    token = @q.shift
+
+    if token then
+      @@current_locale[@@generator_nest] = token[1].locale
+
+      if token[0] == :IDENTIFIER then
+        # TYPE_NAME ãã¼ã¯ã³ã¸ç½®æã
+        if Namespace.is_typename?( token[1].val ) then
+          token[0] = :TYPE_NAME
+        elsif @in_specifier && RESERVED2[ token[1].val.to_s ] then
+          # æå®å­ã­ã¼ã¯ã¼ãï¼ '[', ']' å
+ã§ã®ã¿æå¹)
+          token[0] = RESERVED2[ token[1].val.to_s ]
+        end
+      end
+
+      if $debug then     # 070107 token ç¡å¹æãããéããªããããã (through å¯¾å¿ -d ã®æã«ä¾å¤çºç) 
+        locale = @@current_locale[@@generator_nest]
+        if token then
+          print( "#{locale[0]}: line #{locale[1]} : #{token[0]} '#{token[1].val}'\n" )
+        else
+          print( "#{locale[0]}: line #{locale[1]} : EOF\n" )
+        end
+      end
+    else
+      token = [ false, false ]
+    end
+
+    token
+  end
+
+  def on_error(t, v, vstack)
+    # p t, token_to_str(t), vstack
+    if token_to_str(t) == "$end" then
+      Generator.error( "G1015 Unexpected EOF"  )
+    else
+      Generator.error( "G1016 syntax error near \'$1\'" , v.val )
+    end
+  end
+
+  def self.current_locale
+    @@current_locale[ @@generator_nest ]
+  end
+
+  @@n_error = 0
+  @@n_warning = 0
+
+  # ãã®ã¡ã½ããã¯æ§æè§£æãæå³è§£æããã®ã¿å¼åºãå¯ï¼ã³ã¼ãçæã§ã¨ã©ã¼çºçã¯ä¸é©åï¼
+  def self.error( msg, *arg )
+    locale = nil
+    self.error2( locale, msg, *arg )
+  end
+
+  def self.error2( locale, msg, *arg )
+    @@n_error += 1
+
+    msg = TECSMsg.get_error_message( msg )
+    # $1, $2, ... ã arg ã§ç½®æ
+    count = 1
+    arg.each{ |a|
+      str = TECSIO.str_code_convert( msg, a.to_s )
+      msg.sub!( /\$#{count}/, str )
+      count += 1
+    }
+
+    # import_C ã®ä¸­ã§ã®ã¨ã©ã¼ï¼
+    if @@import_C then
+      C_parser.error( msg )
+    else
+
+      # Node ã®è¨æ¶ãã ä½ç½® (locale) ãä½¿ç¨ããå ´åãå¤æ´ä»¥åã«æ¯ã¹ã
+      # åé¡çºçç®æã¨ç°ãªãä½ç½®ã«ã¨ã©ã¼ãåºããããæ§æè§£æä¸­ã®ã¨ã©ã¼
+      # ã¯ãè§£æä¸­ã®ä½ç½®ãåºåããï¼(new_XXX ã§ owner ãå­è¦ç´ ã®ãã§ã
+      # ã¯ãããã¨ owner ã®è¡çªå·ãåºã¦ãã¾ãç¹ã§ããããçãã¦ãã)
+
+      if @@b_end_all_parse == false || locale == nil then
+        locale = @@current_locale[ @@generator_nest ]
+      end
+      if locale then
+        Console.puts "error: #{locale[0]}: line #{locale[1]} #{msg}"
+      else
+        Console.puts "error: #{msg}"
+      end
+    end
+  end
+
+  # ãã®ã¡ã½ããã¯æ§æè§£æãæå³è§£æããã®ã¿å¼åºãå¯ï¼ã³ã¼ãçæã§ã¦ã©ã¼ãã³ã°çºçã¯ä¸é©åï¼
+  def self.warning( msg, *arg )
+    locale = nil
+    self.warning2( locale, msg, *arg )
+  end
+
+  def self.warning2( locale, msg, *arg )
+    @@n_warning += 1
+
+    msg = TECSMsg.get_warning_message( msg )
+    # $1, $2, ... ã arg ã§ç½®æ
+    count = 1
+    arg.each{ |a|
+      str = TECSIO.str_code_convert( msg, a.to_s )
+      msg.sub!( /\$#{count}/, str )
+      count += 1
+    }
+
+    # import_C ã®ä¸­ã§ã®ã¦ã©ã¼ãã³ã°ï¼
+    if @@import_C then
+      C_parser.warning( msg )
+    else
+      if @@b_end_all_parse == false || locale == nil then
+        locale = @@current_locale[ @@generator_nest ]
+      end
+      if locale then
+        Console.puts "warning: #{locale[0]}: line #{locale[1]} #{msg}"
+      else
+        Console.puts "warning: #{msg}"
+      end
+    end
+  end
+
+  def self.get_n_error
+    @@n_error
+  end
+
+  def self.get_n_warning
+    @@n_warning
+  end
+
+  def self.get_nest
+    @@generator_nest
+  end
+
+  #===  '[' specifier å§ã
+  def set_in_specifier
+    # p "set_in_specifier"
+    @in_specifier = true
+  end
+
+  #=== ']' specifier çµãã
+  def unset_in_specifier
+    # p "unset_in_specifier"
+    @in_specifier = false
+  end
+
+  # statement_specifier ã¯æ§æè§£ééä¸­ã§åç
+§ããããã
+  @@statement_specifier_stack = []
+  def self.add_statement_specifier( ss )
+    if( @@statement_specifier_stack[ @@generator_nest ] == nil )then
+      @@statement_specifier_stack[ @@generator_nest ] = [ ss ]
+    else
+      @@statement_specifier_stack[ @@generator_nest ] << ss
+    end
+  end
+
+
+  def self.get_statement_specifier
+    spec_list = @@statement_specifier_stack[ @@generator_nest ]
+    @@statement_specifier_stack[ @@generator_nest ] = nil
+    return spec_list
+  end
+
+  #=== ãã¹ã¦ã®æ§æè§£æãå®äºãããã¨ãå ±å
+  def self.end_all_parse
+    @@b_end_all_parse = true
+  end
+
+...end bnf.y.rb/module_eval...
+##### State transition tables begin ###
+
+clist = [
+'65,566,323,779,733,806,77,346,347,323,77,77,77,160,194,195,196,197,198',
+'199,200,202,174,203,664,133,860,133,99,207,208,209,210,211,212,213,663',
+'244,831,551,394,512,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25',
+'26,27,28,29,30,31,32,33,34,35,38,678,395,459,309,696,42,43,44,45,46',
+'47,48,49,858,98,654,827,440,133,133,826,133,133,133,133,133,65,186,186',
+'186,186,69,67,68,308,70,71,77,72,323,73,299,300,319,819,133,175,133',
+'134,320,134,322,186,74,74,74,75,76,76,76,133,86,186,186,186,186,78,85',
+'5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32',
+'33,34,35,38,77,420,186,358,359,42,43,44,45,46,47,48,49,186,134,134,134',
+'65,134,134,134,134,134,133,133,87,571,77,77,570,323,69,67,68,325,70',
+'71,133,72,799,73,530,134,341,134,299,300,319,342,343,397,798,682,320',
+'74,322,75,134,76,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26',
+'27,28,29,30,31,32,33,34,35,38,444,48,49,352,353,42,43,44,45,46,47,48',
+'49,328,329,509,510,65,299,300,301,186,302,303,305,306,683,606,77,134',
+'134,69,67,68,856,70,71,272,72,607,73,77,177,134,643,299,300,319,77,77',
+'636,203,780,320,74,322,75,684,76,5,6,7,10,13,14,15,16,17,18,19,20,21',
+'22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,795,160,610,676,855,42',
+'43,44,45,46,47,48,49,160,637,403,470,86,160,471,633,426,781,85,793,470',
+'87,87,471,502,705,69,67,68,758,70,71,397,72,396,73,159,625,402,194,195',
+'196,197,198,199,200,202,614,203,74,792,75,133,76,207,208,209,210,211',
+'212,213,299,300,301,160,302,303,305,306,194,195,196,197,198,199,200',
+'202,160,203,624,609,283,133,626,207,208,209,210,211,212,213,867,742',
+'809,194,195,196,197,198,199,200,202,335,203,336,159,337,133,229,207',
+'208,209,210,211,212,213,194,195,196,197,198,199,200,202,810,203,251',
+'160,230,133,409,207,208,209,210,211,212,213,229,649,707,666,400,837',
+'79,134,496,277,676,251,571,704,846,570,160,539,845,393,230,848,596,408',
+'818,229,748,147,619,630,146,706,648,684,667,401,838,134,761,495,278',
+'675,250,705,167,230,620,229,86,847,760,86,817,86,85,177,618,85,87,85',
+'341,87,134,87,270,342,343,230,632,177,194,195,196,197,198,199,200,202',
+'173,203,614,744,869,133,134,207,208,209,210,211,212,213,194,195,196',
+'197,198,199,200,202,147,203,650,146,651,133,172,207,208,209,210,211',
+'212,213,194,195,196,197,198,199,200,202,171,203,388,389,390,133,170',
+'207,208,209,210,211,212,213,194,195,196,197,198,199,200,202,169,203',
+'388,389,390,133,659,207,208,209,210,211,212,213,348,349,350,351,194',
+'195,196,197,198,199,200,202,168,203,583,330,660,133,134,207,208,209',
+'210,211,212,213,194,195,196,197,198,199,200,202,661,203,344,345,165',
+'133,134,207,208,209,210,211,212,213,194,195,196,197,198,199,200,202',
+'164,203,282,283,665,133,134,207,208,209,210,211,212,213,194,195,196',
+'197,198,199,200,202,668,203,352,353,670,133,134,207,208,209,210,211',
+'212,213,348,349,350,351,194,195,196,197,198,199,200,202,431,203,346',
+'347,671,133,134,207,208,209,210,211,212,213,672,448,673,376,377,378',
+'430,432,433,434,435,431,346,347,134,371,372,373,374,375,379,229,450',
+'451,452,449,348,349,350,351,674,430,432,433,434,435,134,341,142,143',
+'677,230,342,343,194,195,196,197,198,199,200,202,163,203,346,347,203',
+'133,134,207,208,209,210,211,212,213,346,347,344,345,194,195,196,197',
+'198,199,200,202,680,203,344,345,162,133,134,207,208,209,210,211,212',
+'213,194,195,196,197,198,199,200,202,161,203,398,330,689,133,160,207',
+'208,209,210,211,212,213,194,195,196,197,198,199,200,202,691,203,719',
+'510,692,133,693,207,208,209,210,211,212,213,194,195,196,197,198,199',
+'200,202,160,203,376,377,378,133,134,207,208,209,210,211,212,213,371',
+'372,373,374,375,379,102,103,104,105,106,107,108,109,110,111,112,695',
+'134,697,698,699,700,703,708,229,20,21,22,23,24,25,26,27,28,29,30,31',
+'32,33,134,711,562,74,714,230,715,716,194,195,196,197,198,199,200,202',
+'717,203,157,744,720,133,134,207,208,209,210,211,212,213,194,195,196',
+'197,198,199,200,202,721,203,722,599,724,133,134,207,208,209,210,211',
+'212,213,194,195,196,197,198,199,200,202,725,203,726,728,614,133,731',
+'207,208,209,210,211,212,213,194,195,196,197,198,199,200,202,732,203',
+'156,153,736,133,152,207,208,209,210,211,212,213,739,743,751,752,194',
+'195,196,197,198,199,200,202,144,203,754,576,755,133,134,207,208,209',
+'210,211,212,213,194,195,196,197,198,199,200,202,757,203,759,762,763',
+'133,134,207,208,209,210,211,212,213,194,195,196,197,198,199,200,202',
+'764,203,767,768,769,133,134,207,208,209,210,211,212,213,194,195,196',
+'197,198,199,200,202,770,203,643,232,703,133,134,207,208,209,210,211',
+'212,213,86,86,86,229,177,775,85,85,85,86,87,87,87,776,86,85,777,778',
+'134,87,85,141,711,230,87,786,194,195,196,197,198,199,200,202,140,203',
+'788,138,132,133,134,207,208,209,210,211,212,213,194,195,196,197,198',
+'199,200,202,791,203,130,796,128,133,134,207,208,209,210,211,212,213',
+'194,195,196,197,198,199,200,202,800,203,801,-383,802,133,134,207,208',
+'209,210,211,212,213,194,195,196,197,198,199,200,202,803,203,804,124',
+'123,133,807,207,208,209,210,211,212,213,767,203,813,816,194,195,196',
+'197,198,199,200,202,821,203,822,94,824,133,134,207,208,209,210,211,212',
+'213,194,195,196,197,198,199,200,202,828,203,829,830,90,133,134,207,208',
+'209,210,211,212,213,194,195,196,197,198,199,200,202,833,203,834,89,836',
+'133,134,207,208,209,210,211,212,213,194,195,196,197,198,199,200,202',
+'798,203,839,840,323,133,134,207,208,209,210,211,212,213,842,843,844',
+'849,194,195,196,197,198,199,200,202,850,203,851,88,857,133,134,207,208',
+'209,210,211,212,213,194,195,196,197,198,199,200,202,357,203,356,362',
+'363,133,134,207,208,209,210,211,212,213,194,195,196,197,198,199,200',
+'202,365,203,366,122,861,133,134,207,208,209,210,211,212,213,194,195',
+'196,197,198,199,200,202,3,203,156,355,399,133,134,207,208,209,210,211',
+'212,213,404,140,406,407,194,195,196,197,198,199,200,202,410,203,411',
+'412,413,133,134,207,208,209,210,211,212,213,194,195,196,197,198,199',
+'200,202,414,203,415,354,862,133,134,207,208,209,210,211,212,213,194',
+'195,196,197,198,199,200,202,438,203,439,442,453,133,134,207,208,209',
+'210,211,212,213,194,195,196,197,198,199,200,202,330,203,456,457,186',
+'133,134,207,208,209,210,211,212,213,464,465,466,473,194,195,196,197',
+'198,199,200,202,474,203,307,285,284,133,134,207,208,209,210,211,212',
+'213,194,195,196,197,198,199,200,202,281,203,280,279,276,133,134,207',
+'208,209,210,211,212,213,194,195,196,197,198,199,200,202,275,203,274',
+'267,177,133,134,207,208,209,210,211,212,213,194,195,196,197,198,199',
+'200,202,265,203,203,259,203,133,134,207,208,209,210,211,212,213,156',
+'503,504,505,194,195,196,197,198,199,200,202,506,203,507,863,513,133',
+'134,207,208,209,210,211,212,213,194,195,196,197,198,199,200,202,514',
+'203,515,259,517,133,134,207,208,209,210,211,212,213,86,86,86,86,252',
+'265,85,85,85,85,87,87,87,87,134,299,300,301,520,302,303,305,306,521',
+'194,195,196,197,198,199,200,202,203,203,524,203,134,133,203,207,208',
+'209,210,211,212,213,177,528,194,195,196,197,198,199,200,202,529,203',
+'532,533,534,133,134,207,208,209,210,211,212,213,115,116,117,118,119',
+'120,121,115,116,117,118,119,120,121,134,536,537,540,186,5,6,7,10,13',
+'14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38',
+'265,865,550,554,160,42,43,44,45,46,47,48,49,134,194,195,196,197,198',
+'199,200,202,556,203,866,186,560,133,562,207,208,209,210,211,212,213',
+'323,134,565,87,242,190,578,579,354,355,356,357,580,189,188,186,185,184',
+'183,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31',
+'32,33,34,35,38,182,181,596,597,599,42,43,44,45,46,47,48,49,194,195,196',
+'197,198,199,200,202,600,203,330,601,603,133,604,207,208,209,210,211',
+'212,213,605,,134,194,195,196,197,198,199,200,339,,203,,,,133,,207,208',
+'209,210,211,212,213,194,195,196,197,198,199,200,202,,203,,685,,133,',
+'207,208,209,210,211,212,213,194,195,196,197,198,199,200,202,,203,,,',
+'133,,207,208,209,210,211,212,213,,194,195,196,197,198,199,200,202,,203',
+',576,,133,134,207,208,209,210,211,212,213,,,,194,195,196,197,198,199',
+'200,202,,203,,655,,133,134,207,208,209,210,211,212,213,194,195,196,197',
+'198,199,200,202,,203,,,,133,134,207,208,209,210,211,212,213,194,195',
+'196,197,198,199,200,202,,203,,,,133,134,207,208,209,210,211,212,213',
+',194,195,196,197,198,199,200,202,,203,,,,133,134,207,208,209,210,211',
+'212,213,,,,194,195,196,197,198,199,200,202,,203,,,,133,134,207,208,209',
+'210,211,212,213,194,195,196,197,198,199,200,202,,203,,,,133,134,207',
+'208,209,210,211,212,213,194,195,196,197,198,199,200,202,,203,,,,133',
+'134,207,208,209,210,211,212,213,,194,195,196,197,198,199,200,202,,203',
+',,,133,134,207,208,209,210,211,212,213,,,,194,195,196,197,198,199,200',
+'202,,203,,,,133,134,207,208,209,210,211,212,213,102,103,104,105,106',
+'107,108,109,110,111,112,,,,134,,,,,,,,,,,,,,,,,,,,,,134,,115,116,117',
+'118,119,120,121,,,229,581,,,470,574,,573,,,,,134,,87,,,,,,230,,,,,,',
+',,,,,,,,,,134,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27',
+'28,29,30,31,32,33,34,35,38,236,,77,,,42,43,44,45,46,47,48,49,,,,,,,',
+',,,,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28',
+'29,30,31,32,33,34,35,38,657,,77,,,42,43,44,45,46,47,48,49,,,,,,,,,,',
+',,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29',
+'30,31,32,33,34,35,38,77,,,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,,,,',
+',,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31',
+'32,33,34,35,38,77,,,,,42,43,44,45,46,47,48,49,498,,,,,,,,,,,,,,,,,,5',
+'6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33',
+'34,35,38,126,381,,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,,,,,,,5,6,7',
+'10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34',
+'35,38,77,,,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,,,,,,,5,6,7,10,13,14',
+'15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,77',
+',,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,,,,,,,5,6,7,10,13,14,15,16,17',
+'18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,77,,,,,42,43',
+'44,45,46,47,48,49,,,,,,,,,,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20',
+'21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,77,422,,,,42,43,44,45',
+'46,47,48,49,,,,,,,,,,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22',
+'23,24,25,26,27,28,29,30,31,32,33,34,35,38,77,508,,,,42,43,44,45,46,47',
+'48,49,,,,,,,,,,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24',
+'25,26,27,28,29,30,31,32,33,34,35,38,77,,,,,42,43,44,45,46,47,48,49,',
+',,,,,,,,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26',
+'27,28,29,30,31,32,33,34,35,38,77,,,,,42,43,44,45,46,47,48,49,,,,,,,',
+',,,,,,,,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28',
+'29,30,31,32,33,34,35,38,77,,,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,',
+',,,,,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30',
+'31,32,33,34,35,38,77,621,,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,,,,',
+',,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31',
+'32,33,34,35,38,77,627,,,,42,43,44,45,46,47,48,49,,,,,,,,,,,,,,,,,,,5',
+'6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33',
+'34,35,38,,646,,,,42,43,44,45,46,47,48,49,102,103,104,105,106,107,108',
+'109,110,111,112,,,,,,,,,,,,,,,,,,,,,,,,,,,,115,116,117,118,119,120,121',
+'5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32',
+'33,34,35,38,,,,,,42,43,44,45,46,47,48,49,5,6,7,10,13,14,15,16,17,18',
+'19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,,,,,,42,43,44',
+'45,46,47,48,49,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27',
+'28,29,30,31,32,33,34,35,38,,,,,,42,43,44,45,46,47,48,49,5,6,7,10,13',
+'14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38',
+',,,,,42,43,44,45,46,47,48,49,5,6,7,10,13,14,15,16,17,18,19,20,21,22',
+'23,24,25,26,27,28,29,30,31,32,33,34,35,38,,,,,,42,43,44,45,46,47,48',
+'49,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31',
+'32,33,34,35,38,,,,,,42,43,44,45,46,47,48,49,5,6,7,10,13,14,15,16,17',
+'18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,,,,,,42,43',
+'44,45,46,47,48,49,5,6,7,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26',
+'27,28,29,30,31,32,33,34,35,38,,,,,,42,43,44,45,46,47' ]
+        racc_action_table = arr = ::Array.new(3597, nil)
+        idx = 0
+        clist.each do |str|
+          str.split(',', -1).each do |i|
+            arr[idx] = i.to_i unless i.empty?
+            idx += 1
+          end
+        end
+
+clist = [
+'2,463,803,749,688,787,189,218,218,189,602,2,324,386,714,714,714,714',
+'714,714,714,714,123,714,586,754,854,714,41,714,714,714,714,714,714,714',
+'585,151,815,441,257,386,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2',
+'2,2,2,2,2,2,602,257,324,187,631,2,2,2,2,2,2,2,2,854,41,567,810,303,298',
+'550,810,90,620,328,74,320,286,749,688,787,463,2,2,2,187,2,2,286,2,555',
+'2,189,189,189,803,799,123,504,754,189,714,189,586,602,2,324,2,602,2',
+'324,503,83,815,441,585,151,2,83,286,286,286,286,286,286,286,286,286',
+'286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286',
+'286,286,184,286,631,225,225,286,286,286,286,286,286,286,286,567,303',
+'298,550,158,90,620,328,74,320,281,706,87,469,310,158,469,310,286,286',
+'286,191,286,286,464,286,776,286,416,799,480,504,555,555,555,480,480',
+'614,776,614,555,286,555,286,503,286,158,158,158,158,158,158,158,158',
+'158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158',
+'158,158,158,310,87,87,220,220,158,158,158,158,158,158,158,158,191,191',
+'383,383,182,184,184,184,416,184,184,184,184,615,528,182,281,706,158',
+'158,158,852,158,158,169,158,529,158,553,169,464,553,310,310,310,289',
+'750,552,530,750,310,158,310,158,615,158,182,182,182,182,182,182,182',
+'182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182',
+'182,182,182,182,772,369,535,723,852,182,182,182,182,182,182,182,182',
+'100,553,264,334,125,536,334,552,289,750,125,765,468,334,125,468,369',
+'772,182,182,182,723,182,182,259,182,259,182,100,545,264,705,705,705',
+'705,705,705,705,705,540,705,182,765,182,705,182,705,705,705,705,705',
+'705,705,289,289,289,701,289,289,289,289,761,761,761,761,761,761,761',
+'761,564,761,545,531,531,761,545,761,761,761,761,761,761,761,865,701',
+'794,760,760,760,760,760,760,760,760,205,760,205,564,205,760,705,760',
+'760,760,760,760,760,760,720,720,720,720,720,720,720,720,794,720,253',
+'428,705,720,273,720,720,720,720,720,720,720,761,559,645,588,262,825',
+'3,705,360,173,598,154,569,642,838,569,113,428,838,253,761,839,728,273',
+'801,760,705,145,541,549,145,642,559,645,588,262,825,761,728,360,173',
+'598,154,642,113,760,541,720,681,839,728,510,801,283,681,124,541,510',
+'681,283,479,510,760,283,168,479,479,720,551,168,704,704,704,704,704',
+'704,704,704,122,704,556,704,868,704,720,704,704,704,704,704,704,704',
+'699,699,699,699,699,699,699,699,84,699,561,84,563,699,121,699,699,699',
+'699,699,699,699,695,695,695,695,695,695,695,695,120,695,512,512,512',
+'695,117,695,695,695,695,695,695,695,691,691,691,691,691,691,691,691',
+'116,691,249,249,249,691,572,691,691,691,691,691,691,691,219,219,219',
+'219,667,667,667,667,667,667,667,667,115,667,497,497,575,667,704,667',
+'667,667,667,667,667,667,285,285,285,285,285,285,285,285,577,285,217',
+'217,112,285,699,285,285,285,285,285,285,285,252,252,252,252,252,252',
+'252,252,108,252,178,178,587,252,695,252,252,252,252,252,252,252,229',
+'229,229,229,229,229,229,229,589,229,489,489,593,229,691,229,229,229',
+'229,229,229,229,488,488,488,488,861,861,861,861,861,861,861,861,539',
+'861,486,486,594,861,667,861,861,861,861,861,861,861,595,313,596,241',
+'241,241,539,539,539,539,539,292,485,485,285,241,241,241,241,241,241',
+'229,313,313,313,313,487,487,487,487,597,292,292,292,292,292,252,216',
+'80,80,600,229,216,216,848,848,848,848,848,848,848,848,106,848,484,484',
+'605,848,229,848,848,848,848,848,848,848,483,483,482,482,821,821,821',
+'821,821,821,821,821,608,821,481,481,104,821,861,821,821,821,821,821',
+'821,821,818,818,818,818,818,818,818,818,102,818,260,260,621,818,623',
+'818,818,818,818,818,818,818,807,807,807,807,807,807,807,807,625,807',
+'669,669,626,807,627,807,807,807,807,807,807,807,798,798,798,798,798',
+'798,798,798,629,798,502,502,502,798,848,798,798,798,798,798,798,798',
+'502,502,502,502,502,502,159,159,159,159,159,159,159,159,159,159,159',
+'630,821,632,633,635,637,640,646,807,36,36,36,36,36,36,36,36,36,36,36',
+'36,36,36,818,650,651,652,653,807,654,656,795,795,795,795,795,795,795',
+'795,658,795,99,795,673,795,807,795,795,795,795,795,795,795,786,786,786',
+'786,786,786,786,786,674,786,676,677,678,786,798,786,786,786,786,786',
+'786,786,775,775,775,775,775,775,775,775,679,775,680,682,684,775,685',
+'775,775,775,775,775,775,775,770,770,770,770,770,770,770,770,686,770',
+'98,93,692,770,92,770,770,770,770,770,770,770,696,703,710,712,471,471',
+'471,471,471,471,471,471,82,471,715,471,718,471,795,471,471,471,471,471',
+'471,471,144,144,144,144,144,144,144,144,721,144,727,732,733,144,786',
+'144,144,144,144,144,144,144,466,466,466,466,466,466,466,466,735,466',
+'736,738,739,466,775,466,466,466,466,466,466,466,146,146,146,146,146',
+'146,146,146,740,146,741,146,742,146,770,146,146,146,146,146,146,146',
+'240,86,4,144,743,744,240,86,4,591,240,86,4,745,418,591,747,748,471,591',
+'418,78,752,144,418,753,867,867,867,867,867,867,867,867,76,867,757,75',
+'73,867,144,867,867,867,867,867,867,867,397,397,397,397,397,397,397,397',
+'763,397,72,774,71,397,466,397,397,397,397,397,397,397,359,359,359,359',
+'359,359,359,359,778,359,779,780,781,359,146,359,359,359,359,359,359',
+'359,358,358,358,358,358,358,358,358,784,358,785,69,68,358,788,358,358',
+'358,358,358,358,358,793,796,797,800,357,357,357,357,357,357,357,357',
+'805,357,806,38,809,357,867,357,357,357,357,357,357,357,163,163,163,163',
+'163,163,163,163,811,163,812,814,16,163,397,163,163,163,163,163,163,163',
+'356,356,356,356,356,356,356,356,819,356,820,9,822,356,359,356,356,356',
+'356,356,356,356,355,355,355,355,355,355,355,355,828,355,831,832,833',
+'355,358,355,355,355,355,355,355,355,835,836,837,840,354,354,354,354',
+'354,354,354,354,841,354,842,8,853,354,357,354,354,354,354,354,354,354',
+'353,353,353,353,353,353,353,353,224,353,223,230,231,353,163,353,353',
+'353,353,353,353,353,352,352,352,352,352,352,352,352,235,352,237,67,856',
+'352,356,352,352,352,352,352,352,352,351,351,351,351,351,351,351,351',
+'1,351,251,222,261,351,355,351,351,351,351,351,351,351,266,267,269,271',
+'350,350,350,350,350,350,350,350,275,350,276,277,278,350,354,350,350',
+'350,350,350,350,350,349,349,349,349,349,349,349,349,279,349,280,221',
+'857,349,353,349,349,349,349,349,349,349,348,348,348,348,348,348,348',
+'348,301,348,302,304,319,348,352,348,348,348,348,348,348,348,347,347',
+'347,347,347,347,347,347,201,347,321,322,193,347,351,347,347,347,347',
+'347,347,347,329,331,332,336,346,346,346,346,346,346,346,346,337,346',
+'186,181,180,346,350,346,346,346,346,346,346,346,345,345,345,345,345',
+'345,345,345,176,345,175,174,172,345,349,345,345,345,345,345,345,345',
+'344,344,344,344,344,344,344,344,171,344,170,166,165,344,348,344,344',
+'344,344,344,344,344,343,343,343,343,343,343,343,343,164,343,162,161',
+'362,343,347,343,343,343,343,343,343,343,157,374,375,376,342,342,342',
+'342,342,342,342,342,377,342,378,860,388,342,346,342,342,342,342,342',
+'342,342,341,341,341,341,341,341,341,341,389,341,390,395,396,341,345',
+'341,341,341,341,341,341,341,424,367,248,143,156,401,424,367,248,143',
+'424,367,248,143,344,538,538,538,402,538,538,538,538,403,335,335,335',
+'335,335,335,335,335,404,335,405,406,343,335,407,335,335,335,335,335',
+'335,335,408,410,339,339,339,339,339,339,339,339,413,339,419,420,422',
+'339,342,339,339,339,339,339,339,339,255,255,255,255,255,255,255,167',
+'167,167,167,167,167,167,341,425,426,431,436,339,339,339,339,339,339',
+'339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339',
+'339,339,339,339,339,437,863,440,444,446,339,339,339,339,339,339,339',
+'339,335,202,202,202,202,202,202,202,202,448,202,864,454,455,202,456',
+'202,202,202,202,202,202,202,457,339,459,149,148,139,472,475,490,491',
+'492,493,494,137,136,135,134,131,129,202,202,202,202,202,202,202,202',
+'202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202',
+'202,202,202,127,126,517,518,520,202,202,202,202,202,202,202,202,206',
+'206,206,206,206,206,206,206,521,206,522,523,525,206,526,206,206,206',
+'206,206,206,206,527,,202,207,207,207,207,207,207,207,207,,207,,,,207',
+',207,207,207,207,207,207,207,619,619,619,619,619,619,619,619,,619,,619',
+',619,,619,619,619,619,619,619,619,580,580,580,580,580,580,580,580,,580',
+',,,580,,580,580,580,580,580,580,580,,573,573,573,573,573,573,573,573',
+',573,,573,,573,206,573,573,573,573,573,573,573,,,,570,570,570,570,570',
+'570,570,570,,570,,570,,570,207,570,570,570,570,570,570,570,566,566,566',
+'566,566,566,566,566,,566,,,,566,619,566,566,566,566,566,566,566,515',
+'515,515,515,515,515,515,515,,515,,,,515,580,515,515,515,515,515,515',
+'515,,514,514,514,514,514,514,514,514,,514,,,,514,573,514,514,514,514',
+'514,514,514,,,,513,513,513,513,513,513,513,513,,513,,,,513,570,513,513',
+'513,513,513,513,513,507,507,507,507,507,507,507,507,,507,,,,507,566',
+'507,507,507,507,507,507,507,506,506,506,506,506,506,506,506,,506,,,',
+'506,515,506,506,506,506,506,506,506,,505,505,505,505,505,505,505,505',
+',505,,,,505,514,505,505,505,505,505,505,505,,,,496,496,496,496,496,496',
+'496,496,,496,,,,496,513,496,496,496,496,496,496,496,458,458,458,458',
+'458,458,458,458,458,458,458,,,,507,,,,,,,,,,,,,,,,,,,,,,506,,458,458',
+'458,458,458,458,458,,,496,496,,,470,470,,470,,,,,505,,470,,,,,,496,',
+',,,,,,,,,,,,,,,496,470,470,470,470,470,470,470,470,470,470,470,470,470',
+'470,470,470,470,470,470,470,470,470,470,470,470,470,470,470,147,,147',
+',,470,470,470,470,470,470,470,470,,,,,,,,,,,,,,,,,,,,,147,147,147,147',
+'147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147',
+'147,147,147,147,147,147,147,571,,571,,,147,147,147,147,147,147,147,147',
+',,,,,,,,,,,,,,,,,,,,571,571,571,571,571,571,571,571,571,571,571,571',
+'571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,366',
+',,,,571,571,571,571,571,571,571,571,,,,,,,,,,,,,,,,,,,366,366,366,366',
+'366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366',
+'366,366,366,366,366,366,366,246,,,,,366,366,366,366,366,366,366,366',
+'366,,,,,,,,,,,,,,,,,,246,246,246,246,246,246,246,246,246,246,246,246',
+'246,246,246,246,246,246,246,246,246,246,246,246,246,246,246,246,70,246',
+',,,246,246,246,246,246,246,246,246,,,,,,,,,,,,,,,,,,,70,70,70,70,70',
+'70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70',
+'153,,,,,70,70,70,70,70,70,70,70,,,,,,,,,,,,,,,,,,,153,153,153,153,153',
+'153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153',
+'153,153,153,153,153,153,245,,,,,153,153,153,153,153,153,153,153,,,,',
+',,,,,,,,,,,,,,245,245,245,245,245,245,245,245,245,245,245,245,245,245',
+'245,245,245,245,245,245,245,245,245,245,245,245,245,245,288,,,,,245',
+'245,245,245,245,245,245,245,,,,,,,,,,,,,,,,,,,288,288,288,288,288,288',
+'288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288',
+'288,288,288,288,288,380,288,,,,288,288,288,288,288,288,288,288,,,,,',
+',,,,,,,,,,,,,380,380,380,380,380,380,380,380,380,380,380,380,380,380',
+'380,380,380,380,380,380,380,380,380,380,380,380,380,380,438,380,,,,380',
+'380,380,380,380,380,380,380,,,,,,,,,,,,,,,,,,,438,438,438,438,438,438',
+'438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438',
+'438,438,438,438,438,439,,,,,438,438,438,438,438,438,438,438,,,,,,,,',
+',,,,,,,,,,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439',
+'439,439,439,439,439,439,439,439,439,439,439,439,439,453,,,,,439,439',
+'439,439,439,439,439,439,,,,,,,,,,,,,,,,,,,453,453,453,453,453,453,453',
+'453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453',
+'453,453,453,453,542,,,,,453,453,453,453,453,453,453,453,,,,,,,,,,,,',
+',,,,,,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542',
+'542,542,542,542,542,542,542,542,542,542,542,542,546,542,,,,542,542,542',
+'542,542,542,542,542,,,,,,,,,,,,,,,,,,,546,546,546,546,546,546,546,546',
+'546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546',
+'546,546,546,557,546,,,,546,546,546,546,546,546,546,546,,,,,,,,,,,,,',
+',,,,,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557',
+'557,557,557,557,557,557,557,557,557,557,557,557,,557,,,,557,557,557',
+'557,557,557,557,557,53,53,53,53,53,53,53,53,53,53,53,,,,,,,,,,,,,,,',
+',,,,,,,,,,,,53,53,53,53,53,53,53,694,694,694,694,694,694,694,694,694',
+'694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694,694',
+'694,694,,,,,,694,694,694,694,694,694,694,694,690,690,690,690,690,690',
+'690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690',
+'690,690,690,690,690,,,,,,690,690,690,690,690,690,690,690,239,239,239',
+'239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239',
+'239,239,239,239,239,239,239,239,,,,,,239,239,239,239,239,239,239,239',
+'40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40',
+'40,40,40,40,40,,,,,,40,40,40,40,40,40,40,40,284,284,284,284,284,284',
+'284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284',
+'284,284,284,284,284,,,,,,284,284,284,284,284,284,284,284,511,511,511',
+'511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511,511',
+'511,511,511,511,511,511,511,511,,,,,,511,511,511,511,511,511,511,511',
+'611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611',
+'611,611,611,611,611,611,611,611,611,611,611,,,,,,611,611,611,611,611',
+'611,611,611,234,234,234,234,234,234,234,234,234,234,234,234,234,234',
+'234,234,234,234,234,234,234,234,234,234,234,234,234,234,,,,,,234,234',
+'234,234,234,234' ]
+        racc_action_check = arr = ::Array.new(3597, nil)
+        idx = 0
+        clist.each do |str|
+          str.split(',', -1).each do |i|
+            arr[idx] = i.to_i unless i.empty?
+            idx += 1
+          end
+        end
+
+racc_action_pointer = [
+   nil,  1429,    -1,   489,  1138,   nil,   nil,   nil,  1326,  1278,
+   nil,   nil,   nil,   nil,   nil,   nil,  1288,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   889,   nil,  1259,   nil,
+  3351,    13,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,  3134,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,  1401,  1240,  1239,
+  2552,  1190,  1188,  1168,    79,  1167,  1164,   nil,  1095,   nil,
+   757,   nil,  1023,   122,   574,   nil,  1137,   172,   nil,   nil,
+    76,   nil,   974,   971,   nil,   nil,   nil,   nil,  1026,   904,
+   340,   nil,   850,   nil,   832,   nil,   802,   nil,   688,   nil,
+   nil,   nil,   670,   486,   nil,   644,   618,   602,   nil,   nil,
+   596,   580,   550,    11,   523,   348,  1803,  1804,   nil,  1775,
+   nil,  1774,   nil,   nil,  1829,  1735,  1827,  1770,   nil,  1762,
+   nil,   nil,   nil,  1669,  1077,   501,  1121,  2314,  1822,  1812,
+   nil,    27,   nil,  2611,   453,   nil,  1637,  1612,   182,   831,
+   nil,  1601,  1604,  1283,  1598,  1580,  1465,  1622,   537,   280,
+  1578,  1576,  1558,   482,  1562,  1561,  1528,   nil,   659,   nil,
+  1538,  1541,   269,   nil,   154,   nil,  1534,    33,   nil,    -6,
+   nil,   128,   nil,  1417,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,  1510,  1804,   nil,   nil,   435,  1886,  1911,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   777,   657,   -19,   613,
+   224,  1462,  1398,  1352,  1349,   132,   nil,   nil,   nil,   709,
+  1379,  1376,   nil,   nil,  3515,  1397,   nil,  1368,   nil,  3310,
+  1136,   689,   nil,   nil,   nil,  2670,  2493,   nil,  1668,   556,
+   nil,  1416,   687,   430,   nil,  1615,   nil,    30,   nil,   365,
+   851,  1423,   477,   nil,   341,   nil,  1402,  1429,   nil,  1404,
+   nil,  1405,   nil,   465,   nil,  1414,  1447,  1418,  1448,  1437,
+  1439,   174,   nil,   527,  3392,   665,    95,   nil,  2729,   289,
+   nil,   nil,   678,   nil,   nil,   nil,   nil,   nil,    73,   nil,
+   nil,  1428,  1430,    72,  1431,   nil,   nil,   nil,   nil,   nil,
+   181,   nil,   nil,   668,   nil,   nil,   nil,   nil,   nil,  1432,
+    80,  1395,  1510,   nil,     0,   nil,   nil,   nil,    78,  1526,
+   nil,  1526,  1527,   nil,   347,  1697,  1523,  1532,   nil,  1721,
+   nil,  1651,  1629,  1603,  1581,  1559,  1537,  1511,  1489,  1467,
+  1445,  1419,  1397,  1375,  1353,  1327,  1305,  1261,  1235,  1213,
+   450,   nil,  1606,   nil,   nil,   nil,  2434,  1667,   nil,   328,
+   nil,   nil,   nil,   nil,  1619,  1620,  1621,  1630,  1632,   nil,
+  2788,   nil,   nil,   228,   nil,   nil,     0,   nil,  1634,  1652,
+  1654,   nil,   nil,   nil,   nil,  1649,  1650,  1191,   nil,   nil,
+   nil,  1665,  1622,  1683,  1696,  1638,  1699,  1702,  1706,   nil,
+  1711,   nil,   nil,  1721,   nil,   nil,   166,   nil,  1150,  1723,
+  1694,   nil,  1695,   nil,  1666,  1650,  1721,   nil,   459,   nil,
+   nil,  1753,   nil,   nil,   nil,   nil,  1655,  1777,  2847,  2906,
+  1752,    25,   nil,   nil,  1755,   nil,  1783,   nil,  1805,   nil,
+   nil,   nil,   nil,  2965,  1709,  1803,  1805,  1813,  2119,  1790,
+   nil,   nil,   nil,    -8,   188,   nil,  1099,   nil,   356,   183,
+  2253,  1055,  1821,   nil,   nil,  1825,   nil,   nil,   nil,   524,
+   190,   819,   807,   799,   787,   745,   721,   757,   705,   689,
+  1818,  1803,  1803,  1803,  1801,   nil,  2187,   645,   nil,   nil,
+   nil,   nil,   832,   115,   102,  2162,  2139,  2117,   nil,   nil,
+   525,  3433,   534,  2095,  2070,  2047,   nil,  1863,  1865,   nil,
+  1864,  1854,  1887,  1889,   nil,  1890,  1892,  1869,   270,   252,
+   293,   385,   nil,   nil,   nil,   302,   345,   nil,  1573,   653,
+   377,   499,  3024,   nil,   nil,   308,  3083,   nil,   nil,   438,
+    74,   536,   288,   282,   nil,    94,   548,  3142,   nil,   444,
+   nil,   571,   nil,   459,   409,   nil,  2025,    71,   nil,   486,
+  2003,  2375,   623,  1978,   nil,   647,   nil,   662,   nil,   nil,
+  1955,   nil,   nil,   nil,   nil,    26,    14,   691,   476,   709,
+   nil,  1145,   nil,   713,   739,   749,   746,   775,   452,   nil,
+   728,   nil,    -2,   nil,   nil,   804,   nil,   nil,   827,   nil,
+   nil,  3474,   nil,   nil,   204,   269,   nil,   nil,   nil,  1933,
+    77,   823,   nil,   852,   nil,   872,   843,   847,   nil,   890,
+   925,    60,   896,   897,   nil,   929,   nil,   899,   nil,   nil,
+   814,   nil,   484,   nil,   nil,   475,   901,   nil,   nil,   nil,
+   943,   944,   835,   920,   948,   nil,   951,   nil,   963,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   643,   nil,   843,
+   nil,   nil,   nil,   935,   980,   nil,   982,   983,   959,  1007,
+   979,   522,  1005,   nil,  1006,   983,  1026,   nil,   -10,   nil,
+  3269,   617,   972,   nil,  3228,   595,  1038,   nil,   nil,   573,
+   nil,   396,   nil,  1045,   551,   382,   175,   nil,   nil,   nil,
+  1015,   nil,  1042,   nil,    12,   939,   nil,   nil,  1059,   nil,
+   459,  1073,   nil,   302,   nil,   nil,   nil,  1049,   491,   nil,
+   nil,   nil,  1050,  1076,   nil,  1099,  1100,   nil,  1102,  1073,
+  1090,  1118,  1009,  1134,  1108,  1145,   nil,  1121,  1148,   -11,
+   290,   nil,  1152,  1129,    10,   nil,   nil,  1166,   nil,   nil,
+   437,   412,   nil,  1161,   nil,   323,   nil,   nil,   nil,   nil,
+  1029,   nil,   328,   nil,  1163,  1007,   175,   nil,  1208,  1210,
+  1098,  1187,   nil,   nil,  1117,  1207,   985,    -9,  1209,   nil,
+   nil,   nil,   nil,  1248,   428,   963,  1249,  1221,   893,   100,
+  1222,   495,   nil,   -13,   nil,  1230,  1258,   871,   nil,  1235,
+    75,  1280,  1285,   nil,  1256,    24,   nil,   nil,   849,  1301,
+  1277,   827,  1309,   nil,   nil,   478,   nil,   nil,  1295,   nil,
+   nil,  1324,  1327,  1326,   nil,  1341,  1281,  1313,   486,   492,
+  1314,  1323,  1294,   nil,   nil,   nil,   nil,   nil,   801,   nil,
+   nil,   nil,   272,  1354,    11,   nil,  1402,  1441,   nil,   nil,
+  1633,   735,   nil,  1778,  1806,   395,   nil,  1169,   555,   nil ]
+
+racc_action_default = [
+  -194,  -418,    -1,  -418,  -418,   -69,   -70,   -71,   -72,   -73,
+   -74,   -75,   -76,   -77,   -78,   -79,  -418,   -81,   -82,   -83,
+   -84,   -85,   -86,   -87,   -88,   -89,   -90,   -91,   -92,   -93,
+   -94,   -95,   -96,   -97,   -98,   -99,  -418,  -101,  -104,  -118,
+  -418,  -418,  -126,  -127,  -128,  -129,  -130,  -131,  -136,  -137,
+  -192,  -193,  -195,  -418,  -197,  -198,  -199,  -200,  -201,  -202,
+  -203,  -206,  -207,  -208,  -209,  -210,  -234,  -418,  -418,  -418,
+  -418,  -418,  -418,  -418,  -418,  -418,  -418,  -405,  -418,   870,
+  -418,   -65,   -67,  -418,  -139,  -140,  -418,  -146,  -205,  -204,
+  -418,  -100,  -106,  -418,  -109,   -72,   -73,  -119,  -418,  -125,
+  -418,  -211,  -418,  -214,  -418,  -216,  -418,  -218,  -418,  -220,
+  -221,  -222,  -418,  -418,  -386,  -418,  -418,  -418,  -394,  -395,
+  -418,  -418,  -418,  -418,  -418,  -418,  -418,  -418,  -247,  -418,
+  -254,  -418,  -260,  -250,  -418,  -327,  -418,  -418,  -350,  -418,
+  -398,  -410,   -62,  -418,  -418,  -138,  -418,  -418,  -418,  -147,
+  -148,  -418,  -102,  -418,  -418,  -132,  -134,  -418,  -418,  -418,
+  -406,  -418,  -418,  -418,  -418,  -418,  -418,  -418,  -418,  -418,
+  -418,  -418,  -418,  -418,  -418,  -418,  -418,  -337,  -418,  -244,
+  -418,  -242,  -418,  -255,  -418,  -251,  -418,  -418,  -328,  -418,
+  -399,  -418,   -66,    -2,    -3,    -4,    -5,    -6,    -7,    -8,
+    -9,   -10,  -418,   -12,   -14,   -18,  -418,  -418,   -22,   -23,
+   -24,   -25,   -26,   -27,   -28,   -30,   -34,   -37,   -40,   -45,
+   -48,   -50,   -52,   -54,   -56,   -58,   -61,   -68,  -186,  -418,
+  -418,  -418,  -143,   -63,  -418,  -418,  -145,  -150,  -152,  -418,
+  -156,  -418,  -141,  -149,   -80,  -418,  -418,  -107,  -418,  -418,
+  -123,  -418,  -418,  -418,  -196,  -418,  -212,  -418,  -224,  -418,
+  -418,  -418,  -418,  -228,  -418,  -291,  -418,  -418,  -387,  -418,
+  -389,  -418,  -391,  -418,  -404,  -418,  -418,  -418,  -418,  -418,
+  -418,  -418,  -240,  -418,  -418,  -418,  -418,  -248,  -418,  -418,
+  -261,  -263,  -418,  -265,  -266,  -267,  -268,  -269,  -418,  -288,
+  -289,  -418,  -418,  -418,  -418,  -313,  -314,  -252,  -324,  -326,
+  -418,  -351,  -353,  -418,  -355,  -356,  -357,  -358,  -365,  -418,
+  -418,  -418,  -418,  -381,  -418,  -407,  -408,  -409,  -418,  -418,
+   -13,  -418,  -418,   -60,  -172,  -418,  -418,  -418,   -19,  -418,
+   -20,  -418,  -418,  -418,  -418,  -418,  -418,  -418,  -418,  -418,
+  -418,  -418,  -418,  -418,  -418,  -418,  -418,  -418,  -418,  -418,
+  -418,  -190,  -418,  -142,   -64,  -144,  -418,  -157,  -155,  -418,
+  -159,  -161,  -162,  -163,  -418,  -418,  -166,  -418,  -418,  -171,
+  -418,  -105,  -108,  -418,  -120,  -122,  -418,  -112,  -114,  -418,
+  -418,  -133,  -135,  -124,  -213,  -418,  -418,  -418,  -215,  -217,
+  -219,  -418,  -418,  -418,  -418,  -418,  -418,  -418,  -418,  -393,
+  -418,  -397,  -235,  -418,  -237,  -238,  -418,  -245,  -418,  -418,
+  -418,  -249,  -418,  -256,  -418,  -418,  -418,  -262,  -418,  -270,
+  -272,  -418,  -274,  -275,  -276,  -277,  -290,  -418,  -418,  -418,
+  -250,  -418,  -315,  -329,  -418,  -352,  -418,  -359,  -418,  -361,
+  -362,  -363,  -364,  -418,  -372,  -418,  -418,  -418,  -418,  -418,
+  -400,  -401,  -402,  -418,  -418,   -11,  -418,  -173,  -174,  -175,
+  -418,  -418,  -418,   -16,   -17,  -418,   -31,   -32,   -33,   -35,
+   -36,   -38,   -39,   -41,   -42,   -43,   -44,   -46,   -47,   -49,
+   -51,   -53,   -55,   -57,  -418,  -187,  -418,  -418,  -151,  -153,
+  -154,  -158,  -418,  -418,  -418,  -418,  -418,  -418,  -103,  -110,
+  -418,  -418,  -418,  -418,  -418,  -418,  -225,  -418,  -418,  -229,
+  -418,  -418,  -338,  -418,  -399,  -418,  -418,  -418,  -418,  -418,
+  -418,  -418,  -243,  -246,  -253,  -418,  -418,  -259,  -418,  -418,
+  -418,  -418,  -418,  -294,  -296,  -418,  -418,  -305,  -307,  -418,
+  -418,  -418,  -418,  -418,  -349,  -418,  -418,  -418,  -367,  -418,
+  -373,  -418,  -382,  -418,  -418,  -385,  -418,  -418,   -29,  -176,
+  -418,  -418,  -418,  -405,  -182,  -418,  -178,  -418,   -15,   -21,
+  -418,  -188,  -191,  -189,  -160,  -418,  -418,  -418,  -418,  -418,
+  -121,  -418,  -113,  -418,  -418,  -418,  -418,  -418,  -418,  -232,
+  -418,  -223,  -418,  -388,  -390,  -418,  -396,  -236,  -418,  -241,
+  -257,  -418,  -264,  -271,  -418,  -418,  -278,  -279,  -284,  -418,
+  -418,  -418,  -295,  -418,  -298,  -418,  -418,  -418,  -306,  -418,
+  -418,  -418,  -418,  -418,  -316,  -418,  -319,  -418,  -330,  -331,
+  -418,  -333,  -418,  -343,  -354,  -418,  -418,  -368,  -369,  -371,
+  -418,  -418,  -418,  -418,  -418,  -180,  -418,  -184,  -418,  -177,
+  -183,  -179,   -59,  -164,  -165,  -167,  -168,  -418,  -170,  -418,
+  -115,  -116,  -117,  -418,  -418,  -230,  -418,  -418,  -418,  -418,
+  -418,  -418,  -418,  -273,  -418,  -418,  -418,  -292,  -418,  -293,
+  -418,  -418,  -418,  -304,  -418,  -418,  -418,  -310,  -312,  -418,
+  -325,  -418,  -335,  -418,  -418,  -418,  -418,  -360,  -366,  -374,
+  -418,  -383,  -418,  -403,  -418,  -418,  -181,  -185,  -418,  -111,
+  -418,  -418,  -233,  -418,  -384,  -392,  -239,  -418,  -418,  -280,
+  -281,  -285,  -418,  -418,  -297,  -418,  -418,  -308,  -418,  -418,
+  -418,  -418,  -418,  -418,  -418,  -418,  -348,  -418,  -418,  -418,
+  -418,  -379,  -418,  -418,  -418,  -169,  -226,  -418,  -231,  -258,
+  -418,  -418,  -286,  -418,  -299,  -418,  -302,  -303,  -309,  -311,
+  -418,  -332,  -418,  -334,  -418,  -418,  -418,  -341,  -418,  -418,
+  -343,  -418,  -375,  -376,  -418,  -418,  -418,  -418,  -418,  -282,
+  -283,  -287,  -300,  -418,  -418,  -418,  -418,  -418,  -418,  -418,
+  -418,  -418,  -370,  -418,  -380,  -418,  -418,  -418,  -301,  -418,
+  -418,  -418,  -418,  -339,  -418,  -418,  -342,  -344,  -418,  -418,
+  -418,  -418,  -418,  -227,  -317,  -418,  -320,  -322,  -418,  -336,
+  -340,  -418,  -418,  -418,  -378,  -418,  -418,  -418,  -418,  -418,
+  -418,  -418,  -418,  -417,  -318,  -321,  -323,  -346,  -418,  -345,
+  -377,  -413,  -418,  -418,  -418,  -415,  -418,  -418,  -411,  -412,
+  -418,  -418,  -347,  -418,  -418,  -418,  -416,  -418,  -418,  -414 ]
+
+racc_goto_table = [
+    53,   135,    82,   227,   260,   176,   149,   333,   231,   233,
+   158,   258,   100,   150,    97,   318,   235,   151,   563,   383,
+   462,   178,    50,   166,   324,   261,   523,   461,   525,   526,
+   387,   370,     9,     8,   338,   429,   263,   638,   561,    81,
+   139,   598,   311,   382,   125,   467,   266,   332,   547,   269,
+   271,   702,   290,   246,   154,   543,   745,   615,   766,   642,
+   710,   483,   484,   485,   486,   137,   234,   487,   488,   310,
+   558,   544,   548,   645,   644,   243,   479,   480,   481,   482,
+   446,   447,   557,   455,   148,   559,   544,   750,   361,   709,
+   333,   783,   268,   273,   191,   326,   364,   327,   854,   859,
+     1,   233,   852,     2,   340,   489,   490,   491,   492,   493,
+    80,   367,    91,   253,   392,   808,    92,   245,    93,   386,
+   590,   391,   419,   179,   145,   499,   369,   248,   569,   360,
+    51,   254,   256,   257,   262,   541,   318,   180,   127,   286,
+   333,    82,   129,   288,   333,   380,   423,   811,   131,   289,
+   612,   249,   608,   773,   428,   628,   255,   427,   234,   622,
+   784,   729,   785,   445,   333,   437,   686,   542,   623,   476,
+   477,   478,   472,   765,   647,   544,   334,   382,   192,   548,
+    53,   572,   292,   546,   475,   629,   552,   313,     9,     8,
+   544,   634,   635,   825,   136,   187,   494,   553,   723,   443,
+   639,   701,   287,   771,   497,   nil,   nil,   nil,   416,   nil,
+   nil,   nil,     9,     8,   nil,   nil,   nil,   nil,   nil,   248,
+   248,   nil,   nil,   nil,   nil,   436,   nil,   679,   233,   nil,
+   441,   405,   nil,   712,   782,   nil,   nil,   nil,   368,   nil,
+   nil,   nil,   nil,   249,   249,   516,   522,   454,   522,   522,
+   nil,   nil,   nil,   nil,   nil,   463,   nil,   nil,   418,   518,
+   468,   nil,   424,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   519,   nil,   nil,   nil,   nil,   nil,   501,
+   nil,   417,   613,   nil,    53,   234,   425,   292,   nil,   527,
+   nil,   nil,   584,   592,   568,   nil,   511,   nil,   462,   nil,
+   nil,   nil,   nil,   nil,   nil,   461,   421,   nil,   313,   nil,
+   333,   333,   333,   334,   531,   nil,     9,     8,   333,   333,
+   333,   nil,   458,   734,   nil,   nil,   nil,   737,   nil,   nil,
+   nil,   nil,   233,   577,   nil,   nil,   nil,   nil,   538,   575,
+   nil,   nil,   587,   588,   589,   nil,   nil,   nil,   713,   nil,
+   593,   594,   595,   nil,   248,   582,   555,   nil,   602,   nil,
+   nil,   nil,   669,   nil,   820,   500,   nil,   nil,   nil,   nil,
+   nil,   nil,   522,   nil,   nil,   nil,   nil,   nil,   249,   nil,
+   nil,   318,   nil,   nil,   nil,   662,   nil,   nil,   nil,   234,
+   nil,   567,   nil,   nil,   841,   nil,   468,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   179,   564,   812,   nil,
+   nil,   nil,   535,   nil,   nil,   nil,   nil,   nil,   653,   nil,
+   585,   586,   656,   233,   nil,   577,   545,   549,   nil,   nil,
+   658,   nil,   nil,   nil,   nil,   nil,   611,   522,   nil,   nil,
+   nil,   545,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   652,   nil,   nil,   631,   nil,   nil,
+   nil,   687,   nil,   nil,   nil,   591,   nil,   nil,   nil,   nil,
+   234,   nil,   nil,   nil,   nil,   nil,   333,   nil,   nil,   nil,
+   333,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   735,   718,
+   nil,   nil,   738,   690,   730,   nil,   nil,   nil,   nil,   694,
+   545,   nil,   nil,   nil,   549,   nil,   nil,   688,   nil,   nil,
+   nil,   640,   nil,   nil,   nil,   545,   nil,   nil,   nil,   nil,
+   nil,   740,   nil,   nil,   747,   nil,   746,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   753,   nil,   nil,   756,
+   333,   nil,   nil,   nil,   nil,   681,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   458,   nil,   nil,   333,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   741,   797,   nil,   nil,   nil,   nil,   nil,   nil,   789,
+   790,   nil,   nil,   333,   774,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   794,   749,   nil,   814,   nil,   nil,   522,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   805,   nil,
+   nil,   nil,   nil,   333,   nil,   832,   nil,   746,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   823,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   727,
+   nil,   787,   nil,   835,   nil,   853,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   864,   nil,   nil,   815,   nil,   nil,   868,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   640 ]
+
+racc_goto_check = [
+    45,     4,    31,    32,     5,    82,    29,    22,    23,    28,
+    47,    84,    67,    53,    25,   100,    55,     4,   152,    44,
+    73,    88,    64,    47,   156,    23,    83,    75,    83,    83,
+    48,    60,    34,    33,    10,   105,    85,   128,   153,    30,
+   155,    87,   137,    43,    25,    61,    82,    11,   117,    82,
+    82,   132,    97,    40,    51,   112,   134,   106,   115,   133,
+   151,    14,    14,    14,    14,   135,    29,    15,    15,   136,
+   112,    24,    24,   106,   138,    53,    12,    12,    13,    13,
+   139,   144,   145,   146,    31,   147,    24,   148,    32,   149,
+    22,   150,   157,   158,   160,   161,    28,   162,   163,   164,
+     1,    28,   165,     2,     8,    16,    17,    18,    19,    20,
+    26,    27,    37,    51,    23,   115,    39,    41,    42,    46,
+    49,    52,     6,    31,    54,    57,    59,    25,    62,    63,
+    65,    66,    79,    80,    81,    86,   100,    89,    90,    91,
+    22,    31,    92,    93,    22,    40,    94,   134,    95,    96,
+    98,    45,    83,   132,    99,   117,    45,    97,    29,   112,
+   151,   107,   151,   137,    22,   109,   110,   111,   113,    10,
+    10,    10,     6,   114,   112,    24,    25,    43,    30,    24,
+    45,    61,    45,   116,    11,   118,   120,    45,    34,    33,
+    24,   121,   122,   123,   124,   125,     6,   126,    87,   127,
+   129,   130,    64,   131,     5,   nil,   nil,   nil,     4,   nil,
+   nil,   nil,    34,    33,   nil,   nil,   nil,   nil,   nil,    25,
+    25,   nil,   nil,   nil,   nil,     4,   nil,    83,    28,   nil,
+     4,   155,   nil,   153,   128,   nil,   nil,   nil,    31,   nil,
+   nil,   nil,   nil,    45,    45,    84,     5,     4,     5,     5,
+   nil,   nil,   nil,   nil,   nil,     4,   nil,   nil,    25,    23,
+    53,   nil,    25,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,    85,   nil,   nil,   nil,   nil,   nil,    47,
+   nil,    31,   105,   nil,    45,    29,    45,    45,   nil,    82,
+   nil,   nil,    60,    48,    10,   nil,    47,   nil,    73,   nil,
+   nil,   nil,   nil,   nil,   nil,    75,    64,   nil,    45,   nil,
+    22,    22,    22,    25,    88,   nil,    34,    33,    22,    22,
+    22,   nil,    45,    24,   nil,   nil,   nil,    24,   nil,   nil,
+   nil,   nil,    28,    23,   nil,   nil,   nil,   nil,    47,    55,
+   nil,   nil,     6,     6,     6,   nil,   nil,   nil,    73,   nil,
+     6,     6,     6,   nil,    25,    32,    47,   nil,   156,   nil,
+   nil,   nil,    44,   nil,   152,    31,   nil,   nil,   nil,   nil,
+   nil,   nil,     5,   nil,   nil,   nil,   nil,   nil,    45,   nil,
+   nil,   100,   nil,   nil,   nil,    22,   nil,   nil,   nil,    29,
+   nil,     4,   nil,   nil,   152,   nil,    53,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,    31,    67,    83,   nil,
+   nil,   nil,    31,   nil,   nil,   nil,   nil,   nil,    23,   nil,
+     4,     4,    23,    28,   nil,    23,    45,    45,   nil,   nil,
+    55,   nil,   nil,   nil,   nil,   nil,    47,     5,   nil,   nil,
+   nil,    45,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,    47,   nil,   nil,     4,   nil,   nil,
+   nil,    23,   nil,   nil,   nil,    25,   nil,   nil,   nil,   nil,
+    29,   nil,   nil,   nil,   nil,   nil,    22,   nil,   nil,   nil,
+    22,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,     6,    23,
+   nil,   nil,     6,    47,    84,   nil,   nil,   nil,   nil,    47,
+    45,   nil,   nil,   nil,    45,   nil,   nil,     4,   nil,   nil,
+   nil,    45,   nil,   nil,   nil,    45,   nil,   nil,   nil,   nil,
+   nil,    23,   nil,   nil,    32,   nil,    23,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,    23,   nil,   nil,    32,
+    22,   nil,   nil,   nil,   nil,    25,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+    45,   nil,   nil,    22,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,    47,     6,   nil,   nil,   nil,   nil,   nil,   nil,    32,
+    32,   nil,   nil,    22,    82,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,    23,     4,   nil,     6,   nil,   nil,     5,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    23,   nil,
+   nil,   nil,   nil,    22,   nil,     6,   nil,    23,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,    32,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    31,
+   nil,     4,   nil,    23,   nil,     6,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,    23,   nil,   nil,     4,   nil,   nil,    23,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,    45 ]
+
+racc_goto_pointer = [
+   nil,   100,   103,   nil,   -73,  -158,  -163,   nil,  -103,   nil,
+  -172,  -155,  -268,  -268,  -287,  -285,  -249,  -249,  -249,  -249,
+  -249,   nil,  -195,  -138,  -367,   -26,   106,  -128,  -138,   -81,
+    35,    -2,  -141,    31,    30,   nil,   nil,    76,   nil,    78,
+  -100,   -35,    80,  -203,  -229,    -2,  -130,   -90,  -219,  -390,
+   nil,   -44,  -130,   -74,    41,  -131,   nil,  -241,   nil,  -115,
+  -210,  -289,  -340,  -100,    20,   128,   -27,   -41,   nil,   nil,
+   nil,   nil,   nil,  -304,   nil,  -297,   nil,   nil,   nil,   -27,
+   -28,   -30,  -119,  -378,  -150,  -128,  -302,  -479,  -104,    11,
+    67,   -43,    70,   -40,  -142,    75,   -35,  -132,  -388,  -138,
+  -174,   nil,   nil,   nil,   nil,  -257,  -483,  -523,   nil,  -133,
+  -453,  -271,  -383,  -377,  -563,  -678,  -256,  -391,  -364,   nil,
+  -256,  -361,  -360,  -617,   120,    59,  -246,  -109,  -516,  -353,
+  -439,  -538,  -589,  -494,  -648,   -10,  -120,  -147,  -481,  -233,
+   nil,   nil,   nil,   nil,  -232,  -371,  -237,  -370,  -622,  -559,
+  -659,  -590,  -439,  -418,   nil,   -36,  -166,   -75,   -77,   nil,
+   -47,   -96,   -94,  -753,  -755,  -741 ]
+
+racc_goto_default = [
+   nil,   nil,   nil,   204,   193,   201,   331,   205,   214,   206,
+   215,   nil,   216,   217,   218,   219,   220,   221,   222,   223,
+   224,   225,   226,   228,    66,     4,   nil,   240,    39,    40,
+   nil,   385,   nil,    95,    96,    11,    12,    37,    36,   nil,
+   nil,   nil,   nil,   247,   nil,   241,   nil,   nil,   nil,   384,
+    41,   nil,   155,    83,    84,   nil,   237,   238,   239,   nil,
+   nil,   nil,   469,   nil,   nil,   nil,    52,   nil,    54,    55,
+    56,    57,    58,    59,    60,    61,    62,    63,    64,   101,
+   nil,   nil,   nil,   nil,   617,   nil,   264,   nil,   nil,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   291,   nil,
+   293,   294,   295,   296,   297,   nil,   nil,   616,   298,   nil,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   304,
+   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   641,   nil,   772,   nil,   nil,   nil,   nil,   312,   nil,
+   314,   315,   316,   317,   nil,   nil,   nil,   nil,   nil,   nil,
+   nil,   nil,   321,   nil,   113,   nil,   nil,   114,   nil,   460,
+   nil,   nil,   nil,   nil,   nil,   nil ]
+
+racc_reduce_table = [
+  0, 0, :racc_error,
+  1, 141, :_reduce_none,
+  1, 143, :_reduce_2,
+  1, 143, :_reduce_3,
+  1, 143, :_reduce_4,
+  1, 143, :_reduce_5,
+  1, 143, :_reduce_6,
+  1, 143, :_reduce_7,
+  1, 143, :_reduce_8,
+  1, 143, :_reduce_9,
+  1, 143, :_reduce_10,
+  3, 143, :_reduce_11,
+  1, 145, :_reduce_none,
+  2, 145, :_reduce_13,
+  1, 147, :_reduce_none,
+  4, 147, :_reduce_15,
+  3, 147, :_reduce_16,
+  3, 147, :_reduce_17,
+  1, 148, :_reduce_none,
+  2, 148, :_reduce_19,
+  2, 148, :_reduce_20,
+  4, 148, :_reduce_21,
+  1, 149, :_reduce_22,
+  1, 149, :_reduce_23,
+  1, 149, :_reduce_24,
+  1, 149, :_reduce_25,
+  1, 149, :_reduce_26,
+  1, 149, :_reduce_27,
+  1, 150, :_reduce_none,
+  4, 150, :_reduce_29,
+  1, 152, :_reduce_none,
+  3, 152, :_reduce_31,
+  3, 152, :_reduce_32,
+  3, 152, :_reduce_33,
+  1, 153, :_reduce_none,
+  3, 153, :_reduce_35,
+  3, 153, :_reduce_36,
+  1, 154, :_reduce_none,
+  3, 154, :_reduce_38,
+  3, 154, :_reduce_39,
+  1, 155, :_reduce_none,
+  3, 155, :_reduce_41,
+  3, 155, :_reduce_42,
+  3, 155, :_reduce_43,
+  3, 155, :_reduce_44,
+  1, 156, :_reduce_none,
+  3, 156, :_reduce_46,
+  3, 156, :_reduce_47,
+  1, 157, :_reduce_none,
+  3, 157, :_reduce_49,
+  1, 158, :_reduce_none,
+  3, 158, :_reduce_51,
+  1, 159, :_reduce_none,
+  3, 159, :_reduce_53,
+  1, 160, :_reduce_none,
+  3, 160, :_reduce_55,
+  1, 161, :_reduce_none,
+  3, 161, :_reduce_57,
+  1, 162, :_reduce_none,
+  5, 162, :_reduce_59,
+  1, 146, :_reduce_60,
+  1, 163, :_reduce_61,
+  3, 164, :_reduce_62,
+  1, 167, :_reduce_none,
+  2, 167, :_reduce_64,
+  1, 166, :_reduce_65,
+  3, 166, :_reduce_66,
+  1, 170, :_reduce_none,
+  3, 170, :_reduce_68,
+  1, 168, :_reduce_69,
+  1, 168, :_reduce_70,
+  1, 168, :_reduce_71,
+  1, 168, :_reduce_none,
+  1, 168, :_reduce_none,
+  1, 168, :_reduce_74,
+  1, 168, :_reduce_none,
+  1, 168, :_reduce_none,
+  1, 168, :_reduce_77,
+  1, 168, :_reduce_78,
+  1, 168, :_reduce_79,
+  4, 168, :_reduce_80,
+  1, 176, :_reduce_81,
+  1, 176, :_reduce_82,
+  1, 176, :_reduce_83,
+  1, 177, :_reduce_84,
+  1, 177, :_reduce_85,
+  1, 177, :_reduce_86,
+  1, 177, :_reduce_87,
+  1, 177, :_reduce_88,
+  1, 177, :_reduce_89,
+  1, 177, :_reduce_90,
+  1, 177, :_reduce_91,
+  1, 177, :_reduce_92,
+  1, 177, :_reduce_93,
+  1, 177, :_reduce_94,
+  1, 177, :_reduce_95,
+  1, 177, :_reduce_96,
+  1, 177, :_reduce_97,
+  1, 178, :_reduce_98,
+  1, 178, :_reduce_99,
+  2, 175, :_reduce_100,
+  1, 175, :_reduce_none,
+  0, 181, :_reduce_102,
+  6, 173, :_reduce_103,
+  0, 182, :_reduce_104,
+  5, 173, :_reduce_105,
+  2, 173, :_reduce_106,
+  1, 180, :_reduce_none,
+  2, 180, :_reduce_none,
+  1, 179, :_reduce_109,
+  3, 183, :_reduce_110,
+  6, 183, :_reduce_111,
+  1, 186, :_reduce_112,
+  3, 186, :_reduce_113,
+  1, 188, :_reduce_114,
+  4, 188, :_reduce_115,
+  4, 188, :_reduce_116,
+  4, 188, :_reduce_117,
+  1, 165, :_reduce_none,
+  2, 165, :_reduce_119,
+  1, 184, :_reduce_120,
+  3, 184, :_reduce_121,
+  1, 189, :_reduce_none,
+  4, 174, :_reduce_none,
+  5, 174, :_reduce_none,
+  2, 174, :_reduce_none,
+  1, 190, :_reduce_126,
+  1, 190, :_reduce_127,
+  1, 190, :_reduce_128,
+  1, 190, :_reduce_129,
+  1, 190, :_reduce_130,
+  1, 190, :_reduce_131,
+  1, 191, :_reduce_none,
+  3, 191, :_reduce_none,
+  1, 192, :_reduce_none,
+  3, 192, :_reduce_none,
+  1, 169, :_reduce_136,
+  1, 169, :_reduce_137,
+  2, 171, :_reduce_138,
+  1, 171, :_reduce_none,
+  1, 194, :_reduce_140,
+  3, 194, :_reduce_141,
+  4, 194, :_reduce_142,
+  3, 194, :_reduce_143,
+  4, 194, :_reduce_144,
+  3, 194, :_reduce_145,
+  1, 193, :_reduce_146,
+  2, 193, :_reduce_147,
+  2, 193, :_reduce_148,
+  3, 193, :_reduce_149,
+  1, 195, :_reduce_none,
+  3, 195, :_reduce_none,
+  1, 196, :_reduce_152,
+  3, 196, :_reduce_153,
+  3, 197, :_reduce_154,
+  2, 197, :_reduce_155,
+  1, 197, :_reduce_156,
+  2, 197, :_reduce_157,
+  3, 198, :_reduce_158,
+  1, 199, :_reduce_159,
+  3, 199, :_reduce_160,
+  1, 200, :_reduce_161,
+  1, 200, :_reduce_162,
+  1, 200, :_reduce_163,
+  4, 200, :_reduce_164,
+  4, 200, :_reduce_165,
+  1, 200, :_reduce_166,
+  4, 200, :_reduce_167,
+  4, 200, :_reduce_168,
+  6, 200, :_reduce_169,
+  4, 200, :_reduce_170,
+  1, 200, :_reduce_171,
+  1, 151, :_reduce_none,
+  2, 151, :_reduce_173,
+  1, 201, :_reduce_none,
+  1, 201, :_reduce_none,
+  2, 201, :_reduce_none,
+  3, 202, :_reduce_177,
+  2, 202, :_reduce_178,
+  3, 202, :_reduce_179,
+  3, 202, :_reduce_180,
+  4, 202, :_reduce_181,
+  2, 202, :_reduce_182,
+  3, 202, :_reduce_none,
+  3, 202, :_reduce_184,
+  4, 202, :_reduce_185,
+  1, 172, :_reduce_186,
+  3, 172, :_reduce_187,
+  4, 172, :_reduce_188,
+  4, 172, :_reduce_189,
+  1, 203, :_reduce_190,
+  3, 203, :_reduce_191,
+  2, 142, :_reduce_none,
+  2, 142, :_reduce_none,
+  0, 142, :_reduce_none,
+  1, 204, :_reduce_none,
+  4, 204, :_reduce_196,
+  1, 206, :_reduce_none,
+  1, 206, :_reduce_none,
+  1, 206, :_reduce_none,
+  1, 206, :_reduce_none,
+  1, 206, :_reduce_none,
+  1, 206, :_reduce_none,
+  1, 206, :_reduce_none,
+  2, 206, :_reduce_none,
+  2, 206, :_reduce_none,
+  1, 206, :_reduce_none,
+  1, 206, :_reduce_none,
+  1, 206, :_reduce_none,
+  1, 206, :_reduce_none,
+  1, 206, :_reduce_none,
+  1, 207, :_reduce_211,
+  3, 207, :_reduce_212,
+  4, 219, :_reduce_213,
+  1, 219, :_reduce_214,
+  4, 219, :_reduce_215,
+  1, 219, :_reduce_216,
+  4, 219, :_reduce_217,
+  1, 219, :_reduce_218,
+  4, 219, :_reduce_219,
+  1, 219, :_reduce_220,
+  1, 219, :_reduce_221,
+  1, 219, :_reduce_222,
+  6, 219, :_reduce_223,
+  1, 220, :_reduce_224,
+  3, 220, :_reduce_225,
+  7, 224, :_reduce_226,
+  10, 224, :_reduce_227,
+  1, 221, :_reduce_228,
+  3, 221, :_reduce_229,
+  5, 225, :_reduce_230,
+  7, 225, :_reduce_231,
+  1, 227, :_reduce_232,
+  3, 227, :_reduce_233,
+  1, 209, :_reduce_234,
+  5, 217, :_reduce_235,
+  7, 217, :_reduce_236,
+  5, 216, :_reduce_237,
+  5, 216, :_reduce_238,
+  9, 218, :_reduce_239,
+  4, 208, :_reduce_240,
+  7, 208, :_reduce_241,
+  1, 229, :_reduce_none,
+  4, 229, :_reduce_none,
+  1, 228, :_reduce_244,
+  3, 228, :_reduce_245,
+  6, 210, :_reduce_246,
+  1, 230, :_reduce_247,
+  1, 231, :_reduce_none,
+  2, 231, :_reduce_none,
+  1, 144, :_reduce_250,
+  2, 144, :_reduce_251,
+  3, 144, :_reduce_252,
+  6, 211, :_reduce_253,
+  1, 232, :_reduce_254,
+  0, 233, :_reduce_255,
+  2, 233, :_reduce_256,
+  3, 234, :_reduce_257,
+  6, 234, :_reduce_258,
+  6, 212, :_reduce_259,
+  1, 235, :_reduce_260,
+  1, 236, :_reduce_none,
+  2, 236, :_reduce_none,
+  1, 237, :_reduce_263,
+  4, 237, :_reduce_264,
+  1, 238, :_reduce_none,
+  1, 238, :_reduce_none,
+  1, 238, :_reduce_none,
+  1, 238, :_reduce_none,
+  1, 238, :_reduce_none,
+  1, 239, :_reduce_270,
+  3, 239, :_reduce_271,
+  1, 245, :_reduce_272,
+  4, 245, :_reduce_273,
+  1, 245, :_reduce_274,
+  1, 245, :_reduce_275,
+  1, 245, :_reduce_276,
+  1, 245, :_reduce_277,
+  1, 246, :_reduce_278,
+  1, 246, :_reduce_279,
+  3, 246, :_reduce_280,
+  3, 246, :_reduce_281,
+  5, 247, :_reduce_282,
+  5, 247, :_reduce_283,
+  4, 240, :_reduce_284,
+  6, 240, :_reduce_285,
+  7, 240, :_reduce_286,
+  8, 240, :_reduce_287,
+  1, 248, :_reduce_288,
+  1, 248, :_reduce_289,
+  1, 249, :_reduce_290,
+  1, 226, :_reduce_none,
+  1, 250, :_reduce_none,
+  5, 241, :_reduce_293,
+  1, 251, :_reduce_294,
+  2, 251, :_reduce_295,
+  1, 252, :_reduce_296,
+  4, 252, :_reduce_297,
+  1, 253, :_reduce_298,
+  4, 253, :_reduce_299,
+  5, 253, :_reduce_300,
+  3, 254, :_reduce_301,
+  1, 254, :_reduce_302,
+  1, 255, :_reduce_none,
+  5, 242, :_reduce_304,
+  1, 256, :_reduce_305,
+  2, 256, :_reduce_306,
+  1, 257, :_reduce_307,
+  4, 257, :_reduce_308,
+  4, 258, :_reduce_309,
+  5, 243, :_reduce_310,
+  7, 243, :_reduce_311,
+  5, 244, :_reduce_none,
+  1, 259, :_reduce_313,
+  1, 259, :_reduce_314,
+  0, 260, :_reduce_none,
+  2, 260, :_reduce_none,
+  7, 261, :_reduce_317,
+  9, 261, :_reduce_318,
+  1, 262, :_reduce_none,
+  1, 263, :_reduce_320,
+  3, 263, :_reduce_321,
+  1, 263, :_reduce_322,
+  3, 263, :_reduce_323,
+  0, 267, :_reduce_324,
+  8, 213, :_reduce_325,
+  4, 213, :_reduce_326,
+  1, 264, :_reduce_327,
+  1, 265, :_reduce_328,
+  0, 266, :_reduce_none,
+  2, 266, :_reduce_none,
+  2, 266, :_reduce_none,
+  4, 268, :_reduce_332,
+  1, 268, :_reduce_333,
+  3, 270, :_reduce_334,
+  1, 270, :_reduce_335,
+  6, 272, :_reduce_336,
+  1, 222, :_reduce_337,
+  1, 223, :_reduce_none,
+  6, 271, :_reduce_339,
+  7, 271, :_reduce_340,
+  4, 271, :_reduce_341,
+  6, 271, :_reduce_342,
+  1, 273, :_reduce_none,
+  6, 269, :_reduce_344,
+  9, 269, :_reduce_345,
+  9, 269, :_reduce_346,
+  12, 269, :_reduce_347,
+  1, 274, :_reduce_none,
+  6, 214, :_reduce_349,
+  1, 275, :_reduce_350,
+  1, 276, :_reduce_none,
+  2, 276, :_reduce_none,
+  1, 277, :_reduce_353,
+  4, 277, :_reduce_354,
+  1, 278, :_reduce_none,
+  1, 278, :_reduce_none,
+  1, 278, :_reduce_none,
+  1, 278, :_reduce_none,
+  1, 279, :_reduce_359,
+  4, 284, :_reduce_360,
+  1, 284, :_reduce_361,
+  1, 284, :_reduce_362,
+  1, 284, :_reduce_363,
+  1, 284, :_reduce_364,
+  1, 280, :_reduce_365,
+  5, 281, :_reduce_366,
+  1, 285, :_reduce_367,
+  2, 285, :_reduce_368,
+  0, 289, :_reduce_369,
+  8, 282, :_reduce_370,
+  4, 282, :_reduce_371,
+  1, 286, :_reduce_372,
+  1, 287, :_reduce_373,
+  0, 288, :_reduce_none,
+  2, 288, :_reduce_none,
+  2, 288, :_reduce_none,
+  6, 290, :_reduce_377,
+  4, 290, :_reduce_378,
+  6, 283, :_reduce_379,
+  8, 283, :_reduce_380,
+  1, 292, :_reduce_none,
+  1, 293, :_reduce_none,
+  1, 291, :_reduce_none,
+  9, 215, :_reduce_384,
+  6, 215, :_reduce_385,
+  1, 294, :_reduce_none,
+  3, 294, :_reduce_none,
+  6, 297, :_reduce_388,
+  3, 297, :_reduce_389,
+  6, 297, :_reduce_390,
+  3, 297, :_reduce_391,
+  8, 297, :_reduce_392,
+  4, 297, :_reduce_393,
+  1, 297, :_reduce_394,
+  1, 297, :_reduce_395,
+  6, 297, :_reduce_396,
+  4, 297, :_reduce_397,
+  1, 295, :_reduce_398,
+  0, 296, :_reduce_none,
+  2, 296, :_reduce_none,
+  2, 296, :_reduce_none,
+  1, 299, :_reduce_none,
+  4, 299, :_reduce_403,
+  1, 298, :_reduce_404,
+  1, 185, :_reduce_405,
+  1, 187, :_reduce_406,
+  4, 205, :_reduce_none,
+  2, 300, :_reduce_none,
+  2, 300, :_reduce_none,
+  0, 300, :_reduce_none,
+  14, 301, :_reduce_411,
+  2, 303, :_reduce_412,
+  0, 303, :_reduce_413,
+  6, 304, :_reduce_414,
+  13, 302, :_reduce_415,
+  5, 305, :_reduce_416,
+  0, 305, :_reduce_417 ]
+
+racc_reduce_n = 418
+
+racc_shift_n = 870
+
+racc_token_table = {
+  false => 0,
+  :error => 1,
+  :TRUE => 2,
+  :FALSE => 3,
+  :INTEGER_CONSTANT => 4,
+  :FLOATING_CONSTANT => 5,
+  :OCTAL_CONSTANT => 6,
+  :HEX_CONSTANT => 7,
+  :CHARACTER_LITERAL => 8,
+  "(" => 9,
+  ")" => 10,
+  :STRING_LITERAL => 11,
+  "[" => 12,
+  "]" => 13,
+  "." => 14,
+  :IDENTIFIER => 15,
+  "->" => 16,
+  :SIZEOF => 17,
+  "&" => 18,
+  "*" => 19,
+  "+" => 20,
+  "-" => 21,
+  "~" => 22,
+  "!" => 23,
+  "/" => 24,
+  "%" => 25,
+  "<<" => 26,
+  ">>" => 27,
+  "<" => 28,
+  ">" => 29,
+  "<=" => 30,
+  ">=" => 31,
+  "==" => 32,
+  "!=" => 33,
+  "^" => 34,
+  "|" => 35,
+  "&&" => 36,
+  "||" => 37,
+  "?" => 38,
+  ":" => 39,
+  ";" => 40,
+  "," => 41,
+  "=" => 42,
+  :VOID => 43,
+  :FLOAT32_T => 44,
+  :DOUBLE64_T => 45,
+  :TYPE_NAME => 46,
+  :BOOL_T => 47,
+  :FLOAT => 48,
+  :DOUBLE => 49,
+  :DESCRIPTOR => 50,
+  :CHAR_T => 51,
+  :SCHAR_T => 52,
+  :UCHAR_T => 53,
+  :CHAR => 54,
+  :SHORT => 55,
+  :INT => 56,
+  :LONG => 57,
+  :INT8_T => 58,
+  :INT16_T => 59,
+  :INT32_T => 60,
+  :INT64_T => 61,
+  :INT128_T => 62,
+  :UINT8_T => 63,
+  :UINT16_T => 64,
+  :UINT32_T => 65,
+  :UINT64_T => 66,
+  :UINT128_T => 67,
+  :SIGNED => 68,
+  :UNSIGNED => 69,
+  :STRUCT => 70,
+  "{" => 71,
+  "}" => 72,
+  :STRING => 73,
+  :SIZE_IS => 74,
+  :COUNT_IS => 75,
+  :ENUM => 76,
+  :ENUM8 => 77,
+  :ENUM16 => 78,
+  :ENUM32 => 79,
+  :ENUM64 => 80,
+  :ENUM128 => 81,
+  :CONST => 82,
+  :VOLATILE => 83,
+  "..." => 84,
+  :IN => 85,
+  :OUT => 86,
+  :INOUT => 87,
+  :SEND => 88,
+  :RECEIVE => 89,
+  :NULLABLE => 90,
+  :C_EXP => 91,
+  :ALLOCATOR => 92,
+  :CALLBACK => 93,
+  :CONTEXT => 94,
+  :DEVIATE => 95,
+  :ID => 96,
+  :PROTOTYPE => 97,
+  :RESTRICT => 98,
+  :SINGLETON => 99,
+  :IDX_IS_ID => 100,
+  :ACTIVE => 101,
+  :GENERATE => 102,
+  :IMPORT_C => 103,
+  :IMPORT => 104,
+  :AB_STRING_LITERAL => 105,
+  :TYPEDEF => 106,
+  :NAMESPACE => 107,
+  "::" => 108,
+  :SIGNATURE => 109,
+  :ONEWAY => 110,
+  :CELLTYPE => 111,
+  :INLINE => 112,
+  :OPTIONAL => 113,
+  :REF_DESC => 114,
+  :DYNAMIC => 115,
+  :OMIT => 116,
+  :CALL => 117,
+  :ENTRY => 118,
+  :ATTRIBUTE => 119,
+  :CHOICE => 120,
+  :VAR => 121,
+  :REQUIRE => 122,
+  :FACTORY => 123,
+  :CTFACTORY => 124,
+  :CELL => 125,
+  :THROUGH => 126,
+  :COMPOSITE => 127,
+  "=>" => 128,
+  :REGION => 129,
+  :IN_THROUGH => 130,
+  :OUT_THROUGH => 131,
+  :TO_THROUGH => 132,
+  :NODE => 133,
+  :LINKUNIT => 134,
+  :DOMAIN => 135,
+  :CLASS => 136,
+  :__LOCATION_INFORMATION__ => 137,
+  :__CELL__ => 138,
+  :__JOIN__ => 139 }
+
+racc_nt_base = 140
+
+racc_use_result_var = true
+
+Racc_arg = [
+  racc_action_table,
+  racc_action_check,
+  racc_action_default,
+  racc_action_pointer,
+  racc_goto_table,
+  racc_goto_check,
+  racc_goto_default,
+  racc_goto_pointer,
+  racc_nt_base,
+  racc_reduce_table,
+  racc_token_table,
+  racc_shift_n,
+  racc_reduce_n,
+  racc_use_result_var ]
+
+Racc_token_to_s_table = [
+  "$end",
+  "error",
+  "TRUE",
+  "FALSE",
+  "INTEGER_CONSTANT",
+  "FLOATING_CONSTANT",
+  "OCTAL_CONSTANT",
+  "HEX_CONSTANT",
+  "CHARACTER_LITERAL",
+  "\"(\"",
+  "\")\"",
+  "STRING_LITERAL",
+  "\"[\"",
+  "\"]\"",
+  "\".\"",
+  "IDENTIFIER",
+  "\"->\"",
+  "SIZEOF",
+  "\"&\"",
+  "\"*\"",
+  "\"+\"",
+  "\"-\"",
+  "\"~\"",
+  "\"!\"",
+  "\"/\"",
+  "\"%\"",
+  "\"<<\"",
+  "\">>\"",
+  "\"<\"",
+  "\">\"",
+  "\"<=\"",
+  "\">=\"",
+  "\"==\"",
+  "\"!=\"",
+  "\"^\"",
+  "\"|\"",
+  "\"&&\"",
+  "\"||\"",
+  "\"?\"",
+  "\":\"",
+  "\";\"",
+  "\",\"",
+  "\"=\"",
+  "VOID",
+  "FLOAT32_T",
+  "DOUBLE64_T",
+  "TYPE_NAME",
+  "BOOL_T",
+  "FLOAT",
+  "DOUBLE",
+  "DESCRIPTOR",
+  "CHAR_T",
+  "SCHAR_T",
+  "UCHAR_T",
+  "CHAR",
+  "SHORT",
+  "INT",
+  "LONG",
+  "INT8_T",
+  "INT16_T",
+  "INT32_T",
+  "INT64_T",
+  "INT128_T",
+  "UINT8_T",
+  "UINT16_T",
+  "UINT32_T",
+  "UINT64_T",
+  "UINT128_T",
+  "SIGNED",
+  "UNSIGNED",
+  "STRUCT",
+  "\"{\"",
+  "\"}\"",
+  "STRING",
+  "SIZE_IS",
+  "COUNT_IS",
+  "ENUM",
+  "ENUM8",
+  "ENUM16",
+  "ENUM32",
+  "ENUM64",
+  "ENUM128",
+  "CONST",
+  "VOLATILE",
+  "\"...\"",
+  "IN",
+  "OUT",
+  "INOUT",
+  "SEND",
+  "RECEIVE",
+  "NULLABLE",
+  "C_EXP",
+  "ALLOCATOR",
+  "CALLBACK",
+  "CONTEXT",
+  "DEVIATE",
+  "ID",
+  "PROTOTYPE",
+  "RESTRICT",
+  "SINGLETON",
+  "IDX_IS_ID",
+  "ACTIVE",
+  "GENERATE",
+  "IMPORT_C",
+  "IMPORT",
+  "AB_STRING_LITERAL",
+  "TYPEDEF",
+  "NAMESPACE",
+  "\"::\"",
+  "SIGNATURE",
+  "ONEWAY",
+  "CELLTYPE",
+  "INLINE",
+  "OPTIONAL",
+  "REF_DESC",
+  "DYNAMIC",
+  "OMIT",
+  "CALL",
+  "ENTRY",
+  "ATTRIBUTE",
+  "CHOICE",
+  "VAR",
+  "REQUIRE",
+  "FACTORY",
+  "CTFACTORY",
+  "CELL",
+  "THROUGH",
+  "COMPOSITE",
+  "\"=>\"",
+  "REGION",
+  "IN_THROUGH",
+  "OUT_THROUGH",
+  "TO_THROUGH",
+  "NODE",
+  "LINKUNIT",
+  "DOMAIN",
+  "CLASS",
+  "__LOCATION_INFORMATION__",
+  "__CELL__",
+  "__JOIN__",
+  "$start",
+  "all",
+  "component_description",
+  "primary_expression",
+  "namespace_identifier",
+  "string_literal_list",
+  "expression",
+  "postfix_expression",
+  "unary_expression",
+  "unary_operator",
+  "cast_expression",
+  "type_name",
+  "multiplicative_expression",
+  "additive_expression",
+  "shift_expression",
+  "relational_expression",
+  "equality_expression",
+  "and_expression",
+  "exclusive_or_expression",
+  "inclusive_or_expression",
+  "logical_and_expression",
+  "logical_or_expression",
+  "conditional_expression",
+  "constant_expression",
+  "declaration",
+  "type_specifier_qualifier_list",
+  "init_declarator_list",
+  "declaration_specifiers",
+  "type_specifier",
+  "type_qualifier",
+  "init_declarator",
+  "declarator",
+  "initializer",
+  "struct_specifier",
+  "enum_specifier",
+  "sign_int_type",
+  "char_type",
+  "int_type",
+  "sign",
+  "struct_tag",
+  "struct_declaration_list",
+  "@1",
+  "@2",
+  "struct_declaration",
+  "struct_declarator_list",
+  "spec_L",
+  "pointer_specifier_list",
+  "spec_R",
+  "pointer_specifier",
+  "struct_declarator",
+  "enum_type",
+  "enumerator_list",
+  "enumerator",
+  "pointer",
+  "direct_declarator",
+  "parameter_type_list",
+  "parameter_list",
+  "parameter_declaration",
+  "parameter_specifier_list_bracket",
+  "parameter_specifier_list",
+  "parameter_specifier",
+  "abstract_declarator",
+  "direct_abstract_declarator",
+  "initializer_list",
+  "specified_statement",
+  "location_information",
+  "statement",
+  "statement_specifier_list",
+  "typedef",
+  "const_statement",
+  "namespace",
+  "signature",
+  "celltype",
+  "cell",
+  "composite_celltype",
+  "region",
+  "import",
+  "import_C",
+  "signature_plugin",
+  "statement_specifier",
+  "alloc_list",
+  "restrict_list",
+  "plugin_name",
+  "plugin_arg",
+  "alloc",
+  "restrict",
+  "port_name",
+  "region_name_list",
+  "declarator_list",
+  "typedef_specifier",
+  "namespace_name",
+  "statement_list",
+  "signature_name",
+  "function_head_list",
+  "function_head",
+  "celltype_name",
+  "celltype_statement_list",
+  "specified_celltype_statement",
+  "celltype_statement",
+  "celltype_statement_specifier_list",
+  "port",
+  "attribute",
+  "var",
+  "require",
+  "factory",
+  "celltype_statement_specifier",
+  "alloc_list2",
+  "alloc2",
+  "port_type",
+  "namespace_signature_name",
+  "array_size",
+  "attribute_declaration_list",
+  "attribute_declaration",
+  "attribute_specifier",
+  "choice_list",
+  "choice_element",
+  "var_declaration_list",
+  "var_declaration",
+  "var_specifier",
+  "factory_head",
+  "factory_function_list",
+  "factory_function",
+  "factory_function_name",
+  "arg_list",
+  "namespace_celltype_name",
+  "cell_name",
+  "join_list",
+  "@3",
+  "specified_join",
+  "reverse_join",
+  "join_specifier_list",
+  "join",
+  "join_specifier",
+  "cae_name",
+  "array_index",
+  "composite_celltype_name",
+  "composite_celltype_statement_list",
+  "specified_composite_celltype_statement",
+  "composite_celltype_statement",
+  "composite_celltype_statement_specifier_list",
+  "composite_port",
+  "composite_attribute",
+  "internal_cell",
+  "export_join",
+  "composite_celltype_statement_specifier",
+  "composite_attribute_declaration_list",
+  "internal_namespace_celltype_name",
+  "internal_cell_name",
+  "internal_join_list",
+  "@4",
+  "external_join",
+  "internal_cell_elem_name",
+  "export_name",
+  "internal_ref_cell_name",
+  "region_specifier_list",
+  "region_name",
+  "region_statement",
+  "region_specifier",
+  "namespace_region_name",
+  "region_cell",
+  "cell_location_join_location_list",
+  "cell_location",
+  "join_location",
+  "port_location_list",
+  "port_location",
+  "bar_list" ]
+
+Racc_debug_parser = false
+
+##### State transition tables end #####
+
+# reduce 0 omitted
+
+# reduce 1 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 52)
+  def _reduce_2(val, _values, result)
+     result = [ :IDENTIFIER, val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 54)
+  def _reduce_3(val, _values, result)
+     result = [ :BOOL_CONSTANT, true ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 56)
+  def _reduce_4(val, _values, result)
+     result = [ :BOOL_CONSTANT, false ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 58)
+  def _reduce_5(val, _values, result)
+     result = [ :INTEGER_CONSTANT, val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 60)
+  def _reduce_6(val, _values, result)
+     result = [ :FLOATING_CONSTANT, val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 62)
+  def _reduce_7(val, _values, result)
+     result = [ :OCTAL_CONSTANT, val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 64)
+  def _reduce_8(val, _values, result)
+     result = [ :HEX_CONSTANT, val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 66)
+  def _reduce_9(val, _values, result)
+     result = [ :CHARACTER_LITERAL, val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 68)
+  def _reduce_10(val, _values, result)
+     result = [ :STRING_LITERAL_LIST, val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 70)
+  def _reduce_11(val, _values, result)
+     result = [ :PARENTHESES, val[1].get_elements ] 
+    result
+  end
+.,.,
+
+# reduce 12 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 76)
+  def _reduce_13(val, _values, result)
+    			# é£æ¥ããæå­åã1ã¤ã®æå­åã«ã¾ã¨ãã
+			str = "\"" + val[0].val.gsub( /\"(.*)\"/, "\\1" ) + val[1].val.gsub( /\"(.*)\"/, "\\1" ) + "\""
+			result = Token.new( str, val[0].file, val[0].lineno, val[0].col )
+		
+    result
+  end
+.,.,
+
+# reduce 14 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 85)
+  def _reduce_15(val, _values, result)
+     result = [ :OP_SUBSC, val[0], val[2] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 87)
+  def _reduce_16(val, _values, result)
+     result = [ :OP_DOT, val[0], val[2] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 89)
+  def _reduce_17(val, _values, result)
+     result = [ :OP_REF, val[0], val[2] ] 
+    result
+  end
+.,.,
+
+# reduce 18 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 95)
+  def _reduce_19(val, _values, result)
+     result = [ val[0], val[1] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 97)
+  def _reduce_20(val, _values, result)
+     result = [ :OP_SIZEOF_EXPR, val[1] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 99)
+  def _reduce_21(val, _values, result)
+     result = [ :OP_SIZEOF_TYPE, val[1] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 102)
+  def _reduce_22(val, _values, result)
+     result = :OP_U_AMP 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 103)
+  def _reduce_23(val, _values, result)
+     result = :OP_U_ASTER 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 104)
+  def _reduce_24(val, _values, result)
+     result = :OP_U_PLUS 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 105)
+  def _reduce_25(val, _values, result)
+     result = :OP_U_MINUS 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 106)
+  def _reduce_26(val, _values, result)
+     result = :OP_U_TILDE 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 107)
+  def _reduce_27(val, _values, result)
+     result = :OP_U_EXCLAM 
+    result
+  end
+.,.,
+
+# reduce 28 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 112)
+  def _reduce_29(val, _values, result)
+      result = [ :CAST, val[1], val[3] ] 
+    result
+  end
+.,.,
+
+# reduce 30 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 117)
+  def _reduce_31(val, _values, result)
+     result = [ :OP_MULT, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 119)
+  def _reduce_32(val, _values, result)
+     result = [ :OP_DIV, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 121)
+  def _reduce_33(val, _values, result)
+     result = [ :OP_REMAIN, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 34 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 126)
+  def _reduce_35(val, _values, result)
+     result = [ :OP_ADD, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 128)
+  def _reduce_36(val, _values, result)
+     result = [ :OP_SUB, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 37 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 133)
+  def _reduce_38(val, _values, result)
+     result = [ :OP_LSFT, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 135)
+  def _reduce_39(val, _values, result)
+     result = [ :OP_RSFT, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 40 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 140)
+  def _reduce_41(val, _values, result)
+     result = [ :OP_LT, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 142)
+  def _reduce_42(val, _values, result)
+     result = [ :OP_GT, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 144)
+  def _reduce_43(val, _values, result)
+     result = [ :OP_LE, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 146)
+  def _reduce_44(val, _values, result)
+     result = [ :OP_GE, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 45 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 151)
+  def _reduce_46(val, _values, result)
+     result = [ :OP_EQ, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 153)
+  def _reduce_47(val, _values, result)
+     result = [ :OP_NE, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 48 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 158)
+  def _reduce_49(val, _values, result)
+     result = [ :OP_AND, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 50 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 163)
+  def _reduce_51(val, _values, result)
+     result = [ :OP_EOR, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 52 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 168)
+  def _reduce_53(val, _values, result)
+     result = [ :OP_OR, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 54 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 173)
+  def _reduce_55(val, _values, result)
+     result = [ :OP_LAND, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 56 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 178)
+  def _reduce_57(val, _values, result)
+     result = [ :OP_LOR, val[0], val[2] ]  
+    result
+  end
+.,.,
+
+# reduce 58 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 183)
+  def _reduce_59(val, _values, result)
+     result = [ :OP_CEX, val[0], val[2].get_elements, val[4] ]  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 190)
+  def _reduce_60(val, _values, result)
+    			result = Expression.new( val[0] )
+			# result.print
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 197)
+  def _reduce_61(val, _values, result)
+    			result = Expression.new( val[0] )
+			# result.print
+
+			# res = result.eval_const( nil )
+			# if res then
+			#   puts "val: #{res}"
+			# else
+			#   puts "val: nil"
+			# end
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 219)
+  def _reduce_62(val, _values, result)
+    			val[1].each { |i|	# i: Decl
+				i.set_type( val[0] )
+			}
+			result = val[1]
+		
+    result
+  end
+.,.,
+
+# reduce 63 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 235)
+  def _reduce_64(val, _values, result)
+    			val[1].set_qualifier( val[0] )
+			result = val[1]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 241)
+  def _reduce_65(val, _values, result)
+     result = [val[0]] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 243)
+  def _reduce_66(val, _values, result)
+     result << val[2] 
+    result
+  end
+.,.,
+
+# reduce 67 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 248)
+  def _reduce_68(val, _values, result)
+     val[0].set_initializer( val[2] ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 254)
+  def _reduce_69(val, _values, result)
+     result = VoidType.new 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 255)
+  def _reduce_70(val, _values, result)
+     result = FloatType.new(32) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 256)
+  def _reduce_71(val, _values, result)
+     result = FloatType.new(64) 
+    result
+  end
+.,.,
+
+# reduce 72 omitted
+
+# reduce 73 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 259)
+  def _reduce_74(val, _values, result)
+     result = DefinedType.new( val[0].val ) 
+    result
+  end
+.,.,
+
+# reduce 75 omitted
+
+# reduce 76 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 263)
+  def _reduce_77(val, _values, result)
+     result = BoolType.new 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 269)
+  def _reduce_78(val, _values, result)
+    			Generator.warning( "W5002 float: obsolete type. use float32_t"  )
+			result = FloatType.new(32)
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 273)
+  def _reduce_79(val, _values, result)
+    			Generator.warning( "W5003 double: obsolete type. use double64_t"  )
+			result = FloatType.new(64)
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 276)
+  def _reduce_80(val, _values, result)
+              # namespace_identifier: signature name
+			result = DescriptorType.new( val[2] )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 281)
+  def _reduce_81(val, _values, result)
+     result = IntType.new( -1 ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 284)
+  def _reduce_82(val, _values, result)
+    			result = IntType.new( -1 )
+			result.set_sign( :SIGNED, true )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 289)
+  def _reduce_83(val, _values, result)
+    			result = IntType.new( -1 )
+			result.set_sign( :UNSIGNED, true )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 295)
+  def _reduce_84(val, _values, result)
+    			# Generator.warning( "W5004 char: obsolete type. use char_t"  )
+			result = IntType.new( -11 )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 298)
+  def _reduce_85(val, _values, result)
+     result = IntType.new( -2 ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 299)
+  def _reduce_86(val, _values, result)
+     result = IntType.new( -3 ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 300)
+  def _reduce_87(val, _values, result)
+     result = IntType.new( -4 ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 324)
+  def _reduce_88(val, _values, result)
+     result = IntType.new( 8 ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 325)
+  def _reduce_89(val, _values, result)
+     result = IntType.new( 16 ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 326)
+  def _reduce_90(val, _values, result)
+     result = IntType.new( 32 ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 327)
+  def _reduce_91(val, _values, result)
+     result = IntType.new( 64 ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 328)
+  def _reduce_92(val, _values, result)
+     result = IntType.new( 128 ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 331)
+  def _reduce_93(val, _values, result)
+    			result = IntType.new( 8 )
+			result.set_sign( :UNSIGNED, true )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 336)
+  def _reduce_94(val, _values, result)
+    			result = IntType.new( 16 )
+			result.set_sign( :UNSIGNED, true )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 341)
+  def _reduce_95(val, _values, result)
+    			result = IntType.new( 32 )
+			result.set_sign( :UNSIGNED, true )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 346)
+  def _reduce_96(val, _values, result)
+    			result = IntType.new( 64 )
+			result.set_sign( :UNSIGNED, true )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 351)
+  def _reduce_97(val, _values, result)
+    			result = IntType.new( 128 )
+			result.set_sign( :UNSIGNED, true )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 356)
+  def _reduce_98(val, _values, result)
+     result = :SIGNED 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 357)
+  def _reduce_99(val, _values, result)
+     result = :UNSIGNED 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 363)
+  def _reduce_100(val, _values, result)
+    			val[1].set_sign( val[0] )
+			result = val[1]
+		
+    result
+  end
+.,.,
+
+# reduce 101 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 371)
+  def _reduce_102(val, _values, result)
+     StructType.set_define( true )  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 374)
+  def _reduce_103(val, _values, result)
+    			StructType.end_of_parse
+			result = val[1]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 379)
+  def _reduce_104(val, _values, result)
+    			result = StructType.new()
+			StructType.set_define( true )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 384)
+  def _reduce_105(val, _values, result)
+    			StructType.end_of_parse
+			result = val[1]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 389)
+  def _reduce_106(val, _values, result)
+    			StructType.set_define( false )
+			StructType.end_of_parse
+			result = val[1]
+		
+    result
+  end
+.,.,
+
+# reduce 107 omitted
+
+# reduce 108 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 400)
+  def _reduce_109(val, _values, result)
+     result = StructType.new( val[0].val ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 406)
+  def _reduce_110(val, _values, result)
+    			val[1].each { |i|	# i: Decl
+				i.set_type( val[0] )
+				i.set_kind( :MEMBER )
+				i.check
+				StructType.new_member( i )
+			}
+			result = val[1]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 416)
+  def _reduce_111(val, _values, result)
+    			val[4].each { |i|	# i: Decl
+				i.set_type( val[3] )
+				i.set_kind( :MEMBER )
+  				i.set_specifier_list val[1]
+				i.check
+				StructType.new_member( i )
+			}
+			result = val[4]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 427)
+  def _reduce_112(val, _values, result)
+     result = [ val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 428)
+  def _reduce_113(val, _values, result)
+     result <<  val[2] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 431)
+  def _reduce_114(val, _values, result)
+     result = [:STRING,-1] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 432)
+  def _reduce_115(val, _values, result)
+     result = [:STRING,val[2]] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 433)
+  def _reduce_116(val, _values, result)
+     result = [:SIZE_IS,val[2]] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 434)
+  def _reduce_117(val, _values, result)
+     result = [:COUNT_IS,val[2]] 
+    result
+  end
+.,.,
+
+# reduce 118 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 445)
+  def _reduce_119(val, _values, result)
+    			val[1].set_qualifier( val[0] )
+			result = val[1]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 454)
+  def _reduce_120(val, _values, result)
+     result = [ val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 456)
+  def _reduce_121(val, _values, result)
+     result << val[2] 
+    result
+  end
+.,.,
+
+# reduce 122 omitted
+
+# reduce 123 omitted
+
+# reduce 124 omitted
+
+# reduce 125 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 469)
+  def _reduce_126(val, _values, result)
+     result = EnumType.new( -1 ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 470)
+  def _reduce_127(val, _values, result)
+     result = EnumType.new( 8 ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 471)
+  def _reduce_128(val, _values, result)
+     result = EnumType.new( 16 ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 472)
+  def _reduce_129(val, _values, result)
+     result = EnumType.new( 32 ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 473)
+  def _reduce_130(val, _values, result)
+     result = EnumType.new( 64 ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 474)
+  def _reduce_131(val, _values, result)
+     result = EnumType.new( 128 ) 
+    result
+  end
+.,.,
+
+# reduce 132 omitted
+
+# reduce 133 omitted
+
+# reduce 134 omitted
+
+# reduce 135 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 485)
+  def _reduce_136(val, _values, result)
+     result = :CONST 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 486)
+  def _reduce_137(val, _values, result)
+     result = :VOLATILE 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 491)
+  def _reduce_138(val, _values, result)
+    			val[1].set_type( val[0] )
+			result = val[1]
+		
+    result
+  end
+.,.,
+
+# reduce 139 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 498)
+  def _reduce_140(val, _values, result)
+     result = Decl.new( val[0].val ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 500)
+  def _reduce_141(val, _values, result)
+     result = val[1] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 503)
+  def _reduce_142(val, _values, result)
+    			val[0].set_type( ArrayType.new( val[2] ) )
+			result = val[0]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 508)
+  def _reduce_143(val, _values, result)
+    			val[0].set_type( ArrayType.new )
+			result = val[0]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 513)
+  def _reduce_144(val, _values, result)
+    			val[0].set_type( FuncType.new( val[2] ) )
+			result = val[0]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 519)
+  def _reduce_145(val, _values, result)
+    			Generator.warning( "W5010 need 'void' for no parameter"  )
+			val[0].set_type( FuncType.new )
+			result = val[0]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 526)
+  def _reduce_146(val, _values, result)
+     result = PtrType.new 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 529)
+  def _reduce_147(val, _values, result)
+    			result = PtrType.new
+			result.set_qualifier( val[1] )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 534)
+  def _reduce_148(val, _values, result)
+    			val[1].set_type(PtrType.new)
+			result = val[1]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 539)
+  def _reduce_149(val, _values, result)
+    			ptrtype = PtrType.new
+			ptrtype.set_qualifier( val[1] )
+			val[2].set_type( ptrtype )
+			result = val[2]
+		
+    result
+  end
+.,.,
+
+# reduce 150 omitted
+
+# reduce 151 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 553)
+  def _reduce_152(val, _values, result)
+     result = ParamList.new( val[0] ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 556)
+  def _reduce_153(val, _values, result)
+    			val[0].add_param( val[2] )
+			# result = val[0] ä¸è¦
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 566)
+  def _reduce_154(val, _values, result)
+    			val[2].set_kind( :PARAMETER )
+			paramdecl = ParamDecl.new( val[2], val[1], val[0] )
+			val[2].check
+			result = paramdecl
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 575)
+  def _reduce_155(val, _values, result)
+    			Generator.error( "G1001 need specifier for \'$1\'" , val[1].get_name )
+			result = nil
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 580)
+  def _reduce_156(val, _values, result)
+    			unless val[0].instance_of?( VoidType ) then
+				Generator.error( "G1002 need parameter name"  )
+			end
+			result = nil
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 588)
+  def _reduce_157(val, _values, result)
+    			unless val[1].instance_of?( VoidType ) then
+				Generator.error( "G1003 need parameter name"  )
+			end
+			result = nil
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 595)
+  def _reduce_158(val, _values, result)
+     result = val[1] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 599)
+  def _reduce_159(val, _values, result)
+     result = val[0] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 601)
+  def _reduce_160(val, _values, result)
+     result = result + val[2] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 604)
+  def _reduce_161(val, _values, result)
+     result = [ [:IN]  ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 605)
+  def _reduce_162(val, _values, result)
+     result = [ [:OUT] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 606)
+  def _reduce_163(val, _values, result)
+     result = [ [:INOUT] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 607)
+  def _reduce_164(val, _values, result)
+     result = [ [:SEND,   val[2]] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 608)
+  def _reduce_165(val, _values, result)
+     result = [ [:RECEIVE,val[2]] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 609)
+  def _reduce_166(val, _values, result)
+     result = [ [:STRING,nil] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 610)
+  def _reduce_167(val, _values, result)
+     result = [ [:STRING,  val[2]] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 611)
+  def _reduce_168(val, _values, result)
+     result = [ [:SIZE_IS, val[2]] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 614)
+  def _reduce_169(val, _values, result)
+    			result = [ [:SIZE_IS,val[2]], [:MAX_IS, val[4]] ]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 616)
+  def _reduce_170(val, _values, result)
+     result = [ [:COUNT_IS,val[2]] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 617)
+  def _reduce_171(val, _values, result)
+     result = [ [:NULLABLE] ] 
+    result
+  end
+.,.,
+
+# reduce 172 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 623)
+  def _reduce_173(val, _values, result)
+    			if val[1] then
+				val[1].set_type( val[0] )
+				result = val[1]
+			else
+				# ã¨ã©ã¼ï¼ä»®ã§ val[0] ãè¿ã
+				result = val[0]
+			end
+		
+    result
+  end
+.,.,
+
+# reduce 174 omitted
+
+# reduce 175 omitted
+
+# reduce 176 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 640)
+  def _reduce_177(val, _values, result)
+     result = val[1] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 643)
+  def _reduce_178(val, _values, result)
+    			Generator.error( "G1004 impossible array type"  )
+			result = nil
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 648)
+  def _reduce_179(val, _values, result)
+    			Generator.error( "G1005 impossible array type"  )
+			result = nil
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 653)
+  def _reduce_180(val, _values, result)
+    			Generator.error( "G1006 impossible array type"  )
+			result = nil
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 658)
+  def _reduce_181(val, _values, result)
+    			Generator.error( "G1007 impossible array type"  )
+			result = nil
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 663)
+  def _reduce_182(val, _values, result)
+    			Generator.error( "G1008 impossible function type"  )
+			result = nil
+		
+    result
+  end
+.,.,
+
+# reduce 183 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 669)
+  def _reduce_184(val, _values, result)
+    			Generator.warning( "W5011 need 'void' for no parameter"  )
+			val[0].set_type( FuncType.new )
+			result = val[0]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 675)
+  def _reduce_185(val, _values, result)
+    			val[0].set_type( FuncType.new( val[2] ) )
+			result = val[0]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 682)
+  def _reduce_186(val, _values, result)
+     result = val[0] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 684)
+  def _reduce_187(val, _values, result)
+     result = val[1] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 686)
+  def _reduce_188(val, _values, result)
+     result = val[1] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 689)
+  def _reduce_189(val, _values, result)
+     result = C_EXP.new( val[2] ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 694)
+  def _reduce_190(val, _values, result)
+    			result = [ val[0] ]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 698)
+  def _reduce_191(val, _values, result)
+    			val[0] << val[2]
+			result = val[0]
+		
+    result
+  end
+.,.,
+
+# reduce 192 omitted
+
+# reduce 193 omitted
+
+# reduce 194 omitted
+
+# reduce 195 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 716)
+  def _reduce_196(val, _values, result)
+    			obj = val[3]
+			if obj.kind_of?( Cell ) || obj.kind_of?( Signature ) || obj.kind_of?( Celltype ) || obj.kind_of?( CompositeCelltype )then
+                                # cell, signature ä»¥å¤ã¯ãæå®å­ãç½®ããªã
+			else
+              Generator.get_statement_specifier   # ã¯ãªã¢
+              Generator.error( "G1009 unexpected specifier"  )
+			end
+		
+    result
+  end
+.,.,
+
+# reduce 197 omitted
+
+# reduce 198 omitted
+
+# reduce 199 omitted
+
+# reduce 200 omitted
+
+# reduce 201 omitted
+
+# reduce 202 omitted
+
+# reduce 203 omitted
+
+# reduce 204 omitted
+
+# reduce 205 omitted
+
+# reduce 206 omitted
+
+# reduce 207 omitted
+
+# reduce 208 omitted
+
+# reduce 209 omitted
+
+# reduce 210 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 745)
+  def _reduce_211(val, _values, result)
+     Generator.add_statement_specifier val[0]	
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 747)
+  def _reduce_212(val, _values, result)
+     Generator.add_statement_specifier val[2] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 751)
+  def _reduce_213(val, _values, result)
+     result = [ :ALLOCATOR, val[2] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 753)
+  def _reduce_214(val, _values, result)
+     result = [ :CALLBACK ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 755)
+  def _reduce_215(val, _values, result)
+     result = [ :CONTEXT, val[2].val ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 757)
+  def _reduce_216(val, _values, result)
+     result = [ :DEVIATE ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 759)
+  def _reduce_217(val, _values, result)
+     result = [ :ID, val[2] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 761)
+  def _reduce_218(val, _values, result)
+     result = [ :PROTOTYPE ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 763)
+  def _reduce_219(val, _values, result)
+     result = [ :RESTRICT, val[2] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 764)
+  def _reduce_220(val, _values, result)
+     result = [:SINGLETON] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 765)
+  def _reduce_221(val, _values, result)
+     result = [:IDX_IS_ID] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 766)
+  def _reduce_222(val, _values, result)
+     result = [:ACTIVE] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 768)
+  def _reduce_223(val, _values, result)
+     result = [:GENERATE, val[2].val, val[4].val] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 771)
+  def _reduce_224(val, _values, result)
+     result = [ val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 772)
+  def _reduce_225(val, _values, result)
+     result << val[2] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 776)
+  def _reduce_226(val, _values, result)
+      result = [ :NORMAL_ALLOC, val[0], nil, val[2], val[4], val[6] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 778)
+  def _reduce_227(val, _values, result)
+      result = [ :NORMAL_ALLOC, val[0], val[2], val[5], val[7], val[9] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 787)
+  def _reduce_228(val, _values, result)
+    	result = [val[0]]		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 789)
+  def _reduce_229(val, _values, result)
+    	result << val[2]		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 793)
+  def _reduce_230(val, _values, result)
+    	result = [ val[0].val, nil, val[3] ]		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 795)
+  def _reduce_231(val, _values, result)
+    	result = [ val[0].val, val[2].val, val[5] ]		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 799)
+  def _reduce_232(val, _values, result)
+    	result = [val[0].val]		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 801)
+  def _reduce_233(val, _values, result)
+    	result << val[2].val		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 806)
+  def _reduce_234(val, _values, result)
+    			val[0].each { |decl|
+				decl.set_kind( :CONSTANT )
+				Namespace.new_const_decl( decl )
+				decl.check
+			}
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 816)
+  def _reduce_235(val, _values, result)
+    			@@import_C = true
+			Import_C.new( val[2] )
+			@@import_C = false
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 822)
+  def _reduce_236(val, _values, result)
+    			@@import_C = true
+			Import_C.new( val[2], val[4] )
+			@@import_C = false
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 829)
+  def _reduce_237(val, _values, result)
+     Import.new( val[2] ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 831)
+  def _reduce_238(val, _values, result)
+     Import.new( val[2], true ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 836)
+  def _reduce_239(val, _values, result)
+     Generate.new( val[2].val, val[4], val[6] ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 841)
+  def _reduce_240(val, _values, result)
+    			val[2].each{ |i|       # i:Decl
+				i.set_kind( :TYPEDEF )
+    		}
+			Typedef.new_decl_list( val[1], val[2] )
+			val[2].each{ |i|       # i:Decl
+				i.check
+			}
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 851)
+  def _reduce_241(val, _values, result)
+    			val[5].each{ |i|       # i:Decl
+				i.set_kind( :TYPEDEF )
+			}
+			Typedef.new_decl_list( val[4], val[5] )
+			val[5].each{ |i|       # i:Decl
+				i.check
+			}
+		
+    result
+  end
+.,.,
+
+# reduce 242 omitted
+
+# reduce 243 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 868)
+  def _reduce_244(val, _values, result)
+     result = [ val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 870)
+  def _reduce_245(val, _values, result)
+     result << val[2] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 874)
+  def _reduce_246(val, _values, result)
+    val[1].end_of_parse
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 878)
+  def _reduce_247(val, _values, result)
+    result = Namespace.new(val[0].val)
+    result
+  end
+.,.,
+
+# reduce 248 omitted
+
+# reduce 249 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 886)
+  def _reduce_250(val, _values, result)
+     result = NamespacePath.new( val[0].val, false ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 887)
+  def _reduce_251(val, _values, result)
+     result = NamespacePath.new( val[1].val, true ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 889)
+  def _reduce_252(val, _values, result)
+     result = val[0].append!( val[2].val ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 894)
+  def _reduce_253(val, _values, result)
+     result = val[1].end_of_parse( val[3] ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 898)
+  def _reduce_254(val, _values, result)
+    result = Signature.new( val[0].val ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 904)
+  def _reduce_255(val, _values, result)
+     result = NamedList.new( nil, "function" ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 906)
+  def _reduce_256(val, _values, result)
+     result = val[0].add_item( val[1] ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 911)
+  def _reduce_257(val, _values, result)
+    			# val[1]: Decl
+			if val[1].is_function? then
+				result = FuncHead.new( val[1], val[0], false )
+				val[1].set_kind :FUNCHEAD
+				val[1].check
+			else
+				# mikan é¢æ°ã®é
+åãä»¥ä¸ã®ã¡ãã»ã¼ã¸ã«ãªã
+				Generator.error( "G1010 Not function"  )
+				result = nil
+			end
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 924)
+  def _reduce_258(val, _values, result)
+    			if val[4].is_function? then
+				result = FuncHead.new( val[4], val[3], true )
+			else
+				Generator.error( "G1011 Not function"  )
+				result = nil
+			end
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 937)
+  def _reduce_259(val, _values, result)
+    			val[1].end_of_parse
+			result = val[1]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 943)
+  def _reduce_260(val, _values, result)
+     result = Celltype.new(val[0].val) 
+    result
+  end
+.,.,
+
+# reduce 261 omitted
+
+# reduce 262 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 952)
+  def _reduce_263(val, _values, result)
+    			if val[0].kind_of? Port then
+				Celltype.new_port( val[0] )
+			end
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 958)
+  def _reduce_264(val, _values, result)
+    			if val[3].kind_of? Port then
+				val[3].set_specifier val[1]  # è¨­å®é åºãã
+				Celltype.new_port( val[3] )
+			else
+				# Port ä»¥å¤ã§ã¯æå®å­ã¯ã¨ã©ã¼
+				Generator.error( "G1012 $1 : cannot put specifier here" , val[1] )
+			end
+		
+    result
+  end
+.,.,
+
+# reduce 265 omitted
+
+# reduce 266 omitted
+
+# reduce 267 omitted
+
+# reduce 268 omitted
+
+# reduce 269 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 977)
+  def _reduce_270(val, _values, result)
+     result = [ val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 979)
+  def _reduce_271(val, _values, result)
+     result << val[2] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 982)
+  def _reduce_272(val, _values, result)
+     result = [ :INLINE ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 983)
+  def _reduce_273(val, _values, result)
+     result = [ :ALLOCATOR, val[2] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 984)
+  def _reduce_274(val, _values, result)
+     result = [ :OPTIONAL ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 985)
+  def _reduce_275(val, _values, result)
+     result = [ :REF_DESC ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 986)
+  def _reduce_276(val, _values, result)
+     result = [ :DYNAMIC ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 987)
+  def _reduce_277(val, _values, result)
+     result = [ :OMIT ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 990)
+  def _reduce_278(val, _values, result)
+     result = [ val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 991)
+  def _reduce_279(val, _values, result)
+     result = [ val[0] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 992)
+  def _reduce_280(val, _values, result)
+     result << val[2] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 993)
+  def _reduce_281(val, _values, result)
+     result << val[2] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 997)
+  def _reduce_282(val, _values, result)
+      result = [ :INTERNAL_ALLOC, val[0].val, val[2].val, val[4] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 999)
+  def _reduce_283(val, _values, result)
+      result = [ :RELAY_ALLOC, val[0].val, val[2].val, val[4] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1005)
+  def _reduce_284(val, _values, result)
+     result = Port.new( val[2].val, val[1], val[0] ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1007)
+  def _reduce_285(val, _values, result)
+     result = Port.new( val[2].val, val[1], val[0], "[]" ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1009)
+  def _reduce_286(val, _values, result)
+     result = Port.new(val[2].val, val[1], val[0], val[4]) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1011)
+  def _reduce_287(val, _values, result)
+     result = Port.new( val[2].val, val[1], val[0], nil, val[4], val[ 6 ].val ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1014)
+  def _reduce_288(val, _values, result)
+     result = :CALL 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1015)
+  def _reduce_289(val, _values, result)
+     result = :ENTRY 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1019)
+  def _reduce_290(val, _values, result)
+     result = val[0] 
+    result
+  end
+.,.,
+
+# reduce 291 omitted
+
+# reduce 292 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1031)
+  def _reduce_293(val, _values, result)
+     result = nil 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1035)
+  def _reduce_294(val, _values, result)
+     Celltype.new_attribute( val[0] ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1037)
+  def _reduce_295(val, _values, result)
+     Celltype.new_attribute( val[1] ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1043)
+  def _reduce_296(val, _values, result)
+    			val[0].each{ |i|       # i:Decl
+				i.set_kind( :ATTRIBUTE )
+				i.check
+			}
+			result = val[0]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1051)
+  def _reduce_297(val, _values, result)
+    			val[3].each{ |i|       # i:Decl
+				i.set_kind( :ATTRIBUTE )   # è¨­å®é åºãã
+				i.set_specifier_list( [val[1]] )
+				i.check
+			}
+			result = val[3]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1060)
+  def _reduce_298(val, _values, result)
+     result = [:OMIT] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1061)
+  def _reduce_299(val, _values, result)
+     result = [:SIZE_IS,val[2]] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1062)
+  def _reduce_300(val, _values, result)
+      result = [:CHOICE,val[3]] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1065)
+  def _reduce_301(val, _values, result)
+      result << val[2] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1066)
+  def _reduce_302(val, _values, result)
+      result = [ val[0] ] 
+    result
+  end
+.,.,
+
+# reduce 303 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1074)
+  def _reduce_304(val, _values, result)
+     result = nil 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1078)
+  def _reduce_305(val, _values, result)
+     Celltype.new_var( val[0] ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1080)
+  def _reduce_306(val, _values, result)
+     Celltype.new_var( val[1] ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1085)
+  def _reduce_307(val, _values, result)
+    			val[0].each{ |i|       # i:Decl
+				i.set_kind( :VAR )
+				i.check
+			}
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1092)
+  def _reduce_308(val, _values, result)
+    			val[3].each{ |i|       # i:Decl
+				i.set_kind( :VAR )   # è¨­å®é åºãã
+				i.set_specifier_list( [val[1]] )
+				i.check
+			}
+			result = val[3]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1101)
+  def _reduce_309(val, _values, result)
+     result = [:SIZE_IS,val[2]] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1107)
+  def _reduce_310(val, _values, result)
+    			Celltype.new_require( val[1], val[3] )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1111)
+  def _reduce_311(val, _values, result)
+    			Celltype.new_require( val[3], val[5], val[1].val )
+		
+    result
+  end
+.,.,
+
+# reduce 312 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1119)
+  def _reduce_313(val, _values, result)
+     Factory.set_f_celltype( false ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1120)
+  def _reduce_314(val, _values, result)
+     Factory.set_f_celltype( true ) 
+    result
+  end
+.,.,
+
+# reduce 315 omitted
+
+# reduce 316 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1128)
+  def _reduce_317(val, _values, result)
+     Factory.new( val[0].val, val[2], val[4], nil    ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1130)
+  def _reduce_318(val, _values, result)
+     Factory.new( val[0].val, val[2], val[4], val[6] ) 
+    result
+  end
+.,.,
+
+# reduce 319 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1137)
+  def _reduce_320(val, _values, result)
+     result = [ [ :IDENTIFIER, val[0].val ] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1139)
+  def _reduce_321(val, _values, result)
+     result << [ :IDENTIFIER, val[2].val ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1141)
+  def _reduce_322(val, _values, result)
+     result = [ [ :STRING_LITERAL, val[0].val ] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1143)
+  def _reduce_323(val, _values, result)
+     result << [ :STRING_LITERAL, val[2].val ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1148)
+  def _reduce_324(val, _values, result)
+     Cell.new_def 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1150)
+  def _reduce_325(val, _values, result)
+     result = Cell.end_of_parse true 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1152)
+  def _reduce_326(val, _values, result)
+     result = Cell.end_of_parse false 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1156)
+  def _reduce_327(val, _values, result)
+     result = Cell.new(val[0]) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1160)
+  def _reduce_328(val, _values, result)
+     result = Cell.set_name(val[0].val) 
+    result
+  end
+.,.,
+
+# reduce 329 omitted
+
+# reduce 330 omitted
+
+# reduce 331 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1169)
+  def _reduce_332(val, _values, result)
+     val[3].set_specifier_list( val[1] )  
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1171)
+  def _reduce_333(val, _values, result)
+     val[0].set_specifier_list( [] ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1175)
+  def _reduce_334(val, _values, result)
+     result << val[2] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1177)
+  def _reduce_335(val, _values, result)
+     result = [val[0]] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1181)
+  def _reduce_336(val, _values, result)
+     result = [ :THROUGH, val[2], val[4] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1184)
+  def _reduce_337(val, _values, result)
+     result = val[0] 
+    result
+  end
+.,.,
+
+# reduce 338 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1198)
+  def _reduce_339(val, _values, result)
+    			result = Join.new( val[0].val,  -1, val[4] )
+			Cell.new_join( result, true )
+		 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1203)
+  def _reduce_340(val, _values, result)
+    			result = Join.new( val[0].val, val[2], val[5] )
+			Cell.new_join( result, true )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1208)
+  def _reduce_341(val, _values, result)
+    			result = Join.new( val[0].val, nil, val[2] )
+			Cell.new_join( result, true )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1213)
+  def _reduce_342(val, _values, result)
+    			result = Join.new( val[0].val, nil, [ :COMPOSITE, val[4] ] )
+			Cell.new_join( result, true )
+		
+    result
+  end
+.,.,
+
+# reduce 343 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1224)
+  def _reduce_344(val, _values, result)
+    			rj = ReverseJoin.new( val[0].val, nil, val[2], val[4].val )
+			Cell.new_reverse_join( rj )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1230)
+  def _reduce_345(val, _values, result)
+    			rj = ReverseJoin.new( val[0].val, nil, val[2], val[4].val, val[6] )
+			Cell.new_reverse_join( rj )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1236)
+  def _reduce_346(val, _values, result)
+    			rj = ReverseJoin.new( val[0].val, val[2], val[5], val[7].val )
+			Cell.new_reverse_join( rj )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1242)
+  def _reduce_347(val, _values, result)
+    			rj = ReverseJoin.new( val[0].val, val[2], val[5], val[7].val, val[9] )
+			Cell.new_reverse_join( rj )
+		
+    result
+  end
+.,.,
+
+# reduce 348 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1254)
+  def _reduce_349(val, _values, result)
+    			CompositeCelltype.end_of_parse
+			result = val[1]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1260)
+  def _reduce_350(val, _values, result)
+     result = CompositeCelltype.new(val[0].val) 
+    result
+  end
+.,.,
+
+# reduce 351 omitted
+
+# reduce 352 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1269)
+  def _reduce_353(val, _values, result)
+    			if val[0].kind_of?( Port ) then
+				CompositeCelltype.new_port( val[0] )   # é
+å»¶ãã¦ç»é²
+			end
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1275)
+  def _reduce_354(val, _values, result)
+    			if val[3].kind_of?( Port ) then
+				# port ä»¥å¤ val[3] ã«æå¹ãªå¤ãå
+¥ã£ã¦ããªãã®ã§ãä»¥ä¸ã®ã¡ã½ãããé©ç¨ã§ããªã
+				# ç¾ç¶ port, cell ä»¥å¤ã¯æå®å­ãåãä»ããªã
+				# ï¼ãããå°æ¥ä»ã®æãæå®å­ãåãä»ããå¯è½æ§ãããã®ã§ããã®ä½ç½®ã«è¨è¿°ããï¼
+				val[3].set_specifier( Generator.get_statement_specifier )
+				CompositeCelltype.new_port( val[3] )   # é
+å»¶ãã¦ç»é² (set_specifier å¾)
+			elsif val[3].kind_of?( Cell ) then
+				# Cell.end_of_parse ã«ã¦è¨­å®
+			else
+              Generator.get_statement_specifier   # ã¯ãªã¢
+              Generator.error( "G1013 unexpected specifier"  )
+			end
+		
+    result
+  end
+.,.,
+
+# reduce 355 omitted
+
+# reduce 356 omitted
+
+# reduce 357 omitted
+
+# reduce 358 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1299)
+  def _reduce_359(val, _values, result)
+    			Generator.add_statement_specifier val[0]
+			result = [ val[0] ]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1304)
+  def _reduce_360(val, _values, result)
+     result = [ :ALLOCATOR, val[2] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1305)
+  def _reduce_361(val, _values, result)
+     result = [ :OMIT ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1306)
+  def _reduce_362(val, _values, result)
+     result = [ :OPTIONAL ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1307)
+  def _reduce_363(val, _values, result)
+     result = [ :REF_DESC ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1308)
+  def _reduce_364(val, _values, result)
+     result = [ :DYNAMIC ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1313)
+  def _reduce_365(val, _values, result)
+    			# CompositeCelltype.new_port( val[0] )
+			result = val[0]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1320)
+  def _reduce_366(val, _values, result)
+     result = nil 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1324)
+  def _reduce_367(val, _values, result)
+     CompositeCelltype.new_attribute( val[0] ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1326)
+  def _reduce_368(val, _values, result)
+     CompositeCelltype.new_attribute( val[1] ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1331)
+  def _reduce_369(val, _values, result)
+     Cell.new_def 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1333)
+  def _reduce_370(val, _values, result)
+     result = Cell.end_of_parse true 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1335)
+  def _reduce_371(val, _values, result)
+     result = Cell.end_of_parse false 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1340)
+  def _reduce_372(val, _values, result)
+     Cell.new(val[0],true) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1344)
+  def _reduce_373(val, _values, result)
+     Cell.set_name(val[0].val) 
+    result
+  end
+.,.,
+
+# reduce 374 omitted
+
+# reduce 375 omitted
+
+# reduce 376 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1354)
+  def _reduce_377(val, _values, result)
+    	Cell.external_join( val[0].val, val[4].val, true )	
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1356)
+  def _reduce_378(val, _values, result)
+    	Cell.external_join( val[0].val, val[2].val, false )	
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1363)
+  def _reduce_379(val, _values, result)
+    			CompositeCelltype.new_join( val[0].val,
+						val[2].val, val[4].val, :ENTRY )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1368)
+  def _reduce_380(val, _values, result)
+    			CompositeCelltype.new_join( val[2].val,
+						val[4].val, val[6].val, :ENTRY )
+		
+    result
+  end
+.,.,
+
+# reduce 381 omitted
+
+# reduce 382 omitted
+
+# reduce 383 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1384)
+  def _reduce_384(val, _values, result)
+     Region.end_of_parse 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1386)
+  def _reduce_385(val, _values, result)
+     Region.end_of_parse 
+    result
+  end
+.,.,
+
+# reduce 386 omitted
+
+# reduce 387 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1395)
+  def _reduce_388(val, _values, result)
+     Region.new_in_through( val[2].val, val[4].val ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1397)
+  def _reduce_389(val, _values, result)
+     Region.new_in_through 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1399)
+  def _reduce_390(val, _values, result)
+     Region.new_out_through( val[2].val, val[4].val ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1401)
+  def _reduce_391(val, _values, result)
+     Region.new_out_through() 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1403)
+  def _reduce_392(val, _values, result)
+     Region.new_to_through( val[2], val[4].val, val[6].val ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1405)
+  def _reduce_393(val, _values, result)
+     Region.new_to_through( val[2], nil, nil ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1407)
+  def _reduce_394(val, _values, result)
+     Region.set_type( :NODE ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1409)
+  def _reduce_395(val, _values, result)
+     Region.set_type( :LINKUNIT ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1411)
+  def _reduce_396(val, _values, result)
+     Region.set_domain( val[2].val, val[4] ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1413)
+  def _reduce_397(val, _values, result)
+     Region.set_type( :CLASS, val[2].val ) 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1417)
+  def _reduce_398(val, _values, result)
+     result = Region.new( val[0].val ) 
+    result
+  end
+.,.,
+
+# reduce 399 omitted
+
+# reduce 400 omitted
+
+# reduce 401 omitted
+
+# reduce 402 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1428)
+  def _reduce_403(val, _values, result)
+    			obj = val[3]
+			if obj.kind_of?( Cell ) then
+			else
+              Generator.get_statement_specifier   # ã¯ãªã¢
+              Generator.error( "G9999 unexpected specifier"  )
+			end
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1450)
+  def _reduce_404(val, _values, result)
+     result = [ val[0].val ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1455)
+  def _reduce_405(val, _values, result)
+     set_in_specifier 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1457)
+  def _reduce_406(val, _values, result)
+     unset_in_specifier 
+    result
+  end
+.,.,
+
+# reduce 407 omitted
+
+# reduce 408 omitted
+
+# reduce 409 omitted
+
+# reduce 410 omitted
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1471)
+  def _reduce_411(val, _values, result)
+    			TECSGEN::Cell_location.new( val[1], val[3], val[5], val[7], val[9], val[12] )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1477)
+  def _reduce_412(val, _values, result)
+    			result = val[0] << val[1]
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1480)
+  def _reduce_413(val, _values, result)
+     result = [] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1484)
+  def _reduce_414(val, _values, result)
+     result = [ val[0], val[2], val[3] ] 
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1489)
+  def _reduce_415(val, _values, result)
+                TECSGEN::Join_location.new( val[2], val[4], val[6], val[8], val[11] )
+		
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1495)
+  def _reduce_416(val, _values, result)
+                result = val[0] << [ val[1], val[3] ]
+          
+    result
+  end
+.,.,
+
+module_eval(<<'.,.,', 'bnf.y.rb', 1497)
+  def _reduce_417(val, _values, result)
+     result = [] 
+    result
+  end
+.,.,
+
+def _reduce_none(val, _values, result)
+  val[0]
+end
+
+end   # class Generator
+
+
+
+# ãã¡ã¤ã« => INCLUDE("header")ã®é
+å
+Include = Hash.new {|hash, key| hash[key] = []}
+
+
+class Token
+
+  attr_accessor :val, :file, :lineno, :col
+
+  def initialize(val, file, lineno, col)
+    @val = val
+    @file = file
+    @lineno = lineno
+    @col = col
+
+  end
+
+  def to_s
+    @val.to_s
+  end
+
+  def to_sym
+    @val.to_sym
+  end
+
+  def get_name
+    @val
+  end
+
+  def locale
+    [@file, @lineno, @col]
+  end
+
+  def eql?(other)
+    if other.is_a? Symbol
+      @val == other
+    elsif other.is_a? Token
+      @val == other.val
+    elsif other.is_a? String
+      @val.to_s == other
+    else
+      raise ArgumentError
+    end
+  end
+
+  alias == eql?
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    print "#{@val}\n"
+  end
+
+end
+
+#= TECSIO
+#  Ruby2.0(1.9) å¯¾å¿ã«ä¼´ãå°å
+¥ããã¯ã©ã¹
+#  SJIS ä»¥å¤ã§ã¯ãASCII-8BIT ã¨ãã¦å
+¥åãã
+class TECSIO
+  def self.foreach(file) # ãã­ãã¯å¼æ° { |line| }
+    pr = Proc.new   # ãã®ã¡ã½ããã®ãã­ãã¯å¼æ°ã pr ã«ä»£å
+¥
+    if $b_no_kcode then
+	  msg = "E".encode $Ruby19_File_Encode
+      if( $Ruby19_File_Encode == "Shift_JIS" )
+
+        # Shift JIS ã¯ããã£ãã Windows-31J ã¨ãã¦èª­ã¿è¾¼ã¾ããShift_JIS ã«å¤æãããï¼
+        # ã³ã¡ã³ãç­ã«å«ã¾ãã SJIS ã«ä¸é©åãªæå­ã³ã¼ãã¯ '?' ã¾ãã¯ REPLACEMENT CHARACTER ã«å¤æãããï¼
+        # EUC ã UTF-8 ã§è¨è¿°ããã CDL ãæ··å¨ãã¦ãã¦ããRuby ä¾å¤ãçºçãããã¨ãªãå¦çãé²ãããã¨ãã§ããï¼
+        # æå­ã³ã¼ãæå®ã SJIS ã§ãã£ã¦ãæå­åãªãã©ã«ã®ä¸­ã«ãæå­ã³ã¼ããSJIS ä»¥å¤ã®é ASCII ãå«ã¾ãã¦ããå ´åã
+        # Ruby 1.8 ã® tecsgen ã§ã¯æå­ã³ã¼ãæå®ã«å½±é¿ãªãå¦çããããã®ããRuby 1.9 ä»¥éã§ã¯ '?' ã«ç½®ãæããå¯è½æ§ãããï¼
+
+        mode = "r:Windows-31J"
+      else
+        mode = "r:#{$Ruby19_File_Encode}"
+      end
+      # mode = "r"
+    else
+	  msg = "E"
+      mode = "r"
+    end
+
+    f = File.open( file, mode )
+    begin
+      f.each{ |line|
+        # dbgPrint line
+        line = str_code_convert( msg, line )
+        pr.call( line )
+      }
+    ensure
+      f.close
+    end
+  end
+
+  #=== æå­ã³ã¼ããç¸éããå ´åä¸è´ããã
+  # msg ã¨ str ã®æå­ã³ã¼ããç¸éããå ´åãstr ã msg ã®æå­ã³ã¼ãã«å¤æãã
+  # å¤æä¸å¯ã®æå­ã³ã¼ãã¯ '?' (utf-8 ã®å ´å U+FFFD (REPLACEMENT CHARACTER )) ã«å¤æ
+  #
+  # ãã®ã¡ã½ããã¯ãã¨ã©ã¼ã¡ãã»ã¼ã¸åºåã§ãä½¿ç¨ããã¦ãããã¨ã«æ³¨æï¼
+  #
+  #msg_enc::Encode | String
+  def self.str_code_convert( msg, str )
+    if $b_no_kcode == false then
+      return str                          # Ruby V1.8 ã¾ã§
+    end
+    if msg.encoding != str.encoding then
+      option = { :invalid => :replace, :undef => :replace }   # ä¾å¤ãçºçãããã'?' ã«å¤æãã(utf-8 ã¯ 0xfffd)
+      # return str.encode( msg.encoding, option )
+      str = str.encode( "utf-8", option )
+      return str.encode( msg.encoding, option )
+    else
+      return str
+    end
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/bnf.y.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/bnf.y.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/bnf.y.rb	(revision 270)
@@ -0,0 +1,2189 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2016 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: bnf.y.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+class Generator
+rule
+# ãããã¬ãã«ã®æ§æè¦ç´ ã¯component_description
+all: component_description
+
+# Expr
+##########################  å¼  ##########################
+# K&Rã®ææ³(ãã­ã°ã©ãã³ã°è¨èªC ç¬¬2ç ä»é²)ã¨ä¸é¨ç°ãªã
+# argument_expression_list(é¢æ°å¼æ°), assignment_expression(ä»£å
+¥)ããªã
+# å¼ã® result ã¯ããã¹ã¦é
+åã§ç¬¬ä¸è¦ç´ ãè­å¥ã·ã³ãã«ãç¬¬äºè¦ç´ ä»¥ä¸ãå¼æ°
+
+primary_expression
+        : namespace_identifier
+		{ result = [ :IDENTIFIER, val[0] ] }     #1ok
+        | TRUE
+		{ result = [ :BOOL_CONSTANT, true ] }
+        | FALSE
+		{ result = [ :BOOL_CONSTANT, false ] }
+        | INTEGER_CONSTANT
+		{ result = [ :INTEGER_CONSTANT, val[0] ] }
+        | FLOATING_CONSTANT
+		{ result = [ :FLOATING_CONSTANT, val[0] ] }
+        | OCTAL_CONSTANT
+		{ result = [ :OCTAL_CONSTANT, val[0] ] }
+        | HEX_CONSTANT
+		{ result = [ :HEX_CONSTANT, val[0] ] }
+        | CHARACTER_LITERAL
+		{ result = [ :CHARACTER_LITERAL, val[0] ] }
+        | string_literal_list
+		{ result = [ :STRING_LITERAL_LIST, val[0] ] }
+        | '(' expression ')'
+		{ result = [ :PARENTHESES, val[1].get_elements ] }
+
+string_literal_list
+        : STRING_LITERAL
+        | string_literal_list STRING_LITERAL
+		{
+			# é£æ¥ããæå­åã1ã¤ã®æå­åã«ã¾ã¨ãã
+			str = "\"" + val[0].val.gsub( /\"(.*)\"/, "\\1" ) + val[1].val.gsub( /\"(.*)\"/, "\\1" ) + "\""
+			result = Token.new( str, val[0].file, val[0].lineno, val[0].col )
+		}
+
+# é¢æ°å¼ã³åºãã¨å¾ç½®ã¤ã³ã¯ãªã¡ã³ãããã¯ãªã¡ã³ãæ¼ç®å­ããªã
+postfix_expression
+        : primary_expression
+        | postfix_expression '[' expression ']'
+		{ result = [ :OP_SUBSC, val[0], val[2] ] }
+        | postfix_expression '.' IDENTIFIER
+		{ result = [ :OP_DOT, val[0], val[2] ] }
+        | postfix_expression '->' IDENTIFIER
+		{ result = [ :OP_REF, val[0], val[2] ] }
+
+# åç½®ã¤ã³ã¯ãªã¡ã³ãããã¯ãªã¡ã³ãæ¼ç®å­ããªã
+unary_expression
+        : postfix_expression
+        | unary_operator cast_expression
+		{ result = [ val[0], val[1] ] }
+        | SIZEOF unary_expression
+		{ result = [ :OP_SIZEOF_EXPR, val[1] ] }
+        | SIZEOF '(' type_name ')'
+		{ result = [ :OP_SIZEOF_TYPE, val[1] ] }
+
+unary_operator
+        : '&'	{ result = :OP_U_AMP }
+        | '*'	{ result = :OP_U_ASTER }
+        | '+'	{ result = :OP_U_PLUS }
+        | '-'	{ result = :OP_U_MINUS }
+        | '~'	{ result = :OP_U_TILDE }
+        | '!'	{ result = :OP_U_EXCLAM }
+
+cast_expression
+        : unary_expression
+        | '(' type_name ')' cast_expression
+		{  result = [ :CAST, val[1], val[3] ] }
+
+multiplicative_expression
+        : cast_expression
+        | multiplicative_expression '*' cast_expression
+		{ result = [ :OP_MULT, val[0], val[2] ]  }
+        | multiplicative_expression '/' cast_expression
+		{ result = [ :OP_DIV, val[0], val[2] ]  }
+        | multiplicative_expression '%' cast_expression
+		{ result = [ :OP_REMAIN, val[0], val[2] ]  }
+
+additive_expression
+        : multiplicative_expression
+        | additive_expression '+' multiplicative_expression
+		{ result = [ :OP_ADD, val[0], val[2] ]  }
+        | additive_expression '-' multiplicative_expression
+		{ result = [ :OP_SUB, val[0], val[2] ]  }
+
+shift_expression
+        : additive_expression
+        | shift_expression '<<' additive_expression
+		{ result = [ :OP_LSFT, val[0], val[2] ]  }
+        | shift_expression '>>' additive_expression
+		{ result = [ :OP_RSFT, val[0], val[2] ]  }
+
+relational_expression
+        : shift_expression
+        | relational_expression '<' shift_expression
+		{ result = [ :OP_LT, val[0], val[2] ]  }
+        | relational_expression '>' shift_expression
+		{ result = [ :OP_GT, val[0], val[2] ]  }
+        | relational_expression '<=' shift_expression
+		{ result = [ :OP_LE, val[0], val[2] ]  }
+        | relational_expression '>=' shift_expression
+		{ result = [ :OP_GE, val[0], val[2] ]  }
+
+equality_expression
+        : relational_expression
+        | equality_expression '==' relational_expression
+		{ result = [ :OP_EQ, val[0], val[2] ]  }
+        | equality_expression '!=' relational_expression
+		{ result = [ :OP_NE, val[0], val[2] ]  }
+
+and_expression
+        : equality_expression
+        | and_expression '&' equality_expression
+		{ result = [ :OP_AND, val[0], val[2] ]  }
+
+exclusive_or_expression
+        : and_expression
+        | exclusive_or_expression '^' and_expression
+		{ result = [ :OP_EOR, val[0], val[2] ]  }
+
+inclusive_or_expression
+        : exclusive_or_expression
+        | inclusive_or_expression '|' exclusive_or_expression
+		{ result = [ :OP_OR, val[0], val[2] ]  }
+
+logical_and_expression
+        : inclusive_or_expression
+        | logical_and_expression '&&' inclusive_or_expression
+		{ result = [ :OP_LAND, val[0], val[2] ]  }
+
+logical_or_expression
+        : logical_and_expression
+        | logical_or_expression '||' logical_and_expression
+		{ result = [ :OP_LOR, val[0], val[2] ]  }
+
+conditional_expression
+        : logical_or_expression
+        | logical_or_expression '?' expression ':' conditional_expression
+		{ result = [ :OP_CEX, val[0], val[2].get_elements, val[4] ]  }
+
+
+# ã³ã³ãæ¼ç®å­ãä½¿ããªã
+expression
+        : conditional_expression
+		{
+			result = Expression.new( val[0] )
+			# result.print
+		}
+
+constant_expression
+        : conditional_expression
+		{
+			result = Expression.new( val[0] )
+			# result.print
+
+			# res = result.eval_const( nil )
+			# if res then
+			#   puts "val: #{res}"
+			# else
+			#   puts "val: nil"
+			# end
+		}
+
+
+
+# Types
+##########################  å®£è¨  ##########################
+# å®£è¨ãK&Rã¨ä¸é¨ç°ãªã
+
+# declarationã¯ã»ã«ã®å±æ§ã§ä½¿ããã
+# K&Rã¨ã®éã: storage classãæå®ã§ããªããåãçç¥ã§ããªã
+declaration
+        : type_specifier_qualifier_list init_declarator_list ';'
+		{
+			val[1].each { |i|	# i: Decl
+				i.set_type( val[0] )
+			}
+			result = val[1]
+		}
+
+# declaration_specifiersã¯é¢æ°ã®ãã©ã¡ã¼ã¿ã§ä½¿ããããã
+# type_specifier_qualifier_listã§ååãããããªã
+# Oyama
+# const, volatile ã¯åç¬ã§åã«ãªããªãã®ã§å¤å½¢
+# const ã¨ volatile ãåå±
+ãããã¨ã¯ãªãã®ã§ãç¹°è¿ãæå®ã§ããªãããã«ãã
+# type_specifier ãç¹°è¿ãæå®ã§ããå¿
+è¦ã¯ãªã (singed ãªã©åç¬ã§åã«ã¯ãªããªã)
+declaration_specifiers
+        : type_specifier
+        | type_qualifier type_specifier
+		{
+			val[1].set_qualifier( val[0] )
+			result = val[1]
+		}
+
+init_declarator_list
+        : init_declarator
+		{ result = [val[0]] }
+        | init_declarator_list ',' init_declarator
+		{ result << val[2] }
+
+init_declarator
+        : declarator
+        | declarator '=' initializer
+		{ val[0].set_initializer( val[2] ) }
+
+# INT8ããä¸ã¯K&Rã«ãªã
+# Oyama
+# signed, unsigned ã¯åç¬ã§åã«ãªããªãã®ã§ãæ§æè¦ç´ ã¨ãã¦åé¢
+type_specifier
+        : VOID	{ result = VoidType.new }
+        | FLOAT32_T	{ result = FloatType.new(32) }
+        | DOUBLE64_T	{ result = FloatType.new(64) }
+        | struct_specifier
+        | enum_specifier
+        | TYPE_NAME	{ result = DefinedType.new( val[0].val ) }
+#        | IDENTIFIER	{ result = DefinedType.new( val[0].val ) }   # reduce/reduce conflict ãèµ·ãã£ã¦ãã¾ã
+        | sign_int_type
+        | char_type
+        | BOOL_T	{ result = BoolType.new }
+#        | BOOL	{
+#			Generator.warning( "W5001 bool: obsolete type. use bool_t"  )
+#			result = BoolType.new
+#		}
+        | FLOAT	{
+			Generator.warning( "W5002 float: obsolete type. use float32_t"  )
+			result = FloatType.new(32)
+		}
+        | DOUBLE {
+			Generator.warning( "W5003 double: obsolete type. use double64_t"  )
+			result = FloatType.new(64)
+		}
+        | DESCRIPTOR '(' namespace_identifier ')' {          # namespace_identifier: signature name
+			result = DescriptorType.new( val[2] )
+		}
+
+char_type
+        : CHAR_T	{ result = IntType.new( -1 ) }
+        | SCHAR_T
+		{
+			result = IntType.new( -1 )
+			result.set_sign( :SIGNED, true )
+		}
+        | UCHAR_T
+		{
+			result = IntType.new( -1 )
+			result.set_sign( :UNSIGNED, true )
+		}
+
+int_type
+        : CHAR	{
+			# Generator.warning( "W5004 char: obsolete type. use char_t"  )
+			result = IntType.new( -11 )
+		}
+        | SHORT	{ result = IntType.new( -2 ) }
+        | INT		{ result = IntType.new( -3 ) }
+        | LONG	{ result = IntType.new( -4 ) }
+#        | INTPTR	{ result = IntType.new( -5 ) }
+#        | INT8	{
+#			Generator.warning( "W5005 int8: obsolete. use int8_t"  )
+#			result = IntType.new(  8 )
+#		}
+#        | INT16	{
+#			Generator.warning( "W5006 int16: obsolete. use int16_t"  )
+#			result = IntType.new( 16 )
+#		}
+#        | INT32	{
+#			Generator.warning( "W5007 int32: obsolete. use int32_t"  )
+#			result = IntType.new( 32 )
+#		}
+#        | INT64
+#		{
+#			Generator.warning( "W5008 int64: obsolete. use int64_t"  )
+#			result = IntType.new( 64 )
+#		}
+#        | INT128
+#		{
+#			Generator.warning( "W5009 int64: obsolete. use int64_t"  )
+#			result = IntType.new( 128 )
+#		}
+        | INT8_T	{ result = IntType.new( 8 ) }
+        | INT16_T	{ result = IntType.new( 16 ) }
+        | INT32_T	{ result = IntType.new( 32 ) }
+        | INT64_T	{ result = IntType.new( 64 ) }
+        | INT128_T	{ result = IntType.new( 128 ) }
+        | UINT8_T
+		{
+			result = IntType.new( 8 )
+			result.set_sign( :UNSIGNED, true )
+		}
+        | UINT16_T
+		{
+			result = IntType.new( 16 )
+			result.set_sign( :UNSIGNED, true )
+		}
+        | UINT32_T
+		{
+			result = IntType.new( 32 )
+			result.set_sign( :UNSIGNED, true )
+		}
+        | UINT64_T
+		{
+			result = IntType.new( 64 )
+			result.set_sign( :UNSIGNED, true )
+		}
+        | UINT128_T
+		{
+			result = IntType.new( 128 )
+			result.set_sign( :UNSIGNED, true )
+		}
+
+sign    # TECS ã§ã¯ signed, unsigned åç¬ã§ã¯åã«ã§ããªã
+        : SIGNED	{ result = :SIGNED }
+        | UNSIGNED	{ result = :UNSIGNED }
+
+# result[0] :CHAR ãªã©ã®ãã¼ã¯ã³ãresult[1] :CONST, :VOLATILE ãªã©
+sign_int_type
+        : sign int_type
+		{
+			val[1].set_sign( val[0] )
+			result = val[1]
+		}
+        | int_type
+
+# K&Rã®struct_or_union_specifierã«ç¸å½ããããunionã¯ä½¿ããªã
+struct_specifier		# mikan
+        : STRUCT struct_tag '{'
+		{ StructType.set_define( true )  }
+	   struct_declaration_list '}'
+		{
+			StructType.end_of_parse
+			result = val[1]
+		}
+        | STRUCT
+		{
+			result = StructType.new()
+			StructType.set_define( true )
+		}
+	   '{' struct_declaration_list '}'
+		{
+			StructType.end_of_parse
+			result = val[1]
+		}
+        | STRUCT struct_tag   # mikan struct_tag ã¯ namespace å¯¾å¿ãå¿
+è¦
+		{
+			StructType.set_define( false )
+			StructType.end_of_parse
+			result = val[1]
+		}
+
+struct_declaration_list
+        : struct_declaration
+        | struct_declaration_list struct_declaration
+
+struct_tag:
+	IDENTIFIER
+		{ result = StructType.new( val[0].val ) }
+
+# ãã¤ã³ã¿ä¿®é£¾å­ãè¿½å 
+struct_declaration
+        :                                type_specifier_qualifier_list struct_declarator_list ';'
+		{
+			val[1].each { |i|	# i: Decl
+				i.set_type( val[0] )
+				i.set_kind( :MEMBER )
+				i.check
+				StructType.new_member( i )
+			}
+			result = val[1]
+		}
+        | spec_L pointer_specifier_list spec_R type_specifier_qualifier_list struct_declarator_list ';'
+		{
+			val[4].each { |i|	# i: Decl
+				i.set_type( val[3] )
+				i.set_kind( :MEMBER )
+  				i.set_specifier_list val[1]
+				i.check
+				StructType.new_member( i )
+			}
+			result = val[4]
+		}
+
+pointer_specifier_list
+        : pointer_specifier                               { result = [ val[0] ] }
+        | pointer_specifier_list ',' pointer_specifier    { result <<  val[2] }
+
+pointer_specifier
+        : STRING				{ result = [:STRING,-1] }
+        | STRING   '(' expression ')'	{ result = [:STRING,val[2]] }
+        | SIZE_IS  '(' expression ')'	{ result = [:SIZE_IS,val[2]] }
+        | COUNT_IS '(' expression ')'	{ result = [:COUNT_IS,val[2]] }
+
+
+# K&Rã®specifier_qualifier_listã¨åã
+# ååãã¾ãããããã£ãã®ã§type_ãä»ãã
+type_specifier_qualifier_list
+# Oyama type_specifier ãç¹°ãè¿ãã¦æå®ãããã¨ã¯ãªããªã£ã (sign_int_type ã¨ããããï¼
+#        : type_specifier type_specifier_qualifier_list
+        : type_specifier
+        | type_qualifier type_specifier_qualifier_list
+		{
+			val[1].set_qualifier( val[0] )
+			result = val[1]
+		}
+# mikan Oyama type_qualifier ã ãã§ã¯åæå®ã«ãªããªã : æ§æã¨ã©ã¼ã¨ãããããæå³ã¨ã©ã¼ã¨ããæ¹ãè¦ªå
+#        | type_qualifier
+
+
+struct_declarator_list
+        : struct_declarator
+		{ result = [ val[0] ] }
+        | struct_declarator_list ',' struct_declarator
+		{ result << val[2] }
+
+# ããããã£ã¼ã«ãã¯ä½¿ããªã
+struct_declarator
+        : declarator
+
+# enumã®ç¨®é¡ãè¿½å 
+enum_specifier		# mikan
+        : enum_type            '{' enumerator_list '}'
+        | enum_type IDENTIFIER '{' enumerator_list '}'
+        | enum_type IDENTIFIER
+
+enum_type
+        : ENUM	{ result = EnumType.new( -1 ) }
+        | ENUM8	{ result = EnumType.new( 8 ) }
+        | ENUM16	{ result = EnumType.new( 16 ) }
+        | ENUM32	{ result = EnumType.new( 32 ) }
+        | ENUM64	{ result = EnumType.new( 64 ) }
+        | ENUM128	{ result = EnumType.new( 128 ) }
+
+enumerator_list
+        : enumerator
+        | enumerator_list ',' enumerator
+
+enumerator
+        : IDENTIFIER
+        | IDENTIFIER '=' constant_expression
+
+type_qualifier
+        : CONST	{ result = :CONST }
+        | VOLATILE	{ result = :VOLATILE }
+
+declarator
+        : pointer direct_declarator
+		{
+			val[1].set_type( val[0] )
+			result = val[1]
+		}
+        | direct_declarator
+
+direct_declarator		# mikan
+        : IDENTIFIER
+		{ result = Decl.new( val[0].val ) }
+        | '(' declarator ')'
+		{ result = val[1] }
+        | direct_declarator '[' constant_expression ']'
+		{
+			val[0].set_type( ArrayType.new( val[2] ) )
+			result = val[0]
+		}
+        | direct_declarator '[' ']'
+		{
+			val[0].set_type( ArrayType.new )
+			result = val[0]
+		}
+        | direct_declarator '(' parameter_type_list ')'
+		{
+			val[0].set_type( FuncType.new( val[2] ) )
+			result = val[0]
+		}
+#        | direct_declarator '(' identifier_list ')'  # ããã¯ä½ã®ããã«å¿
+è¦ï¼ 060211
+        | direct_declarator '(' ')'
+		{
+			Generator.warning( "W5010 need 'void' for no parameter"  )
+			val[0].set_type( FuncType.new )
+			result = val[0]
+		}
+
+pointer
+        : '*'
+		{ result = PtrType.new }
+        | '*' type_qualifier
+		{
+			result = PtrType.new
+			result.set_qualifier( val[1] )
+		}
+        | '*' pointer
+		{
+			val[1].set_type(PtrType.new)
+			result = val[1]
+		}
+        | '*' type_qualifier pointer
+		{
+			ptrtype = PtrType.new
+			ptrtype.set_qualifier( val[1] )
+			val[2].set_type( ptrtype )
+			result = val[2]
+		}
+
+
+parameter_type_list
+        : parameter_list
+        | parameter_list ',' '...'
+		# mikan å¯å¤é·ãã©ã¡ã¼ã¿
+
+parameter_list
+        : parameter_declaration
+		{ result = ParamList.new( val[0] ) }
+        | parameter_list ',' parameter_declaration
+		{
+			val[0].add_param( val[2] )
+			# result = val[0] ä¸è¦
+		}
+
+
+# ãã©ã¡ã¼ã¿ä¿®é£¾å­ãè¿½å 
+parameter_declaration
+#        : spec_L parameter_specifier_list spec_R declaration_specifiers declarator
+        : parameter_specifier_list_bracket declaration_specifiers  declarator
+		{
+			val[2].set_kind( :PARAMETER )
+			paramdecl = ParamDecl.new( val[2], val[1], val[0] )
+			val[2].check
+			result = paramdecl
+		}
+
+	# ä»¥ä¸ã¯ã¨ã©ã¼ã¨ãã
+        | declaration_specifiers declarator # parameter_specifier ãªãã¯æ±ããªã
+		{
+			Generator.error( "G1001 need specifier for \'$1\'" , val[1].get_name )
+			result = nil
+		}
+        | declaration_specifiers	# ä»®å¼æ°ãªãã¯ãã¨ããããæ±ããªã 060210
+		{
+			unless val[0].instance_of?( VoidType ) then
+				Generator.error( "G1002 need parameter name"  )
+			end
+			result = nil
+		}
+#        | '[' parameter_specifier_list ']' declaration_specifiers # å 060210
+        | parameter_specifier_list_bracket declaration_specifiers # å 060210
+		{
+			unless val[1].instance_of?( VoidType ) then
+				Generator.error( "G1003 need parameter name"  )
+			end
+			result = nil
+		}
+
+parameter_specifier_list_bracket
+        :  spec_L parameter_specifier_list spec_R { result = val[1] }
+#        :  '[' parameter_specifier_list  ']'  { result = val[1] }
+
+parameter_specifier_list
+        : parameter_specifier	{ result = val[0] }
+        | parameter_specifier_list ',' parameter_specifier
+		{ result = result + val[2] }
+
+parameter_specifier
+        : IN					{ result = [ [:IN]  ] }
+        | OUT					{ result = [ [:OUT] ] }
+        | INOUT					{ result = [ [:INOUT] ] }
+        | SEND     '(' namespace_identifier ')'	{ result = [ [:SEND,   val[2]] ] }   #1ok allocator
+        | RECEIVE  '(' namespace_identifier ')'	{ result = [ [:RECEIVE,val[2]] ] }   #1ok allocator
+        | STRING				{ result = [ [:STRING,nil] ] }
+        | STRING   '(' expression ')'	{ result = [ [:STRING,  val[2]] ] }
+        | SIZE_IS  '(' expression ')'	{ result = [ [:SIZE_IS, val[2]] ] }
+        | SIZE_IS  '(' expression ',' constant_expression ')'
+		{
+			result = [ [:SIZE_IS,val[2]], [:MAX_IS, val[4]] ]
+		}
+        | COUNT_IS '(' expression ')'	{ result = [ [:COUNT_IS,val[2]] ] }
+        | NULLABLE		{ result = [ [:NULLABLE] ] }
+
+type_name
+        : type_specifier_qualifier_list
+        | type_specifier_qualifier_list abstract_declarator
+		{
+			if val[1] then
+				val[1].set_type( val[0] )
+				result = val[1]
+			else
+				# ã¨ã©ã¼ï¼ä»®ã§ val[0] ãè¿ã
+				result = val[0]
+			end
+		}
+		# mikan abstract_declarator ã pointer ä»¥å¤ã§ã¯ãã¾ãåããªããã¨ãããã '*' CAST ã®ã¿æã£ã
+
+abstract_declarator		# mikan
+        : pointer
+        | direct_abstract_declarator
+        | pointer direct_abstract_declarator
+
+direct_abstract_declarator
+        : '(' abstract_declarator ')'
+		{ result = val[1] }  # é¢æ°ãã¤ã³ã¿åãæã
+        | '[' ']'
+		{
+			Generator.error( "G1004 impossible array type"  )
+			result = nil
+		}
+        | '[' constant_expression ']'
+		{
+			Generator.error( "G1005 impossible array type"  )
+			result = nil
+		}
+        | direct_abstract_declarator '[' ']'
+		{
+			Generator.error( "G1006 impossible array type"  )
+			result = nil
+		}
+        | direct_abstract_declarator '[' constant_expression ']'
+		{
+			Generator.error( "G1007 impossible array type"  )
+			result = nil
+		}
+        | '(' ')'
+		{
+			Generator.error( "G1008 impossible function type"  )
+			result = nil
+		}
+        | '(' parameter_type_list ')'
+        | direct_abstract_declarator '(' ')'
+		{
+			Generator.warning( "W5011 need 'void' for no parameter"  )
+			val[0].set_type( FuncType.new )
+			result = val[0]
+		}
+        | direct_abstract_declarator '(' parameter_type_list ')'
+		{
+			val[0].set_type( FuncType.new( val[2] ) )
+			result = val[0]
+		}
+
+# assignment_expressionãconstant_expressionã«å¤æ´
+initializer			# mikan
+        : constant_expression
+		{ result = val[0] }
+        | '{' initializer_list '}'
+		{ result = val[1] }
+        | '{' initializer_list ',' '}'
+		{ result = val[1] }
+#        | C_EXP '(' STRING_LITERAL ')'
+        | C_EXP '(' string_literal_list ')'
+		{ result = C_EXP.new( val[2] ) }
+
+initializer_list
+        : initializer
+		{
+			result = [ val[0] ]
+		}
+        | initializer_list ',' initializer
+		{
+			val[0] << val[2]
+			result = val[0]
+		}
+
+
+##########################  ããããã¯CDLç¬èª  ##########################
+
+#ãããã¬ãã«ã®æ§æè¦å
+#ã³ã³ãã¼ãã³ãè¨è¿°
+component_description
+        : component_description specified_statement
+        | component_description location_information
+        | 
+
+specified_statement
+        : statement
+        | spec_L statement_specifier_list spec_R statement
+		{
+			obj = val[3]
+			if obj.kind_of?( Cell ) || obj.kind_of?( Signature ) || obj.kind_of?( Celltype ) || obj.kind_of?( CompositeCelltype )then
+                                # cell, signature ä»¥å¤ã¯ãæå®å­ãç½®ããªã
+			else
+              Generator.get_statement_specifier   # ã¯ãªã¢
+              Generator.error( "G1009 unexpected specifier"  )
+			end
+		}
+		# ããã¨åãè¨è¿°ã composite_celltype ã«ããã
+
+statement
+        : typedef
+        | const_statement
+        | namespace
+        | signature
+        | celltype
+        | cell
+        | composite_celltype
+        | enum_specifier ';'
+        | struct_specifier ';'
+        | region
+        | import
+        | import_C
+        | signature_plugin
+        | error   # ã¨ã©ã¼åå¾©ãã¤ã³ã
+
+	
+statement_specifier_list
+        : statement_specifier
+		{ Generator.add_statement_specifier val[0]	}
+        | statement_specifier_list ',' statement_specifier
+		{ Generator.add_statement_specifier val[2] }
+
+statement_specifier
+        : ALLOCATOR '(' alloc_list ')'                       # cell
+		{ result = [ :ALLOCATOR, val[2] ] }
+        | CALLBACK                                           # signature
+		{ result = [ :CALLBACK ] }
+        | CONTEXT '(' string_literal_list ')'                # signature
+		{ result = [ :CONTEXT, val[2].val ] }
+        | DEVIATE                                            # signature
+		{ result = [ :DEVIATE ] }
+        | ID '(' constant_expression ')'                     # cell
+		{ result = [ :ID, val[2] ] }
+        | PROTOTYPE                                          # cell
+		{ result = [ :PROTOTYPE ] }
+        | RESTRICT  '(' restrict_list ')'                    # cell
+		{ result = [ :RESTRICT, val[2] ] }
+        | SINGLETON  { result = [:SINGLETON] }               # celltype, composite
+        | IDX_IS_ID  { result = [:IDX_IS_ID] }               # celltype, composite (composite: no-effective)
+        | ACTIVE     { result = [:ACTIVE] }                  # celltype, composite
+        | GENERATE '(' plugin_name ',' plugin_arg  ')'       # celltype, cell
+		{ result = [:GENERATE, val[2].val, val[4].val] }
+
+alloc_list
+        : alloc			{ result = [ val[0] ] }
+        | alloc_list ',' alloc	{ result << val[2] }
+
+alloc
+        : IDENTIFIER '.' IDENTIFIER '.' IDENTIFIER '=' initializer
+		{  result = [ :NORMAL_ALLOC, val[0], nil, val[2], val[4], val[6] ] }
+        | IDENTIFIER '[' constant_expression ']' '.' IDENTIFIER '.' IDENTIFIER '=' initializer
+		{  result = [ :NORMAL_ALLOC, val[0], val[2], val[5], val[7], val[9] ] }
+# mikan å°æ¥çãªæ¡å¼µ ('*' ã§ã¾ã¨ãã¦æå®å¯è½ã¨ãã)
+#        | IDENTIFIER '.' IDENTIFIER '.' '*'        '=' initializer
+#		{  result = [ val[0], val[ ], val[ ], val[ ] ] }
+#        | IDENTIFIER '.' '*' '.' '*'               '=' initializer
+#		{  result = [ val[0], val[ ], val[ ], val[ ] ] }
+
+restrict_list
+        : restrict
+		{	result = [val[0]]		}
+        | restrict_list ',' restrict
+		{	result << val[2]		}
+
+restrict
+        : port_name '=' '{' region_name_list '}'
+		{	result = [ val[0].val, nil, val[3] ]		}
+        | port_name '.' IDENTIFIER '=' '{' region_name_list '}'
+		{	result = [ val[0].val, val[2].val, val[5] ]		}
+
+region_name_list
+        : IDENTIFIER
+		{	result = [val[0].val]		}
+        | region_name_list ',' IDENTIFIER
+		{	result << val[2].val		}
+
+const_statement
+        : declaration   # å®æ°å®ç¾©
+		{
+			val[0].each { |decl|
+				decl.set_kind( :CONSTANT )
+				Namespace.new_const_decl( decl )
+				decl.check
+			}
+		}
+
+import_C
+        : IMPORT_C '(' STRING_LITERAL ')' ';'
+		{
+			@@import_C = true
+			Import_C.new( val[2] )
+			@@import_C = false
+		}
+        | IMPORT_C '(' STRING_LITERAL ',' STRING_LITERAL ')' ';'
+		{
+			@@import_C = true
+			Import_C.new( val[2], val[4] )
+			@@import_C = false
+		}
+
+import
+        : IMPORT '(' STRING_LITERAL ')' ';'
+		{ Import.new( val[2] ) }
+        | IMPORT '(' AB_STRING_LITERAL ')' ';'
+		{ Import.new( val[2], true ) }
+
+signature_plugin
+#        : GENERATE '(' plugin_name ',' namespace_identifier ',' STRING_LITERAL ')' ';'  #1ok signature plugin
+        : GENERATE '(' plugin_name ',' namespace_identifier ',' plugin_arg ')' ';'  #1ok signature plugin
+		{ Generate.new( val[2].val, val[4], val[6] ) }
+
+typedef
+        : TYPEDEF type_specifier_qualifier_list declarator_list ';'
+		{
+			val[2].each{ |i|       # i:Decl
+				i.set_kind( :TYPEDEF )
+    		}
+			Typedef.new_decl_list( val[1], val[2] )
+			val[2].each{ |i|       # i:Decl
+				i.check
+			}
+		}
+        | TYPEDEF '[' typedef_specifier ']' type_specifier_qualifier_list declarator_list ';'
+		{
+			val[5].each{ |i|       # i:Decl
+				i.set_kind( :TYPEDEF )
+			}
+			Typedef.new_decl_list( val[4], val[5] )
+			val[5].each{ |i|       # i:Decl
+				i.check
+			}
+		}
+		# mikan   typedef_specifier æªå¦ç½®
+
+
+typedef_specifier
+        : STRING
+        | STRING '(' expression ')'
+
+declarator_list
+        : declarator
+		{ result = [ val[0] ] }
+        | declarator_list ',' declarator
+		{ result << val[2] }
+
+namespace
+        : NAMESPACE namespace_name '{' statement_list '}' ';'
+		{val[1].end_of_parse}
+
+namespace_name
+        : IDENTIFIER
+		{result = Namespace.new(val[0].val)}
+		# namespace ã¤ã³ã¹ã¿ã³ã¹ã« statement ãè¨æ¶ãããããããã§çæ
+
+statement_list
+        : specified_statement
+        | statement_list specified_statement
+
+namespace_identifier
+        : IDENTIFIER		{ result = NamespacePath.new( val[0].val, false ) }
+        | '::' IDENTIFIER	{ result = NamespacePath.new( val[1].val, true ) }
+        | namespace_identifier '::' IDENTIFIER
+		{ result = val[0].append!( val[2].val ) }
+
+#ã·ã°ããã£
+signature
+        : SIGNATURE signature_name '{' function_head_list '}' ';'
+		{ result = val[1].end_of_parse( val[3] ) }
+
+signature_name
+        : IDENTIFIER
+		{result = Signature.new( val[0].val ) }
+
+function_head_list     # result:  function_head ã®é
+å
+#        : function_head
+#		{ result = NamedList.new( val[0], "function" ) }
+        :
+		{ result = NamedList.new( nil, "function" ) }
+        | function_head_list function_head
+		{ result = val[0].add_item( val[1] ) }
+
+function_head
+        :               type_specifier_qualifier_list declarator ';'
+		{
+			# val[1]: Decl
+			if val[1].is_function? then
+				result = FuncHead.new( val[1], val[0], false )
+				val[1].set_kind :FUNCHEAD
+				val[1].check
+			else
+				# mikan é¢æ°ã®é
+åãä»¥ä¸ã®ã¡ãã»ã¼ã¸ã«ãªã
+				Generator.error( "G1010 Not function"  )
+				result = nil
+			end
+		}
+        | spec_L ONEWAY spec_R type_specifier_qualifier_list declarator ';'
+		{
+			if val[4].is_function? then
+				result = FuncHead.new( val[4], val[3], true )
+			else
+				Generator.error( "G1011 Not function"  )
+				result = nil
+			end
+		}
+
+
+#ã»ã«ã¿ã¤ã
+celltype
+        : CELLTYPE celltype_name '{' celltype_statement_list '}' ';'
+		{
+			val[1].end_of_parse
+			result = val[1]
+		}
+
+celltype_name
+        : IDENTIFIER
+		{ result = Celltype.new(val[0].val) }
+
+celltype_statement_list
+        : specified_celltype_statement
+        | celltype_statement_list specified_celltype_statement
+
+specified_celltype_statement
+        : celltype_statement
+		{
+			if val[0].kind_of? Port then
+				Celltype.new_port( val[0] )
+			end
+		}
+        | spec_L celltype_statement_specifier_list spec_R celltype_statement
+		{
+			if val[3].kind_of? Port then
+				val[3].set_specifier val[1]  # è¨­å®é åºãã
+				Celltype.new_port( val[3] )
+			else
+				# Port ä»¥å¤ã§ã¯æå®å­ã¯ã¨ã©ã¼
+				Generator.error( "G1012 $1 : cannot put specifier here" , val[1] )
+			end
+		}
+
+celltype_statement
+        : port
+        | attribute
+        | var
+        | require
+        | factory
+#        | error       # ã¨ã©ã¼åå¾©ãã¤ã³ã  (#513 ç¡éã«ã¼ãã«é¥ãã±ã¼ã¹ãããã®ã§ãããã§ã®ã¨ã©ã¼åå¾©ã¯åããã)
+
+celltype_statement_specifier_list
+        : celltype_statement_specifier
+		{ result = [ val[0] ] }
+        | celltype_statement_specifier_list ',' celltype_statement_specifier
+		{ result << val[2] }
+
+celltype_statement_specifier
+        : INLINE { result = [ :INLINE ] }
+        | ALLOCATOR '(' alloc_list2 ')'    { result = [ :ALLOCATOR, val[2] ] }
+        | OPTIONAL { result = [ :OPTIONAL ] }
+        | REF_DESC { result = [ :REF_DESC ] }
+        | DYNAMIC { result = [ :DYNAMIC ] }
+        | OMIT { result = [ :OMIT ] }
+
+alloc_list2
+        : alloc2			{ result = [ val[0] ] }    # åãå£ã®ã¢ã­ã±ã¼ã¿æå®
+        | alloc				{ result = [ val[0] ] }    # å
+é¨ã»ã«ã®ã¢ã­ã±ã¼ã¿æå®
+        | alloc_list2 ',' alloc2	{ result << val[2] }
+        | alloc_list2 ',' alloc		{ result << val[2] }
+
+alloc2
+        : IDENTIFIER '.' IDENTIFIER '=' initializer    # å
+é¨ã¢ã­ã±ã¼ã¿ (ãããã©åãã¢ã­ã±ã¼ã¿)æå®
+		{  result = [ :INTERNAL_ALLOC, val[0].val, val[2].val, val[4] ] }
+        | IDENTIFIER '.' IDENTIFIER '<=' initializer   # å¤æ®µãªã¬ã¼ã¢ãã«åãã¢ã­ã±ã¼ã¿æå®
+		{  result = [ :RELAY_ALLOC, val[0].val, val[2].val, val[4] ] }
+
+
+#å¼ã³å£ãåãå£
+port
+        : port_type namespace_signature_name port_name ';'
+		{ result = Port.new( val[2].val, val[1], val[0] ) }
+        | port_type namespace_signature_name port_name '[' ']' ';'
+		{ result = Port.new( val[2].val, val[1], val[0], "[]" ) }
+        | port_type namespace_signature_name port_name '[' array_size ']' ';'
+		{ result = Port.new(val[2].val, val[1], val[0], val[4]) }
+        | port_type namespace_signature_name port_name '<=' namespace_identifier '.' IDENTIFIER ';'    #1ok reverse require
+		{ result = Port.new( val[2].val, val[1], val[0], nil, val[4], val[ 6 ].val ) }
+
+port_type
+        : CALL	{ result = :CALL }
+        | ENTRY	{ result = :ENTRY }
+
+namespace_signature_name
+        : namespace_identifier  #1ok
+		{ result = val[0] }
+
+port_name
+        : IDENTIFIER
+
+array_size
+        : constant_expression
+
+
+#å±æ§
+attribute
+        : ATTRIBUTE '{' attribute_declaration_list '}' ';'
+		{ result = nil }
+
+attribute_declaration_list
+        : attribute_declaration
+		{ Celltype.new_attribute( val[0] ) }
+        | attribute_declaration_list attribute_declaration
+		{ Celltype.new_attribute( val[1] ) }
+
+
+attribute_declaration
+        :                             declaration
+		{
+			val[0].each{ |i|       # i:Decl
+				i.set_kind( :ATTRIBUTE )
+				i.check
+			}
+			result = val[0]
+		}
+        | spec_L attribute_specifier spec_R declaration
+		{
+			val[3].each{ |i|       # i:Decl
+				i.set_kind( :ATTRIBUTE )   # è¨­å®é åºãã
+				i.set_specifier_list( [val[1]] )
+				i.check
+			}
+			result = val[3]
+		}
+
+attribute_specifier
+        : OMIT     { result = [:OMIT] }
+        | SIZE_IS  '(' expression ')'	{ result = [:SIZE_IS,val[2]] }
+        | CHOICE '=' '{' choice_list '}' {  result = [:CHOICE,val[3]] }
+
+choice_list
+        : choice_list ',' choice_element {  result << val[2] }
+        | choice_element                 {  result = [ val[0] ] }
+
+choice_element
+        : STRING_LITERAL
+
+#å
+é¨å¤æ°
+var
+        : VAR '{' var_declaration_list '}' ';'
+		{ result = nil }
+
+var_declaration_list
+        : var_declaration
+   		{ Celltype.new_var( val[0] ) }
+        | var_declaration_list var_declaration
+   		{ Celltype.new_var( val[1] ) }
+
+var_declaration
+        : declaration
+		{
+			val[0].each{ |i|       # i:Decl
+				i.set_kind( :VAR )
+				i.check
+			}
+		}
+        | spec_L var_specifier spec_R declaration
+		{
+			val[3].each{ |i|       # i:Decl
+				i.set_kind( :VAR )   # è¨­å®é åºãã
+				i.set_specifier_list( [val[1]] )
+				i.check
+			}
+			result = val[3]
+		}
+
+var_specifier
+        : SIZE_IS  '(' expression ')'	{ result = [:SIZE_IS,val[2]] }
+
+# ãªã¯ã¯ã¤ã¢
+require
+        : REQUIRE namespace_identifier '.' IDENTIFIER';'                            # mikan namespace #1
+		{
+			Celltype.new_require( val[1], val[3] )
+		}
+        | REQUIRE IDENTIFIER '=' namespace_identifier '.' IDENTIFIER';'             #1
+		{
+			Celltype.new_require( val[3], val[5], val[1].val )
+		}
+
+#ãã¡ã¯ããª
+factory
+        : factory_head '{' factory_function_list '}' ';'
+
+factory_head
+        : FACTORY     { Factory.set_f_celltype( false ) }
+        | CTFACTORY   { Factory.set_f_celltype( true ) }
+
+factory_function_list
+        :                                         # ç©º
+        | factory_function_list factory_function
+
+factory_function
+        : factory_function_name '(' constant_expression ',' constant_expression  ')' ';'
+		{ Factory.new( val[0].val, val[2], val[4], nil    ) }
+        | factory_function_name '(' constant_expression ',' constant_expression ',' arg_list ')' ';'
+		{ Factory.new( val[0].val, val[2], val[4], val[6] ) }
+
+factory_function_name
+        : IDENTIFIER
+
+arg_list     # factory ã® write é¢æ°ã®ç¬¬ä¸å¼æ°ä»¥é
+        : IDENTIFIER
+		{ result = [ [ :IDENTIFIER, val[0].val ] ] }
+        | arg_list ',' IDENTIFIER
+		{ result << [ :IDENTIFIER, val[2].val ] }
+        | STRING_LITERAL
+		{ result = [ [ :STRING_LITERAL, val[0].val ] ] }
+        | arg_list ',' STRING_LITERAL
+		{ result << [ :STRING_LITERAL, val[2].val ] }
+
+#ã»ã«çæ
+cell
+        : CELL namespace_celltype_name cell_name '{'
+		{ Cell.new_def }
+          join_list '}' ';'
+		{ result = Cell.end_of_parse true }
+        | CELL namespace_celltype_name cell_name ';'   # oyama ãã­ãã¿ã¤ãå®£è¨
+			{ result = Cell.end_of_parse false }
+
+namespace_celltype_name
+        : namespace_identifier
+		{ result = Cell.new(val[0]) }
+
+cell_name
+        : IDENTIFIER
+		{ result = Cell.set_name(val[0].val) }
+
+join_list
+        :   # ç©ºè¡  061007
+        | join_list specified_join
+        | join_list reverse_join
+
+specified_join
+        :  spec_L join_specifier_list spec_R join
+		{ val[3].set_specifier_list( val[1] )  }
+	|  join
+		{ val[0].set_specifier_list( [] ) }
+
+join_specifier_list
+        : join_specifier_list ',' join_specifier
+		{ result << val[2] }
+        | join_specifier
+		{ result = [val[0]] }
+
+join_specifier
+        : THROUGH '(' plugin_name ',' plugin_arg ')'
+		{ result = [ :THROUGH, val[2], val[4] ] }
+
+plugin_name
+        : IDENTIFIER   { result = val[0] }
+
+plugin_arg
+        : string_literal_list
+
+join
+#        : cae_name                     '=' expression ';'
+#		{
+#			result = Join.new( val[0].val, nil, val[2] )
+#			Cell.new_join( result, true )
+#		}
+#        | cae_name '[' ']'             '=' expression ';'
+        : cae_name '[' ']'             '=' expression ';'
+		{
+			result = Join.new( val[0].val,  -1, val[4] )
+			Cell.new_join( result, true )
+		 }
+        | cae_name '[' array_index ']' '=' expression ';'
+		{
+			result = Join.new( val[0].val, val[2], val[5] )
+			Cell.new_join( result, true )
+		}
+        | cae_name '=' initializer ';'     # åæåå­ï¼ '{', '}' ãå¯
+		{
+			result = Join.new( val[0].val, nil, val[2] )
+			Cell.new_join( result, true )
+		}
+        | cae_name '=' COMPOSITE '.' IDENTIFIER ';'
+		{
+			result = Join.new( val[0].val, nil, [ :COMPOSITE, val[4] ] )
+			Cell.new_join( result, true )
+		}
+
+cae_name #  cae: callport, attribute, entryport
+        : IDENTIFIER
+
+reverse_join
+        # non-array <= non-array
+        : cae_name '<=' namespace_identifier '.' IDENTIFIER ';'
+		{
+			rj = ReverseJoin.new( val[0].val, nil, val[2], val[4].val )
+			Cell.new_reverse_join( rj )
+		}
+        # non-array <= array
+        | cae_name '<=' namespace_identifier '.' IDENTIFIER '[' expression ']' ';'
+		{
+			rj = ReverseJoin.new( val[0].val, nil, val[2], val[4].val, val[6] )
+			Cell.new_reverse_join( rj )
+		}
+        # array <= non-array
+        | cae_name '[' array_index ']' '<=' namespace_identifier '.' IDENTIFIER ';'
+		{
+			rj = ReverseJoin.new( val[0].val, val[2], val[5], val[7].val )
+			Cell.new_reverse_join( rj )
+		}
+        # array <= array
+        | cae_name '[' array_index ']' '<=' namespace_identifier '.' IDENTIFIER '[' expression ']' ';'
+		{
+			rj = ReverseJoin.new( val[0].val, val[2], val[5], val[7].val, val[9] )
+			Cell.new_reverse_join( rj )
+		}
+
+
+array_index
+        : constant_expression
+
+#è¤åç¨®
+composite_celltype
+        : COMPOSITE composite_celltype_name '{' composite_celltype_statement_list '}' ';'
+		{
+			CompositeCelltype.end_of_parse
+			result = val[1]
+		}
+
+composite_celltype_name
+        : IDENTIFIER
+		{ result = CompositeCelltype.new(val[0].val) }
+
+composite_celltype_statement_list
+        : specified_composite_celltype_statement
+        | composite_celltype_statement_list specified_composite_celltype_statement
+
+specified_composite_celltype_statement
+        : composite_celltype_statement
+		{
+			if val[0].kind_of?( Port ) then
+				CompositeCelltype.new_port( val[0] )   # é
+å»¶ãã¦ç»é²
+			end
+		}
+        | spec_L composite_celltype_statement_specifier_list spec_R composite_celltype_statement
+		{
+			if val[3].kind_of?( Port ) then
+				# port ä»¥å¤ val[3] ã«æå¹ãªå¤ãå
+¥ã£ã¦ããªãã®ã§ãä»¥ä¸ã®ã¡ã½ãããé©ç¨ã§ããªã
+				# ç¾ç¶ port, cell ä»¥å¤ã¯æå®å­ãåãä»ããªã
+				# ï¼ãããå°æ¥ä»ã®æãæå®å­ãåãä»ããå¯è½æ§ãããã®ã§ããã®ä½ç½®ã«è¨è¿°ããï¼
+				val[3].set_specifier( Generator.get_statement_specifier )
+				CompositeCelltype.new_port( val[3] )   # é
+å»¶ãã¦ç»é² (set_specifier å¾)
+			elsif val[3].kind_of?( Cell ) then
+				# Cell.end_of_parse ã«ã¦è¨­å®
+			else
+              Generator.get_statement_specifier   # ã¯ãªã¢
+              Generator.error( "G1013 unexpected specifier"  )
+			end
+		}
+
+composite_celltype_statement
+        : composite_port
+        | composite_attribute
+        | internal_cell
+        | export_join
+#        | error       # ã¨ã©ã¼åå¾©ãã¤ã³ã  (#513 ç¡éã«ã¼ãã«é¥ãã±ã¼ã¹ãããã®ã§ãããã§ã®ã¨ã©ã¼åå¾©ã¯åããã)
+
+composite_celltype_statement_specifier_list
+        : composite_celltype_statement_specifier
+		{
+			Generator.add_statement_specifier val[0]
+			result = [ val[0] ]
+		}
+
+composite_celltype_statement_specifier
+        : ALLOCATOR '(' alloc_list2 ')'		{ result = [ :ALLOCATOR, val[2] ] }
+        | OMIT	{ result = [ :OMIT ] }
+        | OPTIONAL	{ result = [ :OPTIONAL ] }
+        | REF_DESC	{ result = [ :REF_DESC ] }
+        | DYNAMIC	{ result = [ :DYNAMIC ] }
+
+composite_port
+        : port
+		{
+			# CompositeCelltype.new_port( val[0] )
+			result = val[0]
+		}
+
+#å±æ§
+composite_attribute
+        : ATTRIBUTE '{' composite_attribute_declaration_list '}' ';'
+		{ result = nil }
+
+composite_attribute_declaration_list
+        : attribute_declaration
+		{ CompositeCelltype.new_attribute( val[0] ) }
+        | composite_attribute_declaration_list attribute_declaration
+		{ CompositeCelltype.new_attribute( val[1] ) }
+
+internal_cell
+        : CELL internal_namespace_celltype_name
+             internal_cell_name '{'
+		{ Cell.new_def }
+             internal_join_list '}' ';'
+		{ result = Cell.end_of_parse true }
+        | CELL internal_namespace_celltype_name	internal_cell_name ';'
+		{ result = Cell.end_of_parse false }
+
+
+internal_namespace_celltype_name
+        : namespace_identifier
+		{ Cell.new(val[0],true) }
+
+internal_cell_name
+        : IDENTIFIER
+		{ Cell.set_name(val[0].val) }
+
+
+internal_join_list
+        :   # ç©ºè¡  061007
+        | internal_join_list specified_join
+        | internal_join_list external_join
+
+external_join  # cell å
+ã«è¨è¿°ããå¼ã³å£ã®å¤é¨çµå
+        : internal_cell_elem_name '=>' COMPOSITE '.' export_name ';'
+		{	Cell.external_join( val[0].val, val[4].val, true )	}
+        | internal_cell_elem_name '=>' export_name ';'
+		{	Cell.external_join( val[0].val, val[2].val, false )	}
+        # ä»¥åã®ææ³ã§ã¯ãå¼ã³å£å´ã cell ã®å¤ã«è¨è¿°ãã¦ãã
+        # ãã®æã®å®è£
+ã
+
+export_join    # cell å¤ã«è¨è¿°ããåãå£ã®å¤é¨çµå
+        : export_name '=>' internal_ref_cell_name '.' internal_cell_elem_name ';'
+		{
+			CompositeCelltype.new_join( val[0].val,
+						val[2].val, val[4].val, :ENTRY )
+		}
+        | COMPOSITE '.' export_name '=>' internal_ref_cell_name '.' internal_cell_elem_name ';'
+		{
+			CompositeCelltype.new_join( val[2].val,
+						val[4].val, val[6].val, :ENTRY )
+		}
+
+export_name
+        : IDENTIFIER
+
+internal_ref_cell_name
+        : IDENTIFIER
+
+internal_cell_elem_name
+        : IDENTIFIER
+
+# ãªã¼ã¸ã§ã³
+region
+        : spec_L region_specifier_list spec_R REGION region_name '{'  region_statement '}' ';'
+		{ Region.end_of_parse }
+        |                  REGION region_name '{'  region_statement '}' ';'
+		{ Region.end_of_parse }
+
+
+region_specifier_list
+        : region_specifier
+        | region_specifier_list ',' region_specifier
+
+region_specifier
+        : IN_THROUGH '(' plugin_name ',' plugin_arg ')'
+		{ Region.new_in_through( val[2].val, val[4].val ) }
+        | IN_THROUGH '(' ')'   # in è¨±å¯
+		{ Region.new_in_through }
+        | OUT_THROUGH '(' plugin_name ',' plugin_arg ')'
+		{ Region.new_out_through( val[2].val, val[4].val ) }
+        | OUT_THROUGH '(' ')'  # out è¨±å¯
+		{ Region.new_out_through() }
+        | TO_THROUGH '(' namespace_region_name ',' plugin_name ',' plugin_arg ')'
+		{ Region.new_to_through( val[2], val[4].val, val[6].val ) }
+        | TO_THROUGH '('namespace_region_name ')'  # to è¨±å¯
+		{ Region.new_to_through( val[2], nil, nil ) }
+        | NODE
+		{ Region.set_type( :NODE ) }
+        | LINKUNIT
+		{ Region.set_type( :LINKUNIT ) }
+        | DOMAIN '(' IDENTIFIER ',' STRING_LITERAL ')'
+		{ Region.set_domain( val[2].val, val[4] ) }
+        | CLASS '(' IDENTIFIER ')'
+		{ Region.set_type( :CLASS, val[2].val ) }
+
+region_name
+        : IDENTIFIER
+		{ result = Region.new( val[0].val ) }
+
+region_statement
+        :
+        | region_statement region_cell
+        | region_statement region
+
+region_cell
+        : cell
+        | spec_L statement_specifier_list spec_R cell
+		{
+			obj = val[3]
+			if obj.kind_of?( Cell ) then
+			else
+              Generator.get_statement_specifier   # ã¯ãªã¢
+              Generator.error( "G9999 unexpected specifier"  )
+			end
+		}
+#        | spec_L region_cell_specifier_list spec_R cell
+
+# region_cell_specifier_list
+#         : region_cell_specifier
+# 		{ Generator.add_statement_specifier val[0] }
+#         | region_cell_specifier_list region_cell_specifier
+# 		{ Generator.add_statement_specifier val[2] }
+
+# region_cell_specifier
+#         : ALLOCATOR '(' alloc_list ')'
+# 		{ result = [ :ALLOCATOR, val[2] ] }
+
+
+namespace_region_name
+         : :IDENTIFIER
+		{ result = [ val[0].val ] }  # mikan é
+åã§ããå¿
+è¦ã¯ãªã
+#        : namespace_identifier
+
+# æå®å­ã®æ¬å¼§ (in, out ãªã©ã®ã­ã¼ã¯ã¼ãåãæ¿ãã®ããåé¢)
+spec_L
+        : '['  { set_in_specifier }
+spec_R
+        : ']'  { unset_in_specifier }
+
+# location information
+location_information
+        :  __LOCATION_INFORMATION__ '{'  cell_location_join_location_list '}'
+
+cell_location_join_location_list
+        : cell_location_join_location_list cell_location
+        | cell_location_join_location_list join_location
+        |
+
+cell_location
+        : __CELL__ namespace_identifier '(' constant_expression ',' constant_expression ','  constant_expression ','  constant_expression ')' '{' port_location_list '}'
+		{
+			TECSGEN::Cell_location.new( val[1], val[3], val[5], val[7], val[9], val[12] )
+		}
+
+port_location_list
+        : port_location_list port_location
+		{
+			result = val[0] << val[1]
+		}
+        |
+		{ result = [] }
+
+port_location
+        : IDENTIFIER '(' IDENTIFIER ',' constant_expression ')'
+		{ result = [ val[0], val[2], val[3] ] }
+
+join_location    # mikan port array
+        : __JOIN__ '(' namespace_identifier '.' IDENTIFIER '=>' namespace_identifier '.' IDENTIFIER ')'  '{' bar_list '}'
+		{
+            TECSGEN::Join_location.new( val[2], val[4], val[6], val[8], val[11] )
+		}
+
+bar_list
+        : bar_list IDENTIFIER '(' constant_expression ')'
+          {
+            result = val[0] << [ val[1], val[3] ]
+          }
+        | { result = [] }
+
+
+end
+
+---- inner
+
+  RESERVED = {
+    # keyword
+    'namespace' => :NAMESPACE,
+    'signature' => :SIGNATURE,
+    'celltype' => :CELLTYPE,
+    'cell' => :CELL,
+    'attr' => :ATTRIBUTE,
+    'var' => :VAR,
+    'call' => :CALL,
+    'entry' => :ENTRY,
+    'composite' => :COMPOSITE,
+    'require' => :REQUIRE,
+    'factory' => :FACTORY,
+    'FACTORY' => :CTFACTORY,
+    'typedef' => :TYPEDEF,
+    'struct' => :STRUCT,
+    'region' => :REGION,
+    'import' => :IMPORT,
+    'import_C' => :IMPORT_C,
+    'generate' => :GENERATE,
+
+    # types
+    'void'    => :VOID,
+
+    'volatile'=> :VOLATILE,
+    'const'   => :CONST,
+
+    'signed'  => :SIGNED,
+    'unsigned'=> :UNSIGNED,
+
+    'int8_t'    => :INT8_T,
+    'int16_t'   => :INT16_T,
+    'int32_t'   => :INT32_T,
+    'int64_t'   => :INT64_T,
+    'int128_t'  => :INT128_T,
+    'uint8_t'   => :UINT8_T,
+    'uint16_t'  => :UINT16_T,
+    'uint32_t'  => :UINT32_T,
+    'uint64_t'  => :UINT64_T,
+    'uint128_t' => :UINT128_T,
+
+    'float32_t'   => :FLOAT32_T,
+    'double64_t'  => :DOUBLE64_T,
+    'bool_t'      => :BOOL_T,
+    'char_t'  => :CHAR_T,
+    'schar_t'  => :SCHAR_T,
+    'uchar_t'  => :UCHAR_T,
+
+    # unrecommened types
+    'int'     => :INT,
+#   'intptr'  => :INTPTR,
+    'short'   => :SHORT,
+    'long'    => :LONG,
+
+    # obsolete types
+    'char'    => :CHAR,
+#    'int8'    => :INT8,
+#    'int16'   => :INT16,
+#    'int32'   => :INT32,
+#    'int64'   => :INT64,
+#    'int128'  => :INT128,
+#    'float'   => :FLOAT,
+#    'double'  => :DOUBLE,
+#    'bool'    => :BOOL,
+
+    'enum'    => :ENUM,
+    'enum8'   => :ENUM8,
+    'enum16'  => :ENUM16,
+    'enum32'  => :ENUM32,
+    'enum64'  => :ENUM64,
+
+    'true'    => :TRUE,
+    'false'   => :FALSE,
+
+    'C_EXP'   => :C_EXP,
+
+    'Descriptor'   => :DESCRIPTOR,
+
+    # location information for TECSCDE
+    '__location_information__' => :__LOCATION_INFORMATION__,
+    '__cell__' => :__CELL__,
+    '__join__' => :__JOIN__,
+  }
+
+  # æå®å­ '[]' å
+ã§ã®ã¿ä½¿ç¨ã§ããã­ã¼ã¯ã¼ã
+  RESERVED2 = {
+    # specifier
+    'id' => :ID,
+
+    # signature
+    'callback' => :CALLBACK,
+    'context' => :CONTEXT,
+    'deviate' => :DEVIATE,
+
+    # celltype
+    'singleton' => :SINGLETON,
+    'idx_is_id' => :IDX_IS_ID,
+    'active' => :ACTIVE,
+
+    # port (entry)
+    'inline' => :INLINE,
+    'ref_desc' => :REF_DESC,   # call ãå¯
+
+    # port (call)
+    'optional' => :OPTIONAL,
+    'dynamic' => :DYNAMIC,
+
+    # port (call), attribute
+    'omit' => :OMIT,
+
+    # attribute
+    'choice' => :CHOICE,
+
+    # cell
+    'allocator' => :ALLOCATOR,
+    'prototype' => :PROTOTYPE,
+    'restrict'  => :RESTRICT,
+
+    # FuncType
+    'oneway' => :ONEWAY,
+
+    # parameter (basic)
+    'in' => :IN,
+    'out' => :OUT,
+    'inout' => :INOUT,
+    'send' => :SEND,
+    'receive' => :RECEIVE,
+
+    # parameter 
+    'size_is' => :SIZE_IS,
+    'count_is' => :COUNT_IS,
+    'string' => :STRING,
+    'nullable' => :NULLABLE,
+
+    'through' => :THROUGH,
+    'in_through' => :IN_THROUGH,
+    'out_through' => :OUT_THROUGH,
+    'to_through' => :TO_THROUGH,
+
+    'node' => :NODE,
+    'linkunit' => :LINKUNIT ,
+    'domain' => :DOMAIN,
+    'class' => :CLASS,
+  }
+
+  # åå¸°çãªãã¼ãµã®ããã®ã¹ã¿ãã¯
+  @@generator_nest = -1
+  @@generator_stack = []
+  @@current_locale = []
+
+  # import_C ä¸­ã§ãã
+  @@import_C = false
+
+  # ãã¹ã¦ã®æ§æè§£æãå®äºãã
+  @@b_end_all_parse = false
+
+  def self.parse( file_name, plugin = nil, b_reuse = false )
+    # ãã¼ãµã¤ã³ã¹ã¿ã³ã¹ãçæ(å¥ãã¼ãµã§èª­ã¿è¾¼ã)
+    parser = Generator.new
+
+    # plugin ãã import ããã¦ããå ´åã® plugin è¨­å®
+    parser.set_plugin plugin
+
+    # reuse ãã©ã°ãè¨­å®
+    parser.set_reuse b_reuse
+
+    # cdl ããã¼ã¹
+    parser.parse( [file_name] )
+
+    # çµæåããã¼ãµã¹ã¿ãã¯ãæ»ã
+    parser.finalize
+  end
+
+  def finalize
+
+    # mikan Namespace.pop
+    Namespace.pop
+    Signature.pop
+    Celltype.pop
+    Cell.pop
+    CompositeCelltype.pop
+  end
+
+  def set_plugin( plugin )
+    @plugin = plugin
+  end
+
+  def self.get_plugin
+    if @@generator_stack[@@generator_nest] then
+      # tecsgen å¼æ°ã® cdl ã import ãããå ´åã¯ nil
+      return @@generator_stack[@@generator_nest].get_plugin
+    else
+      return nil
+    end
+  end
+
+  def get_plugin
+    @plugin
+  end
+
+  def set_reuse( b_reuse )
+    @b_reuse = b_reuse
+  end
+
+  def self.is_reuse?
+    if @@generator_stack[@@generator_nest] then
+      # tecsgen å¼æ°ã® cdl ã import ãããå ´åã¯ nil
+      return @@generator_stack[@@generator_nest].is_reuse?
+    else
+      return false
+    end
+  end
+
+  def is_reuse?
+    @b_reuse
+  end
+
+  def parse(files)
+
+    # mikan Namespace.push
+    Namespace.push
+    Signature.push
+    Celltype.push
+    Cell.push
+    CompositeCelltype.push
+
+    @@generator_nest += 1
+    @@generator_stack[@@generator_nest] = self
+    @in_specifier = false
+
+    begin
+
+      @q = []
+      b_in_comment = false
+      b_in_string = false
+
+      # euc ã®ã³ã¡ã³ãã utf8 ã¨ãã¦æ±ãã¨ãã³ã¡ã³ãã®çµãããèª¤ãåé¡ã®å¯¾ç­
+      TECS_LANG::set_kcode_binary
+
+      files.each {|file|
+        lineno = 1
+        begin
+          string = ""
+#2.0          IO.foreach(file) {|line|
+          TECSIO.foreach(file) {|line|
+            col = 1
+#            line.rstrip!         æ¹è¡å«ãæå­åãæ±ãããã«ãªã£ãã®ã§ãããã§ç©ºç½ãåãé¤ããªããªã£ã
+
+            until line.empty?
+
+              if b_in_comment
+                case line
+                  # ã³ã¡ã³ãçµäº
+                when /\A\*\//
+                  b_in_comment = false
+                when /\A./
+                  ;
+                when /\s+/     # line.rstrip! ãæ­¢ãããã \n ãªã©ã®ç©ºç½æå­ã¨ã¾ã£ã¡ããã«ã¼ã«ãå¿
+è¦ã«ãªã£ã
+                  ;
+                end
+              elsif b_in_string
+                if line =~ /\A(?:[^"\\]|\\.)*"/
+                  string = "#{string}#{$&}"
+                  @q <<  [:STRING_LITERAL, Token.new(string, file, lineno, col)]
+                  b_in_string = false
+                elsif line =~ /\A.*\\\n/     # æ¹è¡ \n ã¯ '.' ã«ãããããªã
+                  string += $&
+                elsif line =~ /\A.*\n/     # æ¹è¡ \n ã¯ '.' ã«ãããããªã
+                  string += line
+                  # ãã®ä½ç½®ã§ã¯ error ã¡ã½ããã¯ä½¿ããªã (token èª­åºãå)
+                  puts "error: #{file} line #{lineno}: string literal has newline without escape"
+                  @@n_error += 1
+                end
+              else
+                case line
+                # ç©ºç½ãããªãã­ã»ã¹ãã£ã¬ã¯ãã£ã
+                when /\A\s+/
+                  ;
+                # è­å¥å­
+                when /\A[a-zA-Z_]\w*/
+                  word = $&
+                  @q << [RESERVED[word] || :IDENTIFIER, Token.new(word.intern, file, lineno, col)]
+                # 16 é²æ°å®æ°
+                when /\A0x[0-9A-Fa-f]+/
+                  @q << [:HEX_CONSTANT, Token.new($&, file, lineno, col)]
+                # 8 é²æ°å®æ°
+                when /\A0[0-7]+/
+                  @q << [:OCTAL_CONSTANT, Token.new($&, file, lineno, col)]
+                # æµ®åå°æ°å®æ°
+                when /\A[0-9]+\.([0-9]*)?([Ee][+-]?[0-9]+)?/
+                  @q << [:FLOATING_CONSTANT, Token.new($&, file, lineno, col)]
+                # æ´æ°å®æ°
+                when /\A\d+/
+                  @q << [:INTEGER_CONSTANT, Token.new($&.to_i, file, lineno, col)]
+                # æå­å®æ°
+                when /\A'(?:[^'\\]|\\.)'/
+                  @q << [:CHARACTER_LITERAL, Token.new($&, file, lineno, col)]
+                # æå­å
+#                "#include  #include #include \"../systask/logtask.cfg\"       æå¾ã® " å¿ã)ã§ç¡éã«ã¼ã
+#                when /\A"(?:[^"\\]+|\\.)*"/
+                when /\A"(?:[^"\\]|\\.)*"/   # ããã¯ãã¾ãè¡ãããã 
+                  @q << [:STRING_LITERAL, Token.new($&, file, lineno, col)]
+                # æå­å (æ¹è¡ãã)
+                when /\A"(?:[^"\\]|\\.)*\\\n$/
+                  string = $&
+                  b_in_string = true
+                # æå­å (æ¹è¡ãã, escape ãªã)
+                when /\A("(?:[^"\\]|\e\.)*)\n$/
+                  string = $1 + "\\\n"
+                  b_in_string = true
+                  # ãã®ä½ç½®ã§ã¯ error ã¡ã½ããã¯ä½¿ããªã (token èª­åºãå) # mikan cdl_error ã§ã¯ãªã
+                  puts "error: #{file} line #{lineno}: string literal has newline without escape"
+                  @@n_error += 1
+                # å±±æ¬å¼§ã§å²ã¾ããæå­å
+                when /\A<[0-9A-Za-z_\. \/]+>/   # AB: angle bracke
+                  @q << [:AB_STRING_LITERAL, Token.new($&, file, lineno, col)]
+                # è¡ã³ã¡ã³ã
+                when /\A\/\/.*$/
+                  # èª­ã¿é£ã°ãã ã
+                # ã³ã¡ã³ãéå§
+                when /\A\/\*/
+                  b_in_comment = true
+                # '>>', '<<' ãªã©
+                when /\A>>/, /\A<</, /\A==/, /\A!=/, /\A\&\&/, /\A\|\|/
+                  @q << [$&, Token.new($&, file, lineno, col)]
+                when /\A::/, /\A=>/, /\A<=/, /\A>=/
+                  @q << [$&, Token.new($&, file, lineno, col)]
+                # '(', ')' ãªã©ä¸æå­ã®è¨å·ãã¾ãã¯æªç¥ã®è¨å·
+                when /\A./
+                  @q << [$&, Token.new($&, file, lineno, col)]
+                else
+                  raise
+                end
+              end
+
+              line = $'
+              col += $&.length
+            end
+
+            lineno += 1
+          }
+
+        rescue => evar
+          Generator.error( "G1014 while open or reading \'$1\'" , file )
+          if $debug then
+            p puts( evar )
+            pp $@
+          end
+        end
+      }
+
+      # çµäºã®å°
+      @q << nil
+
+      @yydebug = true
+      do_parse
+
+    ensure
+      @@generator_nest -= 1
+      TECS_LANG::reset_kcode
+    end
+
+  end
+
+  def next_token
+    token = @q.shift
+
+    if token then
+      @@current_locale[@@generator_nest] = token[1].locale
+
+      if token[0] == :IDENTIFIER then
+        # TYPE_NAME ãã¼ã¯ã³ã¸ç½®æã
+        if Namespace.is_typename?( token[1].val ) then
+          token[0] = :TYPE_NAME
+        elsif @in_specifier && RESERVED2[ token[1].val.to_s ] then
+          # æå®å­ã­ã¼ã¯ã¼ãï¼ '[', ']' å
+ã§ã®ã¿æå¹)
+          token[0] = RESERVED2[ token[1].val.to_s ]
+        end
+      end
+
+      if $debug then     # 070107 token ç¡å¹æãããéããªããããã (through å¯¾å¿ -d ã®æã«ä¾å¤çºç) 
+        locale = @@current_locale[@@generator_nest]
+        if token then
+          print( "#{locale[0]}: line #{locale[1]} : #{token[0]} '#{token[1].val}'\n" )
+        else
+          print( "#{locale[0]}: line #{locale[1]} : EOF\n" )
+        end
+      end
+    else
+      token = [ false, false ]
+    end
+
+    token
+  end
+
+  def on_error(t, v, vstack)
+    # p t, token_to_str(t), vstack
+    if token_to_str(t) == "$end" then
+      Generator.error( "G1015 Unexpected EOF"  )
+    else
+      Generator.error( "G1016 syntax error near \'$1\'" , v.val )
+    end
+  end
+
+  def self.current_locale
+    @@current_locale[ @@generator_nest ]
+  end
+
+  @@n_error = 0
+  @@n_warning = 0
+
+  # ãã®ã¡ã½ããã¯æ§æè§£æãæå³è§£æããã®ã¿å¼åºãå¯ï¼ã³ã¼ãçæã§ã¨ã©ã¼çºçã¯ä¸é©åï¼
+  def self.error( msg, *arg )
+    locale = nil
+    self.error2( locale, msg, *arg )
+  end
+
+  def self.error2( locale, msg, *arg )
+    @@n_error += 1
+
+    msg = TECSMsg.get_error_message( msg )
+    # $1, $2, ... ã arg ã§ç½®æ
+    count = 1
+    arg.each{ |a|
+      str = TECSIO.str_code_convert( msg, a.to_s )
+      msg.sub!( /\$#{count}/, str )
+      count += 1
+    }
+
+    # import_C ã®ä¸­ã§ã®ã¨ã©ã¼ï¼
+    if @@import_C then
+      C_parser.error( msg )
+    else
+
+      # Node ã®è¨æ¶ãã ä½ç½® (locale) ãä½¿ç¨ããå ´åãå¤æ´ä»¥åã«æ¯ã¹ã
+      # åé¡çºçç®æã¨ç°ãªãä½ç½®ã«ã¨ã©ã¼ãåºããããæ§æè§£æä¸­ã®ã¨ã©ã¼
+      # ã¯ãè§£æä¸­ã®ä½ç½®ãåºåããï¼(new_XXX ã§ owner ãå­è¦ç´ ã®ãã§ã
+      # ã¯ãããã¨ owner ã®è¡çªå·ãåºã¦ãã¾ãç¹ã§ããããçãã¦ãã)
+
+      if @@b_end_all_parse == false || locale == nil then
+        locale = @@current_locale[ @@generator_nest ]
+      end
+      if locale then
+        Console.puts "error: #{locale[0]}: line #{locale[1]} #{msg}"
+      else
+        Console.puts "error: #{msg}"
+      end
+    end
+  end
+
+  # ãã®ã¡ã½ããã¯æ§æè§£æãæå³è§£æããã®ã¿å¼åºãå¯ï¼ã³ã¼ãçæã§ã¦ã©ã¼ãã³ã°çºçã¯ä¸é©åï¼
+  def self.warning( msg, *arg )
+    locale = nil
+    self.warning2( locale, msg, *arg )
+  end
+
+  def self.warning2( locale, msg, *arg )
+    @@n_warning += 1
+
+    msg = TECSMsg.get_warning_message( msg )
+    # $1, $2, ... ã arg ã§ç½®æ
+    count = 1
+    arg.each{ |a|
+      str = TECSIO.str_code_convert( msg, a.to_s )
+      msg.sub!( /\$#{count}/, str )
+      count += 1
+    }
+
+    # import_C ã®ä¸­ã§ã®ã¦ã©ã¼ãã³ã°ï¼
+    if @@import_C then
+      C_parser.warning( msg )
+    else
+      if @@b_end_all_parse == false || locale == nil then
+        locale = @@current_locale[ @@generator_nest ]
+      end
+      if locale then
+        Console.puts "warning: #{locale[0]}: line #{locale[1]} #{msg}"
+      else
+        Console.puts "warning: #{msg}"
+      end
+    end
+  end
+
+  def self.get_n_error
+    @@n_error
+  end
+
+  def self.get_n_warning
+    @@n_warning
+  end
+
+  def self.get_nest
+    @@generator_nest
+  end
+
+  #===  '[' specifier å§ã
+  def set_in_specifier
+    # p "set_in_specifier"
+    @in_specifier = true
+  end
+
+  #=== ']' specifier çµãã
+  def unset_in_specifier
+    # p "unset_in_specifier"
+    @in_specifier = false
+  end
+
+  # statement_specifier ã¯æ§æè§£ééä¸­ã§åç
+§ããããã
+  @@statement_specifier_stack = []
+  def self.add_statement_specifier( ss )
+    if( @@statement_specifier_stack[ @@generator_nest ] == nil )then
+      @@statement_specifier_stack[ @@generator_nest ] = [ ss ]
+    else
+      @@statement_specifier_stack[ @@generator_nest ] << ss
+    end
+  end
+
+
+  def self.get_statement_specifier
+    spec_list = @@statement_specifier_stack[ @@generator_nest ]
+    @@statement_specifier_stack[ @@generator_nest ] = nil
+    return spec_list
+  end
+
+  #=== ãã¹ã¦ã®æ§æè§£æãå®äºãããã¨ãå ±å
+  def self.end_all_parse
+    @@b_end_all_parse = true
+  end
+
+---- footer
+
+
+# ãã¡ã¤ã« => INCLUDE("header")ã®é
+å
+Include = Hash.new {|hash, key| hash[key] = []}
+
+
+class Token
+
+  attr_accessor :val, :file, :lineno, :col
+
+  def initialize(val, file, lineno, col)
+    @val = val
+    @file = file
+    @lineno = lineno
+    @col = col
+
+  end
+
+  def to_s
+    @val.to_s
+  end
+
+  def to_sym
+    @val.to_sym
+  end
+
+  def get_name
+    @val
+  end
+
+  def locale
+    [@file, @lineno, @col]
+  end
+
+  def eql?(other)
+    if other.is_a? Symbol
+      @val == other
+    elsif other.is_a? Token
+      @val == other.val
+    elsif other.is_a? String
+      @val.to_s == other
+    else
+      raise ArgumentError
+    end
+  end
+
+  alias == eql?
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    print "#{@val}\n"
+  end
+
+end
+
+#= TECSIO
+#  Ruby2.0(1.9) å¯¾å¿ã«ä¼´ãå°å
+¥ããã¯ã©ã¹
+#  SJIS ä»¥å¤ã§ã¯ãASCII-8BIT ã¨ãã¦å
+¥åãã
+class TECSIO
+  def self.foreach(file) # ãã­ãã¯å¼æ° { |line| }
+    pr = Proc.new   # ãã®ã¡ã½ããã®ãã­ãã¯å¼æ°ã pr ã«ä»£å
+¥
+    if $b_no_kcode then
+	  msg = "E".encode $Ruby19_File_Encode
+      if( $Ruby19_File_Encode == "Shift_JIS" )
+
+        # Shift JIS ã¯ããã£ãã Windows-31J ã¨ãã¦èª­ã¿è¾¼ã¾ããShift_JIS ã«å¤æãããï¼
+        # ã³ã¡ã³ãç­ã«å«ã¾ãã SJIS ã«ä¸é©åãªæå­ã³ã¼ãã¯ '?' ã¾ãã¯ REPLACEMENT CHARACTER ã«å¤æãããï¼
+        # EUC ã UTF-8 ã§è¨è¿°ããã CDL ãæ··å¨ãã¦ãã¦ããRuby ä¾å¤ãçºçãããã¨ãªãå¦çãé²ãããã¨ãã§ããï¼
+        # æå­ã³ã¼ãæå®ã SJIS ã§ãã£ã¦ãæå­åãªãã©ã«ã®ä¸­ã«ãæå­ã³ã¼ããSJIS ä»¥å¤ã®é ASCII ãå«ã¾ãã¦ããå ´åã
+        # Ruby 1.8 ã® tecsgen ã§ã¯æå­ã³ã¼ãæå®ã«å½±é¿ãªãå¦çããããã®ããRuby 1.9 ä»¥éã§ã¯ '?' ã«ç½®ãæããå¯è½æ§ãããï¼
+
+        mode = "r:Windows-31J"
+      else
+        mode = "r:#{$Ruby19_File_Encode}"
+      end
+      # mode = "r"
+    else
+	  msg = "E"
+      mode = "r"
+    end
+
+    f = File.open( file, mode )
+    begin
+      f.each{ |line|
+        # dbgPrint line
+        line = str_code_convert( msg, line )
+        pr.call( line )
+      }
+    ensure
+      f.close
+    end
+  end
+
+  #=== æå­ã³ã¼ããç¸éããå ´åä¸è´ããã
+  # msg ã¨ str ã®æå­ã³ã¼ããç¸éããå ´åãstr ã msg ã®æå­ã³ã¼ãã«å¤æãã
+  # å¤æä¸å¯ã®æå­ã³ã¼ãã¯ '?' (utf-8 ã®å ´å U+FFFD (REPLACEMENT CHARACTER )) ã«å¤æ
+  #
+  # ãã®ã¡ã½ããã¯ãã¨ã©ã¼ã¡ãã»ã¼ã¸åºåã§ãä½¿ç¨ããã¦ãããã¨ã«æ³¨æï¼
+  #
+  #msg_enc::Encode | String
+  def self.str_code_convert( msg, str )
+    if $b_no_kcode == false then
+      return str                          # Ruby V1.8 ã¾ã§
+    end
+    if msg.encoding != str.encoding then
+      option = { :invalid => :replace, :undef => :replace }   # ä¾å¤ãçºçãããã'?' ã«å¤æãã(utf-8 ã¯ 0xfffd)
+      # return str.encode( msg.encoding, option )
+      str = str.encode( "utf-8", option )
+      return str.encode( msg.encoding, option )
+    else
+      return str
+    end
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/componentobj.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/componentobj.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/componentobj.rb	(revision 270)
@@ -0,0 +1,7745 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2016 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: componentobj.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+# STAGE:
+# ãã®ã¡ã³ããã³ã¹ç¶æ³ã¯ãããããªã
+#  B    bnf.y.rb ããå¼åºããã
+#  P    parse æ®µéã§å¼åºãããï¼bnf.y.rb ããç´æ¥å¼åºãããããã§ã¯ãªãããæ§ææ¨çæãè¡ãï¼
+#  S    P ã®ä¸­ããå¼åºãããããæ§ææ¨çæããããã§ã¯ãªãæå³ãã§ãã¯ãã
+#  G    ã³ã¼ãçæï¼ãã®æ®µéã§ãæ§ææ¨ã¯å®å
+¨ã§ããï¼ä¸å®å
+¨ãªãã¨ã©ã¼ã§æã¡ãããã¦ããï¼
+#                                                   factory ã®ç¬¬ä¸å¼æ° "format" ã®å¾ãã®å¼æ°
+
+# mikan ä»¥ä¸ã¯ ruby ã® mix in ã§å®ç¾ã§ãããããããªã
+# Nestable ãç¶æ¿ããå ´åãã¯ã©ã¹å¤æ°ã¯ Nestable ã®ãã®ãå
+±æãããï¼å¥ã«ãããã£ãï¼
+# class Nestable
+#   @@nest_stack_index = -1
+#   @@nest_stack = []
+#   @@current_object = nil
+# 
+#   def self.push
+#     @@nest_stack_index += 1
+#     @@nest_stack[ @nest_stack_index ] = @@current_object
+#     @@current_object = nil
+#   end
+# 
+#   def pop
+#     @@current_object = @@nest_stack[ @@nest_stack_index ]
+#     @nest_stack_index -= 1
+#     if @@nest_stack_index < -1 then
+#       raise TooManyRestore
+#     end
+#   end
+# end
+#
+
+class Signature < NSBDNode  # < Nestable
+#  @name:: Symbol
+#  @global_name:: Symbol
+#  @function_head_list:: NamedList : FuncHead ã®ã¤ã³ã¹ã¿ã³ã¹ãè¦ç´ 
+#  @func_name_to_id::  {String}  :  é¢æ°åãæ·»å­ã¨ããé
+åã§ id ãè¨æ¶ããï¼id ã¯ signature ã®åºç¾é çª (1ããå§ã¾ã)
+#  @context:: string : ã³ã³ãã­ã¹ãå
+#  @b_callback:: bool: callback : ã³ã¼ã«ããã¯ç¨ã®ã·ã°ããã£
+#  @b_deviate:: bool: deviate : é¸è±ï¼pointer level mismatch ãåºããªãï¼
+#  @b_checked_as_allocator_signature:: bool:  ã¢ã­ã±ã¼ã¿ã·ã°ããã£ã¨ãã¦ãã§ãã¯æ¸ã¿
+#  @b_empty:: Bool: ç©º(é¢æ°ãä¸ã¤ããªãç¶æ
+)
+
+  @@nest_stack_index = -1
+  @@nest_stack = []
+  @@current_object = nil
+
+  def self.push
+    @@nest_stack_index += 1
+    @@nest_stack[ @@nest_stack_index ] = @@current_object
+    @@current_object = nil
+  end
+
+  def self.pop
+    @@current_object = @@nest_stack[ @@nest_stack_index ]
+    @@nest_stack_index -= 1
+    if @@nest_stack_index < -1 then
+      raise "TooManyRestore"
+    end
+  end
+
+  # STAGE: P
+  # ãã®ã¡ã½ããã¯ parse ä¸­ã®ã¿å¼ã³åºããã
+  def self.get_current
+    @@current_object
+  end
+
+  #
+  # STAGE: B
+  def initialize( name )
+    super()
+    @name = name
+    Namespace.new_signature( self )
+    set_namespace_path # @NamespacePath ã®è¨­å®
+    if "#{Namespace.get_global_name}" == "" then
+      @global_name = @name
+    else
+      @global_name = :"#{Namespace.get_global_name}_#{@name}"
+    end
+
+    @func_name_to_id = {}
+    @context = nil
+    @b_callback = false
+    @b_deviate = false
+    @b_empty = false
+    @b_checked_as_allocator_signature = false
+    @@current_object = self
+    set_specifier_list( Generator.get_statement_specifier )
+  end
+
+  #
+  # STAGE: B
+  def end_of_parse( function_head_list )
+    @function_head_list = function_head_list
+
+    # id ãå²ä»ãã
+    id = 1
+    function_head_list.get_items.each{ |f|
+      @func_name_to_id[ f.get_name ] = id
+      id += 1
+    }
+    if id == 1 then
+      @b_empty = true
+    end
+
+    @@current_object = nil
+    return self
+  end
+
+  #=== Signature# signature ã®æå®å­ãè¨­å®
+  # STAGE: B
+  #spec_list::      [ [ :CONTEXT,  String ], ... ]
+  #                     s[0]        s[1]
+  def set_specifier_list( spec_list )
+    return if spec_list == nil  # ç©ºãªãã°ä½ãããªã
+
+    spec_list.each { |s|
+      case s[0]     # statement_specifier
+      when :CALLBACK
+        @b_callback = true
+      when :CONTEXT         # [context("non-task")] etc
+        if @context then
+          cdl_error( "S1001 context specifier duplicate"  )
+        end
+        # @context = s[1].gsub( /\A\"(.*)\"$/, "\\1" )
+        @context = CDLString.remove_dquote s[1]
+        case @context
+        when "non-task", "task", "any"
+        else
+          cdl_warning( "W1001 \'$1\': unknown context type. usually specifiy task, non-task or any" , @context )
+        end
+      when :DEVIATE
+        @b_deviate = true
+      else
+        cdl_error( "S1002 \'$1\': unknown specifier for signature" , s[0] )
+      end
+    }
+  end
+
+  def get_name
+    @name
+  end
+
+  def get_global_name
+    @global_name
+  end
+
+  def get_function_head_array
+    if @function_head_list then
+      return @function_head_list.get_items
+    else
+      return nil
+    end
+  end
+
+  def get_function_head( func_name )
+    return @function_head_list.get_item( func_name.to_sym )
+  end
+
+  #=== Signature# é¢æ°åãã signature å
+ã® id ãå¾ã
+  def get_id_from_func_name func_name
+    @func_name_to_id[ func_name ]
+  end
+
+  #=== Signature# context ãå¾ã
+  # context æå­åãè¿ã "task", "non-task", "any"
+  # æªæå®æã®ããã©ã«ãã¨ãã¦ task ãè¿ã
+  def get_context
+    if @context then
+      return @context
+    else
+      return "task"
+    end
+  end
+
+  #=== Signature# signaure ã®ãã¹ã¦ã®é¢æ°ã®ãã¹ã¦ã®ãã©ã¡ã¼ã¿ããã©ã
+  #block:: ãã­ãã¯ãå¼æ°ã«åã
+  # ãã­ãã¯ã¯2ã¤ã®å¼æ°ãåãåã  Decl, ParamDecl     ( Decl: é¢æ°ããã )
+  # Port ã¯ã©ã¹ã«ã each_param ãããï¼åãåãï¼
+  def each_param # ãã­ãã¯å¼æ° { |func_decl, param_decl| }
+    fha = get_function_head_array                       # å¼ã³å£ã¾ãã¯åãå£ã®ã·ã°ããã£ã®é¢æ°é
+å
+    return if fha == nil                                # nil ãªãææ³ã¨ã©ã¼ã§æå¹å¤ãè¨­å®ãããªãã£ã
+
+    pr = Proc.new   # ãã®ã¡ã½ããã®ãã­ãã¯å¼æ°ã pr ã«ä»£å
+¥
+    fha.each{ |fh|  # fh: FuncHead                      # é¢æ°é
+åä¸­ã®åé¢æ°é ­é¨
+      fd = fh.get_declarator                            # fd: Decl  (é¢æ°é ­é¨ããDeclarotorãå¾ã)
+      if fd.is_function? then                           # fd ãé¢æ°ã§ãªããã°ããã§ã«ã¨ã©ã¼
+        fd.get_type.get_paramlist.get_items.each{ |par| # ãã¹ã¦ã®ãã©ã¡ã¼ã¿ã«ã¤ãã¦
+          pr.call( fd, par )
+        }
+      end
+    }
+  end
+
+  #=== Signature# æ­£å½ãªã¢ã­ã±ã¼ã¿ ã·ã°ããã£ããã¹ããã
+  # alloc, dealloc é¢æ°ãæã¤ãã©ãããç¬¬ä¸å¼ãæ°ããããããæ´æ°ããã¤ã³ã¿ãç¬¬äºå¼ãæ°ãããã¤ã³ã¿ã¸ã®ãã¤ã³ã¿ããªã
+  def is_allocator?
+
+    # ä¸åã ããã§ãã¯ãã
+    if @b_checked_as_allocator_signature == true then
+      return true
+    end
+    @b_checked_as_allocator_signature = true
+
+    fha = get_function_head_array                       # å¼ã³å£ã¾ãã¯åãå£ã®ã·ã°ããã£ã®é¢æ°é
+å
+    if fha == nil then                                  # nil ãªãææ³ã¨ã©ã¼ã§æå¹å¤ãè¨­å®ãããªãã£ã
+      return false
+    end
+
+    found_alloc = false; found_dealloc = false
+    fha.each{ |fh|  # fh: FuncHead                      # é¢æ°é
+åä¸­ã®åé¢æ°é ­é¨
+      fd = fh.get_declarator                            # fd: Decl  (é¢æ°é ­é¨ããDeclarotorãå¾ã)
+      if fd.is_function? then                           # fd ãé¢æ°ã§ãªããã°ããã§ã«ã¨ã©ã¼
+        func_name = fd.get_name.to_sym 
+        if func_name == :alloc then
+          found_alloc = true
+          params = fd.get_type.get_paramlist.get_items
+          if params then
+            if ! params[0].instance_of?( ParamDecl ) ||
+                ! params[0].get_type.get_original_type.kind_of?( IntType ) ||
+                params[0].get_direction != :IN then
+              # ç¬¬ä¸å¼æ°ã int åã§ãªã
+              if ! params[0].instance_of?( ParamDecl ) ||
+                  ! params[0].get_type.kind_of?( PtrType ) ||
+                  ! params[0].get_type.get_type.kind_of?( PtrType ) ||
+                  params[0].get_type.get_type.get_type.kind_of?( PtrType ) ||
+                  params[0].get_direction != :OUT then
+                # ç¬¬ä¸å¼æ°ããã¤ã³ã¿åã§ããªã
+                cdl_error3( @locale, "S1003 $1: \'alloc\' 1st parameter neither [in] integer type nor [out] double pointer type", @name )
+              end
+            elsif ! params[1].instance_of?( ParamDecl ) ||
+                ! params[1].get_type.kind_of?( PtrType ) ||
+                ! params[1].get_type.get_type.kind_of?( PtrType ) ||
+                params[1].get_type.get_type.get_type.kind_of?( PtrType ) ||
+                params[0].get_direction != :IN then
+              # (ç¬¬ä¸å¼æ°ãæ´æ°ã§) ç¬¬äºå¼æ°ããã¤ã³ã¿ã§ãªã
+              cdl_error3( @locale, "S1004 $1: \'alloc\' 2nd parameter not [in] double pointer" , @name )
+            end
+          else
+            cdl_error3( @locale, "S1005 $1: \'alloc\' has no parameter, unsuitable for allocator signature" , @name )
+          end
+        elsif func_name == :dealloc then
+          found_dealloc = true
+          params = fd.get_type.get_paramlist.get_items
+          if params then
+            if ! params[0].instance_of?( ParamDecl ) ||
+                ! params[0].get_type.kind_of?( PtrType ) ||
+                params[0].get_type.get_type.kind_of?( PtrType ) ||
+                params[0].get_direction != :IN then
+              cdl_error3( @locale, "S1006 $1: \'dealloc\' 1st parameter not [in] pointer type" , @name )
+#            elsif params[1] != nil then    # ç¬¬äºå¼ãæ°ã¯ãã§ãã¯ããªã
+#              cdl_error3( @locale, "S1007 Error message is changed to empty" )
+#                 cdl_error3( @locale, "S1007 $1: \'dealloc\' cannot has 2nd parameter" , @name )
+            end
+          else
+            cdl_error3( @locale, "S1008 $1: \'dealloc\' has no parameter, unsuitable for allocator signature" , @name )
+          end
+        end
+        if found_alloc && found_dealloc then
+          return true
+        end
+      end
+    }
+    if ! found_alloc then
+      cdl_error3( @locale, "S1009 $1: \'alloc\' function not found, unsuitable for allocator signature" , @name )
+    end
+    if ! found_dealloc then
+      cdl_error3( @locale, "S1010 $1: \'dealloc\' function not found, unsuitable for allocator signature" , @name )
+    end
+    return false
+  end
+
+  #== Signature# å¼æ°ã§åç
+§ããã¦ãã Descriptor åã®ãªã¹ããä½æãã
+  #RETURN:: Hash { Signature => ParamDecl }:  è¤æ°ã® ParamDecl ããåç
+§ããã¦ããå ´åãæå¾ã®ãã®ããè¿ããªã
+  def get_descriptor_list
+    desc_list = { }
+    # p "has_desc #{@name}"
+    fha = get_function_head_array                       # å¼ã³å£ã¾ãã¯åãå£ã®ã·ã°ããã£ã®é¢æ°é
+å
+    if fha == nil then                                  # nil ã®å ´åãèªå·±åç
+§ã«ããã±ã¼ã¹ã¨ä»®å®
+      return desc_list
+    end
+    fha.each{ |fh|
+      fd = fh.get_declarator                            # fd: Decl  (é¢æ°é ­é¨ããDeclarotorãå¾ã)
+      if fd.is_function? then                           # fd ãé¢æ°ã§ãªããã°ããã§ã«ã¨ã©ã¼
+        params = fd.get_type.get_paramlist.get_items
+        if params then
+          params.each{ |param|
+            t = param.get_type.get_original_type
+            while( t.kind_of? PtrType )
+              t = t.get_referto
+            end
+            # p "has_desc #{param.get_name} #{t}"
+            if t.kind_of? DescriptorType then
+              desc_list[t] = param
+            end
+          }
+        end
+      end
+    }
+    return desc_list
+  end
+
+  #=== Signature# å¼æ°ã« Descriptor ããããï¼
+  def has_descriptor?
+    # p "has_desc #{@name}"
+    fha = get_function_head_array                       # å¼ã³å£ã¾ãã¯åãå£ã®ã·ã°ããã£ã®é¢æ°é
+å
+    if fha == nil then                                  # nil ã®å ´åãèªå·±åç
+§ã«ããã±ã¼ã¹ã¨ä»®å®
+      return true
+    end
+    fha.each{ |fh|
+      fd = fh.get_declarator                            # fd: Decl  (é¢æ°é ­é¨ããDeclarotorãå¾ã)
+      if fd.is_function? then                           # fd ãé¢æ°ã§ãªããã°ããã§ã«ã¨ã©ã¼
+        params = fd.get_type.get_paramlist.get_items
+        if params then
+          params.each{ |param|
+            t = param.get_type.get_original_type
+            while( t.kind_of? PtrType )
+              t = t.get_referto
+            end
+            # p "has_desc #{param.get_name} #{t}"
+            if t.kind_of? DescriptorType then
+              return true
+            end
+          }
+        end
+      end
+    }
+    return false
+  end
+
+  #=== Signature# ã³ã¼ã«ããã¯ãï¼
+  # æå®å­ callback ãæå®ããã¦ããã° true 
+  def is_callback?
+    @b_callback
+  end
+
+  #=== Signature# é¸è±ãï¼
+  # æå®å­ deviate ãæå®ããã¦ããã° true 
+  def is_deviate?
+    @b_deviate
+  end
+
+  #=== Signature# ç©ºãï¼
+  def is_empty?
+    @b_empty
+  end
+
+  #=== Signature# Push Pop Allocator ãå¿
+è¦ãï¼
+  # Transparent RPC ã®å ´å oneway ãã¤ in ã®é
+å(size_is, count_is, string ã®ããããã§ä¿®é£¾ï¼ããã
+  def need_PPAllocator?( b_opaque = false )
+    fha = get_function_head_array                       # å¼ã³å£ã¾ãã¯åãå£ã®ã·ã°ããã£ã®é¢æ°é
+å
+    fha.each{ |fh|
+      fd = fh.get_declarator
+      if fd.get_type.need_PPAllocator?( b_opaque ) then
+        # p "#{fd.get_name} need_PPAllocator: true"
+        @b_need_PPAllocator = true
+        return true
+      end
+      # p "#{fd.get_name} need_PPAllocator: false"
+    }
+    return false
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "Signature: name: #{@name} context: #{@context} deviate : #{@b_deviate} PPAllocator: #{@b_PPAllocator} #{self}"
+    (indent+1).times { print "  " }
+    puts "namespace_path: #{@NamespacePath}"
+    (indent+1).times { print "  " }
+    puts "function head list:"
+    @function_head_list.show_tree( indent + 2 )
+  end
+
+end
+
+class Celltype < NSBDNode # < Nestable
+# @name:: Symbol
+# @global_name:: Symbol
+# @name_list:: NamedList item: Decl (attribute, var), Port
+# @port:: Port[]
+# @attribute:: Decl[]
+# @var:: Decl[]
+# @require:: [[cp_name,Celltype|Cell,Port],...]
+# @factory_list::   Factory[]
+# @ct_factory_list::    Factory[] :    celltype factory
+# @cell_list:: Cell[] : å®ç¾©ã®ã¿ (V1.0.0.2 ä»¥é)
+# @singleton:: bool
+# @idx_is_id:: bool
+# @idx_is_id_act:: bool: actual value
+# @active:: bool
+# @b_reuse:: bool :  reuse æå®ããã¦ import ããã(template ä¸è¦)
+# @generate:: [ Symbol, String, Plugin ]  = [ PluginName, option, Plugin ] Plugin ã¯çæå¾ã«è¿½å ããã
+#
+# @n_attribute_ro:: int >= 0    none specified
+# @n_attribute_rw:: int >= 0    # of [rw] specified attributes (obsolete)
+# @n_attribute_omit : int >= 0  # of [omit] specified attributes
+# @n_var:: int >= 0
+# @n_var_size_is:: int >= 0     # of [size_is] specified vars # mikan count_is
+# @n_var_omit:: int >= 0        # of [omit] specified vars # mikan var ã® omit ã¯æï¼
+# @n_var_init:: int >= 0        # of vars with initializer
+# @n_call_port:: int >= 0
+# @n_call_port_array:: int >= 0
+# @n_call_port_omitted_in_CB:: int >= 0   æé©åã§çç¥ãããå¼ã³å£
+# @n_entry_port:: int >= 0
+# @n_entry_port_array:: int >= 0
+# @n_entry_port_inline:: int >= 0
+# @n_cell_gen:: int >= 0  çæããã»ã«ã®æ°ï¼ã³ã¼ãçæã®é ­ã§ç®åºããï¼æå³è§£ææ®µéã§ã¯åç
+§ä¸å¯
+# @id_base:: Integer : cell ã® ID ã®æå°å¤(æå¤§å¤ã¯ @id_base + @n_cell)
+#
+# @b_cp_optimized:: bool : å¼ã³å£æé©åå®æ½
+# @plugin:: PluginObject      ãã®ã»ã«ã¿ã¤ãããã©ã°ã¤ã³ã«ããçæããã CDL ããçæãããå ´åã«æå¹ã
+#                              generate ã®æå®ã¯ @generate ã«ãã©ã°ã¤ã³ãä¿æããã
+#
+# @included_header:: Hash :  include ãããããããã¡ã¤ã«
+# @domain_roots::Hash { DomainTypeName(Symbol) => [ Region ] }  ãã¡ã¤ã³ã¿ã¤ãåã¨ Region ã®é
+å (optimize.rb ã§è¨­å®)
+#                                               ã«ã¼ããªã¼ã¸ã§ã³ã¯ãã¡ã¤ã³åããnil
+
+  include PluginModule
+
+  @@nest_stack_index = -1
+  @@nest_stack = []
+  @@current_object = nil
+  @@celltype_list = []
+
+  def self.push
+    @@nest_stack_index += 1
+    @@nest_stack[ @@nest_stack_index ] = @@current_object
+    @@current_object = nil
+  end
+
+  def self.pop
+    @@current_object = @@nest_stack[ @@nest_stack_index ]
+    @@nest_stack_index -= 1
+    if @@nest_stack_index < -1 then
+      raise "TooManyRestore"
+    end
+  end
+
+  def initialize( name )
+    super()
+    @@current_object = self
+    @name = name
+    if "#{Namespace.get_global_name}" != "" then
+      @global_name = :"#{Namespace.get_global_name}_#{@name}"
+    else
+      @global_name = name
+    end
+
+    @name_list = NamedList.new( nil, "symbol in celltype #{name}" )
+    @port = []
+    @attribute = []
+    @var = []
+    @require = []
+    @factory_list = []
+    @ct_factory_list = []
+    @cell_list = []
+    @singleton = false
+    @active = false
+    @generate = nil
+
+    @n_attribute_ro = 0
+    @n_attribute_rw = 0
+    @n_attribute_omit = 0
+    @n_var = 0
+    @n_var_omit = 0
+    @n_var_size_is = 0
+    @n_var_init = 0
+    @n_call_port = 0
+    @n_call_port_array = 0
+    @n_call_port_omitted_in_CB = 0
+    @n_entry_port = 0
+    @n_entry_port_array = 0
+    @n_entry_port_array_ns = 0
+    @n_entry_port_inline = 0
+    @n_cell_gen = 0
+
+    @b_cp_optimized = false
+
+    @plugin = Generator.get_plugin
+      # plugin ã®å ´å PluginObject ãè¿ããã
+    # å
+ã® Generator ããå¼åºããã Generator ã®ä¸­ã§ãã¼ã¹ããã³æå³ãã§ãã¯ããã¦ãã
+
+    # if @plugin then
+    #  # plugin çæãããã»ã«ã¿ã¤ãã¯åå©ç¨ã§ã¯ãªã   #833 ä¸å
+·åä¿®æ­£
+    #  @b_reuse = false
+    # else
+      @b_reuse = Generator.is_reuse?
+    # end
+
+    if $idx_is_id then
+      @idx_is_id = true
+    else
+      @idx_is_id = false
+    end
+    @idx_is_id_act = @idx_is_id
+
+    Namespace.new_celltype( self )
+    set_namespace_path # @NamespacePath ã®è¨­å®
+    set_specifier_list( Generator.get_statement_specifier )
+
+    if @singleton then
+      @idx_is_id_act = false
+    end
+
+    @included_header = {}
+    @domain_roots = {}
+    @@celltype_list << self
+  end
+
+  def get_name
+    @name
+  end
+
+  #== Celltype#ãã¡ã¤ã³ã«ã¼ããè¿ã
+  # @domain_roots ã®èª¬æãåç
+§
+  def get_domain_roots
+    @domain_roots
+  end
+
+  # Celltype# end_of_parse
+  def end_of_parse
+    # å±æ§ã»å¤æ°ã®ãã§ãã¯
+    check_attribute
+
+    # ã¢ã­ã±ã¼ã¿å¼ã³å£ãå
+é¨çæ
+    generate_allocator_port
+
+    # ãªã¬ã¼ã¢ã­ã±ã¼ã¿ãå
+é¨ã¢ã­ã±ã¼ã¿ã®è¨­å®
+    @port.each { |p|
+      p.set_allocator_instance
+    }
+
+    if @n_entry_port == 0 && @active == false && @factory_list.length == 0 &&
+        ( @singleton && @ct_factory_list.length == 0 || ! @singleton )then
+      cdl_warning( "W1002 $1: non-active celltype has no entry port & factory" , @name )
+    end
+
+    if @generate then
+      celltype_plugin
+    end
+
+    @@current_object = nil
+  end
+
+  def self.new_port( port )
+    @@current_object.new_port( port )
+  end
+
+  def new_port( port )
+    port.set_owner self
+    @port << port
+    @name_list.add_item( port )
+    if port.get_port_type == :CALL then
+      @n_call_port += 1
+      @n_call_port_array += 1 if port.get_array_size != nil
+    else
+      @n_entry_port += 1
+      @n_entry_port_array += 1 if port.get_array_size != nil
+      @n_entry_port_array_ns += 1 if port.get_array_size == "[]"
+      @n_entry_port_inline += 1 if port.is_inline?
+    end
+    port.set_celltype self
+  end
+
+  def get_port_list
+    @port
+  end
+
+  def self.new_attribute( attribute )
+    @@current_object.new_attribute( attribute )
+  end
+
+  #=== Celltype# new_attribute for Celltype
+  #attribute:: [Decl]
+  def new_attribute( attribute )
+    @attribute += attribute
+    attribute.each { |a|
+      a.set_owner self
+      @name_list.add_item( a )
+      if( a.is_omit? )then
+        @n_attribute_omit += 1
+      elsif( a.is_rw? )then
+        @n_attribute_rw += 1
+      else
+        @n_attribute_ro += 1
+      end
+      if a.get_initializer then
+        # ç»é²å¾ã«ãã§ãã¯ãã¦ãåé¡ãªãï¼attr ãåç
+§ã§ããªãã®ã§ãèªå·±åç
+§ããªãï¼
+        a.get_type.check_init( @locale, a.get_identifier, a.get_initializer, :ATTRIBUTE )
+      end
+    }
+  end
+
+  #=== Celltype# celltype ã® attribute/var ã®ãã§ãã¯
+  # STAGE:  S
+  #
+  # ãã®ã¡ã½ããã¯ celltype ã®ãã¼ã¹ãå®äºããæç¹ã§å¼åºãããï¼
+  def check_attribute
+    # attribute ã® size_is æå®ãå¦¥å½ããã§ãã¯
+    (@attribute+@var).each{ |a|
+      if a.get_size_is then
+        if ! a.get_type.kind_of?( PtrType ) then
+          # size_is ããã¤ã³ã¿åä»¥å¤ã«æå®ããã
+          cdl_error( "S1011 $1: size_is specified for non-pointer type" , a.get_identifier )
+        else
+
+          # åç
+§ããå¤æ°ãå­å¨ããè¨ç®å¯è½ãªåããã§ãã¯ãã
+          size = a.get_size_is.eval_const( @name_list )  # C_EXP ã®å¯è½æ§ãã
+          init = a.get_initializer
+          if init then
+            if ! init.instance_of?( Array ) then
+              # åæåå­ãé
+åã§ã¯ãªã
+              cdl_error( "S1012 $1: unsuitable initializer, need array initializer" , a.get_identifier )
+            elsif size.kind_of?( Integer ) && size < init.length then
+              # size_is æå®ãããåæ°ãããåæåå­ã®é
+åè¦ç´ ãå¤ã
+              cdl_error( "S1013 $1: too many initializer, $2 for $3" , a.get_identifier, init.length, size )
+            # elsif a.get_size_is.eval_const( nil ) == nil  # C_EXP ã®å¯è½æ§ãã
+            end
+
+          end
+        end
+      else
+        if a.get_type.kind_of?( PtrType ) then
+          if a.get_initializer.instance_of?( Array ) ||
+              ( a.get_initializer.instance_of?( Expression ) &&
+                a.get_initializer.eval_const2(@name_list).instance_of?( Array ) ) then
+            # size_is æå®ããã¦ããªããã¤ã³ã¿ã Array ã§åæåããã¦ããããã¨ã©ã¼
+            cdl_error( "S1159 $1: non-size_is pointer cannot be initialized with array initializer" , a.get_identifier )
+          end
+        end
+      end
+    }
+  end
+
+  def get_attribute_list
+    @attribute
+  end
+
+  #=== Celltype# ã¢ã­ã±ã¼ã¿å¼ã³å£ãçæ
+  #    send, receive å¼æ°ã®ã¢ã­ã±ã¼ã¿ãå¼åºãããã®å¼ã³å£ãçæ
+  def generate_allocator_port
+    @port.each { |port|
+      # ãã¼ãã®ãã¹ã¦ã®ãã©ã¡ã¼ã¿ãè¾¿ã
+      port.each_param { |port, fd, par|
+        case par.get_direction                        # å¼æ°ã®æ¹åæå®å­ (in, out, inout, send, receive )
+        when :SEND, :RECEIVE
+          if par.get_allocator then
+            cp_name = :"#{port.get_name}_#{fd.get_name}_#{par.get_name}"     # ã¢ã­ã±ã¼ã¿å¼ã³å£ã®åå
+            #           ãã¼ãå          é¢æ°å         ãã©ã¡ã¼ã¿å
+            # alloc_sig_path = [ par.get_allocator.get_name ]  # mikan Namespace ã¢ã­ã±ã¼ã¿å¼ã³å£ã®ã·ã°ããã£ #1
+            alloc_sig_path = par.get_allocator.get_namespace_path
+            array_size = port.get_array_size            # å¼ã³å£ã¾ãã¯åãå£é
+åã®ãµã¤ãº
+            created_port = Port.new( cp_name, alloc_sig_path, :CALL, array_size ) # å¼ã³å£ãçæ
+            created_port.set_allocator_port( port, fd, par )
+            if port.is_optional? then
+              created_port.set_optional
+            end
+            if port.is_omit? then
+              created_port.set_omit
+            end
+            new_port( created_port )                    # ã»ã«ã¿ã¤ãã«æ°ããå¼ã³å£ãè¿½å 
+          # else
+          #  already error "not found or not signature" in class ParamDecl
+          end
+        end
+      }
+    }
+  end
+
+  def get_name_list
+    @name_list
+  end
+
+  def self.new_var( var )
+    @@current_object.new_var( var )
+  end
+
+  #=== Celltype# æ°ããå
+é¨å¤æ°
+  #var:: [Decl]
+  def new_var( var )
+    @var += var
+    var.each { |i|     # i: Decl
+      i.set_owner self
+      if i.is_omit? then
+        @n_var_omit += 1
+      else
+        @n_var += 1
+      end
+      @name_list.add_item( i )
+
+      # size_is æå®ãããé
+å? mikan  count_is
+      if i.get_size_is then
+        @n_var_size_is += 1
+      end
+
+      if i.get_initializer then
+        i.get_type.check_init( @locale, i.get_identifier, i.get_initializer, :VAR, @name_list )
+        @n_var_init += 1
+      end
+    }
+  end
+
+  def get_var_list
+    @var
+  end
+
+  #=== Celltype# celltype ã®æå®å­ãè¨­å®
+  def set_specifier_list( spec_list )
+    return if spec_list == nil
+
+    spec_list.each { |s|
+      case s[0]
+      when :SINGLETON
+        @singleton = true
+      when :IDX_IS_ID
+        @idx_is_id = true
+      when :ACTIVE
+        @active = true
+      when :GENERATE
+        if @generate then
+          cdl_error( "S1014 generate specifier duplicate"  )
+        end
+        @generate = [ s[1], s[2] ] # [ PluginName, "option" ]
+      else
+        cdl_error( "S1015 $1 cannot be specified for composite" , s[0] )
+      end
+    }
+  end
+
+  #
+  def self.new_require( ct_or_cell_nsp, ep_name, cp_name = nil )
+    @@current_object.new_require( ct_or_cell_nsp, ep_name.to_sym, cp_name )
+  end
+
+  def new_require( ct_or_cell_nsp, ep_name, cp_name )
+    # Require: set_owner ãããã®ããªã
+    obj = Namespace.find( ct_or_cell_nsp )    #1
+    if obj.instance_of? Celltype then
+      # Celltype åã§æå®
+      ct = obj
+    elsif obj.instance_of? Cell then
+      # Cell åã§æå®
+      ct = obj.get_celltype
+    elsif obj == nil then
+      cdl_error( "S1016 $1 not found" , ct_or_cell_nsp.get_path_str )
+      return
+    else
+      cdl_error( "S1017 $1 : neither celltype nor cell" , ct_or_cell_nsp.get_path_str )
+      return
+    end
+
+    if( ! ct.is_singleton? ) then
+      # ã·ã³ã°ã«ãã³ã§ã¯ãªã
+      cdl_error( "S1018 $1 : not singleton cell" , obj.get_name )
+    end
+
+    # åãå£ãæ¢ã
+    obj2 = ct.find( ep_name )
+    if( ( ! obj2.instance_of? Port ) || obj2.get_port_type != :ENTRY ) then
+      cdl_error( "S1019 \'$1\' : not entry port" , ep_name )
+      return
+    elsif obj2.get_array_size then
+      cdl_error( "S1020 \'$1\' : required port cannot be array" , ep_name )
+      return
+    end
+
+    if obj2.get_signature == nil then
+      # signature ãæªå®ç¾©ï¼æ¢ã«ã¨ã©ã¼
+      return
+    end
+
+    require_call_port_prefix = :_require_call_port
+    if cp_name == nil then
+      # é¢æ°åéè¤ãã§ãã¯
+      @require.each{ |req|
+        unless req[0].to_s =~ /^#{require_call_port_prefix}/ then
+          next     # ååããã® require ã¯é¢æ°åéè¤ãã§ãã¯ããªã
+        end
+        port = req[2]
+        if port.get_signature == obj2.get_signature then
+          # åã signature ï¼ãã¹ã¦åãé¢æ°åãæã¤ï¼åå¥ã«åºãã®ã§ã¯ãªããã¾ã¨ãã¦ã¨ã©ã¼ã¨ãã
+          cdl_error( "S1021 $1 : require cannot have same signature with \'$2\'" , obj2.get_name, port.get_name )
+          next
+        end
+        port.get_signature.get_function_head_array.each{ |f|
+          # mikan ããã¯ãnamedList ããã®æ¤ç´¢ã«ãªããªãã®ï¼ï¼å¹çãæªãï¼
+          obj2.get_signature.get_function_head_array.each{ |f2|
+            if( f.get_name == f2.get_name ) then
+              cdl_error( "S1022 $1.$2 : \'$3\' conflict function name in $4.$5" , obj.get_name, obj2.get_name, f.get_name, req[1].get_name, req[2].get_name )
+            end
+          }
+        }
+      }
+    end
+
+    if cp_name == nil then
+      b_has_name = false
+      cp_name = :"#{require_call_port_prefix}_#{ct.get_name}_#{obj2.get_name}"
+    else
+      b_has_name = true
+    end
+    # require ãè¿½å 
+    @require << [ cp_name, obj, obj2 ]  # [ lhs:cp_name, rhs:Celltype, rhs:Port ]
+
+    # require port ãè¿½å  (å¼ã³å£ã¨ãã¦è¿½å ããããã ã require ãã»ãããã¦ãã)
+    port = Port.new( cp_name, obj2.get_signature.get_namespace_path, :CALL )
+    port.set_require( b_has_name )
+    self.new_port port
+  end
+
+  def self.new_factory( factory )
+    @@current_object.new_factory( factory )
+  end
+
+  def new_factory( factory )
+    factory.set_owner self
+    if factory.get_f_celltype then
+      @ct_factory_list << factory
+    else
+      @factory_list << factory
+    end
+
+    factory.check_arg( self )
+
+  end
+
+  #=== Celltype# ã»ã«ã¿ã¤ããã©ã°ã¤ã³ (generate æå®å­)
+  def celltype_plugin
+
+    load_plugin( @generate[0], CelltypePlugin )
+
+    plugin_name = @generate[0]
+    option = @generate[1]
+    plugin_object = nil
+    eval_str = "plugin_object = #{plugin_name}.new( self, option )"
+    if $verbose then
+      print "new celltype : #{eval_str}\n"
+    end
+
+    begin
+      eval( eval_str )     # plugin ãçæ
+      plugin_object.set_locale @locale
+      @generate[ 2 ] = plugin_object
+      generate_and_parse plugin_object
+    rescue Exception => evar
+      cdl_error( "S1023 $1: fail to new" , plugin_name )
+      print "eval( #{eval_str} )\n"
+
+      print_exception( evar )
+    end
+  end
+
+  #=== Celltype# celltype ã«æ°ãã cell ãè¿½å 
+  #cell:: Cell
+  # æ°ããã»ã«ãã»ã«ã¿ã¤ãã«è¿½å ï¼
+  # ã»ã«ã®æ§æè§£éã®æå¾ã§ãã®ã¡ã½ããå¼åºãããï¼
+  # ã·ã³ã°ã«ãã³ã»ã«ãåã linkunit ã«è¤æ°ãªãããã§ãã¯
+  def new_cell( cell )
+    # Celltype ã§ã¯ Cell ã® set_owner ããªã
+    # ã·ã³ã°ã«ãã³ã§ããã­ãã¿ã¤ãå®£è¨ã§ãªãå ´åãã³ã¼ãçæå¯¾è±¡ãªã¼ã¸ã§ã³ã®å ´å
+    if @singleton  then
+      @cell_list.each{ |c|
+        if c.get_region.get_link_root == cell.get_region.get_link_root then
+          cdl_error( "S1024 $1: multiple cell for singleton celltype" , @name )
+        end
+      }
+    end
+    @cell_list << cell
+    if @plugin then
+      @plugin.new_cell cell
+    end
+  end
+
+  #=== Celltype# ã»ã«ã¿ã¤ãã¯ INIB ãæã¤ãï¼
+  # ã»ã«ã¿ã¤ãã INIB ãæã¤ãã©ãããå¤å®ãã
+  # $rom == false ã®ã¨ã:  INIB ãæããªãï¼ ï¼ãã¹ã¦ã¯ CB ã«ç½®ãããï¼
+  # $rom == true ã®ã¨ããINIB ã«ç½®ããããã®ãä¸ã¤ã§ãå­å¨ããã° INIB ãæã¤
+  #   INIB ã«ç½®ããããã®ã¯
+  #     attribute (omit ã®ãã®ã¯é¤ãï¼ç¾ä»æ§ã§ã¯ rw ã®ãã®ã¯ãªã)
+  #     size_is ãä¼´ã var
+  #     å¼ã³å£ï¼ãã ããæé©åã§ä¸è¦ã¨ãªããã®ã¯é¤ãï¼
+  def has_INIB?
+#    print "name=#{@name} @n_attribute_ro=#{@n_attribute_ro}  @n_var_size_is=#{@n_var_size_is} @n_call_port=#{@n_call_port} @n_call_port_omitted_in_CB=#{@n_call_port_omitted_in_CB} @n_entry_port_array_ns=#{@n_entry_port_array_ns}\n"
+    return $rom && (@n_attribute_ro > 0 || @n_var_size_is > 0 || ( @n_call_port - @n_call_port_omitted_in_CB ) > 0 || @n_entry_port_array_ns > 0)
+#    return $rom && (@n_attribute_ro > 0 || ( @n_call_port - @n_call_port_omitted_in_CB ) > 0)
+  end
+
+  #=== Celltype# ã»ã«ã¿ã¤ãã¯ CB ãæã¤ãï¼
+  # $rom == true ã®ã¨ããããã®ãã®ãç½®ãããï¼ãããã®ä¸ã¤ã§ãå­å¨ããã° CB ãæã¤
+  #   size_is ãæå®ããã¦ããªã var
+  #   rw æå®ããã attribute (ç¾ä»æ§ã§ã¯å­å¨ããªã)
+  # $rom == false ã®ã¨ããããã®ãã®ãç½®ãããï¼ãããã®ä¸ã¤ã§ãå­å¨ããã° CB ãæã¤
+  #   attribute
+  #   var
+  #   å¼ã³å£ï¼ãã ããæé©åã§ä¸è¦ã¨ãªããã®ã¯é¤ãï¼
+  def has_CB?
+    if $rom then
+      return @n_attribute_rw > 0 || (@n_var-@n_var_size_is) > 0
+      # return @n_attribute_rw > 0 || @n_var > 0
+    else
+      return @n_attribute_rw > 0 || @n_attribute_ro > 0 || @n_var > 0 || (@n_call_port-@n_call_port_omitted_in_CB) > 0 || @n_entry_port_array_ns > 0
+    end
+  end
+
+  #=== Celltype# SET_CB_INIB_POINTER, INITIALIZE_CB ãå¿
+è¦ã
+  def need_CB_initializer?
+    @n_var_init > 0 || has_CB?
+  end
+
+  #=== Celltype# érequire ã®çµåãçæãã
+  def create_reverse_require_join cell
+    @port.each{ |p|
+      p.create_reverse_require_join cell
+    }
+  end
+
+  #=== Celltype# singleton ã»ã«ãå¾ã
+  #region:: Region   : singleton ãæ¢ã Region
+  # è·é¢ãæãè¿ããã®ãè¿ã
+  # mikan æ¬å½ã¯ region ã®ç¯å²ã® singleton ãæ¢ãå¿
+è¦ããã
+  def get_singleton_cell region
+    cell = nil
+    dist = 999999999 # mikan å¶éå¤ï¼ããã¯ååãããã»ã©ãã«ã¤ãï¼
+    # require: celltype ã§æå®
+    @cell_list.each{ |c|
+      # å°éå¯è½ã§æãè¿ãã»ã«ãæ¢ãï¼è¤æ°ã® singleton ããããããããªãï¼
+      d = region.distance( c.get_region )
+      #debug
+      dbgPrint "distance #{d} from #{region.get_name} to #{c.get_name} in #{c.get_region.get_name}\n"
+      # print "DOMAIN: distance #{d} from #{region.get_name} to #{c.get_name} in #{c.get_region.get_name}\n"
+      if d != nil then
+        if d < dist then
+          cell = c
+          dist = d
+        end
+      end
+    }
+    return cell
+  end
+
+  def find( name )
+    @name_list.get_item( name )
+  end
+
+  #=== Celltype# ã»ã«ã¿ã¤ããã©ã°ã¤ã³ãå¾ã
+  def get_celltype_plugin
+    if @generate then
+      return @generate[2]
+    end
+  end
+
+  def get_global_name
+    @global_name
+  end
+
+  def is_singleton?
+    @singleton
+  end
+
+  def is_active?
+    @active
+  end
+
+  #=== Celltype# ã¢ã¯ãã£ãã§ã¯ãªãã
+  # ãã®ã¡ã½ããã§ã¯ active ã®ä»ã« factory (singleton ã«ããã¦ã¯ FACTORYãå«ã)ããªããã° inactive ã¨ãã
+  def is_inactive?
+    if @active == false && @factory_list.length == 0 &&
+        ( @singleton && @ct_factory_list.length == 0 || ! @singleton )then
+      return true
+    end
+    return false
+  end
+
+  def get_id_base
+    @id_base
+  end
+
+  def get_plugin
+    @plugin
+  end
+
+  def get_require
+    @require
+  end
+
+  #=== Celltype# ã³ã¼ãçæããå¿
+è¦ããããå¤å®
+  # ã»ã«ã®åæ°ã 0 ãªãã»ã«ã¿ã¤ãã³ã¼ãã¯çæä¸è¦
+  def need_generate?
+    @n_cell_gen > 0
+  end
+
+  #=== Celltype# require å¼ã³å£ã®çµåãè¡ã
+  # STAGE: S
+  # ã»ã«ã¿ã¤ãã® require å¼ã³å£ã«ã¤ãã¦ãçµåãè¡ã
+  # ã»ã«ãçæãããªãããã§ãã¯ãè¡ã
+  def set_require_join
+    @require.each{ |req|
+      cp_name = req[0]
+      cell_or_ct = req[1]
+      port = req[2]
+      @cell_list.each{ |c|
+        c.set_require_join( cp_name, cell_or_ct, port )
+      }
+    }
+  end
+
+  def get_cell_list
+    @cell_list
+  end
+
+  #=== Celltype# inline åãå£ãããªããï¼
+  # åãå£ãç¡ãå ´åããã¹ã¦ã®åãå£ã inline ã¨ã¯ããªã
+  def is_all_entry_inline?
+    @n_entry_port == @n_entry_port_inline && @n_entry_port > 0
+  end
+
+  #=== Celltype.get_celltype_list
+  def self.get_celltype_list
+    @@celltype_list
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "Celltype: name=#{@name} global_name=#{@global_name}"  
+    (indent+1).times { print "  " }
+    puts "active=#{@active}, singleton=#{@singleton}, idx_is_id=#{@idx_is_id} plugin=#{@plugin.class} reuse=#{@b_reuse}"
+    (indent+1).times { print "  " }
+    puts "namespace_path: #{@NamespacePath}"
+    (indent+1).times { print "  " }
+    puts "port:"
+    @port.each { |i| i.show_tree( indent + 2 ) }
+    (indent+1).times { print "  " }
+    puts "attribute:"
+    @attribute.each { |i| i.show_tree( indent + 2 ) }
+    (indent+1).times { print "  " }
+    puts "var:"
+    @var.each { |i| i.show_tree( indent + 2 ) }
+#    (indent+1).times { print "  " }
+#    puts "require:"   mikan
+#    @require.each { |i| i.show_tree( indent + 2 ) }
+    (indent+1).times { print "  " }
+    puts "factory:"
+    @factory_list.each { |i| i.show_tree( indent + 2 ) }
+    (indent+1).times { print "  " }
+    puts "@n_attribute_ro #{@n_attribute_ro}"
+    (indent+1).times { print "  " }
+    puts "@n_attribute_rw #{@n_attribute_rw}"
+# @n_attribute_omit : int >= 0  # of [omit] specified cells
+# @n_var:: int >= 0
+# @n_var_size_is:: int >= 0     # of [size_is] specified cells # mikan count_is
+# @n_var_omit:: int >= 0        # of [omit] specified  cells # mikan var ã® omit ã¯æï¼
+# @n_call_port:: int >= 0
+# @n_call_port_array:: int >= 0
+# @n_call_port_omitted_in_CB:: int >= 0   æé©åã§çç¥ãããå¼ã³å£
+# @n_entry_port:: int >= 0
+# @n_entry_port_array:: int >= 0
+    (indent+1).times { print "  " }
+    puts "@n_entry_port_inline #{@n_entry_port_inline}"
+# @n_cell:: int >= 0  ã³ã¼ãçæã®é ­ã§ç®åºããï¼æå³è§£ææ®µéã§ã¯åç
+§ä¸å¯
+# @id_base:: Integer : cell ã® ID ã®æå°å¤(æå¤§å¤ã¯ @id_base + @n_cell)
+
+  end
+end
+
+class Cell < NSBDNode # < Nestable
+# @name:: Symbol : composite celltype ã®å
+å´ã®ã¤ã³ã¹ã¿ã³ã¹ã§ã¯å¤ã®ã»ã«
+# @global_name:: Symbol : C ã§ä½¿ããååï¼namespace ãå«ãï¼
+# @local_name:: str : cell celltype name { ... } ã® name
+# @celltype:: Celltype | CompositeCelltype
+# @join_list:: NamedList
+# @reverse_join_list:: NamedList
+# @b_defined:: definition flag (false if only prototype )
+# @b_prototype:: bool:  prototype specified in current parsing cell. (@b_defined is used to determine whether definition done)
+# @b_duplicate:: bool:  definition duplicate
+# @b_checked::   bool:  set_definition_join ãæ¸ãã§ããå ´å true
+# @require_joined_list:: {cp_name=>true}:  set_require_join ãæ¸ãã§ããå¼ã³å£ã¯ true
+# @f_ref:: refercenced from others
+# @entry_array_max_subscript:: { @port=>Integer } : åãå£é
+åã®é
+åæ·»æ°ã®æå¤§å¤ï¼æ·»æ°ç¡ãåãå£é
+åå¯¾å¿ï¼
+# @plugin::     Plugin: avialble if cell is generated by plugin generated cdl code.
+# @referenced_port_list:: { Port => Integer } : åãå£ã®åç
+§æ°
+#                                               ãã¹ã¦ã®æå³è§£æ(through, compositeå±é)ãçµãã£ãå¾ã«è¨­å®ãã
+#                                               érequire ãã¼ãã«å¯¾ãã¦è¤æ°ã®çµåããªãããã§ãã¯ãã
+# @generate:: [ Symbol, String, Plugin ]  = [ PluginName, option, Plugin ] Plugin ã¯çæå¾ã«è¿½å ããã
+#
+# composite ã®ããã¤ã³ã¹ã¿ã³ã¹å¤æ°
+# @in_composite:: bool : true if in composite celltype
+# @compositecelltypejoin_list:: NamedList : item= CompositeCelltypeJoin ( if @in_composite )
+# @f_cloned:: bool : true if cloned (instantiate of composite consist cell)
+# @my_clone:: Cell : Composite cell ã§ in_composite = true ã®å ´åã®ã¿æå¹ï¼ç´åã® clone ãä¸æè¨æ¶ï¼
+# @cell_list:: Cell[local_name] : Composite cell ã§ clone ããå¾ã®ãªã¹ã cell_list
+# @cell_list2:: [ Cell ] : Composite cell ã§ clone ããå¾ã®ãªã¹ã cell_list
+#                          @cell_list2 ã¯ composite å
+ã§ã®åºç¾é   
+#
+# region ã®ããã®ã¤ã³ã¹ã¿ã³ã¹å¤æ°
+# @region:: Region (å±ããregion)
+#
+# allocator ã®ããã®ã¤ã³ã¹ã¿ã³ã¹å¤æ°
+# @alloc_list::  [ [ NORMAL_ALLOC, ep_name, func_name, param_name, expr ], ... ]
+#   åãå£å´ã®ã¢ã­ã±ã¼ã¿ã¸ã®çµåãè¨æ¶ãä»¥ä¸ã®ã¡ã½ããã§è¿½å ããã
+#      set_specifier â¦ cell å®ç¾©æã«ã¢ã­ã±ã¼ã¿æå®ããã¦ããå ´å
+#      create_relay_allocator_join â¦ ãªã¬ã¼ã¢ã­ã±ã¼ã¿ã®å ´å
+#
+# ID ã®ããã®ã¤ã³ã¹ã¿ã³ã¹å¤æ°ï¼optimize.rb ã«ã¦è¨­å®ï¼
+# @id:: Integer : ã³ã¼ãçæç´åã«è¨­å®  (ãã­ãã¿ã¤ãå®£è¨ã®å ´åã¯ -1 ã®ã¾ã¾æ¾ç½®)
+# @id_specified::Integer : æå®ããã id
+# @restrict_list::{ entry_name => { func_name, [ region_name, ... ] } }
+
+=begin
+# Cell ã¯ã©ã¹ã¯ãä»¥ä¸ã®ãã®ãæ±ã
+# 1)æ®éã®ã»ã«
+# 2)composite ã»ã«ã¿ã¤ãã®ã»ã«
+# 3)composite ã»ã«ã¿ã¤ãã®å
+å´ã®ã»ã« (@in_composite)   # composite ã®å
+å´ã® composite ã»ã«ã¿ã¤ãã®ã»ã«ããã
+#
+# 2) ã¯ CellOfComposite ã¯ã©ã¹ã¨ãã¦åããã»ãããããããããªã
+#    expand (composite ã»ã«ã®å±é) ã¯ CellOfComposite ã«ã®ã¿å¿
+è¦ãªã¡ã½ããã§ãã
+#    get_real_cell, get_real_port ãªã© @celltype.instance_of?( CompositeCelltype ) ã®å¤å®ããªããã£ãããã
+#    ãã ãåé¢ãã¦ããã¡ã³ããã³ã¹ãã¹ãç¯å²ãåãé¢ããã¦ãã¾ããå¿ãããããªãåé¡ã¨ã®ãã¬ã¼ããªããã
+#
+# 3) ã¯ CellInCompoiste ã¯ã©ã¹ã¨ãã¦åããã»ãããããããããªã
+#    @in_composite ã§å¤å®ãã¦ããå¦çãåãé¢ãã (ä¸è¨ 2) ãããåé¢ã¯å®¹æã§ã¯ãªã)
+#    clone_for_composite ã¯ CellInCompoiste ã«ã®ã¿å¿
+è¦ãªã¡ã½ããã§ãã
+#    ãã ããclone å¾ã« Cell, CellOfComposite ã«å¤åããå¿
+è¦ãããã®ã§ãclone ã§ã¯ãªã new ããå®è£
+ã«å¤æ´ããå¿
+è¦ããã
+#
+=end
+
+  include PluginModule
+
+  @@nest_stack_index = -1
+  @@nest_stack = []
+  @@current_object = nil
+
+  # å®ç¾©ããããã¹ã¦ã®ã»ã«ï¼åºç¾é . namespace ã«å½±é¿ãããªãï¼
+  @@cell_list = []     # composite ã®å
+é¨ã®ã»ã«ãå«ã¾ãªã
+  @@cell_list2 = []    # composite ã®å
+é¨ã®ã»ã«ãå«ã (å
+ã®ã»ã«ãå«ã)
+                       # æå³è§£æå¾ make_cell_list2 ã«ã¦è¨­å®ããã
+
+  def self.push
+    @@nest_stack_index += 1
+    @@nest_stack[ @@nest_stack_index ] = @@current_object
+    @@current_object = nil
+  end
+
+  def self.pop
+    @@current_object = @@nest_stack[ @@nest_stack_index ]
+    @@nest_stack_index -= 1
+    if @@nest_stack_index < -1 then
+      raise "TooManyRestore"
+    end
+  end
+
+
+  # composite ã§ clone ããããã®ï¼å­å­«ã¾ã§å«ãï¼
+  # Join.change_rhs_port ã«ã¦ CompoisteCelltype å
+ã® Join ã®çµåå
+ãå¤æ´ããéã«ä½¿ç¨
+  @@cloned_cell_list = {}
+  ### mikan BUG @@cloned_cell_list ã¯ composite ã®éå±¤ãã¨ã«è¨æ¶ãã¦ããªããããåãååãå
+é¨ã«ç¾ããã¨ããã¾ãåä½ããªã
+  # change_rhs_port ã®å®è£
+ã¯ããããªåããã©ããã¨ãããå¿
+è¦ã¯ãªãã£ããå³è¾ºã«ç¾ããã»ã«åã«ã¯ãcomposite ã®ã»ã«åãåã«ã¤ãªããã ãã§ããã£ã
+
+  def initialize( ct_path, in_composite = false )
+    super()
+    @region = Region.get_current
+
+    # celltype ã®plugin/å­å¨ããã§ãã¯
+    object = Namespace.find( ct_path )    #1
+    if object == nil then
+      # mikan celltype ã®ååãä¸å®å
+¨ "::ct1ct2" ã«ãªã
+      cdl_error( "S1027 \'$1\' celltype not found" , ct_path.get_path_str )
+    elsif ! object.instance_of?( Celltype ) && ! object.instance_of?( CompositeCelltype ) then
+      # mikan celltype ã®ååãä¸å®å
+¨
+      cdl_error( "S1028 \'$1\' not celltype" , ct_path.get_path_str )
+    else
+      @celltype = object
+    end
+
+    @in_composite = in_composite
+    if @in_composite then
+      @compositecelltypejoin_list = NamedList.new( nil, "in cell '#{@name}'" )
+      @plugin = nil
+    else
+      @compositecelltypejoin_list = nil
+      @plugin = Generator.get_plugin
+    end
+
+    @@current_object = self
+    @b_defined = false
+    @b_prototype = false
+    @f_ref     = false
+    @f_cloned  = false
+    @alloc_list = []
+    @id = -1
+    @id_specified = nil
+    @b_duplicate = false
+    @b_checked = false
+    @require_joined_list = {}
+    @entry_array_max_subscript = {}
+    @referenced_port_list = {}
+    @restrict_list = {}
+
+    @cell_list = {}
+    @cell_list2 = []
+  end
+
+  def self.set_name( name )
+    @@current_object.set_name( name )
+  end
+
+  def set_name( name )
+
+    @name = name
+    @local_name = name
+    if "#{Namespace.get_global_name}" != "" then
+      @global_name = :"#{Namespace.get_global_name}_#{name}"
+    else
+      @global_name = name
+    end
+
+    # ãã®æç¹ã§ã¯ãã­ãã¿ã¤ãããå®ç¾©ãåããªãããèªå·±åç
+§ã®ããã«ç»é²
+    # set_f_def ã§ååº¦ç»é²ããªãã
+    # Celltype ã¸ã®ç»é²ã¯ãend_of_parse ã§è¡ã
+    if @in_composite then
+      cell_prev = CompositeCelltype.find( name )
+      if cell_prev == nil then
+        CompositeCelltype.new_cell( self )
+      end
+    else
+      # cell_prev = Namespace.find( [ name ] )   # è¦ªã¾ã§æãã«ãã
+      cell_prev = Namespace.get_current.find( name )
+      if cell_prev == nil then
+        Namespace.new_cell( self )
+        set_namespace_path # @NamespacePath ã®è¨­å®
+      end
+    end
+
+    if cell_prev then
+      if ! cell_prev.instance_of?( Cell ) then
+        cdl_error( "S1029 $1 mismatch with previous one" , name )
+        # celltype ãä¸è´ãã¦ããã ?
+      elsif get_celltype != cell_prev.get_celltype then
+        cdl_error( "S1030 $1: celltype mismatch with previous one" , name )
+      else
+        # region ãä¸è´ãã¦ããã?
+        if ! cell_prev.get_region.equal? get_region then
+          cdl_error( "S1031 $1 region \'$2\' mismatch  with previous one \'$3\'" , name, @region.get_name, cell_prev.get_region.get_name )
+        end
+
+        @@current_object = cell_prev
+        # ãã®æç¹ã§ã¯ãã¾ã ãã­ãã¿ã¤ãå®£è¨ãå®ç¾©ãåããªã
+        # ä»¥åãå®ç¾©ã§ãã£ã¦ãä»åãå®ç¾©ã®å ´åãéè¤ã¨ã©ã¼ã§ãã
+      end
+    end
+
+    @join_list = NamedList.new( nil, "in cell '#{@name}'" )
+    @reverse_join_list = nil
+
+    # debug
+    dbgPrint "Cell new_cell: #{@global_name} #{@in_composite} #{self}\n"
+
+    # å
+é¨ã¢ã­ã±ã¼ã¿ã @alloc_list ã«è¿½å 
+    if @celltype.instance_of? CompositeCelltype then
+      @celltype.get_internal_allocator_list.each{ |cell, cp_internal_name, port_name, fd_name, par_name, ext_alloc_ent|
+        nsp = NamespacePath.new( @name, false )
+        rhs = Expression.new( [:OP_DOT, [:IDENTIFIER, nsp], Token.new( ext_alloc_ent.to_s.to_sym, nil, nil, nil ) ] )  #1 æ§æè§£ææ®µéãªã®ã§ locale ä¸è¦
+
+        @alloc_list << [:NORMAL_ALLOC,port_name,nil,fd_name,par_name,rhs]
+# print "add alloc_list: #{port_name}.#{fd_name}.#{par_name}=#{rhs.to_s}\n"
+      }
+    end
+  end
+
+  #=== Cell# cell ã®å®ç¾©
+  # æ¬ä½(join)ã®å®ç¾©ã®ç´åã«å¼ã³åºããã
+  def self.new_def
+    @@current_object.new_def
+  end
+
+  #=== Cell# cell ã®å®ç¾©
+  # æ¬ä½(join)ã®å®ç¾©ã®ç´åã«å¼ã³åºããã
+  # ãã®ã¡ã½ããã¯ cell tCelltype Cell { };  '{', '}' ã®é¨åãããå ´åã«å¼åºããã
+  def new_def
+    set_specifier_list( Generator.get_statement_specifier )
+
+    # prototype æå®å­ãªãã
+    if ! @b_prototype then
+      # äºéå®ç¾©ã®ãã§ãã¯
+      if @b_defined == true then
+        cdl_error( "S1032 $1: duplicate cell" , @name )
+        dbgPrint "previous: #{@prev_locale[0]}: line #{@prev_locale[1]} '#{@name}' defined here\n"
+
+        # ã»ã«ã®éè¤å®ç¾©ã¨ã©ã¼ã®å¦ç½®
+        # åã®å®ç¾©ã¯æ¨ã¦ã
+        @join_list = NamedList.new( nil, "in cell '#{@name}'" )
+      end
+
+      @b_defined = true
+      @prev_locale = @locale
+    end
+  end
+
+  def self.new_join( join, b_regular = false )
+    @@current_object.new_join( join, b_regular )
+  end
+
+  #===  Cell# æ°ããçµåããã§ãã¯
+  # STAGE:   P
+  #
+  #join::  Join : æ°ããçµå
+  #b_regular:: bool : éå¸¸ã®å ´æ (bnf.y.rb)ãããªãã° true, ããä»¥å¤(allocator, require) ã§ã¯ false
+  def new_join( join, b_regular = false )
+    join.set_owner self
+
+    # composite ã®æ°ææ³å¯¾å¿ï¼
+    # composite ã®ä¸­ã®ã»ã«ã§ãattribute ã®å®ç¾©ã§ããå ´å
+    # cell å
+ã® attr_ext = composite.attr; æ§æãå¦ç
+    if @in_composite then
+      if @celltype then
+        if @celltype.find(join.get_name).instance_of?( Decl ) then # mikan a::b ã§æå®ããã¦ãããã®ãã¨ã©ã¼ã«ãªããªããã
+          rhs = join.get_rhs
+          if rhs.instance_of? Expression then
+            ele = rhs.get_elements
+            if( ele[0]==:IDENTIFIER )then    #  attr = attr_ext ï¼å³è¾ºåé 
+ï¼ãï¼ #1
+              if( CompositeCelltype.has_attribute?(ele[1].get_name ) )then    # mikan a::b.ePort ãã¨ã©ã¼ã«ãªããªããã
+                ident = ele[1].get_name   # å³è¾ºã¯ attributeï¼
+              else
+                # å³è¾ºã¯ attribute ã«ãªãã®ã§ããã°ãå®æ°ã®ã¯ã
+                # å®æ°ã¯ä¸ã¸æ¸¡ã (cell ã® join ã«ãã)
+                ident = nil
+              end
+            else
+              if join.get_rhs.eval_const2(nil) == nil then   # å®æ°å¼ã§ã¯ãªããï¼
+                # å³è¾ºããåä¸ã®ã·ã³ãã«ã§ãªãå ´åãç¾ç¶ã¯æ±ããªã
+                cdl_error( "S1033 rhs expression is not supported. Only attribute is permitted on current version."  )
+                return
+              else
+                # å®æ°ã¯ä¸ã¸æ¸¡ã (cell ã® join ã«ãã)
+                ident = nil
+              end
+            end
+
+            if ident then
+              # attr = attr; ã®ãããªåç
+§ã¯ã¨ã©ã¼ (a = composite.a ã¨ããå¿
+è¦ããã)
+              if @celltype.find( ident ) then
+                cdl_error( "S1034 $1 : cannot refer to $2\'s attribute here. Use \'composite.$3\' to refer to composite celltype\'s" , ident, @celltype.get_name, ident )
+              end
+            end
+          elsif rhs.instance_of? Array then
+            if rhs[0] == :COMPOSITE then   # å³è¾ºã¯ composite.attr ã®å½¢å¼
+              ident = rhs[1].to_sym
+            else
+              ident = nil    # å³è¾ºã¯ { 10, -10 } ã®å½¢å¼
+            end
+          else
+            ident = nil      # å³è¾ºã¯ C_EXP ã®å½¢å¼
+          end
+
+          # ident ãè¦ã¤ãã£ãï¼å³è¾ºã¯åä¸ã® identï¼
+          if ident then
+            # composite ã®æ§ææ³ã®æ§æå¦çã¸æ¸¡ãï¼ã»ã«å¤ã® attr_ext = Cell.attr; æ§æã®å¦çã«æ¸¡ã
+            #                        export_name, internal_cell_name, internal_cell_elem_name
+            decl = CompositeCelltype.new_join( ident, @name, join.get_name, :ATTRIBUTE )  # mikan a::b.ePort ãã¨ã©ã¼ã«ãªããªããã
+            if ! decl.instance_of? Decl then
+              return
+            end
+            ini = decl.get_initializer
+            if ini == nil then
+              return
+            end
+            # ä»¥ä¸ã®æ§ææ³å®è£
+ã«æ¸¡ãï¼
+            # æ§ææ³ã§ã¯ cell ã«åæå¤ãä¸ãããã¨ã§ãcomposite ã§å±æ§ã®åæå¤ãæå®ãããã¨ãã§ãã
+            # attribute ã§æå®ãããåæå¤ã cell ã®å±æ§ã¨ãã¦å¦çããã
+            join.change_rhs( ini )
+          else
+            # ident ããªãï¼å®æ°å¼
+          end
+        else
+          # celltype ã®å±æ§ã¨ãã¦ããã® join ã®ååããªã
+          # ä»¥ä¸ã® join.set_definition ã®ä¸­ã§ã¨ã©ã¼ã¨ãªã
+        end
+      else
+        return    # celltype ããªãï¼ãã§ã«ã¨ã©ã¼
+      end
+    elsif join.get_rhs.instance_of? Array then
+      rhs = join.get_rhs
+      if rhs[0] == :COMPOSITE then
+        # composite ã®ä¸­ã§ãªãã®ã« attr = composite.attr ãä½¿ããã
+        cdl_error( "S1035 composite : cannot specify out of composite celltype definition"  )
+        return
+      end
+    end
+
+    # ä»¥ä¸ composite ææ³å¤æ´åããããå¦ç
+
+    # æ¢ã«å·¦è¾ºãåãååã®åæåãå­å¨ãããï¼
+    j = @join_list.get_item( join.get_name )   # mikan NamespacePath ããã¹ãæã£ã¦ãã
+    if j.instance_of? Join then    # mikan ããã§ã¯ j ã Join or Nil ä»¥å¤ã¯ããªãã¯ã
+
+      # debug
+      dbgPrint "add_array_member: #{@name} port: #{j.get_port_name} rhs: #{j.get_rhs}, #{join.get_port_name} #{join.get_rhs}\n"
+      # å¼ã³å£é
+åï¼ã§ããã¨ä»®å®ãã¦ï¼è¦ç´ ãè¿½å 
+      j.add_array_member join
+
+    else
+      # join
+      @join_list.add_item( join )
+    end
+
+    # if get_owner then   # error S1030 çºçæ get_owner ãè¦ã¤ãããªãã¦ä¾å¤ã«ãªã
+    #   dbgPrint "Cell#new_join: #{get_owner.get_name}.#{@name}\n"
+    # else
+    #   dbgPrint "Cell#new_join: \"owner not fund\".#{@name}\n"
+    # end
+    if ! @in_composite then
+     if join.get_cell
+       dbgPrint "new_join: #{@name} #{@region.get_name} => #{join.get_cell.get_name} #{join.get_cell.get_region.get_path_string}\n"
+     end
+#     p "region: generate? #{@region.is_generate?}"
+    end
+
+  end
+
+  #=== Cell.æ°ããéçµå
+  def self.new_reverse_join( reverse_join )
+    @@current_object.new_reverse_join( reverse_join )
+  end
+
+  #=== Cell#æ°ããéçµå
+  def new_reverse_join( reverse_join )
+    dbgPrint( "new_reverse_join name=#{reverse_join.get_name}\n")
+    b_cb = false
+    if @celltype then
+      ep_name = reverse_join.get_name
+      port = @celltype.find ep_name
+      if port && port.get_signature
+        if port.get_signature.is_callback? then
+          b_cb = true
+        end
+      end
+    end
+    if ! @b_prototype && ! b_cb then
+      cdl_error( "S9999 '$1': reverse join can be used in prototype cell, or with callback signature", @name )
+    end
+    if @reverse_join_list == nil then
+#      @reverse_join_list = NamedList.new( reverse_join, "in cell '#{@name}'" )
+      @reverse_join_list = [ reverse_join ]
+    else
+#      @reverse_join_list.add_item( reverse_join )
+      @reverse_join_list << reverse_join
+    end
+  end
+
+  #=== Cell#éçµåããçµåãçæ
+  # STAGE: S
+  def create_reverse_join
+    if @b_checked then
+      return
+    end
+
+    if @reverse_join_list then
+#      @reverse_join_list.get_items.each{ |rj|
+      @reverse_join_list.each{ |rj|
+        # éçµåã®æ
+å ±ãå¾ã
+        ep_name = rj.get_name
+        ep_subscript, cp_cell_nsp, cp_name, cp_subscript = rj.get_rhs_cell_and_port
+
+        # å¼ã³å£å´ã®ã»ã«ã¨ããã®ã»ã«ã¿ã¤ã
+        cell = Namespace.find cp_cell_nsp
+        if ! cell.instance_of? Cell then
+          cdl_error( "S9999 '$1': not cell for reverse join", cp_cell_nsp.get_path_str )
+          next
+        end
+        ct = cell.get_celltype
+        if ct == nil then
+          next
+        end
+
+        ep_cell_nsp = get_namespace_path
+        ep_subscript_val = ep_subscript ? ep_subscript.eval_const( nil ) : nil
+        rhs = Expression.create_cell_join_expression( ep_cell_nsp, ep_subscript_val, ep_name, rj.get_locale )
+        join = Join.new( cp_name, cp_subscript, rhs, rj.get_locale )
+        cell.new_join( join )
+        # join.set_definition( ct.find(join.get_name) )
+        if cp_subscript then
+          ss_str = "[#{cp_subscript}]"
+        else
+          ss_str = ""
+        end
+        dbgPrint "create_reverse_join: #{cell.get_name}.#{cp_name}#{ss_str} => #{ep_cell_nsp.get_path_str}.ep_name\n"
+      }
+    end
+  end
+
+  def self.external_join( internal_cell_elem_name, export_name, b_composite )
+    @@current_object.external_join( internal_cell_elem_name, export_name, b_composite )
+  end
+
+  #=== Cell# cell å
+ã«è¨è¿°ããå¼ã³å£ã®å¤é¨çµå
+  # internal_cell_elem_name:: string : å¼ã³å£å
+  # export_name:: string: composite ã®å¤é¨ã«å
+¬éããå¼ã³å£å
+  #  å¼ã³å£ãå¤é¨çµåããï¼
+  #  ãã®ã¡ã½ããã¯ãcomposite ã®ä¸­ã® cell ã§ããå¼ã°ããªãï¼
+  def external_join( internal_cell_elem_name, export_name, b_composite )
+
+    # cCall => composite.cCall; ã§ã¯ãªããï¼
+    if( b_composite == false )then
+      # cCall => cCall; ã®ãããªå ´å
+      if @celltype.find( export_name ) then
+        cdl_error( "S1036 $1 : cannot refer to $2\'s here. Use \'composite.$3\' to refer to composite celltype\'s" , export_name, @celltype.get_name, export_name )
+      end
+    end
+    # composite ã®æ§ææ³ã«ããããcell å¤ã® cCall = Cell.cCall; ã®æ§æå¦çã«æ¸¡ã
+    CompositeCelltype.new_join( export_name, @name,  internal_cell_elem_name, :CALL )
+  end
+
+  def self.end_of_parse f_def
+    cell = @@current_object
+    cell.end_of_parse f_def
+    @@current_object = nil
+    return cell
+  end
+
+  def end_of_parse f_def
+    if @b_prototype then  # prototype æå®å­ãã£ãã?
+      f_def = false       # ãã­ãã¿ã¤ãå®£è¨ã¨ãã
+      @b_prototype = false
+    end
+    if f_def == false then
+      # cell tCelltype Cell; ã®å½¢å¼ã®å ´å
+      # f_def == true ã®å ´å new_def ã§ãå¼åºããã
+      set_specifier_list( Generator.get_statement_specifier )
+    end
+    set_f_def f_def
+
+    if @generate then
+      cell_plugin
+    end
+  end
+
+  #=== Cell# ãã­ãã¿ã¤ãå®£è¨(false)ãå®ç¾©(true)ããè¨­å®
+  #    ãã®ã¡ã½ããã¯æ§æè§£éã®æå¾ã«å¼åºããã
+  #f_def::     bool     false if prototype, true if definition
+  def set_f_def f_def
+    if ! f_def then
+      return
+    end
+
+    if ! @in_composite then
+      if @celltype.instance_of? Celltype then
+        @celltype.new_cell self
+      end
+      @@cell_list << self
+    end
+  end
+
+  def set_f_ref
+    dbgPrint "set_f_ref: #{@global_name}\n"
+    @f_ref = true
+
+    # composite ã®å
+é¨ã»ã«ãåç
+§ããããã¨ã«ãã
+    # ä»ã®ã¨ããåé¡ãªãããæªåç
+§ã§ããã¹ããã®ã¾ã§åç
+§ããããã¨ã«ãªã
+    if @cell_list then
+      @cell_list.each{ |cn,cell|
+        cell.set_f_ref
+      }
+    end
+  end
+
+  #=== Cell# cell ã®æå®å­ãè¨­å®
+  # STAGE:  B
+  #
+  #    bnf.y.rb ã® statement_specifiler_list
+  #spec_list::      [ :ALLOCATOR, [ [ :NORMAL_ALLOC, ep_name, subscript, func_name, param_name, expr ], ... ] ]
+  #                     s[0]      s[1]   a[0]        a[1]       a[2]        a[3]     a[4]       a[5]
+  #    ã»ã«ã«æå®ãããã¢ã­ã±ã¼ã¿æå®å­
+  #    a[1] ã® subscript ã¯ãã®ã¡ã½ããã®ä¸­ã§ Expression ãã Integer ã«è©ä¾¡ããã
+  #    åãå£å´ã«çæãããã¢ã­ã±ã¼ã¿å¼ã³å£ã®çµåãå
+é¨çæãã
+  #    å¼ã³å£å´ã¯ Port ã® create_allocator_join ã«ã¦çæ
+  #    ãªã¬ã¼ã¢ã­ã±ã¼ã¿ã®å ´å create_relay_allocator_join ã«ã¦çæã
+  def set_specifier_list( spec_list )
+    return if spec_list == nil  # ç©ºãªãã°ä½ãããªã
+
+    dbgPrint( "set_spec_list: #{@name}\n" )
+    b_generate = false   # generate ãæå®ããã
+
+    spec_list.each{ |s|
+      case s[0]             # statement_specifier
+      when :ALLOCATOR       # [allocator(ePort.func.param=allocCell.eA,ePort.func2.param=allocCell.eA)]
+        s[1].each { |a|     # alloc_list : allocator ã®å
+é¨ã® ',' ã§åºåãããé¨åã®é
+å
+          cp_name = :"#{a[0+1]}_#{a[2+1]}_#{a[3+1]}"    # ã¢ã­ã±ã¼ã¿å¼ã³å£ã®ååï¼'=' ã®å·¦è¾ºã '.' ã«å¤ãã¦ '_' ã§é£çµ
+          # p "#{a[0]} #{a[0+1]} #{a[2+1]} #{a[3+1]} #{cp_name}"
+          if a[1+1] then
+            subscript = a[1+1].eval_const nil
+            a[1+1] = subscript
+          else
+            subscript = nil
+          end
+          # ã¢ã­ã±ã¼ã¿å¼ã³å£ã®çµåãçæ
+          join = Join.new( cp_name, subscript, a[4+1] )   # æ§æè§£ææ®µéãªã®ã§ locale ä¸è¦
+          dbgPrint( "new allocator join #{cp_name} #{subscript} #{a[4+1]}\n" )
+          Cell.new_join( join )
+          @alloc_list << a 
+        }
+      when :ID          # [id(0)]
+        if ! s[1].instance_of? Expression then
+          cdl_error( "S1160 $1 must be constant for id", s[1].to_s )
+        else
+          id = s[1].eval_const nil
+          if id == nil || Integer(id) != id then
+            cdl_error( "S1161 $1 must be constant for id", s[1].to_s )
+          elsif id == 0 then
+            cdl_error( "S1162 $1: id cannot be 0", s[1].to_s )
+          else
+            @id_specified = id
+          end
+        end
+      when :GENERATE      # [generate(CellPlugin,"option")]
+        if @generate then
+          cdl_error( "S1163 generate specifier duplicate"  )
+        end
+        @generate = [ s[1], s[2] ] # [ PluginName, "option" ]
+        b_generate = true
+      when :PROTOTYPE     # [prototype]
+        @b_prototype = true
+      when :RESTRICT      # [restrict]
+        s[1].each{ |re|
+          add_restrict re[0], re[1], re[2]
+        }
+      else
+          cdl_error( "S1039 \'$1\': unknown specifier for cell" , s[0] )
+      end
+    }
+    if @b_prototype then
+      if b_generate then
+         cdl_error( "S9999 '$1': generate and prototype specified simultaneously" , @name )
+      end
+      if @b_defined then
+         cdl_error( "S9999 '$1': prototype specified after definition" , @name )
+      end
+    end
+  end
+
+  def get_allocator_list
+
+    # æå³ãã§ãã¯(set_definition)ããã¦ããªãï¼
+    # relay ã¢ã­ã±ã¼ã¿ã®å ´åãã»ã«ã®æå³ãã§ãã¯ãè¡ããã¦ããªãã¨ã@alloc_list ãå®æããªã
+    if @b_checked == false then
+      set_definition_join
+    end
+    @alloc_list
+  end
+
+  def get_specified_id
+    @id_specified
+  end
+
+  #=== id æå®å­ã®å¤ãè¨­å®
+  # ãã®ã¡ã½ããã¯ããã©ã°ã¤ã³ã§ cell ã®çæé åºãå¶å¾¡ãããå ´åã®ããã«è¨­ãã
+  # éå¸¸ã® id æå®å­ã§ã¯ä½¿ã£ã¦ããªã
+  def set_specified_id id
+    if Integer( id ) != id || id <= 0 then
+      cdl_error( "S1164 '$1' set_specified_id: id not positive integer '$2'", @name, id )
+    elsif @id_specified then
+      cdl_error( "S1165 '$1' set_specified_id: id duplicate", @name )
+    else
+      @id_specified = id
+    end
+  end
+
+  #=== Cell# ã»ã«ã¿ã¤ããã©ã°ã¤ã³ (generate æå®å­)
+  def cell_plugin
+
+    load_plugin( @generate[0], CellPlugin )
+
+    plugin_name = @generate[0]
+    option = @generate[1]
+    plugin_object = nil
+    eval_str = "plugin_object = #{plugin_name}.new( self, option )"
+    if $verbose then
+      print "new cell : #{eval_str}\n"
+    end
+
+    begin
+      eval( eval_str )     # plugin ãçæ
+      plugin_object.set_locale @locale
+      @generate[ 2 ] = plugin_object
+      generate_and_parse plugin_object
+    rescue Exception => evar
+      cdl_error( "S1166 $1: fail to new", plugin_name )
+      print "eval( #{eval_str} )\n"
+
+      print_exception( evar )
+    end
+  end
+
+  def add_compositecelltypejoin join
+    @compositecelltypejoin_list.add_item join
+  end
+
+  #=== Cell# cell ã composite ã»ã«ã¿ã¤ãã®ã»ã«ç¨ã« clone ãã
+  #name::        string : è¦ª cell ã®åå  (cell tComposite cell1 ã§ã® cell1)
+  #global_name:: string : è¦ª cell ã® global_name 
+  #join_array::  Join[] : composite ã® cell ã® join ã§ããã® cell ã«å¯¾å¿ãããã®
+  #ct_name::     string : è¦ªã»ã«ã®ã»ã«ã¿ã¤ãå
+  #region::      Region : å
+ã®ã»ã«ãå±ãã region
+  #ãã®ã¡ã½ããã¯ CompositeCelltype ã® expand ããå¼åºããã
+  def clone_for_composite( name, global_name, namespacePath, join_array, ct_name, region, plugin, locale )
+
+    # debug
+    dbgPrint "Cell#clone_for_composite : cloning: #{@name} #{global_name}  b_defined=#{@b_defined}\n"
+
+    @my_clone = self.clone
+    @@cloned_cell_list[ self ] = @my_clone
+
+    # clone ããã»ã«ã®å
+é¨ã«æã¤ååæ
+å ±ãèª¿æ´ãã
+
+    @my_clone.set_cloned( name, global_name, namespacePath, join_array, ct_name, region, plugin, locale )
+
+    # @celltype == nil ã¯ä»¥åã«ã»ã«ã¿ã¤ãæªå®ç¾©ã¨ã©ã¼
+    if @b_defined == true && @celltype != nil then
+      if @celltype.instance_of?( Celltype ) then
+        # celltype ã«ç»é²ï¼ã³ã¼ãçæã®å¯¾è±¡ã¨ãªãï¼
+        @celltype.new_cell( @my_clone )
+      end
+    end
+
+    return @my_clone
+  end
+
+  #=== Cell# clone ãããã»ã«ã®å
+é¨ã«æã¤ååæ
+å ±ãèª¿æ´ãã
+  #name::        string : è¦ª cell ã®åå  (cell tComposite cell1 ã§ã® cell1)
+  #global_name:: string : è¦ª cell ã® global_name
+  #join_array::  Join[] : composite ã® cell ã® join ã§ããã® cell ã«å¯¾å¿ãããã®
+  #parent_ct_name:: string : è¦ªã»ã«ã®ã»ã«ã¿ã¤ãåï¼composite ã»ã«ã¿ã¤ãï¼
+  #  ãã®ã¡ã½ããã¯ããä¸ã® clone_for_composite ããå¼åºãããclone ãããã»ã«ãæ´ãã
+  def set_cloned( name, global_name, namespacePath, join_array, parent_ct_name, region, plugin, locale )
+
+    # debug
+    dbgPrint "cell.set_cloned : global_name: #{global_name}  name: #{name}  @name: #{@name}\n"
+
+    @global_name = :"#{global_name}_#{@name}"
+    @name = :"#{name}_#{@name}"
+    @NamespacePath = namespacePath.change_name @name
+    @region = region
+    @plugin = plugin
+    @locale = locale
+
+    @in_composite = false
+    @b_checked = false
+    @f_cloned = true
+
+    # Namespace.new_cell( self )  # mikan namespace å¯¾å¿
+    region.new_cell( self )  # mikan  namespace ã« cell ãç½®ããªããã¨ãä»®å®
+
+    # join_list : NamedList ã® clone ãä½ã
+    if @celltype then
+      dbgPrint "set_cloned: #{@celltype.get_name} #{@name} #{region.get_name}\n"
+    end
+    @join_list = @join_list.clone_for_composite( parent_ct_name, name, locale )
+    @referenced_port_list = {}
+
+    @alloc_list = []
+    @require_joined_list = {}
+    @entry_array_max_subscript = {}
+    @cell_list = {}
+    @cell_list2 = []
+
+    # ãã®ã»ã«ã®ã°ã­ã¼ãã«åãä¸ãã
+    # C_EXP ã®$id$ ç½®æã¯ãã®ã»ã«ã®ååã«ãªã
+    join_array.each { |j|
+      @join_list.change_item j
+    }
+
+    # clone ãããã¨ããã»ã«ã composit ã»ã«ã¿ã¤ãï¼
+    if @celltype.instance_of?( CompositeCelltype ) then
+      # composite cell ãåå¸°çã«å±é
+      @cell_list, @cell_list2 = @celltype.expand( @name, @global_name, @NamespacePath, @join_list, @region, @plugin, @locale )
+    end
+
+  end
+
+  #=== Cell# clone ããã cell ã® join_list ã®å³è¾ºã®å¤æ´
+  #  å¼ã³å£ã®å³è¾ºã® cell ãä»ã® clone ããã cell ã«ç½®æã
+  def change_rhs_port
+
+    # debug
+    dbgPrint "Cell change_rhs_port: global_name: #{@global_name}\n"
+
+    @join_list.get_items.each { |j|
+      j.change_rhs_port( @@cloned_cell_list, @celltype )
+    }
+
+    if @celltype.instance_of?( CompositeCelltype ) then
+
+      # å
+¥ãå­ã®ã»ã«ã«ã¤ãã¦ãå¤æ´
+      @cell_list.each{ |name,c|
+        c.change_rhs_port
+      }
+    end
+  end
+
+  def get_f_def
+    @b_defined
+  end
+
+  def get_f_ref
+    if @f_ref then
+      return true
+    else
+      return false
+    end
+  end
+
+  def get_name
+    @name
+  end
+
+  def get_local_name
+    @local_name
+  end
+
+  def get_global_name
+    @global_name
+  end
+
+  def get_region
+    @region
+  end
+
+  def self.get_current
+    @@current_object
+  end
+
+  #=== Cell# çæãããã»ã«ãï¼
+  # æé©åãã³ã¼ãçæä¸­ã«ãå¯¾è±¡ã¨ãªã region ã«å±ããå ´å true ãè¿ã
+  def is_generate?
+    if $generating_region == nil then
+      # æ§æè§£éãæå³è§£ææ®µéã§å¼ã°ããã¨ä¾å¤çºç
+      raise "is_generate? called before optimizing"
+    end
+
+    # print "Cell#is_generate?: #{@name} #{@region.get_name} #{$generating_region.get_name}\n"
+    if $generating_region == @region.get_link_root then
+      return true
+    else
+      return false
+    end
+  end
+
+  #=== Cell# composite å
+é¨ã®è¤è£½ãããã»ã«ãï¼
+  # composite å®ç¾©ã®å
+é¨ã®ã»ã« (@in_composite = true) ã§ã¯ãªã
+  def is_cloned?
+    @f_cloned
+  end
+
+  #=== Cell# composite å
+é¨ã®ã»ã«ãï¼
+  def is_in_composite?
+    @in_composite
+  end
+
+  # composite cell ã® port ã«å¯¾å¿ããå
+é¨ã® cell ã® port ã®ååï¼ãªã³ã¯æã«å¿
+è¦ãªååï¼
+  def get_real_global_name port_name
+    if @celltype.instance_of?( CompositeCelltype ) then
+
+      # debug
+      dbgPrint "get_real_global_name: cell name: #{@name} #{@local_name} #{@global_name} #{port_name}\n"
+      @cell_list.each{ |n,c|
+        dbgPrint "   name: #{n}\n"
+        dbgPrint " get_name: #{c.get_name} local_name: #{c.get_local_name}\n"  if c
+        dbgPrint "\n\n"
+      }
+
+      cj = @celltype.find_export( port_name )
+
+      # debug
+      dbgPrint " composite join name: #{cj.get_name}  cell: #{cj.get_cell_name}  cell elem: #{cj.get_cell_elem_name}\n"
+
+      name = @cell_list[ "#{cj.get_cell_name}" ].get_real_global_name( cj.get_cell_elem_name )
+      return name
+
+    else
+      # debug
+      dbgPrint "  get_real_global_name: cell name: #{@global_name}\n"
+
+      return @global_name
+    end
+  end
+
+  #=== Cell# ã»ã«ã®åãå£ port_name ã«å¯¾ããå®éã®ã»ã«åãåãå£åã '_' ã§é£çµ
+  #    namespace å + '_' + ã»ã«å + '_' + åãå£å   ï¼ãã®ã»ã«ã composite ãªãã°å±éå¾ã®ã»ã«åãåãå£åï¼
+  def get_real_global_port_name port_name
+
+    # composite ãï¼
+    if @celltype.instance_of?( CompositeCelltype ) then
+
+      # debug
+      dbgPrint "get_real_global_port_name: cell name: #{@name} #{@local_name} #{@global_name} #{port_name}\n"
+      @cell_list.each{ |n,c|
+        dbgPrint "   name: #{n}\n"
+        dbgPrint " get_name: #{c.get_name} local_name: #{c.get_local_name}\n"  if c
+        dbgPrint "\n"
+      }
+
+      # ã»ã«ã¿ã¤ãå
+ã§ port_name ã® CompositeCelltypeJoin ãæ¢ãï¼ã³ã¼ãçææ®µéã§ã¯å¿
+ãè¦ã¤ããï¼
+      cj = @celltype.find_export( port_name )
+
+      # debug
+      dbgPrint "   composite join name: #{cj.get_name}  cell: #{cj.get_cell_name}  cell elem: #{cj.get_cell_elem_name}\n"
+
+      # composite ã®å
+é¨ã®ã»ã«ã«å¯¾ãåå¸°çã« get_real_global_port_name ãé©ç¨
+      name = @cell_list[ "#{cj.get_cell_name}" ].get_real_global_port_name( cj.get_cell_elem_name )
+      return name
+
+    else
+      # debug
+      dbgPrint "get_real_global_port_name:  cell name: #{@global_name}\n"
+
+      return "#{@global_name}_#{port_name}"
+    end
+  end
+
+  #=== Cell# PORT (celltype ã®å®ç¾©) ãå¾ã
+  def get_real_port( port_name )
+
+    # composite ãï¼
+    if @celltype.instance_of?( CompositeCelltype ) then
+
+      # ã»ã«ã¿ã¤ãå
+ã§ port_name ã® CompositeCelltypeJoin ãæ¢ãï¼ã³ã¼ãçææ®µéã§ã¯å¿
+ãè¦ã¤ããï¼
+      cj = @celltype.find_export( port_name )
+
+      # composite ã®å
+é¨ã®ã»ã«ã«å¯¾ãåå¸°çã« get_real_port ãé©ç¨
+      port = @cell_list[ "#{cj.get_cell_name}" ].get_real_port( cj.get_cell_elem_name )
+      return port
+    else
+
+      return @celltype.find( port_name )
+    end
+  end
+
+  #=== Cell# cell ãå¾ã
+  #    composite ã§ãªããã°èªåèªèº«ãè¿ã
+  def get_real_cell( port_name )
+
+    # composite ãï¼
+    if @celltype.instance_of?( CompositeCelltype ) then
+
+      # ã»ã«ã¿ã¤ãå
+ã§ port_name ã® CompositeCelltypeJoin ãæ¢ãï¼ã³ã¼ãçææ®µéã§ã¯å¿
+ãè¦ã¤ããï¼
+      cj = @celltype.find_export( port_name )
+
+      # composite ã®å
+é¨ã®ã»ã«ã«å¯¾ãåå¸°çã« get_real_port ãé©ç¨
+      cell = @cell_list[ "#{cj.get_cell_name}" ].get_real_cell( cj.get_cell_elem_name )
+      return cell
+    else
+
+      return self
+    end
+  end
+
+
+  #=== Cell# åãå£ã®port ã®åç
+§ã«ã¦ã³ããã¢ãããã
+  #port_name:: Symbol  : ãã¼ãå
+  def port_referenced port
+    if @referenced_port_list[ port ] then
+      @referenced_port_list[ port ] += 1
+    else
+      @referenced_port_list[ port ] = 1
+    end
+
+    # composite ãï¼
+    if @celltype.instance_of?( CompositeCelltype ) then
+
+      # ã»ã«ã¿ã¤ãå
+ã§ port_name ã® CompositeCelltypeJoin ãæ¢ãï¼ã³ã¼ãçææ®µéã§ã¯å¿
+ãè¦ã¤ããï¼
+      cj = @celltype.find_export( port.get_name )
+
+      dbgPrint " port_referenced: #{@celltype.get_name} #{@name} cj=#{cj&&(cj.get_name)||"nil"}\n"
+
+      if cj then  # æ¢ã«ã¨ã©ã¼
+        # composite ã®å
+é¨ã®ã»ã«ã«å¯¾ãåå¸°çã« get_real_port ãé©ç¨
+        cell = @cell_list[ "#{cj.get_cell_name}" ]
+        if cell && cell.get_celltype then
+          cell.port_referenced( cell.get_celltype.find( cj.get_cell_elem_name ) )
+        end
+      end
+    end
+  end
+
+  def get_internal_port_name port_name
+    if @celltype.instance_of?( CompositeCelltype ) then
+      cj = @celltype.find_export( port_name )
+#      return "#{@name}_#{cj.get_cell.get_internal_port_name cj.get_cell_elem_name}"
+      return cj.get_cell.get_internal_port_name( cj.get_cell_elem_name )
+    else
+
+      # debug
+      dbgPrint "  get_global_port_name: cell port: #{@global_name}_#{port_name}\n"
+
+      return "#{@global_name}_#{port_name}"
+    end
+  end
+
+  def get_celltype
+    @celltype
+  end
+
+  def get_join_list
+    @join_list
+  end
+
+  def set_id id
+    @id = id
+  end
+
+  def get_id
+    @id
+  end
+
+  def get_plugin
+    @plugin
+  end
+
+  def get_cell_list2
+    list = []
+    @cell_list2.each{ |cell|
+      list << cell
+      list += cell.get_cell_list2
+    }
+    return list
+  end
+
+  #=== Cell# åãå£é
+åã®æ·»æ°ã®æå¤§å¤ãè¨­å®
+  def set_entry_port_max_subscript( port, num )
+    dbgPrint( "set_entry_port_max_subscript: #{@name}.#{port.get_name}: #{num}\n" )
+    subscript = @entry_array_max_subscript[port]
+
+    if subscript == nil || num > subscript then
+      @entry_array_max_subscript[port] = num
+      set_entry_inner_port_max_subscript( port, num )
+    end
+  end
+
+  #=== Cell# composite ã®å
+å´ã»ã«ã®åãå£é
+åã®æ·»æ°ã®æå¤§å¤ãè¨­å®
+  def set_entry_inner_port_max_subscript( port, num )
+    if @cell_list == nil then   # mikan ããã£ã¦åé¡ãªãï¼
+      return    # ãã­ãã¿ã¤ãå®£è¨ããããã¦ããªãã¦ãå
+å´ã»ã«ãå±éããã¦ããªã
+    end
+
+    # composite ã®å
+å´ã®ã»ã«ã«ä¼æ­
+    if @celltype.instance_of? CompositeCelltype then
+      cj = @celltype.find_export port.get_name
+      if cj && @cell_list[ cj.get_cell_name.to_s ] then
+        inner_cell = @cell_list[ cj.get_cell_name.to_s ]
+        ct = inner_cell.get_celltype
+        if ct then
+          inner_port = ct.find( cj.get_cell_elem_name )
+          inner_cell.set_entry_port_max_subscript( inner_port, num )
+        end
+      end
+    end
+  end
+
+  #=== Cell# åãå£é
+åã®æ·»æ°ã®æå¤§å¤ãè¿ã
+  # é·ãã¯ +1 ãã
+  # 1ã¤ããªãå ´åã¯ -1 ãè¿ã
+  def get_entry_port_max_subscript( port )
+    subscript = @entry_array_max_subscript[port]
+    if subscript == nil then
+      subscript = -1
+    end
+    return subscript
+  end
+
+  #=== Cell# ãªã¬ã¼ã¢ã­ã±ã¼ã¿ã®çµåãçæ
+  # STAGE: S
+  # å¼ã³å£å´ã®çµåãå
+ã«åãå£å´ã®çµåãçæ
+  def create_relay_allocator_join
+
+    # celltype ããªããã°ãã§ãã¯ããªãï¼æ¢ã«ã¨ã©ã¼ï¼
+    return if @celltype == nil
+
+    # relay allocator ãçæ
+    @celltype.get_port_list.each { |p|
+      ail = p.get_allocator_instance
+      if ail then
+        dbgPrint "create_relay_allocator_join: #{@name}, #{p.get_name}\n"
+        if p.get_array_size then
+          # mikan relay allocator ã array ã«å¯¾å¿ã§ãã¦ãããã®ã§ã¯ï¼
+          cdl_error( "S1040 array not supported for relay allocator"  )
+          next
+        end
+        ail.each{ |name,ai2|
+          # ai2 = [ :INTERNAL_ALLOC|:RELAY_ALLOC, func_name, param_name, rhs_cp_name, rhs_func_name, rhs_param_name ]
+          if ai2[0] == :RELAY_ALLOC then
+            dbgPrint "create_relay_allocator_join: #{@name}, #{name}\n"
+            # å¼ã³å£å´ã®çµåãåãåºã
+            ja = @join_list.get_item( :"#{ai2[3]}_#{ai2[4]}_#{ai2[5]}" )
+            if ja == nil then
+              # è¦ã¤ãããªãå ´å
+              found = false
+              
+              # composite å
+ã§å¤é¨ã«çµåããã¦ããã
+              if @in_composite then
+                @compositecelltypejoin_list.get_items.each { |cj|
+                  dbgPrint( "create relay_allocator in_composite\n" )
+                  dbgPrint("    #{cj.get_cell_name} #{@name} #{cj.get_cell_elem_name} #{ai2[3]}_#{ai2[4]}_#{ai2[5]}\n")
+                  if cj.get_cell_name == @name &&
+                      cj.get_cell_elem_name == :"#{ai2[3]}_#{ai2[4]}_#{ai2[5]}" then
+                    found = true
+                    dbgPrint "create_relay_allocator: found #{cj.get_cell_elem_name}\n"
+                    break
+                  end
+                }
+              end
+
+              if found == false then
+                cdl_error( "S1041 \'$1_$2_$3\': not joined. cannot create internal join for relay allocator" , ai2[3], ai2[4], ai2[5] )
+                print( "      In cell #{get_name}\n" )
+                # join ãæªçµåã§ãããã¨ã®ã¨ã©ã¼ã¯äºåº¦ã§ã (S1043)
+              end
+              next    # æã¡åã
+            end
+
+            b_export = false
+            # composite å
+ã®ã»ã«ã§ã¨ã¯ã¹ãã¼ãããã¦ããããã§ãã¯
+            #  mikan ã¨ã¯ã¹ãã¼ãå´ã¨ããã¡ãå´ã§ããªã¬ã¼å
+ãä¸è´ããããã§ãã¯ãå¿
+è¦
+            if @compositecelltypejoin_list then
+              # export ããã¦ãããèª¿ã¹ã
+              @compositecelltypejoin_list.get_items.each{ |cj|
+                # å±æ§åã¨ composite ã® export ããååã¯ä¸è´ããã
+                if p.get_name == cj.get_cell_elem_name then
+                  print "export : #{p.get_name}\n"
+                  b_export = true    # å±æ§ã¯ export ããã¦ããã®ã§ãã¨ããããæªåæåã¨ã¯ããªã
+                  break
+                end
+              }
+              # 
+            end
+
+            # mikan é
+å
+            am = nil
+            if am then
+              am.each{ |ja2|
+                rhs = ja2.get_rhs
+                subscript = ja2.get_subscript
+                if b_export == false then
+                  # CompositeCelltype ã®å ´åãå
+å´ã®ã»ã«ã§çæããã
+                  join = Join.new( :"#{p.get_name}_#{ai2[1]}_#{ai2[2]}", subscript, rhs, @loacle )
+                  # p ( "#{p.get_name}_#{ai2[1]}_#{ai2[2]}", subscript, rhs )
+                  new_join( join )
+                  join.set_definition( @celltype.find(join.get_name) )
+                  # mikan relay mismatch ãã§ãã¯ãã§ãã¦ããªãï¼ä¸æ¹ãåç
+§ï¼
+                end
+                @alloc_list << [ :NORMAL_ALLOC, p.get_name, subscript, ai2[1], ai2[2], rhs ]
+              }
+            else
+              if b_export == false then
+                # CompositeCelltype ã®å ´åãå
+å´ã®ã»ã«ã§çæããã
+                join = Join.new( :"#{p.get_name}_#{ai2[1]}_#{ai2[2]}", nil, ja.get_rhs, @locale )
+                new_join( join )
+                join.set_definition( @celltype.find(join.get_name) )
+                if @celltype.instance_of? CompositeCelltype then
+                  jr = @join_list.get_item( :"#{ai2[3]}_#{ai2[4]}_#{ai2[5]}" )
+                  if jr.get_rhs_cell2 != join.get_rhs_cell2 || jr.get_rhs_port2 != join.get_rhs_port2 then
+                    cdl_error( "S1167 \'$1\': relay mismatch \'$2\'",
+                                      "#{p.get_name}_#{ai2[1]}_#{ai2[2]}",
+                                      "#{ai2[3]}_#{ai2[4]}_#{ai2[5]}" )
+                    # æ¬å½ã¯ composite ã®å¼ã³å£ã¨åãå£ã®éã§è¡ãã¹ãã ããå
+é¨ã§å¤æ®µæ¥ç¶ããã¦ããå ´å
+                  else
+                    dbgPrint "relay success:  #{p.get_name}_#{ai2[1]}_#{ai2[2]}=>#{ai2[3]}_#{ai2[4]}_#{ai2[5]} #{jr.get_rhs_cell2.get_name}.#{jr.get_rhs_port2} \n"
+                  end
+                end
+              end
+              @alloc_list << [ :NORMAL_ALLOC, p.get_name, nil, ai2[1], ai2[2], ja.get_rhs ]
+            end
+            dbgPrint "create_relay_allocator_join: #{p.get_name}_#{ai2[1]}_#{ai2[2]} #{ai2[3]}_#{ai2[4]}_#{ai2[5]}\n"
+          end
+        }
+      end
+    }
+  end
+
+  #=== Cell# @@cell_list2 ãä½ã
+  # @@cell_list2 ã¯ãåºç¾é ã« composite å
+ãå«ãã»ã«ã®ãªã¹ã
+  def self.make_cell_list2
+    @@cell_list.each{ |c|
+      @@cell_list2 << c
+      @@cell_list2 += c.get_cell_list2
+    }
+  end
+
+  #=== Cell# @@cell_list2 ãå¾ã
+  # composite å
+ãå«ã (compositeãå«ã)
+  # æå³è§£æå¾ã«ä½æããã
+  def self.get_cell_list2
+    @@cell_list2
+  end
+
+  #=== Cell# @@cell_list ãå¾ã
+  #composite ã®ä¸­ãå«ã¾ãªã
+  def self.get_cell_list
+    @@cell_list
+  end
+
+  #=== Cell# reverse_join ãçæãã
+  def self.create_reverse_join
+    @@cell_list.each{ |c|
+      ct = c.get_celltype
+      # if c.is_generate? then
+      if ct then
+        c.create_reverse_join
+      end
+      # end
+    }
+  end
+
+  #=== Cell# reverse_require_join ãçæãã
+  def self.create_reverse_require_join
+    @@cell_list2.each{ |c|
+      ct = c.get_celltype
+      # if c.is_generate? then
+        if ct then
+          # self ã¸ã®å¼ã³å£å´ã®çµåãçæ
+          ct.create_reverse_require_join c
+        end
+      # end
+    }
+  end
+
+  #=== Cell# åãå£ã®port ã®åç
+§ã«ã¦ã³ããè¨­å®ãã
+  # self ã¯å¼ã³å
+ã®ã»ã«
+  # å¼ã³å
+ã»ã«ã®åãå£ã®åç
+§ã«ã¦ã³ããã¢ãããã
+  def set_port_reference_count
+    @join_list.get_items.each { |j|
+      if j.get_definition.instance_of? Port then
+        am = j.get_array_member2
+        if am then             # å¼ã³å£é
+å
+          am.each { |j2|
+            next if j2 == nil    # optional ã§ä¸é¨ãæ¬ è½ãã¦ããã±ã¼ã¹
+            cell = j2.get_rhs_cell2
+            next if cell == nil     # å³è¾ºãè¦ã¤ãããªãã£ãï¼æ¢ã«ã¨ã©ã¼
+            port = cell.get_celltype.find( j2.get_rhs_port2 )
+            dbgPrint( "set_port_reference_count: #{@name}.#{j2.get_name} => #{cell.get_name}.#{port.get_name}\n")
+            cell.port_referenced port
+          }
+        else
+          cell = j.get_rhs_cell2
+          next if cell == nil     # å³è¾ºãè¦ã¤ãããªãã£ãï¼æ¢ã«ã¨ã©ã¼
+          port = cell.get_celltype.find( j.get_rhs_port2 )
+          dbgPrint( "set_port_reference_count: #{@name}.#{j.get_name} => #{cell.get_name}.#{port.get_name}\n")
+          cell.port_referenced port
+        end
+      end
+    }
+  end
+
+  #=== Cell# çµå(Join)ã®ãã§ãã¯
+  #     Join ã¯å¼ã³å£ã®çµåã¾ãã¯ attribute ã®åæå
+  #
+  #  mikan ãã®ã¡ã½ããã¯ãä»¥ä¸ã®ï¼ã¤ã®ãã§ãã¯ãããªãããåå²ããã»ããããé©åãªé·ãã®ã¡ã½ããã«ãªã
+  #  ã»ãªã¬ã¼ã¢ã­ã±ã¼ã¿ã®çæ => create_relay_allocator_join
+  #  ã»æªçµåã®å¼ã³å£ã®ãã§ãã¯
+  #  ã»ãã¤ã³ã¿åãé
+åã§åæåãããå ´åã®ãã§ãã¯
+  #  ã»æªåæåã®å±æ§ã®ãã§ãã¯
+  def check_join
+
+    # celltype ããªããã°ãã§ãã¯ããªãï¼æ¢ã«ã¨ã©ã¼ï¼
+    return if @celltype == nil
+    return if @b_defined == false
+    return if @f_cloned == true    # å
+é¨ã»ã«ã«ã¤ãã¦ã¯ãcomposite ã®å®ç¾©æã«ãã§ãã¯ããã¦ãã
+
+    # debug
+    # if @compositecelltypejoin_list then
+    #   p "check_join"
+    #   @compositecelltypejoin_list.get_items.each { |cj| p "#{cj.get_name} #{cj.get_name.object_id}" }
+    # end
+
+    # æªçµåã®å¼ã³å£ã®ãã§ãã¯
+    @celltype.get_port_list.each { |p|
+
+      # å¼ã³å£ã§ãªããã°ããã§ãã¯ããªã
+      next if p.get_port_type != :CALL
+
+      # debug
+      dbgPrint "check_join: #{@name} #{get_celltype.get_name} #{p.get_name}\n"
+
+      # çµåãªã¹ãã®ä¸­ããå¼ã³å£åã«ä¸è´ãããã®ãåãã ã
+      j = @join_list.get_item( p.get_name )
+
+      if j == nil then
+        # æªçµåã®å¼ã³å£
+
+        # composite celltype ã®å
+é¨ã®å ´åãcomposite celltype ã export ããå¼ã³å£ã«çµåããã¦ãããæ¢ã
+        found = false
+        if @in_composite then
+          # composite celltype ã® export ãããã®ãã¹ã¦ããæ¢ã
+          # ï¼export ãããã®ã®å³è¾ºå¤ããæ¢ãããã« get_item ã§ã¯ãã¡ï¼
+          @compositecelltypejoin_list.get_items.each{ |cj|
+            # å¼ã³å£åã¨ composite ã® export ããååã¯ä¸è´ããã
+            if p.get_name == cj.get_cell_elem_name then
+              found = true
+            end
+          }
+        end
+
+        # å¼ã³å£é
+åã®å ´å optional ã§å
+¨ã¦ã®è¦ç´ ãåæåãããªãå ´åã«ãããã¸æ¥ã
+        if ! found && ! p.is_require? && ! p.is_optional? then
+          if ! p.is_allocator_port? then
+            cdl_error( "S1042 call port \'$1\' not initialized in cell \'$2\'" , p.get_name, @name )
+          else
+            cdl_error( "S1043 call port \'$1\' not initialized in cell \'$2\'. this call port is created by tecsgen. check allocator specifier" , p.get_name, @name )
+          end
+        end
+      elsif p.get_array_size.kind_of? Integer then
+        # æ·»æ°ããå¼ã³å£é
+åã®å ´åããã¹ã¦ã®æ·»æ°è¦ç´ ãåæåããã¦ããããã§ãã¯ãã
+
+        am = j.get_array_member2
+        if( am )then
+          # join ã¯é
+å
+
+          # å¼ã³å£é
+åå®ç¾©ã§ã®é
+åã®å¤§ãã
+          length = p.get_array_size
+
+          # é
+åã®å¤§ãããå¼ã³å£é
+åå®ç¾©ã¨çµåå®ç¾©ã§ä¸è´ãããï¼
+          if am.length != length then
+            if ! p.is_optional? || am.length >= length then
+              # optional ã®å ´åãè¦ç´ æ°ãå°ãªãããã®ã¯ OK
+              cdl_error( "S1044 $1: array initializer too many or few, $2 for $3" , p.get_name, am.length, length )
+            end
+
+            # am ã®è¦ç´ ã« nil ãè¿½å ãã¦ãã (#_CPA_# ã®ã³ã¼ãçææããã®é
+åè¦ç´ æ°åçæ)
+            i = am.length
+            while i < length
+              am << nil
+              i += 1
+            end
+          end
+
+#          # é
+åè¦ç´ ã®æãããªãããã§ãã¯
+#          if am.length < length then  # æºããªãå ´åæ¢ã«ã¨ã©ã¼ã ãè¦ç´ ã®ããç¯å²ã§ãã§ãã¯
+#            length = am.length
+#          end
+          i = 0
+          while( i < length )
+            if am[i] == nil then
+              if ! p.is_optional? then
+                cdl_error( "S1045 $1[$2]: not initialized" , p.get_name, i )
+              end
+            else
+              # çæãããªããªã¼ã¸ã§ã³ã¸ã®çµåããã§ãã¯
+              if ! @in_composite then
+                am[i].check_region2
+              end
+            end
+            i += 1
+          end
+
+        # else
+        # join ãéé
+åã§ããã°ãæ¢ã«ã¨ã©ã¼
+        end
+      elsif j.get_array_member then
+        # æ·»æ°ãªãå¼ã³å£é
+åã®å ´å
+        am = j.get_array_member2
+        length = am.length
+        i = 0
+        while i < length
+          if am[i] == nil then
+            if ! p.is_optional? then
+              cdl_error( "S1046 $1[$2]: not initialized" , p.get_name, i )
+            end
+          end
+          i += 1
+        end
+
+        # çæãããªããªã¼ã¸ã§ã³ã¸ã®çµåããã§ãã¯
+        if ! @in_composite then
+          am.each { |join|
+            if join then
+              join.check_region2
+            end
+          }
+        end
+      else
+        # å¼ã³å£ï¼»é
+åãã§ãªãå ´å
+
+        # çæãããªããªã¼ã¸ã§ã³ã¸ã®çµåããã§ãã¯
+        if ! @in_composite then
+          j.check_region2
+        end
+
+      end # j != nil
+    }
+
+    # ãã¤ã³ã¿åãé
+åã§åæåãããå ´åã®ãã§ãã¯
+    (@celltype.get_attribute_list+@celltype.get_var_list).each { |a|
+      if a.get_size_is then
+
+        if a.instance_of? CompositeCelltypeJoin then
+          # æ¢ã«ã¨ã©ã¼ã«ãªã£ã¦ãã
+          # cdl_error( "S1047 size_is pointer cannot be exposed for composite attribute"  )
+          next
+        end
+
+        if( ! a.get_type.kind_of?( PtrType ) ) then
+          cdl_error( "S1048 $1: size_is specified for non-pointer type" , a.get_name )
+        else
+          size = a.get_size_is.eval_const( @join_list, @celltype.get_name_list )
+          a.get_type.set_scs( a.get_size_is, nil, nil, nil, false )
+          if( ! size.kind_of? Integer )then               # C_EXP ã®å¯è½æ§ãã
+            # mikan å¤åããã§ã®ã¨ã©ã¼çºçã¯ä¸è¦ãeval_const ã®ä¸­ã§å¤æ°ãå­å¨ããªããåãä¸é©åãªã©ã®ã¨ã©ã¼ã«ãªãã¯ã
+            cdl_error( "S1049 $1: size_is arg not constant" , a.get_name )
+          else
+            j = @join_list.get_item( a.get_identifier )
+            if j then
+              ini = j.get_rhs
+              if ini then
+                if ! ini.instance_of?( Array ) then
+                  cdl_error( "S1050 unsuitable initializer, need array initializer"  )
+                elsif size < ini.length then
+                  cdl_error( "S1051 too many initializer for array, $1 for $2" , ini.length, size )
+                else
+                  # a.get_type.set_scs( a.get_size_is, nil, nil )
+                end
+              end
+            else
+              # size_is å¼æ°ãã»ã«ã§æå®ããã¦ãã¦ãåæåå­ãã»ã«ã¿ã¤ãã§æå®ããã¦ããã±ã¼ã¹ã®ãã§ãã¯
+              ini = a.get_initializer
+              if ini.instance_of? Expression
+                ini = ini.eval_const( @celltype.get_name_list )
+              end
+              if ini.instance_of? Array then
+                if( ini.length > size )then
+                  cdl_error( "S1168 too many initializer for array, $1 for $2", ini.length, size )
+                end
+              end
+            end
+          end
+        end
+      else
+        if ! a.instance_of? CompositeCelltypeJoin then
+          # composite ã¯ size_is æå®ã§ããªã
+          if a.get_type.kind_of?( PtrType ) then
+            j = @join_list.get_item( a.get_identifier )
+            if j && j.get_rhs.instance_of?( Array ) then
+              ## size_is æå®ããã¦ããªããã¤ã³ã¿ã Array ã§åæåããã¦ããããã¨ã©ã¼ã¨ãã
+              cdl_error( "S1169 $1: non-size_is pointer cannot be initialized with array initializer" , a.get_identifier )
+            end
+          end
+        end
+      end
+    }
+
+    # æªåæåã®å±æ§ããã§ãã¯
+    @celltype.get_attribute_list.each { |a|
+      b_init = false
+      # self.show_tree 1
+      if a.get_initializer then                               # ã»ã«ã¿ã¤ãã§åæåããã¦ãã
+        b_init = true
+        # @in_composite ã§ export ããã¦ããå ´åã«ã¯ããã®åæå¤ã¯ä½¿ãããªã
+        # export ããã¦ãããããªãã«é¢ããããåæåããã¦ãããã¨ãä¿è¨¼ããã
+      elsif @join_list.get_item( a.get_name ) then            # ã»ã«ã§åæåããã¦ãã
+        b_init = true
+      elsif @in_composite && @compositecelltypejoin_list then
+        # å±æ§ã export ããã¦ãããèª¿ã¹ããexport ããã¦ããã°æªåæåã¨ã¯ããªã
+        # mikan ãªãã¢ãµã¼ã
+        @compositecelltypejoin_list.get_items.each{ |cj|
+          # å±æ§åã¨ composite ã® export ããååã¯ä¸è´ããã
+          if a.get_name.to_sym == cj.get_cell_elem_name.to_sym then
+            b_init = true    # å±æ§ã¯ export ããã¦ããã®ã§ãã¨ããããæªåæåã¨ã¯ããªã
+          end
+        }
+        if b_init then
+          # size_is ã®å¼æ°ããããããããã§ãã¯ãã
+          # å
+é¨ã»ã«ã® size_is ãã¨ã¯ã¹ãã¼ããã size_is ã¨ãããããããã§ãã¯ãã
+          # å
+é¨ã»ã«ã¨ã¨ã¯ã¹ãã¼ãã§ååãå¤ãã¦ããå¯è½æ§ãããã®ã§ãå
+é¨ã»ã«ã® size_is ã®ååãå¤æããä¸ã§ãã§ãã¯ãã
+          if a.get_size_is then
+            ### p "attr: get_size_is"
+            cj = @compositecelltypejoin_list.get_item a.get_name.to_sym
+            if cj.get_port_decl.instance_of? Decl then
+              ### p "attr: get_size_is 2"
+              # cj_size_is ã¯ãå¤é¨å
+¬éããã attr ã® size_is
+              cj_size_is = cj.get_port_decl.get_size_is
+              if cj_size_is == nil then
+                cdl_error( "S1170 \'$1\' has size_is but export attr \'$2\' doesn't have", a.get_name, cj.get_name )
+              end
+              exprs = a.get_size_is.to_s
+              ### p "exprs : ", exprs
+              remain = exprs
+              inner_to_export = {}
+			  ### exprs ã«å«ã¾ããè­å¥å­ãæãåºããå¯¾å¿ãã export ãããååãæ¢ã
+              while remain != "" && remain != nil
+                ### p "remain ", remain
+                remain =~ /([^\w]*)([_A-Za-z][\w\d]*)/   # å¤æ°åæå­åãåãåºã 
+				if $2 == nil then
+						break
+				end
+                arg_name = $2.to_sym
+                remain = $'
+                ### p exprs, $1, $2, $'
+                # size_is ã«å«ã¾ããå¤æ°ã¯ãcomposite ã§ export ããã¦ããã
+                cj2 = nil
+                @compositecelltypejoin_list.get_items.each{ |cj2t|
+                  if cj2t.get_cell_elem_name == arg_name then
+                    cj2 = cj2t
+                  end
+                }
+                if cj2 == nil then
+                  cdl_error( "S1171 \'$1\' size_is argument of \'$2\' not exported", a.get_name, cj.get_name )
+                  next
+                end
+                if cj2.get_port_decl.instance_of? Decl then
+                   decl2 = cj2.get_port_decl
+                   # å
+é¨ã®ååã¨å¤é¨ã®ååã®å¯¾å¿é¢ä¿ãè¨æ¶
+                   inner_to_export[arg_name] = decl2.get_name
+                # else cj2 ã¯ Port (æ¢ã«ã¨ã©ã¼)
+                end
+              end
+              # å
+é¨ã®ååãå¤é¨ã®ååã§ç½®æ
+              inner_to_export.each{ |arg_name, exp_name|
+                ### p "changing #{arg_name}=>#{exp_name}"
+                # exprs.gsub!( Regexp.new("#{arg_name}[^0-9A-Za-z_]"), exp_name.to_s )
+                exprs.gsub!( Regexp.new("#{arg_name}(\\W)"), exp_name.to_s+"\\1" )  # æå­åæ«å°¾ã«ãªãã±ã¼ã¹
+                exprs.gsub!( Regexp.new("#{arg_name}\\Z"), exp_name.to_s )          # æå­åæ«å°¾ã«ããã±ã¼ã¹
+              }
+              ### p "changed: #{exprs} #{cj_size_is.to_s}"
+              if exprs != cj_size_is.to_s then
+                cdl_error( "S1172 \'$1\' size_is argument mismatch with exporting one \'$2\'", a.get_name, cj.get_name )
+              end
+            # else cj ã¯ Port (æ¢ã«ã¨ã©ã¼)
+            end
+          end
+        end    
+      end
+
+      if b_init == false then
+          cdl_error( "S1052 attribute \'$1\' not initialized in cell \'$2\'" , a.get_name, @name )
+      end
+   
+    }
+  end
+
+  #=== Cell# é require ããã§ãã¯ãã
+  # é require æå®ãããåãå£ã«è¤æ°ã®çµåããªãããã§ãã¯ãã
+  # composite ã®å
+é¨ã»ã« (f_cloned=true) ããã§ãã¯ãã
+  def check_reverse_require
+    # celltype ããªããã°ãã§ãã¯ããªãï¼æ¢ã«ã¨ã©ã¼ï¼
+    return if @celltype == nil
+    return if @b_defined == false
+
+    # p "check reverse require   #{@name}"
+    # érequire æå®ãããåãå£ã«è¤æ°ã®çµåããªãããã§ãã¯
+    @referenced_port_list.each{ |port,count|
+      # p port.class, count
+      # p port.get_name, port.get_port_type, port.get_signature.get_name
+      if port.is_reverse_required? && count > 1 then
+        cdl_warning( "W1009 $1: fixed join entry port has multi join", port.get_name )
+      end
+    }
+  end
+
+  #=== Cell# require å¼ã³å£ã®çµåãè¡ã
+  # STAGE: S
+  #cp_name:: Symbol           : å¼ã³å£å
+  #cell_or_t:: Celltype|Cell  : celltype ã® require ã®å³è¾ºã§æå®ãããã»ã«ã¿ã¤ãã¾ãã¯ã»ã«
+  #port::  Port               : celltype ã® Port ãªãã¸ã§ã¯ã
+  def set_require_join( cp_name, cell_or_ct, port )
+
+    # set_require_join ã¯2åº¦å¼ã³åºããã
+    # 2åº¦ç®ã¯ post ã³ã¼ããçæããå¾       #####  ãã£ããè¦åããï¼éè¤ã¨ã©ã¼ãè¦éãï¼
+    # if @require_joined_list[ cp_name ] then
+    #   return
+    # else
+    #   @require_joined_list[ cp_name ] = true
+    # end
+
+    dbgPrint "set_require_join: #{@name}.#{cp_name} = #{cell_or_ct.get_name}.#{port.get_name}\n"
+
+    if cell_or_ct.instance_of? Celltype then
+      # print "DOMAIN: not considered\n"
+      cell = cell_or_ct.get_singleton_cell @region
+      if cell == nil then
+        cdl_error( "S1025 not found reachable cell for require \'$1\' in celltype \'$2\'" , port.get_name, cell_or_ct.get_name )
+        return
+      end
+    else
+      # require: cell ã§æå®
+      cell = cell_or_ct
+      if @region.distance( cell.get_region ) == nil then
+        cdl_error( "S1026 required cell \'$1\' not reachable" , cell.get_name )
+      end
+    end
+
+    if @join_list.get_item( cp_name ) then
+      cdl_warning( "W1003 $1 : require call port overridden in $2" , cp_name, @name )
+    else
+      # require ã® join ãçæ(å¼ã³å£ã®çµå)
+#      rhs = Expression.new( [ :OP_DOT, [ :IDENTIFIER, Token.new( cell.get_name, nil, nil, nil ) ],
+      nsp = NamespacePath.new( cell.get_name, false, cell.get_namespace )
+      nsp.set_locale @locale
+      rhs = Expression.new( [ :OP_DOT, [ :IDENTIFIER, nsp ],
+                              Token.new( port.get_name, nil, nil, nil ) ], @locale )   #1
+      join = Join.new( cp_name, nil, rhs, @locale )
+      self.new_join( join )
+
+      join.set_definition( @celltype.find(join.get_name) )
+    end
+  end
+
+  #=== Cell# Join ã® definition ã®è¨­å®ã¨ãã§ãã¯
+  # STAGE: S
+  def set_definition_join
+    return if @celltype == nil    # æ¢ã«ã¨ã©ã¼ï¼æã¡åã
+    return if @b_defined == false # ãã­ãã¿ã¤ãå®£è¨ã®ã¿
+    return if @b_checked == true  # æ¢ã«è¨­å®ï¼ãã§ãã¯ï¼æ¸ã¿
+
+    dbgPrint "set_definition_join in #{@name}\n"
+
+    # relay allocator ããã©ã£ã¦åå
+¥ããªããããå
+é ­ã§ @b_checked ã true ã«ãã
+    @b_checked = true
+
+    if ! @f_cloned then
+      check_restrict_list
+      
+      # compoiste ã»ã«ã®ã¯ã­ã¼ã³ããããã®ã¯ãset_definition ä¸è¦
+      # å
+ã® join ã¯æ¢ã« definition ããã¦ãã
+      # å
+ã®ã»ã«ã«ããã¦ãä»£å
+¥ãã§ãã¯ããã¦ããã®ã§ãäºéã«ãã§ãã¯(throughé©ç¨)ããã¦ãã¾ã
+      @join_list.get_items.each{ |join|
+        dbgPrint " set_definition_join: checking #{@name}.#{join.get_name}\n"
+        if join.get_array_member then
+          port = @celltype.find(join.get_name)
+          join.get_array_member2.each { |am|
+            if am == nil then   # æªçµåã®å ´åãã¨ã©ã¼ãã§ãã¯ã¯ check_join
+              if port && ! port.is_optional? then
+                # ãã¹ãç¨ã«ã¨ã©ã¼ã¡ãã»ã¼ã¸åºå
+                # cdl_error( "TEMPORAL set_definition_join: uninitialized array member"  )
+              end
+              next
+            end
+            am.set_definition( port )
+          }
+        else
+          join.set_definition( @celltype.find(join.get_name) )
+        end
+      }
+    end
+
+    # ãªã¬ã¼ join ã¯ through ãã©ã°ã¤ã³çæå¾ã«ããã§ããªã
+    # through å¾ã«çµåå
+ãå
+¥ãæ¿ãããã 
+    create_relay_allocator_join
+
+    # composite ã»ã«ã®å±é
+    if ! @in_composite && ! @f_cloned && @celltype.instance_of?( CompositeCelltype ) then
+      # composite ã»ã«ã¿ã¤ãå
+ã® composite ã¯å±éããªã
+      # compoiste ã»ã«å±éä¸­ã® composite ã¯å±éããªã (CompositeCelltype::expand å
+ã§åå¸°çã« expnad)
+      expand
+    end
+
+    # celltype ã« generate ãæå®ããããã¦ããã
+    celltype_plugin = @celltype.get_celltype_plugin
+    if celltype_plugin then
+      begin
+        celltype_plugin.new_cell self
+      rescue Exception => evar
+        cdl_error( "S1037 $1: celltype plugin fail to new_cell" , celltype_plugin.class.name )
+        print_exception( evar )
+      end
+    end
+  end
+
+  #=== Cell# composite ã»ã«ã®å±é
+  # ãã®ã»ã«ã composite ã»ã«ã¿ã¤ã
+  def expand
+
+    #debug
+    dbgPrint "expanding #{@name} #{@celltype.get_name}\n"
+
+    # å±éãããã»ã«ã®ãªã¹ã
+    @@cloned_cell_list = {}
+
+    # composite celltype ã® cell ãå±é
+    @cell_list, @cell_list2 = @celltype.expand( @name, @global_name, @NamespacePath, @join_list, @region, @plugin, @locale )
+
+    # ãã­ãã¿ã¤ããåç
+§ããã¦ããå ´åãå­ãåç
+§ããã¦ãããã¨ã«ãã
+    if @f_ref then
+      dbgPrint "expand: set_f_ref\n"
+      set_f_ref
+    end
+
+    # å¼ã³å£ã®å³è¾ºã®ã»ã«ã clone ãããã®ã«å¤æ´
+    self.change_rhs_port
+
+    # ãã­ãã¿ã¤ãå®£è¨ã§è¨­å®ããã¦ãããã®ãåæ ãã
+    @entry_array_max_subscript.each{ |port,name|
+      set_entry_inner_port_max_subscript( port, name )
+    }
+  end
+
+  #=== Cell#restrict ãè¿½å 
+  def add_restrict( entry_name, func_name, region_name_list )
+    if @restrict_list[ entry_name ] then
+      if @restrict_list[ entry_name ][ func_name ] then
+        @restrict_list[ entry_name ][ func_name ].each{ |rn|
+          if region_name_list.include? rn then
+            # p func_name
+            name = func_name ? entry_name : entry_name+"."+func_name
+            cdl_warning( "W9999 $1 restrict region duplicate $2", name, rn )
+          end
+        }
+      else
+        @restrict_list[ entry_name ][ func_name ] = region_name_list
+      end
+    else
+      func_list = { }
+      func_list[ func_name ] = region_name_list
+      @restrict_list[ entry_name ] = func_list
+    end
+    # pp @restrict_list
+  end
+
+  #=== Cell#check_restrict_list
+  def check_restrict_list
+    @restrict_list.each{ |entry_name, func_hash|
+      func_hash.each{ |func_name, region_list|
+        region_list.each{ |rn|
+          obj = Namespace.find [ rn ]
+          if ( obj.kind_of? Region ) then
+            if obj.get_domain_root != @region.get_domain_root then
+            else
+              cdl_warning( "W9999 $1 in same domain", rn )
+            end
+          else
+            cdl_error( "S9999 $1 not region", region )
+          end
+        }
+      }
+    }
+  end
+
+  #=== Cell#callable?
+  def callable?( callee_cell, entry_name, func_name )
+    res = callee_cell.callable_from?( entry_name, func_name, self )
+    dbgPrint "callable? #{callee_cell.get_namespace_path}.#{entry_name}.#{func_name} from #{@NamespacePath} is #{res}\n"
+    return res
+  end
+
+  #=== Cell#callable_from? (private)
+  def callable_from?( entry_name, func_name, caller_cell )
+    if @restrict_list.length == 0 then
+      return true
+    end
+
+    if @restrict_list[entry_name] then
+      if @restrict_list[entry_name][nil] &&
+         @restrict_list[entry_name][nil].include?( caller_cell.get_region.get_domain_root.get_name )then
+        return true
+      end
+      if @restrict_list[entry_name][func_name] &&
+         @restrict_list[entry_name][func_name].include?( caller_cell.get_region.get_domain_root.get_name )then
+        return true
+      else
+        return false
+      end
+    else
+      return true
+    end
+  end
+  
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "Cell: name: #{@name} in_composite: #{@in_composite} def: #{@b_defined} ref: #{@f_ref} cloned: #{@f_cloned}"
+    (indent+1).times { print "  " }
+    puts "Cell locale: #{@name}@#{@locale[0]}##{@locale[1]}"
+    (indent+1).times { print "  " }
+    puts "id: #{@id}  global_name: #{@global_name}  region: #{@region.get_name} plugin: #{@plugin.class.name} #{self}"
+    (indent+1).times { print "  " }
+    puts "namespace_path: #{@NamespacePath}"
+
+    if @celltype then
+      (indent+1).times { print "  " }
+      puts "celltype: #{@celltype.get_name}"
+    end
+    @join_list.show_tree( indent + 1 )
+    @entry_array_max_subscript.each{ |port, num|
+      (indent+1).times { print "  " }
+      puts "entry array #{port.get_name}: max subscript=#{num}"
+    }
+    if @cell_list then   # ããã§ @cell_list ã nil ãªã®ã¯ Bug
+      (indent+1).times { print "  " }
+      puts "cloned cell list:"
+      @cell_list.each { |n,c|
+        (indent+2).times { print "  " }
+        puts "inner cell : #{n} = #{c.get_name}"
+      }
+    end
+    if @compositecelltypejoin_list then
+      @compositecelltypejoin_list.get_items.each{ |cj|
+        cj.show_tree( indent+1 )
+      }
+    end
+    if @alloc_list.length > 0 then
+      (indent+1).times { print "  " }
+      puts "allocator list: "
+      @alloc_list.each { |a|
+        cp_name = :"#{a[0+1]}_#{a[2+1]}_#{a[3+1]}"
+        if a[1+1] then
+          # subscript = "[#{a[1+1].eval_const nil}]"
+          subscript = "[#{a[1+1]}]"
+        else
+          subscript = ""
+        end
+        # ã¢ã­ã±ã¼ã¿å¼ã³å£ã®çµåãçæ
+        (indent+2).times { print "  " }
+        puts "#{cp_name}#{subscript} = #{a[4+1]}"
+      }
+    end
+    @referenced_port_list.each{ |port,count|
+      (indent+1).times { print "  " }
+      puts( "#{port.get_name} : #{count} times referenced" )
+    }
+  end
+
+end
+
+class CompositeCelltype < NSBDNode # < Nestable
+# @name:: str
+# @global_name:: str
+# @cell_list:: NamedList   Cell
+# @export_name_list:: NamedList : CompositeCelltypeJoin
+# @port_list:: CompositeCelltypeJoin[]
+# @attr_list:: CompositeCelltypeJoin[]
+# @b_singleton:: bool : 'singleton' specified
+# @b_active:: bool : 'active' specified
+# @real_singleton:: bool : has singleton cell in this composite celltype
+# @real_active:: bool : has active cell in this composite celltype
+# @name_list:: NamedList item: Decl (attribute), Port ã¨ã¯ã¹ãã¼ãå®ç¾©
+# @internal_allocator_list:: [ [cell, internal_cp_name, port_name, func_name, param_name, ext_alloc_ent], ... ]
+
+  @@nest_stack_index = -1
+  @@nest_stack = []
+  @@current_object = nil
+
+  def self.push
+    @@nest_stack_index += 1
+    @@nest_stack[ @@nest_stack_index ] = @@current_object
+    @@current_object = nil
+  end
+
+  def self.pop
+    @@current_object = @@nest_stack[ @@nest_stack_index ]
+    @@nest_stack_index -= 1
+    if @@nest_stack_index < -1 then
+      raise "TooManyRestore"
+    end
+  end
+
+  def initialize( name )
+    super()
+    @name = name
+    @cell_list = NamedList.new( nil, "in composite celltype #{name}" )
+    @export_name_list = NamedList.new( nil, "export in composite celltype #{name}" )
+    @name_list = NamedList.new( nil, "in composite celltype #{name}" )
+    @@current_object = self
+
+    @b_singleton = false
+    @real_singleton = nil
+    @b_active = false
+    @real_active = nil
+    if "#{Namespace.get_global_name}" == "" then
+      @global_name = @name
+    else
+      @global_name = :"#{Namespace.get_global_name}_#{@name}"
+    end
+
+    Namespace.new_compositecelltype( self )
+    set_namespace_path # @NamespacePath ã®è¨­å®
+
+    @port_list = []
+    @attr_list = []
+    @internal_allocator_list = []
+    set_specifier_list( Generator.get_statement_specifier )
+  end
+
+  def self.end_of_parse
+    @@current_object.end_of_parse
+    @@current_object = nil
+  end
+
+  # CompositeCelltype#end_of_parse
+  def end_of_parse
+
+    # singleton ã«é¢ãããã§ãã¯
+    if @b_singleton && @real_singleton == nil then
+      cdl_warning( "W1004 $1 : specified singleton but has no singleton in this celltype" , @name )
+    elsif ! @b_singleton && @real_singleton != nil then
+      if ! @b_singleton then
+        cdl_error( "S1053 $1 must be singleton. inner cell \'$2\' is singleton" , @name, @real_singleton.get_name )
+      end
+    end
+
+    # active ã«é¢ãããã§ãã¯
+    if @b_active && @real_active == nil then
+      cdl_error( "S1054 $1 : specified active but has no active in this celltype" , @name )
+    elsif ! @b_active && @real_active != nil then
+      cdl_error( "S1055 $1 must be active. inner cell \'$2\' is active" , @name, @real_active.get_name )
+    end
+
+    # @allocator_instance ãè¨­å®ãã
+    @name_list.get_items.each{ |n|
+      if n.instance_of? Port then
+        n.set_allocator_instance
+      end
+    }
+
+    # ãªã¬ã¼ã¢ã­ã±ã¼ã¿ã® entry å´
+    @port_list.each{ |p|
+      if p.get_port_type == :ENTRY then
+        if p.get_allocator_instance == nil then
+          next
+        end
+
+        p.get_allocator_instance.each{ |name,ai|
+          if ai[0] == :RELAY_ALLOC then
+            self.new_join( :"#{p.get_name}_#{ai[4]}_#{ai[5]}", p.get_cell_name, :"#{p.get_cell_elem_name}_#{ai[4]}_#{ai[5]}", :CALL )
+          end
+        }
+      end
+    }
+    # mikan relay ãæ­£ããæãã¦ããããã§ãã¯ããã¦ããªã
+
+    # æå³è§£æ
+    @cell_list.get_items.each{ |c|
+      c.set_definition_join
+    }
+
+    # cell ã®æªçµåã®å¼ã³å£ããªãããã§ãã¯
+    @cell_list.get_items.each{ |c|
+      c.check_join
+      c.check_reverse_require
+    }
+
+    # å¼ã³å£ã®çµåã«ã¤ãã¦ãexport ã¨å
+é¨çµåã®ä¸¡æ¹ããªãããã§ãã¯
+    # ãªã¬ã¼ã¢ã­ã±ã¼ã¿ãå
+é¨ã¢ã­ã±ã¼ã¿ã®è¨­å®
+    @port_list.each{ |p|
+      p.check_dup_init
+    }
+
+    # ãã¹ã¦ã®ã¨ã¯ã¹ãã¼ãå®ç¾©ã«å¯¾å¿ããå¼ã³å£ãåãå£ãå±æ§ãå­å¨ããããã§ãã¯
+    @name_list.get_items.each{ |n|
+      if( @export_name_list.get_item( n.get_name ) == nil )then
+        cdl_error( "S1056 $1 : cannot export, nothing designated" , n.get_name )
+      end
+    }
+
+    # å
+é¨ã¢ã­ã±ã¼ã¿ãè¨­å®ãã
+    @internal_allocator_list.each{ |cell, cp_internal_name, port_name, fd_name, par_name, ext_alloc_ent|
+      res = ext_alloc_ent.get_allocator_rhs_elements( :INTERNAL_ALLOC )
+      ep_name = res[0]
+      cj = @export_name_list.get_item( ep_name )
+      internal_alloc_name_from_port_def = cj.get_cell_name
+      internal_alloc_ep_name_from_port_def = cj.get_cell_elem_name
+
+      # puts "internal_allocator #{cell.get_name} #{cp_internal_name} #{port_name}.#{fd_name}.#{par_name}"
+      cell.get_allocator_list.each{ |a|
+        # puts "allocator_list of #{cell.get_name} #{a[0]} #{a[1]}.#{a[2]}.#{a[3]}.#{a[4]} #{a[5].to_s}"
+        if cp_internal_name == :"#{a[1]}_#{a[3]}_#{a[4]}" then
+          dbgPrint "internal_allocator {cp_internal_name} #{a[1]}_#{a[3]}_#{a[4]}\n"
+          dbgPrint "internal_allocator: #{a[5]}, #{internal_alloc_name_from_port_def}.#{internal_alloc_ep_name_from_port_def}\n"
+          if a[5].to_s != "#{internal_alloc_name_from_port_def}.#{internal_alloc_ep_name_from_port_def}" then
+            cdl_error( "S1173 $1: allocator mismatch from $2's allocator", "#{port_name}.#{fd_name}.#{par_name}", cell.get_name  )
+          end
+        end
+      }
+    }
+  end
+
+ ### cell (CompositeCelltype)
+  def self.new_cell( cell )
+    @@current_object.new_cell( cell )
+
+  end
+
+  def new_cell( cell )
+    cell.set_owner self  # Cell (in_omposite)
+    @cell_list.add_item( cell )
+    if cell.get_celltype then    # nil ãªãã°ããã§ã«ã»ã«ã¿ã¤ããªãã¨ã©ã¼
+      if cell.get_celltype.is_singleton? then
+        @real_singleton = cell
+      end
+      if cell.get_celltype.is_active? then
+        @real_active = cell
+      end
+    end
+  end
+
+ ### join
+  def self.new_join( export_name, internal_cell_name,
+			 internal_cell_elem_name, type )
+    @@current_object.new_join( export_name, internal_cell_name,
+					 internal_cell_elem_name, type )
+    
+  end
+
+  #=== CompositeCelltype# CompositeCelltypeJoin ãä½æ
+  # STAGE: B
+  #export_name:: Symbol : å¤é¨ã«å
+¬éããåå
+  #internal_cell_name:: Symbol : å
+é¨ã»ã«å
+  #internal_cell_elem_name:: Symbol : å
+é¨ã»ã«ã®è¦ç´ åï¼å¼ã³å£åãåãå£åãå±æ§åã®ããããï¼
+  #type::  :CALL, :ENTRY, :ATTRIBUTE ã®ããããï¼æ§æè¦ç´ ã¨ãã¦ããã¹ããã®ï¼
+  #RETURN:: Decl | Port : ã¨ã¯ã¹ãã¼ãå®ç¾©
+  # new_join ã¯
+  #   cCall => composite.cCall;     (ã»ã«å
+)
+  #   attr = composite.attr;        (ã»ã«å
+)
+  #   composite.eEnt => cell2.eEnt; (ã»ã«å¤)
+  # ã®æ§æè¦ç´ ã®åºç¾ã«å¯¾ãã¦å¼ã³åºããã
+  def new_join( export_name, internal_cell_name,
+		 internal_cell_elem_name, type )
+
+    dbgPrint "new_join: #{export_name} #{internal_cell_name} #{internal_cell_elem_name}\n"
+
+    cell = @cell_list.get_item( internal_cell_name )
+    if cell == nil then
+      cdl_error( "S1057 $1 not found in $2" , internal_cell_name, @name )
+      return
+    end
+
+    celltype = cell.get_celltype
+    return if celltype == nil	# celltype == nil ãªããã§ã«ã¨ã©ã¼
+
+    # å
+é¨ã»ã«ã®ã»ã«ã¿ã¤ãããå¯¾å¿è¦ç´ ãæ¢ã
+    # ãã®ã¡ã½ããã¯ãæ§æä¸ãå¼ã³å£ãåãå£ãå±æ§ãè¨è¿°ã§ããç®æããå¼åºããã
+    # æ§æä¸ã®å¼åºãä½ç½®ï¼è¨è¿°ä½ç½®ï¼ã¨ãè¦ç´ ãå¯¾å¿ãããã®ããã§ãã¯
+    obj = celltype.find( internal_cell_elem_name )
+    if obj.instance_of?( Decl ) then
+      if obj.get_kind == :VAR then
+        cdl_error( "S1058 \'$1\' : cannot export var" , internal_cell_elem_name )
+        return
+      elsif type != :ATTRIBUTE then
+        cdl_error( "S1059 \'$1\' : exporting attribute. write in cell or use \'=\' to export attribute" , export_name )
+        # return æ¬¡ã®ã¨ã©ã¼ãé¿ããããã«å¦çç¶è¡ããä»ãå ãã¦ã¿ã
+      end
+    elsif obj.instance_of?( Port ) then
+      if obj.get_port_type != type then
+        cdl_error( "S1060 \'$1\' : port type mismatch. $2 type is allowed here." , export_name, type )
+        # return æ¬¡ã®ã¨ã©ã¼ãé¿ããããã«å¦çç¶è¡ããä»ãå ãã¦ã¿ã
+      end
+    else
+      cdl_error( "S1061 \'$1\' : not defined" , internal_cell_elem_name )
+      dbgPrint "S1061 CompositeCelltypeJoin#new_join: #{export_name} => #{internal_cell_name}.#{internal_cell_elem_name} #{type}\n"
+      return
+    end
+
+    # ã¨ã¯ã¹ãã¼ãå®ç¾©ã¨ä¸è´ãããã©ãããã§ãã¯
+    obj2 = @name_list.get_item( export_name )
+    if( obj2 == nil )then
+      cdl_error( "S1062 $1 has no export definition" , export_name )
+    elsif obj2.instance_of?( Decl ) then
+      if( ! obj.instance_of? Decl )then
+        cdl_error( "S1063 $1 is port but previously defined as an attribute" , export_name )
+      elsif ! obj.get_type.equal? obj2.get_type then
+        cdl_error( "S1064 $1 : type \'$2$3\' mismatch with pprevious definition\'$4$5\'" , export_name, obj.get_type.get_type_str, obj.get_type.get_type_str_post, obj2.get_type.get_type_str, obj2.get_type.get_type_str_post )
+      end
+    elsif obj2.instance_of?( Port ) then
+      if( obj.instance_of? Port )then
+        if( obj.get_port_type != obj2.get_port_type )then
+          cdl_error( "S1065 $1 : port type $2 mismatch with previous definition $3" , export_name, obj.get_port_type, obj2.get_port_type )
+        elsif obj.get_signature != obj2.get_signature then
+          if obj.get_signature != nil && obj2.get_signature != nil then
+            # nil ãªãã°æ¢ã«ã¨ã©ã¼ãªã®ã§å ±åããªã
+            cdl_error( "S1066 $1 : signature \'$2\' mismatch with previous definition \'$3\'" , export_name, obj.get_signature.get_name, obj2.get_signature.get_name )
+          end
+        elsif obj.get_array_size != obj2.get_array_size then
+          cdl_error( "S1067 $1 : array size mismatch with previous definition" , export_name )
+        elsif obj.is_optional? != obj2.is_optional? then
+          cdl_error( "S1068 $1 : optional specifier mismatch with previous definition" , export_name )
+        elsif obj.is_omit? != obj2.is_omit? then
+          cdl_error( "S9999 $1 : omit specifier mismatch with previous definition" , export_name )
+        end
+      else
+        cdl_error( "S1069 $1 is an attribute but previously defined as a port" , export_name )
+      end
+    end
+
+    join = CompositeCelltypeJoin.new( export_name, internal_cell_name,
+				 internal_cell_elem_name, cell, obj2 )
+    join.set_owner self   # CompositeCelltypeJoin
+    cell.add_compositecelltypejoin join
+
+    # debug
+    dbgPrint "compositecelltype join: add #{cell.get_name} #{export_name} = #{internal_cell_name}.#{internal_cell_elem_name}\n"
+
+    if obj.instance_of?( Decl ) then
+      # attribute
+#      # å
+é¨ããå¤é¨ã¸è¤æ°ã®çµåããªãããã§ãã¯
+#      found = false
+#      @attr_list.each{ |a|
+#        if a.get_name == join.get_name then
+#          found = true
+#          break
+#        end
+#      }
+#      if found == false then
+        @attr_list << join
+#      end
+    else
+      # call/entry port
+#      # å
+é¨ããå¤é¨ã¸è¤æ°ã®çµåããªãããã§ãã¯
+#      found = false
+#      @port_list.each{ |port|
+#        if port.get_name == join.get_name then
+#          found = true
+#          break
+#        end
+#      }
+#      if found == false then
+        @port_list << join
+#      end
+    end
+
+    # join ã @export_name_list ã«ç»é²ï¼éè¤ãã§ãã¯ã¨ã¨ãã«ï¼å¾ã§è¡ããã CompositeCelltypeJoin ã® clone ã«åããï¼
+    if obj.instance_of?( Decl ) && @export_name_list.get_item( export_name ) then
+      # æ¢ã«å­å¨ãããè¿½å ããªããæ°ä»æ§ã§ã¯ã@export_name_list ã«åãååãå«ã¾ãããã¨ãããã
+    elsif obj.instance_of?( Port ) && obj.get_port_type == :CALL && @export_name_list.get_item( export_name ) then
+      # æ¢ã«å­å¨ãããè¿½å ããªããæ°ä»æ§ã§ã¯ã@export_name_list ã«åãååãå«ã¾ãããã¨ãããã
+    else
+      @export_name_list.add_item( join )
+    end
+
+    # export ãããã¼ãã«å«ã¾ãã send/receive ãã©ã¡ã¼ã¿ã®ã¢ã­ã±ã¼ã¿(allocator)å¼ã³å£ãã»ã«ã¨çµå
+    if obj2.instance_of? Port then
+      obj2.each_param{ |port, fd, par|
+        case par.get_direction                        # å¼æ°ã®æ¹åæå®å­ (in, out, inout, send, receive )
+        when :SEND, :RECEIVE
+          cp_name = :"#{port.get_name}_#{fd.get_name}_#{par.get_name}"     # ã¢ã­ã±ã¼ã¿å¼ã³å£ã®åå
+          #            ãã¼ãå         é¢æ°å         ãã©ã¡ã¼ã¿å
+          cp_internal_name = :"#{internal_cell_elem_name}_#{fd.get_name}_#{par.get_name}"
+
+          # ãªã¬ã¼ã¢ã­ã±ã¼ã¿ or å
+é¨ã¢ã­ã±ã¼ã¿æå®ããªããã¦ããå ´åãã¢ã­ã±ã¼ã¿å¼ã³å£ãè¿½å ããªã
+          # ãã®æç¹ã§ã¯ get_allocator_instance ã§ã¯å¾ãããªããã tmp ãå¾ã
+          if port.get_allocator_instance_tmp then
+            found = false
+            port.get_allocator_instance_tmp.each { |s|
+              if s[1] == fd.get_name && s[2] == par.get_name then
+                found = true
+
+                if s[0] == :INTERNAL_ALLOC then
+                  # å
+é¨ã¢ã­ã±ã¼ã¿ã®å ´å    # mikan ããã¯å
+é¨ã®ã»ã«ã«ç´çµãããå¤é¨ã®ãã¼ãã«æ¹ããã¹ã
+                  @internal_allocator_list << [ cell, cp_internal_name, port.get_name, fd.get_name, par.get_name, s[3] ]
+                end
+              end
+            }
+            if found == true
+              next
+            end
+          end
+
+          # å¤é¨ã¢ã­ã±ã¼ã¿ã®å ´å
+          new_join( cp_name, internal_cell_name, cp_internal_name, :CALL )
+        end
+      }
+    end
+
+    # ã¨ã¯ã¹ãã¼ãå®ç¾©ãè¿ã
+    return obj2
+  end
+
+  def self.has_attribute? attr
+    @@current_object.has_attribute? attr
+  end
+
+  def has_attribute? attr
+    @name_list.get_item( attr ) != nil
+  end
+
+  def self.new_port port
+    @@current_object.new_port port
+  end
+
+  #=== CompositeCelltype# new_port
+  def new_port port
+    port.set_owner self   # Port (CompositeCelltype)
+    dbgPrint "new_port: #{@owner.get_name}.#{port.get_name}\n"
+    @name_list.add_item port
+
+    # export ãããã¼ãã«å«ã¾ãã send/receive ãã©ã¡ã¼ã¿ã®ã¢ã­ã±ã¼ã¿å¼ã³å£ã® export ãçæãã¦ãã¼ãã«è¿½å 
+    # ãã®æç¹ã§ã¯å
+é¨ã¢ã­ã±ã¼ã¿ãã©ããå¤æ­ã§ããªãã®ã§ãã¨ããããçæãã¦ãã
+    port.each_param { |port, fd, par|
+      case par.get_direction                        # å¼æ°ã®æ¹åæå®å­ (in, out, inout, send, receive )
+      when :SEND, :RECEIVE
+        #### ãªã¬ã¼ã¢ã­ã±ã¼ã¿ or å
+é¨ã¢ã­ã±ã¼ã¿æå®ããªããã¦ããå ´åãã¢ã­ã±ã¼ã¿å¼ã³å£ãè¿½å ããªã
+        # å
+é¨ã¢ã­ã±ã¼ã¿æå®ããªããã¦ããå ´åãã¢ã­ã±ã¼ã¿å¼ã³å£ãè¿½å ããªã
+        # ãã®æç¹ã§ã¯ get_allocator_instance ã§ã¯å¾ãããªããã tmp ãå¾ã
+        if port.get_allocator_instance_tmp then
+          found = false
+          port.get_allocator_instance_tmp.each { |s|
+            if s[0] == :INTERNAL_ALLOC && s[1] == fd.get_name && s[2] == par.get_name then
+              found = true
+              break
+            end
+          }
+          if found == true
+            next
+          end
+        end
+
+        if par.get_allocator then
+          cp_name = :"#{port.get_name}_#{fd.get_name}_#{par.get_name}"     # ã¢ã­ã±ã¼ã¿å¼ã³å£ã®åå
+          #           ãã¼ãå          é¢æ°å         ãã©ã¡ã¼ã¿å
+          alloc_sig_path = [ par.get_allocator.get_name ]  # mikan Namespace ã¢ã­ã±ã¼ã¿å¼ã³å£ã®ã·ã°ããã£
+          array_size = port.get_array_size            # å¼ã³å£ã¾ãã¯åãå£é
+åã®ãµã¤ãº
+          created_port = Port.new( cp_name, alloc_sig_path, :CALL, array_size ) # å¼ã³å£ãçæ
+          created_port.set_allocator_port( port, fd, par )
+          if port.is_omit? then
+            created_port.set_omit
+          end
+          new_port( created_port )           # ã»ã«ã¿ã¤ãã«æ°ããå¼ã³å£ãè¿½å 
+        # else
+        #   already error
+        end
+      end
+    }
+  end
+
+  def self.new_attribute attr
+    @@current_object.new_attribute attr
+  end
+
+  #=== CompositeCelltype# new_attribute for CompositeCelltype
+  #attribute:: [Decl]
+  def new_attribute( attribute )
+    attribute.each { |a|
+      a.set_owner self   # Decl (CompositeCelltype)
+      # V1.1.0.10 composite ã® attr ã® size_is ã¯å¯ã¨ãªã£ã
+      # if a.get_size_is then
+      #  cdl_error( "S1070 $1: size_is pointer cannot be exposed for composite attribute" , a.get_name )
+      # end
+      @name_list.add_item( a )
+      if a.get_initializer then
+        a.get_type.check_init( @locale, a.get_identifier, a.get_initializer, :ATTRIBUTE )
+      end
+    }
+  end
+
+  #=== CompositeCelltype# érequire ã®çµåãçæãã
+  def create_reverse_require_join cell
+    @name_list.get_items.each{ |n|
+      if n.instance_of? Port then
+        n.create_reverse_require_join cell
+      end
+    }
+  end
+
+  # false : if not in celltype definition, nil : if not found in celltype
+  def self.find( name )
+    if @@current_object == nil then
+      return false
+    end
+    @@current_object.find name
+  end
+
+  def find name
+    dbgPrint "CompositeCelltype: find in composite: #{name}\n"
+    cell = @cell_list.get_item( name )
+    return cell if cell
+
+    dbgPrint "CompositeCelltype: #{name}, #{@name_list.get_item( name )}\n"
+    return @name_list.get_item( name )
+
+    # å¾æ¥ä»æ§
+#    cj = @export_name_list.get_item( name )
+#p "#{name}, #{cj.get_port_decl}"
+#    if cj then
+#      return cj.get_port_decl
+#    else
+#      return nil
+#    end
+  end
+
+  #=== CompositeCelltype# export ãã CompositeCelltypeJoin ãå¾ã
+  #name:: string:
+  # attribute ã®å ´åãåãååã«å¯¾ãè¤æ°å­å¨ããå¯è½æ§ãããããæåã®ãã®ããè¿ããªã
+  def find_export name
+    return @export_name_list.get_item( name )
+  end
+
+  #=== CompositeCelltype# composite celltype ã® cell ãå±é
+  #name:: string: Composite cell ã®åå
+  #global_name:: string: Composite cell ã® global name (C è¨èªå)
+  #join_list:: NamedList : Composite cell ã«å¯¾ãã Join ã® NamedList
+  #RETURN:
+  # [ { name => cell }, [ cell, ... ] ]
+  #  æ»ãå¤ åã¯ ååâcloneãããå
+é¨ã»ã«ãå¾ãã¯ composite ã®åºç¾é ã®ãªã¹ã
+  def expand( name, global_name, namespacePath, join_list, region, plugin, locale )
+
+    # debug
+    dbgPrint "expand composite: #{@name} name: #{name}  global_name: #{global_name}\njoin_list:\n"
+    join_list.get_items.each{ |j|
+      dbgPrint "   #{j.get_name} #{j}\n"
+    }
+  
+    # å±éã§ clone ãããã»ã«ã®ãªã¹ããå³è¾ºã¯ Cell (composite ã®å ´å composite ãª cell ã® clone)
+    clone_cell_list = {}
+    clone_cell_list2 = []
+
+    #  composite å
+é¨ã®ãã¹ã¦ã® cell ã«ã¤ãã¦
+    @cell_list.get_items.each { |c|
+
+      # debug
+      dbgPrint "expand : cell #{c.get_name}\n"
+
+      # Join ã®é
+å
+      ja = []
+
+      # CompositeCelltype ã export ããå¼ã³å£ãåãå£ãå±æ§ã®ãªã¹ãã«ã¤ãã¦
+      # @export_name_list.get_items.each{ |cj|	# cj: CompositeCelltypeJoin
+      # æ°ä»æ§ã§ã¯ã@export_name_list ã«å
+¥ã£ã¦ããªã attr ããããã
+      (@port_list+@attr_list).each{ |cj|	# cj: CompositeCelltypeJoin
+
+        # debug
+        dbgPrint "        cj : #{cj.get_name}\n"
+
+        # CompositeCelltypeJoin (export) ã®å¯¾è±¡ã»ã«ãï¼
+        if cj.match?( c ) then
+
+          # å¯¾è±¡ã»ã«å
+ã® CompositeCelltype ã® export ãã Join (attribute ã¾ãã¯ call port)
+          j = join_list.get_item( cj.get_name )
+
+          # debug
+          if j then
+            dbgPrint "expand : parent cell: #{name} child cell: #{c.get_name}:  parent's export port: #{cj.get_name}  join: #{j.get_name} #{j}\n"
+          else
+            dbgPrint "expand : parent cell: #{name} child cell: #{c.get_name}:  parent's export port: #{cj.get_name}  join: nil\n"
+          end
+
+          if j then
+            # å¼ã³å£ãå±æ§ã®å ´å
+            #  ComositeCell ç¨ã®ãã®(j) ãå¯¾è±¡ã»ã«ç¨ã« clone (@through_list ãã³ãã¼ããã)
+            # p "expand: cloning Join #{j.get_name} #{@name} #{name}"
+            jc = j.clone_for_composite( @name, name, locale )
+                                        # celltype_name, cell_name
+
+            # debug
+            # p "cn #{jc.get_name} #{cj.get_cell_elem_name}"
+
+            # å¯¾è±¡ã»ã«ã®å¼ã³å£ã¾ãã¯å±æ§ã®ååã«å¤æ´
+            jc.change_name( cj.get_cell_elem_name )
+
+            # å¯¾è±¡ã»ã«ã«å¯¾ãã Join ã®é
+å
+            ja << jc
+          end
+
+          # debug
+          dbgPrint "\n"
+        end
+      }
+
+      # debug
+      dbgPrint "expand : clone #{name}_#{c.get_name}\n"
+
+      # ã»ã«ã® clone ãçæ
+#      clone_cell_list[ "#{name}_#{c.get_name}" ] =  c.clone_for_composite( name, global_name, ja )
+      c2 =  c.clone_for_composite( name, global_name, namespacePath, ja, @name, region, plugin, locale )
+      clone_cell_list[ "#{c.get_local_name}" ] = c2
+      clone_cell_list2 << c2
+
+    }
+
+    clone_cell_list.each { |nm,c|
+      dbgPrint "  cloned: #{nm} = #{c.get_global_name}\n"
+      # join ã® owner ã clone ãããã»ã«ã«å¤æ´ãã V1.1.0.25
+      c.get_join_list.get_items.each{ |j|
+        j.set_cloned( clone_cell_list[ "#{c.get_local_name}" ] )
+      }
+    }
+    return [ clone_cell_list, clone_cell_list2 ]
+  end
+
+  #=== CompositeCelltype æå®å­ãªã¹ãã®è¨­å®
+  def set_specifier_list( spec_list )
+    return if spec_list == nil
+
+    spec_list.each { |s|
+      case s[0]
+      when :SINGLETON
+        @b_singleton = true
+      when :IDX_IS_ID
+        cdl_warning( "W1005 $1 : idx_is_id is ineffective for composite celltype" , @name )
+      when :ACTIVE
+        @b_active = true
+      else
+        cdl_error( "S1071 $1 cannot be specified for composite" , s[0] )
+      end
+    }
+  end
+
+  def get_name
+    @name
+  end
+
+  def get_port_list
+    @port_list
+  end
+
+  def get_attribute_list
+    @attr_list
+  end
+
+  def get_var_list
+    []   # ç©ºã®é
+åãè¿ã
+  end
+
+  def get_internal_allocator_list
+    @internal_allocator_list
+  end
+
+  #== CompositeCelltype# generate æå®å­ã®æ
+å ±
+  # CompositeCelltype ã«ã¯ generate ãæå®ã§ããªãã®ã§ nil ãè¿ã
+  # Celltype::@generate ãåç
+§ã®ãã¨
+  def get_celltype_plugin
+    nil
+  end
+
+  def is_singleton?
+    @b_singleton
+  end
+
+  def is_active?
+    @b_active
+  end
+
+  #=== CompositeCelltype# ã¢ã¯ãã£ãã§ã¯ãªã
+  # active ã§ã¯ãªãã«å ããå
+¨ã¦ã®å
+é¨ã»ã«ã®ã»ã«ã¿ã¤ãã inactive ã®å ´åã« inactive
+  # ï¼å
+é¨ã®ã»ã«ã active ã¾ãã¯ factory ãæã£ã¦ããï¼
+  def is_inactive?
+    if @b_active == false then
+      @cell_list.get_items.each{ |c|
+        if c.get_celltype && c.get_celltype.is_inactive? == false then
+          # c.get_celltype == nil ã®å ´åã¯ã»ã«ã¿ã¤ãæªå®ç¾©ã§ãã§ã«ã¨ã©ã¼
+          return false
+        end
+      }
+      return true
+    else
+      return false
+    end
+  end
+
+  def get_id_base
+    raise "get_id_base"
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "CompositeCelltype: name: #{@name}"
+    (indent+1).times { print "  " }
+    puts "active: #{@b_active}, singleton: #{@b_singleton}"
+    @cell_list.show_tree( indent + 1 )
+    (indent+1).times { print "  " }
+    puts "name_list"
+    @name_list.show_tree( indent + 2 )
+    (indent+1).times { print "  " }
+    puts "export_name_list"
+    @export_name_list.show_tree( indent + 2 )
+    if @internal_allocator_list.length > 0 then
+      (indent+1).times { print "  " }
+      puts "internal_allocator_list:"
+      @internal_allocator_list.each{  |a|
+        (indent+1).times { print "  " }
+        puts "  #{a[0].get_name} #{a[1]} #{a[2]} #{a[3]} #{a[4]}"
+      }
+    end
+  end
+
+end
+
+
+
+#== æ§æè¦ç´ ï¼å£ãè¡¨ãã¯ã©ã¹ï¼ã»ã«ã¿ã¤ãã®å¼ã³å£ãåãå£ï¼
+class Port < BDNode
+# @name::  str
+# @signature:: Signature
+# @port_type::  :CALL, :ENTRY
+# @array_size:: nil: not array, "[]": sizeless, Integer: sized array
+# @reverse_require_cell_path:: NamespacePath :     érequireå¼ã³å
+ã»ã«  mikan namespace (å¼ã³å£ã®ã¿æå®å¯è½)
+# @reverse_require_callport_name:: Symbol:  érequireå¼ã³å
+ã»ã«ã®å¼ã³å£å
+#
+# set_allocator_port ã«ãã£ã¦è¨­å®ãããï¼è¨­å®ãããå ´åããã®ãã¼ãã¯ã¢ã­ã±ã¼ã¿ãã¼ãã§ããã
+# @allocator_port:: Port : ãã®å¼ã³å£ãã§ããå
+ã¨ãªã£ãå¼ã³å£ã¾ãã¯åãå£
+# @allocator_func_decl:: Decl : ãã®å¼ã³å£ãã§ããå
+ã¨ãªã£ãå¼ã³å£ã¾ãã¯åãå£ã®é¢æ°
+# @allocator_param_decl:: ParamDecl : ãã®å¼ã³å£ãã§ããå
+ã¨ãªã£ãå¼ã³å£ã¾ãã¯åãå£ã®ãã©ã¡ã¼ã¿
+#
+# set_specifier ã«ãã£ã¦è¨­å®ããã(
+# @allocator_instance:: Hash : {"func_param" => [ :RELAY_ALLOC, func_name, param_name, rhs_cp_name, rhs_func_name, rhs_param_name ]}
+#                                               [:INTERNAL_ALLOC, func_name, param_name, rhs_ep_name ]
+# @allocator_instance_tmp:: Hash : {"func_param" => [:INTERNAL_ALLOC|:RELAY_ALLOC,  IDENTIFIER, IDENTIFIER, expression ],..}
+#                                                                                    function    parameter   rhs
+#
+# @b_require:: bool : require ã«ããçæããã call port ã®å ´å true
+# @b_has_name:: bool : require : ååããã®ãªã¯ã¯ã¤ã¢å¼ã³å£
+# @b_inline:: bool : entry port ã®ã¿
+# @b_omit:: bool : omit æå®å­ãæå®ããã (call port ã®ã¿)
+# @b_optional:: bool : call port ã®ã¿
+# @b_ref_des:: bool :  ref_desc ã­ã¼ã¯ã¼ããæå®ããã
+# @b_dynamic:: bool :  dynamic ã­ã¼ã¯ã¼ããæå®ããã (å¼ã³å£ã®ã¿)
+#
+# optimize::
+# @celltype:: å±ããã»ã«ã¿ã¤ã
+#
+# :CALL ã®å ´åã®æé©å
+# @b_VMT_useless:: bool                     # VMT é¢æ°ãã¼ãã«ãä½¿ç¨ããªã
+# @b_skelton_useless:: bool                 # ã¹ã±ã«ãã³é¢æ°ä¸è¦   (true ã®æãåãå£é¢æ°ãå¼åºã)
+# @b_cell_unique:: bool                     # å¼ã³å
+ã¯å¯ä¸ã®ã»ã«
+# @only_callee_port:: Port                  # å¯ä¸ã®å¼ã³å
+ãã¼ã
+# @only_callee_cell:: Cell                  # å¯ä¸ã®å¼ã³å
+ã»ã« (@b_PEPDES_in_CB_useless = true ã®ææå¹)
+#
+# :ENTRY ã®å ´åã®æé©åï¼å¼ã³å£æé©åã¨åãå¤æ°åãä½¿ç¨ï¼
+# @b_VMT_useless:: bool                     # VMT é¢æ°ãã¼ãã«ãä¸è¦
+# @b_skelton_useless:: bool                 # ã¹ã±ã«ãã³é¢æ°ä¸è¦
+
+  def initialize( name, sig_path, port_type, array_size = nil, reverse_require_cell_path = nil, reverse_require_entry_port_name = nil )
+    super()
+    @name = name
+    @port_type = port_type
+
+    if array_size == "[]" then
+#      if port_type == :ENTRY then
+#        cdl_error( "S1072 $1: entry port: sizeless array not supported in current version" , name )
+#      end
+      @array_size = array_size
+    elsif array_size then
+      if array_size.kind_of? Expression then
+        @array_size = array_size.eval_const(nil)
+      else
+        @array_size = array_size   # ããã¯ã¢ã­ã±ã¼ã¿å¼ã³å£ã®å ´åï¼å
+ã®å¼ã³å£ã§æ¢ã«è©ä¾¡æ¸ã¿ï¼
+      end
+      if @array_size == nil then
+        cdl_error( "S1073 Not constant expression $1" , array_size.to_s )
+      end
+
+      #if Integer( @array_size ) != @array_size || @array_size <= 0 then
+      if ! @array_size.kind_of? Integer then
+        cdl_error( "S1074 Not Integer $1" , array_size.to_s )
+      end
+
+    end
+
+    object = Namespace.find( sig_path )    #1
+    if object == nil then
+      # mikan signature ã®ååãä¸å®å
+¨
+      cdl_error( "S1075 \'$1\' signature not found" , sig_path )
+    elsif ! object.instance_of?( Signature ) then
+      # mikan signature ã®ååãä¸å®å
+¨
+      cdl_error( "S1076 \'$1\' not signature" , sig_path )
+    else
+      @signature = object
+
+    end
+
+    # érequire
+    @reverse_require_cell_path       = nil
+    @reverse_require_entry_port_name = nil
+    if reverse_require_cell_path then
+      if port_type == :CALL then
+        cdl_error( "S1152 $1 call port cannot have fixed join", @name )
+      else
+        @reverse_require_cell_path       = reverse_require_cell_path
+        @reverse_require_entry_port_name = reverse_require_entry_port_name
+
+        # åãå£é
+åãï¼
+        if array_size then
+          cdl_error( "S1153 $1: cannot be entry port array for fixed join port", @name )
+        end
+
+        # å¼ã³å£ã®ã»ã«ã¿ã¤ããæ¢ã
+        ct_or_cell = Namespace.find( @reverse_require_cell_path )  #1
+        if ct_or_cell.instance_of? Cell then
+          ct = ct_or_cell.get_celltype
+        elsif ct_or_cell.instance_of? Celltype then
+          ct = ct_or_cell
+          if ! ct.is_singleton? then
+            cdl_error( "S1154 $1: must be singleton celltype for fixed join", @reverse_require_cell_path.to_s )
+          end
+        else
+          ct = nil
+          cdl_error( "S1155 $1: not celltype or not found", @reverse_require_cell_path.get_path_str)
+        end
+
+        if ct == nil then
+          return    # æ¢ã«ã¨ã©ã¼
+        end
+
+        # æ·»ãå­ãªãã®å¼ã³å£é
+åãï¼
+        port = ct.find( @reverse_require_entry_port_name )
+        if port == nil || port.get_port_type != :CALL
+          cdl_error( "S1156 $1: not call port or not found", @reverse_require_entry_port_name )
+        else
+          if port.get_array_size != "[]" then
+            cdl_error( "S1157 $1: sized array or not array", @reverse_require_entry_port_name )
+          end
+        end
+
+      end
+    end
+
+    @b_require = false
+    @b_has_name = false
+    @b_inline = false
+    @b_optional = false
+    @b_ref_desc = false
+    @b_dynamic = false
+    reset_optimize
+  end
+
+  #=== Port#æé©åã«é¢ããå¤æ°ããªã»ãããã
+  # Region ãã¨ã«æé©åã®ãããªãããããããããªã»ãããã
+  def reset_optimize
+    if @port_type == :CALL then
+      # call port optimize
+      @b_VMT_useless = false                     # VMT ä¸è¦ (true ã®æ VMT ãä»ãããã¨ãªãå¼åºã)
+      @b_skelton_useless = false                 # ã¹ã±ã«ãã³é¢æ°ä¸è¦   (true ã®æãåãå£é¢æ°ãå¼åºã)
+      @b_cell_unique = false                     # å¯ä¸ã®å¼ã³å
+ã»ã«
+      @only_callee_port = nil                    # å¯ä¸ã®å¼ã³å
+ãã¼ã
+      @only_callee_cell = nil                    # å¯ä¸ã®å¼ã³å
+ã»ã«
+    else
+      # entry port optimize
+      if $unopt then
+        # æé©åãªã
+        @b_VMT_useless = false                     # VMT ä¸è¦ (true ã®æ VMT ãä»ãããã¨ãªãå¼åºã)
+        @b_skelton_useless = false                 # ã¹ã±ã«ãã³é¢æ°ä¸è¦   (true ã®æãåãå£é¢æ°ãå¼åºã)
+      else
+        # æé©åãã
+        @b_VMT_useless = true                      # VMT ä¸è¦ (true ã®æ VMT ãä»ãããã¨ãªãå¼åºã)
+        @b_skelton_useless = true                  # ã¹ã±ã«ãã³é¢æ°ä¸è¦   (true ã®æãåãå£é¢æ°ãå¼åºã)
+      end
+    end
+end
+
+  def set_celltype celltype
+    @celltype = celltype
+  end
+
+  def get_name
+    @name
+  end
+
+  def get_port_type
+    @port_type
+  end
+
+  def get_signature
+    @signature
+  end
+
+  def get_array_size
+    @array_size
+  end
+
+  def get_celltype
+    @celltype
+  end
+
+  #=== Port# ã¢ã­ã±ã¼ã¿ãã¼ãã®è¨­å®
+  #port:: Port : send/receive ã®ãã£ãå¼ã³å£ã¾ãã¯åãå£
+  #fd:: Decl : é¢æ°ã® declarator
+  #par:: ParamDecl : send/receive ã®ãã£ãå¼æ°
+  # ãã®å¼ã³å£ãçæããããã¨ã«ãªã£ãå¼ã³å£ã¾ãã¯åãå£ã®æ
+å ±ãè¨­å®
+  def set_allocator_port( port, fd, par )
+    @allocator_port = port
+    @allocator_func_decl = fd
+    @allocator_param_decl = par
+  end
+
+  def is_allocator_port?
+    @allocator_port != nil
+  end
+
+  def get_allocator_port
+    @allocator_port
+  end
+
+  def get_allocator_func_decl
+    @allocator_func_decl
+  end
+
+  def get_allocator_param_decl
+    @allocator_param_decl
+  end
+
+  def set_require( b_has_name )
+    @b_require = true
+    @b_has_name = b_has_name
+  end
+
+  def is_require?
+    @b_require
+  end
+
+  #=== Port# require å¼ã³å£ãååãæã¤ï¼
+  # require éå®
+  def has_name?
+    @b_has_name
+  end
+
+  def is_optional?
+    @b_optional
+  end
+
+  def set_optional
+    @b_optional = true
+  end
+
+  #=== Port# omit æå®ããã¦ãã?
+  def is_omit?
+    @b_omit || ( @signature && @signature.is_empty? )
+  end
+
+  def set_omit
+    @b_omit = true
+  end
+
+  def set_VMT_useless                     # VMT é¢æ°ãã¼ãã«ãä½¿ç¨ããªã
+   @b_VMT_useless = true
+  end
+
+  def set_skelton_useless                 # ã¹ã±ã«ãã³é¢æ°ä¸è¦   (true ã®æãåãå£é¢æ°ãå¼åºã)
+    @b_skelton_useless = true
+  end
+
+  def set_cell_unique                     # å¼ã³å
+ã»ã«ã¯ä¸ã¤ã ã
+    @b_cell_unique = true
+  end
+
+  #=== Port# å¼ã³å£/åãå£ã®æå®å­ã®è¨­å®
+  # inline, allocator ã®æå®
+  def set_specifier spec_list
+    spec_list.each { |s|
+      case s[0]
+      when :INLINE
+        if @port_type == :CALL then
+          cdl_error( "S1077 inline: cannot be specified for call port"  )
+          next
+        end
+        @b_inline = true
+      when :OMIT
+        if @port_type == :ENTRY then
+          cdl_error( "S9999 omit: cannot be specified for entry port"  )
+          next
+        end
+        @b_omit = true
+      when :OPTIONAL
+        if @port_type == :ENTRY then
+          cdl_error( "S1078 optional: cannot be specified for entry port"  )
+          next
+        end
+        @b_optional = true
+      when :REF_DESC
+        @b_ref_desc = true
+      when :DYNAMIC
+        if @port_type == :ENTRY then
+          cdl_error( "S9999 dynamic: cannnot be specified for entry port" )
+          next
+        end
+        @b_dynamic = true
+      when :ALLOCATOR
+        if @port_type == :CALL then
+          cdl_error( "S1079 allocator: cannot be specified for call port"  )
+        end
+        if @allocator_instance_tmp then
+          cdl_error( "S1080 duplicate allocator specifier"  )
+          next
+        end
+        @allocator_instance_tmp = s[1]
+      else
+        raise "unknown specifier #{s[0]}"
+      end
+    }
+  end
+
+  #=== Port# ãªã¬ã¼ã¢ã­ã±ã¼ã¿ãå
+é¨ã¢ã­ã±ã¼ã¿ã®ã¤ã³ã¹ã¿ã³ã¹ãè¨­å®
+  # å¼ã³å£ã®åæ¹åç
+§å¯è½ãªããã«ãã»ã«ã¿ã¤ãã®è§£éã®æå¾ã§è¡ã
+  def set_allocator_instance
+    if @allocator_instance_tmp == nil then
+      return
+    end
+
+    @allocator_instance = {}
+    @allocator_instance_tmp.each { |ai|
+      direction = nil
+      alloc_type = ai[0]
+      # ai = [ :INTERNAL_ALLOC|:RELAY_ALLOC, func_name, param_name, rhs ]
+      case alloc_type
+      when :INTERNAL_ALLOC
+        if ! @owner.instance_of? CompositeCelltype then # ãã¹ãé²ãããã« composite ã§ãªããã°ã¨ãã
+          cdl_error( "S1081 self allocator not supported yet"  )   # mikan ããã¯ãµãã¼ãããã¦ããã¯ããè¦èª¿æ» 12/1/15
+          next
+        end
+        # OK
+      when :RELAY_ALLOC
+        # OK
+      when :NORMAL_ALLOC
+        # ããã¸æ¥ãã®ã¯ composite ã®åãå£ã§å³è¾ºã "eEnt.func.param" å½¢å¼ã§æå®ããã¦ããå ´å
+        cdl_error( "S1174 $1 not suitable for lhs, suitable lhs: 'func.param'", "#{ai[1]}.#{ai[3]}.#{ai[4]}" )
+        next
+      else
+        raise "Unknown allocator type #{ai[1]}"
+      end
+
+      # '=' å·¦è¾º(func_name,param_name)ã¯å®å¨ããã?
+      if @signature then       # signature = nil ãªãæ¢ã«ã¨ã©ã¼
+        fh = @signature.get_function_head( ai[1] )
+        if fh == nil then
+          cdl_error( "S1082 function \'$1\' not found in signature" , ai[1] )
+          next
+        end
+        decl = fh.get_declarator
+        if ! decl.is_function? then
+          next   # æ¢ã«ã¨ã©ã¼
+        end
+        paramdecl = decl.get_type.get_paramlist.find( ai[2] )
+        if paramdecl == nil then
+          cdl_error( "S1083 \'$1\' not found in function \'$2\'" , ai[2], ai[1] )
+          next
+        end
+        case paramdecl.get_direction
+        when :SEND, :RECEIVE
+          # OK
+          direction = paramdecl.get_direction
+        else
+          cdl_error( "S1084 \'$1\' in function \'$2\' is not send or receive" , ai[2], ai[1] )
+          next
+        end
+      end
+
+      # éè¤æå®ããªãã?
+      if @allocator_instance[ "#{@name}_#{ai[1]}_#{ai[2]}" ] then
+        cdl_error( "S1085 duplicate allocator specifier for \'$1_$2\'" , ai[1], ai[2] )
+      end
+
+      # å³è¾ºã®ãã§ãã¯
+      case alloc_type
+      when :INTERNAL_ALLOC
+
+        ele = ai[3].get_elements
+        if( ele[0] != :IDENTIFIER )then
+          cdl_error( "S1086 $1: rhs not in 'allocator_entry_port' form", ai[3].to_s )
+          next
+        end
+
+        ep_name = ele[1]   # ã¢ã­ã±ã¼ã¿åãå£å
+        ep = @owner.find ep_name.get_path[0]  # mikan "a::b"
+        if ep == nil || ! ep.instance_of?( Port ) || ep.get_port_type != :ENTRY || ! ep.get_signature.is_allocator? then
+          cdl_error( "S1175 $1 not found or not allocator entry port for $2" , ep_name, ai[1] )
+        end
+        # å³è¾ºãã§ãã¯çµãã
+        # ai2 = [ :INTERNAL_ALLOC, func_name, param_name, rhs_ep_name ]
+        ai2 = [ ai[0], ai[1], ai[2], ep_name ]
+
+      when :RELAY_ALLOC
+        ele = ai[3].get_elements
+        if( ele[0] != :OP_DOT ||
+            ele[1][0] != :OP_DOT || ele[1][1][0] != :IDENTIFIER || ! ele[1][1][1].is_name_only? ||
+            ! ele[1][2].instance_of?( Token ) || ! ele[2].instance_of?( Token ) )then   #1
+          # [ :OP_DOT, [ :OP_DOT, [ :IDENTIFIER,  name_space_path ],  Token(1) ],  Token(2) ]
+          #    ele[0]    ele[1][0]  ele[1][1][0]  ele[1][1][1]        ele[1][2]    ele[2]
+          #      name_space_path.Token(1).Token(2) === call_port.func.param
+          #  mikan Expression#analyze_cell_join_expression ã®å¤ç¨®ãä½æãã¦ç½®ãæããã¹ã
+
+          cdl_error( "S1176 rhs not in 'call_port.func.param' form for for $1_$2" , ai[1], ai[2] )   # S1086
+          next
+        end
+        func_name = ele[1][2]; cp_name = ele[1][1][1].get_name; param_name = ele[2].to_sym
+        cp = @owner.find cp_name    # ãªã¬ã¼ããå
+ã®å¼ã³å£
+        if cp then
+# mikan cp ãå¼ã³å£ã§ãããã¨ã®ãã§ãã¯ï¼å±æ§ã®å ´åãããï¼
+# mikan åãå£ããåãå£ã¸ã®ãªã¬ã¼ã¸ã®å¯¾å¿ (å¼ã³å£ããå¼ã³å£ã¸ã®ãªã¬ã¼ã¯ããããªã)  <=== ææ³ã«ããããäºé 
+ï¼å¼ã³å£å´ã§ã¢ã­ã±ã¼ã¿ãæ±ºå®ãããï¼
+          sig = cp.get_signature
+          if sig && @signature then
+            fh = @signature.get_function_head( func_name )
+            if fh == nil then
+              cdl_error( "S1087 function \'$1\' not found in signature \'$2\'" , func_name, sig.get_name )
+              next
+            end
+            decl = fh.get_declarator
+            if ! decl.is_function? then
+              next   # æ¢ã«ã¨ã©ã¼
+            end
+            paramdecl = decl.get_type.get_paramlist.find( param_name )
+            if paramdecl == nil then
+              cdl_error( "S1088 \'$1\' not found in function \'$2\'" , param_name, func_name )
+              next
+            end
+            case paramdecl.get_direction
+            when :SEND, :RECEIVE
+              # OK
+              if alloc_type == :RELAY_ALLOC && direction != paramdecl.get_direction then
+                cdl_error( "S1089 relay allocator send/receive mismatch between $1.$2 and $3_$4.$5" , ai[1], ai[2], cp_name, func_name, param_name )
+              end
+            else
+              cdl_error( "S1090 \'$1\' in function \'$2\' is not send or receive" , param_name, func_name )
+              next
+            end
+
+            # else
+            # sig == nil ãªãã°æ¢ã«ã¨ã©ã¼
+          end
+        else
+          if @celltype then
+            ct_name = @celltype.get_name
+          else
+            ct_name = "(None)"
+          end
+          cdl_error( "S1091 call port \'$1\' not found in celltype $2" , cp_name, ct_name )
+          next
+        end
+        # å³è¾ºãã§ãã¯çµãã
+        # ai2 = [ :RELAY_ALLOC, func_name, param_name, rhs_cp_name, rhs_func_name, rhs_param_name ]
+        ai2 = [ ai[0], ai[1], ai[2], cp_name, func_name, param_name ]
+      end # case alloc_type
+
+      @allocator_instance[ "#{@name}_#{ai[1]}_#{ai[2]}" ] = ai2
+    }
+  end
+
+  def is_inline?
+    @b_inline
+  end
+
+  def is_VMT_useless?                     # VMT é¢æ°ãã¼ãã«ãä½¿ç¨ããªã
+   @b_VMT_useless
+  end
+
+  def is_skelton_useless?                 # ã¹ã±ã«ãã³é¢æ°ä¸è¦   (true ã®æãåãå£é¢æ°ãå¼åºã)
+    @b_skelton_useless
+  end
+
+  def is_cell_unique?                     # å¼ã³å
+ã®ã»ã«ã¯ä¸ã¤ï¼
+    @b_cell_unique
+  end
+
+  #=== Port# åãå£æé©åã®è¨­å®
+  # ãã®åãå£ãåç
+§ããå¼ã³å£ã VMT, skelton ãå¿
+è¦ã¨ãã¦ãããã©ãããè¨­å®
+  # ä¸ã¤ã§ãå¼ã³å£ãå¿
+è¦ã¨ãã¦ããï¼ããªãã¡ b_*_useless ã falseï¼å ´åã¯ã
+  # ãã®åãå£ã®æé©åã false ã¨ãã
+  def set_entry_VMT_skelton_useless( b_VMT_useless, b_skelton_useless )
+    if ! b_VMT_useless then
+      @b_VMT_useless = false
+    end
+    if ! b_skelton_useless then
+      @b_skelton_useless = false
+    end
+  end
+
+  #=== Port# å¯ä¸ã®çµåå
+ãè¨­å®
+  # æé©åã§ä½¿ç¨
+  #  b_VMT_useless == true || b_skelton_useless == true ã®æã«è¨­å®ããã
+  #  optional ã®å ´å callee_cell, callee_port ã nil ã¨ãªã
+  def set_only_callee( callee_port, callee_cell )
+    @only_callee_port = callee_port
+    @only_callee_cell = callee_cell
+  end
+
+  #=== Port# å¯ä¸ã®çµåå
+ãã¼ããè¿ã(compositeã®å ´åå®ã»ã«)
+  # optional å¼ã³å£ã§æªçµåã®å ´å nil ãè¿ã
+  def get_real_callee_port
+    if @only_callee_cell then
+      return @only_callee_cell.get_real_port( @only_callee_port.get_name )
+    end
+  end
+
+  #=== Port# å¯ä¸ã®çµåå
+ã»ã«ãè¿ã(compositeã®å ´åå®ã»ã«)
+  # optional å¼ã³å£ã§æªçµåã®å ´å nil ãè¿ã
+  def get_real_callee_cell
+    if @only_callee_cell then
+      return @only_callee_cell.get_real_cell( @only_callee_port.get_name )
+    end
+  end
+
+  def get_allocator_instance
+    return @allocator_instance
+  end
+
+  def get_allocator_instance_tmp
+    return @allocator_instance_tmp
+  end
+
+  #=== Port# érequire ã®çµåãçæãã
+  # STAGE: S
+  def create_reverse_require_join cell
+    if @reverse_require_cell_path == nil then
+      return
+    end
+
+    # å¼ã³å
+ã»ã«ãæ¢ã
+    ct_or_cell = Namespace.find( @reverse_require_cell_path )   # mikan namespace    #1
+    if ct_or_cell.instance_of? Cell then
+      cell2 = ct_or_cell
+      ct = cell2.get_celltype
+      if ct == nil then
+        return    # æ¢ã«ã¨ã©ã¼
+      end
+    elsif ct_or_cell.instance_of? Celltype then
+      cell2 = ct_or_cell.get_singleton_cell( cell.get_region )
+      if cell2 == nil then
+        cdl_error( "S1158 $1: singleton cell not found for fixed join", ct_or_cell.get_name )
+        return
+      end
+      ct = ct_or_cell
+    else
+      # æ¢ã«ã¨ã©ã¼ï¼ç¡è¦
+      return
+    end
+
+    # çµåãçæãã
+    dbgPrint "create_reverse_require_join #{cell2.get_name}.#{@reverse_require_entry_port_name}[] = #{cell.get_name}.#{@name}"
+    nsp = NamespacePath.new( cell.get_name, false, cell.get_namespace )
+#    rhs = Expression.new( [ :OP_DOT, [ :IDENTIFIER, Token.new( cell.get_name, nil, nil, nil ) ],
+    rhs = Expression.new( [ :OP_DOT, [ :IDENTIFIER, nsp ],
+                            Token.new( @name, nil, nil, nil ) ], cell.get_locale )   #1
+    join = Join.new( @reverse_require_entry_port_name, -1, rhs, cell.get_locale )
+    cell2.new_join( join )
+    join.set_definition( ct.find(join.get_name) )
+
+  end
+
+  #=== Port# signature ã®ãã¹ã¦ã®é¢æ°ã®ãã¹ã¦ã®ãã©ã¡ã¼ã¿ããã©ã
+  #block:: ãã­ãã¯ãå¼æ°ã¨ãã¦åã(ruby ã®ææ³ã§æ¸ããªã)
+  #  ãã­ãã¯ã¯3ã¤ã®å¼æ°ãåãåã(Port, Decl,      ParamDecl)    Decl: é¢æ°ããã
+  # Signature ã¯ã©ã¹ã«ã each_param ãããï¼åãåãï¼
+  def each_param # ãã­ãã¯å¼æ°{  |port, func_decl, param_decl| }
+    return if @signature == nil                         # signature æªå®ç¾©ï¼æ¢ã«ã¨ã©ã¼ï¼
+    fha = @signature.get_function_head_array            # å¼ã³å£ã¾ãã¯åãå£ã®ã·ã°ããã£ã®é¢æ°é
+å
+    return if fha == nil                                # nil ãªãææ³ã¨ã©ã¼ã§æå¹å¤ãè¨­å®ãããªãã£ã
+
+    pr = Proc.new   # ãã®ã¡ã½ããã®ãã­ãã¯å¼æ°ã pr ã«ä»£å
+¥
+    port = self
+    fha.each{ |fh|  # fh: FuncHead                      # é¢æ°é
+åä¸­ã®åé¢æ°é ­é¨
+      fd = fh.get_declarator                            # fd: Decl  (é¢æ°é ­é¨ããDeclarotorãå¾ã)
+      if fd.is_function? then                           # fd ãé¢æ°ã§ãªããã°ããã§ã«ã¨ã©ã¼
+        fd.get_type.get_paramlist.get_items.each{ |par| # ãã¹ã¦ã®ãã©ã¡ã¼ã¿ã«ã¤ãã¦
+          pr.call( port, fd, par )
+        }
+      end
+    }
+  end
+
+  #=== Port# érequireæå®ããã¦ããï¼
+  def is_reverse_required?
+    @reverse_require_cell_path != nil
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "Port: name:#{@name} port_type:#{@port_type} require:#{@b_require} inline:#{@b_inline} omit:#{@b_omit} optional:#{@b_optional} ref_desc:#{@b_ref_desc} dynamic:#{@b_dynamic}"
+    (indent+1).times { print "  " }
+    if @signature then
+      puts "signature: #{@signature.get_name} #{@signature}"
+    else
+      puts "signature: NOT defined"
+    end
+    if @array_size == "[]" then
+      (indent+1).times { print "  " }
+      puts "array_size: not specified"
+    elsif @array_size then
+      (indent+1).times { print "  " }
+      puts "array_size: #{@array_size}"
+    end
+    if @allocator_instance then
+      (indent+1).times { print "  " }
+      puts "allocator instance:"
+      @allocator_instance.each { |b,a|
+        (indent+2).times { print "  " }
+        puts "#{a[0]} #{a[1]} #{b} "
+        # a[3].show_tree( indent+3 )
+      }
+    end
+    (indent+1).times { print "  " }
+    if @port_type == :CALL then
+      puts "VMT_useless : #{@b_VMT_useless}  skelton_useless : #{@b_skelton_useless}  cell_unique : #{@b_cell_unique}"
+    else
+      puts "VMT_useless : #{@b_VMT_useless}  skelton_useless : #{@b_skelton_useless}"
+    end
+  end
+
+end
+
+#== Namespace
+#
+# root namespace ã ããRegion ã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹ã¨ãã¦çæããã
+# root namespace ã¯ãroot region ãå
+¼ã­ããã
+#
+# @cell_list ã¯ Region ã®å ´åã«ã®ã¿æã¤ (mikan @cell_list é¢é£ã¯ Region ã«ç§»ãã¹ã)
+#
+class Namespace < NSBDNode
+# @name::  Symbol     # root ã®å ´å "::" (String)
+# @global_name:: str
+# @name_list:: NamedList   Signature,Celltype,CompositeCelltype,Cell,Typedef,Namespace
+# @struct_tag_list:: NamedList : StructType
+# @namespace_list:: Namespace[] : Region ã¯ Namespace ã®å­ã¯ã©ã¹ã§ãããå«ã¾ãã
+# @signature_list:: Sginature[]
+# @celltype_list:: Celltype[]
+# @compositecelltype_list:: CompositeCelltype[]
+# @cell_list:: Cell[]
+# @typedef_list:: Typedef[]
+# @decl_list:: ( Typedef | StructType | EnumType )[]   ä¾å­é¢ä¿ãããå ´åã«åãã¦ãé çªã©ããã«é
+åã«æ ¼ç´ mikan enum
+# @const_decl_list:: Decl[]
+# @cache_n_cells:: Integer :  get_n_cells ã®çµæãã­ã£ãã·ã¥ãã
+# @cache_generating_region:: Region :  get_n_cells ã®çµæãã­ã£ãã·ã¥ãããã¦ãããªã¼ã¸ã§ã³
+
+  # mikan namespace ã® push, pop
+
+  # namespace éå±¤ç¨ã®ã¹ã¿ãã¯
+  @@namespace_stack = []      # @@namespace_stack[0] = "::" (generator.rb)
+  @@namespace_sp = -1
+
+  # Generator ãã¹ãç¨ã®ã¹ã¿ãã¯ (namespace éå±¤ç¨ã®ã¹ã¿ãã¯ãå¯¾æ¯ãã)
+  @@nest_stack_index = -1
+  @@nest_stack = []
+
+  @@root_namespace = nil
+
+  # Generator ãã¹ãç¨ã¹ã¿ãã¯ã® push, pop (ã¯ã©ã¹ã¡ã½ãã)
+  def self.push
+    dbgPrint "push Namespace\n"
+    @@nest_stack_index += 1
+    @@nest_stack[ @@nest_stack_index ] = [ @@namespace_stack, @@namespace_sp ]
+    if @@root_namespace then
+      @@namespace_sp = 0
+      @@namespace_stack[ @@namespace_sp ] = @@root_namespace
+    end
+  end
+
+  def self.pop
+    dbgPrint "pop Namespace\n"
+    @@namespace_stack, @@namespace_sp = @@nest_stack[ @@nest_stack_index ]
+    @@nest_stack_index -= 1
+    if @@nest_stack_index < -1 then
+      raise "TooManyRestore"
+    end
+  end
+
+  # namespace éå±¤ç¨ã¹ã¿ãã¯ã® push, pop (ã¤ã³ã¹ã¿ã³ã¹ã¡ã½ãã)
+  def push ns
+    @@namespace_sp += 1
+    @@namespace_stack[ @@namespace_sp ] = self
+    dbgPrint "Namespace.PUSH #{@@namespace_sp} #{@name}\n"
+  end
+
+  def pop
+    dbgPrint "Namespace.POP #{@@namespace_sp} #{@name}\n"
+    @@namespace_sp -= 1
+    if @@namespace_sp < 0 then
+      raise "StackUnderflow"
+    end
+  end
+
+  def initialize( name )
+
+    super()
+    @name = name
+
+    if( name == "::" )then
+      if( @@root_namespace != nil )then
+        # root ã¯ä¸åã®ã¿çæã§ãã
+        raise "try to re-create root namespace"
+      end
+      @@root_namespace = self
+      @NamespacePath = NamespacePath.new( name, true )
+    else
+      ns = @@namespace_stack[ @@namespace_sp ].find( name )
+      if ns.kind_of? Namespace then
+        dbgPrint "namespace: re-appear #{@name}\n"
+        # ç»é²æ¸ã¿ namespace ã®åç»é²
+        ns.push ns
+        return
+      elsif ns then
+        cdl_error( "S1151 $1: not namespace", @name )
+        prev_locale = ns.get_locale
+        puts "previous: #{prev_locale[0]}: line #{prev_locale[1]} \'#{name}\' defined here"
+      end
+      dbgPrint "namespace: 1st-appear #{@name}\n"
+    end
+
+    if @@namespace_sp >= 0 then   # root ã¯é¤å¤
+      @@namespace_stack[@@namespace_sp].new_namespace( self )
+    end
+    push self
+
+    @global_name = Namespace.get_global_name    # stack ç»é²å¾åã
+    @name_list = NamedList.new( nil, "symbol in namespace '#{@name}'" )
+    @struct_tag_list = NamedList.new( nil, "struct tag" )
+
+    @namespace_list = []
+    @signature_list = []
+    @celltype_list = []
+    @compositecelltype_list = []
+    @cell_list = []
+    @typedef_list = []
+    @decl_list = []
+    @const_decl_list = []
+    @cache_n_cells = nil
+    @cache_generating_region = nil
+    if @NamespacePath == nil then
+      # root namespace ã®å ´åã¯è¨­å®æ¸ (è¦ª namespace ãè¦ã¤ãããä¾å¤ã«ãªã)
+      set_namespace_path # @NamespacePath ã®è¨­å®
+    end
+  end
+
+  def end_of_parse
+    pop
+  end
+
+  def get_name
+    @name
+  end
+
+  #=== Namespace:: global_name ãå¾ã
+  # parse ä¸­ã®ã¿ãã®ã¡ã½ããã¯ä½¿ãã
+  # STAGE: P
+  def self.get_global_name    # parse ä¸­æå¹
+    if @@namespace_sp <= 0 then
+      return ""
+    end
+
+    path = @@namespace_stack[1].get_name.to_s
+    i = 2
+    while i <= @@namespace_sp
+      path = path+"_"+@@namespace_stack[i].get_name.to_s
+      i += 1
+    end
+
+    path
+  end
+
+  def get_global_name
+    @global_name
+  end
+
+  #=== Namespace#ã»ã«ã®åæ°ãå¾ã
+  # å­ region ã linkunit, node æå®ããã¦ããã°ãå«ããªãï¼å¥ã®ãªã³ã¯åä½ï¼
+  # ãã­ãã¿ã¤ãå®£è¨ã®ãã®ã®ã¿ã®åæ°ãå«ããªã
+  # mikan namespace ä¸ã« cell ãç½®ããªãä»æ§ã«ãªãã¨ããã®ã¡ã½ããã¯ Region ã®ãã®ã§ãã
+  # mikan ä¸è¨ã®å ´å instance_of? Namespace ã®æ¡ä»¶å¤å®ã¯ä¸è¦ã¨ãªã
+  def get_n_cells
+    if @cache_generating_region == $generating_region then
+      # ãã®ã¡ã½ããã¯ç¹°ãè¿ãå¼ã³åºããããããçµæãã­ã£ãã·ã¥ãã
+      return @cache_n_cells
+    end
+
+    count = 0
+    @cell_list.each{ |c|
+      # å®ç¾©ããã­ãã¿ã¤ãå®£è¨ã ããã¯ãnew_cell ã®æ®µéã§å¤æ­ã§ããªããããã«ã¦ã³ãããªãã
+      if c.get_f_def == true then
+        # print "get_n_cells: cell: #{c.get_name}\n"
+        count += 1
+      end
+    }
+
+    @namespace_list.each{ |ns|
+      if ns.instance_of? Namespace then
+        count += ns.get_n_cells
+      else
+        # ns ã¯ Region ã§ãã
+        rt = ns.get_region_type
+        # print "get_n_cells: region: #{ns.get_name}: #{rt}\n"
+        if rt == :NODE || rt == :LINKUNIT then
+          # å¥ã® linkunit ãªã®ã§å ç®ããªã
+        else
+          count += ns.get_n_cells
+        end
+      end
+    }
+
+    @cache_generating_region = $generating_region
+    @cache_n_cells = count
+    return count
+  end
+
+  #=== Namespace.find : in_path ã§ç¤ºããããªãã¸ã§ã¯ããæ¢ã
+  #in_path:: NamespacePath
+  #in_path:: Array : å¤ãå½¢å¼
+  #  path [ "::", "ns1", "ns2" ]   absolute
+  #  path [ "ns1", "ns2" ]         relative
+  def self.find( in_path )
+
+    if in_path.instance_of? Array then
+      # raise "Namespace.find: old fashion"
+
+      path = in_path
+      length = path.length
+      return self.find_one( path[0] ) if length == 1
+
+      name = path[0]
+      if name == "::" then
+        i = 1
+        name = path[i]   # æ§æçã«å¿
+ãå­å¨
+        object = @@root_namespace.find( name )  # root
+      else
+        # ç¸å¯¾ãã¹
+        i = 0
+        object = @@namespace_stack[@@namespace_sp].find_one( name ) # crrent
+      end
+
+    elsif in_path.instance_of? NamespacePath then
+      path = in_path.get_path
+      length = path.length
+
+      if length == 0 then
+        if in_path.is_absolute? then
+          return @@root_namespace
+        else
+          raise "path length 0, not absolute"
+        end
+      end
+
+      i = 0
+      name = path[0]
+      if in_path.is_absolute? then
+        object = @@root_namespace.find( name )  # root
+      else
+        bns = in_path.get_base_namespace
+        object = bns.find_one( name )           # crrent
+      end
+    else
+      raise "unexpected path"
+    end
+
+    i += 1
+    while i < length
+
+      unless object.kind_of?( Namespace ) then
+        # ã¯ã©ã¹ã¡ã½ããå
+ã§ cdl_error ãå¼ã³åºããã¨ã¯ã§ããªã
+        # ã¾ããåæ¹åç
+§å¯¾å¿å¾ãæ­£ç¢ºãªè¡çªå·ãåºãªãåé¡ãçãã
+        # cdl_error( "S1092 \'$1\' not namespace" , name )
+        # ãã®ã¡ã½ãããã nil ãå¸°ã£ãå ´å "not found" ãåºãã®ã§ãããã§ã¯åºããªã
+        return nil
+      end
+
+      object = object.find( path[i] )
+      i += 1
+    end
+
+    return object
+  end
+
+
+  def find( name )
+    @name_list.get_item(name)
+  end
+
+  #=== Namespace# namespace ããæ¢ããè¦ã¤ãããªããã°è¦ª namespace ããæ¢ã
+  def self.find_one( name )
+    return @@namespace_stack[@@namespace_sp].find_one( name )
+  end
+
+  def find_one( name )
+
+    object = find( name )
+    # ããã¯åºãã
+    # dbgPrint "in '#{@name}' find '#{name}' object #{object ? object.class : "Not found"}\n"
+
+    if object != nil then
+      return object
+    elsif @name != "::" then
+      return @owner.find_one( name )
+    else
+      return nil
+    end
+  end
+
+  def self.get_current
+    @@namespace_stack[@@namespace_sp]
+  end
+
+  def self.find_tag( name )
+    # mikan tag : namespace ã® path ã«å¯¾å¿ããªã
+    # namespace ã®ä¸­ã«ãã£ã¦ããroot namespace ã«ãããã®ã¨è¦ãªããã
+    # ãã£ã¦ ã«ã¬ã³ã namespace ããæ ¹ã«åãã£ã¦æ¢ã
+    i = @@namespace_sp
+    while i >= 0
+      res = @@namespace_stack[i].find_tag( name )
+      if res then
+        return res
+      end
+      i -= 1
+    end
+  end
+
+  def find_tag( name )
+    @struct_tag_list.get_item( name )
+  end
+
+ ### namespace
+  def self.new_namespace( namespace )
+    @@namespace_stack[@@namespace_sp].new_namespace( namespace )
+  end
+
+  def new_namespace( namespace )
+    dbgPrint "new_namespace: #{@name}:#{self} #{namespace.get_name}:#{namespace} \n"
+    namespace.set_owner self   # Namespace (Namespace)
+
+    @name_list.add_item( namespace )
+    @namespace_list << namespace
+  end
+
+ ### signature
+  def self.new_signature( signature )
+    @@namespace_stack[@@namespace_sp].new_signature( signature )
+  end
+
+  def new_signature( signature )
+    signature.set_owner self   # Signature (Namespace)
+    @name_list.add_item( signature )
+    @signature_list << signature
+  end
+
+ ### celltype
+  def self.new_celltype( celltype )
+    @@namespace_stack[@@namespace_sp].new_celltype( celltype )
+  end
+
+  def new_celltype( celltype )
+    celltype.set_owner self   # Celltype (Namespace)
+    @name_list.add_item( celltype )
+    @celltype_list << celltype
+  end
+
+ ### compositecelltype
+  def self.new_compositecelltype( compositecelltype )
+    @@namespace_stack[@@namespace_sp].new_compositecelltype( compositecelltype )
+  end
+
+  def new_compositecelltype( compositecelltype )
+    compositecelltype.set_owner self   # CompositeCelltype (Namespace)
+    @name_list.add_item( compositecelltype )
+    @compositecelltype_list << compositecelltype
+  end
+
+ ### cell (Namespace)
+  def self.new_cell( cell )
+    @@namespace_stack[@@namespace_sp].new_cell( cell )
+  end
+
+  def new_cell( cell )
+    dbgPrint "Namespace.new_cell: #{@NamespacePath.get_path_str}::#{cell.get_name}\n"
+    if ! is_root? && ! ( instance_of? Region ) then
+      cdl_error( "S9999 '$1' cell cannot be placed under namespace", cell.get_name )
+    end
+    cell.set_owner self   # Cell (Namespace)
+    @name_list.add_item( cell )
+    @cell_list << cell
+  end
+
+  #=== Namespace# åç
+§ããã¦ããããæªå®ç¾©ã®ã»ã«ãæ¢ã
+  # ãã­ãã¿ã¤ãå®£è¨ã ãã§å®ç¾©ããã¦ããªãã±ã¼ã¹ãã¨ã©ã¼ã¨ãã
+  # ååã®æªçµåã»ã«ã«ã¤ãã¦è­¦åãã
+  def check_ref_but_undef
+    @cell_list.each { |c|
+      if ! c.get_f_def then   # Namespace ã® @cell_list ã«ã¯ãã­ãã¿ã¤ããå«ã¾ããã±ã¼ã¹ãã
+        if c.get_f_ref then
+          cdl_error( "S1093 $1 : undefined cell" , c.get_namespace_path.get_path_str )
+        elsif $verbose then
+          cdl_warning( "W1006 $1 : only prototype, unused and undefined cell" , c.get_namespace_path.get_path_str )
+        end
+      else
+        dbgPrint "check_ref_but_undef: #{c.get_global_name}\n"
+        ct = c.get_celltype
+        # if c.get_f_ref == false && c.is_generate? && ct && ct.is_inactive? then
+        if c.get_f_ref == false && ct && ct.is_inactive? then
+          cdl_warning( "W1007 $1 : non-active cell has no entry join and no factory" , c.get_namespace_path.get_path_str )
+        end
+      end
+    }
+    @namespace_list.each { |n|
+      n.check_ref_but_undef
+    }
+  end
+
+  #=== Namespace# ã»ã«ã®åãå£ã®åç
+§ã«ã¦ã³ããè¨­å®ãã
+  def set_port_reference_count
+    @cell_list.each { |c|
+      c.set_port_reference_count
+    }
+    @namespace_list.each { |n|
+      n.set_port_reference_count
+    }
+  end
+
+ ### struct
+  def self.new_structtype( struct )
+    @@namespace_stack[@@namespace_sp].new_structtype( struct )
+  end
+
+  def new_structtype( struct )
+    # struct.set_owner self   # StructType (Namespace) # StructType ã¯ BDNode ã§ã¯ãªã
+    dup = @struct_tag_list.get_item(struct.get_name)
+    if dup != nil then
+      if struct.same? dup then
+        # åããã®ã typedef ããã
+        # p "#{struct.get_name}"
+        return
+      end
+    end
+
+    @struct_tag_list.add_item( struct )
+    @decl_list << struct
+  end
+
+ ### typedef
+  def self.new_typedef( typedef )
+    @@namespace_stack[@@namespace_sp].new_typedef( typedef )
+  end
+
+  def new_typedef( typedef )
+    typedef.set_owner self   # TypeDef (Namespace)
+    dup = @name_list.get_item(typedef.get_name)
+    if dup != nil then
+      typedef_type = typedef.get_declarator.get_type.get_original_type
+      dup_type = dup.get_declarator.get_type.get_original_type
+      # print "typedef: #{typedef.get_name} = #{typedef_type.get_type_str} #{typedef_type.get_type_str_post}\n"
+      if typedef_type.get_type_str == dup_type.get_type_str &&
+          typedef_type.get_type_str_post == dup_type.get_type_str_post then
+        # åããã®ã typedef ããã
+        # ããã¸æ¥ãã®ã¯ C ã§é¢æ°ãã¤ã³ã¿ã typedef ãã¦ããã±ã¼ã¹
+        # ä»¥ä¸ã®ããã«äºéã«å®ç¾©ããã¦ããå ´åã¯ type_specifier_qualifier_list ã¨ãã¦æ±ããã
+        #    typedef long LONG; 
+        #    typedef long LONG;
+        # bnf.y.rb ã§ã¯ declarator ã« TYPE_NAME ãè¨±ããªãã®ã§ãããã¸æ¥ããã¨ã¯ãªã
+        # p "#{typedef.get_declarator.get_type.get_type_str} #{typedef.get_name} #{typedef.get_declarator.get_type.get_type_str_post}"
+        return
+      end
+      # p "prev: #{dup.get_declarator.get_type.get_type_str}#{dup.get_declarator.get_type.get_type_str_post} current:#{typedef.get_declarator.get_type.get_type_str} #{typedef.get_declarator.get_type.get_type_str_post}"
+    end
+
+    # p "typedef: #{typedef.get_name}  #{typedef.get_declarator.get_type.get_original_type.get_type_str}#{typedef.get_declarator.get_type.get_original_type.get_type_str_post}"
+    # typedef.show_tree 0
+
+    @name_list.add_item( typedef )
+    @typedef_list << typedef
+    @decl_list << typedef
+  end
+
+  def self.is_typename?( str )
+    i = @@namespace_sp
+    while i >= 0
+      if @@namespace_stack[i].is_typename?( str ) then
+        return true
+      end
+      i -= 1
+    end
+    false
+  end
+
+  def is_typename?( str )
+    if @name_list.get_item( str ).instance_of?( Typedef ) then
+      true
+    else
+      false
+    end
+  end
+
+ ### const_decl
+  def self.new_const_decl( decl )
+    @@namespace_stack[@@namespace_sp].new_const_decl( decl )
+  end
+
+  def new_const_decl( decl )
+    decl.set_owner self   # Decl (Namespace:const)
+    if ! decl.is_const? then			# const ä¿®é£¾ãã¦ãããã¨
+      if decl.is_type?( PtrType ) then
+        cdl_error( "S1094 $1: pointer is not constant. check \'const\'" , decl.get_name )
+      else
+        cdl_error( "S1095 $1: not constant" , decl.get_name )
+      end
+    elsif ! decl.is_type?( IntType ) && ! decl.is_type?( FloatType ) &&
+        ! decl.is_type?( BoolType ) && ! decl.is_type?( PtrType ) then
+                                            # IntType, FloatType ã§ãããã¨
+      cdl_error( "S1096 $1: should be int, float, bool or pointer type" , decl.get_name )
+    elsif decl.get_initializer == nil then   # åæå¤ãæã¤ãã¨
+      cdl_error( "S1097 $1: has no initializer" , decl.get_name )
+#    elsif decl.get_initializer.eval_const(nil) == nil then  #eval_const ã¯ check_init ã§å¼åºãããã®ã§äºéãã§ãã¯
+#                                            # mikan åæå¤ãåã«å¯¾ãé©åã§ãããã¨
+#      cdl_error( "S1098 $1: has unsuitable initializer" , decl.get_name )
+    else
+      decl.get_type.check_init( @locale, decl.get_name, decl.get_initializer, :CONSTANT )
+      @name_list.add_item( decl )
+      @const_decl_list << decl
+    end
+
+  end
+
+ ### region
+  # def self.new_region( region )
+  #   @@namespace_stack[@@namespace_sp].new_region( region )
+  # end
+# 
+  # def new_region( region )
+  #   region.set_owner self   # Rgion (Namespace)
+  #   @name_list.add_item( region )
+  # end
+
+ ###
+
+  #=== Namespace# ãã¹ã¦ã®ã»ã«ã® require ãã¼ããè¨­å®
+  # STAGE: S
+  def set_require_join
+    @celltype_list.each{ |ct|
+      ct.set_require_join
+    }
+    # ãã¹ã¦ã® namespace ã«ã¤ãã¦ require ãã¼ããã»ãã
+    @namespace_list.each{ |ns|
+      ns.set_require_join
+    }
+  end
+
+  #=== Namespace# Join ã¸ã® definition ã®è¨­å®ã¨ãã§ãã¯
+  # ã»ã«ã¿ã¤ãã«å±ãããã¹ã¦ã®ã»ã«ã«å¯¾ãã¦å®æ½
+  def set_definition_join
+    # celltype ã®ã³ã¼ããçæ
+    @cell_list.each { |c|
+      dbgPrint "set_definition_join #{c.get_name}\n"
+      c.set_definition_join
+    }
+    @namespace_list.each{ |ns|
+      ns.set_definition_join
+    }
+  end
+
+  #=== Namespace# ã»ã«ã®çµåããã§ãã¯ãã
+  def check_join
+    @cell_list.each { |c|
+      dbgPrint "check_join #{c.get_name}\n"
+      c.check_join
+      c.check_reverse_require
+    }
+    @namespace_list.each{ |ns|
+      ns.check_join
+    }
+  end
+
+  #== Namespace# ã«ã¼ãã?
+  # ã«ã¼ããã¼ã ã¹ãã¼ã¹ ã¨ ã«ã¼ããªã¼ã¸ã§ã³ã¯åã
+  def is_root?
+    @name == "::"
+  end
+
+  #== Namespace# ã«ã¼ããå¾ã
+  # ã«ã¼ããªã¼ã¸ã§ã³ã¨ã«ã¼ããã¼ã ã¹ãã¼ã¹ã¯åããªãã¸ã§ã¯ã
+  def self.get_root
+    @@root_namespace
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "#{self.class}: name: #{@name} path: #{get_namespace_path.get_path_str}"
+    @struct_tag_list.show_tree( indent + 1 )
+    @name_list.show_tree( indent + 1 )
+  end
+
+end
+
+
+class Join < BDNode
+# @name:: string
+# @subscript:: nil: not array, -1: subscript not specified, >=0: array_subscript
+# @rhs:: Expression | initializer ( array of Expression | initializer (Expression | C_EXP) )
+# @definition:: Port, Decl(attribute or var)
+#
+# available if definition is Port
+# @cell_name:: string : å³è¾ºã®ã»ã«ã®åå
+# @cell:: Cell  : å³è¾ºã®ã»ã«
+# @celltype:: Celltype : å³è¾ºã®ã»ã«ã¿ã¤ã
+# @port_name:: string : å³è¾ºã®åãå£å
+# @port:: Port : å³è¾ºã®åãå£
+# @array_member:: rhs array : available only for first appear in the same name
+# @array_member2:: Join array : available only for first appear in the same name
+# @rhs_subscript:: nil : not array, >=0: å³è¾ºã®æ·»æ°
+#
+
+# @through_list::  @cp_through_list + @region_through_list
+#  ä»¥ä¸ã®æ§é ãæã¤ï¼@cp_through_list ã®æ§é ã¯å
+±éï¼
+# @cp_through_list::  å¼ã³å£ã«æå®ããã through
+#   [ [plugin_name, cell_name, plugin_arg], [plugin_name2, cell_name2, plugin_arg], ... ]
+# @region_through_list::  region ã«æå®ããã through
+#   [ [plugin_name, cell_name, plugin_arg, region], [plugin_name2, cell_name2, plugin_arg, region2], ... ]
+#
+# @through_generated_list:: [Plugin_class object, ...]: @through_list ã«å¯¾å¿
+# @region_through_generated_list:: [Plugin_class object, ...]: @region_through_list ã«å¯¾å¿
+#
+
+  include PluginModule
+
+  #=== Join# åæå
+  #name:: string: ååï¼å±æ§åãå¼ã³å£åï¼
+  #subscript:: Nil=éé
+å, -1="[]", N="[N]"
+  #rhs:: Expression: å³è¾ºã®å¼
+  def initialize( name, subscript, rhs, locale = nil )
+    # dbgPrint "Join#new: #{name}, #{subscript} #{rhs.eval_const(nil)}\n"
+    dbgPrint "Join#new: #{name}, #{subscript}\n"
+
+    super()
+    if locale then
+      @locale = locale
+    end
+
+    @name = name
+    if subscript.instance_of?( Expression ) then
+       #mikan é
+åæ·»æ°ãæ´æ°ã§ãããã¨ãæªãã§ãã¯
+       @subscript = subscript.eval_const(nil)
+       if @subscript == nil then
+         cdl_error( "S1099 array subscript not constant"  )
+       end
+    else
+       @subscript = subscript
+    end
+
+    @rhs = rhs
+    @definition = nil
+
+    # é
+åè¦ç´ ãè¨­å®
+    # æ¬å½ã¯ãååºã®è¦ç´ ã®ã¿è¨­å®ããã®ãé©å½
+    # new_join ã§ add_array_member ã®ä¸­ã§ååºè¦ç´ ã® array_member ã«å¯¾ãè¨­å®ãã
+    if @subscript == -1 then
+      @array_member  = [self]
+      @array_member2 = [self]
+    elsif @subscript != nil then
+      @array_member = []
+      @array_member2 = []
+      @array_member[@subscript]  = self
+      @array_member2[@subscript] = self
+    end
+
+    @through_list = []
+    @cp_through_list = []
+    @region_through_list = []
+    @through_generated_list = []
+    @region_through_generated_list = []
+  end
+
+  #===  Join# å·¦è¾ºã«å¯¾å¿ãã celltype ã®å®ç¾©ãè¨­å®ããã¨ã¨ãã«ãã§ãã¯ãã
+  # STAGE:   S
+  #
+  #     ä»£å
+¥å¯è½ããã§ãã¯ãã
+  #definition:: Decl (attribute,varã®æ) ã¾ãã¯ Port (callã®æ) ã¾ãã¯ nil (definition ãè¦ã¤ãããªãã£ãæ)
+
+  def set_definition( definition )
+
+    dbgPrint "set_definition: #{@owner.get_name}.#{@name} = #{definition.class}\n"
+
+    # äºéãã§ãã¯ã®é²æ­¢
+    if @definition then
+      # set_definition ãåå¥ã«è¡ãã±ã¼ã¹ã§ãäºéã«è¡ãããå¯è½æ§ãããï¼ç°å¸¸ã§ã¯ãªãï¼
+      # äºéã« set_definition ãå®è¡ãããã¨ through ãäºéã«é©ç¨ããã¦ãã¾ã
+      # cdl_warning( "W9999 $1, internal error: set_definition duplicate", @name )
+      return
+    end
+
+    @definition = definition
+
+    # mikan å·¦è¾ºå¤ãå³è¾ºå¤ã®åãã§ãã¯ãªã©
+    if @definition.instance_of?( Decl ) then
+      check_var_init
+    elsif @definition.instance_of?( Port ) then
+      check_call_port_init
+      if @definition.get_port_type == :CALL then   # :ENTRY ãªãã¨ã©ã¼ãç¡è¦ããªã
+        check_and_gen_through
+        create_allocator_join  # through ãã©ã°ã¤ã³çæããå¾ã§ãªãã¨ãæ¿å
+¥åã®ã»ã«ã®ã¢ã­ã±ã¼ã¿ãçµåãã¦ãã¾ã
+      end
+    elsif @definition == nil then
+      cdl_error( "S1117 \'$1\' not in celltype", @name )
+    else
+      raise "UnknownToken"
+    end
+  end
+
+  #=== Join# å¤æ°ã®åæåãã§ãã¯
+  def check_var_init
+    # attribute, var ã®å ´å
+    if @definition.get_kind == :ATTRIBUTE then
+#        check_cell_cb_init( definition.get_type, @rhs )
+      # å³è¾ºã§åæåå¯è½ããã§ãã¯
+      @definition.get_type.check_init( @locale, @definition.get_identifier, @rhs, :ATTRIBUTE )
+    elsif @definition.get_kind == :VAR then
+      # var ã¯åæåã§ããªã
+      cdl_error( "S1100 $1: cannot initialize var" , @name )
+    else
+      # Bug trap
+      raise "UnknownDeclKind"
+    end
+  end
+
+  #=== Join# å¼ã³å£ã®åæåãã§ãã¯
+  def check_call_port_init
+    ### Port
+
+    # å·¦è¾ºã¯åãå£ãï¼åãå£ãåæåãããã¨ãã¦ããï¼ï¼
+    if @definition.get_port_type == :ENTRY then
+      cdl_error( "S1101 \'$1\' cannot initialize entry port" , @name )
+      return
+    end
+
+#      # é
+åæ·»æ°ã®æ´åæ§ãã§ãã¯
+#      # å¼ã³å£ã®å®ç¾©ã§ãéé
+åãªãæ·»æ°ãªããæ·»æ°ãªãé
+åãªãæ·»æ°ãªããæ·»æ°ããé
+åãªãæ·»æ°ãã
+    as = @definition.get_array_size
+    if ( @subscript == nil && as != nil ) then
+      cdl_error( "S1102 $1: must specify array subscript here" , @name )
+    elsif ( @subscript != nil && as == nil ) then
+      cdl_error( "S1103 $1: cannot specify array subscript here" , @name )
+    end
+#    if @subscript == nil then
+#      if as != nil then
+#        cdl_error( "S1103 $1: need array subscript" , @name )
+#      end
+#    elsif @subscript == -1 then
+#      if as != "[]" then
+#        cdl_error( "S1104 $1: need array subscript number. ex. \'[0]\'" , @name )
+#      end
+#    else # @subscript >0
+#      if as == nil then
+#        cdl_error( "S1105 $1: cannot specify array subscript here" , @name )
+#      elsif as == "[]" then
+#        cdl_error( "S1106 $1: cannot specify array subscript number. use \'[]\'" , @name )
+#      end
+#    end
+
+    # mikan Expression ã® get_type ã§åå°åºãããæ¹ãã¹ãã¼ã
+    # mikan '=' ã®å·¦è¾ºãé
+åãã©ããæªãã§ãã¯
+    #(1) '=' ã®å³è¾ºã¯ "Cell.ePort" ã®å½¢å¼ãï¼
+    #     æ¼ç®å­ã¯ "."  ãã¤ "." ã®å·¦è¾ºã :IDENTIFIER
+    #     "." ã®å³è¾ºã¯ãã§ãã¯ä¸è¦ (synatax çã« :IDENTIFIER)
+    #(2) "Cell" ã¯å­å¨ãããï¼ï¼ååãä¸è´ãããã®ã¯ãããï¼
+    #(3) "Cell" ã¯ cell ãï¼
+    #(4) "Cell" ã® celltype ã¯æå¹ãï¼ (ç¡å¹ãªãæ¢ã«ã¨ã©ã¼ï¼
+    #(5) "ePort" ã¯ "Cell" ã® celltype å
+ã«å­å¨ãããï¼
+    #(6) "ePort" ã¯ entry port ãï¼
+    #(7) signature ã¯ä¸è´ããã
+
+    # å³è¾ºããªãï¼ä»¥åã®æ®µéã§ã¨ã©ã¼ï¼
+    return unless @rhs
+
+    # cCall = composite.cCall; ã®ãã§ãã¯ï¼ãã®å½¢å¼ã¯å±æ§ç¨
+    # å¼ã³å£ã export ããã«ã¯ cCall => composite.cCall; ã®å½¢å¼ãç¨ãã
+    if @rhs.instance_of?( Array ) == true && @rhs[0] == :COMPOSITE then
+      cdl_error( "S1107 to export port, use \'cCall => composite.cCall\'"  )
+      return
+    elsif ! @rhs.instance_of?( Expression ) then
+      raise "Unknown bug. specify -t to find problem in source"
+    end
+
+    # å³è¾ºã® Expression ã®è¦ç´ ãåãåºã
+    ret = @rhs.analyze_cell_join_expression
+    if ret == nil then   #1
+      cdl_error( "S1108 $1: rhs not \'Cell.ePort\' form" , @name )
+      return
+    end
+
+    nsp, @rhs_subscript, @port_name = ret[0], ret[1], ret[2]
+    @cell_name = nsp.get_name     # mikan ns::cellname ã®å½¢å¼ã®èæ
+®
+
+    # composite ã®å®ç¾©ã®ä¸­ãªã object ã¯çµåå
+ cell ããè¦ã¤ãããªããã° nil ãè¿ã
+    # composite ã®å®ç¾©å¤ãªã false ãè¿ã
+    object = CompositeCelltype.find( @cell_name )
+    if object == false then
+#     mikan å·¦è¾ºã namespace ã«å¯¾å¿ãã¦ããªãããã path ã«ãã¦ find
+      # p nsp.get_path_str, nsp.get_path
+      object = Namespace.find( nsp )    #1
+      in_composite = false
+    else
+      if nsp.get_path.length != 1 then
+        cdl_error( "$1 cannot have path", nsp.get_path_str )
+      end
+      in_composite = true
+    end
+
+    if object == nil then                                             # (2)
+      cdl_error( "S1109 \'$1\' not found" , @cell_name )
+    elsif ! object.instance_of?( Cell ) then                          # (3)
+      cdl_error( "S1110 \'$1\' not cell" , @cell_name )
+    else
+      dbgPrint "set_definition: set_f_ref #{@owner.get_name}.#{@name} => #{object.get_name}\n"
+      object.set_f_ref
+
+      # å³è¾ºã®ã»ã«ã®ã»ã«ã¿ã¤ã
+      celltype = object.get_celltype
+
+      if celltype then                                                # (4)
+        object2 = celltype.find( @port_name )
+        if object2 == nil then                                        # (5)
+          cdl_error( "S1111 \'$1\' not found" , @port_name )
+        elsif ! object2.instance_of? Port \
+             || object2.get_port_type != :ENTRY then                  # (6)
+          cdl_error( "S1112 \'$1\' not entry port" , @port_name )
+        elsif @definition.get_signature != object2.get_signature then # (7)
+          cdl_error( "S1113 \'$1\' signature mismatch" , @port_name )
+        elsif object2.get_array_size then
+          # åãå£é
+å
+
+          unless @rhs_subscript then
+            # å³è¾ºã«æ·»æ°æå®ããªãã£ã
+            cdl_error( "S1114 \'$1\' should be array" , @port_name )
+          else
+
+            as = object2.get_array_size
+            if( as.kind_of?( Integer ) && as <= @rhs_subscript )then
+              # åãå£é
+åã®å¤§ããã«å¯¾ããå³è¾ºã®æ·»æ°ãåããå¤§ãã
+              cdl_error( "S1115 $1[$2]: subscript out of range (< $3)" , @port_name, @rhs_subscript, as )
+            else
+              dbgPrint "Join OK #{@owner.get_name}.#{@name}[#{@rhs_subscript}] = #{object.get_name}.#{@port_name} #{self}\n"
+              @cell = object
+              @celltype = celltype
+              @port = object2
+              # å³è¾ºã®ã»ã«ã®åãå£ object2 ãåç
+§æ¸ã¿ã«ãã
+              # object2: Port, @definition: Port
+              @cell.set_entry_port_max_subscript( @port, @rhs_subscript )
+            end
+
+            # debug
+            dbgPrint "Join set_definition: rhs: #{@cell}  #{@cell.get_name if @cell}\n"
+
+          end
+        elsif @rhs_subscript then
+          # åãå£é
+åã§ãªãã®ã«å³è¾ºã§æ·»æ°æå®ããã¦ãã
+          cdl_error( "S1116 \'$1\' entry port is not array" , @port_name )
+        else
+          dbgPrint "Join OK #{@owner.get_name}.#{@name} = #{object.get_name}.#{@port_name} #{self}\n"
+          @cell = object
+          @port = object2
+          @celltype = celltype
+
+          # å³è¾ºã®ã»ã« object ã®åãå£ object2 ãåç
+§æ¸ã¿ã«ãã
+          # object2: Port, @definition: Port
+
+          # debug
+          # p "rhs:  #{@cell}  #{@cell.get_name}"
+        end  # end of port (object2) ãã§ãã¯
+
+        #else
+        #  celltype == nil (ãã§ã«ã¨ã©ã¼)
+      end  # end of celltyep ãã§ãã¯
+
+
+      check_region( object )
+
+    end  # end of cell (object) ãã§ãã¯
+
+  end
+
+  #=== Join# ã¢ã­ã±ã¼ã¿ã®çµåãçæ
+  # STAGE: S
+  #cell::  å¼ã³å£ã®çµåå
+ã®ã»ã«
+  #
+  # ããã§ã¯å¼ã³å£å´ã«çæãããã¢ã­ã±ã¼ã¿å¼ã³å£ã®çµåãçæ
+  # åãå£å´ã¯ Cell ã® set_specifier_list ã§çæ
+  #  a[*] ã®å
+å®¹ã¯ Cell ã® set_specifier_list ãåç
+§
+  def create_allocator_join
+
+    cell = get_rhs_cell2   # å³è¾ºã®ã»ã«ãå¾ã
+    port = get_rhs_port2
+
+    if( cell && cell.get_allocator_list ) then      # cell == nil ãªãæ¢ã«ã¨ã©ã¼
+
+      dbgPrint "create_allocator_join: #{@owner.get_name}.#{@name}=>#{cell ? cell.get_name : "nil"}\n"
+
+      cell.get_allocator_list.each { |a|
+
+        if( a[0+1] == port && a[1+1] == @rhs_subscript )then
+          # ååã®ä¸è´ãããã®ã®çµåãçæãã
+          # éä¸è¶³ã¯ãå¥éãã§ãã¯ããã
+          cp_name = :"#{@name}_#{a[2+1]}_#{a[3+1]}"
+          # p "creating allocator join #{cp_name} #{@subscript} #{a[1+1]}"
+          join = Join.new( cp_name, @subscript, a[4+1], @locale )
+
+          #debug
+          dbgPrint "create_allocator_join: #{@owner.get_name}.#{cp_name} [#{@subscript}] #{@name}\n"
+          @owner.new_join join
+        else
+          dbgPrint "create_allocator_join:3 not #{@owner.get_name}.#{a[0+1]} #{@name}\n"
+        end
+      }
+    end
+  end
+
+  #=== Join# ãªã¼ã¸ã§ã³éã®çµåããã§ãã¯
+  # ãªã¼ã¸ã§ã³éã® through ã«ãã @region_through_list ã®ä½æ
+  # å®éã®çæã¯ check_and_gen_through ã§è¡ã
+  # mikan Cell#distance ã¨Region ã¸ãã©ãçãã¾ã§ããã®å¦çã«å
+±éé¨åãå¤ã
+  def check_region( object )
+
+    #debug
+    dbgPrint "check_region #{@owner.get_name}.#{@name} => #{object.get_name}\n"
+    # print "DOMAIN: check_region #{@owner.get_name}.#{@name} => #{object.get_name}\n"
+
+    # ãã©ã°ã¤ã³ã§çæããããªãã§ã¯çæããªã
+    # ãããªãã¨ãã©ã°ã¤ã³çæããããã®ã¨ã®éã§ãç¡éã«çæããã
+##    if Generator.get_nest >= 1 then
+##    if Generator.get_plugin then     # mikan ããã¯å¿
+è¦ï¼ (æå³è§£ææ®µéã§ã®å®è¡ã«ãªãã®ã§ä¸é©å)
+    if @owner.get_plugin.kind_of?( ThroughPlugin ) then
+      # ãã©ã°ã¤ã³çæãããã»ã«ã®å ´åãçµåãã§ãã¯ã®ã¿
+      return
+    end
+
+    # region ã®ãã§ãã¯
+    r1 = @owner.get_region      # å¼ã³å£ã»ã«ã® region
+    r2 = object.get_region      # åãå£ã»ã«ã® region
+
+    if ! r1.equal? r2 then      # åä¸ region ãªãå¼åºãå¯è½
+
+      f1 = r1.get_family_line
+      len1 = f1.length
+      f2 = r2.get_family_line
+      len2 = f2.length
+
+      # ä¸ä¸è´ã«ãªãã¨ããï¼å
+å¼ï¼ãæ¢ã
+      i = 1  # i = 0 ã¯ :RootRegion ãªã®ã§å¿
+ãä¸è´
+      while( i < len1 && i < len2 )
+        if( f1[i] != f2[i] )then
+          break
+        end
+        i += 1
+      end
+
+      sibling_level = i     # å
+å¼ã¨ãªãã¬ãã«ããããã¯ã©ã¡ããä¸æ¹ãçµãã£ãã¬ãã«
+
+      dbgPrint "sibling_level: #{i}\n"
+      dbgPrint "from: #{f1[i].get_name}\n" if f1[i]
+      dbgPrint "to: #{f2[i].get_name}\n" if f2[i]
+
+      if f1[sibling_level] && f2[sibling_level] then
+        b_to_through = true
+      else
+        b_to_through = false
+      end
+
+
+      # å¼ã³å´ã«ã¤ãã¦å¼ã³å
+ã®ã¬ãã«ããå
+å¼ã¬ãã«ã¾ã§ï¼out_through ããã§ãã¯ããã³æ¿å
+¥ï¼
+      i = len1 -1
+      if b_to_through then
+        end_level = sibling_level
+      else
+        end_level = sibling_level - 1
+      end
+      while i > end_level
+      # while i > sibling_level
+      # while i >= sibling_level
+        dbgPrint "going out from #{f1[i].get_name} level=#{i}\n"
+        region_count = f1[i].next_out_through_count
+        out_through_list = f1[i].get_out_through_list   # [ plugin_name, plugin_arg ]
+        domain = f1[i].get_domain_type
+        if domain then
+          domain_through = f1[i].get_domain_type.add_through_plugin( self, f1[i], f1[i-1], :OUT_THROUGH )
+          if domain_through == nil then
+            cdl_error( "S9999 $1: going out from regin '$2' not permitted by domain '$3'" , @name, f1[i].get_name, f1[i].get_domain_type.get_name )
+          end
+        elsif out_through_list.length == 0 then
+          cdl_error( "S1118 $1: going out from region \'$2\' not permitted" , @name, f1[i].get_name )
+        end
+
+        out_through_list.each { |ol|
+          if ol[0] then    # plugin_name ãæå®ããã¦ããªããã°ç»é²ããªã
+            plugin_arg = CDLString.remove_dquote ol[1]
+            through = [ ol[0], :"Join_out_through_", plugin_arg, f1[i], f1[i-1], :OUT_THROUGH, region_count]
+            @region_through_list << through
+          end
+        }
+        if domain_through && domain_through.length > 0 then
+          through = [ domain_through[0], :"Join_domain_out_through_", domain_through[1], f1[i], f1[i-1], :OUT_THROUGH, region_count ]
+          @region_through_list << through
+        end
+        i -= 1
+      end
+
+      # å
+å¼ã¬ãã«ã«ããã¦ï¼to_through ããã§ãã¯ããã³æ¿å
+¥ï¼
+      if f1[sibling_level] && f2[sibling_level] then
+        dbgPrint "going from #{f1[sibling_level].get_name} to #{f2[sibling_level].get_name}\n"
+        found = 0
+        region_count = f1[i].next_to_through_count( f2[sibling_level].get_name )   # to_through ã® region ã«ã¦ã³ã
+        f1[sibling_level].get_to_through_list.each { |t|
+          if t[0][0] == f2[sibling_level].get_name then   # region åãä¸è´ããã ?
+            if t[1] then    # plugin_name ãæå®ããã¦ããªããã°ç»é²ããªã
+              plugin_arg = CDLString.remove_dquote t[2]
+              through = [ t[1], :"Join_to_through__", plugin_arg, f1[sibling_level], f2[sibling_level], :TO_THROUGH, region_count ]
+              @region_through_list << through
+            end
+            found = 1
+          end
+        }
+        domain = f1[sibling_level].get_domain_type
+        if domain then
+          domain_through = f1[sibling_level].get_domain_type.add_through_plugin( self, f1[sibling_level], f2[sibling_level], :TO_THROUGH )
+          if domain_through == nil then
+            cdl_error( "S9999 $1: going from regin '$2' not permitted by domain'$3'" , @name, f1[sibling_level].get_name, f2[sibling_level].get_domain_type.get_name )
+          end
+          if domain_through && domain_through.length > 0 then
+            through = [ domain_through[0], :"Join_domain_to_through_", domain_through[1], f1[sibling_level], f2[sibling_level], :TO_THROUGH, region_count ]
+            @region_through_list << through
+          end
+        elsif found == 0 then
+          cdl_error( "S1119 $1: going from region \'$2\' to \'$3\' not permitted" , @name, f1[sibling_level].get_name, f2[sibling_level].get_name )
+        end
+      end
+
+      # åãå´ã«ã¤ãã¦å
+å¼ã¬ãã«ããåãå´ã®ã¬ãã«ã¾ã§ï¼in_through ããã§ãã¯ããã³æ¿å
+¥ï¼
+      if b_to_through then
+        i = sibling_level + 1      # to_through ãçµãå ´åãæåã® in_through ã¯é©ç¨ããªã
+      else
+        i = sibling_level
+      end
+      while i < len2
+        dbgPrint "going in to #{f2[i].get_name} level=#{i}\n"
+        region_count = f2[i].next_in_through_count
+        in_through_list = f2[i].get_in_through_list   # [ plugin_name, plugin_arg ]
+        domain = f2[i].get_domain_type
+        if domain then
+          domain_through = f2[i].get_domain_type.add_through_plugin( self, f2[i-1], f2[i], :IN_THROUGH )
+          if domain_through == nil then
+            cdl_error( "S9999 $1: going in from regin '$2' to '$3' not permitted by domain '$4'",
+                        @name, f2[i-1].get_name, f2[i].get_name, f2[i].get_domain_type.get_name )
+          end
+          if domain_through && domain_through.length > 0 then
+            through = [ domain_through[0], :"Join_domain_in_through_", domain_through[1], f2[i-1], f2[i], :IN_THROUGH, region_count ]
+            @region_through_list << through
+          end
+        elsif in_through_list.length == 0 then
+          cdl_error( "S1120 $1: going in to region \'$2\' not permitted" , @name, f2[i].get_name )
+        end
+        in_through_list.each { |il|
+          if il[0] then    # plugin_name ãæå®ããã¦ããªããã°ç»é²ããªã
+            plugin_arg = CDLString.remove_dquote il[1]
+            through = [ il[0], :"Join_in_through_", plugin_arg, f2[i-1], f2[i],:IN_THROUGH, region_count ]
+            @region_through_list << through
+          end
+        }
+        i += 1
+      end
+
+    end
+  end
+
+
+  #=== Join# çæããªããªã¼ã¸ã§ã³ã¸ã®çµåããã§ãã¯
+  # å³è¾ºã®ã»ã«ããçæãããªããªã¼ã¸ã§ã³ã«ããã°ã¨ã©ã¼
+  # å³è¾ºã¯ããã©ã°ã¤ã³çæãããã»ã«ãããã°ããããå¯¾è±¡ã¨ãã
+  def check_region2
+    lhs_cell = @owner
+
+    # çæããªããªã¼ã¸ã§ã³ã®ã»ã«ã¸ã®çµåãï¼
+    # if join.get_cell && ! join.get_cell.is_generate? then
+    # if get_rhs_cell && ! get_rhs_cell.is_generate? then # composite ã»ã«ããã­ã¿ã¤ãå®£è¨ã®å ´åä¾å¤
+    # print "Link root: (caller #{@owner.get_name}) '#{@owner.get_region.get_link_root.get_name}'"
+    # print " #{@owner.get_region.get_link_root == get_rhs_region.get_link_root ? "==" : "!="} "
+    # print "'#{get_rhs_region.get_link_root.get_name}'  (callee #{@cell_name})\n"
+
+    if get_rhs_region then
+      dbgPrint "check_region2 #{lhs_cell.get_name} => #{get_rhs_region.get_path_string}#{@rhs.to_s}\n"
+
+      # if get_rhs_region.is_generate? != true then  #3
+      if @owner.get_region.get_link_root != get_rhs_region.get_link_root then
+        cdl_error( "S1121 \'$1\' in region \'$2\' cannot be directly joined $3 in  $4" , lhs_cell.get_name, lhs_cell.get_region.get_namespace_path.get_path_str, @rhs.to_s, get_rhs_region.get_namespace_path.get_path_str )
+      end
+    else
+      # rhs ã®ã»ã«ãå­å¨ããªãã£ã (æ¢ã«ã¨ã©ã¼)
+    end
+  end
+
+  def get_definition
+    @definition
+  end
+
+  #=== Join# specifier ãè¨­å®
+  # STAGE: B
+  # set_specifier_list ã¯ãjoin ã®è§£æã®æå¾ã§å¼ã³åºããã
+  # through æå®å­ãè¨­å®
+  #  check_and_gen_through ãå¼åºãã¦ãthrough çæ
+  def set_specifier_list( specifier_list )
+
+    specifier_list.each { |s|
+      case s[0]
+      when :THROUGH
+        # set plugin_name
+        plugin_name = s[1].to_s
+        plugin_name[0] = "#{plugin_name[/^./].upcase}"     # å
+é ­æå­ãå¤§æå­ã« : ruby ã®ã¯ã©ã¹åã®å¶ç´
+
+        # set cell_name
+        cell_name = :"#{s[1].to_s}_"
+
+        # set plugin_arg
+        plugin_arg = CDLString.remove_dquote s[2].to_s
+        # plugin_arg = s[2].to_s.gsub( /\A"(.*)/, '\1' )   # åå¾ã® "" ãåãé¤ã
+        # plugin_arg.sub!( /(.*)"\z/, '\1' )
+
+        @cp_through_list << [ plugin_name, cell_name, plugin_arg ]
+      end
+    }
+
+  end
+
+  #=== Join# through ã®ãã§ãã¯ã¨çæ
+  # new_join ã®ä¸­ã® check_region ã§ region éã® through ã @region_through ã«è¨­å®ããã
+  # set_specifier ã§å¼ã³å£ã®çµåã§æå®ããã through ã @cp_through è¨­å®ããã
+  # ãã®å¾ããã®ã¡ã½ãããå¼ã°ãã
+  def check_and_gen_through
+
+    dbgPrint "check_and_gen_through #{@owner.get_name}.#{@name}\n"
+
+    if ! @definition.instance_of? Port then
+      cdl_error( "S1123 $1 : not port: \'through\' can be specified only for port" , @name )
+      return
+    end
+    if @cp_through_list.length > 0 then
+      # is_empty? must check before is_omit?
+      if @definition.get_signature && @definition.get_signature.is_empty? then
+        cdl_warning( "W9999 'through' is specified for empty signature, ignored"  )
+        return
+      elsif @definition.is_omit? then
+        cdl_warning( "W9999 'through' is specified for omitted port, ignored"  )
+        return
+      end
+    end
+
+    @through_list = @cp_through_list + @region_through_list
+      # å¾ãã @cp_through_list ã¨ @region_through_list ã«åããããããã®ãããªå®è£
+ã«ãªã£ã
+
+    if @through_list then           # nil when the join is not Port
+      len = @through_list.length    # through ãé£æ¥ãã¦ããæ°
+    else
+      len = 0
+    end
+    cp_len = @cp_through_list.length
+
+    if @owner.is_in_composite? && len > 0 then
+      cdl_error( "S1177 cannot specify 'through' in composite in current version" )
+      return
+    end
+
+    # é£ç¶ãã through ã«ã¤ãã¦ãåãå£å´ããé ã«ã»ã«ãçæãè§£éãã
+    i = len - 1
+    while i >= 0
+
+      through = @through_list[ i ]
+      plugin_name           = through[ 0 ]
+      generating_cell_name  = through[ 1 ]
+      plugin_arg            = through[ 2 ]
+
+      if i != len - 1 then
+
+        begin
+          next_cell_nsp       = @through_generated_list[ i + 1 ].get_cell_namespace_path
+          next_port_name      = @through_generated_list[ i + 1 ].get_through_entry_port_name
+        rescue Exception => evar
+          cdl_error( "S1124 $1: plugin function failed: \'get_through_entry_port_name\'" , plugin_name )
+          print_exception( evar )
+          i -= 1
+          next
+        end
+
+        next_cell = Namespace.find( next_cell_nsp )    #1
+        if next_cell == nil then
+          # p "next_cell_path: #{next_cell_nsp.get_path_str}"
+          cdl_error( "S1125 $1: not generated cell \'$2\'" , @through_generated_list[ i + 1 ].class, next_cell_nsp.get_path_str )
+          return
+        end
+
+      else
+        # æå¾ã®ã»ã«ã®å ´åãæ¬¡ã®ã»ã«ã®ååããã¼ãå
+        next_cell      = @cell
+        next_port_name = @port_name
+
+        if next_cell == nil then
+          # çµåå
+ããªã
+          return
+        end
+      end
+
+      if i >= cp_len then
+        # region_through_list é¨å
+        # region ãã @cell_name.@port_name ã¸ã® through ããªããæ¢ã
+        # rp = @through_list[i][3].find_cell_port_through_plugin( @cell_name, @port_name ) #762
+        rp = @through_list[i][3].find_cell_port_through_plugin( @cell.get_global_name, @port_name )
+           # @through_list[i] ã¨ @region_through_list[i-cp_len] ã¯åã
+        # å
+±ç¨ããªãããã«ããã«ã¯ãè¦ã¤ãããªãã£ããã¨ã«ããã°ãã
+        # rp = nil
+      else
+        # region ä»¥å¤ã®ãã®ã¯å
+±æããªã
+        # å¼ã³å£å´ã«æå®ããã¦ããããplugin_arg ãç°ãªããããããªã
+        rp = nil
+      end
+
+      if rp == nil then
+        if( load_plugin( plugin_name, ThroughPlugin ) ) then
+          gen_through_cell_code_and_parse( plugin_name, i, next_cell, next_port_name )
+        end
+      else
+        # è¦ã¤ãã£ããã®ãå
+±ç¨ãã
+        @through_generated_list[ i ] = rp
+      end
+
+      if i >= cp_len then
+        # @through_generated_list ã®ãã¡ @region_through_listã«å¯¾å¿ããé¨å
+        @region_through_generated_list[ i - cp_len ] = @through_generated_list[ i ]
+        if rp == nil then
+          # çæãããã®ã region(@through_list[i][3]) ã®ãªã¹ãã«è¿½å 
+          # @through_list[i][3].add_cell_port_through_plugin( @cell_name, @port_name, @through_generated_list[i] ) #762
+          @through_list[i][3].add_cell_port_through_plugin( @cell.get_global_name, @port_name, @through_generated_list[i] )
+        end
+      end
+
+      if i == 0 then
+        # æãå¼ã³å£å´ã®ã»ã«ã¯ãCDL ä¸ã®çµåããªããããåç
+§ããããã¨ã«ãªããªã
+        # mikan namespace å¯¾å¿
+        # cell = Namespace.find( [ @through_generated_list[0].get_cell_name] )    #1
+        if @through_generated_list[0] == nil then
+          return  # plugin_object ã®çæã«å¤±æãã¦ãã
+        end
+        cell = Namespace.find( @through_generated_list[0].get_cell_namespace_path )    #1
+        if cell.instance_of? Cell then
+          cell.set_f_ref
+        end
+      end
+
+      i -= 1
+    end
+
+  end
+
+  @@through_count = { }
+  def get_through_count name
+    sym = name.to_sym
+    if @@through_count[ sym ] then
+      @@through_count[ sym ] += 1
+    else
+      @@through_count[ sym ] = 0
+    end
+    return @@through_count[ sym ]
+  end
+
+  #=== Join# through ãã©ã°ã¤ã³ãå¼ã³åºãã¦ CDL çæãããã¨ã¨ãã«ãimport ãã
+  def gen_through_cell_code_and_parse( plugin_name, i, next_cell, next_port_name )
+
+    through = @through_list[ i ]
+    plugin_name           = through[ 0 ]
+    generating_cell_name  = :"#{through[ 1 ]}_#{get_through_count through[ 1 ]}"
+    plugin_arg            = through[ 2 ]
+    if through[ 3 ] then
+      # region éã® through ã®å ´å
+      @@start_region      = through[ 3 ]
+      if next_cell.get_region.equal? @@start_region then
+        @@end_region      = @@start_region
+      else
+        @@end_region      = through[ 4 ]
+      end
+      @@through_type      = through[ 5 ]
+      @@region_count      = through[ 6 ]
+    else
+      # å¼ã³å£ã® through ã®å ´å
+      @@start_region      = @owner.get_region    # å¼ã³å£å´ã»ã«ã® region
+      @@end_region        = next_cell.get_region # æ¬¡ã®ã»ã«ã® region
+      @@through_type      = :THROUGH             # å¼ã³å£ã® through æå®
+      @@region_count      = 0
+    end
+    @@plugin_creating_join = self
+
+    caller_cell = @owner
+
+    plugin_object = nil
+    eval_str = "plugin_object = #{plugin_name}.new( '#{generating_cell_name}'.to_sym, plugin_arg.to_s, next_cell, '#{next_port_name}'.to_sym, @definition.get_signature, @celltype, caller_cell )"
+    if $verbose then
+      print "new through: #{eval_str}\n"
+    end
+
+    begin
+      eval( eval_str )     # plugin ãçæ
+      plugin_object.set_locale @locale
+    rescue Exception => evar
+      cdl_error( "S1126 $1: fail to new" , plugin_name )
+      if @celltype && @definition.get_signature && caller_cell && next_cell then
+        print "signature: #{@definition.get_signature.get_name} from: #{caller_cell.get_name} to: #{next_cell.get_name} of celltype: #{@celltype.get_name}\n"
+      end
+      print "eval( #{eval_str} )\n"
+
+      print_exception( evar )
+      return 
+    end
+
+    @through_generated_list[ i ] = plugin_object
+
+    # Region ã«é¢ããæ
+å ±ãè¨­å®
+    # å¾ããè¿½å ããã®ã§ãnew ã®å¼æ°å¤ã§è¨­å®
+    # plugin_object.set_through_info( start_region, end_region, through_type )
+
+    generate_and_parse plugin_object
+  end
+
+  #ãã©ã°ã¤ã³ã¸ã®å¼æ°ã§æ¸¡ããªããã®ããä¸æçã«è¨æ¶ãã¦ãã
+  # ãã©ã°ã¤ã³ã® initialize ã®ä¸­ã§ã³ã¼ã«ããã¯ãã¦è¨­å®ãã
+  @@plugin_creating_join = nil
+  @@start_region = nil
+  @@end_region = nil
+  @@through_type = nil
+  @@region_count = nil
+
+  #=== Join# ThroughPlugin ã®è¿½å æ
+å ±ãè¨­å®ãã
+  # ãã®ã¡ã½ããã¯ ThroughPlugin#initialize ããå¼ã³åºããã
+  # plugin_object ãçæããéã®å¼æ°ã§ã¯ä¸è¶³ããæ
+å ±ãè¿½å ãã
+  def self.set_through_info plugin_object
+    plugin_object.set_through_info( @@start_region, @@end_region, @@through_type,
+                                    @@plugin_creating_join,
+                                    @@plugin_creating_join.get_cell,
+                                    @@region_count )
+  end
+
+  def get_name
+    @name
+  end
+
+  #=== Join#é
+åæ·»æ°ãå¾ã
+  # @subscript ã®èª¬æãåç
+§ã®ãã¨
+  def get_subscript
+    @subscript
+  end
+
+  def get_cell_name         # åãå£ã»ã«å
+    @cell_name
+  end
+
+  def get_celltype
+    @celltype
+  end
+
+  def get_cell
+    @cell
+  end
+
+  #=== Join# å³è¾ºã®å®ã»ã«ãå¾ã
+  #    å®ã»ã«ã¨ã¯ through ã§æ¿å
+¥ããããã®ãcomposite ã®å
+é¨ãªã©å®éã«çµåãããå
+
+  #    ãã®ã¡ã½ããã¯ãget_rhs_port ã¨å¯¾ã«ãªã£ã¦ãã
+  #    ãã®ã¡ã½ããã¯ãæå³è§£ææ®µéã§ã¯å¼ã³åºãã¦ã¯ãªããªã (å¯¾è±¡ã»ã«ã®æå³è§£æãæ¸ãåã«ã¯æ­£ããçµæãè¿ããªã)
+  def get_rhs_cell
+    # through æå®ããï¼
+    if @through_list[0] then
+      # mikan through ã§çæãããã®ã root namespace éå®
+      if @through_generated_list[0] then
+        # cell = Namespace.find( [ "::", @through_generated_list[0].get_cell_name.to_sym ] )    #1
+        cell = Namespace.find( @through_generated_list[0].get_cell_namespace_path )    #1
+        # cell ã nil ã«ãªãã®ã¯ãã©ã°ã¤ã³ã® get_cell_namespace_path ãæ­£ãããªããã
+        # ãã©ã°ã¤ã³çæã³ã¼ããã¨ã©ã¼ã«ãªã£ã¦ããã
+        # ã§ãã®æªããã©ã°ã¤ã³ãå¤ããã°ãcell == nil ãã¯ãããæ¹ãããã
+        return cell.get_real_cell( @through_generated_list[0].get_through_entry_port_name )
+      else
+        return nil            # generate ã«å¤±æãã¦ãã
+      end
+    elsif @cell then
+      return @cell.get_real_cell( @port_name )
+    else
+      # å³è¾ºãæªå®ç¾©ã®å ´å @cell ã¯ nil (æ¢ã«ã¨ã©ã¼)
+      return nil
+    end
+  end
+
+  #=== Join# å³è¾ºã®ã»ã«ãå¾ã
+  # å³è¾ºã®ã»ã«ãå¾ãããã ããcomposite å±éããã¦ããªã
+  # composite å±éããããã®ãå¾ãã«ã¯ get_rhs_cell ãä½¿ã
+  # ãã­ãã¿ã¤ãå®£è¨ããããã¦ããªãå ´åã«ã¯ããã¡ãããä½¿ããªã
+  # ãã®ã¡ã½ããã¯ get_rhs_port2 ã¨å¯¾ã«ãªã£ã¦ãã
+  def get_rhs_cell2
+    # through æå®ããï¼
+    if @through_list[0] then
+      # mikan through ã§çæãããã®ã root namespace éå®
+      # cell = Namespace.find( [ "::", @through_generated_list[0].get_cell_name ] )
+      if @through_generated_list[0] then
+        # cell = Namespace.find( [ @through_generated_list[0].get_cell_name ] )    #1
+        cell = Namespace.find( @through_generated_list[0].get_cell_namespace_path )    #1
+      else
+        cell = @cell            # generate ã«å¤±æãã¦ãã
+      end
+    else
+      cell = @cell
+    end
+
+    return cell
+  end
+
+  #=== Join# å³è¾ºã®ã»ã«ãå¾ã
+  # through ã¯é©ç¨ããªãããcomposite ã¯å±éããå¾ã®ã»ã«
+  # (æå³è§£æãçµãã£ã¦ããªãã¨ãcomposite å±éãçµãã£ã¦ããªã)
+  # ãã®ã¡ã½ããã¯ get_rhs_port3 ã¨å¯¾ã«ãªã£ã¦ãã
+  def get_rhs_cell3
+    if @cell then
+      return @cell.get_real_cell( @port_name )
+    end
+  end
+
+  #=== Join# å³è¾ºã®ã»ã«ã®ãªã¼ã¸ã§ã³ãå¾ã
+  # å³è¾ºãæªå®ç¾©ã®å ´åãnil ãè¿ã
+  # composite ã®å ´åãå®ã»ã«ã§ã¯ãªã composite cell ã® region ãè¿ã(composite ã¯ãã¹ã¦åã region ã«å±ãã)
+  # composite ã® cell ããã­ãã¿ã¤ãå®£è¨ããã¦ããã¨ã get_rhs_cell/get_real_cell ã¯ ruby ã®ä¾å¤ã¨ãªã
+  def get_rhs_region
+    # through æå®ããï¼
+    if @through_list[0] then
+      if @through_generated_list[0] then
+        # mikan through ã§çæãããã®ã root namespace éå®
+        # cell = Namespace.find( [ "::", @through_generated_list[0].get_cell_name.to_sym ] )    #1
+        cell = Namespace.find( @through_generated_list[0].get_cell_namespace_path )    #1
+        if cell then
+          return cell.get_region
+        end
+      else
+        return nil       # generate ã«å¤±æãã¦ãã
+      end
+    elsif @cell then
+      return @cell.get_region
+    end
+    # å³è¾ºãæªå®ç¾©ã®å ´å @cell ã¯ nil (æ¢ã«ã¨ã©ã¼)
+    return nil
+  end
+
+  def get_cell_global_name  # åãå£ã»ã«åï¼ã³ã³ãã¸ãããªãå±éããå
+å´ã®ã»ã«ï¼
+
+    # debug
+    dbgPrint "cell get_cell_global_name:  #{@cell_name}\n"
+    # @cell.show_tree( 1 )
+
+    if @cell then
+      return @cell.get_real_global_name( @port_name )
+    else
+      return "NonDefinedCell?"
+    end
+
+  end
+
+  #===  Join# çµåã®å³è¾ºã®åãå£ã®åå
+  #     namespace å + '_' + ã»ã«å + '_' + åãå£å   ï¼ãã®ã»ã«ã composite ãªãã°å±éå¾ã®ã»ã«åãåãå£åï¼
+  #subscript:: Integer  å¼ã³å£é
+åã®ææ·»æ° ã¾ãã¯ nil å¼ã³å£é
+åã§ãªãæ
+  def get_port_global_name( subscript = nil )  # åãå£åï¼ã³ã³ãã¸ãããªãå±éããå
+å´ã®ã»ã«ï¼
+
+    # debug
+    dbgPrint "Cell get_port_global_name:  #{@cell_name}\n"
+
+    # through æå®ããï¼
+    if @through_list[0] then
+
+      # mikan through ã§çæãããã®ã root namespace éå®
+      # cell = Namespace.find( [ "::", @through_generated_list[0].get_cell_name.to_sym ] )    #1
+      cell = Namespace.find( @through_generated_list[0].get_cell_namespace_path )    #1
+
+      # through ã§æ¿å
+¥ãããã»ã«ã§ãå®éã«æ¥ç¶ãããã»ã«ï¼compositeã®å ´åå
+é¨ã®)ã®åãå£ã® C è¨èªåå
+      return cell.get_real_global_port_name( @through_generated_list[0].get_through_entry_port_name )
+    else
+
+      # å®éã«æ¥ç¶ãããã»ã«ã®åãå£ã® C è¨èªåå
+      if @cell then
+        return @cell.get_real_global_port_name( @port_name )
+      else
+        return "UndefinedCellsPort?"
+      end
+
+    end
+
+  end
+
+  def get_port_name
+    @port_name
+  end
+
+  def get_rhs
+    @rhs
+  end
+
+  def get_rhs_subscript
+    @rhs_subscript
+  end
+
+  #=== Join# å³è¾ºã®ãã¼ããå¾ã
+  #    å³è¾ºã composite ã®å ´åã¯ãå
+é¨ã®ç¹ããã»ã«ã®ãã¼ã, through ã®å ´åã¯æ¿å
+¥ãããã»ã«ã®ãã¼ã
+  #    ãã®ã¡ã½ããã¯ get_rhs_cell ã¨å¯¾ã«ãªã£ã¦ãã
+  def get_rhs_port
+    # through æå®ããï¼
+    if @through_list[0] then
+      # mikan through ã§çæãããã®ã root namespace éå®
+      # through ã§çæãããã»ã«ãæ¢ã
+#      cell = Namespace.find( [ "::", @through_generated_list[0].get_cell_name.to_sym ] )    #1
+      cell = Namespace.find( @through_generated_list[0].get_cell_namespace_path )    #1
+      # cell ã®ãã©ã°ã¤ã³ã§çæããããã¼ãåã®ãã¼ããæ¢ã (composite ãªãå
+é¨ã®ç¹ãããã¼ã)
+      return cell.get_real_port( @through_generated_list[0].get_through_entry_port_name )
+    else
+      # ãã¼ããè¿ã(composite ãªãå
+é¨ã®ç¹ãããã¼ããè¿ã)
+      return @cell.get_real_port( @port_name )
+    end
+  end
+
+  #=== Join# å³è¾ºã®ãã¼ããå¾ã
+  # å³è¾ºã®ãã¼ããå¾ãã
+  # ããã¯ãã­ãã¿ã¤ãå®£è¨ããããã¦ããªãå ´åã«ã¯ããã¡ãããä½¿ããªã
+  def get_rhs_port2
+    # through æå®ããï¼
+    if @through_list[0] then
+      if @through_generated_list[0] then
+        port = @through_generated_list[0].get_through_entry_port_name.to_sym
+      else
+        port = @port_name    # generate ã«å¤±æãã¦ãã
+      end
+    else
+      port = @port_name
+    end
+
+    return port
+  end
+
+  #=== Join# å³è¾ºã®ãã¼ããå¾ã
+  # through ã¯é©ç¨ããªãããcomposite ã¯å±éããå¾ã®ã»ã«ã®å¯¾å¿ãããã¼ã
+  def get_rhs_port3
+    if @cell then
+      return @cell.get_real_port( @port_name )
+    end
+  end
+
+  #=== Join# å¼ã³å£é
+åã®2çªç®ä»¥éã®è¦ç´ ãè¿½å ãã
+  #     ä¸çªæåã«å®ç¾©ãããé
+åè¦ç´ ãå
+¨è¦ç´ ã®åæå¤ã®é
+åãæã¤
+  #     ãã®ã¡ã½ããã¯éé
+åã®å ´åãå¼åºãããï¼join éè¤ã¨ã©ã¼ã®å ´åï¼
+  #join2:: Join  å¼ã³å£é
+åè¦ç´ ã® Join
+  def add_array_member join2
+
+    # subscript2: join2 ã®å·¦è¾ºæ·»æ°
+    subscript2 = join2.get_subscript
+
+    if @subscript == nil then		# not array : initialize duplicate
+      # éé
+åã®å ´åãjoin ãéè¤ãã¦ãã
+      cdl_error( "S1127 \'$1\' duplicate", @name )
+      # print "add_array_member2: #{@owner.get_name}\n"
+
+    elsif @subscript >= 0 then
+      # æ·»æ°æå®ããã®å ´å
+      if( subscript2 == nil || subscript2 < 0 ) then
+        # join2 å·¦è¾ºã¯éé
+åã¾ãã¯æ·»æ°ãªã
+        # é
+åãä¸ä¸è´
+        cdl_error( "S1128 \'$1\' inconsistent array definition", @name )
+      elsif @array_member[subscript2] != nil then
+        # åãæ·»æ°ãæ¢ã«å®ç¾©æ¸ã¿
+        cdl_error( "S1129 \'$1\' redefinition of subscript $2" ,@name, subscript2 )
+      else
+        # æ·»æ°ã®ä½ç½®ã«è¦ç´ ãè¿½å 
+        @array_member[subscript2] = join2.get_rhs
+        @array_member2[subscript2] = join2
+#        p "0:#{join2.get_rhs}"
+      end
+
+    else
+      # æ·»æ°æå®ãªãã®å ´å
+      if( subscript2 == nil || subscript2 >= 0 ) then
+        # join2 å·¦è¾ºã¯éé
+åã¾ãã¯æ·»æ°æ
+        # é
+åãä¸ä¸è´
+        cdl_error( "S1130 \'R1\' inconsistent array definition", @name )
+      end
+
+      # æ·»æ°ãªãé
+åã®å ´åãé
+åè¦ç´ ãè¿½å 
+      @array_member  << join2.get_rhs
+      @array_member2 << join2
+    end
+  end
+
+  def get_array_member
+    @array_member
+  end
+
+  def get_array_member2
+    @array_member2
+  end
+
+  def change_name name
+    # debug
+    dbgPrint "change_name: #{@name} to #{name}\n"
+
+    @name = name
+
+    if @array_member2 then
+      i = 0
+      while i < @array_member2.length
+        if @array_member2[i] != self && @array_member[i] != nil then
+          # @array_member2[i] ã nil ã«ãªãã®ã¯ optional ã®æã¨ã
+          # Join ã® initialize ã§ç¡é§ã« @array_member2 ãè¨­å®ããã¦ããå ´å
+          # ç¡é§ã«è¨­å®ããã¦ãããã®ã«ã¤ãã¦ã¯ãåå¸°çã«å¼ã³åºãå¿
+è¦ã¯ãªãï¼clone_for_composite ã§ã¯å¯¾ç­ãã¦ããï¼
+          @array_member2[i].change_name( name )
+        end
+        i += 1
+      end
+    end
+  end
+
+  # composite cell ãå±éããã»ã«ã®çµåã clone ããã»ã«ã®ååã«å¤æ´
+  def change_rhs_port( clone_cell_list, celltype )
+
+    # debug
+    if $debug then
+      dbgPrint "change_rhs name: #{@name}  cell_name: #{@cell_name} #{@cell} #{self}\n"
+
+      clone_cell_list.each{ |cell, ce|
+        dbgPrint "change_rhs:  #{cell.get_name}=#{cell} : #{ce.get_name}\n"
+      }
+    end
+
+    c = clone_cell_list[@cell]
+    return if c == nil
+
+    # debug
+    dbgPrint "  cell_name:   #{@cell_name} => #{c.get_global_name}, #{c.get_name}\n"
+
+    # @rhs ã®å
+å®¹ãèª¿æ´ãã¦ããï¼ãã®å
+å®¹ã¯ãsubscript ãé¤ãã¦ãå¾ããä½¿ããã¦ããªãï¼
+    elements = @rhs.get_elements
+    if elements[0] == :OP_SUBSC then  # å³è¾ºï¼åãå£é
+åï¼
+      elements  = elements[1]
+    end
+
+    # å³è¾ºããcell.ePort ã®å½¢å¼ã§ãªã
+    if elements[0] != :OP_DOT || elements[1][0] != :IDENTIFIER then   #1
+      return
+    else
+      # ã»ã«åã composite å
+é¨ã®ååãããå¤é¨ã®ååã«å
+¥ãæ¿ãã
+      # elements[1][1] = Token.new( c.get_name, nil, nil, nil )
+      elements[1][1] = NamespacePath.new( c.get_name, false, c.get_namespace )
+    end
+
+    @cell_name = c.get_name
+    @cell = c
+    # @definition = nil          # @definition ãæå¹ï¼ ãã§ãã¯æ¸ã¿ï¼ã¨ã¯ãããªãï¼
+
+    if @array_member2 then
+
+      # debug
+      # p "array_member2.len : #{@array_member.length}"
+
+      i = 0
+      while i < @array_member2.length
+        # @array_member2[i] ã nil ã«ãªãã®ã¯ optional ã®æã¨ã
+        # Join ã® initialize ã§ç¡é§ã« @array_member2 ãè¨­å®ããã¦ããå ´å
+        # ç¡é§ã«è¨­å®ããã¦ãããã®ã«ã¤ãã¦ã¯ãåå¸°çã«å¼ã³åºãå¿
+è¦ã¯ãªãï¼clone_for_composite ã§ã¯å¯¾ç­ãã¦ããï¼
+        if @array_member2[i] != self && @array_member[i] != nil then
+          @array_member2[i].change_rhs_port( clone_cell_list, celltype )
+        end
+        i += 1
+      end
+    end
+
+  end
+
+  #=== Join# composite ã»ã«ç¨ã«ã¯ã­ã¼ã³
+  #cell_global_name:: string : è¦ªã»ã«ã®ã°ã­ã¼ãã«å
+  # å³è¾ºã® C_EXP ã«å«ã¾ãã $id$, $cell$, $ct$ ãç½®æ
+  # ããã§ç½®æããã®ã¯ composite ã® attribute ã® C_EXP ã composite ã»ã«ã¿ã¤ãããã³ã»ã«åã«ç½®æãããã
+  # ï¼å
+é¨ã»ã«ã® C_EXP ãããã§ç½®æãããï¼
+  # @through_list ãªã©ãã³ãã¼ãããã®ã§ããããå¼ã³åºãããåã«ç¢ºå®ããå¿
+è¦ããã
+  def clone_for_composite( ct_name, cell_name, locale, b_need_recursive = true )
+
+    # debug
+    dbgPrint "join.clone_for_composite : #{@name} #{@cell_name} #{self}\n"
+    cl = self.clone
+
+    if @array_member2 && b_need_recursive then
+      cl.clone_array_member( @array_member, @array_member2, ct_name, cell_name, self, locale )
+    end
+
+    rhs = CDLInitializer.clone_for_composite( @rhs, ct_name, cell_name, locale )
+    cl.change_rhs rhs
+
+    # debug
+    dbgPrint "join cloned : #{cl}\n"
+    return cl
+  end
+
+  def clone_array_member( array_member, array_member2, ct_name, cell_name, prev, locale )
+    # é
+åã®ã³ãã¼ãä½ã
+    am  = array_member.clone
+    am2 = array_member2.clone
+
+    # é
+åè¦ç´ ã®ã³ãã¼ãä½ã
+    i = 0
+    while i < am2.length
+      if array_member2[i] == prev then
+        # èªåèªèº«ã§ããï¼ã®ã§ãå¼åºãã¨ç¡éåå¸°å¼åºãã¨ãªãï¼
+        am2[i] = self
+      elsif array_member2[i] then
+        am2[i] = array_member2[i].clone_for_composite( ct_name, cell_name, locale, false )
+      else
+        # ä»¥åã®ã¨ã©ã¼ã§ array_member2[i] ã¯ nil ã«ãªã£ã¦ãã
+      end
+
+      # debug
+      dbgPrint "clone_array_member: #{@name} #{am2[i]} #{array_member2[i]}\n"
+
+      i += 1
+    end
+
+    # i = 0 ã¯ãããã§èªåèªèº«ãè¨­å®
+    # am2[0] = self
+
+    @array_member  = am
+    @array_member2 = am2
+
+  end
+
+  #=== Join# rhs ãå
+¥ãæãã
+  #rhs:: Expression | initializer
+  # å³è¾ºãå
+¥ãæããï¼
+  # ãã®ã¡ã½ããã¯ãcomposite ã§ cell ã®å±æ§ã®åæå¤ã attribute ã®å¤ã§ç½®ãæããã®ã«ä½¿ããã
+  # ãã®ã¡ã½ããã¯ composite å
+ã® cell ã®å±æ§ã®åæå¤ãå®æ°ã§ã¯ãªãå¼ã«ãªã£ãå ´åãä¸è¦ã«ãªã
+  def change_rhs rhs
+    @rhs = rhs
+  end
+
+  #=== Join# clone ããã join ã® owner ãå¤æ´
+  def set_cloned( owner )
+    dbgPrint "Join#set_cloned: #{@name}  prev owner: #{@owner.get_name} new owner: #{owner.get_name}\n"
+    @owner = owner
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "Join: name: #{@name} owner: #{@owner.get_name} id: #{self}"
+    if @subscript == nil then
+    elsif @subscript >= 0 then
+      (indent+1).times { print "  " }
+      puts "subscript: #{@subscript}"
+    else
+      (indent+1).times { print "  " }
+      puts "subscript: not specified"
+    end
+    (indent+1).times { print "  " }
+    puts "rhs: "
+    if @rhs.instance_of?( Array )then
+      @rhs.each{ |i|
+        if i.instance_of?( Array )then
+          i.each{ |j|
+            j.show_tree( indent + 3 )
+          }
+        elsif i.instance_of? Symbol then
+          (indent+2).times { print "  " }
+          print i
+          print "\n"
+        else
+          i.show_tree( indent + 2 )
+        end
+      }
+    else
+      @rhs.show_tree( indent + 2 )
+      (indent+1).times { print "  " }
+      if @definition then
+        puts "definition:"
+        @definition.show_tree( indent + 2 )
+      else
+        puts "definition: not found"
+      end
+    end
+    if @definition.instance_of?( Port ) then
+      (indent+2).times { print "  " }
+      if @cell then
+        puts "cell: #{@cell_name} #{@cell}  port: #{@port_name}  cell_global_name: #{@cell.get_global_name}"
+      else
+        puts "cell: #{@cell_name} port: #{@port_name}  (cell not found)"
+      end
+    end
+    if @through_list then
+      i = 0
+      @through_list.each { |t|
+        (indent+2).times { print "  " }
+        puts "through: plugin name :  '#{t[0]}' arg : '#{t[2]}'"
+        if @through_generated_list[i] then
+          @through_generated_list[i].show_tree( indent+3 )
+        end
+        i += 1
+      }
+    end
+    if @array_member2 then
+      (indent+1).times { print "  " }
+      puts "array member:"
+      i = 0
+      @array_member2.each { |j|
+        if j then
+          (indent+2).times { print "  " }
+          puts "[#{i}]: #{j.get_name}  id: #{j}"
+          j.get_rhs.show_tree(indent+3)
+          (indent+3).times { print "  " }
+          puts "cell global name: #{j.get_cell_global_name}"
+          (indent+3).times { print "  " }
+          puts "port global name: #{j.get_port_global_name}"
+        else
+          (indent+2).times { print "  " }
+          puts "[#{i}]: [optional]  id: #{j}"
+        end
+        i += 1
+      }
+    end
+  end
+
+end
+
+#== éçµå
+class ReverseJoin < BDNode
+#@ep_name:: Symbol
+#@ep_subscript:: Expression or nil
+#@cell_nsp: NamespacePath
+#@cp_name:: Symbol
+#@cp_subscript:: Expression or nil
+  def initialize( ep_name, ep_subscript, cell_nsp, cp_name, cp_subscript = nil )
+    super()
+    @ep_name = ep_name
+    @ep_subscript = ep_subscript
+    @cell_nsp = cell_nsp
+    @cp_name = cp_name
+    @cp_subscript = cp_subscript
+  end
+
+  def get_name
+    @ep_name
+  end
+
+  def get_rhs_cell_and_port
+    [ @ep_subscript, @cell_nsp, @cp_name, @cp_subscript ]
+  end
+end
+
+# CLASS: CompositeCelltype ç¨ã® Join
+# REM:   CompositeCelltype ã export ãããã®
+class CompositeCelltypeJoin < BDNode
+# @export_name:: string     :  CompositeCelltype ã export ããååï¼å¼ã³å£ãåãå£ãå±æ§ï¼
+# @internal_cell_name:: string : CompositeCelltype å
+é¨ã®ã»ã«ã®åå
+# @internal_cell_elem_name:: string : CompositeCelltype å
+é¨ã®ã»ã«ã®å¼ã³å£ãåãå£ãå±æ§ã®åå
+# @cell : Cell : Cell::  internal cell  : CompositeCelltyep å
+é¨ã®ã»ã«ï¼in_compositeã»ã«ï¼
+# @port_decl:: Port | Decl
+# @b_pseudo: bool : 
+
+  def initialize( export_name, internal_cell_name,
+		 internal_cell_elem_name, cell, port_decl )
+    super()
+    @export_name = export_name
+    @internal_cell_name = internal_cell_name
+    @internal_cell_elem_name = internal_cell_elem_name
+    @cell = cell
+    @port_decl = port_decl
+
+  end
+
+  #=== CompositeCelltypeJoin# CompositeCelltypeJoin ã®å¯¾è±¡ã»ã«ãï¼
+  #cell::  Cell å¯¾è±¡ãã©ãããã§ãã¯ããã»ã«
+  #
+  #     CompositeCelltypeJoin ã¨ cell ã®ååãä¸è´ããããã§ãã¯ãã
+  #     port_decl ãæå®ãããå ´åã¯ãç¾ç¶ä½¿ããã¦ããªã
+  def match?( cell, port_decl = nil )
+
+    #debug
+    if port_decl
+      dbgPrint(  "match?"  )
+      dbgPrintf( "  @cell:      %-20s      %08x\n", @cell.get_name, @cell.object_id )
+      dbgPrintf( "  @port_decl: %-20s      %08x\n", @port_decl.get_name, @port_decl.object_id )
+      dbgPrintf( "  cell:       %-20s      %08x\n", cell.get_name, cell.object_id )
+      dbgPrintf( "  port_decl:  %-20s      %08x\n", port_decl.get_name, port_decl.object_id )
+      dbgPrint(  "  cell_name: #{cell.get_name.class}=#{cell.get_name} cell_elem_name: #{port_decl.get_name.class}=#{port_decl.get_name}\n" )
+      dbgPrint(  "  @cell_name: #{@cell.get_name.class}=#{@cell.get_name} cell_elem_name: #{@port_decl.get_name.class}=#{@port_decl.get_name}\n" )
+
+    end
+
+#    if @cell.equal?( cell ) && ( port_decl == nil || @port_decl.equal?( port_decl ) ) then
+    # ãªã port_decl ãä¸è´ããªããã°ãªããªãã£ããå¿ããã
+    # recursive_composite ã§ååã®ä¸è´ã«å¤æ´   060917
+    if((@cell.get_name == cell.get_name) && (port_decl == nil || @port_decl.get_name == port_decl.get_name))then
+      true
+    else
+      false
+    end
+  end
+
+  def check_dup_init
+    return if get_port_type != :CALL
+
+    if @cell.get_join_list.get_item @internal_cell_elem_name then
+      cdl_error( "S1131 \'$1.$2\' has duplicate initializer" , @internal_cell_name, @internal_cell_elem_name )
+    end
+  end
+
+  def get_name
+    @export_name
+  end
+
+  def get_cell_name
+    @internal_cell_name
+  end
+
+  def get_cell
+    @cell
+  end
+
+  def get_cell_elem_name
+    @internal_cell_elem_name
+  end
+
+  # @port_decl ã Port ã®å ´åã®ã¿å¼ã³åºãã¦ãã
+  def get_port_type
+    if @port_decl then
+      @port_decl.get_port_type
+    end
+  end
+
+  def get_port_decl
+    @port_decl
+  end
+
+  #=== CompositeCelltypeJoin#get_allocator_instance
+  def get_allocator_instance
+    if @port_decl.instance_of? Port then
+      return @port_decl.get_allocator_instance
+    elsif @port_decl
+      raise "CompositeCelltypeJoin#get_allocator_instance: not port"
+    else
+      return nil
+    end
+  end
+
+  # @port_decl ã Port ã®å ´åã®ã¿å¼ã³åºãã¦ãã
+  def is_require?
+    if @port_decl then
+      @port_decl.is_require?
+    end
+  end
+
+  # @port_decl ã Port ã®å ´åã®ã¿å¼ã³åºãã¦ãã
+  def is_allocator_port?
+    if @port_decl then
+      @port_decl.is_allocator_port?
+    end
+  end
+
+  # @port_decl ã Port ã®å ´åã®ã¿å¼ã³åºãã¦ãã
+  def is_optional?
+    if @port_decl then
+      @port_decl.is_optional?
+    end
+  end
+
+  #=== CompositeCelltypeJoin# å³è¾ºã Decl ãªãã°åæåå­ï¼å¼ï¼ãè¿ã
+  # ãã®ã¡ã½ããã¯ Cell ã® check_join ããåæå¤ãã§ãã¯ã®ããã«å¼ã³åºããã
+  def get_initializer
+    if @port_decl.instance_of? Decl then
+      @port_decl.get_initializer
+    end
+  end
+
+  def get_size_is
+    if @port_decl.instance_of? Decl then
+      @port_decl.get_size_is
+    end
+  end
+
+  #=== CompositeCelltypeJoin# é
+åãµã¤ãºãå¾ã
+  #RETURN:: nil: not array, "[]": å¤§ããæå®ãªã, Integer: å¤§ããæå®ãã
+  def get_array_size
+    @port_decl.get_array_size
+  end
+
+  #=== CompositeCelltypeJoin# signature ãå¾ã
+  # @port_decl ã Port ã®æã®ã¿å¼ã³åºãã¦ããã
+  def get_signature
+    @port_decl.get_signature
+  end
+
+  #=== CompositeCelltypeJoin# get_type
+  def get_type
+    if @port_decl.instance_of? Decl
+      @port_decl.get_type
+    end
+  end
+
+  #=== CompositeCelltypeJoin# get_initializer
+  def get_initializer
+    if @port_decl.instance_of? Decl
+      @port_decl.get_initializer
+    end
+  end
+
+  #=== CompositeCelltypeJoin# get_choice_list
+  def get_choice_list
+    if @port_decl.instance_of? Decl
+      @port_decl.get_choice_list
+    end
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "CompositeCelltypeJoin: export_name: #{@export_name} #{self}"
+    (indent+1).times { print "  " }
+    puts "internal_cell_name: #{@internal_cell_name}"
+    (indent+1).times { print "  " }
+    puts "internal_cell_elem_name: #{@internal_cell_elem_name}"
+    if @port_decl then
+      @port_decl.show_tree( indent + 1 )
+    end
+  end
+end
+
+class Factory < BDNode
+# @name:: string
+# @file_name:: string
+# @format:: string
+# @arg_list:: Expression ã® elements ã¨åãå½¢å¼ [ [:IDENTIFIER, String], ... ]
+# @f_celltype:: bool : true: celltype factory, false: cell factory
+
+  @@f_celltype = false
+
+  def initialize( name, file_name, format, arg_list )
+    super()
+    @f_celltype = @@f_celltype
+
+    case name
+    when :write
+      # write é¢æ°
+      @name = name
+
+      # write é¢æ°ã®ç¬¬ä¸å¼æ°ï¼åºåå
+ãã¡ã¤ã«å
+        # å¼ãè©ä¾¡ããï¼éå¸¸åä¸ã®æå­åã§ãããããåä¸ã®æå­åãè¿ãããï¼
+      @file_name = file_name.eval_const(nil).val  # file_name : Expression
+      if ! @file_name.instance_of?( String ) then
+        # æå­åå®æ°ã§ã¯ãªãã£ã
+        cdl_error( "S1132 $1: 1st parameter is not string(file name)" , @name )
+        @file_name = nil
+      end
+
+      # write é¢æ°ã®ç¬¬äºå¼æ°ï¼ãã©ã¼ãããæå­å
+      @format    = format.eval_const(nil).val     # format : Expression
+        # å¼ãè©ä¾¡ããï¼éå¸¸åä¸ã®æå­åã§ãããããåä¸ã®æå­åãè¿ãããï¼
+      if ! @format.instance_of?( String ) then
+        # æå­åå®æ°ã§ã¯ãªãã£ã
+        cdl_error( "S1133 $1: 2nd parameter is not string(fromat)" , @name )
+        @format = nil
+      end
+
+      # ç¬¬ä¸å¼æ°ä»¥éãå¼æ°ãªã¹ãã¨ãã mikan å¼æ°ã®ãã§ãã¯
+      @arg_list = arg_list
+
+    else
+      cdl_error( "S1134 $1: unknown factory function" , name )
+    end
+    Celltype.new_factory( self )
+  end
+
+  def check_arg( celltype )
+    if ! @arg_list then
+      return
+    end
+
+    if @f_celltype then
+      cdl_error( "S1135 celltype factory can\'t have parameter(s)"  )
+      return
+    end
+
+    @arg_list.each{ |elements|
+
+      case elements[0]
+      when :IDENTIFIER  #1
+        obj = celltype.find( elements[1] )
+        if obj == nil then
+          cdl_error( "S1136 \'$1\': not found" , elements[1] )
+        elsif ! obj.instance_of?( Decl ) || obj.get_kind != :ATTRIBUTE then
+          cdl_error( "S1137 \'$1\': not attribute" , elements[1] )
+        end
+      when :STRING_LITERAL
+      else
+        cdl_error( "S1138 internal error Factory.check_arg()"  )
+      end
+
+    }
+  end
+
+  def self.set_f_celltype( f_celltype )
+    @@f_celltype = f_celltype
+  end
+
+  def get_f_celltype
+    @f_celltype
+  end
+
+  def get_name
+    @name
+  end
+
+  def get_file_name
+    @file_name
+  end
+
+  def get_format
+    @format
+  end
+
+  def get_arg_list
+    @arg_list
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "Factory: name: #{@name}"
+    if @arg_list then
+      (indent+1).times { print "  " }
+      puts "argument(s):"
+      @arg_list.each { |l|
+        (indent+2).times { print "  " }
+        print "\"#{l}\"\n"
+      }
+    end
+  end
+end
+
+#== Domain
+#
+# region ã® domain ãè¨æ¶ããã¯ã©ã¹
+class DomainType < Node
+#@name::Symbol : ãã¡ã¤ã³ã¿ã¤ãã®åå ex) HRP2
+#@region::Region
+#@plugin_name::Symbol : ex) HRP2Plugin
+#@option::String : ex) "trusted", "nontrusted"
+#@plugin::DomainPlugin ã®å­ã¯ã©ã¹
+
+  include PluginModule
+
+  # ãã¡ã¤ã³ã«å±ãã region ã® Hash
+  # domain æå®ãä¸åº¦ãè¡ãããªãå ´åããã®ãªã¹ãã¯ç©ºã§ãã
+  # ã«ã¼ããªã¼ã¸ã§ã³ã¯ option = "OutOfDomain" ã§ç»é²ããã (domain æå®ãç¡ããã°ç»é²ãããªã)
+  @@domain_regions = { }  # { :domain_type => [ region, ... ] }
+
+  def initialize( region, name, option )
+    super()
+    @name = name
+    @plugin_name = (name.to_s + "Plugin").to_sym
+    load_plugin( @plugin_name, DomainPlugin )
+    @region = region
+    @option = option
+
+    if @@domain_regions[ name ] then
+      if ! @@domain_regions[ name ].include?( region ) then
+        @@domain_regions[ name ] << region
+      end
+    else
+      @@domain_regions[ name ] = [ region ]
+    end
+  end
+
+  def create_domain_plugin
+    if ! @plugin then
+      pluginClass = Object.const_get @plugin_name
+      @plugin = pluginClass.new( @region, @name, @option )
+    end
+  end
+
+  def add_through_plugin( join, from_region, to_region, through_type )
+    # print( "DOMAIN: add_through_plugin: from=#{from_region.get_name}#{join.get_owner.get_name}.#{join.get_name} to=#{to_region}#{join.get_cell.get_name}.#{join.get_port_name} through_type=#{through_type}\n" )
+    return @plugin.add_through_plugin( join, from_region, to_region, through_type )
+  end
+
+  def joinable?( from_region, to_region, through_type )
+    # print( "DOMAIN: joinable? from_region=#{from_region.get_name} to_region=#{to_region} through_type=#{through_type}\n" )
+    return @plugin.joinable?( from_region, to_region, through_type )
+  end
+
+  def get_name
+    @name
+  end
+
+  #== Domain ãªã¼ã¸ã§ã³ã® Hash ãå¾ã
+  # @@domain_regions ã®èª¬æåç
+§
+  def self.get_domain_regions
+    return @@domain_regions
+  end
+
+  def get_regions
+    return @@domain_regions[ @name ]
+  end
+
+  def get_option
+    @option
+  end
+
+  def show_tree( indent )
+    (indent+1).times { print( "  " ) }
+    puts "domain: name=#{@name} plugin=#{@plugin_name} option=#{@option}"
+  end
+end
+
+#== Region ã¯ã©ã¹
+# 
+# Region ã¯ Namespace ãç¶æ¿ãã¦ãã
+# root region ã¯ç¹æ®ã§ãroot namespace ã¨åãã§ãã
+#
+# cell ã¯ region ã«å±ãã
+# region ã«å±ãã cell ã®ãªã¹ãã¯ Namespace ã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹å¤æ°ã¨ãã¦è¨æ¶ããã
+#
+class Region < Namespace
+# @name:: string
+# @in_through_list:: [ [ plugin_name, plugin_arg ], ... ] : plungin_name = nil ã®æ in ç¦æ­¢
+# @out_through_list:: [ [ plugin_name, plugin_arg ], ... ] : plungin_name = nil ã®æ out ç¦æ­¢
+# @to_through_list:: [ [ dst_region, plugin_name, plugin_arg ], ... ]
+# @cell_port_throug_plugin_list:: { "#{cell_name}.#{port_name}" => through_generated_list ã®è¦ç´  }
+#    ãã® region ãã cell_name.port_name ã¸ã® through ãã©ã°ã¤ã³ã§çæããããªãã¸ã§ã¯ã
+# @region_type::Symbol : :NODE, :LINKUNIT, :DOMAIN, :CLASS
+# @region_type_param::Symbol : domain, class ã®åå. node, linkunit ã§ã¯ nil
+# @link_root:: Region : linkUnit ã®æ ¹ã£ãã¨ãªã region (node, linkunit ãæå®ããã region)
+# @family_line:: [ @region_root, ...,@region_me ]  å®¶ç³»
+# @in_through_count:: Integer :  n çªç®ã® in_through çµå (n>=0)
+# @out_through_count:: Integer : n çªç®ã® out_through çµå (n>=0)
+# @to_through_count:: { :RegionName => Integer }: RegionName ã¸ã® n çªç®ã® to_through çµå (n>=0)
+# @domain_type::DomainType : domain æå®ããã¦ããªãå ´åãnil
+# @domain_root::Region : domain æå®ããã¦ããªã Region (root ã®å ´å nil)
+
+  @@in_through_list  = []
+  @@out_through_list = []
+  @@to_through_list  = []
+  @@region_type = nil
+  @@region_type_param = nil
+  @@domain_name = nil
+  @@domain_option = nil    # Token ãå
+¥ã
+
+  @@link_roots = []
+
+  def initialize( name )
+    # mikan name ã® Namespace ä¿®é£¾
+    # object = Namespace.find( [ name ] )   # è¦ªã¾ã§æãã«ãã
+    if name != "::" then
+      object = Namespace.get_current.find( name )    #1
+    else
+      # root ãªã¼ã¸ã§ã³
+      object = nil
+      @@region_type = :NODE
+    end
+
+    @in_through_list    = @@in_through_list
+    @out_through_list   = @@out_through_list
+    @to_through_list    = @@to_through_list
+    @region_type        = @@region_type
+    @region_type_param  = @@region_type_param
+
+    if @@domain_name then
+      domain_option = CDLString.remove_dquote @@domain_option.to_s
+      @domain_type = DomainType.new( self, @@domain_name, domain_option )
+      @@domain_name       = nil
+      @@domain_option     = nil
+    else
+      @domain_type = nil
+    end
+
+    @@in_through_list   = []
+    @@out_through_list  = []
+    @@to_through_list   = []
+    @@region_type       = nil
+    @@region_type_param = nil
+
+    @in_through_count = -1
+    @out_through_count = -1
+    @to_through_count = {}
+
+    super( name )
+    if object then
+
+      if object.instance_of?( Region ) then
+        dbgPrint "Region.new: re-appear #{@name}\n"
+
+        # # Region path ãåååºç¾ã¨ä¸è´ãããï¼
+        # if @@region_stack[ @@region_stack_sp - 1 ] then
+        #   my_path = @@region_stack[ @@region_stack_sp - 1 ].get_path_string.to_s + "." + @name.to_s
+        # else
+        #   my_path = @name.to_s
+        # end
+        # if my_path != object.get_path_string then
+        #   cdl_error( "S1139 $1: region path mismatch. previous path: $2" , my_path, object.get_path_string )
+        # end
+
+        # ååºç¾
+        # @@region_stack[@@region_stack_sp] = object
+
+        # ååºç¾æã« specifier ãæå®ããã¦ãããï¼
+        if( @in_through_list.length != 0 || @out_through_list.length != 0 || @to_through_list.length != 0 || @region_type != nil )then
+          cdl_error( "S1140 $1: region specifier must place at first appearence" , name )
+        end
+        return
+
+      else
+        # ã¨ã©ã¼ç¨ããã¼å®ç¾©
+
+        # ç°ãªãååã®ãªãã¸ã§ã¯ããå®ç¾©æ¸ã¿
+        cdl_error( "S1141 $1 duplication, previous one : $2" , name, object.class )
+        # @@region_stack[@@region_stack_sp] = self    # ã¨ã©ã¼ææ«å® region
+      end
+    else
+      # ååºç¾
+      dbgPrint "Region.new: #{@name}\n"
+      set_region_family_line
+
+      if @region_type == :NODE || @region_type == :LINKUNIT then
+        dbgPrint "new LinkRoot: #{@name}\n"
+        @@link_roots << self
+      end
+    end
+
+    @cell_port_throug_plugin_list = {}
+
+# p @name
+# p @in_through_list
+# p @out_through_list
+# p @to_through_list
+
+  end
+
+  def self.end_of_parse
+    Namespace.get_current.create_domain_plugin
+    Namespace.get_current.end_of_parse
+  end
+
+  def self.new_in_through( plugin_name = nil, plugin_arg = nil )
+    @@in_through_list << [ plugin_name, plugin_arg ]
+  end
+
+  def self.new_out_through( plugin_name = nil, plugin_arg = nil )
+    @@out_through_list << [ plugin_name, plugin_arg ]
+  end
+
+  def self.new_to_through( dst_region, plugin_name, plugin_arg )
+    # p "New to_through #{dst_region}"
+    @@to_through_list  << [ dst_region, plugin_name, plugin_arg ]
+  end
+
+  def self.set_type( type, param = nil )
+    if @@region_type then
+      Generator.error( "S1178 $1 region type specifier duplicate, previous $2", type, @@region_type )
+    end
+    @@region_type = type
+    @@region_type_param = param
+  end
+
+  def self.set_domain( name, option )
+    if @@domain_name then
+      Generator.error( "S9999 $1 domain specifier duplicate, previous $2", type, @@region_type )
+    end
+    @@domain_name = name
+    @@domain_option = option
+  end
+
+  #== Region ã«ã¼ããªã¼ã¸ã§ã³ãå¾ã
+  # ã«ã¼ããªã¼ã¸ã§ã³ã¯ãã«ã¼ããã¼ã ã¹ãã¼ã¹ã¨åãã§ãã
+  def self.get_root
+    Namespace.get_root
+  end
+
+  def set_region_family_line
+
+    dbgPrint  "set_region_family_line: Region: #{@name}  \n"
+    # root namespace (root region) ã® region type ã¯ :NODE
+    if @name == "::" then
+      @region_type = :NODE
+    end
+
+    if @region_type == :NODE || @region_type == :LINKUNIT then
+      @link_root = self
+    else
+      @link_root = @owner.get_link_root
+    end
+
+    if @domain_type != nil || @owner == nil then
+      @domain_root = self
+    else
+      @domain_root = @owner.get_domain_root
+    end
+
+    if @domain_type then
+      # ã«ã¼ããªã¼ã¸ã§ã³ãæåãã @domain_type è¨­å®ããããã¨ã¯ãªãã®
+      # ã§ @owner == nil ãèª¿ã¹ãå¿
+è¦ã¯ãªã
+      @owner.set_domain_type @domain_type
+    end
+
+    if @owner then
+      @family_line = ( @owner.get_family_line.dup ) << self
+    else
+      @family_line = [ self ]    # root region
+    end
+
+=begin
+    @family_line = []
+    @link_root = nil
+
+    # @family_line ãä½æãã
+    # @link_root ãã¿ã¤ãã
+    # (ä¸ä½ã«ãã©ã£ã¦ãã£ã¦ Region ã§ node ã¾ãã¯ linkunit ã®ããããå
+ã«è¦ã¤ãã£ããã®ã @link_root ã¨ãªã)
+    # root namespace ã¯ Region ãã¤ node ãªã®ã§å¿
+ã @link_root ã¯è¦ã¤ãã
+    # mikan: self ã node, linkUnit ã®å ´åãããã§æå¾
+ããã¨ããã«è¨­å®ãããªããããRegion#initialize ã§åè¨­å®
+    obj = self
+    while 1
+      if obj.instance_of? Region then
+        @family_line << obj
+        if @link_root == nil then
+          if obj.get_region_type == :NODE || obj.get_region_type == :LINKUNIT then
+            @link_root = obj
+          end
+        end
+      else
+        # ãããªããã° Namespace
+        # namespace ã®ä¸ã« region ãããå ´å
+      end
+
+      # root namespace ã«ãã©ãçãã°çµã
+      break if obj.get_name == "::"
+
+      obj = obj.get_owner
+    end
+    # print "#{@name}: linkRoot: #{@link_root.get_name}  (this can be wrong if #{@name} is node or linkunit, and corret later\n"
+    @family_line.reverse!
+=end
+
+  end
+
+  #== Region#ãã¡ã¤ã³ãè¨­å®ãã
+  def set_domain_type domain_type
+    if @region_type == :NODE then
+      if @domain_type then
+        if @domain_type.get_name != domain_type.get_name then
+          cdl_error( "S9999 '$1' node root cannot belong to both $2 and $3", @name, @domain_type.get_name, domain_type.get_name )
+        end
+      else
+        @domain_type = DomainType.new( self, domain_type.get_name, "OutOfDomain" )
+        @domain_type.create_domain_plugin
+      end
+    elsif @domain_type == nil then
+      @owner.set_domain_type domain_type
+    end
+  end
+
+  def self.get_link_roots
+    @@link_roots
+  end
+
+  def get_family_line
+    @family_line
+  end
+
+  def get_in_through_list
+    @in_through_list
+  end
+
+  def get_out_through_list
+    @out_through_list
+  end
+
+  def get_to_through_list
+    @to_through_list
+  end
+
+  def get_link_root
+    @link_root
+  end
+
+  def get_domain_type
+    @domain_type
+  end
+
+  #== Region# domain ã®æ ¹ã£ãã¨ãªã region ãå¾ã
+  # Region ã®ã¤ã³ã¹ã¿ã³ã¹ãè¿ã
+  # domain æå®å­ãããã°ããã®ãªã¼ã¸ã§ã³ããã¡ã¤ã³ã«ã¼ãã§ãã
+  # ãªããã°ãè¦ªãªã¼ã¸ã§ã³ã®ãã¡ã¤ã³ã«ã¼ãã¨ãã
+  def get_domain_root
+    @domain_root
+  end
+
+  def get_path_string
+    pstring = ""
+    delim = ""
+    @family_line.each{ |p|
+      pstring = "#{pstring}#{delim}#{p.get_name}"
+      delim = "."
+    }
+    dbgPrint "get_path_string: #{pstring}\n"
+    pstring
+  end
+
+  def get_region_type
+    @region_type
+  end
+
+  def get_name
+    @name
+  end
+
+  def next_in_through_count
+    @in_through_count += 1
+  end
+
+  def next_out_through_count
+    @out_through_count += 1
+  end
+
+  def next_to_through_count( symRegionName )
+    if @to_through_count[ symRegionName ] == nil then
+      @to_through_count[ symRegionName ] = 0
+    else
+      @to_through_count[ symRegionName ] += 1
+    end
+  end
+
+  #=== Region# æ§æè§£æä¸­ã® region ãå¾ã
+  # æ§æè§£æä¸­ Namespace (ãããã¯å­ã¯ã©ã¹ã® Region) ã®ä¸ä½ããã©ã£ã¦ Region ãè¦ã¤ãã
+  # cell ã namespace ä¸ã«ãããã¨ãã§ããªããã°ãã«ã¼ããã¾ããå¿
+è¦ã¯ãªã
+  def self.get_current
+    # @@region_stack[@@region_stack_sp]
+    region = Namespace.get_current
+    while 1
+      if region.instance_of? Region
+        break
+      end
+      region = region.get_owner
+    end
+    return region
+  end
+
+  #=== Region# through ãã©ã°ã¤ã³ã§ããã® region ãã cell_name.port_name ã¸ã®ãã©ã°ã¤ã³ãªãã¸ã§ã¯ããç»é²
+  # mikan namesppace å¯¾å¿ (cell_name)
+  def add_cell_port_through_plugin( cell_name, port_name, through_plugin_object )
+    @cell_port_throug_plugin_list[ "#{cell_name}.#{port_name}" ] = through_plugin_object
+  end
+
+  def find_cell_port_through_plugin( cell_name, port_name )
+    return @cell_port_throug_plugin_list[ "#{cell_name}.#{port_name}" ]
+  end
+
+  def create_domain_plugin
+    if @domain_type then
+      @domain_type.create_domain_plugin
+    end
+  end
+
+  #=== Region# to_region ã¸ã®è·é¢ï¼unreachable ãªå ´å nil)
+  # mikan Cell#check_region ã¨Region ã¸ãã©ãçãã¾ã§ããã®å¦çã«å
+±éæ§ãé«ã
+  # region#distance ã¯ require ã§ç¨ãããã
+  def distance( to_region )
+
+    r1 = self                   # åºçº region
+    r2 = to_region              # ç®ç region
+    dist = 0
+
+    if ! r1.equal? r2 then      # åä¸ region ãªãå¼åºãå¯è½
+
+      # mikan namespace å¯¾å¿
+      f1 = r1.get_family_line
+      len1 = f1.length
+      f2 = r2.get_family_line
+      len2 = f2.length
+
+      # ä¸ä¸è´ã«ãªãã¨ããï¼å
+å¼ï¼ãæ¢ã
+      i = 1  # i = 0 ã¯ :RootRegion ãªã®ã§å¿
+ãä¸è´
+      while( i < len1 && i < len2 )
+        if( f1[i] != f2[i] )then
+          break
+        end
+        i += 1
+      end
+
+      sibling_level = i     # å
+å¼ã¨ãªãã¬ãã«ããããã¯ã©ã¡ããä¸æ¹ãçµãã£ãã¬ãã«
+
+      # p "sibling_level: #{i}"
+      # p "from: #{f1[i].get_name}" if f1[i]
+      # p "to: #{f2[i].get_name}" if f2[i]
+
+      # å¼ã³å´ã«ã¤ãã¦å¼ã³å
+ã®ã¬ãã«ããå
+å¼ã¬ãã«ã¾ã§ï¼out_through ããã§ãã¯ããã³æ¿å
+¥ï¼
+      i = len1 -1
+      while i >= sibling_level
+        dbgPrint "going out from #{f1[i].get_name} level=#{i}\n"
+        # print "DOMAIN: going out from #{f1[i].get_name} level=#{i}\n"
+        domain = f1[i].get_domain_type
+        domain_ok = false
+        if domain then
+          if ! f1[i].get_domain_type.joinable?( f1[i], f1[i-1], :OUT_THROUGH ) then
+            return nil
+          end
+          domain_ok = true
+        end
+        if ! domain_ok then
+          out_through_list = f1[i].get_out_through_list   # [ plugin_name, plugin_arg ]
+          if out_through_list.length == 0 then
+            return nil
+          end
+        end
+        i -= 1
+        dist += 1
+      end
+
+      # å
+å¼ã¬ãã«ã«ããã¦ï¼to_through ããã§ãã¯ããã³æ¿å
+¥ï¼
+      if f1[sibling_level] && f2[sibling_level] then
+        dbgPrint "going from #{f1[sibling_level].get_name} to #{f2[sibling_level].get_name}\n"
+        # print "DOMAIN: going from #{f1[sibling_level].get_name} to #{f2[sibling_level].get_name}\n"
+        domain = f1[sibling_level].get_domain_type
+        domain_ok = false
+        if domain then
+          if ! f1[i].get_domain_type.joinable?( f1[i], f1[i-1], :TO_THROUGH ) then
+            return nil
+          end
+          domain_ok = true
+        end
+        if ! domain_ok then
+          found = 0
+          f1[sibling_level].get_to_through_list.each { |t|
+            if t[0][0] == f2[sibling_level].get_name then   # region åãä¸è´ããã ?
+              found = 1
+            end
+          }
+          if found == 0 then
+            return nil
+          end
+        end
+        dist += 1
+      end
+
+      # åãå´ã«ã¤ãã¦å
+å¼ã¬ãã«ããåãå´ã®ã¬ãã«ã¾ã§ï¼in_through ããã§ãã¯ããã³æ¿å
+¥ï¼
+      i = sibling_level
+      while i < len2
+        dbgPrint "going in to #{f2[i].get_name} level=#{i}\n"
+        # print "DOMAIN: going in to #{f2[i].get_name} level=#{i}\n"
+        domain = f2[i].get_domain_type
+        domain_ok = false
+        if domain then
+          if ! f2[i].get_domain_type.joinable?( f2[i-1], f2[i], :IN_THROUGH ) then
+            return nil
+          end
+          domain_ok = true
+        end
+        if ! domain_ok then
+          in_through_list = f2[i].get_in_through_list   # [ plugin_name, plugin_arg ]
+          if in_through_list.length == 0 then
+            return nil
+          end
+        end
+        i += 1
+        dist += 1
+      end
+    end
+
+    dbgPrint "dsitance=#{dist} from #{r1.get_name} to #{r2.get_name}\n"
+
+    return dist
+  end
+
+  def show_tree( indent )
+    super
+    (indent+1).times { print( "  " ) }
+    puts "path: #{get_path_string}"
+    (indent+1).times { print( "  " ) }
+    puts "namespace: #{@namespace ? @namespace.get_name : "nil"}  owner: #{@owner.class}.#{@owner ? @owner.get_name : "nil"}"
+    if @domain
+      @domain.show_tree( indent+1 )
+    end
+  end
+end
+
+class Import_C < Node
+
+  # ãããã®ååæå­åã®ãªã¹ã
+  @@header_list = {}
+  @@header_list2 = []
+  @@define_list = {}
+
+  #=== Import_C# import_C ã®çæï¼ããããã¡ã¤ã«ãåè¾¼ãï¼
+  #header:: Token : import_C ã®ç¬¬ä¸å¼æ°æå­åãªãã©ã«ãã¼ã¯ã³
+  #define:: Token : import_C ã®ç¬¬äºå¼æ°æå­åãªãã©ã«ãã¼ã¯ã³
+  def initialize( header, define = nil )
+    super()
+    # ããããã¡ã¤ã«åæå­åããåå¾ã® "" ãåãé¤ã
+    # header = header.to_s.gsub( /\A"(.*)"\z/, '\1' )
+    header = CDLString.remove_dquote header.to_s
+
+    if define then
+      # åå¾ã® "" ãåãé¤ã
+      # def_opt = define.to_s.gsub( /\A"(.*)/, '\1' )
+      # def_opt.sub!( /(.*)"\z/, '\1' )
+      def_opt = CDLString.remove_dquote define.to_s
+
+      # "," ã -D ã«ç½®ãæã
+      def_opt = def_opt.gsub( /,/, " -D " )
+
+      # å
+é ­ã« -D ãæ¿å
+¥ # mikan ä¸é©åãª define å
+¥åããã£ãå ´åãCPP æã«ã¨ã©ã¼
+      def_opt = def_opt.gsub( /^/, "-D " )
+
+    end
+
+    # ã³ãã³ãã©ã¤ã³æå®ããã DEFINE 
+    $define.each{ |define|
+      if $IN_EXERB then
+        q = ""
+      else
+        if define =~ /'/ then
+          q = '"'
+        else
+          q = "'"
+        end
+      end
+      def_opt = "#{def_opt} -D #{q}#{define}#{q}"
+    }
+
+    include_opt = ""
+    found = false
+    header_path = ""
+    $import_path.each{ |path|
+      include_opt = "#{include_opt} -I #{path}"
+      if found == false then
+        begin
+          # ãã¡ã¤ã«ã® stat ãåã£ã¦ã¿ã(ãªããã°ä¾å¤çºç)
+          File.stat( "#{path}/#{header}" )
+
+          # cdl ãè¦ã¤ãã£ããã¡ã¤ã«ãã¹ã«åè¨­å®
+          header_path = "#{path}/#{header}"
+          found = true
+        rescue => evar
+          found = false
+          # print_exception( evar )
+        end
+      end
+    }
+
+    if found == false then
+      cdl_error( "S1142 $1 not found in search path" , header )
+      return
+    end
+
+    # èª­è¾¼ã¿æ¸ã¿ï¼
+    if( @@header_list[ header ] ) then
+      # ç¬¬äºå¼æ° define ãä»¥åã¨ç°ãªã
+      if @@define_list[ header ].to_s != define.to_s then
+        cdl_error( "S1143 import_C: arg2: mismatch with previous one"  )
+      end
+      # ãããã«ããèª­ã¿è¾¼ã¾ãªã
+      return
+    end
+
+    # ãããã®ãªã¹ããè¨é²
+    @@header_list[ header ] = header_path
+    @@header_list2 << header
+    @@define_list[ header ] = define
+
+    begin
+      tmp_C = "#{$gen}/tmp_C_src.c"
+      file = File.open( tmp_C, "w" )
+    rescue => evar
+      cdl_error( "S1144 $1: temporary C source: open error" , tmp_C )
+      print_exception( evar )
+    end
+
+    begin
+      print_defines file
+
+      file.print( "#include \"#{header}\"\n" )
+    rescue => evar
+      cdl_error( "S1145 $1: temporary C source: writing error" , tmp_C )
+      print_exception( evar )
+    ensure
+      file.close
+    end
+
+    # CPP åºåç¨ tmp ãã¡ã¤ã«å
+    tmp_header = header.gsub( /\//, "_" )
+    tmp_header = "#{$gen}/tmp_#{tmp_header}"
+
+    # CPP ã³ãã³ãã©ã¤ã³ãä½æ
+    cmd = "#{$cpp} #{def_opt} #{include_opt} #{tmp_C}"
+
+    begin
+      if( $verbose )then
+        puts "CPP: #{cmd}"
+      end
+
+      # ããªãã­ã»ããµã³ãã³ãã pipe ã¨ãã¦éã
+          # cmd ã¯ cygwin/Linux ã§ã¯ bash(sh) çµç±ã§å®è¡ããã
+          # Exerb çã§ã¯ cmd.exe çµç±ã§å®è¡ããã
+          # ãã®å·®ã¯å¼ãæ°ã® (), $, % ãªã©ã·ã§ã«ã®ç¹å¥ãªæå­ã®è©ä¾¡ã«ç¾ããã®ã§æ³¨æ
+          cpp = IO.popen( cmd, "r:ASCII-8BIT" )
+      begin
+        tmp_file = nil
+        tmp_file = File.open( tmp_header, "w:ASCII-8BIT" )
+        cpp.each { |line|
+          line = line.gsub( /^#(.*)$/, '/* \1 */' )
+          tmp_file.puts( line )
+        }
+      rescue => evar
+        cdl_error( "S1146 $1: error occured while CPP" , header )
+        print_exception( evar )
+      ensure
+        tmp_file.close if tmp_file    # mikan File.open ã«å¤±æããæ tmp_file == nil ã¯ä¿è¨¼ããã¦ãã ?
+        cpp.close
+      end
+    rescue => evar
+      cdl_error( "S1147 $1: popen for CPP failed" , header )
+      print_exception( evar )
+    end
+
+    # C è¨èªã®ãã¼ãµã¤ã³ã¹ã¿ã³ã¹ãçæ
+    c_parser = C_parser.new
+
+    # tmp_header ããã¼ã¹
+    c_parser.parse( [tmp_header] )
+
+    # çµæåããã¼ãµã¹ã¿ãã¯ãæ»ã
+    c_parser.finalize
+
+  end
+
+  def print_defines file
+    if ! $b_no_gcc_extension_support then
+      
+    file.print <<EOT
+
+#ifndef TECS_NO_GCC_EXTENSION_SUPPORT
+
+/*
+ * these extension can be eliminated also by spefcifying option
+ * --no-gcc-extension-support for tecsgen.
+ */
+#ifndef __attribute__
+#define __attribute__(x)
+#endif
+
+#ifndef __extension__
+#define __extension__
+#endif
+
+#ifndef __builtin_va_list
+#define __builtin_va_list va_list
+#endif
+
+#ifndef __asm__
+#define __asm__(x)
+#endif
+
+#endif /* TECS_NO_GCC_EXTENSION_SUPPORT */
+EOT
+    end
+
+    file.print <<EOT
+
+/* va_list is not supported in C_parser.y.rb */
+typedef struct { int dummy; } va_list;
+
+EOT
+  end
+
+  def self.get_header_list
+    @@header_list
+  end
+  def self.get_header_list2
+    @@header_list2
+  end
+
+end
+
+class Import < Node
+# @b_reuse::bool:       åå©ç¨ï¼ã»ã«ã¿ã¤ãã® template çæä¸è¦
+# @b_reuse_real::bool:  å®éã«åå©ç¨
+# @cdl::      string:   import ãã CDL
+# @cdl_path:: string:   CDL ã®ãã¹
+# @b_imported:: bool:   import ããã(ã³ãã³ãã©ã¤ã³æå®ããã¦ããªã)
+
+  # ãããã®ååæå­åã®ãªã¹ã  æ·»å­ï¼expand ãããã¹ãå¤ï¼Import
+  @@import_list = {}
+
+  @@nest_stack_index = -1
+  @@nest_stack = []
+  @@current_object = nil
+
+  def self.push object
+    @@nest_stack_index += 1
+    @@nest_stack[ @@nest_stack_index ] = @@current_object
+    @@current_object = object
+  end
+
+  def self.pop
+    @@current_object = @@nest_stack[ @@nest_stack_index ]
+    @@nest_stack_index -= 1
+    if @@nest_stack_index < -1 then
+      raise "TooManyRestore"
+    end
+  end
+
+  #=== Import# import ãè¡ã
+  #cdl::      string   cdl ã¸ã®ãã¹ï¼"" ã§å²ã¾ãã¦ãããã¨ãä»®å®
+  #b_reuse::  bool     true: template ãçæããªã
+  def initialize( cdl, b_reuse = false, b_imported = true )
+    Import.push self
+    @b_imported = b_imported
+    super()
+    @@current_import = self
+    # ããããã¡ã¤ã«åæå­åããåå¾ã® "", <> ãåãé¤ãn
+    @cdl = cdl.to_s.gsub( /\A["<](.*)[">]\z/, '\1' )
+
+    # ãµã¼ããã¹ããæ¢ã
+    found = false
+    @cdl_path = ""
+
+    @b_reuse = b_reuse
+    @b_reuse_real = @b_reuse || Generator.is_reuse?
+
+    if Generator.get_plugin then
+      # plugin ãã import ããã¦ããå ´å gen ããµã¼ããã¹ã®å
+é ­ã«å ãã
+      search_path = [ $gen ] + $import_path
+    else
+      search_path = $import_path
+    end
+
+    search_path.each{ |path|
+      dbgPrint "import: searching #{path}/#{@cdl}"
+      begin
+        if path == "."
+          cdl_path =  @cdl
+        else
+          cdl_path = "#{path}/#{@cdl}"
+        end
+
+        # ãã¡ã¤ã«ã® stat ãåã£ã¦ã¿ã(ãªããã°ä¾å¤çºç)
+        File.stat( cdl_path )
+
+        # cdl ãè¦ã¤ãã£ããã¡ã¤ã«ãã¹ã«åè¨­å®
+        @cdl_path = cdl_path
+        found = true
+        dbgPrint ": found\n"
+        break
+      rescue => evar
+        found = false
+        dbgPrint ": not found\n"
+        # print_exception( evar )
+      end
+    }
+
+    if found == false then
+      cdl_error( "S1148 $1 not found in search path" , @cdl )
+      return
+    end
+
+    # èª­è¾¼ã¿æ¸ã¿ãªããèª­è¾¼ã¾ãªã
+    prev = @@import_list[ File.expand_path( @cdl_path ) ]
+    if( prev ) then
+      if prev.is_reuse_real? != @b_reuse_real then
+        cdl_warning( "W1008 $1: reuse designation mismatch with previous import" , @cdl )
+      end
+      return
+    end
+
+    # import ãªã¹ããè¨é²
+    @@import_list[ File.expand_path( @cdl_path ) ] = self
+
+    # plugin ãã import ããã¦ããå ´å
+    plugin = Generator.get_plugin
+
+    # ãã¼ãµã¤ã³ã¹ã¿ã³ã¹ãçæ(å¥ãã¼ãµã§èª­ã¿è¾¼ã)
+    parser = Generator.new
+
+    # plugin ãã import ããã¦ããå ´åã® plugin è¨­å®
+    parser.set_plugin plugin
+
+    # reuse ãã©ã°ãè¨­å®
+    parser.set_reuse @b_reuse_real
+
+    # cdl ããã¼ã¹
+    parser.parse( [@cdl_path] )
+
+    # çµæåããã¼ãµã¹ã¿ãã¯ãæ»ã
+    parser.finalize
+    Import.pop
+  end
+
+  def self.get_list
+    @@import_list
+  end
+
+  def get_cdl_path
+    @cdl_path
+  end
+
+  def is_reuse_real?
+    @b_reuse_real
+  end
+
+  def self.get_current
+    @@current_object
+  end
+
+  def is_imported?
+    @b_imported
+  end
+
+  #=== cdl ã®ååãè¿ã
+  # å¼æ°ã§æå®ããã¦ãã cdl åãä¸é¨ãã¹ãå«ãå¯è½æ§ããã
+  def get_cdl_name
+    @cdl
+  end
+end
+
+#== generate: signature ãã©ã°ã¤ã³ã®ã­ã¼ãã¨å®è¡
+class Generate < Node
+#@plugin_name:: Symbol
+#@signature_nsp:: NamespacePath
+#@option::         String '"', '"' ã§å²ã¾ãã¦ãã
+
+  include PluginModule
+
+  def initialize( plugin_name, signature_nsp, option )
+    super()
+    @plugin_name = plugin_name
+    @signature_nsp = signature_nsp
+    option = option.to_s    # option ã¯ Token
+    @option = option
+
+    signature = Namespace.find( signature_nsp ) #mikan Namespace   #1
+    if ! signature.instance_of? Signature then
+      cdl_error( "S1149 $1 not signature" , signature_nsp )
+      return
+    elsif signature.is_empty? then
+      cdl_warning( "S9999 $1 is empty. cannot apply signature plugin. ignored" , signature_nsp )
+      return
+    end
+
+    load_plugin( plugin_name, SignaturePlugin )
+
+    plugin_object = nil
+    eval_str = "plugin_object = #{plugin_name}.new( signature, option )"
+    if $verbose then
+      print "new through: #{eval_str}\n"
+    end
+
+    begin
+      eval( eval_str )     # plugin ãçæ
+      plugin_object.set_locale @locale
+    rescue Exception => evar
+      cdl_error( "S1150 $1: fail to new" , plugin_name )
+      print "eval( #{eval_str} )\n"
+
+      print_exception( evar )
+    end
+    generate_and_parse plugin_object
+  end
+end
+
+#== ååç©ºéãã¹
+class NamespacePath < Node
+#@b_absolute::Bool
+#@path::[ Symbol,... ]
+#@namespace::Namespace:  @b_absolute == false ã®ã¨ããåºç¹ã¨ãªã namespace
+
+  #=== NamespacePath# initialize
+  #ident::Symbol           æåã®åå, ãã ã "::" ã®ã¿ã®å ´åã¯ String
+  #b_absolute:Bool         "::" ã§å§ã¾ã£ã¦ããå ´å true
+  #namespace::Namespace    b_absolute = false ãã¤ãæ§æè§£éæ®µéä»¥å¤ã§å¼ã³åºãå ´åã¯ãå¿
+ãæå®ãããã¨ 
+  def initialize( ident, b_absolute, namespace = nil )
+    super()
+
+    if ident == "::" then   # RootNamespace
+      @path = []
+      @b_absolute = true
+    else
+      @path = [ ident ]
+      @b_absolute = b_absolute
+    end
+
+    if namespace then
+      @namespace = namespace
+      if b_absolute == true then
+        raise "NamespacePath#initialize: naamespace specified for absolute path"
+      end
+    else
+      if b_absolute == false then
+        @namespace = Namespace.get_current
+      else
+        @namespace = nil
+      end
+    end
+  end
+
+  #=== NamespacePath# append ãã
+  #RETURN self
+  # ãã®ã¡ã½ããã¯ãå
+ã® NamespacePath ãªãã¸ã§ã¯ããå¤å½¢ãã¦è¿ã
+  def append!( ident )
+    @path << ident
+    return self
+  end
+  #=== NamespacePath# append ãã
+  # ãã®ã¡ã½ããã¯ãå
+ã® NamespacePath ãªãã¸ã§ã¯ããå¤å½¢ããªã
+  #RETURN:: è¤è£½ãã NamespacePath
+  def append( ident )
+    cl = self.clone
+    cl.set_clone
+    cl.append!( ident )
+    return cl
+  end
+
+  def set_clone
+    @path = @path.clone
+  end
+
+  def get_name
+    @path[ @path.length - 1 ]
+  end
+
+  #=== NamespacePath#ã¯ã­ã¼ã³ãä½æãã¦ååãå¤æ´ãã
+  def change_name name
+    cl = self.clone
+    cl.set_clone
+    cl.change_name_no_clone name
+    return cl
+  end
+  alias :change_name_clone :change_name
+
+  #=== NamespacePath#ååãå¤æ´ãã
+  # ãã®ã¤ã³ã¹ã¿ã³ã¹ãåç
+§ãããã¹ã¦ã«å½±é¿ãä¸ãããã¨ã«æ³¨æ
+  def change_name_no_clone name
+    @path[ @path.length - 1 ] = name
+    nil
+  end
+
+  #=== NamespacePath:: path æå­åãå¾ã
+  # CDL ç¨ã® path æå­åãçæ
+  def to_s
+    get_path_str
+  end
+  def get_path_str
+    first = true
+    if @b_absolute then
+      path = "::"
+    else
+      path = ""
+    end
+    @path.each{ |n|
+      if first then
+        path = "#{path}#{n}"
+        first = false
+      else
+        path += "::#{n}"
+      end
+    }
+    return path
+  end
+
+  def is_absolute?
+    @b_absolute
+  end
+  def is_name_only?
+    @path.length == 1 && @b_absolute == false
+  end
+
+  #=== NamespacePath:: ãã¹ã®é
+åãè¿ã
+  # is_absolute? true ã®å ´åãã«ã¼ãããã®ãã¹
+  #              false ã®å ´åãbase_namespace ããã®ç¸å¯¾
+  # ã«ã¼ã namespace ã®å ´åãé·ãï¼ã®é
+åãè¿ã
+  #
+  def get_path
+    @path
+  end
+
+  #=== NamespacePath#ãã«ãã¹ã®é
+åãè¿ã
+  # è¿ãããé
+åãæ¸ãæãã¦ã¯ãªããªã
+  def get_full_path
+    if @b_absolute then
+      return @path
+    else
+      return @namespace.get_namespace_path.get_full_path.clone + @path
+    end
+  end
+
+  #=== NamespacePath:: ç¸å¯¾ãã¹ã®ãã¼ã¹ã¨ãªã namespace
+  # is_absolute? == false ã®æã®ã¿æå¹ãªå¤ãè¿ã (true ãªã nil)
+  def get_base_namespace
+    @namespace
+  end
+
+  #=== NamespacePath:: C è¨èªã°ã­ã¼ãã«åãå¾ã
+  def get_global_name
+    if @b_absolute then
+      global_name = ""
+    else
+      global_name = @namespace.get_global_name
+    end
+
+    @path.each{ |n|
+      if global_name != "" then
+        global_name = "#{global_name}_#{n}"
+      else
+        global_name = n.to_s
+      end
+    }
+    global_name
+  end
+
+  #=== NamespacePath:: åè§£ãã¦ NamespacePath ã¤ã³ã¹ã¿ã³ã¹ãçæãã
+  #path_str:: String       : namespace ã¾ãã¯ region ã®ãã¹ ex) "::path::A" , "::", "ident"
+  #b_force_absolute:: Bool : "::" ã§å§ã¾ã£ã¦ããªãå ´åã§ãçµ¶å¯¾ãã¹ã«æ±ã
+  #
+  # NamespacePath ã¯éå¸¸æ§æè§£æããã¦ä½æããã
+  # ãã®ã¡ã½ããã¯ããªãã·ã§ã³ãªã©ã§æå®ãããæå­åãåè§£ãã¦ NamespacePath ãçæããã®ã«ç¨ãã
+  # ãã§ãã¯ã¯ããããä¸é©åãªãã¹æå®ã¯ãä¸é©åãª NamespacePath ãçæããã
+  def self.analyze( path_str, b_force_absolute = false )
+
+    if path_str == "::" then
+      return self.new( "::", true )
+    end
+
+    pa = path_str.split( "::" )
+    if pa[0] == "" then
+      pa.shift
+      b_absolute = true
+    else
+      if b_force_absolute then
+        b_absolute = true
+      else
+        b_absolute = false
+      end
+    end
+
+    if pa[0] then
+      nsp = self.new( pa[0].to_sym, b_absolute )
+    else
+      nsp = self.new( "::", b_absolute )
+    end
+    pa.shift
+
+    pa.each{ |a|
+      if a then
+        nsp.append! a.to_sym
+      else
+        nsp.append! "::"
+      end
+    }
+
+    return nsp
+  end
+
+end
+
+# ä»¥ä¸åä½ãã¹ãã³ã¼ã
+if $unit_test then
+  root_namespace = Namespace.new("::")
+
+  puts( "===== Unit Test: NamespacePath ===== (componentobj.rb)")
+  a = NamespacePath.new( :"ABC", true )
+  printf( "Path: %-10s global_name: %s\n", a.get_path_str, a.get_global_name )
+
+  a.append( :"DEF" )
+  printf( "Path: %-10s global_name: %s\n", a.get_path_str, a.get_global_name )
+
+  a = NamespacePath.new( :"abc", false )
+  printf( "Path: %-10s global_name: %s\n", a.get_path_str, a.get_global_name )
+
+  a.append( :"def" )
+  printf( "Path: %-10s global_name: %s\n", a.get_path_str, a.get_global_name )
+
+  puts ""
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/ctypes.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/ctypes.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/ctypes.rb	(revision 270)
@@ -0,0 +1,250 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: ctypes.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+# CType ã¯ C_parser ã§å®ç¾©ãããåãæ±ã CIntType, CFloatType ãªã©ã« include ãããã®
+# CIntType ã¯ IntType ãç¶æ¿ãããªã©ãC ã®åã§ã¯ TECS ã®åãç¶æ¿ãã
+module CType
+
+  #=== æ§æè¦ç´  type_specifier ãè¤æ°æå®ããã¦ããå ´åã« merge ãã
+  # merge ã¯ const(CIntType) unsigned(CIntTtype), long(CIntType), ãªã©ã¨ä»ã®åããã¼ã¸ãã
+  # const, unsigned, long ãªã©ã¯ãåä½ã§ int (CIntType) åã«ãªããã
+  #
+  # mikan C ã®ææ³ãå³å¯ã«ã¯ãã§ãã¯ãã¦ããªã  long struct ç­ãã§ãã¦ãã¾ã
+  def merge another
+
+    # p "self: #{self.class} kind_of( IntType ): #{self.kind_of?( IntType )}  another: #{another.class}"
+
+    # signed, unsigned ã Symbol ã¨ãã¦æ¥ãäºã¯ç¡ããªã£ã
+    # if another.instance_of? Symbol then
+    #   # ããã§ Symbol ã¯ :SIGNED, :UNSIGNED ã®ãããã
+    # 
+    #   # CIntType ãï¼
+    #   if self.instance_of? CIntType then
+    #     self.set_sign another
+    #     return self
+    #   else
+    #     cdl_error( "C1001 $1: mismatch, suitable for int types" , another )
+    #     return self
+    #   end
+    # elsif self.instance_of?( CIntType ) && another.instance_of?( CIntType )then
+    if self.instance_of?( CIntType ) && another.instance_of?( CIntType )then
+      if another.get_bit_size != -3 then
+        if @bit_size == -4 && another.get_bit_size == -4 then
+          @bit_size = -5  # long long
+        else
+          # self ã¯ int åãanother ã® bit_size ã (int ä»¥å¤ã§ããã°)ãã¡ãã«ãã
+          # mikan ä¸è¨ä»¥å¤ã§ ä¸¡æ¹ -3 ã§ãªããã°ãæ¬æ¥ã¨ã©ã¼
+          @bit_size = another.get_bit_size
+        end
+      end
+
+      if another.get_sign then
+        # another ã§ sign ãæå®ããã¦ããã°ããã¡ãã®ãã®ãæ¡ç¨ãã mikan çç¾ã®ãã§ãã¯
+        @sign = another.get_sign
+      end
+
+#      if another.get_qualifier then
+#        # another ã§ qualifier ãæå®ããã¦ããã°ããã¡ãã®ãã®ãæ¡ç¨ãã mikan çç¾ã®ãã§ãã¯
+#        @qualifier = another.get_qualifier
+#      end
+      if another.is_const? then
+        @b_const = true
+      end
+      if another.is_volatile? then
+        @b_volatile = true
+      end
+
+      return self
+    elsif self.instance_of?( CIntType ) then
+      return another.merge self
+    elsif self.instance_of?( CDefinedType ) then
+      # mikan unsigned ãªã©ã¨ã® merge ã®ä¸æ­£æ¤åº
+      if another.is_const? then
+        @b_const = true
+      end
+      if another.is_volatile? then
+        @b_volatile = true
+      end
+
+#      if self.get_type.get_type_str == another.get_type_str &&
+#          self.get_type.get_type_str_post == another.get_type_str_post
+#        # p "typedef #{another.get_type_str} #{self.get_type_str}#{another.get_type_str_post} ;"
+#      else
+#        cdl_error( "C1002 $1 not compatible with previous one $2" , self.get_type_str, another.get_type_str )
+#      end
+      return self
+    elsif self.instance_of?( CStructType ) then
+      if another.is_const? then
+        @b_const = true
+      end
+      if another.is_volatile? then
+        @b_volatile = true
+      end
+      return self
+    else
+      # mikan long double
+      #   TECS ã«ã¯ long double ãè¡¨ç¾ããææ®µããªã (double80_t ãå®ç¾©ããã°ããã?)
+#      cdl_warning( "C1003 $1 & $2 incompatible (\'long double\' is not supported.). Treated as $3." , self.class, another.class, self.class )
+      cdl_warning( "W9999 $1 & $2 incompatible (\'long double\' is not supported.). Treated as $3." , self.get_type_str, another.get_type_str, self.get_type_str )
+      return self
+    end
+  end
+
+  #=== qualifier ãè¨­å®ãã
+  #     å
+ã® Type ã¯ã©ã¹ã§ã¯çç¾ãã§ãã¯ããªãï¼TECSã®æ¬æ¥ã®ææ³ã§ã¯éè¤æå®ã§ããªãããï¼
+  def set_qualifier( qual )
+
+    if @qualifier then
+      cdl_error( "C1004 $1: qualifier redefined. previous one: $2" , qual, @qualifier )
+    end
+    super( qual )
+  end
+
+end
+
+class CDefinedType < DefinedType
+
+  include CType
+
+  def initialize( type_name )
+    super( type_name )
+  end
+end
+
+class CVoidType < VoidType
+
+  include CType
+
+end
+
+class CBoolType < BoolType
+
+  include CType
+
+end
+
+class CIntType < IntType
+
+  include CType
+
+  def initialize( bit_size )
+    #p super.class   mikan super.class ã Symbol ã ããªãï¼
+    super( bit_size )
+  end
+
+  def set_sign( sign, b_uint = false )
+    super( sign, b_uint )
+    # p "CInt: set_sign: #{get_type_str} #{sign}"
+  end
+end
+
+class CFloatType < FloatType
+
+  include CType
+
+  def initialize( bit_size )
+    super
+  end
+
+end
+
+class CEnumType < EnumType # mikan
+
+  include CType
+
+  def initialize( bit_size )
+    super( bit_size )
+  end
+
+end
+
+class CStructType < StructType
+
+  include CType
+
+
+  def initialize( tag = nil )
+    super( tag )
+  end
+end
+
+class CFuncType < FuncType
+
+  include CType
+
+  def initialize( paramlist = nil )
+    super( paramlist )
+  end
+
+end
+
+class CArrayType < ArrayType
+
+  include CType
+
+  def initialize( subscript = nil )
+    super( subscript )
+  end
+end
+
+class CPtrType < PtrType
+
+  include CType
+
+  def initialize( referto = nil )
+    super( referto )
+  end
+
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/expression.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/expression.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/expression.rb	(revision 270)
@@ -0,0 +1,953 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: expression.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+class Expression < Node
+#  @elements   # array
+
+  def initialize( elements, locale = nil )
+    super()
+    if locale then
+      @locale = locale
+    end
+
+    @elements = elements
+  end
+
+  def print
+    # puts "expr: #{@elements}"
+    puts "expr_string: #{to_s}"
+  end
+
+  #=== Expression# to_s
+  # C è¨èªã½ã¼ã¹åãã®æå­åãçæ (globa_name)
+  def to_s
+    elements_to_s( @elements )
+  end
+
+  #=== Expression# to_str
+  # C è¨èªã½ã¼ã¹åãã®æå­åãçæ (globa_name)
+  def to_str( name_list, pre, post )
+    elements_to_s( @elements, name_list, pre, post )
+  end
+
+  #=== Expression#to_CDL_str
+  # CDL è¡¨ç¾ã®æå­åãçæ
+  def to_CDL_str
+    return to_s
+  end
+
+  #=== å®æ°å¼ã¨ãã¦è©ä¾¡ãã(ãã©ã¤ãã¦ã¿ã)
+  #
+  # ãã®ã¡ã½ããã¯ãå®æ°å¼ãè©ä¾¡ãã
+  # ã»attribute, var ã®åæåå­
+  # ã»size_is, count_is å¼æ°
+  # ã»é
+åã®æ·»æ°
+  #
+  # name_list(NamedList|Nil): å¼ããåç
+§å¯è½ãªãªã¹ãï¼
+  # NamedList ã®è¦ç´ ã¯  size_is, count_is ã®å¼æ°è©ä¾¡ã®å ´å ParamDecl (é¢æ°ä»®å¼æ°)
+  #
+  # name_list2(NamedList|Nil) : NamedList ã®è¦ç´ ã¯ Decl (attribute, var) ã§ããï¼çç¥æ nil
+  # 
+  # RETURN: è©ä¾¡ããå®æ°ï¼è©ä¾¡ã§ããªãã£ãå ´åã¯ nil ãè¿ã
+  #
+  # åã¯ get_type ã§ãè©ä¾¡ããï¼å®æ°ã¨ãã¦æ±ããããªãã¨ãã«ä½¿ç¨ã§ããï¼
+  # Array ãè¿ãã®ã¯ attr{ int *a = {1, 2, 3}; int *b = a; }; ã® b ã®å³è¾ºãè©ä¾¡ããå ´å
+
+  def eval_const( name_list, name_list2 = nil )
+    val = elements_eval_const( @elements, name_list, name_list2, 0 )
+    if val.kind_of? IntegerVal then
+      return val.to_i
+    elsif val.kind_of? FloatVal then
+      return val.to_f
+    elsif val.kind_of? BoolVal then
+      return val.to_i
+    elsif val.kind_of? PointerVal then
+      return val.to_i           # mikan ã¨ã©ã¼ V1008 ãçºçãã¦ãã¾ã
+      # elsif val.kind_of? EnumVal then
+      # enum mikan
+    else
+      # C_EXP, Array ã¾ãã¯ nil ï¼ãã®ã¾ã¾è¿ã
+      return val
+    end
+  end
+
+  #=== å®æ°å¼ã¨ãã¦è©ä¾¡ãã2(ãã©ã¤ãã¦ã¿ã)
+  #
+  # IntegerVal, FloatVal ããã®ã¾ã¾è¿ãï¼eval_const ã§ã¯ Integer, Float ã«å¤æï¼
+  def eval_const2( name_list, name_list2 = nil, nest = 0 )
+    val = elements_eval_const( @elements, name_list, name_list2, nest )
+  end
+
+  #=== å¼ã®åãè©ä¾¡ãã
+  #
+  # eval_const ã§å¤ãå¾ãããªãå ´åãåãå°åºå¯è½ã§ããã°åãå¾ã
+  # param ãå«ãã å¼ã¯å®æ°å¤ãæ±ããããªãããåãå¾ããã¨ã¯ã§ãã
+  # æªå®ç¾©å¤æ°ãå«ãã åã¯ãå¾ããã¨ãã§ããªã (ããã¼åå®ç¾©ãè¿ã)
+  def get_type( namedList )        # ååç©ºéã® NamedList ãæå®
+    elements_get_type( @elements, namedList )
+  end
+
+  def check_dir_for_param( namedList, dir, spec )
+    elements_check_dir_for_param( @elements, namedList, dir, spec )
+  end
+
+  def get_elements
+    @elements
+  end
+
+  def show_tree( indent )
+    # mikan override ãã¦ãã¾ã£ã print ãå¼åºãæ¹æ³ãããããªãã®ã§ãããã
+    str = ""
+    indent.times { str += "  " }
+    puts "#{str}#{to_s}"
+  end
+
+## private
+
+  #=== å¼ãæå­åã«å¤æ
+  #name_list:: attribute (Celltype::@attribute_list), struct ã® @member_list ãä»®å®ãã¦ãã
+  def elements_to_s( elements, name_list = nil, pre = nil, post = nil )
+    if elements.instance_of? Token then
+      return elements.to_s    # OP_DOT, OP_REF ã®å³è¾º
+    end
+
+    case elements[0]
+    when :IDENTIFIER
+      nsp = elements[1]
+      if nsp.is_name_only? && name_list && name_list.get_item( nsp.get_name ) then
+        return "#{pre}#{nsp.get_name}#{post}"
+      else
+        # return  elements[1].get_global_name
+        return nsp.get_path_str
+      end
+    when :INTEGER_CONSTANT, :FLOATING_CONSTANT, :OCTAL_CONSTANT, :HEX_CONSTANT, :CHARACTER_LITERAL, :STRING_LITERAL_LIST, :BOOL_CONSTANT
+      return  elements[1].to_s
+    when :PARENTHESES
+      return "(#{elements_to_s(elements[1],name_list,pre,post)})"
+    when :OP_SUBSC
+      return "#{elements_to_s(elements[1],name_list,pre,post)}[#{elements[2].to_s}]"
+    when :OP_DOT
+      return "#{elements_to_s(elements[1],name_list,pre,post)}.#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_REF
+      return "#{elements_to_s(elements[1],name_list,pre,post)}->#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_SIZEOF_EXPR
+      return "sizeof(#{elements_to_s(elements[1],name_list,pre,post)})"
+    when :OP_SIZEOF_TYPE
+      return "sizeof(#{elements[1]}) mikan"
+    when :OP_U_AMP
+      return "&#{elements_to_s(elements[1],name_list,pre,post)}"
+    when :OP_U_ASTER
+      return "*#{elements_to_s(elements[1],name_list,pre,post)}"
+    when :OP_U_PLUS
+      return "+#{elements_to_s(elements[1],name_list,pre,post)}"
+    when :OP_U_MINUS
+      return "-#{elements_to_s(elements[1],name_list,pre,post)}"
+    when :OP_U_TILDE
+      return "~#{elements_to_s(elements[1],name_list,pre,post)}"
+    when :OP_U_EXCLAM
+      return "!#{elements_to_s(elements[1],name_list,pre,post)}"
+    when :CAST
+      return "(#{elements[1].get_type_str})#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_MULT
+      return "#{elements_to_s(elements[1],name_list,pre,post)}*#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_DIV
+      return "#{elements_to_s(elements[1],name_list,pre,post)}/#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_REMAIN
+      return "#{elements_to_s(elements[1],name_list,pre,post)}%#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_ADD
+      return "#{elements_to_s(elements[1],name_list,pre,post)}+#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_SUB
+      return "#{elements_to_s(elements[1],name_list,pre,post)}-#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_LSFT
+      return "#{elements_to_s(elements[1],name_list,pre,post)}<<#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_RSFT
+      return "#{elements_to_s(elements[1],name_list,pre,post)}>>#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_LT
+      return "#{elements_to_s(elements[1],name_list,pre,post)}<#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_GT
+      return "#{elements_to_s(elements[1],name_list,pre,post)}>#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_LE
+      return "#{elements_to_s(elements[1],name_list,pre,post)}<=#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_GE
+      return "#{elements_to_s(elements[1],name_list,pre,post)}>=#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_EQ
+      return "#{elements_to_s(elements[1],name_list,pre,post)}==#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_NE
+      return "#{elements_to_s(elements[1],name_list,pre,post)}!=#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_AND
+      return "#{elements_to_s(elements[1],name_list,pre,post)}&#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_EOR
+      return "#{elements_to_s(elements[1],name_list,pre,post)}^#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_OR
+      return "#{elements_to_s(elements[1],name_list,pre,post)}|#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_LAND
+      return "#{elements_to_s(elements[1],name_list,pre,post)}&&#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_LOR
+      return "#{elements_to_s(elements[1],name_list,pre,post)}||#{elements_to_s(elements[2],name_list,pre,post)}"
+    when :OP_CEX
+      return "#{elements_to_s(elements[1],name_list,pre,post)}?#{elements_to_s(elements[2],name_list,pre,post)}:#{elements_to_s(elements[3],name_list,pre,post)}"
+    else
+      raise "Unknown expression element: #{elemets[0]}. try -t and please report"
+    end
+    return ""
+  end
+
+  # å®æ°å¼(elements)ãè©ä¾¡ãã
+  #
+  # ãã®ã¡ã½ããã¯ Expression ã¯ã©ã¹ã®ã¡ã½ããã§ããå¿
+è¦ã¯ãªãï¼é¢æ°åã§ããï¼
+  #
+  # elements ã¯å¼ã®è¦ç´ 
+  #
+  # name_list, name_list2 ã¯ eval_const ãåç
+§
+  #
+  # RETURN: è©ä¾¡ããå®æ°ãè©ä¾¡ã§ããªãã£ãå ´åã¯ nil ãè¿ã
+
+  MAX_NEST_LEVEL = 64    # ç°¡æã®ã«ã¼ãæ¤åºï¼åç
+§ã®ãã¹ãã 64 ã¾ã§è¨±å¯ããï¼
+  def elements_eval_const( elements, name_list, name_list2 = nil, nest = nil )
+
+    case elements[0]
+    when :IDENTIFIER
+      nsp = elements[1]
+
+      # #809 ã®ä¿®æ­£ããã (å¥ã®åé¡ãè§£æ±ºãããã¦ããªã)
+      # nest += 1     # åç
+§ãã«ã¼ãã«ãªã£ã¦ããªããã®ãã§ãã¯
+      #               # mikan æ¬å½ã«ã«ã¼ããã¦ãããã©ããã§ã¯ãªããåç´ã«å¤æ°ã®åç
+§ãç¹°ãè¿ãã¦ãããã¨ã§å¤å®ãã¦ãã
+      # if nest > MAX_NEST_LEVEL then
+      #   cdl_error( "E9999: '$1' too many reference (maybe loop) max=$1" , nsp.to_s, MAX_NEST_LEVEL )
+      #   return
+      # end
+      if nsp.is_name_only? then
+        if name_list then
+          object = name_list.get_item( nsp.get_name )
+        end
+
+        if object == nil && name_list2 then
+          object = name_list2.get_item( nsp.get_name )
+        end
+      end
+
+      # è¦ã¤ãããªããã°å®æ°å®ç¾©ããæ¢ã
+      if object == nil then
+        object = Namespace.find( nsp )# mikan namespace ã®å¯¾å¿ #1
+      end
+
+# ãã®å®è£
+ã¯ãããå°ãæ´çãããã¹ã
+# ãããå¼åºãããã®ã¯ãä»¥ä¸ã®å ´å
+#   ã»attribute, var ã®å³è¾ºå¼ã®è©ä¾¡
+#   ã»size_is å¼æ°ã®è©ä¾¡ï¼é¢æ°ãã©ã¡ã¼ã¿ã®å ´åã¨attribute, var ã®å ´åããã
+# ä»¥ä¸ã®ã¨ã©ã¼ãã§ãã¯ã§ã¯ããããããã£ã¡ãã«ãªã£ã¦èª¤ããæ¤åºãããã¨ãã¦ãã
+
+      # IDENTIFIER ã¯è¦ã¤ãããªãã£ãï¼
+      if object == nil then
+        cdl_error( "E1001 $1: not found" , nsp.get_path_str )
+        # raise  "E1001"  # bug trap
+        return nil
+      elsif object.instance_of?( Join ) then
+        # Join ã®å ´åï¼ cell ã®ä¸­ã® attribute, var, call ã®ã©ãããè¦ã¤ãã£ã
+        # Decl (attribute, var) ã§ãªãï¼
+        if ! object.get_definition.instance_of?( Decl ) then
+          cdl_error( "E1002 $1: not constant (port)" , nsp.get_path_str )
+          return nil
+        end
+        return object.get_rhs.eval_const2( name_list, name_list2, nest )
+      elsif ! object.instance_of?( Decl ) then
+        # Decl ã§ãªãå ´åï¼ å®æ°ã§ããªã
+        if ( ! object.instance_of?( ParamDecl ) ) then
+                                                      # mikan paramdecl ã¯ç¡è¦ãã
+                                                      # ParamList ããå¼ã°ããã¨ã
+          cdl_error( "E1003 $1: not constant" , nsp.get_path_str )
+        else
+          # ParamDecl
+          object.referenced
+        end
+        return nil
+      else # Decl
+        object.referenced
+        if object.get_initializer == nil then
+          # åæåå­ã®å­å¨ããªãå¤æ°   # mikan ããã¸ããã®ã¯ãéå¸¸ããããªãã¯ãï¼æªæ¤è¨¼ï¼
+          return IntegerVal.new( 0 )
+        else
+          # Decl ã®å³è¾ºã®è©ä¾¡
+          # mikan size_is å¼æ°ã«ç¾ããå¤æ°ã®åãé©åãã®ãã§ãã¯ãã
+          if object.get_initializer.instance_of?( Expression ) || object.get_initializer.instance_of?( C_EXP ) then
+            return object.get_initializer.eval_const2( name_list, name_list2, nest )
+          else
+            # Array ã®å ´å
+            return object.get_initializer
+          end
+        end
+      end
+    when :BOOL_CONSTANT
+      if( elements[1].instance_of?( TrueClass ) )then
+        return BoolVal.new( true )
+      elsif( elements[1].instance_of?( FalseClass ) )then
+        return  BoolVal.new( false )
+      else
+        throw( "BOOL constant error" )
+      end
+    when :INTEGER_CONSTANT
+      return IntegerVal.new( elements[1].val )
+    when :FLOATING_CONSTANT
+      return FloatVal.new( elements[1].val )
+    when :OCTAL_CONSTANT
+      return IntegerVal.new( elements[1].val.oct, elements[1].val )
+    when :HEX_CONSTANT
+      return IntegerVal.new( elements[1].val.hex, elements[1].val )
+    when :CHARACTER_LITERAL
+      str =  elements[1].val.gsub(/'/, "" )
+#2.0      if str.jlength == 1
+      if $b_no_kcode then
+        len = str.length
+      else
+        len = str.jlength
+      end
+      if len == 1 then
+        sum = 0
+        str.each_byte { |b| sum = sum * 256 + b }
+        return IntegerVal.new( sum, elements[1].val )
+      else
+#2.0        if str[0] == 92 then
+        if str[0] == 92 || str[0] == "\\" then
+          case str[1]
+#2.0          when 48 # '0'
+          when 48, "0" # '0'
+            return IntegerVal.new( 0, elements[1].val )
+#2.0          when 110 # 'n'
+          when 110, "n" # 'n'
+            return IntegerVal.new( 10, elements[1].val )
+#2.0          when 114 # 'r'
+          when 114, "r" # 'r'
+            return IntegerVal.new( 13, elements[1].val )
+#2.0          when 116 # 't'
+          when 116, "t" # 't'
+            return IntegerVal.new( 15, elements[1].val )
+#2.0          when 92 # '\\'
+          when 92, '\\' # '\\'
+            return IntegerVal.new( 92, elements[1].val )
+          end
+        end
+      end
+#2.0      printf( "c=%c\n", str[1] )
+      printf( "len=%d c=%c\n", len, str[1] )
+      raise Error
+
+    when :STRING_LITERAL_LIST
+      return  StringVal.new( elements[1] )
+    when :PARENTHESES
+      return elements_eval_const( elements[1], name_list, name_list2, nest );
+    when :OP_SUBSC
+      cdl_error( "E1004 cannot evaluate \'[]\' operator"  )
+      return nil
+    when :OP_DOT
+      cdl_error( "E1005 cannot evaluate \'.\' operator"  )
+      return nil
+    when :OP_REF
+      cdl_error( "E1006 cannot evaluate \'->\' operator"  )
+      return nil
+    when :OP_SIZEOF_EXPR
+      cdl_error( "E1007 cannot evaluate \'sizeof\' operator"  )
+      return nil
+    when :OP_SIZEOF_TYPE
+      cdl_error( "E1008 cannot evaluate \'sizeof\' operator"  )
+      return nil
+    when :OP_U_AMP
+      cdl_error( "E1009 cannot evaluate \'&\' operator"  )
+      return nil
+    when :OP_U_ASTER
+      # cdl_error( "E1010 cannot evaluate \'*\' operator"  )
+      val = elements_eval_const(elements[1], name_list, name_list2, nest)
+      return nil if ! evaluable?( val )
+      return val
+    when :OP_U_PLUS
+      val = elements_eval_const(elements[1], name_list, name_list2, nest)
+      return nil if ! evaluable?( val )
+      if val.respond_to?( "+@" ) then
+        return + val
+      else
+        cdl_error( "E1011 cannot evaluate unary + for $1" , val.class )
+        return nil
+      end
+    when :OP_U_MINUS
+      val = elements_eval_const(elements[1], name_list, name_list2, nest)
+      return nil if ! evaluable?( val )
+      if val.respond_to?( "-@" ) then
+        return - val
+      else
+        return nil
+      end
+    when :OP_U_TILDE
+      val = elements_eval_const(elements[1], name_list, name_list2, nest)
+      return nil if ! evaluable?( val )
+# p "val.respond_to?( \"-@\" )=#{val.respond_to?( "-@" )} #{val.class}"
+# p "val.respond_to?( \"~@\" )=#{val.respond_to?( "~@" )}"
+#2.0      if val.respond_to?( "~@" ) then  # Ruby 1.9, 2.0 preview çã§ã¯ä¾å¤ãçºçãã¦ãã¾ã
+      if val.kind_of? IntegerVal then
+        return ~ val
+      else
+        return nil
+      end
+    when :OP_U_EXCLAM
+      val = elements_eval_const(elements[1], name_list, name_list2, nest)
+      return nil if ! evaluable?( val )
+      val = val.cast( BoolType.new )
+      if val.respond_to?( "not" ) then
+        return val.not
+      else
+        return nil
+      end
+      return nil
+    when :CAST
+      val = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if val == nil
+      return nil if ! evaluable?( val )
+      return val.cast( elements[1] )
+    when :OP_MULT
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if( rhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, lhs )
+      return lhs * rhs
+    when :OP_DIV
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if( rhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, lhs )
+      return lhs / rhs
+    when :OP_REMAIN
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if( rhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, lhs )
+      return lhs % rhs
+    when :OP_ADD
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if( rhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, lhs )
+      return lhs + rhs
+    when :OP_SUB
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if( rhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, lhs )
+      return lhs - rhs
+    when :OP_LSFT
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if( rhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, lhs )
+      return lhs << rhs
+    when :OP_RSFT
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if( rhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, lhs )
+      return lhs >> rhs
+    when :OP_LT
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if( rhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, lhs )
+      return lhs < rhs
+    when :OP_GT
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if( rhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, lhs )
+      return lhs > rhs
+    when :OP_LE
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if( rhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, lhs )
+      return lhs <= rhs
+    when :OP_GE
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if( rhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, lhs )
+      return lhs >= rhs
+    when :OP_EQ
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if( rhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, lhs )
+      return lhs.eq( rhs )
+    when :OP_NE
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if( rhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, lhs )
+      return lhs.neq( rhs )
+    when :OP_AND
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if( rhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, lhs )
+      return lhs & rhs
+    when :OP_EOR
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if( rhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, lhs )
+      return lhs ^ rhs
+    when :OP_OR
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if( rhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, lhs )
+      return lhs | rhs
+    when :OP_LAND
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if( rhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, lhs )
+      return lhs.lAND( rhs )
+    when :OP_LOR
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      # return nil if( rhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, lhs )
+      return lhs.lOR( rhs )
+    when :OP_CEX
+      lhs = elements_eval_const(elements[1], name_list, name_list2, nest)
+      mhs = elements_eval_const(elements[2], name_list, name_list2, nest)
+      rhs = elements_eval_const(elements[3], name_list, name_list2, nest)
+      # return nil if( rhs == nil || mhs == nil || lhs == nil )
+      return nil if ! evaluable?( rhs, mhs, lhs )
+      if lhs.cast( BoolType.new ).val then
+          return mhs
+      else
+          return rhs
+      end
+    end
+    return nil
+  end
+
+  def elements_get_type( elements, namedList )
+    type = elements_get_type_sub( elements, namedList )
+    # è¿ãããæ¹ã DefinedType ã®å ´å å
+ã®åãè¿ã
+    if type.kind_of?( DefinedType ) then
+      type = type.get_type
+    end
+    return type
+  end
+
+  def elements_get_type_sub( elements, namedList )
+    case elements[0]
+    when :IDENTIFIER
+      nsp = elements[1]
+      if nsp.is_name_only? then
+        paramdecl = namedList.get_item( nsp.get_name )
+      else
+        paramdecl = nil
+      end
+      unless paramdecl then
+        cdl_error( "E1012 $1: not found in parameter list" , nsp.get_path_str )
+        return IntType.new(32)        # dummy result
+      end
+      return paramdecl.get_type
+# mikan get_type
+#    when :INTEGER_CONSTANT
+#    when :FLOATING_CONSTANT
+#    when :OCTAL_CONSTANT
+#    when :HEX_CONSTANT
+#    when :CHARACTER_LITERAL
+#    when :STRING_LITERAL_LIST
+#    when :PARENTHESES
+#    when :OP_SUBSC
+#    when :OP_DOT
+#    when :OP_REF
+#    when :OP_SIZEOF_EXPR
+#    when :OP_SIZEOF_TYPE
+#    when :OP_U_AMP
+    when :OP_U_ASTER
+      type = elements_get_type( elements[1], namedList )
+      unless type.kind_of?( PtrType ) then
+        cdl_error( "E1013 \'*\': operand is not pointer value"  )
+        return IntType.new( 8 )    # IntType ãè¿ãã¦ãã
+      end
+      return type.get_referto
+
+    when :OP_U_PLUS, :OP_U_MINUS
+      # mikan operand ãé©åãªåããã§ãã¯ãã¦ããªã
+      return elements_get_type( elements[1], namedList )
+
+    when :OP_ADD, :OP_SUB, :OP_MULT, :OP_DIV, :OP_REMAIN
+      # mikan operand ãé©åãªåããã§ãã¯ãã¦ããªãï¼å·¦è¾ºã®åãæ¡ç¨ãã¦ãã
+      return elements_get_type( elements[1], namedList )
+
+    when :OP_U_TILDE
+      # mikan operand ãæ´æ°ããã§ãã¯ãã¦ããªã
+      return elements_get_type( elements[1], namedList )
+    when :OP_AND, :OP_EOR, :OP_OR, :OP_LSFT, :OP_RSFT
+      # mikan operand ãæ´æ°ããã§ãã¯ãã¦ããªã
+      return BoolType.new
+    when :OP_U_EXCLAM
+      # mikan operand ãæ´æ°ããã§ãã¯ãã¦ããªã
+      return BoolType.new
+
+    when :OP_LT, :OP_GT, :OP_LE, :OP_GE, :OP_EQ, :OP_NE, :OP_LAND, :OP_LOR, :OP_CEX, :CAST
+      cdl_error( "E1014 $1: elements_get_type: sorry not supported" , elements[0] )
+    end
+
+    return nil
+  end
+
+  # å¼ã size_is, count_is, string ã®å¼æ°ã§ããå ´åã®æ¹åã®ãã§ãã¯
+  def elements_check_dir_for_param( elements, namedList, dir, spec )
+   # dir ï¼ å
+ã®å¼æ°ã®æ¹å
+   # direct: size_is ãªã©ã®å¼æ°ã®å¤æ°ã®æ¹å
+
+    case elements[0]
+    when :IDENTIFIER
+      nsp = elements[1]
+      if nsp.is_name_only? then
+        paramdecl = namedList.get_item( nsp.get_name )
+      else
+        paramdecl = nil
+      end
+
+      return unless paramdecl      # if nil already error in element_get_type
+
+      direct = paramdecl.get_direction
+      judge = false
+      case spec
+      when "size_is", "string"
+        case dir
+        when :IN, :OUT, :INOUT, :SEND
+          judge = true if ( direct == :IN || direct == :INOUT )
+          req_direct = "in or inout"
+        when :RECEIVE
+          judge = true if ( direct == :OUT || direct == :INOUT )
+          req_direct = "out or inout"
+        end
+
+      when "count_is"
+        case dir
+        when :IN, :SEND
+          judge = true if ( direct == :IN || direct == :INOUT )
+          req_direct = "in or inout"
+        when :OUT, :RECEIVE     # mikan out ã§ count_is ã®ã¿æå®ããã¦ããå ´å in ã§ãªãã¦ã¯ãªããªã
+          judge = true if ( direct == :OUT || direct == :INOUT )
+          req_direct = "out or inout"
+        when :INOUT
+          judge = true if ( direct == :INOUT )
+          req_direct = "inout"
+        end
+      end
+
+      if judge == false then
+        cdl_error( "E1015 \'$1\': direction mismatch for $2, $3 required" , nsp.get_path_str, spec, req_direct )
+      end
+
+    when :INTEGER_CONSTANT, :FLOATING_CONSTANT, :OCTAL_CONSTANT, :HEX_CONSTANT, :CHARACTER_LITERAL, :STRING_LITERAL_LIST
+      return true
+
+    # åé 
+æ¼ç®å­
+    when :OP_U_ASTER, :OP_SIZEOF_EXPR, :OP_SIZEOF_TYPE, :OP_U_PLUS, :OP_U_MINUS, :OP_U_TILDE, :OP_U_EXCLAM, :CAST, :OP_U_AMP, :PARENTHESES,
+      elements_check_dir_for_param( elements[1], namedList, dir, spec )
+
+    # 2é 
+æ¼ç®å­
+    when :OP_SUBSC, :OP_DOT, :OP_REF, :OP_MULT, :OP_DIV, :OP_REMAIN, :OP_ADD, :OP_SUB, :OP_LSFT, :OP_RSFT, :OP_LT, :OP_GT, :OP_LE, :OP_GE, :OP_EQ, :OP_NE, :OP_AND, :OP_EOR, :OP_OR, :OP_LAND, :OP_LOR
+      return elements_check_dir_for_param( elements[1], namedList, dir, spec ) && elements_check_dir_for_param( elements[2], namedList, dir, spec )
+
+    # 3é 
+æ¼ç®å­
+    when :OP_CEX
+      return elements_check_dir_for_param( elements[1], namedList, dir, spec ) && elements_check_dir_for_param( elements[2], namedList, dir, spec ) && elements_check_dir_for_param( elements[3], namedList, dir, spec )
+
+    else
+      cdl_error( "E1016 $1: elements_check_dir_for_param: sorry not supported" , elements[0] )
+    end
+
+  end
+
+  #Express# get_allocator_rhs_elem
+  #alloc_type::Symbol  :NORMAL_ALLOC|:INTERNAL_ALLOC|:RELAY_ALLOC
+  #å¼ãã¢ã­ã±ã¼ã¿æå®å­ã®å³è¾ºã¨ãã¦å¦¥å½ããã§ãã¯ããæ­£ãããã°åè§£ããå¤ãè¿ã
+  #return:
+  #  :NORMAL_ALLOC      [ cell_nsp, ep_name ]               # rhs = cell_nsp.ep_name    ex) Alloc.eAlloc
+  #  :INTERNAL_ALLOC    [ ep_name ]                         # rhs = ep_name             ex) eAlloc
+  #  :RELAY_ALLOC       [ cp_name, func_name, param_name ]  # rhs = cp_name.func_name.param_name
+  def get_allocator_rhs_elements( alloc_type )
+    ele = @elements
+    case alloc_type 
+    when :NORMAL_ALLOC
+      if ele[0] != :OP_DOT || ele[1][0] != :IDENTIFIER then   #1
+        cdl_error( "E1017 $1: rhs not \'Cell.ePort\' form" , ele[0].to_s )
+        return nil
+      end
+      cell_nsp  = elements[1][1]
+      port_name = elements[2].val
+      return [ cell_nsp, port_name ]
+    when :INTERNAL_ALLOC
+      if( ele[0] == :IDENTIFIER )then
+        if ele[1].is_name_only? then
+          return [ ele[1].get_path[0] ]  # mikan a::b
+        else
+          cdl_error( "E1018 $1: namespace cannot be specified", ele[1].to_s )
+        end
+      else
+        cdl_error( "E1019 $1: rhs not in 'allocator_entry_port' form", ele[1].to_s )
+      end
+    when :RELAY_ALLOC
+      if( ele[0] != :OP_DOT ||
+          ele[1][0] != :OP_DOT || ele[1][1][0] != :IDENTIFIER || ! ele[1][1][1].is_name_only? ||
+          ! ele[1][2].instance_of?( Token ) || ! ele[2].instance_of?( Token ) )then   #1
+        cdl_error( "E1020 rhs not in 'call_port.func.param' form ($1)" , ele[0].to_s )   # S1086
+      end
+      func_name = ele[1][2]; cp_name = ele[1][1][1].get_name; param_name = ele[2].to_sym
+      return [ cp_name, func_name, param_name ]
+    end
+    return  nil
+  end
+
+  #Expression#Expression ã®ã¯ã­ã¼ã³ãä½æãã
+  def clone_for_composite
+    cl = self.clone
+    elements = clone_elements @elements
+    cl.set_elements elements
+    return cl
+  end
+
+  #Expression#elements ã®ã¯ã­ã¼ã³ãä½æ
+  #elements::Array
+  # ãã®ã¡ã½ããã¯ãArray ã®ãã£ã¼ãã³ãã¼ãè¡ã
+  def clone_elements elements
+    elements = elements.clone
+    elements.map!{ |ele|
+      if ele.instance_of? Array
+        clone_elements ele
+      else
+        ele
+      end
+    }
+    return elements
+  end
+
+  def set_elements elements
+    @elements = elements
+  end
+
+  #=== Expression#ã»ã«çµåã®å¼ãè§£æãã
+  # Cell.eEntry  => [ :OP_DOT, [ :IDENTIFIER, token ], token ]
+  # Cell.eEntry[expression] => [ :OP_SUBSC, [ :OP_DOT, [ :IDENTIFIER, token ], token ], expression ]
+  # Return: [ NamespacePath(cell_name), Integer(subscript) or nil, Token(port_name)]
+  def analyze_cell_join_expression
+    # å³è¾ºã® Expression ã®è¦ç´ ãåãåºã
+    elements = @elements
+    if elements[0] == :OP_SUBSC then  # å³è¾ºï¼åãå£é
+åï¼
+      # elements = [ :OP_SUBSC, [ :OP_DOT, [ :IDENTIFIER, token ], token ], expression ]
+      subscript = elements[2].eval_const(nil)  # åãå£é
+åã®æ·»æ°
+      elements  = elements[1]          # mikan é
+åã ã£ãå ´å
+    else
+      subscript = nil
+    end
+
+    # elements = [ :OP_DOT, [ :IDENTIFIER, token ], token ]
+    if elements[0] != :OP_DOT || elements[1][0] != :IDENTIFIER then   #1
+      return nil
+    end
+
+    nsp = elements[1][1]         # NamespacePath
+    port_name = elements[2].val
+
+    return [ nsp, subscript, port_name]
+  end
+
+  #=== Expression# ã»ã«ã¸ã®çµåã®å¼ãçæãã
+  #nsp:: NamespacePath
+  #subscript:: Integer
+  #port_name:: Symbol
+  # analyze_cell_join_expression ã¨å¯¾ã«ãªã£ã¦ãã
+  def self.create_cell_join_expression( nsp, subscript, port_name, locale = nil )
+    if ! port_name.instance_of?( Symbol ) then
+      raise "port_name: not Symbol"
+    end
+
+    if subscript then
+      elements = [ :OP_SUBSC, [ :OP_DOT, [ :IDENTIFIER, nsp ],
+                                Token.new( port_name, nil, nil, nil ) ],
+                   Expression.create_integer_constant( subscript, @locale ) ]
+    else
+      elements = [ :OP_DOT, [ :IDENTIFIER, nsp ], Token.new( port_name, nil, nil, nil ) ]
+    end
+    return Expression.new( elements, locale )
+  end
+
+  #=== Expression#æ´æ°å®æ°ã®å¼ãçæãã
+  #val:: Integer : å¤ï¼ æ´æ°
+  def self.create_integer_constant( val, locale = nil )
+    if val != Integer( val ) || val < 0 then
+      raise "create_integer_constant: not integer or negative: #{val}"
+    end
+    Expression.new( [ :INTEGER_CONSTANT, Token.new( val, nil, nil, nil ) ], locale )
+  end
+
+  #=== Expression#åä¸ã®è­å¥å­ã®å¼ãè§£æãã
+  # Identifier  => [ :IDENTIFIER, token ]
+  # Return: NamespacePath(Identifier)
+  def analyze_single_identifier
+    # å³è¾ºã® Expression ã®è¦ç´ ãåãåºã
+    elements = @elements
+    if elements[0] == :IDENTIFIER
+      return elements[1]
+    else
+      return nil
+    end
+  end
+
+  #=== Expression#
+  #nsp:: NamespacePath :  åç
+§ãããã®è­å¥å­
+  def self.create_single_identifier( nsp, locale )
+    if ! nsp.instance_of?( NamespacePath ) then
+      raise "create_single_identifier: not NamespacePath: #{nsp.to_s}"
+    end
+    Expression.new( [ :IDENTIFIER, nsp ] )
+  end
+
+  #=== è©ä¾¡å¯è½ããã§ãã¯ãã
+  #*v:: å¯å¤åå¼æ°ï¼ä»»æã®åï¼
+  # ãã¹ã¦ã BaseVal ã®å­ã¯ã©ã¹ï¼å¤ï¼ã§ããã°ãè©ä¾¡å¯è½ã¨å¤æ­ãã
+  def evaluable?( *v )
+    v.each{ |val|
+      if ! val.kind_of?( BaseVal ) then
+        return false
+      end
+    }
+    return true
+  end
+
+  private :elements_to_s, :elements_eval_const,  :elements_get_type
+
+end
+
+
+class C_EXP < Node
+# @c_exp_string : string
+
+  #c_exp_string::String
+  #b_renew::Bool  : true ãªã C_EXP ã® clone ä½æï¼ã¨ã¹ã±ã¼ãå¦çç­ãããªãï¼
+  def initialize( c_exp_string, b_renew = false )
+    if b_renew then
+      @c_exp_string = c_exp_string
+    else
+      # åå¾ã® " ãåãé¤ã
+      # str = c_exp_string.to_s.sub( /^\"(.*)\"$/, "\\1" )
+      str = CDLString.remove_dquote c_exp_string.to_s
+      @c_exp_string = CDLString.escape str
+    end
+  end
+
+  #=== composite ç¨ã« C_EXP ã clone ãã
+  #ct_name::
+  #cell_name::
+  # composite ã® attribute ã«ç¾ãã C_EXP ãæå­åç½®æãã¦çæããªããï¼
+  # ãã®æå­åç½®æã¯ãæå³è§£éæ®µéã§è¡ãï¼
+  # ä»ã® C_EXP ã®æå­åç½®æã¯ãã³ã¼ãçææ®µéã§è¡ãï¼
+  def clone_for_composite( ct_name, cell_name, locale )
+    dbgPrint "C_EXP: #{ct_name} #{cell_name} #{@c_exp_string}\n"
+
+    @locale = locale
+    str = @c_exp_string.gsub( /(^|[^\$])\$ct\$/, "\\1#{ct_name}" )
+    str = str.          gsub( /(^|[^\$])\$cell\$/, "\\1#{cell_name}" )
+    str = str.          gsub( /(^|[^\$])\$id\$/, "\\1#{ct_name}_#{cell_name}" )
+    return C_EXP.new( str, true )
+  end
+
+  def get_c_exp_string
+    @c_exp_string
+  end
+
+  #=== C_EXP ãè©ä¾¡ãã
+  # C_EXP ã®å¼ãæ°æå­åãè¿ã
+  # æ¬æ¥ C_EXP ã¯ eval_const ããå¯¾è±¡ã§ã¯ãªãããä¾¿å®ä¸ eval_const ã§å¯¾å¿
+  def eval_const( name_list, name_list2 = nil )
+     return self
+  end
+  def eval_const2( name_list, name_list2 = nil, nest = nil )
+     return self
+  end
+
+  def to_s
+    @c_exp_string
+  end
+
+  def to_CDL_str
+    return "C_EXP( \"#{to_s}\" )"
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "C_EXP: #{@c_exp_string}"
+  end
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/gen_xml.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/gen_xml.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/gen_xml.rb	(revision 270)
@@ -0,0 +1,394 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: gen_xml.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+XML_INDENT = "    "
+
+class Namespace
+  def self.gen_XML root_namespace
+    begin
+      file_name = $gen_base + "/" + $target + ".xml"
+      dbgPrint "generating XML file:#{file_name}\n"
+      file = AppFile.open( file_name )
+
+      file.print <<EOT
+<?xml version="1.0" encoding="UTF-8"?>
+<GUI_Tool xmlns="http://www.toppers.jp/tecs.html">
+EOT
+      root_namespace.gen_XML file, 1
+
+      file.print <<EOT
+</GUI_Tool>
+EOT
+
+      file.close
+    rescue => evar
+      Generator.error( "T2001 fail to create XML file $1", file_name)
+      print_exception( evar )
+    end
+  end
+
+  def gen_XML( file, nest )
+    # signature ã®ã³ã¼ããçæ
+    @signature_list.each { |s|
+      s.gen_XML file, nest
+    }
+
+    # celltype ã®ã³ã¼ããçæ
+    @celltype_list.each { |t|
+      t.gen_XML( file, nest )
+    }
+
+    # composite ã®ã³ã¼ããçæ
+    @compositecelltype_list.each { |t|
+      t.gen_XML( file, nest )
+    }
+
+    # cell ã®ã³ã¼ããçæ
+    @cell_list.each { |t|
+      t.gen_XML( file, nest )
+    }
+
+    # ãµããã¼ã ã¹ãã¼ã¹ã®ã³ã¼ããçæ
+    @namespace_list.each { |n|
+      kind = n.instance_of?( Namespace ) ? "namespace" : "region"
+      file.print <<EOT
+#{XML_INDENT * nest}<#{kind}>
+#{XML_INDENT * (nest+1)}<name> #{n.get_name} </name>
+EOT
+      n.gen_XML( file, nest + 1 )
+      file.print <<EOT
+#{XML_INDENT * nest}</#{kind}>
+EOT
+    }
+  end
+end
+
+class Signature
+  def gen_XML file, nest
+    indent = XML_INDENT * nest
+    if is_imported? then
+      file.print <<EOT
+#{indent}<import path='#{@import.get_cdl_name}'>
+EOT
+      nest += 1
+      indent = XML_INDENT * nest
+    end
+
+    file.print <<EOT
+#{indent}<signature>
+#{indent}#{XML_INDENT}<name> #{@name} </name>
+EOT
+    @function_head_list.get_items.each{ |fh|
+      file.print <<EOT
+#{indent}#{XML_INDENT}<func>
+#{indent}#{XML_INDENT}#{XML_INDENT}<name> #{fh.get_name} </name>
+#{indent}#{XML_INDENT}#{XML_INDENT}<rettype> #{fh.get_return_type.get_type_str}#{fh.get_return_type.get_type_str_post} </rettype>
+EOT
+      fh.get_paramlist.get_items.each{ |pd|
+        file.print <<EOT
+#{indent}#{XML_INDENT}#{XML_INDENT}<param>
+#{indent}#{XML_INDENT}#{XML_INDENT}#{XML_INDENT}<name> #{pd.get_name} </name>
+#{indent}#{XML_INDENT}#{XML_INDENT}#{XML_INDENT}<type> #{pd.get_type.get_type_str}#{pd.get_type.get_type_str_post} </type>
+#{indent}#{XML_INDENT}#{XML_INDENT}</param>
+EOT
+      }
+      file.print <<EOT
+#{indent}#{XML_INDENT}</func>
+EOT
+    }
+    file.print <<EOT
+#{indent}</signature>
+EOT
+    if is_imported? then
+      nest -= 1
+      indent = XML_INDENT * nest
+      file.print <<EOT
+#{indent}</import>
+EOT
+    end
+  end
+end
+
+class Celltype
+  def gen_XML file, nest
+    indent = XML_INDENT * nest
+    if is_imported? then
+      file.print <<EOT
+#{indent}<import path='#{@import.get_cdl_name}'>
+EOT
+      nest += 1
+      indent = XML_INDENT * nest
+    end
+
+    file.print <<EOT
+#{indent}<celltype>
+#{indent}#{XML_INDENT}<name> #{@name} </name>
+EOT
+    if @active then
+      file.print <<EOT
+#{indent}#{XML_INDENT}<active />
+EOT
+    end
+    if @singleton then
+      file.print <<EOT
+#{indent}#{XML_INDENT}<singleton />
+EOT
+    end
+
+    @attribute.each{ |attr|
+      file.print <<EOT
+#{indent}#{XML_INDENT}<attr>
+#{indent}#{XML_INDENT}#{XML_INDENT}<name> #{attr.get_name} </name>
+#{indent}#{XML_INDENT}#{XML_INDENT}<type> #{attr.get_type.get_type_str}#{attr.get_type.get_type_str_post} </type>
+EOT
+      if attr.get_initializer then
+        file.print <<EOT
+#{indent}#{XML_INDENT}#{XML_INDENT}<initializer> #{attr.get_initializer.to_CDL_str} </initializer>
+EOT
+      end
+
+      if attr.get_choice_list then
+        file.print <<EOT
+#{indent}#{XML_INDENT}#{XML_INDENT}<choice>
+EOT
+
+        attr.get_choice_list.each { |choiceElement|
+          file.print <<EOT
+#{indent}#{XML_INDENT}#{XML_INDENT}#{XML_INDENT}<choiceElement>#{choiceElement}</choiceElement>
+EOT
+        }
+
+        file.print <<EOT
+#{indent}#{XML_INDENT}#{XML_INDENT}</choice>
+EOT
+      end
+
+      file.print <<EOT
+#{indent}#{XML_INDENT}</attr>
+EOT
+    }
+    @port.each{ |port|
+      port_type = port.get_port_type == :CALL ? "call" : "entry"
+      file.print <<EOT
+#{indent}#{XML_INDENT}<#{port_type}>
+#{indent}#{XML_INDENT}#{XML_INDENT}<name> #{port.get_name} </name>
+#{indent}#{XML_INDENT}#{XML_INDENT}<signame> #{port.get_signature.get_name} </signame>
+EOT
+      if port.get_array_size then
+        file.print <<EOT
+#{indent}#{XML_INDENT}#{XML_INDENT}<subscript> #{port.get_array_size} </subscript>
+EOT
+      end
+      file.print <<EOT
+#{indent}#{XML_INDENT}</#{port_type}>
+EOT
+    }
+    file.print <<EOT
+#{indent}</celltype>
+EOT
+    if is_imported? then
+      nest -= 1
+      indent = XML_INDENT * nest
+      file.print <<EOT
+#{indent}</import>
+EOT
+    end
+  end
+
+end
+
+#
+# Celltype ã¨å
+±ç¨å¯è½ãªã¯ãã ããä»¥ä¸ã®ç¹ã®å¤æ´ãå¿
+è¦
+#  @active â @b_active
+#  @singleton â @b_singleton
+#  @attribute â @name_list (Decl)
+#  @port â @name_list (Port)
+class CompositeCelltype
+  def gen_XML file, nest
+    indent = XML_INDENT * nest
+    if is_imported? then
+      file.print <<EOT
+#{indent}<import path='#{@import.get_cdl_name}'>
+EOT
+      nest += 1
+      indent = XML_INDENT * nest
+    end
+
+    file.print <<EOT
+#{indent}<celltype>
+#{indent}#{XML_INDENT}<name> #{@name} </name>
+EOT
+    file.print <<EOT
+#{indent}#{XML_INDENT}<composite />
+EOT
+
+    if @b_active then
+      file.print <<EOT
+#{indent}#{XML_INDENT}<active />
+EOT
+    end
+    if @b_singleton then
+      file.print <<EOT
+#{indent}#{XML_INDENT}<singleton />
+EOT
+    end
+
+    @name_list.get_items.each{ |attr|
+      if ! attr.instance_of? Decl then
+        next
+      end
+      file.print <<EOT
+#{indent}#{XML_INDENT}<attr>
+#{indent}#{XML_INDENT}#{XML_INDENT}<name> #{attr.get_name} </name>
+#{indent}#{XML_INDENT}#{XML_INDENT}<type> #{attr.get_type.get_type_str}#{attr.get_type.get_type_str_post} </type>
+EOT
+      if attr.get_initializer then
+        file.print <<EOT
+#{indent}#{XML_INDENT}#{XML_INDENT}<initializer> #{attr.get_initializer.to_CDL_str} </initializer>
+EOT
+      end
+      file.print <<EOT
+#{indent}#{XML_INDENT}</attr>
+EOT
+    }
+    @name_list.get_items.each{ |port|
+      if ! port.instance_of? Port then
+        next
+      end
+      port_type = port.get_port_type == :CALL ? "call" : "entry"
+      file.print <<EOT
+#{indent}#{XML_INDENT}<#{port_type}>
+#{indent}#{XML_INDENT}#{XML_INDENT}<name> #{port.get_name} </name>
+#{indent}#{XML_INDENT}#{XML_INDENT}<signame> #{port.get_signature.get_name} </signame>
+EOT
+      if port.get_array_size then
+        file.print <<EOT
+#{indent}#{XML_INDENT}#{XML_INDENT}<subscript> #{port.get_array_size} </subscript>
+EOT
+      end
+      file.print <<EOT
+#{indent}#{XML_INDENT}</#{port_type}>
+EOT
+    }
+    file.print <<EOT
+#{indent}</celltype>
+EOT
+    if is_imported? then
+      nest -= 1
+      indent = XML_INDENT * nest
+      file.print <<EOT
+#{indent}</import>
+EOT
+    end
+  end
+
+end
+
+class Cell
+  def gen_XML file, nest
+    indent = XML_INDENT * nest
+
+    if is_imported? then
+      file.print <<EOT
+#{indent}<import path='#{@import.get_cdl_name}'>
+EOT
+      nest += 1
+      indent = XML_INDENT * nest
+    end
+
+    file.print <<EOT
+#{indent}<cell>
+#{indent}#{XML_INDENT}<name> #{@name} </name>
+EOT
+    @join_list.get_items.each{ |join|
+      if join.get_definition.kind_of? Port then
+        kind = "call_join"
+      elsif join.get_definition.kind_of? Decl then
+        kind = "attr_join"
+      else
+        raise "Unknown"
+      end
+      if join.get_array_member2 then
+        join.get_array_member2.each { |j2|
+          file.print <<EOT
+#{indent}#{XML_INDENT}<#{kind}>
+#{indent}#{XML_INDENT}#{XML_INDENT}<name> #{join.get_name} </name>
+#{indent}#{XML_INDENT}#{XML_INDENT}<subscript> #{join.get_subscript} </subscript>
+#{indent}#{XML_INDENT}#{XML_INDENT}<rhs> #{join.get_rhs.to_CDL_str} </rhs>
+#{indent}#{XML_INDENT}</#{kind}>
+EOT
+        }
+      else
+        file.print <<EOT
+#{indent}#{XML_INDENT}<#{kind}>
+#{indent}#{XML_INDENT}#{XML_INDENT}<name> #{join.get_name} </name>
+#{indent}#{XML_INDENT}#{XML_INDENT}<rhs> #{join.get_rhs.to_CDL_str} </rhs>
+#{indent}#{XML_INDENT}</#{kind}>
+EOT
+      end
+    }
+    file.print <<EOT
+#{indent}</cell>
+EOT
+    if is_imported? then
+      nest -= 1
+      indent = XML_INDENT * nest
+      file.print <<EOT
+#{indent}</import>
+EOT
+    end
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/generate.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/generate.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/generate.rb	(revision 270)
@@ -0,0 +1,4733 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2016 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: generate.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+def ifdef_macro_only f
+  f.print <<EOT
+#ifndef TOPPERS_MACRO_ONLY
+
+EOT
+end
+
+def ifndef_macro_only f
+  f.print <<EOT
+#ifndef TOPPERS_MACRO_ONLY
+
+EOT
+end
+
+def endif_macro_only f
+  f.print <<EOT
+#endif /* TOPPERS_MACRO_ONLY */
+
+EOT
+end
+
+def ifndef_cb_type_only f
+  f.print <<EOT
+#ifndef TOPPERS_CB_TYPE_ONLY
+
+EOT
+end
+
+def ifdef_cb_type_only f
+  f.print <<EOT
+#ifdef TOPPERS_CB_TYPE_ONLY
+
+EOT
+end
+
+def endif_cb_type_only f
+  f.print <<EOT
+#endif /* TOPPERS_CB_TYPE_ONLY */
+
+EOT
+end
+
+def begin_extern_C f
+  f.print  <<EOT
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+EOT
+end
+
+def end_extern_C f
+  f.print  <<EOT
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+EOT
+end
+
+def print_note( f, b_complete = true )
+  if b_complete
+    f.print "/*\n"
+  else
+    f.print " *\n"
+  end
+  f.print TECSMsg.get( :note )
+  if b_complete
+    f.print " */\n"
+  else
+    f.print " *\n"
+  end
+end
+
+def print_Makefile_note f
+  f.print TECSMsg.get( :Makefile_note )
+end
+
+
+def print_indent( f, n )
+  f.print "    " * n
+end
+
+# celltype_private.h ãçæ
+
+class Namespace
+  def generate
+
+    begin
+      # root namespace ãªãã° makefile ãåºåãã(å
+¨ã»ã«ã¿ã¤ãã«é¢ãããã®ã ã)
+      # å
+ã«åºåãã
+      if @name == "::" then
+
+        gen_makefile_template
+        gen_makefile_tecsgen
+        if $generating_region.get_n_cells == 0 then
+          dbgPrint "only makefile_template #{@name}\n"
+          return
+        end
+      end
+
+      dbgPrint "generating region: #{$generating_region.get_name} namespace=#{@name} gen_dir=#{$gen}\n"
+      # global_tecsgen.h (typedef, struct, const) ã®çæ
+      gen_global_header
+
+      # signature ã®ã³ã¼ããçæ
+      @signature_list.each { |s|
+        s.generate
+      }
+
+      # celltype ã®ã³ã¼ããçæ
+      @celltype_list.each { |t|
+        t.generate
+      }
+
+      # ãµããã¼ã ã¹ãã¼ã¹ã®ã³ã¼ããçæ
+      @namespace_list.each { |n|
+        n.generate
+      }
+
+    rescue => evar
+      # ããã¹ã¿ãã¯ãã¬ã¼ã¹ãåºãã¾ã§ãæéãããããããªãã°ãæ¬¡ãã³ã¡ã³ãã¢ã¦ããã¦ã¿ãã¹ã
+      cdl_error( "H1001 tecsgen: fatal internal error during code generation"  )
+      print_exception( evar )
+    end
+  end
+
+  def generate_post
+
+    if $generating_region.get_n_cells == 0 then
+      return
+    end
+
+    begin
+      # global_tecsgen.h (typedef, struct, const) ã®çµããã®ã¬ã¼ãã³ã¼ãçæ
+      gen_global_header_post
+
+      # signature ã®ã³ã¼ããçæ
+      @signature_list.each { |s|
+        s.generate_post
+      }
+
+      # celltype ã®ã³ã¼ããçæ
+      @celltype_list.each { |t|
+        t.generate_post
+      }
+
+      # ãµããã¼ã ã¹ãã¼ã¹ã®ã³ã¼ããçæ
+      @namespace_list.each { |n|
+        n.generate_post
+      }
+
+    rescue => evar
+      cdl_error( "H1002 tecsgen: fatal internal error during post code generation"  )
+      print_exception( evar )
+    end
+  end
+
+###  
+  def gen_global_header
+
+    # global_tecs.h ã®çæ
+    f = AppFile.open( "#{$gen}/global_tecsgen.#{$h_suffix}" )
+
+    if @name == "::" then
+      print_note f
+
+      # ã¬ã¼ãã³ã¼ããåºå
+      f.print <<EOT
+#ifndef GLOBAL_TECSGEN_H
+#define GLOBAL_TECSGEN_H
+
+EOT
+
+      # import_C ã§æå®ãããããããã¡ã¤ã«ã® #include ãåºå
+      if Import_C.get_header_list2.length > 0 then
+        # ããã include ã®åºå
+        f.printf TECSMsg.get( :IMP_comment ), "#_IMP_#"
+        Import_C.get_header_list2.each{ |h|
+          f.printf( "#include \"#{h}\"\n" )
+        }
+        f.printf( "/**/\n\n" )
+      end
+
+      ifndef_macro_only f
+    end
+
+    # typedef, struct, enum ãçæ
+    @decl_list.each { |d|
+
+      # d ã¯ Typedef, StructType, EnumType ã®ãããã
+      if d.instance_of?( Typedef ) then
+
+        # Typedef ã®å ´åãdeclarator ã® @type ããCType ã§ãªãã
+        if ! d.get_declarator.get_type.kind_of?( CType ) then
+          d.gen_gh f
+        end
+      elsif ! d.kind_of?( CType ) then
+
+        # CType ã§ã¯ãªã (StructType ã¾ãã¯ EnumType)
+        d.gen_gh f
+#     else
+#       ããã«è©²å½ããã®ã¯ CStructType, CEnumType
+      end
+    }
+
+    if @name == "::" then
+
+      if $ram_initializer then
+        # Proc to judge the necessity of CB initializer
+        b_inline_only_or_proc = Proc.new{ |ct|
+          # print ct.get_name, ": ",  ct.need_CB_initializer?, "\n"
+          ct.need_CB_initializer?
+        }
+        gen_celltype_names( f, "extern void ", "_CB_initialize();\n", true, b_inline_only_or_proc )
+        gen_celltype_names( f, "extern void ", "_CB_initialize();\n", false, b_inline_only_or_proc )
+        f.print "\n#define INITIALIZE_TECS() \\\n"
+        gen_celltype_names( f, "\t", "_CB_initialize();\\\n", true, b_inline_only_or_proc )
+        gen_celltype_names( f, "\t", "_CB_initialize();\\\n", false, b_inline_only_or_proc )
+        f.print( "/* INITIALIZE_TECS terminator */\n\n" )
+      else
+        f.print "\n#define INITIALIZE_TECS() \n"
+      end
+      f.print "#define INITIALZE_TECSGEN() INITIALIZE_TECS()  /* for backward compatibility */\n\n"
+
+      f.print( "/* Descriptor for dynamic join */\n" )
+      f.print( "#define Descriptor( signature_global_name )  DynDesc__ ## signature_global_name\n\n" )
+      endif_macro_only f
+    end
+
+    # const ãçæ  mikan
+    @const_decl_list.each { |d|
+      f.printf( "#define %-14s ((%s%s)%s)\n", d.get_global_name,
+                d.get_type.get_type_str, d.get_type.get_type_str_post,
+                d.get_initializer.eval_const2(nil) )
+    }
+
+    f.close
+
+  end
+
+  def gen_global_header_post
+
+    # global_tecs.h ãéã
+    f = AppFile.open( "#{$gen}/global_tecsgen.#{$h_suffix}" )
+
+    if @name == "::" then
+      f.print <<EOT
+
+#endif /* GLOBAL_TECSGEN_H */
+EOT
+    end
+
+    f.close
+
+  end
+
+  #=== Makefile.tecsgen, Makefile.templ ã®åºå
+  # å
+¨ã»ã«ã¿ã¤ãåãåºåããé¨åãåºå
+  #    ï¼æ¬ã¡ã½ããã¯ root namespace ã«å¯¾ãã¦å¼åºãï¼
+  #     åã
+ã®ã»ã«ã¿ã¤ãã®ã¡ã¼ã¯ã«ã¼ã«ã¯ Celltype ã¯ã©ã¹ã§åºå
+  def gen_makefile
+    gen_makefile_template
+    gen_makefile_tecsgen
+  end
+
+  def gen_makefile_template
+
+    return if $generate_no_template
+
+    ### Makefile.templ ã®çæ
+    f = AppFile.open( "#{$gen}/Makefile.templ" )
+
+    print_Makefile_note f
+
+    # Makefile ã®å¤æ°ã®åºå
+    f.printf TECSMsg.get( :MVAR_comment ), "#_MVAR_#"
+    f.printf "# fixed variable (unchangeable by config or plugin)\n"
+
+    # TARGET ã®åºå (ç¬¬ä¸å¼æ° $target ã« region åããã³ .exe ãä»å )
+    target = $target
+    if $generating_region != @@root_namespace then
+      # å­ region ã®ãªã³ã¯ã¿ã¼ã²ããã®å ´å
+      target += "-#{$generating_region.get_global_name}"
+    end
+    f.print "TARGET_BASE = #{target}\n"
+
+    if $generating_region == @@root_namespace then
+      f.print "BASE_DIR = .\n"
+      vpath_lead = ""
+    else
+      f.print "BASE_DIR = ..\n"
+      vpath_lead = "../"
+    end
+
+    f.print "GEN_DIR = $(BASE_DIR)/#{$gen}\n"
+
+    f.print "INCLUDES ="
+    search_path = $import_path + TECSGEN::Makefile.get_search_path
+    search_path.each{ |path|
+      if TECSGEN.is_absolute_path? path then
+        f.print( TECSGEN.subst_tecspath " -I #{path}" )
+      else
+        f.print " -I $(BASE_DIR)/#{path}"
+      end
+    }
+    f.print " -I $(GEN_DIR)\n"
+    f.print "DEFINES ="
+    $define.each{ |define| f.print " -D #{define}" }
+    f.print "\n\n"
+    f.printf "# end of fixed variable (unchangeable by config or plugin)\n"
+
+
+    vpath_add = ""
+    search_path.each{ |path|
+      if path != "." then
+        if TECSGEN.is_absolute_path? path then
+          vpath_add += " " + TECSGEN.subst_tecspath( path )
+        else
+          vpath_add += " " + vpath_lead + path
+        end
+      end
+    }
+    objs_add = ""
+    TECSGEN::Makefile.get_objs.each{ |obj| objs_add += " " + obj }
+    ld_flag_add = TECSGEN::Makefile.get_ldflags
+    var_add = ""
+    TECSGEN::Makefile.get_vars.each{ |var|
+      var_add += "#" + TECSGEN::Makefile.get_var_comment( var ) + "\n"
+      a = TECSGEN::Makefile.get_var_val( var ).to_s
+      b = var.to_s
+      c = var_add.to_s
+      var_add += var.to_s + " =" + " " + TECSGEN::Makefile.get_var_val( var ).to_s + "\n\n"
+    }
+    pre_tecsgen_target = ""
+    TECSGEN::Makefile.get_pre_tecsgen_target{ |target| pre_tecsgen_target += " " + target }
+    post_tecsgen_target = ""
+    TECSGEN::Makefile.get_post_tecsgen_target{ |target| post_tecsgen_target += " " + target }
+
+#
+# LD = gcc
+# LDFLAGS =#{ld_flag_add}
+# SRC_DIR = $(BASE_DIR)/src
+# _TECS_OBJ_DIR = $(GEN_DIR)/
+# #   _TECS_OBJ_DIR   # should end with '/'
+
+    f.print <<EOT
+#{var_add}
+
+# Pre-tecsgen target
+PRE_TECSGEN_TARGET =#{pre_tecsgen_target}
+
+# Post-tecsgen target
+POST_TECSGEN_TARGET =#{post_tecsgen_target}
+
+# vpath for C sources and headers
+vpath %.#{$c_suffix} $(SRC_DIR) $(GEN_DIR) #{vpath_add}
+vpath %.#{$h_suffix} $(SRC_DIR) $(GEN_DIR) #{vpath_add}
+
+# Other objects (out of tecsgen)
+OTHER_OBJS =#{objs_add}                      # Add objects out of tecs care.
+# OTHER_OBJS = $(_TECS_OBJ_DIR)vasyslog.o
+EOT
+
+    # make ã«ã¼ã«ã®åºå
+    f.printf( TECSMsg.get( :MRUL_comment), "#_MRUL_#" )
+
+    f.print <<EOT
+allall: tecs
+\tmake all     # in order to include generated Makefile.tecsgen & Makefile.depend
+
+EOT
+
+    if $generating_region.get_n_cells != 0 then
+      all_target = "$(TARGET)"
+    else
+      all_target = ""
+    end
+
+    if $generating_region == @@root_namespace then
+      if Region.get_link_roots.length > 1 then
+        all_target += " sub_regions"
+      end
+      timestamp = " $(TIMESTAMP)"
+    else
+      timestamp = ""
+    end
+
+    f.print "all : #{all_target}\n\n"
+    f.printf TECSMsg.get( :MDEP_comment ), "#_MDEP_#"
+    f.print "-include $(GEN_DIR)/Makefile.tecsgen\n"
+    if $generating_region.get_n_cells != 0 then
+      # Makefile.depend ã® include
+      f.print "-include $(GEN_DIR)/Makefile.depend\n\n"
+
+      f.print "$(TARGET) :#{timestamp} $(CELLTYPE_COBJS) $(TECSGEN_COBJS) $(PLUGIN_COBJS) $(OTHER_OBJS)\n"
+      f.print "	$(LD) -o $(TARGET) $(TECSGEN_COBJS) $(CELLTYPE_COBJS) $(PLUGIN_COBJS) $(OTHER_OBJS) $(LDFLAGS)\n\n"
+    end
+
+    if Region.get_link_roots.length > 1 && $generating_region == @@root_namespace then
+      f.print "\nsub_regions:$(TIMESTAMP)\n"
+      Region.get_link_roots.each {|region|
+        if region.get_global_name != "" then  # Root region: ãã® Makefile èªèº«
+          f.print "\tcd #{region.get_global_name}; make all\n"
+        end
+      }
+      f.print "\n"
+    end
+
+    # clean: ã¿ã¼ã²ãã
+    f.print "clean :\n"
+    if $generating_region == @@root_namespace then
+      Region.get_link_roots.each {|region|
+        if region.get_global_name != "" then  # Root region: ãã® Makefile èªèº«
+          f.print "\tcd #{region.get_global_name}; make clean\n"
+        end
+      }
+    end
+	f.print "	rm -f $(CELLTYPE_COBJS) $(TECSGEN_COBJS) $(PLUGIN_COBJS) $(OTHER_OBJS) $(TARGET) #{timestamp}\n"
+    if $generating_region == @@root_namespace then
+      f.print "	rm -rf $(GEN_DIR)\n"
+    end
+    f.print "\n"
+
+    # tecs: ã¿ã¼ã²ãã
+    if $generating_region == @@root_namespace then
+      f.print "tecs : $(PRE_TECSGEN_TARGET) $(TIMESTAMP) $(POST_TECSGEN_TARGET)\n\n"
+      f.print "$(TIMESTAMP) : $(TECS_IMPORTS)\n"
+      f.print "	$(TECSGEN) #{TECSGEN.subst_tecspath( $arguments, true )}\n"
+      # f.print "	touch $(TIMESTAMP)\n\n"
+
+    else
+      f.print "tecs:\n"
+      f.print "\t@echo \"run 'make tecs' in root region\"\n\n"
+    end
+
+    f.print "# generic target for objs\n"
+    f.print "$(_TECS_OBJ_DIR)%.o : %.#{$c_suffix}\n"
+    f.print "	$(CC) -c $(CFLAGS) -o $@ $<\n\n"
+
+    lines = TECSGEN::Makefile.get_lines
+    if lines.length > 0 then
+      f.print( "# additional lines\n" )
+      lines.each{ |line|
+        f.print  line, "\n"
+      }
+      f.print( "# end additional lines\n\n" )
+    end
+
+    f.close
+  end
+
+  def gen_makefile_tecsgen
+    ### Makefile.tecsgen ã®çæ
+    f = AppFile.open( "#{$gen}/Makefile.tecsgen" )
+
+    f.print( "TECS_IMPORT_CDLS =" )
+    Import.get_list.each{ |cdl_expand_path, import|
+      path = import.get_cdl_path
+      if TECSGEN.is_absolute_path? path then
+        path = TECSGEN.subst_tecspath path
+      end
+      f.print " "
+      f.print( path )
+    }
+    f.print( "\n" )
+    f.print( "TECS_IMPORT_HEADERS =" )
+    Import_C.get_header_list.each{ |header,path|
+      if TECSGEN.is_absolute_path? path then
+        path = TECSGEN.subst_tecspath path
+      end
+      f.print " "
+      f.print path
+    }
+    f.print "\n"
+    f.print "TECS_IMPORTS = $(TECS_IMPORT_CDLS) $(TECS_IMPORT_HEADERS)\n\n"
+
+    f.print "SIGNATURE_HEADERS = \\\n"
+    if $generating_region.get_n_cells != 0 then
+      @signature_list.each{ |s|
+        f.print "\t$(GEN_DIR)/#{s.get_global_name}_tecsgen.#{$h_suffix} \\\n"
+      }
+    end
+    f.print "# SIGNATURE_HEADERS terminator\n\n"
+
+    b_inline_only_or_proc = Proc.new { |ct|  true    }
+    f.print "CELLTYPE_TECSGEN_HEADERS = \\\n"
+    gen_celltype_names( f, "\t$(GEN_DIR)/", "_tecsgen.h \\\n", true, b_inline_only_or_proc )
+    gen_celltype_names( f, "\t$(GEN_DIR)/", "_tecsgen.h \\\n", false, b_inline_only_or_proc )
+    f.print "# CELLTYPE_TECSGEN_HEADERS terminator\n\n"
+    f.print "CELLTYPE_FACTORY_HEADERS = \\\n"
+    gen_celltype_names( f, "\t$(GEN_DIR)/", "_factory.h \\\n", true, b_inline_only_or_proc )
+    gen_celltype_names( f, "\t$(GEN_DIR)/", "_factory.h \\\n", false, b_inline_only_or_proc )
+    f.print "# CELLTYPE_FACTORY_HEADERS terminator\n\n"
+    f.print "# TECS_HEADERS:  headers generated by tecsgen\n"
+    f.print "TECS_HEADERS = $(SIGNATURE_HEADERS) $(CELLTYPE_TECSGEN_HEADERS) $(CELLTYPE_FACTORY_HEADERS)\n\n"
+    b_inline_only_or_proc = true
+    f.print "TECS_INLINE_HEADERS = \\\n"
+    gen_celltype_names( f, "\t", "_tecsgen.h \\\n", false, b_inline_only_or_proc )
+    f.print "# TECS_INLINE_HEADERS terminator\n\n"
+    f.print "PLUGIN_INLINE_HEADERS = \\\n"
+    gen_celltype_names( f, "\t", "_tecsgen.h \\\n", true, b_inline_only_or_proc )
+    f.print "# PLUGIN_INLINE_HEADERS terminator\n\n"
+
+    ### set domain variables ###
+    domain_type = nil
+    domain_regions = nil
+    DomainType.get_domain_regions.each{ |dt, regions|
+      # domain_type ã¯ä¸ã¤ã®ãã¼ãã«ã¯ãä¸ã¤ãããªãã®ã§ããã®ã«ã¼ãã¯ãå¿
+ãä¸åããåããªã
+      domain_regions = regions
+      domain_type = dt
+    }
+    if domain_regions == nil then
+      # in case no 'domain' specified at region
+      domain_regions = [ Region.get_root ]
+    end
+
+    hasDomainProc = Proc.new{
+      if domain_regions.length > 1 || domain_regions[0] != Region.get_root then
+        true
+      else
+        false
+      end
+    }
+    decideDomainNameProc = Proc.new { |region|
+      if region.is_root? then
+        if hasDomainProc.call then
+          dn = "_Root_"
+        else
+          dn = ""
+        end
+      else
+        dn = "_#{region.get_namespace_path.get_global_name}"
+      end
+    }
+
+    f.print( "# TECS_COBJS: all objects of TECS, include both user written code and tecsgen automatically generated code\n" )
+    f.print( "TECS_COBJS = $(TECSGEN_COBJS) $(PLUGIN_COBJS) $(CELLTYPE_COBJS)\n\n" )
+
+    ### in case domain is used ###
+    if hasDomainProc.call then
+
+      f.print( "# TECS_DOMAINS: list of domain names (names of 'domain' spacified region)\n" )
+      f.print( "TECS_DOMAINS = " )
+      domain_regions.each{ |r|
+        if r.get_domain_type.get_option != "OutOfDomain" then
+          f.print( " #{r.get_namespace_path.get_global_name}" )
+        end
+      }
+      f.print( "\n\n" )
+
+      f.print( "# TECS_COBJS: objects from sources which are automatically generated by tecsgen\n" )
+      f.print( "TECSGEN_COBJS = \\\n" )
+      domain_regions.each{ |r|
+        f.print( "	$(TECSGEN#{decideDomainNameProc.call r}_COBJS) \\\n" )
+      }
+      f.print( "# TECSGEN_COBJS terminator\n\n" )
+
+      f.print( "# PLUGIN_COBJS: objects from sources which are automatically generated by plugin(s)\n" )
+      f.print( "PLUGIN_COBJS = \\\n" )
+      domain_regions.each{ |r|
+        f.print( "	$(PLUGIN#{decideDomainNameProc.call r}_COBJS) \\\n" )
+      }
+      f.print( "# PLUGIN_COBJS terminator\n\n" )
+
+      f.print( "CELLTYPE_COBJS = \\\n" )
+      domain_regions.each{ |r|
+        f.print( "	$(CELLTYPE#{decideDomainNameProc.call r}_COBJS) \\\n" )
+      }
+      f.print( "# CELLTYPE_COBJS terminator\n\n" )
+
+      f.print( "TECSGEN_SRCS = \\\n" )
+      domain_regions.each{ |r|
+        f.print( "	$(TECSGEN#{decideDomainNameProc.call r}_SRCS) \\\n" )
+      }
+      f.print( "# TECSGEN_SRCS terminator\n\n" )
+
+      f.print( "PLUGIN_SRCS = \\\n" )
+      domain_regions.each{ |r|
+        f.print( "	$(PLUGIN#{decideDomainNameProc.call r}_SRCS) \\\n" )
+      }
+      f.print( "# PLUGIN#_SRCS terminator\n\n" )
+    end
+
+    ###
+    f.print( "# TECS_COBJS: objects from sources which are automatically generated by tecsgen\n" )
+    domain_regions.each{ |r|
+      nsp = decideDomainNameProc.call( r )
+      f.print( "TECSGEN#{nsp}_COBJS = \\\n" )
+      gen_celltype_names_domain( f, "	$(_TECS_OBJ_DIR)", "_tecsgen.o \\\n", domain_type, r, false )
+      f.print( "# TECSGEN#{nsp}_COBJS terminator\n\n" )
+    }
+
+    f.print( "# PLUGIN_COBJS: objects from sources which are automatically generated by plugin(s)\n" )
+    domain_regions.each{ |r|
+      nsp = decideDomainNameProc.call( r )
+      f.print( "PLUGIN#{nsp}_COBJS = \\\n" )
+      gen_celltype_names_domain( f, "	$(_TECS_OBJ_DIR)", "_tecsgen.o \\\n", domain_type, r, true )
+      gen_celltype_names_domain2( f, "	$(_TECS_OBJ_DIR)", ".o \\\n", domain_type, r, true, false )
+      f.print( "# PLUGIN#{nsp}_COBJS terminator\n\n" )
+    }
+
+    f.print( "# CELLTYPE_COBJS: objects of celltype code written by user\n" )
+    domain_regions.each{ |r|
+      nsp = decideDomainNameProc.call( r )
+      f.print( "CELLTYPE#{nsp}_COBJS = \\\n" )
+      gen_celltype_names_domain2( f, "	$(_TECS_OBJ_DIR)", ".o \\\n", domain_type, r, false, false )
+      f.print( "# CELLTYPE#{nsp}_COBJS terminator\n\n" )
+    }
+
+    f.print( "# TECSGEN_SRCS: sources automatically generated by tecsgen\n" )
+    domain_regions.each{ |r|
+      nsp = decideDomainNameProc.call( r )
+      f.print( "TECSGEN#{nsp}_SRCS = \\\n" )
+      gen_celltype_names_domain( f, "	$(GEN_DIR)/", "_tecsgen.#{$c_suffix} \\\n", domain_type, r, false )
+      f.print( "# TECSGEN#{nsp}_SRCS terminator\n\n" )
+    }
+
+    f.print( "# PLUGIN_SRCS: sources automatically generated by plugin\n" )
+    domain_regions.each{ |r|
+      nsp = decideDomainNameProc.call( r )
+      f.print( "PLUGIN#{nsp}_SRCS = \\\n" )
+      gen_celltype_names_domain( f, "	$(GEN_DIR)/", "_tecsgen.#{$c_suffix} \\\n", domain_type, r, true )
+      gen_celltype_names_domain2( f, "	$(GEN_DIR)/", ".#{$c_suffix} \\\n", domain_type, r, true, false )
+      f.print( "# PLUGIN#{nsp}_SRCS terminator\n\n" )
+    }
+
+    f.close
+
+  end
+
+  #=== ãã¹ã¦ã®ã»ã«ã¿ã¤ãã®ååãåºå
+  #f::       FILE:   åºåå
+ãã¡ã¤ã«
+  #prepend:: string: åç½®æå­å
+  #append::  string: å¾ç½®æå­å
+  #b_plguin::  bool:   plugin ã«ããçæãããã»ã«ã¿ã¤ããåºå
+  ##b_inline_only::  bool:   true ãªãã° inline ã® entry port ã®ã¿ã®ã»ã«ã¿ã¤ããå«ãã
+  #b_inline_only_or_proc::  bool|Proc:   true ãªãã° inline ã® entry port ã®ã¿ããã¤ã¤ã³ã¢ã¯ãã£ããªã»ã«ã¿ã¤ããå«ãã
+  #                                      Proc ãªãã° Proc ãå®è¡ããçµæ true ãªãã°å«ãã
+  #  namespace "::" ããå¼åºããã
+  def gen_celltype_names( f, prepend, append, b_plugin, b_inline_only_or_proc = true )
+    dbgPrint "gen_celltype_names #{@name}\n"
+
+    @celltype_list.each { |ct|
+      next if ! ct.need_generate?
+#      next if b_inline_only == false && ct.is_all_entry_inline?
+      next if b_inline_only_or_proc == false && ct.is_all_entry_inline? && ! ct.is_active?
+      # print "Proc:", b_inline_only_or_proc.kind_of?( Proc ), b_inline_only_or_proc.class, "\n"
+      next if b_inline_only_or_proc.kind_of?( Proc ) && ( b_inline_only_or_proc.call( ct ) == false )
+      if ( b_plugin && ct.get_plugin ) || ( ! b_plugin && ! ct.get_plugin ) then
+        f.print " #{prepend}#{ct.get_global_name}#{append}"
+      end
+    }
+    @namespace_list.each { |ns|
+      ns.gen_celltype_names( f, prepend, append, b_plugin, b_inline_only_or_proc )
+    }
+
+  end
+
+  #=== ãã¹ã¦ã®ã»ã«ã¿ã¤ãã®ååãåºå
+  #region:: Region:
+  # gen_celltype_names ã¨gen_celltype_names_domain ã®ç¸éï¼
+  #   region ã domain_roots ã«å«ãå ´åãåºåããï¼
+  #   ã¾ãã¯ãregion ãå«ã¾ãªãããdomain_roots ãè¤æ°ãã¤ã«ã¼ããªã¼ã¸ã§ã³ã®å ´åãåºåããï¼
+  # ããä»¥å¤ã¯ãgen_celltype_names ã®èª¬æãåç
+§
+  def gen_celltype_names_domain( f, prepend, append, domain_type, region, b_plugin, b_inline_only = true )
+    dbgPrint "gen_celltype_names #{@name}\n"
+
+    @celltype_list.each { |ct|
+      next if ! ct.need_generate?
+#      next if b_inline_only == false && ct.is_all_entry_inline?
+      next if b_inline_only == false && ct.is_all_entry_inline? && ! ct.is_active?
+      if ( b_plugin && ct.get_plugin ) || ( ! b_plugin && ! ct.get_plugin ) then
+        regions = ct.get_domain_roots[ domain_type ]
+        if regions.include?( region ) then
+          # p "BBB celltype:#{ct.get_name} domain:#{domain_type} append:#{append}"
+          if region.is_root? then
+            nsp = ""
+          else
+            nsp = "_#{region.get_namespace_path.get_global_name}"
+          end
+          f.print " #{prepend}#{ct.get_global_name}#{nsp}#{append}"
+        elsif region.is_root? then
+          # the case of domain_roots >= 2 && no cell in root region
+          if regions.length > 1 then
+            f.print " #{prepend}#{ct.get_global_name}#{append}"
+          end
+        end
+      end
+    }
+    @namespace_list.each { |ns|
+      ns.gen_celltype_names_domain( f, prepend, append, domain_type, region, b_plugin, b_inline_only )
+    }
+  end
+  #== Namespace#ãã¹ã¦ã®ã»ã«ã¿ã¤ãã®ååãåºå
+  # ã»ã«ã¿ã¤ãã³ã¼ãã®ããã®åååºå
+  # gen_celltype_names_domain ã¨ gen_celltype_names_domain2 ã®ç¸é
+  # ã»ã©ããä¸ã¤ã®ãªã¼ã¸ã§ã³ã«ããåºããªã
+  #     domain_roots ã1ã¤ã ãã§ãæå®ãªã¼ã¸ã§ã³ãå«ã
+  #     domain_roots ã2ã¤ä»¥ä¸ã§ãæå®ãªã¼ã¸ã§ã³ãã«ã¼ããªã¼ã¸ã§ã³ 
+  # ã»ãã¡ã¤ã³åãä»å ããªã
+  def gen_celltype_names_domain2( f, prepend, append, domain_type, region, b_plugin, b_inline_only = true )
+    dbgPrint "gen_celltype_names #{@name}\n"
+
+    @celltype_list.each { |ct|
+      next if ! ct.need_generate?
+#      next if b_inline_only == false && ct.is_all_entry_inline?
+      next if b_inline_only == false && ct.is_all_entry_inline? && ! ct.is_active?
+      if ( b_plugin && ct.get_plugin ) || ( ! b_plugin && ! ct.get_plugin ) then
+        # p "BBB celltype:#{ct.get_name} domain:#{domain_type} append:#{append}"
+        regions = ct.get_domain_roots[ domain_type ]
+        if regions.include?( region ) && regions.length == 1 then
+          f.print " #{prepend}#{ct.get_global_name}#{append}"
+        elsif region.is_root? then
+          # the case of domain_roots >= 2 && no cell in root region
+          if regions.length > 1 then
+            f.print " #{prepend}#{ct.get_global_name}#{append}"
+          end
+        end
+      end
+    }
+    @namespace_list.each { |ns|
+      ns.gen_celltype_names_domain2( f, prepend, append, domain_type, region, b_plugin, b_inline_only )
+    }
+  end
+
+end
+
+class Typedef
+  def gen_gh f
+
+#    print "Typedef.gen_gh\n"
+#    show_tree 1
+
+    f.printf( "typedef %-14s %s%s;\n",
+		"#{@declarator.get_type.get_type_str}",
+		"#{@declarator.get_name}",
+		"#{@declarator.get_type.get_type_str_post}")
+  end
+end
+
+class StructType < Type
+  def gen_gh f
+
+#    print "StructType.gen_gh\n"
+#    show_tree 1
+
+    if ! @b_define then
+      return
+    end
+
+    f.print "struct #{@tag} {\n"
+
+    @members_decl.get_items.each{ |i|
+      f.printf( "                %-14s %s%s;\n", "#{i.get_type.get_type_str}", "#{i.get_name}", "#{i.get_type.get_type_str_post}" )
+    }
+
+    f.print "};\n"
+
+  end
+end
+
+class Signature
+
+  def generate
+    generate_signature_header
+  end
+
+  def generate_post
+    generate_signature_header_post
+  end
+
+  def generate_signature_header
+    f = AppFile.open("#{$gen}/#{@global_name}_tecsgen.#{$h_suffix}")
+
+    print_note f
+    gen_sh_guard f
+    gen_sh_info f
+    gen_sh_include f
+
+    ifndef_macro_only f
+    gen_sh_func_tab f
+    endif_macro_only f
+    gen_sh_func_id f
+
+    f.close
+  end
+
+  def generate_signature_header_post
+    f = AppFile.open("#{$gen}/#{@global_name}_tecsgen.#{$h_suffix}")
+    gen_sh_endif f
+    f.close
+  end
+
+
+#####  signature header
+
+  def gen_sh_guard f
+    f.print("#ifndef #{@global_name}_TECSGEN_H\n")
+    f.print("#define #{@global_name}_TECSGEN_H\n\n")
+  end
+
+  def gen_sh_info f
+    f.print <<EOT
+/*
+ * signature   :  #{@name}
+ * global name :  #{@global_name}
+ * context     :  #{get_context}
+ */
+
+EOT
+  end
+
+  def gen_sh_include f
+    dl = get_descriptor_list
+    if dl.length > 0 then
+      f.printf TECSMsg.get(:SDI_comment), "#_SDI_#"
+      dl.each{ |dt,param|
+        f.print "#include \"#{dt.get_signature.get_global_name}_tecsgen.#{$h_suffix}\"\n"
+      }
+      f.print "\n"
+    end
+
+  end
+
+  def gen_sh_func_tab f
+
+    # ã·ã°ããã£ãã£ã¹ã¯ãªãã¿ã®åºå
+    f.printf TECSMsg.get(:SD_comment), "#_SD_#"
+    f.print "struct tag_#{@global_name}_VDES {\n"
+    f.print "    struct tag_#{@global_name}_VMT *VMT;\n"
+    f.print "};\n\n"
+
+    # ã·ã°ããã£é¢æ°ãã¼ãã«ã®åºå
+    f.printf TECSMsg.get(:SFT_comment), "#_SFT_#"
+    f.print( "struct tag_#{@global_name}_VMT {\n" )
+    get_function_head_array.each{ |fun|
+      f.print "    "
+      functype = fun.get_declarator.get_type
+      f.printf( "%-14s", functype.get_type_str )
+
+      f.print( " (*#{fun.get_name}__T)(" )
+      f.print( " const struct tag_#{@global_name}_VDES *edp" ) unless @singleton
+
+      if functype.get_paramlist then
+        items = functype.get_paramlist.get_items
+        len = items.length
+      else
+        # ããã§ nil ã«ãªãã®ã¯ãå¼æ°ãªãã®æã« void ããªãã£ãå ´å
+        items = []
+        len = 0
+      end
+
+      i = 0
+      items.each{ |param|
+        f.print ", "
+        f.print( param.get_type.get_type_str )
+        f.print( " " )
+        f.print( param.get_name )
+        f.print( param.get_type.get_type_str_post )
+        i += 1
+      }
+      f.print " );\n"
+    }
+    if get_function_head_array.length == 0 then
+      f.print( "    void   (*dummy__)(void);\n" )
+    end
+
+    f.print "};\n"
+    f.printf "\n"
+    f.printf TECSMsg.get(:SDES_comment), "#_SDES_#"
+    f.print( "typedef struct { struct tag_#{@global_name}_VDES *vdes; } Descriptor( #{@global_name} );\n" )
+  end
+
+  #=== Signature# é¢æ°ã® ID ã® define ãåºå
+  def gen_sh_func_id f
+    f.print "/* function id */\n"
+    get_function_head_array.each{ |fun|
+      f.printf( "#define\tFUNCID_%-31s (%d)\n", "#{@global_name}_#{fun.get_name}".upcase, get_id_from_func_name( fun.get_name ) )
+    }
+    f.print "\n"
+  end
+
+  def gen_sh_endif f
+    f.print("#endif /* #{@global_name}_TECSGEN_H */\n")
+  end
+
+end
+
+class Celltype
+
+  def generate
+
+    if need_generate?    # ã»ã«ã®ãªãã»ã«ã¿ã¤ãã¯çæããªã
+
+      generate_private_header
+      generate_factory_header
+      generate_cell_code
+      generate_template_code
+      generate_inline_template_code
+      generate_celltype_factory_code
+      generate_cell_factory_code
+      generate_makefile
+
+    elsif $generate_all_template   # ãã³ãã¬ã¼ãã³ã¼ãçæãªãã·ã§ã³
+
+      generate_template_code
+      generate_inline_template_code
+
+      # generate_makefile_template ã¯ Makefile ã«è¿½è¨ãããã®ã ãããå¼ã³åºããªã
+
+    end
+
+  end
+
+  def generate_post
+    return if ! need_generate?    # ã»ã«ã®ãªãã»ã«ã¿ã¤ãã¯çæããªã
+
+    generate_private_header_post
+    generate_factory_header_post
+  end
+
+  def generate_private_header
+
+    f = AppFile.open("#{$gen}/#{@global_name}_tecsgen.#{$h_suffix}")
+
+    print_note f
+
+    gen_ph_guard f
+    gen_ph_info f
+    gen_ph_include f
+    #
+    ifndef_macro_only f
+    begin_extern_C f
+    gen_ph_cell_cb_type f
+    gen_ph_INIB_as_CB f
+    gen_ph_extern_cell f          # ã»ã«ã¿ã¤ãã°ã«ã³ã¼ãä»¥å¤ã¯åç
+§ããªã
+    gen_ph_typedef_idx f          # mikan åç
+§ãããã®ãã§ãã¦ããªã
+    gen_ph_ep_fun_prototype f
+    end_extern_C f
+    endif_macro_only f
+	#
+    gen_ph_include_cb_type f
+
+    if @n_entry_port_inline == 0 then
+      # inline ããªããã° CB_TYPE_ONLY ã¨ãã
+      # inline ããã®å ´åããã£ãã define ãã¦ããã¦ãå¾ã§ãã¹ã¦ undef ãã
+      ifndef_cb_type_only f
+    end
+
+    gen_ph_base f
+    gen_ph_valid_idx f
+    gen_ph_n_cp f                 if @n_call_port_array > 0
+    gen_ph_n_ep f                 if @n_entry_port_array > 0
+    gen_ph_test_optional_call_port f
+    gen_ph_get_cellcb f
+    gen_ph_attr_access f          if @n_attribute_rw > 0 || @n_attribute_ro > 0 || @n_var > 0
+    gen_ph_cp_fun_macro f         if @n_call_port > 0
+#    gen_ph_abstract_ep_des_type f
+
+    if @n_entry_port_inline == 0 then
+      endif_cb_type_only f
+    end
+
+    ifndef_macro_only f
+    begin_extern_C f
+#    gen_ph_cell_cb_type f
+#    gen_ph_INIB_as_CB f
+#    gen_ph_extern_cell f          # ã»ã«ã¿ã¤ãã°ã«ã³ã¼ãä»¥å¤ã¯åç
+§ããªã
+    # gen_ph_typedef_idx f          # mikan åç
+§ãããã®ãã§ãã¦ããªã
+#    gen_ph_ep_fun_prototype f
+    gen_ph_ep_skel_prototype f
+    end_extern_C f
+    endif_macro_only f
+
+    # ç­ç¸®å½¢ãªã©ã®ãã¯ã­åºå
+    if @n_entry_port_inline == 0 then
+      ifndef_cb_type_only f
+    end
+    gen_ph_valid_idx_abbrev f
+    gen_ph_get_cellcb_abbrev f
+    gen_ph_attr_access_abbrev f   if @n_attribute_rw > 0 || @n_attribute_ro > 0 || @n_var > 0
+    gen_ph_cp_fun_macro_abbrev f  if @n_call_port > 0
+    gen_ph_test_optional_call_port_abbrev f
+    gen_ph_ep_fun_macro f         if @n_entry_port > 0
+    gen_ph_foreach_cell f         # FOREACH ãã¯ã­ã®åºå
+    gen_ph_cb_initialize_macro f   # CB åæåãã¯ã­ã®åºåï¼æ¶è²»ããªãã®ã§ ram_initializer ãã©ã°ã«é¢ãããåºå
+    gen_ph_dealloc_code f, ""
+    gen_ph_dealloc_code f, "_RESET"
+    if @n_entry_port_inline == 0 then
+      endif_cb_type_only f
+    end
+
+    f.close
+  end
+
+  def generate_private_header_post
+
+    f = AppFile.open("#{$gen}/#{@global_name}_tecsgen.#{$h_suffix}")
+
+    ifndef_macro_only f
+    gen_ph_inline f
+    endif_macro_only f
+
+    if @n_entry_port_inline > 0 then
+      ifdef_cb_type_only f
+      f.printf TECSMsg.get( :UDF_comment ), "#_UDF_#"
+      f.print "#undef VALID_IDX\n"
+      f.print "#undef GET_CELLCB\n"
+      f.print "#undef CELLCB\n"
+      f.print "#undef CELLIDX\n"
+      f.print "#undef #{@name}_IDX\n"
+
+      f.print "#undef FOREACH_CELL\n"
+      f.print "#undef END_FOREACH_CELL\n"
+      f.print "#undef INITIALIZE_CB\n"
+      f.print "#undef SET_CB_INIB_POINTER\n"
+
+      @attribute.each { |a|
+        f.print( "#undef ATTR_#{a.get_name}\n" )
+        f.print( "#undef #{@global_name}_ATTR_#{a.get_name}\n" )
+        f.print( "#undef #{@global_name}_GET_#{a.get_name}\n" )
+      }
+      @var.each { |v|
+        f.print( "#undef VAR_#{v.get_name}\n" )
+        f.print( "#undef VAR_#{v.get_name}\n" )
+        f.print( "#undef #{@global_name}_VAR_#{v.get_name}\n" )
+        f.print( "#undef #{@global_name}_GET_#{v.get_name}\n" )
+        f.print( "#undef #{@global_name}_SET_#{v.get_name}\n" )
+      }
+      @port.each { |p|
+        next if p.get_port_type != :CALL
+
+        # is_...joined ã¯ omit ããã±ã¼ã¹ã§ãåºåããããããomit ãæ¤æ»ããåã«åºå
+        if p.is_optional? then
+          f.print( "#undef is_#{p.get_name}_joined\n" )
+        end
+
+        next if p.is_omit?
+
+        p.get_signature.get_function_head_array.each{ |fun|
+          f.print( "#undef #{@global_name}_#{p.get_name}_#{fun.get_name}\n" )
+          if ! p.is_require? || p.has_name? then
+            f.print( "#undef #{p.get_name}_#{fun.get_name}\n" )
+          else
+            f.print( "#undef #{fun.get_name}\n" )
+          end
+        }
+      }
+      @port.each { |p|
+        next if p.get_port_type != :ENTRY
+        next if p.is_omit?
+        p.get_signature.get_function_head_array.each{ |fun|
+          f.print( "#undef #{p.get_name}_#{fun.get_name}\n" )
+        }
+      }
+
+      gen_ph_dealloc_code( f, "", true )
+      gen_ph_dealloc_code( f, "_RESET", true )
+
+      endif_cb_type_only f
+    end
+
+    gen_ph_endif f
+
+    f.close
+  end
+
+  #=== CELLTYPE_tecsgen.c ãçæ
+  def generate_cell_code
+    fs = { }
+    f = nil
+    @domain_roots.each{ |domain_type_name, regions|
+      regions.each{ |r|
+        if r.is_root? then
+          nsp = ""
+        else
+          nsp = "_#{r.get_namespace_path.get_global_name}"
+        end
+        # p "celltype:#{@name} dn:#{domain_type_name} nsp:#{nsp}"
+        fs[r] = AppFile.open("#{$gen}/#{@global_name}#{nsp}_tecsgen.#{$c_suffix}")
+        if r.is_root? then
+          f = fs[r]
+        end
+      }
+    }
+
+    # in case that domain_roots does not include root region
+    if f == nil then
+      regions = nil
+      @domain_roots.each{ |domain_type_name, regions_|
+        regions = regions_   # domain_type_name is unique
+      }
+      if regions.length > 1 then 
+        # if domain_roots.length >= 2 && no cell in root region
+        # shared code are placed in root region
+        f = AppFile.open("#{$gen}/#{@global_name}_tecsgen.#{$c_suffix}")
+      else
+        # shared code are placed in unique region
+        f = fs[ regions[0] ]
+      end
+    end
+
+    # ãã¹ã¦ã® _tecsgen.c ã«åºå
+    print_note f
+    gen_cell_private_header f
+    gen_cell_factory_header f
+    gen_cell_ep_des_type f
+
+    # ãã¹ã¦ã® _tecsgen.c ã«åºå
+    fs.each{ |r,f2|
+      if f == f2 then
+        next
+      end
+      print_note f2
+      gen_cell_private_header f2
+      gen_cell_factory_header f2
+      gen_cell_ep_des_type f2
+    }
+
+    # ä¸ã¤ã® _tecsgen.c ã«åºå
+    gen_cell_skel_fun f
+    gen_cell_fun_table f
+    gen_cell_var_init f
+
+    # ã»ã«ãã¨ã« _tecsgen.c ã«åºå
+    gen_cell_ep_vdes fs
+    gen_cell_ep_vdes_array fs
+    gen_cell_cb_out_init fs         # INITIALIZE_CB ã§åç
+§ããããã ram_initializer=false ã§ãæ¶ããªã
+    gen_cell_cb fs
+    gen_cell_extern_mt fs
+    gen_cell_ep_des fs
+
+    # ä¸ã¤ã® _tecsgen.c ã«åºå
+    gen_cell_cb_tab f
+    if $ram_initializer then
+      gen_cell_cb_initialize_code f
+    end
+
+    fs.each{ |r,f2|
+      f2.close
+      if f == f2 then
+        f = nil
+      end
+    }
+    if f then
+      f.close
+    end
+
+  end
+
+#####  celltype header
+
+  def gen_ph_guard( f, post = "TECSGEN" )
+    f.print("#ifndef #{@global_name}_#{post}_H\n")
+    f.print("#define #{@global_name}_#{post}_H\n\n")
+  end
+
+  def gen_ph_info f
+
+    yn_idx_is_id = "no"
+    yn_idx_is_id = "yes"  if @idx_is_id
+    yn_idx_is_id_act = "no"
+    yn_idx_is_id_act = "yes"  if @idx_is_id_act
+    yn_singleton = "no"
+    yn_singleton = "yes"  if @singleton
+    yn_rom       = "no"
+    yn_rom       = "yes"  if $rom
+    yn_cb_init   = "no"
+    yn_cb_init   = "yes"  if need_CB_initializer?
+    # @singleton = false    # mikan singleton  060827
+
+    f.print <<EOT
+/*
+ * celltype          :  #{@name}
+ * global name       :  #{@global_name}
+ * idx_is_id(actual) :  #{yn_idx_is_id}(#{yn_idx_is_id_act})
+ * singleton         :  #{yn_singleton}
+ * has_CB            :  #{has_CB?}
+ * has_INIB          :  #{has_INIB?}
+ * rom               :  #{yn_rom}
+ * CB initializer    :  #{yn_cb_init}
+ */
+
+EOT
+  end
+
+  def gen_ph_include f
+    # ã©ã³ã¿ã¤ã ãããã® include
+#    f.printf TECSMsg.get( :IRTH_comment), "#_IRTH_#"
+#    f.print "#include \"tecs.#{$h_suffix}\"\n\n"
+
+    # ã°ã­ã¼ãã«ãããã® include
+    f.printf TECSMsg.get( :IGH_comment ), "#_IGH_#"
+    f.print "#include \"global_tecsgen.#{$h_suffix}\"\n\n"
+
+    # ã·ã°ããã£ãããã® include
+    f.printf TECSMsg.get( :ISH_comment ), "#_ISH_#"
+    @port.each { |p|
+      next if p.is_omit?
+      hname = "#{p.get_signature.get_global_name}_tecsgen.#{$h_suffix}".to_sym
+      if header_included?( hname ) == false then
+        f.print "#include \"#{hname}\"\n"
+      end
+    }
+    f.print "\n"
+  end
+
+  def gen_ph_include_cb_type f
+
+    if ! @b_cp_optimized then
+      return
+    end
+
+    # æé©åã®ããåç
+§ããã»ã«ã¿ã¤ãã® CB åã®å®ç¾©ãåè¾¼ã
+    # _CB_TYPE_ONLY ãå®ç¾©ããä¸ã§ include ãã
+    f.printf( TECSMsg.get( :ICT_comment ), "#_ICT_#" )
+
+    f.print( "#ifndef  TOPPERS_CB_TYPE_ONLY\n" )
+    f.print( "#define  #{@global_name}_CB_TYPE_ONLY\n" )
+    f.print( "#define TOPPERS_CB_TYPE_ONLY\n" )
+    f.print( "#endif  /* TOPPERS_CB_TYPE_ONLY */\n" )
+
+    @port.each { |p|
+      next if p.get_port_type != :CALL
+      next if p.is_omit?
+
+      if p.is_skelton_useless? || p.is_cell_unique? || p.is_VMT_useless? then
+        # æé©åã³ã¼ã (optimize) # ã¹ã±ã«ãã³ä¸è¦ãªã©
+        p2 = p.get_real_callee_port
+        if p2 then
+          ct = p2.get_celltype
+          hname = "#{ct.get_global_name}_tecsgen.#{$h_suffix}".to_sym
+          if header_included?( hname ) == false then
+            f.print( "#include \"#{hname}\"\n" )
+          end
+        # else
+          # optional ã§æªçµå
+        end
+      end
+
+    }
+    f.print( "#ifdef  #{@global_name}_CB_TYPE_ONLY\n" )
+    f.print( "#undef TOPPERS_CB_TYPE_ONLY\n" )
+    f.print( "#endif /* #{@global_name}_CB_TYPE_ONLY */\n" )
+
+#    @port.each { |p|
+#      next if p.get_port_type != :CALL
+#      if p.is_skelton_useless? || p.is_cell_unique? || p.is_VMT_useless? then
+#        # æé©åã³ã¼ã (optimize) # ã¹ã±ã«ãã³ä¸è¦ãªã©
+#        p2 = p.get_real_callee_port
+#        ct = p2.get_celltype
+#        ct.gen_ph_typedef_idx f
+#        ct.gen_ph_INIB_as_CB f
+#        ct.gen_ph_extern_cell f
+#        f.print "\n"
+#      end
+#    }
+
+  end
+
+
+  def gen_ph_base f
+    return if @singleton
+
+    # ID ã®åºæ°ããã³åæ°ã® define ãåºå
+    f.printf("#define %-20s %10s  /* %s #_NIDB_# */\n", "#{@global_name}_ID_BASE", "(#{@id_base})", TECSMsg.get(:NIDB_comment))
+    f.printf("#define %-20s %10s  /* %s  #_NCEL_# */\n\n", "#{@global_name}_N_CELL", "(#{@n_cell_gen})", TECSMsg.get(:NCEL_comment))
+  end
+
+  def gen_ph_valid_idx f
+    return if @singleton
+
+    # mikan  æé©å
+    # IDX æ­£å½æ§ãã§ãã¯ãã¯ã­ã®åºå
+    f.printf( TECSMsg.get( :CVI_comment ), "#_CVI_#" )
+    if @idx_is_id_act then
+      f.print("#define #{@global_name}_VALID_IDX(IDX) (#{@global_name}_ID_BASE <= (IDX) && (IDX) < #{@global_name}_ID_BASE+#{@global_name}_N_CELL)\n\n")
+    else
+      f.print("#define #{@global_name}_VALID_IDX(IDX) (1)\n\n")
+    end
+
+  end
+
+  def gen_ph_valid_idx_abbrev f
+    return if @singleton
+
+    # IDX æ­£å½æ§ãã§ãã¯ãã¯ã­ï¼ç­ç¸®å½¢ï¼ã®åºå
+    f.printf( TECSMsg.get( :CVIA_comment ), "#_CVIA_#")
+    f.print("#define VALID_IDX(IDX)  #{@global_name}_VALID_IDX(IDX)\n\n")
+
+  end
+
+  #=== å¼ã³å£é
+åã®å¤§ãããå¾ããã¯ã­ã®åºå
+  #
+  #ã»ã«ã¿ã¤ããããã¸å¼ã³å£ã®åæ°ãåºå
+  def gen_ph_n_cp f
+
+    b_comment = false
+    @port.each { |p|
+      next if p.get_port_type != :CALL
+      next if p.is_omit?
+      next if p.get_array_size == nil
+
+      if ! b_comment then
+        f.printf( TECSMsg.get( :NCPA_comment ), "#_NCPA_#" )
+        b_comment = true
+      end
+
+      if p.get_array_size != "[]" then       # åºå®é·é
+å
+        f.print( "#define N_CP_#{p.get_name}    (#{p.get_array_size})\n" )
+        f.print( "#define NCP_#{p.get_name}     (#{p.get_array_size})\n" )
+      else                                   # å¯å¤é·é
+å
+        if @singleton then
+          if has_INIB? then
+            inib = "INIB"
+          else
+            inib = "CB"
+          end
+          f.print( "#define N_CP_#{p.get_name}  (#{@global_name}_SINGLE_CELL_#{inib}.n_#{p.get_name})\n" )
+          f.print( "#define NCP_#{p.get_name}   (#{@global_name}_SINGLE_CELL_#{inib}.n_#{p.get_name})\n" )
+          # mikan singleton ãªãã°ãåºå®é·åã§ãã
+        else
+          if has_CB? && has_INIB? then
+            inib = "->_inib"
+          else
+            inib = ""
+          end
+          f.print( "#define N_CP_#{p.get_name}(p_that)  ((p_that)#{inib}->n_#{p.get_name})\n" )
+          f.print( "#define NCP_#{p.get_name}           (N_CP_#{p.get_name}(p_cellcb))\n" )
+        end
+      end
+    }
+  end
+
+  #=== åãå£é
+åã®å¤§ãããå¾ããã¯ã­ã®åºå
+  #
+  #ã»ã«ã¿ã¤ããããã¸åãå£ã®åæ°ãåºå
+  def gen_ph_n_ep f
+
+    b_comment = false
+    @port.each { |p|
+      next if p.get_port_type != :ENTRY
+      # next if p.is_omit?                       # åãå£é
+åã®åæ°ã¯çç¥ããªã
+      next if p.get_array_size == nil
+
+      if ! b_comment then
+        f.printf( TECSMsg.get( :NEPA_comment ), "#_NEPA_#" )
+        b_comment = true
+      end
+
+      if p.get_array_size != "[]" then       # åºå®é·é
+å
+        f.print( "#define NEP_#{p.get_name}     (#{p.get_array_size})\n" )
+      else                                   # å¯å¤é·é
+å
+        if @singleton then
+          if has_INIB? then
+            inib = "INIB"
+          else
+            inib = "CB"
+          end
+          f.print( "#define NEP_#{p.get_name}   (#{@global_name}_SINGLE_CELL_#{inib}.n_#{p.get_name})\n" )
+          # mikan singleton ãªãã°ãåºå®é·åã§ãã
+        else
+          if has_CB? && has_INIB? then
+            inib = "->_inib"
+          else
+            inib = ""
+          end
+          f.print( "#define NEP_#{p.get_name}           ((p_cellcb)#{inib}->n_#{p.get_name})\n" )
+        end
+      end
+    }
+  end
+
+  #=== optional ãªå¼ã³å£ãçµåããã¦ããããã¹ãããã³ã¼ãã®çæ
+  def gen_ph_test_optional_call_port f
+    b_comment = false
+
+    if @singleton then
+      if has_INIB? then
+        inib = "INIB"
+      else
+        inib = "CB"
+      end
+    else
+      if has_CB? && has_INIB? then
+        inib = "->_inib"
+      else
+        inib = ""
+      end
+    end
+
+    @port.each { |p|
+      next if p.get_port_type != :CALL
+      next if ! p.is_optional?
+      # next if p.is_omit?  # omit ã§ã test ã³ã¼ãã¯çæãã
+
+      if b_comment == false then
+        f.printf( TECSMsg.get( :TOCP_comment ), "#_TOCP_#" )
+        b_comment = true
+      end
+
+      if p.get_array_size == nil then
+        f.print( "#define #{@global_name}_is_#{p.get_name}_joined(p_that) \\\n" )
+      else
+        f.print( "#define #{@global_name}_is_#{p.get_name}_joined(p_that,subscript) \\\n" )
+      end
+
+      if p.is_omit? then
+        f.print( "   omit  is_#{p.get_name}_joined\n" )
+        next
+      end
+
+      # é¢æ°åã®åºå(æ¨æºï¼åãå£ãã£ã¹ã¯ãªãã¿ãã VMT ã®é¢æ°åãæé©åï¼åãå£é¢æ° or åãå£ãã£ã¹ã¯ãªãã¿)
+      # mikan  å
+¨é¨ã¤ãªãã£ã¦ãããã©ããã§ (1) ãå¤å®ãã
+      if ! p.is_VMT_useless? then
+        # æ¨æºã³ã¼ã
+        if p.get_array_size == nil then
+          if @singleton then
+            f.print( "\t  (#{@global_name}_SINGLE_CELL_#{inib}.#{p.get_name}!=0)\n" )
+          else
+            f.print( "\t  ((p_that)#{inib}->#{p.get_name}!=0)\n" )
+          end
+        else
+          # é
+åã®å ´å
+          if @singleton then
+            f.print( "\t  ((#{@global_name}_SINGLE_CELL_#{inib}.#{p.get_name}!=0) \\\n" )
+            f.print( "\t  &&(#{@global_name}_SINGLE_CELL_#{inib}.#{p.get_name}[subscript]!=0))\n" )
+          else
+            f.print( "\t  (((p_that)#{inib}->#{p.get_name}!=0)\\\n" )
+            f.print( "\t  &&((p_that)#{inib}->#{p.get_name}[subscript]!=0))\n" )
+          end
+        end
+      else
+        # æé©åã³ã¼ã (optimize) # VMT ä¸è¦ï¼é
+åè¦ç´ ãã¹ã¦åãï¼
+        p2 = p.get_real_callee_port
+        if p2 then
+          ct = p2.get_celltype
+          if p.is_skelton_useless? then
+            # åãå£é¢æ°ãç´æ¥å¼åºã
+            f.print( "\t  (1)\n" )
+          else
+            # åãå£ã¹ã±ã«ãã³é¢æ°ãç´æ¥å¼åºã
+            f.print( "\t  (1)\n" )
+          end
+        else
+          # optional ã§æªçµå
+          f.print( "\t  (0)    /* not joined */\n" )
+        end
+      end
+    }
+  end
+
+  #=== optional ãªå¼ã³å£ãçµåããã¦ããããã¹ãããã³ã¼ãã®çæï¼ç­ç¸®å½¢ï¼
+  def gen_ph_test_optional_call_port_abbrev f
+    b_comment = false
+
+    @port.each { |p|
+      next if p.get_port_type != :CALL
+      next if ! p.is_optional?
+      # next if p.is_omit?  # omit ã§ã test ã³ã¼ãã¯çæãã
+
+      if b_comment == false then
+        f.printf( TECSMsg.get( :TOCPA_comment ), "#_TOCPA_#" )
+        b_comment = true
+      end
+
+      if p.get_array_size == nil then
+        f.print( "#define is_#{p.get_name}_joined()\\\n\t\t#{@global_name}_is_#{p.get_name}_joined(p_cellcb)\n" )
+      else
+        f.print( "#define is_#{p.get_name}_joined(subscript)\\\n" )
+        f.print( "\t\t#{@global_name}_is_#{p.get_name}_joined(p_cellcb,subscript)\n" )
+      end
+    }
+  end
+
+  #=== CELLCB ã¸ã®ãã¤ã³ã¿ãå¾ããã¯ã­ãåºå
+  #   ã»ã«ã¿ã¤ããããã¸åºå
+  def gen_ph_get_cellcb f
+    f.printf( TECSMsg.get( :GCB_comment ), "#_GCB_#" )
+    if ( ! has_CB? && ! has_INIB? ) || @singleton then
+      f.print( "#define #{@global_name}_GET_CELLCB(idx) ((void *)0)\n" )
+    elsif @idx_is_id_act then   # mikan åä¸ã®ã»ã«ã®å ´åã®æé©å, idx_is_id ã§ãªãå ´å
+      f.print( "#define #{@global_name}_GET_CELLCB(idx) (#{@global_name}_CB_tab[(idx) - #{@global_name}_ID_BASE])\n" )
+    else
+      f.print( "#define #{@global_name}_GET_CELLCB(idx) (idx)\n" )
+    end
+  end
+
+  #=== CELLCB ã¸ã®ãã¤ã³ã¿ãå¾ããã¯ã­ï¼ç­ç¸®å½¢ï¼ãåºå
+  #  ã»ã«ã¿ã¤ããããã¸åºå
+  def gen_ph_get_cellcb_abbrev f
+    f.printf( TECSMsg.get( :GCBA_comment ), "#_GCBA_#" )
+    f.print("#define GET_CELLCB(idx)  #{@global_name}_GET_CELLCB(idx)\n\n")
+
+    f.printf( TECSMsg.get( :CCT_comment ), "#_CCT_#" )
+    f.print( "#define CELLCB\t#{@global_name}_CB\n\n" )
+
+    f.printf( TECSMsg.get( :CTIXA_comment ), "#_CTIXA_#" )
+    f.print( "#define CELLIDX\t#{@global_name}_IDX\n\n" )
+
+    if @name != @global_name then
+      f.print( "#define #{@name}_IDX  #{@global_name}_IDX\n" )
+    end
+  end
+
+  #===  attribute, var ãã¢ã¯ã»ã¹ãããã¯ã­ãåºå
+  #    ã»ã«ã¿ã¤ããããã¸åºå
+  def gen_ph_attr_access f
+    if @n_attribute_rw > 0 || @n_attribute_ro > 0 then
+      f.printf( TECSMsg.get( :AAM_comment ), "#_AAM_#" )
+    end
+
+    @attribute.each { |a|
+
+      next if a.is_omit?
+
+      # mikan const_value ã®å ´å
+      f.print( "#define " )
+      if @singleton then
+        if has_INIB? then
+          inib = "INIB"
+        else
+          inib = "CB"
+        end
+        f.printf( "%-20s", "#{@global_name}_ATTR_#{a.get_name}" )
+        f.print( "\t(#{@global_name}_SINGLE_CELL_#{inib}.#{a.get_name})\n" )
+        # mikan ããã§ã¯ cell ã§ã¯ãªã celltype ã®åå
+      else
+        if ! a.is_rw? && has_CB? && has_INIB? then
+          inib = "->_inib"
+        else
+          inib = ""
+        end
+        f.printf( "%-20s", "#{@global_name}_ATTR_#{a.get_name}( p_that )" )
+        f.print( "\t((p_that)#{inib}->#{a.get_name})\n" )
+      end
+    }
+    f.print( "\n" )
+
+    @attribute.each { |a|
+
+      next if a.is_omit?
+
+      if @singleton then
+        if has_INIB? then
+          inib = "INIB"
+        else
+          inib = "CB"
+        end
+      else
+        if ! a.is_rw? && has_CB? && has_INIB? then
+          inib = "->_inib"
+        else
+          inib = ""
+        end
+      end
+
+      # mikan const_value ã®å ´å
+      f.print( "#define " )
+      if @singleton then
+        f.printf( "%-20s", "#{@global_name}_GET_#{a.get_name}()" )
+        f.print( "\t(#{@global_name}_SINGLE_CELL_#{inib}.#{a.get_name})\n" )
+        # mikan ããã§ã¯ cell ã§ã¯ãªã celltype ã®åå
+      else
+        f.printf( "%-20s", "#{@global_name}_GET_#{a.get_name}(p_that)" )
+        f.print( "\t((p_that)#{inib}->#{a.get_name})\n" )
+      end
+
+      if a.is_rw? then
+        f.print( "#define " )
+        if @singleton then
+          f.printf( "%-20s", "#{@global_name}_SET_#{a.get_name}(val)" )
+          f.print( "\t(#{@global_name}_SINGLE_CELL_#{inib}.#{a.get_name} = (val))\n" )
+          # mikan ããã§ã¯ cell ã§ã¯ãªã celltype ã®åå
+        else
+          f.printf( "%-20s", "#{@global_name}_SET_#{a.get_name}(p_that,val)" )
+          f.print( "\t((p_that)#{inib}->#{a.get_name}=(val))\n" )
+        end
+      end
+
+    }
+    f.print( "\n" )
+
+    if @n_var > 0 then
+      f.printf( TECSMsg.get( :VAM_comment ), "#_VAM_#" )
+    end
+
+    @var.each { |v|
+
+      next if v.is_omit?
+
+      if @singleton then
+        if v.get_size_is && has_INIB? then
+          inib = "INIB"
+        else
+          inib = "CB"
+        end
+      else
+        if v.get_size_is && has_CB? && has_INIB? then
+          inib = "->_inib"
+        else
+          inib = ""
+        end
+      end
+
+      # mikan const_value ã®å ´å
+      f.print( "#define " )
+      if @singleton then
+        f.printf( "%-20s", "#{@global_name}_VAR_#{v.get_name}" )
+        f.print( "\t(#{@global_name}_SINGLE_CELL_#{inib}.#{v.get_name})\n" )
+        # mikan ããã§ã¯ cell ã§ã¯ãªã celltype ã®åå
+      else
+        f.printf( "%-20s", "#{@global_name}_VAR_#{v.get_name}(p_that)" )
+        f.print( "\t((p_that)#{inib}->#{v.get_name})\n" )
+      end
+    }
+    f.print( "\n" )
+    @var.each { |v|
+
+      next if v.is_omit?
+
+      # mikan const_value ã®å ´å
+      f.print( "#define " )
+      if @singleton then
+        f.printf( "%-20s", "#{@global_name}_GET_#{v.get_name}()" )
+        f.print( "\t(#{@global_name}_SINGLE_CELL_CB.#{v.get_name})\n" )
+        # mikan ããã§ã¯ cell ã§ã¯ãªã celltype ã®åå
+      else
+        f.printf( "%-20s", "#{@global_name}_GET_#{v.get_name}(p_that)" )
+        f.print( "\t((p_that)->#{v.get_name})\n" )
+      end
+
+      f.print( "#define " )
+      if @singleton then
+        f.printf( "%-20s", "#{@global_name}_SET_#{v.get_name}(val)" )
+        f.print( "\t(#{@global_name}_SINGLE_CELL_CB.#{v.get_name}=(val))\n" )
+        # mikan ããã§ã¯ cell ã§ã¯ãªã celltype ã®åå
+      else
+        f.printf( "%-20s", "#{@global_name}_SET_#{v.get_name}(p_that,val)" )
+        f.print( "\t((p_that)->#{v.get_name}=(val))\n" )
+      end
+    }
+    f.print( "\n" )
+
+  end
+
+  #===  attribute/var ã¢ã¯ã»ã¹ãã¯ã­ï¼ç­ç¸®å½¢ï¼ã³ã¼ãã®çæ
+  def gen_ph_attr_access_abbrev f
+    if @n_attribute_rw > 0 || @n_attribute_ro > 0 then
+      f.printf( TECSMsg.get( :AAMA_comment ), "#_AAMA_#" )
+    end
+
+    @attribute.each { |a|
+      next if a.is_omit?
+
+      # mikan const_value ã®å ´å
+      f.print( "#define " )
+      f.printf( "%-20s", "ATTR_#{a.get_name}" )
+      f.print( " #{@global_name}_ATTR_#{a.get_name}" )
+      if ! @singleton then
+        f.print( "( p_cellcb )" )
+      end
+      f.print "\n"
+    }
+    f.print( "\n" )
+
+    if @n_var > 0 then
+      f.printf( TECSMsg.get( :VAMA_comment ), "#_VAMA_#" )
+    end
+
+    @var.each { |v|
+      next if v.is_omit?
+
+      # mikan const_value ã®å ´å
+      f.print( "#define " )
+      f.printf( "%-20s", "VAR_#{v.get_name}" )
+      f.print( " #{@global_name}_VAR_#{v.get_name}" )
+      if ! @singleton then
+        f.print( "( p_cellcb )" )
+      end
+      f.print( "\n" )
+    }
+    f.print( "\n" )
+
+  end
+
+  def gen_ph_cp_fun_macro f
+    if @n_call_port >0 then
+      f.printf( TECSMsg.get( :CPM_comment ) , "#_CPM_#" )
+    end
+
+    if @singleton then
+      if has_INIB? then
+        inib = "INIB"
+      else
+        inib = "CB"
+      end
+    else
+      if has_CB? && has_INIB? then
+        inib = "->_inib"
+      else
+        inib = ""
+      end
+    end
+
+    @port.each { |p|
+      next if p.get_port_type != :CALL
+      next if p.is_omit?
+
+      p.get_signature.get_function_head_array.each{ |fun|
+        f.print( "#define #{@global_name}_#{p.get_name}_#{fun.get_name}(" )
+        ft = fun.get_declarator.get_type
+        delim = ""
+
+        if ! @singleton then
+          f.print( "#{delim} p_that" )
+          delim = ","
+        end
+
+        if p.get_array_size then
+          f.print( "#{delim} subscript" )
+          delim = ","
+        end
+
+        ft.get_paramlist.get_items.each{ |param|
+          f.print( "#{delim} #{param.get_name}" )
+          delim = ","
+        }
+        f.print( " ) \\\n" )
+
+        subsc = ""
+        subsc = "[subscript]" if p.get_array_size
+        delim = ""
+
+        # é¢æ°åã®åºå(æ¨æºï¼åãå£ãã£ã¹ã¯ãªãã¿ãã VMT ã®é¢æ°åãæé©åï¼åãå£é¢æ° or åãå£ãã£ã¹ã¯ãªãã¿)
+        if ! p.is_VMT_useless? then
+          # æ¨æºã³ã¼ã
+          if @singleton then
+            f.print( "\t  #{@global_name}_SINGLE_CELL_#{inib}.#{p.get_name}" )
+          else
+            f.print( "\t  (p_that)#{inib}->#{p.get_name}" )
+          end
+          f.print( "#{subsc}->VMT->#{fun.get_name}__T( \\\n" )
+        else
+          # æé©åã³ã¼ã (optimize) # VMT ä¸è¦
+          p2 = p.get_real_callee_port
+          if p2 then
+            ct = p2.get_celltype
+            if p.is_skelton_useless? then
+              # åãå£é¢æ°ãç´æ¥å¼åºã
+              f.print( "\t  #{ct.get_global_name}_#{p2.get_name}_#{fun.get_name}( \\\n" )
+            else
+              # åãå£ã¹ã±ã«ãã³é¢æ°ãç´æ¥å¼åºã
+              f.print( "\t  #{ct.get_global_name}_#{p2.get_name}_#{fun.get_name}_skel( \\\n" )
+              # print "skelton: #{@name} #{ct.get_global_name}_#{p2.get_name}\n"
+            end
+          else
+            # optional ã§æªçµå
+            f.print( "\t  ((#{fun.get_declarator.get_type.get_type.get_type_str} (*)()" )
+            f.print( "#{fun.get_declarator.get_type.get_type.get_type_str_post})0)()\n" )
+            f.print( "\t  /* optional no entry port joined */\n" )
+            if ! p.is_optional? then
+              raise "unjoined but not optional celltype: #{@name} #{p.get_name}"
+            end
+          end
+        end
+
+        b_join = true    # optional ã§çµåãã¦ããªãå ´å false
+
+        # åãå£æ
+å ±ã®åºå(æ¨æºï¼åãå£ãã£ã¹ã¯ãªãã¿ãæé©åï¼IDX ãªã©)
+        if ! p.is_skelton_useless? && ! p.is_cell_unique? then
+          # æ¨æºã³ã¼ã
+          if @singleton then
+            f.print( "\t  #{@global_name}_SINGLE_CELL_#{inib}.#{p.get_name}#{subsc}" )
+            delim = ","
+          else
+            f.print( "\t   (p_that)#{inib}->#{p.get_name}#{subsc}" )
+            delim = ","
+          end
+        else
+          # æé©åã³ã¼ã (optimize) # ã¹ã±ã«ãã³ä¸è¦
+          c2 = p.get_real_callee_cell               # å¯ä¸ã®ã»ã«(ã§ãªãå ´åããããè¤æ°ã»ã«ãããå ´å)
+          p2 = p.get_real_callee_port               # å¯ä¸ã®ãã¼ã(ã§ãªãå ´åã¯ããªã)
+          if p2 then
+            ct = p2.get_celltype                    # å¼ã³å
+ã®ã»ã«ã¿ã¤ã
+            if ! ct.is_singleton? then
+              if ct.has_CB? || ct.has_INIB? then
+                if p.is_cell_unique? then
+                  name_array = ct.get_name_array( c2 )
+                  f.print( "\t   #{name_array[7]}" )
+                else
+                  # CELLCB IDX ãæ¸¡ã (æ¨æºã³ã¼ãã¨åãã ããæ±ãåã¯ç°ãªã)
+                  # p.is_skelton_useless? == true/false ã¨ãã«åã
+                  f.print( "\t   (p_that)#{inib}->#{p.get_name}#{subsc}" )
+                end
+              else
+                f.print( "\t   (#{ct.get_global_name}_IDX)0" )
+              end
+              delim = ","
+            else
+              f.print( "\t   " )
+            end
+          else
+            # optional ã§æªçµå
+            b_join = false
+          end
+        end
+
+        if b_join then
+          ft.get_paramlist.get_items.each{ |param|
+            f.print( "#{delim} (#{param.get_name})" )
+            delim = ","
+          }
+          f.print( " )\n" )
+        end
+      }
+    }
+    f.print( "\n" )
+  end
+
+  #=== send/receive ã§åãåã£ãã¡ã¢ãªé åã dealloc ãããã¯ã­ã³ã¼ã
+  #f:: File
+  #b_undef:: bool : true = #undef ã³ã¼ãã®çæ,  false = #define ã³ã¼ãã®çæ
+  def  gen_ph_dealloc_code( f, append_name, b_undef = false )
+    b_msg = false
+    @port.each{ |p|
+      next if p.is_omit?
+
+      p.each_param{ |port, fd, par|
+        case par.get_direction                        # å¼æ°ã®æ¹åæå®å­ (in, out, inout, send, receive )
+        when :SEND
+          # next if port.get_port_type == :CALL
+          type = par.get_declarator.get_type
+          pre = "("
+          post = ")"
+        when :RECEIVE
+          # next if port.get_port_type == :ENTRY
+          type = par.get_declarator.get_type.get_type
+#          pre = "(*"
+#          post = ")"
+          pre = "("
+          post = ")"
+        else
+          next
+        end
+
+        #                      ãã¼ãå         é¢æ°å         ãã©ã¡ã¼ã¿å
+        dealloc_func_name = "#{port.get_name}_#{fd.get_name}_#{par.get_name}_dealloc"
+        dealloc_macro_name = dealloc_func_name.upcase
+        name = par.get_name
+
+        if b_undef == false
+          if (type.get_size || type.get_count) && type.get_type.has_pointer?
+            count_str = "count__"
+            count_str2 = ", count__"
+          else
+            count_str = nil
+            count_str2 = nil
+          end
+          if ! b_msg
+            f.print "\n"
+            f.printf TECSMsg.get( :DAL_comment ), "#_DAL_#  #{append_name}"
+            b_msg = true
+          end
+          f.print "#define #{dealloc_macro_name}#{append_name}(#{name}#{count_str2})"
+          if append_name == "_RESET" then
+            gen_dealloc_code_for_type( f, type, dealloc_func_name, pre, name, post, 0, true, count_str )
+          else
+            gen_dealloc_code_for_type( f, type, dealloc_func_name, pre, name, post, 0, false, count_str )
+          end
+          f.print "\n"
+        else
+          f.print "#undef #{dealloc_macro_name}#{append_name}\n"
+        end
+      }
+    }
+  end
+
+  def gen_ph_cp_fun_macro_abbrev f
+    if @n_call_port >0 then
+      f.printf( TECSMsg.get( :CPMA_comment ), "#_CPMA_#" )
+    end
+
+    @port.each { |p|
+      next if p.get_port_type != :CALL
+      # next if p.is_omit?  å¼ã³åºãã¨ã¨ã©ã¼ãèµ·ããã³ã¼ããçæ
+
+      p.get_signature.get_function_head_array.each{ |fun|
+        if p.is_VMT_useless? && ! @singleton then
+          dummy_p_cell_access_pre = "((void)p_cellcb, "
+          dummy_p_cell_access_post = ")"
+        else
+          dummy_p_cell_access_pre = ""
+          dummy_p_cell_access_post = ""
+        end
+ 
+        if ! p.is_require? || p.has_name? then
+          f.print( "#define #{p.get_name}_#{fun.get_name}(" )
+        else
+          f.print( "#define #{fun.get_name}(" )
+        end
+        ft = fun.get_declarator.get_type
+        delim = ""
+
+#        if ! @singleton then
+#          f.print( "#{delim} p_that" )
+#          delim = ","
+#        end
+
+        if p.get_array_size then
+          f.print( "#{delim} subscript" )
+          delim = ","
+        end
+
+        ft.get_paramlist.get_items.each{ |param|
+          f.print( "#{delim} #{param.get_name}" )
+          delim = ","
+        }
+        f.print( " ) \\\n" )
+
+        if p.is_omit? then
+          f.print( "                      #{dummy_p_cell_access_pre}omitted #{p.get_name}_#{fun.get_name}(" )
+        else
+          f.print( "                      #{dummy_p_cell_access_pre}#{@global_name}_#{p.get_name}_#{fun.get_name}(" )
+        end
+        ft = fun.get_declarator.get_type
+        delim = ""
+
+        if ! @singleton then
+          f.print( "#{delim} p_cellcb" )
+          delim = ","
+        end
+
+        if p.get_array_size then
+          f.print( "#{delim} subscript" )
+          delim = ","
+        end
+
+        ft.get_paramlist.get_items.each{ |param|
+          f.print( "#{delim} #{param.get_name}" )
+          delim = ","
+        }
+        f.print( " )#{dummy_p_cell_access_post}\n" )
+      }
+    }
+    f.print( "\n" )
+  end
+
+  def gen_ph_ep_fun_macro f
+    if @n_entry_port >0 then
+      f.printf( TECSMsg.get( :EPM_comment ), "#_EPM_#" )
+    end
+
+    @port.each { |p|
+      next if p.get_port_type != :ENTRY
+      next if p.is_omit?
+
+      p.get_signature.get_function_head_array.each{ |fun|
+        f.printf( "#define %-16s %s\n",
+                  "#{p.get_name}_#{fun.get_name}",
+                  "#{@global_name}_#{p.get_name}_#{fun.get_name}" )
+      }
+    }
+    f.print( "\n" )
+
+  end
+
+  def gen_ph_typedef_idx f
+    f.printf( TECSMsg.get( :CTIX_comment ), "#_CTIX_#" )
+    if @idx_is_id_act then
+      f.print( "typedef ID #{@global_name}_IDX;\n" )
+    else
+      if has_CB? then
+        f.print( "typedef struct tag_#{@global_name}_CB *#{@global_name}_IDX;\n" )
+      elsif has_INIB? then
+        f.print( "typedef const struct tag_#{@global_name}_INIB *#{@global_name}_IDX;\n" )
+      else
+        f.print( "typedef int   #{@global_name}_IDX;\n" )
+      end
+    end
+
+  end
+
+  def gen_ph_idx_type f
+    if @idx_is_id_act then
+      f.print( "ID" )
+    else
+      if has_CB? then
+        f.print( "struct tag_#{@global_name}_CB *" )
+      elsif has_INIB? then
+        # f.print( "struct tag_#{@global_name}_INIB *" )  # const ãåºåãã¦ããªã
+        f.print( "const struct tag_#{@global_name}_INIB *" )
+      else
+        f.print( "int" )
+      end
+    end
+
+  end
+
+  def gen_ph_ep_fun_prototype f
+    if @n_entry_port >0 then
+      f.printf( TECSMsg.get( :EPP_comment ), "#_EPP_#" )
+    end
+
+    @port.each { |p|
+      next if p.get_port_type != :ENTRY
+      next if p.is_omit?
+
+      f.print( "/* #{p.get_signature.get_global_name} */\n" )
+
+      p.get_signature.get_function_head_array.each{ |fun|
+        if p.is_inline? then
+          f.print( "Inline " )
+        end
+        functype = fun.get_declarator.get_type
+        f.printf( "%-12s", functype.get_type_str )
+
+        f.print( " #{@global_name}_#{p.get_name}_#{fun.get_name}(" )
+        if @singleton then
+           delim = ""
+        else
+          f.print( "#{@global_name}_IDX idx" )
+          delim = ","
+        end
+
+        if p.get_array_size then
+          f.print( "#{delim} int_t subscript" )     # mikan singleton æã® ',' ã®å§æ«
+          delim = ","
+        end
+
+        if functype.get_paramlist then
+          items = functype.get_paramlist.get_items
+          len = items.length
+        else
+          # ããã§ nil ã«ãªãã®ã¯ãå¼æ°ãªãã®æã« void ããªãã£ãå ´å
+          items = []
+          len = 0
+        end
+        i = 0
+        items.each{ |param|
+          f.print "#{delim} "
+          delim = ","
+          f.print( param.get_type.get_type_str )
+          f.print( " " )
+          f.print( param.get_name )
+          f.print( param.get_type.get_type_str_post )
+          i += 1
+        }
+        f.print( ");\n" )
+
+      }
+    }
+  end
+
+  def gen_ph_ep_skel_prototype f
+    # åãå£ã¹ã±ã«ãã³é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨ãåºå
+    if @n_entry_port >0 then
+      f.printf( TECSMsg.get( :EPSP_comment ), "#_EPSP_#" )
+    end
+    @port.each { |p|
+      next if p.get_port_type != :ENTRY
+      next if p.is_omit?
+#      if p.is_skelton_useless? || ! p.is_VMT_useless? then    # åãå£æé©å
+      if p.is_skelton_useless? then    # åãå£æé©å
+#        f.print( "/* #{p.get_name} : omitted by entry port optimize */\n" )
+        next
+      end
+
+      f.print( "/* #{p.get_name} */\n" )
+
+      p.get_signature.get_function_head_array.each{ |fun|
+        functype = fun.get_declarator.get_type
+        f.printf "%-14s", functype.get_type_str
+
+        f.print " #{@global_name}_#{p.get_name}_#{fun.get_name}_skel("
+        f.print " const struct tag_#{p.get_signature.get_global_name}_VDES *epd"
+        delim = ","
+
+        if functype.get_paramlist then
+          items = functype.get_paramlist.get_items
+          len = items.length
+        else
+          # ããã§ nil ã«ãªãã®ã¯ãå¼æ°ãªãã®æã« void ããªãã£ãå ´å
+          items = []
+          len = 0
+        end
+        i = 0
+        items.each{ |param|
+          f.print "#{delim} "
+          delim = ","
+          f.print param.get_type.get_type_str
+          f.print " "
+          f.print param.get_name
+          f.print param.get_type.get_type_str_post
+          i += 1
+        }
+        f.print ");\n"
+      }
+    }
+    f.print( "\n" )
+  end
+
+  def gen_ph_cell_cb_type f
+
+    if ( $rom )then
+      # å®æ°é¨ã¯ ROM, å¤æ°é¨ã¯ RAM
+
+      if has_INIB? then
+
+        f.printf( TECSMsg.get( :CIP_comment ), "#_CIP_#" )
+        f.print( "typedef const struct tag_#{@global_name}_INIB {\n" )
+
+        gen_cell_cb_type_port f
+        gen_cell_cb_type_attribute( f, :INIB )
+
+        f.print( "}  #{@global_name}_INIB;\n" )
+
+      end
+
+      if has_CB? then
+        f.printf( TECSMsg.get( :CCTPA_comment ), "#_CCTPA_#" )
+        f.print( "typedef struct tag_#{@global_name}_CB {\n" )
+        if has_INIB? then
+          f.print "    #{@global_name}_INIB  *_inib;\n"
+        end
+        gen_cell_cb_type_attribute( f, :CB )
+        gen_cell_cb_type_var f
+        f.print( "}  #{@global_name}_CB;\n" )
+      end
+
+      if ! has_CB? && ! has_INIB? then
+        f.printf( TECSMsg.get( :CCDP_comment ), "#_CCDP_#" )
+        f.print( "typedef struct tag_#{@global_name}_CB {\n" )
+        f.print( "    int  dummy;\n" )
+        f.print( "} #{@global_name}_CB;\n" )
+     end
+
+    else
+      # å
+¨ã¦ RAM
+      f.printf( TECSMsg.get( :CCTPO_comment ), "#_CCTPO_#" )
+
+      f.print( "typedef struct tag_#{@global_name}_CB {\n" )
+
+      gen_cell_cb_type_port f
+      gen_cell_cb_type_attribute( f, :CB )
+      gen_cell_cb_type_var f
+
+      f.print( "}  #{@global_name}_CB;\n" )
+    end
+  end
+
+
+  #===   attribute ã®åå®£è¨åºå
+  #inib_cb::  :INIB ã¾ãã¯ :CB
+  def gen_cell_cb_type_attribute( f, inib_cb )
+    if inib_cb == :INIB && @n_attribute_ro > 0 then
+      f.print "    /* attribute(RO) #_ATO_# */ \n"
+    elsif inib_cb == :CB then
+      if $rom then
+        if @n_attribute_rw > 0 then
+          f.print "    /* attribute(RW) #_ATW_# */ \n"
+        end
+      else
+        if @n_attribute_rw > 0 || @n_attribute_ro > 0 then
+          f.print "    /* attribute #_AT_# */ \n"
+        end
+      end
+    end
+
+    @attribute.each{ |a|
+      next if a.is_omit?
+      next if inib_cb == :INIB && a.is_rw?
+      next if has_INIB? && inib_cb == :CB && ! a.is_rw?
+
+      if a.get_type.kind_of?( PtrType ) && ! a.get_type.is_const? && a.get_size_is then
+        const_str = "const "
+      else
+        const_str = ""
+      end
+      f.print "    "
+      f.printf( "#{const_str}%-14s", a.get_type.get_type_str )
+      f.print " #{a.get_name}#{a.get_type.get_type_str_post};\n"
+    }
+    @var.each { |v|
+      next if v.is_omit?
+      next if v.get_size_is == nil
+      next if $rom && inib_cb == :CB      # size_is æå®ããããã®ã¯ INIB ã«ã®ã¿åºåãã
+
+      f.print "    "
+      f.printf( "%-14s", v.get_type.get_type_str )
+      f.print " #{v.get_name}#{v.get_type.get_type_str_post};\n"
+    }
+  end
+
+  def gen_cell_cb_type_var f
+    # å¤æ°ã®åºå
+    if @n_var > 0 then
+      f.print "    /* var #_VA_# */ \n"
+    end
+
+    @var.each{ |v|
+
+      next if v.is_omit?
+      next if v.get_size_is != nil    # size_is æå®ããã var ã¯ attribute ã¸åºåãã
+
+      f.print "    "
+      f.printf( "%-14s", v.get_type.get_type_str )
+      f.print " #{v.get_name}#{v.get_type.get_type_str_post};\n"
+    }
+  end
+
+  def gen_cell_cb_type_port f
+    gen_cell_cb_type_call_port f
+    gen_cell_cb_type_entry_port f
+  end
+
+  def gen_cell_cb_type_call_port f
+    # å¼ã³å£
+    if @n_call_port >0 then
+      f.print "    /* call port #_TCP_# */ \n"
+    end
+
+    @port.each{ |p|
+      next if p.get_port_type != :CALL
+      next if p.is_omit?
+      ptr = ''
+      ptr = '*' if p.get_array_size
+
+      if ! p.is_cell_unique? then
+        if ! p.is_skelton_useless? then
+          # æ¨æºå½¢
+          f.print( "    struct tag_#{p.get_signature.get_global_name}_VDES #{ptr}const*#{p.get_name;};\n" )
+          if p.get_array_size == "[]" then
+            f.print( "    int_t n_#{p.get_name};\n" )
+          end
+        else
+          # æé©å skelton é¢æ°ãå¼åºããªã(åãå£é¢æ°ãç´æ¥å¼åºã)
+          # å¼ã³å
+ã»ã«ã¿ã¤ãã® CB ã® IDX å
+          if p.get_real_callee_cell then
+            f.print( "    " )
+            p.get_real_callee_cell.get_celltype.gen_ph_idx_type f
+            f.print( " #{ptr}#{p.get_name;};\n" )
+            # ç¸äºåç
+§ã«åãã¦ãtypedef ããåãä½¿ããªã
+            # f.print( "    #{p.get_real_callee_cell.get_celltype.get_global_name}_IDX #{ptr}#{p.get_name;};\n" )
+            if p.get_array_size == "[]" then
+              f.print( "    int_t n_#{p.get_name};\n" )
+            end
+          #else
+          #  optional ã§æªçµå
+          end
+        end
+      # else
+        # æé©å ä¸ã¤ããã»ã«ããªãå ´åãåãå£ãã£ã¹ã¯ãªãã¿ã¾ãã¯åãå´ã® IDX ã¯å¼ã³å£é¢æ°ãã¯ã­ã«åãè¾¼ã¾ãã
+      end
+    }
+  end
+
+  #=== Celltype#åãå£é
+åæ·»æ°ãè¨æ¶ããå¤æ°ã®å®ç¾©
+  def gen_cell_cb_type_entry_port f
+    # å¼ã³å£
+    if @n_entry_port >0 then
+      f.print "    /* call port #_NEP_# */ \n"
+    end
+
+    @port.each{ |p|
+      # next if p.is_omit?                       # åãå£é
+åã®åæ°ã¯çç¥ããªã
+      if p.get_port_type == :ENTRY && p.get_array_size == "[]"
+        f.print( "    int_t n_#{p.get_name};\n" )
+      end
+    }
+  end
+
+  def gen_ph_extern_cell f
+    if @singleton then
+      f.printf( TECSMsg.get( :SCP_comment ),  "#_SCP_#" )
+      if has_CB? then
+        f.print "extern  #{@global_name}_CB  #{@global_name}_SINGLE_CELL_CB;\n"
+      end
+      if has_INIB? then
+        f.print "extern  #{@global_name}_INIB  #{@global_name}_SINGLE_CELL_INIB;\n"
+      end
+
+#     @ordered_cell_list.each{ |c|
+#        f.print "extern  #{@global_name}_CB  #{@global_name}_#{c.get_name}_CB;\n"
+#      }
+
+      f.print "\n"
+    elsif @idx_is_id_act then
+      f.print "extern #{@global_name}_CB  *#{@global_name}_CB_tab[];\n"
+    else
+      f.print "extern #{@global_name}_CB  #{@global_name}_CB_tab[];\n"
+    end
+  end
+
+  def gen_ph_INIB_as_CB f
+
+    if ! has_CB? && has_INIB? then
+      f.printf( TECSMsg.get( :DCI_comment ),  "#_DCI_#" )
+      f.print "#define #{@global_name}_CB_tab           #{@global_name}_INIB_tab\n"
+      f.print "#define #{@global_name}_SINGLE_CELL_CB   #{@global_name}_SINGLE_CELL_INIB\n"
+      f.print "#define #{@global_name}_CB               #{@global_name}_INIB\n"
+      f.print "#define tag_#{@global_name}_CB           tag_#{@global_name}_INIB\n"
+      f.print "\n"
+    end
+
+  end
+
+  #===  ã¤ãã¬ã¼ã¿ã³ã¼ã (FOREACH_CELL)ã®çæ
+  #      singleton ã§ã¯åºåããªã
+  def gen_ph_foreach_cell f
+
+    return if @singleton
+
+    if has_CB? || has_INIB? then
+
+      if need_CB_initializer?
+        necessity = ""
+      else
+        necessity = "//"
+      end
+
+      f.printf( TECSMsg.get( :FEC_comment ), "#_FEC_#" )
+
+      if @idx_is_id_act then
+        amp = ''
+      else
+        amp = '&'
+      end
+      f.print <<EOT
+#define FOREACH_CELL(i,p_cb)   \\
+    for( (i) = 0; (i) < #{@global_name}_N_CELL; (i)++ ){ \\
+       #{necessity}(p_cb) = #{amp}#{@global_name}_CB_tab[i];
+
+#define END_FOREACH_CELL   }
+
+EOT
+    else
+      f.printf( TECSMsg.get( :NFEC_comment ), "#_NFEC_#" )
+      f.print <<EOT
+#define FOREACH_CELL(i,p_cb)   \\
+    for((i)=0;(i)<0;(i)++){
+
+#define END_FOREACH_CELL   }
+
+EOT
+    end
+  end
+
+
+  #===  å¤æ°varåæåã³ã¼ã
+  #
+  def gen_ph_cb_initialize_macro f
+
+    f.printf( TECSMsg.get( :CIM_comment ), "#_CIM_#" )
+
+    @var.each { |v|
+      init = v.get_initializer
+      if init.instance_of? Array then
+        type = v.get_type
+        if( type.kind_of? PtrType )then
+          # PtrType ã¯ ArrayType ã«ããæ¿ãã
+
+          # åæåå­ã®è¦ç´ æ°ã¨ãã (å¾ã¯ 0 ã§ãã)
+          t2 = ArrayType.new( Expression.create_integer_constant( init.length, nil ) )
+          t2.set_type( type.get_type )
+          type = t2
+        end
+        f.print "extern const #{type.get_type_str} #{@global_name}_#{v.get_name}_VAR_INIT#{type.get_type_str_post};\n"
+      end
+    }
+    if @singleton then
+      arg = "()"
+      p_that = ""
+      that = "#{@global_name}_SINGLE_CELL_CB."
+    else
+      arg = "(p_that)"
+      p_that = "(p_that)"
+      that = "(p_that)->"
+    end
+
+    if @n_cell_gen > 0 && need_CB_initializer? then
+      f.print "#define INITIALIZE_CB#{arg}"
+      @var.each { |v|
+        init = v.get_initializer
+        next if init == nil
+
+        type = v.get_type.get_original_type
+        f.print "\\\n"
+#        print v.get_name, type.class, "\n"
+#        if init.instance_of? Array || type.kind_of?( StructType ) then
+        if init.instance_of? Array then
+          if(type.kind_of?( ArrayType ) || type.kind_of?( PtrType ))then
+            pre = "&"
+            post = "[0]"
+          elsif type.kind_of? StructType then
+            pre = "&"
+            post = ""
+#          elsif type.kind_of? PtrType then
+#            pre = ""
+#            post = ""
+          end
+          f.print "\tmemcpy((void*)#{pre}#{@global_name}_VAR_#{v.get_name}#{p_that}#{post}, (void*)#{pre}#{@global_name}_#{v.get_name}_VAR_INIT#{post}, sizeof(#{@global_name}_#{v.get_name}_VAR_INIT));"
+        elsif init.instance_of? C_EXP then
+          f.print "\t#{that}#{v.get_name} = #{init.get_c_exp_string};"
+        else
+          pre = "#{get_global_name}_ATTR_"
+          if @singleton then
+            post = ""
+          else
+            post = "#{p_that}"
+          end
+          f.print "\t#{that}#{v.get_name} = #{init.to_str( @name_list, pre, post )};"
+        end
+      }
+      f.print "\n"
+
+      f.print "#define SET_CB_INIB_POINTER(i,p_that)\\\n"
+      if has_CB? && has_INIB? then
+        if @singleton then
+          f.print "\t#{that}_inib = &#{@global_name}_SINGLE_CELL_INIB;\n\n"
+        elsif @idx_is_id_act
+          f.print "\t#{that}_inib = #{@global_name}_INIB_tab[(i)];\n\n"
+        else
+          f.print "\t#{that}_inib = &#{@global_name}_INIB_tab[(i)];\n\n"
+        end
+      else
+        f.print "\t/* empty */\n"
+      end
+
+    # else
+    #   ã»ã«ãä¸ã¤ããªããã°åºåããªã
+    end
+
+  end
+
+
+  def gen_ph_inline f
+    # inline ãã¼ããä¸ã¤ã§ãããã°ãinline.h ã® include
+    if @n_entry_port_inline > 0 then
+      f.printf( TECSMsg.get( :INL_comment ), "#_INL_#" )
+      f.print( "#include \"#{@global_name}_inline.#{$h_suffix}\"\n\n" )
+    end
+  end
+
+  def gen_ph_endif( f, post = "TECSGEN" )
+    f.print("#endif /* #{@global_name}_#{post}H */\n")
+  end
+
+
+##### celltype factory header
+  def generate_factory_header
+
+    f = AppFile.open("#{$gen}/#{@global_name}_factory.#{$h_suffix}")
+    f.print("#ifndef #{@name}_FACTORY_H\n")
+    f.print("#define #{@name}_FACTORY_H\n")
+    f.close
+  end
+
+  def generate_factory_header_post
+
+    f = AppFile.open("#{$gen}/#{@global_name}_factory.#{$h_suffix}")
+
+    plugin_obj = get_celltype_plugin
+    if plugin_obj
+      plugin_obj.gen_factory f
+    end
+
+    f.print("#endif /* #{@name}_FACTORY_H */\n")
+    f.close
+  end
+
+
+#####  celltype glue code
+  def gen_cell_private_header f
+    f.print "#include \"#{@global_name}_tecsgen.#{$h_suffix}\"\n"
+  end
+
+  def gen_cell_factory_header f
+    f.print "#include \"#{@global_name}_factory.#{$h_suffix}\"\n\n"
+  end
+
+  def gen_cell_ep_des_type f
+    if @n_entry_port > 0 then
+      f.printf( TECSMsg.get( :EDT_comment ), "#_EDT_#" )
+    end
+
+    @port.each { |p|
+      next if p.get_port_type != :ENTRY
+      next if p.is_omit?
+      if p.is_skelton_useless?    # åãå£æé©å
+        f.print( "/* #{p.get_name} : omitted by entry port optimize */\n\n" )
+        next
+      end
+
+      f.print( "/* #{p.get_name} */\n" )
+      f.print( "struct tag_#{@global_name}_#{p.get_name}_DES {\n" )
+      f.print( "    const struct tag_#{p.get_signature.get_global_name}_VMT *vmt;\n" )
+      if has_CB? || has_INIB? then
+        f.print( "    #{@name}_IDX  idx;\n" )
+      else
+        # CB ã INIB ãå­å¨ããªã (ã®ã§ãidx ã¨ãã¦æ´æ°ã§åæåãã¦ãã)
+        f.print( "    int           idx;\n" )
+      end
+      if p.get_array_size then
+        f.print( "    int_t  subscript;\n" )
+      end
+      f.print( "};\n\n" )
+    }
+  end
+
+  def gen_cell_skel_fun f
+    if @n_entry_port >0 then
+      f.printf( TECSMsg.get( :EPSF_comment ), "#_EPSF_#" )
+    end
+
+    @port.each { |p|
+      next if p.get_port_type != :ENTRY
+      next if p.is_omit?
+      if p.is_skelton_useless? then    # åãå£æé©å
+        f.print( "/* #{p.get_name} : omitted by entry port optimize */\n" )
+        next
+      end
+
+      f.print( "/* #{p.get_name} */\n" )
+
+      p.get_signature.get_function_head_array.each{ |fun|
+        functype = fun.get_declarator.get_type
+        f.printf "%-14s", functype.get_type_str
+
+        f.print " #{@global_name}_#{p.get_name}_#{fun.get_name}_skel("
+        f.print " const struct tag_#{p.get_signature.get_global_name}_VDES *epd"
+        delim = ","
+
+        if functype.get_paramlist then
+          items = functype.get_paramlist.get_items
+          len = items.length
+        else
+          # ããã§ nil ã«ãªãã®ã¯ãå¼æ°ãªãã®æã« void ããªãã£ãå ´å
+          items = []
+          len = 0
+        end
+        i = 0
+        items.each{ |param|
+          f.print "#{delim} "
+          delim = ","
+          f.print param.get_type.get_type_str
+          f.print " "
+          f.print param.get_name
+          f.print param.get_type.get_type_str_post
+          i += 1
+        }
+        f.print ")\n"
+
+        f.print "{\n"
+        if ( ! @singleton || p.get_array_size != nil ) then
+          f.print "    struct tag_#{@global_name}_#{p.get_name}_DES *lepd\n"
+          f.print "        = (struct tag_#{@global_name}_#{p.get_name}_DES *)epd;\n"
+        end
+
+        if functype.get_type_str == "void" then # mikan "void" ã® typedef ã«æªå¯¾å¿
+          f.print "    "
+        else
+          f.print "    return "
+        end
+
+        f.print "#{@global_name}_#{p.get_name}_#{fun.get_name}("
+        if @singleton then
+          delim = ""
+        else
+          f.print " lepd->idx"
+          delim = ","
+        end
+
+        if p.get_array_size then
+          f.print "#{delim} lepd->subscript"
+          delim = ","
+        end
+
+        items.each{ |param|
+          f.print "#{delim} "
+          delim = ","
+          f.print param.get_name
+          i += 1
+        }
+        f.print " );\n"
+
+        f.print "}\n"
+      }
+    }
+    if @n_entry_port >0 then
+      f.print( "\n" )
+    end
+  end
+
+  def gen_cell_fun_table f
+    if @n_entry_port >0 then
+      f.printf( TECSMsg.get( :EPSFT_comment ), "#_EPSFT_#" )
+    end
+
+    @port.each { |p|
+      next if p.get_port_type != :ENTRY
+      next if p.is_omit?
+      if p.is_VMT_useless? then    # åãå£æé©å
+        f.print "/* #{p.get_name} : omitted by entry port optimize */\n"
+        next
+      end
+
+      f.print "/* #{p.get_name} */\n"
+
+      # f.print "static const struct tag_#{p.get_signature.get_global_name}_VMT"
+      f.print "const struct tag_#{p.get_signature.get_global_name}_VMT"
+      f.print " #{@global_name}_#{p.get_name}_MT_ = {\n"
+
+      p.get_signature.get_function_head_array.each{ |fun|
+        f.print "    #{@global_name}_#{p.get_name}_#{fun.get_name}_skel,\n"
+      }
+
+      f.print "};\n"
+    }
+    f.print "\n"
+
+  end
+
+  def gen_cell_ep_vdes fs
+    if @n_cell_gen  >0 then
+      fs.each{ |r,f| f.printf( TECSMsg.get( :CPEPD_comment ), "#_CPEPD_#" ) }
+    end
+
+    # ãã®ã»ã«ã¿ã¤ãã®ãã¹ã¦ã®ã»ã«ã«ã¤ãã¦
+    @ordered_cell_list.each{ |c|
+      if c.is_generate? then                           # çæå¯¾è±¡ãï¼
+
+        f = fs[ c.get_region.get_domain_root ]
+
+        # çµåã®ãªã¹ã (NamedList)
+        jl = c.get_join_list
+
+        # å
+¨ã¦ã®çµåãªã¹ãã«ã¤ãã¦
+        jl.get_items.each{ |j|
+
+          # å·¦è¾ºã®å®ç¾©ãå¾ã
+          definition = j.get_definition
+
+          # å¼ã³å£ã§ã¯ãªãï¼ãï¼å±æ§ï¼
+          next unless definition.instance_of? Port
+
+          port = find j.get_name # celltype ã® Port (ãã¡ãã«æé©åæ
+å ±ããã)
+          # port = definition    # definition ã¯ composite ã® Port ãå¾ããããã¨ããã
+          next if port.is_cell_unique?
+          next if port.is_omit?
+
+          # é
+åè¦ç´ ãå¾ãï¼åãå£é
+åã§ãªããã° nil ãè¿ãï¼
+          am = j.get_array_member2
+
+          # å¼ã³å£é
+åã?
+          if am  then
+            i = 0
+            while( i < am.length )
+              j = am[i]
+              if j then
+                if am[i].get_cell.get_celltype == self then
+                  # åãã»ã«ã¿ã¤ãã¸çµåãã¦ããå ´å(VDES ã§ã¯ type conflict ã«ãªã)
+                  p = am[i].get_rhs_port
+                  des_type = "const struct tag_#{@global_name}_#{p.get_name}_DES"
+                else
+                  des_type = "struct tag_#{definition.get_signature.get_global_name}_VDES"
+                end
+
+                # å³è¾ºã¯åãå£é
+åãï¼
+                if j.get_rhs_subscript then
+
+                  # åãå£ã®é
+åæ·»æ°
+                  subscript = j.get_rhs_subscript
+
+                  f.printf( "extern %s %s%d;\n",
+                            des_type,
+                            "#{j.get_port_global_name(i)}_des",
+                            subscript)
+                else
+                  f.printf( "extern %s %s;\n",
+                            des_type,
+                            "#{j.get_port_global_name(i)}_des")
+                end
+              #else if j == nil
+              #  optioanl ã§é
+åè¦ç´ ãåæåããã¦ããªã
+              end
+              i += 1
+            end
+          else
+            if j.get_cell.get_celltype == self then
+              # åãã»ã«ã¿ã¤ãã¸çµåãã¦ããå ´å(VDES ã§ã¯ type conflict ã«ãªã)
+              p = j.get_rhs_port
+              des_type = "const struct tag_#{@global_name}_#{p.get_name}_DES"
+            else
+              des_type = "struct tag_#{definition.get_signature.get_global_name}_VDES"
+            end
+
+            if j.get_rhs_subscript then
+              # åãå£é
+å
+              subscript = j.get_rhs_subscript
+              f.printf( "extern %s %s%d;\n",
+                        des_type,
+                        "#{j.get_port_global_name}_des",
+                        subscript)
+            else
+              f.printf( "extern %s %s;\n",
+                        des_type,
+                        "#{j.get_port_global_name}_des" )
+            end
+          end
+          # mikan   cell ã® namespace æªå¯¾å¿ãJoin ã§ Cell ãªãã¸ã§ã¯ããå¼å½ã¦ããå¿
+è¦ãã
+        }
+
+        f.print "\n"
+      end
+    }
+  end
+
+  def gen_cell_ep_vdes_array fs
+    if @n_cell_gen >0 then
+      fs.each{ |r, f| f.printf( TECSMsg.get( :CPA_comment ), "#_CPA_#" ) }  # mikan å¼ã³å£é
+åãç¡ãå ´åãåºã¦ãã¾ã
+    end
+
+    @ordered_cell_list.each{ |c|
+      if c.is_generate? then
+        f = fs[ c.get_region.get_domain_root ]
+
+        jl = c.get_join_list
+        jl.get_items.each{ |j|
+          definition = j.get_definition
+          next unless definition.instance_of? Port
+          # port = definition    # definition ã¯ composite ã® Port ãå¾ããããã¨ããã
+          port = find j.get_name # celltype ã® Port (ãã¡ãã«æé©åæ
+å ±ããã)
+          next if port.is_cell_unique?
+          next if port.is_omit?
+
+          am = j.get_array_member2
+          if am  then
+            # å·¦è¾ºã¯é
+å
+
+            if ! port.is_skelton_useless? then
+              f.printf( "struct %s * const %s_%s[] = {\n",
+                        "tag_#{port.get_signature.get_global_name}_VDES",
+                        "#{c.get_global_name}",
+                        "#{j.get_name}" )
+            else
+
+#              ã¹ã±ã«ãã³é¢æ°ä¸è¦æé©åã®å ´åããã®é
+åã¯åç
+§ãããªã
+              # mikan ãã®ã±ã¼ã¹ããã¹ãããã¦ããªã
+              f.printf( "const %s_IDX  %s_%s[] = {\n",
+#                        "#{j.get_celltype.get_global_name}",   # å³è¾º composite ã«å¯¾å¿ã§ããªã
+                        "#{j.get_rhs_cell.get_celltype.get_global_name}",
+                        "#{c.get_global_name}",
+                        "#{j.get_name}" )
+            end
+            if port.get_array_size == "[]" then
+              length = am.length
+            else
+              length = port.get_array_size
+            end
+            # am.each { |j|
+            i = 0
+            while i < length
+              j = am[i]
+              i += 1
+
+              if j then
+                # åä¸ã»ã«ã¿ã¤ãã®çµåã®å ´åãVDES åã¸ã®ã­ã£ã¹ããå¿
+è¦
+                if j.get_rhs_cell.get_celltype == self then
+                  definition = j.get_definition
+                  des_type_cast = "(struct tag_#{definition.get_signature.get_global_name}_VDES *)"
+                else
+                  des_type_cast = ""
+                end
+
+                
+                if j.get_rhs_subscript then
+                  # å³è¾ºé
+åã®å ´å(æé©åã¯ãªã)
+                  subscript = j.get_rhs_subscript
+                  f.printf( "    %s%d,\n",
+                            "#{des_type_cast}&#{j.get_port_global_name}_des",
+                            subscript)
+                  # p "1: #{j.get_port_global_name}_des"
+                  # p "2: #{j.get_cell_global_name}_#{j.get_port_name}_des"
+
+                else
+                  # å³è¾ºéé
+åã®å ´å */
+                  if ! port.is_skelton_useless? then
+                    f.printf( "    %s,\n",
+                              "#{des_type_cast}&#{j.get_port_global_name}_des" )
+                  else
+                    cell = j.get_rhs_cell
+                    name_array = cell.get_celltype.get_name_array( cell )
+                    f.printf( "    #{name_array[7]},\n" )
+                  end
+                end
+              else
+                # optional ã§å¼ã³å£é
+åè¦ç´ ãåæåããã¦ããªã
+                f.printf( "    0,\n" )
+              end
+            # }
+            end
+            # mikan   cell ã® namespace æªå¯¾å¿ãJoin ã§ Cell ãªãã¸ã§ã¯ããå¼å½ã¦ããå¿
+è¦ãã
+            f.print "};\n"
+          end
+        }
+
+        f.print "\n"
+      end
+    }
+  end
+
+  #=== CB ãåæåãããã­ã°ã©ã ã®çæ
+  def gen_cell_cb_initialize_code f
+    if ! need_CB_initializer?
+      return
+    end
+    f.printf( TECSMsg.get( :CIC_comment ), "#_CIC_#" )
+    f.print <<EOT
+void
+#{@global_name}_CB_initialize()
+{
+EOT
+    if @singleton then
+      f.print <<EOT
+    SET_CB_INIB_POINTER(i,p_cb)
+    INITIALIZE_CB()
+EOT
+    else
+      f.print <<EOT
+    #{@global_name}_CB	*p_cb;
+    int		i;
+    FOREACH_CELL(i,p_cb)
+        SET_CB_INIB_POINTER(i,p_cb)
+        INITIALIZE_CB(p_cb)
+    END_FOREACH_CELL
+EOT
+    end
+
+    f.print <<EOT
+}
+EOT
+  end
+
+  # === CB/INIB ã®å¤ã§åæåãããå¤æ°ã®åºå
+  def gen_cell_cb_out_init fs
+
+    # ã»ã«ããªããã°ãåºåããªã
+    if @n_cell_gen == 0 then
+      return
+    end
+
+    fs.each{ |r, f| f.printf( TECSMsg.get( :AVAI_comment ), "#_AVAI_#" ) }
+
+    # attribute, var ã®ãã¤ã³ã¿åã®åç
+§ããé
+åãçæ
+    @ordered_cell_list.each{ |c|
+      next if  ! c.is_generate?
+
+      f = fs[ c.get_region.get_domain_root ]
+      name_array = get_name_array( c )
+
+      ct = c.get_celltype
+      jl = c.get_join_list
+
+      # attribute, var ã®ãã¤ã³ã¿å¤æ°ãé
+åã«ããåæåãããå ´åã®ãé
+åãåºå
+      av_list = ct.get_attribute_list + ct.get_var_list
+      if av_list.length != 0 then
+        av_list.each{ |a|    # a: Decl
+          j = jl.get_item( a.get_identifier )
+          if j then
+            init = j.get_rhs
+          else
+            init = a.get_initializer
+          end
+
+          if( a.is_type?( PtrType ) && ( (init && init.instance_of?( Array )) || init == nil ) )then
+            ptr_type = a.get_type
+            size = ptr_type.get_size
+
+            if size then
+              # å¼ãè©ä¾¡ãã(attribute, var ã«å«ã¾ããå¤æ°ãåç
+§å¯è½)
+              sz = size.eval_const( c.get_join_list, c.get_celltype.get_name_list )
+              # å¼ãçæããªãã (å¤æ°ãå«ã¾ãªãå½¢ã«ãã)  ä¸å®å
+¨ãªå½¢ã§ Token ãçæ (ã¨ã©ã¼çºçããªããã)
+              size = Expression.new( [:INTEGER_CONSTANT, Token.new(sz, nil, 0, 0)] )
+              array_type = ArrayType.new( size )
+              type = a.get_type.get_referto
+              if ! type.is_const? && a.get_kind == :ATTRIBUTE then
+                type.set_qualifier :CONST
+              end
+              array_type.set_type( type )
+              if a.get_kind == :ATTRIBUTE then
+                f.print "const "
+              end
+              f.printf( "#{a.get_type.get_referto.get_type_str} #{name_array[3]}_#{a.get_identifier}_INIT[%d]#{a.get_type.get_referto.get_type_str_post}", sz )
+								# name_array[3]: cell_CB_INIT
+              if !( $ram_initializer && a.get_kind == :VAR ) then
+                # -R (ram initializer ä½¿ç¨) ã®å ´å var ã¯åæåã³ã¼ããåºåããªã
+                if( init )then
+                  str = " = #{gen_cell_cb_init( f, c, name_array, array_type, init, a.get_identifier, 1, true )}"
+                  str = str.sub( /\}$/, "};\n" )
+                else
+                  str = ";\n"
+                end
+                f.print( str )
+              else
+                f.print( ";\n" )
+              end
+            end
+          end
+        }
+      end
+    }
+  end
+
+  #=== var ã®åæå¤ã® ROM é¨ã¸ã®
+  def gen_cell_var_init f
+    # var ã®{ }ã§å²ã¾ããåæå¤æå®ããããèª¿ã¹ã
+    n_init = 0
+    @var.each { |v|
+      init = v.get_initializer
+      if init && init.instance_of?( Array ) then
+        n_init += 1
+      end
+    }
+
+    if n_init > 0 then
+      f.printf( TECSMsg.get( :AVI_comment ), "#_AVI_#" )
+      @var.each { |v|
+        init = v.get_initializer
+        if init && init.instance_of?( Array ) then
+          type = v.get_type.get_original_type
+
+          if( type.kind_of? PtrType )then
+            # PtrType ã¯ ArrayType ã«ããæ¿ãã
+
+            # åæåå­ã®è¦ç´ æ°ã ãã¨ããï¼å¾ã¯ 0)
+            t2 = ArrayType.new( Expression.create_integer_constant( init.length, nil ) )
+            t2.set_type( type.get_type )
+            type = t2
+          end
+
+          c = @ordered_cell_list[0]   # ä»®ã® cell (å®éã«ã¯ä½¿ãããªã)
+          name_array = get_name_array( c )
+          # f.print "const #{type0.get_type_str}\t#{@global_name}_#{v.get_name}_VAR_INIT#{type0.get_type_str_post} = "
+          f.print "const #{type.get_type_str}\t#{@global_name}_#{v.get_name}_VAR_INIT#{type.get_type_str_post} = "
+          if type.kind_of? StructType then
+            # celltype ã® default ã®åæå¤ãã
+            str = gen_cell_cb_init( f, c, name_array, type, init, v.get_identifier, 1, true )
+          elsif( type.kind_of?( PtrType ) || type.kind_of?( ArrayType ) ) then
+            str = "{ "
+            type = type.get_type
+            # mikan ãã¤ã³ã¿ã§ã¯ãªããé
+ååã¨ããªãã¨ããã¤ã³ã¿å¤æ°ã®é åã®åãæãã
+            init.each { |i|
+              str += gen_cell_cb_init( f, c, name_array, type, i, v.get_identifier, 1, true )
+              str += ", "
+            }
+            str += "}"
+          else
+            p type.class
+            raise "Unknown Type"
+          end
+          f.print str
+          f.print ";\n"
+        end
+      }
+      f.print "\n"
+    end
+
+  end
+
+  def gen_cell_cb fs
+    if has_INIB? then
+      if @n_cell_gen > 0 then
+        fs.each{ |r, f| f.printf( TECSMsg.get( :INIB_comment ), "#_INIB_#" ) }
+      end
+      if @singleton then
+        fs.each{ |r, f| f.print "#{@global_name}_INIB #{@global_name}_SINGLE_CELL_INIB = \n" }
+        indent = 0
+      elsif ! @idx_is_id_act then
+        fs.each{ |r, f| f.print "#{@global_name}_INIB #{@global_name}_INIB_tab[] = {\n" }
+        indent = 1
+      else
+        indent = 0
+      end
+
+      @ordered_cell_list.each{ |c|
+        next if ! c.is_generate?
+
+        f = fs[ c.get_region.get_domain_root ]
+
+        name_array = get_name_array( c )
+
+        unless @singleton then
+          print_indent( f, indent )
+          f.print "/* cell: #{name_array[2]}:  #{name_array[1]} id=#{c.get_id} */\n"
+			    # name_array[2]: cell_CB_name
+        end
+
+        print_indent( f, indent )
+        if @idx_is_id_act then
+          f.print "const #{@global_name}_INIB #{name_array[5]} = "
+        end
+        f.print "{\n"
+
+        gen_cell_cb_port( c, indent, f, name_array )
+        gen_cell_cb_attribute( c, indent, f, name_array, :INIB )
+
+        unless @singleton then
+          # 1 ã¤ã® cell INIB ã®çµãã
+          if @idx_is_id_act then
+            f.print( "};\n\n" )
+          else
+            f.print( "    },\n" )
+          end
+        end
+      }
+      if ! @idx_is_id_act then
+        fs.each{ |r, f| f.print( "};\n\n" ) }
+      end
+    end  # has_INIB?
+
+    if has_CB? then
+      if @n_cell_gen >0 then
+        fs.each{ |r, f| f.printf( TECSMsg.get( :CB_comment ),  "#_CB_#" ) }
+      end
+
+      # RAM initializer ãä½¿ç¨ããªããã¾ãã¯ ROM åããªã
+      if $ram_initializer == false || $rom == false then
+        if @singleton then
+          fs.each{ |r, f| f.print "struct tag_#{@global_name}_CB #{@global_name}_SINGLE_CELL_CB = \n" }
+          indent = 0
+        elsif ! @idx_is_id_act then
+          fs.each{ |r, f| f.print "struct tag_#{@global_name}_CB #{@global_name}_CB_tab[] = {\n" }
+          indent = 1
+        end
+
+        @ordered_cell_list.each{ |c|
+          next if ! c.is_generate?
+
+          f = fs[ c.get_region.get_domain_root ]
+
+          name_array = get_name_array( c )
+
+          unless @singleton then
+            print_indent( f, indent )
+            f.print "/* cell: #{name_array[2]}:  #{name_array[1]} id=#{c.get_id} */\n"
+            # name_array[2]: cell_CB_name
+          end
+
+          print_indent( f, indent )
+          if @idx_is_id_act then
+            f.print "#{@global_name}_CB #{name_array[2]} = "
+          end
+          f.print "{\n"
+
+          if has_INIB? then
+            print_indent( f, indent + 1 )
+            f.printf( "&%-39s /* _inib */\n", "#{name_array[5]}," )
+          end
+
+          if ! has_INIB? then
+            gen_cell_cb_port( c, indent, f, name_array )
+          end
+
+          gen_cell_cb_attribute( c, indent, f, name_array, :CB )
+          gen_cell_cb_var( c, indent, f, name_array )
+
+          unless @singleton then
+            # 1 ã¤ã® cell CB ã®çµãã
+            if @idx_is_id_act then
+              f.print( "};\n\n" )
+            else
+              f.print( "    },\n" )
+            end
+          end
+        }
+        if ! @idx_is_id_act then
+          fs.each{ |r, f| f.print( "};\n\n" ) }
+        end
+      else
+        if @singleton then
+          fs.each{ |r, f| f.print "struct tag_#{@global_name}_CB #{@global_name}_SINGLE_CELL_CB;\n" }
+          indent = 0
+        elsif @idx_is_id_act then
+          @ordered_cell_list.each{ |c|
+            next if ! c.is_generate?
+
+            f = fs[ c.get_region.get_domain_root ]
+
+            name_array = get_name_array( c )
+            f.print "/* cell: #{name_array[2]}:  #{name_array[1]} id=#{c.get_id} */\n"
+            f.print "#{@global_name}_CB #{name_array[2]} = {};\n"
+          }
+        else
+          fs.each{ |r, f| f.print "struct tag_#{@global_name}_CB #{@global_name}_CB_tab[#{@n_cell_gen}];\n" }
+        end
+      end
+    end  # has_CB?
+  end
+
+  def gen_cell_cb_tab f
+    indent = 0
+    if @idx_is_id_act then
+      if has_INIB? && ( $ram_initializer || ! has_CB? ) then
+        f.print "/* ID to INIB table #_INTAB_# */\n"
+        @ordered_cell_list.each{ |c|
+          if c.is_generate? && ( c.get_region.get_domain_root != Region.get_root ) then # çæå¯¾è±¡ãã¤ãã«ã¼ãä»¥å¤ã
+            name_array = get_name_array( c )
+            print_indent( f, indent + 1 )
+            f.print "extern #{@global_name}_INIB  #{name_array[5]};\n"
+          end
+        }
+
+        f.print "#{@global_name}_INIB *#{@global_name}_INIB_tab[] ={\n"
+        @ordered_cell_list.each{ |c|
+          if c.is_generate? then                           # çæå¯¾è±¡ãï¼
+            name_array = get_name_array( c )
+            print_indent( f, indent + 1 )
+            f.print "&#{name_array[5]},\n"
+          end
+        }
+        f.print "};\n"
+      end
+      if has_CB? then
+        f.print "/* ID to CB table #_CBTAB_# */\n"
+        @ordered_cell_list.each{ |c|
+          if c.is_generate? && ( c.get_region.get_domain_root != Region.get_root ) then # çæå¯¾è±¡ãã¤ãã«ã¼ãä»¥å¤ã
+            name_array = get_name_array( c )
+            print_indent( f, indent + 1 )
+            f.print "extern #{@global_name}_CB  #{name_array[2]};\n"
+          end
+        }
+
+        f.print "#{@global_name}_CB *#{@global_name}_CB_tab[] ={\n"
+        @ordered_cell_list.each{ |c|
+          if c.is_generate? then                           # çæå¯¾è±¡ãï¼
+            name_array = get_name_array( c )
+            print_indent( f, indent + 1 )
+            f.print "&#{name_array[2]},\n"
+          end
+        }
+        f.print "};\n"
+      end
+    end
+  end
+
+
+  #=== name_array ãçæ
+  # IN:   cell  : Cell
+  #       index : CB, INIB é
+åã®æ·»æ°
+  # RETURN: name_array
+  #   name_array[0] = @name           # celltype name
+  #   name_array[1] = cell.get_name   # cell name
+  #   name_array[2] = cell_CB_name    # cell_CB_name
+  #   name_array[3] = cell_CB_INIT    # cell_CB_INIT # CB ã®å¤å´ã§åæåãå¿
+è¦ãªé
+åã®åå
+  #   name_array[4] = cell_CB_proto   # CB name for prototype
+  #   name_array[5] = cell_INIB       # INIB name
+  #   name_array[6] = cell_ID         # ID
+  #   name_array[7] = cell_IDX        # IDX
+  #   name_array[8] = cell_CBP        # CB pointer
+  #   name_array[9] = @global_name    # celltype global name
+  #   name_array[10] = cell.get_global_name # cell global name
+  
+  def get_name_array( cell )
+
+    if @singleton then
+      cell_CB_name = "#{@global_name}_SINGLE_CELL_CB"
+      cell_CB_INIT = cell_CB_name
+      cell_CB_proto = "#{@global_name}_SINGLE_CELL_CB"
+      cell_INIB_name = "#{@global_name}_SINGLE_CELL_INIB"
+      cell_ID = 0
+    else
+      if ! @idx_is_id_act then
+        index = cell.get_id - cell.get_celltype.get_id_base
+        cell_CB_name = "#{@global_name}_CB_tab[#{index}]"
+        cell_CB_INIT = "#{@global_name}_#{cell.get_name}_CB"
+        cell_CB_proto = "#{@global_name}_CB_tab[]"
+        cell_INIB_name = "#{@global_name}_INIB_tab[#{index}]"
+      else
+        cell_CB_name = "#{cell.get_global_name}_CB"
+        cell_CB_INIT = cell_CB_name
+        cell_CB_proto = cell_CB_name
+        cell_INIB_name = "#{cell.get_global_name}_INIB"
+      end
+      cell_ID = cell.get_id
+    end
+    if @idx_is_id_act then
+      cell_IDX = cell_ID
+    else
+      cell_IDX = "&#{cell_CB_name}"
+    end
+
+    if ! has_CB? && ! has_INIB? then
+      cell_CBP = "NULL"    # CB ã INIB ããªããã° NULL ã«ç½®æ
+    else
+      cell_CBP = "&#{cell_CB_name}"
+    end
+
+    name_array = []
+    name_array[0] = @name           # celltype name
+    name_array[1] = cell.get_name   # cell name
+    name_array[2] = cell_CB_name    # cell_CB_name
+    name_array[3] = cell_CB_INIT    # cell_CB_INIT
+    name_array[4] = cell_CB_proto   # CB name for prototype
+    name_array[5] = cell_INIB_name  # cell INIB name
+    name_array[6] = cell_ID         # cell ID
+    name_array[7] = cell_IDX        # cell IDX
+    name_array[8] = cell_CBP        # cell CBP
+    name_array[9] = @global_name    # celltype global name
+    name_array[10] = cell.get_global_name # cell global name
+
+    return name_array
+  end
+
+  #=== attribute ã¨ size_is æå®ããã var (ãã¤ã³ã¿)ã®åæåãã¼ã¿ãåºå
+  #
+  # ROM åãµãã¼ãã®æç¡ãããã³åºåå¯¾è±¡ã CB ã INIB ãã«ããåºåãããå
+å®¹ãç°ãªã
+  def gen_cell_cb_attribute( cell, indent, f, name_array, cb_inib )
+    ct = self
+    jl = cell.get_join_list
+
+    if cb_inib == :INIB then
+      return if @n_attribute_ro == 0 && @n_var_size_is == 0
+      print_indent( f, indent + 1 )
+      f.print "/* attribute(RO) */ \n"
+    elsif $rom then  # && cb_inib == CB
+      # CB ã§ rw ã¨ var
+      return if @n_attribute_rw == 0
+      print_indent( f, indent + 1 )
+      f.print "/* attribute(RW) */ \n"
+    else  # cb_inib == CB && $rom == false
+      # CB ã«å
+¨é¨
+      return if @n_attribute_rw == 0 && @n_attribute_ro == 0 && @n_var_size_is == 0
+      print_indent( f, indent + 1 )
+      f.print "/* attribute */ \n"
+    end
+
+    attribute = ct.get_attribute_list
+    attribute.each{ |a|              # a: Decl
+      next if a.is_omit?
+      if cb_inib == :INIB && a.is_rw? == true then
+        # $rom == true ã§ãããããã¸æ¥ãªã
+        next
+      elsif cb_inib == :CB && $rom && ! a.is_rw? then
+        next
+      end
+
+      j = jl.get_item( a.get_identifier )
+      if j then
+        # cell ã®åæå¤æå®ãã
+        gen_cell_cb_init( f, cell, name_array, a.get_type, j.get_rhs, a.get_identifier, indent + 1 )
+      elsif a.get_initializer then
+        # celltype ã® default ã®åæå¤ãã
+        gen_cell_cb_init( f, cell, name_array, a.get_type, a.get_initializer, a.get_identifier, indent + 1 )
+      else
+        # åæå¤æªæå®
+        gen_cell_cb_init( f, cell, name_array, a.get_type, nil, a.get_identifier, indent + 1 )
+      end
+    }
+    @var.each{ |v|
+      next if v.is_omit?
+      next if v.get_size_is == nil   # size_is æå®ãããå ´å attribute ã®ä¸é¨ã¨ãã¦åºå
+
+      if v.get_initializer && $ram_initializer == false then
+        gen_cell_cb_init( f, cell, name_array, v.get_type, v.get_initializer, v.get_identifier, indent + 1 )
+      else
+        # åæå¤æªæå® ã¾ãã¯ RAM initializer ä½¿ç¨
+        gen_cell_cb_init( f, cell, name_array, v.get_type, nil, v.get_identifier, indent + 1 )
+      end
+    }
+  end
+
+  #=== var ã®åæåãã¼ã¿ãåºå
+  def gen_cell_cb_var( cell, indent, f, name_array )
+    jl = cell.get_join_list
+    var = get_var_list
+    if @n_var - @n_var_size_is > 0 then
+      print_indent( f, indent + 1 )
+      f.print "/* var */ \n"
+      var.each{ |v|
+
+        next if v.is_omit?
+        next if v.get_size_is      # size_is æå®ãããå ´å attribute ã®ä¸é¨ã¨ãã¦åºå
+
+        if v.get_initializer && $ram_initializer == false then
+          gen_cell_cb_init( f, cell, name_array, v.get_type, v.get_initializer, v.get_identifier, indent + 1 )
+        else
+          # åæå¤æªæå® ã¾ãã¯ RAM initializer ä½¿ç¨
+          gen_cell_cb_init( f, cell, name_array, v.get_type, nil, v.get_identifier, indent + 1 )
+        end
+      }
+    end
+  end
+
+  def gen_cell_cb_port( cell, indent, f, name_array )
+    gen_cell_cb_call_port( cell, indent, f, name_array )
+    gen_cell_cb_entry_port( cell, indent, f, name_array )
+  end
+
+  #=== å¼ã³å£ã®åæåã³ã¼ãã®çæ
+  def gen_cell_cb_call_port( cell, indent, f, name_array )
+    jl = cell.get_join_list
+
+    port = get_port_list
+    if @n_call_port != 0 then
+      print_indent( f, indent + 1 )
+      f.print "/* call port #_CP_# */ \n"
+      port.each{ |p|
+        next if p.get_port_type != :CALL
+        next if p.is_omit?
+        next if p.is_cell_unique?        # æé©åï¼åä¸ã»ã«ã§å¼ã³å£ãã¯ã­ã«åãè¾¼ã¾ããï¼
+
+        j = jl.get_item( p.get_name )
+        print_indent( f, indent + 1 )
+
+        # debug
+        if j == nil then
+          # optional å¼ã³å£
+          # cdl_error( "H1003 internal error: cell \'$1\' port \'$2\': initializer not found\n" , cell.get_name, p.get_name )
+          # exit( 1 )
+          f.printf( "%-40s /* #_CCP5_# */\n",  "0," )
+          if p.get_array_size == "[]" then
+            # æ·»æ°çç¥ã®å¼ã³å£é
+å
+            print_indent( f, indent + 1 )
+            f.printf( "%-40s /* %s #_CCP6_# */\n", "0,", "length of #{p.get_name} (n_#{p.get_name})" )
+          end
+          next
+        end
+
+        am = j.get_array_member2
+        if am then
+          # å¼ã³å£é
+åã®å ´å
+          f.printf( "%-40s /* #_CCP3_# */\n",  "#{cell.get_global_name}_#{j.get_name}," )
+          if p.get_array_size == "[]" then
+            # æ·»æ°çç¥ã®å¼ã³å£é
+å
+            print_indent( f, indent + 1 )
+            f.printf( "%-40s /* %s #_CCP4_# */\n", "#{am.length},", "length of #{p.get_name} (n_#{p.get_name})" )
+          end
+        else
+          # åä¸ã»ã«ã¿ã¤ãã®çµåã®å ´åãVDES åã¸ã®ã­ã£ã¹ããå¿
+è¦
+          #print "CCP0/CCP1 #{p.get_name}, #{j.get_rhs_cell.get_celltype.get_name}, #{@name}\n"
+          if j.get_rhs_cell.get_celltype == self then
+            definition = j.get_definition
+            des_type_cast = "(struct tag_#{definition.get_signature.get_global_name}_VDES *)"
+          else
+            des_type_cast = ""
+          end
+
+          if j.get_rhs_subscript then
+            # åãå£é
+åã®å ´å
+            subscript = j.get_rhs_subscript
+            f.printf( "%-40s /* %s #_CCP0_# */\n",
+                      # "&#{j.get_cell_global_name}_#{j.get_port_name}_des#{subscript},",
+                      "#{des_type_cast}&#{j.get_port_global_name}_des#{subscript},",
+                      p.get_name )
+          else
+            # å¼ã³å£é
+åã§ããåãå£é
+åã§ããªã
+            if ! p.is_skelton_useless? then
+              f.printf( "%-40s /* %s #_CCP1_# */\n",
+                        "#{des_type_cast}&#{j.get_port_global_name}_des,",
+                        p.get_name )
+            else
+              # ã¹ã±ã«ãã³ä¸è¦æé©åï¼CB (INIB) ã¸ã®ãã¤ã³ã¿ãåãè¾¼ãï¼
+              c = j.get_rhs_cell                    # å¼ã³å
+ã»ã«
+              ct = c.get_celltype                   # å¼ã³å
+ã»ã«ã¿ã¤ã
+              if ct.has_INIB? || ct.has_CB? then
+                name_array = ct.get_name_array( c )   # å¼ã³å
+ã»ã«ã¿ã¤ãã§ name_array ãå¾ã
+                f.printf( "%-40s /* %s #_CCP2_# */\n", "#{name_array[7]},", p.get_name )
+              else
+                # å¼ã³å
+ã¯ CB ã INIB ãæããªãï¼NULL ã«åæåï¼
+                f.printf( "%-40s /* %s #_CCP2_# */\n", "0,", p.get_name )
+              end
+            end
+          end
+        end
+
+      }
+      end
+  end
+
+  #=== åãå£ã®åæåã³ã¼ãã®çæ
+  def gen_cell_cb_entry_port( cell, indent, f, name_array )
+    jl = cell.get_join_list
+
+    port = get_port_list
+    if @n_entry_port != 0 then
+      print_indent( f, indent + 1 )
+      f.print "/* entry port #_EP_# */ \n"
+      @port.each{ |p|
+        # next if p.is_omit?  # åãå£é
+åã®åæ°ã¯çç¥ããªã
+        if p.get_port_type == :ENTRY && p.get_array_size == "[]"
+          print_indent( f, indent + 1 )
+          f.printf( "%-40s /*  #_EEP_# */\n", "#{cell.get_entry_port_max_subscript( p )+1}," )
+        end
+      }
+    end
+  end
+
+  #=== ã»ã«ã® attribute ã®åæå¤ãåºå
+  #
+  #f_get_str:: true ã®å ´åãæå­åãè¿ããfalse ã®å ´åããã¡ã¤ã« f ã«åºåããï¼
+  # æå­åãè¿ãã¨ããæ«å°¾ã« ',' ã¯å«ã¾ããªãï¼
+  # ãã¡ã¤ã«ã¸åºåããã¨ããæ«å°¾ã« ',' ãåºåãããï¼æ§é ä½è¦ç´ ãé
+åè¦ç´ ã®åæå¤ãåºåããã¨ ',' ãäºéã«åºåãããï¼
+  # ãã ãç¾ç¶ã§ã¯ããã¡ã¤ã«ã¸åºåãããã¨ã¯ãªã
+  #
+  def gen_cell_cb_init( f, cell, name_array, type, init, identifier, indent, f_get_str = false )
+
+    cell_CB_name = name_array[2]
+    cell_CB_INIT = name_array[3]
+
+    while type.kind_of?( DefinedType )
+      type = type.get_type
+    end
+
+    if ( init == nil ) then
+
+      if f_get_str then
+        # åæå¤æªæå®
+        if type.kind_of?( BoolType ) then
+          str = "false"   # formerly tecs_false
+        elsif type.kind_of?( IntType ) then
+          str = "0"
+        elsif type.kind_of?( FloatType ) then
+          str = "0.0"
+        elsif type.kind_of?( EnumType ) then
+          str = "0"
+        elsif type.kind_of?( ArrayType ) then
+          str = "{}"
+        elsif type.kind_of?( StructType ) then
+          str = "{}"
+        elsif type.kind_of?( PtrType ) then
+          if type.get_size then
+            str = "#{cell_CB_INIT}_#{identifier}_INIT"
+          else
+            str = "0"
+          end
+        else
+          raise "UnknownType"
+        end
+        return str
+      else
+        # åæå¤æªæå®
+        if type.kind_of?( BoolType ) then
+          f.print "    " * indent
+          f.printf( "%-40s /* %s */\n", "false,", identifier )   # formerly tecs_false
+        elsif type.kind_of?( IntType ) then
+          f.print "    " * indent
+          f.printf( "%-40s /* %s */\n", "0,", identifier )
+        elsif type.kind_of?( FloatType ) then
+          f.print "    " * indent
+          f.printf( "%-40s /* %s */\n", "0.0,", identifier )
+        elsif type.kind_of?( EnumType ) then
+          f.print "    " * indent
+          f.printf( "%-40s /* %s */\n", "0,", identifier )
+        elsif type.kind_of?( ArrayType ) then
+          f.print "    " * indent
+          f.printf( "%-40s /* %s */\n", "{},", identifier )
+        elsif type.kind_of?( StructType ) then
+          f.print "    " * indent
+          f.printf( "%-40s /* %s */\n", "{},", identifier )
+        elsif type.kind_of?( PtrType ) then
+          if type.get_size then
+            f.print "    " * indent
+            f.printf( "%-40s /* %s */\n", "#{cell_CB_INIT}_#{identifier}_INIT,", identifier )
+          else
+            f.print "    " * indent
+            f.printf( "%-40s /* %s */\n", "0,", identifier )
+          end
+        else
+          raise "UnknownType"
+        end
+      end
+      return
+    end    
+
+    # ãã®ã¡ã½ããã¯ Celltype ã®ãã®ã§ããå¿
+è¦ã¯ç¡ãï¼ä¸ã«ç¶ãã®ã§ããã«ç½®ãï¼
+    # åæå¤æå®ãã
+    if type.kind_of?( BoolType ) then
+      if init.instance_of?( C_EXP ) then
+        init_str = subst_name( init.get_c_exp_string, name_array )
+      else
+        init_str = init.eval_const2(cell.get_join_list,@name_list)
+      end
+
+      if f_get_str then
+        return "#{init_str}"
+      else
+        f.print "    " * indent
+        f.printf( "%-40s /* %s */\n", "#{init_str},", identifier )
+      end
+#      if f_get_str then
+#        return "#{init.eval_const2(nil)}"
+#      else
+#        f.print "    " * indent
+#        f.printf( "%-40s /* %s */\n", "#{init.eval_const2(nil)},", identifier )
+#      end
+    elsif type.kind_of?( IntType ) then
+      if init.instance_of?( C_EXP ) then
+        init_str = subst_name( init.get_c_exp_string, name_array )
+      else
+        init_str = init.eval_const2(cell.get_join_list,@name_list)
+      end
+
+      if f_get_str then
+        return "#{init_str}"
+      else
+        f.print "    " * indent
+        f.printf( "%-40s /* %s */\n", "#{init_str},", identifier )
+      end
+    elsif type.kind_of?( FloatType ) then
+      # mikan C_EXP for FloatType
+      if f_get_str then
+        return "#{init.eval_const2(cell.get_join_list,@name_list)}"
+      else
+        f.print "    " * indent
+        f.printf( "%-40s /* %s */\n", "#{init.eval_const2(cell.get_join_list,@name_list)},", identifier )
+      end
+    elsif type.kind_of?( EnumType ) then
+      # mikan C_EXP for EnumType
+      if f_get_str then
+        return "#{init.eval_const2(cell.get_join_list,@name_list)}"
+      else
+        f.print "    " * indent
+        f.printf( "%-40s /* %s */\n", "#{init.eval_const2(cell.get_join_list,@name_list)},", identifier )
+      end
+    elsif type.kind_of?( ArrayType ) then
+      if type.get_subscript
+        len = type.get_subscript.eval_const(cell.get_join_list,@name_list)
+      else
+        len = init.length
+      end
+
+      at = type.get_type
+      i = 0
+      if f_get_str then
+        str = "{ " 
+      else
+        f.print "    " * indent
+        f.print( "{\n" )
+      end
+
+      len.times {
+        next if ! init[i]        # mikan ãã®å¦ç½®ã¯é©åï¼
+        if f_get_str then
+          str += gen_cell_cb_init( f, cell, name_array, at, init[i], "#{identifier}[#{i}]", indent + 1, f_get_str )
+          str += ', '
+        else
+          gen_cell_cb_init( f, cell, name_array, at, init[i], "#{identifier}[#{i}]", indent + 1, f_get_str )
+        end
+        i += 1
+      }
+
+      if f_get_str then
+         str += "}"
+      else
+        f.print "    " * indent
+        f.print( "},\n" )
+      end
+
+    elsif type.kind_of?( StructType ) then
+      i = 0
+      decls = type.get_members_decl.get_items
+      if f_get_str then
+        str = "{ "
+      else
+        f.print "    " * indent
+        f.print( "{                                        /* #{identifier} */\n" )
+      end
+
+      decls.each{ |d|
+        # p "#{d.get_identifier}: #{init}"
+        next if ! init[i]
+
+        if f_get_str then
+          str += gen_cell_cb_init( f, cell, name_array, d.get_type, init[i], d.get_identifier, indent + 1, f_get_str )
+          str += ', '
+        else
+          gen_cell_cb_init( f, cell, name_array, d.get_type, init[i], d.get_identifier, indent + 1, f_get_str )
+        end
+        i += 1
+      }
+      if f_get_str then
+        str += "}"
+      else
+        f.print "    " * indent
+        f.print( "},\n" )
+      end
+
+    elsif type.kind_of?( PtrType ) then
+
+      if init.instance_of?( Array ) then
+        if f_get_str then
+          return "#{cell_CB_INIT}_#{identifier}_INIT"
+        else
+          f.print "    " * indent
+          f.printf( "%-40s /* %s */\n", "#{cell_CB_INIT}_#{identifier}_INIT,", identifier )
+        end
+      elsif init.instance_of?( C_EXP ) then
+        init_str = subst_name( init.get_c_exp_string, name_array )
+
+        if f_get_str then
+          return "#{init_str}"
+        else
+          f.print "    " * indent
+          f.printf( "%-40s /* %s */\n", "#{init_str},", identifier )
+        end
+
+      else
+        if f_get_str then
+          return "#{init.eval_const2(cell.get_join_list,@name_list)}"
+        else
+          f.print "    " * indent
+# p init.eval_const2(cell.get_join_list,@name_list).class
+# p init.eval_const2(cell.get_join_list,@name_list)
+# p identifier
+          f.printf( "%-40s /* %s */\n", "#{init.eval_const2(cell.get_join_list,@name_list)},", identifier )
+
+        end
+      end
+    else
+      raise "UnknownType"
+    end
+  end
+
+  #== é¢æ°ãã¼ãã«ã®å¤é¨åç
+§
+  def gen_cell_extern_mt fs
+    fs.each{ |r, f|
+      if ! r.is_root? then
+        @port.each{ |p|
+          next if p.is_omit?
+          if p.get_port_type == :ENTRY && ! p.is_VMT_useless? then
+            f.print "extern const struct tag_#{p.get_signature.get_global_name}_VMT"
+            f.print " #{@global_name}_#{p.get_name}_MT_;\n"
+          end
+        }
+      end
+    }
+  end
+
+  #=== åãå£ãã£ã¹ã¯ãªãã¿ã®å®ç¾©ãçæ
+  def gen_cell_ep_des fs
+    if @n_cell_gen >0 then
+      fs.each{ |r, f|        f.printf( TECSMsg.get( :EPD_comment ),  "#_EPD_#" ) }
+    end
+
+    index = 0
+    @ordered_cell_list.each{ |c|
+
+      next if ! c.is_generate?
+
+      f = fs[ c.get_region.get_domain_root ]
+
+      ct = c.get_celltype
+      jl = c.get_join_list
+
+      port = ct.get_port_list
+      if port.length != 0 then
+        port.each{ |p|
+          next if p.get_port_type != :ENTRY
+          next if p.is_omit?
+          if p.is_skelton_useless?       # åãå£æé©ån ep_opt
+            f.print( "/* #{p.get_name} : omitted by entry port optimize */\n" )
+            next
+          end
+
+          len = p.get_array_size
+          if len == "[]" then
+            len = c.get_entry_port_max_subscript(p) + 1
+          end
+
+          if len != nil then
+            # åãå£é
+åã®å ´å
+            i = 0
+            while i < len
+              f.print "extern const struct tag_#{@global_name}_#{p.get_name}_DES"
+              f.print " #{c.get_global_name}_#{p.get_name}_des#{i};\n"
+              f.print "const struct tag_#{@global_name}_#{p.get_name}_DES"
+              # f.print " #{c.get_name}_#{p.get_name}_des#{i} = {\n"
+              f.print " #{c.get_global_name}_#{p.get_name}_des#{i} = {\n"
+              if p.is_VMT_useless? then
+                f.print "    0,\n"
+              else
+                f.print "    &#{@global_name}_#{p.get_name}_MT_,\n"
+              end
+              if( @idx_is_id_act )then
+                f.print "    #{c.get_id},           /* ID */\n"
+              else
+                if has_CB? then
+                  if @singleton then
+                    f.print "    &#{@global_name}_SINGLE_CELL_CB,        /* CB */\n"
+                  else
+                    # f.print "    &#{@global_name}_#{c.get_name}_CB,\n"
+                    f.print "    &#{@global_name}_CB_tab[#{index}],      /* CB */\n"
+                  end
+                elsif has_INIB? then
+                  if @singleton then
+                    f.print "    &#{@global_name}_SINGLE_CELL_INIB,      /* INIB */\n"
+                  else
+                    f.print "    &#{@global_name}_INIB_tab[#{index}],    /* INIB */\n"
+                  end
+                else
+                  f.print "    0,\n"
+                end
+              end
+              f.print "    #{i}\n"
+              f.print "};\n"
+              i += 1
+            end
+          else
+            f.print "extern const struct tag_#{@global_name}_#{p.get_name}_DES"
+            f.print " #{c.get_global_name}_#{p.get_name}_des;\n"
+            f.print "const struct tag_#{@global_name}_#{p.get_name}_DES"
+            # f.print " #{c.get_name}_#{p.get_name}_des = {\n"
+            f.print " #{c.get_global_name}_#{p.get_name}_des = {\n"
+            if p.is_VMT_useless? then
+              f.print "    0,\n"
+            else
+              f.print "    &#{@global_name}_#{p.get_name}_MT_,\n"
+            end
+            if @idx_is_id_act then
+              f.print "    #{c.get_id},     /* ID */\n"
+            else
+              if has_CB? then
+                if @singleton then
+                  f.print "    &#{@global_name}_SINGLE_CELL_CB,       /* CB */\n"
+                else
+                  f.print "    &#{@global_name}_CB_tab[#{index}],     /* CB */\n"
+                  # f.print "    &#{@global_name}_#{c.get_name}_CB,\n"
+                end
+              elsif has_INIB? then
+                if @singleton then
+                  f.print "    &#{@global_name}_SINGLE_CELL_INIB,     /* INIB */\n"
+                else
+                  f.print "    &#{@global_name}_INIB_tab[#{index}],   /* INIB */\n"
+                end
+              else
+                f.print "    0,\n"
+              end
+            end
+            f.print "};\n"
+          end
+        }
+      end
+      index += 1
+    }
+  end
+
+  def generate_template_code
+
+    return if is_all_entry_inline?
+    return if @b_reuse && ! $generate_all_template
+    if ! ( @plugin && @plugin.gen_ep_func? ) then
+      return if $generate_no_template     # $generate_all_template ããåªå
+ããã
+
+      # åèã¨ãã¦åºåãããã³ãã¬ã¼ããã¡ã¤ã«ã§ãããã¨ãç¤ºãããã« "_templ" ãä»å ãã
+      fname = "#{$gen}/#{@global_name}_templ.#{$c_suffix}"
+    else
+      # Plugin ã«ããçæãããã»ã«ã¿ã¤ãã«ã¤ãã¦ã¯ãååçã«ãã³ãã¬ã¼ãã§ã¯ãªãã
+      # ä¿®æ­£ä¸è¦ãªã»ã«ã¿ã¤ãã®å®è£
+ã³ã¼ããçæããï¼
+      # ãã®ããããã¡ã¤ã«åã« _temp ãä»å ããªã
+      fname = "#{$gen}/#{@global_name}.#{$c_suffix}"
+    end
+
+    f = AppFile.open(fname)
+
+    unless ( @plugin && @plugin.gen_ep_func? ) then
+      f.printf( TECSMsg.get( :template_note ), @name, @name )
+    else
+      print_note( f, true )
+    end
+
+    f.print TECSMsg.get( :preamble_note )
+    gen_template_attr_access f
+    gen_template_cp_fun f
+    # gen_template_types f     # 0805503 è¿½å ãã¦ã¿ããããã£ã±ãããã
+    f.print( " *\n * #[</PREAMBLE>]# */\n\n" )
+    f.printf TECSMsg.get( :PAC_comment ), "#_PAC_#"
+
+    gen_template_private_header f
+    if ( @plugin ) then
+      # ãã®ã¡ã½ããã®å¼æ°ã¯ plugin.rb ã®èª¬æãè¦ã
+      @plugin.gen_preamble( f, @singleton, @name, @global_name )
+    end
+
+    gen_template_ep_fun f
+
+    f.print TECSMsg.get( :postamble_note )
+
+    if ( @plugin ) then
+      # ãã®ã¡ã½ããã®å¼æ°ã¯ plugin.rb ã®èª¬æãè¦ã
+      @plugin.gen_postamble( f, @singleton, @name, @global_name )
+    end
+
+    f.close
+  end
+
+#####  celltype template
+
+  def gen_template_private_header f
+    f.print "#include \"#{@global_name}_tecsgen.#{$h_suffix}\"\n\n"
+    f.print <<EOT
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+EOT
+  end
+
+  def gen_template_attr_access f
+
+    if @n_attribute_rw > 0 || @n_attribute_ro > 0 || @n_var > 0 then
+      f.printf( TECSMsg.get( :CAAM_comment ), "#_CAAM_#" )
+    end
+
+    @attribute.each { |a|
+
+      next if a.is_omit?
+
+      f.printf( " * %-16s %-16s %-16s\n", a.get_name, "#{a.get_type.get_type_str} #{a.get_type.get_type_str_post}", "ATTR_#{a.get_name}" )
+
+    }
+
+    @var.each { |v|
+
+      next if v.is_omit?
+
+      f.printf( " * %-16s %-16s %-16s\n", v.get_name, "#{v.get_type.get_type_str} #{v.get_type.get_type_str_post}", "VAR_#{v.get_name}" )
+    }
+
+  end
+
+  def gen_template_types f
+    f.printf( TECSMsg.get( :TYP_comment ), "#_TYP_#", "#{@global_name}_CB", "#{@name}_IDX" )
+  end
+
+  def gen_template_cp_fun f
+    if @n_call_port >0 then
+      f.print " *\n"
+      f.printf( TECSMsg.get( :TCPF_comment ), "#_TCPF_#" )
+    end
+
+    @port.each { |p|
+      next if p.get_port_type != :CALL
+      # next if p.is_omit?
+
+      sig_name = p.get_signature.get_global_name
+      con_tmp = p.get_signature.get_context
+      if con_tmp then
+        context = " context:#{con_tmp}"
+      else
+        context = ""
+      end
+
+      if p.is_optional? then
+        optional = " optional:true"
+        if p.get_array_size
+          is_join = " *   bool_t     is_#{p.get_name}_joined(int subscript)        check if joined\n"
+        else
+          is_join = " *   bool_t     is_#{p.get_name}_joined()                     check if joined\n"
+        end
+      else
+        optional = ""
+        is_join = ""
+      end
+
+      if p.is_omit? then
+        omit = " omit:true"
+      else
+        omit = ""
+      end
+
+      if p.is_allocator_port? then
+        f.print " * allocator port for #{p.get_port_type.to_s.downcase} port:#{p.get_allocator_port.get_name} func:#{p.get_allocator_func_decl.get_name} param: #{p.get_allocator_param_decl.get_name}\n"
+      elsif ! p.is_require? then
+        f.print " * call port: #{p.get_name} signature: #{sig_name}#{context}#{optional}#{omit}\n#{is_join}"
+      else
+        f.print " * require port: signature:#{sig_name}#{context}\n"
+      end
+
+      p.get_signature.get_function_head_array.each{ |fun|
+        
+        ft = fun.get_declarator.get_type
+
+        f.printf( " *   %-14s ", ft.get_type.get_type_str )
+        if ! p.is_require? || p.has_name? then
+          f.print( "#{p.get_name}_#{fun.get_name}(" )
+        else
+          f.print( "#{fun.get_name}(" )
+        end
+        delim = ""
+
+#        if ! @singleton then
+#          f.print( "#{delim} p_that" )
+#          delim = ","
+#        end
+
+        if p.get_array_size then
+          f.print( "#{delim} subscript" )
+          delim = ","
+        end
+
+        ft.get_paramlist.get_items.each{ |param|
+          f.print( "#{delim} #{param.get_type.get_type_str}" )
+          f.print( " #{param.get_name}#{param.get_type.get_type_str_post}" )
+          delim = ","
+	}
+        f.print( " );\n" )
+
+#        subsc = ""
+#        subsc = "[subscript]" if p.get_array_size
+#
+#        if @singleton then
+#          f.print( " *        #{@global_name}_#{p.get_name}" )
+#        else
+#          f.print( " *        (p_that)->#{p.get_name}" )
+#        end
+#        f.print( "#{subsc}->VMT->#{fun.get_name}(" )
+#        f.print( " (p_that)->#{p.get_name}#{subsc}" )
+#        ft.get_paramlist.get_items.each{ |param|
+#          f.print( ", (#{param.get_name})" )
+#        }
+#        f.print( " )\n" )
+
+      }
+
+      if p.get_array_size then
+        f.print " *       subscript:  0...(NCP_#{p.get_name}-1)\n"
+      end
+
+    }
+
+  end
+
+  def gen_template_ep_fun( f, b_inline = false )
+
+    if @n_entry_port >0 then
+      f.printf( TECSMsg.get( :TEPF_comment ), "#_TEPF_#" )
+    end
+
+    @port.each { |p|
+      next if p.get_port_type != :ENTRY
+      next if p.is_omit?
+      next if b_inline && ! p.is_inline?  # inline ãã¼ã
+      next if ! b_inline && p.is_inline?  # é inline ãã¼ã
+
+      inline_prefix = ""
+      nCELLIDX = "CELLIDX"
+      nCELLCB = "CELLCB"
+      nVALID_IDX = "VALID_IDX"
+      nGET_CELLCB = "GET_CELLCB"
+
+      f.print <<EOT
+/* #[<ENTRY_PORT>]# #{p.get_name}
+ * entry port: #{p.get_name}
+ * signature:  #{p.get_signature.get_global_name}
+ * context:    #{p.get_signature.get_context}
+EOT
+
+      if p.get_array_size != nil then
+        f.print <<EOT
+ * entry port array size:  NEP_#{p.get_name}
+EOT
+      end
+
+      f.print <<EOT
+ * #[</ENTRY_PORT>]# */
+
+EOT
+
+      p.get_signature.get_function_head_array.each{ |fun|
+        f.print <<EOT
+/* #[<ENTRY_FUNC>]# #{p.get_name}_#{fun.get_name}
+ * name:         #{p.get_name}_#{fun.get_name}
+ * global_name:  #{@global_name}_#{p.get_name}_#{fun.get_name}
+ * oneway:       #{fun.is_oneway?}
+ * #[</ENTRY_FUNC>]# */
+EOT
+
+        if b_inline then
+          f.print "Inline "
+        end
+        functype = fun.get_declarator.get_type
+        f.printf "%s\n", functype.get_type_str
+        f.print "#{inline_prefix}#{p.get_name}_#{fun.get_name}("
+        if @singleton then
+          delim = ""
+        else
+          f.print "#{nCELLIDX} idx"
+          delim = ", "
+        end
+
+        if p.get_array_size then
+          f.print "#{delim}int_t subscript"
+          delim = ", "
+        end
+
+        if functype.get_paramlist then
+          items = functype.get_paramlist.get_items
+          len = items.length
+        else
+          # ããã§ nil ã«ãªãã®ã¯ãå¼æ°ãªãã®æã« void ããªãã£ãå ´å
+          items = []
+          len = 0
+        end
+
+        i = 0
+        items.each{ |param|
+          f.print "#{delim}"
+          delim = ", "
+          f.print param.get_type.get_type_str
+          f.print " "
+          f.print param.get_name
+          f.print param.get_type.get_type_str_post
+          i += 1
+        }
+        f.print ")\n"
+
+        f.print "{\n"
+
+        if ( @plugin && @plugin.gen_ep_func? ) then
+          # ãã®ã¡ã½ããã®å¼æ°ã¯ plugin.rb ã®èª¬æãè¦ã
+          @plugin.gen_ep_func_body( f, @singleton, @name, @global_name, p.get_signature.get_global_name, p.get_name, fun.get_name, "#{@global_name}_#{p.get_name}_#{fun.get_name}", functype, items )
+
+        else
+          if ! @singleton then
+            if functype.get_type.kind_of?( DefinedType ) && ( functype.get_type.get_type_str == "ER" || functype.get_type.get_type_str == "ER_UINT" ) then
+              if ! fun.is_oneway? then
+                f.print "	ER\t\tercd = E_OK;\n"
+                er_cd = "return(E_ID);"
+                ret_cd = "return(ercd);"
+              else
+                er_cd = "#{TECSMsg.get(:oneway_ercd_note)}\n		return(E_OK);"
+                ret_cd = "#{TECSMsg.get(:oneway_ercd_note)}\n	return(E_OK);"
+              end
+            else
+              er_cd = "#{TECSMsg.get(:ercd_note)}"
+              ret_cd = nil
+            end
+            f.print <<EOT
+	#{nCELLCB}	*p_cellcb;
+	if (#{nVALID_IDX}(idx)) {
+		p_cellcb = #{nGET_CELLCB}(idx);
+	}
+	else {
+		#{er_cd}
+	} /* end if #{nVALID_IDX}(idx) */
+
+EOT
+            f.printf( TECSMsg.get( :TEFB_comment ), "#_TEFB_#" )
+            f.printf( "\n" )
+
+            if ret_cd then
+              f.print "	#{ret_cd}\n"
+            end
+          else
+          end # ! @singleton
+        end # @plugin
+
+        f.print "}\n\n"
+      }
+    }
+  end
+
+  def generate_inline_template_code
+    return if @n_entry_port_inline == 0
+    if ! ( @plugin && @plugin.gen_ep_func? ) then
+      return if @b_reuse && ! $generate_all_template
+      return if $generate_no_template     # $generate_all_template ããåªå
+ããã
+
+      # åèã¨ãã¦åºåãããã³ãã¬ã¼ããã¡ã¤ã«ã§ãããã¨ãç¤ºãããã« "_templ" ãä»å ãã
+      fname = "#{$gen}/#{@global_name}_inline_templ.#{$h_suffix}"
+    else
+      # Plugin ã«ããçæãããã»ã«ã¿ã¤ãã«ã¤ãã¦ã¯ãååçã«ãã³ãã¬ã¼ãã§ã¯ãªãã
+      # ä¿®æ­£ä¸è¦ãªã»ã«ã¿ã¤ãã®å®è£
+ã³ã¼ããçæããï¼
+      # ãã®ããããã¡ã¤ã«åã« _temp ãä»å ããªã
+      fname = "#{$gen}/#{@global_name}_inline.#{$h_suffix}"
+    end
+    f = AppFile.open(fname)
+
+    gen_ph_guard f, "_INLINE"
+
+    unless ( @plugin && @plugin.gen_ep_func? ) then
+      f.printf( TECSMsg.get( :inline_template_note ), @name, @name )
+    else
+      print_note( f, true )
+    end
+
+    f.print TECSMsg.get( :preamble_note )
+    gen_template_attr_access f
+    gen_template_cp_fun f
+    f.print( " *\n * #[</PREAMBLE>]# */\n\n" )
+
+    gen_template_ep_fun( f, true )
+
+    f.print TECSMsg.get( :postamble_note )
+
+    if ( @plugin ) then
+      # ãã®ã¡ã½ããã®å¼æ°ã¯ plugin.rb ã®èª¬æãè¦ã
+      @plugin.gen_postamble( f, @singleton, @name, @global_name )
+    end
+
+    f.print "\n"
+    gen_ph_endif f, "INLINE"
+    f.close
+  end
+
+
+##### generate tecsgen.cfg
+
+  def generate_celltype_factory_code
+
+    @ct_factory_list.each { |fa|
+      if fa.get_name == :write then
+
+        # åå¾ã® " ãåãé¤ã
+        # file_name = fa.get_file_name.sub( /^\"(.*)\"$/, "\\1" )
+        file_name = CDLString.remove_dquote fa.get_file_name
+        format = CDLString.remove_dquote fa.get_format
+        # format    = fa.get_format.sub( /^\"(.*)/, "\\1" )        # åã® " ãåãé¤ã
+        # format    = format.sub( /(.*)\"\z/, "\\1" )              # å¾ã® " ãåãé¤ã
+        format    = format.gsub( /\\\n/, "\n" )                  # \\\n => \n
+
+
+        # mikan ä»¥ä¸ã¯ subst_name ã§ç½®æããããã«å¤æ´ãã¹ã
+        file_name = file_name.gsub( /(^|[^\$])\$ct\$/, "\\1#{@name}" )   # $ct$ ãã»ã«ã¿ã¤ãåã«ç½®æ
+        file_name = file_name.gsub( /(^|[^\$])\$ct_global\$/, "\\1#{@global_name}" )   # $ct$ ãã»ã«ã¿ã¤ãåã«ç½®æ
+        format    = format.gsub( /(^|[^\$])\$ct\$/, "\\1#{@name}" )   # $ct$ ãã»ã«ã¿ã¤ãåã«ç½®æ
+        format    = format.gsub( /(^|[^\$])\$ct_global\$/, "\\1#{@global_name}" )   # $ct$ ãã»ã«ã¿ã¤ãåã«ç½®æ
+        format    = format.gsub( /\$\$/, "\$" )                # $$ ã $ ã«ç½®æ
+
+        if file_name[0] != ?/ then
+          file_name = "#{$gen}/#{file_name}"
+        end
+
+        begin
+          cfg_file = AppFile.open( file_name )
+          if $debug then
+            print "'#{@name}' : celltype factory format: "
+            puts( format )
+          end
+          # format ä¸­ã® \n, \r, \t, \f ã¨ \" ãªã©ãç½®æ
+          fmt = CDLString.escape format
+          cfg_file.print( fmt )
+          cfg_file.puts( "\n" )
+          cfg_file.close()
+        rescue => evar
+          cdl_error( "H1004 \'$1\' : write error while writing factory (specify -t to get more info)" , file_name )
+          print_exception( evar )
+        end
+      end
+    }
+  end
+
+  def generate_cell_factory_code
+
+    @ordered_cell_list.each{ |c|
+
+      # cell ã®ãã­ãã¿ã¤ãå®£è¨ãªãç¡è¦
+      next if ! c.is_generate?
+
+      name_array = get_name_array( c )
+
+      @factory_list.each { |fa|
+
+        if fa.get_name == :write then
+
+          # åå¾ã® " ãåãé¤ã
+          # file_name = fa.get_file_name.sub( /^\"(.*)\"$/, "\\1" )
+          file_name = CDLString.remove_dquote fa.get_file_name
+          file_name = subst_name( file_name, name_array )
+          # format    = fa.get_format.sub( /^\"(.*)\"$/, "\\1" )        # åå¾ã® "" ãåãé¤ã
+          format    = CDLString.remove_dquote fa.get_format
+          # format    = fa.get_format.sub( /^\"(.*)/, "\\1" )        # åã® " ãåãé¤ã
+          # format    = format.sub( /(.*)\"\z/, "\\1" )              # å¾ã® " ãåãé¤ã
+          format    = format.gsub( /\\\n/, "\n" )                  # \\\n => \n
+
+          format    = subst_name( format, name_array )
+
+          arg_list  = fa.get_arg_list
+
+          if file_name[0] != ?/ then
+            file_name = "#{$gen}/#{file_name}"
+          end
+
+          na = []     # ã·ã³ãã«ã attribute ã®å¤ã«ç½®ãæããå¾ã®å¼æ°
+          if arg_list then
+            arg_list.each { |a|
+              case a[0]
+              when :STRING_LITERAL   # æå­åå®æ°
+                # s = a[1].sub( /^\"(.*)\"$/, "\\1" )            # åå¾ã® "" ãåãé¤ã
+                s = CDLString.remove_dquote a[1]
+                s = subst_name( s, name_array )
+                # s = subst_name( a[1], name_array )
+
+                na << s
+              when :IDENTIFIER
+                param_name = a[1]    # è­å¥å­ï¼å±æ§ã®ååï¼
+                attr = self.find( param_name )
+                init = attr.get_initializer      # celltype ã§æå®ãããåæå¤
+
+                # cell ã® join ã®ãªã¹ãããååãæ¢ã
+                j = c.get_join_list.get_item( param_name )
+                if j then    # param_name ã® cell ã®ã¸ã§ã¤ã³ãããã
+                  init = j.get_rhs                    # cell ã§æå®ãããåæå¤ãåªå
+
+                end
+
+                str = gen_cell_cb_init( nil, c,    name_array, attr.get_type, init, attr.get_identifier, 0,   true )
+                                      # file,cell, name_array, type,          init, identifier,       indent, f_get_str
+
+                # str = str.sub( /^\"(.*)\"$/, "\\1" )            # åå¾ã® "" ãåãé¤ã mikan ããã§ç½®æã§ããï¼
+                str = CDLString.remove_dquote str
+                na << str
+              end
+            }
+          end
+
+          begin
+            cfg_file = AppFile.open( file_name )
+
+            if $debug then
+              print "'#{c.get_name}' : factory format: "
+              print( format )
+              print( " arg: " )
+              na.each { |n| print "'#{n}' " }
+              print( "\n" )
+            end
+
+            # format ä¸­ã® \n, \r, \t, \f ã¨ \" ãªã©ãç½®æ
+            fmt = CDLString.escape format
+            cfg_file.printf( fmt, *na )
+            cfg_file.puts( "\n" )
+            cfg_file.close()
+          rescue => evar
+            cdl_error( "H1005 \'$1\' : write error while writing factory (specify -t to get more info)" , file_name )
+            print_exception( evar )
+          end
+        end
+      }
+    }
+
+  end
+
+  def generate_makefile
+    generate_makefile_template
+    generate_makefile_depend
+  end
+
+  def generate_makefile_template
+
+    return if $generate_no_template
+
+    # Makefile.templ ã®çæï¼è¿½è¨ï¼
+
+    f = AppFile.open( "#{$gen}/Makefile.templ" )
+    f.print <<EOT
+$(_TECS_OBJ_DIR)#{@global_name}.o : #{@global_name}.#{$c_suffix}
+	$(CC) -c $(CFLAGS) -o $@ $<
+ 
+EOT
+# ãã®çæè¦åã¯2ç¹ã§æå³ããªã
+#  ã»$(GEN_DIR) ã« .o ãçæããã«ã¼ã«ããªã
+#  ã»ãã³ãã¬ã¼ãã³ã¼ãããã®ã¾ã¾ãã«ãããã®ã¯ç´ãããã
+# # Celltype: #{@name}
+# $(GEN_DIR)/#{@global_name}_tecsgen.o : $(GEN_DIR)/#{@global_name}_tecsgen.#{$c_suffix}
+# 	$(CC) -c $(CFLAGS) -o $@ $<
+# 
+# $(GEN_DIR)/#{@global_name}_templ.o : $(GEN_DIR)/#{@global_name}_templ.#{$c_suffix}
+# 	$(CC) -c $(CFLAGS) -o $@ $<
+# 
+
+    f.close
+
+  end
+
+  def generate_makefile_depend
+
+    headers = [ "$(GEN_DIR)/#{@global_name}_tecsgen.#{$h_suffix}", "$(GEN_DIR)/#{@global_name}_factory.#{$h_suffix}", "$(GEN_DIR)/global_tecsgen.#{$h_suffix}" ]
+
+    # inline åãå£ãæã¤ãï¼
+    if @n_entry_port_inline > 0 then
+      headers << "#{@global_name}_inline.#{$h_suffix}"
+    end
+
+    # å¼ã³å£ã¾ãã¯åãå£ã®ã·ã°ããã£ã®ããã
+    @port.each { |p|
+      next if p.is_omit?
+      headers << "$(GEN_DIR)/#{p.get_signature.get_global_name}_tecsgen.#{$h_suffix}"
+    }
+
+    headers += get_depend_header_list
+    headers.sort!
+    headers.uniq!
+    headers = headers.join " "
+
+    f = AppFile.open( "#{$gen}/Makefile.depend" )
+
+#    print_Makefile_note f
+
+    f.print <<EOT
+# Celltype: #{@name}  #_MDEP_#
+$(_TECS_OBJ_DIR)#{@global_name}_tecsgen.o : #{@global_name}_tecsgen.#{$c_suffix} #{headers}
+$(_TECS_OBJ_DIR)#{@global_name}_templ.o : #{@global_name}_templ.#{$c_suffix} #{headers}
+$(_TECS_OBJ_DIR)#{@global_name}.o : #{@global_name}.#{$c_suffix} #{headers}
+
+EOT
+    f.close
+  end
+
+  #=== decl ç¨ã® dealloc ã³ã¼ããçæ
+  #b_reset:: Bool:  ãªã»ããç¨ã® dealloc ã³ã¼ãã®çæ (NULL ãã¤ã³ã¿ã®å ´å dealloc ããªã)
+  # mikan string ä¿®é£¾ããããã¤ã³ã¿ã®å
+ã«ãã¤ã³ã¿ãæ¥ãªãã¨ä»®å®ããã¤ã³ã¿åãæã¤æ§é ä½ã®å¯è½æ§ãæé¤ãã¦ããªã
+  # ãã®ã¡ã½ããã§ã¯ãè¡ãåºåããç´åã« " \\\n" ãåºåããè¡æ«ã§æ¹è¡æå­ãåºåããªã
+  def gen_dealloc_code_for_type( f, type, dealloc_func_name, pre, name, post, level, b_reset, count_str = nil )
+    type = type.get_original_type
+    indent = "	" + "  " * (level+1)
+    if ! type.has_pointer?
+      return
+    elsif type.kind_of?( ArrayType ) then
+      if type.get_type.has_pointer?
+        loop_str = "i#{level}__"
+        count_str = "#{type.get_subscript.eval_const(nil)}"
+        f.print " \\\n"
+        f.print "#{indent}{ int_t  #{loop_str};"
+        f.print " \\\n"
+        f.print "#{indent}  for( #{loop_str} = 0; #{loop_str} < #{count_str}; #{loop_str}++ ){ "
+        
+        gen_dealloc_code_for_type( f, type.get_type, dealloc_func_name, pre, name, "#{post}[#{loop_str}]", level+2, b_reset )
+
+        f.print " \\\n"
+        f.print "#{indent}  }"
+        f.print " \\\n"
+        f.print "#{indent}}"
+      end
+    elsif type.kind_of?( StructType ) then
+      members_decl = type.get_members_decl
+      members_decl.get_items.each { |md|
+        pre2 = pre + name.to_s + post + "."
+        name2 = md.get_name
+        post2 = ""
+        type2 = md.get_type.get_original_type
+        if type2.kind_of? PtrType then   # mikan typedef ãããå
+          if type2.get_count then
+            count_str = type2.get_count.to_str( members_decl, pre2, post2 )
+          elsif type2.get_size then
+            count_str = type2.get_size.to_str( members_decl, pre2, post2 )
+          else
+            count_str = nil
+          end
+        else
+            count_str = nil
+        end
+        gen_dealloc_code_for_type( f, md.get_type, dealloc_func_name, pre2, name2, post2, level, b_reset, count_str )
+      }
+
+    elsif type.kind_of?( PtrType ) then
+
+      if b_reset || type.is_nullable? then
+        nullable = ""
+        if( !b_reset && type.is_nullable? )then
+          nullable = "\t/* nullable */"
+        end
+        level2 = level + 1
+        indent2 = indent + "  "
+        f.print " \\\n"
+        f.print "#{indent}if( #{pre}#{name}#{post} ){#{nullable}"
+      else
+        level2 = level
+        indent2 = indent
+      end
+
+      if type.get_type.has_pointer?
+        if count_str then
+          loop_str = "i#{level}__"
+          f.print " \\\n"
+          f.print "#{indent2}{ int_t  #{loop_str};"
+          f.print " \\\n"
+          f.print "#{indent2}  for( #{loop_str} = 0; #{loop_str} < #{count_str}; #{loop_str}++ ){ "
+
+          gen_dealloc_code_for_type( f, type.get_type, dealloc_func_name, pre, name, "#{post}[#{loop_str}]", level2+2, b_reset )
+
+          f.print " \\\n"
+          f.print "#{indent2}  }"
+          f.print " \\\n"
+          f.print "#{indent2}}"
+        else
+          gen_dealloc_code_for_type( f, type.get_type, dealloc_func_name, "(*#{pre}", name, "#{post})", level2, b_reset )
+        end
+      end
+      f.print " \\\n"
+      f.print "#{indent2}#{dealloc_func_name}( #{pre}#{name}#{post} ); "
+
+      if b_reset || type.is_nullable? then
+        f.print " \\\n"
+        f.print "#{indent}}"
+      end
+    else
+      raise "UnknownType"
+    end
+  end
+
+  def get_depend_header_list
+    get_depend_header_list_( [] )
+  end
+
+  def get_depend_header_list_( celltype_list )
+    headers = []
+
+    if celltype_list.include? self then
+      return headers
+    else
+      celltype_list << self
+    end
+
+    # å¼ã³å£ã®çµåå
+ã®ã»ã«ã¿ã¤ãã®ãããï¼æé©åã®å ´åã®ã¿ï¼
+    # çµåå
+ã®åãå£ã inline ã®å ´åãinline ãããã
+    @port.each { |p|
+      next if p.get_port_type != :CALL
+      next if p.is_omit?
+
+      if p.is_skelton_useless? || p.is_cell_unique? || p.is_VMT_useless? then
+        # æé©åã³ã¼ã (optimize) # ã¹ã±ã«ãã³ä¸è¦ãªã©
+        p2 = p.get_real_callee_port
+        if p2 then
+          ct = p2.get_celltype
+          headers << " $(GEN_DIR)/#{ct.get_global_name}_tecsgen.#{$h_suffix}"
+          if p2.is_inline? then
+            headers << " #{ct.get_global_name}_inline.#{$h_suffix}"
+          end
+          headers += ct.get_depend_header_list_( celltype_list )
+        #else
+        #  optional ã§æªçµå  
+        end
+      end
+    }
+    return headers
+  end
+
+
+  #=== $id$, $ct$, $cb$, $idx$ ç½®æ
+  #
+  #  str ã«ä»¥ä¸ã®ç½®æãè¡ã
+  #-   $ct$ â ã»ã«ã¿ã¤ãå(ct)
+  #-   $cell$ â ã»ã«å(cell)   cell ã nil ãªãã°3ã¤ã®ç½®æã¯è¡ãããªã
+  #-   $cb$ â CB ã® C è¨èªå(cb)
+  #-   $cbp$ â CB ã¸ã®ãã¤ã³ã¿(cbp)
+  #-   $cb_proto$ â CB ã® C è¨èªåãã­ãã¿ã¤ãå®£è¨ç¨(cb_proto)
+  #-   $id$ â ct_cell
+  #-   $idx$ â idx
+  #-   $ID$ â id (æ´æ°ã®çªå·)
+  #-   $ct_global$ â ã»ã«ã¿ã¤ãå(ct)
+  #-   $cell_global$ â ã»ã«å(cell)   cell ã nil ãªãã°3ã¤ã®ç½®æã¯è¡ãããªã
+  #-   $$   â $
+  def subst_name( str, name_array )
+    ct   = name_array[0]    # celltype name
+    cell = name_array[1]    # cell name
+    cb   = name_array[2]    # cell CB name
+    cb_init = name_array[3] # cell CB INIT, ããã¯ç½®æã«ä½¿ãããªã
+    cb_proto = name_array[4] # cell CB name for prototype
+    id   = name_array[6]    # cell ID
+    idx  = name_array[7]    # cell CB name for prototype
+    cbp  = name_array[8]    # cell CB pointer
+    ct_global = name_array[9]    # cell CB pointer
+    cell_global  = name_array[10]    # cell CB pointer
+
+    str = str.gsub( /(^|[^\$])\$ct\$/, "\\1#{ct}" )
+    if cell then
+      str = str.gsub( /(^|[^\$])\$cell\$/, "\\1#{cell}" )
+      str = str.gsub( /(^|[^\$])\$cb\$/, "\\1#{cb}" )
+      str = str.gsub( /(^|[^\$])\$id\$/, "\\1#{ct}_#{cell}" )
+      str = str.gsub( /(^|[^\$])\$cb_proto\$/, "\\1#{cb_proto}" )
+      str = str.gsub( /(^|[^\$])\$ID\$/, "\\1#{id}" )
+      str = str.gsub( /(^|[^\$])\$idx\$/, "\\1#{idx}" )
+      str = str.gsub( /(^|[^\$])\$cbp\$/, "\\1#{cbp}" )
+      str = str.gsub( /(^|[^\$])\$ct_global\$/, "\\1#{ct_global}" )
+      str = str.gsub( /(^|[^\$])\$cell_global\$/, "\\1#{cell_global}" )
+    end
+    str = str.gsub( /\$\$/, "\$" )                       # $$ ã $ ã«ç½®æ
+
+    return str
+  end
+
+end
+
+# Appendable Fileï¼è¿½è¨å¯è½ãã¡ã¤ã«ï¼
+class AppFile
+  # éãããã¡ã¤ã«ã®ãªã¹ã
+  @@file_name_list = {}
+
+  def self.open( name )
+    if $force_overwrite
+      real_name = name
+    else
+      real_name = name+".tmp"
+    end
+
+#2.0
+    if $b_no_kcode then 
+      mode = ":" + $Ruby19_File_Encode
+    else
+      mode = ""
+    end
+
+    # æ¢ã«éãã¦ãããï¼
+    if @@file_name_list[ name ] then
+#2.0
+      mode = "a" + mode
+      # è¿½è¨ã¢ã¼ãã§éã
+      file = File.open( real_name, mode )
+    else
+#2.0
+      mode = "w" + mode
+      # æ°è¦ã¢ã¼ãã§éãï¼æ¢ã«ããã°ããµã¤ãºãï¼ã«ããï¼
+      file = File.open( real_name, mode )
+      @@file_name_list[ name ] = true
+    end
+    # File ã¯ã©ã¹ã®ãªãã¸ã§ã¯ããè¿ã
+    return file
+  end
+
+  def self.update
+    if $force_overwrite
+      return
+    end
+
+    @@file_name_list.each{ |name,boo|
+      b_identical = false
+      if File.readable? name
+        old_lines = File.readlines name
+        new_lines = File.readlines name + ".tmp"
+        if old_lines.length == new_lines.length then
+          i = 0
+          len = old_lines.length
+          while i < len
+            if old_lines[i] != new_lines[i]
+              break
+            end
+            i += 1
+          end
+          if i == len
+            b_identical = true
+          end
+        end
+      end
+      if b_identical == false then
+        if $verbose then
+          print "#{name} updated\n"
+          print "renaming '#{name}.tmp' => '#{name}'\n"
+        end
+        File.rename name+".tmp", name
+      else
+        if $verbose then
+          print "#{name} not updated\n"
+        end
+        File.delete name+".tmp"
+      end
+    }
+  end
+end
+
+class MemFile
+  def initialize
+    @string = ""
+  end
+  def print str
+    @string += str
+  end
+  def get_string
+    @string
+  end
+end
+
+class Region
+
+  def gen_region_str_pre f
+    nest = 1
+    while nest < @family_line.length
+      f.print "  " * ( nest-1 )
+      f.print "region #{@family_line[ nest ].get_name}{\n"
+      nest += 1
+    end
+    return nest - 1
+  end
+
+  def gen_region_str_post f
+    nest = @family_line.length - 1
+    while nest >= 1
+      f.print "  " * ( nest-1 )
+      f.print "};\n"
+      nest -= 1
+    end
+    return nest - 1
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/location.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/location.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/location.rb	(revision 270)
@@ -0,0 +1,135 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: location.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+class TECSGEN
+
+  #------ manupulate location information --------#
+  def self.new_cell_location cell_location
+    @@current_tecsgen.new_cell_location cell_location
+  end
+  def new_cell_location cell_location
+    @cell_location_list << cell_location
+  end
+  def get_cell_location_list
+    @cell_location_list
+  end
+
+  def self.new_join_location join_location
+    @@current_tecsgen.new_join_location join_location
+  end
+  def new_join_location join_location
+    @join_location_list << join_location
+  end
+  def get_join_location_list
+    @join_location_list
+  end
+
+#==  Cell_location
+  # tecscde ã®ä½ç½®æ
+å ±
+  class  Cell_location
+
+    #=== Join_location#initialize
+    #cell_nspath::NamespacePath
+    #x,y,w,h::Expression
+    #port_location_list::[ [Symbol(ep_or_cp_name), Symbol(edge_name), Expression(offset)], ... ]
+    #ep_name::Symbol
+    def initialize( cell_nspath, x, y, w, h, port_location_list )
+      # p "Cell_location: #{cell_nspath}, #{x}, #{y}, #{w}, #{h}, #{port_location_list}"
+      @cell_nspath = cell_nspath
+      @x = x.eval_const nil
+      @y = y.eval_const nil
+      @w = w.eval_const nil
+      @h = h.eval_const nil
+      @port_location_list = port_location_list
+
+      TECSGEN.new_cell_location self
+    end
+
+    def get_location
+      [ @cell_nspath, @x, @y, @w, @h, @port_location_list ]
+    end
+
+  end # Cell_location
+
+  #==  Join_location
+  # tecscde ã®ä½ç½®æ
+å ±
+  class  Join_location
+    @@join_location_list = []
+
+    #=== Join_location#initialize
+    #cp_cell_nspath::NamespacePath
+    #cp_name::Symbol
+    #ep_cell_nspath::NamespacePath
+    #ep_name::Symbol
+    #bar_list::[[Symbol (VBar or HBar), Expression(position mm)], ....]
+    def initialize( cp_cell_nspath, cp_name, ep_cell_path, ep_name, bar_list )
+      # p "Join_location  #{cp_cell_nspath}, #{cp_name}, #{ep_cell_path}, #{ep_name} #{bar_list}"
+      @cp_cell_nspath = cp_cell_nspath
+      @cp_name = cp_name
+      @ep_cell_path = ep_cell_path
+      @ep_name = ep_name
+      @bar_list = bar_list
+
+      TECSGEN.new_join_location self
+    end
+
+    def get_location
+      [@cp_cell_nspath, @cp_name, @ep_cell_path, @ep_name, @bar_list]
+    end
+
+  end # Join_location
+
+end # TECSGEN
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/messages.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/messages.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/messages.rb	(revision 270)
@@ -0,0 +1,107 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: messages.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+#== TECS ã®çæããåå½èªåå¿
+è¦ãªæå­å
+# ç¾ç¶ãã¨ã©ã¼ã¡ãã»ã¼ã¸ã¯è±èªã®ã¿
+# çæãã¡ã¤ã«ã®ã³ã¡ã³ãã¨ãã¦åºåãããæå­å
+class TECSMsg
+
+  #=== TECSMsg#çæãããããããã³ãã¬ã¼ããªã©ã«å«ããã³ã¡ã³ãã®åå¾
+  # CDL ã®æå­ã³ã¼ãã«åããã¦ãæå­ã³ã¼ãå¤æãè¡ã
+  def self.get( msg )
+    str = @@comment[ msg ]
+#2.0    if $KCONV_TECSGEN == $KCONV_CDL
+    if $KCONV_TECSGEN == $KCONV_CDL || $KCONV_CDL == Kconv::BINARY then
+      return str
+    else
+      return str.kconv( $KCONV_CDL, $KCONV_TECSGEN )
+    end
+  end
+
+ #=== TECSMsg#ã­ã¼ã«ã©ã¤ãºãããã¨ã©ã¼ã¡ãã»ã¼ã¸ãå¾ã
+ #body::String   : "S0001 error message body"  ã®å½¢å¼
+ # S0001 ã®é¨åãä½¿ç¨ããã
+ # Generator.error2 ããå¼ã³åºããã
+ def self.get_error_message( body )
+   body =~ /^[A-Z0-9]+/    # ã¨ã©ã¼çªå·ãåãåºã
+   num = $&
+   if num then
+     msg = @@error_message[ num.to_sym ]
+   else
+     msg = nil
+   end
+   if msg == nil then
+     m = body
+   else
+     m = num + " " + msg
+   end
+   return m
+ end
+
+ #=== TECSMsg#ã­ã¼ã«ã©ã¤ãºãããã¦ã©ã¼ãã³ã°ã¡ãã»ã¼ã¸ãå¾ã
+ # Generator.warning2 ããå¼ã³åºããã
+ def self.get_warning_message( body )
+   body =~ /^[A-Z0-9]+/    # ã¦ã©ã¼ãã³ã°çªå·ãåãåºã
+   num = $&
+   msg = @@warning_message[ num.to_sym ]
+   if msg == nil then
+     m = body
+   else
+     m = num + " " + msg
+   end
+   return m
+ end
+
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/optimize.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/optimize.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/optimize.rb	(revision 270)
@@ -0,0 +1,463 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: optimize.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+=begin
+This file includes the processes between semantics analysis and code generation.
+Optimize is one of them.
+Other processes are setting ID for each cell and setting domain information
+
+ãã®ãã¡ã¤ã«ã«ã¯ãæå³è§£æããã³ã¼ãçæã®éã§è¡ãã¹ãå¦çãå«ã¾ããï¼
+æé©åããã®ä¸ã¤ã§ããï¼
+ãã®ä»ã«ãã»ã«æ¯ã® ID ä»ãããã¡ã¤ã³ãããè¡ãï¼
+ã³ã¼ãçæå¯¾è±¡ã¨ãªãã»ã«ãå¯¾è±¡ã«å¦çãè¡ããã®ãå«ã¾ããï¼
+=end
+
+class Namespace
+
+  #===  åã»ã«ã« ID ï¼æ´æ°å¤ï¼ãå²ä»ãã
+  def set_cell_id_and_domain
+    # celltype ã®åã»ã«ã« ID ãå²ä»ãã
+    @celltype_list.each { |t|
+      t.set_cell_id_and_domain
+    }
+
+    # ãµããã¼ã ã¹ãã¼ã¹ã®åã»ã«ã« ID ãå²ä»ãã
+    @namespace_list.each { |n|
+      n.set_cell_id_and_domain
+    }
+  end
+
+  def optimize
+    # celltype ã®æé©å
+    @celltype_list.each { |t|
+      t.optimize
+    }
+
+    # ãµããã¼ã ã¹ãã¼ã¹ã®æé©å
+    @namespace_list.each { |n|
+      n.optimize
+    }
+  end
+
+  def reset_optimize
+    # celltype ã®æé©å
+    @celltype_list.each { |t|
+      t.reset_optimize
+    }
+
+    # ãµããã¼ã ã¹ãã¼ã¹ã®æé©å
+    @namespace_list.each { |n|
+      n.reset_optimize
+    }
+  end
+end
+
+class Celltype
+
+  ID_BASE = 1               # reset_optimize ã§ãªã»ãããã
+  @@ID_BASE = ID_BASE
+
+  def set_cell_id_and_domain
+    set_cell_id
+    set_domain
+  end
+
+  #=== åã»ã«ã« ID ï¼æ´æ°å¤ï¼ãå²ä»ãã
+  def set_cell_id
+
+    if $verbose then
+      print( "=== id for the cells of celltype #{get_namespace_path.to_s} ===\n" ) 
+    end
+
+    if $unique_id then
+      @id_base = @@ID_BASE   # id ãã·ã¹ãã å
+¨ä½ã§é£çªã«ãã
+    else
+      @id_base = 1           # base ãå¸¸ã« 1 ããå§ãã
+    end
+
+    id_specified_cells = []
+    no_id_specified_cells = []
+
+    # ãã­ãã¿ã¤ããé¤ããæ°ãæ±ãã
+    @cell_list.each{ |c|
+      if c.is_generate? then
+        # c.set_id( @id_base + @n_cell_gen )
+        id = c.get_specified_id
+        if id then
+          id_specified_cells << c
+        else
+          no_id_specified_cells << c
+        end
+        
+        # p "#{c.get_name} #{@id_base+@n_cell_gen}"
+        @@ID_BASE     += 1
+        @n_cell_gen   += 1
+      end
+    }
+
+    @ordered_cell_list = []   # id = 1 ãæ·»æ° 0 ã«æ ¼ç´ããã
+    # ID æå®ããã¦ããã»ã«ã« id çªå·ãä¸ãã
+    id_specified_cells.each{ |c|
+      id = c.get_specified_id
+      if id > 0 then
+        if id >= @n_cell_gen then
+          cdl_error( "S3001 $1: id too large $2 (max=$3)", c.get_name, id, @n_cell_gen )
+          next
+        end
+      else
+        if - id >= @n_cell_gen then
+          cdl_error( "S3002 $1: id too large $2 (max=$3)", c.get_name, id, @n_cell_gen )
+          next
+        end
+        id = @n_cell_gen + id + 1
+      end
+
+      if @ordered_cell_list[ id - 1 ] then
+        cdl_error( "S3003 $1: id number '$2' conflict with $3", c.get_name, id, @ordered_cell_list[ id - 1 ].get_name )
+      end
+      @ordered_cell_list[ id - 1 ] = c
+      # éãçªå·ã¨ããå ´åã®ãã @id_base ãå ãã
+      c.set_id( @id_base - 1 + id )
+      if $verbose then
+        print( "#{c.get_name}: id=#{c.get_id}  specified id=#{c.get_specified_id}\n" )
+      end
+    }
+
+    # ID æå®ããã¦ããªãã»ã«ã« id çªå·ãä¸ãã
+    i = 0
+    no_id_specified_cells.each{ |c|
+      while( @ordered_cell_list[i] != nil )
+        i += 1
+      end
+      @ordered_cell_list[ i ] = c
+      c.set_id( @id_base + i )
+      if $verbose then
+        print( "#{c.get_name}: id=#{c.get_id}\n" )
+      end
+    }
+    if @n_cell_gen >0 && i >= @n_cell_gen then
+      raise "id over id=#{i} N=#{@n_cell_gen}"
+    end
+  end
+
+  def set_domain
+    @cell_list.each{ |c|
+      if c.is_generate? then
+        dr = c.get_region.get_domain_root
+        if dr.get_domain_type then
+          dn = dr.get_domain_type.get_name
+        else
+          dn = nil
+        end
+        if @domain_roots[ dn ] then
+          @domain_roots[ dn ] << dr
+        else
+          @domain_roots[ dn ] = [ dr ]
+        end
+      end
+    }
+
+    @domain_roots.each{ |dn, drs|
+      drs.uniq!
+      if ! $debug then
+        dbgPrint "domains celltype:#{@name} domain=#{dn} "
+        drs.each{ |r|
+          dbgPrint " region=#{r.get_name}"
+        }
+        dbgPrint "\n"
+      end
+    }
+    if @domain_roots.length > 1 then
+      p @domain_roots
+      raise "ambigous DomainType"
+    end
+
+    @domain_roots.each{ |dn, regions|
+      # domain_type ã¯ä¸ã¤ã®ãã¼ãã«ä¸ã¤ãããªãã®ã§ãä¸ã¤ã®è¦ç´ ãç¡æ¡ä»¶ã§åãåºã
+      if regions.length > 1 then
+        cdl_info( "celltype:#{@name} has cells in multi domain.\n" )
+        if @idx_is_id == false then
+          cdl_info( "celltype:#{@name} forcely set idx_is_id\n" )
+        end
+        @idx_is_id_act = true
+      end
+    }
+  end
+
+  def optimize
+
+    # port ã®åç
+§ããã»ã«ã¿ã¤ãã®æ°ãã»ã«ã®æ°ãæ±ãã
+    if $verbose then
+      print "=== optimizing celltype #{get_namespace_path.to_s} ===\n"
+    end
+
+    @port.each{ |port|
+      next if port.get_port_type != :CALL
+      if port.is_omit? then
+        # å¼ã³å£æé©åå®æ½
+        @b_cp_optimized = true
+        @n_call_port_omitted_in_CB += 1               # CB ã§çç¥ããå¼ã³å£
+        port.set_skelton_useless                      # ã¹ã±ã«ãã³é¢æ°ä¸è¦æé©å
+        port.set_VMT_useless                          # VMT ä¸è¦æé©å (ç´æ¥åãå£é¢æ°ãå¼åºã)
+        if $verbose then
+          print "optimized by omit: port: #{port.get_name} : o\n"
+        end
+        next
+      end
+
+      if $verbose then
+        print "optimizing port : #{port.get_name}\n"
+      end
+
+      port_cells = []    # å¼ã³å
+ã»ã«
+      port_ports = []    # å¼ã³å
+ã®ãã¼ã
+
+      # ã»ã«ã®åç
+§ããã»ã«ãéããï¼ãã¼ããä¸ç·ã«éããï¼
+      @cell_list.each{ |cell|
+
+        if ! cell.is_generate? then
+          next
+        end
+
+        jl = cell.get_join_list
+        j = jl.get_item( port.get_name )
+
+        if j then
+          if j.get_array_member2 then
+            # å¼ã³å£é
+åã®å ´åãå
+¨é¨ã®çµåå
+ãéãã
+            j.get_array_member2.each { |j2|
+              if j2 then
+                port_cells << j2.get_rhs_cell
+                port_ports << j2.get_rhs_port   # å³è¾ºã®ãã¼ã
+              else
+                # optional ã§ãããæ·»æ°ã®ã¿åæåããã¦ããªãï¼ãã¹ã¦åæåãããªãå ´åã¯ãä¸ï¼
+                port_cells << nil
+                port_ports << nil
+              end
+            }
+          else
+            # å
+¨ã¦ã®çµåå
+ãéãã
+            port_cells << j.get_rhs_cell
+            port_ports << j.get_rhs_port   # å³è¾ºã®ãã¼ã
+          end
+        else
+          # optional ã§åæåããã¦ããªãï¼nil ãè¦ç´ ã«å ãã¦ããï¼
+          port_cells << nil
+          port_ports << nil   # å³è¾ºã®ãã¼ã
+        end
+      }
+
+      # éè¤è¦ç´ ãåãé¤ã
+      port_cells.uniq!
+      port_ports.uniq!
+
+      # å¼ã³å£ã®å¼ã³å
+ãä¸ã¤ã®ãã¼ãã ããï¼
+      if port_ports.length == 1 then
+
+        # å¼ã³å£é
+åãå¯å¤é·ã®å ´åãæé©åããªã
+             # mikan å¼ã³å£é
+åè¦ç´ æ°ãã¯ã­ä¸å
+·åæ«å®å¯¾ç­
+             # ããæã¾ããä¿®æ­£ã¯ãåãå£ã¸ã®ãã¤ã³ã¿ã¯çç¥ããããé
+ååæ°ã¯åºåãã(#_CP_#, #_TCP_#)
+             # ããã«é
+ååæ°ãå®æ°åã§ããã®ã§ããã°ãå®æ°ãã¯ã­ãåºå (#_NCPA_#)
+        next if port.get_array_size == "[]"
+
+        # å¼ã³å£æé©åå®æ½
+        @b_cp_optimized = true
+
+        # å¼ã³å
+ãä¸ã¤ã®ã»ã«ã ããï¼
+        if port_cells.length == 1 then
+
+          # å¼ã³å£ã¯ optional ã§åæåããã¦ããªããã¾ãã¯åãå£ã¯é
+åã§ã¯ãªããï¼
+          if port_ports[0] == nil || port_ports[0].get_array_size == nil then
+
+            @n_call_port_omitted_in_CB += 1               # CB ã§çç¥ããå¼ã³å£
+            port.set_cell_unique                          # ã»ã«ä¸ã¤ã ãæé©å
+            port.set_skelton_useless                      # ã¹ã±ã«ãã³é¢æ°ä¸è¦æé©å
+            port.set_VMT_useless                          # VMT ä¸è¦æé©å (ç´æ¥åãå£é¢æ°ãå¼åºã)
+
+            if $verbose then
+              print "cell_unique, VMT_useless & skelton_useless optimize\n"
+            end
+          else
+            port.set_VMT_useless                          # VMT ä¸è¦æé©å (ã¹ã±ã«ãã³é¢æ°ãå¼åºã)
+
+            if $verbose then
+              print "VMT_useless optimize\n"
+            end
+          end
+
+        else  # å¼ã³å
+ãè¤æ°ã®ã»ã«ï¼åä¸ã®ãã¼ãï¼
+
+          # å¼ã³å£ã¯ optional ã§åæåããã¦ããªããã¾ãã¯åãå£ã¯é
+åã§ã¯ãªããï¼
+          if port_ports[0] == nil || port_ports[0].get_array_size == nil then
+            if ! @singleton then
+              port.set_skelton_useless                    # ã¹ã±ã«ãã³é¢æ°ä¸è¦æé©å
+              port.set_VMT_useless                        # VMT ä¸è¦æé©å (ã¹ã±ã«ãã³é¢æ° or åãå£é¢æ°ãå¼åºã)
+
+              if $verbose then
+                print "VMT_useless & skelton useless optimize\n"
+              end
+            else
+              port.set_VMT_useless                           # VMT ä¸è¦æé©å (ã¹ã±ã«ãã³é¢æ° or åãå£é¢æ°ãå¼åºã)
+
+              if $verbose then
+                print "VMT_useless optimize\n"
+              end
+            end
+          end
+        end
+
+        port.set_only_callee( port_ports[0], port_cells[0] )
+           # set_cell_unique ã§ãªãå ´å cell ã¯æå³ããªã
+
+      end
+
+      # debug
+      dbgPrint "#{port.get_name} : # of cells : #{port_cells.length}  # of ports : #{port_ports.length}\n"
+    }
+
+    # åãå£æé©åã®è¨­å®
+    @port.each{ |port|
+      next if port.get_port_type != :CALL
+
+      # å¼ã³å£å´ã®æé©åç¶æ
+
+      b_VMT_useless     = port.is_VMT_useless?
+      b_skelton_useless = port.is_skelton_useless?
+
+      # ã»ã«ã®åç
+§ããã»ã«ãéããï¼ãã¼ããä¸ç·ã«éããï¼
+      @cell_list.each{ |cell|
+
+        if ! cell.is_generate? then
+          next
+        end
+
+        jl = cell.get_join_list
+        j = jl.get_item( port.get_name )
+
+        if j then    # optional ã§çµåããã¦ããªãå ´å nil
+          if j.get_array_member2 then
+            # å¼ã³å£é
+å
+            j.get_array_member2.each { |j2|
+              if j2 then
+                port2 = j2.get_rhs_port   # å³è¾ºã®ãã¼ã
+                # åãå£å´ã®æé©åå¯è½æ§ãè¨­å®
+                port2.set_entry_VMT_skelton_useless( b_VMT_useless, b_skelton_useless )
+              #else
+              #  optional ã§å¼ã³å£é
+åè¦ç´ ãåæåããã¦ããªã
+              end
+            }
+          else
+            port2 = j.get_rhs_port      # å³è¾ºã®ãã¼ã
+            # åãå£å´ã®æé©åå¯è½æ§ãè¨­å®
+            port2.set_entry_VMT_skelton_useless( b_VMT_useless, b_skelton_useless )
+          end
+        end
+      }
+    }
+  end
+
+  #Celltype# ãªã»ãããã
+  def reset_optimize
+    @@ID_BASE = ID_BASE      # æ¬å½ã¯ä¸åã ãã§ãã
+    @id_base = 1             # set_cell_id ã§ãªã»ãããããã®ã§ä¸è¦
+
+    @b_cp_optimized = false  # å¼ã³å£æé©å
+    @n_call_port_omitted_in_CB = 0 # å¼ã³å£æé©åã«ããä¸çæã¨ãªã£ããã¼ãã®æ°
+    @n_cell_gen = 0          # çæã»ã«åæ°
+    @port.each{ |p|
+      p.reset_optimize
+    }
+    @included_header = {}
+    @domain_roots = {}
+  end
+
+  #Celltype# ãããã¯ include ããã¦ããã
+  #hname::Symbol : ãããå
+  #RETURN:: bool_t: false ã¤ã³ã¯ã«ã¼ãããã¦ããªããtrue ã¤ã³ã¯ã«ã¼ãããã¦ãã
+  # #_ISH_#, #_ICT_# ã§ããããåãè¾¼ã¾ãã¦ããããã§ãã¯ãã
+  # false ãè¿ã£ãå ´åãhname ã¯ç»é²ããã¦ãæ¬¡åã®å¼ã³åºãã§ã¯ true ãè¿ã
+  def header_included?( hname )
+    if @included_header[ hname ] == nil then
+      @included_header[ hname ] = true
+      return false
+    else
+      return true
+    end
+  end
+end
+
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/plugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/plugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/plugin.rb	(revision 270)
@@ -0,0 +1,356 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: plugin.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+#== class ã¢ã¸ã¥ã¼ã«
+# ThroughPlugin, SignaturePlugin, CelltypePlugin ã« include ãã
+class Plugin < Node
+#@error_backlog:: [msg1, msg2, ... ]   @locale ãè¨­å®ãããåã«çºçããã¨ã©ã¼
+
+  PluginArgProc = {
+    "silent"  => Proc.new { |obj,rhs| obj.set_silent rhs },
+  }
+
+  def initialize
+    super
+    @b_silent = false
+    @locale = nil       # set_locale ãå¼ã³åºãããã¾ã§ nil ã¨ãªã
+    @error_backlog = []
+  end
+
+  #=== Plugin#cdl_error
+  # set_locale ãå¼ã³åºãããã¾ã§ @error_backlog ã«ä¿å­ãä¿çãã
+  def cdl_error *arg
+    if @locale then
+      Generator.error2( @locale, *arg )
+    else
+      @error_backlog << arg
+    end
+  end
+
+  #=== locale ãè¨­å®ãã
+  # Node ã¯ initialize ã§ locale ãè¨­å®ããããplugin ã¯ parse ã¨ã¯
+  # ç°ãªãã¿ã¤ãã³ã° new ããããããlocale ãåè¨­å®ãã
+  # ãã®ã¡ã½ããã2åº¦å¼ã³åºãã¨ @error_backlog ã®ã¨ã©ã¼ã2åº¦åºåããã¦ãã¾ã
+  def set_locale locale
+    @locale = locale
+    @error_backlog.each { |arg|
+      Generator.error2( locale, *arg )
+    }
+  end
+
+### æå³è§£ææ®µéã§å¼ã³åºãããã¡ã½ãã ###
+  #===  CDL ãã¡ã¤ã«ã®çæ
+  #      typedef, signature, celltype, cell ã®ã³ã¼ããçæ
+  #      éè¤ãã¦çæãã¦ã¯ãªããªã
+  #      ãã§ã«çæããã¦ããå ´åã¯åºåããªããã¨ã
+  #      ãããã¯ååã® import ã«ãããéè¤ãé¿ãããã¨ã
+  #file::        FILE       çæãããã¡ã¤ã«
+  def gen_cdl_file file
+  end
+
+
+### ã³ã¼ãçæ®µéã§å¼ã³åºãããã¡ã½ãã ###
+  #=== ãã©ã°ã¤ã³ã¯ gen_ep_func ãæä¾ããã
+  # gen_ep_func å®ç¾©   â ãã³ãã¬ã¼ãã§ã¯ãªããã»ã«ã¿ã¤ãã³ã¼ã(tCelltype.c)ãçæ 
+  # gen_ep_func æªå®ç¾© â ãã³ãã¬ã¼ã(tCelltype_templ.c)ãçæ
+  def gen_ep_func?
+    self.class.method_defined?( :gen_ep_func_body )
+  end
+
+  #===  åãå£é¢æ°ã®æ¬ä½(Cè¨èª)ãçæãã
+  #     ãã©ã°ã¤ã³ã®å ´åãå¤æ´ããå¿
+è¦ã®ãªãã»ã«ã¿ã¤ãã³ã¼ããçæãã
+  #     ãã®ã¡ã½ãããæªå®ç¾©ã§ããã°ããã©ã°ã¤ã³ã¯ã»ã«ã¿ã¤ãã³ã¼ããçæããªã (éå¸¸éããã³ãã¬ã¼ããçæãã)
+  #      gen_cdl_file ã®ä¸­ã§çæãããã»ã«ã¿ã¤ãã«å¯¾ãã¦å¼ã³åºããã
+  #file::           FILE        åºåå
+ãã¡ã¤ã« (tCelltype.c)
+  #b_singleton::    bool        true if singleton
+  #ct_name::        Symbol
+  #global_ct_name:: string
+  #sig_name::       string
+  #ep_name::        string
+  #func_name::      string
+  #func_global_name:: string
+  #func_type::      class derived from Type
+#  def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+#  end
+
+  #===  åãå£é¢æ°ã® preamble (Cè¨èª)ãçæãã
+  #     å¿
+è¦ãªã preamble é¨ã«åºåãã
+  #      gen_cdl_file ã®ä¸­ã§ã§çæãããã»ã«ã¿ã¤ãã«å¯¾ãã¦å¼ã³åºããã
+  #file::           FILE        åºåå
+ãã¡ã¤ã«
+  #b_singleton::    bool        true if singleton
+  #ct_name::        Symbol
+  #global_ct_name:: string
+  def gen_preamble( file, b_singleton, ct_name, global_ct_name )
+    # ããã©ã«ãã§ã¯ä½ãåºåããªã
+  end
+
+  #===  åãå£é¢æ°ã® postamble (Cè¨èª)ãçæãã
+  #     å¿
+è¦ãªã postamble é¨ã«åºåãã
+  #      gen_cdl_file ã®ä¸­ã§çæãããã»ã«ã¿ã¤ãã«å¯¾ãã¦å¼ã³åºããã
+  #file::           FILE        åºåå
+ãã¡ã¤ã«
+  #b_singleton::    bool        true if singleton
+  #ct_name::        Symbol
+  #global_ct_name:: string
+  def gen_postamble( file, b_singleton, ct_name, global_ct_name )
+    # ããã©ã«ãã§ã¯ä½ãåºåããªã
+  end
+
+  #=== gen_cdl_file ã®ä¸­ã§çæãããã»ã«ã¿ã¤ãã«æ°ããã»ã«ãçæããã
+  # ã©ã®ã»ã«ã¿ã¤ããã¯ cell.get_celltype ã§åãã
+  #
+  #file::           FILE        åºåå
+ãã¡ã¤ã«
+  #b_singleton::    bool        true if singleton
+  #ct_name::        Symbol
+  #global_ct_name:: string
+  def new_cell cell
+    # ããã©ã«ãã§ã¯ä½ãããªã
+  end
+
+### ãã©ã°ã¤ã³å¼æ°ã®è§£é ###
+  def parse_plugin_arg
+    arg = @plugin_arg_str.dup
+
+    # æ¹è¡ãæ¶ã
+    arg.gsub!( /\\\n/, "" )
+
+    while arg != ""
+
+      # åã®ç©ºç½èª­ã¿é£ã°ã
+      arg.sub!( /\A\s*(?:\\\n)*\s*(.*)/, '\1')
+
+      #  è­å¥å­åå¾
+      if arg =~ /\A[a-zA-Z_]\w*/ then
+        ident = $~
+        arg = $'
+      else
+        cdl_error( "P1001 plugin arg: cannot find identifier in $1" , arg )
+        return
+      end
+      
+      # åã®ç©ºç½èª­ã¿é£ã°ã
+      arg.sub!( /\A\s*(?:\\\n)*\s*(.*)/, '\1')
+
+      if arg =~ /=/ then
+        arg = $'
+      else
+        cdl_error( "P1002 plugin arg: expecting \'=\' not \'$1\'" , arg )
+        return
+      end
+
+      # åã®ç©ºç½èª­ã¿é£ã°ã
+      arg.sub!( /\A\s*(?:\\\n)*\s*(.*)/, '\1')
+
+      # å³è¾ºæå­å
+      if arg =~ /\A\\"(.*?)\\"\s*,/ then      # \"  \" ã§å²ã¾ãã¦ããå ´å
+        rhs = $1
+        remain = $'
+      elsif arg =~ /\A%(.*?)%\s*,/ then      # %   % ã§å²ã¾ãã¦ããå ´å
+        rhs = $1
+        remain = $'
+      elsif arg =~ /\A!(.*?)!\s*,/ then    # $   $ ã§å²ã¾ãã¦ããå ´å
+        rhs = $1
+        remain = $'
+      elsif arg =~ /\A'(.*?)'\s*,/ then    # $   $ ã§å²ã¾ãã¦ããå ´å
+        rhs = $1
+        remain = $'
+      elsif  arg =~ /\A\\"(.*?)\\"\s*,/ then  # || ã«ã [,$] ã«ãã§ããªãã£ã
+        rhs = $1
+        remain = $'
+      # elsif arg =~ /\A(.*?)\s*$/ then
+      elsif arg =~ /\A\\"(.*?)\\"\s*\z/ then      # \"  \" ã§å²ã¾ãã¦ããå ´å
+        rhs = $1
+        remain = $'
+      elsif arg =~ /\A%(.*?)%\s*\z/ then      # %   % ã§å²ã¾ãã¦ããå ´å
+        rhs = $1
+        remain = $'
+      elsif arg =~ /\A!(.*?)!\s*\z/ then    # $   $ ã§å²ã¾ãã¦ããå ´å
+        rhs = $1
+        remain = $'
+      elsif arg =~ /\A'(.*?)'\s*\z/ then    # $   $ ã§å²ã¾ãã¦ããå ´å
+        rhs = $1
+        remain = $'
+      elsif  arg =~ /\A\\"(.*?)\\"\s*\z/ then  # || ã«ã [,$] ã«ãã§ããªãã£ã
+        rhs = $1
+        remain = $'
+      elsif arg =~ /\A(.*?),/ then
+        rhs = $1
+        remain = $'
+        # åã®ç©ºç½èª­ã¿é£ã°ã
+        rhs.sub!( /\A\s*(.*)\s*\z/, '\1')
+      elsif arg =~ /\A(.*?)\s*\z/ then
+        rhs = $1
+        remain = $'
+      else
+        cdl_error( "P1003 plugin arg: unexpected $1" , arg )
+        return
+      end
+
+      # 0æå­ã®æå­åã to_sym ããã¨ä¾å¤çºçããã®ã§ç©ºç½æå­ã¨ãã
+      if rhs == "" then
+        rhs = " "
+      end
+
+      arg = remain         # arg ã®æ®ãã®é¨å
+      arg.sub!( /\A\s*(?:\\\n)*\s*(.*)/, '\1')      # åã®ç©ºç½èª­ã¿é£ã°ã
+
+      # \ ãå¤ã
+      rhs = rhs.gsub( /\\(.)/, "\\1" )   # ããã§ $' ãå¤ãããã¨ã«æ³¨æï¼
+      # print "parse_plugin_arg:  #{ident} #{rhs}\n"
+      @plugin_arg_list[ ident ] = rhs
+
+      check_plugin_arg( ident, rhs )
+    end
+    # @plugin_arg_list.each{|i,r|  print "ident: #{i}  rhs: #{r}\n" }
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ°ããã§ãã¯ãã
+  # @plugin_arg_check_proc_tab ã«å¾ã£ã¦ãã©ã°ã¤ã³å¼æ°ããã§ãã¯ããã
+  # å¤ãç¨æ³ï¼å­ã¯ã©ã¹ã§ãªã¼ãã¼ã©ã¤ãããå¼æ°è­å¥å­ãæ­£ããããã§ãã¯ãã
+  #ident:: string: å¼æ°è­å¥å­
+  #rhs:: string: å³è¾ºæå­å
+  def check_plugin_arg( ident, rhs )
+
+    dbgPrint "check_plugin_arg: #{ident} #{rhs.to_str}\n"
+    proc = nil
+    if @plugin_arg_check_proc_tab  then
+      proc = @plugin_arg_check_proc_tab[ident.to_s]
+    end
+    if proc == nil then
+      proc = PluginArgProc[ ident.to_s ]
+    end
+    if proc.instance_of? Proc then
+      dbgPrint "calling: #{self.class.name}.#{proc.to_s}\n"
+      proc.call( self, rhs )
+    else
+      params = ""
+      delim = ""
+      @plugin_arg_check_proc_tab.each{ |j,p|
+        params = "#{params}#{delim}#{j}"
+        delim = ", "
+      }
+      cdl_error( "P1004 $1: unknown plugin argument\'s identifier\n  $2 are acceptible for RPCPlugin." , ident, params )
+    end
+  end
+
+  #=== ãã©ã°ã¤ã³ã®ã¡ãã»ã¼ã¸åºå
+  def print_msg( msg )
+    if @b_silent == true then
+      return
+    end
+    print msg
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° silent
+  def set_silent rhs
+    if rhs == "true" || rhs == nil then
+      @b_silent = true
+    end
+  end
+end
+
+#== åºåæå­åã EUC ããåºåãã¡ã¤ã«ã« convert ãã
+# tecsgen ã®ã½ã¼ã¹ã³ã¼ãã¯ EUC ã§è¨è¿°ããã¦ãã
+# ããããåºåãã¡ã¤ã«ã®æå­ã³ã¼ãã«å¤æãã¦åºåãã
+#
+# generate.rb ã§åºåãããã®ã¯ message.rb ã§å¤æãã¦ãã
+# generate.rb ã§åºåãããã®ã¯ APPFile ã¯ã©ã¹ãä½¿ç¨ãã¦ãã
+# mikan: CFile ã§åºåãããã®ã« factory ã§è¿½è¨ã§ããªã (cdl ãã¡ã¤ã«ã®å ´åãè¿½è¨ã§ãã¦ãæå³ããªã)
+class CFile
+  def self.open( path, mode )
+    CFile.new( path, mode )
+  end
+
+  def initialize( path, mode )
+    if $b_no_kcode then 
+      mode += ":" + $Ruby19_File_Encode
+    end
+    @file = File.open( path, mode )
+  end
+
+  def print str
+    if $b_no_kcode && $KCONV_CONSOLE == Kconv::BINARY then 
+      @file.print( str )
+    else
+      @file.print( str.kconv( $KCONV_CDL, $KCONV_TECSGEN ) )
+    end
+  end
+
+  def puts str
+    if $b_no_kcode && $KCONV_CONSOLE == Kconv::BINARY then 
+      @file.print( str )
+    else
+      @file.print( str.kconv( $KCONV_CDL, $KCONV_TECSGEN ) )
+    end
+    @file.print( "\n" )
+  end
+
+  def printf( format, *arg )
+    if $b_no_kcode && $KCONV_CONSOLE == Kconv::BINARY then 
+      @file.print( sprintf( format, *arg ) )
+    else
+      @file.print( sprintf( format, *arg ).kconv( $KCONV_CDL, $KCONV_TECSGEN ) )
+    end
+  end
+
+  def close
+    @file.close
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/pluginModule.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/pluginModule.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/pluginModule.rb	(revision 270)
@@ -0,0 +1,163 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: pluginModule.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+#== ãã©ã°ã¤ã³ãã­ã¼ãããå´ã®ã¢ã¸ã¥ã¼ã«
+# @@loaded_plugin_list:: {Symbol=>Integer}
+module PluginModule
+
+  @@loaded_plugin_list = {}
+
+  #=== ãã©ã°ã¤ã³ãã­ã¼ããã
+  #return:: true : æåã false : å¤±æ
+  #
+  # ãã§ã«ã­ã¼ãããã¦ãããã®ã¯ãéè¤ãã¦ã­ã¼ãããªã
+  # load æã®ä¾å¤ã¯ãã®ã¡ã½ããã®ä¸­ã§ã­ã£ããããã¦ false ãè¿ããã
+  def load_plugin( plugin_name, superClass )
+
+    dbgPrint "PluginModule: load_plugin: #{plugin_name}\n"
+    begin
+      unless @@loaded_plugin_list[ plugin_name.to_sym ] then
+        @@loaded_plugin_list[ plugin_name.to_sym ] = 0
+        if ( $verbose ) then
+          print( "load '#{plugin_name}.rb'\n" )
+        end
+        # "#{plugin_name}.rb" ãã­ã¼ãï¼ã·ã¹ãã ç¨ã§ã¯ãªãã®ã§ãfatal ã¨ã©ã¼ã«ããªãï¼
+        if require_tecsgen_lib( "#{plugin_name}.rb", false ) == false
+          cdl_error( "P2001 $1.rb : fail to load plugin" , plugin_name )
+          return false
+        end
+      end
+
+      plSuper = nil
+      # eval( "plSuper = #{plugin_name}.superclass" )
+      eval( "plSuper = #{plugin_name}" )
+      while plSuper != superClass && plSuper != nil
+        plSuper = plSuper.superclass
+      end
+      if plSuper == nil then
+        cdl_error( "P2002 $1: not kind of $2" ,  plugin_name, superClass.name )
+        return false
+      end
+    rescue Exception => evar
+      if $debug then
+        p evar.class
+        pp evar.backtrace
+      end
+      cdl_error( "P2003 $1: load failed" , plugin_name )
+      return false
+    end
+    return true
+  end
+
+  #=== ãã©ã°ã¤ã³ã® gen_cdl_file ãå¼ã³ãã¦ cdl ãã¡ã¤ã«ãçæãããè§£éãè¡ã
+  def generate_and_parse plugin_object
+    if plugin_object == nil     # ãã©ã°ã¤ã³ã®ã­ã¼ãã«å¤±æãã¦ããï¼æ¢ã«ã¨ã©ã¼ï¼
+      return
+    end
+    plugin_name = plugin_object.class.name.to_sym
+    if @@loaded_plugin_list[ plugin_name ] == nil
+      raise "#{plugin_name} might have different name "
+      # ãã©ã°ã¤ã³ã®ãã¡ã¤ã«åã¨ããã©ã°ã¤ã³ã®ã¯ã©ã¹åãç¸éããå ´å
+    end
+    count = @@loaded_plugin_list[ plugin_name ]
+    @@loaded_plugin_list[ plugin_name ] += 1
+    tmp_file_name = "#{$gen}/tmp_#{plugin_name}_#{count}.cdl"
+
+    begin
+      tmp_file = CFile.open( tmp_file_name, "w" )
+    rescue Exception => evar
+      cdl_error( "P2004 $1: open error \'$2\'" , plugin_name, tmp_file_name )
+      print_exception( evar )
+    end
+    dbgPrint "generate_and_parse: #{plugin_object.class}: gen_cdl_file\n"
+    begin
+      plugin_object.gen_cdl_file( tmp_file )
+    rescue Exception => evar
+      cdl_error( "P2005 $1: plugin error in gen_through_cell_code " , plugin_name )
+      print_exception( evar )
+    end
+    begin
+      tmp_file.close
+    rescue Exception => evar
+      cdl_error( "P2006 $1: close error \'$2\'" , plugin_name, tmp_file_name )
+      print_exception( evar )
+    end
+
+    generator = Generator.new
+    generator.set_plugin( plugin_object )
+    generator.parse( [ tmp_file_name ] )
+    generator.finalize
+  end
+
+  #=== ãã©ã°ã¤ã³ã CDL ã® POST ã³ã¼ããçæ
+  # tmp_plugin_post_code.cdl ã¸ã®åºå
+  def self.gen_plugin_post_code file
+    dbgPrint "PluginModule #{@@loaded_plugin_list}\n"
+    @@loaded_plugin_list.each{ |plugin_name,count|
+      dbgPrint "PluginModule: #{plugin_name}\n"
+      eval_str = "#{plugin_name}.gen_post_code( file )"
+      if $verbose then
+        print "gen_plugin_post_code: #{eval_str}\n"
+      end
+      begin
+        eval( eval_str )
+      rescue Exception => evar
+        Generator.error( "P2007 $1: fail to generate post code" , plugin_name )
+
+        print_exception( evar )
+      end
+    }
+  end
+
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/syntaxobj.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/syntaxobj.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/syntaxobj.rb	(revision 270)
@@ -0,0 +1,1285 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2016 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: syntaxobj.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+# mikan ruby ã® symbol ã¨æå­åã®ä½¿ãåããã©ããã¦ããã¾ããããªããã¨ãæã
+ããã®ã§ name.to_sym ãå
+¥ãããã¨ã«ãã
+
+#== Node
+#
+# Node ã®ç´æ¥ã®å­ã¯ã©ã¹ï¼ C_EXP, Type, BaseVal, BDNode(ã»ã¨ãã©ã®ãã®ã¯ BDNode ã®å­ã¯ã©ã¹)
+# Node ã« (BDNodeã«ã) å
+¥ããªããã®: Token, Import, Import_C, Generate
+#
+# owner ãæããªããã®ã Node ã¨ãªã
+# ã¨ã©ã¼ã¯ãcdl_error ãéãã¦å ±åãã (æå³è§£æãæ§æè§£æå¾ã«è¡ãããå ´åã«ã¯ãè¡çªå·ãæ­£ããåºåã§ãã
+# 
+
+class Node
+#@locale::    [@file, @lineno, @col]
+
+  def initialize
+    @locale = Generator.current_locale
+  end
+
+  #=== ã¨ã©ã¼ãåºåãã
+  def cdl_error( message, *arg )
+    Generator.error2( @locale, message, *arg )
+  end
+
+  #=== ã¨ã©ã¼ãåºåãã
+  #locale:: Array(locale info) : æ§æè§£æä¸­ã¯ç¡è¦ããã
+  def cdl_error2( locale, message, *arg )
+    Generator.error2( locale, message, *arg )
+  end
+
+  #=== ã¨ã©ã¼ãåºåãã
+  #locale:: Array(locale info)
+  # æ§æè§£æä¸­ cdl_error2 ã§ã¯ locale ãç¡è¦ããããããå¥ã« locale ãåºåãã
+  def cdl_error3( locale, message, *arg )
+    Generator.error(  message, *arg )
+    Console.puts "check: #{locale[0]}: line #{locale[1]} for above error"
+  end
+
+  #=== ã¦ã©ã¼ãã³ã°åºåãã
+  def cdl_warning( message, *arg )
+    Generator.warning2( @locale, message, *arg )
+  end
+
+  #=== ã¦ã©ã¼ãã³ã°åºåãã
+  def cdl_warning2( locale, message, *arg )
+    Generator.warning2( locale, message, *arg )
+  end
+
+  #=== æ
+å ±ãè¡¨ç¤ºãã
+  def cdl_info( message )
+    Console.puts "info: #{message}"
+  end
+
+  def get_locale
+    @locale
+  end
+
+  def set_locale locale
+    @locale = locale
+  end
+
+  def locale_str
+    "locale=( #{@locale[0]}, #{@locale[1]} )"
+  end
+end
+
+#== åæ¹å Node (Bi Direction Node)
+#
+#  Node ã®å­ã¯ã©ã¹
+#  owner Node ããåç
+§ããã¦ãããã® (owner ã¸ã®ãªã³ã¯ãåãåºãã)
+#
+#  get_owner ã§å¾ããããã®
+#    FuncHead => Signature
+#    Decl => Namespace(const), Typedef(typedef),
+#            Celltype, CompositeCelltype(attr,var)
+#            Struct(member), ParamDecl(parameter), FuncHead(funchead)
+#    Signature, Celltype, CompositeCelltype, Typedef => Namespace
+#,   Namespace => Namespace, Generator.class (root Namespace ã®å ´å)
+#    Cell => Region, CompositeCelltype(in_composite)
+#    Port => Celltype, Composite
+#    Factory => Celltype
+#    Join => Cell
+#    CompositeCelltypeJoin => CompositeCelltype
+#    Region => Region, 
+#    ParamDecl => ParamList
+#    ParamList => FuncHead
+#    Expression => Namespace
+#    å¤§åã®ãã®ã¯ new_* ã¡ã½ããã§ owner Node ã«ä¼éããã
+#    ãã®ã¡ã½ãããå¼ã³åºãããã¨ãã« owner Node ãè¨é²ããã
+#    new_* ããªããã®ï¼
+#            Decl(parameter), ParamDecl, ParamList, FuncHead, Expression 
+#
+#    Expression ã¯ãowner Node ã¨ãªããã®ãå¤ãããããæ¹é ãå°é£ã§ãããã
+#    Expression ãå®ç¾©ãããã¨ãã® Namespace ã owner Node ã¨ãã
+#    StructType ã¯ Type ã®ä¸ç¨®ãªã®ã§ owner ãæããªã
+#
+class BDNode < Node
+#@owner::Node
+#@NamespacePath:: NamespacePath
+#@Generator::
+#@import::Import :  
+
+  def initialize
+    super
+    @owner = nil
+    @NamespacePath = nil
+    @import = Import.get_current
+
+  end
+
+  #=== owner ãè¨­å®ãã
+  def set_owner owner
+    dbgPrint "set_owner: #{owner.class.name}\n"
+    @owner = owner
+  end
+
+  #=== owner ãå¾ã
+  # class ã®èª¬æãåç
+§
+  def get_owner
+    if @owner == nil
+      raise "Node have no owner #{self.class.name} #{get_name}"
+    end
+    @owner
+  end
+end
+
+#== Namespace åãæã¤ BDNode
+# Namespace(Region), Signature, Celltype, CompositeCelltype, Cell
+class NSBDNode < BDNode
+
+  def initialize
+    super
+  end
+
+  #=== å±ãã namespace ãå¾ã
+  # owner ã namespace ã«ãã©ãçãã¾ã§ä¸ã«ãã©ã
+  def get_namespace
+    if @owner.kind_of? Namespace
+      return @owner
+    elsif @owner != nil then
+      return @owner.get_namespace
+    else
+      # @owner == nil ãªã "::"
+      if @name != "::" then
+        raise "non-root namespace has no owner #{self.class.name}##{@name} #{self}"
+      end
+      return nil
+    end
+  end
+
+  def set_namespace_path
+    ns = get_namespace
+    if ns then
+      @NamespacePath = ns.get_namespace_path.append( get_name )
+    else
+      raise "get_namespace_path: no namespace found"
+    end
+  end
+
+  #=== NamespacePath ãå¾ã
+  def get_namespace_path
+    return @NamespacePath
+  end
+
+  def is_imported?
+    if @import then
+      return @import.is_imported?
+    else
+      return false    # mikan: ä»® @import ã nil ã«ãªãã±ã¼ã¹ãè¿½æ±ã§ãã¦ããªã
+    end
+  end
+end
+
+class NamedList
+#  @names:: {} of items
+#  @items:: [] of items : item ã® CLASS ã¯ get_name ã¡ã½ãããæã¤ãã¨ get_name ã®æ»ãå¤ã¯ Symbol ã§ãªãã¦ã¯ãªããªã
+#                         NamedList ã clone_for_composite ããå ´åã¯ãitem ã«ãã¡ã½ãããå¿
+è¦
+#  @type:: string	ã¨ã©ã¼ã¡ãã»ã¼ã¸
+
+  def initialize( item, type )
+    @names = {}
+    @items = []
+    @type = type
+    add_item( item )
+  end
+
+  #=== è¦ç´ ãå ãã
+  # parse ããæç¹ã§å ãããã¨(å ´æãè¨æ¶ãã)
+  def add_item( item )
+
+    if item then
+      assert_name item
+      name = item.get_name
+      prev = @names[name]
+      if prev then
+        Generator.error( "S2001 \'$1\' duplicate $2" , name, @type )
+        prev_locale = prev.get_locale
+        puts "previous: #{prev_locale[0]}: line #{prev_locale[1]} \'#{name}\' defined here"
+        return self
+      end
+
+      @names[name]=item
+      @items << item
+    end
+
+    return self
+  end
+
+  def change_item( item )
+    assert_name item
+    name = item.get_name
+
+    prev_one = @names[name]
+    @names[name]=item
+
+    @items = @items - [ prev_one ]
+    @items << item
+  end
+
+  def del_item( item )
+    assert_name item
+    name = item.get_name
+    @names.delete name
+
+    @items = @items - [ item ]
+  end
+
+  def get_item( name )
+    if ! name.kind_of? Symbol
+      print "get_item: '#{name}', items are below\n"
+      @names.each{ |nm,item|
+        p nm
+      }
+      raise "get_item: #{name}: not Symbol"
+    end
+    if name then
+      return @names[name.to_sym]
+    else
+      return nil
+    end
+  end
+
+  def get_items
+    return @items
+  end
+
+  #=== composite cell ã clone ããæã«è¦ç´ (JOIN) ã® clone ãã
+  #
+  # mikan ãã®ã¡ã½ããã¯ Join ã«ç¹åããã¦ããã®ã§ NamedList ããåé¢ãã¹ã
+  def clone_for_composite( ct_name, cell_name, locale )
+    cl = self.clone
+    cl.set_cloned( ct_name, cell_name, locale )
+    return cl
+  end
+
+  #=== clone ããã NamedList ã¤ã³ã¹ã¿ã³ã¹ã®åç
+§ãããã®(item)ã clone
+  #
+  # mikan ãã®ã¡ã½ããã¯ Join ã«ç¹åããã¦ããã®ã§ NamedList ããåé¢ãã¹ã
+  def set_cloned( ct_name, cell_name, locale )
+    items = []
+    names = {}
+    @items.each { |i|
+      dbgPrint "NamedList clone #{ct_name}, #{cell_name}, #{i.get_name}\n"
+
+      cl = i.clone_for_composite( ct_name, cell_name, locale )
+      names[cl.get_name] = cl
+      items << cl
+    }
+    @items = items
+    @names = names
+  end
+
+  def assert_name item
+    if ! item.get_name.kind_of? Symbol
+      raise "Not symbol for NamedList item"
+    end
+  end
+
+  def show_tree( indent )
+    @items.each { |i|
+      i.show_tree( indent )
+    }
+  end
+
+end
+
+class Typedef < BDNode
+# @declarator:: Decl
+
+  def self.new_decl_list( type_spec_qual_list, decl_list )
+    decl_list.each { |decl|
+       Typedef.new( type_spec_qual_list, decl )
+    }
+  end
+
+  def initialize( type_spec_qual_list, decl )
+    super()
+    decl.set_type( type_spec_qual_list )
+    @declarator = decl
+    decl.set_owner self    # Decl(Typedef)
+
+    Namespace.new_typedef( self )
+  end
+
+  def get_name
+    @declarator.get_name
+  end
+
+  def get_declarator
+    @declarator
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "Typedef: #{locale_str}"
+    @declarator.show_tree( indent + 1 )
+  end
+end
+
+#== é¢æ°é ­é¨
+# signature ã«ç»é²ãããé¢æ°
+class FuncHead <BDNode
+#  @declarator:: Decl
+
+  def initialize( declarator, type, b_oneway )
+    super()
+    declarator.set_type( type )
+    @declarator = declarator
+    @declarator.set_owner self  # Decl (FuncHead)
+
+    if @declarator.get_type.kind_of?( FuncType ) then
+      if b_oneway then
+        @declarator.get_type.set_oneway( b_oneway )
+      end
+    end
+    @declarator.get_type.check_struct_tag :FUNCHEAD
+
+    # check if return type is pointer
+    if declarator.get_type.kind_of? FuncType then
+      if declarator.get_type.get_type.get_original_type.kind_of?( PtrType ) &&
+          Signature.get_current.is_deviate? == false then
+        cdl_warning( "W3004 $1 pointer type has returned. specify deviate or stop return pointer" , @declarator.get_identifier )
+      end
+    end
+  end
+
+  def get_name
+    @declarator.get_name
+  end
+
+  def get_declarator
+    @declarator
+  end
+
+  def is_oneway?
+    if @declarator.is_function? then
+      return @declarator.get_type.is_oneway?
+    end
+    return false
+  end
+
+  def is_function?
+    @declarator.is_function?
+  end
+
+  #=== FuncHead# é¢æ°ã®ååãè¿ã
+  def get_name
+    return @declarator.get_name
+  end
+
+  #=== FuncHead# é¢æ°ã®æ»ãå¤ã®åãè¿ã
+  # types.rb ã«å®ç¾©ããã¦ããå
+  # é¢æ°ãããã®å®ç¾©ã¨ãã¦ä¸å®å
+¨ãªå ´å nil ãè¿ã
+  def get_return_type
+    if is_function? then
+      return @declarator.get_type.get_type
+    end
+  end
+
+  #=== FuncHead# é¢æ°ã®å¼æ°ã®ãªã¹ããè¿ã
+  # ParamList ãè¿ã
+  # é¢æ°ãããã®å®ç¾©ã¨ãã¦ä¸å®å
+¨ãªå ´å nil ãè¿ã
+  def get_paramlist
+    if is_function? then
+      return @declarator.get_type.get_paramlist
+    end
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "FuncHead: #{locale_str}"
+    @declarator.show_tree( indent + 1 )
+  end
+end
+
+#=== å®£è¨
+# @kind ã§ç¤ºãããåç¨®ã®å®£è¨
+class Decl < BDNode
+
+# @identifer:: String
+# @global_name:: String | nil : String(@kind=TYPEDEF||:CONSTANT), nil(@kind=ãã®ä»)
+#                set_kind ã«ã¦è¨­å®ããã
+# @type:: ArrayType, FuncType, PtrType, IntType, StructType
+#         VoidType, FloatType, DefinedType, BoolType
+# @initializer:: constant_expression, mikan { initlist }
+# @kind:: :VAR, :ATTRIBUTE, :PARAMETER, :TYPEDEF, :CONSTANT, :MEMBER, :FUNCHEAD(signatureã®é¢æ°å®ç¾©)
+# @b_referenced:: bool
+#
+# ä»¥ä¸ã¯ã@kind ã :VAR, :ATTRIBUTE ã®ã¨ãã«æå¹
+# @rw:: bool     # å¤ãææ³ã§ã¯ attr ã«æå®å¯è½ã ã£ãï¼æ¶ãã«ã¯ generate ã®ä¿®æ­£ãå¿
+è¦ï¼
+# @omit:: bool
+# @choice_list:: [String]  attr åæå¤ã®é¸æè¢
+# ä»¥ä¸ã¯ã@kind ã :VAR, :ATTRIBUTE, :MEMBER ã®ã¨ãã«æå¹
+# @size_is:: Expression or nil unless specified
+# ä»¥ä¸ã¯ã@kind ã :MEMBER ã®ã¨ãã«æå¹
+# @count_is:: Expression or nil unless specified
+#             attr, var ã®å ´åãcount_is ã¯æå®ã§ããªã
+# @string:: Expression, -1 (length not specified) or nil (not specified)
+#
+# mikan  ParamDecl ã ãå¥ã«è¨­ããããMemberDecl, AttrDecl ãªã©ãåããã¹ãã(ï¼)
+
+  def initialize( identifier )
+    super()
+    @identifier = identifier
+    @rw = false
+    @omit = false
+    @size_is = nil
+    @count_is = nil
+    @string  = nil
+    @choice_list  = nil
+    @b_referenced  = false
+  end
+
+  def set_initializer( initializer )
+    @initializer = initializer
+  end
+
+  def get_initializer
+    @initializer
+  end
+
+  def is_function?
+    if @type.class == FuncType then
+      return true
+    else
+      return false
+    end
+  end
+
+  #== Decl ã®æå³çèª¤ãããã§ãã¯ãã
+  def check
+    # return nil if @type == nil
+
+    # æ§é ä½ã¿ã°ãã§ãã¯ï¼ãã¤ã³ã¿åããæ§é ä½ãåç
+§ããã¦ããå ´åã¯ãã¿ã°ã®å­å¨ããã§ãã¯ããªãï¼
+    @type.check_struct_tag @kind
+
+    # åã®ãã§ãã¯ãè¡ã
+    res = @type.check
+    if res then
+      cdl_error( "S2002 $1: $2" , @identifier, res )
+    end
+
+    # ä¸è¦ã®åæåå­ããã§ãã¯ãã
+    if @initializer then
+      case @kind
+      when :PARAMETER, :TYPEDEF, :MEMBER, :FUNCHEAD
+        cdl_error( "S2003 $1: $2 cannot have initializer" , @identifier, @kind.to_s.downcase )
+      when :VAR, :ATTRIBUTE, :CONSTANT
+        # p @initializer  ããã§ã¯ä»£å
+¥å¯è½ãã©ããããã§ãã¯ããªã
+        # :VAR, :ATTRIBUTE, :CONSTANT ã¯ããããã§ãã§ãã¯ãã
+        # return @type.check_init( @identifier, @initializer, @kind )
+      else
+        raise "unknown kind in Delc::check"
+      end
+    end
+
+    if( @type.kind_of? ArrayType ) && ( @type.get_subscript == nil ) && ( @omit == false ) then
+      if @kind == :ATTRIBUTE then
+        cdl_error( "S2004 $1: array subscript must be specified or omit" , @identifier )
+      elsif @kind == :VAR || @kind == :MEMBER then
+        cdl_error( "S2005 $1: array subscript must be specified" , @identifier )
+      end
+    end
+
+    return nil
+  end
+
+  #== ãã¤ã³ã¿ã¬ãã«ãå¾ã
+  # æ»ãå¤ï¼
+  #   éãã¤ã³ã¿å¤æ°   = 0
+  #   ãã¤ã³ã¿å¤æ°     = 1
+  #   äºéãã¤ã³ã¿å¤æ° = 2
+  def get_ptr_level
+    level = 0
+    type = @type
+    while 1
+      if type.kind_of?( PtrType ) then
+        level += 1
+        type = type.get_referto
+#      elsif type.kind_of?( ArrayType ) then  # æ·»æ°ãªãé
+åã¯ãã¤ã³ã¿ã¨ã¿ãªã
+#        if type.get_subscript == nil then
+#          level += 1
+#          type = type.get_type
+#        else
+#          break
+#        end
+        # mikan ãã¤ã³ã¿ã®æ·»æ°ããé
+åã®ãã¤ã³ã¿ã¬ãã«ã¯ï¼ã§ããï¼
+      elsif type.kind_of?( DefinedType ) then
+        type = type.get_type
+        # p "DefinedType: #{type} #{type.class}"
+      else
+        break
+      end
+    end
+    return level
+  end
+
+  def get_name
+    @identifier
+  end
+
+  def get_global_name
+    @global_name
+  end
+
+  def set_type( type )
+    unless @type then
+      @type = type
+    else
+      @type.set_type( type )             # èã«è¨­å®
+    end
+  end
+
+  def get_type
+    @type
+  end
+
+  def get_identifier
+    @identifier
+  end
+
+  # STAGE: B
+  def set_kind( kind )
+    @kind = kind
+    case kind
+    when :TYPEDEF, :CONSTANT
+      if Namespace.get_global_name.to_s == "" then
+        @global_name = @identifier
+      else
+        @global_name = :"#{Namespace.get_global_name}_#{@identifier}"
+      end
+    else
+      @global_name = nil
+    end
+  end
+
+  def get_kind
+    @kind
+  end
+
+  def set_specifier_list( spec_list )
+    spec_list.each{  |spec|
+      case spec[0]
+      when :RW
+        @rw = true
+      when :OMIT
+        @omit = true
+      when :SIZE_IS
+        @size_is = spec[1]
+      when :COUNT_IS
+        @count_is = spec[1]
+      when :STRING
+        @string = spec[1]
+      when :CHOICE
+        @choice_list = spec[1]
+      else
+        raise "Unknown specifier #{spec[0]}"
+      end
+    }
+
+    if @size_is || @count_is || @string
+        @type.set_scs( @size_is, @count_is, @string, nil, false )
+    end
+  end
+
+  def is_rw?
+    @rw
+  end
+
+  def is_omit?
+    @omit
+  end
+
+  def get_size_is
+    @size_is
+  end
+
+  def get_count_is
+    @count_is
+  end
+
+  def get_string
+    @string
+  end
+
+  def get_choice_list
+    @choice_list
+  end
+
+  def referenced
+    @b_referenced = true
+  end
+
+  def is_referenced?
+    @b_referenced
+  end
+
+  def is_type?( type )
+    t = @type
+    while 1
+      if t.kind_of?( type ) then
+        return true
+      elsif t.kind_of?( DefinedType ) then
+        t = t.get_type
+      else
+        return false
+      end
+    end
+  end
+
+  def is_const?
+    type = @type
+    while 1
+      if type.is_const? then
+        return true
+      elsif type.kind_of?( DefinedType ) then
+        type = type.get_type
+      else
+        return false
+      end
+    end
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "Declarator: name: #{@identifier} kind: #{@kind} global_name: #{@global_name} #{locale_str}"
+    (indent+1).times { print "  " }
+    puts "type:"
+    @type.show_tree( indent + 2 )
+    if @initializer then
+      (indent+1).times { print "  " }
+      puts "initializer:"
+      @initializer.show_tree( indent + 2 )
+    else
+      (indent+1).times { print "  " }
+      puts "initializer: no"
+    end
+    (indent+1).times { print "  " }
+    puts "size_is: #{@size_is.to_s}, count_is: #{@count_is.to_s}, string: #{@string.to_s} referenced: #{@b_referenced} "
+   
+  end
+
+end
+
+# é¢æ°ãã©ã¡ã¼ã¿ã®å®£è¨
+class ParamDecl < BDNode
+
+# @declarator:: Decl:  Token, ArrayType, FuncType, PtrType
+# @direction:: :IN, :OUT, :INOUT, :SEND, :RECEIVE
+# @size:: Expr   (size_is å¼æ°)
+# @count:: Expr   (count_is å¼æ°)
+# @max:: Expr (size_is ã®ç¬¬äºå¼æ°)
+# @b_nullable:: Bool : nullable 
+# @string:: Expr or -1(if size not specified) ï¼string å¼æ°ï¼
+# @allocator:: Signature of allocator
+# @b_ref:: bool : size_is, count_is, string_is å¼æ°ã¨ãã¦åç
+§ããã¦ãã
+#
+# 1. é¢æ°åã§ãªããã¨
+# 2. ï¼æ¬¡å
+ä»¥ä¸ã®é
+åã§ãã£ã¦æãå
+å´ä»¥å¤ã®æ·»æ°ããããã¨
+# 3. in, out, ..., size_is, count_is, ... ã®éè¤æå®ããªããã¨
+# 4. ãã¤ã³ã¿ã¬ãã«ãé©åãªãã¨
+
+  def initialize( declarator, specifier, param_specifier )
+    super()
+    @declarator = declarator
+    @declarator.set_owner self  # Decl (ParamDecl)
+    @declarator.set_type( specifier )
+    @param_specifier = param_specifier
+    @b_ref = false
+    @b_nullable = false
+
+    if @declarator.is_function? then		# (1)
+      cdl_error( "S2006 \'$1\' function" , get_name )
+      return
+    end
+
+    res = @declarator.check
+    if res then					# (2)
+      cdl_error( "S2007 \'$1\' $2" , get_name, res )
+      return
+    end
+
+    @param_specifier.each { |i|
+      case i[0]                                     # (3)
+      when :IN, :OUT, :INOUT, :SEND, :RECEIVE
+        if @direction == nil then
+          @direction = i[0]
+        elsif i[0] == @direction then
+          cdl_warning( "W3001 $1: duplicate" , i[0] )
+          next
+        else
+          cdl_error( "S2008 $1: inconsitent with previous one" , i[0] )
+          next
+        end
+
+        case i[0]
+        when :SEND, :RECEIVE
+          @allocator = Namespace.find( i[1] )   #1
+          if ! @allocator.instance_of?( Signature ) then
+            cdl_error( "S2009 $1: not found or not signature" , i[1] )
+            next
+          elsif ! @allocator.is_allocator? then
+            # cdl_error( "S2010 $1: not allocator signature" , i[1] )
+          end
+        end
+
+      when :SIZE_IS
+        if @size then
+          cdl_error( "S2011 size_is duplicate"  )
+        else
+          @size = i[1]
+        end
+      when :COUNT_IS
+        if @count then
+          cdl_error( "S2012 count_is duplicate"  )
+        else
+          @count = i[1]
+        end
+      when :STRING
+        if @string then
+          cdl_error( "S2013 string duplicate"  )
+        elsif i[1] then
+          @string = i[1]
+        else
+          @string = -1
+        end
+      when :MAX_IS
+        # max_is ã¯ãå
+é¨çãªãã® bnf.y.rb åç
+§
+        # size_is ã§éè¤ãã§ãã¯ããã
+        @max = i[1]
+      when :NULLABLE
+        # if ! @declarator.get_type.kind_of?( PtrType ) then
+        #  cdl_error( "S2026 '$1' nullable specified for non-pointer type", @declarator.get_name )
+        # else
+          @b_nullable = true
+        # end
+      end
+
+    }
+
+    if @direction == nil then
+      cdl_error( "S2014 No direction specified. [in/out/inout/send/receive]"  )
+    end
+
+    if ( @direction == :OUT || @direction == :INOUT ) && @string == -1 then
+      cdl_warning( "W3002 $1: this string might cause buffer over run" , get_name )
+    end
+
+    # mikan ãã¤ã³ã¿ã®é
+åï¼æ·»æ°æï¼ã®ã¬ãã«ãï¼
+    ptr_level = @declarator.get_ptr_level
+
+    # p "ptr_level: #{@declarator.get_identifier} #{ptr_level}"
+    # p @declarator
+
+    #----  set req_level, min_level & max_level  ----#
+    if !(@size||@count||@string) then	    # (4)
+      req_level = 1
+    elsif (@size||@count)&&@string then
+      req_level = 2
+    else
+      req_level = 1
+    end
+
+    if @direction == :RECEIVE then
+      req_level += 1
+    end
+    min_level = req_level
+    max_level = req_level
+
+    # IN without pointer specifier can be non-pointer type
+    if @direction == :IN && !(@size||@count||@string) then
+      min_level = 0
+    end
+
+    # if size_is specified and pointer refer to struct, max_level increase
+    if @size then
+      type = @declarator.get_type.get_original_type
+      while type.kind_of? PtrType
+        type = type.get_referto.get_original_type
+      end
+      if type.kind_of? StructType then
+        max_level += 1
+      end
+    end
+    #----  end req_level & max_level    ----#
+
+    # p "req_level: #{req_level} ptr_level: #{ptr_level}"
+    #if ptr_level < req_level && ! ( @direction == :IN && req_level == 1 && ptr_level == 0) then
+    if ptr_level < min_level then
+      cdl_error( "S2014 $1 need pointer or more pointer" , @declarator.get_identifier )
+    elsif ptr_level > max_level then
+      # note: æ§æè§£ææ®µéã§å®è¡ã®ãã get_current å¯
+      if Signature.get_current == nil || Signature.get_current.is_deviate? == false then
+        cdl_warning( "W3003 $1 pointer level mismatch" , @declarator.get_identifier )
+      end
+    end
+
+    type = @declarator.get_type
+    while type.kind_of?( DefinedType )
+      type = type.get_original_type
+    end
+
+    if ptr_level > 0 then
+      # size_is, count_is, string ãã»ãã
+      if @direction == :RECEIVE && ptr_level > 1 then
+        type.get_type.set_scs( @size, @count, @string, @max, @b_nullable )
+      else
+        type.set_scs( @size, @count, @string, @max, @b_nullable )
+      end
+
+#p ptr_level
+#type.show_tree 1
+
+      # ãã¤ã³ã¿ãæãã¦ããå
+ã®ãã¼ã¿åãå¾ã
+      i = 0
+      t2 = type
+      while i < ptr_level
+        t2 = t2.get_referto
+        while t2.kind_of?( DefinedType )
+          t2 = t2.get_original_type
+        end
+        i += 1
+      end
+
+# p @declarator.get_name
+# t2.show_tree 1
+# p t2.is_const?
+
+      # const ä¿®é£¾ãé©åããã§ãã¯
+      if @direction == :IN then
+        if ! t2.is_const? then
+          cdl_error( "S2015 '$1' must be const for \'in\' parameter $2" , get_name, type.class )
+        end
+      else
+        if t2.is_const? then
+          cdl_error( "S2016 '$1' can not be const for $2 parameter" , get_name, @direction )
+        end
+      end
+    else
+      # éãã¤ã³ã¿ã¿ã¤ã
+      if @size != nil || @count != nil || @string != nil || @max != nil || @b_nullable then
+        type.set_scs( @size, @count, @string, @max, @b_nullable )
+      end
+    end
+
+#    if ptr_level > 0 && @direction == :IN then
+#      if type.is_const != :CONST
+#    end
+
+    # p self
+
+  end
+
+  def check_struct_tag kind
+    @declarator.get_type.check_struct_tag :PARAMETER
+  end
+
+  def get_name
+    @declarator.get_name
+  end
+
+  def get_size
+    @size
+  end
+
+  def get_count
+    @count
+  end
+
+  def get_string
+    @string
+  end
+
+  def get_max
+    @max
+  end
+
+  def clear_max
+    # p "clear_max: #{@declarator.get_name} #{@max.to_s}"
+    @max = nil
+    @declarator.get_type.clear_max
+  end
+
+  def is_nullable?
+    @b_nullable
+  end
+
+  def get_type
+    @declarator.get_type
+  end
+
+  def get_direction
+    @direction
+  end
+
+  def get_declarator
+    @declarator
+  end
+
+  def get_allocator
+    @allocator
+  end
+
+  def referenced
+    @b_ref = true
+  end
+
+  def is_referenced?
+    @b_ref
+  end
+
+  #=== PPAllocator ãå¿
+è¦ã
+  # Transparent RPC ã®å ´å in ã§ size_is, count_is, string ã®ãããããæå®ããã¦ããå ´å oneway ã§ã¯ PPAllocator ãå¿
+è¦
+  # Transparent PC ã§ oneway ãã©ããã¯ãããã§ã¯å¤æ­ããªãã®ã§å¥éå¤æ­ãå¿
+è¦
+  # Opaque RPC ã®å ´å size_is, count_is, string ã®ãããããæå®ããã¦ããå ´åãPPAllocator ãå¿
+è¦
+  def need_PPAllocator?( b_opaque = false )
+    if ! b_opaque then
+#      if @direction == :IN && ( @size || @count || @string ) then
+      if @direction == :IN && @declarator.get_type.get_original_type.kind_of?( PtrType ) then
+        return true
+      end
+    else
+      if (@direction == :IN || @direction == :OUT || @direction == :INOUT ) &&
+          @declarator.get_type.get_original_type.kind_of?( PtrType ) then
+        return true
+      end
+    end
+    return false
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "ParamDecl: direction: #{@direction} #{locale_str}"
+    @declarator.show_tree( indent + 1 )
+    if @size then
+      (indent+1).times { print "  " }
+      puts "size:"
+      @size.show_tree( indent + 2 )
+    end
+    if @count then
+      (indent+1).times { print "  " }
+      puts "count:"
+      @count.show_tree( indent + 2 )
+    end
+    if @string then
+      (indent+1).times { print "  " }
+      puts "string:"
+      if @string == -1 then
+       (indent+2).times { print "  " }
+        puts "size is not specified"
+      else
+        @string.show_tree( indent + 2 )
+      end
+    end
+    if @allocator then
+      (indent+1).times { print "  " }
+      puts "allocator: signature: #{@allocator.get_name}"
+    end    
+  end
+end
+
+# é¢æ°ãã©ã¡ã¼ã¿ãªã¹ã
+class ParamList < BDNode
+# @param_list:: NamedList : item: ParamDecl
+
+  def initialize( paramdecl )
+    super()
+    @param_list = NamedList.new( paramdecl, "parameter" )
+    @param_list.get_items.each { |paramdecl|
+      paramdecl.set_owner self   # ParamDecl
+    }
+  end
+
+  def add_param( paramdecl )
+    return if paramdecl == nil    # æ¢ã«ã¨ã©ã¼
+
+    @param_list.add_item( paramdecl )
+    paramdecl.set_owner self   # ParamDecl
+  end
+
+  def get_items
+    @param_list.get_items
+  end
+
+  #=== size_is, count_is, string ã®å¼æ°ã®å¼ããã§ãã¯
+  # å¤æ°ã¯åæ¹åç
+§å¯è½ãªãããé¢æ°é ­é¨ã®æ§æè§£éãçµãã£ãå¾ã«ãã§ãã¯ãã
+  def check_param
+    @param_list.get_items.each { |i|
+      next if i == nil                      # i == nil : ã¨ã©ã¼æ
+
+      if i.get_type.class == VoidType then
+        # åä¸ã® void åã¯ããã«ã¯ããªã
+        cdl_error( "S2027 '$1' parameter cannot be void type", i.get_name )
+      end
+
+      size = i.get_size			# Expression
+      if size then
+        val = size.eval_const( @param_list )
+        if val == nil then			# å®æ°å¼ã§ãªããï¼
+          # mikan å¤æ°ãå«ãå¼ï¼åä¸ã®å¤æ°ã®ã¿ OK
+          type = size.get_type( @param_list )
+          unless type.kind_of?( IntType ) then
+            cdl_error( "S2017 size_is argument is not integer type"  )
+          else
+            size.check_dir_for_param( @param_list, i.get_direction, "size_is" )
+          end
+        else
+          if val != Integer( val ) then
+            cdl_error( "S2018 \'$1\' size_is parameter not integer" , i.get_declarator.get_identifier )
+          elsif val <= 0 then
+            cdl_error( "S2019 \'$1\' size_is parameter negative or zero" , i.get_declarator.get_identifier )
+          end
+        end
+      end
+
+      max = i.get_max
+      if max then
+        val2 = max.eval_const( @param_list )
+        if val2 == nil then
+          cdl_error( "S2028 '$1' max (size_is 2nd parameter) not constant", i.get_name )
+        elsif val2 != Integer( val2 ) || val2 <= 0 then
+          cdl_error( "S2029 '$1' max (size_is 2nd parameter) negative or zero, or not integer", i.get_name )
+        end
+      end
+
+      if val != nil && val2 != nil then
+        if val < val2 then
+          cdl_warning( "W3005 '$1' size_is always lower than max. max is ignored", i.get_name )
+          i.clear_max
+        else
+          cdl_error( "S2030 '$1' both size_is and max are const. size_is larger than max", i.get_name )
+        end
+      end
+
+      count = i.get_count			# Expression
+      if count then
+        val = count.eval_const( @param_list )
+        if val == nil then			# å®æ°å¼ã§ãªããï¼
+          # mikan å¤æ°ãå«ãå¼ï¼åä¸ã®å¤æ°ã®ã¿ OK
+          type = count.get_type( @param_list )
+          unless type.kind_of?( IntType ) then
+            cdl_error( "S2020 count_is argument is not integer type"  )
+          else
+            count.check_dir_for_param( @param_list, i.get_direction, "count_is" )
+          end
+        else
+          if val != Integer( val ) then
+            cdl_error( "S2021 \'$1\' count_is parameter not integer" , i.get_declarator.get_identifier )
+          elsif val <= 0 then
+            cdl_error( "S2022 \'$1\' count_is parameter negative or zero" , i.get_declarator.get_identifier )
+          end
+        end
+      end
+
+      string = i.get_string			# Expression
+      if string != -1 && string then
+        val = string.eval_const( @param_list )
+        if val == nil then			# å®æ°å¼ã§ãªããï¼
+          # mikan å¤æ°ãå«ãå¼ï¼åä¸ã®å¤æ°ã®ã¿ OK
+          type = string.get_type( @param_list )
+          unless type.kind_of?( IntType ) then
+            cdl_error( "S2023 string argument is not integer type"  )
+          else
+            string.check_dir_for_param( @param_list, i.get_direction, "string" )
+          end
+        else
+          if val != Integer( val ) then
+            cdl_error( "S2024 \'$1\' string parameter not integer" , i.get_declarator.get_identifier )
+          elsif val <= 0 then
+            cdl_error( "S2025 \'$1\' string parameter negative or zero" , i.get_declarator.get_identifier )
+          end
+        end
+      end
+    }
+  end
+
+  def check_struct_tag kind
+    @param_list.get_items.each{ |p|
+      p.check_struct_tag kind
+    }
+  end
+
+  #=== Push Pop Allocator ãå¿
+è¦ãï¼
+  # Transparent RPC ã®å ´å (oneway ãã¤) in ã®é
+å(size_is, count_is, string ã®ããããã§ä¿®é£¾ï¼ããã
+  def need_PPAllocator?( b_opaque = false )
+    @param_list.get_items.each { |i|
+      if i.need_PPAllocator?( b_opaque ) then
+        return true
+      end
+    }
+    false
+  end
+
+  def find( name )
+    @param_list.get_item( name )
+  end
+
+  #== ParamList# æå­åå
+  #b_name:: Bool: ãã©ã¡ã¼ã¿åãå«ãã
+  def to_str( b_name )
+    str = "("
+    delim = ""
+    @param_list.get_items.each{ |paramdecl|
+      decl = paramdecl.get_declarator
+      str += delim + decl.get_type
+      if b_name then
+        str += " " + decl.get_name
+      end
+      str += decl.get_type_post
+      delim = ", "
+    }
+    str += ")"
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "ParamList: #{locale_str}"
+    @param_list.show_tree( indent + 1 )
+  end
+end
+
+#== CDL ã®æå­åãªãã©ã«ãæ±ãããã®ã¯ã©ã¹
+# CDL ã®æå­åãªãã©ã«ãã®ãã®ã§ã¯ãªã
+class CDLString
+  # ã¨ã¹ã±ã¼ãæå­ãå¤æ
+  def self.escape str
+    str = str.dup
+    str.gsub!( /\\a/, "\x07" )
+    str.gsub!( /\\b/, "\x08" )
+    str.gsub!( /\\f/, "\x0c" )
+    str.gsub!( /\\n/, "\x0a" )
+    str.gsub!( /\\r/, "\x0d" )
+    str.gsub!( /\\t/, "\x08" )
+    str.gsub!( /\\v/, "\x0b" )
+    str.gsub!( /(\\[Xx][0-9A-Fa-f]{1,2})/, '{printf \"\\1\"}' )
+    str.gsub!( /(\\[0-7]{1,3})/, '{printf \"\\1\"}' )
+    str.gsub!( /\\(.)/, "\\1" )   # mikan æªå®ç¾©ã®ã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ãå¤æãã¦ãã¾ã (gcc V3.4.4 ã§ã¯è­¦åãåºããã)
+    return str
+  end
+
+  #=== CDLString#åå¾ã® " ãåãé¤ã
+  def self.remove_dquote str
+    s = str.sub( /\A"/, "" )
+    s.sub!( /"\z/, "" )
+    return s
+  end
+end
+
+#== CDL ã®åæåå­ãæ±ãããã®ã¯ã©ã¹
+# CDL ã®åæåå­ãã®ãã®ã§ã¯ãªã
+class CDLInitializer
+  #=== åæåå­ã®ã¯ã­ã¼ã³
+  # åæåå­ã¯ Expression, C_EXP, Array ã®ãããã
+  def self.clone_for_composite( rhs, ct_name, cell_name, locale )
+    if rhs.instance_of? C_EXP then
+      # C_EXP ã® clone ãä½ãã¨ã¨ãã«ç½®æ
+      rhs = rhs.clone_for_composite( ct_name, cell_name, locale )
+    elsif rhs.instance_of? Expression then
+      rhs = rhs.clone_for_composite
+    elsif rhs.instance_of? Array then
+      rhs = clone_for_compoiste_array( rhs, ct_name, cell_name, locale )
+    else
+      raise "unknown rhs for join"
+    end
+    return rhs
+  end
+
+  #=== åæåå­ï¼é
+åï¼ã®ã¯ã­ã¼ã³
+  # è¦ç´ ã¯ clone_for_composite ãæã¤ãã®ã ã
+  def self.clone_for_compoiste_array( array, ct_name, cell_name, locale )
+    # "compoiste.identifier" ã®å ´å (CDL ã¨ãã¦ã¯èª¤ã)
+    if array[0] == :COMPOSITE then
+      return array.clone
+    end
+
+    new_array = array.map{ |m|
+      clone_for_composite( m, ct_name, cell_name, locale )
+    }
+    return new_array
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/tecs_lang.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/tecs_lang.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/tecs_lang.rb	(revision 270)
@@ -0,0 +1,369 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: tecs_lang.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+#== è¨èªã«é¢ããå¤æ°ãè¨­å®
+# ã¡ãã»ã¼ã¸ãã¡ã¤ã«ã®èª­ã¿è¾¼ã¿ãè¡ã (èª­ã¿è¾¼ã¿ã«å¤±æããå ´åãããã©ã«ãã®æå­ã³ã¼ãã«å¤æ´ãã)
+class TECS_LANG
+  # ããã·ã¥ã®ã¿ã°ã¯ case insensitive ã®ãããå¤§æå­ã®æå­åã¨ãã
+  CHARSET_ALIAS = {
+    "UJIS" => :eucJP,
+    "UTF-8" => :utf8,
+    "EUCJP" => :eucJP,   # ä»¥ä¸ case insensitive ã«ãããã
+    "SJIS" => :sjis,
+    "UTF8" => :utf8,
+    "ISO8859-1" => :"iso8859-1"
+  }
+  LANG_ALIAS = {
+    "C" => :en_US,
+    "EN_US" => :en_US,   # ä»¥ä¸ case insensitive ã«ãããã
+    "JA_JP" => :ja_JP
+  }
+  SUITABLE_CHARSET = {
+    :ja_JP => [ :eucJP, :sjis, :utf8 ],
+    :en_US => [ :"iso8859-1", :utf8, nil ]
+  }
+
+  #=== LANG ã®ãã¼ã¹
+  #lang::String  "ja_JP.eucJP@cjknarrow", "C" ãªã©
+  #RETURN:: [ :ja_JP, :eucJP, :cjknarrow ]
+  def self.parse_lang( lang )
+    lang =~ /([^\.@]*)(\.([^@]*))?(@(.*))?/
+
+    lang_terri = $1.to_sym if $1 != nil && $1 != ""
+    # set_kcode_binary ã«ãããC.UTF-8 ã®ã¿ãç¹å¥æ±ãããå¿
+è¦ããªããªã£ã
+    # if lang_terri == :C then    # LANG=C.* ã¯ããã¹ã¦ 1 byte æå­ã³ã¼ãã¨ãã¦æ±ã
+    #  codeset = nil
+    #  modifier = nil
+    # else
+      codeset = $3.to_sym if $3 != nil && $3 != ""
+      modifier = $5.to_sym if $5 != nil && $5 != ""
+    # end
+    [ lang_terri, codeset, modifier ]
+  end
+
+  #=== lang, charset ã®å¥æè§£æ±ºããã³å¦¥å½æ§ã®ãã§ãã¯
+  #lang::Symbol    : :en_US, :ja_JP ãªã©
+  #charset::Symbol : :eucJP, :utf8 ãªã©
+  #RETURN:
+  #  [ lang, charset, result ]::ããresult = false ã®å ´å lang, charset ã¯ä¸é©å
+  def self.resolve_alias_and_check( lang, charset )
+    if LANG_ALIAS[ lang.to_s.upcase ] then
+      ln = LANG_ALIAS[ lang.to_s.upcase ]
+    else
+      ln = lang
+    end
+
+    if CHARSET_ALIAS[ charset.to_s.upcase ] then
+      cs = CHARSET_ALIAS[ charset.to_s.upcase ]
+    else
+      cs = charset
+    end
+
+    if SUITABLE_CHARSET[ ln ] == nil || SUITABLE_CHARSET[ ln ].index( cs ) == nil
+      res = false
+    else
+      res = true
+    end
+
+    # p ln, cs, res
+    [ ln, cs, res ]
+  end
+
+  #=== codepage ãåãåºã
+  #codepage ã¯3ï½5æ¡ã®æ´æ°ã¨ãã¦ä»®å®
+  def self.get_win_codepage
+    cmd_pipe = IO.popen('cmd /c chcp','r')
+    cmd_pipe.read =~ /([0-9]{3,5})/
+    cp = $1
+    cmd_pipe.close
+    return cp
+  end
+
+  #=== codepage ãã LANG ã®è¨­å®æå­åã«å¤æ
+  def self.codepage_to_lang cp
+    if cp == "932" then
+      "ja_JP.sjis"
+    else
+      "en_US"
+    end
+  end
+
+  #=== è¨èªãæå­ã³ã¼ãã«é¢ããå¤æ°ãè¨­å®
+  # ä»¥ä¸ã®é ã«ãã§ãã¯ãããä¸çªæå¾ã«è¨­å®ãããå¤ãæ¡ç¨ããã
+  #   ã»ããã©ã«ã
+  #   ã»codepage  (exerb çã§ TERM æªè¨­å®ã¾ãã¯ TERM=cygwin ã®å ´åã®ã¿)
+  #   ã»LANG ç°å¢å¤æ°
+  #   ã»TECSGEN_LANG ç°å¢å¤æ°
+  #   ã»TECSGEN_FILE_LANG ç°å¢å¤æ° (ãã¡ã¤ã«ã®æå­ã³ã¼ãã®ã¿)
+  #   ã»-k ãªãã·ã§ã³ (ãã¡ã¤ã«ã®æå­ã³ã¼ãã®ã¿)
+  def self.set_lang_var
+
+    if $IN_EXERB && ( ENV[ 'TERM' ] == nil || ENV[ 'TERM' ] == "cygwin" ) then
+      # exerb çã§ç«¯æ« cygwin ã®æã¯ codepage ã®ã¿ãè¦ã
+      cp = get_win_codepage
+      lang = codepage_to_lang cp
+      $LANG_FILE, $CHARSET_FILE, *dum = self.parse_lang( lang )
+      $LANG_CONSOLE = $LANG_FILE
+      $CHARSET_CONSOLE = $CHARSET_FILE
+
+    elsif ENV[ 'LANG' ]then
+      # é exerb çã§ã¯ LANG ç°å¢å¤æ°ãè¦ã
+      # cygwin console ã§ã¯ codepage ã«å¾ã£ã¦åºåããæ¹ãå¹³åãªãã
+
+      $LANG_FILE, $CHARSET_FILE, *dum = self.parse_lang( ENV[ 'LANG' ] )
+      $LANG_CONSOLE = $LANG_FILE
+      $CHARSET_CONSOLE = $CHARSET_FILE
+    end
+
+    if ENV[ 'TECSGEN_LANG' ]then
+      $LANG_FILE, $CHARSET_FILE, *dum = self.parse_lang( ENV[ 'TECSGEN_LANG' ] )
+      $LANG_CONSOLE = $LANG_FILE
+      $CHARSET_CONSOLE = $CHARSET_FILE
+    end
+
+    if ENV[ 'TECSGEN_FILE_LANG' ]then
+      $LANG_FILE, $CHARSET_FILE, *dum = self.parse_lang( ENV[ 'TECSGEN_FILE_LANG' ] )
+    end
+
+    self.set_lang_by_option
+  end
+
+  #=== -k ãªãã·ã§ã³ãããã¡ã¤ã«ç¨ã®è¨èªãæå­ã³ã¼ãå¤æ°ãè¨­å®
+  def self.set_lang_by_option
+    if $kcode == nil
+      return
+    end
+
+    code = $kcode
+    found = false
+    res = $CODE_TYPE_ARRAY.index( code )
+    if res == nil then
+      print "-k: illegal kcode type #{code}. (#{$CODE_TYPE_ARRAY.join(", ")})\n"
+      exit 1
+    end
+
+    case $kcode
+    when "euc"
+      $CHARSET_FILE = :eucJP
+      $LANG_FILE = :ja_JP
+    when "sjis"
+      $CHARSET_FILE = :sjis
+      $LANG_FILE = :ja_JP
+    when "utf8"
+      $CHARSET_FILE = :utf8
+      $LANG_FILE = :ja_JP
+    when "none"
+      $CHARSET_FILE = nil
+      $LANG_FILE = "en_US"
+    end
+  end
+
+  #=== Kconv ã¯ã©ã¹ç¨ã®å¤æ°ãè¨­å®
+  # è¨èªæ
+å ±ãã Kconv ã«é¢ããå¤æ°ãè¨­å®
+  def self.set_kconv_var
+
+    # æå­ã³ã¼ãã®è¨­å®
+    case $CHARSET_FILE           # string: "EUC" | "SJIS" | "NONE" | "UTF8"
+    when :eucJP
+      $KCODE_CDL = "EUC"
+      $KCONV_CDL = Kconv::EUC
+      $Ruby19_File_Encode = "ASCII-8BIT"
+    when :sjis
+      $KCODE_CDL = "SJIS"
+      $KCONV_CDL = Kconv::SJIS
+      $Ruby19_File_Encode = "Shift_JIS"
+    when :utf8
+      $KCODE_CDL = "UTF8"
+      $KCONV_CDL = Kconv::UTF8
+      $Ruby19_File_Encode = "ASCII-8BIT"
+    else
+      $KCODE_CDL = "BINARY"
+      $KCONV_CDL = Kconv::BINARY
+      $Ruby19_File_Encode = "ASCII-8BIT"
+    end
+
+    case $CHARSET_CONSOLE
+    when :eucJP
+      $KCODE_CONSOLE = "EUC"
+      $KCONV_CONSOLE = Kconv::EUC
+    when :sjis
+      $KCODE_CONSOLE = "SJIS"
+      $KCONV_CONSOLE = Kconv::SJIS
+    when :utf8
+      $KCODE_CONSOLE = "UTF8"
+      $KCONV_CONSOLE = Kconv::UTF8
+    else
+      $KCODE_CONSOLE = "BINARY"
+      $KCONV_CONSOLE = Kconv::BINARY
+    end
+
+    $KCODE_TECSGEN = "UTF8"      # string: "EUC"  ãã®ãã¡ã¤ã«ã®æå­ã³ã¼ãï¼ãªãã·ã§ã³ã§ã¯ãªãå®æ°ï¼
+    $KCONV_TECSGEN = Kconv::UTF8 # const: 
+    set_kcode $KCODE_TECSGEN     # ãã®ãã¡ã¤ã«ã®æå­ã³ã¼ããè¨­å®
+  end
+
+  #=== ä¸æçã« KCODE ã BINARY ã«å¤æ´ãã
+  # EUC ã UTF8 ã§èª­ã¿è¾¼ãã å ´åã«æå­åºåããèª¤ãåé¡ã®å¯¾å¿
+  # ã³ã¡ã³ãã®èª­ã¿é£ã°ããèª¤ãç¹ãåé¡
+  # ãã ããSJIS ã®å ´åã¯ãã¨ã¹ã±ã¼ãæå­ã®åé¡ããããããå¤æ´ããªã
+  def self.set_kcode_binary
+
+    #2.0
+    if $b_no_kcode then
+      return
+    end
+
+    $KCODE_BACK = $KCODE
+    if $KCODE != "SJIS" then
+      set_kcode "BINARY"
+    end
+  end
+
+  #=== ä¸æçãªã KCODE ã®å¤æ´ãå
+ã«æ»ã
+  def self.reset_kcode
+    set_kcode $KCODE_BACK
+  end
+
+  #####
+  # $LANG_FILE        è¨èª (C ã¯ en_US ã«å¤æããã)
+  # $LANG_CONSOLE     è¨èª (C ã¯ en_US ã«å¤æããã)
+  # $CHARSET_FILE     ãã¡ã¤ã«ã®æå­ã³ã¼ã
+  # $CHARSET_CONSOLE  ã³ã³ã½ã¼ã«æå­ã³ã¼ã
+
+  # ããã©ã«ãã®è¨­å®ï¼æ­£è¦åæ¸ã¿ã®ãã¨ï¼
+  $LANG_FILE_DEFAULT  = :en_US
+  $CHARSET_FILE_DEFAULT = nil
+  $LANG_CONSOLE_DEFAULT = :en_US
+  $CHARSET_CONSOLE_DEFAULT = nil
+
+  $LANG_FILE = $LANG_FILE_DEFAULT
+  $CHARSET_FILE = $CHARSET_FILE_DEFAULT
+  $LANG_CONSOLE = $LANG_CONSOLE_DEFAULT
+  $CHARSET_CONSOLE = $CHARSET_CONSOLE_DEFAULT
+
+  # -k ã§æå®å¯è½ãªã³ã¼ã
+  $CODE_TYPE_ARRAY = [ "euc", "sjis", "none", "utf8" ]
+
+  # è¨èªãæ±ºå®ãã
+  self.set_lang_var
+
+  # è¨èªãã³ã¼ãã®ãã§ãã¯ã¨æ­£è¦å
+  lang_file, charset_file, res =
+    self.resolve_alias_and_check( $LANG_FILE, $CHARSET_FILE )
+  if res == false then
+    # lang_file, charset_file = lang_file_default, charset_file_default
+    lang_file, charset_file = $LANG_FILE_DEFAULT, $CHARSET_FILE_DEFAULT
+  end
+  lang_console, charset_console, res =
+    self.resolve_alias_and_check( $LANG_CONSOLE, $CHARSET_CONSOLE )
+  if res == false then
+    # lang_console, charset_console = lang_console_default, charset_console_default
+    lang_console, charset_console = $LANG_CONSOLE_DEFAULT, $CHARSET_CONSOLE_DEFAULT
+  end
+
+  # ã¡ãã»ã¼ã¸ã¢ã¸ã¥ã¼ã«ãã­ã¼ã
+  if require_tecsgen_lib( "tecslib/messages/messages_console_#{lang_console}.rb", false ) == false then
+    require_tecsgen_lib( "tecslib/messages/messages_console_#{$LANG_CONSOLE_DEFAULT}.rb" )
+    $LANG_CONSOLE, $CHARSET_CONSOLE = $LANG_CONSOLE_DEFAULT, $CHARSET_CONSOLE_DEFAULT
+  else
+    $LANG_CONSOLE, $CHARSET_CONSOLE = lang_console, charset_console
+  end
+  if require_tecsgen_lib( "tecslib/messages/messages_file_#{lang_file}.rb", false ) == false then
+    require_tecsgen_lib( "tecslib/messages/messages_file_#{$LANG_FILE_DEFAULT}.rb" )
+    $LANG_FILE, $CHARSET_FILE = $LANG_FILE_DEFAULT, $CHARSET_FILE_DEFAULT
+  else
+    $LANG_FILE, $CHARSET_FILE = lang_file, charset_file
+  end
+
+  # Kconv ã¯ã©ã¹ã®ããã®å¤æ°ãè¨­å®
+  self.set_kconv_var 
+
+  dbgPrint "LANG_FILE=#{$LANG_FILE}.#{$CHARSET_FILE}, LANG_CONSOLE=#{$LANG_CONSOLE}.#{$CHARSET_CONSOLE}\n"
+  dbgPrint "KCODE_CDL=#{$KCODE_CDL}(#{$KCONV_CDL}) KCODE_CONSOLE=#{$KCODE_CONSOLE}(#{$KCONV_CONSOLE})\n"
+  dbgPrint "Ruby19_File_Encode=#{$Ruby19_File_Encode}\n"
+
+  #=== åä½ãã¹ãå®è¡
+  if $unit_test then
+    print "unit test: set_lang_var\n"
+    require "kconv"
+    self.set_lang_var
+    print "#{$LANG_FILE} #{$LANG_CONSOLE}\n"
+    print "#{$CHARSET_FILE} #{$CHARSET_CONSOLE}\n"
+
+    $LANG_FILE, $CHARSET_FILE, res = self.resolve_alias_and_check( $LANG_FILE, $CHARSET_FILE )
+    print "#{$LANG_FILE} #{$CHARSET_FILE}, #{res}\n"
+  end
+end
+
+#= Console ã¯ã©ã¹
+# æå­ã³ã¼ããå¤æãã
+class Console
+  def self.print str
+    if $b_no_kcode && $KCONV_CONSOLE == Kconv::BINARY then 
+      STDOUT.print str
+    else
+      STDOUT.print str.kconv( $KCONV_CONSOLE, $KCONV_TECSGEN )
+    end
+  end
+  def self.puts str
+    if $b_no_kcode && $KCONV_CONSOLE == Kconv::BINARY then 
+      STDOUT.puts str
+    else
+      STDOUT.puts str.kconv( $KCONV_CONSOLE, $KCONV_TECSGEN )
+    end
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/tecsgen.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/tecsgen.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/tecsgen.rb	(revision 270)
@@ -0,0 +1,461 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: tecsgen.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+
+class TECSGEN
+
+  #=== import ãã¹ (-I) ãæ«å°¾ã«è¿½å 
+  # æ¢ã«ç»é²æ¸ã¿ã§ããã°ãè¿½å ããªã
+  def self.add_import_path path
+    if $import_path.index( path ) == nil then
+      dbgPrint "add_import_path: '#{path}'\n"
+      $import_path << path
+    end
+  end
+
+  #=== EXEB çã®ãã¹ã®èª¿æ´
+  # ç°å¢å¤æ° TECSPATH ã cygwin ã¹ã¿ã¤ã«ã ã¨ãexerb çã§ã¯æ±ããªã
+  # $import_path ã¨ $TECSPATH ãèª¿æ´ãã
+  def self.adjust_exerb_path
+    if $IN_EXERB then
+      new_tecspath = cygpath( $tecspath, $tecspath )
+      pattern = /\A#{$tecspath}/
+      paths = []
+      $import_path.each{ |path|
+        # cygpath ã¯ '..' ãç°¡ç´ãã¦ãã¾ãã®ã§ãnew_tecspath ã§ç½®æãã
+        # paths << cygpath( path, path )
+        paths << path.sub( pattern, new_tecspath )
+      }
+      $import_path = paths
+      $tecspath = new_tecspath
+    else
+      return
+    end
+  end
+
+  #=== $(TECSPATH) ã¸ã®ç½®æ
+  #path::String   : ENV[ 'TECSPATH' ] ã«ä¸è´ããé¨åãããã°ã "$(TECSPATH)" ã«ç½®æ
+  #b_global::Bool : true ãªã gsub ã§ç½®æãfalse ãªã sub ã§ç½®æ
+  def self.subst_tecspath( path, b_global = false )
+    tp = $tecspath.dup
+    tp.gsub!( /\\/, "\\\\\\\\" )
+    pattern = /#{tp}/
+      substr = "$(TECSPATH)"
+    if b_global then
+      str =  path.gsub( pattern, substr )
+    else
+      str = path.sub( pattern, substr )
+    end
+    dbgPrint "subst_tecspath #{path}, #{str}\n"
+    return str
+  end
+
+  #=== path ã¯çµ¶å¯¾ãã¹ã?
+  #path:: String   :
+  # '/' ã¾ãã¯ '$' ã§å§ã¾ãå ´åãçµ¶å¯¾ãã¹ã¨å¤å®ãã
+  def self.is_absolute_path?( path )
+    pa = path[0..0]; pa2 = path[0..1]
+    if pa == '/' || pa == '$' || pa2 =~ /[A-Za-z]:/ then
+      res = true
+    else
+      res = false
+    end
+    dbgPrint "is_absolute( #{path} ) = #{res}  #{path[0]}\n"
+    return res
+  end
+
+  #=== tecsgen ã®ããã©ã«ããè¨­å®
+  def self.set_default_config
+    Makefile::set_default_config
+  end
+
+  ###
+  #== Makefile.templ ã®åºåå
+å®¹ãè¿½å ãå¤æ´ããããã®æä½
+  module Makefile
+    # åºå®ããã¦ããå¤æ°(add_var ã§å¤æ´ã§ããªã)
+    @@fixed_vars = { :INCLUDES => nil, :DEFINES => nil, :TARGET_BASE => nil, :BASE_DIR => nil }
+    @@config_mode = false
+
+    @@vars = { }
+    @@vars_default = { }
+    @@var_comments = { }
+
+    @@objs = []
+    @@ldflags = ""
+    @@search_path = []
+    @@pre_tecsgen_target = []
+    @@post_tecsgen_target = []
+    @@lines = []
+
+    #=== OTHER_OBJS ã«è¿½å ãã
+    def self.add_obj obj
+      @@objs << obj
+    end
+    #=== è¿½å ããå¤æ°
+    # ãã©ã°ã¤ã³ããã¯ãããã©ã«ãå¤ãå¤æ´ã§ãã
+    # config ã«ãã
+    def self.add_var( var, val, comment = nil )
+      if @@fixed_vars[ var ]
+        raise "fixed var '#{var}' cannot be changed"
+      end
+      if @@config_mode then
+        @@vars_default[ var.to_sym ] = val
+        @@var_comments_default[ var.to_sym ] = comment
+      else
+        @@vars[ var.to_sym ] = val
+        @@var_comments[ var.to_sym ] = comment
+      end
+    end
+    #=== LDFLAGS ã«è¿½å ãã
+    def self.add_ldflag ldflag
+      @@ldflags += " " + ldflag
+    end
+    #=== ãµã¼ããã¹ãè¿½å ãã
+    # CFLAGS, vpath ã«è¿½å ãã
+    def self.add_search_path path
+      @@search_path << path
+    end
+    #=== PRE_TECSGEN_TARGET ã«è¿½å ãã
+    # PRE_TECSGEN_TARGET ã« target ãè¿½å ãã
+    def self.add_pre_tecsgen_target target
+      @@pre_tecsgen_target << pre_tecsgen_target
+    end
+    #=== POST_TECSGEN_TARGET ã«è¿½å ãã
+    # POST_TECSGEN_TARGET ã« target ãè¿½å ãã
+    def self.add_post_tecsgen_target target
+      @@post_tecsgen_target << pre_tecsgen_target
+    end
+    #=== è¿½å ããå¤æ°
+    def self.add_line( line )
+      @@lines << line.to_s + "\n"
+    end
+
+    def self.get_objs  # Array ãè¿ã
+      return @@objs.uniq
+    end
+    def self.get_vars  # Array ãè¿ã
+      if RUBY_VERSION >= '1.9' then
+        return (@@vars.keys + @@vars_default.keys).sort.uniq
+      else
+        # V1.8 ã§ã¯ãSymbol ã® sort ãã§ããªãã®ã§ãä¸æ¦ String ã«ç½®æãã
+        return (@@vars.keys + @@vars_default.keys).map{|s| s.to_s }.sort.uniq.map!{|s| s.to_sym }
+      end
+    end
+    def self.get_var_val( var )
+      return @@vars[ var ] ? @@vars[ var ] : @@vars_default[ var ]
+    end
+    def self.get_var_comment( var )
+      return @@var_comments[ var ]
+    end
+    def self.get_ldflags  # String ãè¿ã
+      return @@ldflags
+    end
+    def self.get_search_path  # Array ãè¿ã
+      return @@search_path.uniq
+    end
+    def self.get_pre_tecsgen_target  # Array ãè¿ã
+      return @@pre_tecsgen_target.uniq
+    end
+    def self.get_post_tecsgen_target  # Array ãè¿ã
+      return @@post_tecsgen_target.uniq
+    end
+    def self.get_lines  # ä»å ããè¡ãå¾ã
+      return @@lines.uniq
+    end
+
+    #=== TECSGEN ã®ããã©ã«ãè¨­å®ãè¡ã
+    # Makefile 
+    # @@fixed_vars ã§å®ç¾©ããã¦ããå¤æ°ã¯ãå¤æ´ã§ãããå®æ°å®ç¾©ããã¦ãã
+    def self.set_default_config
+      add_var( "TARGET", "$(TARGET_BASE).exe", "default target name"  )
+      add_var( "TECSGEN", "tecsgen", "default TECS generator"  )
+      add_var( "TIMESTAMP", "$(GEN_DIR)/tecsgen.timestamp", "Time Stamp"  )
+      add_var( "CC", "gcc", "default C Compiler"  )
+      add_var( "CFLAGS", '$(INCLUDES) $(DEFINES) -D  "Inline=static inline"', "default C Compiler options"  )
+      add_var( "LD", "gcc", "default Liknker"  )
+      add_var( "LDFLAGS", @@ldflags, "default Liknker Options"  )
+      add_var( "SRC_DIR", "$(BASE_DIR)/src", "default source directory" )
+      add_var( "_TECS_OBJ_DIR", "$(GEN_DIR)/", "default relocatable object (.o) directory" )
+    end
+  end
+
+  #------ TECSGEN CDL analyze and generate ------#
+
+  def syntax_analisys argv
+    # ã«ã¼ã namespace (region) ãçæ
+    @root_namespace = Region.new("::")
+
+    ####  æ§æè§£æ (post ã³ã¼ããé¤ã) ####
+    # ãã¹ã¦ã® cdl ã import ãã
+    argv.each{ |f|
+      dbgPrint( "## Import: #{f}\n")
+      Import.new( f, false, false )
+    }
+
+    # ãã¹ã¦ã®æ§æè§£éãå®äºãããã¨ã®å ±å
+    #   å®éã«ã¯ãå¾ãããã©ã°ã¤ã³ã®çæãã CDL ã®ãã¼ã¹ãè¡ããã
+    #   ã¨ã©ã¼è¡æ°ã®æ±ºå®æ¹æ³ã®å¤æ´ã®ããã«è¡ã
+    Generator.end_all_parse
+    dbgPrint( "## End all parse (except Post Code)\n")
+  end # syntax_analisys
+
+  def semantics_analisys_1
+    ####  æå³è§£æï¼ (post ã³ã¼ããé¤ã) ####
+    dbgPrint( "## Creating reverse join \n")
+    Cell.create_reverse_join
+
+    #0 set_definition_join ã¯2åå¼ã³åºãããï¼1åç®ï¼
+    dbgPrint( "## Checking all join\n")
+    @root_namespace.set_definition_join
+    # @root_namespace.set_require_join                   ### ãã£ããè¦åãããéè¤ã¨ã©ã¼ãè¦éã
+    # through ãã©ã°ã¤ã³ã§çæãããã»ã«ã«ã require ãçæã§ãã (set_definition_join ã®å¾ãã§å®æ½)
+
+    ####  post ã³ã¼ãã®çæã¨æ§æè§£æ ####
+    # å¼æ°ããªããã°ããã©ã°ã¤ã³ã®ãã¹ãã³ã¼ããåºåããªã
+    if ARGV.length > 0 then
+      dbgPrint( "## Generating Post Code\n")
+      # ãã©ã°ã¤ã³ã®ãã¹ãã³ã¼ãã®åºåã¨ import
+      tmp_file_name = "#{$gen}/tmp_plugin_post_code.cdl"
+      file = nil
+      begin
+        file = CFile.open( tmp_file_name, "w" )
+      rescue
+        Generator.error( "G9999 fail to create #{tmp_file_name}" )
+      end
+
+      if file then
+        # through ãã©ã°ã¤ã³ã®ãã¹ãã³ã¼ãçæ
+        PluginModule.gen_plugin_post_code file
+
+        begin
+          file.close
+        rescue
+          Generator.error( "G9999 fail to close #{tmp_file_name}" )
+        end
+        dbgPrint( "## Import Post Code\n")
+        Import.new( "#{tmp_file_name}" )
+      end
+    end
+
+    ####  æå³è§£æï¼ (post ã³ã¼ã) ####
+    dbgPrint( "## Creating reverse join (for post code) \n")
+    Cell.create_reverse_join
+
+    # Join ã®å®ç¾©ã®è¨­å®ã¨ãã§ãã¯
+    #0 # åæ¹åç
+§å¯¾å¿
+    #0 set_definition_join ã¯2åå¼ã³åºãããï¼2åç®ï¼  post_code ã§çæããã
+    dbgPrint( "## Checking all join (for cells generated by Post Code\n")
+    @root_namespace.set_definition_join
+
+    dbgPrint( "## Set require join\n")
+    @root_namespace.set_require_join   # mikan post ã®åã«ã
+    # ãã¹ãã³ã¼ãã§çæãããã»ã«ã® require ã®join ãçæ
+    # mikan require ã§ through ãé©ç¨ããã¦ããã¹ãã³ã¼ããå¿
+è¦ã¨ãªã£ã¦ãåºåãããªã
+  end # semantics_analisys_1
+
+  def semantics_analisys_2
+    ####  æå³è§£æï¼ ####
+    Cell.make_cell_list2
+    dbgPrint( "## Set fixed join\n")
+    Cell.create_reverse_require_join
+    # create_reverse_require_join ã¯ set_detinition_join ã«åãè¾¼ããã¨ãã§ããªã
+        # namespace ã«ä¾å­ããªãåºç¾é ã§è¡ã
+        # mikan through ãã©ã°ã¤ã³ãé©ç¨ãããã¹ãã³ã¼ãã«å½±é¿ãä¸ããå ´åãèæ
+®ã§ãã¦ããªã
+        # mikan post code ã«å½±é¿ã®ãããã®ã§ããã°ãæ©ãã« reverse_require_join ã®çµåãå¿
+è¦
+    dbgPrint( "## Setting port reference count\n")
+    @root_namespace.set_port_reference_count
+
+    dbgPrint( "## Checking all join\n")
+    @root_namespace.check_join
+
+    # mikan ãã©ã°ã¤ã³ã§çæãããã³ã³ãã¼ãã³ãã® set_def_and_check_join
+
+    dbgPrint( "## Checking referenced but undefined cell\n")
+    @root_namespace.check_ref_but_undef
+  end  #  semantics_analisys_2
+
+  def optimize_and_generate
+    #### Region link root ãã¨ã«ãªããã£ãã¤ãºããã³çæ ####
+    Region.get_link_roots.each { |region|
+
+      n_cells = region.get_n_cells
+
+      dbgPrint "#{region.get_name} has #{n_cells} cells\n"
+      if $verbose
+        print "=====================================\n"
+        print "=== Region.path_str: #{region.get_namespace_path.get_path_str}\n"
+        print "=====================================\n"
+      else
+        dbgPrint "Region.path_str: #{region.get_namespace_path.get_path_str}\n"
+      end
+
+      if $region_list.length > 0 then
+        if $region_list[ region.get_namespace_path.get_path_str ] then
+          $region_list[ region.get_namespace_path.get_path_str ] = false
+        else
+          next
+        end
+      end
+
+      # ã»ã«ãä¸ã¤ããªããã°çæããªã
+      # ã»ã«ã®çæããªãå ´å
+      if region.get_n_cells == 0 then
+        if $region_list.length > 0 then
+          Generator.warning( "W9999 $1: specified to generate but has no cell", region.get_name )
+        end
+        if region != @root_namespace then
+          next
+        end
+      end
+
+      $generating_region = region
+      if Region.get_link_roots.length > 1 then
+        if region.get_name == "::" then
+          $gen = $gen_base
+        else
+          $gen = $gen_base + "/" + region.get_global_name.to_s
+          begin
+            if ! File.directory?( $gen ) then
+              Dir.mkdir( $gen )
+            end
+          rescue
+            print( "Cannot mkdir #{$gen}\n" )
+            exit 1
+          end
+        end
+      else
+        $gen = $gen_base
+      end
+
+      dbgPrint( "## Unset optimize variables\n")
+      @root_namespace.reset_optimize   # æé©åããªã»ãããã
+
+      if Generator.get_n_error == 0 then
+        # ã¨ã©ã¼ãçºçãã¦ããããè¨­å®ããªã
+        dbgPrint( "## Set cell id\n")
+        @root_namespace.set_cell_id_and_domain      # ã»ã«ã® ID ã¨ãã¡ã¤ã³æ
+å ±ãè¨­å®ï¼linkunit æ¯ã«0ããã¤ããï¼
+
+        # ã¨ã©ã¼ãçºçãã¦ããããæé©åã¯å®æ½ããªã
+        if ! $unopt then
+          dbgPrint( "## Optimizing: Link Region=#{@root_namespace.get_name}\n")
+          @root_namespace.optimize
+        end
+      end
+
+      if $show_tree then
+        # ã¨ã©ã¼ãçºçãã¦ãã¦ãè¡¨ç¤ºï¼ã¨ã©ã¼çºçæã¯æé©åããã¦ããªãã®ã§æ³¨æï¼
+        print "##### show_tree LinkRegion=#{region.get_name} #####\n"
+        @root_namespace.show_tree(0)
+        print "##### END       LinkRegion=#{region.get_name} #####\n\n"
+      end
+
+      # æ§æè§£éãæå³è§£æã§ã¨ã©ã¼çºçãã¦ããããã³ã¼ãçæãããªã
+      if Generator.get_n_error != 0 then
+        print_report
+        exit 1
+      end
+
+      #### ã³ã¼ãçæ ####
+      begin
+        dbgPrint( "## Generating: Link Region=#{@root_namespace.get_name}\n")
+        @root_namespace.generate
+        dbgPrint( "## Generating Post: Link Region=#{@root_namespace.get_name}\n")
+        @root_namespace.generate_post
+      rescue
+        # éå¸¸ããã¸ã¯æ¥ãªã (generate, generate_post ã§å¦ç½®ããã)
+        Generator.error( "G9999 fail to generate" )
+      end
+    }
+  end # optimize_and_generate
+
+  def finalize
+    dbgPrint( "## Generating XML\n")
+    # Region.gen_xml @root_namespace
+    ## 
+    # Namespace.gen_XML  @root_namespace
+
+    $region_list.each{ |region_path_str, val|
+      if val == true then
+        Generator.warning( "W9999 $1: not link root, -G ignored", region_path_str )
+      end
+    }
+
+    # update ãã
+    # APPFile ã§çæããããã¡ã¤ã«ã¯ãããå¤åãããã°ãããã§æ´æ°ãã
+    # ã³ã¼ãçææ®µéã§ã¨ã©ã¼ãçºçããã°ãæ´æ°ããªã
+    # CFile ã§çæããããã®ã¯ãæ´æ°ããã¦ãã
+    if Generator.get_n_error == 0 then
+      begin
+        AppFile.update
+      rescue => evar
+        Generator.error( "G9999 Fail to update. (error occurred while renaming generated files)" )
+        print_exception( evar )
+      end
+    end
+
+    print_report
+    if Generator.get_n_error != 0 then
+      STDERR.print "error occurred while generating. some file can be corrupt in #{$gen_base}\n"
+      exit 1
+    end
+
+    open( "#{$gen_base}/tecsgen.timestamp", "w" ){|io|}
+  end # finalize
+end # class TECSGEN
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/types.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/types.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/types.rb	(revision 270)
@@ -0,0 +1,1654 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#
+#   Copyright (C) 2008-2015 by TOPPERS Project
+#--  
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: types.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+#= HasType: @type ãå
+é¨ã«æã¤åã®ããã®ã¢ã¸ã¥ã¼ã«
+#  @b_cloned::Bool  : true if @type is cloned
+#
+# ãã®ã¢ã¸ã¥ã¼ã«ã¯ DefinedType, PtrType, ArrayType ã« include ããã
+# æ¬å½ã¯ typedef ãããæã® Decl ã®è¦ç´ ã®ã¿ clone ããã°ããã®ã ããget_type, get_original_type ã§
+# åãåºãããã¨ããset_scs, set_qualifier ãããã¨ãã«ç¡æ¡ä»¶ã§ clone ãã (ç¡é§ã«ã¡ã¢ãªãä½¿ç¨ãã)
+# ãã ããclone ããã®ã¯ä¸åã®ã¿ã§ãã (äºå clone ããã¨å¥ã®åãåç
+§ãã¦ãã¾ã)
+#
+# initialize ã§ clone ãã¦ããå
+±æããã¦ããã¨ãã« clone ãããªã
+#
+module HasType
+  def initHasType
+    @b_cloned = false
+  end
+
+  #=== HasType# @type ãã¯ã­ã¼ã³ãã
+  def clone_type
+#    if @b_cloned == false then
+      @type = @type.clone
+      @b_cloned = true
+#    end
+  end
+end
+
+class Type < Node
+# @b_const    : bool
+# @b_volatile : bool
+
+  def initialize
+    super
+  end
+
+  def set_qualifier( qualifier )
+    case qualifier
+    when :CONST
+#      if @b_const then
+#        cdl_error( "T1001 const duplicate"  )
+#      end
+      @b_const = true
+    when :VOLATILE
+#      if @b_volatile then
+#        cdl_error( "T1002 volatile duplicate"  )
+#      end
+      @b_volatile = true
+    else
+      raise "Unknown qualifier #{qualifier}"
+    end
+  end
+
+  def is_const?
+    if @b_const then
+      return true
+    else
+      return false
+    end
+  end
+
+  def is_volatile?
+    if @b_volatile then
+      return true
+    else
+      return false
+    end
+  end
+
+  def is_void?
+    if self.kind_of? DefinedType then
+      return @type.is_void?
+    elsif self.kind_of? VoidType then
+      return true
+    else
+      return false
+    end
+  end
+
+  #=== size_is, count_is, string ãè¨­å®
+  # æ´¾çã¯ã©ã¹ã§ãªã¼ãã¼ã©ã¤ãããï¼ããã©ã«ãã§ã¯ã¨ã©ã¼ï¼
+  def set_scs( size, count, string, max = nil, b_nullable = false )
+    str = ""
+    delim = ""
+    if size then
+      str = "size_is"
+      delim = ", "
+    end
+    if count then
+      str = "#{str}#{delim}count_is"
+      delim = ", "
+    end
+    if string then
+      str = "#{str}#{delim}string"
+      delim = ", "
+    end
+    if b_nullable then
+      str = "#{str}#{delim}nullable"
+      delim = ", "
+    end
+    cdl_error( "T1003 $1: unsuitable specifier for $2" , str, self.class )
+  end
+
+  def clear_max
+    raise "clear_max called: #{self.class}"
+  end
+
+  def get_type_str
+    str = ""
+    if @b_const then
+      str = "#{str}const "
+    end
+    if @b_volatile then
+      str = "#{str}volatile "
+    end
+    return str
+  end
+
+  #=== åããã§ãã¯
+  #    æ­£å½ãªåå®ç¾©ãã©ããããã§ãã¯ãã
+  def check
+    # åã«èª¤ããããã°ãã¨ã©ã¼æå­åãè¿ã
+  end
+
+  #=== struct ã® tag ããã§ãã¯
+  #    æ­£å½ãªåå®ç¾©ãã©ããããã§ãã¯ãã
+  #kind:: Decl ã® @kind ãåç
+§
+  def check_struct_tag kind
+    # tag ãå­å¨ããªããã°ã¨ã©ã¼ãåºåãã
+    # é
+ååã§ã¯ãè¦ç´ ã®åãåå¸°çã«ãã§ãã¯
+    # ãã¤ã³ã¿åã§ã¯ãæãå
+ã® tag ãã§ãã¯ã¯ããªã
+    # é¢æ°åã§ã¯ãã©ã¡ã¼ã¿ãªã¹ãã®ãã¹ã¦ã«ã¤ãã¦è¡ã
+  end
+
+  #===  åæåå¯è½ããã§ãã¯
+  #     attribute ãªã©åæåå¯è½ããã§ãã¯ããï¼åã«å¯¾ãæ­£å½ãªåæåå­ãä¸ãããã¦ãããï¼
+  #ident::        string                è¢«ä»£å
+¥å¤æ°å½
+  #initialize::   Expression, Array of initializer or C_EXP
+  #               ä»£å
+¥å¤ãC_EXP ãä¸ããããã®ã¯ IntType ã®å ´åã®ã¿
+  #kind::         symbol (:ATTRIBUTE, :VAR, :CONSTNAT )
+  #attribute::    NameList              kind == :VAR ã®ã¨ãåç
+§ã§ãã attribute
+  #
+  #     locale ãç¬¬ä¸å¼æ°ã¨ãã¦åãã®ã¯ãä»¥ä¸ã®çç±ã«ããã
+  #     ãã®ã¡ã½ããã¯ãå¤æ°ã¸ã®ä»£å
+¥ãè¡ããããè¡ãã«å¯¾ãã¦å¼ã³åºããããã
+  #     Type ã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹ã¯ãå¤æ°ãå®ç¾©ããããè¡ããè¨æ¶ãã¦ããã
+  #
+  # STAGE: S
+  def check_init( locale, ident, initializer, kind, attribute = nil )
+    #
+  end
+
+  #=== const_val ãæå®ã®åã«ã­ã£ã¹ããã
+  # æ´¾çã¯ã©ã¹ã§ãªã¼ãã¼ã©ã¤ããã¦ããªãã¨ã¨ã©ã¼
+  def cast( const_val )
+    cdl_error( "T1004 cannot cast to $1" , self.class )
+  end
+
+  #=== åãä¸è´ãããã®ãã§ãã¯
+  # ååã®å­é¢ã§ãã§ãã¯ï¼
+  # typedef ãããåãå­é¢ã§ä¸è´ãè¦ããããå
+ã®åãåãã§ãååãç°ãªãã°ä¸ä¸è´ã¨ãªã
+  def equal? type2
+    return ( get_type_str == type2.get_type_str ) && ( get_type_str_post == type2.get_type_str_post )
+  end
+
+  #=== bit size ãå¾ã
+  # IntType, FloatType ä»¥å¤ã¯0
+  def get_bit_size
+    return 0
+  end
+
+  #=== å
+ã®åãå¾ã
+  # typedef ãããåã®å ´åããã®å
+ã®åãè¿ã.
+  # ããä»¥å¤ã¯ãèªåèªèº«ãè¿ãï¼
+  # (DefinedType ã§ã¯æ¬ã¡ã½ããããªã¼ãã¼ã©ã¤ãããã)
+  def get_original_type
+    return self
+  end
+
+  #=== å
+é¨ã«ãã¤ã³ã¿åãæã¤
+  # ãã¤ã³ã¿åãã¾ãã¯ãã¤ã³ã¿åã¡ã³ããæã¤æ§é ä½ãã¾ãã¯è¦ç´ ããã¤ã³ã¿åãæã¤é
+å
+  def has_pointer?
+    false
+  end
+
+  #=== size_is, count_is, string æå®ããããã¤ã³ã¿ãæã¤ã
+  # size_is, count_is, string æå®ããããã¤ã³ã¿åãã¾ãã¯ãããã¡ã³ãã«æã¤æ§é ä½ãã¾ãã¯ããããè¦ç´ ã«æã¤é
+å
+  def has_sized_pointer?
+    false
+  end
+  
+  #=== é·ãæå®ã®ãªã string ãæã¤
+  # ãªãæå®ã®ãªã string æå®ããããã¤ã³ã¿åãã¾ãã¯ãããã¡ã³ãã«æã¤æ§é ä½ãã¾ãã¯ãããè¦ç´ ã«æã¤é
+å
+  def has_unsized_string?
+    false
+  end
+
+  def show_tree indent
+    indent.times { print "  " }
+    puts "const=#{@b_const} volatile=#{@b_volatile} #{locale_str}"
+    indent.times { print "  " }
+    puts "has_pointer=#{has_pointer?} has_sized_pointer=#{has_sized_pointer?} has_unsized_string=#{has_unsized_string?}"
+  end
+end
+
+class DefinedType < Type
+#  @type_name::string
+#  @typedef::Typedef
+#  @type:: kind_of Type
+
+  include HasType
+
+  def initialize( type_name )
+    super()
+    @type_name = type_name
+
+    # mikan type_name ã path ã«ãªã£ã¦ããªãããæ«å®
+    @typedef = Namespace.find( [ type_name ] )  #1
+
+#    if @type.class != Typedef then
+#      raise NotTypedef
+    #    end
+    if @typedef == nil then
+      cdl_error( "T1005 \'$1\' not defined" , type_name )
+    elsif @typedef.class != Typedef then
+      cdl_error( "T1006 \'$1\' not type name. expecting type name here" , type_name )
+    end
+    @type = @typedef.get_declarator.get_type
+    initHasType
+  end
+
+  def get_type
+    clone_type
+    return @type
+  end
+
+  def get_type_str
+    "#{super}#{@type_name}"
+  end
+
+  def get_type_str_post
+    ""
+  end
+
+  def get_size
+    return @type.get_size
+  end
+
+  def is_nullable?
+    return @type.is_nullable?
+  end
+
+  #=== qualifier(const, volatile) ã®è¨­å®
+  def set_qualifier( qualifier )
+    clone_type
+    @type.set_qualifier( qualifier )
+    super
+  end
+
+  def set_scs( size, count, string, max = nil, b_nullable = false )
+    clone_type
+    @type.set_scs( size, count, string, max, b_nullable )
+  end
+
+  def clear_max
+    @type.clear_max
+  end
+
+  def get_original_type
+    clone_type
+    return @type.get_original_type
+  end
+
+  def check	# æå³çèª¤ããããã°ãæå­åãè¿ã
+    nil    # typedef ã®æ®µéã§æå³ãã§ãã¯ããã¦ãã
+  end
+
+  def check_init( locale, ident, initializer, kind, attribute = nil )
+    get_type.check_init( locale, ident, initializer, kind, attribute )
+  end
+
+  #=== å
+é¨ã«ãã¤ã³ã¿åãæã¤
+  # ãã¤ã³ã¿åãã¾ãã¯ãã¤ã³ã¿åã¡ã³ããæã¤æ§é ä½ãã¾ãã¯è¦ç´ ããã¤ã³ã¿åãæã¤é
+å
+  def has_pointer?
+    @type.has_pointer?
+  end
+
+  #=== size_is, count_is, string æå®ããããã¤ã³ã¿ãæã¤ã
+  # size_is, count_is, string æå®ããããã¤ã³ã¿åãã¾ãã¯ãããã¡ã³ãã«æã¤æ§é ä½ãã¾ãã¯ããããè¦ç´ ã«æã¤é
+å
+  def has_sized_pointer?
+    @type.has_sized_pointer?
+  end
+  
+  #=== é·ãæå®ã®ãªã string ãæã¤
+  # ãªãæå®ã®ãªã string æå®ããããã¤ã³ã¿åãã¾ãã¯ãããã¡ã³ãã«æã¤æ§é ä½ãã¾ãã¯ãããè¦ç´ ã«æã¤é
+å
+  def has_unsized_string?
+    @type.has_unsized_string?
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    if @typedef == nil then
+      puts "DefinedType: #{@type_name} is missing, const=#{@b_const} volatile=#{@b_volatile} #{locale_str}"
+    else
+      puts "DefinedType: #{@type_name}, const=#{@b_const} volatile=#{@b_volatile}"
+    end
+    super( indent + 1 )
+    @typedef.show_tree( indent + 1 )
+    @type.show_tree( indent + 1 )
+  end
+end
+
+class VoidType < Type
+
+  def check	# æå³çèª¤ããããã°ãæå­åãè¿ã
+    nil
+  end
+
+  def check_init( locale, ident, initializer, kind, attribute = nil )
+    cdl_error2( locale, "T1007 $1: void type variable cannot have initializer" , ident )
+  end
+
+  def get_type_str
+    "#{super}void"
+  end
+
+  def get_type_str_post
+    ""
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "VoidType #{locale_str}"
+    super( indent + 1 )
+  end
+end
+
+class BoolType < Type
+
+  def check	# æå³çèª¤ããããã°ãæå­åãè¿ã
+    nil
+  end
+
+  def get_type_str
+    "#{super}bool_t"
+  end
+
+  def get_type_str_post
+    ""
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "BoolType #{locale_str}"
+    super( indent + 1 )
+  end
+end
+
+class IntType < Type
+#  @bit_size::		-11: char, -1: char_t, -2: short, -3: int, -4: long, -5: long long
+#			8, 16, 32, 64, 128
+#  @sign::		:SIGNED, :UNSIGNED, nil
+
+  def initialize( bit_size )
+    super()
+    @bit_size = bit_size
+    @sign = nil
+  end
+
+  def set_sign( sign, b_uint = false )
+    if @sign then
+      if @sign != sign then
+        cdl_error( "T1008 ambigous signed or unsigned"   )
+      end
+    elsif b_uint == false && @bit_size > 0 then
+      if sign == :SIGNED then
+        cdl_warning( "W2001 signed int$1_t: obsolete. use int$2_t" , @bit_size, @bit_size )
+      else
+        cdl_warning( "W2002 unsinged int$1_t: obsolete. use uint$2_t" , @bit_size, @bit_size )
+      end
+    end
+
+    @sign = sign
+
+    if @sign != :SIGNED && @sign != :UNSIGNED then
+      raise "set_sign: unknown sign: #{@sign}"
+    end
+  end
+
+  def check	# æå³çèª¤ããããã°ãæå­åãè¿ã
+    nil
+  end
+
+  def check_init( locale, ident, initializer, kind, attribute = nil )
+    val = initializer  # C_EXP, Array
+    if val.instance_of?( Expression ) then
+      val = val.eval_const2( nil, attribute )
+      # è©ä¾¡ã®çµæ C_EXP ã Array ã¨ãªãå¯è½æ§ããã
+    end
+
+    if val.instance_of? Token then    # StringVal å°å
+¥ã«ããããã¯ã Token ã¯æ¥ãªãã¯ã
+      # val ã Token ã®å ´å == ã®å³è¾ºã String ã ã¨ã¨ã©ã¼ãèµ·ãã (#198)
+      cdl_error2( locale, "T1009 $1: $2: not integer" , ident, val )
+      return
+    elsif val.is_a? C_EXP then
+      # #192 var ã attribute ãåç
+§ããattribute ã®å³è¾ºã C_EXP ã®å ´å
+      # const ã®å³è¾ºã C_EXP ã®å ´åã
+      return
+    elsif val.kind_of? FloatVal then
+      cdl_error2( locale, "T1011 $1: need cast to assign float to integer" , ident )
+      return
+    elsif val.instance_of? Array then
+      cdl_error2( locale, "T1017 $1: unsuitable initializer for scalar type" , ident )
+      return
+    elsif val == nil then
+      cdl_error2( locale, "T1010 $1: initializer is not constant" , ident )
+      return
+    end
+
+    if ! val.kind_of? IntegerVal then
+      cdl_error2( locale, "T1012 $1: $2: not integer" , ident, val )
+      return
+    end
+
+    val = val.to_i
+    max = get_max
+    min = get_min
+    dbgPrint "sign=#{@sign} ident=#{ident} val=#{val} max=#{max} min=#{min}\n"
+
+    if max != nil then
+      if val > max then
+        if @sign == :SIGNED || @sign == nil then
+          cdl_error2( locale, "T1013 $1: too large (max=$2)" , ident, max )
+        else
+          cdl_error2( locale, "T1016 $1: too large (max=$2)" , ident, max )
+        end
+      end
+    end
+
+    if min != nil then
+      if val < min
+        if @sign == :SIGNED || @sign == nil then
+          cdl_error2( locale, "T1014 $1: too large negative value (min=$2)" , ident, min )
+        else
+          cdl_error2( locale, "T1015 $1: negative value for unsigned" , ident )
+        end
+      end
+    end
+  end
+
+  #=== IntType# æå¤§å¤ãæå°å¤ããã§ãã¯ãã¦ã¯ãªãããã
+  # ã­ã£ã¹ãæ¼ç®ãè¡ã
+  #in_val:: IntegerVal, FloatVal:  ãã®åã«ã­ã£ã¹ãããå¤
+  #from_type:: Symbol:  :IntType, :FloatType  IntType ã®å ´åã¯ãããæ°ã§ã¯ãªãããFloatType ã®å ´åã¯æå¤§å¤ã§ã¯ãªãã
+  def check_and_clip( in_val, from_type = :IntType )
+    bit_size = get_bit_size
+    if bit_size == -1 then
+      bit_size = 8
+    end
+    val = in_val.to_i
+    if get_max && val > get_max then
+      if from_type == :IntType then
+        rval = ((1 << bit_size)-1) & val   # bit æ°ã§ã¯ãªãã
+      else
+        rval = get_max                         # æå¤§å¤ã§ã¯ãªãã (FloatType)
+      end
+      cdl_warning( "W2003 $1: too large to cast to $2, clipped($3)" , in_val, get_type_str, rval )
+    elsif get_min && val < get_min then
+      if from_type == :IntType then
+        rval = ((1 << bit_size)-1) & val
+      else
+        rval = get_min
+      end
+      if @sign == :SIGNED || @sign == nil then
+        cdl_warning( "W2004 $1: too small to cast to $2, clipped($3)" , in_val, get_type_str, rval )
+      else    # @sign == :UNSIGNED || @sign == nil (char ã®å ´å)
+        cdl_warning( "W2005 $1: negative value for unsigned: convert to $2" , in_val, rval )
+      end
+    else
+      rval = val
+    end
+    return rval
+  end
+
+  def get_min
+    if @sign == :SIGNED || @sign == nil then
+      if @bit_size == -1 then
+        bit_sz = 8   # char_t ã¯ãæç¬¦å·ã«æ±ã
+      else
+        bit_sz = @bit_size
+      end
+      case bit_sz
+      when 8, 16, 32, 64, 128
+        return  - ( 1 << ( bit_sz - 1 ))
+      else # -1, -2, -3, -4, -5, -11
+        return nil
+      end
+    else   # @sign == :UNSIGNED
+      return 0
+    end
+  end
+
+  def get_max
+    if @bit_size == -1 then
+      if @sign == nil then
+        return 255   # char_t ã¯ãç¡ç¬¦å·ã«æ±ã
+      else
+        bit_sz = 8
+      end
+    else
+      bit_sz = @bit_size
+    end
+    if @sign == :SIGNED || @sign == nil then
+      case bit_sz
+      when 8, 16, 32, 64, 128
+        return ( 1 << ( bit_sz - 1 )) -1
+      else # -1, -2, -3, -4, -5, -11
+        return nil
+      end
+    else   # @sign == :UNSIGNED
+      case bit_sz
+      when 8, 16, 32, 64, 128
+        return ( 1 << bit_sz ) - 1
+      else # -2, -3, -4, -5, -11
+        return nil
+      end
+    end
+  end
+
+  #=== IntType# C è¨èªã«ãããååï¼ä¿®é£¾å­ä»ãï¼
+  def get_type_str
+    str = super
+
+    # NEW_MODE
+    case @sign
+    when :SIGNED
+      sign = ""
+      signL = "signed "
+    when :UNSIGNED
+      sign = "u"
+      signL = "unsigned "
+    else
+      sign = ""
+      signL = ""
+    end
+
+    # p "get_type_str: sign:#{@sign} signL=#{signL}"
+
+    case @bit_size
+    when -1      # char_t å
+      if @sign == :SIGNED then
+        sign = "s"
+      end
+      str = "#{str}#{sign}char_t"
+    when -11     # char å(obsolete)
+      str = "#{str}#{signL}char"
+    when -2      # short å
+      str = "#{str}#{signL}short"
+    when -3      # int å
+      str = "#{str}#{signL}int"
+    when -4      # long å
+      str = "#{str}#{signL}long"
+    when -5      # long long å
+      str = "#{str}#{signL}long long"
+    when 8, 16, 32, 64, 128     # int16, int32, int64, int128 å
+      str = "#{str}#{sign}int#{@bit_size}_t"
+    end
+
+    return str
+  end
+
+  #=== IntType# C è¨èªã«ãããååï¼å¾ç½®æå­åï¼
+  def get_type_str_post
+    ""
+  end
+
+  #=== IntType#bit_size ãå¾ã
+  #    è¿ãããå¤ã¯ @bit_size ã®ä»æ§ãåç
+§
+  def get_bit_size
+    return @bit_size
+  end
+
+  #=== IntType# sign ãå¾ã
+  # @sign ã®èª¬æãåç
+§
+  def get_sign
+    @sign
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "IntType bit_size=#{@bit_size} sign=#{@sign} const=#{@b_const} volatile=#{@b_volatile} #{locale_str}"
+    super( indent + 1 )
+  end
+end
+
+class FloatType < Type
+#  @bit_size::         32, 64, (80), -32, -64
+
+  def initialize( bit_size )
+    super()
+    @bit_size = bit_size
+  end
+
+  def check	# æå³çèª¤ããããã°ãæå­åãè¿ã
+    nil
+  end
+
+  # mikan Float åã® C_EXP å¯¾å¿ (generate.rb ã«ãå¤æ´å¿
+è¦)
+  def check_init( locale, ident, initializer, kind, attribute = nil )
+    # åã«å¯¾ããåæå¤ã«èª¤ããããã°ãã¨ã©ã¼æå­åãè¿ã
+    val = initializer
+    if val.instance_of?( Expression ) then
+      val = val.eval_const2( nil, attribute )
+      # è©ä¾¡ã®çµæ C_EXP ã Array ã¨ãªãå¯è½æ§ããã
+    end
+
+    if val.instance_of? Token then
+      # val ã Token ã®å ´å == ã®å³è¾ºã String ã ã¨ã¨ã©ã¼ãèµ·ãã
+      cdl_error2( locale, "T1018 $1: $2: not number" , ident, val )
+      return
+    elsif val.instance_of? Array then
+      cdl_error2( locale, "T1020 $1: unsuitable initializer for scalar type" , ident )
+      return
+    elsif val.instance_of? C_EXP then
+      return
+    elsif val == nil then
+      cdl_error2( locale, "T1019 $1: initializer is not constant" , ident )
+      return
+    elsif ! val.kind_of?( IntegerVal ) && ! val.kind_of?( FloatVal ) then
+      cdl_error2( locale, "T1037 $1: not number" , ident )
+      return
+    end
+    # else
+    #   cdl_error2( locale, "T1020 $1: unsuitable initializer for scalar type" , ident )
+    #   return
+    # end
+    return
+  end
+
+  def get_type_str
+    str = super
+
+    case @bit_size
+    when 32
+      str = "#{str}float32_t"
+    when 64
+      str = "#{str}double64_t"
+    when -32
+      str = "#{str}float"
+    when -64
+      str = "#{str}double"
+    end
+    return str
+  end
+
+  def get_type_str_post
+    ""
+  end
+
+  def get_bit_size
+    @bit_size
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "FloatType bit_size=#{@bit_size} qualifier=#{@qualifier} #{locale_str}"
+    super( indent + 1 )
+  end
+end
+
+class EnumType < Type # mikan
+#  @bit_size::		-1: enum
+#			8, 16, 32, 64, 128
+#  @element::		[]
+#  @element_val::	[]
+
+  def initialize( bit_size )
+    super()
+    @bit_size = bit_size
+  end
+
+  def check
+   # mikan enum check
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "EnumType bit_size=#{@bit_size} qualifier=#{@qualifier} #{locale_str}"
+    super( indent + 1 )
+    # mikan element
+  end
+end
+
+class StructType < Type
+#  @tag::
+#  @b_define::  true if define, false if refer
+#  @members_decl:: NamedList
+#  @definition:: StructType
+#  @b_has_pointer_member:: bool : ã¡ã³ãã«ãã¤ã³ã¿åããã
+#  @b_has_sized_pointer_member:: bool : ã¡ã³ãã«ãã¤ã³ã¿åããã
+#  @b_has_unsized_string_member:: bool : ã¡ã³ãã«ãã¤ã³ã¿åããã
+#  @member_types_symbol:: Symbol : tag ãç¡ãæã®ã¿è¨­å® (ããä»¥å¤ã§ã¯ nil)
+
+  @@structtype_current_stack = []
+  @@structtype_current_sp = -1
+
+  # tag ãªã struct
+  @@no_struct_tag_num = 0
+  @@no_tag_struct_list = {}
+
+  def initialize( tag = nil )
+    super()
+    @tag = tag
+    @@structtype_current_sp += 1
+    @@structtype_current_stack[@@structtype_current_sp] = self
+    @b_has_pointer_member = false
+    @b_has_sized_pointer_member = false
+    @b_has_unsized_string_member = false
+    @member_types_symbol = nil
+  end
+
+  def self.set_define( b_define )
+    @@structtype_current_stack[@@structtype_current_sp].set_define( b_define )
+  end
+
+  def set_define( b_define )
+    @b_define = b_define
+    if @b_define then
+      @members_decl = NamedList.new( nil, "in struct #{@tag}" )
+      # if @tag then    ç»é²ã¿ã¤ãã³ã°ãçµããã«å¤æ´ V1.0.2.19
+      #  Namespace.new_structtype( self )
+      # end
+    else
+      @definition = Namespace.find_tag( @tag )
+      # check_struct_tag ã«ç§»ã V1.0.2.19
+      # if @definition == nil then
+      #  cdl_error( "T1021 \'$1\': struct not defined" , @tag )
+      # end
+    end
+  end
+
+  def self.new_member( member_decl )
+    @@structtype_current_stack[@@structtype_current_sp].new_member( member_decl )
+  end
+
+  def new_member( member_decl )
+    member_decl.set_owner self   # Decl (StructType)
+    @members_decl.add_item( member_decl )
+    if member_decl.get_type.has_pointer?
+      @b_has_pointer_member = true
+    end
+    if member_decl.get_type.has_sized_pointer?
+      @b_has_sized_pointer_member = true
+    end
+    if member_decl.get_type.has_unsized_string?
+      @b_has_unsized_string_member = true
+    end
+  end
+
+  def check	# æå³çèª¤ããããã°ãæå­åãè¿ã
+    nil
+  end
+
+  #=== æ§é ä½ã®ã¿ã°ããã§ãã¯
+  #  declarator ã®æç¹ã§ãã§ãã¯ãã
+  #kind:: Decl ã® @kind ãåç
+§
+  def check_struct_tag kind
+    if @tag == nil
+      return
+    end
+
+    st = Namespace.find_tag( @tag )
+    if st == nil then
+      cdl_error( "T1022 struct $1: not defined" , @tag )
+    end
+  end
+
+  # mikan Float åã® C_EXP å¯¾å¿ (generate.rb ã«ãå¤æ´å¿
+è¦)
+  def check_init( locale, ident, initializer, kind, attribute = nil )
+
+    st = Namespace.find_tag( @tag )
+    if st == nil then
+      cdl_error2( locale, "T1023 struct $1: not defined" , @tag )
+      return
+    end
+
+    # åæåå­ãå¼ã®å ´åãåï¼ã¿ã°ï¼ãä¸è´ããããã§ãã¯
+    if initializer.instance_of?( Expression ) then
+      t = initializer.get_type( attribute )
+      # print "Check init #{t.class} #{t.get_name}\n"
+      if ! t.kind_of?( StructType ) then
+        if t then
+          str = t.get_type_str
+        else
+          str = "unknown"
+        end
+        cdl_error2( locale, "T1038 $1: initializer type mismatch. '$2' & '$3'" , ident, get_type_str, str )
+      elsif @tag != t.get_name then
+        cdl_error2( locale, "T1039 $1: struct tag mismatch $2 and $3" , ident, @tag, t.get_name )
+      end
+      initializer = initializer.eval_const( attribute )
+    end
+
+    if initializer.instance_of?( Array ) then
+      i = 0
+      st.get_members_decl.get_items.each { |d|
+        if initializer[i] then
+          d.get_type.check_init( locale, "#{ident}.#{d.get_identifier}", initializer[i], kind )
+        end
+        i += 1
+      }
+    else
+      cdl_error2( locale, "T1024 $1: unsuitable initializer for struct" , ident )
+    end
+  end
+
+  def self.end_of_parse()
+    @@structtype_current_stack[@@structtype_current_sp].end_of_parse
+    @@structtype_current_sp -= 1
+  end
+
+  def end_of_parse()
+    if @members_decl == nil   # @b_define = false ã¾ãã¯ã¡ã³ãã¼ã®ãªãæ§é ä½ï¼ã¨ã©ã¼ï¼
+      return
+    end
+    @members_decl.get_items.each{ |md|
+      size = md.get_size_is
+      if size then
+        val = size.eval_const( @members_decl )
+        if val == nil then
+          type = size.get_type( @members_decl )
+          if ! type.kind_of?( IntType ) then
+            cdl_error( "T1025 size_is argument is not integer type"  )
+          end
+        end
+      end
+      count = md.get_count_is
+      if count then
+        val = count.eval_const( @members_decl )
+        if val == nil then
+          type = count.get_type( @members_decl )
+          if ! type.kind_of?( IntType ) then
+            cdl_error( "T1026 count_is argument is not integer type"  )
+          end
+        end
+      end
+      string = md.get_string
+      if string == -1 then
+        # é·ãæå®ãªã
+      elsif string then
+        val = string.eval_const( @members_decl )
+        if val == nil then
+          type = string.get_type( @members_decl )
+          if ! type.kind_of?( IntType ) then
+            cdl_error( "T1027 string argument is not integer type"  )
+          end
+        end
+      end
+    }
+
+    if @tag == nil then
+      @member_types_symbol = get_member_types_symbol
+      # print "member_types_symbol = #{get_member_types_symbol}\n"
+      if @@no_tag_struct_list[ @member_types_symbol ] then
+        @tag = @@no_tag_struct_list[ @member_types_symbol ]
+      else
+        @tag = :"TAG_#{@@no_struct_tag_num}_TECS_internal__"
+	    @@no_struct_tag_num += 1
+        @@no_tag_struct_list[ @member_types_symbol ] = @tag
+        Namespace.new_structtype( self )
+      end
+    else
+      if @b_define then
+        Namespace.new_structtype( self )
+      end
+    end
+  end
+
+  def get_name
+    @tag
+  end
+
+  def get_type_str      # mikan struct get_type_str
+    str = super
+
+    if @tag then
+      # typedef struct tag StructType; ã®å½¢å¼ã®å ´å
+      # struct ã®æ¬ä½ã¯ãå¥ã«çæããã
+      return "#{str}struct #{@tag} "
+
+    else
+      # typedef struct { int a; } StructType; ã®å½¢å¼ã®å ´å
+      str += "struct {\n"
+      @members_decl.get_items.each{ |i|
+        str += sprintf( "    %-8s %s%s;\n", "#{i.get_type.get_type_str}", "#{i.get_name}", "#{i.get_type.get_type_str_post}" )
+      }
+      str += "} "
+
+      return str
+
+    end
+  end
+
+  def get_type_str_post
+    ""
+  end
+
+  def get_members_decl
+    return @members_decl if @members_decl
+
+    st = Namespace.find_tag( @tag )
+    if st then
+      return st.get_members_decl
+    end
+
+    return nil
+  end
+
+  def has_pointer?
+    if @definition
+      return @definition.has_pointer?
+    else
+      return @b_has_pointer_member
+    end
+  end
+
+  def has_sized_pointer?
+    if @definition
+      return @definition.has_sized_pointer?
+    else
+      return @b_has_sized_pointer_member
+    end
+  end
+  
+  def has_unsized_string?
+    if @definition
+      return @definition.has_unsized_string?
+    else
+      return @b_has_unsized_string_member
+    end
+  end
+
+  #=== åãæ§é ä½ãã©ãããã§ãã¯ãã
+  # tag ã®ãã§ãã¯ã¯è¡ããªã
+  # ãã¹ã¦ã®ã¡ã³ãã®ååã¨åãä¸è´ãããã¨ãç¢ºèªãã
+  def same? another
+    md = another.get_members_decl
+    if @members_decl == nil || md == nil
+      return false
+    end
+
+    md1 = @members_decl.get_items
+    md2 = md.get_items
+    if( md1.length != md2.length )
+      return false
+    end
+
+    i = 0
+    while i < md1.length
+      if md1[i].get_name != md2[i].get_name ||
+          md1[i].get_type.get_type_str != md2[i].get_type.get_type_str ||
+          md1[i].get_type.get_type_str_post != md2[i].get_type.get_type_str_post
+        return false
+      end
+      i += 1
+    end
+
+    return true
+  end
+  
+  def get_member_types_symbol
+    mts = ''
+    @members_decl.get_items.each { |member|
+      mts += member.get_type.get_type_str + member.get_type.get_type_str_post + ';'
+    }
+    return mts.to_sym
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "StructType tag: #{@tag} qualifier=#{@qualifier} has_pointer=#{@b_has_pointer_member} #{locale_str}"
+    super( indent + 1 )
+    if @b_define then
+      @members_decl.show_tree( indent + 1 )
+    end
+  end
+end
+
+class FuncType < Type
+#  @paramlist::  ParamList
+#  @type:: return type : PtrType, ArrayType, FuncType, IntType, FloatType, ...
+#  @b_oneway:: bool: true, false
+#  @has_in:: bool :  has [in] parameter
+#  @has_inout:: bool : has [inout] parameter
+#  @has_out:: bool : has [out] parameter
+#  @has_send:: bool : has [send] parameter
+#  @has_receive:: bool : has [receive] parameter
+
+  def initialize( paramlist = nil )
+    super()
+
+    @has_in = false
+    @has_inout = false
+    @has_out = false
+    @has_send = false
+    @has_receive = false
+
+    @paramlist = paramlist
+    @b_oneway = false
+    if paramlist then
+      paramlist.check_param
+    else
+      @paramlist = ParamList.new( nil )
+    end
+    @paramlist.set_owner self  # ParamList
+    @paramlist.get_items.each{ |p|
+      case p.get_direction
+      when :IN
+        @has_in = true
+      when :INOUT
+        @has_inout = true
+      when :OUT
+        @has_out = true
+      when :SEND
+        @has_send = true
+      when :RECEIVE
+        @has_receive = true
+      else
+        raise "unkown direction"
+      end
+    }
+
+  end
+
+  def check	# æå³çèª¤ããããã°ãæå­åãè¿ã
+    if @type.class == ArrayType then	# é
+åãè¿ãé¢æ°
+      return "function returning array"
+    elsif @type.class == FuncType then	# é¢æ°ãè¿ãé¢æ°
+      return "function returning function"
+    end
+    return @type.check   # é¢æ°ã® return ããåã®ãã§ãã¯
+
+    # ãã©ã¡ã¼ã¿ã®åã®ãã§ãã¯ã¯ ParamList#check_param ã§è¡ã
+  end
+
+  def check_struct_tag kind
+    @type.check_struct_tag kind
+    # ParamDecl ã§ããã§ãã¯ãããã®ã§ãããã§ã¯ãã§ãã¯ããªã
+    # @paramlist.check_struct_tag kind
+  end
+
+  def check_init( locale, ident, initializer, kind, attribute = nil )
+    cdl_error2( locale, "T1028 $1: cannot initialize function pointer" , ident )
+    return
+  end
+
+  def set_type( type )
+    unless @type then
+      @type = type
+    else
+      @type.set_type( type )
+    end
+  end
+
+  #=== return type ãè¿ã
+  #
+  # return type ãè¿ã
+  # get_return_type ã¨ãã¹ãã ã£ã
+  def get_type
+    @type
+  end
+
+  def get_type_str
+    return @type.get_type_str
+  end
+
+  def get_type_str_post
+    # åã ããè¿ã (ä»®å¼æ°ã®ååãå«ããªã)
+    @paramlist.to_str( false )
+  end
+
+  def get_paramlist
+    @paramlist
+  end
+
+  def set_oneway( b_oneway )
+    @b_oneway = b_oneway
+
+    if ( ( @type.get_type_str != "ER" && @type.get_type_str != "void" ) || @type.get_type_str_post != "" ) then
+      cdl_error( "T1029 oneway function cannot return type \'$1$2\', \'void\' or \'ER\' is permitted" , @type.get_type_str, @type.get_type_str_post )
+    end
+
+    if @paramlist then
+      @paramlist.get_items.each{ |p|
+        if p.get_direction != :IN && p.get_direction != :SEND then
+          cdl_error( "T1030 oneway function cannot have $1 parameter for \'$2\'" , p.get_direction, p.get_name )
+        end
+      }
+    end
+  end
+
+  def is_oneway?
+    @b_oneway
+  end
+
+  #=== Push Pop Allocator ãå¿
+è¦ãï¼
+  # Transparent RPC ã®å ´å oneway ãã¤ in ã®é
+å(size_is, count_is, string ã®ããããã§ä¿®é£¾ï¼ããã
+  def need_PPAllocator?( b_opaque = false )
+    if @b_oneway || b_opaque then
+      return @paramlist.need_PPAllocator?( b_opaque )
+    else
+      return false
+    end
+  end
+
+  #=== ãã©ã¡ã¼ã¿ã in, inout, out, send, receive ãæã¤ã
+  def has_in?
+    @has_in
+  end
+  def has_inout?
+    @has_inout
+  end
+  def has_out?
+    @has_out
+  end
+  def has_send?
+    @has_send
+  end
+  def has_receive?
+    @has_receive
+  end
+
+  #=== å
+¥åæ¹åã®ãã©ã¡ã¼ã¿ãæã¤ã
+  def has_inward?
+    @has_in || @has_inout || @has_send
+  end
+  #=== åºåæ¹åã®ãã©ã¡ã¼ã¿ãæã¤ã
+  def has_outward?
+    @has_inout || @has_out || @has_receive
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    if @b_oneway then
+      puts "FunctType:  oneway=true #{locale_str}"
+    else
+      puts "FunctType:  oneway=false #{locale_str}"
+    end
+    super( indent + 1 )
+    if @paramlist then
+      @paramlist.show_tree( indent + 1 )
+    end
+    (indent+1).times { print "  " }
+    puts "return type:"
+    @type.show_tree( indent + 2 )
+  end
+end
+
+class ArrayType < Type
+#  @type:: element type :  ArrayType, FuncType, IntType, FloatType, ...
+#  @subscript:: Expression, nil if '[]'
+
+  include HasType
+
+  def initialize( subscript = nil )
+    super()
+    @subscript = subscript
+    initHasType
+  end
+
+  def set_type( type )
+    unless @type then
+      @type = type
+    else
+      @type.set_type( type )
+    end
+  end
+
+  #=== Array#qualifier(const, volatile) ã®è¨­å®
+  def set_qualifier( qualifier )
+    clone_type
+    @type.set_qualifier( qualifier )
+    super
+  end
+
+  # é
+åè¦ç´ ã const ãªã const
+  def is_const?
+    @type.is_const?
+  end
+
+  # é
+åè¦ç´ ã volatile ãªã volatile
+  def is_volatile?
+    @type.is_volatile?
+  end
+
+  def get_type
+    @type
+  end
+
+  def get_subscript
+    @subscript
+  end
+
+  def get_type_str
+    return "#{@type.get_type_str}"
+  end
+
+  def get_type_str_post
+    if @subscript
+      "[#{@subscript.eval_const(nil)}]#{@type.get_type_str_post}"
+    else
+      "[]#{@type.get_type_str_post}"
+    end
+    # "[#{@subscript.to_s}]#{@type.get_type_str_post}"
+  end
+
+  def check	# æå³çèª¤ããããã°ãæå­åãè¿ã
+    if @type.class == FuncType then		# é¢æ°ã®é
+å
+      return "array of function"
+    elsif @type.class == ArrayType then	# æ·»æ°ãªãé
+åã®é
+å
+      unless @type.get_subscript then
+        return "subscript not specified"
+      end
+    end
+
+    return @type.check    # é
+åè¦ç´ ã®åããã§ãã¯
+  end
+
+  def check_struct_tag kind
+    @type.check_struct_tag kind
+  end
+
+  def check_init( locale, ident, initializer, kind, attribute = nil )
+    if ( initializer.instance_of?( Array ) ) then
+      index = 0
+      initializer.each{ |i|
+        @type.check_init( locale, "#{ident}[#{index}]", i, kind, attribute = nil )
+        index += 1
+      }
+    else
+      cdl_error2( locale, "T1031 $1: unsuitable initializer for array" , ident )
+    end
+  end
+
+  def has_pointer?
+    @type.has_pointer?
+  end
+
+  def has_sized_pointer?
+    @type.has_sized_pointer?
+  end
+
+  def has_unsized_string?
+    @type.has_unsized_string?
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "ArrayType: #{locale_str}"
+    super( indent + 1 )
+    (indent+1).times { print "  " }
+    puts "type:"
+    @type.show_tree( indent + 2 )
+    (indent+1).times { print "  " }
+    puts "subscript:"
+    if @subscript then
+      @subscript.show_tree( indent + 2 )
+    else
+      (indent+2).times { print "  " }
+      puts "no subscript"
+    end
+  end
+end
+
+class PtrType < Type
+#  @type:: refer to : PtrType, FuncType, ArrayType, IntType, FloatType, ...
+#  @size:: Expr, or nil if not specified
+#  @count:: Expr, or nil if not specified
+#  @string:: Expr or -1(if size not specified) ï¼string å¼æ°ï¼, or nil if not specified
+
+  include HasType
+
+  def initialize( referto = nil )
+    super()
+    @type   = referto
+    @size   = nil
+    @count  = nil
+    @string = nil
+    initHasType
+  end
+
+  def set_type( type )
+    unless @type then
+      @type = type
+    else
+      @type.set_type( type )	# æå
+ã® type ãè¨­å®
+    end
+  end
+
+  def get_type_str
+    if @type.kind_of?( ArrayType ) || @type.kind_of?( FuncType ) then
+      parenthes = "("
+    else
+      parenthes = ""
+    end
+    return "#{@type.get_type_str}#{parenthes}*"
+  end
+
+  def get_type_str_post
+    if @type.kind_of?( ArrayType ) || @type.kind_of?( FuncType ) then
+      parenthes = ")"
+    else
+      parenthes = ""
+    end
+    "#{parenthes}#{@type.get_type_str_post}"
+  end
+
+  def check	# æå³çèª¤ããããã°ãæå­åãè¿ã
+    return nil if @type == nil
+    @type.check
+  end
+
+  def check_struct_tag kind
+    if kind != :MEMBER  # æ§é ä½ã¡ã³ãã¼ã®å ´åããã¤ã³ã¿ã®å
+ã®æ§é ä½ã¿ã°ããã§ãã¯ããªã
+      @type.check_struct_tag kind
+    end
+  end
+
+  def check_init( locale, ident, initializer, kind, attribute = nil )
+    if ( initializer.instance_of?( Expression ) ) then
+      val = initializer.eval_const2( nil, attribute )
+      if val.kind_of? PointerVal then
+        type = val.get_type  # PtrType
+        t1 = self
+        t2 = type
+        while( t1.kind_of?( PtrType ) && t2.kind_of?( PtrType ) )
+          t1 = t1.get_type
+          t2 = t2.get_type
+          if ( t1.class == t2.class ) && ( t1.get_bit_size == t2.get_bit_size ) then
+          elsif ( t1.kind_of?( CDefinedType) || t2.kind_of?( CDefinedType ) )&& t1.get_type_str == t2.get_type_str && t1.get_type_str_post && t2.get_type_str_post then
+            # int8_t ãªã©ããä¸æ¹ã¯ .h ã«å®ç¾©ããã¦ããã±ã¼ã¹
+          else
+            cdl_error2( locale, "T1032 $1: incompatible pointer type" , ident )
+            break
+          end
+        end
+      elsif val.kind_of? IntegerVal then
+        if val.to_i != 0 then
+          cdl_error2( locale, "T1033 $1: need cast to assign integer to pointer" , ident )
+        end
+      elsif val.kind_of? StringVal then
+        # æå­åå®æ°
+        # mikan L"wide string"
+        if @type.get_bit_size != -1 && @type.get_bit_size != -11 then  # -1: char_t
+          cdl_error2( locale, "T1034 $1: unsuitable string constant" , ident )
+        end
+      elsif ( val.instance_of?( Array ) ) then
+        i = 0
+        val.each { |ini|
+          @type.check_init( locale, "#{ident}[#{i}]", ini, kind, attribute = nil )
+          i += 1
+        }
+      elsif val.instance_of?( C_EXP ) then
+
+      else
+        cdl_error2( locale, "T1035 $1: unsuitable initializer for pointer" , ident )
+      end
+    elsif ( initializer.instance_of?( Array ) ) then
+      if @size == nil && @count == nil then
+        cdl_error2( locale, "T9999 $1: non-size_is pointer cannot have array initializer", ident )
+      end
+
+      i = 0
+      initializer.each { |ini|
+        @type.check_init( locale, "#{ident}[#{i}]", ini, kind, attribute = nil )
+        i += 1
+      }
+    elsif( initializer.instance_of?( C_EXP ) ) then
+
+    else
+      cdl_error2( locale, "T1036 $1: unsuitable initializer for pointer" , ident )
+    end
+  end
+
+  def get_referto
+    clone_type
+    @type
+  end
+
+  def set_scs( size, count, string, max, b_nullable )
+    @size = size
+    @count = count
+    @max = max
+    @b_nullable = b_nullable
+
+    # string ã¯æãå·¦å´ã® ptr ã«ä½ç¨ãã
+    if @type.kind_of?( PtrType ) then
+      # ptr_level ã 2 ä»¥ä¸ã§ãããã¨ã¯ ParamDecl#initializer ã§ãã§ãã¯ããã
+      clone_type
+      @type.set_scs( nil, nil, string, nil, false )
+    elsif @type.kind_of?( VoidType ) && ( size || count || string ) then
+      str = ""
+      if size then
+        str = "size_is"
+      end
+      if count then
+        if str then
+          str += ", "
+        end
+        str += "count_is"
+      end
+      if string then
+        if str then
+          str += ", "
+        end
+        str += "string"
+      end
+
+      cdl_error( "T1040 $1 specified for void pointer type", str )
+    else
+      @string = string
+    end
+
+    if (@size != nil) && (@b_nullable != false) then
+      cdl_error( "T9999 size_is & nullable cannot be specified simultaneously. If size is zero, pointer must be null")
+    end
+  end
+
+  def clear_max
+    @max = nil
+  end
+
+  def get_size
+    @size
+  end
+
+  def get_count
+    @count
+  end
+
+  def get_string
+    @string
+  end
+
+  #=== PtrType# size_is ã®æå¤§å¤
+  def get_max
+    @max
+  end
+
+  def is_nullable?
+    return @b_nullable
+  end
+
+  def get_type
+    clone_type
+    @type
+  end
+
+  def has_pointer?
+    true
+  end
+
+  def has_sized_pointer?
+    @size != nil || @count != nil || @string.instance_of?( Expression ) || @type.has_sized_pointer?
+  end
+
+  def has_unsized_string?
+    @string == -1 || @type.has_unsized_string?
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "PtrType: qualifier=#{@qualifier}, nullable=#{@b_nullable} #{locale_str}"
+    super( indent + 1 )
+    (indent+1).times { print "  " }
+    if @size then
+      print "size=#{@size.to_s}, "
+    else
+      print "size=nil, "
+    end
+    if @max then
+      print "max=#{@size.to_s}, "
+    else
+      print "max=nil, "
+    end
+    if @count then
+      print "count=#{@count.to_s}, "
+    else
+      print "count=nil, "
+    end
+    if @string then
+      if @string.instance_of?( Expression ) then
+        print "string=#{@string.to_s}\n"
+      else
+        print "string=yes\n"
+      end
+    else
+      print "string=nil\n"
+    end
+
+    (indent+1).times { print "  " }
+    puts "type:"
+    @type.show_tree( indent + 2 )
+  end
+
+end
+
+#==  DescriptorType ã¯ã©ã¹
+# åççµåã§æ¸¡ããã¹ã¯ãªãã¿å
+class DescriptorType < Type
+# @sinagure_nsp::NamespacePath
+
+  def initialize( signature_nsp )
+    @signature_nsp = signature_nsp
+    obj = Namespace.find signature_nsp
+    if ! obj.kind_of? Signature then
+      cdl_error( "T9999 '$1': not signature or not found", signature_nsp.to_s )
+    else
+      if obj.has_descriptor? then
+        cdl_error( "T9999 '$1': has Desicrptor in function parameter", signature_nsp.to_s )
+      end
+    end
+  end
+
+  def get_type_str
+    "Descriptor( #{@signature_nsp.to_s} )"
+  end
+
+  def get_type_str_post
+    ""
+  end
+
+  def set_qualifier( qualifier )
+    cdl_error( "T9999 '$1' cannot be specified for Descriptor", qualfier.to_s )
+  end
+
+  def check
+  end
+
+  def check_init( locale, ident, initializer, kind, attribute = nil )
+    case kind
+    when :PARAMETER
+      # å¼æ°ã¯åæåã§ããªã
+    else
+      cdl_error2( locale, "T9999 Descriptor cannot be used for $1", kind)
+    end
+  end
+
+  #== DescriptorType#
+  # æå³è§£ææ®µéã§ã¯ nil ãè¿ãããå¯è½æ§ã«æ³¨æ
+  def get_signature
+    Namespace.find @signature_nsp
+  end
+end
+
+# ä»¥ä¸åä½ãã¹ãã³ã¼ã
+if $unit_test then
+  puts( "===== Unit Test: IntType ===== (types.rb)")
+  sizes = [ 8, 16, 32, 64 ]
+  sizes.each{ |n|
+    int = IntType.new n
+    printf( "%8s  max: %d  min:%d\n", "int#{n}_t", int.get_max, int.get_min )
+  }
+  puts ""
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/value.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/value.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/core/value.rb	(revision 270)
@@ -0,0 +1,602 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: value.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+#= BaseVal æ´æ°ãæµ®åå°æ°ãªã©ã®å¤ãæ±ãã¯ã©ã¹ã®åºåºã¯ã©ã¹
+#
+# TECS ã® CDL ã§æ±ãå¤ã¯ãä»¥ä¸ã«åé¡ããã
+# ã»æ´æ°
+# ã»æµ®åå°æ°
+# ã»æå­å
+# ã»ãã¼ã«å¤
+# éæåï¼æ§é ä½ãé
+åï¼ã¨ C_EXP ã¯ããã§ã¯æ±ããªã
+#
+# ãã®ã¯ã©ã¹ã§å®ç¾©æ¸ã¿ã®æ¼ç®å­ã¯ãã¨ã©ã¼ã¨ãªã
+# åã«ããæ¼ç®å¯è½ãªå ´åãæ¼ç®å­ããªã¼ãã¼ã©ã¤ããã
+#
+class BaseVal < Node
+  def ~@
+    unsupport "~"
+  end
+  def -@
+    unsupport "unary -"
+  end
+  def +@
+    unsupport "unary +"
+  end
+  def not # ! val
+    unsupport "!"
+  end
+
+  def * val
+    unsupport "*"
+  end
+  def / val
+    unsupport "/"
+  end
+  def % val
+    unsupport "%"
+  end
+  def + val
+    unsupport "+"
+  end
+  def - val
+    unsupport "-"
+  end
+  def << val
+    unsupport "<<"
+  end
+  def >> val
+    unsupport ">>"
+  end
+  def > val
+    unsupport ">"
+  end
+  def < val
+    unsupport "<"
+  end
+  def >= val
+    unsupport ">="
+  end
+  def <= val
+    unsupport "<="
+  end
+  def eq val # == val
+    unsupport "=="
+  end
+  def neq val # != val
+    unsupport "!="
+  end
+  def & val
+    unsupport "&"
+  end
+  def ^ val
+    unsupport "^"
+  end
+  def | val
+    unsupport "|"
+  end
+  def lAND val  # && val
+    unsupport "&&"
+  end
+  def lOR val   # || val
+    unsupport "||"
+  end
+  def cast( type )
+    unsupport "CAST"
+  end
+
+  def unsupport op
+    cdl_error( "V1001 $1: unable for $2" , op, self.class )
+  end
+
+  def to_s
+    raise "to_s not overridden"
+  end
+
+  def to_b
+    cdl_error( "V1002 $1: cannot cast to bool (implicitly)" , self.class )
+    false
+  end
+  def to_i
+    cdl_error( "V1003 $1: cannot cast to integer (implicitly)" , self.class )
+    1
+  end
+  def to_f
+    cdl_error( "V1004 $1: cannot cast to float (implicitly)" , self.class )
+    1.0
+  end
+end
+
+#= Pointer å¤ (IntegerVal ã® Pointer ç)
+#
+# ãã¤ã³ã¿å¤ã¯ãCDL ã§ç´æ¥çæããããã¨ã¯ãªã
+# æ´æ°å¤ã®ã­ã£ã¹ãæ¼ç®ã«ããçæããã
+class PointerVal < BaseVal
+#@int_val:: IntegerVal: IntegerVal ã§ãªãã¦ã¯ãªããªã
+#@ptr_type:: PtrType: ãã¤ã³ã¿ã®æãå
+ã®å
+
+  def initialize( int_val, ptr_type )
+    super()
+    @int_val = int_val
+    @ptr_type = ptr_type
+  end
+
+  #=== ãã¤ã³ã¿ã®æãå
+ã®åãå¾ã
+  # PointerVal å°ç¨ã®ã¡ã½ãã
+  def get_type
+    @ptr_type
+  end
+
+  def cast type
+    t = type.get_original_type   # typedef ã®å
+ãå¾ã
+    if t.kind_of? IntType then
+      val = t.check_and_clip( @int_val, :IntType )
+      return IntegerVal.new( val )
+    elsif t.kind_of? FloatType then
+      cdl_error( "V1005 Cannot cast pointer to float"  )
+      return FloatVal.new( @int_val )
+    elsif t.kind_of? PtrType then
+      return PointerVal.new( @int_val, type )
+    else
+      cdl_error( "V1006 pointer value cannot cast to $1" , type.class )
+      return nil
+    end
+  end
+
+  def to_s
+    "(#{@ptr_type.get_type_str}#{@ptr_type.get_type_str_post})#{sprintf("0x%X", @int_val)}"
+  end
+
+  def to_b
+    cdl_error( "V1007 convert pointer value to bool"  )
+    false
+  end
+  def to_i
+    cdl_error( "V1008 convert pointer value to integer without cast"  )
+    @val.to_i
+  end
+end
+
+#= IntegerVal: æ´æ°å¤ãæ±ãã¯ã©ã¹
+class IntegerVal < BaseVal
+#@val:: Integer: value
+#@str:: string: literal
+#@sign:: Symbol: :SIGNED | :UNSIGNED
+#@size:: Symbol: :NORMAL | :SHORT | :LONG | :LONGLONG
+
+  def initialize( val, str = nil, sign = :SIGNED, size = :NORMAL )
+    super()
+    @val = val.to_i
+    @str = str
+    @sign = sign
+    @size = size
+  end
+
+  def ~@
+    IntegerVal.new( ~ @val )
+  end
+  def -@
+    IntegerVal.new( - @val )
+  end
+  def +@
+    self
+  end
+  def not # !
+      BoolVal.new( self.to_b )
+  end
+
+  def * val
+    if val.kind_of? FloatVal then
+      return FloatVal.new( @val.to_f * val.to_f )
+    else
+      return IntegerVal.new( @val * val.to_i )
+    end
+  end
+  def / val
+    if val.kind_of? FloatVal then
+      v2 = val.to_f   # to_f ã2åè©ä¾¡ããªã
+      if v2 == 0.0 then
+        cdl_error( "V1009 / : divieded by zero"  )
+        return FloatVal.new( 1.0 )
+      end
+      return FloatVal.new( @val.to_f / v2 )
+    else
+      v2 = val.to_i   # to_i ã2åè©ä¾¡ããªã
+      if v2 == 0 then
+        cdl_error( "V1010 / : divieded by zero"  )
+        return IntegerVal.new( 1 )
+      end
+      return IntegerVal.new( @val / v2 )
+    end
+  end
+  def % val
+    if val.kind_of? FloatVal then
+      v2 = val.to_f   # to_f ã2åè©ä¾¡ããªã
+      if v2 == 0.0 then
+        cdl_error( "V1011 % : divieded by zero"  )
+        return FloatVal.new( 1.0 )
+      end
+      return FloatVal.new( @val.to_f % v2 )
+    else
+      v2 = val.to_i   # to_i ã2åè©ä¾¡ããªã
+      if v2 == 0 then
+        cdl_error( "V1012 % : divieded by zero"  )
+        return IntegerVal.new( 1 )
+      end
+      return IntegerVal.new( @val % v2 )
+    end
+  end
+  def + val
+    if val.kind_of? FloatVal then
+      return FloatVal.new( @val.to_f + val.to_f )
+    else
+      return IntegerVal.new( @val + val.to_i )
+    end
+  end
+  def - val
+    if val.kind_of? FloatVal then
+      return FloatVal.new( @val.to_f - val.to_f )
+    else
+      return IntegerVal.new( @val - val.to_i )
+    end
+  end
+  def << val
+    return IntegerVal.new( @val << val.to_i )
+  end
+  def >> val
+    return IntegerVal.new( @val >> val.to_i )
+  end
+  def > val
+    if val.kind_of? FloatVal then
+      return BoolVal.new( @val.to_f > val.to_f )
+    else
+      return BoolVal.new( @val > val.to_i )
+    end
+  end
+  def < val
+    if val.kind_of? FloatVal then
+      return BoolVal.new( @val.to_f < val.to_f )
+    else
+      return BoolVal.new( @val < val.to_i )
+    end
+  end
+  def >= val
+    if val.kind_of? FloatVal then
+      return BoolVal.new( @val.to_f >= val.to_f )
+    else
+      return BoolVal.new( @val >= val.to_i )
+    end
+  end
+  def <= val
+    if val.kind_of? FloatVal then
+      return BoolVal.new( @val.to_f <= val.to_f )
+    else
+      return BoolVal.new( @val <= val.to_i )
+    end
+  end
+  def eq val # == val
+    if val.kind_of? FloatVal then
+      return BoolVal.new( @val.to_f == val.to_f )
+    else
+      return BoolVal.new( @val == val.to_i )
+    end
+  end
+  def neq val # != val
+    if val.kind_of? FloatVal then
+      return BoolVal.new( @val.to_f != val.to_f )
+    else
+      return BoolVal.new( @val != val.to_i )
+    end
+  end
+  def & val
+    IntegerVal.new( @val & val.to_i )
+  end
+  def ^ val
+    IntegerVal.new( @val ^ val.to_i )
+  end
+  def | val
+    IntegerVal.new( @val | val.to_i )
+  end
+  def lAND val  # && val
+    BoolVal.new( self.to_b && val.to_b )
+  end
+  def lOR val   # || val
+    BoolVal.new( self.to_b || val.to_b )
+  end
+  def cast( type )
+    t = type.get_original_type   # typedef ã®å
+ãå¾ã
+    if t.kind_of? IntType then
+      val = t.check_and_clip( @val, :IntType )
+      return IntegerVal.new( val )
+    elsif t.kind_of? FloatType then
+      return FloatVal.new( @val )
+    elsif t.kind_of? PtrType then
+      return PointerVal.new( @val, type )
+    elsif t.kind_of? BoolType then
+      return BoolVal.new( @val.to_b )
+    else
+      cdl_error( "V1013 integer value cannot cast to $1" , type.class )
+      return nil
+    end
+  end
+
+  def to_s
+    if @str then
+      @str
+    else
+      @val.to_s
+    end
+  end
+  def to_b
+    @val != 0
+  end
+  def to_i
+    @val
+  end
+  def to_f
+    @val.to_f
+  end
+end
+
+#= BoolVal: bool å¤ãæ±ãã¯ã©ã¹
+class BoolVal < BaseVal
+#@val:: bool: true, false
+
+  def initialize( val )
+    super()
+    if val == true || val == false
+      @val = val
+    elsif val.to_i != 0
+      @val = true
+    else
+      @val = false
+    end
+    # raise "No boolean val" if val != true && val != false
+  end
+
+  def not # ! val
+      BoolVal.new( ! @val )
+  end
+  def eq val # == val
+    if val.kind_of? BoolVal then
+      return BoolVal.new( self.to_i == val.to_i )
+    else
+      cdl_error( "V1014 comparing bool value with \'$1\'" , val.class )
+      return BoolVal.new( false )
+    end
+  end
+  def neq val # != val
+    if val.kind_of? BoolVal then
+      return BoolVal.new( self.to_i != val.to_i )
+    else
+      cdl_error( "V1015 comparing bool value with \'$1\'" , val.class )
+      return BoolVal.new( false )
+    end
+  end
+  def lAND val  # && val
+    BoolVal.new( self.to_b && val.to_b )
+  end
+  def lOR val   # || val
+    BoolVal.new( self.to_b || val.to_b )
+  end
+  def cast( type )
+    t = type.get_original_type   # typedef ã®å
+ãå¾ã
+    if @val then
+      val = 1
+    else
+      val = 0
+    end
+    if t.kind_of? IntType then
+      return IntegerVal.new( val )
+    elsif t.kind_of? FloatType then
+      return FloatVal.new( val )
+    elsif t.kind_of? BoolType then
+      return self
+    else
+      cdl_error( "V1016 bool value cannot cast to $1" , type.class )
+      return nil
+    end
+  end
+
+  def to_s
+    if @val
+      return "true"
+    else
+      return "false"
+    end
+  end
+  def to_b
+    @val
+  end
+  def to_i
+    return 0 if @val == false
+    return 1
+  end
+  def to_f
+    return 0.0 if @val == false
+    return 1.0
+  end
+
+  attr_reader :val
+end
+
+#= FloatVal: å®æ°å¤ãæ±ãã¯ã©ã¹
+class FloatVal < BaseVal
+#@val:: Float
+  def initialize( val )
+    super()
+    @val = val.to_f
+  end
+
+  def -@
+    FloatVal.new( - @val )
+  end
+  def +@
+    self
+  end
+  def * val
+    FloatVal.new( @val * val.to_f )
+  end
+  def / val
+    v2 = val.to_f   # to_f ã2åè©ä¾¡ããªã
+    if v2 == 0.0 then
+      cdl_error( "V1017 / : divieded by zero"  )
+      return FloatVal.new( 1.0 )
+    end
+    return FloatVal.new( @val.to_f / v2 )
+  end
+  def % val
+    v2 = val.to_f   # to_f ã2åè©ä¾¡ããªã
+    if v2 == 0.0 then
+      cdl_error( "V1018 % : divieded by zero"  )
+      return FloatVal.new( 1.0 )
+    end
+    return FloatVal.new( @val.to_f % v2 )
+  end
+  def + val
+    FloatVal.new( @val + val.to_f )
+  end
+  def - val
+    FloatVal.new( @val - val.to_f )
+  end
+  def > val
+    BoolVal.new( @val > val.to_f )
+  end
+  def < val
+    BoolVal.new( @val < val.to_f )
+  end
+  def >= val
+    BoolVal.new( @val >= val.to_f )
+  end
+  def <= val
+    BoolVal.new( @val <= val.to_f )
+  end
+  def eq val # == val
+    BoolVal.new( @val == val.to_f )
+  end
+  def neq val # != val
+    BoolVal.new( @val != val.to_f )
+  end
+  def cast( type )
+    t = type.get_original_type   # typedef ã®å
+ãå¾ã
+    if t.kind_of? IntType then
+      val = t.check_and_clip( @val, :FloatType )
+      return IntegerVal.new( val )
+    elsif t.kind_of? FloatType then
+      return self
+    else
+      cdl_error( "V1019 floating value cannot cast to $1" , type )
+      return self
+    end
+  end
+
+  def to_b
+    cdl_error( "V1020 convert floating value to bool without cast"  )
+    @val.to_i
+  end
+  def to_i
+    cdl_error( "V1021 convert floating value to integer without cast"  )
+    @val.to_i
+  end
+  def to_s
+    @val.to_s
+  end
+  def to_f
+    @val
+  end
+end
+
+#= æå­åãªãã©ã«ãæ±ãã¯ã©ã¹
+class StringVal < BaseVal
+#@str:: Token:
+#@specifier:: Symbol: :WIDE, :NORMAL
+
+  def initialize( str, spec = :NORMAL )
+    super()
+    @str = str
+    @specifier = spec   # mikan L"str" wide æå­åæªå¯¾å¿
+  end
+
+  #===
+  #
+  # string ã® cast ã¯ã§ããªã mikan ãã¤ã³ã¿åã¸ã® cast ã¯ã§ããã¹ã
+  def cast type
+    t = type.get_original_type   # typedef ã®å
+ãå¾ã
+    if t.kind_of? IntType then
+      cdl_error( "V1022 string cannot cast to integer"  )
+    elsif t.kind_of? FloatType then
+      cdl_error( "V1023 string cannot cast to float"  )
+    elsif t.kind_of? PtrType then
+      cdl_error( "V1024 string cannot cast to pointer"  )
+    else
+      cdl_error( "V1025 string cannot cast to $1" , type )
+    end
+  end
+    
+  def to_s
+    @str.to_s
+  end
+
+  def val
+    @str.to_s   # Token ã§æ±ããã¦ããåæ® (val ãåãåºã)
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_console_en_US.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_console_en_US.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_console_en_US.rb	(revision 270)
@@ -0,0 +1,1185 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: messages_console_en_US.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+
+# Console Messages for en_US 
+class TECSMsg
+
+###
+# ã¨ã©ã¼ã¡ãã»ã¼ã¸
+@@error_message = {}
+
+### C_parser.y.rb
+# B1001 need parameter name"
+@@error_message[ :"B1001" ] = "need parameter name"
+
+# B1002 while open or reading \'$1\'"
+@@error_message[ :"B1002" ] = "while open or reading \'$1\'"
+
+# B1003 Unexpected EOF"
+@@error_message[ :"B1003" ] = "Unexpected EOF"
+
+# B1004 syntax error near \'$1\'"
+@@error_message[ :"B1004" ] = "syntax error near \'$1\'"
+
+### ctypes.rb
+# C1001 $1: mismatch, suitable for integer types"
+@@error_message[ :"C1001" ] = "$1: mismatch, suitable for integer types"
+
+# C1002 $1 not compatible with previous one $2"
+@@error_message[ :"C1002" ] = "$1 not compatible with previous one $2"
+
+# C1003 $1 & $2 incompatible  (\'long double\' not support)"
+@@error_message[ :"C1003" ] = "$1 & $2 incompatible  (\'long double\' not support)"
+
+# C1004 $1: qualifier respecified. previous one: $2"
+@@error_message[ :"C1004" ] = "$1: qualifier respecified. previous one: $2"
+
+### expression.rb
+# E1001 $1: not found"
+@@error_message[ :"E1001" ] = "$1: not found"
+
+# E1002 $1: not constant (port)"
+@@error_message[ :"E1002" ] = "$1: not constant (port)"
+
+# E1003 $1: not constant"
+@@error_message[ :"E1003" ] = "$1: not constant"
+
+# E1004 cannot evaluate \'[]\' operator"
+@@error_message[ :"E1004" ] = "cannot evaluate \'[]\' operator"
+
+# E1005 cannot evaluate \'.\' operator"
+@@error_message[ :"E1005" ] = "cannot evaluate \'.\' operator"
+
+# E1006 cannot evaluate \'->\' operator"
+@@error_message[ :"E1006" ] = "cannot evaluate \'->\' operator"
+
+# E1007 cannot evaluate \'sizeof\' operator"
+@@error_message[ :"E1007" ] = "cannot evaluate \'sizeof\' operator"
+
+# E1008 cannot evaluate \'sizeof\' operator"
+@@error_message[ :"E1008" ] = "cannot evaluate \'sizeof\' operator"
+
+# E1009 cannot evaluate \'&\' operator"
+@@error_message[ :"E1009" ] = "cannot evaluate \'&\' operator"
+
+# E1010 cannot evaluate \'*\' operator"
+@@error_message[ :"E1010" ] = "cannot evaluate \'*\' operator"
+
+# E1011 cannot evaluate unary + for $1"
+@@error_message[ :"E1011" ] = "cannot evaluate unary + for $1"
+
+# E1012 $1: not found in parameter list"
+@@error_message[ :"E1012" ] = "$1: not found in parameter list"
+
+# E1013 \'*\': operand is not pointer value"
+@@error_message[ :"E1013" ] = "\'*\': operand is not pointer value"
+
+# E1014 $1: elements_get_type: sorry not supported"
+@@error_message[ :"E1014" ] = "$1: elements_get_type: sorry not supported"
+
+# E1015 \'$1\': direction mismatch for $2, $3 required"
+@@error_message[ :"E1015" ] = "\'$1\': direction mismatch for $2, $3 required"
+
+# E1016 $1: elements_check_dir_for_param: sorry not supported"
+@@error_message[ :"E1016" ] = "$1: elements_check_dir_for_param: sorry not supported"
+
+# E1017 $1: rhs not \'Cell.ePort\' form"
+@@error_message[ :"E1017" ] = "$1: rhs not \'Cell.ePort\' form"
+
+# E1018 $1: namespace cannot be specified"
+@@error_message[ :"E1018" ] = "$1: namespace cannot be specified"
+
+# E1019 $1: rhs not in 'allocator_entry_port' form"
+@@error_message[ :"E1019" ] = "$1: rhs not in 'allocator_entry_port' form"
+
+# E1020 rhs not in 'call_port.func.param' form for $1_$2"
+@@error_message[ :"E1020" ] = "rhs not in 'call_port.func.param' form for $1_$2"
+
+### bnf.y.rb
+# G1001 need specifier for \'$1\'"
+@@error_message[ :"G1001" ] = "need specifier for \'$1\'"
+
+# G1002 need parameter name"
+@@error_message[ :"G1002" ] = "need parameter name"
+
+# G1003 need parameter name"
+@@error_message[ :"G1003" ] = "need parameter name"
+
+# G1004 impossible array type 0"
+@@error_message[ :"G1004" ] = "impossible array type 0"
+
+# G1005 impossible array type 1"
+@@error_message[ :"G1005" ] = "impossible array type 1"
+
+# G1006 impossible array type 2"
+@@error_message[ :"G1006" ] = "impossible array type 2"
+
+# G1007 impossible array type 3"
+@@error_message[ :"G1007" ] = "impossible array type 3"
+
+# G1008 impossible function type"
+@@error_message[ :"G1008" ] = "impossible function type"
+
+# G1009 unexpected specifier"
+@@error_message[ :"G1009" ] = "unexpected specifier"
+
+# G1010 Not function"
+@@error_message[ :"G1010" ] = "Not function"
+
+# G1011 Not function"
+@@error_message[ :"G1011" ] = "Not function"
+
+# G1012 $1 : cannot put specifier here"
+@@error_message[ :"G1012" ] = "$1 : cannot put specifier here"
+
+# G1013 unexpected specifier"
+@@error_message[ :"G1013" ] = "unexpected specifier"
+
+# G1014 while open or reading \'$1\'"
+@@error_message[ :"G1014" ] = "while open or reading \'$1\'"
+
+# G1015 Unexpected EOF"
+@@error_message[ :"G1015" ] = "Unexpected EOF"
+
+# G1016 syntax error near \'$1\'"
+@@error_message[ :"G1016" ] = "syntax error near \'$1\'"
+
+### plugin.rb
+# P1001 plugin arg: cannot find identifier in $1"
+@@error_message[ :"P1001" ] = "plugin arg: cannot find identifier in $1"
+
+# P1002 plugin arg: expecting \'=\' not \'$1\'"
+@@error_message[ :"P1002" ] = "plugin arg: expecting \'=\' not \'$1\'"
+
+# P1003 plugin arg: unexpected $1"
+@@error_message[ :"P1003" ] = "plugin arg: unexpected $1"
+
+# P1004 $1: unknown plugin argument\'s identifier\n  $2 are acceptable for RPCPlugin."
+@@error_message[ :"P1004" ] = "$1: unknown plugin argument\'s identifier\n  $2 are acceptable for RPCPlugin."
+
+### pluginModule.rb
+# P2001 $1.rb : fail to load plugin"
+@@error_message[ :"P2001" ] = "$1.rb : fail to load plugin"
+
+# P2002 $1: not kind of $2"
+@@error_message[ :"P2002" ] = "$1: not kind of $2"
+
+# P2003 $1: load failed"
+@@error_message[ :"P2003" ] = "$1: load failed"
+
+# P2004 $1: open error \'$2\'"
+@@error_message[ :"P2004" ] = "$1: open error \'$2\'"
+
+# P2005 $1: plugin error in gen_through_cell_code "
+@@error_message[ :"P2005" ] = "$1: plugin error in gen_through_cell_code "
+
+# P2006 $1: close error \'$2\'"
+@@error_message[ :"P2006" ] = "$1: close error \'$2\'"
+
+# P2007 $1: fail to generate post code"
+@@error_message[ :"P2007" ] = "$1: fail to generate post code"
+
+### componentobj.rb
+# S1001 context specifier duplicate"
+@@error_message[ :"S1001" ] = "context specifier duplicate"
+
+# S1002 \'$1\': unknown specifier for signature"
+@@error_message[ :"S1002" ] = "\'$1\': unknown specifier for signature"
+
+# S1003 $1: \'alloc\' 1st parameter neither [in] integer type nor [out] double pointer type
+@@error_message[ :"S1003" ] = "$1: \'alloc\' 1st parameter neither [in] integer type nor [out] double pointer type"
+
+# S1004 $1: \'alloc\' 2nd parameter not [in] double pointer"
+@@error_message[ :"S1004" ] = "$1: \'alloc\' 2nd parameter not [in] double pointer"
+
+# S1005 $1: \'alloc\' has no parameter, unsuitable for allocator signature"
+@@error_message[ :"S1005" ] = "$1: \'alloc\' has no parameter, unsuitable for allocator signature"
+
+# S1006 $1: \'dealloc\' 1st parameter not [in] pointer type"
+@@error_message[ :"S1006" ] = "$1: \'dealloc\' 1st parameter not [in] pointer type"
+
+# S1007 "
+     # S1007 $1: \'dealloc\' cannot has 2nd parameter"
+# @@error_message[ :"S1007" ] = "$1: \'dealloc\' cannot has 2nd parameter"
+
+# S1008 $1: \'dealloc\' has no parameter, unsuitable for allocator signature"
+@@error_message[ :"S1008" ] = "$1: \'dealloc\' has no parameter, unsuitable for allocator signature"
+
+# S1009 $1: \'alloc\' function not found, unsuitable for allocator signature"
+@@error_message[ :"S1009" ] = "$1: \'alloc\' function not found, unsuitable for allocator signature"
+
+# S1010 $1: \'dealloc\' function not found, unsuitable for allocator signature"
+@@error_message[ :"S1010" ] = "$1: \'dealloc\' function not found, unsuitable for allocator signature"
+
+# S1011 $1: size_is specified for non-pointer type"
+@@error_message[ :"S1011" ] = "$1: size_is specified for non-pointer type"
+
+# S1012 $1: unsuitable initializer, need array initializer"
+@@error_message[ :"S1012" ] = "$1: unsuitable initializer, need array initializer"
+
+# S1013 $1: too many initializer, $2 for $3"
+@@error_message[ :"S1013" ] = "$1: too many initializer, $2 for $3"
+
+# S1014 generate specifier duplicate"
+@@error_message[ :"S1014" ] = "generate specifier duplicate"
+
+# S1015 $1 cannot be specified for composite"
+@@error_message[ :"S1015" ] = "$1 cannot be specified for composite"
+
+# S1016 $1 not found"
+@@error_message[ :"S1016" ] = "$1 not found"
+
+# S1017 $1 : neither celltype nor cell"
+@@error_message[ :"S1017" ] = "$1 : neither celltype nor cell"
+
+# S1018 $1 : not singleton cell"
+@@error_message[ :"S1018" ] = "$1 : not singleton cell"
+
+# S1019 \'$1\' : not entry port"
+@@error_message[ :"S1019" ] = "\'$1\' : not entry port"
+
+# S1020 \'$1\' : required port cannot be array"
+@@error_message[ :"S1020" ] = "\'$1\' : required port cannot be array"
+
+# S1021 $1 : require cannot have same signature with \'$2\'"
+@@error_message[ :"S1021" ] = "$1 : require cannot have same signature with \'$2\'"
+
+# S1022 $1.$2 : \'$3\' conflict function name in $4.$5"
+@@error_message[ :"S1022" ] = "$1.$2 : \'$3\' conflict function name in $4.$5"
+
+# S1023 $1: fail to new"
+@@error_message[ :"S1023" ] = "$1: fail to new"
+
+# S1024 $1: multiple cell for singleton celltype"
+@@error_message[ :"S1024" ] = "$1: multiple cell for singleton celltype"
+
+# S1025 not found reachable cell for require \'$1\' in celltype \'$2\'"
+@@error_message[ :"S1025" ] = "not found reachable cell for require \'$1\' in celltype \'$2\'"
+
+# S1026 required cell \'$1\' not reachable"
+@@error_message[ :"S1026" ] = "required cell \'$1\' not reachable"
+
+# S1027 \'$1\' celltype not found"
+@@error_message[ :"S1027" ] = "\'$1\' celltype not found"
+
+# S1028 \'$1\' not celltype"
+@@error_message[ :"S1028" ] = "\'$1\' not celltype"
+
+# S1029 $1 mismatch with previous one"
+@@error_message[ :"S1029" ] = "$1 mismatch with previous one"
+
+# S1030 $1: celltype mismatch with previous one"
+@@error_message[ :"S1030" ] = "$1: celltype mismatch with previous one"
+
+# S1031 $1 region \'$2\' mismatch  with previous one \'$3\'"
+@@error_message[ :"S1031" ] = "$1 region \'$2\' mismatch  with previous one \'$3\'"
+
+# S1032 $1: duplicate cell"
+@@error_message[ :"S1032" ] = "$1: duplicate cell"
+
+# S1033 rhs expression is not supported. Only attribute is permitted on current version."
+@@error_message[ :"S1033" ] = "rhs expression is not supported. Only attribute is permitted on current version."
+
+# S1034 $1 : cannot refer to $2\'s attribute here. Use \'composite.$3\' to refer to composite celltype\'s"
+@@error_message[ :"S1034" ] = "$1 : cannot refer to $2\'s attribute here. Use \'composite.$3\' to refer to composite celltype\'s"
+
+# S1035 composite : cannot specify out of composite celltype definition"
+@@error_message[ :"S1035" ] = "composite : cannot specify out of composite celltype definition"
+
+# S1036 $1 : cannot refer to $2\'s here. Use \'composite.$3\' to refer to composite celltype\'s"
+@@error_message[ :"S1036" ] = "$1 : cannot refer to $2\'s here. Use \'composite.$3\' to refer to composite celltype\'s"
+
+# S1037 $1: celltype plugin fail to new_cell"
+@@error_message[ :"S1037" ] = "$1: celltype plugin fail to new_cell"
+
+# S1038 $1.$2: self allocator not supported for array entry port"
+@@error_message[ :"S1038" ] = "$1.$2: self allocator not supported for array entry port"
+
+# S1039 \'$1\': unknown specifier for cell"
+@@error_message[ :"S1039" ] = "\'$1\': unknown specifier for cell"
+
+# S1040 array not supported for relay allocator"
+@@error_message[ :"S1040" ] = "array not supported for relay allocator"
+
+# S1041 \'$1_$2_$3\': not joined. cannot create internal join for relay allocator"
+@@error_message[ :"S1041" ] = "\'$1_$2_$3\': not joined. cannot create internal join for relay allocator"
+
+# S1042 call port \'$1\' not initialized in cell \'$2\'"
+@@error_message[ :"S1042" ] = "call port \'$1\' not initialized in cell \'$2\'"
+
+# S1043 call port \'$1\' not initialized in cell \'$2\'. this call port is created by tecsgen. check allocator specifier"
+@@error_message[ :"S1043" ] = "call port \'$1\' not initialized in cell \'$2\'. this call port is created by tecsgen. check allocator specifier"
+
+# S1044 $1: array initializer too many or few, $2 for $3"
+@@error_message[ :"S1044" ] = "$1: array initializer too many or few, $2 for $3"
+
+# S1045 $1[$2]: not initialized"
+@@error_message[ :"S1045" ] = "$1[$2]: not initialized"
+
+# S1046 $1[$2]: not initialized"
+@@error_message[ :"S1046" ] = "$1[$2]: not initialized"
+
+# S1047 size_is pointer cannot be exposed for composite attribute"
+@@error_message[ :"S1047" ] = "size_is pointer cannot be exposed for composite attribute"
+
+# S1048 $1: size_is specified for non-pointer type"
+@@error_message[ :"S1048" ] = "$1: size_is specified for non-pointer type"
+
+# S1049 $1: size_is arg not constant"
+@@error_message[ :"S1049" ] = "$1: size_is arg not constant"
+
+# S1050 unsuitable initializer, need array initializer"
+@@error_message[ :"S1050" ] = "unsuitable initializer, need array initializer"
+
+# S1051 too many initializer for array, $1 for $2"
+@@error_message[ :"S1051" ] = "too many initializer for array, $1 for $2"
+
+# S1052 attribute \'$1\' not initialized in cell \'$2\'"
+@@error_message[ :"S1052" ] = "attribute \'$1\' not initialized in cell \'$2\'"
+
+# S1053 $1 must be singleton. inner cell \'$2\' is singleton"
+@@error_message[ :"S1053" ] = "$1 must be singleton. inner cell \'$2\' is singleton"
+
+# S1054 $1 : specified active but has no active in this celltype"
+@@error_message[ :"S1054" ] = "$1 : specified active but has no active in this celltype"
+
+# S1055 $1 must be active. inner cell \'$2\' is active"
+@@error_message[ :"S1055" ] = "$1 must be active. inner cell \'$2\' is active"
+
+# S1056 $1 : cannot export, nothing designated"
+@@error_message[ :"S1056" ] = "$1 : cannot export, nothing designated"
+
+# S1057 $1 not found in $2"
+@@error_message[ :"S1057" ] = "$1 not found in $2"
+
+# S1058 \'$1\' : cannot export var"
+@@error_message[ :"S1058" ] = "\'$1\' : cannot export var"
+
+# S1059 \'$1\' : exporting attribute. write in cell or use \'=\' to export attribute"
+@@error_message[ :"S1059" ] = "\'$1\' : exporting attribute. write in cell or use \'=\' to export attribute"
+
+# S1060 \'$1\' : port type mismatch. $2 type is allowed here."
+@@error_message[ :"S1060" ] = "\'$1\' : port type mismatch. $2 type is allowed here."
+
+# S1061 \'$1\' : not defined"
+@@error_message[ :"S1061" ] = "\'$1\' : not defined"
+
+# S1062 $1 has no export definition"
+@@error_message[ :"S1062" ] = "$1 has no export definition"
+
+# S1063 $1 is port but previously defined as an attribute"
+@@error_message[ :"S1063" ] = "$1 is port but previously defined as an attribute"
+
+# S1064 $1 : type \'$2$3\' mismatch with pprevious definition\'$4$5\'"
+@@error_message[ :"S1064" ] = "$1 : type \'$2$3\' mismatch with pprevious definition\'$4$5\'"
+
+# S1065 $1 : port type $2 mismatch with previous definition $3"
+@@error_message[ :"S1065" ] = "$1 : port type $2 mismatch with previous definition $3"
+
+# S1066 $1 : signature \'$2\' mismatch with previous definition \'$3\'"
+@@error_message[ :"S1066" ] = "$1 : signature \'$2\' mismatch with previous definition \'$3\'"
+
+# S1067 $1 : array size mismatch with previous definition"
+@@error_message[ :"S1067" ] = "$1 : array size mismatch with previous definition"
+
+# S1068 $1 : optional specifier mismatch with previous definition"
+@@error_message[ :"S1068" ] = "$1 : optional specifier mismatch with previous definition"
+
+# S1069 $1 is an attribute but previously defined as a port"
+@@error_message[ :"S1069" ] = "$1 is an attribute but previously defined as a port"
+
+# S1070 $1: size_is pointer cannot be exposed for composite attribute"
+@@error_message[ :"S1070" ] = "$1: size_is pointer cannot be exposed for composite attribute"
+
+# S1071 $1 cannot be specified for composite"
+@@error_message[ :"S1071" ] = "$1 cannot be specified for composite"
+
+# S1072 $1: entry port: sizeless array not supported in current version"
+@@error_message[ :"S1072" ] = "$1: entry port: sizeless array not supported in current version"
+
+# S1073 Not constant expression $1"
+@@error_message[ :"S1073" ] = "Not constant expression $1"
+
+# S1074 Not Integer $1"
+@@error_message[ :"S1074" ] = "Not Integer $1"
+
+# S1075 \'$1\' signature not found"
+@@error_message[ :"S1075" ] = "\'$1\' signature not found"
+
+# S1076 \'$1\' not signature"
+@@error_message[ :"S1076" ] = "\'$1\' not signature"
+
+# S1077 inline: cannot be specified for call port"
+@@error_message[ :"S1077" ] = "inline: cannot be specified for call port"
+
+# S1078 optional: cannot be specified for entry port"
+@@error_message[ :"S1078" ] = "optional: cannot be specified for entry port"
+
+# S1079 allocator: cannot be specified for call port"
+@@error_message[ :"S1079" ] = "allocator: cannot be specified for call port"
+
+# S1080 duplicate allocator specifier"
+@@error_message[ :"S1080" ] = "duplicate allocator specifier"
+
+# S1081 self allocator not supported yet"
+@@error_message[ :"S1081" ] = "self allocator not supported yet"
+
+# S1082 function \'$1\' not found in signature"
+@@error_message[ :"S1082" ] = "function \'$1\' not found in signature"
+
+# S1083 \'$1\' not found in function \'$2\'"
+@@error_message[ :"S1083" ] = "\'$1\' not found in function \'$2\'"
+
+# S1084 \'$1\' in function \'$2\' is not send or receive"
+@@error_message[ :"S1084" ] = "\'$1\' in function \'$2\' is not send or receive"
+
+# S1085 duplicate allocator specifier for \'$1_$2\'"
+@@error_message[ :"S1085" ] = "duplicate allocator specifier for \'$1_$2\'"
+
+# S1086 rhs not call_port.func.param for $1_$2"
+@@error_message[ :"S1086" ] = "rhs not call_port.func.param for $1_$2"
+
+# S1087 function \'$1\' not found in signature \'$2\'"
+@@error_message[ :"S1087" ] = "function \'$1\' not found in signature \'$2\'"
+
+# S1088 \'$1\' not found in function \'$2\'"
+@@error_message[ :"S1088" ] = "\'$1\' not found in function \'$2\'"
+
+# S1089 relay allocator send/receive mismatch between $1.$2 and $3_$4.$5"
+@@error_message[ :"S1089" ] = "relay allocator send/receive mismatch between $1.$2 and $3_$4.$5"
+
+# S1090 \'$1\' in function \'$2\' is not send or receive"
+@@error_message[ :"S1090" ] = "\'$1\' in function \'$2\' is not send or receive"
+
+# S1091 call port \'$1\' not found in celltype $2"
+@@error_message[ :"S1091" ] = "call port \'$1\' not found in celltype $2"
+
+# S1092 \'$1\' not namespace"
+@@error_message[ :"S1092" ] = "\'$1\' not namespace"
+
+# S1093 $1 : undefined cell"
+@@error_message[ :"S1093" ] = "$1 : undefined cell"
+
+# S1094 $1: pointer is not constant. check \'const\'"
+@@error_message[ :"S1094" ] = "$1: pointer is not constant. check \'const\'"
+
+# S1095 $1: not constant"
+@@error_message[ :"S1095" ] = "$1: not constant"
+
+# S1096 $1: should be int, float, bool or pointer type"
+@@error_message[ :"S1096" ] = "$1: should be int, float, bool or pointer type"
+
+# S1097 $1: has no initializer"
+@@error_message[ :"S1097" ] = "$1: has no initializer"
+
+# S1098 $1: has unsuitable initializer"
+@@error_message[ :"S1098" ] = "$1: has unsuitable initializer"
+
+# S1099 array subscript not constant"
+@@error_message[ :"S1099" ] = "array subscript not constant"
+
+# S1100 $1: cannot initialize var"
+@@error_message[ :"S1100" ] = "$1: cannot initialize var"
+
+# S1101 \'$1\' cannot initialize entry port"
+@@error_message[ :"S1101" ] = "\'$1\' cannot initialize entry port"
+
+# S1102 $1: must specify array subscript here"
+@@error_message[ :"S1102" ] = "$1: must specify array subscript here"
+
+# S1103 $1: need array subscript"
+@@error_message[ :"S1103" ] = "$1: need array subscript"
+
+# S1104 $1: need array subscript number. ex. \'[0]\'"
+@@error_message[ :"S1104" ] = "$1: need array subscript number. ex. \'[0]\'"
+
+# S1105 $1: cannot specify array subscript here"
+@@error_message[ :"S1105" ] = "$1: cannot specify array subscript here"
+
+# S1106 $1: cannot specify array subscript number. use \'[]\'"
+@@error_message[ :"S1106" ] = "$1: cannot specify array subscript number. use \'[]\'"
+
+# S1107 to export port, use \'cCall => composite.cCall\'"
+@@error_message[ :"S1107" ] = "to export port, use \'cCall => composite.cCall\'"
+
+# S1108 $1: rhs not \'Cell.ePort\' form"
+@@error_message[ :"S1108" ] = "$1: rhs not \'Cell.ePort\' form"
+
+# S1109 \'$1\' not found"
+@@error_message[ :"S1109" ] = "\'$1\' not found"
+
+# S1110 \'$1\' not cell"
+@@error_message[ :"S1110" ] = "\'$1\' not cell"
+
+# S1111 \'$1\' not found"
+@@error_message[ :"S1111" ] = "\'$1\' not found"
+
+# S1112 \'$1\' not entry port"
+@@error_message[ :"S1112" ] = "\'$1\' not entry port"
+
+# S1113 \'$1\' signature mismatch"
+@@error_message[ :"S1113" ] = "\'$1\' signature mismatch"
+
+# S1114 \'$1\' should be array"
+@@error_message[ :"S1114" ] = "\'$1\' should be array"
+
+# S1115 $1[$2]: subscript out of range (< $3)"
+@@error_message[ :"S1115" ] = "$1[$2]: subscript out of range (< $3)"
+
+# S1116 \'$1\' entry port is not array"
+@@error_message[ :"S1116" ] = "\'$1\' entry port is not array"
+
+# S1117 \'$1\' not in celltype"
+@@error_message[ :"S1117" ] = "\'$1\' not in celltype"
+
+# S1118 $1: going out from region \'$2\' not permitted"
+@@error_message[ :"S1118" ] = "$1: going out from region \'$2\' not permitted"
+
+# S1119 $1: going from region \'$2\' to \'$3\' not permitted"
+@@error_message[ :"S1119" ] = "$1: going from region \'$2\' to \'$3\' not permitted"
+
+# S1120 $1: going in to region \'$2\' not permitted"
+@@error_message[ :"S1120" ] = "$1: going in to region \'$2\' not permitted"
+
+# S1121 \'$1\' in region \'$2\' cannot be directly joined $3 in  $4"
+@@error_message[ :"S1121" ] = "\'$1\' in region \'$2\' cannot be directly joined $3 in  $4"
+
+# S1122 $1 : not port: \'through\' can be specified only for port"
+@@error_message[ :"S1122" ] = "$1 : not port: \'through\' can be specified only for port"
+
+# S1123 $1 : not port: \'through\' can be specified only for port"
+@@error_message[ :"S1123" ] = "$1 : not port: \'through\' can be specified only for port"
+
+# S1124 $1: plugin function failed: \'get_through_entry_port_name\'"
+@@error_message[ :"S1124" ] = "$1: plugin function failed: \'get_through_entry_port_name\'"
+
+# S1125 $1: not generated cell \'$2\'"
+@@error_message[ :"S1125" ] = "$1: not generated cell \'$2\'"
+
+# S1126 $1: fail to new"
+@@error_message[ :"S1126" ] = "$1: fail to new"
+
+# S1127 \'$1\' duplicate"
+@@error_message[ :"S1127" ] = "\'$1\' duplicate"
+
+# S1128 \'$1\' inconsistent array definition"
+@@error_message[ :"S1128" ] = "\'$1\' inconsistent array definition"
+
+# S1129 \'$1\' redefinition of subscript $1"
+@@error_message[ :"S1129" ] = "\'$1\' redefinition of subscript $1"
+
+# S1130 \'$1\' inconsistent array definition"
+@@error_message[ :"S1130" ] = "\'$1\' inconsistent array definition"
+
+# S1131 \'$1.$2\' has duplicate initializer"
+@@error_message[ :"S1131" ] = "\'$1.$2\' has duplicate initializer"
+
+# S1132 $1: 1st parameter is not string(file name)"
+@@error_message[ :"S1132" ] = "$1: 1st parameter is not string(file name)"
+
+# S1133 $1: 2nd parameter is not string(fromat)"
+@@error_message[ :"S1133" ] = "$1: 2nd parameter is not string(fromat)"
+
+# S1134 $1: unknown factory function"
+@@error_message[ :"S1134" ] = "$1: unknown factory function"
+
+# S1135 celltype factory can\'t have parameter(s)"
+@@error_message[ :"S1135" ] = "celltype factory can\'t have parameter(s)"
+
+# S1136 \'$1\': not found"
+@@error_message[ :"S1136" ] = "\'$1\': not found"
+
+# S1137 \'$1\': not attribute"
+@@error_message[ :"S1137" ] = "\'$1\': not attribute"
+
+# S1138 internal error Factory.check_arg()"
+@@error_message[ :"S1138" ] = "internal error Factory.check_arg()"
+
+# S1139 $1: region path mismatch. previous path: $2"
+@@error_message[ :"S1139" ] = "$1: region path mismatch. previous path: $2"
+
+# S1140 $1: region specifier must place at first appearence"
+@@error_message[ :"S1140" ] = "$1: region specifier must place at first appearence"
+
+# S1141 $1 duplication, previous one : $2"
+@@error_message[ :"S1141" ] = "$1 duplication, previous one : $2"
+
+# S1142 $1 not found in search path"
+@@error_message[ :"S1142" ] = "$1 not found in search path"
+
+# S1143 import_C: arg2: mismatch with previous one"
+@@error_message[ :"S1143" ] = "import_C: arg2: mismatch with previous one"
+
+# S1144 $1: temporary C source: open error"
+@@error_message[ :"S1144" ] = "$1: temporary C source: open error"
+
+# S1145 $1: temporary C source: writing error"
+@@error_message[ :"S1145" ] = "$1: temporary C source: writing error"
+
+# S1146 $1: error occured while CPP"
+@@error_message[ :"S1146" ] = "$1: error occured while CPP"
+
+# S1147 $1: popen for CPP failed"
+@@error_message[ :"S1147" ] = "$1: popen for CPP failed"
+
+# S1148 $1 not found in search path"
+@@error_message[ :"S1148" ] = "$1 not found in search path"
+
+# S1149 $1 not signature"
+@@error_message[ :"S1149" ] = "$1 not signature"
+
+# S1150 $1: fail to new"
+@@error_message[ :"S1150" ] = "$1: fail to new"
+
+# S1151 $1: not namespace"
+@@error_message[ :"S1151" ] = "$1: not namespace"
+
+# S1152 $1: call port cannot have fixed join"
+@@error_message[ :"S1152" ] = "$1: call port cannot have fixed join"
+
+# "S1153 $1: cannot be entry port array for fixed join port"
+@@error_message[ :"S1153" ] = "$1: cannot be entry port array for fixed join port"
+
+# "S1154 $1: must be singleton celltype for fixed join"
+@@error_message[ :"S1154" ] = "$1: must be singleton celltype for fixed join"
+
+# "S1155 $1: not celltype or not found"
+@@error_message[ :"S1155" ] = "$1: not celltype or not found"
+
+# "S1156 $1: not call port or not found"
+@@error_message[ :"S1156" ] = "$1: not call port or not found"
+
+# "S1157 $1: sized array or not array"
+@@error_message[ :"S1157" ] = "$1: sized array or not array"
+
+# "S1158 $1: singleton cell not found for fixed join"
+@@error_message[ :"S1158" ] = "$1: singleton cell not found for fixed join"
+
+# S1159 $1: non-size_is pointer cannot be initialized with array initializer"
+@@error_message[ :"S1159" ] = "$1: non-size_is pointer cannot be initialized with array initializer"
+
+# S1160 $1 must be constant for id"
+@@error_message[ :"S1160" ] = "$1 must be constant for id"
+
+# S1161 $1 must be constant for id"
+@@error_message[ :"S1161" ] = "$1 must be constant for id"
+
+# S1162 $1: id cannot be 0"
+@@error_message[ :"S1162" ] = "$1: id cannot be 0"
+
+# S1163 generate specifier duplicate"
+@@error_message[ :"S1163" ] = "generate specifier duplicate"
+
+# S1164 '$1' set_specified_id: id not positive integer '$2'"
+@@error_message[ :"S1164" ] = "'$1' set_specified_id: id not positive integer '$2'"
+
+# S1165 '$1' set_specified_id: id duplicate"
+@@error_message[ :"S1165" ] = "'$1' set_specified_id: id duplicate"
+
+# S1166 $1: fail to new"
+@@error_message[ :"S1166" ] = "$1: fail to new"
+
+# S1167 \'$1\': relay mismatch \'$2\'"
+@@error_message[ :"S1167" ] = "\'$1\': relay mismatch \'$2\'"
+
+# S1168 too many initializer for array, $1 for $2"
+@@error_message[ :"S1168" ] = "too many initializer for array, $1 for $2"
+
+# S1169 $1: non-size_is pointer cannot be initialized with array initializer"
+@@error_message[ :"S1169" ] = "$1: non-size_is pointer cannot be initialized with array initializer"
+
+# S1170 \'$1\' has size_is but export attr \'$2\' doesn't have"
+@@error_message[ :"S1170" ] = "\'$1\' has size_is but export attr \'$2\' doesn't have"
+
+# S1171 \'$1\' size_is argument of \'$2\' not exported"
+@@error_message[ :"S1171" ] = "\'$1\' size_is argument of \'$2\' not exported"
+
+# S1172 \'$1\' size_is argument mismatch with exporting one \'$2\'"
+@@error_message[ :"S1172" ] = "\'$1\' size_is argument mismatch with exporting one \'$2\'"
+
+# S1173 $1: allocator mismatch from $2's allocator"
+@@error_message[ :"S1173" ] = "$1: allocator mismatch from $2's allocator"
+
+# S1174 $1 not suitable for lhs, suitable lhs: 'func.param'"
+@@error_message[ :"S1174" ] = "$1 not suitable for lhs, suitable lhs: 'func.param'"
+
+# S1175 $1 not found or not allocator entry port for $2"
+@@error_message[ :"S1175" ] = "$1 not found or not allocator entry port for $2"
+
+# S1176 rhs not in 'call_port.func.param' form for $1_$2"
+@@error_message[ :"S1176" ] = "rhs not in 'call_port.func.param' form for $1_$2"
+
+# S1177 cannot specify 'through' in composite in current version"
+@@error_message[ :"S1177" ] = "cannot specify 'through' in composite in current version"
+
+# S1178 $1 region type specifier duplicate, previous $2"
+@@error_message[ :"S1178" ] = "$1 region type specifier duplicate, previous $2"
+
+### syntaxobj.rb
+# S2001 \'$1\' duplicate $2"
+@@error_message[ :"S2001" ] = "\'$1\' duplicate $2"
+
+# S2002 $1: $2"
+@@error_message[ :"S2002" ] = "$1: $2"
+
+# S2003 $1: $2 cannot have initializer"
+@@error_message[ :"S2003" ] = "$1: $2 cannot have initializer"
+
+# S2004 $1: array subscript must be specified or omit"
+@@error_message[ :"S2004" ] = "$1: array subscript must be specified or omit"
+
+# S2005 $1: array subscript must be specified"
+@@error_message[ :"S2005" ] = "$1: array subscript must be specified"
+
+# S2006 \'$1\' function"
+@@error_message[ :"S2006" ] = "\'$1\' function"
+
+# S2007 \'$1\' $2"
+@@error_message[ :"S2007" ] = "\'$1\' $2"
+
+# S2008 $1: inconsitent with previous one"
+@@error_message[ :"S2008" ] = "$1: inconsitent with previous one"
+
+# S2009 $1: not found or not signature"
+@@error_message[ :"S2009" ] = "$1: not found or not signature"
+
+# S2010 $1: not allocator signature"
+@@error_message[ :"S2010" ] = "$1: not allocator signature"
+
+# S2011 size_is duplicate"
+@@error_message[ :"S2011" ] = "size_is duplicate"
+
+# S2012 count_is duplicate"
+@@error_message[ :"S2012" ] = "count_is duplicate"
+
+# S2013 string duplicate"
+@@error_message[ :"S2013" ] = "string duplicate"
+
+# S2014 $1 need pointer or more pointer"
+@@error_message[ :"S2014" ] = "$1 need pointer or more pointer"
+
+# S2015 $1 must be const for \'in\' parameter $2"
+@@error_message[ :"S2015" ] = "'$1' must be const for \'in\' parameter $2"
+
+# S2016 $1 can not be const for $2 parameter"
+@@error_message[ :"S2016" ] = "'$1' can not be const for $2 parameter"
+
+# S2017 size_is argument is not integer type"
+@@error_message[ :"S2017" ] = "size_is argument is not integer type"
+
+# S2018 \'$1\' size_is parameter not integer"
+@@error_message[ :"S2018" ] = "\'$1\' size_is parameter not integer"
+
+# S2019 \'$1\' size_is parameter negative or zero"
+@@error_message[ :"S2019" ] = "\'$1\' size_is parameter negative or zero"
+
+# S2020 count_is argument is not integer type"
+@@error_message[ :"S2020" ] = "count_is argument is not integer type"
+
+# S2021 \'$1\' count_is parameter not integer"
+@@error_message[ :"S2021" ] = "\'$1\' count_is parameter not integer"
+
+# S2022 \'$1\' count_is parameter negative or zero"
+@@error_message[ :"S2022" ] = "\'$1\' count_is parameter negative or zero"
+
+# S2023 string argument is not integer type"
+@@error_message[ :"S2023" ] = "string argument is not integer type"
+
+# S2024 \'$1\' string parameter not integer"
+@@error_message[ :"S2024" ] = "\'$1\' string parameter not integer"
+
+# S2025 \'$1\' string parameter negative or zero"
+@@error_message[ :"S2025" ] = "\'$1\' string parameter negative or zero"
+
+# S2026 '$1' nullable specified for non-pointer type"
+@@error_message[ :"S2026" ] = "'$1' nullable specified for non-pointer type"
+
+# S2027 '$1' parameter cannot be void type"
+@@error_message[ :"S2027" ] = "'$1' parameter cannot be void type"
+
+# S2028 '$1' max (size_is 2nd parameter) not constant"
+@@error_message[ :"S2028" ] = "'$1' max (size_is 2nd parameter) not constant"
+
+# S2029 '$1' max (size_is 2nd parameter) negative or zero, or not integer"
+@@error_message[ :"S2029" ] = "'$1' max (size_is 2nd parameter) negative or zero, or not integer"
+
+# S2030 '$1' both size_is and max are const. size_is larger than max"
+@@error_message[ :"S2030" ] = "'$1' both size_is and max are const. size_is larger than max"
+
+### optimize.rb
+# S3001 $1: id too large $2 (max=$3)"
+@@error_message[ :"S3001" ] = "$1: id too large $2 (max=$3)"
+
+# S3002 $1: id too large $2 (max=$3)"
+@@error_message[ :"S3002" ] = "$1: id too large $2 (max=$3)"
+
+# S3003 $1: id number '$2' conflict with $3"
+@@error_message[ :"S3003" ] = "$1: id number '$2' conflict with $3"
+
+### types.rb
+# T1001 const duplicate"
+@@error_message[ :"T1001" ] = "const duplicate"
+
+# T1002 volatile duplicate"
+@@error_message[ :"T1002" ] = "volatile duplicate"
+
+# T1003 $1: unsuitable specifier for $2"
+@@error_message[ :"T1003" ] = "$1: unsuitable specifier for $2"
+
+# T1004 cannot cast to $1"
+@@error_message[ :"T1004" ] = "cannot cast to $1"
+
+# T1005 \'$1\' not defined"
+@@error_message[ :"T1005" ] = "\'$1\' not defined"
+
+# T1006 \'$1\' not type name. expecting type name here"
+@@error_message[ :"T1006" ] = "\'$1\' not type name. expecting type name here"
+
+# T1007 $1: void type variable cannot have initializer"
+@@error_message[ :"T1007" ] = "$1: void type variable cannot have initializer"
+
+# T1008 ambigous signed or unsigned"
+@@error_message[ :"T1008" ] = "ambigous signed or unsigned"
+
+# T1009 $1: $2: not integer"
+@@error_message[ :"T1009" ] = "$1: $2: not integer"
+
+# T1010 $1: initializer is not constant"
+@@error_message[ :"T1010" ] = "$1: initializer is not constant"
+
+# T1011 $1: need cast to assign float to integer"
+@@error_message[ :"T1011" ] = "$1: need cast to assign float to integer"
+
+# T1012 $1: $2: not integer"
+@@error_message[ :"T1012" ] = "$1: $2: not integer"
+
+# T1013 $1: too large (max=$2)"
+@@error_message[ :"T1013" ] = "$1: too large (max=$2)"
+
+# T1014 $1: too large negative value (min=-$2)"
+@@error_message[ :"T1014" ] = "$1: too large negative value (min=-$2)"
+
+# T1015 $1: negative value for unsigned"
+@@error_message[ :"T1015" ] = "$1: negative value for unsigned"
+
+# T1016 $1: too large (max=$2)"
+@@error_message[ :"T1016" ] = "$1: too large (max=$2)"
+
+# T1017 $1: unsuitable initializer for scalar type"
+@@error_message[ :"T1017" ] = "$1: unsuitable initializer for scalar type"
+
+# T1018 $1: $2: not number"
+@@error_message[ :"T1018" ] = "$1: $2: not number"
+
+# T1019 $1: initializer is not constant"
+@@error_message[ :"T1019" ] = "$1: initializer is not constant"
+
+# T1020 $1: unsuitable initializer for scalar type"
+@@error_message[ :"T1020" ] = "$1: unsuitable initializer for scalar type"
+
+# T1021 \'$1\': struct not defined"
+@@error_message[ :"T1021" ] = "\'$1\': struct not defined"
+
+# T1022 struct $1: not defined"
+@@error_message[ :"T1022" ] = "struct $1: not defined"
+
+# T1023 struct $1: not defined"
+@@error_message[ :"T1023" ] = "struct $1: not defined"
+
+# T1024 $1: unsuitable initializer for struct"
+@@error_message[ :"T1024" ] = "$1: unsuitable initializer for struct"
+
+# T1025 size_is argument is not integer type"
+@@error_message[ :"T1025" ] = "size_is argument is not integer type"
+
+# T1026 count_is argument is not integer type"
+@@error_message[ :"T1026" ] = "count_is argument is not integer type"
+
+# T1027 string argument is not integer type"
+@@error_message[ :"T1027" ] = "string argument is not integer type"
+
+# T1028 $1: cannot initialize function pointer"
+@@error_message[ :"T1028" ] = "$1: cannot initialize function pointer"
+
+# T1029 oneway function cannot return type \'$1$2\', \'void\' or \'ER\' is permitted"
+@@error_message[ :"T1029" ] = "oneway function cannot return type \'$1$2\', \'void\' or \'ER\' is permitted"
+
+# T1030 oneway function cannot have $1 parameter for \'$2\'"
+@@error_message[ :"T1030" ] = "oneway function cannot have $1 parameter for \'$2\'"
+
+# T1031 $1: unsuitable initializer for array"
+@@error_message[ :"T1031" ] = "$1: unsuitable initializer for array"
+
+# T1032 $1: incompatible pointer type"
+@@error_message[ :"T1032" ] = "$1: incompatible pointer type"
+
+# T1033 $1: need cast to assign integer to pointer"
+@@error_message[ :"T1033" ] = "$1: need cast to assign integer to pointer"
+
+# T1034 $1: unsuitable string constant"
+@@error_message[ :"T1034" ] = "$1: unsuitable string constant"
+
+# T1035 $1: unsuitable initializer for pointer"
+@@error_message[ :"T1035" ] = "$1: unsuitable initializer for pointer"
+
+# T1036 $1: unsuitable initializer for pointer"
+@@error_message[ :"T1036" ] = "$1: unsuitable initializer for pointer"
+
+# T1037 $1: not number"
+@@error_message[ :"T1037" ] = "$1: not number"
+
+# T1038 $1: initializer type mismatch. '$2' & '$3'"
+@@error_message[ :"T1038" ] = "$1: initializer type mismatch. '$2' & '$3'"
+
+# T1039 $1: struct tag mismatch $2 and $3"
+@@error_message[ :"T1039" ] = "$1: struct tag mismatch $2 and $3"
+
+# T1040 $1 specified for void pointer type"
+@@error_message[ :"T1040" ] = "$1 specified for void pointer type"
+
+### gen_xml.rb
+# T2001 fail to create XML file $1"
+@@error_message[ :"T2001" ] = "fail to create XML file $1"
+
+# TEMPORAL set_definition_join: uninitialized array member"
+@@error_message[ :"TEMPORAL" ] = "set_definition_join: uninitialized array member"
+
+# V1001 $1: unable for $2"
+@@error_message[ :"V1001" ] = "$1: unable for $2"
+
+# V1002 $1: cannot cast to bool (implicitly)"
+@@error_message[ :"V1002" ] = "$1: cannot cast to bool (implicitly)"
+
+# V1003 $1: cannot cast to integer (implicitly)"
+@@error_message[ :"V1003" ] = "$1: cannot cast to integer (implicitly)"
+
+# V1004 $1: cannot cast to float (implicitly)"
+@@error_message[ :"V1004" ] = "$1: cannot cast to float (implicitly)"
+
+# V1005 Cannot cast pointer to float"
+@@error_message[ :"V1005" ] = "Cannot cast pointer to float"
+
+# V1006 pointer value cannot cast to $1"
+@@error_message[ :"V1006" ] = "pointer value cannot cast to $1"
+
+# V1007 convert pointer value to bool"
+@@error_message[ :"V1007" ] = "convert pointer value to bool"
+
+# V1008 convert pointer value to integer without cast"
+@@error_message[ :"V1008" ] = "convert pointer value to integer without cast"
+
+# V1009 / : divieded by zero"
+@@error_message[ :"V1009" ] = "/ : divieded by zero"
+
+# V1010 / : divieded by zero"
+@@error_message[ :"V1010" ] = "/ : divieded by zero"
+
+# V1011 % : divieded by zero"
+@@error_message[ :"V1011" ] = "% : divieded by zero"
+
+# V1012 % : divieded by zero"
+@@error_message[ :"V1012" ] = "% : divieded by zero"
+
+# V1013 integer value cannot cast to $1"
+@@error_message[ :"V1013" ] = "integer value cannot cast to $1"
+
+# V1014 comparing bool value with \'$1\'"
+@@error_message[ :"V1014" ] = "comparing bool value with \'$1\'"
+
+# V1015 comparing bool value with \'$1\'"
+@@error_message[ :"V1015" ] = "comparing bool value with \'$1\'"
+
+# V1016 bool value cannot cast to $1"
+@@error_message[ :"V1016" ] = "bool value cannot cast to $1"
+
+# V1017 / : divieded by zero"
+@@error_message[ :"V1017" ] = "/ : divieded by zero"
+
+# V1018 % : divieded by zero"
+@@error_message[ :"V1018" ] = "% : divieded by zero"
+
+# V1019 floating value cannot cast to $1"
+@@error_message[ :"V1019" ] = "floating value cannot cast to $1"
+
+# V1020 convert floating value to bool without cast"
+@@error_message[ :"V1020" ] = "convert floating value to bool without cast"
+
+# V1021 convert floating value to integer without cast"
+@@error_message[ :"V1021" ] = "convert floating value to integer without cast"
+
+# V1022 string cannot cast to integer"
+@@error_message[ :"V1022" ] = "string cannot cast to integer"
+
+# V1023 string cannot cast to float"
+@@error_message[ :"V1023" ] = "string cannot cast to float"
+
+# V1024 string cannot cast to pointer"
+@@error_message[ :"V1024" ] = "string cannot cast to pointer"
+
+# V1025 string cannot cast to $1"
+@@error_message[ :"V1025" ] = "string cannot cast to $1"
+
+###
+# warning ã¡ãã»ã¼ã¸
+@@warning_message = {}
+
+### componentobj.rb
+# W1001 \'$1\': unknown context type. usually specifiy task, non-task or any"
+@@warning_message[ :"W1001" ] = "\'$1\': unknown context type. usually specifiy task, non-task or any"
+
+# W1002 $1: non-active celltype has no entry port & factory"
+@@warning_message[ :"W1002" ] = "$1: non-active celltype has no entry port & factory"
+
+# W1003 $1 : require call port overridden in $2"
+@@warning_message[ :"W1003" ] = "$1 : require call port overridden in $2"
+
+# W1004 $1 : specified singleton but has no singleton in this celltype"
+@@warning_message[ :"W1004" ] = "$1 : specified singleton but has no singleton in this celltype"
+
+# W1005 $1 : idx_is_id is ineffective for composite celltype"
+@@warning_message[ :"W1005" ] = "$1 : idx_is_id is ineffective for composite celltype"
+
+# W1006 $1 : only prototype, unused and undefined cell"
+@@warning_message[ :"W1006" ] = "$1 : only prototype, unused and undefined cell"
+
+# W1007 $1 : non-active cell has no entry join and no factory"
+@@warning_message[ :"W1007" ] = "$1 : non-active cell has no entry join and no factory"
+
+# W1008 $1: reuse designation mismatch with previous import"
+@@warning_message[ :"W1008" ] = "$1: reuse designation mismatch with previous import"
+
+# "W1009 $1: fixed join entry port has multi join"
+@@warning_message[ :"W1009" ] = "$1: fixed join entry port has multi join"
+
+### types.rb
+# W2001 signed int$1_t: obsolete. use int$2_t"
+@@warning_message[ :"W2001" ] = "signed int$1_t: obsolete. use int$2_t"
+
+# W2002 unsinged int$1_t: obsolete. use uint$2_t"
+@@warning_message[ :"W2002" ] = "unsinged int$1_t: obsolete. use uint$2_t"
+
+# W2003 $1: too large to cast to $2, clipped($3)"
+@@warning_message[ :"W2003" ] = "$1: too large to cast to $2, clipped($3)"
+
+# W2004 $1: too small to cast to $2, clipped($3)"
+@@warning_message[ :"W2004" ] = "$1: too small to cast to $2, clipped($3)"
+
+# W2005 $1: negative value for unsigned: convert to $2"
+@@warning_message[ :"W2005" ] = "$1: negative value for unsigned: convert to $2"
+
+### syntaxobj.rb
+# W3001 $1: duplicate"
+@@warning_message[ :"W3001" ] = "$1: duplicate"
+
+# W3002 $1: this string might cause buffer over run"
+@@warning_message[ :"W3002" ] = "$1: this string might cause buffer over run"
+
+# W3003 $1 pointer level mismatch"
+@@warning_message[ :"W3003" ] = "$1 pointer level mismatch"
+
+# W3004 $1 pointer type has returned. specify deviate or stop return pointer"
+@@error_message[ :"W3004" ] = "$1 pointer type has returned. specify deviate or stop return pointer"
+
+# W3005 '$1' size_is always lower than max. max is ignored"
+@@error_message[ :"W3005" ] = "'$1' size_is always lower than max. max is ignored"
+
+### bnf.y.rb
+# W5001 bool: obsolete type. use bool_t"
+@@warning_message[ :"W5001" ] = "bool: obsolete type. use bool_t"
+
+# W5002 float: obsolete type. use float32_t"
+@@warning_message[ :"W5002" ] = "float: obsolete type. use float32_t"
+
+# W5003 double: obsolete type. use double64_t"
+@@warning_message[ :"W5003" ] = "double: obsolete type. use double64_t"
+
+# W5004 char: obsolete type. use char_t"
+@@warning_message[ :"W5004" ] = "char: obsolete type. use char_t"
+
+# W5005 int8: obsolete. use int8_t"
+@@warning_message[ :"W5005" ] = "int8: obsolete. use int8_t"
+
+# W5006 int16: obsolete. use int16_t"
+@@warning_message[ :"W5006" ] = "int16: obsolete. use int16_t"
+
+# W5007 int32: obsolete. use int32_t"
+@@warning_message[ :"W5007" ] = "int32: obsolete. use int32_t"
+
+# W5008 int64: obsolete. use int64_t"
+@@warning_message[ :"W5008" ] = "int64: obsolete. use int64_t"
+
+# W5009 int64: obsolete. use int64_t"
+@@warning_message[ :"W5009" ] = "int64: obsolete. use int64_t"
+
+# W5010 need 'void' for no parameter"
+@@warning_message[ :"W5010" ] = "need 'void' for no parameter"
+
+# W5011 need 'void' for no parameter"
+@@warning_message[ :"W5011" ] = "need 'void' for no parameter"
+
+### C_parser.y.rb
+# W6001 need 'void' for no parameter"
+@@warning_message[ :"W6001" ] = "need 'void' for no parameter"
+
+# W6002 need 'void' for no parameter"
+@@warning_message[ :"W6002" ] = "need 'void' for no parameter"
+
+# W6003 need 'void' for no parameter"
+@@warning_message[ :"W6003" ] = "need 'void' for no parameter"
+
+# W6004 need 'void' for no parameter"
+@@warning_message[ :"W6004" ] = "need 'void' for no parameter"
+
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_console_ja_JP.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_console_ja_JP.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_console_ja_JP.rb	(revision 270)
@@ -0,0 +1,1277 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: messages_console_ja_JP.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+
+# Console Messages for ja_JP
+class TECSMsg
+
+###
+# ã¨ã©ã¼ã¡ãã»ã¼ã¸
+@@error_message = {}
+
+### C_parser.y.rb
+# B1001 need parameter name"
+@@error_message[ :"B1001" ] = "ãã©ã¡ã¼ã¿åãå¿
+è¦ã§ã" 
+
+# B1002 while open or reading \'$1\'"
+@@error_message[ :"B1002" ] = "\'$1\' ã®ãªã¼ãã³ã¾ãã¯èª­ã¿è¾¼ã¿ã«å¤±æãã¾ãã" 
+
+# B1003 Unexpected EOF"
+@@error_message[ :"B1003" ] = "äºæããªã EOF ã§ã"
+
+# B1004 syntax error near \'$1\'"
+@@error_message[ :"B1004" ] = "\'$1\' ä»è¿ã®æ§æã¨ã©ã¼ã§ã"
+
+### ctypes.rb
+# C1001 $1: mismatch, suitable for integer types"
+@@error_message[ :"C1001" ] = "$1: æ´åãã¦ãã¾ãã, ããã¯æ´æ°åã«é©ãã¦ãã¾ã"
+
+# C1002 $1 not compatible with previous one $2"
+@@error_message[ :"C1002" ] = "$1 ã¯ããä»¥åã®ãã®ã§ãã $2 ã¨ä¸¡ç«ãã¾ãã"
+
+# C1003 $1 & $2 incompatible  (\'long double\' not support)"
+@@error_message[ :"C1003" ] = "$1 åã³ $2 ã¯ä¸¡ç«ãã¾ãã (\'long double\' ã¯æªãµãã¼ã)"
+
+# C1004 $1: qualifier respecified. previous one: $2"
+@@error_message[ :"C1004" ] = "$1: ä¿®é£¾å­ãååº¦æå®ããã¾ãã. ãã®åã®ä¿®é£¾å­: $2"
+
+### expression.rb
+# E1001 $1: not found"
+@@error_message[ :"E1001" ] = "$1: è¦ã¤ããã¾ãã"
+
+# E1002 $1: not constant (port)"
+@@error_message[ :"E1002" ] = "$1: å®æ°ã§ã¯ããã¾ãã (port)"
+
+# E1003 $1: not constant"
+@@error_message[ :"E1003" ] = "$1: å®æ°ã§ã¯ããã¾ãã"
+
+# E1004 cannot evaluate \'[]\' operator"
+@@error_message[ :"E1004" ] = "\'[]\' æ¼ç®å­ãè©ä¾¡ã§ãã¾ãã"
+
+# E1005 cannot evaluate \'.\' operator"
+@@error_message[ :"E1005" ] = "\'.\' æ¼ç®å­ãè©ä¾¡ã§ãã¾ãã"
+
+# E1006 cannot evaluate \'->\' operator"
+@@error_message[ :"E1006" ] = "\'->\' æ¼ç®å­ãè©ä¾¡ã§ãã¾ãã"
+
+# E1007 cannot evaluate \'sizeof\' operator"
+@@error_message[ :"E1007" ] = "\'sizeof\' æ¼ç®å­ãè©ä¾¡ã§ãã¾ãã"
+
+# E1008 cannot evaluate \'sizeof\' operator"
+@@error_message[ :"E1008" ] = "\'sizeof\' æ¼ç®å­ãè©ä¾¡ã§ãã¾ãã"
+
+# E1009 cannot evaluate \'&\' operator"
+@@error_message[ :"E1009" ] = "\'&\' æ¼ç®å­ãè©ä¾¡ã§ãã¾ãã"
+
+# E1010 cannot evaluate \'*\' operator"
+@@error_message[ :"E1010" ] = "\'*\' æ¼ç®å­ãè©ä¾¡ã§ãã¾ãã"
+
+# E1011 cannot evaluate unary + for $1"
+@@error_message[ :"E1011" ] = "$1 ã«å¯¾ããåé 
+ã® + ãè©ä¾¡ã§ãã¾ãã"
+
+# E1012 $1: not found in parameter list"
+@@error_message[ :"E1012" ] = "$1: ãã©ã¡ã¼ã¿ãªã¹ãã®ä¸­ã«è¦ã¤ããã¾ãã"
+
+# E1013 \'*\': operand is not pointer value"
+@@error_message[ :"E1013" ] = "\'*\': ãªãã©ã³ãã¯ãã¤ã³ã¿å¤ã§ã¯ããã¾ãã"
+
+# E1014 $1: elements_get_type: sorry not supported"
+@@error_message[ :"E1014" ] = "$1: elements_get_type: ç³ãè¨³ããã¾ããï¼ãµãã¼ãããã¦ãã¾ãã"
+
+# E1015 \'$1\': direction mismatch for $2, $3 required"
+@@error_message[ :"E1015" ] = "\'$1\': $2 ã«å¯¾ããæ¹åãæ´åãã¦ãã¾ããï¼$3 ãå¿
+è¦ã§ã"
+
+# E1016 $1: elements_check_dir_for_param: sorry not supported"
+@@error_message[ :"E1016" ] = "$1: elements_check_dir_for_param: ç³ãè¨³ããã¾ããï¼ãµãã¼ãããã¦ãã¾ãã"
+
+# E1017 $1: rhs not \'Cell.ePort\' form"
+@@error_message[ :"E1017" ] = "$1: å³è¾ºã \'Cell.ePort\' å½¢å¼ã§ã¯ããã¾ãã"
+
+# E1018 $1: namespace cannot be specified"
+@@error_message[ :"E1018" ] = "$1: namespace ãæå®ã§ãã¾ãã"
+
+# E1019 $1: rhs not in 'allocator_entry_port' form"
+@@error_message[ :"E1019" ] = "$1: å³è¾ºã 'allocator_entry_port' å½¢å¼ã§ã¯ããã¾ãã"
+
+# E1020 rhs not in 'call_port.func.param' form for $1_$2"
+@@error_message[ :"E1020" ] = "å³è¾ºã 'call_port.func.param' å½¢å¼ã§ããã¾ãã ($1_$2)"
+
+### bnf.y.rb
+# G1001 need specifier for \'$1\'"
+@@error_message[ :"G1001" ] = "\'$1\' ã«å¯¾ããæå®å­ãå¿
+è¦ã§ã"
+
+# G1002 need parameter name"
+@@error_message[ :"G1002" ] = "ãã©ã¡ã¼ã¿åãå¿
+è¦ã§ã"
+
+# G1003 need parameter name"
+@@error_message[ :"G1003" ] = "ãã©ã¡ã¼ã¿åãå¿
+è¦ã§ã"
+
+# G1004 impossible array type 0"
+@@error_message[ :"G1004" ] = "ããå¾ãªãé
+åå 0 ã§ã"
+
+# G1005 impossible array type 1"
+@@error_message[ :"G1005" ] = "ããå¾ãªãé
+åå 1 ã§ã"
+
+# G1006 impossible array type 2"
+@@error_message[ :"G1006" ] = "ããå¾ãªãé
+åå 2 ã§ã"
+
+# G1007 impossible array type 3"
+@@error_message[ :"G1007" ] = "ããå¾ãªãé
+åå 3 ã§ã"
+
+# G1008 impossible function type"
+@@error_message[ :"G1008" ] = "ããå¾ãªãé¢æ°åã§ã"
+
+# G1009 unexpected specifier"
+@@error_message[ :"G1009" ] = "äºæããªãæå®å­ã§ã"
+
+# G1010 Not function"
+@@error_message[ :"G1010" ] = "é¢æ°ã§ã¯ããã¾ãã"
+
+# G1011 Not function"
+@@error_message[ :"G1011" ] = "é¢æ°ã§ã¯ããã¾ãã"
+
+# G1012 $1 : cannot put specifier here"
+@@error_message[ :"G1012" ] = "$1 : ããã«æå®å­ãç½®ããã¨ã¯ã§ãã¾ãã"
+
+# G1013 unexpected specifier"
+@@error_message[ :"G1013" ] = "äºæããªãæå®å­ã§ã"
+
+# G1014 while open or reading \'$1\'"
+@@error_message[ :"G1014" ] = "\'$1\' ã®ãªã¼ãã³ã¾ãã¯èª­ã¿è¾¼ã¿ã«å¤±æãã¾ãã"
+
+# G1015 Unexpected EOF"
+@@error_message[ :"G1015" ] = "äºæããªã EOF ã§ã"
+
+# G1016 syntax error near \'$1\'"
+@@error_message[ :"G1016" ] = "\'$1\' ä»è¿ã®æ§æã¨ã©ã¼ã§ã"
+
+### plugin.rb
+# P1001 plugin arg: cannot find identifier in $1"
+@@error_message[ :"P1001" ] = "plugin arg: $1 ã®ä¸­ã«è­å¥å­ãè¦ã¤ãããã¨ãã§ãã¾ãã"
+
+# P1002 plugin arg: expecting \'=\' not \'$1\'"
+@@error_message[ :"P1002" ] = "plugin arg: \'$1\' ã§ã¯ãªã \'=\' ãå¿
+è¦ã§ã"
+
+# P1003 plugin arg: unexpected $1"
+@@error_message[ :"P1003" ] = "plugin arg: äºæããªã $1 ã§ã"
+
+# P1004 $1: unknown plugin argument\'s identifier\n  $2 are acceptable for RPCPlugin."
+@@error_message[ :"P1004" ] = "$1: ä¸æãªãã©ã°ã¤ã³å¼æ°ã®è­å¥å­\n  $2 ã RPC ãã©ã°ã¤ã³ã«å¯¾ãã¦åãå
+¥ãå¯è½ã§ã"
+
+### pluginModule.rb
+# P2001 $1.rb : fail to load plugin"
+@@error_message[ :"P2001" ] = "$1.rb : ãã©ã°ã¤ã³ã®èª­ã¿è¾¼ã¿ã«å¤±æãã¾ãã"
+
+# P2002 $1: not kind of $2"
+@@error_message[ :"P2002" ] = "$1: $2 ã®ä¸ç¨®ã§ã¯ããã¾ãã"
+
+# P2003 $1: load failed"
+@@error_message[ :"P2003" ] = "$1: èª­ã¿è¾¼ã¿ã«å¤±æãã¾ãã"
+
+# P2004 $1: open error \'$2\'"
+@@error_message[ :"P2004" ] = "$1: ãªã¼ãã³ã¨ã©ã¼ \'$2\' ãçºçãã¾ãã"
+
+# P2005 $1: plugin error in gen_through_cell_code "
+@@error_message[ :"P2005" ] = "$1: gen_through_cell_code å
+ã®ãã©ã°ã¤ã³ã¨ã©ã¼ãçºçãã¾ãã"
+
+# P2006 $1: close error \'$2\'"
+@@error_message[ :"P2006" ] = "$1: \'$2\' ã®ã¯ã­ã¼ãºã¨ã©ã¼ãçºçãã¾ãã"
+
+# P2007 $1: fail to generate post code"
+@@error_message[ :"P2007" ] = "$1: ãã¹ãã³ã¼ãã®çæã«å¤±æãã¾ãã"
+
+### componentobj.rb
+# S1001 context specifier duplicate"
+@@error_message[ :"S1001" ] = "ã³ã³ãã­ã¹ãæå®å­ãéè¤ãã¦ãã¾ã"
+
+# S1002 \'$1\': unknown specifier for signature"
+@@error_message[ :"S1002" ] = "\'$1\': ã·ã°ããã£ã«å¯¾ããä¸æãªæå®å­ã§ã"
+
+# S1003 $1: \'alloc\' 1st parameter neither [in] integer type nor [out] double pointer type
+@@error_message[ :"S1003" ] = "$1: \'alloc\' é¢æ°ã®ç¬¬1ãã©ã¡ã¼ã¿ã in ã®æ´æ°åã§ã out ã®äºéãã¤ã³ã¿åã§ãããã¾ããï¼"
+
+# S1004 $1: \'alloc\' 2nd parameter not [in] double pointer"
+@@error_message[ :"S1004" ] = "$1: \'alloc\' é¢æ°ã®ç¬¬2ãã©ã¡ã¼ã¿ã in ã®ãã¤ã³ã¿ã¸ã®ãã¤ã³ã¿ã§ã¯ããã¾ããï¼"
+
+# S1005 $1: \'alloc\' has no parameter, unsuitable for allocator signature"
+@@error_message[ :"S1005" ] = "$1: \'alloc\' é¢æ°ããã©ã¡ã¼ã¿ãæã£ã¦ãã¾ããï¼ã¢ã­ã±ã¼ã¿ã·ã°ããã£ã«å¯¾ãã¦ä¸é©å½ã§ãï¼"
+
+# S1006 $1: \'dealloc\' 1st parameter not [in] pointer type"
+@@error_message[ :"S1006" ] = "$1: \'dealloc\' é¢æ°ã®ç¬¬1ãã©ã¡ã¼ã¿ã in ã®ãã¤ã³ã¿åã§ã¯ããã¾ããï¼"
+
+# S1007 "
+     # S1007 $1: \'dealloc\' cannot has 2nd parameter"
+# @@error_message[ :"S1007" ] = "$1: \'dealloc\' é¢æ°ã¯ç¬¬2ãã©ã¡ã¼ã¿ãæã¤ãã¨ãã§ãã¾ããï¼"
+
+# S1008 $1: \'dealloc\' has no parameter, unsuitable for allocator signature"
+@@error_message[ :"S1008" ] = "$1: \'dealloc\' é¢æ°ããã©ã¡ã¼ã¿ãæã£ã¦ãã¾ããï¼ã¢ã­ã±ã¼ã¿ã·ã°ããã£ã«å¯¾ãã¦ä¸é©å½ã§ãï¼"
+
+# S1009 $1: \'alloc\' function not found, unsuitable for allocator signature"
+@@error_message[ :"S1009" ] = "$1: \'alloc\' é¢æ°ãè¦ã¤ããã¾ããï¼ã¢ã­ã±ã¼ã¿ã·ã°ããã£ã«å¯¾ãã¦ä¸é©å½ã§ãï¼"
+
+# S1010 $1: \'dealloc\' function not found, unsuitable for allocator signature"
+@@error_message[ :"S1010" ] = "$1: \'dealloc\' é¢æ°ãè¦ã¤ããã¾ããï¼ã¢ã­ã±ã¼ã¿ã·ã°ããã£ã«å¯¾ãã¦ä¸é©å½ã§ãï¼"
+
+# S1011 $1: size_is specified for non-pointer type"
+@@error_message[ :"S1011" ] = "$1: éãã¤ã³ã¿åã«å¯¾ãã¦ size_is ãæå®ããã¾ãã"
+
+# S1012 $1: unsuitable initializer, need array initializer"
+@@error_message[ :"S1012" ] = "$1: ä¸é©å½ãªåæåå­ã§ãï¼é
+åã®åæåå­ãå¿
+è¦ã§ãï¼"
+
+# S1013 $1: too many initializer, $2 for $3"
+@@error_message[ :"S1013" ] = "$1: åæåå­ãå¤ããã¾ãï¼$3 ã¨ããã¨ããã $2 ã¨ãã¾ããï¼"
+
+# S1014 generate specifier duplicate"
+@@error_message[ :"S1014" ] = "generate æå®å­ãéè¤ãã¾ããï¼"
+
+# S1015 $1 cannot be specified for composite"
+@@error_message[ :"S1015" ] = "$1 ã¯è¤åã»ã«ã«å¯¾ãã¦æå®ã§ãã¾ããï¼"
+
+# S1016 $1 not found"
+@@error_message[ :"S1016" ] = "$1 ãè¦ã¤ããã¾ãã"
+
+# S1017 $1 : neither celltype nor cell"
+@@error_message[ :"S1017" ] = "$1 : ã»ã«ã¿ã¤ãã§ãã»ã«ã§ãããã¾ãã"
+
+# S1018 $1 : not singleton cell"
+@@error_message[ :"S1018" ] = "$1 : ã·ã³ã°ã«ãã³ã»ã«ã§ã¯ããã¾ãã"
+
+# S1019 \'$1\' : not entry port"
+@@error_message[ :"S1019" ] = "\'$1\' : åãå£ã§ã¯ããã¾ãã"
+
+# S1020 \'$1\' : required port cannot be array"
+@@error_message[ :"S1020" ] = "\'$1\' : è¦æ±ãããå£(port)ã¯é
+åã«åºæ¥ã¾ããï¼"
+
+# S1021 $1 : require cannot have same signature with \'$2\'"
+@@error_message[ :"S1021" ] = "$1 : ãªã¯ã¯ã¤ã¢ã¯ \'$2\' ã¨åãã·ã°ããã£ãæã¤ãã¨ãåºæ¥ã¾ããï¼"
+
+# S1022 $1.$2 : \'$3\' conflict function name in $4.$5"
+@@error_message[ :"S1022" ] = "$1.$2 : \'$3\' ã¯ $4.$5 ã«ãããé¢æ°åã¨è¡çªãã¦ãã¾ãï¼"
+
+# S1023 $1: fail to new"
+@@error_message[ :"S1023" ] = "$1: new ã«å¤±æãã¾ããï¼"
+
+# S1024 $1: multiple cell for singleton celltype"
+@@error_message[ :"S1024" ] = "$1: ã·ã³ã°ã«ãã³ã»ã«ã¿ã¤ãã«å¯¾ãè¤æ°ã®ã»ã«ãå­å¨ãã¾ãï¼"
+
+# S1025 not found reachable cell for require \'$1\' in celltype \'$2\'"
+@@error_message[ :"S1025" ] = "ã»ã«ã¿ã¤ã \'$2\' å
+ã®ãªã¯ã¯ã¤ã¢ \'$1\' ã¸å°éå¯è½ãªã»ã«ãè¦ã¤ããã¾ããï¼"
+
+# S1026 required cell \'$1\' not reachable"
+@@error_message[ :"S1026" ] = "å¿
+è¦ã¨ãããã»ã« \'$1\' ã¯å°éå¯è½ã§ã¯ããã¾ããï¼"
+
+# S1027 \'$1\' celltype not found"
+@@error_message[ :"S1027" ] = "ã»ã«ã¿ã¤ã \'$1\' ãè¦ã¤ããã¾ãã"
+
+# S1028 \'$1\' not celltype"
+@@error_message[ :"S1028" ] = "\'$1\' ã¯ã»ã«ã¿ã¤ãã§ã¯ããã¾ãã"
+
+# S1029 $1 mismatch with previous one"
+@@error_message[ :"S1029" ] = "$1 ãããä»¥åã®ãã®ã¨æ´åãã¦ãã¾ãã"
+
+# S1030 $1: celltype mismatch with previous one"
+@@error_message[ :"S1030" ] = "$1: ã»ã«ã¿ã¤ããããä»¥åã®ãã®ã¨æ´åãã¦ãã¾ãã"
+
+# S1031 $1 region \'$2\' mismatch  with previous one \'$3\'"
+@@error_message[ :"S1031" ] = "ã»ã« $1 ã®ãªã¼ã¸ã§ã³ \'$2\' ã¯ããä»¥åã®ãªã¼ã¸ã§ã³ \'$3\' ã¨æ´åãã¦ãã¾ããï¼"
+
+# S1032 $1: duplicate cell"
+@@error_message[ :"S1032" ] = "$1: ã»ã«ãéè¤ãã¦ãã¾ã"
+
+# S1033 rhs expression is not supported. Only attribute is permitted on current version."
+@@error_message[ :"S1033" ] = "å³è¾ºå¼ã¯ãµãã¼ãããã¦ãã¾ããï¼å±æ§ã®ã¿ãç¾å¨ã®ãã¼ã¸ã§ã³ã§ä½¿ç¨ã§ãã¾ãï¼"
+
+# S1034 $1 : cannot refer to $2\'s attribute here. Use \'composite.$3\' to refer to composite celltype\'s"
+@@error_message[ :"S1034" ] = "$1 : ããã§ã¯ $2 ã®å±æ§ãåç
+§ã§ãã¾ãã. è¤åã»ã«ã¿ã¤ãã®å±æ§ãåç
+§ãããã \'composite.$3\' ããä½¿ããã ããï¼"
+
+# S1035 composite : cannot specify out of composite celltype definition"
+@@error_message[ :"S1035" ] = "composite : è¤åã»ã«ã¿ã¤ãå®ç¾©ã®å¤å´ã§ã¯æå®ã§ãã¾ããï¼"
+
+# S1036 $1 : cannot refer to $2\'s here. Use \'composite.$3\' to refer to composite celltype\'s"
+@@error_message[ :"S1036" ] = "$1 : ããã§ã¯$2ã®ãã®ãåç
+§ã§ãã¾ããï¼è¤åã»ã«ã¿ã¤ãã®ãã®ãåç
+§ãããã \'composite.$3\' ããä½¿ããã ããï¼"
+
+# S1037 $1: celltype plugin fail to new_cell"
+@@error_message[ :"S1037" ] = "$1: ã»ã«ã¿ã¤ããã©ã°ã¤ã³ã new_cell ã«å¤±æãã¾ããï¼"
+
+# S1038 $1.$2: self allocator not supported for array entry port"
+@@error_message[ :"S1038" ] = "$1.$2: ã»ã«ãã¢ã­ã±ã¼ã¿ã¯åãå£é
+åã«å¯¾ãã¦ãµãã¼ãããã¦ãã¾ããï¼"
+
+# S1039 \'$1\': unknown specifier for cell"
+@@error_message[ :"S1039" ] = "\'$1\': ã»ã«ã«å¯¾ããä¸æãªæå®å­ã§ãï¼"
+
+# S1040 array not supported for relay allocator"
+@@error_message[ :"S1040" ] = "é
+åã¯ãªã¬ã¼ã¢ã­ã±ã¼ã¿ã«å¯¾ãã¦ãµãã¼ãããã¦ãã¾ããï¼"
+
+# S1041 \'$1_$2_$3\': not joined. cannot create internal join for relay allocator"
+@@error_message[ :"S1041" ] = "\'$1_$2_$3\': çµåããã¾ãã. ãªã¬ã¼ã¢ã­ã±ã¼ã¿ã«å¯¾ãã¦å
+é¨çµåãçæã§ãã¾ããï¼"
+
+# S1042 call port \'$1\' not initialized in cell \'$2\'"
+@@error_message[ :"S1042" ] = "å¼ã³å£ \'$1\' ã¯ã»ã« \'$2\' ã®ä¸­ã§åæåããã¾ããï¼"
+
+# S1043 call port \'$1\' not initialized in cell \'$2\'. this call port is created by tecsgen. check allocator specifier"
+@@error_message[ :"S1043" ] = "å¼ã³å£ \'$1\' ã¯ã»ã« \'$2\' ã®ä¸­ã§åæåããã¾ããï¼ãã®å¼ã³å£ã¯ tecsgen ã«ããçæããã¾ãï¼ã¢ã­ã±ã¼ã¿æå®å­ãç¢ºèªãã¦ãã ããï¼"
+
+# S1044 $1: array initializer too many or few, $2 for $3"
+@@error_message[ :"S1044" ] = "$1: é
+åã®åæåå­ãå¤ããããã¾ãã¯å°ãªããã¾ãï¼$3 ã¨ããã¨ããã $2 ã«ãã¾ããï¼"
+
+# S1045 $1[$2]: not initialized"
+@@error_message[ :"S1045" ] = "$1[$2]: åæåããã¾ããï¼"
+
+# S1046 $1[$2]: not initialized"
+@@error_message[ :"S1046" ] = "$1[$2]: åæåããã¾ãã"
+
+# S1047 size_is pointer cannot be exposed for composite attribute"
+@@error_message[ :"S1047" ] = "size_is ãæå®ããããã¤ã³ã¿å¤æ°ã¯ï¼è¤åã»ã«ã¿ã¤ãã®å±æ§åã«é¢ãã¦ã¯ï¼å¤é¨ã¸å
+¬éãããã¨ãã§ãã¾ããï¼"
+
+# S1048 $1: size_is specified for non-pointer type"
+@@error_message[ :"S1048" ] = "$1: size_is ãéãã¤ã³ã¿åã«å¯¾ãã¦æå®ããã¾ããï¼"
+
+# S1049 $1: size_is arg not constant"
+@@error_message[ :"S1049" ] = "$1: size_is å¼æ°ãå®æ°ã§ã¯ããã¾ããï¼"
+
+# S1050 unsuitable initializer, need array initializer"
+@@error_message[ :"S1050" ] = "ä¸é©å½ãªåæåå­ã§ãï¼é
+åã®åæåå­ãå¿
+è¦ã§ãï¼"
+
+# S1051 too many initializer for array, $1 for $2"
+@@error_message[ :"S1051" ] = "é
+åã«å¯¾ããåæåå­ãå¤ããã¾ãï¼$2 ã¨ããã¨ããã $1 ã«ãã¾ããï¼"
+
+# S1052 attribute \'$1\' not initialized in cell \'$2\'"
+@@error_message[ :"S1052" ] = "å±æ§ \'$1\' ã¯ã»ã« \'$2\' ã®ä¸­ã§åæåããã¾ããï¼"
+
+# S1053 $1 must be singleton. inner cell \'$2\' is singleton"
+@@error_message[ :"S1053" ] = "$1 ã¯ã·ã³ã°ã«ãã³ã§ããå¿
+è¦ãããã¾ãï¼å
+é¨ã»ã« \'$2\' ã¯ã·ã³ã°ã«ãã³ã§ãï¼"
+
+# S1054 $1 : specified active but has no active in this celltype"
+@@error_message[ :"S1054" ] = "$1 : ã¢ã¯ãã£ãã«æå®ããã¾ãããï¼ãã®ã»ã«ã¿ã¤ãã®ä¸­ã«ã¯ã¢ã¯ãã£ããªã»ã«ãããã¾ããï¼"
+
+# S1055 $1 must be active. inner cell \'$2\' is active"
+@@error_message[ :"S1055" ] = "$1 ã¯ active ã§ããå¿
+è¦ãããã¾ã. å
+é¨ã»ã« \'$2\' ãã¢ã¯ãã£ãã§ãï¼"
+
+# S1056 $1 : cannot export, nothing designated"
+@@error_message[ :"S1056" ] = "$1 : å¤é¨ã«å
+¬éãããã¨ãã§ãã¾ããï¼ä½ãæå®ããã¦ãã¾ããï¼"
+
+# S1057 $1 not found in $2"
+@@error_message[ :"S1057" ] = "$1 ã $2 ã®ä¸­ã«è¦ã¤ããã¾ããï¼"
+
+# S1058 \'$1\' : cannot export var"
+@@error_message[ :"S1058" ] = "\'$1\' : å¤æ°ãå¤é¨ã«å
+¬éãããã¨ãã§ãã¾ããï¼"
+
+# S1059 \'$1\' : exporting attribute. write in cell or use \'=\' to export attribute"
+@@error_message[ :"S1059" ] = "\'$1\' : å±æ§ãå
+¬éãã¦ãã¾ã. ã»ã«ã®ä¸­ã«è¨è¿°ãããã¾ãã¯å±æ§ã®å
+¬éã®ããã« \'=\' ãä½¿ã£ã¦ä¸ããï¼"
+
+# S1060 \'$1\' : port type mismatch. $2 type is allowed here."
+@@error_message[ :"S1060" ] = "\'$1\' : å£(port)ã®åãæ´åãã¦ãã¾ãã. ããã§ã¯ $2 åãä½¿ç¨ã§ãã¾ãï¼"
+
+# S1061 \'$1\' : not defined"
+@@error_message[ :"S1061" ] = "\'$1\' : å®ç¾©ããã¦ãã¾ããï¼"
+
+# S1062 $1 has no export definition"
+@@error_message[ :"S1062" ] = "$1 ã«ã¯å¤é¨å®ç¾©ãããã¾ããï¼"
+
+# S1063 $1 is port but previously defined as an attribute"
+@@error_message[ :"S1063" ] = "$1 ã¯å£(port)ã§ããããããåã«å±æ§ã¨ãã¦å®ç¾©ããã¾ããï¼"
+
+# S1064 $1 : type \'$2$3\' mismatch with pprevious definition\'$4$5\'"
+@@error_message[ :"S1064" ] = "$1 : å \'$2$3\' ã¯ããä»¥åã®å®ç¾© \'$4$5\' ã¨æ´åãã¦ã¾ããï¼"
+
+# S1065 $1 : port type $2 mismatch with previous definition $3"
+@@error_message[ :"S1065" ] = "$1 : å£(port)å $2 ã¯ããä»¥åã®å®ç¾© $3 ã¨æ´åãã¦ãã¾ããï¼"
+
+# S1066 $1 : signature \'$2\' mismatch with previous definition \'$3\'"
+@@error_message[ :"S1066" ] = "$1 : ã·ã°ããã£ \'$2\' ã¯ããä»¥åã®å®ç¾© \'$3\' ã¨æ´åãã¦ãã¾ããï¼"
+
+# S1067 $1 : array size mismatch with previous definition"
+@@error_message[ :"S1067" ] = "$1 : é
+åã®ãµã¤ãºãããä»¥åã®å®ç¾©ã¨æ´åãã¦ãã¾ããï¼"
+
+# S1068 $1 : optional specifier mismatch with previous definition"
+@@error_message[ :"S1068" ] = "$1 : ãªãã·ã§ãã«ãªæå®å­ãããä»¥åã®å®ç¾©ã¨æ´åãã¦ãã¾ããï¼"
+
+# S1069 $1 is an attribute but previously defined as a port"
+@@error_message[ :"S1069" ] = "$1 ã¯å±æ§ã§ããããããåã«å£(port)ã¨ãã¦å®ç¾©ããã¾ããï¼"
+
+# S1070 $1: size_is pointer cannot be exposed for composite attribute"
+@@error_message[ :"S1070" ] = "$1: size_is ãæå®ããããã¤ã³ã¿å¤æ°ã¯ï¼è¤åã»ã«ã¿ã¤ãã®å±æ§åã«é¢ãã¦ã¯ï¼å
+¬éãããã¨ãã§ãã¾ããï¼"
+
+# S1071 $1 cannot be specified for composite"
+@@error_message[ :"S1071" ] = "$1 ã¯è¤åã»ã«ã«å¯¾ãã¦æå®ã§ãã¾ããï¼"
+
+# S1072 $1: entry port: sizeless array not supported in current version"
+@@error_message[ :"S1072" ] = "$1: åãå£: ç¾å¨ã®çã§ã¯ãµã¤ãºæªæå®ã®é
+åã¯ãµãã¼ãããã¦ãã¾ããï¼"
+
+# S1073 Not constant expression $1"
+@@error_message[ :"S1073" ] = "$1 ã¯å®æ°å¼ã§ã¯ããã¾ããï¼"
+
+# S1074 Not Integer $1"
+@@error_message[ :"S1074" ] = "$1 ã¯æ´æ°ã§ã¯ããã¾ãã"
+
+# S1075 \'$1\' signature not found"
+@@error_message[ :"S1075" ] = "\'$1\' ã·ã°ããã£ãè¦ã¤ããã¾ããï¼"
+
+# S1076 \'$1\' not signature"
+@@error_message[ :"S1076" ] = "\'$1\' ã¯ã·ã°ããã£ã§ã¯ããã¾ããï¼"
+
+# S1077 inline: cannot be specified for call port"
+@@error_message[ :"S1077" ] = "inline: å¼ã³å£ã«å¯¾ãã¦æå®ã§ãã¾ããï¼"
+
+# S1078 optional: cannot be specified for entry port"
+@@error_message[ :"S1078" ] = "optional: åãå£ã«å¯¾ãã¦æå®ã§ãã¾ããï¼"
+
+# S1079 allocator: cannot be specified for call port"
+@@error_message[ :"S1079" ] = "allocator: å¼ã³å£ã«å¯¾ãã¦æå®ã§ãã¾ããï¼"
+
+# S1080 duplicate allocator specifier"
+@@error_message[ :"S1080" ] = "ã¢ã­ã±ã¼ã¿æå®å­ãéè¤ãã¦ãã¾ãï¼"
+
+# S1081 self allocator not supported yet"
+@@error_message[ :"S1081" ] = "ã»ã«ãã¢ã­ã±ã¼ã¿ã¯ã¾ã ãµãã¼ãããã¦ãã¾ãã"
+
+# S1082 function \'$1\' not found in signature"
+@@error_message[ :"S1082" ] = "é¢æ° \'$1\' ãã·ã°ããã£ã§è¦ã¤ããã¾ãã"
+
+# S1083 \'$1\' not found in function \'$2\'"
+@@error_message[ :"S1083" ] = "\'$1\' ãé¢æ° \'$2\' ã§è¦ã¤ããã¾ãã"
+
+# S1084 \'$1\' in function \'$2\' is not send or receive"
+@@error_message[ :"S1084" ] = "\'$2\' å
+ã® \'$1\' ãåºæ¬æå®å­ send ã¾ãã¯ receive ã§ã¯ããã¾ããï¼"
+
+# S1085 duplicate allocator specifier for \'$1_$2\'"
+@@error_message[ :"S1085" ] = "\'$1_$2\' ã«å¯¾ããéè¤ããã¢ã­ã±ã¼ã¿æå®å­ã§ãï¼"
+
+# S1086 rhs not call_port.func.param for $1_$2"
+@@error_message[ :"S1086" ] = "$1_$2 ã«å¯¾ãã¦ not call_port.func.param ã®å½¢å¼ã§ã¯ããã¾ããï¼"
+
+# S1087 function \'$1\' not found in signature \'$2\'"
+@@error_message[ :"S1087" ] = "é¢æ° \'$1\' ãã·ã°ããã£ \'$2\' ã®ä¸­ã«è¦ã¤ããã¾ããï¼"
+
+# S1088 \'$1\' not found in function \'$2\'"
+@@error_message[ :"S1088" ] = "\'$1\' ãé¢æ° \'$2\' ã®ä¸­ã«è¦ã¤ããã¾ããï¼"
+
+# S1089 relay allocator send/receive mismatch between $1.$2 and $3_$4.$5"
+@@error_message[ :"S1089" ] = "ãªã¬ã¼ã¢ã­ã±ã¼ã¿ send/receive ã¯ $1.$2 åã³ $3_$4.$5 ã®éã§æ´åãã¦ãã¾ããï¼"
+
+# S1090 \'$1\' in function \'$2\' is not send or receive"
+@@error_message[ :"S1090" ] = "é¢æ° \'$2\' å
+ã® \'$1\' ã send ã¾ãã¯ receive ã§ã¯ããã¾ããï¼"
+
+# S1091 call port \'$1\' not found in celltype $2"
+@@error_message[ :"S1091" ] = "å¼ã³å£ \'$1\' ãã»ã«ã¿ã¤ã $2 ã®ä¸­ã«è¦ã¤ããã¾ããï¼"
+
+# S1092 \'$1\' not namespace"
+@@error_message[ :"S1092" ] = "\'$1\' ã¯ãã¼ã ã¹ãã¼ã¹ã§ã¯ããã¾ããï¼"
+
+# S1093 $1 : undefined cell"
+@@error_message[ :"S1093" ] = "$1 : æªå®ç¾©ã®ã»ã«ã§ã"
+
+# S1094 $1: pointer is not constant. check \'const\'"
+@@error_message[ :"S1094" ] = "$1: ãã¤ã³ã¿ãå®æ°ã§ã¯ããã¾ããï¼\'const\' ãç¢ºèªãã¦ãã ãã"
+
+# S1095 $1: not constant"
+@@error_message[ :"S1095" ] = "$1: å®æ°ã§ã¯ããã¾ãã"
+
+# S1096 $1: should be int, float, bool or pointer type"
+@@error_message[ :"S1096" ] = "$1: int, float, bool ã¾ãã¯ãã¤ã³ã¿åã§ããå¿
+è¦ãããã¾ã"
+
+# S1097 $1: has no initializer"
+@@error_message[ :"S1097" ] = "$1: åæåå­ãæã£ã¦ãã¾ãã"
+
+# S1098 $1: has unsuitable initializer"
+@@error_message[ :"S1098" ] = "$1: ä¸é©å½ãªåæåå­ãããã¾ãï¼"
+
+# S1099 array subscript not constant"
+@@error_message[ :"S1099" ] = "é
+åæ·»æ°ãå®æ°ã§ã¯ããã¾ããï¼"
+
+# S1100 $1: cannot initialize var"
+@@error_message[ :"S1100" ] = "$1: å¤æ°ãåæåã§ãã¾ããï¼"
+
+# S1101 \'$1\' cannot initialize entry port"
+@@error_message[ :"S1101" ] = "\'$1\' åãå£ãåæåã§ãã¾ããï¼"
+
+# S1102 $1: must specify array subscript here"
+@@error_message[ :"S1102" ] = "$1: ããã§ã¯é
+åæ·»æ°ãæå®ããå¿
+è¦ãããã¾ãï¼"
+
+# S1103 $1: need array subscript"
+@@error_message[ :"S1103" ] = "$1: é
+åæ·»æ°ãå¿
+è¦ã§ãï¼"
+
+# S1104 $1: need array subscript number. ex. \'[0]\'"
+@@error_message[ :"S1104" ] = "$1: é
+åæ·»æ°ã®æ°å¤ãå¿
+è¦ã§ãï¼(ä¾) \'[0]\'"
+
+# S1105 $1: cannot specify array subscript here"
+@@error_message[ :"S1105" ] = "$1: ããã§ã¯é
+åæ·»æ°ãæå®ãããã¨ãã§ãã¾ããï¼"
+
+# S1106 $1: cannot specify array subscript number. use \'[]\'"
+@@error_message[ :"S1106" ] = "$1: é
+åæ·»æ°ã®æ°å¤ãæå®ãããã¨ãåºæ¥ã¾ããï¼\'[]\' ããä½¿ããã ããï¼"
+
+# S1107 to export port, use \'cCall => composite.cCall\'"
+@@error_message[ :"S1107" ] = "å£(port)ãå¤é¨ã«å
+¬éãããã, \'cCall => composite.cCall\' ããä½¿ããã ããï¼"
+
+# S1108 $1: rhs not \'Cell.ePort\' form"
+@@error_message[ :"S1108" ] = "$1: å³è¾ºã \'Cell.ePort\' ã®å½¢å¼ã§ã¯ããã¾ããï¼"
+
+# S1109 \'$1\' not found"
+@@error_message[ :"S1109" ] = "\'$1\' ãè¦ã¤ããã¾ããï¼"
+
+# S1110 \'$1\' not cell"
+@@error_message[ :"S1110" ] = "\'$1\' ã»ã«ã§ã¯ããã¾ããï¼"
+
+# S1111 \'$1\' not found"
+@@error_message[ :"S1111" ] = "\'$1\' ãè¦ã¤ããã¾ããï¼"
+
+# S1112 \'$1\' not entry port"
+@@error_message[ :"S1112" ] = "\'$1\' åãå£ã§ã¯ããã¾ããï¼"
+
+# S1113 \'$1\' signature mismatch"
+@@error_message[ :"S1113" ] = "\'$1\' ã·ã°ããã£ãæ´åãã¦ãã¾ããï¼"
+
+# S1114 \'$1\' should be array"
+@@error_message[ :"S1114" ] = "\'$1\' é
+åã§ããå¿
+è¦ãããã¾ãï¼"
+
+# S1115 $1[$2]: subscript out of range (< $3)"
+@@error_message[ :"S1115" ] = "$1[$2]: é
+åã®æ·»æ°ãç¯å²å¤ã®å¤ã§ãï¼(< $3)"
+
+# S1116 \'$1\' entry port is not array"
+@@error_message[ :"S1116" ] = "\'$1\' åãå£ãé
+åã§ã¯ããã¾ããï¼"
+
+# S1117 \'$1\' not in celltype"
+@@error_message[ :"S1117" ] = "\'$1\' ã¯ã»ã«ã¿ã¤ãå
+ã«ããã¾ããï¼"
+
+# S1118 $1: going out from region \'$2\' not permitted"
+@@error_message[ :"S1118" ] = "$1: ãªã¼ã¸ã§ã³ $2 ãã out ãããã¨ãã§ãã¾ããï¼"
+
+# S1119 $1: going from region \'$2\' to \'$3\' not permitted"
+@@error_message[ :"S1119" ] = "$1: ãªã¼ã¸ã§ã³ $2 ãããªã¼ã¸ã§ã³ $3ã¸çµåã§ãã¾ããï¼"
+
+# S1120 $1: going in to region \'$2\' not permitted"
+@@error_message[ :"S1120" ] = "$1: ãªã¼ã¸ã§ã³ \'$2\' ã¸ in ãããã¨ãã§ãã¾ããï¼"
+
+# S1121 \'$1\' in region \'$2\' cannot be directly joined $3 in  $4"
+@@error_message[ :"S1121" ] = "ãªã¼ã¸ã§ã³ \'$2\' å
+ã® \'$1\' ã¯ç´æ¥ $4 å
+ã® $3 ã«çµåã§ãã¾ããï¼"
+
+# S1122 $1 : not port: \'through\' can be specified only for port"
+@@error_message[ :"S1122" ] = "$1 :å£(port) ã§ã¯ããã¾ãã: \'through\' ã¯å£(port)ã«å¯¾ãã¦ã®ã¿æå®ã§ãã¾ãï¼"
+
+# S1123 $1 : not port: \'through\' can be specified only for port"
+@@error_message[ :"S1123" ] = "$1 :å£(port) ã§ã¯ããã¾ãã: \'through\' ã¯å£(port)ã«å¯¾ãã¦ã®ã¿æå®ã§ãã¾ãï¼"
+
+# S1124 $1: plugin function failed: \'get_through_entry_port_name\'"
+@@error_message[ :"S1124" ] = "$1: ãã©ã°ã¤ã³é¢æ°ãå¤±æãã¾ããï¼: \'get_through_entry_port_name\'"
+
+# S1125 $1: not generated cell \'$2\'"
+@@error_message[ :"S1125" ] = "$1: çæãããã»ã« \'$2\' ã§ã¯ããã¾ããï¼"
+
+# S1126 $1: fail to new"
+@@error_message[ :"S1126" ] = "$1: new ã«å¤±æãã¾ããï¼"
+
+# S1127 \'$1\' duplicate"
+@@error_message[ :"S1127" ] = "\'$1\' ãéè¤ãã¦ãã¾ãï¼"
+
+# S1128 \'$1\' inconsistent array definition"
+@@error_message[ :"S1128" ] = "\'$1\' ã¯ä¸è²«ããªãé
+åå®ç¾©ã§ãï¼"
+
+# S1129 \'$1\' redefinition of subscript $1"
+@@error_message[ :"S1129" ] = "\'$1\' ã¯é
+åæ·»æ° $1 ã®åå®ç¾©ã§ãï¼"
+
+# S1130 \'$1\' inconsistent array definition"
+@@error_message[ :"S1130" ] = "\'$1\' ã¯ä¸è²«ããªãé
+åå®ç¾©ã§ãï¼"
+
+# S1131 \'$1.$2\' has duplicate initializer"
+@@error_message[ :"S1131" ] = "\'$1.$2\' ã«ã¯éè¤ããåæåå­ãããã¾ãï¼"
+
+# S1132 $1: 1st parameter is not string(file name)"
+@@error_message[ :"S1132" ] = "$1: ç¬¬1ãã©ã¡ã¼ã¿ã string(ãã¡ã¤ã«å) ã§ã¯ããã¾ããï¼"
+
+# S1133 $1: 2nd parameter is not string(fromat)"
+@@error_message[ :"S1133" ] = "$1: ç¬¬2ãã©ã¡ã¼ã¿ã string(ãã¡ã¤ã«å) ã§ã¯ããã¾ããï¼"
+
+# S1134 $1: unknown factory function"
+@@error_message[ :"S1134" ] = "$1: ä¸æãªãã¡ã¯ããªé¢æ°ã§ãï¼"
+
+# S1135 celltype factory can\'t have parameter(s)"
+@@error_message[ :"S1135" ] = "ã»ã«ã¿ã¤ããã¡ã¯ããªã¯ãã©ã¡ã¼ã¿ãæã¤ãã¨ãã§ãã¾ããï¼"
+
+# S1136 \'$1\': not found"
+@@error_message[ :"S1136" ] = "\'$1\': è¦ã¤ããã¾ããï¼"
+
+# S1137 \'$1\': not attribute"
+@@error_message[ :"S1137" ] = "\'$1\': å±æ§ã§ã¯ããã¾ããï¼"
+
+# S1138 internal error Factory.check_arg()"
+@@error_message[ :"S1138" ] = "Factory.check_arg() ã®å
+é¨ã¨ã©ã¼ã§ãï¼"
+
+# S1139 $1: region path mismatch. previous path: $2"
+@@error_message[ :"S1139" ] = "$1: ãªã¼ã¸ã§ã³ãã¹ãæ´åãã¦ãã¾ããï¼ä»¥åã®ãã¹: $2"
+
+# S1140 $1: region specifier must place at first appearence"
+@@error_message[ :"S1140" ] = "$1: ãªã¼ã¸ã§ã³æå®å­ã¯æåã«é
+ç½®ããå¿
+è¦ãããã¾ãï¼"
+
+# S1141 $1 duplication, previous one : $2"
+@@error_message[ :"S1141" ] = "$1 ãéè¤ãã¦ãã¾ã, ä»¥åã®å¤ : $2"
+
+# S1142 $1 not found in search path"
+@@error_message[ :"S1142" ] = "$1 ãæ¤ç´¢ãã¹ã®ä¸­ã«è¦ã¤ããã¾ããï¼"
+
+# S1143 import_C: arg2: mismatch with previous one"
+@@error_message[ :"S1143" ] = "import_C: arg2: ä»¥åã®ãã®ã¨æ´åãã¦ãã¾ããï¼"
+
+# S1144 $1: temporary C source: open error"
+@@error_message[ :"S1144" ] = "$1: ä¸æçãª C ã½ã¼ã¹: ãªã¼ãã³ã¨ã©ã¼ã§ãï¼"
+
+# S1145 $1: temporary C source: writing error"
+@@error_message[ :"S1145" ] = "$1: ä¸æçãª C ã½ã¼ã¹: æ¸è¾¼ã¿ã¨ã©ã¼ã§ãï¼"
+
+# S1146 $1: error occured while CPP"
+@@error_message[ :"S1146" ] = "$1: CPP å®è¡ä¸­ã«ã¨ã©ã¼ãçºçãã¾ããï¼"
+
+# S1147 $1: popen for CPP failed"
+@@error_message[ :"S1147" ] = "$1: CPPã«å¯¾ãã popen ãå¤±æãã¾ããï¼"
+
+# S1148 $1 not found in search path"
+@@error_message[ :"S1148" ] = "$1 ãæ¤ç´¢ãã¹ã®ä¸­ã«è¦ã¤ããã¾ããï¼"
+
+# S1149 $1 not signature"
+@@error_message[ :"S1149" ] = "$1 ã·ã°ããã£ã§ã¯ããã¾ããï¼"
+
+# S1150 $1: fail to new"
+@@error_message[ :"S1150" ] = "$1: new ã«å¤±æãã¾ããï¼"
+
+# S1151 $1: not namespace"
+@@error_message[ :"S1151" ] = "$1: ãã¼ã ã¹ãã¼ã¹ã§ã¯ããã¾ããï¼"
+
+# S1152 $1: call port cannot have fixed join"
+@@error_message[ :"S1152" ] = "$1: å¼ã³å£ã¯åºå®çµåãæã¤ãã¨ãã§ãã¾ããï¼"
+
+# "S1153 $1: cannot be entry port array for fixed join port"
+@@error_message[ :"S1153" ] = "$1: åºå®çµåã®å£ã«å¯¾ããåãå£é
+åã¯ããå¾ã¾ããï¼"
+
+# "S1154 $1: must be singleton celltype for fixed join"
+@@error_message[ :"S1154" ] = "$1: åºå®çµåã«å¯¾ããã·ã³ã°ã«ãã³ã»ã«ã¿ã¤ãã§ããå¿
+è¦ãããã¾ãï¼"
+
+# "S1155 $1: not celltype or not found"
+@@error_message[ :"S1155" ] = "$1: ã»ã«ã¿ã¤ãã§ã¯ãªããã¾ãã¯è¦ã¤ããã¾ããï¼"
+
+# "S1156 $1: not call port or not found"
+@@error_message[ :"S1156" ] = "$1: å¼ã³å£ã§ã¯ãªããã¾ãã¯è¦ã¤ããã¾ããï¼"
+
+# "S1157 $1: sized array or not array"
+@@error_message[ :"S1157" ] = "$1: ãµã¤ãºæå®ãããé
+åãã¾ãã¯é
+åã§ã¯ããã¾ããï¼"
+
+# "S1158 $1: singleton cell not found for fixed join"
+@@error_message[ :"S1158" ] = "$1: ã·ã³ã°ã«ãã³ã»ã«ãåºå®çµåã«å¯¾ãã¦è¦ã¤ããã¾ããï¼"
+
+# S1159 $1: non-size_is pointer cannot be initialized with array initializer"
+@@error_message[ :"S1159" ] = "$1: size_is æå®ããã¦ããªããã¤ã³ã¿ã¯ãé
+ååæåå­ã§åæåã§ãã¾ãã"
+
+# S1160 $1 must be constant for id"
+@@error_message[ :"S1160" ] = "$1 id ã¯å®æ°ã§ãªããã°ãªãã¾ãã"
+
+# S1161 $1 must be constant for id"
+@@error_message[ :"S1161" ] = "$1 id ã¯å®æ°ã§ãªããã°ãªãã¾ãã"
+
+# S1162 $1: id cannot be 0"
+@@error_message[ :"S1162" ] = "$1: id ã« 0 ãæå®ã§ãã¾ãã"
+
+# S1163 generate specifier duplicate"
+@@error_message[ :"S1163" ] = "generate æå®å­ãéè¤ãã¦ãã¾ã"
+
+# S1164 '$1' set_specified_id: id not positive integer '$2'"
+@@error_message[ :"S1164" ] = "'$1' id ãæ­£æ´æ°ã§ããã¾ãã '$2'"
+
+# S1165 '$1' set_specified_id: id duplicate"
+@@error_message[ :"S1165" ] = "'$1' id æå®å­ãéè¤ãã¦ãã¾ã"
+
+# S1166 $1: fail to new"
+@@error_message[ :"S1166" ] = "$1: ãã©ã°ã¤ã³ã®çæã«å¤±æãã¾ãã"
+
+# S1167 \'$1\': relay mismatch \'$2\'"
+@@error_message[ :"S1167" ] = "\'$1\': ãªã¬ã¼ã«ããããã¾ãã \'$2\'"
+
+# S1168 too many initializer for array, $1 for $2"
+@@error_message[ :"S1168" ] = "é
+ååæåå­ãå¤ããã¾ã $1 for $2"
+
+# S1169 $1: non-size_is pointer cannot be initialized with array initializer"
+@@error_message[ :"S1169" ] = "$1: size_is æå®ããã¦ããªããã¤ã³ã¿ã«é
+ååæåå­ãæå®ã§ãã¾ãã"
+
+# S1170 \'$1\' has size_is but export attr \'$2\' doesn't have"
+@@error_message[ :"S1170" ] = "\'$1\' ã« size_is æå®ããã¦ãã¾ããã¨ã¯ã¹ãã¼ããã \'$2\' ã«æå®ããã¦ãã¾ãã"
+
+# S1171 \'$1\' size_is argument of \'$2\' not exported"
+@@error_message[ :"S1171" ] = "\'$1\' \'$2\' size_is å¼æ°ãã¨ã¯ã¹ãã¼ãããã¦ãã¾ãã"
+
+# S1172 \'$1\' size_is argument mismatch with exporting one \'$2\'"
+@@error_message[ :"S1172" ] = "\'$1\' size_is å¼æ°ãã¨ã¯ã¹ãã¼ãããã¦ãã \'$2\' ã¨ä¸è´ãã¾ãã"
+
+# S1173 $1: allocator mismatch from $2's allocator"
+@@error_message[ :"S1173" ] = "$1: ã¢ã­ã±ã¼ã¿ã $2' ã®ã¢ã­ã±ã¼ã¿ã¨ä¸è´ãã¾ãã"
+
+# S1174 $1 not suitable for lhs, suitable lhs: 'func.param'"
+@@error_message[ :"S1174" ] = "$1 å·¦è¾ºãä¸é©åã§ããé©åãªå·¦è¾ºã¯ 'func.param' ã®å½¢å¼ã§ã"
+
+# S1175 $1 not found or not allocator entry port for $2"
+@@error_message[ :"S1175" ] = "$1  $2 ã®ã¢ã­ã±ã¼ã¿åãå£ãè¦å½ãããªãããã¢ã­ã±ã¼ã¿åãå£ã§ã¯ããã¾ãã"
+
+# S1176 rhs not in 'call_port.func.param' form for $1_$2"
+@@error_message[ :"S1176" ] = "å³è¾ºã 'call_port.func.param' å½¢å¼ã§ããã¾ãã ($1_$2)"
+
+# S1177 cannot specify 'through' in composite in current version"
+@@error_message[ :"S1177" ] = "ç¾å¨ã®ãã¼ã¸ã§ã³ã§ã¯ãã³ã³ãã¸ããã»ã«ã« 'through'ãæå®ã§ãã¾ãã"
+
+# S1178 $1 region type specifier duplicate, previous $2"
+@@error_message[ :"S1178" ] = "$1 ãªã¼ã¸ã§ã³ã¿ã¤ãæå®å­ãéè¤ãã¦ãã¾ããä»¥åã¯ $2 ã§ãã"
+
+### syntaxobj.rb
+# S2001 \'$1\' duplicate $2"
+@@error_message[ :"S2001" ] = "\'$1\': éè¤ãã¦ãã¾ã ($2)"
+
+# S2002 $1: $2"
+@@error_message[ :"S2002" ] = "$1: $2"
+
+# S2003 $1: $2 cannot have initializer"
+@@error_message[ :"S2003" ] = "$1: $2 ã¯åæåå­ããã¤ãã¨ãã§ãã¾ããï¼"
+
+# S2004 $1: array subscript must be specified or omit"
+@@error_message[ :"S2004" ] = "$1: é
+åæ·»æ°ã¯æå®ããããã¾ãã¯çç¥ãããå¿
+è¦ãããã¾ãï¼"
+
+# S2005 $1: array subscript must be specified"
+@@error_message[ :"S2005" ] = "$1: é
+åæ·»æ°ã¯æå®ãããå¿
+è¦ãããã¾ãï¼"
+
+# S2006 \'$1\' function"
+@@error_message[ :"S2006" ] = "\'$1\' é¢æ°ã§ãï¼"
+
+# S2007 \'$1\' $2"
+@@error_message[ :"S2007" ] = "\'$1\' $2"
+
+# S2008 $1: inconsitent with previous one"
+@@error_message[ :"S2008" ] = "$1: ä»¥åã®ãã®ã¨ä¸è²«ãã¦ãã¾ããï¼"
+
+# S2009 $1: not found or not signature"
+@@error_message[ :"S2009" ] = "$1: è¦ã¤ãããªããã¾ãã¯ã·ã°ããã£ã§ã¯ããã¾ããï¼"
+
+# S2010 $1: not allocator signature"
+@@error_message[ :"S2010" ] = "$1: ã¢ã­ã±ã¼ã¿ã·ã°ããã£ã§ã¯ããã¾ããï¼"
+
+# S2011 size_is duplicate"
+@@error_message[ :"S2011" ] = "size_is ãéè¤ãã¦ãã¾ãï¼"
+
+# S2012 count_is duplicate"
+@@error_message[ :"S2012" ] = "count_is ãéè¤ãã¦ãã¾ãï¼"
+
+# S2013 string duplicate"
+@@error_message[ :"S2013" ] = "string ãéè¤ãã¦ãã¾ãï¼"
+
+# S2014 $1 need pointer or more pointer"
+@@error_message[ :"S2014" ] = "$1 ã¯ä¸ã¤ä»¥ä¸ã®ãã¤ã³ã¿ãå¿
+è¦ã§ãï¼"
+
+# S2015 $1 must be const for \'in\' parameter $2"
+@@error_message[ :"S2015" ] = "'$1' ã¯ \'in\' ãã©ã¡ã¼ã¿ $2 ã«å¯¾ãã¦å®æ°ã§ããå¿
+è¦ãããã¾ãï¼"
+
+# S2016 $1 can not be const for $2 parameter"
+@@error_message[ :"S2016" ] = "'$1' ã¯ $2 ãã©ã¡ã¼ã¿ã«å¯¾ãã¦å®æ°æå®ã§ãã¾ããï¼ "
+
+# S2017 size_is argument is not integer type"
+@@error_message[ :"S2017" ] = "size_is å¼æ°ãæ´æ°åã§ã¯ããã¾ããï¼"
+
+# S2018 \'$1\' size_is parameter not integer"
+@@error_message[ :"S2018" ] = "\'$1\' size_is ãã©ã¡ã¼ã¿ã¯æ´æ°ã§ã¯ããã¾ããï¼"
+
+# S2019 \'$1\' size_is parameter negative or zero"
+@@error_message[ :"S2019" ] = "\'$1\' size_is ãã©ã¡ã¼ã¿ãè² æ°ã¾ãã¯ã¼ã­ã§ãï¼"
+
+# S2020 count_is argument is not integer type"
+@@error_message[ :"S2020" ] = "count_is å¼æ°ã¯æ´æ°åã§ã¯ããã¾ããï¼"
+
+# S2021 \'$1\' count_is parameter not integer"
+@@error_message[ :"S2021" ] = "\'$1\' count_is ãã©ã¡ã¼ã¿ã¯æ´æ°åã§ã¯ããã¾ããï¼"
+
+# S2022 \'$1\' count_is parameter negative or zero"
+@@error_message[ :"S2022" ] = "\'$1\' count_is ãã©ã¡ã¼ã¿ã¯è² æ°ã¾ãã¯ã¼ã­ã§ãï¼"
+
+# S2023 string argument is not integer type"
+@@error_message[ :"S2023" ] = "string å¼æ°ã¯æ´æ°åã§ã¯ããã¾ããï¼"
+
+# S2024 \'$1\' string parameter not integer"
+@@error_message[ :"S2024" ] = "\'$1\' string ãã©ã¡ã¼ã¿ã¯æ´æ°åã§ã¯ããã¾ããï¼"
+
+# S2025 \'$1\' string parameter negative or zero"
+@@error_message[ :"S2025" ] = "\'$1\' string ãã©ã¡ã¼ã¿ã¯è² æ°ã¾ãã¯ã¼ã­ã§ãï¼"
+
+# S2026 '$1' nullable specified for non-pointer type"
+@@error_message[ :"S2026" ] = "'$1' ãã¤ã³ã¿åä»¥å¤ã« nullable ãæå®ããã¾ãã"
+
+# S2027 '$1' parameter cannot be void type"
+@@error_message[ :"S2027" ] = "'$1' å¼æ°ã void åã«ã§ãã¾ãã"
+
+# S2028 '$1' max (size_is 2nd parameter) not constant"
+@@error_message[ :"S2028" ] = "'$1' max (size_is ã®ç¬¬äºå¼æ°)ãå®æ°ã§ããã¾ãã"
+
+# S2029 '$1' max (size_is 2nd parameter) negative or zero, or not integer"
+@@error_message[ :"S2029" ] = "'$1' max (size_is ã®ç¬¬äºå¼æ°) ãè² ãã¼ã­ã¾ãã¯æ´æ°ã§ã¯ããã¾ãã"
+
+# S2030 '$1' both size_is and max are const. size_is larger than max"
+@@error_message[ :"S2030" ] = "'$1' size_is max ã®ä¸¡æ¹ãå®æ°ã§. size_is ã®æ¹ã max ãè¶
+ãã¦ãã¾ã"
+
+### optimize.rb
+# S3001 $1: id too large $2 (max=$3)"
+@@error_message[ :"S3001" ] = "$1: id ã« $2 ã¯å¤§ãããã¾ã (æå¤§å¤ã¯$3)"
+
+# S3002 $1: id too large $2 (max=$3)"
+@@error_message[ :"S3002" ] = "$1: id too large $2 (max=$3)"
+
+# S3003 $1: id number '$2' conflict with $3"
+@@error_message[ :"S3003" ] = "$1: id çªå· '$2' ã¯ $3 ã¨è¡çªãã¦ãã¾ã"
+
+### types.rb
+# T1001 const duplicate"
+@@error_message[ :"T1001" ] = "const ãéè¤ãã¦ãã¾ãï¼"
+
+# T1002 volatile duplicate"
+@@error_message[ :"T1002" ] = "volatile ãéè¤ãã¦ãã¾ãï¼"
+
+# T1003 $1: unsuitable specifier for $2"
+@@error_message[ :"T1003" ] = "$1: $2 ã«å¯¾ããä¸é©åãªæå®å­ã§ãï¼"
+
+# T1004 cannot cast to $1"
+@@error_message[ :"T1004" ] = "$1 ã¸ã­ã£ã¹ãã§ãã¾ããï¼"
+
+# T1005 \'$1\' not defined"
+@@error_message[ :"T1005" ] = "\'$1\' ã¯å®ç¾©ããã¦ãã¾ããï¼"
+
+# T1006 \'$1\' not type name. expecting type name here"
+@@error_message[ :"T1006" ] = "\'$1\' ã¯ååã§ã¯ããã¾ããï¼ããã¯ååãå¿
+è¦ã§ãï¼"
+
+# T1007 $1: void type variable cannot have initializer"
+@@error_message[ :"T1007" ] = "$1: void åå¤æ°ã¯åæåå­ããã¤ãã¨ãã§ãã¾ããï¼"
+
+# T1008 ambigous signed or unsigned"
+@@error_message[ :"T1008" ] = "ç¬¦å·ä»ãã§ãããã¾ãã¯ç¬¦å·ç¡ãã§ããããææ§ã§ãï¼"
+
+# T1009 $1: $2: not integer"
+@@error_message[ :"T1009" ] = "$1: $2: æ´æ°ã§ã¯ããã¾ããï¼"
+
+# T1010 $1: initializer is not constant"
+@@error_message[ :"T1010" ] = "$1: åæåå­ã¯å®æ°ã§ã¯ããã¾ããï¼"
+
+# T1011 $1: need cast to assign float to integer"
+@@error_message[ :"T1011" ] = "$1: æµ®åå°æ°ç¹åããæ´æ°åã¸å²ãå½ã¦ã®ããã«ã­ã£ã¹ããå¿
+è¦ã§ãï¼"
+
+# T1012 $1: $2: not integer"
+@@error_message[ :"T1012" ] = "$1: $2: æ´æ°ã§ã¯ããã¾ããï¼"
+
+# T1013 $1: too large (max=$2)"
+@@error_message[ :"T1013" ] = "$1: å¤ãå¤§ãããã¾ã (max=$2)"
+
+# T1014 $1: too large negative value (min=-$2)"
+@@error_message[ :"T1014" ] = "$1: è² æ°ã®çµ¶å¯¾å¤ãå¤§ãããã¾ãï¼(min=-$2)"
+
+# T1015 $1: negative value for unsigned"
+@@error_message[ :"T1015" ] = "$1: ç¬¦å·ç¡ãæ´æ°åã«å¯¾ãè² æ°å¤ãä½¿ç¨ããã¦ãã¾ãï¼"
+
+# T1016 $1: too large (max=$2)"
+@@error_message[ :"T1016" ] = "$1: å¤ãå¤§ãããã¾ãï¼(max=$2)"
+
+# T1017 $1: unsuitable initializer for scalar type"
+@@error_message[ :"T1017" ] = "$1: ã¹ã«ã©ã¼åã«å¯¾ããä¸é©å½ãªåæåå­ã§ãï¼"
+
+# T1018 $1: $2: not number"
+@@error_message[ :"T1018" ] = "$1: $2: æ°å¤ã§ã¯ããã¾ããï¼"
+
+# T1019 $1: initializer is not constant"
+@@error_message[ :"T1019" ] = "$1: åæåå­ã¯å®æ°ã§ã¯ããã¾ããï¼"
+
+# T1020 $1: unsuitable initializer for scalar type"
+@@error_message[ :"T1020" ] = "$1: ã¹ã«ã©ã¼åã«å¯¾ããä¸é©å½ãªåæåå­ã§ãï¼"
+
+# T1021 \'$1\': struct not defined"
+@@error_message[ :"T1021" ] = "\'$1\': æ§é ä½ãå®ç¾©ããã¦ãã¾ããï¼"
+
+# T1022 struct $1: not defined"
+@@error_message[ :"T1022" ] = "æ§é ä½ $1: å®ç¾©ããã¦ãã¾ããï¼"
+
+# T1023 struct $1: not defined"
+@@error_message[ :"T1023" ] = "æ§é ä½ $1: å®ç¾©ããã¦ãã¾ããï¼"
+
+# T1024 $1: unsuitable initializer for struct"
+@@error_message[ :"T1024" ] = "$1: æ§é ä½ã«å¯¾ããä¸é©å½ãªåæåå­ã§ãï¼"
+
+# T1025 size_is argument is not integer type"
+@@error_message[ :"T1025" ] = "size_is å¼æ° ã¯æ´æ°åã§ã¯ããã¾ããï¼"
+
+# T1026 count_is argument is not integer type"
+@@error_message[ :"T1026" ] = "count_is å¼æ° ã¯æ´æ°åã§ã¯ããã¾ããï¼"
+
+# T1027 string argument is not integer type"
+@@error_message[ :"T1027" ] = "string å¼æ°ã¯æ´æ°åã§ã¯ããã¾ããï¼"
+
+# T1028 $1: cannot initialize function pointer"
+@@error_message[ :"T1028" ] = "$1: é¢æ°ãã¤ã³ã¿ãåæåãããã¨ã¯ã§ãã¾ããï¼"
+
+# T1029 oneway function cannot return type \'$1$2\', \'void\' or \'ER\' is permitted"
+@@error_message[ :"T1029" ] = "ä¸æ¹åé¢æ°ã¯å \'$1$2\' ãè¿ããã¨ãã§ãã¾ããï¼\'void\' ã¾ãã¯ \'ER\' ãä½¿ç¨ã§ãã¾ãï¼"
+
+# T1030 oneway function cannot have $1 parameter for \'$2\'"
+@@error_message[ :"T1030" ] = "ä¸æ¹åé¢æ°ã¯ \'$2\' ã®ããã« $1 ãã©ã¡ã¼ã¿ãæã¤ãã¨ãã§ãã¾ããï¼"
+
+# T1031 $1: unsuitable initializer for array"
+@@error_message[ :"T1031" ] = "$1: é
+åã«å¯¾ããä¸é©å½ãªåæåå­ã§ãï¼"
+
+# T1032 $1: incompatible pointer type"
+@@error_message[ :"T1032" ] = "$1: äºææ§ã®ãªããã¤ã³ã¿åã§ãï¼"
+
+# T1033 $1: need cast to assign integer to pointer"
+@@error_message[ :"T1033" ] = "$1: æ´æ°åããã¤ã³ã¿ã¸å²ãå½ã¦ãããã«ã¯ã­ã£ã¹ããå¿
+è¦ã§ãï¼"
+
+# T1034 $1: unsuitable string constant"
+@@error_message[ :"T1034" ] = "$1: ä¸é©å½ãªæå­åå®æ°ã§ãï¼"
+
+# T1035 $1: unsuitable initializer for pointer"
+@@error_message[ :"T1035" ] = "$1: ãã¤ã³ã¿ã«å¯¾ããä¸é©å½ãªåæåå­ã§ãï¼"
+
+# T1036 $1: unsuitable initializer for pointer"
+@@error_message[ :"T1036" ] = "$1: ãã¤ã³ã¿ã«å¯¾ããä¸é©å½ãªåæåå­ã§ãï¼"
+
+# T1037 $1: not number"
+@@error_message[ :"T1037" ] = "$1: æ°å¤ã§ã¯ããã¾ãã"
+
+# T1038 $1: initializer type mismatch. '$2' & '$3'"
+@@error_message[ :"T1038" ] = "$1: åæåå­ã®åãä¸è´ãã¾ãã. '$2' ã¨ '$3'"
+
+# T1039 $1: struct tag mismatch $2 and $3"
+@@error_message[ :"T1039" ] = "$1: æ§é ä½ã¿ã°ã $2 ã¨ $3 ã§ä¸è´ãã¾ãã"
+
+# T1040 $1 specified for void pointer type"
+@@error_message[ :"T1040" ] = "$1 void ãã¤ã³ã¿åã«æå®ããã¾ãã"
+
+### gen_xml.rb
+# T2001 fail to create XML file $1"
+@@error_message[ :"T2001" ] = "XML ãã¡ã¤ã« $1 ã®çæã«å¤±æãã¾ãã"
+
+# TEMPORAL set_definition_join: uninitialized array member"
+@@error_message[ :"TEMPORAL" ] = "set_definition_join: é
+åã¡ã³ããåæåããã¦ãã¾ããï¼"
+
+# V1001 $1: unable for $2"
+@@error_message[ :"V1001" ] = "$1: unable for $2"
+
+# V1002 $1: cannot cast to bool (implicitly)"
+@@error_message[ :"V1002" ] = "$1: ãã¼ã«åã¸ã®(æé»çãª)ã­ã£ã¹ããè¡ããã¨ãã§ãã¾ããï¼"
+
+# V1003 $1: cannot cast to integer (implicitly)"
+@@error_message[ :"V1003" ] = "$1: æ´æ°åã¸ã®(æé»çãª)ã­ã£ã¹ããè¡ããã¨ãã§ãã¾ããï¼"
+
+# V1004 $1: cannot cast to float (implicitly)"
+@@error_message[ :"V1004" ] = "$1: æµ®åå°æ°ç¹åã¸ã®(æé»çãª)ã­ã£ã¹ããè¡ããã¨ãã§ãã¾ããï¼"
+
+# V1005 Cannot cast pointer to float"
+@@error_message[ :"V1005" ] = "ãã¤ã³ã¿åãæµ®åå°æ°ç¹åã¸ã­ã£ã¹ããè¡ããã¨ãã§ãã¾ããï¼"
+
+# V1006 pointer value cannot cast to $1"
+@@error_message[ :"V1006" ] = "ãã¤ã³ã¿å¤ã¯ $1 ã¸ã­ã£ã¹ããè¡ããã¨ãã§ãã¾ããï¼"
+
+# V1007 convert pointer value to bool"
+@@error_message[ :"V1007" ] = "ãã¤ã³ã¿å¤ããã¼ã«åã¸å¤æãã¾ããï¼"
+
+# V1008 convert pointer value to integer without cast"
+@@error_message[ :"V1008" ] = "ãã¤ã³ã¿å¤ãã­ã£ã¹ãç¡ãã§æ´æ°åã¸å¤æãã¾ããï¼"
+
+# V1009 / : divieded by zero"
+@@error_message[ :"V1009" ] = "/ : ã¼ã­é¤ç®ã¨ã©ã¼ã§ãï¼"
+
+# V1010 / : divieded by zero"
+@@error_message[ :"V1010" ] = "/ : ã¼ã­é¤ç®ã¨ã©ã¼ã§ãï¼"
+
+# V1011 % : divieded by zero"
+@@error_message[ :"V1011" ] = "% : ã¼ã­é¤ç®ã¨ã©ã¼ã§ãï¼"
+
+# V1012 % : divieded by zero"
+@@error_message[ :"V1012" ] = "% : ã¼ã­é¤ç®ã¨ã©ã¼ã§ãï¼"
+
+# V1013 integer value cannot cast to $1"
+@@error_message[ :"V1013" ] = "æ´æ°å¤ã¯ $1 ã¸ã­ã£ã¹ããè¡ããã¨ãã§ãã¾ããï¼"
+
+# V1014 comparing bool value with \'$1\'"
+@@error_message[ :"V1014" ] = "ãã¼ã«å¤ã \'$1\' ã¨æ¯è¼ãã¾ããï¼"
+
+# V1015 comparing bool value with \'$1\'"
+@@error_message[ :"V1015" ] = "ãã¼ã«å¤ã \'$1\' ã¨æ¯è¼ãã¾ããï¼"
+
+# V1016 bool value cannot cast to $1"
+@@error_message[ :"V1016" ] = "ãã¼ã«å¤ã¯ $1 ã¸ã­ã£ã¹ããè¡ããã¨ãã§ãã¾ããï¼"
+
+# V1017 / : divieded by zero"
+@@error_message[ :"V1017" ] = "/ : ã¼ã­é¤ç®ã¨ã©ã¼ã§ãï¼"
+
+# V1018 % : divieded by zero"
+@@error_message[ :"V1018" ] = "% : ã¼ã­é¤ç®ã¨ã©ã¼ã§ãï¼"
+
+# V1019 floating value cannot cast to $1"
+@@error_message[ :"V1019" ] = "æµ®åå°æ°ç¹å¤ã¯ $1 ã¸ã®ã­ã£ã¹ããè¡ããã¨ãã§ãã¾ããï¼"
+
+# V1020 convert floating value to bool without cast"
+@@error_message[ :"V1020" ] = "æµ®åå°æ°ç¹å¤ãã­ã£ã¹ãç¡ãã§ãã¼ã«åã¸å¤æãã¾ããï¼"
+
+# V1021 convert floating value to integer without cast"
+@@error_message[ :"V1021" ] = "æµ®åå°æ°ç¹åãã­ã£ã¹ãç¡ãã§æ´æ°åã¸å¤æãã¾ããï¼"
+
+# V1022 string cannot cast to integer"
+@@error_message[ :"V1022" ] = "æå­åã¯æ´æ°åã«ã­ã£ã¹ãã§ãã¾ãã"
+
+# V1023 string cannot cast to float"
+@@error_message[ :"V1023" ] = "æå­åã¯æµ®åå°æ°ç¹åã«ã­ã£ã¹ãã§ãã¾ãã"
+
+# V1024 string cannot cast to pointer"
+@@error_message[ :"V1024" ] = "æå­åã¯ãã¤ã³ã¿åã«ã­ã£ã¹ãã§ãã¾ãã"
+
+# V1025 string cannot cast to $1"
+@@error_message[ :"V1025" ] = "æå­åã¯ $1 ã«ã­ã£ã¹ãã§ãã¾ãã"
+
+###
+# warning ã¡ãã»ã¼ã¸
+@@warning_message = {}
+
+### componentobj.rb
+# W1001 \'$1\': unknown context type. usually specifiy task, non-task or any"
+@@warning_message[ :"W1001" ] = "\'$1\': ä¸æãªã³ã³ãã­ã¹ãåã§ãï¼éå¸¸ task, non-task ã¾ãã¯ any ãæå®ãã¦ä¸ããï¼"
+
+# W1002 $1: non-active celltype has no entry port & factory"
+@@warning_message[ :"W1002" ] = "$1: éã¢ã¯ãã£ããªã»ã«ã¿ã¤ããåãå£åã³ãã¡ã¯ããªãæã£ã¦ãã¾ããï¼"
+
+# W1003 $1 : require call port overridden in $2"
+@@warning_message[ :"W1003" ] = "$1 : ãªã¯ã¯ã¤ã¢å¼ã³å£ã $2 ã§ãªã¼ãã¼ã©ã¤ãããã¾ããï¼"
+
+# W1004 $1 : specified singleton but has no singleton in this celltype"
+@@warning_message[ :"W1004" ] = "$1 : specified singleton but has no singleton in this celltype"
+
+# W1005 $1 : idx_is_id is ineffective for composite celltype"
+@@warning_message[ :"W1005" ] = "$1 : idx_is_id ã¯è¤åã»ã«ã¿ã¤ãã«å¯¾ãã¦ã¯ç¡å¹ã§ãï¼"
+
+# W1006 $1 : only prototype, unused and undefined cell"
+@@warning_message[ :"W1006" ] = "$1 : ãã­ãã¿ã¤ãã®ã¿ï¼æªä½¿ç¨ï¼ãã¤æªå®ç¾©ã®ã»ã«ã§ãï¼"
+
+# W1007 $1 : non-active cell has no entry join and no factory"
+@@warning_message[ :"W1007" ] = "$1 : éã¢ã¯ãã£ãã»ã«ã«åãå£ã®çµååã³ãã¡ã¯ããªãããã¾ããï¼"
+
+# W1008 $1: reuse designation mismatch with previous import"
+@@warning_message[ :"W1008" ] = "$1: åä½¿ç¨ã®æç¤ºãä»¥åã®ã¤ã³ãã¼ãã®ã¨æ´åãã¾ããï¼"
+
+# "W1009 $1: fixed join entry port has multi join"
+@@warning_message[ :"W1009" ] = "$1: åºå®çµååãå£ãè¤æ°ã®çµåãæã£ã¦ãã¾ãï¼"
+
+### types.rb
+# W2001 signed int$1_t: obsolete. use int$2_t"
+@@warning_message[ :"W2001" ] = "signed int$1_t: æ¨å¥¨ããã¾ããï¼int$2_t ããä½¿ããã ããï¼"
+
+# W2002 unsinged int$1_t: obsolete. use uint$2_t"
+@@warning_message[ :"W2002" ] = "unsinged int$1_t: æ¨å¥¨ããã¾ããï¼uint$2_t ããä½¿ããã ããï¼"
+
+# W2003 $1: too large to cast to $2, clipped($3)"
+@@warning_message[ :"W2003" ] = "$1: $2 ã¸ã­ã£ã¹ãããã®ã«å¤§ãããã¾ãï¼åãè©°ãã¾ãã($3)"
+
+# W2004 $1: too small to cast to $2, clipped($3)"
+@@warning_message[ :"W2004" ] = "$1: $2 ã¸ã­ã£ã¹ãããã®ã«å°ãããã¾ãï¼åãè©°ãã¾ãã($3)"
+
+# W2005 $1: negative value for unsigned: convert to $2"
+@@warning_message[ :"W2005" ] = "$1: ç¬¦å·ç¡ãæ´æ°åã«å¯¾ãã¦è² æ°å¤ã§ã : $2 ã¸å¤æãã¾ããï¼"
+
+### syntaxobj.rb
+# W3001 $1: duplicate"
+@@warning_message[ :"W3001" ] = "$1: éè¤ãã¦ãã¾ãï¼"
+
+# W3002 $1: this string might cause buffer over run"
+@@warning_message[ :"W3002" ] = "$1: ãã®æå­åã¯ãããã¡ã¼ãªã¼ãã¼ã©ã³ãå¼ãèµ·ããããããã¾ããï¼"
+
+# W3003 $1 pointer level mismatch"
+@@warning_message[ :"W3003" ] = "$1 ãã¤ã³ã¿ã¼ã¬ãã«ã®ä¸æ´åã§ãï¼"
+
+# W3004 $1 pointer type has returned. specify deviate or stop return pointer"
+@@error_message[ :"W3004" ] = "$1 ãã¤ã³ã¿åãè¿ããã¾ãããdeviate ãæå®ããããã¤ã³ã¿ãè¿ãã®ãæ­¢ãã¦ãã ãã"
+
+# W3005 '$1' size_is always lower than max. max is ignored"
+@@error_message[ :"W3005" ] = "'$1' size_is ã¯å¸¸ã« max ããå°ãã. max ã¯ç¡è¦ããã¾ã"
+
+### bnf.y.rb
+# W5001 bool: obsolete type. use bool_t"
+@@warning_message[ :"W5001" ] = "bool: æ¨å¥¨ãããªããã¼ã¿åã§ãï¼bool_t ããä½¿ããã ããï¼"
+
+# W5002 float: obsolete type. use float32_t"
+@@warning_message[ :"W5002" ] = "float: æ¨å¥¨ãããªããã¼ã¿åã§ãï¼float32_t ããä½¿ããã ããï¼"
+
+# W5003 double: obsolete type. use double64_t"
+@@warning_message[ :"W5003" ] = "double: æ¨å¥¨ãããªããã¼ã¿åã§ãï¼double64_t ããä½¿ããã ããï¼"
+
+# W5004 char: obsolete type. use char_t"
+@@warning_message[ :"W5004" ] = "char: æ¨å¥¨ãããªããã¼ã¿åã§ãï¼char_t ããä½¿ããã ããï¼"
+
+# W5005 int8: obsolete. use int8_t"
+@@warning_message[ :"W5005" ] = "int8: æ¨å¥¨ããã¾ããï¼int8_t ããä½¿ããã ããï¼"
+
+# W5006 int16: obsolete. use int16_t"
+@@warning_message[ :"W5006" ] = "int16: æ¨å¥¨ããã¾ããï¼int16_t ããä½¿ããã ããï¼"
+
+# W5007 int32: obsolete. use int32_t"
+@@warning_message[ :"W5007" ] = "int32: æ¨å¥¨ããã¾ããï¼int32_t ããä½¿ããã ããï¼"
+
+# W5008 int64: obsolete. use int64_t"
+@@warning_message[ :"W5008" ] = "int64: æ¨å¥¨ããã¾ããï¼int64_t ããä½¿ããã ããï¼"
+
+# W5009 int64: obsolete. use int64_t"
+@@warning_message[ :"W5009" ] = "int64: æ¨å¥¨ããã¾ããï¼int64_t ããä½¿ããã ããï¼"
+
+# W5010 need 'void' for no parameter"
+@@warning_message[ :"W5010" ] = "ãã©ã¡ã¼ã¿ãå­å¨ããªãå ´å 'void' ãå¿
+è¦ã§ã"
+
+# W5011 need 'void' for no parameter"
+@@warning_message[ :"W5011" ] = "ãã©ã¡ã¼ã¿ãå­å¨ããªãå ´å 'void' ãå¿
+è¦ã§ã"
+
+### C_parser.y.rb
+# W6001 need 'void' for no parameter"
+@@warning_message[ :"W6001" ] = "ãã©ã¡ã¼ã¿ãå­å¨ããªãå ´å 'void' ãå¿
+è¦ã§ã"
+
+# W6002 need 'void' for no parameter"
+@@warning_message[ :"W6002" ] = "ãã©ã¡ã¼ã¿ãå­å¨ããªãå ´å 'void' ãå¿
+è¦ã§ã"
+
+# W6003 need 'void' for no parameter"
+@@warning_message[ :"W6003" ] = "ãã©ã¡ã¼ã¿ãå­å¨ããªãå ´å 'void' ãå¿
+è¦ã§ã"
+
+# W6004 need 'void' for no parameter"
+@@warning_message[ :"W6004" ] = "ãã©ã¡ã¼ã¿ãå­å¨ããªãå ´å 'void' ãå¿
+è¦ã§ã"
+
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_file_en_US.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_file_en_US.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_file_en_US.rb	(revision 270)
@@ -0,0 +1,349 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: messages_file_en_US.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+
+# File Messages for en_US 
+class TECSMsg
+
+## generate.rb ##
+
+@@comment = {}
+
+# MSg.note
+# @@comment[ :note ] = " * ãã®ãã¡ã¤ã«ã¯ tecsgen ã«ããèªåçæããã¾ãã
+#  * ãã®ãã¡ã¤ã«ãç·¨éãã¦ä½¿ç¨ãããã¨ã¯ãæå³ããã¦ãã¾ãã
+# "
+@@comment[ :note ] = " * This file was automatically generated by tecsgen.
+ * This file is not intended to be edited.
+"
+
+# @@comment[ :preamble_note ] = "/* #[<PREAMBLE>]#
+#  * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+#  * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+# "
+@@comment[ :preamble_note ] = "/* #[<PREAMBLE>]#
+ * Don't edit the comments between #[<...>]# and #[</...>]#
+ * These comment are used by tecsmerege when merging.
+"
+
+# @@comment[ :postamble_note ] = "/* #[<POSTAMBLE>]#
+#  *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+#  * #[</POSTAMBLE>]#*/
+# "
+@@comment[ :postamble_note ] = "/* #[<POSTAMBLE>]#
+ *   Put non-entry functions below.
+ * #[</POSTAMBLE>]#*/
+"
+
+# @@comment[ :template_note ] = "/*
+#  * ãã®ãã¡ã¤ã«ã¯ tecsgen ã«ãããã³ãã¬ã¼ãã¨ãã¦èªåçæããã¾ãã
+#  * ãã®ãã¡ã¤ã«ãç·¨éãã¦ä½¿ç¨ãããã¨ãæå³ããã¦ãã¾ãã
+#  * tecsgen ã®åå®è¡ã«ããä¸æ¸ãããã¦ãã¾ããããéå¸¸
+#  *   gen/%s_template.c => src/%s.c
+#  * ã®ããã«åå, ãã©ã«ããå¤æ´ãã¦ããä¿®æ­£ãã¾ã
+#  */
+# "
+@@comment[ :template_note ] = "/*
+ * This file was automatically generated by tecsgen.
+ * Move and rename like below before editing,
+ *   gen/%s_template.c => src/%s.c
+ * to avoid to be overwritten by tecsgen.
+ */
+"
+
+# @@comment[ :inline_template_note ] = "/*
+#  * ãã®ãã¡ã¤ã«ã¯ tecsgen ã«ãããã³ãã¬ã¼ãã¨ãã¦èªåçæããã¾ãã
+#  * ãã®ãã¡ã¤ã«ãç·¨éãã¦ä½¿ç¨ãããã¨ãæå³ããã¦ãã¾ãã
+#  * tecsgen ã®åå®è¡ã«ããä¸æ¸ãããã¦ãã¾ããããéå¸¸
+#  *   gen/%s_inline_template.h => src/%s_inline.h
+#  * ã®ããã«åå, ãã©ã«ããå¤æ´ãã¦ããä¿®æ­£ãã¾ã
+#  */
+# "
+@@comment[ :inline_template_note ] = "/*
+ * This file was automatically generated by tecsgen.
+ * Move and rename like below before editing,
+ *   gen/%s_inline_template.h => src/%s_inline.h
+ * to avoid to be overwritten by tecsgen.
+ */
+"
+
+# @@comment[ :Makefile_note ] = "# ãã®ãã¡ã¤ã«ã¯ tecsgen ã«ããèªåçæããã¾ãã
+# # Makefile.temp ã¯ gen ã®ä¸ã¤ä¸ã®ãã£ã¬ã¯ããªã«ç§»ãã¦ä½¿ç¨ãã¾ã
+# #  % mv Makefile.temp Makefile
+# # 
+# # clean ã®ããã©ã«ãåä½ã¯ $(GEN_DIR)/Makefile.* ãåé¤ãã¾ã
+# 
+# "
+@@comment[ :Makefile_note ] = "# This file was automatically generated by tecsgen.
+# Move Makefile.temp upper directory like below before editing.
+#  % mv Makefile.temp Makefile
+# 
+# \"make clean\" deletes $(GEN_DIR)/Makefile.* by default.
+#
+# This file is generated suitable for GNU make and a target on POSIX environemnt using gcc.
+# You might have to adjust vpath, CFLAGS, OTHER_OBJS, etc.
+# For other target you have to modify this file.
+
+"
+
+# @@comment[ :oneway_ercd_note ] = "/* oneway ã®å ´å E_OK ããè¿ãã¾ãã */"
+@@comment[ :oneway_ercd_note ] = "/* Oneway function always returns E_OK. */"
+
+# @@comment[ :ercd_note ] = "/* ã¨ã©ã¼å¦çã³ã¼ããããã«è¨è¿°ãã¾ã */"
+@@comment[ :ercd_note ] = "/* Write error processing code here */"
+
+# @@comment[ :IMP_comment ] = "\n/* import_C ã«ãã import ãããããã %s */\n"
+@@comment[ :IMP_comment ] = "\n/* header imported by import_C %s */\n"
+
+# @@comment[ :MVAR_comment ] = "# å¤æ° %s\n"
+@@comment[ :MVAR_comment ] = "# var %s\n"
+
+# @@comment[ :MRUL_comment ] = "# ã«ã¼ã« %s\n"
+@@comment[ :MRUL_comment ] = "# Rule %s\n"
+
+# @@comment[ :TCM_comment ] = "# ãã³ãã¬ã¼ãã³ã¼ãã§ã¡ã¼ã¯ãã¦ã¿ãå ´å %s\n"
+@@comment[ :TCM_comment ] = "# in case build with template code %s\n"
+
+# @@comment[ :MDEP_comment ] = "\n# depend ã include %s\n"
+@@comment[ :MDEP_comment ] = "\n# include dependcy %s\n"
+
+# @@comment[ :SDI_comment ] = "/* ã·ã°ããã£ãã£ã¹ã¯ãªãã¿åç
+§ããã %s */\n"
+@@comment[ :SDI_comment ] = "/* descriptor referencing signature header %s */\n"
+
+# @@comment[ :SD_comment ] = "/* ã·ã°ããã£ãã£ã¹ã¯ãªãã¿ %s */\n"
+@@comment[ :SD_comment ] = "/* signature descriptor %s */\n"
+
+# @@comment[ :SFT_comment ] = "/* ã·ã°ããã£é¢æ°ãã¼ãã« %s */\n"
+@@comment[ :SFT_comment ] = "/* signature function table %s */\n"
+
+# @@comment[ :SDES_comment ] = "/* ã·ã°ããã£ãã£ã¹ã¯ãªãã¿(åççµåç¨) %s */\n"
+@@comment[ :SDES_comment ] = "/* signature descriptor %s for dynamic join */\n"
+
+# @@comment[ :IRTH_comment ] = "/* ã©ã³ã¿ã¤ã ããã %s */\n"
+
+# @@comment[ :UDF_comment ] = "/* inline ã®ããã® undef %s */\n"
+@@comment[ :UDF_comment ] = "/* undef for inline %s */\n"
+
+# @@comment[ :IGH_comment ] = "/* ã°ã­ã¼ãã«ããã %s */\n"
+@@comment[ :IGH_comment ] = "/* global header %s */\n"
+
+# @@comment[ :ISH_comment ] = "/* ã·ã°ããã£ããã %s */\n"
+@@comment[ :ISH_comment ] = "/* signature header %s */\n"
+
+# @@comment[ :ICT_comment ] = "/* æé©åã®ããåç
+§ããã»ã«ã¿ã¤ãã® CB åã®å®ç¾©ãåè¾¼ã %s */\n"
+@@comment[ :ICT_comment ] = "/* to get the definition of CB type of referenced celltype for optimization %s */\n"
+
+# @@comment[ :NIDB_comment ] = "ID ã®ãã¼ã¹ "
+@@comment[ :NIDB_comment ] = "ID Base "
+
+# @@comment[ :NCEL_comment ] = "ã»ã«ã®åæ°"
+@@comment[ :NCEL_comment ] = " number of cells"
+
+# @@comment[ :CVI_comment ] = "/* IDXã®æ­£å½æ§ãã§ãã¯ãã¯ã­ %s */\n"
+@@comment[ :CVI_comment ] = "/* IDX validation macro %s */\n"
+
+# @@comment[ :CVIA_comment ] = "/* IDXã®æ­£å½æ§ãã§ãã¯ãã¯ã­ï¼ç­ç¸®å½¢ï¼ %s */\n"
+@@comment[ :CVIA_comment ] = "/* IDX validation macro (abbrev.) %s */\n"
+
+# @@comment[ :NCPA_comment ] = "/* å¼ã³å£é
+åã®å¤§ãããå¾ããã¯ã­ %s */\n"
+@@comment[ :NCPA_comment ] = "/* call port array size macro %s */\n"
+
+# @@comment[ :NEPA_comment ] = "/* åãå£é
+åã®å¤§ãããå¾ããã¯ã­ %s */\n"
+@@comment[ :NEPA_comment ] = "/* entry port array size macro %s */\n"
+
+# @@comment[ :TOCP_comment ] = "/* optional å¼ã³å£ããã¹ããããã¯ã­ %s */\n"
+@@comment[ :TOCP_comment ] = "/* optional call port test macro %s */\n"
+
+# @@comment[ :TOCPA_comment ] = "/* optional å¼ã³å£ããã¹ããããã¯ã­ï¼ç­ç¸®å½¢ï¼ %s */\n"
+@@comment[ :TOCPA_comment ] = "/* optional call port test macro (abbrev) %s */\n"
+
+# @@comment[ :GCB_comment ] = "\n/* ã»ã«CBãå¾ããã¯ã­ %s */\n"
+@@comment[ :GCB_comment ] = "\n/* celll CB macro %s */\n"
+
+# @@comment[ :GCBA_comment ] = "\n/* ã»ã«CBãå¾ããã¯ã­(ç­ç¸®å½¢) %s */\n"
+@@comment[ :GCBA_comment ] = "\n/* cell CB macro (abbrev) %s */\n"
+
+# @@comment[ :CCT_comment ] = "/* CELLCB å(ç­ç¸®å½¢) %s */\n"
+@@comment[ :CCT_comment ] = "/* CELLCB type (abbrev) %s */\n"
+
+# @@comment[ :CTIXA_comment ] = "/* ã»ã«ã¿ã¤ãã®IDXå(ç­ç¸®å½¢) %s */\n"
+@@comment[ :CTIXA_comment ] = "/* celltype IDX type (abbrev) %s */\n"
+
+# @@comment[ :AAM_comment ] = "\n/* å±æ§ã¢ã¯ã»ã¹ãã¯ã­ %s */\n"
+@@comment[ :AAM_comment ] = "\n/* attr access  %s */\n"
+
+# @@comment[ :VAM_comment ] = "\n/* var ã¢ã¯ã»ã¹ãã¯ã­ %s */\n"
+@@comment[ :VAM_comment ] = "\n/* var access macro %s */\n"
+
+# @@comment[ :AAMA_comment ] = "\n/* å±æ§ã¢ã¯ã»ã¹ãã¯ã­(ç­ç¸®å½¢) %s */\n"
+@@comment[ :AAMA_comment ] = "\n/* attr access macro (abbrev) %s */\n"
+
+# @@comment[ :VAMA_comment ] = "\n/* var ã¢ã¯ã»ã¹ãã¯ã­(ç­ç¸®å½¢) %s */\n"
+@@comment[ :VAMA_comment ] = "\n/* var access macro (abbrev) %s */\n"
+
+# @@comment[ :CPM_comment ] = " /* å¼ã³å£é¢æ°ãã¯ã­ %s */\n"
+@@comment[ :CPM_comment ] = " /* call port function macro %s */\n"
+
+# @@comment[ :CPMA_comment ] = "/* å¼ã³å£é¢æ°ãã¯ã­ï¼ç­ç¸®å½¢ï¼%s */\n"
+@@comment[ :CPMA_comment ] = "/* call port function macro (abbrev) %s */\n"
+
+# @@comment[ :EPM_comment ] = "\n/* åãå£é¢æ°ãã¯ã­ï¼ç­ç¸®å½¢ï¼ %s */\n"
+@@comment[ :EPM_comment ] = "\n/* entry port function macro (abbrev) %s */\n"
+
+# @@comment[ :CTIX_comment ] = "\n/* ã»ã«ã¿ã¤ãã®IDXå %s */\n"
+@@comment[ :CTIX_comment ] = "\n/* celltype IDX type %s */\n"
+
+# @@comment[ :EPP_comment ] = "\n/* åãå£é¢æ°ãã­ãã¿ã¤ãå®£è¨ %s */\n"
+@@comment[ :EPP_comment ] = "\n/* prototype declaration of entry port function %s */\n"
+
+# @@comment[ :EPSP_comment ] = "\n/* åãå£ã¹ã±ã«ãã³é¢æ°ãã­ãã¿ã¤ãå®£è¨ï¼VMTä¸è¦æé©åã«ããåç
+§ãããã®ï¼ %s */\n"
+@@comment[ :EPSP_comment ] = "\n/* prototype declaration of entry port function (referenced when VMT useless optimise enabled) %s */\n"
+
+# @@comment[ :INL_comment ] = "/* inline ãããã® include %s */\n"
+@@comment[ :INL_comment ] = "/*  include inline header %s */\n"
+
+# @@comment[ :CIP_comment ] = "/* ã»ã« INIB åå®£è¨ %s */\n"
+@@comment[ :CIP_comment ] = "/* cell INIB type definition %s */\n"
+
+# @@comment[ :CCTPA_comment ] = "/* ã»ã« CB åå®£è¨ %s */\n"
+@@comment[ :CCTPA_comment ] = "/* cell CB type definition %s */\n"
+
+# @@comment[ :CCDP_comment ] = "/* ã»ã« CB (ããã¼)åå®£è¨ %s */\n"
+@@comment[ :CCDP_comment ] = "/* cell CB (dummy) type definition %s */\n"
+
+# @@comment[ :CCTPO_comment ] = "/* ã»ã« CB åå®£è¨ %s */\n"
+@@comment[ :CCTPO_comment ] = "/* cell CB type definition %s */\n"
+
+# @@comment[ :SCP_comment ] = "/* ã·ã³ã°ã«ãã³ã»ã« CB ãã­ãã¿ã¤ãå®£è¨ %s */\n"
+@@comment[ :SCP_comment ] = "/* singleton cell CB prototype declaration %s */\n"
+
+# @@comment[ :DCI_comment ] = "\n/* CB ã¯å­å¨ããªããINIB ã CB ã®ä»£ããã«ä½¿ç¨ããããã® define %s */\n"
+@@comment[ :DCI_comment ] = "\n/* CB not exist. CB corresponding to INIB %s */\n"
+
+# @@comment[ :FEC_comment ] = "/* ã¤ãã¬ã¼ã¿ã³ã¼ã (FOREACH_CELL)ã®çæ %s */\n"
+@@comment[ :FEC_comment ] = "/* iteration code (FOREACH_CELL) %s */\n"
+
+# @@comment[ :DAL_comment ] = "/* deallocate ãã¯ã­ %s */\n"
+@@comment[ :DAL_comment ] = "/* deallocate macro %s */\n"
+
+# @@comment[ :NFEC_comment ] = "/* ã¤ãã¬ã¼ã¿ã³ã¼ã (FOREACH_CELL)ã®çæ(CB,INIB ã¯å­å¨ããªã) %s */\n"
+@@comment[ :NFEC_comment ] = "/* iteration code (FOREACH_CELL) (niether CB, nor NIB exit) %s */\n"
+
+# @@comment[ :CIM_comment ] = "/* CB åæåãã¯ã­ %s */\n"
+@@comment[ :CIM_comment ] = "/* CB initialize macro %s */\n"
+
+# @@comment[ :EDT_comment ] = "/* åãå£ãã£ã¹ã¯ãªãã¿å %s */\n"
+@@comment[ :EDT_comment ] = "/* entry port descriptor type %s */\n"
+
+# @@comment[ :EPSF_comment ] = "/* åãå£ã¹ã±ã«ãã³é¢æ° %s */\n"
+@@comment[ :EPSF_comment ] = "/* entry port skelton function %s */\n"
+
+# @@comment[ :EPSFT_comment ] = "/* åãå£ã¹ã±ã«ãã³é¢æ°ãã¼ãã« %s */\n"
+@@comment[ :EPSFT_comment ] = "/* entry port skelton function table %s */\n"
+
+# @@comment[ :CPEPD_comment ] = "/* å¼ã³å£ã®åç
+§ããåãå£ãã£ã¹ã¯ãªãã¿(å®éã®åã¨ç¸éããå®ç¾©) %s */\n"
+@@comment[ :CPEPD_comment ] = "/* entry port descriptor referenced by call port (differ from actual definition) %s */\n"
+
+# @@comment[ :CPA_comment ] = "/* å¼ã³å£é
+å %s */\n"
+@@comment[ :CPA_comment ] = "/* call port array %s */\n"
+
+# @@comment[ :CIC_comment ] = "/* CB åæåã³ã¼ã %s */\n"
+@@comment[ :CIC_comment ] = "/* CB initialize code %s */\n"
+
+# @@comment[ :AVAI_comment ] = "/* å±æ§ã»å¤æ°ã®é
+å %s */\n"
+@@comment[ :AVAI_comment ] = "/* array of attr/var %s */\n"
+
+# @@comment[ :AVI_comment ] = "/* å¤æ°(æ§é ä½ãé
+å)åæå¤ %s */\n"
+@@comment[ :AVI_comment ] = "/* var (struct, array) initial value %s */\n"
+
+# @@comment[ :INIB_comment ] = "/* ã»ã« INIB %s */\n"
+@@comment[ :INIB_comment ] = "/* cell INIB %s */\n"
+
+# @@comment[ :CB_comment ] = "/* ã»ã« CB %s */\n"
+@@comment[ :CB_comment ] = "/* cell CB %s */\n"
+
+# @@comment[ :EPD_comment ] = "/* åãå£ãã£ã¹ã¯ãªãã¿ %s */\n"
+@@comment[ :EPD_comment ] = "/* entry port descriptor %s */\n"
+
+# @@comment[ :PAC_comment ] = "/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã %s */\n"
+@@comment[ :PAC_comment ] = "/* Put prototype declaration and/or variale definition here %s */\n"
+
+# @@comment[ :CAAM_comment ] = " *\n * å±æ§ã¢ã¯ã»ã¹ãã¯ã­ %s\n"
+@@comment[ :CAAM_comment ] = " *\n * attr access macro %s\n"
+
+# @@comment[ :CAAMI_comment ] = " *\n * å±æ§ã¢ã¯ã»ã¹ãã¯ã­ %s\n"
+@@comment[ :CAAMI_comment ] = " *\n * attr access macro %s\n"
+
+# @@comment[ :TYP_comment ] = " *\n * å %s\n * CELLCB å  : %s\n * CELLIDX å : %s\n"
+@@comment[ :TYP_comment ] = " *\n * type %s\n * CELLCB type  : %s\n * CELLIDX type : %s\n"
+
+# @@comment[ :TCPF_comment ] = " * å¼ã³å£é¢æ° %s\n"
+@@comment[ :TCPF_comment ] = " * call port function %s\n"
+
+# @@comment[ :TEPF_comment ] = "/* åãå£é¢æ° %s */\n"
+@@comment[ :TEPF_comment ] = "/* entry port function %s */\n"
+
+# @@comment[ :TEFB_comment ] = "\t/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã %s */\n"
+@@comment[ :TEFB_comment ] = "\t/* Put statements here %s */\n"
+
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_file_ja_JP.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_file_ja_JP.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/messages/messages_file_ja_JP.rb	(revision 270)
@@ -0,0 +1,189 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: messages_file_ja_JP.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+
+# File Messages for ja_JP
+class TECSMsg
+
+## generate.rb ##
+
+@@comment = {}
+
+# MSg.note
+@@comment[ :note ] = " * ãã®ãã¡ã¤ã«ã¯ tecsgen ã«ããèªåçæããã¾ãã
+ * ãã®ãã¡ã¤ã«ãç·¨éãã¦ä½¿ç¨ãããã¨ã¯ãæå³ããã¦ãã¾ãã
+"
+
+@@comment[ :preamble_note ] = "/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+"
+
+@@comment[ :postamble_note ] = "/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
+"
+
+@@comment[ :template_note ] = "/*
+ * ãã®ãã¡ã¤ã«ã¯ tecsgen ã«ãããã³ãã¬ã¼ãã¨ãã¦èªåçæããã¾ãã
+ * ãã®ãã¡ã¤ã«ãç·¨éãã¦ä½¿ç¨ãããã¨ãæå³ããã¦ãã¾ãã
+ * tecsgen ã®åå®è¡ã«ããä¸æ¸ãããã¦ãã¾ããããéå¸¸
+ *   gen/%s_template.c => src/%s.c
+ * ã®ããã«åå, ãã©ã«ããå¤æ´ãã¦ããä¿®æ­£ãã¾ã
+ */
+"
+
+@@comment[ :inline_template_note ] = "/*
+ * ãã®ãã¡ã¤ã«ã¯ tecsgen ã«ãããã³ãã¬ã¼ãã¨ãã¦èªåçæããã¾ãã
+ * ãã®ãã¡ã¤ã«ãç·¨éãã¦ä½¿ç¨ãããã¨ãæå³ããã¦ãã¾ãã
+ * tecsgen ã®åå®è¡ã«ããä¸æ¸ãããã¦ãã¾ããããéå¸¸
+ *   gen/%s_inline_template.h => src/%s_inline.h
+ * ã®ããã«åå, ãã©ã«ããå¤æ´ãã¦ããä¿®æ­£ãã¾ã
+ */
+"
+
+@@comment[ :Makefile_note ] = "# ãã®ãã¡ã¤ã«ã¯ tecsgen ã«ããèªåçæããã¾ãã
+# Makefile.temp ã¯ gen ã®ä¸ã¤ä¸ã®ãã£ã¬ã¯ããªã«ç§»ãã¦ä½¿ç¨ãã¾ã
+#  % mv Makefile.temp Makefile
+# 
+# clean ã®ããã©ã«ãåä½ã¯ $(GEN_DIR)/Makefile.* ãåé¤ãã¾ã
+#
+# ãã®ãã¡ã¤ã«ã¯ GNU make ã§ gcc ãç¨ã POSIX ç°å¢ã§åä½ããã¢ã¸ã¥ã¼ã«ããã«ãããã®ã«é©åãªããã«çæããã¦ãã¾ã
+# vpath, CFLAGS, OTHER_OBJS ãªã©ãèª¿æ´ããå¿
+è¦ãããããããã¾ãã
+# ä»ã®ç°å¢ãã¿ã¼ã²ããã®å ´åããã®ãã¡ã¤ã«ãå
+ã«å¤æ´ããå¿
+è¦ãããã¾ã
+
+"
+
+@@comment[ :oneway_ercd_note ] = "/* oneway ã®å ´å E_OK ããè¿ãã¾ãã */"
+@@comment[ :ercd_note ] = "/* ã¨ã©ã¼å¦çã³ã¼ããããã«è¨è¿°ãã¾ã */"
+
+@@comment[ :IMP_comment ] = "\n/* import_C ã«ãã import ãããããã %s */\n"
+@@comment[ :MVAR_comment ] = "# å¤æ° %s\n"
+@@comment[ :MRUL_comment ] = "# ã«ã¼ã« %s\n"
+@@comment[ :TCM_comment ] = "# ãã³ãã¬ã¼ãã³ã¼ãã§ã¡ã¼ã¯ãã¦ã¿ãå ´å %s \n"
+@@comment[ :MDEP_comment ] = "\n# depend ã include %s\n"
+@@comment[ :SDI_comment ] = "/* ã·ã°ããã£ãã£ã¹ã¯ãªãã¿åç
+§ããã %s */\n"
+@@comment[ :SD_comment ] = "/* ã·ã°ããã£ãã£ã¹ã¯ãªãã¿ %s */\n"
+@@comment[ :SFT_comment ] = "/* ã·ã°ããã£é¢æ°ãã¼ãã« %s */\n"
+@@comment[ :SDES_comment ] = "/* ã·ã°ããã£ãã£ã¹ã¯ãªãã¿(åççµåç¨) %s */\n"
+# @@comment[ :IRTH_comment ] = "/* ã©ã³ã¿ã¤ã ããã %s */\n"
+@@comment[ :UDF_comment ] = "/* inline ã®ããã® undef %s */\n"
+@@comment[ :IGH_comment ] = "/* ã°ã­ã¼ãã«ããã %s */\n"
+@@comment[ :ISH_comment ] = "/* ã·ã°ããã£ããã %s */\n"
+@@comment[ :ICT_comment ] = "/* æé©åã®ããåç
+§ããã»ã«ã¿ã¤ãã® CB åã®å®ç¾©ãåè¾¼ã %s */\n"
+@@comment[ :NIDB_comment ] = "ID ã®ãã¼ã¹ "
+@@comment[ :NCEL_comment ] = "ã»ã«ã®åæ°"
+@@comment[ :CVI_comment ] = "/* IDXã®æ­£å½æ§ãã§ãã¯ãã¯ã­ %s */\n"
+@@comment[ :CVIA_comment ] = "/* IDXã®æ­£å½æ§ãã§ãã¯ãã¯ã­ï¼ç­ç¸®å½¢ï¼ %s */\n"
+@@comment[ :NCPA_comment ] = "/* å¼ã³å£é
+åã®å¤§ãããå¾ããã¯ã­ %s */\n"
+@@comment[ :NEPA_comment ] = "/* åãå£é
+åã®å¤§ãããå¾ããã¯ã­ %s */\n"
+@@comment[ :TOCP_comment ] = "/* optional å¼ã³å£ããã¹ããããã¯ã­ %s */\n"
+@@comment[ :TOCPA_comment ] = "/* optional å¼ã³å£ããã¹ããããã¯ã­ï¼ç­ç¸®å½¢ï¼ %s */\n"
+@@comment[ :GCB_comment ] = "\n/* ã»ã«CBãå¾ããã¯ã­ %s */\n"
+@@comment[ :GCBA_comment ] = "\n/* ã»ã«CBãå¾ããã¯ã­(ç­ç¸®å½¢) %s */\n"
+@@comment[ :CCT_comment ] = "/* CELLCB å(ç­ç¸®å½¢) %s */\n"
+@@comment[ :CTIXA_comment ] = "/* ã»ã«ã¿ã¤ãã®IDXå(ç­ç¸®å½¢) %s */\n"
+@@comment[ :AAM_comment ] = "\n/* å±æ§ã¢ã¯ã»ã¹ãã¯ã­ %s */\n"
+@@comment[ :VAM_comment ] = "\n/* var ã¢ã¯ã»ã¹ãã¯ã­ %s */\n"
+@@comment[ :AAMA_comment ] = "\n/* å±æ§ã¢ã¯ã»ã¹ãã¯ã­(ç­ç¸®å½¢) %s */\n"
+@@comment[ :VAMA_comment ] = "\n/* var ã¢ã¯ã»ã¹ãã¯ã­(ç­ç¸®å½¢) %s */\n"
+@@comment[ :CPM_comment ] = " /* å¼ã³å£é¢æ°ãã¯ã­ %s */\n"
+@@comment[ :CPMA_comment ] = "/* å¼ã³å£é¢æ°ãã¯ã­ï¼ç­ç¸®å½¢ï¼%s */\n"
+@@comment[ :EPM_comment ] = "\n/* åãå£é¢æ°ãã¯ã­ï¼ç­ç¸®å½¢ï¼ %s */\n"
+@@comment[ :CTIX_comment ] = "\n/* ã»ã«ã¿ã¤ãã®IDXå %s */\n"
+@@comment[ :EPP_comment ] = "\n/* åãå£é¢æ°ãã­ãã¿ã¤ãå®£è¨ %s */\n"
+@@comment[ :EPSP_comment ] = "\n/* åãå£ã¹ã±ã«ãã³é¢æ°ãã­ãã¿ã¤ãå®£è¨ï¼VMTä¸è¦æé©åã«ããåç
+§ãããã®ï¼ %s */\n"
+@@comment[ :INL_comment ] = "/* inline ãããã® include %s */\n"
+@@comment[ :CIP_comment ] = "/* ã»ã« INIB åå®£è¨ %s */\n"
+@@comment[ :CCTPA_comment ] = "/* ã»ã« CB åå®£è¨ %s */\n"
+@@comment[ :CCDP_comment ] = "/* ã»ã« CB (ããã¼)åå®£è¨ %s */\n"
+@@comment[ :CCTPO_comment ] = "/* ã»ã« CB åå®£è¨ %s */\n"
+@@comment[ :SCP_comment ] = "/* ã·ã³ã°ã«ãã³ã»ã« CB ãã­ãã¿ã¤ãå®£è¨ %s */\n"
+@@comment[ :DCI_comment ] = "\n/* CB ã¯å­å¨ããªããINIB ã CB ã®ä»£ããã«ä½¿ç¨ããããã® define %s */\n"
+@@comment[ :FEC_comment ] = "/* ã¤ãã¬ã¼ã¿ã³ã¼ã (FOREACH_CELL)ã®çæ %s */\n"
+@@comment[ :DAL_comment ] = "/* deallocate ãã¯ã­ %s */\n"
+@@comment[ :NFEC_comment ] = "/* ã¤ãã¬ã¼ã¿ã³ã¼ã (FOREACH_CELL)ã®çæ(CB,INIB ã¯å­å¨ããªã) %s */\n"
+@@comment[ :CIM_comment ] = "/* CB åæåãã¯ã­ %s */\n"
+@@comment[ :EDT_comment ] = "/* åãå£ãã£ã¹ã¯ãªãã¿å %s */\n"
+@@comment[ :EPSF_comment ] = "/* åãå£ã¹ã±ã«ãã³é¢æ° %s */\n"
+@@comment[ :EPSFT_comment ] = "/* åãå£ã¹ã±ã«ãã³é¢æ°ãã¼ãã« %s */\n"
+@@comment[ :CPEPD_comment ] = "/* å¼ã³å£ã®åç
+§ããåãå£ãã£ã¹ã¯ãªãã¿(å®éã®åã¨ç¸éããå®ç¾©) %s */\n"
+@@comment[ :CPA_comment ] = "/* å¼ã³å£é
+å %s */\n"
+@@comment[ :CIC_comment ] = "/* CB åæåã³ã¼ã %s */\n"
+@@comment[ :AVAI_comment ] = "/* å±æ§ã»å¤æ°ã®é
+å %s */\n"
+@@comment[ :AVI_comment ] = "/* å¤æ°(æ§é ä½ãé
+å)åæå¤ %s */\n"
+@@comment[ :INIB_comment ] = "/* ã»ã« INIB %s */\n"
+@@comment[ :CB_comment ] = "/* ã»ã« CB %s */\n"
+@@comment[ :EPD_comment ] = "/* åãå£ãã£ã¹ã¯ãªãã¿ %s */\n"
+@@comment[ :PAC_comment ] = "/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã %s */\n"
+@@comment[ :CAAM_comment ] = " *\n * å±æ§ã¢ã¯ã»ã¹ãã¯ã­ %s\n"
+@@comment[ :CAAMI_comment ] = " *\n * å±æ§ã¢ã¯ã»ã¹ãã¯ã­ %s\n"
+@@comment[ :TYP_comment ] = " *\n * å %s\n * CELLCB å  : %s\n * CELLIDX å : %s\n"
+@@comment[ :TCPF_comment ] = " * å¼ã³å£é¢æ° %s\n"
+@@comment[ :TEPF_comment ] = "/* åãå£é¢æ° %s */\n"
+@@comment[ :TEFB_comment ] = "\t/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã %s */\n"
+
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1AlarmPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1AlarmPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1AlarmPlugin.rb	(revision 270)
@@ -0,0 +1,218 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator Cell-type plugin
+#      for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project TECS-WG
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id
+#++
+
+#== celltype ãã©ã°ã¤ã³ã®å
+±éã®è¦ªã¯ã©ã¹
+class ATK1AlarmPlugin < CelltypePlugin
+#@celltype:: Celltype
+#@option:: String     :ãªãã·ã§ã³æå­å
+
+  #signature::     Celltype        ã·ã°ããã£ï¼ã¤ã³ã¹ã¿ã³ã¹ï¼
+  def initialize( celltype, option )
+    super
+  end
+
+  #===  CDL ãã¡ã¤ã«ã®çæ
+  #      typedef, signature, celltype, cell ã®ã³ã¼ããçæ
+  #      éè¤ãã¦çæãã¦ã¯ãªããªã
+  #      ãã§ã«çæããã¦ããå ´åã¯åºåããªããã¨ã
+  #      ãããã¯ååã® import ã«ãããéè¤ãé¿ãããã¨ã
+  #file::        FILE       çæãããã¡ã¤ã«
+#  def gen_cdl_file file
+#  end
+
+  def new_cell cell
+  end
+
+  #===  åãå£é¢æ°ã®æ¬ä½(Cè¨èª)ãçæãã
+  #     ãã®ã¡ã½ãããæªå®ç¾©ã®å ´åãã¸ã§ãã¬ã¼ã¿ã¯åãå£é¢æ°ã®ãã³ãã¬ã¼ããçæãã
+  #     ãã®ã¡ã½ãããå®ç¾©æ¸ã¿ã®å ´åãï¼ãã³ãã¬ã¼ãã§ã¯ãªããå¤æ´ããå¿
+è¦ã®ãªãï¼ã»ã«ã¿ã¤ãã³ã¼ããçæãã
+  #file::           FILE        åºåå
+ãã¡ã¤ã«
+  #b_singleton::    bool        true if singleton
+  #ct_name::        Symbol
+  #global_ct_name:: string
+  #sig_name::       string
+  #ep_name::        string
+  #func_name::      string
+  #func_global_name:: string
+  #func_type::      class derived from Type
+#  def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+#  end
+
+  def gen_factory file
+
+  file2 = CFile.open( "#{$gen}/ALARM_tecsgen.oil", "w" )
+
+    # ALARM
+    @celltype.get_cell_list.each { |cell|
+
+    if cell.is_generate?
+
+      file2.print "\tALARM #{cell.get_name} {\n"
+
+      # COUNTER
+      join = cell.get_join_list.get_item( :counter )
+      if join then
+        str = join.get_rhs.to_s.gsub(/^"(.*)"$/, '\1')
+        file2.print "\t\tCOUNTER = #{str};\n"
+      end
+
+      # ACTION
+      join = cell.get_join_list.get_item( :action )
+      if join then
+        str = join.get_rhs.to_s.gsub(/^"(.*)"$/, '\1')
+      end
+
+      case str
+      when "SETEVENT"
+        file2.print "\t\tACTION = #{str} {\n"
+        join2 = cell.get_join_list.get_item( :task )
+        if join2 then
+          str = join2.get_rhs.to_s.gsub(/^"(.*)"$/, '\1')
+          file2.print "\t\t\tTASK = #{str};\n"
+        end
+        join2 = cell.get_join_list.get_item( :event )
+        if join2 then
+          str = join2.get_rhs.to_s.gsub(/^"(.*)"$/, '\1')
+          file2.print "\t\t\tEVENT = #{str};\n"
+        end
+        file2.print "\t\t};\n"
+      when "ACTIVATETASK"
+        file2.print "\t\tACTION = #{str} {\n"
+        join2 = cell.get_join_list.get_item( :task )
+        if join2 then
+          str = join2.get_rhs.to_s.gsub(/^"(.*)"$/, '\1')
+          file2.print "\t\t\tTASK = #{str};\n"
+        end
+        file2.print "\t\t};\n"
+      when "ALARMCALLBACK"
+        file2.print "\t\tACTION = #{str} {\n"
+        join2 = cell.get_join_list.get_item( :callbackName )
+        if join2 then
+          str = join2.get_rhs.to_s
+          file2.print "\t\t\tALARMCALLBACKNAME = #{str};\n"
+        end
+        file2.print "\t\t};\n"
+      else
+      end
+
+      # AUTOSTART
+      join = cell.get_join_list.get_item( :autoStart )
+      if join then
+        str = join.get_rhs.to_s
+      end
+
+      if str == "TRUE" then
+        file2.print "\t\tAUTOSTART = TRUE {\n"
+        join2 = cell.get_join_list.get_item( :alarmTime )
+        if join2 then
+        str = join2.get_rhs.to_s
+        file2.print "\t\t\tALARMTIME = #{str};\n"
+        end
+        join2 = cell.get_join_list.get_item( :cycleTime )
+        if join2 then
+          str = join2.get_rhs.to_s
+          file2.print "\t\t\tCYCLETIME = #{str};\n"
+        end
+        join2 = cell.get_join_list.get_item( :appMode )
+        delim = ""
+        if join2 then
+          join2.get_rhs.each { |mode|
+            str = mode.to_s.gsub(/^"(.*)"$/, '\1')
+            file2.print "\t\t\tAPPMODE = #{str};\n"
+            delim = ";"
+          }
+        end
+        file2.print "\t\t};\n"
+      else
+        file2.print "\t\tAUTOSTART = FALSE;\n"
+      end
+
+      file2.print "\t};\n"
+      file2.print "\n"
+
+    end
+  }
+
+  file2.close
+
+  # è¿½è¨ããããã« AppFile ãä½¿ãï¼æå­ã³ã¼ãå¤æãããªãï¼
+  file = AppFile.open( "#{$gen}/tAlarm_tecsgen.#{$c_suffix}" )
+  file.print "\n/* Generated by ATK1AlarmPlugin */\n"
+  @celltype.get_cell_list.each { |cell|
+    if cell.is_generate?
+      name_array = @celltype.get_name_array( cell )
+      join2 = cell.get_join_list.get_item( :callbackName )
+      if join2 then
+        str = join2.get_rhs.to_s.gsub(/^"(.*)"$/, '\1')
+        file.print <<EOT
+ALARMCALLBACK( #{str} );
+ALARMCALLBACK( #{str} )
+{
+    CELLCB *p_cellcb = #{name_array[8]};
+    cBody_main();
+}
+
+EOT
+      end
+    end
+  }
+
+  file.close
+
+  end
+
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1DelayTaskPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1DelayTaskPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1DelayTaskPlugin.rb	(revision 270)
@@ -0,0 +1,129 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator Cell-type plugin
+#      for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project TECS-WG
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id
+#++
+
+#== celltype ãã©ã°ã¤ã³ã®å
+±éã®è¦ªã¯ã©ã¹
+class ATK1DelayTaskPlugin < CelltypePlugin
+#@celltype:: Celltype
+#@option:: String     :ãªãã·ã§ã³æå­å
+
+  #signature::     Celltype        ã·ã°ããã£ï¼ã¤ã³ã¹ã¿ã³ã¹ï¼
+  def initialize( celltype, option )
+    super
+  end
+
+  #===  CDL ãã¡ã¤ã«ã®çæ
+  #      typedef, signature, celltype, cell ã®ã³ã¼ããçæ
+  #      éè¤ãã¦çæãã¦ã¯ãªããªã
+  #      ãã§ã«çæããã¦ããå ´åã¯åºåããªããã¨ã
+  #      ãããã¯ååã® import ã«ãããéè¤ãé¿ãããã¨ã
+  #file::        FILE       çæãããã¡ã¤ã«
+#  def gen_cdl_file file
+#  end
+
+  def new_cell cell
+#    join_list = cell.get_join_list
+#    a = join_list.get_item( :resource )
+#    if a == nil
+#     Generator.error( "resource: must be initialized")
+#    elsif ! a.get_rhs.instance_of? Array
+#      Generator.error( "resource: initializer must be in format of '{val1, val2 ...}'")
+#    end
+  end
+
+  #===  åãå£é¢æ°ã®æ¬ä½(Cè¨èª)ãçæãã
+  #     ãã®ã¡ã½ãããæªå®ç¾©ã®å ´åãã¸ã§ãã¬ã¼ã¿ã¯åãå£é¢æ°ã®ãã³ãã¬ã¼ããçæãã
+  #     ãã®ã¡ã½ãããå®ç¾©æ¸ã¿ã®å ´åãï¼ãã³ãã¬ã¼ãã§ã¯ãªããå¤æ´ããå¿
+è¦ã®ãªãï¼ã»ã«ã¿ã¤ãã³ã¼ããçæãã
+  #file::           FILE        åºåå
+ãã¡ã¤ã«
+  #b_singleton::    bool        true if singleton
+  #ct_name::        Symbol
+  #global_ct_name:: string
+  #sig_name::       string
+  #ep_name::        string
+  #func_name::      string
+  #func_global_name:: string
+  #func_type::      class derived from Type
+#  def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+#  end
+
+  def gen_factory file
+
+    # è¿½è¨ããããã« AppFile ãä½¿ãï¼æå­ã³ã¼ãå¤æãããªãï¼
+    file2 = AppFile.open( "#{$gen}/tDelayTaskBody_factory.#{$h_suffix}" )
+    file2.print "\n/* Generated by ATK1DelayTaskPlugin */\n\n"
+    @celltype.get_cell_list.each { |cell|
+      if cell.is_generate?
+        name_array = @celltype.get_name_array( cell )
+
+        join = cell.get_join_list.get_item( :event )
+        if join then
+          str = join.get_rhs.to_s
+          if str =~ /&(.*)/ then
+              str = $1
+          end
+
+          file2.print "DeclareEvent( #{str} );\n"
+        end
+
+      end
+    }
+
+    file2.close
+
+  end
+
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1EventPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1EventPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1EventPlugin.rb	(revision 270)
@@ -0,0 +1,172 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator Cell-type plugin
+#      for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project TECS-WG
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id
+#++
+
+#== ATK1 Event celltype ãã©ã°ã¤ã³ã¯ã©ã¹
+class ATK1EventPlugin < CelltypePlugin
+#@@instancies:: []     :ã»ã«å®ä½ç¾¤
+@@instancies = []
+
+  #===  åæå
+  #      å
+¨ã¦ã®ã»ã«ã®å®ä½ãæå³è§£æå¾ã«åç
+§ããå¿
+è¦ãããããã«
+  #      åæåæã« singleton ã® instancies ã«æ ¼ç´ãã
+  #signature::     Celltype        ã·ã°ããã£ï¼ã¤ã³ã¹ã¿ã³ã¹ï¼
+  def initialize( celltype, option )
+    super
+    @@instancies << self
+  end
+
+  #===  cellã®çæ
+  def new_cell cell
+  end
+
+  #===  æå³è§£æå®è¡å¾ã®ã³ã¼ãçæ
+  def self.gen_post_code file
+
+    @@instancies.each { |inst|
+      inst.gen_oil_code file
+    }
+
+  end
+
+  #===  OILãã¡ã¤ã«åºå
+  def gen_oil_code file
+
+    file2 = CFile.open( "#{$gen}/EVENT_tecsgen.oil", "w" )
+
+    whole_mask = 0
+
+    # EVENT
+    @celltype.get_cell_list.each { |cell|
+
+#      if cell.is_generate?
+        join = cell.get_join_list.get_item( :mask )
+
+        # AUTO type search and change to zero
+        if join then
+          #mask_bit = join.get_rhs.to_s.eval_cnst( nil )
+          mask_bit = join.get_rhs.to_s.to_i
+          mask_str = join.get_rhs.to_s
+          if mask_str == "AUTO" then
+            new_rhs = Expression.create_integer_constant( 32, @locale )
+            join.change_rhs new_rhs
+          else
+            mask_pattern = 1 << mask_bit
+            whole_mask |= mask_pattern
+          end
+        else
+          new_rhs = Expression.create_integer_constant( 32, @locale )
+          join = Join.new( :mask, nil, new_rhs )
+          cell.new_join(join)
+        end
+
+#        file2.print "\t /* working #{join.get_rhs.to_s} */\n"
+#      end
+
+    }
+
+    mask_count = 0;
+    mask_place = 0;
+
+    @celltype.get_cell_list.each { |cell|
+
+#      if cell.is_generate?
+        # bit place to mask pattern
+        file2.print "\tEVENT #{cell.get_name} {\n"
+        join = cell.get_join_list.get_item( :mask )
+        if join then
+          mask_bit = join.get_rhs.to_s.to_i
+          if mask_bit == 32 then
+            while 1
+    p("mask_count, current_mask")
+    p mask_count
+              current_mask = (1 << mask_count)
+    p current_mask
+              if 0 == whole_mask & current_mask
+                new_rhs = Expression.create_integer_constant( current_mask, @locale )
+                join.change_rhs new_rhs
+                whole_mask = whole_mask | current_mask
+                mask_place = mask_count
+                break
+              end
+              if current_mask >= 0x8000
+                mask_place = 0
+                break
+              end
+              mask_count = mask_count + 1
+            end
+          else
+            mask_place = join.get_rhs.to_s.to_i
+            current_mask = 1 << mask_place
+            new_rhs = Expression.create_integer_constant( current_mask, @locale )
+            join.change_rhs new_rhs
+          end
+          file2.print "\t\tMASK = #{mask_place.to_s};\n"
+        end
+
+        file2.print "\t};\n"
+        file2.print "\n"
+
+#      end
+
+    }
+
+    file2.close
+
+  end
+
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1ISRPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1ISRPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1ISRPlugin.rb	(revision 270)
@@ -0,0 +1,197 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator Cell-type plugin
+#      for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project TECS-WG
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id
+#++
+
+#== celltype ãã©ã°ã¤ã³ã®å
+±éã®è¦ªã¯ã©ã¹
+class ATK1ISRPlugin < CelltypePlugin
+#@celltype:: Celltype
+#@option:: String     :ãªãã·ã§ã³æå­å
+
+  #signature::     Celltype        ã·ã°ããã£ï¼ã¤ã³ã¹ã¿ã³ã¹ï¼
+  def initialize( celltype, option )
+    super
+  end
+
+  #===  CDL ãã¡ã¤ã«ã®çæ
+  #      typedef, signature, celltype, cell ã®ã³ã¼ããçæ
+  #      éè¤ãã¦çæãã¦ã¯ãªããªã
+  #      ãã§ã«çæããã¦ããå ´åã¯åºåããªããã¨ã
+  #      ãããã¯ååã® import ã«ãããéè¤ãé¿ãããã¨ã
+  #file::        FILE       çæãããã¡ã¤ã«
+#  def gen_cdl_file file
+#  end
+
+  def new_cell cell
+  end
+
+  #===  åãå£é¢æ°ã®æ¬ä½(Cè¨èª)ãçæãã
+  #     ãã®ã¡ã½ãããæªå®ç¾©ã®å ´åãã¸ã§ãã¬ã¼ã¿ã¯åãå£é¢æ°ã®ãã³ãã¬ã¼ããçæãã
+  #     ãã®ã¡ã½ãããå®ç¾©æ¸ã¿ã®å ´åãï¼ãã³ãã¬ã¼ãã§ã¯ãªããå¤æ´ããå¿
+è¦ã®ãªãï¼ã»ã«ã¿ã¤ãã³ã¼ããçæãã
+  #file::           FILE        åºåå
+ãã¡ã¤ã«
+  #b_singleton::    bool        true if singleton
+  #ct_name::        Symbol
+  #global_ct_name:: string
+  #sig_name::       string
+  #ep_name::        string
+  #func_name::      string
+  #func_global_name:: string
+  #func_type::      class derived from Type
+#  def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+#  end
+
+  def gen_factory file
+
+  file2 = CFile.open( "#{$gen}/ISR_tecsgen.oil", "w" )
+
+    # ISR
+    @celltype.get_cell_list.each { |cell|
+
+    if cell.is_generate?
+
+      file2.print "\tISR #{cell.get_name} {\n"
+
+      # CATEGORY
+      join = cell.get_join_list.get_item( :category )
+      if join then
+        file2.print "\t\tCATEGORY = #{join.get_rhs.to_s};\n"
+      end
+
+      # PRIORITY
+      join = cell.get_join_list.get_item( :priority )
+      if join then
+        file2.print "\t\tPRIORITY = #{join.get_rhs.to_s};\n"
+      end
+
+      # ENTRY (entryã¯tecsgenã®äºç´èªã®ããNumberãä»å )
+      join = cell.get_join_list.get_item( :entryNumber )
+      if join then
+        file2.print "\t\tENTRY = #{join.get_rhs.to_s};\n"
+      end
+
+      # RESOURCE
+      join2 = cell.get_join_list.get_item( :resource )
+      delim = ""
+      if join2 then
+        join2.get_rhs.each { |res|
+          str = res.to_s.gsub(/^"(.*)"$/, '\1')
+          file2.print "\t\tRESOURCE = #{str};\n"
+          delim = ";"
+        }
+      end
+
+      # MESSAGE
+      join2 = cell.get_join_list.get_item( :message )
+      delim = ""
+      if join2 then
+        join2.get_rhs.each { |msg|
+          str = msg.to_s.gsub(/^"(.*)"$/, '\1')
+          file2.print "\t\tMESSAGE = #{str};\n"
+          delim = ";"
+        }
+      end
+
+      file2.print "\t};\n"
+      file2.print "\n"
+
+    end
+  }
+
+  file2.close
+
+  # è¿½è¨ããããã« AppFile ãä½¿ãï¼æå­ã³ã¼ãå¤æãããªãï¼
+  file = AppFile.open( "#{$gen}/tISR_tecsgen.#{$c_suffix}" )
+  file.print "\n/* Generated by ATK1ISRPlugin */\n"
+  @celltype.get_cell_list.each { |cell|
+    if cell.is_generate?
+      name_array = @celltype.get_name_array( cell )
+      join2 = cell.get_join_list.get_item( :category )
+      if join2 then
+        str = join2.get_rhs.to_s
+        if str == "1" then
+          file.print <<EOT
+#if defined( OMIT_ISR1_ENTRY )
+EOT
+          file.print "/* ISR1å
+¥ãå£æªçææã¯æ¬é¢æ°ãå²è¾¼ã¿é¢æ°æå®ãã  */\n"
+          file.print <<EOT
+#pragma INTERRUPT  #{cell.get_name}
+#endif  /* OMIT_ISR1_ENTRY  */
+void  RxHwSerialInt( void );
+void
+RxHwSerialInt( void )
+EOT
+        else
+          file.print <<EOT
+ISR(#{cell.get_name})
+EOT
+        end
+      end
+
+      file.print <<EOT
+{
+    CELLCB *p_cellcb = #{name_array[8]};
+    cBody_main();
+}
+
+EOT
+    end
+  }
+
+  file.close
+
+  end
+
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1KernelPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1KernelPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1KernelPlugin.rb	(revision 270)
@@ -0,0 +1,312 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator Cell-type plugin
+#      for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project TECS-WG
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id
+#++
+
+#== celltype ãã©ã°ã¤ã³ã®å
+±éã®è¦ªã¯ã©ã¹
+class ATK1KernelPlugin < CelltypePlugin
+#@celltype:: Celltype
+#@option:: String     :ãªãã·ã§ã³æå­å
+  @@cell_list = []
+
+  #signature::     Celltype        ã·ã°ããã£ï¼ã¤ã³ã¹ã¿ã³ã¹ï¼
+  def initialize( celltype, option )
+    super
+  end
+
+  #===  CDL ãã¡ã¤ã«ã®çæ
+  #      typedef, signature, celltype, cell ã®ã³ã¼ããçæ
+  #      éè¤ãã¦çæãã¦ã¯ãªããªã
+  #      ãã§ã«çæããã¦ããå ´åã¯åºåããªããã¨ã
+  #      ãããã¯ååã® import ã«ãããéè¤ãé¿ãããã¨ã
+  #file::        FILE       çæãããã¡ã¤ã«
+#  def gen_cdl_file file
+#  end
+
+  def new_cell cell
+#    join_list = cell.get_join_list
+#    a = join_list.get_item( :resource )
+#    if a == nil
+#     Generator.error( "resource: must be initialized")
+#    elsif ! a.get_rhs.instance_of? Array
+#      Generator.error( "resource: initializer must be in format of '{val1, val2 ...}'")
+#    end
+  @@cell_list << cell
+  end
+
+  #===  åãå£é¢æ°ã®æ¬ä½(Cè¨èª)ãçæãã
+  #     ãã®ã¡ã½ãããæªå®ç¾©ã®å ´åãã¸ã§ãã¬ã¼ã¿ã¯åãå£é¢æ°ã®ãã³ãã¬ã¼ããçæãã
+  #     ãã®ã¡ã½ãããå®ç¾©æ¸ã¿ã®å ´åãï¼ãã³ãã¬ã¼ãã§ã¯ãªããå¤æ´ããå¿
+è¦ã®ãªãï¼ã»ã«ã¿ã¤ãã³ã¼ããçæãã
+  #file::           FILE        åºåå
+ãã¡ã¤ã«
+  #b_singleton::    bool        true if singleton
+  #ct_name::        Symbol
+  #global_ct_name:: string
+  #sig_name::       string
+  #ep_name::        string
+  #func_name::      string
+  #func_global_name:: string
+  #func_type::      class derived from Type
+#  def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+#  end
+
+  def gen_factory file
+
+    file2 = CFile.open( "#{$gen}/Kernel_tecsgen.oil", "w" )
+
+    # Kernel
+    @celltype.get_cell_list.each { |cell|
+
+      if cell.is_generate?
+
+        file2.print "\tOS #{cell.get_name} {\n"
+
+        # STATUS
+        join = cell.get_join_list.get_item( :status )
+        if join then
+          str = join.get_rhs.to_s.gsub(/^"(.*)"$/, '\1')
+          file2.print "\t\tSTATUS = #{str};\n"
+        end
+
+        # STARTUPHOOK
+        join = cell.get_join_list.get_item( :useStartupHook )
+        if join then
+          str = join.get_rhs.to_s
+          file2.print "\t\tSTARTUPHOOK = #{str};\n"
+        end
+
+        # ERRORHOOK
+        join = cell.get_join_list.get_item( :useErrorHook )
+        if join then
+          str = join.get_rhs.to_s
+          file2.print "\t\tERRORHOOK = #{str};\n"
+        end
+
+        # SHUTDOWNHOOK
+        join = cell.get_join_list.get_item( :useShutdownHook )
+        if join then
+          str = join.get_rhs.to_s
+          file2.print "\t\tSHUTDOWNHOOK = #{str};\n"
+        end
+
+        # PRETASKHOOK
+        join = cell.get_join_list.get_item( :usePreTaskHook )
+        if join then
+          str = join.get_rhs.to_s
+          file2.print "\t\tPRETASKHOOK = #{str};\n"
+        end
+
+        # POSTASKHOOK
+        join = cell.get_join_list.get_item( :usePostTaskHook )
+        if join then
+          str = join.get_rhs.to_s
+          file2.print "\t\tPOSTTASKHOOK = #{str};\n"
+        end
+
+        # USEGETSERVICEID
+        join = cell.get_join_list.get_item( :useGetServiceId )
+        if join then
+          str = join.get_rhs.to_s
+          file2.print "\t\tUSEGETSERVICEID = #{str};\n"
+        end
+
+        # USEPARAMETERACCESS
+        join = cell.get_join_list.get_item( :useParameterAccess )
+        if join then
+          str = join.get_rhs.to_s
+          file2.print "\t\tUSEPARAMETERACCESS = #{str};\n"
+        end
+
+        # USERESSCHEDULER
+        join = cell.get_join_list.get_item( :useResourceScheduler )
+        if join then
+          str = join.get_rhs.to_s
+          file2.print "\t\tUSERESSCHEDULER = #{str};\n"
+        end
+
+        file2.print "\t};\n\n"
+
+      end
+
+    }
+
+    file2.close
+
+    # è¿½è¨ããããã« AppFile ãä½¿ãï¼æå­ã³ã¼ãå¤æãããªãï¼
+    file2 = AppFile.open( "#{$gen}/tKernel_tecsgen.#{$c_suffix}" )
+    file2.print "\n/* Generated by ATK1KernelPlugin */\n\n"
+    @celltype.get_cell_list.each { |cell|
+      if cell.is_generate?
+        name_array = @celltype.get_name_array( cell )
+
+        join = cell.get_join_list.get_item( :useStartupHook )
+        if join then
+          str = join.get_rhs.to_s
+          if str == "TRUE" then
+            file2.print <<EOT
+#ifdef USE_STARTUPHOOK
+void StartupHook(void)
+{
+/*    CELLCB *p_cellcb = #{name_array[8]}; */
+    INT32 i;
+    for(i = 0; i < N_CP_cStartupHookBody; i++){
+        cStartupHookBody_main(i);
+    }
+}
+#endif /* USE_STARTUPHOOK */
+EOT
+          end
+        end
+
+        join = cell.get_join_list.get_item( :useErrorHook )
+        if join then
+          str = join.get_rhs.to_s
+          if str == "TRUE" then
+            file2.print <<EOT
+#ifdef USE_ERRORHOOK
+void ErrorHook(StatusType ercd)
+{
+/*    CELLCB *p_cellcb = #{name_array[8]}; */
+    cErrorHookBody_main( ercd );
+}
+#endif /* USE_ERRORHOOK */
+
+EOT
+          end
+        end
+
+        join = cell.get_join_list.get_item( :useShutdownHook )
+        if join then
+          str = join.get_rhs.to_s
+          if str == "TRUE" then
+            file2.print <<EOT
+#ifdef USE_SHUTDOWNHOOK
+void ShutdownHook(StatusType ercd)
+{
+/*    CELLCB *p_cellcb = #{name_array[8]}; */
+    INT32 i;
+    for(i = 0; i < N_CP_cShutdownHookBody; i++){
+        cShutdownHookBody_main( i, ercd );
+    }
+}
+#endif /* USE_SHUTDOWNHOOK */
+
+EOT
+          end
+        end
+
+        join = cell.get_join_list.get_item( :usePreTaskHook )
+        if join then
+          str = join.get_rhs.to_s
+          if str == "TRUE" then
+            file2.print <<EOT
+#ifdef USE_PRETASKHOOK
+void PreTaskHook(void)
+{
+/*    CELLCB *p_cellcb = #{name_array[8]}; */
+    cPreTaskHookBody_main();
+}
+#endif /* USE_PRETASKHOOK */
+
+EOT
+          end
+        end
+
+        join = cell.get_join_list.get_item( :usePostTaskHook )
+        if join then
+          str = join.get_rhs.to_s
+          if str == "TRUE" then
+            file2.print <<EOT
+#ifdef USE_POSTTASKHOOK
+void PostTaskHook(void)
+{
+/*    CELLCB *p_cellcb = #{name_array[8]}; */
+    cPostTaskHookBody_main();
+}
+#endif /* USE_POSTTASKHOOK */
+
+EOT
+          end
+        end
+
+      end
+    }
+
+    file2.close
+
+  end
+
+  def self.gen_post_code file
+
+  @@cell_list.each { |cell|
+    join =  cell.get_join_list.get_item( :useResourceScheduler )
+    if join then
+      flag = join.get_rhs.to_s
+      if flag == "TRUE" then
+        file.print <<EOT
+cell tResource RES_SCHEDULER {
+	property = "STANDARD";
+};
+EOT
+      else
+        file.print <<EOT
+EOT
+      end
+    end
+  }
+  
+  end
+
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1ResourcePlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1ResourcePlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1ResourcePlugin.rb	(revision 270)
@@ -0,0 +1,146 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator Cell-type plugin
+#      for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project TECS-WG
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id
+#++
+
+#== celltype ãã©ã°ã¤ã³ã®å
+±éã®è¦ªã¯ã©ã¹
+class ATK1ResourcePlugin < CelltypePlugin
+#@celltype:: Celltype
+#@option:: String     :ãªãã·ã§ã³æå­å
+
+  #signature::     Celltype        ã·ã°ããã£ï¼ã¤ã³ã¹ã¿ã³ã¹ï¼
+  def initialize( celltype, option )
+    super
+  end
+
+  #===  CDL ãã¡ã¤ã«ã®çæ
+  #      typedef, signature, celltype, cell ã®ã³ã¼ããçæ
+  #      éè¤ãã¦çæãã¦ã¯ãªããªã
+  #      ãã§ã«çæããã¦ããå ´åã¯åºåããªããã¨ã
+  #      ãããã¯ååã® import ã«ãããéè¤ãé¿ãããã¨ã
+  #file::        FILE       çæãããã¡ã¤ã«
+#  def gen_cdl_file file
+#  end
+
+  def new_cell cell
+  end
+
+  #===  åãå£é¢æ°ã®æ¬ä½(Cè¨èª)ãçæãã
+  #     ãã®ã¡ã½ãããæªå®ç¾©ã®å ´åãã¸ã§ãã¬ã¼ã¿ã¯åãå£é¢æ°ã®ãã³ãã¬ã¼ããçæãã
+  #     ãã®ã¡ã½ãããå®ç¾©æ¸ã¿ã®å ´åãï¼ãã³ãã¬ã¼ãã§ã¯ãªããå¤æ´ããå¿
+è¦ã®ãªãï¼ã»ã«ã¿ã¤ãã³ã¼ããçæãã
+  #file::           FILE        åºåå
+ãã¡ã¤ã«
+  #b_singleton::    bool        true if singleton
+  #ct_name::        Symbol
+  #global_ct_name:: string
+  #sig_name::       string
+  #ep_name::        string
+  #func_name::      string
+  #func_global_name:: string
+  #func_type::      class derived from Type
+#  def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+#  end
+
+  def gen_factory file
+
+  file2 = CFile.open( "#{$gen}/RESOURCE_tecsgen.oil", "w" )
+  file3 = CFile.open( "#{$gen}/#{@celltype.get_name}_factory.#{$h_suffix}", "w" )
+
+  # RESOURCE
+  @celltype.get_cell_list.each { |cell|
+
+    if cell.is_generate?
+
+      str = cell.get_name
+
+      if str.to_s == "RES_SCHEDULER" then
+
+        cell.set_specified_id( 1 )
+
+      else
+
+        file3.print "DeclareResource( #{cell.get_name} );\n"
+
+        file2.print "\tRESOURCE #{cell.get_name} {\n"
+
+        # PROPERTY
+        join = cell.get_join_list.get_item( :property )
+        if join then
+          str = join.get_rhs.to_s.gsub(/^"(.*)"$/, '\1')
+
+          if str == "LINKED" then
+            file2.print "\t\tRESOURCEPROPERTY = #{str} {\n"
+            join2 = cell.get_join_list.get_item( :linkedResource )
+            str2 = join2.get_rhs.to_s.gsub(/^"(.*)"$/, '\1')
+            file2.print "\t\t\tLINKEDRESOURCE = #{str2};\n"
+            file2.print "\t\t};\n"
+          else
+            file2.print "\t\tRESOURCEPROPERTY = #{str};\n"
+          end
+        end
+
+        file2.print "\t};\n"
+        file2.print "\n"
+
+      end
+
+    end
+  }
+
+  file2.close
+  file3.close
+
+  end
+
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1TaskPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1TaskPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ATK1TaskPlugin.rb	(revision 270)
@@ -0,0 +1,243 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator Cell-type plugin
+#      for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project TECS-WG
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id
+#++
+
+#== celltype ãã©ã°ã¤ã³ã®å
+±éã®è¦ªã¯ã©ã¹
+class ATK1TaskPlugin < CelltypePlugin
+#@celltype:: Celltype
+#@option:: String     :ãªãã·ã§ã³æå­å
+
+  #signature::     Celltype        ã·ã°ããã£ï¼ã¤ã³ã¹ã¿ã³ã¹ï¼
+  def initialize( celltype, option )
+    super
+  end
+
+  #===  CDL ãã¡ã¤ã«ã®çæ
+  #      typedef, signature, celltype, cell ã®ã³ã¼ããçæ
+  #      éè¤ãã¦çæãã¦ã¯ãªããªã
+  #      ãã§ã«çæããã¦ããå ´åã¯åºåããªããã¨ã
+  #      ãããã¯ååã® import ã«ãããéè¤ãé¿ãããã¨ã
+  #file::        FILE       çæãããã¡ã¤ã«
+#  def gen_cdl_file file
+#  end
+
+  def new_cell cell
+#    join_list = cell.get_join_list
+#    a = join_list.get_item( :resource )
+#    if a == nil
+#     Generator.error( "resource: must be initialized")
+#    elsif ! a.get_rhs.instance_of? Array
+#      Generator.error( "resource: initializer must be in format of '{val1, val2 ...}'")
+#    end
+  end
+
+  #===  åãå£é¢æ°ã®æ¬ä½(Cè¨èª)ãçæãã
+  #     ãã®ã¡ã½ãããæªå®ç¾©ã®å ´åãã¸ã§ãã¬ã¼ã¿ã¯åãå£é¢æ°ã®ãã³ãã¬ã¼ããçæãã
+  #     ãã®ã¡ã½ãããå®ç¾©æ¸ã¿ã®å ´åãï¼ãã³ãã¬ã¼ãã§ã¯ãªããå¤æ´ããå¿
+è¦ã®ãªãï¼ã»ã«ã¿ã¤ãã³ã¼ããçæãã
+  #file::           FILE        åºåå
+ãã¡ã¤ã«
+  #b_singleton::    bool        true if singleton
+  #ct_name::        Symbol
+  #global_ct_name:: string
+  #sig_name::       string
+  #ep_name::        string
+  #func_name::      string
+  #func_global_name:: string
+  #func_type::      class derived from Type
+#  def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+#  end
+
+  def gen_factory file
+
+  file2 = CFile.open( "#{$gen}/TASK_tecsgen.oil", "w" )
+
+  extended_task_count = 1
+
+  # TASK
+  @celltype.get_cell_list.each { |cell|
+
+    if cell.is_generate?
+
+      file2.print "\tTASK #{cell.get_name} {\n"
+
+      # AUTOSTART
+      join = cell.get_join_list.get_item( :autoStart )
+      if join then
+        str = join.get_rhs.to_s
+
+        if str == "TRUE" then
+          join2 = cell.get_join_list.get_item( :appMode )
+          if join2 then
+            file2.print "\t\tAUTOSTART = TRUE {\n"
+            delim = ""
+            join2.get_rhs.each { |mode|
+              str = mode.to_s.gsub(/^"(.*)"$/, '\1')
+              file2.print "\t\t\tAPPMODE = #{str};\n"
+              delim = ";"
+            }
+            file2.print "\t\t};\n"
+          else
+            file2.print "\t\tAUTOSTART = TRUE;\n"
+          end
+        elsif str == "FALSE" then
+          file2.print "\t\tAUTOSTART = FALSE;\n"
+        else
+        end
+      end
+
+      # PRIORITY
+      join = cell.get_join_list.get_item( :priority )
+      if join then
+        file2.print "\t\tPRIORITY = #{join.get_rhs.to_s};\n"
+      end
+
+      # ACTIVATION
+      join = cell.get_join_list.get_item( :activation )
+      if join then
+        file2.print "\t\tACTIVATION = #{join.get_rhs.to_s};\n"
+      end
+
+      # SCHEDULE
+      join = cell.get_join_list.get_item( :schedule )
+      if join then
+        str = join.get_rhs.to_s.gsub(/^"(.*)"$/, '\1')
+        file2.print "\t\tSCHEDULE = #{str};\n"
+      end
+
+      # EVENT
+      join = cell.get_join_list.get_item( :event )
+      delim = ""
+      if join then
+        join.get_rhs.each { |evt|
+          str = evt.to_s.gsub(/^"(.*)"$/, '\1')
+          if !(str == "OMISSIBLE")
+              file2.print "\t\tEVENT = #{str};\n"
+          end
+          delim = ";"
+        }
+        join.get_rhs.each { |evt|
+          str = evt.to_s.gsub(/^"(.*)"$/, '\1')
+          if !(str == "OMISSIBLE")
+              cell.set_specified_id( extended_task_count );
+              ++extended_task_count;
+              break
+          end
+        }
+      end
+
+      # RESOURCE
+      join = cell.get_join_list.get_item( :resource )
+      delim = ""
+      if join then
+        join.get_rhs.each { |res|
+          str = res.to_s.gsub(/^"(.*)"$/, '\1')
+          if !(str == "OMISSIBLE")
+              file2.print "\t\tRESOURCE = #{str};\n"
+          end
+          delim = ";"
+        }
+      end
+
+      # MESSAGE
+      join = cell.get_join_list.get_item( :message )
+      delim = ""
+      if join then
+        join.get_rhs.each { |msg|
+          str = msg.to_s.gsub(/^"(.*)"$/, '\1')
+          if !(str == "OMISSIBLE")
+              file2.print "\t\tMESSAGE = #{str};\n"
+          end
+          delim = ";"
+        }
+      end
+
+      # STACKSIZE
+      join = cell.get_join_list.get_item( :stackSize )
+      if join then
+        file2.print "\t\tSTACKSIZE = #{join.get_rhs.to_s};\n"
+      end
+
+      file2.print "\t};\n"
+      file2.print "\n"
+
+    end
+  }
+
+  file2.close
+
+  # è¿½è¨ããããã« AppFile ãä½¿ãï¼æå­ã³ã¼ãå¤æãããªãï¼
+  file = AppFile.open( "#{$gen}/tTask_tecsgen.#{$c_suffix}" )
+  file.print "\n/* Generated by ATK1TaskPlugin */\n"
+  @celltype.get_cell_list.each { |cell|
+    if cell.is_generate?
+      name_array = @celltype.get_name_array( cell )
+      file.print <<EOT
+TASK(#{cell.get_name})
+{
+    CELLCB *p_cellcb = #{name_array[8]};
+    cBody_main();
+    terminate();
+}
+
+EOT
+    end
+  }
+
+  file.close
+
+  end
+
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/C2TECSBridgePlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/C2TECSBridgePlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/C2TECSBridgePlugin.rb	(revision 270)
@@ -0,0 +1,231 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2015 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: C2TECSBridgePlugin.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+#== C => TECS åãå£å¼ã³åºãã®ãã©ã°ã¤ã³
+class C2TECSBridgePlugin < SignaturePlugin
+#@signature:: Signature   ãã©ã°ã¤ã³ã®å¯¾è±¡ã¨ãªãã·ã°ããã£
+#@option:: String   '"', '"' ã§å²ã¾ããæå­å
+
+  # ãã©ã°ã¤ã³å¼æ°åã¨ Proc
+  C2TECSBridgePluginArgProc = {
+    "prefix" => Proc.new { |obj,rhs| obj.set_prefix rhs },
+    "suffix" => Proc.new { |obj,rhs| obj.set_suffix rhs },
+    "header_name" => Proc.new { |obj,rhs| obj.set_header_name rhs },
+  }
+
+
+  @@signature_list = { }
+
+  #signature::     Signature        ã·ã°ããã£ï¼ã¤ã³ã¹ã¿ã³ã¹ï¼
+  def initialize( signature, option )
+    super
+
+    @signature = signature
+    @header_name = "#{$gen}/C2TECS_#{@signature.get_global_name}.h"
+    @prefix = ""
+    @suffix = ""
+    @celltype_name = :"t#{@signature.get_global_name}"
+    @plugin_arg_check_proc_tab = C2TECSBridgePluginArgProc
+    parse_plugin_arg
+  end
+
+  def gen_cdl_file file
+    if @@signature_list[ @signature.get_global_name ] then
+      @@signature_list[ @signature.get_global_name ] << self
+      cdl_warning( "C2TW001 signature '$1' duplicate. ignored current one", @signature.get_namespace_path )
+      return
+    end
+
+    @@signature_list[ @signature.get_global_name ] = [ self ]
+    print_msg "  C2TECSBridgePlugin: [celltype] C2TECS::#{@celltype_name}. Create cell then join the call port 'cCall' to the target cell\n"
+    file.print <<EOT
+namespace nC2TECS{
+  [singleton, active]    // this celltype is not active actually. 'active' is specified to prevent W1002.
+  celltype #{@celltype_name} {
+    call #{@signature.get_namespace_path} cCall;
+  };
+};
+EOT
+  end
+
+  #=== å¾ãã®ã³ã¼ããçæ
+  #ãã©ã°ã¤ã³ã®å¾ãã®ã³ã¼ããçæ
+  #file:: File: 
+  def self.gen_post_code( file )
+    # è¤æ°ã®ãã©ã°ã¤ã³ã® post_code ãä¸ã¤ã®ãã¡ã¤ã«ã«å«ã¾ãããããä»¥ä¸ã®ãããªè¦åºããã¤ãããã¨
+    # file.print "/* '#{self.class.name}' post code */\n"
+  end
+
+  #===  åãå£é¢æ°ã®æ¬ä½(Cè¨èª)ãçæãã
+  #     éå¸¸ã§ããã°ãã¸ã§ãã¬ã¼ã¿ã¯åãå£é¢æ°ã®ãã³ãã¬ã¼ããçæãã
+  #     ãã©ã°ã¤ã³ã®å ´åãå¤æ´ããå¿
+è¦ã®ãªãã»ã«ã¿ã¤ãã³ã¼ããçæãã
+  #file::           FILE        åºåå
+ãã¡ã¤ã«
+  #b_singleton::    bool        true if singleton
+  #ct_name::        Symbol
+  #global_ct_name:: string
+  #sig_name::       string
+  #ep_name::        string
+  #func_name::      string
+  #func_global_name:: string
+  #func_type::      class derived from Type
+  def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+
+    # nothing to do
+
+  end
+
+
+  def gen_postamble( file, b_singleton, ct_name, global_name )
+
+    header_file = open( @header_name, "w" )
+
+    header_comment =<<EOT
+/*
+ * This file was generated by C2TECSBridgePlugin and has prototype
+ * decalarations of functions in signature '#{@signature.get_namespace_path}'
+ */
+
+EOT
+
+    file.print header_comment
+    header_file.print header_comment
+    header_file.print <<EOT
+#ifndef #{@signature.get_global_name}__h
+#define #{@signature.get_global_name}__h
+
+/*
+ * function prototype declarations
+ *    signature: '#{@signature.get_namespace_path}'
+ *
+ * These functions can be called from C sources directly.
+ * If function name collides, please consider to specify 'prefix' option for C2TECSBridgePlugin.
+ */
+EOT
+
+    # generate C functions calling function of call port
+    @signature.get_function_head_array.each { |func_head|
+      func_name = func_head.get_name
+      ret_type  = func_head.get_return_type
+      params    = func_head.get_paramlist.get_items
+
+      # p "celltype_name, sig_name, func_name, func_global_name"
+      # p "#{ct_name}, #{sig_name}, #{func_name}, #{func_global_name}"
+
+      # function header
+      file.print( "#{ret_type.get_type_str}\n" )
+      header_file.printf( "%-16s", ret_type.get_type_str )
+      file.print( "#{@prefix}#{func_name}#{@suffix}(" )
+      header_file.print( "#{@prefix}#{func_name}#{@suffix}(" )
+
+      delim = ""
+      params.each{ |param|
+        file.printf( "#{delim} #{param.get_type.get_type_str} #{param.get_name}#{param.get_type.get_type_str_post}" )
+        header_file.printf( "#{delim} #{param.get_type.get_type_str} #{param.get_name}#{param.get_type.get_type_str_post}" )
+        delim = ","
+      }
+      file.print( " )\n{\n" )
+      header_file.print( " );\n" )
+
+      # call function in call port
+      if ! ret_type.is_void? then
+        file.print( "  #{ret_type.get_type_str}  retval;\n" )
+        file.print( "  retval = " )
+      else
+        file.print( "  " )
+      end
+
+      file.print( "cCall_#{func_name}(" )
+
+      delim = ""
+      params.each{ |param|
+        file.printf( "#{delim} #{param.get_name}" )
+        delim = ","
+      }
+      file.print( " );\n" )
+
+      if ! ret_type.is_void? then
+        file.print( "  return retval;\n" )
+      end
+      file.print( "}\n\n" )
+    }
+
+    header_file.print <<EOT
+
+#endif /* #{@signature.get_global_name}__h */
+
+EOT
+    
+    header_file.close
+  end
+
+  #===  set_prefix - prefix ãã©ã°ã¤ã³ãªãã·ã§ã³
+  def set_prefix rhs
+    @prefix = rhs.to_s
+  end
+  #===  set_suffix - suffix ãã©ã°ã¤ã³ãªãã·ã§ã³
+  def set_suffix rhs
+    @suffix = rhs.to_s
+  end
+  #===  set_header_name - header_name ãã©ã°ã¤ã³ãªãã·ã§ã³
+  def set_header_name rhs
+    @header_name = "#{$gen}/" + rhs.to_s
+    if ! ( @header_name =~ /\.h\Z/ ) then
+      @header_name += ".h"
+    end
+  end
+  
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/CellPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/CellPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/CellPlugin.rb	(revision 270)
@@ -0,0 +1,80 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2011 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: CellPlugin.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+#== celltype ãã©ã°ã¤ã³ã®å
+±éã®è¦ªã¯ã©ã¹
+class CellPlugin < Plugin
+
+  #=== CellPlugin# initialize
+  #cell::     Cell        ã»ã«ï¼ã¤ã³ã¹ã¿ã³ã¹ï¼
+  # ãã®ã¡ã½ããã¯ãã»ã«ã®æ§æè§£æãçµãã£ãã¨ããã§å¼ã³åºããã
+  # ãã®æ®µéã§ã¯æå³è§£æãçµãã£ã¦ããªã
+  def initialize( cell, option )
+    super()
+    @cell = cell
+    @plugin_arg_str = CDLString.remove_dquote option
+    # @plugin_arg_str = option.gsub( /\A"(.*)/, '\1' )    # åå¾ã® "" ãåãé¤ã
+    # @plugin_arg_str.sub!( /(.*)"\z/, '\1' )
+    @plugin_arg_list = {}
+  end
+
+  #=== å¾ãã® CDL ã³ã¼ããçæ
+  #ãã©ã°ã¤ã³ã®å¾ãã® CDL ã³ã¼ããçæ
+  #file:: File: 
+  def self.gen_post_code( file )
+    # è¤æ°ã®ãã©ã°ã¤ã³ã® post_code ãä¸ã¤ã®ãã¡ã¤ã«ã«å«ã¾ãããããä»¥ä¸ã®ãããªè¦åºããã¤ãããã¨
+    # file.print "/* '#{self.class.name}' post code */\n"
+  end
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/CelltypePlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/CelltypePlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/CelltypePlugin.rb	(revision 270)
@@ -0,0 +1,93 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: CelltypePlugin.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+#== celltype ãã©ã°ã¤ã³ã®å
+±éã®è¦ªã¯ã©ã¹
+class CelltypePlugin < Plugin
+
+  #celltype::     Celltype        ã»ã«ã¿ã¤ãï¼ã¤ã³ã¹ã¿ã³ã¹ï¼
+  def initialize( celltype, option )
+    super()
+    @celltype = celltype
+    # @plugin_arg_str = option.gsub( /\A"(.*)/, '\1' )    # åå¾ã® "" ãåãé¤ã
+    # @plugin_arg_str.sub!( /(.*)"\z/, '\1' )
+    @plugin_arg_str = CDLString.remove_dquote option
+    @plugin_arg_list = {}
+  end
+
+  #=== æ°ããã»ã«
+  #cell::        Cell            ã»ã«
+  #
+  # celltype ãã©ã°ã¤ã³ãæå®ãããã»ã«ã¿ã¤ãã®ã»ã«ãçæããã
+  # ã»ã«ã¿ã¤ããã©ã°ã¤ã³ã«å¯¾ããæ°ããã»ã«ã®å ±å
+  def new_cell( cell )
+  end
+
+
+  #=== tCelltype_factory.h ã«æ¿å
+¥ããã³ã¼ããçæãã
+  # file ä»¥å¤ã®ä»ã®ãã¡ã¤ã«ã«ãã¡ã¯ããªã³ã¼ããçæãã¦ããã
+  # ã»ã«ã¿ã¤ããã©ã°ã¤ã³ãæå®ãããã»ã«ã¿ã¤ãã®ã¿å¼ã³åºããã
+  def gen_factory file
+  end
+
+  #=== å¾ãã® CDL ã³ã¼ããçæ
+  #ãã©ã°ã¤ã³ã®å¾ãã® CDL ã³ã¼ããçæ
+  #file:: File: 
+  def self.gen_post_code( file )
+    # è¤æ°ã®ãã©ã°ã¤ã³ã® post_code ãä¸ã¤ã®ãã¡ã¤ã«ã«å«ã¾ãããããä»¥ä¸ã®ãããªè¦åºããã¤ãããã¨
+    # file.print "/* '#{self.class.name}' post code */\n"
+  end
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/DomainPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/DomainPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/DomainPlugin.rb	(revision 270)
@@ -0,0 +1,104 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: DomainPlugin.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+#== ãã¡ã¤ã³ãã©ã°ã¤ã³ã®è¦ªã¯ã©ã¹
+class DomainPlugin < Plugin
+
+  #== domain æå®ããããªã¼ã¸ã§ã³ãå®ç¾©ããã
+  # region ã§ domain æå®ããã£ã
+  #domain_type_name::Symbol : domain æå®å­ã®ç¬¬ä¸å¼æ°
+  #option::String : domain æå®å­ã®ç¬¬äºå¼æ°
+  def initialize( region, domain_type_name, option )
+  end
+
+  #== çµå join ã«ãã©ã°ã¤ã³ãæ¿å
+¥ãã
+  #join::Join : çµåã«é¢ããæ
+å ±
+  #return::[ plugin_name::String, option::String ]: æ¿å
+¥ãããã©ã°ã¤ã³ã æ¿å
+¥ãããã®ããªããã° nil ãè¿ã
+  #return::(1) [ plugin_name, option ] or (2) [[ plugin_name, option ], ...], or [] or nil:  (2): not supported now
+  #   nil: region éã®çµåç¦æ­¢, []: region éã®çµåå¯(ãã©ã°ã¤ã³æ¿å
+¥ç¡ã)
+  #   [ plugin_name, option ]: *_through( plugin_name, option ) æå®ããã®ã¨åç­
+  #
+  # region éã® through ãæå®ããã¦ããå ´åãout_through, to_through
+  # ã§ã¯ããããã«ãã£ã¦æå®ããããã©ã°ã¤ã³ã®å¾ãã«ãin_through ã®å ´å
+  # in_through ãã©ã°ã¤ã³ã®åã«æ¿å
+¥ããã
+  #
+  # ãã®ã¡ã½ãããå¼åºãããæç¹ã§ã¯ Join#get_rhs_cell ãªã©æå³è§£æå¾
+  # ã«ããå¼ã³åºããªãã¡ã½ãããå¼åºãã¦ããæå¹ãªå¤ã¯å¾ãããªã
+  #
+  def add_through_plugin( join, current_region, next_region, through_type )
+    # join.get_owner:Cell  å·¦è¾ºã®ã»ã«
+    # join.get_definition:Port å¼ã³å£
+    # join.get_subscript:Integer or nil å¼ã³å£é
+åã®æ·»æ° (Join::@subscript ã®èª¬æåç
+§)
+    # join.get_cell:Cell å³è¾ºã®ã»ã«
+    # join.get_port_name:Symbol åãå£
+    # get_rhs_subscript:Integer or nil åãå£é
+åã®æ·»æ° (Join::@rhs_subscript ã®èª¬æåç
+§)
+    # return []
+    return nil
+  end
+
+  #== require ãçµåå¯è½ãï¼
+  def joinable?(current_region, next_region, through_type )
+    return false
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2AlarmHandlerPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2AlarmHandlerPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2AlarmHandlerPlugin.rb	(revision 270)
@@ -0,0 +1,92 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2012 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#++
+
+#require "HRP2KernelObjectPlugin"
+require_tecsgen_lib "HRP2KernelObjectPlugin.rb"
+#== celltype ãã©ã°ã¤ã³ã®å
+±éã®è¦ªã¯ã©ã¹
+class HRP2AlarmHandlerPlugin < HRP2KernelObjectPlugin
+    @@ep = [:eStartAlarm, :eStopAlarm, :eManageAlarm, :eReferAlarm ]
+    ##
+    #
+    # file : output file (ex.tecsgen.cfg)
+    # cell : 
+    # val  : 
+    # tab  : 
+    def print_cfg_cre(file, cell, val, tab)
+        val[:id] = val[:id].gsub( /(^|[^\$])\$id\$/, "\\1#{@celltype.get_name.to_s}_#{cell.get_name.to_s}" )
+        # $cbp$ã®ä»£ãã
+        index = cell.get_id - @celltype.get_id_base
+        cell_CB_name = "#{@celltype.get_global_name}_CB_tab[#{index}]"
+        # CRE_XXXã®çæ
+        if (cell.get_region.get_region_type != :DOMAIN) || (cell.get_region.get_param != :KERNEL_DOMAIN)
+            # ç¡æå± or ã¦ã¼ã¶ãã¡ã¤ã³ã«å±ããå ´å
+                raise "alarm handler #{val[:id]} must belong to kernel domain."
+        else
+            file.print <<EOT
+#{tab}CRE_ALM(#{val[:id]}, { #{val[:attribute]}, &#{cell_CB_name}, tAlarmHandler_start });
+EOT
+        end
+    end
+
+    def print_cfg_sac(file, val, acv)
+       file.puts "SAC_ALM(#{val[:id]}, { #{acv[0]}, #{acv[1]}, #{acv[2]}, #{acv[3]} });"
+    end
+
+    #tAlarmã®åãå£ãªã¹ã 
+    def get_entry_ports_name_list()
+        @@ep
+    end
+    
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2Cache.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2Cache.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2Cache.rb	(revision 270)
@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2CyclicHandlerPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2CyclicHandlerPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2CyclicHandlerPlugin.rb	(revision 270)
@@ -0,0 +1,93 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2012 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#++
+
+#require "HRP2KernelObjectPlugin"
+require_tecsgen_lib "HRP2KernelObjectPlugin.rb"
+
+#== celltype ãã©ã°ã¤ã³ã®å
+±éã®è¦ªã¯ã©ã¹
+class HRP2CyclicHandlerPlugin < HRP2KernelObjectPlugin
+    @@ep = [:eStartCyclic, :eStopCyclic, :eManageCyclic, :eReferCyclic ]
+    ##
+    #
+    # file : output file (ex.tecsgen.cfg)
+    # cell : 
+    # val  : 
+    # tab  : 
+    def print_cfg_cre(file, cell, val, tab)
+        val[:id] = val[:id].gsub( /(^|[^\$])\$id\$/, "\\1#{@celltype.get_name.to_s}_#{cell.get_name.to_s}" )
+        # $cbp$ã®ä»£ãã
+        index = cell.get_id - @celltype.get_id_base
+        cell_CB_name = "#{@celltype.get_global_name}_CB_tab[#{index}]"
+        # CRE_XXXã®çæ
+        if (cell.get_region.get_region_type != :DOMAIN) || (cell.get_region.get_param != :KERNEL_DOMAIN)
+            # ç¡æå± or ã¦ã¼ã¶ãã¡ã¤ã³ã«å±ããå ´å
+                raise "cyclic handler #{val[:id]} must belong to kernel domain."
+        else
+            file.print <<EOT
+#{tab}CRE_CYC(#{val[:id]}, { #{val[:attribute]}, &#{cell_CB_name}, tCyclicHandler_start, #{val[:cyclicTime]}, #{val[:cyclicPhase]} });
+EOT
+        end
+    end
+
+    def print_cfg_sac(file, val, acv)
+       file.puts "SAC_CYC(#{val[:id]}, { #{acv[0]}, #{acv[1]}, #{acv[2]}, #{acv[3]} });"
+    end
+
+    #tCyclicHandlerã®åãå£ãªã¹ã 
+    def get_entry_ports_name_list()
+        @@ep
+    end
+
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2DataqueuePlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2DataqueuePlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2DataqueuePlugin.rb	(revision 270)
@@ -0,0 +1,86 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2012 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#++
+
+#require "HRP2KernelObjectPlugin"
+require_tecsgen_lib "HRP2KernelObjectPlugin.rb"
+
+
+class HRP2DataqueuePlugin < HRP2KernelObjectPlugin
+    @@ep = [:eSendDataqueue, :eReceiveDataqueue, :eManageDataqueue, :eReferDataqueue ]
+    #=== HRP2DataqueuePlugin#print_cfg_cre
+    # CRE_DTQã®åºå
+    # file:: FILE:     åºåå
+ãã¡ã¤ã«
+    # val :: string:   ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å±æ§ã®è§£æçµæ
+    # tab :: string:   ã¤ã³ãã³ãç¨ã®tab
+    def print_cfg_cre(file, cell, val, tab)
+        file.print tab
+        file.puts "CRE_DTQ(#{val[:id]}, {#{val[:attribute]}, #{val[:count]}, #{val[:dtqmb]}});"
+    end
+    #=== HRP2DataqueuePlugin#print_cfg_sac
+    # SAC_DTQã®åºå
+    # file:: FILE:     åºåå
+ãã¡ã¤ã«
+    # val :: string:   ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å±æ§ã®è§£æçµæ
+    # acv :: string:   ã¢ã¯ã»ã¹ãã¯ã¿    
+    def print_cfg_sac(file, val, acv)
+        file.puts "SAC_DTQ(#{val[:id]}, {#{acv[0]}, #{acv[1]}, #{acv[2]}, #{acv[3]}});"
+    end
+    #tDataqueueã®åãå£ãªã¹ã 
+    def get_entry_ports_name_list()
+        @@ep
+    end
+end
+
+
+  
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2EventflagPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2EventflagPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2EventflagPlugin.rb	(revision 270)
@@ -0,0 +1,86 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2012 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#++
+
+#require "HRP2KernelObjectPlugin"
+require_tecsgen_lib "HRP2KernelObjectPlugin.rb"
+
+
+class HRP2EventflagPlugin < HRP2KernelObjectPlugin
+    @@ep = [:eSetEventflag, :eWaitEventflag, :eManageEventflag, :eReferEventflag ]
+    #=== HRP2EventflagPlugin#print_cfg_cre
+    # CRE_FLGã®åºå
+    # file:: FILE:     åºåå
+ãã¡ã¤ã«
+    # val :: string:   ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å±æ§ã®è§£æçµæ
+    # tab :: string:   ã¤ã³ãã³ãç¨ã®tab
+    def print_cfg_cre(file, cell, val, tab)
+        file.print tab
+        file.puts "CRE_FLG(#{val[:id]}, {#{val[:attribute]}, #{val[:flagPattern]}});"
+    end
+    #=== HRP2EventflagPlugin#print_cfg_sac
+    # SAC_FLGã®åºå
+    # file:: FILE:     åºåå
+ãã¡ã¤ã«
+    # val :: string:   ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å±æ§ã®è§£æçµæ
+    # acv :: string:   ã¢ã¯ã»ã¹ãã¯ã¿    
+    def print_cfg_sac(file, val, acv)
+        file.puts "SAC_FLG(#{val[:id]}, {#{acv[0]}, #{acv[1]}, #{acv[2]}, #{acv[3]}});"
+    end
+    #tEventflagã®åãå£ãªã¹ã 
+    def get_entry_ports_name_list()
+        @@ep
+    end
+end
+
+
+  
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2FixedSizeMemoryPoolPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2FixedSizeMemoryPoolPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2FixedSizeMemoryPoolPlugin.rb	(revision 270)
@@ -0,0 +1,86 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2012 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#++
+
+#require "HRP2KernelObjectPlugin"
+require_tecsgen_lib "HRP2KernelObjectPlugin.rb"
+
+
+class HRP2FixedSizeMemoryPoolPlugin < HRP2KernelObjectPlugin
+    @@ep = [:eSendFixedSizeMemoryPool, :eReceiveFixedSizeMemoryPool, :eManageFixedSizeMemoryPool, :eReferFixedSizeMemoryPool ]
+    #=== HRP2FixedSizeMemoryPoolPlugin#print_cfg_cre
+    # CRE_MPFã®åºå
+    # file:: FILE:     åºåå
+ãã¡ã¤ã«
+    # val :: string:   ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å±æ§ã®è§£æçµæ
+    # tab :: string:   ã¤ã³ãã³ãç¨ã®tab
+    def print_cfg_cre(file, cell, val, tab)
+        file.print tab
+        file.puts "CRE_MPF(#{val[:id]}, {#{val[:attribute]}, #{val[:blockCount]}, #{val[:blockSize]}, #{val[:mpf]}, #{val[:mpfmb]}});"
+    end
+    #=== HRP2FixedSizeMemoryPoolPlugin#print_cfg_sac
+    # SAC_MPFã®åºå
+    # file:: FILE:     åºåå
+ãã¡ã¤ã«
+    # val :: string:   ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å±æ§ã®è§£æçµæ
+    # acv :: string:   ã¢ã¯ã»ã¹ãã¯ã¿    
+    def print_cfg_sac(file, val, acv)
+        file.puts "SAC_MPF(#{val[:id]}, {#{acv[0]}, #{acv[1]}, #{acv[2]}, #{acv[3]}});"
+    end
+    #tFixedSizeMemoryPoolã®åãå£ãªã¹ã 
+    def get_entry_ports_name_list()
+        @@ep
+    end
+end
+
+
+  
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2HandlerPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2HandlerPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2HandlerPlugin.rb	(revision 270)
@@ -0,0 +1,110 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#++
+
+#require "HRP2KernelObjectPlugin"
+require_tecsgen_lib "HRP2KernelObjectPlugin.rb"
+
+
+#== celltype ãã©ã°ã¤ã³ã®å
+±éã®è¦ªã¯ã©ã¹
+class HRP2HandlerPlugin < HRP2KernelObjectPlugin
+    @@ep = [:eStartAlarm, :eStopAlarm, :eManageAlarm, :eReferAlarm ]
+    ##
+    #
+    # file : output file (ex.tecsgen.cfg)
+    # cell : 
+    # val  : 
+    # tab  : 
+    def print_cfg_cre(file, cell, val, tab)
+        val[:id] = val[:id].gsub( /(^|[^\$])\$id\$/, "\\1#{@celltype.get_name.to_s}_#{cell.get_name.to_s}" )
+        # $cbp$ã®ä»£ãã
+        index = cell.get_id - @celltype.get_id_base
+        cell_CB_name = "#{@celltype.get_global_name}_CB_tab[#{index}]"
+        # CRE_XXXã®çæ
+        domainOption = cell.get_region.get_domain_root.get_domain_type.get_option
+        # if (cell.get_region.get_region_type != :DOMAIN) || (cell.get_region.get_param != :KERNEL_DOMAIN)
+        if (domainOption == "OutOfDomain") || (domainOption != "trusted")
+            # ç¡æå± or ã¦ã¼ã¶ãã¡ã¤ã³ã«å±ããå ´å
+                raise "#{@plugin_arg_str.to_s.downcase} handler #{val[:id]} must belong to kernel domain."
+        elsif @plugin_arg_str == "ALARM"
+            file.print <<EOT
+#{tab}CRE_ALM(#{val[:id]}, { #{val[:attribute]}, &#{cell_CB_name}, tAlarmHandler_start });
+EOT
+        elsif @plugin_arg_str == "CYCLIC"
+            file.print <<EOT
+#{tab}CRE_CYC(#{val[:id]}, { #{val[:attribute]}, &#{cell_CB_name}, tCyclicHandler_start, #{val[:cyclicTime]}, #{val[:cyclicPhase]} });
+EOT
+        else
+            raise "#{@plugin_arg_str} is unknown option"
+        end
+    end
+
+    def print_cfg_sac(file, val, acv)
+        if @plugin_arg_str == "ALARM"
+            file.puts "SAC_ALM(#{val[:id]}, { #{acv[0]}, #{acv[1]}, #{acv[2]}, #{acv[3]} });"
+        elsif @plugin_arg_str == "CYCLIC"
+            file.puts "SAC_CYC(#{val[:id]}, { #{acv[0]}, #{acv[1]}, #{acv[2]}, #{acv[3]} });"
+        else
+            raise "#{@plugin_arg_str} is unknown option"
+        end
+    end
+
+=begin
+    #tAlarmã®åãå£ãªã¹ã 
+    def get_entry_ports_name_list()
+        @@ep
+    end
+=end
+
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2KernelObjectPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2KernelObjectPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2KernelObjectPlugin.rb	(revision 270)
@@ -0,0 +1,390 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2012 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#++
+
+# Regionã¯ã©ã¹ã«ã¡ã½ãããè¿½å 
+=begin
+class Region
+    def get_params
+        return @region_type_param
+    end
+
+    def get_param
+        return @region_type_param[0]
+    end
+
+    def is_root
+        return self == @@root_namespace
+    end
+end
+=end
+
+# Cellã¯ã©ã¹ã«ã¤ã³ã¹ã¿ã³ã¹å¤æ°ã¨ã¡ã½ãããè¿½å 
+=begin
+class Cell
+    def set_referenced_region( region )
+        if @referenced_regions.nil?
+            @referenced_regions = Array.new
+        end
+        if !@referenced_regions.include?(region)
+            @referenced_regions << region
+        end
+    end
+
+    def get_referenced_regions
+        return @referenced_regions
+    end
+
+    # set_referenced_cellã«ããã»ãããã
+    # def set_referenced_region( region, port_name )
+    def set_referenced_cell( cell, port_name )
+        if @referenced_cells.nil?
+            @referenced_cells = Hash.new
+        end
+        if !@referenced_cells.include?(port_name)
+            @referenced_cells[port_name] = Array.new
+        end
+        if !@referenced_cells[port_name].include?(cell)
+            @referenced_cells[port_name] << cell
+        end
+
+        region = cell.get_region
+        puts "***** set_referenced_regions *****"
+        puts "region=#{region.get_name}, port=#{port_name}(#{port_name.class})"
+        if @referenced_regions.nil?
+            @referenced_regions = Hash.new
+        end
+        if !@referenced_regions.include?(port_name)
+            @referenced_regions[port_name] = Array.new
+        end
+        if !@referenced_regions[port_name].include?(region)
+            @referenced_regions[port_name] << region
+        end
+        puts "#{@referenced_regions[port_name]}"
+    end
+
+    def get_referenced_cells( port_name )
+        if !@referenced_cells.nil? && @referenced_cells.include?(port_name)
+            return @referenced_cells[port_name]
+        else
+            return nil
+        end
+    end
+
+    def get_referenced_regions( port_name )
+        if !@referenced_regions.nil? && @referenced_regions.include?(port_name)
+            return @referenced_regions[port_name]
+        else
+            return nil
+        end
+    end
+
+    def self.get_cell_list
+        return @@cell_list
+    end
+
+    def self.get_cell_list2
+        return @@cell_list2
+    end
+end
+=end
+
+#== celltype ãã©ã°ã¤ã³ã®å
+±éã®è¦ªã¯ã©ã¹
+class HRP2KernelObjectPlugin < CelltypePlugin
+    # @@obj_hash = {}
+
+    #@celltype:: Celltype
+    #@option:: String     :ãªãã·ã§ã³æå­å
+    def initialize( celltype, option )
+        super
+        # ããããã®ã«ã¼ãã«ãªãã¸ã§ã¯ããè§£æå¯¾è±¡ã»ã«ã¿ã¤ãã«è¿½å 
+        HRP2KernelObjectPlugin.set_celltype(celltype)
+    end
+  
+    #=== HRP2KernelObjectPlugin#print_cfg_cre
+    # åç¨®ã«ã¼ãã«ãªãã¸ã§ã¯ãã®CRE_*ã®åºå
+    # file:: FILE:     åºåå
+ãã¡ã¤ã«
+    # val :: string:   ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å±æ§ã®è§£æçµæ
+    # tab :: string:   ã¤ã³ãã³ãç¨ã®tab
+    def print_cfg_cre(file, cell, val, tab)
+        raise "called virtual method print_cfg_cre in #{@celltype.get_name} plugin"
+    end
+  
+    #=== HRP2KernelObjectPlugin#print_cfg_sac
+    # åç¨®ã«ã¼ãã«ãªãã¸ã§ã¯ãã®SAC_*ã®åºå
+    # file:: FILE:     åºåå
+ãã¡ã¤ã«
+    # val :: string:   ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å±æ§ã®è§£æçµæ
+    # acv :: string:   ã¢ã¯ã»ã¹ãã¯ã¿
+    def print_cfg_sac(file, val, acv)
+        raise "called virtual method print_cfg_sac in #{@celltype.get_name} plugin"
+    end
+  
+    #=== HRP2KernelObjectPlugin#get_entry_ports_name_list
+    # ã«ã¼ãã«ãªãã¸ã§ã¯ãã®åç¨®ã¢ã¯ã»ã¹ã®ç¨®å¥ã®åãå£åãåå¾
+    def get_entry_ports_name_list()
+        raise "called virtual method get_entry_ports_name_list in #{@celltype.get_name} plugin"
+    end
+
+    def string_cfg_cre(cell, val)
+        raise "called virtual method string_cfg_cre in #{@celltype.get_name} plugin"
+    end
+
+    def gen_factory file
+        puts "===== begin #{@celltype.get_name.to_s} plugin ====="
+
+        # å¯¾è±¡ã¨ãªããã¹ã¦ã®ã»ã«ã«ã¤ãã¦ãåãå£ã«çµåããã¦ãã
+        # ã»ã«ã®æå±ãã¡ã¤ã³ãè§£æ
+        if !HRP2KernelObjectPlugin.isChecked()
+            HRP2KernelObjectPlugin.check_referenced_cells()
+        else
+            puts "***** already checked"
+        end
+
+        # è¿½è¨ããããã« AppFile ãä½¿ãï¼æå­ã³ã¼ãå¤æãããªãï¼
+        file2 = AppFile.open( "#{$gen}/tecsgen.cfg" )
+        file2.print "\n/* Generated by #{self.class.name} */\n\n"
+
+        @celltype.get_cell_list.each { |cell|
+            if cell.is_generate?
+                puts "===== begin check my domain #{cell.get_name} ====="
+                # attrã®å¤ãããã·ã¥ã«å
+¥ãã
+                val = {}
+                @celltype.get_attribute_list.each{ |a|
+                    p a.get_name
+                    if a.get_type.kind_of?( ArrayType )
+                        val[a.get_name] = []
+                        if j = cell.get_join_list.get_item(a.get_name)
+                            # ã»ã«çææã«åæåããå ´å
+                            j.get_rhs.each { |elem|
+                                val[a.get_name] << elem.to_s
+                            }
+                        elsif i = a.get_initializer
+                            # ã»ã«ã¿ã¤ãã®åæåå¤ãä½¿ãå ´å
+                            i.each { |elem|
+                                val[a.get_name] << elem.to_s
+                            }
+                        else
+                            raise "attribute is not initialized"
+                        end
+                    else
+                        if j = cell.get_join_list.get_item(a.get_name)
+                            # ã»ã«çææã«åæåããå ´å
+                            val[a.get_name] = j.get_rhs.to_s
+                        elsif i = a.get_initializer
+                            # ã»ã«ã¿ã¤ãã®åæåå¤ãä½¿ãå ´å
+                            val[a.get_name] = i.to_s
+                        else
+                            raise "attribute is not initialized"
+                        end
+                    end
+                }
+                # generate.rbãåèã«
+                # $id$ãç½®æ
+                if val[:id].nil? != true
+                    puts val[:id]
+                    val[:id] = val[:id].gsub( /(^|[^\$])\$id\$/, "\\1#{@celltype.get_name.to_s}_#{cell.get_name.to_s}" )
+                end
+                # $cbp$ã®ä»£ãã
+                index = cell.get_id - @celltype.get_id_base
+                cell_CB_name = "#{@celltype.get_global_name}_CB_tab[#{index}]"
+                cell_domain_root = cell.get_region.get_domain_root
+                cell_domain_type = cell.get_region.get_domain_root.get_domain_type
+
+                # CRE_XXX/DEF_XXXã®çæ
+                if cell_domain_type.get_option.to_s != "OutOfDomain"
+                    # ä¿è­·ãã¡ã¤ã³ã«å±ããå ´å
+                    if !HRP2KernelObjectPlugin.include_region(cell_domain_root.get_name.to_s)
+                        # ãã®ä¿è­·ãã¡ã¤ã³ã®.cfgãçæããã¦ããªãå ´å
+                        HRP2KernelObjectPlugin.set_region_list(cell_domain_root.get_name.to_s)
+                        puts "~~~~~ #{cell_domain_root.get_name.to_s} is registered!"
+
+                        # if cell.get_region.get_param == :KERNEL_DOMAIN
+                        if cell_domain_type.get_option.to_s == "trusted"
+                            # file2.print "#{cell.get_region.get_name.to_s}{\n"
+                            file2.print "KERNEL_DOMAIN{\n"
+                        else
+                            file2.print "DOMAIN(#{cell_domain_root.get_name.to_s}){\n"
+                        end
+                        file2.puts "\tINCLUDE(\"#{$gen}/tecsgen_#{cell_domain_root.get_name.to_s}.cfg\");" 
+                        file2.puts "}\n"
+                    else
+                        print "~~~~~ #{cell.get_region.get_name.to_s} is included in"
+                        p @@region_list
+                    end
+                    file3 = AppFile.open( "#{$gen}/tecsgen_#{cell_domain_root.get_name.to_s}.cfg" )
+                    print_cfg_cre(file3, cell, val,"")
+                    file3.close
+                else
+                    # ç¡æå±ã®å ´å
+                    puts "~~~~~ #{cell_domain_root.get_name.to_s} is OutOfDomain"
+                    print_cfg_cre(file2, cell, val, "")
+                end
+
+                puts "===== end check my domain #{cell.get_name} ====="
+                # SAC_XXXã®çæ
+                puts "===== begin check regions #{cell.get_name} ====="
+                p val[:accessPattern]
+                p val[:accessPattern].class
+
+                #ep = [ :eTaskActivate, :eTaskControl, :eTaskManage, :eTaskRefer ]
+                #åã«ã¼ãã«ãªãã¸ã§ã¯ãã®åãå£åãåå¾
+                # ep = get_entry_ports_name_list()
+                i = 0
+                acv = []
+                # ã¢ã¯ã»ã¹è¨±å¯ãã¯ã¿ã®çæ
+                val[:accessPattern].each { |acptnx|
+                    # ã¢ã¯ã»ã¹è¨±å¯ãã¿ã¼ã³ã®çæ
+                    if acptnx != "OMIT"
+                        acv << acptnx
+                        p acv[i]
+                    elsif cell_domain_type.get_option.to_s == "trusted"
+                        acv << "TACP_KERNEL"
+                        p acv[i]
+                    elsif cell_domain_type.get_option.to_s != "OutOfDomain"
+                        acv << "TACP(#{cell_domain_root.get_name.to_s})"
+                    else
+                        acv << "TACP_SHARED"
+                    end
+
+                    i += 1
+                }
+
+                print "acv = "
+                p acv
+
+                #åç¨®SACã®çæ
+                domainOption = cell_domain_type.get_option
+                # if cell.get_region.get_region_type == :DOMAIN
+                if domainOption != "OutOfDomain"
+                    # ä¿è­·ãã¡ã¤ã³ã«å±ããå ´å
+                    file3 = AppFile.open( "#{$gen}/tecsgen_#{cell.get_region.get_name.to_s}.cfg" )
+                    print_cfg_sac(file3, val, acv)
+                    file3.close
+                else
+                    # ç¡æå±ã®å ´å
+                    print_cfg_sac(file2, val, acv)
+                end
+
+                puts "===== end check regions #{cell.get_name} ====="
+            end
+        }
+
+        puts "===== end #{@celltype.get_name.to_s} plugin ====="
+        file2.close
+    end
+
+    # ã«ã¼ãã«ãªãã¸ã§ã¯ãã»ã«ã¿ã¤ãã®ç®¡ç
+    # HRP2KernelObjectPluginã¯ã©ã¹ã«å¯¾ãã¦ã¡ã½ããå¼åºããè¡ããã¨ãæ³å®
+    @@checked = false
+    @@celltype_list = []
+    @@region_list = []
+
+    def self.isChecked()
+        return @@checked
+    end
+
+    def self.check_referenced_cells()
+        puts "===== begin check registered celltype ====="
+        self.get_celltype_list.each { |ct|
+            p ct.get_name.to_s
+        }
+        puts "===== end check registered celltype ====="
+
+=begin
+        Cell.get_cell_list2.each { |cell|
+            cell.get_celltype.get_port_list.each{ |p|
+                next if p.get_port_type != :CALL
+                j = cell.get_join_list.get_item(p.get_name)
+                printf "===== check call port : "
+                p p.get_name.to_s
+                next if j.nil? # æªçµåã®å ´å
+                if @@celltype_list.include?(j.get_celltype)
+                    # j.get_cell.set_referenced_region(cell.get_region)
+                    # j.get_cell.set_referenced_region(cell.get_region, j.get_port_name)
+                    j.get_cell.set_referenced_cell(cell, j.get_port_name)
+                    printf "===== check joined rhs cell : "
+                    p j.get_cell.get_name.to_s
+                    printf "===== check joined rhs port_name : "
+                    p j.get_port_name
+                end
+            }
+        }
+=end
+        @@checked = true
+    end
+
+    def self.set_celltype( celltype )
+        @@celltype_list << celltype
+    end
+
+    def self.get_celltype_list
+        return @@celltype_list
+    end
+
+    def self.set_region_list( region )
+        @@region_list << region
+    end
+
+    def self.include_region( region )
+        return @@region_list.include?(region)
+    end
+
+    def self.include_celltype?( celltype )
+        return @@celltype_list.include?(celltype)
+    end
+
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2ObjectPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2ObjectPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2ObjectPlugin.rb	(revision 270)
@@ -0,0 +1,113 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#++
+
+#require "HRP2KernelObjectPlugin"
+require_tecsgen_lib "HRP2KernelObjectPlugin.rb"
+
+
+class HRP2ObjectPlugin < HRP2KernelObjectPlugin
+    # @@ep = [:eSignalSemaphore, :eWaitSemaphore, :eManageSemaphore, :eReferSemaphore ]
+    @@api = {
+        "SEMAPHORE"=>["SEM", :id, :attribute, :count, :max],
+        "EVENTFLAG"=>["FLG", :id, :attribute, :flagPattern],
+        "DATAQUEUE"=>["DTQ", :id, :attribute, :count, :dtqmb],
+        "PRIORITY_DATAQUEUE"=>["PDQ", :id, :attribute, :count, :maxDataPriority, :pdqmb],
+        "FIXED_SIZE_MEMORYPOOL"=>["MPF", :id, :attribute, :blockCount, :blockSize, :mpf, :mpfmb],
+        "KERNEL"=>["SYS"],
+        "MESSAGE_BUFFER"=>["MBF", :id, :attribute, :maxSize, :bufferSize, :mbfmb],
+    }
+
+    #=== HRP2SemaphorePlugin#print_cfg_cre
+    # CRE_SEMã®åºå
+    # file:: FILE:     åºåå
+ãã¡ã¤ã«
+    # val :: string:   ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å±æ§ã®è§£æçµæ
+    # tab :: string:   ã¤ã³ãã³ãç¨ã®tab
+    def print_cfg_cre(file, cell, val, tab)
+        if @@api.has_key?(@plugin_arg_str) == false
+            raise "#{@plugin_arg_str} is unknown"
+        elsif @plugin_arg_str != "KERNEL"
+            arg_list = []
+            @@api[@plugin_arg_str].slice(2..-1).each { |attr|
+                arg_list << "#{val[attr]}"
+            }
+            file.print tab
+            file.puts "CRE_#{@@api[@plugin_arg_str].at(0)}(#{val[:id]}, { #{arg_list.join(", ")} });"
+        end
+    end
+    #=== HRP2SemaphorePlugin#print_cfg_sac
+    # SAC_SEMã®åºå
+    # file:: FILE:     åºåå
+ãã¡ã¤ã«
+    # val :: string:   ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å±æ§ã®è§£æçµæ
+    # acv :: string:   ã¢ã¯ã»ã¹ãã¯ã¿    
+    def print_cfg_sac(file, val, acv)
+        if @@api.has_key?(@plugin_arg_str) == false
+            raise "#{@plugin_arg_str} is unknown"
+        elsif @plugin_arg_str != "KERNEL"
+            file.puts "SAC_#{@@api[@plugin_arg_str].at(0)}(#{val[:id]}, { #{acv[0]}, #{acv[1]}, #{acv[2]}, #{acv[3] }});"
+        else
+            file.puts "SAC_#{@@api[@plugin_arg_str].at(0)}({ #{acv[0]}, #{acv[1]}, #{acv[2]}, #{acv[3]} });"
+        end
+    end
+
+=begin
+    #tSemaphoreã®åãå£ãªã¹ã 
+    def get_entry_ports_name_list()
+        @@ep
+    end
+=end
+end
+
+
+  
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2Plugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2Plugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2Plugin.rb	(revision 270)
@@ -0,0 +1,138 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#++
+
+#
+# åã¡ã½ããã®å½¹å²ãã¯ãDomainPlugin.rb ãåç
+§ã®ãã¨
+# HRP2ã«ã¼ãã«ç¨ãã¡ã¤ã³ãã©ã°ã¤ã³
+class HRP2Plugin < DomainPlugin
+
+  def initialize( region, name, option )
+    print "MyDomainPlugin: initialize: region=#{region.get_name}, domainName=#{name}, option=#{option}\n"
+  end
+
+  def add_through_plugin( join, current_region, next_region, through_type )
+    # join.get_owner:Cell  å·¦è¾ºã®ã»ã«
+    # join.get_definition:Port å¼ã³å£
+    # join.get_subscript:Integer or nil å¼ã³å£é
+åã®æ·»æ° (Join::@subscript ã®èª¬æåç
+§)
+    # join.get_cell:Cell å³è¾ºã®ã»ã«
+    # join.get_port_name:Symbol åãå£
+    # get_rhs_subscript:Integer or nil åãå£é
+åã®æ·»æ° (Join::@rhs_subscript ã®èª¬æåç
+§)
+    # return []
+    print "MyDomainPlugin: add_through_plugin: #{current_region.get_name}=>#{next_region.get_name}, #{join.get_owner.get_name}.#{join.get_definition.get_name}=>#{join.get_cell.get_name}.#{join.get_port_name}, #{through_type}\n"
+
+    puts "=====Join Check Start====="
+    puts "caller: #{join.get_owner.get_name.to_s}, callee: #{join.get_cell.get_name.to_s}"
+    puts "=====Join Check param====="
+    current_domain = current_region.get_domain_root.get_domain_type
+    next_domain = next_region.get_domain_root.get_domain_type
+    puts current_domain.get_option.to_s
+    if !next_domain.nil?
+        puts next_domain.get_option.to_s
+    else
+        puts "next domain is nil!"
+    end
+
+    if HRP2KernelObjectPlugin.include_celltype?(join.get_cell.get_celltype)
+        # çµåå
+ãã«ã¼ãã«ãªãã¸ã§ã¯ãã»ã«
+        # @plugin_body = HRP2SVCPlugin.new(cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell)
+        # ä½ãããªãthrough
+        puts "***** #{join.get_cell.get_celltype.get_name} is kernel object"
+        return []
+        # return [ :HRP2SVCPlugin, "channelCelltype=tMessagebufferChannel,noClientSemaphore=true" ]
+    # elsif @end_region.is_root?
+    # elsif next_region.get_option == OutOfDomain
+    # elsif next_domain.nil?
+    elsif next_domain.get_option.to_s == "OutOfDomain"
+    #     # çµåå
+ãç¡æå±
+    #     # ä½ãããªãthrough
+    #     # @plugin_body = HRP2SVCPlugin.new(cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell)
+        puts "***** nil"
+        return []
+        # return [ :HRP2SVCPlugin, "channelCelltype=tMessagebufferChannel,noClientSemaphore=true" ]
+    #elsif @start_region.get_param != :KERNEL_DOMAIN && @end_region.get_param == :KERNEL_DOMAIN
+    elsif current_domain.get_option.to_s != "trusted" && next_domain.get_option.to_s == "trusted"
+        # ã¦ã¼ã¶ãã¡ã¤ã³ããã«ã¼ãã«ãã¡ã¤ã³ã¸ã®çµå
+        # @plugin_body = HRP2SVCPlugin.new(cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell)
+        puts "***** svc"
+        return [ :HRP2SVCPlugin, "" ]
+    elsif current_domain != next_domain
+        # ã¦ã¼ã¶ãã¡ã¤ã³ããå¥ã®ã¦ã¼ã¶ãã¡ã¤ã³ã¸ã®çµå
+        # @plugin_body = HRP2RPCPlugin.new(cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell)
+        puts "***** rpc"
+        return [ :HRP2RPCPlugin, "channelCelltype=tMessagebufferChannel,noClientSemaphore=true" ]
+    else
+        # ãã®ä»
+        # ä½ãããªãthrough
+        # @plugin_body = HRP2SVCPlugin.new(cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell)
+        print "warning: at HRP2 Join Check"
+        return nil
+    end
+
+    puts "=====Join Check End====="
+  end
+
+  def joinable?(current_region, next_region, through_type )
+    print "MyDomainPlugin: joinable? from #{current_region.get_name} to #{next_region.get_name} (#{through_type})\n"
+    return true
+  end
+
+  def self.gen_post_code file
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2PostHook.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2PostHook.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2PostHook.rb	(revision 270)
@@ -0,0 +1,127 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2012 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#++
+
+#require "HRP2KernelObjectPlugin"
+require_tecsgen_lib "HRP2KernelObjectPlugin.rb"
+
+class HRP2PostHook
+    #@celltype:: Celltype
+    def initialize( celltype )
+        puts "new post hook #{celltype.get_name}"
+        @celltype = celltype
+    end
+
+    def generate
+        # ã«ã¼ãã«ãªãã¸ã§ã¯ãã®ã»ã«ã¿ã¤ãã¯ã¡ã¢ãªä¿è­·ããªã
+#=begin
+        # TODO: ãã¹ãã®ããã«ç¡å¹å
+        if HRP2KernelObjectPlugin.include_celltype?( @celltype )
+            puts "nothing is generated for kernel object component"
+            return
+        end
+#=end
+
+        rlist = @celltype.get_region_list
+        if @celltype.is_singleton?
+            # singletonã®å ´å
+            puts "<singleton>"
+
+            if rlist.length == 0
+                file = AppFile.open( "#{$gen}/tecsgen.cfg" )
+            else
+                file = AppFile.open( "#{$gen}/tecsgen_#{rlist[0].get_param.to_s}.cfg" )
+            end
+            # ã»ã«ç®¡çãã­ãã¯ã¨ã¹ã±ã«ãã³ã®ã¡ã¢ãªä¿è­·
+            file.print "ATT_MOD(\"#{@celltype.get_global_name}_tecsgen.o\");\n"
+            if !@celltype.is_all_entry_inline?
+                # ã»ã«ã¿ã¤ãã³ã¼ãã®ã¡ã¢ãªä¿è­·
+                file.print "ATT_MOD(\"#{@celltype.get_global_name}.o\");\n"
+            end
+
+            file.close
+
+        else
+            # singletonã§ãªãå ´å
+            puts "<non-singleton>"
+
+            # ã¹ã±ã«ãã³ã¨ã»ã«ã¿ã¤ãã³ã¼ãã®ä¿è­·
+            if (rlist.length == 1) && 
+                (@celltype.get_n_cell_gen == @celltype.get_n_cell_gen_r( rlist[0] ))
+                # æå±ããä¿è­·ãã¡ã¤ã³ã1ã¤ã®å ´å
+                puts "<private celltype>"
+                file = AppFile.open( "#{$gen}/tecsgen_#{rlist[0].get_param.to_s}.cfg" )
+            else
+                # ç¡æå± or æå±ããä¿è­·ãã¡ã¤ã³ãè¤æ°ã®å ´å
+                puts "<shared celltype>"
+                file = AppFile.open( "#{$gen}/tecsgen.cfg" )
+            end
+
+            # ã¹ã±ã«ãã³ã®ã¡ã¢ãªä¿è­·
+            file.print "ATT_MOD(\"#{@celltype.get_global_name}_tecsgen.o\");\n"
+            if !@celltype.is_all_entry_inline?
+                # ã»ã«ã¿ã¤ãã³ã¼ãã®ã¡ã¢ãªä¿è­·
+                file.print "ATT_MOD(\"#{@celltype.get_global_name}.o\");\n"
+            end
+            file.close
+
+            # ã»ã«ç®¡çãã­ãã¯ã®ä¿è­·
+            rlist.each { |reg|
+                file = AppFile.open( "#{$gen}/tecsgen_#{reg.get_param.to_s}.cfg" )
+                file.print "ATT_MOD(\"#{@celltype.get_global_name}_#{reg.get_name.to_s}_tecsgen.o\");\n"
+                file.close
+            }
+
+        end
+    end
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2PriorityDataqueuePlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2PriorityDataqueuePlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2PriorityDataqueuePlugin.rb	(revision 270)
@@ -0,0 +1,84 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2012 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#++
+
+require_tecsgen_lib "HRP2KernelObjectPlugin.rb"
+
+class HRP2PriorityDataqueuePlugin < HRP2KernelObjectPlugin
+    @@ep = [:eSendPriorityDataqueue, :eReceivePriorityDataqueue, :eManagePriorityDataqueue, :eReferPriorityDataqueue ]
+    #=== HRP2PriorityDataqueuePlugin#print_cfg_cre
+    # CRE_PDQã®åºå
+    # file:: FILE:     åºåå
+ãã¡ã¤ã«
+    # val :: string:   ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å±æ§ã®è§£æçµæ
+    # tab :: string:   ã¤ã³ãã³ãç¨ã®tab
+    def print_cfg_cre(file, cell, val, tab)
+        file.print tab
+        file.puts "CRE_PDQ(#{val[:id]}, {#{val[:attribute]}, #{val[:count]}, #{val[:maxDataPriority]}, #{val[:pdqmb]}});"
+    end
+    #=== HRP2PriorityDataqueuePlugin#print_cfg_sac
+    # SAC_PDQã®åºå
+    # file:: FILE:     åºåå
+ãã¡ã¤ã«
+    # val :: string:   ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å±æ§ã®è§£æçµæ
+    # acv :: string:   ã¢ã¯ã»ã¹ãã¯ã¿    
+    def print_cfg_sac(file, val, acv)
+        file.puts "SAC_PDQ(#{val[:id]}, {#{acv[0]}, #{acv[1]}, #{acv[2]}, #{acv[3]}});"
+    end
+    #tPriorityDataqueueã®åãå£ãªã¹ã 
+    def get_entry_ports_name_list()
+        @@ep
+    end
+end
+
+
+  
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2RPCPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2RPCPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2RPCPlugin.rb	(revision 270)
@@ -0,0 +1,348 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#++
+
+require_tecsgen_lib "lib/GenHRP2Marshaler.rb"
+
+# require_tecsgen_lib "GenParamCopy.rb"
+
+#= Transparent RPC ãã©ã°ã¤ã³
+# Transparent RPC ãã£ã³ãã«ãçæãã
+# ãã©ã°ã¤ã³å¼æ°ã¯ä»¥ä¸ã® RPCPluginArgProc ãåç
+§
+
+# mikan through plugin: namespace ãèæ
+®ããã¦ããªã
+# ãããå©ç¨ããå ´åãä»¥ä¸ã®ããã« toppers_jsp.cdl sChannel.cdl ãæå®ããå¿
+è¦ããã
+# tecsgen toppers_jsp.cdl sChannel.cdl your_description.cdl
+
+# ä»¥ä¸ãä»®å®ï¼å¶éäºé 
+ï¼
+#  å¼ã³å
+ãå¼ã³å
+ã®ã¨ã³ãã£ã¢ã³ãchar, short, int_t, long_t, intptr_t ã®ãµã¤ãºãåã
+#  æç¬¦å·ãç¡ç¬¦å·ã§ãµã¤ãºãåã
+
+#
+# RPCãç¨ãããã¡ã¤ã³ééä¿¡ã®
+# throughãã©ã°ã¤ã³
+# HRP2ãã¡ã¤ã³ãã©ã°ã¤ã³ã«ãã£ã¦æ¿å
+¥ããã
+#
+class HRP2RPCPlugin < ThroughPlugin
+
+  include GenTransparentMarshaler
+  # include GenParamCopy
+
+  # RPCPlugin å°ç¨ã®ãªãã·ã§ã³
+  TransparentRPCPluginArgProc = RPCPluginArgProc.dup  # è¤è£½ãä½ã£ã¦å
+ãå¤æ´ããªãããã«ãã
+  TransparentRPCPluginArgProc[ "noClientSemaphore"  ] = Proc.new { |obj,rhs| obj.set_noClientSemaphore rhs }
+  TransparentRPCPluginArgProc[ "semaphoreCelltype"  ] = Proc.new { |obj,rhs| obj.set_semaphoreCelltype rhs }
+
+  #=== RPCPlugin ã® initialize
+  #  èª¬æã¯ ThroughPlugin (plugin.rb) ãåç
+§
+  def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell )
+    super
+    @b_noClientSemaphore = false
+    @semaphoreCelltype = "tSemaphore"
+    initialize_transparent_marshaler cell_name
+
+    # ãªãã·ã§ã³ï¼GenTransparentMarshaler åç
+§
+    @plugin_arg_check_proc_tab = TransparentRPCPluginArgProc
+    parse_plugin_arg
+
+    @rpc_channel_celltype_name = "tRPCPlugin_#{@TDRCelltype}_#{@channelCelltype}_#{@signature.get_name}"
+    @rpc_channel_celltype_file_name = "#{$gen}/#{@rpc_channel_celltype_name}.cdl"
+
+    if @signature.need_PPAllocator? then
+      if @PPAllocatorSize == nil then
+        cdl_error( "PPAllocatorSize must be speicified for oneway [in] array" )
+        # @PPAllocatorSize = 0   # ä»®ã« 0 ã¨ãã¦ãã (cdl ã®æ§æã¨ã©ã¼ãé¿ãããã)
+      end
+    end
+
+#    @signature.each_param{ |func_decl, param_decl|
+#      if func_decl.get_type.is_oneway? then
+#        if ( param_decl.get_size || param_decl.get_count ) && param_decl.get_string then
+#          cdl_error( "array of string not supported for oneway function in Transparent RPC" )  # mikan æå­åã®é
+å
+#        elsif param_decl.get_string == -1 then
+#          cdl_error( "length unspecified string is not permited for oneway function in Transparent RPC" )  # mikan é·ãæªæå®æå­å
+#        end
+#      end
+#    }
+  end
+
+  #=== plugin ã®å®£è¨ã³ã¼ã (celltype ã®å®ç¾©) çæ
+  def gen_plugin_decl_code( file )
+
+    ct_name = "#{@ct_name}_#{@channelCelltype}"
+
+    # ãã®ã»ã«ã¿ã¤ãï¼åãã·ã°ããã£ï¼ã¯æ¢ã«çæããã¦ãããï¼
+    if @@generated_celltype[ ct_name ] == nil then
+      @@generated_celltype[ ct_name ] = [ self ]
+    else
+      @@generated_celltype[ ct_name ] << self
+      return
+    end
+
+    gen_marshaler_celltype
+
+    if @PPAllocatorSize then
+      alloc_cell = "  cell tPPAllocator PPAllocator {\n    heapSize = #{@PPAllocatorSize};\n  };\n"
+      alloc_call_port_join = "    cPPAllocator = PPAllocator.ePPAllocator;\n"
+    else
+      alloc_cell = ""
+      alloc_call_port_join = ""
+    end
+
+    if @b_noClientSemaphore == false then
+      semaphore1 = <<EOT
+  // Semaphore for Multi-task use ("specify noClientSemaphore" option to delete this)
+  cell #{@semaphoreCelltype} Semaphore {
+    count = 1;
+    attribute = C_EXP( "TA_NULL" );
+  };
+EOT
+      semaphore2 = "    cLockChannel = Semaphore.eSemaphore;\n"
+    else
+      semaphore1 = ""
+      semaphore2 = ""
+    end
+
+    f = CFile.open( @rpc_channel_celltype_file_name, "w" )
+    # åãå
+å®¹ãäºåº¦æ¸ãå¯è½æ§ãã (AppFile ã¯ä¸å¯)
+
+    f.print <<EOT
+import( "#{@marshaler_celltype_file_name}" );
+
+composite #{@rpc_channel_celltype_name}Client {
+  /* Interface */
+  entry #{@signature.get_name} eThroughEntry;
+  //call sTDR       cTDR;
+  call sEventflag cEventflag;
+  call sSemaphore cSemaphore;
+  call sMessageBuffer cMessageBuffer;
+
+  /* Implementation */
+#{semaphore1}
+  cell #{@marshaler_celltype_name} #{@signature.get_name}_marshaler{
+    //cTDR         => composite.cTDR;
+    cEventflag   => composite.cEventflag;
+    cSemaphore   => composite.cSemaphore;
+    cMessageBuffer => composite.cMessageBuffer;
+#{semaphore2}  };
+  composite.eThroughEntry => #{@signature.get_name}_marshaler.eClientEntry;
+};
+
+[active]
+composite #{@rpc_channel_celltype_name}Server {
+  /* Interface */
+  attr {
+    PRI taskPriority;
+  };
+  call #{@signature.get_name} #{@call_port_name};
+  //call sTDR       cTDR;
+  call sEventflag cEventflag;
+  call sSemaphore cSemaphore;
+  call sMessageBuffer cMessageBuffer;
+
+  /* Implementation */
+#{alloc_cell}  cell #{@unmarshaler_celltype_name} #{@signature.get_name}_unmarshaler{
+    //cTDR        => composite.cTDR;
+    cEventflag  => composite.cEventflag;
+    cSemaphore  => composite.cSemaphore;
+    cMessageBuffer => composite.cMessageBuffer;
+    cServerCall => composite.#{@call_port_name};
+#{alloc_call_port_join}  };
+  cell tRPCDedicatedTaskMain RPCTaskMain{
+    cMain = #{@signature.get_name}_unmarshaler.eUnmarshalAndCallFunction;
+  };
+  cell tTask Task {
+    cBody     = RPCTaskMain.eMain;
+    priority  = taskPriority;
+    taskAttribute = C_EXP( "TA_ACT" );  /* mikan : marshaler starts at the beginning */
+    //stackSize     = 4096;
+    userStackSize     = 4096;
+  };
+};
+EOT
+    # mikan stackSize option & ææ° tecs_package å¯¾å¿
+
+    f.close
+  end
+
+  #===  through cell ã³ã¼ããçæ
+  #
+  #
+  def gen_through_cell_code( file )
+
+    gen_plugin_decl_code( file )
+
+    # ã»ã«ãæ¢ã
+    # path =["::",@next_cell.get_name]
+    # cell = Namespace.find( path )
+    cell = Namespace.find( @next_cell.get_namespace_path )
+
+    file.print <<EOT
+import( "#{@rpc_channel_celltype_file_name}" );
+EOT
+
+    #nest = @end_region.gen_region_str_pre file
+    indent_str = ""
+
+    file.print <<EOT
+#{indent_str}// one way channel cell
+#{indent_str}cell #{@channelCelltype} #{@channelCellName} {
+#{indent_str}};
+
+#{indent_str}// RPC channel cell
+EOT
+
+    nest = @start_region.gen_region_str_pre file
+    indent_str = "  " * nest
+
+    # #473 ãè§£æ±ºãããå ´åãcomposite ãªã¬ã¼ã¢ã­ã±ã¼ã¿ã«å¤æ´ãã¹ã
+    # ã¢ã­ã±ã¼ã¿ã®æå®ããããï¼
+    if cell.get_allocator_list.length > 0 then
+
+      dbgPrint "make allocator"
+      file.print "#{indent_str}[allocator("
+
+      delim = ""
+      cell.get_allocator_list.each do |type, eport, subsc, func, buf, alloc|
+
+        file.print delim
+        delim = ",\n#{indent_str}           "        # æçµè¡ã«ã¯åºããªã
+
+        if subsc then        # é
+åæ·»æ°
+          subsc_str = '[#{subsc}]'
+        else
+          subsc_str = ""
+        end
+
+        eport = "eThroughEntry" #RPCã®åãå£åã«å¤æ´
+        file.print  "#{eport}#{subsc_str}.#{func}.#{buf} = #{alloc}"
+      end
+
+      file.puts ")]"
+    end
+
+    file.print <<EOT
+#{indent_str}cell #{@rpc_channel_celltype_name}Client #{@cell_name} {
+#{indent_str}  //cTDR         = #{@channelCellName}.eTDR;
+#{indent_str}  cEventflag   = #{@channelCellName}.eEventflag;
+#{indent_str}  cSemaphore   = #{@channelCellName}.eSemaphore;
+#{indent_str}  cMessageBuffer   = #{@channelCellName}.eMessageBuffer;
+#{indent_str}};
+EOT
+
+    @start_region.gen_region_str_post file
+
+    nest = @end_region.gen_region_str_pre file
+    indent_str = "  " * nest
+
+    file.print <<EOT
+#{indent_str}cell #{@rpc_channel_celltype_name}Server #{@cell_name}Body {
+#{indent_str}    #{@call_port_name} = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name};
+//#{indent_str}    #{@call_port_name} = #{@next_cell.get_name}.#{@next_cell_port_name};
+#{indent_str}  //cTDR         = #{@channelCellName}.eTDR;
+#{indent_str}  cEventflag   = #{@channelCellName}.eEventflag;
+#{indent_str}  cSemaphore   = #{@channelCellName}.eSemaphore;
+#{indent_str}  cMessageBuffer  = #{@channelCellName}.eMessageBuffer;
+#{indent_str}  taskPriority = #{@task_priority};
+#{indent_str}};
+EOT
+
+    @end_region.gen_region_str_post file
+  end
+
+
+  #=== ãã©ã°ã¤ã³å¼æ° noClientSemaphore ã®ãã§ãã¯
+  def set_noClientSemaphore rhs
+    rhs = rhs.to_sym
+    if rhs == :true then
+      @b_noClientSemaphore = true
+    elsif rhs == :false then
+      @b_noClientSemaphore = false
+    else
+      cdl_error( "RPCPlugin: specify true or false for noClientSemaphore" )
+    end
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° semaphoreCelltype ã®ãã§ãã¯
+  def set_semaphoreCelltype rhs
+    @semaphoreCelltype = rhs.to_sym
+    nsp = NamespacePath.analyze( @semaphoreCelltype.to_s )
+    obj = Namespace.find( nsp )
+    if ! obj.instance_of?( Celltype ) && ! obj.instance_of?( CompositeCelltype ) then
+      cdl_error( "RPCPlugin: semaphoreCelltype '#{rhs}' not celltype or not defined" )
+    end
+  end
+
+  #=== NamespacePath ãå¾ã
+  # çæããã»ã«ã® namespace path ãçæãã
+  def get_cell_namespace_path
+#    nsp = @region.get_namespace.get_namespace_path
+    nsp = @start_region.get_namespace_path
+    return nsp.append( @cell_name )
+  end
+
+end
+
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2SVCPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2SVCPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2SVCPlugin.rb	(revision 270)
@@ -0,0 +1,487 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#++
+
+# mikan through plugin: namespace ãèæ
+®ããã¦ããªã
+# ãããå©ç¨ããå ´åãä»¥ä¸ã®ããã« toppers_jsp.cdl sChannel.cdl ãæå®ããå¿
+è¦ããã
+# tecsgen toppers_jsp.cdl sChannel.cdl your_description.cdl
+
+# ä»¥ä¸ãä»®å®ï¼å¶éäºé 
+ï¼
+#  å¼ã³å
+ãå¼ã³å
+ã®ã¨ã³ãã£ã¢ã³ãchar, short, int_t, long_t, intptr_t ã®ãµã¤ãºãåã
+#  æç¬¦å·ãç¡ç¬¦å·ã§ãµã¤ãºãåã
+
+class SVCManage
+    # TODO: ããã©ã«ãã®æ¡å¼µãµã¼ãã¹ã³ã¼ã«åãäºç´ãã¦ãã
+    # ããã©ã«ãã®æ¡å¼µãµã¼ãã¹ã³ã¼ã«ï¼syslogãªã©ï¼ãã³ã³ãã¼ãã³ãåããã¾ã§
+    @@id = 20
+    @@func_ids = {}
+    def self.get_func_id func_name
+        return @@func_ids[ func_name ]
+    end
+    def self.set_func_id func_name
+        @@func_ids[ func_name ] = self.assign_id
+        puts @@func_ids[ func_name ]
+    end
+    def self.include_func_id? func_name
+        return @@func_ids.has_key?( func_name )
+    end
+    def self.get_id
+        return @@id
+    end
+    def self.set_id id
+        @@id = id
+    end
+    def self.assign_id
+        @@id += 1
+        return @@id
+    end
+end
+
+#
+# æ¡å¼µãµã¼ãã¹ã³ã¼ã«ãç¨ãããã¡ã¤ã³ééä¿¡ã®
+# throughãã©ã°ã¤ã³
+# HRP2ãã¡ã¤ã³ãã©ã°ã¤ã³ã«ãã£ã¦æ¿å
+¥ããã
+#
+class HRP2SVCPlugin < ThroughPlugin
+
+  #=== RPCPlugin ã® initialize
+  #  èª¬æã¯ ThroughPlugin (plugin.rb) ãåç
+§
+  @@generated_celltype_header = {}
+
+  def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell )
+    super
+    @ct_name_body = "#{@ct_name}SVCBody_#{@next_cell.get_name}_#{@next_cell_port_name}".to_sym
+    @ct_name = "#{@ct_name}SVCCaller_#{@next_cell.get_name}_#{@next_cell_port_name}".to_sym
+    @cell_name_body = "#{@cell_name}SVCBody".to_sym
+    @cell_name = "#{@cell_name}SVCCaller".to_sym
+    puts "%%%% "
+    p @next_cell.get_name
+    p @caller_cell.get_name
+  end
+
+  #=== NamespacePath ãå¾ã
+  # çæããã»ã«ã® namespace path ãçæãã
+  def get_cell_namespace_path
+#    nsp = @region.get_namespace.get_namespace_path
+    nsp = @start_region.get_namespace_path
+    return nsp.append( @cell_name )
+  end
+
+  def gen_plugin_decl_code( file )
+
+    # ãã®ã»ã«ã¿ã¤ãï¼åãã·ã°ããã£ï¼ã¯æ¢ã«çæããã¦ãããï¼
+    if !HRP2KernelObjectPlugin.include_celltype?(@next_cell.get_celltype)
+    if @@generated_celltype[ @ct_name_body ] == nil then
+        @@generated_celltype[ @ct_name_body ] = [ self ]
+        file2 = CFile.open( "#{$gen}/#{@ct_name_body}.cdl", "w" )
+        file2.print <<EOT
+[active]
+celltype #{@ct_name_body} {
+    call #{@signature.get_name} #{@call_port_name};
+};
+EOT
+        file2.close
+    else
+      @@generated_celltype[ @ct_name_body ] << self
+    end
+    file.print "import( \"#{$gen}/#{@ct_name_body}.cdl\" );\n"
+    end
+
+    # ãã®ã»ã«ã¿ã¤ãï¼åãã·ã°ããã£ï¼ã¯æ¢ã«çæããã¦ãããï¼
+    if @@generated_celltype[ @ct_name ] == nil then
+        @@generated_celltype[ @ct_name ] = [ self ]
+        file2 = CFile.open( "#{$gen}/#{@ct_name}.cdl", "w" )
+        if !HRP2KernelObjectPlugin.include_celltype?(@next_cell.get_celltype)
+        file2.print <<EOT
+celltype #{@ct_name} {
+    entry #{@signature.get_name} #{@entry_port_name};
+};
+EOT
+        else
+            # TODO inlineã«ããæ¹ãå¹çããããï¼tecsgenã®çæããããããã¡ã¤ã«ã®
+            # èª­è¾¼é ã®ããã«ã¨ã©ã¼ã¨ãªã
+        file2.print <<EOT
+celltype #{@ct_name} {
+    //[inline] entry #{@signature.get_name} #{@entry_port_name};
+    entry #{@signature.get_name} #{@entry_port_name};
+    call #{@signature.get_name} #{@call_port_name};
+};
+EOT
+        end
+        
+        file2.close
+    else
+      @@generated_celltype[ @ct_name ] << self
+    end
+    file.print "import( \"#{$gen}/#{@ct_name}.cdl\" );\n"
+
+=begin
+    # TODO: send. receive å¯¾å¿
+    send_receive = []
+    if @signature != nil then
+      @signature.each_param{ |fd,param|
+        dir =param.get_direction
+        case dir
+        when :SEND, :RECEIVE
+          send_receive << [ dir, fd, param ]
+        end
+      }
+    end
+=end
+
+=begin
+composite #{@ct_name} {
+    entry #{@signature.get_name} #{@entry_port_name};
+    call #{@signature.get_name} #{@call_port_name};
+
+    cell #{@ct_name}Client #{@cell_name}Client{
+    };
+
+    [active]
+    cell #{@ct_name}Server #{@cell_name}Server{
+        #{@call_port_name} => composite.#{@call_port_name};
+    };
+
+    composite.#{@entry_port_name} => #{@cell_name}.#{@entry_port_name};
+};
+=end
+
+  end
+
+  #===  through cell ã³ã¼ããçæ
+  #
+  #
+  def gen_through_cell_code( file )
+    #require "HRP2Cache"
+
+    gen_plugin_decl_code( file )
+
+    if !HRP2KernelObjectPlugin.include_celltype?(@next_cell.get_celltype)
+    # ã»ã«ãæ¢ã
+    # path =["::",@next_cell.get_name]  # mikan namespace
+    # cell = Namespace.find( path )
+    # cell = Namespace.find( @next_cell.get_namespace_path )
+
+    ##### ã¯ã©ã¤ã¢ã³ãå´ã®ã»ã«ã®çæ #####
+    # file.print "[domain(HRP2, \"trusted\")]"
+    nest = @start_region.gen_region_str_pre file
+    nest_str = "  " * nest
+
+    # ã¯ã©ã¤ã¢ã³ãå´ãã£ã³ãã«ã®çæ
+    # æ¡å¼µãµã¼ãã¹ã³ã¼ã«å¼åºã
+    file.print <<EOT
+#{nest_str}  //  Client Side Channel
+#{nest_str}  cell #{@ct_name} #{@cell_name}{
+#{nest_str}  };
+
+EOT
+
+    @start_region.gen_region_str_post file
+    file.print "\n\n"
+
+    ##### ãµã¼ãã¼å´ã®ã»ã«ã®çæ #####
+    nest = @end_region.gen_region_str_pre file
+    nest_str = "  " * nest
+
+    # ãµã¼ãã¼å´ãã£ã³ãã«ã®çæ 
+    # æ¡å¼µãµã¼ãã¹ã³ã¼ã«æ¬ä½
+    file.print <<EOT
+
+#{nest_str}  //  Server Side Channel
+#{nest_str}  cell #{@ct_name_body} #{@cell_name_body}{
+#{nest_str}    #{@call_port_name} = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name};
+#{nest_str}  };
+EOT
+
+    @end_region.gen_region_str_post file
+
+    file2 = AppFile.open( "#{$gen}/tecsgen.cfg" )
+    file2.print "\n/* Generated by HRP2SVCPlugin */\n\n"
+    file2.print <<EOT
+#include "#{@ct_name_body}_factory.h"
+EOT
+    file2.close
+    else
+
+    ##### ã¯ã©ã¤ã¢ã³ãå´ã®ã»ã«ã®çæ #####
+    nest = @start_region.gen_region_str_pre file
+    nest_str = "  " * nest
+
+    # ã¯ã©ã¤ã¢ã³ãå´ãã£ã³ãã«ã®çæ
+    # æ¡å¼µãµã¼ãã¹ã³ã¼ã«å¼åºã
+    file.print <<EOT
+#{nest_str}  //  Client Side Channel
+#{nest_str}  cell #{@ct_name} #{@cell_name}{
+#{nest_str}    #{@call_port_name} = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name};
+#{nest_str}  };
+
+EOT
+
+    @start_region.gen_region_str_post file
+    file.print "\n\n"
+
+    end
+   end
+
+  #===  åãå£é¢æ°ã®æ¬ä½(Cè¨èª)ãçæãã
+  #     éå¸¸ã§ããã°ãã¸ã§ãã¬ã¼ã¿ã¯åãå£é¢æ°ã®ãã³ãã¬ã¼ããçæãã
+  #     ãã©ã°ã¤ã³ã®å ´åãå¤æ´ããå¿
+è¦ã®ãªãã»ã«ã¿ã¤ãã³ã¼ããçæãã
+  #file::           FILE        åºåå
+ãã¡ã¤ã«
+  #b_singleton::    bool        true if singleton
+  #ct_name::        Symbol
+  #global_ct_name:: string
+  #sig_name::       string
+  #ep_name::        string
+  #func_name::      string
+  #func_global_name:: string
+  #func_type::      class derived from Type
+  def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+      puts "generate ep_func for #{ct_name}"
+
+    if !HRP2KernelObjectPlugin.include_celltype?(@next_cell.get_celltype)
+        # æ¡å¼µãµã¼ãã¹ã³ã¼ã«å¼åºã
+        if ! func_type.get_type.kind_of?( VoidType ) then
+            file.print( "  #{func_type.get_type_str}  retval;\n" )
+        end
+
+        if ! b_singleton then
+
+            file.print <<EOT
+  #{ct_name}_CB    *p_cellcb;
+  if( VALID_IDX( idx ) ){
+    p_cellcb = #{global_ct_name}_GET_CELLCB(idx);
+  }else{
+     /* ã¨ã©ã¼å¦çã³ã¼ããããã«è¨è¿° */
+  }
+
+EOT
+        end
+
+        # p "celltype_name, sig_name, func_name, func_global_name"
+        # p "#{ct_name}, #{sig_name}, #{func_name}, #{func_global_name}"
+
+        delim = ""
+        if ! func_type.get_type.kind_of?( VoidType ) then
+            file.print( "  retval = (#{func_type.get_type_str})" )
+        else
+            file.print( "  " )
+        end
+
+        #file.print( "#{@call_port_name}_#{func_name}(" )
+        # svcid = SVCManage.assign_id
+        new_func = false
+        if SVCManage.include_func_id?( "#{@ct_name_body}_#{func_name}" ) == false
+            new_func = true
+            SVCManage.set_func_id( "#{@ct_name_body}_#{func_name}" )
+        end
+        svcid = SVCManage.get_func_id( "#{@ct_name_body}_#{func_name}" )
+        #file.print( "cal_svc( #{@ct_name_body}_#{func_name}" )
+        file.print( "cal_svc( #{svcid.to_s}" )
+
+        #    if ( ! b_singleton ) then
+        #      file.print( " tecs_this" )
+        #      delim = ","
+        #    end
+
+        i = 0
+        params.each{ |param|
+            delim = ","
+            file.printf( "#{delim} #{param.get_name}" )
+            i += 1
+        }
+
+        while(i < 5) do
+            delim = ","
+            file.printf( "#{delim} 0" )
+            i += 1
+        end
+
+        file.print( " );\n" )
+
+        if ! func_type.get_type.kind_of?( VoidType ) then
+            file.print( "  return retval;\n" )
+        end
+
+        # æ¡å¼µãµã¼ãã¹ã³ã¼ã«æ¬ä½
+        if new_func
+            file2 = AppFile.open( "#{$gen}/#{@ct_name_body}.c" )
+
+#             if @@generated_celltype_header[ @ct_name_body ].nil?
+#                 @@generated_celltype_header[ @ct_name_body ] = true
+#                 p @@generated_celltype_header[ @ct_name_body ]
+#                 file2.print <<EOT
+# /*
+#  * ãã®ãã¡ã¤ã«ã¯ tecsgen ã«ããèªåçæããã¾ãã
+#  * ãã®ãã¡ã¤ã«ãç·¨éãã¦ä½¿ç¨ãããã¨ã¯ãæå³ããã¦ãã¾ãã
+#  */
+# /* #[<PREAMBLE>]#
+#  * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+#  * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+#  *
+#  * #[</PREAMBLE>]# */
+# 
+# /* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+# #include "#{@ct_name_body}_tecsgen.h"
+# 
+# #ifndef E_OK
+# #define	E_OK	0		/* success */
+# #define	E_ID	(-18)	/* illegal ID */
+# #endif
+# 
+# EOT
+#             end
+
+            if func_type.get_type.kind_of?( VoidType ) then
+                retval_assign = ""
+                retval_return = ""
+            else
+                retval_assign = "retval = (ER_UINT)"
+                retval_return = "retval"
+            end
+
+            file2.print <<EOT
+ER_UINT
+#{@ct_name_body}_#{func_name}(intptr_t par1, intptr_t par2, intptr_t par3, intptr_t par4, intptr_t par5, ID cdmid)
+{
+    #{@ct_name_body}_CB    *p_cellcb;
+#if 0
+    if( VALID_IDX( idx ) ){
+      p_cellcb = #{@ct_name_body}_GET_CELLCB(idx);
+    }else{
+       /* ã¨ã©ã¼å¦çã³ã¼ããããã«è¨è¿° */
+    }
+#else
+    p_cellcb = NULL;
+#endif
+
+    ER_UINT retval = 0;
+
+EOT
+
+            num = 1
+            params.each{ |param|
+                if param.get_declarator.get_ptr_level > 0 then
+                    if param.get_direction == :IN then
+                        file2.print <<EOT
+    if(prb_mem((void *)par#{num.to_s}, sizeof(#{param.get_type.get_type_str}), TSK_SELF, TPM_READ) != E_OK){
+        return E_MACV;
+    }
+EOT
+
+                    elsif param.get_direction == :OUT then
+                        file2.print <<EOT
+    if(prb_mem((void *)par#{num.to_s}, sizeof(#{param.get_type.get_type_str}), TSK_SELF, TPM_WRITE) != E_OK){
+        return E_MACV;
+    }
+EOT
+
+                    end
+                end
+                num += 1
+            }
+
+            file2.print"    #{retval_assign}#{@call_port_name}_#{func_name}("
+
+            delim = ""
+            num = 1
+            params.each{ |param|
+                file2.print "#{delim}"
+                delim = ", "
+                file2.print "(#{param.get_type.get_type_str})"
+                file2.print "par" + num.to_s
+                file2.print param.get_type.get_type_str_post
+                num += 1
+            }
+
+            file2.print ");\n"
+
+            if !func_type.get_type.kind_of?( VoidType ) then
+                file2.print "\n    return #{retval_return};\n"
+            end
+            file2.print "}\n\n"
+
+            file2.close
+
+            file2 = AppFile.open( "#{$gen}/tecsgen.cfg" )
+            file2.print "\n/* Generated by HRP2SVCPlugin */\n\n"
+            # TODO: ã¹ã¿ãã¯ãµã¤ãºã¯é©å½
+            file2.print <<EOT
+KERNEL_DOMAIN{
+    DEF_SVC( #{svcid.to_s}, { TA_NULL, #{@ct_name_body}_#{func_name}, 256 } );
+}
+EOT
+            file2.close
+
+            file2 = AppFile.open( "#{$gen}/#{@ct_name_body}_factory.h" )
+            file2.print "\n/* Generated by HRP2SVCPlugin */\n\n"
+            file2.print <<EOT
+extern ER_UINT #{@ct_name_body}_#{func_name}(intptr_t par1, intptr_t par2, intptr_t par3, intptr_t par4, intptr_t par5, ID cdmid);
+EOT
+            file2.close
+        end
+    else
+        # ã«ã¼ãã«ãã¡ã¤ã³ã®ã»ã«ã¯ç¹å¥ãªãã¨ã¯ä½ãããï¼æ®éã«å¼ã³åºã
+        super
+    end
+  end
+end
+
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2SemaphorePlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2SemaphorePlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2SemaphorePlugin.rb	(revision 270)
@@ -0,0 +1,85 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2011 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#++
+
+#require "HRP2KernelObjectPlugin"
+require_tecsgen_lib "HRP2KernelObjectPlugin.rb"
+
+class HRP2SemaphorePlugin < HRP2KernelObjectPlugin
+    @@ep = [:eSignalSemaphore, :eWaitSemaphore, :eManageSemaphore, :eReferSemaphore ]
+    #=== HRP2SemaphorePlugin#print_cfg_cre
+    # CRE_SEMã®åºå
+    # file:: FILE:     åºåå
+ãã¡ã¤ã«
+    # val :: string:   ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å±æ§ã®è§£æçµæ
+    # tab :: string:   ã¤ã³ãã³ãç¨ã®tab
+    def print_cfg_cre(file, cell, val, tab)
+        file.print tab
+        file.puts "CRE_SEM(#{val[:id]}, {#{val[:attribute]}, #{val[:count]}, #{val[:max]}});"
+    end
+    #=== HRP2SemaphorePlugin#print_cfg_sac
+    # SAC_SEMã®åºå
+    # file:: FILE:     åºåå
+ãã¡ã¤ã«
+    # val :: string:   ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å±æ§ã®è§£æçµæ
+    # acv :: string:   ã¢ã¯ã»ã¹ãã¯ã¿    
+    def print_cfg_sac(file, val, acv)
+        file.puts "SAC_SEM(#{val[:id]}, {#{acv[0]}, #{acv[1]}, #{acv[2]}, #{acv[3]}});"
+    end
+    #tSemaphoreã®åãå£ãªã¹ã 
+    def get_entry_ports_name_list()
+        @@ep
+    end
+end
+
+
+  
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2TaskPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2TaskPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/HRP2TaskPlugin.rb	(revision 270)
@@ -0,0 +1,214 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#++
+
+#require "HRP2KernelObjectPlugin"
+require_tecsgen_lib "HRP2KernelObjectPlugin.rb"
+#== celltype ãã©ã°ã¤ã³ã®å
+±éã®è¦ªã¯ã©ã¹
+class HRP2TaskPlugin < HRP2KernelObjectPlugin
+    # @@ep = [:eActivateTask, :eControlTask, :eManageTask, :eReferTask ]
+    # ATT_MODãçææ¸ã¿ãã©ãã
+    @@generate_memory_module = false
+
+    ##
+    #
+    # file : output file (ex.tecsgen.cfg)
+    # cell : 
+    # val  : 
+    # tab  : 
+    def print_cfg_cre(file, cell, val, tab)
+        val[:id] = val[:id].gsub( /(^|[^\$])\$id\$/, "\\1#{@celltype.get_name.to_s}_#{cell.get_name.to_s}" )
+        # $cbp$ã®ä»£ãã
+        index = cell.get_id - @celltype.get_id_base
+        #cell_CB_name = "#{@celltype.get_global_name}_pCB_tab[#{index}]"
+        cell_CB_name = "#{index}"
+        # CRE_XXX/DEF_XXXã®çæ
+        print "assign task plugin\n"
+        domainOption = cell.get_region.get_domain_root.get_domain_type.get_option
+        # if cell.get_region.get_region_type == :DOMAIN
+        if domainOption != "OutOfDomain"
+            # ä¿è­·ãã¡ã¤ã³ã«å±ããå ´å
+            if domainOption == "trusted"
+                # ã«ã¼ãã«ãã¡ã¤ã³
+                if val[:userStackSize] != "OMIT"
+                    raise "system task cannot have user stack."
+                end
+                file.print <<EOT
+#{tab}CRE_TSK(#{val[:id]}, { #{val[:taskAttribute]}, #{cell_CB_name}, tTask_start_task, #{val[:priority]}, #{val[:systemStackSize]}, NULL });
+EOT
+            else
+                # ã¦ã¼ã¶ãã¡ã¤ã³
+                if val[:userStackSize] == "OMIT"
+                    raise "user task must have user stack."
+                end
+                if val[:systemStackSize] == "OMIT"
+                    file.print <<EOT
+#{tab}CRE_TSK(#{val[:id]}, { #{val[:taskAttribute]}, #{cell_CB_name}, tTask_start_task, #{val[:priority]}, #{val[:userStackSize]}, NULL });
+EOT
+                else
+                    file.print <<EOT
+#{tab}CRE_TSK(#{val[:id]}, { #{val[:taskAttribute]}, #{cell_CB_name}, tTask_start_task, #{val[:priority]}, #{val[:userStackSize]}, NULL, #{val[:systemStackSize]}, NULL });
+EOT
+                end
+            end
+        else
+            # ç¡æå±ã®å ´å
+            raise "task #{val[:id]} must belong to a domain."
+        end
+   
+        # ä¾å¤ç¨ã®ãçæ
+        file.print <<EOT
+#{tab}DEF_TEX(#{val[:id]}, { #{val[:exceptionAttribute]}, tTask_start_exception });
+EOT
+    end
+
+    def print_cfg_sac(file, val, acv)
+       file.puts "SAC_TSK(#{val[:id]}, { #{acv[0]}, #{acv[1]}, #{acv[2]}, #{acv[3]} });"
+    end
+
+=begin
+    #tTaskã®åãå£ãªã¹ã 
+    def get_entry_ports_name_list()
+        @@ep
+    end
+=end
+    # 
+    #  ATT_MODã®çæ
+    #  gen_factoryå®è¡æã«ã¯ï¼ãã¹ã¦ã®ã»ã«ã¿ã¤ããã©ã°ã¤ã³ãçææ¸ã¿ã®ã¯ããªã®ã§ï¼
+    #  ã«ã¼ãã«APIã³ã¼ãã®ã¡ã¢ãªä¿è­·ãçç¥ã§ããï¼
+    #
+    def gen_factory file
+        super
+        if @@generate_memory_module == false
+            check_celltype_list = []
+
+            Cell.get_cell_list2.each { |cell|
+                # ãã¹ã¦ã®ã»ã«ãèµ°æ»ãã¦ã»ã«ã¿ã¤ãããã§ãã¯
+                ct = cell.get_celltype
+                if ct.class == Celltype && check_celltype_list.include?( ct ) == false
+                    # æªãã§ãã¯ã®ã»ã«ã¿ã¤ãã ã£ãå ´å
+                    # puts "check for ATT_MOD : #{ct.classget_global_name}"
+                    puts "check for ATT_MOD : #{ct.get_global_name}"
+                        
+                    # ã«ã¼ãã«APIã®ã³ã¼ãï¼ãã¼ã¿ã¯ã¡ã¢ãªä¿è­·ããªã
+                    next if HRP2KernelObjectPlugin.include_celltype?( ct )
+
+                    # å¿
+è¦ã®ãªãã»ã«ã¿ã¤ãã®ã³ã¼ãï¼ãã¼ã¿ã¯ã¡ã¢ãªä¿è­·ããªã
+                    next if ! ct.need_generate?
+
+                    # HRP2ã®ãã¡ã¤ã³ãªã¼ã¸ã§ã³ãåå¾
+                    regions = ct.get_domain_roots
+                    regions_hrp2 = regions[ :HRP2 ]
+                    print "HRP2 domain in #{ct.get_name}: "
+                    regions_hrp2.each { |reg|
+                        print reg.get_name
+                    }
+                    puts ""
+
+                    # ã»ã«ç®¡çãã­ãã¯ã¨ã¹ã±ã«ãã³ã®ã¡ã¢ãªä¿è­·
+                    # gen_celltype_names_domain ç¸å½ã®å¦ç
+                    if regions_hrp2.include?( Region.get_root ) == false && regions_hrp2.length > 1
+                        # ãã¡ã¤ã³ãè¤æ°ã§ï¼OutOfDomainã«ã»ã«ãå­å¨ããªãã»ã«ã¿ã¤ãã®å ´å
+                        # å
+±æã®ã»ã«ç®¡çãã­ãã¯ã¨ã¹ã±ã«ãã³ã³ã¼ããç»é²ãã
+                        file = AppFile.open( "#{$gen}/tecsgen.cfg" )
+                        file.print "ATT_MOD(\"#{ct.get_global_name}_tecsgen.o\");\n"
+                        file.close
+                    end
+
+                    regions_hrp2.each { |reg|
+                        if reg.is_root? 
+                            nsp = ""
+                        else
+                            nsp = "_#{reg.get_namespace_path.get_global_name}"
+                        end
+                        file = AppFile.open( "#{$gen}/tecsgen#{nsp}.cfg" )
+                        file.print "ATT_MOD(\"#{ct.get_global_name}#{nsp}_tecsgen.o\");\n"
+                        file.close
+                    }
+
+                    # ã»ã«ã¿ã¤ãã³ã¼ãããªãå ´åã¯ã¹ã­ãã
+                    next if ct.is_all_entry_inline? && ! ct.is_active?
+
+                    # ã»ã«ã¿ã¤ãã³ã¼ãã®ã¡ã¢ãªä¿è­·
+                    # gen_celltype_names_domain2 ç¸å½ã®å¦ç
+                    if regions_hrp2.include?( Region.get_root ) == true || regions_hrp2.length > 1
+                        # OutOfDomainã«ã»ã«ãå­å¨ããã»ã«ã¿ã¤ãã®å ´å
+                        # ã¾ãã¯ï¼è¤æ°ã®ãã¡ã¤ã³ã«ã»ã«ãå­å¨ããã»ã«ã¿ã¤ãã®å ´å
+                        # ã»ã«ã¿ã¤ãã³ã¼ããå
+±æããããã«ç»é²ãã
+                        file = AppFile.open( "#{$gen}/tecsgen.cfg" )
+                    else
+                        # OutOfDomainã§ãªãåä¸ã®ãã¡ã¤ã³ã«ã»ã«ãå­å¨ããã»ã«ã¿ã¤ãã®å ´å
+                        # ã»ã«ã¿ã¤ãã³ã¼ããå°æããããã«ç»é²ãã
+                        file = AppFile.open( "#{$gen}/tecsgen_#{regions_hrp2[0].get_namespace_path.get_global_name}.cfg" )
+                    end
+
+                    file.print "ATT_MOD(\"#{ct.get_global_name}.o\");\n"
+                    file.close
+
+                    check_celltype_list << ct
+                else
+                    # ä½ãããªã
+                end
+            }
+
+            @@generate_memory_module = true
+        else
+            # ä½ãããªã
+        end
+    end
+    
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/Mruby2CBridgePlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/Mruby2CBridgePlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/Mruby2CBridgePlugin.rb	(revision 270)
@@ -0,0 +1,103 @@
+# -*- coding: utf-8 -*-
+#
+#  mruby => TECS bridge
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: Mruby2CBridgePlugin.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#
+
+class Mruby2CBridgePlugin < SignaturePlugin
+  @@signature_list = { }
+
+  def initialize( signature, option )
+    super
+
+    @celltype_name = :"t#{@signature.get_global_name}"
+    @class_name = :"T#{@signature.get_global_name}"
+
+    parse_plugin_arg
+  end
+
+  def gen_cdl_file( file )
+    if( @@signature_list.length == 0 )then
+      print_msg "  Mruby2CBridgePlugin: [initialize function] 'void initializeBridge( mrb_state *mrb )' must be called from VM.\n"
+      c2tecs = "generate( C2TECSBridgePlugin, nMruby::sInitializeBridge, \"silent=true\" );\n"
+    end
+
+    if @@signature_list[ @signature.get_global_name ] then
+      @@signature_list[ @signature.get_global_name ] << self
+      cdl_warning( "MRCW001 signature '$1' duplicate. ignored current one", @signature.get_namespace_path )
+      return
+    end
+
+    @@signature_list[ @signature.get_global_name ] = [self]
+    print_msg "  Mruby2CBridgePlugin: [object creattion]    object = TECS::#{@class_name}.new( 'C#{@signature.get_global_name}' )\n"
+    print_msg "  Mruby2CBridgePlugin: [function call]       result = object.function( params )  # substitute 'function' and params \n"
+
+    cf = CFile.open( "#{$gen}/Mruby2C_tsInitializerBridge.cdl", "w")
+    cf.print <<EOT
+cell nC2TECS::tnMruby_sInitializeBridge C2TECS_tsInitializeBridge{
+    cCall = VM_TECSInitializer.eInitialize;
+};
+EOT
+    cf.close
+
+    file.print <<EOT
+generate( MrubyBridgePlugin, #{@signature.get_namespace_path}, "silent=true" );
+generate( TECS2CBridgePlugin, #{@signature.get_namespace_path}, "silent=true" );
+#{c2tecs}
+cell nMruby::t#{@signature.get_name} C#{@signature.get_name}{
+    cTECS = TECS2C_#{@signature.get_name}.eEnt;
+};
+cell nTECS2C::t#{@signature.get_name} TECS2C_#{@signature.get_name}{};
+
+import( "Mruby2C_tsInitializerBridge.cdl" );
+EOT
+
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/MrubyBridgePlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/MrubyBridgePlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/MrubyBridgePlugin.rb	(revision 270)
@@ -0,0 +1,1216 @@
+# -*- coding: utf-8 -*-
+#
+#  mruby => TECS bridge
+#  
+#   Copyright (C) 2008-2015 by TOPPERS Project
+#
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: MrubyBridgePlugin.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#
+
+# Todo:
+# çæãããã®
+#  gen_cdl_file
+#    ããªãã¸åæåã»ã«ã¿ã¤ã (ã·ã°ããã£ãã¨)
+#       @@init_celltypes ã«è¨é²
+#    ããªãã¸ã»ã«ã¿ã¤ã (ã·ã°ããã£ãã¨)
+#       @@celltypes ã«è¨é²
+#    æ§é ä½ã»ã«ã¿ã¤ã
+#       @@struct_list ã«è¨é²
+#  new_cell
+#    TECS åæåã»ã«(ãã­ãã¿ã¤ãå®£è¨)
+#       @@VM_init_cells ã«è¨é²
+#       @@VM_struct_list ã«è¨é²
+#       @@VM_ptr_list ã«è¨é²
+#  gen_post_code
+#    æ§é ä½åæåã»ã«
+#    ãã¤ã³ã¿åæåã»ã«
+#    TECS åæåã»ã«
+#
+#   ep_func ã®ä½æ
+#     signature, ãã¤ã³ã¿ãæ§é ä½ â¦ åæååãå£ï¼mruby VM ã¸ã®ç»é²
+#     ãã¤ã³ã¿
+#   preamble ã®ä½æ
+#     ãã¤ã³ã¿ãæ§é ä½ â¦ ã¢ã¯ã»ã¹ç¨ã³ã¼ãã®çæ
+#     signature â¦ ããªãã¸é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
+#   postamble ã®ä½æ
+#     signature â¦ ããªãã¸é¢æ°ã®å®ç¾©
+
+class MrubyBridgePlugin < SignaturePlugin
+
+  # ãã©ã°ã¤ã³å¼æ°å => Proc
+  MrubyBridgePluginArgProc = { 
+      "ignoreUnsigned" => Proc.new { |obj,rhs| obj.set_ignoreUnsigned rhs },
+      "include" => Proc.new { |obj,rhs| obj.set_include rhs },
+      "exclude" => Proc.new { |obj,rhs| obj.set_exclude rhs },
+  }
+
+  @@celltypes = { }             # {celltype_name => [ BridgePlugin ã®ã¤ã³ã¹ã¿ã³ã¹ã®é
+å }
+  @@init_celltypes = { }        # {celltype_name => [ BridgePlugin ã®ã¤ã³ã¹ã¿ã³ã¹ã®é
+å }
+  @@struct_list = { }           # {struct_name=>StructType}
+  @@ptr_list = { }              # {ptr_celltype_name=> @@TYPE_MAP ã®å¯¾å¿ãããã®}
+  @@VM_list = { }               # VM_name => true
+  @@VM_celltypes = {  }             # VM_name => { @celltype_name => ã»ã«ã®é
+å }
+  @@VM_struct_list = { }           # {name=>StructType}
+  @@VM_ptr_list = { }              # { VM_name => {name=> @@TYPE_MAP ã®å¯¾å¿ãããã®} }
+  @@TYPE_MAP = {           # type_str   class             GET_SET
+    :char_t            => [:char_t,    "Char",     :Char,  :INT   ],
+    :uchar_t           => [:uchar_t,   "UChar",    :Char,  :INT   ],
+    :schar_t           => [:schar_t,   "SChar",    :Char,  :INT   ],
+
+    :bool_t            => [:bool_t,    "Bool",     :Bool,  :BOOL  ],
+    :int8_t            => [:int8_t,    "Int8",     :Int,   :INT   ],
+    :int16_t           => [:int16_t,   "Int16",    :Int,   :INT   ],
+    :int32_t           => [:int32_t,   "Int32",    :Int,   :INT   ],
+    :int64_t           => [:int64_t,   "Int64",    :Int,   :INT   ],
+    :uint8_t           => [:uint8_t,   "UInt8",    :Int,   :INT   ],
+    :uint16_t          => [:uint16_t,  "UInt16",   :Int,   :INT   ],
+    :uint32_t          => [:uint32_t,  "UInt32",   :Int,   :INT   ],
+    :uint64_t          => [:uint64_t,  "UInt64",   :Int,   :INT   ],
+
+    :int               => [:int,       "Int",      :Int,  :INT   ], 
+    :char              => [:char,      "Char",     :Char, :INT   ],    # char ã¯ char_t ã¨ãã¦æ±ã
+    :short             => [:short,     "Short",    :Int,  :INT   ],
+    :long              => [:long,      "Long",     :Int,  :INT   ],
+
+    :"unsigned char"   => [:uchar_t,   "UChar",         :Char, :INT   ],
+    :"unsigned int"    => [:"unsigned int",   "UInt",   :Int,  :INT   ],
+    :"unsigned short"  => [:"unsigned short", "UShort", :Int,  :INT   ],
+    :"unsigned long"   => [:"unsigned long",  "ULong",  :Int,  :INT   ],
+    :"signed char"     => [:schar_t,   "SChar",    :Char,  :INT   ],
+    :"signed int"      => [:int,       "Int",      :Int,   :INT   ],
+    :"signed short"    => [:short,     "Short",    :Int,   :INT   ],
+    :"signed long"     => [:long,      "Long",     :Int,   :INT   ],
+
+    :float32_t         => [:float32_t, "Float32",  :Float, :FLOAT ],
+    :double64_t        => [:double64_t,"Double64", :Float, :FLOAT ],
+
+    :float             => [:float,     "Float32",  :Float, :FLOAT ],
+    :double            => [:double,    "Double64", :Float, :FLOAT ]
+  }
+
+  # included  or excluded functions
+
+  ### ã­ã¼ããããæç¹ã§å®è¡ããã ###
+
+  # -I ã« $(TECSPATH)/mruby ãè¿½å 
+  # TECSGEN::Makefile.add_obj "$(MRUBY_MAIN_OBJ)"
+  TECSGEN::Makefile.add_ldflag "-lmruby -L$(MRUBYPATH)/lib -lm"
+  TECSGEN::Makefile.add_search_path "$(MRUBYPATH)/include"
+  TECSGEN::Makefile.add_var "MRUBYPATH",      "..",  "CHANGE this to suitable path"
+  # TECSGEN::Makefile.add_var "MRUBY_MAIN_OBJ", "$(_TECS_OBJ_DIR)tecs_mruby.o", "CHANGE this if your have your main"
+
+
+  #=== ãã©ã°ã¤ã³ã¤ã³ã¹ã¿ã³ã¹ã®åæå
+  # æ»ãå¤ãå¼æ°ã®åãä½¿ç¨å¯è½ãªãã®ããã§ãã¯ãã
+  #
+  def initialize( signature, option )
+    super
+
+    if ! $no_banner
+      STDERR << "MrubyBridgePlugin: version 1.2.0 (Suitable for mruby ver 1.2.0. Has backward compatibility with ver 1.1.0)\n"
+    end
+
+    @b_ignoreUnsigned = false
+    @includes = []
+    @excludes = []
+    @struct_list = { }
+    @ptr_list = { }
+
+    @plugin_arg_check_proc_tab = MrubyBridgePluginArgProc
+    parse_plugin_arg
+
+    @celltype_name = :"t#{@signature.get_global_name}"
+    @init_celltype_name = :"#{@celltype_name}_Initializer"
+        # this variable is sometimes not used. rhs coded directry.
+    @class_name = :"T#{@signature.get_global_name}"
+
+    @func_head_array = []
+    if @includes.length > 0 && @excludes.length > 0 then
+      cdl_error( "MRB1011 both include && exclude are specified" )
+    end
+
+    if signature.get_function_head_array == nil then
+      return   # ä»¥åã«ææ³ã¨ã©ã¼çºç
+    end
+
+    signature.get_function_head_array.each{ |func_head|
+      if @includes.length > 0 then
+        if @includes.index func_head.get_name then
+          dbgPrint "MrubyBridgePlugin: #{func_head.get_name} INCLUDED\n"
+          @func_head_array << func_head
+        else
+          dbgPrint "MrubyBridgePlugin: #{func_head.get_name} NOT included\n"
+        end
+      elsif @excludes.length > 0 then
+        if @excludes.index( func_head.get_name ) == nil then
+          dbgPrint "MrubyBridgePlugin: #{func_head.get_name} NOT excluded\n"
+          @func_head_array << func_head
+        else
+          dbgPrint "MrubyBridgePlugin: #{func_head.get_name} EXCLUDED\n"
+        end
+      else
+        @func_head_array << func_head
+      end
+    }
+
+    if @func_head_array.length == 0 then
+      cdl_error( "MRB1012 '$1' no function remained by exclude", @signature.get_name )
+    end
+
+    check_name_and_return_type @func_head_array
+    check_parameter_type @func_head_array
+
+  end
+
+  #=== check function name & return type
+  def check_name_and_return_type func_head_array
+    b_init = false; b_init_cell = false
+    func_head_array.each{ |func_head|
+      if( func_head.get_name == :initialize )then
+        cdl_warning( "MRW2001 initialize: internally defined. change to initialize_cell in ruby" )
+        b_init = true
+      elsif( func_head.get_name == :initialize_cell )then
+        b_init_cell = true
+      end
+      rtype = func_head.get_return_type.get_original_type
+      case rtype
+      when BoolType, IntType, FloatType, VoidType
+      else
+        cdl_error( "MRB1001 cannot return type $1", rtype.get_type_str )
+      end
+    }
+    if( b_init && b_init_cell )then
+      cdl_warning( "MRB1002 initialize: internally defined. change to initialize_cell in ruby" )
+    end
+  end
+
+  #=== check paramter type
+  def check_parameter_type func_head_array
+    # check type of parameters
+    func_head_array.each{ |fh|
+      fh.get_paramlist.get_items.each{ |param_decl|
+        case param_decl.get_direction
+        when :SEND, :RECEIVE
+          cdl_error( "MRB1003 $1: $2 parameter cannot be used in mruby Bridge",  param_decl.get_name, param_decl.get_direction.to_s.downcase )
+        end
+        type = param_decl.get_type
+        type_org = type.get_original_type
+        type_str = type.get_type_str + type.get_type_str_post
+
+        b_ng = false
+        case type_org
+        when IntType
+          case  type_org.get_bit_size
+          when 8, 16, 32, 64
+          when -1, -2, -3, -4, -11
+          else
+            b_ng = true
+          end
+        when BoolType
+        when FloatType
+        when PtrType
+          ttype_org = type_org.get_type       # ãã¤ã³ã¿ã®æãã¦ããå
+ã®å
+          ttype = ttype_org.get_original_type # ä¸è¨ã® typedef ããã¦ããå ´åãå
+ã®å
+          register_ptr_type ttype_org
+
+          if( type_org.get_string.to_s == "-1" ) then
+            case param_decl.get_direction
+            when :OUT, :INOUT
+              cdl_error( "MRB9999 string specifier without length cannot be used for out & inout parameter")
+            end
+          end
+
+          case ttype
+          when IntType
+            bit_size = ttype.get_bit_size
+            # if  bit_size < 0 && bit_size != -1 then
+            #   b_ng = true
+            # end
+          when FloatType
+          when BoolType
+          when StructType
+            if( type_org.get_size || type_org.get_string || type_org.get_count ) then
+              cdl_error( "MRB1004 $1: size_is, count_is, string cannot be specified for struct pointer", param_decl.get_name )
+            end
+            check_struct_member ttype_org
+          else
+            b_ng = true
+          end
+        when StructType
+          check_struct_member type_org
+        else  # ArrayType, FuncType, EnumType, VoidType
+          b_ng = true
+        end
+        if b_ng then
+          cdl_error( "MRB1005 $1: type $2 cannot be used in mruby Bridge", param_decl.get_name, type_str )
+        end
+      }
+    }
+  end
+
+  #=== æ§é ä½ã®ã¡ã³ãã¼ã®åã®ãã§ãã¯
+  def check_struct_member struct_type
+    #p "tag name:#{struct_type.get_name}"
+    # sttype = Namespace.find_tag( struct_type.get_name )
+    sttype = struct_type.get_original_type
+    if sttype.get_name == nil then
+      cdl_error( "MRB10007 tagless-struct cannot be handled")
+    end
+    sttype.get_members_decl.get_items.each { |d|
+      t = d.get_type.get_original_type
+      case t
+      when IntType, FloatType, BoolType
+      else
+        cdl_error( "MRB1006 $1: type $2 not allowed for struct member", d.get_name, d.get_type.get_type_str + d.get_type.get_type_str_post )
+      end
+    }
+    st_name = :"t{}"
+    if @struct_list[ sttype.get_name ] == nil then
+      # print_msg "  MrubyBridgePlugin: [struct]   #{struct_type.get_type_str} => class TECS::Struct#{sttype.get_name}\n"
+      print "  MrubyBridgePlugin: [struct]   #{struct_type.get_type_str} => class TECS::Struct#{sttype.get_name}\n"
+      @struct_list[ sttype.get_name ] = sttype
+    end
+  end
+
+  def register_ptr_type ttype
+    t_org = ttype.get_original_type
+    tment = get_type_map_ent t_org
+    if tment == nil then
+      return
+      cdl_error( "MRB1008 unknown pointer type '$1'", ttype.get_type_str )
+    end
+    ptr_celltype_name = :"t#{tment[1]}Pointer"
+    if @@ptr_list[ ptr_celltype_name ] == nil then
+      # print_msg "  MrubyBridgePlugin: [pointer]  #{ttype.get_type_str}* => class TECS::#{tment[1]}Pointer\n"
+      print "  MrubyBridgePlugin: [pointer]  #{ttype.get_type_str}* => class TECS::#{tment[1]}Pointer\n"
+      @@ptr_list[ ptr_celltype_name ] = tment
+    end
+    if @ptr_list[ ptr_celltype_name ] == nil then
+      @ptr_list[ ptr_celltype_name ] = tment
+    end
+  end
+
+  def get_type_map_ent ttype
+    # structure type is registerd in check_struct_member
+    if ttype.kind_of? StructType
+      return
+    end
+    tstr = ttype.get_type_str.sub( /const /, "" )    # const ã¯ç¡è¦
+    tstr = tstr.sub( /volatile /, "" )               # volatile ãç¡è¦
+    if @b_ignoreUnsigned then
+      tstr = tstr.sub( /unsigned /, "" )             # volatile ãç¡è¦
+      tstr = tstr.sub( /uint/, "int" )               # volatile ãç¡è¦
+      tstr = tstr.sub( /[cs]char/, "char" )          # volatile ãç¡è¦
+    end
+    return @@TYPE_MAP[ tstr.to_sym ]
+  end
+
+  #===  CDL ãã¡ã¤ã«ã®çæ
+  #      typedef, signature, celltype, cell ã³ã¼ããçæ
+  #file::        FILE       çæãããã¡ã¤ã«
+  def gen_cdl_file(file)
+
+    # ããªãã¸ã»ã«ã¿ã¤ãã®çæ
+    if @@celltypes[ @celltype_name ] == nil then
+      @@celltypes[ @celltype_name ] = [ self ]
+      @@init_celltypes[ @init_celltype_name ] = true
+      print_msg <<EOT
+  MrubyBridgePlugin: [signature] #{@signature.get_namespace_path} => [celltype] nMruby::#{@celltype_name} => [class] TECS::#{@class_name}
+EOT
+
+      file.print <<EOT
+import( <mruby.cdl> );
+
+/****  Ruby => TECS Bridge Celltype (MBP500) ****/
+namespace nMruby{
+    // bridge celltype
+    [idx_is_id,active]   // not actually active, to avoid warning W1002, W1007
+    celltype #{@celltype_name} {
+        call #{@signature.get_namespace_path.to_s} cTECS;
+        attr {
+            [omit]
+            char_t *VMname = "VM";
+        };
+    };
+    // bridge initializer celltype
+    celltype #{@init_celltype_name} {
+        entry sInitializeTECSBridge eInitialize;
+    };
+};
+EOT
+
+      # æ§é ä½ã»ã«ã¿ã¤ãã®çæ
+      @struct_list.each{ |name, sttype|
+        if @@struct_list[ name ] == nil then
+          file.print <<EOT
+namespace nMruby{
+    [singleton]
+    celltype #{name} {
+        entry sInitializeTECSBridge eInitialize;
+    };
+};
+EOT
+          @@struct_list[ name ] = sttype
+        end
+      }
+
+    else
+      cdl_warning( "MRBW001 MrubyBridgePlugin: signature '$1' duplicate. ignored current one", @signature.get_namespace_path )
+      @@celltypes[ @celltype_name ] << self
+    end
+  end
+
+  #=== gen_cdl_file ã§å®ç¾©ããã»ã«ã¿ã¤ãã« æ°ããã»ã«ãå®ç¾©ããã
+  # cell ã®ã»ã«ã¿ã¤ãã®ååã¯ @celltype_name
+  def new_cell cell
+    if cell.get_celltype.get_name != @celltype_name then
+      return
+    end
+
+    join = cell.get_join_list.get_item :VMname
+    if join then
+      vm_name = CDLString.remove_dquote(join.get_rhs.to_s).to_sym
+    else
+      vm_name = :"VM"
+    end
+
+    if @@VM_list[ vm_name ] == nil then
+      @@VM_list[ vm_name ] = true
+
+      initializer_celltype_cdl = "#{$gen}/#{cell.get_name}Initializer.cdl"
+      file = CFile.open( initializer_celltype_cdl, "w" )
+
+      # TECS åæåã»ã«(ãã­ãã¿ã¤ãå®£è¨)
+      print_msg "  MrubyBridgePlugin: join your VM's cInitialize to #{vm_name}_TECSInitializer.eInitialize\n"
+
+      file.print <<EOT
+
+  // prototype of TECSInitializer (MBP510)
+  cell nMruby::tTECSInitializer #{vm_name}_TECSInitializer;
+EOT
+      file.close
+
+      Generator.parse( initializer_celltype_cdl, self )
+    end
+
+    if @@VM_celltypes[ vm_name ] then
+      vma = @@VM_celltypes[ vm_name ]
+
+      if vma[ @celltype_name ] then
+        vma[ @celltype_name ] << cell
+      else
+        vma[ @celltype_name ] = [cell]
+        @@VM_celltypes[ vm_name ] = vma
+      end
+    else
+      vma = { }
+      vma[ @celltype_name ] = [cell]
+      @@VM_celltypes[ vm_name ] = vma
+    end
+
+    @struct_list.each{ |stname, sttype|
+      if @@VM_struct_list[ vm_name ] then
+        @@VM_struct_list[ vm_name ][ sttype.get_name ] = sttype
+      else
+        @@VM_struct_list[ vm_name ] = { sttype.get_name => sttype }
+      end
+    }
+    @ptr_list.each{ |ptr_celltype_name, tment|
+      if @@VM_ptr_list[ vm_name ] then
+        @@VM_ptr_list[ vm_name ][ ptr_celltype_name ] = tment
+      else
+        @@VM_ptr_list[ vm_name ] = { ptr_celltype_name => tment }
+      end
+    }
+
+  end
+
+  #=== ãã©ã°ã¤ã³ã CDL ã® POST ã³ã¼ããçæ
+  # tmp_plugin_post_code.cdl ã¸ã®åºå
+  def self.gen_post_code file
+
+#     file.print <<EOT
+# namespace nMruby {
+# EOT
+# 
+#     @@ptr_list.each{ |name,tment|
+#       file.print <<EOT
+# 
+#     // MBP600
+#     [singleton]
+#     celltype #{name} {
+#         entry  sInitializeTECSBridge eInitialize;
+#     };
+# EOT
+#     }
+# 
+#     file.print <<EOT
+# };
+# EOT
+
+# gen_post_code ã§çæãã celltype ã¯ gen_ep_func ãå¼ã³åºãããªã #847
+#    @@struct_list.each{ |name,sttype|
+#      file.print <<EOT
+#
+#    [singleton]
+#    celltype #{name} {
+#        entry  sInitializeTECSBridge eInitialize;
+#    };
+#EOT
+#    }
+
+    file.print "  // MBP601\n"
+    @@VM_celltypes.each{ |vm_name, instance_list|
+      instance_list.each { |celltype_name, array|
+        cell = array[0]
+	if cell.get_celltype then
+	  ct_name = cell.get_celltype.get_name
+        file.print <<EOT
+  cell nMruby::#{ct_name}_Initializer #{vm_name}_#{ct_name}_Initializer{ };
+EOT
+        end
+      }
+    }
+
+    file.print "  // MBP602\n"
+    @@ptr_list.each{ |name,tment|
+      file.print <<EOT
+  cell nMruby::#{name} C#{name} { };
+EOT
+    }
+
+    file.print "  // MBP603\n"
+    @@struct_list.each{ |name,sttype|
+      file.print <<EOT
+  cell nMruby::#{name} C#{name} { };
+EOT
+    }
+
+    if @@VM_celltypes == nil
+      raise "are0"
+    end
+    @@VM_celltypes.each{ |vm_name, instance_list|
+      file.print "  /* === VM #{vm_name} === (MBP610) */\n"
+      init_cell_name = "#{vm_name}_TECSInitializer"
+
+      file.print "  cell nMruby::tTECSInitializer #{init_cell_name} {\n"
+
+      instance_list.each { |celltype_name, array|
+        array.each{ |cell|
+          ct_name = cell.get_celltype.get_name
+          file.print "    cInitialize[] = #{vm_name}_#{ct_name}_Initializer.eInitialize;\n"
+        }
+      }
+      if @@VM_ptr_list[vm_name] then
+        @@VM_ptr_list[vm_name].each{ |name, tment|
+          file.print "    cInitialize[] = C#{name}.eInitialize;\n"
+        }
+      end
+      if @@VM_struct_list[vm_name] then
+        @@VM_struct_list[vm_name].each{ |name, sttype|
+          file.print "    cInitialize[] = C#{name}.eInitialize;\n"
+        }
+      end
+      file.print "  };"
+    }
+    
+  end
+
+  ####### ä»¥ä¸ã³ã¼ãçææ®µé ######
+
+  #===  åãå£é¢æ°ã®æ¬ä½ã³ã¼ããçæï¼é ­é¨ã¨æ«å°¾ã¯å¥éåºåï¼
+  #ct_name:: Symbol    (ãã©ã°ã¤ã³ã§çæããã) ã»ã«ã¿ã¤ãå ï¼Symbol ã¨ãã¦éããã¦ãã
+  def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+    if @@celltypes[ ct_name ] then
+      gen_ep_func_body_bridge( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+    elsif @@init_celltypes[ ct_name ] then
+      gen_ep_func_body_bridge_init( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+    elsif @@ptr_list[ ct_name ] then
+      gen_ep_func_body_ptr( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+    elsif @@struct_list[ ct_name ] then
+      gen_ep_func_body_struct( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+    else
+      raise "Unknown #{ct_name}"
+    end
+  end
+
+  def gen_ep_func_body_bridge( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+    raise "unexpected "
+  end
+
+  def gen_ep_func_body_bridge_init( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+    file.print <<EOT
+    CELLCB *p_cellcb = GET_CELLCB( idx );  /* no error check */     /* MBP700 */
+    struct RClass	*rc;
+
+    rc = mrb_define_class_under( mrb, TECS, \"#{@class_name}\", mrb->object_class );
+    mrb_define_method( mrb, rc, "initialize", MrubyBridge_#{@celltype_name}_initialize, MRB_ARGS_REQ(1) );
+    MRB_SET_INSTANCE_TT(rc, MRB_TT_DATA);
+EOT
+
+    @func_head_array.each{ |f|
+      if ! f.is_function? then
+        next
+      end
+      if f.get_name != :initialize then
+        func_name = f.get_name
+      else
+        func_name = :initialize_cell
+      end
+
+      ret_type = f.get_return_type
+      n_param = 0
+      f.get_paramlist.get_items.each{ |param|
+        case param.get_direction
+        when :IN, :INOUT, :OUT
+          n_param += 1
+        when :SEND, :RECEIVE
+          raise "send, receive"
+        end
+      }
+      if n_param > 0 then
+        p_str = "MRB_ARGS_REQ( #{n_param} )"
+      else
+        p_str = "MRB_ARGS_NONE()"
+      end
+      file.print <<EOT
+	mrb_define_method( mrb, rc, "#{func_name}", MrubyBridge_#{@celltype_name}_#{func_name}, #{p_str} );
+EOT
+    }
+  end
+
+  def gen_ep_func_body_ptr( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+    
+    t = @@ptr_list[ct_name]
+    type = t[1]
+    file.print <<EOT
+	struct RClass *a;                                /* MBP710 */
+
+    a = mrb_define_class_under(mrb, TECS, "#{type}Pointer", mrb->object_class);
+    MRB_SET_INSTANCE_TT(a, MRB_TT_DATA);
+
+    mrb_define_method(mrb, a, "initialize",      #{type}Pointer_initialize,   MRB_ARGS_REQ(1));
+    mrb_define_method(mrb, a, "[]",              #{type}Pointer_aget,         MRB_ARGS_REQ(1));
+    mrb_define_method(mrb, a, "value",           #{type}Pointer_get_val,      MRB_ARGS_NONE());
+    mrb_define_method(mrb, a, "[]=",             #{type}Pointer_aset,         MRB_ARGS_REQ(2));
+    mrb_define_method(mrb, a, "value=",          #{type}Pointer_set_val,      MRB_ARGS_REQ(1));
+    mrb_define_method(mrb, a, "size",            #{type}Pointer_size,         MRB_ARGS_NONE());
+    mrb_define_method(mrb, a, "length",          #{type}Pointer_size,         MRB_ARGS_NONE());
+EOT
+
+    if t[2] == :Char then
+      file.print <<EOT
+	mrb_define_method(mrb, a, "to_s",            CharPointer_to_s, MRB_ARGS_NONE());
+	mrb_define_method(mrb, a, "from_s",          CharPointer_from_s, MRB_ARGS_REQ(1));
+EOT
+    end
+  end
+
+  def gen_ep_func_body_struct( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+    tag = ct_name
+    structType = @@struct_list[ tag ]
+    file.print  <<EOT
+	struct RClass *a;                                /* MBP720 */
+
+	a = mrb_define_class_under(mrb, TECS, "Struct#{tag}", mrb->object_class);
+	MRB_SET_INSTANCE_TT(a, MRB_TT_DATA);
+
+	mrb_define_method(mrb, a, "initialize", Struct_#{tag}_initialize, MRB_ARGS_NONE());
+EOT
+
+      structType.get_members_decl.get_items.each{ |d|
+        file.print "  STRUCT_INIT_MEMBER( #{tag}, #{d.get_name} )\n"
+      }
+  end
+
+  #===  åãå£é¢æ°ã® preamble (Cè¨èª)ãçæãã
+  #     å¿
+è¦ãªã preamble é¨ã«åºåãã
+  #file::           FILE        åºåå
+ãã¡ã¤ã«
+  #b_singleton::    bool        true if singleton
+  #ct_name::        Symbol
+  #global_ct_name:: string
+  def gen_preamble( file, b_singleton, ct_name, global_ct_name )
+    if @@celltypes[ ct_name ] then
+      gen_preamble_mruby( file, b_singleton, ct_name, global_ct_name )
+      gen_preamble_instance( file, b_singleton, ct_name, global_ct_name )
+      gen_preamble_instance_initialize( file, b_singleton, ct_name, global_ct_name )
+      gen_preamble_bridge_func( file, b_singleton, ct_name, global_ct_name )
+    elsif @@init_celltypes[ ct_name ] then
+      gen_preamble_mruby( file, b_singleton, ct_name, global_ct_name )
+      gen_preamble_instance_proto( file, b_singleton, ct_name, global_ct_name )
+    elsif @@ptr_list[ ct_name ] then
+      gen_preamble_ptr( file, b_singleton, ct_name, global_ct_name )
+    elsif @@struct_list[ ct_name ] then
+      gen_preamble_struct( file, b_singleton, ct_name, global_ct_name )
+    else
+      raise "Unknown #{ct_name}"
+    end
+  end
+
+  def gen_preamble_mruby( file, b_singleton, ct_name, global_ct_name )
+    file.print <<EOT
+/* MBP: MrubyBridgePlugin: MBP000 */
+#include "mruby.h"
+#include "mruby/class.h"
+#include "mruby/data.h"
+#include "mruby/string.h"
+#include "TECSPointer.h"
+#include "TECSStruct.h"
+
+#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+#define DLLEXPORT __declspec(dllexport)
+#else
+#define DLLEXPORT
+#endif
+
+#ifndef NULL
+#define NULL 0
+#endif
+EOT
+  end
+
+  def gen_preamble_instance( file, b_singleton, ct_name, global_ct_name )
+    file.print <<EOT
+
+/* RData MBP001 */
+static void 
+#{@celltype_name}_free( mrb_state *mrb, void *p )
+{
+	if( p )
+		(void)mrb_free( mrb, p );
+}
+
+/* RData MBP002 */
+struct mrb_data_type data_type_#{@celltype_name} =
+{
+	"#{@celltype_name}",
+	#{@celltype_name}_free
+};
+
+/* RData MBP003 */
+struct tecs_#{@celltype_name} {
+    CELLCB  *cbp;
+};
+
+/* name_to_cbp MBP010 */
+const struct name_to_cbp_#{@celltype_name} {
+    char   *name;    /* Cell Name */
+    CELLCB *cbp;
+} Name_to_cbp_#{@celltype_name}[] = {
+EOT
+
+    # mikan namespace
+    nsp = NamespacePath.new( :nMruby, true )
+    nsp.append! ct_name
+    ct = Namespace.find nsp
+
+    ct.get_cell_list.each{ |cell|
+      if cell.is_generate? then
+        name_array = ct.get_name_array( cell )
+        file.print "\t{ \"#{cell.get_name}\", #{name_array[8]} },\n"
+      end
+    }
+
+    file.print <<EOT
+\t{ 0, 0 },
+};
+
+EOT
+
+  end
+
+  def gen_preamble_ptr( file, b_singleton, ct_name, global_ct_name )
+    tment = @@ptr_list[ ct_name ]
+    file.print <<EOT
+
+GET_SET_#{tment[3]}( #{tment[1]}, #{tment[0]} )
+POINTER_CLASS( #{tment[1]}, #{tment[0]} )
+EOT
+  end
+
+  def gen_preamble_struct( file, b_singleton, ct_name, global_ct_name )
+    tag = ct_name
+    structType = @@struct_list[ tag ]
+    file.print <<EOT
+/* struct #{tag} */
+STRUCT_CLASS( #{tag} )
+EOT
+
+    structType.get_members_decl.get_items.each{ |d|
+      type = d.get_type.get_original_type
+      case type
+      when IntType, CIntType
+        bit_size = type.get_bit_size
+        case bit_size
+        when -11, -1
+          tType = "Char"
+          ttype = "char"
+        when -2
+          tType = "Short"
+          ttype = "short"
+        when -3
+          tType = "Int"
+          ttype = "int"
+        when -4
+          tType = "Long"
+          ttype = "long"
+        when -5
+          tType = "IntPtr"
+          ttype = "intptr"
+        when 8, 16, 32, 64
+          tType = "Int#{bit_size}"
+          ttype = "int#{bit_size}"
+        else
+            raise "cannot handle bit_size #{bit_size}"
+        end
+        file.print "MEMBER_GET_SET_INT( #{tag}, #{d.get_name}, #{tType}, #{ttype} )\n"
+      when FloatType, CFloatType
+        file.print "MEMBER_GET_SET_FLOAT( #{tag}, #{d.get_name} )\n"
+      else
+        raise "cannot handle type"
+      end
+    }
+
+  end
+
+  def gen_preamble_instance_proto( file, b_singleton, ct_name, global_ct_name )
+    file.print <<EOT
+//  Prototype MBP400
+mrb_value  MrubyBridge_#{@celltype_name}_initialize( mrb_state *mrb, mrb_value self);
+EOT
+
+    @func_head_array.each{ |f|
+      if ! f.is_function? then
+        next
+      end
+      if f.get_name != :initialize then
+        func_name = f.get_name
+      else
+        func_name = :initialize_cell
+      end
+
+      ret_type  = f.get_return_type
+      ret_type0 = f.get_return_type.get_original_type
+      b_void    = ret_type0.is_void?
+      plist     = f.get_paramlist.get_items
+
+      file.print <<EOT
+mrb_value  MrubyBridge_#{@celltype_name}_#{func_name}( mrb_state *mrb, mrb_value self );
+EOT
+    }
+  end
+
+  def gen_preamble_instance_initialize( file, b_singleton, ct_name, global_ct_name )
+    file.print <<EOT
+
+/* MBP100 */
+mrb_value
+MrubyBridge_#{@celltype_name}_initialize( mrb_state *mrb, mrb_value self)
+{
+	mrb_value	name;
+	struct tecs_#{@celltype_name} *tecs_cb;
+	const struct name_to_cbp_#{@celltype_name} *ntc;
+
+	/* set DATA_TYPE earlier to avoid SEGV */
+	DATA_TYPE( self ) = &data_type_#{@celltype_name};
+
+	mrb_get_args(mrb, "o", &name );
+	if( mrb_type( name ) != MRB_TT_STRING ){
+		mrb_raise(mrb, E_NAME_ERROR, "cell name not string");
+	}
+	for( ntc = &Name_to_cbp_#{@celltype_name}[0]; ntc->name != NULL; ntc++ ){
+		if( strcmp( ntc->name, RSTRING_PTR( name ) ) == 0 )
+			break;
+	}
+	if( ntc->name == 0 ){
+		mrb_raise(mrb, E_ARGUMENT_ERROR, "cell not found");
+	}
+	tecs_cb = (struct tecs_#{@celltype_name} *)mrb_malloc(mrb, sizeof(struct tecs_#{@celltype_name}) );
+	tecs_cb->cbp = ntc->cbp;
+	DATA_PTR( self ) = (void *)tecs_cb;
+
+	return self;
+}
+EOT
+  end
+
+  def gen_preamble_bridge_func( file, b_singleton, ct_name, global_ct_name )
+
+    @func_head_array.each{ |f|
+      if ! f.is_function? then
+        next
+      end
+      if f.get_name != :initialize then
+        func_name = f.get_name
+      else
+        func_name = :initialize_cell
+      end
+
+      ret_type  = f.get_return_type
+      ret_type0 = f.get_return_type.get_original_type
+      b_void    = ret_type0.is_void?
+      plist     = f.get_paramlist.get_items
+
+      file.print <<EOT
+
+/* bridge function (MBP101) */
+mrb_value
+MrubyBridge_#{ct_name}_#{func_name}( mrb_state *mrb, mrb_value self )
+{
+	/* cellcbp (MBP105) */
+	CELLCB	*p_cellcb = ((struct tecs_#{@celltype_name} *)DATA_PTR(self))->cbp;
+EOT
+      
+      file.print "	/* variables for return & parameter (MBP110) */\n"
+      if ! b_void then
+        file.print "	", ret_type.get_type_str, "\tret_val", ret_type.get_type_str_post, ";\n"
+      end
+      arg_str = ""
+      n_param  = 0
+      n_scalar = 0
+      n_ptr    = 0
+      n_struct = 0
+      plist.each{ |param|
+        case param.get_direction
+        when :IN, :INOUT, :OUT
+          type = param.get_type.get_original_type
+          case type
+          when IntType
+            file.print "	mrb_int	mrb_", param.get_name, ";\n"
+            file.print "	#{param.get_type.get_type_str}	#{param.get_name}#{param.get_type.get_type_str_post};\n"
+            arg_str += "i"
+            n_param += 1
+            n_scalar += 1
+          when FloatType
+            file.print "	mrb_float	mrb_", param.get_name, ";\n"
+            file.print "	#{param.get_type.get_type_str}	#{param.get_name}#{param.get_type.get_type_str_post};\n"
+            arg_str += "f"
+            n_param += 1
+            n_scalar += 1
+          when BoolType
+            file.print "	mrb_value	mrb_", param.get_name, ";\n"
+            file.print "	#{param.get_type.get_type_str}	#{param.get_name}#{param.get_type.get_type_str_post};\n"
+            arg_str += "o"
+            n_param += 1
+            n_scalar += 1
+          when PtrType
+            file.print "	mrb_value	mrb_", param.get_name, ";\n"
+            file.print "	#{param.get_type.get_type_str}	#{param.get_name}#{param.get_type.get_type_str_post};\n"
+            arg_str += "o"
+            n_param += 1
+            n_ptr += 1
+          when StructType
+            file.print "	mrb_value	mrb_", param.get_name, ";\n"
+            file.print "	#{param.get_type.get_type_str}	*#{param.get_name}#{param.get_type.get_type_str_post};\n"
+            arg_str += "o"
+            n_param += 1
+            n_struct += 1
+          else
+            raise "Unkown type"
+          end
+        end
+      }
+
+      if n_param > 0 then
+        file.print "	/* retrieve arguments (MBP111) */\n"
+        file.print "	mrb_get_args(mrb, \"#{arg_str}\""
+        plist.each{ |param|
+          case param.get_direction
+          when :IN, :INOUT, :OUT
+            type = param.get_type.get_original_type
+            case type
+            when IntType
+              file.print ", &mrb_", param.get_name
+            when FloatType
+              file.print ", &mrb_", param.get_name
+            when BoolType
+              file.print ", &mrb_", param.get_name
+            when PtrType
+              file.print ", &mrb_", param.get_name
+            when StructType
+              file.print ", &mrb_", param.get_name
+            else
+              raise "Unkown type"
+            end
+          end
+        }
+        file.print " );\n"
+
+        if n_scalar > 0 || n_struct > 0 then
+          file.print "	/* convert mrb to C (MBP112) */\n"
+        end
+        plist.each{ |param|
+          case param.get_direction
+          when :IN, :INOUT, :OUT
+            type = param.get_type.get_original_type
+            case type
+            when IntType
+              ttype = type.get_original_type
+              tment = get_type_map_ent ttype
+              file.print "	VALCHECK_#{tment[1]}( mrb, mrb_#{param.get_name} );\n"
+              file.print "	#{param.get_name} = (#{param.get_type.get_type_str})mrb_#{param.get_name};\n"
+            when FloatType
+              file.print "	#{param.get_name} = (#{param.get_type.get_type_str})mrb_#{param.get_name};\n"
+            when BoolType
+              file.print "	#{param.get_name} = mrb_test( mrb_#{param.get_name} );\n"
+            when PtrType
+              ttype = type.get_type.get_original_type
+              case ttype
+              when StructType
+                file.print "	CHECK_STRUCT( #{ttype.get_name}, mrb_#{param.get_name} );\n"
+                file.print "	#{param.get_name} = (struct #{ttype.get_name}*)DATA_PTR(mrb_#{param.get_name});\n"
+              when IntType
+              when FloatType
+              when BoolType
+              else
+                raise "cannot handle type"
+              end
+            when StructType
+              file.print "	CHECK_STRUCT( #{type.get_name}, mrb_#{param.get_name} );\n"
+              file.print "	#{param.get_name} = (struct #{type.get_name}*)DATA_PTR(mrb_#{param.get_name});\n"
+            else
+              raise( "canot treat class" )
+            end
+          end
+        }
+
+        if n_ptr > 0 then
+          file.print "	/* convert mrb to C for pointer types (MBP113) */\n"
+        end
+        plist.each{ |param|
+          case param.get_direction
+          when :IN, :INOUT, :OUT
+            type = param.get_type.get_original_type
+            case type
+            when IntType
+            when FloatType
+            when BoolType
+            when PtrType
+              case type.get_type.get_original_type
+              when StructType
+              when IntType
+                ptrMrb2C file, type, param
+              when FloatType
+                ptrMrb2C file, type, param
+              when BoolType
+                ptrMrb2C file, type, param
+              else
+                raise "cannot handle type"
+              end
+            when StructType
+            else
+              raise( "canot treat class" )
+            end
+          end
+        }
+
+      end
+
+      file.print "	/* calling target (MBP120) */\n"
+      if ! b_void then
+        file.print "	ret_val = "
+      else
+        file.print "	"
+      end
+      delim = ""
+      file.print "cTECS_", f.get_name, "( "
+      plist.each{ |param|
+        if param.get_type.get_original_type.kind_of? StructType then
+          aster = "*"
+        else
+          aster = ""
+        end
+        file.print delim, aster, param.get_name
+        delim = ", "
+      }
+      file.print " );\n"
+      
+      file.print "	/* return (MBP130) */\n"
+      case ret_type0
+      when BoolType
+        file.print "	return ret_val ? mrb_true_value() : mrb_false_value();\n"
+      when IntType
+        file.print "	return mrb_fixnum_value( ret_val );\n"
+      when FloatType
+        file.print "	return mrb_float_value( mrb, ret_val );\n"
+      when VoidType
+        file.print "	return  mrb_nil_value();\n"
+      else
+        raise "unknown type"
+      end
+
+      file.print "}\n"
+    }
+  end
+
+  def ptrMrb2C file, type, param
+    ttype = type.get_type.get_original_type
+    tment = get_type_map_ent ttype
+    tstr = tment[1]
+=begin
+    case ttype
+    when IntType
+      bit_size = ttype.get_bit_size
+      case bit_size
+      when -1, -11
+        tstr = "Char"
+      when 8, 16, 32, 64
+        tstr = "Int#{bit_size}"
+      when -2
+        tstr = "Short"
+      when -3
+        tstr = "Int"
+      when -4
+        tstr = "Long"
+      when -5
+        tstr = "IntPtr"
+      else
+        raise "not handle type"
+      end
+    when FloatType
+      if ttype.get_bit_size == 32 then
+        tstr = "Float32"
+      else
+        tstr = "Double64"
+      end
+    when BoolType
+      tstr = "Bool"
+    when StructType
+      raise "not handle type 2 #{ttype}"
+    else
+      raise "not handle type 2 #{ttype}"
+    end
+=end
+    if( param.get_size ) then
+      sz_str = param.get_size.to_s
+    elsif param.get_string then      # mikan ã¨ãããã size_is ã¨ string ã®åææå® (äºéãã¤ã³ã¿) ã¯ãªã
+      sz_str = param.get_string.to_s
+    else
+      sz_str = "1"
+    end
+    # unsigned åã®å ´åã«ã¯ cast ãå¿
+è¦
+    if ttype.get_original_type.get_type_str != param.get_type.get_type.get_type_str then
+      cast_str = "(#{param.get_type.get_type_str})"
+    else
+      cast_str = ""
+    end
+
+    modify = ""
+    case param.get_direction
+    when :OUT, :INOUT
+      case tstr
+      when "Char", "SChar", "UChar"
+        modify = "Mod"
+      end
+    end
+    if param.is_nullable? then
+      nullable = "Nullable"
+    else
+      nullable = ""
+    end
+
+    # file.print "	CHECK_POINTER( #{tstr}, mrb_#{param.get_name}, #{sz_str} );\n"
+    # file.print "	#{param.get_name} = #{cast_str}((struct #{tstr}PointerBody*)(DATA_PTR(mrb_#{param.get_name})))->buf;\n"
+    file.print "	#{param.get_name} = CheckAndGet#{tstr}Pointer#{modify}#{nullable}( mrb, mrb_#{param.get_name}, #{sz_str} );\n"
+  end
+
+  def get_celltype_name
+    @celltype_name
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° ignoreUnsigned
+  def set_ignoreUnsigned rhs
+    if rhs == "true" || rhs == nil then
+      @b_ignoreUnsigned = true
+    end
+  end
+  #=== ãã©ã°ã¤ã³å¼æ° include
+  def set_include rhs
+    funcs = rhs.split ','
+    funcs.each{ |rhs_func|
+      found = false
+      rhs_func.gsub!( /\s/, "" )
+      @signature.get_function_head_array.each{ |a|
+        if rhs_func.to_sym == a.get_name then
+          found = true
+        end
+      }
+      if found == false then
+        cdl_error( "MRB1009 include function '$1' not found in signagture '$2'", rhs, @signature.get_name )
+      else
+        @includes << rhs_func.to_sym
+      end
+    }
+  end
+  #=== ãã©ã°ã¤ã³å¼æ° exclude
+  def set_exclude rhs
+    funcs = rhs.split ','
+    funcs.each{ |rhs_func|
+      found = false
+      rhs_func.gsub!( /\s/, "" )
+      @signature.get_function_head_array.each{ |a|
+        if rhs_func.to_sym == a.get_name then
+          found = true
+        end
+      }
+      if found == false then
+        cdl_error( "MRB1010 exclude function '$1' not found in signagture '$2", rhs, @signature.get_name )
+      else
+        @excludes << rhs_func.to_sym
+      end
+    }
+  end
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/NotifierPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/NotifierPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/NotifierPlugin.rb	(revision 270)
@@ -0,0 +1,1104 @@
+# -*- coding: utf-8 -*-
+#
+#  Copyright (C) 2015 by Ushio Laboratory
+#              Graduate School of Engineering Science, Osaka Univ., JAPAN
+#  Copyright (C) 2015-2016 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#
+
+NotifierPluginArgProc = {
+	"factory" => Proc.new { |obj, rhs| obj.set_factory(rhs) },
+	"output_file" => Proc.new { |obj, rhs| obj.set_factory_output_file(rhs) }
+}
+
+class NotifierPlugin < CelltypePlugin
+
+	# ---------- ã¢ããã¿é¢æ°ã®çæ -------------
+	#
+	# siHandlerBodyã®åãå£é¢æ°ã¯ï¼ã¿ã¤ã ã¤ãã³ãéç¥ã®éç¥å
+ã¨ãã¦ç´æ¥æå®ãã
+	# ãã¨ã¯ã§ããªãï¼ã·ã°ããã£ãä¸è´ãã¦ããªããã¨ãçç±ã§ããï¼ãã®ããï¼ã¢ã
+	# ãã¿ã¨ãã¦åä½ããé¢æ°ãçæãï¼ã«ã¼ãã«ããã®å¼åºããTECSã®å¼åºãã«å¤æã§
+	# ããããã«ããå¿
+è¦ãããï¼
+	#
+	# åºæ¬çã«ã¯ï¼åãå£æ¯ã«ã¢ããã¿é¢æ°ãçæããã°ååã§ããï¼ãããï¼ããã§ã¯
+	# ã¡ã¢ãªæ¶è²»éãä¸å¿
+è¦ã«å¢å ãã¦ãã¾ãï¼ããã§ï¼éç¥å
+é¢æ°ã«intptr_tåã®å¼æ°
+	# ãæ¸¡ãããã¨ã«çç®ãï¼é¢æ°ã®"ä¸è¬å"ãå³ãï¼ããªãã¡åãå£ã®ããå±æ§(ãã
+	# ã§ã¯ï¼çµåå
+ã®ã»ã«ï¼æ·»å­ãªã©ãæã)ãï¼ã¢ããã¿é¢æ°ã®å¼æ°ã¨ãã¦åãåãã
+	# ããã«ãï¼1åã®ã¢ããã¿é¢æ°ã2åä»¥ä¸ã®çµåã«å¯¾ãç¨ãããã¨ãã§ããããã«
+	# ããï¼
+	#
+	# ã¢ããã¿é¢æ°ã®å±æ§ã«ã¤ãã¦æ´çããã¨ï¼
+	#  - åãå£é¢æ° - ä¸è¬åãè¡ãã¨ï¼å®è¡æã³ã¹ããå¤§ããå¢å¤§ãã¦ãã¾ããã¨ã
+	#    ç¢ºèªããã¦ããï¼ãã®ããï¼ä¸è¬åã¯è¡ããªãï¼EntryPropertyã«ãå«ããªãï¼
+	#  - ã»ã«ã¤ã³ããã¯ã¹ - CELLIDXåã§ï¼åã®è¦å®ã¯ãªããï¼"ãã¤ã³ã¿å¤ã§ãã£ãã
+	#    æ´æ°å¤ã§ãã£ããããã" (TECS 5.3.6) ããï¼ã¤ã³ããã¯ã¹ããã¤ã³ã¿ãã
+	#    ãã¨ãåããï¼ã¤ã³ããã¯ã¹ã ã¨ããã¨ï¼ãã®å¤ã¯ã»ã«CBã®ã¢ãã¬ãã·ã³ã°ã«
+	#    ä½¿ç¨ãããã®ã§ï¼intptr_tã«åã¾ãç­ã§ããï¼ãã¤ã³ã¿ã®å ´åï¼å½ç¶intptr_t
+	#    ã«åã¾ãï¼
+	#  - åãå£é
+åã®æ·»å­ - int_tï¼åæ§ã«intptr_tã«åã¾ãç­ã§ããï¼
+	# ãããã®ãã¡ï¼ã»ã«ã¤ã³ããã¯ã¹ã¨åãå£é
+åã®æ·»å­ã¯ãã©ã¡ã¼ã¿ã«å«ãããã¨ã
+	# ã§ãããã§ãããï¼ä¸¡æ¹ã¯ç¡çã§ããï¼
+	# ä¸¡æ¹ãæ ¼ç´ããé
+åãçæãï¼ãã®é
+åã®è¦ç´ ã¸ã®ãã¤ã³ã¿ãæ¸¡ãããã«ããã¨ã
+	# ãé¸æè¢ãå¯è½ã§ãããï¼å®è¡éåº¦ãåªå
+ããããã«ï¼ãã®æ¹æ³ã¯ã¨ããªãã£ãï¼
+	#
+	# ãã®ããï¼ä¸è¬åã¯ä»¥ä¸ã®ãã¿ã¼ã³ã«åé¡ãã¦è¡ãï¼
+	#
+	# 1. ã»ã«ã¤ã³ããã¯ã¹ã®ã¿ä¸è¬åï¼ã»ã«ã¤ã³ããã¯ã¹ã®ãã¿ã¼ã³æ°ãåãå£é
+åã®
+	#    æ·»å­ã®ãã¿ã¼ã³æ°ããå¤ããï¼ãããã¯åãå£ãé
+åã§ãªãå ´åã«è¡ãããï¼
+	# 2. åãå£é
+åã®æ·»å­ã®ã¿ä¸è¬åï¼ãã®å ´åï¼ã»ã«ãã¨ã«ç°ãªãé¢æ°ãç¨ããï¼
+	#
+	# ããããï¼ååãå£é¢æ°ã«ã¤ãã¦ï¼ã¢ããã¿é¢æ°ã®çæåæ°ã¯ï¼
+	#         O(min{ã»ã«ã¤ã³ããã¯ã¹ã®ãã¿ã¼ã³æ°, æ·»å­ã®ãã¿ã¼ã³æ°})
+	# ã¨ãªãï¼
+	#
+	# ãã©ã°ã¤ã³ã§ã®å¦çãã¯ã³ãã¹ã§è¡ãããã«ï¼tecsgen.cfgã§ã¯ã¢ããã¿é¢æ°ãç´
+	# æ¥æå®ããã®ã§ã¯ãªãï¼ä»£ããã«ã¢ããã¿é¢æ°ãè¡¨ããã¯ã­ãä½¿ç¨ããï¼ãã®
+	# ãã¯ã­ã¯ã¢ããã¿é¢æ°ãã³ãã«ã¨å¼ã¶ãã¨ã«ããï¼
+	# ã¢ããã¿é¢æ°ãã³ãã«ã¯ï¼æ¬¡ã®2åã®è¦ç´ ããæãï¼
+	#  - ã¢ããã¿é¢æ°ã¸ã®ã®ãã¤ã³ã¿
+	#  - ã¢ããã¿é¢æ°ã®å¼æ°
+
+	# @private
+	class AdapterGenerator
+
+		# çµåå
+ã«é¢ããå±æ§ãå«ãï¼ã»ã«ï¼åãå£é
+åã®æ·»å­ããæãï¼
+		# åä¸ã®EntryPropertyã¨ãªãçµåã¯ï¼å
+¨ãåãæ¹æ³ã§ãã®åãå£é¢æ°ãå¼ã³
+		# åºããï¼
+		# @private
+		class EntryProperty
+			# @return [Cell] åãå£å´ã®ã»ã«ï¼
+			attr_reader :cell
+
+			# @return [Integer, nil] åãå£é
+åã®æ·»å­ï¼é
+åã§ãªãå ´åã¯nilï¼
+			attr_reader :subscript
+
+			def initialize(cell, subscript)
+				@cell = cell
+				@subscript = subscript
+			end
+
+			def self.from_join(join)
+				EntryProperty.new(join.get_rhs_cell, join.get_rhs_subscript)
+			end
+
+			# åå¤æ§ã®å®ç¾©ï¼Hashã®ã­ã¼ã¨ãã¦ä½¿ç¨ããã®ã«å¿
+è¦ï¼
+			def eql?(o) @cell == o.cell && @subscript == o.subscript end
+			def hash() @cell.hash ^ @subscript.hash end
+		end
+
+		# @private
+		class EntryPort
+			# @param [Port] port çµåå
+ã®ã»ã«ã®ã»ã«ã¿ã¤ãã®åãå£ï¼
+			def initialize(port, prefix)
+				@port = port
+				@global_name = "#{prefix}_#{@port.get_celltype.get_global_name}_#{@port.get_name}"
+
+				# åãå£é¢æ°åï¼siHandlerBodyãæ³å®ãã¦ããã®ã§ï¼é¢æ°åã¯mainã§åºå®ã§ããï¼
+				@entry_fn_name = "#{@port.get_celltype.get_global_name}_#{@port.get_name}_main"
+
+				@props = [] 	# Array<EntryProperty>
+				@prop_map = {}	# Hash<EntryProperty, Integer>
+			end
+
+			# @return [String] ã°ã­ã¼ãã«ã«ä¸æ(ãªãã®ã¨ãã¦æ±ãããã)ãªè­å¥å­ï¼
+			attr_reader :global_name
+
+			# @return [Port]
+			attr_reader :port
+
+			# æå®ããEntryPropertyã«å¯¾å¿ããã¢ããã¿é¢æ°ãã³ãã«ãåå¾ããï¼
+			# @param [EntryProperty] ep
+			# @return [String] ã¢ããã¿é¢æ°ãã³ãã«ï¼
+			# @private
+			def adapter_handle_for_entry_property(ep)
+				index = @prop_map.fetch(ep)
+				return [
+					"#{@global_name}_#{index}_fp",
+					"#{@global_name}_#{index}_arg"
+				]
+			end
+
+			# çµåå
+ã®æ
+å ±ã«å¿ããã¢ããã¿é¢æ°ãã½ã¼ã¹ã»ãããã¼ã«åºåããï¼
+			# ä¸è¬åæå®ã¯ï¼`cell`ã¾ãã¯`subscript`ã®ä¸æ¹ã®ã¿è¡ããã¨ãã§ããï¼
+			#
+			# @param [AdapterGenerator] context
+			# @param [String] fn_name é¢æ°åï¼
+			# @param [Cell, Symbol] cell ã»ã«ï¼ã»ã«ã«ã¤ãã¦ä¸è¬åããå ´åã¯ `:generic`
+			# @param [Integer, Symbol, nil] subscript æ·»å­ï¼æ·»å­ã«ã¤ãã¦ä¸è¬åããå ´åã¯ `:generic`
+			# @private
+			def generate_inner(context, fn_name, cell, subscript)
+				source_file = context.source_file
+				header_file = context.header_file
+
+				source_file.print "void #{fn_name}(intptr_t extinf) {\n"
+
+				params = []
+				ct = @port.get_celltype
+
+				# ã·ã³ã°ã«ãã³ã»ã«ã¿ã¤ãä»¥å¤ã§ã¯ï¼CELLIDXã®æå®ãå¿
+è¦ï¼
+				unless ct.is_singleton?
+					if cell == :generic
+						params << "(CELLIDX)extinf"
+					else
+						# ã»ã«ã®CELLIDXãå¾ã
+						if ct.has_INIB? || ct.has_CB?
+							params << ct.get_name_array(cell)[7]
+						else
+							params << "0"
+						end
+					end
+				end
+
+				# åãå£é
+åã®æ·»å­ï¼
+				if @port.get_array_size
+					if subscript == :generic
+						params << "(int_t)extinf"
+					else
+						params << "#{subscript}"
+					end
+				end
+
+				params_str = params.join(", ")
+
+				source_file.print "\t#{@entry_fn_name}(#{params_str});\n"
+				source_file.print "}\n\n"
+
+				header_file.print "extern void #{fn_name}(intptr_t extinf);\n\n"
+
+			end
+
+			# æå®ããJoinã«å¯¾å¿ããã¢ããã¿é¢æ°ãã³ãã«ãåå¾ããï¼
+			# @return [Array] ã¢ããã¿é¢æ°ãã³ãã«ï¼
+			def make_adapter_handle(join)
+				prop = EntryProperty.from_join(join)
+				unless @prop_map.has_key?(prop)
+					@prop_map[prop] = @props.length
+					@props << prop
+				end
+				return adapter_handle_for_entry_property(prop)
+			end
+
+			# ã½ã¼ã¹ã»ãããã¼ã®è¨è¿°ãçæããï¼
+			# @param [AdapterGenerator] context
+			def generate(context)
+				header_file = context.header_file
+				return if @props.empty?
+
+				ct = @port.get_celltype
+
+				header_file.print "/*\n * #{@global_name}\n"
+
+				cells = @props.group_by { |prop| prop.cell }
+				subscripts = @props.group_by { |prop| prop.subscript }
+				no_cellidx = false
+				if !(ct.has_INIB? || ct.has_CB?)
+					# CB, INIBæé©åã«ããï¼CB, INIBãä¸¡æ¹ä¸è¦ã«ãªã£ãã±ã¼ã¹ï¼
+					# CELLIDXãä¸è¦ã§ããã®ã§ï¼ã»ã«ã«ã¤ãã¦ä¸è¬åãã¦ãæå³
+					# ã¯ãªãã®ã§ï¼æ·»å­ã«ããä¸è¬åãé¸æããï¼
+					generalize_by_cell_idx = false
+					no_cellidx = true
+
+					# å
+¨ã¦ã®ã»ã«ãåä¸è¦ããï¼
+					cells = { @props[0].cell => @props }
+
+					header_file.print " * No INIB & CB: generalized by subscript\n"
+				elsif @port.get_array_size
+					# ä¸è¬åãã¿ã¼ã³ã®åé¡ãè¡ãããã«ï¼åãå£å´ã»ã«ãæ·»å­ã®
+					# ãã¿ã¼ã³æ°ãåæãã¦ï¼æé©ãªæ¹ãé¸æããï¼
+					generalize_by_cell_idx = cells.length >= subscripts.length
+					if generalize_by_cell_idx
+						header_file.print " * more cells than subscripts: generalized by cell\n"
+					else
+						header_file.print " * more subscripts than cells: generalized by subscript\n"
+					end
+				else
+					# å¸¸ã«CELLIDXã§ä¸è¬å
+					generalize_by_cell_idx = true
+					header_file.print " * non-array entry port: generalized by cell\n"
+				end
+
+				header_file.print " */\n\n"
+
+				if generalize_by_cell_idx
+					# CELLIDXã«ã¤ãã¦ä¸è¬å
+					subscripts.each { |subscript, props|
+						if subscript
+							fn_name = "#{@global_name}_adap_#{subscript}"
+						else
+							# åãå£é
+åã§ãªãå ´å
+							fn_name = "#{@global_name}_adap"
+						end
+
+						generate_inner context, fn_name,
+							:generic, subscript
+
+						props.each { |prop|
+							handle = adapter_handle_for_entry_property(prop)
+
+							# ã»ã«ã®CELLIDXãå¾ã
+							if ct.has_INIB? || ct.has_CB?
+								idx = ct.get_name_array(prop.cell)[7]
+							else
+								idx = "0"
+							end
+							header_file.print "\#define #{handle[0]} &#{fn_name}\n"
+							header_file.print "\#define #{handle[1]} #{idx}\n\n"
+						}
+					}
+				else
+					# æ·»å­ã«ã¤ãã¦ä¸è¬å
+					cells.each { |cell, props|
+						if no_cellidx
+							# CB/INIB ãªã
+							fn_name = "#{@global_name}_adap"
+						else
+							fn_name = "#{@global_name}_adap_#{cell.get_global_name}"
+						end
+
+						generate_inner context, fn_name,
+							cell, :generic
+
+						props.each { |prop|
+							handle = adapter_handle_for_entry_property(prop)
+
+							header_file.print "\#define #{handle[0]} &#{fn_name}\n"
+							header_file.print "\#define #{handle[1]} #{prop.subscript || 0}\n\n"
+						}
+					}
+				end
+			end
+		end
+
+		# @private
+		attr :source_file
+
+		# @private
+		attr :header_file
+
+		# @param [String] celltype_name ãã³ãã©é¢æ°ã®ã»ã«ã¿ã¤ãï¼
+		# @param [String] prefix ååè¡çªãé²ãããã®ãã¬ãã£ãã¯ã¹ï¼
+		def initialize(celltype_name, prefix)
+			@celltype_name = celltype_name
+			@prefix = prefix
+
+			# Hash<Port, EntryPort>
+			@entry_ports = {}
+		end
+
+		# ===AdapterGenerator#make_adapter_handle===
+		# æå®ããçµåã®å¼åºããè¡ãããã®ã¢ããã¿é¢æ°ãã³ãã«ãçæããï¼
+		# @return [Array] ã¢ããã¿é¢æ°ãã³ãã«ï¼
+		def make_adapter_handle(join)
+			entry_port = @entry_ports[join.get_rhs_port]
+			unless entry_port
+				entry_port = EntryPort.new(join.get_rhs_port,
+					"#{@celltype_name}_#{@prefix}")
+				@entry_ports[join.get_rhs_port] = entry_port
+			end
+			return entry_port.make_adapter_handle(join)
+		end
+
+		# ===AdapterGenerator#finish===
+		# ååãå£ã«å¯¾ãï¼ã¢ããã¿é¢æ°ãçæããï¼
+		def finish
+			@source_file = AppFile.open( "#{$gen}/#{@celltype_name}.c" )
+	        @source_file.print "\n/* Generated by #{self.class.name} */\n\n"
+	        @source_file.print "\#include \"#{@celltype_name}_aux.h\"\n\n"
+	        @source_file.print "\#include \"#{@celltype_name}_tecsgen.h\"\n\n"
+
+			@header_file = AppFile.open( "#{$gen}/#{@celltype_name}.h" )
+	        @header_file.print "\n/* Generated by #{self.class.name} */\n\n"
+
+			# NotifierPluginãä½¿ç¨ããã»ã«ã¿ã¤ããè¤æ°ããå ´åï¼ããããã«
+			# å¯¾ãAdapterGenerator#finishãå¼ã³åºãããï¼tTimeEventHandler.hã«
+			# ç¶ãã¦æ¸ãè¾¼ãã§ãã¾ãã¨ï¼ãããã¼ã¬ã¼ãã®é¢ä¿ã§2åç®ä»¥éã®è¨è¿°
+			# ãèª­ã¿è¾¼ã¾ããªããªã£ã¦ãã¾ãï¼ãã®ããï¼ãã¡ã¤ã«å + ã»ã«ã¿ã¤ãå
+			# ã¨ããå°ãç¹æ®ãªãããã¼ã¬ã¼ããç¨ããï¼
+			header_guard = "#{@celltype_name}_H_#{@prefix}"
+
+	        @header_file.print "\#ifndef #{header_guard}\n"
+	        @header_file.print "\#define #{header_guard}\n\n"
+
+	        # ã«ã¼ãã«ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãå®è¡ããéï¼ãã³ãã©åãå£ã®ã»ã«ã¿ã¤ã
+	        # ã®ã»ã«CBã®å®ç¾©ãå¿
+è¦ãªå ´åãããï¼
+	        @header_file.print "\#include \"#{@celltype_name}_aux.h\"\n\n"
+
+			# çµåå
+ã®ã»ã«ã¿ã¤ãã®å®ç¾©ã¯ï¼èªåã®ã»ã«ã®tecsgen.hãããå
+ã«
+			# èª­ã¿è¾¼ã¾ãªããã°ãªããªããï¼ãã®ãã©ã°ã¤ã³ãè¤æ°å®è¡ãããã¨ï¼
+			# é åºãå´©ãã¦ãã¾ãï¼ããã§ï¼çµåå
+ã®ã»ã«ã¿ã¤ãã®å®ç¾©ã¯ããä¸ã¤ã®
+			# ãããã¼ãã¡ã¤ã«(tCelltypeName_aux.h)ããèª­ã¿è¾¼ãããã«ããï¼
+			aux_header_file = AppFile.open( "#{$gen}/#{@celltype_name}_aux.h" )
+	        aux_header_file.print "\n/* Generated by #{self.class.name} */\n\n"
+
+			aux_header_guard = "#{@celltype_name}_AUX_H_#{@prefix}"
+
+	        aux_header_file.print "\#ifndef #{aux_header_guard}\n"
+	        aux_header_file.print "\#define #{aux_header_guard}\n\n"
+
+			cb_type_only_guard = "#{@celltype_name}_AUX_H_#{@prefix}_CB_TYPE_ONLY"
+
+			# çµåå
+ã®ã»ã«ã¿ã¤ãã®å®ç¾©ãèª­ã¿è¾¼ã
+			aux_header_file.print "#ifndef TOPPERS_CB_TYPE_ONLY\n"
+		    aux_header_file.print "#define TOPPERS_CB_TYPE_ONLY\n"
+		    aux_header_file.print "#define #{cb_type_only_guard}\n"
+			aux_header_file.print "#endif\n"
+			@entry_ports.values.map { |ep|
+				ep.port.get_celltype
+			}.uniq.each { |ct|
+				hname = "#{ct.get_global_name}_tecsgen.#{$h_suffix}"
+				aux_header_file.print "\#include \"#{hname}\"\n"
+			}
+			aux_header_file.print "#ifdef #{cb_type_only_guard}\n"
+		    aux_header_file.print "#undef #{cb_type_only_guard}\n"
+		    aux_header_file.print "#undef TOPPERS_CB_TYPE_ONLY\n"
+			aux_header_file.print "#endif\n\n"
+
+			aux_header_file.print "\#endif\n"
+			aux_header_file.close
+
+			@entry_ports.each { |port, entry_port|
+				entry_port.generate self
+			}
+
+	        @header_file.print "\#endif\n"
+
+			@source_file.close
+			@header_file.close
+		end
+
+	end
+
+	# ------ éç¥ã®ãã³ãã©ã®ç¨®é¡ã®å®ç¾© -------
+
+	class Handler
+		def initialize(call_port_name)
+			@call_port_name = call_port_name
+		end
+
+		attr :call_port_name
+	end
+
+	# éå¸¸ã®ãã³ãã©
+	EVENT_HANDLER = Handler::new("ciNotificationHandler")
+
+	# ã¨ã©ã¼ãã³ãã© (éå¸¸ã®ãã³ãã©ãå¤±æããå ´åã«å¼ã³åºããã)
+	ERROR_HANDLER = Handler::new("ciErrorNotificationHandler")
+
+	HANDLERS = [
+		EVENT_HANDLER,
+		ERROR_HANDLER
+	]
+
+	class HandlerAttribute
+		def initialize(name, error_name = nil)
+			@name = name
+			@error_name = error_name || (name + 'ForError')
+		end
+
+		def name_for_handler(handler)
+			case handler
+			when EVENT_HANDLER then return @name
+			when ERROR_HANDLER then return @error_name
+			else raise "unknown handler #{handler}"
+			end
+		end
+	end
+
+	# ------ éç¥ã®å±æ§ã®å®ç¾© -------
+	#
+	# ãã³ãã©ã¿ã¤ãã«åè´ããªãå±æ§ãæå®ãããå ´åã«
+	# ã¨ã©ã¼ãåºåã§ãããããå
+¨ã¦ã®å±æ§ãããã§åæããã
+
+	SETVAR_ADDR_ATTR =   HandlerAttribute::new("setVariableAddress")
+	SETVAR_VALUE_ATTR =  HandlerAttribute::new("setVariableValue")
+	INCVAR_ADDR_ATTR =   HandlerAttribute::new("incrementedVariableAddress")
+	SNDDTQ_VALUE_ATTR =  HandlerAttribute::new("dataqueueSentValue")
+	SETFLG_FLAG_ATTR =   HandlerAttribute::new("flagPattern")
+
+	ATTRS = [
+		SETVAR_ADDR_ATTR,
+		SETVAR_VALUE_ATTR,
+		INCVAR_ADDR_ATTR,
+		SNDDTQ_VALUE_ATTR,
+		SETFLG_FLAG_ATTR
+	]
+
+	# ------ ãã³ãã©ã¿ã¤ãã®å®ç¾© -------
+
+	class BaseHandlerType
+
+		def initialize()
+			super
+
+			# HandlerAttribute[]
+			@required_attributes = []
+		end
+
+		attr :required_attributes
+
+	    #=== NotifierPlugin#BaseHandlerType#validate_join
+	    # æå®ããã»ã«ã®çµåå
+ãããã®ãã³ãã©ã¿ã¤ãã«è©²å½ããããæ¤è¨¼
+	    # handler:: Handler : ãã³ãã©
+	    # cell:: Cell : ã»ã«
+	    # join:: Join : çµå (declarationãPortã§ãããã®)
+		def validate_join(handler, cell, join)
+        	return !generate_attr_map(handler, cell).nil?
+		end
+
+	    #=== NotifierPlugin#BaseHandlerType#generate_attr_map
+	    # æå®ããã»ã«ã®å±æ§ã¨ãæ¢ç¥ã®HandlerAttributeã®ãããã³ã°ã
+	    # çæããHash<HandlerAttribute, Join> (åå±æ§ã¨ããã«å¯¾å¿ãã
+	    # Join(declarationãDeclã®ãã®)ãè¡¨ãHash)ããããã¯ã
+		# ãããã³ã°ãè¡ããªãå ´å(å±æ§ã®ä¸è¶³ãéå°)ã¯nilãè¿ãã
+	    #
+	    # handler:: Handler : ãã³ãã©
+	    # cell:: Cell : ã»ã«
+		def generate_attr_map(handler, cell)
+			map = {}
+
+			join_list = cell.get_join_list
+
+			ATTRS.each { |known_attr|
+				attr_name = known_attr.name_for_handler(handler)
+				join = join_list.get_item(attr_name.to_sym)
+
+				# ãã®ã»ã«ã¿ã¤ãã«ããã¦å¿
+é ã®å±æ§ã?
+				is_required = @required_attributes.include?(known_attr)
+
+				# å±æ§ã®æå®ãä¸è¶³ãã¦ãã? or éå°?
+				# æ³¨: ãã³ãã©ã¿ã¤ãã®å¤å¥ã«ã¯ãã»ã«ã§å¤ãæå®ããã¦ããã
+				#     ãèæ
+®ããããã»ã«ã¿ã¤ãã§åæå¤ãæå®ããã¦ãã¦ãã
+				#     ããã¯ãã³ãã©ã¿ã¤ãã®æ±ºå®ã«å½±é¿ããªãã
+				return nil if join.nil? != !is_required
+
+				# å¿
+è¦ã®ãªãå±æ§ã§ãããæå®ãããã¦ããªãã®ã§é£ã°ã
+				next if join.nil?
+
+				# TODO: attrã®çµåã§ãããã¨ãæ¤è¨¼
+
+				map[known_attr] = join
+			}
+
+			return map
+		end
+
+	    #=== NotifierPlugin#BaseHandlerType#gen_cfg_handler_type
+	    # ã¿ã¤ã ã¤ãã³ãã®éç¥ã®ç¨®é¡ãè¡¨ãã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®è¨è¿°ãçæããStringã¾ãã¯nilãè¿ã
+	    # handler:: Handler : ãã³ãã©
+		def gen_cfg_handler_type(handler)
+        	raise "called abstract method gen_cfg_handler_type"
+		end
+
+	    #=== NotifierPlugin#BaseHandlerType#gen_cfg_handler_parameters
+	    # ã¿ã¤ã ã¤ãã³ãã®éç¥ã®å¼æ°ãè¡¨ãã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®è¨è¿°ãçæããString[]ãè¿ã
+	    # handler:: Handler : ãã³ãã©
+	    # join:: Join : çµå (declarationãPortã§ãããã®)
+	    # attrMap:: Hash<HandlerAttribute, Join> :
+	    #     åå±æ§ã¨ããã«å¯¾å¿ããJoin (declarationãDeclã®ãã®)
+	    # cell:: Cell : ã»ã«
+		# adpt_gen:: AdapterGenerator : ã¢ããã¿é¢æ°ãçæãããªãã¸ã§ã¯ã
+		def gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen)
+        	return nil
+		end
+
+	    #=== NotifierPlugin#BaseHandlerType#might_fail
+	    # éç¥ã®éãã¨ã©ã¼ãçºçãããã®çµæã¨ã©ã¼éç¥ãå¼ã¶å¿
+è¦ãçãã
+	    # ãã©ãããè¿ãã
+		def might_fail
+			return false
+		end
+
+	end
+	class BaseTaskHandlerType < BaseHandlerType
+		def validate_join(handler, cell, join, *args)
+			return super(handler, cell, join, *args) &&
+				join && join.get_rhs_cell.get_celltype.get_name == :tTask
+		end
+		def gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen)
+			taskCell = join.get_cell
+			id_attr_join = taskCell.get_join_list.get_item(:id)
+			id_attr = join.get_rhs_cell.get_celltype.find(:id)
+			if id_attr_join
+				# ã»ã«çææã«åæåããå ´å
+				id = id_attr_join.get_rhs.to_s
+			else
+				# ã»ã«ã¿ã¤ãã®åæåå¤ãä½¿ãå ´å
+				id = id_attr.get_initializer.to_s
+			end
+
+			# $id$ç­ã®ç½®æ
+			name_array = taskCell.get_celltype.get_name_array(taskCell)
+			id = taskCell.get_celltype.subst_name(id, name_array)
+
+        	return [id]
+		end
+		def might_fail
+			return true
+		end
+	end
+	class ActivateTaskHandlerType < BaseTaskHandlerType
+		def validate_join(handler, cell, join, *args)
+			return super(handler, cell, join, *args) &&
+				join.get_port_name == :eiActivateNotificationHandler
+		end
+		def gen_cfg_handler_type(handler)
+			case handler
+				when EVENT_HANDLER then return "TNFY_ACTTSK"
+				when ERROR_HANDLER then return "TENFY_ACTTSK"
+				else raise "unknown handler #{handler}"
+			end
+		end
+	end
+	class WakeUpTaskHandlerType < BaseTaskHandlerType
+		def validate_join(handler, cell, join, *args)
+			return super(handler, cell, join, *args) &&
+				join.get_port_name == :eiWakeUpNotificationHandler
+		end
+		def gen_cfg_handler_type(handler)
+			case handler
+				when EVENT_HANDLER then return "TNFY_WUPTSK"
+				when ERROR_HANDLER then return "TENFY_WUPTSK"
+				else raise "unknown handler #{handler}"
+			end
+		end
+	end
+	class SetVariableHandlerType < BaseHandlerType
+		def initialize()
+			super
+			@required_attributes = [
+				SETVAR_ADDR_ATTR,
+				SETVAR_VALUE_ATTR
+			] # .to_set
+		end
+		def validate_join(handler, cell, join, *args)
+			return super(handler, cell, join, *args) &&
+				join.nil? &&
+				handler == EVENT_HANDLER
+		end
+		def gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen)
+			var_addr = attrMap[SETVAR_ADDR_ATTR].get_rhs.to_s
+			var_value = attrMap[SETVAR_VALUE_ATTR].get_rhs.to_s
+
+			# $id$ç­ã®ç½®æ
+			name_array = cell.get_celltype.get_name_array(cell)
+			var_addr = cell.get_celltype.subst_name(var_addr, name_array)
+			var_value = cell.get_celltype.subst_name(var_value, name_array)
+
+        	return [var_addr, var_value]
+		end
+		def gen_cfg_handler_type(handler)
+			case handler
+				when EVENT_HANDLER then return "TNFY_SETVAR"
+				else raise "unknown handler #{handler}"
+			end
+		end
+	end
+	class SetVariableToErrorCodeHandlerType < BaseHandlerType
+		def initialize()
+			super
+			@required_attributes = [
+				SETVAR_ADDR_ATTR
+			] # .to_set
+		end
+		def validate_join(handler, cell, join, *args)
+			return super(handler, cell, join, *args) &&
+				join.nil? &&
+				handler == ERROR_HANDLER
+		end
+		def gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen)
+			var_addr = attrMap[SETVAR_ADDR_ATTR].get_rhs.to_s
+
+			# $id$ç­ã®ç½®æ
+			name_array = cell.get_celltype.get_name_array(cell)
+			var_addr = cell.get_celltype.subst_name(var_addr, name_array)
+
+        	return [var_addr]
+		end
+		def gen_cfg_handler_type(handler)
+			case handler
+				when ERROR_HANDLER then return "TENFY_SETVAR"
+				else raise "unknown handler #{handler}"
+			end
+		end
+	end
+	class IncrementVariableHandlerType < BaseHandlerType
+		def initialize()
+			super
+			@required_attributes = [
+				INCVAR_ADDR_ATTR
+			] # .to_set
+		end
+		def validate_join(handler, cell, join, *args)
+			return super(handler, cell, join, *args) &&
+				join.nil?
+		end
+		def gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen)
+			var_addr = attrMap[INCVAR_ADDR_ATTR].get_rhs.to_s
+
+			# $id$ç­ã®ç½®æ
+			name_array = cell.get_celltype.get_name_array(cell)
+			var_addr = cell.get_celltype.subst_name(var_addr, name_array)
+
+        	return [var_addr]
+		end
+		def gen_cfg_handler_type(handler)
+			case handler
+				when EVENT_HANDLER then return "TNFY_INCVAR"
+				when ERROR_HANDLER then return "TENFY_INCVAR"
+				else raise "unknown handler #{handler}"
+			end
+		end
+	end
+	class SignalSemaphoreHandlerType < BaseHandlerType
+		def validate_join(handler, cell, join, *args)
+			return super(handler, cell, join, *args) &&
+				join && join.get_rhs_cell.get_celltype.get_name == :tSemaphore
+		end
+		def gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen)
+			semaphoreCell = join.get_cell
+			id_attr_join = semaphoreCell.get_join_list.get_item(:id)
+			id_attr = join.get_rhs_cell.get_celltype.find(:id)
+			if id_attr_join
+				# ã»ã«çææã«åæåããå ´å
+				id = id_attr_join.get_rhs.to_s
+			else
+				# ã»ã«ã¿ã¤ãã®åæåå¤ãä½¿ãå ´å
+				id = id_attr.get_initializer.to_s
+			end
+
+			# $id$ç­ã®ç½®æ
+			name_array = semaphoreCell.get_celltype.get_name_array(semaphoreCell)
+			id = semaphoreCell.get_celltype.subst_name(id, name_array)
+
+        	return [id]
+		end
+		def might_fail
+			return true
+		end
+		def gen_cfg_handler_type(handler)
+			case handler
+				when EVENT_HANDLER then return "TNFY_SIGSEM"
+				when ERROR_HANDLER then return "TENFY_SIGSEM"
+				else raise "unknown handler #{handler}"
+			end
+		end
+	end
+	class SetEventflagHandlerType < BaseHandlerType
+		def initialize()
+			super
+			@required_attributes = [
+				SETFLG_FLAG_ATTR
+			] # .to_set
+		end
+		def validate_join(handler, cell, join, *args)
+			return super(handler, cell, join, *args) &&
+				join && join.get_rhs_cell.get_celltype.get_name == :tEventflag
+		end
+		def gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen)
+			eventflagCell = join.get_cell
+			id_attr_join = eventflagCell.get_join_list.get_item(:id)
+			id_attr = join.get_rhs_cell.get_celltype.find(:id)
+			if id_attr_join
+				# ã»ã«çææã«åæåããå ´å
+				id = id_attr_join.get_rhs.to_s
+			else
+				# ã»ã«ã¿ã¤ãã®åæåå¤ãä½¿ãå ´å
+				id = id_attr.get_initializer.to_s
+			end
+			flg_pattern = attrMap[SETFLG_FLAG_ATTR].get_rhs.to_s
+
+			# $id$ç­ã®ç½®æ
+			name_array = eventflagCell.get_celltype.get_name_array(eventflagCell)
+			id = eventflagCell.get_celltype.subst_name(id, name_array)
+
+			name_array = cell.get_celltype.get_name_array(cell)
+			flg_pattern = cell.get_celltype.subst_name(flg_pattern, name_array)
+
+        	return [id, flg_pattern]
+		end
+		def might_fail
+			return true
+		end
+		def gen_cfg_handler_type(handler)
+			case handler
+				when EVENT_HANDLER then return "TNFY_SETFLG"
+				when ERROR_HANDLER then return "TENFY_SETFLG"
+				else raise "unknown handler #{handler}"
+			end
+		end
+	end
+	class DataqueueHandlerType < BaseHandlerType
+		def initialize()
+			super
+		end
+		def validate_join(handler, cell, join, *args)
+			return super(handler, cell, join, *args) &&
+				join && join.get_rhs_cell.get_celltype.get_name == :tDataqueue
+		end
+		def gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen)
+			dataqueueCell = join.get_cell
+			id_attr_join = dataqueueCell.get_join_list.get_item(:id)
+			id_attr = join.get_rhs_cell.get_celltype.find(:id)
+			if id_attr_join
+				# ã»ã«çææã«åæåããå ´å
+				id = id_attr_join.get_rhs.to_s
+			else
+				# ã»ã«ã¿ã¤ãã®åæåå¤ãä½¿ãå ´å
+				id = id_attr.get_initializer.to_s
+			end
+
+			# $id$ç­ã®ç½®æ
+			name_array = dataqueueCell.get_celltype.get_name_array(dataqueueCell)
+			id = dataqueueCell.get_celltype.subst_name(id, name_array)
+
+			name_array = cell.get_celltype.get_name_array(cell)
+
+        	return [id]
+		end
+		def might_fail
+			return true
+		end
+	end
+	class SendToDataqueueHandlerType < DataqueueHandlerType
+		def initialize()
+			super
+			@required_attributes = [
+				SNDDTQ_VALUE_ATTR
+			] # .to_set
+		end
+		def validate_join(handler, cell, join, *args)
+			return super(handler, cell, join, *args) && handler == EVENT_HANDLER
+		end
+		def gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen)
+			params = super(handler, join, attrMap, cell, adpt_gen)
+
+			sent_value = attrMap[SNDDTQ_VALUE_ATTR].get_rhs.to_s
+
+			# $id$ç­ã®ç½®æ
+			name_array = cell.get_celltype.get_name_array(cell)
+			sent_value = cell.get_celltype.subst_name(sent_value, name_array)
+
+			params << sent_value
+
+        	return params
+		end
+		def gen_cfg_handler_type(handler)
+			case handler
+				when EVENT_HANDLER then return "TNFY_SNDDTQ"
+				else raise "unknown handler #{handler}"
+			end
+		end
+	end
+	class SendErrorCodeToDataqueueHandlerType < DataqueueHandlerType
+		def initialize()
+			super
+		end
+		def validate_join(handler, cell, join, *args)
+			return super(handler, cell, join, *args) && handler == ERROR_HANDLER
+		end
+		def gen_cfg_handler_type(handler)
+			case handler
+				when ERROR_HANDLER then return "TENFY_SNDDTQ"
+				else raise "unknown handler #{handler}"
+			end
+		end
+	end
+	class UserHandlerType < BaseHandlerType
+		def validate_join(handler, cell, join, *args)
+			return super(handler, cell, join, *args) &&
+				handler != ERROR_HANDLER && # invalid for error handler
+				join && join.get_rhs_cell.get_celltype.get_name == :tTimeEventHandler
+		end
+		def gen_cfg_handler_type(handler)
+			case handler
+				when EVENT_HANDLER then return "TNFY_HANDLER"
+				else raise "unknown handler #{handler}"
+			end
+		end
+		def gen_cfg_handler_parameters(handler, join, attrMap, cell, adpt_gen)
+			# tTimeEventHandlerã®çµåå
+ãåå¾
+			handler_cell = join.get_rhs_cell
+	    	call_join = handler_cell.get_join_list.get_item(:ciHandlerBody)
+
+			# çµåããã¦ããªãå ´åã¯tecsgenãã¨ã©ã¼ãåºãã¯ããªã®ã§ããã§ã¯
+			# ã¨ã©ã¼ã«ããç¡è¦ããï¼
+			return [] unless call_join
+
+			# ã¢ããã¿é¢æ°ãã³ãã«ãåå¾
+			adapter_handle = adpt_gen.make_adapter_handle(call_join)
+        	return [adapter_handle[1], adapter_handle[0]]
+		end
+	end
+	class NullHandlerType < BaseHandlerType
+		def validate_join(handler, cell, join, *args)
+			return super(handler, cell, join, *args) &&
+				join.nil? &&
+				handler != EVENT_HANDLER # handler is mandatory for normal handler!
+		end
+		def gen_cfg_handler_type(handler)
+			case handler
+				when ERROR_HANDLER then return nil
+				else raise "unknown handler #{handler}"
+			end
+		end
+	end
+
+	HANDLER_TYPES = [
+		ActivateTaskHandlerType.new,
+		WakeUpTaskHandlerType.new,
+		SetVariableHandlerType.new,
+		SetVariableToErrorCodeHandlerType.new,
+		IncrementVariableHandlerType.new,
+		SignalSemaphoreHandlerType.new,
+		SetEventflagHandlerType.new,
+		SendToDataqueueHandlerType.new,
+		SendErrorCodeToDataqueueHandlerType.new,
+		UserHandlerType.new,
+		NullHandlerType.new
+	]
+
+    #@celltype:: Celltype
+    #@option:: String     :ãªãã·ã§ã³æå­å
+    def initialize( celltype, option )
+    	super
+    	@plugin_arg_check_proc_tab = NotifierPluginArgProc
+    	@plugin_arg_str = option
+    	@plugin_arg_str = option.gsub( /\A"(.*)/, '\1' )    # åå¾ã® "" ãåãé¤ã
+    	@plugin_arg_str.sub!( /(.*)"\z/, '\1' )
+    	@factory = nil
+    	@output_file = nil
+    	parse_plugin_arg
+    	unless @factory
+    		cdl_error("ASP1003 celltype $1: option factory is not specified",
+    			celltype.get_name)
+    	end
+    	unless @output_file
+    		cdl_error("ASP1003 celltype $1: option output_file is not specified",
+    			celltype.get_name)
+    	end
+    end
+
+    def set_factory(template_string)
+    	unless @factory.nil?
+    		cdl_error("ASP1003 celltype $1: option factory was specified more than once",
+    			celltype.get_name)
+    	end
+    	@factory = template_string
+    end
+
+    def set_factory_output_file(output_file)
+    	unless @output_file.nil?
+    		cdl_error("ASP1003 celltype $1: option output_file was specified more than once",
+    			celltype.get_name)
+    	end
+    	@output_file = output_file
+    end
+
+    def gen_factory file
+        puts "===== begin #{@celltype.get_name.to_s} plugin ====="
+
+        kernelCfg = AppFile.open( "#{$gen}/#{@output_file}" )
+        kernelCfg.print "\n/* Generated by #{self.class.name} */\n"
+        kernelCfg.print "\#include \"tTimeEventHandler.h\"\n"
+
+		# ã¢ããã¿é¢æ°ãçæããæºå
+		@adpt_gen = AdapterGenerator.new("tTimeEventHandler", @celltype.get_global_name)
+
+    	# å±æ§ç½®æãè¡ãããã¨ãæ¤è¨¼ããã
+    	# ããã§è¡ãã®ã¯ãfactoryã§æå®ãããå±æ§åã
+    	# å­å¨ãããã¨ãç¢ºèªããããªããã°ã¨ã©ã¼ãåºåãããã¨ã®ã¿ã§ããã
+    	# ã»ã«ãã¨ã®å¦çã®æä¸­ã«ã¨ã©ã¼ãåºåãããã¨ãå¯è½ã§ã¯ãããã
+    	# ããããã¨ã»ã«ã¿ã¤ãå´ã®åé¡ã§ããã®ã«ãããããããã»ã«ãã¨ã«
+    	# ã¨ã©ã¼ãè¡¨ç¤ºããã¦ãã¾ãã
+    	# {{attribute_name}} -> attribute_value
+    	@factory.scan(/\{\{([a-zA-Z0-9_]*?)\}\}/) { |match|
+    		name = $1.to_sym
+
+    		# {{_handler_params_}} ã¯ãã³ãã©ã«é¢ããæå®ããã©ã°ã¤ã³å
+ã§å¤ãçæããã
+    		next if name == :_handler_params_
+
+			subst_attr = @celltype.find(name)
+			unless subst_attr
+	    		cdl_error( "ASP1007 celltype $1: additional_param: attribute $2 does not exist.",
+	    			@celltype.get_name, name)
+			end
+		}
+
+        @celltype.get_cell_list.each { |cell|
+        	gen_factory_for_cell kernelCfg, cell
+        }
+
+		# ã¢ããã¿é¢æ°ã®çæãå®äºããã
+		@adpt_gen.finish
+
+        kernelCfg.close
+        puts "===== end #{@celltype.get_name.to_s} plugin ====="
+    end
+
+    def gen_factory_for_cell(kernelCfg, cell)
+    	handler_flags = []
+    	handler_args = []
+
+    	event_handler_might_fail = true
+    	handler_flag = nil
+
+		# ignoreErrorsãåå¾
+		ignoreErrors_attr_join = cell.get_join_list.get_item(:ignoreErrors)
+		ignoreErrors_attr = cell.get_celltype.find(:ignoreErrors)
+		if ignoreErrors_attr_join
+			# ã»ã«çææã«åæåããå ´å
+			ignoreErrors = ignoreErrors_attr_join.get_rhs.to_s
+		else
+			# ã»ã«ã¿ã¤ãã®åæåå¤ãä½¿ãå ´å
+			ignoreErrors = ignoreErrors_attr.get_initializer.to_s
+		end
+		case ignoreErrors
+			when 'true' then ignoreErrors = true
+			when 'false' then ignoreErrors = false
+			else
+				cdl_warning( "ASP1005 cell $1: unrecognized value '$2' specified for ignoreErrors",
+					cell.get_name, ignoreErrors )
+				ignoreErrors = false
+		end
+
+    	[EVENT_HANDLER, ERROR_HANDLER].each { |handler|
+    		# å¼ã³å£ã®çµåãåå¾
+    		call_join = cell.get_join_list.get_item(handler.call_port_name.to_sym)
+
+	    	# ãã³ãã©ã¿ã¤ããå¤å¥ãã
+	    	matches = HANDLER_TYPES.select { |handler_type|
+	    		handler_type.validate_join(handler, cell, call_join)
+	    	}
+
+	    	if matches.length == 0
+	    		cdl_error( "ASP1001 cell $1: no matching handler type found for $2", cell.get_name, handler.call_port_name )
+	    		next
+	    	end
+
+			# æåã«è¦ã¤ãã£ãæå¹ãªãã³ãã©ã¿ã¤ããä½¿ç¨
+	    	ht = matches[0]
+
+			# éç¥ãã³ãã©ã§ãã¨ã©ã¼ãçºçããã¯ãããªããã®ã«ãã¨ã©ã¼ãã³ãã©ãæå®ããã¦ããã
+			# ãããã¯ãã®éã®ãã¿ã¼ã³ãæ¤åºããã
+			# (handler_flagãnilã§ããå ´åããã³ãã©ã¿ã¤ããä¸æã§ãããã¨ã©ã¼ãçºçãããä¸æ
+			#  ãªãããæ¤åºã¯è¡ããªãã)
+    		if handler == ERROR_HANDLER && !ht.is_a?(NullHandlerType) && !event_handler_might_fail
+	    		cdl_error( "ASP1004 cell $1: handler type $2 which never raises an error was inferred for the normal notification handler, but an error notification handler was specified.",
+	    			cell.get_name, handler_flag)
+    		end
+    		if handler == ERROR_HANDLER && ht.is_a?(NullHandlerType) && event_handler_might_fail && !ignoreErrors
+	    		cdl_warning( "ASP1006 cell $1: handler type $2 which might raise an error was inferred for the normal notificaton handler, but an error notification handler was not specified.",
+	    			cell.get_name, handler_flag)
+    		end
+
+			# assertion
+	    	unless ht.validate_join(handler, cell, call_join)
+	    		raise "!validate_join"
+	    	end
+
+			# éç¥æ¹æ³ã®éçAPIè¨è¿°ãçæãã
+	    	handler_flag = ht.gen_cfg_handler_type(handler)
+	    	handler_flags << handler_flag if handler_flag
+
+	    	attr_map = ht.generate_attr_map(handler, cell)
+
+	    	handler_arg = ht.gen_cfg_handler_parameters(handler, call_join, attr_map, cell, @adpt_gen)
+	    	handler_args += handler_arg if handler_arg
+
+	    	if handler == EVENT_HANDLER
+	    		event_handler_might_fail = ht.might_fail
+	    	end
+    	}
+
+		# $id$ç­ã®ç½®æ
+		name_array = cell.get_celltype.get_name_array(cell)
+		handler_args.collect! { |e|
+			if e == "$cbp$"
+				cell.get_celltype.subst_name(e, name_array)
+			else
+				e
+			end
+		}
+
+    	# tecsgen.cfgã®è¨è¿°ãçæããã
+    	# factoryã«å¯¾ãããã©ã¡ã¼ã¿ç½®æãè¡ãã
+    	# {{attribute_name}} -> attribute_value
+    	text = @factory.gsub(/\{\{([a-zA-Z0-9_]*?)\}\}/) { |match|
+    		name = $1.to_sym
+			subst_attr = cell.get_celltype.find(name)
+
+			# {{_handler_params_}} ã¯ãã³ãã©ã®æå®ã«ç½®æããã
+			if name == :_handler_params_
+		    	args_joined = handler_flags.join(' | ')
+		    	if handler_args.length > 0
+			    	args_joined << ", "
+			    	args_joined << handler_args.join(', ')
+			    end
+			    next args_joined
+			end
+
+			unless subst_attr
+				# å±æ§ãè¦ã¤ãããªãã¨ããã¨ã©ã¼ã¯ãã§ã«å ±åããã¦ããã®ã§
+				# ããã§ã¯ããã¼å¤ãè¿ãã¦ããã ãã§ããã
+				next ""
+			end
+
+			subst_attr_join = cell.get_join_list.get_item(name)
+			if subst_attr_join
+				# ã»ã«çææã«åæåããå ´å
+				subst = subst_attr_join.get_rhs.to_s
+			else
+				# ã»ã«ã¿ã¤ãã®åæåå¤ãä½¿ãå ´å
+				subst = subst_attr.get_initializer.to_s
+			end
+
+			# $id$ç­ã®ç½®æ
+			cell.get_celltype.subst_name(subst, name_array)
+    	}
+
+    	# åºå
+    	kernelCfg.puts text
+
+    end
+    private :gen_factory_for_cell
+
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/OpaqueMarshalerPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/OpaqueMarshalerPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/OpaqueMarshalerPlugin.rb	(revision 270)
@@ -0,0 +1,100 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: OpaqueMarshalerPlugin.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+#== OpaqueMarshaler
+# OpaqueRPC ç¨ã®ãã¼ã·ã£ã©ãã¢ã³ãã¼ã·ã£ã©ã»ã«ã¿ã¤ããçæããã·ã°ããã£ãã©ã°ã¤ã³
+
+require_tecsgen_lib "lib/GenOpaqueMarshaler.rb"
+require_tecsgen_lib "lib/GenParamCopy.rb"
+
+class OpaqueMarshalerPlugin < SignaturePlugin
+
+  OpaqueMarshalerPluginArgProc = { }
+
+  include GenOpaqueMarshaler
+  include GenParamCopy
+
+  def initialize( signature, option )
+    super
+    @b_noClientSemaphore = false
+    @noServerChannelOpenerCode = true
+    initialize_opaque_marshaler
+
+    @plugin_arg_check_proc_tab = OpaqueMarshalerPluginArgProc
+    parse_plugin_arg
+    # check_PPAllocator
+    if @signature.need_PPAllocator?(true) then
+      @PPAllocatorSize = 1    # PPAllocatorã®å¿
+è¦æ§æã®ããã«è¨­å® (ãµã¤ãºã¯ä½¿ãããªã)
+      necessity = "Necessary"
+    else
+      necessity = "Unnecessary"
+    end
+
+    print "OpaqueMarshalerPlugin: signature=#{signature.get_namespace_path}, PPAllocator=#{necessity}\n"
+  end
+
+  def gen_cdl_file file
+    gen_marshaler_celltype
+    file.print <<EOT
+import( "#{@marshaler_celltype_file_name}" );
+EOT
+  end
+
+  def subst_name( val )
+    return :"_"
+    # return nil
+  end
+
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/OpaqueRPCPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/OpaqueRPCPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/OpaqueRPCPlugin.rb	(revision 270)
@@ -0,0 +1,347 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: OpaqueRPCPlugin.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+# ä»¥ä¸ãä»®å®ï¼å¶éäºé 
+ï¼
+#  å¼ã³å
+ãå¼ã³å
+ã®ã¨ã³ãã£ã¢ã³ãchar, short, int_t, long_t, intptr_t ã®ãµã¤ãºãåã
+#  æç¬¦å·ãç¡ç¬¦å·ã§ãµã¤ãºãåã
+
+require_tecsgen_lib "lib/GenOpaqueMarshaler.rb"
+require_tecsgen_lib "lib/GenParamCopy.rb"
+
+class OpaqueRPCPlugin < ThroughPlugin
+
+  include GenOpaqueMarshaler
+  include GenParamCopy
+
+  # OpaqueRPCPlugin å°ç¨ã®ãªãã·ã§ã³
+  OpaqueRPCPluginArgProc = RPCPluginArgProc.dup  # è¤è£½ãä½ã£ã¦å
+ãå¤æ´ããªãããã«ãã
+  OpaqueRPCPluginArgProc[ "noClientSemaphore"  ] = Proc.new { |obj,rhs| obj.set_noClientSemaphore rhs }
+
+  #=== RPCPlugin ã® initialize
+  #  èª¬æã¯ ThroughPlugin (plugin.rb) ãåç
+§
+  def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell )
+    super
+    @b_noClientSemaphore = false
+    initialize_opaque_marshaler
+
+    @plugin_arg_check_proc_tab = OpaqueRPCPluginArgProc
+    parse_plugin_arg
+    check_opener_code
+    check_PPAllocator
+
+    print "OpaqueRPCPlugin: #{@clientChannelCell}\n"
+
+    @rpc_server_channel_celltype_name = "tOpaqueRPCPlugin_#{@TDRCelltype}_#{@serverChannelCelltype}_#{@signature.get_global_name}"
+    @rpc_server_channel_celltype_file_name = "#{$gen}/#{@rpc_server_channel_celltype_name}.cdl"
+    @rpc_client_channel_celltype_name = "tOpaqueRPCPlugin_#{@TDRCelltype}_#{@clientChannelCelltype}_#{@signature.get_global_name}"
+    @rpc_client_channel_celltype_file_name = "#{$gen}/#{@rpc_client_channel_celltype_name}.cdl"
+  end
+
+  def gen_plugin_decl_code( file )
+
+    gen_marshaler_celltype
+
+    # ãã£ã³ãã« composite ã»ã«ã¿ã¤ãã®çæ
+    #  ããã§çæããã CDL ãã¡ã¤ã«ã¯ãtecsgen ãç´æ¥ import ããã®ã§ã¯ãªã
+    #  ã»ã«ã³ã¼ãã® CDL ãã import ããã
+
+    f = CFile.open( @rpc_client_channel_celltype_file_name, "w" )
+    # åãå
+å®¹ãäºåº¦æ¸ãå¯è½æ§ãã (AppFile ã¯ä¸å¯)
+
+    f.print <<EOT
+import( "#{@marshaler_celltype_file_name}" );
+
+/* RPC Client side composite celltype */
+composite #{@rpc_client_channel_celltype_name} {
+  /* marshaler entry port */
+  entry #{@signature.get_namespace_path} eThroughEntry;
+  call  sChannel cChannel;
+  [optional]
+    call sRPCErrorHandler cErrorHandler;
+  [optional]
+    call sSemaphore cLockChannel;
+
+  cell #{@TDRCelltype} TDR {
+    cChannel => composite.cChannel;
+  };
+  cell #{@marshaler_celltype_name} Marshaler{
+    cTDR = TDR.eTDR;
+    cErrorHandler => composite.cErrorHandler;
+    cLockChannel  => composite.cLockChannel;
+  };
+
+  composite.eThroughEntry => Marshaler.eClientEntry;
+};
+EOT
+    f.close
+
+    if @PPAllocatorSize then
+      alloc_cell = "  cell tPPAllocator PPAllocator {\n    heapSize = #{@PPAllocatorSize};\n  };\n"
+      alloc_call_port_join = "    cPPAllocator = PPAllocator.ePPAllocator;\n"
+    else
+      alloc_cell = ""
+      alloc_call_port_join = ""
+    end
+
+    f = CFile.open( @rpc_server_channel_celltype_file_name, "w" )
+    # åãå
+å®¹ãäºåº¦æ¸ãå¯è½æ§ãã (AppFile ã¯ä¸å¯)
+
+    f.print <<EOT
+import( "#{@marshaler_celltype_file_name}" );
+
+/* RPC Server side composite celltype */
+composite #{@rpc_server_channel_celltype_name} {
+  /* Interface */
+  call  #{@signature.get_namespace_path} #{@call_port_name};
+  call  sChannel   cChannel;
+  [optional]
+    call sRPCErrorHandler cErrorHandler;
+  entry sUnmarshalerMain  eService;
+
+  /* Implementation */
+  cell #{@TDRCelltype} TDR {
+    cChannel => composite.cChannel;
+  };
+#{alloc_cell}  cell #{@unmarshaler_celltype_name} Unmarshaler{
+    cTDR        = TDR.eTDR;
+    cErrorHandler => composite.cErrorHandler;
+    cServerCall => composite.#{@call_port_name};
+#{alloc_call_port_join}  };
+  composite.eService => Unmarshaler.eService;
+};
+EOT
+
+    f.close
+  end
+
+  #===  through cell ã³ã¼ããçæ
+  #
+  #
+  def gen_through_cell_code( file )
+
+    gen_plugin_decl_code( file )
+
+    # ã»ã«ãæ¢ã
+    # path =["::",@next_cell.get_name]  # mikan namespace
+    # cell = Namespace.find( path )
+    cell = Namespace.find( @next_cell.get_namespace_path )
+
+    file.print <<EOT
+import( "#{@rpc_client_channel_celltype_file_name}" );
+import( "#{@rpc_server_channel_celltype_file_name}" );
+
+EOT
+
+    ##### ã¯ã©ã¤ã¢ã³ãå´ã®ã»ã«ã®çæ #####
+    nest = @start_region.gen_region_str_pre file
+    nest_str = "  " * nest
+
+    # ã»ããã©ã®çæ
+    if @b_noClientSemaphore == false then
+      file.print <<EOT
+
+#{nest_str}  //  Semaphore for Multi-task use ("specify noClientSemaphore" option to delete this)
+#{nest_str}  cell #{@semaphoreCelltype} #{@serverChannelCell}_Semaphore{
+#{nest_str}    #{@semaphoreInitializer}
+#{nest_str}  };
+EOT
+    end
+
+    # ã¯ã©ã¤ã¢ã³ãå´ãã£ã³ãã« (TINET, Socket ãªã©)ã®çæ
+    file.print <<EOT
+#{nest_str}  //  Client Side Channel
+#{nest_str}  cell #{@clientChannelCelltype} #{@clientChannelCell}{
+#{nest_str}    #{@clientChannelInitializer}
+#{nest_str}  };
+
+#{nest_str}  //  Marshaler
+EOT
+
+    # ã»ããã©ã®çµåæ
+    if @b_noClientSemaphore == false then
+      semaphore = "#{nest_str}    cLockChannel = #{@serverChannelCell}_Semaphore.eSemaphore;\n"
+    else
+      semaphore = ""
+    end
+
+    ### ã¯ã©ã¤ã¢ã³ãå´ãã£ã³ãã« (ãã¼ã·ã£ã©+TDR)ã®çæ ###
+    # ã¢ã­ã±ã¼ã¿ã®æå®ããããï¼
+    if cell.get_allocator_list.length > 0 then
+
+      file.print nest_str
+      file.print "[allocator("
+
+      delim = ""
+      cell.get_allocator_list.each do |type, eport, subsc, func, buf, alloc|
+
+        alloc_str = alloc.to_s
+        subst = @substituteAllocator[alloc_str.to_sym]
+        if subst then
+          alloc_str = subst[2]+"."+subst[3]
+        end
+
+        file.print delim
+        delim = ",\n"        # æçµè¡ã«ã¯åºããªã
+
+        if subsc then        # é
+åæ·»æ°
+          subsc_str = '[#{subsc}]'
+        else
+          subsc_str = ""
+        end
+
+        eport = "eThroughEntry" #RPCã®åãå£åã«å¤æ´
+        file.print nest_str
+        file.print  "#{eport}#{subsc_str}.#{func}.#{buf} = #{alloc_str}"
+      end
+
+      file.puts ")]"
+    end
+
+    if @clientErrorHandler then
+      clientErrorHandler_str = "#{nest_str}    cErrorHandler = #{@clientErrorHandler};\n"
+    else
+      clientErrorHandler_str = ""
+    end
+
+    file.print <<EOT
+#{nest_str}  cell #{@rpc_client_channel_celltype_name} #{@cell_name} {
+#{nest_str}    cChannel = #{@clientChannelCell}.eC0;
+#{clientErrorHandler_str}#{semaphore}#{nest_str}  };
+
+EOT
+    ### END: ã¯ã©ã¤ã¢ã³ãå´ãã£ã³ãã« (ãã¼ã·ã£ã©+TDR)ã®çæ ###
+
+    @start_region.gen_region_str_post file
+    file.print "\n\n"
+
+    ##### ãµã¼ãã¼å´ã®ã»ã«ã®çæ #####
+    nest = @end_region.gen_region_str_pre file
+    nest_str = "  " * nest
+
+    if @serverErrorHandler then
+      serverErrorHandler_str = "#{nest_str}    cErrorHandler = #{@serverErrorHandler};\n"
+    else
+      serverErrorHandler_str = ""
+    end
+
+    if @b_genOpener then
+      opener = "#{nest_str}    cOpener       = #{@serverChannelCell}.eOpener;\n"
+    else
+      opener = ""
+    end
+
+    # ãµã¼ãã¼å´ãã£ã³ãã« (TINET, Socket ãªã©)
+    file.print <<EOT
+
+#{nest_str}  //  Server Side Channel
+#{nest_str}  cell #{@serverChannelCelltype} #{@serverChannelCell}{
+#{nest_str}    #{@serverChannelInitializer}
+#{nest_str}  };
+EOT
+
+    # ãµã¼ãã¼å´ãã£ã³ãã« (ã¢ã³ãã¼ã·ã£ã©+TDR)
+    file.print <<EOT
+
+#{nest_str}  //  Unmarshaler
+#{nest_str}  cell #{@rpc_server_channel_celltype_name} #{@serverChannelCell}_Unmarshaler {
+#{nest_str}    cChannel = #{@serverChannelCell}.eC1;
+#{nest_str}    #{@call_port_name} = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name};
+#{serverErrorHandler_str}#{nest_str}  };
+EOT
+
+    # ãµã¼ãã¼å´ã¿ã¹ã¯ã¡ã¤ã³
+    file.print <<EOT
+
+#{nest_str}  //  Unmarshaler Task Main
+#{nest_str}  cell #{@taskMainCelltype} #{@serverChannelCell}_TaskMain {
+#{nest_str}    cMain         = #{@serverChannelCell}_Unmarshaler.eService;
+#{opener}#{nest_str}  };
+EOT
+
+    # ãµã¼ãã¼å´ã¿ã¹ã¯
+    file.print <<EOT
+
+#{nest_str}  //  Unmarshaler Task
+#{nest_str}  cell #{@taskCelltype} #{@serverChannelCell}_Task {
+#{nest_str}    cBody         = #{@serverChannelCell}_TaskMain.eMain;
+#{nest_str}    priority      = #{@taskPriority};
+#{nest_str}    stackSize     = #{@stackSize};
+#{nest_str}    taskAttribute = C_EXP( "TA_ACT" );  /* mikan : marshaler task starts at beginning */
+#{nest_str}  };
+EOT
+    @end_region.gen_region_str_post file
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° noClientSemaphore ã®ãã§ãã¯
+  def set_noClientSemaphore rhs
+    rhs = rhs.to_sym
+    if rhs == :true then
+      @b_noClientSemaphore = true
+    elsif rhs == :false then
+      @b_noClientSemaphore = false
+    else
+      cdl_error( "RPCPlugin: specify true or false for noClientSemaphore" )
+    end
+  end
+end
+
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/RPCPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/RPCPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/RPCPlugin.rb	(revision 270)
@@ -0,0 +1,295 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: RPCPlugin.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+require_tecsgen_lib "lib/GenTransparentMarshaler.rb"
+require_tecsgen_lib "lib/GenParamCopy.rb"
+
+#= Transparent RPC ãã©ã°ã¤ã³
+# Transparent RPC ãã£ã³ãã«ãçæãã
+# ãã©ã°ã¤ã³å¼æ°ã¯ä»¥ä¸ã® RPCPluginArgProc ãåç
+§
+
+# mikan through plugin: namespace ãèæ
+®ããã¦ããªã
+# ãããå©ç¨ããå ´åãä»¥ä¸ã®ããã« toppers_jsp.cdl sChannel.cdl ãæå®ããå¿
+è¦ããã
+# tecsgen toppers_jsp.cdl sChannel.cdl your_description.cdl
+
+# ä»¥ä¸ãä»®å®ï¼å¶éäºé 
+ï¼
+#  å¼ã³å
+ãå¼ã³å
+ã®ã¨ã³ãã£ã¢ã³ãchar, short, int_t, long_t, intptr_t ã®ãµã¤ãºãåã
+#  æç¬¦å·ãç¡ç¬¦å·ã§ãµã¤ãºãåã
+
+class RPCPlugin < ThroughPlugin
+
+  include GenTransparentMarshaler
+  include GenParamCopy
+
+  # RPCPlugin å°ç¨ã®ãªãã·ã§ã³
+  TransparentRPCPluginArgProc = RPCPluginArgProc.dup  # è¤è£½ãä½ã£ã¦å
+ãå¤æ´ããªãããã«ãã
+  TransparentRPCPluginArgProc[ "noClientSemaphore"  ] = Proc.new { |obj,rhs| obj.set_noClientSemaphore rhs }
+  TransparentRPCPluginArgProc[ "semaphoreCelltype"  ] = Proc.new { |obj,rhs| obj.set_semaphoreCelltype rhs }
+
+  #=== RPCPlugin ã® initialize
+  #  èª¬æã¯ ThroughPlugin (plugin.rb) ãåç
+§
+  def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell )
+    super
+    @b_noClientSemaphore = false
+    @semaphoreCelltype = "tSemaphore"
+    initialize_transparent_marshaler cell_name
+
+    # ãªãã·ã§ã³ï¼GenTransparentMarshaler åç
+§
+    @plugin_arg_check_proc_tab = TransparentRPCPluginArgProc
+    parse_plugin_arg
+
+    @rpc_channel_celltype_name = "tRPCPlugin_#{@TDRCelltype}_#{@channelCelltype}_#{@signature.get_global_name}"
+    @rpc_channel_celltype_file_name = "#{$gen}/#{@rpc_channel_celltype_name}.cdl"
+
+    if @signature.need_PPAllocator? then
+      if @PPAllocatorSize == nil then
+        cdl_error( "PPAllocatorSize must be speicified for oneway [in] array" )
+        # @PPAllocatorSize = 0   # ä»®ã« 0 ã¨ãã¦ãã (cdl ã®æ§æã¨ã©ã¼ãé¿ãããã)
+      end
+    end
+
+#    @signature.each_param{ |func_decl, param_decl|
+#      if func_decl.get_type.is_oneway? then
+#        if ( param_decl.get_size || param_decl.get_count ) && param_decl.get_string then
+#          cdl_error( "array of string not supported for oneway function in Transparent RPC" )  # mikan æå­åã®é
+å
+#        elsif param_decl.get_string == -1 then
+#          cdl_error( "length unspecified string is not permited for oneway function in Transparent RPC" )  # mikan é·ãæªæå®æå­å
+#        end
+#      end
+#    }
+  end
+
+  #=== plugin ã®å®£è¨ã³ã¼ã (celltype ã®å®ç¾©) çæ
+  def gen_plugin_decl_code( file )
+
+    ct_name = "#{@ct_name}_#{@channelCelltype}"
+
+    # ãã®ã»ã«ã¿ã¤ãï¼åãã·ã°ããã£ï¼ã¯æ¢ã«çæããã¦ãããï¼
+    if @@generated_celltype[ ct_name ] == nil then
+      @@generated_celltype[ ct_name ] = [ self ]
+    else
+      @@generated_celltype[ ct_name ] << self
+      return
+    end
+
+    gen_marshaler_celltype
+
+    if @PPAllocatorSize then
+      alloc_cell = "  cell tPPAllocator PPAllocator {\n    heapSize = #{@PPAllocatorSize};\n  };\n"
+      alloc_call_port_join = "    cPPAllocator = PPAllocator.ePPAllocator;\n"
+    else
+      alloc_cell = ""
+      alloc_call_port_join = ""
+    end
+
+    if @b_noClientSemaphore == false then
+      semaphore1 = <<EOT
+  // Semaphore for Multi-task use ("specify noClientSemaphore" option to delete this)
+  cell #{@semaphoreCelltype} Semaphore {
+    count = 1;
+    attribute = C_EXP( "TA_NULL" );
+  };
+EOT
+      semaphore2 = "    cLockChannel = Semaphore.eSemaphore;\n"
+    else
+      semaphore1 = ""
+      semaphore2 = ""
+    end
+
+    f = CFile.open( @rpc_channel_celltype_file_name, "w" )
+    # åãå
+å®¹ãäºåº¦æ¸ãå¯è½æ§ãã (AppFile ã¯ä¸å¯)
+
+    f.print <<EOT
+import( "#{@marshaler_celltype_file_name}" );
+
+[active]
+composite #{@rpc_channel_celltype_name} {
+  /* Interface */
+  attr {
+    PRI taskPriority;
+  };
+  call #{@signature.get_namespace_path} #{@call_port_name};
+  entry #{@signature.get_namespace_path} eThroughEntry;
+  call sTDR       cTDR;
+  call sEventflag cEventflag;
+
+  /* Implementation */
+#{semaphore1}
+  cell #{@marshaler_celltype_name} #{@signature.get_global_name}_marshaler{
+    cTDR         => composite.cTDR;
+    cEventflag   => composite.cEventflag;
+#{semaphore2}  };
+#{alloc_cell}  cell #{@unmarshaler_celltype_name} #{@signature.get_global_name}_unmarshaler{
+    cTDR        => composite.cTDR;
+    cEventflag  => composite.cEventflag;
+    cServerCall => composite.#{@call_port_name};
+#{alloc_call_port_join}  };
+  cell tRPCDedicatedTaskMain RPCTaskMain{
+    cMain = #{@signature.get_global_name}_unmarshaler.eUnmarshalAndCallFunction;
+  };
+  cell tTask Task {
+    cBody     = RPCTaskMain.eMain;
+    priority  = taskPriority;
+    taskAttribute = C_EXP( "TA_ACT" );  /* mikan : marshaler starts at the beginning */
+    stackSize     = 4096;
+  };
+  composite.eThroughEntry => #{@signature.get_global_name}_marshaler.eClientEntry;
+};
+EOT
+    # mikan stackSize option & ææ° tecs_package å¯¾å¿
+
+    f.close
+  end
+
+  #===  through cell ã³ã¼ããçæ
+  #
+  #
+  def gen_through_cell_code( file )
+
+    gen_plugin_decl_code( file )
+
+    # ã»ã«ãæ¢ã
+    # path =["::",@next_cell.get_global_name]
+    # cell = Namespace.find( path )
+    cell = Namespace.find( @next_cell.get_namespace_path )
+
+    file.print <<EOT
+import( "#{@rpc_channel_celltype_file_name}" );
+
+EOT
+
+    nest = @region.gen_region_str_pre file
+    indent_str = "  " * nest
+
+    file.print <<EOT
+#{indent_str}// ä¸æ¹åãã£ã³ãã«ã»ã«
+#{indent_str}cell #{@channelCelltype} #{@channelCellName} {
+#{indent_str}};
+
+#{indent_str}// RPC ãã£ã³ãã«ã»ã«
+EOT
+
+    # #473 ãè§£æ±ºãããå ´åãcomposite ãªã¬ã¼ã¢ã­ã±ã¼ã¿ã«å¤æ´ãã¹ã
+    # ã¢ã­ã±ã¼ã¿ã®æå®ããããï¼
+    if cell.get_allocator_list.length > 0 then
+
+      file.print "#{indent_str}[allocator("
+
+      delim = ""
+      cell.get_allocator_list.each do |type, eport, subsc, func, buf, alloc|
+
+        file.print delim
+        delim = ",\n#{indent_str}           "        # æçµè¡ã«ã¯åºããªã
+
+        if subsc then        # é
+åæ·»æ°
+          subsc_str = '[#{subsc}]'
+        else
+          subsc_str = ""
+        end
+
+        eport = "eThroughEntry" #RPCã®åãå£åã«å¤æ´
+        file.print  "#{eport}#{subsc_str}.#{func}.#{buf} = #{alloc}"
+      end
+
+      file.puts ")]"
+    end
+
+    file.print <<EOT
+#{indent_str}cell #{@rpc_channel_celltype_name} #{@cell_name} {
+#{indent_str}  #{@call_port_name} = #{@next_cell.get_name}.#{@next_cell_port_name};
+#{indent_str}  cTDR         = #{@channelCellName}.eTDR;
+#{indent_str}  cEventflag   = #{@channelCellName}.eEventflag;
+#{indent_str}  taskPriority = #{@task_priority};
+#{indent_str}};
+EOT
+    @region.gen_region_str_post file
+  end
+
+
+  #=== ãã©ã°ã¤ã³å¼æ° noClientSemaphore ã®ãã§ãã¯
+  def set_noClientSemaphore rhs
+    rhs = rhs.to_sym
+    if rhs == :true then
+      @b_noClientSemaphore = true
+    elsif rhs == :false then
+      @b_noClientSemaphore = false
+    else
+      cdl_error( "RPCPlugin: specify true or false for noClientSemaphore" )
+    end
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° semaphoreCelltype ã®ãã§ãã¯
+  def set_semaphoreCelltype rhs
+    @semaphoreCelltype = rhs.to_sym
+    nsp = NamespacePath.analyze( @semaphoreCelltype.to_s )
+    obj = Namespace.find( nsp )
+    if ! obj.instance_of?( Celltype ) && ! obj.instance_of?( CompositeCelltype ) then
+      cdl_error( "RPCPlugin: semaphoreCelltype '#{rhs}' not celltype or not defined" )
+    end
+  end
+end
+
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/SharedOpaqueRPCPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/SharedOpaqueRPCPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/SharedOpaqueRPCPlugin.rb	(revision 270)
@@ -0,0 +1,398 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: SharedOpaqueRPCPlugin.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+require_tecsgen_lib "lib/GenOpaqueMarshaler.rb"
+require_tecsgen_lib "lib/GenParamCopy.rb"
+
+#= SharedOpaqueRPC ãã©ã°ã¤ã³
+# SharedOpaqueRPC ãã£ã³ãã«ãçæãã
+# ãã©ã°ã¤ã³å¼æ°ã¯ GenTransparentMarshaler åç
+§
+
+# mikan through plugin: namespace ãèæ
+®ããã¦ããªã
+# ãããå©ç¨ããå ´åãä»¥ä¸ã®ããã« toppers_jsp.cdl sChannel.cdl ãæå®ããå¿
+è¦ããã
+# tecsgen toppers_jsp.cdl sChannel.cdl your_description.cdl
+
+# ä»¥ä¸ãä»®å®ï¼å¶éäºé 
+ï¼
+#  å¼ã³å
+ãå¼ã³å
+ã®ã¨ã³ãã£ã¢ã³ãchar, short, int_t, long_t, intptr_t ã®ãµã¤ãºãåã
+#  æç¬¦å·ãç¡ç¬¦å·ã§ãµã¤ãºãåã
+
+class SharedOpaqueRPCPlugin < ThroughPlugin
+
+  # ãã£ã³ãã«ãå
+±æãããã©ã°ã¤ã³ãªãã¸ã§ã¯ãã¸ã®ããã·ã¥ãªã¹ã
+  @@shared_channel_list = {}    # { chan_name => [ Plugin_obj0, Plugin_Obj1, ... ] }
+
+  attr_reader :cell_name, :start_region, :end_region
+  include GenOpaqueMarshaler
+  include GenParamCopy
+
+  # SharedOpaqueRPCPlugin å°ç¨ã®ãªãã·ã§ã³
+  SharedOpaqueRPCPluginArgProc = RPCPluginArgProc.dup  # è¤è£½ãä½ã£ã¦å
+ãå¤æ´ããªãããã«ãã
+  SharedOpaqueRPCPluginArgProc[ "sharedChannelName"  ] = Proc.new { |obj,rhs| obj.set_sharedChannelName rhs }
+
+  #=== RPCPlugin ã® initialize
+  #  èª¬æã¯ ThroughPlugin (plugin.rb) ãåç
+§
+  def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell )
+    super
+    initialize_opaque_marshaler
+    @entry_port_name = :"eClientEntry"   # Marshaler ã®åãå£å (through ã»ã«ã®å
+¥ãå£)
+
+    # ãªãã·ã§ã³ï¼GenOpaqueMarshaler åç
+§
+    @plugin_arg_check_proc_tab = SharedOpaqueRPCPluginArgProc
+    @sharedChannelName = nil
+    parse_plugin_arg
+    check_opener_code
+    check_PPAllocator
+
+    @shared_channel_ct_name = :"tSharedOpaqueRPCPluginChannel_tTDR"
+    @shared_channel_server_ct_name = :"#{@shared_channel_ct_name}_Server"
+    @shared_channel_client_ct_name = :"#{@shared_channel_ct_name}_Client"
+    @shared_channel_ct_file_name = "#{$gen}/#{@shared_channel_ct_name}.cdl"
+    if @sharedChannelName == nil then
+      cdl_error( "'sharedChannelName' option: mandatory")
+    else
+      @shared_channel_cell = @sharedChannelName
+    end
+
+    if @@shared_channel_list[ @shared_channel_cell ] == nil then
+      @@shared_channel_list[ @shared_channel_cell ] = [ self ]
+    else
+      @@shared_channel_list[ @shared_channel_cell ] << self
+    end
+    @sub_channel_no = ( @@shared_channel_list[ @shared_channel_cell ].length ) -1
+
+    prev_start = @@shared_channel_list[ @shared_channel_cell ][0].start_region
+    if @start_region != prev_start then
+      # ååºã¨ start ãªã¼ã¸ã§ã³ä¸ä¸è´ (ååºã¯ãèªåèªèº«ã¨ãã§ãã¯ããããç¡é§ã ãå°ããã®ã§æ¾ç½®)
+      cdl_error( "SharedRPCPlugin: start region mismatch current: #{@region.get_name} previous: #{prev_start.get_name}")
+    end
+
+    prev_end = @@shared_channel_list[ @shared_channel_cell ][0].end_region
+    if @end_region != prev_end then
+      # ååºã¨ end ãªã¼ã¸ã§ã³ä¸ä¸è´  (ååºã¯ãèªåèªèº«ã¨ãã§ãã¯ããããç¡é§ã ãå°ããã®ã§æ¾ç½®)
+      cdl_error( "SharedRPCPlugin: end region mismatch current: #{@region.get_name} previous: #{prev_end.get_name}")
+    end
+
+  end
+
+  # def set_through_info( start_region, end_region, through_type )
+  #   super
+  # end
+
+  #=== ãã©ã°ã¤ã³å¼æ° sharedChannelCell ã®ãã§ãã¯
+  def set_sharedChannelName( rhs )
+    @sharedChannelName = rhs
+    # path = [ "::", rhs ]
+    # obj = Namespace.find( path )
+    # if ! obj.instance_of?( Cell ) then
+    #   cdl_error( "SharedOpaqueRPCPlugin: sharedChannelName '#{rhs}' not cell" )
+    # end
+  end
+
+  def gen_plugin_decl_code( file )
+
+    # ãã®ã»ã«ã¿ã¤ãï¼åãã·ã°ããã£ï¼ã¯æ¢ã«çæããã¦ãããï¼
+    if @@generated_celltype[ @shared_channel_server_ct_name ] == nil then
+      @@generated_celltype[ @shared_channel_server_ct_name ] = [ self ]
+    else
+      @@generated_celltype[ @shared_channel_server_ct_name ] << self
+    end
+
+    gen_marshaler_celltype
+
+    # åãå
+å®¹ãäºåº¦æ¸ãå¯è½æ§ãã (AppFile ã¯ä¸å¯)
+
+    if @PPAllocatorSize then
+      alloc_call_port = "  call sPPAllocator cPPAllocator;\n"
+      alloc_call_port_join = "  cPPAllocator => composite.cPPAllocator;\n"
+    else
+      alloc_call_port = ""
+      alloc_call_port_join = ""
+    end
+
+    f = CFile.open( @shared_channel_ct_file_name, "w" )
+    # åãå
+å®¹ãäºåº¦æ¸ãå¯è½æ§ãã (AppFile ã¯ä¸å¯)
+
+    f.print <<EOT
+
+/* Shared Channel Celltype for Client */
+composite #{@shared_channel_client_ct_name} {
+  entry  sTDR       eTDR;
+  entry  sSemaphore eSemaphore[];
+  call   sChannel   cClientChannel;
+
+  cell tTDR TDR {
+    cChannel => composite.cClientChannel;
+  };
+  cell tSemaphore Semaphore {
+    count = 1;
+    attribute = C_EXP("TA_NULL");
+  };
+  cell tRPCSharedChannelMan SharedChannelMan{
+    cSemaphore             = Semaphore.eSemaphore;
+    cClientSideTDR         = TDR.eTDR;
+  };
+  composite.eSemaphore     => SharedChannelMan.eSemaphore;
+  composite.eTDR           => TDR.eTDR;
+};
+
+/* Shared Channel Celltype for Server */
+[active]
+composite #{@shared_channel_server_ct_name} {
+  entry  sTDR       eTDR;
+  call   sChannel   cServerChannel;
+  call   sUnmarshalerMain  cUnmarshalAndCallFunction[];
+  call   sServerChannelOpener cOpener;
+  attr {
+    PRI    priority;
+  };
+
+  cell tTDR TDR {
+    cChannel => composite.cServerChannel;
+  };
+  cell tRPCSharedTaskMainWithOpener RPCSharedTaskMain {
+    cUnmarshalAndCallFunction => composite.cUnmarshalAndCallFunction;
+    cServerSideTDR = TDR.eTDR;
+    cOpener => composite.cOpener;
+  };
+  cell tTask Task {
+    cBody = RPCSharedTaskMain.eMain;
+    taskAttribute = C_EXP("TA_ACT");
+    stackSize = 4096;
+    priority = composite.priority;
+  };
+  composite.eTDR           => TDR.eTDR;
+};
+
+EOT
+    f.close
+
+  end
+
+  #===  through cell ã³ã¼ããçæ
+  #
+  #
+  def gen_through_cell_code( file )
+
+    gen_plugin_decl_code( file )
+
+    file.print <<EOT
+
+import( "#{@marshaler_celltype_file_name}" );
+import( "#{@shared_channel_ct_file_name}" );
+EOT
+
+#    nest = @caller_cell.get_region.gen_region_str_pre file
+    nest = @start_region.gen_region_str_pre file
+    indent_str = "  " * nest
+
+    # ã»ã«ãæ¢ã
+    # path =["::",@next_cell.get_name]
+    # cell = Namespace.find( path )
+    cell = Namespace.find( @next_cell.get_namespace_path )
+
+    # å
+±æãããéä¿¡ãã£ã³ãã«ã®çæã®ãã­ãã¿ã¤ãå®£è¨
+    file.print <<EOT
+#{indent_str}cell #{@shared_channel_client_ct_name} #{@shared_channel_cell};
+EOT
+
+    # ãã¼ã·ã£ã©ã»ã«ã®çæï¼ã¢ã­ã±ã¼ã¿ã³ã¼ãã®çæããï¼
+    # ã¢ã­ã±ã¼ã¿ã®æå®ããããï¼
+    if cell.get_allocator_list.length > 0 then
+
+      file.print "#{indent_str}[allocator("
+
+      delim = ""
+      cell.get_allocator_list.each do |type, eport, subsc, func, buf, alloc|
+
+        alloc_str = alloc.to_s
+        subst = @substituteAllocator[alloc_str.to_sym]
+
+        if subst then
+          alloc_str = subst[2]+"."+subst[3]
+        end
+
+        file.print delim
+        delim = ",\n#{indent_str}           "        # æçµè¡ã«ã¯åºããªã
+
+        if subsc then        # é
+åæ·»æ°
+          subsc_str = '[#{subsc}]'
+        else
+          subsc_str = ""
+        end
+
+        eport = @entry_port_name #RPCã®åãå£åã«å¤æ´
+        file.print  "#{eport}#{subsc_str}.#{func}.#{buf} = #{alloc_str}"
+      end
+
+      file.puts ")]"
+    end
+
+    # ãã¼ã·ã£ã©ã»ã«æ¬ä½çæ
+    file.print <<EOT
+/* OpaqueRPC Marshaler Cell */
+#{indent_str}cell #{@marshaler_celltype_name} #{@cell_name} {
+#{indent_str}  cTDR         = #{@shared_channel_cell}.eTDR;
+#{indent_str}  cLockChannel = #{@shared_channel_cell}.eSemaphore[#{@sub_channel_no}];
+#{indent_str}};
+EOT
+    # @caller_cell.get_region.gen_region_str_post file
+    @start_region.gen_region_str_post file
+
+    # ã¢ã³ãã¼ã·ã£ã©ã»ã«ã®åºå
+    # ã»ã«æ¬ä½ã®çæ
+    nest = @end_region.gen_region_str_pre file
+
+    file.print <<EOT
+/* Server Channel Cell prototype */
+#{indent_str}cell #{@shared_channel_server_ct_name} #{@sharedChannelName}_Server;
+
+EOT
+
+    # PPAllocator ãå¿
+è¦ã?
+    if @PPAllocatorSize then
+      if @sub_channel_no == 0 then
+        file.print <<EOT
+#{indent_str}cell tPPAllocator PPAllocator_#{@shared_channel_cell}{
+#{indent_str}  heapSize = #{@PPAllocatorSize};
+#{indent_str}};
+EOT
+      end
+
+      ppallocator_join = "#{indent_str}  cPPAllocator = PPAllocator_#{@shared_channel_cell}.ePPAllocator;\n"
+    else
+      ppallocator_join = ""
+    end
+
+    file.print <<EOT
+#{indent_str}cell #{@unmarshaler_celltype_name} #{@cell_name}_Server {
+#{indent_str}  cTDR         = #{@shared_channel_cell}_Server.eTDR;
+#{indent_str}  cServerCall  = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name};
+#{ppallocator_join}#{indent_str}};
+EOT
+    @end_region.gen_region_str_post file
+
+  end
+
+  #=== post ã³ã¼ã(CDL) ãçæ
+  # ãã©ã°ã¤ã³ã®å¾ã®ã³ã¼ããçæ
+  #file:: File: 
+  def self.gen_post_code( file )
+
+    file.print "/* '#{self.name}' post code */\n"
+
+    @@shared_channel_list.each{ |chan_name,plugin_obj_array|
+      file.print "/* '#{chan_name}' shared channel */\n"
+      plugin_obj_array[0].gen_post_code( file, plugin_obj_array )
+    }
+
+  end
+
+  #=== post ã³ã¼ã(CDL) ãçæ
+  # å
+±æãã£ã³ãã«ãçæãã
+  # ãã®ã¡ã½ããã¯ããã£ã³ãã«ãå
+±æããæåã®ãã©ã°ã¤ã³ãªãã¸ã§ã¯ãã®ã¿å¼ã³åºããã
+  def gen_post_code( file, plugin_obj_array )
+
+    # å
+±æããã¦ããéä¿¡ãã£ã³ãã«ã®çæ
+    # åãã©ã°ã¤ã³ã¤ã³ã¹ã¿ã³ã¹ã§ã¯ @shared_channel_ct_name ã¨ãã¦è¨æ¶ãã¦ãã
+    # region = @caller_cell.get_region
+    nest = @start_region.gen_region_str_pre file
+    indent_str = "  " * nest
+    file.print <<EOT
+#{indent_str}cell #{@shared_channel_client_ct_name} #{@sharedChannelName} {
+#{indent_str}    cClientChannel = #{@clientChannelCell}.eC0;
+#{indent_str}};
+EOT
+    @start_region.gen_region_str_post file
+
+    nest = @end_region.gen_region_str_pre file
+    indent_str = "  " * nest
+    file.print "#{indent_str}cell #{@shared_channel_server_ct_name} #{@sharedChannelName}_Server {\n"
+      file.print <<EOT
+#{indent_str}    cServerChannel = #{@serverChannelCell}.eC1;
+#{indent_str}    cOpener        = #{@serverChannelCell}.eOpener;
+EOT
+    plugin_obj_array.each{ |po|
+      file.print <<EOT
+#{indent_str}    cUnmarshalAndCallFunction[] = #{po.cell_name}_Server.eService;
+EOT
+    }
+    file.printf <<EOT
+#{indent_str}    priority = #{@taskPriority};
+#{indent_str}};
+EOT
+    @end_region.gen_region_str_post file
+
+  end
+end
+
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/SharedRPCPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/SharedRPCPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/SharedRPCPlugin.rb	(revision 270)
@@ -0,0 +1,365 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: SharedRPCPlugin.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+require_tecsgen_lib "lib/GenTransparentMarshaler.rb"
+require_tecsgen_lib "lib/GenParamCopy.rb"
+
+#= SharedRPC ãã©ã°ã¤ã³
+# SharedRPC ãã£ã³ãã«ãçæãã
+# ãã©ã°ã¤ã³å¼æ°ã¯ GenTransparentMarshaler åç
+§
+
+# mikan through plugin: namespace ãèæ
+®ããã¦ããªã
+# ãããå©ç¨ããå ´åãä»¥ä¸ã®ããã« toppers_jsp.cdl sChannel.cdl ãæå®ããå¿
+è¦ããã
+# tecsgen toppers_jsp.cdl sChannel.cdl your_description.cdl
+
+# ä»¥ä¸ãä»®å®ï¼å¶éäºé 
+ï¼
+#  å¼ã³å
+ãå¼ã³å
+ã®ã¨ã³ãã£ã¢ã³ãchar, short, int_t, long_t, intptr_t ã®ãµã¤ãºãåã
+#  æç¬¦å·ãç¡ç¬¦å·ã§ãµã¤ãºãåã
+
+class SharedRPCPlugin < ThroughPlugin
+
+  attr_reader :region
+  @@shared_channel_list = {}
+  include GenTransparentMarshaler
+  include GenParamCopy
+
+  #=== RPCPlugin ã® initialize
+  #  èª¬æã¯ ThroughPlugin (plugin.rb) ãåç
+§
+  def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell )
+
+    # mikan ãã©ã°ã¤ã³ãªãã·ã§ã³æå®ã®ä¸ä¸è´ã®ãã§ãã¯ task_priority, 
+
+    super
+    initialize_transparent_marshaler cell_name
+
+    # ãªãã·ã§ã³ï¼GenTransparentMarshaler åç
+§
+    @plugin_arg_check_proc_tab = RPCPluginArgProc
+    @channelCellName = ""     # nil ã«ãã¦ãã
+    parse_plugin_arg
+
+    @shared_channel_ct_name = :"tSharedRPCPlugin_#{@channelCelltype}"
+    @shared_channel_ct_file_name = "#{$gen}/#{@shared_channel_ct_name}.cdl"
+    @rpc_channel_celltype_name = :"tSharedRPCPlugin_#{@TDRCelltype}_#{@channelCelltype}_#{@signature.get_global_name}"
+    @rpc_channel_celltype_file_name = "#{$gen}/#{@rpc_channel_celltype_name}.cdl"
+
+    @shared_channel_cell = @channelCellName
+    if @shared_channel_cell == "" then
+      cdl_error( "SharedRPCPlugin: need channelCellName option" )
+    end
+
+    if @@shared_channel_list[ @shared_channel_cell ] == nil then
+      # ååº
+      @@shared_channel_list[ @shared_channel_cell ] = [ self ]
+    else
+      # äºçªç®ä»¥é
+      @@shared_channel_list[ @shared_channel_cell ] << self
+    end
+    @sub_channel_no = ( @@shared_channel_list[ @shared_channel_cell ].length ) -1
+
+    if @region != @@shared_channel_list[ @shared_channel_cell ][0].region then
+      # ååºã¨ãªã¼ã¸ã§ã³ä¸ä¸è´ (ååºã¯ãèªåèªèº«ã¨ãã§ãã¯ããããç¡é§ã ãå°ããã®ã§æ¾ç½®)
+      cdl_error( "SharedRPCPlugin: preferred region mismatch current: #{@region.get_name} previous: #{@@shared_channel_list[ @shared_channel_cell ][0].region.get_name}")
+    else
+      dbgPrint "SahredRPCPlugin: Region: #{@region.get_name}, #{@@shared_channel_list[ @shared_channel_cell ][0].region.get_name}\n"
+    end
+
+    if @signature.need_PPAllocator? then
+      if @PPAllocatorSize == nil then
+        cdl_error( "PPAllocatorSize must be speicified for oneway [in] array" )
+      end
+    end
+
+  end
+
+  # def set_through_info( start_region, end_region, through_type )
+  #   super
+  #  
+  # end
+
+  def gen_plugin_decl_code( file )
+
+    # ãã®ã»ã«ã¿ã¤ãï¼åãã·ã°ããã£ï¼ã¯æ¢ã«çæããã¦ãããï¼
+    if @@generated_celltype[ @shared_channel_ct_name ] == nil then
+      @@generated_celltype[ @shared_channel_ct_name ] = [ self ]
+    else
+      @@generated_celltype[ @shared_channel_ct_name ] << self
+    end
+
+    if @@generated_celltype[ @ct_name ] == nil then
+      @@generated_celltype[ @ct_name ] = [ self ]
+    else
+      @@generated_celltype[ @ct_name ] << self
+    end
+
+    gen_marshaler_celltype
+    # åãå
+å®¹ãäºåº¦æ¸ãå¯è½æ§ãã (AppFile ã¯ä¸å¯)
+
+    if @signature.need_PPAllocator? then
+      alloc_call_port = "  call sPPAllocator cPPAllocator;\n"
+      alloc_call_port_join = "  cPPAllocator => composite.cPPAllocator;\n"
+    else
+      alloc_call_port = ""
+      alloc_call_port_join = ""
+    end
+
+    f = CFile.open( @rpc_channel_celltype_file_name, "w" )
+    # åãå
+å®¹ãäºåº¦æ¸ãå¯è½æ§ãã (AppFile ã¯ä¸å¯)
+
+    f.print <<EOT
+import( "#{@marshaler_celltype_file_name}" );
+
+composite #{@rpc_channel_celltype_name} {
+  /* Interface */
+  call  #{@signature.get_namespace_path} #{@call_port_name};
+  entry #{@signature.get_namespace_path} eThroughEntry;
+  call  sTDR       cTDR;
+  call  sEventflag cEventflag;
+  entry sUnmarshalerMain  eUnmarshalAndCallFunction;
+#{alloc_call_port}
+  [optional]
+    call sSemaphore cLockChannel;
+
+  /* Implementation */
+  cell #{@marshaler_celltype_name} #{@signature.get_global_name}_marshaler{
+    cTDR         => composite.cTDR;
+    cEventflag   => composite.cEventflag;
+    cLockChannel => composite.cLockChannel;
+  };
+  cell #{@unmarshaler_celltype_name} #{@signature.get_global_name}_unmarshaler{
+    cTDR         => composite.cTDR;
+    cEventflag   => composite.cEventflag;
+    cServerCall  => composite.#{@call_port_name};
+#{alloc_call_port_join}  };
+  composite.eThroughEntry => #{@signature.get_global_name}_marshaler.eClientEntry;
+  composite.eUnmarshalAndCallFunction => #{@signature.get_global_name}_unmarshaler.eUnmarshalAndCallFunction;
+};
+EOT
+    # mikan stackSize option & ææ° tecs_package å¯¾å¿
+
+    f.close
+
+    f = CFile.open( "#{$gen}/#{@shared_channel_ct_name}.cdl", "w" )
+    # åãå
+å®¹ãäºåº¦æ¸ãå¯è½æ§ãã (AppFile ã¯ä¸å¯)
+
+    f.print <<EOT
+[active]
+composite #{@shared_channel_ct_name} {
+  /* Interface */
+  entry  sSemaphore eSemaphore[];
+  call   sUnmarshalerMain  cUnmarshalAndCallFunction[];
+
+  entry  sDataqueue eDataqueue;
+  entry  sTDR       eTDR;
+  entry  sEventflag eEventflag;
+
+  attr {
+    PRI    priority;
+  };
+
+  /* Implementation */
+  cell #{@channelCelltype} Channel{
+  };
+  cell tSemaphore Semaphore {count = 1; attribute = C_EXP("TA_NULL");};
+  cell tRPCSharedTaskMain RPCSharedTaskMain {
+    cUnmarshalAndCallFunction => composite.cUnmarshalAndCallFunction;
+    cServerSideTDR            = Channel.eTDR;
+  };
+  cell tRPCSharedChannelMan RPCChannelMan {
+    cSemaphore                = Semaphore.eSemaphore;
+    cClientSideTDR            = Channel.eTDR;
+  };
+  cell tTask RPCSharedTask {
+    cBody = RPCSharedTaskMain.eMain;
+    taskAttribute = C_EXP("TA_ACT");
+    stackSize = 4096;
+    priority = composite.priority;
+  };
+  composite.eTDR           => Channel.eTDR;
+  composite.eEventflag     => Channel.eEventflag;
+  composite.eSemaphore     => RPCChannelMan.eSemaphore;
+  composite.eDataqueue     => Channel.eDataqueue;
+};
+EOT
+    f.close
+
+  end
+
+  #===  through cell ã³ã¼ããçæ
+  #
+  #
+  def gen_through_cell_code( file )
+
+    gen_plugin_decl_code( file )
+
+    file.print <<EOT
+import( "#{@rpc_channel_celltype_file_name}" );
+import( "#{$gen}/#{@shared_channel_ct_name}.cdl" );
+EOT
+
+    # nest = @next_cell.get_region.gen_region_str_pre file
+    nest = @region.gen_region_str_pre file
+    indent_str = "  " * nest
+
+    # ã»ã«ãæ¢ã
+    # path =["::",@next_cell.get_name]
+    # cell = Namespace.find( path )
+    cell = Namespace.find( @next_cell.get_namespace_path )
+
+    # PPAllocator ãå¿
+è¦ã?
+    if @signature.need_PPAllocator? then
+      if @sub_channel_no == 0 then
+        file.print <<EOT
+#{indent_str}cell tPPAllocator PPAllocator_#{@shared_channel_cell}{
+#{indent_str}  heapSize = #{@PPAllocatorSize};
+#{indent_str}};
+EOT
+      end
+
+      ppallocator_join = "#{indent_str}  cPPAllocator = PPAllocator_#{@shared_channel_cell}.ePPAllocator;\n"
+    else
+      ppallocator_join = ""
+    end
+
+    # å
+±æãããéä¿¡ãã£ã³ãã«ã®çæã®ãã­ãã¿ã¤ãå®£è¨
+    file.print <<EOT
+#{indent_str}cell #{@shared_channel_ct_name} #{@shared_channel_cell};
+EOT
+
+    # ããããåçµåãã¨ã®ã»ã«ãçæ
+
+    # ã¢ã­ã±ã¼ã¿ã®æå®ããããï¼
+    if cell.get_allocator_list.length > 0 then
+
+      file.print "#{indent_str}[allocator("
+
+      delim = ""
+      cell.get_allocator_list.each do |type, eport, subsc, func, buf, alloc|
+
+        file.print delim
+        delim = ",\n#{indent_str}           "        # æçµè¡ã«ã¯åºããªã
+
+        if subsc then        # é
+åæ·»æ°
+          subsc_str = '[#{subsc}]'
+        else
+          subsc_str = ""
+        end
+
+        eport = "eThroughEntry" #RPCã®åãå£åã«å¤æ´
+        file.print  "#{eport}#{subsc_str}.#{func}.#{buf} = #{alloc}"
+      end
+
+      file.puts ")]"
+    end
+
+    # ã»ã«æ¬ä½ã®çæ
+    file.print <<EOT
+#{indent_str}cell #{@rpc_channel_celltype_name} #{@cell_name} {
+#{indent_str}  #{@call_port_name} = #{@next_cell.get_name}.#{@next_cell_port_name};
+#{indent_str}  cTDR         = #{@shared_channel_cell}.eTDR;
+#{indent_str}  cEventflag   = #{@shared_channel_cell}.eEventflag;
+#{indent_str}  cLockChannel =  #{@shared_channel_cell}.eSemaphore[#{@sub_channel_no}];
+#{ppallocator_join}#{indent_str}};
+EOT
+    @region.gen_region_str_post file
+  end
+
+  #=== å¾ãã®ã³ã¼ããçæ
+  #ãã©ã°ã¤ã³ã®å¾ãã®ã³ã¼ããçæ
+  #file:: File: 
+  def self.gen_post_code( file )
+    file.print "/* '#{self.name}' post code */\n"
+    @@shared_channel_list.each{ |chan_name,plugin_obj|
+      plugin_obj[0].gen_post_code( file, plugin_obj )
+    }
+  end
+
+  #=== å¾ãã®ã³ã¼ããçæ
+  # plugin_obj[0] ãä»£è¡¨ãã¦åºåããï¼ã¤ã³ã¹ã¿ã³ã¹å¤æ°ã«ã¢ã¯ã»ã¹ãããããï¼
+  def gen_post_code( file, plugin_obj )
+
+    chan_name = @shared_channel_cell
+
+    nest = @region.gen_region_str_pre file
+    indent_str = "  " * nest
+
+    # å
+±æããã¦ããéä¿¡ãã£ã³ãã«ã®çæ
+    # åãã©ã°ã¤ã³ã¤ã³ã¹ã¿ã³ã¹ã§ã¯ @shared_channel_ct_name ã¨ãã¦è¨æ¶ãã¦ãã
+    file.print "#{indent_str}cell tSharedRPCPlugin_#{@channelCelltype} #{chan_name} {\n"
+    plugin_obj.each{ |po|
+      file.print <<EOT
+#{indent_str}    cUnmarshalAndCallFunction[] = #{@cell_name}.eUnmarshalAndCallFunction;
+EOT
+    }
+    file.printf "#{indent_str}    priority = #{@task_priority};\n#{indent_str}};\n"
+    @region.gen_region_str_post file
+
+  end
+
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/SignaturePlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/SignaturePlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/SignaturePlugin.rb	(revision 270)
@@ -0,0 +1,97 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: SignaturePlugin.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+#== signature ãã©ã°ã¤ã³ã®å
+±éã®è¦ªã¯ã©ã¹
+class SignaturePlugin < Plugin
+#@signature:: Signature   ãã©ã°ã¤ã³ã®å¯¾è±¡ã¨ãªãã·ã°ããã£
+#@option:: String   '"', '"' ã§å²ã¾ããæå­å
+
+  #signature::     Signature        ã·ã°ããã£ï¼ã¤ã³ã¹ã¿ã³ã¹ï¼
+  def initialize( signature, option )
+    super()
+    @signature = signature
+    # @plugin_arg_str = option.gsub( /\A"(.*)/, '\1' )    # åå¾ã® "" ãåãé¤ã
+    # @plugin_arg_str.sub!( /(.*)"\z/, '\1' )
+    @plugin_arg_str = CDLString.remove_dquote option
+    @plugin_arg_list = {}
+  end
+
+  #=== å¾ãã®ã³ã¼ããçæ
+  #ãã©ã°ã¤ã³ã®å¾ãã® CDL ã³ã¼ããçæ
+  #file:: File: 
+  def self.gen_post_code( file )
+    # è¤æ°ã®ãã©ã°ã¤ã³ã® post_code ãä¸ã¤ã®ãã¡ã¤ã«ã«å«ã¾ãããããä»¥ä¸ã®ãããªè¦åºããã¤ãããã¨
+    # file.print "/* '#{self.class.name}' post code */\n"
+  end
+
+  #===  åãå£é¢æ°ã®æ¬ä½(Cè¨èª)ãçæãã
+  #     éå¸¸ã§ããã°ãã¸ã§ãã¬ã¼ã¿ã¯åãå£é¢æ°ã®ãã³ãã¬ã¼ããçæãã
+  #     ãã©ã°ã¤ã³ã®å ´åãå¤æ´ããå¿
+è¦ã®ãªãã»ã«ã¿ã¤ãã³ã¼ããçæãã
+  #file::           FILE        åºåå
+ãã¡ã¤ã«
+  #b_singleton::    bool        true if singleton
+  #ct_name::        Symbol
+  #global_ct_name:: string
+  #sig_name::       string
+  #ep_name::        string
+  #func_name::      string
+  #func_global_name:: string
+  #func_type::      class derived from Type
+  def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+    raise "gen_ep_func_body must be overridden by sub class"
+  end
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/TECS2CBridgePlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/TECS2CBridgePlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/TECS2CBridgePlugin.rb	(revision 270)
@@ -0,0 +1,202 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: TECS2CBridgePlugin.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+#== TECS => C å¼ã³åºããã©ã°ã¤ã³
+class TECS2CBridgePlugin < SignaturePlugin
+#@signature:: Signature   ãã©ã°ã¤ã³ã®å¯¾è±¡ã¨ãªãã·ã°ããã£
+#@option:: String   '"', '"' ã§å²ã¾ããæå­å
+
+  @@signature_list = { }
+
+  #signature::     Signature        ã·ã°ããã£ï¼ã¤ã³ã¹ã¿ã³ã¹ï¼
+  def initialize( signature, option )
+    super
+
+    @signature = signature
+    @header_name = "#{$gen}/#{@signature.get_global_name}.#{$h_suffix}"
+    @celltype_name = :"t#{@signature.get_global_name}"
+
+    parse_plugin_arg
+  end
+
+  def gen_cdl_file file
+    if @@signature_list[ @signature.get_global_name ] then
+      @@signature_list[ @signature.get_global_name ] << self
+      cdl_warning( "T2CW001 signature '$1' duplicate. ignored current one", @signature.get_namespace_path )
+      return
+    end
+    @@signature_list[ @signature.get_global_name ] = [ self ]
+
+    print_msg "  TECS2CBridgePlugin: [celltype] TECS2C::#{@celltype_name}. Create cell then join to entry port 'eEntry' from the caller cell\n"
+    file.print <<EOT
+namespace nTECS2C{
+  [singleton]
+  celltype #{@celltype_name} {
+    [inline]
+    entry #{@signature.get_namespace_path} eEnt;
+  };
+};
+EOT
+  end
+
+  #=== å¾ãã®ã³ã¼ããçæ
+  #ãã©ã°ã¤ã³ã®å¾ãã®ã³ã¼ããçæ
+  #file:: File: 
+  def self.gen_post_code( file )
+    # è¤æ°ã®ãã©ã°ã¤ã³ã® post_code ãä¸ã¤ã®ãã¡ã¤ã«ã«å«ã¾ãããããä»¥ä¸ã®ãããªè¦åºããã¤ãããã¨
+    # file.print "/* '#{self.class.name}' post code */\n"
+  end
+
+  #===  åãå£é¢æ°ã®æ¬ä½(Cè¨èª)ãçæãã
+  #     éå¸¸ã§ããã°ãã¸ã§ãã¬ã¼ã¿ã¯åãå£é¢æ°ã®ãã³ãã¬ã¼ããçæãã
+  #     ãã©ã°ã¤ã³ã®å ´åãå¤æ´ããå¿
+è¦ã®ãªãã»ã«ã¿ã¤ãã³ã¼ããçæãã
+  #file::           FILE        åºåå
+ãã¡ã¤ã«
+  #b_singleton::    bool        true if singleton
+  #ct_name::        Symbol
+  #global_ct_name:: string
+  #sig_name::       string
+  #ep_name::        string
+  #func_name::      string
+  #func_global_name:: string
+  #func_type::      class derived from Type
+  def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+
+    ret_type = func_type.get_type
+    b_ret_void = ret_type.is_void?
+
+    if ! b_ret_void then
+      file.print( "  #{ret_type.get_type_str}  retval;\n" )
+    end
+
+    if ! b_singleton then
+
+      file.print <<EOT
+  #{ct_name}_CB    *p_cellcb;
+  if( VALID_IDX( idx ) ){
+    p_cellcb = #{global_ct_name}_GET_CELLCB(idx);
+  }else{
+     /* ã¨ã©ã¼å¦çã³ã¼ããããã«è¨è¿° */
+  }
+
+EOT
+    end
+
+    # p "celltype_name, sig_name, func_name, func_global_name"
+    # p "#{ct_name}, #{sig_name}, #{func_name}, #{func_global_name}"
+
+    if ! b_ret_void then
+      file.print( "  retval = " )
+    else
+      file.print( "  " )
+    end
+
+    file.print( "#{func_name}(" )
+
+    delim = ""
+    params.each{ |param|
+      file.printf( "#{delim} #{param.get_name}" )
+      delim = ","
+    }
+
+    file.print( " );\n" )
+
+    if ! b_ret_void then
+      file.print( "  return retval;\n" )
+    end
+
+  end
+
+
+  def gen_postamble( file, b_singleton, ct_name, global_name )
+
+    # generate header file here, NOT postamble
+    file2 = CFile.open( @header_name, "w" )
+    file2.print <<EOT
+/*
+ * This file was generated by TECS2CBridgePlugin and has prototype
+ * decalarations of functions in signature '#{@signature.get_namespace_path}'
+ */
+
+#include "global_tecsgen.#{$h_suffix}"
+
+EOT
+    @signature.get_function_head_array.each { |f|
+      decl = f.get_declarator
+      func_type = decl.get_type
+      params = func_type.get_paramlist.get_items
+      func_name = decl.get_name
+
+      ret_type = func_type.get_type
+
+      # p "celltype_name, sig_name, func_name, func_global_name"
+      # p "#{ct_name}, #{sig_name}, #{func_name}, #{func_global_name}"
+
+      file2.print( "#{ret_type.get_type_str}  #{func_name}(" )
+
+      delim = ""
+      params.each{ |param|
+        file2.printf( "#{delim} #{param.get_name}" )
+        delim = ","
+      }
+      
+      file2.print( " )#{ret_type.get_type_str_post};\n" )
+    }
+
+      file2.close
+  end
+
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ThroughPlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ThroughPlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/ThroughPlugin.rb	(revision 270)
@@ -0,0 +1,372 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: ThroughPlugin.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+# mikan through plugin: namespace ãèæ
+®ããã¦ããªã
+
+#==  ã¹ã«ã¼ãã©ã°ã¤ã³ã®å
+±éã®è¦ªã¯ã©ã¹ããã¤ ï¼ä½ãããï¼ã¹ã«ã¼ããã»ã«ãæ¿å
+¥ããã¹ã«ã¼ãã©ã°ã¤ã³
+#    ã¹ã«ã¼ãã©ã°ã¤ã³ã¯ ThroughPlugin ã®å­ã¯ã©ã¹ã¨ãã¦å®ç¾©ãã
+class ThroughPlugin < Plugin
+#@cell_name::      Symbol             çæããã»ã«åï¼è¤æ°ã»ã«ãçæããå ´åãåãå£å´ã®ã»ã«ï¼
+#@plugin_arg_str:: string             through ã§æå®ãããå¼æ°
+#@next_cell:: Cell                    å¼ã³å£ãçµåããã»ã«
+#@next_cell_port_name:: Symbol       å¼ã³å£ãçµåããåå£ã®åå
+#@signature::      Signature          ã·ã°ããã£
+#@celltype::       Celltype           å¼ã³å
+ã®ã»ã«ã®ã»ã«ã¿ã¤ã. through ãé£æ¥ããå ´åãæçµçãªå¼ã³å
+ã®ã»ã«ã®ã»ã«ã¿ã¤ã
+#@entry_port_name::Symbol             çæããã»ã«ã®åãå£å  "eThroughEntry"
+#@call_port_name:: Symbol             çæããã»ã«ã®å¼ã³å£å  "cCall"
+#@ct_name::        Symbol             çæããã»ã«ã®ã»ã«ã¿ã¤ãå   "t#{self.class.name}_#{@signature.get_global_name}"
+#@plugin_arg_list:: Hash              ãã©ã°ã¤ã³å¼æ°ããã¼ã¹ããçµæã®ããã·ã¥å¤æ°
+#@caller_cell::    Cell               å¼ã³å
+ã®ã»ã«ï¼through ãã©ã°ã¤ã³ãé£æ¥ããå ´åã§ã¯ãæãå¼ã³å
+ã®ã»ã«ï¼($source$)
+#                                     through ãã©ã°ã¤ã³ãåæµããã±ã¼ã¹ã§ã¯ã1ã¤ç®ã®å¼ã³å
+ã»ã«ã®ã¿å¼æ°ã¨ãã¦ä¸ãããã
+#                                     å¾ã£ã¦ TracePlugin ã®å¼ã³å
+ã®å¤å¥ã«å©ç¨ããå ´åã¯ãç°ãªãå¼ã³å
+ããå¼ã°ããå¯è½æ§ããããã¨ã«æ³¨æããªãã¦ã¯ãªããªã
+#@callee_cell:: Cell                  å¼ã³å
+ã®ã»ã«($destination$)
+#@plugin_arg_check_proc_tab:: [string => Proc]  ãã©ã°ã¤ã³å¼æ°åâãã§ãã¯é¢æ°
+# ä»¥ä¸ã®å¤æ°ã¯ãinitialize ã§ã¯ãªããå¾ããè¨­å®ããã
+#@start_@region::  Region             å§ã¾ãã®ãªã¼ã¸ã§ã³ï¼ caller_cell ã®ãªã¼ã¸ã§ã³ã¨ã¯ç°ãªãå¯è½æ§ããã ($start_region$)
+#@end_region::  Region                çµããã®ãªã¼ã¸ã§ã³ï¼ next_cell ã®ãªã¼ã¸ã§ã³ã¨ã¯ç°ãªãå¯è½æ§ããã ($end_region$)
+#@region:: Region                     @start_region ã¨ @end_region ã®ããããã§ãcell ãç½®ãã®ãå¥½ã¾ãããªã¼ã¸ã§ã³ ($preferred_region$)
+#@through_type:: Symbol              :THROUGH, :TO_THROUGH, :IN_THROUGH, :OUT_THROUGH ã®ãããã
+
+  # ãã® Plugin ãçæããã»ã«ã¿ã¤ãã®ãªã¹ã
+  @@generated_celltype = {}
+
+  #=== ThroughPlugin ã®åæå
+  #     through ãæå®ãããæç¹ã§çæãè¡ããã
+  #         åæåã§ã¯ãæå®ãããå¼æ°ãè¨é²ããã«çãã
+  #cell_name::      Symbol             çæãã¹ãã»ã«åï¼åå£å´ï¼
+  #plugin_arg::     string             through ã§æå®ãããå¼æ°
+  #next_cell::      Cell               å¼ã³å£ãæ¥ç¶ããã»ã«
+  #next_cell_port_name:: Symbol        å¼ã³å£ãæ¥ç¶ããåå£ã®åå
+  #signature::      Signature          ã·ã°ããã£
+  #celltype::       Celltype           ã»ã«ã¿ã¤ã (å¼ã³å
+ã®ã»ã«ã®ã»ã«ã¿ã¤ã)
+  #caller_cell::    Cell               å¼ã³å
+ã®ã»ã«ï¼@caller_cell ã®é 
+ãåç
+§
+  def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell )
+    super()
+    @cell_name = cell_name                      # çæãã¹ãã»ã«åï¼åãå£å´ã®ã»ã«åï¼
+                                                # ãã®å¼ã³å
+ã«å¥ã»ã«ãçæããå ´åããã®ååãæ¥é ­è¾ã¨ãã¹ã
+    @next_cell = next_cell                      # å¼ã³å
+ã®ã»ã«
+    @next_cell_port_name = next_cell_port_name
+    @signature = signature
+    @entry_port_name = :"eThroughEntry"
+    @call_port_name = :"cCall"
+    @ct_name = :"t#{self.class.name}_#{@signature.get_global_name}"
+    @celltype = celltype
+    @plugin_arg_str = plugin_arg
+    @plugin_arg_list = {}                       # ãã©ã°ã¤ã³å¼æ°ããã¼ã¹ããçµæã®ããã·ã¥å¤æ°
+    @caller_cell     = caller_cell
+    Join.set_through_info self                  # å¼æ°ã§æ¸¡ããªã(å¾ããè¿½å ããã)ãã®ã¯ set_through_info ã§è¨­å®ããã
+    print( "#{self.class.name}.new( '#{cell_name}', '#{plugin_arg}', '#{next_cell.get_name}', '#{next_cell_port_name}', #{celltype.get_name} )\n" )
+  end
+
+  #=== æ
+å ±ãè¨­å®ãã
+  # å
+±æãã£ã³ãã«ã®å ´å caller_cell, next_cell ã®ãããã® region ã§ããªãã±ã¼ã¹ããã
+  # å¾ããè¿½å ããã®ã§ initialize ã®å¼æ°ã§ã¯ãªããå¥ã¡ã½ããã§è¨­å®
+  # ãã®ã¡ã½ããã¯ããªã¼ãã¼ã©ã¤ãããªãã§ãã ãã
+  # Join ã¨ ThrougPlugin ã®éã®é£çµ¡ç¨ã§ãä»å¾ã¨ãå¼æ°ãè¿½å ãããå¯è½æ§ããããã
+  # ãã®ã¡ã½ããã¯ V1.C.0.34 ã§ä½ç½®ãç§»åãããThroughPlugin#initialize ã§å¼ã³åºããã
+  def set_through_info( start_region, end_region, through_type, join, callee_cell, count )
+    @start_region = start_region
+    @end_region = end_region
+    @through_type = through_type
+    @join = join
+    @callee_cell = callee_cell
+    @count = count
+
+    # preferred_region ã®è¨­å®
+    case through_type
+    when :IN_THROUGH, :THROUGH
+      @region = end_region
+    when :OUT_THROUGH, :TO_THROUGH
+      @region = start_region
+    else
+      raise "Unknown through_type #{through_type}"
+    end
+  end
+
+  #===  ã»ã«ã®ååãå¾ã
+  def get_cell_name
+    @cell_name
+  end
+
+  #=== NamespacePath ãå¾ã
+  # çæããã»ã«ã® namespace path ãçæãã
+  def get_cell_namespace_path
+#    nsp = @region.get_namespace.get_namespace_path
+    nsp = @region.get_namespace_path
+    return nsp.append( @cell_name )
+  end
+
+  #===  çæãããã»ã«ã®åãå£ã®ååãå¾ã
+  def get_through_entry_port_name
+    @entry_port_name
+  end
+
+  #===  å®£è¨ã³ã¼ãã®çæ
+  #      typedef, signature, celltype ãªã©ï¼cell ä»¥å¤ï¼ã®ã³ã¼ããçæ
+  #          éè¤ãã¦çæãã¦ã¯ãªããªãï¼ãã§ã«çæããã¦ããå ´åã¯åºåããªããã¨ï¼
+  #file::        FILE       çæãããã¡ã¤ã«
+  def gen_plugin_decl_code( file )
+
+    # ãã®ã»ã«ã¿ã¤ãï¼åãã·ã°ããã£ï¼ã¯æ¢ã«çæããã¦ãããï¼
+    if @@generated_celltype[ @ct_name ] == nil then
+      @@generated_celltype[ @ct_name ] = [ self ]
+    else
+      @@generated_celltype[ @ct_name ] << self
+      return
+    end
+
+    file2 = CFile.open( "#{$gen}/#{@ct_name}.cdl", "w" )
+
+    send_receive = []
+    if @signature != nil then
+      @signature.each_param{ |fd,param|
+        dir =param.get_direction
+        case dir
+        when :SEND, :RECEIVE
+          send_receive << [ dir, fd, param ]
+        end
+      }
+    end
+
+    file2.print <<EOT
+celltype #{@ct_name} {
+EOT
+
+    if send_receive.length > 0 then
+      file2.print "  [ allocator(\n"
+      delim = ""
+      send_receive.each { |a|
+        file2.print "#{delim}\t#{a[1].get_name}.#{a[2].get_name}<=#{@call_port_name}.#{a[1].get_name}.#{a[2].get_name}"
+        delim = ",\n"
+      }
+      file2.print "\n  )]\n"
+    end
+
+    file2.print <<EOT
+  entry #{@signature.get_namespace_path} #{@entry_port_name};
+  call  #{@signature.get_namespace_path} #{@call_port_name};
+};
+EOT
+    file2.close
+
+    file.print "import( \"#{$gen}/#{@ct_name}.cdl\" );\n"
+  end
+
+  #=== CDL ãã¡ã¤ã«ã®çæ
+  #file::     FILE    çæãããã¡ã¤ã«
+  def gen_cdl_file( file )
+    gen_plugin_decl_code( file )
+    gen_through_cell_code( file )
+  end
+
+  #===  ã»ã«ã³ã¼ãã®çæ
+  #     through æå®ã«ããçããã»ã«ã³ã¼ã(CDL)ãçæãã
+  #file::        FILE       çæãããã¡ã¤ã«
+  def gen_through_cell_code( file )
+
+    nest = @region.gen_region_str_pre file
+    nest_str = "  " * nest
+
+    file.print <<EOT
+#{nest_str}cell #{@ct_name} #{@cell_name} {
+#{nest_str}  #{@call_port_name} = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name};
+#{nest_str}};
+EOT
+    @region.gen_region_str_post file
+
+  end
+
+  #=== å¾ãã®ã³ã¼ããçæ
+  #ãã©ã°ã¤ã³ã®å¾ãã®ã³ã¼ã (CDL) ãçæ
+  #file:: File: 
+  def self.gen_post_code( file )
+    # è¤æ°ã®ãã©ã°ã¤ã³ã® post_code ãä¸ã¤ã®ãã¡ã¤ã«ã«å«ã¾ãããããä»¥ä¸ã®ãããªè¦åºããã¤ãããã¨
+    # file.print "/* '#{self.class.name}' post code */\n"
+  end
+
+  #===  åãå£é¢æ°ã®æ¬ä½(Cè¨èª)ãçæãã
+  #     éå¸¸ã§ããã°ãã¸ã§ãã¬ã¼ã¿ã¯åãå£é¢æ°ã®ãã³ãã¬ã¼ããçæãã
+  #     ãã©ã°ã¤ã³ã®å ´åãå¤æ´ããå¿
+è¦ã®ãªãã»ã«ã¿ã¤ãã³ã¼ããçæãã
+  #file::           FILE        åºåå
+ãã¡ã¤ã«
+  #b_singleton::    bool        true if singleton
+  #ct_name::        Symbol
+  #global_ct_name:: string
+  #sig_name::       string
+  #ep_name::        string
+  #func_name::      string
+  #func_global_name:: string
+  #func_type::      class derived from Type
+  def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+
+    ret_type = func_type.get_type
+    b_ret_void = ret_type.is_void?
+
+    if ! b_ret_void then
+      file.print( "  #{ret_type.get_type_str}  retval;\n" )
+    end
+
+    if ! b_singleton then
+
+      file.print <<EOT
+  #{ct_name}_CB    *p_cellcb;
+  if( VALID_IDX( idx ) ){
+    p_cellcb = #{global_ct_name}_GET_CELLCB(idx);
+  }else{
+     /* ã¨ã©ã¼å¦çã³ã¼ããããã«è¨è¿° */
+  }
+
+EOT
+    end
+
+    # p "celltype_name, sig_name, func_name, func_global_name"
+    # p "#{ct_name}, #{sig_name}, #{func_name}, #{func_global_name}"
+
+    delim = ""
+    if ! b_ret_void then
+      file.print( "  retval = " )
+    end
+
+    file.print( "#{@call_port_name}_#{func_name}(" )
+
+#    if ( ! b_singleton ) then
+#      file.print( " tecs_this" )
+#      delim = ","
+#    end
+
+    params.each{ |param|
+      file.printf( "#{delim} #{param.get_name}" )
+      delim = ","
+    }
+
+    file.print( " );\n" )
+
+    if ! b_ret_void then
+      file.print( "  return retval;\n" )
+    end
+  end
+
+  #=== Through ãã©ã°ã¤ã³ã®å¼æ°ã®ååãç½®æãã
+  def check_plugin_arg( ident, rhs )
+    rhs = subst_name rhs
+    super( ident, rhs )
+  end
+
+  #=== ThroughPlugin#ååã®ç½®æ
+  # ãã©ã°ã¤ã³ãªãã·ã§ã³å¼æ°å
+ã®æå­åãç½®æãã
+  #   $source$       â¦ å¼ã³å
+ã®ã»ã«å
+  #   $destination$  â¦ å¼ã³å
+ã®ã»ã«å
+  #   $SOURCE$       â¦ å¼ã³å
+ã®ã»ã«å (ãªã¼ã¸ã§ã³åã '_' ã§é£çµãã global_name)
+  #   $DESTINATION$  â¦ å¼ã³å
+ã®ã»ã«å (ãªã¼ã¸ã§ã³åã '_' ã§é£çµãã global_name)
+  #   $next$         â¦ æ¬¡ã®ã»ã«å
+  #                     è¤æ°ã® through ãã¤ãªãã£ã¦ããå ´åãããå¾ãã«æ¥ããã®
+  #   $NEXT$         â¦ æ¬¡ã®ã»ã«å (ãªã¼ã¸ã§ã³åã '_' ã§é£çµãã global_name)
+  #                     è¤æ°ã® through ãã¤ãªãã£ã¦ããå ´åãããå¾ãã«æ¥ããã®
+  #   $start_region$ â¦ $source$ ã®ã»ã«ã®å­å¨ãã region (global_name)
+  #   $end_region$   â¦ $destination$ ã®ã»ã«ã®å­å¨ãã region (global_name)
+  #   $preferred_region$  â¦ é©åãª region (global_name), start_region ã¾ãã¯ end_region
+  #   $count$        â¦ region éã® through ã®é©ç¨æ°
+  #   $$             â¦ $ ã«ç½®æ
+  def subst_name( str )
+    # ã»ã«åã®ç½®æ
+    str = str.gsub( /(^|[^\$])\$source\$/, "\\1#{@caller_cell.get_name}" )
+    str = str.gsub( /(^|[^\$])\$destination\$/, "\\1#{@callee_cell.get_name}" )
+    str = str.gsub( /(^|[^\$])\$SOURCE\$/, "\\1#{@caller_cell.get_global_name}" )
+    str = str.gsub( /(^|[^\$])\$DESTINATION\$/, "\\1#{@callee_cell.get_global_name}" )
+    str = str.gsub( /(^|[^\$])\$next\$/, "\\1#{@next_cell.get_name}" )
+    str = str.gsub( /(^|[^\$])\$NEXT\$/, "\\1#{@next_cell.get_global_name}" )
+    # region åã®ç½®æ
+    str = str.gsub( /(^|[^\$])\$start_region\$/, "\\1#{@start_region.get_global_name}" )
+    str = str.gsub( /(^|[^\$])\$end_region\$/, "\\1#{@end_region.get_global_name}" )
+    str = str.gsub( /(^|[^\$])\$preferred_region\$/, "\\1#{@region.get_global_name}" )
+    str = str.gsub( /(^|[^\$])\$count\$/, "\\1#{@count}" )
+
+    str = str.gsub( /\$\$/, "\$" )                       # $$ ã $ ã«ç½®æ
+
+    return str
+  end
+
+  def show_tree( indent )
+    indent.times { print "  " }
+    puts "Plugin: celltype: #{@ct_name} cell: #{@cell_name}"
+    (indent+1).times { print "  " }
+    puts "next: signature: #{@signature.get_namespace_path} call = #{@next_cell.get_name}.#{@next_cell_port_name}"
+  end
+end
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/TracePlugin.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/TracePlugin.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/TracePlugin.rb	(revision 270)
@@ -0,0 +1,503 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: TracePlugin.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+class TracePlugin < ThroughPlugin
+#@cellEntry_list::[ "Cell.eEntry", "Cell2.eEntry2", ... ]
+#@b_generate::bool  : true : TracePlugin ãçæããå¿
+è¦ããã
+
+  #=== TracePlugin ã® initialize
+  #  èª¬æã¯ ThroughPlugin (plugin.rb) ãåç
+§
+  def initialize( cell_name, plugin_arg, next_cell, next_cell_port_name, signature, celltype, caller_cell )
+
+    @maxArrayDisplay = 16
+    @cellEntry_list  = []
+    @probeName       = ""
+    @b_generate      = false
+    @b_displayTime   = false
+    @kernelCelltype  = :"tKernel"
+    @syslogCelltype  = :"tSysLog"
+
+    super
+    @plugin_arg_check_proc_tab = TracePluginArgProc
+    parse_plugin_arg
+
+    if @cellEntry_list.length > 0 then
+      @cellEntry_list.each{ |ce|
+        if "#{next_cell.get_name}.#{next_cell_port_name}".to_sym == ce.to_sym
+          @b_generate = true
+        end
+      }
+    else
+      @b_generate = true
+    end
+
+    if @b_generate == false then
+      # å
+ã
+å¼ã³åºãã»ã«ã«çµåãããã®ã¨ãã
+      @entry_port_name = next_cell_port_name
+      @cell_name = next_cell.get_name
+    end
+  end
+
+  #===  å®£è¨ã³ã¼ãã®çæ
+  #      typedef, signature, celltype ãªã©ï¼cell ä»¥å¤ï¼ã®ã³ã¼ããçæ
+  #          éè¤ãã¦çæãã¦ã¯ãªããªãï¼ãã§ã«çæããã¦ããå ´åã¯åºåããªããã¨ï¼
+  #file::        FILE       çæãããã¡ã¤ã«
+  def gen_plugin_decl_code( file )
+
+    # ãã®ã»ã«ã¿ã¤ãï¼åãã·ã°ããã£ï¼ã¯æ¢ã«çæããã¦ãããï¼
+    if @@generated_celltype[ @ct_name ] == nil then
+      @@generated_celltype[ @ct_name ] = [ self ]
+    else
+      @@generated_celltype[ @ct_name ] << self
+      return
+    end
+
+    file2 = CFile.open( "#{$gen}/#{@ct_name}.cdl", "w" )
+
+    send_receive = []
+    if @signature != nil then
+      @signature.each_param{ |fd,param|
+        dir =param.get_direction
+        case dir
+        when :SEND, :RECEIVE
+          send_receive << [ dir, fd, param ]
+        end
+      }
+    end
+
+    file2.print <<EOT
+celltype #{@ct_name} {
+EOT
+
+    if send_receive.length > 0 then
+      file2.print "  [ allocator(\n"
+      delim = ""
+      send_receive.each { |a|
+        file2.print "#{delim}\t#{a[1].get_name}.#{a[2].get_name}<=#{@call_port_name}.#{a[1].get_name}.#{a[2].get_name}"
+        delim = ",\n"
+      }
+      file2.print "\n  )]\n"
+    end
+
+    file2.print <<EOT
+  entry #{@signature.get_namespace_path} #{@entry_port_name};
+  call  #{@signature.get_namespace_path} #{@call_port_name};
+  attr{
+    char_t   *probeName_str      = "";
+    char_t   *from_str           = "";
+  };
+  require  #{@syslogCelltype}.eSysLog;
+  require  #{@kernelCelltype}.eKernel;
+};
+EOT
+#    char_t   *cell_port_name_str = "";
+
+    file2.close
+
+    file.print "import( \"#{$gen}/#{@ct_name}.cdl\" );\n"
+  end
+
+  def gen_through_cell_code( file )
+
+    gen_plugin_decl_code( file )
+
+    if @b_generate != false then
+      nest = @region.gen_region_str_pre file
+      indent_str =  "  " * nest
+
+      if @probeName then
+        probeName_str = "#{indent_str}  probeName_str = \"" + @probeName + ": \";\n"
+      else
+        probeName_str = ""
+      end
+      if @caller_cell then
+        caller_cell_str = "#{indent_str}  from_str = \"#{@caller_cell.get_name}\";\n"
+      else
+        caller_cell_str = ""
+      end
+
+      file.print <<EOT
+#{indent_str}cell #{@ct_name} #{@cell_name} {
+#{indent_str}  #{@call_port_name} = #{@next_cell.get_namespace_path.get_path_str}.#{@next_cell_port_name};
+#{probeName_str}#{caller_cell_str}#{indent_str}};
+EOT
+#  cell_port_name_str = \"#{@next_cell.get_name}.#{@next_cell_port_name}\";
+      @region.gen_region_str_post file
+    end
+
+  end
+
+  def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+
+    if ! func_type.get_type.is_void? then
+      file.print( "\t#{func_type.get_type_str}\tretval;\n" )
+    end
+
+    file.print( "\tSYSUTM\tutime;\n" )
+
+    if ! b_singleton then
+
+      file.print <<EOT
+\t#{ct_name}_CB *p_cellcb;
+\tif( VALID_IDX( idx ) ){
+\t\tp_cellcb = #{global_ct_name}_GET_CELLCB(idx);
+\t}else{
+\t\t/* put code here for error */
+\t}
+
+EOT
+    end
+
+#    p "celltype_name, sig_name, func_name, func_global_name"
+#    p "#{ct_name}, #{sig_name}, #{func_name}, #{func_global_name}"
+
+
+    file.print <<EOT
+\tgetMicroTime( &utime );
+\tsyslog( LOG_INFO, \"Enter: %sTime=%d: #{@next_cell.get_name}.#{@next_cell_port_name}.#{func_name} calledFrom: %s\", ATTR_probeName_str, utime, ATTR_from_str );
+EOT
+
+    print_params( params, file, 0, :IN )
+
+    delim = ""
+    if ! func_type.get_type.is_void? then
+      file.print( "\tretval = " )
+    else
+      file.print( "\t" )
+    end
+
+    file.print( "#{@call_port_name}_#{func_name}(" )
+
+    params.each{ |param|
+      file.printf( "#{delim} #{param.get_name}" )
+      delim = ","
+    }
+    file.print( " );\n" )
+
+    file.print <<EOT
+\tgetMicroTime( &utime );
+\tsyslog( LOG_INFO, \"Leave: %sTime=%d: #{@next_cell.get_name}.#{@next_cell_port_name}.#{func_name}\", ATTR_probeName_str, utime );
+EOT
+
+    print_params( params, file, 0, :OUT )
+
+    if( ! func_type.get_type.is_void? ) then
+      print_param( "retval", func_type.get_type, file, 0, :RETURN, func_type.get_type.get_type_str, nil, nil)
+      file.print( "\treturn retval;\n" )
+    end
+
+  end
+
+  def print_params( params, file, nest, direction )
+    params.each{ |param|
+      dir = param.get_direction
+      if( direction == :IN )then
+        case dir
+        when :IN, :INOUT, :SEND
+          print_param( param.get_name, param.get_type, file, nest, dir, param.get_type.get_type_str, nil, nil )
+        end
+      else
+        case dir
+        when :OUT, :INOUT
+          print_param( param.get_name, param.get_type, file, nest, dir, param.get_type.get_type_str, nil, nil )
+        when  :RECEIVE
+          outer = "*"
+          outer2 = nil
+          print_param( param.get_name, param.get_type.get_referto, file, nest, dir,
+                       param.get_type.get_referto.get_type_str, outer, outer2 )
+        end
+      end
+    }
+  end
+
+  def print_param( name, type, file, nest, direction, type_str, outer, outer2, name_list = nil )
+    indent = "    " * ( nest + 1 )
+
+    case type
+    when DefinedType
+      print_param( name, type.get_type, file, nest, direction, type_str, outer, outer2, name_list )
+    when VoidType
+    when BoolType
+      file.print( "#{indent}syslog( LOG_INFO, \"#{indent}[#{direction}]#{type_str} #{outer}#{name}#{outer2} = %d;\", #{outer}#{name}#{outer2} );\n" )
+    when IntType
+      file.print <<EOT
+#{indent}if( sizeof(#{outer}#{name}#{outer2}) > sizeof(int_t) )
+#{indent}\tsyslog( LOG_INFO, \"#{indent}[#{direction}]#{type_str} #{outer}#{name}#{outer2} = %ld;\", (long)#{outer}#{name}#{outer2} );
+#{indent}else
+#{indent}\tsyslog( LOG_INFO, \"#{indent}[#{direction}]#{type_str} #{outer}#{name}#{outer2} = %d;\", #{outer}#{name}#{outer2} );
+EOT
+#      file.print( "#{indent}syslog( LOG_INFO, \"#{indent}[#{direction}]#{type_str} #{outer}#{name}#{outer2} = %ld;\", (long)#{outer}#{name}#{outer2} );\n" )
+    when FloatType
+      file.print( "#{indent}syslog( LOG_INFO, \"#{indent}[#{direction}]#{type_str} #{outer}#{name}#{outer2} = %g;\", (double)#{outer}#{name}#{outer2} );\n" )
+    when EnumType  # mikan EnumType
+
+    when StructType
+      members_decl =type.get_members_decl
+      if outer || outer2
+        outer = "(#{outer}#{name}#{outer2})."
+      else
+        outer = "#{name}."
+      end
+      members_decl.get_items.each { |m|
+        print_param( m.get_name, m.get_type, file, nest, direction, m.get_type.get_type_str, outer, nil, members_decl )
+      }
+    when FuncType  # mikan FuncType
+    when ArrayType # mikan ArrayType
+    when PtrType
+
+      se = type.get_size
+      ce = type.get_count
+      max_loop = @maxArrayDisplay
+      loop_count = nil
+
+      if se then
+        loop_count = "(((#{se.to_str( name_list, outer, outer2 )})>#{max_loop}) ? #{max_loop} : (#{se.to_str( name_list, outer, outer2 )}))"
+        file.print( "#{indent}syslog( LOG_INFO, \"#{indent}size_is(#{se.to_str( name_list, outer, outer2 )})=%d\", #{se.to_str( name_list, outer, outer2 )} );\n" )
+        size = "#{se.to_str( name_list, outer, outer2 )}"
+      elsif ce then
+        loop_count = "(((#{ce.to_str( name_list, outer, outer2 )})>#{max_loop}) ? #{max_loop} : (#{ce.to_str( name_list, outer, outer2 )})) "
+        file.print( "#{indent}syslog( LOG_INFO, \"#{indent}count_is(#{ce.to_str( name_list, outer, outer2 )})=%d\", #{ce.to_str( name_list, outer, outer2 )} );\n" )
+        size = "#{ce.to_str( name_list, outer, outer2 )}"
+      end
+
+      # mikan PtrType: string
+
+      referto = type.get_referto
+      type0 = type
+      type = referto
+      type_str = type.get_type_str
+      if type.kind_of?( DefinedType ) then
+        type = type.get_original_type
+      end
+
+      if type0.is_nullable? then
+        nest += 1
+        indent0 = indent
+        outer0 = outer
+        outer20 = outer2
+        indent += "    "
+        file.print"#{indent0}if( #{outer}#{name}#{outer2} ){\n"
+      end
+
+      if loop_count == nil then
+        case type
+        when StructType
+          members = type.get_members_decl
+          if outer || outer2
+            outer = "(#{outer}#{name}#{outer2})->"
+          else
+            outer = "#{name}->"
+          end
+          outer2 = nil
+          members.get_items.each { |m|
+            print_param( m.get_name, m.get_type, file, nest, direction, m.get_type.get_type_str, outer, outer2, members )
+          }
+        when FuncType  # mikan FuncType
+        when ArrayType # mikan ArrayType
+        when BoolType, IntType, FloatType, EnumType, PtrType
+          outer = "*#{outer}"
+          outer2 = "#{outer2}"
+          print_param( name, type, file, nest, direction, type_str, outer, outer2 )
+        end
+      else # loop_count != nil
+        if type.kind_of?( PtrType ) || type.kind_of?( StructType ) then
+          num_per_loop = 1
+        else
+          num_per_loop = 4
+        end
+
+          file.print <<EOT
+#{indent}{
+#{indent}\tint i__#{nest}, loop_count__ = #{loop_count};
+#{indent}\tfor( i__#{nest} = 0; i__#{nest} < loop_count__; i__#{nest}+=#{num_per_loop} ){
+EOT
+
+        case type
+        when StructType
+          members = type.get_members_decl
+          if outer || outer2
+            outer = "(#{outer}#{name}#{outer2})[i__#{nest}]."
+          else
+            outer = "#{name}[i__#{nest}]."
+          end
+          members.get_items.each { |m|
+            print_param( m.get_name, m.get_type, file, nest + 1, direction, m.get_type.get_type_str, outer, nil, members )
+          }
+        when FuncType  # mikan FuncType
+        when ArrayType # mikan ArrayType
+
+        when BoolType, FloatType
+          if outer || outer2
+            outer = "(#{outer}"
+            outer2 = "#{outer2})"
+          end
+
+          file.print <<EOT
+#{indent}\t\tsyslog( LOG_INFO, \"#{indent}[#{direction}]#{type_str} #{name}[%d]: %d %d %d %d\",
+#{indent}\t\t\t\ti__#{nest}, #{outer}#{name}#{outer2}[i__#{nest}], #{outer}#{name}#{outer2}[i__#{nest}+1], #{outer}#{name}#{outer2}[i__#{nest}+2], #{outer}#{name}#{outer2}[i__#{nest}+3] );
+EOT
+        when IntType
+          if outer || outer2
+            outer = "(#{outer}"
+            outer2 = "#{outer2})"
+          end
+
+          file.print <<EOT
+#{indent}\t\tif( sizeof(#{outer}#{name}#{outer2}) > sizeof(int_t) )
+#{indent}\t\t\tsyslog( LOG_INFO, \"#{indent}[#{direction}]#{type_str} #{name}[%d]: %02x %02x %02x %02x\",
+#{indent}\t\t\t\t\ti__#{nest}, #{outer}#{name}#{outer2}[i__#{nest}], #{outer}#{name}#{outer2}[i__#{nest}+1], #{outer}#{name}#{outer2}[i__#{nest}+2], #{outer}#{name}#{outer2}[i__#{nest}+3] );
+#{indent}\t\telse
+#{indent}\t\t\tsyslog( LOG_INFO, \"#{indent}[#{direction}]#{type_str} #{name}[%d]: %02lx %02lx %02lx %02lx\",
+#{indent}\t\t\t\t\ti__#{nest}, #{outer}#{name}#{outer2}[i__#{nest}], #{outer}#{name}#{outer2}[i__#{nest}+1], #{outer}#{name}#{outer2}[i__#{nest}+2], #{outer}#{name}#{outer2}[i__#{nest}+3] );
+EOT
+
+        when PtrType
+          # type = type.get_referto
+          if outer || outer2
+            outer = "(#{outer}"
+            outer2 = "#{outer2})[i__#{nest}]"
+          else
+            outer = ""
+            outer2 = "[i__#{nest}]"
+          end
+          print_param( name, type, file, nest + 1, direction, type_str, outer, outer2 )
+        end
+
+        file.print <<EOT
+#{indent}\t} /* for ( i__#{nest} ) */
+#{indent}\tif( i__#{nest} < #{size} )
+#{indent}\t\tsyslog( LOG_INFO, \"#{indent}(%d elements are omitted)\", #{size} - i__#{nest} );
+#{indent}\telse if( i__#{nest} > #{size} )
+#{indent}\t\tsyslog( LOG_INFO, \"#{indent}(last %d elements are void)\", i__#{nest} - #{size} );
+#{indent}}
+EOT
+      end # loop_count == nil
+
+      if type0.is_nullable? then
+        file.print <<EOT
+#{indent0}} else {
+#{indent0}    syslog( LOG_INFO, \"#{indent0}[#{direction}]#{outer0}#{name}#{outer20} = NULL\" );
+#{indent0}}
+EOT
+      end
+    end
+  end
+
+  # ãã©ã°ã¤ã³å¼æ°åã¨ Proc
+  TracePluginArgProc = {
+    "maxArrayDisplay"    => Proc.new { |obj,rhs| obj.set_maxArrayDisplay rhs },
+    "cellEntry"          => Proc.new { |obj,rhs| obj.set_cellEntry rhs },
+    "probeName"          => Proc.new { |obj,rhs| obj.set_probeName rhs },
+    "displayTime"        => Proc.new { |obj,rhs| obj.set_displayTime rhs },
+    "kernelCelltype"     => Proc.new { |obj,rhs| obj.set_kernelCelltype rhs },
+    "syslogCelltype"     => Proc.new { |obj,rhs| obj.set_syslogCelltype rhs },
+  }
+
+  def set_maxArrayDisplay rhs
+    @maxArrayDisplay = rhs
+  end
+
+  def set_cellEntry rhs
+    ces = rhs.to_s.split /\s*,\s*/
+    ces.each{ |ce|
+      if ce =~ /^[A-Za-z_]\w*\.[A-Za-z_]\w*$/ then
+        # OK
+      else
+        cdl_error( "#{ce}: TracePlugin arg not in \"symbol.symbol\" form" )
+      end
+    }
+    @cellEntry_list.concat ces
+  end
+
+  def set_probeName rhs
+    @probeName = rhs.to_s
+  end
+
+  def set_displayTime rhs
+    if rhs.to_s == "true"
+      @b_diplayTime = true
+    elsif rhs.to_s == "false"
+      @b_diplayTime = false
+    else
+      cdl_error( "displayTime : #{rhs} unsuitable: specify true or false" )
+    end
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° tKernel ã®ãã§ãã¯
+  def set_kernelCelltype( rhs )
+    @kernelCelltype = rhs.to_sym
+    nsp = NamespacePath.analyze( @kernelCelltype.to_s )
+    obj = Namespace.find( nsp )
+    if ! obj.instance_of?( Celltype ) && ! obj.instance_of?( CompositeCelltype ) then
+      cdl_error( "TracePlugin: kernelCelltype '#{rhs}' not celltype or not defined" )
+    end
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° tSyslog ã®ãã§ãã¯
+  def set_syslogCelltype( rhs )
+    @syslogCelltype = rhs.to_sym
+    nsp = NamespacePath.analyze( @syslogCelltype.to_s )
+    obj = Namespace.find( nsp )
+    if ! obj.instance_of?( Celltype ) && ! obj.instance_of?( CompositeCelltype ) then
+      cdl_error( "TracePlugin: syslogCelltype '#{rhs}' not celltype or not defined" )
+    end
+  end
+
+end
+
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/lib/GenHRP2Marshaler.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/lib/GenHRP2Marshaler.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/lib/GenHRP2Marshaler.rb	(revision 270)
@@ -0,0 +1,799 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#++
+
+#ãã©ã°ã¤ã³ãªãã·ã§ã³ç¨å¤æ°
+#@task_priority:: Integer
+#@channelCelltype:: String
+#@channelCellName:: String
+#@PPAllocatorSize:: Integer
+module GenTransparentMarshaler
+
+  # ãã©ã°ã¤ã³å¼æ°åã¨ Proc
+  RPCPluginArgProc = {
+    "taskPriority"    => Proc.new { |obj,rhs| obj.set_taskPriority rhs },
+    "channelCelltype" => Proc.new { |obj,rhs| obj.set_channelCelltype rhs },
+    "TDRCelltype"     => Proc.new { |obj,rhs| obj.set_TDRCelltype rhs },
+    "channelCell"     => Proc.new { |obj,rhs| obj.set_channelCellName rhs },
+    "PPAllocatorSize" => Proc.new { |obj,rhs| obj.set_PPAllocatorSize rhs },
+  }
+
+  #=== ãã©ã°ã¤ã³å¼æ° taskPriority ã®ãã§ãã¯
+  def set_taskPriority( rhs )
+    @task_priority = rhs
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° channelCelltype ã®ãã§ãã¯
+  def set_channelCelltype( rhs )
+    @channelCelltype = rhs.to_sym
+    # path = [ "::", @channelCelltype ]
+    # obj = Namespace.find( path )
+    nsp = NamespacePath.analyze( @channelCelltype.to_s )
+    obj = Namespace.find( nsp )
+    if ! obj.instance_of?( Celltype ) && ! obj.instance_of?( CompositeCelltype ) then
+      cdl_error( "RPCPlugin: channeclCelltype '#{rhs}' not celltype or not found" )
+    end
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° TDRCelltype ã®ãã§ãã¯
+  def set_TDRCelltype( rhs )
+    @TDRCelltype = rhs.to_sym
+    # path = [ "::", @TDRCelltype ]
+    # obj = Namespace.find( path )
+    nsp = NamespacePath.analyze( @TDRCelltype.to_s )
+    obj = Namespace.find( nsp )
+    if ! obj.instance_of?( Celltype ) && ! obj.instance_of?( CompositeCelltype ) then
+      cdl_error( "RPCPlugin: TDRCelltype '#{rhs}' not celltype or not found" )
+    end
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° channelCellName ã®ãã§ãã¯
+  def set_channelCellName( rhs )
+    @channelCellName = rhs
+    if @channelCellName =~ /\A[a-zA-Z_]\w*/ then
+      # OK
+    else
+      cdl_error( "RPCPlugin: channeclCellName '#{rhs}' unsuitable for identifier" )
+    end
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° PPAllocatorSize ã®ãã§ãã¯
+  def set_PPAllocatorSize( rhs )
+    @PPAllocatorSize = rhs
+  end
+
+  #=== marshaler ã®ã»ã«ã¿ã¤ãåãè¨­å®ãã
+  def initialize_transparent_marshaler cell_name
+    @task_priority = 8
+    @channelCelltype = "tDataqueueOWChannel"
+    @TDRCelltype     = "tTDR"
+    @channelCellName = "#{cell_name}_Channel"
+    @PPAllocatorSize = nil
+
+    @marshaler_celltype_name = "tMarshaler_#{@signature.get_name}"
+    @unmarshaler_celltype_name = "tUnmarshaler_#{@signature.get_name}"
+    @marshaler_celltype_file_name = "#{$gen}/#{@marshaler_celltype_name}.cdl"
+  end
+
+  def gen_marshaler_celltype 
+
+    if @PPAllocatorSize then
+      alloc_call_port = "  call sPPAllocator cPPAllocator;\n"
+    else
+      alloc_call_port = ""
+    end
+
+    f = CFile.open( @marshaler_celltype_file_name, "w" )
+    # åãå
+å®¹ãäºåº¦æ¸ãå¯è½æ§ãã (AppFile ã¯ä¸å¯)
+
+    # modified by ishikawa
+    f.print <<EOT
+
+celltype #{@marshaler_celltype_name} {
+  entry #{@signature.get_name} eClientEntry;
+  call sEventflag  cEventflag;
+  call sSemaphore  cSemaphore;
+  call sMessageBuffer cMessageBuffer;
+  //[optional]
+  //  call sSemaphore cLockChannel;  // this port is eliminated by optimize
+};
+celltype #{@unmarshaler_celltype_name} {
+  call #{@signature.get_name} cServerCall;
+  call sEventflag  cEventflag;
+  call sSemaphore  cSemaphore;
+  call sMessageBuffer cMessageBuffer;
+  entry sTaskBody  eUnmarshalAndCallFunction;
+#{alloc_call_port}
+  FACTORY{
+    write("$ct$_factory.h", "#include <t_syslog.h>");
+  };
+};
+EOT
+    f.close
+  end
+
+  #===  åãå£é¢æ°ã®æ¬ä½ã³ã¼ããçæï¼é ­é¨ã¨æ«å°¾ã¯å¥éåºåï¼
+  #ct_name:: Symbol    (through ãã©ã°ã¤ã³ã§çæããã) ã»ã«ã¿ã¤ãå ï¼Symbol ã¨ãã¦éããã¦ããï¼ãããï¼
+  def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+
+    # unmarshaler ã¯ã©ã¹ã?
+    if ct_name == @unmarshaler_celltype_name.to_sym then
+      gen_ep_func_body_unmarshal( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+    else
+      gen_ep_func_body_marshal( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+    end
+  end
+
+  #===  marshal ã³ã¼ãã®çæ
+  def gen_ep_func_body_marshal( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+
+    b_void = false
+    b_ret_er = false
+
+    # é¢æ°ã®æ»ãå¤ã®å
+ã®åãå¾ã(typedef ããã¦ããå ´å)
+    type = func_type.get_type.get_original_type
+
+    # æ»ãå¤è¨æ¶ç¨ã®å¤æ°ãåºåï¼void åã®é¢æ°ã§ã¯åºåããªãï¼
+    if ! type.kind_of?( VoidType ) then
+      if func_type.get_type.kind_of?( DefinedType ) && ( func_type.get_type.get_type_str == "ER" || func_type.get_type.get_type_str == "ER_INT" ) then
+        file.print( "    #{func_type.get_type.get_type_str}  retval_ = E_OK;\n" )
+        b_ret_er = true
+      else
+        file.print( "    #{func_type.get_type.get_type_str}  retval_;\n" )
+      end
+    else
+      b_void = true
+    end
+
+    file.print( "    ER      ercd_;\n" )
+    file.print( "    FLGPTN  flgptn;\n" )
+
+    # å¼ã³å
+ã® signature ãåãåºã
+    signature = @signature
+
+    # é¢æ° ID ï¼æ´æ°å¤ï¼
+    func_id = signature.get_id_from_func_name( func_name )
+    file.print( "    int16_t  func_id_ = #{func_id};    /* id of #{func_name}: #{func_id} */\n" )
+
+    file.print( "    uint8_t  msg[256];\n" )
+
+    # ã·ã³ã°ã«ãã³ã§ãªããï¼
+    if ! b_singleton then
+
+      # singleton ã§ãªããã° p_cellcb åå¾ã³ã¼ããåºå
+      file.print <<EOT
+    #{ct_name}_CB *p_cellcb;
+
+    if( VALID_IDX( idx ) ){
+        p_cellcb = GET_CELLCB(idx);
+EOT
+
+      # ã¨ã©ã¼ãè¿ããï¼
+      if b_ret_er then
+        file.print <<EOT
+    }else{
+         return ERCD( E_RPC, E_ID );
+    }
+EOT
+      else
+        file.print <<EOT
+    }else{
+        /* ã¨ã©ã¼å¦çã³ã¼ããããã«è¨è¿° */
+    }
+EOT
+      end
+    end
+
+    # channel lock ã³ã¼ã
+    file.print <<EOT
+    ///* Channel Lock */
+    //if( is_cLockChannel_joined() )
+    //  cLockChannel_wait();
+
+EOT
+
+=begin
+    # SOP ãéä¿¡
+    file.print "    /* SOPã®éåº */\n"
+    file.print "    if( ( ercd_ = cTDR_sendSOP( true ) ) != E_OK )\n"
+    file.print "      goto error_reset;\n"
+=end
+
+    # func_id ãéä¿¡
+    file.print "    /* é¢æ° id ã®éåº */\n"
+=begin
+    file.print "    if( ( ercd_ = cTDR_putInt16( func_id_ ) ) != E_OK )\n"
+    file.print "        goto error_reset;\n"
+=end
+    file.print "    *((int16_t *)(&msg[0])) = func_id_;\n"   
+
+    # p "celltype_name, sig_name, func_name, func_global_name"
+    # p "#{ct_name}, #{sig_name}, #{func_name}, #{func_global_name}"
+
+    b_get = false    # marshal ãªã put
+    b_marshal = true  # marshal
+
+    # in æ¹åã®å
+¥åºåãåºå
+    @index = 2
+    file.print "    /* å
+¥åå¼æ°éåº */\n"
+    print_params( params, file, 1, b_marshal, b_get, true, func_type.is_oneway? )
+    print_params( params, file, 1, b_marshal, b_get, false, func_type.is_oneway? )
+=begin
+    if ! b_void && ! func_type.is_oneway? then
+      ret_ptr_type = PtrType.new( func_type.get_type )
+      print_param_nc( "retval_", ret_ptr_type, file, 1, :RETURN, "&", nil, b_get )
+    end
+=end
+
+    file.print "    /* EOPã®éåºï¼ãã±ããã®æãã ãï¼ */\n"
+    if ! func_type.is_oneway? then
+      b_continue = "true"
+    else
+      b_continue = "false"
+    end
+=begin
+    file.print "    if( (ercd_=cTDR_sendEOP(#{b_continue})) != E_OK )\n"
+    file.print "        goto error_reset;\n\n"
+=end
+    file.print "    if( (ercd_=cMessageBuffer_send(msg, #{@index})) != E_OK )\n"
+    file.print "        goto error_reset;\n\n"
+
+    file.print "        cSemaphore_signal();\n\n"
+
+    if ! func_type.is_oneway? then
+      file.print <<EOT
+    if( (ercd_=cEventflag_wait( 0x01, TWF_ANDW, &flgptn )) != E_OK ){
+      ercd_ = ERCD(E_RPC,ercd_);
+      goto error_reset;
+    }
+    if( (ercd_=cEventflag_clear( 0x00 ) ) != E_OK ){
+      ercd_ = ERCD(E_RPC,ercd_);
+      goto error_reset;
+    }
+EOT
+    end # ! func_type.is_oneway?
+
+    file.print <<EOT
+    ///* Channel Lock */
+    //if( is_cLockChannel_joined() )
+    //  cLockChannel_signal();
+EOT
+
+    if( b_void == false )then
+      # å¼ã³å
+ã«æ»ãå¤ããªã¿ã¼ã³
+      file.print( "    cMessageBuffer_receive(&retval_);\n" )
+      file.print( "    return retval_;\n" )
+    else
+      file.print( "    return;\n" )
+    end
+
+    file.print <<EOT
+
+error_reset:
+#if 0
+    if( ercd_ != ERCD( E_RPC, E_RESET ) )
+        (void)cTDR_reset();
+#endif
+EOT
+
+    # channel lock ã³ã¼ã
+    file.print <<EOT
+    ///* Channel Lock */
+    //if( is_cLockChannel_joined() )
+    //  cLockChannel_signal();
+
+EOT
+
+    if( b_ret_er != false )then
+      # å¼ã³å
+ã«æ»ãå¤ããªã¿ã¼ã³
+      file.print( "    return ercd_;\n" )
+    else
+      file.print( "    return;\n" )
+    end
+
+  end
+
+  #===  unmarshal ã³ã¼ãã®çæ
+  def gen_ep_func_body_unmarshal( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+
+#    b_ret_er = true
+    b_ret_er = false
+
+    # func_id ãå¾ãã³ã¼ããçæ
+    file.print <<EOT
+
+    int16_t   func_id_;
+    ER        ercd_;
+
+    #{ct_name}_CB *p_cellcb;
+
+    if( VALID_IDX( idx ) ){
+        p_cellcb = GET_CELLCB(idx);
+EOT
+
+    if b_ret_er then
+        file.print <<EOT
+    }else{
+        return ERCD( E_RPC, E_ID );
+    }
+EOT
+    else
+        file.print <<EOT
+    }else{
+        /* ã¨ã©ã¼å¦çã³ã¼ããããã«è¨è¿° */
+    }
+EOT
+    end
+
+    file.print <<EOT
+
+    cSemaphore_wait();
+
+#if 0
+    /* SOPã®ãã§ãã¯ */
+    if( (ercd_=cTDR_receiveSOP( false )) != E_OK )
+        goto error_reset;
+    /* func_id ã®åå¾ */
+    if( (ercd_=cTDR_getInt16( &func_id_ )) != E_OK )
+        goto error_reset;
+#endif
+
+    if( (ercd_ = cMessageBuffer_receive(msg) < 0 ) )
+        goto error_reset;
+    func_id_ = ((int16_t *)msg)[0];
+
+#ifdef RPC_DEBUG
+    syslog(LOG_INFO, "unmarshaler task: func_id: %d", func_id_ );
+#endif
+    switch( func_id_ ){
+EOT
+
+    # å¼ã³å
+ã® signature ãåãåºã
+    # port = @celltype.find( @next_cell_port_name )
+    # signature = port.get_signature
+    signature = @signature
+
+    # through ã® signature ã«å«ã¾ãã ãã¹ã¦ã®é¢æ°ã«ã¤ãã¦
+    signature.get_function_head_array.each { |f|
+      f_name = f.get_name
+      f_type = f.get_declarator.get_type
+      id = signature.get_id_from_func_name( f_name )
+
+      # é¢æ°ã¯è¿ãå¤ãæã¤ã?
+      if f_type.get_type.kind_of?( VoidType ) then
+        b_void = true
+      else
+        b_void = false
+      end
+
+      # ãã±ããã®çµããããã§ãã¯ï¼æªåãåãã®ãã¼ã¿ãæ®ã£ã¦ããªãããã§ãã¯ï¼
+      file.print "    case #{id}:       /*** #{f_name} ***/ \n"
+      file.print "        if( tTransparentUnmarshaler_#{@signature.get_name}_#{f_name}() != E_OK )\n"
+      file.print "            goto error_reset;\n"
+      file.print "        break;\n"
+
+    } # 
+
+    if @PPAllocatorSize then
+      ppallocator_dealloc_str = "    /* PPAllocator ã®ãã¹ã¦ãè§£æ¾ */\n    cPPAllocator_dealloc_all();"
+    else
+      ppallocator_dealloc_str = ""
+    end
+
+
+    file.print <<EOT
+    default:
+#if 0 // deleted by ishikawa: tSysLogãæªå®è£
+
+        syslog(LOG_INFO, "unmarshaler task: ERROR: unknown func_id: %d", func_id_ );
+#endif /* 0 */
+        break;
+    };
+#{ppallocator_dealloc_str}
+    return;
+
+error_reset:
+#if 0
+    if( ercd_ != ERCD( E_RPC, E_RESET ) )
+        (void)cTDR_reset();
+#else
+    return ercd_;
+#endif
+#{ppallocator_dealloc_str}
+EOT
+
+  end
+
+  # IN b_marshal, b_get
+  #  b_marshal = true  && b_get == false   :  ãã¼ã·ã£ã©ã§å
+¥åå¼æ°éåº
+  #  b_marshal = true  && b_get == true    :  ãã¼ã·ã£ã©ã§åºåå¼æ°åå
+  #  b_marshal = false && b_get == true    :  ã¢ã³ãã¼ã·ã£ã©ã§å
+¥åå¼æ°åå
+  #  b_marshal = false && b_get == get     :  ã¢ã³ãã¼ã·ã£ã©ã§åºåå¼æ°éåº
+  def print_params( params, file, nest, b_marshal, b_get, b_referenced, b_oneway = false )
+    params.each{ |param|
+# p "#{param.get_name}:  b_marshal: #{b_marshal} b_get: #{b_get}"
+      if ! ( b_referenced == param.is_referenced? ) then
+        next
+      end
+
+      dir = param.get_direction
+      type = param.get_type
+      if b_oneway && dir == :IN && type.get_original_type.kind_of?( PtrType ) || type.get_original_type.kind_of?( ArrayType ) then
+        # oneway, in, PtrType ã®å ´åã³ãã¼
+        alloc_cp = "cPPAllocator_alloc"
+        alloc_cp_extra = nil
+        print_param( param.get_name, type, file, nest, dir, nil, nil, b_get, alloc_cp, alloc_cp_extra )
+      else
+        if( b_get == false && b_marshal == true || b_get == true && b_marshal == false  )then
+          case dir
+#          when :IN, :INOUT, :SEND
+          when :IN, :INOUT, :OUT, :SEND, :RECEIVE
+            print_param_nc( param.get_name, type, file, nest, b_marshal, nil, nil, b_get )
+          end
+        else
+#         case dir
+#         when :OUT, :INOUT, :RECEIVE
+#         when :RECEIVE
+#           print_param_nc( param.get_name, type, file, nest, b_marshal, nil, nil, b_get )
+#         end
+        end
+      end
+    }
+  end
+
+  #=== ã³ãã¼ããªãå¼æ°æ¸¡ãã³ã¼ãã®åºå
+  def print_param_nc( name, type, file, nest, b_marshal, outer, outer2, b_get )
+    indent = "    " * ( nest + 1 )
+
+    case type
+    when DefinedType
+      print_param_nc( name, type.get_type, file, nest, b_marshal, outer, outer2, b_get )
+    when BoolType, IntType, FloatType, PtrType, ArrayType
+      case type
+      when BoolType
+        type_str = "Int8"
+        cast_str = "int8_t"
+      when IntType
+        bit_size = type.get_bit_size
+        case type.get_sign
+        when :UNSIGNED
+          signC = "U"
+          sign  = "u"
+        when :SIGNED
+          if bit_size == -1 || bit_size == -11 then
+            # signed char ã®å ´åãsigned ãæå®ãã
+            signC = "S"
+            sign  = "s"
+          else
+            signC = ""
+            sign  = ""
+          end
+        else
+          signC = ""
+          sign  = ""
+        end
+
+        # p "pn:: #{name} #{bit_size} #{type.get_type_str}"
+        case bit_size
+        when  -1, -11  # -1: char_t, -11: char
+          type_str = "#{signC}Char"
+          cast_str = "#{sign}char_t"
+        when -2
+          type_str = "#{signC}Short"
+          cast_str = "#{sign}short_t"
+        when -3
+          type_str = "#{signC}Int"
+          cast_str = "#{sign}int_t"
+        when -4
+          type_str = "#{signC}Long"
+          cast_str = "#{sign}long_t"
+        when -5
+          type_str = "Intptr"
+          cast_str = "intptr_t"
+        when 8, 16, 32, 64, 128
+          type_str = "#{signC}Int#{bit_size}"
+          cast_str = "#{sign}int#{bit_size}_t"
+        else
+          raise "unknown bit_size '#{bit_size}' for int type "
+        end
+
+      when FloatType
+        bit_size = type.get_bit_size
+        if bit_size == 32 then
+          type_str = "Float32"
+          cast_str = "float32_t"
+        else
+          type_str = "Double64"
+          cast_str = "double64_t"
+        end
+
+      when PtrType
+        type_str = "Intptr"
+        cast_str = "intptr_t"
+      when ArrayType
+        type_str = "Intptr"
+        cast_str = "intptr_t"
+      end
+
+      if type.get_type_str == cast_str then
+        cast_str = ""
+      else
+        cast_str = "(" + cast_str + ")"
+      end
+
+      if( b_get )then
+        cast_str.gsub!( /\)$/, "*)" )
+        file.print "    " * nest
+=begin
+        file.print "if( ( ercd_ = cTDR_get#{type_str}( #{cast_str}&(#{outer}#{name}#{outer2}) ) ) != E_OK )\n"
+        file.print "    " * nest
+        file.print "    goto error_reset;\n"
+=end
+        file.print "#{name} = *((#{type.get_type_str} *)(&msg[#{@index}]));\n"
+        if bit_size.nil?
+            raise "HRP2 RPC supports only specified bit_size"
+        else
+            case bit_size
+            when 8, 16, 32, 64, 128
+            else
+                raise "HRP2 RPC supports only specified bit_size"
+            end
+        end
+        @index += bit_size / 8
+      else
+        file.print "    " * nest
+=begin
+        file.print "if( ( ercd_ = cTDR_put#{type_str}( #{cast_str}#{outer}#{name}#{outer2} ) ) != E_OK )\n"
+        file.print "    " * nest
+        file.print "    goto error_reset;\n"
+=end
+        file.print "*((#{type.get_type_str} *)(&msg[#{@index}])) = #{name};\n"
+        if bit_size.nil?
+            raise "HRP2 RPC supports only specified bit_size"
+        else
+            case bit_size
+            when 8, 16, 32, 64, 128
+            else
+                raise "HRP2 RPC supports only specified bit_size"
+            end
+        end
+        @index += bit_size / 8
+      end
+
+    when StructType
+      members_decl =type.get_members_decl
+      members_decl.get_items.each { |m|
+        if m.is_referenced? then
+          print_param_nc( m.get_name, m.get_type, file, nest, b_marshal, "#{outer}#{name}#{outer2}.", nil, b_get )
+        end
+      }
+      members_decl.get_items.each { |m|
+        if ! m.is_referenced? then
+          print_param_nc( m.get_name, m.get_type, file, nest, b_marshal, "#{outer}#{name}#{outer2}.", nil, b_get )
+        end
+      }
+
+    when VoidType
+    when EnumType  # mikan EnumType
+    when FuncType  # mikan FuncType
+    end
+  end
+
+
+  #=== PREAMBLE é¨ã®ã³ã¼ãçæ
+  # ã¢ã³ãã¼ã·ã£ã©ã»ã«ã¿ã¤ãã®å ´åãã¢ã³ãã¼ã·ã£ã©é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨ãçæ
+  def gen_preamble file, b_singleton, ct_name, global_name
+    if ct_name != @unmarshaler_celltype_name.to_sym then
+      return
+    end
+
+    file.print "/* ã¢ã³ãã¼ã·ã£ã©é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨ */\n"
+    # signature ã«å«ã¾ãã ãã¹ã¦ã®é¢æ°ã«ã¤ãã¦
+    @signature.get_function_head_array.each { |f|
+      f_name = f.get_name
+      f_type = f.get_declarator.get_type
+      id = @signature.get_id_from_func_name( f_name )
+      file.print "static ER  tTransparentUnmarshaler_#{@signature.get_name}_#{f_name}();\t/* func_id: #{id} */\n"
+    }
+    file.print "\n"
+    file.print "static uint8_t msg[256];\n"
+    file.print "\n"
+  end
+
+  #=== POSTAMBLE é¨ã®ã³ã¼ãçæ
+  # ã¢ã³ãã¼ã·ã£ã©ã»ã«ã¿ã¤ãã®å ´åãã¢ã³ãã¼ã·ã£ã©é¢æ°ã®çæ
+  def gen_postamble file, b_singleton, ct_name, global_name
+    if ct_name != @unmarshaler_celltype_name.to_sym then
+      return
+    end
+
+    file.print "\n/*** ã¢ã³ãã¼ã·ã£ã©é¢æ° ***/\n\n"
+    @signature.get_function_head_array.each { |f|
+      f_name = f.get_name
+      f_type = f.get_declarator.get_type
+      id = @signature.get_id_from_func_name( f_name )
+
+      # é¢æ°ã¯è¿ãå¤ãæã¤ã?
+      if f_type.get_type.kind_of?( VoidType ) then
+        b_void = true
+      else
+        b_void = false
+      end
+
+      file.print <<EOT
+/*
+ * name:    #{f_name}
+ * func_id: #{id} 
+ */
+EOT
+      file.print "static ER\n"
+      file.print "tTransparentUnmarshaler_#{@signature.get_name}_#{f_name}()\n"
+      file.print "{\n"
+      file.print "	ER  ercd_;\n"
+
+      # å¼æ°ãååãå¤æ°ã®å®ç¾©
+      param_list = f.get_declarator.get_type.get_paramlist.get_items
+           # FuncHead->  Decl->    FuncType->ParamList
+      param_list.each{ |par|
+        name = par.get_name
+        type = par.get_type
+        if type.kind_of? ArrayType then
+          type = type.get_type
+          aster = "(*"
+          aster2 = ")"
+        else
+          aster = ""
+          aster2 = ""
+        end
+
+        type_str = type.get_type_str.gsub( /\bconst\b */, "" ) # "const" ãå¤ã
+
+        file.printf( "    %-12s %s%s%s%s;\n", type_str, aster, name, aster2, type.get_type_str_post )
+      }
+
+      # æ»ãå¤ãåãåãå¤æ°ã®å®ç¾©
+      if ! b_void then
+        if f.is_oneway? then
+          retval_ptr = ""   # oneway ã®å ´åãåãåããæ¨ã¦ããã
+        else
+          # =begin ishikawa modified
+          # retval_ptr = "*"
+          retval_ptr = ""
+          # =end ishikawa modified
+        end
+        file.printf( "    %-12s #{retval_ptr}retval_%s;\n", f_type.get_type.get_type_str, f_type.get_type.get_type_str_post )
+      end
+
+      # in æ¹åã®å
+¥åºåãå
+¥å
+      file.print "\n        /* å
+¥åå¼æ°åå */\n"
+      b_get = true    # unmarshal ã§ã¯ get
+      b_marshal  = false
+      @index = 2
+      print_params( param_list, file, 1, b_marshal, b_get, true, f.is_oneway? )
+      print_params( param_list, file, 1, b_marshal, b_get, false, f.is_oneway? )
+=begin
+      if ! b_void && ! f.is_oneway? then
+        ret_ptr_type = PtrType.new( f_type.get_type )
+        print_param_nc( "retval_", ret_ptr_type, file, 2, :RETURN, nil, nil, b_get )
+      end
+=end
+      # ãã±ããã®åä¿¡å®äº
+      # mikan æ¬å½ã¯ãå¯¾è±¡é¢æ°ãå¼åºãå¾ã«å®æ½ãããï¼å¼åºããã±ããã®ä½¿ç¨çµãããå®£è¨ããç®çã¨ãã¦
+      file.print "        /* ãã±ããçµããããã§ãã¯ */\n"
+      if ! f.is_oneway? then
+        b_continue = "true"
+      else
+        b_continue = "false"
+      end
+=begin
+      file.print "    if( (ercd_=cTDR_receiveEOP(#{b_continue})) != E_OK )\n"
+      file.print "        goto error_reset;\n\n"
+=end
+      # å¯¾è±¡é¢æ°ãå¼åºã
+      file.print "    /* å¯¾è±¡é¢æ°ã®å¼åºã */\n"
+      if b_void then
+        file.print( "    cServerCall_#{f_name}(" )
+      else
+        file.print( "    #{retval_ptr}retval_ = cServerCall_#{f_name}(" )
+      end
+
+      delim = " "
+      param_list.each{ |par|
+        file.print delim
+        delim = ", "
+        file.print "#{par.get_name}"
+      }
+      file.print( " );\n" )
+
+      # æ»ãå¤ãåºåå¼æ°ã®ååã³ã¼ãã®çæ
+
+      if ! b_void && ! f.is_oneway? then
+        file.print "    if( (ercd_ = cMessageBuffer_send(&retval_, sizeof(#{f_type.get_type.get_type_str})) != E_OK ) )\n"
+        file.print "        goto error_reset;\n"
+
+      end
+      # oneway ã®å ´ååºåãæ»ãå¤ãç¡ããååãå¾
+ããªãï¼éåæãªå¼åºãï¼
+      if ! f.is_oneway? then
+        file.print <<EOT
+    /* é¢æ°å¦çã®çµäºãéç¥ */
+    if( ( ercd_ = cEventflag_set( 0x01 ) ) != E_OK ){
+      goto error_reset;
+    }
+EOT
+      end  # ! f.is_oneway?
+      file.print <<EOT
+    return E_OK;
+error_reset:
+    return ercd_;
+}
+
+EOT
+
+    }
+
+  end
+
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/lib/GenOpaqueMarshaler.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/lib/GenOpaqueMarshaler.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/lib/GenOpaqueMarshaler.rb	(revision 270)
@@ -0,0 +1,1139 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: GenOpaqueMarshaler.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+#== GenOpaqueMarshaler
+# OpaqueRPCPlugin, sharedOpaqueRPCPlugin å
+±éã®è¦ç´ ãéããã¢ã¸ã¥ã¼ã«
+module GenOpaqueMarshaler
+
+  # ãã©ã°ã¤ã³å¼æ°åã¨ Proc
+  RPCPluginArgProc = {
+    "clientChannelCelltype" => Proc.new { |obj,rhs| obj.set_clientChannelCelltype rhs },
+    "serverChannelCelltype" => Proc.new { |obj,rhs| obj.set_serverChannelCelltype rhs },
+    "clientChannelCell" => Proc.new { |obj,rhs| obj.set_clientChannelCell rhs },
+    "serverChannelCell" => Proc.new { |obj,rhs| obj.set_serverChannelCell rhs },
+    "clientChannelInitializer" => Proc.new { |obj,rhs| obj.set_clientChannelInitializer rhs },
+    "serverChannelInitializer" => Proc.new { |obj,rhs| obj.set_serverChannelInitializer rhs },
+    "clientSemaphoreCelltype" => Proc.new { |obj,rhs| obj.set_clientSemaphoreCelltype rhs },
+    "clientSemaphoreInitializer" => Proc.new { |obj,rhs| obj.set_clientSemaphoreInitializer rhs },
+    "clientErrorHandler" => Proc.new { |obj,rhs| obj.set_clientErrorHandler rhs },
+    "serverErrorHandler" => Proc.new { |obj,rhs| obj.set_serverErrorHandler rhs },
+    "TDRCelltype"     => Proc.new { |obj,rhs| obj.set_TDRCelltype rhs },
+    "PPAllocatorSize" => Proc.new { |obj,rhs| obj.set_PPAllocatorSize rhs },
+    "substituteAllocator"  => Proc.new { |obj,rhs| obj.set_substituteAllocator rhs },
+    "noServerChannelOpenerCode"  => Proc.new { |obj,rhs| obj.set_noServerChannelOpenerCode rhs },
+    "taskCelltype"    => Proc.new { |obj,rhs| obj.set_taskCelltype rhs },
+    "taskPriority"    => Proc.new { |obj,rhs| obj.set_taskPriority rhs },
+    "stackSize"      => Proc.new { |obj,rhs| obj.set_stackSize rhs },
+  }
+
+  ##### ãã©ã°ã¤ã³å¼æ°ãã§ãã¯é¢æ°
+
+  #=== ãã©ã°ã¤ã³å¼æ° taskPriority ã®ãã§ãã¯
+  def set_taskPriority( rhs )
+    @taskPriority = rhs
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° serverChannelCelltype ã®ãã§ãã¯
+  def set_serverChannelCelltype( rhs )
+    @serverChannelCelltype = rhs.to_sym
+    # path = [ "::", @serverChannelCelltype ]
+    # obj = Namespace.find( path )
+    nsp = NamespacePath.analyze( @serverChannelCelltype.to_s )
+    obj = Namespace.find( nsp )
+    if ! obj.instance_of?( Celltype ) && ! obj.instance_of?( CompositeCelltype ) then
+      cdl_error( "RPCPlugin: serverChannelCelltype '#{rhs}' not celltype or not defined" )
+    end
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° clientChannelCelltype ã®ãã§ãã¯
+  def set_clientChannelCelltype( rhs )
+    @clientChannelCelltype = rhs.to_sym
+    # path = [ "::", @clientChannelCelltype ]
+    # obj = Namespace.find( path )
+    nsp = NamespacePath.analyze( @clientChannelCelltype.to_s )
+    obj = Namespace.find( nsp )
+    if ! obj.instance_of?( Celltype ) && ! obj.instance_of?( CompositeCelltype ) then
+      cdl_error( "RPCPlugin: clientChanneclCelltype '#{rhs}' not celltype or not defined" )
+    end
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° serverChannelCell ã®ãã§ãã¯
+  def set_serverChannelCell( rhs )
+    @serverChannelCell = rhs.to_sym
+    # ChannelCell ã¯ãã©ã°ã¤ã³ã§çæããããããããã§ã¯ãã§ãã¯ã§ããªã
+    # path = [ "::", @serverChannelCell ]
+    # obj = Namespace.find( path )
+    # if ! obj.instance_of?( Cell ) then
+    #   cdl_error( "RPCPlugin: serverChanneclCell '#{rhs}' not cell or not defined" )
+    # end
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° clientChannelCell ã®ãã§ãã¯
+  def set_clientChannelCell( rhs )
+    @clientChannelCell = rhs.to_sym
+    # ChannelCell ã¯ãã©ã°ã¤ã³ã§çæããããããããã§ã¯ãã§ãã¯ã§ããªã
+    # path = [ "::", @clientChannelCell ]
+    # obj = Namespace.find( path )
+    # if ! obj.instance_of?( Cell ) then
+    #   cdl_error( "RPCPlugin: clientChanneclCell '#{rhs}' not cell or not defined" )
+    # end
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° serverChannelInitializer ã®ãã§ãã¯
+  def set_serverChannelInitializer( rhs )
+    @serverChannelInitializer = rhs.to_sym
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° clientChannelInitializer ã®ãã§ãã¯
+  def set_clientChannelInitializer( rhs )
+    @clientChannelInitializer = rhs.to_sym
+  end
+
+  #=== ã¿ã¹ã¯ã¿ã¤ã taskCellype ã®ãã§ãã¯
+  def set_taskCelltype( rhs )
+    @taskCelltype = rhs.to_sym
+    # path = [ "::", @taskCelltype ]
+    # obj = Namespace.find( path )
+    nsp = NamespacePath.analyze( @taskCelltype.to_s )
+    obj = Namespace.find( nsp )
+    if ! obj.instance_of?( Celltype ) && ! obj.instance_of?( CompositeCelltype ) then
+      cdl_error( "RPCPlugin: taskCelltype '#{rhs}' not celltype or not defined" )
+    end
+  end
+
+  #=== ã¿ã¹ã¯ã¿ã¤ã stack\size ã®ãã§ãã¯
+  def set_stackSize( rhs )
+    @stackSize = rhs
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° PPAllocatorSize ã®ãã§ãã¯
+  def set_PPAllocatorSize( rhs )
+    @PPAllocatorSize = rhs
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° TDRCelltype ã®ãã§ãã¯
+  def set_TDRCelltype( rhs )
+    @TDRCelltype = rhs.to_sym
+    # path = [ "::", @TDRCelltype ]
+    # obj = Namespace.find( path )
+    nsp = NamespacePath.analyze( @TDRCelltype.to_s )
+    obj = Namespace.find( nsp )
+    if ! obj.instance_of?( Celltype ) && ! obj.instance_of?( CompositeCelltype ) then
+      cdl_error( "RPCPlugin: TDRCelltype '#{rhs}' not celltype or not found" )
+    end
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° substituteAllocator ã®ãã§ãã¯
+  # ãªãã·ã§ã³å¼æ°ããä»¥ä¸ã®å½¢å¼ã§ãããã¨ããã§ãã¯
+  #     substituteAllocator(Alloc.eAlloc=>Subst.eAlloc,Alloc2.eAlloc=>Subst2.eAlloc)
+  def set_substituteAllocator( rhs )
+    #str::String : ç ´å£ãããï¼ãããããæ®ãã«ãªãï¼ãstr.empty? ã§ç©ºã«ãªã£ããã¨ããã§ãã¯ã§ãã
+    #regexp::Regexp : æå¾
+ãããã¼ã¯ã³ã«ãããããæ­£è¦è¡¨ç¾ã "\A" åºå§ãã
+    #expected::String: æå¾
+ãããã¼ã¯ã³ãregexp ãåºç¾ããªãã£ãå ´åã«ã¨ã©ã¼ã¡ãã»ã¼ã¸ã¨ãã¦è¡¨ç¤º
+    def optparse (str,regexp,expected)
+      str.strip!
+      token = nil
+      res = str.sub!( regexp ){ |matched|  token = matched;  "" }
+      if ! token then
+        cdl_error( "syntax error in substituteAllocator option near '#{str}', expected '#{expected}'" )
+      end
+      return token
+    end
+
+    opt = rhs.dup
+    ident_rexpr = /\A(\w[\w\d]*)/
+
+    # "Alloc.eAlloc=>CAlloc.eAlloc" ã®å½¢å¼ã«ãªã£ã¦ãããã¨ããã§ãã¯
+    while true
+      lhs_alloc_cell = optparse( opt, ident_rexpr, "allocator cell name" )
+      break if ! lhs_alloc_cell
+
+      res = optparse( opt, /\A\./, "." )
+      break if ! res
+
+      lhs_alloc_ent = optparse( opt, ident_rexpr, "allocator cell entry name" )
+      break if ! lhs_alloc_ent
+
+      res = optparse( opt, /\A\=\>/, "=>" )
+      break if ! res
+
+      rhs_alloc_cell = optparse( opt, ident_rexpr, "allocator cell name" )
+      break if ! rhs_alloc_cell
+
+      res = optparse( opt, /\A\./, "." )
+      break if ! res
+
+      rhs_alloc_ent = optparse( opt, ident_rexpr, "allocator cell entry name" )
+      break if ! rhs_alloc_ent
+
+#  ããã§ã¯ãå³è¾ºã®ãã§ãã¯ã¯ã§ããªããå³è¾ºã®ã»ã«ã¯åæ¹åç
+§ã¨ãªã
+#      path = [ "::", rhs_alloc_cell.to_sym ]   # mikan namespace
+#      obj = Namespace.find( path )
+#      if ! obj.instance_of?( Cell ) || obj.get_region.get_path_string != @clientRegion then
+#        cdl_error( "RPCPlugin: substituteAllocator: '#{rhs_alloc_cell}' not cell or not found in client region" )
+#      else
+#        ct = obj.get_celltype
+#        if ct #  nil ãªãæ¢ã«ã¨ã©ã¼
+#          ent = ct.find rhs_alloc_ent
+#          if ! ent.instance_of? Port || ent.get_port_type != :ENTRY || ent.get_signature == nil || ! ent.get_signature.is_allocator?
+#            cdl_error( "RPCPlugin: substituteAllocator: '#{rhs_alloc_cell}.#{rhs_alloc_ent}' not entry port or not have alllocator signature" )
+#          end
+#        end
+#      end
+
+      @substituteAllocator[ "#{lhs_alloc_cell}.#{lhs_alloc_ent}".to_sym ] =
+        [ lhs_alloc_cell, lhs_alloc_ent, rhs_alloc_cell, rhs_alloc_ent ]
+
+# p "substituteAllocator: #{lhs_alloc_cell}.#{lhs_alloc_ent}=>#{rhs_alloc_cell}.#{rhs_alloc_ent}"
+
+      break if opt.empty?
+
+      res = optparse( opt, /\A\,/, "," )
+      break if ! res
+    end
+
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° noServerChannelOpenerCode ã®ãã§ãã¯
+  def set_noServerChannelOpenerCode( rhs )
+    rhs = rhs.to_sym
+    if rhs == :true
+      @noServerChannelOpenerCode = true
+    elsif rhs == :false then
+      @noServerChannelOpenerCode = false
+    else
+      cdl_error( "RPCPlugin: specify true or false for noServerChannelOpenerCode" )
+    end
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° clientSemaphoreCelltype ã®ãã§ãã¯
+  def set_clientSemaphoreCelltype rhs
+    @semaphoreCelltype = rhs.to_sym
+    nsp = NamespacePath.analyze( @semaphoreCelltype.to_s )
+    obj = Namespace.find( nsp )
+    if ! obj.instance_of?( Celltype ) && ! obj.instance_of?( CompositeCelltype ) then
+      cdl_error( "RPCPlugin: clientSemaphoreCelltype '#{rhs}' not celltype or not defined" )
+    end
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° clientSemaphoreInitializer ã®ãã§ãã¯
+  def set_clientSemaphoreInitializer rhs
+    @semaphoreInitializer = rhs.to_sym
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° clientErrorHandler ã®ãã§ãã¯
+  def set_clientErrorHandler rhs
+    @clientErrorHandler = rhs.to_sym
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° serverErrorHandler ã®ãã§ãã¯
+  def set_serverErrorHandler rhs
+    @serverErrorHandler = rhs.to_sym
+  end
+
+
+  #===  ã»ã«ã®ååãå¾ã
+  # ThroughPlugin::get_cell_name plugin.rb ããªã¼ãã¼ã©ã¤ã
+  def get_cell_name
+    @cell_name
+    # @clientChannelCell
+  end
+
+  #=== marshaler ã®ã»ã«ã¿ã¤ãåãè¨­å®ãã
+  def initialize_opaque_marshaler
+
+    # ãªãã·ã§ã³è¨­å®ãããå¤æ°ã®ããã©ã«ããè¨­å®
+    @taskPriority = 11
+    @stackSize  = 4096
+    @serverChannelCelltype = :"tSocketServer"
+    @clientChannelCelltype = :"tSocketClient"
+    @serverChannelCell = :"#{@cell_name}Server"
+    @clientChannelCell = :"#{@cell_name}Client"
+    @serverChannelInitializer = subst_name( "portNo=8931+$count$;" ).to_sym
+    @clientChannelInitializer = subst_name( "portNo=8931+$count$; serverAddr=\"127.0.0.1\"; " ).to_sym
+    @taskCelltype = :"tTask"
+    @PPAllocatorSize = nil
+    # @TDRCelltype  = :"tTDR"   # "tNBOTDR" ã«å¤æ´ã®äºå®
+    @TDRCelltype  = :"tNBOTDR"
+    @substituteAllocator = {}
+    @noServerChannelOpenerCode = false
+    @semaphoreCelltype = :"tSemaphore"
+    @semaphoreInitializer = :"count = 1; attribute = C_EXP( \"TA_NULL\" ); ";
+    @clientErrorHandler = nil
+    @serverErrorHandler = nil
+    @b_genOpener = false
+    @taskMainCelltype = :"tRPCDedicatedTaskMain"
+
+    @marshaler_celltype_name = :"tOpaqueMarshaler_#{@signature.get_global_name}"
+    @unmarshaler_celltype_name = :"tOpaqueUnmarshaler_#{@signature.get_global_name}"
+    @marshaler_celltype_file_name = "#{$gen}/#{@marshaler_celltype_name}.cdl"
+
+    # signature ã§å¯¾å¿ã§ããªããã®ããã§ãã¯
+    @signature.each_param{ |func_decl, param_decl|
+      if param_decl.get_direction == :OUT then
+        if param_decl.get_count && ! param_decl.get_size then
+          cdl_error( "#{@signature.get_namespace_path}.#{func_decl.get_name}.#{param_decl.get_name}: size_is must be specified for out parameter of Opaque RPC" )
+        end
+        if param_decl.get_string == -1 then
+          cdl_error( "#{@signature.get_namespace_path}.#{func_decl.get_name}.#{param_decl.get_name}: string length must be specified for out parameter of Opaque RPC" )
+        end
+      end
+    }
+  end
+
+  #=== GenOpaqueMarshaler# Opener Code ã®çææã®ãã§ãã¯
+  def check_opener_code
+    # ãµã¼ãã¼ãã£ã³ãã«ã»ã«ã¿ã¤ãã entry sServerChannelOpener eOpener ãæã¤ãã©ããããã§ãã¯
+    # mikan entry ã (call ã§ãªãã) ããã§ãã¯ãã¦ããªã
+    # scct = Namespace.find ["::", @serverChannelCelltype] # mikan namespace
+    nsp = NamespacePath.analyze( @serverChannelCelltype.to_s )
+    scct = Namespace.find nsp
+    if scct then
+      obj = scct.find( :"eOpener" )
+      if obj.instance_of? Port then
+        if obj.get_signature.get_name.to_sym == :sServerChannelOpener then
+          if @noServerChannelOpenerCode == false then
+            @b_genOpener = true
+            @taskMainCelltype = :"tRPCDedicatedTaskMainWithOpener"
+          end
+        end
+      end
+    end
+    if @noServerChannelOpenerCode == false && @taskMainCelltype != :"tRPCDedicatedTaskMainWithOpener" then
+      cdl_warning( "O9999 ServerChannelOpener code not generated, not found 'entry sServerChannelOpener eOpener'")
+    end
+  end
+
+  #=== GenOpaqueMarshaler# PPAllocator ã®å¿
+è¦æ§ããã§ãã¯ãã
+  def check_PPAllocator
+    if @signature.need_PPAllocator?(true) then
+      if @PPAllocatorSize == nil then
+        cdl_error( "PPAllocatorSize must be speicified for size_is array" )
+      end
+    end
+  end
+
+  ##### 
+
+  def gen_marshaler_celltype
+    f = CFile.open( @marshaler_celltype_file_name, "w" )
+    # åãå
+å®¹ãäºåº¦æ¸ãå¯è½æ§ãã (AppFile ã¯ä¸å¯)
+
+    if @PPAllocatorSize then
+      alloc_call_port = "  call sPPAllocator cPPAllocator;\n"
+    else
+      alloc_call_port = ""
+    end
+
+    f.print <<EOT
+
+celltype #{@marshaler_celltype_name} {
+  entry #{@signature.get_namespace_path} eClientEntry;
+  call sTDR       cTDR;
+  [optional]
+    call sSemaphore cLockChannel;
+  [optional]
+    call sRPCErrorHandler cErrorHandler;
+};
+celltype #{@unmarshaler_celltype_name} {
+  call #{@signature.get_namespace_path} cServerCall;
+  call  sTDR       cTDR;
+  [optional]
+    call sRPCErrorHandler cErrorHandler;
+  entry sUnmarshalerMain  eService;
+#{alloc_call_port}};
+EOT
+    f.close
+  end
+
+  #===  åãå£é¢æ°ã®æ¬ä½ã³ã¼ããçæï¼é ­é¨ã¨æ«å°¾ã¯å¥éåºåï¼
+  #ct_name:: Symbol    (through ãã©ã°ã¤ã³ã§çæããã) ã»ã«ã¿ã¤ãå ï¼Symbol ã¨ãã¦éããã¦ããï¼ãããï¼
+  def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+
+    # unmarshaler ã¯ã©ã¹ã?
+    if ct_name == @unmarshaler_celltype_name.to_sym then
+      gen_ep_func_body_unmarshal( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+    else
+      gen_ep_func_body_marshal( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+    end
+  end
+
+  #===  marshal ã³ã¼ãã®çæ
+  def gen_ep_func_body_marshal( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+
+    b_void = false
+    b_ret_er = false
+
+    # é¢æ°ã®æ»ãå¤ã®å
+ã®åãå¾ã(typedef ããã¦ããå ´å)
+    type = func_type.get_type.get_original_type
+
+    # æ»ãå¤è¨æ¶ç¨ã®å¤æ°ãåºåï¼void åã®é¢æ°ã§ã¯åºåããªãï¼
+    if ! type.is_void? then
+      file.print( "\t#{func_type.get_type.get_type_str}\t\tretval_;\n" )
+      if func_type.get_type.kind_of?( DefinedType ) && ( func_type.get_type.get_type_str == "ER" || func_type.get_type.get_type_str == "ER_INT" ) then
+        b_ret_er = true
+      end
+    else
+      b_void = true
+    end
+
+    file.print( "\tER\t\tercd_;\n" )
+    file.print( "\tint16_t\tstate_;\n" )
+
+    # é¢æ° ID ï¼æ´æ°å¤ï¼
+    func_id = "FUNCID_#{@signature.get_global_name}_#{func_name}".upcase
+    fid = @signature.get_id_from_func_name( func_name )
+    file.print( "\tint16_t\tfunc_id_ = #{func_id};	/* (id of '#{func_name}') = #{fid}*/\n" )
+
+    # ã·ã³ã°ã«ãã³ã§ãªããï¼
+    if ! b_singleton then
+
+      # singleton ã§ãªããã° p_cellcb åå¾ã³ã¼ããåºå
+      file.print <<EOT
+	#{ct_name}_CB *p_cellcb;
+
+	if( VALID_IDX( idx ) ){
+		p_cellcb = GET_CELLCB(idx);
+EOT
+
+      # ã¨ã©ã¼ãè¿ããï¼
+      if b_ret_er then
+        file.print <<EOT
+	}else{
+		return ERCD( E_RPC, E_ID );
+	}
+EOT
+      else
+        file.print <<EOT
+	}else{
+		/* ã¨ã©ã¼å¦çã³ã¼ããããã«è¨è¿° */
+	}
+
+EOT
+      end
+    end
+
+    if func_type.has_receive? then
+      file.print "	/* initialize receive parameters */\n"
+      params.each{ |param|
+        if param.get_direction == :RECEIVE then
+          file.print "	*#{param.get_name} = 0;\n"
+        end
+      }
+    end
+
+    # channel lock ã³ã¼ã
+    file.print <<EOT
+
+	/* Channel Lock */
+	SET_RPC_STATE( state_, RPCSTATE_CLIENT_GET_SEM );
+	if( is_cLockChannel_joined() )
+		cLockChannel_wait();
+EOT
+
+    # SOP ãéä¿¡
+    file.print "	/* SOPã®éåº */\n"
+    file.print "	SET_RPC_STATE( state_, RPCSTATE_CLIENT_SEND_SOP );\n"
+    file.print "	if( ( ercd_ = cTDR_sendSOP( true ) ) != E_OK )\n"
+    file.print "		goto error_reset;\n"
+
+    # func_id ãéä¿¡
+    file.print "	/* é¢æ° id ã®éåº */\n"
+    file.print "	if( ( ercd_ = cTDR_putInt16( func_id_ ) ) != E_OK )\n"
+    file.print "		goto error_reset;\n"
+
+    # p "celltype_name, sig_name, func_name, func_global_name"
+    # p "#{ct_name}, #{sig_name}, #{func_name}, #{func_global_name}"
+
+    b_get = false    # marshal ãªã put
+    b_marshal = true  # marshal
+
+    # in æ¹åã®å
+¥åºåãåºå
+    if func_type.has_inward? then
+      file.print "	/* å
+¥åå¼æ°éåº */\n"
+      file.print "	SET_RPC_STATE( state_, RPCSTATE_CLIENT_SEND_BODY );\n"
+      print_params( params, file, 1, b_marshal, b_get, true, "eClientEntry", func_name )
+      print_params( params, file, 1, b_marshal, b_get, false, "eClientEntry", func_name )
+    end
+    print_out_nullable( params, file, 1, b_marshal );
+
+    if ! func_type.is_oneway? then
+      b_continue = "true"
+    else
+      b_continue = "false"
+    end
+    file.print "	/* EOPã®éåºï¼ãã±ããã®æãã ãï¼ */\n"
+    file.print "	SET_RPC_STATE( state_, RPCSTATE_CLIENT_SEND_EOP );\n"
+    file.print "	if( (ercd_=cTDR_sendEOP(#{b_continue})) != E_OK )\n"
+    file.print "		goto error_reset;\n\n"
+
+    # send ã®ã¡ã¢ãªããã¢ã­ã±ã¼ã
+    if func_type.has_send? then
+      file.print "	/* dealloc send parameter while executing */\n"
+      file.print "	SET_RPC_STATE( state_, RPCSTATE_CLIENT_EXEC );\n"
+      dir = :SEND; nest = 1; dealloc_cp = "eClientEntry_#{func_name}"
+      dealloc_for_params( params, file, nest, dir, dealloc_cp )
+      file.print "\n"
+    end
+
+    if ! func_type.is_oneway? then
+
+      file.print "	/* ãã±ããã®å§ã¾ãããã§ãã¯ */\n"
+      file.print "	SET_RPC_STATE( state_, RPCSTATE_CLIENT_RECV_SOP );\n"
+      file.print "	if( (ercd_=cTDR_receiveSOP( true )) != E_OK )\n"
+      file.print "		goto error_reset;\n"
+
+      b_get = true     # marshaler ã¯ get
+      file.print "	/* æ»ãå¤ã®åãåã */\n"
+      print_param( "retval_", func_type.get_type, file, 1, :RETURN, nil, nil, b_marshal, b_get )
+
+      if func_type.has_outward? then
+        if b_ret_er then
+          indent_level = 2
+          file.print "	if( MERCD( retval_ ) != E_RPC ){\n"
+        else
+          indent_level = 1
+        end
+        indent = "	" * indent_level
+
+        file.print "#{indent}/* åºåå¤ã®åãåã */\n"
+        file.print "#{indent}SET_RPC_STATE( state_, RPCSTATE_CLIENT_RECV_BODY );\n"
+        print_params( params, file, indent_level, b_marshal, b_get, true, "eClientEntry", func_name )
+        print_params( params, file, indent_level, b_marshal, b_get, false, "eClientEntry", func_name )
+
+        if b_ret_er then
+          file.print "	}\n"
+        end
+      end
+
+      file.print "\n	/* ãã±ããã®çµããããã§ãã¯ */\n"
+      file.print "	SET_RPC_STATE( state_, RPCSTATE_CLIENT_RECV_EOP );\n"
+      file.print "	if( (ercd_=cTDR_receiveEOP(false)) != E_OK )\n"  # b_continue = false
+      file.print "		goto error_reset;\n"
+
+    end # ! func_type.is_oneway?
+
+    # channel lock ã³ã¼ã
+    file.print <<EOT
+	/* Channel Unlock */
+	SET_RPC_STATE( state_, RPCSTATE_CLIENT_RELEASE_SEM );
+	if( is_cLockChannel_joined() )
+		cLockChannel_signal();
+EOT
+
+    if( b_void == false )then
+      # å¼ã³å
+ã«æ»ãå¤ããªã¿ã¼ã³
+      file.print( "	return retval_;\n" )
+    else
+      file.print( "	return;\n" )
+    end
+
+    file.print <<EOT
+
+error_reset:
+EOT
+    # send ã®ã¡ã¢ãªããã¢ã­ã±ã¼ã
+    if func_type.has_send? then
+      file.print "	/* dealloc send parameter */\n"
+      file.print "	if( state_ < RPCSTATE_CLIENT_EXEC ){\n"
+      dir = :SEND; nest = 2; dealloc_cp = "eClientEntry_#{func_name}"
+      dealloc_for_params( params, file, nest, dir, dealloc_cp )
+      file.print "	}\n"
+    end
+
+    # receive ã®ã¡ã¢ãªããã¢ã­ã±ã¼ã
+    if func_type.has_receive? then
+      file.print( "	/* receive parameter */\n" )
+      dir = :RECEIVE; nest = 1; dealloc_cp = "eClientEntry_#{func_name}"
+      dealloc_for_params( params, file, nest, dir, dealloc_cp, true )
+    end
+
+    file.print <<EOT
+	if( MERCD( ercd_ ) != E_RESET )
+		(void)cTDR_reset();
+EOT
+
+    # channel lock ã³ã¼ã
+    file.print <<EOT
+	/* Channel Unlock */
+	if( is_cLockChannel_joined() )
+		cLockChannel_signal();
+
+	if( ercd_ != E_OK && is_cErrorHandler_joined() )
+		cErrorHandler_errorOccured( func_id_, ercd_, state_ );
+EOT
+
+    if( b_ret_er != false )then
+      # å¼ã³å
+ã«æ»ãå¤ããªã¿ã¼ã³
+      file.print( "	return ERCD( E_RPC, MERCD( ercd_ ) );\n" )
+    else
+      file.print( "	return;\n" )
+    end
+
+  end
+
+  #===  unmarshal ã³ã¼ãã®çæ
+  def gen_ep_func_body_unmarshal( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+
+    b_ret_er = true
+
+    # func_id ãå¾ãã³ã¼ããçæ
+    file.print <<EOT
+
+	int16_t	func_id_;
+	ER		ercd_ = E_OK;
+	int16_t	state_;
+
+	#{ct_name}_CB *p_cellcb;
+
+	if( VALID_IDX( idx ) ){
+		p_cellcb = GET_CELLCB(idx);
+EOT
+
+    if b_ret_er then
+        file.print <<EOT
+	}else{
+		return;
+	}
+EOT
+    else
+        file.print <<EOT
+	}else{
+		/* ã¨ã©ã¼å¦çã³ã¼ããããã«è¨è¿° */
+	}
+EOT
+    end
+
+    file.print <<EOT
+
+#ifdef RPC_DEBUG
+	syslog(LOG_INFO, "Entering RPC service loop" );
+#endif
+
+	/* SOPã®ãã§ãã¯ */
+	SET_RPC_STATE( state_, RPCSTATE_SERVER_RECV_SOP );
+	if( (ercd_=cTDR_receiveSOP( false )) != E_OK )
+		goto error_reset;
+	/* func_id ã®åå¾ */
+	if( (ercd_=cTDR_getInt16( &func_id_ )) != E_OK )
+		goto error_reset;
+
+#ifdef RPC_DEBUG
+	syslog(LOG_INFO, "unmarshaler task: func_id: %d", func_id_ );
+#endif
+	switch( func_id_ ){
+EOT
+
+    # signature ã«å«ã¾ãã ãã¹ã¦ã®é¢æ°ã«ã¤ãã¦
+    @signature.get_function_head_array.each { |f|
+      f_name = f.get_name
+      f_type = f.get_declarator.get_type
+      func_id = "FUNCID_#{@signature.get_global_name}_#{f_name}".upcase
+      fid = @signature.get_id_from_func_name( f_name )
+
+      file.print "	case #{func_id}:		/* (id of '#{f_name}') = #{fid} */ \n"
+      file.print "		ercd_ = tOpaqueUnmarshaler_#{@signature.get_global_name}_#{f_name}( p_cellcb, &state_ );\n"
+      file.print "		break;\n"
+
+    } #
+
+    if @PPAllocatorSize then
+      ppallocator_dealloc_str = "	/* PPAllocator ã®ãã¹ã¦ãè§£æ¾ */\n	cPPAllocator_dealloc_all();"
+    else
+      ppallocator_dealloc_str = ""
+    end
+
+    file.print <<EOT
+	default:
+		syslog(LOG_INFO, "unmarshaler task: ERROR: unknown func_id: %d", func_id_ );
+		ercd_ = E_ID;
+	};
+error_reset:  /* OK cases also come here */
+#{ppallocator_dealloc_str}
+	if( ercd_ == E_OK )
+		return ercd_;
+	if( is_cErrorHandler_joined() )
+		ercd_ = cErrorHandler_errorOccured( func_id_, ercd_, state_ );
+	if( MERCD( ercd_ ) != E_RESET )
+		(void)cTDR_reset();
+	return ercd_;
+EOT
+
+  end
+
+  #=== PREAMBLE é¨ã®ã³ã¼ãçæ
+  # ã¢ã³ãã¼ã·ã£ã©ã»ã«ã¿ã¤ãã®å ´åãã¢ã³ãã¼ã·ã£ã©é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨ãçæ
+  def gen_preamble file, b_singleton, ct_name, global_name
+    if ct_name != @unmarshaler_celltype_name.to_sym then
+      return
+    end
+
+    # string.h ã® include (memset, strlen ã®ãã)
+    file.print "/* header file (strlen, memset) */\n"
+    file.print "#include\t<string.h>\n\n"
+
+    file.print "/* ã¢ã³ãã¼ã·ã£ã©é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨ */\n"
+    # signature ã«å«ã¾ãã ãã¹ã¦ã®é¢æ°ã«ã¤ãã¦
+    @signature.get_function_head_array.each { |f|
+      f_name = f.get_name
+      f_type = f.get_declarator.get_type
+      id = @signature.get_id_from_func_name( f_name )
+      file.print "static ER  tOpaqueUnmarshaler_#{@signature.get_global_name}_#{f_name}(CELLCB *p_cellcb, int16_t *state);\t/* func_id: #{id} */\n"
+    }
+    file.print "\n"
+  end
+
+  #=== POSTAMBLE é¨ã®ã³ã¼ãçæ
+  # ã¢ã³ãã¼ã·ã£ã©ã»ã«ã¿ã¤ãã®å ´åãåã
+ã®ã¢ã³ãã¼ã·ã£ã©é¢æ°ã®çæ
+  def gen_postamble file, b_singleton, ct_name, global_name
+    if ct_name != @unmarshaler_celltype_name.to_sym then
+      return
+    end
+
+    file.print "\n/*** ã¢ã³ãã¼ã·ã£ã©é¢æ° ***/\n\n"
+    @signature.get_function_head_array.each { |f|
+      f_name = f.get_name
+      f_type = f.get_declarator.get_type
+      id = @signature.get_id_from_func_name( f_name )
+
+      # é¢æ°ã¯è¿ãå¤ãæã¤ã?
+      b_ret_er = false
+      init_retval = ""
+      if f_type.get_type.is_void? then
+        b_void = true
+      else
+        b_void = false
+        if f_type.get_type.get_type_str == "ER" || f_type.get_type.get_type_str == "ER_INT" then
+          b_ret_er = true
+          init_retval = " = E_OK"
+        end
+      end
+
+      file.print <<EOT
+/*
+ * name:    #{f_name}
+ * func_id: #{id} 
+ */
+EOT
+      file.print "static ER\n"
+      file.print "tOpaqueUnmarshaler_#{@signature.get_global_name}_#{f_name}(CELLCB *p_cellcb, int16_t *state_)\t\t\n"
+      file.print "{\n"
+      file.print "	ER      ercd_;\n"
+
+      # å¼æ°ãååãå¤æ°ã®å®ç¾©
+      params = f.get_declarator.get_type.get_paramlist.get_items
+           # FuncHead->  Decl->    FuncType->ParamList
+      params.each{ |par|
+        name = par.get_name
+        type = par.get_type.get_original_type
+
+        dir = par.get_direction
+        if( dir == :RECEIVE )then
+          # type ã¯ PtrType ã§ããããåãé¤ããå
+          type = type.get_type
+        end
+        if( dir == :SEND || dir == :RECEIVE )then
+          init = " = 0"
+        else
+          init = ""
+        end
+
+        if type.kind_of? ArrayType then
+          type = type.get_type
+          aster = "(*"
+          aster2 = ")"
+        else
+          aster = ""
+          aster2 = ""
+        end
+
+        type_str = type.get_type_str.gsub( /\bconst\b */, "" ) # "const" ãå¤ã
+        file.printf( "	%-12s %s%s%s%s%s;\n", type_str, aster, name, aster2, type.get_type_str_post, init )
+
+        if dir == :OUT && type.is_nullable? then
+          file.print( "	int8_t\tb_#{name}_null_;\n" )
+        end
+      }
+
+      if ! b_void then
+        file.printf( "	%-12s retval_%s%s;\n", f_type.get_type.get_type_str, f_type.get_type.get_type_str_post, init_retval )
+      end
+
+      # in æ¹åã®å
+¥åºåãå
+¥å
+      file.print "\n	/* å
+¥åå¼æ°åå */\n"
+      file.print "	SET_RPC_STATE( *state_, RPCSTATE_SERVER_RECV_BODY );\n"
+      b_get = true    # unmarshal ã§ã¯ get
+      b_marshal  = false
+      print_params( params, file, 1, b_marshal, b_get, true, "cServerCall", f_name )
+      print_params( params, file, 1, b_marshal, b_get, false, "cServerCall", f_name )
+      print_out_nullable( params, file, 1, b_marshal );
+
+
+      # ãã±ããã®åä¿¡å®äº
+      file.print "	/* ãã±ããçµããããã§ãã¯ */\n"
+      file.print "	SET_RPC_STATE( *state_, RPCSTATE_SERVER_RECV_EOP );\n"
+      if ! f_type.is_oneway? then
+        b_continue = "true"
+      else
+        b_continue = "false"
+      end
+      file.print "	if( (ercd_=cTDR_receiveEOP(#{b_continue})) != E_OK )\n"
+      file.print "		goto error_reset;\n\n"
+
+      # out ã®ã¡ã¢ãªãã¢ã­ã±ã¼ã
+      dir = :OUT; alloc_cp = "cPPAllocator_alloc"; alloc_cp_extra = nil; nest = 1
+      alloc_for_out_params( params, file, nest, dir, alloc_cp, alloc_cp_extra )
+
+      # å¯¾è±¡é¢æ°ãå¼åºã
+      file.print "	/* å¯¾è±¡é¢æ°ã®å¼åºã */\n"
+      file.print "	SET_RPC_STATE( *state_, RPCSTATE_SERVER_EXEC );\n"
+      if b_void then
+        file.print( "	cServerCall_#{f_name}(" )
+      else
+        file.print( "	retval_ = cServerCall_#{f_name}(" )
+      end
+
+      delim = " "
+      params.each{ |par|
+        file.print delim
+        delim = ", "
+        if par.get_direction == :RECEIVE then
+          file.print "&"
+        end
+        file.print par.get_name
+      }
+      file.print( " );\n" )
+
+      # æ»ãå¤ãåºåå¼æ°ã®ååã³ã¼ãã®çæ
+
+      # oneway ã®å ´ååºåãæ»ãå¤ãç¡ããååãå¾
+ããªãï¼éåæãªå¼åºãï¼
+      if ! f.is_oneway? then
+
+        file.print "\n	/* SOPã®éåº */\n"
+        file.print "	SET_RPC_STATE( *state_, RPCSTATE_SERVER_SEND_SOP );\n"
+
+        file.print "	if( ( ercd_ = cTDR_sendSOP( false ) ) != E_OK )\n"
+        file.print "		goto error_reset;\n"
+
+        b_get = false     # unmarshaler ã¯ put
+        if( ! b_void )then
+          file.print "	/* æ»ãå¤ã®éåº */\n"
+          print_param( "retval_", f_type.get_type, file, 1, :RETURN, nil, nil, b_marshal, b_get )
+        end
+
+        if f_type.has_outward? then
+          if b_ret_er then
+            indent_level = 2
+            file.print "	if( MERCD( retval_ ) != E_RPC ){\n"
+          else
+            indent_level = 1
+          end
+          indent = "	" * indent_level
+
+          file.print "#{indent}/* åºåå¤ã®éåº */\n"
+          file.print "#{indent}SET_RPC_STATE( *state_, RPCSTATE_SERVER_SEND_BODY );\n"
+          print_params( params, file, indent_level, b_marshal, b_get, true, "cServerCall", f_name )
+          print_params( params, file, indent_level, b_marshal, b_get, false, "cServerCall", f_name )
+
+          # receive ã®ã¡ã¢ãªããã¢ã­ã±ã¼ã
+          if f_type.has_receive? then
+            file.print "#{indent}/* dealloc receive parameter */\n"
+            dir = :RECEIVE; dealloc_cp = "cServerCall_#{f_name}"
+            dealloc_for_params( params, file, indent_level, dir, dealloc_cp )
+          end
+
+          if b_ret_er then
+            file.print "	}\n"
+          end
+        end
+
+        file.print "	/* ãã±ããã®çµããï¼æãã ãï¼ */\n"
+        file.print "	SET_RPC_STATE( *state_, RPCSTATE_SERVER_SEND_EOP );\n"
+        file.print "	if( (ercd_=cTDR_sendEOP(false)) != E_OK )\n"  # b_continue = false
+        file.print "		goto error_reset;\n"
+      end  # ! f.is_oneway?
+
+      file.print "	return E_OK;\n"
+      file.print <<EOT
+
+error_reset:
+EOT
+      # send ã®ãªã»ããç¨ãã¢ã­ã±ã¼ã
+      if f_type.has_send? then
+        file.print "	/* dealloc send parameter */\n"
+        file.print "	if( *state_ < RPCSTATE_SERVER_EXEC ){\n"
+        dir = :SEND; indent_level = 2; dealloc_cp = "cServerCall_#{f_name}"
+        dealloc_for_params( params, file, indent_level, dir, dealloc_cp, true )
+        file.print "	}\n"
+      end
+
+      # receive ã®ã¡ã¢ãªããã¢ã­ã±ã¼ã
+      if f_type.has_receive? && b_ret_er then
+        file.print "	/* dealloc receive parameter */\n"
+        file.print "	if( MERCD( retval_ ) != E_RPC ){\n"
+        dir = :RECEIVE; indent_level = 2; dealloc_cp = "cServerCall_#{f_name}"
+        dealloc_for_params( params, file, indent_level, dir, dealloc_cp )
+        file.print "	}\n"
+      end
+
+      file.print "	return ERCD( E_RPC, MERCD( ercd_ ) );\n"
+      file.print "}\n\n"
+
+      # ããï¼åã
+ã®é¢æ°ï¼ã§ã¯ã¨ã©ã¼ãã³ãã©ã¼ã¯å¼ã³åºããªããå¼ã³å
+ï¼ãµã¼ãã¼ã®ã¡ã¤ã³é¢æ°ï¼ã§å¼ã³åºãã
+    }
+  end
+ 
+
+  #b_marshal:: bool
+  #b_get:: bool
+  #  b_marshal = true  && b_get == false   :  ãã¼ã·ã£ã©ã§å
+¥åå¼æ°éåº
+  #  b_marshal = true  && b_get == true    :  ãã¼ã·ã£ã©ã§åºåå¼æ°åå
+  #  b_marshal = false && b_get == false   :  ã¢ã³ãã¼ã·ã£ã©ã§å
+¥åå¼æ°åå
+  #  b_marshal = false && b_get == true    :  ã¢ã³ãã¼ã·ã£ã©ã§åºåå¼æ°éåº
+  #b_referenced:: size_is, count_is, string ã§åç
+§ããã¦ãããã®ãåºå
+  def print_params( params, file, nest, b_marshal, b_get, b_referenced, port_name, func_name )
+    params.each{ |param|
+# p "#{param.get_name}:  b_marshal: #{b_marshal} b_get: #{b_get}"
+      if ! ( b_referenced == param.is_referenced? ) then
+        next
+      end
+
+      dir = param.get_direction
+      if( b_get == false && b_marshal == true || b_get == true && b_marshal == false  )then
+        case dir
+        when :IN, :INOUT
+          alloc_cp = "cPPAllocator_alloc"
+          alloc_cp_extra = nil
+          print_param( param.get_name, param.get_type, file, nest, dir, nil, nil, b_marshal, b_get, alloc_cp, alloc_cp_extra )
+        when :SEND
+          alloc_cp = "#{port_name}_#{func_name}_#{param.get_name}_alloc"
+          alloc_cp_extra = nil
+          print_param( param.get_name, param.get_type, file, nest, dir, nil, nil, b_marshal, b_get, alloc_cp, alloc_cp_extra )
+        end
+      else
+        case dir
+        when :OUT, :INOUT
+          alloc_cp = nil        # inout ã® b_get==true&&b_marsha==true ã®ã¨ãã¢ã­ã±ã¼ã¿ã³ã¼ãã¯ä¸ç¨
+          alloc_cp_extra = nil
+          print_param( param.get_name, param.get_type, file, nest, dir, nil, nil, b_marshal, b_get, alloc_cp, alloc_cp_extra )
+        when :RECEIVE
+          alloc_cp = "#{port_name}_#{func_name}_#{param.get_name}_alloc"
+          alloc_cp_extra = nil
+          if b_get then
+            outer = "(*"         # ãã¼ã·ã£ã©å´ã§ã¯ããã¤ã³ã¿ã (send ã¨æ¯ã¹) ä¸ã¤å¤ã
+            outer2 = ")"
+          else
+            outer = nil          # ã¢ã³ãã¼ã·ã£ã©å´ã§ã¯ããã¤ã³ã¿ãä¸ã¤å¤ããã¦ãã
+            outer2 = nil
+          end
+          type = param.get_type.get_referto
+          print_param( param.get_name, type, file, nest, dir, outer, outer2, b_marshal, b_get, alloc_cp, alloc_cp_extra )
+        end
+      end
+    }
+  end
+
+  #=== ã¢ã­ã±ã¼ã¿ã³ã¼ããçæ (out ã®ã¢ã³ãã¼ã·ã£ã©ç¨)
+  def alloc_for_out_params( params, file, nest, dir, alloc_cp, alloc_cp_extra )
+    params.each{ |param|
+      dir = param.get_direction
+      if dir == :OUT then
+        alloc_for_out_param( param.get_name, param.get_type, file, nest, nil, nil, alloc_cp, alloc_cp_extra )
+      end
+    }
+  end
+
+  #=== ã¢ã­ã±ã¼ã¿ã³ã¼ããçæ (out ã®ã¢ã³ãã¼ã·ã£ã©ç¨åå¥ãã©ã¡ã¼ã¿ã®çæ)
+  def alloc_for_out_param( name, type, file, nest, outer, outer2, alloc_cp, alloc_cp_extra )
+    org_type = type.get_original_type
+    if org_type.is_nullable? then
+      indent = "\t" * nest
+      file.print "#{indent}if( ! b_#{name}_null_  ){\n"
+      nest += 1
+    end
+    case org_type
+    when PtrType
+      indent = "\t" * nest
+      count = type.get_count; size = type.get_size; string = type.get_string
+      if count || size || string then
+        loop_counter_type = IntType.new(16)   # mikan æ¹ã size_is, count_is ã®å¼æ°ã®åã¨ãã
+        if count then
+          len = type.get_count.to_s
+        elsif size then
+          len = type.get_size.to_s
+        elsif string then
+          if  type.get_string.instance_of? Expression then
+            len = type.get_string.to_s
+          else
+            raise "unsuscripted string used for out parameter #{name}"
+          end
+        end
+
+        # size_is ã« max æå®ãããå ´åãlength ã max ãè¶
+ãã¦ããããã§ãã¯ããã³ã¼ããçæ
+        if org_type.get_max != nil && string == nil then
+          file.print "#{indent}if( #{len} > #{type.get_max} ){\t/* GenOpaqueMarshaler max check 2 */\n"
+          file.print "#{indent}	ercd_ = E_PAR;\n"
+          file.print "#{indent}	goto error_reset;\n"
+          file.print "#{indent}}\n"
+        end
+
+        file.print <<EOT
+#{indent}if((ercd_=#{alloc_cp}(sizeof(#{type.get_type.get_type_str}#{type.get_type.get_type_str_post})*#{len},(void **)&#{outer}#{name}#{outer2}#{alloc_cp_extra}))!=E_OK)\t/* GenOpaqueMarshaler 1 */
+#{indent}	goto error_reset;
+EOT
+
+        if type.get_type.kind_of? PtrType then
+          file.print "#{indent}{\n"
+          file.print "#{indent}	#{loop_counter_type.get_type_str}  i__#{nest}, length__#{nest} = #{len};\n"
+          file.print "#{indent}	for( i__#{nest} = 0; i__#{nest} < length__#{nest}; i__#{nest}++ ){\n"
+          alloc_for_out_param( name, type.get_type, file, nest + 2, outer, "#{outer2}[i__#{nest}]", alloc_cp, alloc_cp_extra )
+          file.print "#{indent}	}\n"
+          file.print "#{indent}}\n"
+        end
+
+      else
+        file.print <<EOT
+#{indent}if((ercd_=#{alloc_cp}(sizeof(#{type.get_type.get_type_str}#{type.get_type.get_type_str_post}),(void **)&#{outer}#{name}#{outer2}#{alloc_cp_extra}))!=E_OK)\t/* GenOpaqueMarshaler 2 */
+#{indent}	goto error_reset;
+EOT
+      end
+    end
+    if org_type.is_nullable? then
+      nest -= 1
+      indent = "\t" * nest
+      file.print "#{indent}} else {\n"
+      file.print "#{indent}	#{name} = NULL;\n"
+      file.print "#{indent}}\n"
+      nest += 1
+    end
+  end
+
+  #=== å¼æ°ã®ä¸æ¬ãã¢ã­ã±ã¼ãã³ã¼ãã®çæ
+  # sendï¼ãã¼ã·ã£ã©ã®æå¾ãreceiveï¼ã¢ã³ãã¼ã·ã£ã©ã®æå¾ã§ä¸æ¬ãã¦å¼æ°ããã¢ã­ã±ã¼ããã
+  def dealloc_for_params( params, file, nest, dir, dealloc_cp, b_reset = false )
+    if b_reset then
+      reset_str = "_reset"
+    else
+      reset_str = ""
+    end
+
+    params.each{ |param|
+      if dir == param.get_direction then
+        indent = "\t" * nest
+        type = param.get_type.get_original_type
+        aster = ""
+        if dir == :RECEIVE then
+          type = type.get_type.get_original_type   # ãã¤ã³ã¿ãä¸ã¤å¤ã
+          if b_reset then
+            aster = "*"
+          end
+        end
+        count = type.get_count; size = type.get_size
+        if (size || count) && type.get_type.has_pointer? then
+          if count then
+            len = ", #{type.get_count.to_s}"
+          elsif size then
+            len = ", #{type.get_size.to_s}"
+          end
+        else
+          len = ""
+        end
+        cp = "#{dealloc_cp}_#{param.get_name}_dealloc#{reset_str}".upcase
+        file.print "#{indent}#{cp}(#{aster}#{param.get_name}#{len});\n"
+      end
+    }
+  end
+
+  #== out ã§ nullable ãªå¼æ°ã®æ
+å ±ãæ¸¡ã
+  # out nullable ã®å ´åãin, send, receive ã®ããã«ãå¤ãæ¸¡ãç´åã§ã¯ãªããå¼åºãæã«æ¸¡ã
+  def  print_out_nullable( params, file, nest, b_marshal );
+    indent = "\t" * nest
+    params.each{ |param|
+      next if param.get_direction != :OUT
+      next if ! param.is_nullable?
+      if b_marshal then
+        file.print "#{indent}if( (ercd_=cTDR_putInt8( (int8_t)(#{param.get_name} == NULL) )) != E_OK )\n"
+        file.print "#{indent}\tgoto error_reset;\n"
+      else
+        # å¼ã³å
+ã¯ alloc_for_out_param ã§ nullable ã®å¯¾å¿ãã
+        file.print "#{indent}if( (ercd_=cTDR_getInt8( &b_#{param.get_name}_null_)) != E_OK )\n"
+        file.print "#{indent}\tgoto error_reset;\n"
+      end
+    }
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/lib/GenParamCopy.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/lib/GenParamCopy.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/lib/GenParamCopy.rb	(revision 270)
@@ -0,0 +1,384 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: GenParamCopy.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+#= ParamCopy
+#
+# ãã©ã¡ã¼ã¿ã³ãã¼ãããã¼ã·ã£ã©ï¼ã¢ã³ãã¼ã·ã£ã©ã³ã¼ããçæããã¡ã½ãã print_param ãæä¾ããï¼
+# RPCPlugin, OpaqueRPCPlugin ã« include ãããï¼
+# RPCPlugin (ãã©ã³ã¹ãã¢ã¬ã³ã) ã§ã¯ãoneway é¢æ°ã§ in ã®ãã¤ã³ã¿å¼æ°ã®å ´åã«éã£ã¦ print_param ãç¨ããããï¼
+#
+module  GenParamCopy
+
+  #=== å¼æ°ã®è»¢éã³ã¼ããçæ
+
+  def print_param( name, type, file, nest, dir, outer, outer2, b_marshal, b_get, alloc_cp = nil, alloc_cp_extra = nil, name_list = nil )
+    if type.get_original_type.kind_of?( ArrayType ) && b_get && dir != :OUT then
+      indent = "	" * nest
+      subsc = type.get_subscript
+      if subsc == nil
+        raise "Unsubscripted Array Not Supported"
+      else        
+        size_str = subsc.to_str( name_list, outer, outer2 )
+        file.print <<EOT
+#{indent}if((ercd_=#{alloc_cp}(sizeof(#{type.get_type.get_type_str}#{type.get_type.get_type_str_post})*(#{size_str}),(void **)&#{outer}#{name}#{outer2}#{alloc_cp_extra}))!=E_OK)\t/* GenParamCopy 1 */
+#{indent}	goto error_reset;
+EOT
+        if ( dir == :SEND || dir == :RECEIVE ) && type.get_type.has_pointer? then
+          # send, receive ã®å ´åã¯ãã¨ã©ã¼ãªã»ããã«åã NULL ã«ãã
+          file.print <<EOT
+#{indent}memset( (void *)#{outer}#{name}#{outer2}#{alloc_cp_extra}, 0, sizeof(#{type.get_type.get_type_str}#{type.get_type.get_type_str_post})*(#{size_str});   /* GenParamCopy Alloc1 */
+EOT
+        end
+      end
+    end
+    print_param0( name, type, file, nest, dir, outer, outer2, b_marshal, b_get, alloc_cp, alloc_cp_extra, name_list )
+  end
+
+  def print_param0( name, type, file, nest, dir, outer, outer2, b_marshal, b_get, alloc_cp = nil, alloc_cp_extra = nil, name_list = nil )
+    indent = "	" * nest
+
+    case type
+    when DefinedType
+      print_param0( name, type.get_type, file, nest, dir, outer, outer2, b_marshal, b_get, alloc_cp, alloc_cp_extra )
+    when BoolType, IntType, FloatType
+      case type
+      when BoolType
+        type_str = "Bool"
+      when IntType
+        bit_size = type.get_bit_size
+        case type.get_sign
+        when :UNSIGNED
+          sign = "U"
+        when :SIGNED
+          if bit_size == -1 || bit_size == -11 then
+            sign = "S"   # signed char ã®å ´åã®ã¿ S ãã¤ã
+          else
+            sign = ""
+          end
+        else
+          sign = ""
+        end
+
+        case bit_size
+        when -1, -11  # -1: char_t, -11: char
+          type_str = "#{sign}Char"
+        when -2
+          type_str = "#{sign}Short"
+        when -3
+          type_str = "#{sign}Int"
+        when -4
+          type_str = "#{sign}Long"
+        when -5
+          type_str = "Intptr"
+        when 8, 16, 32, 64, 128
+          type_str = "#{sign}Int#{bit_size}"
+        else
+          raise "unknown bit_size '#{bit_size}' for int type "
+        end
+
+      when FloatType
+        bit_size = type.get_bit_size
+        if bit_size == 32 then
+          type_str = "Float32"
+        else
+          type_str = "Double64"
+        end
+
+      end
+
+      if( b_get )then
+        file.print indent
+        file.print "if( ( ercd_ = cTDR_get#{type_str}( &(#{outer}#{name}#{outer2}) ) ) != E_OK )\t/* GenParamCopy 2 */\n"
+        file.print indent
+        file.print "	goto error_reset;\n"
+      else
+        file.print indent
+        file.print "if( ( ercd_ = cTDR_put#{type_str}( #{outer}#{name}#{outer2} ) ) != E_OK )\t/* GenParamCopy 3 */\n"
+        file.print indent
+        file.print "	goto error_reset;\n"
+      end
+
+    when PtrType
+
+      count = type.get_count; size = type.get_size; string = type.get_string
+      if count || size || string then
+        nest = print_nullable_pre( name, type, file, nest, dir, outer, outer2, b_marshal, b_get )
+        indent = "\t" * nest
+        loop_counter_type = IntType.new(32)   # mikan åã size_is, count_is ã®å¼æ°ã®åã¨ãã
+        file.print "#{indent}{\t/* GenParamCopy 4 */\n"
+        file.print "#{indent}	#{loop_counter_type.get_type_str}  i__#{nest}, length__#{nest};\n"
+
+        if size || count then
+          if size then
+            size_str = size.to_str( name_list, outer, outer2 )
+          end
+
+          if count then
+            count_str = count.to_str( name_list, outer, outer2 )
+          else
+            # size_is ã¯å¿
+é . count_is ã¯ãªãã·ã§ã³
+            count_str = size_str
+          end
+          file.print "#{indent}	length__#{nest} = #{count_str};\t/* GenParamCopy 5 */\n"
+
+          # size_is ã« max æå®ãããå ´åãlength ã max ãè¶
+ãã¦ããããã§ãã¯ããã³ã¼ããçæ
+              # alloc_cp == nil ã®ã¨ã dir ã¯ INOUT, OUT ã®ã¯ã (æ¡ä»¶ãåé·)ãè©¦é¨ãçµãã£ã¦ããã®ã§ãæ¬¡åè¦ç´ãæã«å¤ã
+          if b_get && type.get_max != nil && ! ( ( dir == :INOUT || dir == :OUT ) && alloc_cp == nil ) then
+            file.print "#{indent}	if( length__#{nest} > #{type.get_max.to_s} ){\t/* GenParamCopy max check 1 */\n"
+            file.print "#{indent}		ercd_ = E_PAR;\n"
+            file.print "#{indent}		goto error_reset;\n"
+            file.print "#{indent}	}\n"
+          end
+
+        else # if string then
+          case type.get_type.get_bit_size
+          when -1              # char_t
+            b_size = 8
+          when 8, 16, 32, 64   # intN_t, uintN_t
+            b_size = type.get_type.get_bit_size
+          else
+            cdl_error( "R9999 $1: string specifier cannot be specified to '$2' in current implementation",
+                       name, type.get_type.get_type_str + type.get_type.get_type_str_post )
+          end
+          if ! b_get then
+            if  string.instance_of? Expression then
+              len = string.to_str( name_list, outer, outer2 )
+              file.print "#{indent}	length__#{nest} = STRNLEN#{b_size}(#{outer}#{name}#{outer2},(#{len}-1))+1;\t/* GenParamCopy 6 */\n"
+              file.print "#{indent}	if( length__#{nest} < #{len})\tlength__#{nest} += 1;\n"
+            else
+              file.print "#{indent}	length__#{nest} = STRLEN#{b_size}(#{outer}#{name}#{outer2})+1;\t/* GenParamCopy 7 */\n"
+            end
+            size_str = "length__#{nest}"     # string ã®å ´åãstrnlen ä»¥ä¸ã®é åãç¢ºä¿ããªã
+          else
+            if ( dir == :INOUT ) then
+              if ( string.instance_of? Expression ) then
+                len = string.to_str( name_list, outer, outer2 )
+                size_str = "#{len}"              # string(len) ã®å ´å len ãç¢ºä¿ãã
+              else
+                raise "unsuscripted string used for inout parameter #{name}"
+              end
+            else
+              size_str = "length__#{nest}"     # string ã®å ´åãstrnlen ä»¥ä¸ã®é åãç¢ºä¿ããªã
+            end
+          end
+          print_param0( "length__#{nest}", loop_counter_type, file, nest + 1, dir, nil, nil, b_marshal, b_get )
+        end
+
+        if b_get && ( dir == :IN || dir == :INOUT || dir == :SEND || dir == :RECEIVE ) && alloc_cp then
+          file.print <<EOT
+#{indent}	if((ercd_=#{alloc_cp}(sizeof(#{type.get_type.get_type_str}#{type.get_type.get_type_str_post})*(#{size_str}),(void **)&#{outer}#{name}#{outer2}#{alloc_cp_extra}))!=E_OK)\t/* GenParamCopy 8 */
+#{indent}		goto error_reset;
+EOT
+          if ( dir == :SEND || dir == :RECEIVE ) && type.get_type.has_pointer? then
+            # send, receive ã®å ´åã¯ãã¨ã©ã¼ãªã»ããã«åã NULL ã«ãã
+            file.print <<EOT
+#{indent}	memset( (void *)#{outer}#{name}#{outer2}#{alloc_cp_extra}, 0, sizeof(#{type.get_type.get_type_str}#{type.get_type.get_type_str_post})*(#{size_str}) );   /* GenParamCopy Alloc2 */
+EOT
+          end
+        end
+        file.print "#{indent}	for( i__#{nest} = 0; i__#{nest} < length__#{nest}; i__#{nest}++ ){\t/* GenParamCopy 9 */\n"
+
+        print_param0( name, type.get_type, file, nest + 2, dir, outer, "#{outer2}[i__#{nest}]", b_marshal, b_get, alloc_cp, alloc_cp_extra )
+        file.print "#{indent}	}\n"
+        file.print "#{indent}}\n"
+
+        nest = print_nullable_post( name, type, file, nest, dir, outer, outer2, b_marshal, b_get )
+        indent = "\t" * nest
+      else
+
+        # nullable (pre)
+        nest = print_nullable_pre( name, type, file, nest, dir, outer, outer2, b_marshal, b_get )
+        indent = "	" * nest
+
+        # allocate memory for getting value
+        if b_get && ( dir == :IN || dir == :INOUT || dir == :SEND || dir == :RECEIVE ) && alloc_cp then
+          file.print <<EOT
+#{indent}if((ercd_=#{alloc_cp}(sizeof(#{type.get_type.get_type_str}#{type.get_type.get_type_str_post}),(void **)&#{outer}#{name}#{outer2}#{alloc_cp_extra}))!=E_OK)\t/* GenParamCopy 10 */
+#{indent}	 goto error_reset;
+EOT
+          if ( dir == :SEND || dir == :RECEIVE ) && type.get_type.has_pointer? then
+            # send, receive ã®å ´åã¯ãã¨ã©ã¼ãªã»ããã«åã NULL ã«ãã
+            file.print <<EOT
+#{indent}memset( (void *)#{outer}#{name}#{outer2}#{alloc_cp_extra}, 0, sizeof(#{type.get_type.get_type_str}#{type.get_type.get_type_str_post}) );   /* GenParamCopy Alloc3 */
+EOT
+          end
+        end
+
+        print_param0( name, type.get_type, file, nest, dir, "(*#{outer}", "#{outer2})", b_marshal, b_get, alloc_cp, alloc_cp_extra )
+        # nullable (post)
+        nest = print_nullable_post( name, type, file, nest, dir, outer, outer2, b_marshal, b_get )
+        indent = "	" * nest
+      end
+    when StructType
+      members_decl =type.get_members_decl
+      members_decl.get_items.each { |m|
+        if m.is_referenced?
+          print_param0( m.get_name, m.get_type, file, nest, dir, "#{outer}#{name}#{outer2}.", nil, b_marshal, b_get, alloc_cp, alloc_cp_extra, members_decl )
+        end
+      }
+      members_decl.get_items.each { |m|
+        if ! m.is_referenced?
+          print_param0( m.get_name, m.get_type, file, nest, dir, "#{outer}#{name}#{outer2}.", nil, b_marshal, b_get, alloc_cp, alloc_cp_extra, members_decl )
+        end
+      }
+
+    when VoidType
+    when EnumType  # mikan EnumType
+    when FuncType  # mikan FuncType
+    when ArrayType # mikan ArrayType
+      subsc = type.get_subscript
+      if subsc == nil
+        raise "Unsubscripted Array Not Supported"
+      else        
+        size_str = subsc.to_str( name_list, outer, outer2 )
+
+        loop_counter_type = IntType.new(32)   # mikan åã size_is, count_is ã®å¼æ°ã®åã¨ãã
+        file.print "#{indent}{\t/* GenParamCopy 11 */\n"
+        file.print "#{indent}	#{loop_counter_type.get_type_str}  i__#{nest}, length__#{nest} = #{size_str};\n"
+
+        file.print "#{indent}	for( i__#{nest} = 0; i__#{nest} < length__#{nest}; i__#{nest}++ ){\n"
+        print_param0( name, type.get_type, file, nest + 2, dir, outer, "#{outer2}[i__#{nest}]", b_marshal, b_get, alloc_cp, alloc_cp_extra )
+        file.print "#{indent}	}\n"
+        file.print "#{indent}}\n"
+      end
+    end
+  end
+
+  #=== nullable (pre)
+  def print_nullable_pre( name, type, file, nest, dir, outer, outer2, b_marshal, b_get )
+    if type.is_nullable? then
+      indent = "	" * nest
+      if dir == :OUT then  # OUT ã®å ´å print_out_nullable ã§ NULL ãã©ããã®æ
+å ±ãæ¸¡ã
+        # 'null or not' is sent in the function 'print_out_nullable'
+        if b_get then
+          file.print "#{indent}if( #{outer}#{name}#{outer2} ){\t/* GenParamCopy Null 10 */\n"
+        else
+          file.print "#{indent}if( ! b_#{name}_null_ ){\t/* GenParamCopy Null 11 */\n"
+        end
+        nest += 1
+      else # dir = :IN, :INOUT, :SEND, :RECEIVE
+        if b_get then
+          file.print "#{indent}{\n"
+          if ! ( dir == :INOUT && b_marshal == true ) then
+            file.print <<EOT
+#{indent}	int8_t  b_null_;
+#{indent}	if((ercd_=cTDR_getInt8( &b_null_ )) != E_OK )\t/* GenParamCopy Null 20 */
+#{indent}		 goto error_reset;
+#{indent}	if( ! b_null_ ){
+EOT
+          else # dir = :INOUT, b_marshal = true, b_get = true ã®å ´åãNULL ãã©ããã®æ
+å ±ãæ¸¡ããªã
+            file.print <<EOT
+#{indent}	int8_t  b_null_ = (#{outer}#{name}#{outer2} == NULL);\t/* GenParamCopy Null 21 */
+#{indent}	if( ! b_null_ ){
+EOT
+          end
+        else
+          file.print <<EOT
+#{indent}{
+#{indent}	int8_t  b_null_ = (int8_t)(#{outer}#{name}#{outer2} == NULL);\t/* GenParamCopy Null 31 */
+EOT
+
+          if ! ( dir == :INOUT && b_marshal == false ) then
+            # dir = :INOUT, b_marshal = false, b_get = false ã®å ´å
+            file.print <<EOT
+#{indent}	if((ercd_=cTDR_putInt8( b_null_ )) != E_OK )\t/* GenParamCopy Null 32 */
+#{indent}		 goto error_reset;
+EOT
+          end
+
+          file.print <<EOT
+#{indent}	if( ! b_null_ ){\t/* GenParamCopy Null 33 */
+EOT
+        end
+        nest += 2
+      end
+    end
+    return nest
+  end
+
+  #== nullable (post)
+  def print_nullable_post( name, type, file, nest, dir, outer, outer2, b_marshal, b_get )
+    if type.is_nullable? then
+      if dir == :OUT then  # OUT ã®å ´å print_out_nullable ã§ NULL ãã©ããã®æ
+å ±ãæ¸¡ã
+        nest -= 1
+        indent = "	" * nest
+        file.print "#{indent}}  /* ! b_#{name}_null_   GenParamCopy Null 50 */\n"
+      else # ( dir == :IN || dir == :INOUT || dir == :SEND || dir == :RECEIVE )
+        nest -= 2
+        indent = "	" * nest
+        if b_get then
+          if ! ( dir == :INOUT && b_marshal == true ) then
+            file.print <<EOT
+
+#{indent}	} else { /* null  GenParamCopy Null 51 */
+#{indent}		#{outer}#{name}#{outer2} = NULL;
+#{indent}	}  /* ! b_null_ */
+EOT
+          else # dir = :INOUT, b_marshal = true   # inout ã® out æ¹å
+            file.print "#{indent}	}  /* ! b_null_  GenParamCopy Null 52 */\n"
+          end
+        else
+          file.print "#{indent}	}\t/* GenParamCopy Null 53 */\n"
+        end
+        file.print "#{indent}}\t/* GenParamCopy Null 54 */\n"
+      end
+    end
+    return nest
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/lib/GenTransparentMarshaler.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/lib/GenTransparentMarshaler.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/plugin/lib/GenTransparentMarshaler.rb	(revision 270)
@@ -0,0 +1,720 @@
+# -*- coding: utf-8 -*-
+#
+#  TECS Generator
+#      Generator for TOPPERS Embedded Component System
+#  
+#   Copyright (C) 2008-2014 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: GenTransparentMarshaler.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+#ãã©ã°ã¤ã³ãªãã·ã§ã³ç¨å¤æ°
+#@task_priority:: Integer
+#@channelCelltype:: String
+#@channelCellName:: String
+#@PPAllocatorSize:: Integer
+module GenTransparentMarshaler
+
+  # ãã©ã°ã¤ã³å¼æ°åã¨ Proc
+  RPCPluginArgProc = {
+    "taskPriority"    => Proc.new { |obj,rhs| obj.set_taskPriority rhs },
+    "channelCelltype" => Proc.new { |obj,rhs| obj.set_channelCelltype rhs },
+    "TDRCelltype"     => Proc.new { |obj,rhs| obj.set_TDRCelltype rhs },
+    "channelCell"     => Proc.new { |obj,rhs| obj.set_channelCellName rhs },
+    "PPAllocatorSize" => Proc.new { |obj,rhs| obj.set_PPAllocatorSize rhs },
+  }
+
+  #=== ãã©ã°ã¤ã³å¼æ° taskPriority ã®ãã§ãã¯
+  def set_taskPriority( rhs )
+    @task_priority = rhs
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° channelCelltype ã®ãã§ãã¯
+  def set_channelCelltype( rhs )
+    @channelCelltype = rhs.to_sym
+    # path = [ "::", @channelCelltype ]
+    # obj = Namespace.find( path )
+    nsp = NamespacePath.analyze( @channelCelltype.to_s )
+    obj = Namespace.find( nsp )
+    if ! obj.instance_of?( Celltype ) && ! obj.instance_of?( CompositeCelltype ) then
+      cdl_error( "RPCPlugin: channeclCelltype '#{rhs}' not celltype or not found" )
+    end
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° TDRCelltype ã®ãã§ãã¯
+  def set_TDRCelltype( rhs )
+    @TDRCelltype = rhs.to_sym
+    # path = [ "::", @TDRCelltype ]
+    # obj = Namespace.find( path )
+    nsp = NamespacePath.analyze( @TDRCelltype.to_s )
+    obj = Namespace.find( nsp )
+    if ! obj.instance_of?( Celltype ) && ! obj.instance_of?( CompositeCelltype ) then
+      cdl_error( "RPCPlugin: TDRCelltype '#{rhs}' not celltype or not found" )
+    end
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° channelCellName ã®ãã§ãã¯
+  def set_channelCellName( rhs )
+    @channelCellName = rhs
+    if @channelCellName =~ /\A[a-zA-Z_]\w*/ then
+      # OK
+    else
+      cdl_error( "RPCPlugin: channeclCellName '#{rhs}' unsuitable for identifier" )
+    end
+  end
+
+  #=== ãã©ã°ã¤ã³å¼æ° PPAllocatorSize ã®ãã§ãã¯
+  def set_PPAllocatorSize( rhs )
+    @PPAllocatorSize = rhs
+  end
+
+  #=== marshaler ã®ã»ã«ã¿ã¤ãåãè¨­å®ãã
+  def initialize_transparent_marshaler cell_name
+    @task_priority = 8
+    @channelCelltype = "tDataqueueOWChannel"
+    @TDRCelltype     = "tTDR"
+    @channelCellName = "#{cell_name}_Channel"
+    @PPAllocatorSize = nil
+
+    @marshaler_celltype_name = "tMarshaler_#{@signature.get_global_name}"
+    @unmarshaler_celltype_name = "tUnmarshaler_#{@signature.get_global_name}"
+    @marshaler_celltype_file_name = "#{$gen}/#{@marshaler_celltype_name}.cdl"
+  end
+
+  def gen_marshaler_celltype 
+
+    if @PPAllocatorSize then
+      alloc_call_port = "  call sPPAllocator cPPAllocator;\n"
+    else
+      alloc_call_port = ""
+    end
+
+    f = CFile.open( @marshaler_celltype_file_name, "w" )
+    # åãå
+å®¹ãäºåº¦æ¸ãå¯è½æ§ãã (AppFile ã¯ä¸å¯)
+
+    f.print <<EOT
+
+celltype #{@marshaler_celltype_name} {
+  entry #{@signature.get_namespace_path} eClientEntry;
+  call sTDR        cTDR;
+  call sEventflag  cEventflag;
+  [optional]
+    call sSemaphore cLockChannel;  // this port is eliminated by optimize
+};
+celltype #{@unmarshaler_celltype_name} {
+  call #{@signature.get_namespace_path} cServerCall;
+  call sTDR        cTDR;
+  call sEventflag  cEventflag;
+  entry sUnmarshalerMain  eUnmarshalAndCallFunction;
+#{alloc_call_port}};
+EOT
+    f.close
+  end
+
+  #===  åãå£é¢æ°ã®æ¬ä½ã³ã¼ããçæï¼é ­é¨ã¨æ«å°¾ã¯å¥éåºåï¼
+  #ct_name:: Symbol    (through ãã©ã°ã¤ã³ã§çæããã) ã»ã«ã¿ã¤ãå ï¼Symbol ã¨ãã¦éããã¦ããï¼ãããï¼
+  def gen_ep_func_body( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+
+    # unmarshaler ã¯ã©ã¹ã?
+    if ct_name == @unmarshaler_celltype_name.to_sym then
+      gen_ep_func_body_unmarshal( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+    else
+      gen_ep_func_body_marshal( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+    end
+  end
+
+  #===  marshal ã³ã¼ãã®çæ
+  def gen_ep_func_body_marshal( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+
+    b_void = false
+    b_ret_er = false
+
+    # é¢æ°ã®æ»ãå¤ã®å
+ã®åãå¾ã(typedef ããã¦ããå ´å)
+    type = func_type.get_type.get_original_type
+
+    # æ»ãå¤è¨æ¶ç¨ã®å¤æ°ãåºåï¼void åã®é¢æ°ã§ã¯åºåããªãï¼
+    if ! type.is_void? then
+      if func_type.get_type.kind_of?( DefinedType ) && ( func_type.get_type.get_type_str == "ER" || func_type.get_type.get_type_str == "ER_INT" ) then
+        file.print( "    #{func_type.get_type.get_type_str}  retval_ = E_OK;\n" )
+        b_ret_er = true
+      else
+        file.print( "    #{func_type.get_type.get_type_str}  retval_;\n" )
+      end
+    else
+      b_void = true
+    end
+
+    file.print( "    ER      ercd_;\n" )
+    file.print( "    FLGPTN  flgptn;\n" )
+
+    # å¼ã³å
+ã® signature ãåãåºã
+    signature = @signature
+
+    # é¢æ° ID ï¼æ´æ°å¤ï¼
+    func_id = signature.get_id_from_func_name( func_name )
+    file.print( "    int16_t  func_id_ = #{func_id};    /* id of #{func_name}: #{func_id} */\n" )
+
+    # ã·ã³ã°ã«ãã³ã§ãªããï¼
+    if ! b_singleton then
+
+      # singleton ã§ãªããã° p_cellcb åå¾ã³ã¼ããåºå
+      file.print <<EOT
+    #{ct_name}_CB *p_cellcb;
+
+    if( VALID_IDX( idx ) ){
+        p_cellcb = GET_CELLCB(idx);
+EOT
+
+      # ã¨ã©ã¼ãè¿ããï¼
+      if b_ret_er then
+        file.print <<EOT
+    }else{
+         return ERCD( E_RPC, E_ID );
+    }
+EOT
+      else
+        file.print <<EOT
+    }else{
+        /* ã¨ã©ã¼å¦çã³ã¼ããããã«è¨è¿° */
+    }
+EOT
+      end
+    end
+
+    # channel lock ã³ã¼ã
+    file.print <<EOT
+    /* Channel Lock */
+    if( is_cLockChannel_joined() )
+      cLockChannel_wait();
+
+EOT
+
+    # SOP ãéä¿¡
+    file.print "    /* SOPã®éåº */\n"
+    file.print "    if( ( ercd_ = cTDR_sendSOP( true ) ) != E_OK )\n"
+    file.print "      goto error_reset;\n"
+
+    # func_id ãéä¿¡
+    file.print "    /* é¢æ° id ã®éåº */\n"
+    file.print "    if( ( ercd_ = cTDR_putInt16( func_id_ ) ) != E_OK )\n"
+    file.print "        goto error_reset;\n"
+
+    # p "celltype_name, sig_name, func_name, func_global_name"
+    # p "#{ct_name}, #{sig_name}, #{func_name}, #{func_global_name}"
+
+    b_get = false    # marshal ãªã put
+    b_marshal = true  # marshal
+
+    # in æ¹åã®å
+¥åºåãåºå
+    file.print "    /* å
+¥åå¼æ°éåº */\n"
+    print_params( params, file, 1, b_marshal, b_get, true, func_type.is_oneway? )
+    print_params( params, file, 1, b_marshal, b_get, false, func_type.is_oneway? )
+    if ! b_void && ! func_type.is_oneway? then
+      ret_ptr_type = PtrType.new( func_type.get_type )
+      print_param_nc( "retval_", ret_ptr_type, file, 1, :RETURN, "&", nil, b_get )
+    end
+
+    file.print "    /* EOPã®éåºï¼ãã±ããã®æãã ãï¼ */\n"
+    if ! func_type.is_oneway? then
+      b_continue = "true"
+    else
+      b_continue = "false"
+    end
+    file.print "    if( (ercd_=cTDR_sendEOP(#{b_continue})) != E_OK )\n"
+    file.print "        goto error_reset;\n\n"
+
+    if ! func_type.is_oneway? then
+      file.print <<EOT
+    if( (ercd_=cEventflag_wait( 0x01, TWF_ANDW, &flgptn )) != E_OK ){
+      ercd_ = ERCD(E_RPC,ercd_);
+      goto error_reset;
+    }
+    if( (ercd_=cEventflag_clear( 0x00 ) ) != E_OK ){
+      ercd_ = ERCD(E_RPC,ercd_);
+      goto error_reset;
+    }
+EOT
+    end # ! func_type.is_oneway?
+
+    file.print <<EOT
+    /* Channel Lock */
+    if( is_cLockChannel_joined() )
+      cLockChannel_signal();
+EOT
+
+    if( b_void == false )then
+      # å¼ã³å
+ã«æ»ãå¤ããªã¿ã¼ã³
+      file.print( "    return retval_;\n" )
+    else
+      file.print( "    return;\n" )
+    end
+
+    file.print <<EOT
+
+error_reset:
+    if( ercd_ != ERCD( E_RPC, E_RESET ) )
+        (void)cTDR_reset();
+EOT
+
+    # channel lock ã³ã¼ã
+    file.print <<EOT
+    /* Channel Lock */
+    if( is_cLockChannel_joined() )
+      cLockChannel_signal();
+
+EOT
+
+    if( b_ret_er != false )then
+      # å¼ã³å
+ã«æ»ãå¤ããªã¿ã¼ã³
+      file.print( "    return ercd_;\n" )
+    else
+      file.print( "    return;\n" )
+    end
+
+  end
+
+  #===  unmarshal ã³ã¼ãã®çæ
+  def gen_ep_func_body_unmarshal( file, b_singleton, ct_name, global_ct_name, sig_name, ep_name, func_name, func_global_name, func_type, params )
+
+#    b_ret_er = true
+    b_ret_er = false
+
+    # func_id ãå¾ãã³ã¼ããçæ
+    file.print <<EOT
+
+    int16_t   func_id_;
+    ER        ercd_;
+
+    #{ct_name}_CB *p_cellcb;
+
+    if( VALID_IDX( idx ) ){
+        p_cellcb = GET_CELLCB(idx);
+EOT
+
+    if b_ret_er then
+        file.print <<EOT
+    }else{
+        return ERCD( E_RPC, E_ID );
+    }
+EOT
+    else
+        file.print <<EOT
+    }else{
+        /* ã¨ã©ã¼å¦çã³ã¼ããããã«è¨è¿° */
+    }
+EOT
+    end
+
+    file.print <<EOT
+
+    /* SOPã®ãã§ãã¯ */
+    if( (ercd_=cTDR_receiveSOP( false )) != E_OK )
+        goto error_reset;
+    /* func_id ã®åå¾ */
+    if( (ercd_=cTDR_getInt16( &func_id_ )) != E_OK )
+        goto error_reset;
+
+#ifdef RPC_DEBUG
+    syslog(LOG_INFO, "unmarshaler task: func_id: %d", func_id_ );
+#endif
+    switch( func_id_ ){
+EOT
+
+    # å¼ã³å
+ã® signature ãåãåºã
+    # port = @celltype.find( @next_cell_port_name )
+    # signature = port.get_signature
+    signature = @signature
+
+    # through ã® signature ã«å«ã¾ãã ãã¹ã¦ã®é¢æ°ã«ã¤ãã¦
+    signature.get_function_head_array.each { |f|
+      f_name = f.get_name
+      f_type = f.get_declarator.get_type
+      id = signature.get_id_from_func_name( f_name )
+
+      # é¢æ°ã¯è¿ãå¤ãæã¤ã?
+      if f_type.get_type.is_void? then
+        b_void = true
+      else
+        b_void = false
+      end
+
+      # ãã±ããã®çµããããã§ãã¯ï¼æªåãåãã®ãã¼ã¿ãæ®ã£ã¦ããªãããã§ãã¯ï¼
+      file.print "    case #{id}:       /*** #{f_name} ***/ \n"
+      file.print "        if( tTransparentUnmarshaler_#{@signature.get_global_name}_#{f_name}() != E_OK )\n"
+      file.print "            goto error_reset;\n"
+      file.print "        break;\n"
+
+    } # 
+
+    if @PPAllocatorSize then
+      ppallocator_dealloc_str = "    /* PPAllocator ã®ãã¹ã¦ãè§£æ¾ */\n    cPPAllocator_dealloc_all();"
+    else
+      ppallocator_dealloc_str = ""
+    end
+
+
+    file.print <<EOT
+    default:
+        syslog(LOG_INFO, "unmarshaler task: ERROR: unknown func_id: %d", func_id_ );
+    };
+#{ppallocator_dealloc_str}
+    return;
+
+error_reset:
+    if( ercd_ != ERCD( E_RPC, E_RESET ) )
+        (void)cTDR_reset();
+#{ppallocator_dealloc_str}
+EOT
+
+  end
+
+  # IN b_marshal, b_get
+  #  b_marshal = true  && b_get == false   :  ãã¼ã·ã£ã©ã§å
+¥åå¼æ°éåº
+  #  b_marshal = true  && b_get == true    :  ãã¼ã·ã£ã©ã§åºåå¼æ°åå
+  #  b_marshal = false && b_get == true    :  ã¢ã³ãã¼ã·ã£ã©ã§å
+¥åå¼æ°åå
+  #  b_marshal = false && b_get == get     :  ã¢ã³ãã¼ã·ã£ã©ã§åºåå¼æ°éåº
+  def print_params( params, file, nest, b_marshal, b_get, b_referenced, b_oneway = false )
+    params.each{ |param|
+# p "#{param.get_name}:  b_marshal: #{b_marshal} b_get: #{b_get}"
+      if ! ( b_referenced == param.is_referenced? ) then
+        next
+      end
+
+      dir = param.get_direction
+      type = param.get_type
+      if b_oneway && dir == :IN && type.get_original_type.kind_of?( PtrType ) || type.get_original_type.kind_of?( ArrayType ) then
+        # oneway, in, PtrType ã®å ´åã³ãã¼
+        alloc_cp = "cPPAllocator_alloc"
+        alloc_cp_extra = nil
+        print_param( param.get_name, type, file, nest, dir, nil, nil, b_marshal, b_get, alloc_cp, alloc_cp_extra )
+      else
+        if( b_get == false && b_marshal == true || b_get == true && b_marshal == false  )then
+          case dir
+#          when :IN, :INOUT, :SEND
+          when :IN, :INOUT, :OUT, :SEND, :RECEIVE
+            print_param_nc( param.get_name, type, file, nest, b_marshal, nil, nil, b_get )
+          end
+        else
+#         case dir
+#         when :OUT, :INOUT, :RECEIVE
+#         when :RECEIVE
+#           print_param_nc( param.get_name, type, file, nest, b_marshal, nil, nil, b_get )
+#         end
+        end
+      end
+    }
+  end
+
+  #=== ã³ãã¼ããªãå¼æ°æ¸¡ãã³ã¼ãã®åºå
+  def print_param_nc( name, type, file, nest, b_marshal, outer, outer2, b_get )
+    indent = "    " * ( nest + 1 )
+
+    case type
+    when DefinedType
+      print_param_nc( name, type.get_type, file, nest, b_marshal, outer, outer2, b_get )
+    when BoolType, IntType, FloatType, PtrType, ArrayType
+      case type
+      when BoolType
+        type_str = "Int8"
+        cast_str = "int8_t"
+      when IntType
+        bit_size = type.get_bit_size
+        case type.get_sign
+        when :UNSIGNED
+          signC = "U"
+          sign  = "u"
+        when :SIGNED
+          if bit_size == -1 || bit_size == -11 then
+            # signed char ã®å ´åãsigned ãæå®ãã
+            signC = "S"
+            sign  = "s"
+          else
+            signC = ""
+            sign  = ""
+          end
+        else
+          signC = ""
+          sign  = ""
+        end
+
+        # p "pn:: #{name} #{bit_size} #{type.get_type_str}"
+        case bit_size
+        when  -1, -11  # -1: char_t, -11: char
+          type_str = "#{signC}Char"
+          cast_str = "#{sign}char_t"
+        when -2
+          type_str = "#{signC}Short"
+          cast_str = "#{sign}short_t"
+        when -3
+          type_str = "#{signC}Int"
+          cast_str = "#{sign}int_t"
+        when -4
+          type_str = "#{signC}Long"
+          cast_str = "#{sign}long_t"
+        when -5
+          type_str = "Intptr"
+          cast_str = "intptr_t"
+        when 8, 16, 32, 64, 128
+          type_str = "#{signC}Int#{bit_size}"
+          cast_str = "#{sign}int#{bit_size}_t"
+        else
+          raise "unknown bit_size '#{bit_size}' for int type "
+        end
+
+      when FloatType
+        bit_size = type.get_bit_size
+        if bit_size == 32 then
+          type_str = "Float32"
+          cast_str = "float32_t"
+        else
+          type_str = "Double64"
+          cast_str = "double64_t"
+        end
+
+      when PtrType
+        type_str = "Intptr"
+        cast_str = "intptr_t"
+      when ArrayType
+        type_str = "Intptr"
+        cast_str = "intptr_t"
+      end
+
+      if type.get_type_str == cast_str then
+        cast_str = ""
+      else
+        cast_str = "(" + cast_str + ")"
+      end
+
+      if( b_get )then
+        cast_str.gsub!( /\)$/, "*)" )
+        file.print "    " * nest
+        file.print "if( ( ercd_ = cTDR_get#{type_str}( #{cast_str}&(#{outer}#{name}#{outer2}) ) ) != E_OK )\n"
+        file.print "    " * nest
+        file.print "    goto error_reset;\n"
+      else
+        file.print "    " * nest
+        file.print "if( ( ercd_ = cTDR_put#{type_str}( #{cast_str}#{outer}#{name}#{outer2} ) ) != E_OK )\n"
+        file.print "    " * nest
+        file.print "    goto error_reset;\n"
+      end
+
+    when StructType
+      members_decl =type.get_members_decl
+      members_decl.get_items.each { |m|
+        if m.is_referenced? then
+          print_param_nc( m.get_name, m.get_type, file, nest, b_marshal, "#{outer}#{name}#{outer2}.", nil, b_get )
+        end
+      }
+      members_decl.get_items.each { |m|
+        if ! m.is_referenced? then
+          print_param_nc( m.get_name, m.get_type, file, nest, b_marshal, "#{outer}#{name}#{outer2}.", nil, b_get )
+        end
+      }
+
+    when VoidType
+    when EnumType  # mikan EnumType
+    when FuncType  # mikan FuncType
+    end
+  end
+
+
+  #=== PREAMBLE é¨ã®ã³ã¼ãçæ
+  # ã¢ã³ãã¼ã·ã£ã©ã»ã«ã¿ã¤ãã®å ´åãã¢ã³ãã¼ã·ã£ã©é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨ãçæ
+  def gen_preamble file, b_singleton, ct_name, global_name
+    if ct_name != @unmarshaler_celltype_name.to_sym then
+      return
+    end
+
+    file.print "/* ã¢ã³ãã¼ã·ã£ã©é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨ */\n"
+    # signature ã«å«ã¾ãã ãã¹ã¦ã®é¢æ°ã«ã¤ãã¦
+    @signature.get_function_head_array.each { |f|
+      f_name = f.get_name
+      f_type = f.get_declarator.get_type
+      id = @signature.get_id_from_func_name( f_name )
+      file.print "static ER  tTransparentUnmarshaler_#{@signature.get_global_name}_#{f_name}();\t/* func_id: #{id} */\n"
+    }
+    file.print "\n"
+  end
+
+  #=== POSTAMBLE é¨ã®ã³ã¼ãçæ
+  # ã¢ã³ãã¼ã·ã£ã©ã»ã«ã¿ã¤ãã®å ´åãã¢ã³ãã¼ã·ã£ã©é¢æ°ã®çæ
+  def gen_postamble file, b_singleton, ct_name, global_name
+    if ct_name != @unmarshaler_celltype_name.to_sym then
+      return
+    end
+
+    file.print "\n/*** ã¢ã³ãã¼ã·ã£ã©é¢æ° ***/\n\n"
+    @signature.get_function_head_array.each { |f|
+      f_name = f.get_name
+      f_type = f.get_declarator.get_type
+      id = @signature.get_id_from_func_name( f_name )
+
+      # é¢æ°ã¯è¿ãå¤ãæã¤ã?
+      if f_type.get_type.is_void? then
+        b_void = true
+      else
+        b_void = false
+      end
+
+      file.print <<EOT
+/*
+ * name:    #{f_name}
+ * func_id: #{id} 
+ */
+EOT
+      file.print "static ER\n"
+      file.print "tTransparentUnmarshaler_#{@signature.get_global_name}_#{f_name}()\n"
+      file.print "{\n"
+      file.print "	ER  ercd_;\n"
+      file.print "	CELLCB  *p_cellcb;\n"
+
+      # å¼æ°ãååãå¤æ°ã®å®ç¾©
+      param_list = f.get_declarator.get_type.get_paramlist.get_items
+           # FuncHead->  Decl->    FuncType->ParamList
+      param_list.each{ |par|
+        name = par.get_name
+        type = par.get_type
+        if type.kind_of? ArrayType then
+          type = type.get_type
+          aster = "(*"
+          aster2 = ")"
+        else
+          aster = ""
+          aster2 = ""
+        end
+
+        type_str = type.get_type_str.gsub( /\bconst\b */, "" ) # "const" ãå¤ã
+
+        file.printf( "    %-12s %s%s%s%s;\n", type_str, aster, name, aster2, type.get_type_str_post )
+      }
+
+      # æ»ãå¤ãåãåãå¤æ°ã®å®ç¾©
+      if ! b_void then
+        if f.is_oneway? then
+          retval_ptr = ""   # oneway ã®å ´åãåãåããæ¨ã¦ããã
+        else
+          retval_ptr = "*"
+        end
+        file.printf( "    %-12s #{retval_ptr}retval_%s;\n", f_type.get_type.get_type_str, f_type.get_type.get_type_str_post )
+      end
+
+      # in æ¹åã®å
+¥åºåãå
+¥å
+      file.print "\n        /* å
+¥åå¼æ°åå */\n"
+      b_get = true    # unmarshal ã§ã¯ get
+      b_marshal  = false
+      print_params( param_list, file, 1, b_marshal, b_get, true, f.is_oneway? )
+      print_params( param_list, file, 1, b_marshal, b_get, false, f.is_oneway? )
+      if ! b_void && ! f.is_oneway? then
+        ret_ptr_type = PtrType.new( f_type.get_type )
+        print_param_nc( "retval_", ret_ptr_type, file, 2, :RETURN, nil, nil, b_get )
+      end
+
+      # ãã±ããã®åä¿¡å®äº
+      # mikan æ¬å½ã¯ãå¯¾è±¡é¢æ°ãå¼åºãå¾ã«å®æ½ãããï¼å¼åºããã±ããã®ä½¿ç¨çµãããå®£è¨ããç®çã¨ãã¦
+      file.print "        /* ãã±ããçµããããã§ãã¯ */\n"
+      if ! f.is_oneway? then
+        b_continue = "true"
+      else
+        b_continue = "false"
+      end
+      file.print "    if( (ercd_=cTDR_receiveEOP(#{b_continue})) != E_OK )\n"
+      file.print "        goto error_reset;\n\n"
+
+      # å¯¾è±¡é¢æ°ãå¼åºã
+      file.print "    /* å¯¾è±¡é¢æ°ã®å¼åºã */\n"
+      if b_void then
+        file.print( "    cServerCall_#{f_name}(" )
+      else
+        file.print( "    #{retval_ptr}retval_ = cServerCall_#{f_name}(" )
+      end
+
+      delim = " "
+      param_list.each{ |par|
+        file.print delim
+        delim = ", "
+        file.print "#{par.get_name}"
+      }
+      file.print( " );\n" )
+
+      # æ»ãå¤ãåºåå¼æ°ã®ååã³ã¼ãã®çæ
+
+      # oneway ã®å ´ååºåãæ»ãå¤ãç¡ããååãå¾
+ããªãï¼éåæãªå¼åºãï¼
+      if ! f.is_oneway? then
+        file.print <<EOT
+    /* é¢æ°å¦çã®çµäºãéç¥ */
+    if( ( ercd_ = cEventflag_set( 0x01 ) ) != E_OK ){
+      goto error_reset;
+    }
+EOT
+      end  # ! f.is_oneway?
+      file.print <<EOT
+    return E_OK;
+error_reset:
+    return ercd_;
+}
+
+EOT
+
+    }
+
+  end
+
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/version.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/version.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecslib/version.rb	(revision 270)
@@ -0,0 +1,2 @@
+$package = "tecsgen"
+$version = "1.3.1.5"
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsmerge
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsmerge	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsmerge	(revision 270)
@@ -0,0 +1,6 @@
+#! /bin/sh
+
+# $Id: tecsmerge 1138 2010-10-08 03:10:44Z okuma-top $
+
+tecsmerge.rb $*
+
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsmerge.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsmerge.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecsmerge.rb	(revision 270)
@@ -0,0 +1,778 @@
+#! /usr/bin/env ruby
+# -*- coding: utf-8 -*-
+
+#
+#  TECS merger
+#      Merger for TECS generated templates
+#  
+#   Copyright (C) 2008-2015 by TOPPERS Project
+#--
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+#  
+#   $Id: tecsmerge.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+#++
+
+#= tecsgen  : TECS ã®ãã¼ã¸ã£
+#
+#Authors::   å¤§å±± åå¸
+#Version::   
+#Copyright:: Copyright (C) TOPPERS Project, 2008-2015. All rights reserved.
+#License::   TOPPERS ã©ã¤ã»ã³ã¹ã«æºæ 
+
+=begin
+tecsmerge ã¯ãã³ãã¬ã¼ããã¡ã¤ã«ãå
+ã«ä½æãããã»ã«ã¿ã¤ãã³ã¼ãï¼å«ã¤ã³ã©ã¤ã³é¢æ°ãè¨è¿°ããã»ã«ã¿ã¤ãã¤ã³ã©ã¤ã³ãããï¼ãä¿å®ãããã®ã§ããã
+ã»ã«ã¿ã¤ãã«ä»¥ä¸ã®æ¹å¤ãå ããããå ´åã«å¯¾å¿ããã
+ã»åãå£é¢æ°ãå¢ãã
+ã»åãå£ã®ååãå¤æ´ããã
+ã»åãå£é¢æ°ã®ååãå¤æ´ããã
+
+% tecsmerge source_dir   dest_dir
+% tecsmerge source_files dest_dir
+
+% tecsmerge -p port_name -f old_name:new_name source_file dest_dir
+% tecsmerge -p old_name:new_name source_file dest_dir
+
+source_file ã®ååã¯ _teml.c, _templ.h ã§çµãã£ã¦ããªãã¦ã¯ãªããªã
+dest_file ã¯ source_file ã® _templ ãåãé¤ããååã§ãªãã¦ã¯ãªããªã
+dest_file ãå­å¨ããªãå ´åã_templ ãåãé¤ããååã§ã³ãã¼ããã ãã§ãã
+
+ä»¥ä¸ã®ã­ã¼ã¯ã¼ãã å«ãè¡ãæ¢ã
+
+0) å
+é ­
+1) /* #[<PREAMBLE>]#,
+2)  * #[</PREAMBLE>]#
+3) /* #[<ENTRY_PORT>]#
+4)  * #[</ENTRY_PORT>]#
+5) /* #[<ENTRY_FUNC>]#
+6) {                       # new mode (function header is changed)
+    * #[/<ENTRY_FUNC>]#    # when --old-mode
+    * #[/ENTRY_FUNC>]#     # for Bug compatibility
+7) /* #[<POSTAMBLE>]#
+8)  * #[</POSTAMBLE>]#
+9) çµãã
+
+ä¸è¨ã®ãã¡ 1), 3), 5), 7) ãéå§ã­ã¼ã¯ã¼ãã¨å¼ã¶ã
+ãªããç¹ã«æ­ãã®ãªãå ´åã9) ãéå§ã­ã¼ã¯ã¼ãã«å«ãã
+
+ååã®å¤æ´
+
+a) åãå£åã®å¤æ´
+
+  -p old_port_name:new_port_name
+
+b) åãå£é¢æ°åã®å¤æ´
+
+  -f old_port_name:new_port_name
+
+ old_port_name, new_port_name ã¯ãæ¬¡ã®å½¢å¼ã§ãªãã¦ã¯ãªããªãã
+
+  åãå£å + '_' + é¢æ°å
+
+
+i) ãããï¼
+
+  0) ã¨éå§ã­ã¼ã¯ã¼ãã®é
+
+ii) ãããï¼
+
+  1) ã¨éå§ã­ã¼ã¯ã¼ãã®é
+
+éå¸¸ããããè¤æ°å­å¨ãããã¨ã¯ãªãããè¤æ°å­å¨ããå ´åããã¹ã¦ãã¡ã¤ã«
+ã®å
+é ­ã«åºåãããã
+
+iii) åãå£ããã
+
+  3) ã¨éå§ã­ã¼ã¯ã¼ãã®é
+
+åãå£ãããã¯ãå¾ç¶ã®åãå£é¢æ°ã®åãå£ãè¡¨ããã®ã¨ä»®å®ãããã
+åãå£ãããã¯ãéè¦ã§ã¯ãªãã
+
+iv) åãå£é¢æ°
+
+  5) ã¨éå§ã­ã¼ã¯ã¼ãã®é
+
+=end
+
+require 'optparse'
+$n_err   = 0
+$b_show  = false
+$b_exist = false            # ã³ãã¼å
+ã«ãã¡ã¤ã«ãããå ´åã®ã¿ãã¼ã¸
+$old_mode = false           # old_mode (é¢æ°æ¬ä½ã¨ãã¦ /<ENTRY_FUNC> ã®ä»£ããã« '{' ãä½¿ã
+
+#2.0
+def write_array( file, array )
+  array.each{ |line|
+    file.write line
+  }
+end
+
+class PortRenamer
+  @@port_renamer_list = {}
+  @@port_renamer_current = nil
+
+  def initialize( old_port_name, new_port_name )
+    old_port_name = old_port_name.to_sym
+    if new_port_name then
+      new_port_name = new_port_name.to_sym
+    end
+    # p "port_renamer: #{old_port_name}"
+    @@port_renamer_list[old_port_name] = self
+    @@port_renamer_current = self
+    @old_port_name = old_port_name
+    @new_port_name = new_port_name
+    @func_renamer_list = {}
+  end
+
+  def self.add_func( old_name, new_name )
+    # p "add_func: #{old_name}"
+    if @@port_renamer_current == nil then
+      STDERR.puts( "error: #{old_name}: specify -p before -f" )
+      n_err += 1
+    else
+      @@port_renamer_current.add_func( old_name, new_name )
+    end
+  end
+
+  def add_func( old_name, new_name )
+    old_name = old_name.to_sym
+    new_name = new_name.to_sym
+    if @func_renamer_list[old_name] then
+      STDERR.puts( "error: #{old_name}: duplicate in port #{@old_port_name}" )
+      $n_err += 1
+    elsif old_name == new_name then
+      STDERR.puts( "error: #{old_name}: old and new are the same name" )
+      $n_err += 1
+    end
+    @func_renamer_list[old_name] = new_name
+  end
+
+  def self.show
+    if @@port_renamer_list then
+      @@port_renamer_list.each { |pr,pc|
+        pc.show
+      }
+    end
+  end
+
+  def self.get_list
+    @@port_renamer_list
+  end
+
+  attr_accessor  :old_port_name, :new_port_name, :func_renamer_list
+
+  def show
+    print "port: #{@old_port_name}"
+    if @new_port_name then
+      print " => #{@new_port_name}"
+    end
+    puts ""
+
+    @func_renamer_list.each { |old,new|
+      print "  func: #{old} => #{new}\n"
+    }
+  end
+end
+
+
+class CDLContents
+  #@head::             [string]
+  #@preamble_comment:: [string]
+  #@preamble_body::    [string]
+  #@entry_port::       {ep_name=>CDLEntryPort}
+  #@entry_port_array:: [CDLEntryPort]
+  #@postamble_comment::[string]
+  #@postamble_body::   [string]
+
+  @@DELIMITERS = {
+    # state             => [ regexp_original,                 [previous states]                   , Regexp ]
+    :HEAD               => [ "#[<BeginingOfFile>]#",          []                       ],
+    :PREAMBLE_COMMENT   => [ "/* #[<PREAMBLE>]#",             [:HEAD]                  ],
+    :PREAMBLE_BODY      => [ " * #[</PREAMBLE>]#",            [:PREAMBLE_COMMENT]      ],
+    :ENTRY_COMMENT      => [ "/* #[<ENTRY_PORT>]# PORT_NAME", [:PREAMBLE_BODY, :ENTRY_FUNC_BODY, :ENTRY_FUNC_BODY2] ],
+    :ENTRY_BODY         => [ " * #[</ENTRY_PORT>]#",          [:ENTRY_COMMENT]         ],
+    :ENTRY_FUNC_COMMENT => [ "/* #[<ENTRY_FUNC>]# FUNC_NAME", [:ENTRY_BODY, :ENTRY_FUNC_BODY, :ENTRY_FUNC_BODY2]    ],
+    :POSTAMBLE_COMMENT  => [ "/* #[<POSTAMBLE>]#",            [:ENTRY_FUNC_BODY, :ENTRY_FUNC_BODY2, :PREAMBLE_BODY] ],
+    :POSTAMBLE_BODY     => [ " * #[</POSTAMBLE>]#",           [:POSTAMBLE_COMMENT]     ],
+    :EOF                => [ "#[</EndOfFile>]#",              [:POSTAMBLE_BODY,:ENTRY_FUNC_BODY, :ENTRY_FUNC_BODY2, :PREAMBLE_BODY]  ],
+  }
+
+  @@DELIMITERS_FUNC_BY_COMMENT = {
+    :ENTRY_FUNC_BODY    => [ " * #[</ENTRY_FUNC>]#",          [:ENTRY_FUNC_COMMENT]    ],
+    :ENTRY_FUNC_BODY2   => [ " * #[/ENTRY_FUNC>]#",           [:ENTRY_FUNC_COMMENT]    ],  # for Bug compatibility
+  }
+
+  @@DELIMITERS_FUNC_BY_BRACKET = {
+    :ENTRY_FUNC_BODY    => [ "\\\{",                          [:ENTRY_FUNC_COMMENT]    ],
+  }
+
+  def self.rewrite_DELIMITERS  delimiters
+    delimiters.each{ |stat, stat_info|
+      s = stat_info[0].gsub( /([\*\[\]])/, "\\\\\\1" )   # *, [, ] ã®åã« \\ ãæ¿å
+¥
+      s.gsub!( /\s*\w*_NAME/, "\\s*(\\w*)" )             # ..._NAME ã (w*) ã«å¤æ´
+      s = "^" + s                                        # ^ ãå
+é ­ã«æ¿å
+¥
+      stat_info[2] = Regexp.new( s )
+      # p stat_info[2]
+    }
+  end
+
+  rewrite_DELIMITERS @@DELIMITERS
+  rewrite_DELIMITERS @@DELIMITERS_FUNC_BY_COMMENT
+  rewrite_DELIMITERS @@DELIMITERS_FUNC_BY_BRACKET
+
+  #=== ã¢ã¼ãã«å¾ã DELIMITERS ã« DELIMITERS_FUNC_BY_* ããã¼ã¸ãã
+  # mode :OLD_FUNC_BODY, :NEW_FUNC_BODY
+  def self.merge_DELIMITERS mode
+    case mode
+    when :OLD_FUNC_BODY
+      @@DELIMITERS.merge! @@DELIMITERS_FUNC_BY_COMMENT
+    when :NEW_FUNC_BODY
+      @@DELIMITERS.merge! @@DELIMITERS_FUNC_BY_BRACKET
+    else
+      raise "unknown mode"
+    end
+  end
+
+  #all_contents:: [string,...]
+  def initialize all_contents
+    part = []
+    line_no = 0
+    stat = :HEAD
+    arg = nil
+    port_name = nil
+    func_name = nil
+
+    @entry_port = {}
+    @entry_port_array = []
+
+    @head = []
+    @preamble_comment = []
+    @preamble_body = []
+    @postamble_comment = []
+    @postamble_body = []
+
+    (all_contents+[nil]).each{ |line|  # nil: EOF
+      line_no += 1
+      # p "L: #{line}"
+      b_delim = false        # ããªãã¿ã­ã¼ã¯ã¼ãã®è¡
+      @@DELIMITERS.each { |next_stat,stat_info|
+
+        next if next_stat == :HEAD || ( next_stat == :EOF && line != nil )
+
+        # p "R: #{stat_info[0]}"
+        if stat_info[2] =~ line || ( line == nil && next_stat == :EOF ) then
+          # p "D: #{line}: #{stat}"
+          b_delim = true
+
+          found = false
+          stat_info[1].each{ |prev_stat|
+            if stat == prev_stat then
+              found = true
+            end
+          }
+          if ! found then
+            STDERR.puts "error #{line_no}: unsuitable previous keyword"
+            STDERR.puts "error #{line_no}:   previous:  \"#{@@DELIMITERS[stat][0]}\""
+            STDERR.puts "error #{line_no}:   current:   \"#{@@DELIMITERS[next_stat][0]}\""
+            expect = ""; delim = ""
+            stat_info[1].each{ |prev_stat| expect = "#{expect+delim}\"#{@@DELIMITERS[prev_stat][0]}\""; delim = ", " }
+            STDERR.puts "error #{line_no}:   suitable previous: #{expect}"
+            $n_err += 1
+          end
+
+          case stat
+          when :PREAMBLE_COMMENT, :ENTRY_COMMENT, :ENTRY_FUNC_COMMENT, :POSTAMBLE_COMMENT
+            part << line
+          end
+
+          case stat   # åã®ç¶æ
+
+          when :HEAD
+            @head = part
+          when :PREAMBLE_COMMENT
+            @preamble_comment = part
+          when :PREAMBLE_BODY
+            @preamble_body = part
+          when :ENTRY_COMMENT
+            port_name = arg.to_sym
+            @entry_port[ port_name ] = CDLEntryPort.new
+            @entry_port_array << port_name
+            @entry_port[ port_name ].entry_comment = part
+          when :ENTRY_BODY
+            @entry_port[ port_name ].entry_body = part
+          when :ENTRY_FUNC_COMMENT
+            func_name = arg.to_sym
+            if @entry_port[ port_name ] then   # nil ãªãæ¢ã«ã¨ã©ã¼
+              @entry_port[ port_name ].entry_func_comment[ func_name ] = part
+              @entry_port[ port_name ].entry_func_array << func_name
+            end
+          when :ENTRY_FUNC_BODY, :ENTRY_FUNC_BODY2
+            if @entry_port[ port_name ] then   # nil ãªãæ¢ã«ã¨ã©ã¼
+              @entry_port[ port_name ].entry_func_body[ func_name ] = part
+            end
+          when :POSTAMBLE_COMMENT
+            @postamble_comment = part
+          when :POSTAMBLE_BODY
+            @postamble_body = part
+          else
+            raise "Unknown state #{stat}"
+          end
+
+          case next_stat
+          when :PREAMBLE_COMMENT, :ENTRY_COMMENT, :ENTRY_FUNC_COMMENT, :POSTAMBLE_COMMENT
+            part = [ line ]
+          else
+            part = []
+          end
+
+          stat = next_stat
+          arg = $1     # arg ã«åã£ã¦ãã
+          # p stat, arg
+          break
+        end
+      }
+
+      if ! b_delim then
+        part << line
+      end
+    }
+      
+  end
+
+  def check template
+    # template ã«ãªããã®ããã§ãã¯
+    @entry_port.each{ |port_name, entry_port|
+      temp_entry_port = template.entry_port[port_name]
+      if temp_entry_port == nil then
+        STDERR.puts "info: #{port_name} is deleted port"
+        next
+      end
+      # temp_entry_port.entry_func_body.each{ |f,b|  p f }
+      entry_port.entry_func_body.each{ |func_name, func_body|
+        if temp_entry_port.entry_func_body[func_name] == nil then
+          STDERR.puts "info: #{func_name} is deleted function"
+        end
+      }
+    }
+  end
+
+  def rename
+
+    renamed_entry_port = {}
+    PortRenamer.get_list.each{ |pon,pr|
+
+      # å¯¾è±¡åãå£ãæã
+      ep = @entry_port[pon]
+      if ep == nil then
+        STDERR.puts "warning: #{pon}: renaming port not found"
+        next
+      end
+
+      # ãã¼ãã® rename
+      pnn = pr.new_port_name    # ç½®æå¾ã®åå
+      if pnn then
+        # ç½®æããååãããã°ãç»é²ããªãã
+        renamed_entry_port[pnn] = @entry_port[pon]
+        @entry_port.delete pon
+      end
+
+      # æå®ãããé¢æ°ã®ç½®æ
+      renamed_func_comment = {}
+      renamed_func_body = {}
+      pr.func_renamer_list.each{ |old,new|
+        ofn = "#{pon}_#{old}".to_sym
+        nfn = "#{pon}_#{new}".to_sym
+        # p "fnn: #{ofn} #{nfn} #{pon}"
+        if ep.entry_func_comment[ofn] == nil then
+          STDERR.puts "warning: #{old}: renaming function not found"
+          next
+        end
+        ep.entry_func_array.map! { |fn|
+          # p fn, nfn, ofn, fn==ofn ? nfn : fn
+          fn==ofn ? nfn : fn
+        }
+        renamed_func_comment[nfn] = ep.entry_func_comment[ofn]
+        renamed_func_body[nfn]    = ep.entry_func_body[ofn]
+        ep.entry_func_comment.delete ofn
+        ep.entry_func_body.delete    ofn
+      }
+      ep.entry_func_comment.merge! renamed_func_comment
+      ep.entry_func_body.merge!    renamed_func_body
+
+      # ãã¼ãåã®å¤æ´ã«ããé¢æ°åã®ç½®æ
+      renamed_func_comment = {}
+      renamed_func_body = {}
+      if pnn then
+        ep.entry_func_array.map! { |ofn|
+          nfn = ofn.to_s.sub( /#{pon.to_s}/, pnn.to_s ).to_sym
+          # p "pnn: #{ofn} #{nfn} #{pon}  #{pnn}"
+          if nfn != ofn then
+            renamed_func_comment[nfn] = ep.entry_func_comment[ofn]
+            renamed_func_body[nfn]    = ep.entry_func_body[ofn]
+            ep.entry_func_comment.delete ofn
+            ep.entry_func_body.delete    ofn
+            nfn
+          else
+            ofn
+          end
+        }
+        ep.entry_func_comment.merge! renamed_func_comment
+        ep.entry_func_body.merge!    renamed_func_body
+
+        # ep.entry_func_comment.each { |f,e| p "FF: #{f}" }
+        # ep.entry_func_array.each { |f,e| p "FA: #{f}" }
+      end
+    }
+    # p renamed_entry_port
+    @entry_port.merge! renamed_entry_port
+  end
+
+  def merge src
+    @head = src.head
+    @preamble_body = src.preamble_body
+    @postamble_body = src.postamble_body
+
+    @entry_port_array.each{ |port_name|
+      # p "merging #{port_name}"
+      entry_port = @entry_port[ port_name ]
+      src_entry_port = src.entry_port[port_name]
+      if src_entry_port == nil then
+        print "port merged:   #{port_name}\n"
+        next
+      end
+      entry_port.entry_body = src_entry_port.entry_body
+      entry_port.entry_func_array.each{ |func_name|
+        # p "merging #{func_name}"
+        func_body = entry_port.entry_func_body[ func_name ]
+        if src_entry_port.entry_func_body[func_name] == nil then
+          print "func merged:   #{func_name}\n"
+          next
+        end
+        print "func remained: #{func_name}\n"
+        # entry_port.entry_func_comment[func_name] = src_entry_port.entry_func_comment[func_name]
+        entry_port.entry_func_body[func_name]    = src_entry_port.entry_func_body[func_name]
+      }
+    }
+  end
+
+  def write file
+#2.0    file.write @head
+    write_array( file, @head )
+#2.0    file.write @preamble_comment
+    write_array( file, @preamble_comment )
+#2.0    file.write @preamble_body
+    write_array( file, @preamble_body )
+    @entry_port_array.each{ |port_name| @entry_port[port_name].write file }
+#2.0    file.write @postamble_comment
+    write_array( file, @postamble_comment )
+#2.0    file.write @postamble_body
+    write_array( file, @postamble_body )
+  end
+
+  attr_accessor :head, :preamble_comment, :preamble_body, :entry_port, :postamble_body
+end
+
+class CDLEntryPort
+  #@entry_comment::      [string]
+  #@entry_body::         [string]
+  #@entry_func_comment:: {ep_func_name=>string}
+  #@entry_func_body::    {ep_func_name=>string}
+  #@entry_func_array::   [string]
+
+  def initialize
+    @entry_comment = []
+    @entry_body = []
+    @entry_func_comment = {}
+    @entry_func_body = {}
+    @entry_func_array = []
+  end
+
+  def write file
+#2.0    file.write @entry_comment
+    write_array( file, @entry_comment )
+#2.0    file.write @entry_body
+    write_array( file, @entry_body )
+    @entry_func_array.each{ |fnm|
+      # p @entry_func_comment[fnm][0]
+
+#2.0      file.write @entry_func_comment[fnm]
+      write_array( file, @entry_func_comment[fnm] )
+#2.0      file.write @entry_func_body[fnm]
+      write_array( file, @entry_func_body[fnm] )
+    }
+  end
+
+  attr_accessor :entry_comment, :entry_body, :entry_func_comment, :entry_func_body, :entry_func_array
+end
+
+def merge( src_file, dst_dir )
+  unless src_file =~ /(.*)_templ(.[ch])$/ then
+    STDERR.puts( "error: #{src_file}: not end with _templ.c/h" )
+    exit 1
+  end
+
+  fname = "#{$1}#{$2}"
+  dst_file = "#{dst_dir}/#{File.basename fname}"
+  if FileTest.file?( dst_file ) then
+    print( "merging #{src_file} to #{dst_file}\n" )
+    # dst_file ã®èª­è¾¼ã¿
+    begin
+      dst = open( dst_file )
+#2.0
+      set_encoding dst
+      old_contents = dst.readlines
+    rescue
+      STDERR.puts "error: cannot open #{dst_file}"
+      $n_err += 1
+      exit 1
+    ensure
+      dst.close
+    end
+    old = CDLContents.new( old_contents )
+
+    # template ã®èª­è¾¼ã¿
+    begin
+      src = open( src_file )
+#2.0
+      set_encoding src
+      new_contents = src.readlines
+    rescue
+      STDERR.puts "error: cannot open #{src_file}"
+      $n_err += 1
+      exit 1
+    ensure
+      src.close
+    end
+    templ = CDLContents.new( new_contents )
+
+    old.rename
+    error_check dst_file, 1
+
+    old.check templ
+    error_check dst_file, 2
+
+    templ.merge old
+    error_check dst_file, 3
+
+    bkup_file = rename_dst( dst_file )
+
+    begin
+      dst = open( dst_file, "w" )
+#2.0
+      set_encoding dst
+      templ.write dst
+    ensure
+      dst.close
+    end
+
+  elsif $b_exist == false then
+    # src_file ã dst_file ã¸ã³ãã¼
+    begin
+      src = File.open( src_file )
+#2.0
+      set_encoding src
+      contents = src.readlines
+    rescue
+      print "#{src_file}: fail to read\n"
+    ensure
+      src.close
+    end
+
+    begin
+      dst = File.open( dst_file, "w" )
+      set_encoding dst
+#2.0      dst.write( contents )
+      contents.each{ |line|
+        dst.print line
+      }
+    rescue
+      print "#{dst_file}: fail to write\n"
+    ensure
+      dst.close
+    end
+  else
+    print "info: #{dst_file} skipped\n"
+  end
+end
+
+def error_check dst_file, level
+  if $n_err > 0 then
+    STDERR.puts "=== #{dst_file} not generated because of error ==="
+    exit level
+  end
+end
+
+
+#=== ãã¡ã¤ã«ã®ã¨ã³ã³ã¼ãã£ã³ã°ã ASCII-8BIT ã«å¤æ´
+# Ruby 1.9 ä»¥ä¸ã®å ´åã«å¤æ´
+def set_encoding file
+  if RUBY_VERSION >= "1.9.0" then
+    file.set_encoding "ASCII-8BIT"
+  end
+end
+
+#=== rename_dst
+# dst_file ã®ããã¯ã¢ãããã¡ã¤ã«åãæ±ºå®ãããªãã¼ã ãã
+# æåããã°ããªãã¼ã å¾ã®ãã¡ã¤ã«åãè¿ã
+# dst_file ãå­å¨ããªããã°ï¼ãªãã¼ã ã¯è¡ãããï¼nil ãè¿ãã
+def rename_dst( dst_file )
+  begin
+    File.stat dst_file
+  rescue
+    STDERR.puts( "info: backup not generated for #{dst_file}" )
+    # ãªããã°çµãã
+    return nil
+  end
+
+  i = 0
+  found = true
+  while found == true
+    begin
+      i = i + 1
+      bkup_file = "#{dst_file}_#{i}"
+      File.stat bkup_file
+    rescue
+      found = false
+    end
+  end
+
+  begin
+    File.rename( dst_file, bkup_file )
+    STDERR.puts( "info: backup generated for #{dst_file} to #{bkup_file}" )
+    return bkup_file
+  rescue
+    STDERR.puts( "error: fail to rename backup file: #{bkup_file}" )
+    exit 1
+  end
+
+  return nil
+end
+
+ARGV.options {|parser|
+  parser.banner =<<EOT
+Usage: tecsmerge [options] files_templ.c   src_dir
+       tecsmerge [options] gen_dir         src_dir
+EOT
+  parser.on('-e', '--exist-only',  "merge if exist in destination directory") { |fs|
+    $b_exist = true
+  }
+  parser.on('-p', '--port=old_name:new_name',  "specify entry port name change") { |ps|
+    p = ps.split( ':' )
+    PortRenamer.new( p[0], p[1] )
+  }
+  parser.on('-f', '--func=old_name:new_name',  "specify entry function name change") { |fs|
+    f = fs.split( ':' )
+    PortRenamer.add_func( f[0], f[1] )
+  }
+  parser.on('-s', '--show_change_set',  "show change set. all substitute") {
+    $b_show = true
+  }
+  parser.on('-o', '--old-mode',  "old mode (function head not substituted)") { |fs|
+    $old_mode = true
+  }
+  parser.version = #{$version}
+  parser.release = nil
+  parser.parse!
+#  if ARGV.empty?
+  if ARGV.length < 2 then
+    puts parser.help
+    exit 1
+  end
+}
+
+if $b_show then
+  PortRenamer.show
+end
+
+if $old_mode then
+  CDLContents.merge_DELIMITERS :OLD_FUNC_BODY
+else
+  CDLContents.merge_DELIMITERS :NEW_FUNC_BODY
+end
+
+if $n_err > 0 then
+  STDERR.puts( "#{$n_err} errors" )
+  exit 1
+end
+
+src = ARGV[0,ARGV.length-1]
+dst = ARGV[-1]
+
+begin
+  stat = File.stat dst
+rescue
+  STDERR.puts( "error: #{dst}: not found" )
+  exit 1
+ensure
+  if stat && ! stat.directory? then
+    STDERR.puts( "error: #{dst}: not directory" )
+    exit 1
+  end
+end
+
+src.each { |s|
+  begin
+    stat = File.stat s
+  rescue
+    STDERR.puts( "error: #{s}: not found or cannot access" )
+    exit 1
+  end
+
+  if stat.directory? then
+    Dir.foreach(s) {|file|
+      if file =~ /_templ.[ch]$/ then
+        merge( "#{s}/#{file}", dst )
+      end
+    }
+  elsif stat.file? then
+    merge( s, dst )
+  end
+}
Index: EcnlProtoTool/trunk/asp3_dcre/tecsgen/test
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tecsgen/test	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tecsgen/test	(revision 270)
@@ -0,0 +1,1 @@
+link ../test/
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/MANIFEST
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/MANIFEST	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/MANIFEST	(revision 270)
@@ -0,0 +1,194 @@
+PACKAGE tinet
+
+Makefile.config
+Makefile.tinet
+MANIFEST
+tcpip_api.csv
+tinet.tf
+tinet_asp.cfg
+tinet_asp_configure
+tinet_config.h
+tinet_defs.h
+tinet_kernel_defs.h
+
+doc/tinet.pdf
+doc/tinet.txt
+doc/tinet_chg.pdf
+doc/tinet_chg.txt
+doc/tinet_config.pdf
+doc/tinet_config.txt
+doc/tinet_defs.pdf
+doc/tinet_defs.txt
+doc/tinet_ether.pdf
+
+net/ethernet.c
+net/ethernet.cfg
+net/ethernet.h
+net/ether_var.h
+net/fcstab.c
+net/genfcstab.c
+net/if.c
+net/if.h
+net/if6_var.h
+net/if_arp.h
+net/if_llc.h
+net/if_loop.c
+net/if_loop.cfg
+net/if_loop.h
+net/if_ppp.h
+net/if_types.h
+net/if_var.h
+net/net.cfg
+net/net.h
+net/net_asp.cfg
+net/net_buf.c
+net/net_buf.h
+net/net_count.c
+net/net_count.h
+net/net_jsp.cfg
+net/net_rename.h
+net/net_subr.c
+net/net_timer.c
+net/net_timer.h
+net/net_var.h
+net/ppp.c
+net/ppp.cfg
+net/ppp.h
+net/ppp_auth.c
+net/ppp_auth.h
+net/ppp_ccp.c
+net/ppp_ccp.h
+net/ppp_fsm.c
+net/ppp_fsm.h
+net/ppp_hdlc.c
+net/ppp_hdlc.h
+net/ppp_ipcp.c
+net/ppp_ipcp.h
+net/ppp_lcp.c
+net/ppp_lcp.h
+net/ppp_modem.c
+net/ppp_modem.h
+net/ppp_upap.c
+net/ppp_upap.h
+net/ppp_var.h
+net/route.h
+
+netapp
+netapp/dbg_cons.c
+netapp/dbg_cons.cfg
+netapp/dbg_cons.h
+netapp/discard.h
+netapp/echo.h
+netapp/Makefile.netapp
+netapp/netapp.h
+netapp/netapp_subr.c
+netapp/netapp_subr.cfg
+netapp/netapp_var.h
+netapp/net_cons.c
+netapp/net_cons.cfg
+netapp/net_cons.h
+netapp/ping.c
+netapp/ping6.c
+netapp/tcp_discard_cli.c
+netapp/tcp_discard_cli.cfg
+netapp/tcp_discard_srv.c
+netapp/tcp_discard_srv.cfg
+netapp/tcp_echo_cli.c
+netapp/tcp_echo_cli.cfg
+netapp/tcp_echo_srv1.c
+netapp/tcp_echo_srv1.cfg
+netapp/tcp_echo_srv2.c
+netapp/tcp_echo_srv2.cfg
+netapp/tinet_dbg_cons.cfg
+netapp/tinet_net_cons.cfg
+netapp/tinet_tcp_discard_cli.cfg
+netapp/tinet_tcp_discard_srv.cfg
+netapp/tinet_tcp_echo_cli.cfg
+netapp/tinet_tcp_echo_srv.cfg
+netapp/tinet_udp_discard_cli.cfg
+netapp/tinet_udp_echo_cli.cfg
+netapp/tinet_udp_echo_srv.cfg
+netapp/tinet_wwws.cfg
+netapp/udp_discard_cli.c
+netapp/udp_discard_cli.cfg
+netapp/udp_echo_cli.c
+netapp/udp_echo_cli.cfg
+netapp/udp_echo_srv.c
+netapp/udp_echo_srv.cfg
+netapp/wwws.c
+netapp/wwws.cfg
+netapp/wwws.h
+netapp/wwws_asp.cfg
+netapp/wwws_jsp.cfg
+
+netinet
+netinet/icmp6.h
+netinet/icmp_var.h
+netinet/if_ether.c
+netinet/if_ether.cfg
+netinet/if_ether.h
+netinet/in.h
+netinet/in_itron.h
+netinet/in_rename.h
+netinet/in_subr.c
+netinet/in_var.h
+netinet/ip.cfg
+netinet/ip.h
+netinet/ip6.h
+netinet/ip_icmp.c
+netinet/ip_icmp.h
+netinet/ip_input.c
+netinet/ip_output.c
+netinet/ip_var.h
+netinet/tcp.cfg
+netinet/tcp.h
+netinet/tcp_fsm.h
+netinet/tcp_input.c
+netinet/tcp_output.c
+netinet/tcp_seq.h
+netinet/tcp_subr.c
+netinet/tcp_subr_cs.c
+netinet/tcp_subr_ncs.c
+netinet/tcp_timer.c
+netinet/tcp_timer.h
+netinet/tcp_usrreq.c
+netinet/tcp_var.h
+netinet/udp.cfg
+netinet/udp.h
+netinet/udp_input.c
+netinet/udp_output.c
+netinet/udp_subr.c
+netinet/udp_usrreq.c
+netinet/udp_usrreq_nblk.c
+netinet/udp_var.h
+
+netinet6/ah.h
+netinet6/ah6.h
+netinet6/ah_input.c
+netinet6/dest6.c
+netinet6/esp.h
+netinet6/esp6.h
+netinet6/esp_input.c
+netinet6/frag6.c
+netinet6/icmp6.c
+netinet6/if6_ether.c
+netinet6/if6_ether.h
+netinet6/in6.c
+netinet6/in6.h
+netinet6/in6_ifattach.c
+netinet6/in6_ifattach.h
+netinet6/in6_rename.h
+netinet6/in6_subr.c
+netinet6/in6_var.h
+netinet6/ip6.cfg
+netinet6/ip6_input.c
+netinet6/ip6_output.c
+netinet6/ip6_var.h
+netinet6/ipsec.cfg
+netinet6/nd6.c
+netinet6/nd6.h
+netinet6/nd6_nbr.c
+netinet6/nd6_rtr.c
+netinet6/route6.c
+netinet6/scope6.c
+
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/Makefile.config
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/Makefile.config	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/Makefile.config	(revision 270)
@@ -0,0 +1,192 @@
+#
+#   TINET (TCP/IP Protocol Stack)
+#  
+#   Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+#                    Tomakomai National College of Technology, JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+#   ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+#   è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+#   ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+#   å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+#   å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+#   æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+#  
+#   @(#) $Id: Makefile.config 497 2014-06-26 01:50:14Z coas-nagasima $
+#
+
+#
+#  ãã½ã¼ã¹ãã¡ã¤ã«ã®ãã£ã¬ã¯ããªã®å®ç¾©ãã®å¾ã«è¿½å ããã
+#
+
+#
+#  TINET ã½ã¼ã¹ãã¡ã¤ã«ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+TINET_ROOT = $(SRCDIR)/tinet
+
+#
+#  TINET 1.1 ã¨ã®äºææ§ã®ããã®å®ç¾©
+#
+ifndef SUPPORT_INET4
+	ifndef SUPPORT_INET6
+		SUPPORT_INET4 = true
+	endif
+endif
+
+#
+#  ãããã¯ã¼ã¯ãµã¼ãã¹ã«é¢ããå®ç¾©
+#
+TINET_DIR = $(TINET_ROOT)/net:$(TINET_ROOT)/netinet
+
+TINET_COBJS := $(TINET_COBJS) \
+	       net_buf.o net_count.o net_subr.o net_timer.o \
+               in_subr.o tinet_cfg.o route_cfg.o
+
+ifeq ($(SUPPORT_INET4),true)
+
+	TINET_COBJS := $(TINET_COBJS) \
+	               ip_input.o ip_output.o ip_icmp.o
+	TINET_CDEFS := $(TINET_CDEFS) -DSUPPORT_INET4
+
+endif
+
+ifeq ($(SUPPORT_INET6),true)
+
+	TINET_DIR := $(TINET_DIR):$(TINET_ROOT)/netinet6
+	TINET_COBJS := $(TINET_COBJS) \
+	               in6.o in6_ifattach.o nd6_rtr.o \
+	               in6_subr.o ip6_input.o icmp6.o \
+	               dest6.o route6.o frag6.o \
+	               ah_input.o esp_input.o \
+	               nd6.o nd6_nbr.o ip6_output.o
+	TINET_CDEFS := $(TINET_CDEFS) -DSUPPORT_INET6
+
+endif
+
+ifeq ($(NET_IF),loop)
+
+	TINET_COBJS := $(TINET_COBJS) if_loop.o
+	TINET_CDEFS := $(TINET_CDEFS) -DSUPPORT_LOOP
+
+endif
+
+ifeq ($(NET_IF),ppp)
+
+	TINET_COBJS := $(TINET_COBJS) \
+	               ppp.o ppp_hdlc.o ppp_lcp.o ppp_fsm.o \
+	               ppp_auth.o ppp_ipcp.o ppp_upap.o
+	TINET_CDEFS := $(TINET_CDEFS) -DSUPPORT_PPP
+
+ifeq ($(PPP_CFG_MODEM),true)
+
+	TINET_COBJS := $(TINET_COBJS) ppp_modem.o 
+	TINET_CDEFS := $(TINET_CDEFS) -DPPP_CFG_MODEM
+
+endif
+
+endif
+
+ifeq ($(NET_IF),ether)
+
+	#  ã¿ã¼ã²ããä¾å­ã®å®ç¾©ã®ã¤ã³ã¯ã«ã¼ã
+
+	ifdef TOOL
+	    ifdef SYS
+	        -include $(SRCDIR)/config/$(CPU)-$(TOOL)/$(SYS)/Makefile.tinet
+	    endif
+	else
+	    ifdef SYS
+	        -include $(SRCDIR)/config/$(CPU)/$(SYS)/Makefile.tinet
+	    endif
+	endif
+
+	TINET_COBJS := $(TINET_COBJS) if.o ethernet.o
+	TINET_CDEFS := $(TINET_CDEFS) -DSUPPORT_ETHER
+
+	ifeq ($(SUPPORT_INET4),true)
+
+		TINET_COBJS := $(TINET_COBJS) if_ether.o
+
+	endif
+
+	ifeq ($(SUPPORT_INET6),true)
+
+		TINET_COBJS := $(TINET_COBJS) if6_ether.o 
+
+	endif
+
+	include $(TINET_ROOT)/netdev/$(NET_DEV)/Makefile.tinet
+
+endif
+
+ifeq ($(SUPPORT_TCP),true)
+
+	TINET_COBJS := $(TINET_COBJS) \
+	               tcp_input.o tcp_output.o tcp_usrreq.o \
+	               tcp_subr.o tcp_timer.o tcp_subr_ncs.o
+	TINET_CDEFS := $(TINET_CDEFS) -DSUPPORT_TCP
+
+endif
+
+ifeq ($(SUPPORT_UDP),true)
+
+	TINET_COBJS := $(TINET_COBJS) \
+	               udp_input.o udp_usrreq.o udp_output.o
+	TINET_CDEFS := $(TINET_CDEFS) -DSUPPORT_UDP
+
+endif
+
+#
+#  å
+±éã³ã³ãã¤ã«ãªãã·ã§ã³ã®å®ç¾©ã¸ã®è¿½å 
+#
+CDEFS := $(CDEFS) $(TINET_CDEFS)
+INCLUDES := $(INCLUDES) -I$(TINET_ROOT)
+
+#
+#  ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ã«é¢ããå®ç¾©ã¸ã®è¿½å 
+#
+TINET_UTASK_CFG = tinet_$(UNAME).cfg
+
+#
+#  ã·ã¹ãã ãµã¼ãã¹ã«é¢ããå®ç¾©ã¸ã®è¿½å 
+#
+STASK_DIR := $(STASK_DIR):$(TINET_DIR)
+STASK_COBJS := $(STASK_COBJS) $(TINET_COBJS)
+STASK_LIBS := $(STASK_LIBS) -lc
+
+#
+#  TINET ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®çæ
+#
+tinet:
+	$(CC) -E $(INCLUDES) $(CDEFS) -x c-header $(TINET_UTASK_CFG) > tmpfile9
+	$(TINET_ROOT)/cfg/tinet_cfg -s tmpfile9
+	rm -f tmpfile9
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/Makefile.tinet
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/Makefile.tinet	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/Makefile.tinet	(revision 270)
@@ -0,0 +1,382 @@
+#
+#   TINET (TCP/IP Protocol Stack)
+#  
+#   Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+#                    Tomakomai National College of Technology, JAPAN
+#   Copyright (C) 2008-2009 by Hokkaido Industrial Research Institute, JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+#   ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+#   è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+#   ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+#   å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+#   å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+#   æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+#  
+#   @(#) $Id: Makefile.tinet 497 2014-06-26 01:50:14Z coas-nagasima $
+#
+
+#
+#  ãããã«ã¦ã§ã¢ã® Makefile ã®ã¤ã³ã¯ã«ã¼ããã«è¿½å ããã
+#
+
+#
+#  ã«ã¼ãã«ã®è­å¥
+#
+ifdef SRCLANG
+	TARGET_KERNEL = ASP
+	TINET_CDEFS := $(TINET_CDEFS) -DTARGET_KERNEL_ASP
+else
+	TARGET_KERNEL = JSP
+	TINET_CDEFS := $(TINET_CDEFS) -DTARGET_KERNEL_JSP
+endif
+
+#
+#  TINET ã½ã¼ã¹ãã¡ã¤ã«ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+TINET_ROOT = $(SRCDIR)/tinet
+
+#
+#  TINET 1.1 ã¨ã®äºææ§ã®ããã®å®ç¾©
+#
+ifndef SUPPORT_INET4
+	ifndef SUPPORT_INET6
+		SUPPORT_INET4 = true
+	endif
+endif
+
+#
+#  ãããã¯ã¼ã¯ãµã¼ãã¹ã«é¢ããå®ç¾©
+#
+TINET_DIR = $(TINET_ROOT)/net:$(TINET_ROOT)/netinet
+
+TINET_COBJS := $(TINET_COBJS) \
+	       net_buf.o net_count.o net_subr.o net_timer.o \
+               in_subr.o tinet_cfg.o route_cfg.o
+
+ifeq ($(SUPPORT_INET4),true)
+
+	TINET_COBJS := $(TINET_COBJS) \
+	               ip_input.o ip_output.o ip_icmp.o
+	TINET_KERNEL_CFG := $(TINET_KERNEL_CFG) $(TINET_ROOT)/netinet/ip.cfg
+	TINET_CDEFS := $(TINET_CDEFS) -DSUPPORT_INET4
+
+endif
+
+ifeq ($(SUPPORT_INET6),true)
+
+	TINET_DIR := $(TINET_DIR):$(TINET_ROOT)/netinet6
+	TINET_COBJS := $(TINET_COBJS) \
+	               in6.o in6_ifattach.o nd6_rtr.o \
+	               in6_subr.o ip6_input.o icmp6.o \
+	               dest6.o route6.o frag6.o \
+	               ah_input.o esp_input.o \
+	               nd6.o nd6_nbr.o ip6_output.o scope6.o
+	TINET_KERNEL_CFG := $(TINET_KERNEL_CFG) $(TINET_ROOT)/netinet6/ip6.cfg
+	TINET_CDEFS := $(TINET_CDEFS) -DSUPPORT_INET6
+
+endif
+
+ifeq ($(NET_IF),loop)
+
+	TINET_COBJS := $(TINET_COBJS) if_loop.o
+	TINET_KERNEL_CFG := $(TINET_KERNEL_CFG) $(TINET_ROOT)/net/if_loop.cfg
+	TINET_CDEFS := $(TINET_CDEFS) -DSUPPORT_LOOP
+
+endif
+
+ifeq ($(NET_IF),ppp)
+
+	TINET_COBJS := $(TINET_COBJS) \
+	               ppp.o ppp_hdlc.o ppp_lcp.o ppp_fsm.o \
+	               ppp_auth.o ppp_ipcp.o ppp_upap.o
+	TINET_KERNEL_CFG := $(TINET_KERNEL_CFG) $(TINET_ROOT)/net/ppp.cfg
+	TINET_CDEFS := $(TINET_CDEFS) -DSUPPORT_PPP
+
+ifeq ($(PPP_CFG_MODEM),true)
+
+	TINET_COBJS := $(TINET_COBJS) ppp_modem.o 
+	TINET_CDEFS := $(TINET_CDEFS) -DPPP_CFG_MODEM
+
+endif
+
+endif
+
+#  ã¿ã¼ã²ããä¾å­ã®å®ç¾©ã®ã¤ã³ã¯ã«ã¼ã
+
+ifeq ($(TARGET_KERNEL),ASP)
+
+	-include $(TARGETDIR)/Makefile.tinet
+
+endif
+
+ifeq ($(TARGET_KERNEL),JSP)
+
+	ifdef TOOL
+		ifdef SYS
+			-include $(SRCDIR)/config/$(CPU)-$(TOOL)/$(SYS)/Makefile.tinet
+		endif
+		-include $(SRCDIR)/config/$(CPU)-$(TOOL)/Makefile.tinet
+	else
+		ifdef SYS
+			-include $(SRCDIR)/config/$(CPU)/$(SYS)/Makefile.tinet
+		endif
+		-include $(SRCDIR)/config/$(CPU)/Makefile.tinet
+	endif
+
+endif
+
+ifeq ($(NET_IF),ether)
+
+	TINET_COBJS := $(TINET_COBJS) if.o ethernet.o
+	TINET_KERNEL_CFG := $(TINET_KERNEL_CFG) $(TINET_ROOT)/net/ethernet.cfg
+	TINET_CDEFS := $(TINET_CDEFS) -DSUPPORT_ETHER
+
+	ifeq ($(SUPPORT_INET4),true)
+
+		TINET_COBJS := $(TINET_COBJS) if_ether.o
+		TINET_KERNEL_CFG := $(TINET_KERNEL_CFG) $(TINET_ROOT)/netinet/if_ether.cfg
+
+	endif
+
+	ifeq ($(SUPPORT_INET6),true)
+
+		TINET_COBJS := $(TINET_COBJS) if6_ether.o 
+
+	endif
+
+
+	include $(TINET_ROOT)/netdev/$(NET_DEV)/Makefile.tinet
+
+endif
+
+ifeq ($(SUPPORT_TCP),true)
+
+	TINET_COBJS := $(TINET_COBJS) \
+	               tcp_input.o tcp_output.o tcp_timer.o \
+	               tcp_subr.o tcp_subr_cs.o tcp_subr_ncs.o 
+	TINET_KERNEL_CFG := $(TINET_KERNEL_CFG) $(TINET_ROOT)/netinet/tcp.cfg
+	TINET_CDEFS := $(TINET_CDEFS) -DSUPPORT_TCP
+
+endif
+
+ifeq ($(SUPPORT_UDP),true)
+
+	TINET_COBJS := $(TINET_COBJS) \
+	               udp_input.o udp_output.o udp_subr.o
+	TINET_KERNEL_CFG := $(TINET_KERNEL_CFG) $(TINET_ROOT)/netinet/udp.cfg
+	TINET_CDEFS := $(TINET_CDEFS) -DSUPPORT_UDP
+
+endif
+
+#
+#  TINET ã©ã¤ãã©ãªã®å®ç¾©
+#
+
+ifeq ($(NO_USE_TINET_LIBRARY),true)
+
+	ifeq ($(SUPPORT_TCP),true)
+
+		TINET_COBJS := $(TINET_COBJS) tcp_usrreq.o 
+
+	endif
+
+	ifeq ($(SUPPORT_UDP),true)
+
+		TINET_COBJS := $(TINET_COBJS) udp_usrreq.o
+
+	endif
+
+else
+
+	ifeq ($(SUPPORT_TCP),true)
+
+		TINET_LCSRCS := $(TINET_LCSRCS) tcp_usrreq.c 
+
+	endif
+
+	ifeq ($(SUPPORT_UDP),true)
+
+		TINET_LCSRCS := $(TINET_LCSRCS) udp_usrreq.c
+
+	endif
+
+	TINET_CDEFS := $(TINET_CDEFS) -DTCP_CFG_LIBRARY -DUDP_CFG_LIBRARY
+
+	ifdef TINET_LIB
+		MAKE_TINET_LIB :=
+		LIBTINET := $(TINET_LIB)/libtinet.a
+	else
+		MAKE_TINET_LIB := libtinet.a
+		LIBTINET := $(MAKE_TINET_LIB)
+	endif
+
+	MAKE_MTASK := $(MAKE_MTASK) $(LIBTINET)
+
+endif
+
+#
+#  ã©ã¤ãã©ãªåããã½ã¼ã¹ãã¡ã¤ã«ããçæããã
+#  ãªãã¸ã§ã¯ããã¡ã¤ã«ã®å®ç¾©
+#
+TINET_LCOBJS = $(foreach file,$(TINET_LCSRCS),$($(file:.c=)))
+
+tcp_usrreq = 	tcp_cre_rep.o tcp_del_rep.o \
+		tcp_cre_cep.o tcp_del_cep.o \
+		tcp_acp_cep.o tcp_con_cep.o tcp_sht_cep.o \
+		tcp_cls_cep.o tcp_can_cep.o \
+		tcp_snd_dat.o tcp_rcv_dat.o \
+		tcp_snd_oob.o tcp_rcv_oob.o \
+		tcp_get_buf.o tcp_snd_buf.o \
+		tcp_rcv_buf.o tcp_rel_buf.o \
+		tcp_set_opt.o tcp_get_opt.o
+
+udp_usrreq = 	udp_can_snd.o udp_can_rcv.o udp_can_cep.o \
+		udp_cre_cep.o udp_del_cep.o \
+		udp_snd_dat.o udp_rcv_dat.o udp_send_data.o \
+		udp_set_opt.o udp_get_opt.o
+
+#
+#  ã©ã¤ãã©ãªåããã½ã¼ã¹ãã¡ã¤ã«ããçæããã
+#  ãªãã¸ã§ã¯ããã¡ã¤ã«ã®ä¾å­é¢ä¿ã®å®ç¾©
+#
+$(tcp_usrreq) $(tcp_usrreq:.o=.s) $(tcp_usrreq:.o=.d): tcp_usrreq.c
+$(udp_usrreq) $(udp_usrreq:.o=.s) $(udp_usrreq:.o=.d): udp_usrreq.c udp_usrreq_nblk.c
+
+#
+#  TINET ã©ã¤ãã©ãªã®å®ç¾©
+#
+TINET_LIB_OBJS = $(TINET_LCOBJS)
+
+#
+#  TINET ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®å®ç¾©
+#
+
+ifeq ($(TARGET_KERNEL),ASP)
+
+TINET_CFG = $(APPLDIR)/tinet_$(APPLNAME).cfg
+TINET_CFG_OUT = tinet_cfg.c tinet_cfg.h
+TINET_KERNEL_CFG :=	$(TINET_KERNEL_CFG) \
+			$(TINET_ROOT)/tinet_asp.cfg $(TINET_ROOT)/net/net_asp.cfg 
+
+endif
+
+ifeq ($(TARGET_KERNEL),JSP)
+
+TINET_CFG = tinet_$(UNAME).cfg
+TINET_CFG_OUT = tinet_cfg.c tinet_id.h tinet_kern.cfg
+TINET_KERNEL_CFG :=	$(TINET_KERNEL_CFG) tinet_kern.cfg \
+			$(TINET_ROOT)/tinet.cfg $(TINET_ROOT)/net/net_jsp.cfg 
+TINET_CFG_OUT := $(TINET_CFG_OUT) $(IPSEC_CFG_OUT)
+
+endif
+
+#
+#  å
+±éã³ã³ãã¤ã«ãªãã·ã§ã³ã®å®ç¾©ã¸ã®è¿½å 
+#
+CDEFS := $(CDEFS) $(TINET_CDEFS)
+INCLUDES := $(INCLUDES) -I$(TINET_ROOT)
+
+#
+#  TINET ã³ã³ãã¤ã«ãªãã·ã§ã³ã®å®ç¾©ã¸ã®è¿½å 
+#
+TINET_CFLAGS := $(TINET_CFLAGS) -fno-strict-aliasing
+
+#
+#  ã·ã¹ãã ãµã¼ãã¹ãããã«ã¦ã§ã¢ã«é¢ããå®ç¾©
+#
+
+ifeq ($(TARGET_KERNEL),ASP)
+
+	SYSSVC_DIRS := $(SYSSVC_DIRS):$(TINET_DIR)
+	SYSSVC_ASMOBJS := $(SYSSVC_ASMOBJS)
+	SYSSVC_COBJS := $(SYSSVC_COBJS) $(TINET_COBJS)
+	SYSSVC_CFLAGS := $(SYSSVC_CFLAGS) $(TINET_CFLAGS)
+	SYSSVC_LIBS := $(SYSSVC_LIBS) $(LIBTINET) -lc
+
+	CLEAN_FILES := $(CLEAN_FILES) $(TINET_CFG_OUT) $(MAKE_TINET_LIB)
+
+endif
+
+ifeq ($(TARGET_KERNEL),JSP)
+
+	MTASK_CFG := $(MTASK_CFG) $(TINET_CFG)
+	MTASK_KERNEL_CFG := $(MTASK_KERNEL_CFG) $(TINET_KERNEL_CFG)
+	MTASK_DIR := $(MTASK_DIR):$(TINET_DIR)
+	MTASK_LCSRCS := $(MTASK_LCSRCS) $(TINET_LCSRCS)
+	MTASK_ASMOBJS := $(MTASK_ASMOBJS)
+	ifdef USE_CXX
+		MTASK_CXXOBJS := $(MTASK_CXXOBJS)
+		MTASK_COBJS := $(MTASK_COBJS) $(TINET_COBJS)
+	else
+		MTASK_COBJS := $(MTASK_COBJS) $(TINET_COBJS)
+	endif
+	MTASK_CFLAGS := $(MTASK_CFLAGS) $(TINET_CFLAGS)
+	MTASK_LIBS := $(MTASK_LIBS) $(LIBTINET) -lc
+	MTASK_CLEAN_FILES := $(MTASK_CLEAN_FILES) $(TINET_CFG_OUT) $(MAKE_TINET_LIB)
+
+endif
+
+#
+#  TINET ã©ã¤ãã©ãªãã¡ã¤ã«ã®çæ
+#
+libtinet.a: $(TINET_LIB_OBJS)
+	rm -f libtinet.a
+	$(AR) -rcs libtinet.a $(TINET_LIB_OBJS)
+	$(RANLIB) libtinet.a
+
+#
+#  ã³ã³ãã¤ã«ã«ã¼ã«ã®å®ç¾©
+#
+
+ifeq ($(TARGET_KERNEL),ASP)
+
+$(TINET_LCOBJS): %.o:
+	$(CC) -D__$(*F) -o $@ -c $(CFLAGS) $(SYSSVC_CFLAGS) $<
+
+tinet_cfg1_out.o: %.o: %.c
+	$(CC) -c $(CFLAGS) $(KERNEL_CFG_CFLAGS) $<
+
+endif
+
+ifeq ($(TARGET_KERNEL),JSP)
+
+$(TINET_LCOBJS): %.o:
+	$(CC) -D__$(*F) -o $@ -c $(CFLAGS) $(MTASK_CFLAGS) $<
+
+endif
+
+#
+#  ã³ã³ãã¤ã«çµæã®æ¶å»
+#
+cleantinet:
+	rm -f $(TINET_CFG_OUT) $(MAKE_TINET_LIB)
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ether_var.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ether_var.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ether_var.h	(revision 270)
@@ -0,0 +1,60 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _ETHER_VAR_H_
+#define _ETHER_VAR_H_
+
+#ifdef SUPPORT_ETHER
+
+/*
+ *  Ethernet å¦çã¿ã¹ã¯
+ */
+
+extern void ether_input_task(intptr_t exinf);
+extern void ether_output_task(intptr_t exinf);
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#endif	/* of #ifndef _ETHER_VAR_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ethernet.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ethernet.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ethernet.c	(revision 270)
@@ -0,0 +1,540 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  Ethernet å¦çã¿ã¹ã¯ã®æ¬ä½
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/ethernet.h>
+#include <net/if_llc.h>
+#include <net/if_arp.h>
+#include <net/net.h>
+#include <net/net_var.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet/if_ether.h>
+#include <netinet6/if6_ether.h>
+#include <netinet6/nd6.h>
+
+#include <net/if_var.h>
+#include <net/if6_var.h>
+
+#ifdef SUPPORT_ETHER
+
+/*
+ *  å¤æ°
+ */
+
+#if defined(SUPPORT_INET4)
+
+const uint8_t ether_broad_cast_addr[ETHER_ADDR_LEN] = {
+	UINT_C(0xff), UINT_C(0xff), UINT_C(0xff),
+	UINT_C(0xff), UINT_C(0xff), UINT_C(0xff)
+	};
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+/*
+ *  å¤æ°
+ */
+
+/* ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹æ§é ä½ */
+
+#if defined(SUPPORT_INET4)
+
+static T_IFNET ether_ifnet = {
+	NULL,			/* ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã½ããã¦ã§ã¢æ
+å ±	*/
+	{
+		IPV4_ADDR_LOCAL,	/* IPv4 ã¢ãã¬ã¹		*/
+		IPV4_ADDR_LOCAL_MASK,	/* ãµãããããã¹ã¯		*/
+		},
+	};
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+static T_IFNET ether_ifnet = {
+	NULL,			/* ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã½ããã¦ã§ã¢æ
+å ±	*/
+	{0},			/* IPv6 ã¢ãã¬ã¹æ
+å ±				*/
+	{0},			/* ãã«ãã­ã£ã¹ã IPv6 ã¢ãã¬ã¹			*/
+	0,				/* ãã©ã°					*/
+	};
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+#ifdef SUPPORT_MIB
+
+/*
+ *  SNMP ã® ç®¡çæ
+å ±ãã¼ã¹ (MIB)
+ */
+
+T_IF_STATS if_stats;
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+#ifdef ETHER_CFG_802_WARNING
+
+/*
+ *  é¢æ°
+ */
+
+static void ieee_802_input (T_NET_BUF *input);
+
+/*
+ *  ieee_802_input -- IEEE 802.3 å
+¥åå¦ç
+ */
+
+static void
+ieee_802_input (T_NET_BUF *input)
+{
+	T_8023MAC_HDR	*mhdr;
+	T_8022SNAP_HDR	*shdr;
+
+	mhdr = GET_8023MAC_HDR(input);
+	shdr = GET_8022SNAP_HDR(input);
+	syslog(LOG_WARNING, "[ETHER] unexp 802.3 from: %s, proto: 0x%04x.",
+	                    mac2str(NULL, mhdr->shost), ntohs(*(uint16_t*)&shdr->type));
+	}
+
+#endif	/* of #ifdef ETHER_CFG_802_WARNING */
+
+/*
+ *  ether_get_ifnet -- ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹æ§é ä½ãè¿ãã
+ */
+
+T_IFNET *
+ether_get_ifnet (void)
+{
+	return &ether_ifnet;
+	}
+
+#if defined(SUPPORT_INET6)
+
+/*
+ *  ether_in6_resolve_multicast -- ã¤ã¼ãµãããã®ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ã¸ã®å¤æ
+ */
+
+ER
+ether_in6_resolve_multicast (T_ETHER_ADDR *ifaddr, T_IN6_ADDR *maddr)
+{
+	/* ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ããã§ãã¯ããã*/
+	if (!IN6_IS_ADDR_MULTICAST(maddr))
+		return E_PAR;
+
+	/* ã¤ã¼ãµãããã®ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ã¸ã®å¤æ */
+	ether_map_ipv6_multicast(ifaddr, maddr);
+
+	return E_OK;
+	}
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+/**
+ * Called by a driver when its link goes up
+ */
+void ether_set_link_up(T_IFNET *ether)
+{
+  if (!(ether->flags & IF_FLAG_LINK_UP)) {
+    ether->flags |= IF_FLAG_LINK_UP;
+
+    if (ether->flags & IF_FLAG_UP) {
+#if LWIP_ARP
+      /* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */ 
+      if (ether->flags & IF_FLAG_ETHARP) {
+        etharp_gratuitous(ether);
+      }
+#endif /* LWIP_ARP */
+    }
+    if (ether->link_callback) {
+      (ether->link_callback)(ether);
+    }
+  }
+}
+
+/**
+ * Called by a driver when its link goes down
+ */
+void ether_set_link_down(T_IFNET *ether)
+{
+  if (ether->flags & IF_FLAG_LINK_UP) {
+    ether->flags &= ~IF_FLAG_LINK_UP;
+    if (ether->link_callback) {
+      (ether->link_callback)(ether);
+    }
+  }
+}
+
+/**
+ * Set callback to be called when link is brought up/down
+ */
+void ether_set_link_callback(ether_status_callback_fn link_callback)
+{
+	ether_ifnet.link_callback = link_callback;
+}
+
+/*
+ *  ether_raw_output -- Ethernet ã¤ã³ã¿ãã§ã¼ã¹ã®åºåé¢æ°ãMAC ã¢ãã¬ã¹è§£æ±ºç¡ã
+ */
+
+ER
+ether_raw_output (T_NET_BUF *output, TMO tmout)
+{
+	ER error = E_OK;
+
+	/* Ethernet åºåã­ã¥ã¼ã«æå
+¥ããã*/
+	if ((error = tsnd_dtq(DTQ_ETHER_OUTPUT, (intptr_t)output, tmout)) != E_OK) {
+		NET_COUNT_ETHER(net_count_ether.out_err_packets, 1);
+		NET_COUNT_MIB(if_stats.ifOutDiscards, 1);
+
+		/* IF ã§ãããã¯ã¼ã¯ãããã¡ãéæ¾ããªããã©ã°ããã§ãã¯ããã*/
+		if ((output->flags & NB_FLG_NOREL_IFOUT) == 0) {
+			syscall(rel_net_buf(output));
+			}
+		else {
+			output->flags &= (uint8_t)~NB_FLG_NOREL_IFOUT;
+			}
+		IF_ETHER_NIC_RESET(IF_ETHER_NIC_GET_SOFTC());
+		}
+	return error;
+	}
+
+/*
+ *  ether_output -- Ethernet ã¤ã³ã¿ãã§ã¼ã¹ã®åºåé¢æ°ãMAC ã¢ãã¬ã¹è§£æ±ºæã
+ */
+
+ER
+ether_output (T_NET_BUF *output, void *dst, T_IF_ADDR *gw, TMO tmout)
+{
+	T_IF_SOFTC	*ic;
+	ER		error = E_OK;
+	T_ETHER_HDR *eth;
+
+	/* éä¿¡å
+ MAC ã¢ãã¬ã¹ãè¨­å®ããã*/
+	ic = IF_ETHER_NIC_GET_SOFTC();
+	eth = GET_ETHER_HDR(output);
+	memcpy(eth->shost, ic->ifaddr.lladdr, ETHER_ADDR_LEN);
+
+	switch(ntohs(eth->type)) {
+
+#if defined(SUPPORT_INET4)
+
+	case ETHER_TYPE_IP:		/* IPv4	*/
+#ifdef ETHER_CFG_MULTICAST
+		/* ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ã®å ´å */
+		if(IN4_IS_ADDR_MULTICAST(*(uint32_t*)dst)){
+			/* ã¤ã¼ãµãããã®ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ã¸ã®å¤æ */
+			ether_map_ipv4_multicast((T_ETHER_ADDR *)&eth->dhost, *(T_IN4_ADDR*)dst);
+			error = ether_raw_output(output, tmout);
+			break;
+			}
+#endif
+		if (arp_resolve(&ic->ifaddr, output, *(uint32_t*)dst)) {	/* true ãªãã¢ãã¬ã¹è§£æ±ºæ¸ */
+			error = ether_raw_output(output, tmout);
+			}
+		break;
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+	case ETHER_TYPE_IPV6:		/* IPv6	*/
+		error = nd6_storelladdr((T_ETHER_ADDR*)GET_ETHER_HDR(output)->dhost,
+		                        (T_IN6_ADDR*)dst, gw);
+		if (error == E_OK)
+			error = ether_raw_output(output, tmout);
+
+		/* IF ã§ãããã¯ã¼ã¯ãããã¡ãéæ¾ããªããã©ã°ããã§ãã¯ããã*/
+		else if ((output->flags & NB_FLG_NOREL_IFOUT) == 0) {
+			syscall(rel_net_buf(output));
+			}
+		else {
+			output->flags &= (uint8_t)~NB_FLG_NOREL_IFOUT;
+			}
+		break;
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+	default:
+		NET_COUNT_MIB(if_stats.ifOutErrors, 1);
+
+		/* IF ã§ãããã¯ã¼ã¯ãããã¡ãéæ¾ããªããã©ã°ããã§ãã¯ããã*/
+		if ((output->flags & NB_FLG_NOREL_IFOUT) == 0) {
+			syscall(rel_net_buf(output));
+			}
+		else {
+			output->flags &= (uint8_t)~NB_FLG_NOREL_IFOUT;
+			}
+		error = E_PAR;
+		break;
+		}
+
+	if (error != E_OK)
+		NET_COUNT_ETHER(net_count_ether.out_err_packets, 1);
+	return error;
+	}
+
+/*
+ *  Ethernet åºåã¿ã¹ã¯
+ */
+
+void
+ether_output_task(intptr_t exinf)
+{
+	T_IF_SOFTC	*ic;
+	T_NET_BUF	*output;
+	ID		tskid;
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[ETHER OUTPUT:%d] started.", tskid);
+
+	ic = IF_ETHER_NIC_GET_SOFTC();
+
+	while (true) {
+		while (rcv_dtq(DTQ_ETHER_OUTPUT, (intptr_t*)&output) == E_OK) {
+			NET_COUNT_ETHER(net_count_ether.out_octets,  output->len);
+			NET_COUNT_MIB(if_stats.ifOutOctets, output->len + 8);
+			NET_COUNT_ETHER(net_count_ether.out_packets, 1);
+
+#ifdef SUPPORT_MIB
+			if ((*(GET_ETHER_HDR(output)->dhost) & ETHER_MCAST_ADDR) == 0) {
+				NET_COUNT_MIB(if_stats.ifOutUcastPkts, 1);
+				}
+			else {
+				NET_COUNT_MIB(if_stats.ifOutNUcastPkts, 1);
+				}
+#endif	/* of #ifdef SUPPORT_MIB */
+
+			syscall(wai_sem(ic->semid_txb_ready));
+
+			IF_ETHER_NIC_START(ic, output);
+
+#ifndef ETHER_NIC_CFG_RELEASE_NET_BUF
+
+			if ((output->flags & NB_FLG_NOREL_IFOUT) == 0) {
+				syscall(rel_net_buf(output));
+				}
+			else {
+				output->flags &= (uint8_t)~NB_FLG_NOREL_IFOUT;
+
+#ifdef SUPPORT_TCP
+				sig_sem(SEM_TCP_POST_OUTPUT);
+#endif	/* of #ifdef SUPPORT_TCP */
+				}
+
+#endif	/* of #ifndef ETHER_NIC_CFG_RELEASE_NET_BUF */
+
+			}
+		}
+	}
+
+/*
+ *  Ethernet å
+¥åã¿ã¹ã¯
+ */
+
+void
+ether_input_task(intptr_t exinf)
+{
+	T_IF_SOFTC	*ic;
+	T_NET_BUF	*input;
+	T_ETHER_HDR	*eth;
+	ID		tskid;
+	uint16_t	proto;
+
+	/* ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ç®¡çãåæåããã*/
+	ifinit();
+
+	/* NIC ãåæåããã*/
+	ic = IF_ETHER_NIC_GET_SOFTC();
+	IF_ETHER_NIC_PROBE(ic);
+	IF_ETHER_NIC_INIT(ic);
+
+	/* Ethernet åºåã¿ã¹ã¯ãèµ·åãã */
+	syscall(act_tsk(ETHER_OUTPUT_TASK));
+
+	/* ãããã¯ã¼ã¯ã¿ã¤ãã¿ã¹ã¯ãèµ·åãã */
+	syscall(act_tsk(NET_TIMER_TASK));
+
+	get_tid(&tskid);
+
+	syslog(LOG_NOTICE, "[ETHER INPUT:%2d] started on MAC Addr: %s.",
+	                   tskid, mac2str(NULL, ic->ifaddr.lladdr));
+
+#if defined(SUPPORT_INET4)
+
+	/* ARP ãåæåããã*/
+	arp_init();
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+	ether_ifnet.ic = ic;
+
+	while (true) {
+		syscall(wai_sem(ic->semid_rxb_ready));
+		if ((input = IF_ETHER_NIC_READ(ic)) != NULL) {
+			NET_COUNT_ETHER(net_count_ether.in_octets, input->len);
+			NET_COUNT_MIB(if_stats.ifInOctets, input->len + 8);
+			NET_COUNT_ETHER(net_count_ether.in_packets, 1);
+			eth = GET_ETHER_HDR(input);
+			proto = ntohs(eth->type);
+
+#ifdef SUPPORT_MIB
+			if ((*eth->dhost & ETHER_MCAST_ADDR) == 0) {
+				NET_COUNT_MIB(if_stats.ifInUcastPkts, 1);
+				}
+			else {
+				NET_COUNT_MIB(if_stats.ifInNUcastPkts, 1);
+				}
+#endif	/* of #ifdef SUPPORT_MIB */
+
+#if defined(SUPPORT_INET4) && defined(ETHER_CFG_ACCEPT_ALL)
+
+			if ((*eth->dhost & ETHER_MCAST_ADDR) && *eth->dhost != 0xff) {
+
+#ifdef ETHER_CFG_MCAST_WARNING
+
+				if (proto <= 1500)
+					proto = ntohs(*(uint16_t*)&(GET_8022SNAP_HDR(input)->type));
+				syslog(LOG_WARNING, "[ETHER] mcast addr  from: %s, to: %s, proto: 0x%04x.",
+				                    mac2str(NULL, eth->shost), mac2str(NULL, eth->dhost), proto);
+
+#endif	/* of #ifdef ETHER_CFG_MCAST_WARNING */
+
+				NET_COUNT_ETHER(net_count_ether.in_err_packets, 1);
+				NET_COUNT_MIB(if_stats.ifInErrors, 1);
+				syscall(rel_net_buf(input));
+				continue;
+				}
+
+#endif	/* of #if defined(SUPPORT_INET4) && defined(ETHER_CFG_ACCEPT_ALL) */
+
+			switch(proto) {
+
+#if defined(SUPPORT_INET4)
+
+			case ETHER_TYPE_IP:		/* IP	*/
+				ip_input(input);
+				break;
+
+			case ETHER_TYPE_ARP:		/* ARP	*/
+				arp_input(&ic->ifaddr, input);
+				break;
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+			case ETHER_TYPE_IPV6:		/* IPv6	*/
+				ip6_input(input);
+				break;
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+			default:
+
+#ifdef ETHER_CFG_UNEXP_WARNING
+
+#ifdef ETHER_CFG_802_WARNING
+
+				if (proto <= 1500)
+					ieee_802_input(input);
+				else
+					syslog(LOG_NOTICE, "[ETHER] unexp proto from: %s, proto: 0x%04x.",
+					                   mac2str(NULL, GET_ETHER_HDR(input)->shost), proto);
+
+#else	/* of #ifdef ETHER_CFG_802_WARNING */
+
+				syslog(LOG_INFO, "[ETHER] unexp proto from: %s, proto: 0x%04x.",
+				                   mac2str(NULL, GET_ETHER_HDR(input)->shost), proto);
+
+#endif	/* of #ifdef ETHER_CFG_802_WARNING */
+
+#endif	/* of #ifdef ETHER_CFG_UNEXP_WARNING */
+
+				NET_COUNT_ETHER(net_count_ether.in_err_packets, 1);
+				NET_COUNT_MIB(if_stats.ifUnknownProtos, 1);
+				syscall(rel_net_buf(input));
+				break;
+				}
+			}
+		}
+	}
+
+#endif /* of #ifdef SUPPORT_ETHER */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ethernet.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ethernet.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ethernet.cfg	(revision 270)
@@ -0,0 +1,61 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  Ethernet ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef SUPPORT_ETHER
+
+CRE_TSK(ETHER_OUTPUT_TASK, { TA_HLNG       , 0, ether_output_task, ETHER_OUTPUT_PRIORITY, ETHER_OUTPUT_STACK_SIZE, NULL });
+CRE_TSK(ETHER_INPUT_TASK,  { TA_HLNG|TA_ACT, 0, ether_input_task,  ETHER_INPUT_PRIORITY,  ETHER_INPUT_STACK_SIZE,  NULL });
+
+CRE_DTQ(DTQ_ETHER_OUTPUT,  { TA_TFIFO, NUM_DTQ_ETHER_OUTPUT,  NULL });
+
+/* ãµãã¼ãé¢æ° max2str ç¨ã»ããã© */
+
+CRE_SEM(SEM_MAC2STR_BUFF_LOCK,	{ TA_TPRI, 1, 1 });
+
+#endif	/* of #ifdef SUPPORT_ETHER */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ethernet.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ethernet.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ethernet.h	(revision 270)
@@ -0,0 +1,288 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * Fundamental constants relating to ethernet.
+ *
+ * $FreeBSD: src/sys/net/ethernet.h,v 1.9.2.1 1999/08/29 16:28:13 peter Exp $
+ *
+ */
+
+#ifndef _ETHERNET_H_
+#define _ETHERNET_H_
+
+#ifdef SUPPORT_ETHER
+
+/*
+ *  ãã£ã¼ã«ãé·
+ */
+
+#define ETHER_ADDR_LEN		6	/* Ethernet (MAC) Address	*/
+#define ETHER_TYPE_LEN		2	/* Type		*/
+#define ETHER_CRC_LEN		0/*4*/	/* CRC		*/
+
+/*
+ *  ãã¬ã¼ã é· (Ethernet ãããã¨ CRC ãå«ã)
+ */
+
+#define ETHER_MIN_LEN		64
+#define ETHER_MAX_LEN		(IF_MTU + sizeof(T_ETHER_HDR) + ETHER_CRC_LEN)
+
+/*
+ *  Ethernet ããã
+ */
+
+#ifndef IF_ETHER_NIC_HDR_ALIGN
+#error IF_ETHER_NIC_HDR_ALIGN expected.
+#endif	/* of #ifndef IF_ETHER_NIC_HDR_ALIGN */
+
+typedef struct t_ether_header {
+
+#if IF_ETHER_NIC_HDR_ALIGN != 0
+
+	uint8_t		align[IF_ETHER_NIC_HDR_ALIGN];	/* ã¢ã©ã¤ã³èª¿æ´ */
+
+#endif	/* of #if IF_ETHER_NIC_HDR_ALIGN != 0 */
+
+	uint8_t		dhost[ETHER_ADDR_LEN];
+	uint8_t		shost[ETHER_ADDR_LEN];
+	uint16_t	type;
+	} __attribute__((packed, aligned(2)))T_ETHER_HDR;
+
+#define GET_ETHER_HDR(nbuf)		((T_ETHER_HDR*)((nbuf)->buf))
+
+/*
+ *  MAC ã¢ãã¬ã¹ã®å®ç¾©
+ */
+
+#define ETHER_MCAST_ADDR	UINT_C(0x01)	/* ãã«ãã­ã£ã¹ãã»ã¢ãã¬ã¹	*/
+#define ETHER_LOCAL_ADDR	UINT_C(0x02)	/* ã­ã¼ã«ã«ã»ã¢ãã¬ã¹		*/
+
+typedef struct t_ether_addr {
+	uint8_t		lladdr[ETHER_ADDR_LEN];
+	} __attribute__((packed, aligned(2)))T_ETHER_ADDR;
+
+/*
+ *  Type ãã£ã¼ã«ã
+ */
+
+#define ETHER_TYPE_IP		UINT_C(0x0800)	/* IPv4	*/
+#define ETHER_TYPE_ARP		UINT_C(0x0806)	/* ARP	*/
+#define ETHER_TYPE_IPV6		UINT_C(0x86dd)	/* IPv6	*/
+
+/*
+ *  ã¤ã³ã¿ãã§ã¼ã¹ã®é¸æãã¯ã­
+ */
+
+#define T_IF_HDR		T_ETHER_HDR		/* ã¤ã³ã¿ãã§ã¼ã¹ã®ããã				*/
+#define T_IF_ADDR		T_ETHER_ADDR		/* ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹			*/
+#define IF_HDR_ALIGN		2			/* ãããã®ã¢ã©ã¤ã³åä½				*/
+#define IF_MTU			1500			/* ã¤ã³ã¿ãã§ã¼ã¹ã® MTU				*/
+
+#define IF_OUTPUT(o,d,g,t)	ether_output(o,d,g,t)	/* ã¤ã³ã¿ãã§ã¼ã¹ã®åºåé¢æ°			*/
+#define IF_RAW_OUTPUT(o,t)	ether_raw_output(o,t)	/* ã¤ã³ã¿ãã§ã¼ã¹ã®åºåé¢æ°ãã¢ãã¬ã¹è§£æ±ºç¡ã	*/
+#define IF_SET_PROTO(b,p)	(GET_ETHER_HDR(b)->type = htons(p))
+							/* ã¤ã³ã¿ãã§ã¼ã¹ã®ãã­ãã³ã«è¨­å®é¢æ°		*/
+#define IF_SOFTC_TO_IFADDR(s)	((T_IF_ADDR*)(s)->ifaddr.lladdr)
+							/* ã½ããã¦ã§ã¢æ
+å ±ãã MAC ã¢ãã¬ã¹ãåãåºã	*/
+#define IF_GET_IFNET()		ether_get_ifnet()	/* ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹æ§é ä½ãè¿ãã		*/
+#define IF_TYPE			IFT_ETHER		/* ã¤ã³ã¿ã¼ãã§ã¼ã¹ã®å				*/
+
+/* IPv4 é¢ä¿ */
+
+#define IF_PROTO_IP		ETHER_TYPE_IP		/* ã¤ã³ã¿ãã§ã¼ã¹ã® IP ãã­ãã³ã«æå®		*/
+#define IF_PROTO_ARP		ETHER_TYPE_ARP		/* ã¤ã³ã¿ãã§ã¼ã¹ã® ARP ãã­ãã³ã«æå®		*/
+
+/* IPv6 é¢ä¿ */
+
+#define MAX_IF_MADDR_CNT	2			/* ã¤ã³ã¿ãã§ã¼ã¹ã®ãã«ãã­ã£ã¹ãã¢ãã¬ã¹é
+åã®æå¤§ãµã¤ãº	*/
+#define IF_MADDR_INIT		{ { { 0, 0, 0, 0, 0, 0 } }, { { 0, 0, 0, 0, 0, 0 } } }
+							/* ã¤ã³ã¿ãã§ã¼ã¹ã®ãã«ãã­ã£ã¹ãã¢ãã¬ã¹é
+åã®åæå	*/
+#define IF_PROTO_IPV6		ETHER_TYPE_IPV6		/* ã¤ã³ã¿ãã§ã¼ã¹ã® IP ãã­ãã³ã«æå®			*/
+#define IF_ADDMULTI(s)		IF_ETHER_NIC_ADDMULTI(s)
+							/* ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ã®ç»é²				*/
+#define IF_IN6_NEED_CACHE(i)	(true)			/* è¿é£æ¢ç´¢ã­ã£ãã·ã¥ãä½¿ç¨ããã				*/
+#define IF_IN6_IFID(i,a)	IF_ETHER_NIC_IN6_IFID(i,a)
+							/* ã¤ã³ã¿ãã§ã¼ã¹è­å¥å­ã®è¨­å®				*/
+#define IF_IN6_RESOLVE_MULTICAST(i,m)	\
+				ether_in6_resolve_multicast(i,m)
+							/* ã¤ã³ã¿ãã§ã¼ã¹ã®ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ã¸ã®å¤æ		*/
+
+/*
+ *  åæ¹åç
+§
+ */
+
+#ifndef T_IFNET_DEFINED
+
+typedef struct t_ifnet T_IFNET;
+
+#define T_IFNET_DEFINED
+
+#endif	/* of #ifndef T_IFNET_DEFINED */
+
+#ifndef T_IF_SOFTC_DEFINED
+
+typedef struct t_if_softc T_IF_SOFTC;
+
+#define T_IF_SOFTC_DEFINED
+
+#endif	/* of #ifndef T_IF_SOFTC_DEFINED */
+
+#ifndef T_IN4_ADDR_DEFINED
+
+typedef uint32_t T_IN4_ADDR;
+
+#define T_IN4_ADDR_DEFINED
+
+#endif	/* of #ifndef T_IN4_ADDR_DEFINED */
+
+#ifndef T_NET_BUF_DEFINED
+
+typedef struct t_net_buf T_NET_BUF;
+
+#define T_NET_BUF_DEFINED
+
+#endif	/* of #ifndef T_NET_BUF_DEFINED */
+
+/*
+ *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã«ä¾å­ããªãã½ããã¦ã§ã¢æ
+å ±
+ */
+
+#ifdef T_IF_ETHER_NIC_SOFTC
+
+struct t_if_softc {
+	T_IF_ADDR		ifaddr;			/* ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹	*/
+	uint16_t		timer;			/* éä¿¡ã¿ã¤ã ã¢ã¦ã			*/
+	T_IF_ETHER_NIC_SOFTC	*sc;	/* ãã£ãã¤ã¹ä¾å­ã®ã½ããã¦ã§ã¢æ
+å ±	*/
+	ID			semid_txb_ready;	/* éä¿¡ã»ããã©				*/
+	ID			semid_rxb_ready;	/* åä¿¡ã»ããã©				*/
+
+#ifdef SUPPORT_INET6
+
+	T_IF_ADDR 	maddrs[MAX_IF_MADDR_CNT];	/* ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ãªã¹ã	*/
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+	};
+
+#endif	/* of #ifdef T_IF_ETHER_NIC_SOFTC */
+
+#define IF_FLAG_UP				0x01U
+#define IF_FLAG_LINK_UP			0x10U
+
+#ifdef SUPPORT_INET6
+
+/* åæ¹åç
+§ */
+
+#ifndef T_IN6_ADDR_DEFINED
+
+typedef struct t_in6_addr T_IN6_ADDR;
+
+#define T_IN6_ADDR_DEFINED
+
+#endif	/* of #ifndef T_IN6_ADDR_DEFINED */
+
+/*
+ *  é¢æ°
+ */
+
+extern ER ether_in6_resolve_multicast(T_ETHER_ADDR *ifaddr, T_IN6_ADDR *maddr);
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+/*
+ *  é¢æ°
+ */
+
+extern T_IFNET *ether_get_ifnet (void);
+extern ER ether_output (T_NET_BUF *data, void *dst, T_IF_ADDR *gw, TMO tmout);
+extern ER ether_raw_output (T_NET_BUF *data, TMO tmout);
+
+/** Function prototype for netif status- or link-callback functions. */
+typedef void (*ether_status_callback_fn)(T_IFNET *ether);
+extern void ether_set_link_callback(ether_status_callback_fn link_callback);
+extern void ether_set_link_up(T_IFNET *ether);
+extern void ether_set_link_down(T_IFNET *ether);
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#endif	/* of #ifndef _ETHERNET_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/fcstab.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/fcstab.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/fcstab.c	(revision 270)
@@ -0,0 +1,34 @@
+static UH fcstab[256] = {
+	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
+	0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
+	0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
+	0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
+	0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
+	0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
+	0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
+	0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
+	0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
+	0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
+	0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
+	0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
+	0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
+	0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
+	0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
+	0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
+	0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
+	0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
+	0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
+	0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
+	0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
+	0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
+	0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
+	0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
+	0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
+	0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
+	0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
+	0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
+	0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
+	0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
+	0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
+	0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78,
+	};
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/genfcstab.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/genfcstab.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/genfcstab.c	(revision 270)
@@ -0,0 +1,32 @@
+/*
+ * Generate a FCS table for the HDLC FCS (RFC1171).
+ *
+ * Drew D. Perkins at Carnegie Mellon University.
+ *
+ * Code liberally borrowed from Mohsen Banan and D. Hugh Redelmeier.
+ */
+
+#include <stdio.h>
+
+/* The HDLC polynomail: X**0 + X**5 + X**12 + X**16 (0x8408) */
+
+#define Polynomial	0x8408
+
+int
+main (int argc, char *argv[])
+{
+	unsigned int	count, octet;
+	int		bit;
+
+	printf("%s = {\n", argv[1]);
+	for (count = 0; count < 256; count ++) {
+		octet = count;
+		for (bit = 8; bit-- > 0; )
+			octet = (octet & 0x01) ? ((octet >> 1) ^ Polynomial) : (octet >> 1);
+		printf("%c0x%04x,", count % 8 ? ' ' : '\t', octet & 0xffff);
+		if (count % 8 == 7)
+			putchar('\n');
+		}
+	fputs("\t};\n", stdout);
+	return 0;
+	}
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/if.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/if.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/if.c	(revision 270)
@@ -0,0 +1,180 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1980, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)if.c	8.3 (Berkeley) 1/4/94
+ * $FreeBSD: src/sys/net/if.c,v 1.64.2.1 1999/08/29 16:28:14 peter Exp $
+ */
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/net.h>
+#include <net/net_timer.h>
+
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+
+#include <net/if6_var.h>
+
+#ifdef SUPPORT_ETHER
+
+/*
+ *  é¢æ°
+ */
+
+static void if_slowtimo (void *ignore);
+
+/*
+ *  if_slowtimo -- ã¤ã³ã¿ãã§ã¼ã¹ã®ã¯ããããã°ã¿ã¤ãå¶å¾¡
+ */
+
+static void
+if_slowtimo (void *ignore)
+{
+	T_IF_SOFTC	*ic;
+
+	ic = IF_ETHER_NIC_GET_SOFTC();
+
+	if (ic->timer > 0) {
+		ic->timer --;
+		if (ic->timer == 0)
+			IF_ETHER_NIC_WATCHDOG(ic);
+		}
+	timeout(if_slowtimo, NULL, IF_TIMER_TMO);
+	}
+
+/*
+ *  ifinit -- ã¤ã³ã¿ãã§ã¼ã¹ç®¡çã®åæå
+ */
+
+void
+ifinit (void)
+{
+	timeout(if_slowtimo, NULL, IF_TIMER_TMO);
+	}
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  if_addmulti -- ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ã®ç»é²
+ */
+
+ER
+if_addmulti (T_IFNET *ifp, void *maddr, uint8_t type)
+{
+	T_IF_ADDR	llmaddr;
+	ER		error = E_OK;
+	int_t		ix;
+
+	if (type == AT_INET6) {
+
+		if ((ix = in6_addr2maix((T_IN6_ADDR*)maddr)) == IPV6_MADDR_IX_EXTRA)
+			return E_PAR;
+
+		/* IPv6 ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ãç»é²ããã*/
+		ifp->in_maddrs[ix] = *(T_IN6_ADDR*)maddr;
+
+		/* ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹ã«å¤æããç»é²ããã*/
+		error = IF_IN6_RESOLVE_MULTICAST(&llmaddr, (T_IN6_ADDR*)maddr);
+		if (error != E_OK)
+			return error;
+		ifp->ic->maddrs[ix] = llmaddr;
+		}
+
+	return IF_ADDMULTI(ifp->ic);
+	}
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif /* of #ifdef SUPPORT_ETHER */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/if.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/if.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/if.h	(revision 270)
@@ -0,0 +1,120 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)if.h	8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/net/if.h,v 1.49.2.1 1999/08/29 16:28:15 peter Exp $
+ */
+
+#ifndef _IF_H_
+#define _IF_H_
+
+/*
+ *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ç¨ã¿ã¤ãã®å®ç¾©
+ */
+
+#define IF_TIMER_TMO		NET_TIMER_HZ	/* ã¿ã¤ã ã¢ã¦ãã1 [s]	*/
+#define IF_TIMER_HZ		1		/* ã¿ã¤ãã®å¨æ³¢æ°ã1 [s]	*/
+
+/*
+ *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ãã©ã°
+ */
+
+#define IFF_UP			UINT_C(0x0001)	/* èµ·åæ¸ã¿		*/
+#define IFF_RUNNING		UINT_C(0x0002)	/* åä½ä¸­		*/
+
+/*
+ *  æ±ç¨å®ç¾©
+ */
+
+#define IF_HDR_SIZE		(sizeof(T_IF_HDR))
+#define IF_PDU_SIZE		(IF_HDR_SIZE + IF_MTU)	/* Protocol Data Unit */
+
+/*
+ *  é¢æ°
+ */
+
+#ifdef SUPPORT_ETHER
+
+extern void ifinit (void);
+
+#else	/* of #ifdef SUPPORT_ETHER */
+
+#define ifinit
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#endif	/* of #ifndef _IF_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/if6_var.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/if6_var.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/if6_var.h	(revision 270)
@@ -0,0 +1,121 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _IF6_VAR_H_
+#define _IF6_VAR_H_
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹æ§é ä½
+ */
+
+struct t_ifnet {
+	T_IF_SOFTC	*ic;		/* ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã½ããã¦ã§ã¢æ
+å ±	*/
+	T_IN6_IFADDR 	in_ifaddrs[NUM_IN6_IFADDR_ENTRY];
+					/* IPv6 ã¢ãã¬ã¹æ
+å ±				*/
+	T_IN6_ADDR	in_maddrs [MAX_IN6_MADDR_CNT];
+					/* ãã«ãã­ã£ã¹ã IPv6 ã¢ãã¬ã¹			*/
+	uint8_t		flags;		/* ãã©ã°					*/
+	};
+
+#ifndef T_IFNET_DEFINED
+
+typedef struct t_ifnet T_IFNET;
+
+#define T_IFNET_DEFINED
+
+#endif	/* of #ifndef T_IFNET_DEFINED */
+
+/*
+ *  é¢æ°ã·ãã¥ã¬ã¼ã·ã§ã³ãã¯ã­
+ */
+
+#define ND6_IFPTOMAC(i)		(IF_SOFTC_TO_IFADDR((i)->ic))
+
+/*
+ *  é¢æ°
+ */
+
+extern ER if_addmulti (T_IFNET *ifp, void *maddr, uint8_t type);
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef _IF6_VAR_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_arp.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_arp.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_arp.h	(revision 270)
@@ -0,0 +1,151 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)if_arp.h	8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/net/if_arp.h,v 1.10.2.3 1999/11/19 09:30:31 julian Exp $
+ */
+
+#ifndef _IF_ARP_H_
+#define _IF_ARP_H_
+
+#ifdef SUPPORT_ETHER
+
+/*
+ *  Address Resolution Protocol.
+ *
+ *  RFC 826 åç
+§
+ */
+
+/*
+ *  æ§é ä½
+ */
+
+/* ARP ããã */
+
+typedef struct t_arp_hdr {
+	uint16_t	hrd_addr;	/* ç©çã¢ãã¬ã¹ãã©ã¼ããã	*/
+	uint16_t	proto;		/* ãã­ãã³ã«			*/
+	uint8_t		hdr_len;	/* ç©çã¢ãã¬ã¹é·		*/
+	uint8_t		proto_len;	/* ãã­ãã³ã«é·			*/
+	uint16_t	opcode;		/* å½ä»¤ã³ã¼ã			*/
+	} __attribute__((packed, aligned(2)))T_ARP_HDR;
+
+#define ARP_HDR_SIZE			(sizeof(T_ARP_HDR))
+#define IF_ARP_HDR_SIZE			(IF_HDR_SIZE + ARP_HDR_SIZE)
+
+#define GET_ARP_HDR(nbuf)		((T_ARP_HDR*)((nbuf)->buf + IF_HDR_SIZE))
+
+#define GET_IF_ARP_HDR_SIZE(nbuf)	(IF_HDR_SIZE + ARP_HDR_SIZE)
+
+/* hrd_addrãç©çã¢ãã¬ã¹ãã©ã¼ãããã®å¤ */
+
+#define ARPHRD_ETHER	1	/* Ethernet	*/
+
+/* opcode, å½ä»¤ã³ã¼ãã®å¤ */
+
+#define ARPOP_REQUEST		UINT_C(1)	/* ã¢ãã¬ã¹è§£æ±ºè¦æ±		*/
+#define ARPOP_REPLY		UINT_C(2)	/* ã¢ãã¬ã¹è§£æ±ºå¿ç­		*/
+#define ARPOP_REV_REQUEST	UINT_C(3)	/* ãã­ãã³ã«ã»ã¢ãã¬ã¹è§£æ±ºè¦æ±	*/
+#define ARPOP_REV_REPLY		UINT_C(4)	/* ãã­ãã³ã«ã»ã¢ãã¬ã¹è§£æ±ºè¦æ±	*/
+#define ARPOP_INV_REQUEST	UINT_C(8)	/* çµç«¯è­å¥è¦æ±			*/
+#define ARPOP_INV_REPLY		UINT_C(9)	/* çµç«¯è­å¥è¦æ±			*/
+
+/*
+ *  ã¤ã¼ãµããããã©ã¤ãã¢ã¸ã¥ã¼ã«ã§ä½¿ç¨ããã ARP æ
+å ±
+ */
+
+typedef struct arpcom {
+	uint8_t		mac_addr[ETHER_ADDR_LEN];
+	} __attribute__((packed, aligned(2)))T_ARPCOM;
+
+/*
+ *  ARP ã­ã£ãã·ã¥æ´æ°ã¿ã¤ãã®å®ç¾©
+ */
+
+#define ARP_TIMER_TMO		(60*NET_TIMER_HZ)	/* ã¿ã¤ã ã¢ã¦ãã60 [s]	*/
+
+/*
+ *  å¤æ°
+ */
+
+extern const uint8_t	ether_broad_cast_addr[ETHER_ADDR_LEN];
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#endif	/* of #ifndef _IF_ARP_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_llc.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_llc.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_llc.h	(revision 270)
@@ -0,0 +1,121 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1988, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *      @(#)if_llc.h	8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/net/if_llc.h,v 1.6.4.1 1999/08/29 16:28:18 peter Exp $
+ */
+
+#ifndef _IF_LLC_H_
+#define _IF_LLC_H_
+
+#ifdef SUPPORT_ETHER
+
+/*
+ *  é·ãã®å®ç¾©
+ */
+
+#define SNAP_ORG_LEN		3
+#define SNAP_TYPE_LEN		2
+
+/*
+ *  802.3 ããã
+ */
+
+typedef struct t_8023mac_header {
+	uint8_t		dhost[ETHER_ADDR_LEN];
+	uint8_t		shost[ETHER_ADDR_LEN];
+	uint16_t	len;
+	} __attribute__((packed, aligned(2)))T_8023MAC_HDR;
+
+typedef struct t_8022llc_header {
+	uint8_t		dsap;
+	uint8_t		ssap;
+	uint8_t		control;
+	} __attribute__((packed, aligned(2)))T_8022LLC_HDR;
+
+typedef struct t_8022snap_header {
+	uint8_t		original[SNAP_ORG_LEN];
+	uint8_t		type[SNAP_TYPE_LEN];
+	} __attribute__((packed, aligned(2)))T_8022SNAP_HDR;
+
+#define GET_8023MAC_HDR(nbuf)		((T_8023MAC_HDR*)((nbuf)->buf))
+#define GET_8022LLC_HDR(nbuf)		((T_8022LLC_HDR*)((nbuf)->buf + sizeof(T_8023MAC_HDR)))
+#define GET_8022SNAP_HDR(nbuf)		((T_8022SNAP_HDR*)((nbuf)->buf + sizeof(T_8023MAC_HDR) + sizeof(T_8022LLC_HDR)))
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#endif	/* of #ifndef _IF_LLC_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_loop.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_loop.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_loop.c	(revision 270)
@@ -0,0 +1,253 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)if_loop.c	8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/net/if_loop.c,v 1.37.2.1 1999/08/29 16:28:19 peter Exp $
+ */
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_loop.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet/tcp.h>
+#include <netinet/udp.h>
+
+#include <net/if_var.h>
+#include <net/if6_var.h>
+
+#ifdef SUPPORT_LOOP
+
+/*
+ *  ã­ã¼ã«ã«ã«ã¼ãããã¯ã¤ã³ã¿ãã§ã¼ã¹
+ */
+
+/*
+ *  å¤é¨é¢æ°ã®å®ç¾©
+ */
+
+extern const char *itron_strerror (ER ercd);
+
+/*
+ *  å¤æ°
+ */
+
+/* ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹æ§é ä½ */
+
+#if defined(SUPPORT_INET4)
+
+static T_IFNET loop_ifnet = {
+	NULL,			/* ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã½ããã¦ã§ã¢æ
+å ±	*/
+	{
+		IPV4_ADDR_LOOPBACK,		/* IPv4 ã¢ãã¬ã¹			*/
+		IPV4_ADDR_LOOPBACK_MASK,	/* ãµãããããã¹ã¯			*/
+		},
+	};
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+static T_IFNET loop_ifnet = {
+	NULL,			/* ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã½ããã¦ã§ã¢æ
+å ±	*/
+	{},			/* IPv6 ã¢ãã¬ã¹æ
+å ±				*/
+	{},			/* ãã«ãã­ã£ã¹ã IPv6 ã¢ãã¬ã¹			*/
+	};
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+/*
+ *  loop_get_ifnet -- ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹æ§é ä½ãè¿ãã
+ */
+
+T_IFNET *
+loop_get_ifnet (void)
+{
+	return &loop_ifnet;
+	}
+
+/*
+ *  looutput -- ã­ã¼ã«ã«ã«ã¼ãããã¯ã¤ã³ã¿ãã§ã¼ã¹ã®åºåé¢æ°
+ */
+
+ER
+looutput (T_NET_BUF *output, TMO tmout)
+{
+	ER error;
+
+	NET_COUNT_LOOP(net_count_loop.out_octets,  output->len);
+	NET_COUNT_LOOP(net_count_loop.out_packets, 1);
+
+	if ((error = tsnd_dtq(DTQ_LOOP_OUTPUT, output, tmout)) != E_OK)
+		syslog(LOG_NOTICE, "[LOOP] drop error: %s", itron_strerror(error));
+	return error;
+	}
+
+/*
+ *  ã­ã¼ã«ã«ã«ã¼ãããã¯ã¤ã³ã¿ãã§ã¼ã¹ã»åºåã¿ã¹ã¯
+ */
+
+void
+if_loop_output_task (intptr_t exinf)
+{
+	T_NET_BUF	*output;
+	ER		error;
+	ID		tskid;
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[LOOP OUTPUT:%d] started.", tskid);
+	while (true) {
+		if (rcv_dtq(DTQ_LOOP_OUTPUT, (intptr_t*)&output) == E_OK) {
+			NET_COUNT_LOOP(net_count_loop.in_octets,  output->len);
+			NET_COUNT_LOOP(net_count_loop.in_packets, 1);
+			if ((error = snd_dtq(DTQ_LOOP_INPUT, output)) != E_OK)
+				syslog(LOG_NOTICE, "[LOOP OUTPUT] drop error: %s", itron_strerror(error));
+			}
+		}
+	}
+
+/*
+ *  ã­ã¼ã«ã«ã«ã¼ãããã¯ã¤ã³ã¿ãã§ã¼ã¹ã»å
+¥åã¿ã¹ã¯
+ */
+
+void
+if_loop_input_task (intptr_t exinf)
+{
+	T_NET_BUF	*input;
+	ID		tskid;
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[LOOP INPUT:%d] started.", tskid);
+	while (true) {
+		if (rcv_dtq(DTQ_LOOP_INPUT, (intptr_t)&input) == E_OK) {
+			NET_COUNT_LOOP(net_count_loop.in_octets,  input->len);
+			NET_COUNT_LOOP(net_count_loop.in_packets, 1);
+
+#if defined(SUPPORT_INET4)
+
+			/* IPv4 å
+¥åé¢æ°ãå¼ã³åºã */
+			if (IP4_VHL_V(GET_IP4_HDR(input)->vhl) == IPV4_VERSION)
+				ip_input(input);
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+			/* IPv6 å
+¥åé¢æ°ãå¼ã³åºã */
+			if (IP6_VCF_V(ntohl(GET_IP6_HDR(input)->vcf)) == IPV6_VERSION)
+				ip6_input(input);
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+			}
+		}
+	}
+
+#endif	/* of #ifdef SUPPORT_LOOP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_loop.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_loop.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_loop.cfg	(revision 270)
@@ -0,0 +1,73 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  ã«ã¼ãããã¯ã¤ã³ã¿ãã§ã¼ã¹ã»ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef SUPPORT_LOOP
+
+CRE_TSK(LOOP_OUTPUT_TASK, {
+	TA_HLNG|TA_ACT,
+	0,
+	if_loop_output_task,
+	LOOP_OUTPUT_PRIORITY,
+	LOOP_OUTPUT_STACK_SIZE,
+	NULL
+	});
+
+CRE_TSK(LOOP_INPUT_TASK,  {
+	TA_HLNG|TA_ACT,
+	0,
+	if_loop_input_task,
+	LOOP_INPUT_PRIORITY,
+	LOOP_INPUT_STACK_SIZE,
+	NULL
+	});
+
+CRE_DTQ(DTQ_LOOP_OUTPUT,  { TA_TFIFO, NUM_DTQ_LOOP_OUTPUT, NULL });
+CRE_DTQ(DTQ_LOOP_INPUT,   { TA_TFIFO, NUM_DTQ_LOOP_INPUT,  NULL });
+
+#endif	/* of #ifdef SUPPORT_LOOP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_loop.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_loop.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_loop.h	(revision 270)
@@ -0,0 +1,168 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+#ifndef _IF_LOOP_H_
+#define _IF_LOOP_H_
+
+#ifdef SUPPORT_LOOP
+
+/*
+ *  ã­ã¼ã«ã«ã«ã¼ãããã¯ã¤ã³ã¿ãã§ã¼ã¹ã»ãããã¨ã¢ãã¬ã¹
+ */
+
+typedef struct t_loop_hdr  { } T_LOOP_HDR;
+typedef struct t_loop_addr { } T_LOOP_ADDR;
+
+/*
+ *  ã¤ã³ã¿ãã§ã¼ã¹ã®é¸æãã¯ã­
+ */
+
+#define T_IF_HDR		T_LOOP_HDR		/* ã¤ã³ã¿ãã§ã¼ã¹ã®ããã	*/
+#define T_IF_ADDR		T_LOOP_ADDR		/* ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹	*/
+#define IF_HDR_ALIGN		4			/* ãããã®ã¢ã©ã¤ã³åä½		*/
+#define IF_MTU			LOMTU			/* ã¤ã³ã¿ãã§ã¼ã¹ã® MTU		*/
+
+#define IF_OUTPUT(o,d,g,t)	looutput(o,t)		/* ã¤ã³ã¿ãã§ã¼ã¹ã®åºåé¢æ°	*/
+#define IF_RAW_OUTPUT(o,t)	looutput(o,t)		/* ã¤ã³ã¿ãã§ã¼ã¹ã®åºåé¢æ°ãã¢ãã¬ã¹è§£æ±ºç¡ã*/
+#define IF_SET_PROTO(b,p)				/* ã¤ã³ã¿ãã§ã¼ã¹ã®ãã­ãã³ã«è¨­å®é¢æ°	*/
+#define IF_GET_IFNET()		loop_get_ifnet()	/* ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹æ§é ä½ãè¿ãã		*/
+
+/* IPv4 é¢ä¿ */
+
+#define IF_PROTO_IP		0			/* ã¤ã³ã¿ãã§ã¼ã¹ã® IP ãã­ãã³ã«æå®		*/
+
+/* IPv6 é¢ä¿ */
+
+#define MAX_IF_MADDR_CNT	0			/* ã¤ã³ã¿ãã§ã¼ã¹ã®ãã«ãã­ã£ã¹ãã¢ãã¬ã¹é
+åã®æå¤§ãµã¤ãº	*/
+#define IF_IN6_NEED_CACHE(i)	(false)			/* è¿é£æ¢ç´¢ã­ã£ãã·ã¥ãä½¿ç¨ããã				*/
+
+/*
+ *  åæ¹åç
+§
+ */
+
+#ifndef T_NET_BUF_DEFINED
+
+typedef struct t_net_buf T_NET_BUF;
+
+#define T_NET_BUF_DEFINED
+
+#endif	/* of #ifndef T_NET_BUF_DEFINED */
+
+#ifndef T_IF_SOFTC_DEFINED
+
+typedef struct t_if_softc T_IF_SOFTC;
+
+#define T_IF_SOFTC_DEFINED
+
+#endif	/* of #ifndef T_IF_SOFTC_DEFINED */
+
+#ifndef T_IFNET_DEFINED
+
+typedef struct t_ifnet T_IFNET;
+
+#define T_IFNET_DEFINED
+
+#endif	/* of #ifndef T_IFNET_DEFINED */
+
+/*
+ *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã«ä¾å­ããªãã½ããã¦ã§ã¢æ
+å ±
+ */
+
+struct t_if_softc { };
+
+/*
+ *  é¢æ°
+ */
+
+extern T_IFNET *loop_get_ifnet (void);
+ER looutput (T_NET_BUF *output, TMO tmout);
+
+/*
+ *  ã­ã¼ã«ã«ã«ã¼ãããã¯ã¤ã³ã¿ãã§ã¼ã¹ã»å¦çã¿ã¹ã¯
+ */
+
+extern void	if_loop_output_task(intptr_t exinf);
+extern void	if_loop_input_task(intptr_t exinf);
+
+#endif	/* of #ifdef SUPPORT_LOOP */
+
+#endif	/* of #ifndef _IF_LOOP_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_ppp.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_ppp.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_ppp.h	(revision 270)
@@ -0,0 +1,147 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * if_ppp.h - Point-to-Point Protocol definitions.
+ *
+ * Copyright (c) 1989 Carnegie Mellon University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by Carnegie Mellon University.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/sys/net/if_ppp.h,v 1.13.2.1 1999/08/29 16:28:21 peter Exp $
+ */
+
+#ifndef _IF_PPP_H_
+#define _IF_PPP_H_
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  ã¤ã³ã¿ãã§ã¼ã¹ã®é¸æãã¯ã­
+ */
+
+#define T_IF_HDR		T_PPP_HDR	/* ã¤ã³ã¿ãã§ã¼ã¹ã®ããã			*/
+#define IF_HDR_ALIGN		2		/* ãããã®ã¢ã©ã¤ã³åä½			*/
+#define IF_MTU			DEF_PPP_MTU	/* ã¤ã³ã¿ãã§ã¼ã¹ã® MTU			*/
+						/* ã¤ã³ã¿ãã§ã¼ã¹ã® IPv4 ã¢ãã¬ã¹		*/
+#define IF_PROTO_IP		PPP_IP		/* ã¤ã³ã¿ãã§ã¼ã¹ã® IP ãã­ãã³ã«æå®	*/
+
+#define IF_OUTPUT(o,d,g,t)	ppp_output(o,t)		/* ã¤ã³ã¿ãã§ã¼ã¹ã®åºåé¢æ°		*/
+#define IF_RAW_OUTPUT(o,t)	ppp_output(o,t)		/* ã¤ã³ã¿ãã§ã¼ã¹ã®åºåé¢æ°ãã¢ãã¬ã¹è§£æ±ºç¡ã*/
+							/* ã¤ã³ã¿ãã§ã¼ã¹ã®ãã­ãã³ã«è¨­å®é¢æ°	*/
+#define IF_SET_PROTO(b,p)	(*GET_PPP_HDR(b) = htons(p))
+#define IF_GET_IFNET()		ppp_get_ifnet()		/* ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹æ§é ä½ãè¿ãã		*/
+
+/*
+ *  MTU (MRU) ã«é¢ããå®ç¾©
+ */
+
+#define DEF_PPP_MTU		1500	/* PPP ã® æ¨æº MTU	*/
+#define MAX_PPP_MTU		16384	/* PPP ã® æå¤§ MTU	*/
+#define MIN_PPP_MTU		128	/* PPP ã® æå° MTU	*/
+
+/*
+ *  PPP ããã
+ */
+
+typedef uint16_t T_PPP_HDR;				/* ä¸ä½ãã­ãã³ã«		*/
+
+/*
+ *  åæ¹åç
+§
+ */
+
+#ifndef T_IFNET_DEFINED
+
+typedef struct t_ifnet T_IFNET;
+
+#define T_IFNET_DEFINED
+
+#endif	/* of #ifndef T_IFNET_DEFINED */
+
+#ifndef T_IF_SOFTC_DEFINED
+
+typedef struct t_if_softc T_IF_SOFTC;
+
+#define T_IF_SOFTC_DEFINED
+
+#endif	/* of #ifndef T_IF_SOFTC_DEFINED */
+
+#ifndef T_NET_BUF_DEFINED
+
+typedef struct t_net_buf T_NET_BUF;
+
+#define T_NET_BUF_DEFINED
+
+#endif	/* of #ifndef T_NET_BUF_DEFINED */
+
+/*
+ *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã«ä¾å­ããªãã½ããã¦ã§ã¢æ
+å ±
+ */
+
+struct t_if_softc { };
+
+/*
+ *  é¢æ°
+ */
+
+extern T_IFNET *ppp_get_ifnet (void);
+ER ppp_output (T_NET_BUF *data, TMO tmout);
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#endif	/* of #ifndef _IF_PPP_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_types.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_types.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_types.h	(revision 270)
@@ -0,0 +1,87 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+/*-
+ * Copyright (c) 1989, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)if_types.h	8.3 (Berkeley) 4/28/95
+ * $FreeBSD: src/sys/net/if_types.h,v 1.23.6.1 2008/11/25 02:59:29 kensmith Exp $
+ * $NetBSD: if_types.h,v 1.16 2000/04/19 06:30:53 itojun Exp $
+ */
+
+#ifndef _IF_TYPES_
+#define _IF_TYPES_
+
+/*
+ *  ã¤ã³ã¿ãã§ã¼ã¹ã®åã®å®ç¾©
+ */
+
+#define IFT_ETHER	0x6	/* Ethernet CSMA/CD	*/
+
+#endif	/* of #ifndef _IF_TYPES_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_var.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_var.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_var.h	(revision 270)
@@ -0,0 +1,133 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _IF_VAR_H_
+#define _IF_VAR_H_
+
+#if defined(SUPPORT_INET4)
+
+/*
+ *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹æ§é ä½
+ */
+
+struct t_ifnet {
+	T_IF_SOFTC	*ic;		/* ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã½ããã¦ã§ã¢æ
+å ±	*/
+	T_IN4_IFADDR 	in_ifaddr;	/* IPv4 ã¢ãã¬ã¹æ
+å ±				*/
+	ether_status_callback_fn link_callback;
+	uint8_t		flags;		/* ãã©ã°					*/
+	};
+
+#ifndef T_IFNET_DEFINED
+
+typedef struct t_ifnet T_IFNET;
+
+#define T_IFNET_DEFINED
+
+#endif	/* of #ifndef T_IFNET_DEFINED */
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#ifdef SUPPORT_MIB
+
+/*
+ *  SNMP ã® ç®¡çæ
+å ±ãã¼ã¹ (MIB)
+ */
+
+typedef struct t_if_stats {
+	uint32_t	ifInOctets;
+	uint32_t	ifInUcastPkts;
+	uint32_t	ifInNUcastPkts;
+/*	uint32_t	ifInDiscards;*/
+	uint32_t	ifInErrors;
+	uint32_t	ifUnknownProtos;
+	uint32_t	ifOutOctets;
+	uint32_t	ifOutUcastPkts;
+	uint32_t	ifOutNUcastPkts;
+	uint32_t	ifOutDiscards;
+	uint32_t	ifOutErrors;
+/*	uint32_t	ifOutQlen;*/
+} T_IF_STATS;
+
+extern T_IF_STATS if_stats;
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+#endif	/* of #ifndef _IF_VAR_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/net.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/net.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/net.cfg	(revision 270)
@@ -0,0 +1,78 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  å
+±é æ±ç¨ãããã¯ã¼ã¯ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+/*
+ * ãããã¯ã¼ã¯ã¿ã¤ã
+ */
+
+CRE_TSK(NET_TIMER_TASK, {
+		TA_NULL,
+		0,
+		net_timer_task,
+		NET_TIMER_PRIORITY,
+		NET_TIMER_STACK_SIZE,
+		NULL
+		});
+
+CRE_CYC(NET_TIMER_HANDLER, {
+		TA_STA,
+		{ TNFY_HANDLER, 0, net_timer_handler },
+		NET_TIMER_CYCLE,
+		1
+		});
+
+/* ãããã¯ã¼ã¯ã¿ã¤ãã®å¼åºãã¨ã³ããªç¨ã»ããã© */
+
+CRE_SEM(SEM_CALL_OUT_LOCK,	{ TA_TPRI, 1, 1 });
+CRE_SEM(SEM_CALL_OUT_TIMEOUT,	{ TA_TPRI, 0, NUM_NET_CALLOUT });
+
+/* ãµãã¼ãé¢æ° ip2strãipv62str ç¨ã»ããã© */
+
+CRE_SEM(SEM_IP2STR_BUFF_LOCK,	{ TA_TPRI, 1, 1 });
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/net.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/net.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/net.h	(revision 270)
@@ -0,0 +1,261 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _NET_H_
+#define _NET_H_
+
+/*
+ *  ãã¤ããªã¼ãã®å®ç¾©
+ */
+
+#define _NET_CFG_LITTLE_ENDIAN	1234
+#define _NET_CFG_BIG_ENDIAN	4321
+
+#ifdef TARGET_KERNEL_ASP
+
+#if defined(SIL_ENDIAN_LITTLE)
+
+#define _NET_CFG_BYTE_ORDER	_NET_CFG_LITTLE_ENDIAN
+
+#elif defined(SIL_ENDIAN_BIG)
+
+#define _NET_CFG_BYTE_ORDER	_NET_CFG_BIG_ENDIAN
+
+#else	/* of #if defined(SIL_ENDIAN_BIG) */
+
+#error "SIL_ENDIAN expected."
+
+#endif	/* of #if defined(SIL_ENDIAN_BIG) */
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#if SIL_ENDIAN == SIL_ENDIAN_LITTLE
+
+#define _NET_CFG_BYTE_ORDER	_NET_CFG_LITTLE_ENDIAN
+
+#elif SIL_ENDIAN == SIL_ENDIAN_BIG	/* of #if SIL_ENDIAN == SIL_ENDIAN_LITTLE */
+
+#define _NET_CFG_BYTE_ORDER	_NET_CFG_BIG_ENDIAN
+
+#else	/* of #if SIL_ENDIAN == SIL_ENDIAN_LITTLE */
+
+#error "SIL_ENDIAN expected."
+
+#endif	/* of #if SIL_ENDIAN == SIL_ENDIAN_LITTLE */
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+/*
+ *  ãã¤ããªã¼ãå¤æã®å®ç¾©
+ */
+
+#if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN
+
+#define ntohs(n)		((uint16_t)n)
+#define htons(h)		((uint16_t)h)
+#define ntohl(n)		((uint32_t)n)
+#define htonl(h)		((uint32_t)h)
+
+#define NTOHS(n)
+#define HTONS(h)
+#define NTOHL(n)
+#define HTONL(h)
+
+/*
+ *  æ³¨æ: IPãããä»¥éã¯ã4 ãã¤ãå¢çã«ã¢ã©ã¤ã³ããã¦ããäºã
+ *        åæã¨ãã¦ãããã4 ãã¤ãå¢çã§ã¢ã¯ã»ã¹ãã
+ *        ãã­ã»ããµã§ããããã¯ã¼ã¯å´ã®ãã¼ã¿ãã4 ãã¤ãå¢çã«ã¢ã©ã¤ã³
+ *        ããã¦ããªãå ´åã¯ãntoahlãahtonlãnahcmpl ãä½¿ç¨ãããã¨ã
+ */
+
+#define ntoahl(h,n)		memcpy((uint8_t*)&(h),(n),4)
+#define ahtonl(n,h)		memcpy((n),(uint8_t*)&(h),4)
+
+#define nahcmpl(n,h)		memcmp((n),(uint8_t*)&(h),4)
+
+#elif _NET_CFG_BYTE_ORDER == _NET_CFG_LITTLE_ENDIAN
+
+#ifndef NET_REV_ENDIAN_HWORD
+
+#define NET_REV_ENDIAN_HWORD(d)	((uint16_t)((((uint16_t)(d)&0xff)<<8)|(((uint16_t)(d)>>8)&0xff)))
+
+#endif	/* of #ifndef NET_REV_ENDIAN_HWORD */
+
+#ifndef NET_REV_ENDIAN_WORD
+
+#define NET_REV_ENDIAN_WORD(d)	((uint32_t)((((uint32_t)(d)&0xff)<<24)|(((uint32_t)(d)&0xff00)<<8)| \
+				            (((uint32_t)(d)>>8)&0xff00)|(((uint32_t)(d)>>24)&0xff)))
+
+#endif	/* of #ifndef NET_REV_ENDIAN_WORD */
+
+#define ntohs(n)		NET_REV_ENDIAN_HWORD(n)
+#define htons(h)		NET_REV_ENDIAN_HWORD(h)
+#define ntohl(n)		NET_REV_ENDIAN_WORD(n)
+#define htonl(h)		NET_REV_ENDIAN_WORD(h)
+
+#define NTOHS(n)		((n)=NET_REV_ENDIAN_HWORD(n))
+#define HTONS(h)		((h)=NET_REV_ENDIAN_HWORD(h))
+#define NTOHL(n)		((n)=NET_REV_ENDIAN_WORD(n))
+#define HTONL(h)		((h)=NET_REV_ENDIAN_WORD(h))
+
+/*
+ *  æ³¨æ: IPãããä»¥éã¯ã4 ãã¤ãå¢çã«ã¢ã©ã¤ã³ããã¦ããäºã
+ *        åæã¨ãã¦ãããã4 ãã¤ãå¢çã§ã¢ã¯ã»ã¹ãã
+ *        ãã­ã»ããµã§ããããã¯ã¼ã¯å´ã®ãã¼ã¿ãã4 ãã¤ãå¢çã«ã¢ã©ã¤ã³
+ *        ããã¦ããªãå ´åã¯ãntoahlãahtonlãnahcmpl ãä½¿ç¨ãããã¨ã
+ */
+
+#ifndef _MACRO_ONLY
+
+extern void rev_memcpy_word (uint8_t *dst, uint8_t *src);
+extern int  rev_memcmp_word (uint8_t *data1, uint8_t *data2);
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#define ntoahl(h,n)		rev_memcpy_word((uint8_t*)&(h),(n))
+#define ahtonl(n,h)		rev_memcpy_word((n),(uint8_t*)&(h))
+#define nahcmpl(n,h)		rev_memcmp_word((n),(uint8_t*)&(h))
+
+#else	/* #if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN */
+
+#error "_NET_CFG_BYTE_ORDER expected."
+
+#endif	/* #if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN */
+
+/*
+ *  ãã­ãã³ã«ãè­å¥ãããã©ã°ã«é¢ããå®ç¾©
+ *
+ *    ã»çµ±è¨æ
+å ±
+ */
+
+#define PROTO_FLG_PPP_HDLC	ULONG_C(0x00000001)	/* ppp_hdlc.c	*/
+#define PROTO_FLG_PPP_FSM	ULONG_C(0x00000002)	/* ppp_fsm.c	*/
+#define PROTO_FLG_PPP_AUTH	ULONG_C(0x00000004)	/* ppp_auth.c	*/
+#define PROTO_FLG_PPP_LCP	ULONG_C(0x00000008)	/* ppp_lcp.c	*/
+#define PROTO_FLG_PPP_IPCP	ULONG_C(0x00000010)	/* ppp_ipcp.c	*/
+#define PROTO_FLG_PPP_CCP	ULONG_C(0x00000020)	/* ppp_ccp.c	*/
+#define PROTO_FLG_PPP_PAP	ULONG_C(0x00000040)	/* ppp_upap.c	*/
+#define PROTO_FLG_PPP_MODEM	ULONG_C(0x00000080)	/* ppp_modem.c	*/
+#define PROTO_FLG_PPP		ULONG_C(0x00000100)	/* ppp.c	*/
+
+#define PROTO_FLG_ETHER_NIC	ULONG_C(0x00000001)	/* if_??.c	*/
+
+#define PROTO_FLG_LOOP		ULONG_C(0x00000100)	/* if_loop.c	*/
+
+#define PROTO_FLG_ETHER		ULONG_C(0x00000100)	/* ethernet.c	*/
+
+#define PROTO_FLG_IF		ULONG_C(0x00000800)	/* if.c		*/
+
+#define PROTO_FLG_ARP		ULONG_C(0x00008000)	/* if_ether.c	*/
+
+#define PROTO_FLG_IP4		ULONG_C(0x00010000)	/* ip_*.c	*/
+#define PROTO_FLG_ICMP4		ULONG_C(0x00040000)	/* ip_icmp.c	*/
+
+#define PROTO_FLG_IP6		ULONG_C(0x00100000)	/* ip6_*.c	*/
+#define PROTO_FLG_ICMP6		ULONG_C(0x00400000)	/* icmp6.c	*/
+#define PROTO_FLG_ND6		ULONG_C(0x00800000)	/* nd6_*.c	*/
+
+#define PROTO_FLG_UDP		ULONG_C(0x08000000)	/* udp_*.c	*/
+
+#define PROTO_FLG_TCP		ULONG_C(0x01000000)	/* tcp_*.c	*/
+
+#define PROTO_FLG_NET_BUF	ULONG_C(0x10000000)	/* net_buf.c	*/
+#define PROTO_FLG_NET		ULONG_C(0x80000000)	/* route.c, net*.c	*/
+
+/*
+ *  ã¢ãã¬ã¹å½¢å¼ã®å®ç¾©
+ */
+
+#define AT_ETHER		UINT_C(0x01)		/* ã¤ã¼ãµããã		*/
+#define AT_INET4		UINT_C(0x10)		/* IPv4 ã¢ãã¬ã¹	*/
+#define AT_INET6		UINT_C(0x20)		/* IPv6 ã¢ãã¬ã¹	*/
+
+#if !defined(TOPPERS_MACRO_ONLY) && !defined(_MACRO_ONLY)
+
+/*
+ *  TINET ç¬èªé¢æ°
+ */
+
+extern char *mac2str (char *buf, uint8_t *macaddr);
+
+#endif /* #if !defined(TOPPERS_MACRO_ONLY) && !defined(_MACRO_ONLY) */
+
+#endif	/* of #ifndef _NET_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_asp.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_asp.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_asp.cfg	(revision 270)
@@ -0,0 +1,154 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  ASPç¨ æ±ç¨ãããã¯ã¼ã¯ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+/*
+ *  å
+±é æ±ç¨ãããã¯ã¼ã¯ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®ã¤ã³ã¯ã«ã¼ã
+ */
+
+INCLUDE("net/net.cfg");
+
+/*
+ * ãããã¯ã¼ã¯ãããã¡
+ */
+
+#if defined(NUM_MPF_NET_BUF_CSEG) && NUM_MPF_NET_BUF_CSEG > 0
+CRE_MPF(MPF_NET_BUF_CSEG, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF_CSEG,
+		sizeof(T_NET_BUF_CSEG)
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF_CSEG) && NUM_MPF_NET_BUF_CSEG > 0 */
+
+#if defined(NUM_MPF_NET_BUF_64) && NUM_MPF_NET_BUF_64 > 0
+CRE_MPF(MPF_NET_BUF_64, {
+		TA_TFIFO, NUM_MPF_NET_BUF_64,
+		sizeof(T_NET_BUF_64)
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF_64) && NUM_MPF_NET_BUF_64 > 0 */
+
+#if defined(NUM_MPF_NET_BUF_128) && NUM_MPF_NET_BUF_128 > 0
+CRE_MPF(MPF_NET_BUF_128, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF_128,
+		sizeof(T_NET_BUF_128)
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF_128) && NUM_MPF_NET_BUF_128 > 0 */
+
+#if defined(NUM_MPF_NET_BUF_256) && NUM_MPF_NET_BUF_256 > 0
+CRE_MPF(MPF_NET_BUF_256, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF_256,
+		sizeof(T_NET_BUF_256)
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF_256) && NUM_MPF_NET_BUF_256 > 0 */
+
+#if defined(NUM_MPF_NET_BUF_512) && NUM_MPF_NET_BUF_512 > 0
+CRE_MPF(MPF_NET_BUF_512, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF_512,
+		sizeof(T_NET_BUF_512)
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF_512) && NUM_MPF_NET_BUF_512 > 0 */
+
+#if defined(NUM_MPF_NET_BUF_IP_MSS) && NUM_MPF_NET_BUF_IP_MSS > 0
+CRE_MPF(MPF_NET_BUF_IP_MSS, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF_IP_MSS,
+		sizeof(T_NET_BUF_IP_MSS)
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF_IP_MSS) && NUM_MPF_NET_BUF_IP_MSS > 0 */
+
+#if defined(NUM_MPF_NET_BUF_1024) && NUM_MPF_NET_BUF_1024 > 0
+CRE_MPF(MPF_NET_BUF_1024, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF_1024,
+		sizeof(T_NET_BUF_1024)
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF_1024) && NUM_MPF_NET_BUF_1024 > 0 */
+
+#if defined(NUM_MPF_NET_BUF_IPV6_MMTU) && NUM_MPF_NET_BUF_IPV6_MMTU > 0
+CRE_MPF(MPF_NET_BUF_IPV6_MMTU, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF_IPV6_MMTU,
+		sizeof(T_NET_BUF_IPV6_MMTU)
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF_IPV6_MMTU) && NUM_MPF_NET_BUF_IPV6_MMTU > 0 */
+
+#if defined(NUM_MPF_NET_BUF_IF_PDU) && NUM_MPF_NET_BUF_IF_PDU > 0
+CRE_MPF(MPF_NET_BUF_IF_PDU, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF_IF_PDU,
+		sizeof(T_NET_BUF_IF_PDU)
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF_IF_PDU) && NUM_MPF_NET_BUF_IF_PDU > 0 */
+
+#if defined(NUM_MPF_NET_BUF4_REASSM) && NUM_MPF_NET_BUF4_REASSM > 0
+CRE_MPF(MPF_NET_BUF_REASSM, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF4_REASSM,
+		sizeof(T_NET_BUF4_REASSM)
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF4_REASSM) && NUM_MPF_NET_BUF4_REASSM > 0 */
+
+#if defined(NUM_MPF_NET_BUF6_REASSM) && NUM_MPF_NET_BUF6_REASSM > 0
+CRE_MPF(MPF_NET_BUF_REASSM, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF6_REASSM,
+		sizeof(T_NET_BUF6_REASSM)
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF6_REASSM) && NUM_MPF_NET_BUF6_REASSM > 0 */
+
+#if defined(NUM_MPF_NET_BUF6_65536) && NUM_MPF_NET_BUF6_65536 > 0
+CRE_MPF(MPF_NET_BUF6_65536, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF6_65536,
+		sizeof(T_NET_BUF6_65536)
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF6_65536) && NUM_MPF_NET_BUF6_65536 > 0 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_buf.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_buf.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_buf.c	(revision 270)
@@ -0,0 +1,496 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_loop.h>
+#include <net/if_ppp.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet6/in6.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_timer.h>
+#include <netinet/tcp_var.h>
+
+/*
+ *  é¢æ°
+ */
+
+extern const char *itron_strerror (ER ercd);
+
+/*
+ *  å¤æ°
+ */
+
+static T_NET_BUF_ENTRY net_buf_table[] = {
+
+#if defined(NUM_MPF_NET_BUF6_65536) && NUM_MPF_NET_BUF6_65536 > 0
+	{
+		MPF_NET_BUF6_65536,
+		IF_IP6_HDR_SIZE + 65536,
+
+#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
+
+		NUM_MPF_NET_BUF6_65536,
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
+
+		},
+#endif	/* of #if defined(NUM_MPF_NET_BUF6_65536) && NUM_MPF_NET_BUF6_65536 > 0 */
+
+#if defined(NUM_MPF_NET_BUF6_REASSM) && NUM_MPF_NET_BUF6_REASSM > 0
+	{
+		MPF_NET_BUF_REASSM,
+		IP6_CFG_FRAG_REASSM_SIZE,
+
+#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
+
+		NUM_MPF_NET_BUF6_REASSM,
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
+
+		},
+#endif	/* of #if defined(NUM_MPF_NET_BUF6_REASSM) && NUM_MPF_NET_BUF6_REASSM > 0 */
+
+#if defined(NUM_MPF_NET_BUF4_REASSM) && NUM_MPF_NET_BUF4_REASSM > 0
+	{
+		MPF_NET_BUF_REASSM,
+		IP4_CFG_FRAG_REASSM_SIZE,
+
+#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
+
+		NUM_MPF_NET_BUF4_REASSM,
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
+
+		},
+#endif	/* of #if defined(NUM_MPF_NET_BUF4_REASSM) && NUM_MPF_NET_BUF4_REASSM > 0 */
+
+#if defined(NUM_MPF_NET_BUF_IF_PDU) && NUM_MPF_NET_BUF_IF_PDU > 0
+	{
+		MPF_NET_BUF_IF_PDU,
+		IF_PDU_SIZE,
+
+#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
+
+		NUM_MPF_NET_BUF_IF_PDU,
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
+
+		},
+#endif	/* of #if defined(NUM_MPF_NET_BUF_IF_PDU) && NUM_MPF_NET_BUF_IF_PDU > 0 */
+
+#if defined(NUM_MPF_NET_BUF_IPV6_MMTU) && NUM_MPF_NET_BUF_IPV6_MMTU > 0
+	{
+		MPF_NET_BUF_IPV6_MMTU,
+		IF_HDR_SIZE + IPV6_MMTU,
+
+#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
+
+		NUM_MPF_NET_BUF_IPV6_MMTU,
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
+
+		},
+#endif	/* of #if defined(NUM_MPF_NET_BUF_IPV6_MMTU) && NUM_MPF_NET_BUF_IPV6_MMTU > 0 */
+
+#if defined(NUM_MPF_NET_BUF_1024) && NUM_MPF_NET_BUF_1024 > 0
+	{
+		MPF_NET_BUF_1024,
+		UINT_C(1024),
+
+#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
+
+		NUM_MPF_NET_BUF_1024,
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
+
+		},
+#endif	/* of #if defined(NUM_MPF_NET_BUF_1024) && NUM_MPF_NET_BUF_1024 > 0 */
+
+#if defined(NUM_MPF_NET_BUF_IP_MSS) && NUM_MPF_NET_BUF_IP_MSS > 0
+	{
+		MPF_NET_BUF_IP_MSS,
+		IF_HDR_SIZE + IP4_MSS,
+
+#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
+
+		NUM_MPF_NET_BUF_IP_MSS,
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
+
+		},
+#endif	/* of #if defined(NUM_MPF_NET_BUF_IP_MSS) && NUM_MPF_NET_BUF_IP_MSS > 0 */
+
+#if defined(NUM_MPF_NET_BUF_512) && NUM_MPF_NET_BUF_512 > 0
+	{
+		MPF_NET_BUF_512,
+		UINT_C(512),
+
+#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
+
+		NUM_MPF_NET_BUF_512,
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
+
+		},
+#endif	/* of #if defined(NUM_MPF_NET_BUF_512) && NUM_MPF_NET_BUF_512 > 0 */
+
+#if defined(NUM_MPF_NET_BUF_256) && NUM_MPF_NET_BUF_256 > 0
+	{
+		MPF_NET_BUF_256,
+		UINT_C(256),
+
+#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
+
+		NUM_MPF_NET_BUF_256,
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
+
+		},
+#endif	/* of #if defined(NUM_MPF_NET_BUF_256) && NUM_MPF_NET_BUF_256 > 0 */
+
+#if defined(NUM_MPF_NET_BUF_128) && NUM_MPF_NET_BUF_128 > 0
+	{
+		MPF_NET_BUF_128,
+		UINT_C(128),
+
+#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
+
+		NUM_MPF_NET_BUF_128,
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
+
+		},
+#endif	/* of #if defined(NUM_MPF_NET_BUF_128) && NUM_MPF_NET_BUF_128 > 0 */
+
+#if defined(SUPPORT_INET4)
+
+#if defined(NUM_MPF_NET_BUF_64) && NUM_MPF_NET_BUF_64 > 0
+	{
+		MPF_NET_BUF_64,
+		UINT_C(64),
+
+#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
+
+		NUM_MPF_NET_BUF_64,
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
+
+		},
+#endif	/* of #if defined(NUM_MPF_NET_BUF_64) && NUM_MPF_NET_BUF_64 > 0 */
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(NUM_MPF_NET_BUF_CSEG) && NUM_MPF_NET_BUF_CSEG > 0
+	{
+		MPF_NET_BUF_CSEG,
+		IF_HDR_SIZE + IP_HDR_SIZE + TCP_HDR_SIZE,
+
+#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
+
+		NUM_MPF_NET_BUF_CSEG,
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
+
+		},
+#endif	/* of #if defined(NUM_MPF_NET_BUF_CSEG) && NUM_MPF_NET_BUF_CSEG > 0 */
+
+	};
+
+#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
+
+/*
+ *  nbuf_get_tbl -- ãããã¯ã¼ã¯ãããã¡ç®¡çè¡¨ãç²å¾ããã
+ *
+ *    æ³¨æ: ãããã¯ã¼ã¯çµ±è¨æ
+å ±ã®è¨æ¸¬ç¨
+ */
+
+const T_NET_BUF_ENTRY *
+nbuf_get_tbl (void)
+{
+	return net_buf_table;
+	}
+
+/*
+ *  nbuf_get_tbl_size -- ãããã¯ã¼ã¯ãããã¡ç®¡çã¨ã³ããªæ°ãç²å¾ããã
+ *
+ *    æ³¨æ: ãããã¯ã¼ã¯çµ±è¨æ
+å ±ã®è¨æ¸¬ç¨
+ */
+
+uint_t
+nbuf_get_tbl_size (void)
+{
+	return sizeof(net_buf_table) / sizeof(T_NET_BUF_ENTRY);
+	}
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
+
+/*
+ *  tget_net_buf_up -- å¤§ããªãµã¤ãºã®æ¹åã«æ¢ç´¢ãã¦ããããã¯ã¼ã¯ãããã¡ãç²å¾ããã
+ */
+
+static ER
+tget_net_buf_up (T_NET_BUF **buf, uint_t minlen, uint_t maxlen, TMO tmout)
+{
+	int_t	ix, req_ix;
+	ER	error = E_OK;
+
+	/* æé©ãªãµã¤ãºã®åºå®é·ã¡ã¢ãªãã¼ã«ãæ¢ãã*/
+	ix = sizeof(net_buf_table) / sizeof(T_NET_BUF_ENTRY);
+	while (ix -- > 0 && minlen > net_buf_table[ix].size)
+		;
+	req_ix = ix;
+
+	NET_COUNT_NET_BUF(net_buf_table[req_ix].requests, 1);
+
+	while (1) {
+		if ((error = tget_mpf((ID)net_buf_table[ix].index, (void*)buf, ix == 0 ? tmout : TMO_POL)) == E_OK) {
+			(*buf)->idix  = (uint8_t)ix;
+			(*buf)->len   = (uint16_t)minlen;
+			(*buf)->flags = 0;
+			NET_COUNT_NET_BUF(net_buf_table[ix].allocs, 1);
+			return error;
+			}
+		else if (ix == 0 || net_buf_table[ix].size > maxlen)
+			break;
+		ix --;
+		}
+
+	syslog(LOG_WARNING, "[NET BUF] busy, index=%d, len=%4d.", (uint16_t)req_ix, minlen);
+	*buf = NULL;
+	NET_COUNT_NET_BUF(net_buf_table[req_ix].errors, 1);
+	return error;
+	}
+
+/*
+ *  tget_net_buf_down -- å°ããªãµã¤ãºã®æ¹åã«æ¢ç´¢ãã¦ããããã¯ã¼ã¯ãããã¡ãç²å¾ããã
+ */
+
+static ER
+tget_net_buf_down (T_NET_BUF **buf, uint_t minlen, uint_t maxlen, TMO tmout)
+{
+	int_t	ix, req_ix;
+	ER	error = E_OK;
+
+	/* æé©ãªãµã¤ãºã®åºå®é·ã¡ã¢ãªãã¼ã«ãæ¢ãã*/
+	ix = sizeof(net_buf_table) / sizeof(T_NET_BUF_ENTRY);
+	while (ix -- > 0 && maxlen > net_buf_table[ix].size)
+		;
+	req_ix = ix;
+
+	NET_COUNT_NET_BUF(net_buf_table[req_ix].requests, 1);
+
+	while (1) {
+		if ((error = tget_mpf((ID)net_buf_table[ix].index, (void*)buf,
+		                      ix == sizeof(net_buf_table) / sizeof(T_NET_BUF_ENTRY) - 1 ? tmout : TMO_POL)) == E_OK) {
+			(*buf)->idix  = (uint8_t)ix;
+			(*buf)->len   = net_buf_table[ix].size;
+			(*buf)->flags = 0;
+			NET_COUNT_NET_BUF(net_buf_table[ix].allocs, 1);
+			return error;
+			}
+		ix ++;
+		if (ix == sizeof(net_buf_table) / sizeof(T_NET_BUF_ENTRY) || net_buf_table[ix].size < minlen)
+			break;
+		}
+
+	syslog(LOG_WARNING, "[NET BUF] busy, index=%d, len=%4d.", (uint16_t)req_ix, maxlen);
+	*buf = NULL;
+	NET_COUNT_NET_BUF(net_buf_table[req_ix].errors, 1);
+	return error;
+	}
+
+/*
+ *  tget_net_buf_ex -- ãããã¯ã¼ã¯ãããã¡ãç²å¾ããï¼æ¡å¼µæ©è½ï¼ã
+ */
+
+ER
+tget_net_buf_ex (T_NET_BUF **buf, uint_t minlen, uint_t maxlen, ATR nbatr, TMO tmout)
+{
+	/* æå°ãµã¤ãºãæå¤§ãµã¤ãºãè¶
+ãã¦ãããã¨ã©ã¼ */
+	if ((nbatr & NBA_SEARCH_DESCENT) != 0 && minlen > maxlen) {
+		syslog(LOG_WARNING, "[NET BUF] E_PAR, minlen=%4d > maxlen=%4d.", minlen, maxlen);
+		return E_PAR;
+		}
+
+	/* å²å½ã¦å¯è½ãªæå¤§ã®ãµã¤ãºãè¶
+ãã¦ãããã¨ã©ã¼ */
+	if (minlen > net_buf_table[0].size || maxlen > net_buf_table[0].size) {
+		syslog(LOG_WARNING, "[NET BUF] E_PAR, minlen=%4d or maxlen=%4d > %4d",
+		                    minlen, maxlen, net_buf_table[0].size);
+		return E_PAR;
+		}
+
+	/* TCP ã§äºç´ãããããã¯ã¼ã¯ãããã¡ãåãåºãã*/
+	if ((nbatr & NBA_RESERVE_TCP) != 0) {
+		if ((*buf = TCP_PULL_RES_NBUF(nbatr)) != NULL) {
+			return E_OK;
+			}
+		}
+
+	if ((nbatr & NBA_SEARCH_DESCENT) != 0)
+		return tget_net_buf_down(buf, minlen, maxlen, tmout);
+	else if ((nbatr & NBA_SEARCH_ASCENT) != 0)
+		return tget_net_buf_up(buf, minlen, (uint_t)net_buf_table[0].size, tmout);
+	else {
+		syslog(LOG_WARNING, "[NET BUF] E_PAR, nbatr=%08x.", nbatr);
+		return E_PAR;
+		}
+	}
+
+/*
+ *  tget_net_buf -- ãããã¯ã¼ã¯ãããã¡ãç²å¾ããï¼äºæï¼ã
+ */
+
+ER
+tget_net_buf (T_NET_BUF **buf, uint_t len, TMO tmout)
+{
+	return tget_net_buf_ex(buf, len, (uint_t)net_buf_table[0].size, NBA_SEARCH_ASCENT, tmout);
+	}
+
+/*
+ * rel_net_buf -- ãããã¯ã¼ã¯ãããã¡ãè¿å´ããã
+ */
+
+ER
+rel_net_buf (T_NET_BUF *buf)
+{
+	ER	error = E_OK;
+
+	/* ãããã¯ã¼ã¯ãããã¡ã® ID ã®æ­£å½æ§ãæ¤è¨¼ããã*/
+	if ((int_t)buf->idix >= (int_t)(sizeof(net_buf_table) / sizeof(T_NET_BUF_ENTRY))) {
+		syslog(LOG_WARNING, "[NET BUF] E_ID, ID=%d.", buf->idix);
+		error = E_ID;
+		}
+	else {
+
+		/* TCP ã§ããããã¯ã¼ã¯ãããã¡ãäºç´ããã*/
+		if (TCP_PUSH_RES_NBUF(buf) == NULL)
+			return E_OK;
+
+		/* åºå®ã¡ã¢ãªãã¼ã«ã«è¿ãã*/
+		if ((error = rel_mpf((ID)net_buf_table[buf->idix].index, buf)) != E_OK)
+			syslog(LOG_WARNING, "[NET BUF] %s, ID=%d.", itron_strerror(error), buf->idix);
+		}
+	return error;
+	}
+
+/*
+ * rus_net_buf -- ãããã¯ã¼ã¯ãããã¡ãåå©ç¨ããã
+ */
+
+ER
+rus_net_buf (T_NET_BUF *buf)
+{
+	ER	error = E_OK;
+
+	if (buf->idix >= sizeof(net_buf_table) / sizeof(T_NET_BUF_ENTRY)) {
+		syslog(LOG_WARNING, "[NET BUF] E_ID, ID=%d.", buf->idix);
+		error = E_ID;
+		}
+	else {
+		buf->len   = net_buf_table[buf->idix].size;
+		buf->flags = 0;
+		error = E_OK;
+		}
+	return error;
+	}
+
+/*
+ * net_buf_siz -- ãããã¯ã¼ã¯ãããã¡ã®ãµã¤ãºãè¿ãã
+ */
+
+ER_UINT
+net_buf_siz (T_NET_BUF *buf)
+{
+	if (buf->idix >= sizeof(net_buf_table) / sizeof(T_NET_BUF_ENTRY)) {
+		syslog(LOG_WARNING, "[BUF SIZ] E_ID, ID=%d.", buf->idix);
+		return E_ID;
+		}
+	else
+		return (ER_UINT)net_buf_table[buf->idix].size;
+	}
+
+/*
+ * net_buf_max_siz -- ãããã¯ã¼ã¯ãããã¡ã®æå¤§ãµã¤ãºãè¿ãã
+ */
+
+uint_t
+net_buf_max_siz (void)
+{
+	return (uint_t)net_buf_table[0].size;
+	}
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_buf.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_buf.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_buf.h	(revision 270)
@@ -0,0 +1,258 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _NET_BUF_H_
+#define _NET_BUF_H_
+
+/*
+ *  ãããã¯ã¼ã¯ãããã¡
+ *
+ *    4 ãªã¯ãããã§ã¢ã©ã¤ã³ããå¿
+è¦ã®ãããã­ã»ããµãèæ
+®ãã¦ã
+ *    IF ããããµã¤ãºã 4 ãªã¯ãããå¢çã§ãªãã®å ´åã
+ *    IP ãããä»¥éã 4 ãªã¯ãããå¢çã«èª¿æ´ããã
+ */
+
+#ifndef CPU_NET_ALIGN
+#error "CPU_NET_ALIGN expected."
+#endif
+
+/*
+ *  ãã³ãã¬ã¼ã
+ */
+
+struct t_net_buf {
+	uint16_t	len;	/* ãã¼ã¿ã®é·ã		*/
+	uint8_t		idix;	/* mpfid ã®ã¤ã³ããã¯ã¹	*/
+	uint8_t		flags;	/* ãã©ã°		*/
+#ifdef IF_ETHER_NIC_NET_BUF_ALIGN
+	uint8_t		nalign[IF_ETHER_NIC_NET_BUF_ALIGN];
+#endif
+#if CPU_NET_ALIGN == 4 && IF_HDR_ALIGN != 4
+	uint8_t		halign[4 - IF_HDR_ALIGN];
+#endif
+	uint8_t		buf[4];	/* ãããã¡æ¬ä½		*/
+	};
+
+#ifndef T_NET_BUF_DEFINED
+
+typedef struct t_net_buf T_NET_BUF;
+
+#define T_NET_BUF_DEFINED
+
+#endif	/* of #ifndef T_NET_BUF_DEFINED */
+/*
+ *  64 ãªã¯ããã
+ */
+
+typedef struct t_net_buf_64 {
+	uint16_t	len;	/* ãã¼ã¿ã®é·ã		*/
+	uint8_t		idix;	/* mpfid ã®ã¤ã³ããã¯ã¹	*/
+	uint8_t		flags;	/* ãã©ã°		*/
+#ifdef IF_ETHER_NIC_NET_BUF_ALIGN
+	uint8_t		nalign[IF_ETHER_NIC_NET_BUF_ALIGN];
+#endif
+#if CPU_NET_ALIGN == 4 && IF_HDR_ALIGN != 4
+	uint8_t		halign[4 - IF_HDR_ALIGN];
+#endif
+	uint8_t		buf[64]; /* ãããã¡æ¬ä½	*/
+	} T_NET_BUF_64;
+
+/*
+ *  128 ãªã¯ããã
+ */
+
+typedef struct t_net_buf_128 {
+	uint16_t	len;	/* ãã¼ã¿ã®é·ã		*/
+	uint8_t		idix;	/* mpfid ã®ã¤ã³ããã¯ã¹	*/
+	uint8_t		flags;	/* ãã©ã°		*/
+#ifdef IF_ETHER_NIC_NET_BUF_ALIGN
+	uint8_t		nalign[IF_ETHER_NIC_NET_BUF_ALIGN];
+#endif
+#if CPU_NET_ALIGN == 4 && IF_HDR_ALIGN != 4
+	uint8_t		halign[4 - IF_HDR_ALIGN];
+#endif
+	uint8_t		buf[128]; /* ãããã¡æ¬ä½	*/
+	} T_NET_BUF_128;
+
+/*
+ *  256 ãªã¯ããã
+ */
+
+typedef struct t_net_buf_256 {
+	uint16_t	len;	/* ãã¼ã¿ã®é·ã		*/
+	uint8_t		idix;	/* mpfid ã®ã¤ã³ããã¯ã¹	*/
+	uint8_t		flags;	/* ãã©ã°		*/
+#ifdef IF_ETHER_NIC_NET_BUF_ALIGN
+	uint8_t		nalign[IF_ETHER_NIC_NET_BUF_ALIGN];
+#endif
+#if CPU_NET_ALIGN == 4 && IF_HDR_ALIGN != 4
+	uint8_t		halign[4 - IF_HDR_ALIGN];
+#endif
+	uint8_t		buf[256]; /* ãããã¡æ¬ä½	*/
+	} T_NET_BUF_256;
+
+/*
+ *  512 ãªã¯ããã
+ */
+
+typedef struct t_net_buf_512 {
+	uint16_t	len;	/* ãã¼ã¿ã®é·ã		*/
+	uint8_t		idix;	/* mpfid ã®ã¤ã³ããã¯ã¹	*/
+	uint8_t		flags;	/* ãã©ã°		*/
+#ifdef IF_ETHER_NIC_NET_BUF_ALIGN
+	uint8_t		nalign[IF_ETHER_NIC_NET_BUF_ALIGN];
+#endif
+#if CPU_NET_ALIGN == 4 && IF_HDR_ALIGN != 4
+	uint8_t		halign[4 - IF_HDR_ALIGN];
+#endif
+	uint8_t		buf[512];/* ãããã¡æ¬ä½	*/
+	} T_NET_BUF_512;
+
+/*
+ *  1024 ãªã¯ããã
+ */
+
+typedef struct t_net_buf_1024 {
+	uint16_t	len;	/* ãã¼ã¿ã®é·ã		*/
+	uint8_t		idix;	/* mpfid ã®ã¤ã³ããã¯ã¹	*/
+	uint8_t		flags;	/* ãã©ã°		*/
+#ifdef IF_ETHER_NIC_NET_BUF_ALIGN
+	uint8_t		nalign[IF_ETHER_NIC_NET_BUF_ALIGN];
+#endif
+#if CPU_NET_ALIGN == 4 && IF_HDR_ALIGN != 4
+	uint8_t		halign[4 - IF_HDR_ALIGN];
+#endif
+	uint8_t		buf[1024]; /* ãããã¡æ¬ä½	*/
+	} T_NET_BUF_1024;
+
+/*
+ *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®æå¤§ PDU ãµã¤ãº
+ */
+
+typedef struct t_net_buf_if_pdu {
+	uint16_t	len;	/* ãã¼ã¿ã®é·ã		*/
+	uint8_t		idix;	/* mpfid ã®ã¤ã³ããã¯ã¹	*/
+	uint8_t		flags;	/* ãã©ã°		*/
+#ifdef IF_ETHER_NIC_NET_BUF_ALIGN
+	uint8_t		nalign[IF_ETHER_NIC_NET_BUF_ALIGN];
+#endif
+#if CPU_NET_ALIGN == 4 && IF_HDR_ALIGN != 4
+	uint8_t		halign[4 - IF_HDR_ALIGN];
+#endif
+	uint8_t		buf[IF_PDU_SIZE];
+				/* ãããã¡æ¬ä½		*/
+#if defined(IF_PDU_HDR_PADDING)
+	uint8_t		padding[IF_PDU_HDR_PADDING];
+#endif				/* ãããã®ä½å		*/
+	} T_NET_BUF_IF_PDU;
+
+/*
+ *  ãããã¯ã¼ã¯ãããã¡è¡¨
+ */
+
+typedef struct t_net_buf_entry {
+
+	uint16_t	index;
+	uint_t		size;
+
+#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
+
+	ulong_t		prepares;
+	ulong_t		requests;
+	ulong_t		allocs;
+	ulong_t		errors;
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
+
+	} T_NET_BUF_ENTRY;
+
+/*
+ *  ãããã¯ã¼ã¯ãããã¡ã»ãã©ã°	
+ */
+
+/*
+ *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹åºåå¾ã«ãããã¯ã¼ã¯ãããã¡ãéæ¾ããªãã
+ *  æ³¨æ: åºåå¾ã«ãã®ãã©ã°ã¯ã¯ãªã¢ãããã
+ */
+#define NB_FLG_NOREL_IFOUT	UINT_C(0x80)
+
+/*
+ *  ESP ç¨ãã©ã°
+ */
+#define NB_FLG_DECRYPED		UINT_C(0x40)
+
+/*
+ *  ãããã¯ã¼ã¯ãããã¡ç²å¾å±æ§
+ */
+
+/* æ¢ç´¢å±æ§ */
+
+#define NBA_SEARCH_ASCENT	UINT_C(0x1000)	/* å¤§ããªãµã¤ãºã®æ¹åã«æ¢ç´¢ããã	*/
+#define NBA_SEARCH_DESCENT	UINT_C(0x2000)	/* å°ããªãµã¤ãºã®æ¹åã«æ¢ç´¢ããã	*/
+#define NBA_RESERVE_TCP		UINT_C(0x4000)	/* TCP ç¨ã«ãããã¯ã¼ã¯ãããã¡ãäºç´ããã*/
+#define NBA_ID_MASK		UINT_C(0x0fff)	/* éä¿¡ç«¯ç¹ ID ãæ¸¡ãå ´åã®ãã¹ã¯å¤	*/
+
+/*
+ *  é¢æ°ã·ãã¥ã¬ã¼ã·ã§ã³ãã¯ã­
+ */
+
+#define get_net_buf(b,l)	tget_net_buf((b),(l),TMO_FEVR)
+
+/*
+ *  é¢æ°
+ */
+
+extern ER tget_net_buf_ex (T_NET_BUF **blk, uint_t minlen, uint_t maxlen, ATR nbatr, TMO tmout);
+extern ER tget_net_buf (T_NET_BUF **blk, uint_t len, TMO tmout);
+extern ER rel_net_buf (T_NET_BUF *blk);
+extern ER rus_net_buf (T_NET_BUF *blk);
+extern ER_UINT net_buf_siz (T_NET_BUF *blk);
+extern uint_t net_buf_max_siz (void);
+extern const T_NET_BUF_ENTRY *nbuf_get_tbl (void);
+extern uint_t nbuf_get_tbl_size (void);
+
+#endif	/* of #ifndef _NET_BUF_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_count.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_count.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_count.c	(revision 270)
@@ -0,0 +1,267 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* 
+ *  ãããã¯ã¼ã¯çµ±è¨æ
+å ±ã®è¨æ¸¬
+ */
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/net.h>
+#include <net/net_count.h>
+
+/*
+ *  è¨æ¸¬ç¨å¤æ°
+ */
+
+#ifdef SUPPORT_PPP
+
+#if NET_COUNT_ENABLE & PROTO_FLG_PPP
+
+T_NET_COUNT	net_count_ppp;
+T_NET_COUNT_VAL	net_count_ppp_no_bufs;		/* net_buf å²ãå½ã¦å¤±ææ°	*/
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_PPP_LCP
+
+T_NET_COUNT_VAL	net_count_ppp_lcp_in_octets;
+T_NET_COUNT_VAL	net_count_ppp_lcp_in_packets;
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_LCP */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPCP
+
+T_NET_COUNT_VAL	net_count_ppp_ipcp_in_octets;
+T_NET_COUNT_VAL	net_count_ppp_ipcp_in_packets;
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPCP */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_PPP_PAP
+
+T_NET_COUNT_VAL	net_count_ppp_upap_in_octets;
+T_NET_COUNT_VAL	net_count_ppp_upap_in_packets;
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_PAP */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_PPP_HDLC
+
+T_NET_COUNT	net_count_hdlc;
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_HDLC */
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#ifdef SUPPORT_LOOP
+
+#if NET_COUNT_ENABLE & PROTO_FLG_LOOP
+
+T_NET_COUNT	net_count_loop;
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_LOOP */
+
+#endif	/* of #ifdef SUPPORT_LOOP */
+
+#ifdef SUPPORT_ETHER
+
+#if NET_COUNT_ENABLE & PROTO_FLG_ETHER
+
+T_NET_COUNT	net_count_ether;
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_ETHER */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_ETHER_NIC
+
+T_NET_COUNT_VAL net_count_ether_nic[NC_ETHER_NIC_SIZE];
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_ETHER_NIC */
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#if defined(SUPPORT_INET4)
+
+#if NET_COUNT_ENABLE & PROTO_FLG_ARP
+
+T_NET_COUNT	net_count_arp;
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_ARP */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_IP4
+
+T_NET_COUNT_VAL net_count_ip4[NC_IP4_SIZE];
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_IP4 */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_ICMP4
+
+T_NET_COUNT	net_count_icmp4;
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_ICMP4 */
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+#if NET_COUNT_ENABLE & PROTO_FLG_IP6
+
+T_NET_COUNT_VAL net_count_ip6[NC_IP6_SIZE];
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_IP6 */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_ICMP6
+
+T_NET_COUNT_VAL	net_count_icmp6[NC_ICMP6_SIZE];
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_ICMP6 */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_ND6
+
+T_NET_COUNT_VAL	net_count_nd6[NC_ND6_SIZE];
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_ND6 */
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+#ifdef SUPPORT_TCP
+
+#if NET_COUNT_ENABLE & PROTO_FLG_TCP
+
+T_NET_COUNT_VAL net_count_tcp[NC_TCP_SIZE];
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_TCP */
+
+#endif	/* of #ifdef SUPPORT_TCP */
+
+#ifdef SUPPORT_UDP
+
+#if NET_COUNT_ENABLE & PROTO_FLG_UDP
+
+T_NET_COUNT	net_count_udp;
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_UDP */
+
+#endif	/* of #ifdef SUPPORT_PPP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_count.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_count.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_count.h	(revision 270)
@@ -0,0 +1,575 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _NET_COUNT_H_
+#define _NET_COUNT_H_
+
+/*
+ *  ãããã¯ã¼ã¯çµ±è¨æ
+å ±ã®è¨æ¸¬
+ */
+
+#if NET_COUNT_ENABLE != 0
+
+#ifndef _MACRO_ONLY
+
+#ifdef _int64_
+typedef uint64_t T_NET_COUNT_VAL;
+#else
+typedef uint32_t T_NET_COUNT_VAL;
+#endif
+
+typedef struct t_net_count {
+	T_NET_COUNT_VAL	in_octets;		/* åä¿¡ãªã¯ãããæ°	*/
+	T_NET_COUNT_VAL	out_octets;		/* éä¿¡ãªã¯ãããæ°	*/
+	T_NET_COUNT_VAL	in_packets;		/* åä¿¡ãã±ããæ°	*/
+	T_NET_COUNT_VAL	out_packets;		/* éä¿¡ãã±ããæ°	*/
+	T_NET_COUNT_VAL	in_err_packets;		/* åä¿¡ã¨ã©ã¼ãã±ããæ°	*/
+	T_NET_COUNT_VAL	out_err_packets;	/* éä¿¡ã¨ã©ã¼ãã±ããæ°	*/
+	} T_NET_COUNT;
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#endif	/* of #if NET_COUNT_ENABLE != 0 */
+
+#ifdef SUPPORT_PPP
+
+/* PPP */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_PPP
+
+#define NET_COUNT_PPP(v,c)	((v)+=(c))
+
+#ifndef _MACRO_ONLY
+
+extern T_NET_COUNT	net_count_ppp;
+extern T_NET_COUNT_VAL	net_count_ppp_no_bufs;	/* net_buf å²ãå½ã¦å¤±ææ°	*/
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#define NC_PPP_SIZE	7			/* ã«ã¦ã³ã¿æ° */
+
+#else	/* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP */
+
+#define NET_COUNT_PPP(v,c)
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP */
+
+/* PPP HDLC */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_PPP_HDLC
+
+#define NET_COUNT_PPP_HDLC(v,c)	((v)+=(c))
+
+#ifndef _MACRO_ONLY
+
+extern T_NET_COUNT	net_count_hdlc;
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#else	/* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_HDLC */
+
+#define NET_COUNT_PPP_HDLC(v,c)
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_HDLC */
+
+/* PPP LCP */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_PPP_LCP
+
+#define NET_COUNT_PPP_LCP(v,c)	((v)+=(c))
+
+#ifndef _MACRO_ONLY
+
+extern T_NET_COUNT_VAL net_count_ppp_lcp_in_octets;
+extern T_NET_COUNT_VAL net_count_ppp_lcp_in_packets;
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#else	/* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_LCP */
+
+#define NET_COUNT_PPP_LCP(v,c)
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_LCP */
+
+/* PPP IPCP */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPCP
+
+#define NET_COUNT_PPP_IPCP(v,c)	((v)+=(c))
+
+#ifndef _MACRO_ONLY
+
+extern T_NET_COUNT_VAL net_count_ppp_ipcp_in_octets;
+extern T_NET_COUNT_VAL net_count_ppp_ipcp_in_packets;
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#else	/* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPCP */
+
+#define NET_COUNT_PPP_IPCP(v,c)
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPCP */
+
+/* PPP CCP */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_PPP_CCP
+
+#define NET_COUNT_PPP_CCP(v,c)	((v)+=(c))
+
+#ifndef _MACRO_ONLY
+
+extern T_NET_COUNT_VAL net_count_ppp_ccp_in_octets;
+extern T_NET_COUNT_VAL net_count_ppp_ccp_in_packets;
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#else	/* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_CCP */
+
+#define NET_COUNT_PPP_CCP(v,c)
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_CCP */
+
+/* PPP PAP */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_PPP_PAP
+
+#define NET_COUNT_PPP_PAP(v,c)	((v)+=(c))
+
+#ifndef _MACRO_ONLY
+
+extern T_NET_COUNT_VAL net_count_ppp_upap_in_octets;
+extern T_NET_COUNT_VAL net_count_ppp_upap_in_packets;
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#else	/* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_PAP */
+
+#define NET_COUNT_PPP_PAP(v,c)
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_PAP */
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#ifdef SUPPORT_LOOP
+
+/* ã«ã¼ãããã¯ */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_LOOP
+
+#define NET_COUNT_LOOP(v,c)	((v)+=(c))
+
+#ifndef _MACRO_ONLY
+
+extern T_NET_COUNT	net_count_loop;
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#else	/* of #if NET_COUNT_ENABLE & PROTO_FLG_LOOP */
+
+#define NET_COUNT_LOOP(v,c)
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_LOOP */
+
+#endif	/* of #ifdef SUPPORT_LOOP */
+
+#ifdef SUPPORT_ETHER
+
+/* Ethernet */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_ETHER
+
+#define NET_COUNT_ETHER(v,c)	((v)+=(c))
+
+#ifndef _MACRO_ONLY
+
+extern T_NET_COUNT	net_count_ether;
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#else	/* of #if NET_COUNT_ENABLE & PROTO_FLG_ETHER */
+
+#define NET_COUNT_ETHER(v,c)
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_ETHER */
+
+/* NIC (if_ed) */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_ETHER_NIC
+
+#define NC_ETHER_NIC_RESETS		0	/* ãªã»ããæ°			*/
+#define NC_ETHER_NIC_TXB_QOVRS		1	/* éä¿¡ã»ããã©è³æºè¿å´ä¸éãªã¼ãã¼æ°*/
+#define NC_ETHER_NIC_TIMEOUTS		2	/* éä¿¡ã¿ã¤ã ã¢ã¦ãæ°		*/
+#define NC_ETHER_NIC_COLS		3	/* ã³ãªã¸ã§ã³æ°			*/
+#define NC_ETHER_NIC_OUT_ERR_PACKETS	4	/* éä¿¡ã¨ã©ã¼ãã±ããæ°		*/
+#define NC_ETHER_NIC_OUT_PACKETS	5	/* éä¿¡ãã±ããæ°		*/
+#define NC_ETHER_NIC_OUT_OCTETS		6	/* éä¿¡ãªã¯ãããæ°		*/
+#define NC_ETHER_NIC_RXB_QOVRS		7	/* åä¿¡ã»ããã©è³æºè¿å´ä¸éãªã¼ãã¼æ°*/
+#define NC_ETHER_NIC_NO_BUFS		8	/* net_buf å²ãå½ã¦å¤±ææ°	*/
+#define NC_ETHER_NIC_IN_ERR_PACKETS	9	/* åä¿¡ã¨ã©ã¼ãã±ããæ°		*/
+#define NC_ETHER_NIC_IN_PACKETS		10	/* åä¿¡ãã±ããæ°		*/
+#define NC_ETHER_NIC_IN_OCTETS		11	/* åä¿¡ãªã¯ãããæ°		*/
+#define NC_ETHER_NIC_SIZE		12	/* ã«ã¦ã³ã¿æ°			*/
+
+#define NET_COUNT_ETHER_NIC(v,c)	((v)+=(c))
+
+#ifndef _MACRO_ONLY
+
+extern T_NET_COUNT_VAL net_count_ether_nic[NC_ETHER_NIC_SIZE];
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#else	/* of #if NET_COUNT_ENABLE & PROTO_FLG_ETHER_NIC */
+
+#define NET_COUNT_ETHER_NIC(v,c)
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_ETHER_NIC */
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+/* ãããã¯ã¼ã¯ãããã¡ */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
+
+#define NET_COUNT_NET_BUF(v,c)		((v)+=(c))
+
+#else	/* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
+
+#define NET_COUNT_NET_BUF(v,c)
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
+
+#if defined(SUPPORT_INET4)
+
+/* ARP */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_ARP
+
+#define NET_COUNT_ARP(v,c)	((v)+=(c))
+
+#ifndef _MACRO_ONLY
+
+extern T_NET_COUNT	net_count_arp;
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#else	/* of #if NET_COUNT_ENABLE & PROTO_FLG_ARP */
+
+#define NET_COUNT_ARP(v,c)
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_ARP */
+
+/* IPv4 */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_IP4
+
+#define NC_IP4_FRAG_OUT_FRAGS		0	/* åå²éä¿¡ããã©ã°ã¡ã³ãæ°	*/
+#define NC_IP4_FRAG_OUT			1	/* åå²éä¿¡æ°			*/
+#define NC_IP4_OUT_ERR_PACKETS		2	/* éä¿¡ã¨ã©ã¼ãã¼ã¿ã°ã©ã æ°	*/
+#define NC_IP4_OUT_PACKETS		3	/* éä¿¡ãã¼ã¿ã°ã©ã æ°		*/
+#define NC_IP4_OUT_OCTETS		4	/* éä¿¡ãªã¯ãããæ°		*/
+#define NC_IP4_FRAG_IN_TMOUT		5	/* åå²åä¿¡ã¿ã¤ã ã¢ã¦ãæ°		*/
+#define NC_IP4_FRAG_IN_NO_BUF		6	/* åå²åä¿¡ãããã¡ãå½ã¦å¤±ææ°	*/
+#define NC_IP4_FRAG_IN_DROP		7	/* åå²åä¿¡ç ´æ£æ°		*/
+#define NC_IP4_FRAG_IN_OK		8	/* åå²åä¿¡åæ§ææåæ°		*/
+#define NC_IP4_FRAG_IN_FRAGS		9	/* åå²åä¿¡ãã©ã°ã¡ã³ãæ°		*/
+#define NC_IP4_FRAG_IN			10	/* åå²åä¿¡æ°			*/
+#define NC_IP4_OPTS			11	/* ãªãã·ã§ã³å
+¥åæ°		*/
+#define NC_IP4_IN_ERR_PROTO		12	/* ãã­ãã³ã«ã¨ã©ã¼æ°		*/
+#define NC_IP4_IN_ERR_ADDR		13	/* ã¢ãã¬ã¹ã¨ã©ã¼æ°		*/
+#define NC_IP4_IN_ERR_VER		14	/* ãã¼ã¸ã§ã³ã¨ã©ã¼æ°		*/
+#define NC_IP4_IN_ERR_SHORT		15	/* é·ãã¨ã©ã¼æ°			*/
+#define NC_IP4_IN_ERR_CKSUM		16	/* ãã§ãã¯ãµã ã¨ã©ã¼æ°		*/
+#define NC_IP4_IN_ERR_PACKETS		17	/* åä¿¡ã¨ã©ã¼ãã¼ã¿ã°ã©ã æ°	*/
+#define NC_IP4_IN_PACKETS		18	/* åä¿¡ãã¼ã¿ã°ã©ã æ°		*/
+#define NC_IP4_IN_OCTETS		19	/* åä¿¡ãªã¯ãããæ°		*/
+#define NC_IP4_SIZE			20	/* ã«ã¦ã³ã¿æ°			*/
+
+#define NET_COUNT_IP4(v,c)	((v)+=(c))
+
+#ifndef _MACRO_ONLY
+
+extern T_NET_COUNT_VAL net_count_ip4[NC_IP4_SIZE];
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#else	/* of #if NET_COUNT_ENABLE & PROTO_FLG_IP4 */
+
+#define NET_COUNT_IP4(v,c)
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_IP4 */
+
+/* ICMP4 */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_ICMP4
+
+#define NET_COUNT_ICMP4(v,c)	((v)+=(c))
+
+#ifndef _MACRO_ONLY
+
+extern T_NET_COUNT	net_count_icmp4;
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#else	/* of #if NET_COUNT_ENABLE & PROTO_FLG_ICMP4 */
+
+#define NET_COUNT_ICMP4(v,c)
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_ICMP4 */
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+/* IPv6 */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_IP6
+
+#define NC_IP6_FRAG_OUT_FRAGS		0	/* åå²éä¿¡ããã©ã°ã¡ã³ãæ°	*/
+#define NC_IP6_FRAG_OUT			1	/* åå²éä¿¡æ°			*/
+#define NC_IP6_OUT_ERR_PACKETS		2	/* éä¿¡ã¨ã©ã¼ãã¼ã¿ã°ã©ã æ°	*/
+#define NC_IP6_OUT_PACKETS		3	/* éä¿¡ãã¼ã¿ã°ã©ã æ°		*/
+#define NC_IP6_OUT_OCTETS		4	/* éä¿¡ãªã¯ãããæ°		*/
+#define NC_IP6_FRAG_IN_TMOUT		5	/* åå²åä¿¡ã¿ã¤ã ã¢ã¦ãæ°		*/
+#define NC_IP6_FRAG_IN_NO_BUF		6	/* åå²åä¿¡ãããã¡ãå½ã¦å¤±ææ°	*/
+#define NC_IP6_FRAG_IN_DROP		7	/* åå²åä¿¡ç ´æ£æ°		*/
+#define NC_IP6_FRAG_IN_OK		8	/* åå²åä¿¡åæ§ææåæ°		*/
+#define NC_IP6_FRAG_IN_FRAGS		9	/* åå²åä¿¡ãã©ã°ã¡ã³ãæ°		*/
+#define NC_IP6_FRAG_IN			10	/* åå²åä¿¡æ°			*/
+#define NC_IP6_IN_ERR_PROTO		11	/* ãã­ãã³ã«ã¨ã©ã¼æ°		*/
+#define NC_IP6_IN_ERR_ADDR		12	/* ã¢ãã¬ã¹ã¨ã©ã¼æ°		*/
+#define NC_IP6_IN_ERR_VER		13	/* ãã¼ã¸ã§ã³ã¨ã©ã¼æ°		*/
+#define NC_IP6_IN_ERR_SHORT		14	/* é·ãã¨ã©ã¼æ°			*/
+#define NC_IP6_IN_ERR_PACKETS		15	/* åä¿¡ã¨ã©ã¼ãã¼ã¿ã°ã©ã æ°	*/
+#define NC_IP6_IN_PACKETS		16	/* åä¿¡ãã¼ã¿ã°ã©ã æ°		*/
+#define NC_IP6_IN_OCTETS		17	/* åä¿¡ãªã¯ãããæ°		*/
+#define NC_IP6_SIZE			18	/* ã«ã¦ã³ã¿æ°			*/
+
+#define NET_COUNT_IP6(v,c)	((v)+=(c))
+
+#ifndef _MACRO_ONLY
+
+extern T_NET_COUNT_VAL net_count_ip6[NC_IP6_SIZE];
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#else	/* of #if NET_COUNT_ENABLE & PROTO_FLG_IP6 */
+
+#define NET_COUNT_IP6(v,c)
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_IP6 */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_ICMP6
+
+#define NC_ICMP6_OUT_ERR_PACKETS	0	/* éä¿¡ã¨ã©ã¼ ICMP ãã¼ã¿æ°	*/
+#define NC_ICMP6_OUT_PACKETS		1	/* éä¿¡ ICMP ãã¼ã¿æ°		*/
+#define NC_ICMP6_OUT_OCTETS		2	/* éä¿¡ ICMP ãªã¯ãããæ°		*/
+#define NC_ICMP6_IN_ERR_CKSUM		3	/* é·ãã¨ã©ã¼æ°			*/
+#define NC_ICMP6_IN_ERR_PACKETS		4	/* åä¿¡ã¨ã©ã¼ ICMP ãã¼ã¿æ°	*/
+#define NC_ICMP6_IN_PACKETS		5	/* åä¿¡ ICMP ãã¼ã¿æ°		*/
+#define NC_ICMP6_IN_OCTETS		6	/* åä¿¡ ICMP ãªã¯ãããæ°		*/
+#define NC_ICMP6_SIZE			7	/* ã«ã¦ã³ã¿æ°			*/
+
+#define NET_COUNT_ICMP6(v,c)	((v)+=(c))
+
+#ifndef _MACRO_ONLY
+
+extern T_NET_COUNT_VAL	net_count_icmp6[NC_ICMP6_SIZE];
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#else	/* of #if NET_COUNT_ENABLE & PROTO_FLG_ICMP6 */
+
+#define NET_COUNT_ICMP6(v,c)
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_ICMP6 */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_ND6
+
+#define NC_ND6_DAD_OUT_PACKETS		0	/* éè¤ã¢ãã¬ã¹æ¤åºéä¿¡æ°		*/
+#define NC_ND6_NS_OUT_PACKETS		1	/* è¿é£è¦è«éä¿¡æ°		*/
+#define NC_ND6_NS_IN_PACKETS		2	/* è¿é£è¦è«åä¿¡æ°		*/
+#define NC_ND6_NA_OUT_PACKETS		3	/* è¿é£éç¥éä¿¡æ°		*/
+#define NC_ND6_NA_IN_PACKETS		4	/* è¿é£éç¥åä¿¡æ°		*/
+#define NC_ND6_RS_OUT_PACKETS		5	/* ã«ã¼ã¿è¦è«åºåæ°		*/
+#define NC_ND6_RA_IN_PACKETS		6	/* ã«ã¼ã¿éç¥åä¿¡æ°		*/
+#define NC_ND6_SIZE			7	/* ã«ã¦ã³ã¿æ°			*/
+
+#define NET_COUNT_ND6(v,c)	((v)+=(c))
+
+#ifndef _MACRO_ONLY
+
+extern T_NET_COUNT_VAL	net_count_nd6[NC_ND6_SIZE];
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#else	/* of #if NET_COUNT_ENABLE & PROTO_FLG_ND6 */
+
+#define NET_COUNT_ND6(v,c)
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_ND6 */
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+#ifdef SUPPORT_TCP
+
+/* TCP */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_TCP
+
+#define NC_TCP_CONNECTS			0	/* è½åãªã¼ãã³æ°		*/
+#define NC_TCP_ACCEPTS			1	/* ååãªã¼ãã³æ°		*/
+#define NC_TCP_RTT_UPDATES		2	/* RTT æ´æ°æ°			*/
+#define NC_TCP_SEND_RSTS		3	/* éä¿¡ãRST æ°			*/
+#define NC_TCP_SEND_ACKS		4	/* éä¿¡ãACK æ°			*/
+#define NC_TCP_SEND_URG_SEGS		5	/* éä¿¡ãç·æ¥ã»ã°ã¡ã³ãæ°	*/
+#define NC_TCP_SEND_DATA_SEGS		6	/* éä¿¡ãã¼ã¿ã»ã°ã¡ã³ãæ°	*/
+#define NC_TCP_SEND_REXMIT_SEGS		7	/* åéä¿¡ã»ã°ã¡ã³ãæ°		*/
+#define NC_TCP_SEND_SEGS		8	/* éä¿¡ã»ã°ã¡ã³ãæ°		*/
+#define NC_TCP_SEND_CNTL_SEGS		9	/* éä¿¡å¶å¾¡ã»ã°ã¡ã³ãæ°		*/
+#define NC_TCP_SEND_DATA_OCTETS		10	/* éä¿¡ãã¼ã¿ãªã¯ãããæ°	*/
+#define NC_TCP_FREE_RCV_QUEUE		11	/* åä¿¡ã­ã¥ã¼è§£æ¾æ°		*/
+#define NC_TCP_RECV_DUP_SEGS		12	/* åä¿¡ãå¤éæ°			*/
+#define NC_TCP_RECV_DROP_SEGS		13	/* åä¿¡ãç ´æ£æ°			*/
+#define NC_TCP_RECV_RSTS		14	/* åä¿¡ãRST æ°			*/
+#define NC_TCP_RECV_DUP_ACKS		15	/* åä¿¡ãå¤é ACK æ°		*/
+#define NC_TCP_RECV_ACKS		16	/* åä¿¡ãACK æ°			*/
+#define NC_TCP_RECV_BAD_CKSUMS		17	/* åä¿¡ããã§ãã¯ãµã ä¸æ­£æ°	*/
+#define NC_TCP_RECV_BAD_HEADERS		18	/* åä¿¡ããããä¸æ­£æ°		*/
+#define NC_TCP_RECV_URG_SEGS		19	/* åä¿¡ãç·æ¥ã»ã°ã¡ã³ãæ°	*/
+#define NC_TCP_RECV_DATA_SEGS		20	/* åä¿¡ãã¼ã¿ã»ã°ã¡ã³ãæ°	*/
+#define NC_TCP_RECV_SEGS		21	/* åä¿¡ã»ã°ã¡ã³ãæ°		*/
+#define NC_TCP_RECV_DATA_OCTETS		22	/* åä¿¡ãã¼ã¿ãªã¯ãããæ°	*/
+#define NC_TCP_RECV_OCTETS		23	/* åä¿¡ãªã¯ãããæ°		*/
+#define NC_TCP_SIZE			24	/* ã«ã¦ã³ã¿æ°			*/
+
+#define NET_COUNT_TCP(v,c)	((v)+=(c))
+
+#ifndef _MACRO_ONLY
+
+extern T_NET_COUNT_VAL net_count_tcp[NC_TCP_SIZE];
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#else	/* of #if NET_COUNT_ENABLE & PROTO_FLG_TCP */
+
+#define NET_COUNT_TCP(v,c)
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_TCP */
+
+#endif	/* of #ifdef SUPPORT_TCP */
+
+#ifdef SUPPORT_UDP
+
+/* UDP */
+
+#if NET_COUNT_ENABLE & PROTO_FLG_UDP
+
+#define NET_COUNT_UDP(v,c)	((v)+=(c))
+
+#ifndef _MACRO_ONLY
+
+extern T_NET_COUNT	net_count_udp;
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#else	/* of #if NET_COUNT_ENABLE & PROTO_FLG_UDP */
+
+#define NET_COUNT_UDP(v,c)
+
+#endif	/* of #if NET_COUNT_ENABLE & PROTO_FLG_UDP */
+
+#endif	/* of #ifdef SUPPORT_UDP */
+
+#ifdef SUPPORT_MIB
+
+/*
+ *  SNMP ã® ç®¡çæ
+å ±ãã¼ã¹ (MIB)
+ */
+
+#define NET_COUNT_MIB(v, c)		((v)+=(c))
+
+#else	/* of #ifdef SUPPORT_MIB */
+
+#define NET_COUNT_MIB(v, c)
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+#endif	/* of #ifndef _NET_COUNT_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_jsp.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_jsp.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_jsp.cfg	(revision 270)
@@ -0,0 +1,167 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  JSPç¨ æ±ç¨ãããã¯ã¼ã¯ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+
+/*
+ *  å
+±é æ±ç¨ãããã¯ã¼ã¯ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®ã¤ã³ã¯ã«ã¼ã
+ */
+
+#include "net/net.cfg"
+
+/*
+ * ãããã¯ã¼ã¯ãããã¡
+ */
+
+#if defined(NUM_MPF_NET_BUF_CSEG) && NUM_MPF_NET_BUF_CSEG > 0
+CRE_MPF(MPF_NET_BUF_CSEG, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF_CSEG,
+		sizeof(T_NET_BUF_CSEG),
+		NULL
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF_CSEG) && NUM_MPF_NET_BUF_CSEG > 0 */
+
+#if defined(NUM_MPF_NET_BUF_64) && NUM_MPF_NET_BUF_64 > 0
+CRE_MPF(MPF_NET_BUF_64, {
+		TA_TFIFO, NUM_MPF_NET_BUF_64,
+		sizeof(T_NET_BUF_64),
+		NULL
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF_64) && NUM_MPF_NET_BUF_64 > 0 */
+
+#if defined(NUM_MPF_NET_BUF_128) && NUM_MPF_NET_BUF_128 > 0
+CRE_MPF(MPF_NET_BUF_128, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF_128,
+		sizeof(T_NET_BUF_128),
+		NULL
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF_128) && NUM_MPF_NET_BUF_128 > 0 */
+
+#if defined(NUM_MPF_NET_BUF_256) && NUM_MPF_NET_BUF_256 > 0
+CRE_MPF(MPF_NET_BUF_256, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF_256,
+		sizeof(T_NET_BUF_256),
+		NULL
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF_256) && NUM_MPF_NET_BUF_256 > 0 */
+
+#if defined(NUM_MPF_NET_BUF_512) && NUM_MPF_NET_BUF_512 > 0
+CRE_MPF(MPF_NET_BUF_512, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF_512,
+		sizeof(T_NET_BUF_512),
+		NULL
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF_512) && NUM_MPF_NET_BUF_512 > 0 */
+
+#if defined(NUM_MPF_NET_BUF_IP_MSS) && NUM_MPF_NET_BUF_IP_MSS > 0
+CRE_MPF(MPF_NET_BUF_IP_MSS, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF_IP_MSS,
+		sizeof(T_NET_BUF_IP_MSS),
+		NULL
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF_IP_MSS) && NUM_MPF_NET_BUF_IP_MSS > 0 */
+
+#if defined(NUM_MPF_NET_BUF_1024) && NUM_MPF_NET_BUF_1024 > 0
+CRE_MPF(MPF_NET_BUF_1024, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF_1024,
+		sizeof(T_NET_BUF_1024),
+		NULL
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF_1024) && NUM_MPF_NET_BUF_1024 > 0 */
+
+#if defined(NUM_MPF_NET_BUF_IPV6_MMTU) && NUM_MPF_NET_BUF_IPV6_MMTU > 0
+CRE_MPF(MPF_NET_BUF_IPV6_MMTU, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF_IPV6_MMTU,
+		sizeof(T_NET_BUF_IPV6_MMTU),
+		NULL
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF_IPV6_MMTU) && NUM_MPF_NET_BUF_IPV6_MMTU > 0 */
+
+#if defined(NUM_MPF_NET_BUF_IF_PDU) && NUM_MPF_NET_BUF_IF_PDU > 0
+CRE_MPF(MPF_NET_BUF_IF_PDU, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF_IF_PDU,
+		sizeof(T_NET_BUF_IF_PDU),
+		NULL
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF_IF_PDU) && NUM_MPF_NET_BUF_IF_PDU > 0 */
+
+#if defined(NUM_MPF_NET_BUF4_REASSM) && NUM_MPF_NET_BUF4_REASSM > 0
+CRE_MPF(MPF_NET_BUF_REASSM, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF4_REASSM,
+		sizeof(T_NET_BUF4_REASSM),
+		NULL
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF4_REASSM) && NUM_MPF_NET_BUF4_REASSM > 0 */
+
+#if defined(NUM_MPF_NET_BUF6_REASSM) && NUM_MPF_NET_BUF6_REASSM > 0
+CRE_MPF(MPF_NET_BUF_REASSM, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF6_REASSM,
+		sizeof(T_NET_BUF6_REASSM),
+		NULL
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF6_REASSM) && NUM_MPF_NET_BUF6_REASSM > 0 */
+
+#if defined(NUM_MPF_NET_BUF6_65536) && NUM_MPF_NET_BUF6_65536 > 0
+CRE_MPF(MPF_NET_BUF6_65536, {
+		TA_TFIFO,
+		NUM_MPF_NET_BUF6_65536,
+		sizeof(T_NET_BUF6_65536),
+		NULL
+		});
+#endif	/* of #if defined(NUM_MPF_NET_BUF6_65536) && NUM_MPF_NET_BUF6_65536 > 0 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_rename.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_rename.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_rename.h	(revision 270)
@@ -0,0 +1,183 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _NET_RENAME_H_
+#define _NET_RENAME_H_
+
+/*
+ *  æ±ç¨ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹å
+é¨åã®ãªãã¼ã 
+ */
+
+/* net/ethernet.c */
+
+#define ether_broad_cast_addr	_tinet_ether_broad_cast_addr
+#define ether_ipv4_addr_local	_tinet_ether_ipv4_addr_local
+#define ether_ipv4_addr_local_mask	\
+				_tinet_ether_ipv4_addr_local_mask
+
+#define ether_raw_output	_tinet_ether_raw_output
+#define ether_output		_tinet_ether_output
+#define ether_in6_ifaddr	_tinet_ether_in6_ifaddr
+#define ether_in6_ifaddr_list	_tinet_ether_in6_ifaddr_list
+#define ether_in6_resolve_multicast	\
+				_tinet_ether_in6_resolve_multicast
+#define ether_input_task	_tinet_ether_input_task
+#define ether_get_ifnet		_tinet_ether_get_ifnet
+#define ether_output_task	_tinet_ether_output_task
+
+/* net/if.c */
+
+#ifdef SUPPORT_ETHER
+
+#define ifinit			_tinet_ifinit
+#define if_addmulti		_tinet_if_addmulti
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+/* net/net_buf.c */
+
+#define tget_net_buf_ex		_tinet_tget_net_buf_ex
+#define tget_net_buf		_tinet_tget_net_buf
+#define rel_net_buf		_tinet_rel_net_buf
+#define rus_net_buf		_tinet_rus_net_buf
+#define net_buf_siz		_tinet_net_buf_siz
+#define net_buf_max_siz		_tinet_net_buf_max_siz
+#define nbuf_get_tbl		_tinet_nbuf_get_tbl
+#define nbuf_get_tbl_size	_tinet_nbuf_get_tbl_size
+
+/* net/net_subr.c */
+
+#define convert_hexdigit	_tinet_convert_hexdigit
+#define net_rand		_tinet_net_rand
+#define net_srand		_tinet_net_srand
+#define rev_memcpy_word		_tinet_rev_memcpy_word
+#define rev_memcmp_word		_tinet_rev_memcmp_word
+
+/* net/net_timer.c */
+
+#define timeout			_tinet_timeout
+#define untimeout		_tinet_untimeout
+#define busy_callout		_tinet_busy_callout
+#define max_busy		_tinet_max_busy
+
+/* route_cfg.c */
+
+#define routing_tbl		_tinet_routing_tbl
+
+#ifdef SUPPORT_PPP
+
+/* net/ppp.c */
+
+#define ppp_output		_tinet_ppp_output
+#define ppp_cp_output		_tinet_ppp_cp_output
+#define ppp_phase		_tinet_ppp_phase
+#define protocols		_tinet_protocols
+
+/* net/ppp_hdlc.c */
+
+#define HDLC_dummy_read		_tinet_HDLC_dummy_read
+#define HDLC_read		_tinet_HDLC_read
+#define HDLC_write		_tinet_HDLC_write
+#define remote_ACCM		_tinet_remote_ACCM
+
+/* net/ppp_lcp.c */
+
+#define lcp_close		_tinet_lcp_close
+#define lcp_open		_tinet_lcp_open
+#define lcp_lowerdown		_tinet_lcp_lowerdown
+#define lcp_sprotrej		_tinet_lcp_sprotrej
+#define lcp_lowerup		_tinet_lcp_lowerup
+#define lcp_finished		_tinet_lcp_finished
+#define lcp_down		_tinet_lcp_down
+#define lcp_callbacks		_tinet_lcp_callbacks
+#define lcp_fsm			_tinet_lcp_fsm
+#define lcp_protent		_tinet_lcp_protent
+#define lcp_local_ack_cfg	_tinet_lcp_local_ack_cfg
+#define lcp_remote_ack_cfg	_tinet_lcp_remote_ack_cfg
+
+/* net/ppp_fsm.c */
+
+#define fsm_init		_tinet_fsm_init
+#define fsm_open		_tinet_fsm_open
+#define fsm_input		_tinet_fsm_input
+#define fsm_protreject		_tinet_fsm_protreject
+#define fsm_lowerdown		_tinet_fsm_lowerdown
+#define fsm_close		_tinet_fsm_close
+#define fsm_lowerup		_tinet_fsm_lowerup
+#define ppp_open_mode		_tinet_ppp_open_mode
+
+/* net/ppp_auth.c */
+
+#define auth_reset		_tinet_auth_reset
+#define link_terminated		_tinet_link_terminated
+#define link_established	_tinet_link_established
+#define link_required		_tinet_link_required
+#define network_phase		_tinet_network_phase
+#define link_down		_tinet_link_down
+
+/* net/ppp_ipcp.c */
+
+#define wait_ipcp		_tinet_wait_ipcp
+#define ppp_get_ifnet		_tinet_ppp_get_ifnet
+#define ipcp_protent		_tinet_ipcp_protent
+#define ipcp_callbacks		_tinet_ipcp_callbacks
+#define ipcp_fsm		_tinet_ipcp_fsm
+#define ipcp_remote_ack_cfg	_tinet_ipcp_remote_ack_cfg
+#define ipcp_local_ack_cfg	_tinet_ipcp_local_ack_cfg
+
+/* net/ppp_upap.c */
+
+#define upap_auth_client	_tinet_upap_auth_client
+#define upap_auth_server	_tinet_upap_auth_server
+#define pap_protent		_tinet_pap_protent
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#ifdef SUPPORT_LOOP
+
+#endif	/* of #ifdef SUPPORT_LOOP */
+
+#endif	/* of #ifndef _NET_RENAME_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_subr.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_subr.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_subr.c	(revision 270)
@@ -0,0 +1,235 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* 
+ *  ãããã¯ã¼ã¯æ±ç¨ãµãã¼ãã«ã¼ãã³
+ */
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/net.h>
+
+/*
+ *  å¤æ°
+ */
+
+static uint32_t next = ULONG_C(1);
+
+/*
+ *  net_rand -- ä¹±æ°ãè¿ãã
+ */
+
+uint32_t
+net_rand (void)
+{
+	next = (next * 1103515245 + 12345) % (ULONG_C(0x7fffffff) + 1);
+	return next;
+	}
+
+/*
+ *  srand -- ä¹±æ°ãåæåããã
+ */
+
+void
+net_srand (uint32_t seed)
+{
+	next += seed;
+	}
+
+/*
+ *  convert_hexdigit -- 16é²æ°âæå­åå¤æ
+ */
+
+int_t
+convert_hexdigit (char *buf, uint_t val, int_t radix, int_t width, char padchar)
+{
+	static const char radhex[] = "0123456789abcdef";
+
+	char	digits[11], *start;
+	int_t	ix, pad;
+
+	ix = 0;
+	start = buf;
+	do {
+		digits[ix ++] = radhex[(val % radix) & 0x0f];
+		val /= radix;
+		} while (val != 0);
+	for (pad = ix; pad < width; pad ++)
+		*buf ++ = padchar;
+	while (ix -- > 0)
+		*buf ++ = digits[ix];
+	*buf = '\0';
+	return (int_t)(buf - start);
+	}
+
+#ifdef SUPPORT_ETHER
+
+/*
+ *  mac2str -- MAC ã¢ãã¬ã¹ãæå­åã«å¤æããã
+ */
+
+char *
+mac2str (char *buf, uint8_t *macaddr)
+{
+	static char	addr_sbuf[NUM_MACADDR_STR_BUFF][sizeof("00:00:00:00:00:00")];
+	static int_t	bix = NUM_MACADDR_STR_BUFF;
+
+	char *start;
+
+	if (buf == NULL) {
+		syscall(wai_sem(SEM_MAC2STR_BUFF_LOCK));
+		buf = addr_sbuf[-- bix];
+		if (bix <= 0)
+			bix = NUM_MACADDR_STR_BUFF;
+		syscall(sig_sem(SEM_MAC2STR_BUFF_LOCK));
+		}
+
+	start = buf;
+	buf += convert_hexdigit(buf, (uint_t)(*macaddr ++), 16, 2, '0');
+	*(buf ++) = ':';
+	buf += convert_hexdigit(buf, (uint_t)(*macaddr ++), 16, 2, '0');
+	*(buf ++) = ':';
+	buf += convert_hexdigit(buf, (uint_t)(*macaddr ++), 16, 2, '0');
+	*(buf ++) = ':';
+	buf += convert_hexdigit(buf, (uint_t)(*macaddr ++), 16, 2, '0');
+	*(buf ++) = ':';
+	buf += convert_hexdigit(buf, (uint_t)(*macaddr ++), 16, 2, '0');
+	*(buf ++) = ':';
+	buf += convert_hexdigit(buf, (uint_t)(*macaddr ++), 16, 2, '0');
+	*buf = '\0';
+	return start;
+	}
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#if _NET_CFG_BYTE_ORDER == _NET_CFG_LITTLE_ENDIAN
+
+/*
+ *  rev_memcpy_word -- åè»¢ã¡ã¢ãªã³ãã¼ï¼4 ãã¤ãï¼
+ *
+ *    ãã¤ãåä½ã«ã¢ã¯ã»ã¹ããäºã«ããã
+ *    å¢çã¸ã®ã¢ã©ã¤ã³ã®åé¡ãè§£æ±ºããã
+ */
+
+void
+rev_memcpy_word (uint8_t *dst, uint8_t *src)
+{
+	*(dst    ) = *(src + 3);
+	*(dst + 1) = *(src + 2);
+	*(dst + 2) = *(src + 1);
+	*(dst + 3) = *(src    );
+	}
+
+/*
+ *  rev_memcmp_word -- åè»¢ã¡ã¢ãªæ¯è¼ï¼4 ãã¤ãï¼
+ *
+ *    ãã¤ãåä½ã«ã¢ã¯ã»ã¹ããäºã«ããã
+ *    å¢çã¸ã®ã¢ã©ã¤ã³ã®åé¡ãè§£æ±ºããã
+ */
+
+int_t
+rev_memcmp_word (uint8_t *data1, uint8_t *data2)
+{
+	int_t	ix, diff;
+
+	for (ix = 4; ix -- > 0; ) {
+		diff = *(data1 + ix) -  *(data2 + (3 - ix));
+		if (diff != 0)
+			return diff;
+		}
+	return 0;
+	}
+
+#endif	/* of #if _NET_CFG_BYTE_ORDER == _NET_CFG_LITTLE_ENDIAN */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_timer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_timer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_timer.c	(revision 270)
@@ -0,0 +1,251 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+
+#include <netinet/in.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet/tcp_timer.h>
+
+/*
+ *  å¤æ°
+ */
+
+static T_NET_CALLOUT callout[NUM_NET_CALLOUT];
+
+/*
+ *  å¼åºãã¨ã³ããªç»é²
+ */
+
+void
+timeout (callout_func func, void *arg, RELTIM timeout)
+{
+	int_t ix;
+
+	/* å¼åºãã¨ã³ããªãç²å¾ãã */
+	syscall(wai_sem(SEM_CALL_OUT_LOCK));
+	for (ix = NUM_NET_CALLOUT; callout[-- ix].func != NULL; )
+		if (ix == 0) {
+			syslog(LOG_WARNING, "[NET] callout busy, size=%d.", NUM_NET_CALLOUT);
+			syscall(sig_sem(SEM_CALL_OUT_LOCK));
+			return;
+			}
+
+	/* å¼åºãã¨ã³ããªãè¨­å®ãã */
+	callout[ix].func	= func;
+	callout[ix].arg		= arg;
+	callout[ix].timeout	= timeout;
+	syscall(sig_sem(SEM_CALL_OUT_LOCK));
+	}
+
+/*
+ *  å¼åºãã¨ã³ããªåé¤
+ */
+
+void
+untimeout (callout_func func, void *arg)
+{
+	int_t ix;
+
+	/* ã¨ã³ããªãæ¢ã */
+	for (ix = NUM_NET_CALLOUT; ix -- > 0; ) {
+		syscall(wai_sem(SEM_CALL_OUT_LOCK));
+		if (callout[ix].func == func && callout[ix].arg == arg && callout[ix].timeout > 0) {
+			callout[ix].func = NULL;
+			syscall(sig_sem(SEM_CALL_OUT_LOCK));
+			break;
+			}
+		syscall(sig_sem(SEM_CALL_OUT_LOCK));
+		}
+	}
+
+/*
+ *  ãããã¯ã¼ã¯ã¿ã¤ãã¿ã¹ã¯
+ *
+ *    æ³¨æ: ã¿ã¹ã¯ã³ã³ãã­ã¹ãã§å®è¡ããå¿
+è¦ãããããï¼
+ *          å¨æãã³ãã©ã¯ä½¿ç¨ã§ããªãã
+ */
+
+static char const tinet_banner[] =
+"\n"
+"TINET %d.%d.%d (" __DATE__ ", " __TIME__ ")\n"
+"Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering\n"
+"                    Tomakomai National College of Technology, JAPAN\n";
+
+void
+net_timer_task(intptr_t exinf)
+{
+	ID		tskid;
+	int_t		ix;
+	callout_func	func;
+	void 		*arg;
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, tinet_banner,
+	       (TINET_PRVER   >> 12) & UINT_C(0x0f),
+	       (TINET_PRVER   >>  4) & UINT_C(0x0f),
+	        TINET_PRVER          & UINT_C(0x0f));
+	syslog(LOG_NOTICE, "[NET/TIMER:%d] started.", tskid);
+
+	/* IP ãåæåããã*/
+	IP_INIT();
+
+#ifdef SUPPORT_TCP
+
+	/* TCP åºåã¿ã¹ã¯ãèµ·åãã */
+	syscall(act_tsk(TCP_OUTPUT_TASK));
+
+#endif	/* of #ifdef SUPPORT_TCP */
+
+#if defined(SUPPORT_UDP) && defined(UDP_CFG_NON_BLOCKING)
+
+	/* UDP åºåã¿ã¹ã¯ãèµ·åãã */
+	syscall(act_tsk(UDP_OUTPUT_TASK));
+
+#endif	/* of #if defined(SUPPORT_UDP) && defined(UDP_CFG_NON_BLOCKING) */
+
+	while (true) {
+		/* ã¿ã¤ã ã¢ã¦ãããã¨ã³ããªãå¼åºãã*/
+		syscall(wai_sem(SEM_CALL_OUT_TIMEOUT));
+		for (ix = NUM_NET_CALLOUT; ix -- > 0; ) {
+			syscall(wai_sem(SEM_CALL_OUT_LOCK));
+			if (callout[ix].func != NULL && callout[ix].timeout == 0) {
+				func = callout[ix].func;
+				arg  = callout[ix].arg;
+				callout[ix].func = NULL;
+				syscall(sig_sem(SEM_CALL_OUT_LOCK));
+				(func)(arg);
+				}
+			else
+				syscall(sig_sem(SEM_CALL_OUT_LOCK));
+			}
+		}
+	}
+
+/*
+ *  ãããã¯ã¼ã¯ã¿ã¤ããã³ãã©
+ *
+ *    NET_TIMER_CYCLE (100ms) æ¯ã«å¼åºãããã
+ */
+
+void
+net_timer_handler(intptr_t exinf)
+{
+	int_t	ix, count = 0;
+
+	for (ix = NUM_NET_CALLOUT; ix -- > 0; ) {
+		if (callout[ix].func != NULL && callout[ix].timeout > 0) {
+			callout[ix].timeout --;
+			if (callout[ix].timeout == 0)
+				count ++;
+			}
+		}
+
+	if (count)
+		syscall(isig_sem(SEM_CALL_OUT_TIMEOUT));
+	}
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_timer.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_timer.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_timer.h	(revision 270)
@@ -0,0 +1,130 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _NET_TIMER_H_
+#define _NET_TIMER_H_
+
+#include <tinet_kernel_defs.h>	/* ã«ã¼ãã«ã«é¢ããäºææ§å®ç¾©ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ãããã*/
+
+/*
+ *  TOPPERS/JSP ã«ã¼ãã«ãã·ã¹ãã æå» (SYSTIM) ã®å¨æ³¢æ°
+ */
+
+#define SYSTIM_HZ		ULONG_C(1000*1000)	/* [ms]					*/
+
+/*
+ *  ãããã¯ã¼ã¯ã¿ã¤ãã®å®ç¾©
+ */
+
+#define NET_TIMER_CYCLE		ULONG_C(100)	/* [ms]ãfast timeout ä½¿ç¨æã®åä½å¨æ	*/
+						/* ã¿ã¤ãã®å¨æ³¢æ°			*/
+#define NET_TIMER_HZ		(SYSTIM_HZ/NET_TIMER_CYCLE)
+
+#ifdef SUPPORT_INET6
+#define NUM_NET_CALLOUT		12		/* ã¿ã¤ã ã¢ã¦ãå¼åºãæ°ã10 ä»¥ä¸	*/
+#else
+#define NUM_NET_CALLOUT		10		/* ã¿ã¤ã ã¢ã¦ãå¼åºãæ°ã10 ä»¥ä¸	*/
+#endif
+
+/*
+ *  ã¿ã¤ã ã¢ã¦ãå¼åºãã¨ã³ããª
+ */
+
+typedef void	(*callout_func)(void*);
+
+typedef struct t_net_callout {
+	callout_func	func;		/* å¼åºãé¢æ°		*/
+	void		*arg;		/* é¢æ°ã¸ã®å¼æ°		*/
+	RELTIM		timeout;	/* ã¿ã¤ã ã¢ã¦ã		*/
+	} T_NET_CALLOUT;
+
+/*
+ *  é¢æ°
+ */
+
+extern void timeout (callout_func func, void *arg, RELTIM timeout);
+extern void untimeout (callout_func func, void *arg);
+
+/*
+ *  ãããã¯ã¼ã¯ã¿ã¤ãã¿ã¹ã¯ã¨å¨æãã³ãã©
+ */
+
+extern void net_timer_task(intptr_t exinf);
+extern void net_timer_handler(intptr_t exinf);
+
+#endif	/* of #ifndef _NET_TIMER_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_var.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_var.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_var.h	(revision 270)
@@ -0,0 +1,95 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _NET_VAR_H_
+#define _NET_VAR_H_
+
+/*
+ *  é¢æ°
+ */
+
+extern int_t convert_hexdigit (char *buf, uint_t val, int_t radix, int_t width, char padchar);
+
+/*
+ *  é¢æ°
+ */
+
+extern uint32_t net_rand (void);
+extern void net_srand (uint32_t seed);
+
+#endif	/* of #ifndef _NET_VAR_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp.c	(revision 270)
@@ -0,0 +1,426 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1989 Carnegie Mellon University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by Carnegie Mellon University.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/*
+ *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
+ *
+ *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the Internet Initiative Japan.  The name of the
+ * IIJ may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/* 
+ *  PPP å¦çã¿ã¹ã¯ã®æ¬ä½
+ */
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+#include <net/ppp.h>
+#include <net/ppp_var.h>
+#include <net/ppp_hdlc.h>
+#include <net/ppp_fsm.h>
+#include <net/ppp_lcp.h>
+#include <net/ppp_ipcp.h>
+#include <net/ppp_ccp.h>
+#include <net/ppp_upap.h>
+#include <net/ppp_modem.h>
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+uint8_t	ppp_phase = PPP_PHASE_INITIALIZE;	/* ãªã³ã¯ã®ç¶æ
+		*/
+
+/*
+ *  ãã­ãã³ã«è¡¨
+ */
+
+T_PPP_PROTENT *protocols[] = {
+	&lcp_protent,
+	&ipcp_protent,
+
+#ifdef SUPPORT_CCP
+	&ccp_protent,
+#endif	/* #ifdef SUPPORT_CCP */
+
+#ifdef LCP_CFG_PAP
+	&pap_protent,
+#endif	/* #ifdef LCP_CFG_PAP */
+
+#ifdef LCP_CFG_CHAP
+	&chap_protent,
+#endif	/* #ifdef LCP_CFG_CHAP */
+
+	NULL
+	};
+
+/*
+ *  å¤æ°
+ */
+
+#ifdef PPP_IDLE_TIMEOUT
+
+static bool_t idle = false;
+
+#endif	/* of #ifdef PPP_IDLE_TIMEOUT */
+
+/*
+ *  é¢æ°
+ */
+
+static void parse_input (T_NET_BUF *input);
+
+#ifdef PPP_IDLE_TIMEOUT
+
+static void idle_timeout (void *arg);
+
+#endif	/* of #ifdef PPP_IDLE_TIMEOUT */
+
+/*
+ *  PPP å
+¥åã®è§£æ
+ */
+
+static void
+parse_input(T_NET_BUF *input)
+{
+	T_PPP_PROTENT	*entry;
+	int_t		ix;
+	uint16_t	proto;
+
+	NET_COUNT_PPP(net_count_ppp.in_octets,  input->len);
+	NET_COUNT_PPP(net_count_ppp.in_packets, 1);
+
+	/* ãã¬ã¼ã é·ããã§ãã¯ãã */
+	if (input->len < sizeof(T_PPP_HDR)) {	/* FreeBSD ã§ã¯ PPP_HDRLEN ã¯ 4 */
+		syslog(LOG_NOTICE, "[PPP] recv short frame.");
+		goto buf_rel;
+		}
+
+	proto = ntohs(*GET_PPP_HDR(input));
+
+	/* ãã­ãã³ã«ã LCP ä»¥å¤ã§ãLCP ããªã¼ãã³ããã¦ããªããã°ã¨ã©ã¼ */
+	if (proto != PPP_LCP && lcp_fsm.state != PPP_FSM_OPENED) {
+		syslog(LOG_NOTICE, "[PPP] LCP not open.");
+		goto buf_rel;
+		}
+
+	/* ãªã³ã¯ãèªè¨¼ç¶æ
+ä»¥åã¯ãLCPãLQRãPAPãCHAP ã®ã¿åãä»ãã */
+	if (ppp_phase <= PPP_PHASE_AUTHENTICATE &&
+	    !(proto == PPP_LCP || proto == PPP_LQR ||
+	      proto == PPP_PAP || proto == PPP_CHAP)) {
+		syslog(LOG_NOTICE, "[PPP] disc proto: 0x%04x, phase: %d.", proto, ppp_phase);
+		goto buf_rel;
+		}
+
+	/* ä¸ä½ãã­ãã³ã«ã®å
+¥åé¢æ°ãå¼åºã */
+	for (ix = 0; (entry = protocols[ix]) != NULL; ix ++) {
+		if (entry->proto == proto && entry->input != NULL) {
+			(*entry->input)(input);
+			syscall(rel_net_buf(input));
+			return;
+			}
+		if ((entry->proto & ~0x8000) == proto && entry->datainput != NULL) {
+			(*entry->datainput)(input);
+			return;
+			}
+		}
+
+	syslog(LOG_INFO, "[PPP] unexp proto: 0x%04x.", proto);
+	lcp_sprotrej(input);
+
+buf_rel:
+	NET_COUNT_PPP(net_count_ppp.in_err_packets, 1);
+	syscall(rel_net_buf(input));
+	}
+
+/*
+ *  ppp_output -- PPP ã¤ã³ã¿ãã§ã¼ã¹ã®åºåé¢æ°
+ */
+
+ER
+ppp_output (T_NET_BUF *output, TMO tmout)
+{
+	ER error = E_OK;
+
+#ifdef PPP_CFG_MODEM
+
+#if 0	/* ä¿ç */
+	/* ã¢ãã ã®æ¥ç¶å®äºã¾ã§å¾
+ã¤ã*/
+	if ((error = wait_modem()) != E_OK)
+		goto buf_ret;
+#endif
+
+#endif	/* of #ifdef PPP_CFG_MODEM */
+
+	/* IPCP ã®æ¥ç¶å®äºã¾ã§å¾
+ã¤ã*/
+	if ((error = wait_ipcp()) != E_OK)
+		goto buf_ret;
+
+#ifdef PPP_IDLE_TIMEOUT
+	wai_sem(SEM_IDLE_TIMEOUT);
+	if (idle) {
+		untimeout((FP)idle_timeout, NULL);
+		idle = false;
+		}
+	sig_sem(SEM_IDLE_TIMEOUT);
+#endif	/* of #ifdef PPP_IDLE_TIMEOUT */
+
+	/* PPP åºåã­ã¥ã¼ã«æå
+¥ããã*/
+	if ((error = tsnd_dtq(DTQ_PPP_OUTPUT, output, tmout)) != E_OK)
+		goto buf_ret;
+
+#ifdef PPP_IDLE_TIMEOUT
+	wai_sem(SEM_IDLE_TIMEOUT);
+	if (!idle && ppp_phase == PPP_PHASE_NETWORK) {
+		timeout((FP)idle_timeout, NULL, PPP_IDLE_TIMEOUT);
+		idle = true;
+		}
+	sig_sem(SEM_IDLE_TIMEOUT);
+#endif	/* of #ifdef PPP_IDLE_TIMEOUT */
+
+	return error;
+
+buf_ret:
+	syscall(rel_net_buf(output));
+	NET_COUNT_PPP(net_count_ppp.out_err_packets, 1);
+	return error;
+	}
+
+/*
+ *  ppp_cp_output -- CP ãã¬ã¼ã ã®éä¿¡
+ */
+
+void
+ppp_cp_output (uint8_t code, uint8_t id, T_NET_BUF *output)
+{
+	T_PPP_CP_HDR	*cph;
+
+	/* CP ããããè¨­å®ãã */
+	cph = GET_PPP_CP_HDR(output);
+	cph->code = code;
+	cph->id   = id;
+	cph->len  = htons(output->len - sizeof(T_PPP_HDR));
+
+	/* PPP åºåã­ã¥ã¼ã«æå
+¥ããã*/
+	if (snd_dtq(DTQ_PPP_OUTPUT, output) != E_OK) {
+		syscall(rel_net_buf(output));
+		NET_COUNT_PPP(net_count_ppp.out_err_packets, 1);
+		}
+	}
+
+/*
+ *  PPP å
+¥åã¿ã¹ã¯
+ */
+
+void
+ppp_input_task(intptr_t exinf)
+{
+	T_NET_BUF	*input;
+	T_PPP_PROTENT	*proto;
+	ID		tskid;
+	int_t		ix;
+
+	/* ãã¼ããåæè¨­å®ãã */
+	syscall(serial_opn_por(HDLC_PORTID));
+	syscall(serial_ctl_por(HDLC_PORTID, IOCTL_FCSND | IOCTL_FCRCV));
+
+	get_tid(&tskid);
+
+#ifdef PPP_CFG_MODEM
+
+	init_modem();
+	syslog(LOG_NOTICE, "[PPP INPUT:%d] started with modem on port %d.", tskid, HDLC_PORTID);
+
+#else	/* of #ifdef PPP_CFG_MODEM */
+
+	syslog(LOG_NOTICE, "[PPP INPUT:%d] started on port %d.", tskid, HDLC_PORTID);
+
+#endif	/* of #ifdef PPP_CFG_MODEM */
+
+	/* ãããã¯ã¼ã¯ã¿ã¤ãã¿ã¹ã¯ãèµ·åãã */
+	syscall(act_tsk(NET_TIMER_TASK));
+
+	/* ä¸ä½ãã­ãã³ã«ãåæåãã */
+	for (ix = 0; (proto = protocols[ix]) != NULL; ix ++)
+		if (proto->init != NULL)
+			(*proto->init)();
+
+	lcp_lowerup();
+	lcp_open(PPP_OPEN_PASSIVE);
+
+	/* PPP åºåã¿ã¹ã¯ãèµ·åãã */
+	syscall(act_tsk(PPP_OUTPUT_TASK));
+
+	while (true) {
+		if (tget_net_buf(&input, IF_PDU_SIZE, TMO_PPP_GET_NET_BUF) == E_OK) {
+			while (HDLC_read(input, IF_PDU_SIZE) != E_OK)
+				;
+			if (input->len > 0) {
+
+	#ifdef PPP_IDLE_TIMEOUT
+				wai_sem(SEM_IDLE_TIMEOUT);
+				if (idle && ntohs(*GET_PPP_HDR(input)) != PPP_LCP) {
+					untimeout((FP)idle_timeout, NULL);
+					idle = false;
+					}
+				sig_sem(SEM_IDLE_TIMEOUT);
+	#endif	/* of #ifdef PPP_IDLE_TIMEOUT */
+
+				parse_input(input);
+				}
+			else
+				syscall(rel_net_buf(input));
+
+	#ifdef PPP_IDLE_TIMEOUT
+			wai_sem(SEM_IDLE_TIMEOUT);
+			if (!idle && ppp_phase == PPP_PHASE_NETWORK) {
+				timeout((FP)idle_timeout, NULL, PPP_IDLE_TIMEOUT);
+				idle = true;
+				}
+			else if (idle && ppp_phase != PPP_PHASE_NETWORK) {
+				untimeout((FP)idle_timeout, NULL);
+				idle = false;
+				}
+			sig_sem(SEM_IDLE_TIMEOUT);
+	#endif	/* of #ifdef PPP_IDLE_TIMEOUT */
+
+			}
+		else {
+			HDLC_dummy_read();
+			NET_COUNT_PPP(net_count_ppp.in_err_packets, 1);
+			NET_COUNT_PPP(net_count_ppp_no_bufs, 1);
+			}
+		}
+	}
+
+/*
+ *  PPP åºåã¿ã¹ã¯
+ */
+
+void
+ppp_output_task(intptr_t exinf)
+{
+	T_NET_BUF	*output;
+	ID		tskid;
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[PPP OUTPUT:%d] started.", tskid);
+
+	while (true) {
+		while (rcv_dtq(DTQ_PPP_OUTPUT, (intptr_t*)&output) == E_OK) {
+			NET_COUNT_PPP(net_count_ppp.out_octets,  output->len);
+			NET_COUNT_PPP(net_count_ppp.out_packets, 1);
+			syscall(HDLC_write(output));
+			syscall(rel_net_buf(output));
+			}
+		}
+	}
+
+#ifdef PPP_IDLE_TIMEOUT
+
+/*
+ *  ã¢ã¤ãã«ã¿ã¤ã ã¢ã¦ãå¦ç
+ */
+
+static void
+idle_timeout (void *arg)
+{
+	syslog(LOG_NOTICE, "[PPP] idel %d [s], disconnecting.", (uint16_t)(PPP_IDLE_TIMEOUT / NET_TIMER_HZ));
+	lcp_close();
+	}
+
+#endif	/* of #ifdef PPP_IDLE_TIMEOUT */
+
+#endif	/* fo #ifdef SUPPORT_PPP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp.cfg	(revision 270)
@@ -0,0 +1,79 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  PPP ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef SUPPORT_PPP
+
+CRE_TSK(PPP_OUTPUT_TASK, {
+	TA_HLNG,
+	0,
+	ppp_output_task,
+	PPP_OUTPUT_PRIORITY,
+	PPP_OUTPUT_STACK_SIZE,
+	NULL
+	});
+
+CRE_TSK(PPP_INPUT_TASK, {
+	TA_HLNG|TA_ACT,
+	0,
+	ppp_input_task,
+	PPP_INPUT_PRIORITY,
+	PPP_INPUT_STACK_SIZE,
+	NULL
+	});
+
+CRE_DTQ(DTQ_PPP_OUTPUT,  { TA_TFIFO, NUM_DTQ_PPP_OUTPUT,  NULL });
+
+CRE_SEM(SEM_MODEM_READY, { TA_TPRI, 0, 1 });
+CRE_SEM(SEM_IPCP_READY,  { TA_TPRI, 0, 1 });
+
+#ifdef PPP_IDLE_TIMEOUT
+CRE_SEM(SEM_IDLE_TIMEOUT,{ TA_TPRI, 1, 1 });
+#endif	/* of #ifdef PPP_IDLE_TIMEOUT */
+
+#endif	/* of #ifdef SUPPORT_PPP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp.h	(revision 270)
@@ -0,0 +1,150 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1989 Carnegie Mellon University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by Carnegie Mellon University.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/*
+ *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
+ *
+ *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the Internet Initiative Japan.  The name of the
+ * IIJ may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#ifndef _PPP_H_
+#define _PPP_H_
+
+/*
+ *  PPP ãããã®ãã­ãã³ã«ãã£ã¼ã«ãã®å¤
+ */
+
+#define PPP_IP		UINT_C(0x0021)		/* IP   */
+
+#define PPP_IPCP	UINT_C(0x8021)		/* IPCP */
+#define PPP_CCP		UINT_C(0x80fd)		/* CCP */
+
+#define PPP_LCP		UINT_C(0xc021)		/* LCP  */
+#define PPP_PAP		UINT_C(0xc023)		/* PAP  */
+#define PPP_LQR		UINT_C(0xc025)		/* LQR  */
+#define PPP_CHAP	UINT_C(0xc223)		/* CHAP */
+
+#define GET_PPP_HDR(nbuf)	((T_PPP_HDR*)((nbuf)->buf))
+
+/*
+ *  ãªã³ã¯ã®ç¶æ
+
+ */
+
+#define PPP_PHASE_DEAD		0
+#define PPP_PHASE_INITIALIZE	1
+#define PPP_PHASE_DORMANT	2
+#define PPP_PHASE_ESTABLISH	3
+#define PPP_PHASE_AUTHENTICATE	4
+#define PPP_PHASE_CALLBACK	5
+#define PPP_PHASE_NETWORK	6
+#define PPP_PHASE_TERMINATE	7
+#define PPP_PHASE_HOLDOFF	8
+
+/*
+ *  PPP ãªã³ã¯å¶å¾¡ (CP) ãããæ§é ä½
+ */
+
+typedef struct t_ppp_cp_hdr {
+	uint8_t		code;		/* å¶å¾¡ã³ã¼ã	*/
+	uint8_t		id;		/* è­å¥å­	*/
+	uint16_t	len;		/* é·ã		*/
+	} __attribute__((packed, aligned(2)))T_PPP_CP_HDR;
+
+#define GET_PPP_CP_HDR(nbuf)	((T_PPP_CP_HDR*)((nbuf)->buf + sizeof(T_PPP_HDR)))
+
+/*
+ *  PPP ãªã³ã¯å¶å¾¡ (CP) ã®å¶å¾¡ã³ã¼ã
+ */
+
+#define PPP_VENDER		UINT_C(0)	/* Vender Specific		*/
+#define PPP_CONFREQ		UINT_C(1)	/* Configuration Request	*/
+#define PPP_CONFACK		UINT_C(2)	/* Configuration ACK		*/
+#define PPP_CONFNAK		UINT_C(3)	/* Configuration NAK		*/
+#define PPP_CONFREJ		UINT_C(4)	/* Configuration Reject		*/
+#define PPP_TERMREQ		UINT_C(5)	/* Termination Request		*/
+#define PPP_TERMACK		UINT_C(6)	/* Termination ACK		*/
+#define PPP_CODEREJ		UINT_C(7)	/* Code Reject			*/
+
+/*
+ * æ§ææ
+å ± (CI) ããã
+ */
+
+typedef struct t_ppp_ci_hdr {
+	uint8_t		type;		/* CI ã®å	*/
+	uint8_t		len;		/* é·ã		*/
+	} __attribute__((packed, aligned(2)))T_PPP_CI_HDR;
+
+#endif	/* of #ifndef _PPP_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_auth.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_auth.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_auth.c	(revision 270)
@@ -0,0 +1,293 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * auth.c - PPP authentication and phase control.
+ *
+ * Copyright (c) 1993 The Australian National University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the Australian National University.  The name of the University
+ * may not be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Copyright (c) 1989 Carnegie Mellon University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by Carnegie Mellon University.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/*
+ *			PPP Secret Key Module
+ *
+ *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
+ *
+ *   Copyright (C) 1994, Internet Initiative Japan, Inc. All rights reserverd.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the Internet Initiative Japan, Inc.  The name of the
+ * IIJ may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/usr.sbin/ppp/auth.c,v 1.50 1999/12/27 11:43:30 brian Exp $
+ *
+ *	TODO:
+ *		o Implement check against with registered IP addresses.
+ */
+
+#include <s_services.h>
+#include <t_services.h>
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/ppp.h>
+#include <net/ppp_var.h>
+#include <net/ppp_auth.h>
+#include <net/ppp_fsm.h>
+#include <net/ppp_lcp.h>
+#include <net/ppp_upap.h>
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  å®æ°
+ */
+
+#define PAP_PEND_SERVER		UINT_C(0x01)
+#define PAP_PEND_CLIENT		UINT_C(0x02)
+#define CHAP_PEND_SERVER	UINT_C(0x04)
+#define CHAP_PEND_CLIENT	UINT_C(0x08)
+
+/*
+ *  network_phase -- ã³ãã¯ã·ã§ã³ç¢ºç«
+ */
+
+void
+network_phase (void)
+{
+	int_t		num, ix;
+	T_PPP_PROTENT	*proto;
+
+	ppp_phase = PPP_PHASE_NETWORK;
+
+	/* ä¸ä½ãã­ãã³ã«ããªã¼ãã³ãã */
+	num = 0;
+	for (ix = 0; (proto = protocols[ix]) != NULL; ix ++)
+#if 0	/* ä¿çãåé¤ç¦æ­¢ */
+		if (proto->proto < 0xc000 && proto->open != NULL) {
+#else	/* of #if 0 */
+		if (proto->open != NULL) {
+#endif	/* of #if 0 */
+			(*proto->open)();
+			if (proto->proto != PPP_CCP)
+				num ++;
+			}
+
+	if (num == 0)
+		/* ä¸ä½ãã­ãã³ã«ããªã */
+		lcp_close();
+	else
+		syslog(LOG_NOTICE, "[PPP] up.");
+	}
+
+/*
+ *  link_required -- ãªã³ã¯ãéè¨­ããã
+ */
+
+void
+link_required (void)
+{
+	}
+
+/*
+ *  link_terminated -- ã­ã°ã¢ã¦ããã¦ããªã³ã¯ãåæ­ããã
+ */
+
+void
+link_terminated (void)
+{
+	ppp_phase     = PPP_PHASE_DEAD;
+	ppp_open_mode = PPP_OPEN_PASSIVE;
+	syslog(LOG_NOTICE, "[PPP] down.");
+	}
+
+/*
+ *  link_down -- ãªã³ã¯ãè§£æ¾ããã
+ */
+
+void
+link_down (void)
+{
+	int_t		ix;
+	T_PPP_PROTENT	*proto;
+
+	/* ä¸ä½ãã­ãã³ã«ãè§£æ¾ãã */
+	for (ix = 0; (proto = protocols[ix]) != NULL; ix ++) {
+		if (proto->proto != PPP_LCP && proto->lowerdown != NULL)
+			(*proto->lowerdown)();
+		if (proto->proto < 0xc000 && proto->close != NULL)
+			(*proto->close)();
+		}
+
+	if (ppp_phase != PPP_PHASE_DEAD)
+		ppp_phase = PPP_PHASE_TERMINATE;
+	}
+
+/*
+ *  link_established -- ãªã³ã¯ã®æ¥ç¶ãç¢ºç«ããã
+ */
+
+void
+link_established (void)
+{
+	int_t		ix;
+	T_PPP_PROTENT	*proto;
+
+#if defined(LCP_CFG_CHAP) || defined(LCP_CFG_PAP)
+
+	int		auth;
+
+#endif	/* of #if defined(LCP_CFG_CHAP) || defined(LCP_CFG_PAP) */
+
+	/* ä¸ä½ãã­ãã³ã«ãèµ·åãã */
+	for (ix = 0; (proto = protocols[ix]) != NULL; ix ++)
+		if (proto->lowerup != NULL)
+			(*proto->lowerup)();
+
+	/* èªè¨¼ãªãã·ã§ã³ãç¢ºèªããããæªå®è£
+ã*/
+
+	ppp_phase = PPP_PHASE_AUTHENTICATE;
+
+#if defined(LCP_CFG_CHAP) || defined(LCP_CFG_PAP)
+
+	auth = 0;
+
+#ifdef AUTH_CFG_SERVER
+
+#if defined(LCP_CFG_CHAP)
+
+	if (lcp_local_ack_cfg.options & LCP_CFG_CHAP) {
+		chap_auth_server();
+		auth |= CHAP_PEND_SERVER;
+		}
+
+#endif	/* of #if defined(LCP_CFG_CHAP) */
+
+#if defined(LCP_CFG_PAP)
+	
+	if (lcp_local_ack_cfg.options & LCP_CFG_PAP) {
+		upap_auth_server();
+		auth |= PAP_PEND_SERVER;
+		}
+
+#endif	/* of #if defined(LCP_CFG_PAP) */
+
+#endif	/* of #ifdef AUTH_CFG_SERVER */
+
+#ifdef AUTH_CFG_CLIENT
+
+#if defined(LCP_CFG_PAP)
+	
+	if (lcp_remote_ack_cfg.options & LCP_CFG_PAP) {
+		upap_auth_client();
+		auth |= PAP_PEND_CLIENT;
+		}
+
+#endif	/* of #if defined(LCP_CFG_PAP) */
+
+#endif	/* of #ifdef AUTH_CFG_CLIENT */
+
+	if (auth == 0)
+		network_phase();
+
+#else	/* of #if defined(LCP_CFG_CHAP) || defined(LCP_CFG_PAP) */
+
+	network_phase();
+
+#endif	/* of #if defined(LCP_CFG_CHAP) || defined(LCP_CFG_PAP) */
+
+	}
+
+/*
+ *  auth_reset -- èªè¨¼ãªãã·ã§ã³ãåç¢ºèªããã
+ */
+
+void
+auth_reset (void)
+{
+	}
+
+#endif	/* fo #ifdef SUPPORT_PPP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_auth.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_auth.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_auth.h	(revision 270)
@@ -0,0 +1,86 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
+ *
+ *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the Internet Initiative Japan.  The name of the
+ * IIJ may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/usr.sbin/ppp/auth.h,v 1.18 1999/08/28 01:18:16 peter Exp $
+ *
+ *	TODO:
+ */
+
+#ifndef _PPP_AUTH_H_
+#define _PPP_AUTH_H_
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  é¢æ°
+ */
+
+extern void link_required (void);
+extern void link_established (void);
+extern void link_terminated (void);
+extern void link_down (void);
+extern void auth_reset (void);
+extern void network_phase (void);
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#endif	/* of #ifndef _PPP_AUTH_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_ccp.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_ccp.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_ccp.c	(revision 270)
@@ -0,0 +1,265 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * ccp.c - PPP Compression Control Protocol.
+ *
+ * Copyright (c) 1994 The Australian National University.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation is hereby granted, provided that the above copyright
+ * notice appears in all copies.  This software is provided without any
+ * warranty, express or implied. The Australian National University
+ * makes no representations about the suitability of this software for
+ * any purpose.
+ *
+ * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
+ * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+ * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ *
+ * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
+ * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
+ * OR MODIFICATIONS.
+ */
+
+/*
+ *	   PPP Compression Control Protocol (CCP) Module
+ *
+ *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
+ *
+ *   Copyright (C) 1994, Internet Initiative Japan, Inc. All rights reserverd.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the Internet Initiative Japan, Inc.  The name of the
+ * IIJ may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/usr.sbin/ppp/ccp.c,v 1.54.2.2 2000/08/19 09:29:59 brian Exp $
+ *
+ *	TODO:
+ *		o Support other compression protocols
+ */
+
+/*
+ *  å®è£
+äºå®ãç¾å¨ã¯ãã¹ã¦æå¦
+ */
+
+#include <t_services.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/net_buf.h>
+#include <net/net_debug.h>
+#include <net/net_count.h>
+#include <net/ppp.h>
+#include <net/ppp_var.h>
+#include <net/ppp_fsm.h>
+#include <net/ppp_ccp.h>
+
+/*
+ *  é¢æ°
+ */
+
+static void ccp_init (void);
+static void ccp_input (T_NET_BUF *nbuf);
+static void ccp_protrej (void);
+static void ccp_lowerup (void);
+static void ccp_lowerdown (void);
+static void ccp_open (void);
+static void ccp_close (void);
+
+/*
+ * FSM ããå¼åºãããã³ã¼ã«ããã¯é¢
+ */
+
+static int_t  ccp_reqci	(T_PPP_FSM *fsm, T_NET_BUF *nbuf);
+					/* ç¸æã®æ§ææ
+å ±ãç¢ºèªããã	*/
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+T_PPP_FSM_CALLBACKS ccp_callbacks = {
+	NULL,				/* èªæ§ææ
+å ±ããªã»ããããã	*/
+	NULL,				/* æ§ææ
+å ±ã®é·ããè¿ãã		*/
+	NULL,				/* èªæ§ææ
+å ±ãè¿½å ããã		*/
+	NULL,				/* ACK ãåä¿¡ããã¨ãã®å¦ç	*/
+	NULL,				/* NAK ãåä¿¡ããã¨ãã®å¦ç	*/
+	NULL,				/* REJ ãåä¿¡ããã¨ãã®å¦ç	*/
+	ccp_reqci,			/* ç¸æã®æ§ææ
+å ±ãç¢ºèªããã	*/
+	NULL,				/* ãªã³ã¯æ¥ç¶ãç¢ºç«ããã		*/
+	NULL,				/* ãªã³ã¯æ¥ç¶ãè§£æ¾ããã		*/
+	NULL,				/* ä¸ä½å±¤ãéå§ããã		*/
+	NULL,				/* ä¸ä½å±¤ãçµäºããã		*/
+	NULL,				/* åéããã			*/
+	NULL,				/* ä¸æãª CP ãåä¿¡ããã¨ãã®å¦ç	*/
+	};
+
+T_PPP_FSM ccp_fsm = {
+	&ccp_callbacks,			/* ã³ã¼ã«ããã¯é¢æ°		*/
+	PPP_CCP,			/* ãã­ãã³ã«			*/
+	};
+
+T_PPP_PROTENT ccp_protent = {
+	PPP_CCP,
+	ccp_init,			/* åæå			*/
+	ccp_input,			/* å
+¥å				*/
+	ccp_protrej,			/* Proto-REJ åä¿¡å¦ç		*/
+	ccp_lowerup,			/* ä¸ä½å±¤ãèµ·åãã		*/
+	ccp_lowerdown,			/* ä¸ä½å±¤ãåæ­¢ãã		*/
+	ccp_open,			/* ãªã¼ãã³ãã			*/
+	ccp_close,			/* ã¯ã­ã¼ãºãã			*/
+	NULL,				/* ãã¼ã¿å
+¥å			*/
+	};
+
+/*
+ *  ccp_init -- CCP ã¢ã¸ã¥ã¼ã«ã®åæå
+ */
+
+static void
+ccp_init (void)
+{
+	fsm_init(&ccp_fsm);
+	}
+
+/*
+ *  ccp_input -- CCP å
+¥å
+ */
+
+static void
+ccp_input (T_NET_BUF *nbuf)
+{
+	NET_COUNT_PPP_CCP(net_count_ppp_ccp_in_octets,  nbuf->len);
+	NET_COUNT_PPP_CCP(net_count_ppp_ccp_in_packets, 1);
+	fsm_input(&ccp_fsm, nbuf);
+	}
+
+/*
+ *  ccp_reqci -- ç¸æã®æ§ææ
+å ±ãè§£æããã
+ */
+
+static int_t
+ccp_reqci (T_PPP_FSM *fsm, T_NET_BUF *nbuf)
+{
+/*
+ *  å®è£
+äºå®ãç¾å¨ã¯ãã¹ã¦ã®ãªãã·ã§ã³ãæå¦ããã
+ */
+	return nbuf->len > (sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR)) ? PPP_CONFREJ : PPP_CONFACK;
+	}
+
+/*
+ *  ccp_protrej -- Proto-REJ ãåä¿¡ããã¨ãã®å¦ç
+ */
+
+static void
+ccp_protrej (void)
+{
+	fsm_lowerdown(&ccp_fsm);
+	}
+
+/*
+ *  ccp_lowerup -- CCP ä¸ä½å±¤ãèµ·åããã
+ */
+
+static void
+ccp_lowerup (void)
+{
+	fsm_lowerup(&ccp_fsm);
+	}
+
+/*
+ *  ccp_lowerdown -- CCP ä¸ä½å±¤ãåæ­¢ããã
+ */
+
+static void
+ccp_lowerdown (void)
+{
+	fsm_lowerdown(&ccp_fsm);
+	}
+
+/*
+ *  ccp_open -- CCP ã®ãªã¼ã
+ */
+
+static void
+ccp_open (void)
+{
+	fsm_open(&ccp_fsm);
+	}
+
+/*
+ *  ccp_close -- CCP ã®ã¯ã­ã¼ãº
+ */
+
+static void
+ccp_close (void)
+{
+	fsm_close(&ccp_fsm);
+	}
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_ccp.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_ccp.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_ccp.h	(revision 270)
@@ -0,0 +1,110 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * ccp.h - Definitions for PPP Compression Control Protocol.
+ *
+ * Copyright (c) 1994 The Australian National University.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation is hereby granted, provided that the above copyright
+ * notice appears in all copies.  This software is provided without any
+ * warranty, express or implied. The Australian National University
+ * makes no representations about the suitability of this software for
+ * any purpose.
+ *
+ * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
+ * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+ * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ *
+ * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
+ * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
+ * OR MODIFICATIONS.
+ *
+ * $FreeBSD: src/usr.sbin/pppd/ccp.h,v 1.7.2.1 1999/08/29 15:46:56 peter Exp $
+ */
+
+/*
+ *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
+ *
+ *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the Internet Initiative Japan.  The name of the
+ * IIJ may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/usr.sbin/ppp/ccp.h,v 1.22 1999/08/28 01:18:19 peter Exp $
+ *
+ *	TODO:
+ */
+
+#ifndef _PPP_CCP_H_
+#define _PPP_CCP_H_
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  å¤æ°
+ */
+
+extern T_PPP_PROTENT	ccp_protent;
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#endif	/* of #ifndef _PPP_CCP_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_fsm.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_fsm.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_fsm.c	(revision 270)
@@ -0,0 +1,827 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * fsm->c - {Link, IP} Control Protocol Finite State Machine.
+ *
+ * Copyright (c) 1989 Carnegie Mellon University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by Carnegie Mellon University.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/*
+ *		PPP Finite State Machine for LCP/IPCP
+ *
+ *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
+ *
+ *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the Internet Initiative Japan, Inc.  The name of the
+ * IIJ may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/usr.sbin/ppp/fsm->c,v 1.52.2.3 2000/08/19 09:30:03 brian Exp $
+ *
+ *  TODO:
+ */
+
+#include <string.h>
+
+#include <s_services.h>
+#include <t_services.h>
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/net.h>
+#include <net/net_timer.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+#include <net/ppp.h>
+#include <net/ppp_var.h>
+#include <net/ppp_hdlc.h>
+#include <net/ppp_fsm.h>
+
+#include <netinet/in.h>
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+uint8_t	ppp_open_mode = PPP_OPEN_PASSIVE;	/* ãªã¼ãã³æã®åä½ã¢ã¼ã	*/
+
+/*
+ *  é¢æ°
+ */
+
+static void fsm_sconfreq	(T_PPP_FSM *fsm, int_t retansmit);
+static void fsm_rconfreq	(T_PPP_FSM *fsm, uint8_t id, T_NET_BUF *input);
+static void fsm_rconfack	(T_PPP_FSM *fsm, uint8_t id, T_NET_BUF *input);
+static void fsm_rconfnakrej	(T_PPP_FSM *fsm, uint8_t code, uint8_t id, T_NET_BUF *input);
+static void fsm_rtermreq	(T_PPP_FSM *fsm, uint8_t id, T_NET_BUF *input);
+static void fsm_rtermack	(T_PPP_FSM *fsm, T_NET_BUF *input);
+static void fsm_rcoderej	(T_PPP_FSM *fsm, T_NET_BUF *input);
+static void fsm_stermreq	(T_PPP_FSM *fsm, uint8_t id);
+static void fsm_timeout		(void *arg);
+
+/*
+ *  fsm_sconfreq -- Configure-Request ãéä¿¡ããã
+ */
+
+static void
+fsm_sconfreq (T_PPP_FSM *fsm, int_t retransmit)
+{
+	T_NET_BUF	*output;
+	uint16_t	len;
+
+	if (!(fsm->state == PPP_FSM_REQSENT ||
+	      fsm->state == PPP_FSM_ACKRCVD ||
+	      fsm->state == PPP_FSM_ACKSENT)) {
+		/* ã¾ã ãã´ããã¦ããªãããªãã·ã§ã³ããªã»ããããã */
+		if (fsm->callbacks->resetci)
+			(*fsm->callbacks->resetci)(fsm);
+		fsm->failures = 0;
+		}
+	if (retransmit == 0) {
+		/* æ°ãããªã¯ã¨ã¹ããåéã«ã¦ã³ã¿ããªã»ããããæ°ãã ID ãè¨­å®ããã */
+		fsm->retrans = MAX_PPP_CONFIGURES;
+		fsm->reqid   = ++ fsm->id;
+		}
+
+	fsm->seen_ack = 0;
+
+	if (fsm->callbacks->cilen && fsm->callbacks->addci) {
+		/* æ§ææ
+å ±ãã±ãããä½ãã */
+		len = (*fsm->callbacks->cilen)(fsm);
+
+		syscall(get_net_buf(&output, len + sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR)));
+		(*fsm->callbacks->addci)(fsm, output);
+
+		/* æ§ææ
+å ±ãã±ãããéä¿¡ããã */
+		IF_SET_PROTO(output, fsm->proto);
+		ppp_cp_output(PPP_CONFREQ, fsm->reqid, output);
+
+		-- fsm->retrans;
+		timeout((FP)fsm_timeout, fsm, DEF_PPP_TIMEOUT);
+		}
+	}
+
+/*
+ *  fsm_rconfreq -- Configure-Request ãåä¿¡ããã¨ãã®å¦ç
+ */
+
+static void
+fsm_rconfreq (T_PPP_FSM *fsm, uint8_t id, T_NET_BUF *input)
+{
+	T_NET_BUF	*output;
+	uint16_t	code;
+
+	switch (fsm->state) {
+	case PPP_FSM_CLOSED:
+		syscall(get_net_buf(&output, sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR)));
+		memcpy(output->buf, input->buf, sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
+		ppp_cp_output(PPP_TERMACK, id, output);
+		return;
+		break;
+
+	case PPP_FSM_CLOSING:
+	case PPP_FSM_STOPPING:
+		return;
+		break;
+
+	case PPP_FSM_OPENED:
+		/* ä¸ä½å±¤ãåæ­¢ãã¦ããã´ã«ç§»ãã */
+		if (fsm->callbacks->down != NULL)
+			(*fsm->callbacks->down)(fsm);
+		fsm_sconfreq(fsm, 0);		/* æåã® Configure-Request ãéãã */
+		break;
+
+	case PPP_FSM_STOPPED:
+		/* ç¸æãããã´ãéå§ããã */
+		fsm_sconfreq(fsm, 0);		/* æåã® Configure-Request ãéãã */
+		fsm->state = PPP_FSM_REQSENT;
+		break;
+
+		}
+
+	syscall(get_net_buf(&output, input->len));
+
+	/* ä¸ä½ãã­ãã³ã«ã«è¦æ±ããã Configure-Request ãéãã */
+	if (fsm->callbacks->reqci != NULL)	/* æ§ææ
+å ±ããã§ãã¯ããã */
+		code = (*fsm->callbacks->reqci)(fsm, input, output);
+	else if (output->len > sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR))
+		code = PPP_CONFREJ;
+	else
+		code = PPP_CONFACK;
+
+	/* ç¸æã« ACK, NAK ã¾ãã¯ REJ ãéä¿¡ããã */
+	ppp_cp_output(code, id, output);
+
+	if (code == PPP_CONFACK) {
+		if (fsm->state == PPP_FSM_ACKRCVD) {
+			untimeout((FP)fsm_timeout, fsm);
+			fsm->state = PPP_FSM_OPENED;
+			if (fsm->callbacks->up != NULL)
+				(*fsm->callbacks->up)(fsm);
+			}
+		else
+			fsm->state = PPP_FSM_ACKSENT;
+		fsm->failures = 0;
+		}
+	else {
+		/* ACK ã REJ ãéã */
+		if (fsm->state != PPP_FSM_ACKRCVD)
+			fsm->state = PPP_FSM_REQSENT;
+		if (code == PPP_CONFNAK)
+			fsm->failures ++;
+		}
+	}
+
+/*
+ *  fsm_rconfnakrej -- Configure-NAK/REJ ãåä¿¡ããã¨ãã®å¦ç
+ */
+
+static void
+fsm_rconfnakrej (T_PPP_FSM *fsm, uint8_t code, uint8_t id, T_NET_BUF *input)
+{
+	int_t		ret = 0;
+	T_NET_BUF	*output;
+
+	/* äºæãã ID ã§ãªãããNAK/REJ ãäºæãã¦ããªãã¨ãã¯çµäºããã*/
+	if (id != fsm->reqid || fsm->seen_ack) {
+		syslog(LOG_WARNING, "[PPP/FSM] bad ID or unexp NAK/REJ.");
+		return;
+		}
+
+	if (code == PPP_CONFNAK) {
+		if (fsm->callbacks->nakci != NULL && (ret = (*fsm->callbacks->nakci)(fsm, input)) == 0) {
+			syslog(LOG_WARNING, "[PPP/FSM] bad NAK.");
+			return;
+			}
+		}
+	else {
+		if (fsm->callbacks->rejci != NULL && (ret = (*fsm->callbacks->rejci)(fsm, input)) == 0) {
+			syslog(LOG_WARNING, "[PPP/FSM] bad REJ.");
+			return;
+			}
+		}
+
+	fsm->seen_ack = 1;
+
+	switch (fsm->state) {
+	case PPP_FSM_CLOSED:
+	case PPP_FSM_STOPPED:
+		syscall(get_net_buf(&output, sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR)));
+		memcpy(output->buf, input->buf, sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
+		ppp_cp_output(PPP_TERMACK, id, output);
+		return;
+		break;
+
+	case PPP_FSM_REQSENT:
+	case PPP_FSM_ACKSENT:
+		untimeout((FP)fsm_timeout, fsm);
+		if (ret < 0)		/* éä¿¡ãã Conf-Req ãç ´æãç©ºã® NAK/REJ ãå±ããã*/
+			fsm->state = PPP_FSM_STOPPED;
+		else
+			fsm_sconfreq(fsm, 0);
+		break;
+
+	case PPP_FSM_ACKRCVD:
+		untimeout((FP)fsm_timeout, fsm);
+		fsm_sconfreq(fsm, 0);
+		fsm->state = PPP_FSM_REQSENT;
+		break;
+
+	case PPP_FSM_OPENED:
+		/* åèµ·åãããã´ãããç´ãã*/
+		if (fsm->callbacks->down != NULL)
+			(*fsm->callbacks->down)(fsm);
+		fsm_sconfreq(fsm, 0);
+		fsm->state = PPP_FSM_REQSENT;
+		break;
+		}
+	}
+
+/*
+ *  fsm_rconfack -- Configure-ACK ãåä¿¡ããã¨ãã®å¦ç
+ */
+
+static void
+fsm_rconfack (T_PPP_FSM *fsm, uint8_t id, T_NET_BUF *input)
+{
+	T_NET_BUF	*output;
+
+	/* äºæãã ID ã§ãªãããACK ãäºæãã¦ããªãã¨ãã¯çµäºããã*/
+	if (id != fsm->reqid || fsm->seen_ack) {
+		syslog(LOG_WARNING, "[PPP/FSM] bad ID or unexp ACK.");
+		return;
+		}
+
+	if (fsm->callbacks->ackci != NULL) {
+		if ((*fsm->callbacks->ackci)(fsm, input) != true) {
+			syslog(LOG_WARNING, "[PPP/FSM] bad ACK.");
+			return;
+			}
+		}
+	else if (input->len - (sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR)) != 0) {
+		syslog(LOG_WARNING, "[PPP/FSM] bad ACK.");
+		return;
+		}
+
+	fsm->seen_ack = 1;
+
+	switch (fsm->state) {
+	case PPP_FSM_CLOSED:
+	case PPP_FSM_STOPPED:
+		syscall(get_net_buf(&output, sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR)));
+		memcpy(output->buf, input->buf, sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
+		ppp_cp_output(PPP_TERMACK, id, output);
+		break;
+
+	case PPP_FSM_REQSENT:
+		fsm->state = PPP_FSM_ACKRCVD;
+		fsm->retrans = MAX_PPP_CONFIGURES;
+		break;
+
+	case PPP_FSM_ACKRCVD:
+		untimeout((FP)fsm_timeout, fsm);
+		fsm_sconfreq(fsm, 0);
+		fsm->state = PPP_FSM_REQSENT;
+		break;
+
+	case PPP_FSM_ACKSENT:
+		untimeout((FP)fsm_timeout, fsm);
+		fsm->state = PPP_FSM_OPENED;
+		fsm->retrans = MAX_PPP_CONFIGURES;
+		if (fsm->callbacks->up != NULL)
+			(*fsm->callbacks->up)(fsm);
+		break;
+
+	case PPP_FSM_OPENED:
+		/* åèµ·åãããã´ãããç´ãã*/
+		if (fsm->callbacks->down != NULL)
+			(*fsm->callbacks->down)(fsm);
+		fsm_sconfreq(fsm, 0);
+		fsm->state = PPP_FSM_REQSENT;
+		break;
+
+	default	:
+		syslog(LOG_WARNING, "[PPP/FSM] unexp state: %d in recv Conf-ACK.", fsm->state);
+		break;
+		}
+
+	}
+
+/*
+ *  fsm_rtermreq -- Terminate-Request ãåä¿¡ããã¨ãã®å¦ç
+ */
+
+static void
+fsm_rtermreq (T_PPP_FSM *fsm, uint8_t id, T_NET_BUF *input)
+{
+	T_NET_BUF	*output;
+
+	switch (fsm->state) {
+	case PPP_FSM_ACKRCVD:
+	case PPP_FSM_ACKSENT:
+		fsm->state = PPP_FSM_REQSENT;
+		break;
+
+	case PPP_FSM_OPENED:
+		if (fsm->callbacks->down != NULL)
+			(*fsm->callbacks->down)(fsm);
+		fsm->retrans = 0;
+		fsm->state = PPP_FSM_STOPPING;
+		timeout((FP)fsm_timeout, fsm, DEF_PPP_TIMEOUT);
+		break;
+		}
+	syscall(get_net_buf(&output, sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR)));
+	memcpy(output->buf, input->buf, sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
+	ppp_cp_output(PPP_TERMACK, id, output);
+	}
+
+/*
+ *  fsm_rtermack -- Terminate-ACK ãåä¿¡ããã¨ãã®å¦ç
+ */
+
+static void
+fsm_rtermack (T_PPP_FSM *fsm, T_NET_BUF *input)
+{
+	switch (fsm->state) {
+	case PPP_FSM_CLOSING:
+		untimeout((FP)fsm_timeout, fsm);
+#if 0	/* æ¬æ¥ã®åä½ã¯ CLOSED ã«é·ç§»ããã*/
+		fsm->state = PPP_FSM_CLOSED;
+#else	/* of #if 0 */
+		fsm->state = PPP_FSM_STOPPED;
+#endif	/* of #if 0 */
+		if (fsm->callbacks->finished != NULL)
+			(*fsm->callbacks->finished)(fsm);
+		break;
+
+	case PPP_FSM_STOPPING:
+		untimeout((FP)fsm_timeout, fsm);
+		fsm->state = PPP_FSM_STOPPED;
+		if (fsm->callbacks->finished != NULL)
+			(*fsm->callbacks->finished)(fsm);
+		break;
+
+	case PPP_FSM_ACKRCVD:
+		fsm->state = PPP_FSM_REQSENT;
+		break;
+
+	case PPP_FSM_OPENED:
+		if (fsm->callbacks->down != NULL)
+			(*fsm->callbacks->down)(fsm);
+		fsm_sconfreq(fsm, 0);
+		break;
+		}
+	}
+
+/*
+ *  fsm_rcoderej -- Code-REJ ãåä¿¡ããã¨ãã®å¦ç
+ */
+
+static void
+fsm_rcoderej (T_PPP_FSM *fsm, T_NET_BUF *input)
+{
+	T_PPP_CP_HDR	*hdr;
+
+ 	/* PPP ãªã³ã¯å¶å¾¡ (CP) ãããããç­ããã°ã¨ã©ã¼ */
+ 	if (input->len < sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR)) {
+ 		syslog(LOG_WARNING, "[PPP/FSM] bad len: %d in recv Code-REJ.", input->len);
+ 		return;
+ 		}
+
+ 	hdr = GET_PPP_CP_HDR(input);
+
+	syslog(LOG_WARNING, "[PPP/FSM] recv Code-REJ, code=%d, id=%d.", hdr->code, hdr->id);
+
+	if (fsm->state == PPP_FSM_ACKRCVD)
+		fsm->state = PPP_FSM_REQSENT;
+	}
+
+/*
+ *  fsm_timeout -- ã¿ã¤ã ã¢ã¦ãå¦ç
+ */
+
+static void
+fsm_timeout (void *arg)
+{
+	T_PPP_FSM *fsm = (T_PPP_FSM*)arg;
+
+	switch (fsm->state) {
+	case PPP_FSM_CLOSING:
+	case PPP_FSM_STOPPING:
+		if (fsm->retrans <= 0) {
+			/* æå¤§åéåæ°ãè¶
+ããã¨ãã®å¦ç */
+#if 0	/* æ¬æ¥ã®åä½ã¯ CLOSED ã«é·ç§»ããã*/
+			fsm->state = (fsm->state == PPP_FSM_CLOSING) ? PPP_FSM_CLOSED : PPP_FSM_STOPPED;
+#else	/* of #if 0 */
+			fsm->state = PPP_FSM_STOPPED;
+#endif	/* of #if 0 */
+			if (fsm->callbacks->finished != NULL)
+				(*fsm->callbacks->finished)(fsm);
+			}
+		else {
+			/* Terminate-Request ãéä¿¡ããã*/
+			fsm_stermreq(fsm, ++ fsm->id);
+			}
+		break;
+	case PPP_FSM_REQSENT:
+	case PPP_FSM_ACKRCVD:
+	case PPP_FSM_ACKSENT:
+		if (fsm->retrans <= 0) {
+			/* æå¤§åéåæ°ãè¶
+ããã¨ãã®å¦ç */
+			syslog(LOG_WARNING, "[PPP/FSM] retrans Conf-Req.");
+			fsm->state = PPP_FSM_STOPPED;
+			if (ppp_open_mode != PPP_OPEN_PASSIVE && fsm->callbacks->finished)
+				(*fsm->callbacks->finished)(fsm);
+			}
+		else {
+			/* Configure-Request ãåéããã*/
+			if (fsm->callbacks->retrans != NULL)
+				(*fsm->callbacks->retrans)(fsm);
+			fsm_sconfreq(fsm, 1);
+			if (fsm->state == PPP_FSM_ACKRCVD)
+				fsm->state = PPP_FSM_REQSENT;
+			}
+
+		break;
+
+	default	:
+		syslog(LOG_WARNING, "[PPP/FSM] unexp state: %d in timeout.", fsm->state);
+		break;
+		}
+	}
+
+/*
+ *  fsm_stermreq -- Terminate-Request ãéä¿¡ããã
+ */
+
+static void
+fsm_stermreq (T_PPP_FSM *fsm, uint8_t id)
+{
+	T_NET_BUF	*input;
+
+	syscall(get_net_buf(&input, sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR)));
+	IF_SET_PROTO(input, fsm->proto);
+	ppp_cp_output(PPP_TERMREQ, id, input);
+
+	timeout((FP)fsm_timeout, fsm, DEF_PPP_TIMEOUT);
+	fsm->retrans --;
+	}
+
+/*
+ *  fsm_init -- FSM ã¢ã¸ã¥ã¼ã«ã®åæå
+ */
+
+void
+fsm_init (T_PPP_FSM *fsm)
+{
+	fsm->state = PPP_FSM_INITIAL;
+	fsm->id	   = 0;
+	}
+
+/*
+ *  fsm_lowerup -- FSM ä¸ä½å±¤ãèµ·åããã
+ */
+
+void
+fsm_lowerup (T_PPP_FSM *fsm)
+{
+	switch (fsm->state) {
+	case PPP_FSM_INITIAL:
+		fsm->state = PPP_FSM_CLOSED;
+		break;
+
+	case PPP_FSM_STARTING:
+		if (ppp_open_mode == PPP_OPEN_PASSIVE)
+			fsm->state = PPP_FSM_STOPPED;
+        	else {
+			fsm_sconfreq(fsm, 0);
+			fsm->state = PPP_FSM_REQSENT;
+			}
+		break;
+
+	default	:
+		syslog(LOG_WARNING, "[PPP/FSM] unexp state: %d in lowerup", fsm->state);
+		break;
+		}
+	}
+
+/*
+ *  fsm_lowerdown -- FSM ä¸ä½å±¤ãåæ­¢ããã
+ */
+
+void
+fsm_lowerdown (T_PPP_FSM *fsm)
+{
+	switch (fsm->state) {
+	case PPP_FSM_CLOSED:
+		fsm->state = PPP_FSM_INITIAL;
+		break;
+
+	case PPP_FSM_STOPPED:
+		fsm->state = PPP_FSM_STARTING;
+		if (fsm->callbacks->starting != NULL)
+			(*fsm->callbacks->starting)(fsm);
+		break;
+
+	case PPP_FSM_CLOSING:
+		fsm->state = PPP_FSM_INITIAL;
+		untimeout((FP)fsm_timeout, fsm);
+		break;
+
+	case PPP_FSM_STOPPING:
+	case PPP_FSM_REQSENT:
+	case PPP_FSM_ACKRCVD:
+	case PPP_FSM_ACKSENT:
+		fsm->state = PPP_FSM_STARTING;
+		untimeout((FP)fsm_timeout, fsm);
+		break;
+
+	case PPP_FSM_OPENED:
+		if (fsm->callbacks->down != NULL)
+			(*fsm->callbacks->down)(fsm);
+		fsm->state = PPP_FSM_STARTING;
+		break;
+
+	default	:
+		syslog(LOG_WARNING, "[PPP/FSM] unexp state: %d in lowerdown", fsm->state);
+		break;
+		}
+	}
+
+/*
+ *  fsm_open -- FSM ã®ãªã¼ãã³
+ */
+
+void
+fsm_open (T_PPP_FSM *fsm)
+{
+	switch (fsm->state) {
+	case PPP_FSM_INITIAL:
+		fsm->state = PPP_FSM_STARTING;
+		if (fsm->callbacks->starting != NULL)
+			(*fsm->callbacks->starting)(fsm);
+		break;
+
+	case PPP_FSM_CLOSED:
+		if (ppp_open_mode == PPP_OPEN_PASSIVE)
+			fsm->state = PPP_FSM_STOPPED;
+		else {
+			fsm_sconfreq(fsm, 0);
+			fsm->state = PPP_FSM_REQSENT;
+			}
+		break;
+
+	case PPP_FSM_CLOSING:
+		fsm->state = PPP_FSM_STOPPING;
+		/* nobreak;	ä¸ã«è½ã¡ã */
+
+	case PPP_FSM_STOPPED:
+	case PPP_FSM_OPENED:
+		fsm_lowerdown(fsm);
+		fsm_lowerup(fsm);
+		break;
+		}
+	}
+
+/*
+ *  fsm_close -- ãªã³ã¯ã®åæ­ãéå§ããã
+ */
+
+void
+fsm_close (T_PPP_FSM *fsm)
+{
+	switch (fsm->state) {
+	case PPP_FSM_STARTING:
+		fsm->state = PPP_FSM_INITIAL;
+		break;
+
+#if 0	/* æ¬æ¥ã®åä½ã¯ CLOSED ã«é·ç§»ããã*/
+	case PPP_FSM_STOPPED:
+		fsm->state = PPP_FSM_CLOSED;
+		break;
+#endif	/* of #if 0 */
+
+	case PPP_FSM_STOPPING:
+		fsm->state = PPP_FSM_CLOSING;
+		break;
+
+	case PPP_FSM_REQSENT:
+	case PPP_FSM_ACKRCVD:
+	case PPP_FSM_ACKSENT:
+	case PPP_FSM_OPENED:
+		if (fsm->state != PPP_FSM_OPENED)
+			untimeout((FP)fsm_timeout, fsm);
+		else if (fsm->callbacks->down != NULL)
+			(*fsm->callbacks->down)(fsm);
+
+		/* ã¿ã¤ã ã¢ã¦ããè¨­å®ããTerminate-Request ãéä¿¡ããã*/
+		fsm->retrans = MAX_PPP_TERMINATES;
+		fsm_stermreq(fsm, fsm->reqid = ++ fsm->id);
+		fsm->state = PPP_FSM_CLOSING;
+		break;
+		}
+	}
+
+/*
+ *  fsm_input -- å
+¥åãPPP ãªã³ã¯å¶å¾¡ (CP) ã®å¶å¾¡ã³ã¼ãã«ããé©å½ãªé¢æ°ãå¼åºã
+ */
+
+void
+fsm_input (T_PPP_FSM *fsm, T_NET_BUF *input)
+{
+	T_PPP_CP_HDR	*hdr;
+	T_NET_BUF	*output;
+
+ 	/* PPP ãªã³ã¯å¶å¾¡ (CP) ãããããç­ããã°ã¨ã©ã¼ */
+ 	if (input->len < (sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR))) {
+ 		syslog(LOG_WARNING, "[PPP/FSM] short hdr: %d.", input->len);
+ 		return;
+ 		}
+
+ 	hdr = GET_PPP_CP_HDR(input);
+
+ 	/* ãããã®é·ãã¨å
+¥åãã¼ã¿ãµã¤ãºãä¸è´ããªããã°ã¨ã©ã¼ */
+ 	if (hdr->len != input->len - sizeof(T_PPP_HDR)) {
+ 		syslog(LOG_WARNING, "[PPP/FSM] bad len: %d.", hdr->len);
+ 		return;
+ 		}
+ 
+ 	/* ç¶æ
+ã INITIAL ã STARTING ãªãã¨ã©ã¼ */
+ 	if (fsm->state == PPP_FSM_INITIAL || fsm->state == PPP_FSM_STARTING) {
+ 		syslog(LOG_WARNING, "[PPP/FSM] unexp state: %d in input.", fsm->state);
+ 		return;
+ 		}
+ 
+ 	/*
+ 	 *  å¶å¾¡ã³ã¼ãã«ããé©å½ãªé¢æ°ãå¼åºã
+ 	 */
+
+	switch (hdr->code) {
+	case PPP_CONFREQ:
+		fsm_rconfreq(fsm, hdr->id, input);
+		break;
+
+	case PPP_CONFACK:
+		fsm_rconfack(fsm, hdr->id, input);
+		break;
+
+	case PPP_CONFNAK:
+	case PPP_CONFREJ:
+		fsm_rconfnakrej(fsm, hdr->code, hdr->id, input);
+		break;
+
+	case PPP_TERMREQ:
+		fsm_rtermreq(fsm, hdr->id, input);
+		break;
+
+	case PPP_TERMACK:
+		fsm_rtermack(fsm, input);
+		break;
+
+	case PPP_CODEREJ:
+		fsm_rcoderej(fsm, input);
+		break;
+
+	default:
+		if (fsm->callbacks->extcode == NULL ||
+		    (*fsm->callbacks->extcode)(fsm, hdr->code, hdr->id, input) != true) {
+			syscall(get_net_buf(&output, sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR)));
+			memcpy(output->buf, input->buf, sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
+			ppp_cp_output(PPP_CODEREJ, ++ fsm->id, output);
+			}
+		break;
+		}
+	}
+
+/*
+ *  fsm_protoreject -- Proto-REJ ãåä¿¡ããã¨ãã®å¦ç
+ */
+
+void
+fsm_protreject (T_PPP_FSM *fsm)
+{
+	switch (fsm->state) {
+	case PPP_FSM_CLOSING:
+		untimeout((FP)fsm_timeout, fsm);
+
+#if 0	/* æ¬æ¥ã®åä½ã¯ CLOSED ã«é·ç§»ããã*/
+		/* ä¸ã«è½ã¡ã */
+#else	/* of #if 0 */
+		fsm->state = PPP_FSM_STOPPED;
+		if (fsm->callbacks->finished != NULL)
+			(*fsm->callbacks->finished)(fsm);
+		break;
+#endif	/* of #if 0 */
+
+	case PPP_FSM_CLOSED:
+		fsm->state = PPP_FSM_CLOSED;
+		if (fsm->callbacks->finished != NULL)
+			(*fsm->callbacks->finished)(fsm);
+		break;
+
+	case PPP_FSM_STOPPING:
+	case PPP_FSM_REQSENT:
+	case PPP_FSM_ACKRCVD:
+	case PPP_FSM_ACKSENT:
+		untimeout((FP)fsm_timeout, fsm);
+		/* ä¸ã«è½ã¡ã */
+
+	case PPP_FSM_STOPPED:
+		fsm->state = PPP_FSM_STOPPED;
+		if (fsm->callbacks->finished != NULL)
+			(*fsm->callbacks->finished)(fsm);
+		break;
+
+	case PPP_FSM_OPENED:
+		if (fsm->callbacks->down != NULL)
+			(*fsm->callbacks->down)(fsm);
+
+		/* ã¿ã¤ã ã¢ã¦ããè¨­å®ããTerminate-Request ãéä¿¡ããã*/
+		fsm->retrans = MAX_PPP_TERMINATES;
+		fsm_stermreq(fsm, fsm->reqid = ++ fsm->id);
+		fsm->state = PPP_FSM_STOPPING;
+		break;
+
+		}
+	}
+
+#endif	/* fo #ifdef SUPPORT_PPP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_fsm.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_fsm.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_fsm.h	(revision 270)
@@ -0,0 +1,203 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * fsm.h - {Link, IP} Control Protocol Finite State Machine definitions.
+ *
+ * Copyright (c) 1989 Carnegie Mellon University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by Carnegie Mellon University.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/usr.sbin/pppd/fsm.h,v 1.6.2.1 1999/08/29 15:47:00 peter Exp $
+ */
+
+/*
+ *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
+ *
+ *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the Internet Initiative Japan.  The name of the
+ * IIJ may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/usr.sbin/ppp/fsm.h,v 1.23 1999/12/27 11:54:53 brian Exp $
+ *
+ *	TODO:
+ */
+
+#ifndef _PPP_FSM_H_
+#define _PPP_FSM_H_
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  ç¶æ
+ç®¡çæ§é ä½
+ */
+
+struct t_ppp_fsm_callbacks;
+
+typedef struct t_fsm {
+	struct t_ppp_fsm_callbacks	*callbacks;	/* ã³ã¼ã«ããã¯é¢æ°*/
+	uint16_t	proto;		/* ãã­ãã³ã«				*/
+	uint8_t		state;		/* FSM ã®ç¶æ
+				*/
+	uint8_t		id;		/* ç¾å¨ã® ID				*/
+	uint8_t		reqid;		/* è¦æ± ID				*/
+	uint8_t		seen_ack;	/* è¦æ±ã«å¯¾ãæ­£å¸¸ãª ACK/NAK/REJ ãåä¿¡	*/
+	int8_t		failures;	/* é»èªãã NAK æ°			*/
+	int8_t		retrans;	/* Configure-Request ã¾ãã¯ã		*/
+					/* Terminate-Request ã®åéåæ°		*/
+	} __attribute__((packed, aligned(2)))T_PPP_FSM;
+
+#define T_PPP_FSM_DEFINED
+
+/*
+ *  ã³ã¼ã«ããã¯é¢æ°æ§é ä½
+ */
+
+typedef struct t_ppp_fsm_callbacks {
+	void (*resetci)	(T_PPP_FSM *);	/* èªæ§ææ
+å ±ããªã»ããããã	*/
+	int_t  (*cilen)	(T_PPP_FSM *);	/* æ§ææ
+å ±ã®é·ããè¿ãã		*/
+	void (*addci)	(T_PPP_FSM *, T_NET_BUF *);
+					/* èªæ§ææ
+å ±ãè¿½å ããã		*/
+	bool_t (*ackci)	(T_PPP_FSM *, T_NET_BUF *);
+					/* ACK ãåä¿¡ããã¨ãã®å¦ç	*/
+	int_t  (*nakci)	(T_PPP_FSM *, T_NET_BUF *);
+					/* NAK ãåä¿¡ããã¨ãã®å¦ç	*/
+	int_t  (*rejci)	(T_PPP_FSM *, T_NET_BUF *);
+					/* REJ ãåä¿¡ããã¨ãã®å¦ç	*/
+	int_t  (*reqci)	(T_PPP_FSM *, T_NET_BUF *, T_NET_BUF *);
+					/* ç¸æã®æ§ææ
+å ±ãç¢ºèªããã	*/
+	void (*up)	(T_PPP_FSM *);	/* ãªã³ã¯ã®æ¥ç¶ãç¢ºç«ããã	*/
+	void (*down)	(T_PPP_FSM *);	/* ãªã³ã¯ã®æ¥ç¶ãè§£æ¾ããã	*/
+	void (*starting)(T_PPP_FSM *);	/* ä¸ä½å±¤ãéå§ããã		*/
+	void (*finished)(T_PPP_FSM *);	/* ä¸ä½å±¤ãçµäºããã		*/
+	void (*retrans)	(T_PPP_FSM *);	/* åéããã			*/
+					/* ä¸æãª CP ãåä¿¡ããã¨ãã®å¦ç	*/
+	bool_t  (*extcode)(T_PPP_FSM *, uint8_t, uint8_t, T_NET_BUF *);
+	} __attribute__((packed, aligned(2)))T_PPP_FSM_CALLBACKS;
+
+/*
+ *  FSM ã®ç¶æ
+
+ */
+
+#define PPP_FSM_INITIAL		0	/* æªæ¥ç¶ãæªãªã¼ãã³	*/
+#define PPP_FSM_STARTING	1	/* æªæ¥ç¶ããªã¼ãã³	*/
+#define PPP_FSM_CLOSED		2	/* æ¥ç¶ã  æªãªã¼ãã³	*/
+#define PPP_FSM_STOPPED		3	/* ãªã¼ãã³ãåæ­å¾
+ã¡	*/
+#define PPP_FSM_CLOSING		4	/* åæ­ä¸­ãæªãªã¼ãã³	*/
+#define PPP_FSM_STOPPING	5	/* åæ­ä¸­ããªã¼ãã³	*/
+#define PPP_FSM_REQSENT		6	/* Config REQ éä¿¡æ¸ã¿	*/
+#define PPP_FSM_ACKRCVD		7	/* Config ACK åä¿¡æ¸ã¿	*/
+#define PPP_FSM_ACKSENT		8	/* Config ACK éä¿¡æ¸ã¿	*/
+#define PPP_FSM_OPENED		9	/* æ¥ç¶ãéä¿¡å¯è½	*/
+
+/*
+ *  ãªã¼ãã³æã®åä½ã¢ã¼ã
+ */
+
+#define PPP_OPEN_PASSIVE	false	/* ååãªã¼ãã³		*/
+#define PPP_OPEN_ACTIVE		true	/* è½åãªã¼ãã³		*/
+
+/*
+ *  åéãã¿ã¤ã ã¢ã¦ãã®æ¢å®å¤
+ */
+
+#define DEF_PPP_TIMEOUT		(3*NET_TIMER_HZ)
+					/* RFC1661 ã§ã¯  3 ç§			*/
+#define MAX_PPP_TERMINATES	2	/* Terminate-Requests ã®æå¤§åéåæ°	*/
+					/* RFC1661 ã§ã¯  2 å			*/
+#define MAX_PPP_CONFIGURES	10	/* Configure-Requests ã®æå¤§åéåæ°	*/
+					/* RFC1661 ã§ã¯ 10 å			*/
+#define MAX_PPP_FAILURES	5	/* Configure-NAK ã®æå¤§é»èªåæ°		*/
+					/* RFC1661 ã§ã¯  5 å			*/
+
+/*
+ *  é¢æ°
+ */
+
+extern void fsm_init    (T_PPP_FSM *fsm);
+extern void fsm_lowerup (T_PPP_FSM *fsm);
+extern void fsm_lowerdown(T_PPP_FSM *fsm);
+extern void fsm_open    (T_PPP_FSM *fsm);
+extern void fsm_close	(T_PPP_FSM *fsm);
+extern void fsm_input	(T_PPP_FSM *fsm, T_NET_BUF *data);
+extern void fsm_protreject(T_PPP_FSM *fsm);
+
+/*
+ *  å¤æ°
+ */
+
+extern uint8_t ppp_open_mode;
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#endif	/* of #ifndef _PPP_FSM_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_hdlc.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_hdlc.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_hdlc.c	(revision 270)
@@ -0,0 +1,563 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *	     PPP High Level Link Control (HDLC) Module
+ *
+ *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
+ *
+ *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the Internet Initiative Japan, Inc.  The name of the
+ * IIJ may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/usr.sbin/ppp/hdlc.c,v 1.46 1999/12/20 20:29:42 brian Exp $
+ *
+ *	TODO:
+ */
+
+#include <s_services.h>
+#include <t_services.h>
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+#include <net/ppp.h>
+#include <net/ppp_var.h>
+#include <net/ppp_hdlc.h>
+#include <net/ppp_fsm.h>
+#include <net/ppp_lcp.h>
+#include <net/ppp_modem.h>
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  RFC1171 (PPP) ã® HDLC é¨ã®å®ç¾©
+ */
+
+/*
+ *  å¤æ°
+ */
+
+uint32_t remote_ACCM	= DEF_REMOTE_ACCM;
+
+/*
+ *  é¢æ°
+ */
+
+static ER HDLC_putoctet (uint8_t octet);
+static ER HDLC_getoctet (uint8_t *octet);
+
+/*
+ *  genfcstab.c ã«ããä½æãã FCS ã®ã«ãã¯ã¢ããè¡¨
+ *  RFC1171 åç
+§
+ */
+
+static uint16_t fcstab[256] = {
+	UINT_C(0x0000), UINT_C(0x1189), UINT_C(0x2312), UINT_C(0x329b),
+	UINT_C(0x4624), UINT_C(0x57ad), UINT_C(0x6536), UINT_C(0x74bf),
+	UINT_C(0x8c48), UINT_C(0x9dc1), UINT_C(0xaf5a), UINT_C(0xbed3),
+	UINT_C(0xca6c), UINT_C(0xdbe5), UINT_C(0xe97e), UINT_C(0xf8f7),
+	UINT_C(0x1081), UINT_C(0x0108), UINT_C(0x3393), UINT_C(0x221a),
+	UINT_C(0x56a5), UINT_C(0x472c), UINT_C(0x75b7), UINT_C(0x643e),
+	UINT_C(0x9cc9), UINT_C(0x8d40), UINT_C(0xbfdb), UINT_C(0xae52),
+	UINT_C(0xdaed), UINT_C(0xcb64), UINT_C(0xf9ff), UINT_C(0xe876),
+	UINT_C(0x2102), UINT_C(0x308b), UINT_C(0x0210), UINT_C(0x1399),
+	UINT_C(0x6726), UINT_C(0x76af), UINT_C(0x4434), UINT_C(0x55bd),
+	UINT_C(0xad4a), UINT_C(0xbcc3), UINT_C(0x8e58), UINT_C(0x9fd1),
+	UINT_C(0xeb6e), UINT_C(0xfae7), UINT_C(0xc87c), UINT_C(0xd9f5),
+	UINT_C(0x3183), UINT_C(0x200a), UINT_C(0x1291), UINT_C(0x0318),
+	UINT_C(0x77a7), UINT_C(0x662e), UINT_C(0x54b5), UINT_C(0x453c),
+	UINT_C(0xbdcb), UINT_C(0xac42), UINT_C(0x9ed9), UINT_C(0x8f50),
+	UINT_C(0xfbef), UINT_C(0xea66), UINT_C(0xd8fd), UINT_C(0xc974),
+	UINT_C(0x4204), UINT_C(0x538d), UINT_C(0x6116), UINT_C(0x709f),
+	UINT_C(0x0420), UINT_C(0x15a9), UINT_C(0x2732), UINT_C(0x36bb),
+	UINT_C(0xce4c), UINT_C(0xdfc5), UINT_C(0xed5e), UINT_C(0xfcd7),
+	UINT_C(0x8868), UINT_C(0x99e1), UINT_C(0xab7a), UINT_C(0xbaf3),
+	UINT_C(0x5285), UINT_C(0x430c), UINT_C(0x7197), UINT_C(0x601e),
+	UINT_C(0x14a1), UINT_C(0x0528), UINT_C(0x37b3), UINT_C(0x263a),
+	UINT_C(0xdecd), UINT_C(0xcf44), UINT_C(0xfddf), UINT_C(0xec56),
+	UINT_C(0x98e9), UINT_C(0x8960), UINT_C(0xbbfb), UINT_C(0xaa72),
+	UINT_C(0x6306), UINT_C(0x728f), UINT_C(0x4014), UINT_C(0x519d),
+	UINT_C(0x2522), UINT_C(0x34ab), UINT_C(0x0630), UINT_C(0x17b9),
+	UINT_C(0xef4e), UINT_C(0xfec7), UINT_C(0xcc5c), UINT_C(0xddd5),
+	UINT_C(0xa96a), UINT_C(0xb8e3), UINT_C(0x8a78), UINT_C(0x9bf1),
+	UINT_C(0x7387), UINT_C(0x620e), UINT_C(0x5095), UINT_C(0x411c),
+	UINT_C(0x35a3), UINT_C(0x242a), UINT_C(0x16b1), UINT_C(0x0738),
+	UINT_C(0xffcf), UINT_C(0xee46), UINT_C(0xdcdd), UINT_C(0xcd54),
+	UINT_C(0xb9eb), UINT_C(0xa862), UINT_C(0x9af9), UINT_C(0x8b70),
+	UINT_C(0x8408), UINT_C(0x9581), UINT_C(0xa71a), UINT_C(0xb693),
+	UINT_C(0xc22c), UINT_C(0xd3a5), UINT_C(0xe13e), UINT_C(0xf0b7),
+	UINT_C(0x0840), UINT_C(0x19c9), UINT_C(0x2b52), UINT_C(0x3adb),
+	UINT_C(0x4e64), UINT_C(0x5fed), UINT_C(0x6d76), UINT_C(0x7cff),
+	UINT_C(0x9489), UINT_C(0x8500), UINT_C(0xb79b), UINT_C(0xa612),
+	UINT_C(0xd2ad), UINT_C(0xc324), UINT_C(0xf1bf), UINT_C(0xe036),
+	UINT_C(0x18c1), UINT_C(0x0948), UINT_C(0x3bd3), UINT_C(0x2a5a),
+	UINT_C(0x5ee5), UINT_C(0x4f6c), UINT_C(0x7df7), UINT_C(0x6c7e),
+	UINT_C(0xa50a), UINT_C(0xb483), UINT_C(0x8618), UINT_C(0x9791),
+	UINT_C(0xe32e), UINT_C(0xf2a7), UINT_C(0xc03c), UINT_C(0xd1b5),
+	UINT_C(0x2942), UINT_C(0x38cb), UINT_C(0x0a50), UINT_C(0x1bd9),
+	UINT_C(0x6f66), UINT_C(0x7eef), UINT_C(0x4c74), UINT_C(0x5dfd),
+	UINT_C(0xb58b), UINT_C(0xa402), UINT_C(0x9699), UINT_C(0x8710),
+	UINT_C(0xf3af), UINT_C(0xe226), UINT_C(0xd0bd), UINT_C(0xc134),
+	UINT_C(0x39c3), UINT_C(0x284a), UINT_C(0x1ad1), UINT_C(0x0b58),
+	UINT_C(0x7fe7), UINT_C(0x6e6e), UINT_C(0x5cf5), UINT_C(0x4d7c),
+	UINT_C(0xc60c), UINT_C(0xd785), UINT_C(0xe51e), UINT_C(0xf497),
+	UINT_C(0x8028), UINT_C(0x91a1), UINT_C(0xa33a), UINT_C(0xb2b3),
+	UINT_C(0x4a44), UINT_C(0x5bcd), UINT_C(0x6956), UINT_C(0x78df),
+	UINT_C(0x0c60), UINT_C(0x1de9), UINT_C(0x2f72), UINT_C(0x3efb),
+	UINT_C(0xd68d), UINT_C(0xc704), UINT_C(0xf59f), UINT_C(0xe416),
+	UINT_C(0x90a9), UINT_C(0x8120), UINT_C(0xb3bb), UINT_C(0xa232),
+	UINT_C(0x5ac5), UINT_C(0x4b4c), UINT_C(0x79d7), UINT_C(0x685e),
+	UINT_C(0x1ce1), UINT_C(0x0d68), UINT_C(0x3ff3), UINT_C(0x2e7a),
+	UINT_C(0xe70e), UINT_C(0xf687), UINT_C(0xc41c), UINT_C(0xd595),
+	UINT_C(0xa12a), UINT_C(0xb0a3), UINT_C(0x8238), UINT_C(0x93b1),
+	UINT_C(0x6b46), UINT_C(0x7acf), UINT_C(0x4854), UINT_C(0x59dd),
+	UINT_C(0x2d62), UINT_C(0x3ceb), UINT_C(0x0e70), UINT_C(0x1ff9),
+	UINT_C(0xf78f), UINT_C(0xe606), UINT_C(0xd49d), UINT_C(0xc514),
+	UINT_C(0xb1ab), UINT_C(0xa022), UINT_C(0x92b9), UINT_C(0x8330),
+	UINT_C(0x7bc7), UINT_C(0x6a4e), UINT_C(0x58d5), UINT_C(0x495c),
+	UINT_C(0x3de3), UINT_C(0x2c6a), UINT_C(0x1ef1), UINT_C(0x0f78),
+	};
+
+/*
+ *  ã¤ã³ã©ã¤ã³é¢æ°
+ */
+
+Inline uint16_t Next_FCS (uint16_t FCS, uint8_t Octet) {
+	return (FCS >> 8) ^ fcstab[(FCS ^ Octet) & 0xff];
+	};
+
+/*
+ *  HDLC_putoctet -- HDLC ãªã¯ãããåºå
+ */
+
+static
+ER HDLC_putoctet (uint8_t octet)
+{
+	static uint8_t escape[2] = { HDLC_CNTL_ESC };
+
+	ER error;
+
+	NET_COUNT_PPP_HDLC(net_count_hdlc.out_octets, 1);
+
+	if ((octet < 0x20 && ((1 << octet) & lcp_remote_ack_cfg.ACCM)) ||
+	    octet == HDLC_CNTL_ESC || octet == HDLC_FLAG_SEQ) {
+		escape[1] = octet ^ HDLC_ESC_MASK;
+		error = serial_wri_dat(HDLC_PORTID, escape, sizeof(escape));
+		}
+	else
+		error = serial_wri_dat(HDLC_PORTID, &octet, sizeof(octet));
+
+	return error > 0 ? E_OK : error;
+	}
+
+/*
+ *  HDLC_wirte -- HDLC åºå
+ */
+
+ER HDLC_write (T_NET_BUF *nbuf)
+{
+	static char flag_seq_ac[4] = {
+		HDLC_FLAG_SEQ,
+		HDLC_ADDR_ALL,
+		HDLC_CNTL_ESC,
+		HDLC_CNTL_UI ^ HDLC_ESC_MASK,
+		};
+
+#ifdef LCP_CFG_ACCOMP
+
+	static char flag_seq = HDLC_FLAG_SEQ;
+
+#endif	/* of #ifdef LCP_CFG_ACCOMP */
+
+	ER		error;
+	uint32_t	fcs;
+	uint16_t	len;
+	uint8_t 	*buf;
+
+	NET_COUNT_PPP_HDLC(net_count_hdlc.out_packets, 1);
+
+#ifdef LCP_CFG_ACCOMP
+
+	if (lcp_local_ack_cfg.options & LCP_CFG_ACCOMP) {
+		NET_COUNT_PPP_HDLC(net_count_hdlc.out_octets, sizeof(flag_seq));
+		/* ãã¬ã¼ã éå§ãã©ã°ã·ã¼ã±ã³ã¹ ãéä¿¡ãã    */
+		if ((error = serial_wri_dat(HDLC_PORTID, &flag_seq, sizeof(flag_seq))) < 0) {
+			goto err_ret;
+			}
+		fcs = HDLC_INIT_FCS;
+		}
+	else {
+
+		NET_COUNT_PPP_HDLC(net_count_hdlc.out_octets, sizeof(flag_seq_ac));
+		/* ãã¬ã¼ã éå§ãã©ã°ã·ã¼ã±ã³ã¹ãAddress ã¨ Control ãéä¿¡ãã    */
+		if ((error = serial_wri_dat(HDLC_PORTID, flag_seq_ac, sizeof(flag_seq_ac))) < 0) {
+			goto err_ret;
+			}
+		/* Address ã¨ Control ã® FCS ã®è¨ç®ã¯ HDLC_INIT_FCS_AC ã«å«ãã¦ãã */
+		fcs = HDLC_INIT_FCS_AC;
+		}
+
+#else	/* of #ifdef LCP_CFG_ACCOMP */
+
+	NET_COUNT_PPP_HDLC(net_count_hdlc.out_octets, sizeof(flag_seq_ac));
+	/* ãã¬ã¼ã éå§ãã©ã°ã·ã¼ã±ã³ã¹ãAddress ã¨ Control ãéä¿¡ãã    */
+	if ((error = serial_wri_dat(HDLC_PORTID, flag_seq_ac, sizeof(flag_seq_ac))) < 0) {
+		goto err_ret;
+		}
+	/* Address ã¨ Control ã® FCS ã®è¨ç®ã¯ HDLC_INIT_FCS_AC ã«å«ãã¦ãã */
+	fcs = HDLC_INIT_FCS_AC;
+
+#endif	/* of #ifdef LCP_CFG_ACCOMP */
+
+	buf = nbuf->buf;
+	len = nbuf->len;
+
+#ifdef LCP_CFG_PCOMP
+
+	if ((lcp_local_ack_cfg.options & LCP_CFG_ACCOMP) && *buf == 0 && *(buf + 1) < 0xff) {
+		buf ++;
+		len --;
+		}
+
+#endif	/* of #ifdef LCP_CFG_PCOMP */
+
+	/* ãã¼ã¿ãéä¿¡ãã */
+	while (len -- > 0) {
+
+		if ((error = HDLC_putoctet(*buf)) != E_OK)
+			goto err_ret;
+		fcs = Next_FCS(fcs, *buf);
+		buf ++;
+		}
+
+	/* FCS ãéä¿¡ãã */
+	fcs = ~fcs;
+	if ((error = HDLC_putoctet(fcs & 0xff)) != E_OK)
+		goto err_ret;
+	if ((error = HDLC_putoctet(fcs >> 8)) != E_OK)
+		goto err_ret;
+
+	/* ãã¬ã¼ã çµäºãã©ã°ã·ã¼ã±ã³ã¹ãéä¿¡ãã */
+	if ((error = serial_wri_dat(HDLC_PORTID, &flag_seq_ac[0], sizeof(char))) < 0)
+		goto err_ret;
+
+	return E_OK;
+
+err_ret:
+	NET_COUNT_PPP_HDLC(net_count_hdlc.out_err_packets, 1);
+	return error;
+	}
+
+/*
+ *  HDLC_getoctet -- HDLC ãªã¯ãããå
+¥å
+ *
+ *	æ»ãå¤ã true ãªããã©ã°ã·ã¼ã±ã³ã¹
+ */
+
+static
+ER_BOOL HDLC_getoctet (uint8_t *octet)
+{
+	ER error;
+
+	/* 1ãªã¯ãããå
+¥åãã */
+	if ((error = serial_rea_dat(HDLC_PORTID, octet, sizeof(uint8_t))) <= 0) {
+		return error;
+		}
+
+	/* å
+¥åãããªã¯ãããããã©ã°ã·ã¼ã±ã³ã¹ãªã true ãè¿ã */
+	if (*octet == HDLC_FLAG_SEQ)
+		return true;
+
+	/* å
+¥åãããªã¯ããããã¨ã¹ã±ã¼ããªããããï¼ãªã¯ãããå
+¥åããã¹ã¯ãè§£é¤ãã */
+	if (*octet == HDLC_CNTL_ESC) {
+		if ((error = serial_rea_dat(HDLC_PORTID, octet, sizeof(uint8_t))) <= 0)
+			return error;
+		*octet ^= HDLC_ESC_MASK;
+		}
+
+	NET_COUNT_PPP_HDLC(net_count_hdlc.in_octets, 1);
+	return E_OK;
+	}
+
+/*
+ *  HDLC_read -- HDLC å
+¥å
+ *
+ *	HDLC ãã¬ã¼ã ãå
+¥åããã
+ */
+
+ER HDLC_read (T_NET_BUF *nbuf, uint16_t size)
+{
+	ER		error;
+	uint32_t	fcs = 0;
+	uint16_t	olen = 0;
+	uint8_t		*buf, octet;
+
+	buf = nbuf->buf;
+
+	/* ãã¬ã¼ã éå§ãã©ã°ã·ã¼ã±ã³ã¹ã¾ã§å
+¥åãèª­ã¿é£ã°ã */
+	while ((error = HDLC_getoctet(&octet)) != true) {
+
+		if (error != E_OK)
+			goto err_ret;
+
+#ifdef PPP_CFG_MODEM
+
+		else if (octet == '\n') {
+			/* ã¢ãã å¶å¾¡ãå¼ã³åºãã*/
+			modem_cntl(modem_getline(nbuf, size));
+			/* ä¸åº¦ããã®é¢æ°ãçµäºããã*/
+			nbuf->len = 0;
+			return E_OK;
+			}
+
+#endif/* of #ifdef PPP_CFG_MODEM */
+
+		}
+
+	/* ãã¬ã¼ã éå§ãã©ã°ã·ã¼ã±ã³ã¹ã®éã¯å
+¥åãèª­ã¿é£ã°ã */
+	while (1) {
+		if ((error = HDLC_getoctet(&octet)) == E_OK)
+			break;
+		else if (error != true)
+			goto err_ret;
+		}
+
+	NET_COUNT_PPP_HDLC(net_count_hdlc.in_packets, 1);
+
+	/* å
+¥åãããªã¯ãããã¯ Address: All-Stations ã */
+	if (octet == HDLC_ADDR_ALL) {
+
+		/* æ¬¡ã¯ Control: UI */
+		if ((error = HDLC_getoctet(&octet)) != E_OK || octet != HDLC_CNTL_UI) {
+			error = E_SYS;
+			goto err_ret;
+			}
+		if ((error = HDLC_getoctet(&octet)) != E_OK)
+			goto err_ret;
+		/* Address ã¨ Control ã® FCS ã®è¨ç®ã¯ HDLC_INIT_FCS_AC ã«å«ãã¦ãã */
+		fcs = HDLC_INIT_FCS_AC;
+		}
+
+#ifdef LCP_CFG_ACCOMP
+
+	else if (lcp_remote_ack_cfg.options & LCP_CFG_ACCOMP) {
+		fcs = HDLC_INIT_FCS;
+		}
+
+#endif/* of #ifdef LCP_CFG_ACCOMP */
+
+	else {
+		error = E_SYS;
+		goto err_ret;
+		}
+
+	nbuf->len = 0;
+
+#ifdef LCP_CFG_PCOMP
+
+	if ((lcp_remote_ack_cfg.options & LCP_CFG_PCOMP) && (octet & 0x01) != 0) {
+		*buf ++ = 0x00;
+		size  --;
+		nbuf->len ++;
+		}
+
+#endif	/* of #ifdef LCP_CFG_PCOMP */
+
+	fcs = Next_FCS(fcs, octet);
+	*buf ++ = octet;
+	size  --;
+	nbuf->len ++;
+
+	/* SUD + FCS ãå
+¥åãã */
+	while ((error = HDLC_getoctet(&octet)) == E_OK) {
+		fcs = Next_FCS(fcs, octet);
+		if (size > 0) {
+			*buf ++ = octet;
+			size  --;
+			}
+		else
+			olen ++;
+		nbuf->len ++;
+		}
+
+	if (error == true) {
+		if (size > 0)
+			nbuf->len -= 2;
+		else if (olen <= 2)
+			nbuf->len -= olen;
+		else {
+			error = E_BOVR;
+			goto err_ret;
+			}
+		}
+	else
+		goto err_ret;
+
+	/* FCS ããã§ãã¯ãã */
+	if (fcs != HDLC_GOOD_FCS) {
+		error = E_SYS;
+		goto err_ret;
+		}
+
+	return E_OK;
+
+err_ret:
+	NET_COUNT_PPP_HDLC(net_count_hdlc.in_err_packets, 1);
+	return error;
+	}
+
+/*
+ *  HDLC_dummy_read -- HDLC å
+¥å (ç©ºèª­ã¿)
+ *
+ *	HDLC ãã¬ã¼ã ãç©ºèª­ã¿ããã
+ */
+
+void
+HDLC_dummy_read (void)
+{
+	uint8_t	octet;
+	ER	error;
+
+	/* ãã¬ã¼ã éå§ãã©ã°ã·ã¼ã±ã³ã¹ã¾ã§å
+¥åãèª­ã¿é£ã°ã */
+	while ((error = HDLC_getoctet(&octet)) != true) {
+		if (error != E_OK)
+			return;
+		}
+
+	/* ãã¬ã¼ã éå§ãã©ã°ã·ã¼ã±ã³ã¹ã®éã¯å
+¥åãèª­ã¿é£ã°ã */
+	while (octet == HDLC_FLAG_SEQ)
+		if (HDLC_getoctet(&octet) != E_OK)
+			return;
+
+	/* å
+¥åãããªã¯ãããã¯ Address: All-Stations ã */
+	if (octet == HDLC_ADDR_ALL) {
+
+		/* æ¬¡ã¯ Control: UI */
+		if (HDLC_getoctet(&octet) != E_OK || octet != HDLC_CNTL_UI)
+			return;
+		if (HDLC_getoctet(&octet) != E_OK)
+			return;
+		}
+
+#ifdef LCP_CFG_ACCOMP
+
+	else if (lcp_remote_ack_cfg.options & LCP_CFG_ACCOMP)
+		;
+
+#endif/* of #ifdef LCP_CFG_ACCOMP */
+
+	else
+		return;
+
+	while (HDLC_getoctet(&octet) == E_OK)
+		;
+	}
+
+#ifdef PPP_CFG_MODEM
+
+/*
+ *  HDLC_raw_getoctet -- HDLC ãªã¯ããã (Raw) å
+¥å
+ */
+
+int HDLC_raw_getoctet (void)
+{
+	uint8_t ch;
+
+	/* 1ãªã¯ãããå
+¥åãã */
+	if (serial_rea_dat(HDLC_PORTID, &ch, sizeof(ch)) <= 0)
+		return '\0';
+
+	NET_COUNT_PPP_HDLC(net_count_hdlc.in_octets, 1);
+	return ch;
+	}
+
+/*
+ *  HDLC_raw_putoctet -- HDLC ãªã¯ããã (Raw) åºå
+ */
+
+void HDLC_raw_putoctet (uint8_t ch)
+{
+	NET_COUNT_PPP_HDLC(net_count_hdlc.out_octets, 1);
+	/* 1ãªã¯ãããåºåãã */
+	serial_wri_dat(HDLC_PORTID, &ch, sizeof(ch));
+	}
+
+#endif	/* of #ifdef PPP_CFG_MODEM */
+
+#endif	/* fo #ifdef SUPPORT_PPP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_hdlc.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_hdlc.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_hdlc.h	(revision 270)
@@ -0,0 +1,108 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
+ *
+ *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the Internet Initiative Japan.  The name of the
+ * IIJ may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/usr.sbin/ppp/hdlc.h,v 1.21 1999/12/30 13:27:15 brian Exp $
+ *
+ *	TODO:
+ */
+
+#ifndef _PPP__HDLC_H_
+#define _PPP__HDLC_H_
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  RFC1171 (PPP) ã® HDLC é¨ã®å®ç¾©
+ */
+
+/*
+ *  æ¢å®å¤
+ */
+
+#define HDLC_FLAG_SEQ		UINT_C(0x7e)		/* Flag Sequence			*/
+#define HDLC_CNTL_ESC		UINT_C(0x7d)		/* Control Escape octet			*/
+#define HDLC_ADDR_ALL		UINT_C(0xff)		/* Address: All-Stations		*/
+#define HDLC_CNTL_UI		UINT_C(0x03)		/* Control: UI				*/
+#define HDLC_ESC_MASK		UINT_C(0x20)		/* Escape Mask				*/
+#define HDLC_INIT_FCS		UINT_C(0xffff)		/* Initial FCS value			*/
+#define HDLC_INIT_FCS_AC	UINT_C(0x3de3)		/* Initial FCS value with		*/
+							/* Address and Control: UI		*/
+#define HDLC_GOOD_FCS		UINT_C(0xf0b8)		/* Good final FCS value			*/
+
+/*
+ *  é¢æ°
+ */
+
+extern ER HDLC_write (T_NET_BUF *data);
+extern ER HDLC_read (T_NET_BUF *data, uint16_t size);
+extern void HDLC_dummy_read (void);
+
+#ifdef PPP_CFG_MODEM
+
+extern int_t HDLC_raw_getoctet (void);
+extern void HDLC_raw_putoctet (uint8_t ch);
+
+#endif	/* of #ifdef PPP_CFG_MODEM */
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#endif	/* of #ifndef _PPP__HDLC_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_ipcp.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_ipcp.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_ipcp.c	(revision 270)
@@ -0,0 +1,721 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * ipcp.c - PPP IP Control Protocol.
+ *
+ * Copyright (c) 1989 Carnegie Mellon University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by Carnegie Mellon University.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/*
+ *	PPP IP Control Protocol (IPCP) Module
+ *
+ *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
+ *
+ *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the Internet Initiative Japan, Inc.  The name of the
+ * IIJ may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/usr.sbin/ppp/ipcp.c,v 1.90.2.4 2000/08/19 09:30:03 brian Exp $
+ *
+ *	TODO:
+ *		o Support IPADDRS properly
+ *		o Validate the length in IpcpDecodeConfig
+ */
+
+#include <string.h>
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+#include <net/ppp.h>
+#include <net/ppp_var.h>
+#include <net/ppp_fsm.h>
+#include <net/ppp_lcp.h>
+#include <net/ppp_ipcp.h>
+#include <net/ppp_modem.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet/ip.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_timer.h>
+#include <netinet/tcp_var.h>
+#include <netinet/udp_var.h>
+
+#include <net/if_var.h>
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  é¢æ°
+ */
+
+static void ipcp_init (void);
+static void ipcp_input (T_NET_BUF *input);
+static void ipcp_protrej (void);
+static void ipcp_lowerup (void);
+static void ipcp_lowerdown (void);
+static void ipcp_open (void);
+static void ipcp_close (void);
+
+/*
+ * FSM ããå¼åºãããã³ã¼ã«ããã¯é¢
+ */
+
+static void  ipcp_resetci(T_PPP_FSM *fsm);	/* èªæ§ææ
+å ±ããªã»ããããã	*/
+static int_t ipcp_cilen	(T_PPP_FSM *fsm);	/* æ§ææ
+å ±ã®é·ããè¿ãã		*/
+static void  ipcp_addci	(T_PPP_FSM *fsm, T_NET_BUF *output);
+						/* èªæ§ææ
+å ±ãè¿½å ããã		*/
+static bool_t  ipcp_ackci	(T_PPP_FSM *fsm, T_NET_BUF *input);
+						/* ACK ãåä¿¡ããã¨ãã®å¦ç	*/
+static bool_t  ipcp_nakci	(T_PPP_FSM *fsm, T_NET_BUF *input);
+						/* NAK ãåä¿¡ããã¨ãã®å¦ç	*/
+static bool_t  ipcp_rejci	(T_PPP_FSM *fsm, T_NET_BUF *input);
+						/* REJ ãåä¿¡ããã¨ãã®å¦ç	*/
+static int_t ipcp_reqci	(T_PPP_FSM *fsm, T_NET_BUF *input, T_NET_BUF *output);
+						/* ç¸æã®æ§ææ
+å ±ãç¢ºèªããã	*/
+static void ipcp_up	(T_PPP_FSM *fsm);	/* ãªã³ã¯æ¥ç¶ãç¢ºç«ããã		*/
+static void ipcp_down	(T_PPP_FSM *fsm);	/* ãªã³ã¯æ¥ç¶ãè§£æ¾ããã		*/
+static void ipcp_finished(T_PPP_FSM *fsm);	/* ä¸ä½å±¤ãçµäºããã		*/
+
+/*
+ *  å¤æ°
+ */
+
+static T_IFNET ipcp_local_def_cfg = {		/* èªæ§ææ
+å ±ã®è¦å®å¤		*/
+	NULL,
+	{
+		IPV4_ADDR_LOCAL,		/* IP ã¢ãã¬ã¹			*/
+		UINT_C(0),			/* ãµãããããã¹ã¯		*/
+		},
+	};
+
+static T_IFNET ipcp_remote_def_cfg = {		/* ç¸æã®æ§ææ
+å ±ã®è¦å®å¤	*/
+	NULL,
+	{
+		IPV4_ADDR_REMOTE,		/* IP ã¢ãã¬ã¹			*/
+		UINT_C(0),			/* ãµãããããã¹ã¯		*/
+		}
+	};
+
+static T_IFNET ipcp_local_neg_cfg;		/* ãã´ä¸­ã®èªæ§ææ
+å ±		*/
+
+static T_IFNET ipcp_remote_neg_cfg;		/* ãã´ä¸­ã®ç¸æã®æ§ææ
+å ±		*/
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+T_PPP_FSM_CALLBACKS ipcp_callbacks = {
+	ipcp_resetci,			/* èªæ§ææ
+å ±ããªã»ããããã	*/
+	ipcp_cilen,			/* æ§ææ
+å ±ã®é·ããè¿ãã		*/
+	ipcp_addci,			/* èªæ§ææ
+å ±ãè¿½å ããã		*/
+	ipcp_ackci,			/* ACK ãåä¿¡ããã¨ãã®å¦ç	*/
+	ipcp_nakci,			/* NAK ãåä¿¡ããã¨ãã®å¦ç	*/
+	ipcp_rejci,			/* REJ ãåä¿¡ããã¨ãã®å¦ç	*/
+	ipcp_reqci,			/* ç¸æã®æ§ææ
+å ±ãç¢ºèªããã	*/
+	ipcp_up,			/* ãªã³ã¯æ¥ç¶ãç¢ºç«ããã		*/
+	ipcp_down,			/* ãªã³ã¯æ¥ç¶ãè§£æ¾ããã		*/
+	NULL,				/* ä¸ä½å±¤ãéå§ããã		*/
+	ipcp_finished,			/* ä¸ä½å±¤ãçµäºããã		*/
+	NULL,				/* åéããã			*/
+	NULL,				/* ä¸æãª CP ãåä¿¡ããã¨ãã®å¦ç	*/
+	};
+
+T_PPP_FSM ipcp_fsm = {
+	&ipcp_callbacks,		/* ã³ã¼ã«ããã¯é¢æ°		*/
+	PPP_IPCP,			/* ãã­ãã³ã«			*/
+	};
+
+T_PPP_PROTENT ipcp_protent = {
+	PPP_IPCP,
+	ipcp_init,			/* åæå			*/
+	ipcp_input,			/* å
+¥å				*/
+	ipcp_protrej,			/* Proto-REJ åä¿¡å¦ç		*/
+	ipcp_lowerup,			/* ä¸ä½å±¤ãèµ·åãã		*/
+	ipcp_lowerdown,			/* ä¸ä½å±¤ãåæ­¢ãã		*/
+	ipcp_open,			/* ãªã¼ãã³ãã			*/
+	ipcp_close,			/* ã¯ã­ã¼ãºãã			*/
+	ip_input,			/* ãã¼ã¿å
+¥åãIP å
+¥å		*/
+	};
+
+T_IFNET ipcp_local_ack_cfg;		/* ç¸æã«è¨±å¯ãããã®èªæ§ææ
+å ±	*/
+T_IFNET ipcp_remote_ack_cfg;		/* ç¸æã«è¨±å¯ããæ§ææ
+å ±	*/
+
+/*
+ *  ppp_get_ifnet -- ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹æ§é ä½ãè¿ãã
+ */
+
+T_IFNET *
+ppp_get_ifnet (void)
+{
+	return &ipcp_local_ack_cfg;
+	}
+
+/*
+ *  wait_ipcp -- IP æ¥ç¶å®äºã¾ã§å¾
+ã¤ã
+ *
+ *	æ»ãå¤: æ¥ç¶ã«å¤±æããã E_OBJ ãè¿ãã
+ */
+
+ER
+wait_ipcp (void)
+{
+#ifdef PPP_CFG_MODEM
+	ER error;
+#endif	/* of #ifdef PPP_CFG_MODEM */
+
+	if (ipcp_fsm.state <= PPP_FSM_STOPPED) {
+
+#ifdef PPP_CFG_MODEM
+
+		/* ã¢ãã ã®æ¥ç¶å®äºã¾ã§å¾
+ã¤ã*/
+		if ((error = wait_modem()) != E_OK)
+			return error;
+
+#else	/* of #ifdef PPP_CFG_MODEM */
+
+		/*
+		 * ååãªã¼ãã³ããç¸æããã®æ¥ç¶å¾
+ã¡ãªã LCP ãä¸åº¦ã¯ã­ã¼ãºãã
+		 * è½åãªã¼ãã³ç¶æ
+ã§ãåãªã¼ãã³ããã
+		 */
+		lcp_close();
+		lcp_open(PPP_OPEN_ACTIVE);
+
+#endif	/* of #ifdef PPP_CFG_MODEM */
+
+		}
+
+	if (ipcp_fsm.state != PPP_FSM_OPENED) {
+		/* IP æ¥ç¶å®äºã¾ã§å¾
+ã¤ã*/
+		wai_sem(SEM_IPCP_READY);
+		if (ipcp_fsm.state != PPP_FSM_OPENED)
+			return E_OBJ;
+		}
+
+	return E_OK;
+	}
+
+/*
+ *  ipcp_init -- IPCP ã¢ã¸ã¥ã¼ã«ã®åæå
+ */
+
+static void
+ipcp_init (void)
+{
+	fsm_init(&ipcp_fsm);
+	}
+
+/*
+ *  ipcp_input -- IPCP å
+¥å
+ */
+
+static void
+ipcp_input (T_NET_BUF *input)
+{
+	NET_COUNT_PPP_IPCP(net_count_ppp_ipcp_in_octets,  input->len);
+	NET_COUNT_PPP_IPCP(net_count_ppp_ipcp_in_packets, 1);
+	fsm_input(&ipcp_fsm, input);
+	}
+
+/*
+ *  ipcp_resetci -- IPCPã®æ§ææ
+å ±ããªã»ããããã
+ */
+
+static void
+ipcp_resetci (T_PPP_FSM *fsm)
+{
+	/* èªæ§ææ
+å ±ã®åæè¨­å® */
+	ipcp_local_neg_cfg = ipcp_local_def_cfg;
+	memset((void*)&ipcp_local_ack_cfg, 0, sizeof(T_IFNET));
+
+	/* ç¸æã®æ§ææ
+å ±ã®åæè¨­å® */
+	ipcp_remote_neg_cfg = ipcp_remote_def_cfg;
+	memset((void*)&ipcp_remote_ack_cfg, 0, sizeof(T_IFNET));
+	}
+
+/*
+ *  ipcp_cilen -- æ§ææ
+å ±ã®é·ããè¿ãã
+ */
+
+static int_t
+ipcp_cilen (T_PPP_FSM *fsm)
+{
+	int_t cilen = 0;
+
+	cilen += sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);	/* IP ã¢ãã¬ã¹ */
+
+	return cilen;
+	}
+
+/*
+ *  ipcp_addci -- IPCPã®æ§ææ
+å ±ãè¿½å ããã
+ */
+
+static void
+ipcp_addci (T_PPP_FSM *fsm, T_NET_BUF *output)
+{
+	uint8_t *buf;
+
+	buf = output->buf + sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
+
+	/* IP ã¢ãã¬ã¹ãªãã·ã§ã³ãè¿½å ããã */
+	*buf ++ = IPCP_CIT_ADDR;
+	*buf ++ = sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+	ahtonl(buf, ipcp_local_neg_cfg.in_ifaddr.addr);
+	buf += sizeof(uint32_t);
+	}
+
+/*
+ *  ipcp_ackci -- ACK ãåä¿¡ããã¨ãã®å¦ç
+ *
+ *	æ»ãå¤:	true  ACK ã¯æ­£å¸¸
+ *		false ACK ã¯ç°å¸¸
+ */
+
+static bool_t
+ipcp_ackci (T_PPP_FSM *fsm, T_NET_BUF *input)
+{
+	uint8_t		*buf;
+	uint16_t	len;
+
+	buf = input->buf +  sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
+	len = input->len - (sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
+
+	/*
+	 *  æ§ææ
+å ±ã¯éä¿¡ããé ã«å®å
+¨ã«ä¸è´ããªããã°ãªããªãã
+	 *  å¾ã£ã¦ãipcp_addci ã§ä½æããé ã«è§£æããã
+	 */
+
+	/* ADDR ãªãã·ã§ã³ãè§£æããã */
+	if (len < sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)	||
+	    *buf ++ != IPCP_CIT_ADDR			||
+	    *buf ++ != sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)||
+	    nahcmpl(buf, ipcp_local_neg_cfg.in_ifaddr.addr))
+		return false;
+	buf += sizeof(uint32_t);
+	len -= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+
+	return true;
+	}
+
+/*
+ *  ipcp_nakci -- NAK ãåä¿¡ããã¨ãã®å¦ç
+ *
+ *	æ»ãå¤:	1  NAK ã¯æ­£å¸¸
+ *		0  NAK ã¯ç°å¸¸
+ */
+
+static int_t
+ipcp_nakci (T_PPP_FSM *fsm, T_NET_BUF *input)
+{
+	T_IFNET		new_cfg;
+	uint32_t	cilong;
+	uint16_t	len;
+	uint8_t		*buf, cilen;
+
+	buf = input->buf +  sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
+	len = input->len - (sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
+
+	new_cfg = ipcp_local_neg_cfg;
+
+	/* ADDR ãªãã·ã§ã³ãè§£æããã */
+	if (len >= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)		&&
+	    * buf      == IPCP_CIT_ADDR				&&
+	    *(buf + 1) == sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)) {
+	    	ntoahl(cilong, buf + 2);
+		buf += sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+		len -= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+		new_cfg.in_ifaddr.addr = cilong;
+		}
+
+	/* å¾ã¯ç¡è¦ããã*/
+	while (len > sizeof(T_PPP_CI_HDR)) {
+		cilen = *(buf + 1);
+		if (len < cilen)
+			return 0;
+		buf += cilen;
+		len -= cilen;
+		}
+
+	/* é·ãã 0 ã§ãªããã°ã¨ã©ã¼ */
+	if (len != 0)
+		return 0;
+
+	/* æ°ãããªãã·ã§ã³ãè¨­å®ããã*/
+	if (fsm->state != PPP_FSM_OPENED)
+		ipcp_local_neg_cfg = new_cfg;
+               		
+	return 1;
+	}
+
+/*
+ *  ipcp_rejci -- REJ ãåä¿¡ããã¨ãã®å¦ç
+ *
+ *	æ»ãå¤:	1  REJ ã¯æ­£å¸¸
+ *		0  REJ ã¯ç°å¸¸
+ */
+
+static int_t
+ipcp_rejci (T_PPP_FSM *fsm, T_NET_BUF *input)
+{
+	T_IFNET		new_cfg;
+	uint8_t		*buf;
+	uint16_t	len;
+
+	buf = input->buf +  sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
+	len = input->len - (sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
+
+	new_cfg = ipcp_local_neg_cfg;
+
+	/* ADDR ãªãã·ã§ã³ãè§£æããã */
+	if (len >= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)		&&
+	    * buf      == IPCP_CIT_ADDR				&&
+	    *(buf + 1) == sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)) {
+		buf += sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+		len -= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+		new_cfg.in_ifaddr.addr = 0;
+		}
+
+	/* é·ãã 0 ã§ãªããã°ã¨ã©ã¼ */
+	if (len != 0)
+		return 0;
+
+	/* æ°ãããªãã·ã§ã³ãè¨­å®ããã*/
+	if (fsm->state != PPP_FSM_OPENED)
+		ipcp_local_neg_cfg = new_cfg;
+
+	return 1;
+	}
+
+/*
+ *  ipcp_reqci -- ç¸æã®æ§ææ
+å ±ãè§£æããã
+ */
+
+static int_t
+ipcp_reqci (T_PPP_FSM *fsm, T_NET_BUF *input, T_NET_BUF *output)
+{
+	uint32_t	addr;
+	uint16_t	code, final, len, cilen;
+	uint8_t		*np, *rp, *ap, *cp, type = 0;
+
+	rp = ap = input->buf +  sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
+				/* rp: REJãap: ACK ãã CI ã®ãã¤ã³ã¿	*/
+				/* æå¦ããå ´åã¯ãå¼æ° buf ã«ä¸æ¸ãããã	*/
+	len   = input->len - (sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
+	np    = output->buf + sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
+	final = PPP_CONFACK;	/* æçµçã«éä¿¡ããã³ã¼ã */
+	while (len > 0) {
+		code = PPP_CONFACK;
+		cp   = ap;	/* cp: ç¾å¨å¦çä¸­ã® CI	*/
+
+		if (len < sizeof(T_PPP_CI_HDR)) {
+
+			/* æ®ãã CI ãããããç­ã */
+			syslog(LOG_NOTICE, "[PPP/IPCP] bad CI len: %d.", len);
+			cilen = len;	/* ãã¼ã¿é·ãç°å¸¸ã®å ´åã®å¦ç½®	*/
+			len  = 0;	/* ã«ã¼ãããæããã		*/
+			code  = PPP_CONFREJ;
+			goto endswitch;
+			}
+
+		type  = *ap ++;	/* CI ã®å		*/
+		cilen = *ap ++;	/* CI ã®é·ã		*/
+		if (len < cilen) {
+
+			/* æ®ãã CI é·ããç­ã */
+			syslog(LOG_NOTICE, "[PPP/IPCP] bad CI len: %d.", cilen);
+			cilen = len;	/* ãã¼ã¿é·ãç°å¸¸ã®å ´åã®å¦ç½®	*/
+			len  = 0;	/* ã«ã¼ãããæããã		*/
+			code  = PPP_CONFREJ;
+			goto endswitch;
+			}
+		len -= sizeof(T_PPP_CI_HDR);
+
+		/* CI ã®åã«ããåå²ããã*/
+		switch (type) {
+
+		case IPCP_CIT_ADDR:	/* IP ã¢ãã¬ã¹ */
+
+		 	/* CI é·ããããã + 4 ãªã¯ãããã§ãªããã°ã¨ã©ã¼ */
+		 	if (cilen != sizeof(T_PPP_CI_HDR) + sizeof(uint32_t))
+				code = PPP_CONFREJ;
+			else {
+				ntoahl(addr, ap);
+				if (addr != ipcp_remote_neg_cfg.in_ifaddr.addr &&
+				    (addr == 0 || ipcp_remote_neg_cfg.in_ifaddr.addr != 0)) {
+					*np ++ = IPCP_CIT_ADDR;
+					*np ++ = sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+					ahtonl(np, ipcp_remote_neg_cfg.in_ifaddr.addr);
+					np  += sizeof(uint32_t);
+					code = PPP_CONFNAK;
+					}
+#if 1	/* è¦ç¢ºèª */
+				else if (addr == 0 && ipcp_remote_neg_cfg.in_ifaddr.addr == 0)
+#else
+				else if (addr == 0 || ipcp_remote_neg_cfg.in_ifaddr.addr == 0)
+#endif
+					code = PPP_CONFREJ;
+				else
+					ipcp_remote_neg_cfg.in_ifaddr.addr = addr;
+				}
+			break;
+
+		default:
+			syslog(LOG_INFO, "[PPP/IPCP] unexp opt: %d.", type);
+			code = PPP_CONFREJ;
+			break;
+			}
+endswitch:
+
+		if (code == PPP_CONFNAK) {
+			/* CI ã®åã Magic Number ã®å ´åãé¤ãã¦ãNAK ã®åæ°ã	*/
+			/* æå¤§å¤ MAX_PPP_FAILURES  ãè¶
+ãããæå¦ããã	*/
+			if (fsm->failures >= MAX_PPP_FAILURES)
+				code = PPP_CONFREJ;
+			else if (final != PPP_CONFREJ)
+				final = PPP_CONFNAK;
+			}
+
+		/* ãã® CI ãæå¦ãã */
+		if (code == PPP_CONFREJ) {
+			if (rp < cp)		/* åã«è©°ããã*/
+				memcpy(rp, cp, cilen);
+			rp += cilen;
+			final = PPP_CONFREJ;
+			}
+
+		ap   += cilen - sizeof(T_PPP_CI_HDR);
+		len  -= cilen - sizeof(T_PPP_CI_HDR);
+		}
+
+	/* æçµçãªé·ããèª¿æ´ããã*/
+	switch (final) {
+	case PPP_CONFNAK:
+		output->len = np - output->buf;
+		memcpy(output->buf, input->buf, sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
+		break;
+	case PPP_CONFREJ:
+		memcpy(output->buf, input->buf, output->len = rp - input->buf);
+		break;
+	case PPP_CONFACK:
+		memcpy(output->buf, input->buf, input->len);
+		break;
+		}
+
+	return final;
+	}
+
+/*
+ *  ipcp_up -- ãªã³ã¯æ¥ç¶ãç¢ºç«ããã
+ */
+
+static void
+ipcp_up (T_PPP_FSM *fsm)
+{
+	/* èªæ§ææ
+å ±ã®åæè¨­å® */
+	ipcp_local_ack_cfg = ipcp_local_neg_cfg;
+
+	/*
+	 *  ãµãããããã¹ã¯ã¨
+	 *  ã­ã¼ã«ã«ã»ãã­ã¼ãã­ã£ã¹ã IP ã¢ãã¬ã¹ãè¨­å®ããã
+	 */
+	ipcp_local_ack_cfg.in_ifaddr.mask = MAKE_IPV4_LOCAL_MASK(ipcp_local_neg_cfg.in_ifaddr.addr);
+
+	/* ç¸æã®æ§ææ
+å ±ã®åæè¨­å® */
+	ipcp_remote_ack_cfg = ipcp_remote_neg_cfg;
+
+	/*
+	 *  ãµãããããã¹ã¯ã¨
+	 *  ã­ã¼ã«ã«ã»ãã­ã¼ãã­ã£ã¹ã IP ã¢ãã¬ã¹ãè¨­å®ããã
+	 */
+	ipcp_remote_ack_cfg.in_ifaddr.mask = MAKE_IPV4_LOCAL_MASK(ipcp_remote_neg_cfg.in_ifaddr.addr);
+
+	sig_sem(SEM_IPCP_READY);
+
+	syslog(LOG_NOTICE, "[PPP/IPCP] up, Local IP Addr: %s, Remote IP Addr: %s.",
+	                   ip2str(NULL, &ipcp_local_neg_cfg.in_ifaddr.addr),
+	                   ip2str(NULL, &ipcp_remote_neg_cfg.in_ifaddr.addr));
+	}
+
+/*
+ *  ipcp_down -- ãªã³ã¯æ¥ç¶ãè§£æ¾ããã
+ */
+
+static void
+ipcp_down (T_PPP_FSM *fsm)
+{
+	sig_sem(SEM_IPCP_READY);
+	syslog(LOG_NOTICE, "[PPP/IPCP] down.");
+	}
+
+/*
+ *  ipcp_finished -- ä¸ä½å±¤ãçµäºããã
+ */
+
+static void
+ipcp_finished (T_PPP_FSM *fsm)
+{
+	}
+
+/*
+ *  ipcp_protrej -- Proto-REJ ãåä¿¡ããã¨ãã®å¦ç
+ */
+
+static void
+ipcp_protrej (void)
+{
+	fsm_lowerdown(&ipcp_fsm);
+	}
+
+/*
+ *  ipcp_lowerup -- IPCP ä¸ä½å±¤ãèµ·åããã
+ */
+
+static void
+ipcp_lowerup (void)
+{
+	fsm_lowerup(&ipcp_fsm);
+	}
+
+/*
+ *  ipcp_lowerdown -- IPCP ä¸ä½å±¤ãåæ­¢ããã
+ */
+
+static void
+ipcp_lowerdown (void)
+{
+	fsm_lowerdown(&ipcp_fsm);
+	}
+
+/*
+ *  ipcp_open -- IPCP ã®ãªã¼ãã³
+ */
+
+static void
+ipcp_open (void)
+{
+	fsm_open(&ipcp_fsm);
+	}
+
+/*
+ *  ipcp_close -- IPCP ã®ã¯ã­ã¼ãº
+ */
+
+static void
+ipcp_close (void)
+{
+	fsm_close(&ipcp_fsm);
+	}
+
+#endif	/* fo #ifdef SUPPORT_PPP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_ipcp.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_ipcp.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_ipcp.h	(revision 270)
@@ -0,0 +1,143 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * ipcp.h - IP Control Protocol definitions.
+ *
+ * Copyright (c) 1989 Carnegie Mellon University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by Carnegie Mellon University.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/usr.sbin/pppd/ipcp.h,v 1.9.2.1 1999/08/29 15:47:01 peter Exp $
+ */
+
+/*
+ *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
+ *
+ *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the Internet Initiative Japan.  The name of the
+ * IIJ may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/usr.sbin/ppp/ipcp.h,v 1.30.2.2 2000/06/15 17:08:28 brian Exp $
+ *
+ *	TODO:
+ */
+
+#ifndef _PPP_IPCP_H_
+#define _PPP_IPCP_H_
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  IPCP ã®æ§ææ
+å ± (CI)
+ */
+
+/*
+ *  CI ã®å
+ */
+
+#define IPCP_CIT_ADDRS		UINT_C(1)	/* IP ã¢ãã¬ã¹ (å»æ£)	*/
+#define IPCP_CIT_COMP_TYPE	UINT_C(2)	/* å§ç¸®æ¹å¼		*/
+#define IPCP_CIT_ADDR		UINT_C(3)	/* IP ã¢ãã¬ã¹		*/
+
+/*
+ *  åæ¹åç
+§
+ */
+
+#ifndef T_IFNET_DEFINED
+
+typedef struct t_ifnet T_IFNET;
+
+#define T_IFNET_DEFINED
+
+#endif	/* of #ifndef T_IFNET_DEFINED */
+
+/*
+ *  å¤æ°
+ */
+
+#ifdef T_PPP_FSM_DEFINED
+extern T_PPP_FSM	ipcp_fsm;
+#endif	/* of #ifdef T_PPP_FSM_DEFINED */
+
+#ifdef T_PPP_PROTENT_DEFINED
+extern T_PPP_PROTENT	ipcp_protent;
+#endif	/* of #ifdef T_PPP_PROTENT_DEFINED */
+
+extern T_IFNET	ipcp_local_ack_cfg;
+extern T_IFNET	ipcp_remote_ack_cfg;
+
+/*
+ *  é¢æ°
+ */
+
+extern ER wait_ipcp (void);
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#endif	/* of #ifndef _PPP_IPCP_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_lcp.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_lcp.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_lcp.c	(revision 270)
@@ -0,0 +1,1374 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * lcp.c - PPP Link Control Protocol.
+ *
+ * Copyright (c) 1989 Carnegie Mellon University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by Carnegie Mellon University.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/*
+ *	      PPP Link Control Protocol (LCP) Module
+ *
+ *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
+ *
+ *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the Internet Initiative Japan, Inc.  The name of the
+ * IIJ may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/usr.sbin/ppp/lcp.c,v 1.81.2.3 2000/08/19 09:30:04 brian Exp $
+ *
+ */
+
+#include <string.h>
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/net.h>
+#include <net/net_var.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+#include <net/ppp.h>
+#include <net/ppp_var.h>
+#include <net/ppp_hdlc.h>
+#include <net/ppp_auth.h>
+#include <net/ppp_fsm.h>
+#include <net/ppp_lcp.h>
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  é¢æ°
+ */
+
+static void lcp_init    (void);
+static void lcp_protrej (void);
+static void lcp_input   (T_NET_BUF *input);
+
+#if DEF_LCP_LOCAL_CFGS & LCP_CFG_MAGIC
+
+static void send_echo_req  (T_PPP_FSM *fsm);
+static void recv_echo_rep  (T_PPP_FSM *fsm, uint8_t id, T_NET_BUF *input);
+static void echo_timeout   (void *arg);
+static void echo_lowerup   (void);
+static void echo_lowerdown (void);
+
+#endif	/* of #if DEF_LCP_LOCAL_CFGS & LCP_CFG_MAGIC */
+
+/*
+ * FSM ããå¼åºãããã³ã¼ã«ããã¯é¢æ°
+ */
+
+static void  lcp_resetci(T_PPP_FSM *fsm);	/* èªæ§ææ
+å ±ããªã»ããããã	*/
+static int_t lcp_cilen	(T_PPP_FSM *fsm);	/* æ§ææ
+å ±ã®é·ããè¿ãã		*/
+static void  lcp_addci	(T_PPP_FSM *fsm, T_NET_BUF *output);
+						/* èªæ§ææ
+å ±ãè¿½å ããã		*/
+static bool_t lcp_ackci	(T_PPP_FSM *fsm, T_NET_BUF *input);
+						/* ACK ãåä¿¡ããã¨ãã®å¦ç	*/
+static bool_t lcp_nakci	(T_PPP_FSM *fsm, T_NET_BUF *input);
+						/* NAK ãåä¿¡ããã¨ãã®å¦ç	*/
+static bool_t lcp_rejci	(T_PPP_FSM *fsm, T_NET_BUF *input);
+						/* REJ ãåä¿¡ããã¨ãã®å¦ç	*/
+static int_t lcp_reqci	(T_PPP_FSM *fsm, T_NET_BUF *input, T_NET_BUF *output);
+						/* ç¸æã®æ§ææ
+å ±ãç¢ºèªããã	*/
+static void lcp_up	(T_PPP_FSM *fsm);	/* ãªã³ã¯æ¥ç¶ãç¢ºç«ããã		*/
+static void lcp_starting(T_PPP_FSM *fsm);	/* ä¸ä½å±¤ãéå§ããã		*/
+static bool_t lcp_extcode	(T_PPP_FSM *fsm, uint8_t code, uint8_t id, T_NET_BUF *input);
+						/* ä¸æãª CP ãåä¿¡ããã¨ãã®å¦ç	*/
+static void lcp_rprotrej(T_PPP_FSM *fsm, T_NET_BUF *input);
+						/* Proto-REJ ãåä¿¡ããã¨ãã®å¦ç	*/
+/*
+ *  å¤æ°
+ */
+
+static T_LCP_CONFIGS lcp_def_cfg = {		/* æ§ææ
+å ±ã®åæè¨­å®å¤		*/
+	DEF_REMOTE_ACCM,			/* ACCM				*/
+
+#ifdef LCP_CFG_MAGIC
+
+	ULONG_C(0),				/* ãã¸ãã¯çªå·			*/
+
+#endif	/* of #ifdef LCP_CFG_MAGIC */
+
+	DEF_PPP_MTU,				/* MRU				*/
+	UINT_C(0),				/* ãªãã·ã§ã³ãã©ã°		*/
+	};
+
+static T_LCP_CONFIGS lcp_local_def_cfg = {	/* èªæ§ææ
+å ±ã®è¦å®å¤		*/
+	DEF_LOCAL_ACCM,				/* ACCM				*/
+
+#ifdef LCP_CFG_MAGIC
+
+	ULONG_C(0),				/* ãã¸ãã¯çªå·			*/
+
+#endif	/* of #ifdef LCP_CFG_MAGIC */
+
+	DEF_PPP_MTU,				/* MRU				*/
+	DEF_LCP_LOCAL_CFGS,			/* ãªãã·ã§ã³ãã©ã°		*/
+	};
+
+static T_LCP_CONFIGS lcp_local_neg_cfg;		/* ãã´ä¸­ã®èªæ§ææ
+å ±		*/
+
+static T_LCP_CONFIGS lcp_remote_neg_cfg;	/* ãã´ä¸­ã®ç¸æã®æ§ææ
+å ±		*/
+
+#if DEF_LCP_LOCAL_CFGS & LCP_CFG_MAGIC
+
+static uint8_t echo_pending  = UINT_C(0);
+static uint8_t echo_number   = UINT_C(0);
+static uint8_t timer_running = false;
+
+#endif	/* of #if DEF_LCP_LOCAL_CFGS & LCP_CFG_MAGIC */
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+T_PPP_FSM_CALLBACKS lcp_callbacks = {
+	lcp_resetci,			/* èªæ§ææ
+å ±ããªã»ããããã	*/
+	lcp_cilen,			/* æ§ææ
+å ±ã®é·ããè¿ãã		*/
+	lcp_addci,			/* èªæ§ææ
+å ±ãè¿½å ããã		*/
+	lcp_ackci,			/* ACK ãåä¿¡ããã¨ãã®å¦ç	*/
+	lcp_nakci,			/* NAK ãåä¿¡ããã¨ãã®å¦ç	*/
+	lcp_rejci,			/* REJ ãåä¿¡ããã¨ãã®å¦ç	*/
+	lcp_reqci,			/* ç¸æã®æ§ææ
+å ±ãç¢ºèªããã	*/
+	lcp_up,				/* ãªã³ã¯æ¥ç¶ãç¢ºç«ããã		*/
+	lcp_down,			/* ãªã³ã¯æ¥ç¶ãè§£æ¾ããã		*/
+	lcp_starting,			/* ä¸ä½å±¤ãéå§ããã		*/
+	lcp_finished,			/* ä¸ä½å±¤ãçµäºããã		*/
+	NULL,				/* åéããã			*/
+	lcp_extcode,			/* ä¸æãª CP ãåä¿¡ããã¨ãã®å¦ç	*/
+	};
+
+T_PPP_FSM lcp_fsm = {
+	&lcp_callbacks,			/* ã³ã¼ã«ããã¯é¢æ°		*/
+	PPP_LCP,			/* ãã­ãã³ã«			*/
+	};
+
+T_PPP_PROTENT lcp_protent = {
+	PPP_LCP,
+	lcp_init,			/* åæå			*/
+	lcp_input,			/* å
+¥å				*/
+	lcp_protrej,			/* Proto-REJ åä¿¡å¦ç		*/
+	NULL,				/* ä¸ä½å±¤ãèµ·åãã		*/
+	lcp_lowerdown,			/* ä¸ä½å±¤ãåæ­¢ãã		*/
+	NULL,				/* ãªã¼ãã³ãã			*/
+	lcp_close,			/* ã¯ã­ã¼ãºãã			*/
+	NULL,				/* ãã¼ã¿å
+¥å			*/
+	};
+
+T_LCP_CONFIGS lcp_local_ack_cfg;	/* ç¸æã«è¨±å¯ãããã®èªæ§ææ
+å ±	*/
+T_LCP_CONFIGS lcp_remote_ack_cfg;	/* ç¸æã«è¨±å¯ããæ§ææ
+å ±		*/
+
+/*
+ *  lcp_init -- LCP ã¢ã¸ã¥ã¼ã«ã®åæå
+ */
+
+static void
+lcp_init (void)
+{
+	fsm_init(&lcp_fsm);
+	}
+
+/*
+ *  lcp_input -- LCP å
+¥å
+ */
+
+static void
+lcp_input (T_NET_BUF *input)
+{
+	NET_COUNT_PPP_LCP(net_count_ppp_lcp_in_octets,  input->len);
+	NET_COUNT_PPP_LCP(net_count_ppp_lcp_in_packets, 1);
+	fsm_input(&lcp_fsm, input);
+	}
+
+/*
+ *  lcp_resetci -- LCPã®æ§ææ
+å ±ããªã»ããããã
+ */
+
+static void
+lcp_resetci (T_PPP_FSM *fsm)
+{
+#ifdef LCP_CFG_MAGIC
+
+	SYSTIM	time;
+
+#endif	/* of #ifdef LCP_CFG_MAGIC */
+
+	/* èªæ§ææ
+å ±ã®åæè¨­å® */
+	lcp_local_neg_cfg	= lcp_local_def_cfg;
+	lcp_local_ack_cfg	= lcp_def_cfg;
+
+	/* ç¸æã®æ§ææ
+å ±ã®åæè¨­å® */
+	lcp_remote_neg_cfg	= lcp_def_cfg;
+	lcp_remote_ack_cfg	= lcp_def_cfg;
+
+#ifdef LCP_CFG_MAGIC
+
+	syscall(get_tim(&time));
+	net_srand((unsigned int)time);
+	lcp_local_neg_cfg.magic = net_rand();
+
+#endif	/* of #ifdef LCP_CFG_MAGIC */
+
+	auth_reset();
+	}
+
+/*
+ *  lcp_cilen -- æ§ææ
+å ±ã®é·ããè¿ãã
+ */
+
+static int_t
+lcp_cilen (T_PPP_FSM *fsm)
+{
+	int_t cilen = 0;
+
+	if (lcp_local_neg_cfg.options & LCP_CFG_MRU)
+		cilen += sizeof(T_PPP_CI_HDR) + sizeof(uint16_t);	/* MRU   */
+
+	if (lcp_local_neg_cfg.options & LCP_CFG_ACCM)
+		cilen += sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);	/* ACCM  */
+
+#ifdef LCP_CFG_MAGIC
+
+	if (lcp_local_neg_cfg.options & LCP_CFG_MAGIC)
+		cilen += sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);	/* Magic */
+
+#endif	/* of #ifdef LCP_CFG_MAGIC */
+
+#ifdef LCP_CFG_PAP
+
+	if (lcp_local_neg_cfg.options & LCP_CFG_PAP)
+		cilen += sizeof(T_PPP_CI_HDR) + sizeof(uint16_t);	/* PAP   */
+
+#endif	/* of #ifdef LCP_CFG_PAP */
+
+#ifdef LCP_CFG_PCOMP
+
+	if (lcp_local_neg_cfg.options & LCP_CFG_PCOMP)
+		cilen += sizeof(T_PPP_CI_HDR);			/* ãã­ãã³ã«å§ç¸® */
+
+#endif	/* of #ifdef LCP_CFG_PCOMP */
+
+#ifdef LCP_CFG_ACCOMP
+
+	if (lcp_local_neg_cfg.options & LCP_CFG_ACCOMP)
+		cilen += sizeof(T_PPP_CI_HDR);			/* ã¢ãã¬ã¹ã»å¶å¾¡å§ç¸® */
+
+#endif	/* of #ifdef LCP_CFG_ACCOMP */
+
+	return cilen;
+	}
+
+/*
+ *  lcp_addci -- LCPã®æ§ææ
+å ±ãè¿½å ããã
+ */
+
+static void
+lcp_addci (T_PPP_FSM *fsm, T_NET_BUF *output)
+{
+	uint8_t *buf;
+
+	buf = output->buf + sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
+
+	/* MRU ãªãã·ã§ã³ãè¿½å ããã */
+	if (lcp_local_neg_cfg.options & LCP_CFG_MRU) {
+		*buf ++ = LCP_CIT_MRU;
+		*buf ++ = sizeof(T_PPP_CI_HDR) + sizeof(uint16_t);
+		*((uint16_t*)buf) = htons(lcp_local_neg_cfg.MRU);
+		buf += sizeof(uint16_t);
+		}
+
+	/* ACCM ãªãã·ã§ã³ãè¿½å ããã */
+	if (lcp_local_neg_cfg.options & LCP_CFG_ACCM) {
+		*buf ++ = LCP_CIT_ACCM;
+		*buf ++ = sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+		ahtonl(buf, lcp_local_neg_cfg.ACCM);
+		buf += sizeof(uint32_t);
+		}
+
+#ifdef LCP_CFG_MAGIC
+
+	/* Magic Number ãªãã·ã§ã³ãè¿½å ããã */
+	if (lcp_local_neg_cfg.options & LCP_CFG_MAGIC) {
+		*buf ++ = LCP_CIT_MAGIC;
+		*buf ++ = sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+		ahtonl(buf, lcp_local_neg_cfg.magic);
+		buf += sizeof(uint32_t);
+		}
+
+#endif	/* of #ifdef LCP_CFG_MAGIC */
+
+#ifdef LCP_CFG_PAP
+
+	/* èªè¨¼ãã­ãã³ã«ãªãã·ã§ã³ãè¿½å ããã */
+	if (lcp_local_neg_cfg.options & LCP_CFG_PAP) {
+		*buf ++ = LCP_CIT_AUTH;
+		*buf ++ = sizeof(T_PPP_CI_HDR) + sizeof(uint16_t);
+		*((uint16_t*)buf) = htons(PPP_PAP);
+		buf += sizeof(uint16_t);
+		}
+
+#endif	/* of #ifdef LCP_CFG_PAP */
+
+#ifdef LCP_CFG_PCOMP
+
+	/* ãã­ãã³ã«å§ç¸®ãªãã·ã§ã³ãè¿½å ããã */
+	if (lcp_local_neg_cfg.options & LCP_CFG_PCOMP) {
+		*buf ++ = LCP_CIT_PCOMP;
+		*buf ++ = sizeof(T_PPP_CI_HDR);
+		}
+
+#endif	/* of #ifdef LCP_CFG_PCOMP */
+
+#ifdef LCP_CFG_ACCOMP
+
+	/* ã¢ãã¬ã¹ã»å¶å¾¡å§ç¸®ãªãã·ã§ã³ãè¿½å ããã */
+	if (lcp_local_neg_cfg.options & LCP_CFG_ACCOMP) {
+		*buf ++ = LCP_CIT_ACCOMP;
+		*buf ++ = sizeof(T_PPP_CI_HDR);
+		}
+
+#endif	/* of #ifdef LCP_CFG_ACCOMP */
+	}
+
+/*
+ *  lcp_ackci -- ACK ãåä¿¡ããã¨ãã®å¦ç
+ *
+ *	æ»ãå¤:	TURE  ACK ã¯æ­£å¸¸
+ *		false ACK ã¯ç°å¸¸
+ */
+
+static bool_t
+lcp_ackci (T_PPP_FSM *fsm, T_NET_BUF *input)
+{
+	uint8_t		*buf;
+	uint16_t	len;
+
+	buf = input->buf +  sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
+	len = input->len - (sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
+
+	/*
+	 *  æ§ææ
+å ±ã¯éä¿¡ããé ã«å®å
+¨ã«ä¸è´ããªããã°ãªããªãã
+	 *  å¾ã£ã¦ãlcp_addci ã§ä½æããé ã«è§£æããã
+	 */
+
+	/* MRU ãªãã·ã§ã³ãè§£æããã */
+	if (lcp_local_neg_cfg.options & LCP_CFG_MRU) {
+		if (len < sizeof(T_PPP_CI_HDR) + sizeof(uint16_t)	||
+		    *buf ++ != LCP_CIT_MRU			||
+		    *buf ++ != sizeof(T_PPP_CI_HDR) + sizeof(uint16_t)||
+		    *((uint16_t*)buf) != htons(lcp_local_neg_cfg.MRU)	)
+			return false;
+		buf += sizeof(uint16_t);
+		len -= sizeof(T_PPP_CI_HDR) + sizeof(uint16_t);
+		}
+
+	/* ACCM ãªãã·ã§ã³ãè§£æããã */
+	if (lcp_local_neg_cfg.options & LCP_CFG_ACCM) {
+		if (len < sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)	||
+		    *buf ++ != LCP_CIT_ACCM			||
+		    *buf ++ != sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)||
+		    nahcmpl(buf, lcp_local_neg_cfg.ACCM)        )
+			return false;
+		buf += sizeof(uint32_t);
+		len -= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+		}
+
+#ifdef LCP_CFG_MAGIC
+
+	/* Magic Number ãªãã·ã§ã³ãè§£æããã */
+	if (lcp_local_neg_cfg.options & LCP_CFG_MAGIC) {
+		if (len < sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)	||
+		    *buf ++ != LCP_CIT_MAGIC			||
+		    *buf ++ != sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)||
+		    nahcmpl(buf, lcp_local_neg_cfg.magic)       )
+			return false;
+		buf += sizeof(uint32_t);
+		len -= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+		}
+
+#endif	/* of #ifdef LCP_CFG_MAGIC */
+
+#ifdef LCP_CFG_PAP
+
+	/* èªè¨¼ãã­ãã³ã«ãªãã·ã§ã³ãè§£æããã */
+	if (lcp_local_neg_cfg.options & LCP_CFG_PAP) {
+		if (len < sizeof(T_PPP_CI_HDR) + sizeof(uint16_t)	||
+		    *buf ++ != LCP_CIT_AUTH			||
+		    *buf ++ != sizeof(T_PPP_CI_HDR) + sizeof(uint16_t)||
+		    *((uint16_t*)buf) != htons(PPP_PAP)		)
+			return false;
+		buf += sizeof(uint16_t);
+		len -= sizeof(T_PPP_CI_HDR) + sizeof(uint16_t);
+		}
+
+#endif	/* of #ifdef LCP_CFG_PAP */
+
+#ifdef LCP_CFG_PCOMP
+
+	/* ãã­ãã³ã«å§ç¸®ãªãã·ã§ã³ãè§£æããã */
+	if (lcp_local_neg_cfg.options & LCP_CFG_PCOMP) {
+		if (len < sizeof(T_PPP_CI_HDR)			||
+		    *buf ++ != LCP_CIT_PCOMP			||
+		    *buf ++ != sizeof(T_PPP_CI_HDR))
+			return false;
+		len -= sizeof(T_PPP_CI_HDR);
+		}
+
+#endif	/* of #ifdef LCP_CFG_PCOMP */
+
+#ifdef LCP_CFG_ACCOMP
+
+	/* ã¢ãã¬ã¹ã»å¶å¾¡å§ç¸®ãªãã·ã§ã³ãè§£æããã */
+	if (lcp_local_neg_cfg.options & LCP_CFG_ACCOMP) {
+		if (len < sizeof(T_PPP_CI_HDR)			||
+		    *buf ++ != LCP_CIT_ACCOMP			||
+		    *buf ++ != sizeof(T_PPP_CI_HDR))
+			return false;
+		len -= sizeof(T_PPP_CI_HDR);
+		}
+
+#endif	/* of #ifdef LCP_CFG_ACCOMP */
+	return true;
+	}
+
+/*
+ *  lcp_nakci -- NAK ãåä¿¡ããã¨ãã®å¦ç
+ *
+ *	æ»ãå¤:	1  NAK ã¯æ­£å¸¸
+ *		0  NAK ã¯ç°å¸¸
+ */
+
+static int_t
+lcp_nakci (T_PPP_FSM *fsm, T_NET_BUF *input)
+{
+	T_LCP_CONFIGS	new_cfg;
+	bool_t		loop = false;	/* ã«ã¼ãããã¯ããã§ãã¯ */
+	uint32_t	cilong;
+	uint16_t	cishort, len;
+	uint8_t		*buf, cilen;
+
+	buf = input->buf +  sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
+	len = input->len - (sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
+
+	new_cfg = lcp_local_neg_cfg;
+
+	/* MRU ãªãã·ã§ã³ãè§£æããã */
+	if (len >= sizeof(T_PPP_CI_HDR) + sizeof(uint16_t)		&&
+	    * buf      == LCP_CIT_MRU				&&
+	    *(buf + 1) == sizeof(T_PPP_CI_HDR) + sizeof(uint16_t)	&&
+	    (lcp_local_neg_cfg.options & LCP_CFG_MRU)) {
+	    	cishort = ntohs(*((uint16_t*)(buf + 2)));
+		buf += sizeof(T_PPP_CI_HDR) + sizeof(uint16_t);
+		len -= sizeof(T_PPP_CI_HDR) + sizeof(uint16_t);
+		if (cishort <= lcp_local_neg_cfg.MRU || cishort <= DEF_PPP_MTU)
+			new_cfg.MRU = cishort;
+		}
+
+	/* ACCM ãªãã·ã§ã³ãè§£æããã */
+	if (len >= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)		&&
+	    * buf      == LCP_CIT_ACCM				&&
+	    *(buf + 1) == sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)	&&
+	    (lcp_local_neg_cfg.options & LCP_CFG_ACCM)) {
+	    	ntoahl(cilong, buf + 2);
+		buf += sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+		len -= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+		new_cfg.ACCM |= cilong;
+		}
+
+#ifdef LCP_CFG_MAGIC
+
+	/* Magic Number ãªãã·ã§ã³ãè§£æããã */
+	if (len >= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)		&&
+	    * buf      == LCP_CIT_MAGIC				&&
+	    *(buf + 1) == sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)	&&
+	    (lcp_local_neg_cfg.options & LCP_CFG_MAGIC)) {
+	    	ntoahl(cilong, buf + 2);
+		buf += sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+		len -= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+		new_cfg.magic = cilong;
+		loop = true;
+		}
+
+#endif	/* of #ifdef LCP_CFG_MAGIC */
+
+#ifdef LCP_CFG_PAP
+
+	/* èªè¨¼ãã­ãã³ã«ãªãã·ã§ã³ãè§£æããã */
+	if (len >= sizeof(T_PPP_CI_HDR) + sizeof(uint16_t)		&&
+	    * buf      == LCP_CIT_AUTH				&&
+	    *(buf + 1) == sizeof(T_PPP_CI_HDR) + sizeof(uint16_t)	&&
+	    (lcp_local_neg_cfg.options & LCP_CFG_PAP)) {
+	    	cishort = ntohs(*((uint16_t*)(buf + 2)));
+		buf += sizeof(T_PPP_CI_HDR) + sizeof(uint16_t);
+		len -= sizeof(T_PPP_CI_HDR) + sizeof(uint16_t);
+		if (cishort == PPP_PAP)
+			new_cfg.options &= ~LCP_CFG_PAP;
+		else
+			return 0;
+		}
+
+#endif	/* of #ifdef LCP_CFG_PAP */
+
+#ifdef LCP_CFG_PCOMP
+
+	/* ãã­ãã³ã«å§ç¸®ãªãã·ã§ã³ãè§£æããã */
+	if (len >= sizeof(T_PPP_CI_HDR)				&&
+	    * buf      == LCP_CIT_PCOMP				&&
+	    *(buf + 1) == sizeof(T_PPP_CI_HDR)			&&
+	    (lcp_local_neg_cfg.options & LCP_CFG_PCOMP)) {
+		buf += sizeof(T_PPP_CI_HDR);
+		len -= sizeof(T_PPP_CI_HDR);
+		new_cfg.options &= ~LCP_CFG_PCOMP;
+		}
+
+#endif	/* of #ifdef LCP_CFG_PCOMP */
+
+#ifdef LCP_CFG_ACCOMP
+
+	/* ã¢ãã¬ã¹ã»å¶å¾¡å§ç¸®ãªãã·ã§ã³ãè§£æããã */
+	if (len >= sizeof(T_PPP_CI_HDR)				&&
+	    * buf      == LCP_CIT_ACCOMP			&&
+	    *(buf + 1) == sizeof(T_PPP_CI_HDR)			&&
+	    (lcp_local_neg_cfg.options & LCP_CFG_ACCOMP)) {
+		buf += sizeof(T_PPP_CI_HDR);
+		len -= sizeof(T_PPP_CI_HDR);
+		new_cfg.options &= ~LCP_CFG_ACCOMP;
+		}
+
+#endif	/* of #ifdef LCP_CFG_ACCOMP */
+
+	/* å¾ã¯ç¡è¦ããã*/
+	while (len > sizeof(T_PPP_CI_HDR)) {
+		cilen = *(buf + 1);
+		if (len < cilen)
+			return 0;
+		buf += cilen;
+		len -= cilen;
+		}
+
+	/* é·ãã 0 ã§ãªããã°ã¨ã©ã¼ */
+	if (len != 0)
+		return 0;
+
+	/* æ°ãããªãã·ã§ã³ãè¨­å®ããã*/
+	if (fsm->state != PPP_FSM_OPENED) {
+		if (loop) {
+			syslog(LOG_WARNING, "[PPP/LCP] line looped.");
+			lcp_close();
+			}
+		lcp_local_neg_cfg = new_cfg;
+		}
+	return 1;
+	}
+
+/*
+ *  lcp_rejci -- REJ ãåä¿¡ããã¨ãã®å¦ç
+ *
+ *	æ»ãå¤:	1  REJ ã¯æ­£å¸¸
+ *		0  REJ ã¯ç°å¸¸
+ */
+
+static int_t
+lcp_rejci (T_PPP_FSM *fsm, T_NET_BUF *input)
+{
+	T_LCP_CONFIGS	new_cfg;
+	uint32_t	cilong;
+	uint16_t	cishort, len;
+	uint8_t		*buf;
+
+	buf = input->buf +  sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
+	len = input->len - (sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
+
+	new_cfg = lcp_local_neg_cfg;
+
+	/* MRU ãªãã·ã§ã³ãè§£æããã */
+	if (len >= sizeof(T_PPP_CI_HDR) + sizeof(uint16_t)		&&
+	    * buf      == LCP_CIT_MRU					&&
+	    *(buf + 1) == sizeof(T_PPP_CI_HDR) + sizeof(uint16_t)	&&
+	    (lcp_local_neg_cfg.options & LCP_CFG_MRU)) {
+	    	cishort = ntohs(*((uint16_t*)(buf + 2)));
+		buf += sizeof(T_PPP_CI_HDR) + sizeof(uint16_t);
+		len -= sizeof(T_PPP_CI_HDR) + sizeof(uint16_t);
+		if (cishort != lcp_local_neg_cfg.MRU)
+			return 0;
+		else
+			new_cfg.options &= ~LCP_CFG_MRU;
+		}
+		
+	/* ACCM ãªãã·ã§ã³ãè§£æããã */
+	if (len >= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)		&&
+	    * buf      == LCP_CIT_ACCM					&&
+	    *(buf + 1) == sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)	&&
+	    (lcp_local_neg_cfg.options & LCP_CFG_ACCM)) {
+	    	ntoahl(cilong, buf + 2);
+		buf += sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+		len -= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+		if (cilong != lcp_local_neg_cfg.ACCM)
+			return 0;
+		else
+			new_cfg.options &= ~LCP_CFG_ACCM;
+		}
+
+#ifdef LCP_CFG_MAGIC
+
+	/* Magic Number ãªãã·ã§ã³ãè§£æããã */
+	if (len >= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)		&&
+	    * buf      == LCP_CIT_MAGIC					&&
+	    *(buf + 1) == sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)	&&
+	    (lcp_local_neg_cfg.options & LCP_CFG_MAGIC)) {
+	    	ntoahl(cilong, buf + 2);
+		buf += sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+		len -= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+		if (cilong != lcp_local_neg_cfg.magic)
+			return 0;
+		else
+			new_cfg.options &= ~LCP_CFG_MAGIC;
+		}
+
+#endif	/* of #ifdef LCP_CFG_MAGIC */
+
+#ifdef LCP_CFG_PAP
+
+	/* èªè¨¼ãã­ãã³ã«ãªãã·ã§ã³ãè§£æããã */
+	if (len >= sizeof(T_PPP_CI_HDR) + sizeof(uint16_t)		&&
+	    * buf      == LCP_CIT_AUTH					&&
+	    *(buf + 1) == sizeof(T_PPP_CI_HDR) + sizeof(uint16_t)	&&
+	    (lcp_local_neg_cfg.options & LCP_CFG_PAP)) {
+	    	cishort = ntohs(*((uint16_t*)(buf + 2)));
+		buf += sizeof(T_PPP_CI_HDR) + sizeof(uint16_t);
+		len -= sizeof(T_PPP_CI_HDR) + sizeof(uint16_t);
+		if (cishort != PPP_PAP)
+			return 0;
+		else
+			new_cfg.options &= ~LCP_CFG_PAP;
+		}
+
+#endif	/* of #ifdef LCP_CFG_PAP */
+
+#ifdef LCP_CFG_PCOMP
+
+	/* ãã­ãã³ã«å§ç¸®ãªãã·ã§ã³ãè§£æããã */
+	if (len >= sizeof(T_PPP_CI_HDR)				&&
+	    * buf      == LCP_CIT_PCOMP				&&
+	    *(buf + 1) == sizeof(T_PPP_CI_HDR)			&&
+	    (lcp_local_neg_cfg.options & LCP_CFG_PCOMP)) {
+		buf += sizeof(T_PPP_CI_HDR);
+		len -= sizeof(T_PPP_CI_HDR);
+		new_cfg.options &= ~LCP_CFG_PCOMP;
+		}
+
+#endif	/* of #ifdef LCP_CFG_PCOMP */
+
+#ifdef LCP_CFG_ACCOMP
+
+	/* ã¢ãã¬ã¹ã»å¶å¾¡å§ç¸®ãªãã·ã§ã³ãè§£æããã */
+	if (len >= sizeof(T_PPP_CI_HDR)				&&
+	    * buf      == LCP_CIT_ACCOMP			&&
+	    *(buf + 1) == sizeof(T_PPP_CI_HDR)			&&
+	    (lcp_local_neg_cfg.options & LCP_CFG_ACCOMP)) {
+		buf += sizeof(T_PPP_CI_HDR);
+		len -= sizeof(T_PPP_CI_HDR);
+		new_cfg.options &= ~LCP_CFG_ACCOMP;
+		}
+
+#endif	/* of #ifdef LCP_CFG_ACCOMP */
+
+	/* é·ãã 0 ã§ãªããã°ã¨ã©ã¼ */
+	if (len != 0)
+		return 0;
+
+	/* æ°ãããªãã·ã§ã³ãè¨­å®ããã*/
+	if (fsm->state != PPP_FSM_OPENED)
+		lcp_local_neg_cfg = new_cfg;
+
+	return 1;
+	}
+
+/*
+ *  lcp_reqci -- ç¸æã®æ§ææ
+å ±ãè§£æããã
+ */
+
+static int_t
+lcp_reqci (T_PPP_FSM *fsm, T_NET_BUF *input, T_NET_BUF *output)
+{
+#if DEF_LCP_REMOTE_CFGS & LCP_CFG_MAGIC
+
+	uint32_t	cilong;
+
+#endif	/* of #if DEF_LCP_REMOTE_CFGS & LCP_CFG_MAGIC */
+
+	uint16_t	code, final, len, cilen, cishort;
+	uint8_t		*np, *rp, *ap, *cp, type = 0;
+
+	rp = ap = input->buf + sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
+				/* rp: REJãap: ACK ãã CI ã®ãã¤ã³ã¿		*/
+				/* æå¦ããå ´åã¯ãå¼æ° input ã«ä¸æ¸ãããã	*/
+	len   = input->len - (sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
+	np    = output->buf + sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
+	final = PPP_CONFACK;	/* æçµçã«éä¿¡ããã³ã¼ã */
+	while (len > 0) {
+		code = PPP_CONFACK;
+		cp   = ap;	/* cp: ç¾å¨å¦çä¸­ã® CI	*/
+
+		if (len < sizeof(T_PPP_CI_HDR)) {
+
+			/* æ®ãã CI ãããããç­ã */
+			syslog(LOG_WARNING, "[PPP/LCP] bad CI len: %d.", len);
+			cilen = len;	/* ãã¼ã¿é·ãç°å¸¸ã®å ´åã®å¦ç½®	*/
+			len   = 0;	/* ã«ã¼ãããæããã		*/
+			code  = PPP_CONFREJ;
+			goto endswitch;
+			}
+
+		type  = *ap ++;	/* CI ã®å		*/
+		cilen = *ap ++;	/* CI ã®é·ã		*/
+		if (len < cilen) {
+
+			/* æ®ãã CI é·ããç­ã */
+			syslog(LOG_WARNING, "[PPP/LCP] bad CI len: %d.", cilen);
+			cilen = len;	/* ãã¼ã¿é·ãç°å¸¸ã®å ´åã®å¦ç½®	*/
+			len   = 0;	/* ã«ã¼ãããæããã		*/
+			code  = PPP_CONFREJ;
+			goto endswitch;
+			}
+		len -= sizeof(T_PPP_CI_HDR);
+
+		/* CI ã®åã«ããåå²ããã*/
+		switch (type) {
+
+		case LCP_CIT_MRU:	/* æå¤§åä¿¡é (Maximum Receive Unit) */
+
+#if (DEF_LCP_REMOTE_CFGS & LCP_CFG_MRU) == 0
+
+			code = PPP_CONFREJ;
+
+#else	/* of #if (DEF_LCP_REMOTE_CFGS & LCP_CFG_MRU) == 0 */
+
+		 	/* CI é·ããããã + 2 ãªã¯ãããã§ãªããã° REJ */
+		 	if (cilen != sizeof(T_PPP_CI_HDR) + sizeof(uint16_t))
+				code = PPP_CONFREJ;
+			{
+				cishort = ntohs(*(uint16_t*)ap);
+
+				/* æå°åä¿¡éããå°ãããã° NAK */
+				if (cishort < MIN_PPP_MTU) {
+					*np ++ = LCP_CIT_MRU;
+					*np ++ = sizeof(T_PPP_CI_HDR) + sizeof(uint16_t);
+					*((uint16_t*)np) = htons(MIN_PPP_MTU);
+					np  += sizeof(uint16_t);
+					code = PPP_CONFNAK;
+					}
+				else {
+					lcp_remote_neg_cfg.MRU = cishort;
+					lcp_remote_neg_cfg.options |= LCP_CFG_MRU;
+					}
+				}
+
+#endif	/* of #if (DEF_LCP_REMOTE_CFGS & LCP_CFG_MRU) == 0 */
+
+			break;
+
+		case LCP_CIT_ACCM:	/* Async Control Character Map */
+
+#if (DEF_LCP_REMOTE_CFGS & LCP_CFG_ACCM) == 0
+
+			code = PPP_CONFREJ;
+
+#else	/* of #if (DEF_LCP_REMOTE_CFGS & LCP_CFG_ACCM) == 0 */
+
+		 	/* CI é·ããããã + 4 ãªã¯ãããã§ãªããã° REJ */
+		 	if (cilen != sizeof(T_PPP_CI_HDR) + sizeof(uint32_t))
+				code = PPP_CONFREJ;
+			else {
+				ntoahl(lcp_remote_neg_cfg.ACCM, ap);
+				lcp_remote_neg_cfg.options |= LCP_CFG_ACCM;
+				}
+
+#endif	/* of #if (DEF_LCP_REMOTE_CFGS & LCP_CFG_ACCM) == 0 */
+
+			break;
+
+		case LCP_CIT_MAGIC:	/* ãã¸ãã¯çªå· */
+
+#if (DEF_LCP_REMOTE_CFGS & LCP_CFG_MAGIC) == 0
+
+			code = PPP_CONFREJ;
+
+#else	/* of #if (DEF_LCP_REMOTE_CFGS & LCP_CFG_MAGIC) == 0 */
+
+		 	/* CI é·ããããã + 4 ãªã¯ãããã§ãªããã° REJ */
+		 	if (cilen != sizeof(T_PPP_CI_HDR) + sizeof(uint32_t))
+				code = PPP_CONFREJ;
+			else {
+				ntoahl(cilong, ap);
+
+				/* çªå·ãèªåã¨åããªã NAK */
+				if (cilong == lcp_local_neg_cfg.magic) {
+					cilong = net_rand();
+					*np ++ = LCP_CIT_MAGIC;
+					*np ++ = sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
+					ahtonl(np, cilong);
+					np  += sizeof(uint32_t);
+					code = PPP_CONFNAK;
+					}
+				else {
+					lcp_remote_neg_cfg.magic = cilong;
+					lcp_remote_neg_cfg.options |= LCP_CFG_MAGIC;
+					}
+				}
+
+#endif	/* of #if (DEF_LCP_REMOTE_CFGS & LCP_CFG_MAGIC) == 0 */
+
+			break;
+
+#ifdef LCP_CFG_PAP
+		/* CHAP ã¯å®è£
+äºå®	*/
+
+		case LCP_CIT_AUTH:	/* èªè¨¼ãã­ãã³ã« */
+
+		 	/* CI é·ããããã + 2 ãªã¯ãããããç­ãã¨ãã¯ã¨ã©ã¼ */
+		 	if (cilen < sizeof(T_PPP_CI_HDR) + sizeof(uint16_t))
+				code = PPP_CONFREJ;
+			else {
+				cishort = ntohs(*(uint16_t*)ap);
+
+				/* èªè¨¼ãã­ãã³ã«ã«ããåå²ãã	*/
+				if (cishort == PPP_PAP &&
+				    cilen   == sizeof(T_PPP_CI_HDR) + sizeof(uint16_t) &&
+			 	    (DEF_LCP_REMOTE_CFGS & LCP_CFG_PAP) != 0)
+					lcp_remote_neg_cfg.options |= LCP_CFG_PAP;
+				else
+					code = PPP_CONFREJ;
+				}
+			break;
+
+#endif	/* of #ifdef LCP_CFG_PAP */
+
+#ifdef LCP_CFG_PCOMP
+
+		case LCP_CIT_PCOMP:	/* ãã­ãã³ã«é¨å§ç¸®ã¯å®è£
+äºå® */
+
+#if (DEF_LCP_REMOTE_CFGS & LCP_CFG_PCOMP) == 0
+
+			code = PPP_CONFREJ;
+
+#else	/* of #if (DEF_LCP_REMOTE_CFGS & LCP_CFG_PCOMP) == 0 */
+
+		 	/* CI é·ãããããé·ã ãã§ãªããã° REJ */
+		 	if (cilen != sizeof(T_PPP_CI_HDR))
+				code = PPP_CONFREJ;
+			else
+				lcp_remote_neg_cfg.options |= LCP_CFG_PCOMP;
+
+#endif	/* of #if (DEF_LCP_REMOTE_CFGS & LCP_CFG_PCOMP) == 0 */
+
+			break;
+
+#endif	/* of #ifdef LCP_CFG_PCOMP */
+
+#ifdef LCP_CFG_ACCOMP
+
+		case LCP_CIT_ACCOMP:	/* ã¢ãã¬ã¹ã»å¶å¾¡é¨å§ç¸® */
+
+#if (DEF_LCP_REMOTE_CFGS & LCP_CFG_ACCOMP) == 0
+
+			code = PPP_CONFREJ;
+
+#else	/* of #if (DEF_LCP_REMOTE_CFGS & LCP_CFG_ACCOMP) == 0 */
+
+		 	/* CI é·ãããããé·ã ãã§ãªããã° REJ */
+		 	if (cilen != sizeof(T_PPP_CI_HDR))
+				code = PPP_CONFREJ;
+			else
+				lcp_remote_neg_cfg.options |= LCP_CFG_ACCOMP;
+
+#endif	/* of #if (DEF_LCP_REMOTE_CFGS & LCP_CFG_ACCOMP) == 0 */
+
+			break;
+
+#endif	/* of #ifdef LCP_CFG_ACCOMP */
+
+		default:
+			syslog(LOG_WARNING, "[PPP/LCP] unexp opt: %d.", type);
+			code  = PPP_CONFREJ;
+			break;
+			}
+endswitch:
+		if (code == PPP_CONFNAK) {
+			/* CI ã®åã Magic Number ã®å ´åãé¤ãã¦ãNAK ã®åæ°ã	*/
+			/* æå¤§å¤ MAX_PPP_FAILURES  ãè¶
+ãããæå¦ããã	*/
+			if (fsm->failures >= MAX_PPP_FAILURES && type != LCP_CIT_MAGIC)
+				code = PPP_CONFREJ;
+			else if (final != PPP_CONFREJ)
+				final = PPP_CONFNAK;
+			}
+
+		/* ãã® CI ãæå¦ãã */
+		if (code == PPP_CONFREJ) {
+			if (rp < cp)		/* åã«è©°ããã*/
+				memcpy(rp, cp, cilen);
+			rp += cilen;
+			final = PPP_CONFREJ;
+			}
+
+		ap   += cilen - sizeof(T_PPP_CI_HDR);
+		len  -= cilen - sizeof(T_PPP_CI_HDR);
+		}
+
+	/* æçµçãªé·ããèª¿æ´ããã*/
+	switch (final) {
+	case PPP_CONFNAK:
+		output->len = np - output->buf;
+		memcpy(output->buf, input->buf, sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
+		break;
+	case PPP_CONFREJ:
+		memcpy(output->buf, input->buf, output->len = rp - input->buf);
+		break;
+	case PPP_CONFACK:
+		memcpy(output->buf, input->buf, input->len);
+		break;
+		}
+	return final;
+	}
+
+/*
+ *  lcp_up -- ãªã³ã¯æ¥ç¶ãç¢ºç«ãã (Phase: Establish ã«ç§»è¡ãã)ã
+ */
+
+static void
+lcp_up (T_PPP_FSM *fsm)
+{
+	/* èªæ§ææ
+å ±ã®è¨­å® */
+	lcp_local_ack_cfg = lcp_local_neg_cfg;
+
+	/* ç¸æã®æ§ææ
+å ±ã®è¨­å® */
+	lcp_remote_ack_cfg = lcp_remote_neg_cfg;
+
+#if DEF_LCP_LOCAL_CFGS & LCP_CFG_MAGIC
+
+	echo_lowerup();
+
+#endif	/* of #if DEF_LCP_LOCAL_CFGS & LCP_CFG_MAGIC */
+
+	link_established();
+	}
+
+/*
+ *  lcp_starting -- ä¸ä½å±¤ãéå§ããã
+ */
+
+static void
+lcp_starting (T_PPP_FSM *fsm)
+{
+	link_required();
+	}
+
+/*
+ *  lcp_extcode -- LCP ç¹æã® CP ãåä¿¡ããã¨ãã®å¦ç
+ */
+
+static bool_t
+lcp_extcode (T_PPP_FSM *fsm, uint8_t code, uint8_t id, T_NET_BUF *input)
+{
+#if DEF_LCP_REMOTE_CFGS & LCP_CFG_MAGIC
+
+	T_NET_BUF *output;
+
+#endif	/* of #if DEF_LCP_REMOTE_CFGS & LCP_CFG_MAGIC */
+
+	switch (code) {
+	case PPP_PROTREJ:
+		lcp_rprotrej(fsm, input);
+		break;
+
+	case PPP_ECHOREQ:
+
+#if DEF_LCP_REMOTE_CFGS & LCP_CFG_MAGIC
+
+		if (fsm->state == PPP_FSM_OPENED) {
+			syscall(get_net_buf(&output, sizeof(T_PPP_HDR)
+			                           + sizeof(T_PPP_CP_HDR)
+			                           + sizeof(uint32_t)));
+			*(uint32_t*)(output->buf + sizeof(T_PPP_HDR)
+			                   + sizeof(T_PPP_CP_HDR)) = lcp_local_ack_cfg.magic;
+			IF_SET_PROTO(output, PPP_LCP);
+			ppp_cp_output(PPP_ECHOREP, id, output);
+			}
+
+#endif	/* of #if DEF_LCP_REMOTE_CFGS & LCP_CFG_MAGIC */
+
+		break;
+
+	case PPP_ECHOREP:
+
+#if DEF_LCP_LOCAL_CFGS & LCP_CFG_MAGIC
+
+		recv_echo_rep(fsm, id, input);
+
+#endif	/* of #if DEF_LCP_LOCAL_CFGS & LCP_CFG_MAGIC */
+
+		break;
+
+	case PPP_DISCREQ:
+		break;
+
+	default:
+		return false;
+		break;
+
+		}
+	return true;
+	}
+
+/*
+ *  lcp_rprotrej -- Proto-REJ ãåä¿¡ããã¨ãã®å¦ç
+ */
+
+static void
+lcp_rprotrej (T_PPP_FSM *fsm, T_NET_BUF *input)
+{
+	T_PPP_PROTENT	*entry;
+	int_t		ix;
+	uint16_t	proto;
+
+	if (input->len < sizeof(uint16_t)) {
+		syslog(LOG_WARNING, "[PPP/LCP] bad len: %d in recv Proto-REJ.");
+		return;
+		}
+
+	proto = ntohs(*GET_PPP_HDR(input));
+
+	if (fsm->state != PPP_FSM_OPENED) {
+		return;
+		}
+
+	/* ä¸ä½ãã­ãã³ã«ãåæåãã */
+	for (ix = 0; (entry = protocols[ix]) != NULL; ix ++)
+		if (entry->proto == proto) {
+			(*entry->protrej)();
+			return;
+			}
+
+	syslog(LOG_WARNING, "[PPP/LCP] unexp proto: %d in recv Proto-REJ.", proto);
+	}
+
+/*
+ *  lcp_protrej -- Proto-REJ ãåä¿¡ããã¨ãã®å¦ç
+ */
+
+static void
+lcp_protrej (void)
+{
+	fsm_protreject(&lcp_fsm);
+	}
+
+/*
+ *  lcp_lowerup -- LCP ä¸ä½å±¤ãèµ·åããã
+ */
+
+void
+lcp_lowerup (void)
+{
+	fsm_lowerup(&lcp_fsm);
+	}
+
+/*
+ *  lcp_lowerdown -- LCP ä¸ä½å±¤ãåæ­¢ããã
+ */
+
+void
+lcp_lowerdown (void)
+{
+	fsm_lowerdown(&lcp_fsm);
+	}
+
+/*
+ *  lcp_open -- LCP ã®ãªã¼ã
+ */
+
+void
+lcp_open (uint8_t open_mode)
+{
+	ppp_open_mode = open_mode;	/* ãªã¼ãã³æã®åä½ã¢ã¼ã	*/
+	fsm_open(&lcp_fsm);
+	}
+
+/*
+ *  lcp_close -- LCP ã®ã¯ã­ã¼ãº
+ */
+
+void
+lcp_close (void)
+{
+	if (ppp_phase != PPP_PHASE_DEAD)
+		ppp_phase = PPP_PHASE_TERMINATE;
+
+	if (ppp_open_mode == PPP_OPEN_PASSIVE && lcp_fsm.state == PPP_FSM_STOPPED) {
+		lcp_fsm.state = PPP_FSM_CLOSED;
+		lcp_finished(&lcp_fsm);
+		}
+	else
+		fsm_close(&lcp_fsm);
+	}
+
+/*
+ *  lcp_sprotrej -- èªè­ã§ããªããã­ãã³ã«ãéããã¦ããã¨ãã®å¦ç
+ */
+
+void
+lcp_sprotrej (T_NET_BUF *input)
+{
+	T_NET_BUF	*output;
+	/*
+	 *  Protocol-Reject ãéãè¿ãã
+	 */
+
+	syscall(get_net_buf(&output, input->len + sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR)));
+
+	memcpy(output->buf, input->buf, sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
+	memcpy(output->buf + sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR), input->buf, input->len);
+
+	IF_SET_PROTO(output, PPP_LCP);
+	ppp_cp_output(PPP_PROTREJ, ++ lcp_fsm.id, output);
+	}
+
+/*
+ *  lcp_down -- ãªã³ã¯æ¥ç¶ãè§£æ¾ãã (Phase: Dead ã«ç§»è¡ãã)ã
+ */
+
+void
+lcp_down (T_PPP_FSM *fsm)
+{
+
+#if DEF_LCP_LOCAL_CFGS & LCP_CFG_MAGIC
+
+	echo_lowerdown();
+
+#endif	/* of #if DEF_LCP_LOCAL_CFGS & LCP_CFG_MAGIC */
+
+	link_down();
+	}
+
+/*
+ *  lcp_finished -- ä¸ä½å±¤ãçµäºããã
+ */
+
+void
+lcp_finished (T_PPP_FSM *fsm)
+{
+	link_terminated();
+	}
+
+#if DEF_LCP_LOCAL_CFGS & LCP_CFG_MAGIC
+
+/*
+ *  recv_echo_rep -- ECHOREP ãåä¿¡ããã¨ãã®å¦ç
+ */
+
+static void
+recv_echo_rep(T_PPP_FSM *fsm, uint8_t id, T_NET_BUF *input)
+{
+	T_PPP_CP_HDR	*hdr;
+	uint32_t	magic;
+
+ 	hdr = GET_PPP_CP_HDR(input);
+
+ 	/* Magic Number ã®é·ãä»¥ä¸ãªãã¨ã©ã¼ */
+ 	if (hdr->len < sizeof(T_PPP_CP_HDR) + sizeof(uint32_t)) {
+		syslog(LOG_WARNING, "[PPP/LCP] bad ECHOREP len: %d.", hdr->len);
+		return;
+		}
+
+	ntoahl(magic, input->buf + sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
+
+ 	/* åä¿¡ãã Magic Number ãèªåã¨åããªãã«ã¼ããã¦ããã*/
+	if ((lcp_local_ack_cfg.options & LCP_CFG_MAGIC) && magic == lcp_local_ack_cfg.magic) {
+		syslog(LOG_WARNING, "[PPP/LCP] ECHOREP looped.");
+		return;
+		}
+
+	echo_pending = 0;
+	}
+
+/*
+ *  echo_timeout -- ECHO REQ/REP ã®ã¿ã¤ã ã¢ã¦ãå¦ç
+ */
+
+static void
+echo_timeout (void *arg)
+{
+	if (timer_running) {
+		timer_running = false;
+		send_echo_req((T_PPP_FSM *)arg);
+		}
+	}
+
+/*
+ *  send_echo_req -- ECHO REQ ãéä¿¡ããã
+ */
+
+static void
+send_echo_req (T_PPP_FSM *fsm)
+{
+	T_NET_BUF	*input;
+
+#if LCP_ECHO_FAILS > 0
+
+	if (echo_pending >= LCP_ECHO_FAILS) {
+		syslog(LOG_WARNING, "[PPP/LCP] no reply to ECHOREQ.");
+		lcp_close();
+		echo_pending = 0;
+		}
+
+#endif	/* of #if LCP_ECHO_FAILS > 0 */
+
+	if (fsm->state == PPP_FSM_OPENED) {
+
+		/* ECHOREQ ãéä¿¡ããã*/
+		syscall(get_net_buf(&input, sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR) + sizeof(uint32_t)));
+		*(uint32_t*)(input->buf +  sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR)) = lcp_local_ack_cfg.magic;
+		IF_SET_PROTO(input, PPP_LCP);
+		ppp_cp_output(PPP_ECHOREQ, echo_number ++, input);
+		echo_pending ++;
+
+		/* ã¿ã¤ãã¼ãã¹ã¿ã¼ãããã*/
+		timeout((FP)echo_timeout, fsm, LCP_ECHO_INTERVAL);
+		timer_running = true;
+		}
+	}
+
+/*
+ *  echo_lowerup -- ECHO REQ/REP ã®èµ·å
+ */
+
+static void
+echo_lowerup (void)
+{
+	echo_pending  = 0;
+	echo_number   = 0;
+	timer_running = false;
+
+	send_echo_req(&lcp_fsm);
+	}
+
+/*
+ *  echo_lowerdown -- ECHO REQ/REP ã®åæ­¢
+ */
+
+static void
+echo_lowerdown (void)
+{
+	if (timer_running) {
+		untimeout((FP)echo_timeout, &lcp_fsm);
+		timer_running = false;
+		}
+	}
+
+#endif	/* of #if DEF_LCP_LOCAL_CFGS & LCP_CFG_MAGIC */
+
+#endif	/* fo #ifdef SUPPORT_PPP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_lcp.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_lcp.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_lcp.h	(revision 270)
@@ -0,0 +1,174 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * lcp.h - Link Control Protocol definitions.
+ *
+ * Copyright (c) 1989 Carnegie Mellon University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by Carnegie Mellon University.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/usr.sbin/pppd/lcp.h,v 1.6.2.1 1999/08/29 15:47:03 peter Exp $
+ */
+
+/*
+ *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
+ *
+ *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the Internet Initiative Japan.  The name of the
+ * IIJ may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/usr.sbin/ppp/lcp.h,v 1.23.2.1 2000/08/19 09:30:04 brian Exp $
+ *
+ *	TODO:
+ */
+
+#ifndef _PPP_LCP_H_
+#define _PPP_LCP_H_
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  LCP ç¹æã® PPP ãªã³ã¯å¶å¾¡ (CP) ã®å¶å¾¡ã³ã¼ã
+ */
+
+#define PPP_PROTREJ		UINT_C(8)	/* Protocol Reject	*/
+#define PPP_ECHOREQ		UINT_C(9)	/* Echo Request		*/
+#define PPP_ECHOREP		UINT_C(10)	/* Echo Reply		*/
+#define PPP_DISCREQ		UINT_C(11)	/* Discard Request	*/
+
+/*
+ *  LCP ã®æ§ææ
+å ± (CI)
+ */
+
+/*
+ *  CI ã®å
+ */
+
+#define LCP_CIT_MRU		UINT_C(1)	/* æå¤§åä¿¡é (Maximum Receive Unit)	*/
+#define LCP_CIT_ACCM		UINT_C(2)	/* Async Control Character Map		*/
+#define LCP_CIT_AUTH		UINT_C(3)	/* èªè¨¼ãã­ãã³ã«			*/
+#define LCP_CIT_QUALITY		UINT_C(4)	/* åè³ªãã­ãã³ã«ã¯æªå®è£
+			*/
+#define LCP_CIT_MAGIC		UINT_C(5)	/* ãã¸ãã¯çªå·				*/
+#define LCP_CIT_PCOMP		UINT_C(7)	/* ãã­ãã³ã«é¨å§ç¸®ã¯å®è£
+äºå®		*/
+#define LCP_CIT_ACCOMP		UINT_C(8)	/* ã¢ãã¬ã¹ã»å¶å¾¡é¨å§ç¸®ã¯å®è£
+äºå®		*/
+#define LCP_CIT_FCS_ALTER	UINT_C(9)	/* FCS-Alternatives ã¯æªå®è£
+		*/
+#define LCP_CIT_SELF_PAD	UINT_C(10)	/* Self-Describing-Padding ã¯æªå®è£
+	*/
+#define LCP_CIT_CALLBACK	UINT_C(13)	/* Callback ã¯æªå®è£
+			*/
+#define LCP_CIT_CFRAMES		UINT_C(15)	/* Compound-Frames ã¯æªå®è£
+		*/
+
+/*
+ *  LCP ã®æ§ææ
+å ±ãªãã·ã§ã³
+ */
+
+typedef struct t_lcp_configs {
+	uint32_t	ACCM;		/* ACCM			*/
+
+#ifdef LCP_CFG_MAGIC
+
+	uint32_t	magic;		/* ãã¸ãã¯çªå·		*/
+
+#endif	/* of #ifdef LCP_CFG_MAGIC */
+
+	uint16_t	MRU;		/* MRU			*/
+	uint16_t	options;	/* ãªãã·ã§ã³ãã©ã°	*/
+	} __attribute__((packed, aligned(2)))T_LCP_CONFIGS;
+
+/*
+ *  å¤æ°
+ */
+
+extern T_PPP_FSM	lcp_fsm;
+extern T_PPP_PROTENT	lcp_protent;
+extern T_LCP_CONFIGS	lcp_local_ack_cfg;	/* ç¸æã«è¨±å¯ãããã®èªæ§ææ
+å ±	*/
+extern T_LCP_CONFIGS	lcp_remote_ack_cfg;	/* ç¸æã«è¨±å¯ããæ§ææ
+å ±		*/
+
+/*
+ *  é¢æ°
+ */
+
+extern void lcp_lowerup (void);
+extern void lcp_lowerdown (void);
+extern void lcp_down (T_PPP_FSM *fsm);
+extern void lcp_finished (T_PPP_FSM *fsm);
+extern void lcp_open (uint8_t open_mode);
+extern void lcp_close (void);
+extern void lcp_sprotrej (T_NET_BUF *data);
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#endif	/* of #ifndef _PPP_LCP_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_modem.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_modem.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_modem.c	(revision 270)
@@ -0,0 +1,324 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  PPP ã¢ãã å¶å¾¡
+ */
+
+#include <string.h>
+
+#include <t_services.h>
+#include "kernel_id.h"
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+#include <net/ppp.h>
+#include <net/ppp_var.h>
+#include <net/ppp_fsm.h>
+#include <net/ppp_hdlc.h>
+#include <net/ppp_modem.h>
+#include <net/ppp_lcp.h>
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+uint8_t	modem_state = PPP_MODEM_DOWN;	/* ã¢ãã ã®ç¶æ
+		*/
+
+/*
+ *  ã¢ãã å
+¥åæå­å
+ */
+
+#define MODEM_RCODE_OK		0
+#define MODEM_RCODE_CONNECT	1
+#define MODEM_RCODE_RING	2
+#define MODEM_RCODE_NO_CARRIER	3
+#define MODEM_RCODE_ERROR	4
+#define MODEM_RCODE_NO_DIALTONE	5
+#define MODEM_RCODE_BUSY	6
+#define MODEM_RCODE_DELAYED	7
+
+/*
+ *  å¤æ°
+ */
+
+static uint8_t *modem_rcode[] = {
+	"OK",
+	"CONNECT",
+	"RING",
+	"NO CARRIER",
+	"ERROR",
+	"NO DIALTONE",
+	"BUSY",
+	"DELAYED"
+	};
+
+static int_t dial_retry;
+
+/*
+ *  é¢æ°
+ */
+
+static void do_dial (void);
+static void modem_putstr (uint8_t *str);
+static void modem_wait (uint8_t *line);
+static void modem_putline (uint8_t *line);
+
+/*
+ *  modem_getline -- ã¢ãã è¡å
+¥å
+ */
+
+T_NET_BUF *
+modem_getline (T_NET_BUF *nbuf, uint16_t size)
+{
+	uint8_t *buf;
+
+	buf = nbuf->buf;
+	size --;			/* '\0' ã®å */
+	while (size > 0 && (*buf = HDLC_raw_getoctet()) != '\r') {
+		buf  ++;
+		size --;
+		}
+	*buf = '\0';
+	HDLC_raw_getoctet();		/* \n ãèª­ã¿é£ã°ãã*/
+	nbuf->len = buf - nbuf->buf;
+	return nbuf;
+	}
+
+/*
+ *  ã¢ãã å¶å¾¡
+ *
+ *	æ»ãå¤: ã¢ãã ããã®ãªã¶ã«ãã³ã¼ã
+ */
+
+int_t
+modem_cntl (T_NET_BUF *input)
+{
+	int_t	code;
+
+	code = sizeof(modem_rcode) / sizeof(uint8_t*) - 1;
+	while (strcmp(modem_rcode[code], input->buf) != 0) {
+		if (code == 0)
+			return modem_state;
+		code --;
+		}
+
+	switch (modem_state) {
+
+	case PPP_MODEM_UP:
+		if (code == MODEM_RCODE_RING)
+			modem_state = PPP_MODEM_RING;
+		break;
+
+	case PPP_MODEM_DIAL:
+		if (code == MODEM_RCODE_CONNECT) {
+			syslog(LOG_NOTICE, "[MODEM] up.");
+			modem_state = PPP_MODEM_CONNECT;
+			lcp_open(PPP_OPEN_ACTIVE);
+			sig_sem(SEM_MODEM_READY);
+			}
+		else {
+			syslog(LOG_NOTICE, "[MODEM] dial failed '%s'.", modem_rcode[code]);
+			if (-- dial_retry == 0) {
+				syslog(LOG_WARNING, "[MODEM] dial failed %d times.", MODEM_CFG_RETRY_CNT);
+				modem_state = PPP_MODEM_UP;
+				}
+			else {
+				syscall(dly_tsk(MODEM_CFG_RETRY_WAIT));
+				do_dial();
+				}
+			}
+		break;
+
+	case PPP_MODEM_RING:
+		if (code == MODEM_RCODE_CONNECT) {
+			syslog(LOG_NOTICE, "[MODEM] up.");
+			modem_state = PPP_MODEM_CONNECT;
+			lcp_open(PPP_OPEN_PASSIVE);
+			}
+		else
+			modem_state = PPP_MODEM_UP;
+		break;
+
+	default:
+		if (code == MODEM_RCODE_NO_CARRIER) {
+			if (lcp_fsm.state == PPP_FSM_OPENED)
+				lcp_close();
+			syslog(LOG_NOTICE, "[MODEM] down.");
+			modem_state = PPP_MODEM_UP;
+			}
+		break;
+
+		}
+
+	return code;
+	}
+
+/*
+ *  init_modem -- ã¢ãã ãåæåããã
+ */
+
+void
+init_modem (void)
+{
+	modem_putline("AT");
+
+#ifdef MODEM_CFG_INIT
+
+	modem_putline(MODEM_CFG_INIT);
+
+#endif	/* of #ifdef MODEM_CFG_INIT */
+
+	modem_state = PPP_MODEM_UP;
+	}
+
+/*
+ *  wait_modem -- æ¥ç¶å®äºã¾ã§å¾
+ã¤ã
+ *
+ *	æ»ãå¤: æ¥ç¶ã«å¤±æããã E_OBJ ãè¿ãã
+ */
+
+ER
+wait_modem (void)
+{
+	ER error = E_OK;
+
+	if (modem_state == PPP_MODEM_UP) {
+		dial();
+		}
+
+	if (modem_state != PPP_MODEM_CONNECT) {
+		/* æ¥ç¶å®äºã¾ã§å¾
+ã¤ã*/
+		wai_sem(SEM_MODEM_READY);
+		if (modem_state != PPP_MODEM_CONNECT)
+			error = E_OBJ;
+		}
+
+	return error;
+	}
+
+/*
+ *  dial -- ãã¤ã¤ã«ããããªãã©ã¤åæ°ãã»ããããã
+ */
+
+void
+dial (void)
+{
+	do_dial();
+	dial_retry = MODEM_CFG_RETRY_CNT;
+	modem_state = PPP_MODEM_DIAL;
+	}
+
+/*
+ *  do_dial -- ãã¤ã¤ã«ãããdial() ã®ä¸è«ãé¢æ°
+ */
+
+static void
+do_dial (void)
+{
+	syslog(LOG_NOTICE, "[MODEM] dial: %s.", MODEM_CFG_PHONE_NUMBER);
+	modem_putstr(MODEM_CFG_DIAL);
+	modem_putstr(MODEM_CFG_PHONE_NUMBER);
+	modem_putstr("\r");
+	}
+
+/*
+ *  modem_putstr -- ã¢ãã æå­ååºå
+ */
+
+static void
+modem_putstr (uint8_t *str)
+{
+	while (*str)
+		HDLC_raw_putoctet(*str ++);
+	}
+
+/*
+ *  modem_wait -- ã¢ãã ããæå­åãå¾
+ã¤
+ */
+
+static void
+modem_wait (uint8_t *line)
+{
+	int_t ch, state, len = strlen(line);
+
+	state = len;
+	while (state != 0) {
+		ch = HDLC_raw_getoctet();
+		if (ch != line[len - state])
+			state = len;
+		if (ch == line[len - state])
+			state --;
+		}
+	}
+
+/*
+ *  modem_putline -- ã¢ãã è¡åºå
+ */
+
+static void
+modem_putline (uint8_t *line)
+{
+	modem_putstr(line);
+	modem_putstr("\r");
+	modem_wait("OK\r\n");
+	}
+
+#endif	/* fo #ifdef SUPPORT_PPP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_modem.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_modem.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_modem.h	(revision 270)
@@ -0,0 +1,95 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _PPP_MODEM_H_
+#define _PPP_MODEM_H_
+
+#ifdef SUPPORT_PPP
+
+#ifdef PPP_CFG_MODEM
+
+/*
+ *  ã¢ãã ã®ç¶æ
+
+ */
+
+#define PPP_MODEM_CONNECT	UINT_C(0)
+#define PPP_MODEM_DISCONN	UINT_C(1)
+#define PPP_MODEM_RING		UINT_C(2)
+#define PPP_MODEM_DIAL		UINT_C(3)
+#define PPP_MODEM_UP		UINT_C(4)
+#define PPP_MODEM_DOWN		UINT_C(5)
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+extern uint8_t modem_state;	/* ã¢ãã ã®ç¶æ
+		*/
+
+/*
+ *  é¢æ°
+ */
+
+extern T_NET_BUF *modem_getline (T_NET_BUF *nbuf, uint16_t size);
+extern int modem_cntl (T_NET_BUF *input);
+extern void init_modem (void);
+extern void dial (void);
+extern ER wait_modem (void);
+
+#else	/* of #ifdef PPP_CFG_MODEM */
+
+/*
+ *  é¢æ°
+ */
+
+#define init_modem
+
+#endif	/* of #ifdef PPP_CFG_MODEM */
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#endif	/* of #ifndef _PPP_MODEM_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_upap.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_upap.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_upap.c	(revision 270)
@@ -0,0 +1,624 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * upap.c - User/Password Authentication Protocol.
+ *
+ * Copyright (c) 1989 Carnegie Mellon University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by Carnegie Mellon University.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/*
+ *			PPP PAP Module
+ *
+ *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
+ *
+ *   Copyright (C) 1993-94, Internet Initiative Japan, Inc.
+ *		     All rights reserverd.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the Internet Initiative Japan, Inc.  The name of the
+ * IIJ may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/usr.sbin/ppp/pap.c,v 1.42.2.1 2000/08/19 09:30:05 brian Exp $
+ *
+ *	TODO:
+ */
+
+#include <string.h>
+
+#include <s_services.h>
+#include <t_services.h>
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+#include <net/ppp.h>
+#include <net/ppp_var.h>
+#include <net/ppp_hdlc.h>
+#include <net/ppp_auth.h>
+#include <net/ppp_fsm.h>
+#include <net/ppp_lcp.h>
+#include <net/ppp_upap.h>
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  é¢æ°
+ */
+
+static void upap_init (void);
+static void upap_input (T_NET_BUF *input);
+static void upap_protrej (void);
+static void upap_lowerup (void);
+static void upap_lowerdown (void);
+static bool_t compare (uint8_t *rstr, uint8_t *lstr, uint8_t rlen);
+
+#ifdef AUTH_CFG_CLIENT
+
+static void upap_sauthreq (void);
+static void upap_rauthack (void);
+static void upap_rauthnak (void);
+
+#if defined(DEF_PAP_TIMEOUT)
+
+static void upap_timeout(void *arg);
+
+#endif	/* of #if defined(DEF_PAP_TIMEOUT) */
+
+#endif	/* of #ifdef AUTH_CFG_CLIENT */
+
+#ifdef AUTH_CFG_SERVER
+
+static void upap_rauthreq (T_NET_BUF *input);
+static void upap_sresp    (uint8_t code, uint8_t id);
+
+#if defined(DEF_PAP_REQTIME)
+
+static void upap_reqtimeout(void *arg);
+
+#endif	/* of #if defined(DEF_PAP_REQTIME) */
+
+#endif	/* of #ifdef AUTH_CFG_SERVER */
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+T_PPP_PROTENT pap_protent = {
+	PPP_PAP,
+	upap_init,			/* åæå			*/
+	upap_input,			/* å
+¥å				*/
+	upap_protrej,			/* Proto-REJ åä¿¡å¦ç		*/
+	upap_lowerup,			/* ä¸ä½å±¤ãèµ·åãã		*/
+	upap_lowerdown,			/* ä¸ä½å±¤ãåæ­¢ãã		*/
+	NULL,				/* ãªã¼ãã³ãã			*/
+	NULL,				/* ã¯ã­ã¼ãºãã			*/
+	NULL,				/* ãã¼ã¿å
+¥å			*/
+	};
+
+/*
+ *  å¤æ°
+ */
+
+#ifdef AUTH_CFG_CLIENT
+
+static uint8_t client_state;
+static uint8_t client_cp_id;
+
+#if defined(DEF_PAP_TIMEOUT)
+
+static uint8_t client_rexmt = 0;
+
+#endif	/* of #if defined(DEF_PAP_TIMEOUT) */
+
+#endif	/* of #ifdef AUTH_CFG_CLIENT */
+
+#ifdef AUTH_CFG_SERVER
+
+static uint8_t server_state;
+
+#endif	/* of #ifdef AUTH_CFG_SERVER */
+
+/*
+ *  upap_init -- UPAP ã¢ã¸ã¥ã¼ã«ã®åæå
+ */
+
+static void
+upap_init (void)
+{
+#ifdef AUTH_CFG_CLIENT
+
+	client_cp_id = 0;
+	client_state = PAP_CS_INIT;
+
+#endif	/* of #ifdef AUTH_CFG_CLIENT */
+
+#ifdef AUTH_CFG_SERVER
+
+	server_state = PAP_SS_INIT;
+
+#endif	/* of #ifdef AUTH_CFG_SERVER */
+	}
+
+/*
+ *  upap_input -- UPAP å
+¥å
+ */
+
+static void
+upap_input (T_NET_BUF *input)
+{
+	T_PPP_CP_HDR	*hdr;
+
+	NET_COUNT_PPP_PAP(net_count_ppp_upap_in_octets,  input->len);
+	NET_COUNT_PPP_PAP(net_count_ppp_upap_in_packets, 1);
+
+ 	/* PPP ãªã³ã¯å¶å¾¡ (CP) ãããããç­ããã°ã¨ã©ã¼ */
+ 	if (input->len < (sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR))) {
+ 		syslog(LOG_WARNING, "[PPP/PAP] short hdr: %d.", input->len);
+ 		return;
+ 		}
+
+ 	hdr = GET_PPP_CP_HDR(input);
+
+ 	/* ãããã®é·ãã¨å
+¥åãã¼ã¿ãµã¤ãºãä¸è´ããªããã°ã¨ã©ã¼ */
+ 	if (hdr->len != input->len - sizeof(T_PPP_HDR)) {
+ 		syslog(LOG_WARNING, "[PPP/PAP] bad len: %d.", hdr->len);
+ 		return;
+ 		}
+ 
+ 	/*
+ 	 *  å¶å¾¡ã³ã¼ãã«ããé©å½ãªé¢æ°ãå¼åºã
+ 	 */
+
+	switch (hdr->code) {
+
+#ifdef AUTH_CFG_CLIENT
+
+	case PAP_AUTHACK:
+		upap_rauthack();
+		break;
+
+	case PAP_AUTHNAK:
+		upap_rauthnak();
+		break;
+
+#endif	/* of #ifdef AUTH_CFG_CLIENT */
+
+#ifdef AUTH_CFG_SERVER
+
+	case PAP_AUTHREQ:
+		upap_rauthreq(input);
+		break;
+
+#endif	/* of #ifdef AUTH_CFG_SERVER */
+
+		}
+	}
+
+/*
+ *  upap_protrej -- Proto-REJ ãåä¿¡ããã¨ãã®å¦ç
+ */
+
+static void
+upap_protrej (void)
+{
+#ifdef AUTH_CFG_CLIENT
+
+	if (client_state == PAP_CS_AUTHREQ)
+	 	syslog(LOG_WARNING, "[PPP/PAP] proto-rej recved.");
+
+#endif	/* of #ifdef AUTH_CFG_CLIENT */
+
+#ifdef AUTH_CFG_SERVER
+
+	if (server_state == PAP_SS_LISTEN) {
+	 	syslog(LOG_WARNING, "[PPP/PAP] proto-rej recved.");
+		lcp_close();
+		}
+
+#endif	/* of #ifdef AUTH_CFG_SERVER */
+
+	upap_lowerdown();
+	}
+
+/*
+ *  upap_lowerup -- UPAP ä¸ä½å±¤ãèµ·åããã
+ */
+
+static void
+upap_lowerup (void)
+{
+#ifdef AUTH_CFG_CLIENT
+
+	if (client_state == PAP_CS_INIT)
+		client_state = PAP_CS_CLOSED;
+	else if (client_state == PAP_CS_PENDING)
+		upap_sauthreq();
+
+#endif	/* of #ifdef AUTH_CFG_CLIENT */
+
+#ifdef AUTH_CFG_SERVER
+
+	if (server_state == PAP_SS_INIT)
+		server_state = PAP_SS_CLOSED;
+	else if (server_state == PAP_SS_PENDING) {
+		server_state = PAP_SS_LISTEN;
+
+#if defined(DEF_PAP_REQTIME)
+
+		timeout((FP)upap_reqtimeout, NULL, DEF_PAP_REQTIME);
+
+#endif	/* of #if defined(DEF_PAP_REQTIME) */
+
+		}
+
+#endif	/* of #ifdef AUTH_CFG_SERVER */
+	}
+
+/*
+ *  upap_lowerdown -- UPAP ä¸ä½å±¤ãåæ­¢ããã
+ */
+
+static void
+upap_lowerdown (void)
+{
+#ifdef AUTH_CFG_CLIENT
+
+#if defined(DEF_PAP_TIMEOUT)
+
+	if (client_state == PAP_CS_AUTHREQ)
+		untimeout((FP)upap_timeout, NULL);
+
+#endif	/* of #if defined(DEF_PAP_TIMEOUT) */
+
+	client_state = PAP_CS_INIT;
+
+#endif	/* of #ifdef AUTH_CFG_CLIENT */
+
+#ifdef AUTH_CFG_SERVER
+
+#if defined(DEF_PAP_REQTIME)
+
+	if (server_state == PAP_SS_LISTEN)
+		untimeout((FP)upap_reqtimeout, NULL);
+
+#endif	/* of #if defined(DEF_PAP_REQTIME) */
+
+	server_state = PAP_SS_INIT;
+
+#endif	/* of #ifdef AUTH_CFG_SERVER */
+	}
+#ifdef AUTH_CFG_CLIENT
+
+/*
+ *  ã¯ã©ã¤ã¢ã³ãã¢ã¼ãã§ PAP èªè¨¼ãéå§ããã
+ */
+
+void
+upap_auth_client (void)
+{
+#if defined(DEF_PAP_TIMEOUT)
+
+	client_rexmt = 0;
+
+#endif	/* of #if defined(DEF_PAP_TIMEOUT) */
+
+	if (client_state == PAP_CS_INIT || client_state == PAP_CS_PENDING) {
+		client_state = PAP_CS_PENDING;
+		return;
+		}
+
+	upap_sauthreq();
+	}
+
+/*
+ *  upap_rauthack -- èªè¨¼ ACK å¦ç
+ */
+
+static void
+upap_rauthack (void)
+{
+	if (client_state == PAP_CS_AUTHREQ) {
+		client_state = PAP_CS_OPEN;
+		network_phase();
+		}
+	}
+
+/*
+ *  upap_rauthnak -- èªè¨¼ NAK å¦ç
+ */
+
+static void
+upap_rauthnak (void)
+{
+ 	syslog(LOG_WARNING, "[PPP/PAP] auth-req NAKed.");
+	client_state = PAP_CS_BADAUTH;
+	}
+
+/*
+ *  upap_sauthreq -- èªè¨¼è¦æ±å¦ç
+ */
+
+static void
+upap_sauthreq (void)
+{
+	T_NET_BUF	*output;
+	uint8_t		*data;
+
+	syscall(get_net_buf(&output, sizeof(T_PPP_HDR)        + sizeof(T_PPP_CP_HDR)
+	                           + sizeof(AUTH_REMOTE_USER) + sizeof(AUTH_REMOTE_PASSWD)));
+
+	data = output->buf + sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
+
+	/* ã¦ã¼ã¶åãè¨­å®ããã*/
+	*data = sizeof(AUTH_REMOTE_USER) - 1;
+	strcpy(data + 1, AUTH_REMOTE_USER);
+
+	/* ãã¹ã¯ã¼ããè¨­å®ããã*/
+	*(data + sizeof(AUTH_REMOTE_USER)) = sizeof(AUTH_REMOTE_PASSWD) - 1;
+	strcpy(data + sizeof(AUTH_REMOTE_USER) + 1, AUTH_REMOTE_PASSWD);
+
+	/* éä¿¡ãã */
+	IF_SET_PROTO(output, PPP_PAP);
+	ppp_cp_output(PAP_AUTHREQ, ++ client_cp_id, output);
+
+#if defined(DEF_PAP_TIMEOUT)
+
+	timeout((FP)upap_timeout, NULL, DEF_PAP_TIMEOUT);
+	client_rexmt ++;
+
+#endif	/* of #if defined(DEF_PAP_TIMEOUT) */
+
+	client_state = PAP_CS_AUTHREQ;
+	}
+
+#if defined(DEF_PAP_TIMEOUT)
+
+/*
+ *  upap_timeout -- ã¿ã¤ã ã¢ã¦ãå¦ç
+ */
+
+static void
+upap_timeout (void *arg)
+{
+	if (client_state != PAP_CS_AUTHREQ)
+		return;
+
+	if (client_rexmt >= MAX_PAP_REXMT) {
+ 		syslog(LOG_WARNING, "[PPP/PAP] no reply auth-req.");
+		client_state = PAP_CS_BADAUTH;
+		return;
+		}
+
+	upap_sauthreq();
+	}
+
+#endif	/* of #if defined(DEF_PAP_TIMEOUT) */
+
+#endif	/* of #ifdef AUTH_CFG_CLIENT */
+
+#ifdef AUTH_CFG_SERVER
+
+/*
+ *  ãµã¼ãã¢ã¼ãã§ PAP èªè¨¼ãéå§ããã
+ */
+
+void
+upap_auth_server (void)
+{
+	if (server_state == PAP_SS_INIT || server_state == PAP_SS_PENDING) {
+		server_state = PAP_SS_PENDING;
+		return;
+		}
+
+	server_state = PAP_SS_LISTEN;
+
+#if defined(DEF_PAP_REQTIME)
+
+	timeout((FP)upap_reqtimeout, NULL, DEF_PAP_REQTIME);
+
+#endif	/* of #if defined(DEF_PAP_REQTIME) */
+	}
+
+/*
+ *  upap_rauthreq -- èªè¨¼è¦æ±å¿ç­å¦ç
+ */
+
+static void
+upap_rauthreq (T_NET_BUF *input)
+{
+	int16_t	cplen;
+	uint8_t	*data, *user, ulen, plen, code, id;
+
+	if (server_state < PAP_SS_LISTEN)
+		return;
+
+	/*
+	 *  åè¦æ±ããã£ãã¨ãã®å¦ç
+	 */
+	id = GET_PPP_CP_HDR(input)->id;
+	if (server_state == PAP_SS_OPEN) {
+		upap_sresp(PAP_AUTHACK, id);
+		return;
+		}
+
+	if (server_state == PAP_SS_BADAUTH) {
+		upap_sresp(PAP_AUTHNAK, id);
+		return;
+		}
+
+	cplen = GET_PPP_CP_HDR(input)->len;
+	data  = input->buf + sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
+
+	/*
+	 *  ã¦ã¼ã¶åãç¹å®ããã
+	 */
+	ulen  = *data;
+	if (cplen < sizeof(T_PPP_CP_HDR) + ulen + sizeof(uint8_t)) {
+ 		syslog(LOG_WARNING, "[PPP/PAP] bad req len: %d.", cplen);
+ 		return;
+		}
+	user = ++ data;
+	data += ulen;
+
+	/*
+	 *  ãã¹ã¯ã¼ããç¹å®ããã
+	 */
+	plen  = *data;
+	if (cplen < sizeof(T_PPP_CP_HDR) + ulen + plen + sizeof(uint8_t) * 2) {
+ 		syslog(LOG_WARNING, "[PPP/PAP] bad req len: %d.", cplen);
+ 		return;
+		}
+
+	/*
+	 *  ã¦ã¼ã¶åã¨ãã¹ã¯ã¼ãããã§ãã¯ããã
+	 */
+	if (compare(user,     AUTH_LOCAL_USER,   ulen) &&
+	    compare(data + 1, AUTH_LOCAL_PASSWD, plen))
+		code = PAP_AUTHACK;
+	else
+		code = PAP_AUTHNAK;
+
+	upap_sresp(code, id);
+
+	if (code == PAP_AUTHACK) {
+		network_phase();
+		server_state = PAP_SS_OPEN;
+		}
+	else {
+		lcp_close();
+		server_state = PAP_SS_BADAUTH;
+		}
+
+#if defined(DEF_PAP_REQTIME)
+
+	untimeout((FP)upap_reqtimeout, NULL);
+
+#endif	/* of #if defined(DEF_PAP_REQTIME) */
+	}
+
+/*
+ *  upap_sresp -- å¿ç­ãè¿ãã
+ */
+
+static void
+upap_sresp (uint8_t code, uint8_t id)
+{
+	T_NET_BUF *output;
+
+	/* éä¿¡ãã */
+	syscall(get_net_buf(&output, sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR)));
+	IF_SET_PROTO(output, PPP_PAP);
+	ppp_cp_output(code, id, output);
+	}
+
+/*
+ *  compare -- ã¦ã¼ã¶åã¨ãã¹ã¯ã¼ãã®æ¯è¼
+ */
+
+static bool_t
+compare (uint8_t *rstr, uint8_t *lstr, uint8_t rlen)
+{
+	while (rlen -- > 0) {
+		if (*rstr != *lstr)
+			return false;
+		rstr ++;
+		lstr ++;
+		}
+	return *lstr ? false : true;
+	}
+
+#if defined(DEF_PAP_REQTIME)
+
+/*
+ *  upap_reqtimeout -- è¦æ±ã¿ã¤ã ã¢ã¦ãå¦ç
+ */
+
+static void
+upap_reqtimeout (void *arg)
+{
+	if (server_state == PAP_SS_LISTEN) {
+		lcp_close();
+		server_state = PAP_SS_BADAUTH;
+		}
+	}
+
+#endif	/* of #if defined(DEF_PAP_REQTIME) */
+
+#endif	/* of #ifdef AUTH_CFG_SERVER */
+
+#endif	/* fo #ifdef SUPPORT_PPP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_upap.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_upap.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_upap.h	(revision 270)
@@ -0,0 +1,142 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * upap.h - User/Password Authentication Protocol definitions.
+ *
+ * Copyright (c) 1989 Carnegie Mellon University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by Carnegie Mellon University.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/usr.sbin/pppd/upap.h,v 1.6.2.1 1999/08/29 15:47:10 peter Exp $
+ */
+
+/*
+ *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
+ *
+ *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the Internet Initiative Japan.  The name of the
+ * IIJ may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD: src/usr.sbin/ppp/pap.h,v 1.11 1999/08/28 01:18:37 peter Exp $
+ *
+ *	TODO:
+ */
+
+#ifndef _PPP_UPAP_H_
+#define _PPP_UPAP_H_
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  PAP ã®å¶å¾¡ã³ã¼ã
+ */
+
+#define PAP_AUTHREQ		UINT_C(1)	/* èªè¨¼è¦æ±	*/
+#define PAP_AUTHACK		UINT_C(2)	/* èªè¨¼ ACK	*/
+#define PAP_AUTHNAK		UINT_C(3)	/* èªè¨¼ NAK	*/
+
+/*
+ *  ã¯ã©ã¤ã¢ã³ãã®ç¶æ
+
+ */
+
+#define PAP_CS_INIT		UINT_C(0)	/* æªæ¥ç¶		*/
+#define PAP_CS_CLOSED		UINT_C(1)	/* æ¥ç¶ãæªèªè¨¼		*/
+#define PAP_CS_PENDING		UINT_C(2)	/* æªæ¥ç¶ãèªè¨¼		*/
+#define PAP_CS_AUTHREQ		UINT_C(3)	/* èªè¨¼è¦æ±éä¿¡æ¸ã¿	*/
+#define PAP_CS_OPEN		UINT_C(4)	/* ACK åä¿¡		*/
+#define PAP_CS_BADAUTH		UINT_C(5)	/* NAK åä¿¡		*/
+
+/*
+ *  ãµã¼ãã®ç¶æ
+
+ */
+
+#define PAP_SS_INIT		UINT_C(0)	/* æªæ¥ç¶		*/
+#define PAP_SS_CLOSED		UINT_C(1)	/* æ¥ç¶ãæªèªè¨¼		*/
+#define PAP_SS_PENDING		UINT_C(2)	/* æªæ¥ç¶ãèªè¨¼		*/
+#define PAP_SS_LISTEN		UINT_C(3)	/* èªè¨¼è¦æ±åä¿¡å¾
+ã¡	*/
+#define PAP_SS_OPEN		UINT_C(4)	/* ACK éä¿¡		*/
+#define PAP_SS_BADAUTH		UINT_C(5)	/* NAK éä¿¡		*/
+
+/*
+ *  å¤æ°
+ */
+
+extern T_PPP_PROTENT	pap_protent;
+
+/*
+ *  é¢æ°
+ */
+
+extern void upap_auth_client (void);
+extern void upap_auth_server (void);
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#endif	/* of #ifndef _PPP_UPAP_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_var.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_var.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_var.h	(revision 270)
@@ -0,0 +1,131 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1989 Carnegie Mellon University.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by Carnegie Mellon University.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/*
+ *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
+ *
+ *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the Internet Initiative Japan.  The name of the
+ * IIJ may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#ifndef PPP_VAR_H_
+#define PPP_VAR_H_
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  PPP ãã­ãã³ã«ã¨ã³ããªæ§é ä½
+ */
+
+typedef struct t_ppp_protent {
+	uint16_t	proto;			/* ãã­ãã³ã«çªå·	*/
+	void		(*init)		(void);	/* åæåé¢æ°		*/
+	void		(*input)	(T_NET_BUF *data);
+						/* å
+¥åé¢æ°		*/
+	void		(*protrej)	(void);	/* Ptoto-REJ åä¿¡å¦ç	*/
+	void		(*lowerup)	(void);	/* ä¸ä½å±¤ãèµ·åããã	*/
+	void		(*lowerdown)	(void);	/* ä¸ä½å±¤ãåæ­¢ããã	*/
+	void		(*open)		(void);	/* ãªã¼ãã³ããã	*/
+	void		(*close)	(void);	/* ã¯ã­ã¼ãºããã	*/
+	void		(*datainput)	(T_NET_BUF *data);
+					/* ãã¼ã¿å
+¥åé¢æ°	*/
+	} T_PPP_PROTENT;
+
+#define T_PPP_PROTENT_DEFINED
+
+/*
+ *  å¤æ°
+ */
+
+extern T_PPP_PROTENT	*protocols[];	/* ãã­ãã³ã«è¡¨			*/
+extern uint8_t		ppp_phase;	/* ãªã³ã¯ã®ç¶æ
+			*/
+
+/*
+ *  é¢æ°
+ */
+
+extern void ppp_cp_output(uint8_t code, uint8_t id, T_NET_BUF *data);
+
+/*
+ *  PPP å¦çã¿ã¹ã¯
+ */
+
+extern void	ppp_input_task(intptr_t exinf);
+extern void	ppp_output_task(intptr_t exinf);
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#endif	/* of #ifndef PPP_VAR_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/net/route.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/net/route.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/net/route.h	(revision 270)
@@ -0,0 +1,92 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1980, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)route.h	8.3 (Berkeley) 4/19/94
+ * $FreeBSD: src/sys/net/route.h,v 1.28.2.2 1999/09/15 08:38:05 ru Exp $
+ */
+
+#ifndef _ROUTE_H_
+#define _ROUTE_H_
+
+/*
+ * TINET 1.1 ã¨ã®äºææ§ç¢ºä¿
+ */
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+
+#endif	/* of #ifndef _ROUTE_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/Makefile.netapp
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/Makefile.netapp	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/Makefile.netapp	(revision 270)
@@ -0,0 +1,279 @@
+#
+#   TINET (TCP/IP Protocol Stack)
+#  
+#   Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+#                    Tomakomai National College of Technology, JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+#   ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+#   è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+#   ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+#   å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+#   å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+#   æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+#  
+#   @(#) $Id: Makefile.netapp 497 2014-06-26 01:50:14Z coas-nagasima $
+# 
+
+#
+#  ãµã³ãã«ã®ãããã¯ã¼ã¯å¿ç¨ãã­ã°ã©ã ã«é¢ããå®ç¾©
+#
+
+#
+#  ã«ã¼ãã«ã®è­å¥
+#
+ifdef SRCLANG
+	TARGET_KERNEL = ASP
+	TINET_CDEFS := $(TINET_CDEFS) -DTARGET_KERNEL_ASP
+else
+	TARGET_KERNEL = JSP
+	TINET_CDEFS := $(TINET_CDEFS) -DTARGET_KERNEL_JSP
+endif
+
+#  å¿ç¨ãã­ã°ã©ã 
+
+TINET_ROOT = $(SRCDIR)/tinet
+NETAPP_DIR = $(TINET_ROOT)/netapp
+NETAPP_COBJS := $(NETAPP_COBJS) netapp_subr.o
+
+#  ãã©ã³ã¹ãã¼ãå±¤ã®é¸æ
+
+SUPPORT_TCP = false
+SUPPORT_UDP = false
+
+# 
+#  å
+±éã¯ã©ã¤ã¢ã³ãã»ãµã¼ããã­ã°ã©ã ã®è¨­å®
+# 
+
+ifeq ($(USE_WWW_SRV),true)
+	SUPPORT_TCP = true
+	TCP_CFG_PASSIVE_OPEN = true
+	USE_NETAPP_SUBR = true
+	CDEFS := $(CDEFS) -DUSE_WWW_SRV
+	NETAPP_COBJS := $(NETAPP_COBJS) wwws.o
+	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/wwws.cfg
+endif
+
+ifeq ($(TCP_ECHO_SRV),tcp_echo_srv1)		# éåä¿¡ã¿ã¹ã¯åä¸å
+	SUPPORT_TCP = true
+	TCP_CFG_PASSIVE_OPEN = true
+	USE_NETAPP_SUBR = true
+	CDEFS := $(CDEFS) -DUSE_TCP_ECHO_SRV1
+	NETAPP_COBJS := $(NETAPP_COBJS) tcp_echo_srv1.o
+	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/tcp_echo_srv1.cfg
+endif
+
+ifeq ($(TCP_ECHO_SRV),tcp_echo_srv2)		# éåä¿¡ã¿ã¹ã¯åé¢å
+	SUPPORT_TCP = true
+	TCP_CFG_PASSIVE_OPEN = true
+	USE_NETAPP_SUBR = true
+	CDEFS := $(CDEFS) -DUSE_TCP_ECHO_SRV2
+	NETAPP_COBJS := $(NETAPP_COBJS) tcp_echo_srv2.o
+	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/tcp_echo_srv2.cfg
+endif
+
+ifeq ($(USE_UDP_ECHO_SRV),true)
+	SUPPORT_UDP = true
+	USE_NETAPP_SUBR = true
+	CDEFS := $(CDEFS) -DUSE_UDP_ECHO_SRV
+	NETAPP_COBJS := $(NETAPP_COBJS) udp_echo_srv.o
+	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/udp_echo_srv.cfg
+endif
+
+ifeq ($(USE_TCP_ECHO_CLI),true)
+	SUPPORT_TCP = true
+	USE_NETAPP_SUBR = true
+	CDEFS := $(CDEFS) -DUSE_TCP_ECHO_CLI
+	NETAPP_COBJS := $(NETAPP_COBJS) tcp_echo_cli.o
+	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/tcp_echo_cli.cfg
+endif
+
+ifeq ($(USE_UDP_ECHO_CLI),true)
+	SUPPORT_UDP = true
+	USE_NETAPP_SUBR = true
+	CDEFS := $(CDEFS) -DUSE_UDP_ECHO_CLI
+	NETAPP_COBJS := $(NETAPP_COBJS) udp_echo_cli.o
+	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/udp_echo_cli.cfg
+endif
+
+ifeq ($(USE_TCP_DISCARD_SRV),true)
+	SUPPORT_TCP = true
+	TCP_CFG_PASSIVE_OPEN = true
+	USE_NETAPP_SUBR = true
+	CDEFS := $(CDEFS) -DUSE_TCP_DISCARD_SRV
+	NETAPP_COBJS := $(NETAPP_COBJS) tcp_discard_srv.o
+	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/tcp_discard_srv.cfg
+endif
+
+ifeq ($(USE_TCP_DISCARD_CLI),true)
+	SUPPORT_TCP = true
+	USE_NETAPP_SUBR = true
+	CDEFS := $(CDEFS) -DUSE_TCP_DISCARD_CLI
+	NETAPP_COBJS := $(NETAPP_COBJS) tcp_discard_cli.o
+	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/tcp_discard_cli.cfg
+endif
+
+ifeq ($(USE_UDP_DISCARD_CLI),true)
+	SUPPORT_UDP = true
+	USE_NETAPP_SUBR = true
+	CDEFS := $(CDEFS) -DUSE_UDP_DISCARD_CLI
+	NETAPP_COBJS := $(NETAPP_COBJS) udp_discard_cli.o
+	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/udp_discard_cli.cfg
+endif
+
+ifeq ($(USE_NET_CONS),true)
+	ifeq ($(TCP_CFG_NON_BLOCKING),true)
+		SUPPORT_TCP = true
+		TCP_CFG_PASSIVE_OPEN = true
+		USE_DBG_CONS = true
+		USE_NETAPP_SUBR = true
+		CDEFS := $(CDEFS) -DUSE_NET_CONS
+		NETAPP_COBJS := $(NETAPP_COBJS) net_cons.o
+		NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/net_cons.cfg
+	endif
+endif
+
+ifeq ($(USE_DBG_CONS),true)
+
+	USE_NETAPP_SUBR = true
+	CDEFS := $(CDEFS) -DUSE_DBG_CONS
+	NETAPP_COBJS := $(NETAPP_COBJS) dbg_cons.o 
+	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/dbg_cons.cfg
+
+endif
+
+ifeq ($(USE_PING),true)
+
+	USE_NETAPP_SUBR = true
+	CDEFS := $(CDEFS) -DUSE_PING
+
+	ifeq ($(SUPPORT_INET4),true)
+
+		NETAPP_COBJS := $(NETAPP_COBJS) ping.o
+	endif
+
+	ifeq ($(SUPPORT_INET6),true)
+
+		NETAPP_COBJS := $(NETAPP_COBJS) ping6.o
+	endif
+
+endif
+
+ifeq ($(USE_NETAPP_SUBR),true)
+	CDEFS := $(CDEFS) -DUSE_NETAPP_SUBR
+endif
+
+ifeq ($(USE_COPYSAVE_API),true)
+	CDEFS := $(CDEFS) -DUSE_COPYSAVE_API
+endif
+
+ifndef TCP_CFG_PASSIVE_OPEN
+	CDEFS := $(CDEFS) -DUNDEF_TCP_CFG_PASSIVE_OPEN
+endif
+
+ifeq ($(TCP_CFG_RWBUF_CSAVE_ONLY),true)
+	CDEFS := $(CDEFS) -DTCP_CFG_RWBUF_CSAVE_ONLY -DTCP_CFG_RWBUF_CSAVE
+endif
+
+ifeq ($(TCP_CFG_RWBUF_CSAVE),true)
+	CDEFS := $(CDEFS) -DTCP_CFG_RWBUF_CSAVE
+endif
+
+ifeq ($(TCP_CFG_SWBUF_CSAVE_ONLY),true)
+	CDEFS := $(CDEFS) -DTCP_CFG_SWBUF_CSAVE_ONLY -DTCP_CFG_SWBUF_CSAVE
+endif
+
+ifeq ($(TCP_CFG_SWBUF_CSAVE),true)
+	CDEFS := $(CDEFS) -DTCP_CFG_SWBUF_CSAVE
+endif
+
+ifeq ($(TCP_CFG_NON_BLOCKING),true)
+	ifeq ($(USE_TCP_NON_BLOCKING),true)
+		CDEFS := $(CDEFS) -DUSE_TCP_NON_BLOCKING
+	endif
+else
+	CDEFS := $(CDEFS) -DUNDEF_TCP_CFG_NON_BLOCKING
+endif
+
+ifeq ($(TCP_CFG_EXTENTIONS),true)
+	CDEFS := $(CDEFS) -DTCP_CFG_EXTENTIONS
+	ifeq ($(USE_TCP_EXTENTIONS),true)
+		CDEFS := $(CDEFS) -DUSE_TCP_EXTENTIONS
+	endif
+endif
+
+ifeq ($(UDP_CFG_NON_BLOCKING),true)
+	ifeq ($(USE_UDP_NON_BLOCKING),true)
+		CDEFS := $(CDEFS) -DUSE_UDP_NON_BLOCKING
+	else
+		ifeq ($(USE_UDP_CALL_BACK),true)
+			CDEFS := $(CDEFS) -DUSE_UDP_CALL_BACK
+		endif
+	endif
+else
+	CDEFS := $(CDEFS) -DUNDEF_UDP_CFG_NON_BLOCKING
+	ifeq ($(USE_UDP_CALL_BACK),true)
+		CDEFS := $(CDEFS) -DUSE_UDP_CALL_BACK
+	endif
+endif
+
+ifeq ($(UDP_CFG_EXTENTIONS),true)
+	CDEFS := $(CDEFS) -DUDP_CFG_EXTENTIONS
+	ifeq ($(USE_UDP_EXTENTIONS),true)
+		CDEFS := $(CDEFS) -DUSE_UDP_EXTENTIONS
+	endif
+endif
+
+#
+#  ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ã«é¢ããå®ç¾©ã¸ã®è¿½å 
+#
+
+ifeq ($(TARGET_KERNEL),ASP)
+
+	APPLDIR := $(APPLDIR) $(NETAPP_DIR)
+	APPL_COBJS := $(APPL_COBJS) $(NETAPP_COBJS)
+	APPL_CFLAGS := $(APPL_CFLAGS) -fno-strict-aliasing
+
+endif
+
+ifeq ($(TARGET_KERNEL),JSP)
+
+	UTASK_DIR := $(UTASK_DIR):$(NETAPP_DIR)
+	UTASK_COBJS := $(UTASK_COBJS) $(NETAPP_COBJS)
+	UTASK_CFLAGS := $(UTASK_CFLAGS) -fno-strict-aliasing
+
+endif
+
+#
+#  TINET ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®å®ç¾©ã¸ã®è¿½å 
+#
+TINET_KERNEL_CFG := $(TINET_KERNEL_CFG) $(NETAPP_KERNEL_CFG)
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/dbg_cons.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/dbg_cons.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/dbg_cons.c	(revision 270)
@@ -0,0 +1,2388 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  ãããã°ã³ã³ã½ã¼ã«
+ */
+
+#include <stdlib.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <syssvc/serial.h>
+#include <syssvc/logtask.h>
+#include "kernel_cfg.h"
+#include "kernel/kernel_impl.h"
+#include "kernel/task.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#include "../kernel/jsp_kernel.h"
+#include "../kernel/task.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/ppp_var.h>
+#include <net/ppp_fsm.h>
+#include <net/ppp_lcp.h>
+#include <net/ppp_ipcp.h>
+#include <net/ppp_modem.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet/in_itron.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet/if_ether.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_timer.h>
+#include <netinet/tcp_var.h>
+#include <netinet/tcp_fsm.h>
+#include <netinet/udp.h>
+#include <netinet/udp_var.h>
+
+#include <net/if_var.h>
+#include <net/if6_var.h>
+
+#include <netapp/netapp.h>
+#include <netapp/netapp_var.h>
+#include <netapp/echo.h>
+#include <netapp/discard.h>
+#include <netapp/dbg_cons.h>
+
+#ifdef USE_LCD
+
+#include "sc1602/lcd.h"
+
+#endif	/* of #ifdef USE_LCD */
+
+#ifdef USE_DBG_CONS
+
+#define DBG_LINE_SIZE	63
+
+/*
+ *  task_status -- ã¿ã¹ã¯ã®ç¶æ
+ã®åºå
+ */
+
+static const char task_stat_str[][sizeof("SUSPENDED")] = {
+	"DORMANT",		/* ä¼æ­¢ç¶æ
+		*/
+	"RUNNABLE",		/* å®è¡ã§ããç¶æ
+	*/
+	"WAINTING",		/* å¾
+ã¡ç¶æ
+		*/
+	"SUSPENDED",		/* å¼·å¶å¾
+ã¡ç¶æ
+		*/
+	"SLEEP",		/* èµ·åºå¾
+ã¡ç¶æ
+		*/
+	"WOBJ",			/* åæã»éä¿¡ãªãã¸ã§ã¯ãã«å¯¾ããå¾
+ã¡ç¶æ
+	*/
+	"WOBJCB",		/* å
+±éé¨åã®å¾
+ã¡ã­ã¥ã¼ã«ã¤ãªãã£ã¦ããã	*/
+	};
+
+static void
+task_status (ID portid, char *line)
+{
+	TCB	*tcb;
+	int_t	ix, st, sx;
+
+	WAI_NET_CONS_PRINTF();
+	cons_printf(portid,
+	            "TASK Status\n"
+	            "ID PI State\n");
+	for (ix = TMIN_TSKID; ix <= tmax_tskid; ix ++) {
+		tcb = get_tcb(ix);
+		cons_printf(portid, "%2d %2d ", ix, tcb->priority);
+		st = tcb->tstat;
+		for (sx = 0; st; sx ++) {
+			if (st & 0x01) {
+				cons_printf(portid, "%s", task_stat_str[sx]);
+				if (st & 0xfe)
+					cons_printf(portid, "|");
+				}
+			st >>= 1;
+			}
+		cons_printf(portid, "\n");
+		}
+
+	SIG_NET_CONS_PRINTF();
+	FLUSH_SND_BUFF();
+	}
+
+#ifdef SUPPORT_TCP
+
+/*
+ *  tcp_status -- TCP ã®ç¶æ
+ã®åºå
+ */
+
+static const char tcp_fsm_str[][sizeof("ESTABLISHED")] = {
+	"CLOSED",		/* ã¯ã­ã¼ãº			*/
+	"LISTEN",		/* ååãªã¼ãã³			*/
+	"SYN_SENT",		/* è½åãªã¼ãã³ãSYN éä¿¡æ¸ã¿	*/
+	"SYN_RECVD",		/* ååãªã¼ãã³ãSYN åä¿¡æ¸ã¿	*/
+	"ESTABLISHED",		/* ã³ãã¯ã·ã§ã³éè¨­å®äº		*/
+	"CLOSE_WAIT",		/* ç¸æãã FIN åä¿¡ãAPP ã®çµäºå¾
+ã¡	*/
+	"FIN_WAIT_1",		/* APP ãçµäºãFIN éä¿¡æ¸ã¿ãACK å¾
+ã¡	*/
+	"CLOSING",		/* åæã¯ã­ã¼ãºãFIN äº¤ææ¸ã¿ãACK å¾
+ã¡	*/
+	"LAST_ACK",		/* APP ãçµäºãACK å¾
+ã¡			*/
+	"FIN_WAIT_2",		/* ç¸æããã® FIN å¾
+ã¡			*/
+	"TIME_WAIT",		/* ç¸æããã® FIN åä¿¡æ¸ã¿ãæéå¾
+ã¡	*/
+	};
+
+#if defined(SUPPORT_INET4)
+
+static void
+tcp_status (ID portid, char *line)
+{
+	T_TCP_CEP*	cep;
+	uint_t		len;
+
+#if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0
+
+	T_TCP_TWCEP*	twcep;
+
+#endif	/* of #if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0 */
+
+#ifdef TCP_CFG_PASSIVE_OPEN
+
+	T_TCP_REP*	rep;
+	int_t		cnt;
+
+#endif	/* of #ifdef TCP_CFG_PASSIVE_OPEN */
+
+	WAI_NET_CONS_PRINTF();
+	cons_printf(portid,
+	            "TCP CEP Status\n"
+	            "ID  Snd-Q Rcv-Q Local Address         Foreign Address       State\n");
+
+	for (cep = tcp_cep; cep < &tcp_cep[tmax_tcp_cepid]; cep ++)
+		if (!VALID_TCP_CEP(cep)) {
+			cons_printf(portid,
+			            "%2d%c     0     0"
+			            " -                    "
+			            " -                    "
+			            " INVALID\n",
+			            GET_TCP_CEPID(cep),
+			            DYNAMIC_TCP_CEP(cep) ? 'D' : ' ');
+			}
+		else if (cep->fsm_state == TCP_FSM_CLOSED) {
+			cons_printf(portid,
+			            "%2d%c     0     0"
+			            " -                    "
+			            " -                    "
+			            " CLOSED\n",
+			            GET_TCP_CEPID(cep),
+			            DYNAMIC_TCP_CEP(cep) ? 'D' : ' ');
+			}
+		else if (cep->fsm_state == TCP_FSM_LISTEN) {
+			cons_printf(portid,
+			            "%2d%c     0     0 ",
+			            GET_TCP_CEPID(cep),
+			            DYNAMIC_TCP_CEP(cep) ? 'D' : ' ');
+			len  = PUT_IPADDR(portid, &cep->myaddr.ipaddr, 0);
+			cons_putchar(portid, ':');
+			len += cons_putnumber(portid, cep->myaddr.portno, 10, radhex, 0, false, ' ');
+			for (len = 20 - len; len -- > 0; )
+				cons_putchar(portid, ' ');
+			cons_printf(portid,
+			            " -                    "
+			            " LISTEN\n");
+			}
+		else {
+			cons_printf(portid,
+			            "%2d%c %5d %5d ",
+			            GET_TCP_CEPID(cep),
+			            DYNAMIC_TCP_CEP(cep) ? 'D' : ' ',
+			            cep->swbuf_count, cep->rwbuf_count);
+			len  = PUT_IPADDR(portid, &cep->myaddr.ipaddr, 0);
+			cons_putchar(portid, ':');
+			len += cons_putnumber(portid, cep->myaddr.portno, 10, radhex, 0, false, ' ');
+			for (len = 21 - len; len -- > 0; )
+				cons_putchar(portid, ' ');
+			len  = PUT_IPADDR(portid, &cep->dstaddr.ipaddr, 0);
+			cons_putchar(portid, ':');
+			len += cons_putnumber(portid, cep->dstaddr.portno, 10, radhex, 0, false, ' ');
+			for (len = 20 - len; len -- > 0; )
+				cons_putchar(portid, ' ');
+			if (cep->fsm_state == TCP_FSM_TIME_WAIT)
+				cons_printf(portid, " %s(%d)\n", tcp_fsm_str[cep->fsm_state],
+				                    cep->timer[TCP_TIM_2MSL] / TCP_SLOW_HZ);
+			else
+				cons_printf(portid, " %s\n", tcp_fsm_str[cep->fsm_state]);
+			}
+
+#if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0
+
+	for (twcep = tcp_twcep; twcep < &tcp_twcep[NUM_TCP_TW_CEP_ENTRY]; twcep ++) {
+		if (twcep->fsm_state == TCP_FSM_CLOSED) {
+			cons_printf(portid,
+			            "%2dTW    0     0"
+			            " -                    "
+			            " -                    "
+			            " CLOSED\n",
+			            GET_TCP_TWCEPID(twcep));
+			}
+		else {
+			cons_printf(portid, "%2dTW    0     0 ", GET_TCP_TWCEPID(twcep));
+			len  = PUT_IPADDR(portid, &twcep->myaddr.ipaddr, 0);
+			cons_putchar(portid, ':');
+			len += cons_putnumber(portid, twcep->myaddr.portno, 10, radhex, 0, false, ' ');
+			for (len = 21 - len; len -- > 0; )
+				cons_putchar(portid, ' ');
+			len  = PUT_IPADDR(portid, &twcep->dstaddr.ipaddr, 0);
+			cons_putchar(portid, ':');
+			len += cons_putnumber(portid, twcep->dstaddr.portno, 10, radhex, 0, false, ' ');
+			for (len = 20 - len; len -- > 0; )
+				cons_putchar(portid, ' ');
+			if (twcep->fsm_state == TCP_FSM_TIME_WAIT)
+				cons_printf(portid, " %s(%d)\n", tcp_fsm_str[twcep->fsm_state],
+				                    twcep->timer_2msl / TCP_SLOW_HZ);
+			else
+				cons_printf(portid, " %s\n", tcp_fsm_str[twcep->fsm_state]);
+			}
+		}
+
+#endif	/* of #if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0 */
+
+#ifdef TCP_CFG_PASSIVE_OPEN
+
+	cons_printf(portid,
+	            "TCP REP Status\n"
+	            "ID  Local Address         CEP\n");
+	for (rep = tcp_rep; rep < &tcp_rep[tmax_tcp_repid]; rep ++) {
+		cons_printf(portid, "%2d%c ", GET_TCP_REPID(rep), DYNAMIC_TCP_REP(rep) ? 'D' : ' ');
+		if (VALID_TCP_REP(rep)) {
+			len  = PUT_IPADDR(portid, &rep->myaddr.ipaddr, 0);
+			cons_putchar(portid, ':');
+			len += cons_putnumber(portid, rep->myaddr.portno, 10, radhex, 0, false, ' ');
+			for (len = 21 - len; len -- > 0; )
+				cons_putchar(portid, ' ');
+			cnt = 0;
+			for (cep = tcp_cep; cep < &tcp_cep[tmax_tcp_cepid]; cep ++) {
+				if (cep->rep == rep) {
+					if (cnt > 0)
+						cons_printf(portid, ",%d", GET_TCP_CEPID(cep));
+					else
+						cons_printf(portid, "%d", GET_TCP_CEPID(cep));
+					cnt ++;
+					}
+				}
+			}
+		else
+			cons_printf(portid, "INVALID");
+		cons_putchar(portid, '\n');
+		}
+
+#endif	/* of #ifdef TCP_CFG_PASSIVE_OPEN */
+
+	SIG_NET_CONS_PRINTF();
+	FLUSH_SND_BUFF();
+	}
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+static void
+tcp_status (ID portid, char *line)
+{
+	T_TCP_CEP*	cep;
+	uint_t		len;
+
+#if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0
+
+	T_TCP_TWCEP*	twcep;
+
+#endif	/* of #if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0 */
+
+#ifdef TCP_CFG_PASSIVE_OPEN
+
+	T_TCP_REP*	rep;
+	int_t		cnt;
+
+#endif	/* of #ifdef TCP_CFG_PASSIVE_OPEN */
+
+	WAI_NET_CONS_PRINTF();
+	cons_printf(portid,
+	            "TCP CEP Status\n"
+	            "ID  Snd-Q Rcv-Q Foreign Address                             State\n");
+
+	for (cep = tcp_cep; cep < &tcp_cep[tmax_tcp_cepid]; cep ++)
+		if (!VALID_TCP_CEP(cep)) {
+			cons_printf(portid,
+			            "%2d%c     0     0"
+			            " -                                          "
+			            " INVALID\n",
+			            GET_TCP_CEPID(cep),
+			            DYNAMIC_TCP_CEP(cep) ? 'D' : ' ');
+			}
+		else if (cep->fsm_state == TCP_FSM_CLOSED) {
+			cons_printf(portid,
+			            "%2d%c     0     0"
+			            " -                                          "
+			            " CLOSED\n",
+			            GET_TCP_CEPID(cep),
+			            DYNAMIC_TCP_CEP(cep) ? 'D' : ' ');
+			}
+		else if (cep->fsm_state == TCP_FSM_LISTEN) {
+			cons_printf(portid,
+			            "%2d%c     0     0"
+			            " -                                          "
+			            " LISTEN\n",
+			            GET_TCP_CEPID(cep),
+			            DYNAMIC_TCP_CEP(cep) ? 'D' : ' ');
+			}
+		else {
+			cons_printf(portid,
+			            "%2d%c %5d %5d ",
+			            GET_TCP_CEPID(cep),
+			            DYNAMIC_TCP_CEP(cep) ? 'D' : ' ',
+			            cep->swbuf_count, cep->rwbuf_count);
+			len  = PUT_IPADDR(portid, &cep->dstaddr.ipaddr, 0);
+			cons_putchar(portid, '.');
+			len += cons_putnumber(portid, cep->dstaddr.portno, 10, radhex, 0, false, ' ');
+			for (len = 42 - len; len -- > 0; )
+				cons_putchar(portid, ' ');
+			if (cep->fsm_state == TCP_FSM_TIME_WAIT)
+				cons_printf(portid, " %s(%d)\n", tcp_fsm_str[cep->fsm_state],
+				                    cep->timer[TCP_TIM_2MSL] / TCP_SLOW_HZ);
+			else
+				cons_printf(portid, " %s\n", tcp_fsm_str[cep->fsm_state]);
+			}
+
+#if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0
+
+	for (twcep = tcp_twcep; twcep < &tcp_twcep[NUM_TCP_TW_CEP_ENTRY]; twcep ++) {
+		if (twcep->fsm_state == TCP_FSM_CLOSED) {
+			cons_printf(portid,
+			            "%2dTW    0     0"
+			            " -                                          "
+			            " CLOSED\n",
+			            GET_TCP_TWCEPID(twcep));
+			}
+		else {
+			cons_printf(portid, "%2dTW    0     0 ", GET_TCP_TWCEPID(twcep));
+			len  = PUT_IPADDR(portid, &twcep->dstaddr.ipaddr, 0);
+			cons_putchar(portid, '.');
+			len += cons_putnumber(portid, twcep->dstaddr.portno, 10, radhex, 0, false, ' ');
+			for (len = 42 - len; len -- > 0; )
+				cons_putchar(portid, ' ');
+			if (twcep->fsm_state == TCP_FSM_TIME_WAIT)
+				cons_printf(portid, " %s(%d)\n", tcp_fsm_str[twcep->fsm_state],
+				                    twcep->timer_2msl / TCP_SLOW_HZ);
+			else
+				cons_printf(portid, " %s\n", tcp_fsm_str[twcep->fsm_state]);
+			}
+		}
+
+#endif	/* of #if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0 */
+
+#ifdef TCP_CFG_PASSIVE_OPEN
+
+	cons_printf(portid,
+	            "TCP REP Status\n"
+	            "ID  Local Address         CEP\n");
+	for (rep = tcp_rep; rep < &tcp_rep[tmax_tcp_repid]; rep ++) {
+		cons_printf(portid, "%2d%c ", GET_TCP_REPID(rep), DYNAMIC_TCP_REP(rep) ? 'D' : ' ');
+		if (VALID_TCP_REP(rep)) {
+			len  = PUT_IPADDR(portid, &rep->myaddr.ipaddr, 0);
+			cons_putchar(portid, '.');
+			len += cons_putnumber(portid, rep->myaddr.portno, 10, radhex, 0, false, ' ');
+			for (len = 21 - len; len -- > 0; )
+				cons_putchar(portid, ' ');
+			cnt = 0;
+			for (cep = tcp_cep; cep < &tcp_cep[tmax_tcp_cepid]; cep ++) {
+				if (cep->rep == rep) {
+					if (cnt > 0)
+						cons_printf(portid, ",%d", GET_TCP_CEPID(cep));
+					else
+						cons_printf(portid, "%d", GET_TCP_CEPID(cep));
+					cnt ++;
+					}
+				}
+			}
+		else
+			cons_printf(portid, "INVALID");
+		cons_putchar(portid, '\n');
+		}
+
+#endif	/* of #ifdef TCP_CFG_PASSIVE_OPEN */
+
+	SIG_NET_CONS_PRINTF();
+	FLUSH_SND_BUFF();
+	}
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+#endif	/* of #ifdef SUPPORT_TCP */
+
+#ifdef SUPPORT_UDP
+
+/*
+ *  udp_status -- UDP ã®ç¶æ
+ã®åºå
+ */
+
+static void
+udp_status (ID portid, char *line)
+{
+	T_UDP_CEP*	cep;
+	uint_t		len;
+
+	WAI_NET_CONS_PRINTF();
+	cons_printf(portid,
+	            "UDP CEP Status\n"
+	            "ID  Local Address\n");
+
+	for (cep = udp_cep; cep < &udp_cep[tmax_udp_ccepid]; cep ++) {
+		cons_printf(portid, "%2d%c ", GET_UDP_CEPID(cep), DYNAMIC_UDP_CEP(cep) ? 'D' : ' ');
+		if (VALID_UDP_CEP(cep)) {
+			len  = PUT_IPADDR(portid, &cep->myaddr.ipaddr, 0);
+			cons_putchar(portid, '.');
+			len += cons_putnumber(portid, cep->myaddr.portno, 10, radhex, 0, false, ' ');
+			}
+		else
+			cons_printf(portid, "INVALID");
+		cons_putchar(portid, '\n');
+		}
+
+	SIG_NET_CONS_PRINTF();
+	FLUSH_SND_BUFF();
+	}
+
+#endif	/* of #ifdef SUPPORT_UDP */
+
+#ifdef SUPPORT_ETHER
+
+#if defined(SUPPORT_INET4)
+
+/*
+ *  ifa_status -- ARP ã­ã£ãã·ã¥åºå
+ */
+
+static void
+ifa_status (ID portid, char *line)
+{
+	const T_ARP_ENTRY	*cache;
+	int_t			ix;
+
+	WAI_NET_CONS_PRINTF();
+	cons_printf(portid,
+	            "ARP Cache\n"
+	            "IX Expire IP Address      MAC Address\n");
+
+	/* expire ã®åä½ã¯ [ms]ã*/
+	cache = arp_get_cache();
+	for (ix = 0; ix < NUM_ARP_ENTRY; ix ++) {
+		if (cache[ix].expire != 0)
+			cons_printf(portid, "%2d %6d %15I %M\n",
+			                    ix, cache[ix].expire / NET_TIMER_HZ,
+			                    &cache[ix].ip_addr, cache[ix].mac_addr);
+		}
+
+	SIG_NET_CONS_PRINTF();
+	FLUSH_SND_BUFF();
+	}
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+/*
+ * ifa_status -- è¿é£ã­ã£ãã·ã¥ç¶æ
+ã®åºå
+ */
+
+static const char nd_state_str[][sizeof("INCOMPLETE")] = {
+	"FREE",			/* æªä½¿ç¨		*/
+	"NO STATE",		/* ç¶æ
+æªå®ç¾©		*/
+	"INCOMPLETE",		/* æªè§£æ±º		*/
+	"REACHABLE",		/* å°éå¯è½		*/
+	"STALE",		/* å°éå¯è½æ§ã¯æªç¢ºèª	*/
+	"DELAY",		/* å°éå¯è½æ§ã®ç¢ºèªå¾
+æ©	*/
+	"PROBE",		/* å°éå¯è½æ§ãç¢ºèªä¸­	*/
+	};
+
+static void
+ifa_status (ID portid, char *line)
+{
+	const T_LLINFO_ND6	*cache;
+	SYSTIM			now;
+	int_t			ix;
+
+	WAI_NET_CONS_PRINTF();
+	cons_printf(portid,
+	            "ND Cache Status\n"
+	            "IX Expire State      MAC Address       IP Address\n");
+
+	/* expire ã®åä½ã¯ [ms]ã*/
+	get_tim(&now);
+	cache = nd6_get_cache();
+	for (ix = 0; ix < NUM_ND6_CACHE_ENTRY; ix ++) {
+		if (cache[ix].state != ND6_LLINFO_FREE) {
+			cons_printf(portid, "%2d %6d %10s %M %I\n",
+			            ix, 
+			            cache[ix].state == ND6_LLINFO_STALE ||
+			            (uint32_t)(cache[ix].expire - now) <= 0
+			                ? 0 : (cache[ix].expire - now) / SYSTIM_HZ,
+			            nd_state_str[cache[ix].state],
+			            &cache[ix].ifaddr,
+			            &cache[ix].addr);
+			}
+		}
+
+	SIG_NET_CONS_PRINTF();
+	FLUSH_SND_BUFF();
+	}
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#if NET_COUNT_ENABLE
+
+/*
+ *  net_count_struct -- ãããã¯ã¼ã¯çµ±è¨æ
+å ±
+ */
+
+static void
+net_count_struct (ID portid, char *name, T_NET_COUNT *item)
+{
+	cons_printf(portid, "\n%s\n", name);
+	cons_printf(portid, "\tåä¿¡ãªã¯ãããæ°\t%lu\n",	item->in_octets);
+	cons_printf(portid, "\téä¿¡ãªã¯ãããæ°\t%lu\n",	item->out_octets);
+	cons_printf(portid, "\tåä¿¡ãã±ããæ°\t%lu\n",		item->in_packets);
+	cons_printf(portid, "\téä¿¡ãã±ããæ°\t%lu\n",		item->out_packets);
+	cons_printf(portid, "\tåä¿¡ã¨ã©ã¼ãã±ããæ°\t%lu\n",	item->in_err_packets);
+	cons_printf(portid, "\téä¿¡ã¨ã©ã¼ãã±ããæ°\t%lu\n",	item->out_err_packets);
+	}
+
+/*
+ *  net_count -- ãããã¯ã¼ã¯çµ±è¨æ
+å ±
+ */
+
+static void
+net_count (ID portid, char *line)
+{
+	const T_NET_BUF_ENTRY	*tbl;
+	SYSTIM			now;
+	int_t			ix;
+
+	WAI_NET_CONS_PRINTF();
+	get_tim(&now);
+	cons_printf(portid, "ãããã¯ã¼ã¯çµ±è¨æ
+å ±\tçµéæé[ms]\t%lu\t", now);
+	if (now > (1000 * 3600 * 24))
+		cons_printf(portid, "%3luæ¥ %2luæé %2luå %2luç§\n",
+		             now / (1000 * 3600 * 24),
+		            (now / (1000 * 3600)) % 24,
+		            (now / (1000 * 60  )) % 60,
+		            (now /  1000        ) % 60);
+	else
+		cons_printf(portid, "%2luæé %2luå %2luç§\n",
+		            (now / (1000 * 3600)) % 24,
+		            (now / (1000 * 60  )) % 60,
+		            (now /  1000        ) % 60);
+
+#ifdef SUPPORT_PPP
+
+	net_count_struct(portid, "HDLC", &net_count_hdlc);
+	cons_printf(portid, "\nPPP\n");
+	cons_printf(portid, "\tåä¿¡ãªã¯ãããæ°\t%lu\n",	net_count_ppp.in_octets);
+	cons_printf(portid, "\téä¿¡ãªã¯ãããæ°\t%lu\n",	net_count_ppp.out_octets);
+	cons_printf(portid, "\tåä¿¡ãã±ããæ°\t%lu\n",		net_count_ppp.in_packets);
+	cons_printf(portid, "\téä¿¡ãã±ããæ°\t%lu\n",		net_count_ppp.out_packets);
+	cons_printf(portid, "\tåä¿¡ã¨ã©ã¼ãã±ããæ°\t%lu\n",	net_count_ppp.in_err_packets);
+	cons_printf(portid, "\téä¿¡ã¨ã©ã¼ãã±ããæ°\t%lu\n",	net_count_ppp.out_err_packets);
+	cons_printf(portid, "\tnet_buf å²ãå½ã¦å¤±ææ°\t%lu\n",	net_count_ppp_no_bufs);
+
+	cons_printf(portid, "\nLCP\n");
+	cons_printf(portid, "\tåä¿¡ãªã¯ãããæ°\t%lu\n",	net_count_ppp_lcp_in_octets);
+	cons_printf(portid, "\tåä¿¡ãã±ããæ°\t%lu\n",		net_count_ppp_lcp_in_packets);
+
+	cons_printf(portid, "\nIPCP\n");
+	cons_printf(portid, "\tåä¿¡ãªã¯ãããæ°\t%lu\n",	net_count_ppp_ipcp_in_octets);
+	cons_printf(portid, "\tåä¿¡ãã±ããæ°\t%lu\n",		net_count_ppp_ipcp_in_packets);
+
+	cons_printf(portid, "\nPAP\n");
+	cons_printf(portid, "\tåä¿¡ãªã¯ãããæ°\t%lu\n",	net_count_ppp_upap_in_octets);
+	cons_printf(portid, "\tåä¿¡ãã±ããæ°\t%lu\n",		net_count_ppp_upap_in_packets);
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#ifdef SUPPORT_ETHER
+
+	net_count_struct(portid, "ã¤ã¼ãµããã", &net_count_ether);
+
+	cons_printf(portid, "\nã¤ã¼ãµãããã»ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹\n");
+	cons_printf(portid, "\tåä¿¡ãªã¯ãããæ°\t%lu\n",			net_count_ether_nic[NC_ETHER_NIC_IN_OCTETS]);
+	cons_printf(portid, "\tåä¿¡ãã±ããæ°\t%lu\n",				net_count_ether_nic[NC_ETHER_NIC_IN_PACKETS]);
+	cons_printf(portid, "\tåä¿¡ã¨ã©ã¼ãã±ããæ°\t%lu\n",			net_count_ether_nic[NC_ETHER_NIC_IN_ERR_PACKETS]);
+	cons_printf(portid, "\tnet_buf å²ãå½ã¦å¤±ææ°\t%lu\n",			net_count_ether_nic[NC_ETHER_NIC_NO_BUFS]);
+	cons_printf(portid, "\tåä¿¡ã»ããã©è³æºè¿å´ä¸éãªã¼ãã¼æ°\t%lu\n",	net_count_ether_nic[NC_ETHER_NIC_RXB_QOVRS]);
+	cons_printf(portid, "\téä¿¡ãªã¯ãããæ°\t%lu\n",			net_count_ether_nic[NC_ETHER_NIC_OUT_OCTETS]);
+	cons_printf(portid, "\téä¿¡ãã±ããæ°\t%lu\n",				net_count_ether_nic[NC_ETHER_NIC_OUT_PACKETS]);
+	cons_printf(portid, "\téä¿¡ã¨ã©ã¼ãã±ããæ°\t%lu\n",			net_count_ether_nic[NC_ETHER_NIC_OUT_ERR_PACKETS]);
+	cons_printf(portid, "\tã³ãªã¸ã§ã³æ°\t%lu\n",				net_count_ether_nic[NC_ETHER_NIC_COLS]);
+	cons_printf(portid, "\téä¿¡ã»ããã©è³æºè¿å´ä¸éãªã¼ãã¼æ°\t%lu\n",	net_count_ether_nic[NC_ETHER_NIC_TXB_QOVRS]);
+	cons_printf(portid, "\téä¿¡ã¿ã¤ã ã¢ã¦ãæ°	\t%lu\n",		net_count_ether_nic[NC_ETHER_NIC_TIMEOUTS]);
+	cons_printf(portid, "\tãªã»ããæ°\t%lu\n",				net_count_ether_nic[NC_ETHER_NIC_RESETS]);
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#if defined(SUPPORT_INET4)
+
+#ifdef SUPPORT_ETHER
+
+	net_count_struct(portid, "ARP", &net_count_arp);
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+	cons_printf(portid, "\nIPv4\n");
+	cons_printf(portid, "\tåä¿¡ãªã¯ãããæ°\t%lu\n",		net_count_ip4[NC_IP4_IN_OCTETS]);
+	cons_printf(portid, "\tåä¿¡ãã¼ã¿ã°ã©ã æ°\t%lu\n",		net_count_ip4[NC_IP4_IN_PACKETS]);
+	cons_printf(portid, "\tåä¿¡ã¨ã©ã¼ãã¼ã¿ã°ã©ã æ°\t%lu\n",	net_count_ip4[NC_IP4_IN_ERR_PACKETS]);
+	cons_printf(portid, "\tãã§ãã¯ãµã ã¨ã©ã¼æ°\t%lu\n",		net_count_ip4[NC_IP4_IN_ERR_CKSUM]);
+	cons_printf(portid, "\té·ãã¨ã©ã¼æ°\t%lu\n",			net_count_ip4[NC_IP4_IN_ERR_SHORT]);
+	cons_printf(portid, "\tãã¼ã¸ã§ã³ã¨ã©ã¼æ°\t%lu\n",		net_count_ip4[NC_IP4_IN_ERR_VER]);
+	cons_printf(portid, "\tã¢ãã¬ã¹ã¨ã©ã¼æ°\t%lu\n",		net_count_ip4[NC_IP4_IN_ERR_ADDR]);
+	cons_printf(portid, "\tãã­ãã³ã«ã¨ã©ã¼æ°\t%lu\n",		net_count_ip4[NC_IP4_IN_ERR_PROTO]);
+	cons_printf(portid, "\tãªãã·ã§ã³å
+¥åæ°\t%lu\n",		net_count_ip4[NC_IP4_OPTS]);
+	cons_printf(portid, "\tåå²åä¿¡æ°\t%lu\n",			net_count_ip4[NC_IP4_FRAG_IN]);
+	cons_printf(portid, "\tåå²åä¿¡ãã©ã°ã¡ã³ãæ°\t%lu\n",		net_count_ip4[NC_IP4_FRAG_IN_FRAGS]);
+	cons_printf(portid, "\tåå²åä¿¡åæ§ææåæ°\t%lu\n",		net_count_ip4[NC_IP4_FRAG_IN_OK]);
+	cons_printf(portid, "\tåå²åä¿¡ç ´æ£æ°\t%lu\n",			net_count_ip4[NC_IP4_FRAG_IN_DROP]);
+	cons_printf(portid, "\tåå²åä¿¡ãããã¡ãå½ã¦å¤±ææ°\t%lu\n",	net_count_ip4[NC_IP4_FRAG_IN_NO_BUF]);
+	cons_printf(portid, "\tåå²åä¿¡ã¿ã¤ã ã¢ã¦ãæ°\t%lu\n",		net_count_ip4[NC_IP4_FRAG_IN_TMOUT]);
+	cons_printf(portid, "\téä¿¡ãªã¯ãããæ°\t%lu\n",		net_count_ip4[NC_IP4_OUT_OCTETS]);
+	cons_printf(portid, "\téä¿¡ãã¼ã¿ã°ã©ã æ°\t%lu\n",		net_count_ip4[NC_IP4_OUT_PACKETS]);
+	cons_printf(portid, "\téä¿¡ã¨ã©ã¼ãã¼ã¿ã°ã©ã æ°\t%lu\n",	net_count_ip4[NC_IP4_OUT_ERR_PACKETS]);
+	cons_printf(portid, "\tåå²éä¿¡æ°\t%lu\n",			net_count_ip4[NC_IP4_FRAG_OUT]);
+	cons_printf(portid, "\tåå²éä¿¡ãã©ã°ã¡ã³ãæ°\t%lu\n",		net_count_ip4[NC_IP4_FRAG_OUT_FRAGS]);
+
+	net_count_struct(portid, "ICMP", &net_count_icmp4);
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+	cons_printf(portid, "\nIPv6\n");
+	cons_printf(portid, "\tåä¿¡ãªã¯ãããæ°\t%lu\n",		net_count_ip6[NC_IP6_IN_OCTETS]);
+	cons_printf(portid, "\tåä¿¡ãã¼ã¿ã°ã©ã æ°\t%lu\n",		net_count_ip6[NC_IP6_IN_PACKETS]);
+	cons_printf(portid, "\tåä¿¡ã¨ã©ã¼ãã¼ã¿ã°ã©ã æ°\t%lu\n",	net_count_ip6[NC_IP6_IN_ERR_PACKETS]);
+	cons_printf(portid, "\té·ãã¨ã©ã¼æ°\t%lu\n",			net_count_ip6[NC_IP6_IN_ERR_SHORT]);
+	cons_printf(portid, "\tãã¼ã¸ã§ã³ã¨ã©ã¼æ°\t%lu\n",		net_count_ip6[NC_IP6_IN_ERR_VER]);
+	cons_printf(portid, "\tã¢ãã¬ã¹ã¨ã©ã¼æ°\t%lu\n",		net_count_ip6[NC_IP6_IN_ERR_ADDR]);
+	cons_printf(portid, "\tãã­ãã³ã«ã¨ã©ã¼æ°\t%lu\n",		net_count_ip6[NC_IP6_IN_ERR_PROTO]);
+	cons_printf(portid, "\tåå²åä¿¡æ°\t%lu\n",			net_count_ip6[NC_IP6_FRAG_IN]);
+	cons_printf(portid, "\tåå²åä¿¡ãã©ã°ã¡ã³ãæ°\t%lu\n",		net_count_ip6[NC_IP6_FRAG_IN_FRAGS]);
+	cons_printf(portid, "\tåå²åä¿¡åæ§ææåæ°\t%lu\n",		net_count_ip6[NC_IP6_FRAG_IN_OK]);
+	cons_printf(portid, "\tåå²åä¿¡ç ´æ£æ°\t%lu\n",			net_count_ip6[NC_IP6_FRAG_IN_DROP]);
+	cons_printf(portid, "\tåå²åä¿¡ãããã¡ãå½ã¦å¤±ææ°\t%lu\n",	net_count_ip6[NC_IP6_FRAG_IN_NO_BUF]);
+	cons_printf(portid, "\tåå²åä¿¡ã¿ã¤ã ã¢ã¦ãæ°\t%lu\n",		net_count_ip6[NC_IP6_FRAG_IN_TMOUT]);
+	cons_printf(portid, "\téä¿¡ãªã¯ãããæ°\t%lu\n",		net_count_ip6[NC_IP6_OUT_OCTETS]);
+	cons_printf(portid, "\téä¿¡ãã¼ã¿ã°ã©ã æ°\t%lu\n",		net_count_ip6[NC_IP6_OUT_PACKETS]);
+	cons_printf(portid, "\téä¿¡ã¨ã©ã¼ãã¼ã¿ã°ã©ã æ°\t%lu\n",	net_count_ip6[NC_IP6_OUT_ERR_PACKETS]);
+	cons_printf(portid, "\tåå²éä¿¡æ°\t%lu\n",			net_count_ip6[NC_IP6_FRAG_OUT]);
+	cons_printf(portid, "\tåå²éä¿¡ãã©ã°ã¡ã³ãæ°\t%lu\n",		net_count_ip6[NC_IP6_FRAG_OUT_FRAGS]);
+
+	cons_printf(portid, "\nICMPv6\n");
+	cons_printf(portid, "\tåä¿¡ãªã¯ãããæ°\t%lu\n",		net_count_icmp6[NC_ICMP6_IN_OCTETS]);
+	cons_printf(portid, "\tåä¿¡ãã±ããæ°\t%lu\n",			net_count_icmp6[NC_ICMP6_IN_PACKETS]);
+	cons_printf(portid, "\tåä¿¡ã¨ã©ã¼ãã±ããæ°\t%lu\n",		net_count_icmp6[NC_ICMP6_IN_ERR_PACKETS]);
+	cons_printf(portid, "\tåä¿¡ããã¯ãµã ã¨ã©ã¼æ°\t%lu\n",		net_count_icmp6[NC_ICMP6_IN_ERR_CKSUM]);
+	cons_printf(portid, "\téä¿¡ãªã¯ãããæ°\t%lu\n",		net_count_icmp6[NC_ICMP6_OUT_OCTETS]);
+	cons_printf(portid, "\téä¿¡ãã±ããæ°\t%lu\n",			net_count_icmp6[NC_ICMP6_OUT_PACKETS]);
+	cons_printf(portid, "\téä¿¡ã¨ã©ã¼ãã±ããæ°\t%lu\n",		net_count_icmp6[NC_ICMP6_OUT_ERR_PACKETS]);
+
+	cons_printf(portid, "\nè¿é£æ¢ç´¢\n");
+	cons_printf(portid, "\tã«ã¼ã¿éç¥åä¿¡æ°\t%lu\n",		net_count_nd6[NC_ND6_RA_IN_PACKETS]);
+	cons_printf(portid, "\tã«ã¼ã¿è¦è«éä¿¡æ°\t%lu\n",		net_count_nd6[NC_ND6_RS_OUT_PACKETS]);
+	cons_printf(portid, "\tè¿é£éç¥åä¿¡æ°\t%lu\n",			net_count_nd6[NC_ND6_NA_IN_PACKETS]);
+	cons_printf(portid, "\tè¿é£éç¥éä¿¡æ°\t%lu\n",			net_count_nd6[NC_ND6_NA_OUT_PACKETS]);
+	cons_printf(portid, "\tè¿é£è¦è«åä¿¡æ°\t%lu\n",			net_count_nd6[NC_ND6_NS_IN_PACKETS]);
+	cons_printf(portid, "\tè¿é£è¦è«éä¿¡æ°\t%lu\n",			net_count_nd6[NC_ND6_NS_OUT_PACKETS]);
+	cons_printf(portid, "\téè¤ã¢ãã¬ã¹æ¤åºéä¿¡æ°\t%lu\n",		net_count_nd6[NC_ND6_DAD_OUT_PACKETS]);
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+#ifdef SUPPORT_TCP
+
+	cons_printf(portid, "\nTCP\n");
+	cons_printf(portid, "\tåä¿¡ãªã¯ãããæ°\t%lu\n",		net_count_tcp[NC_TCP_RECV_OCTETS]);
+	cons_printf(portid, "\tåä¿¡ãã¼ã¿ãªã¯ãããæ°\t%lu\n",		net_count_tcp[NC_TCP_RECV_DATA_OCTETS]);
+	cons_printf(portid, "\tåä¿¡ã»ã°ã¡ã³ãæ°\t%lu\n",		net_count_tcp[NC_TCP_RECV_SEGS]);
+	cons_printf(portid, "\tåä¿¡ãã¼ã¿ã»ã°ã¡ã³ãæ°\t%lu\n",		net_count_tcp[NC_TCP_RECV_DATA_SEGS]);
+	cons_printf(portid, "\tåä¿¡ãç·æ¥ã»ã°ã¡ã³ãæ°\t%lu\n",		net_count_tcp[NC_TCP_RECV_URG_SEGS]);
+	cons_printf(portid, "\tåä¿¡ããããä¸æ­£æ°\t%lu\n",		net_count_tcp[NC_TCP_RECV_BAD_HEADERS]);
+	cons_printf(portid, "\tåä¿¡ããã§ãã¯ãµã ä¸æ­£æ°\t%lu\n",	net_count_tcp[NC_TCP_RECV_BAD_CKSUMS]);
+	cons_printf(portid, "\tåä¿¡ãACK æ°\t%lu\n",			net_count_tcp[NC_TCP_RECV_ACKS]);
+	cons_printf(portid, "\tåä¿¡ãå¤é ACK æ°\t%lu\n",		net_count_tcp[NC_TCP_RECV_DUP_ACKS]);
+	cons_printf(portid, "\tåä¿¡ãRST æ°\t%lu\n",			net_count_tcp[NC_TCP_RECV_RSTS]);
+	cons_printf(portid, "\tåä¿¡ãå¤éæ°\t%lu\n",			net_count_tcp[NC_TCP_RECV_DUP_SEGS]);
+	cons_printf(portid, "\tåä¿¡ãç ´æ£æ°\t%lu\n",			net_count_tcp[NC_TCP_RECV_DROP_SEGS]);
+	cons_printf(portid, "\tåä¿¡ã­ã¥ã¼è§£æ¾æ°\t%lu\n",		net_count_tcp[NC_TCP_FREE_RCV_QUEUE]);
+	cons_printf(portid, "\téä¿¡ãã¼ã¿ãªã¯ãããæ°\t%lu\n",		net_count_tcp[NC_TCP_SEND_DATA_OCTETS]);
+	cons_printf(portid, "\téä¿¡å¶å¾¡ã»ã°ã¡ã³ãæ°\t%lu\n",		net_count_tcp[NC_TCP_SEND_CNTL_SEGS]);
+	cons_printf(portid, "\téä¿¡ã»ã°ã¡ã³ãæ°\t%lu\n",		net_count_tcp[NC_TCP_SEND_SEGS]);
+	cons_printf(portid, "\tåéä¿¡ã»ã°ã¡ã³ãæ°\t%lu\n",		net_count_tcp[NC_TCP_SEND_REXMIT_SEGS]);
+	cons_printf(portid, "\téä¿¡ãã¼ã¿ã»ã°ã¡ã³ãæ°\t%lu\n",		net_count_tcp[NC_TCP_SEND_DATA_SEGS]);
+	cons_printf(portid, "\téä¿¡ãç·æ¥ã»ã°ã¡ã³ãæ°\t%lu\n",		net_count_tcp[NC_TCP_SEND_URG_SEGS]);
+	cons_printf(portid, "\téä¿¡ãACK æ°\t%lu\n",			net_count_tcp[NC_TCP_SEND_ACKS]);
+	cons_printf(portid, "\téä¿¡ãRST æ°\t%lu\n",			net_count_tcp[NC_TCP_SEND_RSTS]);
+	cons_printf(portid, "\tRTT æ´æ°æ°\t%lu\n",			net_count_tcp[NC_TCP_RTT_UPDATES]);
+	cons_printf(portid, "\tååãªã¼ãã³æ°\t%lu\n",			net_count_tcp[NC_TCP_ACCEPTS]);
+	cons_printf(portid, "\tè½åãªã¼ãã³æ°\t%lu\n",			net_count_tcp[NC_TCP_CONNECTS]);
+
+#endif	/* of #ifdef SUPPORT_TCP */
+
+#ifdef SUPPORT_UDP
+
+	net_count_struct(portid, "UDP",  &net_count_udp);
+
+#endif	/* of #ifdef SUPPORT_UDP */
+
+	tbl = nbuf_get_tbl();
+	cons_printf(portid, "\nãããã¯ã¼ã¯ãããã¡\n\tãµã¤ãº\tç¨ææ°\tå²å½è¦æ±æ°\tå²å½æ°\tå²å½ã¦ã¨ã©ã¼æ°\n");
+	for (ix = nbuf_get_tbl_size(); ix -- > 0; ) {
+		cons_printf(portid, "\t%lu\t%lu\t%lu\t%lu\t%lu\n",
+		                    tbl[ix].size,
+		                    tbl[ix].prepares,
+		                    tbl[ix].requests,
+		                    tbl[ix].allocs,
+		                    tbl[ix].errors);
+		}
+
+	cons_printf(portid, "\nãããã¯ã¼ã¯çµ±è¨æ
+å ±\tçµéæé[ms]\t%lu\t", now);
+	if (now > (1000 * 3600 * 24))
+		cons_printf(portid, "%3luæ¥ %2luæé %2luå %2luç§\n",
+		             now / (1000 * 3600 * 24),
+		            (now / (1000 * 3600)) % 24,
+		            (now / (1000 * 60  )) % 60,
+		            (now /  1000        ) % 60);
+	else
+		cons_printf(portid, "%2luæé %2luå %2luç§\n",
+		            (now / (1000 * 3600)) % 24,
+		            (now / (1000 * 60  )) % 60,
+		            (now /  1000        ) % 60);
+
+	SIG_NET_CONS_PRINTF();
+	FLUSH_SND_BUFF();
+	}
+
+#if defined(SUPPORT_INET4)
+
+#ifdef IP4_CFG_FRAGMENT
+
+/*
+ *  nbuf_stat_ip4_frag_queue -- IPv4 åæ§æã­ã¥ã¼å
+ãããã¯ã¼ã¯ãããã¡æ
+å ±
+ */
+
+static void
+nbuf_stat_ip4_frag_queue (ID portid)
+{
+	const T_NET_BUF_ENTRY	*tbl;
+	const T_NET_BUF		*nbuf, **queue;
+	int_t			ix, fix, count;
+
+	cons_printf(portid, "\nIPv4åæ§æã­ã¥ã¼å
+\nIndex\tTime");
+	tbl = nbuf_get_tbl();
+	for (ix = nbuf_get_tbl_size(); ix -- > 0; )
+		cons_printf(portid, "\t%d", tbl[ix].size);
+	cons_printf(portid, "\n");
+
+	queue = ip_get_frag_queue();
+	for (fix = 0; fix < NUM_IP4_FRAG_QUEUE; fix ++) {
+		if (queue[fix] != NULL) {
+			cons_printf(portid, "%d\t%d", fix, GET_QIP4_HDR(queue[fix])->ttl);
+			for (ix = nbuf_get_tbl_size(); ix -- > 0; ) {
+				count = 0;
+				for (nbuf = queue[fix]; nbuf != NULL; nbuf = GET_QIP4_HDR(nbuf)->next)
+					if (nbuf->idix == ix)
+						count ++;
+				cons_printf(portid, "\t%d", count);
+				}
+			cons_printf(portid, "\n");
+			}
+		}
+	}
+
+#endif	/* of #ifdef IP4_CFG_FRAGMENT */
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+#ifdef IP6_CFG_FRAGMENT
+
+/*
+ *  nbuf_stat_ip6_frag_queue -- IPv6 åæ§æã­ã¥ã¼å
+ãããã¯ã¼ã¯ãããã¡æ
+å ±
+ */
+
+static void
+nbuf_stat_ip6_frag_queue (ID portid)
+{
+	const T_NET_BUF_ENTRY	*tbl;
+	const T_NET_BUF		*nbuf, **queue;
+	int_t			ix, fix, count;
+
+	cons_printf(portid, "\nIPv6åæ§æã­ã¥ã¼å
+\nIndex\tTime");
+	tbl = nbuf_get_tbl();
+	for (ix = nbuf_get_tbl_size(); ix -- > 0; )
+		cons_printf(portid, "\t%d", tbl[ix].size);
+	cons_printf(portid, "\n");
+
+	queue = ip6_get_frag_queue();
+	for (fix = 0; fix < NUM_IP6_FRAG_QUEUE; fix ++) {
+		if (queue[fix] != NULL) {
+			cons_printf(portid, "%d\t%d", fix, GET_QIP6_HDR(queue[fix])->ftim);
+			for (ix = nbuf_get_tbl_size(); ix -- > 0; ) {
+				count = 0;
+				for (nbuf = queue[fix]; nbuf != NULL; nbuf = GET_QIP6_HDR(nbuf)->next_frag)
+					if (nbuf->idix == ix)
+						count ++;
+				cons_printf(portid, "\t%d", count);
+				}
+			cons_printf(portid, "\n");
+			}
+		}
+	}
+
+#endif	/* of #ifdef IP6_CFG_FRAGMENT */
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+#endif	/* of #if NET_COUNT_ENABLE */
+
+/*
+ *  nbuf_status -- ãããã¯ã¼ã¯ãããã¡æ
+å ±
+ */
+
+static void
+nbuf_status (ID portid, char *line)
+{
+	SYSTIM		now;
+
+#if NET_COUNT_ENABLE
+	const T_NET_BUF_ENTRY	*tbl;
+	int_t			ix;
+#endif	/* of #if NET_COUNT_ENABLE */
+
+#ifdef SUPPORT_TCP
+	T_NET_BUF		*nbuf;
+	T_TCP_CEP*		cep;
+	T_TCP_Q_HDR*		tqhdr;
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+	T_IP_HDR*		iph;
+	T_TCP_HDR*		tcph;
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+#endif	/* of #ifdef SUPPORT_TCP */
+
+	WAI_NET_CONS_PRINTF();
+	get_tim(&now);
+	cons_printf(portid, "ãããã¯ã¼ã¯ãããã¡æ
+å ±\tçµéæé[ms]\t%lu\n", now);
+
+#if NET_COUNT_ENABLE
+
+	cons_printf(portid, "\nãããã¯ã¼ã¯ãããã¡\n\tãµã¤ãº\tç¨ææ°\tå²å½è¦æ±æ°\tå²å½æ°\tå²å½ã¦ã¨ã©ã¼æ°\n");
+	tbl = nbuf_get_tbl();
+	for (ix = nbuf_get_tbl_size(); ix -- > 0; ) {
+		cons_printf(portid, "\t%lu\t%lu\t%lu\t%lu\t%lu\n",
+		                    tbl[ix].size,
+		                    tbl[ix].prepares,
+		                    tbl[ix].requests,
+		                    tbl[ix].allocs,
+		                    tbl[ix].errors);
+		}
+
+#endif	/* of #if NET_COUNT_ENABLE */
+
+#ifdef SUPPORT_TCP
+
+	cons_printf(portid, "\nCEPå
+\nCEPID\n");
+
+	for (cep = tcp_cep; cep < &tcp_cep[tmax_tcp_cepid]; cep ++) {
+		cons_printf(portid, "%2d", GET_TCP_CEPID(cep));
+		for (nbuf = cep->reassq; nbuf != NULL; nbuf = tqhdr->next) {
+			tqhdr = GET_TCP_Q_HDR(nbuf, GET_TCP_IP_Q_HDR(nbuf)->thoff);
+			cons_printf(portid, "[a:%6d-%6d] ",
+			            ntohl(tqhdr->seq) - cep->irs + tqhdr->soff,
+			            ntohl(tqhdr->seq) - cep->irs + tqhdr->soff + tqhdr->slen);
+			}
+
+#ifdef TCP_CFG_RWBUF_CSAVE
+		for (nbuf = cep->rwbufq; nbuf != NULL; nbuf = tqhdr->next) {
+			tqhdr = GET_TCP_Q_HDR(nbuf, GET_TCP_IP_Q_HDR(nbuf)->thoff);
+			cons_printf(portid, "[r:%6d-%6d] ",
+			            ntohl(tqhdr->seq) - cep->irs + tqhdr->soff,
+			            ntohl(tqhdr->seq) - cep->irs + tqhdr->soff + tqhdr->slen);
+			}
+#endif	/* of #ifdef TCP_CFG_RWBUF_CSAVE */
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+		if (cep->swbufq != NULL) {
+			iph  = GET_IP_HDR(cep->swbufq);
+			tcph = GET_TCP_HDR(cep->swbufq, GET_TCP_HDR_OFFSET(cep->swbufq));
+			cons_printf(portid, "[s:%6d-%6d] ",
+			            ntohl(tcph->seq) - cep->iss,
+			            ntohl(tcph->seq) - cep->iss + (GET_IP_SDU_SIZE(iph) - 
+			                                           GET_TCP_HDR_SIZE2(cep->swbufq, GET_TCP_HDR_OFFSET(cep->swbufq))));
+			}
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+		cons_printf(portid, "\n");
+		}
+
+#endif	/* of #ifdef SUPPORT_TCP */
+
+#if NET_COUNT_ENABLE
+
+#if defined(SUPPORT_INET4)
+
+#ifdef IP4_CFG_FRAGMENT
+
+	nbuf_stat_ip4_frag_queue(portid);
+
+#endif	/* of #ifdef IP4_CFG_FRAGMENT */
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+#ifdef IP6_CFG_FRAGMENT
+
+	nbuf_stat_ip6_frag_queue(portid);
+
+#endif	/* of #ifdef IP6_CFG_FRAGMENT */
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+#endif	/* of #if NET_COUNT_ENABLE */
+
+	SIG_NET_CONS_PRINTF();
+	FLUSH_SND_BUFF();
+	}
+
+#if defined(SUPPORT_INET4)
+
+#if NUM_ROUTE_ENTRY > 0
+
+/*
+ *  routing_table_status -- çµè·¯è¡¨ã®åºå
+ */
+
+static void
+routing_table_status (ID portid, char *line)
+{
+	int_t	ix;
+
+	if ('0' <= *(line = skip_blanks(line)) && *line <= '9') {
+		T_IN4_ADDR	target, mask, gateway;
+
+		ix = atoi(line);
+		while ('0' <= *line && *line <= '9')
+			line ++;
+		line = GET_IPADDR(&target,  skip_blanks(line));
+		line = GET_IPADDR(&mask,    skip_blanks(line));
+		       GET_IPADDR(&gateway, skip_blanks(line));
+		in4_add_route(ix, target, mask, gateway);
+		}
+
+	WAI_NET_CONS_PRINTF();
+	cons_printf(portid,
+	            "Routing Table Status\n"
+	            "IX Target          Mask            Gateway         Expire\n");
+
+	for (ix = 0; ix < NUM_ROUTE_ENTRY; ix ++) {
+		if ((routing_tbl[ix].flags & IN_RTF_DEFINED) == 0)
+			;
+		else if ((routing_tbl[ix].flags & IN_RTF_REDIRECT) != 0)
+			cons_printf(portid, "%2d %15I %15I %15I %4d\n",
+			            ix,
+			            &routing_tbl[ix].target,
+			            &routing_tbl[ix].mask,
+			            &routing_tbl[ix].gateway,
+			            &routing_tbl[ix].expire);
+		else
+			cons_printf(portid, "%2d %15I %15I %I\n",
+			            ix,
+			            &routing_tbl[ix].target,
+			            &routing_tbl[ix].mask,
+			            &routing_tbl[ix].gateway);
+		            
+		}
+
+	SIG_NET_CONS_PRINTF();
+	FLUSH_SND_BUFF();
+	}
+
+#endif	/* of #if NUM_ROUTE_ENTRY > 0 */
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+#if NUM_ND6_DEF_RTR_ENTRY > 0
+
+/*
+ *  defrtrlist_status -- ãã£ãã©ã«ãã«ã¼ã¿ã»ãªã¹ãç¶æ
+ã®åºå
+ */
+
+static void
+defrtrlist_status (ID portid, char *line)
+{
+	const T_DEF_ROUTER	*dr;
+	SYSTIM			now;
+	int_t			rix, pix, pcnt, ptitle;
+	uint_t			count, mask;
+
+	WAI_NET_CONS_PRINTF();
+	cons_printf(portid,
+	            "Default Router List Status\n"
+	            "IX Expire Lifetime flags prefix");
+	for (ptitle = NUM_ND6_PREFIX_ENTRY * 2 - sizeof("prefix"); ptitle -- > 0; )
+		cons_printf(portid, " ");
+	cons_printf(portid, " IP Address\n");
+
+	/* expire ã®åä½ã¯ [ms]ã*/
+	get_tim(&now);
+	dr = nd6_get_drl(&count);
+	for (rix = 0; rix < count; rix ++) {
+		if (dr[rix].state == ND6_DEF_RTR_BUSY) {
+			cons_printf(portid, "%2d", rix);
+			if (dr[rix].lifetime == ND6_INFINITE_LIFETIME)
+				cons_printf(portid, "  INFIN    INFIN");
+			else
+				cons_printf(portid, " %6d %8d",
+				            (uint32_t)(dr[rix].expire - now) <= 0
+				                ? 0 : (dr[rix].expire - now) / SYSTIM_HZ,
+				            dr[rix].lifetime / SYSTIM_HZ);
+			cons_printf(portid, "    %02x", dr[rix].flags);
+			pcnt = NUM_ND6_PREFIX_ENTRY;
+			ptitle = NUM_ND6_PREFIX_ENTRY * 2 - sizeof(" prefix");
+			mask = 1;
+			for (pix = 0; pix < NUM_ND6_PREFIX_ENTRY; pix ++) {
+				if ((dr[rix].plistmap & mask) != 0) {
+					if (pcnt == NUM_ND6_PREFIX_ENTRY)
+						cons_printf(portid, " ");
+					else
+						cons_printf(portid, ",");
+					cons_printf(portid, "%d", pix);
+					pcnt --;
+					ptitle -= 2;
+					}
+				mask <<= 1;
+				}
+			while (pcnt --) {
+				cons_printf(portid, "  ");
+				ptitle -= 2;
+				}
+			while (ptitle -- > 0)
+				cons_printf(portid, " ");
+			cons_printf(portid, " %I\n",  &dr[rix].addr);
+			}
+		}
+
+	SIG_NET_CONS_PRINTF();
+	FLUSH_SND_BUFF();
+	}
+
+/*
+ *  prefixlist_status -- ãã¬ãã£ãã¯ã¹ã»ãªã¹ãç¶æ
+ã®åºå
+ */
+
+static void
+prefixlist_status (ID portid, char *line)
+{
+	const T_ND6_PREFIX	*pr;
+	SYSTIM			now;
+	int_t			rix, pix, rcnt, rtitle;
+	uint_t			mask;
+
+	WAI_NET_CONS_PRINTF();
+	cons_printf(portid,
+	            "Prefix List Status\n"
+	            "IX  Expire Lifetime flags router");
+	for (rtitle = NUM_ND6_DEF_RTR_ENTRY * 2 - sizeof("router"); rtitle -- > 0; )
+		cons_printf(portid, " ");
+	cons_printf(portid, " Len Prefix\n");
+
+	/* expire ã®åä½ã¯ [s]ã*/
+	get_tim(&now);
+	now /= SYSTIM_HZ;
+	pr = nd6_get_prl();
+	for (pix = 0; pix < NUM_ND6_PREFIX_ENTRY; pix ++) {
+		if ((pr[pix].flags & ND6_PREFIX_STATE_BUSY) != 0) {
+			cons_printf(portid, "%2d", pix);
+			if (pr[pix].vltime == ND6_INFINITE_LIFETIME)
+				cons_printf(portid, "  INFIN    INFIN");
+			else
+				cons_printf(portid, " %7d %8d",
+				            (uint32_t)(pr[pix].expire - now) <= 0
+				                ? 0 : (pr[pix].expire - now),
+				             pr[pix].vltime);
+			cons_printf(portid, "    %02x", pr[pix].flags);
+			rcnt = NUM_ND6_DEF_RTR_ENTRY;
+			rtitle = NUM_ND6_DEF_RTR_ENTRY * 2 - sizeof(" router");
+			mask = 1;
+			for (rix = 0; rix < NUM_ND6_DEF_RTR_ENTRY; rix ++) {
+				if ((pr[pix].routermap & mask) != 0) {
+					if (rcnt == NUM_ND6_DEF_RTR_ENTRY)
+						cons_printf(portid, " ");
+					else
+						cons_printf(portid, ",");
+					cons_printf(portid, "%d", rix);
+					rcnt --;
+					rtitle -= 2;
+					}
+				mask <<= 1;
+				}
+			while (rcnt --) {
+				cons_printf(portid, "  ");
+				rtitle -= 2;
+				}
+			while (rtitle -- > 0)
+				cons_printf(portid, " ");
+			cons_printf(portid, "%4d %I\n",  pr[pix].prefix_len, &pr[pix].prefix);
+			}
+		}
+
+	SIG_NET_CONS_PRINTF();
+	FLUSH_SND_BUFF();
+	}
+
+#endif	/* of #if NUM_ND6_DEF_RTR_ENTRY > 0 */
+
+#if NUM_ROUTE_ENTRY > 0
+
+/*
+ *  routing_table_status -- çµè·¯è¡¨ã®åºå
+ */
+
+static void
+routing_table_status (ID portid, char *line)
+{
+	SYSTIM	now;
+	int_t	ix;
+
+	WAI_NET_CONS_PRINTF();
+	cons_printf(portid,
+	            "Routing Table Status\n"
+	            "IX Expire flags Prefix Target                         Gateway\n");
+
+	for (ix = 0; ix < NUM_STATIC_ROUTE_ENTRY; ix ++) {
+		cons_printf(portid, "%2d STATIC     - %6d %30I %I\n",
+		            ix,
+		             routing_tbl[ix].prefix_len,
+		            &routing_tbl[ix].target,
+		            &routing_tbl[ix].gateway);
+		            
+		}
+
+	/* expire ã®åä½ã¯ [s]ã*/
+	get_tim(&now);
+	now /= SYSTIM_HZ;
+
+	for ( ; ix < NUM_ROUTE_ENTRY; ix ++)
+		if (routing_tbl[ix].flags & IN_RTF_DEFINED)
+			cons_printf(portid, "%2d %6d    %02x %6d %30I %I\n",
+			            ix,
+			            (uint32_t)(routing_tbl[ix].expire - now) <= 0
+			                ? 0 : routing_tbl[ix].expire - now,
+			             routing_tbl[ix].flags,
+			             routing_tbl[ix].prefix_len,
+			            &routing_tbl[ix].target,
+			            &routing_tbl[ix].gateway);
+
+	SIG_NET_CONS_PRINTF();
+	FLUSH_SND_BUFF();
+	}
+
+#endif	/* of #if NUM_ROUTE_ENTRY > 0 */
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+#if NUM_ROUTE_ENTRY > 0
+
+/*
+ *  routing_status -- ã«ã¼ãã£ã³ã°æ
+å ±
+ */
+
+static void
+routing_status (ID portid, char *line)
+{
+	switch (*line) {
+
+#if defined(SUPPORT_INET6)
+
+#if NUM_ND6_DEF_RTR_ENTRY > 0
+
+	case 'l':		/* ãã£ãã©ã«ãã«ã¼ã¿ã»ãªã¹ãæ
+å ± */
+		defrtrlist_status(portid, line + 1);
+		break;
+
+	case 'p':		/* ãã¬ãã£ãã¯ã¹ã»ãªã¹ãæ
+å ± */
+		prefixlist_status(portid, line + 1);
+		break;
+
+#endif	/* of #if NUM_ND6_DEF_RTR_ENTRY > 0 */
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+	default:		/* ã«ã¼ãã£ã³ã°è¡¨æ
+å ± */
+		routing_table_status(portid, line);
+		break;
+
+		break;
+		}
+	}
+
+#endif	/* of #if NUM_ROUTE_ENTRY > 0 */
+
+/*
+ *  network_status -- ãããã¯ã¼ã¯ã®ç¶æ
+ã®åºå
+ */
+
+static void
+network_status (ID portid, char *line)
+{
+	switch (*line) {
+
+#ifdef SUPPORT_ETHER
+
+	case 'a':		/* IF ã¢ãã¬ã¹æ
+å ± */
+		ifa_status(portid, line + 1);
+		break;
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+	case 'b':		/* ãããã¯ã¼ã¯ãããã¡æ
+å ± */
+		nbuf_status(portid, line + 1);
+		break;
+
+#if NET_COUNT_ENABLE
+
+	case 'c':		/* ãããã¯ã¼ã¯çµ±è¨æ
+å ± */
+		net_count(portid, line + 1);
+		break;
+
+#endif	/* of #if NET_COUNT_ENABLE */
+
+#if NUM_ROUTE_ENTRY > 0
+
+	case 'r':		/* ã«ã¼ãã£ã³ã°æ
+å ± */
+		routing_status(portid, line + 1);
+		break;
+
+#endif	/* of #if NUM_ROUTE_ENTRY > 0 */
+
+#ifdef SUPPORT_TCP
+
+	case 't':		/* TCP status */
+		tcp_status(portid, line + 1);
+		break;
+
+#endif	 /* of #ifdef SUPPORT_TCP */
+
+#ifdef SUPPORT_UDP
+
+	case 'u':		/* UDP status */
+		udp_status(portid, line + 1);
+		break;
+
+#endif	 /* of #ifdef SUPPORT_UDP */
+
+	default:
+		cons_printf(portid, "no such command: '%c%c'\n", *(line - 1), *line);
+		SIG_NET_CONS_PRINTF();
+		FLUSH_SND_BUFF();
+		break;
+		}
+	}
+
+#if defined(SUPPORT_INET4)
+
+/*
+ *  ifconfig -- ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®æ§ææ
+å ±
+ */
+
+static void
+ifconfig (ID portid, char *line)
+{
+	T_IFNET		*ifp = IF_GET_IFNET();
+	T_IN4_ADDR	bc;
+
+#ifdef SUPPORT_ETHER
+
+	if (*(line = skip_blanks(line))) {
+		T_IN4_ADDR	addr, mask;
+
+		GET_IPADDR(&mask, skip_blanks(GET_IPADDR(&addr, line)));
+		in4_add_ifaddr(addr, mask);
+		}
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+	WAI_NET_CONS_PRINTF();
+	cons_printf(portid,
+	            "Network Interface Configurations\n");
+
+#ifdef SUPPORT_ETHER
+
+	cons_printf(portid,
+	            "ether: %M\n",
+	            IF_ETHER_NIC_GET_SOFTC()->ifaddr.lladdr);
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+	bc = (ifp->in_ifaddr.addr & ifp->in_ifaddr.mask) | ~ifp->in_ifaddr.mask;
+	cons_printf(portid,
+	            "inet:  %I, mask: %I, broadcast: %I\n",
+	            &ifp->in_ifaddr.addr,
+	            &ifp->in_ifaddr.mask,
+	            &bc);
+
+	SIG_NET_CONS_PRINTF();
+	FLUSH_SND_BUFF();
+	}
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+/*
+ *  ifconfig -- ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®æ§ææ
+å ±
+ */
+
+static void
+ifconfig (ID portid, char *line)
+{
+#ifdef SUPPORT_ETHER
+
+	T_IF_SOFTC	*ic;
+	T_IFNET		*ifp = IF_GET_IFNET();
+	int_t		ix;
+	SYSTIM		now;
+
+	WAI_NET_CONS_PRINTF();
+	ic = IF_ETHER_NIC_GET_SOFTC();
+	cons_printf(portid, "ether: %M\ninet6:\nIX   Expire Preffered RTR PFX Flags IP Address\n",
+	                    ic->ifaddr.lladdr);
+
+	/* expire ã¨ vltime ã®åä½ã¯ [s]ã*/
+	get_tim(&now);
+	now /= SYSTIM_HZ;
+
+	for (ix = 0; ix < NUM_IN6_IFADDR_ENTRY; ix ++) {
+		if (ifp->in_ifaddrs[ix].flags & IN6_IFF_DEFINED) {
+			cons_printf(portid, " %d", ix);
+			if (ifp->in_ifaddrs[ix].lifetime.vltime == ND6_INFINITE_LIFETIME)
+				cons_printf(portid, "    INFIN     INFIN");
+			else
+				cons_printf(portid, " %8d %9d",
+				                    (uint32_t)(ifp->in_ifaddrs[ix].lifetime.expire - now) <= 0 
+				                        ? 0 : ifp->in_ifaddrs[ix].lifetime.expire - now,
+				                    (uint32_t)(ifp->in_ifaddrs[ix].lifetime.preferred - now) <= 0
+				                        ? 0 : ifp->in_ifaddrs[ix].lifetime.preferred - now);
+			if (ifp->in_ifaddrs[ix].router_index == IN6_RTR_IX_UNREACH)
+				cons_printf(portid, "   -");
+			else
+				cons_printf(portid, " %3d", ifp->in_ifaddrs[ix].router_index);
+			if (ifp->in_ifaddrs[ix].prefix_index == ND6_PREFIX_IX_INVALID)
+				cons_printf(portid, "   -");
+			else
+				cons_printf(portid, " %3d", ifp->in_ifaddrs[ix].prefix_index);
+			cons_printf(portid, "    %02x %I\n",
+			                    ifp->in_ifaddrs[ix].flags,
+			                    &ifp->in_ifaddrs[ix].addr);
+			}
+		}
+
+	SIG_NET_CONS_PRINTF();
+	FLUSH_SND_BUFF();
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+	}
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+/*
+ *  show_config -- ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³è¨­å®ã®è¡¨ç¤º
+ */
+
+static void
+show_config (ID portid, char *line)
+{
+#if defined(SUPPORT_ETHER)
+#if defined(SUPPORT_INET4)
+	T_IN4_ADDR	addr;
+#endif
+#endif	/* of #if defined(SUPPORT_ETHER) */
+
+#if defined(DHCP_CFG)
+
+	cons_printf(portid, "DHCP:\n");
+
+	cons_printf(portid, "  DHCP_CFG: On\n");
+
+#endif	/* of #if define(DHCP_CFG) */
+
+#if defined(SUPPORT_TCP)
+
+	cons_printf(portid, "TCP:\n");
+
+	cons_printf(portid, "  TCP_CFG_PASSIVE_OPEN: ");
+#if defined(TCP_CFG_PASSIVE_OPEN)
+	cons_printf(portid, "On\n");
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+	cons_printf(portid, "  TCP_CFG_OPT_MSS:      ");
+#if defined(TCP_CFG_OPT_MSS)
+	cons_printf(portid, "On\n");
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+	cons_printf(portid, "  TCP_CFG_DELAY_ACK:    ");
+#if defined(TCP_CFG_DELAY_ACK)
+	cons_printf(portid, "On\n");
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+	cons_printf(portid, "  TCP_CFG_ALWAYS_KEEP:  ");
+#if defined(TCP_CFG_ALWAYS_KEEP)
+	cons_printf(portid, "On\n");
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+	cons_printf(portid, "  TCP_CFG_RWBUF_CSAVE:  ");
+#if defined(TCP_CFG_RWBUF_CSAVE_ONLY)
+	cons_printf(portid, "Only, ");
+#if defined(TCP_CFG_RWBUF_CSAVE_MAX_QUEUES)
+	cons_printf(portid, "TCP_CFG_RWBUF_CSAVE_MAX_QUEUES: %2d\n",
+	                     TCP_CFG_RWBUF_CSAVE_MAX_QUEUES);
+#else
+	cons_printf(portid, "TCP_CFG_RWBUF_CSAVE_MAX_QUEUES: Undefined\n");
+#endif
+#elif defined(TCP_CFG_RWBUF_CSAVE)
+	cons_printf(portid, "On,   ");
+#if defined(TCP_CFG_RWBUF_CSAVE_MAX_QUEUES)
+	cons_printf(portid, "TCP_CFG_RWBUF_CSAVE_MAX_QUEUES: %2d\n",
+	                     TCP_CFG_RWBUF_CSAVE_MAX_QUEUES);
+#else
+	cons_printf(portid, "TCP_CFG_RWBUF_CSAVE_MAX_QUEUES: Undefined\n");
+#endif
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+	cons_printf(portid, "  TCP_CFG_SWBUF_CSAVE:  ");
+#if defined(TCP_CFG_SWBUF_CSAVE_ONLY)
+	cons_printf(portid, "Only, TCP_CFG_SWBUF_CSAVE_MAX_SIZE: %4d\n"
+	                    "                        "
+	                    "      TCP_CFG_SWBUF_CSAVE_MIN_SIZE: %4d\n",
+	                    TCP_CFG_SWBUF_CSAVE_MAX_SIZE, 
+                            TCP_CFG_SWBUF_CSAVE_MIN_SIZE);
+#elif defined(TCP_CFG_SWBUF_CSAVE)
+	cons_printf(portid, "On,   TCP_CFG_SWBUF_CSAVE_MAX_SIZE: %4d\n"
+	                    "                        "
+	                    "      TCP_CFG_SWBUF_CSAVE_MIN_SIZE: %4d\n",
+	                    TCP_CFG_SWBUF_CSAVE_MAX_SIZE, 
+                            TCP_CFG_SWBUF_CSAVE_MIN_SIZE);
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+	cons_printf(portid, "  TCP_CFG_NON_BLOCKING: ");
+#if defined(TCP_CFG_NON_BLOCKING)
+#if defined(USE_TCP_NON_BLOCKING)
+	cons_printf(portid, "Use\n");
+#else
+	cons_printf(portid, "On\n");
+#endif
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+	cons_printf(portid, "  TCP_CFG_EXTENTIONS:   ");
+#if defined(TCP_CFG_EXTENTIONS)
+#if defined(USE_TCP_EXTENTIONS)
+	cons_printf(portid, "Use\n");
+#if defined(SUPPORT_INET4)
+	cons_printf(portid, "  NUM_VRID_TCP_REPS:    %3d\n", NUM_VRID_TCP_REPS);
+	cons_printf(portid, "  NUM_VRID_TCP_CEPS:    %3d\n", NUM_VRID_TCP_CEPS);
+#endif	
+#if defined(SUPPORT_INET6)
+	cons_printf(portid, "  NUM_VRID_TCP6_REPS:   %3d\n", NUM_VRID_TCP6_REPS);
+	cons_printf(portid, "  NUM_VRID_TCP6_CEPS:   %3d\n", NUM_VRID_TCP6_CEPS);
+#endif	
+#else
+	cons_printf(portid, "On\n");
+#endif
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+	cons_printf(portid, "  USE_COPYSAVE_API:     ");
+#if defined(USE_COPYSAVE_API)
+	cons_printf(portid, "Use\n");
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+#if NUM_TCP_TW_CEP_ENTRY > 0
+	cons_printf(portid, "  TCP_TW_CEP:           On, NUM_TCP_TW_CEP_ENTRY:     %d\n", NUM_TCP_TW_CEP_ENTRY);
+#else
+	cons_printf(portid, "  TCP_TW_CEP:           Off\n");
+#endif
+
+#if defined(TCP_CFG_TRACE)
+	cons_printf(portid, "  TCP_CFG_TRACE:        On, TCP_CFG_TRACE_LPORTNO:    %d\n", TCP_CFG_TRACE_LPORTNO);
+#if defined(SUPPORT_INET4)
+	addr = TCP_CFG_TRACE_IPV4_RADDR;
+	cons_printf(portid, "                            TCP_CFG_TRACE_IPV4_RADDR: %I\n", &addr);
+#endif
+	cons_printf(portid, "                            TCP_CFG_TRACE_RPORTNO:    %d\n", TCP_CFG_TRACE_RPORTNO);
+#else
+	cons_printf(portid, "  TCP_CFG_TRACE:        Off\n");
+#endif
+
+	cons_printf(portid, "  MAX_TCP_SND_SEG:      %4d\n", MAX_TCP_SND_SEG);
+	cons_printf(portid, "  DEF_TCP_SND_SEG:      %4d\n", DEF_TCP_SND_SEG);
+	cons_printf(portid, "  MAX_TCP_RCV_SEG:      %4d\n", MAX_TCP_RCV_SEG);
+	cons_printf(portid, "  DEF_TCP_RCV_SEG:      %4d\n", DEF_TCP_RCV_SEG);
+	cons_printf(portid, "  MAX_TCP_REALLOC_SIZE: %4d\n", MAX_TCP_REALLOC_SIZE);
+
+#endif	/* of #if defined(SUPPORT_TCP) */
+
+#if defined(SUPPORT_UDP)
+
+	cons_printf(portid, "UDP:\n");
+
+	cons_printf(portid, "  UDP_CFG_IN_CHECKSUM:  ");
+#if defined(UDP_CFG_IN_CHECKSUM)
+	cons_printf(portid, "On\n");
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+	cons_printf(portid, "  UDP_CFG_OUT_CHECKSUM: ");
+#if defined(UDP_CFG_OUT_CHECKSUM)
+	cons_printf(portid, "On\n");
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+	cons_printf(portid, "  UDP_CFG_NON_BLOCKING: ");
+#if defined(UDP_CFG_NON_BLOCKING)
+#if defined(USE_UDP_NON_BLOCKING)
+	cons_printf(portid, "Use\n");
+#else
+	cons_printf(portid, "On\n");
+#endif
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+	cons_printf(portid, "  UDP_CFG_EXTENTIONS:   ");
+#if defined(UDP_CFG_EXTENTIONS)
+#if defined(USE_UDP_EXTENTIONS)
+	cons_printf(portid, "Use\n");
+#else
+	cons_printf(portid, "On\n");
+#endif
+	cons_printf(portid, "  NUM_VRID_UDP_CEPS:    %3d\n", NUM_VRID_UDP_CEPS);
+	cons_printf(portid, "  NUM_VRID_UDP6_CEPS:   %3d\n", NUM_VRID_UDP6_CEPS);
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+	cons_printf(portid, "  NUM_DTQ_UDP_RCVQ:     %3d\n", NUM_DTQ_UDP_RCVQ);
+	cons_printf(portid, "  NUM_DTQ_UDP_OUTPUT:   %3d\n", NUM_DTQ_UDP_OUTPUT);
+
+#endif	/* of #if defined(SUPPORT_UDP) */
+
+	cons_printf(portid, "ICMP:\n");
+
+	cons_printf(portid, "  ICMP_CFG_CALLBACK_ECHO_REPLY: ");
+#if defined(ICMP_CFG_CALLBACK_ECHO_REPLY)
+	cons_printf(portid, "On\n");
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+	cons_printf(portid, "  ICMP_REPLY_ERROR:             ");
+#if defined(ICMP_REPLY_ERROR)
+	cons_printf(portid, "On\n");
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+#if NUM_REDIRECT_ROUTE_ENTRY > 0
+	cons_printf(portid, "  TMO_IN_REDIRECT: %4d[s]\n", TMO_IN_REDIRECT / NET_TIMER_HZ);
+#endif
+
+#if defined(SUPPORT_INET4)
+
+	cons_printf(portid, "IPv4:\n");
+
+	cons_printf(portid, "  IP4_CFG_FRAGMENT: ");
+
+#if defined(IP4_CFG_FRAGMENT)
+	cons_printf(portid, "On\n");
+	cons_printf(portid, "    NUM_IP4_FRAG_QUEUE:       %4d\n", NUM_IP4_FRAG_QUEUE);
+	cons_printf(portid, "    IP4_CFG_FRAG_REASSM_SIZE: %4d\n", IP4_CFG_FRAG_REASSM_SIZE);
+#else
+	cons_printf(portid, "Off\n");
+#endif	/* of #if defined(IP4_CFG_FRAGMENT) */
+
+#if defined(SUPPORT_ETHER)
+	addr = IPV4_ADDR_LOCAL;
+	cons_printf(portid, "  IPV4_ADDR_LOCAL:      %I\n", &addr);
+	addr = IPV4_ADDR_LOCAL_MASK;
+	cons_printf(portid, "  IPV4_ADDR_LOCAL_MASK: %I\n", &addr);
+	addr = IPV4_ADDR_DEFAULT_GW;
+	cons_printf(portid, "  IPV4_ADDR_DEFAULT_GW: %I\n", &addr);
+#endif	/* of #if defined(SUPPORT_ETHER) */
+
+	cons_printf(portid, "  Routing Table:\n");
+	cons_printf(portid, "    NUM_STATIC_ROUTE_ENTRY:   %d\n", NUM_STATIC_ROUTE_ENTRY);
+	cons_printf(portid, "    NUM_REDIRECT_ROUTE_ENTRY: %d\n", NUM_REDIRECT_ROUTE_ENTRY);
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+	cons_printf(portid, "IPv6:\n");
+
+	cons_printf(portid, "  Routing Table:\n");
+	cons_printf(portid, "    NUM_STATIC_ROUTE_ENTRY:   %d\n", NUM_STATIC_ROUTE_ENTRY);
+	cons_printf(portid, "    NUM_REDIRECT_ROUTE_ENTRY: %d\n", NUM_REDIRECT_ROUTE_ENTRY);
+
+	cons_printf(portid, "ND:\n");
+	cons_printf(portid, "  TMO_ND6_RTR_SOL_DELAY:    %5d[ms]\n", TMO_ND6_RTR_SOL_DELAY);
+	cons_printf(portid, "  TMO_ND6_RTR_SOL_INTERVAL: %5d[ms]\n", TMO_ND6_RTR_SOL_INTERVAL);
+	cons_printf(portid, "  NUM_IP6_DAD_COUNT:        %5d\n",     NUM_IP6_DAD_COUNT);
+	cons_printf(portid, "  NUM_ND6_CACHE_ENTRY:      %5d\n",     NUM_ND6_CACHE_ENTRY);
+
+#if defined(SUPPORT_ETHER)
+
+	cons_printf(portid, "  NUM_ND6_DEF_RTR_ENTRY     %5d\n",     NUM_ND6_DEF_RTR_ENTRY);
+	cons_printf(portid, "  NUM_ND6_RTR_SOL_RETRY     %5d\n",     NUM_ND6_RTR_SOL_RETRY);
+
+	cons_printf(portid, "  IP6_CFG_AUTO_LINKLOCAL: ");
+#if defined(IP6_CFG_AUTO_LINKLOCAL)
+	cons_printf(portid, "On\n");
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+#endif	/* of #if defined(SUPPORT_ETHER) */
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+#if defined(SUPPORT_INET4) && defined(SUPPORT_ETHER)
+
+	cons_printf(portid, "ARP:\n");
+	cons_printf(portid, "  ARP_CACHE_KEEP: %4d[s]\n", ARP_CACHE_KEEP / NET_TIMER_HZ);
+
+#endif	/* of #if defined(SUPPORT_INET4) && defined(SUPPORT_ETHER) */
+
+#if defined(SUPPORT_ETHER)
+
+	cons_printf(portid, "Ethernet:\n");
+
+	cons_printf(portid, "  NUM_DTQ_ETHER_OUTPUT:    %3d\n", NUM_DTQ_ETHER_OUTPUT);
+
+	cons_printf(portid, "  ETHER_CFG_ACCEPT_ALL:    ");
+#if defined(ETHER_CFG_ACCEPT_ALL)
+	cons_printf(portid, "On\n");
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+	cons_printf(portid, "  ETHER_CFG_UNEXP_WARNING: ");
+#if defined(ETHER_CFG_UNEXP_WARNING)
+	cons_printf(portid, "On\n");
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+	cons_printf(portid, "  ETHER_CFG_802_WARNING:   ");
+#if defined(ETHER_CFG_802_WARNING)
+	cons_printf(portid, "On\n");
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+	cons_printf(portid, "  ETHER_CFG_MCAST_WARNING: ");
+#if defined(ETHER_CFG_MCAST_WARNING)
+	cons_printf(portid, "On\n");
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+#endif	/* of #if defined(SUPPORT_ETHER) */
+
+#if defined(SUPPORT_PPP)
+
+	cons_printf(portid, "PPP:\n");
+
+	cons_printf(portid, "  HDLC_PORTNO: %d", HDLC_PORTID);
+
+	cons_printf(portid, "  PPP_IDLE_TIMEOUT: ");
+#if defined(PPP_IDLE_TIMEOUT)
+	cons_printf(portid, "  %4d[s]\n", PPP_IDLE_TIMEOUT / NET_TIMER_HZ);
+#else
+	cons_printf(portid, "  Off\n");
+#endif
+
+	cons_printf(portid, "  PPP_CFG_MODEM: ");
+#if defined(PPP_CFG_MODEM)
+	cons_printf(portid, "On\n");
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+#endif	/* of #if defined(SUPPORT_PPP) */
+
+	cons_printf(portid, "Network Buffer:\n");
+
+#if defined(NUM_MPF_NET_BUF_64)
+	cons_printf(portid, "  NUM_MPF_NET_BUF_64:        %2d\n", NUM_MPF_NET_BUF_64);
+#endif
+
+#if defined(NUM_MPF_NET_BUF_CSEG)
+	cons_printf(portid, "  NUM_MPF_NET_BUF_CSEG:      %2d\n", NUM_MPF_NET_BUF_CSEG);
+#endif
+
+#if defined(NUM_MPF_NET_BUF_128)
+	cons_printf(portid, "  NUM_MPF_NET_BUF_128:       %2d\n", NUM_MPF_NET_BUF_128);
+#endif
+
+#if defined(NUM_MPF_NET_BUF_256)
+	cons_printf(portid, "  NUM_MPF_NET_BUF_256:       %2d\n", NUM_MPF_NET_BUF_256);
+#endif
+
+#if defined(NUM_MPF_NET_BUF_512)
+	cons_printf(portid, "  NUM_MPF_NET_BUF_512:       %2d\n", NUM_MPF_NET_BUF_512);
+#endif
+
+#if defined(NUM_MPF_NET_BUF_IP_MSS)
+	cons_printf(portid, "  NUM_MPF_NET_BUF_IP_MSS:    %2d\n", NUM_MPF_NET_BUF_IP_MSS);
+#endif
+
+#if defined(NUM_MPF_NET_BUF_1024)
+	cons_printf(portid, "  NUM_MPF_NET_BUF_1024:      %2d\n", NUM_MPF_NET_BUF_1024);
+#endif
+
+#if defined(NUM_MPF_NET_BUF_IPV6_MMTU)
+	cons_printf(portid, "  NUM_MPF_NET_BUF_IPV6_MMTU: %2d\n", NUM_MPF_NET_BUF_IPV6_MMTU);
+#endif
+
+#if defined(NUM_MPF_NET_BUF_IF_PDU)
+	cons_printf(portid, "  NUM_MPF_NET_BUF_IF_PDU:    %2d\n", NUM_MPF_NET_BUF_IF_PDU);
+#endif
+
+#if defined(NUM_MPF_NET_BUF_REASSM)
+	cons_printf(portid, "  NUM_MPF_NET_BUF_REASSM:    %2d\n", NUM_MPF_NET_BUF_REASSM);
+#endif
+
+#if defined(NUM_MPF_NET_BUF6_65536)
+	cons_printf(portid, "  NUM_MPF_NET_BUF6_65536:    %2d\n", NUM_MPF_NET_BUF6_65536);
+#endif
+
+	cons_printf(portid, "Network Counter Mask: %08x\n", NET_COUNT_ENABLE);
+
+	cons_printf(portid, "SUPPORT_MIB: ");
+#if defined(SUPPORT_MIB)
+	cons_printf(portid, "On\n");
+#else
+	cons_printf(portid, "Off\n");
+#endif
+
+	SIG_NET_CONS_PRINTF();
+	FLUSH_SND_BUFF();
+	}
+
+/*
+ *  ãããã°ã³ãã³ãè§£æ
+ */
+
+static void
+dbg_parse (ID portid, char *line)
+{
+	int_t	cepid;
+	ER	error;
+
+	switch (*line) {
+
+	case 'c':		/* cancel CEP */
+		switch (*(line + 1)) {
+
+		case 'f':	/* show configurations */
+			show_config(portid, line + 1);
+			break;
+
+#ifdef SUPPORT_TCP
+
+		case 't':	/* cancel TCP */
+			cepid = atoi(line = skip_blanks(line + 2));
+			while ('0' <= *line && *line <= '9')
+				line ++;
+			if ((error = tcp_can_cep((ID)cepid, atoi(skip_blanks(line)))) != E_OK && error != E_RLWAI) {
+				cons_printf(portid, "[TCP CAN CEP] error: %s\n", itron_strerror(error));
+				SIG_NET_CONS_PRINTF();
+				FLUSH_SND_BUFF();
+				}
+			break;
+
+#endif	/* of #ifdef SUPPORT_TCP */
+
+#ifdef SUPPORT_UDP
+
+		case 'u':	/* cancel UDP */
+			cepid = atoi(line = skip_blanks(line + 2));
+			while ('0' <= *line && *line <= '9')
+				line ++;
+			if ((error = udp_can_cep((ID)cepid, atoi(skip_blanks(line)))) != E_OK && error != E_RLWAI) {
+				cons_printf(portid, "[UDP CAN CEP] error: %s\n", itron_strerror(error));
+				SIG_NET_CONS_PRINTF();
+				FLUSH_SND_BUFF();
+				}
+			break;
+
+#endif	/* of #ifdef SUPPORT_UDP */
+
+			}
+
+		break;
+
+#if defined(USE_UDP_DISCARD_CLI) || defined(USE_TCP_DISCARD_CLI) || defined(SUPPORT_PPP) || defined(SUPPORT_ETHER) && defined(USE_NET_CONS)
+
+	case 'd':	/* discard client */
+		switch (*(line + 1)) {
+
+#if defined(SUPPORT_PPP)
+
+		case 'c':		/* disconnect */
+			if (lcp_fsm.state != PPP_FSM_STOPPED)
+				lcp_close();
+			break;
+
+#endif	/* of #if defined(SUPPORT_PPP) */
+
+#if defined(SUPPORT_ETHER) && defined(USE_NET_CONS)
+
+		case 'c':		/* disconnect */
+			discon_net_cons();
+			break;
+
+#endif	/* of #if defined(SUPPORT_ETHER) && defined(USE_NET_CONS) */
+
+#ifdef USE_TCP_DISCARD_CLI
+
+		case 't':	/* TCP discard client */
+			line += 2;
+			switch (*line) {
+
+			case 's':	/* cancel TCP discard client */
+				tcp_discard_cli_valid = false;
+				break;
+
+			default:
+				if ((error = psnd_dtq(DTQ_TCP_DISCARD_CLI, (intptr_t)line)) != E_OK) {
+					cons_printf(portid, "[TCP DISCARD CLI] error: %s\n",
+					       itron_strerror(error));
+					SIG_NET_CONS_PRINTF();
+					FLUSH_SND_BUFF();
+					}
+				break;
+
+				}
+			break;
+
+#endif	/* of #ifdef USE_TCP_DISCARD_CLI */
+
+#ifdef USE_UDP_DISCARD_CLI
+
+		case 'u':	/* UDP discard client */
+			line += 2;
+			switch (*line) {
+
+			case 's':	/* cancel UDP discard client */
+				udp_discard_cli_valid = false;
+				break;
+
+			default:
+				if ((error = psnd_dtq(DTQ_UDP_DISCARD_CLI, (intptr_t)line)) != E_OK) {
+					cons_printf(portid, "[UDP DISCARD CLI] error: %s\n",
+					       itron_strerror(error));
+					SIG_NET_CONS_PRINTF();
+					FLUSH_SND_BUFF();
+					}
+				break;
+
+				}
+			break;
+
+#endif	/* of #ifdef USE_UDP_DISCARD_CLI */
+
+			}
+
+		break;
+
+#endif	/* of #if defined(USE_UDP_DISCARD_CLI) || defined(USE_TCP_DISCARD_CLI) || defined(SUPPORT_PPP) || defined(SUPPORT_ETHER) && defined(USE_NET_CONS) */
+
+#if defined(USE_UDP_ECHO_CLI) || defined(USE_TCP_ECHO_CLI)
+
+	case 'e':	/* echo client */
+		switch (*(line + 1)) {
+
+#ifdef USE_TCP_ECHO_CLI
+
+		case 't':	/* TCP echo client */
+			line += 2;
+			switch (*line) {
+
+			case 's':	/* cancel TCP echo */
+				tcp_echo_cli_valid = false;
+				break;
+
+			default:
+				if ((error = psnd_dtq(DTQ_TCP_ECHO_CLI_SND, (intptr_t)line)) != E_OK) {
+					cons_printf(portid, "[TCP ECHO CLI] error: %s\n", itron_strerror(error));
+					SIG_NET_CONS_PRINTF();
+					FLUSH_SND_BUFF();
+					}
+				break;
+
+				}
+			break;
+
+#endif	/* of #ifdef USE_TCP_ECHO_CLI */
+
+#ifdef USE_UDP_ECHO_CLI
+
+		case 'u':	/* UDP echo client */
+			line += 2;
+			switch (*line) {
+
+			case 's':	/* cancel UDP echo */
+				udp_echo_cli_valid = false;
+				break;
+
+			default:
+				if ((error = psnd_dtq(DTQ_UDP_ECHO_CLI, (intptr_t)line)) != E_OK) {
+					cons_printf(portid, "[UDP ECHO CLI] error: %s\n", itron_strerror(error));
+					SIG_NET_CONS_PRINTF();
+					FLUSH_SND_BUFF();
+					}
+				break;
+
+				}
+			break;
+
+#endif	/* of #ifdef USE_UDP_ECHO_CLI */
+
+			}
+
+		break;
+
+#endif	/* of #if defined(USE_UDP_ECHO_CLI) || defined(USE_TCP_ECHO_CLI) */
+
+	case 'i':
+
+		if (*(line + 1) == 'f')
+			ifconfig(portid, line + 2);
+
+#ifdef SUPPORT_PPP
+
+#ifdef PPP_CFG_MODEM
+
+		else if (lcp_fsm.state == PPP_FSM_STOPPED)
+			dial();		/* initiate */
+
+#else	/* of #ifdef PPP_CFG_MODEM */
+
+		else if (lcp_fsm.state == PPP_FSM_STOPPED)
+			lcp_open(PPP_OPEN_ACTIVE);
+
+#endif	/* of #ifdef PPP_CFG_MODEM */
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+		break;
+
+	case 'n':		/* network status */
+		network_status(portid, line + 1);
+		break;
+
+	case 'p':		/* ping or task status */
+
+		if (*(line + 1) == 's')
+			task_status(portid, skip_blanks(line + 2));
+
+#ifdef USE_PING
+
+		else {
+			int_t		tmo, size;
+			T_IN_ADDR	addr;
+
+#ifdef PING_CFG_I6RLP
+			static const char i6rlp_pmtu_str1[] = " FF1E::1:2 1 1452";
+			static const char i6rlp_pmtu_str2[] = " FF1E::1:2 1 1352";
+			static const char i6rlp_pmtu_str3[] = " fe80::0200:00ff:fe00:0100 1 2";
+
+			if      (*(line + 1) == '1')
+				strcpy(line + 1, i6rlp_pmtu_str1);
+			else if (*(line + 1) == '2')
+				strcpy(line + 1, i6rlp_pmtu_str2);
+			else if (*(line + 1) == '3')
+				strcpy(line + 1, i6rlp_pmtu_str3);
+
+#endif	/* of #ifdef PING_CFG_I6RLP */
+
+			line = skip_blanks(GET_IPADDR(&addr, skip_blanks(line + 1)));
+			if ('0' <= *line && *line <= '9')
+				line = get_int(&tmo, line);
+			else
+				tmo = 3;
+
+			line = skip_blanks(line + 1);
+			if ('0' <= *line && *line <= '9')
+				line = get_int(&size, line);
+			else
+				size = 64;
+
+			PING(&addr, (uint_t)tmo, (uint_t)size);
+			}
+
+#endif	/* of #ifdef USE_PING */
+
+		break;
+
+	case 'r':		/* release wait task */
+		if ((error = rel_wai(atoi(skip_blanks(line + 1)))) != E_OK) {
+			cons_printf(portid, "[REL WAI TSK] error: %s\n", itron_strerror(error));
+			SIG_NET_CONS_PRINTF();
+			FLUSH_SND_BUFF();
+			}
+		break;
+
+	case 't':		/* terminate (delete) REP/CEP */
+		switch (*(line + 1)) {
+
+#ifdef USE_TCP_EXTENTIONS
+
+		case 't':		/* TCP REP */
+			if ((error = tcp_del_rep(atoi(skip_blanks(line + 2)))) != E_OK) {
+				cons_printf(portid, "[TCP DEL REP] error: %s\n", itron_strerror(error));
+				SIG_NET_CONS_PRINTF();
+				FLUSH_SND_BUFF();
+				}
+			break;
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+#ifdef USE_UDP_EXTENTIONS
+
+		case 'u':		/* UDP CEP */
+			if ((error = udp_del_cep(atoi(skip_blanks(line + 2)))) != E_OK) {
+				cons_printf(portid, "[UDP DEL CEP] error: %s\n", itron_strerror(error));
+				SIG_NET_CONS_PRINTF();
+				FLUSH_SND_BUFF();
+				}
+			break;
+
+#endif	/* of #ifdef USE_UDP_EXTENTIONS */
+
+			}
+		break;
+
+#if defined(USE_TCP_EXTENTIONS) || defined(USE_UDP_EXTENTIONS)
+
+	case 'w':		/* wakeup server */
+				/* wake up task */
+		switch (*(line + 1)) {
+
+#ifdef USE_TCP_EXTENTIONS
+
+		case 't':		/* tcp server */
+			switch (*(line + 2)) {
+
+#ifdef USE_TCP_DISCARD_SRV
+			case 'd':		/* tcp discard server */
+				if ((error = wup_tsk(TCP_DISCARD_SRV_TASK)) != E_OK) {
+					cons_printf(portid, "[WUP TCP DISCARD SRV] error: %s\n", itron_strerror(error));
+					SIG_NET_CONS_PRINTF();
+					FLUSH_SND_BUFF();
+					}
+				break;
+#endif	/* of #ifdef USE_TCP_DISCARD_SRV */
+
+#if defined(USE_TCP_ECHO_SRV1) || defined(USE_TCP_ECHO_SRV2)
+			case 'e':		/* tcp echo server */
+				if ((error = wup_tsk(TCP_ECHO_SRV_TASK)) != E_OK) {
+					cons_printf(portid, "[WUP UDP DISCARD SRV] error: %s\n", itron_strerror(error));
+					SIG_NET_CONS_PRINTF();
+					FLUSH_SND_BUFF();
+					}
+				break;
+#endif	/* of #if defined(USE_TCP_ECHO_SRV1) || defined(USE_TCP_ECHO_SRV2) */
+
+#ifdef USE_WWW_SRV
+			case 'w':		/* WWW server */
+				if ((error = wup_tsk(WWW_SRV_TASK1)) != E_OK) {
+					cons_printf(portid, "[WUP WWW SRV] error: %s\n", itron_strerror(error));
+					SIG_NET_CONS_PRINTF();
+					FLUSH_SND_BUFF();
+					}
+				break;
+#endif	/* of #ifdef USE_TCP_DISCARD_SRV */
+
+				}
+			break;
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+#ifdef USE_UDP_EXTENTIONS
+
+		case 'u':		/* udp server */
+			switch (*(line + 2)) {
+
+#if defined(USE_UDP_ECHO_SRV) && !defined(USE_UDP_CALL_BACK)
+			case 'e':		/* udp echo server */
+				if ((error = wup_tsk(UDP_ECHO_SRV_TASK)) != E_OK) {
+					cons_printf(portid, "[WUP UDP ECHO SRV] error: %s\n", itron_strerror(error));
+					SIG_NET_CONS_PRINTF();
+					FLUSH_SND_BUFF();
+					}
+				break;
+#endif	/* of #if defined(USE_UDP_ECHO_SRV) && !defined(USE_UDP_CALL_BACK) */
+
+				}
+			break;
+
+#endif	/* of #ifdef USE_UDP_EXTENTIONS */
+
+		default:
+			if ((error = wup_tsk(atoi(skip_blanks(line + 1)))) != E_OK) {
+				cons_printf(portid, "[WUP TSK] error: %s\n", itron_strerror(error));
+				SIG_NET_CONS_PRINTF();
+				FLUSH_SND_BUFF();
+				}
+			break;
+
+			}
+		break;
+
+#else	/* of #if defined(USE_TCP_EXTENTIONS) || defined(USE_UDP_EXTENTIONS) */
+
+	case 'w':		/* wake up task */
+		if ((error = wup_tsk(atoi(skip_blanks(line + 1)))) != E_OK) {
+			cons_printf(portid, "[WUP TSK] error: %s\n", itron_strerror(error));
+			SIG_NET_CONS_PRINTF();
+			FLUSH_SND_BUFF();
+			}
+		break;
+
+#endif	/* of #if defined(USE_TCP_EXTENTIONS) || defined(USE_UDP_EXTENTIONS) */
+
+	default:
+
+		if (*line) {
+
+#ifdef USE_EXTRA_PARSE
+
+			extra_parse(line);
+
+#else	/* of #ifdef USE_EXTRA_PARSE */
+
+			cons_printf(portid, "no such command: '%c'\n", *line);
+			SIG_NET_CONS_PRINTF();
+			FLUSH_SND_BUFF();
+
+#endif	/* of #ifdef USE_EXTRA_PARSE */
+
+			}
+		break;
+		}
+	}
+
+/*
+ *  ãããã°ã³ã³ã½ã¼ã«ã¿ã¹ã¯
+ */
+
+void
+dbg_con_task (intptr_t exinf)
+{
+	static char line[DBG_LINE_SIZE + 1];
+
+	uint_t	len;
+	ID	tskid;
+
+#ifdef USE_LCD
+#ifdef SUPPORT_ETHER
+
+#if defined(SUPPORT_INET6)
+
+	int_t		lllen;
+	const uint8_t	*lladdr;
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+	lcd_init();
+
+	if ((TINET_PRVER & UINT_C(0x0f)) > 0)
+		lcd_printf("TINET-%d.%d.%d\n",
+		       (TINET_PRVER   >> 12) & UINT_C(0x0f),
+		       (TINET_PRVER   >>  4) & UINT_C(0x0f),
+		        TINET_PRVER          & UINT_C(0x0f));
+	else
+		lcd_printf("TINET-%d.%d\n",
+		       (TINET_PRVER   >> 12) & UINT_C(0x0f),
+		       (TINET_PRVER   >>  4) & UINT_C(0x0f));
+
+#if defined(SUPPORT_INET6)
+
+	lladdr = IF_ETHER_NIC_GET_SOFTC()->ifaddr.lladdr;
+	for (lllen = ETHER_ADDR_LEN; lllen --; )
+		lcd_printf("%02x", *lladdr ++);
+	lcd_printf("\n");
+
+#else	/* of #if defined(SUPPORT_INET6) */
+
+	lcd_puts(ip2str(NULL, in4_get_ifaddr(0)));
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+#else	/* of #ifdef USE_LCD */
+
+	get_tid(&tskid);
+	cons_printf(CONSOLE_PORTID, "[CONSOLE:%d] started.\n", tskid);
+
+#endif	/* of #ifdef USE_LCD */
+
+	serial_ctl_por(CONSOLE_PORTID,
+	               IOCTL_ECHO  | IOCTL_CRLF  |
+	               IOCTL_FCSND | IOCTL_FCANY | IOCTL_FCRCV);
+	while (true) {
+		len = cons_getline(CONSOLE_PORTID, line, DBG_LINE_SIZE);
+		dbg_parse(CONSOLE_PORTID, line);
+		}
+	}
+
+#endif	/* of #ifdef USE_DBG_CONS */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/dbg_cons.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/dbg_cons.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/dbg_cons.cfg	(revision 270)
@@ -0,0 +1,63 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  ãããã°ã³ã³ã½ã¼ã«ã®ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_DBG_CONS
+
+/* ã¿ã¹ã¯ */
+
+CRE_TSK(DBG_CON_TASK, {
+	TA_HLNG|TA_ACT,
+	0,
+	dbg_con_task,
+	DBG_CON_PRIORITY,
+	DBG_CON_STACK_SIZE,
+	NULL
+	});
+
+#endif	/* of #ifdef USE_DBG_CONS */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/dbg_cons.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/dbg_cons.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/dbg_cons.h	(revision 270)
@@ -0,0 +1,70 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _DBG_CONS_
+#define _DBG_CONS_
+
+/* 
+ *  ã³ã³ã½ã¼ã«
+ */
+
+#define	DBG_CON_STACK_SIZE	1024		/* ã³ã³ã½ã¼ã«ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº */
+#define DBG_CON_PRIORITY	5		/* ã³ã³ã½ã¼ã«ã¿ã¹ã¯ã®åªå
+åº¦ */
+
+/*
+ *  ã¿ã¹ã¯
+ */
+
+extern void	dbg_con_task (intptr_t exinf);
+
+/*
+ *  é¢æ°
+ */
+
+extern void act_tasks (void);
+extern void extra_parse (char *line);
+
+#endif	/* of #ifndef _DBG_CONS_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/discard.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/discard.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/discard.h	(revision 270)
@@ -0,0 +1,126 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _DISCARD_H_
+#define _DISCARD_H_
+
+/* 
+ *  DISCARD ãµã¼ãã»ã¯ã©ã¤ã¢ã³ãã®ã¹ã¿ãã¯ãµã¤ãº
+ */
+
+#define TCP_DISCARD_SRV_STACK_SIZE	1024		/* TCP DISCARD ãµã¼ãã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº */
+#define TCP_DISCARD_CLI_STACK_SIZE	1024		/* TCP DISCARD ã¯ã©ã¤ã¢ã³ãã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº */
+#define UDP_DISCARD_CLI_STACK_SIZE	1024		/* UDP DISCARD ã¯ã©ã¤ã¢ã³ãã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº */
+
+/* 
+ *  DISCARD ãµã¼ãã»ã¯ã©ã¤ã¢ã³ãã®åªå
+åº¦
+ */
+
+#define TCP_DISCARD_SRV_MAIN_PRIORITY	5	/* TCP DISCARD ãµã¼ãã¿ã¹ã¯ã®åªå
+åº¦ */
+#define TCP_DISCARD_CLI_MAIN_PRIORITY	5	/* TCP DISCARD ã¯ã©ã¤ã¢ã³ãã¿ã¹ã¯ã®åªå
+åº¦ */
+#define UDP_DISCARD_CLI_MAIN_PRIORITY	5	/* UDP DISCARD ã¯ã©ã¤ã¢ã³ãã¿ã¹ã¯ã®åªå
+åº¦ */
+
+/*
+ *  TCP éåä¿¡ã¦ã¤ã³ããããã¡ãµã¤ãº
+ */
+
+#if defined(NUM_MPF_NET_BUF_IF_PDU) && NUM_MPF_NET_BUF_IF_PDU > 0
+
+#define TCP_DISCARD_CLI_SWBUF_SIZE	((IF_MTU-(IP_HDR_SIZE+TCP_HDR_SIZE))*1)
+#define TCP_DISCARD_SRV_RWBUF_SIZE	((IF_MTU-(IP_HDR_SIZE+TCP_HDR_SIZE))*1)
+
+#else	/* of #if defined(NUM_MPF_NET_BUF_IF_PDU) && NUM_MPF_NET_BUF_IF_PDU > 0 */
+
+#if defined(SUPPORT_INET4)
+
+#define TCP_DISCARD_CLI_SWBUF_SIZE	(TCP_MSS)
+#define TCP_DISCARD_SRV_RWBUF_SIZE	(TCP_MSS)
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+#define TCP_DISCARD_CLI_SWBUF_SIZE	(TCP6_MSS)
+#define TCP_DISCARD_SRV_RWBUF_SIZE	(TCP6_MSS)
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+#endif	/* of #if defined(NUM_MPF_NET_BUF_IF_PDU) && NUM_MPF_NET_BUF_IF_PDU > 0 */
+
+/*
+ *  å¤æ°
+ */
+
+extern bool_t	tcp_discard_cli_valid;
+extern bool_t	udp_discard_cli_valid;
+
+/* TCP éåä¿¡ãããã¡ */
+
+extern uint8_t tcp_discard_cli_swbuf[];
+extern uint8_t tcp_discard_cli_rwbuf[];
+
+extern uint8_t tcp_discard_srv_swbuf[];
+extern uint8_t tcp_discard_srv_rwbuf[];
+
+/*
+ *  ã¿ã¹ã¯
+ */
+
+extern void tcp_discard_srv_task(intptr_t exinf);
+extern void tcp_discard_cli_task(intptr_t exinf);
+
+extern void udp_discard_cli_task(intptr_t exinf);
+
+/*
+ *  é¢æ°
+ */
+
+extern ER callback_nblk_tcp_discard_cli (ID cepid, FN fncd, void *p_parblk);
+
+#endif	/* of #ifndef _DISCARD_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/echo.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/echo.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/echo.h	(revision 270)
@@ -0,0 +1,175 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _ECHO_H_
+#define _ECHO_H_
+
+/* 
+ *  ECHO ã¯ã©ã¤ã¢ã³ãã»ãµã¼ãã®ã¹ã¿ãã¯ãµã¤ãº
+ */
+
+#define TCP_ECHO_SRV_STACK_SIZE		1024		/* TCP ECHO ãµã¼ãã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº		*/
+
+#ifdef TOPPERS_S810_CLG3_85
+#define TCP_ECHO_CLI_RCV_STACK_SIZE	512		/* TCP ECHO ã¯ã©ã¤ã¢ã³ãåä¿¡ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº	*/
+#define TCP_ECHO_CLI_SND_STACK_SIZE	512		/* TCP ECHO ã¯ã©ã¤ã¢ã³ãéä¿¡ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº	*/
+#else	/* of #ifdef TOPPERS_S810_CLG3_85 */
+#define TCP_ECHO_CLI_RCV_STACK_SIZE	1024		/* TCP ECHO ã¯ã©ã¤ã¢ã³ãåä¿¡ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº	*/
+#define TCP_ECHO_CLI_SND_STACK_SIZE	1024		/* TCP ECHO ã¯ã©ã¤ã¢ã³ãéä¿¡ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº	*/
+#endif	/* of #ifdef TOPPERS_S810_CLG3_85 */
+
+#define UDP_ECHO_SRV_STACK_SIZE		1024		/* UDP ECHO ãµã¼ãã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº		*/
+#define UDP_ECHO_CLI_STACK_SIZE		1024		/* UDP ECHO ã¯ã©ã¤ã¢ã³ãã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº	*/
+
+/* 
+ *  ECHO ã¯ã©ã¤ã¢ã³ãã»ãµã¼ãã®åªå
+åº¦
+ */
+
+#define TCP_ECHO_SRV_MAIN_PRIORITY	5		/* TCP ECHO ãµã¼ãã¿ã¹ã¯ã®åªå
+åº¦			*/
+#define TCP_ECHO_CLI_RCV_MAIN_PRIORITY	5		/* TCP ECHO ã¯ã©ã¤ã¢ã³ãåä¿¡ã¿ã¹ã¯ã®åªå
+åº¦		*/
+#define TCP_ECHO_CLI_SND_MAIN_PRIORITY	5		/* TCP ECHO ã¯ã©ã¤ã¢ã³ãéä¿¡ã¿ã¹ã¯ã®åªå
+åº¦		*/
+
+#define UDP_ECHO_SRV_MAIN_PRIORITY	5		/* UDP ECHO ãµã¼ãã¿ã¹ã¯ã®åªå
+åº¦			*/
+#define UDP_ECHO_CLI_MAIN_PRIORITY	5		/* UDP ECHO ã¯ã©ã¤ã¢ã³ãã¿ã¹ã¯ã®åªå
+åº¦		*/
+
+/*
+ *  TCP éåä¿¡ã¦ã¤ã³ããããã¡ãµã¤ãº
+ */
+
+#if defined(NUM_MPF_NET_BUF_IF_PDU) && NUM_MPF_NET_BUF_IF_PDU > 0
+
+#define TCP_ECHO_CLI_SWBUF_SIZE		((IF_MTU-(IP_HDR_SIZE+TCP_HDR_SIZE))*1)
+#define TCP_ECHO_CLI_RWBUF_SIZE		((IF_MTU-(IP_HDR_SIZE+TCP_HDR_SIZE))*1)
+
+#define TCP_ECHO_SRV_SWBUF_SIZE		((IF_MTU-(IP_HDR_SIZE+TCP_HDR_SIZE))*2)
+#define TCP_ECHO_SRV_RWBUF_SIZE		((IF_MTU-(IP_HDR_SIZE+TCP_HDR_SIZE))*2)
+
+#else	/* of #if defined(NUM_MPF_NET_BUF_IF_PDU) && NUM_MPF_NET_BUF_IF_PDU > 0 */
+
+#if defined(SUPPORT_INET4)
+
+#define TCP_ECHO_CLI_SWBUF_SIZE		(TCP_MSS)
+#define TCP_ECHO_CLI_RWBUF_SIZE		(TCP_MSS)
+
+#define TCP_ECHO_SRV_SWBUF_SIZE		(TCP_MSS)
+#define TCP_ECHO_SRV_RWBUF_SIZE		(TCP_MSS)
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+#define TCP_ECHO_CLI_SWBUF_SIZE		(TCP6_MSS)
+#define TCP_ECHO_CLI_RWBUF_SIZE		(TCP6_MSS)
+
+#define TCP_ECHO_SRV_SWBUF_SIZE		(TCP6_MSS)
+#define TCP_ECHO_SRV_RWBUF_SIZE		(TCP6_MSS)
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+#endif	/* of #if defined(NUM_MPF_NET_BUF_IF_PDU) && NUM_MPF_NET_BUF_IF_PDU > 0 */
+
+/*
+ *  ã¿ã¹ã¯æ°
+ */
+
+#if !(defined(USE_TCP_ECHO_SRV1) && !defined(USE_TCP_NON_BLOCKING) && defined(USE_COPYSAVE_API))
+
+#undef  NUM_TCP_ECHO_SRV_TASKS
+#define NUM_TCP_ECHO_SRV_TASKS		1
+
+#endif	/* of #if !(defined(USE_TCP_ECHO_SRV1) && !defined(USE_TCP_NON_BLOCKING) && defined(USE_COPYSAVE_API)) */
+
+/*
+ *  å¤æ°
+ */
+
+extern bool_t	tcp_echo_cli_valid;
+extern bool_t	udp_echo_cli_valid;
+
+/* TCP éåä¿¡ãããã¡ */
+
+extern uint8_t tcp_echo_cli_swbuf[];
+extern uint8_t tcp_echo_cli_rwbuf[];
+
+#ifdef _TCP_H_
+
+extern uint8_t tcp_echo_srv_swbuf[NUM_TCP_ECHO_SRV_TASKS][TCP_ECHO_SRV_SWBUF_SIZE];
+extern uint8_t tcp_echo_srv_rwbuf[NUM_TCP_ECHO_SRV_TASKS][TCP_ECHO_SRV_RWBUF_SIZE];
+
+#endif	/* of #ifdef _TCP_H_ */
+
+/*
+ *  ã¿ã¹ã¯
+ */
+
+extern void	tcp_echo_srv_task(intptr_t exinf);
+extern void	tcp_echo_srv_rcv_task(intptr_t exinf);
+extern void	tcp_echo_srv_snd_task(intptr_t exinf);
+extern void	tcp_echo_cli_rcv_task(intptr_t exinf);
+extern void	tcp_echo_cli_snd_task(intptr_t exinf);
+
+extern void	udp_echo_srv_task(intptr_t exinf);
+extern void	udp_echo_cli_task(intptr_t exinf);
+
+/*
+ *  é¢æ°
+ */
+
+extern ER callback_nblk_tcp_echo_srv (ID cepid, FN fncd, void *p_parblk);
+extern ER callback_nblk_tcp_echo_cli (ID cepid, FN fncd, void *p_parblk);
+
+extern ER callback_udp_echo_srv (ID cepid, FN fncd, void *p_parblk);
+extern ER callback_udp_echo_cli (ID cepid, FN fncd, void *p_parblk);
+
+extern ER callback_nblk_udp_echo_srv (ID cepid, FN fncd, void *p_parblk);
+extern ER callback_nblk_udp_echo_cli (ID cepid, FN fncd, void *p_parblk);
+
+#endif	/* of #ifndef _ECHO_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/net_cons.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/net_cons.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/net_cons.c	(revision 270)
@@ -0,0 +1,608 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  ãããã¯ã¼ã¯çµç±ã³ã³ã½ã¼ã«å
+¥åºå
+ */
+
+#include <stdarg.h>
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <syssvc/serial.h>
+#include <syssvc/logtask.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+#include "tinet_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+#include "tinet_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_timer.h>
+
+#include <netinet/in.h>
+#include <netinet/in_itron.h>
+
+#include <netapp/netapp.h>
+#include <netapp/netapp_var.h>
+#include <netapp/net_cons.h>
+
+#ifdef USE_NET_CONS
+
+/*
+ *  ãã¯ã­å®ç¾©
+ */
+
+/*  ãªãã¼ã ã®è§£é¤  */
+
+#undef syslog
+#undef serial_rea_dat
+#undef serial_ctl_por
+
+#define EOF		(-1)
+
+/*  TELNET ãªãã·ã§ã³ */
+
+#define TELNET_OPT_SE		(240)
+#define TELNET_OPT_NOP		(241)
+#define TELNET_OPT_DM		(242)
+#define TELNET_OPT_BRK		(243)
+#define TELNET_OPT_IP		(244)
+#define TELNET_OPT_AO		(245)
+#define TELNET_OPT_AYT		(246)
+#define TELNET_OPT_EC		(247)
+#define TELNET_OPT_EL		(248)
+#define TELNET_OPT_GA		(249)
+#define TELNET_OPT_SB		(250)
+#define TELNET_OPT_WILL		(251)
+#define TELNET_OPT_WONT		(252)
+#define TELNET_OPT_DO		(253)
+#define TELNET_OPT_DONT		(254)
+#define TELNET_OPT_IAC		(255)
+
+/*
+ *  å¤æ°
+ */
+
+/*  TCP éåä¿¡ã¦ã£ã³ããããã¡  */
+
+uint8_t net_cons_swbuf[NET_CONS_SWBUF_SIZE];
+uint8_t net_cons_rwbuf[NET_CONS_RWBUF_SIZE];
+
+bool_t	connected	= false;	/* ã³ãã¯ã·ã§ã³ã®ç¶æ
+	*/
+bool_t	wait_accept	= false;	/* æ¥ç¶è¦æ±å¾
+ã¡ä¸­	*/
+
+#if defined(SUPPORT_INET4)
+
+T_IPV4EP	dst;
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+T_IPV6EP	dst;
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+uint8_t		*snd_buff	= NULL;
+uint8_t		*rcv_buff	= NULL;
+uint_t		snd_off		= 0;
+uint_t		rcv_off		= 0;
+uint_t		net_ioctl	= IOCTL_NULL;
+ER_UINT		snd_len		= 0;
+ER_UINT		rcv_len		= 0;
+
+/*
+ *  ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã®ã³ã¼ã«ããã¯é¢æ°
+ */
+
+ER
+callback_nblk_net_cons (ID cepid, FN fncd, void *p_parblk)
+{
+	ER	error = E_OK;
+	SYSTIM	now;
+
+	switch (fncd) {
+
+	case TFN_TCP_ACP_CEP:
+		get_tim(&now);
+		if (*(ER*)p_parblk == E_OK) {
+			syslog(LOG_NOTICE, "[NCS:%02u CBN] connected:  %6lu, from: %s.%u",
+			                   cepid, now / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno);
+			connected = true;
+			}
+		else
+			syslog(LOG_NOTICE, "[NCS:%02d CBN] error: %s", itron_strerror(*(ER*)p_parblk));
+		snd_len = snd_off = rcv_len = rcv_off = 0;
+		wait_accept = false;
+		break;
+
+	case TFN_TCP_CLS_CEP:
+	case TFN_TCP_RCV_BUF:
+	case TFN_TCP_GET_BUF:
+	case TFN_TCP_RCV_DAT:
+	case TFN_TCP_SND_DAT:
+	case TFN_TCP_CON_CEP:
+	case TFN_TCP_SND_OOB:
+	default:
+		error = E_PAR;
+		break;
+		}
+	return error;
+	}
+
+/*
+ *  éä¿¡ãããã¡ã®ãã©ãã·ã¥
+ */
+
+void
+flush_snd_buff (void)
+{
+	ER_UINT	error;
+
+	if (connected) {
+		syscall(wai_sem(SEM_NET_CONS_SEND));
+		if (snd_off > 0) {
+			if ((error = tcp_snd_buf(NET_CONS_CEPID, snd_off)) != E_OK && error != E_CLS)
+				syslog(LOG_NOTICE, "[NCS:%02d SND] flush send error: %s",
+				                   NET_CONS_CEPID, itron_strerror(error));
+			snd_len = snd_off = 0;
+			}
+		syscall(sig_sem(SEM_NET_CONS_SEND));
+		}
+	return;
+	}
+
+/*
+ *  æå­éä¿¡
+ */
+
+void
+cons_putchar (ID portid, char ch)
+{
+	ER_UINT	error;
+
+	if (connected) {
+		if (ch == '\n' && (net_ioctl & IOCTL_CRLF) != 0)
+			cons_putchar(portid, '\r');
+		syscall(wai_sem(SEM_NET_CONS_SEND));
+		if (snd_off >= snd_len) {
+			if ((error = tcp_snd_buf(NET_CONS_CEPID, snd_off)) != E_OK) {
+				if (error != E_CLS)
+					syslog(LOG_NOTICE, "[NCS:%02d SND] send buff error: %s",
+					                   NET_CONS_CEPID, itron_strerror(error));
+				syscall(sig_sem(SEM_NET_CONS_SEND));
+				return;
+				}
+			snd_off = 0;
+			if ((snd_len = tcp_get_buf(NET_CONS_CEPID, (void*)&snd_buff, TMO_FEVR)) <= 0) {
+				if (snd_len != E_CLS)
+					syslog(LOG_NOTICE, "[NCS:%02d SND] get buff error: %s",
+					                   NET_CONS_CEPID, itron_strerror(snd_len));
+				syscall(sig_sem(SEM_NET_CONS_SEND));
+				return;
+				}
+			}
+		snd_buff[snd_off ++] = ch;
+		syscall(sig_sem(SEM_NET_CONS_SEND));
+		}
+	else
+		serial_wri_dat(portid, &ch, sizeof(ch));
+	}
+
+/*
+ *  æå­åä¿¡ï¼å¤æãªãï¼
+ */
+
+static int_t
+cons_getchar_raw (void)
+{
+	ER	error = E_OK;
+
+	if (connected) {
+		if (rcv_off >= rcv_len) {
+			rcv_off = 0;
+			if ((error = tcp_rel_buf(NET_CONS_CEPID, rcv_len)) != E_OK) {
+				if (error != E_CLS)
+					syslog(LOG_NOTICE, "[NCS:%02d RCV] release buff error: %s",
+					                   NET_CONS_CEPID, itron_strerror(error));
+				discon_net_cons();
+				return EOF;
+				}
+			if ((rcv_len = tcp_rcv_buf(NET_CONS_CEPID, (void*)&rcv_buff, TMO_FEVR)) == 0) {
+				discon_net_cons();
+				return EOF;
+				}
+			else if (rcv_len < 0) {
+				if (rcv_len != E_CLS)
+					syslog(LOG_NOTICE, "[NCS:%02d RCV] recieve buff error: %s",
+					                   NET_CONS_CEPID, itron_strerror(rcv_len));
+				discon_net_cons();
+				return EOF;
+				}
+			}
+		return rcv_buff[rcv_off ++];
+		}
+	else
+		return EOF;
+	}
+
+/*
+ *  æå­åä¿¡ï¼TELNET ãªãã·ã§ã³ãã¹ã­ããï¼
+ */
+
+int_t
+cons_getchar (ID portid)
+{
+	T_SERIAL_RPOR	rpor;
+	int_t		ch, req;
+	char		uch;
+	ER		error;
+
+	if (!wait_accept && !connected) {
+		wait_accept = true;
+		error = TCP_ACP_CEP(NET_CONS_CEPID, NET_CONS_REPID, &dst, TMO_NBLK);
+#if 0
+		syslog(LOG_NOTICE, "[NCS:%02d ACP] status: %s",NET_CONS_CEPID, itron_strerror(error));
+#endif
+		if (error != E_WBLK)
+			return EOF;
+		}
+
+	while (true) {
+		if (connected) {
+			while ((ch = cons_getchar_raw()) == TELNET_OPT_IAC || ch == '\0') {
+				if (ch != '\0') {
+					switch (ch = cons_getchar_raw()) {
+					case TELNET_OPT_WILL:
+					case TELNET_OPT_WONT:
+					case TELNET_OPT_DO:
+					case TELNET_OPT_DONT:
+						req = cons_getchar_raw();
+						break;
+					case TELNET_OPT_SB:
+						while ((ch = cons_getchar_raw()) != EOF && ch != TELNET_OPT_IAC) {
+							if ((ch = cons_getchar_raw()) == EOF || ch == TELNET_OPT_SE)
+								break;
+							}
+						break;
+					default:
+						break;
+						}
+					}
+				}
+			if (ch != '\n') {
+				if ((net_ioctl & IOCTL_ECHO) != 0 && ch != EOF) {
+					cons_putchar(portid, ch);
+					flush_snd_buff();
+					}
+				return ch;
+				}
+			}
+
+		else if (serial_ref_por(portid, &rpor) == E_OK && rpor.reacnt > 0) {
+			if (serial_rea_dat(portid, &uch, sizeof(uch)) > 0)
+				return uch;
+			else
+				return EOF;
+			}
+		dly_tsk(100);
+		}
+	return EOF;
+	}
+
+/*
+ *  ã³ãã¯ã·ã§ã³ãåæ­
+ */
+
+ER
+discon_net_cons (void)
+{
+	ER	error = E_OK;
+	SYSTIM	now;
+
+	if (connected) {
+		syscall(wai_sem(SEM_NET_CONS_SEND));
+		if (snd_off > 0) {
+			if ((error = tcp_snd_buf(NET_CONS_CEPID, snd_off)) != E_OK && error != E_CLS)
+				syslog(LOG_NOTICE, "[NCS:%02d SND] send buff error: %s",
+				                   NET_CONS_CEPID, itron_strerror(error));
+			}
+		if ((error = tcp_sht_cep(NET_CONS_CEPID)) != E_OK)
+			syslog(LOG_NOTICE, "[NCS:%02d SHT] shutdown error: %s",
+			                   NET_CONS_CEPID, itron_strerror(error));
+		if ((error = tcp_cls_cep(NET_CONS_CEPID, TMO_FEVR)) != E_OK)
+			syslog(LOG_NOTICE, "[NCS:%02d CLS] close error: %s",
+			                   NET_CONS_CEPID, itron_strerror(error));
+		connected = false;
+		syscall(sig_sem(SEM_NET_CONS_SEND));
+		get_tim(&now);
+		syslog(LOG_NOTICE, "[NCS:%02u SND] disconnected:%5lu, from: %s.%u",
+		                   NET_CONS_CEPID, now / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno);
+		}
+	return error;
+	}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãã®å¶å¾¡
+ */
+
+ER
+net_serial_ctl_por (ID portid, uint_t ioctl)
+{
+	net_ioctl = ioctl;
+	return serial_ctl_por(portid, ioctl);
+	}
+
+/*
+ *  ã­ã°åºå
+ */
+
+ER
+net_syslog (uint_t prio, const char *format, ...)
+{
+#if defined(SUPPORT_INET4)
+	T_IN4_ADDR	*addr;
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+	ulong_t		val;
+	SYSLOG		log;
+	va_list		ap;
+	char		padchar, *str;
+	int_t		ch, width, left, i;
+	bool_t		longflag;
+
+	if (connected) {
+		syscall(wai_sem(SEM_NET_CONS_PRINTF));
+		va_start(ap, format);
+		while ((ch = *format ++) != '\0') {
+			if (ch != '%') {		/* æ¸å¼æå®ä»¥å¤ */
+				cons_putchar(CONSOLE_PORTID, (char)ch);
+				continue;
+				}
+
+			width = 0;
+			longflag = false;
+			padchar = ' ';
+
+			if (ch == '-') {		/* å·¦è©°ã */
+				format ++;
+				left = -1;
+				}
+			else
+				left = 1;
+
+			if ((ch = *format ++) == '0') {	/* ä¸ä½æ¡ã® 0 */
+				padchar = '0';
+				ch = *format ++;
+				}
+
+			while ('0' <= ch && ch <= '9') {	/* åºåå¹
+ */
+				width = width * 10 + ch - '0';
+				ch = *format ++;
+				}
+
+			while (ch == 'l') {		/* long (long) ã®æå® */
+				longflag = true;
+				ch = *format ++;
+				}
+
+			switch (ch) {
+			case 'd':
+				val = longflag ? (ulong_t)va_arg(ap, long_t)
+				               : (ulong_t)va_arg(ap, int_t);
+				if ((long_t)val >= 0)
+					cons_putnumber(CONSOLE_PORTID,  val, 10, radhex, width * left, false, padchar);
+				else
+					cons_putnumber(CONSOLE_PORTID, -val, 10, radhex, width * left, true, padchar);
+				break;
+
+			case 'u':
+				val = longflag ? (ulong_t)va_arg(ap, ulong_t)
+				               : (ulong_t)va_arg(ap, uint_t);
+				cons_putnumber(CONSOLE_PORTID, val, 10, radhex, width * left, false, padchar);
+				break;
+
+			case 'x':
+				val = longflag ? (ulong_t)va_arg(ap, ulong_t)
+				               : (ulong_t)va_arg(ap, uint_t);
+				cons_putnumber(CONSOLE_PORTID, val, 16, radhex, width * left, false, padchar);
+				break;
+
+			case 'X':
+				val = longflag ? (ulong_t)va_arg(ap, ulong_t)
+				               : (ulong_t)va_arg(ap, uint_t);
+				cons_putnumber(CONSOLE_PORTID, val, 16, radHEX, width * left, false, padchar);
+				break;
+
+			case 'c':
+				ch = va_arg(ap, int_t);
+				cons_putchar(CONSOLE_PORTID, (char)ch);
+				break;
+
+			case 's':
+				str = va_arg(ap, char*);
+				while ((ch = *str ++) != '\0') {
+					cons_putchar(CONSOLE_PORTID, (char)ch);
+					width --;
+					}
+				while (width -- > 0)
+					cons_putchar(CONSOLE_PORTID, ' ');
+				break;
+
+			case 'I':
+
+#if defined(SUPPORT_INET4)
+
+				addr = va_arg(ap, T_IN4_ADDR*);
+				put_ipv4addr(CONSOLE_PORTID, addr, width);
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+				str = va_arg(ap, char*);
+				put_ipv6addr(CONSOLE_PORTID, (T_IN6_ADDR *)str, width);
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+				break;
+
+			case 'M':
+				str = va_arg(ap, char*);
+				put_macaddr(CONSOLE_PORTID, str, width);
+				break;
+
+			case '%':
+				cons_putchar(CONSOLE_PORTID, '%');
+				break;
+
+			case '0':
+				format --;
+				break;
+
+			default:
+				break;
+				}
+
+			}
+		va_end(ap);
+		cons_putchar(CONSOLE_PORTID, '\n');
+		flush_snd_buff();
+		syscall(sig_sem(SEM_NET_CONS_PRINTF));
+		return E_OK;
+		}
+	else {
+		log.logtype = LOG_TYPE_COMMENT;
+		log.loginfo[0] = (intptr_t)format;
+		i = 1;
+		va_start(ap, format);
+
+		while ((ch = *format++) != '\0' && i < TMAX_LOGINFO) {
+			if (ch != '%') {
+				continue;
+				}
+
+			longflag = false;
+
+			ch = *format++;
+			while ('0' <= ch && ch <= '9') {
+				ch = *format++;
+				}
+
+			while (ch == 'l') {		/* long (long) ã®æå® */
+				longflag = true;
+				ch = *format ++;
+				}
+
+			switch (ch) {
+			case 'd':
+				log.loginfo[i++] = longflag
+					? (intptr_t)va_arg(ap, long_t) 
+					: (intptr_t)va_arg(ap, int_t);
+				break;
+			case 'u':
+			case 'x':
+			case 'X':
+				log.loginfo[i++] = longflag
+					? (intptr_t)va_arg(ap, ulong_t)
+					: (intptr_t)va_arg(ap, uint_t);
+				break;
+			case 'p':
+				log.loginfo[i++] = (intptr_t)va_arg(ap, void *);
+				break;
+			case 'c':
+				log.loginfo[i++] = (intptr_t)va_arg(ap, int_t);
+				break;
+			case 's':
+				log.loginfo[i++] = (intptr_t)va_arg(ap, const char *);
+				break;
+			case '\0':
+				format--;
+				break;
+			default:
+				break;
+				}
+			}
+		va_end(ap);
+
+#ifdef TARGET_KERNEL_ASP
+
+		return(syslog_wri_log(prio, &log));
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+		return(vwri_log(prio, &log));
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+		}
+	}
+
+#endif	/* of #ifdef USE_NET_CONS */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/net_cons.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/net_cons.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/net_cons.cfg	(revision 270)
@@ -0,0 +1,57 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  ãããã¯ã¼ã¯çµç±ã³ã³ã½ã¼ã«å
+¥åºå
+ *  ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_NET_CONS
+
+CRE_SEM(SEM_NET_CONS_PRINTF, { TA_TPRI, 1, 1 });
+CRE_SEM(SEM_NET_CONS_SEND,   { TA_TPRI, 1, 1 });
+
+#endif	/* of #ifdef USE_NET_CONS */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/net_cons.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/net_cons.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/net_cons.h	(revision 270)
@@ -0,0 +1,67 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  ãããã¯ã¼ã¯çµç±ã³ã³ã½ã¼ã«å
+¥åºå
+ */
+
+/*  TCP éåä¿¡ã¦ã£ã³ããããã¡ãµã¤ãº  */
+
+#define NET_CONS_SWBUF_SIZE	512
+#define NET_CONS_RWBUF_SIZE	512
+
+#ifndef _MACRO_ONLY
+
+/*  TCP éåä¿¡ã¦ã£ã³ããããã¡  */
+
+extern uint8_t net_cons_swbuf[];
+extern uint8_t net_cons_rwbuf[];
+
+/*  ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã®ã³ã¼ã«ããã¯é¢æ°  */
+
+extern ER	callback_nblk_net_cons(ID cepid, FN fncd, void *p_parblk);
+
+#endif /* _MACRO_ONLY */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/netapp.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/netapp.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/netapp.h	(revision 270)
@@ -0,0 +1,102 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _NETAPP_H_
+#define _NETAPP_H_
+
+/*
+ *  IPv4 ã¨ IPv6 ã®åæããã¯ã­
+ */
+
+#if defined(SUPPORT_INET4)
+#define PUT_IPADDR(p,a,w)	put_ipv4addr(p,a,w)
+#endif
+
+#if defined(SUPPORT_INET6)
+#define PUT_IPADDR(p,a,w)	put_ipv6addr(p,a,w)
+#endif
+
+/*
+ *  ã³ã³ã½ã¼ã«ã«ç¨ããã·ãªã¢ã«ãã¼ãçªå·
+ */
+
+#ifndef CONSOLE_PORTID
+
+#define	CONSOLE_PORTID		LOGTASK_PORTID
+
+#endif	/* of #ifndef CONSOLE_PORTID */
+
+/*
+ *  æ°å¤å¤æã®ããã®å¤æè¡¨
+ */
+
+extern const char radhex[];
+extern const char radHEX[];
+
+/*
+ *  é¢æ°
+ */
+
+extern char *skip_blanks (char *line);
+extern int_t cons_getline (ID portid, char *line, int_t size);
+extern char *get_int (int_t *val, char *line);
+extern char *get_xuint (uint_t *val, char *line);
+extern void cons_putchar (ID portid, char ch);
+extern int_t cons_getchar (ID portid);
+extern int_t cons_putnumber (ID portid, ulong_t val, int_t radix,
+                           const char *radchar, int_t width,
+                           bool_t minus, char padchar);
+extern void cons_printf (ID portid, const char *fmt, ...);
+extern int_t put_macaddr (ID portid, uint8_t *mac, int_t width);
+
+#if defined(SUPPORT_INET4)
+extern int_t put_ipv4addr (ID portid, T_IN4_ADDR *addr, int_t width);
+#endif
+
+#if defined(SUPPORT_INET6)
+extern int_t put_ipv6addr (ID portid, const T_IN6_ADDR *addr, int_t width);
+#endif
+
+#endif	/* of #ifndef _NETAPP_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/netapp_subr.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/netapp_subr.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/netapp_subr.c	(revision 270)
@@ -0,0 +1,772 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  ãããã¯ã¼ã¯å¿ç¨ãã­ã°ã©ã ãµãã¼ãã«ã¼ãã³
+ */
+
+#include <stdarg.h>
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <syssvc/serial.h>
+#include "kernel_cfg.h"
+#include "tinet_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+#include "tinet_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/net.h>
+
+#include <netinet/in.h>
+#include <netinet/in_itron.h>
+
+#include <netapp/netapp.h>
+#include <netapp/netapp_var.h>
+
+#ifdef USE_NETAPP_SUBR
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãã¸ã®æ¸å¼ä»æå­ååºåã©ã¤ãã©ãª
+ */
+
+#define EOF		(-1)
+
+/*
+ *  æ°å¤å¤æã®ããã®å¤æè¡¨
+ */
+
+const char radhex[] = "0123456789abcdef";
+const char radHEX[] = "0123456789ABCDEF";
+
+#ifndef USE_NET_CONS
+
+/*
+ *  cons_putchar -- ã·ãªã¢ã«ãã¼ãã¸ã®æå­åºå
+ */
+
+void
+cons_putchar (ID portid, char ch)
+{
+	serial_wri_dat(portid, &ch, 1);
+	}
+
+/*
+ *  cons_getchar -- ã·ãªã¢ã«ãã¼ãããã®æå­å
+¥å
+ */
+
+int_t
+cons_getchar (ID portid)
+{
+	char ch;
+
+	if (serial_rea_dat(portid, &ch, sizeof(ch)) > 0)
+		return ch;
+	else
+		return EOF;
+	}
+
+#endif	/* of #ifndef USE_NET_CONS */
+
+/*
+ *  cons_putnumber -- cons_printf ã®æ°å¤å¤æ
+ */
+
+int_t
+cons_putnumber(ID portid, ulong_t 	val, int_t radix,
+         const char *radchar, int_t width, bool_t minus, char padchar)
+{
+	char	digits[24];
+	int_t	ix, pad, pchars;
+	bool_t	left;
+
+	if (width < 0) {
+		width = -width;
+		left = true;
+		}
+	else
+		left = false;
+
+	ix = 0;
+	do {
+		digits[ix ++] = radchar[val % radix];
+		val /= radix;
+		} while (val != 0);
+
+	if (minus)
+		digits[ix ++] = '-';
+
+	if (width > ix)
+		pchars = width;
+	else
+		pchars = ix;
+
+	pad = ix;
+	if (!left)	/* å³è©°ã */
+		for ( ; pad < width; pad ++)
+			cons_putchar(portid, padchar);
+
+	while (ix -- > 0)
+		cons_putchar(portid, digits[ix]);
+
+	if (left)	/* å·¦è©°ã */
+		for ( ; pad < width; pad ++)
+			cons_putchar(portid, padchar);
+
+	return pchars;
+	}
+
+#if defined(SUPPORT_INET4)
+
+/*
+ *  put_ipv4addr -- IPv4 ã¢ãã¬ã¹åºå
+ */
+
+int_t
+put_ipv4addr (ID portid, T_IN4_ADDR *addr, int_t width)
+{
+	int_t len = 3;	/* 3 ã¯ '.' ã®æå­æ° */
+
+	len += cons_putnumber(portid, (*addr >> 24) & 0xff, 10, radhex, 0, false, ' '); 
+	cons_putchar(portid, '.');
+	len += cons_putnumber(portid, (*addr >> 16) & 0xff, 10, radhex, 0, false, ' '); 
+	cons_putchar(portid, '.');
+	len += cons_putnumber(portid, (*addr >>  8) & 0xff, 10, radhex, 0, false, ' '); 
+	cons_putchar(portid, '.');
+	len += cons_putnumber(portid,  *addr        & 0xff, 10, radhex, 0, false, ' '); 
+
+	for ( ; len < width; len ++)
+		cons_putchar(portid, ' ');
+
+	return len;
+	}
+
+#define PUT_IPADDR(p,a,w)	put_ipv4addr(p,a,w)
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+/*
+ *  ipv6addr -- IPv6 ã¢ãã¬ã¹åºå
+ */
+
+int_t
+put_ipv6addr (ID portid, const T_IN6_ADDR *addr, int_t width)
+{
+	int_t	len = 0, ix;
+	bool_t	omit = false, zero = false;
+
+	if (addr == NULL) {
+		cons_putchar(portid, '0');
+		cons_putchar(portid, ':');
+		cons_putchar(portid, ':');
+		cons_putchar(portid, '0');
+		len = 4;
+		}
+	else {
+		for (ix = 0; ix < sizeof(T_IN6_ADDR) / 2; ix ++) {
+			if (omit) {
+				len += cons_putnumber(portid, ntohs(addr->s6_addr16[ix]), 16, radhex, 0, false, ' '); 
+				if (ix < 7) {
+					cons_putchar(portid, ':');
+					len ++;
+					}
+				}
+			else if (ix > 0 && ix < 7 && addr->s6_addr16[ix] == 0)
+				zero = true;
+			else {
+				if (zero) {
+					omit = true;
+					cons_putchar(portid, ':');
+					len ++;
+					}
+				len += cons_putnumber(portid, ntohs(addr->s6_addr16[ix]), 16, radhex, 0, false, ' '); 
+				if (ix < 7) {
+					cons_putchar(portid, ':');
+					len ++;
+					}
+				}
+			}
+
+		for ( ; len < width; len ++)
+			cons_putchar(portid, ' ');
+		}
+	return len;
+	}
+
+#define PUT_IPADDR(p,a,w)	put_ipv6addr(p,a,w)
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+/*
+ *  put_macaddr -- MAC ã¢ãã¬ã¹åºå
+ */
+
+int_t
+put_macaddr (ID portid, uint8_t *mac, int_t width)
+{
+	int_t oct, len;
+
+	for (oct = 5; oct -- > 0; ) {
+		cons_putnumber(portid, *mac ++, 16, radhex, 2, false, '0'); 
+		cons_putchar(portid, ':');
+		}
+	cons_putnumber(portid, *mac, 16, radhex, 2, false, '0'); 
+
+	for (len = 17; len < width; len ++)
+		cons_putchar(portid, ' ');
+
+	return len;
+	}
+
+/*
+ *  cons_printf -- ã·ãªã¢ã«ãã¼ãã¸ã®æ¸å¼ä»æå­ååºå
+ */
+
+void
+cons_printf (ID portid, const char *fmt, ...)
+{
+	va_list	ap;
+	long_t	val;
+	char	padchar, *str;
+	int_t	ch, width, longflag, left;
+
+#if defined(SUPPORT_INET4)
+	T_IN4_ADDR	*addr;
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+	va_start(ap, fmt);
+	while ((ch = *fmt ++) != '\0') {
+		if (ch != '%') {		/* æ¸å¼æå®ä»¥å¤ */
+			cons_putchar(portid, (char)ch);
+			continue;
+			}
+
+		width = longflag = 0;
+		padchar = ' ';
+
+		if (ch == '-') {		/* å·¦è©°ã */
+			fmt ++;
+			left = -1;
+			}
+		else
+			left = 1;
+
+		if ((ch = *fmt ++) == '0') {	/* ä¸ä½æ¡ã® 0 */
+			padchar = '0';
+			ch = *fmt ++;
+			}
+
+		while ('0' <= ch && ch <= '9') {	/* åºåå¹
+ */
+			width = width * 10 + ch - '0';
+			ch = *fmt ++;
+			}
+
+		while (ch == 'l') {		/* long (long) ã®æå® */
+			longflag ++;
+			ch = *fmt ++;
+			}
+
+		switch (ch) {
+		case 'd':
+			val = longflag ? (ulong_t)va_arg(ap, long_t)
+			               : (ulong_t)va_arg(ap, int_t);
+			if (val >= 0)
+				cons_putnumber(portid,  val, 10, radhex, width * left, false, padchar);
+			else
+				cons_putnumber(portid, -val, 10, radhex, width * left, true, padchar);
+			break;
+
+		case 'u':
+			val = longflag ? (ulong_t)va_arg(ap, ulong_t)
+			               : (ulong_t)va_arg(ap, uint_t);
+			cons_putnumber(portid, val, 10, radhex, width * left, false, padchar);
+			break;
+
+		case 'x':
+			val = longflag ? (ulong_t)va_arg(ap, ulong_t)
+			               : (ulong_t)va_arg(ap, uint_t);
+			cons_putnumber(portid, val, 16, radhex, width * left, false, padchar);
+			break;
+
+		case 'X':
+			val = longflag ? (ulong_t)va_arg(ap, ulong_t)
+			               : (ulong_t)va_arg(ap, uint_t);
+			cons_putnumber(portid, val, 16, radHEX, width * left, false, padchar);
+			break;
+
+		case 'c':
+			ch = va_arg(ap, int_t);
+			cons_putchar(portid, (char)ch);
+			break;
+
+		case 's':
+			str = va_arg(ap, char*);
+			while ((ch = *str ++) != '\0') {
+				cons_putchar(portid, (char)ch);
+				width --;
+				}
+			while (width -- > 0)
+				cons_putchar(portid, ' ');
+			break;
+
+		case 'I':
+
+#if defined(SUPPORT_INET4)
+
+			addr = va_arg(ap, T_IN4_ADDR *);
+			put_ipv4addr(portid, addr, width);
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+			str = va_arg(ap, char*);
+			put_ipv6addr(portid, (T_IN6_ADDR *)str, width);
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+			break;
+
+		case 'M':
+			str = va_arg(ap, char*);
+			put_macaddr(portid, str, width);
+			break;
+
+		case '%':
+			cons_putchar(portid, '%');
+			break;
+
+		case '0':
+			fmt --;
+			break;
+
+		default:
+			break;
+			}
+
+		}
+	va_end(ap);
+	}
+
+/*
+ *  skip_blanks -- ç©ºç½ã¨ TAB ãã¹ã­ããããã
+ */
+
+char *
+skip_blanks (char *line)
+{
+	while (*line == ' ' || *line == '\t')
+		line ++;
+	return line;
+	}
+
+/*
+ *  get_ipv4addr -- æå­åã® IPv4 ã¢ãã¬ã¹ã T_IN4_ADDR å¤ã«å¤æããã
+ */
+
+char *
+get_ipv4addr (T_IN4_ADDR *addr, char *line)
+{
+	int_t oct;
+
+	*addr = 0;
+	while ('0' <= *line && *line <= '9') {
+		oct = 0;
+		while ('0' <= *line && *line <= '9')
+			oct = oct * 10 + (*line ++) - '0';
+		*addr = (*addr << 8) | (oct & 0xff);
+		if (*line == '.')
+			line ++;
+		}
+	return line;
+	}
+
+#if defined(SUPPORT_INET6)
+
+/*
+ *  get_ipv6addr -- æå­åã® IPv6 ã¢ãã¬ã¹ã T_IN6_ADDR å¤ã«å¤æããã
+ */
+
+char *
+get_ipv6addr (T_IN6_ADDR *addr, char *line)
+{
+	int_t word, ix = 0, omit = 0, six;
+
+	memset(addr, 0, sizeof(T_IN6_ADDR));
+	while (ix < 8 &&
+	       (('0' <= *line && *line <= '9') ||
+	        ('a' <= *line && *line <= 'f') ||
+	        ('A' <= *line && *line <= 'F'))) {
+		word = 0;
+		while (('0' <= *line && *line <= '9') ||
+ 	               ('a' <= *line && *line <= 'f') ||
+	               ('A' <= *line && *line <= 'F')) {
+			if      ('0' <= *line && *line <= '9')
+				word = (word << 4) + (*line ++) - '0';
+			else if ('a' <= *line && *line <= 'f')
+				word = (word << 4) + (*line ++) - 'a' + 10;
+			else if ('A' <= *line && *line <= 'F')
+				word = (word << 4) + (*line ++) - 'A' + 10;
+			}
+		addr->s6_addr16[ix ++] = htons(word);
+		if (*line == ':') {
+			line ++;
+			if (*line == ':') {
+				omit = ix;
+				line ++;
+				}
+			}
+		}
+	if (omit > 0) {
+		six = 7;
+		while (ix > omit) {
+			addr->s6_addr16[six --] = addr->s6_addr16[-- ix];
+			addr->s6_addr16[ ix   ] = 0;
+			}
+		}
+	return line;
+	}
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+/*
+ *  ãããã°è¡å
+¥å
+ */
+
+int_t
+cons_getline (ID portid, char *line, int_t size)
+{
+	int_t	ch, len;
+
+	len = size;
+	while (size > 0) {
+		if ((ch = cons_getchar(portid)) != EOF) {
+			if (ch == '\r') {
+				cons_putchar(portid, '\n');
+				break;
+				}
+			else if (ch == '\b') {
+				if (size < len) {
+					line --;
+					size ++;
+					}
+				}
+			else {
+				*line ++ = ch;
+				size --;
+				}
+			}
+		}
+	*line = '\0';
+	return len - size;
+	}
+
+/*
+ *  get_int -- æ´æ°å¤æ
+ */
+
+char *
+get_int (int_t *val, char *line)
+{
+	int_t sign = 1;
+
+	line = skip_blanks(line);
+	if (*line == '-') {
+		sign = -1;
+		line ++;
+		}
+	else if (*line == '+')
+		line ++;
+
+	line = skip_blanks(line);
+	*val = 0;
+	while ('0' <= *line && *line <= '9') {
+		*val = *val * 10 + *line - '0';
+		line ++;
+		}
+
+	*val = *val * sign;
+	return line;
+	}
+
+/*
+ *  get_xuint -- ç¬¦å·ãªãæ´æ° (16é²) å¤æ
+ */
+
+char *
+get_xuint (uint_t *val, char *line)
+{
+	line = skip_blanks(line);
+	*val = 0;
+	while (1) {
+		if      ('0' <= *line && *line <= '9')
+			*val = (*val << 4) + *line - '0';
+		else if ('a' <= *line && *line <= 'f')
+			*val = (*val << 4) + *line - 'a' + 10;
+		else if ('A' <= *line && *line <= 'F')
+			*val = (*val << 4) + *line - 'A' + 10;
+		else
+			break;
+		line ++;
+		}
+	return line;
+	}
+
+#ifdef USE_TCP_EXTENTIONS
+
+const ID vrid_tcp_rep[] =
+{
+#if NUM_VRID_TCP_REPS >= 1
+	TCP_RSV_REPID1,
+#endif
+#if NUM_VRID_TCP_REPS >= 2
+	TCP_RSV_REPID2,
+#endif
+	};
+
+const ID vrid_tcp_cep[] =
+{
+#if NUM_VRID_TCP_CEPS >= 1
+	TCP_RSV_CEPID1,
+#endif
+#if NUM_VRID_TCP_CEPS >= 2
+	TCP_RSV_CEPID2,
+#endif
+#if NUM_VRID_TCP_CEPS >= 3
+	TCP_RSV_CEPID3,
+#endif
+#if NUM_VRID_TCP_CEPS >= 4
+	TCP_RSV_CEPID4,
+#endif
+	};
+
+ID tskid_tcp_rep[NUM_VRID_TCP_REPS];
+ID tskid_tcp_cep[NUM_VRID_TCP_CEPS];
+
+/*
+ *  alloc_tcp_rep -- TCP åä»å£ãç²å¾ããã
+ */
+
+ER
+alloc_tcp_rep (ID *repid, ID tskid, T_TCP_CREP *crep)
+{
+	int_t	ix;
+
+	*repid = TCP_REP_NONE;
+	syscall(wai_sem(SEM_ALLOC_TCP_REP_LOCK));
+	for (ix = NUM_VRID_TCP_REPS; ix -- > 0; ) {
+		if (tskid_tcp_rep[ix] == TSK_NONE) {
+			*repid = vrid_tcp_rep[ix];
+			tskid_tcp_rep[ix] = tskid;
+			break;
+			}
+		}
+	syscall(sig_sem(SEM_ALLOC_TCP_REP_LOCK));
+
+	if (*repid == TCP_REP_NONE)
+		return E_NOEXS;
+	else
+		return TCP_CRE_REP(*repid, crep);
+	}
+
+/*
+ *  free_tcp_rep -- TCP åä»å£ãè§£æ¾ããã
+ */
+
+ER
+free_tcp_rep (ID repid, bool_t call_tcp_del_rep)
+{
+	int_t	ix;
+
+	syscall(wai_sem(SEM_ALLOC_TCP_REP_LOCK));
+	for (ix = NUM_VRID_TCP_REPS; ix -- > 0; ) {
+		if (repid == vrid_tcp_rep[ix]) {
+			tskid_tcp_rep[ix] = TSK_NONE;
+			break;
+			}
+		}
+	syscall(sig_sem(SEM_ALLOC_TCP_REP_LOCK));
+
+	if (call_tcp_del_rep)
+		return tcp_del_rep(repid);
+	else
+		return E_OK;
+	}
+
+/*
+ *  alloc_tcp_cep -- TCP éä¿¡ç«¯ç¹ãç²å¾ããã
+ */
+
+ER
+alloc_tcp_cep (ID *cepid, ID tskid, T_TCP_CCEP *ccep)
+{
+	int_t	ix;
+
+	*cepid = TCP_CEP_NONE;
+	syscall(wai_sem(SEM_ALLOC_TCP_CEP_LOCK));
+	for (ix = NUM_VRID_TCP_CEPS; ix -- > 0; ) {
+		if (tskid_tcp_cep[ix] == TSK_NONE) {
+			*cepid = vrid_tcp_cep[ix];
+			tskid_tcp_cep[ix] = tskid;
+			break;
+			}
+		}
+	syscall(sig_sem(SEM_ALLOC_TCP_CEP_LOCK));
+
+	if (*cepid == TCP_CEP_NONE)
+		return E_NOEXS;
+	else
+		return tcp_cre_cep(*cepid, ccep);
+	}
+
+/*
+ *  free_tcp_cep -- TCP éä¿¡ç«¯ç¹ãè§£æ¾ããã
+ */
+
+ER
+free_tcp_cep (ID cepid)
+{
+	int_t	ix;
+
+	syscall(wai_sem(SEM_ALLOC_TCP_CEP_LOCK));
+	for (ix = NUM_VRID_TCP_CEPS; ix -- > 0; ) {
+		if (cepid == vrid_tcp_cep[ix]) {
+			tskid_tcp_cep[ix] = TSK_NONE;
+			break;
+			}
+		}
+	syscall(sig_sem(SEM_ALLOC_TCP_CEP_LOCK));
+
+	return tcp_del_cep(cepid);
+	}
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+#ifdef USE_UDP_EXTENTIONS
+
+const ID vrid_udp_cep[] =
+{
+#if NUM_VRID_UDP_CEPS >= 1
+	UDP_RSV_CEPID1,
+#endif
+#if NUM_VRID_UDP_CEPS >= 2
+	UDP_RSV_CEPID2,
+#endif
+	};
+
+ID tskid_udp_cep[NUM_VRID_UDP_CEPS];
+
+/*
+ *  alloc_udp_cep -- UDP éä¿¡ç«¯ç¹ãç²å¾ããã
+ */
+
+ER
+alloc_udp_cep (ID *cepid, ID tskid, T_UDP_CCEP *ccep)
+{
+	int_t	ix;
+
+	*cepid = UDP_CEP_NONE;
+	syscall(wai_sem(SEM_ALLOC_UDP_CEP_LOCK));
+	for (ix = NUM_VRID_UDP_CEPS; ix -- > 0; ) {
+		if (tskid_udp_cep[ix] == TSK_NONE) {
+			*cepid = vrid_udp_cep[ix];
+			tskid_udp_cep[ix] = tskid;
+			break;
+			}
+		}
+	syscall(sig_sem(SEM_ALLOC_UDP_CEP_LOCK));
+
+	if (*cepid == UDP_CEP_NONE)
+		return E_NOEXS;
+	else
+		return UDP_CRE_CEP(*cepid, ccep);
+	}
+
+/*
+ *  free_udp_cep -- UDP éä¿¡ç«¯ç¹ãè§£æ¾ããã
+ */
+
+ER
+free_udp_cep (ID cepid, bool_t call_udp_del_cep)
+{
+	int_t	ix;
+
+	syscall(wai_sem(SEM_ALLOC_UDP_CEP_LOCK));
+	for (ix = NUM_VRID_UDP_CEPS; ix -- > 0; ) {
+		if (cepid == vrid_udp_cep[ix]) {
+			tskid_udp_cep[ix] = TSK_NONE;
+			break;
+			}
+		}
+	syscall(sig_sem(SEM_ALLOC_UDP_CEP_LOCK));
+
+	if (call_udp_del_cep)
+		return udp_del_cep(cepid);
+	else
+		return E_OK;
+	}
+
+#endif	/* of #ifdef USE_UDP_EXTENTIONS */
+
+#endif	/* of #ifdef USE_NETAPP_SUBR */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/netapp_subr.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/netapp_subr.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/netapp_subr.cfg	(revision 270)
@@ -0,0 +1,63 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  ãµã³ãã«ã¢ããªã±ã¼ã·ã§ã³å
+±é
+ *  ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_TCP_EXTENTIONS
+
+CRE_SEM(SEM_ALLOC_TCP_REP_LOCK,	{ TA_TPRI, 1, 1 });
+CRE_SEM(SEM_ALLOC_TCP_CEP_LOCK,	{ TA_TPRI, 1, 1 });
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+#ifdef USE_UDP_EXTENTIONS
+
+CRE_SEM(SEM_ALLOC_UDP_CEP_LOCK,	{ TA_TPRI, 1, 1 });
+
+#endif	/* of #ifdef USE_UDP_EXTENTIONS */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/netapp_var.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/netapp_var.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/netapp_var.h	(revision 270)
@@ -0,0 +1,149 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _NETAPP_VAR_H_
+#define _NETAPP_VAR_H_
+
+/*
+ *  ãã¯ã­å®ç¾©
+ */
+
+#if defined(SUPPORT_INET4)
+#define T_IPEP		T_IPV4EP
+#endif
+
+#if defined(SUPPORT_INET6)
+#define T_IPEP		T_IPV6EP
+#endif
+
+/*
+ *  ãããã¯ã¼ã¯çµç±ã³ã³ã½ã¼ã«å
+¥åºå
+ */
+
+#ifdef USE_NET_CONS
+
+/* ãªãã¼ã  */
+
+#define syslog		net_syslog
+#define serial_ctl_por	net_serial_ctl_por
+
+/* é¢æ°ã·ãã¥ã¬ã¼ã·ã§ã³ãã¯ã­ */
+
+#define FLUSH_SND_BUFF()	flush_snd_buff()
+#define WAI_NET_CONS_PRINTF()	syscall(wai_sem(SEM_NET_CONS_PRINTF))
+#define SIG_NET_CONS_PRINTF()	sig_sem(SEM_NET_CONS_PRINTF)
+
+#else	/* of #ifdef USE_NET_CONS */
+
+/* é¢æ°ã·ãã¥ã¬ã¼ã·ã§ã³ãã¯ã­ */
+
+#define FLUSH_SND_BUFF()
+#define WAI_NET_CONS_PRINTF()
+#define SIG_NET_CONS_PRINTF()
+
+#endif	/* of #ifdef USE_NET_CONS */
+
+/*
+ *  é¢æ°
+ */
+
+extern const char *in_strtfn (FN fncd);
+extern const char *itron_strerror (ER ercd);
+extern ER	net_syslog(uint_t prio, const char *format, ...) throw();
+extern ER	net_serial_ctl_por(ID portid, uint_t ioctl) throw();
+extern void	flush_snd_buff (void);
+extern ER	discon_net_cons (void);
+extern void	wup_net_cons (void);
+extern ER	alloc_tcp_rep (ID *repid, ID tskid, T_TCP_CREP *crep);
+extern ER	free_tcp_rep (ID repid, bool_t call_tcp_del_rep);
+extern ER	alloc_tcp_cep (ID *cepid, ID tskid, T_TCP_CCEP *ccep);
+extern ER	free_tcp_cep (ID cepid);
+extern ER	alloc_udp_cep (ID *cepid, ID tskid, T_UDP_CCEP *ccep);
+extern ER	free_udp_cep (ID cepid, bool_t call_udp_del_cep);
+
+#if defined(SUPPORT_INET4)
+
+#define TCP_CRE_REP(i,r)	tcp_cre_rep(i,r)
+#define TCP_CRE_CEP(i,c)	tcp_cre_cep(i,c)
+#define UDP_CRE_CEP(i,c)	udp_cre_cep(i,c)
+#define TCP_ACP_CEP(c,r,d,t)	tcp_acp_cep(c,r,d,t)
+#define TCP_CON_CEP(c,m,d,t)	tcp_con_cep(c,m,d,t)
+
+#define UDP_SND_DAT(c,d,b,l,t)	udp_snd_dat(c,d,b,l,t)
+#define UDP_RCV_DAT(c,d,b,l,t)	udp_rcv_dat(c,d,b,l,t)
+
+#define IP2STR(s,a)		ip2str(s,a)
+
+#define GET_IPADDR(a,l)		get_ipv4addr(a,l)
+#define PING(a,t,l)		ping4(a,t,l)
+
+extern void ping4 (T_IN4_ADDR *addr, uint_t tmo, uint_t len);
+extern char *get_ipv4addr (T_IN4_ADDR *addr, char *line);
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+#define TCP_CRE_REP(i,r)	tcp6_cre_rep(i,r)
+#define TCP_CRE_CEP(i,c)	tcp6_cre_cep(i,c)
+#define UDP_CRE_CEP(i,c)	udp6_cre_cep(i,c)
+#define TCP_ACP_CEP(c,r,d,t)	tcp6_acp_cep(c,r,d,t)
+#define TCP_CON_CEP(c,m,d,t)	tcp6_con_cep(c,m,d,t)
+
+#define UDP_SND_DAT(c,d,b,l,t)	udp6_snd_dat(c,d,b,l,t)
+#define UDP_RCV_DAT(c,d,b,l,t)	udp6_rcv_dat(c,d,b,l,t)
+
+#define IP2STR(s,a)		ipv62str(s,a)
+
+#define GET_IPADDR(a,l)		get_ipv6addr(a,l)
+#define PING(a,t,l)		ping6(a,t,l)
+
+extern void ping6 (T_IN6_ADDR *addr, uint_t tmo, uint_t len);
+extern char *get_ipv6addr (T_IN6_ADDR *addr, char *line);
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+#endif	/* of #ifndef _NETAPP_VAR_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/ping.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/ping.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/ping.c	(revision 270)
@@ -0,0 +1,171 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  ping -- ICMP ECHO ã¡ãã»ã¼ã¸ãéä¿¡ããã
+ */
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/ppp_var.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet/ip_icmp.h>
+#include <netinet/icmp_var.h>
+
+#ifdef USE_PING
+
+/*
+ *  å¤æ°
+ */
+
+static uint16_t	icmp_id = 0;
+static uint16_t	curr_icmp_id;
+static uint16_t	curr_icmp_len;
+static SYSTIM	icmp_start_time;
+
+/*
+ *  icmp_reply_timeout -- ICMP REPLY ã¿ã¤ã ã¢ã¦ãå¦ç
+ */
+
+static void
+icmp_reply_timeout (void *arg)
+{
+	syslog(LOG_NOTICE, "[PING] request timeout.");
+	}
+
+/*
+ *  icmp_echo_reply -- ICMP ECHO REPLY ã¡ãã»ã¼ã¸ãå¦çããã
+ */
+
+void
+icmp_echo_reply (T_NET_BUF *input, uint_t ihoff)
+{
+	SYSTIM time;
+
+	syscall(get_tim(&time));
+	untimeout(icmp_reply_timeout, NULL);
+	syslog(LOG_NOTICE, "[PING] reply, %d [ms].",
+	                   (time - icmp_start_time) * 1000 / SYSTIM_HZ);
+	}
+
+/*
+ *  ping4 -- ICMP ECHO ã¡ãã»ã¼ã¸ãéä¿¡ããã
+ */
+
+void
+ping4 (T_IN4_ADDR *addr, uint_t tmo, uint_t len)
+{
+	T_ICMP4_HDR	*icmp4h;
+	T_NET_BUF	*output;
+	uint8_t		*sdu;
+	int_t		ix;
+
+	/* éä¿¡ç¨ã® IP ãã¼ã¿ã°ã©ã ãç²å¾ããã*/
+	if (in4_get_datagram(&output, ICMP4_HDR_SIZE + len, 0,
+	                     addr, NULL, IPPROTO_ICMP,
+	                     IP4_DEFTTL, NBA_SEARCH_ASCENT, TMO_FEVR) != E_OK)
+		return;
+
+	/* ICMP ããããè¨­å®ããã*/
+	icmp4h			= GET_ICMP4_HDR(output, IF_IP4_ICMP4_HDR_OFFSET);
+	icmp4h->type		= ICMP4_ECHO_REQUEST;
+	icmp4h->code		= 0;
+	icmp4h->data.id_seq.id	= htons(icmp_id);
+	icmp4h->data.id_seq.seq	= 0;
+
+	/* ãã¼ã¿ãè¨­å®ããã*/
+	sdu = GET_ICMP4_SDU(output, IF_IP4_ICMP4_HDR_OFFSET) + len;
+	for (ix = len; ix -- > 0; )
+		*-- sdu = ('0' + icmp_id + ix) & 0xff;
+
+	/* ãã§ãã¯ãµã ãè¨ç®ããã*/
+	icmp4h->sum = 0;
+	icmp4h->sum = in_cksum(icmp4h, ICMP4_HDR_SIZE + len);
+
+	/* å¿ç­ãã§ãã¯ç¨ã®å¤æ°ãè¨­å®ããã*/
+	curr_icmp_id  = icmp_id ++;
+	curr_icmp_len = len;
+
+	NET_COUNT_MIB(icmp_stats.icmpOutMsgs, 1);
+	NET_COUNT_MIB(icmp_stats.icmpOutEchos, 1);
+
+	/* éä¿¡å¾ãç¾å¨ã®æéãè¨æ¶ããã¿ã¤ã ã¢ã¦ããè¨­å®ããã*/
+	ip_output(output, TMO_FEVR);
+
+	syscall(get_tim(&icmp_start_time));
+	timeout(icmp_reply_timeout, NULL, tmo * NET_TIMER_HZ);
+
+	}
+
+#endif	/* of #ifdef USE_PING */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/ping6.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/ping6.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/ping6.c	(revision 270)
@@ -0,0 +1,204 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  ping6 -- ICMPv6 ECHO ã¡ãã»ã¼ã¸ãéä¿¡ããã
+ */
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/ppp_var.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet6/nd6.h>
+
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet/icmp6.h>
+
+#include <net/if6_var.h>
+
+#ifdef USE_PING
+
+/*
+ *  å¤æ°
+ */
+
+static uint16_t	send_icmp6_id = 0;
+static uint16_t	curr_icmp6_id;
+static uint16_t	curr_icmp6_size;
+static uint16_t	reply_count;
+static SYSTIM	icmp6_start_time;
+
+/*
+ *  icmp6_reply_timeout -- ICMP6 REPLY ã¿ã¤ã ã¢ã¦ãå¦ç
+ */
+
+static void
+icmp6_reply_timeout (void *arg)
+{
+	if (reply_count == 0)
+		syslog(LOG_NOTICE, "[PING6] request timeout.");
+	}
+
+/*
+ *  icmp6_echo_reply -- ICMP6 ECHO REPLY ã¡ãã»ã¼ã¸ãå¦çããã
+ */
+
+void
+icmp6_echo_reply (T_NET_BUF *input, uint_t ihoff)
+{
+	T_IP6_HDR	*ip6h;
+	SYSTIM		time;
+
+	syscall(get_tim(&time));
+	ip6h  = GET_IP6_HDR(input);
+
+	syslog(LOG_NOTICE, "[PING6] reply: %5d [ms] from: %s",
+	                   (time - icmp6_start_time) * 1000 / SYSTIM_HZ,
+	                   ipv62str(NULL, &ip6h->src));
+	reply_count ++;
+	}
+
+/*
+ *  ping6 -- ICMP ECHO ã¡ãã»ã¼ã¸ãéä¿¡ããã
+ */
+
+void
+ping6 (T_IN6_ADDR *addr, uint_t tmo, uint_t size)
+{
+	T_IFNET		*ifp = IF_GET_IFNET();
+	T_ICMP6_HDR	*icmp6h;
+	T_NET_BUF	*output;
+	T_IN6_IFADDR	*ia;
+	int_t		ix;
+	uint16_t	ipflags = 0;
+	uint8_t		*sdu;
+
+	/*
+	 *  å®å
+ã¢ãã¬ã¹ã«ãµããããéä¿¡å
+ã¢ãã¬ã¹ãã
+	 *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ããæ¢ç´¢ãã¦å©ç¨ããã
+	 */
+	if ((ia = in6_ifawithifp(ifp, addr)) == NULL)
+		return;
+
+	if (IN6_IS_ADDR_MULTICAST(addr))
+		ipflags = IPV6_OUT_SET_HOP_LIMIT(IPV6_OUT_FLG_HOP_LIMIT, IPV6_DEFHLIM);
+
+	/* éä¿¡ç¨ã® IP ãã¼ã¿ã°ã©ã ãç²å¾ããã*/
+	if (in6_get_datagram(&output, ICMP6_HDR_SIZE + size, 0,
+	                     addr, &ia->addr, IPPROTO_ICMPV6,
+	                     IPV6_DEFHLIM, NBA_SEARCH_ASCENT, TMO_FEVR) != E_OK)
+		return;
+
+	/* ICMP ããããè¨­å®ããã*/
+	icmp6h           = GET_ICMP6_HDR(output, IF_IP6_ICMP6_HDR_OFFSET);
+	icmp6h->type     = ICMP6_ECHO_REQUEST;
+	icmp6h->code     = 0;
+	icmp6h->icmp6_id = htons(send_icmp6_id);
+	icmp6h->icmp6_seq= 0;
+
+	/* ãã¼ã¿ãè¨­å®ããã*/
+	sdu = GET_ICMP6_SDU(output, IF_IP6_ICMP6_HDR_OFFSET) + size;
+	for (ix = size; ix -- > 0; )
+		*-- sdu = ('0' + send_icmp6_id + ix) & 0xff;
+
+	/* ãã§ãã¯ãµã ãè¨ç®ããã*/
+	icmp6h->sum = 0;
+	icmp6h->sum = in6_cksum(output, IPPROTO_ICMPV6,
+	                        (uint8_t*)icmp6h - output->buf, ICMP6_HDR_SIZE + size);
+
+	/* å¿ç­ãã§ãã¯ç¨ã®å¤æ°ãè¨­å®ããã*/
+	curr_icmp6_id   = send_icmp6_id ++;
+	curr_icmp6_size = size;
+
+	reply_count = 0;
+
+	syslog(LOG_NOTICE, "[PING6] send: TMO:%d, SIZE:%d, to: %s, from %s",
+	                   tmo, size,
+	                   ipv62str(NULL, addr), ipv62str(NULL, &ia->addr));
+
+	/* éä¿¡å¾ãç¾å¨ã®æéãè¨æ¶ããã¿ã¤ã ã¢ã¦ããè¨­å®ããã*/
+	ip6_output(output, ipflags, TMO_FEVR);
+	NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpOutMsgs, 1);
+	NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpOutEchos, 1);
+
+	syscall(get_tim(&icmp6_start_time));
+	timeout(icmp6_reply_timeout, NULL, tmo * NET_TIMER_HZ);
+
+	}
+
+#endif	/* of #ifdef USE_PING */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_discard_cli.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_discard_cli.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_discard_cli.c	(revision 270)
@@ -0,0 +1,418 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  TCP DISCARD ã¯ã©ã¤ã¢ã³ã
+ *
+ *    ã»ãã³ãã­ãã­ã³ã°ã³ã¼ã«
+ *    ã»IPv4
+ *    ã»IPv6
+ */
+
+#include <stdlib.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_var.h>
+#include <net/net_timer.h>
+
+#include <netinet/in.h>
+#include <netinet/in_itron.h>
+#include <netinet/ip.h>
+#include <netinet/ip6.h>
+#include <netinet/tcp.h>
+
+#include <netapp/netapp.h>
+#include <netapp/netapp_var.h>
+#include <netapp/discard.h>
+
+#ifdef USE_TCP_DISCARD_CLI
+
+/* discard ãµã¼ãã®ãã¼ãçªå· */
+
+#define DISCARD_SRV_PORTNO	UINT_C(9)
+
+/* è¡¨ç¤º */
+
+/*#define SHOW_RCV_RANGE*/
+
+/*
+ *  ãããã¡ãµã¤ãºã®å®ç¾©
+ */
+
+#define NUM_DISCARD		5
+#define NUM_REP_PAT		40
+#define PAT_BEGIN		' '
+#define PAT_END			'~'
+#define SND_BUF_SIZE		((PAT_END - PAT_BEGIN + 1) * NUM_REP_PAT)
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+bool_t tcp_discard_cli_valid;
+
+/* TCP éåä¿¡ã¦ã£ã³ããããã¡ */
+
+#ifndef TCP_CFG_SWBUF_CSAVE_ONLY
+uint8_t tcp_discard_cli_swbuf[TCP_DISCARD_CLI_SWBUF_SIZE];
+#endif
+
+#ifdef USE_TCP_NON_BLOCKING
+
+/*
+ *  å¤æ°
+ */
+
+static T_IPEP		nblk_src = {
+				IP_ADDRANY,
+				TCP_PORTANY,
+				};
+static T_IPEP		nblk_dst;
+static ER_UINT		nblk_error;
+
+/*
+ *  ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã®ã³ã¼ã«ããã¯é¢æ°
+ */
+
+ER
+callback_nblk_tcp_discard_cli (ID cepid, FN fncd, void *p_parblk)
+{
+	ER	error = E_OK;
+
+	nblk_error = *(ER*)p_parblk;
+
+	switch (fncd) {
+
+	case TFN_TCP_CON_CEP:
+		syscall(sig_sem(SEM_TCP_DISCARD_CLI_NBLK_READY));
+		break;
+
+	case TFN_TCP_CLS_CEP:
+		if (nblk_error < 0)
+			syslog(LOG_NOTICE, "[TDC:%02d CBN] close error: %s", cepid, itron_strerror(nblk_error));
+		syscall(sig_sem(SEM_TCP_DISCARD_CLI_NBLK_READY));
+		break;
+
+	case TFN_TCP_ACP_CEP:
+	case TFN_TCP_SND_DAT:
+	case TFN_TCP_GET_BUF:
+	case TFN_TCP_SND_OOB:
+	default:
+		error = E_PAR;
+		break;
+		}
+	return error;
+	}
+
+/*
+ *  send_tcp_discard -- DISCARD/TCP ãµã¼ãã«ã¡ãã»ã¼ã¸ãéä¿¡ããã
+ */
+
+static void
+send_tcp_discard (ID cepid, T_IN_ADDR *ipaddr, uint16_t portno)
+{
+	static char smsg[SND_BUF_SIZE];
+
+	ER_UINT		slen;
+	ER		error;
+	SYSTIM		time;
+	uint32_t	total;
+	uint16_t	soff, discard, rep, scount;
+	uint8_t		pat, *p;
+
+	nblk_dst.ipaddr = *ipaddr;
+	nblk_dst.portno = portno;
+
+	p = smsg;
+	for (rep = NUM_REP_PAT; rep -- > 0; )
+		for (pat = PAT_BEGIN; pat <= PAT_END; pat ++)
+			*p ++ = pat;
+
+	if ((error = TCP_CON_CEP(cepid, &nblk_src, &nblk_dst, TMO_NBLK)) != E_WBLK) {
+		syslog(LOG_NOTICE, "[TDC:%02d SND] connect error: %s", cepid, itron_strerror(error));
+		return;
+		}
+
+	/* æ¥ç¶ãå®äºããã¾ã§å¾
+ã¤ã*/
+	syscall(wai_sem(SEM_TCP_DISCARD_CLI_NBLK_READY));
+
+	if (nblk_error != E_OK)
+		syslog(LOG_NOTICE, "[TDC:%02d SND] connect error: %s", cepid, itron_strerror(nblk_error));
+	else {
+		get_tim(&time);
+		syslog(LOG_NOTICE, "[TDC:%02d SND] connecting: %6ld, to:   %s.%d",
+		                   cepid, time / SYSTIM_HZ, IP2STR(NULL, ipaddr), nblk_dst.portno);
+
+		scount = total = 0;
+		for (discard = NUM_DISCARD; discard -- > 0; ) {
+			soff = 0;
+			while (soff < SND_BUF_SIZE) {
+				if ((slen = tcp_snd_dat(cepid, smsg + soff, sizeof(smsg) - soff, TMO_FEVR)) < 0) {
+					syslog(LOG_NOTICE, "[TDC:%02d SND] send error: %s",
+					                   cepid, itron_strerror(slen));
+					goto cls_ret;
+					}
+				soff  += (uint16_t)slen;
+				total +=     slen;
+				scount ++;
+
+#ifdef SHOW_RCV_RANGE
+				syslog(LOG_NOTICE, "[TDC:%02d SND] snd: %2d, len: %4d, off: %4d",
+				                   cepid, scount, (uint16_t)slen, soff);
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+
+				syscall(dly_tsk(500 + net_rand() % SYSTIM_HZ));
+				}
+			}
+
+	cls_ret:
+		get_tim(&time);
+		syslog(LOG_NOTICE, "[TDC:%02d SND] finished:   %6ld, snd: %4d,            len: %ld",
+		                   cepid, time / SYSTIM_HZ, scount, total);
+
+		if ((error = tcp_sht_cep(cepid)) < 0)
+			syslog(LOG_NOTICE, "[TDC:%02d SND] shutdown error: %s", cepid, itron_strerror(error));
+
+		if ((error = tcp_cls_cep(cepid, TMO_NBLK)) != E_WBLK)
+			syslog(LOG_NOTICE, "[TDC:%02d SND] close error: %s", cepid, itron_strerror(error));
+
+		/* éæ¾ãå®äºããã¾ã§å¾
+ã¤ã*/
+		syscall(wai_sem(SEM_TCP_DISCARD_CLI_NBLK_READY));
+		}
+	}
+
+#else	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+/*
+ *  send_tcp_discard -- DISCARD/TCP ãµã¼ãã«ã¡ãã»ã¼ã¸ãéä¿¡ããã
+ */
+
+static void
+send_tcp_discard (ID cepid, T_IN_ADDR *ipaddr, uint16_t portno)
+{
+	static char smsg[SND_BUF_SIZE];
+	static T_IPEP src = {
+		IP_ADDRANY,
+		TCP_PORTANY,
+		};
+
+	T_IPEP		dst;
+	ER_UINT		slen;
+	ER		error;
+	SYSTIM		time;
+	uint16_t	pat, soff, discard, rep, scount, total;
+	uint8_t		*p;
+
+	dst.ipaddr = *ipaddr;
+	dst.portno = portno;
+
+	p = smsg;
+	for (rep = NUM_REP_PAT; rep -- > 0; )
+		for (pat = PAT_BEGIN; pat <= PAT_END; pat ++)
+			*p ++ = pat;
+
+	if ((error = TCP_CON_CEP(cepid, &src, &dst, 60 * 1000)) != E_OK) {
+		syslog(LOG_NOTICE, "[TDC:%02d SND] connect error: %s", cepid, itron_strerror(error));
+		return;
+		}
+
+	get_tim(&time);
+	syslog(LOG_NOTICE, "[TDC:%02d SND] connecting: %6ld, to:   %s.%d",
+	                   cepid, time / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno);
+
+	scount = total = 0;
+	for (discard = NUM_DISCARD; discard -- > 0; ) {
+		soff = 0;
+		while (soff < SND_BUF_SIZE) {
+			if ((slen = tcp_snd_dat(cepid, smsg + soff, sizeof(smsg) - soff, TMO_FEVR)) < 0) {
+				syslog(LOG_NOTICE, "[TDC:%02d SND] send error: %s", cepid, itron_strerror(slen));
+				goto cls_ret;
+				}
+			soff  += (uint16_t)slen;
+			total +=     slen;
+			scount ++;
+
+#ifdef SHOW_RCV_RANGE
+			syslog(LOG_NOTICE, "[TDC:%02d SND] snd: %3d, len: %4d, off: %4d",
+			                   cepid, scount, (uint16_t)slen, soff);
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+
+			syscall(dly_tsk(500 + net_rand() % SYSTIM_HZ));
+			}
+		}
+
+cls_ret:
+	get_tim(&time);
+	syslog(LOG_NOTICE, "[TDC:%02d SND] finished:   %6ld, snd: %4d,            len: %ld",
+	                   cepid, time / SYSTIM_HZ, scount, total);
+
+	if ((error = tcp_sht_cep(cepid)) < 0)
+		syslog(LOG_NOTICE, "[TDC:%02d SND] shutdown error: %s", cepid, itron_strerror(error));
+
+	if ((error = tcp_cls_cep(cepid, TMO_FEVR)) < 0)
+		syslog(LOG_NOTICE, "[TDC:%02d SND] close error: %s", cepid, itron_strerror(error));
+	}
+
+#endif	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+void
+tcp_discard_cli_task (intptr_t exinf)
+{
+	T_IN_ADDR	addr;
+	ID		tskid, cepid;
+	int_t		rep;
+	uint32_t	count;
+	uint16_t	portno;
+	uint8_t		*line;
+
+#ifdef USE_TCP_EXTENTIONS
+
+	ER		error;
+	T_TCP_CCEP	ccep;
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[TCP DISCARD CLI:%d,%d] started.", tskid, (ID)exinf);
+	while (true) {
+		if (rcv_dtq(DTQ_TCP_DISCARD_CLI, (intptr_t*)&line) == E_OK) {
+			line = skip_blanks(GET_IPADDR(&addr, skip_blanks(line)));	/* IP Address */
+
+			if ('0' <= *line && *line <= '9') {				/* Port No */
+				line = get_int(&rep, line);
+				portno = (uint16_t)rep;
+				}
+			else {
+				line ++;
+				portno = DISCARD_SRV_PORTNO;
+				}
+
+			line = skip_blanks(line);
+			if ('0' <= *line && *line <= '9')				/* Repeat */
+				line = get_int(&rep, line);
+			else
+				rep = 1;
+
+#ifdef USE_TCP_EXTENTIONS
+
+			ccep.cepatr = 0;
+			ccep.sbufsz = TCP_DISCARD_CLI_SWBUF_SIZE;
+			ccep.rbufsz = 0;
+			ccep.rbuf = NADR;
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+			ccep.sbuf = NADR;
+#else
+			ccep.sbuf = tcp_discard_cli_swbuf;
+#endif
+#ifdef USE_TCP_NON_BLOCKING
+			ccep.callback = (FP)callback_nblk_tcp_discard_cli;
+#else
+			ccep.callback = NULL;
+#endif
+
+			if ((error = alloc_tcp_cep(&cepid, tskid, &ccep)) != E_OK) {
+				syslog(LOG_NOTICE, "[TDC:%02d TSK] CEP create error: %s", cepid, itron_strerror(error));
+				continue;
+				}
+
+#else	/* of #ifdef USE_TCP_EXTENTIONS */
+
+			cepid = (ID)exinf;
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+			tcp_discard_cli_valid = true;
+			for (count = rep; count -- > 0; ) {
+				if (!tcp_discard_cli_valid) {
+					syslog(LOG_NOTICE, "[TDC:%02d TSK] canceled.", (ID)exinf);
+					break;
+					}
+				syslog(LOG_NOTICE, "[TDC:%02d TSK] start:              repeat: %d/%d",
+				                   (ID)exinf, rep - count, rep);
+				send_tcp_discard(cepid, &addr, portno);
+				syslog(LOG_NOTICE, "[TDC:%02d TSK] finished:           repeat: %d/%d",
+				                   (ID)exinf, rep - count, rep);
+				syscall(dly_tsk(500 + net_rand() % SYSTIM_HZ));
+				}
+
+#ifdef USE_TCP_EXTENTIONS
+
+			if ((error = free_tcp_cep(cepid)) != E_OK)
+				syslog(LOG_NOTICE, "[TDC:%02d TSK] CEP delete error: %s", cepid, itron_strerror(error));
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+			}
+		}
+	}
+
+#endif	/* of #ifdef USE_TCP_DISCARD_CLI */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_discard_cli.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_discard_cli.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_discard_cli.cfg	(revision 270)
@@ -0,0 +1,91 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  TCP DISCARD ã¯ã©ã¤ã¢ã³ã
+ *  ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_TCP_DISCARD_CLI
+
+/* ã¿ã¹ã¯ */
+
+#ifdef USE_TCP_EXTENTIONS
+
+CRE_TSK(TCP_DISCARD_CLI_TASK, {
+	TA_HLNG|TA_ACT,
+	0,
+	tcp_discard_cli_task,
+	TCP_DISCARD_CLI_MAIN_PRIORITY,
+	TCP_DISCARD_CLI_STACK_SIZE,
+	NULL
+	});
+
+#else	/* of #ifdef USE_TCP_EXTENTIONS */
+
+CRE_TSK(TCP_DISCARD_CLI_TASK, {
+	TA_HLNG|TA_ACT,
+	TCP_DISCARD_CLI_CEPID,
+	tcp_discard_cli_task,
+	TCP_DISCARD_CLI_MAIN_PRIORITY,
+	TCP_DISCARD_CLI_STACK_SIZE,
+	NULL
+	});
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+/* ã³ãã³ãã­ã¥ã¼ */
+
+CRE_DTQ(DTQ_TCP_DISCARD_CLI,  { TA_TFIFO, 1, NULL });
+
+/* ã»ããã© */
+
+#ifdef USE_TCP_NON_BLOCKING
+
+CRE_SEM(SEM_TCP_DISCARD_CLI_NBLK_READY,	{ TA_TPRI, 0, 1 });
+
+#endif	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#endif	/* of #ifdef USE_TCP_DISCARD_CLI */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_discard_srv.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_discard_srv.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_discard_srv.c	(revision 270)
@@ -0,0 +1,358 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  DISCARD ãµã¼ã
+ *
+ *    ã»çã³ãã¼ API
+ *    ã»IPv4
+ *    ã»IPv6
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "tinet_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <t_services.h>
+#include "tinet_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_timer.h>
+
+#include <netinet/in.h>
+#include <netinet/in_itron.h>
+#include <netinet/ip.h>
+#include <netinet/ip6.h>
+#include <netinet/tcp.h>
+
+#include <netapp/netapp.h>
+#include <netapp/netapp_var.h>
+#include <netapp/discard.h>
+
+#ifdef USE_TCP_DISCARD_SRV
+
+/*
+ *  è¡¨ç¤º
+ */
+
+//#define SHOW_RCV_RANGE
+//#define SHOW_RCV_DATA
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+/* TCP éåä¿¡ã¦ã£ã³ããããã¡ */
+
+#ifndef TCP_CFG_RWBUF_CSAVE_ONLY
+uint8_t tcp_discard_srv_rwbuf[TCP_DISCARD_SRV_RWBUF_SIZE];
+#endif
+
+/*
+ *  TCP DISCARD ãµã¼ãã¿ã¹ã¯
+ */
+
+#define BUF_SIZE	TCP_DISCARD_SRV_RWBUF_SIZE
+
+#ifdef USE_COPYSAVE_API
+
+static ER
+tcp_discard_srv (ID cepid, ID repid)
+{
+	T_IPEP		dst;
+	ER_UINT		rlen;
+	ER		error;
+	SYSTIM		time;
+	uint32_t	total;
+	uint16_t	count;
+	uint8_t		*buf;
+
+#ifdef SHOW_RCV_DATA
+	uint_t	ix;
+#endif	/* of #ifdef SHOW_RCV_DATA */
+
+	if ((error = TCP_ACP_CEP(cepid, repid, &dst, TMO_FEVR)) != E_OK) {
+		syslog(LOG_NOTICE, "[TDS:%02d ACP] accept error: %s", cepid, itron_strerror(error));
+		return error;
+		}
+
+#ifdef USE_TCP_EXTENTIONS
+	if ((error = free_tcp_rep(repid, true)) != E_OK) {
+		syslog(LOG_NOTICE, "[TDS:%02d DEL] REP delete error: %s", cepid, itron_strerror(error));
+		return error;
+		}
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+	count = total = 0;
+	get_tim(&time);
+	syslog(LOG_NOTICE, "[TDS:%02d RCV] connected:  %6ld, from: %s.%d",
+	                   cepid, time / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno);
+	while ((rlen = tcp_rcv_buf(cepid, (void*)&buf, TMO_FEVR)) > 0) {
+		count ++;
+
+#ifdef SHOW_RCV_RANGE
+		syslog(LOG_NOTICE, "[TDS:%02d RCV] count: %4d, len: %4d, data: %02x -> %02x",
+		       cepid, count, (uint16_t)rlen, *buf, *(buf + rlen - 1));
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+
+#ifdef SHOW_RCV_DATA
+		for (ix = 0; ix < rlen; ix ++)
+			cons_putchar(CONSOLE_PORTID,  *(buf + ix));
+#endif	/* of #ifdef SHOW_RCV_DATA */
+
+		if ((error = tcp_rel_buf(cepid, rlen)) != E_OK) {
+			syslog(LOG_NOTICE, "[TDS:%02d RCV] rel buf error: %s",
+			                    cepid, itron_strerror(error));
+			rlen = 0;
+			break;
+			}
+		total += rlen;
+		}
+
+	if (rlen != 0)
+		syslog(LOG_NOTICE, "[TDS:%02d RCV] recv buf error: %s", cepid, itron_strerror(rlen));
+
+	if ((error = tcp_sht_cep(cepid)) != E_OK)
+		syslog(LOG_NOTICE, "[TDS:%02d RCV] shutdown error: %s", cepid, itron_strerror(error));
+
+	if ((error = tcp_cls_cep(cepid, TMO_FEVR)) != E_OK)
+		syslog(LOG_NOTICE, "[TDS:%02d RCV] close error: %s", cepid, itron_strerror(error));
+
+	get_tim(&time);
+	syslog(LOG_NOTICE, "[TDS:%02d RCV] finished:   %6ld,            rcv: %4d, len: %ld",
+	                   cepid, time / SYSTIM_HZ, count, total);
+
+	return error;
+	}
+
+#else	/* of #ifdef USE_COPYSAVE_API */
+
+static ER
+tcp_discard_srv (ID cepid, ID repid)
+{
+	static char buffer[BUF_SIZE];
+
+	T_IPEP		dst;
+	ER_UINT		rlen;
+	ER		error;
+	SYSTIM		time;
+	uint32_t	total;
+	uint16_t	count;
+	uint8_t		*buf = buffer;
+
+	if ((error = TCP_ACP_CEP(cepid, repid, &dst, TMO_FEVR)) != E_OK) {
+		syslog(LOG_NOTICE, "[TDS:%02d RCV] accept error: %s", cepid, itron_strerror(error));
+		return error;
+		}
+
+#ifdef USE_TCP_EXTENTIONS
+	if ((error = free_tcp_rep(repid, true)) != E_OK) {
+		syslog(LOG_NOTICE, "[TDS:%02d DEL] REP delete error: %s", cepid, itron_strerror(error));
+		return error;
+		}
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+	count = total = 0;
+	get_tim(&time);
+	syslog(LOG_NOTICE, "[TDS:%02d RCV] connected:  %6ld, from: %s.%d",
+	                   cepid, time / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno);
+	while ((rlen = tcp_rcv_dat(cepid, buf, BUF_SIZE - 1, TMO_FEVR)) > 0) {
+		count ++;
+
+#ifdef SHOW_RCV_RANGE
+		syslog(LOG_NOTICE, "[TDS:%02d RCV] count: %4d, len: %4d, data: %02x -> %02x",
+		       cepid, count, (uint16_t)rlen, *buf, *(buf + rlen - 1));
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+
+		total += rlen;
+		}
+	if (rlen != 0)
+		syslog(LOG_NOTICE, "[TDS:%02d RCV] recv error: %s", cepid, itron_strerror(rlen));
+
+	if ((error = tcp_sht_cep(cepid)) != E_OK)
+		syslog(LOG_NOTICE, "[TDS:%02d RCV] shutdown error: %s", cepid, itron_strerror(error));
+
+	if ((error = tcp_cls_cep(cepid, TMO_FEVR)) != E_OK)
+		syslog(LOG_NOTICE, "[TDS:%02d RCV] close error: %s", cepid, itron_strerror(error));
+
+	get_tim(&time);
+	syslog(LOG_NOTICE, "[TDS:%02d RCV] finished:   %6ld,            rcv: %4d, len: %ld",
+	                   cepid, time / SYSTIM_HZ, count, total);
+
+	return error;
+	}
+
+#endif	/* of #ifdef USE_COPYSAVE_API */
+
+#ifdef USE_TCP_EXTENTIONS
+
+/*
+ *  get_tcp_rep -- TCP åä»å£ãç²å¾ããã
+ */
+
+static ER
+get_tcp_rep (ID *repid)
+{
+	ID		tskid;
+	T_TCP_CREP	crep;
+
+	get_tid(&tskid);
+
+	crep.repatr = UINT_C(0);
+	crep.myaddr.portno = UINT_C(9);
+
+#if defined(SUPPORT_INET4)
+	crep.myaddr.ipaddr = IPV4_ADDRANY;
+#endif
+
+#if defined(SUPPORT_INET6)
+	memcpy(&crep.myaddr.ipaddr, &ipv6_addrany, sizeof(T_IN6_ADDR));
+#endif
+
+	return alloc_tcp_rep(repid, tskid, &crep);
+	}
+
+/*
+ *  get_tcp_cep -- TCP éä¿¡ç«¯ç¹ã¨ãç²å¾ããã
+ */
+
+static ER
+get_tcp_cep (ID *cepid)
+{
+	ID		tskid;
+	T_TCP_CCEP	ccep;
+
+	get_tid(&tskid);
+
+	ccep.cepatr = UINT_C(0);
+	ccep.sbuf = NADR;
+	ccep.sbufsz = 0;
+	ccep.rbufsz = TCP_DISCARD_SRV_RWBUF_SIZE;
+	ccep.callback = NULL;
+
+#ifdef TCP_CFG_RWBUF_CSAVE
+	ccep.rbuf = NADR;
+#else
+	ccep.rbuf = tcp_discard_srv_rwbuf;
+#endif
+
+	return alloc_tcp_cep(cepid, tskid, &ccep);
+	}
+
+/*
+ *  tcp_discard_srv_task -- TCP ã¨ã³ã¼ãµã¼ãã¿ã¹ã¯
+ */
+
+void
+tcp_discard_srv_task (intptr_t exinf)
+{
+	ID	tskid, cepid, repid;
+	ER	error = E_OK;
+
+	syscall(get_tid(&tskid));
+	syslog(LOG_NOTICE, "[TCP ECHO SRV:%d] started.", tskid);
+	while (true) {
+
+		syscall(slp_tsk());
+		if ((error = get_tcp_cep (&cepid)) != E_OK) {
+			syslog(LOG_NOTICE, "[TDS:00 EXT] CEP create error: %s", itron_strerror(error));
+			continue;
+			}
+
+		while (true) {
+
+			if ((error = get_tcp_rep (&repid)) != E_OK) {
+				syslog(LOG_NOTICE, "[TDS:00 EXT] REP create error: %s", itron_strerror(error));
+				break;
+				}
+			else if ((error = tcp_discard_srv(cepid, repid)) != E_OK) {
+				error = free_tcp_rep(repid, error != E_DLT);
+				break;
+				}
+			}
+
+		if ((error = free_tcp_cep(cepid)) != E_OK)
+			syslog(LOG_NOTICE, "[TDS:%02d EXT] CEP delete error: %s", cepid, itron_strerror(error));
+
+		}
+	}
+
+#else	/* of #ifdef USE_TCP_EXTENTIONS */
+
+void
+tcp_discard_srv_task(intptr_t exinf)
+{
+	ID	tskid;
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[TCP DISCARD SRV:%d,%d] started.", tskid, (ID)exinf);
+	while (true) {
+		while (tcp_discard_srv((ID)exinf, TCP_DISCARD_SRV_REPID) == E_OK)
+			;
+		}
+	}
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+#endif	/* of #ifdef USE_TCP_DISCARD_SRV */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_discard_srv.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_discard_srv.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_discard_srv.cfg	(revision 270)
@@ -0,0 +1,80 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  TCP DISCARD ãµã¼ãã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_TCP_DISCARD_SRV
+
+/*
+ * ã¿ã¹ã¯
+ */
+
+#ifdef USE_TCP_EXTENTIONS
+
+CRE_TSK(TCP_DISCARD_SRV_TASK,  {
+	TA_HLNG | TA_ACT,
+	0,
+	tcp_discard_srv_task,
+	TCP_DISCARD_SRV_MAIN_PRIORITY,
+	TCP_DISCARD_SRV_STACK_SIZE,
+	NULL
+	});
+
+#else	/* of #ifdef USE_TCP_EXTENTIONS */
+
+CRE_TSK(TCP_DISCARD_SRV_TASK,  {
+	TA_HLNG | TA_ACT,
+	TCP_DISCARD_SRV_CEPID,
+	tcp_discard_srv_task,
+	TCP_DISCARD_SRV_MAIN_PRIORITY,
+	TCP_DISCARD_SRV_STACK_SIZE,
+	NULL
+	});
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+#endif	/* of #ifdef USE_TCP_DISCARD_SRV */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_echo_cli.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_echo_cli.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_echo_cli.c	(revision 270)
@@ -0,0 +1,859 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  TCP ECHO ã¯ã©ã¤ã¢ã³ã
+ *
+ *    ã»éåä¿¡ã¿ã¹ã¯åé¢å
+ *    ã»ãã³ãã­ãã­ã³ã°ã³ã¼ã«
+ *    ã»çã³ãã¼ API
+ *    ã»IPv4
+ *    ã»IPv6
+ */
+
+#include <stdlib.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/net.h>
+#include <net/ethernet.h>
+#include <net/net_var.h>
+#include <net/net_timer.h>
+
+#include <netinet/in.h>
+#include <netinet/in_itron.h>
+#include <netinet/ip.h>
+#include <netinet/ip6.h>
+#include <netinet/tcp.h>
+
+#include <netapp/netapp.h>
+#include <netapp/netapp_var.h>
+#include <netapp/echo.h>
+
+#ifdef USE_TCP_ECHO_CLI
+
+/* echo ãµã¼ãã®ãã¼ãçªå· */
+
+#define ECHO_SRV_PORTNO		UINT_C(7)
+
+/* ç·æ¥ãã¼ã¿ã®éä¿¡ */
+
+#ifdef USE_TCP_EXTENTIONS
+
+//#define SND_URG_DATA_SIZE	4
+#define SND_URG_COUNT		10
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+/* è¡¨ç¤º */
+
+//#define SHOW_RCV_RANGE
+
+/* ã¿ã¤ã ã¢ã¦ã */
+
+#define CON_TMO		TMO_FEVR
+//#define CON_TMO		(60*SYSTIM_HZ)
+//#define CLS_TMO		TMO_FEVR				/* Close Wait ã¯æ¨æºã§ 60ç§ */
+#define CLS_TMO		(70*SYSTIM_HZ+(net_rand()%SYSTIM_HZ)*10)
+//#define RCV_TMO		TMO_FEVR
+#define RCV_TMO		(40*SYSTIM_HZ+(net_rand()%SYSTIM_HZ)*20)
+//#define SND_TMO		TMO_FEVR
+#define SND_TMO		(30*SYSTIM_HZ+(net_rand()%SYSTIM_HZ)*30)
+
+/* éä¿¡éé */
+
+//#define SND_DLY			ULONG_C(500)
+#define SND_ITV		(5*SYSTM_HZ)
+#define SLP_ITV		(60*SYSTIM_HZ)
+
+/* èªåå®è¡ */
+
+#if 0
+#if defined(SUPPORT_INET6)
+#define AUTO_RUN_STR	"fe80::211:2fff:fe8a:e8c0 - 0"
+#else
+#define AUTO_RUN_STR	"172.25.193.140 - 0"
+#endif
+#endif
+
+/*
+ *  ãããã¡ãµã¤ãºã®å®ç¾©
+ */
+
+#define NUM_ECHO		20
+#define NUM_REP_PAT		20
+#define PAT_BEGIN		' '
+#define PAT_END			'~'
+#define SND_BUF_SIZE		((PAT_END - PAT_BEGIN + 1) * NUM_REP_PAT)
+#define RCV_BUF_SIZE		(SND_BUF_SIZE*15/10)
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+bool_t tcp_echo_cli_valid;
+
+/* TCP éåä¿¡ã¦ã£ã³ããããã¡ */
+
+#ifndef TCP_CFG_SWBUF_CSAVE
+uint8_t tcp_echo_cli_swbuf[TCP_ECHO_CLI_SWBUF_SIZE];
+#endif
+
+#ifndef TCP_CFG_RWBUF_CSAVE
+uint8_t tcp_echo_cli_rwbuf[TCP_ECHO_CLI_RWBUF_SIZE];
+#endif
+
+/*
+ *  å¤æ°
+ */
+
+static uint_t	scount;
+static uint_t	rcount;
+
+#ifdef USE_TCP_NON_BLOCKING
+
+static T_IPEP	nblk_src = {
+			IP_ADDRANY,
+			TCP_PORTANY,
+			};
+static T_IPEP	nblk_dst;
+static ER_UINT	nblk_error;
+
+/*
+ *  ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã®ã³ã¼ã«ããã¯é¢æ°
+ */
+
+ER
+callback_nblk_tcp_echo_cli (ID cepid, FN fncd, void *p_parblk)
+{
+	ER	error = E_OK;
+
+	nblk_error = *(ER*)p_parblk;
+
+	switch (fncd) {
+
+	case TFN_TCP_CON_CEP:
+		syscall(sig_sem(SEM_TCP_ECHO_CLI_NBLK_READY));
+		break;
+
+	case TFN_TCP_RCV_BUF:
+		if (nblk_error < 0)
+			syslog(LOG_NOTICE, "[TEC:%02d CBN] rcv buf error: %s", cepid, itron_strerror(nblk_error));
+		syscall(sig_sem(SEM_TCP_ECHO_CLI_NBLK_READY));
+		break;
+
+	case TFN_TCP_CLS_CEP:
+		if (nblk_error < 0)
+			syslog(LOG_NOTICE, "[TEC:%02d CBN] close error: %s", cepid, itron_strerror(nblk_error));
+		syscall(sig_sem(SEM_TCP_ECHO_CLI_NBLK_READY));
+		break;
+
+	case TFN_TCP_RCV_DAT:
+		if (nblk_error < 0)
+			syslog(LOG_NOTICE, "[TEC:%02d CBN] rcv dat error: %s", cepid, itron_strerror(nblk_error));
+		syscall(sig_sem(SEM_TCP_ECHO_CLI_NBLK_READY));
+		break;
+
+	case TFN_TCP_SND_OOB:
+		if (nblk_error > 0)
+			syslog(LOG_NOTICE, "[TEC:%02d CBN] snd urg: %4d", cepid, nblk_error);
+		else
+			syslog(LOG_NOTICE, "[TEC:%02d CBN] snd urg error: %s", cepid, itron_strerror(nblk_error));
+		break;
+
+	case TFN_TCP_ACP_CEP:
+	case TFN_TCP_SND_DAT:
+	case TFN_TCP_GET_BUF:
+	default:
+		error = E_PAR;
+		break;
+		}
+	return error;
+	}
+
+/*
+ *  send_tcp_echo -- ECHO/TCP ãµã¼ãã«ã¡ãã»ã¼ã¸ãéä¿¡ããã
+ */
+
+static ER
+send_tcp_echo (ID cepid, T_IN_ADDR *ipaddr, uint16_t portno)
+{
+	static char smsg[SND_BUF_SIZE];
+
+	ER_UINT		slen;
+	ER		error;
+	SYSTIM		time;
+	uint32_t	total;
+	uint16_t	soff, echo, rep;
+	char		*p, pat;
+
+#ifdef SND_URG_DATA_SIZE
+	int_t	urg = SND_URG_COUNT;
+#endif
+
+	nblk_dst.ipaddr = *ipaddr;
+	nblk_dst.portno = portno;
+
+	p = smsg;
+	for (rep = NUM_REP_PAT; rep -- > 0; )
+		for (pat = PAT_BEGIN; pat <= PAT_END; pat ++)
+			*p ++ = pat;
+
+	if ((error = TCP_CON_CEP(cepid, &nblk_src, &nblk_dst, TMO_NBLK)) != E_WBLK) {
+		syslog(LOG_NOTICE, "[TEC:%02d SND] connect error: %s", cepid, itron_strerror(error));
+		return error;
+		}
+
+	/* æ¥ç¶ãå®äºããã¾ã§å¾
+ã¤ã*/
+	syscall(wai_sem(SEM_TCP_ECHO_CLI_NBLK_READY));
+
+	if (nblk_error != E_OK)
+		syslog(LOG_NOTICE, "[TEC:%02d SND] connect error: %s", cepid, itron_strerror(nblk_error));
+	else {
+		get_tim(&time);
+		syslog(LOG_NOTICE, "[TEC:%02d SND] connecting: %6lu, to:   %s.%u",
+		                   cepid, time / SYSTIM_HZ, IP2STR(NULL, ipaddr), nblk_dst.portno);
+
+		if ((error = psnd_dtq(DTQ_TCP_ECHO_CLI_RCV, (intptr_t)cepid)) != E_OK) {
+			syslog(LOG_NOTICE, "[TEC:%02d SND] sync error: %s", cepid, itron_strerror(error));
+			goto cls_ret;
+			}
+
+		scount = total = 0;
+		for (echo = NUM_ECHO; echo -- > 0; ) {
+			soff = 0;
+			while (soff < SND_BUF_SIZE) {
+				if ((slen = tcp_snd_dat(cepid, smsg + soff, sizeof(smsg) - soff, SND_TMO)) < 0) {
+					syslog(LOG_NOTICE, "[TEC:%02d SND] snd dat error: %s",
+					                   cepid, itron_strerror(slen));
+					goto cls_ret;
+					}
+				soff  += (uint16_t)slen;
+				total +=     slen;
+				scount ++;
+#ifdef SHOW_RCV_RANGE
+				syslog(LOG_NOTICE, "[TEC:%02d SND] send cnt: %2d, len: %4d, off: %4d",
+				                   cepid, scount, (uint16_t)slen, soff);
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+
+#ifdef SND_URG_DATA_SIZE
+				if (urg) {
+					if (urg == 1) {
+						if ((error = tcp_snd_oob(cepid, smsg, SND_URG_DATA_SIZE, TMO_NBLK)) != E_WBLK)
+							syslog(LOG_NOTICE, "[TEC:%02d SND] snd urg error: %s",
+							                   cepid, itron_strerror(error));
+						}
+					urg --;
+					}
+#endif	/* of #ifdef SND_URG_DATA_SIZE */
+
+#if SND_DLY > 0
+				syscall(dly_tsk(SND_DLY + net_rand() % SYSTIM_HZ));
+#endif
+				}
+			}
+
+	cls_ret:
+		if ((error = tcp_sht_cep(cepid)) < 0)
+			syslog(LOG_NOTICE, "[TEC:%02d SND] shutdown error: %s", cepid, itron_strerror(error));
+
+		/* åä¿¡ãå®äºããã¾ã§å¾
+ã¤ã*/
+		syscall(slp_tsk());
+		}
+
+	return error;
+	}
+
+/*
+ *  TCP ECHO ã¯ã©ã¤ã¢ã³ãåä¿¡ã¿ã¹ã¯
+ */
+
+#ifdef USE_COPYSAVE_API
+
+void
+tcp_echo_cli_rcv_task (intptr_t exinf)
+{
+	ID		tskid, cepid;
+	ER		error;
+	SYSTIM		time;
+	uint32_t	total;
+	uint16_t	roff, rlen;
+	char		*rmsg, head, tail;
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[TCP ECHO CLI (NBLK,CS) RCV:%d] started.", tskid);
+	while (true) {
+		if ((error = rcv_dtq(DTQ_TCP_ECHO_CLI_RCV, (intptr_t*)&cepid)) != E_OK) {
+			syslog(LOG_NOTICE, "[TEC:%02d RCV] sync error: %s",
+			                   cepid, itron_strerror(error));
+			}
+                else {
+			roff = rcount = total = 0;
+			while (true) {
+				if ((error = tcp_rcv_buf(cepid, (void**)&rmsg, TMO_NBLK)) != E_WBLK) {
+					syslog(LOG_NOTICE, "[TEC:%02d RCV] rcv buf error: %s", cepid, itron_strerror(error));
+					break;
+					}
+
+				/* åä¿¡ãããã¡ã®ç²å¾ãå®äºããã¾ã§å¾
+ã¤ã*/
+				syscall(wai_sem(SEM_TCP_ECHO_CLI_NBLK_READY));
+				if (nblk_error < 0)
+					break;
+
+				rlen = nblk_error;
+				head = *rmsg;
+				tail = *(rmsg + rlen - 1);
+				if (rlen > 0) {
+					roff  += rlen;
+					total += rlen;
+					rcount ++;
+#ifdef SHOW_RCV_RANGE
+					syslog(LOG_NOTICE, "[TEC:%02d RCV] "
+					                   "recv cnt: %2d, len: %4d, off: %4d, data: %02x -> %02x",
+					                   cepid, rcount, rlen, roff, head, tail);
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+					}
+				else
+					break;
+
+				if ((error = tcp_rel_buf(cepid, rlen)) != E_OK)
+					syslog(LOG_NOTICE, "[TEC:%02d RCV] rel buf error: %s", 
+					                   cepid, itron_strerror(error));
+				}
+
+			if ((error = tcp_cls_cep(cepid, TMO_NBLK)) != E_WBLK && error != E_OK)
+				syslog(LOG_NOTICE, "[TEC:%02d SND] close error: %s", cepid, itron_strerror(error));
+
+			/* åæ­ãå®äºããã¾ã§å¾
+ã¤ã*/
+			syscall(wai_sem(SEM_TCP_ECHO_CLI_NBLK_READY));
+
+			get_tim(&time);
+			syslog(LOG_NOTICE, "[TEC:%02u RCV] finished:   %6lu, snd: %4u, rcv: %4u, len: %u",
+			                   cepid, time / SYSTIM_HZ, scount, rcount, total);
+			}
+
+		syscall(wup_tsk(TCP_ECHO_CLI_SND_TASK));
+		}
+	}
+
+#else	/* of #ifdef USE_COPYSAVE_API */
+
+void
+tcp_echo_cli_rcv_task (intptr_t exinf)
+{
+	static char rmsg[RCV_BUF_SIZE];
+
+	ID		tskid, cepid;
+	ER		error;
+	SYSTIM		time;
+	uint32_t	total;
+	uint16_t	roff, rlen;
+	char		head, tail;
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[TCP ECHO CLI (NBLK) RCV:%d] started.", tskid);
+	while (true) {
+		if ((error = rcv_dtq(DTQ_TCP_ECHO_CLI_RCV, (intptr_t*)&cepid)) != E_OK) {
+			syslog(LOG_NOTICE, "[TEC:%02d RCV] sync error: %s",
+			                   cepid, itron_strerror(error));
+			}
+                else {
+			roff = rcount = total = 0;
+			while (true) {
+				if ((error = tcp_rcv_dat(cepid, rmsg, sizeof(rmsg), TMO_NBLK)) != E_WBLK) {
+					syslog(LOG_NOTICE, "[TEC:%02d RCV] rcv error: %s", cepid, itron_strerror(error));
+					break;
+					}
+
+				/* åä¿¡ãå®äºããã¾ã§å¾
+ã¤ã*/
+				syscall(wai_sem(SEM_TCP_ECHO_CLI_NBLK_READY));
+				if (nblk_error < 0)
+					break;
+
+				rlen = nblk_error;
+				head = *rmsg;
+				tail = *(rmsg + rlen - 1);
+				rcount ++;
+				if (rlen > 0) {
+					roff  += rlen;
+					total += rlen;
+#ifdef SHOW_RCV_RANGE
+					syslog(LOG_NOTICE, "[TEC:%02d RCV] "
+					                   "recv cnt: %2d, len: %4d, off: %4d, data: %02x -> %02x",
+					                   cepid, rcount, rlen, roff, head, tail);
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+					}
+				else
+					break;
+				}
+
+			if ((error = tcp_cls_cep(cepid, TMO_NBLK)) != E_WBLK && error != E_OK)
+				syslog(LOG_NOTICE, "[TEC:%02d SND] close error: %s", cepid, itron_strerror(error));
+
+			/* åæ­ãå®äºããã¾ã§å¾
+ã¤ã*/
+			syscall(wai_sem(SEM_TCP_ECHO_CLI_NBLK_READY));
+
+			get_tim(&time);
+			syslog(LOG_NOTICE, "[TEC:%02u RCV] finished:   %6lu, snd: %4u, rcv: %4u, len: %u",
+			                   cepid, time / SYSTIM_HZ, scount, rcount, total);
+			}
+
+		syscall(wup_tsk(TCP_ECHO_CLI_SND_TASK));
+		}
+	}
+
+#endif	/* of #ifdef USE_COPYSAVE_API */
+
+#else	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+/*
+ *  send_tcp_echo -- ECHO/TCP ãµã¼ãã«ã¡ãã»ã¼ã¸ãéä¿¡ããã
+ */
+
+static ER
+send_tcp_echo (ID cepid, T_IN_ADDR *ipaddr, uint16_t portno)
+{
+	static char smsg[SND_BUF_SIZE];
+	static T_IPEP src = {
+		IP_ADDRANY,
+		TCP_PORTANY,
+		};
+
+	T_IPEP		dst;
+	ER_UINT		slen;
+	ER		error;
+	SYSTIM		time;
+	uint32_t	total;
+	uint16_t	soff, echo, rep;
+	char 		pat, *p;
+
+#ifdef SND_URG_DATA_SIZE
+	int_t	urg = SND_URG_COUNT;
+#endif
+
+	dst.ipaddr = *ipaddr;
+	dst.portno = portno;
+
+	p = smsg;
+	for (rep = NUM_REP_PAT; rep -- > 0; )
+		for (pat = PAT_BEGIN; pat <= PAT_END; pat ++)
+			*p ++ = pat;
+
+	if ((error = TCP_CON_CEP(cepid, &src, &dst, CON_TMO)) != E_OK) {
+		syslog(LOG_NOTICE, "[TEC:%02d SND] connect error: %s", cepid, itron_strerror(error));
+		return error;
+		}
+
+	get_tim(&time);
+	syslog(LOG_NOTICE, "[TEC:%02u SND] connecting: %6lu, to:   %s.%u",
+	                   cepid, time / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno);
+
+	if ((error = psnd_dtq(DTQ_TCP_ECHO_CLI_RCV, (intptr_t)cepid)) != E_OK) {
+		syslog(LOG_NOTICE, "[TEC:%02d SND] sync error: %s", cepid, itron_strerror(error));
+		goto cls_ret;
+		}
+
+	scount = total = 0;
+	for (echo = NUM_ECHO; echo -- > 0; ) {
+		soff = 0;
+		while (soff < SND_BUF_SIZE) {
+			if ((slen = tcp_snd_dat(cepid, smsg + soff, sizeof(smsg) - soff, SND_TMO)) < 0) {
+				syslog(LOG_NOTICE, "[TEC:%02d SND] snd dat error: %s", cepid, itron_strerror(slen));
+				goto cls_ret;
+				}
+			soff  += (uint16_t)slen;
+			total +=     slen;
+			scount ++;
+#ifdef SHOW_RCV_RANGE
+			syslog(LOG_NOTICE, "[TEC:%02d SND] send count: %3d, len: %4d, offset: %4d",
+			                   cepid, scount, (uint16_t)slen, soff);
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+
+#ifdef SND_URG_DATA_SIZE
+			if (urg > 0) {
+				if (urg == 1) {
+					if ((slen = tcp_snd_oob(cepid, smsg, SND_URG_DATA_SIZE, SND_TMO)) >= 0)
+						syslog(LOG_NOTICE, "[TEC:%02d SND] snd urg: %4d",
+						                   cepid, (uint16_6)slen);
+					else
+						syslog(LOG_NOTICE, "[TEC:%02d SND] snd urg error: %s",
+						                   cepid, itron_strerror(slen));
+					}
+				urg --;
+				}
+#endif	/* of #ifdef SND_URG_DATA_SIZE */
+
+#if SND_DLY > 0
+			syscall(dly_tsk(SND_DLY + net_rand() % SYSTIM_HZ));
+#endif
+			}
+		}
+
+cls_ret:
+	if ((error = tcp_sht_cep(cepid)) < 0)
+		syslog(LOG_NOTICE, "[TEC:%02d SND] shutdown error: %s", cepid, itron_strerror(error));
+
+	/* åä¿¡ãå®äºããã¾ã§å¾
+ã¤ã*/
+	syscall(slp_tsk());
+
+	return error;
+	}
+
+/*
+ *  TCP ECHO ã¯ã©ã¤ã¢ã³ãåä¿¡ã¿ã¹ã¯
+ */
+
+#ifdef USE_COPYSAVE_API
+
+void
+tcp_echo_cli_rcv_task (intptr_t exinf)
+{
+	ID		tskid, cepid;
+	ER_UINT		rlen;
+	ER		error;
+	SYSTIM		time;
+	uint32_t	total;
+	uint16_t	roff;
+	char		*rmsg;
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[TCP ECHO CLI (CS) RCV:%d] started.", tskid);
+	while (true) {
+		if ((error = rcv_dtq(DTQ_TCP_ECHO_CLI_RCV, (intptr_t*)&cepid)) != E_OK) {
+			syslog(LOG_NOTICE, "[TEC:%02d RCV] sync error: %s",
+			                   cepid, itron_strerror(error));
+			}
+		else {
+			roff = rcount = total = 0;
+			while (true) {
+				if ((rlen = tcp_rcv_buf(cepid, (void**)&rmsg, RCV_TMO)) < 0) {
+					syslog(LOG_NOTICE, "[TEC:%02d RCV] rcv buf error: %s",
+					                   cepid, itron_strerror(rlen));
+					break;
+					}
+				else if (rlen > 0) {
+					roff  += (uint16_t)rlen;
+					total +=     rlen;
+					rcount ++;
+#ifdef SHOW_RCV_RANGE
+					syslog(LOG_NOTICE, "[TEC:%02d RCV] recv count: %3d, len: %4d, data: %02x -> %02x",
+					                   cepid, rcount, (uint16_t)rlen, *rmsg, *(rmsg + rlen - 1));
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+					}
+				else
+					break;
+				if ((error = tcp_rel_buf(cepid, rlen)) != E_OK)
+					syslog(LOG_NOTICE, "[TEC:%02d RCV] rel buf error: %s", cepid, itron_strerror(error));
+				}
+
+			if ((error = tcp_cls_cep(cepid, CLS_TMO)) < 0)
+				syslog(LOG_NOTICE, "[TEC:%02d RCV] close error: %s", cepid, itron_strerror(error));
+
+			get_tim(&time);
+			syslog(LOG_NOTICE, "[TEC:%02u RCV] finished:   %6lu, snd: %4u, rcv: %4u, len: %u",
+			                   cepid, time / SYSTIM_HZ, scount, rcount, total);
+			}
+
+		syscall(wup_tsk(TCP_ECHO_CLI_SND_TASK));
+		}
+	}
+
+#else	/* of #ifdef USE_COPYSAVE_API */
+
+void
+tcp_echo_cli_rcv_task (intptr_t exinf)
+{
+	static char rmsg[RCV_BUF_SIZE];
+
+	ID		tskid, cepid;
+	ER_UINT		rlen;
+	ER		error;
+	SYSTIM		time;
+	uint32_t	total;
+	uint16_t	roff;
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[TCP ECHO CLI RCV:%d] started.", tskid);
+	while (true) {
+		if ((error = rcv_dtq(DTQ_TCP_ECHO_CLI_RCV, (intptr_t*)&cepid)) != E_OK) {
+			syslog(LOG_NOTICE, "[TEC:%02d RCV] sync error: %s",
+			                   cepid, itron_strerror(error));
+			}
+                else {
+			roff = rcount = total = 0;
+			while (true) {
+				if ((rlen = tcp_rcv_dat(cepid, rmsg, sizeof(rmsg), RCV_TMO)) < 0) {
+					syslog(LOG_NOTICE, "[TEC:%02d RCV] rcv dat error: %s", cepid, itron_strerror(rlen));
+					tcp_can_cep(cepid, TFN_TCP_ALL);
+					break;
+					}
+				else if (rlen > 0) {
+					roff  += (uint16_t)rlen;
+					total +=     rlen;
+					rcount ++;
+#ifdef SHOW_RCV_RANGE
+					syslog(LOG_NOTICE, "[TEC:%02d RCV] recv count: %3d, len: %4d, data: %02x -> %02x",
+					                   cepid, rcount, (uint16_t)rlen, *rmsg, *(rmsg + rlen - 1));
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+					}
+				else
+					break;
+				}
+
+			if ((error = tcp_cls_cep(cepid, CLS_TMO)) < 0)
+				syslog(LOG_NOTICE, "[TEC:%02d RCV] close error: %s", cepid, itron_strerror(error));
+
+			get_tim(&time);
+			syslog(LOG_NOTICE, "[TEC:%02u RCV] received:   %6lu, snd: %4u, rcv: %4u, len: %u",
+			                   cepid, time / SYSTIM_HZ, scount, rcount, total);
+			}
+
+		syscall(wup_tsk(TCP_ECHO_CLI_SND_TASK));
+		}
+	}
+
+#endif	/* of #ifdef USE_COPYSAVE_API */
+
+#endif	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+/*
+ *  getcomd -- ã³ãã³ããå¾ãã
+ */
+
+#ifdef AUTO_RUN_STR
+
+static char *
+getcomd (ID cepid)
+{
+	ER		error;
+	char		*line = NULL;
+	static char	auto_run_str[] = AUTO_RUN_STR;
+	static int_t	count = 0;
+
+	if (count == 0) {
+		line = auto_run_str;
+		dly_tsk(3 * 1000);
+		}
+	else {
+		while ((error = rcv_dtq(DTQ_TCP_ECHO_CLI_SND, (intptr_t*)&line)) != E_OK) {
+			syslog(LOG_NOTICE, "[TEC:%02d TSK] error: %s", cepid, itron_strerror(error));
+			dly_tsk(SLP_ITV);
+			}
+		}
+
+	count ++;
+	return line;
+	}
+
+#else	/* of #ifdef AUTO_RUN_STR */
+
+static char *
+getcomd (ID cepid)
+{
+	ER	error;
+	char	*line = NULL;
+
+	while ((error = rcv_dtq(DTQ_TCP_ECHO_CLI_SND, (intptr_t*)&line)) != E_OK) {
+		syslog(LOG_NOTICE, "[TEC:%02d TSK] error: %s", cepid, itron_strerror(error));
+		dly_tsk(SLP_ITV);
+		}
+	return line;
+	}
+
+#endif	/* of #ifdef AUTO_RUN_STR */
+
+/*
+ *  TCP ECHO ã¯ã©ã¤ã¢ã³ãéä¿¡ã¿ã¹ã¯
+ */
+
+void
+tcp_echo_cli_snd_task (intptr_t exinf)
+{
+	ID		tskid, cepid;
+	ER		error;
+	T_IN_ADDR	addr;
+	uint16_t	portno;
+	int_t		rep, count;
+	char		*line;
+
+#ifdef USE_TCP_EXTENTIONS
+
+	T_TCP_CCEP	ccep;
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[TCP ECHO CLI SND:%d,%d] started.", tskid, (ID)exinf);
+	while (true) {
+		line = getcomd((ID)exinf);
+		line = skip_blanks(GET_IPADDR(&addr, skip_blanks(line)));	/* IP Address */
+
+		if ('0' <= *line && *line <= '9') {				/* Port No */
+			line = get_int(&rep, line);
+			portno = (uint16_t)rep;
+			}
+		else {
+			line ++;
+			portno = ECHO_SRV_PORTNO;
+			}
+
+		line = skip_blanks(line);
+		if ('0' <= *line && *line <= '9')				/* Repeat */
+			line = get_int(&rep, line);
+		else
+			rep = 1;
+
+#ifdef USE_TCP_EXTENTIONS
+
+		ccep.cepatr = 0;
+		ccep.sbufsz = TCP_ECHO_CLI_SWBUF_SIZE;
+		ccep.rbufsz = TCP_ECHO_CLI_RWBUF_SIZE;
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+		ccep.sbuf = NADR;
+#else
+		ccep.sbuf = tcp_echo_cli_swbuf;
+#endif
+#ifdef TCP_CFG_RWBUF_CSAVE
+		ccep.rbuf = NADR;
+#else
+		ccep.rbuf = tcp_echo_cli_rwbuf;
+#endif
+#ifdef USE_TCP_NON_BLOCKING
+		ccep.callback = (FP)callback_nblk_tcp_echo_cli;
+#else
+		ccep.callback = NULL;
+#endif
+
+		if ((error = alloc_tcp_cep(&cepid, tskid, &ccep)) != E_OK) {
+			syslog(LOG_NOTICE, "[TEC:%02d TSK] CEP create error: %s", cepid, itron_strerror(error));
+			continue;
+			}
+
+#else	/* of #ifdef USE_TCP_EXTENTIONS */
+
+		cepid = (ID)exinf;
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+		tcp_echo_cli_valid = true;
+		count = 0;
+		while (rep == 0 || count < rep) {
+			if (!tcp_echo_cli_valid) {
+				syslog(LOG_NOTICE, "[TEC:%02d TSK] canceled.", cepid);
+				break;
+				}
+
+			count ++;
+			if (rep == 0) {
+				syslog(LOG_NOTICE, "[TEC:%02d TSK] start:              repeat: %d", cepid, count);
+				error = send_tcp_echo(cepid, &addr, portno);
+				syslog(LOG_NOTICE, "[TEC:%02d TSK] finished:           repeat: %d", cepid, count);
+				}
+			else {
+				syslog(LOG_NOTICE, "[TEC:%02d TSK] start:              repeat: %d/%d", cepid, count, rep);
+				error = send_tcp_echo(cepid, &addr, portno);
+				syslog(LOG_NOTICE, "[TEC:%02d TSK] finished:           repeat: %d/%d", cepid, count, rep);
+				}
+
+			if (error != E_OK) {
+				syslog(LOG_NOTICE, "[TEC:%02d TSK] sleep %d[ms], error: %s",
+				                   cepid, SLP_ITV, itron_strerror(error));
+				tslp_tsk(SLP_ITV);
+				syslog(LOG_NOTICE, "[TEC:%02d TSK] resume.", cepid);
+				}
+
+#if defined(SND_ITV)
+#if SND_ITV > 0
+			if (count > 0) {
+				uint_t itv;
+				
+				itv = SND_ITV;
+				syslog(LOG_NOTICE, "[TEC:%02d TSK] interval: %d[ms].", cepid, itv);
+				syscall(dly_tsk(SND_ITV));
+				}
+#endif
+#endif
+			}
+
+#ifdef USE_TCP_EXTENTIONS
+
+		if ((error = free_tcp_cep(cepid)) != E_OK)
+			syslog(LOG_NOTICE, "[TEC:%02d TSK] CEP delete error: %s", cepid, itron_strerror(error));
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+		}
+	}
+
+#endif	/* of #ifdef USE_TCP_ECHO_CLI */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_echo_cli.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_echo_cli.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_echo_cli.cfg	(revision 270)
@@ -0,0 +1,110 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  TCP ECHO ã¯ã©ã¤ã¢ã³ã
+ *  ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_TCP_ECHO_CLI
+
+/* ã¿ã¹ã¯ */
+
+#ifdef USE_TCP_EXTENTIONS
+
+CRE_TSK(TCP_ECHO_CLI_SND_TASK, {
+	TA_HLNG|TA_ACT,
+	0,
+	tcp_echo_cli_snd_task,
+	TCP_ECHO_CLI_SND_MAIN_PRIORITY,
+	TCP_ECHO_CLI_SND_STACK_SIZE,
+	NULL
+	});
+
+CRE_TSK(TCP_ECHO_CLI_RCV_TASK,  {
+	TA_HLNG|TA_ACT,
+	0,
+	tcp_echo_cli_rcv_task,
+	TCP_ECHO_CLI_RCV_MAIN_PRIORITY,
+	TCP_ECHO_CLI_RCV_STACK_SIZE,
+	NULL
+	});
+
+#else	/* of #ifdef USE_TCP_EXTENTIONS */
+
+CRE_TSK(TCP_ECHO_CLI_SND_TASK, {
+	TA_HLNG|TA_ACT,
+	TCP_ECHO_CLI_CEPID,
+	tcp_echo_cli_snd_task,
+	TCP_ECHO_CLI_SND_MAIN_PRIORITY,
+	TCP_ECHO_CLI_SND_STACK_SIZE,
+	NULL
+	});
+
+CRE_TSK(TCP_ECHO_CLI_RCV_TASK,  {
+	TA_HLNG|TA_ACT,
+	TCP_ECHO_CLI_CEPID,
+	tcp_echo_cli_rcv_task,
+	TCP_ECHO_CLI_RCV_MAIN_PRIORITY,
+	TCP_ECHO_CLI_RCV_STACK_SIZE,
+	NULL
+	});
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+/* ã³ãã³ãã­ã¥ã¼ */
+
+CRE_DTQ(DTQ_TCP_ECHO_CLI_SND,  { TA_TFIFO, 1, NULL });
+CRE_DTQ(DTQ_TCP_ECHO_CLI_RCV,  { TA_TFIFO, 1, NULL });
+
+/* ã»ããã© */
+
+#ifdef USE_TCP_NON_BLOCKING
+
+CRE_SEM(SEM_TCP_ECHO_CLI_NBLK_READY,	{ TA_TPRI, 0, 1 });
+
+#endif	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#endif	/* of #ifdef USE_TCP_ECHO_CLI */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_echo_srv1.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_echo_srv1.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_echo_srv1.c	(revision 270)
@@ -0,0 +1,806 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  TCP ECHO ãµã¼ã #1
+ *
+ *    ã»éåä¿¡ã¿ã¹ã¯åä¸å
+ *    ã»ãã³ãã­ãã­ã³ã°ã³ã¼ã«
+ *    ã»çã³ãã¼ API
+ *    ã»IPv4/IPv6
+ *    ã»ç·æ¥ãã¼ã¿ã®åä¿¡
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+#include "tinet_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <t_services.h>
+#include "kernel_id.h"
+#include "tinet_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_timer.h>
+
+#include <netinet/in.h>
+#include <netinet/in_itron.h>
+#include <netinet/ip.h>
+#include <netinet/ip6.h>
+#include <netinet/tcp.h>
+
+#include <netapp/netapp.h>
+#include <netapp/netapp_var.h>
+#include <netapp/echo.h>
+
+#ifdef USE_TCP_ECHO_SRV1
+
+/*
+ *  è¡¨ç¤º
+ */
+
+//#define SHOW_RCV_RANGE
+
+/*
+ *  ã³ãã¯ã·ã§ã³åæ­æ¹æ³ã®æå®
+ */
+
+#define USE_TCP_SHT_CEP
+
+/*
+ *  ã¿ã¤ã ã¢ã¦ã
+ */
+
+//#define CLS_TMO		TMO_FEVR	/* Close Wait ã¯æ¨æºã§ 60ç§ */
+#define CLS_TMO		(70*SYSTIM_HZ+(net_rand()%SYSTIM_HZ)*10)
+//#define RCV_TMO		TMO_FEVR
+#define RCV_TMO		(30*SYSTIM_HZ+(net_rand()%SYSTIM_HZ)*30)
+//#define SND_TMO		TMO_FEVR
+#define SND_TMO		(40*SYSTIM_HZ+(net_rand()%SYSTIM_HZ)*20)
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+/* TCP éåä¿¡ã¦ã£ã³ããããã¡ */
+
+#ifndef TCP_CFG_SWBUF_CSAVE
+uint8_t tcp_echo_srv_swbuf[NUM_TCP_ECHO_SRV_TASKS][TCP_ECHO_SRV_SWBUF_SIZE];
+#endif
+
+#ifndef TCP_CFG_RWBUF_CSAVE
+uint8_t tcp_echo_srv_rwbuf[NUM_TCP_ECHO_SRV_TASKS][TCP_ECHO_SRV_RWBUF_SIZE];
+#endif
+
+/*
+ *  å¤æ°
+ */
+
+/*
+ *  æ³¨æ:
+ *
+ *    BUF_SIZE ã¯ TCP ã®
+ *    éä¿¡ã¦ã¤ã³ãã¦ãããã¡ãµã¤ãº + åä¿¡ã¦ã¤ã³ãã¦ãããã¡ãµã¤ãºã® 
+ *    3/2 åä»¥ä¸ã®å¤§ããããªããã°ããããã­ãã¯ããå¯è½æ§ãããã
+ */
+
+#define BUF_SIZE	((TCP_ECHO_SRV_SWBUF_SIZE + \
+                          TCP_ECHO_SRV_RWBUF_SIZE) * 3 / 2)
+
+static T_IPEP		dst;			/* æ¥ç¶ç¸æ		*/
+
+#ifdef USE_TCP_NON_BLOCKING
+
+static char		buffer[BUF_SIZE];
+static ER		nblk_error = E_OK;
+static ER_UINT		nblk_slen  = 0;
+static ER_UINT		nblk_rlen  = 0;
+
+#else	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#ifdef USE_COPYSAVE_API
+
+#else	/* of #ifdef USE_COPYSAVE_API */
+
+static char		buffer[BUF_SIZE];
+
+#endif	/* of #ifdef USE_COPYSAVE_API */
+
+#endif	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#ifdef USE_TCP_NON_BLOCKING
+
+/*
+ *  ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã®ã³ã¼ã«ããã¯é¢æ°
+ */
+
+ER
+callback_nblk_tcp_echo_srv (ID cepid, FN fncd, void *p_parblk)
+{
+	ER	error = E_OK;
+
+	switch (fncd) {
+
+	case TFN_TCP_ACP_CEP:
+		nblk_error = *(ER*)p_parblk;
+		syscall(sig_sem(SEM_TCP_ECHO_SRV_NBLK_READY));
+		break;
+
+	case TFN_TCP_RCV_DAT:
+		if ((nblk_rlen = *(ER*)p_parblk) < 0)
+			syslog(LOG_NOTICE, "[TES:%02d CBN] recv error: %s", cepid, itron_strerror(nblk_rlen));
+		syscall(sig_sem(SEM_TCP_ECHO_SRV_NBLK_READY));
+		break;
+
+	case TFN_TCP_SND_DAT:
+		if ((nblk_slen = *(ER*)p_parblk) < 0)
+			syslog(LOG_NOTICE, "[TES:%02d CBN] send error: %s", cepid, itron_strerror(nblk_slen));
+		syscall(sig_sem(SEM_TCP_ECHO_SRV_NBLK_READY));
+		break;
+
+	case TFN_TCP_CLS_CEP:
+		if ((nblk_error = *(ER*)p_parblk) < 0)
+			syslog(LOG_NOTICE, "[TES:%02d CBN] close error: %s", cepid, itron_strerror(nblk_error));
+		syscall(sig_sem(SEM_TCP_ECHO_SRV_NBLK_READY));
+		break;
+
+	case TFN_TCP_RCV_BUF:
+		if ((nblk_rlen = *(ER*)p_parblk) < 0)
+			syslog(LOG_NOTICE, "[TES:%02d CBN] rbuf error: %s", cepid, itron_strerror(nblk_rlen));
+		syscall(sig_sem(SEM_TCP_ECHO_SRV_NBLK_READY));
+		break;
+
+	case TFN_TCP_GET_BUF:
+		if ((nblk_slen = *(ER*)p_parblk) < 0)
+			syslog(LOG_NOTICE, "[TES:%02d CBN] sbuf error: %s", cepid, itron_strerror(nblk_slen));
+		syscall(sig_sem(SEM_TCP_ECHO_SRV_NBLK_READY));
+		break;
+
+#ifdef USE_TCP_EXTENTIONS
+
+	case TEV_TCP_RCV_OOB:
+		if ((nblk_rlen = *(ER*)p_parblk) < 0)
+			syslog(LOG_NOTICE, "[TES:%02d OOB] callback error: %s", cepid, itron_strerror(nblk_rlen));
+		else if (nblk_rlen > 0) {
+			char ch;
+
+			if ((nblk_rlen = tcp_rcv_oob(cepid, &ch, sizeof(ch))) > 0)
+				syslog(LOG_NOTICE, "[TES:%02d OOB] recv oob: 0x%02x", cepid, ch);
+			else if (nblk_rlen < 0)
+				syslog(LOG_NOTICE, "[TES:%02d OOB] recv error: %s", cepid, itron_strerror(nblk_rlen));
+			}
+		break;
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+	case TFN_TCP_CON_CEP:
+	case TFN_TCP_SND_OOB:
+	default:
+		error = E_PAR;
+		break;
+		}
+	return error;
+	}
+
+#ifdef USE_COPYSAVE_API
+
+static ER
+tcp_echo_srv (ID cepid, ID repid)
+{
+	ER		error;
+	SYSTIM		now;
+	uint32_t	total;
+	uint16_t	rblen, sblen, rlen, slen, soff, scount, rcount;
+	char		*rbuf, *sbuf, head, tail;
+
+	if ((error = TCP_ACP_CEP(cepid, repid, &dst, TMO_NBLK)) != E_WBLK) {
+		syslog(LOG_NOTICE, "[TES:%02d ACP] error: %s", cepid, itron_strerror(error));
+		return error;
+		}
+
+	/* ç¸æããæ¥ç¶ãããã¾ã§å¾
+ã¤ã*/
+	syscall(wai_sem(SEM_TCP_ECHO_SRV_NBLK_READY));
+
+	if (nblk_error == E_OK) {
+		syscall(get_tim(&now));
+		syslog(LOG_NOTICE, "[TES:%02d ACP] connected:  %6lu, from: %s.%u",
+		                   cepid, now / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno);
+		}
+	else {
+		syslog(LOG_NOTICE, "[TES:%02d ACP] error: %s", cepid, itron_strerror(nblk_error));
+		return nblk_error;
+		}
+
+#ifdef USE_TCP_EXTENTIONS
+	if ((error = free_tcp_rep(repid, true)) != E_OK)
+		syslog(LOG_NOTICE, "[TES:%02d DEL] REP delete error: %s", cepid, itron_strerror(error));
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+	rlen = scount = rcount = total = 0;
+	while (true) {
+		if ((error = tcp_rcv_buf(cepid, (void**)&rbuf, TMO_NBLK)) != E_WBLK) {
+			syslog(LOG_NOTICE, "[TES:%02d RCV] error: %s", cepid, itron_strerror(error));
+			break;
+			}
+
+		/* åä¿¡ããã¾ã§å¾
+ã¤ã*/
+		syscall(wai_sem(SEM_TCP_ECHO_SRV_NBLK_READY));
+
+		if (nblk_rlen < 0) {	/* ã¨ã©ã¼ */
+			syslog(LOG_NOTICE, "[TES:%02d RCV] error: %s", 
+			                   cepid, itron_strerror(nblk_rlen));
+			break;
+			}
+		else if (nblk_rlen == 0)	/* åä¿¡çµäº */
+			break;
+
+		rblen = nblk_rlen;
+
+		/* ãããã¡ã®æ®ãã«ãããåä¿¡é·ãèª¿æ´ããã*/
+		if (rblen > BUF_SIZE - rlen)
+			rblen = BUF_SIZE - rlen;
+		total += rblen;
+		rlen   = rblen;
+
+		head = *rbuf;
+		tail = *(rbuf + rblen - 1);
+		rcount ++;
+
+#ifdef SHOW_RCV_RANGE
+		syslog(LOG_NOTICE, "[TES:%02d RCV] "
+		                   "rcount: %4d, len: %4d, data %02x -> %02x",
+		                   cepid, rcount, rblen, head, tail);
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+
+		memcpy(buffer, rbuf, rblen);
+
+		if ((error = tcp_rel_buf(cepid, rlen)) < 0) {
+			syslog(LOG_NOTICE, "[TES:%02d REL] error: %s",
+			                   cepid, itron_strerror(error));
+			break;
+			}
+
+		soff = 0;
+		while (rlen > 0) {
+
+			if ((error = tcp_get_buf(cepid, (void**)&sbuf, TMO_NBLK)) != E_WBLK) {
+				syslog(LOG_NOTICE, "[TES:%02d GET] error: %s",
+				                   cepid, itron_strerror(error));
+				goto err_fin;
+				}
+
+			/* éä¿¡ãããã¡ã®ç²å¾ãå®äºããã¾ã§å¾
+ã¤ã*/
+			syscall(wai_sem(SEM_TCP_ECHO_SRV_NBLK_READY));
+
+			if (nblk_slen < 0) {
+				syslog(LOG_NOTICE, "[TES:%02d GET] error: %s",
+				                   cepid, itron_strerror(nblk_slen));
+				goto err_fin;
+				}
+
+			sblen = nblk_slen;
+			scount ++;
+			slen = sblen < rlen ? sblen : rlen;
+			memcpy(sbuf, buffer + soff, slen);
+
+			if ((error = tcp_snd_buf(cepid, slen)) != E_OK) {
+				syslog(LOG_NOTICE, "[TES:%02d SND] error: %s",
+				                   cepid, itron_strerror(error));
+				goto err_fin;
+				}
+#ifdef SHOW_RCV_RANGE
+			syslog(LOG_NOTICE, "[TES:%02d SND] scount: %4d, len: %4d",
+			                   cepid, scount, slen);
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+
+			rlen -= slen;
+			soff += slen;
+			}
+		}
+err_fin:
+
+#ifdef USE_TCP_SHT_CEP
+	if ((error = tcp_sht_cep(cepid)) != E_OK)
+		syslog(LOG_NOTICE, "[TES:%02d SHT] error: %s", cepid, itron_strerror(error));
+#endif	/* of #ifdef USE_TCP_SHT_CEP */
+
+	if ((error = tcp_cls_cep(cepid, TMO_NBLK)) != E_WBLK)
+		syslog(LOG_NOTICE, "[TES:%02d CLS] error: %s", cepid, itron_strerror(error));
+
+	/* éæ¾ãå®äºããã¾ã§å¾
+ã¤ã*/
+	syscall(wai_sem(SEM_TCP_ECHO_SRV_NBLK_READY));
+
+	syscall(get_tim(&now));
+	syslog(LOG_NOTICE, "[TES:%02d FIN] finished:   %6lu, snd: %4u, rcv: %4u, len: %lu",
+	                   cepid, now / SYSTIM_HZ, scount, rcount, total);
+
+	return error == E_WBLK ? E_OK : error;
+	}
+
+#else	/* of #ifdef USE_COPYSAVE_API */
+
+static ER
+tcp_echo_srv (ID cepid, ID repid)
+{
+	SYSTIM		now;
+	ER		error;
+	uint32_t	total;
+	uint16_t	rlen, slen, soff, scount, rcount;
+	char		head, tail;
+
+	if ((error = TCP_ACP_CEP(cepid, repid, &dst, TMO_NBLK)) != E_WBLK) {
+		syslog(LOG_NOTICE, "[TES:%02d ACP] error: %s", cepid, itron_strerror(error));
+		return error;
+		}
+
+	/* ç¸æããæ¥ç¶ãããã¾ã§å¾
+ã¤ã*/
+	syscall(wai_sem(SEM_TCP_ECHO_SRV_NBLK_READY));
+
+	if (nblk_error == E_OK) {
+		syscall(get_tim(&now));
+		syslog(LOG_NOTICE, "[TES:%02d ACP] connected:  %6lu, from: %s.%u",
+		                   cepid, now / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno);
+		}
+	else {
+		syslog(LOG_NOTICE, "[TES:%02d ACP] error: %s", cepid, itron_strerror(nblk_error));
+		return nblk_error;
+		}
+
+#ifdef USE_TCP_EXTENTIONS
+	if ((error = free_tcp_rep(repid, true)) != E_OK)
+		syslog(LOG_NOTICE, "[TES:%02d DEL] REP delete error: %s", cepid, itron_strerror(error));
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+	scount = rcount = total = 0;
+	while (true) {
+		if ((error = tcp_rcv_dat(cepid, buffer, BUF_SIZE - 1, TMO_NBLK)) != E_WBLK) {
+			syslog(LOG_NOTICE, "[TES:%02d RCV] error: %s",
+			                   cepid, itron_strerror(error));
+			break;
+			}
+
+		/* åä¿¡å®äºã¾ã§å¾
+ã¤ã*/
+		syscall(wai_sem(SEM_TCP_ECHO_SRV_NBLK_READY));
+
+		if (nblk_rlen < 0) {
+			syslog(LOG_NOTICE, "[TES:%02d RCV] error: %s",
+			                   cepid, itron_strerror(nblk_rlen));
+			break;
+			}
+		else if (nblk_rlen == 0)
+			break;
+
+		rlen = nblk_rlen;
+		head = *buffer;
+		tail = *(buffer + rlen - 1);
+		rcount ++;
+
+#ifdef SHOW_RCV_RANGE
+		syslog(LOG_NOTICE, "[TES:%02d RCV] rcount: %4d, len: %4d, data %02x -> %02x",
+		                   cepid, rcount, rlen, head, tail);
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+
+		total += rlen;
+		soff = 0;
+		while (rlen > 0) {
+			scount ++;
+			if ((error = tcp_snd_dat(cepid, &buffer[soff], rlen, TMO_NBLK)) != E_WBLK) {
+				syslog(LOG_NOTICE, "[TES:%02d SND] error: %s",
+				                   cepid, itron_strerror(error));
+				goto err_fin;
+				}
+
+			/* éä¿¡å®äºã¾ã§å¾
+ã¤ã*/
+			syscall(wai_sem(SEM_TCP_ECHO_SRV_NBLK_READY));
+
+			if (nblk_slen < 0) {
+				syslog(LOG_NOTICE, "[TES:%02d SND] error: %s",
+				                   cepid, itron_strerror(nblk_slen));
+				goto err_fin;
+				}
+
+			slen = nblk_slen;
+
+#ifdef SHOW_RCV_RANGE
+			syslog(LOG_NOTICE, "[TES:%02d SND] scount: %4d, len: %4d",
+			                   cepid, scount, slen);
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+
+			rlen -= slen;
+			soff += slen;
+			}
+		}
+err_fin:
+
+#ifdef USE_TCP_SHT_CEP
+	if ((error = tcp_sht_cep(cepid)) != E_OK)
+		syslog(LOG_NOTICE, "[TES:%02d SHT] error: %s", cepid, itron_strerror(error));
+#endif	/* of #ifdef USE_TCP_SHT_CEP */
+
+	if ((error = tcp_cls_cep(cepid, TMO_NBLK)) != E_WBLK)
+		syslog(LOG_NOTICE, "[TES:%02d CLS] error: %s", cepid, itron_strerror(error));
+
+	/* éæ¾ãå®äºããã¾ã§å¾
+ã¤ã*/
+	syscall(wai_sem(SEM_TCP_ECHO_SRV_NBLK_READY));
+
+	syscall(get_tim(&now));
+	syslog(LOG_NOTICE, "[TES:%02d FIN] finished:   %6lu, snd: %4u, rcv: %4u, len: %lu",
+	                   cepid, now / SYSTIM_HZ, scount, rcount, total);
+
+	return error == E_WBLK ? E_OK : error;
+	}
+
+#endif	/* of #ifdef USE_COPYSAVE_API */
+
+#else	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#ifdef USE_COPYSAVE_API
+
+static ER
+tcp_echo_srv (ID cepid, ID repid)
+{
+	ER_UINT		rblen, sblen;
+	SYSTIM		now;
+	ER		error;
+	uint32_t	total;
+	uint16_t	rlen, slen, soff, scount, rcount;
+	char		*rbuf, *sbuf, head, tail;
+
+	if ((error = TCP_ACP_CEP(cepid, repid, &dst, TMO_FEVR)) != E_OK) {
+		syslog(LOG_NOTICE, "[TES:%02d ACP] error: %s", cepid, itron_strerror(error));
+		return error;
+		}
+
+#ifdef USE_TCP_EXTENTIONS
+	if ((error = free_tcp_rep(repid, true)) != E_OK)
+		syslog(LOG_NOTICE, "[TES:%02d DEL] REP delete error: %s", cepid, itron_strerror(error));
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+	scount = rcount = total = 0;
+	syscall(get_tim(&now));
+	syslog(LOG_NOTICE, "[TES:%02d ACP] connected:  %6lu, from: %s.%u",
+	                   cepid, now / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno);
+	while (true) {
+		if ((rblen = tcp_rcv_buf(cepid, (void**)&rbuf, RCV_TMO)) <= 0) {
+			if (rblen != E_OK)
+				syslog(LOG_NOTICE, "[TES:%02d RCV] error: %s",
+				                   cepid, itron_strerror(rblen));
+			break;
+			}
+
+		head = *rbuf;
+		tail = *(rbuf + rblen - 1);
+		rcount ++;
+
+		//syslog(LOG_NOTICE, "[TES:%02d RCV] len: %4d", cepid, (uint16_t)rblen);
+#ifdef SHOW_RCV_RANGE
+		syslog(LOG_NOTICE, "[TES:%02d RCV] rcount: %4d, len: %4d, data %02x -> %02x",
+		       cepid, rcount, (uint16_t)rblen, head, tail);
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+
+		rlen   = (uint16_t)rblen;
+		total +=     rblen;
+		soff = 0;
+		while (rlen > 0) {
+
+			if ((sblen = tcp_get_buf(cepid, (void**)&sbuf, SND_TMO)) < 0) {
+				syslog(LOG_NOTICE, "[TES:%02d GET] error: %s",
+				                   cepid, itron_strerror(sblen));
+				goto err_fin;
+				}
+
+			//syslog(LOG_NOTICE, "[TES:%02d SND] len: %4d", cepid, (uint16_t)sblen);
+			scount ++;
+			slen = rlen < (uint16_t)sblen ? rlen : (uint16_t)sblen;
+			memcpy(sbuf, rbuf + soff, slen);
+			if ((error = tcp_snd_buf(cepid, slen)) != E_OK) {
+				syslog(LOG_NOTICE, "[TES:%02d SND] error: %s",
+				                   cepid, itron_strerror(error));
+				goto err_fin;
+				}
+#ifdef SHOW_RCV_RANGE
+			syslog(LOG_NOTICE, "[TES:%02d SND] scount: %4d, len: %4d", cepid, scount, slen);
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+
+			rlen -= slen;
+			soff += slen;
+			}
+
+		if ((error = tcp_rel_buf(cepid, rblen)) < 0) {
+			syslog(LOG_NOTICE, "[TES:%02d REL] error: %s", cepid, itron_strerror(error));
+			break;
+			}
+		}
+err_fin:
+
+#ifdef USE_TCP_SHT_CEP
+	if ((error = tcp_sht_cep(cepid)) != E_OK)
+		syslog(LOG_NOTICE, "[TES:%02d SHT] error: %s", cepid, itron_strerror(error));
+#endif	/* of #ifdef USE_TCP_SHT_CEP */
+
+	if ((error = tcp_cls_cep(cepid, CLS_TMO)) != E_OK)
+		syslog(LOG_NOTICE, "[TES:%02d CLS] error: %s", cepid, itron_strerror(error));
+
+	syscall(get_tim(&now));
+	syslog(LOG_NOTICE, "[TES:%02d FIN] finished:   %6lu, snd: %4u, rcv: %4u, len: %lu",
+	                   cepid, now / SYSTIM_HZ, scount, rcount, total);
+
+	return error;
+	}
+
+#else	/* of #ifdef USE_COPYSAVE_API */
+
+/*
+ *  tcp_echo_srv -- TCP ã¨ã³ã¼ãµã¼ã
+ */
+
+static ER
+tcp_echo_srv (ID cepid, ID repid)
+{
+	ER_UINT		rlen, slen;
+	ER		error = E_OK;
+	SYSTIM		now;
+	uint32_t	total;
+	uint16_t	soff, scount, rcount;
+
+	if ((error = TCP_ACP_CEP(cepid, repid, &dst, TMO_FEVR)) != E_OK) {
+		syslog(LOG_NOTICE, "[TES:%02d ACP] error: %s", cepid, itron_strerror(error));
+		return error;
+		}
+
+#ifdef USE_TCP_EXTENTIONS
+	if ((error = free_tcp_rep(repid, true)) != E_OK)
+		syslog(LOG_NOTICE, "[TES:%02d DEL] REP delete error: %s", cepid, itron_strerror(error));
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+	scount = rcount = total = 0;
+	syscall(get_tim(&now));
+	syslog(LOG_NOTICE, "[TES:%02d ACP] connected:  %6lu, from: %s.%u",
+	                   cepid, now / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno);
+	while (true) {
+		if ((rlen = tcp_rcv_dat(cepid, buffer, BUF_SIZE - 1, RCV_TMO)) <= 0) {
+			if (rlen != E_OK)
+				syslog(LOG_NOTICE, "[TES:%02d RCV] error: %s",
+				                   cepid, itron_strerror(rlen));
+			break;
+			}
+
+		rcount ++;
+#ifdef SHOW_RCV_RANGE
+		syslog(LOG_NOTICE, "[TES:%02d RCV] rcount: %4d, len: %4d, data %02x -> %02x",
+		       cepid, rcount, (uint16_t)rlen, *buffer, *(buffer + rlen - 1));
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+
+		total += rlen;
+		soff = 0;
+		while (rlen > 0) {
+			scount ++;
+			if ((slen = tcp_snd_dat(cepid, &buffer[soff], rlen, SND_TMO)) < 0) {
+				syslog(LOG_NOTICE, "[TES:%02d SND] error: %s",
+				                   cepid, itron_strerror(slen));
+				goto err_fin;
+				}
+#ifdef SHOW_RCV_RANGE
+			syslog(LOG_NOTICE, "[TES:%02d SND] scount: %4d, len: %4d", cepid, scount, (uint16_t)slen);
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+
+			rlen -= slen;
+			soff += slen;
+			}
+		}
+err_fin:
+
+#ifdef USE_TCP_SHT_CEP
+	if ((error = tcp_sht_cep(cepid)) != E_OK)
+		syslog(LOG_NOTICE, "[TES:%02d SHT] error: %s", cepid, itron_strerror(error));
+#endif	/* of #ifdef USE_TCP_SHT_CEP */
+
+	if ((error = tcp_cls_cep(cepid, CLS_TMO)) != E_OK)
+		syslog(LOG_NOTICE, "[TES:%02d CLS] error: %s", cepid, itron_strerror(error));
+
+	syscall(get_tim(&now));
+	syslog(LOG_NOTICE, "[TES:%02d FIN] finished:   %6lu, snd: %4u, rcv: %4u, len: %lu",
+	                   cepid, now / SYSTIM_HZ, scount, rcount, total);
+
+	return error;
+	}
+
+#endif	/* of #ifdef USE_COPYSAVE_API */
+
+#endif	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#ifdef USE_TCP_EXTENTIONS
+
+/*
+ *  get_tcp_rep -- TCP åä»å£ãç²å¾ããã
+ */
+
+static ER
+get_tcp_rep (ID *repid)
+{
+	ID		tskid;
+	T_TCP_CREP	crep;
+
+	get_tid(&tskid);
+
+	crep.repatr = UINT_C(0);
+	crep.myaddr.portno = UINT_C(7);
+
+#if defined(SUPPORT_INET4)
+	crep.myaddr.ipaddr = IPV4_ADDRANY;
+#endif
+
+#if defined(SUPPORT_INET6)
+	memcpy(&crep.myaddr.ipaddr, &ipv6_addrany, sizeof(T_IN6_ADDR));
+#endif
+
+	return alloc_tcp_rep(repid, tskid, &crep);
+	}
+
+/*
+ *  get_tcp_cep -- TCP éä¿¡ç«¯ç¹ã¨ãç²å¾ããã
+ */
+
+static ER
+get_tcp_cep (ID *cepid)
+{
+	ID		tskid;
+	T_TCP_CCEP	ccep;
+
+	get_tid(&tskid);
+
+	ccep.cepatr = UINT_C(0);
+	ccep.sbufsz = TCP_ECHO_SRV_SWBUF_SIZE;
+	ccep.rbufsz = TCP_ECHO_SRV_RWBUF_SIZE;
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+	ccep.sbuf = NADR;
+#else
+	ccep.sbuf = tcp_echo_srv_swbuf;
+#endif
+#ifdef TCP_CFG_RWBUF_CSAVE
+	ccep.rbuf = NADR;
+#else
+	ccep.rbuf = tcp_echo_srv_rwbuf;
+#endif
+#ifdef USE_TCP_NON_BLOCKING
+	ccep.callback = (FP)callback_nblk_tcp_echo_srv;
+#else
+	ccep.callback = NULL;
+#endif
+
+	return alloc_tcp_cep(cepid, tskid, &ccep);
+	}
+
+/*
+ *  tcp_echo_srv_task -- TCP ã¨ã³ã¼ãµã¼ãã¿ã¹ã¯
+ */
+
+void
+tcp_echo_srv_task (intptr_t exinf)
+{
+	ID	tskid, cepid, repid;
+	ER	error = E_OK;
+
+	syscall(get_tid(&tskid));
+	syslog(LOG_NOTICE, "[TCP ECHO SRV:%d] started.", tskid);
+	while (true) {
+
+		syscall(slp_tsk());
+		if ((error = get_tcp_cep (&cepid)) != E_OK) {
+			syslog(LOG_NOTICE, "[TES:00 EXT] CEP create error: %s", itron_strerror(error));
+			continue;
+			}
+
+		while (true) {
+
+			if ((error = get_tcp_rep (&repid)) != E_OK) {
+				syslog(LOG_NOTICE, "[TES:00 EXT] REP create error: %s", itron_strerror(error));
+				break;
+				}
+			else if ((error = tcp_echo_srv(cepid, repid)) != E_OK) {
+				error = free_tcp_rep(repid, error != E_DLT);
+				break;
+				}
+			}
+
+		if ((error = free_tcp_cep(cepid)) != E_OK)
+			syslog(LOG_NOTICE, "[TES:%02d EXT] CEP delete error: %s", cepid, itron_strerror(error));
+
+		}
+	}
+
+#else	/* of #ifdef USE_TCP_EXTENTIONS */
+
+/*
+ *  tcp_echo_srv_task -- TCP ã¨ã³ã¼ãµã¼ãã¿ã¹ã¯
+ */
+
+void
+tcp_echo_srv_task(intptr_t exinf)
+{
+	ID	tskid;
+	ER	error;
+
+	syscall(get_tid(&tskid));
+	syslog(LOG_NOTICE, "[TCP ECHO SRV:%d,%d] started.", tskid, (ID)exinf);
+	while (true) {
+		while ((error = tcp_echo_srv((ID)exinf, TCP_ECHO_SRV_REPID)) == E_OK)
+			;
+		syslog(LOG_NOTICE, "[TES:%02d] goto sleep 60[s], error: %s", (ID)exinf, itron_strerror(error));
+		tslp_tsk(60 * 1000);
+		}
+	}
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+#endif	/* of #ifdef USE_TCP_ECHO_SRV1 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_echo_srv1.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_echo_srv1.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_echo_srv1.cfg	(revision 270)
@@ -0,0 +1,178 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  TCP ECHO ãµã¼ã #1ãéåä¿¡ã¿ã¹ã¯åä¸å
+ *  ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_TCP_ECHO_SRV1
+
+/* ã¿ã¹ã¯ */
+
+#ifdef USE_TCP_EXTENTIONS
+
+CRE_TSK(TCP_ECHO_SRV_TASK,  {
+	TA_HLNG | TA_ACT,
+	0,
+	tcp_echo_srv_task,
+	TCP_ECHO_SRV_MAIN_PRIORITY,
+	TCP_ECHO_SRV_STACK_SIZE,
+	NULL
+	});
+
+#else	/* of #ifdef USE_TCP_EXTENTIONS */
+
+CRE_TSK(TCP_ECHO_SRV_TASK,  {
+	TA_HLNG | TA_ACT,
+	TCP_ECHO_SRV_CEPID1,
+	tcp_echo_srv_task,
+	TCP_ECHO_SRV_MAIN_PRIORITY,
+	TCP_ECHO_SRV_STACK_SIZE,
+	NULL
+	});
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 2
+
+CRE_TSK(TCP_ECHO_SRV_TASK2,  {
+	TA_HLNG | TA_ACT,
+	TCP_ECHO_SRV_CEPID2,
+	tcp_echo_srv_task,
+	TCP_ECHO_SRV_MAIN_PRIORITY,
+	TCP_ECHO_SRV_STACK_SIZE,
+	NULL
+	});
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 2 */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 3
+
+CRE_TSK(TCP_ECHO_SRV_TASK3,  {
+	TA_HLNG | TA_ACT,
+	TCP_ECHO_SRV_CEPID3,
+	tcp_echo_srv_task,
+	TCP_ECHO_SRV_MAIN_PRIORITY,
+	TCP_ECHO_SRV_STACK_SIZE,
+	NULL
+	});
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 3 */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 4
+
+CRE_TSK(TCP_ECHO_SRV_TASK4,  {
+	TA_HLNG | TA_ACT,
+	TCP_ECHO_SRV_CEPID4,
+	tcp_echo_srv_task,
+	TCP_ECHO_SRV_MAIN_PRIORITY,
+	TCP_ECHO_SRV_STACK_SIZE,
+	NULL
+	});
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 4 */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 5
+
+CRE_TSK(TCP_ECHO_SRV_TASK5,  {
+	TA_HLNG | TA_ACT,
+	TCP_ECHO_SRV_CEPID5,
+	tcp_echo_srv_task,
+	TCP_ECHO_SRV_MAIN_PRIORITY,
+	TCP_ECHO_SRV_STACK_SIZE,
+	NULL
+	});
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 5 */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 6
+
+CRE_TSK(TCP_ECHO_SRV_TASK6,  {
+	TA_HLNG | TA_ACT,
+	TCP_ECHO_SRV_CEPID6,
+	tcp_echo_srv_task,
+	TCP_ECHO_SRV_MAIN_PRIORITY,
+	TCP_ECHO_SRV_STACK_SIZE,
+	NULL
+	});
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 6 */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 7
+
+CRE_TSK(TCP_ECHO_SRV_TASK7,  {
+	TA_HLNG | TA_ACT,
+	TCP_ECHO_SRV_CEPID7,
+	tcp_echo_srv_task,
+	TCP_ECHO_SRV_MAIN_PRIORITY,
+	TCP_ECHO_SRV_STACK_SIZE,
+	NULL
+	});
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 7 */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 8
+
+CRE_TSK(TCP_ECHO_SRV_TASK8,  {
+	TA_HLNG | TA_ACT,
+	TCP_ECHO_SRV_CEPID8,
+	tcp_echo_srv_task,
+	TCP_ECHO_SRV_MAIN_PRIORITY,
+	TCP_ECHO_SRV_STACK_SIZE,
+	NULL
+	});
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 8 */
+
+/* ã»ããã© */
+
+#ifdef USE_TCP_NON_BLOCKING
+
+CRE_SEM(SEM_TCP_ECHO_SRV_NBLK_READY,	{ TA_TPRI, 0, 1 });
+
+#endif	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#endif	/* of #ifdef USE_TCP_ECHO_SRV1 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_echo_srv2.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_echo_srv2.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_echo_srv2.c	(revision 270)
@@ -0,0 +1,788 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  TCP ECHO ãµã¼ã #2
+ *
+ *    ã»éåä¿¡ã¿ã¹ã¯åé¢å
+ *    ã»ãã³ãã­ãã­ã³ã°ã³ã¼ã«
+ *    ã»IPv4/IPv6
+ */
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+#include "tinet_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <t_services.h>
+#include "kernel_id.h"
+#include "tinet_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/net_timer.h>
+
+#include <netinet/in.h>
+#include <netinet/in_itron.h>
+#include <netinet/ip.h>
+#include <netinet/ip6.h>
+#include <netinet/tcp.h>
+
+#include <netapp/netapp.h>
+#include <netapp/netapp_var.h>
+#include <netapp/echo.h>
+
+#ifdef USE_TCP_ECHO_SRV2
+
+/*
+ *  è¡¨ç¤º
+ */
+
+/*#define SHOW_RCV_RANGE*/
+
+/*
+ *  ã³ãã¯ã·ã§ã³åæ­æ¹æ³ã®æå®
+ */
+
+/*#define USE_TCP_SHT_CEP*/
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+/* TCP éåä¿¡ã¦ã£ã³ããããã¡ */
+
+#ifndef TCP_CFG_SWBUF_CSAVE
+uint8_t tcp_echo_srv_swbuf[NUM_TCP_ECHO_SRV_TASKS][TCP_ECHO_SRV_SWBUF_SIZE];
+#endif
+
+#ifndef TCP_CFG_RWBUF_CSAVE
+uint8_t tcp_echo_srv_rwbuf[NUM_TCP_ECHO_SRV_TASKS][TCP_ECHO_SRV_RWBUF_SIZE];
+#endif
+
+/*
+ *  å¤æ°
+ */
+
+/*
+ *  æ³¨æ:
+ *
+ *    BUF_SIZE ã¯ TCP ã®
+ *    éä¿¡ã¦ã¤ã³ãã¦ãããã¡ãµã¤ãº + åä¿¡ã¦ã¤ã³ãã¦ãããã¡ãµã¤ãºã® 
+ *    3/2 åä»¥ä¸ã®å¤§ããããªããã°ããããã­ãã¯ããå¯è½æ§ãããã
+ */
+
+#define BUF_SIZE	((TCP_ECHO_SRV_SWBUF_SIZE + \
+                          TCP_ECHO_SRV_RWBUF_SIZE) * 3 / 2)
+
+static char	buffer[BUF_SIZE];	/* ãããã¡		*/
+
+static T_IPEP	dst;			/* æ¥ç¶ç¸æ		*/
+static bool_t	ena_rcv;		/* åä¿¡å¯è½ãã©ã°	*/
+static char	*rptr = buffer;		/* åä¿¡ãã¤ã³ã¿		*/
+static char	*sptr = buffer;		/* éä¿¡ãã¤ã³ã¿		*/
+static uint32_t	rcv_total;		/* åä¿¡æå­æ°		*/
+static uint32_t	snd_total;		/* éä¿¡æå­æ°		*/
+static uint16_t	chars;			/* ãããã¡å
+ã®æå­æ°	*/
+static uint16_t	rcv_count;		/* åä¿¡åæ°		*/
+static uint16_t	snd_count;		/* éä¿¡åæ°		*/
+
+#ifdef USE_TCP_NON_BLOCKING
+
+static ER	rcv_error = E_OK;	/* åä¿¡ããã³ãã­ãã­ã³ã°ã³ã¼ã«ã¨ã©ã¼ */
+static ER	snd_error = 1;		/* éä¿¡ããã³ãã­ãã­ã³ã°ã³ã¼ã«ã¨ã©ã¼ */
+
+/*
+ *  ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã®ã³ã¼ã«ããã¯é¢æ°
+ */
+
+ER
+callback_nblk_tcp_echo_srv (ID cepid, FN fncd, void *p_parblk)
+{
+	ER		error = E_OK;
+	ER_UINT		slen, rlen;
+	SYSTIM		now;
+	uint16_t	last;
+	char		head, tail;
+
+	get_tim(&now);
+
+	switch (fncd) {
+
+	case TFN_TCP_ACP_CEP:
+		rcv_error = *(ER*)p_parblk;
+		if (rcv_error == E_OK) {
+			sptr = rptr = buffer;
+			snd_count = snd_total = rcv_count = rcv_total = chars = 0;
+			snd_error = 1;
+			ena_rcv   = true;
+			syslog(LOG_NOTICE, "[TES:%02d CBN] connected:  %6ld, from: %s.%d",
+			                   cepid, now / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno);
+			}
+		else
+			syslog(LOG_NOTICE, "[TES:%02d CBN] accept error: %s\n", cepid, itron_strerror(rcv_error));
+
+		syscall(sig_sem(SEM_TCP_ECHO_SRV_RCV_READY));
+		break;
+
+	case TFN_TCP_SND_DAT:
+		slen = snd_error = *(ER*)p_parblk;
+		if (slen > 0) {
+			head = *sptr;
+			tail = *(sptr + slen - 1);
+#ifdef SHOW_RCV_RANGE
+			syslog(LOG_NOTICE, "[TES:%02d CBN] send len: %4d, data %02x -> %02x",
+			                   cepid, (uint16_t)slen, head, tail);
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+			snd_count ++;
+			snd_total += slen;
+
+			syscall(wai_sem(SEM_TCP_ECHO_SRV_LOCK));
+
+			/* éä¿¡ãã¤ã³ã¿ãé²ããã*/
+			if (sptr - buffer + slen >= sizeof(buffer))
+				sptr -= sizeof(buffer) - slen;
+			else
+				sptr += slen;
+
+			/* ãããã¡å
+ã®æå­æ°ãæ¸ããã*/
+			last   = chars;
+			chars -= slen;
+
+ 			/* ãããã¡å
+ã«æå­ãããã°ãéä¿¡ã¿ã¹ã¯ãèµ·åºããã*/
+			if (chars > 0 || (!ena_rcv && chars == 0))
+				sig_sem(SEM_TCP_ECHO_SRV_SND_READY);
+
+ 			/* åä¿¡å¯è½ã§ããããã¡å
+ã«ç©ºããã§ããã°ãåä¿¡ã¿ã¹ã¯ãèµ·åºããã*/
+			if (ena_rcv && last == sizeof(buffer) && sizeof(buffer) - chars > 0)
+				syscall(sig_sem(SEM_TCP_ECHO_SRV_RCV_READY));
+
+			syscall(sig_sem(SEM_TCP_ECHO_SRV_LOCK));
+			}
+		else {
+			syslog(LOG_NOTICE, "[TES:%02d CBN] send error = %s", cepid, itron_strerror(snd_error));
+			sig_sem(SEM_TCP_ECHO_SRV_SND_READY);
+			}
+		break;
+
+	case TFN_TCP_RCV_DAT:
+		rlen = rcv_error = *(ER*)p_parblk;
+		if (rlen > 0) {
+			head = *rptr;
+			tail = *(rptr + rlen - 1);
+#ifdef SHOW_RCV_RANGE
+			syslog(LOG_NOTICE, "[TES:%02d CBN] recv len: %4d, data %02x -> %02x",
+			                   cepid, (uint16_t)rlen, head, tail);
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+			rcv_count ++;
+			rcv_total += rlen;
+
+			syscall(wai_sem(SEM_TCP_ECHO_SRV_LOCK));
+
+			/* åä¿¡ãã¤ã³ã¿ãé²ããã*/
+			if (rptr - buffer + rlen >= sizeof(buffer))
+				rptr -= sizeof(buffer) - rlen;
+			else
+				rptr += rlen;
+
+			/* ãããã¡å
+ã®æå­æ°ãå¢ããã*/
+			last   = chars;
+			chars += rlen;
+
+ 			/* ãããã¡å
+ã«æå­ãå
+¥ãã°ãéä¿¡ã¿ã¹ã¯ãèµ·åºããã*/
+			if (last == 0 && chars > 0)
+				sig_sem(SEM_TCP_ECHO_SRV_SND_READY);
+
+ 			/* ãããã¡å
+ã«ç©ºããããã°ãåä¿¡ã¿ã¹ã¯ãèµ·åºããã*/
+			if (sizeof(buffer) - chars > 0)
+				sig_sem(SEM_TCP_ECHO_SRV_RCV_READY);
+
+			syscall(sig_sem(SEM_TCP_ECHO_SRV_LOCK));
+			}
+		else {
+			if (rlen < 0)
+				syslog(LOG_NOTICE, "[TES:%02d CBN] recv error = %s", cepid, itron_strerror(rcv_error));
+			sig_sem(SEM_TCP_ECHO_SRV_RCV_READY);
+			}
+		break;
+
+	case TFN_TCP_CLS_CEP:
+		snd_error = *(ER*)p_parblk;
+		if (snd_error != E_OK)
+			syslog(LOG_NOTICE, "[TES:%02d CBN] close error = %s", cepid, itron_strerror(snd_error));
+
+		syslog(LOG_NOTICE, "[TES:%02d CBN] finished:   %6ld, snd: %4d, rcv: %4d, len: %ld",
+		                   cepid, now / SYSTIM_HZ, snd_count, rcv_count, snd_total);
+
+		sig_sem(SEM_TCP_ECHO_SRV_CLS_READY);
+		break;
+
+	case TFN_TCP_CON_CEP:
+	case TFN_TCP_GET_BUF:
+	case TFN_TCP_RCV_BUF:
+	case TFN_TCP_SND_OOB:
+	default:
+		error = E_PAR;
+		}
+	return error;
+	}
+
+/*
+ *  TCP ECHO ãµã¼ãåä¿¡ã«ã¼ãã³ (ãã³ãã­ãã­ã³ã°ã³ã¼ã«ä½¿ç¨)
+ */
+
+ER
+tcp_echo_srv_rcv (ID cepid, ID repid)
+{
+	ER		error;
+	uint16_t	blen;
+
+	if ((error = psnd_dtq(DTQ_TCP_ECHO_SRV_SND, (intptr_t)cepid)) != E_OK) {
+		syslog(LOG_NOTICE, "[TES:%02d RCV] sync error: %s", cepid, itron_strerror(error));
+		return error;
+		}
+
+	if ((error = TCP_ACP_CEP(cepid, repid, &dst, TMO_NBLK)) != E_WBLK) {
+		syslog(LOG_NOTICE, "[TES:%02d ACP] accept error = %s", cepid, itron_strerror(error));
+		return error;
+		}
+
+	/* ã³ãã¯ã·ã§ã³éè¨­å®äºã¾ã§å¾
+ã¤ã*/
+	syscall(wai_sem(SEM_TCP_ECHO_SRV_RCV_READY));
+
+	/* å¾
+ã£ã¦ããéã«ã¨ã©ã¼ã«ãªã£ãããã³ãã¯ã·ã§ã³ã®éè¨­å¾
+ã¡ã«æ»ãã*/
+	if (rcv_error != E_OK)
+		return rcv_error;
+
+#ifdef USE_TCP_EXTENTIONS
+	if ((error = free_tcp_rep(repid, true)) != E_OK) {
+		syslog(LOG_NOTICE, "[TES:%02d DEL] REP delete error: %s", cepid, itron_strerror(error));
+		return error;
+		}
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+	while (true) {
+
+		/* åä¿¡ãµã¤ãºãè¨ç®ããã*/
+		syscall(wai_sem(SEM_TCP_ECHO_SRV_LOCK));
+		if (sptr > rptr)
+			blen = sptr - rptr;
+		else
+			blen = sizeof(buffer) - (rptr - buffer);
+		syscall(sig_sem(SEM_TCP_ECHO_SRV_LOCK));
+
+		/* åä¿¡ããã*/
+		if ((error = tcp_rcv_dat(cepid, rptr, blen, TMO_NBLK)) != E_WBLK) {
+			syslog(LOG_NOTICE, "[TES:%02d RCV] recv error = %s", cepid, itron_strerror(error));
+			break;
+			}
+
+		/* åä¿¡ãããã¡ã«ç©ºãã§ããã¾ã§å¾
+ã¤ã*/
+		syscall(wai_sem(SEM_TCP_ECHO_SRV_RCV_READY));
+
+		/* å¾
+ã£ã¦ããéã«ãåä¿¡æå­æ°ã 0 ã«ãªãããã¨ã©ã¼ã«ãªã£ããçµäºããã*/
+		if (rcv_error <= 0)
+			break;
+
+		}
+
+	/* åä¿¡å®äº */
+	ena_rcv = false;
+
+	/* åä¿¡ãããã¡ã«æå­ãå
+¥ãã®ãå¾
+ã£ã¦ããéä¿¡ã¿ã¹ã¯ãèµ·åºããã*/
+	if (chars == 0)
+		sig_sem(SEM_TCP_ECHO_SRV_SND_READY);
+
+	/* ã³ãã¯ã·ã§ã³åæ­å®äºã¾ã§å¾
+ã¤ã*/
+	syscall(wai_sem(SEM_TCP_ECHO_SRV_CLS_READY));
+
+	return error == E_WBLK ? E_OK : error;
+	}
+
+/*
+ *  TCP ECHO ãµã¼ãéä¿¡ã¿ã¹ã¯ (ãã³ãã­ãã­ã³ã°ã³ã¼ã«ä½¿ç¨)
+ */
+
+void
+tcp_echo_srv_snd_task(intptr_t exinf)
+{
+	ER		error;
+	ID		tskid, cepid;
+	uint16_t	blen;
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[TCP ECHO SRV (NBLK) SND:%d] started.", tskid);
+	while (true) {
+		if ((error = rcv_dtq(DTQ_TCP_ECHO_SRV_SND, (intptr_t*)&cepid)) != E_OK) {
+			syslog(LOG_NOTICE, "[TES:%02d SND] sync error: %s",
+			                   cepid, itron_strerror(error));
+			continue;
+			}
+
+		while (true) {
+
+			/* ãããã¡ã«æå­ãå
+¥ãã¾ã§å¾
+ã¤ã*/
+			syscall(wai_sem(SEM_TCP_ECHO_SRV_SND_READY));
+
+			/* å¾
+ã£ã¦ããéã«ã¨ã©ã¼ã«ãªã£ããçµäºããã*/
+			if (snd_error <= 0)
+				break;
+
+			/* åä¿¡å®äºã§ããããã¡ã«æå­ããªããã°çµäºããã*/
+			if (!ena_rcv && chars == 0)
+				break;
+
+			/* éä¿¡ãµã¤ãºãè¨ç®ããã*/
+			syscall(wai_sem(SEM_TCP_ECHO_SRV_LOCK));
+			if (rptr > sptr)
+				blen = rptr - sptr;
+			else
+				blen = sizeof(buffer) - (sptr - buffer);
+			syscall(sig_sem(SEM_TCP_ECHO_SRV_LOCK));
+
+			/* éä¿¡ããã*/
+			if ((error = tcp_snd_dat(cepid, sptr, blen, TMO_NBLK)) != E_WBLK) {
+				syslog(LOG_NOTICE, "[TES:%02d SND] send error = %s", cepid, itron_strerror(error));
+				break;
+				}
+			}
+
+		/* åä¿¡ãããã¡ã«ç©ºãã§ãããå¾
+ã£ã¦ããåä¿¡ã¿ã¹ã¯ãèµ·åºããã*/
+		if (chars == sizeof(buffer))
+			sig_sem(SEM_TCP_ECHO_SRV_SND_READY);
+
+#ifdef USE_TCP_SHT_CEP
+		if ((error = tcp_sht_cep(cepid)) != E_OK)
+			syslog(LOG_NOTICE, "[TES:%02d SND] shutdown error = %s", cepid, itron_strerror(error));
+#endif	/* of #ifdef USE_TCP_SHT_CEP */
+
+		if ((error = tcp_cls_cep(cepid, TMO_NBLK)) != E_WBLK) {
+			syslog(LOG_NOTICE, "[TES:%02d SND] close error = %s", cepid, itron_strerror(error));
+			}
+
+		pol_sem(SEM_TCP_ECHO_SRV_SND_READY);
+		pol_sem(SEM_TCP_ECHO_SRV_RCV_READY);
+		}
+	}
+
+#else	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+/*
+ *  TCP ECHO ãµã¼ãåä¿¡ã«ã¼ãã³
+ */
+
+ER
+tcp_echo_srv_rcv (ID cepid, ID repid)
+{
+	ER_UINT		rlen;
+	ER		error;
+	SYSTIM		now;
+	uint16_t	blen, last;
+	char		head, tail;
+
+	if ((error = psnd_dtq(DTQ_TCP_ECHO_SRV_SND, (intptr_t)cepid)) != E_OK) {
+		syslog(LOG_NOTICE, "[TES:%02d RCV] sync error: %s", cepid, itron_strerror(error));
+		return error;
+		}
+
+	if ((error = TCP_ACP_CEP(cepid, repid, &dst, TMO_FEVR)) != E_OK) {
+		syslog(LOG_NOTICE, "[TES:%02d ACP] accept error = %s", cepid, itron_strerror(error));
+		return error;
+		}
+
+#ifdef USE_TCP_EXTENTIONS
+	if ((error = free_tcp_rep(repid, true)) != E_OK) {
+		syslog(LOG_NOTICE, "[TES:%02d DEL] REP delete error: %s", cepid, itron_strerror(error));
+		return error;
+		}
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+	syscall(get_tim(&now));
+	syslog(LOG_NOTICE, "[TES:%02d ACP] connected:  %6ld, from: %s.%d",
+	                   cepid, now / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno);
+	sptr = rptr = buffer;
+	snd_count = snd_total = rcv_count = rcv_total = chars = 0;
+	ena_rcv   = true;
+	while (true) {
+
+		/* åä¿¡ãµã¤ãºãè¨ç®ããã*/
+		syscall(wai_sem(SEM_TCP_ECHO_SRV_LOCK));
+		if (sptr > rptr)
+			blen = sptr - rptr;
+		else
+			blen = sizeof(buffer) - (rptr - buffer);
+		syscall(sig_sem(SEM_TCP_ECHO_SRV_LOCK));
+
+		/* åä¿¡ããã*/
+		if ((rlen = tcp_rcv_dat(cepid, rptr, blen, TMO_FEVR)) <= 0) {
+			if (rlen < 0)
+				syslog(LOG_NOTICE, "[TES:%02d RCV] recv error = %s",
+				                   cepid, itron_strerror(rlen));
+			break;
+			}
+		head = *rptr;
+		tail = *(rptr + rlen - 1);
+#ifdef SHOW_RCV_RANGE
+		syslog(LOG_NOTICE, "[TES:%02d RCV] len: %4d, data %02x -> %02x",
+		                   cepid, (uint16_t)rlen, head, tail);
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+		rcv_count ++;
+		rcv_total += rlen;
+
+		syscall(wai_sem(SEM_TCP_ECHO_SRV_LOCK));
+
+		/* åä¿¡ãã¤ã³ã¿ãé²ããã*/
+		if (rptr - buffer + rlen >= sizeof(buffer))
+			rptr -= sizeof(buffer) - rlen;
+		else
+			rptr += rlen;
+
+		/* ãããã¡å
+ã®æå­æ°ãå¢ããã*/
+		last   =     chars;
+		chars += (uint16_t)rlen;
+
+ 				/* ãããã¡å
+ã«æå­ãå
+¥ãã°ãéä¿¡ã¿ã¹ã¯ãèµ·åºããã*/
+		if (last == 0 && chars > 0)
+			sig_sem(SEM_TCP_ECHO_SRV_SND_READY);
+
+ 				/* ãããã¡å
+ã«ç©ºããããã°ãåä¿¡ã¿ã¹ã¯ãèµ·åºããã*/
+		if (sizeof(buffer) - chars > 0)
+			sig_sem(SEM_TCP_ECHO_SRV_RCV_READY);
+
+		syscall(sig_sem(SEM_TCP_ECHO_SRV_LOCK));
+
+		/* ãããã¡ã«ç©ºããã§ããã¾ã§å¾
+ã¤ã*/
+		syscall(wai_sem(SEM_TCP_ECHO_SRV_RCV_READY));
+		}
+
+	/* åä¿¡å®äº */
+	ena_rcv = false;
+
+	/* åä¿¡ãããã¡ã«æå­ãå
+¥ãã®ãå¾
+ã£ã¦ããéä¿¡ã¿ã¹ã¯ãèµ·åºããã*/
+	if (chars == 0)
+		sig_sem(SEM_TCP_ECHO_SRV_SND_READY);
+
+	/* ã³ãã¯ã·ã§ã³ã®åæ­ãå®äºããã¾ã§å¾
+ã¤ã*/
+	syscall(wai_sem(SEM_TCP_ECHO_SRV_CLS_READY));
+
+	return error;
+	}
+
+/*
+ *  TCP ECHO ãµã¼ãéä¿¡ã¿ã¹ã¯
+ */
+
+void
+tcp_echo_srv_snd_task(intptr_t exinf)
+{
+	ID		tskid, cepid;
+	ER		error;
+	ER_UINT		slen;
+	SYSTIM		now;
+	uint16_t	blen, last;
+	char		head, tail;
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[TCP ECHO SRV SND:%d] started.", tskid);
+	while (true) {
+		if ((error = rcv_dtq(DTQ_TCP_ECHO_SRV_SND, (intptr_t*)&cepid)) != E_OK) {
+			syslog(LOG_NOTICE, "[TES:%02d SND] sync error: %s",
+			                   cepid, itron_strerror(error));
+			continue;
+			}
+
+		while (true) {
+
+			/* ãããã¡ã«æå­ãå
+¥ãã¾ã§å¾
+ã¤ã*/
+			syscall(wai_sem(SEM_TCP_ECHO_SRV_SND_READY));
+
+			/* åä¿¡å®äºã§ããããã¡ã«æå­ããªããã°çµäºããã*/
+			if (!ena_rcv && chars == 0)
+				break;
+
+			/* éä¿¡ãµã¤ãºãè¨ç®ããã*/
+			syscall(wai_sem(SEM_TCP_ECHO_SRV_LOCK));
+			if (rptr > sptr)
+				blen = rptr - sptr;
+			else
+				blen = sizeof(buffer) - (sptr - buffer);
+			syscall(sig_sem(SEM_TCP_ECHO_SRV_LOCK));
+
+			if ((slen = tcp_snd_dat(cepid, sptr, blen, TMO_FEVR)) <= 0) {
+				syslog(LOG_NOTICE, "[TES:%02d SND] send error = %s", cepid, itron_strerror(slen));
+				break;
+				}
+
+			head = *sptr;
+			tail = *(sptr + slen - 1);
+#ifdef SHOW_RCV_RANGE
+			syslog(LOG_NOTICE, "[TES:%02d SND] len: %4d, data %02x -> %02x",
+			                   cepid, (uint16_t)slen, head, tail);
+#endif	/* of #ifdef SHOW_RCV_RANGE */
+			snd_count ++;
+			snd_total += slen;
+
+			syscall(wai_sem(SEM_TCP_ECHO_SRV_LOCK));
+
+			/* éä¿¡ãã¤ã³ã¿ãé²ããã*/
+			if (sptr - buffer + slen >= sizeof(buffer))
+				sptr -= sizeof(buffer) - slen;
+			else
+				sptr += slen;
+
+			/* ãããã¡å
+ã®æå­æ°ãæ¸ããã*/
+			last   =     chars;
+			chars -= (uint16_t)slen;
+
+			/* åä¿¡å®äºã§ããããã¡ã«æå­ããªããã°çµäºããã*/
+			if (!ena_rcv && chars == 0) {
+				syscall(sig_sem(SEM_TCP_ECHO_SRV_LOCK));
+				break;
+				}
+
+ 			/* ãããã¡å
+ã«æå­ãããã°ãéä¿¡ã¿ã¹ã¯ãèµ·åºããã*/
+			if (chars > 0)
+				sig_sem(SEM_TCP_ECHO_SRV_SND_READY);
+
+ 			/* åä¿¡å¯è½ã§ããããã¡å
+ã«ç©ºããã§ããã°ãåä¿¡ã¿ã¹ã¯ãèµ·åºããã*/
+			if (ena_rcv && last == sizeof(buffer) && sizeof(buffer) - chars > 0)
+				sig_sem(SEM_TCP_ECHO_SRV_RCV_READY);
+
+			syscall(sig_sem(SEM_TCP_ECHO_SRV_LOCK));
+			}
+
+		/* åä¿¡ãããã¡ã«ç©ºãã§ãããå¾
+ã£ã¦ããåä¿¡ã¿ã¹ã¯ãèµ·åºããã*/
+		if (chars == sizeof(buffer))
+			sig_sem(SEM_TCP_ECHO_SRV_SND_READY);
+
+#ifdef USE_TCP_SHT_CEP
+		if ((error = tcp_sht_cep(cepid)) != E_OK)
+			syslog(LOG_NOTICE, "[TES:%02d SND] shtudown error = %s", cepid, itron_strerror(error));
+#endif	/* of #ifdef USE_TCP_SHT_CEP */
+
+		if ((error = tcp_cls_cep(cepid, TMO_FEVR)) != E_OK)
+			syslog(LOG_NOTICE, "[TES:%02d SND] close error = %s", cepid, itron_strerror(error));
+
+		get_tim(&now);
+		syslog(LOG_NOTICE, "[TES:%02d SND] finished:   %6ld, snd: %4d, rcv: %4d, len: %ld",
+		                   cepid, now / SYSTIM_HZ, snd_count, rcv_count, snd_total);
+
+		sig_sem(SEM_TCP_ECHO_SRV_CLS_READY);
+
+		pol_sem(SEM_TCP_ECHO_SRV_SND_READY);
+		pol_sem(SEM_TCP_ECHO_SRV_RCV_READY);
+		}
+	}
+
+#endif	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#ifdef USE_TCP_EXTENTIONS
+
+/*
+ *  get_tcp_rep -- TCP åä»å£ãç²å¾ããã
+ */
+
+static ER
+get_tcp_rep (ID *repid)
+{
+	ID		tskid;
+	T_TCP_CREP	crep;
+
+	get_tid(&tskid);
+
+	crep.repatr = UINT_C(0);
+	crep.myaddr.portno = UINT_C(7);
+
+#if defined(SUPPORT_INET4)
+	crep.myaddr.ipaddr = IPV4_ADDRANY;
+#endif
+
+#if defined(SUPPORT_INET6)
+	memcpy(&crep.myaddr.ipaddr, &ipv6_addrany, sizeof(T_IN6_ADDR));
+#endif
+
+	return alloc_tcp_rep(repid, tskid, &crep);
+	}
+
+/*
+ *  get_tcp_cep -- TCP éä¿¡ç«¯ç¹ãç²å¾ããã
+ */
+
+static ER
+get_tcp_cep (ID *cepid)
+{
+	ID		tskid;
+	T_TCP_CCEP	ccep;
+
+	get_tid(&tskid);
+
+	ccep.cepatr = UINT_C(0);
+	ccep.sbufsz = TCP_ECHO_SRV_SWBUF_SIZE;
+	ccep.rbufsz = TCP_ECHO_SRV_RWBUF_SIZE;
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+	ccep.sbuf = NADR;
+#else
+	ccep.sbuf = tcp_echo_srv_swbuf;
+#endif
+#ifdef TCP_CFG_RWBUF_CSAVE
+	ccep.rbuf = NADR;
+#else
+	ccep.rbuf = tcp_echo_srv_rwbuf;
+#endif
+#ifdef USE_TCP_NON_BLOCKING
+	ccep.callback = (FP)callback_nblk_tcp_echo_srv;
+#else
+	ccep.callback = NULL;
+#endif
+
+	return alloc_tcp_cep(cepid, tskid, &ccep);
+	}
+
+/*
+ *  TCP ECHO ãµã¼ãåä¿¡ã¿ã¹ã¯
+ */
+
+void
+tcp_echo_srv_rcv_task (intptr_t exinf)
+{
+	ID	tskid, cepid, repid;
+	ER	error = E_OK;
+
+	syscall(get_tid(&tskid));
+	syslog(LOG_NOTICE, "[TCP ECHO SRV:%d] started.", tskid);
+	while (true) {
+
+		syscall(slp_tsk());
+		if ((error = get_tcp_cep (&cepid)) != E_OK) {
+			syslog(LOG_NOTICE, "[TES:00 EXT] CEP create error: %s", itron_strerror(error));
+			continue;
+			}
+
+		while (true) {
+
+			if ((error = get_tcp_rep (&repid)) != E_OK) {
+				syslog(LOG_NOTICE, "[TES:00 EXT] REP create error: %s", itron_strerror(error));
+				break;
+				}
+			else if ((error = tcp_echo_srv_rcv(cepid, repid)) != E_OK) {
+				error = free_tcp_rep(repid, error != E_DLT);
+				break;
+				}
+			}
+
+		if ((error = free_tcp_cep(cepid)) != E_OK)
+			syslog(LOG_NOTICE, "[TES:%02d EXT] CEP delete error: %s", cepid, itron_strerror(error));
+
+		}
+	}
+
+#else	/* of #ifdef USE_TCP_EXTENTIONS */
+
+void
+tcp_echo_srv_rcv_task(intptr_t exinf)
+{
+	ID	tskid;
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[TCP ECHO SRV RCV:%d,%d] started.", tskid, (ID)exinf);
+	while (true) {
+		while (tcp_echo_srv_rcv((ID)exinf, TCP_ECHO_SRV_REPID) == E_OK)
+			;
+		}
+	}
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+#endif	/* of #ifdef USE_TCP_ECHO_SRV2 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_echo_srv2.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_echo_srv2.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tcp_echo_srv2.cfg	(revision 270)
@@ -0,0 +1,108 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  TCP ECHO ãµã¼ã #2ãéåä¿¡ã¿ã¹ã¯åé¢å
+ *  ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_TCP_ECHO_SRV2
+
+/* ã¿ã¹ã¯ */
+
+#ifdef USE_TCP_EXTENTIONS
+
+CRE_TSK(TCP_ECHO_SRV_TASK,  {
+	TA_HLNG | TA_ACT,
+	0,
+	tcp_echo_srv_rcv_task,
+	TCP_ECHO_SRV_MAIN_PRIORITY,
+	TCP_ECHO_SRV_STACK_SIZE,
+	NULL
+	});
+
+CRE_TSK(TCP_ECHO_SRV_SND_TASK,  {
+	TA_HLNG | TA_ACT,
+	0,
+	tcp_echo_srv_snd_task,
+	TCP_ECHO_SRV_MAIN_PRIORITY,
+	TCP_ECHO_SRV_STACK_SIZE,
+	NULL
+	});
+
+#else	/* of #ifdef USE_TCP_EXTENTIONS */
+
+CRE_TSK(TCP_ECHO_SRV_TASK,  {
+	TA_HLNG | TA_ACT,
+	TCP_ECHO_SRV_CEPID1,
+	tcp_echo_srv_rcv_task,
+	TCP_ECHO_SRV_MAIN_PRIORITY,
+	TCP_ECHO_SRV_STACK_SIZE,
+	NULL
+	});
+
+CRE_TSK(TCP_ECHO_SRV_SND_TASK,  {
+	TA_HLNG | TA_ACT,
+	TCP_ECHO_SRV_CEPID1,
+	tcp_echo_srv_snd_task,
+	TCP_ECHO_SRV_MAIN_PRIORITY,
+	TCP_ECHO_SRV_STACK_SIZE,
+	NULL
+	});
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+/* ã³ãã³ãã­ã¥ã¼ */
+
+CRE_DTQ(DTQ_TCP_ECHO_SRV_SND,  { TA_TFIFO, 1, NULL });
+
+/* ã»ããã© */
+
+CRE_SEM(SEM_TCP_ECHO_SRV_LOCK,		{ TA_TPRI, 1, 1 });
+CRE_SEM(SEM_TCP_ECHO_SRV_RCV_READY,	{ TA_TPRI, 0, 1 });
+CRE_SEM(SEM_TCP_ECHO_SRV_SND_READY,	{ TA_TPRI, 0, 1 });
+CRE_SEM(SEM_TCP_ECHO_SRV_CLS_READY,	{ TA_TPRI, 0, 1 });
+
+#endif	/* of #ifdef USE_TCP_ECHO_SRV2 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_dbg_cons.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_dbg_cons.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_dbg_cons.cfg	(revision 270)
@@ -0,0 +1,155 @@
+/*
+ *  TINET (UDP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  ãããã°ã³ã³ã½ã¼ã«
+ *  TCP/IP ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_DBG_CONS
+
+#ifdef USE_TCP_EXTENTIONS
+
+/* TCP åä»å£ */
+
+#ifdef SUPPORT_INET4
+
+#if NUM_VRID_TCP_REPS >= 1
+VRID_TCP_REP (TCP_RSV_REPID1);
+#endif
+
+#if NUM_VRID_TCP_REPS >= 2
+VRID_TCP_REP (TCP_RSV_REPID2);
+#endif
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+#if NUM_VRID_TCP_REPS >= 1
+VRID_TCP6_REP (TCP_RSV_REPID1);
+#endif
+
+#if NUM_VRID_TCP_REPS >= 2
+VRID_TCP6_REP (TCP_RSV_REPID2);
+#endif
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+/* TCP éä¿¡ç«¯ç¹ */
+
+#ifdef SUPPORT_INET4
+
+#if NUM_VRID_TCP_CEPS >= 1
+VRID_TCP_CEP (TCP_RSV_CEPID1);
+#endif
+
+#if NUM_VRID_TCP_CEPS >= 2
+VRID_TCP_CEP (TCP_RSV_CEPID2);
+#endif
+
+#if NUM_VRID_TCP_CEPS >= 3
+VRID_TCP_CEP (TCP_RSV_CEPID3);
+#endif
+
+#if NUM_VRID_TCP_CEPS >= 4
+VRID_TCP_CEP (TCP_RSV_CEPID4);
+#endif
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+#if NUM_VRID_TCP_CEPS >= 1
+VRID_TCP6_CEP (TCP_RSV_CEPID1);
+#endif
+
+#if NUM_VRID_TCP_CEPS >= 2
+VRID_TCP6_CEP (TCP_RSV_CEPID2);
+#endif
+
+#if NUM_VRID_TCP_CEPS >= 3
+VRID_TCP6_CEP (TCP_RSV_CEPID3);
+#endif
+
+#if NUM_VRID_TCP_CEPS >= 4
+VRID_TCP6_CEP (TCP_RSV_CEPID4);
+#endif
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+#ifdef USE_UDP_EXTENTIONS
+
+/* UDP éä¿¡ç«¯ç¹ */
+
+#ifdef SUPPORT_INET4
+
+#if NUM_VRID_UDP_CEPS >= 1
+VRID_UDP_CEP (UDP_RSV_CEPID1);
+#endif
+
+#if NUM_VRID_UDP_CEPS >= 2
+VRID_UDP_CEP (UDP_RSV_CEPID2);
+#endif
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+#if NUM_VRID_UDP_CEPS >= 1
+VRID_UDP6_CEP (UDP_RSV_CEPID1);
+#endif
+
+#if NUM_VRID_UDP_CEPS >= 2
+VRID_UDP6_CEP (UDP_RSV_CEPID2);
+#endif
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifdef USE_UDP_EXTENTIONS */
+
+#endif	/* of #ifdef USE_DBG_CONS */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_net_cons.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_net_cons.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_net_cons.cfg	(revision 270)
@@ -0,0 +1,132 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  ãããã¯ã¼ã¯çµç±ã³ã³ã½ã¼ã«å
+¥åºå
+ *  TCP/IP ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_NET_CONS
+
+/* TCP åä»å£ */
+
+#ifdef SUPPORT_INET4
+
+TCP_CRE_REP (NET_CONS_REPID, {
+	0,
+	{ IPV4_ADDRANY, 23 }
+	} );
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+TCP6_CRE_REP (NET_CONS_REPID, {
+	0,
+	{ IPV6_ADDRANY, 23 }
+	} );
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+/* TCP éä¿¡ç«¯ç¹ */
+
+#ifdef SUPPORT_INET4
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+
+TCP_CRE_CEP (NET_CONS_CEPID, {
+	0,
+	NADR,
+	NET_CONS_SWBUF_SIZE,
+	NADR,
+	NET_CONS_RWBUF_SIZE,
+	callback_nblk_net_cons
+	} );
+
+#else	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+TCP_CRE_CEP (NET_CONS_CEPID, {
+	0,
+	net_cons_swbuf,
+	NET_CONS_SWBUF_SIZE,
+	net_cons_rwbuf,
+	NET_CONS_RWBUF_SIZE,
+	callback_nblk_net_cons
+	} );
+
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+
+TCP6_CRE_CEP (NET_CONS_CEPID, {
+	0,
+	NADR,
+	NET_CONS_SWBUF_SIZE,
+	NADR,
+	NET_CONS_RWBUF_SIZE,
+	callback_nblk_net_cons
+	} );
+
+#else	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+TCP6_CRE_CEP (NET_CONS_CEPID, {
+	0,
+	net_cons_swbuf,
+	NET_CONS_SWBUF_SIZE,
+	net_cons_rwbuf,
+	NET_CONS_RWBUF_SIZE,
+	callback_nblk_net_cons
+	} );
+
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifdef USE_NET_CONS */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_tcp_discard_cli.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_tcp_discard_cli.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_tcp_discard_cli.cfg	(revision 270)
@@ -0,0 +1,175 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  TCP DISCARD ã¯ã©ã¤ã¢ã³ã
+ *  TCP/IP ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_TCP_DISCARD_CLI
+
+#ifndef USE_TCP_EXTENTIONS
+
+/* TCP éä¿¡ç«¯ç¹ */
+
+#ifdef SUPPORT_INET4
+
+#ifdef USE_TCP_NON_BLOCKING
+
+#ifdef TCP_CFG_SWBUF_CSAVE_ONLY
+
+TCP_CRE_CEP (TCP_DISCARD_CLI_CEPID, {
+	0,
+	NADR,
+	TCP_DISCARD_CLI_SWBUF_SIZE,
+	NADR,
+	0,
+	callback_nblk_tcp_discard_cli
+	} );
+
+#else	/* of #ifdef TCP_CFG_SWBUF_CSAVE_ONLY */
+
+TCP_CRE_CEP (TCP_DISCARD_CLI_CEPID, {
+	0,
+	tcp_discard_cli_swbuf,
+	TCP_DISCARD_CLI_SWBUF_SIZE,
+	NADR,
+	0,
+	callback_nblk_tcp_discard_cli
+	} );
+
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE_ONLY */
+
+#else	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#ifdef TCP_CFG_SWBUF_CSAVE_ONLY
+
+TCP_CRE_CEP (TCP_DISCARD_CLI_CEPID, {
+	0,
+	NADR,
+	TCP_DISCARD_CLI_SWBUF_SIZE,
+	NADR,
+	0,
+	NULL
+	} );
+
+#else	/* of #ifdef TCP_CFG_SWBUF_CSAVE_ONLY */
+
+TCP_CRE_CEP (TCP_DISCARD_CLI_CEPID, {
+	0,
+	tcp_discard_cli_swbuf,
+	TCP_DISCARD_CLI_SWBUF_SIZE,
+	NADR,
+	0,
+	NULL
+	} );
+
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+#endif	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+#ifdef USE_TCP_NON_BLOCKING
+
+#ifdef TCP_CFG_SWBUF_CSAVE_ONLY
+
+TCP6_CRE_CEP (TCP_DISCARD_CLI_CEPID, {
+	0,
+	NADR,
+	TCP_DISCARD_CLI_SWBUF_SIZE,
+	NADR,
+	0,
+	callback_nblk_tcp_discard_cli
+	} );
+
+#else	/* of #ifdef TCP_CFG_SWBUF_CSAVE_ONLY */
+
+TCP6_CRE_CEP (TCP_DISCARD_CLI_CEPID, {
+	0,
+	tcp_discard_cli_swbuf,
+	TCP_DISCARD_CLI_SWBUF_SIZE,
+	NADR,
+	0,
+	callback_nblk_tcp_discard_cli
+	} );
+
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE_ONLY */
+
+#else	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#ifdef TCP_CFG_SWBUF_CSAVE_ONLY
+
+TCP6_CRE_CEP (TCP_DISCARD_CLI_CEPID, {
+	0,
+	NADR,
+	TCP_DISCARD_CLI_SWBUF_SIZE,
+	NADR,
+	0,
+	NULL
+	} );
+
+#else	/* of #ifdef TCP_CFG_SWBUF_CSAVE_ONLY */
+
+TCP6_CRE_CEP (TCP_DISCARD_CLI_CEPID, {
+	0,
+	tcp_discard_cli_swbuf,
+	TCP_DISCARD_CLI_SWBUF_SIZE,
+	NADR,
+	0,
+	NULL
+	} );
+
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+#endif	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef USE_TCP_EXTENTIONS */
+
+#endif	/* of #ifdef USE_TCP_DISCARD_CLI */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_tcp_discard_srv.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_tcp_discard_srv.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_tcp_discard_srv.cfg	(revision 270)
@@ -0,0 +1,134 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  TCP DISCARD ãµã¼ãã® TCP/IP ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_TCP_DISCARD_SRV
+
+#ifndef USE_TCP_EXTENTIONS
+
+/* TCP åä»å£ */
+
+#ifdef SUPPORT_INET4
+
+TCP_CRE_REP (TCP_DISCARD_SRV_REPID, {
+	0,
+	{ IPV4_ADDRANY, 9 }
+	} );
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+TCP6_CRE_REP (TCP_DISCARD_SRV_REPID, {
+	0,
+	{ IPV6_ADDRANY, 9 }
+	} );
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+/* TCP éä¿¡ç«¯ç¹ */
+
+#ifdef SUPPORT_INET4
+
+#ifdef TCP_CFG_RWBUF_CSAVE_ONLY
+
+TCP_CRE_CEP (TCP_DISCARD_SRV_CEPID, {
+	0,
+	NADR,
+	0,
+	NADR,
+	TCP_DISCARD_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#else	/* of #ifdef TCP_CFG_RWBUF_CSAVE_ONLY */
+
+TCP_CRE_CEP (TCP_DISCARD_SRV_CEPID, {
+	0,
+	NADR,
+	0,
+	tcp_discard_srv_rwbuf,
+	TCP_DISCARD_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#endif	/* of #ifdef TCP_CFG_RWBUF_CSAVE_ONLY */
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+#ifdef TCP_CFG_RWBUF_CSAVE_ONLY
+
+TCP6_CRE_CEP (TCP_DISCARD_SRV_CEPID, {
+	0,
+	NADR,
+	0,
+	NADR,
+	TCP_DISCARD_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#else	/* of #ifdef TCP_CFG_RWBUF_CSAVE_ONLY */
+
+TCP6_CRE_CEP (TCP_DISCARD_SRV_CEPID, {
+	0,
+	NADR,
+	0,
+	tcp_discard_srv_rwbuf,
+	TCP_DISCARD_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#endif	/* of #ifdef TCP_CFG_RWBUF_CSAVE_ONLY */
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef USE_TCP_EXTENTIONS */
+
+#endif	/* of #ifdef USE_TCP_DISCARD_SRV */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_tcp_echo_cli.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_tcp_echo_cli.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_tcp_echo_cli.cfg	(revision 270)
@@ -0,0 +1,295 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  TCP ECHO ã¯ã©ã¤ã¢ã³ã
+ *  TCP/IP ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_TCP_ECHO_CLI
+
+#ifndef USE_TCP_EXTENTIONS
+
+/* TCP éä¿¡ç«¯ç¹ */
+
+#ifdef SUPPORT_INET4
+
+#ifdef USE_TCP_NON_BLOCKING
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_CLI_CEPID, {
+	0,
+	NADR,
+	TCP_ECHO_CLI_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_CLI_RWBUF_SIZE,
+	callback_nblk_tcp_echo_cli
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_CLI_CEPID, {
+	0,
+	NADR,
+	TCP_ECHO_CLI_SWBUF_SIZE,
+	tcp_echo_cli_rwbuf,
+	TCP_ECHO_CLI_RWBUF_SIZE,
+	callback_nblk_tcp_echo_cli
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_CLI_CEPID, {
+	0,
+	tcp_echo_cli_swbuf,
+	TCP_ECHO_CLI_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_CLI_RWBUF_SIZE,
+	callback_nblk_tcp_echo_cli
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_CLI_CEPID, {
+	0,
+	tcp_echo_cli_swbuf,
+	TCP_ECHO_CLI_SWBUF_SIZE,
+	tcp_echo_cli_rwbuf,
+	TCP_ECHO_CLI_RWBUF_SIZE,
+	callback_nblk_tcp_echo_cli
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#else	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_CLI_CEPID, {
+	0,
+	NADR,
+	TCP_ECHO_CLI_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_CLI_RWBUF_SIZE,
+	NULL
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_CLI_CEPID, {
+	0,
+	NADR,
+	TCP_ECHO_CLI_SWBUF_SIZE,
+	tcp_echo_cli_rwbuf,
+	TCP_ECHO_CLI_RWBUF_SIZE,
+	NULL
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_CLI_CEPID, {
+	0,
+	tcp_echo_cli_swbuf,
+	TCP_ECHO_CLI_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_CLI_RWBUF_SIZE,
+	NULL
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_CLI_CEPID, {
+	0,
+	tcp_echo_cli_swbuf,
+	TCP_ECHO_CLI_SWBUF_SIZE,
+	tcp_echo_cli_rwbuf,
+	TCP_ECHO_CLI_RWBUF_SIZE,
+	NULL
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#endif	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+#ifdef USE_TCP_NON_BLOCKING
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_CLI_CEPID, {
+	0,
+	NADR,
+	TCP_ECHO_CLI_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_CLI_RWBUF_SIZE,
+	callback_nblk_tcp_echo_cli
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_CLI_CEPID, {
+	0,
+	NADR,
+	TCP_ECHO_CLI_SWBUF_SIZE,
+	tcp_echo_cli_rwbuf,
+	TCP_ECHO_CLI_RWBUF_SIZE,
+	callback_nblk_tcp_echo_cli
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_CLI_CEPID, {
+	0,
+	tcp_echo_cli_swbuf,
+	TCP_ECHO_CLI_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_CLI_RWBUF_SIZE,
+	callback_nblk_tcp_echo_cli
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_CLI_CEPID, {
+	0,
+	tcp_echo_cli_swbuf,
+	TCP_ECHO_CLI_SWBUF_SIZE,
+	tcp_echo_cli_rwbuf,
+	TCP_ECHO_CLI_RWBUF_SIZE,
+	callback_nblk_tcp_echo_cli
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#else	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_CLI_CEPID, {
+	0,
+	NADR,
+	TCP_ECHO_CLI_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_CLI_RWBUF_SIZE,
+	NULL
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_CLI_CEPID, {
+	0,
+	NADR,
+	TCP_ECHO_CLI_SWBUF_SIZE,
+	tcp_echo_cli_rwbuf,
+	TCP_ECHO_CLI_RWBUF_SIZE,
+	NULL
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_CLI_CEPID, {
+	0,
+	tcp_echo_cli_swbuf,
+	TCP_ECHO_CLI_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_CLI_RWBUF_SIZE,
+	NULL
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_CLI_CEPID, {
+	0,
+	tcp_echo_cli_swbuf,
+	TCP_ECHO_CLI_SWBUF_SIZE,
+	tcp_echo_cli_rwbuf,
+	TCP_ECHO_CLI_RWBUF_SIZE,
+	NULL
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#endif	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef USE_TCP_EXTENTIONS */
+
+#endif	/* of #ifdef USE_TCP_ECHO_CLI */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_tcp_echo_srv.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_tcp_echo_srv.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_tcp_echo_srv.cfg	(revision 270)
@@ -0,0 +1,1134 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  TCP ECHO ãµã¼ãã® TCP/IP ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#if defined(USE_TCP_ECHO_SRV1) || defined(USE_TCP_ECHO_SRV2)
+
+#ifndef USE_TCP_EXTENTIONS
+
+/* TCP åä»å£ */
+
+#ifdef SUPPORT_INET4
+
+TCP_CRE_REP (TCP_ECHO_SRV_REPID, {
+	0,
+	{ IPV4_ADDRANY, 7 }
+	} );
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+TCP6_CRE_REP (TCP_ECHO_SRV_REPID, {
+	0,
+	{ IPV6_ADDRANY, 7 }
+	} );
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+/* TCP éä¿¡ç«¯ç¹ */
+
+#ifdef SUPPORT_INET4
+
+#ifdef USE_TCP_NON_BLOCKING
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID1, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	callback_nblk_tcp_echo_srv
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID1, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	callback_nblk_tcp_echo_srv
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID1, {
+	0,
+	tcp_echo_srv_swbuf,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	callback_nblk_tcp_echo_srv
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID1, {
+	0,
+	tcp_echo_srv_swbuf,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	callback_nblk_tcp_echo_srv
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#else	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID1, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID1, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[0],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID1, {
+	0,
+	tcp_echo_srv_swbuf[0],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID1, {
+	0,
+	tcp_echo_srv_swbuf[0],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[0],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#ifdef USE_TCP_ECHO_SRV1
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 2
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID2, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID2, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[1],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID2, {
+	0,
+	tcp_echo_srv_swbuf[1],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID2, {
+	0,
+	tcp_echo_srv_swbuf[1],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[1],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 2 */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 3
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID3, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID3, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[2],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID3, {
+	0,
+	tcp_echo_srv_swbuf[2],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID3, {
+	0,
+	tcp_echo_srv_swbuf[2],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[2],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 3 */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 4
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID4, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID4, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[3],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID4, {
+	0,
+	tcp_echo_srv_swbuf[3],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID4, {
+	0,
+	tcp_echo_srv_swbuf[3],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[3],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 4 */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 5
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID5, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID5, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[4],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID5, {
+	0,
+	tcp_echo_srv_swbuf[4],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID5, {
+	0,
+	tcp_echo_srv_swbuf[4],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[4],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 5 */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 6
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID6, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID6, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[5],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID6, {
+	0,
+	tcp_echo_srv_swbuf[5],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID6, {
+	0,
+	tcp_echo_srv_swbuf[5],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[5],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 6 */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 7
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID7, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID7, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[6],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID7, {
+	0,
+	tcp_echo_srv_swbuf[6],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID7, {
+	0,
+	tcp_echo_srv_swbuf[6],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[6],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 7 */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 8
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID8, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID8, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[7],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID8, {
+	0,
+	tcp_echo_srv_swbuf[7],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (TCP_ECHO_SRV_CEPID8, {
+	0,
+	tcp_echo_srv_swbuf[7],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[7],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 8 */
+
+#endif	/* of #ifdef USE_TCP_ECHO_SRV1 */
+
+#endif	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+#ifdef USE_TCP_NON_BLOCKING
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID1, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	callback_nblk_tcp_echo_srv
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID1, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	callback_nblk_tcp_echo_srv
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID1, {
+	0,
+	tcp_echo_srv_swbuf,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	callback_nblk_tcp_echo_srv
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID1, {
+	0,
+	tcp_echo_srv_swbuf,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	callback_nblk_tcp_echo_srv
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#else	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID1, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID1, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[0],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID1, {
+	0,
+	tcp_echo_srv_swbuf[0],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID1, {
+	0,
+	tcp_echo_srv_swbuf[0],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[0],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#ifdef USE_TCP_ECHO_SRV1
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 2
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID2, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID2, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[1],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID2, {
+	0,
+	tcp_echo_srv_swbuf[1],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID2, {
+	0,
+	tcp_echo_srv_swbuf[1],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[1],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 2 */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 3
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID3, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID3, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[2],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID3, {
+	0,
+	tcp_echo_srv_swbuf[2],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID3, {
+	0,
+	tcp_echo_srv_swbuf[2],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[2],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 3 */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 4
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID4, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID4, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[3],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID4, {
+	0,
+	tcp_echo_srv_swbuf[3],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID4, {
+	0,
+	tcp_echo_srv_swbuf[3],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[3],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 4 */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 5
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID5, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID5, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[4],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID5, {
+	0,
+	tcp_echo_srv_swbuf[4],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID5, {
+	0,
+	tcp_echo_srv_swbuf[4],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[4],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 5 */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 6
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID6, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID6, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[5],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID6, {
+	0,
+	tcp_echo_srv_swbuf[5],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID6, {
+	0,
+	tcp_echo_srv_swbuf[5],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[5],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 6 */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 7
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID7, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID7, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[6],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID7, {
+	0,
+	tcp_echo_srv_swbuf[6],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID7, {
+	0,
+	tcp_echo_srv_swbuf[6],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[6],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 7 */
+
+#if NUM_TCP_ECHO_SRV_TASKS >= 8
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID8, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID8, {
+	0,
+	NADR,
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[7],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID8, {
+	0,
+	tcp_echo_srv_swbuf[7],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	NADR,
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (TCP_ECHO_SRV_CEPID8, {
+	0,
+	tcp_echo_srv_swbuf[7],
+	TCP_ECHO_SRV_SWBUF_SIZE,
+	tcp_echo_srv_rwbuf[7],
+	TCP_ECHO_SRV_RWBUF_SIZE,
+	NULL 
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#endif	/* of #if NUM_TCP_ECHO_SRV_TASKS >= 8 */
+
+#endif	/* of #ifdef USE_TCP_ECHO_SRV1 */
+
+#endif	/* of #ifdef USE_TCP_NON_BLOCKING */
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef USE_TCP_EXTENTIONS */
+
+#endif	/* of #if defined(USE_TCP_ECHO_SRV1) || defined(USE_TCP_ECHO_SRV2) */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_udp_discard_cli.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_udp_discard_cli.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_udp_discard_cli.cfg	(revision 270)
@@ -0,0 +1,79 @@
+/*
+ *  TINET (UDP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  UDP DISCARD ã¯ã©ã¤ã¢ã³ã
+ *  UDP/IP ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_UDP_DISCARD_CLI
+
+#ifndef USE_UDP_EXTENTIONS
+
+/* UDP éä¿¡ç«¯ç¹ */
+
+#ifdef SUPPORT_INET4
+
+UDP_CRE_CEP (UDP_DISCARD_CLI_CEPID, {
+	0,
+	{ IPV4_ADDRANY, UDP_PORTANY },
+	NULL
+	} );
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+UDP6_CRE_CEP (UDP_DISCARD_CLI_CEPID, { 
+	0,
+	{ IPV6_ADDRANY, UDP_PORTANY },
+	NULL
+	} );
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef USE_UDP_EXTENTIONS */
+
+#endif	/* of #ifdef USE_UDP_DISCARD_CLI */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_udp_echo_cli.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_udp_echo_cli.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_udp_echo_cli.cfg	(revision 270)
@@ -0,0 +1,127 @@
+/*
+ *  TINET (UDP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  UDP ECHO ã¯ã©ã¤ã¢ã³ã
+ *  TCP/IP ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_UDP_ECHO_CLI
+
+#ifndef USE_UDP_EXTENTIONS
+
+/* UDP éä¿¡ç«¯ç¹ */
+
+#ifdef SUPPORT_INET4
+
+#ifdef USE_UDP_NON_BLOCKING
+
+UDP_CRE_CEP (UDP_ECHO_CLI_CEPID, {
+	0,
+	{ IPV4_ADDRANY, UDP_PORTANY },
+	callback_nblk_udp_echo_cli
+	} );
+
+#else	/* of #ifdef USE_UDP_NON_BLOCKING */
+
+#ifdef USE_UDP_CALL_BACK
+
+UDP_CRE_CEP (UDP_ECHO_CLI_CEPID, {
+	0,
+	{ IPV4_ADDRANY, UDP_PORTANY },
+	callback_udp_echo_cli
+	} );
+
+#else	/* of #ifdef USE_UDP_CALL_BACK */
+
+UDP_CRE_CEP (UDP_ECHO_CLI_CEPID, {
+	0,
+	{ IPV4_ADDRANY, UDP_PORTANY },
+	NULL
+	} );
+
+#endif	/* of #ifdef USE_UDP_CALL_BACK */
+
+#endif	/* of #ifdef USE_UDP_NON_BLOCKING */
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+#ifdef USE_UDP_NON_BLOCKING
+
+UDP6_CRE_CEP (UDP_ECHO_CLI_CEPID, {
+	0,
+	{ IPV6_ADDRANY, UDP_PORTANY },
+	callback_nblk_udp_echo_cli
+	} );
+
+#else	/* of #ifdef USE_UDP_NON_BLOCKING */
+
+#ifdef USE_UDP_CALL_BACK
+
+UDP6_CRE_CEP (UDP_ECHO_CLI_CEPID, {
+	0,
+	{ IPV6_ADDRANY, UDP_PORTANY },
+	callback_udp_echo_cli
+	} );
+
+#else	/* of #ifdef USE_UDP_CALL_BACK */
+
+UDP6_CRE_CEP (UDP_ECHO_CLI_CEPID, {
+	0,
+	{ IPV6_ADDRANY, UDP_PORTANY },
+	NULL
+	} );
+
+#endif	/* of #ifdef USE_UDP_CALL_BACK */
+
+#endif	/* of #ifdef USE_UDP_NON_BLOCKING */
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef USE_UDP_EXTENTIONS */
+
+#endif	/* of #ifdef USE_UDP_ECHO_CLI */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_udp_echo_srv.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_udp_echo_srv.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_udp_echo_srv.cfg	(revision 270)
@@ -0,0 +1,127 @@
+/*
+ *  TINET (UDP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  UDP ECHO ãµã¼ã
+ *  UDP/IP ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_UDP_ECHO_SRV
+
+#ifndef USE_UDP_EXTENTIONS
+
+/* UDP éä¿¡ç«¯ç¹ */
+
+#ifdef SUPPORT_INET4
+
+#ifdef USE_UDP_NON_BLOCKING
+
+UDP_CRE_CEP (UDP_ECHO_SRV_CEPID, {
+	0,
+	{ IPV4_ADDRANY, 7 },
+	callback_nblk_udp_echo_srv
+	} );
+
+#else	/* of #ifdef USE_UDP_NON_BLOCKING */
+
+#ifdef USE_UDP_CALL_BACK
+
+UDP_CRE_CEP (UDP_ECHO_SRV_CEPID, {
+	0,
+	{ IPV4_ADDRANY, 7 },
+	callback_udp_echo_srv
+	} );
+
+#else	/* of #ifdef USE_UDP_CALL_BACK */
+
+UDP_CRE_CEP (UDP_ECHO_SRV_CEPID, {
+	0,
+	{ IPV4_ADDRANY, 7 },
+	NULL
+	} );
+
+#endif	/* of #ifdef USE_UDP_CALL_BACK */
+
+#endif	/* of #ifdef USE_UDP_NON_BLOCKING */
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+#ifdef USE_UDP_NON_BLOCKING
+
+UDP6_CRE_CEP (UDP_ECHO_SRV_CEPID, {
+	0,
+	{ IPV6_ADDRANY, 7 },
+	callback_nblk_udp_echo_srv
+	} );
+
+#else	/* of #ifdef USE_UDP_NON_BLOCKING */
+
+#ifdef USE_UDP_CALL_BACK
+
+UDP6_CRE_CEP (UDP_ECHO_SRV_CEPID, {
+	0,
+	{ IPV6_ADDRANY, 7 },
+	callback_udp_echo_srv
+	} );
+
+#else	/* of #ifdef USE_UDP_CALL_BACK */
+
+UDP6_CRE_CEP (UDP_ECHO_SRV_CEPID, {
+	0,
+	{ IPV6_ADDRANY, 7 },
+	NULL
+	} );
+
+#endif	/* of #ifdef USE_UDP_CALL_BACK */
+
+#endif	/* of #ifdef USE_UDP_NON_BLOCKING */
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef USE_UDP_EXTENTIONS */
+
+#endif	/* of #ifdef USE_UDP_ECHO_SRV */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_wwws.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_wwws.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/tinet_wwws.cfg	(revision 270)
@@ -0,0 +1,310 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  WWW ãµã¼ãã® TCP/IP ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_WWW_SRV
+
+#ifndef USE_TCP_EXTENTIONS
+
+/* TCP åä»å£ */
+
+#ifdef SUPPORT_INET4
+
+TCP_CRE_REP (WWW_SRV_REPID, {
+	0,
+	{ IPV4_ADDRANY, 80 }
+	} );
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+TCP6_CRE_REP (WWW_SRV_REPID, {
+	0,
+	{ IPV6_ADDRANY, 80 }
+	} );
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+/* TCP éä¿¡ç«¯ç¹ */
+
+#ifdef SUPPORT_INET4
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (WWW_SRV_CEPID1, {
+	0,
+	NADR,
+	WWW_SRV_SWBUF_SIZE,
+	NADR,
+	WWW_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (WWW_SRV_CEPID1, {
+	0,
+	NADR,
+	WWW_SRV_SWBUF_SIZE,
+	www_srv_rwbuf[0],
+	WWW_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (WWW_SRV_CEPID1, {
+	0,
+	www_srv_swbuf[0],
+	WWW_SRV_SWBUF_SIZE,
+	NADR,
+	WWW_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (WWW_SRV_CEPID1, {
+	0,
+	www_srv_swbuf[0],
+	WWW_SRV_SWBUF_SIZE,
+	www_srv_rwbuf[0],
+	WWW_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if NUM_WWW_SRV_TASKS >= 2
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (WWW_SRV_CEPID2, {
+	0,
+	NADR,
+	WWW_SRV_SWBUF_SIZE,
+	NADR,
+	WWW_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (WWW_SRV_CEPID2, {
+	0,
+	NADR,
+	WWW_SRV_SWBUF_SIZE,
+	www_srv_rwbuf[1],
+	WWW_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP_CRE_CEP (WWW_SRV_CEPID2, {
+	0,
+	www_srv_swbuf[1],
+	WWW_SRV_SWBUF_SIZE,
+	NADR,
+	WWW_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP_CRE_CEP (WWW_SRV_CEPID2, {
+	0,
+	www_srv_swbuf[1],
+	WWW_SRV_SWBUF_SIZE,
+	www_srv_rwbuf[1],
+	WWW_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#endif	/* of #if NUM_WWW_SRV_TASKS >= 2 */
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (WWW_SRV_CEPID1, {
+	0,
+	NADR,
+	WWW_SRV_SWBUF_SIZE,
+	NADR,
+	WWW_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (WWW_SRV_CEPID1, {
+	0,
+	NADR,
+	WWW_SRV_SWBUF_SIZE,
+	www_srv_rwbuf[0],
+	WWW_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (WWW_SRV_CEPID1, {
+	0,
+	www_srv_swbuf[0],
+	WWW_SRV_SWBUF_SIZE,
+	NADR,
+	WWW_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (WWW_SRV_CEPID1, {
+	0,
+	www_srv_swbuf[0],
+	WWW_SRV_SWBUF_SIZE,
+	www_srv_rwbuf[0],
+	WWW_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if NUM_WWW_SRV_TASKS >= 2
+
+#if defined(TCP_CFG_SWBUF_CSAVE)
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (WWW_SRV_CEPID2, {
+	0,
+	NADR,
+	WWW_SRV_SWBUF_SIZE,
+	NADR,
+	WWW_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (WWW_SRV_CEPID2, {
+	0,
+	NADR,
+	WWW_SRV_SWBUF_SIZE,
+	www_srv_rwbuf[1],
+	WWW_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#if defined(TCP_CFG_RWBUF_CSAVE)
+
+TCP6_CRE_CEP (WWW_SRV_CEPID2, {
+	0,
+	www_srv_swbuf[1],
+	WWW_SRV_SWBUF_SIZE,
+	NADR,
+	WWW_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#else	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+TCP6_CRE_CEP (WWW_SRV_CEPID2, {
+	0,
+	www_srv_swbuf[1],
+	WWW_SRV_SWBUF_SIZE,
+	www_srv_rwbuf[1],
+	WWW_SRV_RWBUF_SIZE,
+	NULL
+	} );
+
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) */
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE) */
+
+#endif	/* of #if NUM_WWW_SRV_TASKS >= 2 */
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef USE_TCP_EXTENTIONS */
+
+#endif	/* of #ifdef USE_WWW_SRV */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/udp_discard_cli.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/udp_discard_cli.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/udp_discard_cli.c	(revision 270)
@@ -0,0 +1,234 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  UDP DISCARD ã¯ã©ã¤ã¢ã³ã
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <t_services.h>
+#include "kernel_id.h"
+#include "tinet_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_var.h>
+#include <net/net_timer.h>
+
+#include <netinet/in.h>
+#include <netinet/ip.h>
+#include <netinet/ip6.h>
+#include <netinet/udp.h>
+#include <netinet/udp_var.h>
+#include <netinet/in_itron.h>
+
+#include <netapp/netapp.h>
+#include <netapp/netapp_var.h>
+#include <netapp/discard.h>
+
+#ifdef USE_UDP_DISCARD_CLI
+
+/* discard ãµã¼ãã®ãã¼ãçªå· */
+
+#define DISCARD_SRV_PORTNO	UINT_C(9)
+
+/*
+ * å¤æ°
+ */
+
+#define PAT_BEGIN	' '
+#define PAT_END		'~'
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+bool_t udp_discard_cli_valid;
+
+/*
+ *  send_udp_discard -- DISCARD/UDP ãµã¼ãã«ã¡ãã»ã¼ã¸ãéä¿¡ããã
+ */
+
+static ER
+send_udp_discard (ID cepid, T_IN_ADDR *ipaddr, uint16_t portno)
+{
+	static char smsg[IF_MTU - IP_UDP_HDR_SIZE];
+
+	T_IPEP		dst;
+	ER_UINT		len;
+	SYSTIM		time;
+	char		*p;
+	uint32_t	total;
+	uint16_t	pat, slen, scount;
+
+	dst.ipaddr = *ipaddr;
+	dst.portno = portno;
+
+	p = smsg;
+	for (slen = IF_MTU - IP_UDP_HDR_SIZE; slen > 0; )
+		for (pat = PAT_BEGIN; slen > 0 && pat <= PAT_END; pat ++, slen --)
+			*p ++ = pat;
+
+	get_tim(&time);
+	syslog(LOG_NOTICE, "[UDC:%02d SND] sending:    %6ld, to:   %s.%d",
+	                   cepid, time / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno);
+
+	scount = total = 0;
+	udp_discard_cli_valid = true;
+	for (slen = IF_MTU - IP_UDP_HDR_SIZE; udp_discard_cli_valid && slen > 0; slen --) {
+		scount ++;
+		if ((len = UDP_SND_DAT(cepid, &dst, smsg, slen, TMO_FEVR)) < 0) {
+			syslog(LOG_NOTICE, "[UDC:%02d SND] send error: %s", cepid, itron_strerror(len));
+			return len;
+			}
+		else
+			syslog(LOG_NOTICE, "[UDC:%02d SND] send: %4d, %4d", cepid, scount, slen);
+		total += len;
+		dly_tsk(10 * SYSTIM_HZ + net_rand() % (10 * SYSTIM_HZ));
+		}
+
+	get_tim(&time);
+	syslog(LOG_NOTICE, "[UDC:%02d SND] finished:   %6ld, snd: %4d,            len: %ld",
+		           cepid, time / SYSTIM_HZ, scount, total);
+	return E_OK;
+	}
+
+/*
+ *  UDP DISCARD ã¯ã©ã¤ã¢ã³ãéä¿¡ã¿ã¹ã¯
+ */
+
+void
+udp_discard_cli_task (intptr_t exinf)
+{
+	T_IN_ADDR	addr;
+	ID		tskid, cepid;
+	ER		error;
+	char		*line;
+	int_t		no;
+	uint16_t	portno;
+
+#ifdef USE_UDP_EXTENTIONS
+
+	T_UDP_CCEP	ccep;
+
+#endif	/* of #ifdef USE_UDP_EXTENTIONS */
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[UDP DISCARD CLI:%d,%d] started.", tskid, (ID)exinf);
+	while (true) {
+		if (rcv_dtq(DTQ_UDP_DISCARD_CLI, (intptr_t*)&line) == E_OK) {
+			line = skip_blanks(GET_IPADDR(&addr, skip_blanks(line)));	/* IP Address */
+
+			if ('0' <= *line && *line <= '9') {				/* Port No */
+				line = get_int(&no, line);
+				portno = (uint16_t)no;
+				}
+			else {
+				line ++;
+				portno = DISCARD_SRV_PORTNO;
+				}
+
+#ifdef USE_UDP_EXTENTIONS
+
+			ccep.cepatr = UINT_C(0);
+			ccep.callback = NULL;
+			ccep.myaddr.portno = UDP_PORTANY;
+
+#if defined(SUPPORT_INET4)
+			ccep.myaddr.ipaddr = IPV4_ADDRANY;
+#endif
+
+#if defined(SUPPORT_INET6)
+			memcpy(&ccep.myaddr.ipaddr, &ipv6_addrany, sizeof(T_IN6_ADDR));
+#endif
+
+			if ((error = alloc_udp_cep(&cepid, tskid, &ccep)) != E_OK) {
+				syslog(LOG_NOTICE, "[UDC:%02d TSK] CEP create error: %s", cepid, itron_strerror(error));
+				continue;
+				}
+
+#else	/* of #ifdef USE_UDP_EXTENTIONS */
+
+			cepid = (ID)exinf;
+
+#endif	/* of #ifdef USE_UDP_EXTENTIONS */
+
+			if ((error = send_udp_discard(cepid, &addr, portno)) != E_OK)
+				syslog(LOG_NOTICE, "[UDC:%02d TSK] error: %s", cepid, itron_strerror(error));
+
+#ifdef USE_UDP_EXTENTIONS
+
+			if ((error = free_udp_cep(cepid, !(error == E_NOEXS || error == E_DLT))) != E_OK)
+				syslog(LOG_NOTICE, "[UDC:%02d TSK] CEP delete error: %s", cepid, itron_strerror(error));
+
+#endif	/* of #ifdef USE_UDP_EXTENTIONS */
+
+			}
+		}
+	}
+
+#endif	/* of #ifdef USE_UDP_DISCARD_CLI */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/udp_discard_cli.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/udp_discard_cli.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/udp_discard_cli.cfg	(revision 270)
@@ -0,0 +1,83 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  UDP DISCARD ã¯ã©ã¤ã¢ã³ã
+ *  ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_UDP_DISCARD_CLI
+
+/* ã¿ã¹ã¯ */
+
+#ifdef USE_UDP_EXTENTIONS
+
+CRE_TSK(UDP_DISCARD_CLI_TASK, {
+	TA_HLNG|TA_ACT,
+	0,
+	udp_discard_cli_task,
+	UDP_DISCARD_CLI_MAIN_PRIORITY,
+	UDP_DISCARD_CLI_STACK_SIZE,
+	NULL
+	});
+
+#else	/* of #ifdef USE_UDP_EXTENTIONS */
+
+CRE_TSK(UDP_DISCARD_CLI_TASK, {
+	TA_HLNG|TA_ACT,
+	UDP_DISCARD_CLI_CEPID,
+	udp_discard_cli_task,
+	UDP_DISCARD_CLI_MAIN_PRIORITY,
+	UDP_DISCARD_CLI_STACK_SIZE,
+	NULL
+	});
+
+#endif	/* of #ifdef USE_UDP_EXTENTIONS */
+
+/* ã³ãã³ãã­ã¥ã¼ */
+
+CRE_DTQ(DTQ_UDP_DISCARD_CLI,  { TA_TFIFO, 1, NULL });
+
+#endif	/* of #ifdef USE_UDP_DISCARD_CLI */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/udp_echo_cli.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/udp_echo_cli.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/udp_echo_cli.c	(revision 270)
@@ -0,0 +1,362 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  UDP ECHO ã¯ã©ã¤ã¢ã³ã
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <t_services.h>
+#include "kernel_id.h"
+#include "tinet_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/net.h>
+#include <net/net_var.h>
+#include <net/net_timer.h>
+
+#include <netinet/in.h>
+#include <netinet/in_itron.h>
+
+#include <netapp/netapp.h>
+#include <netapp/netapp_var.h>
+#include <netapp/echo.h>
+
+#ifdef USE_UDP_ECHO_CLI
+
+/* echo ãµã¼ãã®ãã¼ãçªå· */
+
+#define ECHO_SRV_PORTNO		UINT_C(7)
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+bool_t udp_echo_cli_valid;
+
+/*
+ * å¤æ°
+ */
+
+#define BUF_SIZE	2048
+
+static char		udp_buf[BUF_SIZE];
+static T_IPEP		dst;
+
+#ifdef USE_UDP_NON_BLOCKING
+
+static ER_UINT		nblk_len;
+
+/*
+ *  ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã®ã³ã¼ã«ããã¯é¢æ°
+ */
+
+ER
+callback_nblk_udp_echo_cli (ID cepid, FN fncd, void *p_parblk)
+{
+	nblk_len = *(ER_UINT*)p_parblk;
+	syscall(wup_tsk(UDP_ECHO_CLI_TASK));
+	return E_OK;
+	}
+
+/*
+ *  send_udp_echo -- ECHO/UDP ãµã¼ãã«ã¡ãã»ã¼ã¸ãéä¿¡ãã (ãã³ãã­ãã­ã³ã°ã³ã¼ã«ä½¿ç¨)ã
+ */
+
+static ER
+send_udp_echo (ID cepid, T_IN_ADDR *ipaddr, uint16_t portno, char *line)
+{
+	ER_UINT	error;
+	uint_t	len;
+
+	dst.ipaddr = *ipaddr;
+	dst.portno = portno;
+	len         = strlen(line);
+	if ((error = UDP_SND_DAT(cepid, &dst, line, len, TMO_NBLK)) != E_WBLK) {
+		syslog(LOG_NOTICE, "[UEC:%02d SND] error: %s", cepid, itron_strerror(error));
+		return error;
+		}
+	else
+		syslog(LOG_NOTICE, "[UEC:%02d SND] sending:            to:   %s.%d: %s",
+		                   cepid, IP2STR(NULL, &dst.ipaddr), dst.portno, line);
+
+	syscall(slp_tsk());
+	if (nblk_len < 0) {	/* 0 ä»¥ä¸ã®å ´åã¯ãã¨ã©ã¼ã³ã¼ã */
+		syslog(LOG_NOTICE, "[UEC:%02d CBR] error: %s", cepid, itron_strerror(nblk_len));
+		return nblk_len;
+		}
+
+	if ((error = UDP_RCV_DAT(cepid, &dst, udp_buf, sizeof(udp_buf), TMO_NBLK)) != E_WBLK) {
+		syslog(LOG_NOTICE, "[UEC:%02d RCV] error: %s", cepid, itron_strerror(error));
+		return error;
+		}
+
+	syscall(slp_tsk());
+	if (nblk_len < 0) {	/* 0 ä»¥ä¸ã®å ´åã¯ãã¨ã©ã¼ã³ã¼ã */
+		syslog(LOG_NOTICE, "[UEC:%02d RCV] error: %s", cepid, itron_strerror(nblk_len));
+		return nblk_len;
+		}
+	else {
+		udp_buf[nblk_len] = '\0';
+		syslog(LOG_NOTICE, "[UEC:%02d RCV] received:           from: %s.%d: %s",
+		                   cepid, IP2STR(NULL, &dst.ipaddr), dst.portno, udp_buf);
+		nblk_len = E_OK;
+		}
+
+	return nblk_len;
+	}
+
+#else	/* of #ifdef USE_UDP_NON_BLOCKING */
+
+#ifdef USE_UDP_CALL_BACK
+
+/*
+ *  ã³ã¼ã«ããã¯é¢æ°
+ */
+
+ER
+callback_udp_echo_cli (ID cepid, FN fncd, void *p_parblk)
+{
+	ER_UINT	len;
+
+	if ((len = UDP_RCV_DAT(cepid, &dst, udp_buf, sizeof(udp_buf), TMO_FEVR)) >= 0) {
+		*(udp_buf + len) = '\0';
+		syslog(LOG_NOTICE, "[UEC:%02d RCV] recv: addr: %s.%d: %s",
+		                   cepid, IP2STR(NULL, &dst.ipaddr), dst.portno, udp_buf);
+		}
+	else
+		syslog(LOG_NOTICE, "[UEC:%02d RCV] recv: error: %s", cepid, itron_strerror(len));
+
+	return E_OK;
+	}
+
+/*
+ *  send_udp_echo -- ECHO/UDP ãµã¼ãã«ã¡ãã»ã¼ã¸ãéä¿¡ãã (ã³ã¼ã«ããã¯é¢æ°ä½¿ç¨)ã
+ */
+
+static ER
+send_udp_echo (ID cepid, T_IN_ADDR *ipaddr, uint16_t portno, char *line)
+{
+	ER_UINT	len;
+
+	dst.ipaddr = *ipaddr;
+	dst.portno = portno;
+	len        = strlen(line);
+	syslog(LOG_NOTICE, "[UEC:%02d SND] sending:            to:   %s.%d: %s",
+	                   cepid, IP2STR(NULL, &dst.ipaddr), dst.portno, line);
+	if ((len = UDP_SND_DAT(cepid, &dst, line, len, TMO_FEVR)) < 0)
+		syslog(LOG_NOTICE, "[UEC:%02d SND] error: %s", cepid, itron_strerror(len));
+
+	return E_OK;
+	}
+
+#else	/* of #ifdef USE_UDP_CALL_BACK */
+
+/*
+ *  send_udp_echo -- ECHO/UDP ãµã¼ãã«ã¡ãã»ã¼ã¸ãéä¿¡ãã (ã³ã¼ã«ããã¯é¢æ°æªä½¿ç¨)ã
+ */
+
+static ER
+send_udp_echo (ID cepid, T_IN_ADDR *ipaddr, uint16_t portno, char *line)
+{
+	ER_UINT	len;
+
+	dst.ipaddr = *ipaddr;
+	dst.portno = portno;
+	len         = strlen(line);
+	syslog(LOG_NOTICE, "[UEC:%02d SND] sending:            to:   %s.%d: %s",
+	                   cepid, IP2STR(NULL, &dst.ipaddr), dst.portno, line);
+	if ((len = UDP_SND_DAT(cepid, &dst, line, len, TMO_FEVR)) < 0) {
+		syslog(LOG_NOTICE, "[UEC:%02d SND] error: %s", cepid, itron_strerror(len));
+		return len;
+		}
+
+	if ((len = UDP_RCV_DAT(cepid, &dst, udp_buf, sizeof(udp_buf), 10*1000)) >= 0) {
+		*(udp_buf + len) = '\0';
+		syslog(LOG_NOTICE, "[UEC:%02d RCV] received:           from: %s.%d: %s",
+		                   cepid, IP2STR(NULL, &dst.ipaddr), dst.portno, line);
+		return E_OK;
+		}
+	else {
+		syslog(LOG_NOTICE, "[UEC:%02d RCV] error: %s", cepid, itron_strerror(len));
+		return len;
+		}
+	}
+
+#endif	/* of #ifdef USE_UDP_CALL_BACK */
+
+#endif	/* of #ifdef USE_UDP_NON_BLOCKING */
+
+#define MESSAGE_FORMAT	"MSG 1000000"
+
+/*
+ *  UDP ECHO ã¯ã©ã¤ã¢ã³ãéä¿¡ã¿ã¹ã¯
+ */
+
+void
+udp_echo_cli_task (intptr_t exinf)
+{
+	static char msg[sizeof(MESSAGE_FORMAT)] = MESSAGE_FORMAT;
+
+	T_IN_ADDR	addr;
+	ID		tskid, cepid;
+	ER		error = E_OK;
+	char		*line, *p;
+	int_t		rep;
+	uint32_t	count, msgno;
+	uint16_t	portno;
+
+#ifdef USE_UDP_EXTENTIONS
+
+	T_UDP_CCEP	ccep;
+
+#endif	/* of #ifdef USE_UDP_EXTENTIONS */
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[UDP ECHO CLI:%d,%d] started.", tskid, (ID)exinf);
+	while (true) {
+		if (rcv_dtq(DTQ_UDP_ECHO_CLI, (intptr_t*)&line) == E_OK) {
+
+#ifdef USE_UDP_EXTENTIONS
+
+			ccep.cepatr = UINT_C(0);
+			ccep.myaddr.portno = UDP_PORTANY;
+
+#if defined(SUPPORT_INET4)
+			ccep.myaddr.ipaddr = IPV4_ADDRANY;
+#endif
+
+#if defined(SUPPORT_INET6)
+			memcpy(&ccep.myaddr.ipaddr, &ipv6_addrany, sizeof(T_IN6_ADDR));
+#endif
+
+#ifdef USE_UDP_NON_BLOCKING
+			ccep.callback = (FP)callback_nblk_udp_echo_cli;
+#else
+			ccep.callback = NULL;
+#endif
+
+			if ((error = alloc_udp_cep(&cepid, tskid, &ccep)) != E_OK) {
+				syslog(LOG_NOTICE, "[UEC:%02d TSK] CEP create error: %s", cepid, itron_strerror(error));
+				continue;
+				}
+
+#else	/* of #ifdef USE_UDP_EXTENTIONS */
+
+			cepid = (ID)exinf;
+
+#endif	/* of #ifdef USE_UDP_EXTENTIONS */
+
+			line = skip_blanks(GET_IPADDR(&addr, skip_blanks(line)));	/* IP Address */
+
+			if ('0' <= *line && *line <= '9') {				/* Port No */
+				line = get_int(&rep, line);
+				portno = (uint16_t)rep;
+				}
+			else {
+				line ++;
+				portno = ECHO_SRV_PORTNO;
+				}
+
+			line = skip_blanks(line);
+			if ('0' <= *line && *line <= '9') {				/* Repeat */
+				line = get_int(&rep, line);
+				if (rep > 1000000)
+					rep = 1000000;
+				udp_echo_cli_valid = true;
+				for (count = 0;  count ++ < rep; ) {
+					if (!udp_echo_cli_valid) {
+						syslog(LOG_NOTICE, "[UEC:%02d TSK] canceled.", cepid);
+						break;
+						}
+						
+					p = &msg[sizeof(MESSAGE_FORMAT)] - 1;
+					for (msgno = count; msgno > 0; msgno /= 10)
+						*(-- p) = msgno % 10 + '0';
+					while (*(p - 2) != 'G')
+						*(-- p) = ' ';
+
+					if ((error = send_udp_echo(cepid, &addr, portno, msg)) != E_OK)
+						break;
+
+					dly_tsk(10 * SYSTIM_HZ + net_rand() % (10 * SYSTIM_HZ));
+					}
+				}
+
+			else								/* Single Message */
+				error = send_udp_echo(cepid, &addr, portno, line);
+
+			if (error != E_OK)
+				syslog(LOG_NOTICE, "[UEC:%02d TSK] error: %s", cepid, itron_strerror(error));
+
+#ifdef USE_UDP_EXTENTIONS
+
+			if ((error = free_udp_cep(cepid, !(error == E_NOEXS || error == E_DLT))) != E_OK)
+				syslog(LOG_NOTICE, "[UEC:%02d TSK] CEP delete error: %s", cepid, itron_strerror(error));
+
+#endif	/* of #ifdef USE_UDP_EXTENTIONS */
+
+			}
+		}
+	}
+
+#endif	/* of #ifdef USE_UDP_ECHO_CLI */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/udp_echo_cli.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/udp_echo_cli.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/udp_echo_cli.cfg	(revision 270)
@@ -0,0 +1,82 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  ECHO ãµã¼ãè©¦é¨ãã­ã°ã©ã ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_UDP_ECHO_CLI
+
+/* ã¿ã¹ã¯ */
+
+#ifdef USE_UDP_EXTENTIONS
+
+CRE_TSK(UDP_ECHO_CLI_TASK, {
+	TA_HLNG|TA_ACT,
+	0,
+	udp_echo_cli_task,
+	UDP_ECHO_CLI_MAIN_PRIORITY,
+	UDP_ECHO_CLI_STACK_SIZE,
+	NULL
+	});
+
+#else	/* of #ifdef USE_UDP_EXTENTIONS */
+
+CRE_TSK(UDP_ECHO_CLI_TASK, {
+	TA_HLNG|TA_ACT,
+	UDP_ECHO_CLI_CEPID,
+	udp_echo_cli_task,
+	UDP_ECHO_CLI_MAIN_PRIORITY,
+	UDP_ECHO_CLI_STACK_SIZE,
+	NULL
+	});
+
+#endif	/* of #ifdef USE_UDP_EXTENTIONS */
+
+/* ã³ãã³ãã­ã¥ã¼ */
+
+CRE_DTQ(DTQ_UDP_ECHO_CLI,  { TA_TFIFO, 1, NULL });
+
+#endif	/* of #ifdef USE_UDP_ECHO_CLI */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/udp_echo_srv.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/udp_echo_srv.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/udp_echo_srv.c	(revision 270)
@@ -0,0 +1,322 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  UDP ECHO ãµã¼ã
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <t_services.h>
+#include "kernel_id.h"
+#include "tinet_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/net.h>
+#include <net/net_timer.h>
+
+#include <netinet/in.h>
+#include <netinet/in_itron.h>
+
+#include <netapp/netapp.h>
+#include <netapp/netapp_var.h>
+#include <netapp/echo.h>
+
+#ifdef USE_UDP_ECHO_SRV
+
+/*
+ *  åä¿¡ã¿ã¤ã ã¢ã¦ã
+ */
+
+#define RCV_TMOUT	TMO_FEVR
+//#define RCV_TMOUT	(30*ULONG_C(1000))
+
+#define BUF_SIZE	2048
+
+static char	echo_rcv_buf[BUF_SIZE];
+static T_IPEP	dst;
+
+#ifdef USE_UDP_CALL_BACK
+
+/*
+ *  ã³ã¼ã«ããã¯é¢æ°
+ */
+
+ER
+callback_udp_echo_srv (ID cepid, FN fncd, void *p_parblk)
+{
+	ER_UINT	len;
+	SYSTIM	now;
+
+	if ((len = UDP_RCV_DAT(cepid, &dst, echo_rcv_buf, sizeof(echo_rcv_buf), TMO_FEVR)) >= 0) {
+		echo_rcv_buf[len] = '\0';
+		get_tim(&now);
+		syslog(LOG_NOTICE, "[UES:%02d UCB] received,   %6ld, from: %s.%d,\n"
+		                   "                                 msg: '%s'",
+		                   cepid, now / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno, echo_rcv_buf);
+		if (len > 0) {
+			len = UDP_SND_DAT(cepid, &dst, echo_rcv_buf, len, TMO_FEVR);
+			get_tim(&now);
+			if (len >= 0)
+				syslog(LOG_NOTICE, "[UES:%02d UCB] sent,       %6ld, len: %d",
+				                   cepid, now / SYSTIM_HZ, len);
+			else
+				syslog(LOG_NOTICE, "[UES:%02d UCB] send error, %6ld: %s",
+				                   cepid, now / SYSTIM_HZ, itron_strerror(len));
+			}
+		len = E_OK;
+		}
+	else {
+		get_tim(&now);
+		syslog(LOG_NOTICE, "[UES:%02d UCB] recv error, %6ld: %s",
+		                   cepid, now / SYSTIM_HZ, itron_strerror(len));
+		}
+
+	return len;
+	}
+
+#else	/* of #ifdef USE_UDP_CALL_BACK */
+
+#ifdef USE_UDP_NON_BLOCKING
+
+/*
+ *  å¤æ°
+ */
+
+static ER_UINT		nblk_len;
+
+/*
+ *  ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã®ã³ã¼ã«ããã¯é¢æ°
+ */
+
+ER
+callback_nblk_udp_echo_srv (ID cepid, FN fncd, void *p_parblk)
+{
+	SYSTIM	now;
+
+	get_tim(&now);
+	nblk_len = *(ER_UINT*)p_parblk;
+	if (nblk_len < 0) {	/* 0 ä»¥ä¸ã®å ´åã¯ãã¨ã©ã¼ã³ã¼ã */
+		syslog(LOG_NOTICE, "[UES:%02d CBR] error,      %6ld: %s, fncd: %s",
+		                   cepid, now / SYSTIM_HZ, itron_strerror(nblk_len), in_strtfn(fncd));
+		}
+	else if (fncd == TFN_UDP_RCV_DAT) {
+		echo_rcv_buf[nblk_len] = '\0';
+		syslog(LOG_NOTICE, "[UES:%02d CBR] received,   %6ld, from: %s.%d,\n"
+		                   "                                 msg: '%s'",
+		                   cepid, now / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno, echo_rcv_buf);
+		}
+	syscall(wup_tsk(UDP_ECHO_SRV_TASK));
+	return E_OK;
+	}
+
+/*
+ *  UDP ECHO ãµã¼ã
+ */
+
+ER
+udp_echo_srv (ID cepid)
+{
+	ER	error;
+	SYSTIM	now;
+
+	if ((error = UDP_RCV_DAT(cepid, &dst, echo_rcv_buf, sizeof(echo_rcv_buf), TMO_NBLK)) != E_WBLK) {
+		get_tim(&now);
+		syslog(LOG_NOTICE, "[UES:%02d RCV] recv error, %6ld: %s", cepid, now / SYSTIM_HZ, itron_strerror(error));
+		return error;
+		}
+
+	syscall(slp_tsk());
+	if (nblk_len < 0)
+		error = nblk_len;
+	else {
+		if ((error = UDP_SND_DAT(cepid, &dst, echo_rcv_buf, nblk_len, TMO_NBLK)) != E_WBLK) {
+			get_tim(&now);
+			syslog(LOG_NOTICE, "[UES:%02d SND] send error, %6ld: %s",
+			                   cepid, now / SYSTIM_HZ, itron_strerror(error));
+			return error;
+			}
+
+		syscall(slp_tsk());
+		if (nblk_len < 0)
+			error = nblk_len;
+		else {
+			get_tim(&now);
+			syslog(LOG_NOTICE, "[UES:%02d SND] sent,       %6ld, len: %d", cepid, now / SYSTIM_HZ, nblk_len);
+			error = E_OK;
+			}
+		}
+
+	return error;
+	}
+
+#else	/* of #ifdef USE_UDP_NON_BLOCKING */
+
+/*
+ *  UDP ECHO ãµã¼ã
+ */
+
+ER
+udp_echo_srv (ID cepid)
+{
+	ER_UINT	len;
+	SYSTIM	now;
+
+	if ((len = UDP_RCV_DAT(cepid, &dst, echo_rcv_buf, sizeof(echo_rcv_buf), RCV_TMOUT)) >= 0) {
+		get_tim(&now);
+		echo_rcv_buf[len] = '\0';
+		syslog(LOG_NOTICE, "[UES:%02d RCV] received,   %6ld, from: %s.%d,\n"
+		                   "                                 msg: '%s'",
+		                   cepid, now / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno, echo_rcv_buf);
+		if (len > 0) {
+			len = UDP_SND_DAT(cepid, &dst, echo_rcv_buf, len, TMO_FEVR);
+			get_tim(&now);
+			if (len >= 0)
+				syslog(LOG_NOTICE, "[UES:%02d SND] sent,       %6ld, len: %d",
+				                   cepid, now / SYSTIM_HZ, (uint16_t)len);
+			else
+				syslog(LOG_NOTICE, "[UES:%02d SND] send error, %6ld: %s",
+				                   cepid, now / SYSTIM_HZ, itron_strerror(len));
+			}
+		}
+	else {
+		get_tim(&now);
+		syslog(LOG_NOTICE, "[UES:%02d RCV] recv error, %6ld: %s", cepid, now / SYSTIM_HZ, itron_strerror(len));
+		}
+
+	return len >= 0 || len == E_TMOUT ? E_OK : len;
+	}
+
+#endif	/* of #ifdef USE_UDP_NON_BLOCKING */
+
+/*
+ *  UDP ECHO ãµã¼ãã¿ã¹ã¯
+ */
+
+#ifdef USE_UDP_EXTENTIONS
+
+void
+udp_echo_srv_task (intptr_t exinf)
+{
+	ID		tskid, cepid;
+	ER		error;
+	T_UDP_CCEP	ccep;
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[UDP ECHO SRV:%d,%d] started.", tskid, (ID)exinf);
+	while (true) {
+
+		syscall(slp_tsk());
+
+		ccep.cepatr = UINT_C(0);
+		ccep.myaddr.portno = UINT_C(7);
+
+#if defined(SUPPORT_INET4)
+		ccep.myaddr.ipaddr = IPV4_ADDRANY;
+#endif
+
+#if defined(SUPPORT_INET6)
+		memcpy(&ccep.myaddr.ipaddr, &ipv6_addrany, sizeof(T_IN6_ADDR));
+#endif
+
+#ifdef USE_UDP_NON_BLOCKING
+		ccep.callback = (FP)callback_nblk_udp_echo_srv;
+#else
+		ccep.callback = NULL;
+#endif
+
+		if ((error = alloc_udp_cep(&cepid, tskid, &ccep)) != E_OK) {
+			syslog(LOG_NOTICE, "[UES:%02d TSK] CEP create error: %s", cepid, itron_strerror(error));
+			continue;
+			}
+
+		while (error == E_OK) {
+			if ((error = udp_echo_srv(cepid)) != E_OK) {
+				if ((error = free_udp_cep(cepid, !(error == E_NOEXS || error == E_DLT))) != E_OK)
+					syslog(LOG_NOTICE, "[UEC:%02d TSK] CEP delete error: %s", cepid, itron_strerror(error));
+				break;
+				}
+			}
+
+		}
+	slp_tsk();
+	}
+
+#else	/* of #ifdef USE_UDP_EXTENTIONS */
+
+void
+udp_echo_srv_task (intptr_t exinf)
+{
+	ID	tskid;
+	ER	error = E_OK;
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[UDP ECHO SRV:%d,%d] started.", tskid, (ID)exinf);
+	while (error == E_OK) {
+		error = udp_echo_srv((ID)exinf);
+		}
+	slp_tsk();
+	}
+
+#endif	/* of #ifdef USE_UDP_EXTENTIONS */
+
+#endif	/* of #ifdef USE_UDP_CALL_BACK */
+
+#endif	/* of #ifdef USE_UDP_ECHO_SRV */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/udp_echo_srv.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/udp_echo_srv.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/udp_echo_srv.cfg	(revision 270)
@@ -0,0 +1,86 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  UDP ECHO ãµã¼ãã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_UDP_ECHO_SRV
+
+/*
+ * ã¿ã¹ã¯
+ */
+
+#ifdef USE_UDP_CALL_BACK
+
+#else	/* of #ifdef USE_UDP_CALL_BACK */
+
+#ifdef USE_UDP_EXTENTIONS
+
+CRE_TSK(UDP_ECHO_SRV_TASK, {
+	TA_HLNG | TA_ACT,
+	0,
+	udp_echo_srv_task,
+	UDP_ECHO_SRV_MAIN_PRIORITY,
+	UDP_ECHO_SRV_STACK_SIZE,
+	NULL
+	});
+
+#else	/* of #ifdef USE_UDP_EXTENTIONS */
+
+CRE_TSK(UDP_ECHO_SRV_TASK, {
+	TA_HLNG | TA_ACT,
+	UDP_ECHO_SRV_CEPID,
+	udp_echo_srv_task,
+	UDP_ECHO_SRV_MAIN_PRIORITY,
+	UDP_ECHO_SRV_STACK_SIZE,
+	NULL
+	});
+
+#endif	/* of #ifdef USE_UDP_EXTENTIONS */
+
+#endif	/* of #ifdef USE_UDP_CALL_BACK */
+
+#endif	/* of #ifdef USE_UDP_ECHO_SRV */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/wwws.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/wwws.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/wwws.c	(revision 270)
@@ -0,0 +1,1772 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  WWW ãµã¼ã
+ *
+ *    ã»éåä¿¡ã¿ã¹ã¯åä¸å
+ *    ã»ãã³ãã­ãã­ã³ã°ã³ã¼ã«
+ *    ã»çã³ãã¼ API
+ *    ã»IPv4/IPv6
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel/kernel_impl.h"
+#include "target_config.h"
+#include "target_syssvc.h"
+#include "target_stddef.h"
+#include "kernel_cfg.h"
+#include "tinet_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+#include "tinet_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet/in_itron.h>
+#include <netinet/ip.h>
+#include <netinet/ip6.h>
+#include <netinet/tcp.h>
+
+#include <netapp/netapp_var.h>
+#include <netapp/wwws.h>
+
+#ifdef USE_WWW_SRV
+
+/*
+ *  éåä¿¡ API ã®é¸æ
+ */
+
+#define EOF		(-1)
+
+typedef struct file {
+	ER		(*func)(ID cepid, T_WWW_RWBUF *srbuf);
+	char		*uri;
+	} T_FILE;
+
+typedef struct status {
+	uint16_t	code;
+	uint8_t		*reason;
+	} T_STATUS;
+
+/*
+ *  é¢æ°
+ */
+
+static ER index_html(ID cepid, T_WWW_RWBUF *srbuf);
+
+#if NET_COUNT_ENABLE
+
+static ER stat_html(ID cepid, T_WWW_RWBUF *srbuf);
+
+#endif	/* of #if NET_COUNT_ENABLE */
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+/* TCP éåä¿¡ã¦ã£ã³ããããã¡ */
+
+#ifndef TCP_CFG_SWBUF_CSAVE
+uint8_t www_srv_swbuf[NUM_WWW_SRV_TASKS][WWW_SRV_SWBUF_SIZE];
+#endif
+
+#ifndef TCP_CFG_RWBUF_CSAVE
+uint8_t www_srv_rwbuf[NUM_WWW_SRV_TASKS][WWW_SRV_RWBUF_SIZE];
+#endif
+
+/*
+ *  å¤æ°
+ */
+
+SYSTIM	srv_start;
+
+static const T_FILE file[] = {
+	{ index_html,	"/"		},
+	{ index_html,	"/index.html"	},
+
+#if NET_COUNT_ENABLE
+
+	{ stat_html,	"/stat.html"	},
+
+#endif	/* of #if NET_COUNT_ENABLE */
+	};
+
+#define NUM_FILES	(sizeof(file) / sizeof(T_FILE))
+
+static const char *status[] = {
+	"200 OK",
+	"404 Not Found",
+	};
+
+#define NUM_STATUS	(sizeof(status) / sizeof(T_STATUS))
+
+#define ST_OK		0
+#define ST_NOT_FOUND	1
+
+#ifdef USE_COPYSAVE_API
+
+/*
+ *  get_char -- ä¸æå­å
+¥åããã
+ */
+
+static int_t
+get_char (ID cepid, T_WWW_RWBUF *srbuf)
+{
+	int_t	len, ch;
+	ER	error;
+
+	if (srbuf->unget) {
+		ch = srbuf->unget;
+		srbuf->unget = 0;
+		}
+	else  {
+		if (srbuf->rbuf.index >= srbuf->rbuf.len) {
+			if ((error = tcp_rel_buf(cepid, srbuf->rbuf.len)) != E_OK)
+				syslog(LOG_WARNING, "[WWW:%02d] tcp_rel_buf error: %s",
+				       cepid, itron_strerror(error));
+			srbuf->rbuf.index = 0;
+			if ((len = tcp_rcv_buf(cepid, (void**)&srbuf->rbuf.buf, TMO_FEVR)) <= 0) {
+				if (len < 0)
+					syslog(LOG_WARNING, "[WWW:%02d] tcp_rcv_buf error: %s",
+					       cepid, itron_strerror(len));
+				srbuf->rbuf.len = 0;
+				return EOF;
+				}
+			else
+				srbuf->rbuf.len = len;
+			}
+		ch = srbuf->rbuf.buf[srbuf->rbuf.index ++];
+		}
+	return ch;
+	}
+
+/*
+ *  flush_sbuf -- éä¿¡ãããã¡ããã©ãã·ã¥ããã
+ */
+
+static ER
+flush_sbuf (ID cepid, T_WWW_RWBUF *srbuf)
+{
+	ER_UINT	error;
+
+	error = tcp_snd_buf(cepid, srbuf->sbuf.index);
+	srbuf->sbuf.index = srbuf->sbuf.len = 0;
+
+	return error;
+	}
+
+/*
+ *  put_str -- æå­åãåºåããã
+ */
+
+static uint_t
+put_str (ID cepid, T_WWW_RWBUF *srbuf, const char *str)
+{
+	ER		error;
+	ER_UINT		blen;
+	uint16_t	len, off = 0;
+
+	len = strlen(str);
+	while (len > 0) {
+		if (srbuf->sbuf.index >= srbuf->sbuf.len)
+			if ((error = flush_sbuf(cepid, srbuf)) != E_OK) {
+				syslog(LOG_WARNING, "[WWW:%02d] tcp_snd_dat error: %s", cepid, itron_strerror(error));
+			return 0;
+			}
+
+		if (srbuf->sbuf.len == 0) {
+			if ((blen = tcp_get_buf(cepid, (void**)&srbuf->sbuf.buf, TMO_FEVR)) < 0) {
+				syslog(LOG_WARNING, "[WWW:%02d] tcp_get_buf error: %s", cepid, itron_strerror(srbuf->sbuf.len));
+				return 0;
+				}
+			srbuf->sbuf.len = (uint16_t)blen;
+			}
+
+		if (len > srbuf->sbuf.len - srbuf->sbuf.index)
+			blen = srbuf->sbuf.len - srbuf->sbuf.index;
+		else
+			blen = len;
+		memcpy(&srbuf->sbuf.buf[srbuf->sbuf.index], str + off, blen);
+		srbuf->sbuf.index += (uint16_t)blen;
+		off               += (uint16_t)blen;
+		len               -= (uint16_t)blen;
+		}
+
+	return off;
+	}
+
+#else	/* of #ifdef USE_COPYSAVE_API */
+
+/*
+ *  get_char -- ä¸æå­å
+¥åããã
+ */
+
+static int_t
+get_char (ID cepid, T_WWW_RWBUF *srbuf)
+{
+	int_t	len, ch;
+
+	if (srbuf->unget) {
+		ch = srbuf->unget;
+		srbuf->unget = 0;
+		}
+	else  {
+		if (srbuf->rbuf.index >= srbuf->rbuf.len) {
+			if ((len = tcp_rcv_dat(cepid, srbuf->rbuf.buf, sizeof(srbuf->rbuf.buf), TMO_FEVR)) <= 0) {
+				if (len < 0) {
+					syslog(LOG_WARNING, "[WWW:%02d] tcp_rcv_dat error: %s",
+					       cepid, itron_strerror(len));
+					}
+				return EOF;
+				}
+			else {
+				srbuf->rbuf.len   = len;
+				srbuf->rbuf.index = 0;
+				}
+			}
+		ch = srbuf->rbuf.buf[srbuf->rbuf.index ++];
+		}
+	return ch;
+	}
+
+/*
+ *  flush_sbuf -- éä¿¡ãããã¡ããã©ãã·ã¥ããã
+ */
+
+static ER
+flush_sbuf (ID cepid, T_WWW_RWBUF *srbuf)
+{
+	ER_UINT		len = E_OK;
+	uint16_t	off = 0;
+
+	while (off < srbuf->sbuf.index) {
+		if ((len = tcp_snd_dat(cepid, srbuf->sbuf.buf + off, srbuf->sbuf.index - off, TMO_FEVR)) < 0)
+			break;
+		off += len;
+		}
+	srbuf->sbuf.index = 0;
+
+	return len < 0 ? len : E_OK;
+	}
+
+/*
+ *  put_str -- æå­åãåºåããã
+ */
+
+static uint16_t
+put_str (ID cepid, T_WWW_RWBUF *srbuf, const char *str)
+{
+	ER		error;
+	uint16_t	blen, len, off = 0;
+
+	len = strlen(str);
+	while (len > 0) {
+		if (srbuf->sbuf.index >= srbuf->sbuf.len)
+			if ((error = flush_sbuf(cepid, srbuf)) != E_OK) {
+				syslog(LOG_WARNING, "[WWW:%02d] tcp_snd_dat error: %s", cepid, itron_strerror(error));
+			return 0;
+			}
+		if (len > srbuf->sbuf.len - srbuf->sbuf.index)
+			blen = srbuf->sbuf.len - srbuf->sbuf.index;
+		else
+			blen = len;
+		memcpy(&srbuf->sbuf.buf[srbuf->sbuf.index], str + off, blen);
+		srbuf->sbuf.index += blen;
+		off               += blen;
+		len               -= blen;
+		}
+
+	return off;
+	}
+
+#endif	/* of #ifdef USE_COPYSAVE_API */
+
+/*
+ *  get_line -- ä¸è¡å
+¥åããã
+ */
+
+static uint16_t
+get_line (ID cepid, T_WWW_LINE *line, T_WWW_RWBUF *srbuf)
+{
+	int_t		ch = 0;
+	uint16_t	len;
+	char		*p, *t;
+
+	p = line->buf;
+	t = line->buf + WWW_LINE_SIZE;
+	while (p < t && (ch = get_char(cepid, srbuf)) != EOF && ch != '\n' && ch != '\r')
+		*p ++ = ch;
+	*p = '\0';
+	len = p - line->buf;
+	if (p >= t) {
+		while ((ch = get_char(cepid, srbuf)) != EOF && ch != '\n' && ch != '\r')
+			len ++;
+		}
+	if (ch == '\r') {
+		len ++;
+		if ((ch = get_char(cepid, srbuf)) != EOF && ch != '\n')
+			srbuf->unget = ch;
+		}
+	if (ch == '\n')
+		len ++;
+	line->len = len;
+	return p - line->buf;
+	}
+
+#if NET_COUNT_ENABLE
+
+#ifdef _int64_
+#define VAL_TYPE	uint64_t
+#else
+#define VAL_TYPE	uint32_t
+#endif
+
+/*
+ *  convert -- æ°å¤å¤æ
+ */
+
+static int_t
+convert (char *buf, VAL_TYPE val, int_t radix, int_t width, bool_t minus, char padchar)
+{
+	static const char radhex[] = "0123456789abcdef";
+
+	char	digits[23], *start;
+	int_t	ix, pad;
+
+	ix = 0;
+	start = buf;
+	do {
+		digits[ix ++] = radhex[val % radix];
+		val /= radix;
+		} while (val != 0);
+	if (minus)
+		digits[ix ++] = '-';
+	for (pad = ix; pad < width; pad ++)
+		*buf ++ = padchar;
+	while (ix -- > 0)
+		*buf ++ = digits[ix];
+	*buf = '\0';
+	return buf - start;
+	}
+
+#endif	/* of #if NET_COUNT_ENABLE */
+
+/*
+ * split_fields -- ãã£ã¼ã«ãã«åå²ããã
+ */
+
+static void
+split_fields (T_WWW_LINE *line, char *delim)
+{
+	char	*p, quote;
+	int_t	ix = 0;
+
+	line->off[ix ++] = 0;
+	for (p = line->buf; ix < WWW_NUM_FIELDS && *p; p ++) {
+		if (strchr("\"'`", *p) != NULL) {
+			for (quote = *p ++; *p && *p != quote; p ++)
+				;
+			}
+		else if (strchr(delim, *p) != NULL) {
+			*p = '\0';
+			line->off[ix ++] = (uint8_t)(p - line->buf + 1);
+			}
+		}
+	line->num = ix;
+	}
+
+/*
+ *  put_status -- status line ãåºåããã
+ */
+
+static uint16_t
+put_status (ID cepid, T_WWW_RWBUF *srbuf, int_t index)
+{
+	uint16_t	len = 0;
+
+	len += put_str(cepid, srbuf, "HTTP/1.0 ");
+	len += put_str(cepid, srbuf, status[index]);
+	len += put_str(cepid, srbuf, "\r\n");
+	return len;
+	}
+
+/*
+ *  put_content_length -- Content-length ãåºåããã
+ */
+
+static uint16_t
+put_content_length (ID cepid, T_WWW_RWBUF *srbuf, int_t content_len)
+{
+	uint16_t	len = 0;
+#if 0
+	char		length[TD_DIGITS + 1];
+
+	convert(length, content_len, 10, 0, false, ' ');
+	len += put_str(cepid, srbuf, "Content-length: ");
+	len += put_str(cepid, srbuf, length);
+	len += put_str(cepid, srbuf, "\r\n");
+#endif	/* of #if 0 */
+	return len;
+	}
+
+/*
+ *  get_method -- GET ã¡ã½ããã®å¦ç
+ */
+
+static ER
+get_method (ID cepid, T_WWW_RWBUF *srbuf, T_WWW_LINE *line)
+{
+	int_t	ix;
+
+	for (ix = NUM_FILES; ix -- > 0; )
+		if (!strcmp(file[ix].uri, &line->buf[line->off[1]])) {
+			return (*file[ix].func)(cepid, srbuf);
+			}
+	put_status(cepid, srbuf, ST_NOT_FOUND);
+	return E_NOEXS;
+	}
+
+/*
+ *  parse_request -- ãªã¯ã¨ã¹ããè§£æããã
+ */
+
+static ER
+parse_request (ID cepid, T_WWW_RWBUF *srbuf)
+{
+	T_WWW_LINE	*method, *line;
+	ER		error = E_OK;
+	int_t		blen = 0;
+	uint16_t	len;
+
+	if ((error = tget_mpf(MPF_WWW_LINE, (void*)&method, TMO_FEVR)) != E_OK) {
+		syslog(LOG_CRIT, "[WWW:%02d] get line error: %s.",
+		       cepid, itron_strerror(error));
+		return error;
+		}
+
+	if ((len = get_line(cepid, method, srbuf)) == 0) {
+		if ((error = rel_mpf(MPF_WWW_LINE, method)) != E_OK)
+			syslog(LOG_WARNING, "[WWW:%02d] release line buffer error: %s.",
+			       cepid, itron_strerror(error));
+		return error;
+		}
+
+	if ((error = tget_mpf(MPF_WWW_LINE, (void*)&line, TMO_FEVR)) != E_OK) {
+		syslog(LOG_CRIT, "[WWW:%02d] get line buffer error: %s.",
+		       cepid, itron_strerror(error));
+		if ((error = rel_mpf(MPF_WWW_LINE, method)) != E_OK)
+			syslog(LOG_WARNING, "[WWW:%02d] release line buffer error: %s.",
+			       cepid, itron_strerror(error));
+		return error;
+		}
+
+	while ((len = get_line(cepid, line, srbuf)) > 0) {	/* ããããã¹ã­ããããã*/
+		split_fields(line, ": ");
+		if (strcmp("Content-Length", &line->buf[line->off[0]]) == 0)
+			blen = atoi(&line->buf[line->off[1]]);
+		}
+	while (blen > 0 && (len = get_line(cepid, line, srbuf)) > 0) {
+		/* ã¨ã³ãã£ãã£ã»ããã£ãã¹ã­ããããã*/
+		blen -= line->len;
+		}
+
+	if ((error = rel_mpf(MPF_WWW_LINE, line)) != E_OK)
+		syslog(LOG_WARNING, "[WWW:%02d] release line buffer error: %s.",
+		       cepid, itron_strerror(error));
+	
+	split_fields(method, ": ");
+	if (!strcmp(&method->buf[method->off[0]], "GET"))
+		error = get_method(cepid, srbuf, method);
+
+	flush_sbuf(cepid, srbuf);
+
+	if ((error = rel_mpf(MPF_WWW_LINE, method)) != E_OK)
+		syslog(LOG_WARNING, "[WWW:%02d] release line buffer error: %s.",
+		       cepid, itron_strerror(error));
+
+	return error;
+	}
+
+/*
+ *  index_html -- /index.html ãã¡ã¤ã«
+ */
+
+static ER
+index_html (ID cepid, T_WWW_RWBUF *srbuf)
+{
+	static const char response[] =
+		"\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD html 3.2//EN\">\r\n"
+		"<html><head>\r\n"
+
+#ifdef TOPPERS_S810_CLG3_85
+		"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=Shift_JIS\">\r\n"
+#else
+		"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=EUC-JP\">\r\n"
+#endif
+
+		"<title>TINET TCP/IP Protocol Stack</title>\r\n"
+		"</head><body bgcolor=\"#ffffbb\">\r\n"
+		"<hr>ãã® WWW ãµã¼ãã¯<br>"
+
+#ifdef TARGET_KERNEL_ASP
+		"ASP Kernel Release 1.3 (patchlevel = 2) for " TARGET_NAME " (" __DATE__ "," __TIME__ ") ã¨<br>\r\n"
+#endif
+
+#ifdef TARGET_KERNEL_JSP
+		"JSP Kernel Release 1.4 (patchlevel = 3) for " TARGET_NAME " (" __DATE__ "," __TIME__ ") ã¨<br>\r\n"
+#endif
+
+		"TINET TCP/IP ãã­ãã³ã«ã¹ã¿ãã¯ã«ãããµã¼ãã¹ãã¦ãã¾ãã<br><hr>\r\n"
+		"<ul><li type=\"square\"><a href=\"stat.html\">ãããã¯ã¼ã¯çµ±è¨æ
+å ±</a></ul><hr>\r\n"
+		"FreeBSD: Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995<br>\r\n"
+		"The Regents of the University of California.  All rights reserved.<br><br>\r\n"
+
+#ifdef SUPPORT_PPP
+
+		"pppd: Copyright (c) 1989 Carnegie Mellon University.<br>\r\n"
+		"All rights reserved.<br><br>\r\n"
+		"ppp: Written by Toshiharu OHNO (tony-o@iij.ad.jp)<br>\r\n"
+		"Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.<br><br>\r\n"
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#ifdef SUPPORT_ETHER
+
+ 		"if_ed: Copyright (c) 1995, David Greenman<br>\r\n"
+		"All rights reserved.<br><br>\r\n"
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#ifdef TARGET_KERNEL_ASP
+		"TOPPERS/ASP Kernel<br>\r\n"
+		"Toyohashi Open Platform for Embedded Real-Time Systems/<br>\r\n"
+		"Advanced Standard Profile Kernel<br>\r\n"
+		"Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory<br>\r\n"
+		"Toyohashi Univ. of Technology, JAPAN<br>\r\n"
+		"Copyright (C) 2004-2008 by Embedded and Real-Time Systems Laboratory<br>\r\n"
+		"Graduate School of Information Science, Nagoya Univ., JAPAN<br><br>\r\n"
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+		"TOPPERS/JSP Kernel<br>\r\n"
+		"Toyohashi Open Platform for Embedded Real-Time Systems/<br>\r\n"
+		"Just Standard Profile Kernel<br>\r\n"
+		"Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory<br>\r\n"
+		"Toyohashi Univ. of Technology, JAPAN<br>\r\n"
+		"Copyright (C) 2005 by Embedded and Real-Time Systems Laboratory<br>\r\n"
+		"Graduate School of Information Science, Nagoya Univ., JAPAN<br><br>\r\n"
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+		"TINET (TCP/IP Protocol Stack)<br>\r\n"
+		"Copyright (C) 2001-2008 by Dep. of Computer Science and Engineering<br>\r\n"
+		"Tomakomai National College of Technology, JAPAN\r\n"
+		"</body></html>\r\n"
+		;
+
+	SYSTIM		start, finish;
+	uint16_t	len = 0;
+
+	get_tim(&start);
+	len += put_status(cepid, srbuf, ST_OK);
+	len += put_content_length(cepid, srbuf, strlen(response) - 2);	/* 2 ã¯æåã® \r\n */
+	len += put_str(cepid, srbuf, response);
+	get_tim(&finish);
+	syslog(LOG_NOTICE, "[WWW:%02u]     send:               index.html, len: %4u, time: %lu [ms]",
+	                   cepid, len, (finish - start) * 1000 / SYSTIM_HZ);
+	return E_OK;
+	}
+
+#if NET_COUNT_ENABLE
+
+#define TD_TEMPLATE1	"<tr><td></td><td align=\"right\"></td>\r\n<td align=\"right\"></td>\r\n<td align=\"right\"></td>\r\n<td align=\"right\"></td>\r\n<td align=\"right\"></td>\r\n<td align=\"right\"></td></tr>\r\n"
+#define TD_TEMPLATE2	"<tr><td></td><td align=\"right\"></td><td align=\"right\"></td></tr>\r\n"
+#define TD_TEMPLATE3	"<tr><td></td><td align=\"right\"></td></tr>\r\n"
+#define TD_TEMPLATE4	"<tr><td></td><td align=\"right\"></td><td align=\"right\"></td><td align=\"right\"></td></tr>\r\n"
+
+#define TD_LEN1(i)	(sizeof(i) +  sizeof(TD_TEMPLATE1) + TD_DIGITS  * 6 - 2)
+#define TD_LEN2(i)	(sizeof(i) +  sizeof(TD_TEMPLATE2) + TD_DIGITS  * 2 - 2)
+#define TD_LEN4(i)	(sizeof(i) +  sizeof(TD_TEMPLATE4) + TD_DIGITS  * 3 - 2)
+#define TD_DIGITS	20
+
+static const char time_prefix[] =
+	"çµéæé: "
+	;
+
+static const char time_suffix[] =
+	"<hr>\r\n"
+	;
+
+static const char table_suffix[] = "</table><br><hr>";
+
+#if defined(SUPPORT_INET4)
+
+static const char table_prefix_ip4[] =
+	"<h2>IPv4</h2><table border>\r\n"
+	"<tr><th>é 
+ç®</th><th>ã«ã¦ã³ã</th></tr>\r\n"
+	;
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+static const char table_prefix_ip6[] =
+	"<h2>IPv6</h2><table border>\r\n"
+	"<tr><th>é 
+ç®</th><th>ã«ã¦ã³ã</th></tr>\r\n"
+	;
+
+static const char table_prefix_icmp6[] =
+	"<h2>ICMPv6</h2><table border>\r\n"
+	"<tr><th>é 
+ç®</th><th>ã«ã¦ã³ã</th></tr>\r\n"
+	;
+
+static const char table_prefix_nd6[] =
+	"<h2>è¿é£æ¢ç´¢</h2><table border>\r\n"
+	"<tr><th>é 
+ç®</th><th>ã«ã¦ã³ã</th></tr>\r\n"
+	;
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+static const char table_prefix_tcp[] =
+	"<h2>TCP</h2><table border>\r\n"
+	"<tr><th>é 
+ç®</th><th>ã«ã¦ã³ã</th></tr>\r\n"
+	;
+
+static const char table_prefix_net_buf[] =
+	"<h2>ãããã¯ã¼ã¯ãããã¡</h2><table border>\r\n"
+	"<tr><th>ãµã¤ãº</th>"
+	"<th>ç¨ææ°</th>"
+	"<th>å²å½è¦æ±æ°</th>"
+	"<th>å²å½æ°</th>"
+	"<th>å²å½ã¦<br>ã¨ã©ã¼æ°</th></tr>\r\n"
+	;
+
+#ifdef SUPPORT_PPP
+
+static const char table_prefix_ppp[] =
+	"<h2>PPP ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹</h2><table border>\r\n"
+	"<tr><th>é 
+ç®</th><th>ã«ã¦ã³ã</th></tr>\r\n"
+	;
+
+static const char *ppp_item[NC_PPP_SIZE] = {
+	"åä¿¡ãªã¯ãããæ°",
+	"éä¿¡ãªã¯ãããæ°",
+	"åä¿¡ãã¬ã¼ã æ°",
+	"éä¿¡ãã¬ã¼ã æ°",
+	"åä¿¡ã¨ã©ã¼ãã¬ã¼ã æ°",
+	"éä¿¡ã¨ã©ã¼ãã¬ã¼ã æ°",
+	"ãããã¡å²ãå½ã¦å¤±ææ°",
+	};
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#ifdef SUPPORT_ETHER
+
+static const char table_prefix_ether_nic[] =
+	"<h2>ã¤ã¼ãµãããã»ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹</h2><table border>\r\n"
+	"<tr><th>é 
+ç®</th><th>ã«ã¦ã³ã</th></tr>\r\n"
+	;
+
+static const char *ether_nic_item[NC_ETHER_NIC_SIZE] = {
+	"ãªã»ããæ°",
+	"éä¿¡ã»ããã©è³æºè¿å´ãªã¼ãã¼æ°",
+	"éä¿¡ã¿ã¤ã ã¢ã¦ãæ°",
+	"è¡çªæ°",
+	"éä¿¡ã¨ã©ã¼ãã¬ã¼ã æ°",
+	"éä¿¡ãã¬ã¼ã æ°",
+	"éä¿¡ãªã¯ãããæ°",
+	"åä¿¡ã»ããã©è³æºè¿å´ãªã¼ãã¼æ°",
+	"åä¿¡ãããã¡å²ãå½ã¦å¤±ææ°",
+	"åä¿¡ã¨ã©ã¼ãã¬ã¼ã æ°",
+	"åä¿¡ãã¬ã¼ã æ°",
+	"åä¿¡ãªã¯ãããæ°",
+	};
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#if defined(SUPPORT_INET4)
+
+static const char *ip4_item[NC_IP4_SIZE] = {
+	"åå²éä¿¡ããã©ã°ã¡ã³ãæ°",
+	"åå²éä¿¡æ°",
+	"éä¿¡ã¨ã©ã¼ãã¼ã¿ã°ã©ã æ°",
+	"éä¿¡ãã¼ã¿ã°ã©ã æ°",
+	"éä¿¡ãªã¯ãããæ°",
+	"åå²åä¿¡ã¿ã¤ã ã¢ã¦ãæ°",
+	"åå²åä¿¡ãããã¡å²ãå½ã¦å¤±ææ°",
+	"åå²åä¿¡ç ´æ£æ°",
+	"åå²åä¿¡åæ§ææåæ°",
+	"åå²åä¿¡ãã©ã°ã¡ã³ãæ°",
+	"åå²åä¿¡æ°",
+	"ãªãã·ã§ã³å
+¥åæ°",
+	"ãã­ãã³ã«ã¨ã©ã¼æ°",
+	"ã¢ãã¬ã¹ã¨ã©ã¼æ°",
+	"ãã¼ã¸ã§ã³ã¨ã©ã¼æ°",
+	"é·ãã¨ã©ã¼æ°",
+	"ãã§ãã¯ãµã ã¨ã©ã¼æ°",
+	"åä¿¡ã¨ã©ã¼ãã¼ã¿ã°ã©ã æ°",
+	"åä¿¡ãã¼ã¿ã°ã©ã æ°",
+	"åä¿¡ãªã¯ãããæ°",
+	};
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+static const char *ip6_item[NC_IP6_SIZE] = {
+	"åå²éä¿¡ããã©ã°ã¡ã³ãæ°",
+	"åå²éä¿¡æ°",
+	"éä¿¡ã¨ã©ã¼ãã¼ã¿ã°ã©ã æ°",
+	"éä¿¡ãã¼ã¿ã°ã©ã æ°",
+	"éä¿¡ãªã¯ãããæ°	",
+	"åå²åä¿¡ã¿ã¤ã ã¢ã¦ãæ°",
+	"åå²åä¿¡ãããã¡å²ãå½ã¦å¤±ææ°",
+	"åå²åä¿¡ç ´æ£æ°",
+	"åå²åä¿¡åæ§ææåæ°",
+	"åå²åä¿¡ãã©ã°ã¡ã³ãæ°",
+	"åå²åä¿¡æ°",
+	"ãã­ãã³ã«ã¨ã©ã¼æ°	",
+	"ã¢ãã¬ã¹ã¨ã©ã¼æ°	",
+	"ãã¼ã¸ã§ã³ã¨ã©ã¼æ°	",
+	"é·ãã¨ã©ã¼æ°",
+	"åä¿¡ã¨ã©ã¼ãã¼ã¿ã°ã©ã æ°",
+	"åä¿¡ãã¼ã¿ã°ã©ã æ°",
+	"åä¿¡ãªã¯ãããæ°	",
+	};
+
+static const char *icmp6_item[NC_ICMP6_SIZE] = {
+	"éä¿¡ã¨ã©ã¼ ICMP ãã¼ã¿æ°	",
+	"éä¿¡ ICMP ãã¼ã¿æ°",
+	"éä¿¡ ICMP ãªã¯ãããæ°",
+	"é·ãã¨ã©ã¼æ°",
+	"åä¿¡ã¨ã©ã¼ ICMP ãã¼ã¿æ°	",
+	"åä¿¡ ICMP ãã¼ã¿æ°",
+	"åä¿¡ ICMP ãªã¯ãããæ°",
+	};
+
+static const char *nd6_item[NC_ND6_SIZE] = {
+	"éè¤ã¢ãã¬ã¹æ¤åºéä¿¡æ°",
+	"è¿é£è¦è«éä¿¡æ°",
+	"è¿é£è¦è«åä¿¡æ°",
+	"è¿é£éç¥éä¿¡æ°",
+	"è¿é£éç¥åä¿¡æ°",
+	"ã«ã¼ã¿è¦è«åºåæ°",
+	"ã«ã¼ã¿éç¥åä¿¡æ°",
+	};
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+static const char *tcp_item[NC_TCP_SIZE] = {
+	"è½åãªã¼ãã³æ°",
+	"ååãªã¼ãã³æ°",
+	"RTT æ´æ°æ°",
+	"éä¿¡ RST æ°",
+	"éä¿¡ ACK æ°",
+	"éä¿¡ç·æ¥ã»ã°ã¡ã³ãæ°",
+	"éä¿¡ãã¼ã¿ã»ã°ã¡ã³ãæ°",
+	"åéã»ã°ã¡ã³ãæ°",
+	"éä¿¡ã»ã°ã¡ã³ãæ°",
+	"éä¿¡å¶å¾¡ã»ã°ã¡ã³ãæ°",
+	"éä¿¡ãã¼ã¿ãªã¯ãããæ°",
+	"åä¿¡ã­ã¥ã¼è§£æ¾æ°",
+	"åä¿¡å¤éæ°",
+	"åä¿¡ç ´æ£æ°",
+	"åä¿¡ RST æ°",
+	"åä¿¡å¤é ACK æ°",
+	"åä¿¡ ACK æ°",
+	"åä¿¡ãã§ãã¯ãµã ä¸æ­£æ°",
+	"åä¿¡ãããä¸æ­£æ°",
+	"åä¿¡ç·æ¥ã»ã°ã¡ã³ãæ°",
+	"åä¿¡ãã¼ã¿ã»ã°ã¡ã³ãæ°",
+	"åä¿¡ã»ã°ã¡ã³ãæ°",
+	"åä¿¡ãã¼ã¿ãªã¯ãããæ°",
+	"åä¿¡ãªã¯ãããæ°",
+	};
+
+/*
+ *  put_count_item1 -- ã«ã¦ã³ã¿ã®å
+å®¹ãåºåãããã°ã«ã¼ã 1
+ */
+
+static uint16_t
+put_count_item1 (ID cepid, T_WWW_RWBUF *srbuf, const char *item, T_NET_COUNT *counter)
+{
+	char		buf[TD_DIGITS + 1];
+	uint16_t	len = 0;
+
+	len += put_str(cepid, srbuf, "<tr><td>");
+	len += put_str(cepid, srbuf, item);
+	len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+
+	convert(buf, counter->in_octets, 10, TD_DIGITS, false, ' ');
+	len += put_str(cepid, srbuf, buf);
+	len += put_str(cepid, srbuf, "</td>\r\n<td align=\"right\">");
+
+	convert(buf, counter->out_octets, 10, TD_DIGITS, false, ' ');
+	len += put_str(cepid, srbuf, buf);
+	len += put_str(cepid, srbuf, "</td>\r\n<td align=\"right\">");
+
+	convert(buf, counter->in_packets, 10, TD_DIGITS, false, ' ');
+	len += put_str(cepid, srbuf, buf);
+	len += put_str(cepid, srbuf, "</td>\r\n<td align=\"right\">");
+
+	convert(buf, counter->out_packets, 10, TD_DIGITS, false, ' ');
+	len += put_str(cepid, srbuf, buf);
+	len += put_str(cepid, srbuf, "</td>\r\n<td align=\"right\">");
+
+	convert(buf, counter->in_err_packets, 10, TD_DIGITS, false, ' ');
+	len += put_str(cepid, srbuf, buf);
+	len += put_str(cepid, srbuf, "</td>\r\n<td align=\"right\">");
+
+	convert(buf, counter->out_err_packets, 10, TD_DIGITS, false, ' ');
+	len += put_str(cepid, srbuf, buf);
+	len += put_str(cepid, srbuf, "</td></tr>\r\n");
+
+	return len;
+	}
+
+#ifdef SUPPORT_PPP
+
+/*
+ *  put_count_item2 -- ã«ã¦ã³ã¿ã®å
+å®¹ãåºåãããã°ã«ã¼ã 2
+ */
+
+static uint16_t
+put_count_item2 (ID cepid, T_WWW_RWBUF *srbuf, const char *item, uint32_t octets, uint32_t packets)
+{
+	char		buf[TD_DIGITS + 1];
+	uint16_t	len = 0;
+
+	len += put_str(cepid, srbuf, "<tr><td>");
+	len += put_str(cepid, srbuf, item);
+	len += put_str(cepid, srbuf, "</td><td>");
+
+	convert(buf, octets, 10, TD_DIGITS, false, ' ');
+	len += put_str(cepid, srbuf, buf);
+	len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+
+	convert(buf, packets, 10, TD_DIGITS, false, ' ');
+	len += put_str(cepid, srbuf, buf);
+	len += put_str(cepid, srbuf, "</td></tr>\r\n");
+
+	return len;
+	}
+
+/*
+ *  td_len_ppp -- put_count_ppp ã§åºåããæå­æ°ã
+ */
+
+static uint16_t
+td_len_ppp (void)
+{
+	int_t		ix;
+	uint16_t	len = 0;
+
+	for (ix = NC_PPP_SIZE; ix -- > 0; )
+		len += strlen(ppp_item[ix]);
+	return len + (sizeof(TD_TEMPLATE3) + TD_DIGITS - 1) * NC_PPP_SIZE;
+	}
+
+/*
+ *  put_count_ppp -- ã«ã¦ã³ã¿ (PPP) ã®å
+å®¹ãåºåããã
+ */
+
+static uint16_t
+put_count_ppp (ID cepid, T_WWW_RWBUF *srbuf)
+{
+
+	char		buf[TD_DIGITS + 1];
+	uint16_t	len = 0;
+
+	len += put_str(cepid, srbuf, table_prefix_ppp);
+
+	len += put_str(cepid, srbuf, "<tr><td>");
+	len += put_str(cepid, srbuf, ppp_item[0]);
+	len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+	convert(buf, net_count_ppp.in_octets, 10, TD_DIGITS, false, ' ');
+	len += put_str(cepid, srbuf, buf);
+	len += put_str(cepid, srbuf, "</td></tr>\r\n");
+
+	len += put_str(cepid, srbuf, "<tr><td>");
+	len += put_str(cepid, srbuf, ppp_item[1]);
+	len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+	convert(buf, net_count_ppp.out_octets, 10, TD_DIGITS, false, ' ');
+	len += put_str(cepid, srbuf, buf);
+	len += put_str(cepid, srbuf, "</td></tr>\r\n");
+
+	len += put_str(cepid, srbuf, "<tr><td>");
+	len += put_str(cepid, srbuf, ppp_item[2]);
+	len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+	convert(buf, net_count_ppp.in_packets, 10, TD_DIGITS, false, ' ');
+	len += put_str(cepid, srbuf, buf);
+	len += put_str(cepid, srbuf, "</td></tr>\r\n");
+
+	len += put_str(cepid, srbuf, "<tr><td>");
+	len += put_str(cepid, srbuf, ppp_item[3]);
+	len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+	convert(buf, net_count_ppp.out_packets, 10, TD_DIGITS, false, ' ');
+	len += put_str(cepid, srbuf, buf);
+	len += put_str(cepid, srbuf, "</td></tr>\r\n");
+
+	len += put_str(cepid, srbuf, "<tr><td>");
+	len += put_str(cepid, srbuf, ppp_item[4]);
+	len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+	convert(buf, net_count_ppp.in_err_packets, 10, TD_DIGITS, false, ' ');
+	len += put_str(cepid, srbuf, buf);
+	len += put_str(cepid, srbuf, "</td></tr>\r\n");
+
+	len += put_str(cepid, srbuf, "<tr><td>");
+	len += put_str(cepid, srbuf, ppp_item[5]);
+	len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+	convert(buf, net_count_ppp.out_err_packets, 10, TD_DIGITS, false, ' ');
+	len += put_str(cepid, srbuf, buf);
+	len += put_str(cepid, srbuf, "</td></tr>\r\n");
+
+	len += put_str(cepid, srbuf, "<tr><td>");
+	len += put_str(cepid, srbuf, ppp_item[6]);
+	len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+	convert(buf, net_count_ppp_no_bufs, 10, TD_DIGITS, false, ' ');
+	len += put_str(cepid, srbuf, buf);
+	len += put_str(cepid, srbuf, "</td></tr>\r\n");
+
+	len += put_str(cepid, srbuf, table_suffix);
+
+	return len;
+	}
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#if defined(SUPPORT_INET4)
+
+/*
+ *  td_len_ip4 -- put_count_ip4 ã§åºåããæå­æ°ã
+ */
+
+static uint16_t
+td_len_ip4 (void)
+{
+	int_t		ix;
+	uint16_t	len = 0;
+
+	for (ix = NC_IP4_SIZE; ix -- > 0; )
+		len += strlen(ip4_item[ix]);
+	return len + (sizeof(TD_TEMPLATE3) + TD_DIGITS - 1) * NC_IP4_SIZE;
+	}
+
+/*
+ *  put_count_ip4 -- ã«ã¦ã³ã¿ (IP4) ã®å
+å®¹ãåºåããã
+ */
+
+static uint16_t
+put_count_ip4 (ID cepid, T_WWW_RWBUF *srbuf)
+{
+	char		buf[TD_DIGITS + 1];
+	uint16_t	len = 0;
+	int_t		ix;
+
+	len += put_str(cepid, srbuf, table_prefix_ip4);
+	for (ix = NC_IP4_SIZE; ix -- > 0; ) {
+		len += put_str(cepid, srbuf, "<tr><td>");
+		len += put_str(cepid, srbuf, ip4_item[ix]);
+		len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+		convert(buf, net_count_ip4[ix], 10, TD_DIGITS, false, ' ');
+		len += put_str(cepid, srbuf, buf);
+		len += put_str(cepid, srbuf, "</td></tr>\r\n");
+		}
+	len += put_str(cepid, srbuf, table_suffix);
+
+	return len;
+	}
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+/*
+ *  td_len_nd6 -- put_count_nd6 ã§åºåããæå­æ°ã
+ */
+
+static uint16_t
+td_len_nd6 (void)
+{
+	int_t		ix;
+	uint16_t	len = 0;
+
+	for (ix = NC_ND6_SIZE; ix -- > 0; )
+		len += strlen(nd6_item[ix]);
+	return len + (sizeof(TD_TEMPLATE3) + TD_DIGITS - 1) * NC_ND6_SIZE;
+	}
+
+/*
+ *  put_count_nd6 -- ã«ã¦ã³ã¿ (ND6) ã®å
+å®¹ãåºåããã
+ */
+
+static uint16_t
+put_count_nd6 (ID cepid, T_WWW_RWBUF *srbuf)
+{
+	char		buf[TD_DIGITS + 1];
+	uint16_t	len = 0;
+	int_t		ix;
+
+	len += put_str(cepid, srbuf, table_prefix_nd6);
+	for (ix = NC_ND6_SIZE; ix -- > 0; ) {
+		len += put_str(cepid, srbuf, "<tr><td>");
+		len += put_str(cepid, srbuf, nd6_item[ix]);
+		len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+		convert(buf, net_count_nd6[ix], 10, TD_DIGITS, false, ' ');
+		len += put_str(cepid, srbuf, buf);
+		len += put_str(cepid, srbuf, "</td></tr>\r\n");
+		}
+	len += put_str(cepid, srbuf, table_suffix);
+
+	return len;
+	}
+
+/*
+ *  td_len_icmp6 -- put_count_icmp6 ã§åºåããæå­æ°ã
+ */
+
+static uint16_t
+td_len_icmp6 (void)
+{
+	int_t		ix;
+	uint16_t	len = 0;
+
+	for (ix = NC_ICMP6_SIZE; ix -- > 0; )
+		len += strlen(icmp6_item[ix]);
+	return len + (sizeof(TD_TEMPLATE3) + TD_DIGITS - 1) * NC_ICMP6_SIZE;
+	}
+
+/*
+ *  put_count_icmp6 -- ã«ã¦ã³ã¿ (ICMP6) ã®å
+å®¹ãåºåããã
+ */
+
+static uint16_t
+put_count_icmp6 (ID cepid, T_WWW_RWBUF *srbuf)
+{
+	char		buf[TD_DIGITS + 1];
+	uint16_t	len = 0;
+	int_t		ix;
+
+	len += put_str(cepid, srbuf, table_prefix_icmp6);
+	for (ix = NC_ICMP6_SIZE; ix -- > 0; ) {
+		len += put_str(cepid, srbuf, "<tr><td>");
+		len += put_str(cepid, srbuf, icmp6_item[ix]);
+		len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+		convert(buf, net_count_icmp6[ix], 10, TD_DIGITS, false, ' ');
+		len += put_str(cepid, srbuf, buf);
+		len += put_str(cepid, srbuf, "</td></tr>\r\n");
+		}
+	len += put_str(cepid, srbuf, table_suffix);
+
+	return len;
+	}
+
+/*
+ *  td_len_ip6 -- put_count_ip6 ã§åºåããæå­æ°ã
+ */
+
+static uint16_t
+td_len_ip6 (void)
+{
+	int_t		ix;
+	uint16_t	len = 0;
+
+	for (ix = NC_IP6_SIZE; ix -- > 0; )
+		len += strlen(ip6_item[ix]);
+	return len + (sizeof(TD_TEMPLATE3) + TD_DIGITS - 1) * NC_IP6_SIZE;
+	}
+
+/*
+ *  put_count_ip6 -- ã«ã¦ã³ã¿ (IP6) ã®å
+å®¹ãåºåããã
+ */
+
+static uint16_t
+put_count_ip6 (ID cepid, T_WWW_RWBUF *srbuf)
+{
+	char		buf[TD_DIGITS + 1];
+	uint16_t	len = 0;
+	int_t		ix;
+
+	len += put_str(cepid, srbuf, table_prefix_ip6);
+	for (ix = NC_IP6_SIZE; ix -- > 0; ) {
+		len += put_str(cepid, srbuf, "<tr><td>");
+		len += put_str(cepid, srbuf, ip6_item[ix]);
+		len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+		convert(buf, net_count_ip6[ix], 10, TD_DIGITS, false, ' ');
+		len += put_str(cepid, srbuf, buf);
+		len += put_str(cepid, srbuf, "</td></tr>\r\n");
+		}
+	len += put_str(cepid, srbuf, table_suffix);
+
+	return len;
+	}
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+/*
+ *  td_len_tcp -- put_count_tcp ã§åºåããæå­æ°ã
+ */
+
+static uint16_t
+td_len_tcp (void)
+{
+	int_t		ix;
+	uint16_t	len = 0;
+
+	for (ix = NC_TCP_SIZE; ix -- > 0; )
+		len += strlen(tcp_item[ix]);
+	return len + (sizeof(TD_TEMPLATE3) + TD_DIGITS - 1) * NC_TCP_SIZE;
+	}
+
+/*
+ *  put_count_tcp -- ã«ã¦ã³ã¿ (TCP) ã®å
+å®¹ãåºåããã
+ */
+
+static uint16_t
+put_count_tcp (ID cepid, T_WWW_RWBUF *srbuf)
+{
+	char		buf[TD_DIGITS + 1];
+	uint16_t	len = 0;
+	int_t		ix;
+
+	len += put_str(cepid, srbuf, table_prefix_tcp);
+	for (ix = NC_TCP_SIZE; ix -- > 0; ) {
+		len += put_str(cepid, srbuf, "<tr><td>");
+		len += put_str(cepid, srbuf, tcp_item[ix]);
+		len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+		convert(buf, net_count_tcp[ix], 10, TD_DIGITS, false, ' ');
+		len += put_str(cepid, srbuf, buf);
+		len += put_str(cepid, srbuf, "</td></tr>\r\n");
+		}
+	len += put_str(cepid, srbuf, table_suffix);
+
+	return len;
+	}
+
+/*
+ *  put_elapse_time -- çµéæéãåºåããã
+ */
+
+static uint16_t
+put_elapse_time (ID cepid, T_WWW_RWBUF *srbuf)
+{
+	SYSTIM		now, elapse;
+	char		buf[TD_DIGITS + 1];
+	uint16_t	len = 0;
+
+	get_tim(&now);
+	elapse = now - srv_start;
+
+	len += put_str(cepid, srbuf, time_prefix);
+
+	convert(buf, elapse / (60 * 60 * SYSTIM_HZ), 10, 4, false, ' ');
+	len += put_str(cepid, srbuf, buf);
+	len += put_str(cepid, srbuf, ":");
+
+	convert(buf, (elapse / (60 * SYSTIM_HZ)) % 60, 10, 2, false, ' ');
+	len += put_str(cepid, srbuf, buf);
+	len += put_str(cepid, srbuf, ":");
+
+	convert(buf, (elapse / SYSTIM_HZ) % 60, 10, 2, false, ' ');
+	len += put_str(cepid, srbuf, buf);
+
+	len += put_str(cepid, srbuf, time_suffix);
+
+	return len;
+	}
+
+/*
+ *  put_count_net_buf -- ã«ã¦ã³ã¿ (TCP) ã®å
+å®¹ãåºåããã
+ */
+
+static uint16_t
+put_count_net_buf (ID cepid, T_WWW_RWBUF *srbuf)
+{
+
+	const T_NET_BUF_ENTRY	*tbl;
+	char			buf[TD_DIGITS + 1];
+	uint16_t		len = 0;
+	int_t			ix;
+
+	len += put_str(cepid, srbuf, table_prefix_net_buf);
+	tbl = nbuf_get_tbl();
+	for (ix = nbuf_get_tbl_size(); ix -- > 0; ) {
+		len += put_str(cepid, srbuf, "<tr><td align=\"right\">");
+		convert(buf, tbl[ix].size, 10, 4, false, ' ');
+		len += put_str(cepid, srbuf, buf);
+		len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+		convert(buf, tbl[ix].prepares, 10, TD_DIGITS, false, ' ');
+		len += put_str(cepid, srbuf, buf);
+		len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+		convert(buf, tbl[ix].requests, 10, TD_DIGITS, false, ' ');
+		len += put_str(cepid, srbuf, buf);
+		len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+		convert(buf, tbl[ix].allocs, 10, TD_DIGITS, false, ' ');
+		len += put_str(cepid, srbuf, buf);
+		len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+		convert(buf, tbl[ix].errors, 10, TD_DIGITS, false, ' ');
+		len += put_str(cepid, srbuf, buf);
+		len += put_str(cepid, srbuf, "</td></tr>\r\n");
+		}
+	len += put_str(cepid, srbuf, table_suffix);
+
+	return len;
+	}
+
+#ifdef SUPPORT_ETHER
+
+/*
+ *  td_len_ether_nic -- put_count_ether_nic ã§åºåããæå­æ°ã
+ */
+
+static uint16_t
+td_len_ether_nic (void)
+{
+	int_t		ix;
+	uint16_t	len = 0;
+
+	for (ix = NC_ETHER_NIC_SIZE; ix -- > 0; )
+		len += strlen(ether_nic_item[ix]);
+	return len + (sizeof(TD_TEMPLATE3) + TD_DIGITS - 1) * NC_ETHER_NIC_SIZE;
+	}
+
+/*
+ *  put_count_ether_nic -- ã«ã¦ã³ã¿ (ETHER_NIC) ã®å
+å®¹ãåºåããã
+ */
+
+static uint16_t
+put_count_ether_nic (ID cepid, T_WWW_RWBUF *srbuf)
+{
+	char		buf[TD_DIGITS + 1];
+	uint16_t	len = 0;
+	int_t		ix;
+
+	len += put_str(cepid, srbuf, table_prefix_ether_nic);
+	for (ix = NC_ETHER_NIC_SIZE; ix -- > 0; ) {
+		len += put_str(cepid, srbuf, "<tr><td>");
+		len += put_str(cepid, srbuf, ether_nic_item[ix]);
+		len += put_str(cepid, srbuf, "</td><td align=\"right\">");
+		convert(buf, net_count_ether_nic[ix], 10, TD_DIGITS, false, ' ');
+		len += put_str(cepid, srbuf, buf);
+		len += put_str(cepid, srbuf, "</td></tr>\r\n");
+		}
+	len += put_str(cepid, srbuf, table_suffix);
+
+	return len;
+	}
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+/*
+ *  stat_html -- /stat.html ãã¡ã¤ã«
+ */
+
+static ER
+stat_html (ID cepid, T_WWW_RWBUF *srbuf)
+{
+	static const char res_prefix[] =
+		"\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD html 3.2//EN\">\r\n"
+		"<html><head>\r\n"
+
+#ifdef TOPPERS_S810_CLG3_85
+		"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=Shift_JIS\">\r\n"
+#else
+		"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=EUC-JP\">\r\n"
+#endif
+
+		"<title>ãããã¯ã¼ã¯çµ±è¨æ
+å ±</title>\r\n"
+		"</head><body bgcolor=\"#ffffbb\">\r\n"
+		"<hr><h1 align=\"center\">ãããã¯ã¼ã¯çµ±è¨æ
+å ±</h1><hr>\r\n"
+		;
+
+	static const char res_suffix[] =
+		"</body></html>\r\n"
+		;
+
+	static const char table_prefix1[] =
+		"<h2>ã°ã«ã¼ã 1</h2><table border>\r\n"
+		"<tr><th>é 
+ç®</th>\r\n"
+		"<th>åä¿¡ãªã¯ãããæ°</th>"
+		"<th>éä¿¡ãªã¯ãããæ°</th>\r\n"
+		"<th>åä¿¡ãã±ããæ°</th>"
+		"<th>éä¿¡ãã±ããæ°</th>\r\n"
+		"<th>åä¿¡ã¨ã©ã¼<br>ãã±ããæ°</th>"
+		"<th>éä¿¡ã¨ã©ã¼<br>ãã±ããæ°</th></tr>\r\n"
+		;
+
+#ifdef SUPPORT_PPP
+
+	static const char table_prefix2[] =
+		"<h2>ã°ã«ã¼ã 2</h2><table border>\r\n"
+		"<tr><th>é 
+ç®</th>"
+		"<th>åä¿¡ãªã¯ãããæ°</th>"
+		"<th>åä¿¡ãã¬ã¼ã æ°</th></tr>\r\n"
+		;
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+	uint16_t	content_len, len = 0;
+	SYSTIM		start, finish;
+
+	get_tim(&start);
+	content_len = 0
+
+#ifdef SUPPORT_PPP
+
+	    + TD_LEN1("HDLC")
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#ifdef SUPPORT_PPP
+
+	    + td_len_ppp()
+	    + TD_LEN2("LCP")
+	    + TD_LEN2("IPCP")
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#ifdef SUPPORT_ETHER
+
+	    + TD_LEN1("ARP")
+	    + td_len_ether_nic()
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+	    + TD_LEN1("ICMP")
+	    + TD_LEN1("UDP")
+
+#if defined(SUPPORT_INET4)
+
+	    + td_len_ip4()
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+	    + td_len_ip6()
+	    + td_len_nd6()
+	    + td_len_icmp6()
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+	    + td_len_tcp()
+	    + TD_LEN4("0123") * nbuf_get_tbl_size();
+	    ;
+
+	len += put_status(cepid, srbuf, ST_OK);
+	len += put_content_length(cepid, srbuf, strlen(res_prefix) 
+	                        + strlen(res_suffix)
+	                        + strlen(time_prefix)
+	                        + strlen("1234:12:12")
+	                        + strlen(time_suffix)
+	                        + strlen(table_prefix1)
+	                        + strlen(table_prefix_net_buf)
+
+#if defined(SUPPORT_INET4)
+
+	                        + strlen(table_prefix_ip4)
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+	                        + strlen(table_prefix_ip6)
+	                        + strlen(table_prefix_nd6)
+	                        + strlen(table_prefix_icmp6)
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+	                        + strlen(table_prefix_tcp)
+	                        + strlen(table_suffix) * 3
+
+#ifdef SUPPORT_PPP
+	                        + strlen(table_prefix2)
+	                        + strlen(table_prefix_ppp)
+	                        + strlen(table_suffix) * 2
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#ifdef SUPPORT_ETHER
+
+	                        + strlen(table_prefix_ether_nic)
+	                        + strlen(table_suffix) * 1
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+	                        + content_len
+	                        - 2);	/* 2 ã¯æåã® \r\n */
+
+	len += put_str(cepid, srbuf, res_prefix);
+	len += put_elapse_time(cepid, srbuf);
+	len += put_str(cepid, srbuf, table_prefix1);
+
+#ifdef SUPPORT_PPP
+
+	len += put_count_item1(cepid, srbuf, "HDLC", &net_count_hdlc);
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#ifdef SUPPORT_ETHER
+
+	len += put_count_item1(cepid, srbuf, "Ethernet", &net_count_ether);
+
+#if defined(SUPPORT_INET4)
+
+	len += put_count_item1(cepid, srbuf, "ARP", &net_count_arp);
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#if defined(SUPPORT_INET4)
+
+	len += put_count_item1(cepid, srbuf, "ICMP", &net_count_icmp4);
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#ifdef SUPPORT_UDP
+
+	len += put_count_item1(cepid, srbuf, "UDP", &net_count_udp);
+
+#endif	/* of #ifdef SUPPORT_UDP */
+
+	len += put_str(cepid, srbuf, table_suffix);
+
+#ifdef SUPPORT_PPP
+
+	len += put_str(cepid, srbuf, table_prefix2);
+	len += put_count_item2(cepid, srbuf, "LCP", 
+	                       net_count_ppp_lcp_in_octets,
+	                       net_count_ppp_lcp_in_packets);
+	len += put_count_item2(cepid, srbuf, "IPCP", 
+	                       net_count_ppp_ipcp_in_octets,
+	                       net_count_ppp_ipcp_in_packets);
+	len += put_str(cepid, srbuf, table_suffix);
+
+	len += put_count_ppp(cepid, srbuf);
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#ifdef SUPPORT_ETHER
+
+	len += put_count_ether_nic(cepid, srbuf);
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#if defined(SUPPORT_INET4)
+
+	len += put_count_ip4(cepid, srbuf);
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+	len += put_count_ip6(cepid, srbuf);
+	len += put_count_nd6(cepid, srbuf);
+	len += put_count_icmp6(cepid, srbuf);
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+	len += put_count_tcp(cepid, srbuf);
+
+	len += put_count_net_buf(cepid, srbuf);
+
+	len += put_str(cepid, srbuf, res_suffix);
+
+	get_tim(&finish);
+	syslog(LOG_NOTICE, "[WWW:%02u]     send:               stat.html,  len: %4u, time: %lu [ms]",
+	                   cepid, len, (finish - start) * 1000 / SYSTIM_HZ);
+	return E_OK;
+	}
+
+#endif	/* of #if NET_COUNT_ENABLE */
+
+/*
+ *  WWW ãµã¼ã
+ */
+
+static ER
+www_srv (ID cepid, ID repid)
+{
+#if defined(SUPPORT_INET4)
+
+	T_IPV4EP	dst;
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+	T_IPV6EP	dst;
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+	T_WWW_RWBUF	*srbuf;
+	ER		error;
+	SYSTIM		time;
+
+	if ((error = TCP_ACP_CEP(cepid, repid, &dst, TMO_FEVR)) != E_OK) {
+		syslog(LOG_WARNING, "[WWW:%02d] accept error: %s", cepid, itron_strerror(error));
+		return error;
+		}
+
+	get_tim(&time);
+	syslog(LOG_NOTICE, "[WWW:%02u]     connected:  %6lu, from: %s.%u",
+	                   cepid, time / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno);
+
+	if ((error = tget_mpf(MPF_WWW_RWBUF, (void*)&srbuf, TMO_FEVR)) != E_OK) {
+		syslog(LOG_CRIT, "[WWW:%02d] get buffer error: %s.", cepid, itron_strerror(error));
+		srbuf = NULL;
+		}
+	else {
+		srbuf->rbuf.len = srbuf->rbuf.index = srbuf->sbuf.index = srbuf->unget = 0;
+
+#ifdef USE_COPYSAVE_API
+
+		srbuf->sbuf.len = 0;
+
+#else	/* of #ifdef USE_COPYSAVE_API */
+
+		srbuf->sbuf.len = sizeof(srbuf->sbuf.buf);
+
+#endif	/* of #ifdef USE_COPYSAVE_API */
+
+		if ((error = parse_request(cepid, srbuf)) != E_OK)
+			syslog(LOG_WARNING, "[WWW:%02d] parse request error: %s",
+			       cepid, itron_strerror(error));
+		}
+
+	if ((error = tcp_sht_cep(cepid)) != E_OK)
+		syslog(LOG_WARNING, "[WWW:%02d] shutdown error: %s", cepid, itron_strerror(error));
+
+	if (srbuf != NULL) {
+		while (get_char(cepid, srbuf) != EOF)
+			;
+		if (srbuf != NULL && (error = rel_mpf(MPF_WWW_RWBUF, srbuf)) != E_OK)
+			syslog(LOG_WARNING, "[WWW:%02d] release buffer error: %s.",
+			       cepid, itron_strerror(error));
+		}
+
+	if ((error = tcp_cls_cep(cepid, TMO_FEVR)) != E_OK)
+		syslog(LOG_WARNING, "[WWW:%02d] close error: %s", cepid, itron_strerror(error));
+
+	get_tim(&time);
+	syslog(LOG_NOTICE, "[WWW:%02u]     finished:   %6lu", cepid, time / SYSTIM_HZ);
+
+	return error;
+	}
+
+#ifdef USE_TCP_EXTENTIONS
+
+/*
+ *  get_tcp_rep -- TCP åä»å£ãç²å¾ããã
+ */
+
+static ER
+get_tcp_rep (ID *repid)
+{
+	ID		tskid;
+	T_TCP_CREP	crep;
+
+	get_tid(&tskid);
+
+	crep.repatr = UINT_C(0);
+	crep.myaddr.portno = UINT_C(80);
+
+#if defined(SUPPORT_INET4)
+	crep.myaddr.ipaddr = IPV4_ADDRANY;
+#endif
+
+#if defined(SUPPORT_INET6)
+	memcpy(&crep.myaddr.ipaddr, &ipv6_addrany, sizeof(T_IN6_ADDR));
+#endif
+
+
+	return alloc_tcp_rep(repid, tskid, &crep);
+	}
+
+/*
+ *  get_tcp_cep -- TCP éä¿¡ç«¯ç¹ã¨ãç²å¾ããã
+ */
+
+static ER
+get_tcp_cep (ID *cepid)
+{
+	ID		tskid;
+	T_TCP_CCEP	ccep;
+
+	get_tid(&tskid);
+
+	ccep.cepatr = UINT_C(0);
+	ccep.sbufsz = WWW_SRV_SWBUF_SIZE;
+	ccep.rbufsz = WWW_SRV_RWBUF_SIZE;
+	ccep.callback = NULL;
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+	ccep.sbuf = NADR;
+#else
+	ccep.sbuf = www_srv_swbuf[0];
+#endif
+#ifdef TCP_CFG_RWBUF_CSAVE
+	ccep.rbuf = NADR;
+#else
+	ccep.rbuf = www_srv_rwbuf[0];
+#endif
+
+	return alloc_tcp_cep(cepid, tskid, &ccep);
+	}
+
+/*
+ *  WWW ãµã¼ãã¿ã¹ã¯
+ */
+
+void
+www_srv_task(intptr_t exinf)
+{
+	ID	tskid, cepid, repid;
+	ER	error = E_OK;
+
+	syscall(get_tid(&tskid));
+	syslog(LOG_NOTICE, "[WWW:%d] started.", tskid);
+	while (true) {
+
+		syscall(slp_tsk());
+		if ((error = get_tcp_cep (&cepid)) != E_OK) {
+			syslog(LOG_NOTICE, "[WWW:00 EXT] CEP create error: %s", itron_strerror(error));
+			continue;
+			}
+
+		if ((error = get_tcp_rep (&repid)) != E_OK) {
+			syslog(LOG_NOTICE, "[WWW:00 EXT] REP create error: %s", itron_strerror(error));
+			free_tcp_cep(cepid);
+			continue;
+			}
+
+		while (true)
+			if ((error = www_srv(cepid, repid)) != E_OK) {
+				error = free_tcp_rep(repid, error != E_DLT);
+				break;
+				}
+
+		if ((error = free_tcp_cep(cepid)) != E_OK)
+			syslog(LOG_NOTICE, "[WWW:%02d EXT] CEP delete error: %s", cepid, itron_strerror(error));
+
+		}
+	}
+
+#else	/* of #ifdef USE_TCP_EXTENTIONS */
+
+/*
+ *  WWW ãµã¼ãã¿ã¹ã¯
+ */
+
+void
+www_srv_task(intptr_t exinf)
+{
+	ID	tskid;
+
+	get_tim(&srv_start);
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[WWW:%d,%d] started.", tskid, (int_t)exinf);
+	while (true) {
+		while (www_srv((int_t)exinf, WWW_SRV_REPID) == E_OK)
+			;
+		}
+	}
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+#endif	/* of #ifdef USE_WWW_SRV */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/wwws.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/wwws.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/wwws.cfg	(revision 270)
@@ -0,0 +1,91 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  WWW ãµã¼ãã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef USE_WWW_SRV
+
+/* ã¿ã¹ã¯ */
+
+#ifdef USE_TCP_EXTENTIONS
+
+CRE_TSK(WWW_SRV_TASK1,  {
+	TA_HLNG | TA_ACT,
+	0,
+	www_srv_task,
+	WWW_SRV_MAIN_PRIORITY,
+	WWW_SRV_STACK_SIZE,
+	NULL
+	});
+
+#else	/* of #ifdef USE_TCP_EXTENTIONS */
+
+CRE_TSK(WWW_SRV_TASK1,  {
+	TA_HLNG | TA_ACT,
+	WWW_SRV_CEPID1,
+	www_srv_task,
+	WWW_SRV_MAIN_PRIORITY,
+	WWW_SRV_STACK_SIZE,
+	NULL
+	});
+
+#endif	/* of #ifdef USE_TCP_EXTENTIONS */
+
+#if NUM_WWW_SRV_TASKS >= 2
+
+CRE_TSK(WWW_SRV_TASK2,  {
+	TA_HLNG | TA_ACT,
+	WWW_SRV_CEPID2,
+	www_srv_task,
+	WWW_SRV_MAIN_PRIORITY,
+	WWW_SRV_STACK_SIZE,
+	NULL
+	});
+
+#endif	/* of #if NUM_WWW_SRV_TASKS >= 2 */
+
+#endif	/* of #ifdef USE_WWW_SRV */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/wwws.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/wwws.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/wwws.h	(revision 270)
@@ -0,0 +1,151 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _WWWS_H_
+#define _WWWS_H_
+
+/* 
+ *  WWW ãµã¼ã
+ */
+
+#include <tinet_defs.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+
+#include <netinet6/in6.h>
+#include <netinet/ip.h>
+#include <netinet/ip6.h>
+#include <netinet/tcp.h>
+
+#ifdef TOPPERS_S810_CLG3_85
+#define	WWW_SRV_STACK_SIZE		768		/* ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº	*/
+#else	/* of #ifdef TOPPERS_S810_CLG3_85 */
+#define	WWW_SRV_STACK_SIZE		1024		/* ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº	*/
+#endif	/* of #ifdef TOPPERS_S810_CLG3_85 */
+#define WWW_SRV_MAIN_PRIORITY		5		/* ã¿ã¹ã¯ã®åªå
+åº¦		*/
+
+/*
+ *  TCP éåä¿¡ã¦ã¤ã³ããããã¡ãµã¤ãº
+ */
+
+#if defined(NUM_MPF_NET_BUF_IF_PDU) && NUM_MPF_NET_BUF_IF_PDU > 0
+
+#define WWW_SRV_SWBUF_SIZE	((IF_MTU-(IP_HDR_SIZE+TCP_HDR_SIZE))*1)
+
+#else	/* of #if defined(NUM_MPF_NET_BUF_IF_PDU) && NUM_MPF_NET_BUF_IF_PDU > 0 */
+
+#if defined(SUPPORT_INET4)
+#define WWW_SRV_SWBUF_SIZE	(TCP_MSS)
+#endif
+
+#if defined(SUPPORT_INET6)
+#define WWW_SRV_SWBUF_SIZE	(TCP6_MSS)
+#endif
+
+#endif	/* of #if defined(NUM_MPF_NET_BUF_IF_PDU) && NUM_MPF_NET_BUF_IF_PDU > 0 */
+
+#if defined(SUPPORT_INET4)
+#define WWW_SRV_RWBUF_SIZE	(TCP_MSS)
+#endif
+
+#if defined(SUPPORT_INET6)
+#define WWW_SRV_RWBUF_SIZE	(TCP6_MSS)
+#endif
+
+#define WWW_RBUFF_SIZE		(WWW_SRV_RWBUF_SIZE)
+#define WWW_LINE_SIZE		80
+#define WWW_NUM_FIELDS		4
+
+#ifndef _MACRO_ONLY
+
+typedef struct line {
+	uint8_t		len;
+	uint8_t		num;
+	uint8_t		off[WWW_NUM_FIELDS];
+	char		buf[WWW_LINE_SIZE + 1];
+	} T_WWW_LINE;
+
+#ifdef USE_COPYSAVE_API
+
+typedef struct www_buffer {
+	char		*buf;
+	uint16_t	len;
+	uint16_t	index;
+	} T_WWW_BUFFER;
+
+#else	/* of #ifdef USE_COPYSAVE_API */
+
+typedef struct www_buffer {
+	uint16_t	len;
+	uint16_t	index;
+	char		buf[WWW_RBUFF_SIZE];
+	} T_WWW_BUFFER;
+
+#endif	/* of #ifdef USE_COPYSAVE_API */
+
+typedef struct www_rwbuf {
+	T_WWW_BUFFER	sbuf;
+	T_WWW_BUFFER	rbuf;
+	char		unget;
+	} T_WWW_RWBUF;
+
+/* ã¿ã¹ã¯ */
+
+extern void	www_srv_task (intptr_t exinf);
+
+/*
+ *  TCP éåä¿¡ãããã¡
+ */
+
+extern uint8_t www_srv_swbuf[NUM_WWW_SRV_TASKS][WWW_SRV_SWBUF_SIZE];
+extern uint8_t www_srv_rwbuf[NUM_WWW_SRV_TASKS][WWW_SRV_RWBUF_SIZE];
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+#endif	/* of #ifndef _WWWS_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/wwws_asp.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/wwws_asp.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/wwws_asp.cfg	(revision 270)
@@ -0,0 +1,79 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  ASP ç¨ WWW ãµã¼ãã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+/*
+ *  å
+±é WWW ãµã¼ãã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®ã¤ã³ã¯ã«ã¼ã
+ */
+
+INCLUDE("netapp/wwws.cfg");
+
+/*
+ * åºå®ã¡ã¢ãªãã¼ã«
+ */
+
+/* åä¿¡ãããã¡ */
+
+CRE_MPF(MPF_WWW_RWBUF, {
+	TA_TFIFO,
+	1,
+	sizeof(T_WWW_RWBUF),
+	NULL,
+	NULL
+	});
+
+/* è¡ãããã¡ */
+
+CRE_MPF(MPF_WWW_LINE, {
+	TA_TFIFO,
+	2,
+	sizeof(T_WWW_LINE),
+	NULL,
+	NULL
+	});
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/wwws_jsp.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/wwws_jsp.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/wwws_jsp.cfg	(revision 270)
@@ -0,0 +1,81 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  JSP ç¨ WWW ãµã¼ãã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+/*
+ *  å
+±é WWW ãµã¼ãã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®ã¤ã³ã¯ã«ã¼ã
+ */
+
+#include "netapp/wwws.cfg"
+
+#ifdef USE_WWW_SRV
+
+/*
+ * åºå®ã¡ã¢ãªãã¼ã«
+ */
+
+/* åä¿¡ãããã¡ */
+
+CRE_MPF(MPF_WWW_RWBUF, {
+	TA_TFIFO,
+	1,
+	sizeof(T_WWW_RWBUF),
+	NULL
+	});
+
+/* è¡ãããã¡ */
+
+CRE_MPF(MPF_WWW_LINE, {
+	TA_TFIFO,
+	2,
+	sizeof(T_WWW_LINE),
+	NULL
+	});
+
+#endif	/* of #ifdef USE_WWW_SRV */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/Makefile.tinet
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/Makefile.tinet	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/Makefile.tinet	(revision 270)
@@ -0,0 +1,52 @@
+#
+#   TINET (TCP/IP Protocol Stack)
+#  
+#   Copyright (C) 2001-2012 by Dep. of Computer Science and Engineering
+#                    Tomakomai National College of Technology, JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+#   ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+#   è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+#   ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+#   å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+#   å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+#   æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+#  
+#   @(#) $Id: Makefile.tinet,v 1.6 2012/07/18 04:13:23 abe Exp abe $
+#
+
+#
+#  ã³ã³ãã¤ã«ãªãã·ã§ã³
+#
+INCLUDES	:= $(INCLUDES) -I$(TINET_ROOT)/netdev/$(NET_DEV)
+TINET_DIR	:= $(TINET_DIR):$(TINET_ROOT)/netdev/$(NET_DEV)
+TINET_COBJS	:= $(TINET_COBJS) if_mbed.o
+TINET_KERNEL_CFG := $(TINET_KERNEL_CFG) $(TINET_ROOT)/netdev/$(NET_DEV)/if_mbed.cfg
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/if_mbed.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/if_mbed.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/if_mbed.c	(revision 270)
@@ -0,0 +1,472 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *  Copyright (C) 2014 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1995, David Greenman
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice unmodified, this list of conditions, and the following
+ *    disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * 
+ * $FreeBSD: src/sys/i386/isa/if_mbed.c,v 1.148.2.4 1999/09/25 13:08:18 nyan Exp $
+ */
+
+#define CAST(type, val)		((type)(val))
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+#include "kernel/kernel_impl.h"
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/net.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+#include <net/net_buf.h>
+#include <net/ethernet.h>
+
+#include "mbed_interface.h"
+#include "ethernet_api.h"
+#include "ethernetext_api.h"
+#include <string.h>
+#include "if_mbed.h"
+#include "iodefine.h"
+
+#ifdef _MSC_VER
+#include <stdlib.h>
+#endif
+
+extern uint8_t mac_addr[ETHER_ADDR_LEN];
+
+/*
+ *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã«ä¾å­ããã½ããã¦ã§ã¢æ
+å ±
+ */
+
+typedef struct t_mbed_softc {
+	bool_t link_pre;
+	bool_t link_now;
+	bool_t over_flow;
+} T_MBED_SOFTC;
+
+/*
+ *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã½ããã¦ã§ã¢æ
+å ±
+ */
+
+/* ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã«ä¾å­ããã½ããã¦ã§ã¢æ
+å ± */
+
+static T_MBED_SOFTC mbed_softc;
+
+/* ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã«ä¾å­ããªãã½ããã¦ã§ã¢æ
+å ± */
+
+T_IF_SOFTC if_softc = {
+	{0,},						/* ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹	*/
+	0,							/* éä¿¡ã¿ã¤ã ã¢ã¦ã			*/
+	&mbed_softc,				/* ãã£ãã¤ã¹ä¾å­ã®ã½ããã¦ã§ã¢æ
+å ±	*/
+	SEM_IF_MBED_SBUF_READY,	/* éä¿¡ã»ããã©			*/
+	SEM_IF_MBED_RBUF_READY,	/* åä¿¡ã»ããã©			*/
+
+#ifdef SUPPORT_INET6
+
+	IF_MADDR_INIT,				/* ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ãªã¹ã	*/
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+};
+
+/*
+ *  å±æå¤æ°
+ */
+
+static void if_mbed_stop(T_MBED_SOFTC *sc);
+static void if_mbed_init_sub(T_IF_SOFTC *ic);
+
+#ifdef SUPPORT_INET6
+
+static uint32_t ds_crc(uint8_t *addr);
+static void ds_getmcaf(T_IF_SOFTC *ic, uint32_t *mcaf);
+
+/*
+ *  ds_crc -- ã¤ã¼ãµãããã¢ãã¬ã¹ã® CRC ãè¨ç®ããã
+ */
+
+#define POLYNOMIAL	0x04c11db6
+
+static uint32_t
+ds_crc(uint8_t *addr)
+{
+	uint32_t	crc = ULONG_C(0xffffffff);
+	int_t		carry, len, bit;
+	uint8_t		byte;
+
+	for (len = ETHER_ADDR_LEN; len-- > 0; ) {
+		byte = *addr++;
+		for (bit = 8; bit-- > 0; ) {
+			carry = ((crc & ULONG_C(0x80000000)) ? 1 : 0) ^ (byte & UINT_C(0x01));
+			crc <<= 1;
+			byte >>= 1;
+			if (carry)
+				crc = (crc ^ POLYNOMIAL) | carry;
+		}
+	}
+	return crc;
+}
+
+#undef POLYNOMIAL
+
+/*
+ *  ds_getmcaf -- ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ã®ãªã¹ããããã«ãã­ã£ã¹ãã¢ãã¬ã¹
+ *                ãã£ã«ã¿ãè¨ç®ããã
+ */
+
+static void
+ds_getmcaf(T_IF_SOFTC *ic, uint32_t *mcaf)
+{
+	uint32_t	count, index;
+	uint8_t		*af = (uint8_t*)mcaf;
+
+	mcaf[0] = mcaf[1] = 0;
+
+	for (count = MAX_IF_MADDR_CNT; count-- > 0; ) {
+		index = ds_crc(ic->maddrs[count].lladdr) >> 26;
+		af[index >> 3] |= 1 << (index & 7);
+	}
+}
+
+/*
+ * mbed_setrcr -- åä¿¡æ§æã¬ã¸ã¹ã¿ (RCR) ãè¨­å®ããã
+ */
+
+static void
+if_mbed_setrcr(T_IF_SOFTC *ic)
+{
+	T_MBED_SOFTC	*sc = ic->sc;
+}
+
+/*
+ * mbed_addmulti -- ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ãè¿½å ããã
+ */
+
+ER
+if_mbed_addmulti(T_IF_SOFTC *ic)
+{
+	mbed_setrcr(ic);
+	return E_OK;
+}
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+/*
+ *  mbed_stop -- ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ãåæ­¢ããã
+ *
+ *    æ³¨æ: NIC å²ãè¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã³åºããã¨ã
+ */
+
+static void
+if_mbed_stop(T_MBED_SOFTC *sc)
+{
+	ethernetext_start_stop(0);
+}
+
+static void rza1_recv_callback(void)
+{
+	sig_sem(if_softc.semid_rxb_ready);
+}
+
+#define EDMAC_EESIPR_INI_TRANS  (0xF4380000)
+#define EDMAC_EESIPR_INI_RECV   (0x0205001F)    /* 0x02000000 : Detect reception suspended */
+                                                /* 0x00040000 : Detect frame reception */
+                                                /* 0x00010000 : Receive FIFO overflow */
+                                                /* 0x00000010 : Residual bit frame reception */
+                                                /* 0x00000008 : Long frame reception */
+                                                /* 0x00000004 : Short frame reception */
+                                                /* 0x00000002 : PHY-LSI reception error */
+                                                /* 0x00000001 : Receive frame CRC error */
+#define EDMAC_EESIPR_INI_EtherC (0x00400000)    /* 0x00400000 : E-MAC status register */
+
+static void
+if_mbed_init_sub(T_IF_SOFTC *ic)
+{
+	ethernet_cfg_t ethcfg;
+
+	/* Initialize the hardware */
+	ethcfg.int_priority = 6;
+	ethcfg.recv_cb = &rza1_recv_callback;
+	ethcfg.ether_mac = (char *)ic->ifaddr.lladdr;
+	ethernetext_init(&ethcfg);
+}
+
+/*
+ * mbed_reset -- ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ããªã»ããããã
+ */
+
+void
+if_mbed_reset(T_IF_SOFTC *ic)
+{
+	ethernetext_start_stop(0);
+
+	NET_COUNT_ETHER_NIC(net_count_ether_nic[NC_ETHER_NIC_RESETS], 1);
+	if_mbed_stop(ic->sc);
+	if_mbed_init_sub(ic);
+
+	ethernetext_start_stop(1);
+}
+
+/*
+ *  get_mbed_softc -- ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã½ããã¦ã§ã¢æ
+å ±ãè¿ãã
+ */
+
+T_IF_SOFTC *
+if_mbed_get_softc(void)
+{
+	return &if_softc;
+}
+
+/*
+ * mbed_watchdog -- ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã¯ããããã°ã¿ã¤ã ã¢ã¦ã
+ */
+
+void
+if_mbed_watchdog(T_IF_SOFTC *ic)
+{
+	if_mbed_reset(ic);
+}
+
+/*
+ * mbed_probe -- ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®æ¤åº
+ */
+
+void
+if_mbed_probe(T_IF_SOFTC *ic)
+{
+#if (MBED_MAC_ADDRESS_SUM != MBED_MAC_ADDR_INTERFACE)
+	netif->hwaddr[0] = MBED_MAC_ADDR_0;
+	netif->hwaddr[1] = MBED_MAC_ADDR_1;
+	netif->hwaddr[2] = MBED_MAC_ADDR_2;
+	netif->hwaddr[3] = MBED_MAC_ADDR_3;
+	netif->hwaddr[4] = MBED_MAC_ADDR_4;
+	netif->hwaddr[5] = MBED_MAC_ADDR_5;
+#else
+	mbed_mac_address((char *)ic->ifaddr.lladdr);
+#endif
+}
+
+/*
+ * mbed_init -- ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®åæå
+ */
+
+void
+if_mbed_init(T_IF_SOFTC *ic)
+{
+	T_MBED_SOFTC *sc = ic->sc;
+
+	/* mbed_init æ¬ä½ãå¼ã³åºãã*/
+	if_mbed_init_sub(ic);
+
+	act_tsk(IF_MBED_PHY_TASK);
+
+	ethernet_set_link(-1, 0);
+
+	ETHER.EESIPR0 |= EDMAC_EESIPR_INI_TRANS;
+}
+
+void if_mbed_phy_task(intptr_t arg)
+{
+	T_IFNET *ether = ether_get_ifnet();
+	int32_t connect_sts = 0;   /* 0: disconnect, 1:connect */
+	int32_t link_sts;
+	int32_t link_mode_new = NEGO_FAIL;
+	int32_t link_mode_old = NEGO_FAIL;
+
+	while (1) {
+		link_sts = ethernet_link();
+		if (link_sts == 1) {
+			link_mode_new = ethernetext_chk_link_mode();
+			if (link_mode_new != link_mode_old) {
+				if (connect_sts == 1) {
+					ether_set_link_down(ether);
+				}
+				if (link_mode_new != NEGO_FAIL) {
+					ethernetext_set_link_mode(link_mode_new);
+					ETHER.EESIPR0 |= EDMAC_EESIPR_INI_TRANS;
+					ether_set_link_up(ether);
+					connect_sts = 1;
+				}
+			}
+		}
+		else {
+			if (connect_sts != 0) {
+				ether_set_link_down(ether);
+				link_mode_new = NEGO_FAIL;
+				connect_sts = 0;
+			}
+		}
+		link_mode_old = link_mode_new;
+		dly_tsk(PHY_TASK_WAIT);
+	}
+}
+
+/*
+ * mbed_read -- ãã¬ã¼ã ã®èª­ã¿è¾¼ã¿
+ */
+
+T_NET_BUF *
+if_mbed_read(T_IF_SOFTC *ic)
+{
+	T_MBED_SOFTC *sc = ic->sc;
+	T_NET_BUF *input = NULL;
+	uint_t align;
+	int len;
+	uint8_t *dst;
+	ER error;
+
+	len = ethernet_receive();
+	if (len <= 0)
+		return NULL;
+
+	align = ((((len - sizeof(T_IF_HDR)) + 3) >> 2) << 2) + sizeof(T_IF_HDR);
+	if ((error = tget_net_buf(&input, align, TMO_IF_MBED_GET_NET_BUF)) == E_OK && input != NULL) {
+		dst = input->buf + IF_ETHER_NIC_HDR_ALIGN;
+		input->len = ethernet_read((char *)dst, len);
+	}
+	else {
+		NET_COUNT_ETHER_NIC(net_count_ether_nic[NC_ETHER_NIC_IN_ERR_PACKETS], 1);
+		NET_COUNT_ETHER_NIC(net_count_ether_nic[NC_ETHER_NIC_NO_BUFS], 1);
+	}
+
+	sig_sem(ic->semid_rxb_ready);
+
+	return input;
+}
+
+/*
+ * mbed_start -- éä¿¡ãã¬ã¼ã ããããã¡ãªã³ã°ããã
+ */
+
+void
+if_mbed_start(T_IF_SOFTC *ic, T_NET_BUF *output)
+{
+	T_MBED_SOFTC *sc = ic->sc;
+	int32_t len, res, pos;
+
+	for (res = output->len, pos = 0; res > 0; res -= len, pos += len) {
+		len = ethernet_write((char *)output->buf + IF_ETHER_NIC_HDR_ALIGN + pos, res);
+		if (len == 0) {
+			syslog(LOG_WARNING, "ethernet_write => 0");
+			break;
+		}
+	}
+
+	if (ethernet_send() == 0) {
+		syslog(LOG_WARNING, "ethernet_send => 0");
+	}
+}
+
+/*
+ *  MBED Ethernet Controler éåä¿¡å²ãè¾¼ã¿ãã³ãã©
+ */
+
+void
+if_mbed_eth_handler(void)
+{
+    uint32_t stat_edmac;
+    uint32_t stat_etherc;
+
+    /* Clear the interrupt request flag */
+    stat_edmac = (ETHER.EESR0 & ETHER.EESIPR0);       /* Targets are restricted to allowed interrupts */
+    ETHER.EESR0 = stat_edmac;
+    /* Reception-related */
+    if (stat_edmac & EDMAC_EESIPR_INI_RECV) {
+		isig_sem(if_softc.semid_rxb_ready);
+    }
+	if (stat_edmac & EDMAC_EESIPR_INI_TRANS) {
+		isig_sem(if_softc.semid_txb_ready);
+	}
+    /* E-MAC-related */
+    if (stat_edmac & EDMAC_EESIPR_INI_EtherC) {
+        /* Clear the interrupt request flag */
+        stat_etherc = (ETHER.ECSR0 & ETHER.ECSIPR0);  /* Targets are restricted to allowed interrupts */
+        ETHER.ECSR0  = stat_etherc;
+    }
+}
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/if_mbed.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/if_mbed.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/if_mbed.cfg	(revision 270)
@@ -0,0 +1,76 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *  Copyright (C) 2014 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  if_mbed ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef SUPPORT_ETHER
+
+INCLUDE("<ethernet_api.h>");
+
+/* PHYç¨ */
+CRE_TSK(IF_MBED_PHY_TASK, { TA_NULL, 1, if_mbed_phy_task, IF_MBED_PHY_PRIORITY, IF_MBED_PHY_STACK_SIZE, NULL });
+
+/* å²ãè¾¼ã¿ãã³ãã© */
+
+DEF_INH(INHNO_IF_MBED, { TA_HLNG, if_mbed_eth_handler });
+
+/* å
+¥åºååæç¨ã»ããã© */
+
+CRE_SEM(SEM_IF_MBED_SBUF_READY,	{ TA_TPRI, NUM_IF_MBED_TXBUF, NUM_IF_MBED_TXBUF });
+CRE_SEM(SEM_IF_MBED_RBUF_READY,	{ TA_TPRI, 0,                 NUM_IF_MBED_RXBUF });
+
+#endif	/* of #ifdef SUPPORT_ETHER */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/if_mbed.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/if_mbed.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/if_mbed.h	(revision 270)
@@ -0,0 +1,132 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *  Copyright (C) 2014 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (C) 1993, David Greenman. This software may be used, modified,
+ *   copied, distributed, and sold, in both source and binary form provided
+ *   that the above copyright and these terms are retained. Under no
+ *   circumstances is the author responsible for the proper functioning
+ *   of this software, nor does the author assume any responsibility
+ *   for damages incurred with its use.
+ */
+
+#ifndef _IF_MBED_H_
+#define _IF_MBED_H_
+
+#include "ethernet_api.h"
+
+/*
+ *  NIC ã®é¸æãã¯ã­
+ */
+
+#define IF_ETHER_NIC_GET_SOFTC()	if_mbed_get_softc()
+#define IF_ETHER_NIC_WATCHDOG(i)	if_mbed_watchdog(i)
+#define IF_ETHER_NIC_PROBE(i)		if_mbed_probe(i)
+#define IF_ETHER_NIC_INIT(i)		if_mbed_init(i)
+#define IF_ETHER_NIC_READ(i)		if_mbed_read(i)
+#define IF_ETHER_NIC_RESET(i)		if_mbed_reset(i)
+#define IF_ETHER_NIC_START(i,o)		if_mbed_start(i,o)
+
+#define T_IF_ETHER_NIC_SOFTC		struct t_mbed_softc
+
+/* IPv6 é¢ä¿ */
+
+#define IF_ETHER_NIC_IN6_IFID(i,a)	get_mac6_ifid(i,a)	/* ã¤ã³ã¿ãã§ã¼ã¹è­å¥å­ã®è¨­å®		*/
+#define IF_ETHER_NIC_ADDMULTI(s)	if_mbed_addmulti(s)		/* ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ã®ç»é²		*/
+
+#define PHY_TASK_WAIT				200000
+#define IF_MBED_PHY_PRIORITY			4
+#define IF_MBED_PHY_STACK_SIZE			256
+
+#if !defined(TOPPERS_MACRO_ONLY) && !defined(_MACRO_ONLY)
+
+/*
+ *  åæ¹åç
+§
+ */
+
+#ifndef T_IF_SOFTC_DEFINED
+
+typedef struct t_if_softc T_IF_SOFTC;
+
+#define T_IF_SOFTC_DEFINED
+
+#endif	/* of #ifndef T_IF_SOFTC_DEFINED */
+
+#ifndef T_NET_BUF_DEFINED
+
+typedef struct t_net_buf T_NET_BUF;
+
+#define T_NET_BUF_DEFINED
+
+#endif	/* of #ifndef T_NET_BUF_DEFINED */
+
+/*
+ *  é¢æ°
+ */
+
+extern T_IF_SOFTC *if_mbed_get_softc(void);
+extern void if_mbed_watchdog(T_IF_SOFTC *ic);
+extern void if_mbed_probe(T_IF_SOFTC *ic);
+extern void if_mbed_init(T_IF_SOFTC *ic);
+extern void if_mbed_reset(T_IF_SOFTC *ic);
+extern T_NET_BUF *if_mbed_read(T_IF_SOFTC *ic);
+extern void if_mbed_start(T_IF_SOFTC *ic, T_NET_BUF *output);
+extern ER if_mbed_addmulti(T_IF_SOFTC *ic);
+extern void if_mbed_eth_handler(void);
+void if_mbed_phy_task(intptr_t arg);
+
+#endif /* #if !defined(TOPPERS_MACRO_ONLY) && !defined(_MACRO_ONLY) */
+
+#endif	/* of #ifndef _IF_MBED_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/if_mbed_sym.def
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/if_mbed_sym.def	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/if_mbed_sym.def	(revision 270)
@@ -0,0 +1,4 @@
+INHNO_IF_MBED_TRX
+INTNO_IF_MBED_TRX
+INTATR_IF_MBED_TRX
+INTPRI_IF_MBED_TRX
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/nic.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/nic.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/nic.cfg	(revision 270)
@@ -0,0 +1,55 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *  Copyright (C) 2014 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#include "if_mbed.cfg"
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/nic_asp.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/nic_asp.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/nic_asp.cfg	(revision 270)
@@ -0,0 +1,78 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *  Copyright (C) 2014 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  if_mbed ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef SUPPORT_ETHER
+
+#include "device.h"
+#include "tinet_target_config.h"
+
+/* PHYç¨ */
+CRE_TSK(IF_MBED_PHY_TASK, { TA_ACT, 1, if_mbed_phy_task, IF_MBED_PHY_PRIORITY, IF_MBED_PHY_STACK_SIZE, NULL });
+
+/* å²ãè¾¼ã¿ãã³ãã© */
+
+DEF_INH(INHNO_IF_MBED, { TA_NULL, if_mbed_eth_handler });
+CFG_INT(INTNO_IF_MBED, { INTATR_IF_MBED, INTPRI_IF_MBED });
+
+/* å
+¥åºååæç¨ã»ããã© */
+
+CRE_SEM(SEM_IF_MBED_SBUF_READY,	{ TA_TPRI, NUM_IF_MBED_TXBUF, NUM_IF_MBED_TXBUF });
+CRE_SEM(SEM_IF_MBED_RBUF_READY,	{ TA_TPRI, 0,                 NUM_IF_MBED_RXBUF });
+
+#endif	/* of #ifdef SUPPORT_ETHER */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/nic_rename.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/nic_rename.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/nic_rename.h	(revision 270)
@@ -0,0 +1,84 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *  Copyright (C) 2014 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _NIF_RENAME_H_
+#define _NIF_RENAME_H_
+
+/*
+ *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹å
+é¨åã®ãªãã¼ã 
+ */
+
+/* if_mbed.c */
+
+#define mbed_get_softc		_tinet_mbed_get_softc
+#define mbed_watchdog		_tinet_mbed_watchdog
+#define mbed_probe		_tinet_mbed_probe
+#define mbed_init			_tinet_mbed_init
+#define mbed_read			_tinet_mbed_read
+#define mbed_reset		_tinet_mbed_reset
+#define mbed_start		_tinet_mbed_start
+#define if_softc		_tinet_if_softc
+
+/* config/<cpu>/tinet_cpu_config.c */
+
+#define mbed_inter_clear	_tinet_mbed_inter_clear
+
+#ifdef SUPPORT_INET6
+
+#define mbed_addmulti		_tinet_mbed_addmulti
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef _NIF_RENAME_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/tinet_nic_config.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/tinet_nic_config.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/tinet_nic_config.h	(revision 270)
@@ -0,0 +1,67 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *  Copyright (C) 2014 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _TINET_NIC_CONFIG_H_
+#define _TINET_NIC_CONFIG_H_
+
+/*
+ *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®å
+é¨è­å¥åã®ãªãã¼ã 
+ */
+
+#include "nic_rename.h"
+
+#include "if_mbed.h"
+
+#endif	/* of #ifndef _TINET_NIC_CONFIG_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/tinet_nic_defs.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/tinet_nic_defs.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/tinet_nic_defs.h	(revision 270)
@@ -0,0 +1,64 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *  Copyright (C) 2014 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _TINET_NIC_DEFS_H_
+#define _TINET_NIC_DEFS_H_
+
+/* 
+ *  T_ETHER_HDR ã§ãã¢ã©ã¤ã³ãèª¿æ´ããå ´åã¯ãèª¿æ´éãæå®ããã
+ *  èª¿æ´ããªãå ´åã¯ã0 ãæå®ããã
+ */
+#define IF_ETHER_NIC_HDR_ALIGN		0
+
+#endif	/* of #ifndef _TINET_NIC_DEFS_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/icmp6.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/icmp6.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/icmp6.h	(revision 270)
@@ -0,0 +1,521 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet/icmp6.h,v 1.2.2.3 2001/07/06 05:36:35 sumikawa Exp $	*/
+/*	$KAME: icmp6.h,v 1.46 2001/04/27 15:09:48 itojun Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ip_icmp.h	8.1 (Berkeley) 6/10/93
+ */
+
+#ifndef _IP_ICMP6_H_
+#define _IP_ICMP6_H_
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  ICMPv6 ããã
+ */
+
+typedef struct t_icmp6_hdr {
+	uint8_t		type;		/* ã¡ãã»ã¼ã¸ã®å	*/
+	uint8_t		code;		/* ãµãå		*/
+	uint16_t	sum;		/* ãã§ãã¯ãµã 		*/
+	union {
+		uint32_t	data32;
+		uint16_t	data16[2];
+		uint8_t		data8[4];
+		} data;
+	} __attribute__((packed, aligned(2)))T_ICMP6_HDR;
+
+#define icmp6_data32			data.data32
+#define icmp6_data16			data.data16
+#define icmp6_data8			data.data8
+#define icmp6_pptr			data.data32		/* ãã©ã¡ã¼ã¿ç°å¸¸	*/
+#define icmp6_mtu			data.data32		/* ãã©ã¡ã¼ã¿ç°å¸¸	*/
+#define icmp6_id			data.data16[0]		/* ã¨ã³ã¼è¦æ±ã¨å¿ç­	*/
+#define icmp6_seq			data.data16[1]		/* ã¨ã³ã¼è¦æ±ã¨å¿ç­	*/
+
+#define ICMP6_HDR_SIZE			(sizeof(T_ICMP6_HDR))
+#define IF_IP6_ICMP6_HDR_OFFSET		(IF_IP6_HDR_SIZE)
+
+#define GET_ICMP6_HDR(nbuf,ihoff)	((T_ICMP6_HDR*)((uint8_t*)((nbuf)->buf) + ihoff))
+#define GET_ICMP6_SDU(nbuf,ihoff)	((uint8_t*)((nbuf)->buf) + ihoff + ICMP6_HDR_SIZE)
+
+#define GET_IP6_ICMP6_HDR_SIZE(nbuf)	(GET_IP6_HDR_SIZE(GET_IP6_HDR(nbuf)) + ICMP6_HDR_SIZE)
+#define GET_IF_IP6_ICMP6_HDR_SIZE(nbuf)	(IF_HDR_SIZE + GET_IP6_ICMP6_HDR_SIZE(nbuf))
+
+/*
+ *  ICMP6 ã¿ã¤ã
+ */
+
+#define ICMP6_DST_UNREACH		UINT_C(1)	/* å®å
+å°éä¸å¯è½		*/
+#define ICMP6_PACKET_TOO_BIG		UINT_C(2)	/* ãã±ãããå¤§ããããã	*/
+#define ICMP6_TIME_EXCEEDED		UINT_C(3)	/* TTL ãè¶
+éããã		*/
+#define ICMP6_PARAM_PROB		UINT_C(4)	/* IPv6 ããããä¸æ­£ã		*/
+
+#define ICMP6_ECHO_REQUEST		UINT_C(128)	/* ã¨ã³ã¼è¦æ±			*/
+#define ICMP6_ECHO_REPLY		UINT_C(129)	/* ã¨ã³ã¼å¿ç­			*/
+
+#define ICMP6_MEMBERSHIP_QUERY		UINT_C(130)	/* ã°ã«ã¼ãã¡ã³ãç
+§ä¼		*/
+#define ICMP6_MEMBERSHIP_REPORT		UINT_C(131)	/* ã°ã«ã¼ãã¡ã³ãå ±å		*/
+#define ICMP6_MEMBERSHIP_REDUCTION	UINT_C(132)	/* ã°ã«ã¼ãã¡ã³ãçµäº		*/
+
+#define MLD_LISTENER_QUERY		UINT_C(130)	/* ãã«ãã­ã£ã¹ãåä¿¡è
+ç
+§ä¼	*/
+#define MLD_LISTENER_REPORT		UINT_C(131)	/* ãã«ãã­ã£ã¹ãåä¿¡è
+å ±å	*/
+#define MLD_LISTENER_DONE		UINT_C(132)	/* ãã«ãã­ã£ã¹ãåä¿¡è
+çµäº	*/
+
+#define ND_ROUTER_SOLICIT		UINT_C(133)	/* ã«ã¼ã¿è¦è«			*/
+#define ND_ROUTER_ADVERT		UINT_C(134)	/* ã«ã¼ã¿éç¥			*/
+#define ND_NEIGHBOR_SOLICIT		UINT_C(135)	/* è¿é£è¦è«			*/
+#define ND_NEIGHBOR_ADVERT		UINT_C(136)	/* è¿é£éç¥			*/
+#define ND_REDIRECT			UINT_C(137)	/* åãç´ã			*/
+
+#define ICMP6_ROUTER_RENUMBERING	UINT_C(138)	/* ã«ã¼ã¿çªå·åè¨­å®		*/
+
+#define ICMP6_WRU_REQUEST		UINT_C(139)	/* è¦æ±ãã¼ãæ¢ç´¢		*/
+#define ICMP6_WRU_REPLY			UINT_C(140)	/* å¿ç­ãã¼ãæ¢ç´¢		*/
+
+#define ICMP6_FQDN_QUERY		UINT_C(139)	/* FQDN ç
+§ä¼			*/
+#define ICMP6_FQDN_REPLY		UINT_C(140)	/* FQDN å¿ç­			*/
+
+#define ICMP6_NI_QUERY			UINT_C(139)	/* ãã¼ãæ
+å ±ç
+§ä¼		*/
+#define ICMP6_NI_REPLY			UINT_C(140)	/* ãã¼ãæ
+å ±å¿ç­		*/
+
+#define ICMP6_MAX_TYPE			UINT_C(203)	/* ICMP6 ã¿ã¤ãã®æå¤§å¤		*/
+
+/*
+ *  ICMP6 ã³ã¼ã
+ */
+
+/* å®å
+å°éä¸å¯è½ */
+
+#define ICMP6_DST_UNREACH_NOROUTE	UINT_C(0)	/* å°éã«ã¼ããªãã		*/
+#define ICMP6_DST_UNREACH_ADMIN		UINT_C(1)	/* ç®¡çè
+ã«ããç¡å¹åä¸­ã	*/
+#define ICMP6_DST_UNREACH_NOTEIGHBOR	UINT_C(2)	/* è¿é£è
+ã§ã¯ãªããªã£ãã	*/
+#define ICMP6_DST_UNREACH_BEYOND_SCOPE	UINT_C(2)	/* ã¹ã³ã¼ããè¶
+ãã¦ããã	*/
+#define ICMP6_DST_UNREACH_ADDR		UINT_C(3)	/* å®å
+ã¢ãã¬ã¹ã«å°éä¸å¯è½ã	*/
+#define ICMP6_DST_UNREACH_NOPORT	UINT_C(4)	/* å®å
+ãã¼ãã«å°éä¸å¯è½ã	*/
+
+/* TTL è¶
+é */
+
+#define ICMP6_TIME_EXCEED_TRANSIT	UINT_C(0)	/* è»¢éæã« TTL==0 ã«ãªã£ãã	*/
+#define ICMP6_TIME_EXCEED_REASSEMBLY	UINT_C(1)	/* IP åæ§æã§ã¿ã¤ã ã¢ã¦ãããã*/
+
+/* ãããä¸æ­£ */
+
+#define ICMP6_PARAMPROB_HEADER		UINT_C(0)	/* ãããã«ä¸æ­£ããã£ãã	*/
+#define ICMP6_PARAMPROB_NEXT_HEADER	UINT_C(1)	/* æ¬¡ããããèªè­ã§ããªãã	*/
+#define ICMP6_PARAMPROB_OPTION		UINT_C(2)	/* ãªãã·ã§ã³ãèªè­ã§ããªãã	*/
+
+/* å
+é¨ä½¿ç¨ */
+#define ND_REDIRECT_ONLINK		UINT_C(0)	/* ãªã³ãªã³ã¯ã¸ã®åãç´ã	*/
+#define ND_REDIRECT_ROUTER		UINT_C(1)	/* ã«ã¼ã¿ã¸ã®åãç´ã		*/
+
+/*
+ *  å¶éå¤
+ */
+
+							/* ICMPv6 ã®æå¤§ãã¤ã­ã¼ãé·	*/
+#define ICMPV6_PAYLOAD_MAXLEN		(IPV6_MMTU - (IP6_HDR_SIZE + ICMP6_HDR_SIZE))
+
+/*
+ *  è¿é£è¦è«
+ */
+
+typedef struct t_neighbor_solicit_hdr {
+	T_ICMP6_HDR	hdr;
+	T_IN6_ADDR	target;
+	/* ãã®å¾ã«ãªãã·ã§ã³ãç¶ã */
+	} __attribute__((packed, aligned(2)))T_NEIGHBOR_SOLICIT_HDR;
+
+#define NEIGHBOR_SOLICIT_HDR_SIZE	(sizeof(T_NEIGHBOR_SOLICIT_HDR))
+#define IF_IP6_NEIGHBOR_SOLICIT_HDR_OFFSET	\
+					(IF_IP6_HDR_SIZE)
+
+#define GET_NEIGHBOR_SOLICIT_HDR(nbuf,nhoff)	\
+					((T_NEIGHBOR_SOLICIT_HDR*)((uint8_t*)((nbuf)->buf) + nhoff))
+#define GET_NEIGHBOR_SOLICIT_SDU(nbuf,nhoff)	\
+					((uint8_t*)((nbuf)->buf) + nhoff + NEIGHBOR_SOLICIT_HDR_SIZE)
+
+#define GET_IP6_NEIGHBOR_SOLICIT_HDR_SIZE(nbuf)		\
+					(GET_IP6_HDR_SIZE(GET_IP6_HDR(nbuf)) + NEIGHBOR_SOLICIT_HDR_SIZE)
+#define GET_IF_IP6_NEIGHBOR_SOLICIT_HDR_SIZE(nbuf)	\
+					(GET_IP6_NEIGHBOR_SOLICIT_HDR_SIZE(nbuf) + IF_HDR_SIZE)
+
+/*
+ *  è¿é£éç¥
+ */
+
+typedef struct t_neighbor_advert_hdr {
+	T_ICMP6_HDR	hdr;
+	T_IN6_ADDR	target;
+	/* ãã®å¾ã«ãªãã·ã§ã³ãç¶ã */
+	} __attribute__((packed, aligned(2)))T_NEIGHBOR_ADVERT_HDR;
+
+/* ICMP6 ãããã®ãã¼ã¿é¨ã®å®ç¾© */
+
+#define nd_na_flags_reserved		hdr.data.data32
+
+#define NEIGHBOR_ADVERT_HDR_SIZE	(sizeof(T_NEIGHBOR_ADVERT_HDR))
+#define IP6_NEIGHBOR_ADVERT_HDR_SIZE	(IP6_HDR_SIZE + NEIGHBOR_ADVERT_HDR_SIZE)
+#define IF_IP6_NEIGHBOR_ADVERT_HDR_SIZE	\
+					(IF_IP6_HDR_SIZE + NEIGHBOR_ADVERT_HDR_SIZE)
+#define IF_IP6_NEIGHBOR_ADVERT_HDR_OFFSET	\
+					(IF_IP6_HDR_SIZE)
+
+#define GET_NEIGHBOR_ADVERT_HDR(nbuf,nhoff)	\
+					((T_NEIGHBOR_ADVERT_HDR*)((uint8_t*)((nbuf)->buf) + nhoff))
+#define GET_NEIGHBOR_ADVERT_SDU(nbuf,nhoff)	\
+					((uint8_t*)((nbuf)->buf) + nhoff + NEIGHBOR_ADVERT_HDR_SIZE)
+
+#define GET_IP6_NEIGHBOR_ADVERT_HDR_SIZE(nbuf)		\
+					(GET_IP6_HDR_SIZE(GET_IP6_HDR(nbuf)) + NEIGHBOR_ADVERT_HDR_SIZE)
+#define GET_IF_IP6_NEIGHBOR_ADVERT_HDR_SIZE(nbuf)	\
+					(GET_IP6_NEIGHBOR_ADVERT_HDR_SIZE(nbuf) + IF_HDR_SIZE)
+
+/*
+ *  è¿é£éç¥ãã©ã°ãnd_na_flags_reserved (hdr.data32) ã«è¨­å®ããã
+ */
+
+#if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN
+
+#define ND_NA_FLG_OVERRIDE		ULONG_C(0x20000000)	/* è¿é£ã­ã£ãã·ã¥ä¸æ¸ã	*/
+#define ND_NA_FLG_SOLICITED		ULONG_C(0x40000000)	/* è¿é£è¦è«ã¸ã®å¿ç­	*/
+#define ND_NA_FLG_ROUTER		ULONG_C(0x80000000)	/* ã«ã¼ã¿éç¥		*/
+
+#elif _NET_CFG_BYTE_ORDER == _NET_CFG_LITTLE_ENDIAN
+
+#define ND_NA_FLG_OVERRIDE		ULONG_C(0x00000020)	/* è¿é£ã­ã£ãã·ã¥ä¸æ¸ã	*/
+#define ND_NA_FLG_SOLICITED		ULONG_C(0x00000040)	/* è¿é£è¦è«ã¸ã®å¿ç­	*/
+#define ND_NA_FLG_ROUTER		ULONG_C(0x00000080)	/* ã«ã¼ã¿éç¥		*/
+
+#endif	/* #if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN */
+
+/*
+ *  ã«ã¼ã¿éç¥
+ */
+
+typedef struct t_router_advert_hdr {
+	T_ICMP6_HDR	hdr;
+	uint32_t	reachable;		/* [ms] å°éå¯è½æé	*/
+	uint32_t	retransmit;		/* [ms] è¿é£è¦è«éä¿¡éé	*/
+	/* ãã®å¾ã«ãªãã·ã§ã³ãç¶ã */
+	} __attribute__((packed, aligned(2)))T_ROUTER_ADVERT_HDR;
+
+/* ICMP6 ãããã®ãã¼ã¿é¨ã®å®ç¾© */
+
+#define nd_ra_current_hoplimit		hdr.data.data8[0]
+#define nd_ra_flags			hdr.data.data8[1]
+#define nd_ra_router_lifetime		hdr.data.data16[1]	/* [s] ã«ã¼ã¿æå¹æé	*/
+
+#define ROUTER_ADVERT_HDR_SIZE		(sizeof(T_ROUTER_ADVERT_HDR))
+#define IP6_ROUTER_ADVERT_HDR_SIZE	(IP6_HDR_SIZE + ROUTER_ADVERT_HDR_SIZE)
+#define IF_IP6_ROUTER_ADVERT_HDR_SIZE	(IF_IP6_HDR_SIZE + ROUTER_ADVERT_HDR_SIZE)
+#define IF_IP6_ROUTER_ADVERT_HDR_OFFSET	(IF_IP6_HDR_SIZE)
+
+#define GET_ROUTER_ADVERT_HDR(nbuf,nhoff)	\
+					((T_ROUTER_ADVERT_HDR*)((uint8_t*)((nbuf)->buf) + nhoff))
+#define GET_ROUTER_ADVERT_SDU(nbuf,nhoff)	\
+					((uint8_t*)((nbuf)->buf) + nhoff + ROUTER_ADVERT_HDR_SIZE)
+
+#define GET_IP6_ROUTER_ADVERT_HDR_SIZE(nbuf)	\
+					(GET_IP6_HDR_SIZE(GET_IP6_HDR(nbuf)) + ROUTER_ADVERT_HDR_SIZE)
+#define GET_IF_IP6_ROUTER_ADVERT_HDR_SIZE(nbuf)	\
+					(GET_IP6_ROUTER_ADVERT_HDR_SIZE(nbuf) + IF_HDR_SIZE)
+
+/*
+ *  ã«ã¼ã¿éç¥ãããã®ãã©ã°
+ */
+
+#define ND_RA_FLAG_MANAGED		UINT_C(0x80)
+#define ND_RA_FLAG_OTHER		UINT_C(0x40)
+#define ND_RA_FLAG_HA			UINT_C(0x20)
+
+/*
+ *  ã«ã¼ã¿è¦è«
+ */
+
+typedef struct t_router_solicit_hdr {
+	T_ICMP6_HDR	hdr;
+	} __attribute__((packed, aligned(2)))T_ROUTER_SOLICIT_HDR;
+
+/* ICMP6 ãããã®ãã¼ã¿é¨ã®å®ç¾© */
+
+#define nd_rs_reserved			hdr.data.data32
+
+#define ROUTER_SOLICIT_HDR_SIZE		(sizeof(T_ROUTER_SOLICIT_HDR))
+#define IP6_ROUTER_SOLICIT_HDR_SIZE	(IP6_HDR_SIZE + ROUTER_SOLICIT_HDR_SIZE)
+#define IF_IP6_ROUTER_SOLICIT_HDR_SIZE	(IF_IP6_HDR_SIZE + ROUTER_SOLICIT_HDR_SIZE)
+#define IF_IP6_ROUTER_SOLICIT_HDR_OFFSET	\
+					(IF_IP6_HDR_SIZE)
+
+#define GET_ROUTER_SOLICIT_HDR(nbuf,nhoff)	\
+					((T_ROUTER_SOLICIT_HDR*)((uint8_t*)((nbuf)->buf) + nhoff))
+#define GET_ROUTER_SOLICIT_SDU(nbuf,nhoff)	\
+					((uint8_t*)((nbuf)->buf) + nhoff + ROUTER_SOLICIT_HDR_SIZE)
+
+#define GET_IP6_ROUTER_SOLICIT_HDR_SIZE(nbuf)		\
+					(GET_IP6_HDR_SIZE(GET_IP6_HDR(nbuf)) + ROUTER_SOLICIT_HDR_SIZE)
+#define GET_IF_IP6_ROUTER_SOLICIT_HDR_SIZE(nbuf)	\
+					(GET_IP6_ROUTER_SOLICIT_HDR_SIZE(nbuf) + IF_HDR_SIZE)
+
+/*
+ *  è¿é£æ¢ç´¢ãªãã·ã§ã³
+ */
+
+/* è¿é£æ¢ç´¢ããã */
+
+typedef struct t_neighbor_hdr {
+	T_ICMP6_HDR	hdr;
+	T_IN6_ADDR	target;
+	} __attribute__((packed, aligned(2)))T_NEIGHBOR_HDR;
+
+/* è¿é£æ¢ç´¢ãªãã·ã§ã³ããã */
+
+typedef struct t_nd_opt_hdr {
+	uint8_t		type;			/* ãªãã·ã§ã³ã¿ã¤ã			*/
+	uint8_t		len;			/* ãªãã·ã§ã³é·ãåä½ã¯ 8 ãã¤ã	*/
+	} __attribute__((packed, aligned(2)))T_ND_OPT_HDR;
+
+#define ND_OPT_HDR_SIZE			(sizeof(T_ND_OPT_HDR))
+
+#define ND_OPT_SOURCE_LINKADDR		UINT_C(1)	/* éä¿¡å
+ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹	*/
+#define ND_OPT_TARGET_LINKADDR		UINT_C(2)	/* å¯¾è±¡ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹	*/
+#define ND_OPT_PREFIX_INFORMATION	UINT_C(3)	/* ãã¬ãã£ãã¯ã¹æ
+å ±				*/
+#define ND_OPT_REDIRECTED_HEADER	UINT_C(4)	/* ãªãã¤ã¬ã¯ãã»ããã				*/
+#define ND_OPT_MTU			UINT_C(5)	/* MTU						*/
+
+#define ND_OPT_PREFIX_INFO_COUNT	UINT_C(6)	/* ãã¬ãã£ãã¯ã¹æ
+å ±ã®åæ°			*/
+#define ND_OPT_OFF_ARRAY_SIZE		UINT_C(7)	/* ND ãªãã·ã§ã³ã®ãªãã»ãããè¨é²ããé
+åãµã¤ãº*/
+
+#define ND_OPT_OFF_ARRAY_IX(t)		((t)-1)		/* ãªãã»ããé
+åã®ã¤ã³ããã¯ã¹			*/
+
+/* ãã¬ãã£ãã¯ã¹ãªãã·ã§ã³ */
+
+typedef struct t_nd_opt_prefix_info {
+	uint8_t		type;		/* è¿é£æ¢ç´¢ãªãã·ã§ã³ã¿ã¤ã = 3	*/
+	uint8_t		len;		/* ãªãã·ã§ã³é· = 8Ã4=32	*/
+	uint8_t		prefix_len;	/* ãã¬ãã£ãã¯ã¹é·		*/
+	uint8_t		flags;		/* ãã©ã°			*/
+	uint32_t	valid;		/* [s] æå¹æé			*/
+	uint32_t	preferred;	/* [s] æ¨å¥¨æå¹æé		*/
+	uint32_t	reserved;
+	T_IN6_ADDR	prefix;		/* ãã¬ãã£ãã¯ã¹		*/
+	} __attribute__((packed, aligned(2)))T_ND_OPT_PREFIX_INFO;
+
+#define ND_OPT_PI_FLAG_ONLINK	UINT_C(0x80)		/* ãªã³ãªã³ã¯ãã¬ãã£ãã¯ã¹	*/
+#define ND_OPT_PI_FLAG_AUTO	UINT_C(0x40)		/* ã¹ãã¼ãã¬ã¹ã»ã¢ãã¬ã¹èªåè¨­å®*/
+
+/* MTU ãªãã·ã§ã³ããã */
+
+typedef struct t_nd_opt_mtu_hdr {
+	uint8_t		type;		/* ãªãã·ã§ã³ã¿ã¤ã		*/
+	uint8_t		len;		/* ãªãã·ã§ã³é·ãåä½ã¯ 8 ãã¤ã*/
+	uint16_t	reserved;
+	uint32_t	mtu;		/* MTU				*/
+	} __attribute__((packed, aligned(2)))T_ND_OPT_MTU_HDR;
+
+/*
+ *  åãç´ã
+ */
+
+typedef struct t_nd_redirect_hdr {
+	T_ICMP6_HDR	hdr;
+	T_IN6_ADDR	target;		/* ã«ã¼ã¿ã®ã¢ãã¬ã¹		*/
+	T_IN6_ADDR	dst;		/* åãç´ãã®çµç¹ã¢ãã¬ã¹		*/
+	/* ãã®å¾ã«ãªãã·ã§ã³ãç¶ã */
+	} __attribute__((packed, aligned(2)))T_ND_REDIRECT_HDR;
+
+#define ND_REDIRECT_HDR_SIZE		(sizeof(T_ND_REDIRECT_HDR))
+
+#ifdef SUPPORT_MIB
+
+/*
+ *  SNMP ã® ç®¡çæ
+å ±ãã¼ã¹ (MIB)
+ */
+
+typedef struct t_icmp6_ifstat {
+	uint32_t	ipv6IfIcmpInMsgs;
+	uint32_t	ipv6IfIcmpInErrors;
+	uint32_t	ipv6IfIcmpInDestUnreachs;
+/*	uint32_t	ipv6IfIcmpInAdminProhibs;*/
+	uint32_t	ipv6IfIcmpInTimeExcds;
+	uint32_t	ipv6IfIcmpInParmProblems;
+	uint32_t	ipv6IfIcmpInPktTooBigs;
+	uint32_t	ipv6IfIcmpInEchos;
+	uint32_t	ipv6IfIcmpInEchoReplies;
+/*	uint32_t	ipv6IfIcmpInRouterSolicits;*/
+	uint32_t	ipv6IfIcmpInRouterAdvertisements;
+	uint32_t	ipv6IfIcmpInNeighborSolicits;
+	uint32_t	ipv6IfIcmpInNeighborAdvertisements;
+	uint32_t	ipv6IfIcmpInRedirects;
+/*	uint32_t	ipv6IfIcmpInGroupMembQueries;*/
+/*	uint32_t	ipv6IfIcmpInGroupMembResponses;*/
+/*	uint32_t	ipv6IfIcmpInGroupMembReductions;*/
+	uint32_t	ipv6IfIcmpOutMsgs;
+	uint32_t	ipv6IfIcmpOutErrors;
+	uint32_t	ipv6IfIcmpOutDestUnreachs;
+/*	uint32_t	ipv6IfIcmpOutAdminProhibs;*/
+/*	uint32_t	ipv6IfIcmpOutTimeExcds;*/
+	uint32_t	ipv6IfIcmpOutParmProblems;
+	uint32_t	ipv6IfIcmpOutPktTooBigs;
+	uint32_t	ipv6IfIcmpOutEchos;
+	uint32_t	ipv6IfIcmpOutEchoReplies;
+	uint32_t	ipv6IfIcmpOutRouterSolicits;
+/*	uint32_t	ipv6IfIcmpOutRouterAdvertisements;*/
+	uint32_t	ipv6IfIcmpOutNeighborSolicits;
+	uint32_t	ipv6IfIcmpOutNeighborAdvertisements;
+/*	uint32_t	ipv6IfIcmpOutRedirects;*/
+/*	uint32_t	ipv6IfIcmpOutGroupMembQueries;*/
+/*	uint32_t	ipv6IfIcmpOutGroupMembResponses;*/
+/*	uint32_t	ipv6IfIcmpOutGroupMembReductions;*/
+} T_ICMP6_IFSTAT;
+
+extern T_ICMP6_IFSTAT icmp6_ifstat;
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+/*
+ *  é¢æ°
+ */
+
+extern uint_t icmp6_input (T_NET_BUF **inputp, uint_t *offp, uint_t *nextp);
+extern void icmp6_error (T_NET_BUF *input, uint8_t type, uint8_t code, uint32_t param);
+
+#ifdef ICMP_CFG_CALLBACK_ECHO_REPLY
+
+extern void icmp6_echo_reply (T_NET_BUF *input, uint_t ihoff);
+
+#endif	/* of #ifdef ICMP_CFG_CALLBACK_ECHO_REPLY */
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef _IP_ICMP6_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/icmp_var.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/icmp_var.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/icmp_var.h	(revision 270)
@@ -0,0 +1,125 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)icmp_var.h	8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/netinet/icmp_var.h,v 1.15.2.2 2001/12/07 09:23:11 ru Exp $
+ */
+
+#ifndef _ICMP_VAR_H_
+#define _ICMP_VAR_H_
+
+#ifdef SUPPORT_MIB
+
+/*
+ *  SNMP ã® ç®¡çæ
+å ±ãã¼ã¹ (MIB)
+ */
+
+typedef struct t_icmp_stats {
+/*	uint32_t	icmpInMsgs;*/
+	uint32_t	icmpInErrors;
+	uint32_t	icmpInDestUnreachs;
+/*	uint32_t	icmpInTimeExcds;*/
+/*	uint32_t	icmpInParmProbs;*/
+/*	uint32_t	icmpInSrcQuenchs;*/
+	uint32_t	icmpInRedirects;
+	uint32_t	icmpInEchos;
+	uint32_t	icmpInEchoReps;
+/*	uint32_t	icmpInTimestamps;*/
+/*	uint32_t	icmpInTimestampReps;*/
+/*	uint32_t	icmpInAddrMasks;*/
+/*	uint32_t	icmpInAddrMaskReps;*/
+	uint32_t	icmpOutMsgs;
+	uint32_t	icmpOutErrors;
+	uint32_t	icmpOutDestUnreachs;
+/*	uint32_t	icmpOutTimeExcds;*/
+/*	uint32_t	icmpOutParmProbs;*/
+/*	uint32_t	icmpOutSrcQuenchs;*/
+/*	uint32_t	icmpOutRedirects;*/
+	uint32_t	icmpOutEchos;
+	uint32_t	icmpOutEchoReps;
+/*	uint32_t	icmpOutTimestamps;*/
+/*	uint32_t	icmpOutTimestampReps;*/
+/*	uint32_t	icmpOutAddrMasks;*/
+/*	uint32_t	icmpOutAddrMaskReps;*/
+} T_ICMP_STATS;
+
+extern T_ICMP_STATS icmp_stats;
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+#endif	/* of #ifndef _ICMP_VAR_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/if_ether.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/if_ether.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/if_ether.c	(revision 270)
@@ -0,0 +1,535 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)if_ether.c	8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/netinet/if_ether.c,v 1.52.2.6 1999/10/18 11:59:31 sheldonh Exp $
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_var.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet/ip.h>
+#include <netinet/if_ether.h>
+
+#include <net/if_var.h>
+
+#if defined(SUPPORT_INET4) && defined(SUPPORT_ETHER)
+
+/*
+ *  ARP ã­ã£ãã·ã¥ã¨ã³ããª
+ */
+
+static T_ARP_ENTRY arp_cache[NUM_ARP_ENTRY];
+
+/*
+ *  é¢æ°
+ */
+
+static T_ARP_ENTRY *arp_lookup (T_IN4_ADDR addr, bool_t create);
+static void in_arpinput (T_IF_ADDR *ifaddr, T_NET_BUF *input);
+static void arp_timer (void *ignore);
+
+/*
+ *  arp_lookup -- ARP ã­ã£ãã·ã¥ã®æ¢ç´¢ã¨ç»é²
+ *
+ *    æ³¨æ: SEM_ARP_CACHE_LOCK ãç²å¾ããç¶æ
+ã§å¼åºããã¨
+ */
+
+static T_ARP_ENTRY *
+arp_lookup (T_IN4_ADDR addr, bool_t create)
+{
+	int_t		ix, six;
+	uint16_t	min;
+
+	for (ix = NUM_ARP_ENTRY; ix -- > 0; ) {
+		if (arp_cache[ix].expire && arp_cache[ix].ip_addr == addr)
+			return &arp_cache[ix];
+		}
+
+	/* create ãçãªããæ°ããªã¨ã³ããªãç»é²ããã*/
+	if (create) {
+
+		/* ã¾ããç©ºããããã°ããã®ç©ºããå©ç¨ããã*/
+		for (ix = NUM_ARP_ENTRY; ix -- > 0; ) {
+			if (arp_cache[ix].expire == 0) {
+				arp_cache[ix].ip_addr = addr;
+				return &arp_cache[ix];
+				}
+			}
+
+		/*
+		 *  ç©ºãããªããã°ãã¿ã¤ã ã¢ã¦ãã¾ã§æéãæç­ã®
+		 *  ã¨ã³ããªã¼ãç ´æ£ãã¦å©ç¨ããã
+		 */
+		syslog(LOG_NOTICE, "[ARP] cache busy, size=%d", NUM_ARP_ENTRY);
+		min = 0xffff;
+		for (six = ix = NUM_ARP_ENTRY; ix -- > 0; )
+			if (arp_cache[ix].expire < min) {
+				six = ix;
+				min = arp_cache[ix].expire;
+				}
+		arp_cache[six].expire  = 0;
+		arp_cache[six].ip_addr = addr;
+		return &arp_cache[six];
+		}
+	else
+		return NULL;
+	}
+
+/*
+ *  in_arpinput -- TCP/IP ç¨ ARP ã®å
+¥åé¢æ°
+ */
+
+static void
+in_arpinput (T_IF_ADDR *ifaddr, T_NET_BUF *input)
+{
+	T_NET_BUF	*pending;
+	T_ETHER_HDR	*eth;
+	T_ARP_HDR	*arph;
+	T_ETHER_ARP_HDR	*et_arph;
+	T_ARP_ENTRY	*ent;
+	T_IFNET		*ifp = IF_GET_IFNET();
+	T_IN4_ADDR	saddr, taddr;
+
+	et_arph = GET_ETHER_ARP_HDR(input);
+
+	ntoahl(saddr, et_arph->sproto);		/* éä¿¡å
+ IP ã¢ãã¬ã¹	*/
+	ntoahl(taddr, et_arph->tproto);		/* è§£æ±ºå¯¾è±¡ IP ã¢ãã¬ã¹	*/
+
+	/*
+	 *  ä»¥ä¸ã®å ´åã¯ã¨ã©ã¼
+	 *    ã»éä¿¡ãã¹ãã®ç©çã¢ãã¬ã¹ãèªå
+	 *    ã»éä¿¡ãã¹ãã®ç©çã¢ãã¬ã¹ããã­ã¼ãã­ã£ã¹ã
+	 */
+	if (memcmp(et_arph->shost, ifaddr->lladdr,        ETHER_ADDR_LEN) == 0 ||
+	    memcmp(et_arph->shost, ether_broad_cast_addr, ETHER_ADDR_LEN) == 0)
+		goto err_ret;
+
+	/*
+	 *  éä¿¡ãã¹ãã® IP ã¢ãã¬ã¹ãèªåã®å ´åã¯ãéè¤ãã¦ããã®ã§
+	 *  ç¸æã«ãç¥ãããã
+	 */
+	if (saddr == ifp->in_ifaddr.addr) {
+
+#ifdef ARP_CFG_CALLBACK_DUPLICATED
+
+		if (arp_callback_duplicated(et_arph->shost)) {
+			syslog(LOG_ERROR, "[ARP] IP address duplicated: %s", mac2str(NULL, et_arph->shost));
+			taddr = saddr;
+			goto reply;
+			}
+		else
+			goto buf_rel;
+
+#else	/* of #ifdef ARP_CFG_CALLBACK_DUPLICATED */
+
+		syslog(LOG_ERROR, "[ARP] IP address duplicated: %s", mac2str(NULL, et_arph->shost));
+		taddr = saddr;
+		goto reply;
+
+#endif	/* of #ifdef ARP_CFG_CALLBACK_DUPLICATED */
+
+		}
+
+	/*
+	 *  ä»¥ä¸ã®å ´åã¯ä½ãããªãã
+	 *    ã»è§£æ±ºå¯¾è±¡ IP ã¢ãã¬ã¹ãèªåã§ã¯ãªããæ³¨: å
+ã® FreeBSD ã®
+	 *      å®è£
+ã§ã¯ãARP PROXY ç­ã®ãããèªåä»¥å¤ã® IP ã¢ãã¬ã¹ã®
+	 *      è§£æ±ºãè¡ã£ã¦ããããæ¬å®è£
+ã§ã¯ãèªåä»¥å¤ã® IP
+	 *      ã¢ãã¬ã¹ã®è§£æ±ºã¯è¡ããªãã
+	 */
+	if (taddr != ifp->in_ifaddr.addr)
+		goto buf_rel;
+
+	/*
+	 *  éä¿¡å
+ IP ã¢ãã¬ã¹ã ARP ã­ã£ãã·ã¥ã«ãããèª¿ã¹ãã
+	 *  ã­ã£ãã·ã¥ã«ãªããã°ãæ°ãã«ã¨ã³ããªãç»é²ããã
+	 */
+	syscall(wai_sem(SEM_ARP_CACHE_LOCK));
+	ent = arp_lookup(saddr, true);
+
+	memcpy(ent->mac_addr, et_arph->shost, ETHER_ADDR_LEN);
+	ent->expire = ARP_CACHE_KEEP;
+
+	/*
+	 *  éä¿¡ããã³ãã³ã°ããã¦ãããã¬ã¼ã ãããã°éä¿¡ããã
+	 */
+	if (ent->hold) {
+
+		/* ãã¬ã¼ã ã® Ethernet ããããè¨­å®ããã*/
+		memcpy(GET_ETHER_HDR(ent->hold)->dhost, ent->mac_addr, ETHER_ADDR_LEN);
+
+		pending = ent->hold;
+		ent->hold = NULL;
+		syscall(sig_sem(SEM_ARP_CACHE_LOCK));
+
+		/* ãã³ãã£ã³ã°ããã¦ãããã¬ã¼ã ãéä¿¡ããã*/
+		IF_RAW_OUTPUT(pending, TMO_FEVR);
+
+		}
+	else
+		syscall(sig_sem(SEM_ARP_CACHE_LOCK));
+
+reply:
+
+	arph = GET_ARP_HDR(input);
+
+	/* ã¢ãã¬ã¹è§£æ±ºè¦æ±ã§ãªããã°çµäº */
+	if (ntohs(arph->opcode) != ARPOP_REQUEST)
+		goto buf_rel;
+
+	/* Ethernet ARP ããããè¨­å®ããã*/
+	memcpy(et_arph->thost, et_arph->shost, ETHER_ADDR_LEN);
+	memcpy(et_arph->shost, ifaddr->lladdr, ETHER_ADDR_LEN);
+	memcpy(et_arph->tproto, (uint8_t*)&et_arph->sproto, sizeof(T_IN_ADDR));
+	ahtonl(et_arph->sproto, taddr);
+
+	/* Ethernet ARP ããããè¨­å®ããã*/
+	arph->opcode = htons(ARPOP_REPLY);
+
+	/* Ethernet ããããè¨­å®ããã*/
+	eth = GET_ETHER_HDR(input);
+	memcpy(eth->dhost, eth->shost,     ETHER_ADDR_LEN);
+	memcpy(eth->shost, ifaddr->lladdr, ETHER_ADDR_LEN);
+
+	/* ARP å¿ç­ãéä¿¡ããã*/
+	IF_RAW_OUTPUT(input, TMO_FEVR);
+	return;
+
+err_ret:
+	NET_COUNT_ARP(net_count_arp.in_err_packets, 1);
+buf_rel:
+	syscall(rel_net_buf(input));
+	}
+
+/*
+ *  arp_timer -- ARP ã­ã£ãã·ã¥ã®æ´æ°
+ */
+
+static void
+arp_timer (void *ignore)
+{
+	int_t	ix;
+
+	syscall(wai_sem(SEM_ARP_CACHE_LOCK));
+
+	for (ix = NUM_ARP_ENTRY; ix -- > 0; ) {
+		if (arp_cache[ix].expire) {
+			arp_cache[ix].expire -= ARP_TIMER_TMO;
+			if (arp_cache[ix].expire == 0) {
+				/* éä¿¡ããã³ãã³ã°ããã¦ãããã¬ã¼ã ãããã°æ¨ã¦ãã*/
+				if (arp_cache[ix].hold) {
+					NET_COUNT_IP4(net_count_ip4[NC_IP4_OUT_ERR_PACKETS], 1);
+					syscall(rel_net_buf(arp_cache[ix].hold));
+					}
+				memset(&arp_cache[ix], 0, sizeof(T_ARP_ENTRY));
+				}
+			}
+		}
+
+	syscall(sig_sem(SEM_ARP_CACHE_LOCK));
+	timeout(arp_timer, NULL, ARP_TIMER_TMO);
+	}
+
+/*
+ *  arp_request -- MAC ã¢ãã¬ã¹è§£æ±ºè¦æ±
+ */
+
+ER
+arp_request (T_IF_ADDR *ifaddr, T_IN4_ADDR dst)
+{
+	ER		error;
+	T_IN4_ADDR	src;
+	T_ETHER_HDR	*eth;
+	T_ARP_HDR	*arph;
+	T_ETHER_ARP_HDR	*et_arph;
+	T_NET_BUF	*arp_req;
+
+	NET_COUNT_ARP(net_count_arp.out_octets , IF_ARP_ETHER_HDR_SIZE - IF_HDR_SIZE);
+	NET_COUNT_ARP(net_count_arp.out_packets, 1);
+
+	if ((error = tget_net_buf(&arp_req, IF_ARP_ETHER_HDR_SIZE, TMO_ARP_GET_NET_BUF)) == E_OK) {
+
+		/* ã¤ã¼ãµãããããããè¨­å®ããã*/
+		eth     = GET_ETHER_HDR(arp_req);
+		memcpy(eth->dhost, ether_broad_cast_addr, ETHER_ADDR_LEN);
+		memcpy(eth->shost, ifaddr->lladdr,        ETHER_ADDR_LEN);
+		eth->type = htons(ETHER_TYPE_ARP);
+
+		/* ARP ããããè¨­å®ããã*/
+		arph    = GET_ARP_HDR(arp_req);
+		arph->hrd_addr  = htons(ARPHRD_ETHER);
+		arph->proto     = htons(ETHER_TYPE_IP);
+		arph->hdr_len   = sizeof(et_arph->shost);
+		arph->proto_len = sizeof(et_arph->sproto);
+		arph->opcode    = htons(ARPOP_REQUEST);
+
+		/* ã¤ã¼ãµããã ARP ããããè¨­å®ããã*/
+		et_arph = GET_ETHER_ARP_HDR(arp_req);
+		src     = IF_GET_IFNET()->in_ifaddr.addr;
+		memcpy(et_arph->shost, ifaddr->lladdr, ETHER_ADDR_LEN);
+		memset(et_arph->thost, 0,              ETHER_ADDR_LEN);
+		ahtonl(et_arph->sproto, src);
+		ahtonl(et_arph->tproto, dst);
+
+		/* éä¿¡ããã*/
+		error = IF_RAW_OUTPUT(arp_req, TMO_ARP_OUTPUT);
+		}
+	if (error != E_OK)
+		NET_COUNT_ARP(net_count_arp.out_err_packets, 1);
+	return error;
+	}
+
+/*
+ *  arp_get_cache -- ARP ã­ã£ãã·ã¥ãç²å¾ããã
+ */
+
+const T_ARP_ENTRY *
+arp_get_cache (void)
+{
+	return arp_cache;
+	}
+
+/*
+ *  arp_input -- ARP ã®å
+¥åé¢æ°
+ */
+
+void
+arp_input (T_IF_ADDR *ifaddr, T_NET_BUF *input)
+{
+	T_ARP_HDR	*arph;
+
+	NET_COUNT_ARP(net_count_arp.in_octets , input->len - IF_HDR_SIZE);
+	NET_COUNT_ARP(net_count_arp.in_packets, 1);
+
+	/* ARP ãããã®é·ãããã§ãã¯ããã*/
+	if (input->len < IF_ARP_HDR_SIZE)
+		goto buf_rel;
+
+	arph = GET_ARP_HDR(input);
+
+	/*
+	 *  ç©çã¢ãã¬ã¹ãã©ã¼ãããã Ehternet ä»¥å¤
+	 *  ã¾ãã¯ããã­ãã³ã«ã IP ä»¥å¤ã¯ã¨ã©ã¼ã
+	 */
+	if (ntohs(arph->hrd_addr) != ARPHRD_ETHER ||
+	    ntohs(arph->proto)    != ETHER_TYPE_IP)
+		goto buf_rel;
+
+	/* ARP ããã + Ether ARP ãããã®é·ãããã§ãã¯ããã*/
+	if (input->len < IF_ARP_ETHER_HDR_SIZE)
+		goto buf_rel;
+
+	in_arpinput(ifaddr, input);
+	return;
+
+buf_rel:
+	NET_COUNT_ARP(net_count_arp.in_err_packets, 1);
+	syscall(rel_net_buf(input));
+	}
+
+/*
+ *  arp_resolve -- MAC ã¢ãã¬ã¹è§£æ±º
+ *
+ *    ã¢ãã¬ã¹è§£æ±ºãã§ããã°ãæ»ãå¤ã¯ true ãè¿ããã§ããªããã°
+ *    éä¿¡ããã³ãã£ã³ã°ãã¦ãæ»ãå¤ã¯ false ãè¿ãã
+ */
+
+bool_t
+arp_resolve (T_IF_ADDR *ifaddr, T_NET_BUF *output, T_IN4_ADDR gw)
+{
+	T_ARP_ENTRY	*ent;
+	T_ETHER_HDR	*eth;
+	T_IFNET		*ifp = IF_GET_IFNET();
+
+	eth = GET_ETHER_HDR(output);
+
+	/*
+	 *  æ¬¡ã®å ´åã¯ãã¤ã¼ãµãããã®ãã­ã¼ãã­ã£ã¹ãã¢ãã¬ã¹ãè¿ãã
+	 *
+	 *    ã»å
+¨ãããã 1
+	 *    ã»ãã¹ãé¨ã®å
+¨ãããã 1 ã§ããããã¯ã¼ã¯é¨ãã­ã¼ã«ã«ã¢ãã¬ã¹
+	 */
+	if (gw == IPV4_ADDR_BROADCAST ||
+	    gw == ((ifp->in_ifaddr.addr & ifp->in_ifaddr.mask) | ~ifp->in_ifaddr.mask)) {
+		memcpy(eth->dhost, ether_broad_cast_addr, ETHER_ADDR_LEN);
+		return true;
+		}
+
+	/* éä¿¡å
+ GW ã® IP ã¢ãã¬ã¹ã ARP ã­ã£ãã·ã¥ã«ãããèª¿ã¹ãã*/
+	syscall(wai_sem(SEM_ARP_CACHE_LOCK));
+	ent = arp_lookup(gw, true);
+	if (ent->expire) {
+		memcpy(eth->dhost, ent->mac_addr, ETHER_ADDR_LEN);
+		syscall(sig_sem(SEM_ARP_CACHE_LOCK));
+		return true;
+		}
+	else {
+	 	/* éä¿¡ããã³ãã³ã°ããã¦ãããã¬ã¼ã ãããã°æ¨ã¦ãã*/
+		if (ent->hold) {
+			NET_COUNT_IP4(net_count_ip4[NC_IP4_OUT_ERR_PACKETS], 1);
+			syscall(rel_net_buf(ent->hold));
+			}
+
+		/*
+		 *  éä¿¡ããã³ãã£ã³ã°ããã
+		 *  IF ã§ãããã¯ã¼ã¯ãããã¡ãéæ¾ããªããã©ã°ãè¨­å®ããã¦ããã¨ãã¯ã
+		 *  éä¿¡ããã³ãã£ã³ã°ããªãã
+		 */
+		if ((output->flags & NB_FLG_NOREL_IFOUT) == 0)
+			ent->hold = output;
+		else {
+			output->flags &= (uint8_t)~NB_FLG_NOREL_IFOUT;
+			ent->hold = NULL;
+			}
+		syscall(sig_sem(SEM_ARP_CACHE_LOCK));
+
+		/* ã¢ãã¬ã¹è§£æ±ºè¦æ±ãéä¿¡ããã*/
+		arp_request(ifaddr, gw);
+		return false;
+		}
+	}
+
+/*
+ *  arp_init -- ARP åæå
+ */
+
+void
+arp_init (void)
+{
+	timeout(arp_timer, NULL, ARP_TIMER_TMO);
+	}
+
+#ifdef ETHER_CFG_MULTICAST
+/*
+ *  ether_map_ipv4_multicast -- IPv4 ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ããã¤ã¼ãµãããã»ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ã¸ã®å¤æ
+ */
+
+void
+ether_map_ipv4_multicast (T_ETHER_ADDR *eaddr, T_IN4_ADDR maddr)
+{
+	eaddr->lladdr[0] = UINT_C(0x01);
+	eaddr->lladdr[1] = UINT_C(0x00);
+	eaddr->lladdr[2] = UINT_C(0x5E);
+	eaddr->lladdr[3] = (maddr & 0x7F0000) >> 16;
+	eaddr->lladdr[4] = (maddr & 0xFF00) >> 8;
+	eaddr->lladdr[5] = maddr & 0xFF;
+	}
+#endif	/* ETHER_CFG_MULTICAST */
+
+#endif	/* of #if defined(SUPPORT_INET4) && defined(SUPPORT_ETHER) */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/if_ether.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/if_ether.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/if_ether.cfg	(revision 270)
@@ -0,0 +1,56 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  Ethernet ARP ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#ifdef SUPPORT_ETHER
+
+/* ARP ã­ã£ãã·ã¥æ´æ°ç¨ã»ããã© */
+
+CRE_SEM(SEM_ARP_CACHE_LOCK, { TA_TPRI, 1, 1 });
+
+#endif	/* of #ifdef SUPPORT_ETHER */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/if_ether.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/if_ether.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/if_ether.h	(revision 270)
@@ -0,0 +1,144 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)if_ether.h	8.3 (Berkeley) 5/2/95
+ * $FreeBSD: src/sys/netinet/if_ether.h,v 1.21.2.1 1999/08/29 16:29:31 peter Exp $
+ */
+
+#ifndef _IF_ETHER_H_
+#define _IF_ETHER_H_
+
+#ifdef SUPPORT_ETHER
+
+/*
+ *  Ethernet Address Resolution Protocol.
+ *
+ *  RFC 826 åç
+§
+ */
+
+typedef struct t_ether_arp_hdr {
+	uint8_t		shost[ETHER_ADDR_LEN];	/* éä¿¡ãã¹ãã®ç©çã¢ãã¬ã¹	*/
+	uint8_t		sproto[IPV4_ADDR_LEN];	/* éä¿¡ãã¹ãã® IP ã¢ãã¬ã¹	*/
+	uint8_t		thost[ETHER_ADDR_LEN];	/* è§£æ±ºå¯¾è±¡ç©çã¢ãã¬ã¹		*/
+	uint8_t		tproto[IPV4_ADDR_LEN];	/* è§£æ±ºå¯¾è±¡ IP ã¢ãã¬ã¹		*/
+	} __attribute__((packed, aligned(2)))T_ETHER_ARP_HDR;
+
+#define ETHER_ARP_HDR_SIZE		(sizeof(T_ETHER_ARP_HDR))
+#define IF_ARP_ETHER_HDR_SIZE		(IF_HDR_SIZE + ARP_HDR_SIZE + ETHER_ARP_HDR_SIZE)
+
+#define GET_ETHER_ARP_HDR(nbuf)		((T_ETHER_ARP_HDR*)((nbuf)->buf + GET_IF_ARP_HDR_SIZE(nbuf)))
+
+/*
+ *  ARP ã­ã£ãã·ã¥ã¨ã³ããª
+ */
+
+typedef struct arp_entry {
+	T_NET_BUF	*hold;		/* ARP ã®è§£æ±ºå¾
+ã¡åºåãã¬ã¼ã 	*/
+	T_IN4_ADDR	ip_addr;	/* IP ã¢ãã¬ã¹			*/
+	uint16_t	expire;		/* ç ´æ£ã¾ã§ã®æéã0 ãªãæªä½¿ç¨	*/
+	uint8_t		mac_addr[ETHER_ADDR_LEN];	/* MAC ã¢ãã¬ã¹	*/
+	} __attribute__((packed, aligned(2)))T_ARP_ENTRY;
+
+/*
+ *  é¢æ°
+ */
+
+extern ER arp_request (T_IF_ADDR *ifaddr, T_IN4_ADDR dst);
+extern void arp_input (T_IF_ADDR *ifaddr, T_NET_BUF *input);
+extern bool_t arp_resolve (T_IF_ADDR *ifaddr, T_NET_BUF *output, T_IN4_ADDR gw);
+extern void arp_init (void);
+extern const T_ARP_ENTRY *arp_get_cache (void);
+
+#ifdef ETHER_CFG_MULTICAST
+extern void ether_map_ipv4_multicast (T_ETHER_ADDR *eaddr, T_IN4_ADDR maddr);
+#endif /* ETHER_CFG_MULTICAST */
+
+/*
+ *  TINET ç¬èª API
+ */
+
+#ifdef ARP_CFG_CALLBACK_DUPLICATED
+
+extern bool_t arp_callback_duplicated(uint8_t *shost);
+
+#endif	/* of #ifdef ARP_CFG_CALLBACK_DUPLICATED */
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#endif	/* of #ifndef _IF_ETHER_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/in.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/in.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/in.h	(revision 270)
@@ -0,0 +1,295 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)in.h	8.3 (Berkeley) 1/3/94
+ * $FreeBSD: src/sys/netinet/in.h,v 1.38.2.3 1999/08/29 16:29:34 peter Exp $
+ */
+ 
+#ifndef _IN_H_
+#define _IN_H_
+
+#include <tinet_kernel_defs.h>
+
+#include <netinet6/in6.h>
+
+/*
+ *  TINET ã®ãã¼ã¸ã§ã³æ
+å ±
+ */
+
+#define TINET_PRVER		UINT_C(0x1054)	/* TINET ã®ãã¼ã¸ã§ã³çªå· */
+
+/*
+ *  ã¤ã³ã¿ã¼ãããã·ã¹ãã ã®å®ç¾©ãRFC790 åç
+§
+ */
+
+/*
+ *  ãã­ãã³ã« (RFC1700)
+ */
+
+#define IPPROTO_IP		UINT_C(0)	/* IP ã®ããã¼				*/
+#define IPPROTO_HOPOPTS		UINT_C(0)	/* IPv6 ä¸­ç¶ç¹ (Hop-by-Hop) ãªãã·ã§ã³	*/
+#define IPPROTO_ICMP		UINT_C(1)	/* ICMP					*/
+#define IPPROTO_TCP		UINT_C(6)	/* TCP					*/
+#define IPPROTO_UDP		UINT_C(17)	/* UDP					*/
+#define IPPROTO_IPV6		UINT_C(41)	/* IPv6					*/
+#define IPPROTO_ROUTING		UINT_C(43)	/* çµè·¯å¶å¾¡ãªãã·ã§ã³			*/
+#define IPPROTO_FRAGMENT	UINT_C(44)	/* æ­çåãªãã·ã§ã³			*/
+#define IPPROTO_RSVP		UINT_C(46)	/* RSVP					*/
+#define IPPROTO_ESP		UINT_C(50)	/* IPv6 æå·åãªãã·ã§ã³		*/
+#define IPPROTO_AH		UINT_C(51)	/* IPv6 èªè¨¼ãªãã·ã§ã³			*/
+#define IPPROTO_ICMPV6		UINT_C(58)	/* ICMPv6				*/
+#define IPPROTO_NONE		UINT_C(59)	/* IPv6 æ¬¡ãããç¡ã			*/
+#define IPPROTO_DSTOPTS		UINT_C(60)	/* IPv6 çµç¹ãªãã·ã§ã³			*/
+#define IPPROTO_IPCOMP		UINT_C(108)	/* ãã¤ã­ã¼ãå§ç¸®			*/
+#define IPPROTO_DONE		UINT_C(257)	/* IPv6 ã§ä¸ä½ãã­ãã³ã«å
+¥åçµäº	*/
+
+/*
+ *  IPv4 ã¢ãã¬ã¹
+ */
+
+/* åæ¹åç
+§ */
+
+#ifndef T_IN4_ADDR_DEFINED
+
+typedef uint32_t T_IN4_ADDR;
+
+#define T_IN4_ADDR_DEFINED
+
+#endif	/* of #ifndef T_IN4_ADDR_DEFINED */
+
+/*
+ *  ITRON TCP/IPv4 ã¢ãã¬ã¹/ãã¼ãçªå·ã®å®ç¾©
+ */
+
+typedef struct t_ipv4ep {
+	uint32_t	ipaddr;		/* IPv4 ã¢ãã¬ã¹	*/
+	uint16_t	portno;		/* ãã¼ãçªå·		*/
+	} T_IPV4EP;
+
+/*
+ *  ã¢ãã¬ã¹/ãã¼ãã®é·ã
+ */
+
+#define IPV4_ADDR_LEN		4
+#define PORT_NUM_LEN		2
+
+/*
+ *  ãã¼ãçªå·ã®å®ç¾©
+ */
+
+#define TCP_PORTANY			UINT_C(0x0000)	/* ITRON TCP/IP æ¨æº	*/
+#define UDP_PORTANY			UINT_C(0x0000)	/* ITRON TCP/IP æ¨æº	*/
+
+#define TCP_PORT_LAST_WELL_KNOWN	UINT_C(1023)	/* Well Known çµäºçªå·	*/
+#define TCP_PORT_FIRST_AUTO		UINT_C(1024)	/* èªåå²ãå½ã¦éå§çªå·	*/
+#define TCP_PORT_LAST_AUTO		UINT_C(4999)	/* èªåå²ãå½ã¦çµäºçªå·	*/
+
+#define UDP_PORT_LAST_WELL_KNOWN	UINT_C(1023)	/* Well Known çµäºçªå·	*/
+#define UDP_PORT_FIRST_AUTO		UINT_C(1024)	/* èªåå²ãå½ã¦éå§çªå·	*/
+#define UDP_PORT_LAST_AUTO		UINT_C(4999)	/* èªåå²ãå½ã¦çµäºçªå·	*/
+
+/*
+ *  IP ã¢ãã¬ã¹ã®å®ç¾©
+ */
+
+#define IPV4_ADDRANY		ULONG_C(0x00000000)	/* ITRON TCP/IP æ¨æº	*/
+
+#define IPV4_ADDR_LOOPBACK	ULONG_C(0x7f000001)
+#define IPV4_ADDR_LOOPBACK_MASK	IPV4_CLASS_A_MASK
+#define IPV4_ADDR_BROADCAST	ULONG_C(0xffffffff)
+
+#define IPV4_CLASS_A(i)		(((i) & ULONG_C(0x80000000)) == 0)
+#define IPV4_CLASS_A_NET	ULONG_C(0xff000000)
+#define IPV4_CLASS_A_MASK	ULONG_C(0xff000000)
+#define IPV4_CLASS_A_HOST	ULONG_C(0x00ffffff)
+
+#define IPV4_CLASS_B(i)		(((i) & ULONG_C(0xc0000000)) == ULONG_C(0x80000000))
+#define IPV4_CLASS_B_NET	ULONG_C(0xffff0000)
+#define IPV4_CLASS_B_MASK	ULONG_C(0xffff0000)
+#define IPV4_CLASS_B_HOST	ULONG_C(0x0000ffff)
+
+#define IPV4_CLASS_C(i)		(((i) & ULONG_C(0xe0000000)) == ULONG_C(0xc0000000))
+#define IPV4_CLASS_C_NET	ULONG_C(0xffffff00)
+#define IPV4_CLASS_C_MASK	ULONG_C(0xffffff00)
+#define IPV4_CLASS_C_HOST	ULONG_C(0x000000ff)
+
+#define IPV4_CLASS_D(i)		(((i) & ULONG_C(0xf0000000)) == ULONG_C(0xe0000000))
+
+#define IN4_IS_ADDR_MULTICAST(i)	IPV4_CLASS_D(i)
+
+#define MAKE_IPV4_LOCAL_BROADCAST(i)	(IPV4_CLASS_A(i)?((i)|IPV4_CLASS_A_HOST):\
+					 IPV4_CLASS_B(i)?((i)|IPV4_CLASS_B_HOST):\
+					 IPV4_CLASS_C(i)?((i)|IPV4_CLASS_C_HOST):\
+					 IPV4_ADDR_BROADCAST)
+
+#define MAKE_IPV4_LOCAL_MASK(i)		(IPV4_CLASS_A(i)?IPV4_CLASS_A_MASK:\
+					 IPV4_CLASS_B(i)?IPV4_CLASS_B_MASK:\
+					 IPV4_CLASS_C(i)?IPV4_CLASS_C_MASK:\
+					 IPV4_ADDRANY)
+
+#define MAKE_IPV4_ADDR(a,b,c,d)		((T_IN4_ADDR)(((uint32_t)(a)<<24)|((uint32_t)(b)<<16)|((uint32_t)(c)<<8)|(d)))
+
+/*
+ *  åççæç¨ TCP éä¿¡ç«¯ç¹
+ */
+
+typedef struct t_tcp_ccep {
+	/* æ¨æº */
+	ATR		cepatr;		/* éä¿¡ç«¯ç¹å±æ§			*/
+	void		*sbuf;		/* éä¿¡ç¨ã¦ã£ã³ããããã¡	*/
+	int_t		sbufsz;		/* éä¿¡ç¨ã¦ã£ã³ããããã¡ãµã¤ãº	*/
+	void		*rbuf;		/* åä¿¡ç¨ã¦ã£ã³ããããã¡	*/
+	int_t		rbufsz;		/* åä¿¡ç¨ã¦ã£ã³ããããã¡ãµã¤ãº	*/
+	FP		callback;	/* ã³ã¼ã«ããã¯			*/
+	/* å®è£
+ä¾å­ */
+	} T_TCP_CCEP;
+
+/*
+ *  åççæç¨ TCP åä»å£
+ */
+
+#if defined(SUPPORT_INET4)
+
+typedef struct t_tcp_crep {
+	/* æ¨æº */
+	ATR		repatr;		/* åä»å£å±æ§		*/
+	T_IPV4EP	myaddr;		/* èªåã®ã¢ãã¬ã¹	*/
+	/* å®è£
+ä¾å­ */
+	} T_TCP_CREP;
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+/*
+ *  åççæç¨ UDP éä¿¡ç«¯ç¹
+ */
+
+#if defined(SUPPORT_INET4)
+
+typedef struct t_udp_ccep {
+	/* æ¨æº */
+	ATR		cepatr;		/* UDP éä¿¡ç«¯ç¹å±æ§		*/
+	T_IPV4EP	myaddr;		/* èªåã®ã¢ãã¬ã¹		*/
+	FP		callback;	/* ã³ã¼ã«ããã¯é¢æ°		*/
+	/* å®è£
+ä¾å­ */
+	} T_UDP_CCEP;
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+/*
+ *  IPv4 ã¨ IPv6 ãã³ã³ãã¤ã«æã«é¸æããããã®ãã¯ã­
+ */
+
+#if defined(SUPPORT_INET4)
+
+#define T_IN_ADDR			T_IN4_ADDR
+#define T_IPEP				T_IPV4EP
+#define IP_ADDRANY			IPV4_ADDRANY
+
+#define IN_ARE_ADDR_EQUAL(n,h)		(*(n)==*(h))
+#define IN_ARE_NET_ADDR_EQUAL(n,h)	(ntohl(*(n))==*(h))
+#define IN_COPY_TO_NET(d,s)		(*(d)=htonl(*(s)))
+#define IN_COPY_TO_HOST(d,s)		(*(d)=ntohl(*(s)))
+#define IN_IS_ADDR_MULTICAST(a)		IN4_IS_ADDR_MULTICAST(*(a))
+#define IN_IS_NET_ADDR_MULTICAST(a)	IN4_IS_ADDR_MULTICAST(ntohl(*(a)))
+#define IN_IS_ADDR_ANY(a)		(*(a)==IPV4_ADDRANY)
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+/*
+ *  TINET ç¬èª API
+ */
+
+extern const char *in_strtfn (FN fncd);
+
+#if defined(SUPPORT_INET4)
+
+extern ER in4_add_ifaddr (T_IN4_ADDR addr, T_IN4_ADDR mask);
+extern ER in4_add_route (int_t index, T_IN4_ADDR target,
+                                      T_IN4_ADDR mask, T_IN4_ADDR gateway);
+extern char *ip2str (char *buf, const T_IN4_ADDR *p_ipaddr);
+extern const T_IN4_ADDR *in4_get_ifaddr (int_t index);
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#endif	/* of #ifndef _IN_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/in_itron.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/in_itron.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/in_itron.h	(revision 270)
@@ -0,0 +1,155 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+ 
+#ifndef _IN_ITRON_H_
+#define _IN_ITRON_H_
+
+/*
+ *  API æ©è½ã»äºè±¡ã³ã¼ã
+ */
+
+/* TCP é¢ä¿ */
+
+#define TFN_TCP_CRE_REP		(-0x201)
+#define TFN_TCP_DEL_REP		(-0x202)
+#define TFN_TCP_CRE_CEP		(-0x203)
+#define TFN_TCP_DEL_CEP		(-0x204)
+#define TFN_TCP_ACP_CEP		(-0x205)
+#define TFN_TCP_CON_CEP		(-0x206)
+#define TFN_TCP_SHT_CEP		(-0x207)
+#define TFN_TCP_CLS_CEP		(-0x208)
+#define TFN_TCP_SND_DAT		(-0x209)
+#define TFN_TCP_RCV_DAT		(-0x20a)
+#define TFN_TCP_GET_BUF		(-0x20b)
+#define TFN_TCP_SND_BUF		(-0x20c)
+#define TFN_TCP_RCV_BUF		(-0x20d)
+#define TFN_TCP_REL_BUF		(-0x20e)
+#define TFN_TCP_SND_OOB		(-0x20f)
+#define TFN_TCP_RCV_OOB		(-0x210)
+#define TFN_TCP_CAN_CEP		(-0x211)
+#define TFN_TCP_SET_OPT		(-0x212)
+#define TFN_TCP_GET_OPT		(-0x213)
+#define TFN_TCP_ALL		(0)
+
+#define TEV_TCP_RCV_OOB		(-0x201)
+
+/* UDP é¢ä¿ */
+
+#define TFN_UDP_CRE_CEP		(-0x221)
+#define TFN_UDP_DEL_CEP		(-0x222)
+#define TFN_UDP_SND_DAT		(-0x223)
+#define TFN_UDP_RCV_DAT		(-0x224)
+#define TFN_UDP_CAN_CEP		(-0x225)
+#define TFN_UDP_SET_OPT		(-0x226)
+#define TFN_UDP_GET_OPT		(-0x227)
+#define TFN_UDP_ALL		(0)
+
+#define TEV_UDP_RCV_DAT		(-0x221)
+
+/* ä¸è¬ */
+
+#define NADR			((void*)(-1))	/* ç¡å¹ã¢ãã¬ã¹ */
+#define IS_PTR_DEFINED(a)	((void*)(a)!=NADR&&(void*)(a)!=NULL)
+#define TCP_REP_NONE		UINT_C(0)
+#define TCP_CEP_NONE		UINT_C(0)
+#define UDP_CEP_NONE		UINT_C(0)
+
+/*
+ *  é¢æ°
+ */
+
+/* TCP é¢ä¿ */
+
+/* ãæ¨æºæ©è½ã */
+
+extern ER	tcp_acp_cep (ID cepid, ID repid, T_IPV4EP *p_dstaddr, TMO tmout);
+extern ER	tcp_con_cep (ID cepid, T_IPV4EP *p_myaddr, T_IPV4EP *p_dstaddr, TMO tmout);
+extern ER	tcp_sht_cep (ID cepid);
+extern ER	tcp_cls_cep (ID cepid, TMO tmout);
+extern ER_UINT	tcp_snd_dat (ID cepid, void *data, int_t len, TMO tmout);
+extern ER_UINT	tcp_rcv_dat (ID cepid, void *data, int_t len, TMO tmout);
+extern ER_UINT	tcp_get_buf (ID cepid, void **p_buf, TMO tmout);
+extern ER	tcp_snd_buf (ID cepid, int_t len);
+extern ER_UINT	tcp_rcv_buf (ID cepid, void **p_buf, TMO tmout);
+extern ER	tcp_rel_buf (ID cepid, int_t len);
+extern ER	tcp_can_cep (ID cepid, FN fncd);
+
+extern ER	tcp6_acp_cep (ID cepid, ID repid, T_IPV6EP *p_dstaddr, TMO tmout);
+extern ER	tcp6_con_cep (ID cepid, T_IPV6EP *p_myaddr, T_IPV6EP *p_dstaddr, TMO tmout);
+
+/* ãæ¡å¼µæ©è½ã */
+
+extern ER	tcp_del_rep (ID cepid);
+extern ER	tcp_cre_cep (ID cepid, T_TCP_CCEP *pk_crep);
+extern ER	tcp_del_cep (ID cepid);
+extern ER_UINT	tcp_snd_oob (ID cepid, void *data, int_t len, TMO tmout);
+extern ER_UINT	tcp_rcv_oob (ID cepid, void *data, int_t len);
+extern ER	tcp_set_opt (ID cepid, int_t optname, void *optval, int_t optlen);
+extern ER	tcp_get_opt (ID cepid, int_t optname, void *optval, int_t optlen);
+extern ER	tcp_cre_rep (ID repid, T_TCP_CREP *pk_crep);
+
+extern ER	tcp6_cre_rep (ID repid, T_TCP6_CREP *pk_crep);
+
+/* UDP é¢ä¿ */
+
+/* ãæ¨æºæ©è½ã */
+
+extern ER_UINT	udp_snd_dat (ID cepid, T_IPV4EP *p_dstaddr, void *data, int_t len, TMO tmout);
+extern ER_UINT	udp_rcv_dat (ID cepid, T_IPV4EP *p_dstaddr, void *data, int_t len, TMO tmout);
+extern ER	udp_can_cep (ID cepid, FN fncd);
+
+extern ER_UINT	udp6_snd_dat (ID cepid, T_IPV6EP *p_dstaddr, void *data, int_t len, TMO tmout);
+extern ER_UINT	udp6_rcv_dat (ID cepid, T_IPV6EP *p_dstaddr, void *data, int_t len, TMO tmout);
+
+/* ãæ¡å¼µæ©è½ã */
+
+extern ER	udp_del_cep (ID cepid);
+extern ER	udp_set_opt (ID cepid, int_t optname, void *optval, int_t optlen);
+extern ER	udp_get_opt (ID cepid, int_t optname, void *optval, int_t optlen);
+extern ER	udp_cre_cep (ID cepid, T_UDP_CCEP *pk_ccep);
+
+extern ER	udp6_cre_cep (ID cepid, T_UDP6_CCEP *pk_ccep);
+
+#endif	/* of #ifndef _IN_ITRON_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/in_rename.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/in_rename.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/in_rename.h	(revision 270)
@@ -0,0 +1,232 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _IN_RENAME_H_
+#define _IN_RENAME_H_
+
+/*
+ *  TCP/IP ãã­ãã³ã«ã¹ã¿ãã¯å
+é¨åã®ãªãã¼ã 
+ */
+
+/* netinet/tcp_input.c */
+
+#define tcp_input		_tinet_tcp_input
+#define tcp_move_twcep		_tinet_tcp_move_twcep
+
+/* netinet/tcp_output.c */
+
+/* netinet/tcp_timer.c */
+
+#define	tcp_cancel_timers	_tinet_tcp_cancel_timers
+#define tcp_slow_timo		_tinet_tcp_slow_timo
+#define tcp_fast_timo		_tinet_tcp_fast_timo
+#define tcp_range_set		_tinet_tcp_range_set
+#define tcp_set_persist_timer	_tinet_tcp_set_persist_timer
+
+/* netinet/tcp_usrrq.c */
+
+#define tcp_user_closed		_tinet_tcp_user_closed
+
+/* netinet/tcp_subr.c */
+
+#define tcp_iss			_tinet_tcp_iss
+#define tcp_init		_tinet_tcp_init
+#define tcp_init_iss		_tinet_tcp_init_iss
+#define tcp_close		_tinet_tcp_close
+#define tcp_drop		_tinet_tcp_drop
+#define tcp_respond		_tinet_tcp_respond
+#define tcp_set_header		_tinet_tcp_set_header
+#define	tcp_get_segment		_tinet_tcp_get_segment
+#define tcp_rexmt_val		_tinet_tcp_rexmt_val
+#define tcp_init_cep		_tinet_tcp_init_cep
+#define tcp_notify		_tinet_tcp_notify
+#define tcp_find_cep		_tinet_tcp_find_cep
+#define tcp_alloc_auto_port	_tinet_tcp_alloc_auto_port
+#define tcp_alloc_port		_tinet_tcp_alloc_port
+#define tcp_free_reassq		_tinet_tcp_free_reassq
+#define tcp_move_ra2rw		_tinet_tcp_move_ra2rw
+#define tcp_wait_rwbuf		_tinet_tcp_wait_rwbuf
+#define tcp_write_raque		_tinet_tcp_write_raque
+#define tcp_lock_cep		_tinet_tcp_lock_cep
+#define tcp_can_send_more	_tinet_tcp_can_send_more
+#define tcp_can_recv_more	_tinet_tcp_can_recv_more
+#define tcp_output_trace	_tinet_tcp_output_trace
+#define tcp_input_trace		_tinet_tcp_input_trace
+
+/* netinet/tcp_subr_cs.c */
+
+#define tcp_read_rwbuf		_tinet_tcp_read_rwbuf
+#define tcp_write_rwbuf		_tinet_tcp_write_rwbuf
+#define tcp_drop_rwbuf		_tinet_tcp_drop_rwbuf
+#define tcp_free_rwbufq		_tinet_tcp_free_rwbufq
+#define tcp_get_rwbuf_addr	_tinet_tcp_get_rwbuf_addr
+
+#define tcp_free_rwbufq_cs	_tinet_tcp_free_rwbufq_cs
+#define tcp_get_rwbuf_addr_cs	_tinet_tcp_get_rwbuf_addr_cs
+#define tcp_read_rwbuf_cs	_tinet_tcp_read_rwbuf_cs
+#define tcp_write_rwbuf_cs	_tinet_tcp_write_rwbuf_cs
+#define tcp_drop_rwbuf_cs	_tinet_tcp_drop_rwbuf_cs
+
+#define tcp_wait_swbuf		_tinet_tcp_wait_swbuf
+#define tcp_init_swbuf		_tinet_tcp_init_swbuf
+#define tcp_alloc_swbuf		_tinet_tcp_alloc_swbuf
+#define tcp_is_swbuf_full	_tinet_tcp_is_swbuf_full
+#define tcp_drop_swbuf		_tinet_tcp_drop_swbuf
+#define tcp_free_swbufq		_tinet_tcp_free_swbufq
+#define tcp_read_swbuf		_tinet_tcp_read_swbuf
+#define tcp_write_swbuf		_tinet_tcp_write_swbuf
+#define tcp_pull_res_nbuf	_tinet_tcp_pull_res_nbuf
+#define tcp_push_res_nbuf	_tinet_tcp_push_res_nbuf
+#define tcp_get_swbuf_addr	_tinet_tcp_get_swbuf_addr
+#define tcp_send_swbuf		_tinet_tcp_send_swbuf
+
+#define tcp_get_swbuf_addr_cs	_tinet_tcp_get_swbuf_addr_cs
+#define tcp_wait_swbuf_cs	_tinet_tcp_wait_swbuf_cs
+#define tcp_is_swbuf_full_cs	_tinet_tcp_is_swbuf_full_cs
+#define tcp_alloc_swbuf_cs	_tinet_tcp_alloc_swbuf_cs
+#define tcp_send_swbuf_cs	_tinet_tcp_send_swbuf_cs
+#define tcp_free_swbufq_cs	_tinet_tcp_free_swbufq_cs
+#define tcp_drop_swbuf_cs	_tinet_tcp_drop_swbuf_cs
+#define tcp_write_swbuf_cs	_tinet_tcp_write_swbuf_cs
+
+/* netinet/tcp_subr_ncs.c */
+
+#define tcp_drop_rwbuf_ncs	_tinet_tcp_drop_rwbuf_ncs
+#define tcp_read_rwbuf_ncs	_tinet_tcp_read_rwbuf_ncs
+#define tcp_is_swbuf_full_ncs	_tinet_tcp_is_swbuf_full_ncs
+#define tcp_drop_swbuf_ncs	_tinet_tcp_drop_swbuf_ncs
+#define tcp_read_swbuf_ncs	_tinet_tcp_read_swbuf_ncs
+#define tcp_wait_swbuf_ncs	_tinet_tcp_wait_swbuf_ncs
+#define tcp_write_swbuf_ncs	_tinet_tcp_write_swbuf_ncs
+#define tcp_write_rwbuf_ncs	_tinet_tcp_write_rwbuf_ncs
+#define tcp_get_swbuf_addr_ncs	_tinet_tcp_get_swbuf_addr_ncs
+#define tcp_send_swbuf_ncs	_tinet_tcp_send_swbuf_ncs
+#define tcp_get_rwbuf_addr_ncs	_tinet_tcp_get_rwbuf_addr_ncs
+
+/* tcp_cfg.c */
+
+#define tcp_rep			_tinet_tcp_rep
+#define tcp_cep			_tinet_tcp_cep
+#define tcp_twcep		_tinet_tcp_twcep
+#define tmax_tcp_repid		_tinet_tmax_tcp_repid
+#define tmax_tcp_cepid		_tinet_tmax_tcp_cepid
+#define tmax_tcp_crepid		_tinet_tmax_tcp_repid	/* TINET 1.3 ã¨ã®äºææ§ã®ããã®å®ç¾© */
+#define tmax_tcp_ccepid		_tinet_tmax_tcp_cepid	/* TINET 1.3 ã¨ã®äºææ§ã®ããã®å®ç¾© */
+
+/* netinet/udp_input.c */
+
+#define udp_input		_tinet_udp_input
+
+/* netinet/udp_subr.c */
+
+#define udp_alloc_port		_tinet_udp_alloc_port
+#define udp_alloc_auto_port	_tinet_udp_alloc_auto_port
+
+/* netinet/udp_usrreq.c */
+
+#define udp_send_data		_tinet_udp_send_data
+
+/* netinet/udp_usrreq_nblk.c */
+
+#define udp_can_rcv		_tinet_udp_can_rcv
+#define udp_can_snd		_tinet_udp_can_snd
+
+/* udp_cfg.c */
+
+#define udp_cep			_tinet_udp_cep
+#define tmax_udp_cepid		_tinet_tmax_udp_cepid
+#define tmax_udp_ccepid		_tinet_tmax_udp_cepid	/* TINET 1.3 ã¨ã®äºææ§ã®ããã®å®ç¾© */
+
+/* netinet/ip_icmp.c */
+
+#define icmp_input		_tinet_icmp_input
+#define icmp_error		_tinet_icmp_error
+#define icmp_echo_reply		_tinet_icmp_echo_reply
+
+/* netinet/ip_input.c */
+
+#define ip_input		_tinet_ip_input
+#define ip_init			_tinet_ip_init
+#define ip_frag_timer		_tinet_ip_frag_timer
+#define ip_get_frag_queue	_tinet_ip_get_frag_queue
+#define ip_remove_options	_tinet_ip_remove_options
+
+/* netinet/ip_output.c */
+
+#define ip_output		_tinet_ip_output
+
+/* netinet/in_subr.c */
+
+#define in4_set_header		_tinet_in4_set_header
+#define in4_get_datagram	_tinet_in4_get_datagram
+#define in4_cksum		_tinet_in4_cksum
+#define in4_rtalloc		_tinet_in4_rtalloc
+#define in4_rtredirect		_tinet_in4_rtredirect
+#define in4_init		_tinet_in4_init
+#define in4_is_dstaddr_accept	_tinet_in4_is_dstaddr_accept
+#define in4_ifawithifp		_tinet_in4_ifawithifp
+#define in_cksum		_tinet_in_cksum
+#define in_cksum_carry		_tinet_in_cksum_carry
+#define in_cksum_sum		_tinet_in_cksum_sum
+#define in_rtnewentry		_tinet_in_rtnewentry
+#define in_rtinit		_tinet_in_rtinit
+#define in_rttimer		_tinet_in_rttimer
+
+/* netinet/if_ether.c */
+
+#define arp_request		_tinet_arp_request
+#define arp_input		_tinet_arp_input
+#define arp_resolve		_tinet_arp_resolve
+#define arp_init		_tinet_arp_init
+#define arp_get_cache		_tinet_arp_get_cache
+
+#define ether_map_ipv4_multicast	_tinet_ether_map_ipv4_multicast
+
+/* netinet6/icmp6.c */
+
+#define icmp6_input		_tinet_icmp6_input
+
+#endif	/* of #ifndef _IN_RENAME_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/in_subr.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/in_subr.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/in_subr.c	(revision 270)
@@ -0,0 +1,684 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_loop.h>
+#include <net/if_ppp.h>
+#include <net/ethernet.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_var.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+
+#include <netinet/in.h>
+#include <netinet6/in6.h>
+#include <netinet/in_var.h>
+#include <netinet/in_itron.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet/tcp_timer.h>
+
+#include <net/if_var.h>
+
+#if defined(SUPPORT_INET4)
+
+/*
+ *  in4_get_ifaddr -- ã¤ã³ã¿ãã§ã¼ã¹ã«è¨­å®ããã¦ããã¢ãã¬ã¹ãè¿ãã
+ */
+
+const T_IN4_ADDR *
+in4_get_ifaddr (int_t index)
+{
+	T_IFNET		*ifp = IF_GET_IFNET();
+
+	return &ifp->in_ifaddr.addr;
+	}
+
+/*
+ *  ip2str -- IPv4 ã¢ãã¬ã¹ãæå­åã«å¤æããã
+ */
+
+char *
+ip2str (char *buf, const T_IN4_ADDR *ipaddr)
+{
+	static char	addr_sbuf[NUM_IPV4ADDR_STR_BUFF][sizeof("123.123.123.123")];
+	static int_t	bix = NUM_IPV4ADDR_STR_BUFF;
+
+	char *start;
+
+	if (buf == NULL) {
+		syscall(wai_sem(SEM_IP2STR_BUFF_LOCK));
+		buf = addr_sbuf[-- bix];
+		if (bix <= 0)
+			bix = NUM_IPV4ADDR_STR_BUFF;
+		syscall(sig_sem(SEM_IP2STR_BUFF_LOCK));
+		}
+
+	start = buf;
+	buf += convert_hexdigit(buf, (uint_t)((*ipaddr >> 24) & 0xff), 10, 0, ' ');
+	*(buf ++) = '.';
+	buf += convert_hexdigit(buf, (uint_t)((*ipaddr >> 16) & 0xff), 10, 0, ' ');
+	*(buf ++) = '.';
+	buf += convert_hexdigit(buf, (uint_t)((*ipaddr >>  8) & 0xff), 10, 0, ' ');
+	*(buf ++) = '.';
+	buf += convert_hexdigit(buf, (uint_t)((*ipaddr      ) & 0xff), 10, 0, ' ');
+	*buf = '\0';
+	return start;
+	}
+
+/*
+ *  in4_set_header -- IPv4 ããããè¨­å®ããã
+ */
+
+ER
+in4_set_header (T_NET_BUF *nbuf, uint_t len,
+                T_IN4_ADDR *dstaddr, T_IN4_ADDR *srcaddr, uint8_t proto, uint8_t ttl)
+{
+	T_IP4_HDR	*ip4h = GET_IP4_HDR(nbuf);
+	T_IFNET		*ifp = IF_GET_IFNET();
+
+	/* IP ããããè¨­å®ããã*/
+	ip4h->vhl	= IP4_MAKE_VHL(IPV4_VERSION, IP4_HDR_SIZE >> 2);
+	ip4h->len	= htons(IP4_HDR_SIZE + len);
+	ip4h->proto	= proto;
+	ip4h->ttl	= ttl;
+	ip4h->type	= 0;
+	ip4h->id	= ip4h->flg_off = ip4h->sum = 0;
+
+	/* IP ã¢ãã¬ã¹ãè¨­å®ããã*/
+	ip4h->dst	= htonl(*dstaddr);
+
+	if (srcaddr == NULL || *srcaddr == IPV4_ADDRANY)
+		ip4h->src = htonl(ifp->in_ifaddr.addr);
+	else
+		ip4h->src = htonl(*srcaddr);
+
+	return E_OK;
+	}
+
+/*
+ *  in4_get_datagram -- IPv4 ãã¼ã¿ã°ã©ã ãç²å¾ããããããè¨­å®ããã
+ */
+
+ER
+in4_get_datagram (T_NET_BUF **nbuf, uint_t len, uint_t maxlen,
+                  T_IN4_ADDR *dstaddr, T_IN4_ADDR *srcaddr,
+                  uint8_t proto, uint8_t ttl, ATR nbatr, TMO tmout)
+{
+	ER	error;
+	uint_t	align;
+
+	/* ãã¼ã¿é·ã 4 ãªã¯ãããå¢çã«èª¿æ´ããã*/
+	align = (len + 3) >> 2 << 2;
+
+	/* ãããã¯ã¼ã¯ãããã¡ãç²å¾ããã*/
+	if ((error = tget_net_buf_ex(nbuf, (uint_t)(IF_IP4_HDR_SIZE + align),
+	                                   (uint_t)(IF_IP4_HDR_SIZE + maxlen), nbatr, tmout)) != E_OK)
+		return error;
+
+	/*
+	 *  ããå¤§ããªãµã¤ãºã®ãããã¯ã¼ã¯ãããã¡ãç²å¾ããå ´åã®ã¿é·ããèª¿æ´ããã
+	 *  ããå°ããªãµã¤ãºã®ãããã¯ã¼ã¯ãããã¡ã®ç²å¾ã¯ãéä¿¡ã¦ã£ã³ããããã¡ã®
+	 *  çã³ãã¼æ©è½ã§ä½¿ç¨ãããå®éã«éä¿¡ããã¾ã§ããã¼ã¿ãµã¤ãºã¯æ±ºå®ã§ããªãã
+	 */
+	if ((nbatr & NBA_SEARCH_ASCENT) != 0)
+		(*nbuf)->len = (uint16_t)(IF_IP4_HDR_SIZE + len);
+
+	/* IP ããããè¨­å®ããã*/
+	if ((error = in4_set_header(*nbuf, len, dstaddr, srcaddr, proto, ttl)) != E_OK)
+		return error;
+
+	/* 4 ãªã¯ãããå¢çã¾ã§ããã£ã³ã°ã§åããã*/
+	if (align > len)
+		memset((GET_IP4_SDU(*nbuf) + len), 0, (size_t)(align - len));
+
+	return E_OK;
+	}
+
+/*
+ *  in4_cksum -- IPv4 ã®ãã©ã³ã¹ãã¼ãå±¤ãããã®ãã§ãã¯ãµã ãè¨ç®ããã
+ *
+ *  æ³¨æ: æ»ãå¤ã¯ãããã¯ã¼ã¯ãã¤ããªã¼ã
+ */
+
+uint16_t
+in4_cksum (T_NET_BUF *nbuf, uint8_t proto, uint_t off, uint_t len)
+{
+	uint32_t	sum;
+	uint_t		align;
+
+	/* 4 ãªã¯ãããå¢çã®ãã¼ã¿é· */
+	align = (len + 3) >> 2 << 2;
+
+	/* 4 ãªã¯ãããå¢çã¾ã§ããã£ã³ã°ã§åããã*/
+	if (align > len)
+		memset((uint8_t*)nbuf->buf + off + len, 0, (size_t)(align - len));
+
+	sum = in_cksum_sum(nbuf->buf + off, align)
+	    + in_cksum_sum(&GET_IP4_HDR(nbuf)->src, sizeof(T_IN4_ADDR) * 2)
+	    + len + proto;
+	sum = in_cksum_carry(sum);
+
+	return (uint16_t)(~htons((uint16_t)sum));
+	}
+
+/*
+ *  in_cksum -- ãã§ãã¯ãµã è¨ç®é¢æ°ãIPv4ãICMPv4 ç¨
+ *
+ *  æ³¨æ: data ã¯ 4 ãªã¯ãããåä½ã§ããã£ã³ã°ãããã¨ã
+ *        data ã 2 ãªã¯ãããåä½ã«ã¢ã©ã¤ã³ããã¦ããªãã¨
+ *        ä¾å¤ãçºçããå¯è½æ§ãããã
+ *        len  ã¯ 4 ãªã¯ãããåä½ã«ã¢ã©ã¤ã³ããã¦ãããã¨ã
+ *
+ *        æ»ãå¤ã¯ãããã¯ã¼ã¯ãã¤ããªã¼ã
+ */
+
+uint16_t
+in_cksum (void *data, uint_t len /*ãªã¯ãããåä½*/)
+{
+	uint16_t	sum;
+
+	sum = (uint16_t)in_cksum_carry(in_cksum_sum(data, len));
+	return (uint16_t)(~htons(sum));
+	}
+
+/*
+ *  in4_is_dstaddr_accept -- å®å
+ã¢ãã¬ã¹ã¨ãã¦æ­£ããããã§ãã¯ããã
+ *
+ *    æ³¨æ: dstaddr ã¯ã
+ *          TINET-1.2 ãããããã¯ã¼ã¯ãã¤ããªã¼ãã
+ *          TINET-1.1 ã¾ã§ã¯ããã¹ããã¤ããªã¼ã
+ */
+
+bool_t
+in4_is_dstaddr_accept (T_IN4_ADDR *myaddr, T_IN4_ADDR *dstaddr)
+{
+	if (*myaddr == IPV4_ADDRANY)
+		return ntohl(*dstaddr) == IF_GET_IFNET()->in_ifaddr.addr;
+	else
+		return ntohl(*dstaddr) == *myaddr;
+	}
+
+/*
+ * in4_ifawithifp -- å®å
+ã¢ãã¬ã¹ã«ãµããããéä¿¡å
+ã¢ãã¬ã¹ãã
+ *                   ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ããæ¢ç´¢ããã
+ *                   in6_ifawithifp ãã·ãã¥ã¬ã¼ãããã ãã§ã
+ *                   ã¨ã©ã¼ãè¿ããã¨ã¯ãªãã
+ */
+
+T_IN4_IFADDR *
+in4_ifawithifp (T_IFNET *ifp, T_IN4_ADDR *dst)
+{
+	return &ifp->in_ifaddr;
+	}
+
+/*
+ *  in4_add_ifaddr -- ã¤ã³ã¿ãã§ã¼ã¹ã« IPv4 ã¢ãã¬ã¹ãè¨­å®ããã
+ */
+
+ER
+in4_add_ifaddr (T_IN4_ADDR addr, T_IN4_ADDR mask)
+{
+	T_IFNET	*ifp = IF_GET_IFNET();
+
+	ifp->in_ifaddr.addr = addr;
+	ifp->in_ifaddr.mask = mask;
+	return E_OK;
+	}
+
+#if NUM_ROUTE_ENTRY > 0
+
+/*
+ *  in4_add_route -- çµè·¯è¡¨ã«ã¨ã³ããªãè¨­å®ããã
+ */
+
+ER
+in4_add_route (int_t index, T_IN4_ADDR target, T_IN4_ADDR mask, T_IN4_ADDR gateway)
+{
+
+	if (0 <= index && index < NUM_STATIC_ROUTE_ENTRY) {
+		routing_tbl[index].target  = target;
+		routing_tbl[index].mask    = mask;
+		routing_tbl[index].gateway = gateway;
+		return E_OK;
+		}
+	else
+		return E_PAR;
+	}
+
+#endif	/* of #if NUM_ROUTE_ENTRY > 0 */
+
+/*
+ *  in4_rtalloc -- ã«ã¼ãã£ã³ã°è¡¨ãæ¢ç´¢ããã
+ */
+
+T_IN4_ADDR
+in4_rtalloc (T_IN4_ADDR dst)
+{
+	int_t ix;
+
+	for (ix = NUM_ROUTE_ENTRY; ix --; )
+		if ((routing_tbl[ix].flags & IN_RTF_DEFINED) &&
+		    (dst & routing_tbl[ix].mask) == routing_tbl[ix].target) {
+			if (routing_tbl[ix].gateway == 0)
+				return dst;
+			else {
+				return routing_tbl[ix].gateway;
+				}
+			}
+	return dst;
+	}
+
+#if NUM_REDIRECT_ROUTE_ENTRY > 0
+
+/*
+ *  in4_rtredirect -- ã«ã¼ãã£ã³ã°è¡¨ã«ã¨ã³ããªãç»é²ããã
+ *
+ *    æ³¨æ: å¼æ° tmo ã®åä½ã¯ [ms]ã
+ */
+
+void
+in4_rtredirect (T_IN4_ADDR gateway, T_IN4_ADDR target, uint8_t flags, uint32_t tmo)
+{
+	T_IN_RTENTRY	*frt;
+
+	frt = in_rtnewentry(flags, tmo);
+	frt->gateway    = gateway;
+	frt->target     = target;
+	frt->mask       = 0xffffffff;
+	}
+
+#endif	/* of #if NUM_REDIRECT_ROUTE_ENTRY > 0 */
+
+/*
+ *  in4_timer -- IPv4 å
+±éã¿ã¤ãã¼
+ *
+ *    1ç§å¨æã§èµ·åãããã
+ */
+
+static void
+in4_timer (void *ignore)
+{
+#if NUM_REDIRECT_ROUTE_ENTRY > 0
+
+	in_rttimer();
+
+#endif	/* of #if NUM_REDIRECT_ROUTE_ENTRY > 0 */
+
+#ifdef IP4_CFG_FRAGMENT
+
+	ip_frag_timer();
+
+#endif	/* of #ifdef IP4_CFG_FRAGMENT */
+
+	timeout(in4_timer, NULL, IN_TIMER_TMO);
+	}
+
+/*
+ *  in4_init -- IPv4 å
+±éæ©è½ãåæåããã
+ */
+
+void
+in4_init (void)
+{
+#if NUM_REDIRECT_ROUTE_ENTRY > 0
+
+	in_rtinit();
+
+#endif	/* of #if NUM_REDIRECT_ROUTE_ENTRY > 0 */
+
+	timeout(in4_timer, NULL, IN_TIMER_TMO);
+	}
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if NUM_REDIRECT_ROUTE_ENTRY > 0
+
+/*
+ *  in_rtinit -- ã«ã¼ãã£ã³ã°è¡¨ãåæåããã
+ */
+
+void
+in_rtinit (void)
+{
+	int_t ix;
+
+	for (ix = 0; ix < NUM_STATIC_ROUTE_ENTRY; ix ++)
+		routing_tbl[ix].flags = IN_RTF_DEFINED;
+
+	for ( ; ix < NUM_ROUTE_ENTRY; ix ++)
+		routing_tbl[ix].flags = 0;
+	}
+
+/*
+ *  in_rtnewentry -- æ°ããã¨ã³ããªãç²å¾ããã
+ */
+
+T_IN_RTENTRY *
+in_rtnewentry (uint8_t flags, uint32_t tmo)
+{
+	SYSTIM		now;
+	T_IN_RTENTRY	*rt, *frt = NULL;
+	int_t		ix;
+
+	/* ç©ºãã¨ã³ããªãæ¢ãã*/
+	for (ix = NUM_STATIC_ROUTE_ENTRY; ix < NUM_ROUTE_ENTRY; ix ++) {
+		rt = &routing_tbl[ix];
+		if ((routing_tbl[ix].flags & IN_RTF_DEFINED) == 0) {
+			frt = rt;
+			break;
+			}
+		}
+
+	/* expire ã®åä½ã¯ [s]ã*/
+	syscall(get_tim(&now));
+	now /= SYSTIM_HZ;
+
+	if (frt == NULL) {
+		/* ç©ºãããªããã°ãæå¹æéããã£ã¨ãç­ãã¨ã³ããªãç©ºãã«ããã*/
+		T_IN_RTENTRY	*srt = NULL;
+		int_t		diff, sdiff = INT_MAX;
+
+		syscall(wai_sem(SEM_IN_ROUTING_TBL));
+		for (ix = NUM_STATIC_ROUTE_ENTRY; ix < NUM_ROUTE_ENTRY; ix ++) {
+			rt = &routing_tbl[ix];
+			diff = (int_t)(rt->expire - now);
+			if (diff <= 0) {	/* rt->expire <= now */
+				/* æ¢ã«ãæå¹æéãéãã¦ããã*/
+				frt = rt;
+				break;
+				}
+			else if (diff < sdiff) {
+				srt = rt;
+				sdiff = diff;
+				}
+			}
+		if (frt == NULL)
+			frt = srt;
+		frt->flags = 0;
+		syscall(sig_sem(SEM_IN_ROUTING_TBL));
+		}
+
+	frt->flags  = (uint8_t)(flags | IN_RTF_DEFINED);
+	frt->expire = now + tmo / SYSTIM_HZ;
+	return frt;
+	}
+
+/*
+ *  in_rttimer -- ã«ã¼ãã£ã³ã°è¡¨ã®ç®¡çã¿ã¤ãã¼
+ */
+
+void
+in_rttimer (void)
+{
+	SYSTIM	now;
+	int_t	ix;
+
+	/* expire ã®åä½ã¯ [s]ã*/
+	syscall(get_tim(&now));
+	now /= SYSTIM_HZ;
+
+	syscall(wai_sem(SEM_IN_ROUTING_TBL));
+	for (ix = NUM_STATIC_ROUTE_ENTRY; ix < NUM_ROUTE_ENTRY; ix ++)
+		if ((routing_tbl[ix].flags & IN_RTF_DEFINED) &&
+		    (int_t)(routing_tbl[ix].expire - now) <= 0)
+			routing_tbl[ix].flags = 0;
+	syscall(sig_sem(SEM_IN_ROUTING_TBL));
+	}
+
+#endif	/* of #if NUM_REDIRECT_ROUTE_ENTRY > 0 */
+
+/*
+ *  in_cksum_sum -- ãã§ãã¯ãµã ã®åè¨è¨ç®é¢æ°
+ *
+ *  æ³¨æ: data ã¯ 4 ãªã¯ãããåä½ã§ããã£ã³ã°ãããã¨ã
+ *        data ã 2 ãªã¯ãããåä½ã«ã¢ã©ã¤ã³ããã¦ããªãã¨
+ *        ä¾å¤ãçºçããå¯è½æ§ãããã
+ *        len  ã¯ 4 ãªã¯ãããåä½ã«ã¢ã©ã¤ã³ããã¦ãããã¨ã
+ *
+ *        æ»ãå¤ã¯ãã¹ããã¤ããªã¼ã
+ */
+
+uint32_t
+in_cksum_sum (void *data, uint_t len /*ãªã¯ãããåä½*/)
+{
+	uint32_t sum = 0;
+
+	for ( ; len > 0; len -= 2) {
+		sum += *((uint16_t*)data);
+		data = (uint8_t*)data + 2;
+		}
+
+#if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN
+	return sum;
+#elif _NET_CFG_BYTE_ORDER == _NET_CFG_LITTLE_ENDIAN
+	return ((sum >> 8) & 0xffff) + ((sum & 0xff) << 8) + ((sum >> 24) & 0xff);
+#endif	/* #if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN */
+
+	}
+
+/*
+ *  in_cksum_carry -- ãã§ãã¯ãµã ã®æ¡ä¸ãè¨ç®é¢æ°
+ *
+ *  æ³¨æ: data ã¯ 4 ãªã¯ãããåä½ã§ããã£ã³ã°ãããã¨ã
+ *        data ã 2 ãªã¯ãããåä½ã«ã¢ã©ã¤ã³ããã¦ããªãã¨
+ *        ä¾å¤ãçºçããå¯è½æ§ãããã
+ *        len  ã¯ 4 ãªã¯ãããåä½ã«ã¢ã©ã¤ã³ããã¦ãããã¨ã
+ */
+
+uint32_t
+in_cksum_carry (uint32_t sum)
+{
+	uint32_t	carry;
+
+	while (sum >= 0x00010000) {
+		carry = sum >> 16;
+		sum   = (sum & 0xffff) + carry;
+		}
+
+	return sum;
+	}
+
+/*
+ *  in_strtfn -- API æ©è½ã³ã¼ãã®æå­è¡¨ç¾ãè¿ãã
+ */
+
+const char *
+in_strtfn (FN fncd)
+{
+	switch (fncd) {
+
+	/* TCP é¢ä¿ */
+
+	case TFN_TCP_CRE_REP:
+		return "TFN_TCP_CRE_REP";
+		break;
+	case TFN_TCP_DEL_REP:
+		return "TFN_TCP_DEL_REP";
+		break;
+	case TFN_TCP_CRE_CEP:
+		return "TFN_TCP_CRE_CEP";
+		break;
+	case TFN_TCP_DEL_CEP:
+		return "TFN_TCP_DEL_CEP";
+		break;
+	case TFN_TCP_ACP_CEP:
+		return "TFN_TCP_ACP_CEP";
+		break;
+	case TFN_TCP_CON_CEP:
+		return "TFN_TCP_CON_CEP";
+		break;
+	case TFN_TCP_SHT_CEP:
+		return "TFN_TCP_SHT_CEP";
+		break;
+	case TFN_TCP_CLS_CEP:
+		return "TFN_TCP_CLS_CEP";
+		break;
+	case TFN_TCP_SND_DAT:
+		return "TFN_TCP_SND_DAT";
+		break;
+	case TFN_TCP_RCV_DAT:
+		return "TFN_TCP_RCV_DAT";
+		break;
+	case TFN_TCP_GET_BUF:
+		return "TFN_TCP_GET_BUF";
+		break;
+	case TFN_TCP_SND_BUF:
+		return "TFN_TCP_SND_BUF";
+		break;
+	case TFN_TCP_RCV_BUF:
+		return "TFN_TCP_RCV_BUF";
+		break;
+	case TFN_TCP_REL_BUF:
+		return "TFN_TCP_REL_BUF";
+		break;
+	case TFN_TCP_SND_OOB:
+		return "TFN_TCP_SND_OOB";
+		break;
+	case TFN_TCP_RCV_OOB:
+		return "TFN_TCP_RCV_OOB";
+		break;
+	case TFN_TCP_CAN_CEP:
+		return "TFN_TCP_CAN_CEP";
+		break;
+	case TFN_TCP_SET_OPT:
+		return "TFN_TCP_SET_OPT";
+		break;
+	case TFN_TCP_GET_OPT:
+		return "TFN_TCP_GET_OPT";
+		break;
+	case TFN_TCP_ALL:
+		return "ALL";
+		break;
+
+	/* UDP é¢ä¿ */
+
+	case TFN_UDP_CRE_CEP:
+		return "TFN_UDP_CRE_CEP";
+		break;
+	case TFN_UDP_DEL_CEP:
+		return "TFN_UDP_DEL_CEP";
+		break;
+	case TFN_UDP_SND_DAT:
+		return "TFN_UDP_SND_DAT";
+		break;
+	case TFN_UDP_RCV_DAT:
+		return "TFN_UDP_RCV_DAT";
+		break;
+	case TFN_UDP_CAN_CEP:
+		return "TFN_UDP_CAN_CEP";
+		break;
+	case TFN_UDP_SET_OPT:
+		return "TFN_UDP_SET_OPT";
+		break;
+	case TFN_UDP_GET_OPT:
+		return "TFN_UDP_GET_OPT";
+		break;
+
+	default:
+		return "unknown TFN";
+		}
+	}
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/in_var.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/in_var.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/in_var.h	(revision 270)
@@ -0,0 +1,264 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1985, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)in_var.h	8.2 (Berkeley) 1/9/95
+ * $FreeBSD: src/sys/netinet/in_var.h,v 1.29.2.1 1999/08/29 16:29:38 peter Exp $
+ */
+ 
+#ifndef _IN_VAR_H_
+#define _IN_VAR_H_
+
+#if defined(SUPPORT_INET6)
+
+#include <netinet6/in6_var.h>
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+/*
+ *  ç¬èªã®ã¨ã©ã¼ã³ã¼ã
+ */
+
+#define EV_NOPND		(-97)		/* ãã³ãã£ã³ã°ãã¦ããªã */
+
+/*
+ *  ãããã¯ã¼ã¯ã¨ã©ã¼ã³ã¼ã
+ */
+
+#define EV_MSIZE		(-98)		/* ãã¼ã¿ã°ã©ã é·è¶
+é	*/
+#define EV_NURCH		(-99)		/* ãããã¯ã¼ã¯å°éä¸è½	*/
+#define EV_HDOWN		(-100)		/* ãã¹ããã¦ã³		*/
+#define EV_HURCH		(-101)		/* ãã¹ãå°éä¸è½	*/
+#define EV_CNNRF		(-102)		/* æ¥ç¶ä¸è½		*/
+#define EV_CNRST		(-103)		/* æ¥ç¶ãªã»ãã		*/
+#define EV_REXMTMO		(-104)		/* åéã¿ã¤ã ã¢ã¦ã	*/
+
+/*
+ *  å
+±éã¿ã¤ãã®èµ·åå¨æã®å®ç¾©
+ */
+
+#define IN_TIMER_TMO		(SYSTIM_HZ/NET_TIMER_CYCLE)
+
+/*
+ *  ã¤ã³ã¿ãã§ã¼ã¹ã¢ãã¬ã¹æ§é ä½
+ */
+
+typedef struct t_in4_ifaddr {
+	T_IN4_ADDR		addr;		/* IPv4 ã¢ãã¬ã¹	*/
+	T_IN4_ADDR		mask;		/* ãµãããããã¹ã¯	*/
+	} T_IN4_IFADDR;
+
+/*
+ *  ã«ã¼ãã£ã³ã°è¡¨ã¨ã³ããªæ§é ä½
+ */
+
+typedef struct t_in4_rtentry {
+	T_IN4_ADDR	target;		/* ç®æ¨ãããã¯ã¼ã¯ã¢ãã¬ã¹			*/
+	T_IN4_ADDR	mask;		/* ç®æ¨ãããã¯ã¼ã¯ã¢ãã¬ã¹ã®ãµãããããã¹ã¯	*/
+	T_IN4_ADDR	gateway;	/* ã²ã¼ãã¦ã§ã¤ã® IP ã¢ãã¬ã¹			*/
+	uint32_t	expire;		/* æå¹æéãåããæå» [s]			*/
+	uint8_t		flags;		/* ãã©ã°					*/
+	} T_IN4_RTENTRY;
+
+/*
+ *  TINET 1.1 ã¨ã®äºææ§ã®ããã®å®ç¾©
+ */
+
+#ifdef NUM_ROUTE_ENTRY
+
+#define NUM_STATIC_ROUTE_ENTRY		NUM_ROUTE_ENTRY
+#define NUM_REDIRECT_ROUTE_ENTRY	0
+#define T_RT_ENTRY			T_IN_RTENTRY
+
+#else	/* of #ifdef NUM_ROUTE_ENTRY */
+
+#define NUM_ROUTE_ENTRY			\
+	(NUM_STATIC_ROUTE_ENTRY + NUM_REDIRECT_ROUTE_ENTRY)
+					/* ã«ã¼ãã£ã³ã°è¡¨ã®ã¨ã³ããªæ°	*/
+
+#endif	/* of #ifdef NUM_ROUTE_ENTRY */
+
+/*
+ *  ã«ã¼ãã£ã³ã°ã¨ã³ããªç¶æ
+ãã©ã°
+ */
+
+#define IN_RTF_DEFINED		UINT_C(0x01)	/* å®ç¾©æ¸ã¿			*/
+#define IN_RTF_REDIRECT		UINT_C(0x10)	/* åãç´ãã«ããèªåè¨­å®ããã	*/
+
+/*
+ *  IPv4 ã¨ IPv6 ãã³ã³ãã¤ã«æã«é¸æããããã®ãã¯ã­
+ */
+
+#if defined(SUPPORT_INET4)
+
+#define IN_SET_HEADER(nbuf,len,dst,src,proto,ttl)	\
+					in4_set_header(nbuf,len,dst,src,proto,ttl)
+#define IN_GET_DATAGRAM(nbuf,len,maxlen, dst,src,proto,ttl,nbatr,tmout)	\
+					in4_get_datagram(nbuf,len,maxlen, dst,src,proto,ttl,nbatr,tmout)
+#define IN_CKSUM(nbuf,proto,off,len)	in4_cksum(nbuf,proto,off,len)
+#define IN_IS_DSTADDR_ACCEPT(myaddr,dstaddr)			\
+					in4_is_dstaddr_accept(myaddr,dstaddr)
+#define IN_IFAWITHIFP(ifp,dst)		in4_ifawithifp(ifp,dst)
+#define T_IN_IFADDR			T_IN4_IFADDR
+#define T_IN_RTENTRY			T_IN4_RTENTRY
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+/*
+ *  ã«ã¼ãã£ã³ã°è¡¨
+ */
+
+extern T_IN_RTENTRY routing_tbl[];
+
+/*
+ *  åæ¹åç
+§
+ */
+
+#ifndef T_NET_BUF_DEFINED
+typedef struct t_net_buf T_NET_BUF;
+#define T_NET_BUF_DEFINED
+#endif
+
+#ifndef T_IFNET_DEFINED
+typedef struct t_ifnet T_IFNET;
+#define T_IFNET_DEFINED
+#endif
+
+/*
+ *  é¢æ°
+ */
+
+extern void ip_input (T_NET_BUF *data);
+extern ER in4_set_header (T_NET_BUF *nbuf, uint_t len,
+                          T_IN4_ADDR *dstaddr, T_IN4_ADDR *srcaddr, uint8_t proto, uint8_t ttl);
+extern ER in4_get_datagram (T_NET_BUF **nbuf, uint_t len, uint_t maxlen,
+                            T_IN4_ADDR *dstaddr, T_IN4_ADDR *srcaddr,
+                            uint8_t proto, uint8_t ttl, ATR nbatr, TMO tmout);
+extern uint16_t in4_cksum (T_NET_BUF *nbuf, uint8_t proto, uint_t off, uint_t len);
+extern T_IN4_ADDR in4_rtalloc (T_IN4_ADDR dst);
+extern void in4_rtredirect (T_IN4_ADDR gateway, T_IN4_ADDR target, uint8_t flags, uint32_t tmo);
+extern void in4_init (void);
+extern T_IN4_IFADDR *in4_ifawithifp (T_IFNET *ifp, T_IN4_ADDR *dst);
+extern T_IN_RTENTRY *in_rtnewentry (uint8_t flags, uint32_t tmo);
+extern void in_rttimer (void);
+extern void in_rtinit (void);
+extern const T_NET_BUF**ip_get_frag_queue (void);
+
+/*
+ *  in4_is_dstaddr_accept -- å®å
+ã¢ãã¬ã¹ã¨ãã¦æ­£ããããã§ãã¯ããã
+ *
+ *    æ³¨æ: dstaddr ã¯ã
+ *          TINET-1.2 ãããããã¯ã¼ã¯ãã¤ããªã¼ãã
+ *          TINET-1.1 ã¾ã§ã¯ããã¹ããã¤ããªã¼ã
+ */
+extern bool_t in4_is_dstaddr_accept (T_IN4_ADDR *myaddr, T_IN4_ADDR *dstaddr);
+
+/*
+ *  in_cksum -- ãã§ãã¯ãµã è¨ç®é¢æ°ãIPv4ãICMPv4 ç¨
+ *
+ *  æ³¨æ: data ã¯ 4 ãªã¯ãããåä½ã§ããã£ã³ã°ãããã¨ã
+ *        data ã 2 ãªã¯ãããåä½ã«ã¢ã©ã¤ã³ããã¦ããªãã¨
+ *        ä¾å¤ãçºçããå¯è½æ§ãããã
+ *        len  ã¯ 4 ãªã¯ãããåä½ã«ã¢ã©ã¤ã³ããã¦ãããã¨ã
+ */
+extern uint16_t in_cksum(void *data, uint_t len /*ãªã¯ãããåä½*/);
+
+/*
+ *  in_cksum_sum -- ãã§ãã¯ãµã ã®åè¨è¨ç®é¢æ°
+ *
+ *  æ³¨æ: data ã¯ 4 ãªã¯ãããåä½ã§ããã£ã³ã°ãããã¨ã
+ *        data ã 2 ãªã¯ãããåä½ã«ã¢ã©ã¤ã³ããã¦ããªãã¨
+ *        ä¾å¤ãçºçããå¯è½æ§ãããã
+ *        len  ã¯ 4 ãªã¯ãããåä½ã«ã¢ã©ã¤ã³ããã¦ãããã¨ã
+ */
+extern uint32_t in_cksum_sum (void *data, uint_t len /*ãªã¯ãããåä½*/);
+
+/*
+ *  in_cksum_carry -- ãã§ãã¯ãµã ã®æ¡ä¸ãè¨ç®é¢æ°
+ *
+ *  æ³¨æ: data ã¯ 4 ãªã¯ãããåä½ã§ããã£ã³ã°ãããã¨ã
+ *        data ã 2 ãªã¯ãããåä½ã«ã¢ã©ã¤ã³ããã¦ããªãã¨
+ *        ä¾å¤ãçºçããå¯è½æ§ãããã
+ *        len  ã¯ 4 ãªã¯ãããåä½ã«ã¢ã©ã¤ã³ããã¦ãããã¨ã
+ */
+extern uint32_t in_cksum_carry (uint32_t sum);
+
+#endif	/* of #ifndef _IN_VAR_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip.cfg	(revision 270)
@@ -0,0 +1,68 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  IPv4 ã§ä½¿ç¨ããã«ã¼ãã«ãªãã¸ã§ã¯ã
+ */
+
+#if defined(SUPPORT_INET4)
+
+#ifdef IP4_CFG_FRAGMENT
+
+/* ãã¼ã¿ã°ã©ã ã®åå²ã»åæ§æ */
+
+CRE_SEM(SEM_IP4_FRAG_QUEUE, { TA_TPRI, 1, 1 });
+
+#endif	/* of #ifdef IP4_CFG_FRAGMENT */
+
+#if NUM_REDIRECT_ROUTE_ENTRY > 0
+
+/* ã«ã¼ãã£ã³ã°è¡¨ï¼åãç´ãï¼*/
+
+CRE_SEM(SEM_IN_ROUTING_TBL, { TA_TPRI, 1, 1 });
+
+#endif	/* of #if NUM_REDIRECT_ROUTE_ENTRY > 0 */
+
+#endif	/* of #if defined(SUPPORT_INET4) */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip.h	(revision 270)
@@ -0,0 +1,157 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ip.h	8.2 (Berkeley) 6/1/94
+ * $FreeBSD: src/sys/netinet/ip.h,v 1.15.2.1 1999/08/29 16:29:38 peter Exp $
+ */
+ 
+#ifndef _IP4_H_
+#define _IP4_H_
+
+/*
+ *  IPv4 ã®å®ç¾©ãRFC791 åç
+§
+ */
+
+#define IPV4_VERSION		4
+
+/*
+ *  IPv4 ãããã®å®ç¾©
+ */
+
+typedef struct t_ip4_hdr {
+	uint8_t		vhl;		/* version << 4 | header length >> 2	*/
+					/* length ã¯ 4 octets åä½		*/
+	uint8_t		type;		/* type of services			*/
+	uint16_t	len;		/* total length				*/
+
+	uint16_t	id;		/* identification			*/
+	uint16_t	flg_off;	/* fragment flag & offset		*/
+
+	uint8_t		ttl;		/* time to live				*/
+	uint8_t		proto;		/* protocol				*/
+	uint16_t	sum;		/* checksum				*/
+
+	T_IN4_ADDR	src;		/* source address			*/
+	T_IN4_ADDR	dst;		/* destination address			*/
+	} __attribute__((packed, aligned(2)))T_IP4_HDR;
+
+#define IP4_HDR_SIZE		(sizeof(T_IP4_HDR))
+
+/*
+ *  IPv4 ãããæ§é ä½ã¡ã³ãã¢ã¯ã»ã¹ãã¯ã­
+ */
+
+#define IP4_MAKE_VHL(v,hl)	((uint8_t)(((uint8_t)(v)<<4)|(hl)))
+#define IP4_VHL_V(vhl)		((uint8_t)((uint8_t)(vhl)>>4))
+#define IP4_VHL_HL(vhl)		((uint8_t)((vhl)&0x0f))
+
+#define IP4_MAKE_FLGOFF(f,o)	((uint16_t)((f)|(o)))
+#define IP4_FLGOFF_FLG(f)	((uint16_t)((f)&~IP4_OFFMASK))
+#define IP4_FLGOFF_OFF(o)	((uint16_t)((o)&IP4_OFFMASK))
+
+/*
+ *  IPv4 ãããã®ãã£ã¼ã«ãã®å¤ã®å®ç¾©
+ */
+
+#define IP4_VHL_BORING	UINT_C(0x45)	/* ãªãã·ã§ã³ããªã VHL å¤	*/
+#define IP4_RF		UINT_C(0x8000)	/* off: äºç´			*/
+#define IP4_DF		UINT_C(0x4000)	/* off: åå²ç¦æ­¢			*/
+#define IP4_MF		UINT_C(0x2000)	/* off: åå²ãã			*/
+#define IP4_OFFMASK	UINT_C(0x1fff)	/* ãªãã»ããé¨ã®ãã¹ã¯å¤		*/
+
+/*
+ *  å¶éå¤
+ */
+
+#define IP4_MAXPACKET	UINT_C(65535)	/* æå¤§ãã±ãããµã¤ãº		*/
+#define IP4_MAXTTL	UINT_C(255)	/* TTL æå¤§å¤			*/
+#define IP4_DEFTTL	UINT_C(64)	/* TTL è¦å®å¤ (RFC1340)		*/
+#define IP4_FRAGTTL	UINT_C(60)	/* åå²ããããã¼ã¿ã°ã©ã ã®çå­æéï¼ç§ï¼*/
+#define IP4_MSS		UINT_C(576)	/* æå¤§ã»ã°ã¡ã³ããµã¤ãºã®è¦å®å¤	*/
+
+/* IPv4 ã¨ IPv6 ãã³ã³ãã¤ã«æã«é¸æããããã®ãã¯ã­ */
+
+#if defined(SUPPORT_INET4)
+
+#define IP_HDR_SIZE	IP4_HDR_SIZE
+#define T_IP_HDR	T_IP4_HDR
+#define IP_DEFTTL	IP4_DEFTTL
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#endif	/* of #ifndef _IP4_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip6.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip6.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip6.h	(revision 270)
@@ -0,0 +1,311 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet/ip6.h,v 1.2.2.2 2001/07/03 11:01:46 ume Exp $	*/
+/*	$KAME: ip6.h,v 1.18 2001/03/29 05:34:30 itojun Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ip.h	8.1 (Berkeley) 6/10/93
+ */
+ 
+#ifndef _IP6_H_
+#define _IP6_H_
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  IPv6 ã®å®ç¾©ãRFC2460 åç
+§
+ */
+
+#define IPV6_VERSION	6
+
+/*
+ *  IPv6 ãããã®å®ç¾©
+ */
+
+typedef struct t_ip6_hdr {
+	uint32_t	vcf;		/* Version:        4 bit		*/
+					/* Traffic Class:  8 bit		*/
+					/* Flow Label:    20 bit		*/
+	uint16_t	plen;		/* Payload Length			*/
+	uint8_t		next;		/* Next Header				*/
+	uint8_t		hlim;		/* Hop Limit				*/
+	T_IN6_ADDR 	src;		/* Source Address			*/
+	T_IN6_ADDR 	dst;		/* Destination Address			*/
+	} __attribute__((packed, aligned(2)))T_IP6_HDR;
+
+#define IP6_HDR_SIZE		(sizeof(T_IP6_HDR))
+
+/*
+ *  IPv6 ãããæ§é ä½ã¡ã³ãã¢ã¯ã»ã¹ãã¯ã­
+ */
+
+#define IP6_MAKE_VCF(v,cf)	(((uint32_t)(v)<<28)|(cf))
+#define IP6_VCF_V(vcf)		((uint32_t)(vcf)>>28)
+#define IP6_VCF_C(vcf)		(((uint32_t)(vcf)>>20)&ULONG_C(0xff))
+#define IP6_VCF_F(vcf)		((uint32_t)(vcf)&ULONG_C(0x000fffff))
+#define IP6_VCF_CF(vcf)		((uint32_t)(vcf)&ULONG_C(0x0fffffff))
+
+/*
+ *  æ¡å¼µããã
+ */
+
+typedef struct t_ip6_ext_hdr {
+	uint8_t		next;		/* Next Header			*/
+	uint8_t		len;		/* 8 ãªã¯ãããåä½ã®é·ã	*/
+	} __attribute__((packed, aligned(2)))T_IP6_EXT_HDR;
+
+/*
+ *  ä¸­ç¶ç¹ (Hop-by-Hop) ãªãã·ã§ã³ããã
+ */
+
+typedef struct t_ip6_hbh_hdr {
+	uint8_t		next;		/* Next Header			*/
+	uint8_t		len;		/* 8 ãªã¯ãããåä½ã®é·ãããã ãã
+					 * ãã®ãªãã·ã§ã³ãããå
+¨ä½ã®ãªã¯ãããæ°ã
+					 * 8 ã§å²ã£ãå¤ã® - 1 ãå
+¥ãã
+					 */
+	} __attribute__((packed, aligned(2)))T_IP6_HBH_HDR;
+
+/*
+ *  çµç¹ (Destination) ãªãã·ã§ã³ããã
+ */
+
+typedef struct t_ip6_dest_hdr {
+	uint8_t		next;		/* Next Header			*/
+	uint8_t		len;		/* 8 ãªã¯ãããåä½ã®é·ãããã ãã
+					 * ãã®ãªãã·ã§ã³ãããå
+¨ä½ã®ãªã¯ãããæ°ã
+					 * 8 ã§å²ã£ãå¤ã® - 1 ãå
+¥ãã
+					 */
+	} __attribute__((packed, aligned(2)))T_IP6_DEST_HDR;
+
+/* ä¸­ç¶ç¹ (Hop-by-Hop) ãªãã·ã§ã³ */
+
+#define IP6OPT_PAD1		UINT_C(0x00)	/* 00 0 00000 */
+#define IP6OPT_PADN		UINT_C(0x01)	/* 00 0 00001 */
+#define IP6OPT_JUMBO		UINT_C(0xc2)	/* 11 0 00010 */
+#define IP6OPT_NSAP_ADDR	UINT_C(0xc3)	/* 11 0 00011 */
+#define IP6OPT_TUNNEL_LIMIT	UINT_C(0x04)	/* 00 0 00100 */
+#define IP6OPT_RTR_ALERT	UINT_C(0x05)	/* 00 0 00101 */
+
+#define IP6OPT_MINLEN		2	/* ãªãã·ã§ã³ã®æç­é·		*/
+
+/* æªç¥ã®ãªãã·ã§ã³ã®å¦çã®æå® */
+
+#define IP6OPT_TYPE_SKIP	UINT_C(0x00)	/* ç¡è¦ããã			*/
+#define IP6OPT_TYPE_DISCARD	UINT_C(0x40)	/* ãã¼ã¿ã°ã©ã ãç ´æ£ããã	*/
+#define IP6OPT_TYPE_FORCEICMP	UINT_C(0x80)	/* ç ´æ£ãã¦ãICMP ãè¿éããã	*/
+#define IP6OPT_TYPE_ICMP	UINT_C(0xc0)
+		/* ç ´æ£ãã¦ããã«ãã­ã£ã¹ãã§ãªããã° ICMP ãè¿éããã	*/
+
+#define IP6OPT_TYPE(o)		((o)&UINT_C(0xc0))
+
+/*
+ *  çµè·¯å¶å¾¡ããã
+ */
+
+typedef struct t_ip6_rt_hdr {
+	uint8_t		next;		/* Next Header			*/
+	uint8_t		len;		/* 8 ãªã¯ãããåä½ã®é·ãããã ãã
+					 * ãã®ãªãã·ã§ã³ãããå
+¨ä½ã®ãªã¯ãããæ°ã
+					 * 8 ã§å²ã£ãå¤ã® - 1 ãå
+¥ãã
+					 */
+	uint8_t		type;		/* çµè·¯å¶å¾¡ã¿ã¤ã		*/
+	uint8_t		segleft;	/* ã»ã°ã¡ã³ãã®æ®ã		*/
+	} __attribute__((packed, aligned(2)))T_IP6_RT_HDR;
+
+/*
+ *  ã¿ã¤ã 0 çµè·¯å¶å¾¡ããã
+ */
+
+typedef struct t_ip6_rt0_hdr {
+	uint8_t		next;		/* Next Header			*/
+	uint8_t		len;		/* 8 ãªã¯ãããåä½ã®é·ãããã ãã
+					 * ãã®ãªãã·ã§ã³ãããå
+¨ä½ã®ãªã¯ãããæ°ã
+					 * 8 ã§å²ã£ãå¤ã® - 1 ãå
+¥ãã
+					 */
+	uint8_t		type;		/* çµè·¯å¶å¾¡ã¿ã¤ã		*/
+	uint8_t		segleft;	/* ã»ã°ã¡ã³ãã®æ®ã		*/
+	uint32_t	reserved;	/* äºç´				*/
+	} __attribute__((packed, aligned(2)))T_IP6_RT0_HDR;
+
+/*
+ *  æ­çããã
+ */
+
+typedef struct t_ip6_frag_hdr {
+	uint8_t		next;		/* Next Header			*/
+	uint8_t		reserved;
+	uint16_t	off_flag;	/* ãªãã»ããã¨ãã©ã°		*/
+	uint32_t	ident;		/* åå²è­å¥å­			*/
+	} __attribute__((packed, aligned(2)))T_IP6_FRAG_HDR;
+
+/* æ­çãããã®ãªãã»ããã¨ãã©ã° */
+
+#ifdef _NET_CFG_BYTE_ORDER
+
+#if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN
+
+#define IP6F_OFF_MASK		UINT_C(0xfff8)		/* ãªãã»ãããååºããã¹ã¯	*/
+#define IP6F_RESERVED_MASK	UINT_C(0x0006)		/* äºç´ãååºããã¹ã¯		*/
+#define IP6F_MORE_FRAG		UINT_C(0x0001)		/* ä¸­éãã©ã°ã¡ã³ã		*/
+
+#elif _NET_CFG_BYTE_ORDER == _NET_CFG_LITTLE_ENDIAN
+
+#define IP6F_OFF_MASK		UINT_C(0xf8ff)		/* ãªãã»ãããååºããã¹ã¯	*/
+#define IP6F_RESERVED_MASK	UINT_C(0x0600)		/* äºç´ãååºããã¹ã¯		*/
+#define IP6F_MORE_FRAG		UINT_C(0x0100)		/* ä¸­éãã©ã°ã¡ã³ã		*/
+
+#endif	/* #if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN */
+
+#endif	/* of #ifdef _NET_CFG_BYTE_ORDER */
+
+/*
+ *  å¶éå¤
+ */
+
+#define IPV6_MAXHLIM	UINT_C(255)	/* ããããªãããã®æå¤§å¤				*/
+#define IPV6_DEFHLIM	UINT_C(64)	/* ããããªãããã®è¦å®å¤				*/
+#define IPV6_FRAGTTL	UINT_C(60)	/* åå²ããããã¼ã¿ã°ã©ã ã®çå­æéï¼ç§ï¼	*/
+#define IPV6_MMTU	UINT_C(1280)	/* æå° MTUããã¤ã­ã¼ã (1024) + ããã (256)	*/
+#define IPV6_MAXPACKET	UINT_C(65535)	/* ã¸ã£ã³ããã¤ã­ã¼ããé¤ãæå¤§ãã±ãããµã¤ãº	*/
+
+/*
+ *  IPv4 ã¨ IPv6 ãã³ã³ãã¤ã«æã«é¸æããããã®ãã¯ã­
+ */
+
+/*
+ *  ããããªãããã®è¦å®å¤ã¯ãã«ã¼ã¿éç¥ã«ããå¤æ´ããããã¨ããã
+ */
+
+#if NUM_ND6_DEF_RTR_ENTRY > 0
+
+/* ã«ã¼ã¿éç¥ãåä¿¡ããå ´åã¯ãéç¥ãããå¤ */
+
+#define IP_DEFTTL	ip6_defhlim
+
+#else	/* #if NUM_ND6_DEF_RTR_ENTRY > 0 */
+
+/* ã«ã¼ã¿éç¥ãåä¿¡ããªãå ´åã®å¤ã¯æ¢å®å¤ */
+
+#define IP_DEFTTL	IPV6_DEFHLIM
+
+#endif	/* #if NUM_ND6_DEF_RTR_ENTRY > 0 */
+
+#define IP_HDR_SIZE	IP6_HDR_SIZE
+#define T_IP_HDR	T_IP6_HDR
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef _IP6_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip_icmp.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip_icmp.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip_icmp.c	(revision 270)
@@ -0,0 +1,435 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ip_icmp.c	8.2 (Berkeley) 1/4/94
+ * $FreeBSD: src/sys/netinet/ip_icmp.c,v 1.33.2.3 1999/10/14 11:49:38 des Exp $
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_loop.h>
+#include <net/if_ppp.h>
+#include <net/ethernet.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet/ip_icmp.h>
+#include <netinet/icmp_var.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_timer.h>
+#include <netinet/tcp_var.h>
+
+/*
+ *  å¤æ°
+ */
+
+#ifdef SUPPORT_MIB
+
+/*
+ *  SNMP ã® ç®¡çæ
+å ±ãã¼ã¹ (MIB)
+ */
+
+T_ICMP_STATS icmp_stats;
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+/*
+ *  é¢æ°
+ */
+
+static void icmp_echo (T_NET_BUF *input, uint_t ihoff);
+static void icmp_unreach (T_NET_BUF *input, uint_t ihoff);
+
+#if NUM_REDIRECT_ROUTE_ENTRY > 0
+
+static void icmp_redirect (T_NET_BUF *input, uint_t ihoff);
+
+#endif	/* of #if NUM_REDIRECT_ROUTE_ENTRY > 0 */
+
+/*
+ *  icmp_echo -- ã¨ã³ã¼è¦æ±ãåä¿¡ããã¨ãã®å¦ç
+ *
+ *    input ã«ã¯ IF ãããã¨ IP ããããå«ã¾ãã¦ããã
+ */
+
+static void
+icmp_echo (T_NET_BUF *input, uint_t ihoff)
+{
+	T_IP4_HDR	*ip4h;
+	T_ICMP4_HDR	*icmp4h;
+	T_IN4_ADDR	addr;
+
+	NET_COUNT_MIB(icmp_stats.icmpInEchos, 1);
+
+	/* ã¡ãã»ã¼ã¸ã®åãã¨ã³ã¼è¦æ± (8) ãã ã¨ã³ã¼å¿ç­ (0) ã«	*/
+	/* å¤æ´ãã¦éãè¿ãã					*/
+
+	icmp4h = GET_ICMP4_HDR(input, ihoff);
+	icmp4h->type = ICMP4_ECHO_REPLY;
+
+	/* IP ãããã®å®å
+ã¨çºä¿¡å
+ãäº¤æããã*/
+	ip4h      = GET_IP4_HDR(input);
+	addr      = ip4h->src;
+	ip4h->src = ip4h->dst;
+	ip4h->dst = addr;
+
+	/* ãã§ãã¯ãµã ãè¨ç®ããã*/
+	icmp4h->sum = 0;
+	icmp4h->sum = in_cksum(icmp4h,
+	                       (uint_t)(((input->len - GET_IF_IP4_HDR_SIZE(input)) + 3) >> 2 << 2));
+
+	/* éä¿¡ããã*/
+	NET_COUNT_ICMP4(net_count_icmp4.out_octets,
+	               input->len - GET_IF_IP4_HDR_SIZE(input));
+	NET_COUNT_ICMP4(net_count_icmp4.out_packets, 1);
+	NET_COUNT_MIB(icmp_stats.icmpOutMsgs, 1);
+	NET_COUNT_MIB(icmp_stats.icmpOutEchoReps, 1);
+	ip_output(input, TMO_ICMP_OUTPUT);
+	}
+
+/*
+ *  icmp_unreach -- ICMP4_UNREACH ãåä¿¡ããã¨ãã®å¦ç
+ */
+
+static const int8_t code2error[] = {
+	EV_HURCH,	/* ICMP4_UNREACH_NET			 0 */
+	EV_HURCH,	/* ICMP4_UNREACH_HOST			 1 */
+	EV_CNNRF,	/* ICMP4_UNREACH_PROTOCOL		 2 */
+	EV_CNNRF,	/* ICMP4_UNREACH_PORT			 3 */
+	EV_MSIZE,	/* ICMP4_UNREACH_FLAG			 4 */
+	EV_HURCH,	/* ICMP4_UNREACH_SRC_FAIL		 5 */
+	EV_HURCH,	/* ICMP4_UNREACH_NET_UNKNOWN		 6 */
+	EV_HURCH,	/* ICMP4_UNREACH_HOST_UNKNOWN		 7 */
+	EV_HURCH,	/* ICMP4_UNREACH_ISOLATED		 8 */
+	EV_HURCH,	/* ICMP4_UNREACH_NET_PROHIB		 9 */
+	EV_HURCH,	/* ICMP4_UNREACH_HOST_PROHIB		10 */
+	EV_HURCH,	/* ICMP4_UNREACH_TOS_NET		11 */
+	EV_HURCH,	/* ICMP4_UNREACH_TOS_HOST		12 */
+	EV_HURCH,	/* ICMP4_UNREACH_FILTER_PROHIB		13 */
+	EV_HURCH,	/* ICMP4_UNREACH_HOST_PRECEDENCE	14 */
+	EV_HURCH,	/* ICMP4_UNREACH_PRECEDENCE_CUTOFF	15 */
+	};
+
+static void
+icmp_unreach (T_NET_BUF *input, uint_t ihoff)
+{
+	T_IP4_HDR	*ip4h;
+	uint8_t		code;
+	ER		error;
+
+	NET_COUNT_MIB(icmp_stats.icmpInDestUnreachs, 1);
+
+	ip4h   = (T_IP4_HDR*)GET_ICMP4_SDU(input, ihoff);
+	code  = GET_ICMP4_HDR(input, ihoff)->code;
+	error = code2error[code];
+	if (ip4h->proto == IPPROTO_TCP) {
+
+#ifdef SUPPORT_TCP
+
+		memcpy(GET_IP4_HDR(input), ip4h, input->len - (IP4_HDR_SIZE + ICMP4_HDR_SIZE));
+		input->len -= IP4_HDR_SIZE + ICMP4_HDR_SIZE;
+		tcp_notify(input, error);
+
+#endif	/* of #ifdef SUPPORT_TCP */
+
+		}
+	else
+		syslog(LOG_NOTICE, "[ICMP] error, code: %d.", code);
+	}
+
+#if NUM_REDIRECT_ROUTE_ENTRY > 0
+
+/*
+ *  icmp_redirect -- åãç´ãã¡ãã»ã¼ã¸ãåä¿¡ããã¨ãã®å¦ç
+ *
+ *    input ã«ã¯ IF ãããã¨ IP ããããå«ã¾ãã¦ããã
+ */
+
+static void
+icmp_redirect (T_NET_BUF *input, uint_t ihoff)
+{
+	T_IP4_HDR	*ip4h, *sip4h;
+	T_ICMP4_HDR	*icmp4h;
+
+	ip4h   = GET_IP4_HDR(input);
+	icmp4h = GET_ICMP4_HDR(input, ihoff);
+	sip4h  = (T_IP4_HDR *)GET_ICMP4_SDU(input, ihoff);
+
+	/*
+	 *  å
+å®¹ãã§ãã¯ãä»¥ä¸ã®å ´åã¯ã¨ã©ã¼
+	 *
+	 *    ã»ICMP ã³ã¼ãããICMP4_REDIRECT_PORT_AND_HOST (3) ä»¥ä¸
+	 *    ã»ãã¼ã¿ã°ã©ã é·ããICMP ã®æå°é·ããç­ã (IP ããã + ICMP ããã + IP ããã + 8)
+	 *    ã»ãã¼ã¿ã°ã©ã é·ããICMP ã®æå¤§é·ããç­ã
+	 *    ã»
+	 */
+	if (icmp4h->code > ICMP4_REDIRECT_PORT_AND_HOST ||
+	    ip4h->len < GET_IP4_ICMP4_HDR_SIZE(input) + 8 + IP4_HDR_SIZE ||
+	    ip4h->len < GET_IP4_ICMP4_HDR_SIZE(input) + 8 + (IP4_VHL_HL(sip4h->vhl) << 2)) {
+		NET_COUNT_ICMP4(net_count_icmp4.in_err_packets, 1);
+		return;
+		}
+
+	in4_rtredirect(icmp4h->data.addr, sip4h->dst, IN_RTF_REDIRECT, TMO_IN_REDIRECT);
+	}
+
+#endif	/* of #if NUM_REDIRECT_ROUTE_ENTRY > 0 */
+
+/*
+ *  icmp_input -- ICMP ã®å
+¥åé¢æ°
+ *
+ *    input ã«ã¯ IF ãããã¨ IP ããããå«ã¾ãã¦ããã
+ */
+
+uint_t
+icmp_input (T_NET_BUF **inputp, uint_t *offp, uint_t *nextp)
+{
+	T_NET_BUF	*input = *inputp;
+	T_ICMP4_HDR	*icmp4h;
+	T_IN4_ADDR	addr;
+	uint_t		len, align;
+
+	NET_COUNT_ICMP4(net_count_icmp4.in_octets,
+	               input->len - GET_IF_IP4_HDR_SIZE(input));
+	NET_COUNT_ICMP4(net_count_icmp4.in_packets, 1);
+
+	/* ICMP ãããã®é·ãããã§ãã¯ããã*/
+	if (input->len < IF_IP4_ICMP4_HDR_SIZE) {
+		NET_COUNT_ICMP4(net_count_icmp4.in_err_packets, 1);
+		NET_COUNT_MIB(icmp_stats.icmpInErrors, 1);
+		goto buf_rel;
+		}
+
+	icmp4h = (T_ICMP4_HDR *)(input->buf + *offp);
+
+	/* 4 ãªã¯ãããå¢çã®ãã¼ã¿é· */
+	len   = input->len - *offp;
+	align = (len + 3) >> 2 << 2;
+
+	/* 4 ãªã¯ãããå¢çã¾ã§ããã£ã³ã°ã§åããã*/
+	if (align > len)
+		memset((uint8_t*)input->buf + input->len, 0, (size_t)(align - len));
+
+	/* ãã§ãã¯ãµã ãè¨ç®ããã*/
+	if (in_cksum(icmp4h, align) != 0) {
+		NET_COUNT_ICMP4(net_count_icmp4.in_err_packets, 1);
+		goto buf_rel;
+		}
+
+	/* ã¡ãã»ã¼ã¸ã®åã«ããåå²ããã*/
+	switch (icmp4h->type) {
+	case ICMP4_ECHO_REQUEST:
+		icmp_echo(input, *offp);
+		return IPPROTO_DONE;
+		break;
+	case ICMP4_ECHO_REPLY:
+
+#ifdef ICMP_CFG_CALLBACK_ECHO_REPLY
+
+		icmp_echo_reply(input, *offp);
+
+#endif	/* of #ifdef ICMP_CFG_CALLBACK_ECHO_REPLY */
+
+		break;
+	case ICMP4_UNREACH:
+		icmp_unreach(input, *offp);
+		break;
+	case ICMP4_REDIRECT:
+
+#if NUM_REDIRECT_ROUTE_ENTRY > 0
+
+		addr = ntohl(icmp4h->data.addr);
+		syslog(LOG_INFO, "[ICMP] redirect, addr: %s.", ip2str(NULL, &addr));
+		icmp_redirect(input, *offp);
+
+#else	/* of #if NUM_REDIRECT_ROUTE_ENTRY > 0 */
+
+		addr = ntohl(icmp4h->data.addr);
+		syslog(LOG_INFO, "[ICMP] redirect ignored, addr: %s.", ip2str(NULL, &addr));
+
+#endif	/* of #if NUM_REDIRECT_ROUTE_ENTRY > 0 */
+
+		break;
+	default:
+		syslog(LOG_INFO, "[ICMP] unknown type: %d.", icmp4h->type);
+		NET_COUNT_ICMP4(net_count_icmp4.in_err_packets, 1);
+		break;
+		}
+
+buf_rel:
+	syscall(rel_net_buf(input));
+	return IPPROTO_DONE;
+	}
+
+#ifdef ICMP_REPLY_ERROR
+
+/*
+ *  icmp_error -- ICMP ã¨ã©ã¼éä¿¡é¢æ°ã
+ *
+ *    input ã«ã¯ IF ãããã¨ IP ããããå«ã¾ãã¦ããã
+ *    icmp_error ã§ã¯ããããã¯ã¼ã¯ãããã¡ input ãè¿å´ããªãã®ã§ã
+ *    å¼åºãå´ã§ãéæ¾ãã¦ããçµäºããã	
+ */
+
+void
+icmp_error (uint8_t code, T_NET_BUF *input)
+{
+	T_IP4_HDR	*ip4h;
+	T_ICMP4_HDR	*icmp4h;
+	T_NET_BUF	*output;
+	T_IN4_ADDR	saddr;
+	uint_t		len, ip4hl, align;
+
+	ip4h  = GET_IP4_HDR(input);
+	ip4hl = GET_IP4_HDR_SIZE(ip4h);
+
+	/* éä¿¡ç¨ã® IP ãã¼ã¿ã°ã©ã ãç²å¾ããã*/
+	if (input->len - ip4hl < 8)
+		len = input->len - ip4hl;
+	else
+		len = 8;
+
+	saddr = ntohl(ip4h->src);
+	if (in4_get_datagram(&output, (uint_t)(ICMP4_HDR_SIZE + ip4hl + len), 0,
+	                     &saddr, NULL, IPPROTO_ICMP, IP4_DEFTTL, 
+	                     NBA_SEARCH_ASCENT, TMO_ICMP_OUTPUT) != E_OK)
+		return;
+
+	/* ICMP ããããè¨­å®ããã*/
+	icmp4h		= GET_ICMP4_HDR(output, IF_IP4_ICMP4_HDR_OFFSET);
+	icmp4h->type	= ICMP4_UNREACH;
+	icmp4h->code	= code;
+	icmp4h->data.addr= 0;
+
+	/* ã¨ã©ã¼ãçºçãã IP ãããã¨ ãã¼ã¿ 8 ãªã¯ããããã³ãã¼ããã*/
+	memcpy(GET_ICMP4_SDU(output, IF_IP4_ICMP4_HDR_OFFSET),
+	       GET_IP4_HDR(input), (size_t)(ip4hl + len));
+
+	/* 4 ãªã¯ãããå¢çã®ãã¼ã¿é· */
+	align = (len + 3) >> 2 << 2;
+
+	/* 4 ãªã¯ãããå¢çã¾ã§ããã£ã³ã°ã§åããã*/
+	if (align > len)
+		memset((uint8_t*)GET_ICMP4_SDU(output, IF_IP4_ICMP4_HDR_OFFSET) + ip4hl + len,
+		       0, (size_t)(align - len));
+
+	/* ãã§ãã¯ãµã ãè¨ç®ããã*/
+	icmp4h->sum = 0;
+	icmp4h->sum = in_cksum(icmp4h, (uint_t)(ICMP4_HDR_SIZE + ip4hl + align));
+
+	/* éä¿¡ããã*/
+	NET_COUNT_ICMP4(net_count_icmp4.out_octets,
+	               output->len - GET_IF_IP4_HDR_SIZE(output));
+	NET_COUNT_ICMP4(net_count_icmp4.out_packets, 1);
+	NET_COUNT_MIB(icmp_stats.icmpOutMsgs, 1);
+	NET_COUNT_MIB(icmp_stats.icmpOutDestUnreachs, 1);
+	ip_output(output, TMO_ICMP_OUTPUT);
+	}
+
+#endif	/* of #ifdef ICMP_REPLY_ERROR */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip_icmp.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip_icmp.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip_icmp.h	(revision 270)
@@ -0,0 +1,198 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ip_icmp.h	8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/netinet/ip_icmp.h,v 1.12.2.2 1999/11/18 08:51:44 peter Exp $
+ */
+ 
+#ifndef _IP_ICMP_H_
+#define _IP_ICMP_H_
+
+/*
+ *  ICMP ãããã®å®ç¾©ãRFC 792
+ */
+
+typedef struct t_icmp_hdr {
+	uint8_t		type;		/* ã¡ãã»ã¼ã¸ã®å	*/
+	uint8_t		code;		/* ãµãå		*/
+	uint16_t	sum;		/* ãã§ãã¯ãµã 		*/
+	union {
+		struct id_seq {
+			uint16_t	id;
+			uint16_t	seq;
+			} id_seq;
+		T_IN4_ADDR	addr;
+		} data;
+	} __attribute__((packed, aligned(2)))T_ICMP4_HDR;
+
+#define ICMP4_HDR_SIZE			(sizeof(T_ICMP4_HDR))
+#define IP4_ICMP4_HDR_SIZE		(IP4_HDR_SIZE + ICMP4_HDR_SIZE)
+#define IF_IP4_ICMP4_HDR_SIZE		(IF_IP4_HDR_SIZE + ICMP4_HDR_SIZE)
+#define IF_IP4_ICMP4_HDR_OFFSET		(IF_IP4_HDR_SIZE)
+
+#define GET_ICMP4_HDR(nbuf,ihoff)	((T_ICMP4_HDR*)((uint8_t*)((nbuf)->buf) + ihoff))
+#define GET_ICMP4_SDU(nbuf,ihoff)	((uint8_t*)((nbuf)->buf) + ihoff + ICMP4_HDR_SIZE)
+
+#define GET_ICMP4_HDR_OFFSET(nbuf)	(GET_IF_IP_HDR_SIZE(nbuf))
+
+#define GET_IP4_ICMP4_HDR_SIZE(nbuf)	(GET_IP4_HDR_SIZE(GET_IP4_HDR(nbuf)) + ICMP4_HDR_SIZE)
+#define GET_IF_IP4_ICMP4_HDR_SIZE(nbuf)	(IF_HDR_SIZE + GET_IP4_ICMP4_HDR_SIZE(nbuf))
+
+/*
+ *  ã¡ãã»ã¼ã¸ã®å
+ */
+
+#define ICMP4_ECHO_REPLY	UINT_C(0)	/* ã¨ã³ã¼å¿ç­		*/
+#define ICMP4_UNREACH		UINT_C(3)	/* ã¨ã©ã¼		*/
+#define ICMP4_SOURCE_QUENCH	UINT_C(4)	/* çºä¿¡å¶é		*/
+#define ICMP4_REDIRECT		UINT_C(5)	/* æ¹åå¤æ´		*/
+#define ICMP4_ECHO_REQUEST	UINT_C(8)	/* ã¨ã³ã¼è¦æ±		*/
+#define ICMP4_TIME_EXCEEDED	UINT_C(11)	/* çºä¿¡å¶é		*/
+#define ICMP4_PARAMETER		UINT_C(12)	/* ãã©ã¡ã¼ã¿ç°å¸¸	*/
+#define ICMP4_TIME_REQUEST	UINT_C(13)	/* ã¿ã¤ã ã¹ã¿ã³ãè¦æ±	*/
+#define ICMP4_TIME_REPLY	UINT_C(14)	/* ã¿ã¤ã ã¹ã¿ã³ãå¿ç­	*/
+#define ICMP4_MASK_REQUEST	UINT_C(17)	/* ã¢ãã¬ã¹ãã¹ã¯è¦æ±	*/
+#define ICMP4_MASK_REPLY	UINT_C(18)	/* ã¢ãã¬ã¹ãã¹ã¯å¿ç­	*/
+
+/*
+ *  ãµãå
+ */
+
+/* ICMP4_UNREACH (3)	*/
+
+#define ICMP4_UNREACH_NET		UINT_C(0)	/* ãããã¯ã¼ã¯		*/
+#define ICMP4_UNREACH_HOST		UINT_C(1)	/* ãã¹ã		*/
+#define ICMP4_UNREACH_PROTOCOL		UINT_C(2)	/* ãã­ãã³ã«		*/
+#define ICMP4_UNREACH_PORT		UINT_C(3)	/* ãã¼ã		*/
+#define ICMP4_UNREACH_FLAG		UINT_C(4)	/* åå²			*/
+#define ICMP4_UNREACH_SRC_FAIL		UINT_C(5)	/* ã½ã¼ã¹çµè·¯		*/
+#define ICMP4_UNREACH_NET_UNKNOWN	UINT_C(6)	/* ãããã¯ã¼ã¯ä¸æ	*/
+#define ICMP4_UNREACH_HOST_UNKNOWN	UINT_C(7)	/* ãã¹ãä¸æ		*/
+#define ICMP4_UNREACH_ISOLATED		UINT_C(8)	/* åé¢			*/
+#define ICMP4_UNREACH_NET_PROHIB	UINT_C(9)	/* 			*/
+#define ICMP4_UNREACH_HOST_PROHIB	UINT_C(10)	/* 			*/
+#define ICMP4_UNREACH_TOS_NET		UINT_C(11)	/* ãããã¯ã¼ã¯ã¸ã®ä¸æ­£TOS*/
+#define ICMP4_UNREACH_TOS_HOST		UINT_C(12)	/* ãã¹ãã¸ã®ä¸æ­£TOS	*/
+#define ICMP4_UNREACH_FILTER_PROHIB	UINT_C(13)	/* 			*/
+#define ICMP4_UNREACH_HOST_PRECEDENCE	UINT_C(14)	/* 			*/
+#define ICMP4_UNREACH_PRECEDENCE_CUTOFF	UINT_C(15)	/* 			*/
+
+/* ICMP4_REDIRECT (5)	*/
+
+#define ICMP4_REDIRECT_NET		UINT_C(0)	/* ãããã¯ã¼ã¯		*/
+#define ICMP4_REDIRECT_HOST		UINT_C(1)	/* ãã¹ã		*/
+#define ICMP4_REDIRECT_PORT_AND_NET	UINT_C(2)	/* ãã¼ãçªå·ã¨ããã	*/
+#define ICMP4_REDIRECT_PORT_AND_HOST	UINT_C(3)	/* ãã¼ãçªå·ã¨ãã¹ã	*/
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+/*
+ *  é¢æ°ã·ãã¥ã¬ã¼ã·ã§ã³ãã¯ã­
+ */
+
+#ifndef ICMP_REPLY_ERROR
+
+#define _tinet_icmp_error(code,data)
+
+#endif	/* of #ifdef ICMP_REPLY_ERROR */
+
+/*
+ *  é¢æ°
+ */
+
+extern uint_t icmp_input (T_NET_BUF **inputp, uint_t *offp, uint_t *nextp);
+
+#ifdef ICMP_REPLY_ERROR
+
+extern void icmp_error (uint8_t code, T_NET_BUF *data);
+
+#endif	/* of #ifdef ICMP_REPLY_ERROR */
+
+/*
+ *  TINET ç¬èª API
+ */
+
+#ifdef ICMP_CFG_CALLBACK_ECHO_REPLY
+
+extern void icmp_echo_reply (T_NET_BUF *input, uint_t ihoff);
+
+#endif	/* of #ifdef ICMP_CFG_CALLBACK_ECHO_REPLY */
+
+#endif	/* of #ifndef _IP_ICMP_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip_input.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip_input.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip_input.c	(revision 270)
@@ -0,0 +1,600 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)input.c	8.2 (Berkeley) 1/4/94
+ * $FreeBSD: src/sys/netinet/input.c,v 1.111.2.4 1999/11/01 22:23:53 des Exp $
+ *	$ANA: input.c,v 1.5 1996/09/18 14:34:59 wollman Exp $
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+#include <net/net_timer.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet/ip_icmp.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_timer.h>
+#include <netinet/tcp_var.h>
+#include <netinet/udp.h>
+#include <netinet/udp_var.h>
+
+#if defined(SUPPORT_IPSEC)
+//#include <stdio.h>
+#include <sys/types.h>
+#include <netinet6/ipsec.h>
+#include <netinet6/esp.h>
+#include <netkey/key.h>
+#include <netkey/key_debug.h>
+#endif /* of defined(SUPPORT_IPSEC) */
+
+#include <net/if_var.h>
+
+/*
+ *  å¤æ°
+ */
+
+#ifdef SUPPORT_MIB
+
+/*
+ *  SNMP ã® ç®¡çæ
+å ±ãã¼ã¹ (MIB)
+ */
+
+T_IP_STATS ip_stats;
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+#ifdef IP4_CFG_FRAGMENT
+
+/*
+ *  ãã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼
+ */
+
+static T_NET_BUF	*ip_frag_queue[NUM_IP4_FRAG_QUEUE];
+static T_IN4_ADDR	    frag_dst  [NUM_IP4_FRAG_QUEUE];
+
+/*
+ *  é¢æ°
+ */
+
+static void ip_freef (int_t ix);
+static T_NET_BUF *ip_reass (T_IP4_HDR *ip4h, T_NET_BUF *input);
+
+/*
+ *  ip_get_frag_queue -- ãã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼ãç²å¾ããã
+ */
+
+const T_NET_BUF **
+ip_get_frag_queue (void)
+{
+	return (const T_NET_BUF **)ip_frag_queue;
+	}
+
+/*
+ *  ip_freef -- ãã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼ãè§£æ¾ããã
+ */
+
+static void
+ip_freef (int_t ix)
+{
+	T_NET_BUF	*frag, *next;
+
+	frag = ip_frag_queue[ix];
+	while (frag != NULL) {
+		next = GET_QIP4_HDR(frag)->next;
+		syscall(rel_net_buf(frag));
+		frag = next;
+		}
+	ip_frag_queue[ix] = NULL;
+	}
+
+/*
+ *  ip_frag_timer -- ãã¼ã¿ã°ã©ã åæ§æç®¡çã¿ã¤ã
+ */
+
+void
+ip_frag_timer (void)
+{
+	T_NET_BUF	*frag;
+	int_t		ix;
+
+	syscall(wai_sem(SEM_IP4_FRAG_QUEUE));
+	for (ix = NUM_IP4_FRAG_QUEUE; ix -- > 0; ) {
+		frag = ip_frag_queue[ix];
+		if (frag != NULL && GET_QIP4_HDR(frag)->ttl > 0 &&
+		    -- GET_QIP4_HDR(frag)->ttl == 0) {
+			NET_COUNT_IP4(net_count_ip4[NC_IP4_FRAG_IN_TMOUT], 1);
+			NET_COUNT_IP4(net_count_ip4[NC_IP4_FRAG_IN_DROP], 1);
+			ip_freef(ix);
+			}
+		}
+	syscall(sig_sem(SEM_IP4_FRAG_QUEUE));
+	}
+
+/*
+ *  ip_reass -- ãã¼ã¿ã°ã©ã ãåæ§æããã
+ */
+
+static T_NET_BUF *
+ip_reass (T_IP4_HDR *ip4h, T_NET_BUF *input)
+{
+	T_NET_BUF	*frag, *prev;
+	T_IN4_ADDR	dst, src;
+	int_t		ix;
+	uint_t		id, off, len;
+
+	NET_COUNT_IP4(net_count_ip4[NC_IP4_FRAG_IN_FRAGS], 1);
+	NET_COUNT_MIB(ip_stats.ipReasmReqds, 1);
+
+	src = ntohl(ip4h->src);
+	dst = ntohl(ip4h->dst);
+	NTOHS(ip4h->id);
+	NTOHS(ip4h->flg_off);
+	id = ip4h->id;
+	ix = id % NUM_IP4_FRAG_QUEUE;
+
+	syscall(wai_sem(SEM_IP4_FRAG_QUEUE));
+
+	/*
+	 *  IDãIPã¢ãã¬ã¹ãä¸ä½ãã­ãã³ã«ãç°ãªããã©ã°ã¡ã³ããã­ã¥ã¼ã«æãã°ç ´æ£ããã
+	 */
+	frag = ip_frag_queue[ix];
+	if (frag != NULL &&
+	    (id  != GET_IP4_HDR(frag)->id  ||
+	     dst != frag_dst[ix] ||
+	     src != ntohl(GET_IP4_HDR(frag)->src) ||
+	     ip4h->proto != GET_IP4_HDR(frag)->proto)) {
+		NET_COUNT_IP4(net_count_ip4[NC_IP4_FRAG_IN_DROP], 1);
+		NET_COUNT_MIB(ip_stats.ipReasmFails, 1);
+		ip_freef(ix);
+		}
+
+	frag = ip_frag_queue[ix];
+	if (frag == NULL) {
+		NET_COUNT_IP4(net_count_ip4[NC_IP4_FRAG_IN], 1);
+
+		/* æ°è¦ã® ID ãªããå®å
+ã¢ãã¬ã¹ãä¿å­ãã¦ãã­ã¥ã¼ã«ã¤ãªãã*/
+		frag_dst  [ix] = dst;
+		ip_frag_queue[ix] = input;
+		((T_QIP4_HDR *)ip4h)->next = NULL;
+		input = NULL;
+
+		/* åæ§æã¿ã¤ã ã¢ã¦ããè¨­å®ããã*/
+		ip4h->ttl = IP4_FRAGTTL;
+		}
+	else {
+
+		/* æ­£ããä½ç½®ã«æ¿å
+¥ããã*/
+		prev = NULL;
+		while (frag != NULL &&
+		       IP4_FLGOFF_OFF(ip4h->flg_off) >
+		       IP4_FLGOFF_OFF(GET_QIP4_HDR(frag)->flg_off)) {
+			prev = frag;
+			frag = GET_QIP4_HDR(frag)->next;
+			}
+		((T_QIP4_HDR *)ip4h)->next = frag;
+		if (prev == NULL) {
+			ip4h->ttl      = GET_QIP4_HDR(frag)->ttl;
+			ip_frag_queue[ix] = input;
+			}
+		else
+			GET_QIP4_HDR(prev)->next = input;
+		input = NULL;
+
+		/* å
+¨ã¦ã®ãã©ã°ã¡ã³ããæã£ã¦ãããèª¿ã¹ãã*/
+		off = 0;
+		for (frag = ip_frag_queue[ix]; frag != NULL; frag = GET_QIP4_HDR(frag)->next) {
+			if ((IP4_FLGOFF_OFF(GET_QIP4_HDR(frag)->flg_off) << 3) != off) {
+				/* éä¸­ãæãã¦ãããçµäºããã*/
+				syscall(sig_sem(SEM_IP4_FRAG_QUEUE));
+				return NULL;
+				}
+			off += ntohs(GET_QIP4_HDR(frag)->len) - (IP4_VHL_HL(GET_QIP4_HDR(frag)->vhl) << 2);
+			prev = frag;				
+			}
+
+		/* å
+¨ã¦ã®ãã©ã°ã¡ã³ããæã£ããåæ§æããã*/
+		if ((GET_QIP4_HDR(prev)->flg_off & IP4_MF) == 0) {
+
+			/* ãããã¯ã¼ã¯ãããã¡ãç²å¾ããã*/
+			if (tget_net_buf(&input, IF_IP4_HDR_SIZE + off, TMO_IP4_FRAG_GET_NET_BUF) == E_OK) {
+				NET_COUNT_IP4(net_count_ip4[NC_IP4_FRAG_IN_OK], 1);
+				NET_COUNT_MIB(ip_stats.ipReasmOKs, 1);
+
+				/* IPv4 ããããè¨­å®ããã*/
+				frag  = ip_frag_queue[ix];
+				ip4h  = GET_IP4_HDR(input);
+				*ip4h = *GET_IP4_HDR(frag);
+				ip4h->dst     = htonl(frag_dst[ix]);
+				ip4h->len     = htons(IP4_HDR_SIZE + off);
+				ip4h->vhl     = IP4_MAKE_VHL(IPV4_VERSION, IP4_HDR_SIZE >> 2);
+				ip4h->ttl     = GET_QIP4_HDR(prev)->ttl;
+				ip4h->flg_off = ip4h->id = 0;
+
+				/* ãã¼ã¿ã°ã©ã ãåæ§æããã*/
+				off = IP4_HDR_SIZE;
+				while (frag != NULL) {
+					len = ntohs(GET_QIP4_HDR(frag)->len) - (IP4_VHL_HL(GET_QIP4_HDR(frag)->vhl) << 2);
+					memcpy((uint8_t *)ip4h + off, GET_QIP4_SDU(frag), len);
+					off += len;
+					frag = GET_QIP4_HDR(frag)->next;
+					}
+				}
+			else {
+				NET_COUNT_IP4(net_count_ip4[NC_IP4_FRAG_IN_NO_BUF], 1);
+				NET_COUNT_IP4(net_count_ip4[NC_IP4_FRAG_IN_DROP], 1);
+				NET_COUNT_MIB(ip_stats.ipReasmFails, 1);
+				}
+			/* ã­ã¥ã¼ãç©ºã«ããã*/
+			ip_freef(ix);
+			}
+		}
+	syscall(sig_sem(SEM_IP4_FRAG_QUEUE));
+	return input;
+	}
+
+#endif	/* of #ifdef IP4_CFG_FRAGMENT */
+
+/*
+ *  ip_init -- IP ã®åæå
+ */
+
+void
+ip_init (void)
+{
+	in4_init();
+	}
+
+/*
+ *  ip_remove_options -- IPv4 ãããã®ãªãã·ã§ã³ãåé¤ããä»¥éãåã«è©°ããã
+ */
+
+ER
+ip_remove_options (T_NET_BUF *nbuf)
+{
+	T_IP_HDR	*iph;
+
+	iph  = GET_IP_HDR(nbuf);
+
+	if (GET_IP_HDR_SIZE(iph) > IP4_HDR_SIZE) {
+		memmove((char *)iph + IP4_HDR_SIZE, GET_IP_SDU(nbuf),
+		        (size_t)(iph->len - GET_IP_HDR_SIZE(iph)));
+		iph->vhl   = IP4_MAKE_VHL(IPV4_VERSION, IP4_HDR_SIZE >> 2);
+		iph->len  -= (uint16_t)(GET_IP_HDR_SIZE(iph) - IP4_HDR_SIZE);
+		nbuf->len -= (uint16_t)(GET_IP_HDR_SIZE(iph) - IP4_HDR_SIZE);
+		}
+
+	return E_OK;
+	}
+
+/*
+ *  ip_input -- IP ã®å
+¥åé¢æ°
+ */
+
+#if defined(SUPPORT_IPSEC)
+/*
+ * TODO: IPsec SPãæ¤ç´¢ãããã±ããããªã¸ã§ã¯ããããã©ããå¤å®ããå¦çãå®è£
+ãã
+ */
+#endif /* of defined(SUPPORT_IPSEC) */
+
+void
+ip_input (T_NET_BUF *input)
+{
+	T_IP4_HDR	*ip4h;
+	T_IFNET		*ifp = IF_GET_IFNET();
+	T_IN4_ADDR	dst, src, bc;
+	uint_t		hlen, off;
+
+	NET_COUNT_IP4(net_count_ip4[NC_IP4_IN_OCTETS], input->len - IF_HDR_SIZE);
+	NET_COUNT_IP4(net_count_ip4[NC_IP4_IN_PACKETS], 1);
+	NET_COUNT_MIB(ip_stats.ipInReceives, 1);
+
+	/* IP ãããã®é·ãããã§ãã¯ããã*/
+	if (input->len < IF_IP4_HDR_SIZE) {
+		NET_COUNT_IP4(net_count_ip4[NC_IP4_IN_ERR_SHORT], 1);
+		NET_COUNT_MIB(ip_stats.ipInHdrErrors, 1);
+		goto buf_rel;
+		}
+
+	ip4h  = GET_IP4_HDR(input);
+	hlen = GET_IP4_HDR_SIZE(ip4h);
+
+	/* ãã¼ã¸ã§ã³ããã§ãã¯ããã*/
+	if (IP4_VHL_V(ip4h->vhl) != IPV4_VERSION) {
+		NET_COUNT_IP4(net_count_ip4[NC_IP4_IN_ERR_VER], 1);
+		NET_COUNT_MIB(ip_stats.ipInHdrErrors, 1);
+		goto buf_rel;
+		}
+
+	/* IP ãããã®é·ãããã§ãã¯ãããªãã·ã§ã³ãè§£æããã*/
+	if (hlen > IP4_HDR_SIZE) {
+		NET_COUNT_IP4(net_count_ip4[NC_IP4_OPTS], 1);
+		/* %%% ãªãã·ã§ã³ã®è§£æ %%% */
+		}
+
+	/* ãã¼ã¿ã°ã©ã é·ããã§ãã¯ããã*/
+	if (ntohs(ip4h->len) > input->len - IF_HDR_SIZE) {
+		NET_COUNT_IP4(net_count_ip4[NC_IP4_IN_ERR_SHORT], 1);
+		NET_COUNT_MIB(ip_stats.ipInHdrErrors, 1);
+		goto buf_rel;
+		}
+
+	/* ãããã¯ã¼ã¯ãããã¡ã®é·ãããã¼ã¿ã°ã©ã é·ã«èª¿æ´ããã*/
+	input->len = (uint16_t)(ntohs(ip4h->len) + IF_HDR_SIZE);
+
+	/* ãã§ãã¯ãµã ããã§ãã¯ããã*/
+	if (in_cksum(ip4h, hlen) != 0) {
+		NET_COUNT_IP4(net_count_ip4[NC_IP4_IN_ERR_CKSUM], 1);
+		NET_COUNT_MIB(ip_stats.ipInHdrErrors, 1);
+		goto buf_rel;
+		}
+
+	/* IP ãããã®é·ãããã§ãã¯ããä¸ä½ã ICMP ä»¥å¤ã¯ãªãã·ã§ã³ãæ¶å»ããã*/
+	if (hlen > IP4_HDR_SIZE && ip4h->proto != IPPROTO_ICMP) {
+		memset((uint8_t*)ip4h + IP4_HDR_SIZE, 0, hlen - IP4_HDR_SIZE);
+		}
+
+	/* éä¿¡å
+ã¢ãã¬ã¹ããã§ãã¯ããã*/
+	src = ntohl(ip4h->src);
+	bc  = (ifp->in_ifaddr.addr & ifp->in_ifaddr.mask) | ~ifp->in_ifaddr.mask;
+
+#ifdef SUPPORT_LOOP
+
+	if (src == bc || src == IPV4_ADDR_BROADCAST || src == IPV4_ADDRANY) {
+		NET_COUNT_IP4(net_count_ip4[NC_IP4_IN_ERR_ADDR], 1);
+		NET_COUNT_MIB(ip_stats.ipInAddrErrors, 1);
+		goto buf_rel;
+		}
+
+#else	/* of #ifdef SUPPORT_LOOP */
+
+	if (src == ifp->in_ifaddr.addr || src == bc || src == IPV4_ADDR_BROADCAST || src == IPV4_ADDRANY) {
+		NET_COUNT_IP4(net_count_ip4[NC_IP4_IN_ERR_ADDR], 1);
+		NET_COUNT_MIB(ip_stats.ipInAddrErrors, 1);
+		goto buf_rel;
+		}
+
+#endif	/* of #ifdef SUPPORT_LOOP */
+
+	/* ãã¦å
+ã¢ãã¬ã¹ããã§ãã¯ããã*/
+	dst = ntohl(ip4h->dst);
+
+#ifdef DHCP_CFG
+
+	/*
+	 *  DHCP_CFG ãå®ç¾©ããã¦ããã¨ãã¯ãã­ã¼ã«ã«ã¢ãã¬ã¹ãæªå®ç¾©ã®
+	 *  å ´åããã¼ã¿ã°ã©ã ãåä¿¡ããã
+	 */
+
+	if ((ifp->in_ifaddr.addr != IPV4_ADDRANY) &&
+	    (!(dst == ifp->in_ifaddr.addr || dst == bc ||
+	       dst == IPV4_ADDR_BROADCAST || dst == IPV4_ADDRANY))) {
+		NET_COUNT_IP4(net_count_ip4[NC_IP4_IN_ERR_ADDR], 1);
+		NET_COUNT_MIB(ip_stats.ipInAddrErrors, 1);
+		goto buf_rel;
+		}
+
+#else	/* of #ifdef DHCP_CFG */
+
+#if defined(ETHER_CFG_MULTICAST)
+	if (!(dst == ifp->in_ifaddr.addr || dst == bc ||
+		  dst == IPV4_ADDR_BROADCAST || dst == IPV4_ADDRANY ||
+		  IN4_IS_ADDR_MULTICAST(dst))) {
+		NET_COUNT_IP4(net_count_ip4[NC_IP4_IN_ERR_ADDR], 1);
+		NET_COUNT_MIB(ip_stats.ipInAddrErrors, 1);
+		goto buf_rel;
+		}
+#else
+	if (!(dst == ifp->in_ifaddr.addr || dst == bc ||
+	      dst == IPV4_ADDR_BROADCAST || dst == IPV4_ADDRANY)) {
+		NET_COUNT_IP4(net_count_ip4[NC_IP4_IN_ERR_ADDR], 1);
+		NET_COUNT_MIB(ip_stats.ipInAddrErrors, 1);
+		goto buf_rel;
+		}
+#endif
+
+#endif	/* of #ifdef DHCP_CFG */
+
+#ifdef IP4_CFG_FRAGMENT
+
+	/* åå²ããã¦ããããã§ãã¯ããã*/
+	if (ntohs(ip4h->flg_off) & (IP4_MF | IP4_OFFMASK)) {
+		if ((input = ip_reass(ip4h, input)) == NULL)
+			return;
+		}
+
+#else	/* of #ifdef IP4_CFG_FRAGMENT */
+
+	/* åå²ããã¦ããããã§ãã¯ããã*/
+	if (ntohs(ip4h->flg_off) & (IP4_MF | IP4_OFFMASK)) {
+		T_IN4_ADDR	src;
+
+		NET_COUNT_MIB(ip_stats.ipReasmReqds, 1);
+		if ((ntohs(ip4h->flg_off) & IP4_OFFMASK) == 0) {
+			NET_COUNT_MIB(ip_stats.ipReasmFails, 1);
+			}
+		src = ntohl(ip4h->src);
+		syslog(LOG_WARNING, "[IP] flaged src: %s.", ip2str(NULL, &src));
+		goto buf_rel;
+		}
+
+#endif	/* of #ifdef IP4_CFG_FRAGMENT */
+
+	off  = (uint_t)(GET_IP4_SDU(input) - input->buf);
+
+#if defined(SUPPORT_IPSEC)
+	/* ããã§ipsec4_in_rejectãå®è¡ãã */
+	if ((ip4h->proto != IPPROTO_ESP) && ipsec4_in_reject (input)) {
+		goto buf_rel;
+	}
+#endif /* of #if defined(SUPPORT_IPSEC) */
+
+	/* ãã­ãã³ã«ãé¸æãã */
+	switch (ip4h->proto) {
+
+#ifdef SUPPORT_UDP
+	case IPPROTO_UDP:
+		NET_COUNT_MIB(ip_stats.ipInDelivers, 1);
+		udp_input(&input, &off, NULL);
+		return;
+		break;
+#endif	/* of #ifdef SUPPORT_UDP */
+
+#ifdef SUPPORT_TCP
+	case IPPROTO_TCP:
+		NET_COUNT_MIB(ip_stats.ipInDelivers, 1);
+		tcp_input(&input, &off, NULL);
+		return;
+		break;
+#endif	/* of #ifdef SUPPORT_UDP */
+
+	case IPPROTO_ICMP:
+		NET_COUNT_MIB(ip_stats.ipInDelivers, 1);
+		icmp_input(&input, &off, NULL);
+		return;
+		break;
+
+#if defined(SUPPORT_IPSEC)
+	case IPPROTO_ESP:
+		NET_COUNT_MIB(ip_stats.ipInDelivers, 1);
+		esp4_input(input, &off);
+		return;
+		break;
+#endif /* of #if defined(SUPPORT_IPSEC) */
+
+	default:
+		NET_COUNT_IP4(net_count_ip4[NC_IP4_IN_ERR_PROTO], 1);
+		NET_COUNT_MIB(ip_stats.ipInUnknownProtos, 1);
+
+		/* ã­ã¼ã«ã« IP ã¢ãã¬ã¹ã«å±ãããã¼ã¿ã°ã©ã ã®ã¿ ICMP ã¨ã©ã¼ãéç¥ããã*/
+		if (dst == ifp->in_ifaddr.addr) {
+			T_IN4_ADDR	src;
+
+			src = ntohl(ip4h->src);
+			syslog(LOG_INFO, "[IP] unexp proto: %d, src=%s.", ip4h->proto, ip2str(NULL, &src));
+			icmp_error(ICMP4_UNREACH_PROTOCOL, input);
+			}
+		/*
+		 *  icmp_error ã§ã¯ããããã¯ã¼ã¯ãããã¡ input ãè¿å´ããªãã®ã§
+		 *  éæ¾ãã¦ããçµäºããã
+		 */
+		break;
+		}
+
+buf_rel:
+	NET_COUNT_IP4(net_count_ip4[NC_IP4_IN_ERR_PACKETS], 1);
+	syscall(rel_net_buf(input));
+	}
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip_output.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip_output.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip_output.c	(revision 270)
@@ -0,0 +1,345 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)output.c	8.3 (Berkeley) 1/21/94
+ * $FreeBSD: src/sys/netinet/output.c,v 1.85.2.4 1999/08/29 16:29:49 peter Exp $
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_loop.h>
+#include <net/if_ppp.h>
+#include <net/ethernet.h>
+#include <net/ppp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+
+#if defined(SUPPORT_IPSEC)
+#include <netinet6/ipsec.h>
+#endif
+
+static uint16_t frag_id = 0;
+
+/*
+ *  IP output -- IP ã®åºåé¢æ°
+ *
+ *    æ³¨æ: ãã¼ã¸ã§ã³ã¨ãããé·ã¯ä¸ä½å±¤ã§è¨­å®ããã
+ */
+
+ER
+ip_output (T_NET_BUF *output, TMO tmout)
+{
+	T_IP4_HDR	*ip4h;
+	ER		error = E_OK;
+	T_IN4_ADDR	gw;
+
+#ifdef SUPPORT_IPSEC
+	T_SECPOLICY* sp;
+	int ipsec_error;
+        int policy;
+#endif /* SUPPORT_IPSEC */
+
+	NET_COUNT_MIB(ip_stats.ipOutRequests, 1);
+
+#ifdef SUPPORT_IPSEC
+        /* XXX: IPsecã®å¦çã¯ãã±ããæ­çåã®åã«è¡ããã */
+
+	/* SPDãåå¾ãã */
+	sp = ipsec4_getpolicybyaddr(output, IPSEC_DIR_OUTBOUND, &ipsec_error);
+	if (sp==NULL) {
+                error = ipsec_error;
+                return error;
+        }
+
+        /* ããªã·ããã§ãã¯ãã*/
+#if 0
+        switch (sp->policy) {
+
+        case IPSEC_POLICY_BYPASS:
+        case IPSEC_POLICY_NONE:
+        case IPSEC_POLICY_TCP:
+                goto skip_ipsec;
+
+                break; /* NOTREACHED */
+
+        case  IPSEC_POLICY_IPSEC:
+                /* XXX: SH2ã§ã¯ããã§illegal Instructionãçºçãããã³ã³ãã¤ã©ã®ãã°? */
+                if (sp->req == NULL) {
+                        /* éµäº¤æãã¼ã¢ã³ã«å¯¾ãã¦SAã®åå¾ãè¦æ±ãã */
+                        goto bad;
+                }
+                break;
+
+        default:
+                /* ä¸æ­£ãªããªã· */
+                goto bad;
+                break;
+        }
+#else /* 0 */
+        /* XXX: ã³ã³ãã¤ã©ã®ä¸å
+·ååé¿ã®ãã switchãããifæã§æ¸ãç´ãã */
+        policy = sp->spinitb->policy;
+
+        if (policy == IPSEC_POLICY_BYPASS ||
+            policy == IPSEC_POLICY_NONE ||
+            policy == IPSEC_POLICY_TCP)
+                goto skip_ipsec;
+        else if (policy == IPSEC_POLICY_IPSEC) {
+                if (sp->req == NULL)
+                        /* éµäº¤æãã¼ã¢ã³ã«å¯¾ãã¦SAã®åå¾ãè¦æ±ãã */
+                        goto bad;
+        } else
+                goto bad;
+
+#endif /* 0 */
+
+		{
+			T_IPSEC_OUTPUT_STATE state;
+
+			state.m = output;
+			/* XXX: ipsec4_output()å
+ã§ã¯ãip->{len,off}ããããã¯ã¼ã¯ãã¤ããªã¼ãã¨ãã */
+			error = ipsec4_output (&state, sp, 0 /* flags */ );
+			output = state.m;
+
+			if (error) {
+				/* net_buf ã¯ipsec4_outputã«ãã£ã¦æ¢ã«è§£æ¾ããã¦ãã */
+				switch (error) {
+				default:
+					syslog (LOG_NOTICE, "ip_output:%d error", __LINE__);
+				}
+			}
+		}
+
+        /* ipsec4_outputã«å½±é¿ãåããå¤ãæ´æ°ãã */
+        /* XXX: å¿
+è¦ã? */
+
+skip_ipsec:
+#endif /* SUPPORT_IPSEC */
+
+#ifdef IP4_CFG_FRAGMENT
+
+	ip4h = GET_IP4_HDR(output);
+
+	gw = in4_rtalloc(ntohl(ip4h->dst));
+
+	/*
+	 *  ãã¼ã¿ã°ã©ã ãµã¤ãºããããã¯ã¼ã¯ã® MTU ãè¶
+ãã¦ããã°ã
+	 *  åå²ãã¦éä¿¡ããã
+	 */
+	if (ntohs(ip4h->len) > IF_MTU) {
+		T_NET_BUF	*frag;
+		T_IP4_HDR	*fip4h;
+		uint_t		off, hlen, len, flen, align;
+
+		NET_COUNT_IP4(net_count_ip4[NC_IP4_FRAG_OUT], 1);
+		NET_COUNT_MIB(ip_stats.ipFragCreates, 1);
+
+		len  = ntohs(ip4h->len);
+		off  = hlen = GET_IP4_HDR_SIZE(ip4h);
+		while (off < len) {
+			if (off + (IF_MTU - IP4_HDR_SIZE) < len)
+				flen = IF_MTU - IP4_HDR_SIZE;
+			else
+				flen = len - off;
+
+			/* ãã¼ã¿é·ã¯ 4 ãªã¯ãããå¢çã«èª¿æ´ããã	*/
+			align = (flen + 3) >> 2 << 2;
+
+			/* ãããã¯ã¼ã¯ãããã¡ãç²å¾ããã*/
+			if (tget_net_buf(&frag, align + IF_IP4_HDR_SIZE, TMO_IP4_FRAG_GET_NET_BUF) == E_OK) {
+
+				/* ãã©ã°ã¡ã³ããã³ãã¼ããã*/
+				memcpy(GET_IP4_SDU(frag), (uint8_t *)ip4h + off, flen);
+
+				/* ããããåããã*/
+				fip4h		= GET_IP4_HDR(frag);
+				*fip4h		= *ip4h;
+				fip4h->flg_off	= htons(IP4_MAKE_FLGOFF(off + flen == len ? 0 : IP4_MF,
+						                       (off - hlen) >> 3));
+				fip4h->len	= htons(flen + IP4_HDR_SIZE);
+				fip4h->id	= htons(frag_id);
+				fip4h->sum	= 0;
+				fip4h->sum	= in_cksum(fip4h, GET_IP4_HDR_SIZE(fip4h));
+
+				NET_COUNT_IP4(net_count_ip4[NC_IP4_OUT_OCTETS], ntohs(fip4h->len));
+				NET_COUNT_IP4(net_count_ip4[NC_IP4_OUT_PACKETS], 1);
+				NET_COUNT_IP4(net_count_ip4[NC_IP4_FRAG_OUT_FRAGS], 1);
+
+				IF_SET_PROTO(frag, IF_PROTO_IP);
+				if ((error = IF_OUTPUT(frag, &gw, NULL, tmout)) != E_OK) {
+					syscall(rel_net_buf(output));
+					NET_COUNT_IP4(net_count_ip4[NC_IP4_OUT_ERR_PACKETS], 1);
+					NET_COUNT_MIB(ip_stats.ipFragFails, 1);
+					return error;
+					}
+				}
+			else {
+				/* ç²å¾ã§ããªããã°ãéä¿¡ããããããã*/
+				syscall(rel_net_buf(output));
+				NET_COUNT_IP4(net_count_ip4[NC_IP4_OUT_ERR_PACKETS], 1);
+				NET_COUNT_MIB(ip_stats.ipFragFails, 1);
+				return E_NOMEM;
+				}
+
+			off += IF_MTU - IP4_HDR_SIZE;
+			}
+		syscall(rel_net_buf(output));
+		frag_id ++;
+		NET_COUNT_MIB(ip_stats.ipFragOKs, 1);
+		}
+	else {
+
+		/* ããããåããã*/
+		ip4h->id  = htons(frag_id);
+		frag_id ++;
+		ip4h->sum = 0;
+		ip4h->sum = in_cksum(ip4h, GET_IP4_HDR_SIZE(ip4h));
+
+		NET_COUNT_IP4(net_count_ip4[NC_IP4_OUT_OCTETS], ntohs(ip4h->len));
+		NET_COUNT_IP4(net_count_ip4[NC_IP4_OUT_PACKETS], 1);
+
+		IF_SET_PROTO(output, IF_PROTO_IP);
+		if ((error = IF_OUTPUT(output, &gw, NULL, tmout)) != E_OK)
+			NET_COUNT_IP4(net_count_ip4[NC_IP4_OUT_ERR_PACKETS], 1);
+		}
+
+#else	/* of #ifdef IP4_CFG_FRAGMENT */
+
+	ip4h = GET_IP4_HDR(output);
+
+	/* ãã¼ã¿ã°ã©ã ãµã¤ãºããããã¯ã¼ã¯ã® MTU ãè¶
+ãã¦ããã°ã¨ã©ã¼ */
+	if (ntohs(ip4h->len) > IF_MTU)
+		return E_PAR;
+
+	/* ããããåããã*/
+	ip4h->id  = htons(frag_id);
+	frag_id ++;
+	ip4h->sum = 0;
+	ip4h->sum = in_cksum(ip4h, (uint_t)GET_IP4_HDR_SIZE(ip4h));
+
+	NET_COUNT_IP4(net_count_ip4[NC_IP4_OUT_OCTETS], ntohs(ip4h->len));
+	NET_COUNT_IP4(net_count_ip4[NC_IP4_OUT_PACKETS], 1);
+
+#ifdef ETHER_CFG_MULTICAST
+	/* ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ã®å ´åã¯IPã¢ãã¬ã¹ã¯ãã®ã¾ã¾ */
+	gw = ntohl(ip4h->dst);
+	if(!IN4_IS_ADDR_MULTICAST(gw))
+		gw = in4_rtalloc(gw);
+#else
+	gw = in4_rtalloc(ntohl(ip4h->dst));
+#endif
+	IF_SET_PROTO(output, IF_PROTO_IP);
+	if ((error = IF_OUTPUT(output, &gw, NULL, tmout)) != E_OK)
+		NET_COUNT_IP4(net_count_ip4[NC_IP4_OUT_ERR_PACKETS], 1);
+		NET_COUNT_MIB(ip_stats.ipOutDiscards, 1);
+
+#endif	/* of #ifdef IP4_CFG_FRAGMENT */
+
+#ifdef SUPPORT_IPSEC
+	bad:
+#endif /* SUPPORT_IPSEC */
+
+	return error;
+	}
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip_var.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip_var.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/ip_var.h	(revision 270)
@@ -0,0 +1,292 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ip_var.h	8.2 (Berkeley) 1/9/95
+ * $FreeBSD: src/sys/netinet/ip_var.h,v 1.45.2.1 1999/08/29 16:29:51 peter Exp $
+ */
+ 
+#ifndef _IP_VAR_H_
+#define _IP_VAR_H_
+
+/*
+ *  IPv4 ãããã»ãã¤ã­ã¼ãã¢ã¯ã»ã¹ãã¯ã­
+ */
+
+#define IF_IP4_HDR_SIZE			(IF_HDR_SIZE + IP4_HDR_SIZE)
+
+#define GET_IP4_HDR(nbuf)		((T_IP4_HDR*)((nbuf)->buf + IF_HDR_SIZE))
+#define GET_IP4_SDU(nbuf)		((uint8_t*)((nbuf)->buf) + GET_IF_IP4_HDR_SIZE(nbuf))
+
+#define GET_IP4_HDR_SIZE(iph)		((uint8_t)IP4_VHL_HL((iph)->vhl) << 2)
+#define GET_IP4_SDU_SIZE(iph)		(ntohs((iph)->len) - GET_IP4_HDR_SIZE(iph))
+#define GET_IF_IP4_HDR_SIZE(nbuf)	(IF_HDR_SIZE + (GET_IP4_HDR_SIZE(GET_IP4_HDR(nbuf))))
+
+#define SET_IP4_SDU_SIZE(iph,slen)	((iph)->len=(uint16_t)htons((slen) + IP4_HDR_SIZE))
+
+/*
+ *  IPv4 ã¨ IPv6 ãã³ã³ãã¤ã«æã«é¸æããããã®ãã¯ã­
+ */
+
+#if defined(SUPPORT_INET4)
+
+#define T_TCP_IP_Q_HDR			T_TCP_IP4_Q_HDR
+
+#define IF_IP_HDR_SIZE			IF_IP4_HDR_SIZE
+
+#define GET_IP_HDR(nbuf)		GET_IP4_HDR(nbuf)
+#define GET_IP_SDU(nbuf)		GET_IP4_SDU(nbuf)
+
+#define GET_IP_HDR_SIZE(iph)		GET_IP4_HDR_SIZE(iph)
+#define GET_IP_SDU_SIZE(iph)		GET_IP4_SDU_SIZE(iph)
+#define GET_IF_IP_HDR_SIZE(nbuf)	GET_IF_IP4_HDR_SIZE(nbuf)
+
+#define SET_IP_SDU_SIZE(iph,len)	SET_IP4_SDU_SIZE(iph,len)
+
+#define IP_OUTPUT(nbuf,tmout)		ip_output(nbuf,tmout)
+#define IP_INIT()			ip_init()
+#define IP_REMOVE_OPTIONS(nbuf)		ip_remove_options(nbuf)
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+/*
+ *  IP ã® MSS ãµã¤ãºã®ãããã¯ã¼ã¯ãããã¡
+ */
+
+typedef struct t_net_buf_ip_mss {
+	uint16_t	len;	/* ãã¼ã¿ã®é·ã		*/
+	uint8_t		idix;	/* mpfid ã®ã¤ã³ããã¯ã¹	*/
+	uint8_t		flags;	/* ãã©ã°		*/
+#ifdef IF_ETHER_NIC_NET_BUF_ALIGN
+	uint8_t		nalign[IF_ETHER_NIC_NET_BUF_ALIGN];
+#endif
+#if CPU_NET_ALIGN == 4 && IF_HDR_ALIGN != 4
+	uint8_t		halign[4 - IF_HDR_ALIGN];
+#endif
+	uint8_t		buf[IF_HDR_SIZE + IP4_MSS];
+				/* ãããã¡æ¬ä½		*/
+	} T_NET_BUF_IP_MSS;
+
+/*
+ *  65536 ãªã¯ããããµã¤ãºã®ãããã¯ã¼ã¯ãããã¡
+ */
+
+typedef struct t_net_buf4_65536 {
+	uint16_t	len;	/* ãã¼ã¿ã®é·ã		*/
+	uint8_t		idix;	/* mpfid ã®ã¤ã³ããã¯ã¹	*/
+	uint8_t		flags;	/* ãã©ã°		*/
+#ifdef IF_ETHER_NIC_NET_BUF_ALIGN
+	uint8_t		nalign[IF_ETHER_NIC_NET_BUF_ALIGN];
+#endif
+#if CPU_NET_ALIGN == 4 && IF_HDR_ALIGN != 4
+	uint8_t		halign[4 - IF_HDR_ALIGN];
+#endif
+	uint8_t		buf[IF_IP4_HDR_SIZE + 65536];
+				/* ãããã¡æ¬ä½		*/
+#if defined(IF_PDU_HDR_PADDING)
+	uint8_t		padding[IF_PDU_HDR_PADDING];
+#endif				/* ãããã®ä½å		*/
+	} T_NET_BUF4_65536;
+
+#ifdef IP4_CFG_FRAGMENT
+
+/*
+ *  åæ§æã­ã¥ã¼ç¨ IPv4 ãããã®å®ç¾©
+ */
+
+typedef struct t_qip4_hdr {
+	uint8_t		vhl;		/* version << 4 | header length >> 2	*/
+					/* length ã¯ 4 octets åä½		*/
+	uint8_t		type;		/* type of services			*/
+	uint16_t	len;		/* total length				*/
+
+	uint16_t	id;		/* identification			*/
+	uint16_t	flg_off;	/* fragment flag & offset		*/
+
+	uint8_t		ttl;		/* time to live				*/
+	uint8_t		proto;		/* protocol				*/
+	uint16_t	sum;		/* checksum				*/
+
+	uint32_t	src;		/* source address			*/
+
+	T_NET_BUF	*next;		/* æ¬¡ã® IPv4 ãã©ã°ã¡ã³ã			*/
+	} __attribute__((packed, aligned(2)))T_QIP4_HDR;
+
+#define QIP4_HDR_SIZE			(sizeof(T_QIP4_HDR))
+#define IF_QIP4_HDR_SIZE		(IF_HDR_SIZE + QIP4_HDR_SIZE)
+
+#define GET_QIP4_HDR(nbuf)		((T_QIP4_HDR*)((nbuf)->buf + IF_HDR_SIZE))
+#define GET_QIP4_SDU(nbuf)		((uint8_t*)(nbuf)->buf + GET_IF_QIP4_HDR_SIZE(nbuf))
+
+#define GET_QIP4_HDR_SIZE(iph)		((uint8_t)IP4_VHL_HL((iph)->vhl) << 2)
+#define GET_IF_QIP4_HDR_SIZE(nbuf)	(IF_HDR_SIZE + (GET_QIP4_HDR_SIZE(GET_QIP4_HDR(nbuf))))
+
+/*
+ *  ãã¼ã¿ã°ã©ã åæ§æç¨ãããã¯ã¼ã¯ãããã¡
+ */
+
+typedef struct t_net_buf4_reassm {
+	uint16_t	len;	/* ãã¼ã¿ã®é·ã		*/
+	uint8_t		idix;	/* mpfid ã®ã¤ã³ããã¯ã¹	*/
+	uint8_t		flags;	/* ãã©ã°		*/
+#ifdef IF_ETHER_NIC_NET_BUF_ALIGN
+	uint8_t		nalign[IF_ETHER_NIC_NET_BUF_ALIGN];
+#endif
+#if CPU_NET_ALIGN == 4 && IF_HDR_ALIGN != 4
+	uint8_t		align[4 - IF_HDR_ALIGN];
+#endif
+	uint8_t		buf[IP4_CFG_FRAG_REASSM_SIZE];
+				/* ãããã¡æ¬ä½		*/
+	} T_NET_BUF4_REASSM;
+
+#endif	/* of #ifdef IP4_CFG_FRAGMENT */
+
+/*
+ *  TCP ã®åæ§æã­ã¥ã¼ã«ããã IPv4 ãããã®å®ç¾©
+ */
+
+typedef struct t_tcp_ip4_q_hdr {
+	uint8_t		vhl;		/* version << 4 | header length >> 2	*/
+					/* length ã¯ 4 octets åä½		*/
+	uint8_t		type;		/* type of services			*/
+	uint16_t	len;		/* total length				*/
+
+	uint16_t	id;		/* identification			*/
+	uint16_t	flg_off;	/* fragment flag & offset		*/
+
+	uint8_t		ttl;		/* time to live				*/
+	uint8_t		proto;		/* protocol				*/
+	uint16_t	thoff;		/* TCP ãããã®ãªãã»ãã		*/
+
+	T_IN4_ADDR	src;		/* source address			*/
+	T_IN4_ADDR	dst;		/* destination address			*/
+	} __attribute__((packed, aligned(2)))T_TCP_IP4_Q_HDR;
+
+#ifdef SUPPORT_MIB
+
+/*
+ *  SNMP ã® ç®¡çæ
+å ±ãã¼ã¹ (MIB)
+ */
+
+typedef struct t_ip_stats {
+	uint32_t	ipInReceives;
+	uint32_t	ipInHdrErrors;
+	uint32_t	ipInAddrErrors;
+/*	uint32_t	ipForwDatagrams;*/
+	uint32_t	ipInUnknownProtos;
+/*	uint32_t	ipInDiscards;*/
+	uint32_t	ipInDelivers;
+	uint32_t	ipOutRequests;
+	uint32_t	ipOutDiscards;
+/*	uint32_t	ipOutNoRoutes;*/
+
+#ifdef IP4_CFG_FRAGMENT
+
+	uint32_t	ipReasmReqds;
+	uint32_t	ipReasmOKs;
+	uint32_t	ipReasmFails;
+	uint32_t	ipFragOKs;
+	uint32_t	ipFragFails;
+	uint32_t	ipFragCreates;
+
+#else	/* of #ifdef IP4_CFG_FRAGMENT */
+
+	uint32_t	ipReasmReqds;
+/*	uint32_t	ipReasmOKs;*/
+	uint32_t	ipReasmFails;
+/*	uint32_t	ipFragOKs;*/
+/*	uint32_t	ipFragFails;*/
+/*	uint32_t	ipFragCreates;*/
+
+#endif	/* of #ifdef IP4_CFG_FRAGMENT */
+
+} T_IP_STATS;
+
+extern T_IP_STATS ip_stats;
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+/*
+ *  é¢æ°
+ */
+
+extern void ip_frag_timer (void);
+extern void ip_init (void);
+extern ER ip_remove_options (T_NET_BUF *nbuf);
+extern ER ip_output (T_NET_BUF *nbuf, TMO tmout);
+
+#endif	/* of #ifndef _IP_VAR_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp.cfg	(revision 270)
@@ -0,0 +1,72 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  TCP ã§ä½¿ç¨ããã«ã¼ãã«ãªãã¸ã§ã¯ã
+ */
+
+#ifdef SUPPORT_TCP
+
+/* åºåã¿ã¹ã¯ */
+
+CRE_TSK(TCP_OUTPUT_TASK, {
+	TA_HLNG,
+	0,
+	tcp_output_task,
+	TCP_OUT_TASK_PRIORITY,
+	TCP_OUT_TASK_STACK_SIZE,
+	NULL
+	});
+
+/* ã»ããã© */
+
+CRE_SEM(SEM_TCP_POST_OUTPUT,	{ TA_TPRI, 0, 1 });
+CRE_SEM(SEM_TCP_CEP,		{ TA_TPRI, 1, 1 });
+
+#ifdef TCP_CFG_TRACE
+CRE_SEM(SEM_TCP_TRACE,		{ TA_TPRI, 1, 1 });
+#endif	/* of #ifdef TCP_CFG_TRACE */
+
+#endif	/* of #ifdef SUPPORT_TCP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp.h	(revision 270)
@@ -0,0 +1,192 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)tcp.h	8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/netinet/tcp.h,v 1.10.2.1 1999/08/29 16:29:52 peter Exp $
+ */
+ 
+#ifndef _TCP_H_
+#define _TCP_H_
+
+/*
+ *  TCP ããããRFC 793 åç
+§
+ */
+
+typedef struct t_tcp_hdr {
+	uint16_t	sport;		/* éä¿¡å
+ãã¼ãçªå·			*/
+	uint16_t	dport;		/* å®å
+ãã¼ãçªå·			*/
+
+	uint32_t	seq;		/* SEQ çªå·				*/
+
+	uint32_t	ack;		/* ACK çªå·				*/
+
+	uint8_t		doff;		/* ãã¼ã¿ãªãã»ãã(ä¸ä½4ããã)	*/
+	uint8_t		flags;		/* ãã©ã°(ä¸ä½6ããã)			*/
+	uint16_t	win;		/* ã¦ã£ã³ããµã¤ãº			*/
+
+	uint16_t	sum;		/* ãã§ãã¯ãµã 				*/
+	uint16_t	urp;		/* ç·æ¥ãã¤ã³ã¿				*/
+	} __attribute__((packed, aligned(2)))T_TCP_HDR;
+
+#define TCP_HDR_SIZE			(sizeof(T_TCP_HDR))
+
+/*
+ *  TCP ãããæ§é ä½ã¡ã³ãã¢ã¯ã»ã¹ãã¯ã­
+ */
+
+#define TCP_MAKE_DATA_OFF(o)	((uint8_t)(((uint8_t)(o) << 2) & 0xf0))
+#define TCP_DATA_OFF(o)		(((uint8_t)(o) & UINT_C(0xf0)) >> 2)
+#define TCP_HDR_LEN(o)		(TCP_DATA_OFF(o))
+
+/*
+ *  TCP ãããã®ãã©ã°ãã£ã¼ã«ãã®å¤ã®å®ç¾©
+ */
+
+#define TCP_FLG_FIN		UINT_C(0x01)	/* FIN:	æçµ			*/
+#define TCP_FLG_SYN		UINT_C(0x02)	/* SYN:	åæ			*/
+#define TCP_FLG_RST		UINT_C(0x04)	/* RST:	ã³ãã¯ã·ã§ã³ã®ãªã»ãã	*/
+#define TCP_FLG_PUSH		UINT_C(0x08)	/* PUSH:ããã·ã¥æ©è½		*/
+#define TCP_FLG_ACK		UINT_C(0x10)	/* ACK:	è¯å®å¿ç­		*/
+#define TCP_FLG_URG		UINT_C(0x20)	/* URG:	ç·æ¥æ
+å ±		*/
+
+/*
+ *  TCP ãªãã·ã§ã³ã®å®ç¾©
+ */
+
+/* ãªãã·ã§ã³ã®å */
+
+#define TCP_OPT_EOL		UINT_C(0)	/* æçµ				*/
+#define TCP_OPT_NOP		UINT_C(1)	/* ä½ãããªã			*/
+#define TCP_OPT_MAXSEG		UINT_C(2)	/* æå¤§ã»ã°ã¡ã³ãé·		*/
+#define TCP_OPT_WINDOW		UINT_C(3)	/* ã¦ã£ã³ãã¹ã±ã¼ãªã³ã°		*/
+#define TCP_OPT_SACK_PERM	UINT_C(4)	/* é¸æ ACK è¨±å¯		*/
+#define TCP_OPT_SACK		UINT_C(5)	/* é¸æ ACK			*/
+#define TCP_OPT_TIMESTAMP	UINT_C(8)	/* ã¿ã¤ã ã¹ã¿ã³ã		*/
+#define TCP_OPT_CC		UINT_C(11)	/* æ¥ç¶ã«ã¦ã³ã			*/
+#define TCP_OPT_CCNEW		UINT_C(12)	/* æ¥ç¶ã«ã¦ã³ã			*/
+#define TCP_OPT_CCECHO		UINT_C(13)	/* æ¥ç¶ã«ã¦ã³ã			*/
+
+/* ãªãã·ã§ã³ã®é·ã */
+
+#define TCP_OPT_LEN_MAXSEG	4		/* æå¤§ã»ã°ã¡ã³ãé·		*/
+#define TCP_OPT_LEN_WINDOW	3		/* ã¦ã£ã³ãã¹ã±ã¼ãªã³ã°		*/
+#define TCP_OPT_LEN_SACK_PERM	4		/* é¸æ ACK è¨±å¯		*/
+#define TCP_OPT_LEN_SACK	5		/* é¸æ ACK			*/
+#define TCP_OPT_LEN_TIMESTAMP	10		/* ã¿ã¤ã ã¹ã¿ã³ã		*/
+#define TCP_OPT_LEN_CC		6		/* æ¥ç¶ã«ã¦ã³ã			*/
+#define TCP_OPT_LEN_CCNEW	6		/* æ¥ç¶ã«ã¦ã³ã			*/
+#define TCP_OPT_LEN_CCECHO	6		/* æ¥ç¶ã«ã¦ã³ã			*/
+
+/*
+ *  TCP æå¤§ã»ã°ã¡ã³ããµã¤ãº
+ */
+
+/*
+ *  IPv4 ã® TCP æå¤§ã»ã°ã¡ã³ããµã¤ãº
+ *  IP4_MSS ã¯ 576 ã§ãæ¨æºã® IPv4 ãããé· (20) ã¨
+ *  TCP ãããé· (20) ãå¼ããå¤ 536 ã§ãããã512 ãæ¨æºã¨ããã
+ */
+
+#define TCP_MSS			UINT_C(512)
+
+/*
+ *  IPv6 ã® TCP æå¤§ã»ã°ã¡ã³ããµã¤ãº
+ *  IPV6_MMTU ã¯ 1280 ã§ãæ¨æºã® IPv6 ãããé· (40) ã¨
+ *  TCP ãããé· (20) ãå¼ããå¤ 1220 ã§ãããã1024 ãæ¨æºã¨ããã
+ */
+
+#define TCP6_MSS		UINT_C(1024)
+
+/*
+ *  TCP æå°ã»ã°ã¡ã³ããµã¤ãº
+ *
+ *  256ï¼æå°ãªã³ã¯ MTUï¼- 40 = 216
+ */
+
+#define TCP_MINMSS		UINT_C(216)
+
+/*
+ *  TCP æå¤§ã¦ã£ã³ãã¦ãµã¤ãº
+ */
+
+#define MAX_TCP_WIN_SIZE	UINT_C(65535)
+
+#endif	/* of #ifndef _TCP_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_fsm.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_fsm.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_fsm.h	(revision 270)
@@ -0,0 +1,123 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)tcp_fsm.h	8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/netinet/tcp_fsm.h,v 1.10.2.3 1999/11/15 02:52:54 green Exp $
+ */
+ 
+#ifndef _TCP_FSM_H_
+#define _TCP_FSM_H_
+
+/*
+ *  TCP FSM ç¶æ
+ã®å®ç¾©ãRFC 793 åç
+§
+ */
+
+#define TCP_FSM_CLOSED		0	/* ã¯ã­ã¼ãº				*/
+#define TCP_FSM_LISTEN		1	/* ååãªã¼ãã³				*/
+#define TCP_FSM_SYN_SENT	2	/* è½åãªã¼ãã³ãSYN éä¿¡æ¸ã¿		*/
+#define TCP_FSM_SYN_RECVD	3	/* ååãªã¼ãã³ãSYN åä¿¡æ¸ã¿		*/
+#define TCP_FSM_ESTABLISHED	4	/* ã³ãã¯ã·ã§ã³éè¨­å®äº			*/
+#define TCP_FSM_CLOSE_WAIT	5	/* ç¸æãã FIN åä¿¡ãAPP ã®çµäºå¾
+ã¡	*/
+#define TCP_FSM_FIN_WAIT_1	6	/* APP ãçµäºãFIN éä¿¡æ¸ã¿ãACK å¾
+ã¡	*/
+#define TCP_FSM_CLOSING		7	/* åæã¯ã­ã¼ãºãFIN äº¤ææ¸ã¿ãACK å¾
+ã¡	*/
+#define TCP_FSM_LAST_ACK	8	/* APP ãçµäºãACK å¾
+ã¡			*/
+#define TCP_FSM_FIN_WAIT_2	9	/* ç¸æããã® FIN å¾
+ã¡			*/
+#define TCP_FSM_TIME_WAIT	10	/* ç¸æããã® FIN åä¿¡æ¸ã¿ãæéå¾
+ã¡	*/
+
+/*
+ *  é¢æ°ã·ãã¥ã¬ã¼ã·ã§ã³ãã¯ã­
+ */
+
+#define TCP_FSM_HAVE_RCVD_SYN(s)	((s) >= TCP_FSM_SYN_RECVD)
+#define TCP_FSM_HAVE_ESTABLISHED(s)	((s) >= TCP_FSM_ESTABLISHED)
+#define TCP_FSM_HAVE_RCVD_FIN(s)	((s) >= TCP_FSM_TIME_WAIT)
+
+#define TCP_FSM_CAN_SEND_MORE(s)	((s) == TCP_FSM_ESTABLISHED || \
+					 (s) == TCP_FSM_CLOSE_WAIT)
+#define TCP_FSM_CAN_RECV_MORE(s)	((s) == TCP_FSM_ESTABLISHED || \
+					 (s) == TCP_FSM_FIN_WAIT_1  || \
+					 (s) == TCP_FSM_FIN_WAIT_2)
+
+#endif	/* of #ifndef _TCP_FSM_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_input.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_input.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_input.c	(revision 270)
@@ -0,0 +1,2011 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)tcp_input.c	8.12 (Berkeley) 5/24/95
+ * $FreeBSD: src/sys/netinet/tcp_input.c,v 1.82.2.3 1999/10/14 11:49:38 des Exp $
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_var.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet/in_itron.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet/ip_icmp.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_timer.h>
+#include <netinet/tcp_var.h>
+#include <netinet/tcp_fsm.h>
+#include <netinet/tcp_seq.h>
+
+#ifdef SUPPORT_TCP
+
+/*
+ *  æ»ãå¤
+ *
+ *      RET_OK		æ­£å¸¸
+ *	RET_DROP	ã¨ã©ã¼ãã»ã°ã¡ã³ããç ´æ£ããã
+ *	RET_RST_DROP	ã¨ã©ã¼ãRST ãéä¿¡ããã»ã°ã¡ã³ããç ´æ£ããã
+ */
+
+#define RET_OK		(0)
+#define RET_NEED_OUTPUT	(1)
+#define RET_RETURN	(2)
+#define RET_DROP	(-1)
+#define RET_RST_DROP	(-2)
+
+/*
+ *  é¢æ°
+ */
+
+static void close_connection	(T_TCP_CEP *cep, bool_t *needoutput);
+static void set_rexmt_timer	(T_TCP_CEP *cep,  T_TCP_TIME rtt);
+static uint8_t reassemble		(T_NET_BUF *input, T_TCP_CEP *cep, uint_t thoff, uint8_t flags);
+static ER drop_after_ack	(T_NET_BUF *input, T_TCP_CEP *cep, uint_t thoff);
+static ER listening		(T_NET_BUF *input, T_TCP_CEP *cep, uint_t thoff, T_TCP_SEQ iss);
+static ER proc_ack1		(T_NET_BUF *input, T_TCP_CEP *cep, uint_t thoff, bool_t *needoutput);
+static ER proc_ack2		(T_NET_BUF *input, T_TCP_CEP *cep, uint_t thoff, bool_t *needoutput);
+static ER syn_sent		(T_TCP_HDR *tcph,  T_TCP_CEP *cep);
+static void trim_length		(T_TCP_HDR *tcph,  T_TCP_CEP *cep);
+static void parse_option	(T_TCP_HDR *tcph,  T_TCP_CEP *cep);
+static bool_t update_wnd		(T_TCP_HDR *tcph,  T_TCP_CEP *cep);
+static void proc_urg		(T_TCP_HDR *tcph,  T_TCP_CEP *cep);
+
+#if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0
+
+/*
+ *  ã¿ã¹ã¯ããã® Time Wait ç¶æ
+ CEP åé¢æ©è½
+ */
+
+/*
+ *  é¢æ°
+ */
+
+static T_TCP_TWCEP*tcp_find_twcep (T_IN_ADDR *dstaddr,  uint16_t dstport,
+                                   T_IN_ADDR *peeraddr, uint16_t peerport);
+
+/*
+ *  å¤æ°
+ */
+
+T_TCP_TWCEP tcp_twcep[NUM_TCP_TW_CEP_ENTRY];
+
+/*
+ *  tcp_find_twcep -- ãã¼ãçªå·ãã Time Wait ç¨ TCP éä¿¡ç«¯ç¹ãå¾ãã
+ *
+ *    æ³¨æ: dstaddr ã¯ããããã¯ã¼ã¯ãã¤ããªã¼ã
+ */
+
+static T_TCP_TWCEP*
+tcp_find_twcep (T_IN_ADDR *dstaddr, uint16_t dstport, T_IN_ADDR *peeraddr, uint16_t peerport)
+{
+	T_TCP_TWCEP*	twcep;
+	
+	/*
+	 *  ç¶æ
+ã TIME WAIT ã§ã
+	 *  IP ã¢ãã¬ã¹ã¨ãã¼ãçªå·ãä¸è´ããéä¿¡ç«¯ç¹ãæ¢ç´¢ããã
+	 */
+	for (twcep = &tcp_twcep[NUM_TCP_TW_CEP_ENTRY]; twcep -- != tcp_twcep; ) {
+		if (twcep->fsm_state == TCP_FSM_TIME_WAIT                   &&
+		    IN_IS_DSTADDR_ACCEPT (&twcep->myaddr.ipaddr,  dstaddr)  &&
+		    IN_ARE_NET_ADDR_EQUAL(&twcep->dstaddr.ipaddr, peeraddr) &&
+		    dstport  == twcep->myaddr.portno                        &&
+		    peerport == twcep->dstaddr.portno)
+			return twcep;
+		}
+
+	return NULL;
+	}
+
+/*
+ *  å¿
+è¦ãªæ
+å ±ã Time Wait ç¨ TCP éä¿¡ç«¯ç¹ã«ç§»ãã¦ã
+ *  æ¨æºã® TCP éä¿¡ç«¯ç¹ãéæ¾ããã
+ */
+
+void
+tcp_move_twcep (T_TCP_CEP *cep)
+{
+	T_TCP_TWCEP*	twcep;
+
+	/* ç©ºãã® Time Wait ç¨ TCP éä¿¡ç«¯ç¹ãæ¢ç´¢ããã*/
+	for (twcep = &tcp_twcep[NUM_TCP_TW_CEP_ENTRY]; twcep -- != tcp_twcep; ) {
+		if (twcep->fsm_state != TCP_FSM_TIME_WAIT) {
+
+			/*
+			 *  éä¿¡ç«¯ç¹ãã­ãã¯ãã
+			 *  å¿
+è¦ãªæ
+å ±ã Time Wait ç¨ TCP éä¿¡ç«¯ç¹ã«ç§»ãã
+			 */
+			syscall(wai_sem(cep->semid_lock));
+			twcep->rbufsz		= cep->rbufsz;
+			twcep->dstaddr		= cep->dstaddr;
+			twcep->myaddr		= cep->myaddr;
+			twcep->snd_una		= cep->snd_una;
+			twcep->rcv_nxt		= cep->rcv_nxt;
+			twcep->rwbuf_count	= cep->rwbuf_count;
+			twcep->fsm_state	= cep->fsm_state;
+			twcep->timer_2msl	= cep->timer[TCP_TIM_2MSL];
+
+			/* éä¿¡ç«¯ç¹ãã­ãã¯ãè§£é¤ããã*/
+			syscall(sig_sem(cep->semid_lock));
+
+			/* æ¨æº TCP éä¿¡ç«¯ç¹ãéæ¾ããã*/
+			tcp_close(cep);
+
+			break;
+			}
+		}
+	}
+
+#endif	/* of #if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0 */
+
+/*
+ *  parse_option -- TCP ãããã®ãªãã·ã§ã³ãè§£æããã
+ */
+
+static void
+parse_option (T_TCP_HDR *tcph, T_TCP_CEP *cep)
+{
+	uint8_t	*opt, type = 0;
+	uint_t	len, ol, ssize;
+
+	opt = (uint8_t*)tcph + TCP_HDR_SIZE;
+	len = (uint_t)(TCP_HDR_LEN(tcph->doff) - TCP_HDR_SIZE);
+	while (len > 0 && (type = *opt) != TCP_OPT_EOL) {
+		if (type == TCP_OPT_NOP)
+			ol = 1u;
+		else {
+			if (len < 2)
+				break;
+			ol = *(opt + 1);
+			if (ol < 2 || ol > len)
+				break;
+			}
+		switch (type) {
+		case TCP_OPT_NOP:
+			break;
+		case TCP_OPT_MAXSEG:
+			if ((ol == TCP_OPT_LEN_MAXSEG) && (tcph->flags & TCP_FLG_SYN)) {
+				ssize = ntohs(*(uint16_t*)(opt + 2));
+				if (ssize > MAX_TCP_SND_SEG)
+					cep->maxseg = MAX_TCP_SND_SEG;
+				else if (ssize < TCP_MINMSS)
+					cep->maxseg = TCP_MINMSS;
+				else
+					cep->maxseg = ssize;
+				}
+			break;
+
+		case TCP_OPT_WINDOW:
+		case TCP_OPT_SACK_PERM:
+		case TCP_OPT_TIMESTAMP:
+		case TCP_OPT_CC:
+		case TCP_OPT_CCNEW:
+		case TCP_OPT_CCECHO:
+			syslog(LOG_INFO, "[TCP] unsup opt: %d.", type);
+			break;
+
+		default:
+			syslog(LOG_NOTICE, "[TCP] unexp opt: %d.", type);
+			break;
+			}
+		opt += ol;
+		len -= ol;
+		}
+	}
+
+/*
+ *  set_rexmt_timer -- æ°ããå¾å¾©æéãåéããåéã¿ã¤ããæ´æ°ããã
+ */
+
+static void
+set_rexmt_timer (T_TCP_CEP *cep, T_TCP_TIME rtt)
+{
+	T_TCP_TIME delta;
+
+	NET_COUNT_TCP(net_count_tcp[NC_TCP_RTT_UPDATES], 1);
+	if (cep->srtt != 0) {
+		/*
+		 *  srtt: å¹³æ»åããã RTT
+		 *
+		 *  è¨æ¸¬ããã RTT (rtt) ã¨ç¾å¨ã®å¹³æ»åããã RTT (srtt) ã®å·® (delta) ãæ±ããã
+		 *
+		 *  delta ã¯ 2 ãããå·¦ã·ãã ( 4 å) ããå¤ã§ä¿æããã
+		 *  srtt  ã¯ 5 ãããå·¦ã·ãã (32 å) ããå¤ã§ä¿æããã¦ããã
+		 *
+		 *    delta = rtt / 8 - srtt / 8
+		 *
+		 *  æ°ãã srtt ã¯
+		 *
+		 *    srtt = rtt / 8 + srtt * 7 / 8
+		 *         = srtt + (rtt / 8 - srtt / 8)
+		 *
+		 *  ã§è¨ç®ããã
+		 *  ãã®ãããrtt ã 2 ãããå·¦ã·ããããsrtt ã (5 - 2) ãããå³ã·ãããã¦ delta ãæ±ããã
+		 */
+		delta = ((rtt - 1) << TCP_DELTA_SHIFT) - (cep->srtt >> (TCP_SRTT_SHIFT - TCP_DELTA_SHIFT));
+		cep->srtt += delta;
+		if (cep->srtt <= 0)
+			cep->srtt = 1;
+
+		/*
+		 *  delta ã®çµ¶å¯¾å¤ | delta | ãæ±ããã
+		 */
+		if (delta < 0)
+			delta = - delta;
+
+		/*
+		 *  rttvar: å¹³æ»åãããåæ£
+		 *
+		 *  rttvar ã¯ 4 ãããå·¦ã·ãã (16 å) ããå¤ã§ä¿æããã¦ããã
+		 *
+		 *    delta = |delta| / 4 - rttvar / 4
+		 *
+		 *  æ°ãã rttvar ã¯
+		 *
+		 *    rttvar = |delta|/ 4 + rttvar * 3 /4
+		 *           = rttvar + (|delta| / 4 - rttvar / 4)
+		 *
+		 *  ã§è¨ç®ããã
+		 */
+		delta -= cep->rttvar >> (TCP_RTTVAR_SHIFT - TCP_DELTA_SHIFT);
+		cep->rttvar += delta;
+		if (cep->rttvar <= 0)
+			cep->rttvar = 1;
+		}
+	else {
+		/*
+		 *  ã¾ã  srtt ã®è¨­å®ãè¡ããã¦ããªãã¨ãã¯ãä»åè¨æ¸¬ããã RTT ãä½¿ç¨ããã
+		 *  å¹³æ»åããã RTT (srtt) ã«ã¯ãRTT ã 5 ãããå·¦ã·ãã (32å) ããå¤ã
+		 *  å¹³æ»åãããåæ£ (rttvar) ã«ã¯ãRTT ã® 1/2 ã 4 ãããå·¦ã·ãã (16å) ããå¤ã
+		 */
+		cep->srtt   = rtt <<  TCP_SRTT_SHIFT;
+		cep->rttvar = rtt << (TCP_RTTVAR_SHIFT - 1);
+		}
+
+	/*
+	 *  rtt ã®æ¸¬å®ãçµäºããåéåæ°ããªã»ããããã
+	 */
+	cep->rtt = cep->rxtshift = 0;
+
+	/*
+	 *  RTT ã«è¨±ãããæå°å¤ ã¨ rtt + 2 ã®å¤§ããªå¤ã®æ¹ãåéã¿ã¤ã ã¢ã¦ãã®æå°å¤ã«ããã
+	 */
+	if (rtt + 2 < TCP_TVAL_MIN)
+		cep->rxtcur = tcp_range_set(tcp_rexmt_val(cep),
+		                            (T_TCP_TIME)TCP_TVAL_MIN,
+		                            (T_TCP_TIME)TCP_TVAL_MAX_REXMT);
+	else
+		cep->rxtcur = tcp_range_set(tcp_rexmt_val(cep),
+		                            (T_TCP_TIME)(rtt + 2),
+		                            (T_TCP_TIME)TCP_TVAL_MAX_REXMT);
+	}
+
+/*
+ *  reassemble -- åä¿¡ã»ã°ã¡ã³ããåæ§æãããé çªéãã«åä¿¡ããã¨ãã®å¦ç
+ */
+
+static uint8_t
+reassemble (T_NET_BUF *input, T_TCP_CEP *cep, uint_t thoff, uint8_t flags)
+{
+	T_TCP_Q_HDR 	*qhdr;
+	T_TCP_HDR	*tcph;
+
+	tcph = GET_TCP_HDR(input, thoff);
+	if (tcph->sum > cep->rbufsz - cep->rwbuf_count) {
+		/*
+		 *  åä¿¡ã¦ã£ã³ããããã¡ã«ç©ºãããªãã¨ãã¯ç ´æ£ããã
+		 */
+		NET_COUNT_TCP(net_count_tcp[NC_TCP_RECV_DROP_SEGS], 1);
+		syscall(rel_net_buf(input));
+		cep->flags |= TCP_CEP_FLG_ACK_NOW;
+		flags &= ~TCP_FLG_FIN;
+		}
+	else if (tcph->seq == cep->rcv_nxt &&
+	         cep->reassq == NULL &&
+	         cep->fsm_state == TCP_FSM_ESTABLISHED) {
+		/*
+		 *  é çªéãã«ã»ã°ã¡ã³ããåä¿¡ããæã®å¦ç
+		 *  åä¿¡ã»ã°ã¡ã³ãã®ä¸¦ã¹æ¿ãã¯ä¸è¦ãªã®ã§
+		 *  ãã®ã¾ã¾åä¿¡ã¦ã£ã³ããããã¡ã«æ¸ãè¾¼ãã
+		 */
+
+#ifdef TCP_CFG_DELAY_ACK
+
+		cep->flags |= TCP_CEP_FLG_DEL_ACK;
+
+#else/* of #ifdef TCP_CFG_DELAY_ACK */
+
+		cep->flags |= TCP_CEP_FLG_ACK_NOW;
+
+#endif/* of #ifdef TCP_CFG_DELAY_ACK */
+
+		qhdr = GET_TCP_Q_HDR(input, thoff);
+
+		/*  TCP ãããã®ä½ç½®ãä¿å­ããã*/
+		GET_TCP_IP_Q_HDR(input)->thoff = thoff;
+
+		/* SDU ã®ãªãã»ããï¼å
+ã¯ã¦ã£ã³ããµã¤ãºï¼ããªã»ããããã*/
+		qhdr->soff = 0;
+
+		/* ãã¼ã¿ãåä¿¡ã¦ã£ã³ããããã¡ã«æ¸ãè¾¼ãã*/
+		TCP_WRITE_RWBUF(cep, input, thoff);
+		}
+	else {
+		flags = tcp_write_raque(input, cep, thoff, flags);
+		cep->flags |= TCP_CEP_FLG_ACK_NOW;
+		}
+	return flags;
+	}
+
+/*
+ *  listening -- ååãªã¼ãã³ãã¦ï¼ç¶æ
+ã LISTEN ã®å¦ç
+ *
+ *    æ»ãå¤:
+ *      RET_OK		æ­£å¸¸
+ *	RET_DROP	ã¨ã©ã¼ãã»ã°ã¡ã³ããç ´æ£ããã
+ *	RET_RST_DROP	ã¨ã©ã¼ãRST ãéä¿¡ããã»ã°ã¡ã³ããç ´æ£ããã
+ */
+
+static ER
+listening (T_NET_BUF *input, T_TCP_CEP *cep, uint_t thoff, T_TCP_SEQ iss)
+{
+	T_IP_HDR	*iph;
+	T_TCP_HDR	*tcph;
+
+	iph  = GET_IP_HDR(input);
+	tcph = GET_TCP_HDR(input, thoff);
+
+	/* 
+	 *  ãã©ã°ã« RST ãã»ããããã¦ããã°ç ´æ£ããã
+	 */
+	if (tcph->flags & TCP_FLG_RST)
+		return RET_DROP;
+
+	/*  
+	 *  ãã©ã°ã« ACK ãã»ãããã¦ãããã°ã
+	 *  ãªã»ãããéã£ã¦ç ´æ£ããã
+	 */
+	if (tcph->flags & TCP_FLG_ACK)
+		return RET_RST_DROP;
+
+	/* 
+	 *  ãã©ã°ã« SYN ãã»ããããã¦ããªããã°ãã°ç ´æ£ããã
+	 */
+	if ((tcph->flags & TCP_FLG_SYN) == 0)
+		return RET_DROP;
+
+#if defined(SUPPORT_INET4)
+
+#ifdef SUPPORT_LOOP
+
+	/*
+	 *  æ¬¡ã®ã¨ãã¯ç ´æ£ããã
+	 *    ã»ãã¼ãçªå·ãåä¸ã§ãéåä¿¡ IP ã¢ãã¬ã¹ ãåä¸ã
+	 *      ãã ããã­ã¼ã«ã«ã«ã¼ãããã¯ (127.0.0.1) ãªãè¯ãã
+	 *    ã»ãã«ãã­ã£ã¹ãã¢ãã¬ã¹
+	 */
+
+	if (tcph->dport == tcph->sport &&
+	    (iph->dst == iph->src && ntohl(iph->src) != IPV4_ADDR_LOOPBACK))
+		return RET_DROP;
+
+#else	/* of #ifdef SUPPORT_LOOP */
+
+	/*
+	 *  æ¬¡ã®ã¨ãã¯ç ´æ£ããã
+	 *    ã»ãã¼ãçªå·ãåä¸ã§ãéåä¿¡ IP ã¢ãã¬ã¹ ãåä¸ã
+	 *    ã»ãã«ãã­ã£ã¹ãã¢ãã¬ã¹
+	 */
+
+	if (tcph->dport == tcph->sport && iph->dst == iph->src)
+		return RET_DROP;
+
+#endif	/* of #ifdef SUPPORT_LOOP */
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+	/*
+	 *  æ¬¡ã®ã¨ãã¯ç ´æ£ããã
+	 *    ã»ãã¼ãçªå·ãåä¸ã§ãéåä¿¡ IP ã¢ãã¬ã¹ ãåä¸ã
+	 *    ã»ãã«ãã­ã£ã¹ãã¢ãã¬ã¹
+	 */
+
+	if (tcph->dport == tcph->sport && IN_ARE_ADDR_EQUAL(&iph->dst, &iph->src))
+		return RET_DROP;
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+	if (IN_IS_NET_ADDR_MULTICAST(&iph->dst))
+		return RET_DROP;
+
+	/* ç¸æã®ã¢ãã¬ã¹ãè¨é²ããã*/
+	IN_COPY_TO_HOST(&cep->dstaddr.ipaddr, &iph->src);
+	cep->dstaddr.portno = tcph->sport;
+
+	/* ãªãã·ã§ã³ãå¦çããã*/
+	parse_option(tcph, cep);
+
+	/* ã·ã¼ã±ã³ã¹çªå·ãåæåããã*/
+	if (tcp_iss == 0)
+		tcp_init_iss();
+
+	/* èªåã®ã·ã¼ã±ã³ã¹çªå·ã®åæå¤ãè¨é²ããã*/
+	if (iss != 0)
+		cep->iss = iss;
+	else
+		cep->iss = tcp_iss;
+
+	tcp_iss += TCP_ISS_INCR() / 4;
+
+	/* ç¸æã®ã·ã¼ã±ã³ã¹çªå·ã®åæå¤ãè¨é²ããã*/
+	cep->irs = tcph->seq;
+
+	/* éåä¿¡ã·ã¼ã±ã³ã¹çªå·ãåæåããã*/
+	init_send_seq(cep);
+	init_receive_seq(cep);
+
+	/* éä¿¡ã¦ã¤ã³ããµã¤ãºãè¨­å®ããã*/
+	cep->snd_wnd = tcph->win;
+
+	/* æçµè¨­å® */
+	cep->flags    |= TCP_CEP_FLG_ACK_NOW;
+	cep->fsm_state = TCP_FSM_SYN_RECVD;
+	cep->timer[TCP_TIM_KEEP] = TCP_TVAL_KEEP_INIT;
+
+	return RET_OK;
+	}
+
+/*
+ *  syn_sent -- è½åãªã¼ãã³ãã¦ãç¶æ
+ã SYN éä¿¡æ¸ã®å¦ç
+ *
+ *    æ»ãå¤:
+ *      RET_OK		æ­£å¸¸
+ *	RET_DROP	ã¨ã©ã¼ãã»ã°ã¡ã³ããç ´æ£ããã
+ *	RET_RST_DROP	ã¨ã©ã¼ãRST ãéä¿¡ããã»ã°ã¡ã³ããç ´æ£ããã
+ */
+
+static ER
+syn_sent (T_TCP_HDR *tcph, T_TCP_CEP *cep)
+{
+	ER error = RET_OK;
+
+	/*
+	 *  ç¸æããåä¿¡ç¢ºèªãéããã¦æ¥ã¦ãã
+	 *
+	 *    ACK <= iss && éä¿¡ããæå¤§ SEQ (snd_max) < ACK
+	 *
+	 *  ãªãããªã»ãããéã£ã¦ã»ã°ã¡ã³ããç ´æ£ããã
+	 */
+	if ((tcph->flags & TCP_FLG_ACK) &&
+	    (SEQ_LE(tcph->ack, cep->iss) || SEQ_GT(tcph->ack, cep->snd_max)))
+		return RET_RST_DROP;
+
+	/*
+	 *  RST/ACK ãã©ã°ã®å¿ç­ãããã°ããã¼ããéãã¦ããªã
+	 *  ãã¨ãæå³ãã¦ããã
+	 */
+	if (tcph->flags & TCP_FLG_RST) {
+		if (tcph->flags & TCP_FLG_ACK) {
+			cep->net_error = EV_CNNRF;
+			cep = tcp_drop(cep, E_CLS);
+			}
+		return RET_DROP;
+		}
+
+	/*
+	 *  SYN ãã©ã°ããªããã°ã»ã°ã¡ã³ããç ´æ£ããã
+	 */
+	if ((tcph->flags & TCP_FLG_SYN) == 0)
+		return RET_DROP;
+
+	cep->snd_wnd = tcph->win;	/* snd_wnd: ç¸æã®åä¿¡å¯è½ã¦ã£ã³ããµã¤ãº	*/
+	cep->irs     = tcph->seq;	/* irs:     ç¸æã®ã·ã¼ã±ã³ã¹çªå·ã®åæå¤	*/
+	init_receive_seq(cep);		/* éåä¿¡ã·ã¼ã±ã³ã¹çªå·ãåæåããã		*/
+
+	if (tcph->flags & TCP_FLG_ACK) {
+		/*
+		 *  ACK ãã©ã°ãããã¨ãã®å¦ç
+		 *
+		 *  åä¿¡ãæå¾
+ãã¦ããæå¤§ã® SEQ (rcv_adv) ã
+		 *  åä¿¡å¯è½ãªã¦ã£ã³ããµã¤ãº (rcv_wnd) åé²ããã
+		 */
+		cep->rcv_adv += cep->rcv_wnd;	/* rcv_adv: åä¿¡ãæå¾
+ãã¦ããæå¤§ã® SEQ	*/
+						/* rcv_wnd: åä¿¡å¯è½ãªã¦ã£ã³ããµã¤ãº		*/
+
+		/* æªç¢ºèªã®æå°éä¿¡ SEQ (snd_una) ã SYN å (1 ãªã¯ããã) é²ããã*/
+		cep->snd_una ++;
+
+#ifdef TCP_CFG_DELAY_ACK
+
+		if (tcph->sum != 0)		/* tcph->sum ã¯ SDU é· */
+			cep->flags |= TCP_CEP_FLG_DEL_ACK;
+		else
+			cep->flags |= TCP_CEP_FLG_ACK_NOW;
+
+#else/* of #ifdef TCP_CFG_DELAY_ACK */
+
+		cep->flags |= TCP_CEP_FLG_ACK_NOW;
+
+#endif/* of #ifdef TCP_CFG_DELAY_ACK */
+
+		if (cep->flags & TCP_CEP_FLG_NEED_FIN) {
+			/*
+			 *  CEP ã§ FIN éä¿¡ãè¦æ±ããã¦ããã°ã
+			 *  åæ­å¦çãéå§ãã
+			 *  CEP ã®ç¶æ
+ã FIN Wait 1 ã«ããã
+			 */
+			cep->fsm_state = TCP_FSM_FIN_WAIT_1;
+			cep->flags  &= ~TCP_CEP_FLG_NEED_FIN;
+			tcph->flags &= ~TCP_FLG_SYN;
+			}
+		else {
+			/*
+			 *  ç¸æãã ACK ãå¿ç­ãããã®ã§ã
+			 *  CEP ã®ç¶æ
+ã ã³ãã¯ã·ã§ã³éè¨­å®äºç¶æ
+ã«ããã
+			 */
+			cep->timer[TCP_TIM_KEEP] = TCP_TVAL_KEEP_IDLE;
+			cep->fsm_state  = TCP_FSM_ESTABLISHED;
+			NET_COUNT_MIB(tcp_stats.tcpActiveOpens, 1);
+			syscall(set_flg(cep->est_flgid, TCP_CEP_EVT_ESTABLISHED));
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+			if (cep->snd_nblk_tfn == TFN_TCP_CON_CEP) {
+
+				/* ç¸æã®ã¢ãã¬ã¹ãã³ãã¼ããã*/
+				*cep->p_dstaddr = cep->dstaddr;
+
+				if (IS_PTR_DEFINED(cep->callback)) {
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+					NET_COUNT_TCP(net_count_tcp[NC_TCP_CONNECTS], 1);
+					(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, E_OK);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+					ER	error = E_OK;
+
+					NET_COUNT_TCP(net_count_tcp[NC_TCP_CONNECTS], 1);
+					(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, (void*)&error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+					}
+				else {
+					syslog(LOG_WARNING, "[TCP] no call back, CEP: %d.", GET_TCP_CEPID(cep));
+					error = RET_RST_DROP;
+					}
+				cep->p_dstaddr = NULL;
+				cep->snd_tskid = TA_NULL;
+				cep->snd_tfn   = cep->snd_nblk_tfn = TFN_TCP_UNDEF;
+				}
+			else
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+				NET_COUNT_TCP(net_count_tcp[NC_TCP_CONNECTS], 1);
+			}
+		}
+	else {
+		/* ACK ãã©ã°ããªãã¨ãã¯ãACK ãéã£ã¦ãCEP ã®ç¶æ
+ã SYN åä¿¡æ¸ã¿ã«ããã*/
+		cep->flags |= TCP_CEP_FLG_ACK_NOW;
+		cep->timer[TCP_TIM_REXMT] = 0;
+		cep->fsm_state  = TCP_FSM_SYN_RECVD;
+		}
+
+	return error;
+	}
+
+/*
+ *  trim_length -- åä¿¡ãã SDU é·ãèª¿æ´ããã
+ */
+
+static void
+trim_length (T_TCP_HDR *tcph, T_TCP_CEP *cep)
+{
+	tcph->seq ++;
+	if (tcph->sum > cep->rcv_wnd) {		/* æ³¨æ: tcph->sum ã¯ SDU é· */
+		/*
+		 *  SDU é·ãåä¿¡ã¦ã£ã³ããµã¤ãºããå¤§ããã¨ãã¯ãåä¿¡ã¦ã£ã³ããµã¤ãºä»¥éã¯
+		 *  ç ´æ£ããFIN ã«å¿ç­ããªããã¨ã§ãç ´æ£ãããã¼ã¿ãåéãããã
+		 */
+		tcph->sum    = (uint16_t)cep->rcv_wnd;
+		tcph->flags &= ~TCP_FLG_FIN;
+		}
+	cep->snd_wl1 = tcph->seq - 1;		/* cep->snd_wl1: ã¦ã£ã³ãæ´æ° SEQ çªå·	*/
+
+#ifdef TCP_CFG_EXTENTIONS
+	cep->rcv_up  = tcph->seq;		/* cep->rcv_up : åä¿¡ããç·æ¥ãã¤ã³ã¿	*/
+#endif
+	}
+
+/*
+ *  proc_ack2 -- ACK ã®å¦ç (2)
+ *
+ *    æ»ãå¤
+ *
+ *      RET_OK		æ­£å¸¸
+ *      RET_RETURN	æ­£å¸¸ããªã¿ã¼ã³ããã
+ *	RET_DROP	ã¨ã©ã¼ãã»ã°ã¡ã³ããç ´æ£ããã
+ *	RET_RST_DROP	ã¨ã©ã¼ãRST ãéä¿¡ããã»ã°ã¡ã³ããç ´æ£ããã
+ */
+
+static ER
+proc_ack2 (T_NET_BUF *input, T_TCP_CEP *cep, uint_t thoff, bool_t *needoutput)
+{
+	T_TCP_HDR	*tcph;
+	ER		ret = RET_OK;
+	uint32_t	acked;
+	bool_t		ourfinisacked = false;
+
+	tcph = GET_TCP_HDR(input, thoff);
+
+	/*
+	 *  ç¸æã«åä¿¡ç¢ºèªããã ACK ãããã¾ã ç¢ºèªããã¦ããªã
+	 *  æå°éä¿¡ SEQ (snd_una) ãå¼ãã¨ãéä¿¡ã¦ã£ã³ããããã¡ãã
+	 *  åé¤ãã¦ãããªã¯ãããæ° (acked) ã«ãªãã
+	 */
+	acked = tcph->ack - cep->snd_una;
+	NET_COUNT_TCP(net_count_tcp[NC_TCP_RECV_ACKS], 1);
+
+	/*
+	 *  å¾å¾©æéè¨æ¸¬ (rtt) ãè¨­å®ããã¦ãã¦ãè¨æ¸¬éå§ SEQ ãã
+	 *  å¾ã® ACK ãåä¿¡ããããã¿ã¤ãããã¯ãªããã­ã£ã³ã»ã«ãã
+	 *  åéã¿ã¤ããåè¨­å®ããã
+	 */
+	if (cep->rtt && SEQ_GT(tcph->ack, cep->rtseq)) {
+		set_rexmt_timer(cep, cep->rtt);
+		}
+
+	/*
+	 *  å
+¨ã¦ã®æªç¢ºèªãã¼ã¿ã ACK ãããããåéã¿ã¤ããåæ­¢ãã
+	 *  åéãè¨æ¶ãã (ããã«åºåãæç¶)ã
+	 *  ãããACK ãã¹ããããã«å¤ãã®ãã¼ã¿ããããªããåéã¿ã¤ãã«
+	 *  ç¾å¨ã®åéã¿ã¤ã ã¢ã¦ããè¨­å®ããã
+	 */
+	if (tcph->ack == cep->snd_max) {	/* cep->snd_max: éä¿¡ããæå¤§ SEQ */
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+
+		/*
+		 * éä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãæå¹ã®å ´åã¯ã
+		 * éä¿¡æ¸ã¿ã§ãACKãå®äºããã¾ã§åéã¿ã¤ããå¤æ´ããªãã
+		 */
+		if ((cep->flags & TCP_CEP_FLG_WBCS_MASK) == TCP_CEP_FLG_WBCS_ACKED)
+			cep->timer[TCP_TIM_REXMT] = 0;
+
+#else	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+		cep->timer[TCP_TIM_REXMT] = 0;
+
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+		*needoutput = true;
+		}
+	else if (cep->timer[TCP_TIM_PERSIST] == 0) {
+	 	cep->timer[TCP_TIM_REXMT] = cep->rxtcur;	/* cep->rxtcur: ç¾å¨ã®åéã¿ã¤ã ã¢ã¦ã */
+		}
+
+	/* ç¸æãåä¿¡ç¢ºèªãããã¼ã¿ãããã¨ãã®å¦ç */
+	if (acked) {
+		uint32_t cw   = cep->snd_cwnd;	/* cep->snd_cwnd: è¼»è¼³ã¦ã£ã³ããµã¤ãº	*/
+		uint32_t incr = cep->maxseg;		/* cep->maxseg:   æå¤§ã»ã°ã¡ã³ããµã¤ãº	*/
+
+		/*
+		 *  æ°ãã«ç¸æãåä¿¡ç¢ºèªãããã¼ã¿ããã£ãã¨ãã¯ã
+		 *  è¼»è¼³ã¦ã£ã³ããµã¤ãºãå¤§ããããã
+		 *  è¼»è¼³ã¦ã£ã³ããµã¤ãº (snd_cwnd) ã
+		 *  è¼»è¼³ã¦ã£ã³ããµã¤ãºã®ãããå¤ (snd_ssthresh) ããå¤§ããã¨ãã¯
+		 *  è¼»è¼³åé¿å¶å¾¡ãè¡ãã
+		 *
+		 *    snd_cwnd = snd_cwnd + maxseg * maxseg / snd_cwnd;
+		 *
+		 *  ç­ãããå°ããã¨ãã¯ãã¹ã­ã¼ã¹ã¿ã¼ãå¶å¾¡ãè¡ãã
+		 *
+		 *    snd_cwnd = snd_cwnd + maxseg
+		 *
+		 */
+		if (cw > cep->snd_ssthresh)
+			/* è¼»è¼³åé¿å¶å¾¡ */
+			incr = incr * incr / cw;
+
+		if (cw + incr < MAX_TCP_WIN_SIZE)
+			cep->snd_cwnd = (uint16_t)(cw + incr);
+		else
+			cep->snd_cwnd = MAX_TCP_WIN_SIZE;
+
+		/*
+		 *  éä¿¡ã¦ã£ã³ããããã¡ãããç¸æãåä¿¡ç¢ºèªãããã¼ã¿æ° (acked) ã®ãã¼ã¿ãåé¤ããã
+		 */
+		if (acked > cep->swbuf_count) {
+			cep->snd_wnd -= cep->swbuf_count;
+			TCP_DROP_SWBUF(cep, (uint_t)cep->swbuf_count);
+			ourfinisacked = true;
+			}
+		else {
+			cep->snd_wnd -= (uint16_t)acked;
+			TCP_DROP_SWBUF(cep, (uint_t)acked);
+			ourfinisacked = false;
+			}
+
+		/* éä¿¡ã¦ã£ã³ããããã¡ã«ç©ºããã§ãããã¨ãç¥ãããã*/
+		syscall(set_flg(cep->snd_flgid, TCP_CEP_EVT_SWBUF_READY));
+
+		/*
+		 *  ééç¢ºèªããã¦ããªãæå°éä¿¡ SEQ (snd_una) ã
+		 *  ä»åééç¢ºèªããã ACK ã¾ã§é²ãã
+		 *  æ¬¡ã®éä¿¡ãã¼ã¿ã® SEQ (snd_nxt) ããæ°ãã
+		 *  ééç¢ºèªããã¦ããªãæå°éä¿¡ SEQ (snd_una)
+		 *  ã¾ã§é²ããã
+		 */
+		cep->snd_una += acked;
+		if (SEQ_LT(cep->snd_nxt, cep->snd_una))
+			cep->snd_nxt = cep->snd_una;
+
+		/*
+		 *  ç¶æ
+ã«ããåå²
+		 */
+		switch (cep->fsm_state) {
+		case TCP_FSM_FIN_WAIT_1:	/* APP ãçµäºãFIN éä¿¡æ¸ã¿ãACK å¾
+ã¡ */
+			if (ourfinisacked) {
+				cep->fsm_state = TCP_FSM_FIN_WAIT_2;
+				cep->timer[TCP_TIM_2MSL] = TCP_TVAL_KEEP_COUNT * TCP_TVAL_KEEP_INTERVAL;
+				}
+			break;
+		case TCP_FSM_CLOSING:		/* åæã¯ã­ã¼ãºãFIN äº¤ææ¸ã¿ãACK å¾
+ã¡ */
+			if (ourfinisacked) {
+				/*
+				 *  éä¿¡ãã FIN ãç¢ºèªããã¦ããã°ç¶æ
+ãå¤æ´ãã
+				 *  ãã¹ã¦ã®ã¿ã¤ãããªã»ããããå¾ã2MSL ã¿ã¤ããè¨­å®ããã
+				 */
+				cep->fsm_state = TCP_FSM_TIME_WAIT;
+				tcp_cancel_timers(cep);
+				cep->timer[TCP_TIM_2MSL] = 2 * TCP_TVAL_MSL;
+				}
+			break;
+		case TCP_FSM_LAST_ACK:		/* APP ãçµäºãACK å¾
+ã¡ */
+			if (ourfinisacked) {
+				/*
+				 *  éä¿¡ãã FIN ãç¢ºèªããã¦ããã°ãcep ãã¯ã­ã¼ãºãã
+				 *  ã»ã°ã¡ã³ããç ´æ£ããã
+				 */
+				cep = tcp_close(cep);
+				ret = RET_DROP;
+				}
+			break;
+		case TCP_FSM_TIME_WAIT:		/* ç¸æããã® FIN åä¿¡æ¸ã¿ãæéå¾
+ã¡ */
+			/*
+			 *  ç¸æãã FIN ãåéããããããä¸åº¦2MSL ã¿ã¤ããè¨­å®ãã
+			 *  ACK éä¿¡å¾ãã»ã°ã¡ã³ããç ´æ£ããã
+			 */
+			cep->timer[TCP_TIM_2MSL] = 2 * TCP_TVAL_MSL;
+			return drop_after_ack(input, cep, thoff);
+			}
+		}
+
+	return ret;
+	}
+
+/*
+ *  proc_ack1 -- ACK ã®å¦ç (1)
+ *
+ *    æ»ãå¤:
+ *      RET_OK		æ­£å¸¸
+ *      RET_RETURN	æ­£å¸¸ããªã¿ã¼ã³ããã
+ *	RET_DROP	ã¨ã©ã¼ãã»ã°ã¡ã³ããç ´æ£ããã
+ *	RET_RST_DROP	ã¨ã©ã¼ãRST ãéä¿¡ããã»ã°ã¡ã³ããç ´æ£ããã
+ *
+ */
+
+static ER
+proc_ack1 (T_NET_BUF *input, T_TCP_CEP *cep, uint_t thoff, bool_t *needoutput)
+{
+	T_TCP_HDR *tcph = GET_TCP_HDR(input, thoff);
+
+	switch (cep->fsm_state) {
+	case TCP_FSM_SYN_RECVD:		/* SYN ãåä¿¡ããSYN éä¿¡æ¸ã¿	*/
+
+		/* ç¶æ
+ãå¤æ´ããã*/
+		if (cep->flags & TCP_CEP_FLG_NEED_FIN) {
+			cep->fsm_state  = TCP_FSM_FIN_WAIT_1;
+			cep->flags &= ~TCP_CEP_FLG_NEED_FIN;
+			}
+		else {
+			cep->timer[TCP_TIM_KEEP] = TCP_TVAL_KEEP_IDLE;
+			cep->fsm_state  = TCP_FSM_ESTABLISHED;
+
+			/* TCP éä¿¡ç«¯ç¹ããTCP åä»å£ãè§£æ¾ããã*/
+			cep->rep = NULL;
+
+			syscall(set_flg(cep->est_flgid, TCP_CEP_EVT_ESTABLISHED));
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+			if (cep->rcv_nblk_tfn == TFN_TCP_ACP_CEP) {
+
+				/* ç¸æã®ã¢ãã¬ã¹ãã³ãã¼ããã*/
+				*cep->p_dstaddr = cep->dstaddr;
+
+				if (IS_PTR_DEFINED(cep->callback)) {
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+					NET_COUNT_MIB(tcp_stats.tcpPassiveOpens, 1);
+					NET_COUNT_TCP(net_count_tcp[NC_TCP_ACCEPTS], 1);
+					(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, E_OK);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+					ER	error = E_OK;
+
+					NET_COUNT_MIB(tcp_stats.tcpPassiveOpens, 1);
+					NET_COUNT_TCP(net_count_tcp[NC_TCP_ACCEPTS], 1);
+					(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)&error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+					cep->p_dstaddr = NULL;
+					cep->rcv_tskid = TA_NULL;
+					cep->rcv_tfn   = cep->rcv_nblk_tfn = TFN_TCP_UNDEF;
+					}
+				else {
+					syslog(LOG_WARNING, "[TCP] no call back, CEP: %d.", GET_TCP_CEPID(cep));
+					cep->p_dstaddr = NULL;
+					cep->rcv_tskid = TA_NULL;
+					cep->rcv_tfn   = cep->rcv_nblk_tfn = TFN_TCP_UNDEF;
+					return RET_RST_DROP;
+					}
+				}
+
+			if (cep->snd_nblk_tfn == TFN_TCP_CON_CEP) {
+
+				/* ç¸æã®ã¢ãã¬ã¹ãã³ãã¼ããã*/
+				*cep->p_dstaddr = cep->dstaddr;
+
+				if (IS_PTR_DEFINED(cep->callback)) {
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+					NET_COUNT_MIB(tcp_stats.tcpActiveOpens, 1);
+					NET_COUNT_TCP(net_count_tcp[NC_TCP_CONNECTS], 1);
+					(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, E_OK);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+					ER	error = E_OK;
+
+					NET_COUNT_MIB(tcp_stats.tcpActiveOpens, 1);
+					NET_COUNT_TCP(net_count_tcp[NC_TCP_CONNECTS], 1);
+					(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, (void*)&error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+					cep->p_dstaddr = NULL;
+					cep->snd_tskid = TA_NULL;
+					cep->snd_tfn   = cep->snd_nblk_tfn = TFN_TCP_UNDEF;
+					}
+				else {
+					syslog(LOG_WARNING, "[TCP] no call back, CEP: %d.", GET_TCP_CEPID(cep));
+					cep->p_dstaddr = NULL;
+					cep->snd_tskid = TA_NULL;
+					cep->snd_tfn   = cep->snd_nblk_tfn = TFN_TCP_UNDEF;
+					return RET_RST_DROP;
+					}
+				}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+			if (cep->rcv_tfn == TFN_TCP_ACP_CEP) {
+				NET_COUNT_MIB(tcp_stats.tcpPassiveOpens, 1);
+				NET_COUNT_TCP(net_count_tcp[NC_TCP_ACCEPTS], 1);
+				}
+
+			if (cep->snd_tfn == TFN_TCP_CON_CEP) {
+				NET_COUNT_MIB(tcp_stats.tcpActiveOpens, 1);
+				NET_COUNT_TCP(net_count_tcp[NC_TCP_CONNECTS], 1);
+				}
+			}
+
+		/*
+		 *  SDU ããªã FIN ãã¤ãã¦ããªããã°ãtcp_move_ra2rw() ãå¼åºãã
+		 */
+		if (tcph->sum == 0 && (tcph->flags & TCP_FLG_FIN) == 0)		/* tcph->sum ã¯ SDU é· */
+			tcph->flags = tcp_move_ra2rw(cep, tcph->flags);
+		
+		cep->snd_wl1 = tcph->seq - 1;	/* snd_wl1: ã¦ã£ã³ãæ´æ° SEQ */
+
+		/* break; ä¸ã«è½ã¡ãã*/
+	
+	case TCP_FSM_ESTABLISHED:	/* ã³ãã¯ã·ã§ã³éè¨­å®äº		*/
+	case TCP_FSM_FIN_WAIT_1:	/* çµäºãã¦ãFIN éä¿¡æ¸ã¿		*/
+	case TCP_FSM_FIN_WAIT_2:	/* çµäºãFIN ä¼éç¢ºèªåä¿¡ãFINå¾
+ã¡*/
+	case TCP_FSM_CLOSE_WAIT:	/* FIN åä¿¡ãã¯ã­ã¼ãºå¾
+ã¡		*/
+	case TCP_FSM_CLOSING:		/* çµäºãFIN äº¤ææ¸ã¿ãACK å¾
+ã¡	*/
+	case TCP_FSM_LAST_ACK:		/* FIN åä¿¡ãçµäºãACK å¾
+ã¡	*/
+	case TCP_FSM_TIME_WAIT:		/* çµäºãæéå¾
+ã¡		*/
+
+		if (SEQ_LE(tcph->ack, cep->snd_una)) {
+
+			/*
+			 *  åä¿¡ç¢ºèª ACK ã æªç¢ºèªã®æå°éä¿¡ SEQ (snd_una) ã¨åããä»¥åã®ã¨ãã®å¦ç
+			 *  ã¤ã¾ããå¤éã« ACK ãåä¿¡ãããã¨ãæå³ãã¦ããã
+			 */
+
+			if (tcph->sum == 0 && tcph->win == cep->snd_wnd) {	/* tcph->sum ã¯ SDU é· */
+
+				/*
+				 *  SDU ããªããç¸æã®ã¦ã£ã³ããµã¤ãºãå¤æ´ããã¦ããªããã°ã
+				 *  ãã§ã«éä¿¡ããã»ã°ã¡ã³ãã®ä¸­ã§ãACK (tcph->ack) ã¨
+				 *  åã SEQ ããå§ã¾ãã»ã°ã¡ã³ãããéä¸­ã§æ¶å¤±ããå¯è½æ§ãããã
+				 *  ãã®å ´åã¯ãé«éåè»¢éã¨é«éãªã«ããªãè¡ãã
+				 */
+				NET_COUNT_TCP(net_count_tcp[NC_TCP_RECV_DUP_ACKS], 1);
+
+				if (cep->timer[TCP_TIM_REXMT] == 0 || tcph->ack != cep->snd_una) {
+
+					/*
+					 *  åéã¿ã¤ããã»ããããã¦ããªãã¨ãã
+					 *  ã¾ãã¯ãACK (tcph->ack) ã¨æªç¢ºèªã®æå°éä¿¡ SEQã
+					 *  ä¸è´ããªãã¨ãã¯ãå¤é ACK æ°ã 0 ã«ããã
+					 */
+					cep->dupacks = 0;
+					}
+
+				else if (++ cep->dupacks == MAX_TCP_REXMT_THRESH) {
+
+					/*
+					 *  å¤é ACK æ°ããããå¤ (æ¨æº 3) ã«ãªã£ãã
+					 *  é«éåè»¢éå¦çãéå§ããã
+					 */
+					uint_t		win;
+
+					/*
+					 *  è¼»è¼³ã¦ã£ã³ããµã¤ãº(snd_cwnd)ã®ãããå¤ãè¨­å®ããã
+					 *
+					 *    ç¸æã®åä¿¡å¯è½ã¦ã£ã³ããµã¤ãº (snd_wnd) ã
+					 *    è¼»è¼³ã¦ã£ã³ããµã¤ãº (snd_cwnd) ã® 1/2ã
+					 *    ãã ãã2 * maxseg ä»¥ä¸ã
+					 *
+					 */
+					if (cep->snd_wnd < cep->snd_cwnd)
+						win = cep->snd_wnd / 2 / cep->maxseg;
+					else
+						win = cep->snd_cwnd / 2 / cep->maxseg;
+					if (win < 2)
+						win = 2;
+					cep->snd_ssthresh = win * cep->maxseg;
+
+					/* åéã¿ã¤ãã¨å¾å¾©æéããªã»ããããã*/
+					cep->timer[TCP_TIM_REXMT] = 0;
+					cep->rtt = 0;
+
+					/* æ¶å¤±ããã»ã°ã¡ã³ããéä¿¡ããã*/
+					cep->snd_old_nxt = cep->snd_nxt;
+					cep->snd_nxt     = tcph->ack;
+					cep->snd_cwnd    = cep->maxseg;
+
+					/*
+					 *  snd_nxt ãå
+ã«æ»ãããã«è¨­å®ãã¦
+					 *  éä¿¡ãæç¤ºããã
+					 */
+					cep->flags |=  TCP_CEP_FLG_POST_OUTPUT |
+					               TCP_CEP_FLG_FORCE       |
+					               TCP_CEP_FLG_FORCE_CLEAR |
+					               TCP_CEP_FLG_RESTORE_NEXT_OUTPUT;
+					sig_sem(SEM_TCP_POST_OUTPUT);
+
+					/* è¼»è¼³ã¦ã£ã³ããµã¤ãºãæ´æ°ããã*/
+					cep->snd_cwnd = (uint16_t)(cep->snd_ssthresh
+					                   + cep->maxseg * cep->dupacks);
+					
+					return RET_DROP;
+					}
+
+				else if (cep->dupacks > MAX_TCP_REXMT_THRESH) {
+
+					/*
+					 *  å¤é ACK æ°ããããå¤ (æ¨æº 3) ãè¶
+ããã
+					 *  è¼»è¼³ã¦ã£ã³ããµã¤ãºãå¢å ããªããåéããã
+					 */
+					cep->snd_cwnd += cep->maxseg;
+
+					/* éä¿¡ãæç¤ºããã*/
+					cep->flags |=  TCP_CEP_FLG_POST_OUTPUT;
+					sig_sem(SEM_TCP_POST_OUTPUT);
+
+					return RET_DROP;
+					}
+				} 
+			else
+				cep->dupacks = 0;
+			break;
+			}
+
+		/*
+		 *  åä¿¡ç¢ºèª ACK ã æªç¢ºèªã®æå°éä¿¡ SEQ (snd_una) ä»¥éã®ã¨ãã®å¦ç
+		 */
+		if (cep->dupacks >= MAX_TCP_REXMT_THRESH && cep->snd_cwnd > cep->snd_ssthresh)
+		 	/*
+			 *  é«éåè»¢éãè¡ã£ã¦ããã¨ãã¯ãè¼»è¼³ã¦ã£ã³ããµã¤ãºããããå¤ã¾ã§æ»ãã
+			 */
+			cep->snd_cwnd = (uint16_t)cep->snd_ssthresh;
+	
+		cep->dupacks = 0;
+
+		if (SEQ_GT(tcph->ack, cep->snd_max))
+			/*
+			 *  åä¿¡ãã ACK ãéä¿¡ããæå¤§ SEQ ãè¶
+ãã¦ããã¨ãã®å¦ç
+			 */
+			return drop_after_ack(input, cep, thoff);
+
+		if (cep->flags & TCP_CEP_FLG_NEED_SYN) {
+			/*
+			 *  SYN éä¿¡è¦æ±ãåãæ¶ãã¦ãæªç¢ºèªã®æå°éä¿¡ SEQ ãé²ããã
+			 */
+			cep->flags &= ~TCP_CEP_FLG_NEED_SYN;
+			cep->snd_una ++;
+			}
+		
+		return proc_ack2(input, cep, thoff, needoutput);
+		break;
+		}
+	return RET_OK;
+	}
+
+/*
+ *  update_wnd -- ã¦ã£ã³ããµã¤ãºãæ´æ°ããã
+ *
+ *    æ»ãå¤: éä¿¡ãå¿
+è¦ãªã true ãè¿ãã
+ */
+
+static bool_t
+update_wnd (T_TCP_HDR *tcph, T_TCP_CEP *cep)
+{
+
+	/*
+	 *  æ´æ°æ¡ä»¶
+	 *
+	 *    ACK ãã©ã°ãã»ããããã¦ãã &&
+	 *    (ååã¦ã£ã³ããæ´æ°ãã SEQ (snd_wl1) ã SEQ ããå ||
+	 *     ååã¦ã£ã³ããæ´æ°ãã SEQ (snd_wl1) ã SEQ ã¨åã &&
+	 *     (ååã¦ã£ã³ããæ´æ°ãã ACK (snd_wl2) ã ACK ããå ||
+	 *      (ååã¦ã£ã³ããæ´æ°ãã ACK (snd_wl2) ã ACK ã¨åã &&
+	 *       WIN ãç¸æã®åä¿¡å¯è½ã¦ã£ã³ããµã¤ãº (snd_wnd) ããå¤§ãã
+	 *       )
+	 *      )
+	 *     )
+	 */
+	if ((tcph->flags & TCP_FLG_ACK) &&
+	    (SEQ_LT(cep->snd_wl1, tcph->seq) ||
+	     (cep->snd_wl1 == tcph->seq &&
+	      (SEQ_LT(cep->snd_wl2, tcph->ack) ||
+	       (cep->snd_wl2 == tcph->ack && tcph->win > cep->snd_wnd))))) {
+
+		cep->snd_wnd = tcph->win;
+		cep->snd_wl1 = tcph->seq;
+		cep->snd_wl2 = tcph->ack;
+
+		if (cep->snd_wnd > cep->max_sndwnd)
+			/* ä»ã¾ã§ã®æå¤§éä¿¡ã¦ã£ã³ããµã¤ãºãæ´æ°ããã*/
+			cep->max_sndwnd = cep->snd_wnd;
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+
+		if ((cep->flags & TCP_CEP_FLG_WBCS_MASK) == TCP_CEP_FLG_WBCS_WOPEN_PEND) {
+
+			/*
+			 *  éä¿¡ã¦ã£ã³ããããã¡ç¨ã®ãããã¯ã¼ã¯ãããã¡å²ãå½ã¦ä¸­ã§ã
+			 *  ç¸æã®åä¿¡ã¦ã£ã³ããç©ºãã®ãå¾
+ã£ã¦ããã¨ãã®å¦ç
+			 */
+			if (cep->snd_wnd > 0) {
+
+				/*
+				 *  ç¸æã®åä¿¡ã¦ã£ã³ããç©ºããã¨ãã¯ã
+				 *  éä¿¡ã¦ã£ã³ããããã¡ç¨ã®ãããã¯ã¼ã¯ãããã¡å²ãå½ã¦ãåéããã
+				 */
+				cep->flags = (cep->flags & ~TCP_CEP_FLG_WBCS_MASK)
+				                         |  TCP_CEP_FLG_WBCS_FREE |  TCP_CEP_FLG_POST_OUTPUT;
+				sig_sem(SEM_TCP_POST_OUTPUT);
+				}
+			}
+
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+		return true;
+		}
+	else
+		return false;
+	}
+
+/*
+ *  proc_urg -- ç·æ¥ãã¼ã¿ã¤ãã®ã»ã°ã¡ã³ãã®å¦ç
+ */
+
+#ifdef TCP_CFG_EXTENTIONS
+
+static void
+proc_urg (T_TCP_HDR *tcph, T_TCP_CEP *cep)
+{
+	if ((tcph->flags & TCP_FLG_URG) && VALID_URG_POINTER(tcph->urp) &&
+	    TCP_FSM_HAVE_RCVD_FIN(cep->fsm_state) == 0) {
+
+		/* ç·æ¥ãã¼ã¿ã¤ãã®ã»ã°ã¡ã³ãã®å¦ç */
+
+		NET_COUNT_TCP(net_count_tcp[NC_TCP_RECV_URG_SEGS], 1);
+		if (tcph->urp + cep->rwbuf_count > cep->rbufsz) {
+
+			/*
+			 *  ç·æ¥ãã¤ã³ã¿ã®ä½ç½®ãåä¿¡ã¦ã£ã³ããããã¡ã®
+			 *  ç¯å²ãè¶
+ããã¨ãã¯ä½ãããªãã
+			 */
+			tcph->urp    = 0;
+			tcph->flags &= ~TCP_FLG_URG;
+			}
+
+		if (SEQ_GT(tcph->seq + tcph->urp, cep->rcv_up))
+			/* ç·æ¥ãã¤ã³ã¿ãæ´æ°ãããã¨ãã®å¦ç */
+			cep->rcv_up = tcph->seq + tcph->urp;
+
+		if ((tcph->flags & TCP_FLG_URG) && (tcph->urp + TCP_CFG_URG_OFFSET) < tcph->sum) {	/* tcph->sum ã¯ TCP ã® SDU é· */
+
+			/*
+			 *  ç·æ¥ãã¤ã³ã¿ã®ä½ç½®ããä»ååä¿¡ããã»ã°ã¡ã³ãå
+ã®å ´åã¯ã
+			 *  ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã
+			 */
+			cep->urg_tcph = tcph;
+			if (IS_PTR_DEFINED(cep->callback)) {
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+				(*cep->callback)(GET_TCP_CEPID(cep), TEV_TCP_RCV_OOB, (void*)(uint32_t)1);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				uint32_t	len = 1;
+
+				(*cep->callback)(GET_TCP_CEPID(cep), TEV_TCP_RCV_OOB, (void*)&len);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				}
+			else {
+				syslog(LOG_WARNING, "[TCP] no call back for OOB, CEP: %d.", GET_TCP_CEPID(cep));
+				}
+
+			if (cep->urg_tcph != NULL) {
+				/* ã³ã¼ã«ããã¯é¢æ°å
+ã§ tcp_rcv_oob() ãå¼åºããªãã£ãã*/
+				cep->urg_tcph = NULL;
+				tcph->urp = 0;
+				}
+			else {
+				/* 
+				 *  ã³ã¼ã«ããã¯é¢æ°å
+ã§ tcp_rcv_oob() ãå¼åºããæã¯ã
+				 *  SDU é·ã®è£æ­£å¤ãè¨­å®ããã
+				 */
+				tcph->urp = 1;
+				}
+			}
+		else if (tcph->urp > 0) {
+			tcph->urp = 0;
+			}
+
+		}
+	else if (SEQ_GT(cep->rcv_nxt, cep->rcv_up)) {
+		cep->rcv_up = cep->rcv_nxt;
+		tcph->urp = 0;
+		}
+	}
+
+#else	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+static void
+proc_urg (T_TCP_HDR *tcph, T_TCP_CEP *cep)
+{
+	tcph->urp = 0;
+	}
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+/*
+ *  drop_after_ack -- åä¿¡ã»ã°ã¡ã³ããç ´æ£ããå¾ãACK ãè¿ã (æ³¨æ: ååã¨ã¯åã£ã¦ããªã)ã
+ *
+ *    æ»ãå¤:
+ *      RET_RETURN	æ­£å¸¸ããªã¿ã¼ã³ããã
+ *	RET_RST_DROP	ã¨ã©ã¼ãRST ãéä¿¡ããã»ã°ã¡ã³ããç ´æ£ããã
+ */
+
+static ER
+drop_after_ack (T_NET_BUF *input, T_TCP_CEP *cep, uint_t thoff)
+{
+	T_TCP_HDR *tcph = GET_TCP_HDR(input, thoff);
+
+	/*
+	 *    SYN åä¿¡ç¶æ
+ã§ãACK ãééç¢ºèªããã¦ããªãæå°éä¿¡ SEQ (snd_una) ãã
+	 *    åã®å¤ããéä¿¡ãããæå¤§ SEQ (snd_max) ããå¾ã®å¤ã®å ´åã¯ãç¸æã« RST ã
+	 *    éã£ã¦çµäºãããããã¯ã"LAND" DoS æ»æã¸ã®é²å¾¡ã§ãããå½é ããã SYN
+	 *    ã»ã°ã¡ã³ããéä¿¡ãã¤ã¥ãããã¼ãéã§ã® ACK ã¹ãã¼ã ãé²ãã
+	 */
+	if (cep->fsm_state == TCP_FSM_SYN_RECVD && (tcph->flags & TCP_FLG_ACK) &&
+	    (SEQ_GT(cep->snd_una, tcph->ack) ||
+	     SEQ_GT(tcph->ack, cep->snd_max)))
+		return RET_RST_DROP;
+
+	syscall(rel_net_buf(input));
+
+	/* éä¿¡ãæç¤ºããã*/
+	cep->flags |=  TCP_CEP_FLG_ACK_NOW | TCP_CEP_FLG_POST_OUTPUT;
+	sig_sem(SEM_TCP_POST_OUTPUT);
+	return RET_RETURN;
+	}
+
+/*
+ *  close_connection -- ã³ãã¯ã·ã§ã³éæ¾å¦çãç¸æãã FIN ãåä¿¡ããã
+ */
+
+static void
+close_connection (T_TCP_CEP *cep, bool_t *needoutput)
+{
+	if (TCP_FSM_HAVE_RCVD_FIN(cep->fsm_state) == 0) {
+
+#ifdef TCP_CFG_DELAY_ACK
+
+		if (cep->flags & TCP_CEP_FLG_NEED_SYN)
+			cep->flags |= TCP_CEP_FLG_DEL_ACK;
+		else
+			cep->flags |= TCP_CEP_FLG_ACK_NOW;
+
+#else/* of #ifdef TCP_CFG_DELAY_ACK */
+
+		cep->flags |= TCP_CEP_FLG_ACK_NOW;
+
+#endif/* of #ifdef TCP_CFG_DELAY_ACK */
+
+		cep->rcv_nxt ++;
+		}
+
+	switch (cep->fsm_state) {
+	case TCP_FSM_SYN_RECVD:		/* SYN ãåä¿¡ããSYN éä¿¡æ¸ã¿	*/
+	case TCP_FSM_ESTABLISHED:	/* ã³ãã¯ã·ã§ã³éè¨­å®äº		*/
+		cep->fsm_state = TCP_FSM_CLOSE_WAIT;
+		break;
+
+	case TCP_FSM_FIN_WAIT_1:	/* APP ãçµäºãFIN éä¿¡æ¸ã¿ãACK å¾
+ã¡ */
+		cep->fsm_state = TCP_FSM_CLOSING;
+		break;
+
+	case TCP_FSM_FIN_WAIT_2:	/* ç¸æããã® FIN å¾
+ã¡ */
+		cep->fsm_state = TCP_FSM_TIME_WAIT;
+		tcp_cancel_timers(cep);
+		cep->timer[TCP_TIM_2MSL] = 2 * TCP_TVAL_MSL;
+
+		/*
+		 *  FIN WAIT 2 ç¶æ
+ã§ã¯ã
+		 *  åä¿¡ã¯å¯è½ã§ãããããã§ã«éä¿¡ã¯çµäºãã¦ããã
+		 *  ç¸æã®éä¿¡ãçµäºããã®ã§ãå
+¥åã¿ã¹ã¯ã®ã¿èµ·åºããã
+		 */
+		syscall(set_flg(cep->snd_flgid, TCP_CEP_EVT_SWBUF_READY));
+
+#if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0
+
+		/* ç¸æããã® FIN ã«å¯¾ãã¦å¿ç­ãè¿ãã*/
+		tcp_respond(NULL, cep, cep->rcv_nxt, cep->snd_una,
+		            cep->rbufsz - cep->rwbuf_count, TCP_FLG_ACK);
+		cep->flags &= ~TCP_CEP_FLG_ACK_NOW;
+		*needoutput = false;
+
+		/*
+		 *  å¿
+è¦ãªæ
+å ±ã Time Wait ç¨ TCP éä¿¡ç«¯ç¹ã«ç§»ãã¦ã
+		 *  æ¨æºã® TCP éä¿¡ç«¯ç¹ãéæ¾ããã
+		 */
+		tcp_move_twcep(cep);
+
+#endif	/* of #if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0 */
+
+		break;
+
+	case TCP_FSM_TIME_WAIT:		/* ç¸æããã® FIN åä¿¡æ¸ã¿ãæéå¾
+ã¡ */
+		cep->timer[TCP_TIM_2MSL] = 2 * TCP_TVAL_MSL;
+		break;
+		}
+	}
+
+/*
+ *  tcp_input -- TCP ã®å
+¥åé¢æ°
+ *
+ *	æ³¨æ: input ã«ã¯ IF ãããã¨ IP ããããå
+é ­ã«ããã
+ */
+
+uint_t
+tcp_input (T_NET_BUF **inputp, uint_t *offp, uint_t *nextp)
+{
+	T_NET_BUF	*input = *inputp;
+	T_IP_HDR	*iph;
+	T_TCP_HDR	*tcph;
+	T_TCP_CEP	*cep = NULL;
+	T_TCP_SEQ	iss = 0;
+	ER		ret;
+	bool_t		needoutput = false;
+	int_t		rbfree;
+	int32_t		todrop, win;
+	uint16_t	seglen;
+	uint8_t		flags;
+
+#if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0
+	T_TCP_TWCEP	*twcep;
+#endif	/* of #if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0 */
+
+	NET_COUNT_TCP(net_count_tcp[NC_TCP_RECV_OCTETS],
+	              input->len - GET_IF_IP_HDR_SIZE(input));
+	NET_COUNT_TCP(net_count_tcp[NC_TCP_RECV_SEGS], 1);
+	NET_COUNT_MIB(tcp_stats.tcpInSegs, 1);
+
+	/* ãããé·ããã§ãã¯ããã*/
+	if (input->len < IF_IP_TCP_HDR_SIZE) {
+		NET_COUNT_TCP(net_count_tcp[NC_TCP_RECV_BAD_HEADERS], 1);
+		goto drop;
+		}
+
+	iph  = GET_IP_HDR(input);
+	tcph = GET_TCP_HDR(input, *offp);
+
+	seglen  = input->len - *offp;				/* TCP ã®ã»ã°ã¡ã³ãé· */
+
+	if (IN_CKSUM(input, IPPROTO_TCP, *offp, (uint_t)seglen) != 0) {
+		NET_COUNT_TCP(net_count_tcp[NC_TCP_RECV_BAD_CKSUMS], 1);
+		goto drop;
+		}
+
+	/* TCP ãããé·ããã§ãã¯ããã*/
+	if (TCP_HDR_LEN(tcph->doff) < TCP_HDR_SIZE || TCP_HDR_LEN(tcph->doff) > seglen) {
+		NET_COUNT_TCP(net_count_tcp[NC_TCP_RECV_BAD_HEADERS], 1);
+		goto drop;
+		}
+	tcph->sum = seglen - TCP_HDR_LEN(tcph->doff);		/* ãããã tcph->sum ã¯ TCP ã® SDU é· */
+
+	/*
+	 *  SYN ã¨ FIN ã®ä¸¡ããããã»ããããã¦ããã°ç ´æ£ãããnmap ç­ã®å¯¾ç­
+	 *  ãã ããRFC1644 T/TCP æ¡å¼µæ©è½ã¨ç«¶åããã
+	 */
+	if ((tcph->flags & (TCP_FLG_SYN | TCP_FLG_FIN)) == (TCP_FLG_SYN | TCP_FLG_FIN))
+		goto drop;
+
+	/* ãããã¯ã¼ã¯ãªã¼ãã¼ãããã¹ããªã¼ãã¼ã«å¤æããã*/
+
+	NTOHL(tcph->seq);
+	NTOHL(tcph->ack);
+	NTOHS(tcph->win);
+	NTOHS(tcph->urp);
+	NTOHS(tcph->sport);
+	NTOHS(tcph->dport);
+
+find_cep:
+
+#if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0
+
+	/*
+	 *  ç¶æ
+ã Time Wait ä¸­ã® CEP ãæ¢ç´¢ããã
+	 */
+	twcep = tcp_find_twcep(&iph->dst, tcph->dport, &iph->src, tcph->sport);
+	if (twcep != NULL) {
+
+		if (tcph->flags & TCP_FLG_RST)		/* RST ãã©ã°ãåä¿¡ããã¨ãã¯ç¡è¦ããã*/
+			goto drop;
+		else {
+
+			/*
+			 *    TCP éä¿¡ç«¯ç¹ã Time Wait ã®æãç¸æãã¹ãããã»ã°ã¡ã³ããæ¥ãã¨ãã¯ã
+			 *    ç¸æãã¹ãã® FIN ã«å¯¾ããèªãã¹ãã® ACK ã»ã°ã¡ã³ããéä¸­ã§
+			 *    æå¤±ãããã¨ãæå³ãã¦ããã®ã§ãACK ã»ã°ã¡ã³ããåéããã
+			 */
+
+			/* ãã¹ããªã¼ãã¼ãããããã¯ã¼ã¯ãªã¼ãã¼ã«æ»ãã*/
+			HTONS(tcph->sport);
+			HTONS(tcph->dport);
+
+			tcp_respond(input, NULL, twcep->rcv_nxt, twcep->snd_una, twcep->rbufsz - twcep->rwbuf_count, TCP_FLG_ACK);
+			}
+		return IPPROTO_DONE;
+		}
+	else
+		/* æ¨æºã® TCP éä¿¡ç«¯ç¹ãå¾ãã*/
+		cep = tcp_find_cep(&iph->dst, tcph->dport, &iph->src, tcph->sport);
+
+#else	/* of #if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0 */
+
+	/* TCP éä¿¡ç«¯ç¹ãå¾ãã*/
+	cep = tcp_find_cep(&iph->dst, tcph->dport, &iph->src, tcph->sport);
+
+#endif	/* of #if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0 */
+
+	/*
+	 *  TCP éä¿¡ç«¯ç¹ããªãå ´åã¨ CEP ã®ç¶æ
+ãã¯ã­ã¼ãºãªãç ´æ£ããã
+	 */
+	if (cep == NULL) {
+		syslog(LOG_INFO, "[TCP] unexp port: %d.", tcph->dport);
+		goto reset_drop;
+		}
+
+#ifdef TCP_CFG_TRACE
+
+	tcp_input_trace(input, cep);
+
+#endif	/* of #ifdef TCP_CFG_TRACE */
+
+
+	if (cep->fsm_state == TCP_FSM_CLOSED)
+		goto drop;
+
+	/*
+	 *  ã³ãã¯ã·ã§ã³éè¨­æ¸ã¿ã§ã»ã°ã¡ã³ããåä¿¡ããã¨ãã¯ã
+	 *  ã¢ã¤ãã«æéã¨çå­ç¢ºèªã¿ã¤ãããªã»ããããã
+	 */
+	cep->idle = 0;
+	if (TCP_FSM_HAVE_ESTABLISHED(cep->fsm_state)) {
+		cep->timer[TCP_TIM_KEEP] = TCP_TVAL_KEEP_IDLE;
+		}
+
+	/* CEP ã®ç¶æ
+ã LISTEN ä»¥å¤ã®æã¯ããªãã·ã§ã³ãå¦çããã*/
+	if (cep->fsm_state != TCP_FSM_LISTEN)
+		parse_option(tcph, cep);
+
+	/*
+	 *  åä¿¡å¯è½ã¦ã£ã³ããµã¤ãºãè¨ç®ããã
+	 *
+	 *  rcv_nxt:     åä¿¡ãæå¾
+ãã¦ããæå°ã® SEQï¼ããä»¥åã¯åä¿¡æ¸ã¿ï¼
+	 *  rcv_adv:     åä¿¡ãæå¾
+ãã¦ããæå¤§ã® SEQ
+	 *  rbufsz:      åä¿¡ã¦ã£ã³ããããã¡ãµã¤ãº
+	 *  rwbuf_count:  åä¿¡ã¦ã£ã³ããããã¡ã«ãããã¼ã¿é
+	 *  tcph->sum:   ä»ååä¿¡ãã SDU ãµã¤ãº
+	 *
+	 *  ä»ååä¿¡ããã»ã°ã¡ã³ããé åºæ´åã­ã¥ã¼ã«é£çµãã
+	 *  å¯è½æ§ãããã®ã§ tcph->sum ãèæ
+®ããã
+	 *
+	 */
+	win = cep->rbufsz - (cep->rwbuf_count + tcph->sum);
+	if (win < 0)
+		win = 0;
+	if (win > (int32_t)(cep->rcv_adv - cep->rcv_nxt))
+		cep->rcv_wnd = win;
+	else
+		cep->rcv_wnd = cep->rcv_adv - cep->rcv_nxt;
+
+	/* CEP ã®ç¶æ
+ã«ããå¦çãè¡ãã*/
+
+	if (cep->fsm_state == TCP_FSM_LISTEN) {		/* ååãªã¼ãã³ (LISTEN) ã®å¦çã*/
+		if ((ret = listening(input, cep, *offp, iss)) == RET_RST_DROP)
+			goto reset_drop;
+		else if (ret == RET_DROP)
+			goto drop;
+		trim_length(tcph, cep);			/* åä¿¡ãã SDU é·ãèª¿æ´ããã*/
+
+		if (tcph->flags & TCP_FLG_ACK) {	/* ACK ãã©ã°ã®å¦ç */
+			if ((ret = proc_ack2(input, cep, *offp, &needoutput)) == RET_DROP)
+				goto drop;
+			else if (ret == RET_RST_DROP)
+				goto reset_drop;
+			else if (ret == RET_RETURN)
+				return IPPROTO_DONE;
+			}
+		}
+	else if (cep->fsm_state == TCP_FSM_SYN_SENT) {	/* è½åãªã¼ãã³ãSYN éä¿¡æ¸ã¿	*/
+		if ((ret = syn_sent(tcph, cep)) == RET_RST_DROP)
+			goto reset_drop;
+		else if (ret == RET_DROP)
+			goto drop;
+		trim_length(tcph, cep);			/* åä¿¡ãã SDU é·ãèª¿æ´ããã*/
+
+		if (tcph->flags & TCP_FLG_ACK) {	/* ACK ãã©ã°ã®å¦ç */
+			if ((ret = proc_ack2(input, cep, *offp, &needoutput)) == RET_DROP)
+				goto drop;
+			else if (ret == RET_RST_DROP)
+				goto reset_drop;
+			else if (ret == RET_RETURN)
+				return IPPROTO_DONE;
+			}
+		}
+	else {
+		if (cep->fsm_state == TCP_FSM_SYN_RECVD) {	/* SYN ãåä¿¡ãSYN éä¿¡æ¸ã¿	*/
+			/*
+			 *  ç¸æããåä¿¡ç¢ºèªãéããã¦æ¥ã¦ãã
+			 *
+			 *    ACK <= æªç¢ºèªã®æå°éä¿¡ SEQ (snd_una) &&
+			 *           éä¿¡ããæå¤§     SEQ (snd_max) < ACK
+			 *
+			 *  ãªãããªã»ãããéã£ã¦ã»ã°ã¡ã³ããç ´æ£ããã
+			 */
+			if ((tcph->flags & TCP_FLG_ACK) &&
+			    (SEQ_LE(tcph->ack, cep->snd_una) ||
+			     SEQ_GT(tcph->ack, cep->snd_max)))
+			     	goto reset_drop;
+			}
+
+		/* 
+		 *  RST ãã©ã°ãåä¿¡ããã¨ãã®å¦ç (ç°å¸¸åæ­)
+		 */
+		if (tcph->flags & TCP_FLG_RST) {
+			if (SEQ_GE(tcph->seq, cep->last_ack_sent) &&
+			    SEQ_LT(tcph->seq, cep->last_ack_sent + cep->rcv_wnd)) {
+				/*
+				 *  åä¿¡ããã»ã°ã¡ã³ãã® SEQ ããæå¾ã«éä¿¡ãã ACK (last_ack_sent)
+				 *  ãããåä¿¡ã¦ã¤ã³ãã¦ãµã¤ãºã¾ã§ã®éã®å¦ç
+				 */
+				switch (cep->fsm_state) {
+				case TCP_FSM_SYN_RECVD:		/* SYN ãåä¿¡ããSYN éä¿¡æ¸ã¿		*/
+
+					cep->net_error = EV_CNNRF;	/* æ¥ç¶ä¸è½ */
+					cep->error     = E_CLS;
+					NET_COUNT_TCP(net_count_tcp[NC_TCP_RECV_RSTS], 1);
+					NET_COUNT_MIB(tcp_stats.tcpAttemptFails, 1);
+					cep = tcp_close(cep);
+					break;
+
+				case TCP_FSM_ESTABLISHED:	/* ã³ãã¯ã·ã§ã³éè¨­å®äº			*/
+				case TCP_FSM_CLOSE_WAIT:	/* FIN åä¿¡ãã¯ã­ã¼ãºå¾
+ã¡		*/
+					NET_COUNT_MIB(tcp_stats.tcpEstabResets, 1);
+					/* fallthrough */
+
+				case TCP_FSM_FIN_WAIT_1:	/* çµäºãã¦ãFIN éä¿¡æ¸ã¿		*/
+				case TCP_FSM_FIN_WAIT_2:	/* çµäºãFIN ä¼éç¢ºèªåä¿¡ãFINå¾
+ã¡	*/
+
+					cep->net_error = EV_CNRST;	/* æ¥ç¶ãªã»ãã */
+					cep->error     = E_CLS;
+					NET_COUNT_TCP(net_count_tcp[NC_TCP_RECV_RSTS], 1);
+					/* no break; */
+
+				case TCP_FSM_CLOSING:		/* çµäºãFIN äº¤ææ¸ã¿ãACK å¾
+ã¡	*/
+				case TCP_FSM_LAST_ACK:		/* FIN åä¿¡ãçµäºãACK å¾
+ã¡	*/
+
+					cep = tcp_close(cep);
+					break;
+					}
+				}
+			goto drop;
+			}
+
+		/*
+		 *  CEP ã®ç¶æ
+ã SYN ãåä¿¡ããSYN éä¿¡æ¸ã¿ã®å ´åã¯ã
+		 *  åä¿¡ã¦ã£ã³ãã«åã¾ãããã«ãã¼ã¿ã
+		 *  èª¿æ´ããåã«ããã®æ¥ç¶ã«ãããã±ãããã©ãããæ¤è¨¼ããã
+		 *
+		 *    åä¿¡ããç¸æã® SEQ < ç¸æã® SEQ ã®åæå¤ (irs)
+		 *
+		 *  ããã¯ã"LAND" DoS æ»æã®é²å¾¡ã§ããã
+		 */
+		if (cep->fsm_state == TCP_FSM_SYN_RECVD && SEQ_LT(tcph->seq, cep->irs)) {
+			goto reset_drop;
+			}
+
+		/*
+		 *  åä¿¡ãæå¾
+ãã¦ããæå°ã® SEQ (rcv_nxt) - åä¿¡ããç¸æã® SEQ ã
+		 *  æ­£ãªããrcv_nxt ä»¥åã®ãã¼ã¿ã¯ãã§ã«åä¿¡ãã¦ããã®ã§ããã®é¨åã
+		 *  åé¤ããã
+		 *                           <---------- rcv_wnd --------->
+		 *                           rcv_nxt                      rcv_nxt + rcv_wnd
+		 *                           v                            v
+		 *                      -----+----------------------------+-----
+		 *                           |                            |
+		 *                      -----+----------------------------+-----
+		 *           +----------------------+
+		 *           |***************|      |
+		 *           +----------------------+
+		 *           ^                      ^
+		 *           seq                    seq + len
+		 *           <---------------> åé¤ããã
+		 */
+		todrop = cep->rcv_nxt - tcph->seq;
+		if (todrop > 0) {
+
+			/*
+			 *  SYN ãã©ã°ãã¤ãã¦ããã¨ãã¯ããã®å (1 ãªã¯ããã)
+			 *  SEQ ãé²ããç·æ¥ãã¤ã³ã¿ã¨åé¤ããé·ããèª¿æ´ããã
+			 */
+			if (tcph->flags & TCP_FLG_SYN) {
+				tcph->flags &= ~TCP_FLG_SYN;
+				tcph->seq ++;
+				if (tcph->urp > 1)
+					tcph->urp --;
+				else
+					tcph->flags &= ~TCP_FLG_URG;
+				todrop --;
+				}
+
+			/*
+			 *  åé¤ããé·ãã SDU ããé·ããã¤ã¾ããåä¿¡ãæå¾
+ãã¦ãã
+			 *  æå°ã® SEQ (rcv_nxt) ã«éãã¦ããªããã
+			 *  åé¤ããé·ãã SDU ã¨åãã§ãFIN ãã©ã°ãã¤ãã¦ãªããã°
+			 *  å
+¨ã¦åé¤ããã
+			 */
+			if ( todrop >  tcph->sum ||		/* tcph->sum ã¯ TCP ã® SDU é· */
+			    (todrop == tcph->sum && (tcph->flags & TCP_FLG_FIN) == 0)) {
+				tcph->flags &= ~TCP_FLG_FIN;
+				cep->flags |= TCP_CEP_FLG_ACK_NOW;
+				todrop = tcph->sum;		/* tcph->sum ã¯ TCP ã® SDU é· */
+				}
+
+			/*
+			 *  SDU ãåã«è©°ããã
+			 */
+			if (todrop < tcph->sum) {		/* tcph->sum ã¯ TCP ã® SDU é· */
+				memcpy(GET_TCP_SDU(input, *offp),
+				       GET_TCP_SDU(input, *offp) + todrop, (size_t)(tcph->sum - todrop));
+				}
+
+			/*
+			 *  SEQ ã¨ SDU é·ãèª¿æ´ããã
+			 */
+			tcph->seq +=     todrop;
+			tcph->sum -= (uint16_t)todrop;	/* tcph->sum ã¯ TCP ã® SDU é· */
+
+			/*
+			 *  ç·æ¥ãã¤ã³ã¿ãèª¿æ´ããã
+			 */
+			if (tcph->urp > todrop)
+				tcph->urp -= (uint16_t)todrop;
+			else {
+				tcph->flags &= ~TCP_FLG_URG;
+				tcph->urp = 0;
+				}
+
+			NET_COUNT_TCP(net_count_tcp[NC_TCP_RECV_DUP_SEGS], 1);
+			}
+
+		/*  
+		 *  ããã¦ã¼ã¶ã¿ã¹ã¯ãçµäºããå¾ã«ããã¼ã¿ãåä¿¡ãã
+		 *  å ´åã¯ãRST ãéãã
+		 */
+		if (cep->fsm_state == TCP_FSM_LAST_ACK && tcph->sum > 0) {	/* tcph->sum ã¯ TCP ã® SDU é· */
+			cep = tcp_close(cep);
+			goto reset_drop;
+			}
+
+		/*
+		 *  åä¿¡ã»ã°ã¡ã³ããåä¿¡ã¦ã£ã³ããè¶
+ããå ´åã¯ã
+		 *  è¶
+ããåãåãã
+		 *
+		 *       <---------- rcv_wnd --------->
+		 *       rcv_nxt                      (rcv_nxt + rcv_wnd)
+		 *       v                            v
+		 *  -----+----------------------------+-----
+		 *       |                            |
+		 *  -----+----------------------------+-----
+		 *                    +----------------------+
+		 *                    |               |******|
+		 *                    +----------------------+
+		 *                    ^                      ^
+		 *                    seq                    seq + len
+		 *                                     <-----> åé¤ããã
+		 */
+		todrop = (tcph->seq + tcph->sum) - (cep->rcv_nxt + cep->rcv_wnd);	/* tcph->sum ã¯ TCP ã® SDU é· */
+		if (todrop > 0) {
+			if (todrop > tcph->sum) {					/* tcph->sum ã¯ TCP ã® SDU é· */
+				/*
+				 *  åä¿¡ãã SDU ã®å
+¨ã¦ãåä¿¡ã¦ã£ã³ããè¶
+ããå ´åã
+				 *
+				 *  TIME_WAIT ä¸­ã«ãæ°ããªæ¥ç¶è¦æ±ãåä¿¡ããã
+				 *  å¤ãæ¥ç¶ãç ´æ£ããæ°ããªæ¥ç¶ãéå§ããã
+				 *  ãã ããSEQ ã¯åããé²ãã§ããªããã°ãªããªãã
+				 */
+				if ((tcph->flags & TCP_FLG_SYN) &&
+				    cep->fsm_state == TCP_FSM_TIME_WAIT &&
+				    SEQ_GT(tcph->seq, cep->rcv_nxt)) {
+					iss = cep->snd_nxt + TCP_ISS_INCR();
+					tcp_close(cep);
+					syscall(dly_tsk(0));
+					goto find_cep;
+				    	}
+
+				/*
+				 *  åä¿¡ã¦ã£ã³ãã 0 ã§ãåä¿¡ãã SEQ ã¨
+				 *  åä¿¡ãæå¾
+ãã¦ããæå°ã® SEQ ãä¸è´ããã¨ãã¯
+				 *  ACK ãè¿ããããä»¥å¤ã¯ãã¼ã¿ãç ´æ£ããACK ãè¿ãã
+				 */
+				if (cep->rcv_wnd == 0 && (tcph->seq == cep->rcv_nxt || tcph->sum == 0)) {
+					cep->flags |= TCP_CEP_FLG_ACK_NOW;
+					}
+				else if (drop_after_ack(input, cep, *offp) == RET_RST_DROP)
+					goto reset_drop;
+				else {
+					return IPPROTO_DONE;
+					}
+				}
+			tcph->sum -= (uint16_t)todrop;	/* tcph->sum ã¯ TCP ã® SDU é· */
+			tcph->flags &= ~(TCP_FLG_PUSH | TCP_FLG_FIN);
+			}
+
+		/*
+		 *  ãããSYN ãã»ããããã¦ããã°ã
+		 *  ã¨ã©ã¼ãªã®ã§ RST ãéããæ¥ç¶ãç ´æ£ããã
+		 */
+		if (tcph->flags & TCP_FLG_SYN) {
+			cep->net_error = EV_CNRST;
+			cep = tcp_drop(cep, E_CLS);
+			goto reset_drop;
+			}
+
+		/*
+		 *  ãããACK ãã»ããããã¦ããªãå ´åã¯ã
+		 *  ç¶æ
+ã SYN åä¿¡æ¸ã¿ã
+		 *  SYN ãéä¿¡ãããã¨ãã¦ããã°ãå¦çãç¶ãããã
+		 *  ããä»¥å¤ã¯ã»ã°ã¡ã³ããç ´æ£ãã¦çµäºããã
+		 */
+		if ((tcph->flags & TCP_FLG_ACK) == 0) {
+			if (!(cep->fsm_state == TCP_FSM_SYN_RECVD || (cep->flags & TCP_CEP_FLG_NEED_SYN)))
+				goto drop;
+			}
+		else {
+			/*
+			 * ACK ã®å¦ç
+			 */
+			ret = proc_ack1(input, cep, *offp, &needoutput);
+			if (ret == RET_DROP)
+				goto drop;
+			else if (ret == RET_RST_DROP)
+				goto reset_drop;
+			else if (ret == RET_RETURN)
+				return IPPROTO_DONE;
+			}
+		}
+
+/* step 6 */
+
+	/* éä¿¡ã¦ã£ã³ããæ´æ°ããã*/
+	if (update_wnd(tcph, cep) == true)
+		needoutput = true;
+
+	/* ç·æ¥ãã¼ã¿ãå¦çããã*/
+	proc_urg(tcph, cep);
+
+/* do data */
+
+	/*
+	 *  SDU ãããããFIN ãæªåä¿¡ã®ç¶æ
+ã§ãæåã« FIN ãåä¿¡ããã¨ãã
+	 *  åä¿¡ã»ã°ã¡ã³ãã­ã¥ã¼ã« net_buf ãè¿½å ããã
+	 *  ããä»¥å¤ã®å ´åã¯ãã»ã°ã¡ã³ããç ´æ£ããã
+	 */
+	flags = tcph->flags;
+	if ((tcph->sum > 0 || (flags & TCP_FLG_FIN)) &&		/* tcph->sum ã¯ TCP ã® SDU é· */
+	    TCP_FSM_HAVE_RCVD_FIN(cep->fsm_state) == 0) {
+		flags = reassemble(input, cep, *offp, flags);
+		}
+	else {
+		syscall(rel_net_buf(input));
+		flags &= ~TCP_FLG_FIN;
+		}
+
+	/*
+	 *  FIN ãåä¿¡ãããã³ãã¯ã·ã§ã³ãã¯ã­ã¼ãºããã
+	 */
+	if (flags & TCP_FLG_FIN)
+		close_connection(cep, &needoutput);
+
+	/* åºåãè¡ã£ãå¾çµäºããã*/
+	if (needoutput == true || (cep->flags & TCP_CEP_FLG_ACK_NOW)) {
+		/* éä¿¡ãæç¤ºããã*/
+		cep->flags |=  TCP_CEP_FLG_POST_OUTPUT;
+		sig_sem(SEM_TCP_POST_OUTPUT);
+		}
+
+	return IPPROTO_DONE;
+
+reset_drop:
+	/*
+	 *  RST éä¿¡å¦ç
+	 */
+
+	if ((tcph->flags & TCP_FLG_RST) || IN_IS_NET_ADDR_MULTICAST(&iph->dst))
+		goto drop;
+
+	/* ãã¹ããªã¼ãã¼ãããããã¯ã¼ã¯ãªã¼ãã¼ã«æ»ãã*/
+
+	HTONS(tcph->sport);
+	HTONS(tcph->dport);
+
+	if (cep == NULL)
+		rbfree = 0;
+	else
+		rbfree = cep->rbufsz - cep->rwbuf_count;
+
+	if (tcph->flags & TCP_FLG_ACK) {
+		tcp_respond(input, cep, 0, tcph->ack, rbfree, TCP_FLG_RST);
+		}
+	else {
+		if (tcph->flags & TCP_FLG_SYN)
+			tcph->sum ++;		/* tcph->sum ã¯ SDU é· */
+		tcp_respond(input, cep, tcph->seq + tcph->sum, 0, rbfree, TCP_FLG_RST | TCP_FLG_ACK);
+		}
+
+	/* input ã¯ tcp_respoond ã§è¿å´ãããã*/
+	NET_COUNT_TCP(net_count_tcp[NC_TCP_SEND_RSTS], 1);
+	NET_COUNT_MIB(tcp_stats.tcpOutRsts, 1);
+	return IPPROTO_DONE;
+
+drop:
+	NET_COUNT_TCP(net_count_tcp[NC_TCP_RECV_DROP_SEGS], 1);
+	NET_COUNT_MIB(tcp_stats.tcpInErrs, 1);
+	syscall(rel_net_buf(input));
+	return IPPROTO_DONE;
+	}
+
+#endif	/* of #ifdef SUPPORT_TCP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_output.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_output.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_output.c	(revision 270)
@@ -0,0 +1,1175 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)tcp_output.c	8.4 (Berkeley) 5/24/95
+ * $FreeBSD: src/sys/netinet/tcp_output.c,v 1.32.2.2 1999/08/29 16:29:55 peter Exp $
+ */
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet6/in6.h>
+#include <netinet/in_var.h>
+#include <netinet/in_itron.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet6/in6_var.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_timer.h>
+#include <netinet/tcp_var.h>
+#include <netinet/tcp_fsm.h>
+#include <netinet/tcp_seq.h>
+
+#ifdef SUPPORT_TCP
+
+/*
+ *  é¢æ°
+ */
+
+static ER send_segment (bool_t *sendalot, T_TCP_CEP *cep, uint_t doff, uint_t win, uint_t len, uint8_t flags);
+static void tcp_output (T_TCP_CEP *cep);
+
+/*
+ *  å¤æ°
+ */
+
+/* åºåæã®ãã©ã°ã FSM ç¶æ
+ã«ããé¸æããããã®è¡¨ */
+
+const static uint8_t tcp_outflags[] = {
+	TCP_FLG_RST | TCP_FLG_ACK,	/*  0, ã¯ã­ã¼ãº				*/
+	0,				/*  1, ååãªã¼ãã³			*/
+	TCP_FLG_SYN,			/*  2, è½åãªã¼ãã³ãSYN éä¿¡æ¸ã¿	*/
+	TCP_FLG_SYN | TCP_FLG_ACK,	/*  3, SYM ãåä¿¡ããSYN éä¿¡æ¸ã¿	*/
+	TCP_FLG_ACK,			/*  4, ã³ãã¯ã·ã§ã³éè¨­å®äº		*/
+	TCP_FLG_ACK,			/*  5, FIN åä¿¡ãã¯ã­ã¼ãºå¾
+ã¡		*/
+	TCP_FLG_FIN | TCP_FLG_ACK,	/*  6, çµäºãã¦ãFIN éä¿¡æ¸ã¿		*/
+	TCP_FLG_FIN | TCP_FLG_ACK,	/*  7, çµäºãFIN äº¤ææ¸ã¿ãACK å¾
+ã¡	*/
+	TCP_FLG_FIN | TCP_FLG_ACK,	/*  8, FIN åä¿¡ãçµäºãACK å¾
+ã¡		*/
+	TCP_FLG_ACK,			/*  9, çµäºãFIN ä¼éç¢ºèªåä¿¡ãFINå¾
+ã¡	*/
+	TCP_FLG_ACK,			/* 10, çµäºãæéå¾
+ã¡			*/
+	};
+
+/*
+ *  send_segment -- TCP åºåå¦ç
+ */
+
+static ER
+send_segment (bool_t *sendalot, T_TCP_CEP *cep, uint_t doff, uint_t win, uint_t len, uint8_t flags)
+{
+	T_NET_BUF	*output;
+	T_TCP_HDR	*tcph;
+	uint_t		optlen;
+	ER		error;
+
+#ifdef TCP_CFG_OPT_MSS
+
+	uint8_t		*optp;
+
+	if (flags & TCP_FLG_SYN)
+		optlen = TCP_OPT_LEN_MAXSEG;
+	else
+		optlen = 0;
+
+#else/* of #ifdef TCP_CFG_OPT_MSS */
+
+	optlen = 0;
+
+#endif/* of #ifdef TCP_CFG_OPT_MSS */
+
+	NET_COUNT_TCP(net_count_tcp[NC_TCP_SEND_SEGS], 1);
+	NET_COUNT_MIB(tcp_stats.tcpOutSegs, 1);
+
+	/*
+	 *  ã»ã°ã¡ã³ãé·ããç¸æã®æå¤§åä¿¡ã»ã°ã¡ã³ãé·ã«èª¿æ´ããã
+	 *  ãããè¶
+ãã¦ããå ´åã¯ãè¶
+ããåãå¾ã§éä¿¡ããã
+	 *  ãã®ãããFIN ããããã¯ãªã¢ããã
+	 *
+	 *  ãªãªã¸ãã«ã§ã¯ãt_maxopd ãå¶éé·ã«ãã¦ãããã
+	 *  æ¬å®è£
+ã§ã¯ãç¸æã®æå¤§åä¿¡ã»ã°ã¡ã³ãã«ããã
+	 */
+	if (len + optlen > cep->maxseg) {
+		flags &= ~TCP_FLG_FIN;
+		len = cep->maxseg - optlen;
+		*sendalot = true;
+		}
+
+	/*
+	 *  éä¿¡ãããã¡ãç©ºã«ãªãã¨ãã¯ PUSH ãã©ã°ãè¨­å®ããã
+	 */
+	if (len && doff + len >= cep->swbuf_count)
+		flags |= TCP_FLG_PUSH;
+
+#if defined(TCP_CFG_SWBUF_CSAVE_ONLY)
+		
+	if (len > 0 && ((cep->flags & TCP_CEP_FLG_WBCS_MASK) == TCP_CEP_FLG_WBCS_SEND_READY ||
+	                (cep->flags & TCP_CEP_FLG_WBCS_MASK) == TCP_CEP_FLG_WBCS_SENT)) {
+
+		/*
+		 *  éä¿¡ã¦ã¤ã³ããããã¡ãéæ¾ãããªãããã«ãã¦ã
+		 *  ãããã¯ã¼ã¯ãããã¡ãåºåã«ç§»ãã
+		 */
+		cep->swbufq->flags |= NB_FLG_NOREL_IFOUT;
+		output = cep->swbufq; 
+		}
+	else {
+
+		/*
+		 *  ACK å®äºç¶æ
+ã§ããã®é¢æ°ãå¼ã³åºããããã¨ãããã
+		 *  ãã®æã¯ãlen ã 0 ã«ãã¦ãå¦çãç¶ç¶ããã
+		 */
+		len = 0;
+		if ((error = tcp_get_segment(&output, cep, optlen,
+	                                    len, (uint_t)(net_buf_max_siz() - IF_IP_TCP_HDR_SIZE),
+	                                    NBA_SEARCH_ASCENT, TMO_TCP_GET_NET_BUF)) != E_OK) {
+			if (cep->timer[TCP_TIM_REXMT] == 0)
+				cep->timer[TCP_TIM_REXMT] = cep->rxtcur;
+			goto err_ret;
+			}
+		}
+
+#elif defined(TCP_CFG_SWBUF_CSAVE)	/* of #if defined(TCP_CFG_SWBUF_CSAVE_ONLY) */
+
+	if (IS_PTR_DEFINED(cep->sbuf)) {
+		if ((error = tcp_get_segment(&output, cep, optlen,
+		                             len, (uint_t)(net_buf_max_siz() - IF_IP_TCP_HDR_SIZE),
+		                             NBA_SEARCH_ASCENT, TMO_TCP_GET_NET_BUF)) != E_OK) {
+			if (cep->timer[TCP_TIM_REXMT] == 0)
+				cep->timer[TCP_TIM_REXMT] = cep->rxtcur;
+			goto err_ret;
+			}
+		}
+	else if (len > 0 && ((cep->flags & TCP_CEP_FLG_WBCS_MASK) == TCP_CEP_FLG_WBCS_SEND_READY ||
+	                     (cep->flags & TCP_CEP_FLG_WBCS_MASK) == TCP_CEP_FLG_WBCS_SENT)) {
+
+		/*
+		 *  éä¿¡ã¦ã¤ã³ããããã¡ãéæ¾ãããªãããã«ãã¦ã
+		 *  ãããã¯ã¼ã¯ãããã¡ãåºåã«ç§»ãã
+		 */
+		cep->swbufq->flags |= NB_FLG_NOREL_IFOUT;
+		output = cep->swbufq; 
+		}
+	else {
+
+		/*
+		 *  ACK å®äºç¶æ
+ã§ããã®é¢æ°ãå¼ã³åºããããã¨ãããã
+		 *  ãã®æã¯ãlen ã 0 ã«ãã¦ãå¦çãç¶ç¶ããã
+		 */
+		len = 0;
+		if ((error = tcp_get_segment(&output, cep, optlen,
+	                                    len, (uint_t)(net_buf_max_siz() - IF_IP_TCP_HDR_SIZE),
+	                                    NBA_SEARCH_ASCENT, TMO_TCP_GET_NET_BUF)) != E_OK) {
+			if (cep->timer[TCP_TIM_REXMT] == 0)
+				cep->timer[TCP_TIM_REXMT] = cep->rxtcur;
+			goto err_ret;
+			}
+		}
+
+#else	/* of #if defined(TCP_CFG_SWBUF_CSAVE_ONLY) */
+
+	if ((error = tcp_get_segment(&output, cep, optlen,
+	                             len, (uint_t)(net_buf_max_siz() - IF_IP_TCP_HDR_SIZE),
+	                             NBA_SEARCH_ASCENT, TMO_TCP_GET_NET_BUF)) != E_OK) {
+		if (cep->timer[TCP_TIM_REXMT] == 0)
+			cep->timer[TCP_TIM_REXMT] = cep->rxtcur;
+		goto err_ret;
+		}
+
+#endif	/* of #if defined(TCP_CFG_SWBUF_CSAVE_ONLY) */
+
+	/*
+	 *  TCP ãªãã·ã§ã³ã®è¨­å®ãè¡ãã
+	 *  æ¬å®è£
+ã§ã¯ãæå¤§ã»ã°ã¡ã³ããµã¤ãºã®ã¿è¨­å®ããã
+	 */
+	if (flags & TCP_FLG_SYN) {
+		cep->snd_nxt = cep->iss;
+
+#ifdef TCP_CFG_OPT_MSS
+
+		optp = GET_TCP_OPT(output, IF_IP_TCP_HDR_OFFSET);
+		*optp ++ = TCP_OPT_MAXSEG;
+		*optp ++ = TCP_OPT_LEN_MAXSEG;
+		*(uint16_t*)optp = htons(DEF_TCP_RCV_SEG);
+
+#endif/* of #ifdef TCP_CFG_OPT_MSS */
+
+		}
+
+	/* TCP SDU ã«éä¿¡ãã¼ã¿ãã³ãã¼ããã*/
+
+	if (len > 0) {
+		if (SEQ_LT(cep->snd_nxt, cep->snd_max)) {
+			NET_COUNT_TCP(net_count_tcp[NC_TCP_SEND_REXMIT_SEGS], 1);
+			NET_COUNT_MIB(tcp_stats.tcpRetransSegs, 1);
+			}
+		TCP_READ_SWBUF(cep, output, len, doff);
+		}
+	else {
+		if (cep->flags & TCP_CEP_FLG_ACK_NOW)
+			NET_COUNT_TCP(net_count_tcp[NC_TCP_SEND_ACKS], 1);
+		if (flags & (TCP_FLG_FIN | TCP_FLG_SYN | TCP_FLG_RST))
+			NET_COUNT_TCP(net_count_tcp[NC_TCP_SEND_CNTL_SEGS],  1);
+
+
+#ifdef TCP_CFG_EXTENTIONS
+
+		if (SEQ_LT(cep->snd_up, cep->snd_una))
+			NET_COUNT_TCP(net_count_tcp[NC_TCP_SEND_URG_SEGS], 1);
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+		}
+
+	/*
+	 * snd_max: éä¿¡ããæå¤§ SEQ
+	 * snd_nxt: æ¬¡ã«éä¿¡ãã SEQ
+	 *
+	 *  ç¸æãã FIN ãåä¿¡ããã¾ã  FIN ãéä¿¡ãã¦ããªããã
+	 *  éããã¼ã¿ããªãã¨ãã¯ãFIN ãç¸æã«å±ããããã
+	 *  ã»ã°ã¡ã³ããéä¿¡ããããSEQ ã¯é²ããªãã
+	 */
+	if ((flags & TCP_FLG_FIN) && (cep->flags & TCP_CEP_FLG_SENT_FIN) &&
+	    cep->snd_nxt == cep->snd_max) {
+		cep->snd_nxt --;
+		}
+
+	tcph = GET_TCP_HDR(output, IF_IP_TCP_HDR_OFFSET);
+
+	/*
+	 *  SEQãACKããã©ã°ã®è¨­å®ã
+	 */
+	if (len > 0 || (flags & (TCP_FLG_SYN | TCP_FLG_FIN)) || cep->timer[TCP_TIM_PERSIST] != 0)
+		tcph->seq = htonl(cep->snd_nxt);
+	else
+		tcph->seq = htonl(cep->snd_max);
+
+	/*
+	 *  rcv_nxt: åä¿¡ãæå¾
+ãã¦ããæå°ã® SEQ
+	 */
+	tcph->ack   = htonl(cep->rcv_nxt);
+	tcph->flags = flags;
+
+	/*
+	 *  åä¿¡ã¦ã£ã³ãã®è¨ç®
+	 *
+	 *  rbufsz: åä¿¡ç¨ãããã¡ãµã¤ãº
+	 *  maxseg: ç¸æã®æå¤§åä¿¡ã»ã°ã¡ã³ããµã¤ãº	
+	 */
+	if (win < (cep->rbufsz / 4) && win < cep->maxseg)
+		win = 0;
+
+	/*
+	 *  rcv_nxt: åä¿¡ãæå¾
+ãã¦ããæå°ã® SEQ
+	 *  rcv_adv: åä¿¡ãæå¾
+ãã¦ããæå¤§ã® SEQ
+	 */
+	if ((int32_t)win < (int32_t)(cep->rcv_adv - cep->rcv_nxt))
+		win = (uint_t)(cep->rcv_adv - cep->rcv_nxt);
+
+	tcph->win = htons(win);
+
+#ifdef TCP_CFG_EXTENTIONS
+
+	/*
+	 *  ç·æ¥ãã¤ã³ã¿ã®è¨­å®
+	 */
+	if (SEQ_GT(cep->snd_up, cep->snd_nxt)) {
+		if (TCP_CFG_URG_OFFSET)
+			tcph->urp    = htons((uint16_t)(cep->snd_up - cep->snd_nxt));
+		else
+			tcph->urp    = htons((uint16_t)(cep->snd_up - cep->snd_nxt - 1));
+		tcph->flags |= TCP_FLG_URG;
+		}
+	else
+		cep->snd_up  = cep->snd_una;
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+	/*
+	 *  ãã§ãã¯ãµã ãè¨­å®ããã
+	 */
+	tcph->sum = 0;
+	tcph->sum = IN_CKSUM(output, IPPROTO_TCP, (uint_t)GET_TCP_HDR_OFFSET(output),
+		             GET_TCP_HDR_SIZE2(output, IF_IP_TCP_HDR_OFFSET) + len);
+
+	/* ãããã¯ã¼ã¯ãããã¡é·ãèª¿æ´ããã*/
+	output->len = (uint16_t)(GET_IF_IP_TCP_HDR_SIZE2(output, IF_IP_TCP_HDR_OFFSET) + len);
+
+	/*
+	 *  ã¿ã¤ãã®èª¿æ´
+	 */
+	if ((cep->flags & TCP_CEP_FLG_FORCE) == 0 || cep->timer[TCP_TIM_PERSIST] == 0) {
+		T_TCP_SEQ startseq = cep->snd_nxt;
+
+		/*
+		 *  æ¬¡ã«éä¿¡ãã SEQ (snd_nxt) ãä»åéä¿¡ãããã¼ã¿æ°åé²ããã
+		 */
+		if (flags & TCP_FLG_SYN)
+			cep->snd_nxt ++;
+		if (flags & TCP_FLG_FIN) {
+			cep->flags |= TCP_CEP_FLG_SENT_FIN;
+			cep->snd_nxt ++;
+			}
+
+		cep->snd_nxt += len;
+
+		/*
+		 *  æ¬¡ã«éä¿¡ãã SEQ (snd_nxt) ã
+		 *  éä¿¡ããæå¤§ SEQ (snd_max) ããé²ãã§ããã°ã
+		 *  éä¿¡ããæå¤§ SEQ (snd_max) ãæ´æ°ããã
+		 */
+		if (SEQ_GT(cep->snd_nxt, cep->snd_max)) {
+			cep->snd_max = cep->snd_nxt;
+			/*
+			 *  ãããå¾å¾©æéè¨æ¸¬ãè¡ã£ã¦ããªããã°ã
+			 *  ãã®éä¿¡ã«æéãåãããã
+			 */
+			if (cep->rtt == 0) {
+				cep->rtt   = 1;
+				cep->rtseq = startseq;	/* æ´æ°åã® cep->snd_nxt */
+				}
+			}
+
+		/*
+		 *  ããè¨­å®ããã¦ããªãããACK ã¾ãã¯ä¿çãçºçãã¦ããªããã°ã
+		 *  åéã¿ã¤ããè¨­å®ãããè¨­å®ããåæå¤ã¯ã
+		 * ãæ»ãããªå¾å¾©æé + 2 Ã å¾å¾©æéå¤åãã§ããã
+		 *  åéæéã®ããã¯ãªãã«ä½¿ãããã·ããã«ã¦ã³ããåæåããã
+		 */
+		if (cep->timer[TCP_TIM_REXMT] == 0 && cep->snd_nxt != cep->snd_una) {
+			cep->timer[TCP_TIM_REXMT] = cep->rxtcur;
+			if (cep->timer[TCP_TIM_PERSIST] != 0) {
+				cep->timer[TCP_TIM_PERSIST] = 0;
+				cep->rxtshift = 0;
+				}
+			}
+		}
+
+	/*
+	 *  æ¬¡ã«éä¿¡ãã SEQ (snd_nxt) + ä»åéä¿¡ãããã¼ã¿æ° (len) ã
+	 *  éä¿¡ããæå¤§ SEQ (snd_max) ããé²ãã§ããã°ã
+	 *  éä¿¡ããæå¤§ SEQ (snd_max) ãæ´æ°ããã
+	 */
+	else if (SEQ_GT(cep->snd_nxt + len, cep->snd_max))
+		cep->snd_max = cep->snd_nxt + len;
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+
+	if ((cep->flags & TCP_CEP_FLG_WBCS_MASK) == TCP_CEP_FLG_WBCS_SEND_READY)
+		cep->flags = (cep->flags & ~TCP_CEP_FLG_WBCS_MASK) | TCP_CEP_FLG_WBCS_SENT;
+
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+#ifdef TCP_CFG_TRACE
+
+	tcp_output_trace(output, cep);
+
+#endif	/* of #ifdef TCP_CFG_TRACE */
+
+	/* ãããã¯ã¼ã¯å±¤ (IP) ã®åºåé¢æ°ãå¼ã³åºãã*/
+	if ((error = IP_OUTPUT(output, TMO_TCP_OUTPUT)) != E_OK)
+		goto err_ret;
+
+	/*
+	 *  ç¸æã«ä¼ããã¦ã£ã³ãã¦ãµã¤ãº (win) ã 0 ä»¥ä¸ã§ã
+	 *  åä¿¡ãæå¾
+ãã¦ããæå°ã® SEQ (rcv_nxt) + win ã
+	 *  åä¿¡ãæå¾
+ãã¦ããæå¤§ã® SEQ (rcv_adv) ããé²ãã§ããã°
+	 *  åä¿¡ãæå¾
+ãã¦ããæå¤§ã® SEQ ãæ´æ°ããã
+	 */
+	if (win > 0 && SEQ_GT(cep->rcv_nxt + win, cep->rcv_adv)) {
+		cep->rcv_adv = cep->rcv_nxt + win;
+		}
+
+	/*
+	 *  æå¾ã«éä¿¡ãã ACK (last_ack_sent) ãæ´æ°ããã
+	 */
+	cep->last_ack_sent = cep->rcv_nxt;
+
+	/*
+	 *  ãã©ã°ã®è¨­å®ãè¡ãã
+	 */
+	cep->flags &= ~(TCP_CEP_FLG_ACK_NOW | TCP_CEP_FLG_DEL_ACK);
+	if (cep->flags & TCP_CEP_FLG_FORCE_CLEAR)
+		cep->flags &= ~(TCP_CEP_FLG_FORCE | TCP_CEP_FLG_FORCE_CLEAR);
+
+	return E_OK;
+
+err_ret:
+	/*
+	 * ä»¥ä¸ã«é¢ä¿ããªããã©ã°ãã¯ãªã¢ã¼ããã
+	 * ã»éåä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½
+	 * ã»åçãªéä¿¡ç«¯ç¹ã®çæã»åé¤æ©è½
+	 */
+	cep->flags &= (TCP_CEP_FLG_WBCS_NBUF_REQ | TCP_CEP_FLG_WBCS_MASK | 
+	               TCP_CEP_FLG_DYNAMIC       | TCP_CEP_FLG_VALID);
+
+	return error;
+	}
+
+/*
+ *  tcp_output -- TCP åºåå¦ç
+ */
+
+void
+tcp_output (T_TCP_CEP *cep)
+{
+	bool_t	sendalot = true, idle;
+	ER	error = E_OK;
+	int32_t	len;
+	uint_t	doff, win;
+	uint8_t	flags;
+
+	/*
+	 *  snd_una: æªç¢ºèªã®æå°éä¿¡ SEQ	 ã¾ãã¯ãç¢ºèªãããæå¤§éä¿¡ SEQ
+	 *  snd_max: éä¿¡ããæå¤§ SEQ
+	 */
+	idle = (cep->snd_max == cep->snd_una);
+
+	/*
+	 *  idle:   ã¢ã¤ãã«æé
+	 *  rxtcur: ç¾å¨ã®åéã¿ã¤ã ã¢ã¦ã
+	 */
+	if (idle && cep->idle >= cep->rxtcur)
+
+		/*
+		 *  snd_cwnd: è¼»è¼³ã¦ã£ã³ããµã¤ãº
+		 *  maxseg  : ç¸æã®æå¤§åä¿¡ã»ã°ã¡ã³ããµã¤ãº
+		 *
+		 *  é·æéã¢ã¤ãã«ã ã£ãã®ã§ã¹ã­ã¼ã¹ã¿ã¼ãå¶å¾¡ã«è¨­å®ããã
+		 */
+		cep->snd_cwnd = cep->maxseg;
+
+	while (error == E_OK && sendalot) {
+		sendalot = false;
+
+		/*
+		 *  snd_nxt: æ¬¡ã«éä¿¡ãã SEQããã®æç¹ã§ã¯ãååéä¿¡ãã SEQ
+		 *  snd_una: æªç¢ºèªã®æå°éä¿¡ SEQãã¾ãã¯ç¢ºèªãããæå¤§éä¿¡ SEQ
+		 *
+		 *  doff: éä¿¡ãéå§ãããªãã»ããã
+		 *                                    swbuf_count (éä¿¡ãããã¡ã«ãããªã¯ãããæ°)
+		 *    0                               V
+		 *    +-------------------------------------------+
+		 *    |                    sbuf                   |
+		 *    +-------------------------------------------+
+		 *    ^               ^
+		 *    |<------------->snd_nxt (ååéä¿¡ãã SEQ)
+		 *    |       doff
+		 *    snd_una (ã¾ã ç¢ºèªããã¦ããªã)
+		 */
+		doff = (uint_t)(cep->snd_nxt - cep->snd_una);
+
+		/*
+		 *  snd_wnd:  ç¸æã®åä¿¡å¯è½ã¦ã£ã³ããµã¤ãº
+		 *  snd_cwnd: è¼»è¼³ã¦ã£ã³ããµã¤ãº
+		 *
+		 *  win: ã©ã¡ããå°ããã¦ã£ã³ããµã¤ãºã«è¨­å®ããã
+		 */
+		win   = cep->snd_wnd < cep->snd_cwnd ? cep->snd_wnd : cep->snd_cwnd;
+	
+		/* åºåãã©ã°ã®è¨­å® */
+		flags = tcp_outflags[cep->fsm_state];
+		if (cep->flags & TCP_CEP_FLG_NEED_FIN)
+			flags |= TCP_FLG_FIN;
+		if (cep->flags & TCP_CEP_FLG_NEED_SYN)
+			flags |= TCP_FLG_SYN;
+		if (cep->flags & TCP_CEP_FLG_FORCE) {
+
+			/*
+			 *  ãããéä¿¡ã¦ã¤ã³ããµã¤ãº (win) ã 0 ãªã 1 ãªã¯ãããéä¿¡ããã
+			 *  ããã§ãªããã°ãæç¶ã¿ã¤ã ã¢ã¦ããã­ã£ã³ã»ã«ãã
+			 *  åéä¿¡åæ° (rxtshift) ã 0 ã«ããã
+			 */
+			if (win == 0) {
+
+				/*
+				 *  doff:        éä¿¡ãããªã¯ãããæ°ã
+				 *  swbuf_count: éä¿¡ãããã¡ã®ä½¿ç¨ä¸­ãµã¤ãº
+				 *
+				 *  éä¿¡ãããã¡ã«æ®ã£ã¦ãããªã¯ããããããããã
+				 *  éä¿¡ãããã¨ãã¦ãããªã¯ãããæ°ããå¤ããã°
+				 *  FIN ãã©ã°ãã¯ãªã¢ããã
+				 */
+				if (doff < cep->swbuf_count)
+					flags &=~TCP_FLG_FIN;
+				win = 1;
+				}
+			else {
+				/*
+				 *  TCP_TIM_PERSIST: æç¶ã¿ã¤ã
+				 *  rxtshift:        åéä¿¡åæ°ã® log(2)
+				 */
+				cep->timer[TCP_TIM_PERSIST] = 0;
+				cep->rxtshift = 0;
+				}
+		 	}
+
+		/*
+		 *  len: ä»åéä¿¡ãããªã¯ãããæ°
+		 *        swbuf_count (éä¿¡ãããã¡ã«ãããªã¯ãããæ°)
+		 *                                    |
+		 *    0                               V
+		 *    +-------------------------------------------+
+		 *    |                    sbuf       |           |
+		 *    +-------------------------------------------+
+		 *    ^               ^<------------->
+		 *    |               |      len
+		 *    |<------------->snd_nxt (ååéä¿¡ãã SEQ)
+		 *    |       doff
+		 *    snd_una (ã¾ã ç¢ºèªããã¦ããªã)
+		 */
+		if (cep->swbuf_count < win)
+			len = (int32_t)cep->swbuf_count - doff;
+		else
+			len = (int32_t)win - doff;
+
+		/*
+		 *  ãã§ã«éä¿¡ããã¦ããã°ãSYN ãããããªãããã
+		 *  ããããä»¥ä¸ã®æ¡ä»¶ã§ã¯éä¿¡ãæ§ããã
+		 *
+		 *    ã»ç¶æ
+ã SYN éä¿¡ã
+		 *    ã»ã»ã°ã¡ã³ãããã¼ã¿ãå«ãã§ããã
+		 */
+		if ((flags & TCP_FLG_SYN) && SEQ_GT(cep->snd_nxt, cep->snd_una)) {
+			flags &= ~TCP_FLG_SYN;
+			doff --;		/* -1 ã¯ SYN ãã©ã°å */
+			len ++;			/* +1 ã¯ SYN ãã©ã°å */
+			if (len > 0 && cep->fsm_state == TCP_FSM_SYN_SENT)
+				break;
+			}
+
+		if (flags & TCP_FLG_SYN) {
+			len = 0;
+			flags &= ~TCP_FLG_FIN;
+			}
+
+		if (len < 0) {
+
+			/*
+			 *  len ã 0 ä»¥ä¸ãªãã0 ã«è¨­å®ããã
+			 *  ãããéä¿¡ã¦ã£ã³ãã¦ãµã¤ãºã 0 ãªãã
+			 *  åéä¿¡ã¿ã¤ããã­ã£ã³ã»ã«ãã
+			 *  ååéä¿¡ãã SEQ (snd_nxt) ã
+			 *  ç¢ºèªãããæå¤§éä¿¡ SEQ (snd_una) ã«æ»ãã
+			 *  ããã¦ãæç¶ã¿ã¤ãã¼ãæ­¢ã¾ã£ã¦ããã°ãåè¨­å®ããã
+			 */
+			len = 0;
+			if (win == 0) {
+				cep->timer[TCP_TIM_REXMT] = 0;
+				cep->rxtshift = 0;
+				cep->snd_nxt  = cep->snd_una;
+				if (cep->timer[TCP_TIM_PERSIST] == 0)
+					tcp_set_persist_timer(cep);
+				}
+			}
+
+
+		/*
+		 *  ä»åéä¿¡ãããªã¯ãããæ° (len) ã¯ã
+		 *  ç¸æã®æå¤§åä¿¡ã»ã°ã¡ã³ããµã¤ãº (maxseg) ãè¶
+ããªãããã«ããã
+		 */
+		if (len > cep->maxseg) {
+			len = cep->maxseg;
+			sendalot = true;
+			}
+
+		/*
+                 *        swbuf_count (éä¿¡ãããã¡ã«ãããªã¯ãããæ°)
+                 *                                           |
+		 *    0                                      V
+		 *    +-------------------------------------------+
+		 *    |                    sbuf       |           |
+		 *    +-------------------------------------------+
+		 *    ^               ^<------------->
+		 *    |               |      len
+		 *    |<------------->snd_nxt (ååéä¿¡ãã SEQ)
+		 *    |       doff
+		 *    snd_una (ã¾ã ç¢ºèªããã¦ããªã)
+		 *
+		 *  ä»åéä¿¡å¾ããéä¿¡ãããã¡ã«ãã¼ã¿ãæ®ã£ã¦ããã°
+		 *  FIN ãã©ã°ãã¯ãªã¢ããã
+		 */
+		if (SEQ_LT(cep->snd_nxt + len, cep->snd_una + cep->swbuf_count))
+			flags &= ~TCP_FLG_FIN;
+
+		/*
+		 *  ãããã win ã¯ãåä¿¡ã¦ã£ã³ãã¦ãµã¤ãºã
+		 *  åä¿¡ãããã¡ã®ç©ºãå®¹é
+		 */
+		win = cep->rbufsz - cep->rwbuf_count;
+
+		/*
+		 *  æããªã¦ã£ã³ãã¦ã»ã·ã³ãã­ã¼ã ã®åé¿å¦ç (éä¿¡å´)
+		 *
+		 *  ä»¥ä¸ã®æ¡ä»¶ã§ãéä¿¡ãè¡ãã
+		 *
+		 *    ã»ãã«ãµã¤ãº (maxseg) ã®ã»ã°ã¡ã³ããéããã¨ãã§ããã
+		 *    ã»ç¸æã®æå¤§ã®åä¿¡ã¦ã£ã³ãã¦ãµã¤ãºã® 1/2 ã®ãã¼ã¿ã
+		 *      éããã¨ãã§ããã
+		 *    ã»éä¿¡ãããã¡ãç©ºã«ã§ããã¢ã¤ãã«ãéé
+å»¶ãªãã·ã§ã³ãæå¹ãªã¨ãã
+		 */
+		if (len) {
+
+			/*
+			 *  ä»åéä¿¡ãããªã¯ãããæ° (len) ã
+			 *  ç¸æã®æå¤§åä¿¡ã»ã°ã¡ã³ããµã¤ãº (maxseg) ã«
+			 *  ä¸è´ããã¨ãã¯éä¿¡ããã
+			 */
+			if (len == cep->maxseg) {
+				error = send_segment(&sendalot, cep, doff, win, (uint_t)len, flags);
+				continue;
+				}
+
+			/*
+			 *  ä»åã®éä¿¡ã§ãéä¿¡ãããã¡ãç©ºã«ã§ãã
+			 *  ã¢ã¤ãã«ãé PUSH ãªãã·ã§ã³ãæå¹ãªã¨ãã
+			 */
+			if ((idle || (cep->flags & TCP_CEP_FLG_NO_DELAY)) &&
+			    (cep->flags & TCP_CEP_FLG_NO_PUSH) == 0 &&
+			    len + doff >= cep->swbuf_count) {
+				error = send_segment(&sendalot, cep, doff, win, (uint_t)len, flags);
+				continue;
+				}
+
+			/*
+			 *  max_sndwnd: ä»ã¾ã§ã®æå¤§éä¿¡ã¦ã£ã³ããµã¤ãº
+			 *  snd_nxt:    æ¬¡ã«éä¿¡ãã SEQ
+			 *  snd_max:    éä¿¡ããæå¤§ SEQ
+			 *
+			 *  æ¬¡ã®æ¡ä»¶ã§ã¯éä¿¡ãè¡ãã
+			 *
+			 *    ã»å¼·å¶éä¿¡ãã©ã°ãã»ããããã¦ããã
+			 *    ã»ãã¼ã¿é·ãç¸æã®æå¤§ã®åä¿¡ã¦ã£ã³ãã¦ãµã¤ãºã® 1/2 ä»¥ä¸ã§ã
+			 *      ç¸æã®æå¤§ã®åä¿¡ã¦ã£ã³ãã¦ãµã¤ãºã 0 ããå¤§ããã
+			 *    ã»æ¬¡ã«éä¿¡ãã SEQ ãéä¿¡ããæå¤§ SEQ ããå°ããã
+			 *      ã¤ã¾ããåéããã¨ãã
+			 */
+			if ((cep->flags & TCP_CEP_FLG_FORCE) ||
+			    (len >= cep->max_sndwnd / 2 && cep->max_sndwnd > 0) ||
+			    SEQ_LT(cep->snd_nxt, cep->snd_max)) {
+				error = send_segment(&sendalot, cep, doff, win, (uint_t)len, flags);
+				continue;
+				}
+			}
+
+
+		/*
+		 *  æããªã¦ã£ã³ãã¦ã»ã·ã³ãã­ã¼ã ã®åé¿å¦ç (åä¿¡å´)
+		 *
+		 *  ã¦ã£ã³ãã¦ãµã¤ãºããã«ãµã¤ãºã® 2 åã®ã»ã°ã¡ã³ãããããã¯
+		 *  åä¿¡ãããã¡å®¹éã® 1/2 ã®ãããããå°ããã»ãã®
+		 *  ãµã¤ãºã§å¢å ãããå ´åã¯ãã¦ã£ã³ãã¦ãµã¤ãºã®æ´æ°ãè¡ãã
+		 */
+		if (win > 0) {
+			long adv;
+
+			/*
+			 *  win:              åä¿¡ãããã¡ã®ç©ºãå®¹é
+			 *  MAX_TCP_WIN_SIZE: TCP ãããã® win ãã£ã¼ã«ãã«è¨­å®ã§ããæå¤§å¤
+			 *  rcv_adv:          åä¿¡ãæå¾
+ãã¦ããæå¤§ã® SEQ
+			 *  rcv_nxt:          åä¿¡ãæå¾
+ãã¦ããæå°ã® SEQ
+			 */
+			if (win < MAX_TCP_WIN_SIZE)
+				adv = win - (cep->rcv_adv - cep->rcv_nxt);
+			else
+				adv = MAX_TCP_WIN_SIZE - (cep->rcv_adv - cep->rcv_nxt);
+
+			if (adv     >= (long)(cep->maxseg * 2) ||
+			    adv * 2 >= (long) cep->rbufsz) {
+				error = send_segment(&sendalot, cep, doff, win, (uint_t)len, flags);
+				continue;
+				}
+			}
+	
+		/*
+		 *  ACK ãéä¿¡ããã
+		 */
+		if (cep->flags & TCP_CEP_FLG_ACK_NOW) {
+			error = send_segment(&sendalot, cep, doff, win, (uint_t)len, flags);
+			continue;
+			}
+
+		if ( (flags & TCP_FLG_RST) ||
+		    ((flags & TCP_FLG_SYN) && (cep->flags & TCP_CEP_FLG_NEED_SYN) == 0)) {
+			error = send_segment(&sendalot, cep, doff, win, (uint_t)len, flags);
+			continue;
+			}
+
+#ifdef TCP_CFG_EXTENTIONS
+
+		if (SEQ_GT(cep->snd_up, cep->snd_una)) {
+			error = send_segment(&sendalot, cep, doff, win, (uint_t)len, flags);
+			continue;
+			}
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+		/*
+		 *  snd_nxt: æ¬¡ã«éä¿¡ãã SEQ
+		 *  snd_una: æªç¢ºèªã®æå°éä¿¡ SEQãã¾ãã¯ç¢ºèªãããæå¤§éä¿¡ SEQ
+		 *
+		 *  ç¸æãã FIN ãåä¿¡ããã¾ã  FIN ãéä¿¡ãã¦ããªããã
+		 *  éããã¼ã¿ããªãã¨ãã¯ãFIN ãç¸æã«å±ããããã
+		 *  ã»ã°ã¡ã³ããéä¿¡ããã
+		 */
+		if ((flags & TCP_FLG_FIN) &&
+		    ((cep->flags & TCP_CEP_FLG_SENT_FIN) == 0 || cep->snd_nxt == cep->snd_una)) {
+			error = send_segment(&sendalot, cep, doff, win, (uint_t)len, flags);
+			continue;
+			}
+
+		/*
+		 *  éä¿¡ãã¹ããã¼ã¿ããããåéã¿ã¤ãã¨æç¶ã¿ã¤ããåãã¦ããã¨ãã¯
+		 *  æç¶ã¿ã¤ããè¨­å®ããã
+		 */
+		if (cep->swbuf_count && cep->timer[TCP_TIM_REXMT  ] == 0 &&
+		                        cep->timer[TCP_TIM_PERSIST] == 0) {
+			cep->rxtshift = 0;
+			tcp_set_persist_timer(cep);
+			break;
+			}
+		
+		}
+	}
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+
+/*
+ *  tcptsk_alloc_swbufq -- éä¿¡ã¦ã£ã³ããããã¡å²ãå½ã¦
+ */
+
+static void
+tcptsk_alloc_swbufq (T_TCP_CEP *cep)
+{
+ 	ER	error;
+	uint_t	win;
+
+	/*
+	 *  snd_wnd:  ç¸æã®åä¿¡å¯è½ã¦ã£ã³ããµã¤ãº
+	 *  snd_cwnd: è¼»è¼³ã¦ã£ã³ããµã¤ãº
+	 *
+	 *  win: ã©ã¡ããå°ããã¦ã£ã³ããµã¤ãºã«è¨­å®ããã
+	 */
+	win = cep->snd_wnd < cep->snd_cwnd ? cep->snd_wnd : cep->snd_cwnd;
+
+	/*
+	 *  ç¸æã®åä¿¡ã¦ã£ã³ããéãã¦ããå ´åã¯ãéãã¾ã§å¾
+æ©ããã
+	 */
+	if (win == 0) {
+		cep->flags = (cep->flags & ~TCP_CEP_FLG_WBCS_MASK) | TCP_CEP_FLG_WBCS_WOPEN_PEND;
+		}
+	else {
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+		/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+		if (!IS_PTR_DEFINED(cep->callback)) {
+			syslog(LOG_WARNING, "[TCP] no call back, CEP: %d.", GET_TCP_CEPID(cep));
+
+			/* è¨æ¶ããã¦ããã¿ã¹ã¯ ID ã¨ API æ©è½ã³ã¼ããã¯ãªã¢ã¼ããã*/
+			cep->snd_tskid = TA_NULL;
+			cep->snd_tfn   = cep->snd_nblk_tfn = TFN_TCP_UNDEF;
+			return;
+			}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+		if ((error = tcp_get_segment(&cep->swbufq, cep, 0,
+		                             (uint_t) TCP_CFG_SWBUF_CSAVE_MIN_SIZE,
+		                             (uint_t)(TCP_CFG_SWBUF_CSAVE_MAX_SIZE - IF_IP_TCP_HDR_SIZE),
+		                             (ATR)(NBA_SEARCH_DESCENT |
+		                                   NBA_RESERVE_TCP    |
+		                                   (GET_TCP_CEPID(cep) & NBA_ID_MASK)), TMO_POL)) != E_OK) {
+
+			/* ãããã¯ã¼ã¯ãããã¡ãäºç´ããã*/
+			cep->flags = (cep->flags & ~TCP_CEP_FLG_WBCS_MASK) | TCP_CEP_FLG_WBCS_NBUF_PEND;
+			}
+		else {
+
+			/* éä¿¡ã¦ã£ã³ããããã¡ãåæåããã*/
+			tcp_init_swbuf(cep);
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+			if (cep->snd_nblk_tfn == TFN_TCP_GET_BUF) {
+
+				uint_t len;
+
+				/* éä¿¡ã¦ã£ã³ããããã¡ã®æ¸ãè¾¼ã¿ã¢ãã¬ã¹ãè¨­å®ããã*/
+				len = TCP_GET_SWBUF_ADDR(cep, cep->snd_p_buf);
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+				/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+				(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, (void*)(uint32_t)len);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+				(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, (void*)&len);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+
+				/* è¨æ¶ããã¦ããã¿ã¹ã¯ ID ã¨ API æ©è½ã³ã¼ããã¯ãªã¢ã¼ããã*/
+				cep->snd_tskid = TA_NULL;
+				cep->snd_tfn   = cep->snd_nblk_tfn = TFN_TCP_UNDEF;
+				}
+
+			else {	/* cep->snd_nblk_tfn == TFN_TCP_SND_DAT || */
+				/* cep->snd_nblk_tfn == TFN_TCP_SND_OOB    */
+
+				uint_t len;
+
+				/* éä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ãæ¸ãè¾¼ãã*/
+				len = TCP_WRITE_SWBUF(cep, cep->snd_data, (uint_t)cep->snd_len);
+
+#ifdef TCP_CFG_EXTENTIONS
+
+				/* éä¿¡ç·æ¥ãã¤ã³ã¿ãè¨­å®ããã*/
+			        if (cep->snd_nblk_tfn == TFN_TCP_SND_OOB)
+					cep->snd_up = cep->snd_una + len;
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+				/* ãã©ã°ããéä¿¡å¯è½ã«è¨­å®ããå¼·å¶çã«éä¿¡ããã*/
+				cep->flags |= TCP_CEP_FLG_FORCE | TCP_CEP_FLG_FORCE_CLEAR | TCP_CEP_FLG_POST_OUTPUT;
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+				/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+				(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, (void*)(uint32_t)len);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+				(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, (void*)&len);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+
+				/* è¨æ¶ããã¦ããã¿ã¹ã¯ ID ã¨ API æ©è½ã³ã¼ããã¯ãªã¢ã¼ããã*/
+				cep->snd_tskid = TA_NULL;
+				cep->snd_tfn   = cep->snd_nblk_tfn = TFN_TCP_UNDEF;
+				}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+			}
+		}
+	}
+
+/*
+ *  tcptsk_free_swbufq -- éä¿¡ã¦ã£ã³ããããã¡éæ¾
+ */
+
+static void
+tcptsk_free_swbufq (T_TCP_CEP *cep)
+{
+	/*
+	 *  åä¿¡ç¢ºèªãå®äºãããããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ããã®
+	 *  åºåãå®äºããã¨ãã¯ãéä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ãè§£æ¾ããã
+	 */
+
+	/* éä¿¡ã¦ã£ã³ããããã¡ã®ä½¿ç¨ä¸­ãµã¤ãºããªã»ããããã*/
+	cep->swbuf_count = 0;
+
+	/* éä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã*/
+	syscall(rel_net_buf(cep->swbufq));
+	cep->swbufq = NULL;
+
+	/* ãã©ã°ãç©ºãã«è¨­å®ããã*/
+	cep->flags = (cep->flags & ~TCP_CEP_FLG_WBCS_MASK) | TCP_CEP_FLG_WBCS_FREE;
+
+	/* éä¿¡ã¦ã£ã³ããããã¡ã«ç©ºããã§ãããã¨ãç¥ãããã*/
+	syscall(set_flg(cep->snd_flgid, TCP_CEP_EVT_SWBUF_READY));
+
+	/* éä¿¡ã¦ã£ã³ããããã¡ã®ç©ºãå¾
+ã¡ã®ã¨ãã¯ãTCP åºåã¿ã¹ã¯ãèµ·åããã*/
+	if ((cep->flags & TCP_CEP_FLG_WBCS_NBUF_REQ) != 0) {
+		sig_sem(SEM_TCP_POST_OUTPUT);
+		}
+	}
+
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+/*
+ *  TCP åºåã¿ã¹ã¯
+ */
+
+void
+tcp_output_task (intptr_t exinf)
+{
+	static int_t last_ix = 0;
+
+	T_TCP_CEP	*cep;
+	ID		tskid;
+ 	int_t		ix, sel_ix;
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[TCP OUTPUT:%d] started.", tskid);
+
+	tcp_init();
+
+#ifdef SUPPORT_INET6
+
+	/* IPv6 ã®ã¹ãã¼ãã¬ã¹ã»ã¢ãã¬ã¹èªåè¨­å®ãå®è¡ããã*/
+	in6_if_up(IF_GET_IFNET());
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+	while (true) {
+
+		/* åºåããã¹ããããã¾ã§å¾
+ã¤ã*/
+		syscall(wai_sem(SEM_TCP_POST_OUTPUT));
+
+		if (++ last_ix == tmax_tcp_cepid)
+			last_ix = 0;
+		sel_ix = ix = last_ix;
+		do {
+			cep = &tcp_cep[ix];
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+
+			if ((cep->flags & TCP_CEP_FLG_WBCS_NBUF_REQ) != 0 &&
+			    ((cep->flags & TCP_CEP_FLG_WBCS_MASK) == TCP_CEP_FLG_WBCS_FREE ||
+			     (cep->flags & TCP_CEP_FLG_WBCS_MASK) == TCP_CEP_FLG_WBCS_NBUF_RSVD)) {
+				tcptsk_alloc_swbufq(cep);
+				sel_ix = ix;
+				}
+
+			if ((cep->flags & TCP_CEP_FLG_WBCS_MASK) == TCP_CEP_FLG_WBCS_ACKED &&
+			    (cep->swbufq->flags & NB_FLG_NOREL_IFOUT) == 0) {
+				tcptsk_free_swbufq(cep);
+				sel_ix = ix;
+				}
+
+			/*
+			 *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ããéä¿¡ãçµãã£ã¦ããªãã¨ãã¯ã
+			 *  éä¿¡ãäºç´ããã
+			 */
+			if (cep->flags & TCP_CEP_FLG_POST_OUTPUT &&
+			   (cep->flags & TCP_CEP_FLG_WBCS_MASK) >= TCP_CEP_FLG_WBCS_SENT) {
+				syscall(wai_sem(cep->semid_lock));
+				if (cep->swbufq == NULL)
+					cep->flags &= ~TCP_CEP_FLG_POST_OUTPUT;
+				else if (cep->swbufq->flags & NB_FLG_NOREL_IFOUT) {
+					cep->flags &= ~TCP_CEP_FLG_POST_OUTPUT;
+					cep->flags |=  TCP_CEP_FLG_RESERVE_OUTPUT;
+					}
+				syscall(sig_sem(cep->semid_lock));
+				}
+
+			/*
+			 *  éä¿¡äºç´ä¸­ã«ããããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ããéä¿¡ãçµäºãããã
+			 *  éä¿¡ãéå§ããããã ããå®å
+¨ã«éä¿¡ãçµäºããã¨ãã¯ä½ãããªãã
+			 */
+			if (cep->flags & TCP_CEP_FLG_RESERVE_OUTPUT) {
+				syscall(wai_sem(cep->semid_lock));
+				if (cep->swbufq != NULL && (cep->swbufq->flags & NB_FLG_NOREL_IFOUT) == 0) {
+					cep->flags |=  TCP_CEP_FLG_POST_OUTPUT;
+					}
+				syscall(sig_sem(cep->semid_lock));
+				cep->flags &= ~TCP_CEP_FLG_RESERVE_OUTPUT;
+				}
+
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+			if (cep->flags & TCP_CEP_FLG_POST_OUTPUT) {
+
+				cep->flags &= ~TCP_CEP_FLG_POST_OUTPUT;
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+				if (cep->snd_nblk_tfn == TFN_TCP_CON_CEP && cep->myaddr.portno == TCP_PORTANY) {
+				 	ER	error;
+
+					/*
+					 *  tcp_con_cep ã®ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ã
+					 *  æªå²å½ã®ã®å ´åã¯ããã¼ãçªå·ãå²ãå½ã¦ãã
+					 *  p_myaddr ã NADR (-1) ãã
+					 *  èªãã¼ãçªå·ã TCP_PORTANY ãªããèªåã§å²ãå½ã¦ãã
+					 */
+					if (cep->p_myaddr == NADR || cep->p_myaddr->portno == TCP_PORTANY)
+						tcp_alloc_auto_port(cep);
+					else if ((error = tcp_alloc_port(cep, cep->p_myaddr->portno)) != E_OK) {
+
+						if (IS_PTR_DEFINED(cep->callback))
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+							(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, (void*)error);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+							(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, (void*)&error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+						else
+							syslog(LOG_WARNING, "[TCP] no call back, CEP: %d.", GET_TCP_CEPID(cep));
+
+						/* è¨æ¶ããã¦ããã¿ã¹ã¯ ID ã¨ API æ©è½ã³ã¼ããã¯ãªã¢ã¼ããã*/
+						cep->snd_tfn   = cep->snd_nblk_tfn = TFN_TCP_UNDEF;
+						cep->snd_tskid = TA_NULL;
+						continue;
+						}
+					}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+				tcp_output(cep);
+
+				if (cep->flags & TCP_CEP_FLG_CLOSE_AFTER_OUTPUT) {
+					/* ã³ãã¯ã·ã§ã³ãéããã*/
+					tcp_close(cep);
+					cep->flags &= ~TCP_CEP_FLG_CLOSE_AFTER_OUTPUT;
+					}
+
+				if (cep->flags & TCP_CEP_FLG_RESTORE_NEXT_OUTPUT) {
+					/* snd_nxt ãå
+ã«æ»ãã*/
+					if (SEQ_GT(cep->snd_old_nxt, cep->snd_nxt))
+						cep->snd_nxt = cep->snd_old_nxt;
+					cep->flags &= ~TCP_CEP_FLG_RESTORE_NEXT_OUTPUT;
+					}
+
+				sel_ix = ix;
+				}
+
+			if (++ ix == tmax_tcp_cepid)
+				ix = 0;
+			} while (ix != last_ix);
+
+		/* æ¬¡åã¯ãå¦çããéä¿¡ç«¯ç¹ãå¾åãã«ããã*/
+		last_ix = sel_ix;
+		}
+	}
+
+#endif	/* of #ifdef SUPPORT_TCP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_seq.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_seq.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_seq.h	(revision 270)
@@ -0,0 +1,135 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993, 1995
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)tcp_seq.h	8.3 (Berkeley) 6/21/95
+ * $FreeBSD: src/sys/netinet/tcp_seq.h,v 1.8.4.1 1999/08/29 16:29:55 peter Exp $
+ */
+ 
+#ifndef _TCP_SEQ_H_
+#define _TCP_SEQ_H_
+
+/*
+ *  SEQ ã¨ ACK çªå·ã¯ã32 ãããç¬¦å·ä»æ´æ°ã§æ¯è¼ããã
+ */
+
+#define SEQ_LT(a,b)		((int32_t)((a)-(b)) <  0)
+#define SEQ_LE(a,b)		((int32_t)((a)-(b)) <= 0)
+#define SEQ_GT(a,b)		((int32_t)((a)-(b)) >  0)
+#define SEQ_GE(a,b)		((int32_t)((a)-(b)) >= 0)
+
+/*
+ *  é¢æ°ã·ãã¥ã¬ã¼ã·ã§ã³ãã¯ã­
+ */
+
+#define	TCP_ISS_INCR()	((T_TCP_SEQ)122*1024 + (((T_TCP_SEQ)net_rand() >> 14) & 0x3ffff))
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+extern T_TCP_SEQ tcp_iss;		/* TCP ã® SEQ ã®åæå¤ */
+
+/*
+ *  ã¤ã³ã©ã¤ã³é¢æ°
+ */
+
+/*
+ *  init_receive_seq -- åä¿¡ SEQ çªå·ãåæåããã
+ */
+
+Inline void
+init_receive_seq (T_TCP_CEP *cep)
+{
+	cep->rcv_adv = cep->rcv_nxt = cep->irs + 1;
+	}
+
+/*
+ *  init_send_seq -- éä¿¡ SEQ çªå·ãåæåããã
+ */
+
+Inline void
+init_send_seq (T_TCP_CEP *cep)
+{
+	cep->snd_una = cep->snd_nxt = cep->snd_max = cep->iss;
+
+#ifdef TCP_CFG_EXTENTIONS
+	cep->snd_up = cep->iss;
+#endif
+	}
+
+#endif	/* of #ifndef _TCP_SEQ_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_subr.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_subr.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_subr.c	(revision 270)
@@ -0,0 +1,1758 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)tcp_subr.c	8.2 (Berkeley) 5/24/95
+ * $FreeBSD: src/sys/netinet/tcp_subr.c,v 1.49.2.4 1999/08/29 16:29:55 peter Exp $
+ */
+
+#include <stdarg.h>
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <syssvc/serial.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_var.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet/in_var.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_timer.h>
+#include <netinet/tcp_var.h>
+#include <netinet/tcp_fsm.h>
+#include <netinet/tcp_seq.h>
+#include <netinet/in_itron.h>
+
+#ifdef SUPPORT_TCP
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+/*
+ *  TCP ã® SEQ ã®åæå¤ããã­ã°ã©ã ãèµ·åãã¦ãæåã« TCP ã»ã°ã¡ã³ãã
+ *  éåä¿¡ããã¨ãã«ãget_tim() ã«ããåæåããã
+ */
+T_TCP_SEQ tcp_iss = 0;
+
+#ifdef SUPPORT_MIB
+
+/*
+ *  SNMP ã® ç®¡çæ
+å ±ãã¼ã¹ (MIB)
+ */
+
+T_TCP_STATS tcp_stats;
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+/*
+ *  å±æå¤æ°
+ */
+
+static uint16_t tcp_port_auto = TCP_PORT_FIRST_AUTO;	/* èªåå²ãå½ã¦çªå·	*/
+
+/*
+ *  tcp_free_reassq -- åä¿¡åæ§æã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã
+ *
+ *    æ³¨æ:
+ *      å¿
+è¦ã§ããã°ããã®é¢æ°ãå¼ã³åºãåã«ãéä¿¡ç«¯ç¹ãã­ãã¯ãã
+ *      æ»ã£ãå¾ãè§£é¤ããå¿
+è¦ãããã
+ */
+
+void
+tcp_free_reassq (T_TCP_CEP *cep)
+{
+	T_NET_BUF	*q, *nq;
+
+	for (q = cep->reassq; q != NULL; q = nq) {
+		nq = GET_TCP_Q_HDR(q, GET_TCP_IP_Q_HDR(q)->thoff)->next;
+		syscall(rel_net_buf(q));
+		}
+	cep->reassq  = NULL;
+	NET_COUNT_TCP(net_count_tcp[NC_TCP_FREE_RCV_QUEUE],   1);
+	}
+
+/*
+ *  tcp_alloc_auto_port -- èªåå²ãå½ã¦ãã¼ãçªå·ãè¨­å®ããã
+ */
+
+void
+tcp_alloc_auto_port (T_TCP_CEP *cep)
+{
+	int_t		ix;
+	uint16_t	portno;
+
+	while (true) {
+		portno = tcp_port_auto ++;
+		if (tcp_port_auto > TCP_PORT_LAST_AUTO)
+			tcp_port_auto = TCP_PORT_FIRST_AUTO;
+
+#ifdef TCP_CFG_PASSIVE_OPEN
+
+		for (ix = tmax_tcp_repid; ix -- > 0; ) {
+
+#ifdef TCP_CFG_EXTENTIONS
+
+			if (VALID_TCP_REP(&tcp_rep[ix]) && tcp_rep[ix].myaddr.portno == portno) {
+				portno = TCP_PORTANY;
+				break;
+				}
+
+#else	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+			if (tcp_rep[ix].myaddr.portno == portno) {
+				portno = TCP_PORTANY;
+				break;
+				}
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+			}
+
+#endif	/* of #ifdef TCP_CFG_PASSIVE_OPEN */
+
+		if (portno != TCP_PORTANY) {
+
+			syscall(wai_sem(SEM_TCP_CEP));
+			for (ix = tmax_tcp_cepid; ix -- > 0; ) {
+				if (VALID_TCP_CEP(&tcp_cep[ix]) && tcp_cep[ix].myaddr.portno == portno) {
+					portno = TCP_PORTANY;
+					break;
+					}
+				}
+
+			if (portno != TCP_PORTANY) {
+				cep->myaddr.portno = portno;
+				syscall(sig_sem(SEM_TCP_CEP));
+				return;
+				}
+			syscall(sig_sem(SEM_TCP_CEP));
+			}
+		}
+	}
+
+/*
+ *  tcp_alloc_port -- æå®ããããã¼ãçªå·ãè¨­å®ããã
+ */
+
+ER
+tcp_alloc_port (T_TCP_CEP *cep, uint16_t portno)
+{
+	int_t	ix;
+
+	syscall(wai_sem(SEM_TCP_CEP));
+	for (ix = tmax_tcp_cepid; ix -- > 0; )
+		if (VALID_TCP_CEP(cep) && tcp_cep[ix].myaddr.portno == portno) {
+			syscall(sig_sem(SEM_TCP_CEP));
+			return E_PAR;
+			}
+	cep->myaddr.portno = portno;
+	syscall(sig_sem(SEM_TCP_CEP));
+	return E_OK;
+	}
+
+/*
+ *  tcp_init -- TCP ã¢ã¸ã¥ã¼ã«ã®åæå
+ */
+
+void
+tcp_init (void)
+{
+	timeout(tcp_slow_timo, NULL, TCP_SLOW_TMO);
+
+#ifdef TCP_CFG_DELAY_ACK
+
+	timeout(tcp_fast_timo, NULL, TCP_FAST_TMO);
+
+#endif/* of #ifdef TCP_CFG_DELAY_ACK */
+	}
+
+/*
+ * tcp_init_iss ã·ã¼ã±ã³ã¹çªå·ãåæåããã
+ */
+
+void
+tcp_init_iss (void)
+{
+	SYSTIM now;
+
+#ifdef SUPPORT_ETHER
+
+	T_IF_SOFTC	*ic;
+
+	ic = IF_ETHER_NIC_GET_SOFTC();
+	syscall(get_tim(&now));
+	net_srand(now + (ic->ifaddr.lladdr[2] << 24)
+	              + (ic->ifaddr.lladdr[3] << 16)
+	              + (ic->ifaddr.lladdr[4] <<  8)
+	              + (ic->ifaddr.lladdr[5]      ));
+
+#else	/* of #ifdef SUPPORT_ETHER */
+
+	syscall(get_tim(&now));
+	net_srand(now);
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+	tcp_iss = net_rand();
+	}
+
+/*
+ *  tcp_close -- ã³ãã¯ã·ã§ã³ãéæ¾ããã
+ */
+
+T_TCP_CEP *
+tcp_close (T_TCP_CEP *cep)
+{
+	/* ã¿ã¤ãã¼ãåæ­¢ããã*/
+	tcp_cancel_timers(cep);
+
+	/* 
+	 *  éä¿¡ç«¯ç¹ãã­ãã¯ãã
+	 *  åä¿¡åæ§æã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã
+	 */
+	syscall(wai_sem(cep->semid_lock));
+	tcp_free_reassq(cep);
+	syscall(sig_sem(cep->semid_lock));
+
+	/* ç¶æ
+ãæªä½¿ç¨ã«ããã*/
+	cep->fsm_state = TCP_FSM_CLOSED;
+
+	/*
+	 * ä»¥ä¸ã«é¢ä¿ããªããã©ã°ãã¯ãªã¢ã¼ããã
+	 * ã»éåä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½
+	 * ã»åçãªéä¿¡ç«¯ç¹ã®çæã»åé¤æ©è½
+	 */
+	cep->flags &= (TCP_CEP_FLG_WBCS_NBUF_REQ | TCP_CEP_FLG_WBCS_MASK | 
+	               TCP_CEP_FLG_DYNAMIC       | TCP_CEP_FLG_VALID);
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	if (cep->snd_nblk_tfn != TFN_TCP_UNDEF || cep->rcv_nblk_tfn != TFN_TCP_UNDEF) {
+		/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+		if (!IS_PTR_DEFINED(cep->callback))
+			syslog(LOG_WARNING, "[TCP] no call back, CEP: %d.", GET_TCP_CEPID(cep));
+		else {
+			if (cep->rcv_nblk_tfn != TFN_TCP_UNDEF) {
+				ER_UINT len;
+
+				switch (cep->rcv_nblk_tfn) {
+
+				case TFN_TCP_ACP_CEP:
+					/* TCP éä¿¡ç«¯ç¹ããTCP åä»å£ãè§£æ¾ããã*/
+					cep->rep = NULL;
+					(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)E_CLS);
+					break;
+
+				case TFN_TCP_RCV_BUF:
+
+					/* åä¿¡ã¦ã£ã³ããããã¡ã®ç©ºã¢ãã¬ã¹ãç²å¾ããã*/
+					len = TCP_GET_RWBUF_ADDR(cep, cep->rcv_p_buf);
+
+					/* ç°å¸¸åæ­ç­ã®ã¨ã©ã¼ãè¨­å®ããã*/
+					if (cep->error == E_TMOUT)
+						len = E_CLS;
+					else if (cep->error < 0)
+						len = cep->error;
+
+					(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)(uint32_t)len);
+					break;
+
+				case TFN_TCP_RCV_DAT:
+
+					/* åä¿¡ã¦ã£ã³ããããã¡ãããã¼ã¿ãåãåºãã*/
+					len = TCP_READ_RWBUF(cep, cep->rcv_data, (uint_t)cep->rcv_len);
+
+					/* ç°å¸¸åæ­ç­ã®ã¨ã©ã¼ãè¨­å®ããã*/
+					if (cep->error == E_TMOUT)
+						len = E_CLS;
+					else if (cep->error != E_OK)
+						len = cep->error;
+
+					(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)(uint32_t)len);
+					break;
+
+				case TFN_TCP_CLS_CEP:
+
+					if (cep->error == E_TMOUT)
+						(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)E_CLS);
+					else
+						(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)cep->error);
+					break;
+
+				default:
+					syslog(LOG_WARNING, "[TCP] unexp TFN: %s.", in_strtfn((FN)cep->rcv_nblk_tfn));
+					break;
+					}
+
+				/* è¨æ¶ããã¦ããã¿ã¹ã¯ ID ã¨ API æ©è½ã³ã¼ããã¯ãªã¢ã¼ããã*/
+				cep->rcv_tskid = TA_NULL;
+				cep->rcv_tfn   = cep->rcv_nblk_tfn = TFN_TCP_UNDEF;
+				}
+
+			if (cep->snd_nblk_tfn != TFN_TCP_UNDEF) {
+
+				switch (cep->snd_nblk_tfn) {
+
+				case TFN_TCP_CON_CEP:
+					/* TCP éä¿¡ç«¯ç¹ãã TCP åä»å£ãè§£æ¾ããã*/
+					cep->rep = NULL;
+					(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, (void*)E_CLS);
+					break;
+
+				case TFN_TCP_SND_DAT:
+				case TFN_TCP_GET_BUF:
+					if (cep->error == E_TMOUT)
+						(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, (void*)E_CLS);
+					else
+						(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, (void*)cep->error);
+					break;
+
+				default:
+					syslog(LOG_WARNING, "[TCP] unexp TFN: %s.", in_strtfn((FN)cep->snd_nblk_tfn));
+					break;
+					}
+
+				/* è¨æ¶ããã¦ããã¿ã¹ã¯ ID ã¨ API æ©è½ã³ã¼ããã¯ãªã¢ã¼ããã*/
+				cep->snd_tskid = TA_NULL;
+				cep->snd_tfn   = cep->snd_nblk_tfn = TFN_TCP_UNDEF;
+				}
+
+			}
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+		if (!IS_PTR_DEFINED(cep->callback))
+			syslog(LOG_WARNING, "[TCP] no call back, CEP: %d.", GET_TCP_CEPID(cep));
+		else {
+			if (cep->rcv_nblk_tfn != TFN_TCP_UNDEF) {
+				ER_UINT len;
+
+				switch (cep->rcv_nblk_tfn) {
+
+				case TFN_TCP_ACP_CEP:
+					/* TCP éä¿¡ç«¯ç¹ããTCP åä»å£ãè§£æ¾ããã*/
+					cep->rep = NULL;
+					len      = E_CLS;
+					(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)&len);
+					break;
+
+				case TFN_TCP_RCV_BUF:
+
+					/* åä¿¡ã¦ã£ã³ããããã¡ã®ç©ºã¢ãã¬ã¹ãç²å¾ããã*/
+					len = TCP_GET_RWBUF_ADDR(cep, cep->rcv_p_buf);
+
+					/* ç°å¸¸åæ­ç­ã®ã¨ã©ã¼ãè¨­å®ããã*/
+					if (cep->error == E_TMOUT)
+						len = E_CLS;
+					else if (cep->error < 0)
+						len = cep->error;
+
+					(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)&len);
+					break;
+
+				case TFN_TCP_RCV_DAT:
+
+					/* åä¿¡ã¦ã£ã³ããããã¡ãããã¼ã¿ãåãåºãã*/
+					len = TCP_READ_RWBUF(cep, cep->rcv_data, (uint_t)cep->rcv_len);
+
+					/* ç°å¸¸åæ­ç­ã®ã¨ã©ã¼ãè¨­å®ããã*/
+					if (cep->error == E_TMOUT)
+						len = E_CLS;
+					else if (cep->error != E_OK)
+						len = cep->error;
+
+					(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)&len);
+					break;
+
+				case TFN_TCP_CLS_CEP:
+					if (cep->error == E_TMOUT)
+						len = E_CLS;
+					else
+						len = cep->error;
+					(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)&len);
+					break;
+
+				default:
+					syslog(LOG_WARNING, "[TCP] unexp TFN: %s.", in_strtfn((FN)cep->rcv_nblk_tfn));
+					break;
+					}
+
+				/* è¨æ¶ããã¦ããã¿ã¹ã¯ ID ã¨ API æ©è½ã³ã¼ããã¯ãªã¢ã¼ããã*/
+				cep->rcv_tskid = TA_NULL;
+				cep->rcv_tfn   = cep->rcv_nblk_tfn = TFN_TCP_UNDEF;
+				}
+
+			if (cep->snd_nblk_tfn != TFN_TCP_UNDEF) {
+				ER_UINT len;
+
+				switch (cep->snd_nblk_tfn) {
+
+				case TFN_TCP_CON_CEP:
+					/* TCP éä¿¡ç«¯ç¹ãã TCP åä»å£ãè§£æ¾ããã*/
+					cep->rep = NULL;
+					len      = E_CLS;
+					(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, (void*)&len);
+					break;
+
+				case TFN_TCP_SND_DAT:
+				case TFN_TCP_GET_BUF:
+					if (cep->error == E_TMOUT)
+						len = E_CLS;
+					else
+						len = cep->error;
+					(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)&len);
+					break;
+
+				default:
+					syslog(LOG_WARNING, "[TCP] unexp TFN: %s.", in_strtfn((FN)cep->snd_nblk_tfn));
+					break;
+					}
+
+				/* è¨æ¶ããã¦ããã¿ã¹ã¯ ID ã¨ API æ©è½ã³ã¼ããã¯ãªã¢ã¼ããã*/
+				cep->snd_tskid = TA_NULL;
+				cep->snd_tfn   = cep->snd_nblk_tfn = TFN_TCP_UNDEF;
+				}
+
+			}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+		/* 
+		 *  éä¿¡ç«¯ç¹ãã­ãã¯ãã
+		 *  éåä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã
+		 */
+		syscall(wai_sem(cep->semid_lock));
+		TCP_FREE_RWBUFQ(cep);
+		TCP_FREE_SWBUFQ(cep);
+		syscall(sig_sem(cep->semid_lock));
+
+		/* æªä½¿ç¨ã«ãªã£ããã¨ãç¥ãããã*/
+		syscall(set_flg(cep->est_flgid, TCP_CEP_EVT_CLOSED));
+		}
+	else {	/* éãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+		/* è¨æ¶ããã¦ããã¿ã¹ã¯ ID ã¨ API æ©è½ã³ã¼ããã¯ãªã¢ã¼ããã*/
+		cep->snd_tskid = cep->rcv_tskid = TA_NULL;
+		cep->snd_tfn   = cep->rcv_tfn   = TFN_TCP_UNDEF;
+
+		/* 
+		 *  éä¿¡ç«¯ç¹ãã­ãã¯ãã
+		 *  éåä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã
+		 */
+		syscall(wai_sem(cep->semid_lock));
+		TCP_FREE_RWBUFQ(cep);
+		TCP_FREE_SWBUFQ(cep);
+		syscall(sig_sem(cep->semid_lock));
+
+		/* æªä½¿ç¨ã«ãªã£ããã¨ãç¥ãããã*/
+		syscall(set_flg(cep->est_flgid, TCP_CEP_EVT_CLOSED));
+
+		/*
+		 * å
+¥åºåã¿ã¹ã¯ãèµ·åºãã¦ã
+		 * éåä¿¡ä¸å¯ã«ãªã£ããã¨ãç¥ãããã
+		 */
+		syscall(set_flg(cep->snd_flgid, TCP_CEP_EVT_SWBUF_READY));
+		syscall(set_flg(cep->rcv_flgid, TCP_CEP_EVT_RWBUF_READY));
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+		}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	return NULL;
+	}
+
+/*
+ *  tcp_drop -- TCP æ¥ç¶ãç ´æ£ããã
+ */
+
+T_TCP_CEP *
+tcp_drop (T_TCP_CEP *cep, ER errno)
+{
+#ifdef SUPPORT_MIB
+
+	if ((cep->fsm_state == TCP_FSM_SYN_SENT) || (cep->fsm_state == TCP_FSM_SYN_RECVD)) {
+		NET_COUNT_MIB(tcp_stats.tcpAttemptFails, 1);
+		}
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+	cep->error = errno;
+	if (TCP_FSM_HAVE_RCVD_SYN(cep->fsm_state)) {
+		cep->fsm_state = TCP_FSM_CLOSED;
+
+		/* éä¿¡ã¨ãéä¿¡å¾ã³ãã¯ã·ã§ã³ã®åæ­ãæç¤ºããã*/
+		cep->flags |=  TCP_CEP_FLG_POST_OUTPUT | TCP_CEP_FLG_CLOSE_AFTER_OUTPUT;
+		sig_sem(SEM_TCP_POST_OUTPUT);
+		}
+	else
+		cep = tcp_close(cep);
+	return cep;
+	}
+
+/*
+ *  tcp_respond -- TCP ã®åä¸ã¡ãã»ã¼ã¸ãéä¿¡ããã
+ */
+
+void
+tcp_respond (T_NET_BUF *output, T_TCP_CEP *cep,
+             T_TCP_SEQ ack, T_TCP_SEQ seq, uint_t rbfree, uint8_t flags)
+{
+	T_IP_HDR	*iph;
+	T_TCP_HDR	*tcph;
+	uint_t		win = 0;
+
+	if ((flags & TCP_FLG_RST) == 0)
+		win = rbfree;
+
+	/*
+	 *  output ã NULL ã§ãªããã°ãããã¯å
+¥åããã»ã°ã¡ã³ãã®
+	 *  net_buf ã§ããã®ã¾ã¾åå©ç¨ããã
+	 */
+	if (output != NULL) {
+		T_IN_ADDR	ipaddr;
+		uint16_t		portno;
+
+		/*
+		 * IPv4 ã§ã¯ãIP ãããã®ãªãã·ã§ã³ãåé¤ããã
+		 * IPv6 ã§ã¯ãæ¡å¼µããããåé¤ããã
+		 */
+		if (IP_REMOVE_OPTIONS(output) != E_OK) {
+			syscall(rel_net_buf(output));
+			return;
+			}
+
+		iph  = GET_IP_HDR(output);
+
+		/* IP ã¢ãã¬ã¹ãäº¤æããã*/
+		ipaddr = iph->src;
+		iph->src = iph->dst;
+		iph->dst = ipaddr;
+
+#if defined(SUPPORT_INET6)
+
+		/* ãã©ããã¯ã¯ã©ã¹ã¨ãã­ã¼ã©ãã«ãã¯ãªã¢ããã*/
+		iph->vcf = htonl(IP6_MAKE_VCF(IP6_VCF_V(ntohl(iph->vcf)), 0));
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+		/* TCP SDU é·ã 0 ã«ããã*/
+		SET_IP_SDU_SIZE(iph, TCP_HDR_SIZE);
+
+		tcph = GET_TCP_HDR(output, IF_IP_TCP_HDR_OFFSET);
+
+		/* ãã¼ãçªå·ãäº¤æããã*/
+		portno = tcph->sport;
+		tcph->sport = tcph->dport;
+		tcph->dport = portno;
+
+		/* TCP ãããã«æ
+å ±ãè¨­å®ããã*/
+		tcph->doff = TCP_MAKE_DATA_OFF(TCP_HDR_SIZE);
+		}
+	
+	/* cep ã NULL ã§ããã°ãä½ãããªãã§çµäºããã*/
+	else if (cep == NULL)
+		return;
+	else {
+		if (tcp_get_segment(&output, cep, 0,
+		                    0, (uint_t)(net_buf_max_siz() - IF_IP_TCP_HDR_SIZE),
+		                    NBA_SEARCH_ASCENT, TMO_TCP_GET_NET_BUF) != E_OK)
+			return;
+		tcph = GET_TCP_HDR(output, IF_IP_TCP_HDR_OFFSET);
+		flags |= TCP_FLG_ACK;
+		}
+
+	tcph->seq   = htonl(seq);
+	tcph->ack   = htonl(ack);
+	tcph->win   = htons(win);
+	tcph->flags = flags;
+	tcph->urp   = tcph->sum = 0;
+
+	/*
+	 *  ãã§ãã¯ãµã ãè¨­å®ããã
+	 */
+	tcph->sum = IN_CKSUM(output, IPPROTO_TCP, IF_IP_TCP_HDR_OFFSET, 
+	                     (uint_t)GET_TCP_HDR_SIZE2(output, IF_IP_TCP_HDR_OFFSET));
+
+	/* ãããã¯ã¼ã¯ãããã¡é·ãèª¿æ´ããã*/
+	output->len = (uint16_t)GET_IF_IP_TCP_HDR_SIZE2(output, IF_IP_TCP_HDR_OFFSET);
+
+#ifdef TCP_CFG_TRACE
+
+	tcp_output_trace(output, cep);
+
+#endif	/* of #ifdef TCP_CFG_TRACE */
+
+	/* ãããã¯ã¼ã¯å±¤ (IP) ã®åºåé¢æ°ãå¼ã³åºãã*/
+	IP_OUTPUT(output, TMO_TCP_OUTPUT);
+	}
+
+/*
+ *  tcp_set_header -- TCP ããããè¨­å®ããã
+ */
+
+void
+tcp_set_header (T_NET_BUF *nbuf, T_TCP_CEP *cep, uint_t thoff, uint_t optlen)
+{
+	T_TCP_HDR	*tcph = GET_TCP_HDR(nbuf, thoff);
+
+	/* TCP ãããã«æ
+å ±ãè¨­å®ããã*/
+	tcph->sport	= htons(cep->myaddr.portno);
+	tcph->dport	= htons(cep->dstaddr.portno);
+	tcph->doff	= TCP_MAKE_DATA_OFF(TCP_HDR_SIZE + optlen);
+	tcph->sum	= tcph->flags = 0;
+	}
+
+/*
+ *  tcp_get_segment -- TCP ã»ã°ã¡ã³ããç²å¾ããããããè¨­å®ããã
+ *
+ *    æ»ãå¤	ã¨ã©ã¼ã³ã¼ã
+ *    optlen	ãªãã·ã§ã³ãµã¤ãºã4 ãªã¯ãããåä½
+ *    len	TCP SDU ãµã¤ãº
+ */
+
+ER
+tcp_get_segment (T_NET_BUF **nbuf, T_TCP_CEP *cep,
+                 uint_t optlen, uint_t len, uint_t maxlen, ATR nbatr, TMO tmout)
+{
+	ER		error;
+
+	/* IP ãã¼ã¿ã°ã©ã ãç²å¾ããã*/
+	if ((error = IN_GET_DATAGRAM(nbuf,
+	                             (uint_t)(TCP_HDR_SIZE + optlen + len),
+	                             (uint_t)(TCP_HDR_SIZE + maxlen),
+	                             &cep->dstaddr.ipaddr,
+	                             &cep->myaddr.ipaddr,
+	                             IPPROTO_TCP, IP_DEFTTL, nbatr, tmout)) != E_OK) {
+		syslog(LOG_WARNING, "[TCP] NET BUF busy,  len:%4d, CEP: %d.",
+		                    (uint16_t)(TCP_HDR_SIZE + optlen + len), GET_TCP_CEPID(cep));
+		return error;
+		}
+
+	/* TCP ãããã«æ
+å ±ãè¨­å®ããã*/
+	tcp_set_header(*nbuf, cep, IF_IP_TCP_HDR_OFFSET, optlen);
+
+	return E_OK;
+	}
+
+/*
+ *  tcp_can_send_more -- éä¿¡ã§ããããéä¿¡ç«¯ç¹ã®ç¶æ
+ãè¦ãã
+ */
+
+ER
+tcp_can_send_more (T_TCP_CEP *cep, FN fncd, TMO tmout)
+{
+	ER	error;
+
+	/* éä¿¡ã§ããããCEP ã® FSM ç¶æ
+ãè¦ãã*/
+	if (!TCP_FSM_CAN_SEND_MORE(cep->fsm_state)) {
+		if ((error = cep->error) == E_OK)
+			error = E_OBJ;
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+		/* ã¿ã¤ã ã¢ã¦ãããã§ãã¯ããã*/
+		if (tmout == TMO_NBLK) {	/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+			if (!IS_PTR_DEFINED(cep->callback))
+				error = E_OBJ;
+			else {
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+				/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+				(*cep->callback)(GET_TCP_CEPID(cep), fncd, (void*)error);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+				(*cep->callback)(GET_TCP_CEPID(cep), fncd, (void*)&error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				error = E_WBLK;
+				}
+			}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+		}
+	else {
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+
+		error = E_OK;
+
+#else	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+		if (!IS_PTR_DEFINED(cep->sbuf)) {
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+			/* ã¿ã¤ã ã¢ã¦ãããã§ãã¯ããã*/
+			if (tmout == TMO_NBLK) {	/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+				if (!IS_PTR_DEFINED(cep->callback))
+					error = E_OBJ;
+				else {
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+					/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+					(*cep->callback)(GET_TCP_CEPID(cep), fncd, (void*)E_OBJ);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+					/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+					error = E_OBJ;
+					(*cep->callback)(GET_TCP_CEPID(cep), fncd, (void*)&error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+					error = E_WBLK;
+					}
+				}
+			else
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+				error = E_OBJ;
+			}
+		else
+			error = E_OK;
+
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+		}
+
+	return error;
+	}
+
+/*
+ *  tcp_can_recv_more -- åä¿¡ã§ããããéä¿¡ç«¯ç¹ã®ç¶æ
+ãè¦ãã
+ *
+ *  æ³¨æ: æ»ãå¤
+ *
+ *	E_OK	åä¿¡å¯è½
+ *	E_OBJ	ç¸æããåæ­ãããããã¨ã©ã¼ãçºçããã
+ */
+
+ER
+tcp_can_recv_more (ER *error, T_TCP_CEP *cep, FN fncd, TMO tmout)
+{
+	/*
+	 *  åä¿¡ã§ããããfsm_state ãè¦ããåä¿¡ã§ããªãå ´åã¯
+	 *  é·ã 0ãã¾ãã¯ã¨ã©ã¼ãè¿ãã
+	 */
+	if (!TCP_FSM_CAN_RECV_MORE(cep->fsm_state) &&
+	    cep->rwbuf_count == 0 && cep->reassq == NULL) {
+		*error = cep->error;
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+		/* ã¿ã¤ã ã¢ã¦ãããã§ãã¯ããã*/
+		if (tmout == TMO_NBLK) {	/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+			if (!IS_PTR_DEFINED(cep->callback))
+				*error = E_OBJ;
+			else {
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+				/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+				(*cep->callback)(GET_TCP_CEPID(cep), fncd, (void*)*error);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+				(*cep->callback)(GET_TCP_CEPID(cep), fncd, (void*)error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				*error = E_WBLK;
+				}
+			}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+		/*
+		 *  éä¿¡ç«¯ç¹ãã­ãã¯ãã¦ã
+		 *  åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã
+		 */
+		syscall(wai_sem(cep->semid_lock));
+		TCP_FREE_RWBUFQ(cep);
+		syscall(sig_sem(cep->semid_lock));
+
+		return E_OBJ;
+		}
+	else {
+
+#ifndef TCP_CFG_RWBUF_CSAVE
+
+		if (!IS_PTR_DEFINED(cep->rbuf)) {
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+			/* ã¿ã¤ã ã¢ã¦ãããã§ãã¯ããã*/
+			if (tmout == TMO_NBLK) {	/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+				if (!IS_PTR_DEFINED(cep->callback))
+					*error = E_OBJ;
+				else {
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+					/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+					(*cep->callback)(GET_TCP_CEPID(cep), fncd, (void*)E_OBJ);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+					/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+					*error = E_OBJ;
+					(*cep->callback)(GET_TCP_CEPID(cep), fncd, (void*)error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+					*error = E_WBLK;
+					}
+				}
+			else
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+				*error = E_OBJ;
+
+			return E_OBJ;
+			}
+
+#endif	/* of #ifndef TCP_CFG_RWBUF_CSAVE */
+
+		return E_OK;
+		}
+	}
+
+/*
+ *  tcp_wait_rwbuf -- åä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ãå
+¥ãã®ãå¾
+ã¤ã
+ */
+
+ER
+tcp_wait_rwbuf (T_TCP_CEP *cep, TMO tmout)
+{
+	ER	error;
+	FLGPTN	flag;
+
+	if (cep->rwbuf_count == 0) {
+		/* åä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ããªããã°ãå
+¥åãããã¾ã§å¾
+ã¤ã*/
+		while (cep->rwbuf_count == 0) {
+			if ((error = twai_flg(cep->rcv_flgid, TCP_CEP_EVT_RWBUF_READY, TWF_ORW, &flag, tmout)) != E_OK) {
+				return error;
+				}
+			syscall(clr_flg(cep->rcv_flgid, (FLGPTN)(~TCP_CEP_EVT_RWBUF_READY)));
+
+			/*
+			 *  åä¿¡ã§ããããfsm_state ãè¦ããåä¿¡ã§ããªãç¶æ
+ã§ã
+			 *  åä¿¡ã¦ã£ã³ããããã¡ã«æå­ããªãå ´åã¯çµäºããã
+			 */
+			if (!TCP_FSM_CAN_RECV_MORE(cep->fsm_state) &&
+			    cep->rwbuf_count == 0 && cep->reassq == NULL) {
+
+				/*
+				 *  éä¿¡ç«¯ç¹ãã­ãã¯ãã¦ã
+				 *  åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã
+				 */
+#ifdef TCP_CFG_RWBUF_CSAVE
+#endif
+				syscall(wai_sem(cep->semid_lock));
+				TCP_FREE_RWBUFQ(cep);
+				syscall(sig_sem(cep->semid_lock));
+
+				return cep->error;
+				}
+			}
+		}
+	else
+		syscall(clr_flg(cep->rcv_flgid, (FLGPTN)(~TCP_CEP_EVT_RWBUF_READY)));
+
+	return E_OK;
+	}
+
+/*
+ *  tcp_move_ra2rw -- åä¿¡åæ§æã­ã¥ã¼ã§åæ§æããã»ã°ã¡ã³ããåä¿¡ã¦ã£ã³ããããã¡ã«æ¸ãè¾¼ãã
+ */
+
+uint8_t
+tcp_move_ra2rw (T_TCP_CEP *cep, uint8_t flags)
+{
+	T_NET_BUF	*q;
+	T_TCP_Q_HDR	*qhdr;
+
+	/*
+	 *  åä¿¡ãã¼ã¿ãåä¿¡ã¦ã£ã³ããããã¡ã«æ¸ãè¾¼ã¿ã
+	 *  rcv_nxt ãå®äºãã SEQ ã ãé²ããã
+	 */
+	if (TCP_FSM_HAVE_ESTABLISHED(cep->fsm_state)) {
+		while (cep->reassq != NULL) {
+			q = cep->reassq;
+			qhdr = GET_TCP_Q_HDR(q, GET_TCP_IP_Q_HDR(q)->thoff);
+			if (qhdr->seq != cep->rcv_nxt)
+				break;
+
+			/* æ¬¡ã®ã»ã°ã¡ã³ãã«é²ãã*/
+			cep->reassq = qhdr->next;
+
+			/* FIN ãã©ã°ã®ã¿æ®ãã*/
+			flags &= TCP_FLG_FIN;
+
+			/* ãã¼ã¿ãåä¿¡ã¦ã£ã³ããããã¡ã«æ¸ãè¾¼ãã*/
+			TCP_WRITE_RWBUF(cep, q, (uint_t)(GET_TCP_IP_Q_HDR(q)->thoff));
+			}
+		}
+	if (cep->reassq != NULL) {
+		cep->flags |= TCP_CEP_FLG_ACK_NOW;
+		flags &= ~TCP_FLG_FIN;
+		}
+	return flags;
+	}
+
+/*
+ *  tcp_write_raque -- åä¿¡ã»ã°ã¡ã³ããåæ§æãã¦ãåä¿¡åæ§æã­ã¥ã¼ã«ç¹ãã
+ */
+
+uint8_t
+tcp_write_raque (T_NET_BUF *input, T_TCP_CEP *cep, uint_t thoff, uint8_t flags)
+{
+	T_NET_BUF	*new;
+	T_NET_BUF	*p, *q, *nq;
+	T_TCP_Q_HDR	*qhdr, *inqhdr = GET_TCP_Q_HDR(input, thoff);
+	int32_t		len;
+
+	/*  TCP ãããã®ä½ç½®ãä¿å­ããã*/
+	GET_TCP_IP_Q_HDR(input)->thoff = thoff;
+
+	/*
+	 *  MAX_TCP_REALLOC_SIZE ä»¥ä¸ã®å ´åã¯ãæ°ãã«ãããã¯ã¼ã¯ãããã¡ã
+	 *  å²å½ã¦ã¦ããã¼ã¿ãã³ãã¼ããã
+	 *  ãã®ã¨ããIP ã®ãªãã·ã§ã³ï¼æ¡å¼µãããï¼ã¨ TCP ã®ãªãã·ã§ã³ã¯åé¤ããã
+	 */
+	len  = IF_IP_TCP_HDR_SIZE + inqhdr->slen;
+
+	if (len <= MAX_TCP_REALLOC_SIZE) {
+
+		/*
+		 *  ãããã¯ã¼ã¯ãããã¡ãç¢ºä¿ã§ããªãã¨ãã¯å²å½ã¦ãªãã
+		 */
+		if (tget_net_buf(&new, (uint_t)len, TMO_TCP_GET_NET_BUF) != E_OK)
+			new = NULL;
+		}
+	else
+		new = NULL;
+
+	/*
+	 *    inqhdr->seq               
+	 *    |
+	 *    |<------- inqhdr->slen ------->|
+	 *    v                              v
+	 *    +------------------------------+
+	 *    |             input            |
+	 *    +------------------------------+
+	 *        ^                  ^
+	 *        |<----- slen ----->|
+	 *        |
+	 *        soff
+	 *
+	 */
+	inqhdr->soff = 0;
+
+	/*
+	 *  ä»åè¿½å ããã»ã°ã¡ã³ãããå(p)ã¨å¾(q)ã®ã»ã°ã¡ã³ããæ¢ãã
+	 *
+	 *    +-------------------------+
+	 *    |            p            |
+	 *    +-------------------------+
+	 *    ^              +---------------------------+
+	 *    p->seq         |            input          |
+	 *                   +---------------------------+
+	 *                   ^                      +-------------------------+
+	 *                   inqhdr->seq            |            q            |
+	 *                                          +-------------------------+
+	 *                                          ^
+	 *                                          q->seq
+	 */
+	for (q = cep->reassq, p = NULL; q != NULL; ) {
+		qhdr = GET_TCP_Q_HDR(q, GET_TCP_IP_Q_HDR(q)->thoff);
+		if (SEQ_GT(qhdr->seq, inqhdr->seq))
+			break;
+		p = q;
+		q = qhdr->next;
+		}
+
+	/*
+	 *  å(p)ã®ã»ã°ã¡ã³ããããã°ãæ¢ã«ãä»åã¨åãã»ã°ã¡ã³ãã
+	 *  ãããã¨ãããããã®å ´åã¯ããã®é¨åã¾ãã¯å
+¨ã¦ãç ´æ£ããã
+	 *
+	 *    qhdr->seq
+	 *    |
+	 *    |<----- qhdr->slen ------>|
+	 *    v                         v
+	 *    +-------------------------+
+	 *    |            p            |
+	 *    +-------------------------+
+	 *                    <--len -->
+	 *                   +---------------------------+
+	 *                   |            input          |
+	 *                   +---------------------------+
+	 *                   ^
+	 *                   inqhdr->seq
+	 */
+	if (p != NULL) {
+		qhdr = GET_TCP_Q_HDR(p, GET_TCP_IP_Q_HDR(p)->thoff);
+		len = qhdr->seq + qhdr->slen - inqhdr->seq;
+		if (len > 0) {
+
+			/*
+			 *  len ãæ­£ã§ããã°ãå(p) ã®ã»ã°ã¡ã³ãã¨ä»åã®
+			 *  ã»ã°ã¡ã³ããéãªã£ã¦ããã
+			 */
+			if (len >= inqhdr->slen) {
+
+				/*
+				 *  len ãä»åã®ã»ã°ã¡ã³ãã¨åããªã
+				 *  ã¾ã£ããåãã»ã°ã¡ã³ããªã®ã§ä½ãããªãã
+				 */
+				if (new != NULL) {
+					syscall(rel_net_buf(new));
+					}
+
+				syscall(rel_net_buf(input));
+				return flags;
+				}
+
+			/*
+			 *  è¿½å ããã»ã°ã¡ã³ãã® SDU ã len ååã«è©°ããã
+			 */
+			inqhdr->seq  += len;
+			inqhdr->soff += (uint16_t)len;
+			inqhdr->slen -= (uint16_t)len;
+			}
+		}
+
+	/*
+	 *  ã­ã¥ã¼ã«ã¤ãªãåã«ãæ°ãããããã¯ã¼ã¯ãããã¡ã«ãã¼ã¿ãç§»ãã
+	 *  TCP ã®ãªãã·ã§ã³ã¯åé¤ããã
+	 */
+	if (new != NULL) {
+		memcpy(new->buf, input->buf, (size_t)(thoff + TCP_HDR_SIZE));
+		memcpy((uint8_t*)GET_TCP_HDR(new, thoff) + TCP_HDR_SIZE,
+		                 GET_TCP_SDU(input, thoff), (size_t)(inqhdr->slen));
+		syscall(rel_net_buf(input));
+		input = new;
+		inqhdr = GET_TCP_Q_HDR(input, thoff);
+		inqhdr->doff = (uint8_t)TCP_MAKE_DATA_OFF(TCP_HDR_SIZE);
+		}
+
+	/*
+	 *  éãªãå¾(q)ã®ã»ã°ã¡ã³ããèª¿æ´ããã
+	 *
+	 *    inqhdr->seq
+	 *    |
+	 *    |<----- inqhdr->slen ---->|
+	 *    v                         v
+	 *    +-------------------------+
+	 *    |          input          |
+	 *    +-------------------------+
+	 *                    <--len -->
+	 *                   +---------------------------+
+	 *                   |              q            |
+	 *                   +---------------------------+
+	 *                   ^
+	 *                   qhdr->seq
+	 */
+	while (q != NULL) {
+		qhdr = GET_TCP_Q_HDR(q, GET_TCP_IP_Q_HDR(q)->thoff);
+		len = inqhdr->seq + inqhdr->slen - qhdr->seq;
+		if (len <= 0)
+			/* len ãè² ãªãéãªã£ã¦ããªãã*/
+			break;
+		else if (len < qhdr->slen) {
+
+			/*
+			 *  å¾ãã§éãªã£ã¦ããã»ã°ã¡ã³ãã® SDU ã len ååã«è©°ããã
+			 *
+			 *    inqhdr->seq
+			 *    |
+			 *    |<----- inqhdr->slen ---->|
+			 *    v                         v
+			 *    +-------------------------+
+			 *    |          input          |
+			 *    +-------------------------+
+			 *                    <--len -->
+			 *            +------+---------------------------+
+			 *            |      |              q            |
+			 *            +------+---------------------------+
+			 *                   ^--------->
+			 *                   qhdr->seq
+			 *                   qhdr->soff
+			 */
+			qhdr->seq  += len;
+			qhdr->soff += (uint16_t)len;
+			qhdr->slen -= (uint16_t)len;
+			break;
+			}
+		nq = qhdr->next;
+		if (p)
+			GET_TCP_Q_HDR(p, GET_TCP_IP_Q_HDR(p)->thoff)->next = nq;
+		else
+			cep->reassq = nq;
+		syscall(rel_net_buf(q));
+		q = nq;
+		}
+
+	if (p == NULL) {
+		inqhdr->next = cep->reassq;
+		cep->reassq = input;
+		}
+	else {
+		inqhdr->next = GET_TCP_Q_HDR(p, GET_TCP_IP_Q_HDR(p)->thoff)->next;
+		GET_TCP_Q_HDR(p, GET_TCP_IP_Q_HDR(p)->thoff)->next = input;
+		}
+
+	return tcp_move_ra2rw(cep, flags);
+	}
+
+/*
+ *  tcp_rexmt_val -- åéã¿ã¤ã ã¢ã¦ãå¤ãè¿ãã
+ */
+
+T_TCP_TIME
+tcp_rexmt_val (T_TCP_CEP *cep)
+{
+	T_TCP_TIME val;
+
+	val = ((cep->srtt >> (TCP_SRTT_SHIFT - TCP_DELTA_SHIFT)) + cep->rttvar) >> TCP_DELTA_SHIFT;
+	if (val < TCP_TVAL_MIN)
+		return TCP_TVAL_MIN;
+	else
+		return val;
+	}
+
+/*
+ *  tcp_init_cep -- éä¿¡ç«¯ç¹ãåæåããã
+ */
+
+void
+tcp_init_cep (T_TCP_CEP *cep)
+{
+#ifdef TCP_CFG_RWBUF_CSAVE
+	/*
+	 * åä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãæå¹ã«ããå ´åã
+	 * åä¿¡ã¦ã£ã³ããããã¡ãå
+¨ã¦è§£æ¾ãããªããã¨ãããã®ã§ã
+	 * ããã§è§£æ¾ããã
+	 */
+	if (cep->rwbufq != NULL) {
+		cep->rwbuf_count = 0;
+		TCP_FREE_RWBUFQ(cep);
+		}
+#endif	/* of #ifdef TCP_CFG_RWBUF_CSAVE */
+
+	memset((uint8_t*)cep + offsetof(T_TCP_CEP, timer), 0,
+	       sizeof(T_TCP_CEP) - offsetof(T_TCP_CEP, timer));
+
+	cep->sbuf_rptr	= cep->sbuf_wptr = cep->sbuf;
+	cep->rbuf_rptr	= cep->rbuf_wptr = cep->rbuf;
+
+	cep->maxseg	= DEF_TCP_SND_SEG;		/* éä¿¡æå¤§ã»ã°ã¡ã³ããµã¤ãº		*/
+	cep->srtt	= TCP_TVAL_SRTT_BASE;		/* æ»ãããªç§»åå¹³å			*/
+	cep->rttvar	= ((TCP_TVAL_RTO_BASE - TCP_TVAL_SRTT_BASE) << TCP_RTTVAR_SHIFT) / 4;
+							/* æ»ãããªåæ£				*/
+	cep->rxtcur	= TCP_TVAL_RTO_BASE;		/* ç¾å¨ã®åéå¤				*/
+	cep->snd_cwnd	=  MAX_TCP_WIN_SIZE;		/* è¼»è¼³ã¦ã£ã³ããµã¤ãº			*/
+	cep->snd_ssthresh= MAX_TCP_WIN_SIZE;		/* è¼»è¼³ã¦ã£ã³ããµã¤ãº(snd_cwnd)ã®	å¶éå¤	*/
+
+	/*
+	 * ä»¥ä¸ã«é¢ä¿ããªããã©ã°ãã¯ãªã¢ã¼ããã
+	 * ã»éåä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½
+	 * ã»åçãªéä¿¡ç«¯ç¹ã®çæã»åé¤æ©è½
+	 */
+	cep->flags &= (TCP_CEP_FLG_WBCS_NBUF_REQ | TCP_CEP_FLG_WBCS_MASK | 
+	               TCP_CEP_FLG_DYNAMIC       | TCP_CEP_FLG_VALID);
+
+	/* ã»ããã©ãåæåããã*/
+	sig_sem (cep->semid_lock);
+
+	/* ãã©ã°ãåæåããã*/
+	syscall(set_flg(cep->snd_flgid, TCP_CEP_EVT_SWBUF_READY));
+	syscall(clr_flg(cep->rcv_flgid, TCP_CEP_EVT_RWBUF_READY));
+	}
+
+/*
+ *  tcp_notify -- ICMP ã¨ã©ã¼ã®å¦ç
+ */
+
+void
+tcp_notify (T_NET_BUF *input, ER error)
+{
+	T_IP_HDR	*iph;
+	T_TCP_HDR	*tcph;
+	T_TCP_CEP	*cep;
+
+	iph  = GET_IP_HDR(input);
+	tcph = GET_TCP_HDR(input, GET_TCP_HDR_OFFSET(input));
+
+	if ((cep = tcp_find_cep(&iph->src, tcph->sport, &iph->dst, tcph->dport)) != NULL) {
+
+		/*
+		 *  ã³ãã¯ã·ã§ã³éè¨­æ¸ã§ããã¹ãå°éä¸è½ã¨ã©ã¼ã®å ´åã¯ã
+		 *  åéã«ããå¦çããã
+		 */
+		if (cep->fsm_state == TCP_FSM_ESTABLISHED &&
+		    (error == EV_NURCH || error == EV_HURCH || error == EV_HDOWN))
+			return;
+
+		/*
+		 *  ã³ãã¯ã·ã§ã³éè¨­ä¸­ãåãã¨ã©ã¼ãä½åº¦ãåä¿¡ããå ´åã¯ã
+		 *  å¾
+ã¡ç¶æ
+ãè§£é¤ããå¯¾å¿ããé¢æ°ã«ã¨ã©ã¼ãè¿ãããã
+		 */
+		if (cep->fsm_state < TCP_FSM_ESTABLISHED && cep->rxtshift > 3 && cep->net_error != E_OK) {
+			cep->error = E_CLS;
+			tcp_close(cep);
+			}
+		else {
+			cep->net_error = error;
+
+			/* éä¿¡ãæç¤ºããã*/
+			cep->flags |=  TCP_CEP_FLG_POST_OUTPUT;
+			sig_sem(SEM_TCP_POST_OUTPUT);
+			}
+		}
+	}
+
+/*
+ *  tcp_find_cep -- ãã¼ãçªå·ãã TCP éä¿¡ç«¯ç¹ãå¾ãã
+ *
+ *    æ³¨æ: dstaddr ã¯ã
+ *          TINET-1.2 ãããããã¯ã¼ã¯ãã¤ããªã¼ãã
+ *          TINET-1.1 ã¾ã§ã¯ããã¹ããã¤ããªã¼ã
+ */
+
+T_TCP_CEP*
+tcp_find_cep (T_IN_ADDR *dstaddr, uint16_t dstport, T_IN_ADDR *peeraddr, uint16_t peerport)
+{
+	T_TCP_CEP*	cep;
+	
+	/*
+	 *  ç¶æ
+ã SYN éä¿¡æ¸ã¿ä»¥å¾ã¯ã
+	 *  IP ã¢ãã¬ã¹ã¨ãã¼ãçªå·ãä¸è´ããéä¿¡ç«¯ç¹ãæ¢ç´¢ããã
+	 */
+	for (cep = &tcp_cep[tmax_tcp_cepid]; cep -- != tcp_cep; ) {
+		if (cep->fsm_state >= TCP_FSM_SYN_SENT                    &&
+		    IN_IS_DSTADDR_ACCEPT (&cep->myaddr.ipaddr,  dstaddr)  &&
+		    IN_ARE_NET_ADDR_EQUAL(&cep->dstaddr.ipaddr, peeraddr) &&
+		    dstport  == cep->myaddr.portno                        &&
+		    peerport == cep->dstaddr.portno)
+			return cep;
+		}
+
+	/* ååãªã¼ãã³ä¸­ã®éä¿¡ç«¯ç¹ãæ¢ç´¢ããã*/	
+	for (cep = &tcp_cep[tmax_tcp_cepid]; cep -- != tcp_cep; ) {
+		if (cep->fsm_state == TCP_FSM_LISTEN &&
+		    IN_IS_DSTADDR_ACCEPT(&cep->myaddr.ipaddr, dstaddr) &&
+		    dstport == cep->myaddr.portno)
+			return cep;
+		}
+
+	return NULL;
+	}
+
+/*
+ *  tcp_lock_cep -- TCP éä¿¡ç«¯ç¹ãã­ãã¯ããã
+ */
+
+ER
+tcp_lock_cep (ID cepid, T_TCP_CEP **p_cep, FN tfn)
+{
+	T_TCP_CEP	*cep;
+	ER		error = E_OK;
+
+	*p_cep = NULL;
+
+	/* TCP éä¿¡ç«¯ç¹ ID ããã§ãã¯ããã*/
+	if (!VAID_TCP_CEPID(cepid))
+		return E_ID;
+
+	/* TCP éä¿¡ç«¯ç¹ãå¾ãã*/
+	cep = GET_TCP_CEP(cepid);
+
+	/* TCP éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	/* TCP éä¿¡ç«¯ç¹ããã§ãã¯ããã*/
+	if (!VALID_TCP_CEP(cep)) {
+		syscall(sig_sem(cep->semid_lock));
+		return E_NOEXS;
+		}
+
+	/*
+	 *  API æ©è½ã³ã¼ãã¨ã¿ã¹ã¯è­å¥å­ãè¨é²ããã
+	 *  ãã§ã«è¨é²ããã¦ããã°ããã³ãã£ã³ã°ä¸­ãªã®ã§ã¨ã©ã¼
+	 */
+	if (IS_TFN_TCP_RCV(tfn)) {
+		if (cep->rcv_tfn != TFN_TCP_UNDEF ||
+		    (tfn == TFN_TCP_ACP_CEP && cep->snd_tfn == TFN_TCP_CON_CEP)) 
+			error = E_OBJ;
+		else {
+			get_tid(&(cep->rcv_tskid));
+			cep->rcv_tfn = tfn;
+			}
+		}
+	else {
+		if (cep->snd_tfn != TFN_TCP_UNDEF ||
+		    (tfn == TFN_TCP_CON_CEP && cep->rcv_tfn == TFN_TCP_ACP_CEP) ||
+		    (tfn == TFN_TCP_CON_CEP && cep->rcv_tfn == TFN_TCP_CLS_CEP))
+			error = E_OBJ;
+		else {
+			get_tid(&(cep->snd_tskid));
+			cep->snd_tfn = tfn;
+			}
+		}
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	*p_cep = cep;
+	return error;
+	}
+
+#ifdef TCP_CFG_TRACE
+
+#ifndef CONSOLE_PORTID
+#define	CONSOLE_PORTID		LOGTASK_PORTID
+#endif
+
+/*
+ *  ã³ãã¯ã·ã§ã³ã®ç¶æ
+
+ */
+
+static const char tcp_strfsm[][3] = {
+	{ 'C', 'D', '\0' },
+	{ 'L', 'I', '\0' },
+	{ 'S', 'S', '\0' },
+	{ 'S', 'R', '\0' },
+	{ 'E', 'S', '\0' },
+	{ 'C', 'W', '\0' },
+	{ 'F', '1', '\0' },
+	{ 'C', 'G', '\0' },
+	{ 'L', 'A', '\0' },
+	{ 'F', '2', '\0' },
+	{ 'T', 'W', '\0' },
+	};
+
+/*
+ *  trace_putchar -- ã·ãªã¢ã«ãã¼ãã¸ã®æå­åºå
+ */
+
+static void
+trace_putchar (ID portid, char ch)
+{
+	serial_wri_dat(portid, &ch, 1);
+	/*cpu_putc(ch);*/
+	}
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãã¸ã®æ¸å¼ä»æå­ååºåã©ã¤ãã©ãª
+ */
+
+/*
+ *  æ°å¤å¤æã®ããã®å¤æè¡¨
+ */
+
+static const char radhex[] = "0123456789abcdef";
+static const char radHEX[] = "0123456789ABCDEF";
+
+/*
+ *  convert -- trace_printf ã®æ°å¤å¤æ
+ */
+
+static int_t
+convert (ID portid, long_t val, int_t radix,
+         const char *radchar, int_t width, bool_t minus, char padchar)
+{
+	char	digits[24];
+	int_t	ix, pad, pchars;
+
+	ix = 0;
+	do {
+		if (minus)
+			digits[ix ++] = radchar[val % radix];
+		else
+			digits[ix ++] = radchar[(ulong_t)val % radix];
+		val /= radix;
+		} while (val != 0);
+
+	if (minus)
+		digits[ix ++] = '-';
+
+	if (width > ix)
+		pchars = width;
+	else
+		pchars = ix;
+
+	for (pad = ix; pad < width; pad ++)
+		trace_putchar(portid, padchar);
+
+	while (ix -- > 0)
+		trace_putchar(portid, digits[ix]);
+
+	return pchars;
+	}
+
+/*
+ *  trace_printf -- ã·ãªã¢ã«ãã¼ãã¸ã®æ¸å¼ä»æå­ååºå
+ */
+
+static void
+trace_printf (ID portid, const char *fmt, ...)
+{
+	va_list	ap;
+	ulong_t	val;
+	char	padchar, *str;
+	int_t	ch, width, longflag;
+
+	va_start(ap, fmt);
+	while ((ch = *fmt ++) != '\0') {
+		if (ch != '%') {		/* æ¸å¼æå®ä»¥å¤ */
+			trace_putchar(portid, (char)ch);
+			continue;
+			}
+
+		width = longflag = 0;
+		padchar = ' ';
+		if ((ch = *fmt ++) == '0') {	/* ä¸ä½æ¡ã® 0 */
+			padchar = '0';
+			ch = *fmt ++;
+			}
+
+		while ('0' <= ch && ch <= '9') {	/* åºåå¹
+ */
+			width = width * 10 + ch - '0';
+			ch = *fmt ++;
+			}
+
+		while (ch == 'l') {		/* long (long) ã®æå® */
+			longflag ++;
+			ch = *fmt ++;
+			}
+
+		switch (ch) {
+		case 'd':
+			val = longflag ? (ulong_t)va_arg(ap, long_t)
+			               : (ulong_t)va_arg(ap, int_t);
+			if (val >= 0)
+				convert(portid,  val, 10, radhex, width, false, padchar);
+			else
+				convert(portid, -val, 10, radhex, width, true, padchar);
+			break;
+
+		case 'u':
+			val = longflag ? (ulong_t)va_arg(ap, ulong_t)
+			               : (ulong_t)va_arg(ap, uint_t);
+			convert(portid, val, 10, radhex, width, false, padchar);
+			break;
+
+		case 'x':
+			val = longflag ? (ulong_t)va_arg(ap, ulong_t)
+			               : (ulong_t)va_arg(ap, uint_t);
+			convert(portid, val, 16, radhex, width, false, padchar);
+			break;
+
+		case 'X':
+			val = longflag ? (ulong_t)va_arg(ap, ulong_t)
+			               : (ulong_t)va_arg(ap, uint_t);
+			convert(portid, val, 16, radHEX, width, false, padchar);
+			break;
+
+		case 'c':
+			ch = va_arg(ap, int_t);
+			trace_putchar(portid, (char)ch);
+			break;
+
+		case 's':
+			str = va_arg(ap, char*);
+			while ((ch = *str ++) != '\0')
+				trace_putchar(portid, (char)ch);
+			break;
+
+		case '%':
+			trace_putchar(portid, '%');
+			break;
+
+		case '0':
+			fmt --;
+			break;
+
+		default:
+			break;
+			}
+
+		}
+	va_end(ap);
+	}
+
+/*
+ *  TCP ãã©ã°æå­å
+ */
+
+static char *
+get_tcp_flag_str (char *buf, uint8_t flags)
+{
+	static char tcp_flag_str[] = "FSRPAU";
+
+	int_t	bit, mask = 1;
+
+	for (bit = 0; bit < sizeof(tcp_flag_str); bit ++) {
+		buf[sizeof(tcp_flag_str) - bit - 1] = (char)((flags & mask) ? tcp_flag_str[bit] : '-');
+		mask <<= 1;
+		}
+	buf[sizeof(tcp_flag_str)] = '\0';
+	return buf;
+	}
+
+/*
+ *  éä¿¡ TCP ãããã®ãã¬ã¼ã¹åºå
+ */
+
+void
+tcp_output_trace (T_NET_BUF *output, T_TCP_CEP *cep)
+{
+	SYSTIM		time;
+	T_IP_HDR	*iph;
+	T_TCP_HDR	*tcph;
+	char		buf[9];
+
+	if (!(TCP_CFG_TRACE_LPORTNO == TCP_PORTANY || cep->myaddr.portno  == TCP_CFG_TRACE_LPORTNO) ||
+	    !(TCP_CFG_TRACE_RPORTNO == TCP_PORTANY || cep->dstaddr.portno == TCP_CFG_TRACE_RPORTNO))
+		return;
+
+#if defined(SUPPORT_INET4)
+
+	if (!(TCP_CFG_TRACE_IPV4_RADDR == IPV4_ADDRANY || cep->dstaddr.ipaddr == TCP_CFG_TRACE_IPV4_RADDR))
+		return;
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+	syscall(wai_sem(SEM_TCP_TRACE));
+	syscall(get_tim(&time));
+	iph  = GET_IP_HDR(output);
+	tcph = GET_TCP_HDR(output, GET_TCP_HDR_OFFSET(output));
+	if (time > 99999999)
+		trace_printf(CONSOLE_PORTID, "=O%10d", time / 1000);
+	else
+		trace_printf(CONSOLE_PORTID, "=O%6d.%03d", time / 1000, time % 1000);
+	if (cep == NULL)
+		trace_printf(CONSOLE_PORTID, "=c:-- s:-- f:-----");
+	else
+		trace_printf(CONSOLE_PORTID, "=c:%2d s:%s f:%05x",
+		                             GET_TCP_CEPID(cep),
+		                             tcp_strfsm[cep->fsm_state], cep->flags);
+	trace_printf(CONSOLE_PORTID, ":%s", get_tcp_flag_str(buf, tcph->flags));
+	if (cep->fsm_state >= TCP_FSM_ESTABLISHED)
+		trace_printf(CONSOLE_PORTID, " s:%10u a:%10u",
+		                             ntohl(tcph->seq) - cep->iss,
+		                             ntohl(tcph->ack) - cep->irs);
+	else
+		trace_printf(CONSOLE_PORTID, " s:%10u a:%10u",
+		                             ntohl(tcph->seq), ntohl(tcph->ack));
+	trace_printf(CONSOLE_PORTID, " w:%5d l:%4d>\n", 
+	                             ntohs(tcph->win),
+	                             GET_IP_SDU_SIZE(iph) - TCP_HDR_LEN(tcph->doff));
+	syscall(sig_sem(SEM_TCP_TRACE));
+	}
+
+/*
+ *  åä¿¡ TCP ãããã®ãã¬ã¼ã¹åºå
+ *
+ *    æ³¨æ: TCP ãããå
+ã¯ããã§ã«ãã¹ããã¤ããªã¼ã
+ */
+
+void
+tcp_input_trace (T_NET_BUF *input, T_TCP_CEP *cep)
+{
+	SYSTIM		time;
+	T_IP_HDR	*iph;
+	T_TCP_HDR	*tcph;
+	char		buf[9];
+
+	if (!(TCP_CFG_TRACE_LPORTNO == TCP_PORTANY || cep->myaddr.portno  == TCP_CFG_TRACE_LPORTNO) ||
+	    !(TCP_CFG_TRACE_RPORTNO == TCP_PORTANY || cep->dstaddr.portno == TCP_CFG_TRACE_RPORTNO))
+		return;
+
+#if defined(SUPPORT_INET4)
+
+	if (!(TCP_CFG_TRACE_IPV4_RADDR == IPV4_ADDRANY || cep->dstaddr.ipaddr == TCP_CFG_TRACE_IPV4_RADDR))
+		return;
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+	syscall(wai_sem(SEM_TCP_TRACE));
+	syscall(get_tim(&time));
+	iph  = GET_IP_HDR(input);
+	tcph = GET_TCP_HDR(input, GET_TCP_HDR_OFFSET(input));
+	if (time > 99999999)
+		trace_printf(CONSOLE_PORTID, "<I%10d", time / 1000);
+	else
+		trace_printf(CONSOLE_PORTID, "<I%6d.%03d", time / 1000, time % 1000);
+	if (cep == NULL)
+		trace_printf(CONSOLE_PORTID, "=c:-- s:-- f:-----");
+	else
+		trace_printf(CONSOLE_PORTID, "=c:%2d s:%s f:%05x",
+		                             GET_TCP_CEPID(cep),
+		                             tcp_strfsm[cep->fsm_state], cep->flags);
+	trace_printf(CONSOLE_PORTID, ":%s", get_tcp_flag_str(buf, tcph->flags));
+	if (cep->fsm_state >= TCP_FSM_SYN_RECVD)
+		trace_printf(CONSOLE_PORTID, " a:%10u s:%10u", tcph->ack - cep->iss, tcph->seq - cep->irs);
+	else
+		trace_printf(CONSOLE_PORTID, " a:%10u s:%10u", tcph->ack, tcph->seq);
+	trace_printf(CONSOLE_PORTID, " w:%5d l:%4d=\n", 
+	                             tcph->win, GET_IP_SDU_SIZE(iph) - TCP_HDR_LEN(tcph->doff));
+	syscall(sig_sem(SEM_TCP_TRACE));
+	}
+
+#endif	/* of #ifdef TCP_CFG_TRACE */
+
+#endif	/* of #ifdef SUPPORT_TCP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_subr_cs.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_subr_cs.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_subr_cs.c	(revision 270)
@@ -0,0 +1,1151 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)tcp_subr.c	8.2 (Berkeley) 5/24/95
+ * $FreeBSD: src/sys/netinet/tcp_subr.c,v 1.49.2.4 1999/08/29 16:29:55 peter Exp $
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_var.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet/in_var.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_timer.h>
+#include <netinet/tcp_var.h>
+#include <netinet/tcp_fsm.h>
+#include <netinet/tcp_seq.h>
+#include <netinet/in_itron.h>
+
+#ifdef SUPPORT_TCP
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+
+#ifndef TCP_CFG_SWBUF_CSAVE_ONLY
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®éä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãæå¹ãªå ´å
+ *  ãã ããéä¿¡ç«¯ç¹ã®éä¿¡ã¦ã£ã³ããããã¡ï¼cep->sbufï¼ã®å¤ã«ããã
+ *  TCP éä¿¡ç«¯ç¹æ¯ã«éä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãä½¿ç¨ãããã
+ *  ä½¿ç¨ããªãããåãæ¿ããã
+ */
+
+/*
+ *  tcp_drop_swbuf -- éä¿¡ã¦ã£ã³ããããã¡ããæå®ããããªã¯ãããååé¤ããï¼é¸æï¼ã
+ */
+
+void
+tcp_drop_swbuf (T_TCP_CEP *cep, uint_t len)
+{
+	if (IS_PTR_DEFINED(cep->sbuf))
+		tcp_drop_swbuf_ncs(cep, len);
+	else
+		tcp_drop_swbuf_cs(cep, len);
+	}
+
+/*
+ *  tcp_write_swbuf -- éä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ãæ¸ãè¾¼ãï¼é¸æï¼ã
+ */
+
+ER_UINT
+tcp_write_swbuf (T_TCP_CEP *cep, void *data, uint_t len)
+{
+	if (IS_PTR_DEFINED(cep->sbuf))
+		return tcp_write_swbuf_ncs(cep, data, len);
+	else
+		return tcp_write_swbuf_cs(cep, data, len);
+	}
+
+/*
+ *  tcp_read_swbuf -- éä¿¡ã¦ã£ã³ããããã¡ãããã¼ã¿ãèª­ã¿åºãï¼é¸æï¼ã
+ */
+
+void
+tcp_read_swbuf (T_TCP_CEP *cep, T_NET_BUF *output, uint_t len, uint_t doff)
+{
+	if (IS_PTR_DEFINED(cep->sbuf))
+		tcp_read_swbuf_ncs(cep, output, len, doff);
+	}
+
+/*
+ *  tcp_wait_swbuf -- éä¿¡ã¦ã£ã³ããããã¡ã¨ç¸æã®åä¿¡ã¦ã£ã³ããéãã®ãå¾
+ã¤ï¼é¸æï¼ã
+ */
+
+ER
+tcp_wait_swbuf (T_TCP_CEP *cep, TMO tmout)
+{
+	if (IS_PTR_DEFINED(cep->sbuf))
+		return tcp_wait_swbuf_ncs(cep, tmout);
+	else
+		return tcp_wait_swbuf_cs(cep, tmout);
+	}
+
+/*
+ *  tcp_get_swbuf_addr -- éä¿¡ã¦ã£ã³ããããã¡ã®ç©ºãã¢ãã¬ã¹ãç²å¾ããï¼é¸æï¼ã
+ */
+
+ER_UINT
+tcp_get_swbuf_addr (T_TCP_CEP *cep, void **p_buf)
+{
+	if (IS_PTR_DEFINED(cep->sbuf))
+		return tcp_get_swbuf_addr_ncs(cep, p_buf);
+	else
+		return tcp_get_swbuf_addr_cs(cep, p_buf);
+	}
+
+/*
+ *  tcp_send_swbuf -- éä¿¡ã¦ã£ã³ããããã¡ã®ãã¼ã¿ãéä¿¡å¯è½ã«ããï¼é¸æï¼ã
+ */
+
+void
+tcp_send_swbuf (T_TCP_CEP *cep, uint_t len)
+{
+	if (IS_PTR_DEFINED(cep->sbuf))
+		tcp_send_swbuf_ncs(cep, len);
+	else
+		tcp_send_swbuf_cs(cep, len);
+	}
+
+/*
+ *  tcp_free_swbufq -- éä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®è§£æ¾ãæç¤ºããï¼é¸æï¼ã
+ */
+
+void
+tcp_free_swbufq (T_TCP_CEP *cep)
+{
+	if (!IS_PTR_DEFINED(cep->sbuf))
+		tcp_free_swbufq_cs(cep);
+	}
+
+/*
+ *  tcp_alloc_swbuf -- éä¿¡ã¦ã£ã³ããããã¡ç¨ã®ãããã¯ã¼ã¯ãããã¡ã®å²ãå½ã¦ãæç¤ºããï¼é¸æï¼ã
+ */
+
+void
+tcp_alloc_swbuf (T_TCP_CEP *cep)
+{
+	if (!IS_PTR_DEFINED(cep->sbuf))
+		tcp_alloc_swbuf_cs(cep);
+	}
+
+/*
+ *  tcp_is_swbuf_full -- éä¿¡ã¦ã£ã³ããããã¡ãæºæ¯ããã§ãã¯ããï¼é¸æï¼ã
+ */
+
+bool_t
+tcp_is_swbuf_full (T_TCP_CEP *cep)
+{
+	if (IS_PTR_DEFINED(cep->sbuf))
+		return tcp_is_swbuf_full_ncs(cep);
+	else
+		return tcp_is_swbuf_full_cs(cep);
+	}
+
+#endif	/* of #ifndef TCP_CFG_SWBUF_CSAVE_ONLY */
+
+/*
+ *  tcp_drop_swbuf_cs -- éä¿¡ã¦ã£ã³ããããã¡ããæå®ããããªã¯ãããååé¤ããï¼å°ç¨ï¼ã
+ */
+
+void
+tcp_drop_swbuf_cs (T_TCP_CEP *cep, uint_t len)
+{
+
+	/*éä¿¡ã¦ã£ã³ããããã¡ããæå®ããããªã¯ãããååé¤ããã*/
+	cep->swbuf_count -= (uint16_t)len;
+
+	/* éä¿¡æ¸ã¿ã§ãACKå¾
+ã¡ã®æã¯ãACKå®äºã«å¤æ´ããã*/
+	if (len > 0 && (cep->flags & TCP_CEP_FLG_WBCS_MASK) == TCP_CEP_FLG_WBCS_SENT) {
+		cep->flags = (cep->flags & ~TCP_CEP_FLG_WBCS_MASK) | TCP_CEP_FLG_WBCS_ACKED;
+		sig_sem(SEM_TCP_POST_OUTPUT);
+		}
+	}
+
+/*
+ *  tcp_write_swbuf_cs -- éä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ãæ¸ãè¾¼ãï¼å°ç¨ï¼ã
+ */
+
+ER_UINT
+tcp_write_swbuf_cs (T_TCP_CEP *cep, void *data, uint_t len)
+{
+	ER_UINT	error;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	if ((error = net_buf_siz(cep->swbufq)) > 0 && error >= IF_IP_TCP_HDR_SIZE) {
+
+
+		/*
+		 *  +-----------+--------+---------+---------+
+		 *  | Ehter HDR | IP HDR | TCP HDR | TCP SDU |
+		 *  +-----------+--------+---------+---------+
+		 *        14        20        20        n
+		 *   <---------------- error --------------->
+		 *              ^
+		 *              net_buf ã§ 4 ãªã¯ãããå¢çã«ã¢ã©ã¤ã³ããã¦ããã
+		 *
+		 *  tcp_output ã¨ ip_output ã§ããã§ãã¯ãµã ãè¨ç®ããã¨ãã
+		 *  n ã 4 ãªã¯ãããå¢çã«ãªãããã« SDU ã®å¾ãã« 0 ã
+		 *  ãããã£ã³ã°ããããã®åãèæ
+®ãã¦éä¿¡ã¦ã£ã³ããããã¡ã®
+		 *  ç©ºããµã¤ãºã 4 ãªã¯ãããå¢çã«èª¿æ´ããã
+		 */
+		error = (uint_t)(((error - IF_IP_TCP_HDR_SIZE) >> 2 << 2) + IF_IP_TCP_HDR_SIZE);
+
+		if (len > cep->sbufsz - cep->swbuf_count)
+			len = (uint_t)(cep->sbufsz - cep->swbuf_count);
+		if (len > (error - IF_IP_TCP_HDR_SIZE))
+			len = (uint_t)(error - IF_IP_TCP_HDR_SIZE);
+
+		/* éä¿¡ã¦ã¤ã³ããµã¤ãºã«ãããµã¤ãºãèª¿æ´ããã*/
+		if (len > cep->snd_wnd) 
+			len = cep->snd_wnd;
+		if (len > cep->snd_cwnd)
+			len = cep->snd_cwnd;
+
+		/* ç¸æã®æå¤§åä¿¡ã»ã°ã¡ã³ããµã¤ãº (maxseg) ãè¶
+ããªãããã«ããã*/
+		if (len > cep->maxseg) 
+			len = cep->maxseg;
+
+		/* ãã¼ã¿ãç§»ãã*/
+		memcpy(cep->sbuf_wptr, (void*)((uint8_t*)data), (size_t)len);
+		cep->sbuf_wptr   += len;
+		cep->swbuf_count += len;
+		error             = len;
+
+		/* ãããã¯ã¼ã¯ãããã¡é·ã¨ IP ãã¼ã¿ã°ã©ã é·ãè¨­å®ããã*/
+		cep->swbufq->len = (uint16_t)(cep->swbuf_count + IF_IP_TCP_HDR_SIZE);
+		SET_IP_SDU_SIZE(GET_IP_HDR(cep->swbufq), cep->swbuf_count + TCP_HDR_SIZE);
+
+		/* ãã©ã°ããéä¿¡å¯è½ã«è¨­å®ããã*/
+		cep->flags = (cep->flags & ~TCP_CEP_FLG_WBCS_MASK) | TCP_CEP_FLG_WBCS_SEND_READY;
+		}
+
+	else {	/* éä¿¡ã¦ã¤ã³ããããã¡ãä¸æ­£ */
+		syslog(LOG_WARNING, "[TCP] illegal window buff for send, CEP: %d, %4d < %4d.",
+		                    GET_TCP_CEPID(cep), error, IF_IP_TCP_HDR_SIZE);
+
+		/* éä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã*/
+		tcp_free_swbufq_cs(cep);
+		}
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	return error;
+	}
+
+/*
+ *  tcp_wait_swbuf_cs -- éä¿¡ã¦ã£ã³ããããã¡ã¨ç¸æã®åä¿¡ã¦ã£ã³ããéãã®ãå¾
+ã¤ï¼å°ç¨ï¼ã
+ */
+
+ER
+tcp_wait_swbuf_cs (T_TCP_CEP *cep, TMO tmout)
+{
+	FLGPTN	flag;
+	SYSTIM	before, after;
+	ER	error;
+	int_t	win;
+
+
+	/* éä¿¡ã¦ã£ã³ããããã¡ãå²å½ã¦æ¸ã¿ã§ãç©ºããããã°çµäºããã*/
+	if ((cep->flags & TCP_CEP_FLG_WBCS_MASK) == TCP_CEP_FLG_WBCS_NBUF_READY &&
+	    (cep->swbuf_count + IF_IP_TCP_HDR_SIZE) < net_buf_siz(cep->swbufq))
+		return E_OK;
+
+	/* éä¿¡ä¸­ã§ããã°ãçµäºããã¾ã§å¾
+æ©ããã*/
+	while ((cep->flags & TCP_CEP_FLG_WBCS_MASK) != TCP_CEP_FLG_WBCS_FREE) {
+
+		/* éä¿¡å¾
+ã¡ã®æéã tmout ããæ¸ããã*/
+		if (!(tmout == TMO_POL || tmout == TMO_FEVR))
+			syscall(get_tim(&before));
+
+		if ((error = twai_flg(cep->snd_flgid, TCP_CEP_EVT_SWBUF_READY,
+		                      TWF_ORW, &flag, tmout)) != E_OK)
+			return error;
+		syscall(clr_flg(cep->snd_flgid, (FLGPTN)(~TCP_CEP_EVT_SWBUF_READY)));
+
+		/* éä¿¡å¾
+ã¡ã®æéã tmout ããæ¸ããã*/
+		if (!(tmout == TMO_POL || tmout == TMO_FEVR)) {
+			syscall(get_tim(&after));
+			if (after - before > tmout)
+				return E_TMOUT;
+			tmout -= (TMO)(after - before);
+			}
+
+		/*
+		 *  éä¿¡ã§ããããCEP ã® FSM ç¶æ
+ãè¦ãã
+		 *  éä¿¡ã¦ã¤ã³ããããã¡ãç©ºãã¾ã§å¾
+ã¤éã«ãéä¿¡ä¸è½ã«ãªã£ãå ´åã¯ã
+		 *  ã³ãã¯ã·ã§ã³ãåæ­ããããã¨ãæå³ãã¦ããã
+		 */
+		if (!TCP_FSM_CAN_SEND_MORE(cep->fsm_state))
+			return E_CLS;
+		}
+
+	/* ç¸æã®åä¿¡ã¦ã£ã³ããéãã¦ããå ´åã¯ãéãã¾ã§å¾
+æ©ããã*/
+	while (true) {
+
+		/*
+		 *  snd_wnd:  ç¸æã®åä¿¡å¯è½ã¦ã£ã³ããµã¤ãº
+		 *  snd_cwnd: è¼»è¼³ã¦ã£ã³ããµã¤ãº
+		 *
+		 *  win: ã©ã¡ããå°ããã¦ã£ã³ããµã¤ãºã«è¨­å®ããã
+		 */
+		win = cep->snd_wnd < cep->snd_cwnd ? cep->snd_wnd : cep->snd_cwnd;
+		if (win > 0)
+			break;
+
+		/* éãå¾
+ã¡ã®æéã tmout ããæ¸ããã*/
+		if (!(tmout == TMO_POL || tmout == TMO_FEVR))
+			syscall(get_tim(&before));
+
+		if ((error = twai_flg(cep->snd_flgid, TCP_CEP_EVT_SWBUF_READY,
+		                      TWF_ORW, &flag, tmout)) != E_OK)
+			return error;
+		syscall(clr_flg(cep->snd_flgid, (FLGPTN)(~TCP_CEP_EVT_SWBUF_READY)));
+
+		/* éãå¾
+ã¡ã®æéã tmout ããæ¸ããã*/
+		if (!(tmout == TMO_POL || tmout == TMO_FEVR)) {
+			syscall(get_tim(&after));
+			if (after - before > tmout)
+				return E_TMOUT;
+			tmout -= (TMO)(after - before);
+			}
+
+		/*
+		 *  éä¿¡ã§ããããCEP ã® FSM ç¶æ
+ãè¦ãã
+		 *  éä¿¡ã¦ã¤ã³ããããã¡ãç©ºãã¾ã§å¾
+ã¤éã«ãéä¿¡ä¸è½ã«ãªã£ãå ´åã¯ã
+		 *  ã³ãã¯ã·ã§ã³ãåæ­ããããã¨ãæå³ãã¦ããã
+		 */
+		if (!TCP_FSM_CAN_SEND_MORE(cep->fsm_state))
+			return E_CLS;
+		}
+
+	/* ãããã¯ã¼ã¯ãããã¡ãç²å¾ããã*/
+	if ((error = tcp_get_segment(&cep->swbufq, cep, 0,
+	                             TCP_CFG_SWBUF_CSAVE_MIN_SIZE,
+	                             TCP_CFG_SWBUF_CSAVE_MAX_SIZE - IF_IP_TCP_HDR_SIZE,
+	                             NBA_SEARCH_DESCENT, tmout)) != E_OK)
+		return error;
+
+	/* éä¿¡ã¦ã£ã³ããããã¡ãåæåããã*/
+	tcp_init_swbuf(cep);
+
+	return E_OK;
+	}
+
+/*
+ *  tcp_get_swbuf_addr_cs -- éä¿¡ã¦ã£ã³ããããã¡ã®ç©ºãã¢ãã¬ã¹ãç²å¾ããï¼å°ç¨ï¼ã
+ */
+
+ER_UINT
+tcp_get_swbuf_addr_cs (T_TCP_CEP *cep, void **p_buf)
+{
+	ER_UINT	error;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	if ((error = net_buf_siz(cep->swbufq)) > 0) {
+
+		/*
+		 *  +-----------+--------+---------+---------+
+		 *  | Ehter HDR | IP HDR | TCP HDR | TCP SDU |
+		 *  +-----------+--------+---------+---------+
+		 *        14        20        20        n
+		 *   <---------------- error --------------->
+		 *              ^
+		 *              net_buf ã§ 4 ãªã¯ãããå¢çã«ã¢ã©ã¤ã³ããã¦ããã
+		 *
+		 *  tcp_output ã¨ ip_output ã§ããã§ãã¯ãµã ãè¨ç®ããã¨ãã
+		 *  n ã 4 ãªã¯ãããå¢çã«ãªãããã« SDU ã®å¾ãã« 0 ã
+		 *  ãããã£ã³ã°ããããã®åãèæ
+®ãã¦éä¿¡ã¦ã£ã³ããããã¡ã®
+		 *  ç©ºããµã¤ãºã 4 ãªã¯ãããå¢çã«èª¿æ´ããã
+		 */
+		error = (uint_t)(((error - IF_IP_TCP_HDR_SIZE) >> 2 << 2) - cep->swbuf_count);
+
+		/* éä¿¡ã¦ã¤ã³ããµã¤ãºã«ãããµã¤ãºãèª¿æ´ããã*/
+		if (error > cep->snd_wnd) 
+			error = cep->snd_wnd;
+		if (error > cep->snd_cwnd)
+			error = cep->snd_cwnd;
+
+		/* ç¸æã®æå¤§åä¿¡ã»ã°ã¡ã³ããµã¤ãº (maxseg) ãè¶
+ããªãããã«ããã*/
+		if (error > cep->maxseg) 
+			error = cep->maxseg;
+
+		/* éä¿¡ã¦ã£ã³ããããã¡ã®ç©ºããã¼ã¿é·ãè¨­å®ãããã®å¤ãè¿ãã*/
+		cep->get_buf_len = error;
+
+		/* éä¿¡ã¦ã£ã³ããããã¡ã®ç©ºãã¢ãã¬ã¹ã®å
+é ­ãè¨­å®ããã*/
+		*p_buf = cep->sbuf_wptr;
+		}
+
+	else {	/* ãããã¯ã¼ã¯ãããã¡ãä¸æ­£ */
+
+		/* éä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã*/
+		tcp_free_swbufq_cs(cep);
+		}
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	return error;
+	}
+
+/*
+ *  tcp_send_swbuf_cs -- éä¿¡ã¦ã£ã³ããããã¡ã®ãã¼ã¿ãéä¿¡å¯è½ã«ããï¼å°ç¨ï¼ã
+ */
+
+void
+tcp_send_swbuf_cs (T_TCP_CEP *cep, uint_t len)
+{
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	cep->sbuf_wptr  += len;
+	cep->swbuf_count += len;
+
+	/* ãããã¯ã¼ã¯ãããã¡é·ã¨ IP ãã¼ã¿ã°ã©ã é·ãè¨­å®ããã*/
+	cep->swbufq->len = (uint16_t)(cep->swbuf_count + IF_IP_TCP_HDR_SIZE);
+	SET_IP_SDU_SIZE(GET_IP_HDR(cep->swbufq), len + TCP_HDR_SIZE);
+
+	/* tcp_get_buf ã®å²å½ã¦é·ããªã»ããããã*/
+	cep->get_buf_len = 0;
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	/* ãã©ã°ããéä¿¡å¯è½ã«è¨­å®ããå¼·å¶çã«éä¿¡ããã*/
+	cep->flags = (cep->flags & ~TCP_CEP_FLG_WBCS_MASK) | TCP_CEP_FLG_WBCS_SEND_READY
+	                                               | TCP_CEP_FLG_FORCE
+	                                               | TCP_CEP_FLG_FORCE_CLEAR
+	                                               | TCP_CEP_FLG_POST_OUTPUT;
+	}
+
+/*
+ *  tcp_free_swbufq_cs -- éä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®è§£æ¾ãæç¤ºããï¼å°ç¨ï¼ã
+ *
+ *    æ³¨æ:
+ *      å¿
+è¦ã§ããã°ããã®é¢æ°ãå¼ã³åºãåã«ãéä¿¡ç«¯ç¹ãã­ãã¯ãã
+ *      æ»ã£ãå¾ãè§£é¤ããå¿
+è¦ãããã
+ */
+
+void
+tcp_free_swbufq_cs (T_TCP_CEP *cep)
+{
+	/* éä¿¡ã¦ã£ã³ããããã¡ã®ç©ºãå¾
+ã¡ãåãæ¶ãã*/
+	cep->flags &= ~TCP_CEP_FLG_WBCS_NBUF_REQ;
+
+	if ((cep->flags & TCP_CEP_FLG_WBCS_MASK) != TCP_CEP_FLG_WBCS_FREE) {
+		/*
+		 *  éä¿¡ã¦ã£ã³ããããã¡ãåé¤ããããã«ããã©ã°ã ACK å®äºã«è¨­å®ãã
+		 *  TCP åºåã¿ã¹ã¯ãèµ·åããã
+		 */
+		cep->flags = (cep->flags & ~TCP_CEP_FLG_WBCS_MASK) | TCP_CEP_FLG_WBCS_ACKED;
+		sig_sem(SEM_TCP_POST_OUTPUT);
+		}
+	}
+
+/*
+ *  tcp_alloc_swbuf_cs -- éä¿¡ã¦ã£ã³ããããã¡ç¨ã®ãããã¯ã¼ã¯ãããã¡ã®å²ãå½ã¦ãæç¤ºããï¼å°ç¨ï¼ã
+ */
+
+void
+tcp_alloc_swbuf_cs (T_TCP_CEP *cep)
+{
+	cep->flags |= TCP_CEP_FLG_WBCS_NBUF_REQ;
+
+	/*
+	 *  éä¿¡ã¦ã£ã³ããããã¡ãæªä½¿ç¨ã®å ´åã®ã¿ã
+	 *  éä¿¡ã¦ã£ã³ããããã¡ç¨ã®ãããã¯ã¼ã¯ãããã¡ã®å²ãå½ã¦ãæç¤ºããã
+	 */
+	if ((cep->flags & TCP_CEP_FLG_WBCS_MASK) == TCP_CEP_FLG_WBCS_FREE)
+		sig_sem(SEM_TCP_POST_OUTPUT);
+	}
+
+/*
+ *  tcp_is_swbuf_full_cs -- éä¿¡ã¦ã£ã³ããããã¡ãæºæ¯ããã§ãã¯ããï¼å°ç¨ï¼ã
+ */
+
+bool_t
+tcp_is_swbuf_full_cs (T_TCP_CEP *cep)
+{
+	return (cep->flags & TCP_CEP_FLG_WBCS_MASK) != TCP_CEP_FLG_WBCS_NBUF_READY ||
+	        cep->swbuf_count >= cep->swbufq->len - IF_IP_TCP_HDR_SIZE;
+	}
+
+/*
+ *  tcp_init_swbuf -- éä¿¡ã¦ã£ã³ããããã¡ãåæåããï¼å°ç¨ï¼ã
+ *
+ *    æ³¨æ: tcp_get_segment ã§ãããã¯ã¼ã¯ãããã¡ãç²å¾ãã
+ *          ç´å¾ã«å¼ã³åºããã¨ã
+ */
+
+void
+tcp_init_swbuf (T_TCP_CEP *cep)
+{
+	/* éä¿¡ã¦ã¤ã³ããããã¡ã®ä½¿ç¨ä¸­ãµã¤ãºããªã»ããããã*/
+	cep->swbuf_count = 0;
+
+	/* éä¿¡ã¦ã¤ã³ããããã¡ã®ã¢ãã¬ã¹ãè¨­å®ããã*/
+	cep->sbuf_wptr = cep->sbuf_rptr = GET_TCP_SDU(cep->swbufq, IF_IP_TCP_HDR_OFFSET);
+
+	/* ãã©ã°ãããããã¯ã¼ã¯ãããã¡å²å½ã¦æ¸ã¿ã«è¨­å®ããã*/
+	cep->flags = (cep->flags & ~(TCP_CEP_FLG_WBCS_NBUF_REQ | TCP_CEP_FLG_WBCS_MASK))
+	                         |   TCP_CEP_FLG_WBCS_NBUF_READY;
+	}
+
+/*
+ *  tcp_push_res_nbuf -- ãããã¯ã¼ã¯ãããã¡ãäºç´ããï¼å°ç¨ï¼ã
+ */
+
+T_NET_BUF *
+tcp_push_res_nbuf (T_NET_BUF *nbuf)
+{
+	static int_t last_ix = 0;
+
+	T_TCP_CEP	*cep;
+ 	int_t		ix, sel_ix;
+
+	if (++ last_ix == tmax_tcp_cepid)
+		last_ix = 0;
+	sel_ix = ix = last_ix;
+	do {
+		cep = &tcp_cep[ix];
+		if ((cep->flags & TCP_CEP_FLG_WBCS_MASK) == TCP_CEP_FLG_WBCS_NBUF_PEND) {
+
+			/* ãããã¯ã¼ã¯ãããã¡ãäºç´ããã*/
+			cep->swbufq = nbuf;
+			nbuf = NULL;
+
+			/* ãã©ã°ãäºç´ã«è¨­å®ããã*/
+			cep->flags = (cep->flags & ~TCP_CEP_FLG_WBCS_MASK) | TCP_CEP_FLG_WBCS_NBUF_RSVD;
+			sel_ix = ix;
+			break;
+			}
+		if (++ ix == tmax_tcp_cepid)
+			ix = 0;
+		} while (ix != last_ix);
+
+	last_ix = sel_ix;
+
+	return nbuf;
+	}
+
+/*
+ *  tcp_pull_res_nbuf -- äºç´ãã¦ãããããã¯ã¼ã¯ãããã¡è¿ãï¼å°ç¨ï¼ã
+ */
+
+T_NET_BUF *
+tcp_pull_res_nbuf (ATR nbatr)
+{
+	T_NET_BUF	*nbuf;
+	T_TCP_CEP	*cep;
+
+	cep = GET_TCP_CEP(nbatr & NBA_ID_MASK);
+	if ((cep->flags & TCP_CEP_FLG_WBCS_MASK) == TCP_CEP_FLG_WBCS_NBUF_RSVD) {
+
+		/* äºç´ãã¦ãããããã¯ã¼ã¯ãããã¡ãè¿ãã*/
+		nbuf = cep->swbufq;
+		cep->swbufq = NULL;
+
+		/* TCP åºåã¿ã¹ã¯ãèµ·åããã*/
+		sig_sem(SEM_TCP_POST_OUTPUT);
+		}
+	else
+		nbuf = NULL;
+
+	return nbuf;
+	}
+
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+#ifdef TCP_CFG_RWBUF_CSAVE 
+
+#ifndef TCP_CFG_RWBUF_CSAVE_ONLY
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®åä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãæå¹ãªå ´å
+ *  ãã ããéä¿¡ç«¯ç¹ã®åä¿¡ã¦ã£ã³ããããã¡ï¼cep->rbufï¼ã®å¤ã«ããã
+ *  TCP éä¿¡ç«¯ç¹æ¯ã«åä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãä½¿ç¨ãããã
+ *  ä½¿ç¨ããªãããåãæ¿ããã
+ */
+
+/*
+ *  tcp_drop_rwbuf -- åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®æåã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã
+ */
+
+void
+tcp_drop_rwbuf (T_TCP_CEP *cep, uint_t len)
+{
+	if (IS_PTR_DEFINED(cep->rbuf))
+		tcp_drop_rwbuf_ncs(cep, len);
+	else
+		tcp_drop_rwbuf_cs(cep, len);
+	}
+
+/*
+ *  tcp_read_rwbuf -- åä¿¡ã¦ã£ã³ããããã¡ããæå®ããããªã¯ãããåèª­ã¿åºãã
+ */
+
+uint_t
+tcp_read_rwbuf (T_TCP_CEP *cep, void *data, uint_t len)
+{
+	if (IS_PTR_DEFINED(cep->rbuf))
+		return tcp_read_rwbuf_ncs(cep, data, len);
+	else
+		return tcp_read_rwbuf_cs(cep, data, len);
+	}
+
+/*
+ *  tcp_get_rwbuf_addr -- åä¿¡ã¦ã£ã³ããããã¡ã®ç©ºãã¢ãã¬ã¹ãç²å¾ããã
+ */
+
+uint_t
+tcp_get_rwbuf_addr (T_TCP_CEP *cep, void **p_buf)
+{
+	if (IS_PTR_DEFINED(cep->rbuf))
+		return tcp_get_rwbuf_addr_ncs(cep, p_buf);
+	else
+		return tcp_get_rwbuf_addr_cs(cep, p_buf);
+	}
+
+/*
+ *  tcp_free_rwbufq -- åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ãè§£æ¾ããã
+ */
+
+void
+tcp_free_rwbufq (T_TCP_CEP *cep)
+{
+	if (!IS_PTR_DEFINED(cep->rbuf))
+		tcp_free_rwbufq_cs(cep);
+	}
+
+/*
+ *  tcp_write_rwbuf -- åä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ãæ¸ãè¾¼ãã
+ */
+
+void
+tcp_write_rwbuf (T_TCP_CEP *cep, T_NET_BUF *input, uint_t thoff)
+{
+	if (IS_PTR_DEFINED(cep->rbuf))
+		tcp_write_rwbuf_ncs(cep, input, thoff);
+	else
+		tcp_write_rwbuf_cs(cep, input, thoff);
+	}
+
+#endif	/* of #ifndef TCP_CFG_RWBUF_CSAVE_ONLY */
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®åä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãæå¹
+ */
+
+/*
+ *  tcp_drop_rwbuf -- åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®æåã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã
+ */
+
+void
+tcp_drop_rwbuf_cs (T_TCP_CEP *cep, uint_t len)
+{
+	T_TCP_Q_HDR	*qhdr;
+
+	if (cep->rwbufq != NULL) {
+
+		qhdr = GET_TCP_Q_HDR(cep->rwbufq, GET_TCP_IP_Q_HDR(cep->rwbufq)->thoff);
+		cep->rwbuf_count -= len;
+
+		/* ãããã¯ã¼ã¯ãããã¡ã«ãã¼ã¿ãç¡ããªã£ããè§£æ¾ããã*/
+		if (len == qhdr->slen) {
+			T_NET_BUF *next;
+
+#ifdef TCP_CFG_RWBUF_CSAVE_MAX_QUEUES
+
+			cep->rwbufq_entries --;
+
+#endif	/* of #ifdef TCP_CFG_RWBUF_CSAVE_MAX_QUEUES */
+
+			next = qhdr->next;
+			syscall(rel_net_buf(cep->rwbufq));
+			cep->rwbufq = next;
+			}
+		else {
+			qhdr->slen -= len;
+			qhdr->soff += len;
+			}
+		}
+	}
+
+/*
+ *  tcp_read_rwbuf -- åä¿¡ã¦ã£ã³ããããã¡ããæå®ããããªã¯ãããåèª­ã¿åºãã
+ */
+
+uint_t
+tcp_read_rwbuf_cs (T_TCP_CEP *cep, void *data, uint_t len)
+{
+	T_TCP_Q_HDR	*qhdr;
+	uint_t		blen, rlen = 0;
+	uint8_t		*buf = (uint8_t*)data;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	/*
+	 *  åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã«ãããã¯ã¼ã¯ãããã¡ãç¡ããªãã
+	 *  len ã 0 ã«ãªãã¾ã§ç¶ããã
+	 */
+	while (cep->rwbufq != NULL && len > 0) {
+		qhdr = GET_TCP_Q_HDR(cep->rwbufq, GET_TCP_IP_Q_HDR(cep->rwbufq)->thoff);
+
+		/*
+		 *  len ã¨åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®å
+é ­ãããã¯ã¼ã¯ãããã¡ã®
+		 *  ãã¼ã¿æ°ã®å°ããæ¹ãç§»ããã¼ã¿æ°ã«ããã
+		 */
+		if (len > qhdr->slen)
+			blen = qhdr->slen;
+		else
+			blen = len;
+
+		memcpy(buf,
+		       GET_TCP_SDU(cep->rwbufq, GET_TCP_IP_Q_HDR(cep->rwbufq)->thoff) + qhdr->soff,
+		       (size_t)blen);
+
+		/*
+		 *  åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ã«
+		 *  ãã¼ã¿ãç¡ããªã£ããè§£æ¾ããã
+		 */
+		tcp_drop_rwbuf_cs(cep, blen);
+
+		buf  += blen;
+		rlen += blen;
+		len  -= blen;
+		}
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	return rlen;
+	}
+
+/*
+ *  tcp_get_rwbuf_addr -- åä¿¡ã¦ã£ã³ããããã¡ã®ç©ºãã¢ãã¬ã¹ãç²å¾ããã
+ */
+
+uint_t
+tcp_get_rwbuf_addr_cs (T_TCP_CEP *cep, void **p_buf)
+{
+	T_TCP_Q_HDR	*qhdr;
+	uint_t		len;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	if (cep->rwbufq == NULL) {
+
+		/* åä¿¡ã¦ã£ã³ããããã¡ãå
+¨ã¦éæ¾ããã¦ããã¨ãã*/
+		*p_buf = NULL;
+		len = 0;
+		}
+	else {
+
+		/* åä¿¡ã¦ã£ã³ããããã¡ã®ãã¼ã¿ã®ã¢ãã¬ã¹ã®å
+é ­ãè¨­å®ããã*/
+		qhdr = GET_TCP_Q_HDR(cep->rwbufq, GET_TCP_IP_Q_HDR(cep->rwbufq)->thoff);
+		*p_buf = GET_TCP_SDU(cep->rwbufq, GET_TCP_IP_Q_HDR(cep->rwbufq)->thoff) + qhdr->soff;
+
+		/* åä¿¡ã¦ã£ã³ããããã¡ã®ãã¼ã¿é·ãè¨ç®ããã*/
+		len = qhdr->slen;
+		}
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	/* åä¿¡ã¦ã£ã³ããããã¡ã®ãã¼ã¿é·ãè¨­å®ãããã®å¤ãè¿ãã*/
+	cep->rcv_buf_len = len;
+	return len;
+	}
+
+/*
+ *  tcp_free_rwbufq -- åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ãè§£æ¾ããã
+ *
+ *    æ³¨æ:
+ *      å¿
+è¦ã§ããã°ããã®é¢æ°ãå¼ã³åºãåã«ãéä¿¡ç«¯ç¹ãã­ãã¯ãã
+ *      æ»ã£ãå¾ãè§£é¤ããå¿
+è¦ãããã
+ */
+
+void
+tcp_free_rwbufq_cs (T_TCP_CEP *cep)
+{
+	T_NET_BUF *next;
+
+	if (cep->rwbuf_count == 0 && cep->reassq == NULL) {
+		while (cep->rwbufq != NULL) {
+			next = GET_TCP_Q_HDR(cep->rwbufq, GET_TCP_IP_Q_HDR(cep->rwbufq)->thoff)->next;
+
+#ifdef TCP_CFG_RWBUF_CSAVE_MAX_QUEUES
+
+			cep->rwbufq_entries --;
+
+#endif	/* of #ifdef TCP_CFG_RWBUF_CSAVE_MAX_QUEUES */
+
+			syscall(rel_net_buf(cep->rwbufq));
+			cep->rwbufq = next;
+			}
+
+		/* åä¿¡ã¦ã£ã³ããããã¡ã®ä½¿ç¨ä¸­ãµã¤ãºããªã»ããããã*/
+		cep->rwbuf_count = 0;
+		}
+	}
+
+/*
+ *  tcp_write_rwbuf -- åä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ãæ¸ãè¾¼ãã
+ *
+ *    æ³¨æ:
+ *	å
+¥å input ã¯ãT_TCP_Q_HDR ã«ãããªã³ã¯ããã
+ *	ä¸¦ã¹æ¿ããçµäºãã¦ããªããã°ãªããªããã¾ãã
+ *	è¿½å ãããã¼ã¿ã¯ãåä¿¡ã¦ã£ã³ããããã¡ã«åã¾ããã¨ã
+ */
+
+void
+tcp_write_rwbuf_cs (T_TCP_CEP *cep, T_NET_BUF *input, uint_t thoff)
+{
+	T_TCP_Q_HDR	*qhdr;
+	T_NET_BUF	**nextp;
+	uint_t		inlen, last;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	qhdr  = (T_TCP_Q_HDR*)GET_TCP_HDR(input, thoff);
+
+	inlen = qhdr->slen;
+
+#ifdef TCP_CFG_RWBUF_CSAVE_MAX_QUEUES
+
+	if (cep->rwbufq_entries >= TCP_CFG_RWBUF_CSAVE_MAX_QUEUES &&
+	    inlen > 0 && (qhdr->flags & TCP_FLG_FIN) == 0) {
+
+		/*
+		 *  TCP éä¿¡ç«¯ç¹ã®åä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ã®ã
+		 *  åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®æå¤§ã¨ã³ããªæ°ãè¶
+ããã¨ãã¯ã
+		 *  åä¿¡ããã»ã°ã¡ã³ããç ´æ£ããã
+		 *  ãã ããSDU é·ã 0 ã®ã»ã°ã¡ã³ãã¨ FIN ã»ã°ã¡ã³ãã¯ç ´æ£ããªãã
+		 *  ãªããæ­£å¸¸ã«åä¿¡ããã»ã°ã¡ã³ããç ´æ£ãããããåéåæ°ãå¢å ããã
+		 */
+		syscall(rel_net_buf(input));
+
+		/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+		syscall(sig_sem(cep->semid_lock));
+		return;
+		}
+
+	cep->rwbufq_entries ++;
+
+#endif	/* of #ifdef TCP_CFG_RWBUF_CSAVE_MAX_QUEUES */
+
+	qhdr  = (T_TCP_Q_HDR*)GET_TCP_HDR(input, thoff);
+
+	/* åä¿¡æ¸ã¿ã·ã¼ã±ã³ã¹çªå·ãæ´æ°ããã*/
+	cep->rcv_nxt += inlen;
+
+	/* ç·æ¥ãã¼ã¿ã® SDU è£æ­£ãè¡ãã*/
+	if (qhdr->urp > 0 && inlen > 0) {
+		inlen      -= qhdr->urp;
+		qhdr->slen -= qhdr->urp;
+		qhdr->urp   = 0;
+		}
+
+	last  = cep->rwbuf_count;
+
+	/* ãããã¯ã¼ã¯ãããã¡ãåä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®æå¾ã«é£çµããã*/
+	qhdr->next = NULL;
+	nextp = &cep->rwbufq;
+	while (*nextp)
+		nextp = &GET_TCP_Q_HDR(*nextp, GET_TCP_IP_Q_HDR(*nextp)->thoff)->next;
+	*nextp = input;
+
+	/*
+	 *  FIN ãã©ã°ãä»ããã»ã°ã¡ã³ãã¯ inlen == 0 ã«ãªããã¨ãããã
+	 *  ããã¯ãã¢ããªã±ã¼ã·ã§ã³ã«ãç¸æããããä»¥ä¸ãã¼ã¿ãéããã¦
+	 *  ããªããã¨ãç¥ãããããã§ããã
+	 */
+	if (inlen > 0) {
+		cep->rwbuf_count += inlen;
+		NET_COUNT_TCP(net_count_tcp[NC_TCP_RECV_DATA_SEGS],   1);
+		NET_COUNT_TCP(net_count_tcp[NC_TCP_RECV_DATA_OCTETS], inlen);
+		}
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	if (cep->rcv_nblk_tfn == TFN_TCP_RCV_BUF) {	/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+		int_t	len;
+
+		qhdr = GET_TCP_Q_HDR(cep->rwbufq, GET_TCP_IP_Q_HDR(cep->rwbufq)->thoff);
+		len = qhdr->slen;
+
+		/*
+		 *  FIN ãã©ã°ãä»ããã»ã°ã¡ã³ãã¯ inlen == 0 ã«ãªããã¨ãããã
+		 *  ããã¯ãã¢ããªã±ã¼ã·ã§ã³ã«ãç¸æããããä»¥ä¸ãã¼ã¿ãéããã¦
+		 *  ããªããã¨ãç¥ãããããã§ããã
+		 */
+		if (len > 0 || inlen == 0) {
+
+			/* tcp_rcv_buf ã®å²å½ã¦é·ãè¨­å®ããã*/
+			cep->rcv_buf_len = len;
+
+			/* åä¿¡ã¦ã£ã³ããããã¡ã®ã¢ãã¬ã¹ãè¿ãã*/
+			*cep->rcv_p_buf = GET_TCP_SDU(cep->rwbufq,
+			                  GET_TCP_IP_Q_HDR(cep->rwbufq)->thoff) + qhdr->soff;
+
+			if (IS_PTR_DEFINED(cep->callback))
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+				(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)len);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)&len);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			else
+				syslog(LOG_WARNING, "[TCP] no call back, CEP: %d.", GET_TCP_CEPID(cep));
+
+			if (len == 0) {
+
+				/*
+				 *  éä¿¡ç«¯ç¹ãã­ãã¯ãã¦ã
+				 *  åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã
+				 */
+				syscall(wai_sem(cep->semid_lock));
+				tcp_free_rwbufq_cs(cep);
+				syscall(sig_sem(cep->semid_lock));
+				}
+			}
+
+		/* è¨æ¶ããã¦ããã¿ã¹ã¯ ID ã¨ API æ©è½ã³ã¼ããã¯ãªã¢ã¼ããã*/
+		cep->rcv_tskid = TA_NULL;
+		cep->rcv_tfn   = cep->rcv_nblk_tfn = TFN_TCP_UNDEF;
+		}
+
+	else if (cep->rcv_nblk_tfn == TFN_TCP_RCV_DAT) {	/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+		int_t	len;
+
+		/* åä¿¡ã¦ã£ã³ããããã¡ãããã¼ã¿ãåãåºãã*/
+		if ((len = tcp_read_rwbuf_cs(cep, cep->rcv_data, (uint_t)cep->rcv_len)) > 0) {
+			/* ç¸æã«ã¦ã£ã³ãã¦ãµã¤ãºãå¤ãã£ããã¨ãç¥ãããããåºåããã¹ãããã*/
+			cep->flags |= TCP_CEP_FLG_POST_OUTPUT;
+			sig_sem(SEM_TCP_POST_OUTPUT);
+			}
+
+		/*
+		 *  FIN ãã©ã°ãä»ããã»ã°ã¡ã³ãã¯ inlen == 0 ã«ãªããã¨ãããã
+		 *  ããã¯ãã¢ããªã±ã¼ã·ã§ã³ã«ãç¸æããããä»¥ä¸ãã¼ã¿ãéããã¦
+		 *  ããªããã¨ãç¥ãããããã§ããã
+		 */
+		if (len > 0 || inlen == 0) {
+
+			if (IS_PTR_DEFINED(cep->callback))
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+				(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)len);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)&len);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			else
+				syslog(LOG_WARNING, "[TCP] no call back, CEP: %d.", GET_TCP_CEPID(cep));
+			}
+
+		/* è¨æ¶ããã¦ããã¿ã¹ã¯ ID ã¨ API æ©è½ã³ã¼ããã¯ãªã¢ã¼ããã*/
+		cep->rcv_tskid = TA_NULL;
+		cep->rcv_tfn   = cep->rcv_nblk_tfn = TFN_TCP_UNDEF;
+		}
+	else {
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+		if (inlen == 0 && cep->rwbuf_count == 0) {
+			/*
+			 *  åä¿¡ã¦ã£ã³ããããã¡å
+ã®ãã¼ã¿æ°ã 0 ã§ã
+			 *  ç¸æãã FIN ãã©ã°ãä»ããã»ã°ã¡ã³ããåä¿¡ããã¨ãã¯ã
+			 *  éä¿¡ç«¯ç¹ãã­ãã¯ãã¦ã
+			 *  åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã
+			 */
+			syscall(wai_sem(cep->semid_lock));
+			tcp_free_rwbufq_cs(cep);
+			syscall(sig_sem(cep->semid_lock));
+			}
+
+		/*
+		 *  åä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ãå
+¥ããã inlen == 0 ã®æãå
+¥åã¿ã¹ã¯ãèµ·åºããã
+		 *  FIN ãã©ã°ãä»ããã»ã°ã¡ã³ãã¯ inlen == 0 ã«ãªããã¨ãããã
+		 *  ããã¯ãã¢ããªã±ã¼ã·ã§ã³ã«ãç¸æããããä»¥ä¸ãã¼ã¿ãéããã¦
+		 *  ããªããã¨ãç¥ãããããã§ããã
+		 */
+		if ((last == 0 && cep->rwbuf_count > 0) || inlen == 0) {
+			syscall(set_flg(cep->rcv_flgid, TCP_CEP_EVT_RWBUF_READY));
+			}
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+		}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	}
+
+#endif	/* of #ifdef TCP_CFG_RWBUF_CSAVE */
+
+#endif	/* of #ifdef SUPPORT_TCP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_subr_ncs.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_subr_ncs.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_subr_ncs.c	(revision 270)
@@ -0,0 +1,761 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)tcp_subr.c	8.2 (Berkeley) 5/24/95
+ * $FreeBSD: src/sys/netinet/tcp_subr.c,v 1.49.2.4 1999/08/29 16:29:55 peter Exp $
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_var.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet/in_var.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_timer.h>
+#include <netinet/tcp_var.h>
+#include <netinet/tcp_fsm.h>
+#include <netinet/tcp_seq.h>
+#include <netinet/in_itron.h>
+
+#ifdef SUPPORT_TCP
+
+#ifndef TCP_CFG_SWBUF_CSAVE_ONLY
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®éä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãç¡å¹
+ */
+
+/*
+ *  tcp_read_swbuf -- éä¿¡ã¦ã£ã³ããããã¡ãããã¼ã¿ãèª­ã¿åºãã
+ */
+
+void
+tcp_read_swbuf_ncs (T_TCP_CEP *cep, T_NET_BUF *output, uint_t len, uint_t doff)
+{
+	uint8_t	*wptr, *rptr;
+
+	/* SDU ã®å¤§ããããã§ãã¯ããã*/
+	if (GET_IP_SDU_SIZE(GET_IP_HDR(output)) < GET_TCP_HDR_SIZE2(output, IF_IP_TCP_HDR_OFFSET) + len) {
+		syslog(LOG_INFO, "[TCP] shrink SUD len: %d -> %d",
+		       (uint16_t)len, (uint16_t)(GET_IP_SDU_SIZE(GET_IP_HDR(output)) - GET_TCP_HDR_SIZE2(output, IF_IP_TCP_HDR_OFFSET)));
+		len = GET_IP_SDU_SIZE(GET_IP_HDR(output)) - GET_TCP_HDR_SIZE2(output, IF_IP_TCP_HDR_OFFSET);
+		}
+
+	wptr = GET_TCP_SDU(output, IF_IP_TCP_HDR_OFFSET);
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	rptr = cep->sbuf_rptr + doff;
+	if (rptr - (uint8_t*)cep->sbuf > cep->sbufsz) {
+
+		/* è»¢ééå§ãéä¿¡ã¦ã£ã³ããããã¡ã®çµãããè¶
+ããã¨ãã®å¦çã*/
+		rptr = (uint8_t*)cep->sbuf_rptr - (cep->sbufsz - doff);
+		}
+	else if (len + (rptr - (uint8_t*)cep->sbuf) > cep->sbufsz) {
+		uint_t sub;
+
+		/* è»¢éç¯å²ãã©ã¦ã³ãããã¨ãã®å¦ç */
+		sub = (uint_t)(cep->sbufsz - (rptr - (uint8_t*)cep->sbuf));
+		memcpy((void*)wptr, rptr, (size_t)sub);
+		len  -= sub;
+		wptr += sub;
+		rptr  = (uint8_t*)cep->sbuf;
+		}
+	memcpy((void*)wptr, rptr, (size_t)len);
+
+	NET_COUNT_TCP(net_count_tcp[NC_TCP_SEND_DATA_SEGS],   1);
+	NET_COUNT_TCP(net_count_tcp[NC_TCP_SEND_DATA_OCTETS], len);
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+	}
+
+/*
+ *  tcp_drop_swbuf -- éä¿¡ã¦ã£ã³ããããã¡ããæå®ããããªã¯ãããååé¤ããã
+ */
+
+void
+tcp_drop_swbuf_ncs (T_TCP_CEP *cep, uint_t len)
+{
+	uint_t	last;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	last = cep->swbuf_count;
+
+	if (cep->sbuf_rptr + len > (uint8_t*)cep->sbuf + cep->sbufsz)
+		/* ã©ã¦ã³ãããã¨ãã®è¨ç® */
+		cep->sbuf_rptr -= cep->sbufsz - len;
+	else
+		cep->sbuf_rptr += len;
+	cep->swbuf_count -= (uint16_t)len;
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	if (cep->snd_nblk_tfn == TFN_TCP_GET_BUF) {	/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+		/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+		syscall(wai_sem(cep->semid_lock));
+
+		/* éä¿¡ãã¼ã¿é·ãè¨ç®ããã*/
+		if (cep->sbufsz - cep->swbuf_count > cep->sbufsz - (cep->sbuf_wptr - (uint8_t*)cep->sbuf))
+			/* æ¸è¾¼ã¿ãã¤ã³ã¿ãã©ã¦ã³ãããã¨ãã¯ãæ¸è¾¼ã¿ãã¤ã³ã¿ããéä¿¡ã¦ã£ã³ããããã¡ã®çµããã¾ã§ */
+			len = (uint_t)(cep->sbufsz - (cep->sbuf_wptr - (uint8_t*)cep->sbuf));
+		else
+			len = cep->sbufsz - cep->swbuf_count;
+
+		/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+		syscall(sig_sem(cep->semid_lock));
+
+		if (len > 0) {
+
+			/* tcp_get_buf ã®å²å½ã¦é·ãè¨­å®ããã*/
+			cep->get_buf_len = len;
+
+			/* éä¿¡ã¦ã£ã³ããããã¡ã®ã¢ãã¬ã¹ãè¿ãã*/
+			*cep->snd_p_buf = cep->sbuf_wptr;
+
+			if (IS_PTR_DEFINED(cep->callback))
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+				(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, (void*)(uint32_t)len);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, (void*)&len);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			else
+				syslog(LOG_WARNING, "[TCP] no call back, CEP: %d.", GET_TCP_CEPID(cep));
+
+			/* è¨æ¶ããã¦ããã¿ã¹ã¯ ID ã¨ API æ©è½ã³ã¼ããã¯ãªã¢ã¼ããã*/
+			cep->snd_tskid = TA_NULL;
+			cep->snd_tfn   = cep->snd_nblk_tfn = TFN_TCP_UNDEF;
+			}
+		}
+
+#ifdef TCP_CFG_EXTENTIONS
+
+	else if (cep->snd_nblk_tfn == TFN_TCP_SND_DAT ||
+	         cep->snd_nblk_tfn == TFN_TCP_SND_OOB) {	/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+#else	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+	else if (cep->snd_nblk_tfn == TFN_TCP_SND_DAT) {	/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+		ER_UINT	error;
+
+	 	/* éä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ãæ¸ãè¾¼ãã*/
+		error = TCP_WRITE_SWBUF(cep, cep->snd_data, (uint_t)cep->snd_len);
+
+#ifdef TCP_CFG_EXTENTIONS
+
+		/* éä¿¡ç·æ¥ãã¤ã³ã¿ãè¨­å®ããã*/
+	        if (cep->snd_nblk_tfn == TFN_TCP_SND_OOB)
+			cep->snd_up = cep->snd_una + error;
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+		if (IS_PTR_DEFINED(cep->callback))
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+			(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, (void*)error);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, (void*)&error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+		else
+			syslog(LOG_WARNING, "[TCP] no call back, CEP: %d.", GET_TCP_CEPID(cep));
+
+		/* è¨æ¶ããã¦ããã¿ã¹ã¯ ID ã¨ API æ©è½ã³ã¼ããã¯ãªã¢ã¼ããã*/
+		cep->snd_tskid = TA_NULL;
+		cep->snd_tfn   = cep->snd_nblk_tfn = TFN_TCP_UNDEF;
+		}
+	else {
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+		/* éä¿¡ã¦ã£ã³ããããã¡ã«ç©ºããåºæ¥ããåºåã¿ã¹ã¯ãèµ·åºããã*/
+		if (last == cep->sbufsz && cep->swbuf_count < cep->sbufsz)
+			syscall(set_flg(cep->snd_flgid, TCP_CEP_EVT_SWBUF_READY));
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+		}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	if (cep->swbuf_count > 0) {
+		/* éä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ãããã°åºåããã¹ãããã*/
+		cep->flags |= TCP_CEP_FLG_POST_OUTPUT;
+		sig_sem(SEM_TCP_POST_OUTPUT);
+		}
+	}
+
+/*
+ *  tcp_write_swbuf -- éä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ãæ¸ãè¾¼ãã
+ */
+
+ER_UINT
+tcp_write_swbuf_ncs (T_TCP_CEP *cep, void *data, uint_t len)
+{
+	uint_t	offset;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	/* len ã¨éä¿¡ã¦ã£ã³ããããã¡ã®ç©ºãã®å°ããæ¹ãç§»ããã¼ã¿æ°ã«ããã*/
+	if (len > (cep->sbufsz - cep->swbuf_count))
+		len = cep->sbufsz - cep->swbuf_count;
+
+	/* æ¸ãè¾¼ã¿ãã¤ã³ã¿ãã©ã¦ã³ãããã¨ãã®å¦ç */
+	if (len > cep->sbufsz - (cep->sbuf_wptr - (uint8_t*)cep->sbuf)) {
+		offset = (uint_t)(cep->sbufsz - (cep->sbuf_wptr -(uint8_t*)cep->sbuf));
+		memcpy(cep->sbuf_wptr, data, (size_t)offset);
+		cep->sbuf_wptr  = (uint8_t*)cep->sbuf;
+		cep->swbuf_count += offset;
+		}
+	else
+		offset = 0;
+
+	memcpy(cep->sbuf_wptr, (void*)((uint8_t*)data + offset), (size_t)(len - offset));
+	cep->sbuf_wptr  += len - offset;
+	cep->swbuf_count += len - offset;
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	return (ER_UINT)len;
+	}
+
+/*
+ *  tcp_wait_swbuf -- éä¿¡ã¦ã£ã³ããããã¡ãç©ºãã®ãå¾
+ã¤ã
+ */
+
+ER
+tcp_wait_swbuf_ncs (T_TCP_CEP *cep, TMO tmout)
+{
+	ER	error;
+	FLGPTN	flag;
+
+	while (cep->swbuf_count >= cep->sbufsz) {
+		/*
+		 *  éä¿¡ã¦ã£ã³ããããã¡ã®ç©ºãããªããã°ãåºåããã¹ããã¦ã
+		 *  éä¿¡ã¦ã£ã³ããããã¡ãç©ºãã¾ã§å¾
+ã¤ã
+		 */
+		cep->flags |= TCP_CEP_FLG_POST_OUTPUT;
+		sig_sem(SEM_TCP_POST_OUTPUT);
+
+		if ((error = twai_flg(cep->snd_flgid, TCP_CEP_EVT_SWBUF_READY, TWF_ORW, &flag, tmout)) != E_OK) {
+			return error;
+			}
+		syscall(clr_flg(cep->snd_flgid, (FLGPTN)(~TCP_CEP_EVT_SWBUF_READY)));
+
+		/*
+		 *  éä¿¡ã§ããããCEP ã® FSM ç¶æ
+ãè¦ãã
+		 *  éä¿¡ã¦ã£ã³ããããã¡ãç©ºãã¾ã§å¾
+ã¤éã«ãéä¿¡ä¸è½ã«ãªã£ãå ´åã¯ã
+		 *  ã³ãã¯ã·ã§ã³ãåæ­ããããã¨ãæå³ãã¦ããã
+		 */
+		if (!TCP_FSM_CAN_SEND_MORE(cep->fsm_state)) {
+			return E_CLS;
+			}
+		}
+
+	return E_OK;
+	}
+/*
+ *  tcp_get_swbuf_addr -- éä¿¡ã¦ã£ã³ããããã¡ã®ç©ºãã¢ãã¬ã¹ãç²å¾ããã
+ */
+
+ER_UINT
+tcp_get_swbuf_addr_ncs (T_TCP_CEP *cep, void **p_buf)
+{
+	uint_t	len;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	/* éä¿¡ã¦ã£ã³ããããã¡ã®ç©ºãã¢ãã¬ã¹ã®å
+é ­ãè¨­å®ããã*/
+	*p_buf = cep->sbuf_wptr;
+
+	/* éä¿¡ã¦ã£ã³ããããã¡ã®ç©ºããµã¤ãºãè¨ç®ããã*/
+	if (cep->sbufsz - cep->swbuf_count > cep->sbufsz - (cep->sbuf_wptr - (uint8_t*)cep->sbuf))
+		/* æ¸è¾¼ã¿ãã¤ã³ã¿ãã©ã¦ã³ãããã¨ãã¯ãæ¸è¾¼ã¿ãã¤ã³ã¿ããéä¿¡ã¦ã£ã³ããããã¡ã®çµããã¾ã§ */
+		len = (uint_t)(cep->sbufsz - (cep->sbuf_wptr - (uint8_t*)cep->sbuf));
+	else
+		len = cep->sbufsz - cep->swbuf_count;
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	/* éä¿¡ã¦ã£ã³ããããã¡ã®ç©ºããã¼ã¿é·ãè¨­å®ãããã®å¤ãè¿ãã*/
+	cep->get_buf_len = len;
+	return (ER_UINT)len;
+	}
+
+/*
+ *  tcp_send_swbuf -- éä¿¡ã¦ã£ã³ããããã¡ã®ãã¼ã¿ãéä¿¡å¯è½ã«ããã
+ */
+
+void
+tcp_send_swbuf_ncs (T_TCP_CEP *cep, uint_t len)
+{
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	cep->sbuf_wptr  += len;
+	cep->swbuf_count += len;
+
+	/* æ¸è¾¼ã¿ãã¤ã³ã¿ãã©ã¦ã³ãããã¨ãã®å¦ç */
+	if (cep->sbuf_wptr >= (uint8_t*)cep->sbuf + cep->sbufsz)
+		cep->sbuf_wptr  = (uint8_t*)cep->sbuf;
+
+	/* tcp_get_buf ã®å²å½ã¦é·ããªã»ããããã*/
+	cep->get_buf_len = 0;
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	/* éä¿¡ã¦ã£ã³ããããã¡ããã«ã®ã¨ãã¯å¼·å¶çã«éä¿¡ããã*/
+	if (cep->swbuf_count >= cep->sbufsz)
+		cep->flags |= TCP_CEP_FLG_FORCE | TCP_CEP_FLG_FORCE_CLEAR;
+	}
+
+/*
+ *  tcp_is_swbuf_full -- éä¿¡ã¦ã£ã³ããããã¡ãæºæ¯ããã§ãã¯ããã
+ */
+
+bool_t
+tcp_is_swbuf_full_ncs (T_TCP_CEP *cep)
+{
+	return cep->swbuf_count >= cep->sbufsz;
+	}
+
+#endif	/* of #ifndef TCP_CFG_SWBUF_CSAVE_ONLY */
+
+#ifndef TCP_CFG_RWBUF_CSAVE_ONLY
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®åä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãç¡å¹
+ */
+
+/*
+ *  tcp_drop_rwbuf -- åä¿¡ã¦ã£ã³ããããã¡ããæå®ããããªã¯ãããååé¤ããã
+ */
+
+void
+tcp_drop_rwbuf_ncs (T_TCP_CEP *cep, uint_t len)
+{
+	cep->rwbuf_count -= len;
+	cep->rbuf_rptr  += len;
+
+	/* èª­ã¿åºããã¤ã³ã¿ãã©ã¦ã³ãããã¨ãã®å¦ç */
+	if (cep->rbuf_rptr >= (uint8_t*)cep->rbuf + cep->rbufsz)
+		cep->rbuf_rptr  = (uint8_t*)cep->rbuf;
+	}
+
+/*
+ *  tcp_read_rwbuf -- åä¿¡ã¦ã£ã³ããããã¡ããæå®ããããªã¯ãããåèª­ã¿åºãã
+ */
+
+uint_t
+tcp_read_rwbuf_ncs (T_TCP_CEP *cep, void *data, uint_t len)
+{
+	uint_t	offset;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	/* len ã¨åä¿¡ã¦ã£ã³ããããã¡ã®ãã¼ã¿æ°ã®å°ããæ¹ãåãåºããã¼ã¿æ°ã«ããã*/
+	if (len > cep->rwbuf_count)
+		len = cep->rwbuf_count;
+
+	/* èª­ã¿åºããã¤ã³ã¿ãã©ã¦ã³ãããã¨ãã®å¦ç */
+	if (len > cep->rbufsz - (cep->rbuf_rptr - (uint8_t*)cep->rbuf)) {
+		offset = (uint_t)(cep->rbufsz - (cep->rbuf_rptr -(uint8_t*)cep->rbuf));
+		memcpy(data, cep->rbuf_rptr, (size_t)offset);
+		cep->rwbuf_count -= offset;
+		cep->rbuf_rptr   = (uint8_t*)cep->rbuf;
+		}
+	else
+		offset = 0;
+
+	memcpy((void*)((uint8_t*)data + offset), cep->rbuf_rptr, (size_t)(len - offset));
+	cep->rwbuf_count -= len - offset;
+	cep->rbuf_rptr  += len - offset;
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	return len;
+	}
+
+/*
+ *  tcp_get_rwbuf_addr -- åä¿¡ã¦ã£ã³ããããã¡ã®ç©ºãã¢ãã¬ã¹ãç²å¾ããã
+ */
+
+uint_t
+tcp_get_rwbuf_addr_ncs (T_TCP_CEP *cep, void **p_buf)
+{
+	uint_t	len;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	/* åä¿¡ã¦ã£ã³ããããã¡ã®ãã¼ã¿é·ãè¨ç®ããã*/
+	if (cep->rwbuf_count > cep->rbufsz - (cep->rbuf_rptr - (uint8_t*)cep->rbuf))
+		/* ãã¤ã³ã¿ãã©ã¦ã³ãããã¨ãã¯åä¿¡ã¦ã£ã³ããããã¡ã®çµããã¾ã§ */
+		len = (uint_t)(cep->rbufsz - (cep->rbuf_rptr - (uint8_t*)cep->rbuf));
+	else
+		len = cep->rwbuf_count;
+
+	/* åä¿¡ã¦ã£ã³ããããã¡ã®ãã¼ã¿ã®ã¢ãã¬ã¹ã®å
+é ­ãè¨­å®ããã*/
+	*p_buf = cep->rbuf_rptr;
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	/* åä¿¡ã¦ã£ã³ããããã¡ã®ãã¼ã¿é·ãè¨­å®ãããã®å¤ãè¿ãã*/
+	cep->rcv_buf_len = len;
+	return len;
+	}
+
+/*
+ *  tcp_write_rwbuf -- åä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ãæ¸ãè¾¼ãã
+ *
+ *    æ³¨æ:
+ *	å
+¥å input ã¯ãT_TCP_Q_HDR ã«ãããªã³ã¯ããã
+ *	ä¸¦ã¹æ¿ããçµäºãã¦ããªããã°ãªããªããã¾ãã
+ *	è¿½å ãããã¼ã¿ã¯ãåä¿¡ã¦ã£ã³ããããã¡ã«åã¾ããã¨ã
+ */
+
+void
+tcp_write_rwbuf_ncs (T_TCP_CEP *cep, T_NET_BUF *input, uint_t thoff)
+{
+	T_TCP_Q_HDR	*qhdr;
+	uint_t		offset, inlen, last;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	qhdr  = (T_TCP_Q_HDR*)GET_TCP_HDR(input, thoff);
+
+	/* åä¿¡æ¸ã¿ã·ã¼ã±ã³ã¹çªå·ãæ´æ°ããã*/
+	cep->rcv_nxt += qhdr->slen;
+
+	last  = cep->rwbuf_count;
+	inlen = qhdr->slen;
+
+	/* ç·æ¥ãã¼ã¿ã® SDU è£æ­£ãè¡ãã*/
+	if (qhdr->urp > 0 && inlen > 0) {
+		inlen      -= qhdr->urp;
+		qhdr->slen -= qhdr->urp;
+		qhdr->urp   = 0;
+		}
+
+	/*
+	 *  FIN ãã©ã°ãä»ããã»ã°ã¡ã³ãã¯ inlen == 0 ã«ãªããã¨ãããã
+	 *  ããã¯ãã¢ããªã±ã¼ã·ã§ã³ã«ãç¸æããããä»¥ä¸ãã¼ã¿ãéããã¦
+	 *  ããªããã¨ãç¥ãããããã§ããã
+	 */
+	if (inlen > 0) {
+
+		/* æ¸ãè¾¼ã¿ãã¤ã³ã¿ãã©ã¦ã³ãããã¨ãã®å¦ç */
+		if (inlen > cep->rbufsz - (cep->rbuf_wptr - (uint8_t*)cep->rbuf)) {
+			offset = (uint_t)(cep->rbufsz - (cep->rbuf_wptr - (uint8_t*)cep->rbuf));
+			memcpy(cep->rbuf_wptr, (void*)(GET_TCP_SDU(input, thoff) + qhdr->soff), (size_t)offset);
+			cep->rbuf_wptr   = (uint8_t*)cep->rbuf;
+			cep->rwbuf_count += offset;
+			inlen           -= offset;
+			}
+		else
+			offset	= 0;
+
+		memcpy(cep->rbuf_wptr, (void*)(GET_TCP_SDU(input, thoff) + qhdr->soff + offset), (size_t)inlen);
+		cep->rbuf_wptr  += inlen;
+		cep->rwbuf_count += inlen;
+
+		NET_COUNT_TCP(net_count_tcp[NC_TCP_RECV_DATA_SEGS],   1);
+		NET_COUNT_TCP(net_count_tcp[NC_TCP_RECV_DATA_OCTETS], inlen);
+		}
+
+	syscall(rel_net_buf(input));
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	if (cep->rcv_nblk_tfn == TFN_TCP_RCV_BUF) {	/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+		int_t	len;
+
+		/* åä¿¡ã¦ã£ã³ããããã¡ã®ç©ºããã¼ã¿é·ãè¨ç®ããã*/
+		if (cep->rwbuf_count > cep->rbufsz - (cep->rbuf_rptr - (uint8_t*)cep->rbuf)) {
+			/* ãã¤ã³ã¿ãã©ã¦ã³ãããã¨ãã¯åä¿¡ã¦ã£ã³ããããã¡ã®çµããã¾ã§ */
+			len = (uint_t)(cep->rbufsz - (cep->rbuf_rptr - (uint8_t*)cep->rbuf));
+			}
+		else
+			len = cep->rwbuf_count;
+
+		/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+		syscall(sig_sem(cep->semid_lock));
+
+		/*
+		 *  FIN ãã©ã°ãä»ããã»ã°ã¡ã³ãã¯ inlen == 0 ã«ãªããã¨ãããã
+		 *  ããã¯ãã¢ããªã±ã¼ã·ã§ã³ã«ãç¸æããããä»¥ä¸ãã¼ã¿ãéããã¦
+		 *  ããªããã¨ãç¥ãããããã§ããã
+		 */
+		if (len > 0 || inlen == 0) {
+
+			/* tcp_rcv_buf ã®å²å½ã¦é·ãè¨­å®ããã*/
+			cep->rcv_buf_len = len;
+
+			/* åä¿¡ã¦ã£ã³ããããã¡ã®ã¢ãã¬ã¹ãè¿ãã*/
+			*cep->rcv_p_buf = cep->rbuf_rptr;
+
+
+			if (IS_PTR_DEFINED(cep->callback))
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+				(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)(uint32_t)len);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)&len);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			else
+				syslog(LOG_WARNING, "[TCP] no call back, CEP: %d.", GET_TCP_CEPID(cep));
+
+			if (len == 0) {
+
+				/*
+				 *  éä¿¡ç«¯ç¹ãã­ãã¯ãã¦ã
+				 *  åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã
+				 */
+				syscall(wai_sem(cep->semid_lock));
+				TCP_FREE_RWBUFQ(cep);
+				syscall(sig_sem(cep->semid_lock));
+				}
+			}
+
+		/* è¨æ¶ããã¦ããã¿ã¹ã¯ ID ã¨ API æ©è½ã³ã¼ããã¯ãªã¢ã¼ããã*/
+		cep->rcv_tskid = TA_NULL;
+		cep->rcv_tfn   = cep->rcv_nblk_tfn = TFN_TCP_UNDEF;
+		}
+
+	else if (cep->rcv_nblk_tfn == TFN_TCP_RCV_DAT) {	/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+		ER_UINT	len;
+
+		/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+		syscall(sig_sem(cep->semid_lock));
+
+		/* åä¿¡ã¦ã£ã³ããããã¡ãããã¼ã¿ãåãåºãã*/
+		if ((len = TCP_READ_RWBUF(cep, cep->rcv_data, (uint_t)cep->rcv_len)) > 0) {
+			/* ç¸æã«ã¦ã£ã³ãã¦ãµã¤ãºãå¤ãã£ããã¨ãç¥ãããããåºåããã¹ãããã*/
+			cep->flags |= TCP_CEP_FLG_POST_OUTPUT;
+			sig_sem(SEM_TCP_POST_OUTPUT);
+			}
+
+		/*
+		 *  FIN ãã©ã°ãä»ããã»ã°ã¡ã³ãã¯ inlen == 0 ã«ãªããã¨ãããã
+		 *  ããã¯ãã¢ããªã±ã¼ã·ã§ã³ã«ãç¸æããããä»¥ä¸ãã¼ã¿ãéããã¦
+		 *  ããªããã¨ãç¥ãããããã§ããã
+		 */
+		if (len > 0 || inlen == 0) {
+
+			if (IS_PTR_DEFINED(cep->callback))
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+				(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)(uint32_t)len);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)&len);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			else
+				syslog(LOG_WARNING, "[TCP] no call back, CEP: %d.", GET_TCP_CEPID(cep));
+			}
+
+		/* è¨æ¶ããã¦ããã¿ã¹ã¯ ID ã¨ API æ©è½ã³ã¼ããã¯ãªã¢ã¼ããã*/
+		cep->rcv_tskid = TA_NULL;
+		cep->rcv_tfn   = cep->rcv_nblk_tfn = TFN_TCP_UNDEF;
+
+		}
+	else {
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+		/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+		syscall(sig_sem(cep->semid_lock));
+
+		if (inlen == 0 && cep->rwbuf_count == 0) {
+			/*
+			 *  åä¿¡ã¦ã£ã³ããããã¡å
+ã®ãã¼ã¿æ°ã 0 ã§ã
+			 *  ç¸æãã FIN ãã©ã°ãä»ããã»ã°ã¡ã³ããåä¿¡ããã¨ãã¯ã
+			 *  éä¿¡ç«¯ç¹ãã­ãã¯ãã¦ã
+			 *  åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã
+			 */
+			syscall(wai_sem(cep->semid_lock));
+			TCP_FREE_RWBUFQ(cep);
+			syscall(sig_sem(cep->semid_lock));
+			}
+
+		/*
+		 *  åä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ãå
+¥ããã inlen == 0 ã®æãå
+¥åã¿ã¹ã¯ãèµ·åºããã
+		 *  FIN ãã©ã°ãä»ããã»ã°ã¡ã³ãã¯ inlen == 0 ã«ãªããã¨ãããã
+		 *  ããã¯ãã¢ããªã±ã¼ã·ã§ã³ã«ãç¸æããããä»¥ä¸ãã¼ã¿ãéããã¦
+		 *  ããªããã¨ãç¥ãããããã§ããã
+		 */
+		if ((last == 0 && cep->rwbuf_count > 0) || inlen == 0)
+			syscall(set_flg(cep->rcv_flgid, TCP_CEP_EVT_RWBUF_READY));
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+		}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	}
+
+#endif	/* of #ifndef TCP_CFG_RWBUF_CSAVE_ONLY */
+
+#endif	/* of #ifdef SUPPORT_TCP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_timer.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_timer.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_timer.c	(revision 270)
@@ -0,0 +1,531 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)tcp_timer.c	8.2 (Berkeley) 5/24/95
+ * $FreeBSD: src/sys/netinet/tcp_timer.c,v 1.28.2.1 1999/08/29 16:29:56 peter Exp $
+ */
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_var.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet/ip.h>
+#include <netinet/ip6.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_timer.h>
+#include <netinet/tcp_var.h>
+#include <netinet/tcp_fsm.h>
+#include <netinet/tcp_seq.h>
+
+#ifdef SUPPORT_TCP
+
+/*
+ *  å±æé¢æ°
+ */
+
+static T_TCP_CEP *tcp_timers (T_TCP_CEP *cep, int_t tix);
+
+#if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0
+
+static void tcp_tw_timo (void);
+
+#endif	/* of #if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0 */
+
+/*
+ *  ããã¯ãªãæé
+ *
+ *  åéãè¡ããã³ã«ãã¿ã¤ã ã¢ã¦ãã®æéãå»¶é·ããã
+ */
+
+const static uint8_t tcp_back_off[] = {
+	UINT_C(1), 	UINT_C(2), 	UINT_C(4), 	UINT_C(8),
+	UINT_C(16), 	UINT_C(32), 	UINT_C(64), 	UINT_C(64),
+	UINT_C(64), 	UINT_C(64), 	UINT_C(64), 	UINT_C(64), 
+	UINT_C(64)
+	};
+
+#define TCP_TOTAL_BACK_OFF	511	/* ããã¯ãªãæéã®åè¨ */
+
+/*
+ *  tcp_timers -- ã¿ã¤ã ã¢ã¦ãå¦ç
+ */
+
+static T_TCP_CEP *
+tcp_timers (T_TCP_CEP *cep, int_t tix)
+{
+	uint16_t	win;
+
+
+	switch (tix) {
+
+	/*
+	 *  åéã¿ã¤ã
+	 */
+	case TCP_TIM_REXMT:
+	
+		/*
+		 *  æå¤§åéåæ° (TCP_MAX_REXMT_SHIFTãæ¨æº 12 å) ã«ãªã£ãã¨ãã¯ã
+		 *  ã³ãã¯ã·ã§ã³ãåæ­ããã
+		 */
+		if (++ cep->rxtshift > TCP_MAX_REXMT_SHIFT) {
+			cep->rxtshift  = TCP_MAX_REXMT_SHIFT;
+			cep->net_error = EV_REXMTMO;
+			cep = tcp_drop(cep, E_CLS);
+			break;
+			}
+
+		/*
+		 *  åéã¿ã¤ã ã¢ã¦ããè¨ç®ããã
+		 */
+		cep->rxtcur = tcp_range_set((T_TCP_TIME)(tcp_rexmt_val(cep) * tcp_back_off[cep->rxtshift]),
+		                            (T_TCP_TIME)TCP_TVAL_MIN, 
+		                            (T_TCP_TIME)TCP_TVAL_MAX_REXMT);
+		cep->timer[TCP_TIM_REXMT] = cep->rxtcur;
+
+		/*
+		 *  srtt:   å¹³æ»åããã RTT
+		 *  rttvar: å¹³æ»åãããåæ£
+		 *
+		 *  åéåæ°ãæå¤§åéåæ°ã® 1/4 ã«ãªã£ãã¨ãã¯ã
+		 *  å¹³æ»åãããåæ£ (rttvar) ã« srtt ãå ç®ãã
+		 *  å¹³æ»åããã RTT ã 0 ã«ããã
+		 *  
+		 */
+		if (cep->rxtshift > TCP_MAX_REXMT_SHIFT / 4) {
+			cep->rttvar += (cep->srtt >> TCP_SRTT_SHIFT);
+			cep->srtt    = 0;
+			}
+
+		/*
+		 *  snd_nxt: æ¬¡ã«éä¿¡ãã SEQããã®æç¹ã§ã¯ãååéä¿¡ãã SEQ
+		 *  snd_una: æªç¢ºèªã®æå°éä¿¡ SEQ	 ã¾ãã¯ãç¢ºèªãããæå¤§éä¿¡ SEQ
+		 *
+		 *  ååéä¿¡ãã SEQ (snd_nxt) ã 
+		 *  ç¢ºèªãããæå¤§éä¿¡ SEQ (snd_una) ã¾ã§æ»ãã
+		 */
+		cep->snd_nxt = cep->snd_una;
+		cep->flags  |= TCP_CEP_FLG_ACK_NOW;
+
+		/*
+		 *  rtt: å¾å¾©æéã®è¨æ¸¬ãä¸­æ­¢ããã
+		 */
+		cep->rtt     = 0;
+
+		/*
+		 *  éä¿¡ã¦ã¤ã³ãã®è¨­å®
+		 *
+		 *  snd_wnd:  ç¸æã®åä¿¡å¯è½ã¦ã£ã³ããµã¤ãº
+		 *  snd_cwnd: è¼»è¼³ã¦ã£ã³ããµã¤ãº
+		 *  maxseg  : ç¸æã®æå¤§åä¿¡ã»ã°ã¡ã³ããµã¤ãº
+		 *
+		 *  ç¸æã®åä¿¡å¯è½ã¦ã£ã³ããµã¤ãº (snd_wnd) ãã
+		 *  è¼»è¼³ã¦ã£ã³ããµã¤ãº (snd_cwnd) ã®
+		 *  ã©ã¡ããå°ãããµã¤ãºã® 1/2 ããæ´ã«
+		 *  ç¸æã®æå¤§åä¿¡ã»ã°ã¡ã³ããµã¤ãº (maxseg) ã§å²ã£ãå¤ã
+		 *  ãã ãã2 ä»¥ä¸
+		 */
+		if (cep->snd_wnd < cep->snd_cwnd)
+			win = cep->snd_wnd / 2 / cep->maxseg;
+		else
+			win = cep->snd_cwnd / 2 / cep->maxseg;
+
+		if (win < 2)
+			win = 2;
+
+		/*
+		 *  è¼»è¼³ã¦ã£ã³ããµã¤ãº (snd_cwnd) ã¯
+		 *  ç¸æã®åä¿¡å¯è½ã¦ã£ã³ããµã¤ãº (snd_wnd) ã«ã
+		 *  è¼»è¼³ã¦ã£ã³ããµã¤ãºã®ãããå¤ (snd_ssthresh) ã¯
+		 *  ç¸æã®åä¿¡å¯è½ã¦ã£ã³ããµã¤ãº (snd_wnd) ã® win åã«
+		 *  è¨­å®ããã
+		 */
+		cep->snd_cwnd     = cep->maxseg;
+		cep->snd_ssthresh = win * cep->maxseg;
+		cep->dupacks      = 0;
+
+		/* åºåããã¹ãããã*/
+		cep->flags |= TCP_CEP_FLG_POST_OUTPUT;
+		sig_sem(SEM_TCP_POST_OUTPUT);
+		break;
+
+	/*
+	 *  æç¶ã¿ã¤ã	
+	 */
+	case TCP_TIM_PERSIST:
+
+		/*
+		 *  æå¤§åéåæ° (TCP_MAX_REXMT_SHIFTãæ¨æº 12 å) ãè¶
+ãã¦ãã¦ã
+		 *  ã¢ã¤ãã«æéããä¿çã¿ã¤ãã®æ¨æºå¤ (TCP_TVAL_KEEP_IDLEã
+		 *  æ¨æº 2 * 60 * 60 ç§) ä»¥ä¸ãã
+		 *  åéã¿ã¤ã ã¢ã¦ãå¤ * ããã¯ãªãæéã®åè¨ä»¥ä¸ãªã
+		 *  ã³ãã¯ã·ã§ã³ãåæ­ããã
+		 */
+		if (cep->rxtshift > TCP_MAX_REXMT_SHIFT &&
+		    (cep->idle >= TCP_TVAL_KEEP_IDLE ||
+		     cep->idle >= tcp_rexmt_val(cep) * TCP_TOTAL_BACK_OFF)) {
+			cep->net_error = EV_REXMTMO;
+			cep = tcp_drop(cep, E_CLS);
+			break;
+			}
+
+		/* æç¶ã¿ã¤ããåè¨­å®ããåºåããã¹ãããã*/
+		tcp_set_persist_timer(cep);
+
+		cep->flags |= TCP_CEP_FLG_FORCE | TCP_CEP_FLG_FORCE_CLEAR | TCP_CEP_FLG_POST_OUTPUT;
+		sig_sem(SEM_TCP_POST_OUTPUT);
+		break;
+
+	/*
+	 *  ä¿ç (keep alive) ã¿ã¤ã
+	 */
+	case TCP_TIM_KEEP:
+
+		/*
+		 *  ã³ãã¯ã·ã§ã³ãéè¨­ãããã¾ã§ã«ã¿ã¤ã ã¢ã¦ãããã
+		 *  ã³ãã¯ã·ã§ã³ã®éè¨­ãä¸­æ­¢ããã
+		 */
+		if (cep->fsm_state < TCP_FSM_ESTABLISHED) {
+			cep->net_error = EV_REXMTMO;
+			cep = tcp_drop(cep, E_CLS);
+			break;
+			}
+
+#ifdef TCP_CFG_ALWAYS_KEEP
+
+		else if (cep->fsm_state < TCP_FSM_CLOSING) {
+			if (cep->idle >= TCP_TVAL_KEEP_IDLE + 
+			                 TCP_TVAL_KEEP_COUNT * TCP_TVAL_KEEP_INTERVAL) {
+				cep->net_error = EV_REXMTMO;
+				cep = tcp_drop(cep, E_CLS);
+				break;
+				}
+			else
+				tcp_respond(NULL, cep, cep->rcv_nxt, cep->snd_una - 1,
+				                       cep->rbufsz - cep->rwbuf_count, 0);
+			cep->timer[TCP_TIM_KEEP] = TCP_TVAL_KEEP_INTERVAL;
+			}
+		else
+			cep->timer[TCP_TIM_KEEP] = TCP_TVAL_KEEP_IDLE;
+
+#else	/* of #ifdef TCP_CFG_ALWAYS_KEEP */
+
+		cep->timer[TCP_TIM_KEEP] = TCP_TVAL_KEEP_IDLE;
+
+#endif	/* of #ifdef TCP_CFG_ALWAYS_KEEP */
+
+		break;
+
+	/*
+	 *  2MSL ã¿ã¤ã		
+	 */
+	case TCP_TIM_2MSL:
+
+		if (cep->fsm_state != TCP_FSM_TIME_WAIT &&
+		    cep->idle  <= TCP_TVAL_KEEP_COUNT * TCP_TVAL_KEEP_INTERVAL)
+			cep->timer[TCP_TIM_2MSL] = TCP_TVAL_KEEP_INTERVAL;
+		else
+			cep = tcp_close(cep);
+		break;
+		}
+
+	return cep;
+	}
+
+/*
+ *  tcp_cancel_timers -- å
+¨ã¦ã®ã¿ã¤ããã­ã£ã³ã»ã«ããã
+ */
+
+void
+tcp_cancel_timers (T_TCP_CEP *cep)
+{
+	int_t ix;
+
+	for (ix = NUM_TCP_TIMERS; ix -- > 0; )
+		cep->timer[ix] = 0;
+	}
+
+#if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0
+
+/*
+ *  tcp_tw_timo -- Time Wait ç¨ TCP éä¿¡ç«¯ç¹ã®ã¿ã¤ã ã¢ã¦ãå¦ç
+ */
+
+void
+tcp_tw_timo (void)
+{
+	T_TCP_CEP	*cep, *lcep;
+	T_TCP_TWCEP*	twcep;
+	T_TCP_TIME	longer;
+	int_t		frees, waits;
+
+	/*
+	 *  Time Wait ç¨ TCP éä¿¡ç«¯ç¹ã§ã¿ã¤ã ã¢ã¦ãã®ã¨ã³ããªãæ¢ç´¢ãã
+	 *  æ¢ç´¢ããã¨ã³ããªãç©ºãã«ããã
+	 */
+	frees = 0;
+	for (twcep = &tcp_twcep[NUM_TCP_TW_CEP_ENTRY]; twcep -- != tcp_twcep; )
+		if (twcep->fsm_state == TCP_FSM_TIME_WAIT && -- twcep->timer_2msl == 0) {
+			twcep->fsm_state = TCP_FSM_CLOSED;
+			frees ++;
+			}
+
+	/*
+	 *  Time Wait ç¨ TCP éä¿¡ç«¯ç¹ã®ç©ºãã¨ã³ããªãçºçããã
+	 *  æ¨æº TCP éä¿¡ç«¯ç¹ã§ Time Wait ä¸­ã® TCP éä¿¡ç«¯ç¹ãæ¢ç´¢ãã
+	 *  å¿
+è¦ãªæ
+å ±ã Time Wait ç¨ TCP éä¿¡ç«¯ç¹ã«ç§»ãã¦ã
+	 *  æ¨æºã® TCP éä¿¡ç«¯ç¹ãéæ¾ããã
+	 */
+	if (frees > 0) {
+		waits = 0;
+		for (cep = &tcp_cep[tmax_tcp_cepid]; cep -- != tcp_cep; )
+			if (cep->fsm_state == TCP_FSM_TIME_WAIT)
+				waits ++;
+		if (waits > frees)
+			waits = frees;
+
+		/*
+		 *  ãã£ã¨ãé·ãé Time Wait ãã¦ãã TCP éä¿¡ç«¯ç¹ãéæ¾ããã
+		 */
+		while (waits > 0) {
+			longer = TCP_TVAL_MSL * 2;
+			lcep   = NULL;
+			for (cep = &tcp_cep[tmax_tcp_cepid]; cep -- != tcp_cep; )
+				if (cep->fsm_state == TCP_FSM_TIME_WAIT && cep->timer[TCP_TIM_2MSL] < longer) {
+					longer = cep->timer[TCP_TIM_2MSL];
+					lcep   = cep;
+					}
+			if (lcep != NULL) {
+				tcp_move_twcep(lcep);
+				waits --;
+				}
+			else
+				break;
+			}
+		}
+	}
+
+#endif	/* of #if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0 */
+
+/*
+ *  tcp_slow_timo -- 500 [ms] æ¯ã«å¼åºããã TCP ã¿ã¤ã ã¢ã¦ãé¢æ°
+ */
+
+void
+tcp_slow_timo (void *ignore)
+{
+	T_TCP_CEP	*cep;
+	int_t		cix, tix;
+
+	for (cix = tmax_tcp_cepid; cix -- > 0; ) {
+		cep = &tcp_cep[cix];
+		if (!(cep->fsm_state == TCP_FSM_CLOSED || cep->fsm_state == TCP_FSM_LISTEN)) {
+			for (tix = NUM_TCP_TIMERS; cep != NULL && tix -- > 0; ) {
+				if (cep->timer[tix] != 0 && -- cep->timer[tix] == 0) {
+					cep = tcp_timers(cep, tix);
+					}
+				}
+			if (cep != NULL) {
+				cep->idle ++;
+				if (cep->rtt) {
+					cep->rtt ++;
+					}
+				}
+			}
+		}
+
+#if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0
+
+	tcp_tw_timo();
+
+#endif	/* of #if defined(NUM_TCP_TW_CEP_ENTRY) && NUM_TCP_TW_CEP_ENTRY > 0 */
+
+	if (tcp_iss != 0) {
+		tcp_iss += TCP_ISS_INCR() / TCP_SLOW_HZ;
+		}
+
+	timeout(tcp_slow_timo, NULL, TCP_SLOW_TMO);
+	}
+
+#ifdef TCP_CFG_DELAY_ACK
+
+/*
+ *  tcp_fast_timo -- 200 [ms] æ¯ã«å¼åºããã TCP ã¿ã¤ã ã¢ã¦ãé¢æ°
+ */
+
+void
+tcp_fast_timo (void *ignore)
+{
+	T_TCP_CEP	*cep;
+	int_t		cix;
+
+	for (cix = tmax_tcp_cepid; cix -- > 0; ) {
+		cep = &tcp_cep[cix];
+		if (cep->flags & TCP_CEP_FLG_DEL_ACK) {
+			cep->flags &= ~TCP_CEP_FLG_DEL_ACK;
+			cep->flags |=  TCP_CEP_FLG_ACK_NOW | TCP_CEP_FLG_POST_OUTPUT;
+			sig_sem(SEM_TCP_POST_OUTPUT);
+			}
+		}
+
+	timeout(tcp_fast_timo, NULL, TCP_FAST_TMO);
+	}
+
+#endif/* of #ifdef TCP_CFG_DELAY_ACK */
+
+/*
+ *  tcp_range_set -- æéãæå®ããç¯å²ã«è¨­å®ããã
+ */
+
+T_TCP_TIME
+tcp_range_set (T_TCP_TIME value, T_TCP_TIME tvmin, T_TCP_TIME tvmax)
+{
+	if ((uint32_t)value < (uint32_t)tvmin)
+		return tvmin;
+	else if ((uint32_t)value > (uint32_t)tvmax)
+		return tvmax;
+	else
+		return value;
+	}
+
+/*
+ *  tcp_set_persist_timer -- æç¶ã¿ã¤ãã®è¨­å®
+ */
+
+void
+tcp_set_persist_timer (T_TCP_CEP *cep)
+{
+	T_TCP_TIME time;
+
+	/*
+	 *  srtt:   å¹³æ»åããã RTT
+	 *  rttvar: å¹³æ»åãããåæ£
+	 */
+	time = ((cep->srtt >> 2) + cep->rttvar) >> 1;
+
+	/*
+	 *  åéã¿ã¤ããè¨­å®ããã¦ããã°åå¾©ä¸è½ã¨ã©ã¼
+	 */
+	if (cep->timer[TCP_TIM_REXMT])
+		/* %%% panic("tcp_output REXMT"); %%% */;
+
+	/*
+	 *  æç¶ã¿ã¤ããè¨­å®ããã
+	 */
+	cep->timer[TCP_TIM_PERSIST] = tcp_range_set((T_TCP_TIME)(time * tcp_back_off[cep->rxtshift]),
+	                                            (T_TCP_TIME)TCP_TVAL_MIN_PERSIST,
+	                                            (T_TCP_TIME)TCP_TVAL_MAX_PERSIST);
+
+	/*
+	 *  åéåæ°ãæ´æ°ããã
+	 */
+	if (cep->rxtshift < TCP_MAX_REXMT_SHIFT)
+		cep->rxtshift ++;
+	}
+
+#endif	/* of #ifdef SUPPORT_TCP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_timer.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_timer.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_timer.h	(revision 270)
@@ -0,0 +1,163 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)tcp_timer.h	8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/netinet/tcp_timer.h,v 1.13.2.1 1999/08/29 16:29:56 peter Exp $
+ */
+ 
+#ifndef _TCP_TIMER_H_
+#define _TCP_TIMER_H_
+
+/* TCP ã¿ã¤ãå¤æ° */
+
+#define NUM_TCP_TIMERS		4	/* TCP ã®ã¿ã¤ãæ°	*/
+
+#define TCP_TIM_REXMT		0	/* åéã¿ã¤ã		*/
+#define TCP_TIM_PERSIST		1	/* æç¶ã¿ã¤ã		*/
+#define TCP_TIM_KEEP		2	/* ä¿ç (keep alive) ã¿ã¤ã*/
+#define TCP_TIM_2MSL		3	/* 2MSL ã¿ã¤ã		*/
+
+/* MSL: Maximum Segment Lifetime, æå¤§ã»ã°ã¡ã³ãçå­æé 		*/
+
+/*
+ *  TCP/IP ã®ã¿ã¤ãã®å®ç¾©
+ */
+
+#define TCP_SLOW_TMO		(ULONG_C(500)/NET_TIMER_CYCLE)	/* 500 [ms]	*/
+#define TCP_FAST_TMO		(ULONG_C(200)/NET_TIMER_CYCLE)	/* 200 [ms]	*/
+
+#define TCP_SLOW_HZ		(ULONG_C(1000)/TCP_SLOW_TMO/NET_TIMER_CYCLE)	/* Hz	*/
+
+/* TCP ã¿ã¤ãå¤ */
+
+#define TCP_TVAL_MSL		(TCP_SLOW_HZ * 30)
+					/* æå¤§ã»ã°ã¡ã³ãçå­æé	*/
+
+#define TCP_TVAL_SRTT_BASE	0	/* æ»ãããªå¾å¾©æéã®åºæºå¤*/
+
+#define TCP_TVAL_RTO_BASE	(TCP_SLOW_HZ * 3)
+		/* æ
+å ±ãå¾ãããªãå ´åã®åéã¿ã¤ã ã¢ã¦ãã®åºæºå¤	*/
+
+#define TCP_TVAL_MIN_PERSIST	(TCP_SLOW_HZ * 5)
+				/* æç¶ã¿ã¤ã ã¢ã¦ãã®æå°å¤	*/
+#define TCP_TVAL_MAX_PERSIST	(TCP_SLOW_HZ * 60)
+				/* æç¶ã¿ã¤ã ã¢ã¦ãã®æå¤§å¤	*/
+
+#define TCP_TVAL_KEEP_INIT	(TCP_SLOW_HZ * 75)
+					/* ä¿çã¿ã¤ãã®åæå¤	*/
+#define TCP_TVAL_KEEP_IDLE	(TCP_SLOW_HZ * 2 * 60 * 60)
+					/* ä¿çã¿ã¤ãèµ·åã¾ã§ã®æ¨æºå¤*/
+#define TCP_TVAL_KEEP_INTERVAL	(TCP_SLOW_HZ * 75)
+					/* ä¿çã¿ã¤ãã¤ã³ã¿ã¼ãã«ã®æ¨æºå¤*/
+#define TCP_TVAL_KEEP_COUNT	8	/* ä¿çã¿ã¤ã ã¢ã¦ãã®æå¤§å¤*/
+
+#define TCP_TVAL_MIN		(TCP_SLOW_HZ * 3)
+					/* æéã®æå°åä½	*/
+#define TCP_TVAL_MAX_REXMT	(TCP_SLOW_HZ * 64)
+					/* æå¤§åéæé		*/
+
+/*
+ *  ä»¥ä¸ã®å¤æ°ã®å¤ã¯ãã¯ã­ã§è¨­å®ããã
+ *
+ *  tcp_maixidle   = tcp_keepcnt * tcp_keepintvl
+ *                 = TCP_TVAL_KEEP_COUNT * TCP_TVAL_KEEP_INTERVAL
+ *  tcp_keepcnt    = TCP_TVAL_KEEP_COUNT
+ *  tcp_keepintval = TCP_TVAL_KEEP_INTERVAL
+ *
+ */
+
+/*
+ *  ãã®ä»ã®å®æ°
+ */
+
+#define TCP_MAX_REXMT_SHIFT	12	/* æå¤§åéåæ°		*/
+
+/* TCP ã¿ã¤ãå¤ã®å */
+
+typedef int16_t T_TCP_TIME;
+
+/*
+ *  é¢æ°
+ */
+
+extern void tcp_slow_timo (void *ignore);
+extern void tcp_fast_timo (void *ignore);
+
+extern T_TCP_TIME tcp_range_set (T_TCP_TIME value, T_TCP_TIME tvmin, T_TCP_TIME tvmax);
+
+#endif	/* of #ifndef _TCP_TIMER_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_usrreq.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_usrreq.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_usrreq.c	(revision 270)
@@ -0,0 +1,2025 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	From: @(#)tcp_usrreq.c	8.2 (Berkeley) 1/3/94
+ * $FreeBSD: src/sys/netinet/tcp_usrreq.c,v 1.40.2.3 1999/08/29 16:29:57 peter Exp $
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_var.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet/in_itron.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_timer.h>
+#include <netinet/tcp_var.h>
+#include <netinet/tcp_fsm.h>
+#include <netinet/tcp_seq.h>
+
+#include <net/if_var.h>
+
+#ifdef SUPPORT_TCP
+
+/*
+ *  IPv4 ã¨ IPv6 ã®åãæ¿ããã¯ã­
+ */
+
+#if defined(SUPPORT_INET4)
+
+#define TCP_CRE_REP	tcp_cre_rep
+#define TCP_ACP_CEP	tcp_acp_cep
+#define TCP_CON_CEP	tcp_con_cep
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+#define TCP_CRE_REP	tcp6_cre_rep
+#define TCP_ACP_CEP	tcp6_acp_cep
+#define TCP_CON_CEP	tcp6_con_cep
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+/*
+ *  TINET ãã©ã¤ãã©ãªåããªãå ´åã¯ãå
+¨ã¦ã®æ©è½ã
+ *  ãªãã¸ã§ã¯ããã¡ã¤ã«ã«åºåããããããã¯ã­ãæå¹ã«ããã
+ */
+
+#ifndef TCP_CFG_LIBRARY
+
+#define __tcp_cre_rep
+#define __tcp_del_rep
+#define __tcp_cre_cep
+#define __tcp_del_cep
+#define __tcp_acp_cep
+#define __tcp_con_cep
+#define __tcp_sht_cep
+#define __tcp_cls_cep
+#define __tcp_snd_dat
+#define __tcp_rcv_dat
+#define __tcp_snd_oob
+#define __tcp_rcv_oob
+#define __tcp_get_buf
+#define __tcp_snd_buf
+#define __tcp_rcv_buf
+#define __tcp_rel_buf
+#define __tcp_can_cep
+#define __tcp_set_opt
+#define __tcp_get_opt
+
+#endif	/* of #ifndef TCP_CFG_LIBRARY */
+
+/*
+ *  tcp_cre_rep -- TCP åä»å£ã®çæãæ¡å¼µæ©è½ã
+ */
+
+#ifdef __tcp_cre_rep
+
+#ifdef TCP_CFG_EXTENTIONS
+
+ER
+TCP_CRE_REP (ID repid, T_TCP_CREP *pk_crep)
+{
+	T_TCP_REP	*rep;
+	ER		error;
+
+	/* TCP åä»å£ ID ããã§ãã¯ããã*/
+	if (!VAID_TCP_REPID(repid))
+		return E_ID;
+
+	/* pk_crep ã NULL ãªãã¨ã©ã¼ */
+	if (pk_crep == NULL)
+		return E_PAR;
+
+	/* TCP åä»å£ãå¾ãã*/
+	rep = GET_TCP_REP(repid);
+
+	/* TCP åä»å£ããåççæç¨ã§ãªããã°ã¨ã©ã¼ */
+	if (!DYNAMIC_TCP_REP(rep))
+		return E_ID;
+
+	/* åä»å£ãã­ãã¯ããã*/
+	syscall(wai_sem(rep->semid_lock));
+
+	/*
+	 * TCP åä»å£ããã§ãã¯ãããçææ¸ã¿ã§ããã°ã¨ã©ã¼
+	 */
+	if (VALID_TCP_REP(rep))
+		error = E_OBJ;
+	else {
+
+		/* TCP åä»å£çææ
+å ±ãã³ãã¼ããã*/
+		rep->repatr = pk_crep->repatr;		/* åä»å£å±æ§		*/
+		rep->myaddr = pk_crep->myaddr;		/* èªåã®ã¢ãã¬ã¹	*/
+
+		/* TCP åä»å£ãçææ¸ã¿ã«ããã*/
+		rep->flags |= TCP_REP_FLG_VALID;
+		error = E_OK;
+		}
+
+	/* åä»å£ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(rep->semid_lock));
+
+	return error;
+	}
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+#endif	/* of #ifdef __tcp_cre_cep */
+
+#ifdef __tcp_del_rep
+
+#ifdef TCP_CFG_EXTENTIONS
+
+/*
+ *  tcp_find_cep_rep -- TCP åä»å£ããªã³ã¯ãã¦ãã TCP éä¿¡ç«¯ç¹ãå¾ãã
+ */
+
+static T_TCP_CEP*
+tcp_find_cep_rep (T_TCP_REP* rep)
+{
+	T_TCP_CEP*	cep;
+
+	for (cep = &tcp_cep[tmax_tcp_cepid]; cep -- != tcp_cep; ) {
+		if (cep->rep == rep)
+			return cep;
+		}
+
+	return NULL;
+	}
+
+/*
+ *  tcp_del_rep -- TCP åä»å£ã®åé¤ãæ¡å¼µæ©è½ã
+ */
+
+
+ER
+tcp_del_rep (ID repid)
+{
+	T_TCP_CEP	*cep;
+	T_TCP_REP	*rep;
+	ER		error = E_OK;
+
+	/* TCP åä»å£ ID ããã§ãã¯ããã*/
+	if (!VAID_TCP_REPID(repid))
+		return E_ID;
+
+	/* TCP åä»å£ãå¾ãã*/
+	rep = GET_TCP_REP(repid);
+
+	/* TCP åä»å£ããåççæç¨ã§ãªããã°ã¨ã©ã¼ */
+	if (!DYNAMIC_TCP_REP(rep))
+		return E_ID;
+
+	/* åä»å£ãã­ãã¯ããã*/
+	syscall(wai_sem(rep->semid_lock));
+
+	/* TCP åä»å£ããã§ãã¯ãããæªçæã®å ´åã¯ã¨ã©ã¼ */
+	if (!VALID_TCP_REP(rep))
+		error = E_NOEXS;
+	else {
+		if ((cep = tcp_find_cep_rep(rep)) != NULL) {
+			/*
+			 * ãã§ã«ååãªã¼ãã³ãã¦ããã¨ã
+			 *ï¼tcp_acp_cep ãå¼ã°ãã¦ããã¨ãï¼ã¯ã
+			 * tcp_acp_cep ãçµäºãããã
+			 */
+
+			/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+			syscall(wai_sem(cep->semid_lock));
+
+			/*
+			 *  éä¿¡ç«¯ç¹ããåä»å£ãè§£æ¾ãã
+			 *  ã¤ãã³ããã©ã°ãã¯ã­ã¼ãºã«è¨­å®ããã
+			 */
+			cep->rep = NULL;
+			cep->fsm_state = TCP_FSM_CLOSED;
+			cep->error = E_DLT;
+			syscall(set_flg(cep->est_flgid, TCP_CEP_EVT_CLOSED));
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+			if (cep->rcv_nblk_tfn != TFN_TCP_UNDEF) {
+				if (IS_PTR_DEFINED(cep->callback)) {
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+					(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)E_DLT);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+					ER	error = E_DLT;
+
+					(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)&error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+					}
+				else
+					error = E_OBJ;
+				cep->rcv_nblk_tfn = TFN_TCP_UNDEF;
+				}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+			cep->rcv_tskid = TA_NULL;
+			cep->rcv_tfn   = TFN_TCP_UNDEF;
+
+			/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+			syscall(sig_sem(cep->semid_lock));
+
+			}
+		else
+			error = E_OK;
+
+		/* TCP åä»å£ãæªçæã«ããã*/
+		rep->flags &= ~TCP_REP_FLG_VALID;
+		}
+
+	/* åä»å£ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(rep->semid_lock));
+
+	return error;
+	}
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+#endif	/* of #ifdef __tcp_del_rep */
+
+/*
+ *  tcp_cre_cep -- TCP éä¿¡ç«¯ç¹ã®çæãæ¡å¼µæ©è½ã
+ */
+
+#ifdef __tcp_cre_cep
+
+#ifdef TCP_CFG_EXTENTIONS
+
+ER
+tcp_cre_cep (ID cepid, T_TCP_CCEP *pk_ccep)
+{
+	T_TCP_CEP	*cep;
+	ER		error;
+
+	/* TCP éä¿¡ç«¯ç¹ ID ããã§ãã¯ããã*/
+	if (!VAID_TCP_CEPID(cepid))
+		return E_ID;
+
+	/* pk_ccep ã NULL ãªãã¨ã©ã¼ */
+	if (pk_ccep == NULL)
+		return E_PAR;
+
+	/* TCP éä¿¡ç«¯ç¹ãå¾ãã*/
+	cep = GET_TCP_CEP(cepid);
+
+	/* TCP éä¿¡ç«¯ç¹ããåççæç¨ã§ãªããã°ã¨ã©ã¼ */
+	if (!DYNAMIC_TCP_CEP(cep))
+		return E_ID;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	/*
+	 * TCP éä¿¡ç«¯ç¹ããã§ãã¯ãããçææ¸ã¿ã§ããã°ã¨ã©ã¼
+	 */
+	if (VALID_TCP_CEP(cep))
+		error = E_OBJ;
+	else {
+
+		/* TCP éä¿¡ç«¯ç¹çææ
+å ±ãã³ãã¼ããã*/
+		cep->cepatr   = pk_ccep->cepatr;		/* éä¿¡ç«¯ç¹å±æ§			*/
+		cep->sbuf     = pk_ccep->sbuf;			/* éä¿¡ç¨ã¦ã£ã³ããããã¡	*/
+		cep->sbufsz   = pk_ccep->sbufsz;		/* éä¿¡ç¨ã¦ã£ã³ããããã¡ãµã¤ãº	*/
+		cep->rbuf     = pk_ccep->rbuf;			/* åä¿¡ç¨ã¦ã£ã³ããããã¡	*/
+		cep->rbufsz   = pk_ccep->rbufsz;		/* åä¿¡ç¨ã¦ã£ã³ããããã¡ãµã¤ãº	*/
+		cep->callback = (void*)pk_ccep->callback;	/* ã³ã¼ã«ããã¯			*/
+
+		/* TCP éä¿¡ç«¯ç¹ãçææ¸ã¿ã«ããã*/
+		cep->flags |= TCP_CEP_FLG_VALID;
+		error = E_OK;
+		}
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	return error;
+	}
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+#endif	/* of #ifdef __tcp_cre_cep */
+
+/*
+ *  tcp_del_cep -- TCP éä¿¡ç«¯ç¹ã®åé¤ãæ¡å¼µæ©è½ã
+ */
+
+#ifdef __tcp_del_cep
+
+#ifdef TCP_CFG_EXTENTIONS
+
+ER
+tcp_del_cep (ID cepid)
+{
+	T_TCP_CEP	*cep;
+	ER		error;
+
+	/* TCP éä¿¡ç«¯ç¹ ID ããã§ãã¯ããã*/
+	if (!VAID_TCP_CEPID(cepid))
+		return E_ID;
+
+	/* TCP éä¿¡ç«¯ç¹ãå¾ãã*/
+	cep = GET_TCP_CEP(cepid);
+
+	/* TCP éä¿¡ç«¯ç¹ããåççæç¨ã§ãªããã°ã¨ã©ã¼ */
+	if (!DYNAMIC_TCP_CEP(cep))
+		return E_ID;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	/*
+	 * TCP éä¿¡ç«¯ç¹ããã§ãã¯ãããä»¥ä¸ã®å ´åã¯ã¨ã©ã¼
+	 * ã»æªçæã
+	 * ã»ä½¿ç¨ä¸­ã
+	 */
+	if (!VALID_TCP_CEP(cep))
+		error = E_NOEXS;
+	else if (cep->fsm_state != TCP_FSM_CLOSED)
+		error = E_OBJ;
+	else {
+
+		/* TCP éä¿¡ç«¯ç¹ãæªçæã«ããã*/
+		cep->flags &= ~TCP_CEP_FLG_VALID;
+		error = E_OK;
+		}
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	return error;
+	}
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+#endif	/* of #ifdef __tcp_del_cep */
+
+#ifdef TCP_CFG_PASSIVE_OPEN
+
+/*
+ *  tcp_acp_cep -- æ¥ç¶è¦æ±å¾
+ã¡ (ååãªã¼ãã³)ãæ¨æºæ©è½ã
+ */
+
+#ifdef __tcp_acp_cep
+
+ER
+TCP_ACP_CEP (ID cepid, ID repid, T_IPEP *p_dstaddr, TMO tmout)
+{
+	T_TCP_REP	*rep;
+	T_TCP_CEP	*cep;
+	ER		error;
+	FLGPTN		flag;
+
+	/* TCP åä»å£ããã§ãã¯ããã*/
+	if (!VAID_TCP_REPID(repid))
+		return E_ID;
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	/* p_dstaddr ã NULL ãªãã¨ã©ã¼ */
+	if (p_dstaddr == NULL)
+		return E_PAR;
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	/* p_dstaddr ã NULL ããtmout ã TMO_NBLK ãªãã¨ã©ã¼ */
+	if (p_dstaddr == NULL || tmout == TMO_NBLK)
+		return E_PAR;
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	/*
+	 *  CEP ãã­ãã¯ããAPI æ©è½ã³ã¼ãã¨ã¿ã¹ã¯è­å¥å­ãè¨é²ããã
+	 *  ãã§ã«è¨é²ããã¦ããã°ããã³ãã£ã³ã°ä¸­ãªã®ã§ã¨ã©ã¼
+	 */
+	if ((error = tcp_lock_cep(cepid, &cep, TFN_TCP_ACP_CEP)) != E_OK)
+		return error;
+
+	/* CEP ã® FSM ãã¯ã­ã¼ãºç¶æ
+ã§ãªããã°ã¨ã©ã¼ã*/
+	if (cep->fsm_state != TCP_FSM_CLOSED) {
+		error = E_OBJ;
+		goto err_ret;
+		}
+	syscall(clr_flg(cep->est_flgid, (FLGPTN)(~TCP_CEP_EVT_CLOSED)));
+
+	/* TCP éä¿¡ç«¯ç¹ãåæåããã*/
+	tcp_init_cep(cep);
+
+	/* TCP åä»å£ãå¾ãã*/
+	rep = GET_TCP_REP(repid);
+
+#ifdef TCP_CFG_EXTENTIONS
+
+	/* TCP åä»å£ãã­ãã¯ããã*/
+	syscall(wai_sem(rep->semid_lock));
+
+	/* TCP åä»å£ããã§ãã¯ããã*/
+	if (!VALID_TCP_REP(rep)) {
+		syscall(sig_sem(rep->semid_lock));
+		error = E_NOEXS;
+		goto err_ret;
+		}
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+	/* TCP éä¿¡ç«¯ç¹ã«TCPåä»å£ãè¨é²ããã*/
+	cep->rep = rep;
+
+#ifdef TCP_CFG_EXTENTIONS
+
+	/* TCP åä»å£ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(rep->semid_lock));
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+	/* TCP åä»å£ã®ã¢ãã¬ã¹ãã³ãã¼ããã*/
+	cep->myaddr = rep->myaddr;
+
+	/* éä¿¡ç«¯ç¹ãè¨­å®ããã*/
+	cep->fsm_state = TCP_FSM_LISTEN;
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	/* ã¿ã¤ã ã¢ã¦ãããã§ãã¯ããã*/
+	if (tmout == TMO_NBLK) {
+		/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+		cep->p_dstaddr    = p_dstaddr;
+		cep->rcv_nblk_tfn = TFN_TCP_ACP_CEP;
+		return E_WBLK;
+		}
+	else {
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+		/*
+		 *  FSM ã ESTABLISHED ã«ãªãã¾ã§å¾
+ã¤ã
+		 *  FSM ã CLOSED ã«ãªã£ãå ´åã¯ãã¨ã©ã¼ãçºçãããã¨ãæå³ãã¦ããã
+		 */
+		error = twai_flg(cep->est_flgid, (TCP_CEP_EVT_CLOSED |
+		                                  TCP_CEP_EVT_ESTABLISHED), TWF_ORW, &flag, tmout);
+		if (error == E_OK) {
+			if (cep->error != E_OK)
+				error = cep->error;
+			else if (cep->fsm_state == TCP_FSM_CLOSED)
+				error = E_TMOUT;
+			}
+
+		syscall(clr_flg(cep->est_flgid, (FLGPTN)(~TCP_CEP_EVT_ESTABLISHED)));
+
+		if (error == E_OK) {
+			/* ç¸æã®ã¢ãã¬ã¹ãã³ãã¼ããã*/
+			*p_dstaddr = cep->dstaddr;
+			}
+		else {
+			/*
+			 *  éä¿¡ç«¯ç¹ããåä»å£ãè§£æ¾ãã
+			 *  ã¤ãã³ããã©ã°ãã¯ã­ã¼ãºã«è¨­å®ããã
+			 */
+			cep->rep = NULL;
+			cep->fsm_state = TCP_FSM_CLOSED;
+			syscall(set_flg(cep->est_flgid, TCP_CEP_EVT_CLOSED));
+			}
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+		}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+err_ret:
+	cep->rcv_tskid = TA_NULL;
+	cep->rcv_tfn   = TFN_TCP_UNDEF;
+	return error;
+	}
+
+#endif	/* of #ifdef __tcp_acp_cep */
+
+#endif	/* of #ifdef TCP_CFG_PASSIVE_OPEN */
+
+/*
+ *  tcp_con_cep -- æ¥ç¶è¦æ± (è½åãªã¼ãã³)ãæ¨æºæ©è½ã
+ */
+
+#ifdef __tcp_con_cep
+
+ER
+TCP_CON_CEP (ID cepid, T_IPEP *p_myaddr, T_IPEP *p_dstaddr, TMO tmout)
+{
+	T_TCP_CEP	*cep;
+	ER		error;
+	FLGPTN		flag;
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	/*
+	 *  p_dstaddr ã¾ãã¯ p_myaddr ã NULL ãã
+	 *  ãã¦å
+ããã«ãã­ã£ã¹ãã¢ãã¬ã¹ãªãã¨ã©ã¼
+	 */
+	if (p_myaddr == NULL || p_dstaddr == NULL || IN_IS_ADDR_MULTICAST(&p_dstaddr->ipaddr))
+		return E_PAR;
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	/*
+	 *  p_dstaddr ã¾ãã¯ p_myaddr ã NULL ã
+	 *  ãã¦å
+ããã«ãã­ã£ã¹ãã¢ãã¬ã¹ãã
+	 *  tmout ã TMO_NBLK ãªãã¨ã©ã¼
+	 */
+	if (p_myaddr == NULL || p_dstaddr == NULL ||
+	    IN_IS_ADDR_MULTICAST(&p_dstaddr->ipaddr) || tmout == TMO_NBLK)
+		return E_PAR;
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	/*
+	 *  CEP ãã­ãã¯ããAPI æ©è½ã³ã¼ãã¨ã¿ã¹ã¯è­å¥å­ãè¨é²ããã
+	 *  ãã§ã«è¨é²ããã¦ããã°ããã³ãã£ã³ã°ä¸­ãªã®ã§ã¨ã©ã¼
+	 */
+	if ((error = tcp_lock_cep(cepid, &cep, TFN_TCP_CON_CEP)) != E_OK)
+		return error;
+
+	/* CEP ã® FSM ãã¯ã­ã¼ãºç¶æ
+ã§ãªããã°ã¨ã©ã¼ã*/
+	if (cep->fsm_state != TCP_FSM_CLOSED) {
+		error = E_OBJ;
+		goto err_ret;
+		}
+	syscall(clr_flg(cep->est_flgid, (FLGPTN)(~TCP_CEP_EVT_CLOSED)));
+
+	/* ã·ã¼ã±ã³ã¹çªå·ãåæåããã*/
+	if (tcp_iss == 0)
+		tcp_init_iss();
+
+	/* éä¿¡ç«¯ç¹ãåæåããã*/
+	tcp_init_cep(cep);
+
+	/*
+	 *  p_myaddr ã NADR (-1) ã§ã¯ãªããèª IP ã¢ãã¬ã¹ã ANY ã§ãªããã°ã
+	 *  æå®ããã IP ã¢ãã¬ã¹ãå²ãå½ã¦ãã
+	 */
+	if (p_myaddr != NADR && !IN_IS_ADDR_ANY(&p_myaddr->ipaddr))
+		cep->myaddr.ipaddr = p_myaddr->ipaddr;
+	else {
+		T_IN_IFADDR	*ia;
+
+		if ((ia = IN_IFAWITHIFP(IF_GET_IFNET(), &p_dstaddr->ipaddr)) == NULL) {
+			error = E_PAR;
+			goto err_ret;
+			}
+		cep->myaddr.ipaddr = ia->addr;
+		}
+
+	/* éä¿¡ç«¯ç¹ãè¨­å®ããã*/
+	cep->fsm_state = TCP_FSM_SYN_SENT;
+	cep->dstaddr   = *p_dstaddr;
+	cep->iss       = tcp_iss;
+	cep->timer[TCP_TIM_KEEP] = TCP_TVAL_KEEP_INIT;
+	tcp_iss += TCP_ISS_INCR() / 2;
+	init_send_seq(cep);
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	/* ã¿ã¤ã ã¢ã¦ãããã§ãã¯ããã*/
+	if (tmout == TMO_NBLK) {
+		/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+		cep->p_dstaddr    = p_dstaddr;
+		cep->p_myaddr     = p_myaddr;
+		cep->snd_nblk_tfn = TFN_TCP_CON_CEP;
+
+		/* ã³ãã¯ã·ã§ã³ã®éè¨­ããã¹ãããã*/
+		cep->flags |= TCP_CEP_FLG_POST_OUTPUT;
+		sig_sem(SEM_TCP_POST_OUTPUT);
+		return E_WBLK;
+		}
+	else {
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+		/*
+		 *  p_myaddr ã NADR (-1) ãã
+		 *  èªãã¼ãçªå·ã TCP_PORTANY ãªããèªåã§å²ãå½ã¦ãã
+		 */
+		if (p_myaddr == NADR || p_myaddr->portno == TCP_PORTANY)
+			tcp_alloc_auto_port(cep);
+		else if ((error = tcp_alloc_port(cep, p_myaddr->portno)) != E_OK)
+			goto err_ret;
+
+		/* ã³ãã¯ã·ã§ã³ã®éè¨­ããã¹ãããã*/
+		cep->flags |= TCP_CEP_FLG_POST_OUTPUT;
+		sig_sem(SEM_TCP_POST_OUTPUT);
+
+		/*
+		 *  ã¤ãã³ãã ESTABLISHED ã«ãªãã¾ã§å¾
+ã¤ã
+		 *  ã¤ãã³ãã CLOSED ã«ãªã£ãå ´åã¯ãä½ããã®ã¨ã©ã¼ãçºçãããã
+		 *  æ¥ç¶è¦æ±ãæå¦ããããã¨ãæå³ãã¦ããã
+		 */
+		error = twai_flg(cep->est_flgid, (TCP_CEP_EVT_CLOSED |
+		                                  TCP_CEP_EVT_ESTABLISHED), TWF_ORW, &flag, tmout);
+		if (error == E_OK) {
+			if (cep->error != E_OK)
+				error = cep->error;
+			else if (cep->fsm_state == TCP_FSM_CLOSED)
+				error = E_CLS;
+			}
+
+		syscall(clr_flg(cep->est_flgid, (FLGPTN)(~TCP_CEP_EVT_ESTABLISHED)));
+
+		if (error != E_OK) {
+			/*
+			 *  éä¿¡ç«¯ç¹ããåä»å£ãè§£æ¾ãã
+			 *  ã¤ãã³ããã©ã°ãã¯ã­ã¼ãºã«è¨­å®ããã
+			 */
+			cep->rep = NULL;
+			cep->fsm_state = TCP_FSM_CLOSED;
+			syscall(set_flg(cep->est_flgid, TCP_CEP_EVT_CLOSED));
+			}
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+		}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+err_ret:
+	cep->snd_tskid = TA_NULL;
+	cep->snd_tfn   = TFN_TCP_UNDEF;
+	return error;
+	}
+
+#endif	/* of #ifdef __tcp_con_cep */
+
+#ifdef __tcp_cls_cep
+
+/*
+ *  tcp_user_closed -- ã¦ã¼ã¶ããã®ã³ãã¯ã·ã§ã³ã®éæ¾
+ */
+
+T_TCP_CEP *
+tcp_user_closed (T_TCP_CEP *cep)
+{
+	switch (cep->fsm_state) {
+
+	case TCP_FSM_CLOSED:		/* ã¯ã­ã¼ãº	*/
+	case TCP_FSM_LISTEN:		/* ååãªã¼ãã³	*/
+		cep->fsm_state = TCP_FSM_CLOSED;
+		cep = tcp_close(cep);
+		break;
+
+	case TCP_FSM_SYN_SENT:		/* è½åãªã¼ãã³ãSYN éä¿¡æ¸ã¿	*/
+	case TCP_FSM_SYN_RECVD:		/* SYN ãåä¿¡ããSYN éä¿¡æ¸ã¿	*/
+		cep->flags |= TCP_CEP_FLG_NEED_FIN;
+		break;
+
+	case TCP_FSM_ESTABLISHED:	/* ã³ãã¯ã·ã§ã³éè¨­å®äº	*/
+		cep->fsm_state = TCP_FSM_FIN_WAIT_1;
+		break;
+
+	case TCP_FSM_CLOSE_WAIT:	/* ç¸æãã FIN åä¿¡ãAPP ã®çµäºå¾
+ã¡ */
+		cep->fsm_state = TCP_FSM_LAST_ACK;
+		break;
+		}
+
+	if (cep != NULL && cep->fsm_state == TCP_FSM_FIN_WAIT_2)
+		cep->timer[TCP_TIM_2MSL] = TCP_TVAL_KEEP_COUNT * TCP_TVAL_KEEP_INTERVAL;
+	return cep;
+	}
+
+/*
+ *  tcp_cls_cep -- éä¿¡ç«¯ç¹ã®ã¯ã­ã¼ãºãæ¨æºæ©è½ã
+ */
+
+ER
+tcp_cls_cep (ID cepid, TMO tmout)
+{
+	T_TCP_CEP	*cep;
+	ER		error = E_OK;
+	FLGPTN		flag;
+
+#ifndef TCP_CFG_NON_BLOCKING
+
+	/* tmout ã TMO_NBLK ãªãã¨ã©ã¼ */
+	if (tmout == TMO_NBLK)
+		return E_PAR;
+
+#endif	/* of #ifndef TCP_CFG_NON_BLOCKING */
+
+	/*
+	 *  CEP ãã­ãã¯ããAPI æ©è½ã³ã¼ãã¨ã¿ã¹ã¯è­å¥å­ãè¨é²ããã
+	 *  ãã§ã«è¨é²ããã¦ããã°ããã³ãã£ã³ã°ä¸­ãªã®ã§ã¨ã©ã¼
+	 */
+	if ((error = tcp_lock_cep(cepid, &cep, TFN_TCP_CLS_CEP)) != E_OK)
+		return error;
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	/* ã¿ã¤ã ã¢ã¦ãããã§ãã¯ããã*/
+	if (tmout == TMO_NBLK) {				/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+		if (!IS_PTR_DEFINED(cep->callback))
+			error = E_OBJ;
+		else if (cep->fsm_state == TCP_FSM_CLOSED) {	/* ãã§ã«ã¯ã­ã¼ãºããã¦ããã¨ã */
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+			(*cep->callback)(GET_TCP_CEPID(cep), TFN_TCP_CLS_CEP, E_OK);
+			error = E_WBLK;
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			ER	error = E_OK;
+
+			(*cep->callback)(GET_TCP_CEPID(cep), TFN_TCP_CLS_CEP, (void*)&error);
+			error = E_WBLK;
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			}
+		else {
+			/* NBLK ã®API æ©è½ã³ã¼ããè¨­å®ããã*/
+			cep->rcv_nblk_tfn = TFN_TCP_CLS_CEP;
+
+			if ((cep = tcp_user_closed(cep)) != NULL) {	/* ã³ãã¯ã·ã§ã³ãåæ­ããã*/
+				/* åæ­ã»ã°ã¡ã³ãåºåããã¹ãããã*/
+				cep->flags |= TCP_CEP_FLG_POST_OUTPUT;
+				sig_sem(SEM_TCP_POST_OUTPUT);
+				}
+
+			/*  cep ã NULL ã§æ»ã£ã¦ããå ´åã¯ã
+			 *  æ¢ã«ã³ãã¯ã·ã§ã³ãåæ­ããã¦ãããã¨ãæå³ãã¦ããã
+			 *  ã¾ãããã®å ´åã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºããã¦ããã
+			 */
+			return E_WBLK;
+			}
+		}
+	else {							/* éãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+		if ((cep = tcp_user_closed(cep)) == NULL) {	/* ã³ãã¯ã·ã§ã³ãåæ­ããã*/
+
+			/*  cep ã NULL ã§æ»ã£ã¦ããå ´åã¯ã
+			 *  æ¢ã«ã³ãã¯ã·ã§ã³ãåæ­ããã¦ãããã¨ãæå³ãã¦ããã
+			 */
+			return error;
+			}
+		else {
+			/* åæ­ã»ã°ã¡ã³ãåºåããã¹ãããã*/
+			cep->flags |= TCP_CEP_FLG_POST_OUTPUT;
+			sig_sem(SEM_TCP_POST_OUTPUT);
+
+			/* ã¤ãã³ããã©ã°ã CLOSED ã«ãªãã¾ã§å¾
+ã¤ã*/
+			error = twai_flg(cep->est_flgid, TCP_CEP_EVT_CLOSED, TWF_ORW, &flag, tmout);
+			if (error == E_OK && cep->error != E_OK)
+				error = cep->error;
+
+			if (error != E_OK) {
+				if (error == E_RLWAI) {
+					/* tcp_cls_cep ãã­ã£ã³ã»ã«ãããã¨ãã¯ãRST ãéä¿¡ããã*/
+					tcp_respond(NULL, cep, cep->rcv_nxt, cep->snd_una - 1, 
+					            cep->rbufsz - cep->rwbuf_count, TCP_FLG_RST);
+					}
+
+				/* ã¿ã¤ãã¼ãåæ­¢ããã*/
+				tcp_cancel_timers(cep);
+
+				/* 
+				 *  éä¿¡ç«¯ç¹ãã­ãã¯ãã
+				 *  åä¿¡åæ§æã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã
+				 */
+				syscall(wai_sem(cep->semid_lock));
+				tcp_free_reassq(cep);
+				syscall(sig_sem(cep->semid_lock));
+
+				/* ç¶æ
+ãæªä½¿ç¨ã«ããã*/
+				cep->fsm_state = TCP_FSM_CLOSED;
+
+				/*
+				 * ä»¥ä¸ã«é¢ä¿ããªããã©ã°ãã¯ãªã¢ã¼ããã
+				 * ã»éåä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½
+				 * ã»åçãªéä¿¡ç«¯ç¹ã®çæã»åé¤æ©è½
+				 */
+				cep->flags &= (TCP_CEP_FLG_WBCS_NBUF_REQ | TCP_CEP_FLG_WBCS_MASK | 
+				               TCP_CEP_FLG_DYNAMIC       | TCP_CEP_FLG_VALID);
+
+				/* 
+				 *  éä¿¡ç«¯ç¹ãã­ãã¯ãã
+				 *  éåä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã
+				 */
+				cep->rwbuf_count = 0;
+				syscall(wai_sem(cep->semid_lock));
+				TCP_FREE_RWBUFQ(cep);
+				TCP_FREE_SWBUFQ(cep);
+				syscall(sig_sem(cep->semid_lock));
+
+				syscall(set_flg(cep->est_flgid, TCP_CEP_EVT_CLOSED));
+				}
+			}
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+		}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	cep->rcv_tskid = TA_NULL;
+	cep->rcv_tfn   = TFN_TCP_UNDEF;
+	return error;
+	}
+
+#endif	/* of #ifdef __tcp_cls_cep */
+
+#ifdef __tcp_sht_cep
+
+/*
+ *  tcp_sht_cep  -- ãã¼ã¿éä¿¡ã®çµäºãæ¨æºæ©è½ã
+ */
+
+ER
+tcp_sht_cep (ID cepid)
+{
+	T_TCP_CEP	*cep;
+	ER		error = E_OK;
+
+	/*
+	 *  CEP ãã­ãã¯ããAPI æ©è½ã³ã¼ãã¨ã¿ã¹ã¯è­å¥å­ãè¨é²ããã
+	 *  ãã§ã«è¨é²ããã¦ããã°ããã³ãã£ã³ã°ä¸­ãªã®ã§ã¨ã©ã¼
+	 */
+	if ((error = tcp_lock_cep(cepid, &cep, TFN_TCP_SHT_CEP)) != E_OK)
+		return error;
+
+	/* TCP éä¿¡ç«¯ç¹ã®ã³ãã¯ã·ã§ã³ãç¢ºç«ç¶æ
+ã§ãªããã°ã¨ã©ã¼ */
+	if (!TCP_FSM_HAVE_ESTABLISHED(cep->fsm_state)) {
+		if ((error = cep->error) == E_OK)
+			error = E_OBJ;
+		}
+
+	else if ((cep = tcp_user_closed(cep)) != NULL) {		/* ã³ãã¯ã·ã§ã³ãåæ­ããã*/
+
+		/* åæ­ã»ã°ã¡ã³ãåºåããã¹ãããã*/
+		cep->flags |= TCP_CEP_FLG_POST_OUTPUT;
+		sig_sem(SEM_TCP_POST_OUTPUT);
+		}
+
+	cep->snd_tskid = TA_NULL;
+	cep->snd_tfn   = TFN_TCP_UNDEF;
+	return error;
+	}
+
+#endif	/* of #ifdef __tcp_sht_cep */
+
+#ifdef __tcp_snd_dat
+
+/*
+ *  tcp_snd_dat -- ãã±ããã®éä¿¡ãæ¨æºæ©è½ã
+ */
+
+ER_UINT
+tcp_snd_dat (ID cepid, void *data, int_t len, TMO tmout)
+{
+	T_TCP_CEP	*cep;
+	ER_UINT		error;
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	/* data ã NULL ããlen < 0 ãªãã¨ã©ã¼ */
+	if (data == NULL || len < 0)
+		return E_PAR;
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	/* data ã NULLãlen < 0 ããtmout ã TMO_NBLK ãªãã¨ã©ã¼ */
+	if (data == NULL || len < 0 || tmout == TMO_NBLK)
+		return E_PAR;
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	/*
+	 *  CEP ãã­ãã¯ããAPI æ©è½ã³ã¼ãã¨ã¿ã¹ã¯è­å¥å­ãè¨é²ããã
+	 *  ãã§ã«è¨é²ããã¦ããã°ããã³ãã£ã³ã°ä¸­ãªã®ã§ã¨ã©ã¼
+	 */
+	if ((error = tcp_lock_cep(cepid, &cep, TFN_TCP_SND_DAT)) != E_OK)
+		return error;
+
+	/* éä¿¡ã§ããããéä¿¡ç«¯ç¹ã®ç¶æ
+ãè¦ãã*/
+	if ((error = tcp_can_send_more(cep, TFN_TCP_SND_DAT, tmout)) != E_OK)
+		goto err_ret;
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	/* ã¿ã¤ã ã¢ã¦ãããã§ãã¯ããã*/
+	if (tmout == TMO_NBLK) {		/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+		/* éä¿¡ã¦ã£ã³ããããã¡ã«ç©ºããããã°ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+		if (!TCP_IS_SWBUF_FULL(cep)) {
+
+		 	/* éä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ãæ¸ãè¾¼ãã*/
+			error = TCP_WRITE_SWBUF(cep, data, (uint_t)len);
+
+			/* åºåããã¹ãããã*/
+			cep->flags |= TCP_CEP_FLG_POST_OUTPUT;
+			sig_sem(SEM_TCP_POST_OUTPUT);
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+			/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+			(*cep->callback)(GET_TCP_CEPID(cep), TFN_TCP_SND_DAT, (void*)error);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+			(*cep->callback)(GET_TCP_CEPID(cep), TFN_TCP_SND_DAT, (void*)&error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			error = E_WBLK;
+			goto err_ret;
+			}
+		else {
+			cep->snd_data     = data;
+			cep->snd_len      = len;
+			cep->snd_nblk_tfn = TFN_TCP_SND_DAT;
+			TCP_ALLOC_SWBUF(cep);
+
+			return E_WBLK;
+			}
+		}
+	else {		/* éãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	 	/* éä¿¡ã¦ã£ã³ããããã¡ãç©ºãã®ãå¾
+ã¤ã*/
+		if ((error = TCP_WAIT_SWBUF(cep, tmout)) != E_OK)
+			goto err_ret;
+
+	 	/* éä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ãæ¸ãè¾¼ãã*/
+		if ((error = TCP_WRITE_SWBUF(cep, data, (uint_t)len)) > 0) {
+
+			/* ãã¼ã¿ãéä¿¡ãããéä¿¡ã¦ã£ã³ããããã¡ããã«ã®ã¨ãã¯å¼·å¶çã«éä¿¡ããã*/
+			if (TCP_IS_SWBUF_FULL(cep))
+				cep->flags |= TCP_CEP_FLG_FORCE | TCP_CEP_FLG_FORCE_CLEAR;
+
+			/* åºåããã¹ãããã*/
+			cep->flags |= TCP_CEP_FLG_POST_OUTPUT;
+			sig_sem(SEM_TCP_POST_OUTPUT);
+			}
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+		}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+err_ret:
+	cep->snd_tskid = TA_NULL;
+	cep->snd_tfn   = TFN_TCP_UNDEF;
+	return error;
+	}
+
+#endif	/* of #ifdef __tcp_snd_dat */
+
+#ifdef __tcp_snd_oob
+
+#ifdef TCP_CFG_EXTENTIONS
+
+/*
+ *  tcp_snd_oob -- ç·æ¥ãã¼ã¿ã®éä¿¡ãæ¡å¼µæ©è½ã
+ */
+
+ER_UINT
+tcp_snd_oob (ID cepid, void *data, int_t len, TMO tmout)
+{
+	T_TCP_CEP	*cep;
+	ER_UINT		error;
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	/* data ã NULL ããlen < 0 ãªãã¨ã©ã¼ */
+	if (data == NULL || len < 0)
+		return E_PAR;
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	/* data ã NULLãlen < 0 ããtmout ã TMO_NBLK ãªãã¨ã©ã¼ */
+	if (data == NULL || len < 0 || tmout == TMO_NBLK)
+		return E_PAR;
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	/*
+	 *  CEP ãã­ãã¯ããAPI æ©è½ã³ã¼ãã¨ã¿ã¹ã¯è­å¥å­ãè¨é²ããã
+	 *  ãã§ã«è¨é²ããã¦ããã°ããã³ãã£ã³ã°ä¸­ãªã®ã§ã¨ã©ã¼
+	 */
+	if ((error = tcp_lock_cep(cepid, &cep, TFN_TCP_SND_OOB)) != E_OK)
+		return error;
+
+	/* éä¿¡ã§ããããéä¿¡ç«¯ç¹ã®ç¶æ
+ãè¦ãã*/
+	if ((error = tcp_can_send_more(cep, TFN_TCP_SND_OOB, tmout)) != E_OK)
+		goto err_ret;
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	/* ã¿ã¤ã ã¢ã¦ãããã§ãã¯ããã*/
+	if (tmout == TMO_NBLK) {		/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+		/* éä¿¡ã¦ã£ã³ããããã¡ã«ç©ºããããã°ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+		if (!TCP_IS_SWBUF_FULL(cep)) {
+
+		 	/* éä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ãæ¸ãè¾¼ãã*/
+			error = TCP_WRITE_SWBUF(cep, data, (uint_t)len);
+
+			/* éä¿¡ç·æ¥ãã¤ã³ã¿ãè¨­å®ããã*/
+			cep->snd_up = cep->snd_una + cep->swbuf_count;
+
+			/* åºåããã¹ãããã*/
+			cep->flags |= TCP_CEP_FLG_POST_OUTPUT;
+			sig_sem(SEM_TCP_POST_OUTPUT);
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+			/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+			(*cep->callback)(GET_TCP_CEPID(cep), TFN_TCP_SND_OOB, (void*)error);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+			(*cep->callback)(GET_TCP_CEPID(cep), TFN_TCP_SND_OOB, (void*)&error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			error = E_WBLK;
+			goto err_ret;
+			}
+		else {
+			cep->snd_data     = data;
+			cep->snd_len      = len;
+			cep->snd_nblk_tfn = TFN_TCP_SND_OOB;
+			TCP_ALLOC_SWBUF(cep);
+
+			return E_WBLK;
+			}
+		}
+	else {		/* éãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	 	/* éä¿¡ã¦ã£ã³ããããã¡ãç©ºãã®ãå¾
+ã¤ã*/
+		if ((error = TCP_WAIT_SWBUF(cep, tmout)) != E_OK)
+			goto err_ret;
+
+	 	/* éä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ãæ¸ãè¾¼ãã*/
+		if ((error = TCP_WRITE_SWBUF(cep, data, (uint_t)len)) > 0) {
+
+			/* éä¿¡ç·æ¥ãã¤ã³ã¿ãè¨­å®ããã*/
+			cep->snd_up = cep->snd_una + cep->swbuf_count;
+
+			/* ãã¼ã¿ãéä¿¡ãããéä¿¡ã¦ã£ã³ããããã¡ããã«ã®ã¨ãã¯å¼·å¶çã«éä¿¡ããã*/
+			if (TCP_IS_SWBUF_FULL(cep))
+				cep->flags |= TCP_CEP_FLG_FORCE | TCP_CEP_FLG_FORCE_CLEAR;
+
+			/* åºåããã¹ãããã*/
+			cep->flags |= TCP_CEP_FLG_POST_OUTPUT;
+			sig_sem(SEM_TCP_POST_OUTPUT);
+			}
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+		}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+err_ret:
+	cep->snd_tskid = TA_NULL;
+	cep->snd_tfn   = TFN_TCP_UNDEF;
+	return error;
+	}
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+#endif	/* of #ifdef __tcp_snd_oob */
+
+#ifdef __tcp_get_buf
+
+/*
+ *  tcp_get_buf -- éä¿¡ç¨ãããã¡ã®ç²å¾ãæ¨æºæ©è½ã
+ */
+
+ER_UINT
+tcp_get_buf (ID cepid, void **p_buf, TMO tmout)
+{
+	T_TCP_CEP	*cep;
+	ER_UINT		error;
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	/* p_buf ã NULL ãªãã¨ã©ã¼ */
+	if (p_buf == NULL)
+		return E_PAR;
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	/* p_buf ã NULL ããtmout ã TMO_NBLK ãªãã¨ã©ã¼ */
+	if (p_buf == NULL || tmout == TMO_NBLK)
+		return E_PAR;
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	/*
+	 *  CEP ãã­ãã¯ããAPI æ©è½ã³ã¼ãã¨ã¿ã¹ã¯è­å¥å­ãè¨é²ããã
+	 *  ãã§ã«è¨é²ããã¦ããã°ããã³ãã£ã³ã°ä¸­ãªã®ã§ã¨ã©ã¼
+	 */
+	if ((error = tcp_lock_cep(cepid, &cep, TFN_TCP_GET_BUF)) != E_OK)
+		return error;
+
+	/* éä¿¡ã§ããããéä¿¡ç«¯ç¹ã®ç¶æ
+ãè¦ãã*/
+	if ((error = tcp_can_send_more(cep, TFN_TCP_GET_BUF, tmout)) != E_OK)
+		goto err_ret;
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	/* ã¿ã¤ã ã¢ã¦ãããã§ãã¯ããã*/
+	if (tmout == TMO_NBLK) {		/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+		if (!TCP_IS_SWBUF_FULL(cep)) {
+
+			/* éä¿¡ã¦ã£ã³ããããã¡ã«ç©ºããããã°ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+			error = TCP_GET_SWBUF_ADDR(cep, p_buf);
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+			/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+			(*cep->callback)(GET_TCP_CEPID(cep), TFN_TCP_GET_BUF, (void*)error);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+			(*cep->callback)(GET_TCP_CEPID(cep), TFN_TCP_GET_BUF, (void*)&error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			error = E_WBLK;
+			goto err_ret;
+			}
+		else {
+			cep->snd_p_buf    = p_buf;
+			cep->snd_nblk_tfn = TFN_TCP_GET_BUF;
+			TCP_ALLOC_SWBUF(cep);
+			return E_WBLK;
+			}
+		}
+
+	else {		/* éãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	 	/* éä¿¡ã¦ã£ã³ããããã¡ãç©ºãã®ãå¾
+ã¤ã*/
+		if ((error = TCP_WAIT_SWBUF(cep, tmout)) != E_OK)
+			goto err_ret;
+
+	 	/* éä¿¡ã¦ã£ã³ããããã¡ã®ç©ºã¢ãã¬ã¹ãç²å¾ããã*/
+		error = TCP_GET_SWBUF_ADDR(cep, p_buf);
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+		}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+err_ret:
+	cep->snd_tskid = TA_NULL;
+	cep->snd_tfn   = TFN_TCP_UNDEF;
+	return error;
+	}
+
+#endif	/* of #ifdef __tcp_get_buf */
+
+#ifdef __tcp_snd_buf
+
+/*
+ *  tcp_snd_buf -- ãããã¡å
+ã®ãã¼ã¿ã®éä¿¡ãæ¨æºæ©è½ã
+ */
+
+ER
+tcp_snd_buf (ID cepid, int_t len)
+{
+	T_TCP_CEP	*cep;
+	ER		error;
+
+	/* éä¿¡ããé·ã len ããã§ãã¯ããã*/
+	if (len < 0)
+		return E_PAR;
+
+	/* éä¿¡ããé·ãlen ã 0 ã§ããã°ãä½ãããªãã§æ»ãã*/
+	if (len == 0)
+		return E_OK;
+
+	/*
+	 *  CEP ãã­ãã¯ããAPI æ©è½ã³ã¼ãã¨ã¿ã¹ã¯è­å¥å­ãè¨é²ããã
+	 *  ãã§ã«è¨é²ããã¦ããã°ããã³ãã£ã³ã°ä¸­ãªã®ã§ã¨ã©ã¼
+	 */
+	if ((error = tcp_lock_cep(cepid, &cep, TFN_TCP_SND_BUF)) != E_OK)
+		return error;
+
+	/* éä¿¡ããé·ã len ããã§ãã¯ããã*/
+	if (len > cep->get_buf_len) {
+		error = E_OBJ;
+		goto err_ret;
+		}
+
+	/* éä¿¡ã§ããããCEP ã® FSM ç¶æ
+ãè¦ãã*/
+	if (!TCP_FSM_CAN_SEND_MORE(cep->fsm_state)) {
+		if ((error = cep->error) == E_OK)
+			error = E_OBJ;
+		goto err_ret;
+		}
+
+	/* éä¿¡ã¦ã£ã³ããããã¡ã®ãã¼ã¿ãéä¿¡å¯è½ã«ããã*/
+	TCP_SEND_SWBUF(cep, (uint_t)len);
+
+	/* åºåããã¹ãããã*/
+	cep->flags |= TCP_CEP_FLG_POST_OUTPUT;
+	sig_sem(SEM_TCP_POST_OUTPUT);
+
+err_ret:
+	cep->snd_tskid = TA_NULL;
+	cep->snd_tfn   = TFN_TCP_UNDEF;
+	return error;
+	}
+
+#endif	/* of #ifdef __tcp_snd_buf */
+
+#ifdef __tcp_rcv_dat
+
+/*
+ *  tcp_rcv_dat -- ãã±ããã®åä¿¡ãæ¨æºæ©è½ã
+ */
+
+ER_UINT
+tcp_rcv_dat (ID cepid, void *data, int_t len, TMO tmout)
+{
+	T_TCP_CEP	*cep;
+	ER_UINT		error;
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	/* data ã NULL ããlen < 0 ãªãã¨ã©ã¼ */
+	if (data == NULL || len < 0)
+		return E_PAR;
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	/* data ã NULLãlen < 0 ããtmout ã TMO_NBLK ãªãã¨ã©ã¼ */
+	if (data == NULL || len < 0 || tmout == TMO_NBLK)
+		return E_PAR;
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	/*
+	 *  CEP ãã­ãã¯ããAPI æ©è½ã³ã¼ãã¨ã¿ã¹ã¯è­å¥å­ãè¨é²ããã
+	 *  ãã§ã«è¨é²ããã¦ããã°ããã³ãã£ã³ã°ä¸­ãªã®ã§ã¨ã©ã¼
+	 */
+	if ((error = tcp_lock_cep(cepid, &cep, TFN_TCP_RCV_DAT)) != E_OK)
+		return error;
+
+	/* åä¿¡ã§ããããéä¿¡ç«¯ç¹ã®ç¶æ
+ãè¦ãã*/
+	if (tcp_can_recv_more(&error, cep, TFN_TCP_RCV_DAT, tmout) != E_OK)
+		goto err_ret;
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	/* ã¿ã¤ã ã¢ã¦ãããã§ãã¯ããã*/
+	if (tmout == TMO_NBLK) {		/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+		/* åä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ãããã°ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+		if (cep->rwbuf_count > 0) {
+
+			/* åä¿¡ã¦ã£ã³ããããã¡ãããã¼ã¿ãåãåºãã*/
+			len = TCP_READ_RWBUF(cep, data, (uint_t)len);
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+			(*cep->callback)(GET_TCP_CEPID(cep), TFN_TCP_RCV_DAT, (void*)(uint32_t)len);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			(*cep->callback)(GET_TCP_CEPID(cep), TFN_TCP_RCV_DAT, (void*)&len);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			error = E_WBLK;
+			goto err_ret;
+			}
+		else {
+			cep->rcv_data     = data;
+			cep->rcv_len      = len;
+			cep->rcv_nblk_tfn = TFN_TCP_RCV_DAT;
+			return E_WBLK;
+			}
+		}
+	else {		/* éãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+		/* åä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ããªããã°ãå
+¥åãããã¾ã§å¾
+ã¤ã*/
+		if ((error = tcp_wait_rwbuf(cep, tmout)) != E_OK)
+			goto err_ret;
+
+		/* åä¿¡ã¦ã£ã³ããããã¡ãããã¼ã¿ãåãåºãã*/
+		error = TCP_READ_RWBUF(cep, data, (uint_t)len);
+
+		/* ç¸æã«ã¦ã£ã³ãã¦ãµã¤ãºãå¤ãã£ããã¨ãç¥ãããããåºåããã¹ãããã*/
+		cep->flags |= TCP_CEP_FLG_POST_OUTPUT;
+		sig_sem(SEM_TCP_POST_OUTPUT);
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+		}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+err_ret:
+	cep->rcv_tskid = TA_NULL;
+	cep->rcv_tfn   = TFN_TCP_UNDEF;
+	return error;
+	}
+
+#endif	/* of #ifdef __tcp_rcv_dat */
+
+#ifdef __tcp_rcv_oob
+
+#ifdef TCP_CFG_EXTENTIONS
+
+/*
+ *  tcp_rcv_oob -- ç·æ¥ãã¼ã¿ã®åä¿¡ãæ¡å¼µæ©è½ã
+ *
+ *    æ³¨æ: éä¿¡å´ãè¤æ°ãªã¯ãããã®ãã¼ã¿ãéä¿¡ãã¦ãã
+ *          ç·æ¥ãã¤ã³ã¿ãæã 1 ãªã¯ãããã®ãã¼ã¿ã®ã¿åä¿¡ããã
+ */
+
+ER_UINT
+tcp_rcv_oob (ID cepid, void *data, int_t len)
+{
+	T_TCP_CEP	*cep;
+	uint8_t		*urg;
+
+	/* TCP éä¿¡ç«¯ç¹ ID ããã§ãã¯ããã*/
+	if (!VAID_TCP_CEPID(cepid))
+		return E_ID;
+
+	/* data ã NULL ããlen < 0 ãªãã¨ã©ã¼ */
+	if (data == NULL || len < 0)
+		return E_PAR;
+
+	/* TCP éä¿¡ç«¯ç¹ãå¾ãã*/
+	cep = GET_TCP_CEP(cepid);
+
+	/* åä¿¡ã§ããããéä¿¡ç«¯ç¹ã®ç¶æ
+ãè¦ãã*/
+	/* åä¿¡ã§ããããfsm_state ãè¦ãã*/
+	if (!TCP_FSM_CAN_RECV_MORE(cep->fsm_state))
+		return E_OBJ;
+
+	/*
+	 *  ç·æ¥ãã¼ã¿å
+¥ãã®ã»ã°ã¡ã³ãã® TCP ãããã
+	 *  è¨­å®ããã¦ããªããã°ãç·æ¥ãã¼ã¿ãåä¿¡ãã¦ããªãã
+	 */
+	if (cep->urg_tcph == NULL)
+		return E_OBJ;
+
+	/* len == 0 ãªããããã¡ãªã¼ãã¼ãã­ã¼ */
+	if (len == 0)
+		return E_BOVR;
+
+	/* ç·æ¥ãã¤ã³ã¿ãæã 1 ãªã¯ãããã®ãã¼ã¿ãèª­ã¿åãã*/
+	urg = (uint8_t*)cep->urg_tcph + TCP_DATA_OFF(cep->urg_tcph->doff) + cep->urg_tcph->urp + TCP_CFG_URG_OFFSET;
+	*(uint8_t*)data = *urg;
+
+	/* èª­ã¿åã£ããã¼ã¿ããå¾ãã® SDU ãåã«è©°ããã*/
+	memcpy(urg, urg + 1, cep->urg_tcph->sum - (cep->urg_tcph->urp + TCP_CFG_URG_OFFSET) - 1);
+
+	/* tcp_rcv_oob() ãå¼åºããããã¨ç¥ãããããã«ãNULL ãè¨­å®ããã*/
+	cep->urg_tcph = NULL;
+
+	return 1;
+	}
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+#endif	/* of #ifdef __tcp_rcv_oob */
+
+#ifdef __tcp_rcv_buf
+
+/*
+ *  tcp_rcv_buf -- åä¿¡ãããã¼ã¿ã®å
+¥ã£ããããã¡ã®ç²å¾ãæ¨æºæ©è½ã
+ */
+
+ER_UINT
+tcp_rcv_buf (ID cepid, void **p_buf, TMO tmout)
+{
+	T_TCP_CEP	*cep;
+	ER_UINT		error;
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	/* p_buf ã NULL ãªãã¨ã©ã¼ */
+	if (p_buf == NULL)
+		return E_PAR;
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	/* p_buf ã NULL ããtmout ã TMO_NBLK ãªãã¨ã©ã¼ */
+	if (p_buf == NULL || tmout == TMO_NBLK)
+		return E_PAR;
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+	/*
+	 *  CEP ãã­ãã¯ããAPI æ©è½ã³ã¼ãã¨ã¿ã¹ã¯è­å¥å­ãè¨é²ããã
+	 *  ãã§ã«è¨é²ããã¦ããã°ããã³ãã£ã³ã°ä¸­ãªã®ã§ã¨ã©ã¼
+	 */
+	if ((error = tcp_lock_cep(cepid, &cep, TFN_TCP_RCV_BUF)) != E_OK)
+		return error;
+
+	/* åä¿¡ã§ããããéä¿¡ç«¯ç¹ã®ç¶æ
+ãè¦ãã*/
+	if (tcp_can_recv_more(&error, cep, TFN_TCP_RCV_DAT, tmout) != E_OK)
+		goto err_ret;
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	/* ã¿ã¤ã ã¢ã¦ãããã§ãã¯ããã*/
+	if (tmout == TMO_NBLK) {		/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+		/* åä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ãããã°ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+		if (cep->rwbuf_count > 0) {
+
+		 	/* åä¿¡ã¦ã£ã³ããããã¡ã®ç©ºã¢ãã¬ã¹ãç²å¾ããã*/
+			error = TCP_GET_RWBUF_ADDR(cep, p_buf);
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+			/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+			(*cep->callback)(GET_TCP_CEPID(cep), TFN_TCP_RCV_BUF, (void*)error);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+			(*cep->callback)(GET_TCP_CEPID(cep), TFN_TCP_RCV_BUF, (void*)&error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			error = E_WBLK;
+			goto err_ret;
+			}
+		else {
+			cep->rcv_p_buf    = p_buf;
+			cep->rcv_nblk_tfn = TFN_TCP_RCV_BUF;
+			return E_WBLK;
+			}
+		}
+	else {		/* éãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+		/* åä¿¡ã¦ã£ã³ããããã¡ã«ãã¼ã¿ããªããã°ãå
+¥åãããã¾ã§å¾
+ã¤ã*/
+		if ((error = tcp_wait_rwbuf(cep, tmout)) != E_OK) {
+			cep->rwbuf_count = 0;
+			goto err_ret;
+			}
+
+	 	/* åä¿¡ã¦ã£ã³ããããã¡ã®ã¢ãã¬ã¹ãç²å¾ããã*/
+		error = TCP_GET_RWBUF_ADDR(cep, p_buf);
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+		}
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+err_ret:
+	cep->rcv_tskid = TA_NULL;
+	cep->rcv_tfn   = TFN_TCP_UNDEF;
+	return error;
+	}
+
+#endif	/* of #ifdef __tcp_rcv_buf */
+
+#ifdef __tcp_rel_buf
+
+/*
+ *  tcp_rel_buf -- åä¿¡ç¨ãããã¡ã®è§£æ¾ãæ¨æºæ©è½ã
+ */
+
+ER
+tcp_rel_buf (ID cepid, int_t len)
+{
+	T_TCP_CEP	*cep;
+	ER		error;
+
+	/* è§£æ¾ããé·ã len ããã§ãã¯ããã*/
+	if (len < 0)
+		return E_PAR;
+
+	/*
+	 *  CEP ãã­ãã¯ããAPI æ©è½ã³ã¼ãã¨ã¿ã¹ã¯è­å¥å­ãè¨é²ããã
+	 *  ãã§ã«è¨é²ããã¦ããã°ããã³ãã£ã³ã°ä¸­ãªã®ã§ã¨ã©ã¼
+	 */
+	if ((error = tcp_lock_cep(cepid, &cep, TFN_TCP_REL_BUF)) != E_OK)
+		return error;
+
+	/* è§£æ¾ããé·ã len ããã§ãã¯ããã*/
+	if (len > cep->rcv_buf_len) {
+		error = E_OBJ;
+		goto err_ret;
+		}
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	/* åä¿¡ã¦ã£ã³ããããã¡ããåä¿¡ãããªã¯ããããåé¤ããã*/
+	TCP_DROP_RWBUF(cep, (uint_t)len);
+
+	/* tcp_rcv_buf ã®å²å½ã¦é·ããªã»ããããã*/
+	cep->rcv_buf_len = 0;
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	/* ç¸æã«ã¦ã£ã³ãã¦ãµã¤ãºãå¤ãã£ããã¨ãç¥ãããããåºåããã¹ãããã*/
+	cep->flags |= TCP_CEP_FLG_POST_OUTPUT;
+	sig_sem(SEM_TCP_POST_OUTPUT);
+
+err_ret:
+	cep->rcv_tskid = TA_NULL;
+	cep->rcv_tfn   = TFN_TCP_UNDEF;
+	return error;
+	}
+
+#endif	/* of #ifdef __tcp_rel_buf */
+
+#ifdef __tcp_can_cep
+
+/*
+ *  tcp_can_snd -- ãã³ãã£ã³ã°ãã¦ããéä¿¡ã®ã­ã£ã³ã»ã«
+ */
+
+static ER
+tcp_can_snd (T_TCP_CEP *cep, FN fncd)
+{
+	ER	error = E_OK;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	/*
+	 *  snd_tskid ã TA_NULL ãªãã
+	 *  ãã³ãã£ã³ã°ãã¦ããªãã®ã§ã¨ã©ã¼
+	 */
+	if (cep->snd_tskid == TA_NULL)
+		error = EV_NOPND;
+
+	/* ãã³ãã£ã³ã°ä¸­ã® API æ©è½ã³ã¼ãã¨ä¸è´ããªããã°ã¨ã©ã¼ */
+	else if (fncd != TFN_TCP_ALL && fncd != cep->snd_tfn)
+		error = E_OBJ;
+
+	/* å¦çãã­ã£ã³ã»ã«ããã*/
+	else {
+
+		/* åä¿¡åæ§æã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã*/
+		tcp_free_reassq(cep);
+
+		/* åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã*/
+		cep->rwbuf_count = 0;
+		TCP_FREE_RWBUFQ(cep);
+
+		/* éä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã*/
+		TCP_FREE_SWBUFQ(cep);
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+		if (cep->snd_nblk_tfn != TFN_TCP_UNDEF) {	/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+			switch (cep->snd_nblk_tfn) {
+
+			case TFN_TCP_CON_CEP:
+				/*  éä¿¡ç«¯ç¹ããåä»å£ãè§£æ¾ããã*/
+				cep->rep = NULL;
+				cep->fsm_state = TCP_FSM_CLOSED;
+				syscall(set_flg(cep->est_flgid, TCP_CEP_EVT_CLOSED));
+				break;
+
+			case TFN_TCP_SND_DAT:
+			case TFN_TCP_GET_BUF:
+			case TFN_TCP_SND_OOB:
+				break;
+				}
+
+			if (IS_PTR_DEFINED(cep->callback)) {
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+				(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, (void*)E_RLWAI);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				ER	error = E_RLWAI;
+
+				(*cep->callback)(GET_TCP_CEPID(cep), cep->snd_nblk_tfn, (void*)&error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				}
+			else
+				error = E_OBJ;
+			cep->snd_nblk_tfn = TFN_TCP_UNDEF;
+			}
+		else
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+			error = rel_wai(cep->snd_tskid);
+
+		cep->snd_tskid = TA_NULL;
+		cep->snd_tfn   = TFN_TCP_UNDEF;
+		}
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	return error;
+	}
+
+/*
+ *  tcp_can_rcv -- ãã³ãã£ã³ã°ãã¦ããåä¿¡ã®ã­ã£ã³ã»ã«
+ */
+
+static ER
+tcp_can_rcv (T_TCP_CEP *cep, FN fncd)
+{
+	ER	error = E_OK;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	/*
+	 *  rcv_tskid ã TA_NULL ãªãã
+	 *  ãã³ãã£ã³ã°ãã¦ããªãã®ã§ã¨ã©ã¼
+	 */
+	if (cep->rcv_tskid == TA_NULL)
+		error = EV_NOPND;
+
+	/* ãã³ãã£ã³ã°ä¸­ã® API æ©è½ã³ã¼ãã¨ä¸è´ããªããã°ã¨ã©ã¼ */
+	else if (fncd != TFN_TCP_ALL && fncd != cep->rcv_tfn)
+		error = E_OBJ;
+
+	/* å¦çãã­ã£ã³ã»ã«ããã*/
+	else {
+
+		/* åä¿¡åæ§æã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã*/
+		tcp_free_reassq(cep);
+
+		/* åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã*/
+		cep->rwbuf_count = 0;
+		TCP_FREE_RWBUFQ(cep);
+
+		/* éä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ãããã¯ã¼ã¯ãããã¡ãè§£æ¾ããã*/
+		TCP_FREE_SWBUFQ(cep);
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+		if (cep->rcv_nblk_tfn != TFN_TCP_UNDEF) {	/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+			switch (cep->rcv_nblk_tfn) {
+
+			case TFN_TCP_ACP_CEP:
+				/*
+				 *  éä¿¡ç«¯ç¹ããåä»å£ãè§£æ¾ãã
+				 *  ã¤ãã³ããã©ã°ãã¯ã­ã¼ãºã«è¨­å®ããã
+				 */
+				cep->rep = NULL;
+				cep->fsm_state = TCP_FSM_CLOSED;
+				syscall(set_flg(cep->est_flgid, TCP_CEP_EVT_CLOSED));
+				break;
+
+			case TFN_TCP_RCV_DAT:
+			case TFN_TCP_RCV_BUF:
+				break;
+
+			case TFN_TCP_CLS_CEP:
+				cep->fsm_state = TCP_FSM_CLOSED;
+				tcp_respond(NULL, cep, cep->rcv_nxt, cep->snd_una - 1,
+				            cep->rbufsz - cep->rwbuf_count, TCP_FLG_RST);
+				syscall(set_flg(cep->est_flgid, TCP_CEP_EVT_CLOSED));
+				break;
+				}
+
+			if (IS_PTR_DEFINED(cep->callback)) {
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+				(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)E_RLWAI);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				ER	error = E_RLWAI;
+
+				(*cep->callback)(GET_TCP_CEPID(cep), cep->rcv_nblk_tfn, (void*)&error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				}
+			else
+				error = E_OBJ;
+			cep->rcv_nblk_tfn = TFN_TCP_UNDEF;
+			}
+		else
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+			error = rel_wai(cep->rcv_tskid);
+
+		cep->rcv_tskid = TA_NULL;
+		cep->rcv_tfn   = TFN_TCP_UNDEF;
+		}
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	return error;
+	}
+
+/*
+ *  tcp_can_cep -- ãã³ãã£ã³ã°ãã¦ããå¦çã®ã­ã£ã³ã»ã«ãæ¨æºæ©è½ã
+ */
+
+ER
+tcp_can_cep (ID cepid, FN fncd)
+{
+	T_TCP_CEP	*cep;
+	ER		error = E_OK, snd_err, rcv_err;
+
+	/* API æ©è½ã³ã¼ãããã§ãã¯ããã*/
+	if (!VALID_TFN_TCP_CAN(fncd))
+		return E_PAR;
+
+	/* TCP éä¿¡ç«¯ç¹ ID ããã§ãã¯ããã*/
+	if (!VAID_TCP_CEPID(cepid))
+		return E_ID;
+
+	/* TCP éä¿¡ç«¯ç¹ãå¾ãã*/
+	cep = GET_TCP_CEP(cepid);
+
+	/* TCP éä¿¡ç«¯ç¹ããã§ãã¯ããã*/
+	if (!VALID_TCP_CEP(cep))
+		return E_NOEXS;
+
+	if (fncd == TFN_TCP_ALL) {		/* TFN_TCP_ALL ã®å¦ç */
+		snd_err = tcp_can_snd(cep, fncd);
+		rcv_err = tcp_can_rcv(cep, fncd);
+
+		/*
+		 *  snd_err ã¨ rcv_err ã®ã©ã¡ãã EV_NOPND
+		 *  ãªãããã³ãã£ã³ã°ãã¦ããªãã®ã§ã¨ã©ã¼
+		 */
+		if (snd_err == EV_NOPND && rcv_err == EV_NOPND)
+			error = E_OBJ;
+		else {
+			if (snd_err == EV_NOPND)
+				snd_err = E_OK;
+			if (rcv_err == EV_NOPND)
+				rcv_err = E_OK;
+
+			if (snd_err != E_OK)
+				error = snd_err;
+			else if (rcv_err != E_OK)
+				error = rcv_err;
+			}
+		}
+
+	else if (IS_TFN_TCP_RCV(fncd)) {	/* åä¿¡å¦çã®ã­ã£ã³ã»ã« */
+		if ((error = tcp_can_rcv(cep, fncd)) == EV_NOPND)
+			error = E_OBJ;
+		}
+
+	else {					/* éä¿¡å¦çã®ã­ã£ã³ã»ã« */
+		if ((error = tcp_can_snd(cep, fncd)) == EV_NOPND)
+			error = E_OBJ;
+		}
+
+	return error;
+	}
+
+#endif	/* of #ifdef __tcp_can_cep */
+
+/*
+ *  tcp_set_opt -- TCP éä¿¡ç«¯ç¹ãªãã·ã§ã³ã®è¨­å®ãæ¡å¼µæ©è½ã
+ *
+ *  æ³¨æ: è¨­å®å¯è½ãª TCP éä¿¡ç«¯ç¹ãªãã·ã§ã³ã¯ç¡ããããE_PAR ãè¿ãããã
+ */
+
+#ifdef __tcp_set_opt
+
+#ifdef TCP_CFG_EXTENTIONS
+
+ER
+tcp_set_opt (ID cepid, int_t optname, void *optval, int_t optlen)
+{
+	T_TCP_CEP	*cep;
+
+	/* TCP éä¿¡ç«¯ç¹ ID ããã§ãã¯ããã*/
+	if (!VAID_TCP_CEPID(cepid))
+		return E_ID;
+
+	/* TCP éä¿¡ç«¯ç¹ãå¾ãã*/
+	cep = GET_TCP_CEP(cepid);
+
+	/* TCP éä¿¡ç«¯ç¹ããã§ãã¯ããã*/
+	if (!VALID_TCP_CEP(cep))
+		return E_NOEXS;
+
+	return E_PAR;
+	}
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+#endif	/* of #ifdef __tcp_set_opt */
+
+/*
+ *  tcp_get_opt -- TCP éä¿¡ç«¯ç¹ãªãã·ã§ã³ã®è¨­å®ãæ¡å¼µæ©è½ã
+ *
+ *  æ³¨æ: è¨­å®å¯è½ãª TCP éä¿¡ç«¯ç¹ãªãã·ã§ã³ã¯ç¡ããããE_PAR ãè¿ãããã
+ */
+
+#ifdef __tcp_get_opt
+
+#ifdef TCP_CFG_EXTENTIONS
+
+ER
+tcp_get_opt (ID cepid, int_t optname, void *optval, int_t optlen)
+{
+	T_TCP_CEP	*cep;
+
+	/* TCP éä¿¡ç«¯ç¹ ID ããã§ãã¯ããã*/
+	if (!VAID_TCP_CEPID(cepid))
+		return E_ID;
+
+	/* TCP éä¿¡ç«¯ç¹ãå¾ãã*/
+	cep = GET_TCP_CEP(cepid);
+
+	/* TCP éä¿¡ç«¯ç¹ããã§ãã¯ããã*/
+	if (!VALID_TCP_CEP(cep))
+		return E_NOEXS;
+
+	return E_PAR;
+	}
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+#endif	/* of #ifdef __tcp_get_opt */
+
+#endif	/* of #ifdef SUPPORT_TCP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_var.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_var.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/tcp_var.h	(revision 270)
@@ -0,0 +1,1049 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993, 1994, 1995
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)tcp_var.h	8.4 (Berkeley) 5/24/95
+ * $FreeBSD: src/sys/netinet/tcp_var.h,v 1.49.2.1 1999/08/29 16:29:57 peter Exp $
+ */
+ 
+#ifndef _TCP_VAR_H_
+#define _TCP_VAR_H_
+
+/*
+ *  TCP ãããã»ãã¤ã­ã¼ãã¢ã¯ã»ã¹ãã¯ã­
+ */
+
+#define IP_TCP_HDR_SIZE			(IP_HDR_SIZE + TCP_HDR_SIZE)
+#define IF_IP_TCP_HDR_SIZE		(IF_IP_HDR_SIZE + TCP_HDR_SIZE)
+#define IF_IP_TCP_HDR_OFFSET		(IF_IP_HDR_SIZE)
+#define IF_IP_TCP_SDU_OFFSET		(IF_IP_TCP_HDR_SIZE)
+
+#define GET_TCP_HDR(nbuf,thoff)		((T_TCP_HDR*)((uint8_t*)((nbuf)->buf) + thoff))
+#define GET_TCP_OPT(nbuf,thoff)		((uint8_t*)((nbuf)->buf) + thoff + TCP_HDR_SIZE)
+#define GET_TCP_SDU(nbuf,thoff)		((uint8_t*)((nbuf)->buf) + thoff + GET_TCP_HDR_SIZE2(nbuf,thoff))
+
+#define GET_TCP_HDR_OFFSET(nbuf)	(GET_IF_IP_HDR_SIZE(nbuf))
+
+#define GET_TCP_HDR_SIZE2(nbuf,thoff)	(TCP_HDR_LEN(GET_TCP_HDR(nbuf,thoff)->doff))
+#define GET_IP_TCP_HDR_SIZE2(nbuf,thoff) \
+					(GET_IP_HDR_SIZE(GET_IP_HDR(nbuf)) + GET_TCP_HDR_SIZE2(nbuf,thoff))
+#define GET_IF_IP_TCP_HDR_SIZE2(nbuf,thoff) \
+					(IF_HDR_SIZE + GET_IP_TCP_HDR_SIZE2(nbuf,thoff))
+
+/*
+ *  TINET 1.1 ã¨ã®äºææ§ã®ããã®å®ç¾©
+ */
+
+#if defined(SUPPORT_INET4)
+
+#define IP4_TCP_HDR_SIZE		IP_TCP_HDR_SIZE
+#define IF_IP4_TCP_HDR_SIZE		IF_IP_TCP_HDR_SIZE
+#define GET_IP4_TCP_HDR_SIZE(nbuf)	GET_IP_TCP_HDR_SIZE(nbuf)	
+#define GET_IF_IP4_TCP_HDR_SIZE(nbuf)	GET_IF_IP_TCP_HDR_SIZE(nbuf)	
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+/*
+ *  TINET 1.3 ã¨ã®äºææ§ã®ããã®å®ç¾©
+ */
+
+#define	TMIN_TCP_CREPID			TMIN_TCP_REPID
+#define	TMIN_TCP_CCEPID			TMIN_TCP_CEPID
+#define	TNUM_TCP_CREPID			TNUM_TCP_REPID
+#define	TNUM_TCP_CCEPID			TNUM_TCP_CEPID
+
+/*
+ *  ã³ã¼ã«ããã¯é¢æ°ã®å®ç¾©
+ */
+
+typedef ER	(*t_tcp_callback)(ID cepid, FN fncd, void *p_parblk);
+
+/*
+ *  TCP åä»å£
+ */
+
+/* IPv4 ç¨ TCP åä»å£ */
+typedef struct t_tcp4_rep {
+
+	/*
+	 * ITRON TCP/IP APIãTCP åä»å£ã¨åãã¡ã³ã
+	 */
+	ATR		repatr;		/* åä»å£å±æ§		*/
+	T_IPV4EP	myaddr;		/* èªåã®ã¢ãã¬ã¹	*/
+
+#ifdef TCP_CFG_EXTENTIONS
+	uint16_t	flags;		/* åä»å£ãã©ã°		*/
+	ID		semid_lock;	/* åä»å£ã­ãã¯		*/
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+	} T_TCP4_REP;
+
+/* IPv6 ç¨ TCP åä»å£ */
+typedef struct t_tcp6_rep {
+
+	/*
+	 * ITRON TCP/IP APIãTCP åä»å£ã¨åãã¡ã³ã
+	 */
+	ATR		repatr;		/* åä»å£å±æ§		*/
+	T_IPV6EP	myaddr;		/* èªåã®ã¢ãã¬ã¹	*/
+
+#ifdef TCP_CFG_EXTENTIONS
+	uint16_t	flags;		/* åä»å£ãã©ã°		*/
+	ID		semid_lock;	/* åä»å£ã­ãã¯		*/
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+	} T_TCP6_REP;
+
+#if defined(SUPPORT_INET4)
+#define T_TCP_REP	T_TCP4_REP
+#endif
+
+#if defined(SUPPORT_INET6)
+#define T_TCP_REP	T_TCP6_REP
+#endif
+
+/*
+ *  åä»å£ãã©ã°
+ */
+
+#define TCP_REP_FLG_DYNAMIC	UINT_C(0x0400)	/* åççæã»åé¤å¯è½åä»å£ã	*/
+#define TCP_REP_FLG_VALID	UINT_C(0x0800)	/* çææ¸ã¿ã§æå¹ãªåä»å£ã	*/
+
+/*
+ *  TCP éä¿¡ç«¯ç¹
+ */
+
+typedef uint32_t T_TCP_SEQ;
+typedef uint16_t T_TCP_SEG;
+typedef uint16_t T_TCP_WND;
+
+/*
+ * éå¸¸ã® IPv4 TCP éä¿¡ç«¯ç¹
+ */
+typedef struct t_tcp4_cep {
+
+	/*
+	 * ITRON TCP/IP APIãTCP éä¿¡ç«¯ç¹ã¨åãã¡ã³ã
+	 */
+	ATR		cepatr;		/* éä¿¡ç«¯ç¹å±æ§			*/
+	void		*sbuf;		/* éä¿¡ç¨ã¦ã£ã³ããããã¡	*/
+	int_t		sbufsz;		/* éä¿¡ç¨ã¦ã£ã³ããããã¡ãµã¤ãº	*/
+	void		*rbuf;		/* åä¿¡ç¨ã¦ã£ã³ããããã¡	*/
+	int_t		rbufsz;		/* åä¿¡ç¨ã¦ã£ã³ããããã¡ãµã¤ãº	*/
+	t_tcp_callback	callback;	/* ã³ã¼ã«ããã¯é¢æ°		*/
+
+	/*
+	 * TINET ç¬èªã®ã¡ã³ã
+	 */
+	uint32_t	flags;		/* éä¿¡ç«¯ç¹ãã©ã°		*/
+	ID		semid_lock;	/* éä¿¡ç«¯ç¹ã­ãã¯		*/
+	ID		est_flgid;	/* ã³ãã¯ã·ã§ã³ç¶æ
+ã¤ãã³ããã©ã°	*/
+	ID		snd_flgid;	/* éä¿¡ã¤ãã³ããã©ã°		*/
+	ID		rcv_flgid;	/* åä¿¡ã¤ãã³ããã©ã°		*/
+	ID		snd_tskid;	/* éä¿¡ã¿ã¹ã¯è­å¥å­		*/
+	ID		rcv_tskid;	/* åä¿¡ã¿ã¹ã¯è­å¥å­		*/
+	uint8_t		*sbuf_rptr;	/* éä¿¡ç¨èª­ã¿åºããã¤ã³ã¿	*/
+	uint8_t		*sbuf_wptr;	/* éä¿¡ç¨æ¸ãè¾¼ã¿ãã¤ã³ã¿	*/
+	uint8_t		*rbuf_rptr;	/* åä¿¡ç¨èª­ã¿åºããã¤ã³ã¿	*/
+	uint8_t		*rbuf_wptr;	/* åä¿¡ç¨æ¸ãè¾¼ã¿ãã¤ã³ã¿	*/
+	T_TCP_SEQ	snd_ssthresh;	/* è¼»è¼³ã¦ã£ã³ããµã¤ãº(snd_cwnd)	*/
+					/* ã®ãããå¤			*/
+	T_TCP_TIME	rxtcur;		/* ç¾å¨ã®åéã¿ã¤ã ã¢ã¦ã	*/
+	T_TCP_TIME	srtt;		/* å¹³æ»åããã RTT		*/
+	T_TCP_TIME	rttvar;		/* å¹³æ»åãããåæ£		*/
+	T_TCP_WND	snd_cwnd;	/* è¼»è¼³ã¦ã£ã³ããµã¤ãº		*/
+
+	/*
+	 *  ç¸æã®æå¤§åä¿¡ã»ã°ã¡ã³ããµã¤ãº	
+	 *
+	 *    ãªãªã¸ãã«ã§ã¯ãä¸è¬ã®ã»ã°ã¡ã³ãã®æå¤§ãµã¤ãº (t_maxseg) ã¨ã
+	 *    ãªãã·ã§ã³ä»ãã®ã»ã°ã¡ã³ãã®æå¤§ãµã¤ãº (t_maxopd) ãå¥ã«
+	 *    ãªã£ã¦ãããããã¯ãç¾å¨ã®ã¤ã³ã¿ã¼ãããã§ã¯ããªãã·ã§ã³ä»ãã®
+	 *    ã»ã°ã¡ã³ãã®ã»ããå¤ãããã¨èª¬æããã¦ããããã§ããã
+	 *    æ¬å®è£
+ã§ã¯ãæå¤§ã»ã°ã¡ã³ããµã¤ãºãªãã·ã§ã³ä»¥å¤ã®ãªãã·ã§ã³ã¯
+	 *    å®è£
+ããªãã®ã§ãt_maxseg ã®ä½¿ç¨ããã
+	 */
+	T_TCP_SEG	maxseg;
+
+	int16_t		snd_tfn;	/* éä¿¡åä½ä¸­ã® API æ©è½ã³ã¼ã	*/
+	int16_t		rcv_tfn;	/* åä¿¡åä½ä¸­ã® API æ©è½ã³ã¼ã	*/
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	T_IPV4EP 	*p_dstaddr;	/* ç¸æã®ã¢ãã¬ã¹ã¸ã®ãã¤ã³ã¿	*/
+	T_IPV4EP 	*p_myaddr;	/* èªåã®ã¢ãã¬ã¹ã¸ã®ãã¤ã³ã¿	*/
+	int16_t		snd_nblk_tfn;	/* éä¿¡åä½ä¸­ã® API æ©è½ã³ã¼ã	*/
+	int16_t		rcv_nblk_tfn;	/* åä¿¡åä½ä¸­ã® API æ©è½ã³ã¼ã	*/
+	void		*snd_data;	/* éä¿¡ãã¼ã¿é åã®å
+é ­ã¢ãã¬ã¹	*/
+	int_t		snd_len;	/* éä¿¡ãã¼ã¿é åã®é·ã		*/
+	void		*rcv_data;	/* åä¿¡ãã¼ã¿é åã®å
+é ­ã¢ãã¬ã¹	*/
+	int_t		rcv_len;	/* åä¿¡ãã¼ã¿é åã®é·ã		*/
+	void		**snd_p_buf;	/* éä¿¡ãããã¡ã¸ã®ãã¤ã³ã¿	*/
+	void		**rcv_p_buf;	/* åä¿¡ãããã¡ã¸ã®ãã¤ã³ã¿	*/
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+	T_NET_BUF	*swbufq;	/* éä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼	*/
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+	/*
+	 *  ããä»¥éã®ã¡ã³ãã¼ã¯ tcp_init_cep() é¢æ°ã§ã¼ã­ã¯ãªã¢ã¼ãããã
+	 */
+
+	T_TCP_TIME	timer[NUM_TCP_TIMERS];	/* TCP ã®ã¿ã¤ã		*/
+	T_IPV4EP	dstaddr;	/* ç¸æã®ã¢ãã¬ã¹		*/
+	T_IPV4EP	myaddr;		/* èªåã®ã¢ãã¬ã¹		*/
+	T_TCP4_REP	*rep;		/* åä»å£			*/
+	T_NET_BUF	*reassq;	/* åä¿¡åæ§æã­ã¥ã¼		*/
+
+#ifdef TCP_CFG_RWBUF_CSAVE
+	T_NET_BUF	*rwbufq;	/* åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼	*/
+#endif	/* of #ifdef TCP_CFG_RWBUF_CSAVE */
+
+#ifdef TCP_CFG_EXTENTIONS
+	T_TCP_HDR	*urg_tcph;	/* ç·æ¥ãã¼ã¿å
+¥ãã®ã»ã°ã¡ã³ãã® TCP ããã	*/
+	T_TCP_SEQ	snd_up;		/* éä¿¡ããç·æ¥ãã¤ã³ã¿		*/
+	T_TCP_SEQ	rcv_up;		/* åä¿¡ããç·æ¥ãã¤ã³ã¿		*/
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+	T_TCP_SEQ	snd_una;	/* æªç¢ºèªã®æå°éä¿¡ SEQ ã¤ã¾ã	*/
+					/* ç¢ºèªãããæå¤§éä¿¡ SEQ	*/
+	T_TCP_SEQ	snd_max;	/* éä¿¡ããæå¤§ SEQ		*/
+	T_TCP_SEQ	snd_nxt;	/* æ¬¡ã«éä¿¡ãã SEQ		*/
+	T_TCP_SEQ	snd_old_nxt;	/* å
+ã® snd_nxt			*/
+	T_TCP_SEQ	snd_wl1;	/* ååã¦ã£ã³ããæ´æ°ãã SEQ	*/
+	T_TCP_SEQ	snd_wl2;	/* ååã¦ã£ã³ããæ´æ°ãã ACK	*/
+	T_TCP_SEQ	iss;		/* èªåã® SEQ ã®åæå¤		*/
+	T_TCP_SEQ	irs;		/* ç¸æã® SEQ ã®åæå¤		*/
+	T_TCP_SEQ	rcv_nxt;	/* åä¿¡ãæå¾
+ãã¦ããæå°ã® SEQ	*/
+	T_TCP_SEQ	rcv_adv;	/* åä¿¡ãæå¾
+ãã¦ããæå¤§ã® SEQ	*/
+	T_TCP_SEQ	rcv_wnd;	/* åä¿¡å¯è½ãªã¦ã£ã³ããµã¤ãº	*/
+	T_TCP_SEQ	rtseq;		/* æéè¨æ¸¬ãå§ãã SEQ		*/
+	T_TCP_SEQ	last_ack_sent;	/* æå¾ã«éä¿¡ãã ACK		*/
+	T_TCP_TIME	idle;		/* ã¢ã¤ãã«æé			*/
+	ER		error;		/* éåæã«çºçããã¨ã©ã¼	*/
+	ER		net_error;	/* ãããã¯ã¼ã¯ã®ã¨ã©ã¼ç¶æ
+	*/
+	T_TCP_WND	snd_wnd;	/* ç¸æã®åä¿¡å¯è½ã¦ã£ã³ããµã¤ãº	*/
+	T_TCP_WND	max_sndwnd;	/* ä»ã¾ã§ã®æå¤§éä¿¡ã¦ã£ã³ããµã¤ãº	*/
+	T_TCP_TIME	rtt;		/* å¾å¾©æé				*/
+	uint16_t	swbuf_count;	/* éä¿¡ã¦ã£ã³ããããã¡ã®ä½¿ç¨ä¸­ãµã¤ãº	*/
+	uint16_t	rwbuf_count;	/* åä¿¡ã¦ã£ã³ããããã¡ã®ä½¿ç¨ä¸­ãµã¤ãº	*/
+	uint16_t	rcv_buf_len;	/* tcp_rcv_buf ã®å²å½ã¦é·	*/
+	uint16_t	get_buf_len;	/* tcp_rcv_buf ã®å²å½ã¦é·	*/
+	uint8_t		rxtshift;	/* åéä¿¡åæ°ã® log(2)		*/
+	uint8_t		fsm_state;	/* FSM ç¶æ
+			*/
+	uint8_t		dupacks;	/* åé ACK æ°			*/
+
+#if defined(TCP_CFG_RWBUF_CSAVE) && defined(TCP_CFG_RWBUF_CSAVE_MAX_QUEUES)
+	uint8_t		rwbufq_entries;	/* åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ã¨ã³ããªæ°	*/
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) && defined(TCP_CFG_RWBUF_CSAVE_MAX_QUEUES)	*/
+
+	} T_TCP4_CEP;
+
+/*
+ * Time Wait ç¨ IPv4 TCP éä¿¡ç«¯ç¹
+ */
+typedef struct t_tcp4_twcep {
+	int_t		rbufsz;		/* åä¿¡ç¨ã¦ã£ã³ããããã¡ãµã¤ãº	*/
+	T_TCP_TIME	timer_2msl;	/* 2MSL ã¿ã¤ã			*/
+	T_IPV4EP	dstaddr;	/* ç¸æã®ã¢ãã¬ã¹		*/
+	T_IPV4EP	myaddr;		/* èªåã®ã¢ãã¬ã¹		*/
+	T_TCP_SEQ	snd_una;	/* æªç¢ºèªã®æå°éä¿¡ SEQ ã¤ã¾ã	*/
+					/* ç¢ºèªãããæå¤§éä¿¡ SEQ	*/
+	T_TCP_SEQ	rcv_nxt;	/* åä¿¡ãæå¾
+ãã¦ããæå°ã® SEQ	*/
+	uint16_t	rwbuf_count;	/* åä¿¡ã¦ã£ã³ããããã¡ã®ä½¿ç¨ä¸­ãµã¤ãº	*/
+	uint8_t		fsm_state;	/* FSM ç¶æ
+			*/
+
+	} T_TCP4_TWCEP;
+
+/*
+ * éå¸¸ã® IPv6 TCP éä¿¡ç«¯ç¹
+ */
+typedef struct t_tcp6_cep {
+
+	/*
+	 * ITRON TCP/IP APIãTCP éä¿¡ç«¯ç¹ã¨åãã¡ã³ã
+	 */
+	ATR		cepatr;		/* éä¿¡ç«¯ç¹å±æ§			*/
+	void		*sbuf;		/* éä¿¡ç¨ã¦ã£ã³ããããã¡	*/
+	int_t		sbufsz;		/* éä¿¡ç¨ã¦ã£ã³ããããã¡ãµã¤ãº	*/
+	void		*rbuf;		/* åä¿¡ç¨ã¦ã£ã³ããããã¡	*/
+	int_t		rbufsz;		/* åä¿¡ç¨ã¦ã£ã³ããããã¡ãµã¤ãº	*/
+	t_tcp_callback	callback;	/* ã³ã¼ã«ããã¯é¢æ°		*/
+
+	/*
+	 * TINET ç¬èªã®ã¡ã³ã
+	 */
+	uint32_t	flags;		/* éä¿¡ç«¯ç¹ãã©ã°		*/
+	ID		semid_lock;	/* éä¿¡ç«¯ç¹ã­ãã¯		*/
+	ID		est_flgid;	/* ã³ãã¯ã·ã§ã³ç¶æ
+ã¤ãã³ããã©ã°	*/
+	ID		snd_flgid;	/* éä¿¡ã¤ãã³ããã©ã°		*/
+	ID		rcv_flgid;	/* åä¿¡ã¤ãã³ããã©ã°		*/
+	ID		snd_tskid;	/* éä¿¡ã¿ã¹ã¯è­å¥å­		*/
+	ID		rcv_tskid;	/* åä¿¡ã¿ã¹ã¯è­å¥å­		*/
+	uint8_t		*sbuf_rptr;	/* éä¿¡ç¨èª­ã¿åºããã¤ã³ã¿		*/
+	uint8_t		*sbuf_wptr;	/* éä¿¡ç¨æ¸ãè¾¼ã¿ãã¤ã³ã¿		*/
+	uint8_t		*rbuf_rptr;	/* åä¿¡ç¨èª­ã¿åºããã¤ã³ã¿		*/
+	uint8_t		*rbuf_wptr;	/* åä¿¡ç¨æ¸ãè¾¼ã¿ãã¤ã³ã¿		*/
+	T_TCP_SEQ	snd_ssthresh;	/* è¼»è¼³ã¦ã£ã³ããµã¤ãº(snd_cwnd)	*/
+					/* ã®ãããå¤			*/
+	T_TCP_TIME	rxtcur;		/* ç¾å¨ã®åéã¿ã¤ã ã¢ã¦ã		*/
+	T_TCP_TIME	srtt;		/* å¹³æ»åããã RTT		*/
+	T_TCP_TIME	rttvar;		/* å¹³æ»åãããåæ£		*/
+	T_TCP_WND	snd_cwnd;	/* è¼»è¼³ã¦ã£ã³ããµã¤ãº		*/
+
+	/*
+	 *  ç¸æã®æå¤§åä¿¡ã»ã°ã¡ã³ããµã¤ãº	
+	 *
+	 *    ãªãªã¸ãã«ã§ã¯ãä¸è¬ã®ã»ã°ã¡ã³ãã®æå¤§ãµã¤ãº (t_maxseg) ã¨ã
+	 *    ãªãã·ã§ã³ä»ãã®ã»ã°ã¡ã³ãã®æå¤§ãµã¤ãº (t_maxopd) ãå¥ã«
+	 *    ãªã£ã¦ãããããã¯ãç¾å¨ã®ã¤ã³ã¿ã¼ãããã§ã¯ããªãã·ã§ã³ä»ãã®
+	 *    ã»ã°ã¡ã³ãã®ã»ããå¤ãããã¨èª¬æããã¦ããããã§ããã
+	 *    æ¬å®è£
+ã§ã¯ãæå¤§ã»ã°ã¡ã³ããµã¤ãºãªãã·ã§ã³ä»¥å¤ã®ãªãã·ã§ã³ã¯
+	 *    å®è£
+ããªãã®ã§ãt_maxseg ã®ä½¿ç¨ããã
+	 */
+	T_TCP_SEG	maxseg;
+
+	T_IPV6EP 	*p_dstaddr;	/* ç¸æã®ã¢ãã¬ã¹ã¸ã®ãã¤ã³ã¿	*/
+	T_IPV6EP 	*p_myaddr;	/* èªåã®ã¢ãã¬ã¹ã¸ã®ãã¤ã³ã¿	*/
+	int16_t		snd_tfn;	/* éä¿¡åä½ä¸­ã® API æ©è½ã³ã¼ã	*/
+	int16_t		rcv_tfn;	/* åä¿¡åä½ä¸­ã® API æ©è½ã³ã¼ã	*/
+
+#ifdef TCP_CFG_NON_BLOCKING
+
+	int16_t		snd_nblk_tfn;	/* éä¿¡åä½ä¸­ã® API æ©è½ã³ã¼ã	*/
+	int16_t		rcv_nblk_tfn;	/* åä¿¡åä½ä¸­ã® API æ©è½ã³ã¼ã	*/
+	void		*snd_data;	/* éä¿¡ãã¼ã¿é åã®å
+é ­ã¢ãã¬ã¹	*/
+	int_t		snd_len;	/* éä¿¡ãã¼ã¿é åã®é·ã		*/
+	void		*rcv_data;	/* åä¿¡ãã¼ã¿é åã®å
+é ­ã¢ãã¬ã¹	*/
+	int_t		rcv_len;	/* åä¿¡ãã¼ã¿é åã®é·ã		*/
+	void		**snd_p_buf;	/* éä¿¡ãããã¡ã¸ã®ãã¤ã³ã¿	*/
+	void		**rcv_p_buf;	/* åä¿¡ãããã¡ã¸ã®ãã¤ã³ã¿	*/
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING */
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+	T_NET_BUF	*swbufq;	/* éä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼	*/
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+	/*
+	 *  ããä»¥éã®ã¡ã³ãã¼ã¯ tcp_init_cep() é¢æ°ã§ã¼ã­ã¯ãªã¢ã¼ãããã
+	 */
+
+	T_TCP_TIME	timer[NUM_TCP_TIMERS];	/* TCP ã®ã¿ã¤ã		*/
+	T_IPV6EP	dstaddr;	/* ç¸æã®ã¢ãã¬ã¹		*/
+	T_IPV6EP	myaddr;		/* èªåã®ã¢ãã¬ã¹		*/
+	T_TCP6_REP	*rep;		/* åä»å£			*/
+	T_NET_BUF	*reassq;	/* åä¿¡åæ§æã­ã¥ã¼		*/
+
+#ifdef TCP_CFG_RWBUF_CSAVE
+	T_NET_BUF	*rwbufq;	/* åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼	*/
+#endif	/* of #ifdef TCP_CFG_RWBUF_CSAVE */
+
+#ifdef TCP_CFG_EXTENTIONS
+	T_TCP_HDR	*urg_tcph;	/* ç·æ¥ãã¼ã¿å
+¥ãã®ã»ã°ã¡ã³ãã® TCP ããã	*/
+	T_TCP_SEQ	snd_up;		/* éä¿¡ããç·æ¥ãã¤ã³ã¿		*/
+	T_TCP_SEQ	rcv_up;		/* åä¿¡ããç·æ¥ãã¤ã³ã¿		*/
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+	T_TCP_SEQ	snd_una;	/* æªç¢ºèªã®æå°éä¿¡ SEQ ã¤ã¾ã	*/
+					/* ç¢ºèªãããæå¤§éä¿¡ SEQ	*/
+	T_TCP_SEQ	snd_max;	/* éä¿¡ããæå¤§ SEQ		*/
+	T_TCP_SEQ	snd_nxt;	/* æ¬¡ã«éä¿¡ãã SEQ		*/
+	T_TCP_SEQ	snd_old_nxt;	/* å
+ã® snd_nxt			*/
+	T_TCP_SEQ	snd_wl1;	/* ååã¦ã£ã³ããæ´æ°ãã SEQ	*/
+	T_TCP_SEQ	snd_wl2;	/* ååã¦ã£ã³ããæ´æ°ãã ACK	*/
+	T_TCP_SEQ	iss;		/* èªåã® SEQ ã®åæå¤		*/
+	T_TCP_SEQ	irs;		/* ç¸æã® SEQ ã®åæå¤		*/
+	T_TCP_SEQ	rcv_nxt;	/* åä¿¡ãæå¾
+ãã¦ããæå°ã® SEQ	*/
+	T_TCP_SEQ	rcv_adv;	/* åä¿¡ãæå¾
+ãã¦ããæå¤§ã® SEQ	*/
+	T_TCP_SEQ	rcv_wnd;	/* åä¿¡å¯è½ãªã¦ã£ã³ããµã¤ãº	*/
+	T_TCP_SEQ	rtseq;		/* æéè¨æ¸¬ãå§ãã SEQ		*/
+	T_TCP_SEQ	last_ack_sent;	/* æå¾ã«éä¿¡ãã ACK		*/
+	T_TCP_TIME	idle;		/* ã¢ã¤ãã«æé			*/
+	ER		error;		/* éåæã«çºçããã¨ã©ã¼		*/
+	ER		net_error;	/* ãããã¯ã¼ã¯ã®ã¨ã©ã¼ç¶æ
+	*/
+	T_TCP_WND	snd_wnd;	/* ç¸æã®åä¿¡å¯è½ã¦ã£ã³ããµã¤ãº	*/
+	T_TCP_WND	max_sndwnd;	/* ä»ã¾ã§ã®æå¤§éä¿¡ã¦ã£ã³ããµã¤ãº	*/
+	T_TCP_TIME	rtt;		/* å¾å¾©æé			*/
+	uint16_t	swbuf_count;	/* éä¿¡ã¦ã£ã³ããããã¡ã®ä½¿ç¨ä¸­ãµã¤ãº	*/
+	uint16_t	rwbuf_count;	/* åä¿¡ã¦ã£ã³ããããã¡ã®ä½¿ç¨ä¸­ãµã¤ãº	*/
+	uint16_t	rcv_buf_len;	/* tcp_rcv_buf ã®å²å½ã¦é·	*/
+	uint16_t	get_buf_len;	/* tcp_rcv_buf ã®å²å½ã¦é·	*/
+	uint8_t		rxtshift;	/* åéä¿¡åæ°ã® log(2)		*/
+	uint8_t		fsm_state;	/* FSM ç¶æ
+			*/
+	uint8_t		dupacks;	/* åé ACK æ°			*/
+
+#if defined(TCP_CFG_RWBUF_CSAVE) && defined(TCP_CFG_RWBUF_CSAVE_MAX_QUEUES)
+	uint8_t		rwbufq_entries;	/* åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®ã¨ã³ããªæ°	*/
+#endif	/* of #if defined(TCP_CFG_RWBUF_CSAVE) && defined(TCP_CFG_RWBUF_CSAVE_MAX_QUEUES)	*/
+
+	} T_TCP6_CEP;
+
+/*
+ * Time Wait ç¨ IPv6 TCP éä¿¡ç«¯ç¹
+ */
+typedef struct t_tcp6_twcep {
+	int_t		rbufsz;		/* åä¿¡ç¨ã¦ã£ã³ããããã¡ãµã¤ãº	*/
+	T_TCP_TIME	timer_2msl;	/* 2MSL ã¿ã¤ã			*/
+	T_IPV6EP	dstaddr;	/* ç¸æã®ã¢ãã¬ã¹		*/
+	T_IPV6EP	myaddr;		/* èªåã®ã¢ãã¬ã¹		*/
+	T_TCP_SEQ	snd_una;	/* æªç¢ºèªã®æå°éä¿¡ SEQ ã¤ã¾ã	*/
+					/* ç¢ºèªãããæå¤§éä¿¡ SEQ	*/
+	T_TCP_SEQ	iss;		/* èªåã® SEQ ã®åæå¤		*/
+	T_TCP_SEQ	irs;		/* ç¸æã® SEQ ã®åæå¤		*/
+	T_TCP_SEQ	rcv_nxt;	/* åä¿¡ãæå¾
+ãã¦ããæå°ã® SEQ	*/
+	T_TCP_WND	snd_wnd;	/* ç¸æã®åä¿¡å¯è½ã¦ã£ã³ããµã¤ãº	*/
+	uint16_t	rwbuf_count;	/* åä¿¡ã¦ã£ã³ããããã¡ã®ä½¿ç¨ä¸­ãµã¤ãº	*/
+	uint8_t		fsm_state;	/* FSM ç¶æ
+			*/
+
+	} T_TCP6_TWCEP;
+
+#if defined(SUPPORT_INET4)
+#define T_TCP_CEP	T_TCP4_CEP
+#define T_TCP_TWCEP	T_TCP4_TWCEP
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+#define T_TCP_CEP	T_TCP6_CEP
+#define T_TCP_TWCEP	T_TCP6_TWCEP
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+#define T_TCP_CEP_DEFINED
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®ç¶æ
+ãã©ã°
+ */
+
+#define TCP_CEP_FLG_ACK_NOW		ULONG_C(0x00000001)	/* ç´ã¡ã«ç¸æã« ACK ãéãã	*/
+#define TCP_CEP_FLG_DEL_ACK		ULONG_C(0x00000002)	/* ACK ãé
+å»¶ããã		*/
+#define TCP_CEP_FLG_SENT_FIN		ULONG_C(0x00000004)	/* FIN ãéã£ã¦ããã		*/
+#define TCP_CEP_FLG_NEED_SYN		ULONG_C(0x00000008)	/* SYN ãéä¿¡ããã		*/
+#define TCP_CEP_FLG_NEED_FIN		ULONG_C(0x00000010)	/* FIN ãéä¿¡ããã		*/
+#define TCP_CEP_FLG_FORCE		ULONG_C(0x00000020)	/* å¼·å¶éä¿¡ã			*/
+#define TCP_CEP_FLG_NO_PUSH		ULONG_C(0x00000040)	/* push ããªãã		*/
+#define TCP_CEP_FLG_NO_DELAY		ULONG_C(0x00000080)	/* é
+å»¶ããªãã			*/
+#define TCP_CEP_FLG_FORCE_CLEAR		ULONG_C(0x00000100)	/* å¼·å¶éä¿¡ããå¾ãã©ã°ãã¯ãªã¢ã¼ããã*/
+#define TCP_CEP_FLG_POST_OUTPUT		ULONG_C(0x00000200)	/* éä¿¡ãéå§ããã		*/
+#define TCP_CEP_FLG_RESERVE_OUTPUT	ULONG_C(0x00000400)	/* éä¿¡ãäºç´ããã		*/
+#define TCP_CEP_FLG_DYNAMIC		ULONG_C(0x00001000)	/* åççæã»åé¤å¯è½éä¿¡ç«¯ç¹ã	*/
+#define TCP_CEP_FLG_VALID		ULONG_C(0x00002000)	/* çææ¸ã¿ã§æå¹ãªéä¿¡ç«¯ç¹ã	*/
+#define TCP_CEP_FLG_CLOSE_AFTER_OUTPUT	ULONG_C(0x00004000)	/* éä¿¡ããå¾ã³ãã¯ã·ã§ã³ãéããã*/
+#define TCP_CEP_FLG_RESTORE_NEXT_OUTPUT	ULONG_C(0x00008000)	/* éä¿¡ããå¾ãsnd_nxt ãå
+ã«æ»ãã*/
+
+/* éåä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ */
+#define TCP_CEP_FLG_WBCS_NBUF_REQ	ULONG_C(0x00080000)	/* ãããã¯ã¼ã¯ãããã¡å²å½ã¦è¦æ±	*/
+#define TCP_CEP_FLG_WBCS_MASK		ULONG_C(0x00070000)	/* ãã¹ã¯			*/
+#define TCP_CEP_FLG_WBCS_FREE		ULONG_C(0x00000000)	/* éä¿¡ã¦ã£ã³ããããã¡æªä½¿ç¨	*/
+#define TCP_CEP_FLG_WBCS_WOPEN_PEND	ULONG_C(0x00010000)	/* ç¸æã®åä¿¡ã¦ã£ã³ãã®éãå¾
+ã¡	*/
+#define TCP_CEP_FLG_WBCS_NBUF_PEND	ULONG_C(0x00020000)	/* ãããã¯ã¼ã¯ãããã¡äºç´å¾
+ã¡	*/
+#define TCP_CEP_FLG_WBCS_NBUF_RSVD	ULONG_C(0x00030000)	/* ãããã¯ã¼ã¯ãããã¡äºç´æ¸ã¿	*/
+#define TCP_CEP_FLG_WBCS_NBUF_READY	ULONG_C(0x00040000)	/* ãããã¯ã¼ã¯ãããã¡å²å½ã¦æ¸ã¿	*/
+#define TCP_CEP_FLG_WBCS_SEND_READY	ULONG_C(0x00050000)	/* éä¿¡å¯è½			*/
+#define TCP_CEP_FLG_WBCS_SENT		ULONG_C(0x00060000)	/* éä¿¡æ¸ã¿ã§ãACKå¾
+ã¡		*/
+#define TCP_CEP_FLG_WBCS_ACKED		ULONG_C(0x00070000)	/* éä¿¡æ¸ã¿ã§ãACKå®äº		*/
+
+/*
+ *  éä¿¡ç«¯ç¹ã¤ãã³ããã©ã°
+ */
+
+#define TCP_CEP_EVT_ESTABLISHED		ULONG_C(0x00000001)	/* ã³ãã¯ã·ã§ã³ç¢ºç«		*/
+#define TCP_CEP_EVT_CLOSED		ULONG_C(0x00000002)	/* æªä½¿ç¨ç¶æ
+			*/
+#define TCP_CEP_EVT_SWBUF_READY		ULONG_C(0x00000004)	/* éä¿¡ã¦ã£ã³ããããã¡ç©ºã	*/
+#define TCP_CEP_EVT_RWBUF_READY		ULONG_C(0x00000008)	/* éä¿¡ã¦ã£ã³ããããã¡ãã¼ã¿ãã	*/
+#define TCP_CEP_EVT_ALL			ULONG_C(0xffffffff)	/* å
+¨ã¤ãã³ã			*/
+
+/*
+ *  è¿½å  API æ©è½ã»äºè±¡ã³ã¼ã
+ */
+
+/* TCP é¢ä¿ */
+
+#define TFN_TCP_UNDEF		(0)
+
+/*
+ *  srtt:   å¹³æ»åããã RTT
+ *  rttvar: å¹³æ»åãããåæ£
+ *  rtt:    æ¸¬å®ãããå¾å¾©æé
+ *
+ *  å¹³æ»åããã RTT (srtt) ã¨å¹³æ»åãããåæ£ (rttvar) ã
+ *  æ´æ°åã§è¨ç®ããããã«ãå·¦ã·ãããã¦ã¹ã±ã¼ã«ããã
+ *  srtt ã¯ 2 é²å°æ°ç¹ä»¥ä¸ 3 ãããã
+ *  rttvar ã¯ 2 é²å°æ°ç¹ä»¥ä¸ 2 ããããä¿æããã
+ */
+
+#define TCP_DELTA_SHIFT		2
+			/* å·®å = rtt/8 + srtt*7/8 ã®è¨ç®ã®ããã®ã·ããå¤	*/
+#define TCP_SRTT_SHIFT		(TCP_DELTA_SHIFT + 3)
+					/* srtt ã®ã·ããå¤ã3(+2)ããã	*/
+#define TCP_RTTVAR_SHIFT	(TCP_DELTA_SHIFT + 2)
+					/* rttvar ã®ã·ããå¤ã2(+2)ããã	*/
+#define TCP_SRTT_SCALE		(1<<TCP_SRTT_SHIFT)
+#define TCP_RTTVAR_SCALE	(1<<TCP_RTTVAR_SHIFT)
+
+/*
+ *  é«éåè»¢éãéå§ããåé ACK æ°ã®ãããå¤
+ */
+
+#define MAX_TCP_REXMT_THRESH	3
+
+/*
+ *  åä¿¡åæ§æã­ã¥ã¼ã§ã® TCP ããã
+ */
+
+typedef struct t_tcp_q_hdr {
+	uint16_t	sport;		/* éä¿¡å
+ãã¼ãçªå·			*/
+	uint16_t	dport;		/* å®å
+ãã¼ãçªå·			*/
+
+	uint32_t	seq;		/* SEQ çªå·				*/
+
+	T_NET_BUF 	*next;		/* æ¬¡ã®ã»ã°ã¡ã³ããå
+ã¯ ACK çªå·(ack)	*/
+
+	uint8_t		doff;		/* ãã¼ã¿ãªãã»ãã(ä¸ä½4ããã)	*/
+	uint8_t		flags;		/* ãã©ã°(ä¸ä½6ããã)			*/
+	uint16_t	soff;		/* SDU ãªãã»ãããå
+ã¯ã¦ã£ã³ããµã¤ãº(win)	*/
+
+	uint16_t	slen;		/* SDU é·ãå
+ã¯ãã§ãã¯ãµã (sum)	*/
+	uint16_t	urp;		/* ç·æ¥ãã¤ã³ã¿ï¼SDU é·è£æ­£ï¼		*/
+	} __attribute__((packed, aligned(2)))T_TCP_Q_HDR;
+
+#define GET_TCP_Q_HDR(nbuf,thoff)	((T_TCP_Q_HDR*)((uint8_t*)((nbuf)->buf) + thoff))
+#define GET_TCP_IP_Q_HDR(nbuf)		((T_TCP_IP_Q_HDR*)GET_IP_HDR(nbuf))
+
+/*
+ *  ãªãã¸ã§ã¯ã ID ã®æå°å¤ã®å®ç¾©
+ */
+
+#define	TMIN_TCP_REPID		1	/* TCP åä»å£   ID ã®æå°å¤			*/
+#define	TMIN_TCP_CEPID		1	/* TCP éä¿¡ç«¯ç¹ ID ã®æå°å¤			*/
+#define	TMIN_TCP_TWCEPID	1	/* Time Wait ç¨ TCP éä¿¡ç«¯ç¹ ID ã®æå°å¤	*/
+
+/*
+ *  å¶å¾¡ã»ã°ã¡ã³ãï¼ãã¼ã¿ãªãï¼ãµã¤ãºã®ãããã¯ã¼ã¯ãããã¡
+ */
+
+typedef struct t_net_buf_cseg {
+	uint16_t	len;	/* ãã¼ã¿ã®é·ã		*/
+	uint8_t		idix;	/* mpfid ã®ã¤ã³ããã¯ã¹	*/
+	uint8_t		flags;	/* ãã©ã°		*/
+#ifdef IF_ETHER_NIC_NET_BUF_ALIGN
+	uint8_t		nalign[IF_ETHER_NIC_NET_BUF_ALIGN];
+#endif
+#if CPU_NET_ALIGN == 4 && IF_HDR_ALIGN != 4
+	uint8_t		halign[4 - IF_HDR_ALIGN];
+#endif
+	uint8_t		buf[IF_HDR_SIZE + IP_HDR_SIZE + TCP_HDR_SIZE];
+				/* ãããã¡æ¬ä½		*/
+	} T_NET_BUF_CSEG;
+
+#ifdef SUPPORT_MIB
+
+/*
+ *  SNMP ã® ç®¡çæ
+å ±ãã¼ã¹ (MIB)
+ */
+
+typedef struct t_tcp_stats {
+	uint32_t	tcpActiveOpens;
+	uint32_t	tcpPassiveOpens;
+	uint32_t	tcpAttemptFails;
+	uint32_t	tcpEstabResets;
+/*	uint32_t	tcpCurrEstab;*/
+	uint32_t	tcpInSegs;
+	uint32_t	tcpOutSegs;
+	uint32_t	tcpRetransSegs;
+	uint32_t	tcpInErrs;
+	uint32_t	tcpOutRsts;
+} T_TCP_STATS;
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+/*
+ *  é¢æ°ã·ãã¥ã¬ã¼ã·ã§ã³ãã¯ã­
+ */
+
+#define VAID_TCP_REPID(id)	(TMIN_TCP_REPID<=(id)&&(id)<=tmax_tcp_repid)
+#define VAID_TCP_CEPID(id)	(TMIN_TCP_CEPID<=(id)&&(id)<=tmax_tcp_cepid)
+
+#define INDEX_TCP_REP(id)	((id)-TMIN_TCP_REPID)
+#define INDEX_TCP_CEP(id)	((id)-TMIN_TCP_CEPID)
+
+#define GET_TCP_REP(id)		(&(tcp_rep[INDEX_TCP_REP(id)]))
+#define GET_TCP_CEP(id)		(&(tcp_cep[INDEX_TCP_CEP(id)]))
+
+#define GET_TCP_REPID(rep)	((ID)(((rep)-tcp_rep)+TMIN_TCP_REPID))
+#define GET_TCP_CEPID(cep)	((ID)(((cep)-tcp_cep)+TMIN_TCP_CEPID))
+#define GET_TCP_TWCEPID(cep)	((ID)(((cep)-tcp_twcep)+TMIN_TCP_TWCEPID))
+
+#define IS_TFN_TCP_RCV(t)	((t)==TFN_TCP_ACP_CEP||(t)==TFN_TCP_RCV_DAT||\
+				 (t)==TFN_TCP_CLS_CEP||\
+				 (t)==TFN_TCP_RCV_BUF||(t)==TFN_TCP_REL_BUF||\
+				 (t)==TFN_TCP_RCV_OOB)
+
+#define VALID_TFN_TCP_CAN(t)	((t)==TFN_TCP_ACP_CEP||(t)==TFN_TCP_CON_CEP||\
+				 (t)==TFN_TCP_CLS_CEP||\
+				 (t)==TFN_TCP_SND_DAT||(t)==TFN_TCP_RCV_DAT||\
+				 (t)==TFN_TCP_GET_BUF||(t)==TFN_TCP_RCV_BUF||\
+				 (t)==TFN_TCP_SND_OOB||\
+				 (t)==TFN_TCP_ALL)
+
+#define VALID_URG_POINTER(urg)	(TCP_CFG_URG_OFFSET==0||urg!=0)
+
+#define VALID_TCP_CEP(cep)	(((cep)->flags&TCP_CEP_FLG_VALID)!=0)
+#define DYNAMIC_TCP_CEP(cep)	(((cep)->flags&TCP_CEP_FLG_DYNAMIC)!=0)
+
+#ifdef TCP_CFG_EXTENTIONS
+
+#define VALID_TCP_REP(rep)	(((rep)->flags&TCP_REP_FLG_VALID)!=0)
+#define DYNAMIC_TCP_REP(rep)	(((rep)->flags&TCP_REP_FLG_DYNAMIC)!=0)
+
+#else	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+#define VALID_TCP_REP(rep)	(true)
+#define DYNAMIC_TCP_REP(rep)	(false)
+
+#endif	/* of #ifdef TCP_CFG_EXTENTIONS */
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+extern T_TCP_REP tcp_rep[];
+extern T_TCP_CEP tcp_cep[];
+extern uint8_t tcp_initialized;
+extern const ID tmax_tcp_repid;
+extern const ID tmax_tcp_cepid;
+extern T_TCP_TWCEP tcp_twcep[];
+
+#ifdef SUPPORT_MIB
+
+extern T_TCP_STATS tcp_stats;
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+/*
+ *  Inline é¢æ°
+ */
+
+#ifndef TCP_CFG_RWBUF_CSAVE
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®åä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ã
+ *  ç¡å¹ã®å ´åã¯ä½ãããªãããã®ããã¼ã®é¢æ°
+ */
+
+/*
+ *  tcp_free_rwbufq -- åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ãè§£æ¾ããã
+ */
+
+Inline void
+tcp_free_rwbufq_ncs (T_TCP_CEP *cep)
+{
+	}
+
+#endif	/* of #ifndef TCP_CFG_RWBUF_CSAVE */
+
+#ifdef TCP_CFG_SWBUF_CSAVE_ONLY
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®éä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ã®ã¿ã
+ *  æå¹ã®å ´åã¯ä½ãããªãããã®ããã¼ã®é¢æ°
+ */
+
+/*
+ *  tcp_read_swbuf_cs -- éä¿¡ã¦ã£ã³ããããã¡ãããã¼ã¿ãèª­ã¿åºãã
+ */
+
+Inline void
+tcp_read_swbuf_cs (T_TCP_CEP *cep, T_NET_BUF *output, uint_t len, uint_t doff)
+{
+	}
+
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE_ONLY */
+
+#ifndef TCP_CFG_SWBUF_CSAVE
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®éä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ã
+ *  ç¡å¹ã®å ´åã¯ä½ãããªãããã®ããã¼ã®é¢æ°
+ */
+
+/*
+ *  tcp_free_swbufq -- éä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ãè§£æ¾ããã
+ */
+
+Inline void
+tcp_free_swbufq_ncs (T_TCP_CEP *cep)
+{
+	}
+
+/*
+ *  tcp_alloc_swbuf -- éä¿¡ã¦ã£ã³ããããã¡ç¨ã®ãããã¯ã¼ã¯ãããã¡ã®å²ãå½ã¦ãæç¤ºããã
+ */
+
+Inline void
+tcp_alloc_swbuf_ncs (T_TCP_CEP *cep)
+{
+	}
+
+/*
+ *  tcp_push_res_nbuf -- ãããã¯ã¼ã¯ãããã¡ãäºç´ããã
+ */
+
+Inline T_NET_BUF *
+tcp_push_res_nbuf_ncs (T_NET_BUF *nbuf)
+{
+	return nbuf;
+	}
+
+/*
+ *  tcp_pull_res_nbuf -- äºç´ãã¦ãããããã¯ã¼ã¯ãããã¡è¿ãã
+ */
+
+Inline T_NET_BUF *
+tcp_pull_res_nbuf_ncs (ATR nbatr)
+{
+	return NULL;
+	}
+
+#endif	/* of #ifndef TCP_CFG_SWBUF_CSAVE */
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®åä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ã®åãæ¿ããã¯ã­
+ */
+
+#ifdef TCP_CFG_RWBUF_CSAVE
+
+#ifdef TCP_CFG_RWBUF_CSAVE_ONLY
+
+#define TCP_FREE_RWBUFQ(cep)			tcp_free_rwbufq_cs(cep)
+#define TCP_DROP_RWBUF(cep,len)			tcp_drop_rwbuf_cs(cep,len)
+#define TCP_READ_RWBUF(cep,data,len)		tcp_read_rwbuf_cs(cep,data,len)
+#define TCP_GET_RWBUF_ADDR(cep,buf)		tcp_get_rwbuf_addr_cs(cep,buf)
+#define TCP_WRITE_RWBUF(cep,input,thoff)	tcp_write_rwbuf_cs(cep,input,thoff)
+
+#else	/* of #ifdef TCP_CFG_RWBUF_CSAVE_ONLY */
+
+#define TCP_FREE_RWBUFQ(cep)			tcp_free_rwbufq(cep)
+#define TCP_DROP_RWBUF(cep,len)			tcp_drop_rwbuf(cep,len)
+#define TCP_READ_RWBUF(cep,data,len)		tcp_read_rwbuf(cep,data,len)
+#define TCP_GET_RWBUF_ADDR(cep,buf)		tcp_get_rwbuf_addr(cep,buf)
+#define TCP_WRITE_RWBUF(cep,input,thoff)	tcp_write_rwbuf(cep,input,thoff)
+
+#endif	/* of #ifdef TCP_CFG_RWBUF_CSAVE_ONLY */
+
+#else	/* of #ifdef TCP_CFG_RWBUF_CSAVE */
+
+#define TCP_FREE_RWBUFQ(cep)			tcp_free_rwbufq_ncs(cep)
+#define TCP_DROP_RWBUF(cep,len)			tcp_drop_rwbuf_ncs(cep,len)
+#define TCP_READ_RWBUF(cep,data,len)		tcp_read_rwbuf_ncs(cep,data,len)
+#define TCP_GET_RWBUF_ADDR(cep,buf)		tcp_get_rwbuf_addr_ncs(cep,buf)
+#define TCP_WRITE_RWBUF(cep,input,thoff)	tcp_write_rwbuf_ncs(cep,input,thoff)
+
+#endif	/* of #ifdef TCP_CFG_RWBUF_CSAVE */
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®éä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ã®åãæ¿ããã¯ã­
+ */
+
+#ifdef TCP_CFG_SWBUF_CSAVE
+
+#define TCP_PUSH_RES_NBUF(nbuf)			tcp_push_res_nbuf(nbuf)
+#define TCP_PULL_RES_NBUF(atr)			tcp_pull_res_nbuf(atr)
+
+#ifdef TCP_CFG_SWBUF_CSAVE_ONLY
+
+#define TCP_FREE_SWBUFQ(cep)			tcp_free_swbufq_cs(cep)
+#define TCP_ALLOC_SWBUF(cep)			tcp_alloc_swbuf_cs(cep)
+#define TCP_DROP_SWBUF(cep,len)			tcp_drop_swbuf_cs(cep,len)
+#define TCP_WRITE_SWBUF(cep,data,len)		tcp_write_swbuf_cs(cep,data,len)
+#define TCP_READ_SWBUF(cep,output,len,doff)	tcp_read_swbuf_cs(cep,output,len,doff)
+#define TCP_WAIT_SWBUF(cep,tmout)		tcp_wait_swbuf_cs(cep,tmout)
+#define TCP_GET_SWBUF_ADDR(cep,buf)		tcp_get_swbuf_addr_cs(cep,buf)
+#define TCP_SEND_SWBUF(cep,len)			tcp_send_swbuf_cs(cep,len)
+#define TCP_IS_SWBUF_FULL(cep)			tcp_is_swbuf_full_cs(cep)
+
+#else	/* of #ifdef TCP_CFG_SWBUF_CSAVE_ONLY */
+
+#define TCP_FREE_SWBUFQ(cep)			tcp_free_swbufq(cep)
+#define TCP_ALLOC_SWBUF(cep)			tcp_alloc_swbuf(cep)
+#define TCP_DROP_SWBUF(cep,len)			tcp_drop_swbuf(cep,len)
+#define TCP_WRITE_SWBUF(cep,data,len)		tcp_write_swbuf(cep,data,len)
+#define TCP_READ_SWBUF(cep,output,len,doff)	tcp_read_swbuf(cep,output,len,doff)
+#define TCP_WAIT_SWBUF(cep,tmout)		tcp_wait_swbuf(cep,tmout)
+#define TCP_GET_SWBUF_ADDR(cep,buf)		tcp_get_swbuf_addr(cep,buf)
+#define TCP_SEND_SWBUF(cep,len)			tcp_send_swbuf(cep,len)
+#define TCP_IS_SWBUF_FULL(cep)			tcp_is_swbuf_full(cep)
+
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE_ONLY */
+
+#else	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+#define TCP_READ_SWBUF(cep,output,len,doff)	tcp_read_swbuf_ncs(cep,output,len,doff)
+#define TCP_FREE_SWBUFQ(cep)			tcp_free_swbufq_ncs(cep)
+#define TCP_ALLOC_SWBUF(cep)			tcp_alloc_swbuf_ncs(cep)
+#define TCP_PUSH_RES_NBUF(nbuf)			tcp_push_res_nbuf_ncs(nbuf)
+#define TCP_PULL_RES_NBUF(atr)			tcp_pull_res_nbuf_ncs(atr)
+#define TCP_DROP_SWBUF(cep,len)			tcp_drop_swbuf_ncs(cep,len)
+#define TCP_WRITE_SWBUF(cep,data,len)		tcp_write_swbuf_ncs(cep,data,len)
+#define TCP_WAIT_SWBUF(cep,tmout)		tcp_wait_swbuf_ncs(cep,tmout)
+#define TCP_GET_SWBUF_ADDR(cep,buf)		tcp_get_swbuf_addr_ncs(cep,buf)
+#define TCP_SEND_SWBUF(cep,len)			tcp_send_swbuf_ncs(cep,len)
+#define TCP_IS_SWBUF_FULL(cep)			tcp_is_swbuf_full_ncs(cep)
+
+#endif	/* of #ifdef TCP_CFG_SWBUF_CSAVE */
+
+/*
+ *  é¢æ°
+ */
+
+extern uint_t tcp_input (T_NET_BUF **inputp, uint_t *offp, uint_t *nextp);
+extern void tcp_init (void);
+extern void tcp_init_iss (void);
+extern T_TCP_CEP *tcp_close (T_TCP_CEP *cep);
+extern T_TCP_CEP *tcp_drop  (T_TCP_CEP *cep, ER errno);
+extern void tcp_respond (T_NET_BUF *nbuf, T_TCP_CEP *cep,
+                         T_TCP_SEQ ack, T_TCP_SEQ seq, uint_t rbfree, uint8_t flags);
+extern void tcp_set_header (T_NET_BUF *nbuf, T_TCP_CEP *cep, uint_t thoff, uint_t optlen);
+extern ER tcp_get_segment (T_NET_BUF **nbuf, T_TCP_CEP *cep,
+                           uint_t optlen, uint_t len, uint_t maxlen, ATR nbatr, TMO tmout);
+extern void tcp_init_cep (T_TCP_CEP *cep);
+extern void tcp_notify (T_NET_BUF *input, int code);
+extern T_TCP_TIME tcp_rexmt_val (T_TCP_CEP *cep);
+extern void tcp_set_persist_timer (T_TCP_CEP *cep);
+extern void tcp_cancel_timers (T_TCP_CEP *cep);
+extern void tcp_alloc_auto_port (T_TCP_CEP *cep);
+extern ER tcp_alloc_port (T_TCP_CEP *cep, uint16_t portno);
+extern void tcp_move_twcep (T_TCP_CEP *cep);
+extern ER tcp_lock_cep (ID cepid, T_TCP_CEP **p_cep, FN tfn);
+extern void tcp_free_reassq (T_TCP_CEP *cep);
+extern ER tcp_can_send_more (T_TCP_CEP *cep, FN fncd, TMO tmout);
+extern ER tcp_can_recv_more (ER *error, T_TCP_CEP *cep, FN fncd, TMO tmout);
+extern uint8_t tcp_move_ra2rw (T_TCP_CEP *cep, uint8_t flags);
+extern uint8_t tcp_write_raque (T_NET_BUF *input, T_TCP_CEP *cep, uint_t thoff, uint8_t flags);
+extern ER tcp_wait_rwbuf (T_TCP_CEP *cep, TMO tmout);
+extern T_TCP_CEP *tcp_user_closed (T_TCP_CEP *cep);
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®åä¿¡ã¦ã£ã³ããããã¡ç¨é¢æ°
+ */
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®åä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãæå¹ã®å ´åã
+ *  é¢æ°ã®é¸æã«ä½¿ç¨ããã
+ */
+
+extern void tcp_free_rwbufq (T_TCP_CEP *cep);
+extern void tcp_drop_rwbuf (T_TCP_CEP *cep, uint_t len);
+extern void tcp_write_rwbuf (T_TCP_CEP *cep, T_NET_BUF *input, uint_t tcpoff);
+extern uint_t tcp_read_rwbuf (T_TCP_CEP *cep, void *data, uint_t len);
+extern uint_t tcp_get_rwbuf_addr (T_TCP_CEP *cep, void **p_buf);
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®åä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ç¨é¢æ°
+ */
+
+extern void tcp_free_rwbufq_cs (T_TCP_CEP *cep);
+extern void tcp_drop_rwbuf_cs (T_TCP_CEP *cep, uint_t len);
+extern void tcp_write_rwbuf_cs (T_TCP_CEP *cep, T_NET_BUF *input, uint_t tcpoff);
+extern uint_t tcp_read_rwbuf_cs (T_TCP_CEP *cep, void *data, uint_t len);
+extern uint_t tcp_get_rwbuf_addr_cs (T_TCP_CEP *cep, void **p_buf);
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®åä¿¡ã¦ã£ã³ããããã¡ã®ãéãçã³ãã¼æ©è½ç¨é¢æ°
+ */
+
+extern void tcp_free_rwbufq_ncs (T_TCP_CEP *cep);
+extern void tcp_drop_rwbuf_ncs (T_TCP_CEP *cep, uint_t len);
+extern void tcp_write_rwbuf_ncs (T_TCP_CEP *cep, T_NET_BUF *input, uint_t tcpoff);
+extern uint_t tcp_read_rwbuf_ncs (T_TCP_CEP *cep, void *data, uint_t len);
+extern uint_t tcp_get_rwbuf_addr_ncs (T_TCP_CEP *cep, void **p_buf);
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®éä¿¡ã¦ã£ã³ããããã¡ç¨é¢æ°
+ */
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®éä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãæå¹ã®å ´åã
+ *  é¢æ°ã®é¸æã«ä½¿ç¨ããã
+ */
+
+extern void tcp_free_swbufq (T_TCP_CEP *cep);
+extern void tcp_drop_swbuf (T_TCP_CEP *cep, uint_t len);
+extern ER_UINT tcp_write_swbuf (T_TCP_CEP *cep, void *data, uint_t len);
+extern void tcp_read_swbuf (T_TCP_CEP *cep, T_NET_BUF *output, uint_t len, uint_t doff);
+extern void tcp_send_swbuf (T_TCP_CEP *cep, uint_t len);
+extern ER_UINT tcp_get_swbuf_addr (T_TCP_CEP *cep, void **p_buf);
+extern ER tcp_wait_swbuf (T_TCP_CEP *cep, TMO tmout);
+extern T_NET_BUF *tcp_push_res_nbuf (T_NET_BUF *buf);
+extern T_NET_BUF *tcp_pull_res_nbuf (ATR nbatr);
+extern void tcp_alloc_swbuf (T_TCP_CEP *cep);
+extern bool_t tcp_is_swbuf_full (T_TCP_CEP *cep);
+extern void tcp_init_swbuf (T_TCP_CEP *cep);
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®éä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ç¨é¢æ°
+ */
+
+extern void tcp_free_swbufq_cs (T_TCP_CEP *cep);
+extern void tcp_drop_swbuf_cs (T_TCP_CEP *cep, uint_t len);
+extern ER_UINT tcp_write_swbuf_cs (T_TCP_CEP *cep, void *data, uint_t len);
+extern void tcp_read_swbuf_cs (T_TCP_CEP *cep, T_NET_BUF *output, uint_t len, uint_t doff);
+extern void tcp_send_swbuf_cs (T_TCP_CEP *cep, uint_t len);
+extern ER_UINT tcp_get_swbuf_addr_cs (T_TCP_CEP *cep, void **p_buf);
+extern ER tcp_wait_swbuf_cs (T_TCP_CEP *cep, TMO tmout);
+extern void tcp_alloc_swbuf_cs (T_TCP_CEP *cep);
+extern bool_t tcp_is_swbuf_full_cs (T_TCP_CEP *cep);
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®éä¿¡ã¦ã£ã³ããããã¡ã®ãéãçã³ãã¼æ©è½ç¨é¢æ°
+ */
+
+extern void tcp_free_swbufq_ncs (T_TCP_CEP *cep);
+extern void tcp_drop_swbuf_ncs (T_TCP_CEP *cep, uint_t len);
+extern ER_UINT tcp_write_swbuf_ncs (T_TCP_CEP *cep, void *data, uint_t len);
+extern void tcp_read_swbuf_ncs (T_TCP_CEP *cep, T_NET_BUF *output, uint_t len, uint_t doff);
+extern void tcp_send_swbuf_ncs (T_TCP_CEP *cep, uint_t len);
+extern ER_UINT tcp_get_swbuf_addr_ncs (T_TCP_CEP *cep, void **p_buf);
+extern ER tcp_wait_swbuf_ncs (T_TCP_CEP *cep, TMO tmout);
+extern T_NET_BUF *tcp_push_res_nbuf_ncs (T_NET_BUF *buf);
+extern T_NET_BUF *tcp_pull_res_nbuf_ncs (ATR nbatr);
+extern void tcp_alloc_swbuf_ncs (T_TCP_CEP *cep);
+extern bool_t tcp_is_swbuf_full_ncs (T_TCP_CEP *cep);
+
+/*
+ *  tcp_find_cep -- ãã¼ãçªå·ãã TCP éä¿¡ç«¯ç¹ãå¾ãã
+ *
+ *    æ³¨æ: myaddr ã¯ã
+ *          TINET-1.2 ãããããã¯ã¼ã¯ãã¤ããªã¼ãã
+ *          TINET-1.1 ã¾ã§ã¯ããã¹ããã¤ããªã¼ã
+ */
+extern T_TCP_CEP *tcp_find_cep (T_IN_ADDR *dstaddr,  uint16_t dstport,
+                                T_IN_ADDR *peeraddr, uint16_t peerport);
+
+/*
+ *  TCP ãããã®ãã¬ã¼ã¹åºåæ©è½ç¨é¢æ°
+ */
+extern void tcp_output_trace (T_NET_BUF *output, T_TCP_CEP *cep);
+extern void tcp_input_trace  (T_NET_BUF *input,  T_TCP_CEP *cep);
+
+/* TCP åºåã¿ã¹ã¯ */
+
+extern void	tcp_output_task(intptr_t exinf);
+
+#endif	/* of #ifndef _TCP_VAR_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp.cfg	(revision 270)
@@ -0,0 +1,75 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  UDP ã§ä½¿ç¨ããã«ã¼ãã«ãªãã¸ã§ã¯ã
+ */
+
+#ifdef SUPPORT_UDP
+
+/*
+ *  ãã³ãã­ãã­ã³ã°ã³ã¼ã«ãè¡ãå ´åã«çµã¿è¾¼ãã¿ã¹ã¯ã¨ã»ããã©
+ */
+
+#ifdef UDP_CFG_NON_BLOCKING
+
+CRE_TSK(UDP_OUTPUT_TASK, {
+	TA_HLNG,
+	0,
+	udp_output_task,
+	UDP_OUT_TASK_PRIORITY,
+	UDP_OUT_TASK_STACK_SIZE,
+	NULL
+	});
+
+/* ã»ããã© */
+
+CRE_SEM(SEM_UDP_POST_OUTPUT,	{ TA_TPRI, 0, 1 });
+
+#endif	/* of #ifdef UDP_CFG_NON_BLOCKING */
+
+CRE_SEM(SEM_UDP_CEP,		{ TA_TPRI, 1, 1 });
+
+#endif	/* of #ifdef SUPPORT_UDP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp.h	(revision 270)
@@ -0,0 +1,102 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)udp.h	8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/netinet/udp.h,v 1.6.4.1 1999/08/29 16:29:58 peter Exp $
+ */
+ 
+#ifndef _UDP_H_
+#define _UDP_H_
+
+/*
+ *  UDP ããããRFC768 åç
+§
+ */
+
+typedef struct t_udp_hdr {
+	uint16_t	sport;		/* éä¿¡å
+ãã¼ãçªå·	*/
+	uint16_t	dport;		/* å®å
+ãã¼ãçªå·	*/
+
+	uint16_t	ulen;		/* ãã¼ã¿ã°ã©ã é·	*/
+	uint16_t	sum;		/* ãã§ãã¯ãµã 		*/
+	} __attribute__((packed, aligned(2)))T_UDP_HDR;
+
+#define UDP_HDR_SIZE			(sizeof(T_UDP_HDR))
+
+#endif	/* of #ifndef _UDP_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp_input.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp_input.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp_input.c	(revision 270)
@@ -0,0 +1,404 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_loop.h>
+#include <net/if_ppp.h>
+#include <net/ethernet.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet/in_itron.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet/ip_icmp.h>
+#include <netinet/icmp6.h>
+
+#include <netinet/udp.h>
+#include <netinet/udp_var.h>
+
+#include <net/if_var.h>
+
+#ifdef SUPPORT_UDP
+
+#ifdef SUPPORT_MIB
+
+/*
+ *  SNMP ã® ç®¡çæ
+å ±ãã¼ã¹ (MIB)
+ */
+
+T_UDP_STATS udp_stats;
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+#if defined(SUPPORT_INET4)
+
+#ifdef DHCP_CFG
+
+/*
+ *  udp_dstaddr_accept -- UDP ã®ãã¦å
+ã¢ãã¬ã¹ãæ­£ããããã§ãã¯ããã
+ *
+ *    DHCP_CFG ãå®ç¾©ããã¦ããã¨ãã¯ãä»¥ä¸ã®ãã¼ã¿ã°ã©ã ãåä¿¡ããã
+ *
+ *      ã»ãã¦å
+ã¢ãã¬ã¹ããã­ã¼ãã­ã£ã¹ã
+ *      ã»ã­ã¼ã«ã«ã¢ãã¬ã¹ãæªå®ç¾©
+ */
+
+static bool_t
+udp_is_dstaddr_accept (T_IN4_ADDR *myaddr, T_IN4_ADDR *dstaddr)
+{
+	T_IFNET	*ifp = IF_GET_IFNET();
+
+	if (ifp->in_ifaddr.addr == IPV4_ADDRANY ||
+	    ntohl(*dstaddr) == IPV4_ADDR_BROADCAST ||
+	    ntohl(*dstaddr) == ((ifp->in_ifaddr.addr & ifp->in_ifaddr.mask) | ~ifp->in_ifaddr.mask))
+		return true;
+	else
+		return IN_IS_DSTADDR_ACCEPT(myaddr, dstaddr);
+	}
+
+#elif defined(ETHER_CFG_MULTICAST)
+
+/*
+ *  udp_dstaddr_accept -- UDP ã®ãã¦å
+ã¢ãã¬ã¹ãæ­£ããããã§ãã¯ããã
+ *
+ *    ä»¥ä¸ã®å ´åããã¼ã¿ã°ã©ã ãåä¿¡ããã
+ *
+ *      ã»ãã¦å
+ã¢ãã¬ã¹ããã­ã¼ãã­ã£ã¹ã
+ */
+
+static bool_t
+udp_is_dstaddr_accept (T_IN4_ADDR *myaddr, T_IN4_ADDR *dstaddr)
+{
+	T_IFNET	*ifp = IF_GET_IFNET();
+	T_IN4_ADDR	dst = ntohl(*dstaddr);
+
+	if (dst == IPV4_ADDR_BROADCAST ||
+	    dst == ((ifp->in_ifaddr.addr & ifp->in_ifaddr.mask) | ~ifp->in_ifaddr.mask) ||
+		IN4_IS_ADDR_MULTICAST(dst))
+		return true;
+	else
+		return IN_IS_DSTADDR_ACCEPT(myaddr, dstaddr);
+	}
+
+#else	/* of #ifdef DHCP_CFG */
+
+/*
+ *  udp_dstaddr_accept -- UDP ã®ãã¦å
+ã¢ãã¬ã¹ãæ­£ããããã§ãã¯ããã
+ *
+ *    ä»¥ä¸ã®å ´åããã¼ã¿ã°ã©ã ãåä¿¡ããã
+ *
+ *      ã»ãã¦å
+ã¢ãã¬ã¹ããã­ã¼ãã­ã£ã¹ã
+ */
+
+static bool_t
+udp_is_dstaddr_accept (T_IN4_ADDR *myaddr, T_IN4_ADDR *dstaddr)
+{
+	T_IFNET	*ifp = IF_GET_IFNET();
+
+	if (ntohl(*dstaddr) == IPV4_ADDR_BROADCAST ||
+	    ntohl(*dstaddr) == ((ifp->in_ifaddr.addr & ifp->in_ifaddr.mask) | ~ifp->in_ifaddr.mask))
+		return true;
+	else
+		return IN_IS_DSTADDR_ACCEPT(myaddr, dstaddr);
+	}
+
+#endif	/* of #ifdef DHCP_CFG */
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+/*
+ *  udp_dstaddr_accept -- UDP ã®ãã¦å
+ã¢ãã¬ã¹ãæ­£ããããã§ãã¯ããã
+ *
+ *    ä»¥ä¸ã®å ´åããã¼ã¿ã°ã©ã ãåä¿¡ããã
+ *
+ *      ã»ãã¦å
+ã¢ãã¬ã¹ããã«ãã­ã£ã¹ã
+ */
+
+static bool_t
+udp_is_dstaddr_accept (T_IN6_ADDR *myaddr, T_IN6_ADDR *dstaddr)
+{
+	if (IN6_IS_ADDR_MULTICAST(dstaddr))
+		return true;
+	else
+		return IN_IS_DSTADDR_ACCEPT(myaddr, dstaddr);
+	}
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+/*
+ *  udp_input -- UDP ã®å
+¥åé¢æ°
+ */
+
+uint_t
+udp_input (T_NET_BUF **inputp, uint_t *offp, uint_t *nextp)
+{
+	T_NET_BUF	*input = *inputp;
+	T_UDP_CEP	*cep;
+	T_UDP_HDR	*udph;
+	T_IP_HDR	*iph;
+	int_t		ix;
+	uint_t		len, hlen, ulen;
+
+	hlen = (uint_t)GET_IF_IP_HDR_SIZE(input);
+
+	NET_COUNT_UDP(net_count_udp.in_octets,  input->len - hlen);
+	NET_COUNT_UDP(net_count_udp.in_packets, 1);
+	NET_COUNT_MIB(udp_stats.udpInDatagrams, 1);
+
+	/* ãããé·ããã§ãã¯ããã*/
+	if (input->len < hlen + UDP_HDR_SIZE)
+		goto buf_rel;
+
+	udph = (T_UDP_HDR *)(input->buf + *offp);
+
+	/* ãã¼ã¿ã°ã©ã é·ããã§ãã¯ãã */
+	ulen  = ntohs(udph->ulen);
+	if (ulen != input->len - hlen)
+		goto buf_rel;
+
+	/* å®å
+ãã¼ãã 0 ã®ãã¼ã¿ã°ã©ã ã¯ç ´æ£ãããRFC768 */
+	if (udph->dport == 0)
+		goto buf_rel;
+
+#ifdef UDP_CFG_IN_CHECKSUM
+
+	/* ãã§ãã¯ãµã ããã§ãã¯ãã */
+	if (udph->sum && IN_CKSUM(input, IPPROTO_UDP, *offp, ulen) != 0)
+		goto buf_rel;
+
+#endif	/* of #ifdef UDP_CFG_IN_CHECKSUM */
+
+	iph = GET_IP_HDR(input);
+
+	/* å®å
+ã¢ãã¬ã¹ã¨ãã¼ãããã§ãã¯ãã */
+	for (ix = tmax_udp_ccepid; ix -- > 0; ) {
+		cep = &udp_cep[ix];
+		if (VALID_UDP_CEP(cep) &&
+		    udp_is_dstaddr_accept(&cep->myaddr.ipaddr, &iph->dst) &&
+		    ntohs(udph->dport) == cep->myaddr.portno) {
+			len = (uint_t)(ntohs(udph->ulen) - UDP_HDR_SIZE);
+
+			if (cep->rcv_tskid != TA_NULL) {	/* éãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸­ */
+				if (psnd_dtq(cep->rcvqid, (intptr_t)input) != E_OK)
+					goto buf_rel;
+				}
+
+#ifdef UDP_CFG_NON_BLOCKING
+
+			else if (cep->rcv_p_dstaddr != NULL) {	/* ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸­ */
+
+				/* p_dstaddr ãè¨­å®ããã*/
+				cep->rcv_p_dstaddr->portno = ntohs(udph->sport);
+				IN_COPY_TO_HOST(&cep->rcv_p_dstaddr->ipaddr, &GET_IP_HDR(input)->src);
+
+				/* ãã¼ã¿ããããã¡ã«ç§»ãã*/
+				memcpy(cep->rcv_data, GET_UDP_SDU(input, *offp),
+				       (size_t)(len < cep->rcv_len ? len : cep->rcv_len));
+				syscall(rel_net_buf(input));
+
+				if (IS_PTR_DEFINED(cep->callback))
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+					(*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)(uint32_t)len);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+					(*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)&len);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				else
+					syslog(LOG_WARNING, "[UDP] no call back, CEP: %d.", GET_UDP_CEPID(cep));
+				cep->rcv_p_dstaddr = NULL;
+				}
+
+#endif	/* of #ifdef UDP_CFG_NON_BLOCKING */
+
+			else if (IS_PTR_DEFINED(cep->callback)) {
+
+				/* ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã*/
+				cep->cb_netbuf = input;
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+				(*cep->callback)(GET_UDP_CEPID(cep), TEV_UDP_RCV_DAT, (void*)(uint32_t)len);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				(*cep->callback)(GET_UDP_CEPID(cep), TEV_UDP_RCV_DAT, (void*)&len);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+				/*
+				 *  ãããã¯ã¼ã¯ãããã¡ããã®ã¾ã¾ã§ããã°ãã³ã¼ã«ããã¯é¢æ°å
+ã§
+				 *  ãã¼ã¿ãèª­ã¿åºããªãã£ããã¨ã«ãªãã®ã§ãæ¨ã¦ãã
+				 */
+				if (cep->cb_netbuf != NULL)
+					syscall(rel_net_buf(cep->cb_netbuf));
+				}
+			else
+				goto buf_rel;
+
+			return IPPROTO_DONE;
+			}
+		}
+
+	NET_COUNT_MIB(udp_stats.udpNoPorts, 1);
+
+#if defined(SUPPORT_INET4)
+
+	/* ã­ã¼ã«ã« IP ã¢ãã¬ã¹ã«å±ãããã¼ã¿ã°ã©ã ã®ã¿ ICMP ã¨ã©ã¼ãéç¥ããã*/
+	if (ntohl(iph->dst) == IF_GET_IFNET()->in_ifaddr.addr) {
+		syslog(LOG_INFO, "[UDP] unexp port: %d.", ntohs(udph->dport));
+
+		icmp_error(ICMP4_UNREACH_PORT, input);
+		/* icmp_error ã§ã¯ããããã¯ã¼ã¯ãããã¡ input ãè¿å´ããªãã®ã§ä¸ã¸æããã*/
+		}
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+	/* ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ã«å±ãããã¼ã¿ã°ã©ã ã¯ ICMP ã¨ã©ã¼ãéç¥ããªãã*/
+	if (!IN6_IS_ADDR_MULTICAST(&iph->dst)) {
+		syslog(LOG_INFO, "[UDP] unexp port: %d.", ntohs(udph->dport));
+
+		/* icmp6_error ã§ããããã¯ã¼ã¯ãããã¡ input ãè¿å´ããã*/
+		icmp6_error(input, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_NOPORT, 0);
+
+		NET_COUNT_UDP(net_count_udp.in_err_packets, 1);
+		NET_COUNT_MIB(udp_stats.udpInErrors, 1);
+		return IPPROTO_DONE;
+		}
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+buf_rel:
+	NET_COUNT_UDP(net_count_udp.in_err_packets, 1);
+	NET_COUNT_MIB(udp_stats.udpInErrors, 1);
+	syscall(rel_net_buf(input));
+	return IPPROTO_DONE;
+	}
+
+#endif	/* of #ifdef SUPPORT_UDP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp_output.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp_output.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp_output.c	(revision 270)
@@ -0,0 +1,277 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet6/in6.h>
+#include <netinet/in_var.h>
+#include <netinet/in_itron.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet/ip_icmp.h>
+#include <netinet6/in6_var.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet/icmp6.h>
+#include <netinet/udp.h>
+#include <netinet/udp_var.h>
+
+#ifdef SUPPORT_UDP
+
+#ifdef UDP_CFG_NON_BLOCKING
+
+/*
+ *  é¢æ°
+ */
+
+static void udp_output (T_UDP_CEP *cep);
+
+/*
+ *  UDP åºåã¿ã¹ã¯
+ *  ãã³ãã­ãã­ã³ã°ã³ã¼ã«ãçµã¿è¾¼ãã ã¨ãä½¿ç¨ããã
+ */
+
+static void
+udp_output (T_UDP_CEP *cep)
+{
+	T_NET_BUF	*output;
+	T_UDP_HDR	*udph;
+	ER_UINT		error;
+
+#ifdef UDP_CFG_OUT_CHECKSUM
+	uint16_t	sum;
+#endif	/* of #ifdef UDP_CFG_OUT_CHECKSUM */
+
+	/* IP ãã¼ã¿ã°ã©ã ãå²ãå½ã¦ãã*/
+	if ((error = IN_GET_DATAGRAM(&output, (uint_t)(UDP_HDR_SIZE + cep->snd_len), 0,
+	                             &cep->snd_p_dstaddr->ipaddr,
+	                             &cep->myaddr.ipaddr,
+	                             IPPROTO_UDP, IP_DEFTTL, 
+	                             NBA_SEARCH_ASCENT, TMO_UDP_OUTPUT)) != E_OK) {
+		goto err_ret;
+		}
+
+	/* UDP ãããã«æ
+å ±ãè¨­å®ããã*/
+	udph		= GET_UDP_HDR(output, IF_IP_UDP_HDR_OFFSET);
+	udph->sport	= htons(cep->myaddr.portno);
+	udph->dport	= htons(cep->snd_p_dstaddr->portno);
+	udph->ulen	= htons(UDP_HDR_SIZE + cep->snd_len);
+	udph->sum	= 0;
+
+	/* ãã¼ã¿ãã³ãã¼ããã*/
+	memcpy((void*)GET_UDP_SDU(output, IF_IP_UDP_HDR_OFFSET),
+	       cep->snd_data, (size_t)cep->snd_len);
+
+#ifdef UDP_CFG_OUT_CHECKSUM
+
+	sum = IN_CKSUM(output, IPPROTO_UDP, IF_IP_UDP_HDR_OFFSET,
+	               (uint_t)(UDP_HDR_SIZE + cep->snd_len));
+
+	/* è¨ç®ãããã§ãã¯ãµã ã®å¤ã 0 ãªã 0xffff ãå
+¥ããã*/
+	if (sum == 0)
+		sum = UINT_C(0xffff);
+	udph->sum = sum;
+
+#endif/* of #ifdef UDP_CFG_OUT_CHECKSUM */
+
+	/* ãããã¯ã¼ã¯ãããã¡é·ãèª¿æ´ããã*/
+	output->len = (uint16_t)(IF_IP_UDP_HDR_SIZE + cep->snd_len);
+
+	/* ãããã¯ã¼ã¯å±¤ (IP) ã®åºåé¢æ°ãå¼ã³åºãã*/
+	if ((error = IP_OUTPUT(output, TMO_UDP_OUTPUT)) != E_OK)
+		goto err_ret;
+
+
+	NET_COUNT_MIB(udp_stats.udpOutDatagrams, 1);
+
+	if (IS_PTR_DEFINED(cep->callback)) {
+
+		if (error == E_OK)
+			error = cep->snd_len;
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+		(*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_SND_DAT, (void*)error);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+		(*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_SND_DAT, (void*)&error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+		}
+	else
+		syslog(LOG_WARNING, "[UDP] no call back, CEP: %d.", GET_UDP_CEPID(cep));
+	cep->snd_p_dstaddr = NULL;
+	return;
+
+err_ret:
+	NET_COUNT_UDP(net_count_udp.out_err_packets, 1);
+	if (IS_PTR_DEFINED(cep->callback)) {
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+		(*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_SND_DAT, (void*)E_NOMEM);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+		error = E_NOMEM;
+		(*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_SND_DAT, (void*)&error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+		}
+	else
+		syslog(LOG_WARNING, "[UDP] no call back, CEP: %d.", GET_UDP_CEPID(cep));
+	cep->snd_p_dstaddr = NULL;
+	return;
+	}
+
+/*
+ *  UDP åºåã¿ã¹ã¯
+ *  ãã³ãã­ãã­ã³ã°ã³ã¼ã«ãçµã¿è¾¼ãã ã¨ãä½¿ç¨ããã
+ */
+
+void
+udp_output_task (intptr_t exinf)
+{
+	ID	tskid;
+	int_t	ix;
+
+	get_tid(&tskid);
+	syslog(LOG_NOTICE, "[UDP OUTPUT:%d] started.", tskid);
+
+
+#if defined(SUPPORT_INET6) && !defined(SUPPORT_TCP)
+
+	/* IPv6 ã®ã¹ãã¼ãã¬ã¹ã»ã¢ãã¬ã¹èªåè¨­å®ãå®è¡ããã*/
+	in6_if_up(IF_GET_IFNET());
+
+#endif	/* of #if defined(SUPPORT_INET6) && !defined(SUPPORT_TCP) */
+
+	while (true) {
+
+		/* åºåããã¹ããããã¾ã§å¾
+ã¤ã*/
+		syscall(wai_sem(SEM_UDP_POST_OUTPUT));
+
+		for (ix = tmax_udp_ccepid; ix -- > 0; ) {
+
+			if (udp_cep[ix].flags & UDP_CEP_FLG_POST_OUTPUT) {
+				udp_cep[ix].flags &= ~UDP_CEP_FLG_POST_OUTPUT;
+				udp_output(&udp_cep[ix]);
+				}
+			}
+		}
+	}
+
+#endif	/* of #ifdef UDP_CFG_NON_BLOCKING */
+
+#endif	/* of #ifdef SUPPORT_UDP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp_subr.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp_subr.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp_subr.c	(revision 270)
@@ -0,0 +1,188 @@
+/*
+ *  TINET (UDP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must ceproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+#include <net/ppp_ipcp.h>
+
+#include <netinet/in.h>
+#include <netinet6/in6.h>
+#include <netinet/in_var.h>
+#include <netinet/in_itron.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet/ip_icmp.h>
+#include <netinet6/in6_var.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet/icmp6.h>
+#include <netinet/udp.h>
+#include <netinet/udp_var.h>
+
+#ifdef SUPPORT_UDP
+
+/*
+ *  å±æå¤æ°
+ */
+
+static uint16_t udp_port_auto = UDP_PORT_FIRST_AUTO;	/* èªåå²ãå½ã¦çªå·	*/
+
+/*
+ *  udp_alloc_auto_port -- èªåå²ãå½ã¦ãã¼ãçªå·ãè¨­å®ããã
+ */
+
+ER
+udp_alloc_auto_port (T_UDP_CEP *cep)
+{
+	int_t	ix;
+	uint16_t	portno, portno_start;
+
+	portno_start = udp_port_auto;
+	do {
+		portno = udp_port_auto ++;
+		if (udp_port_auto > UDP_PORT_LAST_AUTO)
+			udp_port_auto = UDP_PORT_FIRST_AUTO;
+
+		syscall(wai_sem(SEM_UDP_CEP));
+		for (ix = tmax_udp_ccepid; ix -- > 0; ) {
+			if (VALID_UDP_CEP(&udp_cep[ix]) && udp_cep[ix].myaddr.portno == portno) {
+				portno = UDP_PORTANY;
+				break;
+				}
+			}
+
+		if (portno != UDP_PORTANY) {
+			cep->myaddr.portno = portno;
+			syscall(sig_sem(SEM_UDP_CEP));
+			return E_OK;
+			}
+		syscall(sig_sem(SEM_UDP_CEP));
+
+		} while (portno_start != udp_port_auto);
+
+	return E_NOID;
+	}
+
+/*
+ *  udp_alloc_port -- æå®ããããã¼ãçªå·ãè¨­å®ããã
+ */
+
+ER
+udp_alloc_port (T_UDP_CEP *cep, uint16_t portno)
+{
+	int_t	ix;
+
+	syscall(wai_sem(SEM_UDP_CEP));
+	for (ix = tmax_udp_ccepid; ix -- > 0; )
+		if (VALID_UDP_CEP(&udp_cep[ix]) && udp_cep[ix].myaddr.portno == portno) {
+			syscall(sig_sem(SEM_UDP_CEP));
+			return E_PAR;
+			}
+	cep->myaddr.portno = portno;
+	syscall(sig_sem(SEM_UDP_CEP));
+	return E_OK;
+	}
+
+#endif	/* of #ifdef SUPPORT_UDP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp_usrreq.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp_usrreq.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp_usrreq.c	(revision 270)
@@ -0,0 +1,797 @@
+/*
+ *  TINET (UDP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must ceproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)udp_usrreq.c	8.6 (Berkeley) 5/23/95
+ * $FreeBSD: src/sys/netinet/udp_usrreq.c,v 1.49.2.2 1999/08/29 16:29:58 peter Exp $
+ */
+
+/*
+ *  ãã³ãã­ãã­ã³ã°ã³ã¼ã«ãçµè¾¼ã¾ãªãå ´åã«ãªã³ã¯ãããé¢æ°ã®å®ç¾©
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+#include <net/ppp_ipcp.h>
+
+#include <netinet/in.h>
+#include <netinet6/in6.h>
+#include <netinet/in_var.h>
+#include <netinet/in_itron.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet/ip_icmp.h>
+#include <netinet6/in6_var.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet/icmp6.h>
+#include <netinet/udp.h>
+#include <netinet/udp_var.h>
+
+#ifdef SUPPORT_UDP
+
+/*
+ *  IPv4 ã¨ IPv6 ã®åãæ¿ããã¯ã­
+ */
+
+#if defined(SUPPORT_INET4)
+
+#define UDP_CRE_CEP	udp_cre_cep
+#define UDP_SND_DAT	udp_snd_dat
+#define UDP_RCV_DAT	udp_rcv_dat
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+#define UDP_CRE_CEP	udp6_cre_cep
+#define UDP_SND_DAT	udp6_snd_dat
+#define UDP_RCV_DAT	udp6_rcv_dat
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+/*
+ *  TINET ãã©ã¤ãã©ãªåããªãå ´åã¯ãå
+¨ã¦ã®æ©è½ã
+ *  ãªãã¸ã§ã¯ããã¡ã¤ã«ã«åºåããããããã¯ã­ãæå¹ã«ããã
+ */
+
+#ifndef UDP_CFG_LIBRARY
+
+#define __udp_send_data
+#define __udp_cre_cep
+#define __udp_del_cep
+#define __udp_can_cep
+#define __udp_set_opt
+#define __udp_get_opt
+#define __udp_can_snd
+#define __udp_can_rcv
+#define __udp_snd_dat
+#define __udp_rcv_dat
+
+#endif	/* of #ifndef UDP_CFG_LIBRARY */
+
+#ifdef __udp_send_data
+
+/*
+ *  udp_send_data -- ãã±ããéä¿¡ã®ä¸»è¦é¨
+ */
+
+ER_UINT
+udp_send_data (T_UDP_CEP *cep, T_IPEP *p_dstaddr, void *data, int_t len, TMO tmout)
+{
+	T_NET_BUF	*output;
+	T_UDP_HDR	*udph;
+	SYSTIM		before, after;
+	ER		error = E_OK;
+
+#ifdef UDP_CFG_OUT_CHECKSUM
+	uint16_t	sum;
+#endif	/* of #ifdef UDP_CFG_OUT_CHECKSUM */
+
+	NET_COUNT_UDP(net_count_udp.out_octets,  len);
+	NET_COUNT_UDP(net_count_udp.out_packets, 1);
+
+	/* IP ãã¼ã¿ã°ã©ã å²ãå½ã¦ã®æéã tmout ããæ¸ããã*/
+	if (!(tmout == TMO_POL || tmout == TMO_FEVR))
+		syscall(get_tim(&before));
+
+	/* IP ãã¼ã¿ã°ã©ã ãå²ãå½ã¦ãã*/
+	if ((error = IN_GET_DATAGRAM(&output, (uint_t)(UDP_HDR_SIZE + len), 0,
+	                             &p_dstaddr->ipaddr,
+	                             &cep->myaddr.ipaddr,
+	                             IPPROTO_UDP, IP_DEFTTL, 
+	                             NBA_SEARCH_ASCENT, tmout)) != E_OK)
+		goto err_ret;
+
+	/* IP ãã¼ã¿ã°ã©ã å²ãå½ã¦ã®æéã tmout ããæ¸ããã*/
+	if (!(tmout == TMO_POL || tmout == TMO_FEVR)) {
+		syscall(get_tim(&after));
+		if (after - before > tmout) {
+			syscall(rel_net_buf(output));
+			error = E_TMOUT;
+			goto err_ret;
+			}
+		tmout -= (TMO)(after - before);
+		}
+
+	/* UDP ãããã«æ
+å ±ãè¨­å®ããã*/
+	udph		= GET_UDP_HDR(output, IF_IP_UDP_HDR_OFFSET);
+	udph->sport	= htons(cep->myaddr.portno);
+	udph->dport	= htons(p_dstaddr->portno);
+	udph->ulen	= htons(UDP_HDR_SIZE + len);
+	udph->sum	= 0;
+
+	/* ãã¼ã¿ãã³ãã¼ããã*/
+	memcpy((void*)GET_UDP_SDU(output, IF_IP_UDP_HDR_OFFSET), data, (size_t)len);
+
+#ifdef UDP_CFG_OUT_CHECKSUM
+
+	sum = IN_CKSUM(output, IPPROTO_UDP, IF_IP_UDP_HDR_OFFSET, (uint_t)(UDP_HDR_SIZE + len));
+
+	/* è¨ç®ãããã§ãã¯ãµã ã®å¤ã 0 ãªã 0xffff ãå
+¥ããã*/
+	if (sum == 0)
+		sum = 0xffff;
+	udph->sum = sum;
+
+#endif	/* of #ifdef UDP_CFG_OUT_CHECKSUM */
+
+	/* ãããã¯ã¼ã¯ãããã¡é·ãèª¿æ´ããã*/
+	output->len = (uint16_t)(IF_IP_UDP_HDR_SIZE + len);
+
+	/* ãããã¯ã¼ã¯å±¤ (IP) ã®åºåé¢æ°ãå¼ã³åºãã*/
+	if ((error = IP_OUTPUT(output, tmout)) == E_OK) {
+		NET_COUNT_MIB(udp_stats.udpOutDatagrams, 1);
+		cep->snd_tskid = TA_NULL;
+		return len;
+		}
+
+err_ret:
+	NET_COUNT_UDP(net_count_udp.out_err_packets, 1);
+	cep->snd_tskid = TA_NULL;
+	return error;
+	}
+
+#endif	/* of #ifdef __udp_send_data */
+
+/*
+ *  udp_cre_cep -- UDP éä¿¡ç«¯ç¹ã®çæãæ¡å¼µæ©è½ã
+ */
+
+#ifdef __udp_cre_cep
+
+#ifdef UDP_CFG_EXTENTIONS
+
+ER
+UDP_CRE_CEP (ID cepid, T_UDP_CCEP *pk_ccep)
+{
+	T_UDP_CEP	*cep;
+	ER		error;
+
+	/* UDP éä¿¡ç«¯ç¹ ID ããã§ãã¯ããã*/
+	if (!VALID_UDP_CEPID(cepid))
+		return E_ID;
+
+	/* pk_ccep ã NULL ãªãã¨ã©ã¼ */
+	if (pk_ccep == NULL)
+		return E_PAR;
+
+	/* UDP éä¿¡ç«¯ç¹ãå¾ãã*/
+	cep = GET_UDP_CEP(cepid);
+
+	/* UDP éä¿¡ç«¯ç¹ããã§ãã¯ããã*/
+	if (VALID_UDP_CEP(cep))
+		return E_OBJ;
+
+	/* UDP éä¿¡ç«¯ç¹ããåççæç¨ã§ãªããã°ã¨ã©ã¼ */
+	if (!DYNAMIC_UDP_CEP(cep))
+		return E_ID;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	/*
+	 * UDP éä¿¡ç«¯ç¹ããã§ãã¯ãããçææ¸ã¿ã§ããã°ã¨ã©ã¼
+	 */
+	if (VALID_UDP_CEP(cep))
+		error = E_OBJ;
+	else {
+
+		/*
+		 *  èªãã¼ãçªå·ã UDP_PORTANY ãªããèªåã§å²ãå½ã¦ãã
+		 */
+		if (pk_ccep->myaddr.portno == UDP_PORTANY)
+			error = udp_alloc_auto_port(cep);
+		else 
+			error = udp_alloc_port(cep, pk_ccep->myaddr.portno);
+		
+                if (error == E_OK) {
+
+			/* UDP éä¿¡ç«¯ç¹çææ
+å ±ãã³ãã¼ããã*/
+			cep->cepatr        = pk_ccep->cepatr;			/* éä¿¡ç«¯ç¹å±æ§		*/
+			cep->myaddr.ipaddr = pk_ccep->myaddr.ipaddr;		/* èªåã®ã¢ãã¬ã¹	*/
+			cep->callback      = (void*)pk_ccep->callback;		/* ã³ã¼ã«ããã¯		*/
+
+			/* UDP éä¿¡ç«¯ç¹ãçææ¸ã¿ã«ããã*/
+			cep->flags |= UDP_CEP_FLG_VALID;
+			}
+		}
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	return error;
+	}
+
+#endif	/* of #ifdef UDP_CFG_EXTENTIONS */
+
+#endif	/* of #ifdef __udp_cre_cep */
+
+/*
+ *  udp_del_cep -- UDP éä¿¡ç«¯ç¹ã®åé¤ãæ¡å¼µæ©è½ã
+ */
+
+#ifdef __udp_del_cep
+
+#ifdef UDP_CFG_EXTENTIONS
+
+ER
+udp_del_cep (ID cepid)
+{
+	T_UDP_CEP	*cep;
+	ER		error;
+
+	/* UDP éä¿¡ç«¯ç¹ ID ããã§ãã¯ããã*/
+	if (!VALID_UDP_CEPID(cepid))
+		return E_ID;
+
+	/* UDP éä¿¡ç«¯ç¹ãå¾ãã*/
+	cep = GET_UDP_CEP(cepid);
+
+	/* UDP éä¿¡ç«¯ç¹ããã§ãã¯ããã*/
+	if (!VALID_UDP_CEP(cep))
+		return E_NOEXS;
+
+	/* UDP éä¿¡ç«¯ç¹ããåççæç¨ã§ãªããã°ã¨ã©ã¼ */
+	if (!DYNAMIC_UDP_CEP(cep))
+		return E_ID;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	/*
+	 * UDP éä¿¡ç«¯ç¹ããã§ãã¯ãããæªçæã®å ´åã¯ã¨ã©ã¼
+	 * ã»æªçæã
+	 */
+	if (!VALID_UDP_CEP(cep))
+		error = E_NOEXS;
+	else {
+		udp_can_snd(cep, E_DLT);
+		udp_can_rcv(cep, E_DLT);
+
+		/* UDP éä¿¡ç«¯ç¹ãæªçæã«ããã*/
+		cep->flags &= ~UDP_CEP_FLG_VALID;
+		error = E_OK;
+		}
+
+	/* éä¿¡ç«¯ç¹ã®ã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	return error;
+	}
+
+#endif	/* of #ifdef UDP_CFG_EXTENTIONS */
+
+#endif	/* of #ifdef __udp_del_cep */
+
+#ifdef __udp_can_cep
+
+/*
+ *  udp_can_cep -- ãã³ãã£ã³ã°ãã¦ããå¦çã®ã­ã£ã³ã»ã«ãæ¨æºæ©è½ã
+ */
+
+ER
+udp_can_cep (ID cepid, FN fncd)
+{
+	T_UDP_CEP	*cep;
+	ER		error = E_OK, snd_err, rcv_err;
+
+	/* API æ©è½ã³ã¼ãããã§ãã¯ããã*/
+	if (!VALID_TFN_UDP_CAN(fncd))
+		return E_PAR;
+
+	/* UDP éä¿¡ç«¯ç¹ ID ããã§ãã¯ããã*/
+	if (!VALID_UDP_CEPID(cepid))
+		return E_ID;
+
+	/* UDP éä¿¡ç«¯ç¹ãå¾ãã*/
+	cep = GET_UDP_CEP(cepid);
+
+	/* UDP éä¿¡ç«¯ç¹ããã§ãã¯ããã*/
+	if (!VALID_UDP_CEP(cep))
+		return E_NOEXS;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	if (fncd == TFN_UDP_ALL) {	/* TFN_UDP_ALL ã®å¦ç */
+
+		snd_err = udp_can_snd(cep, E_RLWAI);
+		rcv_err = udp_can_rcv(cep, E_RLWAI);
+
+		/*
+		 *  snd_err ã¨ rcv_err ã®ã©ã¡ãã EV_NOPND
+		 *  ãªãããã³ãã£ã³ã°ãã¦ããªãã®ã§ã¨ã©ã¼
+		 */
+		if (snd_err == EV_NOPND && rcv_err == EV_NOPND)
+			error = E_OBJ;
+		else {
+			if (snd_err == EV_NOPND)
+				snd_err = E_OK;
+			if (rcv_err == EV_NOPND)
+				rcv_err = E_OK;
+
+			if (snd_err != E_OK)
+				error = snd_err;
+			else if (rcv_err != E_OK)
+				error = rcv_err;
+			}
+		}
+	else if (fncd == TFN_UDP_SND_DAT) {	/* éä¿¡å¦çã®ã­ã£ã³ã»ã« */
+		if ((error = udp_can_snd(cep, E_RLWAI)) == EV_NOPND)
+			error = E_OBJ;
+		}
+	else if (fncd == TFN_UDP_RCV_DAT) {	/* åä¿¡å¦çã®ã­ã£ã³ã»ã« */
+		if ((error = udp_can_rcv(cep, E_RLWAI)) == EV_NOPND)
+			error = E_OBJ;
+		}
+	else
+		error = E_PAR;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ãè§£é¤ããã*/
+	syscall(sig_sem(cep->semid_lock));
+
+	return error;
+	}
+
+#endif	/* of #ifdef __udp_can_cep */
+
+/*
+ *  udp_set_opt -- UDP éä¿¡ç«¯ç¹ãªãã·ã§ã³ã®è¨­å®ãæ¡å¼µæ©è½ã
+ *
+ *  æ³¨æ: è¨­å®å¯è½ãª UDP éä¿¡ç«¯ç¹ãªãã·ã§ã³ã¯ç¡ããããE_PAR ãè¿ãããã
+ */
+
+#ifdef __udp_set_opt
+
+#ifdef UDP_CFG_EXTENTIONS
+
+ER
+udp_set_opt (ID cepid, int_t optname, void *optval, int_t optlen)
+{
+	T_UDP_CEP	*cep;
+
+	/* UDP éä¿¡ç«¯ç¹ ID ããã§ãã¯ããã*/
+	if (!VALID_UDP_CEPID(cepid))
+		return E_ID;
+
+	/* UDP éä¿¡ç«¯ç¹ãå¾ãã*/
+	cep = GET_UDP_CEP(cepid);
+
+	/* UDP éä¿¡ç«¯ç¹ããã§ãã¯ããã*/
+	if (!VALID_UDP_CEP(cep))
+		return E_NOEXS;
+
+	return E_PAR;
+	}
+
+#endif	/* of #ifdef UDP_CFG_EXTENTIONS */
+
+#endif	/* of #ifdef __udp_set_opt */
+
+/*
+ *  udp_get_opt -- UDP éä¿¡ç«¯ç¹ãªãã·ã§ã³ã®è¨­å®ãæ¡å¼µæ©è½ã
+ *
+ *  æ³¨æ: è¨­å®å¯è½ãª UDP éä¿¡ç«¯ç¹ãªãã·ã§ã³ã¯ç¡ããããE_PAR ãè¿ãããã
+ */
+
+#ifdef __udp_get_opt
+
+#ifdef UDP_CFG_EXTENTIONS
+
+ER
+udp_get_opt (ID cepid, int_t optname, void *optval, int_t optlen)
+{
+	T_UDP_CEP	*cep;
+
+	/* UDP éä¿¡ç«¯ç¹ ID ããã§ãã¯ããã*/
+	if (!VALID_UDP_CEPID(cepid))
+		return E_ID;
+
+	/* UDP éä¿¡ç«¯ç¹ãå¾ãã*/
+	cep = GET_UDP_CEP(cepid);
+
+	/* UDP éä¿¡ç«¯ç¹ããã§ãã¯ããã*/
+	if (!VALID_UDP_CEP(cep))
+		return E_NOEXS;
+
+	return E_PAR;
+	}
+
+#endif	/* of #ifdef UDP_CFG_EXTENTIONS */
+
+#endif	/* of #ifdef __udp_get_opt */
+
+#ifdef UDP_CFG_NON_BLOCKING
+
+#include "udp_usrreq_nblk.c"
+
+#else	/* of #ifdef UDP_CFG_NON_BLOCKING */
+
+#ifdef __udp_can_snd
+
+/*
+ *  udp_can_snd -- ãã³ãã£ã³ã°ãã¦ããéä¿¡ã®ã­ã£ã³ã»ã«
+ */
+
+ER
+udp_can_snd (T_UDP_CEP *cep, ER error)
+{
+	if (cep->snd_tskid != TA_NULL) {	/* éãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸­ */
+
+#ifdef UDP_CFG_EXTENTIONS
+
+		/* å¾
+ã¡ä¸­ã«çºçããã¨ã©ã¼æ
+å ±ãè¨­å®ããã*/
+		cep->error = error;
+
+#endif	/* of #ifdef UDP_CFG_EXTENTIONS */
+
+		error = rel_wai(cep->snd_tskid);
+		cep->snd_tskid = TA_NULL;
+		}
+	else					/* ã©ã¡ãã§ããªããªããã³ãã£ã³ã°ãã¦ããªã */
+		error = EV_NOPND;
+
+	return error;
+	}
+
+#endif	/* of #ifdef __udp_can_snd */
+
+#ifdef __udp_can_rcv
+
+/*
+ *  udp_can_rcv -- ãã³ãã£ã³ã°ãã¦ããåä¿¡ã®ã­ã£ã³ã»ã«
+ */
+
+ER
+udp_can_rcv (T_UDP_CEP *cep, ER error)
+{
+	if (cep->rcv_tskid != TA_NULL) {	/* éãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸­ */
+
+#ifdef UDP_CFG_EXTENTIONS
+
+		/* å¾
+ã¡ä¸­ã«çºçããã¨ã©ã¼æ
+å ±ãè¨­å®ããã*/
+		cep->error = error;
+
+#endif	/* of #ifdef UDP_CFG_EXTENTIONS */
+
+		error = rel_wai(cep->rcv_tskid);
+		cep->rcv_tskid = TA_NULL;
+		}
+	else					/* ã©ã¡ãã§ããªããªããã³ãã£ã³ã°ãã¦ããªã */
+		error = EV_NOPND;
+
+	return error;
+	}
+
+#endif	/* of #ifdef __udp_can_rcv */
+
+#ifdef __udp_snd_dat
+
+/*
+ *  udp_snd_dat -- ãã±ããã®éä¿¡ãæ¨æºæ©è½ã
+ */
+
+ER_UINT
+UDP_SND_DAT (ID cepid, T_IPEP *p_dstaddr, void *data, int_t len, TMO tmout)
+{
+	T_UDP_CEP	*cep;
+	ER		error;
+
+	/* p_dstaddr ã¾ãã¯ data ã NULL ããtmout ã TMO_NBLK ãªãã¨ã©ã¼ */
+	if (p_dstaddr == NULL || data == NULL || tmout == TMO_NBLK)
+		return E_PAR;
+
+	/* ãã¼ã¿é·ããã§ãã¯ããã*/
+	if (len < 0 || len + IP_HDR_SIZE + UDP_HDR_SIZE > IF_MTU)
+		return E_PAR;
+
+	/* UDP éä¿¡ç«¯ç¹ ID ããã§ãã¯ããã*/
+	if (!VALID_UDP_CEPID(cepid))
+		return E_ID;
+
+	/* UDP éä¿¡ç«¯ç¹ãå¾ãã*/
+	cep = GET_UDP_CEP(cepid);
+
+	/* UDP éä¿¡ç«¯ç¹ããã§ãã¯ããã*/
+	if (!VALID_UDP_CEP(cep))
+		return E_NOEXS;
+
+	/*
+	 *  èªãã¼ãçªå·ã UDP_PORTANY ãªããèªåã§å²ãå½ã¦ãã
+	 */
+	if (cep->myaddr.portno == UDP_PORTANY) {
+		if ((error = udp_alloc_auto_port(cep)) != E_OK)
+			return error;
+		}
+	
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	if (cep->snd_tskid != TA_NULL) {
+
+		/* éãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸­ */
+		error = E_QOVR;
+
+		/* éä¿¡ç«¯ç¹ãã­ãã¯ãè§£é¤ããã*/
+		syscall(sig_sem(cep->semid_lock));
+		}
+	else {
+		/* ç¾å¨ã®ã¿ã¹ã¯è­å¥å­ãè¨é²ããã*/
+		get_tid(&(cep->snd_tskid));
+
+#ifdef UDP_CFG_EXTENTIONS
+
+		/* å¾
+ã¡ä¸­ã«çºçããã¨ã©ã¼æ
+å ±ããªã»ããããã*/
+		cep->error = E_OK;
+
+#endif	/* of #ifdef UDP_CFG_EXTENTIONS */
+
+		/* éä¿¡ç«¯ç¹ãã­ãã¯ãè§£é¤ããã*/
+		syscall(sig_sem(cep->semid_lock));
+
+		/* ãã±ãããéä¿¡ããã*/
+		error = udp_send_data(cep, p_dstaddr, data, len, tmout);
+
+#ifdef UDP_CFG_EXTENTIONS
+
+		/* å¾
+ã¡ä¸­ã«çºçããã¨ã©ã¼æ
+å ±ãè¿ãã*/
+		if (error == E_RLWAI)
+			error = cep->error;
+
+#endif	/* of #ifdef UDP_CFG_EXTENTIONS */
+		}
+
+	return error;
+	}
+
+#endif	/* of #ifdef __udp_snd_dat */
+
+#ifdef __udp_rcv_dat
+
+/*
+ *  udp_rcv_dat -- ãã±ããã®åä¿¡ãæ¨æºæ©è½ã
+ */
+
+ER_UINT
+UDP_RCV_DAT (ID cepid, T_IPEP *p_dstaddr, void *data, int_t len, TMO tmout)
+{
+	T_NET_BUF	*input;
+	T_UDP_CEP	*cep;
+	T_UDP_HDR	*udph;
+	ER_UINT		error;
+	uint_t		ulen, uhoff;
+
+	/* p_dstaddr ã¾ãã¯ data ã NULL ãlen < 0 ããtmout ã TMO_NBLK ãªãã¨ã©ã¼ */
+	if (p_dstaddr == NULL || data == NULL || len < 0 || tmout == TMO_NBLK)
+		return E_PAR;
+
+	/* UDP éä¿¡ç«¯ç¹ ID ããã§ãã¯ããã*/
+	if (!VALID_UDP_CEPID(cepid))
+		return E_ID;
+
+	/* UDP éä¿¡ç«¯ç¹ãå¾ãã*/
+	cep = GET_UDP_CEP(cepid);
+
+	/* UDP éä¿¡ç«¯ç¹ããã§ãã¯ããã*/
+	if (!VALID_UDP_CEP(cep))
+		return E_NOEXS;
+
+	/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+	syscall(wai_sem(cep->semid_lock));
+
+	if (cep->rcv_tskid != TA_NULL) {
+
+		/* éãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸­ */
+		error = E_QOVR;
+
+		/* éä¿¡ç«¯ç¹ãã­ãã¯ãè§£é¤ããã*/
+		syscall(sig_sem(cep->semid_lock));
+		}
+	else {
+
+		/* ç¾å¨ã®ã¿ã¹ã¯è­å¥å­ãè¨é²ããã*/
+		get_tid(&(cep->rcv_tskid));
+
+#ifdef UDP_CFG_EXTENTIONS
+
+		/* å¾
+ã¡ä¸­ã«çºçããã¨ã©ã¼æ
+å ±ããªã»ããããã*/
+		cep->error = E_OK;
+
+#endif	/* of #ifdef UDP_CFG_EXTENTIONS */
+
+		/* éä¿¡ç«¯ç¹ãã­ãã¯ãè§£é¤ããã*/
+		syscall(sig_sem(cep->semid_lock));
+
+		/* å
+¥åãããã¾ã§å¾
+ã¤ã*/
+		if (cep->cb_netbuf != NULL) {
+
+			/*
+			 *  ããã«ããå ´åã¯ãã³ã¼ã«ããã¯é¢æ°ã®ä¸­ãã
+			 *  udp_rcv_dat ãå¼ã³åºãã¦ãããã¨ã«ãªãã
+			 *  ãã§ã«å
+¥åæ¸ã¿ã§ããã
+			 */
+			input = cep->cb_netbuf;
+			cep->cb_netbuf = NULL;
+			}
+		else if ((error = trcv_dtq(cep->rcvqid, (intptr_t*)&input, tmout)) != E_OK) {
+
+#ifdef UDP_CFG_EXTENTIONS
+
+			/* å¾
+ã¡ä¸­ã«çºçããã¨ã©ã¼æ
+å ±ãè¿ãã*/
+			if (error == E_RLWAI)
+				error = cep->error;
+
+#endif	/* of #ifdef UDP_CFG_EXTENTIONS */
+
+			cep->rcv_tskid = TA_NULL;
+			return error;
+			}
+
+		/* p_dstaddr ãè¨­å®ããã*/
+		uhoff = (uint_t)GET_UDP_HDR_OFFSET(input);
+		udph = GET_UDP_HDR(input, uhoff);
+		p_dstaddr->portno = ntohs(udph->sport);
+		IN_COPY_TO_HOST(&p_dstaddr->ipaddr, &GET_IP_HDR(input)->src);
+
+		/* ãã¼ã¿ããããã¡ã«ç§»ãã*/
+		ulen = ntohs(udph->ulen);
+		if (ulen - UDP_HDR_SIZE > len)
+			error = E_BOVR;
+		else {
+			len   =    (uint_t)(ulen - UDP_HDR_SIZE);
+			error = (ER_UINT)(ulen - UDP_HDR_SIZE);
+			}
+
+		memcpy(data, GET_UDP_SDU(input, uhoff), (size_t)len);
+
+		syscall(rel_net_buf(input));
+
+		cep->rcv_tskid = TA_NULL;
+		}
+
+	return error;
+	}
+
+#endif	/* of #ifdef __udp_rcv_dat */
+
+#endif	/* of #ifdef UDP_CFG_NON_BLOCKING */
+
+#endif	/* of #ifdef SUPPORT_UDP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp_usrreq_nblk.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp_usrreq_nblk.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp_usrreq_nblk.c	(revision 270)
@@ -0,0 +1,513 @@
+/*
+ *  TINET (UDP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must ceproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)udp_usrreq.c	8.6 (Berkeley) 5/23/95
+ * $FreeBSD: src/sys/netinet/udp_usrreq.c,v 1.49.2.2 1999/08/29 16:29:58 peter Exp $
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+#include <net/ppp_ipcp.h>
+
+#include <netinet/in.h>
+#include <netinet6/in6.h>
+#include <netinet/in_var.h>
+#include <netinet/in_itron.h>
+#include <netinet/ip.h>
+#include <netinet/ip_var.h>
+#include <netinet/ip_icmp.h>
+#include <netinet6/in6_var.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet/icmp6.h>
+#include <netinet/udp.h>
+#include <netinet/udp_var.h>
+
+#ifdef SUPPORT_UDP
+
+/*
+ *  IPv4 ã¨ IPv6 ã®åãæ¿ããã¯ã­
+ */
+
+#if defined(SUPPORT_INET4)
+
+#define UDP_SND_DAT	udp_snd_dat
+#define UDP_RCV_DAT	udp_rcv_dat
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+#if defined(SUPPORT_INET6)
+
+#define UDP_SND_DAT	udp6_snd_dat
+#define UDP_RCV_DAT	udp6_rcv_dat
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+/*
+ *  TINET ãã©ã¤ãã©ãªåããªãå ´åã¯ãå
+¨ã¦ã®æ©è½ã
+ *  ãªãã¸ã§ã¯ããã¡ã¤ã«ã«åºåããããããã¯ã­ãæå¹ã«ããã
+ */
+
+#ifndef UDP_CFG_LIBRARY
+
+#define __udp_can_snd
+#define __udp_can_rcv
+#define __udp_snd_dat
+#define __udp_rcv_dat
+
+#endif	/* of #ifndef UDP_CFG_LIBRARY */
+
+#ifdef UDP_CFG_NON_BLOCKING
+
+#ifdef __udp_can_snd
+
+/*
+ *  udp_can_snd -- ãã³ãã£ã³ã°ãã¦ããéä¿¡ã®ã­ã£ã³ã»ã«
+ */
+
+ER
+udp_can_snd (T_UDP_CEP *cep, ER error)
+{
+	if (cep->snd_p_dstaddr != NULL) {	/* ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸­ */
+		if (IS_PTR_DEFINED(cep->callback))
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+			(*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_SND_DAT, (void*)error);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			(*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_SND_DAT, (void*)&error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+		else
+			error = E_OBJ;
+		cep->snd_p_dstaddr = NULL;
+		}
+	else if (cep->snd_tskid != TA_NULL) {	/* éãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸­ */
+
+#ifdef UDP_CFG_EXTENTIONS
+
+		/* å¾
+ã¡ä¸­ã«çºçããã¨ã©ã¼æ
+å ±ãè¨­å®ããã*/
+		cep->error = error;
+
+#endif	/* of #ifdef UDP_CFG_EXTENTIONS */
+
+		error = rel_wai(cep->snd_tskid);
+		cep->snd_tskid = TA_NULL;
+		}
+	else					/* ã©ã¡ãã§ããªããªããã³ãã£ã³ã°ãã¦ããªã */
+		error = EV_NOPND;
+
+	return error;
+	}
+
+#endif	/* of #ifdef __udp_can_snd */
+
+#ifdef __udp_can_rcv
+
+/*
+ *  udp_can_rcv -- ãã³ãã£ã³ã°ãã¦ããåä¿¡ã®ã­ã£ã³ã»ã«
+ */
+
+ER
+udp_can_rcv (T_UDP_CEP *cep, ER error)
+{
+	if (cep->rcv_p_dstaddr != NULL) {	/* ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸­ */
+		if (IS_PTR_DEFINED(cep->callback))
+
+#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
+
+			(*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)error);
+
+#else	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+			(*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)&error);
+
+#endif	/* of #ifdef TCP_CFG_NON_BLOCKING_COMPAT14 */
+
+		else
+			error = E_OBJ;
+		cep->rcv_p_dstaddr = NULL;
+		}
+	else if (cep->rcv_tskid != TA_NULL) {	/* éãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸­ */
+
+#ifdef UDP_CFG_EXTENTIONS
+
+		/* å¾
+ã¡ä¸­ã«çºçããã¨ã©ã¼æ
+å ±ãè¨­å®ããã*/
+		cep->error = error;
+
+#endif	/* of #ifdef UDP_CFG_EXTENTIONS */
+
+		error = rel_wai(cep->rcv_tskid);
+		cep->rcv_tskid = TA_NULL;
+		}
+	else					/* ã©ã¡ãã§ããªããªããã³ãã£ã³ã°ãã¦ããªã */
+		error = EV_NOPND;
+
+	return error;
+	}
+
+#endif	/* of #ifdef __udp_can_rcv */
+
+#ifdef __udp_snd_dat
+
+/*
+ *  udp_snd_dat -- ãã±ããã®éä¿¡ãæ¨æºæ©è½ã
+ */
+
+ER_UINT
+UDP_SND_DAT (ID cepid, T_IPEP *p_dstaddr, void *data, int_t len, TMO tmout)
+{
+	T_UDP_CEP	*cep;
+	ER		error;
+
+	/* p_dstaddr ã¾ãã¯ data ã NULL ãªãã¨ã©ã¼ */
+	if (p_dstaddr == NULL || data == NULL)
+		return E_PAR;
+
+	/* ãã¼ã¿é·ããã§ãã¯ããã*/
+	if (len < 0 || len + IP_HDR_SIZE + UDP_HDR_SIZE > IF_MTU)
+		return E_PAR;
+
+	/* UDP éä¿¡ç«¯ç¹ ID ããã§ãã¯ããã*/
+	if (!VALID_UDP_CEPID(cepid))
+		return E_ID;
+
+	/* UDP éä¿¡ç«¯ç¹ãå¾ãã*/
+	cep = GET_UDP_CEP(cepid);
+
+	/* UDP éä¿¡ç«¯ç¹ããã§ãã¯ããã*/
+	if (!VALID_UDP_CEP(cep))
+		return E_NOEXS;
+
+	/*
+	 *  èªãã¼ãçªå·ã UDP_PORTANY ãªããèªåã§å²ãå½ã¦ãã
+	 */
+	if (cep->myaddr.portno == UDP_PORTANY) {
+		if ((error = udp_alloc_auto_port(cep)) != E_OK)
+			return error;
+		}
+
+	/*
+	 * ã¿ã¤ã ã¢ã¦ãããã§ãã¯ããã
+	 */
+
+	if (tmout == TMO_NBLK) {	/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+		/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+		syscall(wai_sem(cep->semid_lock));
+
+		if (cep->snd_p_dstaddr != NULL) {
+
+			/* ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸­ */
+			error = E_QOVR;
+
+			/* éä¿¡ç«¯ç¹ãã­ãã¯ãè§£é¤ããã*/
+			syscall(sig_sem(cep->semid_lock));
+			}
+		else if (cep->snd_tskid != TA_NULL) {
+
+			/* éãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸­ */
+			error = E_OBJ;
+
+			/* éä¿¡ç«¯ç¹ãã­ãã¯ãè§£é¤ããã*/
+			syscall(sig_sem(cep->semid_lock));
+			}
+		else {
+
+			cep->snd_p_dstaddr = p_dstaddr;
+			cep->snd_data	= data;
+			cep->snd_len	= len;
+
+			/* éä¿¡ç«¯ç¹ãã­ãã¯ãè§£é¤ããã*/
+			syscall(sig_sem(cep->semid_lock));
+
+			cep->flags |= UDP_CEP_FLG_POST_OUTPUT;
+			sig_sem(SEM_UDP_POST_OUTPUT);
+			error = E_WBLK;
+			}
+		}
+	else {				/* éãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+	
+		/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+		syscall(wai_sem(cep->semid_lock));
+
+		if (cep->snd_p_dstaddr != NULL) {
+
+			/* ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸­ */
+			error = E_OBJ;
+
+			/* éä¿¡ç«¯ç¹ãã­ãã¯ãè§£é¤ããã*/
+			syscall(sig_sem(cep->semid_lock));
+			}
+		else if (cep->snd_tskid != TA_NULL) {
+
+			/* éãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸­ */
+			error = E_QOVR;
+
+			/* éä¿¡ç«¯ç¹ãã­ãã¯ãè§£é¤ããã*/
+			syscall(sig_sem(cep->semid_lock));
+			}
+		else {
+
+			/* ç¾å¨ã®ã¿ã¹ã¯è­å¥å­ãè¨é²ããã*/
+			get_tid(&(cep->snd_tskid));
+
+			/* éä¿¡ç«¯ç¹ãã­ãã¯ãè§£é¤ããã*/
+			syscall(sig_sem(cep->semid_lock));
+
+			/* ãã±ãããéä¿¡ããã*/
+			error = udp_send_data(cep, p_dstaddr, data, len, tmout);
+			}
+		}
+
+	return error;
+	}
+
+#endif	/* of #ifdef __udp_snd_dat */
+
+#ifdef __udp_rcv_dat
+
+/*
+ *  udp_rcv_dat -- ãã±ããã®åä¿¡ãæ¨æºæ©è½ã
+ */
+
+ER_UINT
+UDP_RCV_DAT (ID cepid, T_IPEP *p_dstaddr, void *data, int_t len, TMO tmout)
+{
+	T_NET_BUF	*input;
+	T_UDP_CEP	*cep;
+	T_UDP_HDR	*udph;
+	ER_UINT		error;
+	uint_t		ulen, uhoff;
+
+	/* p_dstaddr ã¾ãã¯ data ã NULL ããlen < 0 ãªãã¨ã©ã¼ */
+	if (p_dstaddr == NULL || data == NULL || len < 0)
+		return E_PAR;
+
+	/* UDP éä¿¡ç«¯ç¹ ID ããã§ãã¯ããã*/
+	if (!VALID_UDP_CEPID(cepid))
+		return E_ID;
+
+	/* UDP éä¿¡ç«¯ç¹ãå¾ãã*/
+	cep = GET_UDP_CEP(cepid);
+
+	/* UDP éä¿¡ç«¯ç¹ããã§ãã¯ããã*/
+	if (!VALID_UDP_CEP(cep))
+		return E_NOEXS;
+
+	/*
+	 * ã¿ã¤ã ã¢ã¦ãããã§ãã¯ããã
+	 */
+
+	if (tmout == TMO_NBLK) {	/* ãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+		/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+		syscall(wai_sem(cep->semid_lock));
+
+		if (cep->rcv_p_dstaddr != NULL)
+
+			/* ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸­ */
+			error = E_QOVR;
+
+		else if (cep->rcv_tskid != TA_NULL)
+
+			/* éãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸­ */
+			error = E_OBJ;
+		else {
+			cep->rcv_p_dstaddr = p_dstaddr;
+			cep->rcv_data	= data;
+			cep->rcv_len	= len;
+			error = E_WBLK;
+			}
+
+		/* éä¿¡ç«¯ç¹ãã­ãã¯ãè§£é¤ããã*/
+		syscall(sig_sem(cep->semid_lock));
+		return error;
+		}
+	else {				/* éãã³ãã­ãã­ã³ã°ã³ã¼ã« */
+
+		/* éä¿¡ç«¯ç¹ãã­ãã¯ããã*/
+		syscall(wai_sem(cep->semid_lock));
+
+		if (cep->rcv_p_dstaddr != NULL) {
+
+			/* ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸­ */
+			error = E_OBJ;
+
+			/* éä¿¡ç«¯ç¹ãã­ãã¯ãè§£é¤ããã*/
+			syscall(sig_sem(cep->semid_lock));
+			}
+		else if (cep->rcv_tskid != TA_NULL) {
+
+			/* éãã³ãã­ãã­ã³ã°ã³ã¼ã«ã§ãã³ãã£ã³ã°ä¸­ */
+			error = E_QOVR;
+
+			/* éä¿¡ç«¯ç¹ãã­ãã¯ãè§£é¤ããã*/
+			syscall(sig_sem(cep->semid_lock));
+			}
+		else {
+
+			/* ç¾å¨ã®ã¿ã¹ã¯è­å¥å­ãè¨é²ããã*/
+			get_tid(&(cep->rcv_tskid));
+
+			/* éä¿¡ç«¯ç¹ãã­ãã¯ãè§£é¤ããã*/
+			syscall(sig_sem(cep->semid_lock));
+
+			/* å
+¥åãããã¾ã§å¾
+ã¤ã*/
+			if (cep->cb_netbuf != NULL) {
+
+				/*
+				 *  ããã«ããå ´åã¯ãã³ã¼ã«ããã¯é¢æ°ã®ä¸­ãã
+				 *  udp_rcv_dat ãå¼ã³åºãã¦ãããã¨ã«ãªãã
+				 *  ãã§ã«å
+¥åæ¸ã¿ã§ããã
+				 */
+				input = cep->cb_netbuf;
+				cep->cb_netbuf = NULL;
+				}
+			else if ((error = trcv_dtq(cep->rcvqid, (intptr_t*)&input, tmout)) != E_OK) {
+				cep->rcv_tskid = TA_NULL;
+				return error;
+				}
+
+			/* p_dstaddr ãè¨­å®ããã*/
+			uhoff = (uint_t)GET_UDP_HDR_OFFSET(input);
+			udph = GET_UDP_HDR(input, uhoff);
+			p_dstaddr->portno = ntohs(udph->sport);
+			IN_COPY_TO_HOST(&p_dstaddr->ipaddr, &GET_IP_HDR(input)->src);
+
+			/* ãã¼ã¿ããããã¡ã«ç§»ãã*/
+			ulen = ntohs(udph->ulen);
+			if (ulen - UDP_HDR_SIZE > len)
+				error = E_BOVR;
+			else {
+				len   =     (int_t)(ulen - UDP_HDR_SIZE);
+				error = (ER_UINT)(ulen - UDP_HDR_SIZE);
+				}
+
+			memcpy(data, GET_UDP_SDU(input, uhoff), (size_t)len);
+
+			syscall(rel_net_buf(input));
+
+			cep->rcv_tskid = TA_NULL;
+			}
+		return error;
+		}
+	}
+
+#endif	/* of #ifdef __udp_rcv_dat */
+
+#endif	/* of #ifdef UDP_CFG_NON_BLOCKING */
+
+#endif	/* of #ifdef SUPPORT_UDP */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp_var.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp_var.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet/udp_var.h	(revision 270)
@@ -0,0 +1,303 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)udp_var.h	8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/netinet/udp_var.h,v 1.16.2.2 1999/08/29 16:29:59 peter Exp $
+ */
+ 
+#ifndef _UDP_VAR_H_
+#define _UDP_VAR_H_
+
+/*
+ *  UDP ãããã»ãã¤ã­ã¼ãã¢ã¯ã»ã¹ãã¯ã­
+ */
+
+#define IP_UDP_HDR_SIZE			(IP_HDR_SIZE + UDP_HDR_SIZE)
+#define IF_IP_UDP_HDR_SIZE		(IF_IP_HDR_SIZE + UDP_HDR_SIZE)
+#define IF_IP_UDP_HDR_OFFSET		(IF_IP_HDR_SIZE)
+
+#define GET_UDP_HDR(nbuf,uhoff)		((T_UDP_HDR*)((uint8_t*)((nbuf)->buf) + uhoff))
+#define GET_UDP_SDU(nbuf,uhoff)		((uint8_t*)((nbuf)->buf) + uhoff+ UDP_HDR_SIZE)
+
+#define GET_UDP_HDR_OFFSET(nbuf)	(GET_IF_IP_HDR_SIZE(nbuf))
+
+#define GET_IP_UDP_HDR_SIZE(nbuf)	(GET_IP_HDR_SIZE(GET_IP_HDR(nbuf)) + UDP_HDR_SIZE)
+#define GET_IF_IP_UDP_HDR_SIZE(nbuf)	(IF_HDR_SIZE + GET_IP_UDP_HDR_SIZE(nbuf))
+
+/*
+ *  TINET 1.1 ã¨ã®äºææ§ã®ããã®å®ç¾©
+ */
+
+#if defined(SUPPORT_INET4)
+
+#define IP4_UDP_HDR_SIZE		IP_UDP_HDR_SIZE
+#define IF_IP4_UDP_HDR_SIZE		IF_IP_UDP_HDR_SIZE
+#define GET_IP4_UDP_HDR_SIZE(nbuf)	GET_IP_UDP_HDR_SIZE(nbuf)	
+#define GET_IF_IP4_UDP_HDR_SIZE(nbuf)	GET_IF_IP_UDP_HDR_SIZE(nbuf)
+
+#endif	/* of #if defined(SUPPORT_INET4) */
+
+/*
+ *  ã³ã¼ã«ããã¯é¢æ°ã®å®ç¾©
+ */
+
+typedef ER	(*t_udp_callback)(ID cepid, FN fncd, void *p_parblk);
+
+/*
+ *  UDP éä¿¡ç«¯ç¹
+ */
+
+
+/*
+ *  IPv4 UDP éä¿¡ç«¯ç¹
+ */
+typedef struct t_udp4_cep {
+
+	/*
+	 * ITRON TCP/IP APIãTCP éä¿¡ç«¯ç¹ã¨åãã¡ã³ã
+	 */
+	ATR		cepatr;		/* UDP éä¿¡ç«¯ç¹å±æ§		*/
+	T_IPV4EP	myaddr;		/* èªåã®ã¢ãã¬ã¹		*/
+	t_udp_callback	callback;	/* ã³ã¼ã«ããã¯é¢æ°		*/
+
+	/*
+	 * TINET ç¬èªã®ã¡ã³ã
+	 */
+	uint16_t	flags;		/* éä¿¡ç«¯ç¹ãã©ã°		*/
+	ID		semid_lock;	/* éä¿¡ç«¯ç¹ã­ãã¯		*/
+	ID		snd_tskid;	/* éä¿¡ã¿ã¹ã¯è­å¥å­		*/
+	ID		rcv_tskid;	/* åä¿¡ã¿ã¹ã¯è­å¥å­		*/
+	ID		rcvqid;		/* éã³ã¼ã«ããã¯ç¨åä¿¡ã­ã¥ã¼è­å¥å­*/
+	T_NET_BUF	*cb_netbuf;	/* ã³ã¼ã«ããã¯ç¨åä¿¡ãããã¯ã¼ã¯ãããã¡*/
+
+#ifdef UDP_CFG_NON_BLOCKING
+
+	T_IPV4EP 	*snd_p_dstaddr;	/* éä¿¡ç¸æã®ã¢ãã¬ã¹ã¸ã®ãã¤ã³ã¿*/
+	T_IPV4EP 	*rcv_p_dstaddr;	/* åä¿¡ç¸æã®ã¢ãã¬ã¹ã¸ã®ãã¤ã³ã¿*/
+	void		*snd_data;	/* éä¿¡ãã¼ã¿é åã®å
+é ­ã¢ãã¬ã¹	*/
+	int_t		snd_len;	/* éä¿¡ãã¼ã¿é åã®é·ã		*/
+	void		*rcv_data;	/* åä¿¡ãã¼ã¿é åã®å
+é ­ã¢ãã¬ã¹	*/
+	int_t		rcv_len;	/* åä¿¡ãã¼ã¿é åã®é·ã		*/
+
+#endif	/* of #ifdef UDP_CFG_NON_BLOCKING */
+
+#ifdef UDP_CFG_EXTENTIONS
+	ER		error;		/* å¾
+ã¡ä¸­ã«çºçããã¨ã©ã¼	*/
+#endif
+
+	} T_UDP4_CEP;
+
+#if defined(SUPPORT_INET4)
+#define T_UDP_CEP	T_UDP4_CEP
+#endif
+
+/*
+ *  IPv6 UDP éä¿¡ç«¯ç¹
+ */
+
+typedef struct t_udp6_cep {
+
+	/*
+	 * ITRON TCP/IP APIãTCP éä¿¡ç«¯ç¹ã¨åãã¡ã³ã
+	 */
+	ATR		cepatr;		/* UDP éä¿¡ç«¯ç¹å±æ§		*/
+	T_IPV6EP	myaddr;		/* èªåã®ã¢ãã¬ã¹		*/
+	t_udp_callback	callback;	/* ã³ã¼ã«ããã¯é¢æ°		*/
+
+	/*
+	 * TINET ç¬èªã®ã¡ã³ã
+	 */
+	uint16_t	flags;		/* éä¿¡ç«¯ç¹ãã©ã°		*/
+	ID		semid_lock;	/* éä¿¡ç«¯ç¹ã­ãã¯		*/
+	ID		snd_tskid;	/* éä¿¡ã¿ã¹ã¯è­å¥å­		*/
+	ID		rcv_tskid;	/* åä¿¡ã¿ã¹ã¯è­å¥å­		*/
+	ID		rcvqid;		/* éã³ã¼ã«ããã¯ç¨åä¿¡ã­ã¥ã¼è­å¥å­*/
+	T_NET_BUF	*cb_netbuf;	/* ã³ã¼ã«ããã¯ç¨åä¿¡ãããã¯ã¼ã¯ãããã¡*/
+
+#ifdef UDP_CFG_NON_BLOCKING
+
+	T_IPV6EP 	*snd_p_dstaddr;	/* éä¿¡ç¸æã®ã¢ãã¬ã¹ã¸ã®ãã¤ã³ã¿*/
+	T_IPV6EP 	*rcv_p_dstaddr;	/* åä¿¡ç¸æã®ã¢ãã¬ã¹ã¸ã®ãã¤ã³ã¿*/
+	void		*snd_data;	/* éä¿¡ãã¼ã¿é åã®å
+é ­ã¢ãã¬ã¹	*/
+	int_t		snd_len;	/* éä¿¡ãã¼ã¿é åã®é·ã		*/
+	void		*rcv_data;	/* åä¿¡ãã¼ã¿é åã®å
+é ­ã¢ãã¬ã¹	*/
+	int_t		rcv_len;	/* åä¿¡ãã¼ã¿é åã®é·ã		*/
+
+#endif	/* of #ifdef UDP_CFG_NON_BLOCKING */
+
+#ifdef UDP_CFG_EXTENTIONS
+	ER		error;		/* å¾
+ã¡ä¸­ã«çºçããã¨ã©ã¼	*/
+#endif
+
+	} T_UDP6_CEP;
+
+#if defined(SUPPORT_INET6)
+#define T_UDP_CEP	T_UDP6_CEP
+#endif
+
+/*
+ *  UDP éä¿¡ç«¯ç¹ãã©ã°
+ */
+
+#define UDP_CEP_FLG_POST_OUTPUT	UINT_C(0x0200)	/* éä¿¡ãéå§ããã		*/
+#define UDP_CEP_FLG_DYNAMIC	UINT_C(0x0400)	/* åççæã»åé¤å¯è½éä¿¡ç«¯ç¹ã	*/
+#define UDP_CEP_FLG_VALID	UINT_C(0x0800)	/* çææ¸ã¿ã§æå¹ãªéä¿¡ç«¯ç¹ã	*/
+
+/*
+ *  ãªãã¸ã§ã¯ã ID ã®æå°å¤ã®å®ç¾©
+ */
+
+#define	TMIN_UDP_CEPID		1	/* UDP éä¿¡ç«¯ç¹ ID ã®æå°å¤ */
+
+#ifdef SUPPORT_MIB
+
+/*
+ *  SNMP ã® ç®¡çæ
+å ±ãã¼ã¹ (MIB)
+ */
+
+typedef struct t_udp_stats {
+	uint32_t	udpInDatagrams;
+	uint32_t	udpNoPorts;
+	uint32_t	udpInErrors;
+	uint32_t	udpOutDatagrams;
+} T_UDP_STATS;
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+/*
+ *  é¢æ°ã·ãã¥ã¬ã¼ã·ã§ã³ãã¯ã­
+ */
+
+#define VALID_UDP_CEPID(id)	(TMIN_UDP_CEPID<=(id)&&(id)<=tmax_udp_cepid)
+
+#define INDEX_UDP_CEP(id)	((id)-TMIN_UDP_CEPID)
+
+#define GET_UDP_CEP(id)		(&(udp_cep[INDEX_UDP_CEP(id)]))
+
+#define GET_UDP_CEPID(cep)	((ID)(((cep)-udp_cep)+TMIN_UDP_CEPID))
+
+#define VALID_TFN_UDP_CAN(t)	((t)==TFN_UDP_SND_DAT||(t)==TFN_UDP_RCV_DAT||\
+				 (t)==TFN_UDP_ALL)
+
+#define VALID_UDP_CEP(cep)	(((cep)->flags&UDP_CEP_FLG_VALID)!=0)
+#define DYNAMIC_UDP_CEP(cep)	(((cep)->flags&UDP_CEP_FLG_DYNAMIC)!=0)
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+extern T_UDP_CEP udp_cep[];
+extern const ID tmax_udp_cepid;
+
+#ifdef SUPPORT_MIB
+
+extern T_UDP_STATS udp_stats;
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+/*
+ *  TINET 1.3 ã¨ã®äºææ§ã®ããã®å®ç¾©
+ */
+
+#define	TMIN_UDP_CCEPID		TMIN_UDP_CEPID
+#define	TNUM_UDP_CCEPID		TNUM_UDP_CEPID
+
+/*
+ *  é¢æ°
+ */
+
+extern uint_t udp_input (T_NET_BUF **inputp, uint_t *offp, uint_t *nextp);
+extern ER_UINT udp_send_data (T_UDP_CEP *cep, T_IPEP *p_dstaddr,
+                              void *data, int_t len, TMO tmout);
+extern ER udp_can_snd (T_UDP_CEP *cep, ER error);
+extern ER udp_can_rcv (T_UDP_CEP *cep, ER error);
+extern ER udp_alloc_auto_port (T_UDP_CEP *cep);
+extern ER udp_alloc_port (T_UDP_CEP *cep, uint16_t portno);
+
+/* ãã³ãã­ãã­ã³ã°ã³ã¼ã«ãè¡ãå ´åã«çµã¿è¾¼ãã¿ã¹ã¯ */
+
+extern void	udp_output_task(intptr_t exinf);
+
+#endif	/* of #ifndef _UDP_VAR_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ah.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ah.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ah.h	(revision 270)
@@ -0,0 +1,99 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/ah.h,v 1.7 2002/04/19 04:46:22 suz Exp $	*/
+/*	$KAME: ah.h,v 1.16 2001/09/04 08:43:19 itojun Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+ 
+#ifndef _AH_H_
+#define _AH_H_
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  RFC2402 èªè¨¼ããã
+ */
+
+typedef struct t_ip6_ah_hdr {
+	uint8_t		next;	/* Next Header				*/
+	uint8_t		len;	
+	/* 4 ãªã¯ãããåä½ã®é·ãããã ãããã¼ã¿é· + 1 ãå
+¥ãã	*/
+	uint16_t	reserved;
+	uint32_t	spi;	/* Security Parameter Index (SPI)	*/
+	uint32_t	seq;	/* ã·ã¼ã±ã³ã¹çªå·			*/
+	} __attribute__((packed, aligned(2)))T_IP6_AH_HDR;
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef _AH_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ah6.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ah6.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ah6.h	(revision 270)
@@ -0,0 +1,91 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/ah6.h,v 1.4 2001/06/11 12:39:03 ume Exp $	*/
+/*	$KAME: ah.h,v 1.13 2000/10/18 21:28:00 itojun Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+ 
+#ifndef _AH6_H_
+#define _AH6_H_
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  é¢æ°
+ */
+
+extern uint_t ah6_input (T_NET_BUF **inputp, uint_t *offp, uint_t *nextp);
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef _AH6_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ah_input.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ah_input.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ah_input.c	(revision 270)
@@ -0,0 +1,132 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/ah_input.c,v 1.12 2002/04/19 04:46:22 suz Exp $	*/
+/*	$KAME: ah_input.c,v 1.67 2002/01/07 11:39:56 kjc Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/net.h>
+#include <net/if.h>
+#include <net/if_loop.h>
+#include <net/if_ppp.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/ppp_ipcp.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet/icmp6.h>
+#include <netinet6/ah.h>
+#include <netinet6/ah6.h>
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  ah6_input -- èªè¨¼ãããã®å
+¥åé¢æ°
+ *
+ *    æ¬å®è£
+ã§ã¯ããã¼ã¿ã°ã©ã ãç ´æ£ããã
+ */
+
+uint_t
+ah6_input (T_NET_BUF **input, uint_t *offp, uint_t *nextp)
+{
+	syscall(rel_net_buf(*input));
+	return IPPROTO_DONE;
+	}
+
+#endif /* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/dest6.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/dest6.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/dest6.c	(revision 270)
@@ -0,0 +1,180 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/dest6.c,v 1.7 2002/04/19 04:46:22 suz Exp $	*/
+/*	$KAME: dest6.c,v 1.34 2002/01/08 02:40:55 k-sugyou Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_loop.h>
+#include <net/if_ppp.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet/icmp6.h>
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  dest6_input -- çµç¹ãªãã·ã§ã³ãããã®å
+¥åé¢æ°
+ *
+ *    æ¬å®è£
+ã§ã¯ãããã£ã³ã°ä»¥å¤ã®ãªãã·ã§ã³ãå
+¨ã¦æªç¥ãªãã·ã§ã³ã¨ãã¦å¦çããã
+ */
+
+uint_t
+dest6_input (T_NET_BUF **inputp, uint_t *offp, uint_t *nextp)
+{
+	T_NET_BUF	*input = *inputp;
+	T_IP6_DEST_HDR	*desth;
+	ER_UINT		optlen;
+	uint_t		len, off = *offp;
+	uint8_t		*opt;
+
+	/* ãããã¯ã¼ã¯ãããã¡ã®æ®ãã®é·ãããã§ãã¯ããã*/
+	if (input->len - off < sizeof(T_IP6_DEST_HDR))
+		goto buf_rel;
+
+	desth  = (T_IP6_DEST_HDR *)(input->buf + off);
+	len    = (desth->len + 1) << 3;
+
+	/* çµç¹ãªãã·ã§ã³ãããã®é·ãããã§ãã¯ããã*/
+	if (input->len < off + len)
+		goto buf_rel;
+
+	*nextp = *offp - IF_HDR_SIZE + offsetof(T_IP6_DEST_HDR, next);
+	*offp += len;
+	opt    = (uint8_t *)desth + sizeof(T_IP6_DEST_HDR);
+
+	for (len -= sizeof(T_IP6_DEST_HDR); len > 0; len -= optlen) {
+		switch (*opt) {
+		case IP6OPT_PAD1:
+			optlen = 1;
+			break;
+		case IP6OPT_PADN:
+			if (len < IP6OPT_MINLEN)
+				goto buf_rel;
+			optlen = *(opt + 1) + 2;
+			break;
+		default:
+			if (len < IP6OPT_MINLEN)
+				goto buf_rel;
+			optlen = ip6_unknown_opt(input, opt);
+			if (optlen == IP6_OPT_RET_ERR)
+				goto buf_rel;
+			else if (optlen == IP6_OPT_RET_REL)
+				return IPPROTO_DONE;
+			optlen += 2;
+			break;
+			}
+
+		opt += optlen;
+		}
+
+	return desth->next;
+
+buf_rel:
+	syscall(rel_net_buf(input));
+	return IPPROTO_DONE;
+	}
+
+#endif /* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/esp.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/esp.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/esp.h	(revision 270)
@@ -0,0 +1,145 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *  Copyright (C) 2008-2009 by Hokkaido Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/esp.h,v 1.6 2002/04/19 04:46:22 suz Exp $	*/
+/*	$KAME: esp.h,v 1.19 2001/09/04 08:43:19 itojun Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+ 
+#ifndef _ESP_H_
+#define _ESP_H_
+
+#if defined(SUPPORT_INET6) || defined(SUPPORT_IPSEC)
+
+/*
+ *  RFC2406 æå·åããã
+ */
+
+typedef struct t_esp_hdr {
+	int32_t	spi;	/* Security Parameter Index (SPI)	*/
+	int32_t	seq;	/* ã·ã¼ã±ã³ã¹çªå·			*/
+	} __attribute__((packed, aligned(2)))T_ESP_HDR;
+
+typedef struct t_esp_tail {
+	int8_t	padlen;	/* ããã£ã³ã°é·				*/	
+	int8_t	next;	/* Next Header				*/
+	} __attribute__((packed, aligned(2)))T_ESP_TAIL;
+
+struct t_secas_var;
+
+struct t_esp_algorithm {
+	size_t padbound;	/* pad boundary, in byte */
+	int_t ivlenval;		/* iv length, in byte */
+	int_t (*mature) (struct t_secas_var *);
+	int_t keymin;	/* in bits */
+	int_t keymax;	/* in bits */
+	//int_t (*schedlen) (const struct t_esp_algorithm *);
+	int32_t (*schedlen) (const struct t_esp_algorithm *);
+	const char *name;
+	int_t (*ivlen) (const struct t_esp_algorithm *, struct t_secas_var *);
+	int_t (*decrypt) (T_NET_BUF *, size_t,
+		struct t_secas_var *, const struct t_esp_algorithm *, int_t,
+			T_NET_BUF *, size_t);
+	int_t (*encrypt) (T_NET_BUF *, size_t, size_t, int8_t*,
+		struct t_secas_var *, const struct t_esp_algorithm *, int_t,
+			T_NET_BUF *, size_t);
+	/* not supposed to be called directly */
+	int_t (*schedule) (const struct t_esp_algorithm *, struct t_secas_var *);
+	int_t (*blockdecrypt) (const struct t_esp_algorithm *,
+		struct t_secas_var *, int8_t *, int8_t *);
+	int_t (*blockencrypt) (const struct t_esp_algorithm *,
+		struct t_secas_var *, int8_t *, int8_t *);
+};
+
+typedef struct t_esp_algorithm T_ESP_ALGORITHM;
+
+#define MAXIVLEN	16
+
+/*
+ * é¢æ°
+ */
+
+extern const struct t_esp_algorithm *esp_algorithm_lookup (int_t);
+extern int_t esp_max_ivlen (void);
+extern int_t esp_schedule (const struct t_esp_algorithm *, struct t_secas_var *);
+extern int_t esp4_input(T_NET_BUF **inputp, uint_t *offp, uint_t *nextp);
+
+#ifdef T_IPSEC_REQUEST_DEFINED
+
+extern int_t esp4_output(T_NET_BUF *m, T_IPSEC_REQUEST *isr, T_NET_BUF** result);
+
+#endif	/* of #ifdef T_IPSEC_REQUEST_DEFINED */
+
+#endif /* defined(SUPPORT_INET6) || defined(SUPPORT_IPSEC) */
+
+#endif	/* of #ifndef _ESP_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/esp6.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/esp6.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/esp6.h	(revision 270)
@@ -0,0 +1,91 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/esp6.h,v 1.4 2001/06/11 12:39:04 ume Exp $	*/
+/*	$KAME: esp.h,v 1.16 2000/10/18 21:28:00 itojun Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+ 
+#ifndef _ESP6_H_
+#define _ESP6_H_
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  é¢æ°
+ */
+
+extern uint_t esp6_input (T_NET_BUF **inputp, uint_t *offp, uint_t *nextp);
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef _ESP6_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/esp_input.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/esp_input.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/esp_input.c	(revision 270)
@@ -0,0 +1,139 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/esp_input.c,v 1.14 2002/08/24 04:48:13 ume Exp $	*/
+/*	$KAME: esp_input.c,v 1.62 2002/01/07 11:39:57 kjc Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_loop.h>
+#include <net/if_ppp.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet/icmp6.h>
+#include <netinet6/ah.h>
+#include <netinet6/ah6.h>
+#include <netinet6/esp.h>
+#include <netinet6/esp6.h>
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  esp6_input -- æå·åãããã®å
+¥åé¢æ°
+ *
+ *    æ¬å®è£
+ã§ã¯ããã¼ã¿ã°ã©ã ãç ´æ£ããã
+ */
+
+uint_t
+esp6_input (T_NET_BUF **inputp, uint_t *offp, uint_t *nextp)
+{
+#if 0
+	*nextp = <T_ESP_TAIL ã® next ãã£ã¼ã«ãã®ä½ç½®ï¼IPv6 ãããã®å
+é ­ããã®ãªãã»ããï¼>;
+	*offp  = <æ¬¡ãããã®ä½ç½®ï¼input->buf ããã®ãªãã»ããï¼>;
+#endif
+	syscall(rel_net_buf(*inputp));
+	return IPPROTO_DONE;
+	}
+
+#endif /* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/frag6.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/frag6.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/frag6.c	(revision 270)
@@ -0,0 +1,725 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/frag6.c,v 1.9 2002/04/19 04:46:22 suz Exp $	*/
+/*	$KAME: frag6.c,v 1.33 2002/01/07 11:34:48 kjc Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_loop.h>
+#include <net/if_ppp.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_var.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet/icmp6.h>
+
+#ifdef SUPPORT_INET6
+
+#ifdef IP6_CFG_FRAGMENT
+
+/*
+ *  ãã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼é
+å
+ */
+
+static T_NET_BUF	*ip6_frag_queue[NUM_IP6_FRAG_QUEUE];
+static T_IN6_ADDR	 ip6_frag_dest [NUM_IP6_FRAG_QUEUE];
+
+/*
+ *  ip6_get_frag_queue -- ãã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼ãç²å¾ããã
+ */
+
+const T_NET_BUF **
+ip6_get_frag_queue (void)
+{
+	return (const T_NET_BUF **)ip6_frag_queue;
+	}
+
+/*
+ *  frag6_free_queue -- ãã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼ãè§£æ¾ããã
+ *
+ *    æ³¨æ: ãã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼é
+åãã­ãã¯ãã¦ããå¼ã³åºããã¨ã
+ */
+
+static void
+frag6_free_queue (T_NET_BUF **queue)
+{
+	T_NET_BUF 	*frag, *next;
+	T_QIP6_HDR	*qip6h;
+
+	frag = *queue;
+	while (frag != NULL) {
+		qip6h = GET_QIP6_HDR(frag);
+		next  = qip6h->next_frag;
+		syscall(rel_net_buf(frag));
+		frag = next;
+		}
+	*queue = NULL;
+	}
+
+/*
+ *  frag6_timer -- ãã¼ã¿ã°ã©ã åæ§æç®¡çã¿ã¤ã
+ */
+
+void
+frag6_timer (void)
+{
+	T_NET_BUF	*frag;
+	T_QIP6_HDR	*qip6h;
+	T_IP6_FRAG_HDR	*qip6fh;
+	int_t		ix;
+
+	syscall(wai_sem(SEM_IP6_FRAG_QUEUE));
+	for (ix = NUM_IP6_FRAG_QUEUE; ix -- > 0; ) {
+		frag = ip6_frag_queue[ix];
+		if (frag != NULL) {
+			qip6h = GET_QIP6_HDR(frag);
+			if (qip6h->ftim > 0 && -- qip6h->ftim == 0) {
+
+				qip6fh = (T_IP6_FRAG_HDR *)(frag->buf + qip6h->foff);
+				if (ntohs(qip6fh->off_flag & IP6F_OFF_MASK) == 0) {
+
+					/*
+					 *  å
+é ­ã®æ­çã®ãªãã»ããã 0 ã®æã®ã¿
+					 *  ICMPv6 ã¨ã©ã¼ã¡ãã»ã¼ã¸ãéä¿¡ããã
+					 */
+
+					/* å
+é ­ã®æ­çããã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼ããå¤ãã*/
+					ip6_frag_queue[ix] = qip6h->next_frag;
+
+					/* ãã¦å
+ã¢ãã¬ã¹ãå
+ã«æ»ãã*/
+					GET_IP6_HDR(frag)->dst = ip6_frag_dest[ix];
+
+					/* ICMPv6 ã¨ã©ã¼ã¡ãã»ã¼ã¸ãéä¿¡ããã*/
+					icmp6_error(frag, ICMP6_TIME_EXCEEDED,
+					                  ICMP6_TIME_EXCEED_REASSEMBLY, 0);
+					}
+
+				/* ãã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼ãè§£æ¾ããã*/
+				NET_COUNT_IP6(net_count_ip6[NC_IP6_FRAG_IN_TMOUT], 1);
+				NET_COUNT_IP6(net_count_ip6[NC_IP6_FRAG_IN_DROP], 1);
+				frag6_free_queue(&ip6_frag_queue[ix]);
+				}
+			}
+		}
+	syscall(sig_sem(SEM_IP6_FRAG_QUEUE));
+	}
+
+#endif	/* #ifdef IP6_CFG_FRAGMENT */
+
+/*
+ *  frag6_input -- æ­çãããã®å
+¥åé¢æ°
+ */
+
+uint_t
+frag6_input (T_NET_BUF **inputp, uint_t *offp, uint_t *nextp)
+{
+	T_IP6_HDR	*ip6h;
+	T_IP6_FRAG_HDR	*ip6fh;
+	T_NET_BUF	*input = *inputp;
+	uint_t		off = *offp;
+
+#ifdef IP6_CFG_FRAGMENT
+
+	T_QIP6_HDR	*qip6h, *rip6h;
+	T_IP6_FRAG_HDR	*qip6fh = NULL;
+	T_NET_BUF	**ip6fq = NULL, *prev, *next, *frag;
+	int_t		ix;
+	int32_t		unfraglen, diff;
+	uint16_t	fragpartlen, qfragpartlen, fragoff, qfragoff, plen;
+	uint8_t		ftim, *prev_next;
+	uint_t		nextproto = IPPROTO_DONE;
+
+#endif	/* #ifdef IP6_CFG_FRAGMENT */
+
+	/* ãããã¯ã¼ã¯ãããã¡ã®æ®ãã®é·ãããã§ãã¯ããã*/
+	if (input->len - off < sizeof(T_IP6_FRAG_HDR))
+		goto buf_rel;
+
+	/* 
+	 *  å·¨å¤§ãã¤ã­ã¼ããªãã·ã§ã³ã¨æ­çããããåæã«ä½¿ç¨ãããã¨ã¯
+	 *  ã§ããªãããã¤ã­ã¼ãé·ãã 0 ãªããå·¨å¤§ãã¤ã­ã¼ããªãã·ã§ã³ã
+	 *  æå®ããã¦ãããã¨ã«ãªãã®ã§ ICMP ã§ã¨ã©ã¼ãéä¿¡è
+ã«
+	 *  éç¥ããã
+	 */
+	ip6h = GET_IP6_HDR(input);
+	if (ip6h->plen == 0) {
+		icmp6_error(input, ICMP6_PARAM_PROB,
+		                   ICMP6_PARAMPROB_HEADER,
+		                   off - IF_HDR_SIZE);
+		NET_COUNT_MIB(in6_stats.ipv6IfStatsReasmFails, 1);
+		return IPPROTO_DONE;
+		}
+
+	/*
+	 *  ãªãã»ããã 0 ã§ãæçµãã©ã°ã¡ã³ãã§ããã°ã
+	 *  åå²ä¸è¦ã®ãã¼ã¿ã°ã©ã ãªã®ã§ã
+	 *  æ¬¡ããããæãå¤æ°ãèª¿æ´ãã¦çµäºããã
+	 */
+	ip6fh = (T_IP6_FRAG_HDR *)(input->buf + off);
+	if (ip6fh->off_flag == 0) {
+		*nextp = *offp - IF_HDR_SIZE + offsetof(T_IP6_FRAG_HDR, next);
+		*offp = off + sizeof(T_IP6_FRAG_HDR);
+		return ip6fh->next;
+		}
+
+#ifdef IP6_CFG_FRAGMENT
+
+	/*
+	 *  ãã¤ã­ã¼ãé·ããã§ãã¯ããã
+	 */
+	if ((ip6fh->off_flag & IP6F_MORE_FRAG) && 
+	    ((ntohs(ip6h->plen) - (off - IF_HDR_SIZE)) & 0x7) != 0) {
+		icmp6_error(input, ICMP6_PARAM_PROB,
+		                   ICMP6_PARAMPROB_HEADER,
+		                   offsetof(T_IP6_HDR, plen));
+		NET_COUNT_MIB(in6_stats.ipv6IfStatsReasmFails, 1);
+		return nextproto;
+		}
+	NET_COUNT_MIB(in6_stats.ipv6IfStatsReasmReqds, 1);
+
+	syscall(wai_sem(SEM_IP6_FRAG_QUEUE));
+
+	/*
+ 	 *  ãã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼é
+åãããå¯¾å¿ããã¨ã³ããªãæ¢ãã
+ 	 */
+	for (ix = NUM_IP6_FRAG_QUEUE; ix -- > 0; ) {
+		if (ip6_frag_queue[ix] != NULL) {
+			qip6h  = GET_QIP6_HDR(ip6_frag_queue[ix]);
+			qip6fh = (T_IP6_FRAG_HDR *)(ip6_frag_queue[ix]->buf + qip6h->foff);
+			if (ip6fh->ident == qip6fh->ident               &&
+			    IN6_ARE_ADDR_EQUAL(&ip6h->src, &qip6h->src) &&
+			    IN6_ARE_ADDR_EQUAL(&ip6h->dst, &ip6_frag_dest[ix])) {
+				ip6fq = &ip6_frag_queue[ix];
+			    	break;
+			    	}
+			}
+		}
+
+ 	if (ip6fq == NULL) {
+
+		/*
+	 	 *  æ­çã®æ­£å½æ§ããã§ãã¯ããã
+		 */
+		unfraglen = 0;
+		fragoff = ntohs(ip6fh->off_flag & IP6F_OFF_MASK);
+		if (fragoff == 0) {
+
+			/*
+		 	 *  å
+¥åããæ­çãå
+é ­ã®æ­ç
+			 *  åå²ã§ããªãé¨åã®é·ã unfraglen ãè¨ç®ããã
+			 */
+			unfraglen = (off - IF_HDR_SIZE) - sizeof(T_IP6_HDR);
+			}
+
+		/*
+		 *             off
+		 *  |<--------------------------->|
+		 *  |          off - IF_HDR_SIZE  |
+		 *  |        |<------------------>|
+		 *  |        | off - IF_HDR_SIZE + IP6_FRAG_HDR_SIZE |
+		 *  |        |<------------------------------------->|
+		 *  +--------+----------+---------+------------------+-------------+
+		 *  | IF HDR | IPv6 HDR | EXT HDR |     FRAG HDR     |   Payload   |
+		 *  +--------+----------+---------+------------------+-------------+
+		 *                      |<---------------------------------------->|
+		 *                      |             Payload Size                 |
+		 *           |<--------------------------------------------------->|
+		 *           |         IP6_HDR_SIZE + Payload Size                 |
+		 *                                                   |<----------->|
+		 *                                                   | fragpartlen |
+		 */
+		fragpartlen = sizeof(T_IP6_HDR) + ntohs(ip6h->plen) - (off - IF_HDR_SIZE + sizeof(T_IP6_FRAG_HDR));
+		if (unfraglen + fragoff + fragpartlen > IPV6_MAXPACKET) {
+			icmp6_error(input, ICMP6_PARAM_PROB,
+			                   ICMP6_PARAMPROB_HEADER,
+			                   (off - IF_HDR_SIZE) +
+			                   offsetof(T_IP6_FRAG_HDR, off_flag));
+			goto sig_ret;
+			}
+
+		/*
+	 	 *  ip6fq == NULL ã§ããã°ãå¯¾å¿ããã¨ã³ããªã¯ç¡ãã®ã§ã
+	 	 *  ãã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼é
+åã«ãã¨ã³ããªãè¿½å ããã
+	 	 */
+		for (ix = NUM_IP6_FRAG_QUEUE; ix -- > 0; ) {
+
+			/* ç©ºãã¨ã³ããªãæ¢ãã*/
+			if (ip6_frag_queue[ix] == NULL) {
+				ip6fq = &ip6_frag_queue[ix];
+				break;
+				}
+			}
+
+		/*
+		 *  ip6fq == NULL ã§ããã°ãç©ºãã¨ã³ããªãç¡ãã®ã§ã
+		 *  ã¿ã¤ã ã¢ã¦ãï¼hlimï¼ãç­ãã¨ã³ããªãéæ¾ããã
+		 */
+ 		if (ip6fq == NULL) {
+
+		 	ftim = IPV6_MAXHLIM;
+			for (ix = NUM_IP6_FRAG_QUEUE; ix -- > 0; ) {
+				if (ip6_frag_queue[ix] != NULL) {
+					rip6h  = GET_QIP6_HDR(ip6_frag_queue[ix]);
+					if (rip6h->ftim < ftim) {
+						ftim  = rip6h->ftim;
+						ip6fq = &ip6_frag_queue[ix];
+						}
+					}
+				}
+			frag6_free_queue(ip6fq);
+			}
+
+		/*
+		 *  ã¨ã³ããªãè¨­å®ããã
+		 */
+		*ip6fq = input; 
+		ip6_frag_dest[ip6fq - ip6_frag_queue] = ip6h->dst;
+		qip6h  = GET_QIP6_HDR(*ip6fq);
+		qip6h->ftim = IPV6_FRAGTTL;
+		qip6h->foff = off;
+		qip6h->flen = fragpartlen;
+		qip6h->next_frag = NULL;
+ 		}
+ 	else {
+
+		/*
+	 	 *  æ­çã®æ­£å½æ§ããã§ãã¯ããã
+		 */
+		unfraglen = 0;
+		fragoff = ntohs(((T_IP6_FRAG_HDR *)((*ip6fq)->buf + GET_QIP6_HDR(*ip6fq)->foff))->off_flag & IP6F_OFF_MASK);
+		if (fragoff == 0) {
+
+			/*
+		 	 *  ãã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼ã®æåã®æ­çãå
+é ­ã®æ­ç
+			 *  åå²ã§ããªãé¨åã®é·ã unfraglen ãè¨ç®ããã
+			 */
+			unfraglen = (GET_QIP6_HDR(*ip6fq)->foff - IF_HDR_SIZE) - sizeof(T_IP6_HDR);
+			}
+
+		fragoff = ntohs(ip6fh->off_flag & IP6F_OFF_MASK);
+		if (fragoff == 0) {
+
+			/*
+		 	 *  å
+¥åããæ­çãå
+é ­ã®æ­ç
+			 *  åå²ã§ããªãé¨åã®é·ã unfraglen ãè¨ç®ããã
+			 */
+			unfraglen = (off - IF_HDR_SIZE) - sizeof(T_IP6_HDR);
+			}
+
+		/*
+		 *             off
+		 *  |<--------------------------->|
+		 *  |          off - IF_HDR_SIZE  |
+		 *  |        |<------------------>|
+		 *  |        | off - IF_HDR_SIZE + IP6_FRAG_HDR_SIZE |
+		 *  |        |<------------------------------------->|
+		 *  +--------+----------+---------+------------------+-------------+
+		 *  | IF HDR | IPv6 HDR | EXT HDR |     FRAG HDR     |   Payload   |
+		 *  +--------+----------+---------+------------------+-------------+
+		 *                      |<---------------------------------------->|
+		 *                      |             Payload Size                 |
+		 *           |<--------------------------------------------------->|
+		 *           |         IP6_HDR_SIZE + Payload Size                 |
+		 *                                                   |<----------->|
+		 *                                                   | fragpartlen |
+		 */
+		fragpartlen = sizeof(T_IP6_HDR) + ntohs(ip6h->plen) - (off - IF_HDR_SIZE + sizeof(T_IP6_FRAG_HDR));
+		if (unfraglen + fragoff + fragpartlen > IPV6_MAXPACKET) {
+			icmp6_error(input, ICMP6_PARAM_PROB,
+			                   ICMP6_PARAMPROB_HEADER,
+			                   (off - IF_HDR_SIZE) +
+			                   offsetof(T_IP6_FRAG_HDR, off_flag));
+			goto sig_ret;
+			}
+		
+		if (ntohs(ip6fh->off_flag & IP6F_OFF_MASK) == 0) {
+
+			/*
+		 	 *  å
+¥åããæ­çãå
+é ­ã®æ­ç
+		 	 *  ãã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼ã®æå¾ã®æ­çãã
+		 	 *  ãã¼ã¿ã°ã©ã ã®æå¤§é·ãè¶
+ãã¦ããªãããã§ãã¯ããã
+			 */
+
+			/* æå¾ã®æ­çãæ¢ç´¢ããã*/
+			next = *ip6fq;
+			while ((qip6h = GET_QIP6_HDR(next))->next_frag != NULL)
+				next = qip6h->next_frag;
+
+			/* æå¾ã®æ­çã®ãªãã»ããã¨æ­çãµã¤ãºãè¨ç®ããã*/
+			qip6fh = (T_IP6_FRAG_HDR *)(next->buf + qip6h->foff);
+			fragoff = ntohs(qip6fh->off_flag & IP6F_OFF_MASK);
+			fragpartlen = sizeof(T_IP6_HDR) + ntohs(qip6h->plen) - (qip6h->foff - IF_HDR_SIZE + sizeof(T_IP6_FRAG_HDR));
+			if (unfraglen + fragoff + fragpartlen > IPV6_MAXPACKET) {
+
+				/*
+				 *  ãã¼ã¿ã°ã©ã ã®æå¤§é·ãè¶
+ãã¦ããå ´åã¯ã
+			 	 *  ãã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼å
+¨ä½ãç ´æ£ããã
+			 	 */
+				frag6_free_queue(ip6fq);
+				syscall(rel_net_buf(input));
+				goto sig_ret;
+				}
+			}
+
+		/* ECN ã®æ­£å½æ§ãã§ãã¯ã¯æªå®è£
+ */
+
+		/*
+		 *  æ­çãã¨ã³ããªã«æ¿å
+¥ããã
+	 	 *  ãã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼ãããå
+¥åããæ­çããåã®æ­çãæ¢ç´¢ããã
+		 */
+		prev = NULL;
+		next = *ip6fq;
+		while (next != NULL) {
+			qip6h  = GET_QIP6_HDR(next);
+			qip6fh = (T_IP6_FRAG_HDR *)(next->buf + qip6h->foff);
+			if (ntohs(ip6fh->off_flag & IP6F_OFF_MASK) <= ntohs(qip6fh->off_flag & IP6F_OFF_MASK))
+				break;
+			prev = next;
+			next = qip6h->next_frag;
+			}
+
+		/*
+		 *  prev ã¯ãå
+¥åããæ­çããåã®æ­çããã ã NULL ã®å ´åã¯ã
+		 *  å
+¥åããæ­çããã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼ã®ä¸­ã§æãåã®æ­çã
+		 *  next ã¯ãå
+¥åããæ­çããå¾ã®æ­çããã ã NULL ã®å ´åã¯ã
+		 *  å
+¥åããæ­çããã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼ã®ä¸­ã§æãå¾ã®æ­çã
+		 */
+		fragoff = ntohs(ip6fh->off_flag & IP6F_OFF_MASK);
+		if (prev != NULL) {
+
+			/*
+			 *  åã®æ­çã¨ãå
+¥åããæ­çãéãªã£ã¦ããªãããã§ãã¯ããã
+			 *
+			 *    qfragoff
+			 *    |   qfragparglen
+			 *    |<------------------>|
+			 *    +--------------------+
+			 *    |        prev        |
+			 *    +--------------------+
+			 *
+			 *                         +--------------------+
+			 *                         |        input       |
+			 *                         +--------------------+
+			 *                         |
+			 *                         fragoff
+			 */
+			qip6h  = GET_QIP6_HDR(prev);
+			qip6fh = (T_IP6_FRAG_HDR *)(prev->buf + qip6h->foff);
+			qfragoff = ntohs(qip6fh->off_flag & IP6F_OFF_MASK);
+			qfragpartlen = sizeof(T_IP6_HDR) + ntohs(qip6h->plen) - (off - IF_HDR_SIZE + sizeof(T_IP6_FRAG_HDR));
+
+			diff = ((int32_t)qfragoff + qfragpartlen) - fragoff;
+			if (diff > 0) {
+
+				/* éãªã£ã¦ããã°ãå
+¥åããæ­çãç ´æ£ãã¦çµäºããã*/
+				syscall(rel_net_buf(input));
+				goto sig_ret;
+				}
+			}
+
+		if (next != NULL) {
+
+			/*
+			 *  å¾ã®æ­çã¨ãå
+¥åããæ­çãéãªã£ã¦ããªãããã§ãã¯ããã
+			 *
+			 *    fragoff
+			 *    |    fragparglen
+			 *    |<------------------>|
+			 *    +--------------------+
+			 *    |       input        |
+			 *    +--------------------+
+			 *
+			 *                         +--------------------+
+			 *                         |         next       |
+			 *                         +--------------------+
+			 *                         |
+			 *                         qfragoff
+			 */
+			qip6h  = GET_QIP6_HDR(next);
+			qip6fh = (T_IP6_FRAG_HDR *)(next->buf + qip6h->foff);
+			qfragoff = ntohs(qip6fh->off_flag & IP6F_OFF_MASK);
+			fragpartlen = sizeof(T_IP6_HDR) + ntohs(ip6h->plen) - (off - IF_HDR_SIZE + sizeof(T_IP6_FRAG_HDR));
+
+			diff = ((int32_t)fragoff + fragpartlen) - qfragoff;
+			if (diff > 0) {
+
+				/* éãªã£ã¦ããã°ãå
+¥åããæ­çãç ´æ£ãã¦çµäºããã*/
+				syscall(rel_net_buf(input));
+				goto sig_ret;
+				}
+			}
+
+		/* å
+¥åããæ­çãè¨­å®ããã*/
+		qip6h  = GET_QIP6_HDR(input);
+		qip6h->foff = off;
+		qip6h->flen = sizeof(T_IP6_HDR) + ntohs(qip6h->plen) - (off - IF_HDR_SIZE + sizeof(T_IP6_FRAG_HDR));
+
+		if (prev == NULL) {
+			*ip6fq = input;
+			qip6h->ftim = IPV6_FRAGTTL;
+			}
+		else
+			GET_QIP6_HDR(prev)->next_frag = input;
+		qip6h->next_frag = next;
+
+		/*
+		 *  å
+¨ã¦ã®æ­çãåä¿¡ããããã§ãã¯ããã
+		 */
+		plen = 0;
+		frag = *ip6fq;
+		while (frag != NULL) {
+			qip6h  = GET_QIP6_HDR(frag);
+			qip6fh = (T_IP6_FRAG_HDR *)(frag->buf + qip6h->foff);
+			if (ntohs(qip6fh->off_flag & IP6F_OFF_MASK) != plen) {
+
+				/* æ­çãé£ç¶ãã¦ããªãã*/
+				goto sig_ret;
+				}
+			plen += qip6h->flen;
+			frag = qip6h->next_frag;
+			}
+		if (ntohs(qip6fh->off_flag & IP6F_MORE_FRAG) != 0) {
+
+			/* æå¾ã®æ­çãåä¿¡ãã¦ããªãã*/
+			goto sig_ret;
+			}
+
+		/*
+		 *  å
+¨ã¦ã®æ­çãåä¿¡ããã®ã§ãåæ§æããã
+		 */
+
+		/* ãããã¯ã¼ã¯ãããã¡ãç²å¾ããã*/
+		qip6h  = GET_QIP6_HDR(*ip6fq);
+		qip6fh = (T_IP6_FRAG_HDR *)((*ip6fq)->buf + qip6h->foff);
+		if (tget_net_buf(inputp, qip6h->foff + plen, TMO_IP6_FRAG_GET_NET_BUF) == E_OK) {
+
+			/*
+			 *  æ­çãããã®ç´åã®ãããã® NEXT ãã£ã¼ã«ãã®ã¢ãã¬ã¹ãç²å¾ãã
+			 *  å
+ã«æ»ãã
+			 */
+			if ((prev_next = ip6_get_prev_hdr(*ip6fq, qip6h->foff)) == NULL) {
+				syscall(rel_net_buf(input));
+				goto sig_ret;
+				}
+			*prev_next = qip6fh->next;
+			input = *inputp;
+
+			NET_COUNT_IP6(net_count_ip6[NC_IP6_FRAG_IN_OK], 1);
+			NET_COUNT_MIB(in6_stats.ipv6IfStatsReasmOKs, 1);
+
+			/*
+			 *  IPv6 ãããã¨åå²ã§ããªãé¨åã
+			 *  ãã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼ã®ä¸­ã®å
+é ­ã®æ­çããã³ãã¼ããã
+			 */
+			memcpy(input->buf, (*ip6fq)->buf, qip6h->foff);
+
+			/* éä¿¡å
+ã¢ãã¬ã¹ãå
+ã«æ»ãã*/
+			ip6h = GET_IP6_HDR(input);
+			ip6h->dst = ip6_frag_dest[ip6fq - ip6_frag_queue];
+
+			/* offp ããåæ§æããæ­çã®å
+é ­ã«è¨­å®ããã*/
+			*offp = qip6h->foff;
+
+			/* ãããã¯ã¼ã¯ãããã¡é·ãè¨­å®ããã*/
+			input->len = plen + qip6h->foff;
+
+			/*
+			 *  å
+¨ã¦ã®æ­çãã³ãã¼ããã
+			 */
+			frag = *ip6fq;
+			off  = qip6h->foff;
+			while (frag != NULL) {
+				qip6h  = GET_QIP6_HDR(frag);
+				memcpy(input->buf + off,
+				       frag->buf + qip6h->foff + sizeof(T_IP6_FRAG_HDR),
+				       qip6h->flen);
+				off += qip6h->flen;
+				frag = qip6h->next_frag;
+				}
+
+			/* ãã¤ã­ã¼ãé·ãè¨­å®ããã*/
+			ip6h->plen = htons(plen);
+
+			*nextp = offsetof(T_IP6_HDR, next);
+			nextproto = ip6h->next;
+			}
+		else {
+			NET_COUNT_IP6(net_count_ip6[NC_IP6_FRAG_IN_NO_BUF], 1);
+			NET_COUNT_IP6(net_count_ip6[NC_IP6_FRAG_IN_DROP], 1);
+			NET_COUNT_MIB(in6_stats.ipv6IfStatsReasmFails, 1);
+			}
+
+		/* ãã¼ã¿ã°ã©ã åæ§æã­ã¥ã¼ãè§£æ¾ããã*/
+		frag6_free_queue(ip6fq);
+ 		}
+
+sig_ret:
+	syscall(sig_sem(SEM_IP6_FRAG_QUEUE));
+	return nextproto;
+
+#else	/* #ifdef IP6_CFG_FRAGMENT */
+
+	/*
+	 *  ãã¼ã¿ã°ã©ã ã®åå²ã»åæ§æè¡ããªãå ´åã¯ãå
+¨æ­çãç ´æ£ãã
+	 *  æå¾ã®æ­çãåä¿¡ããã¨ãã
+	 *  ICMP ã¨ã©ã¼ãéä¿¡è
+ã«éç¥ããã
+	 */
+	if ((ip6fh->off_flag & IP6F_MORE_FRAG) == 0) {
+		icmp6_error(input, ICMP6_TIME_EXCEEDED,
+		                   ICMP6_TIME_EXCEED_REASSEMBLY, 0);
+		NET_COUNT_MIB(in6_stats.ipv6IfStatsReasmFails, 1);
+		return IPPROTO_DONE;
+		}
+
+#endif	/* #ifdef IP6_CFG_FRAGMENT */
+
+buf_rel:
+	syscall(rel_net_buf(input));
+	return IPPROTO_DONE;
+	}
+
+#endif /* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/icmp6.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/icmp6.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/icmp6.c	(revision 270)
@@ -0,0 +1,729 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/icmp66.c,v 1.6.2.6 2001/07/10 09:44:16 ume Exp $	*/
+/*	$KAME: icmp66.c,v 1.211 2001/04/04 05:56:20 itojun Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ip_icmp6.c	8.2 (Berkeley) 1/4/94
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_loop.h>
+#include <net/if_ppp.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet/icmp6.h>
+#include <netinet6/nd6.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_timer.h>
+#include <netinet/tcp_var.h>
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  å¤æ°
+ */
+
+#ifdef SUPPORT_MIB
+
+/*
+ *  SNMP ã® ç®¡çæ
+å ±ãã¼ã¹ (MIB)
+ */
+
+T_ICMP6_IFSTAT icmp6_ifstat;
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+/*
+ *  icmp6_output -- ICMP6 ãã±ãããéä¿¡ããã
+ */
+
+static void
+icmp6_output (T_NET_BUF *output, uint_t off)
+{
+	T_IN6_IFADDR	*ia;
+	T_IFNET		*ifp = IF_GET_IFNET();
+	T_IP6_HDR	*ip6h;
+	T_ICMP6_HDR	*icmp6h;
+
+	/*
+	 *  å®å
+ã¢ãã¬ã¹ã«ãµããããéä¿¡å
+ã¢ãã¬ã¹ãã
+	 *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ããæ¢ç´¢ãã¦å©ç¨ããã
+	 */
+	ip6h = GET_IP6_HDR(output);
+	if ((ia = in6_ifawithifp(ifp, &ip6h->dst)) == NULL) {
+		NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpOutErrors, 1);
+		syscall(rel_net_buf(output));
+		return;
+		}
+	ip6h->src = ia->addr;
+
+	icmp6h = GET_ICMP6_HDR(output, off);
+
+	/* ãã§ãã¯ãµã ãè¨ç®ããã*/
+	icmp6h->sum = 0;
+	icmp6h->sum = in6_cksum(output, IPPROTO_ICMPV6, (uint8_t*)icmp6h - output->buf, 
+	                        ntohs(ip6h->plen) - (off - IF_IP6_HDR_SIZE));
+
+	/* éä¿¡ããã*/
+	NET_COUNT_ICMP6(net_count_icmp6[NC_ICMP6_OUT_OCTETS],
+	               output->len - GET_IF_IP6_HDR_SIZE(output));
+	NET_COUNT_ICMP6(net_count_icmp6[NC_ICMP6_OUT_PACKETS], 1);
+	NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpOutMsgs, 1);
+	ip6_output(output, 0, TMO_ICMP_OUTPUT);
+	}
+
+/*
+ *  icmp6_echo_request -- ã¨ã³ã¼è¦æ±ãåä¿¡ããã¨ãã®å¦ç
+ */
+
+static void
+icmp6_echo_request (T_NET_BUF *input, uint_t off)
+{
+	T_IP6_HDR	*ip6h;
+	T_ICMP6_HDR	*icmp6h;
+	T_IFNET		*ifp = IF_GET_IFNET();
+	T_IN6_IFADDR	*ia;
+	T_IN6_ADDR	dst;
+	uint_t		diff;
+
+	NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpInEchos, 1);
+
+	ip6h       = GET_IP6_HDR(input);
+
+	/*
+	 *  IPv6 ãããã¨ ICMPv6 ãããéã®æ¡å¼µããããé¤å»ããã
+	 */
+	diff = off - IF_IP6_HDR_SIZE;
+	if (diff > 0) {
+		/* ICMPv6 ããããåã«è©°ããã*/
+		memmove(input->buf + IF_IP6_HDR_SIZE, input->buf + off, input->len - off);
+		off = IF_IP6_HDR_SIZE;
+
+		/* ãã¤ã­ã¼ãé·ãèª¿æ´ããã*/
+		ip6h->plen  = htons(ntohs(ip6h->plen) - diff);
+		input->len -= diff;
+		}
+
+	icmp6h = GET_ICMP6_HDR(input, off);
+	if (icmp6h->code != 0) {
+		NET_COUNT_ICMP6(net_count_icmp6[NC_ICMP6_IN_ERR_PACKETS], 1);
+		syscall(rel_net_buf(input));
+		return;
+		}
+
+	/*
+	 *  ã¡ãã»ã¼ã¸ã®åãã¨ã³ã¼è¦æ± (128) ãã
+	 *  ã¨ã³ã¼å¿ç­ (129) ã«å¤æ´ãã¦éãè¿ãã
+	 */
+	icmp6h->type = ICMP6_ECHO_REPLY;
+
+	/* IPv6 ãããã®çºä¿¡å
+ã¢ãã¬ã¹ã¨å®å
+ã¢ãã¬ã¹ãå
+¥æ¿ããã*/
+	dst 	  = ip6h->dst;
+	ip6h->dst = ip6h->src;
+	ip6h->src = dst;
+
+	/*
+	 *  å
+ã®å®å
+ã¢ãã¬ã¹ããã«ãã­ã£ã¹ãã®å ´åã¯ã
+	 *  å®å
+ã¢ãã¬ã¹ã«ãµããããéä¿¡å
+ã¢ãã¬ã¹ãã
+	 *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ããæ¢ç´¢ãã¦å©ç¨ããã
+	 */
+	if (IN6_IS_ADDR_MULTICAST(&dst)) {
+		if ((ia = in6_ifawithifp(ifp, &ip6h->dst)) == NULL) {
+			syscall(rel_net_buf(input));
+			return;
+			}
+		else
+			ip6h->src = ia->addr;
+		}
+
+	/* æ¬¡ãããã¨ããããªããããè¨­å®ããã*/
+	ip6h->next = IPPROTO_ICMPV6;
+	ip6h->hlim = IP_DEFTTL;
+
+	/* ãã§ãã¯ãµã ãè¨ç®ããã*/
+	icmp6h->sum = 0;
+	icmp6h->sum = in6_cksum(input, IPPROTO_ICMPV6, (uint8_t*)icmp6h - input->buf, 
+	                        ntohs(ip6h->plen) - (off - IF_IP6_HDR_SIZE));
+
+	/* éä¿¡ããã*/
+	NET_COUNT_ICMP6(net_count_icmp6[NC_ICMP6_OUT_OCTETS],
+	               input->len - GET_IF_IP6_HDR_SIZE(input));
+	NET_COUNT_ICMP6(net_count_icmp6[NC_ICMP6_OUT_PACKETS], 1);
+	NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpOutMsgs, 1);
+	NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpOutEchoReplies, 1);
+	ip6_output(input, 0, TMO_ICMP_OUTPUT);
+	}
+
+/*
+ *  icmp6_notify_error -- ã¨ã©ã¼ãéç¥ããã
+ */
+
+static void
+icmp6_notify_error(T_NET_BUF *input, uint_t poff)
+{
+	T_ICMP6_HDR	*icmp6h;
+	ER_UINT		loff;
+	uint_t		len, next;
+
+	len  = input->len - poff;
+
+	/* ãã¼ã¿ã°ã©ã é·ã ICMP6 ãããé· + IP6 ãããé·ä»¥ä¸ãªãä½ãããªãã*/
+	if (len < ICMP6_HDR_SIZE + IP6_HDR_SIZE)
+		return;
+
+	icmp6h = GET_ICMP6_HDR(input, poff);
+
+	/* æçµããããæ¢ç´¢ããã*/
+	loff = ip6_lasthdr(input, poff + ICMP6_HDR_SIZE, IPPROTO_IPV6, &next);
+
+	/* æçµãããã TCP ã®ã¿å¯¾å¿ããã*/
+	if (loff >= 0 && next == IPPROTO_TCP) {
+
+#ifdef SUPPORT_TCP
+
+		memcpy(GET_IP6_HDR(input), input->buf + (loff + ICMP6_HDR_SIZE),
+		                           input->len - (loff + ICMP6_HDR_SIZE));
+		input->len -= loff + ICMP6_HDR_SIZE;
+		tcp_notify(input, icmp6h->code == ICMP6_DST_UNREACH_NOPORT ? EV_CNNRF : EV_HURCH);
+
+#endif	/* of #ifdef SUPPORT_TCP */
+
+		}
+	else
+		syslog(LOG_NOTICE, "[ICMP6] error code: %d.", icmp6h->code);
+	}
+
+#if NUM_IN6_HOSTCACHE_ENTRY > 0
+
+/*
+ *  icmp6_mtudisc_update -- Path MTU ãæ´æ°ããã
+ */
+
+static void
+icmp6_mtudisc_update(T_NET_BUF *input, uint_t off, uint32_t mtu)
+{
+	T_IP6_HDR	*pip6h;
+
+	pip6h = (T_IP6_HDR*)GET_ICMP6_SDU(input, off);
+
+	if (mtu < IP6_HDR_SIZE + sizeof(T_IP6_FRAG_HDR) + 8)
+		return;
+
+	if (mtu > IF_MTU)
+		return;
+
+	in6_hostcache_update(&pip6h->dst, mtu);
+	}
+
+#endif	/* of #if NUM_IN6_HOSTCACHE_ENTRY > 0 */
+
+#if NUM_REDIRECT_ROUTE_ENTRY > 0
+
+/*
+ *  icmp6_redirect_input -- åãç´ãã¡ãã»ã¼ã¸ã®å¦ç
+ */
+
+static void
+icmp6_redirect_input (T_NET_BUF *input, uint_t off)
+{
+	T_IP6_HDR		*ip6h;
+	T_IN6_ADDR		*gw;
+	T_ND_REDIRECT_HDR	*rdh;
+	T_ND_OPT_HDR		*opth;
+	T_IFNET			*ifp = IF_GET_IFNET();
+	bool_t			router, onlink;
+	uint_t			lladdr_len = 0;
+	uint8_t			*lladdr = NULL;
+	uint8_t			nd_opt_off[ND_OPT_OFF_ARRAY_SIZE];
+
+	ip6h = GET_IP6_HDR(input);
+
+	/*
+	 *  IP ãããã®ãã§ãã¯ãä»¥ä¸ã®å ´åã¯ç ´æ£ããã
+	 *    ã»ãªã³ã¯ã­ã¼ã«ã«ä»¥å¤ããéããã¦ããã¡ãã»ã¼ã¸
+	 *    ã»ããããªãããã IPV6_MAXHLIM (255) ä»¥å¤
+	 */
+	if (!IN6_IS_ADDR_LINKLOCAL(&ip6h->src) || ip6h->hlim != IPV6_MAXHLIM)
+		goto err_ret;
+
+	rdh  = (T_ND_REDIRECT_HDR *)(input->buf + off);
+
+	/* åãç´ãã®çµç¹ã¢ãã¬ã¹ããã«ãã­ã£ã¹ãã¢ãã¬ã¹ã®å ´åã¯ç ´æ£ããã*/
+	if (IN6_IS_ADDR_MULTICAST(&rdh->dst))
+		goto err_ret;
+
+	/* ã¿ã¼ã²ããã¢ãã¬ã¹ãçµè·¯è¡¨ã«ç»é²ããã¦ããããã§ãã¯ããã*/
+	if ((gw = in6_rtalloc(ifp, &rdh->dst)) != NULL) {
+		/* GW ã¢ãã¬ã¹ã¨éä¿¡å
+ã¢ãã¬ã¹ãç°ãªã£ã¦ããã°ç ´æ£ããã*/
+		if (!IN6_ARE_ADDR_EQUAL(gw, &ip6h->src))
+			goto err_ret;
+		}
+	else	/* çµè·¯è¡¨ã«ãªããã°ç ´æ£ããã*/
+		goto err_ret;
+
+	router = onlink = false;
+
+	/*
+	 *  ã¿ã¼ã²ããã¢ãã¬ã¹ããªã³ã¯ã­ã¼ã«ã«ã¢ãã¬ã¹ã§ããã°ã
+	 *  ã¿ã¼ã²ããã¯ã«ã¼ã¿
+	 */
+	if (IN6_IS_ADDR_LINKLOCAL(&rdh->target))
+		router = true;
+
+	/*
+	 *  ã¿ã¼ã²ããã¢ãã¬ã¹ã¨çµç¹ã¢ãã¬ã¹ãåä¸ã§ããã°ããªã³ãªã³ã¯
+	 */
+	if (IN6_ARE_ADDR_EQUAL(&rdh->target, &rdh->dst))
+		onlink = true;
+		
+	/*
+	 *  ã«ã¼ã¿ã§ãããªã³ãªã³ã¯ã§ããªããã°ã¨ã©ã¼
+	 */
+	if (!router && !onlink)
+		goto err_ret;
+
+	/* è¿é£æ¢ç´¢ãªãã·ã§ã³ã®ãªãã»ãããè¨é²ããã*/
+	if (nd6_options(nd_opt_off, input->buf +  off + ND_REDIRECT_HDR_SIZE,
+	                            input->len - (off + ND_REDIRECT_HDR_SIZE)) != E_OK)
+		goto err_ret;
+
+	/* è¿é£æ¢ç´¢ãªãã·ã§ã³ (åãç´ãã®ã«ã¼ã¿ã®ãªã³ã¯ã¢ãã¬ã¹) */
+	if (nd_opt_off[ND_OPT_OFF_ARRAY_IX(ND_OPT_TARGET_LINKADDR)]) {
+		opth = (T_ND_OPT_HDR *)((uint8_t *)(input->buf + off + ND_REDIRECT_HDR_SIZE) +
+		                        nd_opt_off[ND_OPT_OFF_ARRAY_IX(ND_OPT_TARGET_LINKADDR)] - 8);
+	 	/* æ³¨æ: ãªãã·ã§ã³ãªãã»ããé
+åã«ã¯ããªãã»ãã + 8 ãè¨­å®ããã¦ããã*/
+		lladdr     = (uint8_t *)(opth + 1);
+		lladdr_len = (opth->len << 3);
+		}
+
+	/*
+	 *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹é·ãä¸è´ããªããã°ã¨ã©ã¼
+	 */
+	if (lladdr && lladdr_len != ((sizeof(T_IF_ADDR) + sizeof(T_ND_OPT_HDR) + 7) & ~7))
+		goto err_ret;
+
+	/* åãç´ãã®ã«ã¼ã¿ã®ãªã³ã¯ã¢ãã¬ã¹ãè¿é£ã­ã£ãã·ã¥ã«ç»é²ããã*/
+	nd6_cache_lladdr(ifp, &rdh->target, (T_IF_ADDR *)lladdr, ND_REDIRECT, 
+	                 onlink ? ND_REDIRECT_ONLINK : ND_REDIRECT_ROUTER);
+
+	/* ã«ã¼ãã£ã³ã°è¡¨ã«ç»é²ããã*/
+	in6_rtredirect(&rdh->target, &rdh->dst, 128, IN_RTF_REDIRECT, TMO_IN_REDIRECT);
+
+	syscall(rel_net_buf(input));
+	return;
+
+err_ret:
+	NET_COUNT_ICMP6(net_count_nd6[NC_ICMP6_IN_ERR_PACKETS], 1);
+	syscall(rel_net_buf(input));
+	}
+
+#endif	/* of #if NUM_REDIRECT_ROUTE_ENTRY > 0 */
+
+/*
+ *  icmp6_input -- ICMP6 ã®å
+¥åé¢æ°
+ */
+
+uint_t
+icmp6_input (T_NET_BUF **inputp, uint_t *offp, uint_t *nextp)
+{
+	T_NET_BUF	*input = *inputp;
+	T_IP6_HDR	*ip6h;
+	T_ICMP6_HDR	*icmp6h;
+	uint_t		len, off = *offp;
+	uint8_t		code;
+
+	NET_COUNT_ICMP6(net_count_icmp6[NC_ICMP6_IN_OCTETS],
+	               input->len - GET_IF_IP6_HDR_SIZE(input));
+	NET_COUNT_ICMP6(net_count_icmp6[NC_ICMP6_IN_PACKETS], 1);
+	NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpInMsgs, 1);
+
+	/* ICMP6 ãããã®é·ãããã§ãã¯ããã*/
+	len  = input->len - off;
+	if (len < ICMP6_HDR_SIZE) {
+		NET_COUNT_ICMP6(net_count_icmp6[NC_ICMP6_IN_ERR_PACKETS], 1);
+		NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpInErrors, 1);
+		goto buf_rel;
+		}
+
+	ip6h   = GET_IP6_HDR(input);
+	icmp6h = GET_ICMP6_HDR(input, off);
+
+	/* ãã§ãã¯ãµã ãè¨ç®ããã*/
+	if ((in6_cksum(input, IPPROTO_ICMPV6, off, ntohs(ip6h->plen) - (off - IF_IP_HDR_SIZE)) & 0xffff) != 0) {
+		NET_COUNT_ICMP6(net_count_icmp6[NC_ICMP6_IN_ERR_PACKETS], 1);
+		NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpInErrors, 1);
+		goto buf_rel;
+		}
+
+	code = icmp6h->code;
+
+	/* ã¡ãã»ã¼ã¸ã®åã«ããåå²ããã*/
+	switch (icmp6h->type) {
+
+	case ICMP6_DST_UNREACH:			/* å®å
+å°éä¸å¯è½		*/
+		NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpInDestUnreachs, 1);
+		icmp6_notify_error(input, off);
+		break;
+
+	case ICMP6_ECHO_REQUEST:		/* ã¨ã³ã¼è¦æ±			*/
+		icmp6_echo_request(input, off);
+		return IPPROTO_DONE;
+		break;
+
+	case ICMP6_ECHO_REPLY:			/* ã¨ã³ã¼å¿ç­			*/
+
+#ifdef ICMP_CFG_CALLBACK_ECHO_REPLY
+
+		icmp6_echo_reply(input, off);
+
+#endif	/* of #ifdef ICMP_CFG_CALLBACK_ECHO_REPLY */
+
+		break;
+
+	case ND_ROUTER_ADVERT:			/* ã«ã¼ã¿éç¥			*/
+		NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpInRouterAdvertisements, 1);
+		if (code != 0 || len < ROUTER_ADVERT_HDR_SIZE)
+			goto buf_rel;
+		nd6_ra_input(input, off);
+		return IPPROTO_DONE;
+		break;
+
+	case ND_NEIGHBOR_SOLICIT:		/* è¿é£è¦è«			*/
+		NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpInNeighborSolicits, 1);
+		if (code != 0 || len < NEIGHBOR_SOLICIT_HDR_SIZE)
+			goto buf_rel;
+		nd6_ns_input(input, off);
+		return IPPROTO_DONE;
+		break;
+
+	case ND_NEIGHBOR_ADVERT:		/* è¿é£éç¥			*/
+		NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpInNeighborAdvertisements, 1);
+		if (code != 0 || len < NEIGHBOR_ADVERT_HDR_SIZE)
+			goto buf_rel;
+		nd6_na_input(input, off);
+		return IPPROTO_DONE;
+		break;
+
+	case ND_REDIRECT:			/* åãç´ã			*/
+		NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpInRedirects, 1);
+
+#if NUM_REDIRECT_ROUTE_ENTRY > 0
+
+		if (code != 0 || len < ND_REDIRECT_HDR_SIZE)
+			goto buf_rel;
+		icmp6_redirect_input(input, off);
+		return IPPROTO_DONE;
+
+#else	/* of #if NUM_REDIRECT_ROUTE_ENTRY > 0 */
+
+		syslog(LOG_WARNING, "[ICMP6] redirect ignored.");
+
+#endif	/* of #if NUM_REDIRECT_ROUTE_ENTRY > 0 */
+
+		break;
+
+	case ICMP6_PACKET_TOO_BIG:		/* ãã±ãããå¤§ããããã	*/
+
+#if NUM_IN6_HOSTCACHE_ENTRY > 0
+
+		icmp6_mtudisc_update(input, off, ntohl(icmp6h->icmp6_mtu));
+
+#endif	/* of #if NUM_IN6_HOSTCACHE_ENTRY > 0 */
+
+		NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpInPktTooBigs, 1);
+		break;
+
+	case ICMP6_TIME_EXCEEDED:		/* TTL ãè¶
+éããã		*/
+		NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpInTimeExcds, 1);
+		break;
+
+	case ICMP6_PARAM_PROB:			/* IPv6 ããããä¸æ­£ã		*/
+		NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpInParmProblems, 1);
+		break;
+
+	case MLD_LISTENER_QUERY:		/* ãã«ãã­ã£ã¹ãåä¿¡è
+ç
+§ä¼	*/
+	case MLD_LISTENER_REPORT:		/* ãã«ãã­ã£ã¹ãåä¿¡è
+å ±å	*/
+	case MLD_LISTENER_DONE:			/* ãã«ãã­ã£ã¹ãåä¿¡è
+çµäº	*/
+	case ND_ROUTER_SOLICIT:			/* ã«ã¼ã¿è¦è«			*/
+	case ICMP6_ROUTER_RENUMBERING:		/* ã«ã¼ã¿çªå·åè¨­å®		*/
+	case ICMP6_FQDN_QUERY:			/* FQDN ç
+§ä¼			*/
+	case ICMP6_FQDN_REPLY:			/* FQDN å¿ç­			*/
+		syslog(LOG_WARNING, "[ICMP6] unsupported type: %d.", icmp6h->type);
+		break;
+
+	default:
+		syslog(LOG_WARNING, "[ICMP6] unknown type: %d.", icmp6h->type);
+		NET_COUNT_ICMP6(net_count_icmp6[NC_ICMP6_IN_ERR_PACKETS], 1);
+		NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpInErrors, 1);
+		break;
+		}
+
+buf_rel:
+	syscall(rel_net_buf(input));
+	return IPPROTO_DONE;
+	}
+
+/*
+ *  icmp6_error -- ICMP6 ã¨ã©ã¼éä¿¡é¢æ°
+ */
+
+void
+icmp6_error (T_NET_BUF *input, uint8_t type, uint8_t code, uint32_t param)
+{
+	T_NET_BUF	*output;
+	T_IP6_HDR	*ip6h;
+	T_ICMP6_HDR	*icmp6h;
+	ER_UINT		off;
+	uint_t		next, len;
+
+	ip6h = GET_IP6_HDR(input);
+
+	/*
+	 *  å®å
+ã¢ãã¬ã¹ãããã«ãã­ã£ã¹ãã®å ´åã¯ã
+	 *  ä»¥ä¸ã®æ¡ä»¶ä»¥å¤ã®ã¨ãã¯å¦çãè¡ããªãã
+	 *
+	 *    ã»ãã¼ã¿ã°ã©ã ãå¤§ããããã
+	 *    ã»IPv6 ãããã®ä¸æ­£ã§ããªãã·ã§ã³ãèªè­ã§ããªãã
+	 */
+	if (IN6_IS_ADDR_MULTICAST(&ip6h->dst) &&
+	    !((type == ICMP6_PACKET_TOO_BIG) ||
+	      (type == ICMP6_PARAM_PROB && code == ICMP6_PARAMPROB_OPTION)))
+		goto buf_rel;
+
+	/*
+	 *  å§ç¹ã¢ãã¬ã¹ããä»¥ä¸ã®å ´åã¯å¦çãè¡ããªãã
+	 *
+	 *    ã»ç¡æå®
+	 *    ã»ãã«ãã­ã£ã¹ã
+	 */
+	if (IN6_IS_ADDR_UNSPECIFIED(&ip6h->src) ||
+	    IN6_IS_ADDR_MULTICAST  (&ip6h->src))
+		goto buf_rel;
+
+	/* æå¾ã®ããããæ¢ç´¢ããã*/
+	off = ip6_lasthdr(input, 0, IPPROTO_IPV6, &next);
+
+	/*
+	 *  ã¿ã¤ãããã¨ã©ã¼ãåãç´ãã® ICMP6 ãã±ããã®ã¨ã©ã¼ã«ã¯è¿ç­ããªãã
+	 */
+	if (off >= 0 && next == IPPROTO_ICMPV6) {
+		T_ICMP6_HDR	*icmp6h;
+
+		if (input->len - off < ICMP6_HDR_SIZE)
+			goto buf_rel;
+
+		icmp6h = GET_ICMP6_HDR(input, off);
+		if (icmp6h->type <  ICMP6_ECHO_REQUEST ||
+		    icmp6h->type == ND_REDIRECT)
+			goto buf_rel;
+		}
+
+	/* DoS æ»æã«å¯¾ããé²å¾¡ã¯æªå®è£
+ */
+
+	/*
+	 *  éãè¿ãã¡ãã»ã¼ã¸é·ããICMPv6 ã®æå¤§ãã¤ã­ã¼ãé·ã«èª¿æ´ããã
+	 *  IPV6_MMTU - (IP6_HDR_SIZE + ICMP6_HDR_SIZE)
+	 */
+	if (input->len - IF_HDR_SIZE > IPV6_MMTU - (IP6_HDR_SIZE + ICMP6_HDR_SIZE))
+		len = IPV6_MMTU - (IP6_HDR_SIZE + ICMP6_HDR_SIZE);
+	else
+		len = input->len - IF_HDR_SIZE;
+
+	/* éä¿¡ç¨ã®ãããã¯ã¼ã¯ãããã¡ãç²å¾ããã*/
+	if (in6_get_datagram(&output, len + ICMP6_HDR_SIZE, 0,
+	                     &ip6h->src, &in6_addr_unspecified,
+	                     IPPROTO_ICMPV6, IPV6_MAXHLIM,
+	                     NBA_SEARCH_ASCENT, TMO_ICMP_OUTPUT) != E_OK)
+		goto buf_rel;
+
+	/* ICMP6 ããããè¨­å®ããã*/
+ 	icmp6h = GET_ICMP6_HDR(output, IF_IP6_ICMP6_HDR_OFFSET);
+ 	icmp6h->type       = type;
+ 	icmp6h->code       = code;
+ 	icmp6h->icmp6_pptr = htonl(param);
+ 
+ 	/* ã¨ã©ã¼ãã¼ã¿ãè¨­å®ããã*/
+ 	memcpy(GET_ICMP6_SDU(output, IF_IP6_ICMP6_HDR_OFFSET), (uint8_t *)ip6h, len);
+
+#ifdef SUPPORT_MIB
+
+	switch (type) {
+	case ICMP6_DST_UNREACH:
+		NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpOutDestUnreachs, 1);
+		break;
+
+	case ICMP6_PARAM_PROB:
+		NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpOutParmProblems, 1);
+		break;
+
+	default:
+		break;
+
+		}
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+	/* éä¿¡ããã*/
+	icmp6_output(output, IF_IP6_HDR_SIZE);
+
+buf_rel:
+	syscall(rel_net_buf(input));
+	}
+
+#endif /* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/if6_ether.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/if6_ether.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/if6_ether.c	(revision 270)
@@ -0,0 +1,131 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/net.h>
+#include <net/net_timer.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet/ip.h>
+#include <netinet/if_ether.h>
+
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+
+#include <net/if6_var.h>
+
+#if defined(SUPPORT_INET6) && defined(SUPPORT_ETHER)
+
+/*
+ *  ether_map_ipv6_multicast -- IPv6 ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ããã¤ã¼ãµãããã»ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ã¸ã®å¤æ
+ */
+
+void
+ether_map_ipv6_multicast (T_ETHER_ADDR *eaddr, T_IN6_ADDR *maddr)
+{
+	eaddr->lladdr[0] = UINT_C(0x33);
+	eaddr->lladdr[1] = UINT_C(0x33);
+	eaddr->lladdr[2] = maddr->s6_addr8[12];
+	eaddr->lladdr[3] = maddr->s6_addr8[13];
+	eaddr->lladdr[4] = maddr->s6_addr8[14];
+	eaddr->lladdr[5] = maddr->s6_addr8[15];
+	}
+
+#endif /* of #if defined(SUPPORT_INET6) && defined(SUPPORT_ETHER) */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/if6_ether.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/if6_ether.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/if6_ether.h	(revision 270)
@@ -0,0 +1,92 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _IF6_ETHER_H_
+#define _IF6_ETHER_H_
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  é¢æ°
+ */
+
+extern void ether_map_ipv6_multicast (T_ETHER_ADDR *eaddr, T_IN6_ADDR *maddr);
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef _IF6_ETHER_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6.c	(revision 270)
@@ -0,0 +1,522 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/in6.c,v 1.21 2002/04/19 04:46:22 suz Exp $	*/
+/*	$KAME: in6.c,v 1.259 2002/01/21 11:37:50 keiichi Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)in.c	8.2 (Berkeley) 11/15/93
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_types.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet6/in6_ifattach.h>
+
+#include <net/if6_var.h>
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+T_IN6_ADDR in6_addr_unspecified =
+	IPV6_ADDR_UNSPECIFIED_INIT;
+
+T_IN6_ADDR in6_addr_linklocal_allnodes =
+	IPV6_ADDR_LINKLOCAL_ALLNODES_INIT;
+
+T_IN6_ADDR in6_addr_linklocal_allrouters =
+	IPV6_ADDR_LINKLOCAL_ALLROUTERS_INIT;
+
+/*
+ *  in6_addmulti -- ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ãç»é²ããã
+ */
+
+static ER
+in6_addmulti (T_IFNET *ifp, T_IN6_ADDR *maddr)
+{
+	ER	error = E_OK;
+
+	if ((error = if_addmulti(ifp, maddr, AT_INET6)) != E_OK)
+		return error;
+
+	return error;
+	}
+
+/*
+ *  in6_ifinit -- ã¤ã³ã¿ãã§ã¼ã¹ã«ã¢ãã¬ã¹æ
+å ±ãè¨­å®ããåæåããã
+ */
+
+static ER
+in6_ifinit (T_IFNET *ifp, T_IN6_IFADDR *ia, T_IN6_ADDR *addr, uint_t prefix_len)
+{
+	/* ã¢ãã¬ã¹ã¨ãã¬ãã£ãã¯ã¹é·ãè¨­å®ããã*/
+	ia->addr       = *addr;
+	ia->prefix_len = prefix_len;
+
+	/* ãã©ã°ãåæåããã*/
+	ia->flags = 0;
+
+	/*
+	 *  åãã¦ã¢ãã¬ã¹ãè¨­å®ãããã¨ããã¤ã³ã¿ãã§ã¼ã¹ç¬èªã®åæåãè¡ãã
+	 */
+
+	return E_OK;
+	}
+
+/*
+ *  in6_ifainit -- ã¤ã³ã¿ãã§ã¼ã¹ã¢ãã¬ã¹æ§é ä½ã®åæå
+ */
+
+void
+in6_ifainit (void)
+{
+	T_IN6_IFADDR	*ia = NULL;
+	T_IFNET		*ifp = IF_GET_IFNET();
+	int_t 		ix;
+
+	for (ix = NUM_IN6_IFADDR_ENTRY; ix -- > 0; ) {
+		ia = &ifp->in_ifaddrs[ix];
+		memset(ia, sizeof(T_IN6_IFADDR), 0);
+		ia->router_index = IN6_RTR_IX_UNREACH;
+		ia->prefix_index = ND6_PREFIX_IX_INVALID;
+		}
+	}
+
+/*
+ *  in6_if2idlen -- ã¤ã³ã¿ãã§ã¼ã¹ ID é·ãè¿ãã
+ */
+
+int_t
+in6_if2idlen (T_IFNET *ifp)
+{
+#if IF_TYPE == IFT_ETHER
+	return 64;
+#else
+	return 64;
+#endif
+	}
+
+/*
+ *  in6_addr2ifaix -- ã¢ãã¬ã¹ããã¤ã³ã¿ãã§ã¼ã¹ã¢ãã¬ã¹æ
+å ±ã®ã¤ã³ããã¯ã¹ã«å¤æããã
+ */
+
+int_t
+in6_addr2ifaix (T_IN6_ADDR *addr)
+{
+	T_IFNET		*ifp = IF_GET_IFNET();
+	T_IN6_IFADDR	*ia;
+	int_t 		ix;
+
+	for (ix = NUM_IN6_IFADDR_ENTRY; ix -- > 0; ) {
+		ia = &ifp->in_ifaddrs[ix];
+		if ((ia->flags & IN6_IFF_DEFINED) != 0 &&
+		    in6_are_prefix_equal(addr, &ia->addr, ia->prefix_len))
+			return ix;
+		}
+
+	return IPV6_IFADDR_IX_INVALID;
+	}
+
+/*
+ *  in6_addr2maix -- ã¢ãã¬ã¹ãããã«ãã­ã£ã¹ãã¢ãã¬ã¹ã®ã¤ã³ããã¯ã¹ã«å¤æããã
+ */
+
+int_t
+in6_addr2maix (T_IN6_ADDR *addr)
+{
+	if (addr->s6_addr8[0] == 0xff) {
+		if (addr->s6_addr8[1] == 0x02) {
+			if (addr->s6_addr8[11] == 0x01 && addr->s6_addr8[12] == 0xff)
+				return IPV6_MADDR_IX_SOL_NODE;
+			else
+				return IPV6_MADDR_IX_LL_ALL_NODE;
+			}
+		else
+			return IPV6_MADDR_IX_EXTRA;
+		}
+	else
+		return IPV6_MADDR_IX_EXTRA;
+	}
+
+/*
+ *  in6_update_ifa -- ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹æ
+å ±ãæ´æ°ããã
+ */
+
+ER
+in6_update_ifa (T_IFNET *ifp, T_IN6_IFADDR *ia, T_IN6_ADDR *addr,
+                uint_t prefix_len, uint32_t vltime, uint32_t pltime,
+                int_t router_index, int_t prefix_index, uint_t flags)
+{
+	T_IN6_ADDR	llsol;
+	ER		error = E_OK;
+	SYSTIM		now;
+
+	/* å¼æ°ããã§ãã¯ããã*/
+	if (addr == NULL)
+		return E_PAR;
+
+	/*
+	 *  æå¹æéããã§ãã¯ããã
+	 *  vltime (æå¹æé) ã¨ pltime (æ¨å¥¨æå¹æé) ã®åä½ã¯ [s]ã
+	 */
+	syscall(get_tim(&now));
+	now /= SYSTIM_HZ;
+
+	if (((vltime != ND6_INFINITE_LIFETIME) && (vltime + now < now)) || vltime == 0)
+		return E_PAR;
+
+	if ((pltime != ND6_INFINITE_LIFETIME) && (pltime + now < now))
+		return E_PAR;
+
+	/* ã¤ã³ã¿ãã§ã¼ã¹ãåæåããã*/
+	if ((error = in6_ifinit(ifp, ia, addr, prefix_len)) != E_OK)
+		return error;
+
+	if (IN6_IS_ADDR_LINKLOCAL(addr)) {
+
+		/* è¦è«ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ãç»é²ããã*/
+		llsol.s6_addr32[0] = IPV6_ADDR_INT32_MLL;
+		llsol.s6_addr32[1] = 0x00000000;
+		llsol.s6_addr32[2] = IPV6_ADDR_INT32_ONE;
+		llsol.s6_addr32[3] = addr->s6_addr32[3];
+		llsol.s6_addr8[12] = 0xff;
+		if ((error = in6_addmulti(ifp, &llsol)) != E_OK)
+			return error;
+
+		/* å
+¨ãã¼ãã»ãªã³ã¯ã­ã¼ã«ã«ã»ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ãç»é²ããã*/
+		llsol.s6_addr32[2] = 0x00000000;
+		llsol.s6_addr32[3] = IPV6_ADDR_INT32_ONE;
+		if ((error = in6_addmulti(ifp, &llsol)) != E_OK)
+			return error;
+
+		}
+
+	/* ã«ã¼ã¿ã¤ã³ããã¯ã¹ãè¨­å®ããã*/
+	ia->router_index = router_index;
+
+	/* ãã¬ãã£ãã¯ã¹ã¤ã³ããã¯ã¹ãè¨­å®ããã*/
+	ia->prefix_index = prefix_index;
+
+	/* ãã©ã°ãè¨­å®ããã*/
+	ia->flags  = flags & ~(IN6_IFF_DUPLICATED | IN6_IFF_NODAD);
+	ia->flags |= IN6_IFF_DEFINED;
+
+ 	/*
+ 	 *  ã¢ãã¬ã¹æå¹æéãè¨­å®ããã
+	 *  vltime (æå¹æé) ã¨ pltime (æ¨å¥¨æå¹æé) ã®åä½ã¯ [s]ã
+ 	 */
+	syscall(get_tim(&now));
+	now /= SYSTIM_HZ;
+
+ 	ia->lifetime.vltime = vltime;
+ 	if (vltime != ND6_INFINITE_LIFETIME)
+ 		ia->lifetime.expire = now + vltime;
+ 	else
+ 		ia->lifetime.expire = 0;
+
+ 	ia->lifetime.pltime = pltime;
+ 	if (pltime != ND6_INFINITE_LIFETIME)
+ 		ia->lifetime.preferred = now + pltime;
+ 	else
+ 		ia->lifetime.preferred = 0;
+
+	/* è¿é£æ¢ç´¢ã®åæè¨­å®ãè¡ãã*/
+	nd6_ifattach(ifp);
+
+	/* éè¤ã¢ãã¬ã¹æ¤åºãè¡ãã*/
+	if ((flags & IN6_IFF_NODAD) == 0) {
+		ia->flags |= IN6_IFF_TENTATIVE;
+		nd6_dad_start(ifp, ia, NULL);
+		}
+
+	return error;
+	}
+
+/*
+ * in6ifa_ifpwithix -- ã¤ã³ããã¯ã¹çªå·ããããããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã«
+ *                     å²ãå½ã¦ããã¦ããã¢ãã¬ã¹ãæ¢ç´¢ããã
+ */
+
+T_IN6_IFADDR *
+in6ifa_ifpwithix (T_IFNET *ifp, int_t ix)
+{
+	return ix < NUM_IN6_IFADDR_ENTRY? &ifp->in_ifaddrs[ix] : NULL;
+	}
+
+/*
+ * in6ifa_ifpwithrtrix -- ã«ã¼ã¿ã®ã¤ã³ããã¯ã¹çªå·ããããããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã«
+ *                        å²ãå½ã¦ããã¦ããã¢ãã¬ã¹ãæ¢ç´¢ããã
+ */
+
+T_IN6_IFADDR *
+in6ifa_ifpwithrtrix (T_IFNET *ifp, int_t router_index)
+{
+	int_t ix;
+
+	for (ix = NUM_IN6_IFADDR_ENTRY; ix -- > 0; )
+		if (ifp->in_ifaddrs[ix].router_index == router_index)
+			return &ifp->in_ifaddrs[ix];
+	return NULL;
+	}
+
+/*
+ * in6_ifawithifp -- å®å
+ã¢ãã¬ã¹ã«ãµããããéä¿¡å
+ã¢ãã¬ã¹ãã
+ *                   ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ããæ¢ç´¢ããã
+ */
+
+T_IN6_IFADDR *
+in6_ifawithifp (T_IFNET *ifp, T_IN6_ADDR *dst)
+{
+	uint_t	scope;
+	int_t	ix;
+
+	/* å®å
+ã¢ãã¬ã¹ã¨åãã¹ã³ã¼ãã®ã¢ãã¬ã¹ãè¿ãã*/
+	if ((ix = in6_addr2ifaix(dst)) != IPV6_IFADDR_IX_INVALID)
+		return &ifp->in_ifaddrs[ix];
+	else if ((ix = in6_addr2maix(dst)) == IPV6_MADDR_IX_SOL_NODE ||
+	          ix                       == IPV6_MADDR_IX_LL_ALL_NODE)
+		return &ifp->in_ifaddrs[IPV6_IFADDR_IX_LINKLOCAL];
+	else {
+		scope = in6_addrscope(dst);
+		for (ix = NUM_IN6_IFADDR_ENTRY; ix -- > 0; ) {
+			if ((ifp->in_ifaddrs[ix].flags & IN6_IFF_DEFINED) &&
+			    (ifp->in_ifaddrs[ix].flags & IN6_IFF_DETACHED) == 0 &&
+			    in6_addrscope(&ifp->in_ifaddrs[ix].addr) == scope) {
+				return &ifp->in_ifaddrs[ix];
+				}
+			}
+		return NULL;
+		}
+	}
+
+/*
+ * in6_if_up -- ã¤ã³ã¿ãã§ã¼ã¹èµ·åå¾ã®éè¤ã¢ãã¬ã¹æ¤åºãè¡ãã
+ */
+
+void
+in6_if_up (T_IFNET *ifp)
+{
+#if 0						/* ä¿ç */
+	int_t dad_delay, ix;
+#endif	/* of #if 0 */
+
+	in6_ifattach(ifp);
+
+#if 0						/* ä¿ç */
+	/* éè¤ã¢ãã¬ã¹æ¤åºãè¡ãã*/
+	dad_delay = 0;
+	for (ix = NUM_IN6_IFADDR_ENTRY; ix -- > 0; )
+		if ((ifp->in_ifaddrs[ix].flags & IN6_IFF_DEFINED) &&
+		    (ifp->in_ifaddrs[ix].flags & IN6_IFF_TENTATIVE))
+			nd6_dad_start(ifp, &ifp->in_ifaddrs[ix], &dad_delay);
+#endif	/* of #if 0 */
+
+#if NUM_ND6_RTR_SOL_RETRY > 0
+
+	/* ã«ã¼ã¿è¦è«ãåºåããã*/
+	nd6_rtrsol_ctl();
+
+#endif	/* of #if NUM_ND6_RTR_SOL_RETRY > 0 */
+	}
+
+/*
+ *  in6_are_prefix_equal -- ãã¬ãã£ãã¯ã¹ãåä¸ãèª¿ã¹ãã
+ */
+
+bool_t
+in6_are_prefix_equal (T_IN6_ADDR *addr, T_IN6_ADDR *prefix, uint_t prefix_len)
+{
+	uint_t bitlen, bytelen;
+
+	bytelen = prefix_len / 8;
+	if (memcmp(&addr->s6_addr, &prefix->s6_addr, bytelen))
+		return false;
+
+	bitlen = prefix_len % 8;
+	if (  addr->s6_addr[bytelen] >> (8 - bitlen) !=
+	    prefix->s6_addr[bytelen] >> (8 - bitlen))
+		return false;
+
+	return true;
+	}
+
+/*
+ *  in6_ifaddr_timer -- ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹ã®ç®¡çã¿ã¤ãã¼
+ */
+
+void
+in6_ifaddr_timer (T_IFNET *ifp)
+{
+	T_IN6_IFADDR	*ia;
+	SYSTIM		now;
+	int_t		ix;
+
+	syscall(get_tim(&now));
+	for (ix = NUM_IN6_IFADDR_ENTRY; ix -- > 0; ) {
+		ia = &ifp->in_ifaddrs[ix];
+
+		if ((ia->flags & IN6_IFF_DEFINED) == 0)
+			;
+		else if (IFA6_IS_INVALID(ia, now)) {
+
+			/*
+			 *  æå¹æéãéããã®ã§åé¤ããã
+			 */
+			ia->flags &= ~IN6_IFF_DEFINED;
+			}
+
+		else if (IFA6_IS_DEPRECATED(ia, now)) {
+
+			/*
+			 *  æ¨å¥¨æå¹æéãéããã®ã§éæ¨å¥¨ã«ããã
+			 */
+			ia->flags |= IN6_IFF_DEPRECATED;
+			}
+		}
+	}
+
+#endif /* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6.h	(revision 270)
@@ -0,0 +1,389 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/in6.h,v 1.7.2.4 2001/07/04 09:45:23 ume Exp $	*/
+/*	$KAME: in6.h,v 1.89 2001/05/27 13:28:35 itojun Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)in.h	8.3 (Berkeley) 1/3/94
+ */
+ 
+#ifndef _IN6_H_
+#define _IN6_H_
+
+/*
+ *  IPv6 ã¢ãã¬ã¹
+ */
+
+struct t_in6_addr {
+	union {
+		uint8_t		__u6_addr8[16];
+		uint16_t	__u6_addr16[8];
+		uint32_t	__u6_addr32[4];
+		} __u6_addr;
+	};
+
+#define s6_addr		__u6_addr.__u6_addr8
+#define s6_addr8	__u6_addr.__u6_addr8
+#define s6_addr16	__u6_addr.__u6_addr16
+#define s6_addr32	__u6_addr.__u6_addr32
+
+#ifndef T_IN6_ADDR_DEFINED
+
+typedef struct t_in6_addr T_IN6_ADDR;
+
+#define T_IN6_ADDR_DEFINED
+
+#endif	/* of #ifndef T_IN6_ADDR_DEFINED */
+
+/*
+ *  IPv6 ã¢ãã¬ã¹ã®åæåãã¼ã¿
+ */
+
+#define IPV6_ADDR_UNSPECIFIED_INIT	\
+	{{{ UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), \
+	    UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), \
+	    UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), \
+	    UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x00) }}}
+
+#define IPV6_ADDR_LINKLOCAL_ALLNODES_INIT	\
+	{{{ UINT_C(0xff), UINT_C(0x02), UINT_C(0x00), UINT_C(0x00), \
+	    UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), \
+	    UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), \
+	    UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x01) }}}
+
+#define IPV6_ADDR_LINKLOCAL_ALLROUTERS_INIT	\
+	{{{ UINT_C(0xff), UINT_C(0x02), UINT_C(0x00), UINT_C(0x00), \
+	    UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), \
+	    UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), \
+	    UINT_C(0x00), UINT_C(0x00), UINT_C(0x00), UINT_C(0x02) }}}
+
+/*
+ *  ã¢ãã¬ã¹ã®å®ç¾©
+ */
+
+#ifdef _NET_CFG_BYTE_ORDER
+
+#if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN
+
+#define IPV6_ADDR_INT32_ONE		ULONG_C(0x00000001)
+#define IPV6_ADDR_INT32_TWO		ULONG_C(0x00000002)
+#define IPV6_ADDR_INT32_0000FFFF	ULONG_C(0x0000ffff)
+#define IPV6_ADDR_INT32_MNL		ULONG_C(0xff010000)
+#define IPV6_ADDR_INT32_MLL		ULONG_C(0xff020000)
+#define IPV6_ADDR_INT32_ULL		ULONG_C(0xfe800000)
+#define IPV6_ADDR_INT16_ULL		UINT_C(0xfe80)
+#define IPV6_ADDR_INT16_USL		UINT_C(0xfec0)
+#define IPV6_ADDR_INT16_MLL		UINT_C(0xff02)
+
+#elif _NET_CFG_BYTE_ORDER == _NET_CFG_LITTLE_ENDIAN
+
+#define IPV6_ADDR_INT32_ONE		ULONG_C(0x01000000)
+#define IPV6_ADDR_INT32_TWO		ULONG_C(0x02000000)
+#define IPV6_ADDR_INT32_0000FFFF	ULONG_C(0xffff0000)
+#define IPV6_ADDR_INT32_MNL		ULONG_C(0x000001ff)
+#define IPV6_ADDR_INT32_MLL		ULONG_C(0x000002ff)
+#define IPV6_ADDR_INT32_ULL		ULONG_C(0x000080fe)
+#define IPV6_ADDR_INT16_ULL		UINT_C(0x80fe)
+#define IPV6_ADDR_INT16_USL		UINT_C(0xc0fe)
+#define IPV6_ADDR_INT16_MLL		UINT_C(0x02ff)
+
+#endif	/* #if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN */
+
+#endif	/* of #ifdef _NET_CFG_BYTE_ORDER */
+
+/*
+ *  ç¹å¥ãªã¢ãã¬ã¹ã®ãã§ãã¯
+ */
+
+/* ç¡æå® */
+
+#define IN6_IS_ADDR_UNSPECIFIED(a)	\
+	(memcmp((void *)(a), (void *)&in6_addr_unspecified, sizeof(T_IN6_ADDR)) == 0)
+
+/* ã«ã¼ãããã¯ */
+
+#define IN6_IS_ADDR_LOOPBACK(a)		\
+	(memcmp((void *)(a), (void *)&in6_addr_unspecified, sizeof(T_IN6_ADDR) - 1) == 0 && \
+	 (a)->s6_addr8[15] == 0x01)
+
+/* IPv4 äºæ */
+
+#define IN6_IS_ADDR_V4COMPAT(a)		\
+	(memcmp((void *)(a), (void *)&in6_addr_unspecified, sizeof(T_IN6_ADDR) - 4) == 0 && \
+	 (a)->s6_addr32[3] > IPV6_ADDR_INT32_ONE)
+
+/* IPv4 ããã */
+
+#define IN6_IS_ADDR_V4MAPPED(a)		\
+	(((a)->s6_addr32[0] == ULONG_C(0x00000000)) && \
+	 ((a)->s6_addr32[1] == ULONG_C(0x00000000)) && \
+	 ((a)->s6_addr32[2] == IPV6_ADDR_INT32_0000FFFF))
+
+/*
+ *  ã¹ã³ã¼ã ID
+ */
+
+#define IPV6_ADDR_SCOPE_NODELOCAL	UINT_C(0x01)
+#define IPV6_ADDR_SCOPE_LINKLOCAL	UINT_C(0x02)
+#define IPV6_ADDR_SCOPE_SITELOCAL	UINT_C(0x05)
+#define IPV6_ADDR_SCOPE_ORGLOCAL	UINT_C(0x08)
+#define IPV6_ADDR_SCOPE_GLOBAL		UINT_C(0x0e)
+
+/*
+ *  ã¦ãã­ã£ã¹ãã»ã¹ã³ã¼ã
+ *
+ *  æ³¨æ: ä¸ä½ 10 ãããã®ã¿ãã§ãã¯ããªããã°ãªããªããRFC2373 åç
+§
+ */
+
+/* ãªã³ã¯ã­ã¼ã«ã« */
+
+#define IN6_IS_ADDR_LINKLOCAL(a)	\
+	(((a)->s6_addr8[0] == UINT_C(0xfe)) && (((a)->s6_addr8[1] & UINT_C(0xc0)) == UINT_C(0x80)))
+
+/* ãµã¤ãã­ã¼ã«ã« */
+
+#define IN6_IS_ADDR_SITELOCAL(a)	\
+	(((a)->s6_addr8[0] == UINT_C(0xfe)) && (((a)->s6_addr8[1] & UINT_C(0xc0)) == UINT_C(0xc0)))
+
+/* éç´å¯è½ã¦ãã­ã£ã¹ã (ã°ã­ã¼ãã«) */
+
+#define IN6_IS_ADDR_AGGREGATE_UNICAST(a)	\
+	(((a)->s6_addr8[0] & UINT_C(0xe0)) == UINT_C(0x20))
+
+/*
+ *  ãã«ãã­ã£ã¹ã
+ */
+
+#define IN6_IS_ADDR_MULTICAST(a)	((a)->s6_addr8[0] == UINT_C(0xff))
+
+/* è¦è«ãã«ãã­ã£ã¹ã */
+
+#define IN6_IS_ADDR_NS_MULTICAST(a)	\
+	(((a)->s6_addr32[0] == IPV6_ADDR_INT32_MLL) && \
+	 ((a)->s6_addr32[1] == ULONG_C(0x00000000)) && \
+	 ((a)->s6_addr32[2] == IPV6_ADDR_INT32_ONE) && \
+	 ((a)->s6_addr8[12] == UINT_C(0xff)))
+
+/*
+ *  åä¸ã®ãã§ãã¯
+ */
+
+#define IN6_ARE_ADDR_EQUAL(a,b)		(memcmp((a), (b), sizeof(T_IN6_ADDR)) == 0)
+
+/*
+ *  çµè·¯å¶å¾¡ç¨å®ç¾©
+ */
+
+#define IPV6_RTHDR_TYPE_0		UINT_C(0)	/* IPv6 çµè·¯å¶å¾¡ãããã¿ã¤ã 0	*/
+
+/*
+ *  è¦å®å¤ã¨å¶éå¤
+ */
+
+#define IPV6_DEFAULT_MULTICAST_HOPS	1	/* ãã«ãã­ã£ã¹ãæã®ããããªãããã®è¦å®å¤ */
+
+/*
+ *  ITRON TCP/IPv6 ã¢ãã¬ã¹/ãã¼ãçªå·ã®å®ç¾©
+ */
+
+typedef struct t_ipv6ep {
+	T_IN6_ADDR	ipaddr;		/* IPv6 ã¢ãã¬ã¹	*/
+	uint16_t	portno;		/* ãã¼ãçªå·	*/
+	} T_IPV6EP;
+
+/*
+ *  ITRON/TCP/IP ç¨ IP ã¢ãã¬ã¹ã®å®ç¾©
+ */
+
+#define IPV6_ADDRANY		IPV6_ADDR_UNSPECIFIED_INIT
+
+/*
+ *  åççæç¨ IPv6 TCP åä»å£
+ */
+
+typedef struct t_tcp6_crep {
+	/* æ¨æº */
+	ATR		repatr;		/* åä»å£å±æ§		*/
+	T_IPV6EP	myaddr;		/* èªåã®ã¢ãã¬ã¹	*/
+	/* å®è£
+ä¾å­ */
+	} T_TCP6_CREP;
+
+#if defined(SUPPORT_INET6)
+#define T_TCP_CREP	T_TCP6_CREP
+#endif
+
+/*
+ *  åççæç¨ IPv6 UDP éä¿¡ç«¯ç¹
+ */
+
+typedef struct t_udp6_ccep {
+	/* æ¨æº */
+	ATR		cepatr;		/* UDP éä¿¡ç«¯ç¹å±æ§		*/
+	T_IPV6EP	myaddr;		/* èªåã®ã¢ãã¬ã¹		*/
+	FP		callback;	/* ã³ã¼ã«ããã¯é¢æ°		*/
+	/* å®è£
+ä¾å­ */
+	} T_UDP6_CCEP;
+
+#if defined(SUPPORT_INET6)
+#define T_UDP_CCEP	T_UDP6_CCEP
+#endif
+
+/*
+ *  IPv4 ã¨ IPv6 ãã³ã³ãã¤ã«æã«é¸æããããã®ãã¯ã­
+ */
+
+#if defined(SUPPORT_INET6)
+
+#define T_IN_ADDR			T_IN6_ADDR
+#define T_IPEP				T_IPV6EP
+#define IP_ADDRANY			IPV6_ADDRANY
+
+#define IN_ARE_ADDR_EQUAL(n,h)		IN6_ARE_ADDR_EQUAL(n,h)
+#define IN_ARE_NET_ADDR_EQUAL(n,h)	IN6_ARE_ADDR_EQUAL(n,h)
+#define IN_COPY_TO_NET(d,s)		memcpy(d,s,sizeof(T_IN6_ADDR))
+#define IN_COPY_TO_HOST(d,s)		memcpy(d,s,sizeof(T_IN6_ADDR))
+#define IN_IS_ADDR_MULTICAST(a)		IN6_IS_ADDR_MULTICAST(a)
+#define IN_IS_NET_ADDR_MULTICAST(a)	IN6_IS_ADDR_MULTICAST(a)
+#define IN_IS_ADDR_ANY(a)		IN6_IS_ADDR_UNSPECIFIED(a)
+
+#endif	/* of #if defined(SUPPORT_INET6) */
+
+/*
+ *  åæ¹åç
+§
+ */
+
+#ifndef T_IFNET_DEFINED
+
+typedef struct t_ifnet T_IFNET;
+
+#define T_IFNET_DEFINED
+
+#endif	/* of #ifndef T_IFNET_DEFINED */
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+extern T_IN6_ADDR in6_addr_unspecified;
+extern T_IN6_ADDR in6_addr_linklocal_allnodes;
+extern T_IN6_ADDR in6_addr_linklocal_allrouters;
+
+#define ipv6_addrany	in6_addr_unspecified
+
+/*
+ *  TINET ç¬èª API
+ */
+
+extern char *ipv62str (char *buf, const T_IN6_ADDR *p_ip6addr);
+extern ER_UINT in6_get_maxnum_ifaddr (void);
+extern const T_IN6_ADDR *in6_get_ifaddr (int_t index);
+
+#endif	/* of #ifndef _IN6_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6_ifattach.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6_ifattach.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6_ifattach.c	(revision 270)
@@ -0,0 +1,195 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/in6_ifattach.c,v 1.2.2.5 2001/08/13 16:26:17 ume Exp $	*/
+/*	$KAME: in6_ifattach.c,v 1.118 2001/05/24 07:44:00 itojun Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_loop.h>
+#include <net/if_ppp.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/net.h>
+
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet6/in6_ifattach.h>
+
+#include <net/if6_var.h>
+
+#ifdef SUPPORT_INET6
+
+/*
+ * EUI64 ã®å®ç¾©
+ */
+
+#define EUI64_UBIT		0x02
+
+#ifdef SUPPORT_ETHER
+
+/*
+ * get_mac6_ifid -- MAC (6 ãªã¯ããã) ã¢ãã¬ã¹ã§ãã¤ã³ã¿ãã§ã¼ã¹è­å¥å­ãè¨­å®ããã
+ */
+
+static ER
+get_mac6_ifid (T_IFNET *ifp, T_IN6_ADDR *ifra_addr)
+{
+	ifra_addr->s6_addr[ 8] = ifp->ic->ifaddr.lladdr[0] ^ EUI64_UBIT;
+	ifra_addr->s6_addr[ 9] = ifp->ic->ifaddr.lladdr[1];
+	ifra_addr->s6_addr[10] = ifp->ic->ifaddr.lladdr[2];
+	ifra_addr->s6_addr[11] = UINT_C(0xff);
+	ifra_addr->s6_addr[12] = UINT_C(0xfe);
+	ifra_addr->s6_addr[13] = ifp->ic->ifaddr.lladdr[3];
+	ifra_addr->s6_addr[14] = ifp->ic->ifaddr.lladdr[4];
+	ifra_addr->s6_addr[15] = ifp->ic->ifaddr.lladdr[5];
+
+	return E_OK;
+	}
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#ifdef IP6_CFG_AUTO_LINKLOCAL
+
+/*
+ *  in6_ifattach_linklocal -- ã¤ã³ã¿ãã§ã¼ã¹ã«ãªã³ã¯ã­ã¼ã«ã«ã»ã¢ãã¬ã¹ãå²ãå½ã¦ãã
+ */
+
+static ER
+in6_ifattach_linklocal (T_IFNET *ifp)
+{
+	T_IN6_ADDR	addr;
+	ER		error = E_OK;
+
+	/*
+	 *  ãªã³ã¯ã­ã¼ã«ã«ã»ãã¬ãã£ãã¯ã¹ fe80::/64 ãè¨­å®ããã
+	 */
+	addr.s6_addr32[0] = IPV6_ADDR_INT32_ULL;
+	addr.s6_addr32[1] = ULONG_C(0);
+
+	/* ã¤ã³ã¿ãã§ã¼ã¹è­å¥å­ãè¨­å®ããã*/
+	if ((error = IF_IN6_IFID(ifp, &addr)) != E_OK)
+		return error;
+
+	/* ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹æ
+å ±ãæ´æ°ããã*/
+	if ((error = in6_update_ifa(ifp, &ifp->in_ifaddrs[IPV6_IFADDR_IX_LINKLOCAL],
+	                            &addr, 64, ND6_INFINITE_LIFETIME,
+	                                       ND6_INFINITE_LIFETIME, 
+	                                       IN6_RTR_IX_UNREACH, ND6_PREFIX_IX_INVALID, 0)) != E_OK)
+		return error;
+
+	return error;
+	}
+
+#endif	/* of #ifdef IP6_CFG_AUTO_LINKLOCAL */
+
+/*
+ *  in6_ifattach -- ã¤ã³ã¿ãã§ã¼ã¹ã«ã¢ãã¬ã¹ãå²ãå½ã¦ãã
+ */
+
+ER
+in6_ifattach (T_IFNET *ifp)
+{
+	ER error = E_OK;
+
+#ifdef IP6_CFG_AUTO_LINKLOCAL
+
+	if ((ifp->in_ifaddrs[IPV6_IFADDR_IX_LINKLOCAL].flags & IN6_IFF_DEFINED) == 0)
+		if ((error = in6_ifattach_linklocal(ifp)) != E_OK)
+			return error;
+
+#endif	/* of #ifdef IP6_CFG_AUTO_LINKLOCAL */
+
+	return error;
+	}
+
+#endif /* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6_ifattach.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6_ifattach.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6_ifattach.h	(revision 270)
@@ -0,0 +1,87 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/in6_ifattach.h,v 1.3 2001/06/11 12:39:05 ume Exp $	*/
+/*	$KAME: in6_ifattach.h,v 1.14 2001/02/08 12:48:39 jinmei Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+ 
+#ifndef _IN6_IFATTACH_H_
+#define _IN6_IFATTACH_H_
+
+/*
+ *  é¢æ°
+ */
+
+extern ER in6_ifattach (T_IFNET *ifp);
+
+#endif	/* of #ifndef _IN6_IFATTACH_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6_rename.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6_rename.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6_rename.h	(revision 270)
@@ -0,0 +1,188 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _IN6_RENAME_H_
+#define _IN6_RENAME_H_
+
+/*
+ *  TCP/IPv6 ãã­ãã³ã«ã¹ã¿ãã¯å
+é¨åã®ãªãã¼ã 
+ */
+
+/* netinet6/in6.c */
+
+#define in6_addr_loopback	_tinet_in6_addr_loopback
+#define in6_ifainit		_tinet_in6_ifainit
+#define in6_addr2ifaix		_tinet_in6_addr2ifaix
+#define in6_addr2maix		_tinet_in6_addr2maix
+#define in6_update_ifa		_tinet_in6_update_ifa
+#define in6ifa_ifpwithix	_tinet_in6ifa_ifpwithix
+#define in6ifa_ifpwithrtrix	_tinet_in6ifa_ifpwithrtrix
+#define in6_ifawithifp		_tinet_in6_ifawithifp
+#define in6_if_up		_tinet_in6_if_up
+#define in6_rtalloc		_tinet_in6_rtalloc
+#define in6_are_prefix_equal	_tinet_in6_are_prefix_equal
+#define in6_addr_linklocal_allrouters	\
+				_tinet_in6_addr_linklocal_allrouters
+#define in6_addr_linklocal_allnodes	\
+				_tinet_in6_addr_linklocal_allnodes
+#define in6_ifaddr_timer	_tinet_in6_ifaddr_timer
+
+/* netinet6/in6_ifattach.c */
+
+#define in6_ifattach		_tinet_in6_ifattach
+
+/* netinet6/in6_subr.c */
+
+#define in6_lookup_multi	_tinet_in6_lookup_multi
+#define get_ip6_hdr_size	_tinet_get_ip6_hdr_size
+#define in6_lookup_ifaddr	_tinet_in6_lookup_ifaddr
+#define in6_get_datagram	_tinet_in6_get_datagram
+#define in6_cksum		_tinet_in6_cksum
+#define in6_is_dstaddr_accept	_tinet_in6_is_dstaddr_accept
+#define in6_plen2pmask		_tinet_in6_plen2pmask
+#define in6_init		_tinet_in6_init
+#define in6_rtredirect		_tinet_in6_rtredirect
+#define in6_gateway_lookup	_tinet_in6_gateway_lookup
+#define in6_set_header		_tinet_in6_set_header
+#define in6_hostcache_getmtu	_tinet_in6_hostcache_getmtu
+#define in6_hostcache_update	_tinet_in6_hostcache_update
+
+/* netinet6/if6_ether.c */
+
+#define ether_map_ipv6_multicast	\
+				_tinet_ether_map_ipv6_multicast
+
+/* netinet6/ip6_input.c */
+
+#define ip6_input		_tinet_ip6_input
+#define ip6_lasthdr		_tinet_ip6_lasthdr
+#define ip6_unknown_opt		_tinet_ip6_unknown_opt
+#define ip6_init		_tinet_ip6_init
+#define ip6_nexthdr		_tinet_ip6_nexthdr
+#define ip6_remove_exthdrs	_tinet_ip6_remove_exthdrs
+#define ip6_get_prev_hdr	_tinet_ip6_get_prev_hdr
+
+/* netinet6/ip6_output.c */
+
+#define ip6_output		_tinet_ip6_output
+#define linkmtu			_tinet_linkmtu
+
+/* netinet6/dest6.c */
+
+#define dest6_input		_tinet_dest6_input
+
+/* netinet6/rout6.c */
+
+#define route6_input		_tinet_route6_input
+
+/* netinet6/frag6.c */
+
+#define frag6_input		_tinet_frag6_input
+#define frag6_timer		_tinet_frag6_timer
+#define ip6_get_frag_queue	_tinet_ip6_get_frag_queue
+
+/* netinet6/ah_input.c */
+
+#define ah6_input		_tinet_ah6_input
+
+/* netinet6/esp_input.c */
+
+#define esp6_input		_tinet_esp6_input
+
+/* netinet6/icmp6.c */
+
+#define icmp6_input		_tinet_icmp6_input
+#define icmp6_error		_tinet_icmp6_error
+#define icmp6_echo_reply	_tinet_icmp6_echo_reply
+
+/* netinet6/nd6.c */
+
+#define nd6_ifattach		_tinet_nd6_ifattach
+#define nd6_is_addr_neighbor	_tinet_nd6_is_addr_neighbor
+#define nd6_cache_lladdr	_tinet_nd6_cache_lladdr
+#define nd6_output_hold		_tinet_nd6_output_hold
+#define nd6_init		_tinet_nd6_init
+#define nd6_output		_tinet_nd6_output
+#define nd6_options		_tinet_nd6_options
+#define nd6_storelladdr		_tinet_nd6_storelladdr
+#define nd6_lookup		_tinet_nd6_lookup
+#define nd6_get_drl		_tinet_nd6_get_drl
+#define nd6_get_cache		_tinet_nd6_get_cache
+#define nd6_timer		_tinet_nd6_timer
+
+/* netinet6/nd6_nbr.c */
+
+#define nd6_dad_start		_tinet_nd6_dad_start
+#define nd6_ns_input		_tinet_nd6_ns_input
+#define nd6_na_input		_tinet_nd6_na_input
+#define nd6_ns_output		_tinet_nd6_ns_output
+#define nd6_na_output		_tinet_nd6_na_output
+
+/* netinet6/nd6_rtr.c */
+
+#define nd6_router_lookup	_tinet_nd6_router_lookup
+#define nd6_defrtrlist_timer	_tinet_nd6_defrtrlist_timer
+#define nd6_prelist_timer	_tinet_nd6_prelist_timer
+#define nd6_ra_input		_tinet_nd6_ra_input
+#define nd6_rtrsol_ctl		_tinet_nd6_rtrsol_ctl
+#define ip6_defhlim		_tinet_ip6_defhlim
+#define nd6_reachable_time	_tinet_nd6_reachable_time
+#define nd6_base_reachable_time	_tinet_nd6_base_reachable_time
+#define nd6_recalc_reachtm_interval	\
+				_tinet_nd6_recalc_reachtm_interval
+#define nd6_retrans_time	_tinet_nd6_retrans_time
+#define nd6_defrtrlist_lookup	_tinet_nd6_defrtrlist_lookup
+#define nd6_prefix_onlink	_tinet_nd6_prefix_onlink
+#define nd6_prefix_offlink	_tinet_nd6_prefix_offlink
+#define nd6_get_prl		_tinet_nd6_get_prl
+#define nd6_get_drl		_tinet_nd6_get_drl
+#define nd6_defrtrlist_del	_tinet_nd6_defrtrlist_del
+
+/* netinet6/scope6.c */
+
+#define in6_addrscope		_tinet_in6_addrscope
+
+#endif	/* of #ifndef _IN6_RENAME_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6_subr.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6_subr.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6_subr.c	(revision 270)
@@ -0,0 +1,739 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1985, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+#include "tinet_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_loop.h>
+#include <net/if_ppp.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/net.h>
+#include <net/net_var.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet6/ah.h>
+#include <netinet6/nd6.h>
+
+#include <net/if6_var.h>
+
+#ifdef SUPPORT_INET6
+
+#if NUM_IN6_HOSTCACHE_ENTRY > 0
+
+/*
+ *  ãã¹ãã­ã£ãã·ã¥
+ */
+
+static T_IN6_HOSTCACHE_ENTRY in6_hostcache[NUM_IN6_HOSTCACHE_ENTRY];
+
+#endif	/* of #if NUM_IN6_HOSTCACHE_ENTRY > 0 */
+
+/*
+ *  in6_lookup_ifaddr -- ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã«å²ãå½ã¦ããã¦ããã¢ãã¬ã¹ãæ¢ç´¢ããã
+ */
+
+T_IN6_IFADDR *
+in6_lookup_ifaddr (T_IFNET *ifp, T_IN6_ADDR *addr)
+{
+	int_t ix;
+
+	for (ix = NUM_IN6_IFADDR_ENTRY; ix -- > 0; ) {
+		if ((ifp->in_ifaddrs[ix].flags & IN6_IFF_DEFINED) &&
+		    IN6_ARE_ADDR_EQUAL(addr, &ifp->in_ifaddrs[ix].addr))
+			return &ifp->in_ifaddrs[ix];
+		}
+	return NULL;
+	}
+
+/*
+ *  in6_lookup_multi -- ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ãæ¤ç´¢ããã
+ */
+
+bool_t
+in6_lookup_multi (T_IFNET *ifp, T_IN6_ADDR *maddr)
+{
+	int_t ix;
+
+	for (ix = MAX_IN6_MADDR_CNT; ix -- > 0; )
+		if (IN6_ARE_ADDR_EQUAL(maddr, &ifp->in_maddrs[ix]))
+			return true;
+	return false;
+	}
+
+/*
+ *  in6_set_header -- IPv6 ããããè¨­å®ããã
+ */
+
+ER
+in6_set_header (T_NET_BUF *nbuf, uint_t len,
+                T_IN6_ADDR *dstaddr, T_IN6_ADDR *srcaddr,
+                uint8_t next, uint8_t hlim)
+{
+	T_IFNET		*ifp = IF_GET_IFNET();
+	T_IP6_HDR	*ip6h;
+	T_IN6_IFADDR	*ia;
+
+	/*
+	 *  å®å
+ã¢ãã¬ã¹ã«ãµããããéä¿¡å
+ã¢ãã¬ã¹ãã
+	 *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ããæ¢ç´¢ãã¦å©ç¨ããã
+	 */
+	if (srcaddr == NULL || !IN6_IS_ADDR_UNSPECIFIED(srcaddr))
+		;
+	else if ((ia = in6_ifawithifp(ifp, dstaddr)) == NULL)
+		return E_SYS;
+	else
+		srcaddr = &ia->addr;
+
+	/* IPv6 ããããè¨­å®ããã*/
+	ip6h		= GET_IP6_HDR(nbuf);
+	ip6h->vcf	= htonl(IP6_MAKE_VCF(IPV6_VERSION, 0));
+	ip6h->plen	= htons(len);
+	ip6h->next	= next;
+	ip6h->hlim	= hlim;
+
+	if (dstaddr == NULL)
+		memset(&ip6h->dst, 0, sizeof(T_IN6_ADDR));
+	else
+		ip6h->dst = *dstaddr;
+
+	if (srcaddr == NULL)
+		memset(&ip6h->src, 0, sizeof(T_IN6_ADDR));
+	else
+		ip6h->src = *srcaddr;
+
+	return E_OK;
+	}
+
+/*
+ *  in6_get_datagram -- IPv6 ãã¼ã¿ã°ã©ã ãç²å¾ããããããè¨­å®ããã
+ */
+
+ER
+in6_get_datagram (T_NET_BUF **nbuf, uint_t len, uint_t maxlen,
+                  T_IN6_ADDR *dstaddr, T_IN6_ADDR *srcaddr,
+                  uint8_t next, uint8_t hlim, ATR nbatr, TMO tmout)
+{
+	ER		error;
+	uint_t		align;
+
+	/* ãã¼ã¿é·ã¯ 4 ãªã¯ãããå¢çã«èª¿æ´ããã	*/
+	align = (len + 3) >> 2 << 2;
+
+	/* ãããã¯ã¼ã¯ãããã¡ãç²å¾ããã	*/
+	if ((error = tget_net_buf_ex(nbuf, IF_IP6_HDR_SIZE + align,
+	                                   IF_IP6_HDR_SIZE + maxlen, nbatr, tmout)) != E_OK)
+		return error;
+
+	/*
+	 *  ããå¤§ããªãµã¤ãºã®ãããã¯ã¼ã¯ãããã¡ãç²å¾ããå ´åã®ã¿é·ããèª¿æ´ããã
+	 *  ããå°ããªãµã¤ãºã®ãããã¯ã¼ã¯ãããã¡ã®ç²å¾ã¯ãéä¿¡ã¦ã£ã³ããããã¡ã®
+	 *  çã³ãã¼æ©è½ã§ä½¿ç¨ãããå®éã«éä¿¡ããã¾ã§ããã¼ã¿ãµã¤ãºã¯æ±ºå®ã§ããªãã
+	 */
+	if ((nbatr & NBA_SEARCH_ASCENT) != 0)
+		(*nbuf)->len = IF_IP6_HDR_SIZE + len;
+
+	/* IPv6 ããããè¨­å®ããã*/
+	if ((error = in6_set_header(*nbuf, len, dstaddr, srcaddr, next, hlim)) != E_OK)
+		return error;
+
+	/* 4 ãªã¯ãããå¢çã¾ã§ããã£ã³ã°ã§åããã*/
+	if (align > len)
+		memset(GET_IP6_SDU(*nbuf) + len, 0, align - len);
+
+	return E_OK;
+	}
+
+/*
+ *  in6_get_maxnum_ifaddr -- ã¤ã³ã¿ãã§ã¼ã¹ã«è¨­å®å¯è½ãªæå¤§ã¢ãã¬ã¹æ°ãè¿ãã
+ */
+
+ER_UINT
+in6_get_maxnum_ifaddr (void)
+{
+	return NUM_IN6_IFADDR_ENTRY;
+	}
+
+/*
+ *  in6_get_ifaddr -- ã¤ã³ã¿ãã§ã¼ã¹ã«è¨­å®ããã¦ããã¢ãã¬ã¹ãè¿ãã
+ */
+
+const T_IN6_ADDR *
+in6_get_ifaddr (int_t index)
+{
+	T_IFNET		*ifp = IF_GET_IFNET();
+
+	if (index < NUM_IN6_IFADDR_ENTRY &&
+	    (ifp->in_ifaddrs[index].flags & IN6_IFF_DEFINED))
+		return &ifp->in_ifaddrs[index].addr;
+	else
+		return NULL;
+	}
+
+/*
+ *  ipv62str -- IPv6 ã¢ãã¬ã¹ãæå­åã«å¤æããã
+ */
+
+char *
+ipv62str (char *buf, const T_IN6_ADDR *p_ip6addr)
+{
+	static char	addr_sbuf[NUM_IPV6ADDR_STR_BUFF][sizeof("0123:4567:89ab:cdef:0123:4567:89ab:cdef")];
+	static int_t	bix = NUM_IPV6ADDR_STR_BUFF;
+
+	bool_t	omit = false, zero = false;
+	char	*start;
+	int_t	ix;
+
+	if (buf == NULL) {
+		syscall(wai_sem(SEM_IP2STR_BUFF_LOCK));
+		buf = addr_sbuf[-- bix];
+		if (bix <= 0)
+			bix = NUM_IPV6ADDR_STR_BUFF;
+		syscall(sig_sem(SEM_IP2STR_BUFF_LOCK));
+		}
+
+	start = buf;
+	if (p_ip6addr == NULL) {
+		*buf ++ = ':';
+		*buf ++ = ':';
+		}
+	else {
+		for (ix = 0; ix < sizeof(T_IN6_ADDR) / 2; ix ++) {
+			if (omit) {
+				buf += convert_hexdigit(buf, ntohs(p_ip6addr->s6_addr16[ix]), 16, 0, ' '); 
+				if (ix < 7)
+					*buf ++ = ':';
+				}
+			else if (ix > 0 && ix < 7 && p_ip6addr->s6_addr16[ix] == 0)
+				zero = true;
+			else {
+				if (zero) {
+					omit = true;
+					*buf ++ = ':';
+					}
+				buf += convert_hexdigit(buf, ntohs(p_ip6addr->s6_addr16[ix]), 16, 0, ' '); 
+				if (ix < 7)
+					*buf ++ = ':';
+				}
+			}
+		}
+	*buf = '\0';
+	return start;
+	}
+
+/*
+ *  in6_cksum -- IPv6 ã®ãã©ã³ã¹ãã¼ãå±¤ãããã®ãã§ãã¯ãµã ãè¨ç®ããã
+ *
+ *  æ³¨æ: æ»ãå¤ã¯ãããã¯ã¼ã¯ãã¤ããªã¼ã
+ */
+
+uint16_t
+in6_cksum (T_NET_BUF *nbuf, uint8_t proto, uint_t off, uint_t len)
+{
+	uint32_t	sum;
+	uint_t		align;
+
+	/* 4 ãªã¯ãããå¢çã®ãã¼ã¿é· */
+	align = (len + 3) >> 2 << 2;
+
+	/* 4 ãªã¯ãããå¢çã¾ã§ããã£ã³ã°ã§åããã*/
+	if (align > len)
+		memset((uint8_t*)nbuf->buf + off + len, 0, align - len);
+
+	sum = in_cksum_sum(nbuf->buf + off, align)
+	    + in_cksum_sum(&GET_IP6_HDR(nbuf)->src, sizeof(T_IN6_ADDR) * 2)
+	    + len + proto;
+	sum = in_cksum_carry(sum);
+
+	return ~htons((uint16_t)sum);
+	}
+
+/*
+ *  in6_is_dstaddr_accept -- å®å
+ã¢ãã¬ã¹ã¨ãã¦æ­£ããããã§ãã¯ããã
+ */
+
+bool_t
+in6_is_dstaddr_accept (T_IN6_ADDR *myaddr, T_IN6_ADDR *dstaddr)
+{
+	if (IN6_IS_ADDR_UNSPECIFIED(myaddr))
+		return in6_lookup_ifaddr(IF_GET_IFNET(), dstaddr) != NULL;
+	else
+		return IN6_ARE_ADDR_EQUAL(dstaddr, myaddr);
+	}
+
+/*
+ *  get_ip6_hdr_size -- æ¡å¼µããããå«ãã IPv6 ãããé·ãè¿ãã
+ */
+
+uint_t
+get_ip6_hdr_size (T_IP6_HDR *iph)
+{
+	uint_t	size = IP6_HDR_SIZE, hsize;
+	uint8_t	curr = iph->next, next;
+	uint8_t	*hdr = ((uint8_t *)iph) + IP6_HDR_SIZE;
+
+	while (1) {
+		next = *hdr;
+		if (curr ==IPPROTO_NONE)		/* æ¬¡ãããç¡ã			*/
+			break;
+		else if (curr == IPPROTO_FRAGMENT)	/* æ­çå			*/
+			hsize = sizeof(T_IP6_FRAG_HDR);
+		else if (curr == IPPROTO_AH)		/* IPv6 èªè¨¼			*/
+			hsize = (((T_IP6_AH_HDR *)hdr)->len + 2) * 4;
+		else if (curr == IPPROTO_HOPOPTS ||	/* ä¸­ç¶ç¹ (Hop-by-Hop) ãªãã·ã§ã³	*/
+		         curr == IPPROTO_DSTOPTS ||	/* IPv6 çµç¹ãªãã·ã§ã³		*/
+		         curr == IPPROTO_ROUTING)	/* çµè·¯å¶å¾¡			*/
+			hsize = (((T_IP6_EXT_HDR *)hdr)->len + 1) * 8;
+		else
+			break;
+		size += hsize;
+		hdr  += hsize;
+		curr = next;
+		}
+	return size;
+	}
+
+/*
+ *  in6_plen2pmask -- ãã¬ãã£ãã¯ã¹é·ãããã¹ã¯ãçæããã
+ */
+
+void
+in6_plen2pmask (T_IN6_ADDR *mask, uint_t prefix_len)
+{
+	uint8_t	*ptr, bit;
+
+	memset(mask->s6_addr + prefix_len / 8, 0, (128 - prefix_len + 7) / 8);
+	for (ptr = mask->s6_addr; prefix_len > 0; ptr ++) {
+		for (bit = 0x80; bit && (prefix_len > 0); prefix_len --) {
+			*ptr |= bit;
+			bit >>= 1;
+			}
+		}
+	}
+
+/*
+ *  in6_rtalloc -- ã«ã¼ãã£ã³ã°è¡¨ãæ¢ç´¢ããã
+ */
+
+T_IN6_ADDR *
+in6_rtalloc (T_IFNET *ifp, T_IN6_ADDR *dst)
+{
+	if (IN6_IS_ADDR_LINKLOCAL(dst) || IN6_IS_ADDR_MULTICAST(dst))
+		return dst;
+	else {
+		T_IN6_IFADDR	*ia;
+		SYSTIM		now;
+		int_t		ix;
+
+		/*
+		 *  ãµã¤ãã­ã¼ã«ã«ã¢ãã¬ã¹ãéç´å¯è½ï¼ã°ã­ã¼ãã«ï¼ã¢ãã¬ã¹ã®å ´åã¯ã
+		 *  åä¸ãªã³ã¯å
+ã®ãã¼ãã§ãããããã§ãã¯ããã
+		 */
+
+		syscall(get_tim(&now));
+		now /= SYSTIM_HZ;
+
+		/* æ¨å¥¨æå¹æéå
+ã®ã¢ãã¬ã¹ãæ¢ç´¢ããã*/
+		for (ix = NUM_IN6_IFADDR_ENTRY; ix -- > 0; ) {
+			ia = &ifp->in_ifaddrs[ix];
+			if (IFA6_IS_READY(ia) &&
+			    in6_are_prefix_equal(dst, &ia->addr, ia->prefix_len) &&
+			    (int32_t)(ia->lifetime.preferred - now) > 0) {
+		                   /* ia->lifetime.preferred > now */
+				return dst;
+				}
+			}
+
+		/* æå¹æéå
+ã®ã¢ãã¬ã¹ãæ¢ç´¢ããã*/
+		for (ix = NUM_IN6_IFADDR_ENTRY; ix -- > 0; ) {
+			ia = &ifp->in_ifaddrs[ix];
+			if (IFA6_IS_READY(ia) &&
+			    in6_are_prefix_equal(dst, &ia->addr, ia->prefix_len) &&
+			    (int32_t)(ia->lifetime.expire - now) > 0)
+		                   /* ia->lifetime.expire > now */
+				return dst;
+			}
+
+		/*
+		 *  ãã¬ãã£ãã¯ã¹ãæ¢ç´¢ããã
+		 */
+		if (nd6_onlink_prefix_lookup (dst) != NULL)
+			return dst;
+
+		/*
+		 *  éççµè·¯è¡¨ãæ¢ç´¢ããã
+		 */
+
+#if NUM_ROUTE_ENTRY > 0
+
+		syscall(wai_sem(SEM_IN_ROUTING_TBL));
+		for (ix = NUM_ROUTE_ENTRY; ix --; ) {
+			if ((routing_tbl[ix].flags & IN_RTF_DEFINED) &&
+			    in6_are_prefix_equal(dst, &routing_tbl[ix].target,
+			                               routing_tbl[ix].prefix_len)) {
+
+				/*
+				 *  åãç´ãã«ããã¨ã³ããªã¯ãæå¹æéãåããæå»ãå»¶é·ããã
+				 *  expire ã®åä½ã¯ [s]ã
+				 *  TMO_IN_REDIRECT ã®åä½ã¯ [ms]ã
+				 */
+				if (ix > NUM_STATIC_ROUTE_ENTRY) {
+					SYSTIM	now;
+
+					syscall(get_tim(&now));
+					routing_tbl[ix].expire = now / SYSTIM_HZ + TMO_IN_REDIRECT / 1000;
+					}
+
+				syscall(sig_sem(SEM_IN_ROUTING_TBL));
+				return &routing_tbl[ix].gateway;
+				}
+			}
+		syscall(sig_sem(SEM_IN_ROUTING_TBL));
+
+#endif	/* of #if NUM_ROUTE_ENTRY > 0 */
+
+		/*
+		 *  ãã£ãã©ã«ãã«ã¼ã¿ã»ãªã¹ããæ¢ç´¢ããã
+		 */
+		return nd6_router_lookup();
+		}
+	}
+
+#if NUM_REDIRECT_ROUTE_ENTRY > 0
+
+/*
+ *  in6_gateway_lookup -- ã«ã¼ãã£ã³ã°è¡¨ã®ã«ã¼ã¿ãæ¢ç´¢ããã
+ */
+
+T_IN_RTENTRY *
+in6_gateway_lookup (T_IN6_ADDR *gw)
+{
+	int_t	ix;
+
+	for (ix = NUM_ROUTE_ENTRY; ix --; )
+		if ((routing_tbl[ix].flags & IN_RTF_DEFINED) &&
+		    IN6_ARE_ADDR_EQUAL(&routing_tbl[ix].gateway, gw))
+			return &routing_tbl[ix];
+	return NULL;
+	}
+
+/*
+ *  in6_rtredirect -- ã«ã¼ãã£ã³ã°è¡¨ã«ã¨ã³ããªãç»é²ããã
+ *
+ *    æ³¨æ: å¼æ° tmo ã®åä½ã¯ [ms]ã
+ */
+
+void
+in6_rtredirect (T_IN6_ADDR *gateway, T_IN6_ADDR *target, uint_t prefix_len, uint8_t flags, uint32_t tmo)
+{
+	T_IN_RTENTRY	*frt;
+
+	frt = in_rtnewentry(flags, tmo);
+	frt->gateway    = *gateway;
+	frt->target     = *target;
+	frt->prefix_len = prefix_len;
+	}
+
+#endif	/* of #if NUM_REDIRECT_ROUTE_ENTRY > 0 */
+
+#if NUM_IN6_HOSTCACHE_ENTRY > 0
+
+/*
+ *  in6_hostcache_lookup -- IPv6 ãã¹ãã­ã£ãã·ã¥ãæ¢ç´¢ããã
+ */
+
+static T_IN6_HOSTCACHE_ENTRY*
+in6_hostcache_lookup (T_IN6_ADDR *dst)
+{
+	int_t ix;
+
+	for (ix = NUM_IN6_HOSTCACHE_ENTRY; ix -- > 0; ) {
+		if (IN6_ARE_ADDR_EQUAL(dst, &in6_hostcache[ix].dst))
+			return &in6_hostcache[ix];
+		}
+	return NULL;
+	}
+
+/*
+ *  in6_hostcache_update -- IPv6 ãã¹ãã­ã£ãã·ã¥ãæ´æ°ããã
+ */
+
+void
+in6_hostcache_update (T_IN6_ADDR *dst, uint32_t mtu)
+{
+	T_IN6_HOSTCACHE_ENTRY	*hc;
+	SYSTIM	now, old;
+	int_t	ix, oix;
+
+	syscall(get_tim(&now));
+
+	/* æ¢ã«ç»é²ããã¦ãããæ¢ç´¢ããã*/
+	if ((hc = in6_hostcache_lookup (dst)) == NULL) {
+
+		/* ç©ºãã®ãã¹ãã­ã£ãã·ã¥ãæ¢ãã*/
+		for (ix = NUM_IN6_HOSTCACHE_ENTRY; ix -- > 0; ) {
+			if (IN6_IS_HOSTCACHE_FREE(&in6_hostcache[ix]))
+				break;
+			}
+
+		if (ix < 0) {
+			/*
+			 *  ç©ºããç¡ãæã¯ãæå¹æéã®åããæéãã
+			 *  æãç­ããã¹ãã­ã£ãã·ã¥ãç½®æããã
+			 */
+			old = now - 1;
+			oix = 0;
+			for (ix = NUM_IN6_HOSTCACHE_ENTRY; ix -- > 0; ) {
+				hc = &in6_hostcache[ix];
+				if (IN6_IS_HOSTCACHE_BUSY(hc) && (int32_t)(hc->expire - old) < 0) {
+				                                        /* hc->expire < old */
+					oix = ix;
+					old = hc->expire;
+					}
+				}
+			ix = oix;
+			}
+		hc = &in6_hostcache[ix];
+		}
+	else if (mtu > hc->mtu &&
+	         (int32_t)(hc->expire - now) >= (IN6_HOSTCACHE_EXPIRE - IN6_HOSTCACHE_INCREASE)) {
+
+		/*
+		 *  æ¢ã«ç»é²ããã¦ãã¦ãæ°ãã MTU ããç»é²ããã¦ãã MTU ããå¤§ããã¨ãã
+		 *  IN6_HOSTCACHE_INCREASEï¼æ¨å¥¨ 10 åï¼éã¯æ´æ°ããªãã
+		 */
+		return;
+		}
+	hc->dst    = *dst;
+	hc->expire = now + IN6_HOSTCACHE_EXPIRE;
+	hc->mtu    = mtu;
+	}
+
+/*
+ *  in6_hostcache_getmtu -- IPv6 ãã¹ãã­ã£ãã·ã¥ããã MTU ãåå¾ããã
+ *
+ *    æ»ãå¤ã 0 ã§ããã°ããã¹ãã­ã£ãã·ã¥ã«ç»é²ããã¦ããªãã
+ */
+
+uint32_t
+in6_hostcache_getmtu (T_IN6_ADDR *dst)
+{
+	T_IN6_HOSTCACHE_ENTRY	*hc;
+
+	/* æ¢ã«ç»é²ããã¦ãããæ¢ç´¢ããã*/
+	if ((hc = in6_hostcache_lookup(dst)) == NULL)
+		return 0;
+	else
+		return hc->mtu;
+	}
+
+/*
+ *  in6_hostcache_timer -- IPv6 ãã¹ãã­ã£ãã·ã¥æ´æ°ã¿ã¤ãã¼
+ *
+ *    1ç§å¨æã§èµ·åãããã
+ */
+
+static void
+in6_hostcache_timer (void)
+{
+	static int_t interval = IN6_HOSTCACHE_PRUNE / SYSTIM_HZ;
+
+	SYSTIM	now;
+
+	interval --;
+	if (interval <= 0) {
+		syscall(get_tim(&now));
+		interval = IN6_HOSTCACHE_PRUNE / SYSTIM_HZ;
+		}
+	}
+
+#endif	/* of #if NUM_IN6_HOSTCACHE_ENTRY > 0 */
+
+/*
+ *  in6_timer -- IPv6 å
+±éã¿ã¤ãã¼
+ *
+ *    1ç§å¨æã§èµ·åãããã
+ */
+
+static void
+in6_timer (void)
+{
+#if NUM_REDIRECT_ROUTE_ENTRY > 0
+
+	in_rttimer();
+
+#endif	/* of #if NUM_REDIRECT_ROUTE_ENTRY > 0 */
+
+#ifdef IP6_CFG_FRAGMENT
+
+	frag6_timer();
+
+#endif	/* of #ifdef IP6_CFG_FRAGMENT */
+
+#if NUM_IN6_HOSTCACHE_ENTRY > 0
+
+	in6_hostcache_timer();
+
+#endif	/* of #if NUM_IN6_HOSTCACHE_ENTRY > 0 */
+
+	timeout((callout_func)in6_timer, NULL, IN_TIMER_TMO);
+	}
+
+/*
+ *  in6_init -- IPv6 å
+±éæ©è½ãåæåããã
+ */
+
+void
+in6_init (void)
+{
+#if NUM_REDIRECT_ROUTE_ENTRY > 0
+
+	in_rtinit();
+
+#endif	/* of #if NUM_REDIRECT_ROUTE_ENTRY > 0 */
+
+	timeout((callout_func)nd6_timer, NULL, ND6_TIMER_TMO);
+	timeout((callout_func)in6_timer, NULL, IN_TIMER_TMO);
+	}
+
+#endif /* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6_var.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6_var.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/in6_var.h	(revision 270)
@@ -0,0 +1,328 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/in6_var.h,v 1.3.2.2 2001/07/03 11:01:52 ume Exp $	*/
+/*	$KAME: in6_var.h,v 1.56 2001/03/29 05:34:31 itojun Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1985, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)in_var.h	8.1 (Berkeley) 6/10/93
+ */
+
+#ifndef _IN6_VAR_H_
+#define _IN6_VAR_H_
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  ã¢ãã¬ã¹æå¹æéæ§é ä½
+ */
+
+typedef struct in6_addr_lifetime {
+
+	/*
+	 * expire ã¨ perferred ã¯ãã·ã¹ãã ãèµ·åãã¦ããã®çµéæé
+	 */
+	uint32_t	expire;		/* æå¹æéãåããæå» [s]	*/
+	uint32_t	preferred;	/* æ¨å¥¨æå¹æéãåããæå» [s]	*/
+
+	/*
+	 * vltime ã¨ pltime ã¯ãè¿½å /å¤æ´ãã¦ããã®ç¸å¯¾æé
+	 */
+	uint32_t	vltime;		/* æå¹æé [ms]			*/
+	uint32_t	pltime;		/* æ¨å¥¨æå¹æé [ms]		*/
+	} __attribute__((packed, aligned(2)))T_IN6_ADDR_LIFETIME;
+
+/*
+ *  ã¤ã³ã¿ãã§ã¼ã¹ã¢ãã¬ã¹æ§é ä½
+ */
+
+typedef struct t_in6_ifaddr {
+	T_IN6_ADDR		addr;		/* IPv6 ã¢ãã¬ã¹		*/
+	T_IN6_ADDR_LIFETIME	lifetime;	/* æå¹æé		*/
+	uint8_t			flags;		/* ãã©ã°		*/
+	uint8_t			prefix_len;	/* ãã¬ãã£ãã¯ã¹é·	*/
+	uint8_t			router_index;	/* ã«ã¼ã¿ã¤ã³ããã¯ã¹	*/
+	uint8_t			prefix_index;	/* ãã¬ãã£ãã¯ã¹ã¤ã³ããã¯ã¹	*/
+	uint8_t			na_icount;	/* éè¤ã¢ãã¬ã¹æ¤åº (DAD) éç¥ã®å
+¥ååæ°	*/
+	uint8_t			ns_icount;	/* éè¤ã¢ãã¬ã¹æ¤åº (DAD) è¦è«ã®å
+¥ååæ°	*/
+	uint8_t			ns_ocount;	/* éè¤ã¢ãã¬ã¹æ¤åº (DAD) è¦è«ã®åºååæ°	*/
+	} __attribute__((packed, aligned(2)))T_IN6_IFADDR;
+
+/*
+ *  ã¢ãã¬ã¹ç¶æ
+ãã©ã°
+ */
+
+#define IN6_IFF_ANYCAST		UINT_C(0x01)	/* ã¨ãã¼ã­ã£ã¹ã	*/
+#define IN6_IFF_DEFINED		UINT_C(0x02)	/* å®ç¾©æ¸ã¿		*/
+#define IN6_IFF_TENTATIVE	UINT_C(0x04)	/* éè¤æ¤åºä¸­		*/
+#define IN6_IFF_DUPLICATED	UINT_C(0x08)	/* éè¤ãæ¤åºãã	*/
+#define IN6_IFF_DEPRECATED	UINT_C(0x10)	/* éæ¨å¥¨		*/
+#define IN6_IFF_NODAD		UINT_C(0x20)	/* éè¤æ¤åºä¸è¦		*/
+#define IN6_IFF_AUTOCONF	UINT_C(0x40)	/* èªåè¨­å®ããã	*/
+#define IN6_IFF_DETACHED	UINT_C(0x80)	/* éä½¿ç¨		*/
+
+/*
+ *  ã¢ãã¬ã¹ã®æå¹æ§ãã§ãã¯
+ */
+
+#define IFA6_IS_READY(a)	(((a)->flags & IN6_IFF_DEFINED) != 0 && \
+				 ((a)->flags & (IN6_IFF_TENTATIVE|IN6_IFF_DUPLICATED|IN6_IFF_DETACHED)) == 0)
+#define IFA6_IS_NOTREADY(a)	(((a)->flags & IN6_IFF_DEFINED) == 0 ||	\
+				 ((a)->flags & (IN6_IFF_TENTATIVE|IN6_IFF_DUPLICATED|IN6_IFF_DETACHED)) != 0)
+
+#define IFA6_IS_DEPRECATED(a,n)	\
+	((a)->lifetime.preferred != 0 && (int32_t)((a)->lifetime.preferred - ((n / SYSTIM_HZ))) < 0)
+
+#define IFA6_IS_INVALID(a,n)	\
+	((a)->lifetime.expire != 0 && (int32_t)((a)->lifetime.expire - ((n / SYSTIM_HZ))) < 0)
+
+/*
+ *  ã«ã¼ã¿ã®ã¤ã³ããã¯ã¹
+ */
+
+#define IN6_RTR_IX_UNREACH	0xff
+
+/*
+ *  å¶éå¤
+ */
+
+#define IP6_HDR_NEST_LIMIT	50	/* IPv6 ãããã®ãã¹ãå¶éå¤	*/
+
+/*
+ *  ã¢ãã¬ã¹æ
+å ±é
+åã®ã¤ã³ããã¯ã¹
+ */
+
+#define IPV6_IFADDR_IX_LINKLOCAL	0
+#define IPV6_IFADDR_IX_INVALID		0xff
+
+/*
+ *  IPv6 ãã«ãã­ã£ã¹ãã¢ãã¬ã¹é
+åã®ã¤ã³ããã¯ã¹
+ */
+
+#define IPV6_MADDR_IX_SOL_NODE		0	/* è¦è«ãã«ãã­ã£ã¹ãã»ã¢ãã¬ã¹			*/
+#define IPV6_MADDR_IX_LL_ALL_NODE	1	/* å
+¨ãã¼ãã»ãªã³ã¯ã­ã¼ã«ã«ã»ãã«ãã­ã£ã¹ãã¢ãã¬ã¹	*/
+#define IPV6_MADDR_IX_EXTRA		2
+
+#define MAX_IN6_MADDR_CNT		MAX_IF_MADDR_CNT
+						/* IPv6 ãã«ãã­ã£ã¹ãã¢ãã¬ã¹é
+åã®æå¤§ãµã¤ãº	*/
+
+/*
+ *  ã«ã¼ãã£ã³ã°ã®å¶å¾¡
+ */
+
+/* ã«ã¼ãã£ã³ã°è¡¨ã¨ã³ããªæ§é ä½ */
+
+typedef struct t_in6_rtentry {
+	T_IN6_ADDR	target;		/* ç®æ¨ãããã¯ã¼ã¯ã¢ãã¬ã¹	*/
+	T_IN6_ADDR	gateway;	/* ã²ã¼ãã¦ã§ã¤ã® IP ã¢ãã¬ã¹	*/
+	uint32_t	expire;		/* æå¹æéãåããæå» [s]	*/
+	uint8_t		flags;		/* ãã©ã°			*/
+	uint8_t		prefix_len;	/* ãã¬ãã£ãã¯ã¹é·		*/
+	} __attribute__((packed, aligned(2)))T_IN6_RTENTRY;
+
+/*
+ *  ãã¹ãã­ã£ãã·ã¥
+ */
+
+/* ãã¹ãã­ã£ãã·ã¥æ§é ä½ */
+
+typedef struct t_in6_hostcache_entry {
+	T_IN6_ADDR	dst;		/* ç®æ¨ãããã¯ã¼ã¯ã¢ãã¬ã¹	*/
+	uint32_t	expire;		/* æå¹æéãåããæå» [s]	*/
+	uint32_t	mtu;		/* Path MTU			*/
+	} __attribute__((packed, aligned(2)))T_IN6_HOSTCACHE_ENTRY;
+
+#define IN6_HOSTCACHE_EXPIRE	(60*60*SYSTIM_HZ)	/* æå¹æé	*/
+#define IN6_HOSTCACHE_PRUNE	(5*60*SYSTIM_HZ)	/* æ´æ°éé	*/
+#define IN6_HOSTCACHE_INCREASE	(10*60*SYSTIM_HZ)	/* å¢å ããå ´åã®ä¿è­·æé	*/
+
+#define IN6_IS_HOSTCACHE_FREE(e)	IN6_IS_ADDR_UNSPECIFIED(&((e)->dst))
+#define IN6_IS_HOSTCACHE_BUSY(e)	(!IN6_IS_HOSTCACHE_FREE(e))
+
+/*
+ *  IPv4 ã¨ IPv6 ãã³ã³ãã¤ã«æã«é¸æããããã®ãã¯ã­
+ */
+
+#define IN_SET_HEADER(nbuf,len,dst,src,next,hlim)	\
+					in6_set_header(nbuf,len,dst,src,next,hlim)
+#define IN_GET_DATAGRAM(nbuf,len,maxlen,dst,src,next,hlim,nbatr,tmout)	\
+					in6_get_datagram(nbuf,len,maxlen,dst,src,next,hlim,nbatr,tmout)
+#define IN_CKSUM(nbuf,proto,off,len)	in6_cksum(nbuf,proto,off,len)
+#define IN_IS_DSTADDR_ACCEPT(myaddr,dstaddr)			\
+					in6_is_dstaddr_accept(myaddr,dstaddr)
+#define IN_IFAWITHIFP(ifp,dst)		in6_ifawithifp(ifp,dst)
+#define T_IN_IFADDR			T_IN6_IFADDR
+#define T_IN_RTENTRY			T_IN6_RTENTRY
+
+/*
+ *  åæ¹åç
+§
+ */
+
+#ifndef T_IFNET_DEFINED
+
+typedef struct t_ifnet T_IFNET;
+
+#define T_IFNET_DEFINED
+
+#endif	/* of #ifndef T_IFNET_DEFINED */
+
+/*
+ *  å¤æ°
+ */
+
+extern uint32_t linkmtu;
+
+/*
+ *  é¢æ°
+ */
+
+extern void in6_ifainit (void);
+extern int_t in6_addr2maix (T_IN6_ADDR *addr);
+extern ER in6_update_ifa (T_IFNET *ifp, T_IN6_IFADDR *ia, T_IN6_ADDR *addr,
+                          uint_t prefix_len, uint32_t vltime, uint32_t pltime,
+                          int_t router_index, int_t prefix_index, uint_t flags);
+extern ER in6_set_header (T_NET_BUF *nbuf, uint_t len,
+                          T_IN6_ADDR *dstaddr, T_IN6_ADDR *srcaddr,
+                          uint8_t next, uint8_t hlim);
+extern ER in6_get_datagram (T_NET_BUF **nbuf, uint_t len, uint_t maxlen,
+                            T_IN6_ADDR *dstaddr, T_IN6_ADDR *srcaddr,
+                            uint8_t next, uint8_t hlim, ATR nbatr, TMO tmout);
+extern uint16_t in6_cksum (T_NET_BUF *nbuf, uint8_t proto, uint_t off, uint_t len);
+extern T_IN6_IFADDR *in6ifa_ifpwithix (T_IFNET *ifp, int_t ix);
+extern T_IN6_IFADDR *in6ifa_ifpwithrtrix (T_IFNET *ifp, int_t rtr_ix);
+extern T_IN6_IFADDR *in6_ifawithifp (T_IFNET *ifp, T_IN6_ADDR *dst);
+extern void ip6_input (T_NET_BUF *input);
+extern T_IN6_IFADDR *in6_lookup_ifaddr (T_IFNET *ifp, T_IN6_ADDR *addr);
+extern bool_t in6_lookup_multi (T_IFNET *ifp, T_IN6_ADDR *maddr);
+extern bool_t in6_is_dstaddr_accept (T_IN6_ADDR *myaddr, T_IN6_ADDR *dstaddr);
+extern T_IN6_ADDR *in6_rtalloc (T_IFNET *ifp, T_IN6_ADDR *dst);
+extern int_t in6_if2idlen (T_IFNET *ifp);
+extern int_t in6_addr2ifaix (T_IN6_ADDR *addr);
+extern void in6_plen2pmask (T_IN6_ADDR *mask, uint_t prefix_len);
+extern bool_t in6_are_prefix_equal (T_IN6_ADDR *addr, T_IN6_ADDR *prefix,
+                                  uint_t prefix_len);
+extern void in6_ifaddr_timer (T_IFNET *ifp);
+extern T_IN6_RTENTRY *in6_gateway_lookup (T_IN6_ADDR *src);
+extern void in6_rtredirect (T_IN6_ADDR *gateway, T_IN6_ADDR *target,
+                            uint_t prefix_len, uint8_t flags, uint32_t tmo);
+extern void in6_init (void);
+extern void in6_if_up (T_IFNET *ifp);
+extern void in6_hostcache_update (T_IN6_ADDR *dst, uint32_t mtu);
+extern uint32_t in6_hostcache_getmtu (T_IN6_ADDR *dst);
+extern uint_t in6_addrscope (T_IN6_ADDR *addr);
+extern const T_NET_BUF**ip6_get_frag_queue (void);
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef _IN6_VAR_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ip6.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ip6.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ip6.cfg	(revision 270)
@@ -0,0 +1,80 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  IPv6 ã§ä½¿ç¨ããã«ã¼ãã«ãªãã¸ã§ã¯ã
+ */
+
+#ifdef SUPPORT_INET6
+
+/* è¿é£ã­ã£ãã·ã¥ */
+
+CRE_SEM(SEM_ND6_CACHE, { TA_TPRI, 1, 1 });
+
+#if NUM_ND6_DEF_RTR_ENTRY > 0
+
+/* ãã£ãã©ã«ãã«ã¼ã¿ã»ãªã¹ã */
+
+CRE_SEM(SEM_ND6_DEFRTRLIST, { TA_TPRI, 1, 1 });
+
+#endif	/* of #if NUM_ND6_DEF_RTR_ENTRY > 0 */
+
+#ifdef IP6_CFG_FRAGMENT
+
+/* åå²ããã */
+
+CRE_SEM(SEM_IP6_FRAG_QUEUE, { TA_TPRI, 1, 1 });
+
+#endif	/* of #ifdef IP6_CFG_FRAGMENT */
+
+#if NUM_REDIRECT_ROUTE_ENTRY > 0
+
+/* ã«ã¼ãã£ã³ã°è¡¨ï¼åãç´ãï¼*/
+
+CRE_SEM(SEM_IN_ROUTING_TBL, { TA_TPRI, 1, 1 });
+
+#endif	/* of #if NUM_REDIRECT_ROUTE_ENTRY > 0 */
+
+#endif	/* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ip6_input.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ip6_input.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ip6_input.c	(revision 270)
@@ -0,0 +1,683 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/ip6_input.c,v 1.11.2.10 2001/07/24 19:10:18 brooks Exp $	*/
+/*	$KAME: ip6_input.c,v 1.194 2001/05/27 13:28:35 itojun Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ip_input.c	8.2 (Berkeley) 1/4/94
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_loop.h>
+#include <net/if_ppp.h>
+#include <net/ethernet.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet/icmp6.h>
+#include <netinet6/ah6.h>
+#include <netinet6/esp6.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_timer.h>
+#include <netinet/tcp_var.h>
+#include <netinet/udp_var.h>
+
+#include <net/if6_var.h>
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  é¢æ°
+ */
+
+static uint_t ip6_no_header_input (T_NET_BUF **inputp, uint_t *offp, uint_t *nextp);
+
+/*
+ *  ä¸ä½ãã­ãã³ã«é¸ææ§é ä½
+ */
+
+typedef struct t_proto_switch {
+	uint_t (*func)(T_NET_BUF **, uint_t *, uint_t *);	/* å
+¥åé¢æ°		*/
+	uint_t proto;						/* ãã­ãã³ã«çªå·	*/
+	} T_PROTO_SWITCH;
+
+static const T_PROTO_SWITCH proto_switch[] = {
+	{ esp6_input,	IPPROTO_ESP		},	/* IPv6 æå·åããã	*/
+	{ ah6_input,	IPPROTO_AH		},	/* IPv6 èªè¨¼ããã	*/
+	{ frag6_input,	IPPROTO_FRAGMENT	},	/* æ­çããã		*/
+	{ route6_input,	IPPROTO_ROUTING		},	/* çµè·¯å¶å¾¡ããã	*/
+	{ dest6_input,	IPPROTO_DSTOPTS		},	/* IPv6 çµç¹ãªãã·ã§ã³	*/
+	{ ip6_no_header_input,
+			IPPROTO_NONE		},	/* æ¬¡ãããç¡ã		*/
+	{ icmp6_input,	IPPROTO_ICMPV6		},
+
+#ifdef SUPPORT_UDP
+
+	{ udp_input,	IPPROTO_UDP		},
+
+#endif	/* of #ifdef SUPPORT_UDP */
+
+#ifdef SUPPORT_TCP
+
+	{ tcp_input,	IPPROTO_TCP		},
+
+#endif	/* of #ifdef SUPPORT_TCP */
+
+	};
+
+#ifdef SUPPORT_MIB
+
+T_IN6_IFSTAT in6_ifstat;
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+/*
+ *  get_upper_proto -- ä¸ä½ãã­ãã³ã«å¦çé¢æ°ãè¿ãã
+ */
+
+static uint_t (*
+get_upper_proto(uint_t proto))(T_NET_BUF **, uint_t *, uint_t *)
+{
+	int_t ix;
+
+	for (ix = sizeof(proto_switch) / sizeof(T_PROTO_SWITCH); ix -- > 0; )
+		if (proto_switch[ix].proto == proto)
+			return proto_switch[ix].func;
+	return NULL;
+	}
+
+/*
+ *  ip6_no_header_input -- æ¬¡ããããç¡ãã®å ´åã®å
+¥åå¦ç
+ */
+
+static uint_t
+ip6_no_header_input (T_NET_BUF **input, uint_t *offp, uint_t *nextp)
+{
+	syscall(rel_net_buf(*input));
+	return IPPROTO_DONE;
+	}
+
+/*
+ *  ip6_hopopts_input -- ä¸­ç¶ç¹ãªãã·ã§ã³å
+¥åå¦ç
+ *
+ *    æ¬å®è£
+ã§ã¯ãããã£ã³ã°ä»¥å¤ã®ãªãã·ã§ã³ãå
+¨ã¦æªç¥ãªãã·ã§ã³ã¨ãã¦å¦çããã
+ *
+ *    æ»ãå¤:
+ *
+ *      0 ä»¥ä¸ 		æ­£å¸¸
+ *      IP6_OPT_RET_ERR (-1)	ã¨ã©ã¼ãå¼åºå´ã§ãããã¯ã¼ã¯ãããã¡ãéæ¾ããã
+ *      IP6_OPT_RET_REL (-2)	ã¨ã©ã¼ããããã¯ã¼ã¯ãããã¡ã¯éæ¾ããã¦ããã
+ */
+
+static ER_UINT
+ip6_hopopts_input (T_NET_BUF *input, uint_t *offp, uint_t *nextp)
+{
+	T_IP6_HBH_HDR	*hbh;
+	ER_UINT		optlen;
+	uint_t		len;
+	uint8_t		*opt;
+
+	hbh    = (T_IP6_HBH_HDR *)(input->buf + *offp);
+	len    = (hbh->len + 1) << 3;
+	*nextp = *offp - IF_HDR_SIZE + offsetof(T_IP6_HBH_HDR, next);
+	*offp += len;
+	opt    = (uint8_t *)hbh + sizeof(T_IP6_HBH_HDR);
+
+	for (len -= sizeof(T_IP6_HBH_HDR); len > 0; len -= optlen) {
+		switch (*opt) {
+		case IP6OPT_PAD1:
+			optlen = 1;
+			break;
+		case IP6OPT_PADN:
+			if (len < IP6OPT_MINLEN)
+				return IP6_OPT_RET_ERR;
+			optlen = *(opt + 1) + 2;
+			break;
+		case IP6OPT_JUMBO:
+		case IP6OPT_NSAP_ADDR:
+		case IP6OPT_TUNNEL_LIMIT:
+		case IP6OPT_RTR_ALERT:
+		default:
+			if (len < IP6OPT_MINLEN)
+				return IP6_OPT_RET_ERR;
+			optlen = ip6_unknown_opt(input, opt);
+			if (optlen < 0)
+				return optlen;
+			optlen += 2;
+			break;
+			}
+
+		opt += optlen;
+		}
+
+	return *offp;
+	}
+
+/*
+ *  ip6_get_prev_hdr -- ç´åã®æ¡å¼µãããã® next ãã£ã¼ã«ãã®ã¢ãã¬ã¹ãè¿ãã
+ *
+ *    æ³¨æ: off ã«ã¯ IF_HDR_SIZE ãå«ã¾ãã¦ããã
+ */
+
+uint8_t *
+ip6_get_prev_hdr (T_NET_BUF *nbuf, uint_t off)
+{
+	T_IP6_HDR	*ip6h;
+	T_IP6_EXT_HDR	*ip6eh;
+	uint_t		len;
+	uint8_t		next;
+
+	ip6h = GET_IP6_HDR(nbuf);
+	if (off == IF_HDR_SIZE + sizeof(T_IP6_HDR))
+		return &ip6h->next;
+	else {
+		next  = ip6h->next;
+		len   = IF_HDR_SIZE + sizeof(T_IP6_HDR);
+		ip6eh = NULL;
+
+		while (len < off) {
+			ip6eh = (T_IP6_EXT_HDR *)(nbuf->buf + len);
+
+			switch (next) {
+			case IPPROTO_FRAGMENT:
+				len += sizeof(T_IP6_FRAG_HDR);
+				break;
+			case IPPROTO_AH:
+				len += (ip6eh->len + 2) << 2;
+				break;
+			default:
+				len += (ip6eh->len + 2) << 3;
+				break;
+				}
+			next  = ip6eh->next;
+			}
+
+		if (ip6eh == NULL)
+			return NULL;
+		else
+			return &ip6eh->next;
+		}
+	}
+
+/*
+ *  ip6_init -- IPv6 ã®åæåé¢æ°
+ */
+
+void
+ip6_init (void)
+{
+	in6_init();
+	in6_ifainit();
+	}
+
+/*
+ *  ip6_input -- IPv6 ã®å
+¥åé¢æ°
+ */
+
+void
+ip6_input (T_NET_BUF *input)
+{
+	T_IP6_HDR	*ip6h;
+	T_IN6_IFADDR	*ia6;
+	T_IFNET		*ifp;
+	ER_UINT		noff;
+	uint_t		next, nest, plen, offp, nextp;
+	uint_t		(*func)(T_NET_BUF **, uint_t *, uint_t *);
+
+	NET_COUNT_IP6(net_count_ip6[NC_IP6_IN_OCTETS], input->len - IF_HDR_SIZE);
+	NET_COUNT_IP6(net_count_ip6[NC_IP6_IN_PACKETS], 1);
+	NET_COUNT_MIB(in6_ifstat.ipv6IfStatsInReceives, 1);
+
+	/* IP ãããã®é·ãããã§ãã¯ããã*/
+	if (input->len < IF_IP6_HDR_SIZE) {
+		NET_COUNT_IP6(net_count_ip6[NC_IP6_IN_ERR_SHORT], 1);
+		NET_COUNT_MIB(in6_ifstat.ipv6IfStatsInHdrErrors, 1);
+		goto buf_rel;
+		}
+
+	ip6h = GET_IP6_HDR(input);
+
+	/* ãã¼ã¸ã§ã³ããã§ãã¯ããã*/
+	if (IP6_VCF_V(ntohl(ip6h->vcf)) != IPV6_VERSION) {
+		NET_COUNT_IP6(net_count_ip6[NC_IP6_IN_ERR_VER], 1);
+		NET_COUNT_MIB(in6_ifstat.ipv6IfStatsInHdrErrors, 1);
+		goto buf_rel;
+		}
+
+	/*
+	 *  æ¬¡ã®ãã¼ã¿ã°ã©ã ã¯ç ´æ£ããã
+	 *
+	 *    ã»å§ç¹ã¢ãã¬ã¹ããã«ãã­ã£ã¹ã
+	 *    ã»çµç¹ã¢ãã¬ã¹ãæªå®ç¾©
+	 *
+	 *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ãã«ã¼ãããã¯ã§ãªãã¨ãã
+	 *  æ¬¡ã®ãã¼ã¿ã°ã©ã ãç ´æ£ããã
+	 *
+	 *    ã»å§ç¹ã¢ãã¬ã¹ãã«ã¼ãããã¯
+	 *    ã»çµç¹ã¢ãã¬ã¹ãã«ã¼ãããã¯
+	 *
+	 *  æªæã®ããã¦ã¼ã¶ã TCP/UDP ã¹ã¿ãã¯ã®æ··ä¹±ã
+	 *  ã»ã­ã¥ãªãã£ãã§ãã¯ããã¤ãã¹ãããããIPv4
+	 *  ãããã¢ãã¬ã¹ãæªç¨ãããã¨ãé²ããã
+	 *  ä»¥ä¸ã®ãã¼ã¿ã°ã©ã ã¯ç ´æ£ããã  
+	 *
+	 *    ã»å§ç¹ã¢ãã¬ã¹ã ::ffff:127.0.0.1
+	 *    ã»çµç¹ã¢ãã¬ã¹ã ::ffff:127.0.0.1
+	 */
+
+	if (IN6_IS_ADDR_MULTICAST(&ip6h->src) ||
+	    IN6_IS_ADDR_UNSPECIFIED(&ip6h->dst)) {
+		NET_COUNT_IP6(net_count_ip6[NC_IP6_IN_ERR_ADDR], 1);
+		NET_COUNT_MIB(in6_ifstat.ipv6IfStatsInAddrErrors, 1);
+		goto buf_rel;
+		}
+
+	if (IN6_IS_ADDR_V4MAPPED(&ip6h->src) ||
+	    IN6_IS_ADDR_V4MAPPED(&ip6h->dst)) {
+		NET_COUNT_IP6(net_count_ip6[NC_IP6_IN_ERR_ADDR], 1);
+		NET_COUNT_MIB(in6_ifstat.ipv6IfStatsInAddrErrors, 1);
+		goto buf_rel;
+		}
+
+#ifdef SUPPORT_LOOP
+
+#else	/* of #ifdef SUPPORT_LOOP */
+
+	if (IN6_IS_ADDR_LOOPBACK(&ip6h->src) ||
+	    IN6_IS_ADDR_LOOPBACK(&ip6h->dst)) {
+		NET_COUNT_IP6(net_count_ip6[NC_IP6_IN_ERR_ADDR], 1);
+		NET_COUNT_MIB(in6_ifstat.ipv6IfStatsInAddrErrors, 1);
+		goto buf_rel;
+		}
+
+#endif	/* of #ifdef SUPPORT_LOOP */
+
+	ifp = IF_GET_IFNET();
+
+	if (IN6_IS_ADDR_MULTICAST(&ip6h->dst)) {
+		/* å®å
+ããã«ãã­ã£ã¹ãã®å ´åã®å¦ç */
+		NET_COUNT_MIB(in6_ifstat.ipv6IfStatsInMcastPkts, 1);
+		if (!in6_lookup_multi(ifp, &ip6h->dst)) {
+			NET_COUNT_IP6(net_count_ip6[NC_IP6_IN_ERR_ADDR], 1);
+			NET_COUNT_MIB(in6_ifstat.ipv6IfStatsInAddrErrors, 1);
+			goto buf_rel;
+			}
+		}
+	else {
+		if ((ia6 = in6_lookup_ifaddr(ifp, &ip6h->dst)) == NULL) {
+			NET_COUNT_IP6(net_count_ip6[NC_IP6_IN_ERR_ADDR], 1);
+			NET_COUNT_MIB(in6_ifstat.ipv6IfStatsInAddrErrors, 1);
+			goto buf_rel;
+			}
+
+		/*  ã¢ãã¬ã¹ãæªè§£æ±ºã®å ´åã¯ãã¼ã¿ã°ã©ã ãç ´æ£ããã*/
+		if (IFA6_IS_NOTREADY(ia6)) {
+			NET_COUNT_IP6(net_count_ip6[NC_IP6_IN_ERR_ADDR], 1);
+			NET_COUNT_MIB(in6_ifstat.ipv6IfStatsInAddrErrors, 1);
+			goto buf_rel;
+			}
+		}
+
+	/* ãªãã»ãããè¨­å®ããã*/
+	offp  = GET_IP6_NEXT_HDR(input) - input->buf;
+
+	/* ãã¤ã­ã¼ãé·ãåãåºãã*/
+	plen = ntohs(ip6h->plen);
+
+
+	/* æ¬¡ãããã®ä½ç½®ãåæåããã*/
+	nextp = offsetof(T_IP6_HDR, next);
+
+	/*
+	 *  ä¸­ç¶ç¹ (Hop-by-Hop) ãªãã·ã§ã³ãããã®ãã§ãã¯
+	 */
+	if (ip6h->next == IPPROTO_HOPOPTS) {
+
+		/* ä¸­ç¶ç¹ãããã®é·ãããã§ãã¯ããã*/
+		if (plen < sizeof(T_IP6_HBH_HDR)) {
+			NET_COUNT_IP6(net_count_ip6[NC_IP6_IN_ERR_SHORT], 1);
+			NET_COUNT_MIB(in6_ifstat.ipv6IfStatsInHdrErrors, 1);
+			goto buf_rel;
+			}
+
+		if ((noff = ip6_hopopts_input(input, &offp, &nextp)) < 0) {
+			if (noff == IP6_OPT_RET_ERR) {
+				NET_COUNT_IP6(net_count_ip6[NC_IP6_IN_ERR_PACKETS], 1);
+				NET_COUNT_MIB(in6_ifstat.ipv6IfStatsInHdrErrors, 1);
+				goto buf_rel;
+				}
+			else if (noff == IP6_OPT_RET_REL) {
+				NET_COUNT_IP6(net_count_ip6[NC_IP6_IN_ERR_PACKETS], 1);
+				NET_COUNT_MIB(in6_ifstat.ipv6IfStatsInHdrErrors, 1);
+				return;
+				}
+			}
+
+		/*
+		 *  ãã¤ã­ã¼ãé·ã 0 ã§ãä¸­ç¶ç¹ãªãã·ã§ã³ãããã¨ãã¯ã
+		 *  å·¨å¤§ãã¤ã­ã¼ãã»ãªãã·ã§ã³ãå«ã¾ããªããã°ãªããªãã
+		 *  ãã®ã¨ããå·¨å¤§ãã¤ã­ã¼ãã»ãªãã·ã§ã³ã«ãã
+		 *  ãã¤ã­ã¼ãé·ããã§ãã¯ããå¿
+è¦ãããããæ¬å®è£
+ã§ã¯ã
+		 *  å·¨å¤§ãã¤ã­ã¼ãã»ãªãã·ã§ã³ãæªç¥ã®ãªãã·ã§ã³ã¨ãã¦
+		 *  æ±ãã®ã§ãä½ãããªãã
+		 */
+		next = ((T_IP6_HBH_HDR *)(ip6h + 1))->next;
+		}
+	else
+		next = ip6h->next;
+
+	/* IPv6 ãã¼ã¿ã°ã©ã é·ããã§ãã¯ããã*/
+	if (input->len - IF_IP6_HDR_SIZE < plen) {
+		NET_COUNT_IP6(net_count_ip6[NC_IP6_IN_ERR_SHORT], 1);
+		NET_COUNT_MIB(in6_ifstat.ipv6IfStatsInTruncatedPkts, 1);
+		goto buf_rel;
+		}
+	else if (input->len > IF_IP6_HDR_SIZE + plen)
+		input->len = IF_IP6_HDR_SIZE + plen;
+
+	/* ä¸ä½ãã­ãã³ã«å¦çé¢æ°ãå¼ã³åºãã*/
+	nest = 0;
+	while (next != IPPROTO_DONE) {
+		if (++ nest > IP6_HDR_NEST_LIMIT) {
+			NET_COUNT_IP6(net_count_ip6[NC_IP6_IN_ERR_PROTO], 1);
+			NET_COUNT_MIB(in6_ifstat.ipv6IfStatsInUnknownProtos, 1);
+			goto buf_rel;
+			}
+		else if ((func = get_upper_proto(next)) == NULL) {
+			NET_COUNT_IP6(net_count_ip6[NC_IP6_IN_ERR_PROTO], 1);
+			NET_COUNT_IP6(net_count_ip6[NC_IP6_IN_ERR_PACKETS], 1);
+			NET_COUNT_MIB(in6_ifstat.ipv6IfStatsInUnknownProtos, 1);
+
+			/* icmp6_error ã§ãããã¯ã¼ã¯ãããã¡ãéæ¾ããã*/
+			icmp6_error(input, ICMP6_PARAM_PROB,
+			                   ICMP6_PARAMPROB_NEXT_HEADER, nextp);
+			return;
+			}
+		else {
+			next = (*func)(&input, &offp, &nextp);
+			}
+		}
+	return;
+
+buf_rel:
+	NET_COUNT_IP6(net_count_ip6[NC_IP6_IN_ERR_PACKETS], 1);
+	syscall(rel_net_buf(input));
+	}
+
+/*
+ *  ip6_nexthdr -- æ¬¡ã®ãããã®ãªãã»ãããè¿ãã
+ *
+ *    æ»ãå¤ == -1 : æå¾ã®ããããã¾ãã¯ã¨ã©ã¼ã
+ *    æ»ãå¤ >   0 : ããã«ããããç¶ãã
+ */
+
+ER_UINT
+ip6_nexthdr (T_NET_BUF *nbuf, uint_t off, uint_t proto, uint_t *nextp)
+{
+	T_IP6_FRAG_HDR	*ip6fh;
+	T_IP6_EXT_HDR	*ip6eh;
+
+	switch (proto) {
+
+	case IPPROTO_IPV6:				/* IPv6 */
+		if (nbuf->len < off + IP6_HDR_SIZE)
+			return (ER_UINT)-1;
+		*nextp = ((T_IP6_HDR *)(nbuf->buf + off))->next;
+		return off + IP6_HDR_SIZE;
+		break;
+
+	case IPPROTO_FRAGMENT:			/* æ­çããã */
+		if (nbuf->len < off + sizeof(T_IP6_FRAG_HDR))
+			return (ER_UINT)-1;
+
+		/* ä¸­éã®ãã©ã°ã¡ã³ãã®å ´åã¯å¦çããããã*/
+		ip6fh = (T_IP6_FRAG_HDR *)(nbuf->buf + off);
+		if (ntohs(ip6fh->off_flag) & IP6F_MORE_FRAG)
+			return (ER_UINT)-1;
+
+		*nextp = ip6fh->next;
+		return off + sizeof(T_IP6_FRAG_HDR);
+		break;
+
+	case IPPROTO_AH:		/* IPv6 èªè¨¼ããã			*/
+	case IPPROTO_HOPOPTS:		/* IPv6 ä¸­ç¶ç¹ (Hop-by-Hop) ãªãã·ã§ã³	*/
+	case IPPROTO_ROUTING:		/* çµè·¯å¶å¾¡ããã			*/
+	case IPPROTO_DSTOPTS:		/* IPv6 çµç¹ãªãã·ã§ã³			*/
+		if (nbuf->len < off + sizeof(T_IP6_EXT_HDR))
+			return (ER_UINT)-1;
+
+		ip6eh = (T_IP6_EXT_HDR *)(nbuf->buf + off);
+		*nextp =  ip6eh->next;
+		if (proto == IPPROTO_AH)
+			return off + ((ip6eh->len + 2) << 2);
+		else
+			return off + ((ip6eh->len + 1) << 3);
+		break;
+		}
+
+	return (ER_UINT)-1;
+	}
+
+/*
+ *  ip6_lasthdr -- æå¾ã®ãããã®ãªãã»ãããè¿ãã
+ */
+
+ER_UINT
+ip6_lasthdr (T_NET_BUF *nbuf, uint_t off, uint_t proto, uint_t *nextp)
+{
+	ER_UINT	newoff;
+
+	while (1) {
+		newoff = ip6_nexthdr(nbuf, off, proto, nextp);
+		if (newoff < 0)
+			return (ER_UINT)off;
+		off   = newoff;
+		proto = *nextp;
+		}
+	return (ER_UINT)0u;
+	}
+
+/*
+ *  ip6_unknown_opt -- æªç¥ã®ãªãã·ã§ã³ã®å¦ç
+ *
+ *    æ»ãå¤:
+ *
+ *      0 ä»¥ä¸ 			æ­£å¸¸ããªãã·ã§ã³é·ã
+ *      IP6_OPT_RET_ERR (-1)	ã¨ã©ã¼ãå¼åºå´ã§ãããã¯ã¼ã¯ãããã¡ãéæ¾ããã
+ *      IP6_OPT_RET_REL (-2)	ã¨ã©ã¼ããããã¯ã¼ã¯ãããã¡ã¯éæ¾ããã¦ããã
+ */
+
+ER_UINT
+ip6_unknown_opt (T_NET_BUF *input, uint8_t *opt)
+{
+	switch (IP6OPT_TYPE(*opt)) {
+	case IP6OPT_TYPE_SKIP:		/* ç¡è¦ããã			*/
+		return *(opt + 1);
+		break;
+	case IP6OPT_TYPE_ICMP:		/* ç ´æ£ãã¦ããã«ãã­ã£ã¹ãã§ãªããã° ICMP ãè¿éããã	*/
+		if (IN6_IS_ADDR_MULTICAST(&GET_IP6_HDR(input)->dst))
+			return IP6_OPT_RET_ERR;
+		/* no break; */
+	case IP6OPT_TYPE_FORCEICMP:	/* ç ´æ£ãã¦ãICMP ãè¿éããã	*/
+		icmp6_error(input, ICMP6_PARAM_PROB,
+		                   ICMP6_PARAMPROB_OPTION,
+		                   (opt - input->buf) - IF_HDR_SIZE);
+		return IP6_OPT_RET_REL;
+		break;
+	/*case IP6OPT_TYPE_DISCARD:	ãã¼ã¿ã°ã©ã ãç ´æ£ããã	*/
+		}
+
+	return IP6_OPT_RET_ERR;
+	}
+
+/*
+ *  ip6_remove_exthdrs -- IPv6 æ¡å¼µããããåé¤ããä»¥éãåã«è©°ããã
+ */
+
+ER
+ip6_remove_exthdrs (T_NET_BUF *nbuf)
+{
+	ER_UINT	off;
+	uint_t	next;
+
+	/* éå§ãªãã»ããã IP ãããã«è¨­å®ããã*/
+	off = ((uint8_t *)GET_IP_HDR(nbuf)) - nbuf->buf;
+
+	/* æçµããããæ¢ç´¢ããã*/
+	off = ip6_lasthdr(nbuf, off, IPPROTO_IPV6, &next);
+
+	if (off <= 0)
+		return E_OBJ;
+	else {
+		uint_t sdu;
+
+		sdu = GET_IP_SDU(nbuf) - nbuf->buf;
+		if (off > sdu) {
+			memmove(nbuf->buf + sdu, nbuf->buf + off, off - sdu);
+			GET_IP_HDR(nbuf)->plen -= off - sdu;
+			nbuf->len              -= off - sdu;
+			}
+		}
+	return E_OK;
+	}
+
+#endif /* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ip6_output.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ip6_output.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ip6_output.c	(revision 270)
@@ -0,0 +1,392 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/ip6_output.c,v 1.43 2002/10/31 19:45:48 ume Exp $	*/
+/*	$KAME: ip6_output.c,v 1.279 2002/01/26 06:12:30 jinmei Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ip_output.c	8.3 (Berkeley) 1/21/94
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_loop.h>
+#include <net/if_ppp.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet/icmp6.h>
+
+#include <net/if6_var.h>
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+/* ãªã³ã¯ MTU */
+
+uint32_t	linkmtu = IF_MTU;
+
+/*
+ *  å±æå¤æ°
+ */
+
+#ifdef IP6_CFG_FRAGMENT
+
+static uint32_t	ip6_id;
+
+#endif	/* of #ifdef IP6_CFG_FRAGMENT */
+
+/*
+ *  ip6_output -- IPv6 ã®åºåé¢æ°
+ */
+
+ER
+ip6_output (T_NET_BUF *output, uint16_t flags, TMO tmout)
+{
+	T_IP6_HDR	*ip6h;
+	T_IN6_ADDR	*gw;
+	T_IFNET		*ifp = IF_GET_IFNET();
+	ER		error = E_OK;
+
+#ifdef IP6_CFG_FRAGMENT
+
+	T_IP6_HDR	*fip6h;
+	T_IP6_FRAG_HDR	*fip6f;
+	T_NET_BUF	*frag;
+	uint32_t	mtu, id;
+	uint16_t	plen, foff, flen;
+	uint8_t		nextproto;
+	bool_t		alwaysfrag = false;
+
+#endif	/* of #ifdef IP6_CFG_FRAGMENT */
+
+	ip6h = GET_IP6_HDR(output);
+
+	NET_COUNT_IP6(net_count_ip6[NC_IP6_OUT_OCTETS],
+	              GET_IP_HDR_SIZE(ip6h) + GET_IP_SDU_SIZE(ip6h));
+	NET_COUNT_IP6(net_count_ip6[NC_IP6_OUT_PACKETS], 1);
+	NET_COUNT_MIB(in6_ifstat.ipv6IfStatsOutRequests, 1);
+
+	/*
+	 *  éè¤ã¢ãã¬ã¹æ¤åºè¦è«ä»¥å¤ã«ã¯ãéä¿¡å
+ã¢ãã¬ã¹ã«
+	 *  ç¡æå®ãæå®ã§ããªãã
+	 */
+	if (IN6_IS_ADDR_UNSPECIFIED(&ip6h->src) && (flags & IPV6_OUT_FLG_DAD) == 0) {
+		error = E_PAR;
+		goto drop;
+		}
+
+	/* éä¿¡å
+ã¢ãã¬ã¹ã«ã¯ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ãæå®ã§ããªãã*/
+	if (IN6_IS_ADDR_MULTICAST(&ip6h->src)) {
+		error = E_PAR;
+		goto drop;
+		}
+
+	/*
+	 *  çµè·¯é¸æãè¡ãã
+	 */
+	if ((gw = in6_rtalloc(ifp, &ip6h->dst)) == NULL) {
+		error = E_PAR;
+		goto drop;
+		}
+
+	if (!IN6_IS_ADDR_MULTICAST(&ip6h->dst)) {
+		/* ã¦ãã­ã£ã¹ãã¢ãã¬ã¹ã®å¦ç */
+		}
+	else {
+		/* ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ã®å¦ç */
+		NET_COUNT_MIB(in6_ifstat.ipv6IfStatsOutMcastPkts, 1);
+		if (flags & IPV6_OUT_FLG_HOP_LIMIT)
+			ip6h->hlim = IPV6_OUT_GET_HOP_LIMIT(flags);
+		else
+			ip6h->hlim = IPV6_DEFAULT_MULTICAST_HOPS;
+		}
+
+	/* Traffic Class ã¨ Flow Label ããµãã¼ãããªãã®ã§ 0 ã«è¨­å®ããã*/
+	ip6h->vcf = htonl(IP6_MAKE_VCF(IPV6_VERSION, 0));
+
+#ifdef IP6_CFG_FRAGMENT
+
+
+#if NUM_IN6_HOSTCACHE_ENTRY > 0
+
+	mtu = in6_hostcache_getmtu(&ip6h->dst);
+
+	if (0 < mtu && mtu <= IPV6_MMTU) {
+
+		/*
+		 *  Path MTU ãç»é²ããã¦ããå ´åã
+		 *  MTU ã IPv6 MMTUï¼1280 ãªã¯ãããï¼ä»¥ä¸ã®å ´åã¯ã
+		 *  MTU ã IPv6 MMTU ã«è¨­å®ãåå²ãã¦éä¿¡ããã
+		 */
+		mtu = IPV6_MMTU;
+		alwaysfrag = true;
+		}
+	else if (mtu == 0)
+		mtu  = linkmtu;
+
+#else	/* of #if NUM_IN6_HOSTCACHE_ENTRY > 0 */
+
+	mtu  = linkmtu;
+
+#endif	/* of #if NUM_IN6_HOSTCACHE_ENTRY > 0 */
+
+	plen = ntohs(ip6h->plen);
+	if (plen + IP6_HDR_SIZE <= mtu && !alwaysfrag) {
+
+		/* åå²ããå¿
+è¦ããªãã¨ãã®å¦ç */
+		if ((error = nd6_output(ifp, output, gw, NULL, tmout)) != E_OK) {
+			NET_COUNT_IP6(net_count_ip6[NC_IP6_OUT_ERR_PACKETS], 1);
+			NET_COUNT_MIB(in6_ifstat.ipv6IfStatsOutDiscards, 1);
+			}
+		}
+	else {
+
+		/* æ­ç ID ãè¨­å®ããã*/
+		id = ip6_id ++;
+
+		/* MTU ã IPv6 ã®æå¤§ãã±ãããµã¤ãºãè¶
+ããªãããã«ããã*/
+		if (mtu > IPV6_MAXPACKET)
+			mtu = IPV6_MAXPACKET;
+
+		/*
+		 *  MTU ãããåå²ä¸è½é¨åï¼TINET-1.4 ã§ã¯ãåå²ãããä»¥å¤ã®
+		 *  æ¡å¼µãããã®åºåã¯æªå®è£
+ã®ãã 0 ãªã¯ãããï¼
+		 *  ã¨æ­çãããã®ãµã¤ãºãå¼ããã¨ãã8 ãªã¯ãããä»¥ä¸ãªããã°
+		 *  åå²ãã¦éä¿¡ã§ããªãããã¨ã©ã¼ã«ããã
+		 */
+		if (((mtu - sizeof(T_IP6_FRAG_HDR)) & ~7) < 8) {
+			error = E_PAR;
+			goto drop;
+			}
+
+		/*
+		 *  IPv6 ãããã® next ãã£ã¼ã«ãã«è¨­å®ããå¤ã¯ãæ­çãããã
+		 *  æ­çãããã®  next ãã£ã¼ã«ãã«è¨­å®ããå¤ã¯ã
+		 *  å
+ã®ãã¼ã¿ã°ã©ã ã® next ãã£ã¼ã«ãã®å¤ã
+		 */
+		nextproto  = ip6h->next;
+		ip6h->next = IPPROTO_FRAGMENT;
+
+		/* åå²ãã¦éä¿¡ããã*/
+		NET_COUNT_IP6(net_count_ip6[NC_IP6_FRAG_OUT], 1);
+		for (foff = 0; foff < plen; foff += flen) {
+
+			/* æ­çã®é·ããè¨ç®ãã8 ãªã¯ãããå¢çã«èª¿æ´ããã*/
+			if (foff + (mtu - (IP6_HDR_SIZE + sizeof(T_IP6_FRAG_HDR))) < plen)
+				flen = (mtu - (IP6_HDR_SIZE + sizeof(T_IP6_FRAG_HDR))) >> 3 << 3;
+			else
+				flen = plen - foff;
+
+			/* ãããã¯ã¼ã¯ãããã¡ãç²å¾ããã*/
+			if (tget_net_buf(&frag, flen + IF_IP6_HDR_SIZE + sizeof(T_IP6_FRAG_HDR), TMO_IP6_FRAG_GET_NET_BUF) == E_OK) {
+
+				/* IPv6 ããããã³ãã¼ããã*/
+				fip6h = GET_IP6_HDR(frag);
+				*fip6h = *ip6h;
+
+				/* IPv6 ããããåããã*/
+				fip6h->plen	= htons(flen + sizeof(T_IP6_FRAG_HDR));
+
+				/* æ­çããããåããã*/
+				fip6f = (T_IP6_FRAG_HDR *)GET_IP6_NEXT_HDR(frag);
+				fip6f->off_flag	= htons((uint16_t)(foff & ~7));
+				if (foff + (mtu - (IP6_HDR_SIZE + sizeof(T_IP6_FRAG_HDR))) < plen)
+					fip6f->off_flag	|= IP6F_MORE_FRAG;
+				fip6f->reserved	= 0;
+				fip6f->ident	= htonl(id);
+				fip6f->next	= nextproto;
+
+				/* SDU ãã³ãã¼ããã*/
+				memcpy((uint8_t*)(fip6f + 1), GET_IP6_NEXT_HDR(output) + foff, flen);
+				NET_COUNT_IP6(net_count_ip6[NC_IP6_FRAG_OUT_FRAGS], 1);
+				NET_COUNT_MIB(in6_ifstat.ipv6IfStatsOutFragCreates, 1);
+
+				/* éä¿¡ããã*/
+				if ((error = nd6_output(ifp, frag, gw, NULL, tmout)) != E_OK) {
+					NET_COUNT_MIB(in6_ifstat.ipv6IfStatsOutFragFails, 1);
+					goto drop;
+					}
+				}
+			else {
+				/* ãããã¯ã¼ã¯ãããã¡ãç²å¾ã§ããªããã°ãéä¿¡ããããããã*/
+				error = E_NOMEM;
+				goto drop;
+				}
+			}
+
+		/* IF ã§ãããã¯ã¼ã¯ãããã¡ãéæ¾ããªããã©ã°ããã§ãã¯ããã*/
+		if ((output->flags & NB_FLG_NOREL_IFOUT) == 0) {
+			syscall(rel_net_buf(output));
+			}
+		else
+			output->flags &= (uint8_t)~NB_FLG_NOREL_IFOUT;
+
+		NET_COUNT_MIB(in6_ifstat.ipv6IfStatsOutFragOKs, 1);
+		}
+
+#else	/* #ifdef IP6_CFG_FRAGMENT */
+
+	if ((error = nd6_output(ifp, output, gw, NULL, tmout)) != E_OK) {
+		NET_COUNT_IP6(net_count_ip6[NC_IP6_OUT_ERR_PACKETS], 1);
+		NET_COUNT_MIB(in6_ifstat.ipv6IfStatsOutDiscards, 1);
+		}
+
+#endif	/* #ifdef IP6_CFG_FRAGMENT */
+
+	return error;
+
+drop:
+	/* IF ã§ãããã¯ã¼ã¯ãããã¡ãéæ¾ããªããã©ã°ããã§ãã¯ããã*/
+	if ((output->flags & NB_FLG_NOREL_IFOUT) == 0) {
+		syscall(rel_net_buf(output));
+		}
+	else
+		output->flags &= (uint8_t)~NB_FLG_NOREL_IFOUT;
+
+	NET_COUNT_IP6(net_count_ip6[NC_IP6_OUT_ERR_PACKETS], 1);
+	NET_COUNT_MIB(in6_ifstat.ipv6IfStatsOutDiscards, 1);
+	return error;
+	}
+
+#endif /* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ip6_var.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ip6_var.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ip6_var.h	(revision 270)
@@ -0,0 +1,337 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/ip6_var.h,v 1.10 2002/10/16 01:54:45 sam Exp $	*/
+/*	$KAME: ip6_var.h,v 1.62 2001/05/03 14:51:48 itojun Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ip_var.h	8.1 (Berkeley) 6/10/93
+ */
+ 
+#ifndef _IP6_VAR_H_
+#define _IP6_VAR_H_
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  IPv6 ãããã»ãã¤ã­ã¼ãã¢ã¯ã»ã¹ãã¯ã­
+ */
+
+#define IF_IP6_HDR_SIZE			(IF_HDR_SIZE + IP6_HDR_SIZE)
+
+#define GET_IP6_HDR(nbuf)		((T_IP6_HDR*)((nbuf)->buf + IF_HDR_SIZE))
+#define GET_IP6_SDU(nbuf)		((uint8_t*)((nbuf)->buf) + GET_IF_IP6_HDR_SIZE(nbuf))
+#define GET_IP6_NEXT_HDR(nbuf)		((uint8_t*)((nbuf)->buf) + IF_IP6_HDR_SIZE)
+
+#define GET_IP6_HDR_SIZE(iph)		(get_ip6_hdr_size(iph))
+#define GET_IP6_SDU_SIZE(iph)		(ntohs((iph)->plen))
+#define GET_IF_IP6_HDR_SIZE(nbuf)	(IF_HDR_SIZE + (GET_IP6_HDR_SIZE(GET_IP6_HDR(nbuf))))
+
+#define SET_IP6_SDU_SIZE(iph,slen)	((iph)->plen=htons(slen))
+
+/* ip6_output ã®ãã©ã° */
+
+#define IPV6_OUT_FLG_DAD		0x0100	/* éè¤ã¢ãã¬ã¹æ¤åº	*/
+#define IPV6_OUT_FLG_HOP_LIMIT		0x0200	/* ããããªãããæå®	*/
+
+/* ããããªããããã©ã°ãä»ãæãããããªãããå¤ãæä½ãããã¯ã­ */
+
+#define IPV6_OUT_GET_HOP_LIMIT(f)	((f)&0x00ff)
+#define IPV6_OUT_SET_HOP_LIMIT(f,l)	((f)|(l))
+
+/*
+ *  ip6_unknown_opt -- æªç¥ã®ãªãã·ã§ã³ã®å¦ç
+ *
+ *    æ»ãå¤:
+ *
+ *      0 ä»¥ä¸ 			æ­£å¸¸ããªãã·ã§ã³é·ã
+ *      IP6_OPT_RET_ERR (-1)	ã¨ã©ã¼ãå¼åºå´ã§ãããã¯ã¼ã¯ãããã¡ãéæ¾ããã
+ *      IP6_OPT_RET_REL (-2)	ã¨ã©ã¼ããããã¯ã¼ã¯ãããã¡ã¯éæ¾ããã¦ããã
+ */
+
+#define IP6_OPT_RET_ERR		(-1)
+#define IP6_OPT_RET_REL		(-2)
+
+/*
+ *  IPv4 ã¨ IPv6 ãã³ã³ãã¤ã«æã«é¸æããããã®ãã¯ã­
+ */
+
+#define T_TCP_IP_Q_HDR			T_TCP_IP6_Q_HDR
+
+#define IF_IP_HDR_SIZE			IF_IP6_HDR_SIZE
+
+#define GET_IP_HDR(nbuf)		GET_IP6_HDR(nbuf)
+#define GET_IP_SDU(nbuf)		GET_IP6_SDU(nbuf)
+
+#define GET_IP_HDR_SIZE(iph)		GET_IP6_HDR_SIZE(iph)
+#define GET_IP_SDU_SIZE(iph)		GET_IP6_SDU_SIZE(iph)
+#define GET_IF_IP_HDR_SIZE(nbuf)	GET_IF_IP6_HDR_SIZE(nbuf)
+
+#define SET_IP_SDU_SIZE(iph,len)	SET_IP6_SDU_SIZE(iph,len)
+
+#define IP_OUTPUT(nbuf,tmout)		ip6_output(nbuf,0,tmout)
+#define IP_INIT()			ip6_init()
+#define IP_REMOVE_OPTIONS(nbuf)		ip6_remove_exthdrs(nbuf)
+
+/*
+ *  IPv6 ã® MMTU ãµã¤ãºã®ãããã¯ã¼ã¯ãããã¡
+ */
+
+typedef struct t_net_buf_ipv6_mmtu {
+	uint16_t	len;	/* ãã¼ã¿ã®é·ã		*/
+	uint8_t		idix;	/* mpfid ã®ã¤ã³ããã¯ã¹	*/
+	uint8_t		unit;	/* ã¤ã³ã¿ãã§ã¼ã¹çªå·	*/
+#ifdef IF_ETHER_NIC_NET_BUF_ALIGN
+	uint8_t		nalign[IF_ETHER_NIC_NET_BUF_ALIGN];
+#endif
+#if CPU_NET_ALIGN == 4 && IF_HDR_ALIGN != 4
+	uint8_t		halign[4 - IF_HDR_ALIGN];
+#endif
+	uint8_t		buf[IF_HDR_SIZE + IPV6_MMTU];
+				/* ãããã¡æ¬ä½		*/
+	} T_NET_BUF_IPV6_MMTU;
+
+/*
+ *  65536 ãªã¯ããããµã¤ãºã®ãããã¯ã¼ã¯ãããã¡
+ */
+
+typedef struct t_net_buf6_65536 {
+	uint16_t	len;	/* ãã¼ã¿ã®é·ã		*/
+	uint8_t		idix;	/* mpfid ã®ã¤ã³ããã¯ã¹	*/
+	uint8_t		flags;	/* ãã©ã°		*/
+#ifdef IF_ETHER_NIC_NET_BUF_ALIGN
+	uint8_t		nalign[IF_ETHER_NIC_NET_BUF_ALIGN];
+#endif
+#if CPU_NET_ALIGN == 4 && IF_HDR_ALIGN != 4
+	uint8_t		halign[4 - IF_HDR_ALIGN];
+#endif
+	uint8_t		buf[IF_IP6_HDR_SIZE + 65536];
+				/* ãããã¡æ¬ä½		*/
+#if defined(IF_PDU_HDR_PADDING)
+	uint8_t		padding[IF_PDU_HDR_PADDING];
+#endif				/* ãããã®ä½å		*/
+	} T_NET_BUF6_65536;
+
+#ifdef IP6_CFG_FRAGMENT
+
+/*
+ *  åæ§æã­ã¥ã¼ç¨ IPv6 ãããã®å®ç¾©
+ */
+
+typedef struct t_qip6_hdr {
+	uint32_t		vcf;		/* Version:        4 bit		*/
+					/* Traffic Class:  8 bit		*/
+					/* Flow Label:    20 bit		*/
+	uint16_t	plen;		/* Payload Length			*/
+	uint8_t		next;		/* Next Header				*/
+	uint8_t		hlim;		/* Hop Limit				*/
+	T_IN6_ADDR	src;		/* Source Address			*/
+	T_NET_BUF	*next_frag;	/* æ¬¡ã® IPv6 ãã©ã°ã¡ã³ã	*/
+	uint16_t	foff;		/* æ­çãããã®ãªãã»ãã		*/
+	uint16_t	flen;		/* æ­çé·				*/
+	uint16_t	ftim;		/* åæ§æã¿ã¤ã ã¢ã¦ã			*/
+	uint16_t	dummy1;
+	uint8_t		dummy2[sizeof(T_IN6_ADDR) - (sizeof(T_NET_BUF*) + sizeof(uint16_t) * 4)];
+	} __attribute__((packed, aligned(2)))T_QIP6_HDR;
+
+#define QIP6_HDR_SIZE			(sizeof(T_QIP6_HDR))
+#define IF_QIP6_HDR_SIZE		(IF_HDR_SIZE + QIP6_HDR_SIZE)
+
+#define GET_QIP6_HDR(nbuf)		((T_QIP6_HDR*)((nbuf)->buf + IF_HDR_SIZE))
+#define GET_QIP6_SDU(nbuf)		((uint8_t*)(nbuf)->buf + GET_IF_QIP6_HDR_SIZE(nbuf))
+
+#define GET_QIP6_HDR_SIZE(iph)		((uint8_t)IP6_VHL_HL((iph)->vhl) << 2)
+#define GET_IF_QIP6_HDR_SIZE(nbuf)	(IF_HDR_SIZE + (GET_QIP6_HDR_SIZE(GET_QIP6_HDR(nbuf))))
+
+/*
+ *  ãã¼ã¿ã°ã©ã åæ§æç¨ãããã¯ã¼ã¯ãããã¡
+ */
+
+typedef struct t_net_buf6_reassm {
+	uint16_t	len;	/* ãã¼ã¿ã®é·ã		*/
+	uint8_t		idix;	/* mpfid ã®ã¤ã³ããã¯ã¹	*/
+	uint8_t		flags;	/* ãã©ã°		*/
+#ifdef IF_ETHER_NIC_NET_BUF_ALIGN
+	uint8_t		nalign[IF_ETHER_NIC_NET_BUF_ALIGN];
+#endif
+#if CPU_NET_ALIGN == 4 && IF_HDR_ALIGN != 4
+	uint8_t		align[4 - IF_HDR_ALIGN];
+#endif
+	uint8_t		buf[IP6_CFG_FRAG_REASSM_SIZE];
+				/* ãããã¡æ¬ä½		*/
+	} T_NET_BUF6_REASSM;
+
+#endif	/* of #ifdef IP6_CFG_FRAGMENT */
+
+/*
+ *  TCP ã®åæ§æã­ã¥ã¼ã«ããã IPv6 ãããã®å®ç¾©
+ */
+
+typedef struct t_tcp_ip6_q_hdr {
+	uint8_t vc;		/* Version:        4 bit		*/
+	uint8_t cf;		/* Traffic Class:  8 bit		*/
+			/* Flow Label:     4 bit (20 bit)	*/
+	uint16_t thoff;	/* TCP ãããã®ãªãã»ãã		*/
+	uint16_t plen;	/* Payload Length			*/
+	uint8_t next;	/* Next Header				*/
+	uint8_t hlim;	/* Hop Limit				*/
+	T_IN6_ADDR src;	/* Source Address			*/
+	T_IN6_ADDR dst;	/* Destination Address			*/
+	} __attribute__((packed, aligned(2)))T_TCP_IP6_Q_HDR;
+
+#ifdef SUPPORT_MIB
+
+/*
+ *  SNMP ã® ç®¡çæ
+å ±ãã¼ã¹ (MIB)
+ */
+
+typedef struct t_in6_ifstat {
+	uint32_t	ipv6IfStatsInReceives;
+	uint32_t	ipv6IfStatsInHdrErrors;
+/*	uint32_t	ipv6IfStatsInTooBigErrors;*/
+/*	uint32_t	ipv6IfStatsInNoRoutes;*/
+	uint32_t	ipv6IfStatsInAddrErrors;
+	uint32_t	ipv6IfStatsInUnknownProtos;
+	uint32_t	ipv6IfStatsInTruncatedPkts;
+/*	uint32_t	ipv6IfStatsInDiscards;*/
+/*	uint32_t	ipv6IfStatsInDelivers;*/
+/*	uint32_t	ipv6IfStatsOutForwDatagrams;*/
+	uint32_t	ipv6IfStatsOutRequests;
+	uint32_t	ipv6IfStatsOutDiscards;
+	uint32_t	ipv6IfStatsOutFragOKs;
+	uint32_t	ipv6IfStatsOutFragFails;
+	uint32_t	ipv6IfStatsOutFragCreates;
+	uint32_t	ipv6IfStatsReasmReqds;
+	uint32_t	ipv6IfStatsReasmOKs;
+	uint32_t	ipv6IfStatsReasmFails;
+	uint32_t	ipv6IfStatsInMcastPkts;
+	uint32_t	ipv6IfStatsOutMcastPkts;
+} T_IN6_IFSTAT;
+
+extern T_IN6_IFSTAT in6_ifstat;
+
+#endif	/* of #ifdef SUPPORT_MIB */
+
+/*
+ *  é¢æ°
+ */
+
+extern ER ip6_output (T_NET_BUF *output, uint16_t flags, TMO tmout);
+extern void ip6_init (void);
+extern uint8_t *ip6_get_prev_hdr (T_NET_BUF *nbuf, uint_t off);
+extern uint_t get_ip6_hdr_size (T_IP6_HDR *iph);
+extern ER_UINT ip6_nexthdr (T_NET_BUF *nbuf, uint_t off, uint_t proto, uint_t *nextp);
+extern ER_UINT ip6_lasthdr (T_NET_BUF *nbuf, uint_t off, uint_t proto, uint_t *nextp);
+extern ER_UINT ip6_unknown_opt (T_NET_BUF *input, uint8_t *opt);
+extern uint_t dest6_input  (T_NET_BUF **inputp, uint_t *offp, uint_t *nextp);
+extern uint_t route6_input (T_NET_BUF **inputp, uint_t *offp, uint_t *nextp);
+extern uint_t frag6_input  (T_NET_BUF **inputp, uint_t *offp, uint_t *nextp);
+extern void frag6_timer (void);
+extern ER ip6_remove_exthdrs (T_NET_BUF *nbuf);
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef _IP6_VAR_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ipsec.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ipsec.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/ipsec.cfg	(revision 270)
@@ -0,0 +1,54 @@
+
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *  Copyright (C) 2008-2009 by Hokkaido Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  IPsec ã§ä½¿ç¨ããã«ã¼ãã«ãªãã¸ã§ã¯ã
+ */
+
+#ifdef SUPPORT_IPSEC
+
+#endif	/* of #ifdef SUPPORT_IPSEC */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/nd6.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/nd6.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/nd6.c	(revision 270)
@@ -0,0 +1,731 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/nd6.c,v 1.20 2002/08/02 20:49:14 rwatson Exp $	*/
+/*	$KAME: nd6.c,v 1.144 2001/05/24 07:44:00 itojun Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * XXX
+ * KAME 970409 note:
+ * BSD/OS version heavily modifies this code, related to llinfo.
+ * Since we don't have BSD/OS version of net/route.c in our hand,
+ * I left the code mostly as it was in 970310.  -- itojun
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_loop.h>
+#include <net/if_ppp.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_var.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet6/nd6.h>
+
+#include <netinet/ip6.h>
+#include <netinet/icmp6.h>
+#include <netinet6/ip6_var.h>
+
+#include <net/if6_var.h>
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  è¿é£ã­ã£ãã·ã¥
+ */
+
+static T_LLINFO_ND6 nd6_cache[NUM_ND6_CACHE_ENTRY];
+
+/*
+ *  nd6_free -- ã«ã¼ã¿ãåé¤ããã
+ */
+
+static void
+nd6_free (T_LLINFO_ND6	*ln)
+{
+	T_DEF_ROUTER	*dr;
+
+	dr = nd6_defrtrlist_lookup(&ln->addr);
+	if (dr != NULL) {
+		ln->state = ND6_LLINFO_INCOMPLETE;
+
+		/* ãã¬ãã£ãã¯ã¹ã»ãªã¹ãããã«ã¼ã¿ãåé¤ããã*/
+		nd6_defrtrlist_del(dr);
+		}
+	}
+
+/*
+ *  nd6_timer -- è¿é£æ¢ç´¢ç®¡çã¿ã¤ãã¼
+ */
+
+void
+nd6_timer (void)
+{
+	T_IFNET		*ifp = IF_GET_IFNET();
+	T_LLINFO_ND6	*ln;
+	SYSTIM		now;
+	int_t		ix;
+
+	/* è¿é£ã­ã£ãã·ã¥ã®å¦ç */
+	syscall(wai_sem(SEM_ND6_CACHE));
+	syscall(get_tim(&now));
+	for (ix = NUM_ND6_CACHE_ENTRY; ix -- > 0; ) {
+		ln = &nd6_cache[ix];
+		if (ln->state >= ND6_LLINFO_NO_STATE && (int32_t)(ln->expire - now) < 0) {
+		                                               /* ln->expire < now */
+
+			switch (ln->state) {
+
+			case ND6_LLINFO_INCOMPLETE:	/* æªè§£æ±º		*/
+				if (ln->asked < ND6_MAX_MCAST_QUERY) {
+					/*
+					 *  ãã«ãã­ã£ã¹ãã¢ãã¬ã¹è¦è«ã®åéåæ°ä»¥ä¸ã®å ´åã®å¦ç
+					 */
+					ln->asked ++;
+					ln->expire = now + ND6_RETRANS_TIME;	/* è¿é£æ¢ç´¢éä¿¡éé */
+					nd6_ns_output(ifp, &in6_addr_unspecified, &ln->addr, ln, false);
+					}
+				else  {
+					if (ln->hold != NULL) {
+						/*
+						 *  æçµçã«ã¯ãä¿çããã¦ãããããã¯ã¼ã¯ãããã¡ã
+						 *  ããã°ãICMP6 ERROR ãèªåèªèº«ã«è¿ãããã¨ã
+						 *  ãããã¯ã¼ã¯ãããã¡ãéæ¾ããã
+						 *  ããããç¾å¨ãicmp6_error ã®å®è£
+ãä¸å®å
+¨ã®ããã
+						 *  ãããã¯ã¼ã¯ãããã¡ã®éæ¾ã®ã¿è¡ãã
+						 */
+#if 0	/* ä¿ç */
+						icmp6_error(ln->hold, ICMP6_DST_UNREACH,
+						                      ICMP6_DST_UNREACH_ADDR, 0);
+#endif	/* #if 0 */
+						syscall(rel_net_buf(ln->hold));
+						ln->hold = NULL;
+						}
+					nd6_free(ln);
+					memset((void*)ln, 0, sizeof(*ln));
+					}
+				break;
+
+			case ND6_LLINFO_REACHABLE:	/* å°éå¯è½		*/
+				if (ln->expire) {
+					ln->expire = now + ND6_GCOLLECTION_TIME;
+					ln->state = ND6_LLINFO_STALE;
+					}
+				break;
+
+			case ND6_LLINFO_STALE:		/* å°éå¯è½æ§ã¯æªç¢ºèª	*/
+				if (ln->expire) {
+					if (ln->hold != NULL) {
+						syscall(rel_net_buf(ln->hold));
+						ln->hold = NULL;
+						}
+					nd6_free(ln);
+					memset((void*)ln, 0, sizeof(*ln));
+					}
+				break;
+
+			case ND6_LLINFO_DELAY:		/* å°éå¯è½æ§ã®ç¢ºèªå¾
+æ©	*/
+				ln->asked = 1;
+				ln->expire = now + ND6_RETRANS_TIME;		/* è¿é£æ¢ç´¢éä¿¡éé */
+				ln->state = ND6_LLINFO_PROBE;
+				nd6_ns_output(ifp, &ln->addr, &ln->addr, ln, false);
+				break;
+
+			case ND6_LLINFO_PROBE:		/* å°éå¯è½æ§ãç¢ºèªä¸­	*/
+				if (ln->asked < ND6_MAX_UCAST_QUERY) {
+					/*
+					 *  ã¦ãã­ã£ã¹ãã¢ãã¬ã¹è¦è«ã®åéåæ°ä»¥ä¸ã®å ´åã®å¦ç
+					 */
+					ln->asked ++;
+					ln->expire += ND6_RETRANS_TIME;	/* è¿é£æ¢ç´¢éä¿¡éé */
+					nd6_ns_output(ifp, &ln->addr, &ln->addr, ln, false);
+					}
+				else {
+					if (ln->hold != NULL) {
+						syscall(rel_net_buf(ln->hold));
+						ln->hold = NULL;
+						}
+					nd6_free(ln);
+					memset((void*)ln, 0, sizeof(*ln));
+					}
+				break;
+
+				}
+			}
+		}
+	syscall(sig_sem(SEM_ND6_CACHE));
+
+	/* ãã£ãã©ã«ãã«ã¼ã¿ã»ãªã¹ãã®å¦ç */
+	nd6_defrtrlist_timer();
+
+	/* ãã¬ãã£ãã¯ã¹ã»ãªã¹ãã®å¦ç */
+	nd6_prelist_timer();
+
+	/* ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹ã®å¦ç */
+	in6_ifaddr_timer(ifp);
+
+	/*
+	 *  å°éå¯è½ç¶æ
+ã®æå¹æéã®æ´æ°
+	 */
+	if ((int32_t)(nd6_recalc_reachtm_interval - now) < 0) {
+	           /* nd6_recalc_reachtm_interval < now */
+		nd6_recalc_reachtm_interval	= now + ND6_RECALC_REACHTM_INTERVAL;
+		nd6_reachable_time		= ND6_CALC_REACH_TIME(nd6_base_reachable_time);
+		}
+	timeout((callout_func)nd6_timer, NULL, ND6_TIMER_TMO);
+	}
+
+/*
+ *  nd6_get_cache -- è¿é£ã­ã£ãã·ã¥ãç²å¾ããã
+ */
+
+const T_LLINFO_ND6 *
+nd6_get_cache (void)
+{
+	return nd6_cache;
+	}
+
+/*
+ *  nd6_ifattach -- è¿é£æ¢ç´¢ã®åæè¨­å®ãè¡ãã
+ */
+
+void
+nd6_ifattach (T_IFNET *ifp)
+{
+	}
+
+/*
+ *  nd6_output_hold -- è¿é£æ¢ç´¢ã­ã£ãã·ã¥ã«ä¿çããã¦ãã
+ *                     ã¢ãã¬ã¹è§£æ±ºå¾
+ã¡ã®ãã¼ã¿ã°ã©ã ãããã°éä¿¡ããã
+ *
+ *    æ³¨æ: ã»ããã© SEM_ND6_CACHE ã«ããã­ãã¯ç¶æ
+ã§å¼åºããã¨ã
+ */
+
+ER
+nd6_output_hold (T_IFNET *ifp, T_LLINFO_ND6 *ln)
+{
+	SYSTIM now;
+
+	/* ã¢ãã¬ã¹è§£æ±ºå¾
+ã¡ã®ãã¼ã¿ã°ã©ã ãããã°éä¿¡ããã*/
+	if (ln->hold) {
+
+		/* ã¿ã¤ã ã¢ã¦ãã®å¦ç */
+		if (ln->tmout != TMO_FEVR) {
+
+			/*
+			 *  ã¿ã¤ã ã¢ã¦ãã®æå®ãæ°¸ä¹
+ã§ãªããæéãéãã¦ããã°ã
+			 *  åºåããªãã§çµäºããã
+			 */
+			syscall(get_tim(&now));
+			if ((int32_t)(ln->tmout - now) < 0) {
+			           /* ln->tmout < now */
+				syscall(rel_net_buf(ln->hold));
+				ln->hold = NULL;
+				return E_TMOUT;
+				}
+			}
+				
+		nd6_output(ifp, ln->hold, &ln->addr, ln, TMO_FEVR);
+		ln->hold = NULL;
+		}
+	return E_OK;
+	}
+
+/*
+ *  nd6_lookup -- è¿é£æ¢ç´¢ã­ã£ãã·ã¥ãæ¢ç´¢ããã
+ *
+ *    æ³¨æ: ã»ããã© SEM_ND6_CACHE ã«ããã­ãã¯ç¶æ
+ã§å¼åºããã¨ã
+ *
+ */
+
+T_LLINFO_ND6 *
+nd6_lookup (T_IN6_ADDR *addr, bool_t create)
+{
+	SYSTIM	min = 0xffffffff;
+	int_t	ix, fix = -1, mix = -1;
+
+	for (ix = NUM_ND6_CACHE_ENTRY; ix -- > 0; ) {
+		if (nd6_cache[ix].state == 0) {
+			/* æªä½¿ç¨ã¨ã³ããªã®ã¤ã³ããã¯ã¹ãè¨é²ããã*/
+			if (fix == -1)
+				fix = ix;
+			}
+		else if (IN6_ARE_ADDR_EQUAL(addr, &nd6_cache[ix].addr)) {
+			return &nd6_cache[ix];
+			}
+		else if ((int32_t)(nd6_cache[ix].expire - min) < 0) {	/* nd6_cache[ix].expire < min */
+			/* æå¹æéãæç­ã¨ã³ããªã®ã¤ã³ããã¯ã¹ãè¨é²ããã*/
+			min = nd6_cache[ix].expire;
+			mix = ix;
+			}
+		}
+
+	if (create) {
+		if (fix == -1)  {
+			if (nd6_cache[mix].hold != NULL) {
+				syscall(rel_net_buf(nd6_cache[mix].hold));
+				}
+			fix = mix;
+			}
+		syscall(get_tim(&nd6_cache[fix].expire));
+		nd6_cache[fix].addr   = *addr;
+		nd6_cache[fix].state  = ND6_LLINFO_NO_STATE;
+		return &nd6_cache[fix];
+		}
+	else
+		return NULL;
+	}
+
+/*
+ *  nd6_cache_lladdr -- è¿é£æ¢ç´¢ã­ã£ãã·ã¥ã«ç»é²ããã
+ */
+
+T_LLINFO_ND6 *
+nd6_cache_lladdr (T_IFNET *ifp, T_IN6_ADDR *from,
+                  T_IF_ADDR *lladdr, uint8_t type, uint8_t code)
+{
+	T_LLINFO_ND6	*ln;
+	SYSTIM		now;
+	bool_t		newentry, olladdr, llchange, doupdate;
+	int_t		newstate = ND6_LLINFO_INCOMPLETE;
+
+	/* ã¢ãã¬ã¹ãç¡æå®ãªãä½ãããªãã*/
+	if (IN6_IS_ADDR_UNSPECIFIED(from))
+		return NULL;
+
+	/* è¿é£ã­ã£ãã·ã¥ã«ç»é²ããã*/
+	syscall(wai_sem(SEM_ND6_CACHE));
+	if ((ln = nd6_lookup(from, false)) == NULL) {
+		ln = nd6_lookup(from, true);
+		newentry = true;
+		}
+	else
+		newentry = false;
+
+	olladdr = ln->state > ND6_LLINFO_INCOMPLETE;
+	if (!olladdr || lladdr == NULL)
+		llchange = false;
+	else if (memcmp(lladdr, &ln->ifaddr, sizeof(T_IF_ADDR)))
+		llchange = true;
+	else
+		llchange = false;
+
+	/*
+	 *  ç¶æ
+é·ç§»è¡¨
+	 *
+	 *  nd_na_flags
+	 *  newnetry olladdr lladdr llchange å¦ç (L: lladdr ãç»é²ãã)
+	 *
+	 *      F       F       N       -    (1)
+	 *      F       T       N       -    (2)
+	 *      F       F       Y       -    (3) L * -> STALE
+	 *      F       T       Y       F    (4) L
+	 *      F       T       Y       T    (5) L * -> STALE
+	 *      T       -       N       -    (6)   * -> NO_STATE
+	 *      T       -       Y       -    (7) L * -> STALE
+	 */
+
+	/* ãã¼ã¿ãªã³ã¯å±¤ã®ã¢ãã¬ã¹ãéç¥ããã¦ããã°æ´æ°ããã*/
+	if (lladdr != NULL) {
+		ln->ifaddr = *(T_IF_ADDR *)lladdr;
+		}
+
+	if (newentry) {
+		if (lladdr != NULL)					/* (7) */
+			newstate = ND6_LLINFO_STALE;
+		else							/* (6) */
+			newstate = ND6_LLINFO_NO_STATE;
+		doupdate = true;
+		}
+	else {
+		if ((!olladdr && lladdr != NULL) ||			/* (3) */
+		    ( olladdr && lladdr != NULL && llchange)) {		/* (5) */
+			newstate = ND6_LLINFO_STALE;
+			doupdate = true;
+			}
+		else							/* (1),(2),(4) */
+			doupdate = false;
+		}
+
+	/* è¿é£ã­ã£ãã·ã¥ã¨ã³ããªãæ´æ°ããã*/
+	if (doupdate) {
+		ln->state = newstate;
+
+		syscall(get_tim(&now));
+		if (ln->state == ND6_LLINFO_STALE) {
+			ln->expire = now + ND6_GCOLLECTION_TIME;
+
+			/* ã¢ãã¬ã¹è§£æ±ºå¾
+ã¡ã®ãã¼ã¿ã°ã©ã ãããã°éä¿¡ããã*/
+			nd6_output_hold(ifp, ln);
+			}
+		else if (ln->state == ND6_LLINFO_INCOMPLETE)
+			ln->expire = now;
+		}
+	syscall(sig_sem(SEM_ND6_CACHE));
+
+
+	/* ã«ã¼ã¿éç¥ã®å¦ç */
+	switch (type) {
+
+	case ND_NEIGHBOR_SOLICIT:
+		if (newentry)
+			ln->flags &= ~ND6_LLIF_ROUTER;
+		break;
+
+	case ND_REDIRECT:
+		if (code == ND_REDIRECT_ROUTER)
+			ln->flags |=  ND6_LLIF_ROUTER;
+		else if (newentry)
+			ln->flags &= ~ND6_LLIF_ROUTER;
+		break;
+
+	case ND_ROUTER_SOLICIT:
+		ln->flags &= ~ND6_LLIF_ROUTER;
+		break;
+
+	case ND_ROUTER_ADVERT:
+		if ((!newentry && (olladdr || lladdr != NULL)) ||
+		    ( newentry && lladdr))
+			ln->flags |=  ND6_LLIF_ROUTER;
+		break;
+		}
+
+	return ln;
+	}
+
+/*
+ *  nd6_is_addr_neighbor -- æå®ãããã¢ãã¬ã¹ã®ãã¼ããåä¸ãªã³ã¯ã«ããããã§ãã¯ããã
+ */
+
+bool_t
+nd6_is_addr_neighbor (T_IFNET *ifp, T_IN6_ADDR *addr)
+{
+	if (IN6_IS_ADDR_LINKLOCAL(addr))
+		return true;
+
+	if (nd6_onlink_prefix_lookup(addr) != NULL)
+		return true;
+
+	if (nd6_lookup(addr, false) != NULL)
+		return true;
+
+	return false;
+	}
+
+/*
+ *  nd6_output -- è¿é£æ¢ç´¢ã®åºåé¢æ°
+ *
+ *    æ³¨æ: ã»ããã© SEM_ND6_CACHE ã«ããã­ãã¯ç¶æ
+ã§å¼åºããã¨ã
+ */
+
+ER
+nd6_output (T_IFNET *ifp, T_NET_BUF *output, T_IN6_ADDR *dst, T_LLINFO_ND6 *ln, TMO tmout)
+{
+	ER	error = E_OK;
+	SYSTIM	now;
+
+	/*
+	 *  ãã¦å
+ã¢ãã¬ã¹ããã«ãã­ã£ã¹ãããè¿é£ã­ã£ãã·ã¥ã
+	 *  ä¸è¦ã®å ´åã¯ç´ã¡ã«éä¿¡ããã
+	 */
+	if (!(IN6_IS_ADDR_MULTICAST(dst) || !IF_IN6_NEED_CACHE(ifp))) {
+		if (ln == NULL) {
+			/* è¿é£ã­ã£ãã·ã¥ãæªå®ç¾©ã®å ´å */
+			if (nd6_is_addr_neighbor(ifp, dst)) {
+				/*
+				 *  æå®ãããã¢ãã¬ã¹ã®ãã¼ããåä¸ãªã³ã¯ã«ããæã¯ã
+				 *  è¿é£ã­ã£ãã·ã¥ãæ¢ç´¢ããæªå®ç¾©ã®å ´åã¯ç»é²ããã
+				 */
+				ln = nd6_lookup(dst, true);
+				}
+			else {
+				error = E_CLS;
+				goto err_ret;
+				}
+			}
+
+		/*
+		 *  è¿é£ã­ã£ãã·ã¥ã®ç¶æ
+ãããã¼ã¿ãªã³ã¯å±¤ã®ã¢ãã¬ã¹ãåãã£ã¦ãã¦ãã
+		 *  å°éå¯è½æ§ãç¢ºèªããã¦ããªãã¨ãã¯ãå°éä¸è½éç¥ãéå§ããã
+		 */
+		if (ln->state == ND6_LLINFO_STALE) {
+			syscall(get_tim(&now));
+			ln->expire = now + ND6_DELAY_TIME;
+			ln->asked = 0;
+			ln->state = ND6_LLINFO_DELAY;
+			}
+
+		/*
+		 *  è¿é£ã­ã£ãã·ã¥ã®ç¶æ
+ãããã¼ã¿ãªã³ã¯å±¤ã®ã¢ãã¬ã¹æªè§£æ±ºã®å ´åã¯
+		 *  è¿é£æ¢ç´¢ãè¡ãã
+		 */
+		if (ln->state <= ND6_LLINFO_INCOMPLETE) {
+
+			/* ã¿ã¤ã ã¢ã¦ãã®æå®ããã¼ãªã³ã°ãªãã¿ã¤ã ã¢ã¦ãã§çµäºããã*/
+			if (tmout == TMO_POL) {
+				error = E_TMOUT;
+				goto err_ret;
+				}
+
+			if (ln->state == ND6_LLINFO_NO_STATE)
+				ln->state = ND6_LLINFO_INCOMPLETE;
+
+			/* ãã§ã«ãæªè§£æ±ºã®ãããã¯ã¼ã¯ãããã¡ãããã°ãéæ¾ããã*/
+			if (ln->hold != NULL) {
+				syscall(rel_net_buf(ln->hold));
+				}
+
+			/*
+			 *  éä¿¡ããã³ãã£ã³ã°ããã
+			 *  IF ã§ãããã¯ã¼ã¯ãããã¡ãéæ¾ããªããã©ã°ãè¨­å®ããã¦ããã¨ãã¯ã
+			 *  éä¿¡ããã³ãã£ã³ã°ããªãã
+			 */
+			if ((output->flags & NB_FLG_NOREL_IFOUT) == 0) {
+				ln->hold = output;
+
+				/* ã¿ã¤ã ã¢ã¦ãã®è¨­å® */
+				if (tmout == TMO_FEVR)
+					ln->tmout = tmout;
+				else {
+					syscall(get_tim(&now));
+					ln->tmout = now + tmout;
+					}
+				}
+			else {
+				output->flags &= ~NB_FLG_NOREL_IFOUT;
+				syscall(get_tim(&now));
+				ln->tmout = now + tmout;
+				}
+
+			if (ln->expire) {
+				if (ln->asked < ND6_MAX_MCAST_QUERY) {
+					syscall(get_tim(&now));
+					if ((int32_t)(ln->expire - now) < 0) {
+					           /* ln->expire < now */
+						ln->expire += ND6_RETRANS_TIME;	/* è¿é£æ¢ç´¢éä¿¡éé */
+						ln->asked ++;
+						nd6_ns_output(ifp, &in6_addr_unspecified, dst, ln, false);
+						}
+					}
+				}
+			return error;
+			}
+		}
+
+	/*
+	 *  éè¤ãæ¤åºãããã¤ã³ã¿ãã§ã¼ã¹ã«ã¯åºåããªãã
+	 */
+	if ((ifp->flags & ND6_IFF_IFDISABLED) != 0) {
+		return E_OK;
+		}
+
+	IF_SET_PROTO(output, IF_PROTO_IPV6);
+	error = IF_OUTPUT(output, dst, ln ? & ln->ifaddr : NULL, tmout);
+	return error;
+
+err_ret:
+	syscall(rel_net_buf(output));
+	return error;
+	}
+
+/*
+ *  nd6_storelladdr -- åºåãããããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹ãè¿ãã
+ */
+
+ER
+nd6_storelladdr (T_IF_ADDR *out, T_IN6_ADDR *dst, T_IF_ADDR *ifa)
+{
+	if (IN6_IS_ADDR_MULTICAST(dst)) {
+		IF_IN6_RESOLVE_MULTICAST(out, dst);
+		}
+	else {
+		*out = *ifa;
+		}
+
+	return E_OK;
+	}
+
+/*
+ *  nd6_option -- è¿é£æ¢ç´¢ãªãã·ã§ã³ã®å¦ç
+ *
+ *    æ³¨æ: ãªãã·ã§ã³ãªãã»ããé
+åã«ã¯ããªãã»ãã + 8 ãè¨­å®ããã¦ããã
+ */
+
+ER
+nd6_options (uint8_t *opt, void *nh, uint_t len)
+{
+	T_ND_OPT_HDR	*opth;
+	ER		error = E_OK;
+	int_t		pi_count = 0;	/* ãã¬ãã£ãã¯ã¹æ
+å ±ã®åæ° */
+
+	opth = (T_ND_OPT_HDR *)nh;
+	memset(opt, 0, ND_OPT_OFF_ARRAY_SIZE);
+
+	while (error == E_OK && ((uint8_t *)opth - (uint8_t *)nh) < (256 - 8) && len > 0) {
+
+		/* ãªãã·ã§ã³é·ã 0 ã®æã¯ãä¸æ­£ãªãªãã·ã§ã³ã¨ãã¦å¦çããã*/
+		if (opth->len == 0) {
+			error = E_PAR;
+			break;
+			}
+
+		/* ãªãã·ã§ã³ã®ã¿ã¤ãã«ããåå²ããã*/
+		switch (opth->type) {
+		case ND_OPT_SOURCE_LINKADDR:		/* éä¿¡å
+ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹	*/
+		case ND_OPT_TARGET_LINKADDR:		/* å¯¾è±¡ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹	*/
+		case ND_OPT_REDIRECTED_HEADER:		/* ãªãã¤ã¬ã¯ãã»ããã				*/
+		case ND_OPT_MTU:			/* MTU						*/
+			if (opt[ND_OPT_OFF_ARRAY_IX(opth->type)]) {
+				/* ãã¬ãã£ãã¯ã¹æ
+å ±ä»¥å¤ã®åããªãã·ã§ã³ãè¤æ°æå®ããã¦ããã*/
+				error = E_PAR;
+				}
+			else {
+				opt[ND_OPT_OFF_ARRAY_IX(opth->type)] = (uint8_t *)opth - (uint8_t *)nh + 8;
+				}
+			break;
+		case ND_OPT_PREFIX_INFORMATION:		/* ãã¬ãã£ãã¯ã¹æ
+å ±				*/
+			if (!opt[ND_OPT_OFF_ARRAY_IX(ND_OPT_PREFIX_INFORMATION)]) {
+				/*
+				 *  ãã¬ãã£ãã¯ã¹æ
+å ±ã¯æåã«ç¾ãããªãã»ããã®ã¿è¨é²ããã
+				 */
+				opt[ND_OPT_OFF_ARRAY_IX(opth->type)] = (uint8_t *)opth - (uint8_t *)nh + 8;
+				}
+			pi_count ++;
+			break;
+		default:
+			/*
+			 *  å°æ¥å®ç¾©ããããã­ãã³ã«ã¸ã®æ¡å¼µã«å¯¾å¿ããããã
+			 *  èªè­ã§ããªããªãã·ã§ã³ã¯åã«ç¡è¦ããå¦çãç¶è¡ããã
+			 */
+			break;
+			}
+		len -= opth->len << 3;		/* ãªãã·ã§ã³é·ã®åä½ã¯ 8 ãã¤ã */
+		opth = (T_ND_OPT_HDR *)((uint8_t *)opth + (opth->len << 3));
+		}
+
+	opt[ND_OPT_OFF_ARRAY_IX(ND_OPT_PREFIX_INFO_COUNT)] = pi_count;
+	return error;
+	}
+
+#endif /* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/nd6.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/nd6.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/nd6.h	(revision 270)
@@ -0,0 +1,304 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/nd6.h,v 1.10 2002/04/19 04:46:23 suz Exp $	*/
+/*	$KAME: nd6.h,v 1.76 2001/12/18 02:10:31 itojun Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+ 
+#ifndef _ND6_H_
+#define _ND6_H_
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹æ§é ä½ï¼T_IFNETï¼ã®ãã©ã°
+ */
+
+#define ND6_IFF_IFDISABLED	UINT_C(0x01)	/* ã¤ã³ã¿ãã§ã¼ã¹ãç¡å¹ã«ããã*/
+
+/*
+ *  è¿é£ã­ã£ãã·ã¥ 
+ */
+
+typedef struct t_llinfo_nd6 {
+	T_IN6_ADDR	addr;
+	T_NET_BUF	*hold;
+	TMO		tmout;
+	SYSTIM		expire;		/* [ms] æå¹æéãåããæå»	*/
+	T_IF_ADDR	ifaddr;
+	uint8_t		state;
+	uint8_t		asked;
+	uint8_t		flags;
+	} T_LLINFO_ND6;
+
+/* è¿é£ã­ã£ãã·ã¥ã®ç¶æ
+ */
+
+#define ND6_LLINFO_FREE			0	/* æªä½¿ç¨		*/
+#define ND6_LLINFO_NO_STATE		1	/* ç¶æ
+æªå®ç¾©		*/
+#define ND6_LLINFO_INCOMPLETE		2	/* æªè§£æ±º		*/
+#define ND6_LLINFO_REACHABLE		3	/* å°éå¯è½		*/
+#define ND6_LLINFO_STALE		4	/* å°éå¯è½æ§ã¯æªç¢ºèª	*/
+#define ND6_LLINFO_DELAY		5	/* å°éå¯è½æ§ã®ç¢ºèªå¾
+æ©	*/
+#define ND6_LLINFO_PROBE		6	/* å°éå¯è½æ§ãç¢ºèªä¸­	*/
+
+#define ND6_IS_LLINFO_PROBREACH(n)	((n)->state > ND6_LLINFO_INCOMPLETE)
+
+/* è¿é£ã­ã£ãã·ã¥ã®å¶å¾¡ããã */
+
+#define ND6_LLIF_ROUTER			UINT_C(0x80)	/* ã«ã¼ã¿		*/
+#define ND6_LLIF_ASKED			UINT_C(0x40)	/* éç¥æ¸ã¿		*/
+#define ND6_LLIF_STATE_MASK		UINT_C(0x07)	/* ç¶æ
+ãã¹ã¯		*/
+
+/* è¿é£æ¢ç´¢ã­ã£ãã·ã¥ãæå¹æéã®å®ç¾© */
+
+#define ND6_SLOW_TMO			((60*60*1000)/NET_TIMER_HZ)
+							/* 1 [æé]				*/
+							/* è¿é£æ¢ç´¢ã­ã£ãã·ã¥æ´æ°ã¿ã¤ã ã¢ã¦ã	*/
+
+#define ND6_MAX_DAD_TRY			15		/* éè¤ã¢ãã¬ã¹æ¤åºã®åéåæ°		*/
+#define ND6_MAX_MCAST_QUERY		3		/* ãã«ãã­ã£ã¹ãã¢ãã¬ã¹è¦è«ã®åéåæ°	*/
+#define ND6_MAX_UCAST_QUERY		3		/* ã¦ãã­ã£ã¹ãã¢ãã¬ã¹è¦è«ã®åéåæ°	*/
+
+#define ND6_INFINITE_LIFETIME		0xffffffff
+
+#define ND6_GCOLLECTION_TIME		(60*60*24*SYSTIM_HZ)
+							/* ã´ãæ¾ãå¨æã1 æ¥			*/
+#define	ND6_DELAY_TIME			(5*SYSTIM_HZ)	/* ç¢ºèªå¾
+æ©é
+å»¶				*/
+#define ND6_FIRST_DAD_DELAY_TIME	(1*SYSTIM_HZ)	/* æåã®éè¤ã¢ãã¬ã¹æ¤åºéä¿¡é
+å»¶	*/
+#define ND6_DAD_DELAY_TIME		(5*SYSTIM_HZ/10)
+							/* éè¤ã¢ãã¬ã¹æ¤åºéä¿¡é
+å»¶		*/
+
+/* è¿é£æ¢ç´¢ç¨ã¿ã¤ãã®è¨­å® */
+
+#define ND6_TIMER_TMO			((SYSTIM_HZ/NET_TIMER_CYCLE)/5)	/* 0.2[s] éé		*/
+
+/*
+ *  å°éå¯è½ç¶æ
+ã®æå¹æé
+ */
+
+#define	ND6_DEF_REACHABLE_TIME		(30*SYSTIM_HZ)	/* å°éå¯è½ç¶æ
+ã®æå¹æéã®æ¢å®å¤		*/
+#define	ND6_MAX_REACHABLE_TIME		(60*60*SYSTIM_HZ)
+							/* å°éå¯è½ç¶æ
+ã®æå¹æéã®æ¢å®å¤		*/
+#define	ND6_RECALC_REACHTM_INTERVAL	(60*60*2*SYSTIM_HZ)
+							/* å°éå¯è½ç¶æ
+ã®æå¹æéåè¨ç®éé	*/
+
+#define	ND6_MIN_REACHTM_RAND_FACTOR	512		/* æå°ä¹±æ°è£æ­£å¤ã1,024 * 0.5		*/
+
+#if 1							/* ã¿ã¤ãã¼ã®èµ·åééãèæ
+®ããè¦å®ããç­ãè¨­å®	*/
+#define	ND6_MAX_REACHTM_RAND_FACTOR	1484		/* æå°ä¹±æ°è£æ­£å¤ã1,024 * 1.45			*/
+#else
+#define	ND6_MAX_REACHTM_RAND_FACTOR	1536		/* æå°ä¹±æ°è£æ­£å¤ã1,024 * 1.5			*/
+#endif
+
+/* å°éå¯è½ç¶æ
+ã®æå¹æéã®è¨ç®ãã¯ã­ */
+
+#define ND6_CALC_REACH_TIME(b)		\
+	 ((ND6_MIN_REACHTM_RAND_FACTOR * ((uint32_t)(b) >> 10)) + \
+	  (net_rand() & ((ND6_MAX_REACHTM_RAND_FACTOR - ND6_MIN_REACHTM_RAND_FACTOR) * ((uint32_t)(b) >> 10))))
+
+/*
+ *  è¿é£æ¢ç´¢ã®éä¿¡éé
+ */
+
+#define ND6_DEF_RETRANS_TIME		(1*SYSTIM_HZ)
+
+/*
+ *  ã«ã¼ã¿éç¥ã«ããå¤æ´ããããã¨ãããå¤
+ */
+
+#if NUM_ND6_DEF_RTR_ENTRY > 0
+
+/* ã«ã¼ã¿éç¥ãåä¿¡ããå ´åã¯ãéç¥ãããå¤ */
+
+#define	ND6_REACHABLE_TIME		nd6_reachable_time
+#define ND6_RETRANS_TIME		nd6_retrans_time
+
+#else	/* #if NUM_ND6_DEF_RTR_ENTRY > 0 */
+
+/* ã«ã¼ã¿éç¥ãåä¿¡ããªãå ´åã®å¤ã¯æ¢å®å¤ */
+
+#define	ND6_REACHABLE_TIME		ND6_DEF_REACHABLE_TIME
+#define ND6_RETRANS_TIME		ND6_DEF_RETRANS_TIME
+
+#endif	/* #if NUM_ND6_DEF_RTR_ENTRY > 0 */
+
+/*
+ *  ãã£ãã©ã«ãã«ã¼ã¿ã»ãªã¹ã
+ */
+
+typedef struct t_def_router {
+	T_IN6_ADDR	addr;
+	SYSTIM		expire;		/* [ms] æå¹æéãåããæå»	*/
+	uint32_t	lifetime;	/* [ms] æå¹æé			*/
+	uint16_t	plistmap;	/* ãã¬ãã£ãã¯ã¹ããã		*/
+	uint8_t		flags;		/* ã«ã¼ã¿éç¥ã®ãã©ã°		*/
+	uint8_t		state;
+	} T_DEF_ROUTER;
+
+/* ãã£ãã©ã«ãã«ã¼ã¿ã»ãªã¹ãã®ç¶æ
+ */
+
+#define ND6_DEF_RTR_BUSY		0xff	/* ä½¿ç¨ä¸­		*/
+
+/* ãã¬ãã£ãã¯ã¹ã®ã¤ã³ããã¯ã¹ */
+
+#define ND6_PREFIX_IX_INVALID		0xff
+
+/*
+ *  ãã¬ãã£ãã¯ã¹ã»ãªã¹ã
+ */
+
+typedef struct t_nd6_prefix {
+	T_IN6_ADDR	prefix;		/* ãã¬ãã£ãã¯ã¹		*/
+	uint32_t	expire;		/* [s] æå¹æéãåããæå»	*/
+	uint32_t	preferred;	/* [s] æ¨å¥¨æå¹æéãåããæå»	*/
+	uint32_t	vltime;		/* [s] æå¹æé			*/
+	uint32_t	pltime;		/* [s] æ¨å¥¨æå¹æé		*/
+	uint16_t	routermap;	/* ã«ã¼ã¿ããã			*/
+	uint8_t		flags;		/* ãã©ã°			*/
+	uint8_t		prefix_len;	/* ãã¬ãã£ãã¯ã¹é·		*/
+	} T_ND6_PREFIX;
+
+/* ãã©ã° */
+
+#define ND6_PREFIX_FLAG_ONLINK		UINT_C(0x80)	/* ãªã³ãªã³ã¯ãã¬ãã£ãã¯ã¹	*/
+#define ND6_PREFIX_FLAG_AUTO		UINT_C(0x40)	/* ã¹ãã¼ãã¬ã¹ã»ã¢ãã¬ã¹èªåè¨­å®*/
+
+#define ND6_PREFIX_STATE_BUSY		UINT_C(0x01)	/* ä½¿ç¨ä¸­		*/
+#define ND6_PREFIX_STATE_ONLINK		UINT_C(0x02)	/* ãªã³ãªã³ã¯ç¶æ
+	*/
+#define ND6_PREFIX_STATE_DETACHED	UINT_C(0x04)	/* éä½¿ç¨ç¶æ
+	*/
+
+/*
+ *  å¤æ°
+ */
+
+extern SYSTIM	nd6_base_reachable_time;
+extern SYSTIM	nd6_reachable_time;
+extern SYSTIM	nd6_recalc_reachtm_interval;
+extern SYSTIM	nd6_retrans_time;
+extern uint8_t	ip6_defhlim;
+
+/*
+ *  é¢æ°
+ */
+
+extern void nd6_ifattach (T_IFNET *ifp);
+extern void nd6_ns_output (T_IFNET *ifp, T_IN6_ADDR *daddr,
+                           T_IN6_ADDR *taddr, T_LLINFO_ND6 *ln, bool_t dad);
+extern void nd6_na_output (T_IFNET *ifp, T_IN6_ADDR *daddr,
+                           T_IN6_ADDR *taddr, uint32_t flags, bool_t tlladdr);
+extern void nd6_dad_start (T_IFNET *ifp, T_IN6_IFADDR *ia, int_t *tick);
+extern ER nd6_output (T_IFNET *ifp, T_NET_BUF *output,
+                      T_IN6_ADDR *dst, T_LLINFO_ND6 *ln, TMO tmout);
+extern void nd6_na_input (T_NET_BUF *input, uint_t off);
+extern void nd6_ns_input (T_NET_BUF *input, uint_t off);
+extern void nd6_ra_input (T_NET_BUF *input, uint_t off);
+extern ER nd6_storelladdr (T_IF_ADDR *out, T_IN6_ADDR *dst, T_IF_ADDR *ifa);
+extern ER nd6_options (uint8_t *opt, void *nh, uint_t len);
+extern T_LLINFO_ND6 *nd6_lookup (T_IN6_ADDR *addr, bool_t create);
+extern ER nd6_output_hold (T_IFNET *ifp, T_LLINFO_ND6 *ln);
+extern T_LLINFO_ND6 *nd6_cache_lladdr (T_IFNET *ifp, T_IN6_ADDR *from, 
+                                       T_IF_ADDR *lladdr, uint8_t type, uint8_t code);
+extern void nd6_defrtrlist_timer (void);
+extern void nd6_prelist_timer (void);
+extern void nd6_rtrsol_ctl (void);
+extern T_IN6_ADDR *nd6_router_lookup (void);
+extern T_DEF_ROUTER *nd6_defrtrlist_lookup (T_IN6_ADDR *src);
+extern void nd6_defrtrlist_del (T_DEF_ROUTER *dr);
+extern void nd6_timer (void);
+extern const T_DEF_ROUTER *nd6_get_drl (uint_t *count);
+extern const T_ND6_PREFIX *nd6_get_prl (void);
+extern const T_LLINFO_ND6 *nd6_get_cache (void);
+extern ER nd6_prefix_onlink (T_ND6_PREFIX *pr);
+extern ER nd6_prefix_offlink (T_ND6_PREFIX *pr);
+extern T_ND6_PREFIX *nd6_onlink_prefix_lookup (T_IN6_ADDR *dst);
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif	/* of #ifndef _ND6_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/nd6_nbr.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/nd6_nbr.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/nd6_nbr.c	(revision 270)
@@ -0,0 +1,893 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/nd6_nbr.c,v 1.13 2002/10/16 01:54:45 sam Exp $	*/
+/*	$KAME: nd6_nbr.c,v 1.86 2002/01/21 02:33:04 jinmei Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_var.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet6/nd6.h>
+
+#include <netinet/ip6.h>
+#include <netinet/icmp6.h>
+#include <netinet6/ip6_var.h>
+
+#include <net/if6_var.h>
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  å±æé¢æ°
+ */
+
+static void nd6_dad_timer (T_IN6_IFADDR *ifa);
+static void nd6_dad_duplicated (T_IFNET *ifp, T_IN6_IFADDR *ifa);
+static void nd6_dad_ns_output (T_IFNET *ifp, T_IN6_IFADDR *ifa);
+static void nd6_dad_ns_input (T_IFNET *ifp, T_IN6_IFADDR *ifa);
+static void nd6_dad_na_input (T_IFNET *ifp, T_IN6_IFADDR *ifa);
+
+/*
+ *  nd6_dad_duplicated -- éè¤ã¢ãã¬ã¹ãæ¤åºããæã®å¦ç
+ */
+
+static void
+nd6_dad_duplicated (T_IFNET *ifp, T_IN6_IFADDR *ifa)
+{
+	if ((ifa->flags & IN6_IFF_TENTATIVE) == 0)
+		syslog(LOG_ERROR, "[ND6 DAD DUP] no pending.");
+	else {
+		syslog(LOG_ERROR, "[ND6 DAD DUP] dup IPv6 addr: %s.", ipv62str(NULL, &ifa->addr));
+		ifa->flags &= ~IN6_IFF_TENTATIVE;
+		ifa->flags |=  IN6_IFF_DUPLICATED;
+
+		/* ã¿ã¤ãã¼ãåæ­¢ããã*/
+		untimeout((callout_func)nd6_dad_timer, ifa);
+
+		/*
+		 *  ãã IPv6 ã¢ãã¬ã¹ããã¦ãã¼ã¯ã«å²ãå½ã¦ãã
+		 * ï¼ã¤ã¼ãµãããç¨ã® EUI-64ï¼ãã¼ãã¦ã§ã¢ã¢ãã¬ã¹ããã¼ã¹ã¨ãã
+		 *  ã¤ã³ã¿ãã§ã¼ã¹ ID ã§çæãããã®ã§ããã°ã
+		 *  ãã®ã¤ã³ã¿ãã§ã¼ã¹ã§ã® IPv6 ã®åä½ã¯ç¡å¹ã«ãã¹ãã§ãã
+		 * ï¼RFC2462bis-03 ã»ã¯ã·ã§ã³ 5.4.5ï¼ã
+		 */
+		if (IN6_IS_ADDR_LINKLOCAL(&ifa->addr))
+			ifp->flags |= ND6_IFF_IFDISABLED;
+		}
+	}
+
+/*
+ *  nd6_dad_ns_output -- éè¤ã¢ãã¬ã¹æ¤åº (DAD) è¦è«ãåºåããã
+ */
+
+static void
+nd6_dad_ns_output (T_IFNET *ifp, T_IN6_IFADDR *ifa)
+{
+	NET_COUNT_ICMP6(net_count_nd6[NC_ND6_DAD_OUT_PACKETS], 1);
+
+	ifa->ns_ocount ++;
+	nd6_ns_output(ifp, &in6_addr_unspecified, &ifa->addr, NULL, true);
+	}
+
+/*
+ *  nd6_dad_ns_input -- éè¤ã¢ãã¬ã¹æ¤åº (DAD) è¦è«å
+¥å
+ */
+
+static void
+nd6_dad_ns_input (T_IFNET *ifp, T_IN6_IFADDR *ifa)
+{
+	NET_COUNT_ICMP6(net_count_nd6[NC_ND6_NS_IN_PACKETS], 1);
+
+	/*
+	 *  ã¾ã ãéè¤ã¢ãã¬ã¹æ¤åºè¦è«ãåºåãã¦ããªãå ´å
+	 */
+	if (ifa->ns_ocount == 0)
+		nd6_dad_duplicated(ifp, ifa);
+	else
+		ifa->ns_icount ++;
+	}
+
+/*
+ *  nd6_dad_na_input -- éè¤ã¢ãã¬ã¹æ¤åº (DAD) éç¥å
+¥å
+ */
+
+static void
+nd6_dad_na_input (T_IFNET *ifp, T_IN6_IFADDR *ifa)
+{
+	NET_COUNT_ICMP6(net_count_nd6[NC_ND6_NA_IN_PACKETS], 1);
+	ifa->na_icount ++;
+	nd6_dad_duplicated(ifp, ifa);
+	}
+
+/*
+ *  nd6_dad_timer -- éè¤ã¢ãã¬ã¹æ¤åº (DAD) ã¿ã¤ãã¼
+ */
+
+static void
+nd6_dad_timer (T_IN6_IFADDR *ifa)
+{
+	T_IFNET *ifp = IF_GET_IFNET();
+
+	if (ifa->flags & IN6_IFF_DUPLICATED) {
+		syslog(LOG_ERROR, "[ND6 DAD] dup IPv6 addr: %s.", ipv62str(NULL, &ifa->addr));
+		return;
+		}
+
+	if ((ifa->flags & IN6_IFF_TENTATIVE) == 0) {
+		syslog(LOG_ERROR, "[ND6 DAD] no tentative IPv6 addr: %s.", ipv62str(NULL, &ifa->addr));
+		return;
+		}
+
+	if (ifa->ns_ocount < NUM_IP6_DAD_COUNT) {
+		nd6_dad_ns_output(ifp, ifa);
+
+		/* ã¿ã¤ã ã¢ã¦ããè¿é£æ¢ç´¢ã®éä¿¡ééã«è¨­å®ããã*/
+		timeout((callout_func)nd6_dad_timer, ifa, ND6_RETRANS_TIME * NET_TIMER_HZ / SYSTIM_HZ);
+		}
+	else if (ifa->na_icount || ifa->ns_icount)
+		nd6_dad_duplicated(ifp, ifa);
+	else {
+		ifa->flags &= ~IN6_IFF_TENTATIVE;
+		syslog(LOG_NOTICE, "[ND6 DAD] no dup IPv6 addr: %s.", ipv62str(NULL, &ifa->addr));
+		}
+	}
+
+/*
+ *  nd6_ns_input -- è¿é£è¦è«ã®å
+¥åå¦çã
+ */
+
+void
+nd6_ns_input (T_NET_BUF *input, uint_t off)
+{
+	T_IFNET			*ifp = IF_GET_IFNET();
+	T_IP6_HDR		*ip6h;
+	T_NEIGHBOR_SOLICIT_HDR	*nsh;
+	T_ND_OPT_HDR		*opth;
+	T_IN6_IFADDR		*ifa;
+	bool_t			tlladdr;
+	uint_t			lladdr_len = 0;
+	uint32_t		flags;
+	uint8_t			*lladdr = NULL;
+	uint8_t			nd_opt_off[ND_OPT_OFF_ARRAY_SIZE];
+
+	NET_COUNT_ICMP6(net_count_nd6[NC_ND6_NS_IN_PACKETS], 1);
+
+	ip6h = GET_IP6_HDR(input);
+
+	/*
+	 *  ãããã®ãã§ãã¯ãä»¥ä¸ã®å ´åã¯ç ´æ£ããã
+	 *    ã»ããããªãããã IPV6_MAXHLIM (255) ä»¥å¤
+	 *    ã»ãããé·ãç­ã
+	 */
+	if (ip6h->hlim != IPV6_MAXHLIM || input->len - off < NEIGHBOR_SOLICIT_HDR_SIZE)
+		goto err_ret;
+
+	nsh  = (T_NEIGHBOR_SOLICIT_HDR *)(input->buf + off);
+
+	if (IN6_IS_ADDR_UNSPECIFIED(&ip6h->src)) {
+		/*
+		 *  å§ç¹ã¢ãã¬ã¹ãç¡æå®ãªããéè¤ã¢ãã¬ã¹æ¤åº
+		 *  ãã¦å
+ã¢ãã¬ã¹ã¯ãè¦è«ãã«ãã­ã£ã¹ãã§ãªããã°ãªããªãã
+		 */
+		if (!IN6_IS_ADDR_NS_MULTICAST(&ip6h->dst))
+			goto err_ret;
+		}
+
+	/* ç®çã¢ãã¬ã¹ããã«ãã­ã£ã¹ããªãã¨ã©ã¼ */
+	if (IN6_IS_ADDR_MULTICAST(&nsh->target))
+		goto err_ret;
+
+	/* è¿é£æ¢ç´¢ãªãã·ã§ã³ã®ãªãã»ãããè¨é²ããã*/
+	if (nd6_options(nd_opt_off, input->buf + (off + NEIGHBOR_SOLICIT_HDR_SIZE),
+	                            input->len - (off + NEIGHBOR_SOLICIT_HDR_SIZE)) != E_OK)
+		goto err_ret;
+
+	/* è¿é£æ¢ç´¢ãªãã·ã§ã³ (å§ç¹ãªã³ã¯ã¢ãã¬ã¹) */
+	if (nd_opt_off[ND_OPT_OFF_ARRAY_IX(ND_OPT_SOURCE_LINKADDR)]) {
+		opth = (T_ND_OPT_HDR *)((uint8_t *)(input->buf + off + NEIGHBOR_SOLICIT_HDR_SIZE) +
+		                        nd_opt_off[ND_OPT_OFF_ARRAY_IX(ND_OPT_SOURCE_LINKADDR)] - 8);
+	 	/* æ³¨æ: ãªãã·ã§ã³ãªãã»ããé
+åã«ã¯ããªãã»ãã + 8 ãè¨­å®ããã¦ããã*/
+		lladdr     = (uint8_t *)(opth + 1);
+		lladdr_len = (opth->len << 3);
+		}
+
+	if (IN6_IS_ADDR_UNSPECIFIED(&ip6h->src) && lladdr != NULL)
+		goto err_ret;
+
+	/* å®å
+ã¢ãã¬ã¹ããã«ãã­ã£ã¹ããªãè¿é£éç¥ã«ãã¼ã¿ãªã³ã¯å±¤ã®ã¢ãã¬ã¹ãä»ããã*/
+	if (IN6_IS_ADDR_MULTICAST(&ip6h->dst))
+		tlladdr = true;
+	else
+		tlladdr = false;
+
+	/*
+	 *  ç®çã¢ãã¬ã¹ããèªåã®ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã«
+	 *  å²ãå½ã¦ããã¦ããã¢ãã¬ã¹ãèª¿ã¹ãã
+	 *  ãªããä»£çãµã¼ãã¹ã¯å®è£
+ãã¦ããªãã
+	 */
+	ifa = in6_lookup_ifaddr(ifp, &nsh->target);
+
+	if (ifa == NULL)
+		goto free_ret;
+
+	/* æ¢ç´¢çµæã¢ãã¬ã¹ãéè¤ãã¦ããã°å¿ç­ããªãã§çµäºããã*/
+	if (ifa->flags & IN6_IFF_DUPLICATED)
+		goto err_ret;
+
+	/*
+	 *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹é·ãä¸è´ããªããã°ã¨ã©ã¼
+	 */
+	if (lladdr && lladdr_len != ((sizeof(T_IF_ADDR) + sizeof(T_ND_OPT_HDR) + 7) & ~7))
+		goto err_ret;
+
+	/*
+	 *  å§ç¹ã¢ãã¬ã¹ãèªåã®ã¢ãã¬ã¹ã¨ä¸è´ããã°éè¤ãã¦ããã
+	 */
+	if (IN6_ARE_ADDR_EQUAL(&ifa->addr, &ip6h->src))
+		goto free_ret;
+
+	/* éè¤æ¤åºä¸­ã«ãè¿é£è¦è«ãåä¿¡ããã¨ãã®å¦ç */
+	if (ifa->flags & IN6_IFF_TENTATIVE) {
+		if (IN6_IS_ADDR_UNSPECIFIED(&ip6h->src))
+			nd6_dad_ns_input(ifp, ifa);
+		goto free_ret;
+		}
+
+	if ((ifa->flags & IN6_IFF_ANYCAST) || !tlladdr)
+		flags = 0;
+	else
+		flags = ND_NA_FLG_OVERRIDE;
+
+	/*
+	 *  å§ç¹ã¢ãã¬ã¹ãç¡æå®ãªããéä¿¡ç¸æã¯éè¤ã¢ãã¬ã¹æ¤åºä¸­ã§ã
+	 *  ç´æ¥éä¿¡ãããã¨ã¯ã§ããªãã®ã§ãå
+¨ãã¼ããã«ãã­ã£ã¹ã
+	 *  ã¢ãã¬ã¹ã«éä¿¡ããã
+	 */
+	if (IN6_IS_ADDR_UNSPECIFIED(&ip6h->src)) {
+		nd6_na_output(ifp, &in6_addr_linklocal_allnodes, &nsh->target, flags, tlladdr);
+		goto free_ret;
+		}
+
+	/* è¿é£ã­ã£ãã·ã¥ã«ç»é²ããã*/
+	nd6_cache_lladdr(ifp, &ip6h->src, (T_IF_ADDR *)lladdr, ND_NEIGHBOR_SOLICIT, 0);
+
+	nd6_na_output(ifp, &ip6h->src, &nsh->target, flags | ND_NA_FLG_SOLICITED, tlladdr);
+
+free_ret:
+	syscall(rel_net_buf(input));
+	return;
+
+err_ret:
+	NET_COUNT_ICMP6(net_count_nd6[NC_ICMP6_IN_ERR_PACKETS], 1);
+	syscall(rel_net_buf(input));
+	}
+
+/*
+ *  nd6_ns_output -- è¿é£è¦è«ãåºåããã
+ */
+
+void
+nd6_ns_output (T_IFNET *ifp, T_IN6_ADDR *daddr,
+               T_IN6_ADDR *taddr, T_LLINFO_ND6 *ln, bool_t dad)
+{
+	T_NEIGHBOR_SOLICIT_HDR	*nsh;
+	T_NET_BUF		*output;
+	T_IP6_HDR		*ip6h;
+	T_IF_ADDR		*mac = NULL;
+	uint_t			len;
+	uint16_t		ipflags = 0;
+
+	NET_COUNT_ICMP6(net_count_nd6[NC_ND6_NS_OUT_PACKETS], 1);
+
+	if (IN6_IS_ADDR_MULTICAST(taddr))
+		return;
+
+	/* è¿é£è¦è«ãã¤ã­ã¼ãé·ãè¨ç®ããã*/
+	if (!dad && IF_SOFTC_TO_IFADDR(ifp->ic))
+		len = (NEIGHBOR_SOLICIT_HDR_SIZE + ND_OPT_HDR_SIZE + sizeof(T_IF_ADDR) + 7) >> 3 << 3;
+	else
+		len = (NEIGHBOR_SOLICIT_HDR_SIZE + 7) >> 3 << 3;
+
+	/*
+	 *  è¦è«ãã«ãã­ã£ã¹ãã»ã¢ãã¬ã¹å®ã®è¿é£æ¢ç´¢ã§ã¯ã
+	 *  ä»ã®ãªã³ã¯ããã®å½é ããããã¼ã¿ã°ã©ã ã
+	 *  æé¤ãããããããããªãããã« IPV6_MAXHLIM (255) ãè¨­å®ããã
+	 */
+	if (IN6_IS_ADDR_UNSPECIFIED(daddr) || IN6_IS_ADDR_MULTICAST(daddr))
+		ipflags = IPV6_OUT_SET_HOP_LIMIT(IPV6_OUT_FLG_HOP_LIMIT, IPV6_MAXHLIM);
+
+	/* ãããã¯ã¼ã¯ãããã¡ãç²å¾ããIPv6 ããããè¨­å®ããã*/
+	if (in6_get_datagram(&output, len, 0, daddr, NULL,
+	                     IPPROTO_ICMPV6, IPV6_MAXHLIM,
+	                     NBA_SEARCH_ASCENT, TMO_ND6_NS_OUTPUT) != E_OK)
+		return;
+
+	ip6h = GET_IP6_HDR(output);
+
+	if (IN6_IS_ADDR_UNSPECIFIED(daddr)) {
+
+		/* å®å
+ã¢ãã¬ã¹ãç¡æå®ã®å ´åã¯ãè¦è«ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ãè¨­å®ããã*/
+		ip6h->dst.s6_addr32[0] = IPV6_ADDR_INT32_MLL;
+		ip6h->dst.s6_addr32[2] = IPV6_ADDR_INT32_ONE;
+		ip6h->dst.s6_addr32[3] = taddr->s6_addr32[3];
+		ip6h->dst.s6_addr8[12] = 0xff;
+		}
+
+	/* éä¿¡å
+ã¢ãã¬ã¹ã®è¨­å® */
+	if (!dad) {
+
+		/* éè¤ã¢ãã¬ã¹æ¤åºã§ã¯ãªãæã®éä¿¡å
+ã¢ãã¬ã¹æ±ºå®å¦çã*/
+		T_IN6_ADDR *saddr;
+
+		if (ln && ln->hold) {
+			/*
+			 * éä¿¡ããã³ãã£ã³ã°ããã¦ãããã¼ã¿ã°ã©ã ã®
+			 * éä¿¡å
+ã¢ãã¬ã¹ãå©ç¨ããã
+			 */
+			if (ln->hold->len > IF_IP6_HDR_SIZE)
+				saddr = &GET_IP6_HDR(ln->hold)->src;
+			else
+				saddr = NULL;
+			}
+		else
+			saddr = NULL;
+
+		if (saddr && in6_lookup_ifaddr(ifp, saddr))
+			ip6h->src = *saddr;
+		else {
+			/*
+			 *  å®å
+ã¢ãã¬ã¹ã«ãµããããéä¿¡å
+ã¢ãã¬ã¹ãã
+			 *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ããæ¢ç´¢ãã¦å©ç¨ããã
+			 */
+			T_IN6_IFADDR *ifa;
+
+			if ((ifa = in6_ifawithifp(ifp, &ip6h->dst)) == NULL) {
+				syscall(rel_net_buf(output));
+				return;
+				}
+			ip6h->src = ifa->addr;
+			}
+		}
+	else {
+
+		/* éè¤ã¢ãã¬ã¹æ¤åºæã®éä¿¡å
+ã¢ãã¬ã¹ã¯ç¡æå®ã*/
+		memset(&ip6h->src, 0, sizeof(T_IN6_ADDR));
+		}
+
+ 	/* è¿é£è¦è«ããããè¨­å®ããã*/
+ 	nsh = GET_NEIGHBOR_SOLICIT_HDR(output, IF_IP6_NEIGHBOR_SOLICIT_HDR_OFFSET);
+ 	nsh->hdr.type        = ND_NEIGHBOR_SOLICIT;
+ 	nsh->hdr.code        = 0;
+ 	nsh->hdr.data.data32 = 0;
+ 	nsh->target          = *taddr;
+
+	if (!dad && (mac = IF_SOFTC_TO_IFADDR(ifp->ic)) != NULL) {
+
+		/* è¿é£æ¢ç´¢ãªãã·ã§ã³ã¨ãã¦ãæ¢ç´¢ç®æ¨ã® MAC ã¢ãã¬ã¹ãè¨­å®ããã*/
+		T_ND_OPT_HDR	*opth;
+		uint_t		optlen;
+
+		opth   = (T_ND_OPT_HDR *)GET_NEIGHBOR_SOLICIT_SDU(output, IF_IP6_NEIGHBOR_SOLICIT_HDR_OFFSET);
+		optlen = (ND_OPT_HDR_SIZE + sizeof(T_IF_ADDR) + 7) >> 3 << 3;
+		memset(opth, 0, optlen);
+		opth->type = ND_OPT_SOURCE_LINKADDR;
+		opth->len  = optlen >> 3;
+		memcpy((uint8_t *)opth + sizeof(T_ND_OPT_HDR), mac, sizeof(T_IF_ADDR));
+		}
+
+	/* ãã§ãã¯ãµã ãè¨ç®ããã*/
+	nsh->hdr.sum = 0;
+	nsh->hdr.sum = in6_cksum(output, IPPROTO_ICMPV6, (uint8_t*)nsh - output->buf, len);
+
+	/* éä¿¡ããã*/
+	NET_COUNT_ICMP6(net_count_nd6[NC_ICMP6_OUT_OCTETS],
+	               output->len - GET_IF_IP6_HDR_SIZE(output));
+	NET_COUNT_ICMP6(net_count_nd6[NC_ICMP6_OUT_PACKETS], 1);
+	NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpOutMsgs, 1);
+	NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpOutNeighborSolicits, 1);
+	ip6_output(output, ipflags | IPV6_OUT_FLG_DAD, TMO_ND6_NS_OUTPUT);
+	}
+
+/*
+ *  nd6_na_input -- è¿é£éç¥ã®å
+¥åå¦çã
+ */
+
+void
+nd6_na_input (T_NET_BUF *input, uint_t off)
+{
+	T_IFNET			*ifp = IF_GET_IFNET();
+	T_IP6_HDR		*ip6h;
+	T_NEIGHBOR_ADVERT_HDR	*nah;
+	T_ND_OPT_HDR		*opth;
+	T_IN6_IFADDR		*ifa;
+	T_LLINFO_ND6		*ln;
+	SYSTIM			now;
+	bool_t			llchange;
+	uint_t			lladdr_len = 0;
+	uint8_t			*lladdr = NULL;
+	uint8_t			nd_opt_off[ND_OPT_OFF_ARRAY_SIZE];
+
+	NET_COUNT_ICMP6(net_count_nd6[NC_ND6_NS_IN_PACKETS], 1);
+
+	ip6h = GET_IP6_HDR(input);
+
+	/*
+	 *  ãããã®ãã§ãã¯ãä»¥ä¸ã®å ´åã¯ç ´æ£ããã
+	 *    ã»ããããªãããã IPV6_MAXHLIM (255) ä»¥å¤
+	 *    ã»ãããé·ãç­ã
+	 */
+	if (ip6h->hlim != IPV6_MAXHLIM || input->len - off < NEIGHBOR_ADVERT_HDR_SIZE)
+		goto err_ret;
+
+	nah  = (T_NEIGHBOR_ADVERT_HDR *)(input->buf + off);
+
+	/* ç®çã¢ãã¬ã¹ããã«ãã­ã£ã¹ããªãã¨ã©ã¼ */
+	if (IN6_IS_ADDR_MULTICAST(&nah->target))
+		goto err_ret;
+
+	/* è¿é£è¦è«ã¸ã®å¿ç­ã§ãå®å
+ã¢ãã¬ã¹ããã«ãã­ã£ã¹ããªãã¨ã©ã¼ */
+	if ((nah->nd_na_flags_reserved & ND_NA_FLG_SOLICITED) &&
+	    IN6_IS_ADDR_MULTICAST(&ip6h->dst))
+		goto err_ret;
+
+	/* è¿é£æ¢ç´¢ãªãã·ã§ã³ã®ãªãã»ãããè¨é²ããã*/
+	if (nd6_options(nd_opt_off, input->buf + (off + NEIGHBOR_ADVERT_HDR_SIZE), 
+	                            input->len - (off + NEIGHBOR_ADVERT_HDR_SIZE)) != E_OK)
+		goto err_ret;
+
+	/* è¿é£æ¢ç´¢ãªãã·ã§ã³ (ç®çãªã³ã¯ã¢ãã¬ã¹) */
+	if (nd_opt_off[ND_OPT_OFF_ARRAY_IX(ND_OPT_TARGET_LINKADDR)]) {
+		opth = (T_ND_OPT_HDR *)((uint8_t *)(input->buf + off + NEIGHBOR_ADVERT_HDR_SIZE) +
+		                        nd_opt_off[ND_OPT_OFF_ARRAY_IX(ND_OPT_TARGET_LINKADDR)] - 8);
+	 	/* æ³¨æ: ãªãã·ã§ã³ãªãã»ããé
+åã«ã¯ããªãã»ãã + 8 ãè¨­å®ããã¦ããã*/
+		lladdr     = (uint8_t *)(opth + 1);
+		lladdr_len = (opth->len << 3);
+		}
+
+	ifa = in6_lookup_ifaddr(ifp, &nah->target);
+
+	/*
+	 *  ç®çã¢ãã¬ã¹ãèªåã®ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã«å²ãå½ã¦ããã¦ããã¢ãã¬ã¹ã®
+	 *  ããããã«ä¸è´ããã¨ãã¯ãéè¤ãã¦ãããã¨ãæå³ãã¦ããã
+	 */
+	if (ifa) {
+		if (ifa->flags & IN6_IFF_TENTATIVE)
+			nd6_dad_na_input(ifp, ifa);
+		else
+			syslog(LOG_ERROR, "[ND6 NA INPUT] dup IPv6 addr: %s.", ipv62str(NULL, &ifa->addr));
+		goto err_ret;
+		}
+
+	/*
+	 *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹é·ãä¸è´ããªããã°ã¨ã©ã¼
+	 */
+	if (lladdr && lladdr_len != ((sizeof(T_IF_ADDR) + sizeof(T_ND_OPT_HDR) + 7) & ~7))
+		goto err_ret;
+
+	/* è¿é£ã­ã£ãã·ã¥ãæ¢ç´¢ããã*/
+	syscall(wai_sem(SEM_ND6_CACHE));
+	if ((ln = nd6_lookup(&nah->target, false)) == NULL)
+		goto free_ret;
+
+	/* è¿é£ã­ã£ãã·ã¥ã®ç¶æ
+ãããã¼ã¿ãªã³ã¯å±¤ã®ã¢ãã¬ã¹æªè§£æ±ºã®å ´å */
+	if (ln->state == ND6_LLINFO_INCOMPLETE) {
+		/* éç¥ããããã¼ã¿ãªã³ã¯å±¤ã®ã¢ãã¬ã¹ã®é·ãã 0 ã®å ´å */
+		if (lladdr == NULL)
+			goto free_ret;
+
+		ln->ifaddr = *(T_IF_ADDR *)lladdr;
+		if (nah->nd_na_flags_reserved & ND_NA_FLG_SOLICITED) {
+			ln->state = ND6_LLINFO_REACHABLE;
+			/*ln->byhint = 0*/;
+			if (ln->expire) {
+				syscall(get_tim(&now));
+				ln->expire = now + ND6_REACHABLE_TIME;
+				}
+			}
+		else {
+			syscall(get_tim(&now));
+			ln->expire = now + ND6_GCOLLECTION_TIME;
+			ln->state  = ND6_LLINFO_STALE;
+			}
+
+		if ((nah->nd_na_flags_reserved & ND_NA_FLG_ROUTER) != 0)
+			ln->flags |=  ND6_LLIF_ROUTER;
+		else
+			ln->flags &= ~ND6_LLIF_ROUTER;
+		if ((ln->flags & ND6_LLIF_ROUTER) != 0)
+			/*pfxlist_onlink_check()*/;
+		}
+	else {
+		if (lladdr == NULL)
+			llchange = false;
+		else if (memcmp(lladdr, &ln->ifaddr, sizeof(T_IF_ADDR)))
+			llchange = true;
+		else
+			llchange = false;
+
+		/*
+		 *  ç¶æ
+é·ç§»è¡¨
+		 *
+		 *  nd_na_flags_reserved
+		 *  OVERRIDE    SOLICTED lladdr llchange å¦ç (L: lladdr ãç»é²ãã)
+		 *
+		 *      F           F       N      -    (2c)
+		 *      F           F       Y      F    (2b) L
+		 *      F           F       Y      T    (1)    REACHABLE -> STALE
+		 *      F           T       N      -    (2c)           * -> REACHABLE
+		 *      F           T       Y      F    (2b) L         * -> REACHABLE
+		 *      F           T       Y      T    (1)    REACHABLE -> STALE
+		 *      T           F       N      -    (2a)
+		 *      T           F       Y      F    (2a) L
+		 *      T           F       Y      T    (2a) L         *-> STALE
+		 *      T           T       N      -    (2a)           * -> REACHABLE
+		 *      T           T       Y      F    (2a) L         * -> REACHABLE
+		 *      T           T       Y      T    (2a) L         * -> REACHABLE
+		 */
+		if ((nah->nd_na_flags_reserved & ND_NA_FLG_OVERRIDE) == 0 && (lladdr != NULL && llchange)) {	/* (1) */
+			/* ç¶æ
+ã REACHABLE ãªã STALE ã«é·ç§»ããã*/
+			if (ln->state == ND6_LLINFO_REACHABLE) {
+				syscall(get_tim(&now));
+				ln->expire = now + ND6_GCOLLECTION_TIME;
+				ln->state  = ND6_LLINFO_STALE;
+				}
+			goto free_ret;
+			}
+		else if ((nah->nd_na_flags_reserved & ND_NA_FLG_OVERRIDE) ||						/* (2a) */
+		         ((nah->nd_na_flags_reserved & ND_NA_FLG_OVERRIDE) == 0 && (lladdr != NULL && !llchange)) ||	/* (2b) */
+		         lladdr == NULL) {										/* (2c) */
+
+			/* ãã¼ã¿ãªã³ã¯å±¤ã®ã¢ãã¬ã¹ãéç¥ããã¦ããã°æ´æ°ããã*/
+			if (lladdr != NULL)
+				ln->ifaddr = *(T_IF_ADDR *)lladdr;
+
+			/* è¿é£è¦è«ã¸ã®å¿ç­ãªã REACHABLE ã«é·ç§»ããã*/
+			if (nah->nd_na_flags_reserved & ND_NA_FLG_SOLICITED) {
+				ln->state = ND6_LLINFO_REACHABLE;
+				/*ln->byhint = 0*/;
+				if (ln->expire) {
+					syscall(get_tim(&now));
+					ln->expire = now + ND6_REACHABLE_TIME;
+					}
+				}
+			/*
+			 *  ãã¼ã¿ãªã³ã¯å±¤ã®ã¢ãã¬ã¹ãéç¥ããã
+			 *  ç°ãªãã¢ãã¬ã¹ãªãæ´æ°ããã
+			 */
+			else if (lladdr != NULL && llchange) {
+				syscall(get_tim(&now));
+				ln->expire = now + ND6_GCOLLECTION_TIME;
+				ln->state  = ND6_LLINFO_STALE;
+				}
+			}
+
+		/* ã«ã¼ã¿éç¥ãã©ã°ã®å¦ç */
+		if ((ln->flags        & ND6_LLIF_ROUTER ) != 0 &&
+		    (nah->nd_na_flags_reserved & ND_NA_FLG_ROUTER) == 0) {
+			/*
+			 *  éä¿¡ç¸æãã«ã¼ã¿éç¥ãã©ã°ãç¡å¹ã«ããå ´åã
+			 *  ãã£ãã©ã«ãã»ã«ã¼ã¿ãªã¹ãããå¯¾è±¡ã®ã«ã¼ã¿ãåé¤ãã
+			 *  è¿é£æ¢ç´¢ã­ã£ãã·ã¥ãæ´æ°ããã
+			 */
+			T_DEF_ROUTER	*dr = NULL;
+
+			syscall(wai_sem(SEM_ND6_DEFRTRLIST));
+			if ((dr = nd6_defrtrlist_lookup(&ln->addr)) != NULL) {
+				nd6_defrtrlist_del(dr);
+				}
+			syscall(sig_sem(SEM_ND6_DEFRTRLIST));
+			}
+		if ((nah->nd_na_flags_reserved & ND_NA_FLG_ROUTER) != 0)
+			ln->flags |=  ND6_LLIF_ROUTER;
+		else
+			ln->flags &= ~ND6_LLIF_ROUTER;
+		}
+
+	ln->asked = 0;
+
+	/* ã¢ãã¬ã¹è§£æ±ºå¾
+ã¡ã®ãã¼ã¿ã°ã©ã ãããã°éä¿¡ããã*/
+	nd6_output_hold(ifp, ln);
+
+free_ret:
+	syscall(sig_sem(SEM_ND6_CACHE));
+	syscall(rel_net_buf(input));
+	return;
+
+err_ret:
+	NET_COUNT_ICMP6(net_count_nd6[NC_ICMP6_IN_ERR_PACKETS], 1);
+	syscall(rel_net_buf(input));
+	}
+
+/*
+ *  nd6_na_output -- è¿é£éç¥ãåºåããã
+ */
+
+void
+nd6_na_output (T_IFNET *ifp, T_IN6_ADDR *daddr,
+               T_IN6_ADDR *taddr, uint32_t flags, bool_t tlladdr)
+{
+	T_NEIGHBOR_ADVERT_HDR	*nah;
+	T_NET_BUF		*output;
+	T_IP6_HDR		*ip6h;
+	T_IN6_IFADDR		*ifa;
+	T_IF_ADDR		*mac = NULL;
+	uint_t			len;
+	uint16_t		ipflags = 0;
+
+	NET_COUNT_ICMP6(net_count_nd6[NC_ND6_NA_OUT_PACKETS], 1);
+
+	/*
+	 *  è¿é£éç¥ãã¤ã­ã¼ãé·ãè¨ç®ããã
+	 *  tlladdr ãçãªããããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹ãè¿½å ããã
+	 */
+	if (tlladdr && IF_SOFTC_TO_IFADDR(ifp->ic))
+		len = (NEIGHBOR_ADVERT_HDR_SIZE + ND_OPT_HDR_SIZE + sizeof(T_IF_ADDR) + 7) >> 3 << 3;
+	else
+		len = (NEIGHBOR_ADVERT_HDR_SIZE + 7) >> 3 << 3;
+
+	/*
+	 *  ä»ã®ãªã³ã¯ããã®å½é ããããã¼ã¿ã°ã©ã ã
+	 *  æé¤ãããããããããªãããã« IPV6_MAXHLIM (255) ãè¨­å®ããã
+	 */
+	ipflags = IPV6_OUT_SET_HOP_LIMIT(IPV6_OUT_FLG_HOP_LIMIT, IPV6_MAXHLIM);
+
+	/* ãããã¯ã¼ã¯ãããã¡ãç²å¾ããIPv6 ããããè¨­å®ããã*/
+	if (in6_get_datagram(&output, len, 0, daddr, NULL,
+	                     IPPROTO_ICMPV6, IPV6_MAXHLIM,
+	                     NBA_SEARCH_ASCENT, TMO_ND6_NA_OUTPUT) != E_OK)
+		return;
+
+	ip6h = GET_IP6_HDR(output);
+
+	if (IN6_IS_ADDR_UNSPECIFIED(daddr)) {
+		/*
+		 *  å®å
+ã¢ãã¬ã¹ãç¡æå®ã®å ´åã¯ã
+		 *  ãªã³ã¯ã­ã¼ã«ã«å
+¨ãã¼ãã»ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ãè¨­å®ããã
+		 */
+		ip6h->dst.s6_addr32[0] = IPV6_ADDR_INT32_MLL;
+		ip6h->dst.s6_addr32[1] = 0;
+		ip6h->dst.s6_addr32[2] = 0;
+		ip6h->dst.s6_addr32[3] = IPV6_ADDR_INT32_ONE;
+		flags &= ~ND_NA_FLG_SOLICITED;
+		}
+	else
+		ip6h->dst = *daddr;
+
+	/*
+	 *  å®å
+ã¢ãã¬ã¹ã«ãµããããéä¿¡å
+ã¢ãã¬ã¹ãã
+	 *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ããæ¢ç´¢ãã¦å©ç¨ããã
+	 */
+	if ((ifa = in6_ifawithifp(ifp, &ip6h->dst)) == NULL) {
+		syscall(rel_net_buf(output));
+		return;
+		}
+	ip6h->src = ifa->addr;
+
+ 	/* è¿é£éç¥ããããè¨­å®ããã*/
+ 	nah = GET_NEIGHBOR_ADVERT_HDR(output, IF_IP6_NEIGHBOR_ADVERT_HDR_OFFSET);
+ 	nah->hdr.type        = ND_NEIGHBOR_ADVERT;
+ 	nah->hdr.code        = 0;
+ 	nah->target          = *taddr;
+
+	/* tlladdr ãçãªããããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹ãè¿½å ããã*/
+	if (tlladdr && (mac = IF_SOFTC_TO_IFADDR(ifp->ic)) != NULL) {
+
+		T_ND_OPT_HDR	*opth;
+		uint_t		optlen;
+
+		opth   = (T_ND_OPT_HDR *)GET_NEIGHBOR_ADVERT_SDU(output, IF_IP6_NEIGHBOR_ADVERT_HDR_OFFSET);
+		optlen = (ND_OPT_HDR_SIZE + sizeof(T_IF_ADDR) + 7) >> 3 << 3;
+		memset(opth, 0, optlen);
+		opth->type = ND_OPT_TARGET_LINKADDR;
+		opth->len  = optlen >> 3;
+		memcpy((uint8_t *)opth + sizeof(T_ND_OPT_HDR), mac, sizeof(T_IF_ADDR));
+		}
+	else
+		flags &= ~ND_NA_FLG_OVERRIDE;
+
+	nah->nd_na_flags_reserved = flags;
+
+	/* ãã§ãã¯ãµã ãè¨ç®ããã*/
+	nah->hdr.sum = 0;
+	nah->hdr.sum = in6_cksum(output, IPPROTO_ICMPV6, (uint8_t*)nah - output->buf, len);
+
+	/* éä¿¡ããã*/
+	NET_COUNT_ICMP6(net_count_nd6[NC_ICMP6_OUT_OCTETS],
+	               output->len - GET_IF_IP6_HDR_SIZE(output));
+	NET_COUNT_ICMP6(net_count_nd6[NC_ICMP6_OUT_PACKETS], 1);
+	NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpOutMsgs, 1);
+	NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpOutNeighborAdvertisements, 1);
+	ip6_output(output, ipflags, TMO_ND6_NS_OUTPUT);
+	}
+
+/*
+ *  nd6_dad_start -- éè¤ã¢ãã¬ã¹æ¤åº (DAD) ãéå§ããã
+ *
+ *    ç¬¬3å¼æ°ã®tick ã¯ãã¤ã³ã¿ãã§ã¼ã¹ãèµ·åããã¦ãããéè¤æ¤åºã
+ *    éä¿¡ããã¾ã§ã®æå°é
+å»¶å¤ã§ããã
+ */
+
+void
+nd6_dad_start (T_IFNET *ifp, T_IN6_IFADDR *ifa, int_t *tick)
+{
+	/* ãã©ã°ããã§ãã¯ããã*/
+	if (!(ifa->flags & IN6_IFF_TENTATIVE))
+		return;
+
+#if NUM_IP6_DAD_COUNT == 0
+
+	ifa->flags &= ~IN6_IFF_TENTATIVE;
+
+#else	/* of #if NUM_IP6_DAD_COUNT == 0 */
+
+	if (ifa->flags & IN6_IFF_ANYCAST) {
+		ifa->flags &= ~IN6_IFF_TENTATIVE;
+		return;
+		}
+	else if ((ifa->flags & IN6_IFF_TENTATIVE) == 0)
+		return;
+
+	/* éè¤ã¢ãã¬ã¹æ¤åºã«ã¦ã³ã¿ããªã»ããããã*/
+	ifa->ns_icount = ifa->na_icount = ifa->ns_ocount = 0;
+
+	/*
+	 *  éè¤ã¢ãã¬ã¹æ¤åºè¦è«ãéä¿¡ããããã ããã¤ã³ã¿ãã§ã¼ã¹ã
+	 *  åæåããç´å¾ã«ãæåã«éä¿¡ããå ´åã¯ãã©ã³ãã ãªé
+å»¶ãè¡ãã
+	 */
+	if (tick == NULL) {
+		nd6_dad_ns_output(ifp, ifa);
+
+		/* ã¿ã¤ã ã¢ã¦ããè¿é£æ¢ç´¢ã®éä¿¡ééã«è¨­å®ããã*/
+		timeout((callout_func)nd6_dad_timer, ifa, ND6_RETRANS_TIME * NET_TIMER_HZ / SYSTIM_HZ);
+		}
+	else {
+		int_t ntick;
+
+		if (*tick == 0)	/* æåã®éä¿¡ */
+			ntick = net_rand() % (ND6_FIRST_DAD_DELAY_TIME * NET_TIMER_HZ / SYSTIM_HZ);
+		else
+			ntick = *tick + net_rand() % (ND6_DAD_DELAY_TIME * NET_TIMER_HZ / SYSTIM_HZ);
+		*tick = ntick;
+		timeout((callout_func)nd6_dad_timer, ifa, ntick);
+		}
+
+#endif	/* of #if NUM_IP6_DAD_COUNT == 0 */
+
+	}
+
+#endif /* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/nd6_rtr.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/nd6_rtr.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/nd6_rtr.c	(revision 270)
@@ -0,0 +1,1481 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/nd6_rtr.c,v 1.11 2002/04/19 04:46:23 suz Exp $	*/
+/*	$KAME: nd6_rtr.c,v 1.111 2001/04/27 01:37:15 jinmei Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+#include <t_syslog.h>
+#include "kernel_cfg.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+#include "kernel_id.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/ppp_ipcp.h>
+#include <net/net.h>
+#include <net/net_var.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet6/in6_ifattach.h>
+#include <netinet/ip6.h>
+#include <netinet/icmp6.h>
+#include <netinet6/ip6_var.h>
+
+#include <net/if6_var.h>
+
+/*
+ *  å¤é¨é¢æ°ã®å®ç¾©
+ */
+
+extern const char *itron_strerror (ER ercd);
+
+#ifdef SUPPORT_INET6
+
+#if NUM_ND6_DEF_RTR_ENTRY > 0
+
+/*
+ *  å
+¨åå¤æ°
+ */
+
+SYSTIM	nd6_base_reachable_time		= ND6_DEF_REACHABLE_TIME;	/* ã«ã¼ã¿ããéç¥ãããå¤		*/
+SYSTIM	nd6_reachable_time		= ND6_DEF_REACHABLE_TIME;	/* ã«ã¼ã¿ããéç¥ãããå¤ã®è£æ­£å¤	*/
+SYSTIM	nd6_recalc_reachtm_interval	= ND6_RECALC_REACHTM_INTERVAL;	/* å°éå¯è½ç¶æ
+ã®æå¹æéåè¨ç®éé	*/
+SYSTIM	nd6_retrans_time		= ND6_DEF_RETRANS_TIME;		/* è¿é£æ¢ç´¢ã®éä¿¡éé			*/
+uint8_t	ip6_defhlim			= IPV6_DEFHLIM;			/* ããããªãããã®è¦å®å¤		*/
+
+/*
+ *  å±æå¤æ°
+ */
+
+/*
+ *  ãã¬ãã£ãã¯ã¹ã»ãªã¹ã
+ */
+
+static T_ND6_PREFIX nd6_prefix[NUM_ND6_PREFIX_ENTRY];
+
+/*
+ *  ãã£ãã©ã«ãã«ã¼ã¿ã»ãªã¹ã
+ */
+
+static T_DEF_ROUTER	nd6_def_router[NUM_ND6_DEF_RTR_ENTRY];
+static uint_t		def_router_count = 0;				/* ãªã¹ãã«ããã«ã¼ã¿æ° */
+
+/*
+ *  make_mask -- ãããç¨ã®ãã¹ã¯ãçæããã
+ */
+
+static uint_t
+make_mask (int_t index)
+{
+	uint_t	mask;
+	int_t	ix;
+
+	/* ãã¹ã¯ãçæããã*/
+	mask = 1;
+	for (ix = index; ix -- > 0; )
+		mask <<= 1;
+
+	return mask;
+	}
+
+/*
+ *  find_pfxlist_reachable_router --
+ *      æå®ãããã¬ãã£ãã¯ã¹ãéç¥ããã«ã¼ã¿ããªã³ã¯ä¸ã«å­å¨ããããã§ãã¯ããã
+ */
+
+static T_DEF_ROUTER *
+find_pfxlist_reachable_router (T_ND6_PREFIX *pr)
+{
+	T_DEF_ROUTER	*dr = NULL;
+	T_LLINFO_ND6	*ln;
+	uint_t		mask;
+	int_t		ix;
+
+	mask = 1;
+	for (ix = 0; ix < def_router_count; ix ++) {
+		if ((pr->routermap & mask) != 0) {
+			if ((ln = nd6_lookup(&nd6_def_router[ix].addr, false)) != NULL &&
+			    ND6_IS_LLINFO_PROBREACH(ln))
+				return dr;
+			}
+		mask <<= 1;
+		}
+	return NULL;
+	}
+
+/*
+ *  pfxlist_onlink_check -- ãã¬ãã£ãã¯ã¹ã»ãªã¹ãã®ãªã³ãªã³ã¯ç¶æ
+ããã§ãã¯ããã
+ *
+ *    æ³¨æ: ãã®é¢æ°ãå¼ã³åºãã¨ãã¯ãSEM_ND6_DEFRTRLIST ã§ã
+ *          ã­ãã¯ãã¦ããå¼ã³åºããã¨ã
+ */
+
+static void
+pfxlist_onlink_check (void)
+{
+	T_IFNET		*ifp = IF_GET_IFNET();
+	T_ND6_PREFIX	*pr = NULL;
+	T_IN6_IFADDR	*ia;
+	ER		error;
+	int_t		ix;
+
+	for (ix = NUM_ND6_PREFIX_ENTRY; ix -- > 0; ) {
+		pr = &nd6_prefix[ix];
+		if ((pr->flags & ND6_PREFIX_FLAG_ONLINK) != 0 &&
+		    find_pfxlist_reachable_router(pr))
+			break;
+		}
+
+	if (ix >= 0) {
+		/*
+		 *  ãªã³ãªã³ã¯ç¶æ
+ã®ãã¬ãã£ãã¯ã¹ãæä½ä¸ã¤å­å¨ããã¨ãã®å¦çã
+		 *  åãã¬ãã£ãã¯ã¹ã®ãªã³ãªã³ã¯ç¶æ
+ããããããéç¥ãã¦ããã«ã¼ã¿ã®
+		 *  ç¶æ
+ã«å¾ã£ã¦è¨­å®ããã
+		 */
+
+		
+		for (ix = NUM_ND6_PREFIX_ENTRY; ix -- > 0; ) {
+			pr = &nd6_prefix[ix];
+
+			if ((pr->flags & ND6_PREFIX_FLAG_ONLINK) == 0)
+				continue;
+
+			if ((pr->flags & ND6_PREFIX_STATE_DETACHED) == 0 &&
+			    find_pfxlist_reachable_router(pr) == NULL)
+				pr->flags |= ND6_PREFIX_STATE_DETACHED;
+
+			if ((pr->flags & ND6_PREFIX_STATE_DETACHED) != 0 &&
+			    find_pfxlist_reachable_router(pr) != NULL)
+				pr->flags &= ~ND6_PREFIX_STATE_DETACHED;
+			}
+		}
+	else {
+		/*
+		 *  ã©ã®ãã¬ãã£ãã¯ã¹ããªã³ãªã³ã¯ã§ã¯ãªãã
+		 *  ãã£ãã©ã«ãã«ã¼ã¿ãå­å¨ããªãã¨ãã®å¦çã
+		 *  ãã¹ã¦ã®ãã¬ãã£ãã¯ã¹ãä½¿ç¨å¯è½ç¶æ
+ã«è¨­å®ããã
+		 */
+
+		
+		for (ix = NUM_ND6_PREFIX_ENTRY; ix -- > 0; ) {
+			pr = &nd6_prefix[ix];
+
+			if ((pr->flags & ND6_PREFIX_FLAG_ONLINK) == 0)
+				continue;
+
+			if ((pr->flags & ND6_PREFIX_STATE_DETACHED) != 0)
+				pr->flags &= ~ND6_PREFIX_STATE_DETACHED;
+			}
+		}
+
+	/*
+	 *  åãã¬ãã£ãã¯ã¹æ¯ã«ãéç¥ãã¦ããã«ã¼ã¿ã®ç¶æ
+ã¨
+	 *  ãªã³ãªã³ã¯ã®ç¶æ
+ãä¸è´ããªããã°ããªã³ãªã³ã¯ç¶æ
+ãæ´æ°ããã
+	 */
+	for (ix = NUM_ND6_PREFIX_ENTRY; ix -- > 0; ) {
+		pr = &nd6_prefix[ix];
+
+		if ((pr->flags & ND6_PREFIX_FLAG_ONLINK) == 0)
+			continue;
+
+		if ((pr->flags & ND6_PREFIX_STATE_DETACHED) != 0 &&
+		    (pr->flags & ND6_PREFIX_STATE_ONLINK  ) != 0) {
+			if ((error = nd6_prefix_offlink(pr)) != E_OK)
+				syslog(LOG_ERROR, "[ND6 RTR] prefix offlink failed: %s", itron_strerror(error));
+			}
+
+		if ((pr->flags & ND6_PREFIX_STATE_DETACHED) == 0 &&
+		    (pr->flags & ND6_PREFIX_STATE_ONLINK  ) == 0 &&
+		    (pr->flags & ND6_PREFIX_FLAG_ONLINK   ) == 0) {
+			if ((error = nd6_prefix_onlink(pr)) != E_OK)
+				syslog(LOG_ERROR, "[ND6 RTR] prefix onlink failed: %s", itron_strerror(error));
+			}
+		}
+
+	/*
+	 *  ãªã³ã¯ä¸ã«ãã¬ãã£ãã¯ã¹ãéç¥ãã¦ããã«ã¼ã¿ã
+	 *  å°ãªãã¨ã 1 å°å­å¨ãããç¢ºèªããã
+	 */
+	for (ix = NUM_IN6_IFADDR_ENTRY; ix -- > 0; ) {
+		ia = &ifp->in_ifaddrs[ix];
+		if ((ia->flags & (IN6_IFF_DEFINED | IN6_IFF_AUTOCONF)) != 0 &&
+		     ia->prefix_index != ND6_PREFIX_IX_INVALID) {
+			pr = &nd6_prefix[ia->prefix_index];
+			if (find_pfxlist_reachable_router(pr) != NULL)
+				break;
+			}
+		}
+
+	if (ix >= 0) {
+		/*
+		 *  ãªã³ã¯ä¸ã«ãã¬ãã£ãã¯ã¹ãéç¥ãã¦ããã«ã¼ã¿ã
+		 *  å°ãªãã¨ã 1 å°å­å¨ããæã®å¦çã
+		 */
+		for (ix = NUM_IN6_IFADDR_ENTRY; ix -- > 0; ) {
+			ia = &ifp->in_ifaddrs[ix];
+			if ((ia->flags & (IN6_IFF_DEFINED | IN6_IFF_AUTOCONF)) != 0 &&
+			     ia->prefix_index != ND6_PREFIX_IX_INVALID) {
+				pr = &nd6_prefix[ia->prefix_index];
+				if (find_pfxlist_reachable_router(pr) != NULL)
+					ia->flags &= ~IN6_IFF_DETACHED;
+				else
+					ia->flags |= IN6_IFF_DETACHED;
+				}
+			}
+		}
+	else {
+		/*
+		 *  ãªã³ã¯ä¸ã«ãã¬ãã£ãã¯ã¹ãéç¥ãã¦ããã«ã¼ã¿ã
+		 *  1 å°å­å¨ããªãæã¯å
+¨ã¦ã®ã¢ãã¬ã¹ãå©ç¨ã§ããããã«ããã
+		 */
+		for (ix = NUM_IN6_IFADDR_ENTRY; ix -- > 0; ) {
+			ia = &ifp->in_ifaddrs[ix];
+			if ((ia->flags & (IN6_IFF_DEFINED | IN6_IFF_AUTOCONF)) != 0)
+				ia->flags &= ~IN6_IFF_DETACHED;
+			}
+		}
+	}
+
+/*
+ *  pfxrtr_add -- ãã¬ãã£ãã¯ã¹ã¨ã³ããªã¨ãã£ãã©ã«ãã«ã¼ã¿ã»ã¨ã³ããªããªã³ã¯ããã
+ *
+ *    æ³¨æ: ãã®é¢æ°ãå¼ã³åºãã¨ãã¯ãSEM_ND6_DEFRTRLIST ã§ã
+ *          ã­ãã¯ãã¦ããå¼ã³åºããã¨ã
+ */
+
+static void
+pfxrtr_add (int_t prefix_index, int_t rtr_index)
+{
+	/*  ãã¬ãã£ãã¯ã¹ã¨ã³ããªã¨ãã£ãã©ã«ãã«ã¼ã¿ã»ã¨ã³ããªããªã³ã¯ããã*/
+	nd6_prefix[prefix_index].routermap |= make_mask(rtr_index);
+	nd6_def_router[rtr_index].plistmap |= make_mask(prefix_index);
+
+	pfxlist_onlink_check();
+	}
+
+/*
+ *  nd6_pfxrtr_lookup -- ãã¬ãã£ãã¯ã¹ã¨ã³ããªããã«ã¼ã¿ãæ¢ç´¢ããã
+ */
+
+static uint_t
+pfxrtr_lookup (const T_ND6_PREFIX *pr, int_t rtr_index)
+{
+	return (pr->routermap & make_mask(rtr_index)) == 0 ? IN6_RTR_IX_UNREACH : rtr_index;
+	}
+
+/*
+ *  defrouter_select -- åªå
+ãã£ãã©ã«ãã»ã«ã¼ã¿ãé¸æããªããã
+ *
+ *    æ³¨æ: ãã®é¢æ°ãå¼ã³åºãã¨ãã¯ãSEM_ND6_DEFRTRLIST ã§ã
+ *          ã­ãã¯ãã¦ããå¼ã³åºããã¨ã
+ */
+
+static void
+defrouter_select (void)
+{
+	T_DEF_ROUTER	*dr = NULL, router;
+	T_LLINFO_ND6	*ln;
+	int_t		ix, tix;
+
+	for (ix = 0; ix < def_router_count; ix ++) {
+		dr = &nd6_def_router[ix];
+		if ((ln = nd6_lookup(&dr->addr, false)) != NULL && ND6_IS_LLINFO_PROBREACH(ln)) {
+		
+			/* é¸æããã«ã¼ã¿ãå
+é ­ã«ç§»ãã*/
+			router = *dr;
+			for (tix = ix; tix > 0; tix --)
+				nd6_def_router[tix] = nd6_def_router[tix - 1];
+			nd6_def_router[0] = router;
+			break;
+			}
+		}
+	}
+
+/*
+ *  defrtrlist_update -- ãã£ãã©ã«ãã«ã¼ã¿ã»ãªã¹ããæ´æ°ããã
+ *
+ *  	æ»ãå¤ã¯ãã«ã¼ã¿ã®ã¤ã³ããã¯ã¹ã
+ *      ãã ããå¤ã -1 ãªãããã¬ãã£ãã¯ã¹ã»ãªã¹ãã¯æ´æ°ããªãã
+ */
+
+static int_t
+defrtrlist_update (T_IN6_ADDR *src, uint32_t lifetime, uint8_t flags)
+{
+	T_DEF_ROUTER	*dr, *fdr = NULL;
+	SYSTIM		now;
+	int_t		ix;
+
+	syscall(get_tim(&now));
+	syscall(wai_sem(SEM_ND6_DEFRTRLIST));
+
+	/* ç»é²æ¸ãèª¿ã¹ãã*/
+	if ((fdr = nd6_defrtrlist_lookup(src)) != NULL) {
+		/* ç»é²æ¸ã¿ã®å ´åã®å¦ç */
+		if (lifetime == 0) {
+			nd6_defrtrlist_del(fdr);
+			syscall(sig_sem(SEM_ND6_DEFRTRLIST));
+			return -1;
+			}
+		else {
+			fdr->lifetime = lifetime * SYSTIM_HZ;		/* lifetime ã®åä½ã¯ç§ */
+			fdr->flags    = flags;
+			fdr->expire   = now + fdr->lifetime;
+			syscall(sig_sem(SEM_ND6_DEFRTRLIST));
+			return fdr - nd6_def_router;
+			}
+		}
+	else if (lifetime == 0) {
+		syscall(sig_sem(SEM_ND6_DEFRTRLIST));
+		return -1;
+		}
+
+	if (fdr == NULL && def_router_count < NUM_ND6_DEF_RTR_ENTRY) {
+		/*
+		 *  def_router_count < NUM_ND6_DEF_RTR_ENTRY ã§ããã°ã
+		 *  nd6_def_router[def_router_count]; ãç©ºãã¨ã³ããª
+		 */
+		fdr = &nd6_def_router[def_router_count];
+		}
+
+	/* ç©ºãã¨ã³ããªããªããã°ãæå¹æéãç­ãã¨ã³ããªãåé¤ããã*/
+	if (fdr == NULL) {
+		T_DEF_ROUTER	*sdr = NULL;
+		int32_t		diff, sdiff = 0xffffffff;
+
+		for (ix = def_router_count; ix -- > 0; ) {
+			dr = &nd6_def_router[ix];
+			diff = (int32_t)(dr->expire - now);
+			if (diff <= 0) {	/* dr->expire <= now */
+				/* æ¢ã«ãæå¹æéãéãã¦ããã*/
+				sdr = dr;
+				break;
+				}
+			else if (diff < sdiff)
+				sdr = dr;
+			}
+		if (sdr != NULL) {
+			fdr = sdr;
+			nd6_defrtrlist_del(fdr);
+			}
+		}
+
+	/* åã¡ã³ãã«å¤ãè¨­å®ããã*/
+	fdr->plistmap = 0;
+	fdr->addr     = *src;
+	fdr->lifetime = lifetime * SYSTIM_HZ;		/* lifetime ã®åä½ã¯ç§ */
+	fdr->flags    = flags;
+	fdr->expire   = now + fdr->lifetime;
+	fdr->state    = ND6_DEF_RTR_BUSY;
+	def_router_count ++;
+
+	/*
+	 *  ãã£ãã©ã«ãã«ã¼ã¿ã¨ãã¦ç»é²ãããã
+	 *  æ¢ã«ãã£ãã©ã«ãã«ã¼ã¿ãããã°é¸æããªãããªãã
+	 */
+	if (fdr - nd6_def_router != 0)
+		defrouter_select();
+
+	syscall(sig_sem(SEM_ND6_DEFRTRLIST));
+	return fdr - nd6_def_router;
+	}
+
+/*
+ *  in6_ifadd -- ã¤ã³ã¿ãã§ã¼ã¹ã«ã¢ãã¬ã¹ãè¿½å ããã
+ */
+
+static ER
+in6_ifadd (T_ND6_PREFIX *pr, T_IN6_IFADDR *ia, int_t router_index)
+{
+	T_IFNET		*ifp = IF_GET_IFNET();
+	T_IN6_ADDR	mask, addr;
+	T_IN6_IFADDR	*lla;
+	int_t		ix;
+
+	lla = &ifp->in_ifaddrs[IPV6_IFADDR_IX_LINKLOCAL];
+
+	/*
+	 *  ãªã³ã¯ã­ã¼ã«ã«ã¢ãã¬ã¹ãæªç»é²ã§ããã°ä½ãããªãã
+	 */
+	if ((lla->flags & IN6_IFF_DEFINED) == 0)
+		return E_OBJ;
+
+	/*
+	 *  ã«ã¼ã¿ããéç¥ããããã¬ãã£ãã¯ã¹é·ãã
+	 *  ãªã³ã¯ã­ã¼ã«ã«ã¢ãã¬ã¹ã®ãã¬ãã£ãã¯ã¹é·ã¨
+	 *  ç°ãªã£ã¦ããã°ã¨ã©ã¼
+	 */
+	if (lla->prefix_len != pr->prefix_len)
+		return E_PAR;
+
+	/* ãã¬ãã£ãã¯ã¹ãã¹ã¯ãçæããã*/
+	in6_plen2pmask(&mask, pr->prefix_len);
+
+	/* ã¢ãã¬ã¹ãçæããã*/
+	for (ix = 0; ix < 4; ix ++)
+		addr.s6_addr32[ix] = (pr->prefix.s6_addr32[ix] &  mask.s6_addr32[ix])
+		                   | ( lla->addr.s6_addr32[ix] & ~mask.s6_addr32[ix]);
+
+	/* ãã©ã°ãåæåããã*/
+	ia->flags = 0;
+
+	return in6_update_ifa(ifp, ia, &addr,
+	                      pr->prefix_len, pr->vltime, pr->pltime,
+	                      router_index, pr - nd6_prefix, IN6_IFF_AUTOCONF);
+	}
+
+/*
+ *  nd6_prefix_lookup -- ãã¬ãã£ãã¯ã¹ãæ¢ç´¢ããã
+ */
+
+static T_ND6_PREFIX *
+nd6_prefix_lookup (const T_IN6_ADDR *prefix, uint_t plen)
+{
+	T_ND6_PREFIX	*pr;
+	int_t		ix;
+
+	for (ix = NUM_ND6_PREFIX_ENTRY; ix -- > 0; ) {
+		pr = &nd6_prefix[ix];
+		if ((pr->flags & ND6_PREFIX_STATE_BUSY) &&
+		     pr->prefix_len == plen && IN6_ARE_ADDR_EQUAL(&pr->prefix, prefix))
+			return pr;
+		}
+
+	return NULL;
+	}
+
+/*
+ *  prelist_remove -- ãã¬ãã£ãã¯ã¹ãªã¹ããããã¬ãã£ãã¯ã¹ãåé¤ããã
+ *
+ *    æ³¨æ: ãã®é¢æ°ãå¼ã³åºãã¨ãã¯ãSEM_ND6_DEFRTRLIST ã§ã
+ *          ã­ãã¯ãã¦ããå¼ã³åºããã¨ã
+ */
+
+static void
+prelist_remove (T_ND6_PREFIX *pr)
+{
+	ER	error = E_OK;
+	uint_t	mask;
+	int_t	rix;
+
+	/* æå¹æéåãã«ããã*/
+	pr->vltime = 0;
+	pr->pltime = 0;
+
+	if ((pr->flags & ND6_PREFIX_STATE_ONLINK) != 0 &&
+	    (error = nd6_prefix_offlink(pr)) != E_OK) {
+		syslog(LOG_ERROR, "[ND6 RTR] prefix remove failed: %s", itron_strerror(error));
+		return;
+		}
+
+	/*  ãã¬ãã£ãã¯ã¹ã¨ã³ããªã¨ãã£ãã©ã«ãã«ã¼ã¿ã»ã¨ã³ããªã®ãªã³ã¯ãè§£é¤ããã*/
+	pr->routermap = 0;
+	mask = make_mask(pr - nd6_prefix);
+	for (rix = def_router_count; rix --; )
+		nd6_def_router[rix].plistmap &= ~mask;
+
+	/* ãã¬ãã£ãã¯ã¹ãç¡å¹ã«ããã*/
+	pr->flags &= ~ND6_PREFIX_STATE_BUSY;
+
+	pfxlist_onlink_check();
+	}
+
+/*
+ *  nd6_prefix_onlink -- ãã¬ãã£ãã¯ã¹ããªã³ãªã³ã¯ã«è¨­å®ããã¢ãã¬ã¹ãä½¿ç¨å¯è½ã«ããã
+ *
+ *    æ³¨æ: ãã®é¢æ°ãå¼ã³åºãã¨ãã¯ãSEM_ND6_DEFRTRLIST ã§ã
+ *          ã­ãã¯ãã¦ããå¼ã³åºããã¨ã
+ */
+
+ER
+nd6_prefix_onlink (T_ND6_PREFIX *pr)
+{
+	T_IFNET		*ifp = IF_GET_IFNET();
+	T_IN6_IFADDR	*lla, *ia = NULL;
+	int_t		ix;
+
+	/* æ¢ã«ãªã³ãªã³ã¯ç¶æ
+ã«ãªã£ã¦ããå ´åã¯ã¨ã©ã¼ã*/
+	if ((pr->flags & ND6_PREFIX_STATE_ONLINK) != 0)
+		return E_OBJ;
+
+	/* ãªã³ã¯ã­ã¼ã«ã«ã¢ãã¬ã¹ãæªç»é²ã§ããã°ä½ãããªãã*/
+	lla = &ifp->in_ifaddrs[IPV6_IFADDR_IX_LINKLOCAL];
+	if ((lla->flags & IN6_IFF_DEFINED) == 0)
+		return E_OK;
+
+	/*
+	 *  æå®ããããã¬ãã£ãã¯ã¹ãå²ãå½ã¦ããã¦ããã¤ã³ã¿ãã§ã¼ã¹ã®
+	 *  ã¢ãã¬ã¹æ
+å ±ãæ¢ãã
+	 */
+	for (ix = NUM_IN6_IFADDR_ENTRY; ix --; ) {
+		ia = &ifp->in_ifaddrs[ix];
+		if (ia->prefix_index == (pr - nd6_prefix))
+			break;
+		}
+
+	if (ix >= 0) {
+
+		/* ã¢ãã¬ã¹æ
+å ±ãä½¿ç¨å¯è½ã«ããã*/
+		ia->flags &= ~IN6_IFF_DETACHED;
+
+		/* ãã¬ãã£ãã¯ã¹ããªã³ãªã³ã¯ã«è¨­å®ããã*/
+		pr->flags |= ND6_PREFIX_STATE_ONLINK;
+		}
+
+	return E_OK;
+	}
+
+/*
+ *  nd6_prefix_offlink -- ãã¬ãã£ãã¯ã¹ããªããªã³ã¯ã«è¨­å®ããã¢ãã¬ã¹ãä½¿ç¨ä¸å¯ã«ããã
+ *
+ *    æ³¨æ: ãã®é¢æ°ãå¼ã³åºãã¨ãã¯ãSEM_ND6_DEFRTRLIST ã§ã
+ *          ã­ãã¯ãã¦ããå¼ã³åºããã¨ã
+ */
+
+ER
+nd6_prefix_offlink (T_ND6_PREFIX *pr)
+{
+	T_IFNET		*ifp = IF_GET_IFNET();
+	T_IN6_IFADDR	*ia = NULL;
+	int_t		ix;
+
+	/* æ¢ã«ãªããªã³ã¯ç¶æ
+ã«ãªã£ã¦ããå ´åã¯ã¨ã©ã¼ã*/
+	if ((pr->flags & ND6_PREFIX_STATE_ONLINK) == 0)
+		return E_OBJ;
+
+	/*
+	 *  æå®ããããã¬ãã£ãã¯ã¹ãå²ãå½ã¦ããã¦ããã¤ã³ã¿ãã§ã¼ã¹ã®
+	 *  ã¢ãã¬ã¹æ
+å ±ãæ¢ãã
+	 */
+	for (ix = NUM_IN6_IFADDR_ENTRY; ix --; ) {
+		ia = &ifp->in_ifaddrs[ix];
+		if (ia->prefix_index == (pr - nd6_prefix))
+			break;
+		}
+
+	if (ix >= 0) {
+
+		/* ã¢ãã¬ã¹æ
+å ±ãä½¿ç¨ä¸å¯ã«ããã*/
+		ia->flags |= IN6_IFF_DETACHED;
+
+		/* ãã¬ãã£ãã¯ã¹ããªããªã³ã¯ã«è¨­å®ããã*/
+		pr->flags &= ~ND6_PREFIX_STATE_ONLINK;
+		}
+
+	return E_OK;
+	}
+
+/*
+ *  in6_init_prefix_ltimes -- ãã¬ãã£ãã¯ã¹ã®æå¹æéãè¨­å®ããã
+ */
+
+static ER
+in6_init_prefix_ltimes (T_ND6_PREFIX *pr)
+{
+	SYSTIM		now;
+
+	/* æ¨å¥¨æå¹æéãæå¹æéããé·ãã¨ãã¯ã¨ã©ã¼ */
+	if (pr->pltime > pr->vltime)
+		return E_PAR;
+
+	syscall(get_tim(&now));
+	now /= SYSTIM_HZ;
+
+	if (pr->pltime == ND6_INFINITE_LIFETIME)
+		pr->preferred = 0;
+	else
+		pr->preferred = pr->pltime + now;
+
+	if (pr->vltime == ND6_INFINITE_LIFETIME)
+		pr->expire = 0;
+	else
+		pr->expire = pr->vltime + now;
+
+	return E_OK;
+	}
+
+/*
+ *  nd6_prelist_add -- ãã¬ãã£ãã¯ã¹ãªã¹ãã«ãã¬ãã£ãã¯ã¹ãè¿½å ããã
+ *
+ *    æ³¨æ: ãã®é¢æ°ãå¼ã³åºãã¨ãã¯ãSEM_ND6_DEFRTRLIST ã§ã
+ *          ã­ãã¯ãã¦ããå¼ã³åºããã¨ã
+ */
+
+static T_ND6_PREFIX *
+nd6_prelist_add (T_ND_OPT_PREFIX_INFO *pi, int_t rtr_index)
+{
+	T_ND6_PREFIX	*pr = NULL;
+	int_t		ix;
+	ER		error;
+
+	/* ãã¬ãã£ãã¯ã¹ãªã¹ãããç©ºãã®ãã¬ãã£ãã¯ã¹ã¨ã³ããªãæ¢ç´¢ããã*/
+	for (ix = NUM_ND6_PREFIX_ENTRY; ix --; ) {
+		pr = &nd6_prefix[ix];
+		if ((pr->flags & ND6_PREFIX_STATE_BUSY) == 0)
+			break;
+		}
+
+	/* ãã¬ãã£ãã¯ã¹ãªã¹ãã«ç©ºãããªããã°ã¨ã©ã¼ */
+	if (ix < 0)
+		return NULL;
+
+	pr->flags |= ND6_PREFIX_STATE_BUSY;
+
+	/* ãã¬ãã£ãã¯ã¹ãè¿½å ããã*/
+	pr->prefix     = pi->prefix;
+	pr->prefix_len = pi->prefix_len;
+
+	/* ãã©ã°ãè¨­å®ããã*/
+	if ((pi->flags & ND_OPT_PI_FLAG_ONLINK) != 0)
+		pr->flags |= ND6_PREFIX_FLAG_ONLINK;
+	if ((pi->flags & ND_OPT_PI_FLAG_AUTO) != 0)
+		pr->flags |= ND6_PREFIX_FLAG_AUTO;
+
+	/* ãã¬ãã£ãã¯ã¹ã®æå¹æéãè¨­å®ããã*/
+	pr->vltime = ntohl(pi->valid);
+	pr->pltime = ntohl(pi->preferred);
+	in6_init_prefix_ltimes(pr);
+
+	if ((pr->flags & ND6_PREFIX_FLAG_ONLINK) != 0) {
+		if ((error = nd6_prefix_onlink(pr)) != E_OK)
+			return NULL;
+		}
+
+	/* ã«ã¼ã¿ããããåæåããã*/
+	pr->routermap = 0;
+
+	/* ã«ã¼ã¿ãè¿½å ããã*/
+	pfxrtr_add(pr - nd6_prefix, rtr_index);
+
+	return pr;
+	}
+
+/*
+ *  prelist_update -- ãã¬ãã£ãã¯ã¹ã»ãªã¹ããæ´æ°ããã
+ */
+
+static void
+prelist_update (T_ND_OPT_PREFIX_INFO *pi, uint_t router_index)
+{
+	T_IFNET		*ifp = IF_GET_IFNET();
+	T_ND6_PREFIX	*pr;
+	T_IN6_IFADDR	*ia = NULL;
+	int_t		ix, ifidlen;
+
+	syscall(wai_sem(SEM_ND6_DEFRTRLIST));
+	if ((pr = nd6_prefix_lookup(&pi->prefix, pi->prefix_len)) != NULL) {
+		/*
+		 *  ç»é²æ¸ã¿ã®å ´åã¯ããã¬ãã£ãã¯ã¹ãªã¹ããæ´æ°ããã
+		 */
+
+		/*
+		 *  ãã©ã°ã®æ´æ°ã®æ³¨æ:
+		 *    on-link ãããã¨ autonomous ãããã¯
+		 *    1 ãã 0 ã«å¤æ´ãã¦ã¯ãªããªãã
+		 */
+
+		if ((pi->flags & ND_OPT_PI_FLAG_ONLINK) != 0)
+			pr->flags |= ND6_PREFIX_FLAG_ONLINK;
+		if ((pi->flags & ND_OPT_PI_FLAG_AUTO) != 0)
+			pr->flags |= ND6_PREFIX_FLAG_AUTO;
+
+		if ((pi->flags & ND_OPT_PI_FLAG_ONLINK) != 0) {
+			/*
+			 *  éç¥ããããã¬ãã£ãã¯ã¹ããªã³ãªã³ã¯ã®æã¯ã
+			 *  æå¹æéãæ´æ°ããã
+			 */
+			pr->vltime = ntohl(pi->valid);
+			pr->pltime = ntohl(pi->preferred);
+			in6_init_prefix_ltimes(pr);
+			}
+
+		if ((pi->flags & ND_OPT_PI_FLAG_ONLINK  ) != 0 &&
+		    (pr->flags & ND6_PREFIX_STATE_ONLINK) == 0) {
+			/*
+			 *  ãªããªã³ã¯ã®ãã¬ãã£ãã¯ã¹ããªã³ãªã³ã¯ã«ãªã£ãæã®å¦çãå®è¡ããã
+			 */
+			if (nd6_prefix_onlink(pr) != E_OK) {
+				syscall(sig_sem(SEM_ND6_DEFRTRLIST));
+				syslog(LOG_ERROR, "[ND6 RTR] prefix update failed.");
+				return;
+				}
+			}
+
+		if (router_index != IN6_RTR_IX_UNREACH && pfxrtr_lookup(pr, router_index) == IN6_RTR_IX_UNREACH)
+			pfxrtr_add(pr - nd6_prefix, router_index);
+		}
+	else {	/* æªç»é²ã®å ´å */
+
+		/* æå¹æé 0 ã®ãã¬ãã£ãã¯ã¹ã¯è¿½å ããªãã*/
+		if (pi->valid == 0) {
+			syscall(sig_sem(SEM_ND6_DEFRTRLIST));
+			return;
+			}
+
+		/* ãªããªã³ã¯ã§ã¢ãã¬ã¹èªåè¨­å®ã«ä½¿ç¨ããªããã°è¿½å ããªãã*/
+		if ((pi->flags & (ND_OPT_PI_FLAG_ONLINK | ND_OPT_PI_FLAG_AUTO)) !=
+		                 (ND_OPT_PI_FLAG_ONLINK | ND_OPT_PI_FLAG_AUTO)) {
+			syscall(sig_sem(SEM_ND6_DEFRTRLIST));
+			return;
+			}
+
+		/* ãã¬ãã£ãã¯ã¹ãè¿½å ããã*/
+		if ((pr = nd6_prelist_add(pi, router_index)) == NULL) {
+			syslog(LOG_ERROR, "[ND6 RTR] prefix add failed.");
+			syscall(sig_sem(SEM_ND6_DEFRTRLIST));
+			return;
+			}
+
+		if ((pr->flags & ND6_PREFIX_FLAG_ONLINK) == 0) {
+			/*
+			 *  ãªããªã³ã¯ã»ãã¬ãã£ãã¯ã¹ã®å ´åã¯ãæå¹æéã 0 ã«è¨­å®ããã
+			 *  ãã¨ã§æå¹æéåãã¨ãªãããªã¹ãããåé¤ãããã
+			 */
+			pr->vltime = 0;
+			pr->pltime = 0;
+			in6_init_prefix_ltimes(pr);
+			}
+		}
+
+	/*
+	 *  ã¹ãã¼ãã¬ã¹ã»ã¢ãã¬ã¹èªåè¨­å®ãè¡ãã
+	 */
+	if ((pr->flags & ND6_PREFIX_FLAG_AUTO) == 0) {
+		syscall(sig_sem(SEM_ND6_DEFRTRLIST));
+		return;
+		}
+
+	/*
+	 *  éç¥ããããã¬ãã£ãã¯ã¹ãå²ãå½ã¦ããã¦ããã¤ã³ã¿ãã§ã¼ã¹ã®
+	 *  ã¢ãã¬ã¹æ
+å ±ãæ¢ãã
+	 */
+	for (ix = NUM_IN6_IFADDR_ENTRY; ix --; ) {
+		ia = &ifp->in_ifaddrs[ix];
+		if ((ia->flags & IN6_IFF_DEFINED) != 0 &&
+		    ia->prefix_len == pr->prefix_len &&
+		    in6_are_prefix_equal(&ia->addr, &pr->prefix, pr->prefix_len))
+			break;
+		}
+
+	if (ix >= 0) {	/* ç»é²æ¸ã¿ã®ã¨ã */
+		if ((ia->flags & IN6_IFF_AUTOCONF) == 0) {
+			/*
+			 *  ã¹ãã¼ãã¬ã¹ã»ã¢ãã¬ã¹èªåè¨­å®ã«ãã
+			 *  è¨­å®ããã¦ããªããã°æ´æ°ããªãã
+			 */
+			;
+			}
+		else if (ia->flags & IN6_IFF_TENTATIVE) {
+			/*
+			 *  éè¤æ¤åºä¸­ãªãæ´æ°ããªãã
+			 */
+			;
+			}
+		else {
+			T_IN6_ADDR	mask, addr;
+			T_IN6_IFADDR	*lla;
+			uint32_t		vltime;
+			SYSTIM		now;
+			int_t		ix;
+
+			/* æå¹æéãè¨­å®ããã*/
+			syscall(get_tim(&now));
+
+			if (ia->lifetime.vltime == ND6_INFINITE_LIFETIME)
+				vltime = ND6_INFINITE_LIFETIME;
+			else if (IFA6_IS_INVALID(ia, now))
+				vltime = 0;
+			else
+				vltime = ia->lifetime.expire - now / SYSTIM_HZ;
+
+			if (pr->vltime > (2 * 60 * 60) || pr->vltime > vltime) {
+				/*
+				 *  lifetime.expireãpi->valid (æå¹æé) ã¨
+				 *  pi->preferred (æ¨å¥¨æå¹æé) ã®åä½ã¯ [s]ã
+				 *  éç¥ãããæå¹æéã 2 æéä»¥ä¸ããç¾å¨ã®æ®ãæéãã
+				 *  é·ããã°ãæ°ããæå¹æéã«ã¯ãéç¥ãããæå¹æéãè¨­å®ããã
+				 */
+				vltime = pr->vltime;
+				}
+			else if (vltime <= (2 * 60 * 60))
+				;
+			else {
+				/*
+				 *  IPsec ã¯æªå®è£
+ã®ããã2 æéãè¨­å®ããã
+				 */
+				vltime = 2 * 60 * 60;
+				}
+
+			lla = &ifp->in_ifaddrs[IPV6_IFADDR_IX_LINKLOCAL];
+
+			/* ãã¬ãã£ãã¯ã¹ãã¹ã¯ãçæããã*/
+			in6_plen2pmask(&mask, pr->prefix_len);
+
+			/* ã¢ãã¬ã¹ãçæããã*/
+			for (ix = 0; ix < 4; ix ++)
+				addr.s6_addr32[ix] = (pr->prefix.s6_addr32[ix] &  mask.s6_addr32[ix])
+				                   | ( lla->addr.s6_addr32[ix] & ~mask.s6_addr32[ix]);
+
+			in6_update_ifa(ifp, ia, &addr, pr->prefix_len, vltime,
+			               pr->pltime, router_index, pr - nd6_prefix,
+			               IN6_IFF_AUTOCONF | IN6_IFF_NODAD);
+			}
+		}
+
+	else { /* æªç»é²ã®ã¨ã */
+
+		/*
+		 *  ãã¬ãã£ãã¯ã¹é·ããã§ãã¯ããã
+		 *  ããããã¬ãã£ãã¯ã¹é·ã¨ã¤ã³ã¿ãã§ã¼ã¹ ID ã®åè¨ã
+		 *  128 ãããã«ä¸è´ããªãæã¯ããã¬ãã£ãã¯ã¹æ
+å ±ãç¡è¦ããã
+		 */
+		if ((ifidlen = in6_if2idlen(ifp)) < 0)
+			syslog(LOG_ERROR, "[ND6 RTR] IFID undefined.");
+		else if (ifidlen + pr->prefix_len != 128)
+			syslog(LOG_NOTICE, "[ND6 RTR] invalid prefix len: %d.", pr->prefix_len);
+		else {
+
+			for (ix = NUM_IN6_IFADDR_ENTRY; ix --; ) {
+				ia = &ifp->in_ifaddrs[ix];
+				if ((ia->flags & IN6_IFF_DEFINED) == 0) {
+					in6_ifadd(pr, ia, router_index);
+					pfxlist_onlink_check();
+					break;
+					}
+				}
+
+			if (ix < 0)
+				syslog(LOG_ERROR, "[ND6 RTR] prefix update failed.");
+			}
+		}
+	syscall(sig_sem(SEM_ND6_DEFRTRLIST));
+	}
+
+/*
+ *  nd6_prelist_timer -- ãã¬ãã£ãã¯ã¹ã»ãªã¹ãã®ç®¡çã¿ã¤ãã¼
+ */
+
+void
+nd6_prelist_timer (void)
+{
+	T_ND6_PREFIX	*pr;
+	SYSTIM		now;
+	int_t		ix;
+
+	syscall(get_tim(&now));
+	now /= SYSTIM_HZ;		/* æå¹æéã®åä½ã¯ [s] */
+
+	syscall(wai_sem(SEM_ND6_DEFRTRLIST));
+	for (ix = NUM_ND6_PREFIX_ENTRY; ix -- > 0; ) {
+		pr = &nd6_prefix[ix];
+		if ((pr->flags & ND6_PREFIX_STATE_BUSY) != 0 && (int32_t)(pr->expire - now) <= 0)
+		                                                       /* pr->expire <= now */
+			prelist_remove(pr);
+		}
+	syscall(sig_sem(SEM_ND6_DEFRTRLIST));
+	}
+
+/*
+ *  nd6_rs_output -- ã«ã¼ã¿è¦è«ãåºåããã
+ */
+
+static void
+nd6_rs_output (void)
+{
+	T_ROUTER_SOLICIT_HDR	*rsh;
+	T_NET_BUF		*output;
+	T_IN6_IFADDR		*ifa;
+	T_IN6_ADDR		*saddr;
+	uint16_t		len;
+
+	NET_COUNT_ICMP6(net_count_nd6[NC_ND6_RS_OUT_PACKETS], 1);
+
+	/*
+	 *  éä¿¡å
+ã¢ãã¬ã¹ã«ã¯ããªã³ã¯ã­ã¼ã«ã«ã¢ãã¬ã¹ãè¨­å®ãããã
+	 *  ã¾ã è¨­å®ããããªããã°ãç¡æå®ãè¨­å®ããã
+	 */
+	if ((ifa = in6ifa_ifpwithix(IF_GET_IFNET(), IPV6_IFADDR_IX_LINKLOCAL)) != NULL && !IFA6_IS_NOTREADY(ifa))
+		saddr = &ifa->addr;
+	else
+		saddr = &in6_addr_unspecified;
+
+	len = (ROUTER_SOLICIT_HDR_SIZE + 7) >> 3 << 3;
+
+	/* ãããã¯ã¼ã¯ãããã¡ãç²å¾ããIPv6 ããããè¨­å®ããã*/
+	if (in6_get_datagram(&output, len, 0, &in6_addr_linklocal_allrouters,
+	                     saddr, IPPROTO_ICMPV6,
+	                     IPV6_MAXHLIM, NBA_SEARCH_ASCENT, TMO_ND6_RS_OUTPUT) != E_OK)
+		return;
+
+ 	/* ã«ã¼ã¿è¦è«ããããè¨­å®ããã*/
+ 	rsh = GET_ROUTER_SOLICIT_HDR(output, IF_IP6_ROUTER_SOLICIT_HDR_OFFSET);
+ 	rsh->hdr.type       = ND_ROUTER_SOLICIT;
+ 	rsh->hdr.code       = 0;
+ 	rsh->nd_rs_reserved = 0;
+
+	/* ãã§ãã¯ãµã ãè¨ç®ããã*/
+	rsh->hdr.sum = 0;
+	rsh->hdr.sum = in6_cksum(output, IPPROTO_ICMPV6, (uint8_t*)rsh - output->buf, len);
+
+	/* éä¿¡ããã*/
+	NET_COUNT_ICMP6(net_count_nd6[NC_ICMP6_OUT_OCTETS],
+	               output->len - GET_IF_IP6_HDR_SIZE(output));
+	NET_COUNT_ICMP6(net_count_nd6[NC_ICMP6_OUT_PACKETS], 1);
+	NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpOutMsgs, 1);
+	NET_COUNT_MIB(icmp6_ifstat.ipv6IfIcmpOutRouterSolicits, 1);
+	ip6_output(output, IPV6_OUT_SET_HOP_LIMIT(IPV6_OUT_FLG_HOP_LIMIT, IPV6_MAXHLIM), TMO_ND6_RS_OUTPUT);
+	}
+
+/*
+ *  nd6_defrtrlist_lookup -- ãã£ãã©ã«ãã«ã¼ã¿ã»ãªã¹ããæ¢ç´¢ããã
+ */
+
+T_DEF_ROUTER *
+nd6_defrtrlist_lookup (T_IN6_ADDR *src)
+{
+	T_DEF_ROUTER	*dr = NULL;
+	int_t		ix;
+
+	for (ix = def_router_count; ix -- > 0; ) {
+		dr = &nd6_def_router[ix];
+		if (IN6_ARE_ADDR_EQUAL(&dr->addr, src)) {
+			return dr;
+			}
+		}
+	return NULL;
+	}
+
+/*
+ *  nd6_router_lookup -- ã«ã¼ã¿ã®ã¢ãã¬ã¹ãè¿ãã
+ *
+ */
+
+T_IN6_ADDR *
+nd6_router_lookup (void)
+{
+	if (def_router_count > 0)
+		return &nd6_def_router[0].addr;
+	else
+		return NULL;
+	}
+
+/*
+ *  nd6_defrtrlist_del -- ãã£ãã©ã«ãã«ã¼ã¿ã»ãªã¹ãããã«ã¼ã¿ãåé¤ããã
+ *
+ *    æ³¨æ: ãã®é¢æ°ãå¼ã³åºãã¨ãã¯ãSEM_ND6_DEFRTRLIST ã§ã
+ *          ã­ãã¯ãã¦ããå¼ã³åºããã¨ã
+ */
+
+void
+nd6_defrtrlist_del (T_DEF_ROUTER *dr)
+{
+	T_IFNET		*ifp = IF_GET_IFNET();
+	T_IN6_IFADDR	*ia;
+	T_ND6_PREFIX	*pr;
+	uint_t		mask;
+	int_t		ix, rix, pix, rtrix = dr - nd6_def_router;
+
+	if ((ia = in6ifa_ifpwithrtrix(ifp, rtrix)) != NULL) {
+		/*
+		 *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ãã¬ãã£ãã¯ã¹ãéç¥ãã
+		 *  ã«ã¼ã¿ãå°éä¸è½ã«ããã
+		 */
+		ia->router_index = IN6_RTR_IX_UNREACH;
+		}
+
+	/* ãã¬ãã£ãã¯ã¹ãªã¹ãããã«ã¼ã¿ãåé¤ããã*/
+	mask = make_mask(rtrix);
+	for (pix = NUM_ND6_PREFIX_ENTRY; pix --; )
+		nd6_prefix[pix].routermap &= ~mask;
+
+	/* åé¤ããã«ã¼ã¿ä»¥éãåã«è©°ããã*/
+	for (rix = rtrix + 1; rix < def_router_count; rix ++)
+		nd6_def_router[rix - 1] = nd6_def_router[rix];
+
+	/* ãã¬ãã£ãã¯ã¹ãªã¹ãã®ã«ã¼ã¿ãæ´æ°ããã*/
+	if (dr != nd6_def_router) {
+
+		/* ãã¹ã¯ãçæããã*/
+		mask = 1;
+		for (ix = rtrix - 1; ix -- > 0; )
+			mask = (mask << 1) | 1;
+
+		for (pix = NUM_ND6_PREFIX_ENTRY; pix --; ) {
+			pr = &nd6_prefix[pix];
+			pr->routermap = (pr->routermap & mask) | (((pr->routermap & ~mask) >> 1) & ~mask);
+			}
+		}
+	def_router_count --;
+
+	/* ãã¬ãã£ãã¯ã¹ã®ãªã³ãªã³ã¯ç¶æ
+ãç¢ºèªããã*/
+	pfxlist_onlink_check();
+
+	/*
+	 *  åé¤ããã«ã¼ã¿ãåªå
+ãã£ãã©ã«ãã«ã¼ã¿ã®å ´åã¯ã
+	 *  åªå
+ãã£ãã©ã«ãã«ã¼ã¿ãé¸æããªããã
+	 */
+	if (rtrix == 0)
+		defrouter_select();
+	}
+
+/*
+ *  nd6_defrtrlist_timer -- ãã£ãã©ã«ãã«ã¼ã¿ã»ãªã¹ãã®ç®¡çã¿ã¤ãã¼
+ */
+
+void
+nd6_defrtrlist_timer (void)
+{
+	T_DEF_ROUTER	*dr;
+	SYSTIM		now;
+	int_t		ix;
+
+	syscall(get_tim(&now));
+
+	syscall(wai_sem(SEM_ND6_DEFRTRLIST));
+	for (ix = def_router_count; ix -- > 0; ) {
+		dr = &nd6_def_router[ix];
+		if ((int32_t)(dr->expire - now) <= 0) {
+		           /* dr->expire <= now */
+			nd6_defrtrlist_del(dr);
+			}
+		}
+	syscall(sig_sem(SEM_ND6_DEFRTRLIST));
+	}
+
+/*
+ *  nd6_get_drl -- ãã£ãã©ã«ãã«ã¼ã¿ã»ãªã¹ããç²å¾ããã
+ */
+
+const T_DEF_ROUTER *
+nd6_get_drl (uint_t *count)
+{
+	*count = def_router_count;
+	return nd6_def_router;
+	}
+
+/*
+ *  nd6_get_prl -- ãã¬ãã£ãã¯ã¹ã»ãªã¹ããç²å¾ããã
+ */
+
+const T_ND6_PREFIX *
+nd6_get_prl (void)
+{
+	return nd6_prefix;
+	}
+
+#endif	/* of #if NUM_ND6_DEF_RTR_ENTRY > 0 */
+
+/*
+ *  nd6_ra_input -- ã«ã¼ã¿éç¥ã®å
+¥åå¦çã
+ */
+
+void
+nd6_ra_input (T_NET_BUF *input, uint_t off)
+{
+#if NUM_ND6_DEF_RTR_ENTRY > 0
+
+	T_IFNET			*ifp = IF_GET_IFNET();
+	T_IP6_HDR		*ip6h;
+	T_ROUTER_ADVERT_HDR	*rah;
+	T_ND_OPT_HDR		*opth;
+	SYSTIM			now;
+	int_t			rix;
+	uint_t			lladdr_len = 0;
+	uint32_t		advrea;
+	uint8_t			*lladdr = NULL;
+	uint8_t			nd_opt_off[ND_OPT_OFF_ARRAY_SIZE];
+
+	NET_COUNT_ICMP6(net_count_nd6[NC_ND6_RA_IN_PACKETS], 1);
+
+	ip6h = GET_IP6_HDR(input);
+
+	/*
+	 *  ãããã®ãã§ãã¯ãä»¥ä¸ã®å ´åã¯ç ´æ£ããã
+	 *    ã»ããããªãããã IPV6_MAXHLIM (255) ä»¥å¤
+	 *    ã»ãããé·ãç­ã
+	 *    ã»å§ç¹ã¢ãã¬ã¹ãããªã³ã¯ã­ã¼ã«ã«ã§ã¯ãªã (RFC2461)
+	 */
+	if (ip6h->hlim != IPV6_MAXHLIM                ||
+	    input->len - off < ROUTER_ADVERT_HDR_SIZE ||
+	    !IN6_IS_ADDR_LINKLOCAL(&ip6h->src))
+		goto err_ret;
+
+	rah  = GET_ROUTER_ADVERT_HDR(input, off);
+
+	/* è¿é£æ¢ç´¢ãªãã·ã§ã³ã®ãªãã»ãããè¨é²ããã*/
+	if (nd6_options(nd_opt_off, input->buf + (off + ROUTER_ADVERT_HDR_SIZE),
+	                            input->len - (off + ROUTER_ADVERT_HDR_SIZE)) != E_OK)
+		goto err_ret;
+	/*
+	 *  å°éå¯è½ç¶æ
+ã®æå¹æéã®æ´æ°
+
+	 */
+	if (rah->reachable) {
+		advrea = ntohl(rah->reachable) * SYSTIM_HZ / 1000;	/* rah->reachable ã®åä½ã¯ ms */
+		if (advrea <= ND6_MAX_REACHABLE_TIME &&
+		    advrea != nd6_base_reachable_time) {
+			syscall(get_tim(&now));
+			nd6_recalc_reachtm_interval
+				= now + ND6_RECALC_REACHTM_INTERVAL;
+			nd6_base_reachable_time	= advrea;
+			nd6_reachable_time
+				= ND6_CALC_REACH_TIME(nd6_base_reachable_time);
+			}
+		}
+
+	/* è¿é£æ¢ç´¢ã®éä¿¡ééã®æ´æ° */
+	if (rah->retransmit) {
+		nd6_retrans_time = ntohl(rah->retransmit) * SYSTIM_HZ / 1000;
+									/* rah->retransmit ã®åä½ã¯ ms */
+		}
+
+	/* ããããªãããã®è¦å®å¤ã®æ´æ° */
+	if (rah->nd_ra_current_hoplimit) {
+		ip6_defhlim = rah->nd_ra_current_hoplimit;
+		}
+
+	/* ãã£ãã©ã«ãã«ã¼ã¿ãªã¹ãã®æ´æ° */
+	rix = defrtrlist_update(&ip6h->src,
+	                       ntohs(rah->nd_ra_router_lifetime),
+	                       rah->nd_ra_flags);		/* rah->nd_ra_router_lifetime ã®åä½ã¯ç§ */
+
+	/* ãã¬ãã£ãã¯ã¹ãªã¹ãã®æ´æ° */
+	if (nd_opt_off[ND_OPT_OFF_ARRAY_IX(ND_OPT_PREFIX_INFO_COUNT)]) {
+		T_ND_OPT_PREFIX_INFO	*pi;
+		uint_t			pi_off, pi_count;
+
+		pi_count = nd_opt_off[ND_OPT_OFF_ARRAY_IX(ND_OPT_PREFIX_INFO_COUNT)];
+		pi_off   = off + ROUTER_ADVERT_HDR_SIZE
+		               + nd_opt_off[ND_OPT_OFF_ARRAY_IX(ND_OPT_PREFIX_INFORMATION)] - 8;
+	 	/* æ³¨æ: ãªãã·ã§ã³ãªãã»ããé
+åã«ã¯ããªãã»ãã + 8 ãè¨­å®ããã¦ããã*/
+		while (pi_count -- > 0) {
+			pi = (T_ND_OPT_PREFIX_INFO*)(input->buf + pi_off);
+			if (pi->type != ND_OPT_PREFIX_INFORMATION)
+				/* ãªãã·ã§ã³ã¿ã¤ãããã¬ãã£ãã¯ã¹æ
+å ±ã§ãªããã°ä½ãããªãã*/
+				;
+			else if (pi->len != 4)
+			    	/* ãã¬ãã£ãã¯ã¹æ
+å ±ã®é·ãã 32 (8Ã4) ã§ãªããã°ä¸æ­£ */
+				syslog(LOG_NOTICE, "[ND6 RTR] prefix opt len: %d.", pi->len);
+			else if (pi->prefix_len > 128)
+				/* ãã¬ãã£ãã¯ã¹é·ã¯ 128 ãããä»¥ä¸ */
+				syslog(LOG_NOTICE, "[ND6 RTR] prefix len: %d.", pi->prefix_len);
+			else if (IN6_IS_ADDR_MULTICAST(&pi->prefix) ||
+			         IN6_IS_ADDR_LINKLOCAL(&pi->prefix))
+				/* ãã«ãã­ã£ã¹ãã¨ãªã³ã¯ã­ã¼ã«ã«ã¯ä¸æ­£ */
+				syslog(LOG_NOTICE, "[ND6 RTR] invalid addr: %s from %s.",
+				                   ipv62str(NULL, &pi->prefix), ipv62str(NULL, &ip6h->src));
+#if 0	/* FreeBSD 6.3 ã§åé¤ããã¦ããã*/
+			else if (IN6_IS_ADDR_AGGREGATE_UNICAST(&pi->prefix) &&		
+			         (pi->prefix_len != 64)                       )
+				/* éç´å¯è½ã¦ãã­ã£ã¹ãã§ããã¬ãã£ãã¯ã¹é·ã 64 ãããä»¥å¤ã¯ä¸æ­£ */
+				syslog(LOG_NOTICE, "[ND6 RTR] invalid prefix len for global: %d.", pi->prefix_len);
+#endif
+			else if (ntohl(pi->preferred) > ntohl(pi->valid))
+				/* æ¨å¥¨æå¹æéãæå¹æéããé·ããã°ä¸æ­£ */
+				syslog(LOG_NOTICE, "[ND6 RTR] preferred(%d) > valid time(%d).", ntohl(pi->preferred), ntohl(pi->valid));
+			else {
+				syslog(LOG_NOTICE, "[ND6 RTR] update prefix: %s from %s.",
+				                   ipv62str(NULL, &pi->prefix), ipv62str(NULL, &ip6h->src));
+				if (rix >= 0) {
+					/*
+					 *  defrtrlist_update ã®æ»ãå¤ã¯ãã«ã¼ã¿ã®ã¤ã³ããã¯ã¹ã
+					 *  ãã ããå¤ã -1 ãªãããã¬ãã£ãã¯ã¹ã»ãªã¹ãã¯æ´æ°ããªãã
+					 */
+					prelist_update(pi, rix);	/* ãã¬ãã£ãã¯ã¹ã»ãªã¹ããæ´æ°ããã*/
+					}
+				}
+			pi_off += pi->len << 3;		/* ãªãã·ã§ã³é·ã®åä½ã¯ 8 ãã¤ã */
+			}
+		}
+
+	/* MTU ã®æ´æ° */
+	if (nd_opt_off[ND_OPT_OFF_ARRAY_IX(ND_OPT_MTU)]) {
+		T_ND_OPT_MTU_HDR	*optmtuh;
+		uint32_t			mtu;
+
+		optmtuh = (T_ND_OPT_MTU_HDR *)((uint8_t *)(input->buf + off + ROUTER_ADVERT_HDR_SIZE) +
+		                               nd_opt_off[ND_OPT_OFF_ARRAY_IX(ND_OPT_MTU)] - 8);
+
+		/*
+		 *  å¤ã®ãã§ãã¯
+		 *
+		 *    ãªãã·ã§ã³é·: 1
+		 *    äºç´:         0
+		 */
+		if (optmtuh->len != 1 || optmtuh->reserved != 0)
+			goto err_ret;
+
+		/* MTU ã IPv6 MMTUï¼1280 ãªã¯ãããï¼ä»¥ä¸ãªãç¡è¦ããã*/
+		mtu = ntohl(optmtuh->mtu);
+		if (mtu >= IPV6_MMTU) {
+			if (mtu <= (linkmtu > IF_MTU ? linkmtu : IF_MTU))
+				linkmtu = mtu;
+			}
+		}
+
+	/*
+	 *  ã«ã¼ã¿ã®å§ç¹ãªã³ã¯ã¢ãã¬ã¹ãè¿é£ã­ã£ãã·ã¥ã«ç»é²ããã
+	 */
+	if (nd_opt_off[ND_OPT_OFF_ARRAY_IX(ND_OPT_SOURCE_LINKADDR)]) {
+		opth = (T_ND_OPT_HDR *)((uint8_t *)(input->buf + off + ROUTER_ADVERT_HDR_SIZE) +
+		                        nd_opt_off[ND_OPT_OFF_ARRAY_IX(ND_OPT_SOURCE_LINKADDR)] - 8);
+	 	/* æ³¨æ: ãªãã·ã§ã³ãªãã»ããé
+åã«ã¯ããªãã»ãã + 8 ãè¨­å®ããã¦ããã*/
+		lladdr     = (uint8_t *)(opth + 1);
+		lladdr_len = (opth->len << 3);
+		}
+
+	/*
+	 *  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®ã¢ãã¬ã¹é·ãä¸è´ããªããã°ã¨ã©ã¼
+	 */
+	if (lladdr && lladdr_len != ((sizeof(T_IF_ADDR) + sizeof(T_ND_OPT_HDR) + 7) & ~7))
+		goto err_ret;
+
+	/* è¿é£ã­ã£ãã·ã¥ã«ç»é²ããã*/
+	nd6_cache_lladdr(ifp, &ip6h->src, (T_IF_ADDR *)lladdr, ND_ROUTER_ADVERT, 0);
+
+	/*
+	 *  ã«ã¼ã¿ã®å§ç¹ãªã³ã¯ã¢ãã¬ã¹ãè¿é£ã­ã£ãã·ã¥ã«ç»é²ããã®ã§ã
+	 *  ãªã³ãªã³ã¯ç¶æ
+ãå¤åããå¯è½æ§ããããããããããã§ãã¯ããã
+	 */
+	pfxlist_onlink_check();
+
+	syscall(rel_net_buf(input));
+	return;
+
+err_ret:
+	NET_COUNT_ICMP6(net_count_nd6[NC_ICMP6_IN_ERR_PACKETS], 1);
+	syscall(rel_net_buf(input));
+
+#else	/* of #if NUM_ND6_DEF_RTR_ENTRY > 0 */
+
+	/*
+	 *  ã«ã¼ã¿éç¥ãåä¿¡ããªãå ´åã¯ãç ´æ£ãã¦çµäºããã
+	 */
+	NET_COUNT_ICMP6(net_count_nd6[NC_ND6_RA_IN_PACKETS], 1);
+	syscall(rel_net_buf(input));
+
+#endif	/* of #if NUM_ND6_DEF_RTR_ENTRY > 0 */
+	}
+
+#if NUM_ND6_RTR_SOL_RETRY > 0
+
+/*
+ *  nd6_rtrsol_ctl -- ã«ã¼ã¿è¦è«åºåã®å¶å¾¡
+ */
+
+void
+nd6_rtrsol_ctl (void)
+{
+	T_IN6_IFADDR	*ifa;
+	int_t		try;
+
+	/* ãªã³ã¯ã­ã¼ã«ã«ã¢ãã¬ã¹ã®ã¢ãã¬ã¹æ
+å ±ãå¾ãã*/
+	if ((ifa = in6ifa_ifpwithix(IF_GET_IFNET(), IPV6_IFADDR_IX_LINKLOCAL)) == NULL)
+		return;
+
+	/* ãªã³ã¯ã­ã¼ã«ã«ã¢ãã¬ã¹ã®éè¤æ¤åºçµäºãå¾
+ã¤ã*/
+	do {
+		/* ãªã³ã¯ã­ã¼ã«ã«ã¢ãã¬ã¹ã®éè¤æ¤åºçµäºå¾
+ã¡æéãè¨­å®ããã*/
+		syscall(dly_tsk(net_rand() % TMO_ND6_RTR_SOL_DELAY));
+
+		/* å¾
+ã£ã¦ããéã«éè¤ãæ¤åºããããçµäºããã*/
+		if (ifa->flags & IN6_IFF_DUPLICATED)
+			return;
+
+		} while (!((ifa->flags & IN6_IFF_DEFINED) && (ifa->flags & IN6_IFF_TENTATIVE) == 0));
+
+	for (try = 0; try < NUM_ND6_RTR_SOL_RETRY; try ++) {
+
+		/* ãã£ãã©ã«ãã«ã¼ã¿ã»ãªã¹ãã«ã¨ã³ããªãããã°çµäº */
+		if (def_router_count > 0)
+			return;
+
+		/* ã«ã¼ã¿è¦è«ãåºåããã*/
+		nd6_rs_output();
+
+		/* åºåã® 2 åç®ä»¥éã®é
+å»¶æéãè¨­å®ããã*/
+		syscall(dly_tsk(TMO_ND6_RTR_SOL_INTERVAL));
+		}
+	}
+
+#endif	/* of #if NUM_ND6_RTR_SOL_RETRY > 0 */
+
+/*
+ *  nd6_onlink_prefix_lookup -- ãã¬ãã£ãã¯ã¹ãæ¢ç´¢ããã
+ */
+
+T_ND6_PREFIX *
+nd6_onlink_prefix_lookup (T_IN6_ADDR *dst)
+{
+	SYSTIM		now;
+	T_ND6_PREFIX	*pr;
+	int_t		ix;
+
+	syscall(get_tim(&now));
+	now /= SYSTIM_HZ;
+
+	/* æ¨å¥¨æå¹æéå
+ã®ãã¬ãã£ãã¯ã¹ãæ¢ç´¢ããã*/
+	for (ix = NUM_ND6_PREFIX_ENTRY; ix -- > 0; ) {
+		pr = &nd6_prefix[ix];
+		if ((pr->flags & ND6_PREFIX_STATE_BUSY)  &&
+		    (pr->flags & ND6_PREFIX_FLAG_ONLINK) &&
+		    in6_are_prefix_equal(dst, &pr->prefix, pr->prefix_len) &&
+		    (int32_t)(pr->preferred - now) > 0) {
+		           /* pr->preferred > now */
+			return pr;
+			}
+		}
+
+	/* æå¹æéå
+ã®ãã¬ãã£ãã¯ã¹ãæ¢ç´¢ããã*/
+	for (ix = NUM_ND6_PREFIX_ENTRY; ix -- > 0; ) {
+		pr = &nd6_prefix[ix];
+		if ((pr->flags & ND6_PREFIX_STATE_BUSY)  &&
+		    (pr->flags & ND6_PREFIX_FLAG_ONLINK) &&
+		    in6_are_prefix_equal(dst, &pr->prefix, pr->prefix_len) &&
+		    (int32_t)(pr->expire - now) > 0) {
+		           /* pr->expire > now */
+			return pr;
+			}
+		}
+
+	return NULL;
+	}
+
+#endif /* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/route6.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/route6.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/route6.c	(revision 270)
@@ -0,0 +1,249 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/route6.c,v 1.6 2002/10/16 01:54:45 sam Exp $	*/
+/*	$KAME: route6.c,v 1.24 2001/03/14 03:07:05 itojun Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/net.h>
+#include <net/if.h>
+#include <net/if_loop.h>
+#include <net/if_ppp.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/ppp_ipcp.h>
+#include <net/net_buf.h>
+#include <net/net_count.h>
+
+#include <netinet/in.h>
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+#include <netinet6/nd6.h>
+#include <netinet/ip6.h>
+#include <netinet6/ip6_var.h>
+#include <netinet/icmp6.h>
+
+#ifdef SUPPORT_INET6
+
+#if 0
+	/*
+	 *  éä¿¡å¸¯åãé£ãã¤ã¶ãæ»æã¸ã®å¯¾å¿ã®ããã
+	 *  ã¿ã¤ã 0 çµè·¯å¶å¾¡ãããã®å¦çãè¡ããªãã
+	 */
+
+/*
+ *  ip6_rthdr0 -- ã¿ã¤ã 0 çµè·¯å¶å¾¡ãããã®å
+¥åé¢æ°
+ */
+
+static ER
+ip6_rthdr0 (T_NET_BUF *input, T_IP6_RT0_HDR *rt0h)
+{
+	if (rt0h->segleft == 0) {
+		/* ä¸­ç¶ãã¼ãæ°ã¯ 0 ãªã®ã§ãçµç¹ãã¼ã */
+		return E_OK;
+		}
+
+	/* len ã¨ segleft ã®æ­£å½æ§ãã§ãã¯ */
+#ifdef IP6_CFG_COMPAT_RFC1883
+	if ((rt0h->len % 2) || (rt0h->len > 46)) {
+#else
+	if (rt0h->len % 2) {
+#endif
+		/*
+		 *  len ã¯å¶æ°ã§ã(23 * 2) ã¾ã§ã
+		 *  ãã ãã(23 * 2) ã®å¶éã¯ RFC 2462 ã§åé¤ããã¦ããã
+		 */
+		icmp6_error(input, ICMP6_PARAM_PROB,
+		                   ICMP6_PARAMPROB_HEADER,
+		                   ((uint8_t*)&rt0h->len - input->buf) - IF_HDR_SIZE);
+		return E_PAR;
+		}
+
+	/* len ãä¸­ç¶ãã¼ãæ°ã¨çç¾ãã¦ããªãããã§ãã¯ããã*/
+	if ((rt0h->len / 2) < rt0h->segleft) {
+		/*
+		 *  len ã¯ 8ãªã¯ãããåä½ãsegleft ã¯ 16ãªã¯ãããåä½ãªã®ã§ã
+		 *  len / 2 == segleft ã¨ãªãã¯ãã
+		 *  len / 2 <  segleft ã¯ã¨ã©ã¼ã
+		 */
+		icmp6_error(input, ICMP6_PARAM_PROB,
+		                   ICMP6_PARAMPROB_HEADER,
+		                   ((uint8_t*)&rt0h->segleft - input->buf) - IF_HDR_SIZE);
+		return E_PAR;
+		}
+
+	/*
+	 *  æ®ãã®ä¸­ç¶ãã¼ãæ°ã 1 ä»¥ä¸ã§ããã°ããã®ãã¼ãã¯æçµçãª
+	 *  çµç¹ãã¼ãã§ã¯ãªããæ¬å®è£
+ã§ã¯ãä¸­ç¶ãããªãã®ã§ã
+	 *  å
+¥åãã¼ã¿ã°ã©ã ã®å¦çãçµäºããã
+	 */
+	syscall(rel_net_buf(input));
+	return E_PAR;
+	}
+
+#endif
+
+/*
+ *  route6_input -- çµè·¯å¶å¾¡ãããã®å
+¥åé¢æ°
+ */
+
+uint_t
+route6_input (T_NET_BUF **inputp, uint_t *offp, uint_t *nextp)
+{
+	T_NET_BUF	*input = *inputp;
+	T_IP6_RT_HDR	*rth;
+	uint_t		len, off = *offp;
+
+	/* ãããã¯ã¼ã¯ãããã¡ã®æ®ãã®é·ãããã§ãã¯ããã*/
+	if (input->len - off < sizeof(T_IP6_RT_HDR))
+		goto buf_rel;
+
+	rth = (T_IP6_RT_HDR *)(input->buf + off);
+	len = (rth->len + 1) << 3;
+
+	/* çµè·¯å¶å¾¡ãããã®é·ãããã§ãã¯ããã*/
+	if (input->len < off + len)
+		goto buf_rel;
+
+#if 0
+	/*
+	 *  éä¿¡å¸¯åãé£ãã¤ã¶ãæ»æã¸ã®å¯¾å¿ã®ããã
+	 *  ã¿ã¤ã 0 çµè·¯å¶å¾¡ãããã®å¦çãè¡ããªãã
+	 */
+	if (rth->type == IPV6_RTHDR_TYPE_0) {
+		if (ip6_rthdr0(input, (T_IP6_RT0_HDR*)rth) != E_OK) {
+
+			/* ã¨ã©ã¼ã®å ´åã¯ãip6_rthdr0 ã§ãããã¡ãéæ¾ãã¦ããã*/
+			return IPPROTO_DONE;
+			}
+		}
+	else if (rth->segleft != 0) {
+
+		/*
+		 *  æ®ãã®ä¸­ç¶ãã¼ãæ°ã 1 ä»¥ä¸ã§ããã°ããã®ãã¼ãã¯æçµçãª
+		 *  çµç¹ãã¼ãã§ã¯ãªããæ¬å®è£
+ã§ã¯ãä¸­ç¶ãããªãã®ã§ã
+		 *  ICMP6 ã¨ã©ã¼ãè¿éãã¦å¦çãçµäºããã
+		 */
+		icmp6_error(input, ICMP6_PARAM_PROB,
+		                   ICMP6_PARAMPROB_HEADER,
+		                   ((uint8_t*)&rth->type - input->buf) - IF_HDR_SIZE);
+		return IPPROTO_DONE;
+		}
+#else
+	if (rth->segleft != 0) {
+
+		/*
+		 *  æ®ãã®ä¸­ç¶ãã¼ãæ°ã 1 ä»¥ä¸ã§ããã°ããã®ãã¼ãã¯æçµçãª
+		 *  çµç¹ãã¼ãã§ã¯ãªããæ¬å®è£
+ã§ã¯ãä¸­ç¶ãããªãã®ã§ã
+		 *  ICMP6 ã¨ã©ã¼ãè¿éãã¦å¦çãçµäºããã
+		 */
+		icmp6_error(input, ICMP6_PARAM_PROB,
+		                   ICMP6_PARAMPROB_HEADER,
+		                   ((uint8_t*)&rth->type - input->buf) - IF_HDR_SIZE);
+		return IPPROTO_DONE;
+		}
+#endif
+
+	*nextp = *offp - IF_HDR_SIZE + offsetof(T_IP6_RT_HDR, next);
+	*offp += len;
+	return rth->next;
+
+buf_rel:
+	syscall(rel_net_buf(input));
+	return IPPROTO_DONE;
+	}
+
+#endif /* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/scope6.c
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/scope6.c	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netinet6/scope6.c	(revision 270)
@@ -0,0 +1,182 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*	$FreeBSD: src/sys/netinet6/in6.c,v 1.21 2002/04/19 04:46:22 suz Exp $	*/
+/*	$KAME: in6.c,v 1.259 2002/01/21 11:37:50 keiichi Exp $	*/
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)in.c	8.2 (Berkeley) 11/15/93
+ */
+
+#include <string.h>
+
+#ifdef TARGET_KERNEL_ASP
+
+#include <kernel.h>
+#include <sil.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include <s_services.h>
+#include <t_services.h>
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+
+#include <netinet6/in6.h>
+#include <netinet6/in6_var.h>
+
+#ifdef SUPPORT_INET6
+
+/*
+ *  in6_addrscope -- ã¢ãã¬ã¹ã®ã¹ã³ã¼ã ID ãè¿ãã
+ */
+
+uint_t
+in6_addrscope (T_IN6_ADDR *addr)
+{
+	uint_t scope;
+
+	if (addr->s6_addr8[0] == 0xfe) {
+		if      ((addr->s6_addr8[1] & 0xc0) == 0x80)
+			return IPV6_ADDR_SCOPE_LINKLOCAL;
+		else if ((addr->s6_addr8[1] & 0xc0) == 0xc0)
+			return IPV6_ADDR_SCOPE_SITELOCAL;
+		else
+			return IPV6_ADDR_SCOPE_GLOBAL;
+		}
+
+	else if (addr->s6_addr8[0] == 0xff) {
+		scope = addr->s6_addr8[1] & 0x0f;
+		if (scope == IPV6_ADDR_SCOPE_NODELOCAL ||
+		    scope == IPV6_ADDR_SCOPE_SITELOCAL ||
+		    scope == IPV6_ADDR_SCOPE_SITELOCAL)
+			return scope;
+		else
+			return IPV6_ADDR_SCOPE_GLOBAL;
+		}
+
+	else if (memcmp(addr, &in6_addr_unspecified, sizeof(T_IN6_ADDR) - 1) == 0) {
+		if      (addr->s6_addr8[15] == 1)
+			return IPV6_ADDR_SCOPE_NODELOCAL;
+		else if (addr->s6_addr8[15] == 0)
+			return IPV6_ADDR_SCOPE_LINKLOCAL;
+		}
+
+	return IPV6_ADDR_SCOPE_GLOBAL;
+	}
+
+#endif /* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/tcpip_api.csv
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/tcpip_api.csv	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/tcpip_api.csv	(revision 270)
@@ -0,0 +1,12 @@
+tcp4_rep,TCP_CRE_REP, #tcp4_repid { .tcp4_repatr { &ipv4addr &portno } },,
+tcp6_rep,TCP6_CRE_REP,#tcp6_repid { .tcp6_repatr { &ipv6addr &portno } },,
+tcp4_cep,TCP_CRE_CEP, #tcp4_cepid { .tcp4_cepatr &sbuf &sbufsz &rbuf &rbufsz &callback },,
+tcp6_cep,TCP6_CRE_CEP,#tcp6_cepid { .tcp6_cepatr &sbuf &sbufsz &rbuf &rbufsz &callback },,
+udp4_cep,UDP_CRE_CEP, #udp4_cepid { .udp4_cepatr { &ipv4addr &portno } &callback },,
+udp6_cep,UDP6_CRE_CEP,#udp6_cepid { .udp6_cepatr { &ipv6addr &portno } &callback },,
+vrid_tcp4_rep,VRID_TCP_REP, #vrid_tcp4_repid,,
+vrid_tcp4_cep,VRID_TCP_CEP, #vrid_tcp4_cepid,,
+vrid_tcp6_rep,VRID_TCP6_REP,#vrid_tcp6_repid,,
+vrid_tcp6_cep,VRID_TCP6_CEP,#vrid_tcp6_cepid,,
+vrid_udp4_cep,VRID_UDP_CEP, #vrid_udp4_cepid,,
+vrid_udp6_cep,VRID_UDP6_CEP,#vrid_udp6_cepid,,
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/tcpip_api.def
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/tcpip_api.def	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/tcpip_api.def	(revision 270)
@@ -0,0 +1,12 @@
+TCP_CRE_REP  #tcp4_repid* { .tcp4_repatr { &ipv4addr &portno } }
+TCP6_CRE_REP #tcp6_repid* { .tcp6_repatr { &ipv6addr &portno } }
+TCP_CRE_CEP  #tcp4_cepid* { .tcp4_cepatr &sbuf &sbufsz &rbuf &rbufsz &callback }
+TCP6_CRE_CEP #tcp6_cepid* { .tcp6_cepatr &sbuf &sbufsz &rbuf &rbufsz &callback }
+UDP_CRE_CEP  #udp4_cepid* { .udp4_cepatr { &ipv4addr &portno } &callback }
+UDP6_CRE_CEP #udp6_cepid* { .udp6_cepatr { &ipv6addr &portno } &callback }
+VRID_TCP_REP  #vrid_tcp4_repid*
+VRID_TCP_CEP  #vrid_tcp4_cepid*
+VRID_TCP6_REP #vrid_tcp6_repid*
+VRID_TCP6_CEP #vrid_tcp6_cepid*
+VRID_UDP_CEP  #vrid_udp4_cepid*
+VRID_UDP6_CEP #vrid_udp6_cepid*
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/tcpip_sym.def
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/tcpip_sym.def	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/tcpip_sym.def	(revision 270)
@@ -0,0 +1,79 @@
+TA_HLNG
+TA_TFIFO
+TA_WSGL
+NUM_IPV4ADDR_STR_BUFF
+NUM_IPV4ADDR_STR_BUFF
+NUM_IPV6ADDR_STR_BUFF
+NUM_MACADDR_STR_BUFF
+NUM_MACADDR_STR_BUFF
+TMO_IP4_FRAG_GET_NET_BUF
+TMO_IP6_FRAG_GET_NET_BUF
+TMO_PPP_GET_NET_BUF
+TMO_ARP_GET_NET_BUF
+TMO_TCP_GET_NET_BUF
+TMO_TCP_OUTPUT
+TMO_UDP_OUTPUT
+TMO_ICMP_OUTPUT
+TMO_ND6_NS_OUTPUT
+TMO_ND6_NA_OUTPUT
+TMO_ND6_RS_OUTPUT
+TMO_ARP_OUTPUT
+TMO_ND6_RTR_SOL_DELAY
+TMO_ND6_RTR_SOL_INTERVAL
+TMO_IN_REDIRECT
+TCP_OUT_TASK_STACK_SIZE
+UDP_OUT_TASK_STACK_SIZE
+PPP_INPUT_STACK_SIZE
+PPP_OUTPUT_STACK_SIZE
+ETHER_INPUT_STACK_SIZE
+ETHER_OUTPUT_STACK_SIZE
+LOOP_INPUT_STACK_SIZE
+LOOP_OUTPUT_STACK_SIZE
+NET_TIMER_STACK_SIZE
+TCP_OUT_TASK_PRIORITY
+UDP_OUT_TASK_PRIORITY
+PPP_INPUT_PRIORITY
+PPP_OUTPUT_PRIORITY
+ETHER_INPUT_PRIORITY
+ETHER_OUTPUT_PRIORITY
+LOOP_INPUT_PRIORITY
+LOOP_OUTPUT_PRIORITY
+NET_TIMER_PRIORITY
+NUM_DTQ_UDP_RCVQ
+NUM_DTQ_UDP_OUTPUT
+NUM_DTQ_PPP_OUTPUT
+NUM_DTQ_ETHER_OUTPUT
+NUM_DTQ_LOOP_INPUT
+NUM_DTQ_LOOP_OUTPUT
+TCP_REP_FLG_DYNAMIC
+TCP_REP_FLG_VALID
+TCP_CEP_FLG_ACK_NOW
+TCP_CEP_FLG_DEL_ACK
+TCP_CEP_FLG_SENT_FIN
+TCP_CEP_FLG_NEED_SYN
+TCP_CEP_FLG_NEED_FIN
+TCP_CEP_FLG_FORCE
+TCP_CEP_FLG_NO_PUSH
+TCP_CEP_FLG_NO_DELAY
+TCP_CEP_FLG_FORCE_CLEAR
+TCP_CEP_FLG_POST_OUTPUT
+TCP_CEP_FLG_RESERVE_OUTPUT
+TCP_CEP_FLG_DYNAMIC
+TCP_CEP_FLG_VALID
+TCP_CEP_FLG_CLOSE_AFTER_OUTPUT
+TCP_CEP_FLG_RESTORE_NEXT_OUTPUT
+TCP_CEP_FLG_WBCS_NBUF_REQ
+TCP_CEP_FLG_WBCS_MASK
+TCP_CEP_FLG_WBCS_FREE
+TCP_CEP_FLG_WBCS_WOPEN_PEND
+TCP_CEP_FLG_WBCS_NBUF_PEND
+TCP_CEP_FLG_WBCS_NBUF_RSVD
+TCP_CEP_FLG_WBCS_NBUF_READY
+TCP_CEP_FLG_WBCS_SEND_READY
+TCP_CEP_FLG_WBCS_SENT
+TCP_CEP_FLG_WBCS_ACKED
+TCP_CEP_EVT_ESTABLISHED
+TCP_CEP_EVT_CLOSED
+TCP_CEP_EVT_SWBUF_READY
+TCP_CEP_EVT_RWBUF_READY
+TCP_CEP_EVT_ALL
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/tinet.tf
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/tinet.tf	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/tinet.tf	(revision 270)
@@ -0,0 +1,452 @@
+$ ======================================================================
+$ 
+$   TINET (TCP/IP Protocol Stack)
+$ 
+$   Copyright (C) 2001-2007 by Dep. of Computer Science and Engineering
+$                    Tomakomai National College of Technology, JAPAN
+$  
+$   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$       ã¨ï¼
+$     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$       å
+è²¬ãããã¨ï¼
+$  
+$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$   ã®è²¬ä»»ãè² ããªãï¼
+$ 
+$   @(#) $Id$
+$  
+$ =====================================================================
+
+$ =====================================================================
+$ tinet_cfg.h ã®çæ
+$ =====================================================================
+
+$FILE "tinet_cfg.h"$
+/* tinet_cfg.h */$NL$
+#ifndef _TINET_CFG_H_$NL$
+#define _TINET_CFG_H_$NL$
+$NL$
+$FOREACH id TCP4_REP.ID_LIST$
+	#define $id$	$+id$$NL$
+$END$
+$FOREACH id TCP6_REP.ID_LIST$
+	#define $id$	$+id$$NL$
+$END$
+$FOREACH id TCP4_CEP.ID_LIST$
+	#define $id$	$+id$$NL$
+$END$
+$FOREACH id TCP6_CEP.ID_LIST$
+	#define $id$	$+id$$NL$
+$END$
+$FOREACH id UDP4_CEP.ID_LIST$
+	#define $id$	$+id$$NL$
+$END$
+$FOREACH id UDP6_CEP.ID_LIST$
+	#define $id$	$+id$$NL$
+$END$
+$FOREACH id VRID_TCP4_REP.ID_LIST$
+	#define $id$	$+id + LENGTH(TCP4_REP.ID_LIST)$$NL$
+$END$
+$FOREACH id VRID_TCP4_CEP.ID_LIST$
+	#define $id$	$+id + LENGTH(TCP4_CEP.ID_LIST)$$NL$
+$END$
+$FOREACH id VRID_TCP6_REP.ID_LIST$
+	#define $id$	$+id + LENGTH(TCP6_REP.ID_LIST)$$NL$
+$END$
+$FOREACH id VRID_TCP6_CEP.ID_LIST$
+	#define $id$	$+id + LENGTH(TCP6_CEP.ID_LIST)$$NL$
+$END$
+$FOREACH id VRID_UDP4_CEP.ID_LIST$
+	#define $id$	$+id + LENGTH(UDP4_CEP.ID_LIST)$$NL$
+$END$
+$FOREACH id VRID_UDP6_CEP.ID_LIST$
+	#define $id$	$+id + LENGTH(UDP6_CEP.ID_LIST)$$NL$
+$END$
+$NL$
+#endif /* _TINET_CFG_H_ */$NL$
+
+$ =====================================================================
+$ tinet_cfg.c ã®çæ
+$ =====================================================================
+
+$FILE "tinet_cfg.c"$
+/* tinet_cfg.c */$NL$
+$NL$
+#include <kernel.h>$NL$
+#include <sil.h>$NL$
+#include "kernel_cfg.h"$NL$
+#include "tinet_cfg.h"$NL$
+#include <tinet_defs.h>$NL$
+#include <tinet_config.h>$NL$
+#include <net/if.h>$NL$
+#include <net/if_ppp.h>$NL$
+#include <net/if_loop.h>$NL$
+#include <net/ethernet.h>$NL$
+#include <net/net.h>$NL$
+#include <net/net_buf.h>$NL$
+#include <netinet/in.h>$NL$
+#include <netinet/in_itron.h>$NL$
+#include <netinet/ip.h>$NL$
+#include <netinet/ip6.h>$NL$
+#include <netinet/tcp.h>$NL$
+#include <netinet/tcp_timer.h>$NL$
+#include <netinet/tcp_var.h>$NL$
+#include <netinet/tcp_fsm.h>$NL$
+#include <netinet/udp_var.h>$NL$
+
+$ 
+$  ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼
+$ 
+$NL$
+/*$NL$
+$SPC$*  Include Directives (#include)$NL$
+$SPC$*/$NL$
+$NL$
+$INCLUDES$
+
+$	// TCP (IPv4) åä»å£
+$IF LENGTH(TCP4_REP.ID_LIST) + LENGTH(VRID_TCP4_REP.ID_LIST)$
+	$NL$
+	#define TNUM_TCP_REPID	$LENGTH(TCP4_REP.ID_LIST) + LENGTH(VRID_TCP4_REP.ID_LIST)$$NL$
+	$NL$
+	const ID tmax_tcp_repid = (TMIN_TCP_REPID + TNUM_TCP_REPID - 1);$NL$
+	$NL$
+	T_TCP4_REP tcp_rep[TNUM_TCP_REPID] = {$NL$
+	$FOREACH id TCP4_REP.ID_LIST$
+		$TAB${$NL$
+			$TAB$$TAB$$TCP4_REP.TCP4_REPATR[id]$,$NL$
+			$TAB$$TAB${ $TCP4_REP.IPV4ADDR[id]$, $TCP4_REP.PORTNO[id]$ },$NL$
+	#if defined(TCP_CFG_EXTENTIONS)$NL$
+			$TAB$$TAB$TCP_REP_FLG_VALID,$NL$
+			$TAB$$TAB$SEM_TCP_REP_LOCK$+id$,$NL$
+	#endif$NL$
+			$TAB$$TAB$},$NL$
+	$END$
+	$FOREACH id VRID_TCP4_REP.ID_LIST$
+		$TAB${$NL$
+			$TAB$$TAB$0,$NL$
+			$TAB$$TAB${ IPV4_ADDRANY, TCP_PORTANY },$NL$
+	#if defined(TCP_CFG_EXTENTIONS)$NL$
+			$TAB$$TAB$TCP_REP_FLG_DYNAMIC,$NL$
+			$TAB$$TAB$SEM_TCP_REP_LOCK$+id + LENGTH(TCP4_REP.ID_LIST)$,$NL$
+	#endif$NL$
+			$TAB$$TAB$},$NL$
+	$END$
+		$TAB$};$NL$
+$END$
+
+$	// TCP (IPv6) åä»å£
+$IF LENGTH(TCP6_REP.ID_LIST) + LENGTH(VRID_TCP6_REP.ID_LIST)$
+	$NL$
+	#define TNUM_TCP_REPID	$LENGTH(TCP6_REP.ID_LIST) + LENGTH(VRID_TCP6_REP.ID_LIST)$$NL$
+	$NL$
+	const ID tmax_tcp_repid = (TMIN_TCP_REPID + TNUM_TCP_REPID - 1);$NL$
+	$NL$
+	T_TCP6_REP tcp_rep[TNUM_TCP_REPID] = {$NL$
+	$FOREACH id TCP6_REP.ID_LIST$
+		$TAB${$NL$
+			$TAB$$TAB$$TCP6_REP.TCP6_REPATR[id]$,$NL$
+			$TAB$$TAB${ $TCP6_REP.IPV6ADDR[id]$, $TCP6_REP.PORTNO[id]$ },$NL$
+	#if defined(TCP_CFG_EXTENTIONS)$NL$
+			$TAB$$TAB$TCP_REP_FLG_VALID,$NL$
+			$TAB$$TAB$SEM_TCP_REP_LOCK$+id$,$NL$
+	#endif$NL$
+			$TAB$$TAB$},$NL$
+	$END$
+	$FOREACH id VRID_TCP6_REP.ID_LIST$
+		$TAB${$NL$
+			$TAB$$TAB$0,$NL$
+			$TAB$$TAB${ IPV6_ADDRANY, TCP_PORTANY },$NL$
+	#if defined(TCP_CFG_EXTENTIONS)$NL$
+			$TAB$$TAB$TCP_REP_FLG_DYNAMIC,$NL$
+			$TAB$$TAB$SEM_TCP_REP_LOCK$+id + LENGTH(TCP6_REP.ID_LIST)$,$NL$
+	#endif$NL$
+			$TAB$$TAB$},$NL$
+	$END$
+		$TAB$};$NL$
+$END$
+
+$	// TCP (IPv4) éä¿¡ç«¯ç¹
+$IF LENGTH(TCP4_CEP.ID_LIST) + LENGTH(VRID_TCP4_CEP.ID_LIST)$
+	$NL$
+	#define TNUM_TCP_CEPID	$LENGTH(TCP4_CEP.ID_LIST) + LENGTH(VRID_TCP4_CEP.ID_LIST)$$NL$
+	$NL$
+	const ID tmax_tcp_cepid = (TMIN_TCP_CEPID + TNUM_TCP_CEPID - 1);$NL$
+	$NL$
+	T_TCP4_CEP tcp_cep[TNUM_TCP_CEPID] = {$NL$
+	$FOREACH id TCP4_CEP.ID_LIST$
+		$TAB${$NL$
+			$TAB$$TAB$$TCP4_CEP.TCP4_CEPATR[id]$,$NL$
+			$TAB$$TAB$(void*)$TCP4_CEP.SBUF[id]$,$NL$
+			$TAB$$TAB$$TCP4_CEP.SBUFSZ[id]$,$NL$
+			$TAB$$TAB$(void*)$TCP4_CEP.RBUF[id]$,$NL$
+			$TAB$$TAB$$TCP4_CEP.RBUFSZ[id]$,$NL$
+			$TAB$$TAB$(t_tcp_callback)(FP)$TCP4_CEP.CALLBACK[id]$,$NL$
+			$TAB$$TAB$TCP_CEP_FLG_VALID,$NL$
+			$TAB$$TAB$SEM_TCP_CEP_LOCK$+id$,$NL$
+			$TAB$$TAB$FLG_TCP_CEP_EST$+id$,$NL$
+			$TAB$$TAB$FLG_TCP_CEP_SND$+id$,$NL$
+			$TAB$$TAB$FLG_TCP_CEP_RCV$+id$,$NL$
+			$TAB$$TAB$},$NL$
+	$END$
+	$FOREACH id VRID_TCP4_CEP.ID_LIST$
+		$TAB${$NL$
+			$TAB$$TAB$0,$NL$
+			$TAB$$TAB$(void*)NULL,$NL$
+			$TAB$$TAB$0,$NL$
+			$TAB$$TAB$(void*)NULL,$NL$
+			$TAB$$TAB$0,$NL$
+			$TAB$$TAB$(t_tcp_callback)(FP)NULL,$NL$
+			$TAB$$TAB$TCP_CEP_FLG_DYNAMIC,$NL$
+			$TAB$$TAB$SEM_TCP_CEP_LOCK$+id + LENGTH(TCP4_CEP.ID_LIST)$,$NL$
+			$TAB$$TAB$FLG_TCP_CEP_EST$+id + LENGTH(TCP4_CEP.ID_LIST)$,$NL$
+			$TAB$$TAB$FLG_TCP_CEP_SND$+id + LENGTH(TCP4_CEP.ID_LIST)$,$NL$
+			$TAB$$TAB$FLG_TCP_CEP_RCV$+id + LENGTH(TCP4_CEP.ID_LIST)$,$NL$
+			$TAB$$TAB$},$NL$
+	$END$
+		$TAB$};$NL$
+$END$
+
+$	// TCP (IPv6) éä¿¡ç«¯ç¹
+$IF LENGTH(TCP6_CEP.ID_LIST) + LENGTH(VRID_TCP6_CEP.ID_LIST)$
+	$NL$
+	#define TNUM_TCP_CEPID	$LENGTH(TCP6_CEP.ID_LIST) + LENGTH(VRID_TCP6_CEP.ID_LIST)$$NL$
+	$NL$
+	const ID tmax_tcp_cepid = (TMIN_TCP_CEPID + TNUM_TCP_CEPID - 1);$NL$
+	$NL$
+	T_TCP6_CEP tcp_cep[TNUM_TCP_CEPID] = {$NL$
+	$FOREACH id TCP6_CEP.ID_LIST$
+		$TAB${$NL$
+			$TAB$$TAB$$TCP6_CEP.TCP6_CEPATR[id]$,$NL$
+			$TAB$$TAB$(void*)$TCP6_CEP.SBUF[id]$,$NL$
+			$TAB$$TAB$$TCP6_CEP.SBUFSZ[id]$,$NL$
+			$TAB$$TAB$(void*)$TCP6_CEP.RBUF[id]$,$NL$
+			$TAB$$TAB$$TCP6_CEP.RBUFSZ[id]$,$NL$
+			$TAB$$TAB$(t_tcp_callback)(FP)$TCP6_CEP.CALLBACK[id]$,$NL$
+			$TAB$$TAB$TCP_CEP_FLG_VALID,$NL$
+			$TAB$$TAB$SEM_TCP_CEP_LOCK$+id$,$NL$
+			$TAB$$TAB$FLG_TCP_CEP_EST$+id$,$NL$
+			$TAB$$TAB$FLG_TCP_CEP_SND$+id$,$NL$
+			$TAB$$TAB$FLG_TCP_CEP_RCV$+id$,$NL$
+			$TAB$$TAB$},$NL$
+	$END$
+	$FOREACH id VRID_TCP6_CEP.ID_LIST$
+		$TAB${$NL$
+			$TAB$$TAB$0,$NL$
+			$TAB$$TAB$(void*)NULL,$NL$
+			$TAB$$TAB$0,$NL$
+			$TAB$$TAB$(void*)NULL,$NL$
+			$TAB$$TAB$0,$NL$
+			$TAB$$TAB$(t_tcp_callback)(FP)NULL,$NL$
+			$TAB$$TAB$TCP_CEP_FLG_DYNAMIC,$NL$
+			$TAB$$TAB$SEM_TCP_CEP_LOCK$+id + LENGTH(TCP6_CEP.ID_LIST)$,$NL$
+			$TAB$$TAB$FLG_TCP_CEP_EST$+id + LENGTH(TCP6_CEP.ID_LIST)$,$NL$
+			$TAB$$TAB$FLG_TCP_CEP_SND$+id + LENGTH(TCP6_CEP.ID_LIST)$,$NL$
+			$TAB$$TAB$FLG_TCP_CEP_RCV$+id + LENGTH(TCP6_CEP.ID_LIST)$,$NL$
+			$TAB$$TAB$},$NL$
+	$END$
+		$TAB$};$NL$
+$END$
+
+$	// UDP (IPv4) éä¿¡ç«¯ç¹
+$IF LENGTH(UDP4_CEP.ID_LIST) + LENGTH(VRID_UDP4_CEP.ID_LIST)$
+	$NL$
+	#define TNUM_UDP_CEPID	$LENGTH(UDP4_CEP.ID_LIST) + LENGTH(VRID_UDP4_CEP.ID_LIST)$$NL$
+	$NL$
+	const ID tmax_udp_cepid = (TMIN_UDP_CEPID + TNUM_UDP_CEPID - 1);$NL$
+	$NL$
+	T_UDP4_CEP udp_cep[TNUM_UDP_CEPID] = {$NL$
+	$FOREACH id UDP4_CEP.ID_LIST$
+		$TAB${$NL$
+			$TAB$$TAB$$UDP4_CEP.UDP4_CEPATR[id]$,$NL$
+			$TAB$$TAB${ $UDP4_CEP.IPV4ADDR[id]$, $UDP4_CEP.PORTNO[id]$ },$NL$
+			$TAB$$TAB$(t_udp_callback)(FP)$UDP4_CEP.CALLBACK[id]$,$NL$
+			$TAB$$TAB$UDP_CEP_FLG_VALID,$NL$
+			$TAB$$TAB$SEM_UDP_CEP_LOCK$+id$,$NL$
+			$TAB$$TAB$TA_NULL,$NL$
+			$TAB$$TAB$TA_NULL,$NL$
+			$TAB$$TAB$DTQ_UDP_RCVQ$+id$,$NL$
+			$TAB$$TAB$},$NL$
+	$END$
+	$FOREACH id VRID_UDP4_CEP.ID_LIST$
+		$TAB${$NL$
+			$TAB$$TAB$0,$NL$
+			$TAB$$TAB${ IPV4_ADDRANY, UDP_PORTANY },$NL$
+			$TAB$$TAB$(t_udp_callback)(FP)NULL,$NL$
+			$TAB$$TAB$UDP_CEP_FLG_DYNAMIC,$NL$
+			$TAB$$TAB$SEM_UDP_CEP_LOCK$+id + LENGTH(UDP4_CEP.ID_LIST)$,$NL$
+			$TAB$$TAB$TA_NULL,$NL$
+			$TAB$$TAB$TA_NULL,$NL$
+			$TAB$$TAB$DTQ_UDP_RCVQ$+id + LENGTH(UDP4_CEP.ID_LIST)$,$NL$
+			$TAB$$TAB$},$NL$
+	$END$
+		$TAB$};$NL$
+$END$
+
+$	// UDP (IPv6) éä¿¡ç«¯ç¹
+$IF LENGTH(UDP6_CEP.ID_LIST) + LENGTH(VRID_UDP6_CEP.ID_LIST)$
+	$NL$
+	#define TNUM_UDP_CEPID	$LENGTH(UDP6_CEP.ID_LIST) + LENGTH(VRID_UDP6_CEP.ID_LIST)$$NL$
+	$NL$
+	const ID tmax_udp_cepid = (TMIN_UDP_CEPID + TNUM_UDP_CEPID - 1);$NL$
+	$NL$
+	T_UDP6_CEP udp_cep[TNUM_UDP_CEPID] = {$NL$
+	$FOREACH id UDP6_CEP.ID_LIST$
+		$TAB${$NL$
+			$TAB$$TAB$$UDP6_CEP.UDP6_CEPATR[id]$,$NL$
+			$TAB$$TAB${ $UDP6_CEP.IPV6ADDR[id]$, $UDP6_CEP.PORTNO[id]$ },$NL$
+			$TAB$$TAB$(t_udp_callback)(FP)$UDP6_CEP.CALLBACK[id]$,$NL$
+			$TAB$$TAB$UDP_CEP_FLG_VALID,$NL$
+			$TAB$$TAB$SEM_UDP_CEP_LOCK$+id$,$NL$
+			$TAB$$TAB$TA_NULL,$NL$
+			$TAB$$TAB$TA_NULL,$NL$
+			$TAB$$TAB$DTQ_UDP_RCVQ$+id$,$NL$
+			$TAB$$TAB$},$NL$
+	$END$
+	$FOREACH id VRID_UDP6_CEP.ID_LIST$
+		$TAB${$NL$
+			$TAB$$TAB$0,$NL$
+			$TAB$$TAB${ IPV6_ADDRANY, UDP_PORTANY },$NL$
+			$TAB$$TAB$(t_udp_callback)(FP)NULL,$NL$
+			$TAB$$TAB$UDP_CEP_FLG_DYNAMIC,$NL$
+			$TAB$$TAB$SEM_UDP_CEP_LOCK$+id + LENGTH(UDP6_CEP.ID_LIST)$,$NL$
+			$TAB$$TAB$TA_NULL,$NL$
+			$TAB$$TAB$TA_NULL,$NL$
+			$TAB$$TAB$DTQ_UDP_RCVQ$+id + LENGTH(UDP6_CEP.ID_LIST)$,$NL$
+			$TAB$$TAB$},$NL$
+	$END$
+		$TAB$};$NL$
+$END$
+
+$ =====================================================================
+$ tinet_kern.cfg ã®çæ
+$ =====================================================================
+
+$FILE "tinet_kern.cfg"$
+/* tinet_kern.cfg */$NL$
+
+$	// TCP (IPv4) åä»å£
+$IF LENGTH(TCP4_REP.ID_LIST) + LENGTH(VRID_TCP4_REP.ID_LIST)$
+	$NL$
+	#if defined(TCP_CFG_EXTENTIONS)$NL$
+	$FOREACH id TCP4_REP.ID_LIST$
+		CRE_SEM(SEM_TCP_REP_LOCK$+id$, { TA_TPRI, 1, 1 });$NL$
+	$END$
+	$FOREACH id VRID_TCP4_REP.ID_LIST$
+		CRE_SEM(SEM_TCP_REP_LOCK$+id + LENGTH(TCP4_REP.ID_LIST)$, { TA_TPRI, 1, 1 });$NL$
+	$END$
+	#endif$NL$
+$END$
+
+$	// TCP (IPv4) åä»å£
+$IF LENGTH(TCP6_REP.ID_LIST) + LENGTH(VRID_TCP6_REP.ID_LIST)$
+	$NL$
+	#if defined(TCP_CFG_EXTENTIONS)$NL$
+	$FOREACH id TCP6_REP.ID_LIST$
+		CRE_SEM(SEM_TCP_REP_LOCK$+id$, { TA_TPRI, 1, 1 });$NL$
+	$END$
+	$FOREACH id VRID_TCP6_REP.ID_LIST$
+		CRE_SEM(SEM_TCP_REP_LOCK$+id + LENGTH(TCP6_REP.ID_LIST)$, { TA_TPRI, 1, 1 });$NL$
+	$END$
+	#endif$NL$
+$END$
+
+$	// TCP (IPv4) éä¿¡ç«¯ç¹
+$IF LENGTH(TCP4_CEP.ID_LIST) + LENGTH(VRID_TCP4_CEP.ID_LIST)$
+	$NL$
+	$FOREACH id TCP4_CEP.ID_LIST$
+		$NL$
+		CRE_SEM(SEM_TCP_CEP_LOCK$+id$,{ TA_TPRI, 1, 1 });$NL$
+		CRE_FLG(FLG_TCP_CEP_EST$+id$,{ TA_TFIFO|TA_WSGL, TCP_CEP_EVT_CLOSED });$NL$
+		CRE_FLG(FLG_TCP_CEP_SND$+id$,{ TA_TFIFO|TA_WSGL, TCP_CEP_EVT_SWBUF_READY });$NL$
+		CRE_FLG(FLG_TCP_CEP_RCV$+id$,{ TA_TFIFO|TA_WSGL, 0 });$NL$
+	$END$
+	$FOREACH id VRID_TCP4_CEP.ID_LIST$
+		$NL$
+		CRE_SEM(SEM_TCP_CEP_LOCK$+id + LENGTH(TCP4_CEP.ID_LIST)$,{ TA_TPRI, 1, 1 });$NL$
+		CRE_FLG(FLG_TCP_CEP_EST$+id + LENGTH(TCP4_CEP.ID_LIST)$,{ TA_TFIFO|TA_WSGL, TCP_CEP_EVT_CLOSED });$NL$
+		CRE_FLG(FLG_TCP_CEP_SND$+id + LENGTH(TCP4_CEP.ID_LIST)$,{ TA_TFIFO|TA_WSGL, TCP_CEP_EVT_SWBUF_READY });$NL$
+		CRE_FLG(FLG_TCP_CEP_RCV$+id + LENGTH(TCP4_CEP.ID_LIST)$,{ TA_TFIFO|TA_WSGL, 0 });$NL$
+	$END$
+$END$
+
+$	// TCP (IPv6) éä¿¡ç«¯ç¹
+$IF LENGTH(TCP6_CEP.ID_LIST) + LENGTH(VRID_TCP6_CEP.ID_LIST)$
+	$NL$
+	$FOREACH id TCP6_CEP.ID_LIST$
+		$NL$
+		CRE_SEM(SEM_TCP_CEP_LOCK$+id$,{ TA_TPRI, 1, 1 });$NL$
+		CRE_FLG(FLG_TCP_CEP_EST$+id$,{ TA_TFIFO|TA_WSGL, TCP_CEP_EVT_CLOSED });$NL$
+		CRE_FLG(FLG_TCP_CEP_SND$+id$,{ TA_TFIFO|TA_WSGL, TCP_CEP_EVT_SWBUF_READY });$NL$
+		CRE_FLG(FLG_TCP_CEP_RCV$+id$,{ TA_TFIFO|TA_WSGL, 0 });$NL$
+	$END$
+	$FOREACH id VRID_TCP6_CEP.ID_LIST$
+		$NL$
+		CRE_SEM(SEM_TCP_CEP_LOCK$+id + LENGTH(TCP6_CEP.ID_LIST)$,{ TA_TPRI, 1, 1 });$NL$
+		CRE_FLG(FLG_TCP_CEP_EST$+id + LENGTH(TCP6_CEP.ID_LIST)$,{ TA_TFIFO|TA_WSGL, TCP_CEP_EVT_CLOSED });$NL$
+		CRE_FLG(FLG_TCP_CEP_SND$+id + LENGTH(TCP6_CEP.ID_LIST)$,{ TA_TFIFO|TA_WSGL, TCP_CEP_EVT_SWBUF_READY });$NL$
+		CRE_FLG(FLG_TCP_CEP_RCV$+id + LENGTH(TCP6_CEP.ID_LIST)$,{ TA_TFIFO|TA_WSGL, 0 });$NL$
+	$END$
+$END$
+
+$	// UDP (IPv4) éä¿¡ç«¯ç¹
+$IF LENGTH(UDP4_CEP.ID_LIST) + LENGTH(VRID_UDP4_CEP.ID_LIST)$
+	$NL$
+	$FOREACH id UDP4_CEP.ID_LIST$
+		CRE_SEM(SEM_UDP_CEP_LOCK$+id$,{ TA_TPRI, 1, 1 });$NL$
+		CRE_DTQ(DTQ_UDP_RCVQ$+id$,{ TA_TFIFO, NUM_DTQ_UDP_RCVQ, NULL });$NL$
+		$NL$
+	$END$
+	$FOREACH id VRID_UDP4_CEP.ID_LIST$
+		CRE_SEM(SEM_UDP_CEP_LOCK$+id + LENGTH(UDP4_CEP.ID_LIST)$,{ TA_TPRI, 1, 1 });$NL$
+		CRE_DTQ(DTQ_UDP_RCVQ$+id + LENGTH(UDP4_CEP.ID_LIST)$,{ TA_TFIFO, NUM_DTQ_UDP_RCVQ, NULL });$NL$
+		$NL$
+	$END$
+$END$
+
+$	// UDP (IPv6) éä¿¡ç«¯ç¹
+$IF LENGTH(UDP6_CEP.ID_LIST) + LENGTH(VRID_UDP6_CEP.ID_LIST)$
+	$NL$
+	$FOREACH id UDP6_CEP.ID_LIST$
+		CRE_SEM(SEM_UDP_CEP_LOCK$+id$,{ TA_TPRI, 1, 1 });$NL$
+		CRE_DTQ(DTQ_UDP_RCVQ$+id$,{ TA_TFIFO, NUM_DTQ_UDP_RCVQ, NULL });$NL$
+		$NL$
+	$END$
+	$FOREACH id VRID_UDP6_CEP.ID_LIST$
+		CRE_SEM(SEM_UDP_CEP_LOCK$+id + LENGTH(UDP6_CEP.ID_LIST)$,{ TA_TPRI, 1, 1 });$NL$
+		CRE_DTQ(DTQ_UDP_RCVQ$+id + LENGTH(UDP6_CEP.ID_LIST)$,{ TA_TFIFO, NUM_DTQ_UDP_RCVQ, NULL });$NL$
+		$NL$
+	$END$
+$END$
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/tinet.trb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/tinet.trb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/tinet.trb	(revision 270)
@@ -0,0 +1,581 @@
+# ======================================================================
+# 
+#   TINET (TCP/IP Protocol Stack)
+# 
+#   Copyright (C) 2001-2007 by Dep. of Computer Science and Engineering
+#                    Tomakomai National College of Technology, JAPAN
+#  
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   @(#) $Id: tinet.tf 3 2013-09-27 01:07:16Z coas-nagasima $
+#  
+# =====================================================================
+
+# =====================================================================
+# tinet_cfg.h ã®çæ
+# =====================================================================
+
+$tinetCfgH = GenFile.new("tinet_cfg.h")
+$tinetCfgH.add("/* tinet_cfg.h */")
+$tinetCfgH.add("#ifndef _TINET_CFG_H_")
+$tinetCfgH.add("#define _TINET_CFG_H_")
+$tinetCfgH.add()
+
+$cfgData[:TCP_CRE_REP].each do |key, params|
+	$tinetCfgH.add("#define #{params[:tcp4_repid]}	#{params[:tcp4_repid].val}")
+end
+$cfgData[:TCP6_CRE_REP].each do |key, params|
+	$tinetCfgH.add("#define #{params[:tcp6_repid]}	#{params[:tcp6_repid].val}")
+end
+$cfgData[:TCP_CRE_CEP].each do |key, params|
+	$tinetCfgH.add("#define #{params[:tcp4_cepid]}	#{params[:tcp4_cepid].val}")
+end
+$cfgData[:TCP6_CRE_CEP].each do |key, params|
+	$tinetCfgH.add("#define #{params[:tcp6_cepid]}	#{params[:tcp6_cepid].val}")
+end
+$cfgData[:UDP_CRE_CEP].each do |key, params|
+	$tinetCfgH.add("#define #{params[:udp4_cepid]}	#{params[:udp4_cepid].val}")
+end
+$cfgData[:UDP6_CRE_CEP].each do |key, params|
+	$tinetCfgH.add("#define #{params[:udp6_cepid]}	#{params[:udp6_cepid].val}")
+end
+$cfgData[:VRID_TCP_REP].each do |key, params|
+	$tinetCfgH.add("#define #{params[:tcp4_repid]}	#{params[:tcp4_repid].val + $cfgData[:TCP_CRE_REP].size}")
+end
+$cfgData[:VRID_TCP_CEP].each do |key, params|
+	$tinetCfgH.add("#define #{params[:tcp4_cepid]}	#{params[:tcp4_cepid].val + $cfgData[:TCP_CRE_CEP].size}")
+end
+$cfgData[:VRID_TCP6_REP].each do |key, params|
+	$tinetCfgH.add("#define #{params[:tcp6_repid]}	#{params[:tcp6_repid].val + $cfgData[:TCP6_CRE_REP].size}")
+end
+$cfgData[:VRID_TCP6_CEP].each do |key, params|
+	$tinetCfgH.add("#define #{params[:tcp6_cepid]}	#{params[:tcp6_cepid].val + $cfgData[:TCP6_CRE_CEP].size}")
+end
+$cfgData[:VRID_UDP_CEP].each do |key, params|
+	$tinetCfgH.add("#define #{params[:udp4_cepid]}	#{params[:udp4_cepid].val + $cfgData[:UDP_CRE_CEP].size}")
+end
+$cfgData[:VRID_UDP6_CEP].each do |key, params|
+	$tinetCfgH.add("#define #{params[:udp6_cepid]}	#{params[:udp6_cepid].val + $cfgData[:UDP6_CRE_CEP].size}")
+end
+$tinetCfgH.add()
+$tinetCfgH.add("#endif /* _TINET_CFG_H_ */")
+
+# =====================================================================
+# tinet_cfg.c ã®çæ
+# =====================================================================
+
+$tinetCfgC = GenFile.new("tinet_cfg.c")
+$tinetCfgC.add(<<EOS)
+/* tinet_cfg.c */
+
+#include <kernel.h>
+#include <sil.h>
+#include "kernel_cfg.h"
+#include "tinet_cfg.h"
+#include <tinet_defs.h>
+#include <tinet_config.h>
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+#include <netinet/in_itron.h>
+#include <netinet/ip.h>
+#include <netinet/ip6.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_timer.h>
+#include <netinet/tcp_var.h>
+#include <netinet/tcp_fsm.h>
+#include <netinet/udp_var.h>
+
+EOS
+# 
+#  ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼
+# 
+$tinetCfgC.add()
+$tinetCfgC.add("/*")
+$tinetCfgC.add(" *  Include Directives (#include)")
+$tinetCfgC.add(" */")
+$tinetCfgC.add()
+$includeFiles.each do |file|
+  $tinetCfgC.add("#include #{file}")
+end
+
+#	// TCP (IPv4) åä»å£
+if $cfgData[:TCP_CRE_REP].size > 0 || $cfgData[:VRID_TCP_REP].size > 0
+	$tinetCfgC.add()
+	$tinetCfgC.add("#define TNUM_TCP_REPID	#{$cfgData[:TCP_CRE_REP].size + $cfgData[:VRID_TCP_REP].size}")
+	$tinetCfgC.add()
+	$tinetCfgC.add("const ID tmax_tcp_repid = (TMIN_TCP_REPID + TNUM_TCP_REPID - 1);")
+	$tinetCfgC.add()
+	$tinetCfgC.add("T_TCP_REP tcp_rep[TNUM_TCP_REPID] = {")
+	$cfgData[:TCP_CRE_REP].each do |key, params|
+		$tinetCfgC.add("\t{")
+			$tinetCfgC.add("\t\t#{params[:tcp4_repatr]},")
+			$tinetCfgC.add("\t\t{ #{params[:ipv4addr]}, #{params[:portno]} },")
+	$tinetCfgC.add("#if defined(TCP_CFG_EXTENTIONS)")
+			$tinetCfgC.add("\t\tTCP_REP_FLG_VALID,")
+			$tinetCfgC.add("\t\tSEM_TCP_REP_LOCK#{params[:tcp4_repid].val},")
+	$tinetCfgC.add("#endif")
+			$tinetCfgC.add("\t\t},")
+	end
+	$cfgData[:VRID_TCP_REP].each do |key, params|
+		$tinetCfgC.add("\t{")
+			$tinetCfgC.add("\t\t0,")
+			$tinetCfgC.add("\t\t{ IPV4_ADDRANY, TCP_PORTANY },")
+	$tinetCfgC.add("#if defined(TCP_CFG_EXTENTIONS)")
+			$tinetCfgC.add("\t\tTCP_REP_FLG_DYNAMIC,")
+			$tinetCfgC.add("\t\tSEM_TCP_REP_LOCK#{params[:tcp4_repid].val + $cfgData[:TCP_CRE_REP].size},")
+	$tinetCfgC.add("#endif")
+			$tinetCfgC.add("\t\t},")
+	end
+		$tinetCfgC.add("\t};")
+end
+
+#	// TCP (IPv6) åä»å£
+if $cfgData[:TCP6_CRE_REP].size > 0 || $cfgData[:VRID_TCP6_REP].size > 0
+	$tinetCfgC.add()
+	$tinetCfgC.add("#define TNUM_TCP_REPID	#{$cfgData[:TCP6_CRE_REP].size + $cfgData[:VRID_TCP6_REP].size}")
+	$tinetCfgC.add()
+	$tinetCfgC.add("const ID tmax_tcp_repid = (TMIN_TCP_REPID + TNUM_TCP_REPID - 1);")
+	$tinetCfgC.add()
+	$tinetCfgC.add("T_TCP6_REP tcp_rep[TNUM_TCP_REPID] = {")
+	$cfgData[:TCP6_CRE_REP].each do |key, params|
+		$tinetCfgC.add("\t{")
+			$tinetCfgC.add("\t\t#{params[:tcp6_repatr]},")
+			$tinetCfgC.add("\t\t{ #{params[:ipv6addr]}, #{params[:portno]} },")
+	$tinetCfgC.add("#if defined(TCP_CFG_EXTENTIONS)")
+			$tinetCfgC.add("\t\tTCP_REP_FLG_VALID,")
+			$tinetCfgC.add("\t\tSEM_TCP_REP_LOCK#{params[:tcp6_repid].val},")
+	$tinetCfgC.add("#endif")
+			$tinetCfgC.add("\t\t},")
+	end
+	$cfgData[:VRID_TCP6_REP].each do |key, params|
+		$tinetCfgC.add("\t{")
+			$tinetCfgC.add("\t\t0,")
+			$tinetCfgC.add("\t\t{ IPV6_ADDRANY, TCP_PORTANY },")
+	$tinetCfgC.add("#if defined(TCP_CFG_EXTENTIONS)")
+			$tinetCfgC.add("\t\tTCP_REP_FLG_DYNAMIC,")
+			$tinetCfgC.add("\t\tSEM_TCP_REP_LOCK#{params[:tcp6_repid].val + $cfgData[:TCP6_CRE_REP].size},")
+	$tinetCfgC.add("#endif")
+			$tinetCfgC.add("\t\t},")
+	end
+		$tinetCfgC.add("\t};")
+end
+
+#	// TCP (IPv4) éä¿¡ç«¯ç¹
+if $cfgData[:TCP_CRE_CEP].size > 0 || $cfgData[:VRID_TCP_CEP].size > 0
+	$tinetCfgC.add()
+	$tinetCfgC.add("#define TNUM_TCP_CEPID	#{$cfgData[:TCP_CRE_CEP].size + $cfgData[:VRID_TCP_CEP].size}")
+	$tinetCfgC.add()
+	$tinetCfgC.add("const ID tmax_tcp_cepid = (TMIN_TCP_CEPID + TNUM_TCP_CEPID - 1);")
+	$tinetCfgC.add()
+	$tinetCfgC.add("T_TCP_CEP tcp_cep[TNUM_TCP_CEPID] = {")
+	$cfgData[:TCP_CRE_CEP].each do |key, params|
+		$tinetCfgC.add("\t{")
+			$tinetCfgC.add("\t\t#{params[:tcp4_cepatr]},")
+			$tinetCfgC.add("\t\t(void*)#{params[:sbuf]},")
+			$tinetCfgC.add("\t\t#{params[:sbufsz]},")
+			$tinetCfgC.add("\t\t(void*)#{params[:rbuf]},")
+			$tinetCfgC.add("\t\t#{params[:rbufsz]},")
+			$tinetCfgC.add("\t\t(t_tcp_callback)(FP)#{params[:callback]},")
+			$tinetCfgC.add("\t\tTCP_CEP_FLG_VALID,")
+			$tinetCfgC.add("\t\tSEM_TCP_CEP_LOCK#{params[:tcp4_cepid].val},")
+			$tinetCfgC.add("\t\tFLG_TCP_CEP_EST#{params[:tcp4_cepid].val},")
+			$tinetCfgC.add("\t\tFLG_TCP_CEP_SND#{params[:tcp4_cepid].val},")
+			$tinetCfgC.add("\t\tFLG_TCP_CEP_RCV#{params[:tcp4_cepid].val},")
+			$tinetCfgC.add("\t\t},")
+	end
+	$cfgData[:VRID_TCP_CEP].each do |key, params|
+		$tinetCfgC.add("\t{")
+			$tinetCfgC.add("\t\t0,")
+			$tinetCfgC.add("\t\t(void*)NULL,")
+			$tinetCfgC.add("\t\t0,")
+			$tinetCfgC.add("\t\t(void*)NULL,")
+			$tinetCfgC.add("\t\t0,")
+			$tinetCfgC.add("\t\t(t_tcp_callback)(FP)NULL,")
+			$tinetCfgC.add("\t\tTCP_CEP_FLG_DYNAMIC,")
+			$tinetCfgC.add("\t\tSEM_TCP_CEP_LOCK#{params[:tcp4_cepid].val + $cfgData[:TCP_CRE_CEP].size},")
+			$tinetCfgC.add("\t\tFLG_TCP_CEP_EST#{params[:tcp4_cepid].val + $cfgData[:TCP_CRE_CEP].size},")
+			$tinetCfgC.add("\t\tFLG_TCP_CEP_SND#{params[:tcp4_cepid].val + $cfgData[:TCP_CRE_CEP].size},")
+			$tinetCfgC.add("\t\tFLG_TCP_CEP_RCV#{params[:tcp4_cepid].val + $cfgData[:TCP_CRE_CEP].size},")
+			$tinetCfgC.add("\t\t},")
+	end
+		$tinetCfgC.add("\t};")
+end
+
+#	// TCP (IPv6) éä¿¡ç«¯ç¹
+if $cfgData[:TCP6_CRE_CEP].size > 0 || $cfgData[:VRID_TCP6_CEP].size > 0
+	$tinetCfgC.add()
+	$tinetCfgC.add("#define TNUM_TCP_CEPID	#{$cfgData[:TCP6_CRE_CEP].size + $cfgData[:VRID_TCP6_CEP].size}")
+	$tinetCfgC.add()
+	$tinetCfgC.add("const ID tmax_tcp_cepid = (TMIN_TCP_CEPID + TNUM_TCP_CEPID - 1);")
+	$tinetCfgC.add()
+	$tinetCfgC.add("T_TCP6_CEP tcp_cep[TNUM_TCP_CEPID] = {")
+	$cfgData[:TCP6_CRE_CEP].each do |key, params|
+		$tinetCfgC.add("\t{")
+			$tinetCfgC.add("\t\t#{params[:tcp6_cepatr]},")
+			$tinetCfgC.add("\t\t(void*)#{params[:sbuf]},")
+			$tinetCfgC.add("\t\t#{params[:sbufsz]},")
+			$tinetCfgC.add("\t\t(void*)#{params[:rbuf]},")
+			$tinetCfgC.add("\t\t#{params[:rbufsz]},")
+			$tinetCfgC.add("\t\t(t_tcp_callback)(FP)#{params[:callback]},")
+			$tinetCfgC.add("\t\tTCP_CEP_FLG_VALID,")
+			$tinetCfgC.add("\t\tSEM_TCP_CEP_LOCK#{params[:tcp6_cepid].val},")
+			$tinetCfgC.add("\t\tFLG_TCP_CEP_EST#{params[:tcp6_cepid].val},")
+			$tinetCfgC.add("\t\tFLG_TCP_CEP_SND#{params[:tcp6_cepid].val},")
+			$tinetCfgC.add("\t\tFLG_TCP_CEP_RCV#{params[:tcp6_cepid].val},")
+			$tinetCfgC.add("\t\t},")
+	end
+	$cfgData[:VRID_TCP6_CEP].each do |key, params|
+		$tinetCfgC.add("\t{")
+			$tinetCfgC.add("\t\t0,")
+			$tinetCfgC.add("\t\t(void*)NULL,")
+			$tinetCfgC.add("\t\t0,")
+			$tinetCfgC.add("\t\t(void*)NULL,")
+			$tinetCfgC.add("\t\t0,")
+			$tinetCfgC.add("\t\t(t_tcp_callback)(FP)NULL,")
+			$tinetCfgC.add("\t\tTCP_CEP_FLG_DYNAMIC,")
+			$tinetCfgC.add("\t\tSEM_TCP_CEP_LOCK#{params[:tcp6_cepid].val + $cfgData[:TCP6_CRE_CEP].size},")
+			$tinetCfgC.add("\t\tFLG_TCP_CEP_EST#{params[:tcp6_cepid].val + $cfgData[:TCP6_CRE_CEP].size},")
+			$tinetCfgC.add("\t\tFLG_TCP_CEP_SND#{params[:tcp6_cepid].val + $cfgData[:TCP6_CRE_CEP].size},")
+			$tinetCfgC.add("\t\tFLG_TCP_CEP_RCV#{params[:tcp6_cepid].val + $cfgData[:TCP6_CRE_CEP].size},")
+			$tinetCfgC.add("\t\t},")
+	end
+		$tinetCfgC.add("\t};")
+end
+
+#	// UDP (IPv4) éä¿¡ç«¯ç¹
+if $cfgData[:UDP_CRE_CEP].size > 0 || $cfgData[:VRID_UDP_CEP].size > 0
+	$tinetCfgC.add()
+	$tinetCfgC.add("#define TNUM_UDP_CEPID	#{$cfgData[:UDP_CRE_CEP].size + $cfgData[:VRID_UDP_CEP].size}")
+	$tinetCfgC.add()
+	$tinetCfgC.add("const ID tmax_udp_cepid = (TMIN_UDP_CEPID + TNUM_UDP_CEPID - 1);")
+	$tinetCfgC.add()
+	$tinetCfgC.add("T_UDP_CEP udp_cep[TNUM_UDP_CEPID] = {")
+	$cfgData[:UDP_CRE_CEP].each do |key, params|
+		$tinetCfgC.add("\t{")
+			$tinetCfgC.add("\t\t#{params[:udp4_cepatr]},")
+			$tinetCfgC.add("\t\t{ #{params[:ipv4addr]}, #{params[:portno]} },")
+			$tinetCfgC.add("\t\t(t_udp_callback)(FP)#{params[:callback]},")
+			$tinetCfgC.add("\t\tUDP_CEP_FLG_VALID,")
+			$tinetCfgC.add("\t\tSEM_UDP_CEP_LOCK#{params[:udp4_cepid].val},")
+			$tinetCfgC.add("\t\tTA_NULL,")
+			$tinetCfgC.add("\t\tTA_NULL,")
+			$tinetCfgC.add("\t\tDTQ_UDP_RCVQ#{params[:udp4_cepid].val},")
+			$tinetCfgC.add("\t\t},")
+	end
+	$cfgData[:VRID_UDP_CEP].each do |key, params|
+		$tinetCfgC.add("\t{")
+			$tinetCfgC.add("\t\t0,")
+			$tinetCfgC.add("\t\t{ IPV4_ADDRANY, UDP_PORTANY },")
+			$tinetCfgC.add("\t\t(t_udp_callback)(FP)NULL,")
+			$tinetCfgC.add("\t\tUDP_CEP_FLG_DYNAMIC,")
+			$tinetCfgC.add("\t\tSEM_UDP_CEP_LOCK#{params[:udp4_cepid].val + $cfgData[:UDP_CRE_CEP].size},")
+			$tinetCfgC.add("\t\tTA_NULL,")
+			$tinetCfgC.add("\t\tTA_NULL,")
+			$tinetCfgC.add("\t\tDTQ_UDP_RCVQ#{params[:udp4_cepid].val + $cfgData[:UDP_CRE_CEP].size},")
+			$tinetCfgC.add("\t\t},")
+	end
+		$tinetCfgC.add("\t};")
+end
+
+#	// UDP (IPv6) éä¿¡ç«¯ç¹
+if $cfgData[:UDP6_CRE_CEP].size > 0 || $cfgData[:VRID_UDP6_CEP].size > 0
+	$tinetCfgC.add()
+	$tinetCfgC.add("#define TNUM_UDP_CEPID	#{cfgData[:UDP6_CRE_CEP].size + $cfgData[:VRID_UDP6_CEP].size}")
+	$tinetCfgC.add()
+	$tinetCfgC.add("const ID tmax_udp_cepid = (TMIN_UDP_CEPID + TNUM_UDP_CEPID - 1);")
+	$tinetCfgC.add()
+	$tinetCfgC.add("T_UDP6_CEP udp_cep[TNUM_UDP_CEPID] = {")
+	$cfgData[:UDP6_CRE_CEP].each do |key, params|
+		$tinetCfgC.add("\t{")
+			$tinetCfgC.add("\t\t#{params[:udp6_cepatr]},")
+			$tinetCfgC.add("\t\t{ #{params[:ipv6addr]}, #{params[:portno]} },")
+			$tinetCfgC.add("\t\t(t_udp_callback)(FP)#{params[:callback]},")
+			$tinetCfgC.add("\t\tUDP_CEP_FLG_VALID,")
+			$tinetCfgC.add("\t\tSEM_UDP_CEP_LOCK#{params[:udp6_cepid].val},")
+			$tinetCfgC.add("\t\tTA_NULL,")
+			$tinetCfgC.add("\t\tTA_NULL,")
+			$tinetCfgC.add("\t\tDTQ_UDP_RCVQ#{params[:udp6_cepid].val},")
+			$tinetCfgC.add("\t\t},")
+	end
+	$cfgData[:VRID_UDP6_CEP].each do |key, params|
+		$tinetCfgC.add("\t{")
+			$tinetCfgC.add("\t\t0,")
+			$tinetCfgC.add("\t\t{ IPV6_ADDRANY, UDP_PORTANY },")
+			$tinetCfgC.add("\t\t(t_udp_callback)(FP)NULL,")
+			$tinetCfgC.add("\t\tUDP_CEP_FLG_DYNAMIC,")
+			$tinetCfgC.add("\t\tSEM_UDP_CEP_LOCK#{params[:udp6_cepid].val + $cfgData[:UDP6_CRE_CEP].size},")
+			$tinetCfgC.add("\t\tTA_NULL,")
+			$tinetCfgC.add("\t\tTA_NULL,")
+			$tinetCfgC.add("\t\tDTQ_UDP_RCVQ#{params[:udp6_cepid].val + $cfgData[:UDP6_CRE_CEP].size},")
+			$tinetCfgC.add("\t\t},")
+	end
+		$tinetCfgC.add("\t};")
+end
+
+# =====================================================================
+# tinet_kern.cfg ã®çæ
+# =====================================================================
+
+#	// TCP (IPv4) åä»å£
+if $cfgData[:TCP_CRE_REP].size > 0 || $cfgData[:VRID_TCP_REP].size > 0
+	$cfgData[:TCP_CRE_REP].each do |key, params|
+		cfgInfo = { APINAME: "CRE_SEM" }
+		cfgInfo["semid"] = "SEM_TCP_REP_LOCK#{params[:tcp4_repid].val}"
+		cfgInfo["sematr"] = NumStr.new($TA_TPRI, "TA_TPRI")
+		cfgInfo["isemcnt"] = 1
+		cfgInfo["maxsem"] = 1
+		$cfgFileInfo.push(cfgInfo)
+	end
+	$cfgData[:VRID_TCP_REP].each do |key, params|
+		cfgInfo = { APINAME: "CRE_SEM" }
+		cfgInfo["semid"] = "SEM_TCP_REP_LOCK#{params[:tcp4_repid].val + $cfgData[:TCP_CRE_REP].size}"
+		cfgInfo["sematr"] = NumStr.new($TA_TPRI, "TA_TPRI")
+		cfgInfo["isemcnt"] = 1
+		cfgInfo["maxsem"] = 1
+		$cfgFileInfo.push(cfgInfo)
+	end
+end
+
+#	// TCP (IPv6) åä»å£
+if $cfgData[:TCP6_CRE_REP].size > 0 || $cfgData[:VRID_TCP6_REP].size > 0
+	$cfgData[:TCP6_CRE_REP].each do |key, params|
+		cfgInfo = { APINAME: "CRE_SEM" }
+		cfgInfo["semid"] = "SEM_TCP_REP_LOCK#{params[:tcp6_repid].val}"
+		cfgInfo["sematr"] = NumStr.new($TA_TPRI, "TA_TPRI")
+		cfgInfo["isemcnt"] = 1
+		cfgInfo["maxsem"] = 1
+		$cfgFileInfo.push(cfgInfo)
+	end
+	$cfgData[:VRID_TCP6_REP].each do |key, params|
+		cfgInfo = { APINAME: "CRE_SEM" }
+		cfgInfo["semid"] = "SEM_TCP_REP_LOCK#{params[:tcp6_repid].val + $cfgData[:TCP6_CRE_REP].size}"
+		cfgInfo["sematr"] = NumStr.new($TA_TPRI, "TA_TPRI")
+		cfgInfo["isemcnt"] = 1
+		cfgInfo["maxsem"] = 1
+		$cfgFileInfo.push(cfgInfo)
+	end
+end
+
+#	// TCP (IPv4) éä¿¡ç«¯ç¹
+if $cfgData[:TCP_CRE_CEP].size > 0 || $cfgData[:VRID_TCP_CEP].size > 0
+	$cfgData[:TCP_CRE_CEP].each do |key, params|
+		cfgInfo = { APINAME: "CRE_SEM" }
+		cfgInfo["semid"] = "SEM_TCP_CEP_LOCK#{params[:tcp4_cepid].val}"
+		cfgInfo["sematr"] = NumStr.new($TA_TPRI, "TA_TPRI")
+		cfgInfo["isemcnt"] = 1
+		cfgInfo["maxsem"] = 1
+		$cfgFileInfo.push(cfgInfo)
+
+		cfgInfo = { APINAME: "CRE_FLG" }
+		cfgInfo["flgid"] = "FLG_TCP_CEP_EST#{params[:tcp4_cepid].val}"
+		cfgInfo["flgatr"] = NumStr.new($TA_TFIFO | $TA_WSGL, "TA_TFIFO|TA_WSGL")
+		cfgInfo["iflgptn"] = NumStr.new($TCP_CEP_EVT_CLOSED, "TCP_CEP_EVT_CLOSED")
+		$cfgFileInfo.push(cfgInfo)
+
+		cfgInfo = { APINAME: "CRE_FLG" }
+		cfgInfo["flgid"] = "FLG_TCP_CEP_SND#{params[:tcp4_cepid].val}"
+		cfgInfo["flgatr"] = NumStr.new($TA_TFIFO | $TA_WSGL, "TA_TFIFO|TA_WSGL")
+		cfgInfo["iflgptn"] = NumStr.new($TCP_CEP_EVT_CLOSED, "TCP_CEP_EVT_CLOSED")
+		$cfgFileInfo.push(cfgInfo)
+
+		cfgInfo = { APINAME: "CRE_FLG" }
+		cfgInfo["flgid"] = "FLG_TCP_CEP_RCV#{params[:tcp4_cepid].val}"
+		cfgInfo["flgatr"] = NumStr.new($TA_TFIFO | $TA_WSGL, "TA_TFIFO|TA_WSGL")
+		cfgInfo["iflgptn"] = NumStr.new($TCP_CEP_EVT_CLOSED, "TCP_CEP_EVT_CLOSED")
+		$cfgFileInfo.push(cfgInfo)
+	end
+	$cfgData[:VRID_TCP_CEP].each do |key, params|
+		cfgInfo = { APINAME: "CRE_SEM" }
+		cfgInfo["semid"] = "SEM_TCP_CEP_LOCK#{params[:tcp4_cepid].val + $cfgData[:TCP_CRE_CEP].size}"
+		cfgInfo["sematr"] = NumStr.new($TA_TPRI, "TA_TPRI")
+		cfgInfo["isemcnt"] = 1
+		cfgInfo["maxsem"] = 1
+		$cfgFileInfo.push(cfgInfo)
+
+		cfgInfo = { APINAME: "CRE_FLG" }
+		cfgInfo["flgid"] = "FLG_TCP_CEP_EST#{params[:tcp4_cepid].val + $cfgData[:TCP_CRE_CEP].size}"
+		cfgInfo["flgatr"] = NumStr.new($TA_TFIFO | $TA_WSGL, "TA_TFIFO|TA_WSGL")
+		cfgInfo["iflgptn"] = NumStr.new($TCP_CEP_EVT_CLOSED, "TCP_CEP_EVT_CLOSED")
+		$cfgFileInfo.push(cfgInfo)
+
+		cfgInfo = { APINAME: "CRE_FLG" }
+		cfgInfo["flgid"] = "FLG_TCP_CEP_SND#{params[:tcp4_cepid].val + $cfgData[:TCP_CRE_CEP].size}"
+		cfgInfo["flgatr"] = NumStr.new($TA_TFIFO | $TA_WSGL, "TA_TFIFO|TA_WSGL")
+		cfgInfo["iflgptn"] = NumStr.new($TCP_CEP_EVT_CLOSED, "TCP_CEP_EVT_CLOSED")
+		$cfgFileInfo.push(cfgInfo)
+
+		cfgInfo = { APINAME: "CRE_FLG" }
+		cfgInfo["flgid"] = "FLG_TCP_CEP_RCV#{params[:tcp4_cepid].val + $cfgData[:TCP_CRE_CEP].size}"
+		cfgInfo["flgatr"] = NumStr.new($TA_TFIFO | $TA_WSGL, "TA_TFIFO|TA_WSGL")
+		cfgInfo["iflgptn"] = NumStr.new($TCP_CEP_EVT_CLOSED, "TCP_CEP_EVT_CLOSED")
+		$cfgFileInfo.push(cfgInfo)
+	end
+end
+
+#	// TCP (IPv6) éä¿¡ç«¯ç¹
+if $cfgData[:TCP6_CRE_CEP].size > 0 || $cfgData[:VRID_TCP6_CEP].size > 0
+	$cfgData[:TCP6_CRE_CEP].each do |key, params|
+		cfgInfo = { APINAME: "CRE_SEM" }
+		cfgInfo["semid"] = "SEM_TCP_CEP_LOCK#{params[:tcp6_cepid].val}"
+		cfgInfo["sematr"] = NumStr.new($TA_TPRI, "TA_TPRI")
+		cfgInfo["isemcnt"] = 1
+		cfgInfo["maxsem"] = 1
+		$cfgFileInfo.push(cfgInfo)
+
+		cfgInfo = { APINAME: "CRE_FLG" }
+		cfgInfo["flgid"] = "FLG_TCP_CEP_EST#{params[:tcp6_cepid].val}"
+		cfgInfo["flgatr"] = NumStr.new($TA_TFIFO | $TA_WSGL, "TA_TFIFO|TA_WSGL")
+		cfgInfo["iflgptn"] = NumStr.new($TCP_CEP_EVT_CLOSED, "TCP_CEP_EVT_CLOSED")
+		$cfgFileInfo.push(cfgInfo)
+
+		cfgInfo = { APINAME: "CRE_FLG" }
+		cfgInfo["flgid"] = "FLG_TCP_CEP_SND#{params[:tcp6_cepid].val}"
+		cfgInfo["flgatr"] = NumStr.new($TA_TFIFO | $TA_WSGL, "TA_TFIFO|TA_WSGL")
+		cfgInfo["iflgptn"] = NumStr.new($TCP_CEP_EVT_CLOSED, "TCP_CEP_EVT_CLOSED")
+		$cfgFileInfo.push(cfgInfo)
+
+		cfgInfo = { APINAME: "CRE_FLG" }
+		cfgInfo["flgid"] = "FLG_TCP_CEP_RCV#{params[:tcp6_cepid].val}"
+		cfgInfo["flgatr"] = NumStr.new($TA_TFIFO | $TA_WSGL, "TA_TFIFO|TA_WSGL")
+		cfgInfo["iflgptn"] = NumStr.new($TCP_CEP_EVT_CLOSED, "TCP_CEP_EVT_CLOSED")
+		$cfgFileInfo.push(cfgInfo)
+	end
+	$cfgData[:VRID_TCP6_CEP].each do |key, params|
+		cfgInfo = { APINAME: "CRE_SEM" }
+		cfgInfo["semid"] = "SEM_TCP_CEP_LOCK#{params[:tcp6_cepid].val + $cfgData[:TCP6_CRE_CEP].size}"
+		cfgInfo["sematr"] = NumStr.new($TA_TPRI, "TA_TPRI")
+		cfgInfo["isemcnt"] = 1
+		cfgInfo["maxsem"] = 1
+		$cfgFileInfo.push(cfgInfo)
+
+		cfgInfo = { APINAME: "CRE_FLG" }
+		cfgInfo["flgid"] = "FLG_TCP_CEP_EST#{params[:tcp6_cepid].val + $cfgData[:TCP6_CRE_CEP].size}"
+		cfgInfo["flgatr"] = NumStr.new($TA_TFIFO | $TA_WSGL, "TA_TFIFO|TA_WSGL")
+		cfgInfo["iflgptn"] = NumStr.new($TCP_CEP_EVT_CLOSED, "TCP_CEP_EVT_CLOSED")
+		$cfgFileInfo.push(cfgInfo)
+
+		cfgInfo = { APINAME: "CRE_FLG" }
+		cfgInfo["flgid"] = "FLG_TCP_CEP_SND#{params[:tcp6_cepid].val + $cfgData[:TCP6_CRE_CEP].size}"
+		cfgInfo["flgatr"] = NumStr.new($TA_TFIFO | $TA_WSGL, "TA_TFIFO|TA_WSGL")
+		cfgInfo["iflgptn"] = NumStr.new($TCP_CEP_EVT_CLOSED, "TCP_CEP_EVT_CLOSED")
+		$cfgFileInfo.push(cfgInfo)
+
+		cfgInfo = { APINAME: "CRE_FLG" }
+		cfgInfo["flgid"] = "FLG_TCP_CEP_RCV#{params[:tcp6_cepid].val + $cfgData[:TCP6_CRE_CEP].size}"
+		cfgInfo["flgatr"] = NumStr.new($TA_TFIFO | $TA_WSGL, "TA_TFIFO|TA_WSGL")
+		cfgInfo["iflgptn"] = NumStr.new($TCP_CEP_EVT_CLOSED, "TCP_CEP_EVT_CLOSED")
+		$cfgFileInfo.push(cfgInfo)
+	end
+end
+
+#	// UDP (IPv4) éä¿¡ç«¯ç¹
+if $cfgData[:UDP_CRE_CEP].size > 0 || $cfgData[:VRID_UDP_CEP].size > 0
+	$cfgData[:UDP_CRE_CEP].each do |key, params|
+		cfgInfo = { APINAME: "CRE_SEM" }
+		cfgInfo["semid"] = "SEM_UDP_CEP_LOCK#{params[:udp4_cepid].val}"
+		cfgInfo["sematr"] = NumStr.new($TA_TPRI, "TA_TPRI")
+		cfgInfo["isemcnt"] = 1
+		cfgInfo["maxsem"] = 1
+		$cfgFileInfo.push(cfgInfo)
+
+		cfgInfo = { APINAME: "CRE_DTQ" }
+		cfgInfo["dtqid"] = "DTQ_UDP_RCVQ#{params[:udp4_cepid].val}"
+		cfgInfo["dtqatr"] = NumStr.new($TA_TFIFO, "TA_TFIFO")
+		cfgInfo["dtqcnt"] = NumStr.new($NUM_DTQ_UDP_RCVQ, "NUM_DTQ_UDP_RCVQ")
+		#cfgInfo["dtqmb"] = NumStr.new($NULL, "NULL")
+		$cfgFileInfo.push(cfgInfo)
+	end
+	$cfgData[:VRID_UDP_CEP].each do |key, params|
+		cfgInfo = { APINAME: "CRE_SEM" }
+		cfgInfo["semid"] = "SEM_UDP_CEP_LOCK#{params[:udp4_cepid].val + $cfgData[:UDP_CRE_CEP].size}"
+		cfgInfo["sematr"] = NumStr.new($TA_TPRI, "TA_TPRI")
+		cfgInfo["isemcnt"] = 1
+		cfgInfo["maxsem"] = 1
+		$cfgFileInfo.push(cfgInfo)
+
+		cfgInfo = { APINAME: "CRE_DTQ" }
+		cfgInfo["dtqid"] = "DTQ_UDP_RCVQ#{params[:udp4_cepid].val + $cfgData[:UDP_CRE_CEP].size}"
+		cfgInfo["dtqatr"] = NumStr.new($TA_TFIFO, "TA_TFIFO")
+		cfgInfo["dtqcnt"] = NumStr.new($NUM_DTQ_UDP_RCVQ, "NUM_DTQ_UDP_RCVQ")
+		#cfgInfo["dtqmb"] = NumStr.new($NULL, "NULL")
+		$cfgFileInfo.push(cfgInfo)
+	end
+end
+
+#	// UDP (IPv6) éä¿¡ç«¯ç¹
+if $cfgData[:UDP6_CRE_CEP].size > 0 || $cfgData[:VRID_UDP6_CEP].size > 0
+	$cfgData[:UDP6_CRE_CEP].each do |key, params|
+		cfgInfo = { APINAME: "CRE_SEM" }
+		cfgInfo["semid"] = "SEM_UDP_CEP_LOCK#{params[:udp6_cepid].val}"
+		cfgInfo["sematr"] = NumStr.new($TA_TPRI, "TA_TPRI")
+		cfgInfo["isemcnt"] = 1
+		cfgInfo["maxsem"] = 1
+		$cfgFileInfo.push(cfgInfo)
+
+		cfgInfo = { APINAME: "CRE_DTQ" }
+		cfgInfo["dtqid"] = "DTQ_UDP_RCVQ#{params[:udp6_cepid].val}"
+		cfgInfo["dtqatr"] = NumStr.new($TA_TFIFO, "TA_TFIFO")
+		cfgInfo["dtqcnt"] = NumStr.new($NUM_DTQ_UDP_RCVQ, "NUM_DTQ_UDP_RCVQ")
+		#cfgInfo["dtqmb"] = NumStr.new($NULL, "NULL")
+		$cfgFileInfo.push(cfgInfo)
+	end
+	$cfgData[:VRID_UDP6_CEP].each do |key, params|
+		cfgInfo = { APINAME: "CRE_SEM" }
+		cfgInfo["semid"] = "SEM_UDP_CEP_LOCK#{params[:udp6_cepid].val + $cfgData[:UDP6_CRE_CEP].size}"
+		cfgInfo["sematr"] = NumStr.new($TA_TPRI, "TA_TPRI")
+		cfgInfo["isemcnt"] = 1
+		cfgInfo["maxsem"] = 1
+		$cfgFileInfo.push(cfgInfo)
+
+		cfgInfo = { APINAME: "CRE_DTQ" }
+		cfgInfo["dtqid"] = "DTQ_UDP_RCVQ#{params[:udp6_cepid].val + $cfgData[:UDP6_CRE_CEP].size}"
+		cfgInfo["dtqatr"] = NumStr.new($TA_TFIFO, "TA_TFIFO")
+		cfgInfo["dtqcnt"] = NumStr.new($NUM_DTQ_UDP_RCVQ, "NUM_DTQ_UDP_RCVQ")
+		#cfgInfo["dtqmb"] = NumStr.new($NULL, "NULL")
+		$cfgFileInfo.push(cfgInfo)
+	end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/tinet_asp.cfg
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/tinet_asp.cfg	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/tinet_asp.cfg	(revision 270)
@@ -0,0 +1,90 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2007 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  TINET ã®æ¨æºã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#include <itron.h>
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <net/if.h>
+#include <net/if_ppp.h>
+#include <net/if_loop.h>
+#include <net/ethernet.h>
+#include <net/if_arp.h>
+#include <net/net.h>
+#include <net/net_buf.h>
+#include <net/net_timer.h>
+#include <net/ppp_var.h>
+#include <net/ether_var.h>
+#include <netinet/in.h>
+#include <netinet/ip.h>
+#include <netinet/ip6.h>
+#include <netinet/ip_var.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_timer.h>
+#include <netinet/tcp_var.h>
+#include <netinet/udp_var.h>
+#include <netinet6/in6.h>
+#include <netinet6/ip6_var.h>
+
+/*
+ *  TINET ãã­ãã³ã«ã¹ã¿ãã¯å
+é¨ã®ã«ã¼ãã«ãªãã¸ã§ã¯ãã®æå®
+ */
+
+INCLUDE("nic_asp.cfg");
+
+INCLUDE("net/net_asp.cfg");
+
+INCLUDE("net/ethernet.cfg");
+INCLUDE("netinet/if_ether.cfg");
+INCLUDE("netinet/ip.cfg");
+INCLUDE("netinet/tcp.cfg");
+INCLUDE("netinet/udp.cfg");
+INCLUDE("netinet6/ip6.cfg");
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/tinet_asp_configure
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/tinet_asp_configure	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/tinet_asp_configure	(revision 270)
@@ -0,0 +1,488 @@
+#! /usr/bin/perl
+#
+#   TINET (TCP/IP Protocol Stack)
+#  
+#  Copyright (C) 2001-2003 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2006-2008 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2001-2007 by Dep. of Computer Science and Engineering
+#                   Tomakomai National College of Technology, JAPAN
+# 
+#  上記著作権者は，以下の(1)〜(4)の条件を満たす場合に限り，本ソフトウェ
+#  ア（本ソフトウェアを改変したものを含む．以下同じ）を使用・複製・改
+#  変・再配布（以下，利用と呼ぶ）することを無償で許諾する．
+#  (1) 本ソフトウェアをソースコードの形で利用する場合には，上記の著作
+#      権表示，この利用条件および下記の無保証規定が，そのままの形でソー
+#      スコード中に含まれていること．
+#  (2) 本ソフトウェアを，ライブラリ形式など，他のソフトウェア開発に使
+#      用できる形で再配布する場合には，再配布に伴うドキュメント（利用
+#      者マニュアルなど）に，上記の著作権表示，この利用条件および下記
+#      の無保証規定を掲載すること．
+#  (3) 本ソフトウェアを，機器に組み込むなど，他のソフトウェア開発に使
+#      用できない形で再配布する場合には，次のいずれかの条件を満たすこ
+#      と．
+#    (a) 再配布に伴うドキュメント（利用者マニュアルなど）に，上記の著
+#        作権表示，この利用条件および下記の無保証規定を掲載すること．
+#  (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
+#      害からも，上記著作権者およびTOPPERSプロジェクトを免責すること．
+#      また，本ソフトウェアのユーザまたはエンドユーザからのいかなる理
+#      由に基づく請求からも，上記著作権者およびTOPPERSプロジェクトを
+#      免責すること．
+# 
+#  本ソフトウェアは，無保証で提供されているものである．上記著作権者お
+#  よびTOPPERSプロジェクトは，本ソフトウェアに関して，特定の使用目的
+#  に対する適合性も含めて，いかなる保証も行わない．また，本ソフトウェ
+#  アの利用により直接的または間接的に生じたいかなる損害に関しても，そ
+#  の責任を負わない．
+# 
+#  @(#) $Id: tinet_asp_configure,v 1.5 2009/12/24 06:42:46 abe Exp abe $
+# 
+
+require "getopt.pl";
+
+#  オプションの定義
+#
+#  -T <target>		ターゲット名（必須）
+#  -A <applname>	アプリケーションプログラム名
+#  -a <appldir>		アプリケーションのディレクトリ名
+#  -U <applobjs>	他のアプリケーションプログラムファイル
+#			（.oファイル名で指定．複数指定可）
+#  -L <kernel_lib>	カーネルライブラリ（libkernel.a）のディレクトリ名
+#			（省略した場合，カーネルライブラリもmakeする）
+#  -f			カーネルを関数単位でコンパイルするかどうかの指定
+#  -D <srcdir>		カーネル等のソースの置かれているディレクトリ
+#  -l <srclang>		プログラミング言語（現時点ではcとc++のみサポート）
+#  -t <templatedir>	テンプレートディレクトリを指定（デフォルトはtinet/asp_sample）
+#  -d <dbgenv>		実行環境の名称
+#  -r			トレースログ記録のサンプルコードを使用するかどうかの指定
+#  -p <perl>		perlのパス名（明示的に指定する場合）
+#  -g <cfg>		コンフィギュレータ（cfg）のパス名
+#  -e <tinetdir>	TINET のソースの置かれているディレクトリ
+#  -i <net_if>		ネットワークインタフェース（必須）
+#			ether、ppp、loop の何れかを指定する。
+#  -v <net_dev>		イーサネット・ディバイスドライバ
+#  			（ネットワークインタフェースに ether を指定した場合は必須）
+#  -n <net_proto>	ネットワーク層プロトコル（必須）
+#			inet4、inet6 の何れかを指定する。
+#  -s <trans_proto>	トランスポート層プロトコル（必須）
+#			tcp、udp、tcp/udp の何れかを指定する。
+
+#  使用例(1)
+#
+#  % ../tinet/tinet_asp_configure -T akih8_3069f_gcc -A echos4 -i ether -v if_ed -n inet4 -s tcp
+
+#
+#  オプションの処理
+#
+do Getopt("TAaULDltdpgiensv");
+
+#
+#  変数の初期化
+#
+
+$target = $opt_T;
+$applname = $opt_A ? $opt_A : "";
+$appldir = $opt_a ? $opt_a : "";
+$applobjs = $opt_U ? $opt_U : "";
+$kernel_lib = $opt_L ? $opt_L : "";
+$kernel_funcobjs = $opt_f ? "true" : "";
+$srclang = $opt_l ? $opt_l : "c";
+$templatedir = $opt_t ? $opt_t : "asp_sample";
+$dbgenv = $opt_d ? "TOPPERS_".$opt_d : "";
+$enable_trace = $opt_r ? "true" : "";
+$net_if = $opt_i;
+$net_dev = $opt_v;
+$net_proto = $opt_n;
+$trans_proto = $opt_s;
+$aspsampledir = "sample";
+
+#
+#  オブジェクトファイル名の拡張子を返す
+#
+sub get_objext {
+	local(@uname);
+
+	use POSIX;
+	@uname = do uname();
+	if ($uname[0] =~ /^cygwin/i) {
+		return("exe");
+	}
+	else {
+		return("");
+	}
+}
+
+#
+#  プログラムの場所を検索する
+#
+sub get_path {
+	local($progname, @pathlist) = @_;
+	local($path);
+
+	foreach $path (@pathlist) {
+		if (-x $path."/".$progname) {
+			return($path."/".$progname);
+		}
+	}
+	return("");
+}
+
+#
+#  Makefile を変換する
+#
+sub convMakefileSub {
+	local($infile, $outfile) = @_;
+	local($line, $varname, $varval);
+
+	unless (open(INFILE, $infile)) {
+		print STDERR "tinet_asp_configure: can't open $infile\n";
+		exit(1);
+	}
+	unless (open(OUTFILE, ">> ".$outfile)) {
+		print STDERR "tinet_asp_configure: can't open $outfile\n";
+		exit(1);
+	}
+
+	while ($line = <INFILE>) {
+		chop $line;
+		while ($line =~ /^(.*)\@\(([A-Za-z0-9_]+)\)(.*)$/) {
+			$line = $1.$vartable{$2}.$3;
+		}
+		print OUTFILE $line,"\n";
+	}
+
+	close(INFILE);
+	close(OUTFILE);
+}
+
+#
+#  Makefile を変換する
+#
+sub convMakefile {
+	local($infile, $copyright, $outfile) = @_;
+	local($aspMakefile);
+
+	# Mekfile 有ればリネームする。
+	print STDERR "tinet_asp_configure: Generating $outfile from $infile.\n";
+	if (-f $outfile) {
+		print STDERR "tinet_asp_configure: $outfile exists.",
+						"  Save as $outfile.bak.\n";
+		rename($outfile, $outfile.".bak");
+	}
+
+	# TINET のコピーライトを書き込む
+	&convMakefileSub($copyright, $outfile);
+
+	# 出力する Makefile をオープンする
+	unless (open(OUTFILE, ">> ".$outfile)) {
+		print STDERR "tinet_asp_configure: can't open $outfile\n";
+		exit(1);
+	}
+
+	# 参照する sample/Makefile をオープンする。
+	$aspMakefile = $aspsampledir."/Makefile";
+	unless (open(ASPFILE, $aspMakefile)) {
+		print STDERR "tinet_asp_configure: can't open $aspMakefile\n";
+		exit(1);
+	}
+
+	# 参照する sample/Makefile のコピーライトを読み飛ばす。
+	while ($line = <ASPFILE>) {
+		chop $line;
+		if ($line !~ /^#/) {
+			print OUTFILE $line,"\n";
+			last;
+		}
+	}
+
+	# 'APPLNAME = @(APPLNAME)' の行まで書き込む
+	while ($line = <ASPFILE>) {
+		chop $line;
+		while ($line =~ /^(.*)\@\(([A-Za-z0-9_]+)\)(.*)$/) {
+			$line = $1.$vartable{$2}.$3;
+		}
+		print OUTFILE $line,"\n";
+		if ($line =~ /^APPLNAME = /) {
+			last;
+		}
+	}
+
+	# '#' 前の行まで書き込む
+	while ($line = <ASPFILE>) {
+		chop $line;
+		while ($line =~ /^(.*)\@\(([A-Za-z0-9_]+)\)(.*)$/) {
+			$line = $1.$vartable{$2}.$3;
+		}
+		if ($line =~ /^#/) {
+			last;
+		}
+		print OUTFILE $line,"\n";
+	}
+
+	# 一度出力する Makefile をクローズする。
+	close(OUTFILE);
+
+	# TINET の Makefile を書き込む
+	&convMakefileSub($infile, $outfile);
+
+	# もう一度出力する Makefile をオープンする
+	unless (open(OUTFILE, ">> ".$outfile)) {
+		print STDERR "tinet_asp_configure: can't open $outfile\n";
+		exit(1);
+	}
+
+	# 参照する sample/Makefile の最終行まで書き込む
+	while ($line = <ASPFILE>) {
+		chop $line;
+		while ($line =~ /^(.*)\@\(([A-Za-z0-9_]+)\)(.*)$/) {
+			$line = $1.$vartable{$2}.$3;
+		}
+		print OUTFILE $line,"\n";
+	}
+
+	close(OUTFILE);
+	close(ASPFILE);
+}
+
+#
+#  Makefile を生成する
+#
+sub genMakefile {
+	local($file, $mandatory) = @_;
+	local($path, $copyright);
+
+	$path = $sampledir.$file.".".$applname;
+	$copyright = $sampledir.$file.".copyright";
+	if (-f $path) {
+		&convMakefile($path, $copyright, $file);
+		return;
+	}	
+
+	$path = $sampledir.$file;
+	if ($mandatory || -f $path) {
+		&convMakefile($path, $copyright, $file);
+	}	
+}
+
+#
+#  ファイルを変換する
+#
+sub convert {
+	local($infile, $outfile) = @_;
+	local($line, $varname, $varval);
+
+	print STDERR "tinet_asp_configure: Generating $outfile from $infile.\n";
+	if (-f $outfile) {
+		print STDERR "tinet_asp_configure: $outfile exists.",
+						"  Save as $outfile.bak.\n";
+		rename($outfile, $outfile.".bak");
+	}
+	unless (open(INFILE, $infile)) {
+		print STDERR "tinet_asp_configure: can't open $infile\n";
+		exit(1);
+	}
+	unless (open(OUTFILE, "> ".$outfile)) {
+		print STDERR "tinet_asp_configure: can't open $outfile\n";
+		exit(1);
+	}
+
+	while ($line = <INFILE>) {
+		chop $line;
+		while ($line =~ /^(.*)\@\(([A-Za-z0-9_]+)\)(.*)$/) {
+			$line = $1.$vartable{$2}.$3;
+		}
+		print OUTFILE $line,"\n";
+	}
+
+	close(INFILE);
+	close(OUTFILE);
+}
+
+#
+#  サンプルを見つけてファイルを生成する
+#
+sub generate {
+	local($file, $mandatory) = @_;
+	local($path);
+
+	$path = $sampledir.$file.".".$applname;
+	if (-f $path) {
+		do convert($path, $file);
+		return;
+	}	
+
+	$path = $sampledir.$file;
+	if ($mandatory || -f $path) {
+		do convert($path, $file);
+	}	
+}
+
+#
+#  TINET のソースディレクトリ名を取り出す
+#
+$pwd = `pwd`; chop $pwd;
+if ($opt_e) {
+	$tinetabsdir = $tinetdir = $opt_e;
+}
+elsif ($0 =~ /(.*)\/tinet_asp_configure/) {
+	$tinetdir = $1;
+	if ($tinetdir =~ /^\//) {
+		$tinetabsdir = $tinetdir;
+	}
+	else {
+		$tinetabsdir = $pwd."/".$tinetdir;
+	}
+}
+else {
+	$tinetabsdir = $tinetdir = $pwd;
+}
+$sampledir = $tinetdir."/".$templatedir."/";
+
+#
+#  ソースディレクトリ名を取り出す
+#
+$pwd = `pwd`; chop $pwd;
+if ($opt_D) {
+	$srcabsdir = $srcdir = $opt_D;
+}
+elsif ($0 =~ /(.*)\/tinet\/tinet_asp_configure/) {
+	$srcdir = $1;
+	if ($srcdir =~ /^\//) {
+		$srcabsdir = $srcdir;
+	}
+	else {
+		$srcabsdir = $pwd."/".$srcdir;
+	}
+}
+else {
+	$srcabsdir = $srcdir = $pwd;
+}
+$aspsampledir = $srcdir."/".$aspsampledir;
+
+$perl = $opt_p ? $opt_p : do get_path("perl", ("/usr/local/bin", "/usr/bin"));
+$cfg = $opt_g ? $opt_g : "\$(SRCDIR)/cfg/cfg/cfg";
+$cfgfile = $opt_g ? $opt_g : $srcdir."/cfg/cfg/cfg";
+
+#
+#  オプションの確認
+#
+unless ($opt_T) {
+	print STDERR "tinet_asp_configure: -T option is mandatory\n";
+	print STDERR "Installed targets are:\n";
+	foreach $targetname (<$srcdir/target/[a-zA-Z1-9]*>) {
+		$targetname =~ s|$srcdir/target/||;
+		print STDERR "\t$targetname\n";
+	}
+	exit(1);
+}
+unless ($opt_i) {
+	print STDERR "tinet_jsp_configure: -i option is mandatory\n";
+	exit(1);
+}
+else {
+	unless ($opt_v) {
+		print STDERR "tinet_jsp_configure: -v option is mandatory\n";
+		exit(1);
+	}
+}
+if ($opt_n) {
+	unless ($opt_n eq "inet4" || $opt_n eq "inet6") {
+		print STDERR "tinet_jsp_configure: inet4 or inet6 expected in -n option\n";
+		exit(1);
+	}
+}
+else {
+	print STDERR "tinet_jsp_configure: -n option is mandatory\n";
+	exit(1);
+}
+if ($opt_s) {
+	unless ($opt_s eq "tcp" || $opt_s eq "udp" || $opt_s eq "tcp/udp") {
+		print STDERR "tinet_jsp_configure: tcp, udp or tcp/udp expected in -s option\n";
+		exit(1);
+	}
+}
+else {
+	print STDERR "tinet_jsp_configure: -s option is mandatory\n";
+	exit(1);
+}
+
+#
+#  変数テーブルの作成
+#
+%vartable = ();
+$vartable{"TARGET"} = $target;
+$vartable{"APPLNAME"} = $applname;
+$vartable{"APPLDIR"} = $appldir;
+$vartable{"APPLOBJS"} = $applobjs;
+$vartable{"KERNEL_LIB"} = $kernel_lib;
+$vartable{"KERNEL_FUNCOBJS"} = $kernel_funcobjs;
+$vartable{"SRCDIR"} = $srcdir;
+$vartable{"SRCABSDIR"} = $srcabsdir;
+$vartable{"SRCLANG"} = $srclang;
+$vartable{"DBGENV"} = $dbgenv;
+$vartable{"ENABLE_TRACE"} = $enable_trace;
+$vartable{"PERL"} = $perl;
+$vartable{"CFG"} = $cfg;
+$objext = do get_objext();
+$vartable{"OBJEXT"} = $objext;
+$vartable{"TINETDIR"} = $tinetdir;
+$vartable{"TINETABSDIR"} = $tinetabsdir;
+$vartable{"NET_IF"} = $net_if;
+$vartable{"NET_DEV"} = $net_dev;
+
+#
+#  -n オプションの処理
+#
+
+$vartable{"SUPPORT_INET4"} = "#SUPPORT_INET4 = true";
+$vartable{"SUPPORT_INET6"} = "#SUPPORT_INET6 = true";
+if ($net_proto eq "inet4") {
+	$vartable{"SUPPORT_INET4"} = "SUPPORT_INET4 = true";
+}
+if ($net_proto eq "inet6") {
+	$vartable{"SUPPORT_INET6"} = "SUPPORT_INET6 = true";
+}
+
+#
+#  -s オプションの処理
+#
+
+$vartable{"SUPPORT_TCP"} = "#SUPPORT_TCP = true";
+$vartable{"SUPPORT_UDP"} = "#SUPPORT_UDP = true";
+if ($trans_proto eq "tcp" || $trans_proto eq "tcp/udp") {
+	$vartable{"SUPPORT_TCP"} = "SUPPORT_TCP = true";
+}
+if ($trans_proto eq "udp" || $trans_proto eq "tcp/udp") {
+	$vartable{"SUPPORT_UDP"} = "SUPPORT_UDP = true";
+}
+
+#
+#  ターゲットディレクトリのチェック
+#
+
+if (! -d $srcdir."/target/".$target) {
+	print STDERR "tinet_asp_configure: $srcdir/target/$target not exist\n";
+	exit(1);
+}
+
+#
+#  Makefile とアプリケーションファイルの生成
+#
+
+&genMakefile("Makefile", 1);
+do generate($applname.".c", 0);
+do generate($applname.".cpp", 0);
+do generate($applname.".h", 0);
+do generate($applname.".cfg", 0);
+do generate("tinet_".$applname.".cfg", 0);
+do generate("route_cfg.c", 0);
+do generate("tinet_app_config.h", 0);
+
+#
+#  cfg ができているかのチェック
+#
+
+if (!(-x ($objext == "" ? $cfgfile : $cfgfile.".".$objext))) {
+	print STDERR "Please compile the configurator (cfg).\n";
+}
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/tinet_config.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/tinet_config.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/tinet_config.h	(revision 270)
@@ -0,0 +1,430 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _TINET_CONFIG_H_
+#define _TINET_CONFIG_H_
+
+/*
+ *  TINET 1.2 ã¨ã®äºææ§ã®ããã®å®ç¾©
+ */
+
+/* TCPã®ååãªã¼ãã³ããµãã¼ãããã*/
+
+#define TCP_CFG_PASSIVE_OPEN
+
+/* TCPã®ãã³ãã­ãã­ã³ã°ã³ã¼ã«æ©è½ãçµè¾¼ãã*/
+
+#define TCP_CFG_NON_BLOCKING
+
+/* UDPã®ãã³ãã­ãã­ã³ã°ã³ã¼ã«æ©è½ãçµè¾¼ãã*/
+
+#define UDP_CFG_NON_BLOCKING
+
+/*
+ *  NICãã·ã¹ãã ãCPUãå¿ç¨ãã­ã°ã©ã ã«
+ *  ä¾å­ããå®ç¾©ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ãããã
+ */
+
+#if defined(TARGET_KERNEL_JSP)
+
+#ifdef SUPPORT_ETHER
+
+#include "tinet_nic_config.h"
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#include "tinet_sys_config.h"
+#include "tinet_cpu_config.h"
+#include "tinet_app_config.h"
+
+#elif defined(TARGET_KERNEL_ASP)
+
+#ifdef SUPPORT_ETHER
+
+#include "tinet_nic_config.h"
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#include "tinet_target_config.h"
+#include "tinet_app_config.h"
+
+#endif	/* of #if defined(TARGET_KERNEL_JSP) */
+
+/*
+ *  TINET 1.1 ã¨ã®äºææ§ã®ããã®å®ç¾©
+ */
+
+#ifdef  TMO_ICMP4_OUTPUT
+#define TMO_ICMP_OUTPUT	TMO_ICMP4_OUTPUT
+#endif
+
+/*
+ *  TINET 1.2 ã¨ã®äºææ§ã®ããã®å®ç¾©
+ */
+
+#ifdef  NUM_MPF_NET_BUF_4096
+#define NUM_MPF_NET_BUF_REASSM	NUM_MPF_NET_BUF_4096
+#endif
+
+/*
+ *  TINET 1.3 ã¨ã®äºææ§ã®ããã®å®ç¾©
+
+#ifdef  NUM_MPF_NET_BUF_REASSM
+#define NUM_MPF_NET_BUF4_REASSM	NUM_MPF_NET_BUF_REASSM
+#endif
+ */
+
+/*
+ *  TCP ã«é¢ããå®ç¾©
+ */
+
+/*
+ *  MAX_TCP_RCV_SEG: åä¿¡ã»ã°ã¡ã³ããµã¤ãºã®æå¤§å¤
+ *
+ *    æ³¨æ: å¤æ´ãã¹ãã§ã¯ãªãã
+ */
+
+#ifndef MAX_TCP_RCV_SEG
+#define MAX_TCP_RCV_SEG		(IF_MTU - (IP_HDR_SIZE + TCP_HDR_SIZE))
+#endif
+
+/*
+ *  DEF_TCP_SND_SEG: éä¿¡ã»ã°ã¡ã³ããµã¤ãºã®è¦å®å¤
+ */
+
+#ifndef DEF_TCP_SND_SEG
+#define DEF_TCP_SND_SEG		MAX_TCP_SND_SEG
+#endif
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®éåä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½
+ */
+
+#ifdef  TCP_CFG_SWBUF_CSAVE_ONLY
+#ifndef TCP_CFG_SWBUF_CSAVE
+#define TCP_CFG_SWBUF_CSAVE
+#endif
+#endif	/* of #ifdef  TCP_CFG_SWBUF_CSAVE_ONLY */
+
+#ifdef  TCP_CFG_RWBUF_CSAVE_ONLY
+#ifndef TCP_CFG_RWBUF_CSAVE
+#define TCP_CFG_RWBUF_CSAVE
+#endif
+#endif	/* of #ifdef  TCP_CFG_RWBUF_CSAVE_ONLY */
+
+/*
+ *  TCP_CFG_URG_OFFSET: ç·æ¥ãã¼ã¿ã®æå¾ã®ãã¤ãã®ãªãã»ãã
+ *
+ *    -1: BSD ã®å®è£
+ãç·æ¥ãã¤ã³ã¿ã¯ãç·æ¥ãã¼ã¿ã®æå¾ã®ãã¤ãã®æ¬¡ã®ãã¤ããå·®ãã
+ *     0: RFC1122 ã®è¦å®ãç·æ¥ãã¤ã³ã¿ã¯ãç·æ¥ãã¼ã¿ã®æå¾ã®ãã¤ããå·®ãã
+ */
+
+#ifndef TCP_CFG_URG_OFFSET
+#define TCP_CFG_URG_OFFSET	-1
+#endif
+
+/*
+ *  ARP ã«é¢ããå®ç¾©
+ */
+
+#ifndef ARP_CACHE_KEEP
+#define ARP_CACHE_KEEP		(20*60*NET_TIMER_HZ)	/* ARP ã­ã£ãã·ã¥ã®ã¿ã¤ã ã¢ã¦ã	*/
+#endif
+
+/*
+ *  ã«ã¼ãããã¯ã¤ã³ã¿ãã§ã¼ã¹ã«é¢ããå®ç¾©
+ */
+
+#ifndef LOMTU
+#define LOMTU			1500	/* ã«ã¼ãããã¯ã® MTU			*/
+#endif
+
+/*
+ * TINET ãµãã¼ãé¢æ°ã«é¢ããå®ç¾©
+ */
+
+#ifndef NUM_IPV4ADDR_STR_BUFF		/* ip2str ã«ããã IP ã¢ãã¬ã¹æå­åç¨ãããã¡æ° */
+
+#if defined(SUPPORT_PPP)
+
+#define NUM_IPV4ADDR_STR_BUFF	2
+
+#else	/* of #if defined(SUPPORT_PPP) */
+
+#define NUM_IPV4ADDR_STR_BUFF	1
+
+#endif	/* of #if defined(SUPPORT_PPP) */
+
+#endif	/* of #ifndef NUM_IPV4ADDR_STR_BUFF */
+
+#ifndef NUM_IPV6ADDR_STR_BUFF
+#define NUM_IPV6ADDR_STR_BUFF	2	/* ip62str ã«ããã IP ã¢ãã¬ã¹æå­åç¨ãããã¡æ° */
+#endif
+
+#ifndef NUM_MACADDR_STR_BUFF		/* macstr ã«ããã MAC ã¢ãã¬ã¹æå­åç¨ãããã¡æ° */
+
+#if defined(SUPPORT_INET4) && defined(ETHER_CFG_ACCEPT_ALL) && defined(ETHER_CFG_MCAST_WARNING)
+
+#define NUM_MACADDR_STR_BUFF	2
+
+#else	/* of #if defined(SUPPORT_INET4) && defined(ETHER_CFG_ACCEPT_ALL) && defined(ETHER_CFG_MCAST_WARNING) */
+
+#define NUM_MACADDR_STR_BUFF	1
+
+#endif	/* of #if defined(SUPPORT_INET4) && defined(ETHER_CFG_ACCEPT_ALL) && defined(ETHER_CFG_MCAST_WARNING) */
+
+#endif	/* of #ifndef NUM_MACADDR_STR_BUFF */
+
+/*
+ *  TINET å
+é¨ã®ã¿ã¤ã ã¢ã¦ãå¤ã®è¨­å®
+ */
+
+#ifndef TMO_IP4_FRAG_GET_NET_BUF
+#define TMO_IP4_FRAG_GET_NET_BUF	ULONG_C(1000*1000)	/* [ms]ãIPv4 ãã¼ã¿ã°ã©ã åæ§æç¨ãããã¯ã¼ã¯ãããã¡ç²å¾ã¿ã¤ã ã¢ã¦ã	*/
+#endif
+
+#ifndef TMO_IP6_FRAG_GET_NET_BUF
+#define TMO_IP6_FRAG_GET_NET_BUF	ULONG_C(1000*1000)	/* [ms]ãIPv6 ãã¼ã¿ã°ã©ã åæ§æç¨ãããã¯ã¼ã¯ãããã¡ç²å¾ã¿ã¤ã ã¢ã¦ã	*/
+#endif
+
+#ifndef TMO_PPP_GET_NET_BUF
+#define TMO_PPP_GET_NET_BUF		ULONG_C(1000*1000)	/* [ms]ãPPP åä¿¡ç¨ãããã¯ã¼ã¯ãããã¡ç²å¾ã¿ã¤ã ã¢ã¦ã	*/
+#endif
+
+#ifndef TMO_ARP_GET_NET_BUF
+#define TMO_ARP_GET_NET_BUF		ULONG_C(1000*1000)	/* [ms]ãARP ã®ãããã¯ã¼ã¯ãããã¡ç²å¾ã¿ã¤ã ã¢ã¦ã	*/
+#endif
+
+#ifndef TMO_TCP_GET_NET_BUF
+#define TMO_TCP_GET_NET_BUF		ULONG_C(1000*1000)	/* [ms]ãTCP ã®ãããã¯ã¼ã¯ãããã¡ç²å¾ã¿ã¤ã ã¢ã¦ã	*/
+#endif
+
+#ifndef TMO_TCP_OUTPUT
+#define TMO_TCP_OUTPUT			ULONG_C(1000*1000)	/* [ms]ãTCP åºåã¿ã¤ã ã¢ã¦ã				*/
+#endif
+
+#ifndef TMO_UDP_OUTPUT
+#define TMO_UDP_OUTPUT			ULONG_C(1000*1000)	/* [ms]ãUDP åºåã¿ã¤ã ã¢ã¦ã				*/
+#endif
+
+#ifndef TMO_ICMP_OUTPUT
+#define TMO_ICMP_OUTPUT			ULONG_C(1000*1000)	/* [ms]ãICMP åºåã¿ã¤ã ã¢ã¦ã				*/
+#endif
+
+#ifndef TMO_ND6_NS_OUTPUT
+#define TMO_ND6_NS_OUTPUT		ULONG_C(1000*1000)	/* [ms]ãè¿é£è¦è«åºåã¿ã¤ã ã¢ã¦ã			*/
+#endif
+
+#ifndef TMO_ND6_NA_OUTPUT
+#define TMO_ND6_NA_OUTPUT		ULONG_C(1000*1000)	/* [ms]ãè¿é£éç¥åºåã¿ã¤ã ã¢ã¦ã			*/
+#endif
+
+#ifndef TMO_ND6_RS_OUTPUT
+#define TMO_ND6_RS_OUTPUT		ULONG_C(1000*1000)	/* [ms]ãã«ã¼ã¿è¦è«åºåã¿ã¤ã ã¢ã¦ã			*/
+#endif
+
+#ifndef TMO_ARP_OUTPUT
+#define TMO_ARP_OUTPUT			ULONG_C(1000*1000)	/* [ms]ãã¢ãã¬ã¹è§£æ±ºè¦æ±åºåã¿ã¤ã ã¢ã¦ã		*/
+#endif
+
+#ifndef TMO_ND6_RTR_SOL_DELAY
+#define TMO_ND6_RTR_SOL_DELAY		ULONG_C(1000*1000)	/* [ms]ãã«ã¼ã¿è¦è«åºåé
+å»¶				*/
+#endif
+
+#ifndef TMO_ND6_RTR_SOL_INTERVAL
+#define TMO_ND6_RTR_SOL_INTERVAL	ULONG_C(4000*1000)	/* [ms]ãã«ã¼ã¿è¦è«åºåéé				*/
+#endif
+
+#ifndef TMO_IN_REDIRECT
+					/* [s]ãåãç´ãã«ã¼ãã£ã³ã°ã¨ã³ããªã¿ã¤ã ã¢ã¦ã*/
+#define TMO_IN_REDIRECT			(10*60*NET_TIMER_HZ)
+#endif
+
+/*
+ *  TINET å
+é¨ã®ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãºã®è¨­å®
+ */
+
+#ifndef TCP_OUT_TASK_STACK_SIZE
+#define	TCP_OUT_TASK_STACK_SIZE	1024	/* TCP åºåã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº		*/
+#endif
+
+#ifndef UDP_OUT_TASK_STACK_SIZE
+#define	UDP_OUT_TASK_STACK_SIZE	1024	/* UDP åºåã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº			*/
+#endif
+
+#ifndef PPP_INPUT_STACK_SIZE
+#define	PPP_INPUT_STACK_SIZE	1024	/* PPP ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº		*/
+#endif
+
+#ifndef PPP_OUTPUT_STACK_SIZE
+#define	PPP_OUTPUT_STACK_SIZE	1024	/* PPP åºåã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº		*/
+#endif
+
+#ifndef ETHER_INPUT_STACK_SIZE
+#define	ETHER_INPUT_STACK_SIZE	1024	/* Ethernet å
+¥åã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº	*/
+#endif
+
+#ifndef ETHER_OUTPUT_STACK_SIZE
+#define	ETHER_OUTPUT_STACK_SIZE	1024	/* Ethernet åºåã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº	*/
+#endif
+
+#ifndef LOOP_INPUT_STACK_SIZE
+#define	LOOP_INPUT_STACK_SIZE	1024	/* ã«ã¼ãããã¯å
+¥åã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº	*/
+#endif
+
+#ifndef LOOP_OUTPUT_STACK_SIZE
+#define	LOOP_OUTPUT_STACK_SIZE	1024	/* ã«ã¼ãããã¯åºåã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº	*/
+#endif
+
+#ifndef NET_TIMER_STACK_SIZE
+#define	NET_TIMER_STACK_SIZE	1024	/* ãããã¯ã¼ã¯ã¿ã¤ãã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº */
+#endif
+
+/*
+ *  TINET å
+é¨ã®ã¿ã¹ã¯ã®åªå
+åº¦ã®è¨­å®
+ */
+
+#ifndef TCP_OUT_TASK_PRIORITY
+#define TCP_OUT_TASK_PRIORITY	5	/* TCP åºåã¿ã¹ã¯ã®åªå
+åº¦			*/
+#endif
+
+#ifndef UDP_OUT_TASK_PRIORITY
+#define UDP_OUT_TASK_PRIORITY	5	/* UDP åºåã¿ã¹ã¯ã®åªå
+åº¦				*/
+#endif
+
+#ifndef PPP_INPUT_PRIORITY
+#define PPP_INPUT_PRIORITY	5	/* PPP ã¿ã¹ã¯ã®åªå
+åº¦			*/
+#endif
+
+#ifndef PPP_OUTPUT_PRIORITY
+#define PPP_OUTPUT_PRIORITY	5	/* PPP ã¿ã¹ã¯ã®åªå
+åº¦			*/
+#endif
+
+#ifndef ETHER_INPUT_PRIORITY
+#define ETHER_INPUT_PRIORITY	5	/* Ethernet å
+¥åã¿ã¹ã¯ã®åªå
+åº¦		*/
+#endif
+
+#ifndef ETHER_OUTPUT_PRIORITY
+#define ETHER_OUTPUT_PRIORITY	5	/* Ethernet åºåã¿ã¹ã¯ã®åªå
+åº¦		*/
+#endif
+
+#ifndef LOOP_INPUT_PRIORITY
+#define LOOP_INPUT_PRIORITY	5	/* ã«ã¼ãããã¯å
+¥åã¿ã¹ã¯ã®åªå
+åº¦		*/
+#endif
+
+#ifndef LOOP_OUTPUT_PRIORITY
+#define LOOP_OUTPUT_PRIORITY	5	/* ã«ã¼ãããã¯åºåã¿ã¹ã¯ã®åªå
+åº¦		*/
+#endif
+
+#ifndef NET_TIMER_PRIORITY
+#define NET_TIMER_PRIORITY	5	/* ãããã¯ã¼ã¯ã¿ã¤ãã¿ã¹ã¯ã®åªå
+åº¦ */
+#endif
+
+/*
+ *  TINET å
+é¨ã®ãã¼ã¿ã­ã¥ã¼ã®ã¨ã³ããªæ°ã®è¨­å®
+ */
+
+/* UDP åä¿¡ã­ã¥ã¼ãµã¤ãº */
+
+#ifndef NUM_DTQ_UDP_RCVQ
+#define NUM_DTQ_UDP_RCVQ	1	/* éã³ã¼ã«ããã¯ç¨	*/
+#endif
+
+#ifndef NUM_DTQ_UDP_OUTPUT
+#define NUM_DTQ_UDP_OUTPUT	1	/* UDP åºåãã¼ã¿ã­ã¥ã¼ãµã¤ãº			*/
+#endif
+
+#ifndef NUM_DTQ_PPP_OUTPUT
+#define NUM_DTQ_PPP_OUTPUT	2	/* PPP åºåãã¼ã¿ã­ã¥ã¼ãµã¤ãºã2 ä»¥ä¸	*/
+#endif
+
+#ifndef NUM_DTQ_ETHER_OUTPUT
+#define NUM_DTQ_ETHER_OUTPUT	2	/* Ethernet åºåãã¼ã¿ã­ã¥ã¼ãµã¤ãº	*/
+#endif
+
+#ifndef NUM_DTQ_LOOP_INPUT
+#define NUM_DTQ_LOOP_INPUT	0	/* ã«ã¼ãããã¯å
+¥åãã¼ã¿ã­ã¥ã¼ãµã¤ãº	*/
+#endif
+
+#ifndef NUM_DTQ_LOOP_OUTPUT
+#define NUM_DTQ_LOOP_OUTPUT	0	/* ã«ã¼ãããã¯åºåãã¼ã¿ã­ã¥ã¼ãµã¤ãº	*/
+#endif
+
+/*
+ *  TINET ãã­ãã³ã«ã¹ã¿ãã¯å
+é¨ã®ãªãã¼ã 
+ */
+
+#include <net/net_rename.h>
+#include <netinet/in_rename.h>
+
+#ifdef SUPPORT_INET6
+
+#include <netinet6/in6_rename.h>
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#endif /* _TINET_CONFIG_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/tinet_defs.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/tinet_defs.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/tinet_defs.h	(revision 270)
@@ -0,0 +1,75 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _TINET_DEFS_H_
+#define _TINET_DEFS_H_
+
+#include "tinet_kernel_defs.h"
+
+#ifdef SUPPORT_ETHER
+
+#include "tinet_nic_defs.h"
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+/*
+ *  ã«ã¼ãã«ã®è­å¥
+ */
+
+#ifdef TARGET_KERNEL_JSP
+
+#include "tinet_cpu_defs.h"
+
+#else	/* of #ifdef TARGET_KERNEL_JSP */
+
+#ifdef TARGET_KERNEL_ASP
+
+#include "tinet_target_defs.h"
+
+#endif	/* of #ifdef TARGET_KERNEL_ASP */
+
+#endif	/* of #ifdef TARGET_KERNEL_JSP */
+
+#endif /* _TINET_DEFS_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/tinet/tinet_kernel_defs.h
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/tinet_kernel_defs.h	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/tinet_kernel_defs.h	(revision 270)
@@ -0,0 +1,126 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  ã«ã¼ãã«ã«é¢ããäºææ§å®ç¾©ãã¡ã¤ã«
+ */
+
+#ifndef _TINET_KERNEL_DEFS_H_
+#define _TINET_KERNEL_DEFS_H_
+
+#if defined(TARGET_KERNEL_JSP)
+
+#ifndef _MACRO_ONLY
+
+/*
+ *  ãã¼ã¿åã®å®ç¾©ï¼inttype.hï¼
+ */
+
+#ifdef _int8_
+typedef _int8_			int8_t;		/* ç¬¦å·ä»ã 8 ãããæ´æ° */
+typedef unsigned _int8_		uint8_t;	/* ç¬¦å·ç¡ã 8 ãããæ´æ° */
+#endif	/* of #ifdef _int8_ */
+
+#ifdef _int16_
+typedef _int16_			int16_t;	/* ç¬¦å·ä»ã 16 ãããæ´æ° */
+typedef unsigned _int16_	uint16_t;	/* ç¬¦å·ç¡ã 16 ãããæ´æ° */
+#endif	/* of #ifdef _int16_ */
+
+#ifdef _int32_
+typedef _int32_			int32_t;	/* ç¬¦å·ä»ã 32 ãããæ´æ° */
+typedef unsigned _int32_	uint32_t;	/* ç¬¦å·ç¡ã 32 ãããæ´æ° */
+#endif	/* of #ifdef _int32_ */
+
+#ifdef _int64_
+typedef unsigned _int64_	uint64_t;	/* ç¬¦å·ç¡ã 64 ãããæ´æ° */
+#endif	/* of #ifdef _int64_ */
+
+typedef signed int		int_t;		/* èªç¶ãªãµã¤ãºã®ç¬¦å·ä»ãæ´æ° */
+typedef unsigned int		uint_t;		/* èªç¶ãªãµã¤ãºã®ç¬¦å·ç¡ãæ´æ° */
+
+typedef signed long		long_t;		/* é·ãã®ãµã¤ãºã®ç¬¦å·ä»ãæ´æ° */
+typedef unsigned long		ulong_t;	/* é·ãã®ãµã¤ãºã®ç¬¦å·ç¡ãæ´æ° */
+
+#ifdef _vp_int_
+typedef _vp_int_		intptr_t;	/* ãã¤ã³ã¿ã¾ãã¯ç¬¦å·ä»ãæ´æ° */
+#else	/* of #ifdef _vp_int_ */
+typedef VP			intptr_t;	/* ãã¤ã³ã¿ã¾ãã¯ç¬¦å·ä»ãæ´æ° */
+#endif	/* of #ifdef _vp_int_ */
+
+typedef int			bool_t;		/* çå½å¤ */
+
+#ifndef true
+#define true			1		/* ç */
+#endif /* true */
+
+#ifndef false
+#define false			0		/* å½ */
+#endif /* false */
+
+#endif	/* of #ifndef _MACRO_ONLY */
+
+/* æ§é ä½ structure ä¸­ã®ãã£ã¼ã«ã field ã®ãã¤ãä½ç½®ãè¿ããã¯ã­ */
+#ifndef offsetof
+#define offsetof(structure, field) ((size_t) &(((structure *) 0)->field))
+#endif	/* of #ifndef offsetof */
+
+/*
+ *  æ´æ°å®æ°ãä½ããã¯ã­
+ */
+#ifndef UINT_C
+#define UINT_C(val)		(val ## U)	/* uint_tåã®å®æ°ãä½ããã¯ã­ */
+#endif /* UINT_C */
+
+#ifndef ULONG_C
+#define ULONG_C(val)		(val ## UL)	/* ulong_tåã®å®æ°ãä½ããã¯ã­ */
+#endif /* ULONG_C */
+
+#elif defined(TARGET_KERNEL_ASP)
+
+#define syscall(api)		(api)
+
+#endif	/* of #if defined(TARGET_KERNEL_JSP) */
+
+#endif	/* of #ifndef _TINET_KERNEL_DEFS_H_ */
Index: EcnlProtoTool/trunk/asp3_dcre/utils/applyrename.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/utils/applyrename.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/utils/applyrename.rb	(revision 270)
@@ -0,0 +1,138 @@
+#!/usr/bin/env ruby
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS Software
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+# 
+#  Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+# 
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+# 
+#  $Id: applyrename.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+# 
+
+require "fileutils"
+
+#
+#  ãã¡ã¤ã«ã«ãªãã¼ã ãé©ç¨ãã
+#
+def applyRename(inFileName, syms)
+  symsRegexp = syms.join("|")
+  outFileName = inFileName + ".new"
+
+  begin
+    inFile = File.open(inFileName)
+    outFile = File.open(outFileName, "w")
+  rescue Errno::ENOENT, Errno::EACCES => ex
+    abort(ex.message)
+  end
+
+  inFile.each do |line|
+    line.gsub!(/\b(_?)(#{symsRegexp})\b/, "\\1_kernel_\\2")
+    outFile.print line
+  end
+
+  inFile.close
+  outFile.close
+
+  if FileUtils.cmp(inFileName, outFileName)
+    # ãã¡ã¤ã«ã®å
+å®¹ãå¤åããªãã£ãå ´å
+    FileUtils.remove(outFileName)
+  else
+    # ãã¡ã¤ã«ã®å
+å®¹ãå¤åããå ´å
+    FileUtils.move(inFileName, inFileName + ".bak")
+    FileUtils.move(outFileName, inFileName)
+    puts("Modified: #{inFileName}")
+  end
+end
+
+#
+#  ã¨ã©ã¼ãã§ãã¯
+#
+if ARGV.length < 1
+  abort("Usage: ruby appyrename.rb <prefix> <filelists>")
+end
+
+#
+#  åæå
+#
+syms = []
+name = ARGV.shift
+
+#
+#  ã·ã³ãã«ãªã¹ããèª­ã¿è¾¼ã
+#
+defFileName = name + "_rename.def"
+
+begin
+  defFile = File.open(defFileName)
+rescue Errno::ENOENT, Errno::EACCES => ex
+  abort(ex.message)
+end
+
+defFile.each do |line|
+  line.chomp!
+  if /^#\s*(.*)$/ =~ line
+    # do nothing
+  elsif /^INCLUDE\s+(.*)$/ =~ line
+    # do nothing
+  elsif line != ""
+    syms.push(line)
+  end
+end
+
+#
+#  ãã¡ã¤ã«ã«ãªãã¼ã ãé©ç¨ãã
+#
+ARGV.each do |inFileName|
+  if inFileName != defFileName && File.readable?(inFileName)
+    applyRename(inFileName, syms)
+  end
+end
Index: EcnlProtoTool/trunk/asp3_dcre/utils/genrename.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/utils/genrename.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/utils/genrename.rb	(revision 270)
@@ -0,0 +1,199 @@
+#!/usr/bin/env ruby
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS Software
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+# 
+#  Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+# 
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+# 
+#  $Id: genrename.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+# 
+
+#
+#  å
+é ­ã«ã¤ããæå­å
+#
+def prefixString(sym)
+  if sym =~ /[a-z]/
+    return("_kernel_")
+  else
+    return("_KERNEL_")
+  end
+end
+
+#
+#  ãªãã¼ã å®ç¾©ãçæãã
+#
+def generateDefine(outFile, sym, prefix)
+  outFile.print("#define #{prefix}#{sym}");
+  outFile.print("\t" * [(6 - (sym.length + prefix.length) / 4), 0].max);
+  outFile.print("\t#{prefix}#{prefixString(sym)}#{sym}\n");
+end
+
+#
+#  ãªãã¼ã è§£é¤ãçæãã
+#
+def generateUndef(outFile, sym, prefix)
+  outFile.print("#undef #{prefix}#{sym}\n");
+end
+
+#
+#  ã³ã¡ã³ããçæãã
+#
+def generateComment(outFile, comment)
+  outFile.print("/*\n")
+  outFile.print(" *  #{comment}\n")
+  outFile.print(" */\n")
+end
+
+#
+#  ã¨ã©ã¼ãã§ãã¯
+#
+if ARGV.length < 1
+  abort("Usage: ruby genrename.rb <prefix>")
+end
+
+#
+#  åæå
+#
+syms = []
+name = ARGV.shift
+NAME = name.upcase
+
+inFileName = name + "_rename.def"
+headerDefineSymbol = "TOPPERS_" + NAME + "_RENAME_H"
+
+#
+#  ã·ã³ãã«ãªã¹ããèª­ã¿è¾¼ã
+#
+begin
+  inFile = File.open(inFileName)
+rescue Errno::ENOENT, Errno::EACCES => ex
+  abort(ex.message)
+end
+
+inFile.each do |line|
+  syms.push(line.chomp)
+end
+
+#
+#  ???_rename.h ãçæãã
+#
+begin
+  outFile = File.open(name + "_rename.h", "w")
+rescue Errno::ENOENT, Errno::EACCES => ex
+  abort(ex.message)
+end
+
+outFile.print <<EOS
+/* This file is generated from #{inFileName} by genrename. */
+
+#ifndef #{headerDefineSymbol}
+#define #{headerDefineSymbol}
+
+EOS
+
+includes = ""
+syms.each do |sym|
+  if /^#\s*(.*)$/ =~ sym
+    generateComment(outFile, $1)
+  elsif /^INCLUDE\s+(.*)$/ =~ sym
+    fileName = $1.sub(/([>"])$/, "_rename.h\\1")
+    includes += "#include #{fileName}\n"
+  elsif sym != ""
+    generateDefine(outFile, sym, "")
+  else
+    outFile.print("\n")
+  end
+end
+
+outFile.print <<EOS
+
+#{includes}
+#endif /* #{headerDefineSymbol} */
+EOS
+
+#
+#  ???_unrename.h ãçæãã
+#
+begin
+  outFile = File.open(name + "_unrename.h", "w")
+rescue Errno::ENOENT, Errno::EACCES => ex
+  abort(ex.message)
+end
+
+outFile.print <<EOS
+/* This file is generated from #{inFileName} by genrename. */
+
+/* This file is included only when #{name}_rename.h has been included. */
+#ifdef #{headerDefineSymbol}
+#undef #{headerDefineSymbol}
+
+EOS
+
+includes = ""
+syms.each do |sym|
+  if /^#\s*(.*)$/ =~ sym
+    generateComment(outFile, $1)
+  elsif /^INCLUDE\s+(.*)$/ =~ sym
+    fileName = $1.sub(/([>"])$/, "_unrename.h\\1")
+    includes += "#include #{fileName}\n"
+  elsif sym != ""
+    generateUndef(outFile, sym, "")
+  else
+    outFile.print("\n")
+  end
+end
+
+outFile.print <<EOS
+
+#{includes}
+#endif /* #{headerDefineSymbol} */
+EOS
Index: EcnlProtoTool/trunk/asp3_dcre/utils/gentest.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/utils/gentest.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/utils/gentest.rb	(revision 270)
@@ -0,0 +1,477 @@
+#!/usr/bin/env ruby
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS Software
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+# 
+#  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+# 
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+# 
+#  $Id: gentest.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+# 
+
+#
+#		ãã¹ããã­ã°ã©ã çæãã¼ã«
+#
+	
+#
+#  çæåä½ãæ±ºããããã®è¨­å®
+#
+$parameterDefinition = {
+  "get_tst" => { 2 => "STAT" },
+  "get_pri" => { 2 => "PRI" },
+  "get_inf" => { 1 => "intptr_t" },
+  "ref_tsk" => { 2 => "T_RTSK" },
+  "ref_sem" => { 2 => "T_RSEM" },
+  "wai_flg" => { 4 => "FLGPTN" },
+  "pol_flg" => { 4 => "FLGPTN" },
+  "twai_flg" => { 4 => "FLGPTN" },
+  "ref_flg" => { 2 => "T_RFLG" },
+  "rcv_dtq" => { 2 => "intptr_t" },
+  "prcv_dtq" => { 2 => "intptr_t" },
+  "trcv_dtq" => { 2 => "intptr_t" },
+  "ref_dtq" => { 2 => "T_RDTQ" },
+  "rcv_pdq" => { 2 => "intptr_t" , 3 => "PRI" },
+  "prcv_pdq" => { 2 => "intptr_t" , 3 => "PRI" },
+  "trcv_pdq" => { 2 => "intptr_t" , 3 => "PRI" },
+  "ref_pdq" => { 2 => "T_RPDQ" },
+  "ref_mtx" => { 2 => "T_RMTX" },
+  "ref_mbf" => { 2 => "T_RMBF" },
+  "get_mpf" => { 2 => "void *" },
+  "pget_mpf" => { 2 => "void *" },
+  "tget_mpf" => { 2 => "void *" },
+  "ref_mpf" => { 2 => "T_RMPF" },
+  "get_tim" => { 1 => "SYSTIM" },
+  "ref_cyc" => { 2 => "T_RCYC" },
+  "ref_alm" => { 2 => "T_RALM" },
+  "ref_ovr" => { 2 => "T_ROVR" },
+  "get_tid" => { 1 => "ID" },
+  "get_did" => { 1 => "ID" },
+  "get_lod" => { 2 => "uint_t" },
+  "mget_lod" => { 3 => "uint_t" },
+  "get_nth" => { 3 => "ID" },
+  "mget_nth" => { 4 => "ID" },
+  "get_ipm" => { 1 => "PRI" },
+  "get_som" => { 1 => "ID" }
+}
+
+$functionParameters = {
+  "target_hrt_set_event" => "HRTCNT hrtcnt"
+}
+  
+$functionValue = {
+  "target_hrt_get_current" => "HRTCNT"
+}
+  
+$functionReturn = {
+  "target_hrt_get_current" => "0U"
+}
+  
+$functionCheckParameter = {
+  "target_hrt_set_event" => "hrtcnt"
+}
+
+#
+#  å¦çåä½ã®ã³ã¼ããæ ¼ç´ããã¯ã©ã¹
+#
+class PUCode
+  # åæå
+  def initialize(puName)
+    @puName = puName						# å¦çåä½ã®åå
+    @currentCount = ""						# å¦çã«ã¦ã³ã
+    @countFlag = false						# å¦çã«ã¦ã³ããä½¿ãããã
+    @code = Hash.new { |h,k| h[k] = [] }	# å¦çåä½ã®ã³ã¼ã
+    @variableList = {}						# å¦çåä½ã®å¤æ°
+    @silFlag = false						# SILãä½¿ãããã
+
+    # å¦çã«ã¦ã³ãå¤æ°åã®çæ
+    case puName
+    when /^TASK([0-9]*)$/
+      @count_var = "task#{$1}_count"
+    when /^CYC([0-9]*)$/
+      @count_var = "cyclic#{$1}_count"
+    when /^ALM([0-9]*)$/
+      @count_var = "alarm#{$1}_count"
+    when /^OVR$/
+      @count_var = "overrun_count"
+    when /^CPUEXC([0-9]*)$/
+      @count_var = "cpuexc#{$1}_count"
+    when /^EXTSVC([0-9]*)$/
+      @count_var = "extsvc#{$1}_count"
+    else
+      @count_var = puName + "_count"
+    end
+  end
+
+  # å¦çã«ã¦ã³ãã®è¨­å®
+  def setCount(count)
+    @countFlag = true if count != ""
+    @currentCount = count
+  end
+
+  # å¦çã«ã¦ã³ãã®ã¤ã³ã¯ãªã¡ã³ã
+  def incrementCount
+    if @currentCount != ""
+      @currentCount = (@currentCount.to_i + 1).to_s
+    end
+  end
+
+  # ã³ã¼ãã®è¿½å 
+  def append(*lines)
+    lines.each do |line|
+      @code[@currentCount].push(line)
+        end
+  end
+
+  # å¤æ°ã®è¿½å 
+  def addVariable(varName, typeName)
+    @variableList[varName] = typeName
+  end
+
+  # SILã®ä½¿ç¨
+  def useSil
+    @silFlag = true
+  end
+
+  # å¦çåä½ã®ã³ã¼ãã®åºå
+  def generateCode
+    # ä¸è¦ãªå¦çåä½ã®å¤å®
+    return if @code.length == 0
+
+    # å¦çã«ã¦ã³ãå¤æ°ã®çæ
+    if @countFlag
+      print("\nstatic uint_t\t#{@count_var} = 0;\n")
+    end
+
+    # é¢æ°ãããã®çæ
+    case @puName
+    when /^TASK([0-9]*)$/
+      print("\nvoid\n")
+      print("task#{$1}(intptr_t exinf)\n")
+    when /^CYC([0-9]*)$/
+      print("\nvoid\n")
+      print("cyclic#{$1}_handler(intptr_t exinf)\n")
+    when /^ALM([0-9]*)$/
+      print("\nvoid\n")
+      print("alarm#{$1}_handler(intptr_t exinf)\n")
+    when /^OVR$/
+      print("\nvoid\n")
+      print("overrun_handler(ID tskid, intptr_t exinf)\n")
+    when /^CPUEXC([0-9]*)$/
+      print("\nvoid\n")
+      print("cpuexc#{$1}_handler(void *p_excinf)\n")
+    when /^EXTSVC([0-9]*)$/
+      print("\nER_UINT\n")
+      print("extsvc#{$1}_routine")
+      print("(intptr_t par1, intptr_t par2, intptr_t par3,\n")
+      print("\t\t\t\t\t\t\t\tintptr_t par4, intptr_t par5, ID cdmid)\n")
+    else
+      if $functionValue[@puName]
+        print("\n#{$functionValue[@puName]}\n")
+      else
+        print("\nvoid\n")
+      end
+      print(@puName)
+      if $functionParameters[@puName]
+        print("(#{$functionParameters[@puName]})\n")
+      else
+        print("(void)\n")
+      end
+    end
+
+    print("{\n")
+
+    @variableList.each do |varName, varType|
+      if /^(.+)\w*\*$/ =~ varType
+        varBaseType = $1
+        print("\t#{varBaseType}")
+        print(varBaseType.length < 4 ? "\t\t*" : "\t*")
+      else
+        print("\t#{varType}")
+        print(varType.length < 4 ? "\t\t" : "\t")
+      end
+      print("#{varName};\n")
+    end
+    if @silFlag
+      print("\tSIL_PRE_LOC;\n")
+    end
+    print("\n")
+
+    if @countFlag
+      print("\tswitch (++#{@count_var}) {\n")
+      @code.keys.sort_by { |c| c.to_i }.each do |count|
+        print("\tcase #{count}:\n")
+        @code[count].each do |line|
+          print("\t",line) if line != ""
+          print("\n")
+        end
+        print("\t\tcheck_point(0);\n\n")
+      end
+      print("\tdefault:\n")
+      print("\t\tcheck_point(0);\n")
+      print("\t}\n")
+    else
+      @code[""].each do |line|
+        print(line,"\n")
+      end
+    end
+
+    print("\tcheck_point(0);\n")
+    if /^EXTSVC([0-9]*)$/ =~ @puName
+      print("\treturn(E_SYS);\n")
+    elsif $functionReturn[@pu_nama]
+      print("\treturn(#{$functionReturn[@puName]});\n")
+    end
+    print("}\n")
+  end
+end
+
+#
+#  ãµã¼ãã¹ã³ã¼ã«å¼ã³åºãã®èª­ã¿è¾¼ã¿
+#
+def genServiceCall(pu, svc_call, error_code)
+  pu.addVariable("ercd", "ER_UINT")
+  pu.append("\tercd = #{svc_call};")
+
+  if /^([a-z_]+)\((.*)\)$/ =~ svc_call
+    svcName = $1;
+    params = $2.split(/\s*,\s*/)
+
+    if $parameterDefinition.has_key?(svcName)
+      $parameterDefinition[svcName].each do |pos, type|
+        if params.size >= pos
+          varName = params[pos - 1].sub(/^\&/, "")
+          pu.addVariable(varName, type)
+        end
+      end
+    end
+  end
+
+  if !error_code
+    # E_OKãè¿ãå ´å
+    pu.append("\tcheck_ercd(ercd, E_OK);", "")
+  elsif error_code == "noreturn"
+    # ãªã¿ã¼ã³ããªãå ´å
+    pu.append("")
+  else
+    pu.append("\tcheck_ercd(ercd, #{error_code});", "")
+  end
+end
+
+#
+#  ãã¹ãéå§ã³ã¼ãã®çæ
+#
+def testStartCode(pu)
+  # ãã¹ãéå§ã³ã¼ãã¯ä¸åº¦ã®ã¿åºåãã
+  if $startFlag == 0
+    pu.append("\ttest_start(__FILE__);", "")
+    $startFlag = 1
+  end
+end
+
+#
+#  ã¿ã¼ã²ããä¾å­é¨é¢æ°ã®æ¯ãèãã®èª­ã¿è¾¼ã¿
+#
+def targetFunction(line, checkNum)
+  if /^([a-zA-Z_]+)\s*(.*)$/ =~ line
+    functionName = $1
+    line = $2
+    if (pu = $puList[functionName]).nil?
+      # æ°ããå¦çåä½ã®çæ
+      pu = $puList[functionName] = PUCode.new(functionName)
+      pu.setCount("1")
+      testStartCode(pu)
+    end
+  end
+
+  if /\-\>\s*([^\s]+)\s*(.*)$/ =~ line
+    retval = $1
+    line = $2
+  end
+  if /\<\-\s*([^\s]+)\s*(.*)$/ =~ line
+    param = $1
+    line = $2
+  end
+
+  pu.append("\tcheck_point(#{checkNum});");
+  if param && $functionCheckParameter[functionName]
+    pu.append(sprintf("\tcheck_assert(%s == %s);",
+					$functionCheckParameter[functionName], param), "")
+  end
+  if retval
+    pu.append("\treturn(#{retval});", "")
+  else
+    pu.append("\treturn;", "")
+  end
+  pu.incrementCount()
+end
+
+#
+#  ãã¹ãã¹ã¯ãªããã®èª­ã¿è¾¼ã¿
+#
+def parseLine(line)
+  if /^==\s*(([a-zA-Z_]+)[0-9]*)(.*)$/ =~ line
+    # å¦çåä½ã®éå§
+    $procFlag = 1
+    puName = $1
+    line2 = $3
+    if (pu = $puList[puName]).nil?
+      # æ°ããå¦çåä½ã®çæ
+      pu = $puList[puName] = PUCode.new(puName)
+    end
+    $currentPu = pu
+
+    case line2
+    when /^\-([0-9]+)(.*)$/
+      pu.setCount($1)
+    when /^\-[nN](.*)$/
+      # do nothing.
+    else
+      pu.setCount("")
+    end
+    testStartCode(pu) if /^START/ !~ puName
+  elsif $procFlag != 0
+    pu = $currentPu
+    if /^([0-9]+\:)\s*(.*)$/ =~ line
+      # ãã§ãã¯ãã¤ã³ãçªå·ã®å¦ç
+      originalCheckNum = $1
+      line = $2
+      checkNum = ($lastCheckPoint += 1).to_s
+      $outputLine.sub!(/#{originalCheckNum}/, "#{checkNum}:")
+
+      case line
+      when /^END$/
+        pu.append("\tcheck_finish(#{checkNum});")
+        $procFlag = 0
+        return
+      when /^HOOK\((.*)\)$/
+        pu.append(sprintf("\t#{$1};", checkNum))
+        return
+      when /^\[(.*)\]$/
+        targetFunction($1, checkNum)
+        return
+      else
+        pu.append("\tcheck_point(#{checkNum});")
+      end
+    end
+
+    case line
+    when /^((assert|state|ipm)\(.*\))$/
+      pu.append("\tcheck_#{$1};", "")
+    when /^(call|DO)\((.*)\)$/
+      call_string = $2
+      pu.append("\t#{call_string};", "")
+      pu.useSil() if /^SIL_..._INT\(\)$/ =~ call_string
+    when /^RETURN((\(.*\))?)$/
+      pu.append("\treturn#{$1};", "")
+      pu.incrementCount()
+    when /^GOTO\((.*)\)$/
+      pu.append("\tgoto #{$1};", "")
+    when /^LABEL\((.*)\)$/
+      pu.append("#{$1}:", "")
+    when /^([a-z_]+\(.*\))\s*(\-\>\s*([A-Za-z0-9_]*))?\s*$/
+      genServiceCall(pu, $1, $3)
+    else
+      warn("Error: #{line}")
+    end
+  end
+end
+
+#
+#  ã¨ã©ã¼ãã§ãã¯
+#
+if ARGV.length < 1
+  abort("Usage: ruby gentest.rb <test_program>")
+end
+
+#
+#  åæå
+#
+inFileName = ARGV.shift
+
+#
+#  ã¹ã¯ãªãããã¡ã¤ã«èª­ã¿è¾¼ã¿å¦ç
+#
+$lastCheckPoint = 0		# æå¾ã®ãã§ãã¯ãã¤ã³ãçªå·
+$procFlag = 0				# ã¹ã¯ãªããå¦çä¸­ãã©ã°
+$startFlag = 0			# ãã¹ãéå§ã³ã¼ãã®åºåãã©ã°
+$currentPu = nil			# èª­ã¿è¾¼ã¿ä¸­ã®å¦çåä½
+$puList = {}				# å¦çåä½ã®ãªã¹ã
+
+begin
+  inFile = File.open(inFileName)
+rescue Errno::ENOENT, Errno::EACCES => ex
+  abort(ex.message)
+end
+
+while line = inFile.gets do
+  $outputLine = line.dup
+  line.chomp!
+  line.sub!(/^\s*\*\s*/, "")
+  line.sub!(/\s*\/\/.*$/, "")
+  line.sub!(/\s*\.\.\..*$/, "")
+
+  while line.sub!(/\\$/, "") do
+    line1 = inFile.gets
+    $outputLine += line1.dup
+    line1.chomp!
+    line1.sub!(/^\s*\*\s*/, "")
+    line1.sub!(/\s*\/\/.*$/, "")
+    line1.sub!(/\s*\.\.\..*$/, "")
+    line += line1
+  end
+  parseLine(line) if line != ""
+  print($outputLine)
+  break if /DO NOT DELETE THIS LINE/ =~ $outputLine
+end
+
+#
+#  ãã¹ããã­ã°ã©ã åºåå¦ç
+#
+$puList.keys.sort.each do |puName|
+  $puList[puName].generateCode()
+end
Index: EcnlProtoTool/trunk/asp3_dcre/utils/makerelease.rb
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/utils/makerelease.rb	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/utils/makerelease.rb	(revision 270)
@@ -0,0 +1,186 @@
+#!/usr/bin/env ruby
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS Software
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+# 
+#  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+# 
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+# 
+#  $Id: makerelease.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
+# 
+
+require "shell"
+
+#
+#  ".."ãå«ããã¹ã®æ´å½¢
+#
+#  ä¾ï¼"yyy/../zzz" â "zzz"
+#  ä¾ï¼"xxx/yyy/../zzz" â "xxx/zzz"
+#
+def canonicalPath(path)
+  while path.sub!(/([^\/]+\/\.\.\/)/, "") do end
+  return(path)
+end
+
+#
+#  ãã¡ã¤ã«ã®èª­ã¿è¾¼ã¿
+#
+def readFile(inFileName)
+  baseDirectory = File.dirname(inFileName)
+  if (baseDirectory == ".")
+    baseDirectory = ""
+  else
+    baseDirectory += "/"
+  end
+
+  begin
+    inFile = File.open(inFileName)
+  rescue Errno::ENOENT, Errno::EACCES => ex
+    abort(ex.message)
+  end
+
+  inFile.each do |line|
+    line.chomp!
+    line.sub!(/\s*\#.*$/, "")
+    next if /^\s*$/ =~ line
+
+    if /^E_PACKAGE[ \t]+(.*)$/ =~ line
+      if $package != ""
+        abort("Duplicated E_PACKAGE directive.")
+      else
+        $package = $1
+        $e_package = 1
+      end
+    elsif /^PACKAGE[ \t]+(.*)$/ =~ line
+      if $package != ""
+        if !$e_package && $package != $1
+          abort("Inconsistent PACKAGE directive.")
+        end
+      else
+        $package = $1
+      end
+    elsif /^VERSION[ \t]+(.*)$/ =~ line
+      if $version != ""
+        if !$e_package && $version != $1
+          abort("Inconsistent VERSION directive.")
+        end
+      else
+        $version = $1
+        if /%date/ =~ $version
+          currentTime = Time.now.localtime
+          vdate = sprintf("%04d%02d%02d", currentTime.year,
+									currentTime.month, currentTime.day)
+          $version.sub!(/%date/, vdate)
+        end
+      end
+    elsif /^INCLUDE[ \t]+(.*)$/ =~ line
+      readFile(canonicalPath(baseDirectory + $1))
+    else
+      fileName = $prefix + "/" + canonicalPath(baseDirectory + line)
+      if !File.file?("../" + fileName)
+        abort("#{fileName} is not a file.")
+      elsif $fileList.index(fileName)
+        abort("#{fileName} is duplicated.")
+      else 
+        $fileList.push(fileName)
+      end
+    end
+  end
+end
+
+#
+#  åæå
+#
+$package = ""
+$e_package = 0
+$version = ""
+$fileList = []
+
+#
+#  ããªãã£ãã¯ã¹ï¼./ã«ã¬ã³ããã£ã¬ã¯ããªåï¼ã®åãåºã
+#
+cwd = Shell.new.cwd
+$prefix = "./" + File.basename(cwd)
+
+#
+#  ãã©ã¡ã¼ã¿ã®åãåºã
+#
+if ARGV.length >= 1
+  arg = ARGV.shift.dup
+  arg.sub!(/\/$/, "/MANIFEST")
+  arg.sub!(/^\.\//, "")
+else
+  arg = "MANIFEST"
+end
+
+#
+#  ãã¡ã¤ã«ã®èª­ã¿è¾¼ã¿
+#
+readFile(arg)
+if $package == ""
+  abort("PACKAGE/E_PACKAGE directive not found.")
+end
+if $version == ""
+  abort("VERSION directive not found.")
+end
+
+#
+#  RELEASEãã£ã¬ã¯ããªã®ä½æ
+#
+if !File.directory?("RELEASE")
+  Dir.mkdir("RELEASE")
+end
+
+#
+#  ã¢ã¼ã«ã¤ãï¼.tar.gzï¼ã®ä½æ
+#
+archiveName = $package + "-" + $version + ".tar.gz"
+fileListStr = $fileList.join(" ")
+command = "tar cvfz RELEASE/#{archiveName} -C .. #{fileListStr}\n";
+system(command)
+puts("== RELEASE/#{archiveName} is generated. ==\n")
Index: EcnlProtoTool/trunk/asp3_dcre/utils/move-if-change
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/utils/move-if-change	(revision 270)
+++ EcnlProtoTool/trunk/asp3_dcre/utils/move-if-change	(revision 270)
@@ -0,0 +1,13 @@
+#! /bin/sh
+if test -r $2
+  then
+  if cmp -s $1 $2
+  then
+    echo $2 is unchanged
+    rm -f $1
+  else
+    mv -f $1 $2
+  fi
+else
+  mv -f $1 $2
+fi
Index: EcnlProtoTool/trunk/gdbGNU.ini
===================================================================
--- EcnlProtoTool/trunk/gdbGNU.ini	(revision 270)
+++ EcnlProtoTool/trunk/gdbGNU.ini	(revision 270)
@@ -0,0 +1,4 @@
+target sim
+load
+b main
+run
Index: EcnlProtoTool/trunk/mrbgems/.project
===================================================================
--- EcnlProtoTool/trunk/mrbgems/.project	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/.project	(revision 270)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>mrbgems</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
Index: EcnlProtoTool/trunk/mrbgems/gr_peach/llbruby.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/gr_peach/llbruby.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/gr_peach/llbruby.h	(revision 270)
@@ -0,0 +1,116 @@
+/*
+ * WRBB Main
+ *
+ * Copyright (c) 2015 Minao Yamamoto
+ *
+ * This software is released under the MIT License.
+ * 
+ * http://opensource.org/licenses/mit-license.php
+ *
+ * Light weight Lanuage Board Ruby
+ * Wakayamarb board 
+ *
+ */
+#ifndef _LLBRUBY_H_
+#define _LLBRUBY_H_  1
+
+#define RUBY_CODE_SIZE (1024 * 4)		//4kBã¾ã§å®è¡å¯è½ã¨ãã
+
+//ãã¤ãã³ã¼ããã¼ã¸ã§ã³ãå®ç¾©ãã¾ã
+#define BYTE_CODE2	2
+#define BYTE_CODE3	3
+
+//ãã¡ã¼ã ã¦ã§ã¢ã®ãã¼ã¸ã§ã³ãå®ç¾©ãã¾ã
+#define MASTER		1000
+#define JAM			1001
+#define SDBT		1002
+#define SDWF		1003
+
+
+//åºæ¿ã®è¨­è¨ãã¼ã¸ã§ã³ãå®ç¾©ãã¾ã
+#define BOARD_GR	0
+#define BOARD_P01	1
+#define BOARD_P02	2
+#define BOARD_P03	3
+#define BOARD_P04	4
+
+
+//ãã¤ãã³ã¼ããã©ã¼ãããã®è¨­å®
+#define BYTECODE	BYTE_CODE3
+
+//åºæ¿ã®ã¿ã¤ãè¨­å®
+#define BOARD	BOARD_GR
+
+//ãã¡ã¼ã ã¦ã§ã¢è¨­å®
+#define FIRMWARE	MASTER
+//#define FIRMWARE	JAM
+//#define FIRMWARE	SDBT
+//#define FIRMWARE	SDWF
+
+//#define    DEBUG                1        // Define if you want to debug
+
+#ifdef DEBUG
+#  define DEBUG_PRINT(m,v)    { Serial.print("** "); Serial.print((m)); Serial.print(":"); Serial.println((v)); }
+#else
+#  define DEBUG_PRINT(m,v)    // do nothing
+#endif
+
+#define	FILE_LOAD	PORT3.PIDR.BIT.B5		//PORT 3-5
+
+#define XML_FILENAME  "wrbb.xml"
+#define RUBY_FILENAME  "main.mrb"
+#define RUBY_FILENAME_SIZE 32
+
+#define REALTIMECLOCK	1
+
+#if BYTECODE == BYTE_CODE2
+	#if FIRMWARE == MASTER
+		#define WRBB_VERSION "SakuRuby-1.13(2015/7/19)f2"
+	#elif FIRMWARE == JAM
+		#define WRBB_VERSION "SakuraJam-1.13(2015/7/19)f2"
+	#endif
+#elif BYTECODE == BYTE_CODE3
+	#if FIRMWARE == MASTER
+		#define WRBB_VERSION "SakuRuby-1.30(2015/12/19)f3"
+	#elif FIRMWARE == JAM
+		#define WRBB_VERSION "SakuraJam-1.30(2015/12/19)f3"
+	#endif
+#endif
+
+#define RB_PIN0		0
+#define RB_PIN1		1
+#define RB_PIN18	18
+#define RB_PIN19	19
+#define RB_PIN2		2
+#define RB_PIN3		3
+#define RB_PIN4		4
+#define RB_PIN5		5
+#define RB_PIN6		6
+#define RB_PIN7		7
+#define RB_PIN8		8
+#define RB_PIN9		9
+#define RB_PIN10	10
+#define RB_PIN11	11
+#define RB_PIN12	12
+#define RB_PIN13	13
+#define RB_PIN14	14
+#define RB_PIN15	15
+#define RB_PIN16	16
+#define RB_PIN17	17
+
+#define RB_PIN20	20
+#define RB_PIN21	21
+#define RB_PIN22	22
+#define RB_PIN23	23
+#define RB_PIN24	24
+#define RB_PIN25	25
+
+#define PIN_LED0	LED1
+#define PIN_LED1	LED2
+#define PIN_LED2	LED3
+#define PIN_LED3	LED4
+#define RB_LED	PIN_LED0
+
+
+#endif // _LLBRUBY_H_
+
Index: EcnlProtoTool/trunk/mrbgems/gr_peach/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mrbgems/gr_peach/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/gr_peach/mrbgem.rake	(revision 270)
@@ -0,0 +1,10 @@
+MRuby::Gem::Specification.new('gr_peach') do |spec|
+  spec.license = 'TOPPERS License'
+  spec.author  = 'Cores Co., Ltd.'
+  spec.summary = 'GR-PEACH mruby-arduino target depends'
+
+  spec.cc.include_paths << "#{spec.dir}/src"
+  spec.cc.include_paths << "#{spec.dir}/../../asp/include"
+  spec.cc.include_paths << "#{spec.dir}/../../asp/arch"
+  spec.cc.include_paths << "#{spec.dir}/../../asp/target/grsakura_ccrx"
+end
Index: EcnlProtoTool/trunk/mrbgems/gr_peach/src/arduino.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/gr_peach/src/arduino.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/gr_peach/src/arduino.c	(revision 270)
@@ -0,0 +1,557 @@
+#include <arduino.h>
+#include <mruby.h>
+#include "../llbruby.h"
+
+serial_t *Serial;
+serial_t *Serial1;	/*1:Serial1*/
+serial_t *Serial2;	/*2:Serial3*/
+serial_t *Serial3;	/*3:Serial2*/
+serial_t *Serial4;	/*4:Serial6*/
+serial_t *Serial5;	/*5:Serial7*/
+
+i2c_t Wire1;
+i2c_t Wire2;
+i2c_t Wire3;
+i2c_t Wire4;
+i2c_t Wire5;
+
+FATFS RomDisk;
+SD Sd;
+
+char ExeFilename[64];
+
+void arduino_init()
+{
+}
+
+void randomSeed(long seed)
+{
+}
+
+long arduino_random(long min, long max)
+{
+	return min;
+}
+
+struct pin_node pin_list;
+
+static struct pin_node *find_pin(PinType type, PinName pin)
+{
+	struct pin_node *ret = &pin_list;
+
+	while (ret != NULL) {
+		if ((ret->type == type) && (ret->pin == pin)) {
+			break;
+		}
+		ret = ret->next;
+	}
+
+	return ret;
+}
+
+static struct pin_node *new_pin(PinType type, PinName pin)
+{
+	struct pin_node *ret = calloc(1, sizeof(struct pin_node));
+
+	ret->next = pin_list.next;
+	ret->type = type;
+	ret->pin = pin;
+
+	pin_list.next = ret;
+
+	return ret;
+}
+
+struct pin_node *get_pin(PinType type, PinName pinno)
+{
+	struct pin_node *pin;
+
+	if (pinno == -1)
+		return NULL;
+
+	pin = find_pin(type, pinno);
+	if (pin != NULL)
+		return pin;
+
+	pin = new_pin(type, pinno);
+	if (pin == NULL)
+		return NULL;
+
+	switch (type) {
+	case pintype_gpio:
+		gpio_init(&pin->gpio, pinno);
+		break;
+	case pintype_dac:
+#if DEVICE_ANALOGOUT
+		analogout_init(&pin->dac, pinno);
+#endif
+		break;
+	case pintype_pwmout:
+		pwmout_init(&pin->pwmout, pinno);
+		pin->period = 491;
+		break;
+	case pintype_analogin:
+		analogin_init(&pin->analogin, pinno);
+		break;
+	}
+
+	return pin;
+}
+
+bool portToPins(SCI_PORT port, PinName *txpin, PinName *rxpin)
+{
+	switch (port) {
+	case SCI_USB0:
+		*txpin = 201;
+		*rxpin = 202;
+		break;
+	case SCI_SCI0P2x:
+		*txpin = 1;
+		*rxpin = 2;
+		break;
+	case SCI_SCI2B:
+		*txpin = 1;
+		*rxpin = 2;
+		break;
+	case SCI_SCI6B:
+		*txpin = 1;
+		*rxpin = 2;
+		break;
+	case SCI_SCI2A:
+		*txpin = 1;
+		*rxpin = 2;
+		break;
+	default:
+		*txpin = 0;
+		*rxpin = 0;
+		return false;
+	}
+
+	return true;
+}
+
+PinType get_pin_type(PinName pin)
+{
+	struct pin_node *ret = &pin_list;
+
+	while (ret != NULL) {
+		if (ret->pin == pin) {
+			return ret->type;
+		}
+	}
+
+	return pintype_none;
+}
+
+void analogReference(int mode)
+{
+
+}
+
+void setPinModeDac(int pin)
+{
+
+}
+
+void tone(int pin, int frequency, int duration)
+{
+
+}
+
+void noTone(int pin)
+{
+
+}
+
+int serial_write(serial_t *serial, const unsigned char *buf, int len)
+{
+	const char *c = (const char *)buf;
+
+	for (int i = 0; i < len; i++) {
+		serial_putc(serial, c[i]);
+	}
+
+	return len;
+}
+
+int serial_print(serial_t *serial, const char *str)
+{
+	int i;
+
+	for (i = 0; ; i++) {
+		char c = str[i];
+		if (c == '\0')
+			break;
+
+		serial_putc(serial, c);
+	}
+
+	return i;
+}
+
+int serial_println(serial_t *serial, const char *str)
+{
+	int i;
+
+	for (i = 0; ; i++) {
+		char c = str[i];
+		if (c == '\0')
+			break;
+
+		serial_putc(serial, c);
+	}
+
+	i++;
+	serial_putc(serial, '\r');
+
+	i++;
+	serial_putc(serial, '\n');
+
+	return i;
+}
+
+uint8_t EEPROM_write(int addr, uint8_t data)
+{
+	return 0;
+}
+
+uint8_t EEPROM_read(int addr)
+{
+	return 0xFF;
+}
+
+int EEP_fopen(FILEEEP *fp, const char *str, char mode)
+{
+	FRESULT ret;
+	BYTE fm;
+
+	switch (mode){
+	case 0:
+		fm = FA_READ;
+		break;
+	case 1:
+		fm = FA_READ | FA_WRITE | FA_CREATE_NEW;
+		break;
+	case 2:
+		fm = FA_READ | FA_WRITE;
+		break;
+	default:
+		return -1;
+	}
+
+	ret = f_open(&fp->fp, str, fm);
+
+	return (ret == FR_OK) ? 0 : -1;
+}
+
+int EEP_fwrite(FILEEEP *fp, byte *data, int *len)
+{
+	FRESULT ret;
+
+	ret = f_write(&fp->fp, data, (UINT)*len, (UINT *)len);
+
+	return (ret == FR_OK) ? 1 : -1;
+}
+
+int EEP_fread(FILEEEP *fp)
+{
+	FRESULT ret;
+	char c;
+	UINT br;
+
+	ret = f_read(&fp->fp, &c, 1, &br);
+	if (ret != FR_OK)
+		return -1;
+
+	return c;
+}
+
+void EEP_fclose(FILEEEP *fp)
+{
+	f_close(&fp->fp);
+}
+
+int EEP_fseek(FILEEEP *fp, int pos, int mode)
+{
+	FRESULT ret;
+
+	switch (mode){
+	case EEP_SEEKTOP:
+		ret = f_lseek(&fp->fp, pos);
+		break;
+	case EEP_SEEKCUR:
+		ret = f_lseek(&fp->fp, fp->fp.fptr + pos);
+		break;
+	case EEP_SEEKEND:
+		ret = f_lseek(&fp->fp, fp->fp.fsize - pos);
+		break;
+	default:
+		ret = FR_INVALID_PARAMETER;
+		break;
+	}
+
+	if (ret != FR_OK)
+		f_lseek(&fp->fp, 0);
+
+	return fp->fp.fptr;
+}
+
+int EEP_ffilesize(const char *str)
+{
+	FRESULT ret;
+	FILINFO fno;
+
+	ret = f_stat(str, &fno);
+	if (ret != FR_OK)
+		return 0;
+
+	return fno.fsize;
+}
+
+bool EEP_fEof(FILEEEP *fp)
+{
+	return f_tell(&fp->fp) == f_size(&fp->fp);
+}
+
+bool EEP_fexist(const char *path)
+{
+	FRESULT ret;
+	FILINFO fno;
+
+	ret = f_stat(path, &fno);
+
+	return (ret == FR_OK);
+}
+
+bool EEP_fcopy(const char *src, const char *dst)
+{
+	FIL fsrc, fdst;
+	BYTE buffer[512];
+	FRESULT res;
+	UINT br, bw;
+
+	res = f_open(&fsrc, src, FA_OPEN_EXISTING | FA_READ);
+	if (res != FR_OK)
+		return false;
+
+	res = f_open(&fdst, dst, FA_CREATE_ALWAYS | FA_WRITE);
+	if (res != FR_OK){
+		f_close(&fsrc);
+		return false;
+	}
+
+	for (;;) {
+		res = f_read(&fsrc, buffer, sizeof(buffer), &br);
+		if ((res != FR_OK) || br == 0)
+			break;
+
+		res = f_write(&fdst, buffer, br, &bw);
+		if ((res != FR_OK) || bw < br)
+			break;
+	}
+
+	f_close(&fsrc);
+	f_close(&fdst);
+
+	return (res == FR_OK);
+}
+
+bool EEP_fdelete(const char *path)
+{
+	FRESULT res;
+
+	res = f_unlink(path);
+
+	return (res == FR_OK);
+}
+
+bool SD_begin()
+{
+	DSTATUS dst;
+	FRESULT res;
+	BYTE pdrv = 1, type;
+
+	if (Sd.FatFs.fs_type != 0)
+		return true;
+
+	if ((dst = disk_initialize(pdrv)) != RES_OK) {
+		return false;
+	}
+
+	if ((dst = disk_ioctl(pdrv, MMC_GET_TYPE, &type)) != RES_OK) {
+		Sd.dst = dst;
+		Sd.type = 0;
+	}
+	else {
+		Sd.dst = RES_OK;
+		Sd.type = type;
+	}
+
+	if ((res = f_mount(&Sd.FatFs, "1:", 1)) != FR_OK) {
+		return false;
+	}
+
+	return true;
+}
+
+bool SD_open(File *file, const char *path, int mode)
+{
+	FRESULT ret;
+
+	if (!SD_begin())
+		return false;
+
+	ret = f_open(&file->fp, path, mode);
+
+	return ret == FR_OK;
+}
+
+bool SD_rmdir(const char *path)
+{
+	FRESULT ret;
+
+	if (!SD_begin())
+		return false;
+
+	ret = f_unlink(path);
+
+	return ret == FR_OK;
+}
+
+bool SD_rename(const char *path1, const char *path2)
+{
+	FRESULT ret;
+
+	if (!SD_begin())
+		return false;
+
+	ret = f_rename(path1, path2);
+	
+	return ret == FR_OK;
+}
+
+bool SD_remove(const char *path)
+{
+	FRESULT ret;
+
+	if (!SD_begin())
+		return false;
+
+	ret = f_unlink(path);
+
+	return ret == FR_OK;
+}
+
+bool SD_exists(const char *path)
+{
+	FRESULT ret;
+	FILINFO fno;
+
+	if (!SD_begin())
+		return false;
+
+	ret = f_stat(path, &fno);
+
+	return ret == FR_OK;
+}
+
+bool SD_mkdir(const char *path)
+{
+	FRESULT ret;
+
+	if (!SD_begin())
+		return false;
+
+	ret = f_mkdir(path);
+
+	return ret == FR_OK;
+}
+
+int file_write(File *fd, unsigned char *str, int len)
+{
+	FRESULT ret;
+	UINT bw;
+
+	ret = f_write(&fd->fp, str, len, &bw);
+	if (ret != FR_OK)
+		return -1;
+
+	return bw;
+}
+
+void file_close(File *fd)
+{
+	f_close(&fd->fp);
+}
+
+int file_size(File *fd)
+{
+	return f_size(&fd->fp);
+}
+
+int file_position(File *fd)
+{
+	return fd->fp.fptr;
+}
+
+void file_flush(File *fd)
+{
+	f_flush(&fd->fp);
+}
+
+bool file_seek(File *fd, int pos)
+{
+	FRESULT ret;
+
+	ret = f_lseek(&fd->fp, pos);
+
+	return ret != FR_OK;
+}
+
+int file_read(File *fd)
+{
+	FRESULT ret;
+	char c;
+	UINT br;
+
+	ret = f_read(&fd->fp, &c, 1, &br);
+	if (ret != FR_OK)
+		return -1;
+
+	return c;
+}
+
+void system_reboot(int mode)
+{
+
+}
+
+int fileloader(const char *progVer, const char *binVer)
+{
+	return 0;
+}
+
+DWORD get_fattime(void)
+{
+	time_t temp;
+	struct tm _tm;
+
+	time(&temp);
+	gmtime_r(&temp, &_tm);
+
+	return	  ((DWORD)(_tm.tm_year - 1980) << 25)
+		| ((DWORD)_tm.tm_mon << 21)
+		| ((DWORD)_tm.tm_mday << 16)
+		| ((DWORD)_tm.tm_hour << 11)
+		| ((DWORD)_tm.tm_min << 5)
+		| ((DWORD)_tm.tm_sec >> 1);
+}
+
+void mrb_gr_peach_gem_init(mrb_state *mrb)
+{
+}
+
+void mrb_gr_peach_gem_final(mrb_state *mrb)
+{
+
+}
Index: EcnlProtoTool/trunk/mrbgems/gr_peach/src/arduino.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/gr_peach/src/arduino.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/gr_peach/src/arduino.h	(revision 270)
@@ -0,0 +1,182 @@
+/*
+ *
+ */
+#ifndef _ARDUINO_H_
+#define _ARDUINO_H_
+
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <analogin_api.h>
+#include <analogout_api.h>
+#include <buffer.h>
+#include <can_api.h>
+#include <dma_api.h>
+#include <ethernet_api.h>
+#include <gpio_api.h>
+#include <gpio_irq_api.h>
+#include <i2c_api.h>
+#include <lp_ticker_api.h>
+#include <pinmap.h>
+#include <port_api.h>
+#include <pwmout_api.h>
+#include <rtc_api.h>
+#include <serial_api.h>
+#include <sleep_api.h>
+#include <spi_api.h>
+#include <ticker_api.h>
+#include <us_ticker_api.h>
+#include <wait_api.h>
+#include "diskio.h"
+#include "ff.h"
+
+#ifndef bool
+#define bool int
+#endif
+#ifndef true
+#define true 1
+#endif
+#ifndef false
+#define false 0
+#endif
+
+typedef unsigned char byte;
+
+void arduino_init(void);
+
+typedef enum pintype_e {
+	pintype_none,
+	pintype_gpio,
+	pintype_dac,
+	pintype_pwmout,
+	pintype_analogin,
+} PinType;
+
+struct pin_node {
+	struct pin_node *next;
+	PinName pin;
+	PinType type;
+	union {
+		gpio_t gpio;
+#if DEVICE_ANALOGOUT
+		dac_t dac;
+#endif
+		pwmout_t pwmout;
+		analogin_t analogin;
+	};
+	uint32_t period;
+	uint32_t pulsewidth;
+	int min;
+	int max;
+};
+
+struct pin_node *get_pin(PinType type, PinName pinno);
+PinType get_pin_type(PinName pin);
+
+#define DEFAULT 0
+#define INTERNAL 1
+#define EXTERNAL 2
+#define RAW12BIT 3
+
+void analogReference(int type);
+void setPinModeDac(int pin);
+void tone(int pin, int frequency, int duration);
+void noTone(int pin);
+void randomSeed(long seed);
+long arduino_random(long min, long max);
+
+typedef enum sci_port {
+	SCI_USB0,
+	SCI_SCI0P2x,
+	SCI_SCI2B,
+	SCI_SCI6B,
+	SCI_SCI2A,
+} SCI_PORT;
+
+bool portToPins(SCI_PORT port, PinName *txpin, PinName *rxpin);
+
+extern serial_t *Serial;
+extern serial_t *Serial1;	/*1:Serial1*/
+extern serial_t *Serial2;	/*2:Serial3*/
+extern serial_t *Serial3;	/*3:Serial2*/
+extern serial_t *Serial4;	/*4:Serial6*/
+extern serial_t *Serial5;	/*5:Serial7*/
+
+int serial_write(serial_t *serial, const unsigned char *c, int len);
+int serial_print(serial_t *serial, const char *c);
+int serial_println(serial_t *serial, const char *c);
+
+extern i2c_t Wire1;
+extern i2c_t Wire2;
+extern i2c_t Wire3;
+extern i2c_t Wire4;
+extern i2c_t Wire5;
+
+typedef struct File {
+	FIL fp;
+} File;
+
+#define FILE_READ 0x01
+#define FILE_WRITE 0x02
+
+int file_write(File *fd, unsigned char *str, int len);
+void file_close(File *fd);
+int file_size(File *fd);
+int file_position(File *fd);
+void file_flush(File *fd);
+bool file_seek(File *fd, int pos);
+int file_read(File *fd);
+
+typedef struct SD {
+	DSTATUS dst;
+	BYTE type;
+	FATFS FatFs;
+} SD;
+
+extern SD Sd;
+
+bool SD_begin();
+bool SD_open(File *file, const char *path, int mode);
+bool SD_rmdir(const char *path);
+bool SD_rename(const char *path1, const char *path2);
+bool SD_remove(const char *path);
+bool SD_exists(const char *path);
+bool SD_mkdir(const char *path);
+
+typedef struct FILEEEP {
+	FIL fp;
+} FILEEEP;
+
+int EEP_fopen(FILEEEP *fp, const char *str, char mode);
+int EEP_fwrite(FILEEEP *fp, byte *data, int *len);
+int EEP_fread(FILEEEP *fp);
+void EEP_fclose(FILEEEP *fp);
+int EEP_fseek(FILEEEP *fp, int pos, int mode);
+int EEP_ffilesize(const char *str);
+bool EEP_fEof(FILEEEP *fp);
+int EEP_fexist(const char *path);
+int EEP_fcopy(const char *src, const char *dst);
+int EEP_fdelete(const char *path);
+
+#define EEP_SEEKTOP 1
+#define EEP_SEEKCUR 2
+#define EEP_SEEKEND 3
+
+#define EEP_READ 0x01
+#define EEP_WRITE 0x02
+#define EEP_APPEND 0x4
+
+uint8_t EEPROM_write(int addr, uint8_t data);
+uint8_t EEPROM_read(int addr);
+
+#define REBOOT_USERAPP 1
+void system_reboot(int mode);
+int fileloader(const char *progVer, const char *binVer);
+
+extern volatile char ProgVer[];
+extern char RubyFilename[64];
+extern char ExeFilename[64];
+
+#endif /* _ARDUINO_H_ */
Index: EcnlProtoTool/trunk/mrbgems/gr_peach/src/diskio.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/gr_peach/src/diskio.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/gr_peach/src/diskio.c	(revision 270)
@@ -0,0 +1,137 @@
+/*-----------------------------------------------------------------------*/
+/* PFF - Low level disk control module for Win32        (C)ChaN, 2014    */
+/*-----------------------------------------------------------------------*/
+
+#include <string.h>
+#include "ffconf.h"
+#include "diskio.h"
+
+/*--------------------------------------------------------------------------
+
+   Module Private Functions
+
+---------------------------------------------------------------------------*/
+
+#define MAX_DRIVES	1	/* Max number of physical drives to be used */
+
+unsigned char RamDisk[SZ_RAMDISK * 1024];
+
+typedef struct {
+	DSTATUS	status;
+	WORD sz_sector;
+	DWORD wofs;
+	DWORD wip;
+	DWORD n_sectors;
+} RD_STAT;
+
+static volatile
+RD_STAT Stat[MAX_DRIVES];
+
+static
+BYTE Buffer[SS_RAMDISK];
+
+static
+int get_status(volatile RD_STAT *stat) {
+	stat->sz_sector = SS_RAMDISK;
+	if(stat->sz_sector < _MIN_SS || stat->sz_sector > _MAX_SS) return 0;
+	stat->n_sectors = SZ_RAMDISK * 1024 / SS_RAMDISK;
+	stat->status = 0;
+	return 1;
+}
+
+/*-----------------------------------------------------------------------*/
+/* Initialize Disk Drive                                                 */
+/*-----------------------------------------------------------------------*/
+DSTATUS ramdisk_initialize (void)
+{
+	DSTATUS sta;
+
+	get_status(&Stat[0]);
+	sta = Stat[0].status;
+	Stat[0].wip = 0;
+
+	return sta;
+}
+
+/*-----------------------------------------------------------------------*/
+/* Get Disk Status                                                       */
+/*-----------------------------------------------------------------------*/
+DSTATUS ramdisk_get_status (void)
+{
+	return Stat[0].status;
+}
+
+/*-----------------------------------------------------------------------*/
+/* Read Partial Sector                                                   */
+/*-----------------------------------------------------------------------*/
+DRESULT ramdisk_read (
+	BYTE* buff,		/* Data read buffer */
+	DWORD sector,	/* Sector number (LBA) */
+	UINT count		/* Number of sectors to read (1..128) */
+)
+{
+	DRESULT res;
+	int dofs;
+
+
+	if(Stat[0].status & STA_NOINIT) return RES_NOTRDY;
+
+	if(sector >= Stat[0].n_sectors || !count || (sector + count) > Stat[0].n_sectors/* || Stat[0].wip*/) {
+		res = RES_PARERR;
+	}
+	else {
+		if(buff) {
+			dofs = sector * Stat[0].sz_sector;
+			memcpy(buff, &RamDisk[dofs], count * Stat[0].sz_sector);
+			res = RES_OK;
+		}
+		else {
+			res = RES_OK;
+		}
+	}
+
+	return res;
+}
+
+/*-----------------------------------------------------------------------*/
+/* Write Partial Sector                                                  */
+/*-----------------------------------------------------------------------*/
+DRESULT ramdisk_write (
+	const BYTE* buff,	/* Pointer to the write data */
+	DWORD sc,			/* Sector number (LBA), Number of bytes to send */
+	UINT count		/* Number of sectors to read (1..128) */
+)
+{
+	DRESULT res;
+	int dofs;
+
+	if(Stat[0].status & STA_NOINIT) return RES_NOTRDY;
+
+	if(!buff) {
+		if(sc) {
+			Stat[0].wip = sc;
+			Stat[0].wofs = 0;
+			memset(Buffer, 0, sizeof Buffer);
+			res = RES_OK;
+		}
+		else {
+			if(Stat[0].wip) {
+				dofs = Stat[0].wip * Stat[0].sz_sector;
+				memcpy(RamDisk + dofs, Buffer, Stat[0].sz_sector);
+				Stat[0].wip = 0;
+				res = RES_OK;
+			}
+			else {
+				res = RES_OK;
+			}
+		}
+	}
+	else {
+		if(Stat[0].wofs + sc > Stat[0].sz_sector) sc = Stat[0].sz_sector - Stat[0].wofs;
+		memcpy(&Buffer[Stat[0].wofs], buff, sc);
+		Stat[0].wofs += sc;
+		res = RES_OK;
+	}
+
+	return res;
+}
Index: EcnlProtoTool/trunk/mrbgems/gr_peach/src/diskio.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/gr_peach/src/diskio.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/gr_peach/src/diskio.h	(revision 270)
@@ -0,0 +1,101 @@
+/*-----------------------------------------------------------------------
+/  Low level disk interface modlue include file   (C)ChaN, 2014
+/-----------------------------------------------------------------------*/
+
+#ifndef _DISKIO_DEFINED
+#define _DISKIO_DEFINED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define _USE_WRITE	1	/* 1: Enable disk_write function */
+#define _USE_IOCTL	1	/* 1: Enable disk_ioctl fucntion */
+
+#include "integer.h"
+
+
+/* Status of Disk Functions */
+typedef BYTE	DSTATUS;
+
+/* Results of Disk Functions */
+typedef enum {
+	RES_OK = 0,		/* 0: Successful */
+	RES_ERROR,		/* 1: R/W Error */
+	RES_WRPRT,		/* 2: Write Protected */
+	RES_NOTRDY,		/* 3: Not Ready */
+	RES_PARERR		/* 4: Invalid Parameter */
+} DRESULT;
+
+
+/*---------------------------------------*/
+/* Prototypes for disk control functions */
+
+DSTATUS disk_initialize (BYTE pdrv);
+DSTATUS disk_status (BYTE pdrv);
+DRESULT disk_read (BYTE pdrv, BYTE* buff, DWORD sector, UINT count);
+#if	_USE_WRITE
+DRESULT disk_write (BYTE pdrv, const BYTE* buff, DWORD sector, UINT count);
+#endif
+#if	_USE_IOCTL
+DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff);
+#endif
+void disk_timerproc(void);
+
+#define SZ_RAMDISK	1536	/* Size of RAM disk [kB] */
+#define SS_RAMDISK	512		/* Sector size of RAM disk [byte] */
+
+DSTATUS ramdisk_initialize (void);
+DSTATUS ramdisk_get_status (void);
+DRESULT ramdisk_read (BYTE* buff, DWORD sector, UINT count);
+DRESULT ramdisk_write (const BYTE* buff, DWORD sector, UINT count);
+
+/* Disk Status Bits (DSTATUS) */
+#define STA_NOINIT		0x01	/* Drive not initialized */
+#define STA_NODISK		0x02	/* No medium in the drive */
+#define STA_PROTECT		0x04	/* Write protected */
+
+
+/* Command code for disk_ioctrl fucntion */
+
+/* Generic command (Used by FatFs) */
+#define CTRL_SYNC			0	/* Complete pending write process (needed at _FS_READONLY == 0) */
+#define GET_SECTOR_COUNT	1	/* Get media size (needed at _USE_MKFS == 1) */
+#define GET_SECTOR_SIZE		2	/* Get sector size (needed at _MAX_SS != _MIN_SS) */
+#define GET_BLOCK_SIZE		3	/* Get erase block size (needed at _USE_MKFS == 1) */
+#define CTRL_TRIM			4	/* Inform device that the data on the block of sectors is no longer used (needed at _USE_TRIM == 1) */
+
+/* Generic command (Not used by FatFs) */
+#define CTRL_FORMAT			5	/* Create physical format on the media */
+#define CTRL_POWER_IDLE		6	/* Put the device idle state */
+#define CTRL_POWER_OFF		7	/* Put the device off state */
+#define CTRL_LOCK			8	/* Lock media removal */
+#define CTRL_UNLOCK			9	/* Unlock media removal */
+#define CTRL_EJECT			10	/* Eject media */
+
+/* MMC/SDC specific command (Not used by FatFs) */
+#define MMC_GET_TYPE		50	/* Get card type */
+#define MMC_GET_CSD			51	/* Get CSD */
+#define MMC_GET_CID			52	/* Get CID */
+#define MMC_GET_OCR			53	/* Get OCR */
+#define MMC_GET_SDSTAT		54	/* Get SD status */
+
+/* ATA/CF specific command (Not used by FatFs) */
+#define ATA_GET_REV			60	/* Get F/W revision */
+#define ATA_GET_MODEL		61	/* Get model name */
+#define ATA_GET_SN			62	/* Get serial number */
+
+
+/* MMC card type flags (MMC_GET_TYPE) */
+#define CT_MMC		0x01		/* MMC ver 3 */
+#define CT_SD1		0x02		/* SD ver 1 */
+#define CT_SD2		0x04		/* SD ver 2 */
+#define CT_SDC		(CT_SD1|CT_SD2)	/* SD */
+#define CT_BLOCK	0x08		/* Block addressing */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif	/* _DISKIO_DEFINED */
Index: EcnlProtoTool/trunk/mrbgems/gr_peach/src/ff.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/gr_peach/src/ff.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/gr_peach/src/ff.c	(revision 270)
@@ -0,0 +1,4688 @@
+/*----------------------------------------------------------------------------/
+/  FatFs - FAT file system module  R0.11a                (C)ChaN, 2015        /
+/-----------------------------------------------------------------------------/
+/ FatFs module is a free software that opened under license policy of
+/ following conditions.
+/
+/ Copyright (C) 2015, ChaN, all right reserved.
+/
+/ 1. Redistributions of source code must retain the above copyright notice,
+/    this condition and the following disclaimer.
+/
+/ This software is provided by the copyright holder and contributors "AS IS"
+/ and any warranties related to this software are DISCLAIMED.
+/ The copyright owner or contributors be NOT LIABLE for any damages caused
+/ by use of this software.
+/----------------------------------------------------------------------------*/
+
+
+#include "ff.h"			/* Declarations of FatFs API */
+#include "diskio.h"		/* Declarations of disk I/O functions */
+
+
+/*--------------------------------------------------------------------------
+
+   Module Private Definitions
+
+---------------------------------------------------------------------------*/
+
+#if _FATFS != 64180	/* Revision ID */
+#error Wrong include file (ff.h).
+#endif
+
+
+/* Reentrancy related */
+#if _FS_REENTRANT
+#if _USE_LFN == 1
+#error Static LFN work area cannot be used at thread-safe configuration
+#endif
+#define	ENTER_FF(fs)		{ if (!lock_fs(fs)) return FR_TIMEOUT; }
+#define	LEAVE_FF(fs, res)	{ unlock_fs(fs, res); return res; }
+#else
+#define	ENTER_FF(fs)
+#define LEAVE_FF(fs, res)	return res
+#endif
+
+#define	ABORT(fs, res)		{ fp->err = (BYTE)(res); LEAVE_FF(fs, res); }
+
+
+/* Definitions of sector size */
+#if (_MAX_SS < _MIN_SS) || (_MAX_SS != 512 && _MAX_SS != 1024 && _MAX_SS != 2048 && _MAX_SS != 4096) || (_MIN_SS != 512 && _MIN_SS != 1024 && _MIN_SS != 2048 && _MIN_SS != 4096)
+#error Wrong sector size configuration
+#endif
+#if _MAX_SS == _MIN_SS
+#define	SS(fs)	((UINT)_MAX_SS)	/* Fixed sector size */
+#else
+#define	SS(fs)	((fs)->ssize)	/* Variable sector size */
+#endif
+
+
+/* Timestamp feature */
+#if _FS_NORTC == 1
+#if _NORTC_YEAR < 1980 || _NORTC_YEAR > 2107 || _NORTC_MON < 1 || _NORTC_MON > 12 || _NORTC_MDAY < 1 || _NORTC_MDAY > 31
+#error Invalid _FS_NORTC settings
+#endif
+#define GET_FATTIME()	((DWORD)(_NORTC_YEAR - 1980) << 25 | (DWORD)_NORTC_MON << 21 | (DWORD)_NORTC_MDAY << 16)
+#else
+#define GET_FATTIME()	get_fattime()
+#endif
+
+
+/* File access control feature */
+#if _FS_LOCK
+#if _FS_READONLY
+#error _FS_LOCK must be 0 at read-only configuration
+#endif
+typedef struct {
+	FATFS *fs;		/* Object ID 1, volume (NULL:blank entry) */
+	DWORD clu;		/* Object ID 2, directory (0:root) */
+	WORD idx;		/* Object ID 3, directory index */
+	WORD ctr;		/* Object open counter, 0:none, 0x01..0xFF:read mode open count, 0x100:write mode */
+} FILESEM;
+#endif
+
+
+
+/* DBCS code ranges and SBCS upper conversion tables */
+
+#if _CODE_PAGE == 932	/* Japanese Shift-JIS */
+#define _DF1S	0x81	/* DBC 1st byte range 1 start */
+#define _DF1E	0x9F	/* DBC 1st byte range 1 end */
+#define _DF2S	0xE0	/* DBC 1st byte range 2 start */
+#define _DF2E	0xFC	/* DBC 1st byte range 2 end */
+#define _DS1S	0x40	/* DBC 2nd byte range 1 start */
+#define _DS1E	0x7E	/* DBC 2nd byte range 1 end */
+#define _DS2S	0x80	/* DBC 2nd byte range 2 start */
+#define _DS2E	0xFC	/* DBC 2nd byte range 2 end */
+
+#elif _CODE_PAGE == 936	/* Simplified Chinese GBK */
+#define _DF1S	0x81
+#define _DF1E	0xFE
+#define _DS1S	0x40
+#define _DS1E	0x7E
+#define _DS2S	0x80
+#define _DS2E	0xFE
+
+#elif _CODE_PAGE == 949	/* Korean */
+#define _DF1S	0x81
+#define _DF1E	0xFE
+#define _DS1S	0x41
+#define _DS1E	0x5A
+#define _DS2S	0x61
+#define _DS2E	0x7A
+#define _DS3S	0x81
+#define _DS3E	0xFE
+
+#elif _CODE_PAGE == 950	/* Traditional Chinese Big5 */
+#define _DF1S	0x81
+#define _DF1E	0xFE
+#define _DS1S	0x40
+#define _DS1E	0x7E
+#define _DS2S	0xA1
+#define _DS2E	0xFE
+
+#elif _CODE_PAGE == 437	/* U.S. */
+#define _DF1S	0
+#define _EXCVT {0x80,0x9A,0x45,0x41,0x8E,0x41,0x8F,0x80,0x45,0x45,0x45,0x49,0x49,0x49,0x8E,0x8F, \
+				0x90,0x92,0x92,0x4F,0x99,0x4F,0x55,0x55,0x59,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+				0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, \
+				0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+				0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, \
+				0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+				0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, \
+				0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 720	/* Arabic */
+#define _DF1S	0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, \
+				0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+				0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, \
+				0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+				0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, \
+				0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+				0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, \
+				0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 737	/* Greek */
+#define _DF1S	0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, \
+				0x90,0x92,0x92,0x93,0x94,0x95,0x96,0x97,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87, \
+				0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,0x90,0x91,0xAA,0x92,0x93,0x94,0x95,0x96, \
+				0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+				0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, \
+				0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+				0x97,0xEA,0xEB,0xEC,0xE4,0xED,0xEE,0xEF,0xF5,0xF0,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, \
+				0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 771	/* KBL */
+#define _DF1S	0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, \
+				0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+				0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, \
+				0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+				0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, \
+				0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDC,0xDE,0xDE, \
+				0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+				0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xFA,0xFA,0xFC,0xFC,0xFE,0xFF}
+
+#elif _CODE_PAGE == 775	/* Baltic */
+#define _DF1S	0
+#define _EXCVT {0x80,0x9A,0x91,0xA0,0x8E,0x95,0x8F,0x80,0xAD,0xED,0x8A,0x8A,0xA1,0x8D,0x8E,0x8F, \
+				0x90,0x92,0x92,0xE2,0x99,0x95,0x96,0x97,0x97,0x99,0x9A,0x9D,0x9C,0x9D,0x9E,0x9F, \
+				0xA0,0xA1,0xE0,0xA3,0xA3,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, \
+				0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+				0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, \
+				0xB5,0xB6,0xB7,0xB8,0xBD,0xBE,0xC6,0xC7,0xA5,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+				0xE0,0xE1,0xE2,0xE3,0xE5,0xE5,0xE6,0xE3,0xE8,0xE8,0xEA,0xEA,0xEE,0xED,0xEE,0xEF, \
+				0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 850	/* Latin 1 */
+#define _DF1S	0
+#define _EXCVT {0x43,0x55,0x45,0x41,0x41,0x41,0x41,0x43,0x45,0x45,0x45,0x49,0x49,0x49,0x41,0x41, \
+				0x45,0x92,0x92,0x4F,0x4F,0x4F,0x55,0x55,0x59,0x4F,0x55,0x4F,0x9C,0x4F,0x9E,0x9F, \
+				0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, \
+				0xB0,0xB1,0xB2,0xB3,0xB4,0x41,0x41,0x41,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+				0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0x41,0x41,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, \
+				0xD1,0xD1,0x45,0x45,0x45,0x49,0x49,0x49,0x49,0xD9,0xDA,0xDB,0xDC,0xDD,0x49,0xDF, \
+				0x4F,0xE1,0x4F,0x4F,0x4F,0x4F,0xE6,0xE8,0xE8,0x55,0x55,0x55,0x59,0x59,0xEE,0xEF, \
+				0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 852	/* Latin 2 */
+#define _DF1S	0
+#define _EXCVT {0x80,0x9A,0x90,0xB6,0x8E,0xDE,0x8F,0x80,0x9D,0xD3,0x8A,0x8A,0xD7,0x8D,0x8E,0x8F, \
+				0x90,0x91,0x91,0xE2,0x99,0x95,0x95,0x97,0x97,0x99,0x9A,0x9B,0x9B,0x9D,0x9E,0xAC, \
+				0xB5,0xD6,0xE0,0xE9,0xA4,0xA4,0xA6,0xA6,0xA8,0xA8,0xAA,0x8D,0xAC,0xB8,0xAE,0xAF, \
+				0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBD,0xBF, \
+				0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC6,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, \
+				0xD1,0xD1,0xD2,0xD3,0xD2,0xD5,0xD6,0xD7,0xB7,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+				0xE0,0xE1,0xE2,0xE3,0xE3,0xD5,0xE6,0xE6,0xE8,0xE9,0xE8,0xEB,0xED,0xED,0xDD,0xEF, \
+				0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xEB,0xFC,0xFC,0xFE,0xFF}
+
+#elif _CODE_PAGE == 855	/* Cyrillic */
+#define _DF1S	0
+#define _EXCVT {0x81,0x81,0x83,0x83,0x85,0x85,0x87,0x87,0x89,0x89,0x8B,0x8B,0x8D,0x8D,0x8F,0x8F, \
+				0x91,0x91,0x93,0x93,0x95,0x95,0x97,0x97,0x99,0x99,0x9B,0x9B,0x9D,0x9D,0x9F,0x9F, \
+				0xA1,0xA1,0xA3,0xA3,0xA5,0xA5,0xA7,0xA7,0xA9,0xA9,0xAB,0xAB,0xAD,0xAD,0xAE,0xAF, \
+				0xB0,0xB1,0xB2,0xB3,0xB4,0xB6,0xB6,0xB8,0xB8,0xB9,0xBA,0xBB,0xBC,0xBE,0xBE,0xBF, \
+				0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC7,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, \
+				0xD1,0xD1,0xD3,0xD3,0xD5,0xD5,0xD7,0xD7,0xDD,0xD9,0xDA,0xDB,0xDC,0xDD,0xE0,0xDF, \
+				0xE0,0xE2,0xE2,0xE4,0xE4,0xE6,0xE6,0xE8,0xE8,0xEA,0xEA,0xEC,0xEC,0xEE,0xEE,0xEF, \
+				0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xFA,0xFA,0xFC,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 857	/* Turkish */
+#define _DF1S	0
+#define _EXCVT {0x80,0x9A,0x90,0xB6,0x8E,0xB7,0x8F,0x80,0xD2,0xD3,0xD4,0xD8,0xD7,0x49,0x8E,0x8F, \
+				0x90,0x92,0x92,0xE2,0x99,0xE3,0xEA,0xEB,0x98,0x99,0x9A,0x9D,0x9C,0x9D,0x9E,0x9E, \
+				0xB5,0xD6,0xE0,0xE9,0xA5,0xA5,0xA6,0xA6,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, \
+				0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+				0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC7,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, \
+				0xD0,0xD1,0xD2,0xD3,0xD4,0x49,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+				0xE0,0xE1,0xE2,0xE3,0xE5,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xDE,0xED,0xEE,0xEF, \
+				0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 860	/* Portuguese */
+#define _DF1S	0
+#define _EXCVT {0x80,0x9A,0x90,0x8F,0x8E,0x91,0x86,0x80,0x89,0x89,0x92,0x8B,0x8C,0x98,0x8E,0x8F, \
+				0x90,0x91,0x92,0x8C,0x99,0xA9,0x96,0x9D,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+				0x86,0x8B,0x9F,0x96,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, \
+				0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+				0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, \
+				0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+				0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, \
+				0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 861	/* Icelandic */
+#define _DF1S	0
+#define _EXCVT {0x80,0x9A,0x90,0x41,0x8E,0x41,0x8F,0x80,0x45,0x45,0x45,0x8B,0x8B,0x8D,0x8E,0x8F, \
+				0x90,0x92,0x92,0x4F,0x99,0x8D,0x55,0x97,0x97,0x99,0x9A,0x9D,0x9C,0x9D,0x9E,0x9F, \
+				0xA4,0xA5,0xA6,0xA7,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, \
+				0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+				0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, \
+				0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+				0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, \
+				0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 862	/* Hebrew */
+#define _DF1S	0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, \
+				0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+				0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, \
+				0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+				0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, \
+				0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+				0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, \
+				0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 863	/* Canadian-French */
+#define _DF1S	0
+#define _EXCVT {0x43,0x55,0x45,0x41,0x41,0x41,0x86,0x43,0x45,0x45,0x45,0x49,0x49,0x8D,0x41,0x8F, \
+				0x45,0x45,0x45,0x4F,0x45,0x49,0x55,0x55,0x98,0x4F,0x55,0x9B,0x9C,0x55,0x55,0x9F, \
+				0xA0,0xA1,0x4F,0x55,0xA4,0xA5,0xA6,0xA7,0x49,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, \
+				0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+				0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, \
+				0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+				0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, \
+				0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 864	/* Arabic */
+#define _DF1S	0
+#define _EXCVT {0x80,0x9A,0x45,0x41,0x8E,0x41,0x8F,0x80,0x45,0x45,0x45,0x49,0x49,0x49,0x8E,0x8F, \
+				0x90,0x92,0x92,0x4F,0x99,0x4F,0x55,0x55,0x59,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+				0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, \
+				0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+				0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, \
+				0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+				0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, \
+				0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 865	/* Nordic */
+#define _DF1S	0
+#define _EXCVT {0x80,0x9A,0x90,0x41,0x8E,0x41,0x8F,0x80,0x45,0x45,0x45,0x49,0x49,0x49,0x8E,0x8F, \
+				0x90,0x92,0x92,0x4F,0x99,0x4F,0x55,0x55,0x59,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+				0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, \
+				0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+				0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, \
+				0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+				0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, \
+				0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 866	/* Russian */
+#define _DF1S	0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, \
+				0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+				0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, \
+				0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+				0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, \
+				0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF, \
+				0x90,0x91,0x92,0x93,0x9d,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F, \
+				0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF}
+
+#elif _CODE_PAGE == 869	/* Greek 2 */
+#define _DF1S	0
+#define _EXCVT {0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F, \
+				0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x86,0x9C,0x8D,0x8F,0x90, \
+				0x91,0x90,0x92,0x95,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF, \
+				0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, \
+				0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, \
+				0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xA4,0xA5,0xA6,0xD9,0xDA,0xDB,0xDC,0xA7,0xA8,0xDF, \
+				0xA9,0xAA,0xAC,0xAD,0xB5,0xB6,0xB7,0xB8,0xBD,0xBE,0xC6,0xC7,0xCF,0xCF,0xD0,0xEF, \
+				0xF0,0xF1,0xD1,0xD2,0xD3,0xF5,0xD4,0xF7,0xF8,0xF9,0xD5,0x96,0x95,0x98,0xFE,0xFF}
+
+#elif _CODE_PAGE == 1	/* ASCII (for only non-LFN cfg) */
+#if _USE_LFN
+#error Cannot use LFN feature without valid code page.
+#endif
+#define _DF1S	0
+
+#else
+#error Unknown code page
+
+#endif
+
+
+/* Character code support macros */
+#define IsUpper(c)	(((c)>='A')&&((c)<='Z'))
+#define IsLower(c)	(((c)>='a')&&((c)<='z'))
+#define IsDigit(c)	(((c)>='0')&&((c)<='9'))
+
+#if _DF1S		/* Code page is DBCS */
+
+#ifdef _DF2S	/* Two 1st byte areas */
+#define IsDBCS1(c)	(((BYTE)(c) >= _DF1S && (BYTE)(c) <= _DF1E) || ((BYTE)(c) >= _DF2S && (BYTE)(c) <= _DF2E))
+#else			/* One 1st byte area */
+#define IsDBCS1(c)	((BYTE)(c) >= _DF1S && (BYTE)(c) <= _DF1E)
+#endif
+
+#ifdef _DS3S	/* Three 2nd byte areas */
+#define IsDBCS2(c)	(((BYTE)(c) >= _DS1S && (BYTE)(c) <= _DS1E) || ((BYTE)(c) >= _DS2S && (BYTE)(c) <= _DS2E) || ((BYTE)(c) >= _DS3S && (BYTE)(c) <= _DS3E))
+#else			/* Two 2nd byte areas */
+#define IsDBCS2(c)	(((BYTE)(c) >= _DS1S && (BYTE)(c) <= _DS1E) || ((BYTE)(c) >= _DS2S && (BYTE)(c) <= _DS2E))
+#endif
+
+#else			/* Code page is SBCS */
+
+#define IsDBCS1(c)	0
+#define IsDBCS2(c)	0
+
+#endif /* _DF1S */
+
+
+/* Name status flags */
+#define NSFLAG		11		/* Index of name status byte in fn[] */
+#define NS_LOSS		0x01	/* Out of 8.3 format */
+#define NS_LFN		0x02	/* Force to create LFN entry */
+#define NS_LAST		0x04	/* Last segment */
+#define NS_BODY		0x08	/* Lower case flag (body) */
+#define NS_EXT		0x10	/* Lower case flag (ext) */
+#define NS_DOT		0x20	/* Dot entry */
+
+
+/* FAT sub-type boundaries (Differ from specs but correct for real DOS/Windows) */
+#define MIN_FAT16	4086U	/* Minimum number of clusters of FAT16 */
+#define	MIN_FAT32	65526U	/* Minimum number of clusters of FAT32 */
+
+
+/* FatFs refers the members in the FAT structures as byte array instead of
+/ structure members because the structure is not binary compatible between
+/ different platforms */
+
+#define BS_jmpBoot			0		/* x86 jump instruction (3) */
+#define BS_OEMName			3		/* OEM name (8) */
+#define BPB_BytsPerSec		11		/* Sector size [byte] (2) */
+#define BPB_SecPerClus		13		/* Cluster size [sector] (1) */
+#define BPB_RsvdSecCnt		14		/* Size of reserved area [sector] (2) */
+#define BPB_NumFATs			16		/* Number of FAT copies (1) */
+#define BPB_RootEntCnt		17		/* Number of root directory entries for FAT12/16 (2) */
+#define BPB_TotSec16		19		/* Volume size [sector] (2) */
+#define BPB_Media			21		/* Media descriptor (1) */
+#define BPB_FATSz16			22		/* FAT size [sector] (2) */
+#define BPB_SecPerTrk		24		/* Track size [sector] (2) */
+#define BPB_NumHeads		26		/* Number of heads (2) */
+#define BPB_HiddSec			28		/* Number of special hidden sectors (4) */
+#define BPB_TotSec32		32		/* Volume size [sector] (4) */
+#define BS_DrvNum			36		/* Physical drive number (1) */
+#define BS_NTres			37		/* Error flag (1) */
+#define BS_BootSig			38		/* Extended boot signature (1) */
+#define BS_VolID			39		/* Volume serial number (4) */
+#define BS_VolLab			43		/* Volume label (8) */
+#define BS_FilSysType		54		/* File system type (1) */
+#define BPB_FATSz32			36		/* FAT size [sector] (4) */
+#define BPB_ExtFlags		40		/* Extended flags (2) */
+#define BPB_FSVer			42		/* File system version (2) */
+#define BPB_RootClus		44		/* Root directory first cluster (4) */
+#define BPB_FSInfo			48		/* Offset of FSINFO sector (2) */
+#define BPB_BkBootSec		50		/* Offset of backup boot sector (2) */
+#define BS_DrvNum32			64		/* Physical drive number (1) */
+#define BS_NTres32			65		/* Error flag (1) */
+#define BS_BootSig32		66		/* Extended boot signature (1) */
+#define BS_VolID32			67		/* Volume serial number (4) */
+#define BS_VolLab32			71		/* Volume label (8) */
+#define BS_FilSysType32		82		/* File system type (1) */
+#define	FSI_LeadSig			0		/* FSI: Leading signature (4) */
+#define	FSI_StrucSig		484		/* FSI: Structure signature (4) */
+#define	FSI_Free_Count		488		/* FSI: Number of free clusters (4) */
+#define	FSI_Nxt_Free		492		/* FSI: Last allocated cluster (4) */
+#define MBR_Table			446		/* MBR: Partition table offset (2) */
+#define	SZ_PTE				16		/* MBR: Size of a partition table entry */
+#define BS_55AA				510		/* Signature word (2) */
+
+#define	DIR_Name			0		/* Short file name (11) */
+#define	DIR_Attr			11		/* Attribute (1) */
+#define	DIR_NTres			12		/* Lower case flag (1) */
+#define DIR_CrtTimeTenth	13		/* Created time sub-second (1) */
+#define	DIR_CrtTime			14		/* Created time (2) */
+#define	DIR_CrtDate			16		/* Created date (2) */
+#define DIR_LstAccDate		18		/* Last accessed date (2) */
+#define	DIR_FstClusHI		20		/* Higher 16-bit of first cluster (2) */
+#define	DIR_WrtTime			22		/* Modified time (2) */
+#define	DIR_WrtDate			24		/* Modified date (2) */
+#define	DIR_FstClusLO		26		/* Lower 16-bit of first cluster (2) */
+#define	DIR_FileSize		28		/* File size (4) */
+#define	LDIR_Ord			0		/* LFN entry order and LLE flag (1) */
+#define	LDIR_Attr			11		/* LFN attribute (1) */
+#define	LDIR_Type			12		/* LFN type (1) */
+#define	LDIR_Chksum			13		/* Checksum of corresponding SFN entry */
+#define	LDIR_FstClusLO		26		/* Must be zero (0) */
+#define	SZ_DIRE				32		/* Size of a directory entry */
+#define	LLEF				0x40	/* Last long entry flag in LDIR_Ord */
+#define	DDEM				0xE5	/* Deleted directory entry mark at DIR_Name[0] */
+#define	RDDEM				0x05	/* Replacement of the character collides with DDEM */
+
+
+
+
+/*--------------------------------------------------------------------------
+
+   Module Private Work Area
+
+---------------------------------------------------------------------------*/
+
+/* Remark: Uninitialized variables with static duration are guaranteed
+/  zero/null at start-up. If not, either the linker or start-up routine
+/  being used is not compliance with ANSI-C standard.
+*/
+
+#if _VOLUMES < 1 || _VOLUMES > 9
+#error Wrong _VOLUMES setting
+#endif
+static FATFS *FatFs[_VOLUMES];	/* Pointer to the file system objects (logical drives) */
+static WORD Fsid;				/* File system mount ID */
+
+#if _FS_RPATH && _VOLUMES >= 2
+static BYTE CurrVol;			/* Current drive */
+#endif
+
+#if _FS_LOCK
+static FILESEM Files[_FS_LOCK];	/* Open object lock semaphores */
+#endif
+
+#if _USE_LFN == 0			/* Non LFN feature */
+#define	DEFINE_NAMEBUF		BYTE sfn[12]
+#define INIT_BUF(dobj)		(dobj).fn = sfn
+#define	FREE_BUF()
+#else
+#if _MAX_LFN < 12 || _MAX_LFN > 255
+#error Wrong _MAX_LFN setting
+#endif
+#if _USE_LFN == 1			/* LFN feature with static working buffer */
+static WCHAR LfnBuf[_MAX_LFN + 1];
+#define	DEFINE_NAMEBUF		BYTE sfn[12]
+#define INIT_BUF(dobj)		{ (dobj).fn = sfn; (dobj).lfn = LfnBuf; }
+#define	FREE_BUF()
+#elif _USE_LFN == 2 		/* LFN feature with dynamic working buffer on the stack */
+#define	DEFINE_NAMEBUF		BYTE sfn[12]; WCHAR lbuf[_MAX_LFN + 1]
+#define INIT_BUF(dobj)		{ (dobj).fn = sfn; (dobj).lfn = lbuf; }
+#define	FREE_BUF()
+#elif _USE_LFN == 3 		/* LFN feature with dynamic working buffer on the heap */
+#define	DEFINE_NAMEBUF		BYTE sfn[12]; WCHAR *lfn
+#define INIT_BUF(dobj)		{ lfn = ff_memalloc((_MAX_LFN + 1) * 2); if (!lfn) LEAVE_FF((dobj).fs, FR_NOT_ENOUGH_CORE); (dobj).lfn = lfn; (dobj).fn = sfn; }
+#define	FREE_BUF()			ff_memfree(lfn)
+#else
+#error Wrong _USE_LFN setting
+#endif
+#endif
+
+#ifdef _EXCVT
+static const BYTE ExCvt[] = _EXCVT;	/* Upper conversion table for SBCS extended characters */
+#endif
+
+
+
+
+
+
+/*--------------------------------------------------------------------------
+
+   Module Private Functions
+
+---------------------------------------------------------------------------*/
+
+
+/*-----------------------------------------------------------------------*/
+/* String functions                                                      */
+/*-----------------------------------------------------------------------*/
+
+/* Copy memory to memory */
+static
+void mem_cpy (void* dst, const void* src, UINT cnt) {
+	BYTE *d = (BYTE*)dst;
+	const BYTE *s = (const BYTE*)src;
+
+#if _WORD_ACCESS == 1
+	while (cnt >= sizeof (int)) {
+		*(int*)d = *(int*)s;
+		d += sizeof (int); s += sizeof (int);
+		cnt -= sizeof (int);
+	}
+#endif
+	while (cnt--)
+		*d++ = *s++;
+}
+
+/* Fill memory */
+static
+void mem_set (void* dst, int val, UINT cnt) {
+	BYTE *d = (BYTE*)dst;
+
+	while (cnt--)
+		*d++ = (BYTE)val;
+}
+
+/* Compare memory to memory */
+static
+int mem_cmp (const void* dst, const void* src, UINT cnt) {
+	const BYTE *d = (const BYTE *)dst, *s = (const BYTE *)src;
+	int r = 0;
+
+	while (cnt-- && (r = *d++ - *s++) == 0) ;
+	return r;
+}
+
+/* Check if chr is contained in the string */
+static
+int chk_chr (const char* str, int chr) {
+	while (*str && *str != chr) str++;
+	return *str;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Request/Release grant to access the volume                            */
+/*-----------------------------------------------------------------------*/
+#if _FS_REENTRANT
+static
+int lock_fs (
+	FATFS* fs		/* File system object */
+)
+{
+	return ff_req_grant(fs->sobj);
+}
+
+
+static
+void unlock_fs (
+	FATFS* fs,		/* File system object */
+	FRESULT res		/* Result code to be returned */
+)
+{
+	if (fs &&
+		res != FR_NOT_ENABLED &&
+		res != FR_INVALID_DRIVE &&
+		res != FR_INVALID_OBJECT &&
+		res != FR_TIMEOUT) {
+		ff_rel_grant(fs->sobj);
+	}
+}
+#endif
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* File lock control functions                                           */
+/*-----------------------------------------------------------------------*/
+#if _FS_LOCK
+
+static
+FRESULT chk_lock (	/* Check if the file can be accessed */
+	DIR* dp,		/* Directory object pointing the file to be checked */
+	int acc			/* Desired access type (0:Read, 1:Write, 2:Delete/Rename) */
+)
+{
+	UINT i, be;
+
+	/* Search file semaphore table */
+	for (i = be = 0; i < _FS_LOCK; i++) {
+		if (Files[i].fs) {	/* Existing entry */
+			if (Files[i].fs == dp->fs &&	 	/* Check if the object matched with an open object */
+				Files[i].clu == dp->sclust &&
+				Files[i].idx == dp->index) break;
+		} else {			/* Blank entry */
+			be = 1;
+		}
+	}
+	if (i == _FS_LOCK)	/* The object is not opened */
+		return (be || acc == 2) ? FR_OK : FR_TOO_MANY_OPEN_FILES;	/* Is there a blank entry for new object? */
+
+	/* The object has been opened. Reject any open against writing file and all write mode open */
+	return (acc || Files[i].ctr == 0x100) ? FR_LOCKED : FR_OK;
+}
+
+
+static
+int enq_lock (void)	/* Check if an entry is available for a new object */
+{
+	UINT i;
+
+	for (i = 0; i < _FS_LOCK && Files[i].fs; i++) ;
+	return (i == _FS_LOCK) ? 0 : 1;
+}
+
+
+static
+UINT inc_lock (	/* Increment object open counter and returns its index (0:Internal error) */
+	DIR* dp,	/* Directory object pointing the file to register or increment */
+	int acc		/* Desired access (0:Read, 1:Write, 2:Delete/Rename) */
+)
+{
+	UINT i;
+
+
+	for (i = 0; i < _FS_LOCK; i++) {	/* Find the object */
+		if (Files[i].fs == dp->fs &&
+			Files[i].clu == dp->sclust &&
+			Files[i].idx == dp->index) break;
+	}
+
+	if (i == _FS_LOCK) {				/* Not opened. Register it as new. */
+		for (i = 0; i < _FS_LOCK && Files[i].fs; i++) ;
+		if (i == _FS_LOCK) return 0;	/* No free entry to register (int err) */
+		Files[i].fs = dp->fs;
+		Files[i].clu = dp->sclust;
+		Files[i].idx = dp->index;
+		Files[i].ctr = 0;
+	}
+
+	if (acc && Files[i].ctr) return 0;	/* Access violation (int err) */
+
+	Files[i].ctr = acc ? 0x100 : Files[i].ctr + 1;	/* Set semaphore value */
+
+	return i + 1;
+}
+
+
+static
+FRESULT dec_lock (	/* Decrement object open counter */
+	UINT i			/* Semaphore index (1..) */
+)
+{
+	WORD n;
+	FRESULT res;
+
+
+	if (--i < _FS_LOCK) {	/* Shift index number origin from 0 */
+		n = Files[i].ctr;
+		if (n == 0x100) n = 0;		/* If write mode open, delete the entry */
+		if (n) n--;					/* Decrement read mode open count */
+		Files[i].ctr = n;
+		if (!n) Files[i].fs = 0;	/* Delete the entry if open count gets zero */
+		res = FR_OK;
+	} else {
+		res = FR_INT_ERR;			/* Invalid index nunber */
+	}
+	return res;
+}
+
+
+static
+void clear_lock (	/* Clear lock entries of the volume */
+	FATFS *fs
+)
+{
+	UINT i;
+
+	for (i = 0; i < _FS_LOCK; i++) {
+		if (Files[i].fs == fs) Files[i].fs = 0;
+	}
+}
+#endif
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Move/Flush disk access window in the file system object               */
+/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY
+static
+FRESULT sync_window (	/* FR_OK:succeeded, !=0:error */
+	FATFS* fs		/* File system object */
+)
+{
+	DWORD wsect;
+	UINT nf;
+	FRESULT res = FR_OK;
+
+
+	if (fs->wflag) {	/* Write back the sector if it is dirty */
+		wsect = fs->winsect;	/* Current sector number */
+		if (disk_write(fs->drv, fs->win, wsect, 1) != RES_OK) {
+			res = FR_DISK_ERR;
+		} else {
+			fs->wflag = 0;
+			if (wsect - fs->fatbase < fs->fsize) {		/* Is it in the FAT area? */
+				for (nf = fs->n_fats; nf >= 2; nf--) {	/* Reflect the change to all FAT copies */
+					wsect += fs->fsize;
+					disk_write(fs->drv, fs->win, wsect, 1);
+				}
+			}
+		}
+	}
+	return res;
+}
+#endif
+
+
+static
+FRESULT move_window (	/* FR_OK(0):succeeded, !=0:error */
+	FATFS* fs,		/* File system object */
+	DWORD sector	/* Sector number to make appearance in the fs->win[] */
+)
+{
+	FRESULT res = FR_OK;
+
+
+	if (sector != fs->winsect) {	/* Window offset changed? */
+#if !_FS_READONLY
+		res = sync_window(fs);		/* Write-back changes */
+#endif
+		if (res == FR_OK) {			/* Fill sector window with new data */
+			if (disk_read(fs->drv, fs->win, sector, 1) != RES_OK) {
+				sector = 0xFFFFFFFF;	/* Invalidate window if data is not reliable */
+				res = FR_DISK_ERR;
+			}
+			fs->winsect = sector;
+		}
+	}
+	return res;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Synchronize file system and strage device                             */
+/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY
+static
+FRESULT sync_fs (	/* FR_OK:succeeded, !=0:error */
+	FATFS* fs		/* File system object */
+)
+{
+	FRESULT res;
+
+
+	res = sync_window(fs);
+	if (res == FR_OK) {
+		/* Update FSInfo sector if needed */
+		if (fs->fs_type == FS_FAT32 && fs->fsi_flag == 1) {
+			/* Create FSInfo structure */
+			mem_set(fs->win, 0, SS(fs));
+			ST_WORD(fs->win + BS_55AA, 0xAA55);
+			ST_DWORD(fs->win + FSI_LeadSig, 0x41615252);
+			ST_DWORD(fs->win + FSI_StrucSig, 0x61417272);
+			ST_DWORD(fs->win + FSI_Free_Count, fs->free_clust);
+			ST_DWORD(fs->win + FSI_Nxt_Free, fs->last_clust);
+			/* Write it into the FSInfo sector */
+			fs->winsect = fs->volbase + 1;
+			disk_write(fs->drv, fs->win, fs->winsect, 1);
+			fs->fsi_flag = 0;
+		}
+		/* Make sure that no pending write process in the physical drive */
+		if (disk_ioctl(fs->drv, CTRL_SYNC, 0) != RES_OK)
+			res = FR_DISK_ERR;
+	}
+
+	return res;
+}
+#endif
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Get sector# from cluster#                                             */
+/*-----------------------------------------------------------------------*/
+/* Hidden API for hacks and disk tools */
+
+DWORD clust2sect (	/* !=0:Sector number, 0:Failed (invalid cluster#) */
+	FATFS* fs,		/* File system object */
+	DWORD clst		/* Cluster# to be converted */
+)
+{
+	clst -= 2;
+	if (clst >= fs->n_fatent - 2) return 0;		/* Invalid cluster# */
+	return clst * fs->csize + fs->database;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* FAT access - Read value of a FAT entry                                */
+/*-----------------------------------------------------------------------*/
+/* Hidden API for hacks and disk tools */
+
+DWORD get_fat (	/* 0xFFFFFFFF:Disk error, 1:Internal error, 2..0x0FFFFFFF:Cluster status */
+	FATFS* fs,	/* File system object */
+	DWORD clst	/* FAT index number (cluster number) to get the value */
+)
+{
+	UINT wc, bc;
+	BYTE *p;
+	DWORD val;
+
+
+	if (clst < 2 || clst >= fs->n_fatent) {	/* Check if in valid range */
+		val = 1;	/* Internal error */
+
+	} else {
+		val = 0xFFFFFFFF;	/* Default value falls on disk error */
+
+		switch (fs->fs_type) {
+		case FS_FAT12 :
+			bc = (UINT)clst; bc += bc / 2;
+			if (move_window(fs, fs->fatbase + (bc / SS(fs))) != FR_OK) break;
+			wc = fs->win[bc++ % SS(fs)];
+			if (move_window(fs, fs->fatbase + (bc / SS(fs))) != FR_OK) break;
+			wc |= fs->win[bc % SS(fs)] << 8;
+			val = clst & 1 ? wc >> 4 : (wc & 0xFFF);
+			break;
+
+		case FS_FAT16 :
+			if (move_window(fs, fs->fatbase + (clst / (SS(fs) / 2))) != FR_OK) break;
+			p = &fs->win[clst * 2 % SS(fs)];
+			val = LD_WORD(p);
+			break;
+
+		case FS_FAT32 :
+			if (move_window(fs, fs->fatbase + (clst / (SS(fs) / 4))) != FR_OK) break;
+			p = &fs->win[clst * 4 % SS(fs)];
+			val = LD_DWORD(p) & 0x0FFFFFFF;
+			break;
+
+		default:
+			val = 1;	/* Internal error */
+		}
+	}
+
+	return val;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* FAT access - Change value of a FAT entry                              */
+/*-----------------------------------------------------------------------*/
+/* Hidden API for hacks and disk tools */
+
+#if !_FS_READONLY
+FRESULT put_fat (	/* FR_OK(0):succeeded, !=0:error */
+	FATFS* fs,		/* File system object */
+	DWORD clst,		/* FAT index number (cluster number) to be changed */
+	DWORD val		/* New value to be set to the entry */
+)
+{
+	UINT bc;
+	BYTE *p;
+	FRESULT res;
+
+
+	if (clst < 2 || clst >= fs->n_fatent) {	/* Check if in valid range */
+		res = FR_INT_ERR;
+
+	} else {
+		switch (fs->fs_type) {
+		case FS_FAT12 :
+			bc = (UINT)clst; bc += bc / 2;
+			res = move_window(fs, fs->fatbase + (bc / SS(fs)));
+			if (res != FR_OK) break;
+			p = &fs->win[bc++ % SS(fs)];
+			*p = (clst & 1) ? ((*p & 0x0F) | ((BYTE)val << 4)) : (BYTE)val;
+			fs->wflag = 1;
+			res = move_window(fs, fs->fatbase + (bc / SS(fs)));
+			if (res != FR_OK) break;
+			p = &fs->win[bc % SS(fs)];
+			*p = (clst & 1) ? (BYTE)(val >> 4) : ((*p & 0xF0) | ((BYTE)(val >> 8) & 0x0F));
+			fs->wflag = 1;
+			break;
+
+		case FS_FAT16 :
+			res = move_window(fs, fs->fatbase + (clst / (SS(fs) / 2)));
+			if (res != FR_OK) break;
+			p = &fs->win[clst * 2 % SS(fs)];
+			ST_WORD(p, (WORD)val);
+			fs->wflag = 1;
+			break;
+
+		case FS_FAT32 :
+			res = move_window(fs, fs->fatbase + (clst / (SS(fs) / 4)));
+			if (res != FR_OK) break;
+			p = &fs->win[clst * 4 % SS(fs)];
+			val |= LD_DWORD(p) & 0xF0000000;
+			ST_DWORD(p, val);
+			fs->wflag = 1;
+			break;
+
+		default :
+			res = FR_INT_ERR;
+		}
+	}
+
+	return res;
+}
+#endif /* !_FS_READONLY */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* FAT handling - Remove a cluster chain                                 */
+/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY
+static
+FRESULT remove_chain (	/* FR_OK(0):succeeded, !=0:error */
+	FATFS* fs,			/* File system object */
+	DWORD clst			/* Cluster# to remove a chain from */
+)
+{
+	FRESULT res;
+	DWORD nxt;
+#if _USE_TRIM
+	DWORD scl = clst, ecl = clst, rt[2];
+#endif
+
+	if (clst < 2 || clst >= fs->n_fatent) {	/* Check if in valid range */
+		res = FR_INT_ERR;
+
+	} else {
+		res = FR_OK;
+		while (clst < fs->n_fatent) {			/* Not a last link? */
+			nxt = get_fat(fs, clst);			/* Get cluster status */
+			if (nxt == 0) break;				/* Empty cluster? */
+			if (nxt == 1) { res = FR_INT_ERR; break; }	/* Internal error? */
+			if (nxt == 0xFFFFFFFF) { res = FR_DISK_ERR; break; }	/* Disk error? */
+			res = put_fat(fs, clst, 0);			/* Mark the cluster "empty" */
+			if (res != FR_OK) break;
+			if (fs->free_clust != 0xFFFFFFFF) {	/* Update FSINFO */
+				fs->free_clust++;
+				fs->fsi_flag |= 1;
+			}
+#if _USE_TRIM
+			if (ecl + 1 == nxt) {	/* Is next cluster contiguous? */
+				ecl = nxt;
+			} else {				/* End of contiguous clusters */ 
+				rt[0] = clust2sect(fs, scl);					/* Start sector */
+				rt[1] = clust2sect(fs, ecl) + fs->csize - 1;	/* End sector */
+				disk_ioctl(fs->drv, CTRL_TRIM, rt);				/* Erase the block */
+				scl = ecl = nxt;
+			}
+#endif
+			clst = nxt;	/* Next cluster */
+		}
+	}
+
+	return res;
+}
+#endif
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* FAT handling - Stretch or Create a cluster chain                      */
+/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY
+static
+DWORD create_chain (	/* 0:No free cluster, 1:Internal error, 0xFFFFFFFF:Disk error, >=2:New cluster# */
+	FATFS* fs,			/* File system object */
+	DWORD clst			/* Cluster# to stretch, 0:Create a new chain */
+)
+{
+	DWORD cs, ncl, scl;
+	FRESULT res;
+
+
+	if (clst == 0) {		/* Create a new chain */
+		scl = fs->last_clust;			/* Get suggested start point */
+		if (!scl || scl >= fs->n_fatent) scl = 1;
+	}
+	else {					/* Stretch the current chain */
+		cs = get_fat(fs, clst);			/* Check the cluster status */
+		if (cs < 2) return 1;			/* Invalid value */
+		if (cs == 0xFFFFFFFF) return cs;	/* A disk error occurred */
+		if (cs < fs->n_fatent) return cs;	/* It is already followed by next cluster */
+		scl = clst;
+	}
+
+	ncl = scl;				/* Start cluster */
+	for (;;) {
+		ncl++;							/* Next cluster */
+		if (ncl >= fs->n_fatent) {		/* Check wrap around */
+			ncl = 2;
+			if (ncl > scl) return 0;	/* No free cluster */
+		}
+		cs = get_fat(fs, ncl);			/* Get the cluster status */
+		if (cs == 0) break;				/* Found a free cluster */
+		if (cs == 0xFFFFFFFF || cs == 1)/* An error occurred */
+			return cs;
+		if (ncl == scl) return 0;		/* No free cluster */
+	}
+
+	res = put_fat(fs, ncl, 0x0FFFFFFF);	/* Mark the new cluster "last link" */
+	if (res == FR_OK && clst != 0) {
+		res = put_fat(fs, clst, ncl);	/* Link it to the previous one if needed */
+	}
+	if (res == FR_OK) {
+		fs->last_clust = ncl;			/* Update FSINFO */
+		if (fs->free_clust != 0xFFFFFFFF) {
+			fs->free_clust--;
+			fs->fsi_flag |= 1;
+		}
+	} else {
+		ncl = (res == FR_DISK_ERR) ? 0xFFFFFFFF : 1;
+	}
+
+	return ncl;		/* Return new cluster number or error code */
+}
+#endif /* !_FS_READONLY */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* FAT handling - Convert offset into cluster with link map table        */
+/*-----------------------------------------------------------------------*/
+
+#if _USE_FASTSEEK
+static
+DWORD clmt_clust (	/* <2:Error, >=2:Cluster number */
+	FIL* fp,		/* Pointer to the file object */
+	DWORD ofs		/* File offset to be converted to cluster# */
+)
+{
+	DWORD cl, ncl, *tbl;
+
+
+	tbl = fp->cltbl + 1;	/* Top of CLMT */
+	cl = ofs / SS(fp->fs) / fp->fs->csize;	/* Cluster order from top of the file */
+	for (;;) {
+		ncl = *tbl++;			/* Number of cluters in the fragment */
+		if (!ncl) return 0;		/* End of table? (error) */
+		if (cl < ncl) break;	/* In this fragment? */
+		cl -= ncl; tbl++;		/* Next fragment */
+	}
+	return cl + *tbl;	/* Return the cluster number */
+}
+#endif	/* _USE_FASTSEEK */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Directory handling - Set directory index                              */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT dir_sdi (	/* FR_OK(0):succeeded, !=0:error */
+	DIR* dp,		/* Pointer to directory object */
+	UINT idx		/* Index of directory table */
+)
+{
+	DWORD clst, sect;
+	UINT ic;
+
+
+	dp->index = (WORD)idx;	/* Current index */
+	clst = dp->sclust;		/* Table start cluster (0:root) */
+	if (clst == 1 || clst >= dp->fs->n_fatent)	/* Check start cluster range */
+		return FR_INT_ERR;
+	if (!clst && dp->fs->fs_type == FS_FAT32)	/* Replace cluster# 0 with root cluster# if in FAT32 */
+		clst = dp->fs->dirbase;
+
+	if (clst == 0) {	/* Static table (root-directory in FAT12/16) */
+		if (idx >= dp->fs->n_rootdir)	/* Is index out of range? */
+			return FR_INT_ERR;
+		sect = dp->fs->dirbase;
+	}
+	else {				/* Dynamic table (root-directory in FAT32 or sub-directory) */
+		ic = SS(dp->fs) / SZ_DIRE * dp->fs->csize;	/* Entries per cluster */
+		while (idx >= ic) {	/* Follow cluster chain */
+			clst = get_fat(dp->fs, clst);				/* Get next cluster */
+			if (clst == 0xFFFFFFFF) return FR_DISK_ERR;	/* Disk error */
+			if (clst < 2 || clst >= dp->fs->n_fatent)	/* Reached to end of table or internal error */
+				return FR_INT_ERR;
+			idx -= ic;
+		}
+		sect = clust2sect(dp->fs, clst);
+	}
+	dp->clust = clst;	/* Current cluster# */
+	if (!sect) return FR_INT_ERR;
+	dp->sect = sect + idx / (SS(dp->fs) / SZ_DIRE);					/* Sector# of the directory entry */
+	dp->dir = dp->fs->win + (idx % (SS(dp->fs) / SZ_DIRE)) * SZ_DIRE;	/* Ptr to the entry in the sector */
+
+	return FR_OK;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Directory handling - Move directory table index next                  */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT dir_next (	/* FR_OK(0):succeeded, FR_NO_FILE:End of table, FR_DENIED:Could not stretch */
+	DIR* dp,		/* Pointer to the directory object */
+	int stretch		/* 0: Do not stretch table, 1: Stretch table if needed */
+)
+{
+	DWORD clst;
+	UINT i;
+#if !_FS_READONLY
+	UINT c;
+#endif
+
+
+	i = dp->index + 1;
+	if (!(i & 0xFFFF) || !dp->sect)	/* Report EOT when index has reached 65535 */
+		return FR_NO_FILE;
+
+	if (!(i % (SS(dp->fs) / SZ_DIRE))) {	/* Sector changed? */
+		dp->sect++;					/* Next sector */
+
+		if (!dp->clust) {		/* Static table */
+			if (i >= dp->fs->n_rootdir)	/* Report EOT if it reached end of static table */
+				return FR_NO_FILE;
+		}
+		else {					/* Dynamic table */
+			if (((i / (SS(dp->fs) / SZ_DIRE)) & (dp->fs->csize - 1)) == 0) {	/* Cluster changed? */
+				clst = get_fat(dp->fs, dp->clust);				/* Get next cluster */
+				if (clst <= 1) return FR_INT_ERR;
+				if (clst == 0xFFFFFFFF) return FR_DISK_ERR;
+				if (clst >= dp->fs->n_fatent) {					/* If it reached end of dynamic table, */
+#if !_FS_READONLY
+					if (!stretch) return FR_NO_FILE;			/* If do not stretch, report EOT */
+					clst = create_chain(dp->fs, dp->clust);		/* Stretch cluster chain */
+					if (clst == 0) return FR_DENIED;			/* No free cluster */
+					if (clst == 1) return FR_INT_ERR;
+					if (clst == 0xFFFFFFFF) return FR_DISK_ERR;
+					/* Clean-up stretched table */
+					if (sync_window(dp->fs)) return FR_DISK_ERR;/* Flush disk access window */
+					mem_set(dp->fs->win, 0, SS(dp->fs));		/* Clear window buffer */
+					dp->fs->winsect = clust2sect(dp->fs, clst);	/* Cluster start sector */
+					for (c = 0; c < dp->fs->csize; c++) {		/* Fill the new cluster with 0 */
+						dp->fs->wflag = 1;
+						if (sync_window(dp->fs)) return FR_DISK_ERR;
+						dp->fs->winsect++;
+					}
+					dp->fs->winsect -= c;						/* Rewind window offset */
+#else
+					if (!stretch) return FR_NO_FILE;			/* If do not stretch, report EOT (this is to suppress warning) */
+					return FR_NO_FILE;							/* Report EOT */
+#endif
+				}
+				dp->clust = clst;				/* Initialize data for new cluster */
+				dp->sect = clust2sect(dp->fs, clst);
+			}
+		}
+	}
+
+	dp->index = (WORD)i;	/* Current index */
+	dp->dir = dp->fs->win + (i % (SS(dp->fs) / SZ_DIRE)) * SZ_DIRE;	/* Current entry in the window */
+
+	return FR_OK;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Directory handling - Reserve directory entry                          */
+/*-----------------------------------------------------------------------*/
+
+#if !_FS_READONLY
+static
+FRESULT dir_alloc (	/* FR_OK(0):succeeded, !=0:error */
+	DIR* dp,		/* Pointer to the directory object */
+	UINT nent		/* Number of contiguous entries to allocate (1-21) */
+)
+{
+	FRESULT res;
+	UINT n;
+
+
+	res = dir_sdi(dp, 0);
+	if (res == FR_OK) {
+		n = 0;
+		do {
+			res = move_window(dp->fs, dp->sect);
+			if (res != FR_OK) break;
+			if (dp->dir[0] == DDEM || dp->dir[0] == 0) {	/* Is it a free entry? */
+				if (++n == nent) break;	/* A block of contiguous free entries is found */
+			} else {
+				n = 0;					/* Not a blank entry. Restart to search */
+			}
+			res = dir_next(dp, 1);		/* Next entry with table stretch enabled */
+		} while (res == FR_OK);
+	}
+	if (res == FR_NO_FILE) res = FR_DENIED;	/* No directory entry to allocate */
+	return res;
+}
+#endif
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Directory handling - Load/Store start cluster number                  */
+/*-----------------------------------------------------------------------*/
+
+static
+DWORD ld_clust (	/* Returns the top cluster value of the SFN entry */
+	FATFS* fs,		/* Pointer to the fs object */
+	const BYTE* dir	/* Pointer to the SFN entry */
+)
+{
+	DWORD cl;
+
+	cl = LD_WORD(dir + DIR_FstClusLO);
+	if (fs->fs_type == FS_FAT32)
+		cl |= (DWORD)LD_WORD(dir + DIR_FstClusHI) << 16;
+
+	return cl;
+}
+
+
+#if !_FS_READONLY
+static
+void st_clust (
+	BYTE* dir,	/* Pointer to the SFN entry */
+	DWORD cl	/* Value to be set */
+)
+{
+	ST_WORD(dir + DIR_FstClusLO, cl);
+	ST_WORD(dir + DIR_FstClusHI, cl >> 16);
+}
+#endif
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* LFN handling - Test/Pick/Fit an LFN segment from/to directory entry   */
+/*-----------------------------------------------------------------------*/
+#if _USE_LFN
+static
+const BYTE LfnOfs[] = {1,3,5,7,9,14,16,18,20,22,24,28,30};	/* Offset of LFN characters in the directory entry */
+
+
+static
+int cmp_lfn (			/* 1:matched, 0:not matched */
+	WCHAR* lfnbuf,		/* Pointer to the LFN working buffer to be compared */
+	BYTE* dir			/* Pointer to the directory entry containing the part of LFN */
+)
+{
+	UINT i, s;
+	WCHAR wc, uc;
+
+
+	if (LD_WORD(dir + LDIR_FstClusLO) != 0) return 0;	/* Check LDIR_FstClusLO */
+
+	i = ((dir[LDIR_Ord] & 0x3F) - 1) * 13;	/* Offset in the LFN buffer */
+
+	for (wc = 1, s = 0; s < 13; s++) {		/* Process all characters in the entry */
+		uc = LD_WORD(dir + LfnOfs[s]);		/* Pick an LFN character */
+		if (wc) {
+			if (i >= _MAX_LFN || ff_wtoupper(uc) != ff_wtoupper(lfnbuf[i++]))	/* Compare it */
+				return 0;					/* Not matched */
+			wc = uc;
+		} else {
+			if (uc != 0xFFFF) return 0;		/* Check filler */
+		}
+	}
+
+	if ((dir[LDIR_Ord] & LLEF) && wc && lfnbuf[i])	/* Last segment matched but different length */
+		return 0;
+
+	return 1;		/* The part of LFN matched */
+}
+
+
+
+static
+int pick_lfn (			/* 1:succeeded, 0:buffer overflow or invalid LFN entry */
+	WCHAR* lfnbuf,		/* Pointer to the LFN working buffer */
+	BYTE* dir			/* Pointer to the LFN entry */
+)
+{
+	UINT i, s;
+	WCHAR wc, uc;
+
+
+	if (LD_WORD(dir + LDIR_FstClusLO) != 0) return 0;	/* Check LDIR_FstClusLO */
+
+	i = ((dir[LDIR_Ord] & 0x3F) - 1) * 13;	/* Offset in the LFN buffer */
+
+	for (wc = 1, s = 0; s < 13; s++) {		/* Process all characters in the entry */
+		uc = LD_WORD(dir + LfnOfs[s]);		/* Pick an LFN character */
+		if (wc) {
+			if (i >= _MAX_LFN) return 0;	/* Buffer overflow? */
+			lfnbuf[i++] = wc = uc;			/* Store it */
+		} else {
+			if (uc != 0xFFFF) return 0;		/* Check filler */
+		}
+	}
+
+	if (dir[LDIR_Ord] & LLEF) {				/* Put terminator if it is the last LFN part */
+		if (i >= _MAX_LFN) return 0;		/* Buffer overflow? */
+		lfnbuf[i] = 0;
+	}
+
+	return 1;		/* The part of LFN is valid */
+}
+
+
+#if !_FS_READONLY
+static
+void fit_lfn (
+	const WCHAR* lfnbuf,	/* Pointer to the LFN working buffer */
+	BYTE* dir,				/* Pointer to the LFN entry to be processed */
+	BYTE ord,				/* LFN order (1-20) */
+	BYTE sum				/* Checksum of the corresponding SFN */
+)
+{
+	UINT i, s;
+	WCHAR wc;
+
+
+	dir[LDIR_Chksum] = sum;			/* Set checksum */
+	dir[LDIR_Attr] = AM_LFN;		/* Set attribute. LFN entry */
+	dir[LDIR_Type] = 0;
+	ST_WORD(dir + LDIR_FstClusLO, 0);
+
+	i = (ord - 1) * 13;				/* Get offset in the LFN working buffer */
+	s = wc = 0;
+	do {
+		if (wc != 0xFFFF) wc = lfnbuf[i++];	/* Get an effective character */
+		ST_WORD(dir+LfnOfs[s], wc);	/* Put it */
+		if (!wc) wc = 0xFFFF;		/* Padding characters following last character */
+	} while (++s < 13);
+	if (wc == 0xFFFF || !lfnbuf[i]) ord |= LLEF;	/* Bottom LFN part is the start of LFN sequence */
+	dir[LDIR_Ord] = ord;			/* Set the LFN order */
+}
+
+#endif
+#endif
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Create numbered name                                                  */
+/*-----------------------------------------------------------------------*/
+#if _USE_LFN
+static
+void gen_numname (
+	BYTE* dst,			/* Pointer to the buffer to store numbered SFN */
+	const BYTE* src,	/* Pointer to SFN */
+	const WCHAR* lfn,	/* Pointer to LFN */
+	UINT seq			/* Sequence number */
+)
+{
+	BYTE ns[8], c;
+	UINT i, j;
+	WCHAR wc;
+	DWORD sr;
+
+
+	mem_cpy(dst, src, 11);
+
+	if (seq > 5) {	/* On many collisions, generate a hash number instead of sequential number */
+		sr = seq;
+		while (*lfn) {	/* Create a CRC */
+			wc = *lfn++;
+			for (i = 0; i < 16; i++) {
+				sr = (sr << 1) + (wc & 1);
+				wc >>= 1;
+				if (sr & 0x10000) sr ^= 0x11021;
+			}
+		}
+		seq = (UINT)sr;
+	}
+
+	/* itoa (hexdecimal) */
+	i = 7;
+	do {
+		c = (seq % 16) + '0';
+		if (c > '9') c += 7;
+		ns[i--] = c;
+		seq /= 16;
+	} while (seq);
+	ns[i] = '~';
+
+	/* Append the number */
+	for (j = 0; j < i && dst[j] != ' '; j++) {
+		if (IsDBCS1(dst[j])) {
+			if (j == i - 1) break;
+			j++;
+		}
+	}
+	do {
+		dst[j++] = (i < 8) ? ns[i++] : ' ';
+	} while (j < 8);
+}
+#endif
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Calculate checksum of an SFN entry                                    */
+/*-----------------------------------------------------------------------*/
+#if _USE_LFN
+static
+BYTE sum_sfn (
+	const BYTE* dir		/* Pointer to the SFN entry */
+)
+{
+	BYTE sum = 0;
+	UINT n = 11;
+
+	do sum = (sum >> 1) + (sum << 7) + *dir++; while (--n);
+	return sum;
+}
+#endif
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Directory handling - Find an object in the directory                  */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT dir_find (	/* FR_OK(0):succeeded, !=0:error */
+	DIR* dp			/* Pointer to the directory object linked to the file name */
+)
+{
+	FRESULT res;
+	BYTE c, *dir;
+#if _USE_LFN
+	BYTE a, ord, sum;
+#endif
+
+	res = dir_sdi(dp, 0);			/* Rewind directory object */
+	if (res != FR_OK) return res;
+
+#if _USE_LFN
+	ord = sum = 0xFF; dp->lfn_idx = 0xFFFF;	/* Reset LFN sequence */
+#endif
+	do {
+		res = move_window(dp->fs, dp->sect);
+		if (res != FR_OK) break;
+		dir = dp->dir;					/* Ptr to the directory entry of current index */
+		c = dir[DIR_Name];
+		if (c == 0) { res = FR_NO_FILE; break; }	/* Reached to end of table */
+#if _USE_LFN	/* LFN configuration */
+		a = dir[DIR_Attr] & AM_MASK;
+		if (c == DDEM || ((a & AM_VOL) && a != AM_LFN)) {	/* An entry without valid data */
+			ord = 0xFF; dp->lfn_idx = 0xFFFF;	/* Reset LFN sequence */
+		} else {
+			if (a == AM_LFN) {			/* An LFN entry is found */
+				if (dp->lfn) {
+					if (c & LLEF) {		/* Is it start of LFN sequence? */
+						sum = dir[LDIR_Chksum];
+						c &= ~LLEF; ord = c;	/* LFN start order */
+						dp->lfn_idx = dp->index;	/* Start index of LFN */
+					}
+					/* Check validity of the LFN entry and compare it with given name */
+					ord = (c == ord && sum == dir[LDIR_Chksum] && cmp_lfn(dp->lfn, dir)) ? ord - 1 : 0xFF;
+				}
+			} else {					/* An SFN entry is found */
+				if (!ord && sum == sum_sfn(dir)) break;	/* LFN matched? */
+				if (!(dp->fn[NSFLAG] & NS_LOSS) && !mem_cmp(dir, dp->fn, 11)) break;	/* SFN matched? */
+				ord = 0xFF; dp->lfn_idx = 0xFFFF;	/* Reset LFN sequence */
+			}
+		}
+#else		/* Non LFN configuration */
+		if (!(dir[DIR_Attr] & AM_VOL) && !mem_cmp(dir, dp->fn, 11)) /* Is it a valid entry? */
+			break;
+#endif
+		res = dir_next(dp, 0);		/* Next entry */
+	} while (res == FR_OK);
+
+	return res;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Read an object from the directory                                     */
+/*-----------------------------------------------------------------------*/
+#if _FS_MINIMIZE <= 1 || _USE_LABEL || _FS_RPATH >= 2
+static
+FRESULT dir_read (
+	DIR* dp,		/* Pointer to the directory object */
+	int vol			/* Filtered by 0:file/directory or 1:volume label */
+)
+{
+	FRESULT res;
+	BYTE a, c, *dir;
+#if _USE_LFN
+	BYTE ord = 0xFF, sum = 0xFF;
+#endif
+
+	res = FR_NO_FILE;
+	while (dp->sect) {
+		res = move_window(dp->fs, dp->sect);
+		if (res != FR_OK) break;
+		dir = dp->dir;					/* Ptr to the directory entry of current index */
+		c = dir[DIR_Name];
+		if (c == 0) { res = FR_NO_FILE; break; }	/* Reached to end of table */
+		a = dir[DIR_Attr] & AM_MASK;
+#if _USE_LFN	/* LFN configuration */
+		if (c == DDEM || (!_FS_RPATH && c == '.') || (int)((a & ~AM_ARC) == AM_VOL) != vol) {	/* An entry without valid data */
+			ord = 0xFF;
+		} else {
+			if (a == AM_LFN) {			/* An LFN entry is found */
+				if (c & LLEF) {			/* Is it start of LFN sequence? */
+					sum = dir[LDIR_Chksum];
+					c &= ~LLEF; ord = c;
+					dp->lfn_idx = dp->index;
+				}
+				/* Check LFN validity and capture it */
+				ord = (c == ord && sum == dir[LDIR_Chksum] && pick_lfn(dp->lfn, dir)) ? ord - 1 : 0xFF;
+			} else {					/* An SFN entry is found */
+				if (ord || sum != sum_sfn(dir))	/* Is there a valid LFN? */
+					dp->lfn_idx = 0xFFFF;		/* It has no LFN. */
+				break;
+			}
+		}
+#else		/* Non LFN configuration */
+		if (c != DDEM && (_FS_RPATH || c != '.') && a != AM_LFN && (int)((a & ~AM_ARC) == AM_VOL) == vol)	/* Is it a valid entry? */
+			break;
+#endif
+		res = dir_next(dp, 0);				/* Next entry */
+		if (res != FR_OK) break;
+	}
+
+	if (res != FR_OK) dp->sect = 0;
+
+	return res;
+}
+#endif	/* _FS_MINIMIZE <= 1 || _USE_LABEL || _FS_RPATH >= 2 */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Register an object to the directory                                   */
+/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY
+static
+FRESULT dir_register (	/* FR_OK:succeeded, FR_DENIED:no free entry or too many SFN collision, FR_DISK_ERR:disk error */
+	DIR* dp				/* Target directory with object name to be created */
+)
+{
+	FRESULT res;
+#if _USE_LFN	/* LFN configuration */
+	UINT n, nent;
+	BYTE sn[12], *fn, sum;
+	WCHAR *lfn;
+
+
+	fn = dp->fn; lfn = dp->lfn;
+	mem_cpy(sn, fn, 12);
+
+	if (_FS_RPATH && (sn[NSFLAG] & NS_DOT))		/* Cannot create dot entry */
+		return FR_INVALID_NAME;
+
+	if (sn[NSFLAG] & NS_LOSS) {			/* When LFN is out of 8.3 format, generate a numbered name */
+		fn[NSFLAG] = 0; dp->lfn = 0;			/* Find only SFN */
+		for (n = 1; n < 100; n++) {
+			gen_numname(fn, sn, lfn, n);	/* Generate a numbered name */
+			res = dir_find(dp);				/* Check if the name collides with existing SFN */
+			if (res != FR_OK) break;
+		}
+		if (n == 100) return FR_DENIED;		/* Abort if too many collisions */
+		if (res != FR_NO_FILE) return res;	/* Abort if the result is other than 'not collided' */
+		fn[NSFLAG] = sn[NSFLAG]; dp->lfn = lfn;
+	}
+
+	if (sn[NSFLAG] & NS_LFN) {			/* When LFN is to be created, allocate entries for an SFN + LFNs. */
+		for (n = 0; lfn[n]; n++) ;
+		nent = (n + 25) / 13;
+	} else {						/* Otherwise allocate an entry for an SFN  */
+		nent = 1;
+	}
+	res = dir_alloc(dp, nent);		/* Allocate entries */
+
+	if (res == FR_OK && --nent) {	/* Set LFN entry if needed */
+		res = dir_sdi(dp, dp->index - nent);
+		if (res == FR_OK) {
+			sum = sum_sfn(dp->fn);	/* Checksum value of the SFN tied to the LFN */
+			do {					/* Store LFN entries in bottom first */
+				res = move_window(dp->fs, dp->sect);
+				if (res != FR_OK) break;
+				fit_lfn(dp->lfn, dp->dir, (BYTE)nent, sum);
+				dp->fs->wflag = 1;
+				res = dir_next(dp, 0);	/* Next entry */
+			} while (res == FR_OK && --nent);
+		}
+	}
+#else	/* Non LFN configuration */
+	res = dir_alloc(dp, 1);		/* Allocate an entry for SFN */
+#endif
+
+	if (res == FR_OK) {				/* Set SFN entry */
+		res = move_window(dp->fs, dp->sect);
+		if (res == FR_OK) {
+			mem_set(dp->dir, 0, SZ_DIRE);	/* Clean the entry */
+			mem_cpy(dp->dir, dp->fn, 11);	/* Put SFN */
+#if _USE_LFN
+			dp->dir[DIR_NTres] = dp->fn[NSFLAG] & (NS_BODY | NS_EXT);	/* Put NT flag */
+#endif
+			dp->fs->wflag = 1;
+		}
+	}
+
+	return res;
+}
+#endif /* !_FS_READONLY */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Remove an object from the directory                                   */
+/*-----------------------------------------------------------------------*/
+#if !_FS_READONLY && !_FS_MINIMIZE
+static
+FRESULT dir_remove (	/* FR_OK:Succeeded, FR_DISK_ERR:A disk error */
+	DIR* dp				/* Directory object pointing the entry to be removed */
+)
+{
+	FRESULT res;
+#if _USE_LFN	/* LFN configuration */
+	UINT i;
+
+	i = dp->index;	/* SFN index */
+	res = dir_sdi(dp, (dp->lfn_idx == 0xFFFF) ? i : dp->lfn_idx);	/* Goto the SFN or top of the LFN entries */
+	if (res == FR_OK) {
+		do {
+			res = move_window(dp->fs, dp->sect);
+			if (res != FR_OK) break;
+			mem_set(dp->dir, 0, SZ_DIRE);	/* Clear and mark the entry "deleted" */
+			*dp->dir = DDEM;
+			dp->fs->wflag = 1;
+			if (dp->index >= i) break;	/* When reached SFN, all entries of the object has been deleted. */
+			res = dir_next(dp, 0);		/* Next entry */
+		} while (res == FR_OK);
+		if (res == FR_NO_FILE) res = FR_INT_ERR;
+	}
+
+#else			/* Non LFN configuration */
+	res = dir_sdi(dp, dp->index);
+	if (res == FR_OK) {
+		res = move_window(dp->fs, dp->sect);
+		if (res == FR_OK) {
+			mem_set(dp->dir, 0, SZ_DIRE);	/* Clear and mark the entry "deleted" */
+			*dp->dir = DDEM;
+			dp->fs->wflag = 1;
+		}
+	}
+#endif
+
+	return res;
+}
+#endif /* !_FS_READONLY */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Get file information from directory entry                             */
+/*-----------------------------------------------------------------------*/
+#if _FS_MINIMIZE <= 1 || _FS_RPATH >= 2
+static
+void get_fileinfo (		/* No return code */
+	DIR* dp,			/* Pointer to the directory object */
+	FILINFO* fno	 	/* Pointer to the file information to be filled */
+)
+{
+	UINT i;
+	TCHAR *p, c;
+	BYTE *dir;
+#if _USE_LFN
+	WCHAR w, *lfn;
+#endif
+
+	p = fno->fname;
+	if (dp->sect) {		/* Get SFN */
+		dir = dp->dir;
+		i = 0;
+		while (i < 11) {		/* Copy name body and extension */
+			c = (TCHAR)dir[i++];
+			if (c == ' ') continue;				/* Skip padding spaces */
+			if (c == RDDEM) c = (TCHAR)DDEM;	/* Restore replaced DDEM character */
+			if (i == 9) *p++ = '.';				/* Insert a . if extension is exist */
+#if _USE_LFN
+			if (IsUpper(c) && (dir[DIR_NTres] & (i >= 9 ? NS_EXT : NS_BODY)))
+				c += 0x20;			/* To lower */
+#if _LFN_UNICODE
+			if (IsDBCS1(c) && i != 8 && i != 11 && IsDBCS2(dir[i]))
+				c = c << 8 | dir[i++];
+			c = ff_convert(c, 1);	/* OEM -> Unicode */
+			if (!c) c = '?';
+#endif
+#endif
+			*p++ = c;
+		}
+		fno->fattrib = dir[DIR_Attr];				/* Attribute */
+		fno->fsize = LD_DWORD(dir + DIR_FileSize);	/* Size */
+		fno->fdate = LD_WORD(dir + DIR_WrtDate);	/* Date */
+		fno->ftime = LD_WORD(dir + DIR_WrtTime);	/* Time */
+	}
+	*p = 0;		/* Terminate SFN string by a \0 */
+
+#if _USE_LFN
+	if (fno->lfname) {
+		i = 0; p = fno->lfname;
+		if (dp->sect && fno->lfsize && dp->lfn_idx != 0xFFFF) {	/* Get LFN if available */
+			lfn = dp->lfn;
+			while ((w = *lfn++) != 0) {		/* Get an LFN character */
+#if !_LFN_UNICODE
+				w = ff_convert(w, 0);		/* Unicode -> OEM */
+				if (!w) { i = 0; break; }	/* No LFN if it could not be converted */
+				if (_DF1S && w >= 0x100)	/* Put 1st byte if it is a DBC (always false on SBCS cfg) */
+					p[i++] = (TCHAR)(w >> 8);
+#endif
+				if (i >= fno->lfsize - 1) { i = 0; break; }	/* No LFN if buffer overflow */
+				p[i++] = (TCHAR)w;
+			}
+		}
+		p[i] = 0;	/* Terminate LFN string by a \0 */
+	}
+#endif
+}
+#endif /* _FS_MINIMIZE <= 1 || _FS_RPATH >= 2 */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Pattern matching                                                      */
+/*-----------------------------------------------------------------------*/
+#if _USE_FIND && _FS_MINIMIZE <= 1
+static
+WCHAR get_achar (		/* Get a character and advances ptr 1 or 2 */
+	const TCHAR** ptr	/* Pointer to pointer to the SBCS/DBCS/Unicode string */
+)
+{
+	WCHAR chr;
+
+#if !_LFN_UNICODE
+	chr = (BYTE)*(*ptr)++;					/* Get a byte */
+	if (IsLower(chr)) chr -= 0x20;			/* To upper ASCII char */
+	if (IsDBCS1(chr) && IsDBCS2(**ptr))		/* Get DBC 2nd byte if needed */
+		chr = chr << 8 | (BYTE)*(*ptr)++;
+#ifdef _EXCVT
+	if (chr >= 0x80) chr = ExCvt[chr - 0x80];	/* To upper SBCS extended char */
+#endif
+#else
+	chr = ff_wtoupper(*(*ptr)++);			/* Get a word and to upper */
+#endif
+	return chr;
+}
+
+
+static
+int pattern_matching (	/* 0:mismatched, 1:matched */
+	const TCHAR* pat,	/* Matching pattern */
+	const TCHAR* nam,	/* String to be tested */
+	int skip,			/* Number of pre-skip chars (number of ?s) */
+	int inf				/* Infinite search (* specified) */
+)
+{
+	const TCHAR *pp, *np;
+	WCHAR pc, nc;
+	int nm, nx;
+
+
+	while (skip--) {				/* Pre-skip name chars */
+		if (!get_achar(&nam)) return 0;	/* Branch mismatched if less name chars */
+	}
+	if (!*pat && inf) return 1;		/* (short circuit) */
+
+	do {
+		pp = pat; np = nam;			/* Top of pattern and name to match */
+		for (;;) {
+			if (*pp == '?' || *pp == '*') {	/* Wildcard? */
+				nm = nx = 0;
+				do {				/* Analyze the wildcard chars */
+					if (*pp++ == '?') nm++; else nx = 1;
+				} while (*pp == '?' || *pp == '*');
+				if (pattern_matching(pp, np, nm, nx)) return 1;	/* Test new branch (recurs upto number of wildcard blocks in the pattern) */
+				nc = *np; break;	/* Branch mismatched */
+			}
+			pc = get_achar(&pp);	/* Get a pattern char */
+			nc = get_achar(&np);	/* Get a name char */
+			if (pc != nc) break;	/* Branch mismatched? */
+			if (!pc) return 1;		/* Branch matched? (matched at end of both strings) */
+		}
+		get_achar(&nam);			/* nam++ */
+	} while (inf && nc);			/* Retry until end of name if infinite search is specified */
+
+	return 0;
+}
+#endif /* _USE_FIND && _FS_MINIMIZE <= 1 */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Pick a top segment and create the object name in directory form       */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT create_name (	/* FR_OK: successful, FR_INVALID_NAME: could not create */
+	DIR* dp,			/* Pointer to the directory object */
+	const TCHAR** path	/* Pointer to pointer to the segment in the path string */
+)
+{
+#if _USE_LFN	/* LFN configuration */
+	BYTE b, cf;
+	WCHAR w, *lfn;
+	UINT i, ni, si, di;
+	const TCHAR *p;
+
+	/* Create LFN in Unicode */
+	for (p = *path; *p == '/' || *p == '\\'; p++) ;	/* Strip duplicated separator */
+	lfn = dp->lfn;
+	si = di = 0;
+	for (;;) {
+		w = p[si++];					/* Get a character */
+		if (w < ' ' || w == '/' || w == '\\') break;	/* Break on end of segment */
+		if (di >= _MAX_LFN)				/* Reject too long name */
+			return FR_INVALID_NAME;
+#if !_LFN_UNICODE
+		w &= 0xFF;
+		if (IsDBCS1(w)) {				/* Check if it is a DBC 1st byte (always false on SBCS cfg) */
+			b = (BYTE)p[si++];			/* Get 2nd byte */
+			w = (w << 8) + b;			/* Create a DBC */
+			if (!IsDBCS2(b))
+				return FR_INVALID_NAME;	/* Reject invalid sequence */
+		}
+		w = ff_convert(w, 1);			/* Convert ANSI/OEM to Unicode */
+		if (!w) return FR_INVALID_NAME;	/* Reject invalid code */
+#endif
+		if (w < 0x80 && chk_chr("\"*:<>\?|\x7F", w)) /* Reject illegal characters for LFN */
+			return FR_INVALID_NAME;
+		lfn[di++] = w;					/* Store the Unicode character */
+	}
+	*path = &p[si];						/* Return pointer to the next segment */
+	cf = (w < ' ') ? NS_LAST : 0;		/* Set last segment flag if end of path */
+#if _FS_RPATH
+	if ((di == 1 && lfn[di - 1] == '.') ||
+		(di == 2 && lfn[di - 1] == '.' && lfn[di - 2] == '.')) {	/* Is this segment a dot entry? */
+		lfn[di] = 0;
+		for (i = 0; i < 11; i++)		/* Create dot name for SFN entry */
+			dp->fn[i] = (i < di) ? '.' : ' ';
+		dp->fn[i] = cf | NS_DOT;		/* This is a dot entry */
+		return FR_OK;
+	}
+#endif
+	while (di) {						/* Snip off trailing spaces and dots if exist */
+		w = lfn[di - 1];
+		if (w != ' ' && w != '.') break;
+		di--;
+	}
+	if (!di) return FR_INVALID_NAME;	/* Reject nul string */
+	lfn[di] = 0;						/* LFN is created */
+
+	/* Create SFN in directory form */
+	mem_set(dp->fn, ' ', 11);
+	for (si = 0; lfn[si] == ' ' || lfn[si] == '.'; si++) ;	/* Strip leading spaces and dots */
+	if (si) cf |= NS_LOSS | NS_LFN;
+	while (di && lfn[di - 1] != '.') di--;	/* Find extension (di<=si: no extension) */
+
+	b = i = 0; ni = 8;
+	for (;;) {
+		w = lfn[si++];					/* Get an LFN character */
+		if (!w) break;					/* Break on end of the LFN */
+		if (w == ' ' || (w == '.' && si != di)) {	/* Remove spaces and dots */
+			cf |= NS_LOSS | NS_LFN; continue;
+		}
+
+		if (i >= ni || si == di) {		/* Extension or end of SFN */
+			if (ni == 11) {				/* Long extension */
+				cf |= NS_LOSS | NS_LFN; break;
+			}
+			if (si != di) cf |= NS_LOSS | NS_LFN;	/* Out of 8.3 format */
+			if (si > di) break;			/* No extension */
+			si = di; i = 8; ni = 11;	/* Enter extension section */
+			b <<= 2; continue;
+		}
+
+		if (w >= 0x80) {				/* Non ASCII character */
+#ifdef _EXCVT
+			w = ff_convert(w, 0);		/* Unicode -> OEM code */
+			if (w) w = ExCvt[w - 0x80];	/* Convert extended character to upper (SBCS) */
+#else
+			w = ff_convert(ff_wtoupper(w), 0);	/* Upper converted Unicode -> OEM code */
+#endif
+			cf |= NS_LFN;				/* Force create LFN entry */
+		}
+
+		if (_DF1S && w >= 0x100) {		/* Is this DBC? (always false at SBCS cfg) */
+			if (i >= ni - 1) {
+				cf |= NS_LOSS | NS_LFN; i = ni; continue;
+			}
+			dp->fn[i++] = (BYTE)(w >> 8);
+		} else {						/* SBC */
+			if (!w || chk_chr("+,;=[]", w)) {	/* Replace illegal characters for SFN */
+				w = '_'; cf |= NS_LOSS | NS_LFN;/* Lossy conversion */
+			} else {
+				if (IsUpper(w)) {		/* ASCII large capital */
+					b |= 2;
+				} else {
+					if (IsLower(w)) {	/* ASCII small capital */
+						b |= 1; w -= 0x20;
+					}
+				}
+			}
+		}
+		dp->fn[i++] = (BYTE)w;
+	}
+
+	if (dp->fn[0] == DDEM) dp->fn[0] = RDDEM;	/* If the first character collides with DDEM, replace it with RDDEM */
+
+	if (ni == 8) b <<= 2;
+	if ((b & 0x0C) == 0x0C || (b & 0x03) == 0x03)	/* Create LFN entry when there are composite capitals */
+		cf |= NS_LFN;
+	if (!(cf & NS_LFN)) {						/* When LFN is in 8.3 format without extended character, NT flags are created */
+		if ((b & 0x03) == 0x01) cf |= NS_EXT;	/* NT flag (Extension has only small capital) */
+		if ((b & 0x0C) == 0x04) cf |= NS_BODY;	/* NT flag (Filename has only small capital) */
+	}
+
+	dp->fn[NSFLAG] = cf;	/* SFN is created */
+
+	return FR_OK;
+
+
+#else	/* Non-LFN configuration */
+	BYTE b, c, d, *sfn;
+	UINT ni, si, i;
+	const char *p;
+
+	/* Create file name in directory form */
+	for (p = *path; *p == '/' || *p == '\\'; p++) ;	/* Skip duplicated separator */
+	sfn = dp->fn;
+	mem_set(sfn, ' ', 11);
+	si = i = b = 0; ni = 8;
+#if _FS_RPATH
+	if (p[si] == '.') { /* Is this a dot entry? */
+		for (;;) {
+			c = (BYTE)p[si++];
+			if (c != '.' || si >= 3) break;
+			sfn[i++] = c;
+		}
+		if (c != '/' && c != '\\' && c > ' ') return FR_INVALID_NAME;
+		*path = &p[si];									/* Return pointer to the next segment */
+		sfn[NSFLAG] = (c <= ' ') ? NS_LAST | NS_DOT : NS_DOT;	/* Set last segment flag if end of path */
+		return FR_OK;
+	}
+#endif
+	for (;;) {
+		c = (BYTE)p[si++];
+		if (c <= ' ' || c == '/' || c == '\\') break;	/* Break on end of segment */
+		if (c == '.' || i >= ni) {
+			if (ni != 8 || c != '.') return FR_INVALID_NAME;
+			i = 8; ni = 11;
+			b <<= 2; continue;
+		}
+		if (c >= 0x80) {				/* Extended character? */
+			b |= 3;						/* Eliminate NT flag */
+#ifdef _EXCVT
+			c = ExCvt[c - 0x80];		/* To upper extended characters (SBCS cfg) */
+#else
+#if !_DF1S
+			return FR_INVALID_NAME;		/* Reject extended characters (ASCII cfg) */
+#endif
+#endif
+		}
+		if (IsDBCS1(c)) {				/* Check if it is a DBC 1st byte (always false at SBCS cfg.) */
+			d = (BYTE)p[si++];			/* Get 2nd byte */
+			if (!IsDBCS2(d) || i >= ni - 1)	/* Reject invalid DBC */
+				return FR_INVALID_NAME;
+			sfn[i++] = c;
+			sfn[i++] = d;
+		} else {						/* SBC */
+			if (chk_chr("\"*+,:;<=>\?[]|\x7F", c))	/* Reject illegal chrs for SFN */
+				return FR_INVALID_NAME;
+			if (IsUpper(c)) {			/* ASCII large capital? */
+				b |= 2;
+			} else {
+				if (IsLower(c)) {		/* ASCII small capital? */
+					b |= 1; c -= 0x20;
+				}
+			}
+			sfn[i++] = c;
+		}
+	}
+	*path = &p[si];						/* Return pointer to the next segment */
+	c = (c <= ' ') ? NS_LAST : 0;		/* Set last segment flag if end of path */
+
+	if (!i) return FR_INVALID_NAME;		/* Reject nul string */
+	if (sfn[0] == DDEM) sfn[0] = RDDEM;	/* When first character collides with DDEM, replace it with RDDEM */
+
+	if (ni == 8) b <<= 2;
+	if ((b & 0x03) == 0x01) c |= NS_EXT;	/* NT flag (Name extension has only small capital) */
+	if ((b & 0x0C) == 0x04) c |= NS_BODY;	/* NT flag (Name body has only small capital) */
+
+	sfn[NSFLAG] = c;		/* Store NT flag, File name is created */
+
+	return FR_OK;
+#endif
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Follow a file path                                                    */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT follow_path (	/* FR_OK(0): successful, !=0: error code */
+	DIR* dp,			/* Directory object to return last directory and found object */
+	const TCHAR* path	/* Full-path string to find a file or directory */
+)
+{
+	FRESULT res;
+	BYTE *dir, ns;
+
+
+#if _FS_RPATH
+	if (*path == '/' || *path == '\\') {	/* There is a heading separator */
+		path++;	dp->sclust = 0;				/* Strip it and start from the root directory */
+	} else {								/* No heading separator */
+		dp->sclust = dp->fs->cdir;			/* Start from the current directory */
+	}
+#else
+	if (*path == '/' || *path == '\\')		/* Strip heading separator if exist */
+		path++;
+	dp->sclust = 0;							/* Always start from the root directory */
+#endif
+
+	if ((UINT)*path < ' ') {				/* Null path name is the origin directory itself */
+		res = dir_sdi(dp, 0);
+		dp->dir = 0;
+	} else {								/* Follow path */
+		for (;;) {
+			res = create_name(dp, &path);	/* Get a segment name of the path */
+			if (res != FR_OK) break;
+			res = dir_find(dp);				/* Find an object with the sagment name */
+			ns = dp->fn[NSFLAG];
+			if (res != FR_OK) {				/* Failed to find the object */
+				if (res == FR_NO_FILE) {	/* Object is not found */
+					if (_FS_RPATH && (ns & NS_DOT)) {	/* If dot entry is not exist, */
+						dp->sclust = 0; dp->dir = 0;	/* it is the root directory and stay there */
+						if (!(ns & NS_LAST)) continue;	/* Continue to follow if not last segment */
+						res = FR_OK;					/* Ended at the root directroy. Function completed. */
+					} else {							/* Could not find the object */
+						if (!(ns & NS_LAST)) res = FR_NO_PATH;	/* Adjust error code if not last segment */
+					}
+				}
+				break;
+			}
+			if (ns & NS_LAST) break;			/* Last segment matched. Function completed. */
+			dir = dp->dir;						/* Follow the sub-directory */
+			if (!(dir[DIR_Attr] & AM_DIR)) {	/* It is not a sub-directory and cannot follow */
+				res = FR_NO_PATH; break;
+			}
+			dp->sclust = ld_clust(dp->fs, dir);
+		}
+	}
+
+	return res;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Get logical drive number from path name                               */
+/*-----------------------------------------------------------------------*/
+
+static
+int get_ldnumber (		/* Returns logical drive number (-1:invalid drive) */
+	const TCHAR** path	/* Pointer to pointer to the path name */
+)
+{
+	const TCHAR *tp, *tt;
+	UINT i;
+	int vol = -1;
+#if _STR_VOLUME_ID		/* Find string drive id */
+	static const char* const str[] = {_VOLUME_STRS};
+	const char *sp;
+	char c;
+	TCHAR tc;
+#endif
+
+
+	if (*path) {	/* If the pointer is not a null */
+		for (tt = *path; (UINT)*tt >= (_USE_LFN ? ' ' : '!') && *tt != ':'; tt++) ;	/* Find ':' in the path */
+		if (*tt == ':') {	/* If a ':' is exist in the path name */
+			tp = *path;
+			i = *tp++ - '0'; 
+			if (i < 10 && tp == tt) {	/* Is there a numeric drive id? */
+				if (i < _VOLUMES) {	/* If a drive id is found, get the value and strip it */
+					vol = (int)i;
+					*path = ++tt;
+				}
+			}
+#if _STR_VOLUME_ID
+			 else {	/* No numeric drive number, find string drive id */
+				i = 0; tt++;
+				do {
+					sp = str[i]; tp = *path;
+					do {	/* Compare a string drive id with path name */
+						c = *sp++; tc = *tp++;
+						if (IsLower(tc)) tc -= 0x20;
+					} while (c && (TCHAR)c == tc);
+				} while ((c || tp != tt) && ++i < _VOLUMES);	/* Repeat for each id until pattern match */
+				if (i < _VOLUMES) {	/* If a drive id is found, get the value and strip it */
+					vol = (int)i;
+					*path = tt;
+				}
+			}
+#endif
+			return vol;
+		}
+#if _FS_RPATH && _VOLUMES >= 2
+		vol = CurrVol;	/* Current drive */
+#else
+		vol = 0;		/* Drive 0 */
+#endif
+	}
+	return vol;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Load a sector and check if it is an FAT boot sector                   */
+/*-----------------------------------------------------------------------*/
+
+static
+BYTE check_fs (	/* 0:Valid FAT-BS, 1:Valid BS but not FAT, 2:Not a BS, 3:Disk error */
+	FATFS* fs,	/* File system object */
+	DWORD sect	/* Sector# (lba) to check if it is an FAT boot record or not */
+)
+{
+	fs->wflag = 0; fs->winsect = 0xFFFFFFFF;	/* Invaidate window */
+	if (move_window(fs, sect) != FR_OK)			/* Load boot record */
+		return 3;
+
+	if (LD_WORD(&fs->win[BS_55AA]) != 0xAA55)	/* Check boot record signature (always placed at offset 510 even if the sector size is >512) */
+		return 2;
+
+	if ((LD_DWORD(&fs->win[BS_FilSysType]) & 0xFFFFFF) == 0x544146)		/* Check "FAT" string */
+		return 0;
+	if ((LD_DWORD(&fs->win[BS_FilSysType32]) & 0xFFFFFF) == 0x544146)	/* Check "FAT" string */
+		return 0;
+
+	return 1;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Find logical drive and check if the volume is mounted                 */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT find_volume (	/* FR_OK(0): successful, !=0: any error occurred */
+	FATFS** rfs,		/* Pointer to pointer to the found file system object */
+	const TCHAR** path,	/* Pointer to pointer to the path name (drive number) */
+	BYTE wmode			/* !=0: Check write protection for write access */
+)
+{
+	BYTE fmt, *pt;
+	int vol;
+	DSTATUS stat;
+	DWORD bsect, fasize, tsect, sysect, nclst, szbfat, br[4];
+	WORD nrsv;
+	FATFS *fs;
+	UINT i;
+
+
+	/* Get logical drive number from the path name */
+	*rfs = 0;
+	vol = get_ldnumber(path);
+	if (vol < 0) return FR_INVALID_DRIVE;
+
+	/* Check if the file system object is valid or not */
+	fs = FatFs[vol];					/* Get pointer to the file system object */
+	if (!fs) return FR_NOT_ENABLED;		/* Is the file system object available? */
+
+	ENTER_FF(fs);						/* Lock the volume */
+	*rfs = fs;							/* Return pointer to the file system object */
+
+	if (fs->fs_type) {					/* If the volume has been mounted */
+		stat = disk_status(fs->drv);
+		if (!(stat & STA_NOINIT)) {		/* and the physical drive is kept initialized */
+			if (!_FS_READONLY && wmode && (stat & STA_PROTECT))	/* Check write protection if needed */
+				return FR_WRITE_PROTECTED;
+			return FR_OK;				/* The file system object is valid */
+		}
+	}
+
+	/* The file system object is not valid. */
+	/* Following code attempts to mount the volume. (analyze BPB and initialize the fs object) */
+
+	fs->fs_type = 0;					/* Clear the file system object */
+	fs->drv = LD2PD(vol);				/* Bind the logical drive and a physical drive */
+	stat = disk_initialize(fs->drv);	/* Initialize the physical drive */
+	if (stat & STA_NOINIT)				/* Check if the initialization succeeded */
+		return FR_NOT_READY;			/* Failed to initialize due to no medium or hard error */
+	if (!_FS_READONLY && wmode && (stat & STA_PROTECT))	/* Check disk write protection if needed */
+		return FR_WRITE_PROTECTED;
+#if _MAX_SS != _MIN_SS						/* Get sector size (multiple sector size cfg only) */
+	if (disk_ioctl(fs->drv, GET_SECTOR_SIZE, &SS(fs)) != RES_OK
+		|| SS(fs) < _MIN_SS || SS(fs) > _MAX_SS) return FR_DISK_ERR;
+#endif
+	/* Find an FAT partition on the drive. Supports only generic partitioning, FDISK and SFD. */
+	bsect = 0;
+	fmt = check_fs(fs, bsect);					/* Load sector 0 and check if it is an FAT boot sector as SFD */
+	if (fmt == 1 || (!fmt && (LD2PT(vol)))) {	/* Not an FAT boot sector or forced partition number */
+		for (i = 0; i < 4; i++) {			/* Get partition offset */
+			pt = fs->win + MBR_Table + i * SZ_PTE;
+			br[i] = pt[4] ? LD_DWORD(&pt[8]) : 0;
+		}
+		i = LD2PT(vol);						/* Partition number: 0:auto, 1-4:forced */
+		if (i) i--;
+		do {								/* Find an FAT volume */
+			bsect = br[i];
+			fmt = bsect ? check_fs(fs, bsect) : 2;	/* Check the partition */
+		} while (!LD2PT(vol) && fmt && ++i < 4);
+	}
+	if (fmt == 3) return FR_DISK_ERR;		/* An error occured in the disk I/O layer */
+	if (fmt) return FR_NO_FILESYSTEM;		/* No FAT volume is found */
+
+	/* An FAT volume is found. Following code initializes the file system object */
+
+	if (LD_WORD(fs->win + BPB_BytsPerSec) != SS(fs))	/* (BPB_BytsPerSec must be equal to the physical sector size) */
+		return FR_NO_FILESYSTEM;
+
+	fasize = LD_WORD(fs->win + BPB_FATSz16);			/* Number of sectors per FAT */
+	if (!fasize) fasize = LD_DWORD(fs->win + BPB_FATSz32);
+	fs->fsize = fasize;
+
+	fs->n_fats = fs->win[BPB_NumFATs];					/* Number of FAT copies */
+	if (fs->n_fats != 1 && fs->n_fats != 2)				/* (Must be 1 or 2) */
+		return FR_NO_FILESYSTEM;
+	fasize *= fs->n_fats;								/* Number of sectors for FAT area */
+
+	fs->csize = fs->win[BPB_SecPerClus];				/* Number of sectors per cluster */
+	if (!fs->csize || (fs->csize & (fs->csize - 1)))	/* (Must be power of 2) */
+		return FR_NO_FILESYSTEM;
+
+	fs->n_rootdir = LD_WORD(fs->win + BPB_RootEntCnt);	/* Number of root directory entries */
+	if (fs->n_rootdir % (SS(fs) / SZ_DIRE))				/* (Must be sector aligned) */
+		return FR_NO_FILESYSTEM;
+
+	tsect = LD_WORD(fs->win + BPB_TotSec16);			/* Number of sectors on the volume */
+	if (!tsect) tsect = LD_DWORD(fs->win + BPB_TotSec32);
+
+	nrsv = LD_WORD(fs->win + BPB_RsvdSecCnt);			/* Number of reserved sectors */
+	if (!nrsv) return FR_NO_FILESYSTEM;					/* (Must not be 0) */
+
+	/* Determine the FAT sub type */
+	sysect = nrsv + fasize + fs->n_rootdir / (SS(fs) / SZ_DIRE);	/* RSV + FAT + DIR */
+	if (tsect < sysect) return FR_NO_FILESYSTEM;		/* (Invalid volume size) */
+	nclst = (tsect - sysect) / fs->csize;				/* Number of clusters */
+	if (!nclst) return FR_NO_FILESYSTEM;				/* (Invalid volume size) */
+	fmt = FS_FAT12;
+	if (nclst >= MIN_FAT16) fmt = FS_FAT16;
+	if (nclst >= MIN_FAT32) fmt = FS_FAT32;
+
+	/* Boundaries and Limits */
+	fs->n_fatent = nclst + 2;							/* Number of FAT entries */
+	fs->volbase = bsect;								/* Volume start sector */
+	fs->fatbase = bsect + nrsv; 						/* FAT start sector */
+	fs->database = bsect + sysect;						/* Data start sector */
+	if (fmt == FS_FAT32) {
+		if (fs->n_rootdir) return FR_NO_FILESYSTEM;		/* (BPB_RootEntCnt must be 0) */
+		fs->dirbase = LD_DWORD(fs->win + BPB_RootClus);	/* Root directory start cluster */
+		szbfat = fs->n_fatent * 4;						/* (Needed FAT size) */
+	} else {
+		if (!fs->n_rootdir)	return FR_NO_FILESYSTEM;	/* (BPB_RootEntCnt must not be 0) */
+		fs->dirbase = fs->fatbase + fasize;				/* Root directory start sector */
+		szbfat = (fmt == FS_FAT16) ?					/* (Needed FAT size) */
+			fs->n_fatent * 2 : fs->n_fatent * 3 / 2 + (fs->n_fatent & 1);
+	}
+	if (fs->fsize < (szbfat + (SS(fs) - 1)) / SS(fs))	/* (BPB_FATSz must not be less than the size needed) */
+		return FR_NO_FILESYSTEM;
+
+#if !_FS_READONLY
+	/* Initialize cluster allocation information */
+	fs->last_clust = fs->free_clust = 0xFFFFFFFF;
+
+	/* Get fsinfo if available */
+	fs->fsi_flag = 0x80;
+#if (_FS_NOFSINFO & 3) != 3
+	if (fmt == FS_FAT32				/* Enable FSINFO only if FAT32 and BPB_FSInfo == 1 */
+		&& LD_WORD(fs->win + BPB_FSInfo) == 1
+		&& move_window(fs, bsect + 1) == FR_OK)
+	{
+		fs->fsi_flag = 0;
+		if (LD_WORD(fs->win + BS_55AA) == 0xAA55	/* Load FSINFO data if available */
+			&& LD_DWORD(fs->win + FSI_LeadSig) == 0x41615252
+			&& LD_DWORD(fs->win + FSI_StrucSig) == 0x61417272)
+		{
+#if (_FS_NOFSINFO & 1) == 0
+			fs->free_clust = LD_DWORD(fs->win + FSI_Free_Count);
+#endif
+#if (_FS_NOFSINFO & 2) == 0
+			fs->last_clust = LD_DWORD(fs->win + FSI_Nxt_Free);
+#endif
+		}
+	}
+#endif
+#endif
+	fs->fs_type = fmt;	/* FAT sub-type */
+	fs->id = ++Fsid;	/* File system mount ID */
+#if _FS_RPATH
+	fs->cdir = 0;		/* Set current directory to root */
+#endif
+#if _FS_LOCK			/* Clear file lock semaphores */
+	clear_lock(fs);
+#endif
+
+	return FR_OK;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Check if the file/directory object is valid or not                    */
+/*-----------------------------------------------------------------------*/
+
+static
+FRESULT validate (	/* FR_OK(0): The object is valid, !=0: Invalid */
+	void* obj		/* Pointer to the object FIL/DIR to check validity */
+)
+{
+	FIL *fil = (FIL*)obj;	/* Assuming offset of .fs and .id in the FIL/DIR structure is identical */
+
+
+	if (!fil || !fil->fs || !fil->fs->fs_type || fil->fs->id != fil->id || (disk_status(fil->fs->drv) & STA_NOINIT))
+		return FR_INVALID_OBJECT;
+
+	ENTER_FF(fil->fs);		/* Lock file system */
+
+	return FR_OK;
+}
+
+
+
+
+/*--------------------------------------------------------------------------
+
+   Public Functions
+
+---------------------------------------------------------------------------*/
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Mount/Unmount a Logical Drive                                         */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_mount (
+	FATFS* fs,			/* Pointer to the file system object (NULL:unmount)*/
+	const TCHAR* path,	/* Logical drive number to be mounted/unmounted */
+	BYTE opt			/* 0:Do not mount (delayed mount), 1:Mount immediately */
+)
+{
+	FATFS *cfs;
+	int vol;
+	FRESULT res;
+	const TCHAR *rp = path;
+
+
+	vol = get_ldnumber(&rp);
+	if (vol < 0) return FR_INVALID_DRIVE;
+	cfs = FatFs[vol];					/* Pointer to fs object */
+
+	if (cfs) {
+#if _FS_LOCK
+		clear_lock(cfs);
+#endif
+#if _FS_REENTRANT						/* Discard sync object of the current volume */
+		if (!ff_del_syncobj(cfs->sobj)) return FR_INT_ERR;
+#endif
+		cfs->fs_type = 0;				/* Clear old fs object */
+	}
+
+	if (fs) {
+		fs->fs_type = 0;				/* Clear new fs object */
+#if _FS_REENTRANT						/* Create sync object for the new volume */
+		if (!ff_cre_syncobj((BYTE)vol, &fs->sobj)) return FR_INT_ERR;
+#endif
+	}
+	FatFs[vol] = fs;					/* Register new fs object */
+
+	if (!fs || opt != 1) return FR_OK;	/* Do not mount now, it will be mounted later */
+
+	res = find_volume(&fs, &path, 0);	/* Force mounted the volume */
+	LEAVE_FF(fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Open or Create a File                                                 */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_open (
+	FIL* fp,			/* Pointer to the blank file object */
+	const TCHAR* path,	/* Pointer to the file name */
+	BYTE mode			/* Access mode and file open mode flags */
+)
+{
+	FRESULT res;
+	DIR dj;
+	BYTE *dir;
+	DEFINE_NAMEBUF;
+#if !_FS_READONLY
+	DWORD dw, cl;
+#endif
+
+
+	if (!fp) return FR_INVALID_OBJECT;
+	fp->fs = 0;			/* Clear file object */
+
+	/* Get logical drive number */
+#if !_FS_READONLY
+	mode &= FA_READ | FA_WRITE | FA_CREATE_ALWAYS | FA_OPEN_ALWAYS | FA_CREATE_NEW;
+	res = find_volume(&dj.fs, &path, (BYTE)(mode & ~FA_READ));
+#else
+	mode &= FA_READ;
+	res = find_volume(&dj.fs, &path, 0);
+#endif
+	if (res == FR_OK) {
+		INIT_BUF(dj);
+		res = follow_path(&dj, path);	/* Follow the file path */
+		dir = dj.dir;
+#if !_FS_READONLY	/* R/W configuration */
+		if (res == FR_OK) {
+			if (!dir)	/* Default directory itself */
+				res = FR_INVALID_NAME;
+#if _FS_LOCK
+			else
+				res = chk_lock(&dj, (mode & ~FA_READ) ? 1 : 0);
+#endif
+		}
+		/* Create or Open a file */
+		if (mode & (FA_CREATE_ALWAYS | FA_OPEN_ALWAYS | FA_CREATE_NEW)) {
+			if (res != FR_OK) {					/* No file, create new */
+				if (res == FR_NO_FILE)			/* There is no file to open, create a new entry */
+#if _FS_LOCK
+					res = enq_lock() ? dir_register(&dj) : FR_TOO_MANY_OPEN_FILES;
+#else
+					res = dir_register(&dj);
+#endif
+				mode |= FA_CREATE_ALWAYS;		/* File is created */
+				dir = dj.dir;					/* New entry */
+			}
+			else {								/* Any object is already existing */
+				if (dir[DIR_Attr] & (AM_RDO | AM_DIR)) {	/* Cannot overwrite it (R/O or DIR) */
+					res = FR_DENIED;
+				} else {
+					if (mode & FA_CREATE_NEW)	/* Cannot create as new file */
+						res = FR_EXIST;
+				}
+			}
+			if (res == FR_OK && (mode & FA_CREATE_ALWAYS)) {	/* Truncate it if overwrite mode */
+				dw = GET_FATTIME();
+				ST_DWORD(dir + DIR_CrtTime, dw);/* Set created time */
+				ST_DWORD(dir + DIR_WrtTime, dw);/* Set modified time */
+				dir[DIR_Attr] = 0;				/* Reset attribute */
+				ST_DWORD(dir + DIR_FileSize, 0);/* Reset file size */
+				cl = ld_clust(dj.fs, dir);		/* Get cluster chain */
+				st_clust(dir, 0);				/* Reset cluster */
+				dj.fs->wflag = 1;
+				if (cl) {						/* Remove the cluster chain if exist */
+					dw = dj.fs->winsect;
+					res = remove_chain(dj.fs, cl);
+					if (res == FR_OK) {
+						dj.fs->last_clust = cl - 1;	/* Reuse the cluster hole */
+						res = move_window(dj.fs, dw);
+					}
+				}
+			}
+		}
+		else {	/* Open an existing file */
+			if (res == FR_OK) {					/* Following succeeded */
+				if (dir[DIR_Attr] & AM_DIR) {	/* It is a directory */
+					res = FR_NO_FILE;
+				} else {
+					if ((mode & FA_WRITE) && (dir[DIR_Attr] & AM_RDO)) /* R/O violation */
+						res = FR_DENIED;
+				}
+			}
+		}
+		if (res == FR_OK) {
+			if (mode & FA_CREATE_ALWAYS)		/* Set file change flag if created or overwritten */
+				mode |= FA__WRITTEN;
+			fp->dir_sect = dj.fs->winsect;		/* Pointer to the directory entry */
+			fp->dir_ptr = dir;
+#if _FS_LOCK
+			fp->lockid = inc_lock(&dj, (mode & ~FA_READ) ? 1 : 0);
+			if (!fp->lockid) res = FR_INT_ERR;
+#endif
+		}
+
+#else				/* R/O configuration */
+		if (res == FR_OK) {					/* Follow succeeded */
+			dir = dj.dir;
+			if (!dir) {						/* Current directory itself */
+				res = FR_INVALID_NAME;
+			} else {
+				if (dir[DIR_Attr] & AM_DIR)	/* It is a directory */
+					res = FR_NO_FILE;
+			}
+		}
+#endif
+		FREE_BUF();
+
+		if (res == FR_OK) {
+			fp->flag = mode;					/* File access mode */
+			fp->err = 0;						/* Clear error flag */
+			fp->sclust = ld_clust(dj.fs, dir);	/* File start cluster */
+			fp->fsize = LD_DWORD(dir + DIR_FileSize);	/* File size */
+			fp->fptr = 0;						/* File pointer */
+			fp->dsect = 0;
+#if _USE_FASTSEEK
+			fp->cltbl = 0;						/* Normal seek mode */
+#endif
+			fp->fs = dj.fs;	 					/* Validate file object */
+			fp->id = fp->fs->id;
+		}
+	}
+
+	LEAVE_FF(dj.fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Read File                                                             */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_read (
+	FIL* fp, 		/* Pointer to the file object */
+	void* buff,		/* Pointer to data buffer */
+	UINT btr,		/* Number of bytes to read */
+	UINT* br		/* Pointer to number of bytes read */
+)
+{
+	FRESULT res;
+	DWORD clst, sect, remain;
+	UINT rcnt, cc;
+	BYTE csect, *rbuff = (BYTE*)buff;
+
+
+	*br = 0;	/* Clear read byte counter */
+
+	res = validate(fp);							/* Check validity */
+	if (res != FR_OK) LEAVE_FF(fp->fs, res);
+	if (fp->err)								/* Check error */
+		LEAVE_FF(fp->fs, (FRESULT)fp->err);
+	if (!(fp->flag & FA_READ)) 					/* Check access mode */
+		LEAVE_FF(fp->fs, FR_DENIED);
+	remain = fp->fsize - fp->fptr;
+	if (btr > remain) btr = (UINT)remain;		/* Truncate btr by remaining bytes */
+
+	for ( ;  btr;								/* Repeat until all data read */
+		rbuff += rcnt, fp->fptr += rcnt, *br += rcnt, btr -= rcnt) {
+		if ((fp->fptr % SS(fp->fs)) == 0) {		/* On the sector boundary? */
+			csect = (BYTE)(fp->fptr / SS(fp->fs) & (fp->fs->csize - 1));	/* Sector offset in the cluster */
+			if (!csect) {						/* On the cluster boundary? */
+				if (fp->fptr == 0) {			/* On the top of the file? */
+					clst = fp->sclust;			/* Follow from the origin */
+				} else {						/* Middle or end of the file */
+#if _USE_FASTSEEK
+					if (fp->cltbl)
+						clst = clmt_clust(fp, fp->fptr);	/* Get cluster# from the CLMT */
+					else
+#endif
+						clst = get_fat(fp->fs, fp->clust);	/* Follow cluster chain on the FAT */
+				}
+				if (clst < 2) ABORT(fp->fs, FR_INT_ERR);
+				if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);
+				fp->clust = clst;				/* Update current cluster */
+			}
+			sect = clust2sect(fp->fs, fp->clust);	/* Get current sector */
+			if (!sect) ABORT(fp->fs, FR_INT_ERR);
+			sect += csect;
+			cc = btr / SS(fp->fs);				/* When remaining bytes >= sector size, */
+			if (cc) {							/* Read maximum contiguous sectors directly */
+				if (csect + cc > fp->fs->csize)	/* Clip at cluster boundary */
+					cc = fp->fs->csize - csect;
+				if (disk_read(fp->fs->drv, rbuff, sect, cc) != RES_OK)
+					ABORT(fp->fs, FR_DISK_ERR);
+#if !_FS_READONLY && _FS_MINIMIZE <= 2			/* Replace one of the read sectors with cached data if it contains a dirty sector */
+#if _FS_TINY
+				if (fp->fs->wflag && fp->fs->winsect - sect < cc)
+					mem_cpy(rbuff + ((fp->fs->winsect - sect) * SS(fp->fs)), fp->fs->win, SS(fp->fs));
+#else
+				if ((fp->flag & FA__DIRTY) && fp->dsect - sect < cc)
+					mem_cpy(rbuff + ((fp->dsect - sect) * SS(fp->fs)), fp->buf, SS(fp->fs));
+#endif
+#endif
+				rcnt = SS(fp->fs) * cc;			/* Number of bytes transferred */
+				continue;
+			}
+#if !_FS_TINY
+			if (fp->dsect != sect) {			/* Load data sector if not in cache */
+#if !_FS_READONLY
+				if (fp->flag & FA__DIRTY) {		/* Write-back dirty sector cache */
+					if (disk_write(fp->fs->drv, fp->buf, fp->dsect, 1) != RES_OK)
+						ABORT(fp->fs, FR_DISK_ERR);
+					fp->flag &= ~FA__DIRTY;
+				}
+#endif
+				if (disk_read(fp->fs->drv, fp->buf, sect, 1) != RES_OK)	/* Fill sector cache */
+					ABORT(fp->fs, FR_DISK_ERR);
+			}
+#endif
+			fp->dsect = sect;
+		}
+		rcnt = SS(fp->fs) - ((UINT)fp->fptr % SS(fp->fs));	/* Get partial sector data from sector buffer */
+		if (rcnt > btr) rcnt = btr;
+#if _FS_TINY
+		if (move_window(fp->fs, fp->dsect) != FR_OK)		/* Move sector window */
+			ABORT(fp->fs, FR_DISK_ERR);
+		mem_cpy(rbuff, &fp->fs->win[fp->fptr % SS(fp->fs)], rcnt);	/* Pick partial sector */
+#else
+		mem_cpy(rbuff, &fp->buf[fp->fptr % SS(fp->fs)], rcnt);	/* Pick partial sector */
+#endif
+	}
+
+	LEAVE_FF(fp->fs, FR_OK);
+}
+
+
+
+
+#if !_FS_READONLY
+/*-----------------------------------------------------------------------*/
+/* Write File                                                            */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_write (
+	FIL* fp,			/* Pointer to the file object */
+	const void *buff,	/* Pointer to the data to be written */
+	UINT btw,			/* Number of bytes to write */
+	UINT* bw			/* Pointer to number of bytes written */
+)
+{
+	FRESULT res;
+	DWORD clst, sect;
+	UINT wcnt, cc;
+	const BYTE *wbuff = (const BYTE*)buff;
+	BYTE csect;
+
+
+	*bw = 0;	/* Clear write byte counter */
+
+	res = validate(fp);						/* Check validity */
+	if (res != FR_OK) LEAVE_FF(fp->fs, res);
+	if (fp->err)							/* Check error */
+		LEAVE_FF(fp->fs, (FRESULT)fp->err);
+	if (!(fp->flag & FA_WRITE))				/* Check access mode */
+		LEAVE_FF(fp->fs, FR_DENIED);
+	if (fp->fptr + btw < fp->fptr) btw = 0;	/* File size cannot reach 4GB */
+
+	for ( ;  btw;							/* Repeat until all data written */
+		wbuff += wcnt, fp->fptr += wcnt, *bw += wcnt, btw -= wcnt) {
+		if ((fp->fptr % SS(fp->fs)) == 0) {	/* On the sector boundary? */
+			csect = (BYTE)(fp->fptr / SS(fp->fs) & (fp->fs->csize - 1));	/* Sector offset in the cluster */
+			if (!csect) {					/* On the cluster boundary? */
+				if (fp->fptr == 0) {		/* On the top of the file? */
+					clst = fp->sclust;		/* Follow from the origin */
+					if (clst == 0)			/* When no cluster is allocated, */
+						clst = create_chain(fp->fs, 0);	/* Create a new cluster chain */
+				} else {					/* Middle or end of the file */
+#if _USE_FASTSEEK
+					if (fp->cltbl)
+						clst = clmt_clust(fp, fp->fptr);	/* Get cluster# from the CLMT */
+					else
+#endif
+						clst = create_chain(fp->fs, fp->clust);	/* Follow or stretch cluster chain on the FAT */
+				}
+				if (clst == 0) break;		/* Could not allocate a new cluster (disk full) */
+				if (clst == 1) ABORT(fp->fs, FR_INT_ERR);
+				if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);
+				fp->clust = clst;			/* Update current cluster */
+				if (fp->sclust == 0) fp->sclust = clst;	/* Set start cluster if the first write */
+			}
+#if _FS_TINY
+			if (fp->fs->winsect == fp->dsect && sync_window(fp->fs))	/* Write-back sector cache */
+				ABORT(fp->fs, FR_DISK_ERR);
+#else
+			if (fp->flag & FA__DIRTY) {		/* Write-back sector cache */
+				if (disk_write(fp->fs->drv, fp->buf, fp->dsect, 1) != RES_OK)
+					ABORT(fp->fs, FR_DISK_ERR);
+				fp->flag &= ~FA__DIRTY;
+			}
+#endif
+			sect = clust2sect(fp->fs, fp->clust);	/* Get current sector */
+			if (!sect) ABORT(fp->fs, FR_INT_ERR);
+			sect += csect;
+			cc = btw / SS(fp->fs);			/* When remaining bytes >= sector size, */
+			if (cc) {						/* Write maximum contiguous sectors directly */
+				if (csect + cc > fp->fs->csize)	/* Clip at cluster boundary */
+					cc = fp->fs->csize - csect;
+				if (disk_write(fp->fs->drv, wbuff, sect, cc) != RES_OK)
+					ABORT(fp->fs, FR_DISK_ERR);
+#if _FS_MINIMIZE <= 2
+#if _FS_TINY
+				if (fp->fs->winsect - sect < cc) {	/* Refill sector cache if it gets invalidated by the direct write */
+					mem_cpy(fp->fs->win, wbuff + ((fp->fs->winsect - sect) * SS(fp->fs)), SS(fp->fs));
+					fp->fs->wflag = 0;
+				}
+#else
+				if (fp->dsect - sect < cc) { /* Refill sector cache if it gets invalidated by the direct write */
+					mem_cpy(fp->buf, wbuff + ((fp->dsect - sect) * SS(fp->fs)), SS(fp->fs));
+					fp->flag &= ~FA__DIRTY;
+				}
+#endif
+#endif
+				wcnt = SS(fp->fs) * cc;		/* Number of bytes transferred */
+				continue;
+			}
+#if _FS_TINY
+			if (fp->fptr >= fp->fsize) {	/* Avoid silly cache filling at growing edge */
+				if (sync_window(fp->fs)) ABORT(fp->fs, FR_DISK_ERR);
+				fp->fs->winsect = sect;
+			}
+#else
+			if (fp->dsect != sect) {		/* Fill sector cache with file data */
+				if (fp->fptr < fp->fsize &&
+					disk_read(fp->fs->drv, fp->buf, sect, 1) != RES_OK)
+						ABORT(fp->fs, FR_DISK_ERR);
+			}
+#endif
+			fp->dsect = sect;
+		}
+		wcnt = SS(fp->fs) - ((UINT)fp->fptr % SS(fp->fs));/* Put partial sector into file I/O buffer */
+		if (wcnt > btw) wcnt = btw;
+#if _FS_TINY
+		if (move_window(fp->fs, fp->dsect) != FR_OK)	/* Move sector window */
+			ABORT(fp->fs, FR_DISK_ERR);
+		mem_cpy(&fp->fs->win[fp->fptr % SS(fp->fs)], wbuff, wcnt);	/* Fit partial sector */
+		fp->fs->wflag = 1;
+#else
+		mem_cpy(&fp->buf[fp->fptr % SS(fp->fs)], wbuff, wcnt);	/* Fit partial sector */
+		fp->flag |= FA__DIRTY;
+#endif
+	}
+
+	if (fp->fptr > fp->fsize) fp->fsize = fp->fptr;	/* Update file size if needed */
+	fp->flag |= FA__WRITTEN;						/* Set file change flag */
+
+	LEAVE_FF(fp->fs, FR_OK);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Synchronize the File                                                  */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_sync (
+	FIL* fp		/* Pointer to the file object */
+)
+{
+	FRESULT res;
+	DWORD tm;
+	BYTE *dir;
+
+
+	res = validate(fp);					/* Check validity of the object */
+	if (res == FR_OK) {
+		if (fp->flag & FA__WRITTEN) {	/* Is there any change to the file? */
+#if !_FS_TINY
+			if (fp->flag & FA__DIRTY) {	/* Write-back cached data if needed */
+				if (disk_write(fp->fs->drv, fp->buf, fp->dsect, 1) != RES_OK)
+					LEAVE_FF(fp->fs, FR_DISK_ERR);
+				fp->flag &= ~FA__DIRTY;
+			}
+#endif
+			/* Update the directory entry */
+			res = move_window(fp->fs, fp->dir_sect);
+			if (res == FR_OK) {
+				dir = fp->dir_ptr;
+				dir[DIR_Attr] |= AM_ARC;					/* Set archive bit */
+				ST_DWORD(dir + DIR_FileSize, fp->fsize);	/* Update file size */
+				st_clust(dir, fp->sclust);					/* Update start cluster */
+				tm = GET_FATTIME();							/* Update modified time */
+				ST_DWORD(dir + DIR_WrtTime, tm);
+				ST_WORD(dir + DIR_LstAccDate, 0);
+				fp->flag &= ~FA__WRITTEN;
+				fp->fs->wflag = 1;
+				res = sync_fs(fp->fs);
+			}
+		}
+	}
+
+	LEAVE_FF(fp->fs, res);
+}
+
+#endif /* !_FS_READONLY */
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Close File                                                            */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_close (
+	FIL *fp		/* Pointer to the file object to be closed */
+)
+{
+	FRESULT res;
+
+
+#if !_FS_READONLY
+	res = f_sync(fp);					/* Flush cached data */
+	if (res == FR_OK)
+#endif
+	{
+		res = validate(fp);				/* Lock volume */
+		if (res == FR_OK) {
+#if _FS_REENTRANT
+			FATFS *fs = fp->fs;
+#endif
+#if _FS_LOCK
+			res = dec_lock(fp->lockid);	/* Decrement file open counter */
+			if (res == FR_OK)
+#endif
+				fp->fs = 0;				/* Invalidate file object */
+#if _FS_REENTRANT
+			unlock_fs(fs, FR_OK);		/* Unlock volume */
+#endif
+		}
+	}
+	return res;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Change Current Directory or Current Drive, Get Current Directory      */
+/*-----------------------------------------------------------------------*/
+
+#if _FS_RPATH >= 1
+#if _VOLUMES >= 2
+FRESULT f_chdrive (
+	const TCHAR* path		/* Drive number */
+)
+{
+	int vol;
+
+
+	vol = get_ldnumber(&path);
+	if (vol < 0) return FR_INVALID_DRIVE;
+
+	CurrVol = (BYTE)vol;
+
+	return FR_OK;
+}
+#endif
+
+
+FRESULT f_chdir (
+	const TCHAR* path	/* Pointer to the directory path */
+)
+{
+	FRESULT res;
+	DIR dj;
+	DEFINE_NAMEBUF;
+
+
+	/* Get logical drive number */
+	res = find_volume(&dj.fs, &path, 0);
+	if (res == FR_OK) {
+		INIT_BUF(dj);
+		res = follow_path(&dj, path);		/* Follow the path */
+		FREE_BUF();
+		if (res == FR_OK) {					/* Follow completed */
+			if (!dj.dir) {
+				dj.fs->cdir = dj.sclust;	/* Start directory itself */
+			} else {
+				if (dj.dir[DIR_Attr] & AM_DIR)	/* Reached to the directory */
+					dj.fs->cdir = ld_clust(dj.fs, dj.dir);
+				else
+					res = FR_NO_PATH;		/* Reached but a file */
+			}
+		}
+		if (res == FR_NO_FILE) res = FR_NO_PATH;
+	}
+
+	LEAVE_FF(dj.fs, res);
+}
+
+
+#if _FS_RPATH >= 2
+FRESULT f_getcwd (
+	TCHAR* buff,	/* Pointer to the directory path */
+	UINT len		/* Size of path */
+)
+{
+	FRESULT res;
+	DIR dj;
+	UINT i, n;
+	DWORD ccl;
+	TCHAR *tp;
+	FILINFO fno;
+	DEFINE_NAMEBUF;
+
+
+	*buff = 0;
+	/* Get logical drive number */
+	res = find_volume(&dj.fs, (const TCHAR**)&buff, 0);	/* Get current volume */
+	if (res == FR_OK) {
+		INIT_BUF(dj);
+		i = len;			/* Bottom of buffer (directory stack base) */
+		dj.sclust = dj.fs->cdir;			/* Start to follow upper directory from current directory */
+		while ((ccl = dj.sclust) != 0) {	/* Repeat while current directory is a sub-directory */
+			res = dir_sdi(&dj, 1);			/* Get parent directory */
+			if (res != FR_OK) break;
+			res = dir_read(&dj, 0);
+			if (res != FR_OK) break;
+			dj.sclust = ld_clust(dj.fs, dj.dir);	/* Goto parent directory */
+			res = dir_sdi(&dj, 0);
+			if (res != FR_OK) break;
+			do {							/* Find the entry links to the child directory */
+				res = dir_read(&dj, 0);
+				if (res != FR_OK) break;
+				if (ccl == ld_clust(dj.fs, dj.dir)) break;	/* Found the entry */
+				res = dir_next(&dj, 0);	
+			} while (res == FR_OK);
+			if (res == FR_NO_FILE) res = FR_INT_ERR;/* It cannot be 'not found'. */
+			if (res != FR_OK) break;
+#if _USE_LFN
+			fno.lfname = buff;
+			fno.lfsize = i;
+#endif
+			get_fileinfo(&dj, &fno);		/* Get the directory name and push it to the buffer */
+			tp = fno.fname;
+#if _USE_LFN
+			if (*buff) tp = buff;
+#endif
+			for (n = 0; tp[n]; n++) ;
+			if (i < n + 3) {
+				res = FR_NOT_ENOUGH_CORE; break;
+			}
+			while (n) buff[--i] = tp[--n];
+			buff[--i] = '/';
+		}
+		tp = buff;
+		if (res == FR_OK) {
+#if _VOLUMES >= 2
+			*tp++ = '0' + CurrVol;			/* Put drive number */
+			*tp++ = ':';
+#endif
+			if (i == len) {					/* Root-directory */
+				*tp++ = '/';
+			} else {						/* Sub-directroy */
+				do		/* Add stacked path str */
+					*tp++ = buff[i++];
+				while (i < len);
+			}
+		}
+		*tp = 0;
+		FREE_BUF();
+	}
+
+	LEAVE_FF(dj.fs, res);
+}
+#endif /* _FS_RPATH >= 2 */
+#endif /* _FS_RPATH >= 1 */
+
+
+
+#if _FS_MINIMIZE <= 2
+/*-----------------------------------------------------------------------*/
+/* Seek File R/W Pointer                                                 */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_lseek (
+	FIL* fp,		/* Pointer to the file object */
+	DWORD ofs		/* File pointer from top of file */
+)
+{
+	FRESULT res;
+	DWORD clst, bcs, nsect, ifptr;
+#if _USE_FASTSEEK
+	DWORD cl, pcl, ncl, tcl, dsc, tlen, ulen, *tbl;
+#endif
+
+
+	res = validate(fp);					/* Check validity of the object */
+	if (res != FR_OK) LEAVE_FF(fp->fs, res);
+	if (fp->err)						/* Check error */
+		LEAVE_FF(fp->fs, (FRESULT)fp->err);
+
+#if _USE_FASTSEEK
+	if (fp->cltbl) {	/* Fast seek */
+		if (ofs == CREATE_LINKMAP) {	/* Create CLMT */
+			tbl = fp->cltbl;
+			tlen = *tbl++; ulen = 2;	/* Given table size and required table size */
+			cl = fp->sclust;			/* Top of the chain */
+			if (cl) {
+				do {
+					/* Get a fragment */
+					tcl = cl; ncl = 0; ulen += 2;	/* Top, length and used items */
+					do {
+						pcl = cl; ncl++;
+						cl = get_fat(fp->fs, cl);
+						if (cl <= 1) ABORT(fp->fs, FR_INT_ERR);
+						if (cl == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);
+					} while (cl == pcl + 1);
+					if (ulen <= tlen) {		/* Store the length and top of the fragment */
+						*tbl++ = ncl; *tbl++ = tcl;
+					}
+				} while (cl < fp->fs->n_fatent);	/* Repeat until end of chain */
+			}
+			*fp->cltbl = ulen;	/* Number of items used */
+			if (ulen <= tlen)
+				*tbl = 0;		/* Terminate table */
+			else
+				res = FR_NOT_ENOUGH_CORE;	/* Given table size is smaller than required */
+
+		} else {						/* Fast seek */
+			if (ofs > fp->fsize)		/* Clip offset at the file size */
+				ofs = fp->fsize;
+			fp->fptr = ofs;				/* Set file pointer */
+			if (ofs) {
+				fp->clust = clmt_clust(fp, ofs - 1);
+				dsc = clust2sect(fp->fs, fp->clust);
+				if (!dsc) ABORT(fp->fs, FR_INT_ERR);
+				dsc += (ofs - 1) / SS(fp->fs) & (fp->fs->csize - 1);
+				if (fp->fptr % SS(fp->fs) && dsc != fp->dsect) {	/* Refill sector cache if needed */
+#if !_FS_TINY
+#if !_FS_READONLY
+					if (fp->flag & FA__DIRTY) {		/* Write-back dirty sector cache */
+						if (disk_write(fp->fs->drv, fp->buf, fp->dsect, 1) != RES_OK)
+							ABORT(fp->fs, FR_DISK_ERR);
+						fp->flag &= ~FA__DIRTY;
+					}
+#endif
+					if (disk_read(fp->fs->drv, fp->buf, dsc, 1) != RES_OK)	/* Load current sector */
+						ABORT(fp->fs, FR_DISK_ERR);
+#endif
+					fp->dsect = dsc;
+				}
+			}
+		}
+	} else
+#endif
+
+	/* Normal Seek */
+	{
+		if (ofs > fp->fsize					/* In read-only mode, clip offset with the file size */
+#if !_FS_READONLY
+			 && !(fp->flag & FA_WRITE)
+#endif
+			) ofs = fp->fsize;
+
+		ifptr = fp->fptr;
+		fp->fptr = nsect = 0;
+		if (ofs) {
+			bcs = (DWORD)fp->fs->csize * SS(fp->fs);	/* Cluster size (byte) */
+			if (ifptr > 0 &&
+				(ofs - 1) / bcs >= (ifptr - 1) / bcs) {	/* When seek to same or following cluster, */
+				fp->fptr = (ifptr - 1) & ~(bcs - 1);	/* start from the current cluster */
+				ofs -= fp->fptr;
+				clst = fp->clust;
+			} else {									/* When seek to back cluster, */
+				clst = fp->sclust;						/* start from the first cluster */
+#if !_FS_READONLY
+				if (clst == 0) {						/* If no cluster chain, create a new chain */
+					clst = create_chain(fp->fs, 0);
+					if (clst == 1) ABORT(fp->fs, FR_INT_ERR);
+					if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);
+					fp->sclust = clst;
+				}
+#endif
+				fp->clust = clst;
+			}
+			if (clst != 0) {
+				while (ofs > bcs) {						/* Cluster following loop */
+#if !_FS_READONLY
+					if (fp->flag & FA_WRITE) {			/* Check if in write mode or not */
+						clst = create_chain(fp->fs, clst);	/* Force stretch if in write mode */
+						if (clst == 0) {				/* When disk gets full, clip file size */
+							ofs = bcs; break;
+						}
+					} else
+#endif
+						clst = get_fat(fp->fs, clst);	/* Follow cluster chain if not in write mode */
+					if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);
+					if (clst <= 1 || clst >= fp->fs->n_fatent) ABORT(fp->fs, FR_INT_ERR);
+					fp->clust = clst;
+					fp->fptr += bcs;
+					ofs -= bcs;
+				}
+				fp->fptr += ofs;
+				if (ofs % SS(fp->fs)) {
+					nsect = clust2sect(fp->fs, clst);	/* Current sector */
+					if (!nsect) ABORT(fp->fs, FR_INT_ERR);
+					nsect += ofs / SS(fp->fs);
+				}
+			}
+		}
+		if (fp->fptr % SS(fp->fs) && nsect != fp->dsect) {	/* Fill sector cache if needed */
+#if !_FS_TINY
+#if !_FS_READONLY
+			if (fp->flag & FA__DIRTY) {			/* Write-back dirty sector cache */
+				if (disk_write(fp->fs->drv, fp->buf, fp->dsect, 1) != RES_OK)
+					ABORT(fp->fs, FR_DISK_ERR);
+				fp->flag &= ~FA__DIRTY;
+			}
+#endif
+			if (disk_read(fp->fs->drv, fp->buf, nsect, 1) != RES_OK)	/* Fill sector cache */
+				ABORT(fp->fs, FR_DISK_ERR);
+#endif
+			fp->dsect = nsect;
+		}
+#if !_FS_READONLY
+		if (fp->fptr > fp->fsize) {			/* Set file change flag if the file size is extended */
+			fp->fsize = fp->fptr;
+			fp->flag |= FA__WRITTEN;
+		}
+#endif
+	}
+
+	LEAVE_FF(fp->fs, res);
+}
+
+
+
+#if _FS_MINIMIZE <= 1
+/*-----------------------------------------------------------------------*/
+/* Create a Directory Object                                             */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_opendir (
+	DIR* dp,			/* Pointer to directory object to create */
+	const TCHAR* path	/* Pointer to the directory path */
+)
+{
+	FRESULT res;
+	FATFS* fs;
+	DEFINE_NAMEBUF;
+
+
+	if (!dp) return FR_INVALID_OBJECT;
+
+	/* Get logical drive number */
+	res = find_volume(&fs, &path, 0);
+	if (res == FR_OK) {
+		dp->fs = fs;
+		INIT_BUF(*dp);
+		res = follow_path(dp, path);			/* Follow the path to the directory */
+		FREE_BUF();
+		if (res == FR_OK) {						/* Follow completed */
+			if (dp->dir) {						/* It is not the origin directory itself */
+				if (dp->dir[DIR_Attr] & AM_DIR)	/* The object is a sub directory */
+					dp->sclust = ld_clust(fs, dp->dir);
+				else							/* The object is a file */
+					res = FR_NO_PATH;
+			}
+			if (res == FR_OK) {
+				dp->id = fs->id;
+				res = dir_sdi(dp, 0);			/* Rewind directory */
+#if _FS_LOCK
+				if (res == FR_OK) {
+					if (dp->sclust) {
+						dp->lockid = inc_lock(dp, 0);	/* Lock the sub directory */
+						if (!dp->lockid)
+							res = FR_TOO_MANY_OPEN_FILES;
+					} else {
+						dp->lockid = 0;	/* Root directory need not to be locked */
+					}
+				}
+#endif
+			}
+		}
+		if (res == FR_NO_FILE) res = FR_NO_PATH;
+	}
+	if (res != FR_OK) dp->fs = 0;		/* Invalidate the directory object if function faild */
+
+	LEAVE_FF(fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Close Directory                                                       */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_closedir (
+	DIR *dp		/* Pointer to the directory object to be closed */
+)
+{
+	FRESULT res;
+
+
+	res = validate(dp);
+	if (res == FR_OK) {
+#if _FS_REENTRANT
+		FATFS *fs = dp->fs;
+#endif
+#if _FS_LOCK
+		if (dp->lockid)				/* Decrement sub-directory open counter */
+			res = dec_lock(dp->lockid);
+		if (res == FR_OK)
+#endif
+			dp->fs = 0;				/* Invalidate directory object */
+#if _FS_REENTRANT
+		unlock_fs(fs, FR_OK);		/* Unlock volume */
+#endif
+	}
+	return res;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Read Directory Entries in Sequence                                    */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_readdir (
+	DIR* dp,			/* Pointer to the open directory object */
+	FILINFO* fno		/* Pointer to file information to return */
+)
+{
+	FRESULT res;
+	DEFINE_NAMEBUF;
+
+
+	res = validate(dp);						/* Check validity of the object */
+	if (res == FR_OK) {
+		if (!fno) {
+			res = dir_sdi(dp, 0);			/* Rewind the directory object */
+		} else {
+			INIT_BUF(*dp);
+			res = dir_read(dp, 0);			/* Read an item */
+			if (res == FR_NO_FILE) {		/* Reached end of directory */
+				dp->sect = 0;
+				res = FR_OK;
+			}
+			if (res == FR_OK) {				/* A valid entry is found */
+				get_fileinfo(dp, fno);		/* Get the object information */
+				res = dir_next(dp, 0);		/* Increment index for next */
+				if (res == FR_NO_FILE) {
+					dp->sect = 0;
+					res = FR_OK;
+				}
+			}
+			FREE_BUF();
+		}
+	}
+
+	LEAVE_FF(dp->fs, res);
+}
+
+
+
+#if _USE_FIND
+/*-----------------------------------------------------------------------*/
+/* Find next file                                                        */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_findnext (
+	DIR* dp,		/* Pointer to the open directory object */
+	FILINFO* fno	/* Pointer to the file information structure */
+)
+{
+	FRESULT res;
+
+
+	for (;;) {
+		res = f_readdir(dp, fno);		/* Get a directory item */
+		if (res != FR_OK || !fno || !fno->fname[0]) break;	/* Terminate if any error or end of directory */
+#if _USE_LFN
+		if (fno->lfname && pattern_matching(dp->pat, fno->lfname, 0, 0)) break;	/* Test for LFN if exist */
+#endif
+		if (pattern_matching(dp->pat, fno->fname, 0, 0)) break;	/* Test for SFN */
+	}
+	return res;
+
+}
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Find first file                                                       */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_findfirst (
+	DIR* dp,				/* Pointer to the blank directory object */
+	FILINFO* fno,			/* Pointer to the file information structure */
+	const TCHAR* path,		/* Pointer to the directory to open */
+	const TCHAR* pattern	/* Pointer to the matching pattern */
+)
+{
+	FRESULT res;
+
+
+	dp->pat = pattern;		/* Save pointer to pattern string */
+	res = f_opendir(dp, path);		/* Open the target directory */
+	if (res == FR_OK)
+		res = f_findnext(dp, fno);	/* Find the first item */
+	return res;
+}
+
+#endif	/* _USE_FIND */
+
+
+
+#if _FS_MINIMIZE == 0
+/*-----------------------------------------------------------------------*/
+/* Get File Status                                                       */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_stat (
+	const TCHAR* path,	/* Pointer to the file path */
+	FILINFO* fno		/* Pointer to file information to return */
+)
+{
+	FRESULT res;
+	DIR dj;
+	DEFINE_NAMEBUF;
+
+
+	/* Get logical drive number */
+	res = find_volume(&dj.fs, &path, 0);
+	if (res == FR_OK) {
+		INIT_BUF(dj);
+		res = follow_path(&dj, path);	/* Follow the file path */
+		if (res == FR_OK) {				/* Follow completed */
+			if (dj.dir) {		/* Found an object */
+				if (fno) get_fileinfo(&dj, fno);
+			} else {			/* It is root directory */
+				res = FR_INVALID_NAME;
+			}
+		}
+		FREE_BUF();
+	}
+
+	LEAVE_FF(dj.fs, res);
+}
+
+
+
+#if !_FS_READONLY
+/*-----------------------------------------------------------------------*/
+/* Get Number of Free Clusters                                           */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_getfree (
+	const TCHAR* path,	/* Path name of the logical drive number */
+	DWORD* nclst,		/* Pointer to a variable to return number of free clusters */
+	FATFS** fatfs		/* Pointer to return pointer to corresponding file system object */
+)
+{
+	FRESULT res;
+	FATFS *fs;
+	DWORD nfree, clst, sect, stat;
+	UINT i;
+	BYTE fat, *p;
+
+
+	/* Get logical drive number */
+	res = find_volume(fatfs, &path, 0);
+	fs = *fatfs;
+	if (res == FR_OK) {
+		/* If free_clust is valid, return it without full cluster scan */
+		if (fs->free_clust <= fs->n_fatent - 2) {
+			*nclst = fs->free_clust;
+		} else {
+			/* Get number of free clusters */
+			fat = fs->fs_type;
+			nfree = 0;
+			if (fat == FS_FAT12) {	/* Sector unalighed entries: Search FAT via regular routine. */
+				clst = 2;
+				do {
+					stat = get_fat(fs, clst);
+					if (stat == 0xFFFFFFFF) { res = FR_DISK_ERR; break; }
+					if (stat == 1) { res = FR_INT_ERR; break; }
+					if (stat == 0) nfree++;
+				} while (++clst < fs->n_fatent);
+			} else {				/* Sector alighed entries: Accelerate the FAT search. */
+				clst = fs->n_fatent; sect = fs->fatbase;
+				i = 0; p = 0;
+				do {
+					if (!i) {
+						res = move_window(fs, sect++);
+						if (res != FR_OK) break;
+						p = fs->win;
+						i = SS(fs);
+					}
+					if (fat == FS_FAT16) {
+						if (LD_WORD(p) == 0) nfree++;
+						p += 2; i -= 2;
+					} else {
+						if ((LD_DWORD(p) & 0x0FFFFFFF) == 0) nfree++;
+						p += 4; i -= 4;
+					}
+				} while (--clst);
+			}
+			fs->free_clust = nfree;	/* free_clust is valid */
+			fs->fsi_flag |= 1;		/* FSInfo is to be updated */
+			*nclst = nfree;			/* Return the free clusters */
+		}
+	}
+	LEAVE_FF(fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Truncate File                                                         */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_truncate (
+	FIL* fp		/* Pointer to the file object */
+)
+{
+	FRESULT res;
+	DWORD ncl;
+
+
+	res = validate(fp);						/* Check validity of the object */
+	if (res == FR_OK) {
+		if (fp->err) {						/* Check error */
+			res = (FRESULT)fp->err;
+		} else {
+			if (!(fp->flag & FA_WRITE))		/* Check access mode */
+				res = FR_DENIED;
+		}
+	}
+	if (res == FR_OK) {
+		if (fp->fsize > fp->fptr) {
+			fp->fsize = fp->fptr;	/* Set file size to current R/W point */
+			fp->flag |= FA__WRITTEN;
+			if (fp->fptr == 0) {	/* When set file size to zero, remove entire cluster chain */
+				res = remove_chain(fp->fs, fp->sclust);
+				fp->sclust = 0;
+			} else {				/* When truncate a part of the file, remove remaining clusters */
+				ncl = get_fat(fp->fs, fp->clust);
+				res = FR_OK;
+				if (ncl == 0xFFFFFFFF) res = FR_DISK_ERR;
+				if (ncl == 1) res = FR_INT_ERR;
+				if (res == FR_OK && ncl < fp->fs->n_fatent) {
+					res = put_fat(fp->fs, fp->clust, 0x0FFFFFFF);
+					if (res == FR_OK) res = remove_chain(fp->fs, ncl);
+				}
+			}
+#if !_FS_TINY
+			if (res == FR_OK && (fp->flag & FA__DIRTY)) {
+				if (disk_write(fp->fs->drv, fp->buf, fp->dsect, 1) != RES_OK)
+					res = FR_DISK_ERR;
+				else
+					fp->flag &= ~FA__DIRTY;
+			}
+#endif
+		}
+		if (res != FR_OK) fp->err = (FRESULT)res;
+	}
+
+	LEAVE_FF(fp->fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Delete a File or Directory                                            */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_unlink (
+	const TCHAR* path		/* Pointer to the file or directory path */
+)
+{
+	FRESULT res;
+	DIR dj, sdj;
+	BYTE *dir;
+	DWORD dclst = 0;
+	DEFINE_NAMEBUF;
+
+
+	/* Get logical drive number */
+	res = find_volume(&dj.fs, &path, 1);
+	if (res == FR_OK) {
+		INIT_BUF(dj);
+		res = follow_path(&dj, path);		/* Follow the file path */
+		if (_FS_RPATH && res == FR_OK && (dj.fn[NSFLAG] & NS_DOT))
+			res = FR_INVALID_NAME;			/* Cannot remove dot entry */
+#if _FS_LOCK
+		if (res == FR_OK) res = chk_lock(&dj, 2);	/* Cannot remove open object */
+#endif
+		if (res == FR_OK) {					/* The object is accessible */
+			dir = dj.dir;
+			if (!dir) {
+				res = FR_INVALID_NAME;		/* Cannot remove the origin directory */
+			} else {
+				if (dir[DIR_Attr] & AM_RDO)
+					res = FR_DENIED;		/* Cannot remove R/O object */
+			}
+			if (res == FR_OK) {
+				dclst = ld_clust(dj.fs, dir);
+				if (dclst && (dir[DIR_Attr] & AM_DIR)) {	/* Is it a sub-directory ? */
+#if _FS_RPATH
+					if (dclst == dj.fs->cdir) {		 		/* Is it the current directory? */
+						res = FR_DENIED;
+					} else
+#endif
+					{
+						mem_cpy(&sdj, &dj, sizeof (DIR));	/* Open the sub-directory */
+						sdj.sclust = dclst;
+						res = dir_sdi(&sdj, 2);
+						if (res == FR_OK) {
+							res = dir_read(&sdj, 0);			/* Read an item (excluding dot entries) */
+							if (res == FR_OK) res = FR_DENIED;	/* Not empty? (cannot remove) */
+							if (res == FR_NO_FILE) res = FR_OK;	/* Empty? (can remove) */
+						}
+					}
+				}
+			}
+			if (res == FR_OK) {
+				res = dir_remove(&dj);		/* Remove the directory entry */
+				if (res == FR_OK && dclst)	/* Remove the cluster chain if exist */
+					res = remove_chain(dj.fs, dclst);
+				if (res == FR_OK) res = sync_fs(dj.fs);
+			}
+		}
+		FREE_BUF();
+	}
+
+	LEAVE_FF(dj.fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Create a Directory                                                    */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_mkdir (
+	const TCHAR* path		/* Pointer to the directory path */
+)
+{
+	FRESULT res;
+	DIR dj;
+	BYTE *dir, n;
+	DWORD dsc, dcl, pcl, tm = GET_FATTIME();
+	DEFINE_NAMEBUF;
+
+
+	/* Get logical drive number */
+	res = find_volume(&dj.fs, &path, 1);
+	if (res == FR_OK) {
+		INIT_BUF(dj);
+		res = follow_path(&dj, path);			/* Follow the file path */
+		if (res == FR_OK) res = FR_EXIST;		/* Any object with same name is already existing */
+		if (_FS_RPATH && res == FR_NO_FILE && (dj.fn[NSFLAG] & NS_DOT))
+			res = FR_INVALID_NAME;
+		if (res == FR_NO_FILE) {				/* Can create a new directory */
+			dcl = create_chain(dj.fs, 0);		/* Allocate a cluster for the new directory table */
+			res = FR_OK;
+			if (dcl == 0) res = FR_DENIED;		/* No space to allocate a new cluster */
+			if (dcl == 1) res = FR_INT_ERR;
+			if (dcl == 0xFFFFFFFF) res = FR_DISK_ERR;
+			if (res == FR_OK)					/* Flush FAT */
+				res = sync_window(dj.fs);
+			if (res == FR_OK) {					/* Initialize the new directory table */
+				dsc = clust2sect(dj.fs, dcl);
+				dir = dj.fs->win;
+				mem_set(dir, 0, SS(dj.fs));
+				mem_set(dir + DIR_Name, ' ', 11);	/* Create "." entry */
+				dir[DIR_Name] = '.';
+				dir[DIR_Attr] = AM_DIR;
+				ST_DWORD(dir + DIR_WrtTime, tm);
+				st_clust(dir, dcl);
+				mem_cpy(dir + SZ_DIRE, dir, SZ_DIRE); 	/* Create ".." entry */
+				dir[SZ_DIRE + 1] = '.'; pcl = dj.sclust;
+				if (dj.fs->fs_type == FS_FAT32 && pcl == dj.fs->dirbase)
+					pcl = 0;
+				st_clust(dir + SZ_DIRE, pcl);
+				for (n = dj.fs->csize; n; n--) {	/* Write dot entries and clear following sectors */
+					dj.fs->winsect = dsc++;
+					dj.fs->wflag = 1;
+					res = sync_window(dj.fs);
+					if (res != FR_OK) break;
+					mem_set(dir, 0, SS(dj.fs));
+				}
+			}
+			if (res == FR_OK) res = dir_register(&dj);	/* Register the object to the directoy */
+			if (res != FR_OK) {
+				remove_chain(dj.fs, dcl);			/* Could not register, remove cluster chain */
+			} else {
+				dir = dj.dir;
+				dir[DIR_Attr] = AM_DIR;				/* Attribute */
+				ST_DWORD(dir + DIR_WrtTime, tm);	/* Created time */
+				st_clust(dir, dcl);					/* Table start cluster */
+				dj.fs->wflag = 1;
+				res = sync_fs(dj.fs);
+			}
+		}
+		FREE_BUF();
+	}
+
+	LEAVE_FF(dj.fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Change Attribute                                                      */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_chmod (
+	const TCHAR* path,	/* Pointer to the file path */
+	BYTE attr,			/* Attribute bits */
+	BYTE mask			/* Attribute mask to change */
+)
+{
+	FRESULT res;
+	DIR dj;
+	BYTE *dir;
+	DEFINE_NAMEBUF;
+
+
+	res = find_volume(&dj.fs, &path, 1);	/* Get logical drive number */
+	if (res == FR_OK) {
+		INIT_BUF(dj);
+		res = follow_path(&dj, path);		/* Follow the file path */
+		FREE_BUF();
+		if (_FS_RPATH && res == FR_OK && (dj.fn[NSFLAG] & NS_DOT))
+			res = FR_INVALID_NAME;
+		if (res == FR_OK) {
+			dir = dj.dir;
+			if (!dir) {						/* Is it a root directory? */
+				res = FR_INVALID_NAME;
+			} else {						/* File or sub directory */
+				mask &= AM_RDO|AM_HID|AM_SYS|AM_ARC;	/* Valid attribute mask */
+				dir[DIR_Attr] = (attr & mask) | (dir[DIR_Attr] & (BYTE)~mask);	/* Apply attribute change */
+				dj.fs->wflag = 1;
+				res = sync_fs(dj.fs);
+			}
+		}
+	}
+
+	LEAVE_FF(dj.fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Rename File/Directory                                                 */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_rename (
+	const TCHAR* path_old,	/* Pointer to the object to be renamed */
+	const TCHAR* path_new	/* Pointer to the new name */
+)
+{
+	FRESULT res;
+	DIR djo, djn;
+	BYTE buf[21], *dir;
+	DWORD dw;
+	DEFINE_NAMEBUF;
+
+
+	/* Get logical drive number of the source object */
+	res = find_volume(&djo.fs, &path_old, 1);
+	if (res == FR_OK) {
+		djn.fs = djo.fs;
+		INIT_BUF(djo);
+		res = follow_path(&djo, path_old);		/* Check old object */
+		if (_FS_RPATH && res == FR_OK && (djo.fn[NSFLAG] & NS_DOT))
+			res = FR_INVALID_NAME;
+#if _FS_LOCK
+		if (res == FR_OK) res = chk_lock(&djo, 2);
+#endif
+		if (res == FR_OK) {						/* Old object is found */
+			if (!djo.dir) {						/* Is root dir? */
+				res = FR_NO_FILE;
+			} else {
+				mem_cpy(buf, djo.dir + DIR_Attr, 21);	/* Save information about object except name */
+				mem_cpy(&djn, &djo, sizeof (DIR));		/* Duplicate the directory object */
+				if (get_ldnumber(&path_new) >= 0)		/* Snip drive number off and ignore it */
+					res = follow_path(&djn, path_new);	/* and make sure if new object name is not conflicting */
+				else
+					res = FR_INVALID_DRIVE;
+				if (res == FR_OK) res = FR_EXIST;		/* The new object name is already existing */
+				if (res == FR_NO_FILE) { 				/* It is a valid path and no name collision */
+					res = dir_register(&djn);			/* Register the new entry */
+					if (res == FR_OK) {
+/* Start of critical section where any interruption can cause a cross-link */
+						dir = djn.dir;					/* Copy information about object except name */
+						mem_cpy(dir + 13, buf + 2, 19);
+						dir[DIR_Attr] = buf[0] | AM_ARC;
+						djo.fs->wflag = 1;
+						if ((dir[DIR_Attr] & AM_DIR) && djo.sclust != djn.sclust) {	/* Update .. entry in the sub-directory if needed */
+							dw = clust2sect(djo.fs, ld_clust(djo.fs, dir));
+							if (!dw) {
+								res = FR_INT_ERR;
+							} else {
+								res = move_window(djo.fs, dw);
+								dir = djo.fs->win + SZ_DIRE * 1;	/* Ptr to .. entry */
+								if (res == FR_OK && dir[1] == '.') {
+									st_clust(dir, djn.sclust);
+									djo.fs->wflag = 1;
+								}
+							}
+						}
+						if (res == FR_OK) {
+							res = dir_remove(&djo);		/* Remove old entry */
+							if (res == FR_OK)
+								res = sync_fs(djo.fs);
+						}
+/* End of critical section */
+					}
+				}
+			}
+		}
+		FREE_BUF();
+	}
+
+	LEAVE_FF(djo.fs, res);
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Change Timestamp                                                      */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_utime (
+	const TCHAR* path,	/* Pointer to the file/directory name */
+	const FILINFO* fno	/* Pointer to the time stamp to be set */
+)
+{
+	FRESULT res;
+	DIR dj;
+	BYTE *dir;
+	DEFINE_NAMEBUF;
+
+
+	/* Get logical drive number */
+	res = find_volume(&dj.fs, &path, 1);
+	if (res == FR_OK) {
+		INIT_BUF(dj);
+		res = follow_path(&dj, path);	/* Follow the file path */
+		FREE_BUF();
+		if (_FS_RPATH && res == FR_OK && (dj.fn[NSFLAG] & NS_DOT))
+			res = FR_INVALID_NAME;
+		if (res == FR_OK) {
+			dir = dj.dir;
+			if (!dir) {					/* Root directory */
+				res = FR_INVALID_NAME;
+			} else {					/* File or sub-directory */
+				ST_WORD(dir + DIR_WrtTime, fno->ftime);
+				ST_WORD(dir + DIR_WrtDate, fno->fdate);
+				dj.fs->wflag = 1;
+				res = sync_fs(dj.fs);
+			}
+		}
+	}
+
+	LEAVE_FF(dj.fs, res);
+}
+
+#endif /* !_FS_READONLY */
+#endif /* _FS_MINIMIZE == 0 */
+#endif /* _FS_MINIMIZE <= 1 */
+#endif /* _FS_MINIMIZE <= 2 */
+
+
+
+
+#if _USE_LABEL
+/*-----------------------------------------------------------------------*/
+/* Get volume label                                                      */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_getlabel (
+	const TCHAR* path,	/* Path name of the logical drive number */
+	TCHAR* label,		/* Pointer to a buffer to return the volume label */
+	DWORD* vsn			/* Pointer to a variable to return the volume serial number */
+)
+{
+	FRESULT res;
+	DIR dj;
+	UINT i, j;
+#if _USE_LFN && _LFN_UNICODE
+	WCHAR w;
+#endif
+
+
+	/* Get logical drive number */
+	res = find_volume(&dj.fs, &path, 0);
+
+	/* Get volume label */
+	if (res == FR_OK && label) {
+		dj.sclust = 0;					/* Open root directory */
+		res = dir_sdi(&dj, 0);
+		if (res == FR_OK) {
+			res = dir_read(&dj, 1);		/* Get an entry with AM_VOL */
+			if (res == FR_OK) {			/* A volume label is exist */
+#if _USE_LFN && _LFN_UNICODE
+				i = j = 0;
+				do {
+					w = (i < 11) ? dj.dir[i++] : ' ';
+					if (IsDBCS1(w) && i < 11 && IsDBCS2(dj.dir[i]))
+						w = w << 8 | dj.dir[i++];
+					label[j++] = ff_convert(w, 1);	/* OEM -> Unicode */
+				} while (j < 11);
+#else
+				mem_cpy(label, dj.dir, 11);
+#endif
+				j = 11;
+				do {
+					label[j] = 0;
+					if (!j) break;
+				} while (label[--j] == ' ');
+			}
+			if (res == FR_NO_FILE) {	/* No label, return nul string */
+				label[0] = 0;
+				res = FR_OK;
+			}
+		}
+	}
+
+	/* Get volume serial number */
+	if (res == FR_OK && vsn) {
+		res = move_window(dj.fs, dj.fs->volbase);
+		if (res == FR_OK) {
+			i = dj.fs->fs_type == FS_FAT32 ? BS_VolID32 : BS_VolID;
+			*vsn = LD_DWORD(&dj.fs->win[i]);
+		}
+	}
+
+	LEAVE_FF(dj.fs, res);
+}
+
+
+
+#if !_FS_READONLY
+/*-----------------------------------------------------------------------*/
+/* Set volume label                                                      */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_setlabel (
+	const TCHAR* label	/* Pointer to the volume label to set */
+)
+{
+	FRESULT res;
+	DIR dj;
+	BYTE vn[11];
+	UINT i, j, sl;
+	WCHAR w;
+	DWORD tm;
+
+
+	/* Get logical drive number */
+	res = find_volume(&dj.fs, &label, 1);
+	if (res) LEAVE_FF(dj.fs, res);
+
+	/* Create a volume label in directory form */
+	vn[0] = 0;
+	for (sl = 0; label[sl]; sl++) ;				/* Get name length */
+	for ( ; sl && label[sl - 1] == ' '; sl--) ;	/* Remove trailing spaces */
+	if (sl) {	/* Create volume label in directory form */
+		i = j = 0;
+		do {
+#if _USE_LFN && _LFN_UNICODE
+			w = ff_convert(ff_wtoupper(label[i++]), 0);
+#else
+			w = (BYTE)label[i++];
+			if (IsDBCS1(w))
+				w = (j < 10 && i < sl && IsDBCS2(label[i])) ? w << 8 | (BYTE)label[i++] : 0;
+#if _USE_LFN
+			w = ff_convert(ff_wtoupper(ff_convert(w, 1)), 0);
+#else
+			if (IsLower(w)) w -= 0x20;			/* To upper ASCII characters */
+#ifdef _EXCVT
+			if (w >= 0x80) w = ExCvt[w - 0x80];	/* To upper extended characters (SBCS cfg) */
+#else
+			if (!_DF1S && w >= 0x80) w = 0;		/* Reject extended characters (ASCII cfg) */
+#endif
+#endif
+#endif
+			if (!w || chk_chr("\"*+,.:;<=>\?[]|\x7F", w) || j >= (UINT)((w >= 0x100) ? 10 : 11)) /* Reject invalid characters for volume label */
+				LEAVE_FF(dj.fs, FR_INVALID_NAME);
+			if (w >= 0x100) vn[j++] = (BYTE)(w >> 8);
+			vn[j++] = (BYTE)w;
+		} while (i < sl);
+		while (j < 11) vn[j++] = ' ';	/* Fill remaining name field */
+		if (vn[0] == DDEM) LEAVE_FF(dj.fs, FR_INVALID_NAME);	/* Reject illegal name (heading DDEM) */
+	}
+
+	/* Set volume label */
+	dj.sclust = 0;					/* Open root directory */
+	res = dir_sdi(&dj, 0);
+	if (res == FR_OK) {
+		res = dir_read(&dj, 1);		/* Get an entry with AM_VOL */
+		if (res == FR_OK) {			/* A volume label is found */
+			if (vn[0]) {
+				mem_cpy(dj.dir, vn, 11);	/* Change the volume label name */
+				tm = GET_FATTIME();
+				ST_DWORD(dj.dir + DIR_WrtTime, tm);
+			} else {
+				dj.dir[0] = DDEM;			/* Remove the volume label */
+			}
+			dj.fs->wflag = 1;
+			res = sync_fs(dj.fs);
+		} else {					/* No volume label is found or error */
+			if (res == FR_NO_FILE) {
+				res = FR_OK;
+				if (vn[0]) {				/* Create volume label as new */
+					res = dir_alloc(&dj, 1);	/* Allocate an entry for volume label */
+					if (res == FR_OK) {
+						mem_set(dj.dir, 0, SZ_DIRE);	/* Set volume label */
+						mem_cpy(dj.dir, vn, 11);
+						dj.dir[DIR_Attr] = AM_VOL;
+						tm = GET_FATTIME();
+						ST_DWORD(dj.dir + DIR_WrtTime, tm);
+						dj.fs->wflag = 1;
+						res = sync_fs(dj.fs);
+					}
+				}
+			}
+		}
+	}
+
+	LEAVE_FF(dj.fs, res);
+}
+
+#endif /* !_FS_READONLY */
+#endif /* _USE_LABEL */
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Forward data to the stream directly (available on only tiny cfg)      */
+/*-----------------------------------------------------------------------*/
+#if _USE_FORWARD && _FS_TINY
+
+FRESULT f_forward (
+	FIL* fp, 						/* Pointer to the file object */
+	UINT (*func)(const BYTE*,UINT),	/* Pointer to the streaming function */
+	UINT btf,						/* Number of bytes to forward */
+	UINT* bf						/* Pointer to number of bytes forwarded */
+)
+{
+	FRESULT res;
+	DWORD remain, clst, sect;
+	UINT rcnt;
+	BYTE csect;
+
+
+	*bf = 0;	/* Clear transfer byte counter */
+
+	res = validate(fp);								/* Check validity of the object */
+	if (res != FR_OK) LEAVE_FF(fp->fs, res);
+	if (fp->err)									/* Check error */
+		LEAVE_FF(fp->fs, (FRESULT)fp->err);
+	if (!(fp->flag & FA_READ))						/* Check access mode */
+		LEAVE_FF(fp->fs, FR_DENIED);
+
+	remain = fp->fsize - fp->fptr;
+	if (btf > remain) btf = (UINT)remain;			/* Truncate btf by remaining bytes */
+
+	for ( ;  btf && (*func)(0, 0);					/* Repeat until all data transferred or stream becomes busy */
+		fp->fptr += rcnt, *bf += rcnt, btf -= rcnt) {
+		csect = (BYTE)(fp->fptr / SS(fp->fs) & (fp->fs->csize - 1));	/* Sector offset in the cluster */
+		if ((fp->fptr % SS(fp->fs)) == 0) {			/* On the sector boundary? */
+			if (!csect) {							/* On the cluster boundary? */
+				clst = (fp->fptr == 0) ?			/* On the top of the file? */
+					fp->sclust : get_fat(fp->fs, fp->clust);
+				if (clst <= 1) ABORT(fp->fs, FR_INT_ERR);
+				if (clst == 0xFFFFFFFF) ABORT(fp->fs, FR_DISK_ERR);
+				fp->clust = clst;					/* Update current cluster */
+			}
+		}
+		sect = clust2sect(fp->fs, fp->clust);		/* Get current data sector */
+		if (!sect) ABORT(fp->fs, FR_INT_ERR);
+		sect += csect;
+		if (move_window(fp->fs, sect) != FR_OK)		/* Move sector window */
+			ABORT(fp->fs, FR_DISK_ERR);
+		fp->dsect = sect;
+		rcnt = SS(fp->fs) - (WORD)(fp->fptr % SS(fp->fs));	/* Forward data from sector window */
+		if (rcnt > btf) rcnt = btf;
+		rcnt = (*func)(&fp->fs->win[(WORD)fp->fptr % SS(fp->fs)], rcnt);
+		if (!rcnt) ABORT(fp->fs, FR_INT_ERR);
+	}
+
+	LEAVE_FF(fp->fs, FR_OK);
+}
+#endif /* _USE_FORWARD */
+
+
+
+#if _USE_MKFS && !_FS_READONLY
+/*-----------------------------------------------------------------------*/
+/* Create file system on the logical drive                               */
+/*-----------------------------------------------------------------------*/
+#define N_ROOTDIR	512		/* Number of root directory entries for FAT12/16 */
+#define N_FATS		1		/* Number of FATs (1 or 2) */
+
+
+FRESULT f_mkfs (
+	const TCHAR* path,	/* Logical drive number */
+	BYTE sfd,			/* Partitioning rule 0:FDISK, 1:SFD */
+	UINT au				/* Size of allocation unit in unit of byte or sector */
+)
+{
+	static const WORD vst[] = { 1024,   512,  256,  128,   64,    32,   16,    8,    4,    2,   0};
+	static const WORD cst[] = {32768, 16384, 8192, 4096, 2048, 16384, 8192, 4096, 2048, 1024, 512};
+	int vol;
+	BYTE fmt, md, sys, *tbl, pdrv, part;
+	DWORD n_clst, vs, n, wsect;
+	UINT i;
+	DWORD b_vol, b_fat, b_dir, b_data;	/* LBA */
+	DWORD n_vol, n_rsv, n_fat, n_dir;	/* Size */
+	FATFS *fs;
+	DSTATUS stat;
+#if _USE_TRIM
+	DWORD eb[2];
+#endif
+
+
+	/* Check mounted drive and clear work area */
+	if (sfd > 1) return FR_INVALID_PARAMETER;
+	vol = get_ldnumber(&path);
+	if (vol < 0) return FR_INVALID_DRIVE;
+	fs = FatFs[vol];
+	if (!fs) return FR_NOT_ENABLED;
+	fs->fs_type = 0;
+	pdrv = LD2PD(vol);	/* Physical drive */
+	part = LD2PT(vol);	/* Partition (0:auto detect, 1-4:get from partition table)*/
+
+	/* Get disk statics */
+	stat = disk_initialize(pdrv);
+	if (stat & STA_NOINIT) return FR_NOT_READY;
+	if (stat & STA_PROTECT) return FR_WRITE_PROTECTED;
+#if _MAX_SS != _MIN_SS		/* Get disk sector size */
+	if (disk_ioctl(pdrv, GET_SECTOR_SIZE, &SS(fs)) != RES_OK || SS(fs) > _MAX_SS || SS(fs) < _MIN_SS)
+		return FR_DISK_ERR;
+#endif
+	if (_MULTI_PARTITION && part) {
+		/* Get partition information from partition table in the MBR */
+		if (disk_read(pdrv, fs->win, 0, 1) != RES_OK) return FR_DISK_ERR;
+		if (LD_WORD(fs->win + BS_55AA) != 0xAA55) return FR_MKFS_ABORTED;
+		tbl = &fs->win[MBR_Table + (part - 1) * SZ_PTE];
+		if (!tbl[4]) return FR_MKFS_ABORTED;	/* No partition? */
+		b_vol = LD_DWORD(tbl + 8);	/* Volume start sector */
+		n_vol = LD_DWORD(tbl + 12);	/* Volume size */
+	} else {
+		/* Create a partition in this function */
+		if (disk_ioctl(pdrv, GET_SECTOR_COUNT, &n_vol) != RES_OK || n_vol < 128)
+			return FR_DISK_ERR;
+		b_vol = (sfd) ? 0 : 63;		/* Volume start sector */
+		n_vol -= b_vol;				/* Volume size */
+	}
+
+	if (au & (au - 1)) au = 0;
+	if (!au) {						/* AU auto selection */
+		vs = n_vol / (2000 / (SS(fs) / 512));
+		for (i = 0; vs < vst[i]; i++) ;
+		au = cst[i];
+	}
+	if (au >= _MIN_SS) au /= SS(fs);	/* Number of sectors per cluster */
+	if (!au) au = 1;
+	if (au > 128) au = 128;
+
+	/* Pre-compute number of clusters and FAT sub-type */
+	n_clst = n_vol / au;
+	fmt = FS_FAT12;
+	if (n_clst >= MIN_FAT16) fmt = FS_FAT16;
+	if (n_clst >= MIN_FAT32) fmt = FS_FAT32;
+
+	/* Determine offset and size of FAT structure */
+	if (fmt == FS_FAT32) {
+		n_fat = ((n_clst * 4) + 8 + SS(fs) - 1) / SS(fs);
+		n_rsv = 32;
+		n_dir = 0;
+	} else {
+		n_fat = (fmt == FS_FAT12) ? (n_clst * 3 + 1) / 2 + 3 : (n_clst * 2) + 4;
+		n_fat = (n_fat + SS(fs) - 1) / SS(fs);
+		n_rsv = 1;
+		n_dir = (DWORD)N_ROOTDIR * SZ_DIRE / SS(fs);
+	}
+	b_fat = b_vol + n_rsv;				/* FAT area start sector */
+	b_dir = b_fat + n_fat * N_FATS;		/* Directory area start sector */
+	b_data = b_dir + n_dir;				/* Data area start sector */
+	if (n_vol < b_data + au - b_vol) return FR_MKFS_ABORTED;	/* Too small volume */
+
+	/* Align data start sector to erase block boundary (for flash memory media) */
+	if (disk_ioctl(pdrv, GET_BLOCK_SIZE, &n) != RES_OK || !n || n > 32768) n = 1;
+	n = (b_data + n - 1) & ~(n - 1);	/* Next nearest erase block from current data start */
+	n = (n - b_data) / N_FATS;
+	if (fmt == FS_FAT32) {		/* FAT32: Move FAT offset */
+		n_rsv += n;
+		b_fat += n;
+	} else {					/* FAT12/16: Expand FAT size */
+		n_fat += n;
+	}
+
+	/* Determine number of clusters and final check of validity of the FAT sub-type */
+	n_clst = (n_vol - n_rsv - n_fat * N_FATS - n_dir) / au;
+	if (   (fmt == FS_FAT16 && n_clst < MIN_FAT16)
+		|| (fmt == FS_FAT32 && n_clst < MIN_FAT32))
+		return FR_MKFS_ABORTED;
+
+	/* Determine system ID in the partition table */
+	if (fmt == FS_FAT32) {
+		sys = 0x0C;		/* FAT32X */
+	} else {
+		if (fmt == FS_FAT12 && n_vol < 0x10000) {
+			sys = 0x01;	/* FAT12(<65536) */
+		} else {
+			sys = (n_vol < 0x10000) ? 0x04 : 0x06;	/* FAT16(<65536) : FAT12/16(>=65536) */
+		}
+	}
+
+	if (_MULTI_PARTITION && part) {
+		/* Update system ID in the partition table */
+		tbl = &fs->win[MBR_Table + (part - 1) * SZ_PTE];
+		tbl[4] = sys;
+		if (disk_write(pdrv, fs->win, 0, 1) != RES_OK)	/* Write it to teh MBR */
+			return FR_DISK_ERR;
+		md = 0xF8;
+	} else {
+		if (sfd) {	/* No partition table (SFD) */
+			md = 0xF0;
+		} else {	/* Create partition table (FDISK) */
+			mem_set(fs->win, 0, SS(fs));
+			tbl = fs->win + MBR_Table;	/* Create partition table for single partition in the drive */
+			tbl[1] = 1;						/* Partition start head */
+			tbl[2] = 1;						/* Partition start sector */
+			tbl[3] = 0;						/* Partition start cylinder */
+			tbl[4] = sys;					/* System type */
+			tbl[5] = 254;					/* Partition end head */
+			n = (b_vol + n_vol) / 63 / 255;
+			tbl[6] = (BYTE)(n >> 2 | 63);	/* Partition end sector */
+			tbl[7] = (BYTE)n;				/* End cylinder */
+			ST_DWORD(tbl + 8, 63);			/* Partition start in LBA */
+			ST_DWORD(tbl + 12, n_vol);		/* Partition size in LBA */
+			ST_WORD(fs->win + BS_55AA, 0xAA55);	/* MBR signature */
+			if (disk_write(pdrv, fs->win, 0, 1) != RES_OK)	/* Write it to the MBR */
+				return FR_DISK_ERR;
+			md = 0xF8;
+		}
+	}
+
+	/* Create BPB in the VBR */
+	tbl = fs->win;							/* Clear sector */
+	mem_set(tbl, 0, SS(fs));
+	mem_cpy(tbl, "\xEB\xFE\x90" "MSDOS5.0", 11);/* Boot jump code, OEM name */
+	i = SS(fs);								/* Sector size */
+	ST_WORD(tbl + BPB_BytsPerSec, i);
+	tbl[BPB_SecPerClus] = (BYTE)au;			/* Sectors per cluster */
+	ST_WORD(tbl + BPB_RsvdSecCnt, n_rsv);	/* Reserved sectors */
+	tbl[BPB_NumFATs] = N_FATS;				/* Number of FATs */
+	i = (fmt == FS_FAT32) ? 0 : N_ROOTDIR;	/* Number of root directory entries */
+	ST_WORD(tbl + BPB_RootEntCnt, i);
+	if (n_vol < 0x10000) {					/* Number of total sectors */
+		ST_WORD(tbl + BPB_TotSec16, n_vol);
+	} else {
+		ST_DWORD(tbl + BPB_TotSec32, n_vol);
+	}
+	tbl[BPB_Media] = md;					/* Media descriptor */
+	ST_WORD(tbl + BPB_SecPerTrk, 63);		/* Number of sectors per track */
+	ST_WORD(tbl + BPB_NumHeads, 255);		/* Number of heads */
+	ST_DWORD(tbl + BPB_HiddSec, b_vol);		/* Hidden sectors */
+	n = GET_FATTIME();						/* Use current time as VSN */
+	if (fmt == FS_FAT32) {
+		ST_DWORD(tbl + BS_VolID32, n);		/* VSN */
+		ST_DWORD(tbl + BPB_FATSz32, n_fat);	/* Number of sectors per FAT */
+		ST_DWORD(tbl + BPB_RootClus, 2);	/* Root directory start cluster (2) */
+		ST_WORD(tbl + BPB_FSInfo, 1);		/* FSINFO record offset (VBR + 1) */
+		ST_WORD(tbl + BPB_BkBootSec, 6);	/* Backup boot record offset (VBR + 6) */
+		tbl[BS_DrvNum32] = 0x80;			/* Drive number */
+		tbl[BS_BootSig32] = 0x29;			/* Extended boot signature */
+		mem_cpy(tbl + BS_VolLab32, "NO NAME    " "FAT32   ", 19);	/* Volume label, FAT signature */
+	} else {
+		ST_DWORD(tbl + BS_VolID, n);		/* VSN */
+		ST_WORD(tbl + BPB_FATSz16, n_fat);	/* Number of sectors per FAT */
+		tbl[BS_DrvNum] = 0x80;				/* Drive number */
+		tbl[BS_BootSig] = 0x29;				/* Extended boot signature */
+		mem_cpy(tbl + BS_VolLab, "NO NAME    " "FAT     ", 19);	/* Volume label, FAT signature */
+	}
+	ST_WORD(tbl + BS_55AA, 0xAA55);			/* Signature (Offset is fixed here regardless of sector size) */
+	if (disk_write(pdrv, tbl, b_vol, 1) != RES_OK)	/* Write it to the VBR sector */
+		return FR_DISK_ERR;
+	if (fmt == FS_FAT32)					/* Write it to the backup VBR if needed (VBR + 6) */
+		disk_write(pdrv, tbl, b_vol + 6, 1);
+
+	/* Initialize FAT area */
+	wsect = b_fat;
+	for (i = 0; i < N_FATS; i++) {		/* Initialize each FAT copy */
+		mem_set(tbl, 0, SS(fs));			/* 1st sector of the FAT  */
+		n = md;								/* Media descriptor byte */
+		if (fmt != FS_FAT32) {
+			n |= (fmt == FS_FAT12) ? 0x00FFFF00 : 0xFFFFFF00;
+			ST_DWORD(tbl + 0, n);			/* Reserve cluster #0-1 (FAT12/16) */
+		} else {
+			n |= 0xFFFFFF00;
+			ST_DWORD(tbl + 0, n);			/* Reserve cluster #0-1 (FAT32) */
+			ST_DWORD(tbl + 4, 0xFFFFFFFF);
+			ST_DWORD(tbl + 8, 0x0FFFFFFF);	/* Reserve cluster #2 for root directory */
+		}
+		if (disk_write(pdrv, tbl, wsect++, 1) != RES_OK)
+			return FR_DISK_ERR;
+		mem_set(tbl, 0, SS(fs));			/* Fill following FAT entries with zero */
+		for (n = 1; n < n_fat; n++) {		/* This loop may take a time on FAT32 volume due to many single sector writes */
+			if (disk_write(pdrv, tbl, wsect++, 1) != RES_OK)
+				return FR_DISK_ERR;
+		}
+	}
+
+	/* Initialize root directory */
+	i = (fmt == FS_FAT32) ? au : (UINT)n_dir;
+	do {
+		if (disk_write(pdrv, tbl, wsect++, 1) != RES_OK)
+			return FR_DISK_ERR;
+	} while (--i);
+
+#if _USE_TRIM	/* Erase data area if needed */
+	{
+		eb[0] = wsect; eb[1] = wsect + (n_clst - ((fmt == FS_FAT32) ? 1 : 0)) * au - 1;
+		disk_ioctl(pdrv, CTRL_TRIM, eb);
+	}
+#endif
+
+	/* Create FSINFO if needed */
+	if (fmt == FS_FAT32) {
+		ST_DWORD(tbl + FSI_LeadSig, 0x41615252);
+		ST_DWORD(tbl + FSI_StrucSig, 0x61417272);
+		ST_DWORD(tbl + FSI_Free_Count, n_clst - 1);	/* Number of free clusters */
+		ST_DWORD(tbl + FSI_Nxt_Free, 2);			/* Last allocated cluster# */
+		ST_WORD(tbl + BS_55AA, 0xAA55);
+		disk_write(pdrv, tbl, b_vol + 1, 1);	/* Write original (VBR + 1) */
+		disk_write(pdrv, tbl, b_vol + 7, 1);	/* Write backup (VBR + 7) */
+	}
+
+	return (disk_ioctl(pdrv, CTRL_SYNC, 0) == RES_OK) ? FR_OK : FR_DISK_ERR;
+}
+
+
+
+#if _MULTI_PARTITION
+/*-----------------------------------------------------------------------*/
+/* Create partition table on the physical drive                          */
+/*-----------------------------------------------------------------------*/
+
+FRESULT f_fdisk (
+	BYTE pdrv,			/* Physical drive number */
+	const DWORD szt[],	/* Pointer to the size table for each partitions */
+	void* work			/* Pointer to the working buffer */
+)
+{
+	UINT i, n, sz_cyl, tot_cyl, b_cyl, e_cyl, p_cyl;
+	BYTE s_hd, e_hd, *p, *buf = (BYTE*)work;
+	DSTATUS stat;
+	DWORD sz_disk, sz_part, s_part;
+
+
+	stat = disk_initialize(pdrv);
+	if (stat & STA_NOINIT) return FR_NOT_READY;
+	if (stat & STA_PROTECT) return FR_WRITE_PROTECTED;
+	if (disk_ioctl(pdrv, GET_SECTOR_COUNT, &sz_disk)) return FR_DISK_ERR;
+
+	/* Determine CHS in the table regardless of the drive geometry */
+	for (n = 16; n < 256 && sz_disk / n / 63 > 1024; n *= 2) ;
+	if (n == 256) n--;
+	e_hd = n - 1;
+	sz_cyl = 63 * n;
+	tot_cyl = sz_disk / sz_cyl;
+
+	/* Create partition table */
+	mem_set(buf, 0, _MAX_SS);
+	p = buf + MBR_Table; b_cyl = 0;
+	for (i = 0; i < 4; i++, p += SZ_PTE) {
+		p_cyl = (szt[i] <= 100U) ? (DWORD)tot_cyl * szt[i] / 100 : szt[i] / sz_cyl;
+		if (!p_cyl) continue;
+		s_part = (DWORD)sz_cyl * b_cyl;
+		sz_part = (DWORD)sz_cyl * p_cyl;
+		if (i == 0) {	/* Exclude first track of cylinder 0 */
+			s_hd = 1;
+			s_part += 63; sz_part -= 63;
+		} else {
+			s_hd = 0;
+		}
+		e_cyl = b_cyl + p_cyl - 1;
+		if (e_cyl >= tot_cyl) return FR_INVALID_PARAMETER;
+
+		/* Set partition table */
+		p[1] = s_hd;						/* Start head */
+		p[2] = (BYTE)((b_cyl >> 2) + 1);	/* Start sector */
+		p[3] = (BYTE)b_cyl;					/* Start cylinder */
+		p[4] = 0x06;						/* System type (temporary setting) */
+		p[5] = e_hd;						/* End head */
+		p[6] = (BYTE)((e_cyl >> 2) + 63);	/* End sector */
+		p[7] = (BYTE)e_cyl;					/* End cylinder */
+		ST_DWORD(p + 8, s_part);			/* Start sector in LBA */
+		ST_DWORD(p + 12, sz_part);			/* Partition size */
+
+		/* Next partition */
+		b_cyl += p_cyl;
+	}
+	ST_WORD(p, 0xAA55);
+
+	/* Write it to the MBR */
+	return (disk_write(pdrv, buf, 0, 1) != RES_OK || disk_ioctl(pdrv, CTRL_SYNC, 0) != RES_OK) ? FR_DISK_ERR : FR_OK;
+}
+
+
+#endif /* _MULTI_PARTITION */
+#endif /* _USE_MKFS && !_FS_READONLY */
+
+
+
+
+#if _USE_STRFUNC
+/*-----------------------------------------------------------------------*/
+/* Get a string from the file                                            */
+/*-----------------------------------------------------------------------*/
+
+TCHAR* f_gets (
+	TCHAR* buff,	/* Pointer to the string buffer to read */
+	int len,		/* Size of string buffer (characters) */
+	FIL* fp			/* Pointer to the file object */
+)
+{
+	int n = 0;
+	TCHAR c, *p = buff;
+	BYTE s[2];
+	UINT rc;
+
+
+	while (n < len - 1) {	/* Read characters until buffer gets filled */
+#if _USE_LFN && _LFN_UNICODE
+#if _STRF_ENCODE == 3		/* Read a character in UTF-8 */
+		f_read(fp, s, 1, &rc);
+		if (rc != 1) break;
+		c = s[0];
+		if (c >= 0x80) {
+			if (c < 0xC0) continue;	/* Skip stray trailer */
+			if (c < 0xE0) {			/* Two-byte sequence */
+				f_read(fp, s, 1, &rc);
+				if (rc != 1) break;
+				c = (c & 0x1F) << 6 | (s[0] & 0x3F);
+				if (c < 0x80) c = '?';
+			} else {
+				if (c < 0xF0) {		/* Three-byte sequence */
+					f_read(fp, s, 2, &rc);
+					if (rc != 2) break;
+					c = c << 12 | (s[0] & 0x3F) << 6 | (s[1] & 0x3F);
+					if (c < 0x800) c = '?';
+				} else {			/* Reject four-byte sequence */
+					c = '?';
+				}
+			}
+		}
+#elif _STRF_ENCODE == 2		/* Read a character in UTF-16BE */
+		f_read(fp, s, 2, &rc);
+		if (rc != 2) break;
+		c = s[1] + (s[0] << 8);
+#elif _STRF_ENCODE == 1		/* Read a character in UTF-16LE */
+		f_read(fp, s, 2, &rc);
+		if (rc != 2) break;
+		c = s[0] + (s[1] << 8);
+#else						/* Read a character in ANSI/OEM */
+		f_read(fp, s, 1, &rc);
+		if (rc != 1) break;
+		c = s[0];
+		if (IsDBCS1(c)) {
+			f_read(fp, s, 1, &rc);
+			if (rc != 1) break;
+			c = (c << 8) + s[0];
+		}
+		c = ff_convert(c, 1);	/* OEM -> Unicode */
+		if (!c) c = '?';
+#endif
+#else						/* Read a character without conversion */
+		f_read(fp, s, 1, &rc);
+		if (rc != 1) break;
+		c = s[0];
+#endif
+		if (_USE_STRFUNC == 2 && c == '\r') continue;	/* Strip '\r' */
+		*p++ = c;
+		n++;
+		if (c == '\n') break;		/* Break on EOL */
+	}
+	*p = 0;
+	return n ? buff : 0;			/* When no data read (eof or error), return with error. */
+}
+
+
+
+
+#if !_FS_READONLY
+#include <stdarg.h>
+/*-----------------------------------------------------------------------*/
+/* Put a character to the file                                           */
+/*-----------------------------------------------------------------------*/
+
+typedef struct {
+	FIL* fp;
+	int idx, nchr;
+	BYTE buf[64];
+} putbuff;
+
+
+static
+void putc_bfd (
+	putbuff* pb,
+	TCHAR c
+)
+{
+	UINT bw;
+	int i;
+
+
+	if (_USE_STRFUNC == 2 && c == '\n')	 /* LF -> CRLF conversion */
+		putc_bfd(pb, '\r');
+
+	i = pb->idx;	/* Buffer write index (-1:error) */
+	if (i < 0) return;
+
+#if _USE_LFN && _LFN_UNICODE
+#if _STRF_ENCODE == 3			/* Write a character in UTF-8 */
+	if (c < 0x80) {				/* 7-bit */
+		pb->buf[i++] = (BYTE)c;
+	} else {
+		if (c < 0x800) {		/* 11-bit */
+			pb->buf[i++] = (BYTE)(0xC0 | c >> 6);
+		} else {				/* 16-bit */
+			pb->buf[i++] = (BYTE)(0xE0 | c >> 12);
+			pb->buf[i++] = (BYTE)(0x80 | (c >> 6 & 0x3F));
+		}
+		pb->buf[i++] = (BYTE)(0x80 | (c & 0x3F));
+	}
+#elif _STRF_ENCODE == 2			/* Write a character in UTF-16BE */
+	pb->buf[i++] = (BYTE)(c >> 8);
+	pb->buf[i++] = (BYTE)c;
+#elif _STRF_ENCODE == 1			/* Write a character in UTF-16LE */
+	pb->buf[i++] = (BYTE)c;
+	pb->buf[i++] = (BYTE)(c >> 8);
+#else							/* Write a character in ANSI/OEM */
+	c = ff_convert(c, 0);	/* Unicode -> OEM */
+	if (!c) c = '?';
+	if (c >= 0x100)
+		pb->buf[i++] = (BYTE)(c >> 8);
+	pb->buf[i++] = (BYTE)c;
+#endif
+#else							/* Write a character without conversion */
+	pb->buf[i++] = (BYTE)c;
+#endif
+
+	if (i >= (int)(sizeof pb->buf) - 3) {	/* Write buffered characters to the file */
+		f_write(pb->fp, pb->buf, (UINT)i, &bw);
+		i = (bw == (UINT)i) ? 0 : -1;
+	}
+	pb->idx = i;
+	pb->nchr++;
+}
+
+
+
+int f_putc (
+	TCHAR c,	/* A character to be output */
+	FIL* fp		/* Pointer to the file object */
+)
+{
+	putbuff pb;
+	UINT nw;
+
+
+	pb.fp = fp;			/* Initialize output buffer */
+	pb.nchr = pb.idx = 0;
+
+	putc_bfd(&pb, c);	/* Put a character */
+
+	if (   pb.idx >= 0	/* Flush buffered characters to the file */
+		&& f_write(pb.fp, pb.buf, (UINT)pb.idx, &nw) == FR_OK
+		&& (UINT)pb.idx == nw) return pb.nchr;
+	return EOF;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Put a string to the file                                              */
+/*-----------------------------------------------------------------------*/
+
+int f_puts (
+	const TCHAR* str,	/* Pointer to the string to be output */
+	FIL* fp				/* Pointer to the file object */
+)
+{
+	putbuff pb;
+	UINT nw;
+
+
+	pb.fp = fp;				/* Initialize output buffer */
+	pb.nchr = pb.idx = 0;
+
+	while (*str)			/* Put the string */
+		putc_bfd(&pb, *str++);
+
+	if (   pb.idx >= 0		/* Flush buffered characters to the file */
+		&& f_write(pb.fp, pb.buf, (UINT)pb.idx, &nw) == FR_OK
+		&& (UINT)pb.idx == nw) return pb.nchr;
+	return EOF;
+}
+
+
+
+
+/*-----------------------------------------------------------------------*/
+/* Put a formatted string to the file                                    */
+/*-----------------------------------------------------------------------*/
+
+int f_vprintf (
+	FIL* fp,			/* Pointer to the file object */
+	const TCHAR* fmt,	/* Pointer to the format string */
+	va_list arp			/* Optional arguments... */
+)
+{
+	BYTE f, r;
+	UINT nw, i, j, w;
+	DWORD v;
+	TCHAR c, d, s[16], *p;
+	putbuff pb;
+
+
+	pb.fp = fp;				/* Initialize output buffer */
+	pb.nchr = pb.idx = 0;
+
+	for (;;) {
+		c = *fmt++;
+		if (c == 0) break;			/* End of string */
+		if (c != '%') {				/* Non escape character */
+			putc_bfd(&pb, c);
+			continue;
+		}
+		w = f = 0;
+		c = *fmt++;
+		if (c == '0') {				/* Flag: '0' padding */
+			f = 1; c = *fmt++;
+		} else {
+			if (c == '-') {			/* Flag: left justified */
+				f = 2; c = *fmt++;
+			}
+		}
+		while (IsDigit(c)) {		/* Precision */
+			w = w * 10 + c - '0';
+			c = *fmt++;
+		}
+		if (c == 'l' || c == 'L') {	/* Prefix: Size is long int */
+			f |= 4; c = *fmt++;
+		}
+		if (!c) break;
+		d = c;
+		if (IsLower(d)) d -= 0x20;
+		switch (d) {				/* Type is... */
+		case 'S' :					/* String */
+			p = va_arg(arp, TCHAR*);
+			for (j = 0; p[j]; j++) ;
+			if (!(f & 2)) {
+				while (j++ < w) putc_bfd(&pb, ' ');
+			}
+			while (*p) putc_bfd(&pb, *p++);
+			while (j++ < w) putc_bfd(&pb, ' ');
+			continue;
+		case 'C' :					/* Character */
+			putc_bfd(&pb, (TCHAR)va_arg(arp, int)); continue;
+		case 'B' :					/* Binary */
+			r = 2; break;
+		case 'O' :					/* Octal */
+			r = 8; break;
+		case 'D' :					/* Signed decimal */
+		case 'U' :					/* Unsigned decimal */
+			r = 10; break;
+		case 'X' :					/* Hexdecimal */
+			r = 16; break;
+		default:					/* Unknown type (pass-through) */
+			putc_bfd(&pb, c); continue;
+		}
+
+		/* Get an argument and put it in numeral */
+		v = (f & 4) ? (DWORD)va_arg(arp, long) : ((d == 'D') ? (DWORD)(long)va_arg(arp, int) : (DWORD)va_arg(arp, unsigned int));
+		if (d == 'D' && (v & 0x80000000)) {
+			v = 0 - v;
+			f |= 8;
+		}
+		i = 0;
+		do {
+			d = (TCHAR)(v % r); v /= r;
+			if (d > 9) d += (c == 'x') ? 0x27 : 0x07;
+			s[i++] = d + '0';
+		} while (v && i < sizeof s / sizeof s[0]);
+		if (f & 8) s[i++] = '-';
+		j = i; d = (f & 1) ? '0' : ' ';
+		while (!(f & 2) && j++ < w) putc_bfd(&pb, d);
+		do putc_bfd(&pb, s[--i]); while (i);
+		while (j++ < w) putc_bfd(&pb, d);
+	}
+
+	if (   pb.idx >= 0		/* Flush buffered characters to the file */
+		&& f_write(pb.fp, pb.buf, (UINT)pb.idx, &nw) == FR_OK
+		&& (UINT)pb.idx == nw) return pb.nchr;
+	return EOF;
+}
+
+int f_printf (
+	FIL* fp,			/* Pointer to the file object */
+	const TCHAR* fmt,	/* Pointer to the format string */
+	...					/* Optional arguments... */
+)
+{
+	int ret;
+	va_list arp;
+
+	va_start(arp, fmt);
+	ret = f_vprintf(fp, fmt, arp);
+	va_end(arp);
+	
+	return ret;
+}
+
+#endif /* !_FS_READONLY */
+#endif /* _USE_STRFUNC */
Index: EcnlProtoTool/trunk/mrbgems/gr_peach/src/ff.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/gr_peach/src/ff.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/gr_peach/src/ff.h	(revision 270)
@@ -0,0 +1,371 @@
+/*---------------------------------------------------------------------------/
+/  FatFs - FAT file system module include R0.11a    (C)ChaN, 2015
+/----------------------------------------------------------------------------/
+/ FatFs module is a free software that opened under license policy of
+/ following conditions.
+/
+/ Copyright (C) 2015, ChaN, all right reserved.
+/
+/ 1. Redistributions of source code must retain the above copyright notice,
+/    this condition and the following disclaimer.
+/
+/ This software is provided by the copyright holder and contributors "AS IS"
+/ and any warranties related to this software are DISCLAIMED.
+/ The copyright owner or contributors be NOT LIABLE for any damages caused
+/ by use of this software.
+/---------------------------------------------------------------------------*/
+
+
+#ifndef _FATFS
+#define _FATFS	64180	/* Revision ID */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdarg.h>
+#include "integer.h"	/* Basic integer types */
+#include "ffconf.h"		/* FatFs configuration options */
+#include "diskio.h"
+#if _FATFS != _FFCONF
+#error Wrong configuration file (ffconf.h).
+#endif
+
+
+
+/* Definitions of volume management */
+
+#if _MULTI_PARTITION		/* Multiple partition configuration */
+typedef struct {
+	BYTE pd;	/* Physical drive number */
+	BYTE pt;	/* Partition: 0:Auto detect, 1-4:Forced partition) */
+} PARTITION;
+extern PARTITION VolToPart[];	/* Volume - Partition resolution table */
+#define LD2PD(vol) (VolToPart[vol].pd)	/* Get physical drive number */
+#define LD2PT(vol) (VolToPart[vol].pt)	/* Get partition index */
+
+#else							/* Single partition configuration */
+#define LD2PD(vol) (BYTE)(vol)	/* Each logical drive is bound to the same physical drive number */
+#define LD2PT(vol) 0			/* Find first valid partition or in SFD */
+
+#endif
+
+
+
+/* Type of path name strings on FatFs API */
+
+#if _LFN_UNICODE			/* Unicode string */
+#if !_USE_LFN
+#error _LFN_UNICODE must be 0 at non-LFN cfg.
+#endif
+#ifndef _INC_TCHAR
+typedef WCHAR TCHAR;
+#define _T(x) L ## x
+#define _TEXT(x) L ## x
+#endif
+
+#else						/* ANSI/OEM string */
+#ifndef _INC_TCHAR
+typedef char TCHAR;
+#define _T(x) x
+#define _TEXT(x) x
+#endif
+
+#endif
+
+
+
+/* File system object structure (FATFS) */
+
+typedef struct {
+	BYTE	fs_type;		/* FAT sub-type (0:Not mounted) */
+	BYTE	drv;			/* Physical drive number */
+	BYTE	csize;			/* Sectors per cluster (1,2,4...128) */
+	BYTE	n_fats;			/* Number of FAT copies (1 or 2) */
+	BYTE	wflag;			/* win[] flag (b0:dirty) */
+	BYTE	fsi_flag;		/* FSINFO flags (b7:disabled, b0:dirty) */
+	WORD	id;				/* File system mount ID */
+	WORD	n_rootdir;		/* Number of root directory entries (FAT12/16) */
+#if _MAX_SS != _MIN_SS
+	WORD	ssize;			/* Bytes per sector (512, 1024, 2048 or 4096) */
+#endif
+#if _FS_REENTRANT
+	_SYNC_t	sobj;			/* Identifier of sync object */
+#endif
+#if !_FS_READONLY
+	DWORD	last_clust;		/* Last allocated cluster */
+	DWORD	free_clust;		/* Number of free clusters */
+#endif
+#if _FS_RPATH
+	DWORD	cdir;			/* Current directory start cluster (0:root) */
+#endif
+	DWORD	n_fatent;		/* Number of FAT entries, = number of clusters + 2 */
+	DWORD	fsize;			/* Sectors per FAT */
+	DWORD	volbase;		/* Volume start sector */
+	DWORD	fatbase;		/* FAT start sector */
+	DWORD	dirbase;		/* Root directory start sector (FAT32:Cluster#) */
+	DWORD	database;		/* Data start sector */
+	DWORD	winsect;		/* Current sector appearing in the win[] */
+	BYTE	win[_MAX_SS];	/* Disk access window for Directory, FAT (and file data at tiny cfg) */
+} FATFS;
+
+
+
+/* File object structure (FIL) */
+
+typedef struct {
+	FATFS*	fs;				/* Pointer to the related file system object (**do not change order**) */
+	WORD	id;				/* Owner file system mount ID (**do not change order**) */
+	BYTE	flag;			/* Status flags */
+	BYTE	err;			/* Abort flag (error code) */
+	DWORD	fptr;			/* File read/write pointer (Zeroed on file open) */
+	DWORD	fsize;			/* File size */
+	DWORD	sclust;			/* File start cluster (0:no cluster chain, always 0 when fsize is 0) */
+	DWORD	clust;			/* Current cluster of fpter (not valid when fprt is 0) */
+	DWORD	dsect;			/* Sector number appearing in buf[] (0:invalid) */
+#if !_FS_READONLY
+	DWORD	dir_sect;		/* Sector number containing the directory entry */
+	BYTE*	dir_ptr;		/* Pointer to the directory entry in the win[] */
+#endif
+#if _USE_FASTSEEK
+	DWORD*	cltbl;			/* Pointer to the cluster link map table (Nulled on file open) */
+#endif
+#if _FS_LOCK
+	UINT	lockid;			/* File lock ID origin from 1 (index of file semaphore table Files[]) */
+#endif
+#if !_FS_TINY
+	BYTE	buf[_MAX_SS];	/* File private data read/write window */
+#endif
+} FIL;
+
+
+
+/* Directory object structure (DIR) */
+
+typedef struct {
+	FATFS*	fs;				/* Pointer to the owner file system object (**do not change order**) */
+	WORD	id;				/* Owner file system mount ID (**do not change order**) */
+	WORD	index;			/* Current read/write index number */
+	DWORD	sclust;			/* Table start cluster (0:Root dir) */
+	DWORD	clust;			/* Current cluster */
+	DWORD	sect;			/* Current sector */
+	BYTE*	dir;			/* Pointer to the current SFN entry in the win[] */
+	BYTE*	fn;				/* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */
+#if _FS_LOCK
+	UINT	lockid;			/* File lock ID (index of file semaphore table Files[]) */
+#endif
+#if _USE_LFN
+	WCHAR*	lfn;			/* Pointer to the LFN working buffer */
+	WORD	lfn_idx;		/* Last matched LFN index number (0xFFFF:No LFN) */
+#endif
+#if _USE_FIND
+	const TCHAR*	pat;	/* Pointer to the name matching pattern */
+#endif
+} DIR;
+
+
+
+/* File information structure (FILINFO) */
+
+typedef struct {
+	DWORD	fsize;			/* File size */
+	WORD	fdate;			/* Last modified date */
+	WORD	ftime;			/* Last modified time */
+	BYTE	fattrib;		/* Attribute */
+	TCHAR	fname[13];		/* Short file name (8.3 format) */
+#if _USE_LFN
+	TCHAR*	lfname;			/* Pointer to the LFN buffer */
+	UINT 	lfsize;			/* Size of LFN buffer in TCHAR */
+#endif
+} FILINFO;
+
+
+
+/* File function return code (FRESULT) */
+
+typedef enum {
+	FR_OK = 0,				/* (0) Succeeded */
+	FR_DISK_ERR,			/* (1) A hard error occurred in the low level disk I/O layer */
+	FR_INT_ERR,				/* (2) Assertion failed */
+	FR_NOT_READY,			/* (3) The physical drive cannot work */
+	FR_NO_FILE,				/* (4) Could not find the file */
+	FR_NO_PATH,				/* (5) Could not find the path */
+	FR_INVALID_NAME,		/* (6) The path name format is invalid */
+	FR_DENIED,				/* (7) Access denied due to prohibited access or directory full */
+	FR_EXIST,				/* (8) Access denied due to prohibited access */
+	FR_INVALID_OBJECT,		/* (9) The file/directory object is invalid */
+	FR_WRITE_PROTECTED,		/* (10) The physical drive is write protected */
+	FR_INVALID_DRIVE,		/* (11) The logical drive number is invalid */
+	FR_NOT_ENABLED,			/* (12) The volume has no work area */
+	FR_NO_FILESYSTEM,		/* (13) There is no valid FAT volume */
+	FR_MKFS_ABORTED,		/* (14) The f_mkfs() aborted due to any parameter error */
+	FR_TIMEOUT,				/* (15) Could not get a grant to access the volume within defined period */
+	FR_LOCKED,				/* (16) The operation is rejected according to the file sharing policy */
+	FR_NOT_ENOUGH_CORE,		/* (17) LFN working buffer could not be allocated */
+	FR_TOO_MANY_OPEN_FILES,	/* (18) Number of open files > _FS_LOCK */
+	FR_INVALID_PARAMETER	/* (19) Given parameter is invalid */
+} FRESULT;
+
+
+
+/*--------------------------------------------------------------*/
+/* FatFs module application interface                           */
+
+FRESULT f_open (FIL* fp, const TCHAR* path, BYTE mode);				/* Open or create a file */
+FRESULT f_close (FIL* fp);											/* Close an open file object */
+FRESULT f_read (FIL* fp, void* buff, UINT btr, UINT* br);			/* Read data from a file */
+FRESULT f_write (FIL* fp, const void* buff, UINT btw, UINT* bw);	/* Write data to a file */
+FRESULT f_forward (FIL* fp, UINT(*func)(const BYTE*,UINT), UINT btf, UINT* bf);	/* Forward data to the stream */
+FRESULT f_lseek (FIL* fp, DWORD ofs);								/* Move file pointer of a file object */
+FRESULT f_truncate (FIL* fp);										/* Truncate file */
+FRESULT f_sync (FIL* fp);											/* Flush cached data of a writing file */
+FRESULT f_opendir (DIR* dp, const TCHAR* path);						/* Open a directory */
+FRESULT f_closedir (DIR* dp);										/* Close an open directory */
+FRESULT f_readdir (DIR* dp, FILINFO* fno);							/* Read a directory item */
+FRESULT f_findfirst (DIR* dp, FILINFO* fno, const TCHAR* path, const TCHAR* pattern);	/* Find first file */
+FRESULT f_findnext (DIR* dp, FILINFO* fno);							/* Find next file */
+FRESULT f_mkdir (const TCHAR* path);								/* Create a sub directory */
+FRESULT f_unlink (const TCHAR* path);								/* Delete an existing file or directory */
+FRESULT f_rename (const TCHAR* path_old, const TCHAR* path_new);	/* Rename/Move a file or directory */
+FRESULT f_stat (const TCHAR* path, FILINFO* fno);					/* Get file status */
+FRESULT f_chmod (const TCHAR* path, BYTE attr, BYTE mask);			/* Change attribute of the file/dir */
+FRESULT f_utime (const TCHAR* path, const FILINFO* fno);			/* Change times-tamp of the file/dir */
+FRESULT f_chdir (const TCHAR* path);								/* Change current directory */
+FRESULT f_chdrive (const TCHAR* path);								/* Change current drive */
+FRESULT f_getcwd (TCHAR* buff, UINT len);							/* Get current directory */
+FRESULT f_getfree (const TCHAR* path, DWORD* nclst, FATFS** fatfs);	/* Get number of free clusters on the drive */
+FRESULT f_getlabel (const TCHAR* path, TCHAR* label, DWORD* vsn);	/* Get volume label */
+FRESULT f_setlabel (const TCHAR* label);							/* Set volume label */
+FRESULT f_mount (FATFS* fs, const TCHAR* path, BYTE opt);			/* Mount/Unmount a logical drive */
+FRESULT f_mkfs (const TCHAR* path, BYTE sfd, UINT au);				/* Create a file system on the volume */
+FRESULT f_fdisk (BYTE pdrv, const DWORD szt[], void* work);			/* Divide a physical drive into some partitions */
+int f_putc (TCHAR c, FIL* fp);										/* Put a character to the file */
+int f_puts (const TCHAR* str, FIL* cp);								/* Put a string to the file */
+int f_vprintf (FIL* fp, const TCHAR* str, va_list arg);				/* Put a formatted string to the file */
+int f_printf (FIL* fp, const TCHAR* str, ...);						/* Put a formatted string to the file */
+TCHAR* f_gets (TCHAR* buff, int len, FIL* fp);						/* Get a string from the file */
+
+#define f_eof(fp) ((int)((fp)->fptr == (fp)->fsize))
+#define f_error(fp) ((fp)->err)
+#define f_tell(fp) ((fp)->fptr)
+#define f_size(fp) ((fp)->fsize)
+#define f_rewind(fp) f_lseek((fp), 0)
+#define f_rewinddir(dp) f_readdir((dp), 0)
+#define f_flush(fp)
+
+#define F_SEEK_SET 1
+#define F_SEEK_CUR 2
+#define F_SEEK_END 3
+static FRESULT f_seek(FIL* fp, DWORD ofs, BYTE mode)
+{
+  switch (mode) {
+  case F_SEEK_SET:
+    return f_lseek((fp), ofs);
+  case F_SEEK_CUR:
+    return f_lseek((fp), (fp)->fptr + ofs);
+  case F_SEEK_END:
+    return f_lseek((fp), (fp)->fsize - ofs);
+  default:
+    return FR_INVALID_PARAMETER;
+  }
+}
+
+#ifndef EOF
+#define EOF (-1)
+#endif
+
+
+
+
+/*--------------------------------------------------------------*/
+/* Additional user defined functions                            */
+
+/* RTC function */
+#if !_FS_READONLY && !_FS_NORTC
+DWORD get_fattime (void);
+#endif
+
+/* Unicode support functions */
+#if _USE_LFN							/* Unicode - OEM code conversion */
+WCHAR ff_convert (WCHAR chr, UINT dir);	/* OEM-Unicode bidirectional conversion */
+WCHAR ff_wtoupper (WCHAR chr);			/* Unicode upper-case conversion */
+#if _USE_LFN == 3						/* Memory functions */
+void* ff_memalloc (UINT msize);			/* Allocate memory block */
+void ff_memfree (void* mblock);			/* Free memory block */
+#endif
+#endif
+
+/* Sync functions */
+#if _FS_REENTRANT
+int ff_cre_syncobj (BYTE vol, _SYNC_t* sobj);	/* Create a sync object */
+int ff_req_grant (_SYNC_t sobj);				/* Lock sync object */
+void ff_rel_grant (_SYNC_t sobj);				/* Unlock sync object */
+int ff_del_syncobj (_SYNC_t sobj);				/* Delete a sync object */
+#endif
+
+
+
+
+/*--------------------------------------------------------------*/
+/* Flags and offset address                                     */
+
+
+/* File access control and file status flags (FIL.flag) */
+
+#define	FA_READ				0x01
+#define	FA_OPEN_EXISTING	0x00
+
+#if !_FS_READONLY
+#define	FA_WRITE			0x02
+#define	FA_CREATE_NEW		0x04
+#define	FA_CREATE_ALWAYS	0x08
+#define	FA_OPEN_ALWAYS		0x10
+#define FA__WRITTEN			0x20
+#define FA__DIRTY			0x40
+#endif
+
+
+/* FAT sub type (FATFS.fs_type) */
+
+#define FS_FAT12	1
+#define FS_FAT16	2
+#define FS_FAT32	3
+
+
+/* File attribute bits for directory entry */
+
+#define	AM_RDO	0x01	/* Read only */
+#define	AM_HID	0x02	/* Hidden */
+#define	AM_SYS	0x04	/* System */
+#define	AM_VOL	0x08	/* Volume label */
+#define AM_LFN	0x0F	/* LFN entry */
+#define AM_DIR	0x10	/* Directory */
+#define AM_ARC	0x20	/* Archive */
+#define AM_MASK	0x3F	/* Mask of defined bits */
+
+
+/* Fast seek feature */
+#define CREATE_LINKMAP	0xFFFFFFFF
+
+
+
+/*--------------------------------*/
+/* Multi-byte word access macros  */
+
+#if _WORD_ACCESS == 1	/* Enable word access to the FAT structure */
+#define	LD_WORD(ptr)		(WORD)(*(WORD*)(BYTE*)(ptr))
+#define	LD_DWORD(ptr)		(DWORD)(*(DWORD*)(BYTE*)(ptr))
+#define	ST_WORD(ptr,val)	*(WORD*)(BYTE*)(ptr)=(WORD)(val)
+#define	ST_DWORD(ptr,val)	*(DWORD*)(BYTE*)(ptr)=(DWORD)(val)
+#else					/* Use byte-by-byte access to the FAT structure */
+#define	LD_WORD(ptr)		(WORD)(((WORD)*((BYTE*)(ptr)+1)<<8)|(WORD)*(BYTE*)(ptr))
+#define	LD_DWORD(ptr)		(DWORD)(((DWORD)*((BYTE*)(ptr)+3)<<24)|((DWORD)*((BYTE*)(ptr)+2)<<16)|((WORD)*((BYTE*)(ptr)+1)<<8)|*(BYTE*)(ptr))
+#define	ST_WORD(ptr,val)	*(BYTE*)(ptr)=(BYTE)(val); *((BYTE*)(ptr)+1)=(BYTE)((WORD)(val)>>8)
+#define	ST_DWORD(ptr,val)	*(BYTE*)(ptr)=(BYTE)(val); *((BYTE*)(ptr)+1)=(BYTE)((WORD)(val)>>8); *((BYTE*)(ptr)+2)=(BYTE)((DWORD)(val)>>16); *((BYTE*)(ptr)+3)=(BYTE)((DWORD)(val)>>24)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _FATFS */
Index: EcnlProtoTool/trunk/mrbgems/gr_peach/src/ffconf.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/gr_peach/src/ffconf.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/gr_peach/src/ffconf.h	(revision 270)
@@ -0,0 +1,276 @@
+/*---------------------------------------------------------------------------/
+/  FatFs - FAT file system module configuration file  R0.11a (C)ChaN, 2015
+/---------------------------------------------------------------------------*/
+
+#define _FFCONF 64180	/* Revision ID */
+
+/*---------------------------------------------------------------------------/
+/ Function Configurations
+/---------------------------------------------------------------------------*/
+
+#define _FS_READONLY	0
+/* This option switches read-only configuration. (0:Read/Write or 1:Read-only)
+/  Read-only configuration removes writing API functions, f_write(), f_sync(),
+/  f_unlink(), f_mkdir(), f_chmod(), f_rename(), f_truncate(), f_getfree()
+/  and optional writing functions as well. */
+
+
+#define _FS_MINIMIZE	0
+/* This option defines minimization level to remove some basic API functions.
+/
+/   0: All basic functions are enabled.
+/   1: f_stat(), f_getfree(), f_unlink(), f_mkdir(), f_chmod(), f_utime(),
+/      f_truncate() and f_rename() function are removed.
+/   2: f_opendir(), f_readdir() and f_closedir() are removed in addition to 1.
+/   3: f_lseek() function is removed in addition to 2. */
+
+
+#define	_USE_STRFUNC	1
+/* This option switches string functions, f_gets(), f_putc(), f_puts() and
+/  f_printf().
+/
+/  0: Disable string functions.
+/  1: Enable without LF-CRLF conversion.
+/  2: Enable with LF-CRLF conversion. */
+
+
+#define _USE_FIND		1
+/* This option switches filtered directory read feature and related functions,
+/  f_findfirst() and f_findnext(). (0:Disable or 1:Enable) */
+
+
+#define	_USE_MKFS		1
+/* This option switches f_mkfs() function. (0:Disable or 1:Enable) */
+
+
+#define	_USE_FASTSEEK	0
+/* This option switches fast seek feature. (0:Disable or 1:Enable) */
+
+
+#define _USE_LABEL		1
+/* This option switches volume label functions, f_getlabel() and f_setlabel().
+/  (0:Disable or 1:Enable) */
+
+
+#define	_USE_FORWARD	1
+/* This option switches f_forward() function. (0:Disable or 1:Enable)
+/  To enable it, also _FS_TINY need to be set to 1. */
+
+
+/*---------------------------------------------------------------------------/
+/ Locale and Namespace Configurations
+/---------------------------------------------------------------------------*/
+
+#define _CODE_PAGE 437
+/* This option specifies the OEM code page to be used on the target system.
+/  Incorrect setting of the code page can cause a file open failure.
+/
+/   1   - ASCII (No extended character. Non-LFN cfg. only)
+/   437 - U.S.
+/   720 - Arabic
+/   737 - Greek
+/   771 - KBL
+/   775 - Baltic
+/   850 - Latin 1
+/   852 - Latin 2
+/   855 - Cyrillic
+/   857 - Turkish
+/   860 - Portuguese
+/   861 - Icelandic
+/   862 - Hebrew
+/   863 - Canadian French
+/   864 - Arabic
+/   865 - Nordic
+/   866 - Russian
+/   869 - Greek 2
+/   932 - Japanese (DBCS)
+/   936 - Simplified Chinese (DBCS)
+/   949 - Korean (DBCS)
+/   950 - Traditional Chinese (DBCS)
+*/
+
+
+#define	_USE_LFN	1
+#define	_MAX_LFN	255
+/* The _USE_LFN option switches the LFN feature.
+/
+/   0: Disable LFN feature. _MAX_LFN has no effect.
+/   1: Enable LFN with static working buffer on the BSS. Always NOT thread-safe.
+/   2: Enable LFN with dynamic working buffer on the STACK.
+/   3: Enable LFN with dynamic working buffer on the HEAP.
+/
+/  When enable the LFN feature, Unicode handling functions (option/unicode.c) must
+/  be added to the project. The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes.
+/  When use stack for the working buffer, take care on stack overflow. When use heap
+/  memory for the working buffer, memory management functions, ff_memalloc() and
+/  ff_memfree(), must be added to the project. */
+
+
+#define	_LFN_UNICODE	0
+/* This option switches character encoding on the API. (0:ANSI/OEM or 1:Unicode)
+/  To use Unicode string for the path name, enable LFN feature and set _LFN_UNICODE
+/  to 1. This option also affects behavior of string I/O functions. */
+
+
+#define _STRF_ENCODE	3
+/* When _LFN_UNICODE is 1, this option selects the character encoding on the file to
+/  be read/written via string I/O functions, f_gets(), f_putc(), f_puts and f_printf().
+/
+/  0: ANSI/OEM
+/  1: UTF-16LE
+/  2: UTF-16BE
+/  3: UTF-8
+/
+/  When _LFN_UNICODE is 0, this option has no effect. */
+
+
+#define _FS_RPATH	2
+/* This option configures relative path feature.
+/
+/   0: Disable relative path feature and remove related functions.
+/   1: Enable relative path feature. f_chdir() and f_chdrive() are available.
+/   2: f_getcwd() function is available in addition to 1.
+/
+/  Note that directory items read via f_readdir() are affected by this option. */
+
+
+/*---------------------------------------------------------------------------/
+/ Drive/Volume Configurations
+/---------------------------------------------------------------------------*/
+
+#define _VOLUMES	2
+/* Number of volumes (logical drives) to be used. */
+
+
+#define _STR_VOLUME_ID	0
+#define _VOLUME_STRS	"RAM","NAND","CF","SD1","SD2","USB1","USB2","USB3"
+/* _STR_VOLUME_ID option switches string volume ID feature.
+/  When _STR_VOLUME_ID is set to 1, also pre-defined strings can be used as drive
+/  number in the path name. _VOLUME_STRS defines the drive ID strings for each
+/  logical drives. Number of items must be equal to _VOLUMES. Valid characters for
+/  the drive ID strings are: A-Z and 0-9. */
+
+
+#define	_MULTI_PARTITION	0
+/* This option switches multi-partition feature. By default (0), each logical drive
+/  number is bound to the same physical drive number and only an FAT volume found on
+/  the physical drive will be mounted. When multi-partition feature is enabled (1),
+/  each logical drive number is bound to arbitrary physical drive and partition
+/  listed in the VolToPart[]. Also f_fdisk() funciton will be available. */
+
+
+#define	_MIN_SS		512
+#define	_MAX_SS		512
+/* These options configure the range of sector size to be supported. (512, 1024,
+/  2048 or 4096) Always set both 512 for most systems, all type of memory cards and
+/  harddisk. But a larger value may be required for on-board flash memory and some
+/  type of optical media. When _MAX_SS is larger than _MIN_SS, FatFs is configured
+/  to variable sector size and GET_SECTOR_SIZE command must be implemented to the
+/  disk_ioctl() function. */
+
+
+#define	_USE_TRIM	0
+/* This option switches ATA-TRIM feature. (0:Disable or 1:Enable)
+/  To enable Trim feature, also CTRL_TRIM command should be implemented to the
+/  disk_ioctl() function. */
+
+
+#define _FS_NOFSINFO	0
+/* If you need to know correct free space on the FAT32 volume, set bit 0 of this
+/  option, and f_getfree() function at first time after volume mount will force
+/  a full FAT scan. Bit 1 controls the use of last allocated cluster number.
+/
+/  bit0=0: Use free cluster count in the FSINFO if available.
+/  bit0=1: Do not trust free cluster count in the FSINFO.
+/  bit1=0: Use last allocated cluster number in the FSINFO if available.
+/  bit1=1: Do not trust last allocated cluster number in the FSINFO.
+*/
+
+
+
+/*---------------------------------------------------------------------------/
+/ System Configurations
+/---------------------------------------------------------------------------*/
+
+#define	_FS_TINY	1
+/* This option switches tiny buffer configuration. (0:Normal or 1:Tiny)
+/  At the tiny configuration, size of the file object (FIL) is reduced _MAX_SS
+/  bytes. Instead of private sector buffer eliminated from the file object,
+/  common sector buffer in the file system object (FATFS) is used for the file
+/  data transfer. */
+
+
+#define _FS_NORTC	0
+#define _NORTC_MON	1
+#define _NORTC_MDAY	1
+#define _NORTC_YEAR	2015
+/* The _FS_NORTC option switches timestamp feature. If the system does not have
+/  an RTC function or valid timestamp is not needed, set _FS_NORTC to 1 to disable
+/  the timestamp feature. All objects modified by FatFs will have a fixed timestamp
+/  defined by _NORTC_MON, _NORTC_MDAY and _NORTC_YEAR.
+/  When timestamp feature is enabled (_FS_NORTC == 0), get_fattime() function need
+/  to be added to the project to read current time form RTC. _NORTC_MON,
+/  _NORTC_MDAY and _NORTC_YEAR have no effect. 
+/  These options have no effect at read-only configuration (_FS_READONLY == 1). */
+
+
+#define	_FS_LOCK	0
+/* The _FS_LOCK option switches file lock feature to control duplicated file open
+/  and illegal operation to open objects. This option must be 0 when _FS_READONLY
+/  is 1.
+/
+/  0:  Disable file lock feature. To avoid volume corruption, application program
+/      should avoid illegal open, remove and rename to the open objects.
+/  >0: Enable file lock feature. The value defines how many files/sub-directories
+/      can be opened simultaneously under file lock control. Note that the file
+/      lock feature is independent of re-entrancy. */
+
+
+#define _FS_REENTRANT	0
+#define _FS_TIMEOUT		1000
+#define	_SYNC_t			HANDLE
+/* The _FS_REENTRANT option switches the re-entrancy (thread safe) of the FatFs
+/  module itself. Note that regardless of this option, file access to different
+/  volume is always re-entrant and volume control functions, f_mount(), f_mkfs()
+/  and f_fdisk() function, are always not re-entrant. Only file/directory access
+/  to the same volume is under control of this feature.
+/
+/   0: Disable re-entrancy. _FS_TIMEOUT and _SYNC_t have no effect.
+/   1: Enable re-entrancy. Also user provided synchronization handlers,
+/      ff_req_grant(), ff_rel_grant(), ff_del_syncobj() and ff_cre_syncobj()
+/      function, must be added to the project. Samples are available in
+/      option/syscall.c.
+/
+/  The _FS_TIMEOUT defines timeout period in unit of time tick.
+/  The _SYNC_t defines O/S dependent sync object type. e.g. HANDLE, ID, OS_EVENT*,
+/  SemaphoreHandle_t and etc.. A header file for O/S definitions needs to be
+/  included somewhere in the scope of ff.c. */
+
+
+#define _WORD_ACCESS	1
+/* The _WORD_ACCESS option is an only platform dependent option. It defines
+/  which access method is used to the word data on the FAT volume.
+/
+/   0: Byte-by-byte access. Always compatible with all platforms.
+/   1: Word access. Do not choose this unless under both the following conditions.
+/
+/  * Address misaligned memory access is always allowed to ALL instructions.
+/  * Byte order on the memory is little-endian.
+/
+/  If it is the case, _WORD_ACCESS can also be set to 1 to reduce code size.
+/  Following table shows allowable settings of some type of processors.
+/
+/  ARM7TDMI   0   *2          ColdFire   0    *1         V850E      0    *2
+/  Cortex-M3  0   *3          Z80        0/1             V850ES     0/1
+/  Cortex-M0  0   *2          x86        0/1             TLCS-870   0/1
+/  AVR        0/1             RX600(LE)  0/1             TLCS-900   0/1
+/  AVR32      0   *1          RL78       0    *2         R32C       0    *2
+/  PIC18      0/1             SH-2       0    *1         M16C       0/1
+/  PIC24      0   *2          H8S        0    *1         MSP430     0    *2
+/  PIC32      0   *1          H8/300H    0    *1         8051       0/1
+/
+/  *1:Big-endian.
+/  *2:Unaligned memory access is not supported.
+/  *3:Some compilers generate LDM/STM for mem_cpy function.
+*/
+
Index: EcnlProtoTool/trunk/mrbgems/gr_peach/src/integer.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/gr_peach/src/integer.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/gr_peach/src/integer.h	(revision 270)
@@ -0,0 +1,33 @@
+/*-------------------------------------------*/
+/* Integer type definitions for FatFs module */
+/*-------------------------------------------*/
+
+#ifndef _FF_INTEGER
+#define _FF_INTEGER
+
+#if 0//def _WIN32	/* FatFs development platform */
+
+#include <windows.h>
+#include <tchar.h>
+
+#else			/* Embedded platform */
+#ifndef _WINNT_
+/* This type MUST be 8 bit */
+typedef unsigned char	BYTE;
+
+/* These types MUST be 16 bit */
+typedef short			SHORT;
+typedef unsigned short	WORD;
+typedef unsigned short	WCHAR;
+
+/* These types MUST be 16 bit or 32 bit */
+typedef int				INT;
+typedef unsigned int	UINT;
+
+/* These types MUST be 32 bit */
+typedef long			LONG;
+typedef unsigned long	DWORD;
+#endif
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/mrbgems/gr_peach/src/sdfs.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/gr_peach/src/sdfs.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/gr_peach/src/sdfs.c	(revision 270)
@@ -0,0 +1,529 @@
+/* mbed Microcontroller Library
+	* Copyright (c) 2006-2012 ARM Limited
+	*
+	* Permission is hereby granted, free of charge, to any person obtaining a copy
+	* of this software and associated documentation files (the "Software"), to deal
+	* in the Software without restriction, including without limitation the rights
+	* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+	* copies of the Software, and to permit persons to whom the Software is
+	* furnished to do so, subject to the following conditions:
+	*
+	* The above copyright notice and this permission notice shall be included in
+	* all copies or substantial portions of the Software.
+	*
+	* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+	* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+	* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+	* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+	* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+	* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+	* SOFTWARE.
+	*/
+
+/* Introduction
+	* ------------
+	* SD and MMC cards support a number of interfaces, but common to them all
+	* is one based on SPI. This is the one I'm implmenting because it means
+	* it is much more portable even though not so performant, and we already
+	* have the mbed SPI Interface!
+	*
+	* The main reference I'm using is Chapter 7, "SPI Mode" of:
+	*  http://www.sdcard.org/developers/tech/sdcard/pls/Simplified_Physical_Layer_Spec.pdf
+	*
+	* SPI Startup
+	* -----------
+	* The SD card powers up in SD mode. The SPI interface mode is selected by
+	* asserting CS low and sending the reset command (CMD0). The card will
+	* respond with a (R1) response.
+	*
+	* CMD8 is optionally sent to determine the voltage range supported, and
+	* indirectly determine whether it is a version 1.x SD/non-SD card or
+	* version 2.x. I'll just ignore this for now.
+	*
+	* ACMD41 is repeatedly issued to initialise the card, until "in idle"
+	* (bit 0) of the R1 response goes to '0', indicating it is initialised.
+	*
+	* You should also indicate whether the host supports High Capicity cards,
+	* and check whether the card is high capacity - i'll also ignore this
+	*
+	* SPI Protocol
+	* ------------
+	* The SD SPI protocol is based on transactions made up of 8-bit words, with
+	* the host starting every bus transaction by asserting the CS signal low. The
+	* card always responds to commands, data blocks and errors.
+	*
+	* The protocol supports a CRC, but by default it is off (except for the
+	* first reset CMD0, where the CRC can just be pre-calculated, and CMD8)
+	* I'll leave the CRC off I think!
+	*
+	* Standard capacity cards have variable data block sizes, whereas High
+	* Capacity cards fix the size of data block to 512 bytes. I'll therefore
+	* just always use the Standard Capacity cards with a block size of 512 bytes.
+	* This is set with CMD16.
+	*
+	* You can read and write single blocks (CMD17, CMD25) or multiple blocks
+	* (CMD18, CMD25). For simplicity, I'll just use single block accesses. When
+	* the card gets a read command, it responds with a response token, and then
+	* a data token or an error.
+	*
+	* SPI Command Format
+	* ------------------
+	* Commands are 6-bytes long, containing the command, 32-bit argument, and CRC.
+	*
+	* +---------------+------------+------------+-----------+----------+--------------+
+	* | 01 | cmd[5:0] | arg[31:24] | arg[23:16] | arg[15:8] | arg[7:0] | crc[6:0] | 1 |
+	* +---------------+------------+------------+-----------+----------+--------------+
+	*
+	* As I'm not using CRC, I can fix that byte to what is needed for CMD0 (0x95)
+	*
+	* All Application Specific commands shall be preceded with APP_CMD (CMD55).
+	*
+	* SPI Response Format
+	* -------------------
+	* The main response format (R1) is a status byte (normally zero). Key flags:
+	*  idle - 1 if the card is in an idle state/initialising
+	*  cmd  - 1 if an illegal command code was detected
+	*
+	*    +-------------------------------------------------+
+	* R1 | 0 | arg | addr | seq | crc | cmd | erase | idle |
+	*    +-------------------------------------------------+
+	*
+	* R1b is the same, except it is followed by a busy signal (zeros) until
+	* the first non-zero byte when it is ready again.
+	*
+	* Data Response Token
+	* -------------------
+	* Every data block written to the card is acknowledged by a byte
+	* response token
+	*
+	* +----------------------+
+	* | xxx | 0 | status | 1 |
+	* +----------------------+
+	*              010 - OK!
+	*              101 - CRC Error
+	*              110 - Write Error
+	*
+	* Single Block Read and Write
+	* ---------------------------
+	*
+	* Block transfers have a byte header, followed by the data, followed
+	* by a 16-bit CRC. In our case, the data will always be 512 bytes.
+	*
+	* +------+---------+---------+- -  - -+---------+-----------+----------+
+	* | 0xFE | data[0] | data[1] |        | data[n] | crc[15:8] | crc[7:0] |
+	* +------+---------+---------+- -  - -+---------+-----------+----------+
+	*/
+#include "sdfs.h"
+//#include "mbed_debug.h"
+#include "wait_api.h"
+
+#define debug(str, ...)
+#define debug_if(cond, strt, ...) if(cond){ debug(str, __ARGS__); }
+
+static int sdfs_initialise_card_v1(sdfs_t *obj);
+static int sdfs_initialise_card_v2(sdfs_t *obj);
+static int sdfs__cmd(sdfs_t *obj, int cmd, int arg);
+static int sdfs__cmd8(sdfs_t *obj);
+static int sdfs__cmd58(sdfs_t *obj);
+static uint64_t sdfs__sd_sectors(sdfs_t *obj);
+static int sdfs__write(sdfs_t *obj, const uint8_t*buffer, uint32_t length);
+static int sdfs__read(sdfs_t *obj, uint8_t *buffer, uint32_t length);
+
+#define SD_COMMAND_TIMEOUT 5000
+
+#define SD_DBG             0
+
+sdfs_init(sdfs_t *obj, PinName mosi, PinName miso, PinName sclk, PinName cs, const char* name)
+{
+	obj->name = name;
+	spi_init(&obj->_spi, mosi, miso, sclk, NC);
+	gpio_init_out(&obj->_cs, cs);
+	gpio_write(&obj->_cs, 1);
+
+    // Set default to 100kHz for initialisation and 1MHz for data transfer
+    obj->_init_sck = 100000;
+    obj->_transfer_sck = 1000000;
+}
+
+#define R1_IDLE_STATE           (1 << 0)
+#define R1_ERASE_RESET          (1 << 1)
+#define R1_ILLEGAL_COMMAND      (1 << 2)
+#define R1_COM_CRC_ERROR        (1 << 3)
+#define R1_ERASE_SEQUENCE_ERROR (1 << 4)
+#define R1_ADDRESS_ERROR        (1 << 5)
+#define R1_PARAMETER_ERROR      (1 << 6)
+
+// Types
+#define SDCARD_FAIL 0 //!< v1.x Standard Capacity
+#define SDCARD_V1   1 //!< v2.x Standard Capacity
+#define SDCARD_V2   2 //!< v2.x High Capacity
+#define SDCARD_V2HC 3 //!< Not recognised as an SD Card
+
+int sdfs_initialise_card(sdfs_t *obj)
+{
+	spi_format(&obj->_spi, 8, 0, 0);
+	// Set to 100kHz for initialisation, and clock card with cs = 1
+	spi_frequency(&obj->_spi, obj->_init_sck);
+	gpio_write(&obj->_cs, 1);
+	for (int i = 0; i < 16; i++) {
+		spi_master_write(&obj->_spi, 0xFF);
+	}
+
+	// send CMD0, should return with all zeros except IDLE STATE set (bit 0)
+	if (sdfs__cmd(obj, 0, 0) != R1_IDLE_STATE) {
+		debug("No disk, or could not put SD card in to SPI idle state\n");
+		return SDCARD_FAIL;
+	}
+
+	// send CMD8 to determine whther it is ver 2.x
+	int r = sdfs__cmd8(obj);
+	if (r == R1_IDLE_STATE) {
+		return sdfs_initialise_card_v2(obj);
+	}
+	else if (r == (R1_IDLE_STATE | R1_ILLEGAL_COMMAND)) {
+		return sdfs_initialise_card_v1(obj);
+	}
+	else {
+		debug("Not in idle state after sending CMD8 (not an SD card?)\n");
+		return SDCARD_FAIL;
+	}
+}
+
+static int sdfs_initialise_card_v1(sdfs_t *obj)
+{
+	for (int i = 0; i < SD_COMMAND_TIMEOUT; i++) {
+		sdfs__cmd(obj, 55, 0);
+		if (sdfs__cmd(obj, 41, 0) == 0) {
+			obj->cdv = 512;
+			debug_if(SD_DBG, "\n\rInit: SEDCARD_V1\n\r");
+			return SDCARD_V1;
+		}
+	}
+
+	debug("Timeout waiting for v1.x card\n");
+	return SDCARD_FAIL;
+}
+
+static int sdfs_initialise_card_v2(sdfs_t *obj)
+{
+	for (int i = 0; i < SD_COMMAND_TIMEOUT; i++) {
+		wait_ms(50);
+		sdfs__cmd58(obj);
+		sdfs__cmd(obj, 55, 0);
+		if (sdfs__cmd(obj, 41, 0x40000000) == 0) {
+			sdfs__cmd58(obj);
+			debug_if(SD_DBG, "\n\rInit: SDCARD_V2\n\r");
+			obj->cdv = 1;
+			return SDCARD_V2;
+		}
+	}
+
+	debug("Timeout waiting for v2.x card\n");
+	return SDCARD_FAIL;
+}
+
+int sdfs_initialize(sdfs_t *obj)
+{
+	obj->_is_initialized = sdfs_initialise_card(obj);
+	if (obj->_is_initialized == 0) {
+		debug("Fail to initialize card\n");
+		return 1;
+	}
+	debug_if(SD_DBG, "init card = %d\n", obj->_is_initialized);
+	obj->_sectors = sdfs__sd_sectors(obj);
+
+	// Set block length to 512 (CMD16)
+	if (sdfs__cmd(obj, 16, 512) != 0) {
+		debug("Set 512-byte block timed out\n");
+		return 1;
+	}
+
+	// Set SCK for data transfer
+	spi_frequency(&obj->_spi, obj->_transfer_sck);
+	return 0;
+}
+
+int sdfs_write(sdfs_t *obj, const uint8_t *buffer, uint32_t block_number, uint32_t count)
+{
+	if (!obj->_is_initialized) {
+		return -1;
+	}
+
+	for (uint32_t b = block_number; b < block_number + count; b++) {
+		// set write address for single block (CMD24)
+		if (sdfs__cmd(obj, 24, b * obj->cdv) != 0) {
+			return 1;
+		}
+
+		// send the data block
+		sdfs__write(obj, buffer, 512);
+		buffer += 512;
+	}
+
+	return 0;
+}
+
+int sdfs_read(sdfs_t *obj, uint8_t *buffer, uint32_t block_number, uint32_t count)
+{
+	if (!obj->_is_initialized) {
+		return -1;
+	}
+
+	for (uint32_t b = block_number; b < block_number + count; b++) {
+		// set read address for single block (CMD17)
+		if (sdfs__cmd(obj, 17, b * obj->cdv) != 0) {
+			return 1;
+		}
+
+		// receive the data
+		sdfs__read(obj, buffer, 512);
+		buffer += 512;
+	}
+
+	return 0;
+}
+
+int sdfs_status(sdfs_t *obj)
+{
+	// FATFileSystem::disk_status() returns 0 when initialized
+	if (obj->_is_initialized) {
+		return 0;
+	}
+	else {
+		return 1;
+	}
+}
+int sdfs_sync(sdfs_t *obj) { return 0; }
+uint64_t sdfs_sectors(sdfs_t *obj) { return obj->_sectors; }
+
+
+// PRIVATE FUNCTIONS
+static int sdfs__cmd(sdfs_t *obj, int cmd, int arg)
+{
+	gpio_write(&obj->_cs, 0);
+
+	// send a command
+	spi_master_write(&obj->_spi, 0x40 | cmd);
+	spi_master_write(&obj->_spi, arg >> 24);
+	spi_master_write(&obj->_spi, arg >> 16);
+	spi_master_write(&obj->_spi, arg >> 8);
+	spi_master_write(&obj->_spi, arg >> 0);
+	spi_master_write(&obj->_spi, 0x95);
+
+	// wait for the repsonse (response[7] == 0)
+	for (int i = 0; i < SD_COMMAND_TIMEOUT; i++) {
+		int response = spi_master_write(&obj->_spi, 0xFF);
+		if (!(response & 0x80)) {
+			gpio_write(&obj->_cs, 1);
+			spi_master_write(&obj->_spi, 0xFF);
+			return response;
+		}
+	}
+	gpio_write(&obj->_cs, 1);
+	spi_master_write(&obj->_spi, 0xFF);
+	return -1; // timeout
+}
+
+int sdfs__cmdx(sdfs_t *obj, int cmd, int arg)
+{
+	gpio_write(&obj->_cs, 0);
+
+	// send a command
+	spi_master_write(&obj->_spi, 0x40 | cmd);
+	spi_master_write(&obj->_spi, arg >> 24);
+	spi_master_write(&obj->_spi, arg >> 16);
+	spi_master_write(&obj->_spi, arg >> 8);
+	spi_master_write(&obj->_spi, arg >> 0);
+	spi_master_write(&obj->_spi, 0x95);
+
+	// wait for the repsonse (response[7] == 0)
+	for (int i = 0; i < SD_COMMAND_TIMEOUT; i++) {
+		int response = spi_master_write(&obj->_spi, 0xFF);
+		if (!(response & 0x80)) {
+			return response;
+		}
+	}
+	gpio_write(&obj->_cs, 1);
+	spi_master_write(&obj->_spi, 0xFF);
+	return -1; // timeout
+}
+
+static int sdfs__cmd58(sdfs_t *obj)
+{
+	gpio_write(&obj->_cs, 0);
+	int arg = 0;
+
+	// send a command
+	spi_master_write(&obj->_spi, 0x40 | 58);
+	spi_master_write(&obj->_spi, arg >> 24);
+	spi_master_write(&obj->_spi, arg >> 16);
+	spi_master_write(&obj->_spi, arg >> 8);
+	spi_master_write(&obj->_spi, arg >> 0);
+	spi_master_write(&obj->_spi, 0x95);
+
+	// wait for the repsonse (response[7] == 0)
+	for (int i = 0; i < SD_COMMAND_TIMEOUT; i++) {
+		int response = spi_master_write(&obj->_spi, 0xFF);
+		if (!(response & 0x80)) {
+			int ocr = spi_master_write(&obj->_spi, 0xFF) << 24;
+			ocr |= spi_master_write(&obj->_spi, 0xFF) << 16;
+			ocr |= spi_master_write(&obj->_spi, 0xFF) << 8;
+			ocr |= spi_master_write(&obj->_spi, 0xFF) << 0;
+			gpio_write(&obj->_cs, 1);
+			spi_master_write(&obj->_spi, 0xFF);
+			return response;
+		}
+	}
+	gpio_write(&obj->_cs, 1);
+	spi_master_write(&obj->_spi, 0xFF);
+	return -1; // timeout
+}
+
+static int sdfs__cmd8(sdfs_t *obj)
+{
+	gpio_write(&obj->_cs, 0);
+
+	// send a command
+	spi_master_write(&obj->_spi, 0x40 | 8); // CMD8
+	spi_master_write(&obj->_spi, 0x00);     // reserved
+	spi_master_write(&obj->_spi, 0x00);     // reserved
+	spi_master_write(&obj->_spi, 0x01);     // 3.3v
+	spi_master_write(&obj->_spi, 0xAA);     // check pattern
+	spi_master_write(&obj->_spi, 0x87);     // crc
+
+	// wait for the repsonse (response[7] == 0)
+	for (int i = 0; i < SD_COMMAND_TIMEOUT * 1000; i++) {
+		char response[5];
+		response[0] = spi_master_write(&obj->_spi, 0xFF);
+		if (!(response[0] & 0x80)) {
+			for (int j = 1; j < 5; j++) {
+				response[i] = spi_master_write(&obj->_spi, 0xFF);
+			}
+			gpio_write(&obj->_cs, 1);
+			spi_master_write(&obj->_spi, 0xFF);
+			return response[0];
+		}
+	}
+	gpio_write(&obj->_cs, 1);
+	spi_master_write(&obj->_spi, 0xFF);
+	return -1; // timeout
+}
+
+static int sdfs__read(sdfs_t *obj, uint8_t *buffer, uint32_t length)
+{
+	gpio_write(&obj->_cs, 0);
+
+	// read until start byte (0xFF)
+	while (spi_master_write(&obj->_spi, 0xFF) != 0xFE);
+
+	// read data
+	for (int i = 0; i < length; i++) {
+		buffer[i] = spi_master_write(&obj->_spi, 0xFF);
+	}
+	spi_master_write(&obj->_spi, 0xFF); // checksum
+	spi_master_write(&obj->_spi, 0xFF);
+
+	gpio_write(&obj->_cs, 1);
+	spi_master_write(&obj->_spi, 0xFF);
+	return 0;
+}
+
+static int sdfs__write(sdfs_t *obj, const uint8_t*buffer, uint32_t length)
+{
+	gpio_write(&obj->_cs, 0);
+
+	// indicate start of block
+	spi_master_write(&obj->_spi, 0xFE);
+
+	// write the data
+	for (int i = 0; i < length; i++) {
+		spi_master_write(&obj->_spi, buffer[i]);
+	}
+
+	// write the checksum
+	spi_master_write(&obj->_spi, 0xFF);
+	spi_master_write(&obj->_spi, 0xFF);
+
+	// check the response token
+	if ((spi_master_write(&obj->_spi, 0xFF) & 0x1F) != 0x05) {
+		gpio_write(&obj->_cs, 1);
+		spi_master_write(&obj->_spi, 0xFF);
+		return 1;
+	}
+
+	// wait for write to finish
+	while (spi_master_write(&obj->_spi, 0xFF) == 0);
+
+	gpio_write(&obj->_cs, 1);
+	spi_master_write(&obj->_spi, 0xFF);
+	return 0;
+}
+
+static uint32_t sdfs_ext_bits(sdfs_t *obj, unsigned char *data, int msb, int lsb)
+{
+	uint32_t bits = 0;
+	uint32_t size = 1 + msb - lsb;
+	for (uint32_t i = 0; i < size; i++) {
+		uint32_t position = lsb + i;
+		uint32_t byte = 15 - (position >> 3);
+		uint32_t bit = position & 0x7;
+		uint32_t value = (data[byte] >> bit) & 1;
+		bits |= value << i;
+	}
+	return bits;
+}
+
+static uint64_t sdfs__sd_sectors(sdfs_t *obj)
+{
+	uint32_t c_size, c_size_mult, read_bl_len;
+	uint32_t block_len, mult, blocknr, capacity;
+	uint32_t hc_c_size;
+	uint64_t blocks;
+
+	// CMD9, Response R2 (R1 byte + 16-byte block read)
+	if (sdfs__cmdx(obj, 9, 0) != 0) {
+		debug("Didn't get a response from the disk\n");
+		return 0;
+	}
+
+	uint8_t csd[16];
+	if (sdfs__read(obj, csd, 16) != 0) {
+		debug("Couldn't read csd response from disk\n");
+		return 0;
+	}
+
+	// csd_structure : csd[127:126]
+	// c_size        : csd[73:62]
+	// c_size_mult   : csd[49:47]
+	// read_bl_len   : csd[83:80] - the *maximum* read block length
+
+	int csd_structure = sdfs_ext_bits(obj, csd, 127, 126);
+
+	switch (csd_structure) {
+	case 0:
+		obj->cdv = 512;
+		c_size = sdfs_ext_bits(obj, csd, 73, 62);
+		c_size_mult = sdfs_ext_bits(obj, csd, 49, 47);
+		read_bl_len = sdfs_ext_bits(obj, csd, 83, 80);
+
+		block_len = 1 << read_bl_len;
+		mult = 1 << (c_size_mult + 2);
+		blocknr = (c_size + 1) * mult;
+		capacity = blocknr * block_len;
+		blocks = capacity / 512;
+		debug_if(SD_DBG, "\n\rSDCard\n\rc_size: %d \n\rcapacity: %ld \n\rsectors: %lld\n\r", c_size, capacity, blocks);
+		break;
+
+	case 1:
+		obj->cdv = 1;
+		hc_c_size = sdfs_ext_bits(obj, csd, 63, 48);
+		blocks = (hc_c_size + 1) * 1024;
+		debug_if(SD_DBG, "\n\rSDHC Card \n\rhc_c_size: %d\n\rcapacity: %lld \n\rsectors: %lld\n\r", hc_c_size, blocks * 512, blocks);
+		break;
+
+	default:
+		debug("CSD struct unsupported\r\n");
+		return 0;
+	};
+	return blocks;
+}
Index: EcnlProtoTool/trunk/mrbgems/gr_peach/src/sdfs.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/gr_peach/src/sdfs.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/gr_peach/src/sdfs.h	(revision 270)
@@ -0,0 +1,81 @@
+/* mbed Microcontroller Library
+	* Copyright (c) 2006-2012 ARM Limited
+	*
+	* Permission is hereby granted, free of charge, to any person obtaining a copy
+	* of this software and associated documentation files (the "Software"), to deal
+	* in the Software without restriction, including without limitation the rights
+	* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+	* copies of the Software, and to permit persons to whom the Software is
+	* furnished to do so, subject to the following conditions:
+	*
+	* The above copyright notice and this permission notice shall be included in
+	* all copies or substantial portions of the Software.
+	*
+	* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+	* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+	* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+	* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+	* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+	* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+	* SOFTWARE.
+	*/
+#ifndef MBED_SDFILESYSTEM_H
+#define MBED_SDFILESYSTEM_H
+
+#include <stdint.h>
+#include <time.h>
+#include "gpio_api.h"
+#include "spi_api.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Access the filesystem on an SD Card using SPI
+	*
+	* @code
+	* #include "mbed.h"
+	* #include "SDFileSystem.h"
+	*
+	* SDFileSystem sd(p5, p6, p7, p12, "sd"); // MOSI, MISO, SCLK, SSEL
+	*  
+	* int main() {
+	*     FILE *fp = fopen("/sd/mbed.txt", "w");
+	*     fprintf(fp, "Hello World!\n");
+	*     fclose(fp);
+	* }
+	* @endcode
+	*/
+typedef struct sdfs_s{
+	const char* name;
+	uint64_t _sectors;
+	spi_t _spi;
+	gpio_t _cs;
+	int cdv;
+    uint32_t _init_sck;
+    uint32_t _transfer_sck;
+	int _is_initialized;
+} sdfs_t;
+
+/** Create the File System for accessing an SD Card using SPI
+	*
+	* @param mosi SPI mosi pin connected to SD Card
+	* @param miso SPI miso pin conencted to SD Card
+	* @param sclk SPI sclk pin connected to SD Card
+	* @param cs   DigitalOut pin used as SD Card chip select
+	* @param name The name used to access the virtual filesystem
+	*/
+sdfs_init(sdfs_t *obj, PinName mosi, PinName miso, PinName sclk, PinName cs, const char* name);
+
+int sdfs_initialize(sdfs_t *obj);
+int sdfs_status(sdfs_t *obj);
+int sdfs_read(sdfs_t *obj, uint8_t * buffer, uint32_t sector, uint32_t count);
+int sdfs_write(sdfs_t *obj, const uint8_t * buffer, uint32_t sector, uint32_t count);
+int sdfs_sync(sdfs_t *obj);
+uint64_t sdfs_sectors(sdfs_t *obj);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/mrbgem.rake	(revision 270)
@@ -0,0 +1,7 @@
+MRuby::Gem::Specification.new('mruby-arduino') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'Wakayama.rb Ruby Board developers'
+  spec.summary = 'Wakayama.rb Ruby Board V2 library'
+
+  spec.cc.include_paths << "#{spec.dir}/src"
+end
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/arduino.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/arduino.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/arduino.c	(revision 270)
@@ -0,0 +1,55 @@
+#include <arduino.h>
+#include <string.h>
+
+#include <mruby.h>
+#include <mruby/irep.h>
+#include <mruby/string.h>
+#include <mruby/variable.h>
+#include <mruby/error.h>
+#include <mruby/array.h>
+
+#include "../llbruby.h"
+#include "sKernel.h"
+#include "sSys.h"
+#include "sSerial.h"
+#include "sMem.h"
+#include "sI2c.h"
+#include "sServo.h"
+#include "sSdCard.h"
+#include "sRtc.h"
+
+//ãã¼ã¸ã§ã³ã®ã»ãã
+volatile char	ProgVer[] = {WRBB_VERSION};
+
+char RubyFilename[64];
+
+void mrb_mruby_arduino_gem_init(mrb_state *mrb)
+{
+	kernel_Init(mrb);	/* ã«ã¼ãã«é¢é£ã¡ã½ããã®è¨­å® */
+	sys_Init(mrb);		/* ã·ã¹ãã é¢é£ã¡ã½ããã®è¨­å® */
+	serial_Init(mrb);	/* ã·ãªã¢ã«éä¿¡é¢é£ã¡ã½ããã®è¨­å® */
+	mem_Init(mrb);		/* ãã¡ã¤ã«é¢é£ã¡ã½ããã®è¨­å® */
+	i2c_Init(mrb);		/* I2Cé¢é£ã¡ã½ããã®è¨­å® */
+	servo_Init(mrb);	/* ãµã¼ãé¢é£ã¡ã½ããã®è¨­å® */
+
+#if REALTIMECLOCK
+	rtc_Init(mrb);		/* RTCé¢é£ã¡ã½ããã®è¨­å® */
+#endif
+
+#if FIRMWARE == JAM
+	pancake_Init(mrb);		/* PanCakeé¢é£ã¡ã½ããã®è¨­å® */
+#endif
+
+#if BOARD == BOARD_GR || FIRMWARE == SDBT || FIRMWARE == SDWF
+	sdcard_Init(mrb);		/* SDã«ã¼ãé¢é£ã¡ã½ããã®è¨­å® */
+#endif
+
+#if FIRMWARE == SDWF
+	esp8266_Init(mrb);		/* WiFié¢é£ã¡ã½ããã®è¨­å® */
+#endif
+}
+
+void mrb_mruby_arduino_gem_final(mrb_state *mrb)
+{
+
+}
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sI2c.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sI2c.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sI2c.c	(revision 270)
@@ -0,0 +1,260 @@
+/*
+ * I2Céä¿¡é¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+#include <arduino.h>
+/*#include <wire.h>*/
+
+#include <mruby.h>
+#include <mruby/data.h>
+#include <mruby/class.h>
+
+#include "../llbruby.h"
+#include "sKernel.h"
+
+#define WIRE_MAX	6
+
+i2c_t *RbWire[WIRE_MAX];		/*0:Wire1, 1:Wire3, 2:Wire2, 3:Wire6 4:Wire7*/
+
+/******************************************************/
+/* ã¡ã¢ãªã®éæ¾æã«èµ°ã*/
+/******************************************************/
+static void i2c_free(mrb_state *mrb, void *ptr)
+{
+	i2c_t* i2c = (i2c_t*)(ptr);
+	mrb_free(mrb, i2c);
+}
+
+/******************************************************/
+/* ãã®æ§é ä½ã®æå³ã¯ããããã£ã¦ããªã*/
+/******************************************************/
+static struct mrb_data_type i2c_type = {"I2c", i2c_free};
+
+/******************************************************/
+/* I2Cãåæåãã¾ã: I2c.new*/
+/*  I2c.new(num)ã*/
+/*  num: éä¿¡çªå·(0:SDA-0/SCL-1, 1:SDA-5/SCL-6, 2:SDA-7/SCL-8, 3:SDA-12/SCL-11, 4:SDA-9(26)/SCL-3)*/
+/**/
+/* æ»ãå¤*/
+/*  I2cã®ã¤ã³ã¹ã¿ã³ã¹*/
+/******************************************************/
+static mrb_value mrb_i2c_initialize(mrb_state *mrb, mrb_value self)
+{
+/* Initialize data type first, otherwise segmentation fault occurs.*/
+	DATA_TYPE(self) = &i2c_type;
+	DATA_PTR(self) = NULL;
+
+	mrb_int num;
+
+	mrb_get_args(mrb, "i", &num);
+
+	if (num <= 0 && num >= WIRE_MAX) {
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+	}
+
+	i2c_t* i2c = mrb_malloc(mrb, sizeof(i2c_t));
+	i2c_init(i2c, num, num);
+
+	DATA_PTR(self) = i2c;
+	return self;
+}
+
+/******************************************************/
+/* ã¢ãã¬ã¹ã«ãã¼ã¿ãæ¸ãè¾¼ã¿ã¾ã: I2c.write*/
+/*  I2c.write( deviceID, address, data )*/
+/*	deviceID: ããã¤ã¹ID*/
+/*  address: æ¸ãè¾¼ã¿ã¢ãã¬ã¹*/
+/*  data: ãã¼ã¿*/
+/**/
+/*  æ»ãå¤ã¯ä»¥ä¸ã®ã¨ãã*/
+/*		0: æå*/
+/*		4: ãã®ä»ã®ã¨ã©ã¼*/
+/******************************************************/
+mrb_value mrb_i2c_write(mrb_state *mrb, mrb_value self)
+{
+	int deviceID, addr, dat;
+
+	mrb_get_args(mrb, "iii", &deviceID, &addr, &dat);
+
+	i2c_t* i2c = (i2c_t *)(mrb_get_datatype(mrb, self, &i2c_type));
+
+	return mrb_fixnum_value(i2c_write(i2c, addr, (char *)&dat, sizeof(dat), 1));
+}
+
+/******************************************************/
+/* ã¢ãã¬ã¹ãããã¼ã¿ãèª­ã¿è¾¼ã¿: I2c.read*/
+/*  I2c.read( deviceID, addressL[, addressH] )*/
+/*	deviceID: ããã¤ã¹ID*/
+/*  addressL: èª­ã¿è¾¼ã¿ä¸ä½ã¢ãã¬ã¹*/
+/*  addressH: èª­ã¿è¾¼ã¿ä¸ä½ã¢ãã¬ã¹*/
+/**/
+/*  æ»ãå¤ã¯èª­ã¿è¾¼ãã å¤*/
+/******************************************************/
+mrb_value mrb_i2c_read(mrb_state *mrb, mrb_value self)
+{
+	int deviceID, addrL;
+	int addrH = 0;
+	int dat = 0;
+	/*byte datH;*/
+
+	int n = mrb_get_args(mrb, "ii|i", &deviceID, &addrL, &addrH);
+
+	i2c_t* i2c = (i2c_t *)(mrb_get_datatype(mrb, self, &i2c_type));
+
+	i2c_read(i2c, addrL | (addrH << 8), (char *)&dat, sizeof(dat), 1);
+
+	return mrb_fixnum_value(dat);
+}
+
+/******************************************************/
+/* I2Cããã¤ã¹ã«å¯¾ãã¦éä¿¡ãéå§ããããã®æºåããã: I2c.begin*/
+/*	I2c.begin( deviceID )*/
+/*	ãã®é¢æ°ã¯éä¿¡ãããã¡ãåæåããã ãã§ãå®éã®åä½ã¯è¡ããªããç¹°ãè¿ãå¼ã¶ã¨ãéä¿¡ãããã¡ãå
+é ­ã«æ»ãã*/
+/*	deviceID: ããã¤ã¹ID 0ï½0x7Fã¾ã§ã®ç´ç²ãªã¢ãã¬ã¹*/
+/******************************************************/
+mrb_value mrb_i2c_beginTransmission(mrb_state *mrb, mrb_value self)
+{
+	int deviceID;
+
+	mrb_get_args(mrb, "i", &deviceID);
+
+	i2c_t* i2c = (i2c_t *)(mrb_get_datatype(mrb, self, &i2c_type));
+
+	i2c_start(i2c);
+	i2c_byte_write(i2c, deviceID);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* éä¿¡ãããã¡ã®æ«å°¾ã«æ°å¤ãè¿½å ãã: I2c.lwrite*/
+/*	I2c.lwrite( data )*/
+/*	data: ã»ããããå¤*/
+/**/
+/* æ»ãå¤ã¯ãéä¿¡ãããã¤ãæ°(ãããã¡ã«æºãããã¤ãæ°)ãè¿ãã*/
+/*	éä¿¡ãããã¡(260ãã¤ã)ã«ç©ºãå®¹éãç¡ããã°å¤±æãã¦0ãè¿ã*/
+/******************************************************/
+mrb_value mrb_i2c_lwrite(mrb_state *mrb, mrb_value self)
+{
+	int dat;
+
+	mrb_get_args(mrb, "i", &dat);
+
+	i2c_t* i2c = (i2c_t *)(mrb_get_datatype(mrb, self, &i2c_type));
+
+	return mrb_fixnum_value(i2c_byte_write(i2c, dat));
+}
+
+/******************************************************/
+/* ããã¤ã¹ã«å¯¾ãã¦I2Cã®éä¿¡ã·ã¼ã±ã³ã¹ãçºè¡ãã: I2c.end*/
+/*	I2c.end()*/
+/*	I2Cã®éä¿¡ã¯ãã®é¢æ°ãå®è¡ãã¦åãã¦å®éã«è¡ãããã*/
+/**/
+/* æ»ãå¤ã¯ä»¥ä¸ã®ã¨ãã*/
+/*	0: æå*/
+/*	4: ãã®ä»ã®ã¨ã©ã¼*/
+/******************************************************/
+mrb_value mrb_i2c_endTransmission(mrb_state *mrb, mrb_value self)
+{
+	i2c_t* i2c = (i2c_t *)(mrb_get_datatype(mrb, self, &i2c_type));
+
+	return mrb_fixnum_value(i2c_stop(i2c));
+}
+
+/******************************************************/
+/* ããã¤ã¹ã«å¯¾ãã¦åä¿¡ã·ã¼ã±ã³ã¹ãçºè¡ããã¼ã¿ãèª­ã¿åºã: I2c.request*/
+/*	I2c.request( address, count )*/
+/*  num: éä¿¡çªå·(0:SDA-0/SCL-1, 1:SDA-5/SCL-6, 2:SDA-7/SCL-8, 3:SDA-12/SCL-11, 4:SDA-9(26)/SCL-3)*/
+/*	address: èª­ã¿è¾¼ã¿éå§ã¢ãã¬ã¹*/
+/*	count: èª­ã¿åºãæ°*/
+/**/
+/*  æ»ãå¤ã¯ãå®éã«åä¿¡ãããã¤ãæ°ã*/
+/******************************************************/
+mrb_value mrb_i2c_requestFrom(mrb_state *mrb, mrb_value self)
+{
+	int addr, cnt, ret;
+	char rxdata[16];
+
+	mrb_get_args(mrb, "ii", &addr, &cnt);
+
+	i2c_t* i2c = (i2c_t *)(mrb_get_datatype(mrb, self, &i2c_type));
+
+	ret = i2c_read(i2c, addr, rxdata, cnt, 1);
+
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* ããã¤ã¹ã«å¯¾ãã¦åä¿¡ã·ã¼ã±ã³ã¹ãçºè¡ããã¼ã¿ãèª­ã¿åºã: I2c.lread*/
+/*	I2c.lread()*/
+/**/
+/*  æ»ãå¤ã¯èª­ã¿è¾¼ãã å¤*/
+/******************************************************/
+mrb_value mrb_i2c_lread(mrb_state *mrb, mrb_value self)
+{
+	i2c_t* i2c = (i2c_t *)(mrb_get_datatype(mrb, self, &i2c_type));
+	return mrb_fixnum_value(i2c_byte_read(i2c, 1));
+}
+
+/******************************************************/
+/* ããã¤ã¹ã«å¯¾ãã¦åä¿¡ãããã¡å
+ã«ãããã¼ã¿æ°ãèª¿ã¹ã: I2c.available*/
+/*	I2c.available()*/
+/**/
+/*  æ»ãå¤ã¯ãã¼ã¿æ°*/
+/******************************************************/
+mrb_value mrb_i2c_available(mrb_state *mrb, mrb_value self)
+{
+	i2c_t* i2c = (i2c_t *)(mrb_get_datatype(mrb, self, &i2c_type));
+	return mrb_fixnum_value(1/*i2c_available(i2c)*/);
+}
+#if 0
+/******************************************************/
+/* å¨æ³¢æ°ãå¤æ´ãã: I2c.freq*/
+/*  I2c.freq( Hz )*/
+/*  Hz: ã¯ã­ãã¯ã®å¨æ³¢æ°ãHzåä½ã§æå®ããã*/
+/*      æå¹ãªå¤ã¯1ï½200000ç¨åº¦ãåºæ¬çã«ã½ããã§ãã£ã¦ããã®ã§400kHzã¯åºãªãã*/
+/******************************************************/
+mrb_value mrb_i2c_freq(mrb_state *mrb, mrb_value self)
+{
+	int fq;
+
+	mrb_get_args(mrb, "i", &fq);
+
+	i2c_frequency(i2c, fq);
+
+	return mrb_nil_value();			/* æ»ãå¤ã¯ç¡ãã§ããã */
+}
+#endif
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+void i2c_Init(mrb_state *mrb)
+{
+	/*0:Wire1, 1:Wire3, 2:Wire2, 3:Wire6 4:Wire7*/
+	RbWire[0] = NULL;
+	RbWire[1] = &Wire1;
+	RbWire[2] = &Wire2;
+	RbWire[3] = &Wire3;
+	RbWire[4] = &Wire4;
+	RbWire[5] = &Wire5;
+
+	struct RClass *i2cModule = mrb_define_class(mrb, "I2c", mrb->object_class);
+	MRB_SET_INSTANCE_TT(i2cModule, MRB_TT_DATA);
+
+	mrb_define_method(mrb, i2cModule, "initialize", mrb_i2c_initialize, MRB_ARGS_REQ(1));
+	mrb_define_method(mrb, i2cModule, "write", mrb_i2c_write, MRB_ARGS_REQ(3));
+	mrb_define_method(mrb, i2cModule, "read", mrb_i2c_read, MRB_ARGS_REQ(2) | MRB_ARGS_OPT(1));
+	mrb_define_method(mrb, i2cModule, "begin", mrb_i2c_beginTransmission, MRB_ARGS_REQ(1));
+	mrb_define_method(mrb, i2cModule, "lwrite", mrb_i2c_lwrite, MRB_ARGS_REQ(1));
+	mrb_define_method(mrb, i2cModule, "end", mrb_i2c_endTransmission, MRB_ARGS_NONE());
+	mrb_define_method(mrb, i2cModule, "request", mrb_i2c_requestFrom, MRB_ARGS_REQ(2));
+	mrb_define_method(mrb, i2cModule, "lread", mrb_i2c_lread, MRB_ARGS_NONE());
+	mrb_define_method(mrb, i2cModule, "available", mrb_i2c_available, MRB_ARGS_NONE());
+}
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sI2c.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sI2c.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sI2c.h	(revision 270)
@@ -0,0 +1,13 @@
+/*
+ * I2Céä¿¡é¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+void i2c_Init(mrb_state *mrb);
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sKernel.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sKernel.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sKernel.c	(revision 270)
@@ -0,0 +1,452 @@
+/*
+ * ã«ã¼ãã«é¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+#include <arduino.h>
+/*#include <util.h>*/
+
+#include <mruby.h>
+
+#include "../llbruby.h"
+
+
+/******************************************************/
+/* ãã¸ã¿ã«ã©ã¤ã*/
+/*  digitalWrite(pin, value) */
+/*	pin*/
+/*		ãã³ã®çªå·*/
+/*	value*/
+/*		0: LOW*/
+/*		1: HIGH*/
+/******************************************************/
+mrb_value mrb_kernel_digitalWrite(mrb_state *mrb, mrb_value self)
+{
+	int pinno, value;
+	struct pin_node *pin;
+
+	mrb_get_args(mrb, "ii", &pinno, &value);
+
+	pin = get_pin(pintype_gpio, pinno);
+	if (pin == NULL)
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+
+	gpio_write(&pin->gpio, value);
+
+	return mrb_nil_value();	/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* PINã®ã¢ã¼ãè¨­å®*/
+/*  pinMode(pin, mode) */
+/*  pin*/
+/*		ãã³ã®çªå·*/
+/*	mode*/
+/*		0: INPUTã¢ã¼ã*/
+/*		1: OUTPUTã¢ã¼ã*/
+/******************************************************/
+mrb_value mrb_kernel_pinMode(mrb_state *mrb, mrb_value self)
+{
+	int pinno, value;
+	struct pin_node *pin;
+
+	mrb_get_args(mrb, "ii", &pinno, &value);
+
+	pin = get_pin(pintype_gpio, pinno);
+	if (pin == NULL)
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+
+	gpio_dir(&pin->gpio, value);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ãã£ã¬ã¤ å¼·å¶GCãè¡ã£ã¦ãã¾ã*/
+/*  delay(value) */
+/*	value*/
+/*		æé(ms)*/
+/******************************************************/
+mrb_value mrb_kernel_delay(mrb_state *mrb, mrb_value self)
+{
+	int value;
+
+	mrb_get_args(mrb, "i", &value);
+
+	/*è©¦ãã«å¼·å¶gcãå
+¥ãã¦è¦ã*/
+	mrb_full_gc(mrb);
+
+	if (value > 0) {
+		wait_ms(value);
+	}
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+
+/******************************************************/
+/* ããªç§ãåå¾ãã¾ã: millis*/
+/*	millis()*/
+/* æ»ãå¤*/
+/*	èµ·åãã¦ããã®ããªç§æ°*/
+/******************************************************/
+mrb_value mrb_kernel_millis(mrb_state *mrb, mrb_value self)
+{
+	return mrb_fixnum_value((mrb_int)(us_ticker_read() / 1000));
+}
+
+/******************************************************/
+/* ãã¤ã¯ã­ç§ãåå¾ãã¾ã: micros*/
+/*	micros()*/
+/* æ»ãå¤*/
+/*	èµ·åãã¦ããã®ãã¤ã¯ã­ç§æ°*/
+/******************************************************/
+mrb_value mrb_kernel_micros(mrb_state *mrb, mrb_value self)
+{
+	return mrb_fixnum_value((mrb_int)us_ticker_read());
+}
+
+/******************************************************/
+/* ãã¸ã¿ã«ãªã¼ã: digitalRead*/
+/*  digitalRead(pin) */
+/*	pin: ãã³ã®çªå·*/
+/*	*/
+/*		0:LOW*/
+/*		1:HIGH*/
+/******************************************************/
+mrb_value mrb_kernel_digitalRead(mrb_state *mrb, mrb_value self)
+{
+	int pinno, value;
+	struct pin_node *pin;
+
+	mrb_get_args(mrb, "i", &pinno);
+
+	pin = get_pin(pintype_gpio, pinno);
+	if (pin == NULL)
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+
+	value = gpio_read(&pin->gpio);
+
+	return mrb_fixnum_value(value);
+}
+
+
+/******************************************************/
+/* ã¢ãã­ã°ãªãã¡ã¬ã³ã¹: analogReference*/
+/*	analogReference(mode)*/
+/*  ã¢ãã­ã°å
+¥åã§ä½¿ãããåºæºé»å§ãè¨­å®ãã¾ã*/
+/*	mode: 0:DEFAULTï¼5.0V Arduinoäºæ, 1:INTERNALï¼1.1V å
+èµé»å§, 2:EXTERNALï¼AVREFãã³ä¾çµ¦é»å§, 3:RAW12BITï¼3.3V 12ãããA/Då¤æãè¡ã*/
+/******************************************************/
+mrb_value mrb_kernel_analogReference(mrb_state *mrb, mrb_value self)
+{
+	int mode;
+
+	mrb_get_args(mrb, "i", &mode);
+
+	switch (mode) {
+	case DEFAULT:
+		analogReference(DEFAULT);
+		break;
+	case INTERNAL:
+		analogReference(INTERNAL);
+		break;
+	case EXTERNAL:
+		analogReference(EXTERNAL);
+		break;
+	case RAW12BIT:
+		analogReference(RAW12BIT);
+		break;
+	}
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ã¢ãã­ã°ãªã¼ã: analogRead*/
+/*  analogRead(pin) */
+/*	pin: ã¢ãã­ã°ã®çªå·*/
+/*	*/
+/*		10ãããã®å¤(0ï½1023)*/
+/******************************************************/
+mrb_value mrb_kernel_analogRead(mrb_state *mrb, mrb_value self)
+{
+	int anapin, value;
+	struct pin_node *pin;
+
+	mrb_get_args(mrb, "i", &anapin);
+
+	pin = get_pin(pintype_analogin, anapin);
+	if (pin == NULL)
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+
+	value = analogin_read_u16(&pin->analogin);
+
+	return mrb_fixnum_value(value);
+}
+
+#if 0
+/****************************************************/
+/* åºåãã³ãä¸¦åæ¥ç¶ããã¦ãããã³ã¨ã·ã§ã¼ããããã©ããèª¿ã¹ã¾ã*/
+/**/
+/* true: è¡çªãã¦ãã*/
+/* false: è¡çªãã¦ããªããçæ¹ãINPUTã§ããã*/
+/****************************************************/
+bool IsWritePinCollision(int pinSub)
+{
+	PinMode modeSub = getPinMode(get_pin(pinSub));
+	if(modeSub == PinModeInput || modeSub== PinModeInputPullUp){
+		return false;
+	}
+	return true;
+}
+#endif
+
+/******************************************************/
+/* PWMåºå: pwm*/
+/*	pwm(pin, value)*/
+/*	pin: ãã³ã®çªå·(0,1,7,8,11,23ãã³ãPWMå¯è½)*/
+/*       ãã ãã23ãã³ã¯5ãã³ã¨24ãã³ç­çµ¡ãã¦ããã®ã§ãä½¿ç¨æã¯5ãã³ã¨24ãã³ãINPUTã«ãã¦ãã*/
+/*  value:	åºåPWMæ¯ç(0ï½255)*/
+/******************************************************/
+mrb_value mrb_kernel_pwm(mrb_state *mrb, mrb_value self)
+{
+	int pinno, value;
+	struct pin_node *pin;
+
+	mrb_get_args(mrb, "ii", &pinno, &value);
+
+	pin = get_pin(pintype_pwmout, pinno);
+	if (pin == NULL)
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+
+	pwmout_pulsewidth_us(&pin->pwmout, value);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+#if 0
+/******************************************************/
+/* PWMå¨æ³¢æ°è¨­å®: pwmHz*/
+/*	pwmHz(value)*/
+/*  value:	å¨æ³¢æ°(12ï½184999)Hz*/
+/******************************************************/
+mrb_value mrb_kernel_pwmHz(mrb_state *mrb, mrb_value self)
+{
+	int pinno, value;
+	struct pin_node *pin;
+
+	mrb_get_args(mrb, "ii", &pinno, &value);
+
+	pin = get_pin(pintype_pwmout, pinno);
+	if (pin == NULL)
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+
+	if (value >= 12 && value < 18500) {
+#if DEVICE_ANALOGOUT
+		pin->period = 1000000 / value;
+		pwmout_period_us(&pin->pwmout, pin->period);
+#endif
+	}
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+#endif
+/******************************************************/
+/* ãã¼ã³åºååæ­¢: noTone*/
+/*	noTone(pin)*/
+/*  pin: ãã³çªå·*/
+/******************************************************/
+mrb_value mrb_kernel_noTone(mrb_state *mrb, mrb_value self)
+{
+	int pin;
+
+	mrb_get_args(mrb, "i", &pin);
+
+	if (pin == 4 || pin >= 20) {
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+	}
+
+	noTone(pin);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ãã¼ã³åºå: tone*/
+/*	tone(pin, frequency[,duration])*/
+/*  pin: ãã³çªå·*/
+/*  frequency: å¨æ³¢æ°(2ï½62500)Hz*/
+/*  duration: åºåãç¶­æããæé[ms]ãçç¥æã0æå®æã¯åºåãç¶ããã*/
+/******************************************************/
+mrb_value mrb_kernel_tone(mrb_state *mrb, mrb_value self)
+{
+	int pin;
+	int freq;
+	unsigned long dura;
+
+	int n = mrb_get_args(mrb, "ii|i", &pin, &freq, &dura);
+
+	if (pin == 4 || pin >= 20) {
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+	}
+
+	dura = n < 3 ? 0 : dura;
+
+	if (freq >= 2 && freq <= 62500) {
+		tone(pin, freq, dura);
+	}
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ã¢ãã­ã°DACãã³åæå: initDac*/
+/*	initDac()*/
+/******************************************************/
+mrb_value mrb_kernel_initDac(mrb_state *mrb, mrb_value self)
+{
+	setPinModeDac(RB_PIN9);
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ã¢ãã­ã°DACåºå: analogDac*/
+/*	analogDac(value)*/
+/*  value:	10bitç²¾åº¦(0ï½4095)*/
+/******************************************************/
+mrb_value mrb_kernel_analogDac(mrb_state *mrb, mrb_value self)
+{
+	int value;
+
+	mrb_get_args(mrb, "i", &value);
+
+#if DEVICE_ANALOGOUT
+	if (value >= 0 && value < 4096) {
+		struct pin_node *pin;
+		pin = get_pin(pintype_dac, RB_PIN9);
+		if (pin == NULL)
+			return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+
+		analogout_write_u16(&pin->dac, (value << 6) | (value >> 4));
+	}
+#endif
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+static void led_on(int led, bool on)
+{
+	struct pin_node *pin;
+
+	pin = get_pin(pintype_dac, led);
+	if (pin == NULL)
+		return;
+
+	gpio_write(&pin->gpio, on);
+}
+
+/******************************************************/
+/* LEDãªã³ãªã: led*/
+/*	led(sw)*/
+/******************************************************/
+mrb_value mrb_kernel_led(mrb_state *mrb, mrb_value self)
+{
+	int value;
+
+	mrb_get_args(mrb, "i", &value);
+
+#if BOARD == BOARD_GR
+	led_on(PIN_LED0, value & 1);
+	led_on(PIN_LED1, (value >> 1) & 1);
+	led_on(PIN_LED2, (value >> 2) & 1);
+	led_on(PIN_LED3, (value >> 3) & 1);
+#else
+	led_on(RB_LED, value & 1);
+#endif
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ä¹±æ°ãå¾ãããã®ç¨®ãä¸ãã¾ã: randomSeed*/
+/*  randomSeed(value)*/
+/*  value: ç¨®ã¨ãªãå¤*/
+/******************************************************/
+mrb_value mrb_kernel_randomSeed(mrb_state *mrb, mrb_value self)
+{
+	unsigned int value;
+
+	mrb_get_args(mrb, "i", &value);
+
+	randomSeed(value);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ä¹±æ°ãåå¾ãã¾ã: random*/
+/*  random([min,] max)*/
+/*  min: ä¹±æ°ã®åãããæå°å¤ãçç¥å¯*/
+/*  max: ä¹±æ°ã®åãããæå¤§å¤*/
+/******************************************************/
+mrb_value mrb_kernel_random(mrb_state *mrb, mrb_value self)
+{
+	long value1, value2;
+
+	int n = mrb_get_args(mrb, "i|i", &value1, &value2);
+
+	if (n == 1) {
+		return mrb_fixnum_value(arduino_random(0, value1));
+	}
+
+	return mrb_fixnum_value(arduino_random(value1, value2));
+}
+
+/******************************************************/
+/* é ãã³ãã³ãã§ã:  El_Psy.Congroo*/
+/*	El_Psy.Congroo()*/
+/******************************************************/
+mrb_value mrb_El_Psy_congroo(mrb_state *mrb, mrb_value self)
+{
+	mrb_raise(mrb, mrb_class_get(mrb, "Sys#exit Called"), "Normal Completion");
+
+	return mrb_nil_value();	/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+void kernel_Init(mrb_state *mrb)
+{
+	mrb_define_method(mrb, mrb->kernel_module, "pinMode", mrb_kernel_pinMode, MRB_ARGS_REQ(2));
+
+	mrb_define_method(mrb, mrb->kernel_module, "digitalWrite", mrb_kernel_digitalWrite, MRB_ARGS_REQ(2));
+	mrb_define_method(mrb, mrb->kernel_module, "pwm", mrb_kernel_pwm, MRB_ARGS_REQ(2));
+	mrb_define_method(mrb, mrb->kernel_module, "digitalRead", mrb_kernel_digitalRead, MRB_ARGS_REQ(1));
+
+	mrb_define_method(mrb, mrb->kernel_module, "analogReference", mrb_kernel_analogReference, MRB_ARGS_REQ(1));
+	mrb_define_method(mrb, mrb->kernel_module, "analogRead", mrb_kernel_analogRead, MRB_ARGS_REQ(1));
+
+	mrb_define_method(mrb, mrb->kernel_module, "tone", mrb_kernel_tone, MRB_ARGS_REQ(2) | MRB_ARGS_OPT(1));
+	mrb_define_method(mrb, mrb->kernel_module, "noTone", mrb_kernel_noTone, MRB_ARGS_REQ(1));
+
+	/*mrb_define_method(mrb, mrb->kernel_module, "pwmHz", mrb_kernel_pwmHz, MRB_ARGS_REQ(1));*/
+	mrb_define_method(mrb, mrb->kernel_module, "initDac", mrb_kernel_initDac, MRB_ARGS_NONE());
+	mrb_define_method(mrb, mrb->kernel_module, "analogDac", mrb_kernel_analogDac, MRB_ARGS_REQ(1));
+
+	mrb_define_method(mrb, mrb->kernel_module, "delay", mrb_kernel_delay, MRB_ARGS_REQ(1));
+	mrb_define_method(mrb, mrb->kernel_module, "millis", mrb_kernel_millis, MRB_ARGS_NONE());
+	mrb_define_method(mrb, mrb->kernel_module, "micros", mrb_kernel_micros, MRB_ARGS_NONE());
+
+	mrb_define_method(mrb, mrb->kernel_module, "led", mrb_kernel_led, MRB_ARGS_REQ(1));
+
+	mrb_define_method(mrb, mrb->kernel_module, "randomSeed", mrb_kernel_randomSeed, MRB_ARGS_REQ(1));
+	mrb_define_method(mrb, mrb->kernel_module, "random", mrb_kernel_random, MRB_ARGS_REQ(1) | MRB_ARGS_OPT(1));
+
+	struct RClass *El_PsyModule = mrb_define_module(mrb, "El_Psy");
+	mrb_define_module_function(mrb, El_PsyModule, "Congroo", mrb_El_Psy_congroo, MRB_ARGS_NONE());
+}
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sKernel.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sKernel.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sKernel.h	(revision 270)
@@ -0,0 +1,18 @@
+/*
+ * ã«ã¼ãã«é¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+#ifndef _SKERNEL_H_
+#define _SKERNEL_H_  1
+
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+void kernel_Init(mrb_state *mrb);
+
+#endif /* _SKERNEL_H_*/
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sMem.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sMem.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sMem.c	(revision 270)
@@ -0,0 +1,288 @@
+/*
+ * ãã¡ã¤ã«é¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+#include <arduino.h>
+/*#include <eepfile.h>*/
+
+#include <mruby.h>
+#include <mruby/string.h>
+
+#include "../llbruby.h"
+
+FILEEEP Fpj0;
+FILEEEP *Fp0 = &Fpj0;			/*ã³ãã³ãç¨*/
+FILEEEP Fpj1;
+FILEEEP *Fp1 = &Fpj1;			/*ã³ãã³ãç¨*/
+
+/******************************************************/
+/* openãããã¡ã¤ã«ãã1ãã¤ãèª­ã¿è¾¼ã¿ã¾ã: MemFile.read*/
+/*	MemFile.read( number )*/
+/*	number: ãã¡ã¤ã«çªå· 0 ã¾ãã¯ 1*/
+/* æ»ãå¤*/
+/*	0x00ï½0xFFãè¿ãããã¡ã¤ã«ã®æå¾ã ã£ãã-1ãè¿ãã*/
+/******************************************************/
+mrb_value mrb_mem_read(mrb_state *mrb, mrb_value self)
+{
+	int	num;
+
+	mrb_get_args(mrb, "i", &num);
+
+	int dat = -1;
+	if (num == 0) {
+		dat = EEP_fread(Fp0);
+	}
+	else if (num == 1) {
+		dat = EEP_fread(Fp1);
+	}
+
+	return mrb_fixnum_value(dat);
+}
+
+/******************************************************/
+/* openãããã¡ã¤ã«ãã¤ããªãã¼ã¿ãæ¸ãè¾¼ã: MemFile.write*/
+/*	MemFile.write( number, buf, len )*/
+/*	number: ãã¡ã¤ã«çªå· 0 ã¾ãã¯ 1*/
+/*	buf: æ¸ãè¾¼ããã¼ã¿*/
+/*	len: æ¸ãè¾¼ããã¼ã¿ãµã¤ãº*/
+/* æ»ãå¤*/
+/*	å®éã«æ¸ãããã¤ãæ°*/
+/******************************************************/
+mrb_value mrb_mem_write(mrb_state *mrb, mrb_value self)
+{
+	int	num, len;
+	mrb_value value;
+	char	*str;
+
+	mrb_get_args(mrb, "iSi", &num, &value, &len);
+
+	str = RSTRING_PTR(value);
+
+	int ret = 0;
+	if (num == 0) {
+		EEP_fwrite(Fp0, str, &len);
+		ret = len;
+	}
+	else if (num == 1) {
+		EEP_fwrite(Fp1, str, &len);
+		ret = len;
+	}
+
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* ãã¡ã¤ã«ããªã¼ãã³ãã¾ã: MemFile.open*/
+/*	MemFile.open( number, filename[, mode] )*/
+/*	number: ãã¡ã¤ã«çªå· 0 ã¾ãã¯ 1*/
+/*	filename: ãã¡ã¤ã«å(8.3å½¢å¼)*/
+/*	mode: 0:Read, 1:Append, 2:New Create*/
+/* æ»ãå¤*/
+/*	æå: çªå·, å¤±æ: -1*/
+/******************************************************/
+mrb_value mrb_mem_open(mrb_state *mrb, mrb_value self)
+{
+	int	num;
+	int mode;
+	mrb_value value;
+	char	*str;
+
+	int n = mrb_get_args(mrb, "iS|i", &num, &value, &mode);
+
+	str = RSTRING_PTR(value);
+
+	if (n < 3) {
+		mode = 0;
+	}
+
+	int ret = -1;
+	if (num == 0) {
+		if (mode == 1) {
+			if (EEP_fopen(Fp0, str, EEP_APPEND) != -1) {
+				ret = num;
+			}
+		}
+		else if (mode == 2) {
+			if (EEP_fopen(Fp0, str, EEP_WRITE) != -1) {
+				ret = num;
+			}
+		}
+		else {
+			if (EEP_fopen(Fp0, str, EEP_READ) != -1) {
+				ret = num;
+			}
+		}
+	}
+	else if (num == 1) {
+		if (mode == 1) {
+			if (EEP_fopen(Fp1, str, EEP_APPEND) != -1) {
+				ret = num;
+			}
+		}
+		else if (mode == 2) {
+			if (EEP_fopen(Fp1, str, EEP_WRITE) != -1) {
+				ret = num;
+			}
+		}
+		else {
+			if (EEP_fopen(Fp1, str, EEP_READ) != -1) {
+				ret = num;
+			}
+		}
+	}
+
+	return mrb_fixnum_value(ret);
+}
+
+
+/******************************************************/
+/* ãã¡ã¤ã«ãã¯ã­ã¼ãºãã¾ã: MemFile.close( number )*/
+/*	MemFile.close( number )*/
+/*	number: ãã¡ã¤ã«çªå· 0 ã¾ãã¯ 1*/
+/******************************************************/
+mrb_value mrb_mem_close(mrb_state *mrb, mrb_value self)
+{
+	int	num;
+
+	mrb_get_args(mrb, "i", &num);
+
+	if (num == 0) {
+		EEP_fclose(Fp0);
+	}
+	else if (num == 1) {
+		EEP_fclose(Fp1);
+	}
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* openãããã¡ã¤ã«ã®èª­ã¿åºãä½ç½®ãç§»åãã: MemFile.seek*/
+/*	MemFile.seek( number, byte )*/
+/*	number: ãã¡ã¤ã«çªå· 0 ã¾ãã¯ 1*/
+/*	byte: seekãããã¤ãæ°(-1)ã§ãã¡ã¤ã«ã®æå¾ã«ç§»åãã*/
+/* æ»ãå¤*/
+/*	æå: 1, å¤±æ: 0*/
+/******************************************************/
+mrb_value mrb_mem_seek(mrb_state *mrb, mrb_value self)
+{
+	int	num;
+	int size;
+	int ret = 0;
+
+	mrb_get_args(mrb, "ii", &num, &size);
+
+	if (num == 0) {
+		if (size == -1) {
+			if (EEP_fseek(Fp0, 0, EEP_SEEKEND)) {
+				ret = 1;
+			}
+		}
+		else {
+			if (EEP_fseek(Fp0, size, EEP_SEEKTOP)) {
+				ret = 1;
+			}
+		}
+	}
+	else if (num == 1) {
+		if (size == -1) {
+			if (EEP_fseek(Fp1, 0, EEP_SEEKEND)) {
+				ret = 1;
+			}
+		}
+		else {
+			if (EEP_fseek(Fp1, size, EEP_SEEKTOP)) {
+				ret = 1;
+			}
+		}
+	}
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* ãã¡ã¤ã«ãã³ãã¼ãã¾ã: MemFile.cp*/
+/*  MemFile.cp( srcFilename, dstFilename[, mode] )*/
+/*  srcFilename: ã³ãã¼å
+ãã¡ã¤ã«å*/
+/*  dstFilename: ã³ãã¼å
+ãã¡ã¤ã«å*/
+/*  mode: 0ä¸æ¸ãããªã, 1:ä¸æ¸ããã*/
+/* æ»ãå¤*/
+/*	æå: 1, å¤±æ: 0*/
+/******************************************************/
+mrb_value mrb_mem_cp(mrb_state *mrb, mrb_value self)
+{
+	mrb_value src, dst;
+	int mode;
+	int ret = 1;
+
+	int n = mrb_get_args(mrb, "SS|i", &src, &dst, &mode);
+
+	/*DEBUG_PRINT("MemFile.copy", n);*/
+
+	if (n < 3) {
+		mode = 0;
+	}
+
+	if (mode == 0) {
+		if (!EEP_fexist(RSTRING_PTR(dst))) {
+			mode = 1;
+		}
+	}
+
+	/*DEBUG_PRINT("mode", mode);*/
+
+	if (mode == 1) {
+		if (EEP_fcopy(RSTRING_PTR(src), RSTRING_PTR(dst)) == -1) {
+			ret = 0;
+		}
+	}
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* ãã¡ã¤ã«ãåé¤ãã¾ã: MemFile.rm*/
+/*  MemFile.rm( Filename )*/
+/*  Filename: åé¤ãããã¡ã¤ã«å*/
+/* æ»ãå¤*/
+/*	æå: 1, å¤±æ: 0*/
+/******************************************************/
+mrb_value mrb_mem_rm(mrb_state *mrb, mrb_value self)
+{
+	mrb_value src;
+	int ret = 1;
+
+	mrb_get_args(mrb, "S", &src);
+
+	if (EEP_fdelete(RSTRING_PTR(src)) == -1) {
+		ret = 0;
+	}
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+void mem_Init(mrb_state *mrb)
+{
+	struct RClass *memdModule = mrb_define_module(mrb, "MemFile");
+
+	mrb_define_module_function(mrb, memdModule, "read", mrb_mem_read, MRB_ARGS_REQ(1));
+
+	mrb_define_module_function(mrb, memdModule, "seek", mrb_mem_seek, MRB_ARGS_REQ(2));
+
+	mrb_define_module_function(mrb, memdModule, "write", mrb_mem_write, MRB_ARGS_REQ(3));
+
+	mrb_define_module_function(mrb, memdModule, "open", mrb_mem_open, MRB_ARGS_REQ(2) | MRB_ARGS_OPT(1));
+
+	mrb_define_module_function(mrb, memdModule, "close", mrb_mem_close, MRB_ARGS_REQ(1));
+
+	mrb_define_module_function(mrb, memdModule, "cp", mrb_mem_cp, MRB_ARGS_REQ(2) | MRB_ARGS_OPT(1));
+
+	mrb_define_module_function(mrb, memdModule, "rm", mrb_mem_rm, MRB_ARGS_REQ(1));
+}
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sMem.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sMem.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sMem.h	(revision 270)
@@ -0,0 +1,13 @@
+/*
+ * ãã¡ã¤ã«é¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+void mem_Init(mrb_state *mrb);
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sPanCake.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sPanCake.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sPanCake.c	(revision 270)
@@ -0,0 +1,687 @@
+/*
+ * PanCakeé¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+#include <arduino.h>
+#include <string.h>
+
+#include <mruby.h>
+#include <mruby/string.h>
+
+#include "../llbruby.h"
+#include "sKernel.h"
+#include "sSerial.h"
+
+#define  PANCAKE_BAURATE	115200
+#define  PANCAKE_WAIT		4
+
+extern serial_t *serial[];
+
+unsigned char PanSend[96];
+int SerialNum = 1;
+
+/******************************************************/
+/* ç»é¢ãæ¶å»: PanCake.clear*/
+/*  PanCake.clear(cn)*/
+/*  cn: è²çªå·*/
+/******************************************************/
+mrb_value mrb_pancake_Clear(mrb_state *mrb, mrb_value self)
+{
+	int	cn;
+
+	mrb_get_args(mrb, "i", &cn);
+
+	PanSend[1] = 0x4;
+	PanSend[2] = 0x0;
+	PanSend[3] = (unsigned char)cn;
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ç»é¢ã«ç·ãå¼ã: PanCake.line*/
+/*  PanCake.line(x1,y1,x2,y2,cn)*/
+/*  (x1,y1)-(x2,y2)ã«ç·ãå¼ãã¾ã*/
+/*  cn: è²çªå·*/
+/******************************************************/
+mrb_value mrb_pancake_Line(mrb_state *mrb, mrb_value self)
+{
+	int	x1;
+	int	y1;
+	int	x2;
+	int	y2;
+	int	cn;
+
+	mrb_get_args(mrb, "iiiii", &x1, &y1, &x2, &y2, &cn);
+
+	PanSend[1] = 0x8;
+	PanSend[2] = 0x1;
+	PanSend[3] = (unsigned char)x1;
+	PanSend[4] = (unsigned char)y1;
+	PanSend[5] = (unsigned char)x2;
+	PanSend[6] = (unsigned char)y2;
+	PanSend[7] = (unsigned char)cn;
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ç»é¢ã«åãæã: PanCake.circle*/
+/*  PanCake.circle(xc, yc, ra, cn)*/
+/*  (xc,yc)ãä¸­å¿ã«åãæã*/
+/*  ra: åå¾*/
+/*  cn: è²çªå·*/
+/******************************************************/
+mrb_value mrb_pancake_Circle(mrb_state *mrb, mrb_value self)
+{
+	int	xc;
+	int	yc;
+	int	ra;
+	int	cn;
+
+	mrb_get_args(mrb, "iiii", &xc, &yc, &ra, &cn);
+
+	PanSend[1] = 0x7;
+	PanSend[2] = 0xE;
+	PanSend[3] = (unsigned char)xc;
+	PanSend[4] = (unsigned char)yc;
+	PanSend[5] = (unsigned char)ra;
+	PanSend[6] = (unsigned char)cn;
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+int hex2int(char s)
+{
+	/* '0' ãã '9' ã®æå­ãªã*/
+	if ('0' <= s && s <= '9') {
+		return(s - '0');
+	}
+	/*'A' ãã 'F' ã®æå­ãªã*/
+	else if ('A' <= s && s <= 'F') {
+		return(s - 'A' + 10);
+	}
+	/*'a' ãã 'f' ã®æå­ãªã*/
+	else if ('a' <= s && s <= 'f') {
+		return(s - 'a' + 10);
+	}
+
+	return 0;
+}
+
+/******************************************************/
+/* ç»é¢ã«8x8ã®çµµãæã: PanCake.stamp*/
+/*  PanCake.stamp(px, py, tc, string)*/
+/*  px,py: çµµã®å·¦ä¸åº§æ¨*/
+/*  tc: éæè²*/
+/*  string: 16é²æ°ã®æå­åã64å*/
+/******************************************************/
+mrb_value mrb_pancake_Stamp(mrb_state *mrb, mrb_value self)
+{
+	int	px;
+	int	py;
+	int	tc;
+	mrb_value text;
+
+	mrb_get_args(mrb, "iiiS", &px, &py, &tc, &text);
+
+	PanSend[1] = 0x26;
+	PanSend[2] = 0x2;
+	PanSend[3] = (unsigned char)px;
+	PanSend[4] = (unsigned char)py;
+	PanSend[5] = (unsigned char)tc;
+
+	char *s = RSTRING_PTR(text);
+
+	for (int i = 0; i < 32; i++) {
+		PanSend[6 + i] = hex2int(s[i * 2]) * 16 + hex2int(s[i * 2 + 1]);
+	}
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ç»é¢ã«8x8ã®1è²ã®çµµãæã: PanCake.stamp1*/
+/*  PanCake.stamp1(px, py, cn, string)*/
+/*  px,py: çµµã®å·¦ä¸åº§æ¨*/
+/*  cn: æãè²*/
+/*  string: 16é²æ°ã®æå­åã16å*/
+/******************************************************/
+mrb_value mrb_pancake_Stamp1(mrb_state *mrb, mrb_value self)
+{
+	int	px;
+	int	py;
+	int	cn;
+	mrb_value text;
+
+	mrb_get_args(mrb, "iiiS", &px, &py, &cn, &text);
+
+	PanSend[1] = 0xE;
+	PanSend[2] = 0x3;
+	PanSend[3] = (unsigned char)px;
+	PanSend[4] = (unsigned char)py;
+	PanSend[5] = (unsigned char)cn;
+
+	char *s = RSTRING_PTR(text);
+
+	for (int i = 0; i < 8; i++) {
+		PanSend[6 + i] = hex2int(s[i * 2]) * 16 + hex2int(s[i * 2 + 1]);
+	}
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ç»é¢ã«çµã¿è¾¼ã¿ç»åãæã: PanCake.image*/
+/*  PanCake.image(num)*/
+/*  num: çµã¿è¾¼ã¿ç»åã®çªå·*/
+/******************************************************/
+mrb_value mrb_pancake_Image(mrb_state *mrb, mrb_value self)
+{
+	int	num;
+
+	mrb_get_args(mrb, "i", &num);
+
+	PanSend[1] = 0x4;
+	PanSend[2] = 0x4;
+	PanSend[3] = (unsigned char)num;
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ãããªåºåã®ON/OFF: PanCake.video*/
+/*  PanCake.video(sw)*/
+/*  sw: ã¹ã¤ããON/OFF[01/00]*/
+/******************************************************/
+mrb_value mrb_pancake_Video(mrb_state *mrb, mrb_value self)
+{
+	int	sw;
+
+	mrb_get_args(mrb, "i", &sw);
+
+	PanSend[1] = 0x4;
+	PanSend[2] = 0x5;
+	PanSend[3] = (unsigned char)sw;
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* 4chåæã«é³ãé³´ãã: PanCake.sound*/
+/*  PanCake.sound(o0, s0, o1, s1, o2, s2, o3, s3)*/
+/*  o0,o1,o2,o3: ãªã¯ã¿ã¼ã(0ï½4ï½7)*/
+/*  s0,s1,s2,s3: é³ç¨(0ï½b) eã¯ãã¤ãºé³*/
+/*               HighBits4ã¯é³è²(0ï½3)*/
+/*               é³ãæ¶ãã®ã¯ FF*/
+/******************************************************/
+mrb_value mrb_pancake_Sound(mrb_state *mrb, mrb_value self)
+{
+	int	o0, o1, o2, o3;
+	int s0, s1, s2, s3;
+
+	mrb_get_args(mrb, "iiiiiiii", &o0, &s0, &o1, &s1, &o2, &s2, &o3, &s3);
+
+	PanSend[1] = 0xB;
+	PanSend[2] = 0x9;
+	PanSend[3] = (unsigned char)o0;
+	PanSend[4] = (unsigned char)s0;
+	PanSend[5] = (unsigned char)o1;
+	PanSend[6] = (unsigned char)s1;
+	PanSend[7] = (unsigned char)o2;
+	PanSend[8] = (unsigned char)s2;
+	PanSend[9] = (unsigned char)o3;
+	PanSend[10] = (unsigned char)s3;
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* 1ché³ãé³´ãã: PanCake.sound1*/
+/*  PanCake.sound1(cn, on, sn)*/
+/*  cn: ãã£ãã«*/
+/*  on: ãªã¯ã¿ã¼ã(0ï½4ï½7)*/
+/*  sn: é³ç¨(0ï½b) eã¯ãã¤ãºé³*/
+/*      HighBits4ã¯é³è²(0ï½3)*/
+/*      é³ãæ¶ãã®ã¯ FF*/
+/******************************************************/
+mrb_value mrb_pancake_Sound1(mrb_state *mrb, mrb_value self)
+{
+	int	cn, on, sn;
+
+	mrb_get_args(mrb, "iii", &cn, &on, &sn);
+
+	PanSend[1] = 0x6;
+	PanSend[2] = 0xA;
+	PanSend[3] = (unsigned char)cn;
+	PanSend[4] = (unsigned char)on;
+	PanSend[5] = (unsigned char)sn;
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* åæç¶æ
+ã«ãã: PanCake.reset*/
+/*  PanCake.reset()*/
+/******************************************************/
+mrb_value mrb_pancake_Reset(mrb_state *mrb, mrb_value self)
+{
+	PanSend[1] = 0x3;
+	PanSend[2] = 0xD;
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* OUTãã¼ãã«åºå: PanCake.out*/
+/*  PanCake.out(pf)*/
+/*  pf: HIGHã«ãããã¼ãçªå·ã16é²æ°ã§æå®*/
+/******************************************************/
+mrb_value mrb_pancake_Out(mrb_state *mrb, mrb_value self)
+{
+	int	pf;
+
+	mrb_get_args(mrb, "i", &pf);
+
+	PanSend[1] = 0x4;
+	PanSend[2] = 0xF;
+	PanSend[3] = (unsigned char)pf;
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ã¹ãã©ã¤ããéå§ãã: Sprite.start*/
+/*  Sprite.start(num)*/
+/*  num: èæ¯ã«ä½¿ãçµã¿è¾¼ã¿ç»åçªå·*/
+/*       èæ¯ããã¿å¡ãã«ããå ´åã¯ num ã®HighBitsã1ã«ãã¾ãã*/
+/*      ã¹ãã©ã¤ãå¦çãåæ­¢ããã«ã¯ num ã FF ã«ãã¾ãã*/
+/******************************************************/
+mrb_value mrb_pancake_Start(mrb_state *mrb, mrb_value self)
+{
+	int	num;
+
+	mrb_get_args(mrb, "i", &num);
+
+	PanSend[1] = 0x4;
+	PanSend[2] = 0x6;
+	PanSend[3] = (unsigned char)num;
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ã¹ãã©ã¤ããä½ã: Sprite.create*/
+/*  Sprite.create(sn, si)*/
+/*  sn: ã¹ãã©ã¤ãçªå· 0ï½15*/
+/*  si: çµã¿è¾¼ã¿ã¹ãã©ã¤ãç»åçªå·*/
+/*      æ¶ãã®ã¯ FF*/
+/******************************************************/
+mrb_value mrb_pancake_Create(mrb_state *mrb, mrb_value self)
+{
+	int sn, si;
+
+	mrb_get_args(mrb, "ii", &sn, &si);
+
+	PanSend[1] = 0x5;
+	PanSend[2] = 0x7;
+	PanSend[3] = (unsigned char)sn;
+	PanSend[4] = (unsigned char)si;
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ã¹ãã©ã¤ãã®ç§»å: Sprite.move*/
+/*  Sprite.move(sn, px,py)*/
+/*  sn: ã¹ãã©ã¤ãçªå· 0ï½15*/
+/*  px,py: ç»é¢åº§æ¨*/
+/******************************************************/
+mrb_value mrb_pancake_Move(mrb_state *mrb, mrb_value self)
+{
+	int sn, px, py;
+
+	mrb_get_args(mrb, "iii", &sn, &px, &py);
+
+	PanSend[1] = 0x6;
+	PanSend[2] = 0x8;
+	PanSend[3] = (unsigned char)sn;
+	PanSend[4] = (unsigned char)px;
+	PanSend[5] = (unsigned char)py;
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* é³æ¥½åçãã: Music.play*/
+/*  Music.play(sw)*/
+/*  sw: START/STOP[01/00]*/
+/******************************************************/
+mrb_value mrb_pancake_Play(mrb_state *mrb, mrb_value self)
+{
+	int sw;
+
+	mrb_get_args(mrb, "i", &sw);
+
+	PanSend[1] = 0x4;
+	PanSend[2] = 0xC;
+	PanSend[3] = (unsigned char)sw;
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* C D E F G A B ã0x0 ï½ 0xBã«ç½®ãæãã¾ã*/
+/* C  D  E  F  G  A  B*/
+/* 0  2  4  5  7  9  B*/
+/******************************************************/
+int score2int(char s)
+{
+	if ('c' == s || s == 'C') {
+		return 0;
+	}
+	else if ('d' == s || s == 'D') {
+		return 2;
+	}
+	else if ('e' == s || s == 'E') {
+		return 4;
+	}
+	else if ('f' == s || s == 'F') {
+		return 5;
+	}
+	else if ('g' == s || s == 'G') {
+		return 7;
+	}
+	else if ('a' == s || s == 'A') {
+		return 9;
+	}
+	else if ('b' == s || s == 'B') {
+		return 11;
+	}
+	return -1;
+}
+
+/******************************************************/
+/* MMLããµã¦ã³ãchã«ç»é²ãã: Music.score*/
+/*  Music.score(ch, pn, tt, string)*/
+/*  ch: ãã£ã³ãã«(00ï½03)*/
+/*  pn: 01:å³åçã00:å¾ã§åç*/
+/*  tt: ãã³ã(0ï½F)+é³è² [ex. 30 == ãã³ã3ãé³è²0]*/
+/*  string: MML 64ãã¤ãã¾ã§*/
+/******************************************************/
+mrb_value mrb_pancake_Score(mrb_state *mrb, mrb_value self)
+{
+	int	ch, pn, tt;
+	mrb_value text;
+
+	mrb_get_args(mrb, "iiiS", &ch, &pn, &tt, &text);
+
+	/*PanSend[1] = 0xE;*/
+	PanSend[2] = 0xB;
+	PanSend[3] = (unsigned char)ch;
+	PanSend[4] = (unsigned char)pn;
+	PanSend[5] = (unsigned char)tt;
+
+	char *s = RSTRING_PTR(text);
+	int len = RSTRING_LEN(text);
+
+	int oct = 0x40;
+	int sc = 0;
+	int j = 0;
+	for (int i = 0; i < len; i++) {
+
+		sc = score2int(s[i]);
+
+		if (s[i] == 'n' || s[i] == 'N') {
+			PanSend[6 + j] = oct + 0x0e;
+			j++;
+		}
+		else if (s[i] == 'r' || s[i] == 'R') {
+			PanSend[6 + j] = oct + 0x0f;
+			j++;
+		}
+		else if (s[i] == '$') {
+			PanSend[6 + j] = 0xfe;
+			j++;
+		}
+		else if (s[i] == '~') {
+			PanSend[6 + j] = 0xfd;
+			j++;
+		}
+		else if (s[i] == '>') {
+			oct += 0x10;
+		}
+		else if (s[i] == '<') {
+			oct -= 0x10;
+		}
+		else if (s[i] == '+') {
+			if (j > 0) {
+				if ((PanSend[6 + j - 1] & 0xf) == 0xb) {
+					PanSend[6 + j - 1] = oct + 1 + 0x0;
+				}
+				else {
+					PanSend[6 + j - 1] ++;
+				}
+			}
+		}
+		else if (s[i] == '-') {
+			if (j > 0) {
+				if ((PanSend[6 + j - 1] & 0xf) == 0x0) {
+					PanSend[6 + j - 1] = oct - 1 + 0xb;
+				}
+				else {
+					PanSend[6 + j - 1] --;
+				}
+			}
+		}
+		else if (sc >= 0 && sc <= 0xb) {
+			PanSend[6 + j] = oct + sc;
+			j++;
+		}
+	}
+	PanSend[6 + j] = 0xff;
+	j++;
+
+	PanSend[1] = 6 + j;
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* PanCakeã§ä½¿ãã·ãªã¢ã«ãã¼ãçªå·ãæå®: PanCake.serial*/
+/*  PanCake.serial(num)*/
+/*  num: ã·ãªã¢ã«ãã¼ãçªå·(1ï½3)*/
+/******************************************************/
+mrb_value mrb_pancake_Serial(mrb_state *mrb, mrb_value self)
+{
+	int	num;
+	PinName txpin, rxpin;
+
+	mrb_get_args(mrb, "i", &num);
+
+	if (num <= 0 || num > 3) {
+		num = 1;
+	}
+
+	SerialNum = num;
+
+	/*ã·ãªã¢ã«éä¿¡ã®åæåããã¾ã*/
+	if (serial[SerialNum] != 0) {
+		serial_free(serial[SerialNum]);
+		wait_ms(50);
+	}
+
+	if(!portToPins(SCI_SCI0P2x, &txpin, &rxpin))
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+
+	serial[SerialNum] = mrb_malloc(mrb, sizeof(serial_t));
+	serial_init(serial[SerialNum], txpin, rxpin);
+	serial_baud(serial[SerialNum], PANCAKE_BAURATE);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ã¹ãã©ã¤ãã®å·¦å³åè»¢: Sprite.flip*/
+/*  Sprite.flip(sn, fs)*/
+/*  sn: ã¹ãã©ã¤ãçªå· 0ï½15*/
+/*  fs: ON/OFF[01/00]*/
+/******************************************************/
+mrb_value mrb_pancake_Flip(mrb_state *mrb, mrb_value self)
+{
+	int sn, fs;
+
+	mrb_get_args(mrb, "ii", &sn, &fs);
+
+	PanSend[1] = 0x5;
+	PanSend[2] = 0x10;
+	PanSend[3] = (unsigned char)sn;
+	PanSend[4] = (unsigned char)fs;
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ã¹ãã©ã¤ãã®åè»¢: Sprite.rotate*/
+/*  Sprite.rotate(sn, ra)*/
+/*  sn: ã¹ãã©ã¤ãçªå· 0ï½15*/
+/*  ra: è§åº¦[0:0Â°,1:-90Â°,2:180Â°,3:90Â°]*/
+/******************************************************/
+mrb_value mrb_pancake_Rotate(mrb_state *mrb, mrb_value self)
+{
+	int sn, ra;
+
+	mrb_get_args(mrb, "ii", &sn, &ra);
+
+	PanSend[1] = 0x5;
+	PanSend[2] = 0x11;
+	PanSend[3] = (unsigned char)sn;
+	PanSend[4] = (unsigned char)ra;
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ã¹ãã©ã¤ãç¨8x8ç»åã®å®ç¾©: Sprite.user*/
+/*  Sprite.user(dn, tc, string)*/
+/*  dn: ã¹ãã©ã¤ãã®å®ç¾©çªå· FD ã FE*/
+/*  tc: éæè²*/
+/*  string: 16é²æ°ã®æå­åã64å(è²ã®çªå·ã§ã)*/
+/******************************************************/
+mrb_value mrb_pancake_User(mrb_state *mrb, mrb_value self)
+{
+	int	sn, tc;
+	mrb_value text;
+
+	mrb_get_args(mrb, "iiS", &sn, &tc, &text);
+
+	PanSend[1] = 0x25;
+	PanSend[2] = 0x12;
+	PanSend[3] = (unsigned char)sn;
+	PanSend[4] = (unsigned char)tc;
+
+	char *s = RSTRING_PTR(text);
+
+	for (int i = 0; i < 32; i++) {
+		PanSend[5 + i] = hex2int(s[i * 2]) * 16 + hex2int(s[i * 2 + 1]);
+	}
+
+	wait_ms(PANCAKE_WAIT);
+	serial_write(serial[SerialNum], (const unsigned char *)PanSend, PanSend[1]);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+void pancake_Init(mrb_state *mrb)
+{
+	PanSend[0] = 0x80;
+
+	struct RClass *pancakeModule = mrb_define_module(mrb, "PanCake");
+	mrb_define_module_function(mrb, pancakeModule, "serial", mrb_pancake_Serial, MRB_ARGS_REQ(1));
+	mrb_define_module_function(mrb, pancakeModule, "clear", mrb_pancake_Clear, MRB_ARGS_REQ(1));
+	mrb_define_module_function(mrb, pancakeModule, "line", mrb_pancake_Line, MRB_ARGS_REQ(5));
+	mrb_define_module_function(mrb, pancakeModule, "circle", mrb_pancake_Circle, MRB_ARGS_REQ(4));
+	mrb_define_module_function(mrb, pancakeModule, "stamp", mrb_pancake_Stamp, MRB_ARGS_REQ(4));
+	mrb_define_module_function(mrb, pancakeModule, "stamp1", mrb_pancake_Stamp1, MRB_ARGS_REQ(4));
+	mrb_define_module_function(mrb, pancakeModule, "image", mrb_pancake_Image, MRB_ARGS_REQ(1));
+	mrb_define_module_function(mrb, pancakeModule, "video", mrb_pancake_Video, MRB_ARGS_REQ(1));
+	mrb_define_module_function(mrb, pancakeModule, "sound", mrb_pancake_Sound, MRB_ARGS_REQ(8));
+	mrb_define_module_function(mrb, pancakeModule, "sound1", mrb_pancake_Sound1, MRB_ARGS_REQ(3));
+	mrb_define_module_function(mrb, pancakeModule, "reset", mrb_pancake_Reset, MRB_ARGS_NONE());
+	mrb_define_module_function(mrb, pancakeModule, "out", mrb_pancake_Out, MRB_ARGS_REQ(1));
+
+	struct RClass *spriteModule = mrb_define_module(mrb, "Sprite");
+	mrb_define_module_function(mrb, spriteModule, "start", mrb_pancake_Start, MRB_ARGS_REQ(1));
+	mrb_define_module_function(mrb, spriteModule, "create", mrb_pancake_Create, MRB_ARGS_REQ(2));
+	mrb_define_module_function(mrb, spriteModule, "move", mrb_pancake_Move, MRB_ARGS_REQ(3));
+	mrb_define_module_function(mrb, spriteModule, "flip", mrb_pancake_Flip, MRB_ARGS_REQ(2));
+	mrb_define_module_function(mrb, spriteModule, "rotate", mrb_pancake_Rotate, MRB_ARGS_REQ(2));
+	mrb_define_module_function(mrb, spriteModule, "user", mrb_pancake_User, MRB_ARGS_REQ(3));
+
+	struct RClass *musicModule = mrb_define_module(mrb, "Music");
+	mrb_define_module_function(mrb, musicModule, "score", mrb_pancake_Score, MRB_ARGS_REQ(4));
+	mrb_define_module_function(mrb, musicModule, "play", mrb_pancake_Play, MRB_ARGS_REQ(1));
+}
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sPanCake.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sPanCake.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sPanCake.h	(revision 270)
@@ -0,0 +1,13 @@
+/*
+ * PanCakeé¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+void pancake_Init(mrb_state *mrb);
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sRtc.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sRtc.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sRtc.c	(revision 270)
@@ -0,0 +1,149 @@
+/*
+ * RTCé¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+#include <arduino.h>
+/*#include <RTC.h>*/
+
+#include <mruby.h>
+#include <mruby/array.h>
+#include <mruby/hash.h>
+
+#include "../llbruby.h"
+#include "sKernel.h"
+
+/******************************************************/
+/* RTCã®æè¨ãåå¾ãã¾ã: Rtc.getTime*/
+/*  Rtc.getTime()*/
+/**/
+/*  æ»ãå¤ã¯ä»¥ä¸ã®å¤ãé
+åã§è¿ãã¾ã*/
+/*  year: å¹´(2000-2099)*/
+/*  mon: æ(1-12)*/
+/*  day: æ¥(1-31)*/
+/*  hour: æ(0-23)*/
+/*  min: å(0-59)*/
+/*  second: ç§(0-59)*/
+/*  weekday: ææ¥(0-6)0:æ¥,1:æ,2:ç«,3:æ°´,4:æ¨,5:é,6:å*/
+/******************************************************/
+mrb_value mrb_rtc_getTime(mrb_state *mrb, mrb_value self)
+{
+	mrb_value arv[6];
+	time_t rtc = rtc_read();
+	struct tm *time = localtime(&rtc);
+
+	arv[0] = mrb_fixnum_value(time->tm_year + 1900);
+	arv[1] = mrb_fixnum_value(time->tm_mon + 1);
+	arv[2] = mrb_fixnum_value(time->tm_mday);
+	arv[3] = mrb_fixnum_value(time->tm_hour);
+	arv[4] = mrb_fixnum_value(time->tm_min);
+	arv[5] = mrb_fixnum_value(time->tm_sec);
+
+	return mrb_ary_new_from_values(mrb, 6, arv);
+}
+
+/******************************************************/
+/* RTCã®æè¨ãã»ãããã¾ã: Rtc.setTime*/
+/*  Rtc.setTime( array )*/
+/*  array: å¹´(0000-9999),æ(1-12),æ¥(1-31),æ(0-23),å(0-59),ç§(0-59)ã®é
+å*/
+/**/
+/*  æ»ãå¤ã¯ä»¥ä¸ã®ã¨ãã*/
+/*		0: å¤±æ*/
+/*		1: æå*/
+/******************************************************/
+mrb_value mrb_rtc_setTime(mrb_state *mrb, mrb_value self)
+{
+	struct tm time;
+	int ret = 0;
+
+	mrb_get_args(mrb, "iiiiii", &time.tm_year, &time.tm_mon, &time.tm_mday, &time.tm_hour, &time.tm_min, &time.tm_sec);
+
+	time.tm_year -= 1900;
+	time.tm_mon -= 1;
+
+	rtc_write(mktime(&time));
+	ret = 1;
+
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* RTCãåæ­¢ãã¾ã: Rtc.deinit*/
+/*  Rtc.deinit()*/
+/**/
+/* æ»ãå¤ã¯ä»¥ä¸ã®ã¨ãã*/
+/*	0: å¤±æ*/
+/*	1: æå*/
+/******************************************************/
+mrb_value mrb_rtc_deinit(mrb_state *mrb, mrb_value self)
+{
+	rtc_free();
+	return mrb_fixnum_value(1);
+}
+
+/******************************************************/
+/* RTCãèµ·åãã¾ã: Rtc.init*/
+/*  Rtc.init()*/
+/**/
+/* æ»ãå¤ã¯ä»¥ä¸ã®ã¨ãã*/
+/*	0: èµ·åå¤±æ*/
+/*	1: èµ·åæå*/
+/*	2: RTCã¯æ¢ã«èµ·åãã¦ãã(æå)*/
+/******************************************************/
+mrb_value mrb_rtc_init(mrb_state *mrb, mrb_value self)
+{
+	if (rtc_isenabled())
+		return mrb_fixnum_value(2);
+
+	rtc_init();
+
+	return mrb_fixnum_value(rtc_isenabled());
+}
+
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+void rtc_Init(mrb_state *mrb)
+{
+	struct RClass *rtcModule = mrb_define_module(mrb, "Rtc");
+
+	mrb_define_module_function(mrb, rtcModule, "init", mrb_rtc_init, MRB_ARGS_NONE());
+	mrb_define_module_function(mrb, rtcModule, "begin", mrb_rtc_init, MRB_ARGS_NONE());
+	mrb_define_module_function(mrb, rtcModule, "deinit", mrb_rtc_deinit, MRB_ARGS_NONE());
+	mrb_define_module_function(mrb, rtcModule, "setTime", mrb_rtc_setTime, MRB_ARGS_REQ(6));
+	mrb_define_module_function(mrb, rtcModule, "getTime", mrb_rtc_getTime, MRB_ARGS_NONE());
+
+}
+
+/*rtc_attach_alarm_handler*/
+/*æ¦è¦ 	ã¢ã©ã¼ã çºçæã«å¦çããé¢æ°ãç»é²ãã¾ãã*/
+/*ææ³ 	rtc_attach_alarm_handler(void(*)(void) function)*/
+/*ãã©ã¡ã¼ã¿ 	function: å¦çããé¢æ°*/
+/*æ»ãå¤ 	ãªã*/
+/**/
+/*rtc_set_alarm_time*/
+/*æ¦è¦ 	ã¢ã©ã¼ã æéãè¨­å®ãã¾ãã*/
+/*ææ³ 	int rtc_set_alarm_time (int hour, int min, int week_flag)*/
+/*ãã©ã¡ã¼ã¿ 	hour: æ*/
+/*min: å*/
+/*week_flag: ææ¥ï¼è¤æ°æå®ã®å ´åã¯è«çåã§æå®ï¼*/
+/*æ»ãå¤ 	0:å¤±æã1:æå*/
+/**/
+/*rtc_alarm_on*/
+/*æ¦è¦ 	ã¢ã©ã¼ã ãONã«ãã¾ãã*/
+/*ææ³ 	rtc_alarm_on()*/
+/*ãã©ã¡ã¼ã¿ 	ãªã*/
+/*æ»ãå¤ 	ãªã*/
+/**/
+/*rtc_alarm_off*/
+/*æ¦è¦ 	ã¢ã©ã¼ã ãOFFã«ãã¾ãã*/
+/*ææ³ 	rtc_alarm_off()*/
+/*ãã©ã¡ã¼ã¿ 	ãªã*/
+/*æ»ãå¤ 	ãªã*/
+/**/
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sRtc.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sRtc.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sRtc.h	(revision 270)
@@ -0,0 +1,13 @@
+/*
+ * RTCé¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+void rtc_Init(mrb_state *mrb);
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sSdCard.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sSdCard.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sSdCard.c	(revision 270)
@@ -0,0 +1,434 @@
+/*
+ * SDã«ã¼ãé¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+#include <arduino.h>
+/*#include <SD.h>*/
+/*#include <RTC.h>*/
+
+#include "mruby.h"
+#include "mruby/string.h"
+
+#include "../llbruby.h"
+#include "sSdCard.h"
+
+File Fp[2];
+
+/******************************************************/
+/*ãã¡ã¤ã«ãå­å¨ãããã©ããèª¿ã¹ã: SD_exists*/
+/*	SD_exists( filename )*/
+/*  filename: èª¿ã¹ããã¡ã¤ã«å*/
+/**/
+/* æ»ãå¤*/
+/*	å­å¨ãã: 1, å­å¨ããªã: 0*/
+/******************************************************/
+mrb_value mrb_sdcard_exists(mrb_state *mrb, mrb_value self)
+{
+	mrb_value value;
+	char	*str;
+	int ret = 0;
+
+	mrb_get_args(mrb, "S", &value);
+
+	str = RSTRING_PTR(value);
+
+	if (SD_exists(str) == true) {
+		ret = 1;
+	}
+
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* ãã£ã¬ã¯ããªãä½æãã: SD_mkdir*/
+/*	SD_mkdir( dirname )*/
+/*  dirname: ä½æãããã£ã¬ã¯ããªå*/
+/**/
+/* æ»ãå¤*/
+/*	æå: 1, å¤±æ: 0*/
+/******************************************************/
+mrb_value mrb_sdcard_mkdir(mrb_state *mrb, mrb_value self)
+{
+	mrb_value value;
+	char	*str;
+	int ret = 0;
+
+	mrb_get_args(mrb, "S", &value);
+
+	str = RSTRING_PTR(value);
+
+	if (SD_mkdir(str) == true) {
+		ret = 1;
+	}
+
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* ãã¡ã¤ã«ãåé¤ãã: SD_remove*/
+/*	SD_remove( filename )*/
+/*  filename: åé¤ãããã¡ã¤ã«å*/
+/**/
+/* æ»ãå¤*/
+/*	æå: 1, å¤±æ: 0*/
+/******************************************************/
+mrb_value mrb_sdcard_remove(mrb_state *mrb, mrb_value self)
+{
+	mrb_value value;
+	char	*str;
+	int ret = 0;
+
+	mrb_get_args(mrb, "S", &value);
+
+	str = RSTRING_PTR(value);
+
+	if (SD_remove(str) == true) {
+		ret = 1;
+	}
+
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* ãã¡ã¤ã«ãã³ãã¼ãã: SD_copy*/
+/*	SD_copy( srcfilename, distfilename )*/
+/*  srcfilename: ã³ãã¼å
+ãã¡ã¤ã«å*/
+/*  distfilename: ã³ãã¼å
+ãã¡ã¤ã«å*/
+/**/
+/* æ»ãå¤*/
+/*	æå: 1, å¤±æ: 0*/
+/******************************************************/
+mrb_value mrb_sdcard_copy(mrb_state *mrb, mrb_value self)
+{
+	mrb_value value1, value2;
+	char	*str1;
+	char	*str2;
+	int ret = 0;
+	int v;
+	unsigned char chr[1];
+
+	mrb_get_args(mrb, "SS", &value1, &value2);
+
+	str1 = RSTRING_PTR(value1);
+	str2 = RSTRING_PTR(value2);
+
+	if (SD_exists(str2) == true) {
+		SD_remove(str2);
+	}
+
+	/*æ¢å­ã®ãã¡ã¤ã«ãã³ãã¼ãã*/
+	File *s = &Fp[0];
+	File *d = &Fp[1];
+
+	if (SD_open(s, str1, FILE_READ)) {
+		if (SD_open(d, str2, FILE_WRITE)) {
+			v = file_read(s);
+			while (v >= 0) {
+				chr[0] = (unsigned char)v;
+				file_write(d, chr, 1);
+				v = file_read(s);
+			}
+			ret = 1;
+			file_flush(d);
+			file_close(d);
+		}
+		file_close(s);
+	}
+
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* ãã£ã¬ã¯ããªãåé¤ãã: SD_rmdir*/
+/*	SD_rmdir( dirname )*/
+/*  dirname: åé¤ãããã£ã¬ã¯ããªå*/
+/**/
+/* æ»ãå¤*/
+/*	æå: 1, å¤±æ: 0*/
+/******************************************************/
+mrb_value mrb_sdcard_rmdir(mrb_state *mrb, mrb_value self)
+{
+	mrb_value value;
+	char	*str;
+	int ret = 0;
+
+	mrb_get_args(mrb, "S", &value);
+
+	str = RSTRING_PTR(value);
+
+	if (SD_rmdir(str) == true) {
+		ret = 1;
+	}
+
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* ãã¡ã¤ã«ããªã¼ãã³ãã¾ã: SD_open*/
+/*	SD_open( number, filename[, mode] )*/
+/*	number: ãã¡ã¤ã«çªå· 0 ã¾ãã¯ 1*/
+/*	filename: ãã¡ã¤ã«å(8.3å½¢å¼)*/
+/*	mode: 0:Read, 1:Append, 2:New Create*/
+/* æ»ãå¤*/
+/*	æå: çªå·, å¤±æ: -1*/
+/******************************************************/
+mrb_value mrb_sdcard_open(mrb_state *mrb, mrb_value self)
+{
+	int	num;
+	int mode;
+	mrb_value value;
+	char	*str;
+
+	int n = mrb_get_args(mrb, "iS|i", &num, &value, &mode);
+
+	str = RSTRING_PTR(value);
+
+	if (n < 3) {
+		mode = 0;
+	}
+
+	if (mode == 2) {
+		/*æ°è¦æ¸ãè¾¼ã¿*/
+		if (SD_exists(str) == true) {
+			SD_remove(str);
+		}
+	}
+
+	int ret = -1;
+	if (num < 0 || num > 1) { return mrb_fixnum_value(ret); }
+
+	if (mode == 1 || mode == 2) {
+		if (SD_open(&Fp[num], str, FILE_WRITE)) {
+			file_seek(&Fp[num], file_size(&Fp[num]));
+			ret = num;
+		}
+	}
+	else {
+		if (SD_open(&Fp[num], str, FILE_READ)) {
+			ret = num;
+		}
+	}
+
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* openãããã¡ã¤ã«ãã¯ã­ã¼ãºãã¾ã: SD_close*/
+/*	SD_close( number )*/
+/*	number: ãã¡ã¤ã«çªå· 0 ã¾ãã¯ 1*/
+/******************************************************/
+mrb_value mrb_sdcard_close(mrb_state *mrb, mrb_value self)
+{
+	int	num;
+
+	mrb_get_args(mrb, "i", &num);
+
+	if (num >= 0 && num < 2) {
+		file_close(&Fp[num]);
+	}
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* openãããã¡ã¤ã«ãã1ãã¤ãèª­ã¿è¾¼ã¿ã¾ã: SD_read*/
+/*	SD_read( number )*/
+/*	number: ãã¡ã¤ã«çªå· 0 ã¾ãã¯ 1*/
+/* æ»ãå¤*/
+/*	0x00ï½0xFFãè¿ãããã¡ã¤ã«ã®æå¾ã ã£ãã-1ãè¿ãã*/
+/******************************************************/
+mrb_value mrb_sdcard_read(mrb_state *mrb, mrb_value self)
+{
+	int	num;
+
+	mrb_get_args(mrb, "i", &num);
+
+	int dat = -1;
+	if (num < 0 || num > 1) { return mrb_fixnum_value(dat); }
+
+	dat = file_read(&Fp[num]);
+
+	return mrb_fixnum_value(dat);
+}
+
+/******************************************************/
+/* openãããã¡ã¤ã«ã®èª­ã¿åºãä½ç½®ãç§»åãã: SD_seek*/
+/*	SD_seek( number, byte )*/
+/*	number: ãã¡ã¤ã«çªå· 0 ã¾ãã¯ 1*/
+/*	byte: seekãããã¤ãæ°(-1)ã§ãã¡ã¤ã«ã®æå¾ã«ç§»åãã*/
+/* æ»ãå¤*/
+/*	æå: 1, å¤±æ: 0*/
+/******************************************************/
+mrb_value mrb_sdcard_seek(mrb_state *mrb, mrb_value self)
+{
+	int	num;
+	int size;
+	int ret = 0;
+
+	mrb_get_args(mrb, "ii", &num, &size);
+
+	if (num < 0 || num > 1) { return mrb_fixnum_value(ret); }
+
+	if (size == -1) {
+		if (file_seek(&Fp[num], file_size(&Fp[num]))) {
+			ret = 1;
+		}
+	}
+	else {
+		if (file_seek(&Fp[num], size)) {
+			ret = 1;
+		}
+	}
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* openãããã¡ã¤ã«ã«ãã¤ããªãã¼ã¿ãæ¸ãè¾¼ã: SD_write*/
+/*	SD_write( number, buf, len )*/
+/*	number: ãã¡ã¤ã«çªå· 0 ã¾ãã¯ 1*/
+/*	buf: æ¸ãè¾¼ããã¼ã¿*/
+/*	len: æ¸ãè¾¼ããã¼ã¿ãµã¤ãº*/
+/* æ»ãå¤*/
+/*	å®éã«æ¸ãããã¤ãæ°*/
+/******************************************************/
+mrb_value mrb_sdcard_write(mrb_state *mrb, mrb_value self)
+{
+	int	num, len;
+	mrb_value value;
+	char	*str;
+
+	mrb_get_args(mrb, "iSi", &num, &value, &len);
+
+	str = RSTRING_PTR(value);
+
+	int ret = 0;
+	if (num < 0 || num > 1) { return mrb_fixnum_value(ret); }
+
+	ret = file_write(&Fp[num], (unsigned char*)str, len);
+
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* openãããã¡ã¤ã«ã®æ¸ãè¾¼ã¿ããã©ãã·ã¥ãã¾ã: SD_flush*/
+/*	SD_flush( number )*/
+/*	number: ãã¡ã¤ã«çªå· 0 ã¾ãã¯ 1*/
+/******************************************************/
+mrb_value mrb_sdcard_flush(mrb_state *mrb, mrb_value self)
+{
+	int	num;
+
+	mrb_get_args(mrb, "i", &num);
+
+	if (num >= 0 && num < 2) {
+		file_flush(&Fp[num]);
+	}
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* openãããã¡ã¤ã«ã®ãµã¤ãºãåå¾ãã¾ã: SD_size*/
+/*	SD_size( number )*/
+/*	number: ãã¡ã¤ã«çªå· 0 ã¾ãã¯ 1*/
+/**/
+/* æ»ãå¤*/
+/*	ãã¡ã¤ã«ãµã¤ãº*/
+/******************************************************/
+mrb_value mrb_sdcard_size(mrb_state *mrb, mrb_value self)
+{
+	int	num;
+	mrb_int ret = 0;
+
+	mrb_get_args(mrb, "i", &num);
+
+	if (num < 0 || num > 1) { return mrb_fixnum_value(ret); }
+
+	ret = file_size(&Fp[num]);
+
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* openãããã¡ã¤ã«ã®seekä½ç½®ãåå¾ãã¾ã: SD_position*/
+/*	SD_position( number )*/
+/*	number: ãã¡ã¤ã«çªå· 0 ã¾ãã¯ 1*/
+/**/
+/* æ»ãå¤*/
+/*	ã·ã¼ã¯ä½ç½®*/
+/******************************************************/
+mrb_value mrb_sdcard_position(mrb_state *mrb, mrb_value self)
+{
+	int	num;
+	mrb_int ret = 0;
+
+	mrb_get_args(mrb, "i", &num);
+
+	if (num < 0 || num > 1) { return mrb_fixnum_value(ret); }
+
+	ret = file_position(&Fp[num]);
+
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+int sdcard_Init(mrb_state *mrb)
+{
+	/*æ¥ä»ã¨æå»ãè¿ãé¢æ°ãç»é²*/
+	/*SdFile::dateTimeCallback( &SD_DateTime );*/
+
+	struct RClass *sdcardModule = mrb_define_module(mrb, "SD");
+
+	mrb_define_module_function(mrb, sdcardModule, "exists", mrb_sdcard_exists, MRB_ARGS_REQ(1));
+	mrb_define_module_function(mrb, sdcardModule, "mkdir", mrb_sdcard_mkdir, MRB_ARGS_REQ(1));
+	mrb_define_module_function(mrb, sdcardModule, "remove", mrb_sdcard_remove, MRB_ARGS_REQ(1));
+	mrb_define_module_function(mrb, sdcardModule, "rename", mrb_sdcard_copy, MRB_ARGS_REQ(2));
+	mrb_define_module_function(mrb, sdcardModule, "rmdir", mrb_sdcard_rmdir, MRB_ARGS_REQ(1));
+	mrb_define_module_function(mrb, sdcardModule, "open", mrb_sdcard_open, MRB_ARGS_REQ(2) | MRB_ARGS_OPT(1));
+
+	mrb_define_module_function(mrb, sdcardModule, "close", mrb_sdcard_close, MRB_ARGS_REQ(1));
+	mrb_define_module_function(mrb, sdcardModule, "read", mrb_sdcard_read, MRB_ARGS_REQ(1));
+	mrb_define_module_function(mrb, sdcardModule, "seek", mrb_sdcard_seek, MRB_ARGS_REQ(2));
+	mrb_define_module_function(mrb, sdcardModule, "write", mrb_sdcard_write, MRB_ARGS_REQ(3));
+	mrb_define_module_function(mrb, sdcardModule, "flush", mrb_sdcard_flush, MRB_ARGS_REQ(1));
+	mrb_define_module_function(mrb, sdcardModule, "size", mrb_sdcard_size, MRB_ARGS_REQ(1));
+	mrb_define_module_function(mrb, sdcardModule, "position", mrb_sdcard_position, MRB_ARGS_REQ(1));
+
+	return 1;
+}
+
+/******************************************************/
+/* æ¥ä»ã¨æå»ãè¿ãã³ã¼ã«ããã¯é¢æ°*/
+/******************************************************/
+void SD_DateTime(uint16_t *date, uint16_t *time)
+{
+	uint16_t year = 2000;
+	uint8_t month = 1, day = 1, hour = 0, minute = 0, second = 0;
+	time_t timertc;
+	struct tm *tm;
+
+	timertc = rtc_read();
+	tm = localtime(&timertc);
+
+	year = tm->tm_year + 1900;
+	month = tm->tm_mon;
+	day = tm->tm_mday;
+	hour = tm->tm_hour;
+	minute = tm->tm_min;
+	second = tm->tm_sec;
+
+	/* FAT_DATEãã¯ã­ã§ãã£ã¼ã«ããåãã¦æ¥ä»ãè¿ã*/
+	*date = (year - 1980) << 9 | month << 5 | day;
+
+	/* FAT_TIMEãã¯ã­ã§ãã£ã¼ã«ããåãã¦æéãè¿ã*/
+	*time = hour << 11 | minute << 5 | second >> 1;
+}
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sSdCard.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sSdCard.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sSdCard.h	(revision 270)
@@ -0,0 +1,15 @@
+/*
+ * SDã«ã¼ãé¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+int sdcard_Init(mrb_state *mrb);
+
+void SD_DateTime(uint16_t *date, uint16_t *time);
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sSerial.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sSerial.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sSerial.c	(revision 270)
@@ -0,0 +1,294 @@
+/*
+ * ã·ãªã¢ã«éä¿¡é¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+#include <arduino.h>
+
+#include <mruby.h>
+#include <mruby/array.h>
+#include <mruby/data.h>
+#include <mruby/class.h>
+#include <mruby/string.h>
+
+#include "../llbruby.h"
+
+#define SERIAL_MAX	6
+#define SERIAL_BUFFER_SIZE 1024
+
+serial_t *RbSerial[SERIAL_MAX];		/*0:Serial(USB), 1:Serial1, 2:Serial3, 3:Serial2, 4:Serial6 5:Serial7*/
+
+/******************************************************/
+/* ã¡ã¢ãªã®éæ¾æã«èµ°ã*/
+/******************************************************/
+static void mrb_serial_free(mrb_state *mrb, void *ptr)
+{
+	serial_t* serial = (serial_t *)(ptr);
+	mrb_free(mrb, serial);
+}
+
+/******************************************************/
+/* ãã®æ§é ä½ã®æå³ã¯ããããã£ã¦ããªã*/
+/******************************************************/
+static struct mrb_data_type serial_type = {"Serial", mrb_serial_free};
+
+
+/******************************************************/
+/* ã·ãªã¢ã«éä¿¡ãåæåãã¾ã: Serial.new*/
+/*  Serial.new(num[, bps])ã*/
+/*  num: éä¿¡çªå·(0:USB, 1:TX-0/RX-1, 2:TX-5/RX-6, 3:TX-7/RX-8, 4:TX-12/RX-11, 5:TX-9(26)/RX-3)*/
+/*  bps: ãã¼ã¬ã¼ã*/
+/**/
+/* æ»ãå¤*/
+/*  Serialã®ã¤ã³ã¹ã¿ã³ã¹*/
+/******************************************************/
+static mrb_value mrb_serial_initialize(mrb_state *mrb, mrb_value self)
+{
+/* Initialize data type first, otherwise segmentation fault occurs.*/
+	DATA_TYPE(self) = &serial_type;
+	DATA_PTR(self) = NULL;
+
+	mrb_int num;
+	mrb_int bps;
+	PinName txpin, rxpin;
+
+	int n = mrb_get_args(mrb, "i|i", &num, &bps);
+
+	if (num < 0 && num >= SERIAL_MAX) {
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+	}
+
+	if(!portToPins(num, &txpin, &rxpin))
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+
+	serial_t* serialc = mrb_malloc(mrb, sizeof(serial_t));
+	serial_init(serialc, txpin, rxpin);
+
+	if (n >= 2) {
+		serial_baud(serialc, bps);
+	}
+
+	DATA_PTR(self) = serialc;
+	return self;
+}
+
+/******************************************************/
+/* ãã¼ã¬ã¼ããè¨­å®ãã¾ã: Serial.bps*/
+/*  Serial.bps(bps)*/
+/*  bps: ãã¼ã¬ã¼ã */
+/******************************************************/
+mrb_value mrb_serial_bps(mrb_state *mrb, mrb_value self)
+{
+	int bps;
+
+	serial_t* serialc = (serial_t *)(mrb_get_datatype(mrb, self, &serial_type));
+
+	mrb_get_args(mrb, "i", &bps);
+
+	serial_baud(serialc, bps);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ã·ãªã¢ã«ã«åºåãã¾ã: Serial.print*/
+/*  Serial.print([str])*/
+/*  str: æå­å*/
+/*    çç¥æã¯ä½ãåºåãã¾ãã*/
+/******************************************************/
+mrb_value mrb_serial_print(mrb_state *mrb, mrb_value self)
+{
+	mrb_value text;
+
+	serial_t* serialc = (serial_t *)(mrb_get_datatype(mrb, self, &serial_type));
+
+	int n = mrb_get_args(mrb, "|S", &text);
+
+	if (n > 0) {
+		serial_print(serialc, RSTRING_PTR(text));
+	}
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ã·ãªã¢ã«ã«\r\nä»ãã§åºåãã¾ã: Serial.println*/
+/*  Serial.println([str])*/
+/*  str: æå­å*/
+/*    çç¥æã¯æ¹è¡ã®ã¿*/
+/******************************************************/
+mrb_value mrb_serial_println(mrb_state *mrb, mrb_value self)
+{
+	mrb_value text;
+
+	serial_t* serialc = (serial_t *)(mrb_get_datatype(mrb, self, &serial_type));
+
+	int n = mrb_get_args(mrb, "|S", &text);
+
+	if (n > 0) {
+		serial_println(serialc, RSTRING_PTR(text));
+	}
+	else {
+		serial_println(serialc, "");
+	}
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ã·ãªã¢ã«ãã¼ã¿ããããã©ããèª¿ã¹ã¾ã: Serial.available*/
+/*  Serial.available()*/
+/*  æ»ãå¤ ã·ãªã¢ã«ãããã¡ã«ãããã¼ã¿ã®ãã¤ãæ°ã0ã®å ´åã¯ãã¼ã¿ãªã*/
+/******************************************************/
+mrb_value mrb_serial_available(mrb_state *mrb, mrb_value self)
+{
+	serial_t* serialc = (serial_t *)(mrb_get_datatype(mrb, self, &serial_type));
+
+	return mrb_fixnum_value(serial_readable(serialc));
+}
+
+/******************************************************/
+/* ã·ãªã¢ã«ãããã¼ã¿ãåå¾ãã¾ã: Serial.read*/
+/*  Serial.read()*/
+/* æ»ãå¤*/
+/*	ãã¼ã¿é
+å*/
+/******************************************************/
+mrb_value mrb_serial_read(mrb_state *mrb, mrb_value self)
+{
+	serial_t* serialc = (serial_t *)(mrb_get_datatype(mrb, self, &serial_type));
+
+	int len = serial_readable(serialc);
+	mrb_value ret;
+	char *buf;
+
+	ret = mrb_str_buf_new(mrb, len);
+	buf = RSTRING_PTR(ret);
+	for (int i = 0; i < len; i++) {
+		buf[i] = serial_getc(serialc);
+	}
+	RSTR_SET_LEN(RSTRING(ret), len);
+
+	return ret;
+}
+
+/******************************************************/
+/* ã·ãªã¢ã«ã«ãã¼ã¿ãåºåãã¾ã: Serial.write*/
+/*  Serial.write(buf,len)*/
+/*	buf: åºåãã¼ã¿*/
+/*	len: åºåãã¼ã¿ãµã¤ãº*/
+/* æ»ãå¤*/
+/*	åºåãããã¤ãæ°*/
+/******************************************************/
+mrb_value mrb_serial_write(mrb_state *mrb, mrb_value self)
+{
+	mrb_value value;
+	int len;
+	char *buf;
+
+	serial_t* serialc = (serial_t *)(mrb_get_datatype(mrb, self, &serial_type));
+
+	mrb_get_args(mrb, "Si", &value, &len);
+
+	buf = RSTRING_PTR(value);
+	for (int i = 0; i < len; i++) {
+		serial_putc(serialc, buf[i]);
+	}
+
+	return mrb_fixnum_value(len);
+}
+
+/******************************************************/
+/* ã·ãªã¢ã«ãã¼ã¿ããã©ãã·ã¥ãã¾ã: Serial.flash*/
+/*  Serial.flash()*/
+/******************************************************/
+mrb_value mrb_serial_flash(mrb_state *mrb, mrb_value self)
+{
+	serial_t* serialc = (serial_t *)(mrb_get_datatype(mrb, self, &serial_type));
+
+	//serial_flush(serialc);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+#if 0
+unsigned char WiFiData[256];
+/***************************************************/
+/* USBãã¼ãã¨ESP8266ãã·ãªã¢ã«ã§ç´çµãã¾ã: WiFi.bypass*/
+/*  WiFi.bypass()*/
+/* ãªã»ããããã¾ã§ãå¦çã¯æ»ãã¾ããã*/
+//**************************************************/
+mrb_value mrb_wifi_bypass(mrb_state *mrb, mrb_value self)
+{
+	int len0, len1,len;
+
+	//serial_begin(RbSerial[0], 115200);
+	//serial_begin(RbSerial[3], 115200);
+
+	int retCnt = 0;
+	while(true){
+		len0 = serial_readable(RbSerial[0]);
+		len1 = serial_readable(RbSerial[3]);
+
+		if(len0 > 0){
+			len = len0<256 ? len0 : 256;
+
+			for(int i=0; i<len; i++){
+				WiFiData[i] = (unsigned char)serial_read(RbSerial[0]);
+
+				if(WiFiData[i] == 0x0d){ /*0x0Dã®ã¿ã®æ¹è¡ãé£æãããbypassã¢ã¼ããæãã*/
+					retCnt++;
+					if(retCnt > 20){
+						return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+					}
+				}
+				else{
+					retCnt = 0;
+				}
+			}
+			serial_write(RbSerial[3],  WiFiData, len );
+		}
+
+		if(len1 > 0){
+			len = len1<256 ? len1 : 256;
+
+			for(int i=0; i<len; i++){
+				WiFiData[i] = (unsigned char)serial_read(RbSerial[3]);
+			}
+			serial_write(RbSerial[0],  WiFiData, len );
+		}
+	}
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+#endif
+
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+void serial_Init(mrb_state* mrb)
+{
+
+	RbSerial[0] = Serial;	/*0:Serial(USB)*/
+	RbSerial[1] = Serial1;	/*1:Serial1*/
+	RbSerial[2] = Serial2;	/*2:Serial3*/
+	RbSerial[3] = Serial3;	/*3:Serial2*/
+	RbSerial[4] = Serial4;	/*4:Serial6*/
+	RbSerial[5] = Serial5;	/*5:Serial7*/
+
+	struct RClass *serialModule = mrb_define_class(mrb, "Serial", mrb->object_class);
+	MRB_SET_INSTANCE_TT(serialModule, MRB_TT_DATA);
+
+	mrb_define_method(mrb, serialModule, "initialize", mrb_serial_initialize, MRB_ARGS_REQ(1) | MRB_ARGS_OPT(1));
+
+	mrb_define_method(mrb, serialModule, "bps", mrb_serial_bps, MRB_ARGS_REQ(1));
+	mrb_define_method(mrb, serialModule, "print", mrb_serial_print, MRB_ARGS_OPT(1));
+	mrb_define_method(mrb, serialModule, "println", mrb_serial_println, MRB_ARGS_OPT(1));
+	mrb_define_method(mrb, serialModule, "read", mrb_serial_read, MRB_ARGS_NONE());
+	mrb_define_method(mrb, serialModule, "write", mrb_serial_write, MRB_ARGS_REQ(2));
+	mrb_define_method(mrb, serialModule, "flash", mrb_serial_flash, MRB_ARGS_NONE());
+	mrb_define_method(mrb, serialModule, "available", mrb_serial_available, MRB_ARGS_NONE());
+
+	/*struct RClass *wifiModule = mrb_define_module(mrb, "WiFi");*/
+	/*mrb_define_module_function(mrb, wifiModule, "bypass", mrb_wifi_bypass, MRB_ARGS_NONE());*/
+}
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sSerial.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sSerial.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sSerial.h	(revision 270)
@@ -0,0 +1,13 @@
+/*
+ * ã·ãªã¢ã«éä¿¡é¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+void serial_Init(mrb_state *mrb);
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sServo.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sServo.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sServo.c	(revision 270)
@@ -0,0 +1,239 @@
+/*
+ * ãµã¼ãã»ãã¼ãé¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+#include <arduino.h>
+/*#include <servo.h>*/
+
+#include <mruby.h>
+/*#include <mruby/string.h>*/
+/*#include <mruby/variable.h>*/
+
+#include "../llbruby.h"
+#include "sKernel.h"
+
+#define ATTACH_MAX	12
+struct pin_node *servo[ATTACH_MAX];
+
+/******************************************************/
+/* ãµã¼ãåºåãä»»æã®ãã³ã«å²ãå½ã¦ã¾ã: Servo.attach*/
+/* Servo.attach(ch, pin[,min,max])*/
+/*	ch: ãµã¼ãã®ãã£ãã« 0ï½11ã¾ã§æå®ã§ãã¾ã*/
+/*  pin: å²ãå½ã¦ããã³çªå·*/
+/*  min: ãµã¼ãã®è§åº¦ã0åº¦ã®ã¨ãã®ãã«ã¹å¹
+(ãã¤ã¯ã­ç§)ãããã©ã«ãã¯544*/
+/*  max: ãµã¼ãã®è§åº¦ã180åº¦ã®ã¨ãã®ãã«ã¹å¹
+(ãã¤ã¯ã­ç§)ãããã©ã«ãã¯2400*/
+/******************************************************/
+mrb_value mrb_servo_attach(mrb_state *mrb, mrb_value self)
+{
+	int ch;
+	int pinno;
+	int min;
+	int max;
+	struct pin_node *pin;
+
+	int n = mrb_get_args(mrb, "ii|ii", &ch, &pinno, &min, &max);
+
+	if (pinno >= 20) {
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+	}
+
+	/* nã2ä»¥ä¸ã®ã¨ãã¯ãminãå¼æ°ã«ç¡ãã®ã§ã */
+	if (n <= 2) {
+		min = 544;
+	}
+
+	/* nã3ä»¥ä¸ã®ã¨ãã¯ãmaxãå¼æ°ã«ç¡ãã®ã§ã */
+	if (n <= 3) {
+		max = 2400;
+	}
+
+	if (ch < 0 || ch >= ATTACH_MAX) {
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+	}
+
+	if (servo[ch] != 0) {
+		pwmout_free(&servo[ch]->pwmout);
+		/*servo[ch] = 0;*/
+	}
+
+	pin = get_pin(pintype_pwmout, pinno);
+	if (pin == NULL)
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+
+	servo[ch] = pin;
+	servo[ch]->min = min;
+	servo[ch]->max = max;
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ãµã¼ãã®è§åº¦ãã»ãããã¾ã: Servo.write*/
+/* Servo.write(ch,angle)*/
+/*	ch: ãµã¼ãã®ãã£ãã« 0ï½11ã¾ã§æå®ã§ãã¾ã*/
+/*  angle: è§åº¦ 0ï½180*/
+/******************************************************/
+mrb_value mrb_servo_write(mrb_state *mrb, mrb_value self)
+{
+	int ch;
+	int angle;
+	int min;
+	int max;
+
+	mrb_get_args(mrb, "ii", &ch, &angle);
+
+	if (ch < 0 || ch >= ATTACH_MAX) {
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+	}
+
+	if (servo[ch] == NULL) {
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+	}
+
+	DEBUG_PRINT("Servo", angle);
+
+	min = servo[ch]->min;
+	max = servo[ch]->max;
+	angle *= servo[ch]->period;
+
+	pwmout_pulsewidth_us(&servo[ch]->pwmout, (angle * (max - min)) / 180 + min);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ãµã¼ãã¢ã¼ã¿ã«usåä½ã§è§åº¦ãæå®ãã: Servo.us*/
+/* Servo.us(ch,us)*/
+/*	ch: ãµã¼ãã®ãã£ãã« 0ï½11ã¾ã§æå®ã§ãã¾ã*/
+/*  us: åºåããããã«ã¹ã®å¹
+ 1ï½19999, 0ã§åºå OFF*/
+/*   ãµã¼ãã¢ã¼ã¿ã«ä¸ãããããã«ã¹ã¯20mså¨æã§ã1å¨æä¸­ã®Highã®æéãç´æ¥æå®ããã*/
+/*   å®è³ªçã«PWMåºåãé£ç¶åè»¢ã¿ã¤ãã®ãµã¼ãã§ã¯ãåè»¢ã®ã¹ãã¼ããè¨­å®ãããã¨ãã§ããã*/
+/******************************************************/
+mrb_value mrb_servo_us(mrb_state *mrb, mrb_value self)
+{
+	int ch;
+	int us;
+
+	mrb_get_args(mrb, "ii", &ch, &us);
+
+	if (ch < 0 || ch >= ATTACH_MAX) {
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+	}
+
+	if (servo[ch] == 0) {
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+	}
+
+	pwmout_pulsewidth_us(&servo[ch]->pwmout, us);
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* æå¾ã«è¨­å®ãããè§åº¦ãèª­ã¿åºã: Servo.read*/
+/* Servo.read(ch)*/
+/*	ch: ãµã¼ãã®ãã£ãã« 0ï½11ã¾ã§æå®ã§ãã¾ã*/
+/* æ»ãå¤*/
+/*  ãã¤ã¯ã­ç§åä½ us(ch) ã§ä¸ããå¤ã¯èª­ã¿ã¨ããªã*/
+/******************************************************/
+mrb_value mrb_servo_read(mrb_state *mrb, mrb_value self)
+{
+	int ch;
+	int ret = 0;
+
+	mrb_get_args(mrb, "i", &ch);
+
+	if (ch < 0 || ch >= ATTACH_MAX) {
+		return mrb_fixnum_value(ret);
+	}
+
+	if (servo[ch] == 0) {
+		return mrb_fixnum_value(ret);
+	}
+
+	ret = servo[ch]->pulsewidth;
+
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* ãã³ã«ãµã¼ããå²ãå½ã¦ããã¦ããããç¢ºèªãã: Servo.attached*/
+/* Servo.attached(ch)*/
+/*	ch: ãµã¼ãã®ãã£ãã« 0ï½11ã¾ã§æå®ã§ãã¾ã*/
+/* æ»ãå¤*/
+/*  1: å²ãå½ã¦ããã¦ãã*/
+/*  0: å²ãå½ã¦ã¯ãªã*/
+/******************************************************/
+mrb_value mrb_servo_attached(mrb_state *mrb, mrb_value self)
+{
+	int ch;
+	int ret = 0;
+
+	mrb_get_args(mrb, "i", &ch);
+
+	if (ch < 0 || ch >= ATTACH_MAX) {
+		return mrb_fixnum_value(ret);
+	}
+
+	if (servo[ch] == 0) {
+		return mrb_fixnum_value(ret);
+	}
+
+	if (get_pin_type(servo[ch]->pin) == pintype_pwmout) {
+		ret = 1;
+	}
+
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* ãµã¼ãã®åä½ãæ­¢ããå²ãè¾¼ã¿ãç¦æ­¢ãã: Servo.detach*/
+/* Servo.detach(ch)*/
+/*	ch: ãµã¼ãã®ãã£ãã« 0ï½9ã¾ã§æå®ã§ãã¾ã*/
+/******************************************************/
+mrb_value mrb_servo_detach(mrb_state *mrb, mrb_value self)
+{
+	int ch;
+
+	mrb_get_args(mrb, "i", &ch);
+
+	if (ch < 0 || ch >= ATTACH_MAX) {
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+	}
+
+	if (servo[ch] == NULL) {
+		return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+	}
+
+	pwmout_free(&servo[ch]->pwmout);
+	servo[ch] = 0;
+
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+void servo_Init(mrb_state *mrb)
+{
+	for (int i = 0; i < ATTACH_MAX; i++) {
+		servo[i] = 0;
+	}
+
+	struct RClass *servoModule = mrb_define_module(mrb, "Servo");
+
+	mrb_define_module_function(mrb, servoModule, "attach", mrb_servo_attach, MRB_ARGS_REQ(2) | MRB_ARGS_OPT(2));
+	mrb_define_module_function(mrb, servoModule, "write", mrb_servo_write, MRB_ARGS_REQ(2));
+	mrb_define_module_function(mrb, servoModule, "us", mrb_servo_us, MRB_ARGS_REQ(2));
+	mrb_define_module_function(mrb, servoModule, "read", mrb_servo_read, MRB_ARGS_REQ(1));
+	mrb_define_module_function(mrb, servoModule, "attached", mrb_servo_attached, MRB_ARGS_REQ(1));
+	mrb_define_module_function(mrb, servoModule, "detach", mrb_servo_detach, MRB_ARGS_REQ(1));
+}
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sServo.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sServo.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sServo.h	(revision 270)
@@ -0,0 +1,13 @@
+/*
+ * ãµã¼ãã»ãã¼ãé¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+void servo_Init(mrb_state *mrb);
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sSys.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sSys.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sSys.c	(revision 270)
@@ -0,0 +1,245 @@
+/*
+ * ã·ã¹ãã é¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+#include <arduino.h>
+/*#include <eeprom.h>*/
+/*#include <reboot.h>*/
+
+#include <mruby.h>
+#include <mruby/string.h>
+#include <mruby/variable.h>
+#include <mruby/version.h>
+/*#include <eeploader.h>*/
+
+#include "../llbruby.h"
+
+#if BOARD == BOARD_GR || FIRMWARE == SDBT || FIRMWARE == SDWF || BOARD == BOARD_P05 || BOARD == BOARD_P06
+#include "sSdCard.h"
+#include "sWiFi.h"
+#endif
+
+#define EEPROMADDRESS	0xFF
+
+/******************************************************/
+/* çµäºããã¾ã*/
+/*	System.exit()*/
+/*	ã¨ã©ã¼å¤ããã©ããå³çµäº*/
+/******************************************************/
+mrb_value mrb_system_exit(mrb_state *mrb, mrb_value self)
+{
+	mrb_raise(mrb, mrb_class_get(mrb, "Sys#exit Called"), "Normal Completion");
+
+	return mrb_nil_value();	/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* æ¬¡ã«å®è¡ããã¹ã¯ãªãããã¡ã¤ã«ãVmFilenameã«ã»ãããã¾ãã*/
+/* System.setRun( filename )*/
+/******************************************************/
+mrb_value mrb_system_setrun(mrb_state *mrb, mrb_value self)
+{
+	mrb_value text;
+
+	mrb_get_args(mrb, "S", &text);
+	char *str = RSTRING_PTR(text);
+	int len = RSTRING_LEN(text);
+	if (len > sizeof(RubyFilename) - 1)
+		len = sizeof(RubyFilename) - 1;
+
+	strcpy(RubyFilename, (char*)str);
+	RubyFilename[0] = '\0';
+
+	return mrb_nil_value();	/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ã·ã¹ãã ã®ãã¼ã¸ã§ã³ãåå¾ãã¾ã*/
+/* System.version([R])*/
+/* å¼æ°ãããã°mrubyã®ãã¼ã·ã§ã³ãè¿ã*/
+/******************************************************/
+mrb_value mrb_system_version(mrb_state *mrb, mrb_value self)
+{
+	int tmp;
+
+	int n = mrb_get_args(mrb, "|i", &tmp);
+
+	if (n >= 1) {
+		/*return mrb_const_get(mrb, mrb_obj_value(mrb->kernel_module), mrb_intern_lit(mrb, "MRUBY_VERSION"));*/
+		return mrb_str_new_cstr(mrb, MRUBY_VERSION);
+	}
+	return mrb_str_new_cstr(mrb, (const char*)ProgVer);
+}
+
+/******************************************************/
+/*ãã©ãã·ã¥ã¡ã¢ãªã«æ¸ãè¾¼ã¿ã¾ã*/
+/* System.push(address, buf, length)*/
+/*	address: æ¸ãè¾¼ã¿éå§ã¢ãã¬ã¹(0x0000ï½0x00ff)*/
+/*  buf: æ¸ãè¾¼ããã¼ã¿*/
+/*  length: æ¸ãè¾¼ããµã¤ãº*/
+/* æ»ãå¤*/
+/*  1:æå, 0:å¤±æ*/
+/******************************************************/
+mrb_value mrb_system_push(mrb_state *mrb, mrb_value self)
+{
+	int		address;
+	mrb_value value;
+	int		len;
+	char	*str;
+
+	mrb_get_args(mrb, "iSi", &address, &value, &len);
+
+	str = RSTRING_PTR(value);
+
+	if (address > EEPROMADDRESS) {
+		return mrb_fixnum_value(0);
+	}
+
+	int ret = 1;
+	for (int i = 0; i < len; i++) {
+		ret = EEPROM_write((unsigned long)address, (unsigned char)str[i]);
+		if (ret == -1) {
+			ret = 0;
+			break;
+		}
+		address++;
+	}
+
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/*ãã©ãã·ã¥ã¡ã¢ãªããèª­ã¿åºãã¾ã*/
+/* System.pop(address, length)*/
+/*	address: èª­ã¿è¾¼ã¿ã¢ãã¬ã¹(0x0000ï½0x00ff)*/
+/*  length: èª­ã¿è¾¼ã¿ãµã¤ãº(MAX 32ãã¤ã)*/
+/* æ»ãå¤*/
+/*  èª­ã¿è¾¼ãã ãã¼ã¿*/
+/******************************************************/
+mrb_value mrb_system_pop(mrb_state *mrb, mrb_value self)
+{
+	unsigned char str[32];
+	int		address;
+	int		len;
+
+	mrb_get_args(mrb, "ii", &address, &len);
+
+	if (len > 32) {
+		len = 32;
+	}
+
+	if (address > EEPROMADDRESS) {
+		return mrb_str_new(mrb, (const char *)str, 0);
+	}
+
+	for (int i = 0; i < len; i++) {
+		str[i] = EEPROM_read((unsigned long)address);
+		address++;
+	}
+
+	return mrb_str_new(mrb, (const char *)str, len);
+}
+
+/******************************************************/
+/* ãã¡ã¤ã«ã­ã¼ãã¼ãå¼ã³åºãã¾ã*/
+/* System.fileload()*/
+/******************************************************/
+mrb_value mrb_system_fileload(mrb_state *mrb, mrb_value self)
+{
+	/*ãã¡ã¤ã«ã­ã¼ãã¼ã®å¼ã³åºã*/
+	if (fileloader((const char*)ProgVer, MRUBY_VERSION) == 1) {
+		mrb_full_gc(mrb);	/*å¼·å¶GCãå
+¥ãã*/
+		/*å¼·å¶çµäº*/
+		mrb_raise(mrb, mrb_class_get(mrb, "Sys#exit Called"), "Normal Completion");
+	}
+
+	mrb_full_gc(mrb);	/*å¼·å¶GCãå
+¥ãã*/
+
+	return mrb_nil_value();	/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ãªã»ãããã¾ã*/
+/* System.reset()*/
+/******************************************************/
+mrb_value mrb_system_reset(mrb_state *mrb, mrb_value self)
+{
+	system_reboot(REBOOT_USERAPP);	/*ãªã»ããå¾ã«ã¦ã¼ã¶ã¢ããªãèµ·åãã*/
+
+	return mrb_nil_value();	/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* SDã«ã¼ããä½¿ããããã«ãã¾ã: System.useSD*/
+/* System.useSD()*/
+/*æ»ãå¤*/
+/* 0:ä½¿ç¨ä¸å¯, 1:ä½¿ç¨å¯è½*/
+/******************************************************/
+mrb_value mrb_system_useSD(mrb_state *mrb, mrb_value self)
+{
+	int ret = 0;
+
+#if BOARD == BOARD_GR || FIRMWARE == SDBT || FIRMWARE == SDWF || BOARD == BOARD_P05 || BOARD == BOARD_P06
+	ret = sdcard_Init(mrb);		/*SDã«ã¼ãé¢é£ã¡ã½ããã®è¨­å®*/
+#endif
+
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* WiFiã¢ã¸ã¥ã¼ã«ESP8266ãã¼ããä½¿ããããã«ãã¾ã: System.useWiFi*/
+/* System.useWiFi()*/
+/*æ»ãå¤*/
+/* 0:ä½¿ç¨ä¸å¯, 1:ä½¿ç¨å¯è½*/
+/******************************************************/
+mrb_value mrb_system_useWiFi(mrb_state *mrb, mrb_value self)
+{
+	int ret = 0;
+
+#if (BOARD == FIRMWARE && BOARD == SDWF) || BOARD == BOARD_P05 || BOARD == BOARD_P06
+	ret = esp8266_Init(mrb);		/*ESP8266ãã¼ãé¢é£ã¡ã½ããã®è¨­å®*/
+#endif
+
+	return mrb_fixnum_value(ret);
+}
+
+/******************************************************/
+/* å®è¡ãã¦ããmrbãã¡ã¤ã«ãã¹ãåå¾ãã¾ã: System.getMrbPath*/
+/* System.getMrbPath()*/
+/*æ»ãå¤*/
+/* å®è¡ãã¦ããmrbãã¡ã¤ã«ãã¹*/
+/******************************************************/
+mrb_value mrb_system_getmrbpath(mrb_state *mrb, mrb_value self)
+{
+	return mrb_str_new_cstr(mrb, (const char*)ExeFilename);
+}
+
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+void sys_Init(mrb_state *mrb)
+{
+	struct RClass *systemModule = mrb_define_module(mrb, "System");
+
+	mrb_define_module_function(mrb, systemModule, "exit", mrb_system_exit, MRB_ARGS_NONE());
+	mrb_define_module_function(mrb, systemModule, "reset", mrb_system_reset, MRB_ARGS_NONE());
+	mrb_define_module_function(mrb, systemModule, "setrun", mrb_system_setrun, MRB_ARGS_REQ(1));
+	mrb_define_module_function(mrb, systemModule, "version", mrb_system_version, MRB_ARGS_OPT(1));
+
+	mrb_define_module_function(mrb, systemModule, "push", mrb_system_push, MRB_ARGS_REQ(3));
+	mrb_define_module_function(mrb, systemModule, "pop", mrb_system_pop, MRB_ARGS_REQ(2));
+
+	mrb_define_module_function(mrb, systemModule, "fileload", mrb_system_fileload, MRB_ARGS_NONE());
+
+	mrb_define_module_function(mrb, systemModule, "useSD", mrb_system_useSD, MRB_ARGS_NONE());
+	mrb_define_module_function(mrb, systemModule, "useWiFi", mrb_system_useWiFi, MRB_ARGS_NONE());
+
+	mrb_define_module_function(mrb, systemModule, "getMrbPath", mrb_system_getmrbpath, MRB_ARGS_NONE());
+}
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sSys.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sSys.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sSys.h	(revision 270)
@@ -0,0 +1,13 @@
+/*
+ * ã·ã¹ãã é¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+void sys_Init(mrb_state *mrb);
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sWiFi.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sWiFi.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sWiFi.c	(revision 270)
@@ -0,0 +1,376 @@
+/*
+ * ESP-WROOM-02é¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+#include <arduino.h>
+#include <string.h>
+
+#include <mruby.h>
+#include <mruby/string.h>
+
+#include "../llbruby.h"
+#include "sKernel.h"
+#include "sSerial.h"
+
+extern serial_t *RbSerial[];		/*0:Serial(USB), 1:Serial1, 2:Serial3, 3:Serial2, 4:Serial6 5:Serial7*/
+
+#define  WIFI_SERIAL	3
+#define  WIFI_BAUDRATE	115200
+/*#define  WIFI_CTS		15*/
+#define  WIFI_WAIT_MSEC	10000
+
+unsigned char WiFiData[256];
+int WiFiRecvOutlNum = -1;	/*ESP8266ããã®åä¿¡ãåºåããã·ãªã¢ã«çªå·: -1ã®å ´åã¯åºåããªãã*/
+
+/******************************************************/
+/* OK 0d0a ã ERROR 0d0aãæ¥ãã¾ã§ WiFiData[]ã«èª­ããã*/
+/* æå®ãããã·ãªã¢ã«ãã¼ãã«åºåãã¾ã*/
+/**/
+/* 1:åä¿¡ãã, 0:åä¿¡ã§ããªãã£ã*/
+/******************************************************/
+int getData(int wait_msec)
+{
+/*char f[16];*/
+	unsigned long times;
+	int c;
+	int okt = 0;
+	int ert = 0;
+	int len = 0;
+	int n = 0;
+
+	/*DEBUG_PRINT("getData", a);*/
+
+	WiFiData[0] = 0;
+	times = us_ticker_read() / 1000;
+	while (n < 256) {
+		/*digitalWrite(get_pin(WIFI_CTS), 0);	//éä¿¡è¨±å¯*/
+
+		/*wait_msec å¾
+ã¤*/
+		if ((us_ticker_read() / 1000) - times > wait_msec) {
+			DEBUG_PRINT("WiFi get Data", "Time OUT");
+			WiFiData[n] = 0;
+			return 0;
+		}
+
+		while (len = serial_readable(RbSerial[WIFI_SERIAL])) {
+			for (int i = 0; i < len; i++) {
+				c = serial_getc(RbSerial[WIFI_SERIAL]);
+
+				/*æå®ã®ã·ãªã¢ã«ãã¼ãã«åºãè¨­å®ã§ããã°ãåä¿¡å¤ãåºåãã¾ã*/
+				if (WiFiRecvOutlNum >= 0) {
+					serial_putc(RbSerial[WiFiRecvOutlNum], (unsigned char)c);
+				}
+
+				WiFiData[n] = c;
+				n++;
+				/*DEBUG_PRINT("c",c);*/
+
+				if (c == 'O') {
+					okt++;
+					ert++;
+				}
+				else if (c == 'K') {
+					okt++;
+				}
+				else if (c == 0x0d) {
+					ert++;
+					okt++;
+				}
+				else if (c == 0x0a) {
+					ert++;
+					okt++;
+					if (okt == 4 || ert == 7) {
+						WiFiData[n] = 0;
+						n = 256;
+						break;
+					}
+					else {
+						ert = 0;
+						okt = 0;
+					}
+				}
+				else if (c == 'E' || c == 'R') {
+					ert++;
+				}
+				else {
+					okt = 0;
+					ert = 0;
+				}
+			}
+			times = us_ticker_read() / 1000;
+		}
+	}
+	/*digitalWrite(get_pin(WIFI_CTS), 0);	//éä¿¡è¨±å¯*/
+	return 1;
+}
+
+/******************************************************/
+/* ã¹ãã¼ã·ã§ã³ã¢ã¼ãã®è¨­å®: WiFi.cwmode*/
+/*  WiFi.cwmode(mode)*/
+/*  mode: 1:Station, 2:SoftAP, 3:Station + SoftAP*/
+/******************************************************/
+mrb_value mrb_wifi_Cwmode(mrb_state *mrb, mrb_value self)
+{
+	int	mode;
+	char tmode[16];
+
+	mrb_get_args(mrb, "i", &mode);
+
+	sprintf(tmode, "%d", mode);
+
+	serial_print(RbSerial[WIFI_SERIAL], "AT+CWMODE=");
+	serial_println(RbSerial[WIFI_SERIAL], tmode);
+
+	/*OK 0d0a ã ERROR 0d0aãæ¥ãã¾ã§ WiFiData[]ã«èª­ããæå®ãããã·ãªã¢ã«ãã¼ãã«åºåãã¾ã*/
+	getData(WIFI_WAIT_MSEC);
+
+	return mrb_str_new_cstr(mrb, (const char*)WiFiData);
+}
+
+/******************************************************/
+/* ã³ãã³ãå¿ç­ã®ã·ãªã¢ã«åºåè¨­å®: WiFi.sout*/
+/*  WiFi.sout( mode[,serialNumber] )*/
+/*	mode: 0:åºåããªã, 1:åºåãã*/
+/*  serialNumber: åºåå
+ã®ã·ãªã¢ã«çªå·*/
+/******************************************************/
+mrb_value mrb_wifi_Sout(mrb_state *mrb, mrb_value self)
+{
+	int mode;
+	int num = -1;
+
+	int n = mrb_get_args(mrb, "i|i", &mode, &num);
+
+	if (mode == 0) {
+		WiFiRecvOutlNum = -1;
+	}
+	else {
+		if (n >= 2) {
+			if (num >= 0) {
+				WiFiRecvOutlNum = num;
+			}
+		}
+	}
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ATã³ãã³ãã®éä¿¡: WiFi.at*/
+/*  WiFi.at( command[, mode] )*/
+/*	commnad: ATã³ãã³ãå
+å®¹*/
+/*  mode: 0:'AT+'ãèªåè¿½å ããã1:'AT+'ãèªåè¿½å ããªã*/
+/******************************************************/
+mrb_value mrb_wifi_at(mrb_state *mrb, mrb_value self)
+{
+	mrb_value text;
+	int mode = 0;
+
+	int n = mrb_get_args(mrb, "S|i", &text, &mode);
+
+	char *s = RSTRING_PTR(text);
+	int len = RSTRING_LEN(text);
+
+	if (n <= 1 || mode == 0) {
+		serial_print(RbSerial[WIFI_SERIAL], "AT+");
+	}
+
+	for (int i = 0; i < 254; i++) {
+		if (i >= len) { break; }
+		WiFiData[i] = s[i];
+	}
+	WiFiData[len] = 0;
+
+	serial_println(RbSerial[WIFI_SERIAL], (const char*)WiFiData);
+	/*DEBUG_PRINT("WiFi.at",(const char*)WiFiData);*/
+
+	/*OK 0d0a ã ERROR 0d0aãæ¥ãã¾ã§ WiFiData[]ã«èª­ããæå®ãããã·ãªã¢ã«ãã¼ãã«åºåãã¾ã*/
+	getData(WIFI_WAIT_MSEC);
+
+	return mrb_str_new_cstr(mrb, (const char*)WiFiData);
+}
+
+/******************************************************/
+/* WiFiæ¥ç¶ãã¾ã: WiFi.cwjap*/
+/*  WiFi.cwjap(SSID,Passwd)*/
+/*  SSID: WiFiã®SSID*/
+/*  Passwd: ãã¹ã¯ã¼ã*/
+/******************************************************/
+mrb_value mrb_wifi_Cwjap(mrb_state *mrb, mrb_value self)
+{
+	mrb_value ssid;
+	mrb_value passwd;
+
+	mrb_get_args(mrb, "SS", &ssid, &passwd);
+
+	char *s = RSTRING_PTR(ssid);
+	int slen = RSTRING_LEN(ssid);
+
+	char *p = RSTRING_PTR(passwd);
+	int plen = RSTRING_LEN(passwd);
+
+	serial_print(RbSerial[WIFI_SERIAL], "AT+CWJAP=");
+	WiFiData[0] = 0x22;		/*-> "*/
+	WiFiData[1] = 0;
+	serial_print(RbSerial[WIFI_SERIAL], (const char*)WiFiData);
+
+	for (int i = 0; i < 254; i++) {
+		if (i >= slen) { break; }
+		WiFiData[i] = s[i];
+	}
+	WiFiData[slen] = 0;
+	serial_print(RbSerial[WIFI_SERIAL], (const char*)WiFiData);
+
+	WiFiData[0] = 0x22;		/*-> "*/
+	WiFiData[1] = 0x2C;		/*-> ,*/
+	WiFiData[2] = 0x22;		/*-> "*/
+	WiFiData[3] = 0;
+	serial_print(RbSerial[WIFI_SERIAL], (const char*)WiFiData);
+
+	for (int i = 0; i < 254; i++) {
+		if (i >= plen) { break; }
+		WiFiData[i] = p[i];
+	}
+	WiFiData[plen] = 0;
+	serial_print(RbSerial[WIFI_SERIAL], (const char*)WiFiData);
+
+	WiFiData[0] = 0x22;		/*-> "*/
+	WiFiData[1] = 0;
+	serial_println(RbSerial[WIFI_SERIAL], (const char*)WiFiData);
+
+	/*OK 0d0a ã ERROR 0d0aãæ¥ãã¾ã§ WiFiData[]ã«èª­ããæå®ãããã·ãªã¢ã«ãã¼ãã«åºåãã¾ã*/
+	getData(WIFI_WAIT_MSEC);
+
+	return mrb_str_new_cstr(mrb, (const char*)WiFiData);
+}
+
+/******************************************************/
+/* IPã¢ãã¬ã¹ã¨MACã¢ãã¬ã¹ã®è¡¨ç¤º: WiFi.cifsr*/
+/*  WiFi.cwjap()*/
+/******************************************************/
+mrb_value mrb_wifi_Cifsr(mrb_state *mrb, mrb_value self)
+{
+	serial_println(RbSerial[WIFI_SERIAL], "AT+CIFSR");
+
+	/*OK 0d0a ã ERROR 0d0aãæ¥ãã¾ã§ WiFiData[]ã«èª­ããæå®ãããã·ãªã¢ã«ãã¼ãã«åºåãã¾ã*/
+	getData(WIFI_WAIT_MSEC);
+
+	return mrb_str_new_cstr(mrb, (const char*)WiFiData);
+}
+
+/******************************************************/
+/* USBãã¼ãã¨ESP8266ãã·ãªã¢ã«ã§ç´çµãã¾ã: WiFi.bypass*/
+/*  WiFi.bypass()*/
+/* ãªã»ããããã¾ã§ãå¦çã¯æ»ãã¾ããã*/
+/******************************************************/
+mrb_value mrb_wifi_bypass(mrb_state *mrb, mrb_value self)
+{
+	int len0, len1, len;
+	int retCnt = 0;
+
+	while (true) {
+		len0 = serial_readable(RbSerial[0]);
+		len1 = serial_readable(RbSerial[WIFI_SERIAL]);
+
+		if (len0 > 0) {
+			len = len0 < 256 ? len0 : 256;
+
+			for (int i = 0; i < len; i++) {
+				WiFiData[i] = (unsigned char)serial_getc(RbSerial[0]);
+			}
+			serial_write(RbSerial[WIFI_SERIAL], WiFiData, len);
+		}
+
+		if (len1 > 0) {
+			len = len1 < 256 ? len1 : 256;
+
+			for (int i = 0; i < len; i++) {
+				WiFiData[i] = (unsigned char)serial_getc(RbSerial[WIFI_SERIAL]);
+			}
+			serial_write(RbSerial[0], WiFiData, len);
+		}
+	}
+	return mrb_nil_value();			/*æ»ãå¤ã¯ç¡ãã§ããã*/
+}
+
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+int esp8266_Init(mrb_state *mrb)
+{
+	PinName txpin, rxpin;
+
+	/*ESP8266ããã®åä¿¡ãåºåããªãã«è¨­å®*/
+	WiFiRecvOutlNum = -1;
+
+	/*CTSç¨ã«PIN15ãOUTPUTã«è¨­å®ãã¾ã*/
+	/*pinMode(get_pin(WIFI_CTS), 1);*/
+	/*digitalWrite(get_pin(WIFI_CTS), 1);*/
+
+	/*WiFiã®ã·ãªã¢ã«3ãè¨­å®*/
+	/*ã·ãªã¢ã«éä¿¡ã®åæåããã¾ã*/
+	portToPins(SCI_SCI0P2x, &txpin, &rxpin);
+	serial_init(RbSerial[WIFI_SERIAL], txpin, rxpin);
+	serial_baud(RbSerial[WIFI_SERIAL], WIFI_BAUDRATE);
+	int len;
+
+	/*åä¿¡ãããã¡ãç©ºã«ãã¾ã*/
+	while ((len = serial_readable(RbSerial[WIFI_SERIAL])) > 0) {
+		/*serial_print(RbSerial[0], len);*/
+		for (int i = 0; i < len; i++) {
+			serial_getc(RbSerial[WIFI_SERIAL]);
+		}
+	}
+
+	/*ECHOãªãã³ãã³ããéä¿¡ãã*/
+	serial_println(RbSerial[WIFI_SERIAL], "ATE0");
+
+	/*OK 0d0a ã ERROR 0d0aãæ¥ãã¾ã§ WiFiData[]ã«èª­ã*/
+	if (getData(500) == 0) {
+		return 0;
+	}
+
+	struct RClass *wifiModule = mrb_define_module(mrb, "WiFi");
+
+	mrb_define_module_function(mrb, wifiModule, "at", mrb_wifi_at, MRB_ARGS_REQ(1) | MRB_ARGS_OPT(1));
+	mrb_define_module_function(mrb, wifiModule, "sout", mrb_wifi_Sout, MRB_ARGS_REQ(1) | MRB_ARGS_OPT(1));
+	mrb_define_module_function(mrb, wifiModule, "cwmode", mrb_wifi_Cwmode, MRB_ARGS_REQ(1));
+	mrb_define_module_function(mrb, wifiModule, "cwjap", mrb_wifi_Cwjap, MRB_ARGS_REQ(2));
+	mrb_define_module_function(mrb, wifiModule, "connect", mrb_wifi_Cwjap, MRB_ARGS_REQ(2));
+	mrb_define_module_function(mrb, wifiModule, "cifsr", mrb_wifi_Cifsr, MRB_ARGS_NONE());
+	mrb_define_module_function(mrb, wifiModule, "config", mrb_wifi_Cifsr, MRB_ARGS_NONE());
+
+	mrb_define_module_function(mrb, wifiModule, "bypass", mrb_wifi_bypass, MRB_ARGS_NONE());
+
+	return 1;
+
+	/*mrb_define_module_function(mrb, pancakeModule, "clear", mrb_pancake_Clear, MRB_ARGS_REQ(1));*/
+	/*mrb_define_module_function(mrb, pancakeModule, "line", mrb_pancake_Line, MRB_ARGS_REQ(5));*/
+	/*mrb_define_module_function(mrb, pancakeModule, "circle", mrb_pancake_Circle, MRB_ARGS_REQ(4));*/
+	/*mrb_define_module_function(mrb, pancakeModule, "stamp", mrb_pancake_Stamp, MRB_ARGS_REQ(4));*/
+	/*mrb_define_module_function(mrb, pancakeModule, "stamp1", mrb_pancake_Stamp1, MRB_ARGS_REQ(4));*/
+	/*mrb_define_module_function(mrb, pancakeModule, "image", mrb_pancake_Image, MRB_ARGS_REQ(1));*/
+	/*mrb_define_module_function(mrb, pancakeModule, "video", mrb_pancake_Video, MRB_ARGS_REQ(1));*/
+	/*mrb_define_module_function(mrb, pancakeModule, "sound", mrb_pancake_Sound, MRB_ARGS_REQ(8));*/
+	/*mrb_define_module_function(mrb, pancakeModule, "sound1", mrb_pancake_Sound1, MRB_ARGS_REQ(3));*/
+	/*mrb_define_module_function(mrb, pancakeModule, "reset", mrb_pancake_Reset, MRB_ARGS_NONE());*/
+	/*mrb_define_module_function(mrb, pancakeModule, "out", mrb_pancake_Out, MRB_ARGS_REQ(1));*/
+
+	/*struct RClass *spriteModule = mrb_define_module(mrb, "Sprite");*/
+	/*mrb_define_module_function(mrb, spriteModule, "start", mrb_pancake_Start, MRB_ARGS_REQ(1));*/
+	/*mrb_define_module_function(mrb, spriteModule, "create", mrb_pancake_Create, MRB_ARGS_REQ(2));*/
+	/*mrb_define_module_function(mrb, spriteModule, "move", mrb_pancake_Move, MRB_ARGS_REQ(3));*/
+	/*mrb_define_module_function(mrb, spriteModule, "flip", mrb_pancake_Flip, MRB_ARGS_REQ(2));*/
+	/*mrb_define_module_function(mrb, spriteModule, "rotate", mrb_pancake_Rotate, MRB_ARGS_REQ(2));*/
+	/*mrb_define_module_function(mrb, spriteModule, "user", mrb_pancake_User, MRB_ARGS_REQ(3));*/
+
+	/*struct RClass *musicModule = mrb_define_module(mrb, "Music");*/
+	/*mrb_define_module_function(mrb, musicModule, "score", mrb_pancake_Score, MRB_ARGS_REQ(4));*/
+	/*mrb_define_module_function(mrb, musicModule, "play", mrb_pancake_Play, MRB_ARGS_REQ(1));*/
+}
Index: EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sWiFi.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sWiFi.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-arduino/src/sWiFi.h	(revision 270)
@@ -0,0 +1,13 @@
+/*
+ * ESP-WROOM-02é¢é£
+ *
+ * Copyright (c) 2016 Wakayama.rb Ruby Board developers
+ *
+ * This software is released under the MIT License.
+ * https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
+ *
+ */
+/******************************************************/
+/* ã©ã¤ãã©ãªãå®ç¾©ãã¾ã*/
+/******************************************************/
+int esp8266_Init(mrb_state *mrb);
Index: EcnlProtoTool/trunk/mrbgems/mruby-blockly/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-blockly/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-blockly/mrbgem.rake	(revision 270)
@@ -0,0 +1,6 @@
+MRuby::Gem::Specification.new('mruby-blockly') do |spec|
+  spec.license = 'MIT'
+  spec.authors = 'Cores Co., Ltd.'
+  spec.summary = 'Blockly helper library'
+
+end
Index: EcnlProtoTool/trunk/mrbgems/mruby-blockly/mrblib/blockly.rb
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-blockly/mrblib/blockly.rb	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-blockly/mrblib/blockly.rb	(revision 270)
@@ -0,0 +1,170 @@
+# Porting from 
+# https://github.com/jeanlazarou/blockly2ruby
+# Copyright (c) 2014 Jean Lazarou
+# MIT Lisence
+
+def blockly_puts x
+  if x.is_a?(Array)
+    puts x.join(',')
+  else
+    puts x
+  end
+end
+
+class Array
+  def find_first v
+    i = self.index(v)
+    i ? i + 1 : 0
+  end
+
+  def find_last v
+    i = self.rindex(v)
+    i ? i + 1 : 0
+  end
+
+  def numbers
+    self.delete_if {|v| !v.is_a?(Numeric)}
+  end
+
+  def sum
+    self.numbers.inject(0) {|sum, v| sum + v}
+  end
+
+  def average
+    x = self.numbers
+    x.sum / x.size.to_f
+  end
+
+  def standard_deviation
+    x = self.numbers
+    return 0 if x.empty?
+    mean = x.average
+    variance = x.map {|v| (v - mean) ** 2}.sum / x.size
+    Math.sqrt(variance)
+  end
+
+  def median
+    x = self.numbers
+    x.sort!
+    index  = x.size / 2
+    x.size.odd? ? x[index] : ((x[index - 1] + x[index]) / 2.0)
+  end
+end
+
+class String
+  def find_first v
+    i = self.index(v)
+    i ? i + 1 : 0
+  end
+
+  def find_last v
+    i = self.rindex(v)
+    i ? i + 1 : 0
+  end
+end
+
+class Float
+  def even?
+    false
+  end
+
+  def odd?
+    false
+  end
+end
+
+def colour_random()
+  '#%06x' % rand(2**24 - 1)
+end
+
+def colour_rgb(r, g, b)
+  r = (2.55 * [100, [0, r].max].min).round
+  g = (2.55 * [100, [0, g].max].min).round
+  b = (2.55 * [100, [0, b].max].min).round
+  '#%02x%02x%02x' % [r, g, b]
+end
+
+def colour_blend(colour1, colour2, ratio)
+  _, r1, g1, b1 = colour1.unpack('A1A2A2A2').map {|x| x.to_i(16)}
+  _, r2, g2, b2 = colour2.unpack('A1A2A2A2').map {|x| x.to_i(16)}
+  ratio = [1, [0, ratio].max].min
+  r = (r1 * (1 - ratio) + r2 * ratio).round
+  g = (g1 * (1 - ratio) + g2 * ratio).round
+  b = (b1 * (1 - ratio) + b2 * ratio).round
+  '#%02x%02x%02x' % [r, g, b]
+end
+
+def lists_random_item(myList)
+  myList[rand(myList.size)]
+end
+
+def lists_remove_random_item(myList)
+  myList.delete_at(rand(myList.size))
+end
+
+def lists_sublist(myList, range)
+  myList[range] || []
+end
+
+def lists_insert_random_item(myList, value)
+  myList.insert(rand(myList.size), value)
+end
+
+def lists_set_random_item(myList, value)
+  myList[rand(myList.size)] = value
+end
+
+# loops though all numbers from +params[:from]+ to +params[:to]+ by the step
+# value +params[:by]+ and calls the given block passing the numbers
+def for_loop params
+  from = params[:from] #.to_f
+  to = params[:to] #.to_f
+  by = params[:by].abs #.to_f
+
+  from.step(to, (from > to) ? -1 * by : by) do |value|
+    yield value
+  end
+end
+
+def is_prime n
+  return false if n < 0
+  (2..Math.sqrt(n)).each { |i| return false if n % i == 0}
+  true
+end
+
+def math_modes(some_list)
+  groups = some_list.group_by{|v| v}
+  groups = groups.sort {|a,b| b[1].size <=> a[1].size}
+  max_size = groups[0][1].size
+  modes = []
+
+  groups.each do |group|
+    break if group[1].size != max_size
+    modes << group[0]
+  end
+
+  modes
+end
+
+def text_get_from_start(text, index)
+  return "" if index < 0
+  text[index] || ""
+end
+
+def text_get_from_end(text, index)
+  return "" if index < 0
+  text[-index-1] || ""
+end
+
+def text_random_letter(text)
+  text[rand(text.size)]
+end
+
+def text_to_title_case(str)
+  str.gsub(/\S+/) {|txt| txt.capitalize}
+end
+
+def text_prompt(msg)
+  print(msg)
+  $stdin.gets
+end
Index: EcnlProtoTool/trunk/mrbgems/mruby-ecnl/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-ecnl/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-ecnl/mrbgem.rake	(revision 270)
@@ -0,0 +1,7 @@
+MRuby::Gem::Specification.new('mruby-ecnl') do |spec|
+  spec.license = 'TOPPERS License'
+  spec.author  = 'Cores Co., Ltd.'
+  spec.summary = 'ECHONET Lite communication middleware'
+
+  spec.cc.defines << %w(ECHONET_CONTROLLER_EXTENTION)
+end
Index: EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet.c	(revision 270)
@@ -0,0 +1,770 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2014-2016 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ */
+
+#include <mruby.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "echonet.h"
+#include "echonet_fbs.h"
+#include "echonet_task.h"
+#include "echonet_dbg.h"
+#include "echonet_agent.h"
+#include "mrb_ecnl.h"
+
+/*
+ * ECHONET Liteãµã¼ãã¹å¦çéå§
+ */
+ER ecn_sta_svc(ecnl_svc_task_t *svc)
+{
+	_ecn_tsk_int_startup(svc);
+
+	return E_OK;
+}
+
+/*
+ * ECHONETãªãã¸ã§ã¯ãåç
+§
+ * å¼æ°
+ * ID		fa_eobjid	ECHONETãªãã¸ã§ã¯ãID
+ * T_REOBJ	*fp_eobj	ECHONETãªãã¸ã§ã¯ãã®è¨­å®å
+å®¹ã³ãã¼å
+
+ *
+ * eobjidã§æå®ããECHONETãªãã¸ã§ã¯ãã®è¨­å®å
+å®¹ãåç
+§ããã
+ * åç
+§ããè¨­å®å
+å®¹ã¯pk_eobjã«æå®ããã¡ã¢ãªã«è¿ãããã
+ */
+ER ecn_ref_eobj(ecnl_svc_task_t *svc, ID fa_eobjid, T_REOBJ *fp_eobj)
+{
+	const EOBJINIB	*p_obj;
+
+	if (!fp_eobj)
+		return E_PAR;	/* ãã©ã¡ã¼ã¿ã¨ã©ã¼ */
+
+	if ((fa_eobjid <= 0) || (fa_eobjid > svc->tmax_eobjid))
+		return E_OBJ;	/* ãªãã¸ã§ã¯ãæªç»é² */
+
+	p_obj = echonet_svctask_get_eobjinib(svc, fa_eobjid);
+
+	*fp_eobj = *p_obj;
+
+	return E_OK;
+}
+
+/*
+ * ECHONETãã­ããã£åç
+§
+ * å¼æ°
+ * ID			fa_eobjid	ECHONETãªãã¸ã§ã¯ãID
+ * uint8_t		fa_epc		ãã­ããã£ã³ã¼ã
+ * T_RPRP		*fp_eprp	ECHONETãªãã¸ã§ã¯ãã®ãã­ããã£è¨­å®å
+å®¹ã³ãã¼å
+
+ *
+ * eobjidã§æå®ããECHONETãªãã¸ã§ã¯ãã®ãepcã§æå®ãããã­ããã£ã®è¨­å®å
+å®¹ãåç
+§ããã
+ * åç
+§ããè¨­å®å
+å®¹ã¯pk_eprpã«æå®ããã¡ã¢ãªã«è¿ãããã
+ */
+ER ecn_ref_eprp(ecnl_svc_task_t *svc, ID fa_eobjid, uint8_t fa_epc, T_RPRP *fp_eprp)
+{
+	const EOBJINIB *p_obj;
+	const EPRPINIB **p;
+	uint_t i;
+
+	if (!fp_eprp)
+		return E_PAR;	/* ãã©ã¡ã¼ã¿ã¨ã©ã¼ */
+
+	if ((fa_eobjid <= 0) || (fa_eobjid > svc->tmax_eobjid))
+		return E_OBJ;	/* ãªãã¸ã§ã¯ãæªç»é² */
+
+	p_obj = svc->eobjinib_table[fa_eobjid - 1];
+
+	/* eojã®æã¤ãã­ããã£åæåå®ç¾©é
+åããæ¤ç´¢ */
+	p = p_obj->eprp;
+	for (i = 0; i < p_obj->eprpcnt; i++, p++) {
+		if ((*p)->eprpcd != fa_epc)
+			continue;
+		*fp_eprp = **p;
+		return E_OK;
+	}
+
+	return E_PAR;	/* ãã©ã¡ã¼ã¿ã¨ã©ã¼ */
+}
+
+/*
+ * ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­ä¸è¦ï¼é»æä½æ
+ * å¼æ°
+ * T_EDATA			**ppk_esv	åå¾ããé»æã®æ ¼ç´å
+
+ * ID				fa_deoj		å®å
+ã®ECHONETãªãã¸ã§ã¯ãID
+ * uint8_t			fa_epc		ãã­ããã£ã³ã¼ã
+ * uint8_t			fa_pdc		ãã­ããã£å¤ãã¼ã¿ãµã¤ãº
+ * const void		*p_edt		ãã­ããã£å¤ãã¼ã¿
+ *
+ *	ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­ä¸è¦ï¼é»æãä½æããã
+ *	é»æã¯deojã§æå®ããECHONETãªãã¸ã§ã¯ããå®å
+ã¨ãã
+ *	é»æã®åãã®ãã­ããã£å¤ã¨ãã¦ãepcã¨pdcãp_edtã§æå®ããã
+ *	ãã­ããã£ã³ã¼ãããã¼ã¿ãµã¤ãºããã¼ã¿ãé»æã«è¨­å®ããã
+ *	ä½æããé»æã®å
+é ­ã¢ãã¬ã¹ã¯ãã¤ã³ã¿çµç±ã§è¿ãããã
+ */
+ER ecn_esv_seti(ecnl_svc_task_t *svc, T_EDATA **ppk_esv, ID fa_deoj, uint8_t fa_epc, uint8_t fa_pdc,
+	const void *p_edt)
+{
+	return _ecn_tsk_mk_esv(svc, (ECN_FBS_ID *)ppk_esv, (ID)1, fa_deoj, fa_epc, fa_pdc, p_edt, ESV_SET_I);
+}
+
+/*
+ * ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­è¦ï¼é»æä½æ
+ * å¼æ°
+ * T_EDATA			**ppk_esv	åå¾ããé»æã®æ ¼ç´å
+
+ * ID				fa_deoj		å®å
+ã®ECHONETãªãã¸ã§ã¯ãID
+ * uint8_t			fa_epc		ãã­ããã£ã³ã¼ã
+ * uint8_t			fa_pdc		ãã­ããã£å¤ãã¼ã¿ãµã¤ãº
+ * const void		*p_edt		ãã­ããã£å¤ãã¼ã¿
+ *
+ *	ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­è¦ï¼é»æãä½æããã
+ *	é»æã¯deojã§æå®ããECHONETãªãã¸ã§ã¯ããå®å
+ã¨ãã
+ *	é»æã®åãã®ãã­ããã£å¤ã¨ãã¦ãepcã¨pdcãp_edtã§æå®ããã
+ *	ãã­ããã£ã³ã¼ãããã¼ã¿ãµã¤ãºããã¼ã¿ãé»æã«è¨­å®ããã
+ *	ä½æããé»æã®å
+é ­ã¢ãã¬ã¹ã¯ãã¤ã³ã¿çµç±ã§è¿ãããã
+ */
+ER ecn_esv_setc(ecnl_svc_task_t *svc, T_EDATA **ppk_esv, ID fa_deoj, uint8_t fa_epc, uint8_t fa_pdc,
+	const void *p_edt)
+{
+	return _ecn_tsk_mk_esv(svc, (ECN_FBS_ID *)ppk_esv, (ID)1, fa_deoj, fa_epc, fa_pdc, p_edt, ESV_SET_C);
+}
+
+/*
+ * ãã­ããã£å¤èª­ã¿åºãè¦æ±é»æä½æ
+ * å¼æ°
+ * T_EDATA			**ppk_esv	åå¾ããé»æã®æ ¼ç´å
+
+ * ID				fa_deoj		å®å
+ã®ECHONETãªãã¸ã§ã¯ãID
+ * uint8_t			fa_epc		ãã­ããã£ã³ã¼ã
+ *
+ * ãã­ããã£å¤èª­ã¿åºãè¦æ±é»æãä½æããã
+ * é»æã¯deojã§æå®ããECHONETãªãã¸ã§ã¯ããå®å
+ã¨ãã
+ * é»æã®åãã®ãã­ããã£å¤ã¨ãã¦ãepcã§æå®ããã
+ * ãã­ããã£ã³ã¼ããé»æã«è¨­å®ããã
+ * ä½æããé»æã®å
+é ­ã¢ãã¬ã¹ã¯ãã¤ã³ã¿çµç±ã§è¿ãããã
+ */
+ER ecn_esv_get(ecnl_svc_task_t *svc, T_EDATA **ppk_esv, ID fa_deoj, uint8_t fa_epc)
+{
+	return _ecn_tsk_mk_esv(svc, (ECN_FBS_ID *)ppk_esv, (ID)1, fa_deoj, fa_epc, 0, NULL, ESV_GET);
+}
+
+/*
+ * ãã­ããã£å¤éç¥è¦æ±é»æä½æ
+ * å¼æ°
+ * T_EDATA			**ppk_esv	åå¾ããé»æã®æ ¼ç´å
+
+ * ID				fa_deoj		å®å
+ã®ECHONETãªãã¸ã§ã¯ãID
+ * uint8_t			fa_epc		ãã­ããã£ã³ã¼ã
+ *
+ * ãã­ããã£å¤éç¥è¦æ±é»æãä½æããã
+ * é»æã¯deojã§æå®ããECHONETãªãã¸ã§ã¯ããå®å
+ã¨ãã
+ * é»æã®åãã®ãã­ããã£å¤ã¨ãã¦ãepcã§æå®ããã
+ * ãã­ããã£ã³ã¼ããé»æã«è¨­å®ããã
+ * ä½æããé»æã®å
+é ­ã¢ãã¬ã¹ã¯ãã¤ã³ã¿çµç±ã§è¿ãããã
+ */
+ER ecn_esv_inf_req(ecnl_svc_task_t *svc, T_EDATA **ppk_esv, ID fa_deoj, uint8_t fa_epc)
+{
+	return _ecn_tsk_mk_esv(svc, (ECN_FBS_ID *)ppk_esv, (ID)1, fa_deoj, fa_epc, 0, NULL, ESV_INF_REQ);
+}
+
+/*
+ * ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ±é»æä½æ
+ * å¼æ°
+ * T_EDATA			**ppk_esv	åå¾ããé»æã®æ ¼ç´å
+
+ * ID				fa_deoj		å®å
+ã®ECHONETãªãã¸ã§ã¯ãID
+ * uint8_t			fa_epc		ãã­ããã£ã³ã¼ã
+ * uint8_t			fa_pdc		ãã­ããã£å¤ãã¼ã¿ãµã¤ãº
+ * const void		*p_edt		ãã­ããã£å¤ãã¼ã¿
+ *
+ * ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ±é»æãä½æããã
+ * é»æã¯deojã§æå®ããECHONETãªãã¸ã§ã¯ããå®å
+ã¨ãã
+ * é»æã®åãã®ãã­ããã£å¤ã¨ãã¦ãepcã¨pdcãp_edtã§æå®ããã
+ * ãã­ããã£ã³ã¼ãããã¼ã¿ãµã¤ãºããã¼ã¿ãé»æã«è¨­å®ããã
+ * ä½æããé»æã®å
+é ­ã¢ãã¬ã¹ã¯ãã¤ã³ã¿çµç±ã§è¿ãããã
+ */
+ER ecn_esv_set_get(ecnl_svc_task_t *svc, T_EDATA **ppk_esv, ID fa_deoj, uint8_t fa_epc, uint8_t fa_pdc,
+	const void *p_edt)
+{
+	return _ecn_tsk_mk_esv(svc, (ECN_FBS_ID *)ppk_esv, (ID)1, fa_deoj, fa_epc, fa_pdc, p_edt, ESV_SET_GET);
+}
+
+/*
+ * ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ±é»æä½æï¼æãè¿ãæå®
+ * ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ±é»æä½æä¸­ã®ãæ¸ãè¾¼ã¿ãã­ããã£é
+åãçµãã¦
+ * èª­ã¿åºããã­ããã£é
+åã«ç§»ãæã«ç¨ããã
+ */
+ER ecn_trn_set_get(mrb_state *mrb, T_EDATA *ppk_esv, int *p_trn_pos)
+{
+	ER	a_ret;
+
+	if (!ppk_esv)
+		return E_PAR;
+	if (!p_trn_pos)
+		return E_PAR;
+
+	/* ãã­ããã£èª­ã¿è¾¼ã¿ä»¶æ°æ¸ãè¾¼ã¿æã®ãããæ
+å ±ãè¨é² */
+	*p_trn_pos = _ecn_fbs_get_datalen(*(ECN_FBS_ID *)&ppk_esv);
+
+	/* å¿ç­é»æç¨ã¡ã¢ãªã«ãã¼ã¿è¿½å ã»ãã®æç¹ã§ã®å¿ç­é»æä¸­ãã­ããã£ä»¶æ°ãè¨é² */
+	a_ret = _ecn_fbs_add_data_ex(mrb, *(ECN_FBS_ID *)&ppk_esv, &ppk_esv->hdr.edata.opc, 1);
+	if (a_ret) {
+		ECN_DBG_PUT_2("ecn_trn_set_get(): _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
+		return a_ret;
+	}
+
+	/* å¿ç­é»æä¸­ãã­ããã£ä»¶æ°ã 0 ã«æ»ãï¼ä»å¾ãçµäºæå®ããã¾ã§ã¯èª­ã¿åºããã­ããã£ä»¶æ°ã«ãªãï¼ */
+	ppk_esv->hdr.edata.opc = 0;
+
+	return E_OK;
+}
+
+/*
+ * ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ±é»æä½æï¼çµäºæå®
+ * ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ±é»æä½æä¸­ã®ãèª­ã¿åºããã­ããã£é
+åãçµããæã«ç¨ããã
+ */
+ER ecn_end_set_get(mrb_state *mrb, T_EDATA *ppk_esv, int fa_trn_pos)
+{
+	ER		a_ret;
+	int		a_wr_opc;
+	uint8_t	a_rd_opc;
+
+	if (!ppk_esv)
+		return E_PAR;
+
+	/* ãã®æç¹ã§ã®å¿ç­é»æä¸­ãã­ããã£ä»¶æ°(èª­ã¿åºããã­ããã£ä»¶æ°)ãä¿æ */
+	a_rd_opc = ppk_esv->hdr.edata.opc;
+
+	/* å¿ç­é»æä¸­ãã­ããã£ä»¶æ°(æ¸ãè¾¼ã¿ãã­ããã£ä»¶æ°)ãä¿å­ä½ç½®ããèª­ã¿åã */
+	a_wr_opc = _ecn_fbs_peek(mrb, *(ECN_FBS_ID *)&ppk_esv, fa_trn_pos);
+	if (a_wr_opc < 0) {
+		ECN_DBG_PUT_2("ecn_end_set_get(): _ecn_fbs_peek() result = %d:%s", a_wr_opc, itron_strerror(a_wr_opc));
+		return a_wr_opc;
+	}
+
+	/* å¿ç­é»æä¸­ãã­ããã£ä»¶æ°(æ¸ãè¾¼ã¿ãã­ããã£ä»¶æ°)ãå¾©å
+ */
+	ppk_esv->hdr.edata.opc = (uint8_t)a_wr_opc;
+
+	/* å¿ç­é»æä¸­ãã­ããã£ä»¶æ°(èª­ã¿åºããã­ããã£ä»¶æ°)ãä¿å­ä½ç½®ã«æ¸ãè¾¼ã¿ */
+	a_ret = _ecn_fbs_poke(mrb, *(ECN_FBS_ID *)&ppk_esv, fa_trn_pos, a_rd_opc);
+	if (a_ret) {
+		ECN_DBG_PUT_2("ecn_end_set_get(): _ecn_fbs_poke() result = %d:%s", a_ret, itron_strerror(a_ret));
+		return a_ret;
+	}
+
+	return E_OK;
+}
+
+/*
+ * ãã­ããã£å¤éç¥ï¼å¿ç­è¦ï¼é»æä½æ
+ * å¼æ°
+ * T_EDATA			**ppk_esv	åå¾ããé»æã®æ ¼ç´å
+
+ * ID				fa_deoj		å®å
+ã®ECHONETãªãã¸ã§ã¯ãID
+ * ID				fa_seoj		éä¿¡å
+ã®ECHONETãªãã¸ã§ã¯ãID
+ * uint8_t			fa_sepc		éä¿¡å
+ã®ãã­ããã£ã³ã¼ã
+ */
+ER ecn_esv_infc(ecnl_svc_task_t *svc, T_EDATA **ppk_esv, ID fa_deoj, ID fa_seoj, uint8_t fa_sepc)
+{
+	return _ecn_tsk_mk_esv(svc, (ECN_FBS_ID *)ppk_esv, fa_seoj, fa_deoj, fa_sepc, 0, NULL, ESV_INFC);
+}
+
+/*
+ * è¦æ±é»æã¸ã®ãã­ããã£æå®è¿½å  (ãã­ããã£ãã¼ã¿ãä»éããªãå ´åã«ç¨ãã)
+ */
+ER ecn_add_epc(mrb_state *mrb, T_EDATA *pk_esv, uint8_t epc)
+{
+	return ecn_add_edt(mrb, pk_esv, epc, 0, 0);
+}
+
+/*
+ * è¦æ±é»æã¸ã®ãã­ããã£ãã¼ã¿è¿½å  (ãã­ããã£ããã³ä»éãã¼ã¿ãè¿½å ãã)
+ */
+ER ecn_add_edt(mrb_state *mrb, T_EDATA *pk_esv, uint8_t fa_epc, uint8_t fa_pdc, const void *p_edt)
+{
+	ECN_FBS_ID	a_fbs_id;
+	ER			a_ret;
+	T_ECN_PRP	a_ecn_prp;
+
+	if (!pk_esv)
+		return E_PAR; /* åå¾ããFBS_IDã®æ ¼ç´å
+ãNULL */
+	if (ECHONET_MEMPOOL_BLOCK_SIZE <= fa_pdc)
+		return E_PAR; /* ãã­ããã£å¤ãµã¤ãºãå¤§ãããã */
+	if (!p_edt && 0 < fa_pdc)
+		return E_PAR; /* ãã­ããã£å¤ãµã¤ãºã1ä»¥ä¸ãªã®ã«ãã¼ã¿ãã¤ã³ã¿ãNULL */
+
+	a_fbs_id.ptr = (T_ECN_FST_BLK *)pk_esv;
+	if (((T_EDATA *)a_fbs_id.ptr)->hdr.edata.opc == 0xFF)
+		return E_PAR; /* ãã­ããã£ãå¤ããã */
+
+	/* è¦æ±é»æç¨ã¡ã¢ãªã«ãã¼ã¿è¿½å  */
+	memset(&a_ecn_prp, 0, sizeof(a_ecn_prp));
+	a_ecn_prp.epc = fa_epc;
+	a_ecn_prp.pdc = fa_pdc;
+	a_ret = _ecn_fbs_add_data_ex(mrb, a_fbs_id, &a_ecn_prp, sizeof(a_ecn_prp));
+	if (a_ret) {
+		ECN_DBG_PUT_4("ecn_add_edt(): _ecn_fbs_add_data_ex(*, ecn_prp{epc:0x%02X}, %u) result = %d:%s",
+			a_ecn_prp.epc, sizeof(a_ecn_prp), a_ret, itron_strerror(a_ret));
+		goto lb_except;
+	}
+	if (0 < fa_pdc) {
+		/* ä»éãã¼ã¿è¿½å  */
+		a_ret = _ecn_fbs_add_data_ex(mrb, a_fbs_id, p_edt, fa_pdc);
+		if (a_ret) {
+			ECN_DBG_PUT_4("ecn_add_edt(): _ecn_fbs_add_data_ex(*, ecn_prp{epc:0x%02X} edt, %u) result = %d:%s",
+				a_ecn_prp.epc, fa_pdc, a_ret, itron_strerror(a_ret));
+			goto lb_except;
+		}
+	}
+	/* ãã­ããã£æ°ã¤ã³ã¯ãªã¡ã³ã */
+	((T_EDATA *)a_fbs_id.ptr)->hdr.edata.opc++;
+
+lb_except:
+	return a_ret;
+}
+
+/*
+ * è¦æ±é»æã®éä¿¡
+ * esvã§æå®ãããè¦æ±é»æãéä¿¡ããã
+ * é»æã«æå®ãããå®å
+ããéä¿¡ã¬ã¤ã¤ã¼ã¢ãã¬ã¹ãç¹å®ããUDPãã±ããã¨ãã¦éä¿¡ããã
+ */
+ER ecn_snd_esv(ecnl_svc_task_t *svc, T_EDATA *pk_esv)
+{
+	ECN_FBS_ID a_rsp_fbs;
+	a_rsp_fbs.ptr = (T_ECN_FST_BLK *)pk_esv;
+	return _ecn_tsk_snd_mbx(svc, a_rsp_fbs, true);
+}
+
+/*
+ * å¿ç­é»æã®åä¿¡ãã¼ãªã³ã°
+ * å¿ç­é»æãåä¿¡ããã®ãå¾
+ã¤ã
+ * åä¿¡ããå¿ç­é»æã¯ppk_esvã§æå®ãããã¤ã³ã¿ã¼ã«å
+é ­ã¢ãã¬ã¹ãè¿ãããã
+ * å¿ç­é»æã®åä¿¡ã®æç¡ã«ããããããå¾
+ããã«é¢æ°ãæããã
+ */
+ER ecn_prcv_esv(ecnl_svc_task_t *svc, T_EDATA **ppk_esv)
+{
+	T_ECN_FST_BLK *p_msg = NULL;
+	ER		a_ret;
+
+	if (!ppk_esv)
+		return E_PAR;
+
+	a_ret = ecn_fbs_dequeue(&svc->api_mbxid, &p_msg);
+	if (a_ret != E_OK) {
+		*ppk_esv = NULL;
+		return a_ret;
+	}
+
+	*ppk_esv = (T_EDATA *)p_msg;
+	return ((p_msg)->hdr.type == ECN_MSG_ECHONET) ? E_OK : E_BRK;
+}
+
+/*
+ * å¿ç­é»æã®ç ´æ£
+ */
+ER ecn_rel_esv(mrb_state *mrb, T_EDATA *pk_esv)
+{
+	ECN_FBS_ID	a_fbs;
+	ER			a_ret;
+
+	a_fbs.ptr = (T_ECN_FST_BLK *)pk_esv;
+	a_ret = _ecn_fbs_del(mrb, a_fbs);
+	return a_ret;
+}
+
+/*
+ * å¿ç­é»æã®éä¿¡å
+ãã¼ããåå¾ãã
+ */
+ID ecn_get_enod(ecnl_svc_task_t *svc, T_EDATA *pk_esv)
+{
+	const EOBJCB	*p_snod;
+	const EOBJINIB	*p_sobj = NULL;
+
+	p_snod = _ecn_eno_fnd(svc, ((T_ECN_FST_BLK *)pk_esv)->hdr.sender.id);
+	if (p_snod != NULL) {
+		p_sobj = p_snod->profile;
+	}
+
+	if (p_sobj == NULL)
+		return EOBJ_NULL;
+#ifdef ECHONET_CONTROLLER_EXTENTION
+	if (p_sobj->eprpcnt == 0)
+		return ecn_agent_get_eobj(p_sobj);
+#endif
+	return echonet_svctask_get_eobjid(svc, p_sobj);
+}
+
+/*
+ * å¿ç­é»æã®éä¿¡å
+æ©å¨ãªãã¸ã§ã¯ããåå¾ãã
+ */
+ID ecn_get_eobj(ecnl_svc_task_t *svc, T_EDATA *pk_esv)
+{
+	const EOBJCB	*p_snod;
+	const EOBJINIB	*p_sobj = NULL;
+	T_ECN_EDT_HDR	*p_esv;
+
+	p_esv = &pk_esv->hdr;
+	p_snod = _ecn_eno_fnd(svc, ((T_ECN_FST_BLK *)pk_esv)->hdr.sender.id);
+	if (p_snod != NULL) {
+		/* ãã¼ããã­ãã¡ã¤ã«ã®å ´å */
+		if ((p_esv->edata.seoj.eojx1 == EOJ_X1_PROFILE)
+			&& (p_esv->edata.seoj.eojx2 == EOJ_X2_NODE_PROFILE)) {
+			p_sobj = p_snod->profile;
+		}
+		/* æ©å¨ãªãã¸ã§ã¯ãã®å ´å */
+		else {
+			p_sobj = _ecn_eoj_fnd(p_snod, &p_esv->edata.seoj);
+		}
+	}
+
+	if (p_sobj == NULL)
+		return EOBJ_NULL;
+#ifdef ECHONET_CONTROLLER_EXTENTION
+	if (p_sobj->eprpcnt == 0)
+		return ecn_agent_get_eobj(p_sobj);
+#endif
+	return echonet_svctask_get_eobjid(svc, p_sobj);
+}
+
+/*
+ * å¿ç­é»æè§£æã¤ãã¬ã¼ã¿ã¼åæå
+ */
+ER ecn_itr_ini(T_ENUM_EPC *pk_itr, T_EDATA *pk_esv)
+{
+	if (!pk_itr)
+		return E_PAR;
+	if (!pk_esv)
+		return E_PAR;
+
+	memset(pk_itr, 0, sizeof(*pk_itr));
+	pk_itr->pk_esv = pk_esv;
+	pk_itr->count = pk_esv->hdr.edata.opc;
+								/* ä»ã®ãã­ãã¯ã§ã®ãã­ããã£ç·æ° */
+	pk_itr->got_ct = 0;			/* ä»ã®ãã­ãã¯ã§ãèª­ã¿åã£ãæ° */
+	pk_itr->next_blk_ct = 0;	/* å¾ç¶ãã­ãã¯æ° */
+	pk_itr->is_eof = 0;			/* çµç«¯ã«éããæãé0 */
+	pk_itr->cur = offsetof(T_ECN_EDT_HDR, ecn_prp);
+
+	switch (pk_esv->hdr.edata.esv) {
+	case ESV_SET_GET:		/* 0x6E ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ±		*/
+	case ESV_SET_GET_RES:	/* 0x7E ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãå¿ç­		*/
+	case ESV_SET_GET_SNA:	/* 0x5E	ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãä¸å¯å¿ç­	*/
+		pk_itr->next_blk_ct ++;
+	default:
+		break;
+	}
+
+	return E_OK;
+}
+
+/*
+ * å¿ç­é»æè§£æã¤ãã¬ã¼ã¿ã¼ã¤ã³ã¯ãªã¡ã³ã
+ */
+ER ecn_itr_nxt(mrb_state *mrb, T_ENUM_EPC *pk_itr, uint8_t *p_epc, uint8_t *p_pdc, void *p_edt)
+{
+	ECN_FBS_ID		a_fbs_id;
+	int				a_rd_bak;
+	ER				a_ret;
+	ECN_FBS_SSIZE_T	a_rd_len;
+	T_ECN_PRP		a_ecn_prp;
+
+	if (!pk_itr)
+		return E_PAR;
+	if (!p_epc)
+		return E_PAR;
+	if (!p_pdc)
+		return E_PAR;
+	if (!pk_itr->pk_esv)
+		return E_PAR;
+
+	if (pk_itr->is_eof)
+		return E_BOVR; /* ãã¼ã¿çµäº */
+	if (pk_itr->count <= pk_itr->got_ct && pk_itr->next_blk_ct < 1) {
+		pk_itr->is_eof = 1;			/* çµç«¯ã«éããæãé0 */
+		return E_BOVR; /* ãã¼ã¿çµäº */
+	}
+
+	a_fbs_id.ptr = (T_ECN_FST_BLK *)pk_itr->pk_esv;
+
+	/* å
+ã®ã«ã¼ã½ã«ä½ç½®ãä¿å­ããã¤ãã¬ã¼ã¿ã®ã«ã¼ã½ã«ä½ç½®ã«ãã */
+	a_rd_bak = a_fbs_id.ptr->hdr.rd;
+	a_fbs_id.ptr->hdr.rd = pk_itr->cur;
+
+#ifdef ECN_ENA_ITR_NXT_CARP
+	ECN_CAP_PUT_2("ecn_itr_nxt() rd.cur=b%dp%d", pk_itr->cur.blk, pk_itr->cur.pos ECN_CAP_PUT_2(;
+#endif
+	if (pk_itr->count <= pk_itr->got_ct && 0 < pk_itr->next_blk_ct) {
+		/* æ¬¡ãã­ãã¯ã«ç§»å */
+		pk_itr->next_blk_ct --;
+		pk_itr->count = 0;		/* ä»ã®ãã­ãã¯ã§ã®ãã­ããã£ç·æ° */
+		pk_itr->got_ct = 0;		/* ä»ã®ãã­ãã¯ã§ãèª­ã¿åã£ãæ° */
+
+		/* æ¬¡ãã­ãã¯ã®ãã­ããã£æ°ãèª­ã¿åã */
+		a_rd_len = 0;
+		a_ret = _ecn_fbs_get_data(mrb, a_fbs_id, &a_ecn_prp.pdc, 1, &a_rd_len);
+		if (a_ret != E_OK)
+			goto lb_except;
+		if (0 < a_rd_len) {
+			pk_itr->count = a_ecn_prp.pdc;	/* ä»ã®ãã­ãã¯ã§ã®ãã­ããã£ç·æ° */
+		}
+		a_ret = E_BOVR;	/* ãã¼ã¿çµäº */
+		goto lb_finally;
+	}
+
+	/* ãã­ããã£ã³ã¼ãã¨ãã¼ã¿ãµã¤ãºãèª­ã¿åã */
+	memset(&a_ecn_prp, 0, sizeof(a_ecn_prp));
+	a_rd_len = 0;
+	a_ret = _ecn_fbs_get_data(mrb, a_fbs_id, &a_ecn_prp, sizeof(a_ecn_prp), &a_rd_len);
+	if (a_ret != E_OK)
+		goto lb_except;
+	if (a_rd_len < sizeof(a_ecn_prp)) {
+		ECN_DBG_PUT_1("ecn_itr_nxt() ecn_prp read fault. rd.cur=%d", pk_itr->cur);
+		pk_itr->is_eof = 1;			/* çµç«¯ã«éããæãé0 */
+		a_ret = E_BOVR;	/* ãã¼ã¿çµäº */
+		goto lb_finally;
+	}
+	*p_epc = a_ecn_prp.epc;
+	*p_pdc = a_ecn_prp.pdc;
+
+	if (0 < a_ecn_prp.pdc) {
+		if (p_edt == NULL) {
+			a_ret = _ecn_fbs_seek_rpos(a_fbs_id, a_ecn_prp.pdc);
+			if (a_ret != E_OK)
+				goto lb_except;
+		}
+		else {
+			/* ä»éãã¼ã¿ãèª­ã¿åã */
+			a_rd_len = 0;
+			a_ret = _ecn_fbs_get_data(mrb, a_fbs_id, p_edt, a_ecn_prp.pdc, &a_rd_len);
+			if (a_ret != E_OK)
+				goto lb_except;
+			if (a_rd_len < (ECN_FBS_SSIZE_T)a_ecn_prp.pdc) {
+				ECN_DBG_PUT_3("ecn_itr_nxt() edt read fault. rd.cur=%d,epc=0x%02X,pdc=%u",
+					pk_itr->cur, a_ecn_prp.epc , a_ecn_prp.pdc);
+				pk_itr->is_eof = 1;			/* çµç«¯ã«éããæãé0 */
+				a_ret = E_BOVR;	/* ãã¼ã¿çµäº */
+				goto lb_finally;
+			}
+		}
+	}
+	pk_itr->got_ct++;
+
+#ifdef ECN_ENA_ITR_NXT_CARP
+	ECN_CAP_PUT_2("ecn_itr_nxt() read: ct=%d/%d", pk_itr->got_ct, pk_itr->count ECN_CAP_PUT_2(;
+#endif
+
+lb_finally:
+	/* ã¤ãã¬ã¼ã¿ã®ã«ã¼ã½ã«ä½ç½®ãæ´æ° */
+	pk_itr->cur = a_fbs_id.ptr->hdr.rd;
+
+lb_except:
+	/* å
+ã®ã«ã¼ã½ã«ä½ç½®ã«æ»ã */
+	a_fbs_id.ptr->hdr.rd = a_rd_bak;
+	return a_ret;
+}
+
+/*
+ * å¿ç­é»æå¾
+ã¡ã®å²ãè¾¼ã¿éä¿¡
+ */
+ER ecn_brk_wai(ecnl_svc_task_t *svc, const void *p_dat, int fa_datsz)
+{
+	ER				a_ret;
+	ECN_FBS_ID		a_fbs_id = { 0 };	/* è¦æ±é»æç¨ã¡ã¢ãª	*/
+
+	/* å¿ç­é»æå¾
+ã¡ã®å²ãè¾¼ã¿é»æä½æ */
+	a_ret = _ecn_mk_brk_wai(svc, &a_fbs_id, p_dat, fa_datsz);
+	if (a_ret)
+		return a_ret;
+
+	/* å²ãè¾¼ã¿éä¿¡ */
+	a_ret = _ecn_tsk_snd_mbx(svc, a_fbs_id, true);
+	if (a_ret) {
+		ECN_DBG_PUT_2("_ecn_tsk_snd_mbx() result = %d:%s",
+			a_ret, itron_strerror(a_ret));
+		goto lb_except;
+	}
+
+	/* æ­£å¸¸çµäº */
+	return a_ret;
+
+lb_except:
+	/* ãã¼ã¿ä½æå¤±æãããé åè§£æ¾ */
+	if (a_fbs_id.ptr)
+		_ecn_fbs_del(svc->mrb, a_fbs_id);
+
+	return a_ret;
+}
+
+/*
+ * å²ãè¾¼ã¿ãã¼ã¿ã®åå¾
+ */
+ER ecn_get_brk_dat(mrb_state *mrb, T_EDATA *pk_esv, void *p_buf, int fa_bufsz, int *p_datsz)
+{
+	ECN_FBS_ID	a_fbs;
+	ER			a_ret;
+	ECN_FBS_SSIZE_T		a_len;
+
+	if (p_datsz)
+		*p_datsz = 0;
+	if (!pk_esv)
+		return E_PAR;
+
+	a_fbs.ptr = (T_ECN_FST_BLK *)pk_esv;
+	if (a_fbs.ptr->hdr.type != ECN_MSG_USER_BREAK) {
+		ECN_DBG_PUT_1("ecn_get_brk_dat: fbs-type:%d != ECN_MSG_USER_BREAK",
+			a_fbs.ptr->hdr.type);
+		return E_PAR;
+	}
+
+	/* èª­ã¿åãä½ç½®ãå
+é ­ã«æ»ã */
+	a_ret = _ecn_fbs_set_rpos(a_fbs, 0);
+	if (a_ret) {
+		ECN_DBG_PUT_2("_ecn_fbs_set_rpos(*, 0) result = %d:%s",
+			a_ret, itron_strerror(a_ret));
+		return a_ret;
+	}
+
+	/* ä»éãã¼ã¿ãèª­ã¿è¾¼ã */
+	if (p_buf && 0 < fa_bufsz) {
+		a_len = 0;
+		a_ret = _ecn_fbs_get_data(mrb, a_fbs, p_buf, fa_bufsz, &a_len);
+		if (a_ret || !a_len) {
+			ECN_DBG_PUT_2("_ecn_fbs_get_data(*, p_buf, fa_bufsz) result = %d:%s",
+				a_ret, itron_strerror(a_ret));
+			return E_PAR;
+		}
+		*p_datsz = a_len;
+	}
+
+	return E_OK;
+}
+
+#ifndef ECN_USER_DATA_PROP_SET
+/*
+ * ãã¼ã¿è¨­å®é¢æ°
+ */
+int ecn_data_prop_set(ecnl_svc_task_t *svc, const EPRPINIB *item, const void *src, int size, bool_t *anno)
+{
+	if (size > item->eprpsz)
+		size = item->eprpsz;
+
+	if (*anno)
+		*anno = memcmp((uint8_t *)item->exinf, src, size) != 0;
+
+	memcpy((uint8_t *)item->exinf, src, size);
+
+	return size;
+}
+#endif
+
+#ifndef ECN_USER_DATA_PROP_GET
+/*
+ * ãã¼ã¿åå¾é¢æ°
+ */
+int ecn_data_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size)
+{
+	if (size > item->eprpsz)
+		size = item->eprpsz;
+
+	memcpy(dst, (uint8_t *)item->exinf, size);
+
+	return size;
+}
+#endif
Index: EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet.h	(revision 270)
@@ -0,0 +1,454 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2014-2016 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ */
+
+#ifndef ECHONET_H
+#define ECHONET_H
+
+#include <stddef.h>
+#include <stdint.h>
+#include <mruby.h>
+
+#include "echonet_class.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef TOPPERS_T_STDDEF_H
+typedef char			bool_t;		/* çå½å¤ */
+
+typedef signed int		int_t;		/* èªç¶ãªãµã¤ãºã®ç¬¦å·ä»ãæ´æ° */
+typedef unsigned int	uint_t;		/* èªç¶ãªãµã¤ãºã®ç¬¦å·ç¡ãæ´æ° */
+
+typedef int_t			ER;			/* ã¨ã©ã¼ã³ã¼ã */
+typedef int_t			ID;			/* ãªãã¸ã§ã¯ãã®IDçªå· */
+typedef uint_t			ATR;		/* ãªãã¸ã§ã¯ãã®å±æ§ */
+typedef int_t			TMO;		/* ã¿ã¤ã ã¢ã¦ãæå® */
+
+#ifndef NULL
+#define NULL		0			/* ç¡å¹ãã¤ã³ã¿ */
+#endif /* NULL */
+
+#ifndef true
+#define true		1			/* ç */
+#endif /* true */
+
+#ifndef false
+#define false		0			/* å½ */
+#endif /* false */
+
+#define E_OK		0			/* æ­£å¸¸çµäº */
+
+#define E_SYS		(-5)		/* ã·ã¹ãã ã¨ã©ã¼ */
+#define E_PAR		(-17)		/* ãã©ã¡ã¼ã¿ã¨ã©ã¼ */
+#define E_NOMEM		(-33)		/* ã¡ã¢ãªä¸è¶³ */
+#define E_OBJ		(-41)		/* ãªãã¸ã§ã¯ãç¶æ
+ã¨ã©ã¼ */
+#define E_NOEXS		(-42)		/* ãªãã¸ã§ã¯ãæªçæ */
+#define E_TMOUT		(-50)		/* ãã¼ãªã³ã°å¤±æã¾ãã¯ã¿ã¤ã ã¢ã¦ã */
+#define E_BOVR		(-58)		/* ãããã¡ãªã¼ãã¼ãã­ã¼ */
+#define E_BRK		(-100)		/* ã¦ã¼ã¶ã¼ã«ããä¸­æ­ */
+
+#define TMO_FEVR	(-1)		/* æ°¸ä¹
+å¾
+ã¡ */
+#endif
+
+#define EOBJ_NULL 0x00
+#define EOBJ_LOCAL_NODE 0x01			/* èªãã¼ã */
+#define EOBJ_SYNC_REMOTE_NODE 0x02		/* ä»ãã¼ã */
+#define EOBJ_ASYNC_REMOTE_NODE 0x04		/* ä»ãã¼ãï¼éåæï¼ */
+#define EOBJ_DEVICE 0x08				/* æ©å¨ãªãã¸ã§ã¯ã */
+
+#define EPC_NONE 0x00
+#define EPC_RULE_SET 0x01				/* ã¢ã¯ã»ã¹ã«ã¼ã« Set */
+#define EPC_RULE_GET 0x02				/* ã¢ã¯ã»ã¹ã«ã¼ã« Get */
+#define EPC_RULE_ANNO 0x04				/* ã¢ã¯ã»ã¹ã«ã¼ã« Anno */
+#define EPC_ANNOUNCE 0x40				/* ç¶æ
+å¤åæéç¥ */
+#define EPC_VARIABLE 0x80				/* å¯å¤é·ãã¼ã¿ */
+
+typedef enum _echonet_enod_id
+{
+	ENOD_NOT_MATCH_ID	= -1,			/* ã¢ãã¬ã¹IDç»é²ãªã */
+	ENOD_MULTICAST_ID	= 0,			/* ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ID */
+	ENOD_LOCAL_ID		= 1,			/* èªãã¼ãã¢ãã¬ã¹ID */
+	ENOD_API_ID			= 2,			/* APIã¢ãã¬ã¹ID */
+	ENOD_REMOTE_ID		= 3,			/* ä»ãã¼ãã¢ãã¬ã¹ID */
+} ECN_ENOD_ID;
+
+/* ECHONET Liteè¦æ ¼ */
+typedef enum
+{
+	ECN_EDH1_ECHONET_LITE	=	0x10
+} ECN_EHD1_ECL_VERSION;
+
+/* é»æå½¢å¼1/2 */
+typedef enum
+{
+	ECN_EDH2_FORMAT_1 = 0x81,	/* é»æå½¢å¼1 */
+	ECN_EDH2_FORMAT_2 = 0x82	/* é»æå½¢å¼2 */
+} ECN_EHD2_FORMAT;
+
+/* ECHONET Liteãµã¼ãã¹ã³ã¼ã */
+typedef enum _echonet_service_code
+{
+	ESV_NOP				=	0,		/* (æ©è½æå®ãªã)							*/
+	ESV_SET_I			=	0x60,	/* ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­ä¸è¦ï¼		*/
+	ESV_SET_C			=	0x61,	/* ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­è¦ï¼		*/
+	ESV_GET				=	0x62,	/* ãã­ããã£å¤èª­ã¿åºãè¦æ±					*/
+	ESV_INF_REQ			=	0x63,	/* ãã­ããã£å¤éç¥è¦æ±						*/
+	ESV_SET_GET			=	0x6E,	/* ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ±		*/
+	ESV_SET_RES			=	0x71,	/* ãã­ããã£å¤æ¸ãè¾¼ã¿å¿ç­					*/
+	ESV_GET_RES			=	0x72,	/* ãã­ããã£å¤èª­ã¿åºãå¿ç­					*/
+	ESV_INF				=	0x73,	/* ãã­ããã£å¤éç¥							*/
+	ESV_INFC			=	0x74,	/* ãã­ããã£å¤éç¥ï¼å¿ç­è¦ï¼				*/
+	ESV_INFC_RES		=	0x7A,	/* ãã­ããã£å¤éç¥å¿ç­						*/
+	ESV_SET_GET_RES		=	0x7E,	/* ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãå¿ç­		*/
+	ESV_SET_I_SNA		=	0x50,	/* ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ä¸å¯å¿ç­			*/
+	ESV_SET_C_SNA		=	0x51,	/* ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ä¸å¯å¿ç­			*/
+	ESV_GET_SNA			=	0x52,	/* ãã­ããã£å¤èª­ã¿åºãä¸å¯å¿ç­				*/
+	ESV_INF_SNA			=	0x53,	/* ãã­ããã£å¤éç¥ä¸å¯å¿ç­					*/
+	ESV_SET_GET_SNA		=	0x5E	/* ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãä¸å¯å¿ç­	*/
+} ECN_SRV_CODE;
+
+#ifdef __CA850__
+#pragma pack(1)
+#elif __RX
+#pragma pack
+#elif _MSC_VER
+#pragma pack(push, 1)
+#endif
+#ifndef __GNUC__
+#define __attribute__(x)
+#endif // !__GNUC__
+
+/*
+ *  ECHONET Liteé»æãããã¼
+ */
+typedef struct
+{
+	uint8_t	ehd1;		/* ECHONET Liteé»æãããã¼1 ECN_EHD1_ECL_VERSION */
+	uint8_t	ehd2;		/* ECHONET Liteé»æãããã¼2 ECN_EHD2_FORMAT */
+	uint16_t	tid;	/* ãã©ã³ã¶ã¯ã·ã§ã³ID */
+} __attribute__((packed)) T_ECN_HDR;
+
+/*
+ *  ECHONET Liteãªãã¸ã§ã¯ãã³ã¼ã
+ */
+typedef struct
+{
+	uint8_t	eojx1;		/* ã¯ã©ã¹ã°ã«ã¼ãã³ã¼ã */
+	uint8_t	eojx2;		/* ã¯ã©ã¹ã³ã¼ã */
+	uint8_t	eojx3;		/* ã¤ã³ã¹ã¿ã³ã¹ã³ã¼ã */
+} __attribute__((packed)) T_ECN_EOJ;
+
+/*
+ *  ECHONET Liteãã¼ã¿ãããã¼
+ */
+typedef struct
+{
+	T_ECN_EOJ	seoj;	/* éä¿¡å
+ECHONET Liteãªãã¸ã§ã¯ãæå® */
+	T_ECN_EOJ	deoj;	/* ç¸æå
+ECHONET Liteãªãã¸ã§ã¯ãæå® */
+	uint8_t	esv;		/* ECHONET Liteãµã¼ãã¹ (ECN_SRV_CODE) */
+	uint8_t	opc;		/* å¦çãã­ããã£æ° */
+} __attribute__((packed)) T_ECN_EDATA_BODY;
+
+/*
+ *  ECHONET Liteãã­ããã£
+ */
+typedef struct
+{
+	uint8_t	epc;		/* ECHONET Liteãã­ããã£ã³ã¼ã */
+	uint8_t	pdc;		/* EDTã®ãã¤ãæ° */
+	/*void	*p_edt;*/	/* ãã­ããã£å¤ãã¼ã¿ */
+} __attribute__((packed)) T_ECN_PRP;
+
+/*
+ *  ECHONET Liteãã¼ã¿
+ */
+typedef struct
+{
+	T_ECN_HDR			ecn_hdr;
+	T_ECN_EDATA_BODY	edata;
+	T_ECN_PRP			ecn_prp;
+} __attribute__((packed)) T_ECN_EDT_HDR;
+
+/*
+ *  ECHONET Lite é»æ
+ */
+typedef struct echonet_object_data
+{
+	uint8_t _private1[64 - sizeof(int)];
+	int trn_pos;
+	uint8_t _private2[128];
+	T_ECN_EDT_HDR hdr;
+	uint8_t _private3[64 - sizeof(T_ECN_EDT_HDR)];
+} __attribute__((packed)) T_EDATA;
+
+#ifdef __CA850__
+#pragma pack(8)
+#elif __RX
+#pragma unpack
+#elif _MSC_VER
+#pragma pack(pop)
+#endif
+
+/*
+ *  å¿ç­é»æè§£æã¤ãã¬ã¼ã¿ã¼
+ */
+typedef struct echonet_epc_enumerator
+{
+	T_EDATA *pk_esv;
+	uint8_t count;			/* ä»èª­ã¿åãä¸­ã®ãã­ãã¯ã«ãããã­ããã£ç·æ° */
+	uint8_t got_ct;			/* ä»èª­ã¿åãä¸­ã®ãã­ãã¯ã§ãèª­ã¿åã£ãæ° */
+	uint8_t next_blk_ct;	/* å¾ç¶ãã­ãã¯æ° */
+	uint8_t is_eof;			/* çµç«¯ã«éããæãé0 */
+	int cur;
+} T_ENUM_EPC;
+
+typedef struct echonet_property_initialization_block EPRPINIB;
+
+typedef struct ecnl_svc_task ecnl_svc_task_t;
+
+/*
+ * ECHONET Lite ãã­ããã£ã®è¨­å®é¢æ°
+ */
+typedef int (EPRP_SETTER)(ecnl_svc_task_t *svc, const EPRPINIB *item, const void *src, int size, bool_t *anno);
+
+/*
+ * ECHONET Lite ãã­ããã£ã®åå¾é¢æ°
+ */
+typedef int (EPRP_GETTER)(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size);
+
+/*
+ *  ECHONET Lite ãã­ããã£åæåãã­ãã¯
+ */
+struct echonet_property_initialization_block
+{
+	uint8_t		eprpcd;			/* ECHONET Lite ãã­ããã£ã³ã¼ã */
+	ATR			eprpatr;		/* ECHONET Lite ãã­ããã£å±æ§ */
+	uint8_t		eprpsz;			/* ECHONET Lite ãã­ããã£ã®ãµã¤ãº */
+	intptr_t	exinf;			/* ECHONET Lite ãã­ããã£ã®æ¡å¼µæ
+å ± */
+	EPRP_SETTER	*eprpset;		/* ECHONET Lite ãã­ããã£ã®è¨­å®é¢æ° */
+	EPRP_GETTER	*eprpget;		/* ECHONET Lite ãã­ããã£ã®åå¾é¢æ° */
+};
+
+#define TMIN_EOBJID		1		/* ECHONET Lite ãªãã¸ã§ã¯ãIDã®æå°å¤ */
+
+/*
+ *  ECHONET Lite ãªãã¸ã§ã¯ãåæåãã­ãã¯
+ */
+typedef struct echonet_object_initialization_block
+{
+	ATR			eobjatr;		/* ECHONET Lite ãªãã¸ã§ã¯ãå±æ§ */
+	ID			enodid;			/* ECHONET Lite ãã¼ããã­ãã¡ã¤ã«ãªãã¸ã§ã¯ãID */
+	intptr_t	exinf;			/* ECHONET Lite ãªãã¸ã§ã¯ãã®æ¡å¼µæ
+å ± */
+	uint8_t		eojx1;			/* ECHONET Lite ãªãã¸ã§ã¯ãã®ã¯ã©ã¹ã°ã«ã¼ãã³ã¼ã */
+	uint8_t		eojx2;			/* ECHONET Lite ãªãã¸ã§ã¯ãã®ã¯ã©ã¹ã³ã¼ã */
+	uint8_t		eojx3;			/* ECHONET Lite ãªãã¸ã§ã¯ãã®ã¤ã³ã¹ã¿ã³ã¹ã³ã¼ã */
+	const EPRPINIB **eprp;		/* ECHONET Lite ãã­ããã£åæåãã­ãã¯ */
+	uint_t		eprpcnt;		/* ECHONET Lite ãã­ããã£åæåãã­ãã¯æ° */
+} EOBJINIB;
+
+/*
+ *  ECHONET Lite ãã¼ãç®¡çãã­ãã¯
+ */
+typedef struct echonet_object_control_block
+{
+	const EOBJINIB *profile;	/* ECHONET Lite ãã¼ããã­ãã¡ã¤ã«ã¸ã®ãã¤ã³ã¿ */
+	const EOBJINIB **eobjs;		/* ECHONET Lite ãªãã¸ã§ã¯ããªã¹ãã¸ã®ãã¤ã³ã¿ */
+	uint_t		eobjcnt;		/* ECHONET Lite ãªãã¸ã§ã¯ãæ° */
+} EOBJCB;
+
+/*
+ *  ECHONET Lite ãªãã¸ã§ã¯ãæ©è½ã®åæå
+ */
+extern void initialize_echonet_object(void);
+
+typedef EOBJINIB T_REOBJ;
+
+typedef EPRPINIB T_RPRP;
+
+/*
+ * ECHONET Liteãµã¼ãã¹å¦çéå§
+ */
+ER ecn_sta_svc(ecnl_svc_task_t *svc);
+
+/*
+ * ECHONETãªãã¸ã§ã¯ãåç
+§
+ */
+ER ecn_ref_eobj(ecnl_svc_task_t *svc, ID eobjid, T_REOBJ *pk_eobj);
+
+/*
+ * ECHONETãã­ããã£åç
+§
+ */
+ER ecn_ref_eprp(ecnl_svc_task_t *svc, ID eobjid, uint8_t epc, T_RPRP *pk_eprp);
+
+/*
+ * ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­ä¸è¦ï¼é»æä½æ
+ */
+ER ecn_esv_seti(ecnl_svc_task_t *svc, T_EDATA **ppk_esv, ID eobjid, uint8_t epc, uint8_t pdc, const void *p_edt);
+
+/*
+ * ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­è¦ï¼é»æä½æ
+ */
+ER ecn_esv_setc(ecnl_svc_task_t *svc, T_EDATA **ppk_esv, ID eobjid, uint8_t epc, uint8_t pdc, const void *p_edt);
+
+/*
+ * ãã­ããã£å¤èª­ã¿åºãè¦æ±é»æä½æ
+ */
+ER ecn_esv_get(ecnl_svc_task_t *svc, T_EDATA **ppk_esv, ID eobjid, uint8_t epc);
+
+/*
+ * ãã­ããã£å¤éç¥è¦æ±é»æä½æ
+ */
+ER ecn_esv_inf_req(ecnl_svc_task_t *svc, T_EDATA **ppk_esv, ID eobjid, uint8_t epc);
+
+/*
+ * ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ±é»æä½æ
+ */
+ER ecn_esv_set_get(ecnl_svc_task_t *svc, T_EDATA **ppk_esv, ID eobjid, uint8_t epc, uint8_t pdc, const void *p_edt);
+
+/*
+ * ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ±é»ææãè¿ãæå®
+ */
+ER ecn_trn_set_get(mrb_state *mrb, T_EDATA *pk_esv, int *p_trn_pos);
+
+/*
+ * ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ±é»æçµäºæå®
+ */
+ER ecn_end_set_get(mrb_state *mrb, T_EDATA *pk_esv, int trn_pos);
+
+/*
+ * ãã­ããã£å¤éç¥ï¼å¿ç­è¦ï¼é»æä½æ
+ */
+ER ecn_esv_infc(ecnl_svc_task_t *svc, T_EDATA **ppk_esv, ID eobjid, ID seobjid, uint8_t sepc);
+
+/*
+ * è¦æ±é»æã¸ã®ãã­ããã£æå®è¿½å 
+ */
+ER ecn_add_epc(mrb_state *mrb, T_EDATA *pk_esv, uint8_t epc);
+
+/*
+ * è¦æ±é»æã¸ã®ãã­ããã£ãã¼ã¿è¿½å 
+ */
+ER ecn_add_edt(mrb_state *mrb, T_EDATA *pk_esv, uint8_t epc, uint8_t pdc, const void *p_edt);
+
+/*
+ * è¦æ±é»æã®éä¿¡
+ */
+ER ecn_snd_esv(ecnl_svc_task_t *svc, T_EDATA *pk_esv);
+
+/*
+ * å¿ç­é»æã®åä¿¡ãã¼ãªã³ã°
+ */
+ER ecn_prcv_esv(ecnl_svc_task_t *svc, T_EDATA **ppk_esv);
+
+/*
+ * å¿ç­é»æã®ç ´æ£
+ */
+ER ecn_rel_esv(mrb_state *mrb, T_EDATA *pk_esv);
+
+/*
+ * å¿ç­é»æã®éä¿¡å
+ãã¼ããåå¾ãã
+ */
+ID ecn_get_enod(ecnl_svc_task_t *svc, T_EDATA *pk_esv);
+
+/*
+ * å¿ç­é»æã®éä¿¡å
+æ©å¨ãªãã¸ã§ã¯ããåå¾ãã
+ */
+ID ecn_get_eobj(ecnl_svc_task_t *svc, T_EDATA *pk_esv);
+
+/*
+ * å¿ç­é»æè§£æã¤ãã¬ã¼ã¿ã¼åæå
+ */
+ER ecn_itr_ini(T_ENUM_EPC *pk_itr, T_EDATA *pk_esv);
+
+/*
+ * å¿ç­é»æè§£æã¤ãã¬ã¼ã¿ã¼ã¤ã³ã¯ãªã¡ã³ã
+ */
+ER ecn_itr_nxt(mrb_state *mrb, T_ENUM_EPC *pk_itr, uint8_t *p_epc, uint8_t *p_pdc, void *p_edt);
+
+/*
+ * å¿ç­é»æå¾
+ã¡ã®å²ãè¾¼ã¿éä¿¡
+ */
+ER ecn_brk_wai(ecnl_svc_task_t *svc, const void *p_dat, int datsz);
+
+/*
+ * å²ãè¾¼ã¿ãã¼ã¿ã®åå¾
+ */
+ER ecn_get_brk_dat(mrb_state *mrb, T_EDATA *pk_esv, void *p_buf, int bufsz, int *p_datsz);
+
+/*
+ * ãã¼ã¿è¨­å®é¢æ°
+ */
+int ecn_data_prop_set(ecnl_svc_task_t *svc, const EPRPINIB *item, const void *src, int size, bool_t *anno);
+
+/*
+ * ãã¼ã¿åå¾é¢æ°
+ */
+int ecn_data_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ECHONET_H
Index: EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_agent.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_agent.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_agent.c	(revision 270)
@@ -0,0 +1,1218 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2015-2016 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *		ECHONET Lite åççæãã¼ã
+ */
+
+#include <mruby.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#ifdef _MSC_VER
+#include <assert.h>
+#endif
+#include "echonet_task.h"
+#include "echonet_dbg.h"
+
+static ER ecn_agent_proc_get_device_list(ecnl_svc_task_t *svc, ecn_agent_t *agent, ECN_FBS_ID req);
+static ER ecn_agent_proc_get_device_info(ecnl_svc_task_t *svc, ecn_agent_t *agent, ECN_FBS_ID req);
+static void ecn_node_send_set_prop_map(ecnl_svc_task_t *svc, ecn_node_agent_t *node);
+static void ecn_node_send_get_prop_map(ecnl_svc_task_t *svc, ecn_node_agent_t *node);
+static void ecn_node_send_anno_prop_map(ecnl_svc_task_t *svc, ecn_node_agent_t *node);
+static void ecn_node_timeout_on_start(ecnl_svc_task_t *svc, ecn_node_agent_t *node);
+static void ecn_node_next_proc_on_set_prpmap_wait(ecnl_svc_task_t *svc, ecn_node_agent_t *node, ecn_obj_t *sobj);
+static void ecn_node_timeout_on_set_prpmap_wait(ecnl_svc_task_t *svc, ecn_node_agent_t *node);
+static void ecn_node_next_proc_on_get_prpmap_wait(ecnl_svc_task_t *svc, ecn_node_agent_t *node, ecn_obj_t *sobj);
+static void ecn_node_timeout_on_get_prpmap_wait(ecnl_svc_task_t *svc, ecn_node_agent_t *node);
+static void ecn_node_next_proc_on_anno_prpmap_wait(ecnl_svc_task_t *svc, ecn_node_agent_t *node, ecn_obj_t *sobj);
+static void ecn_node_timeout_on_anno_prpmap_wait(ecnl_svc_task_t *svc, ecn_node_agent_t *node);
+
+int ecn_agent_eprpset(ecnl_svc_task_t *svc, const EPRPINIB *item, const void *src, int size, bool_t *anno);
+int ecn_agent_eprpget(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size);
+
+static ecn_agent_queue_t *cast_queue(ecn_obj_t *obj)
+{
+	return (ecn_agent_queue_t *)((intptr_t)obj - offsetof(ecn_agent_buffer_t, cnt.obj));
+}
+
+static ecn_obj_t *cast_obj(ecn_agent_queue_t *queue)
+{
+	return (ecn_obj_t *)((intptr_t)queue + offsetof(ecn_agent_buffer_t, cnt.obj));
+}
+
+static ecn_node_agent_t *cast_node(const EOBJCB *eobj)
+{
+	return (ecn_node_agent_t *)((intptr_t)eobj - offsetof(ecn_node_agent_t, node.eobj));
+}
+
+static ecn_obj_t *cast_obj2(const EOBJINIB *inib)
+{
+	return (ecn_obj_t *)((intptr_t)inib - offsetof(ecn_obj_t, inib));
+}
+
+static ecn_agent_t *cast_agent(const EPRPINIB *inib)
+{
+	return (ecn_agent_t *)((intptr_t)inib - offsetof(ecn_agent_t, eprpinib));
+}
+
+#define loc_cpu()
+#define unl_cpu()
+
+ER get_buf(ecn_agent_t *agent, ecn_agent_buffer_t **buf)
+{
+	ER ret = E_OK;
+
+	loc_cpu();
+
+	if (agent->blkpos < TNUM_AEOBJID) {
+		*buf = &agent->blockes[agent->blkpos++];
+	}
+	else if (agent->free == NULL) {
+		ret = E_TMOUT;
+	}
+	else{
+		*buf = agent->free;
+		agent->free = agent->free->hdr.free;
+	}
+
+	unl_cpu();
+
+	return ret;
+}
+
+ER rel_buf(ecn_agent_t *agent, ecn_agent_buffer_t *buf)
+{
+	if ((buf < &agent->blockes[0]) || (buf >= &agent->blockes[TNUM_AEOBJID]))
+		return E_PAR;
+
+	if ((((intptr_t)buf - (intptr_t)&agent->blockes[0]) % sizeof(ecn_agent_buffer_t)) != 0)
+		return E_PAR;
+
+	loc_cpu();
+
+	if (agent->free == NULL) {
+		agent->free = buf;
+		agent->free->hdr.free = NULL;
+	}
+	else {
+		ecn_agent_buffer_t *next = agent->free;
+		agent->free = buf;
+		agent->free->hdr.free = next;
+	}
+
+	unl_cpu();
+
+	return E_OK;
+}
+
+/*
+ *  ã­ã¥ã¼ã®åæå
+ *
+ *  p_queueã«ã¯ã­ã¥ã¼ããããæå®ããï¼
+ */
+static void
+ecn_agent_queue_init(ecn_agent_queue_t *p_queue)
+{
+#ifdef _DEBUG
+	p_queue->p_parent = p_queue;
+#endif
+	p_queue->p_prev = p_queue;
+	p_queue->p_next = p_queue;
+}
+
+/*
+ *  ã­ã¥ã¼ã®åã¨ã³ããªã¸ã®æ¿å
+¥
+ *
+ *  p_queueã®åã«p_entryãæ¿å
+¥ããï¼p_queueã«ã­ã¥ã¼ããããæå®ããå ´
+ *  åã«ã¯ï¼ã­ã¥ã¼ã®æ«å°¾ã«p_entryãæ¿å
+¥ãããã¨ã«ãªãï¼
+ */
+static void
+ecn_agent_queue_add(ecn_agent_queue_t *p_queue, ecn_agent_queue_t *p_entry)
+{
+#ifdef _DEBUG
+	assert((p_queue->p_parent == p_queue) && (p_entry->p_parent == NULL));
+	p_entry->p_parent = p_queue;
+#endif
+	p_entry->p_prev = p_queue->p_prev;
+	p_entry->p_next = p_queue;
+	p_queue->p_prev->p_next = p_entry;
+	p_queue->p_prev = p_entry;
+}
+
+/*
+ *  ã¨ã³ããªã®åé¤
+ *
+ *  p_entryãã­ã¥ã¼ããåé¤ããï¼
+ */
+static void
+ecn_agent_queue_remove(ecn_agent_queue_t *p_queue, ecn_agent_queue_t *p_entry)
+{
+#ifdef _DEBUG
+	assert((p_queue->p_parent == p_queue) && (p_entry->p_parent == p_queue));
+	p_entry->p_parent = NULL;
+#endif
+	p_entry->p_prev->p_next = p_entry->p_next;
+	p_entry->p_next->p_prev = p_entry->p_prev;
+}
+
+ecn_node_t *ecn_agent_find_node(ecnl_svc_task_t *svc, ECN_ENOD_ID enodid)
+{
+	ecn_agent_t *agent = &svc->agent;
+	ecn_agent_queue_t *queue = agent->nodes.p_next;
+#ifdef _DEBUG
+	assert(queue->p_parent == &agent->nodes);
+#endif
+	for (; queue != &agent->nodes; queue = queue->p_next) {
+		ecn_node_t *node = (ecn_node_t *)cast_obj(queue);
+		if(node->enodId == enodid)
+			return node;
+	}
+
+	return NULL;
+}
+
+ecn_node_agent_t *ecn_agent_find_node2(ecnl_svc_task_t *svc, const EOBJCB *pk_eobj)
+{
+	ecn_agent_t *agent = &svc->agent;
+	ecn_agent_queue_t *queue;
+
+	if(pk_eobj == NULL)
+		return NULL;
+
+	queue = agent->nodes.p_next;
+#ifdef _DEBUG
+	assert(queue->p_parent == &agent->nodes);
+#endif
+	for (; queue != &agent->nodes; queue = queue->p_next) {
+		ecn_node_agent_t *node = (ecn_node_agent_t *)cast_obj(queue);
+		if(&node->node.eobj == pk_eobj)
+			return node;
+	}
+
+	return NULL;
+}
+
+ecn_obj_t *ecn_agent_find_eobj(const EOBJCB *pk_nod, T_ECN_EOJ eoj)
+{
+	ecn_agent_queue_t *devices = &cast_node(pk_nod)->node.devices;
+	ecn_agent_queue_t *queue = devices->p_next;
+#ifdef _DEBUG
+	assert(queue->p_parent == devices);
+#endif
+	for (; queue != devices; queue = queue->p_next) {
+		ecn_obj_t *obj = cast_obj(queue);
+		if (obj->inib.eojx1 != eoj.eojx1)
+			continue;
+		if (obj->inib.eojx2 != eoj.eojx2)
+			continue;
+		if (obj->inib.eojx3 != eoj.eojx3)
+			continue;
+
+		return obj;
+	}
+
+	return NULL;
+}
+
+ecn_obj_t *ecn_agent_find_obj2(ecn_node_agent_t *pk_nod, const EOBJINIB *pk_obj)
+{
+	ecn_agent_queue_t *devices = &pk_nod->node.devices;
+	ecn_agent_queue_t *queue = devices->p_next;
+#ifdef _DEBUG
+	assert(queue->p_parent == devices);
+#endif
+	for (; queue != devices; queue = queue->p_next) {
+		ecn_obj_t *obj = cast_obj(queue);
+		if (&obj->inib == pk_obj)
+			return obj;
+	}
+
+	return NULL;
+}
+
+ID ecn_agent_get_eobj(const EOBJINIB *pk_obj)
+{
+	return cast_obj2(pk_obj)->eobjId;
+}
+
+const EOBJINIB *ecn_agent_next_eobj(const EOBJCB *pk_nod, const EOBJINIB *pk_obj)
+{
+	ecn_agent_queue_t *devices = &cast_node(pk_nod)->node.devices;
+	ecn_obj_t *device = (ecn_obj_t *)pk_obj->exinf;
+	ecn_agent_queue_t *queue = cast_queue(device);
+#ifdef _DEBUG
+	assert(queue->p_parent == devices);
+#endif
+	if (queue == devices)
+		return NULL;
+
+	return &cast_obj(queue->p_next)->inib;
+}
+
+bool_t ecn_agent_get_eoj_enodid(ecnl_svc_task_t *svc, ID eobjid, T_ECN_EOJ *eoj, ECN_ENOD_ID *enodid)
+{
+	ecn_agent_t *agent = &svc->agent;
+	ecn_agent_buffer_t *buf;
+	int i = eobjid;
+
+	/* ãªãã¸ã§ã¯ãIDããå®ä½ãåå¾ */
+	i -= (svc->tmax_eobjid + 1);
+	if ((i < 0)
+		|| (i >= (sizeof(agent->blockes) / sizeof(agent->blockes[0])))){
+		return false;
+	}
+
+	buf = &agent->blockes[i];
+	if(buf->cnt.obj.eobjId != eobjid)
+		return false;
+
+	/* ãªãã¸ã§ã¯ãã®EOJãã³ãã¼ */
+	memcpy(eoj, &buf->cnt.obj.inib.eojx1, sizeof(*eoj));
+
+	/* æå±ãããã¼ãã®ãªãã¸ã§ã¯ãIDãåå¾ */
+	if(buf->cnt.obj.inib.enodid == 0)
+		i = buf->cnt.obj.eobjId;
+	else
+		i = buf->cnt.obj.inib.enodid;
+
+	i -= (svc->tmax_eobjid + 1);
+	if ((i < 0)
+		|| (i >= (sizeof(agent->blockes) / sizeof(agent->blockes[0])))){
+		return false;
+	}
+
+	/* ãã¼ãIDãåå¾ */
+	buf = &agent->blockes[i];
+	*enodid = buf->cnt.node.node.enodId;
+
+	return true;
+}
+
+void ecn_agent_set_epc_to_prop_map(uint8_t epc, uint8_t *propMap)
+{
+	int i, j;
+	if ((epc & 0x80) == 0)
+		return;
+	i = epc & 0xF;
+	j = (epc >> 4) - 8;
+	propMap[i] |= (1 << j);
+}
+
+bool_t ecn_agent_contains_epc_in_prop_map(uint8_t epc, uint8_t *propMap)
+{
+	int i, j;
+	if ((epc & 0x80) == 0)
+		return false;
+	i = epc & 0xF;
+	j = (epc >> 4) - 8;
+	return (propMap[i] & (1 << j)) != 0;
+}
+
+void ecn_agent_init(ecnl_svc_task_t *svc)
+{
+	svc->agent.eprpinib.eprpcd = 0x00;					/* ãã­ããã£ã³ã¼ã */
+	svc->agent.eprpinib.eprpatr = EPC_RULE_SET | EPC_RULE_GET;		/* ãã­ããã£å±æ§ */
+	svc->agent.eprpinib.eprpsz = 255;					/* ãã­ããã£ã®ãµã¤ãº */
+	svc->agent.eprpinib.exinf = (intptr_t)&svc->agent;	/* ãã­ããã£ã®æ¡å¼µæ
+å ± */
+	svc->agent.eprpinib.eprpset = ecn_agent_eprpset;	/* ãã­ããã£ã®è¨­å®é¢æ° */
+	svc->agent.eprpinib.eprpget = ecn_agent_eprpget;	/* ãã­ããã£ã®åå¾é¢æ° */
+
+	svc->agent.peprpinib = &svc->agent.eprpinib;
+
+	ecn_agent_queue_init(&svc->agent.nodes);
+}
+
+ecn_node_agent_t *ecn_agent_create_node(ecnl_svc_task_t *svc, ecn_agent_t *agent, T_EDATA *esv)
+{
+	mrb_state *mrb = svc->mrb;
+	ecn_agent_buffer_t *result = NULL;
+	ecn_node_agent_t *node;
+	uint8_t epc;
+	uint8_t pdc;
+	uint8_t edt[256];
+	T_ENUM_EPC enm;
+	ER ret;
+	T_ECN_EOJ *eoj, *end;
+
+	// ãã­ããã£éç¥ãåå¾å¿ç­ã§ã
+	switch (esv->hdr.edata.esv) {
+	case ESV_GET_RES:
+	case ESV_GET_SNA:
+	case ESV_INF:
+		break;
+	default:
+		return NULL;
+	}
+
+	// ãã¼ããã­ãã¡ã¤ã«å®ã®å ´å
+	eoj = &esv->hdr.edata.seoj;
+	if ((eoj->eojx1 != EOJ_X1_PROFILE) || (eoj->eojx2 != EOJ_X2_NODE_PROFILE)
+		|| (eoj->eojx3 != 0x01))
+		return NULL;
+
+	ret = ecn_itr_ini(&enm, esv);
+	if(ret != E_OK){
+		ECN_DBG_PUT("ecn_itr_ini");
+	}
+
+	while (ecn_itr_nxt(mrb, &enm, &epc, &pdc, &edt) == E_OK) {
+		switch (epc) {
+		// ã¤ã³ã¹ã¿ã³ã¹ãªã¹ãéç¥ã®å ´å
+		case 0xD5:
+		// èªãã¼ãã¤ã³ã¹ã¿ã³ã¹ãªã¹ãï¼³éç¥ã®å ´å
+		case 0xD6:
+			// ãµã¤ãºãåããªãå ´å
+			if (pdc != (1 + edt[0] * sizeof(T_ECN_EOJ)))
+				return NULL;
+
+			ret = get_buf(agent, &result);
+			if(ret != E_OK){
+				ECN_DBG_PUT("get_buf");
+				return NULL;
+			}
+
+			memset(result, 0, sizeof(*result));
+			node = &result->cnt.node;
+			node->node.enodId = ((T_ECN_FST_BLK *)esv)->hdr.sender.id;
+			node->node.base.svc = svc;
+			node->node.base.eobjId = svc->tmax_eobjid + 1 + (((intptr_t)result - (intptr_t)agent->blockes) / sizeof(agent->blockes[0]));
+			node->node.base.inib.enodid = 0;
+			node->node.base.inib.eobjatr = EOBJ_SYNC_REMOTE_NODE;
+			node->node.base.inib.exinf = (intptr_t)node;
+			node->node.base.inib.eojx1 = eoj->eojx1;
+			node->node.base.inib.eojx2 = eoj->eojx2;
+			node->node.base.inib.eojx3 = eoj->eojx3;
+			node->node.base.inib.eprp = &agent->peprpinib;
+			node->node.base.inib.eprpcnt = 0;
+			ecn_agent_set_epc_to_prop_map(0xD5, node->node.base.pmapGet);
+			ecn_agent_set_epc_to_prop_map(0xD6, node->node.base.pmapGet);
+			ecn_agent_set_epc_to_prop_map(0x9D, node->node.base.pmapGet);
+			ecn_agent_set_epc_to_prop_map(0x9E, node->node.base.pmapGet);
+			ecn_agent_set_epc_to_prop_map(0x9F, node->node.base.pmapGet);
+			ecn_agent_queue_init(&node->node.devices);
+			node->node.eobj.profile = &node->node.base.inib;
+			node->node.eobj.eobjs = NULL;
+			node->node.eobj.eobjcnt = pdc / 3;
+			node->state = ecn_node_state_idle;
+			node->timer = TMO_FEVR;
+
+			end = (T_ECN_EOJ *)&edt[pdc];
+			for (eoj = (T_ECN_EOJ *)&edt[1]; eoj < end; eoj++) {
+				ecn_device_t *device;
+				ecn_agent_buffer_t *obj;
+
+				ret  = get_buf(agent, &obj);
+				if(ret != E_OK){
+					ECN_DBG_PUT("get_buf");
+					return NULL;
+				}
+
+				memset(obj, 0, sizeof(*obj));
+				device = &obj->cnt.device;
+				device->node = &node->node;
+				device->base.svc = svc;
+				device->base.eobjId = svc->tmax_eobjid + 1 + (((intptr_t)obj - (intptr_t)agent->blockes) / sizeof(agent->blockes[0]));
+				device->base.inib.eobjatr = EOBJ_DEVICE;
+				device->base.inib.enodid = node->node.base.eobjId;
+				device->base.inib.exinf = (intptr_t)device;
+				device->base.inib.eojx1 = eoj->eojx1;
+				device->base.inib.eojx2 = eoj->eojx2;
+				device->base.inib.eojx3 = eoj->eojx3;
+				device->base.inib.eprp = &agent->peprpinib;
+				device->base.inib.eprpcnt = 0;
+				ecn_agent_set_epc_to_prop_map(0x9D, device->base.pmapGet);
+				ecn_agent_set_epc_to_prop_map(0x9E, device->base.pmapGet);
+				ecn_agent_set_epc_to_prop_map(0x9F, device->base.pmapGet);
+
+				ecn_agent_queue_add(&node->node.devices, &obj->hdr.queue);
+			}
+			break;
+		default:
+			continue;
+		}
+		break;
+	}
+
+	if (result == NULL)
+		return NULL;
+
+	ecn_agent_queue_add(&agent->nodes, &result->hdr.queue);
+
+	return node;
+}
+
+static ER ecn_agent_proc_get_device_list(ecnl_svc_task_t *svc, ecn_agent_t *agent, ECN_FBS_ID req)
+{
+	mrb_state *mrb = svc->mrb;
+	ER ret;
+	ECN_FBS_ID res;
+	ecn_inm_get_device_list_req_t msg;
+	ECN_FBS_SSIZE_T len;
+	ecn_agent_buffer_t *pos, *end = &agent->blockes[TNUM_AEOBJID];
+	ecn_inm_get_device_item_t item;
+	int i, j;
+
+	ret = _ecn_fbs_get_data(mrb, req, &msg, sizeof(msg), &len);
+	if (ret != E_OK) {
+		return ret;
+	}
+
+	ret = _ecn_tsk_cre_res_fbs(svc, req, ECN_INM_GET_DEVICE_LIST_RES, &res);
+	if (ret != E_OK) {
+		return ret;
+	}
+
+	ret = _ecn_fbs_add_data_ex(mrb, res, &msg.requestid, sizeof(((ecn_inm_get_device_list_res_t *)0)->requestid));
+	if (ret != E_OK) {
+		_ecn_fbs_del(mrb, res);
+		return ret;
+	}
+
+	for (i = 0; i < svc->tnum_enodid; i++) {
+		const EOBJCB *enod = &svc->eobjcb_table[i];
+		for (j = 0; j < enod->eobjcnt; j++) {
+			const EOBJINIB *eobj = enod->eobjs[i];
+			item.eobjid = echonet_svctask_get_eobjid(svc, eobj);
+			item.enodid = eobj->enodid;
+			item.state = true;
+			item.eojx1 = eobj->eojx1;
+			item.eojx2 = eobj->eojx2;
+			item.eojx3 = eobj->eojx3;
+			item.addrid = (i == 0) ? ENOD_LOCAL_ID : (ENOD_REMOTE_ID + i);
+
+			ret = _ecn_fbs_add_data_ex(mrb, res, &item, sizeof(item));
+			if (ret != E_OK) {
+				_ecn_fbs_del(mrb, res);
+				return ret;
+			}
+		}
+	}
+
+	for (pos = &agent->blockes[0]; pos < end; pos++){
+		if(pos->cnt.obj.eobjId == 0)
+			continue;
+
+		item.eobjid = pos->cnt.obj.eobjId;
+		item.enodid = pos->cnt.obj.inib.enodid;
+		item.state = (pos->cnt.obj.pmapFlag & (PMAP_FLAG_SET | PMAP_FLAG_GET | PMAP_FLAG_ANNO))
+			== (PMAP_FLAG_SET | PMAP_FLAG_GET | PMAP_FLAG_ANNO);
+		item.eojx1 = pos->cnt.obj.inib.eojx1;
+		item.eojx2 = pos->cnt.obj.inib.eojx2;
+		item.eojx3 = pos->cnt.obj.inib.eojx3;
+
+		if(pos->cnt.device.node != NULL)
+			item.addrid = pos->cnt.device.node->enodId;
+		else
+			item.addrid = pos->cnt.node.node.enodId;
+
+		ret = _ecn_fbs_add_data_ex(mrb, res, &item, sizeof(item));
+		if (ret != E_OK) {
+			_ecn_fbs_del(mrb, res);
+			return ret;
+		}
+	}
+
+	ret = ecn_fbs_enqueue(res.ptr->hdr.target.mbxid, res.ptr);
+	if (ret != E_OK) {
+		_ecn_fbs_del(mrb, res);
+		return ret;
+	}
+
+	return E_OK;
+}
+
+static ER ecn_agent_proc_get_device_info(ecnl_svc_task_t *svc, ecn_agent_t *agent, ECN_FBS_ID req)
+{
+	mrb_state *mrb = svc->mrb;
+	ER ret;
+	ECN_FBS_ID res;
+	ecn_inm_get_device_info_req_t msg;
+	ecn_inm_get_device_info_res_t rmsg;
+	ECN_FBS_SSIZE_T len;
+
+	ret = _ecn_fbs_get_data(mrb, req, &msg, sizeof(msg), &len);
+	if (ret != E_OK) {
+		return ret;
+	}
+
+	memset(&rmsg, 0, sizeof(rmsg));
+
+	if (msg.eobjid <= svc->tmax_eobjid) {
+		const EOBJINIB *eobj = echonet_svctask_get_eobjinib(svc, msg.eobjid);
+		int i;
+
+		rmsg.requestid = msg.requestid;
+		rmsg.eobjid = msg.eobjid;
+		for (i = 0; i < eobj->eprpcnt; i++) {
+			uint8_t epc = eobj->eprp[i]->eprpcd;
+			ecn_agent_set_epc_to_prop_map(epc, rmsg.pmapSet);
+			ecn_agent_set_epc_to_prop_map(epc, rmsg.pmapGet);
+			ecn_agent_set_epc_to_prop_map(epc, rmsg.pmapAnno);
+		}
+		rmsg.eprpcnt = eobj->eprpcnt;
+	}
+	else {
+		int eobjId;
+		ecn_agent_buffer_t *pos;
+
+		eobjId = msg.eobjid - svc->tmax_eobjid - 1;
+		pos = &agent->blockes[eobjId];
+
+		rmsg.requestid = msg.requestid;
+		rmsg.eobjid = pos->cnt.obj.eobjId;
+		memcpy(rmsg.pmapSet, pos->cnt.obj.pmapSet, sizeof(rmsg.pmapSet));
+		memcpy(rmsg.pmapGet, pos->cnt.obj.pmapGet, sizeof(rmsg.pmapGet));
+		memcpy(rmsg.pmapAnno, pos->cnt.obj.pmapAnno, sizeof(rmsg.pmapAnno));
+		rmsg.eprpcnt = pos->cnt.obj.eprpcnt;
+	}
+
+	ret = _ecn_tsk_cre_res_fbs(svc, req, ECN_INM_GET_DEVICE_INFO_RES, &res);
+	if (ret != E_OK) {
+		return ret;
+	}
+
+	ret = _ecn_fbs_add_data_ex(mrb, res, &rmsg, sizeof(rmsg));
+	if (ret != E_OK) {
+		_ecn_fbs_del(mrb, res);
+		return ret;
+	}
+
+	ret = ecn_fbs_enqueue(res.ptr->hdr.target.mbxid, res.ptr);
+	if (ret != E_OK) {
+		_ecn_fbs_del(mrb, res);
+		return ret;
+	}
+
+	return E_OK;
+}
+
+TMO ecn_agent_get_timer(ecnl_svc_task_t *svc)
+{
+	TMO timer = TMO_FEVR, temp;
+	ecn_agent_t *agent = &svc->agent;
+	ecn_node_agent_t *node;
+	ecn_agent_queue_t *queue;
+
+	queue = &agent->nodes;
+	for (;;) {
+		queue = queue->p_next;
+#ifdef _DEBUG
+		assert(queue->p_parent == &agent->nodes);
+#endif
+		if(&agent->nodes == queue)
+			break;
+
+		node = (ecn_node_agent_t *)cast_obj(queue);
+		temp = node->timer;
+		if (temp != TMO_FEVR) {
+			if ((timer == TMO_FEVR) || (temp < timer)) {
+				timer = temp;
+			}
+		}
+	}
+
+	return timer;
+}
+
+void ecn_agent_progress(ecnl_svc_task_t *svc, TMO interval)
+{
+	ecn_agent_t *agent = &svc->agent;
+	ecn_node_agent_t *node;
+	ecn_agent_queue_t *queue;
+
+	queue = &agent->nodes;
+	for (;;) {
+		queue = queue->p_next;
+#ifdef _DEBUG
+		assert(queue->p_parent == &agent->nodes);
+#endif
+		if(&agent->nodes == queue)
+			break;
+
+		node = (ecn_node_agent_t *)cast_obj(queue);
+		if (node->timer == TMO_FEVR)
+			continue;
+
+		node->timer -= interval;
+		if (node->timer <= 0) {
+			node->timer = 0;
+		}
+	}
+}
+
+void ecn_agent_timeout(ecnl_svc_task_t *svc)
+{
+	ecn_agent_t *agent = &svc->agent;
+	ecn_node_agent_t *node;
+	ecn_agent_queue_t *queue;
+
+	queue = &agent->nodes;
+	for (;;) {
+		queue = queue->p_next;
+#ifdef _DEBUG
+		assert(queue->p_parent == &agent->nodes);
+#endif
+		if(&agent->nodes == queue)
+			break;
+
+		node = (ecn_node_agent_t *)cast_obj(queue);
+		if (node->timer != 0)
+			continue;
+
+		switch (node->state) {
+		case ecn_node_state_start:
+			ecn_node_timeout_on_start(svc, node);
+			break;
+		case ecn_node_state_set_prpmap_wait:
+			ecn_node_timeout_on_set_prpmap_wait(svc, node);
+			break;
+		case ecn_node_state_get_prpmap_wait:
+			ecn_node_timeout_on_get_prpmap_wait(svc, node);
+			break;
+		case ecn_node_state_anno_prpmap_wait:
+			ecn_node_timeout_on_anno_prpmap_wait(svc, node);
+			break;
+		case ecn_node_state_fault:
+			ecn_node_timeout_on_start(svc, node);
+			break;
+		default:
+#ifdef _DEBUG
+			assert(0);
+#endif
+			break;
+		}
+	}
+}
+
+bool_t ecn_agent_proc_int_msg(ecnl_svc_task_t *svc, ECN_FBS_ID fbs, uint8_t cmd)
+{
+	ecn_agent_t *agent = &svc->agent;
+
+	switch(cmd)
+	{
+	case ECN_INM_GET_DEVICE_LIST_REQ:
+		ecn_agent_proc_get_device_list(svc, agent, fbs);
+		break;
+	case ECN_INM_GET_DEVICE_INFO_REQ:
+		ecn_agent_proc_get_device_info(svc, agent, fbs);
+		break;
+	default:
+		return false;
+	}
+
+	return true;
+}
+
+void ecn_agent_proc_ecn_msg(ecnl_svc_task_t *svc, const EOBJCB **ppk_snod, const EOBJINIB **ppk_sobj, T_EDATA *esv)
+{
+	ecn_agent_t *agent = &svc->agent;
+	ecn_node_agent_t *snod;
+	ecn_obj_t *sobj;
+
+	/* éçã«å®ç¾©ãããéä¿¡å
+ã®å ´å */
+	if ((*ppk_snod != NULL) && (*ppk_snod)->eobjs != NULL) {
+		/* å¦çããªã */
+		return;
+	}
+
+	snod = ecn_agent_find_node2(svc, *ppk_snod);
+
+	/* éä¿¡å
+ãç¥ããªãã£ãã */
+	if (snod == NULL) {
+		/* éä¿¡å
+ã®ãã¼ãæ
+å ±ãæ°è¦ã«ä½æ */
+		snod = ecn_agent_create_node(svc, agent, esv);
+		if (snod == NULL)
+			return;
+	}
+
+	sobj = ecn_agent_find_obj2(snod, *ppk_sobj);
+
+	/* ãã¼ããã­ãã¡ã¤ã«ã®å ´å */
+	if ((esv->hdr.edata.seoj.eojx1 == EOJ_X1_PROFILE)
+		&& (esv->hdr.edata.seoj.eojx2 == EOJ_X2_NODE_PROFILE)) {
+		sobj = &snod->node.base;
+	}
+	/* æ©å¨ãªãã¸ã§ã¯ãã®å ´å */
+	else {
+		sobj = ecn_agent_find_eobj(&snod->node.eobj, esv->hdr.edata.seoj);
+	}
+
+	*ppk_snod = &snod->node.eobj;
+	*ppk_sobj = &sobj->inib;
+
+	agent->current_node = snod;
+	agent->msg_proced = false;
+}
+
+void ecn_agent_proc_ecn_msg_end(ecnl_svc_task_t *svc)
+{
+	ecn_agent_t *agent = &svc->agent;
+	ecn_node_agent_t *node = agent->current_node;
+	ecn_obj_t *sobj;
+
+	if(node == NULL)
+		return;
+
+	sobj = node->current;
+	if(sobj == NULL)
+		return;
+
+	if (agent->msg_proced) {
+		switch (node->state) {
+		case ecn_node_state_set_prpmap_wait:
+			ecn_node_next_proc_on_set_prpmap_wait(svc, node, sobj);
+			break;
+		case ecn_node_state_get_prpmap_wait:
+			ecn_node_next_proc_on_get_prpmap_wait(svc, node, sobj);
+			break;
+		case ecn_node_state_anno_prpmap_wait:
+			ecn_node_next_proc_on_anno_prpmap_wait(svc, node, sobj);
+			break;
+		}
+	}
+}
+
+static void ecn_node_send_set_prop_map(ecnl_svc_task_t *svc, ecn_node_agent_t *node)
+{
+	T_EDATA *esv;
+	ecn_obj_t *obj = node->current;
+
+	// ãã­ããã£å¤èª­ã¿åºãè¦æ±
+	ecn_esv_get(svc, &esv, obj->eobjId, 0x9E);
+	ecn_snd_esv(svc, esv);
+
+	node->state = ecn_node_state_set_prpmap_wait;
+	node->timer = (TMO)5000;
+}
+
+static void ecn_node_send_get_prop_map(ecnl_svc_task_t *svc, ecn_node_agent_t *node)
+{
+	T_EDATA *esv;
+	ecn_obj_t *obj = node->current;
+
+	// ãã­ããã£å¤èª­ã¿åºãè¦æ±
+	ecn_esv_get(svc, &esv, obj->eobjId, 0x9F);
+	ecn_snd_esv(svc, esv);
+
+	node->state = ecn_node_state_get_prpmap_wait;
+	node->timer = (TMO)5000;
+}
+
+static void ecn_node_send_anno_prop_map(ecnl_svc_task_t *svc, ecn_node_agent_t *node)
+{
+	T_EDATA *esv;
+	ecn_obj_t *obj = node->current;
+
+	// ãã­ããã£å¤èª­ã¿åºãè¦æ±
+	ecn_esv_get(svc, &esv, obj->eobjId, 0x9D);
+	ecn_snd_esv(svc, esv);
+
+	node->state = ecn_node_state_anno_prpmap_wait;
+	node->timer = (TMO)5000;
+}
+
+static void ecn_node_next_obj(ecn_node_agent_t *node)
+{
+	ecn_obj_t *obj = node->current;
+	ecn_agent_queue_t *queue;
+	ecn_device_t *device;
+
+	/* objãæå®ããã¦ããªãå ´å */
+	if(obj == NULL){
+		/* ãã®ãã¼ããè¿ã */
+		node->current = &node->node.base;
+		return;
+	}
+	/* ãã¼ãã®å ´å */
+	else if((obj->inib.eojx1 == EOJ_X1_PROFILE) && (obj->inib.eojx2 == EOJ_X2_NODE_PROFILE)){
+		node = (ecn_node_agent_t *)obj;
+
+		/* é
+ä¸ã®æ©å¨ãè¿ã */
+		queue = node->node.devices.p_next;
+		device = (ecn_device_t *)cast_obj(queue);
+	}
+	/* æ©å¨ã®å ´å */
+	else{
+		/* æ¬¡ã®æ©å¨ãè¿ã */
+		node = (ecn_node_agent_t *)((ecn_device_t *)obj)->node;
+		queue = cast_queue(obj)->p_next;
+		device = (ecn_device_t *)cast_obj(queue);
+	}
+
+	/* ãã®æ©å¨ãæ«å°¾ã ã£ãå ´å */
+	if(&node->node.devices == queue){
+		node->current = NULL;
+	}
+	else {
+		node->current = &device->base;
+	}
+}
+
+static void ecn_node_timeout_on_start(ecnl_svc_task_t *svc, ecn_node_agent_t *node)
+{
+	for (;;) {
+		ecn_obj_t *obj = node->current;
+		if (obj == NULL) {
+			node->state = ecn_node_state_idle;
+			node->timer = TMO_FEVR;
+			return;
+		}
+
+		if((obj->pmapFlag & PMAP_FLAG_SET) == 0){
+			ecn_node_send_set_prop_map(svc, node);
+			break;
+		}
+		else if((obj->pmapFlag & PMAP_FLAG_GET) == 0){
+			ecn_node_send_get_prop_map(svc, node);
+			break;
+		}
+		else if((obj->pmapFlag & PMAP_FLAG_ANNO) == 0){
+			ecn_node_send_anno_prop_map(svc, node);
+			break;
+		}
+		else{
+			ecn_node_next_obj(node);
+		}
+	}
+}
+
+static void ecn_node_next_proc_on_set_prpmap_wait(ecnl_svc_task_t *svc, ecn_node_agent_t *node, ecn_obj_t *sobj)
+{
+	if((sobj->pmapFlag & PMAP_FLAG_GET) == 0){
+		ecn_node_send_get_prop_map(svc, node);
+	}
+	else if((sobj->pmapFlag & PMAP_FLAG_ANNO) == 0){
+		ecn_node_send_anno_prop_map(svc, node);
+	}
+	else if((sobj->pmapFlag & PMAP_FLAG_SET) == 0){
+		ecn_node_send_set_prop_map(svc, node);
+	}
+	else{
+		ecn_node_next_obj(node);
+		ecn_node_timeout_on_start(svc, node);
+	}
+}
+
+static void ecn_node_timeout_on_set_prpmap_wait(ecnl_svc_task_t *svc, ecn_node_agent_t *node)
+{
+	ecn_obj_t *obj = node->current;
+	if(obj == NULL){
+		node->state = ecn_node_state_idle;
+		node->timer = TMO_FEVR;
+		return;
+	}
+
+	node->retry++;
+	if(node->retry < 3){
+		ecn_node_next_proc_on_set_prpmap_wait(svc, node, obj);
+	}
+	else{
+		node->retry = 0;
+		node->state = ecn_node_state_fault;
+		node->timer = TMO_FEVR;
+	}
+}
+
+static void ecn_node_next_proc_on_get_prpmap_wait(ecnl_svc_task_t *svc, ecn_node_agent_t *node, ecn_obj_t *sobj)
+{
+	if((sobj->pmapFlag & PMAP_FLAG_ANNO) == 0){
+		ecn_node_send_anno_prop_map(svc, node);
+	}
+	else if((sobj->pmapFlag & PMAP_FLAG_SET) == 0){
+		ecn_node_send_set_prop_map(svc, node);
+	}
+	else if((sobj->pmapFlag & PMAP_FLAG_GET) == 0){
+		ecn_node_send_get_prop_map(svc, node);
+	}
+	else{
+		ecn_node_next_obj(node);
+		ecn_node_timeout_on_start(svc, node);
+	}
+}
+
+static void ecn_node_timeout_on_get_prpmap_wait(ecnl_svc_task_t *svc, ecn_node_agent_t *node)
+{
+	ecn_obj_t *obj = node->current;
+	if(obj == NULL){
+		node->state = ecn_node_state_idle;
+		node->timer = TMO_FEVR;
+		return;
+	}
+
+	ecn_node_next_proc_on_get_prpmap_wait(svc, node, obj);
+}
+
+static void ecn_node_next_proc_on_anno_prpmap_wait(ecnl_svc_task_t *svc, ecn_node_agent_t *node, ecn_obj_t *sobj)
+{
+	if((sobj->pmapFlag & PMAP_FLAG_SET) == 0){
+		ecn_node_send_set_prop_map(svc, node);
+	}
+	else if((sobj->pmapFlag & PMAP_FLAG_GET) == 0){
+		ecn_node_send_get_prop_map(svc, node);
+	}
+	else if((sobj->pmapFlag & PMAP_FLAG_ANNO) == 0){
+		ecn_node_send_anno_prop_map(svc, node);
+	}
+	else{
+		ecn_node_next_obj(node);
+		ecn_node_timeout_on_start(svc, node);
+	}
+}
+
+static void ecn_node_timeout_on_anno_prpmap_wait(ecnl_svc_task_t *svc, ecn_node_agent_t *node)
+{
+	ecn_obj_t *obj = node->current;
+	if(obj == NULL){
+		node->state = ecn_node_state_idle;
+		node->timer = TMO_FEVR;
+		return;
+	}
+
+	ecn_node_next_proc_on_anno_prpmap_wait(svc, node, obj);
+}
+
+const EPRPINIB *ecn_agent_get_property(const EOBJINIB *fp_obj, uint8_t fa_epc, const EPRPINIB *item)
+{
+	ecn_obj_t *obj = cast_obj2(fp_obj);
+	bool_t has = false;
+
+	/* ãã¼ãã®å ´åã¯ã¤ã³ã¹ã¿ã³ã¹ãªã¹ãéç¥ã¨èªãã¼ãã¤ã³ã¹ã¿ã³ã¹ãªã¹ãï¼³éç¥ãå¿
+é ã§åãåã */
+	if ((fp_obj->enodid == 0) && ((fa_epc == 0xD5) || (fa_epc == 0xD6)))
+		has = true;
+	else if (ecn_agent_contains_epc_in_prop_map(fa_epc, obj->pmapGet))
+		has = true;
+	else if (ecn_agent_contains_epc_in_prop_map(fa_epc, obj->pmapSet))
+		has = true;
+	else if (ecn_agent_contains_epc_in_prop_map(fa_epc, obj->pmapAnno))
+		has = true;
+
+	if(!has)
+		return NULL;
+
+	((EPRPINIB *)item)->eprpcd = fa_epc;
+	((EPRPINIB *)item)->exinf = (intptr_t)fp_obj;
+
+	return item;
+}
+
+int ecn_agent_eprpget(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size)
+{
+	return 0;
+}
+
+int ecn_agent_eprpset(ecnl_svc_task_t *svc, const EPRPINIB *item, const void *src, int size, bool_t *anno)
+{
+	ecn_agent_t *agent = cast_agent(item);
+	ecn_node_agent_t *node = agent->current_node;
+	const uint8_t *edt = (const uint8_t *)src;
+	ecn_obj_t *sobj = cast_obj2((const EOBJINIB *)item->exinf);
+	uint8_t eprpcnt;
+	int i;
+
+	switch (item->eprpcd) {
+	/* ã¤ã³ã¹ã¿ã³ã¹ãªã¹ãéç¥ã®å ´å */
+	case 0xD5:
+	/* èªãã¼ãã¤ã³ã¹ã¿ã³ã¹ãªã¹ãï¼³éç¥ã®å ´å */
+	case 0xD6:
+		if ((node != NULL) && (node->state == ecn_node_state_idle)) {
+			ecn_agent_queue_t *devices = &node->node.devices;
+			ecn_agent_queue_t *queue = devices->p_next;
+#ifdef _DEBUG
+			assert(queue->p_parent == devices);
+#endif
+			for (; queue != devices; queue = queue->p_next) {
+				ecn_obj_t *obj = cast_obj(queue);
+				obj->pmapFlag = 0;
+			}
+			node->node.base.pmapFlag = 0;
+			node->state = ecn_node_state_start;
+			node->timer = (TMO)1000;
+			node->current = sobj;
+		}
+		break;
+	/* éç¥ãã­ããã£ãããã®å ´å */
+	case 0x9D:
+		eprpcnt = edt[0];
+
+		if (eprpcnt < 16) {
+			/* ãµã¤ãºãã§ãã¯ */
+			if (eprpcnt + 1 != size)
+				return 0;
+
+			for (i = 1; i < size; i++)
+				ecn_agent_set_epc_to_prop_map(edt[i], sobj->pmapAnno);
+		}
+		else {
+			/* ãµã¤ãºãã§ãã¯ */
+			if (size != 17)
+				return 0;
+
+			memcpy(sobj->pmapAnno, &edt[1], 16);
+		}
+		sobj->eprpcnt = eprpcnt;
+		sobj->pmapFlag |= PMAP_FLAG_ANNO;
+		break;
+	/* SETãã­ããã£ãããã®å ´å */
+	case 0x9E:
+		eprpcnt = edt[0];
+
+		if (eprpcnt < 16) {
+			/* ãµã¤ãºãã§ãã¯ */
+			if (eprpcnt + 1 != size)
+				return 0;
+
+			for (i = 1; i < size; i++)
+				ecn_agent_set_epc_to_prop_map(edt[i], sobj->pmapSet);
+		}
+		else {
+			/* ãµã¤ãºãã§ãã¯ */
+			if (size != 17)
+				return 0;
+
+			memcpy(sobj->pmapSet, &edt[1], 16);
+		}
+		sobj->eprpcnt = eprpcnt;
+		sobj->pmapFlag |= PMAP_FLAG_SET;
+		break;
+	/* GETãã­ããã£ãããã®å ´å */
+	case 0x9F:
+		eprpcnt = edt[0];
+
+		if (eprpcnt < 16) {
+			/* ãµã¤ãºãã§ãã¯ */
+			if (eprpcnt + 1 != size)
+				return 0;
+
+			for (i = 1; i < size; i++)
+				ecn_agent_set_epc_to_prop_map(edt[i], sobj->pmapGet);
+		}
+		else {
+			/* ãµã¤ãºãã§ãã¯ */
+			if (size != 17)
+				return 0;
+
+			memcpy(sobj->pmapGet, &edt[1], 16);
+		}
+		sobj->eprpcnt = eprpcnt;
+		sobj->pmapFlag |= PMAP_FLAG_GET;
+		break;
+	default:
+		svc->forward_esv = true;
+		return 0;
+	}
+
+	agent->msg_proced = true;
+
+	return size;
+}
+
+ER ecn_agent_get_device_list(ecnl_svc_task_t *svc, T_ECN_FBS_QUEUE *sender, int requestid, ECN_FBS_ID *pk_req)
+{
+	mrb_state *mrb = svc->mrb;
+	ER a_ret;
+	ECN_FBS_ID req;
+
+	a_ret = _ecn_tsk_cre_req_fbs(svc, sender, ECN_INM_GET_DEVICE_LIST_REQ, &req);
+	if (a_ret != E_OK) {
+		return a_ret;
+	}
+
+	a_ret = _ecn_fbs_add_data_ex(mrb, req, &requestid, sizeof(((ecn_inm_get_device_list_req_t *)0)->requestid));
+	if (a_ret != E_OK) {
+		_ecn_fbs_del(mrb, req);
+		return a_ret;
+	}
+
+	*pk_req = req;
+
+	return E_OK;
+}
+
+ER ecn_agent_get_device_info(ecnl_svc_task_t *svc, T_ECN_FBS_QUEUE *sender, int requestid, ID eobjid, ECN_FBS_ID *pk_req)
+{
+	mrb_state *mrb = svc->mrb;
+	ER a_ret;
+	ECN_FBS_ID req;
+
+	a_ret = _ecn_tsk_cre_req_fbs(svc, sender, ECN_INM_GET_DEVICE_INFO_REQ, &req);
+	if (a_ret != E_OK) {
+		return a_ret;
+	}
+
+	a_ret = _ecn_fbs_add_data_ex(mrb, req, &requestid, sizeof(((ecn_inm_get_device_info_req_t *)0)->requestid));
+	if (a_ret != E_OK) {
+		_ecn_fbs_del(mrb, req);
+		return a_ret;
+	}
+
+	a_ret = _ecn_fbs_add_data_ex(mrb, req, &eobjid, sizeof(((ecn_inm_get_device_info_req_t *)0)->eobjid));
+	if (a_ret != E_OK) {
+		_ecn_fbs_del(mrb, req);
+		return a_ret;
+	}
+
+	*pk_req = req;
+
+	return E_OK;
+}
Index: EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_agent.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_agent.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_agent.h	(revision 270)
@@ -0,0 +1,231 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2015-2016 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *		ECHONET Lite åççæãã¼ã
+ */
+
+#ifndef ECHONET_NODE_H
+#define ECHONET_NODE_H
+
+#include "echonet.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ *  ã­ã¥ã¼ã®ãã¼ã¿æ§é ã®å®ç¾©
+ */
+typedef struct ecn_agent_queue {
+#ifdef _DEBUG
+	struct ecn_agent_queue *p_parent;	/* è¦ªã­ã¥ã¼ã¸ã®ãã¤ã³ã¿ */
+#endif
+	struct ecn_agent_queue *p_next;		/* æ¬¡ã¨ã³ããªã¸ã®ãã¤ã³ã¿ */
+	struct ecn_agent_queue *p_prev;		/* åã¨ã³ããªã¸ã®ãã¤ã³ã¿ */
+} ecn_agent_queue_t;
+
+#define PMAP_FLAG_SET	0x01
+#define PMAP_FLAG_GET	0x02
+#define PMAP_FLAG_ANNO	0x04
+
+typedef struct ecn_obj
+{
+	ecnl_svc_task_t *svc;
+	ID eobjId;
+	EOBJINIB inib;
+	uint8_t pmapSet[16];		/* SETãã­ããã£ããã */
+	uint8_t pmapGet[16];		/* GETãã­ããã£ããã */
+	uint8_t pmapAnno[16];		/* ç¶æ
+å¤åæéç¥ãã­ããã£ããã */
+	uint8_t pmapFlag;
+	uint8_t eprpcnt;			/* ECHONET Lite ãã­ããã£æ° */
+	uint8_t annocnt;			/* éç¥ãã­ããã£ã®æ° */
+	uint8_t setcnt;				/* è¨­å®ãã­ããã£ã®æ° */
+	uint8_t getcnt;				/* åå¾ãã­ããã£ã®æ° */
+} ecn_obj_t;
+
+typedef struct ecn_node
+{
+	ecn_obj_t base;
+	EOBJCB eobj;
+	ECN_ENOD_ID enodId;
+	ecn_agent_queue_t devices;
+} ecn_node_t;
+
+typedef struct ecn_device {
+	ecn_obj_t base;
+	ecn_node_t *node;
+} ecn_device_t;
+
+typedef enum ecn_node_state {
+	ecn_node_state_idle,
+	ecn_node_state_start,
+	ecn_node_state_set_prpmap_wait,
+	ecn_node_state_get_prpmap_wait,
+	ecn_node_state_anno_prpmap_wait,
+	ecn_node_state_fault,
+} ecn_node_state_t;
+
+typedef struct ecn_node_agent {
+	ecn_node_t node;
+	ecn_node_state_t state;
+	TMO timer;
+	ecn_obj_t *current;
+	int retry;
+} ecn_node_agent_t;
+
+typedef struct ecn_agent_buffer {
+	union {
+		struct ecn_agent_buffer *free;
+		ecn_agent_queue_t queue;
+	}hdr;
+	union {
+		ecn_obj_t obj;
+		ecn_node_agent_t node;
+		ecn_device_t device;
+	}cnt;
+} ecn_agent_buffer_t;
+
+#define TNUM_AEOBJID 50
+
+typedef struct ecn_agent {
+	EPRPINIB eprpinib;
+	const EPRPINIB *peprpinib;
+	ecn_agent_queue_t nodes;
+	ecn_node_agent_t *current_node;
+	bool_t msg_proced;
+	int blkpos;
+	ecn_agent_buffer_t *free;
+	ecn_agent_buffer_t blockes[TNUM_AEOBJID];
+	int requestid;
+} ecn_agent_t;
+
+typedef struct ecn_inm_get_device_list_req
+{
+	unsigned int requestid;
+} ecn_inm_get_device_list_req_t;
+
+typedef struct ecn_inm_get_device_item
+{
+	ID			eobjid;			/* ECHONET Lite ãªãã¸ã§ã¯ãID */
+	ID			enodid;			/* ECHONET Lite ãã¼ããã­ãã¡ã¤ã«ãªãã¸ã§ã¯ãID */
+	uint8_t		state;			/* æ
+å ±åéç¶æ
+ */
+	uint8_t		eojx1;			/* ECHONET Lite ãªãã¸ã§ã¯ãã®ã¯ã©ã¹ã°ã«ã¼ãã³ã¼ã */
+	uint8_t		eojx2;			/* ECHONET Lite ãªãã¸ã§ã¯ãã®ã¯ã©ã¹ã³ã¼ã */
+	uint8_t		eojx3;			/* ECHONET Lite ãªãã¸ã§ã¯ãã®ã¤ã³ã¹ã¿ã³ã¹ã³ã¼ã */
+	ECN_ENOD_ID	addrid;			/* éä¿¡ã¬ã¤ã¤ã¼ã¢ãã¬ã¹åå¾ç¨ID */
+} ecn_inm_get_device_item_t;
+
+typedef struct ecn_inm_get_device_list_res
+{
+	unsigned int requestid;
+	ecn_inm_get_device_item_t devices[1];
+} ecn_inm_get_device_list_res_t;
+
+typedef struct ecn_inm_get_device_info_req
+{
+	unsigned int requestid;
+	ID eobjid;
+} ecn_inm_get_device_info_req_t;
+
+typedef struct ecn_inm_get_device_info_res
+{
+	unsigned int requestid;
+	ID eobjid;
+	uint8_t pmapSet[16];
+	uint8_t pmapGet[16];
+	uint8_t pmapAnno[16];
+	uint_t eprpcnt;
+} ecn_inm_get_device_info_res_t;
+
+/* åæå */
+void ecn_agent_init(ecnl_svc_task_t *svc);
+/* ãã¼ããæ¤ç´¢ */
+ecn_node_t *ecn_agent_find_node(ecnl_svc_task_t *svc, ECN_ENOD_ID enodid);
+/* æ©å¨ãæ¤ç´¢ */
+ecn_obj_t *ecn_agent_find_eobj(const EOBJCB *pk_nod, T_ECN_EOJ eoj);
+/* ãªãã¸ã§ã¯ãIDãåå¾ */
+ID ecn_agent_get_eobj(const EOBJINIB *pk_obj);
+/* æ¬¡ã®æ©å¨ãåå¾ */
+const EOBJINIB *ecn_agent_next_eobj(const EOBJCB *pk_nod, const EOBJINIB *pk_obj);
+/* ãªãã¸ã§ã¯ãIDããEOJã¨ãã¼ãIDãåå¾ */
+bool_t ecn_agent_get_eoj_enodid(ecnl_svc_task_t *svc, ID eobjid, T_ECN_EOJ *eoj, ECN_ENOD_ID *enodid);
+/* ã¿ã¤ã ã¢ã¦ãå¤ãè¿ã */
+TMO ecn_agent_get_timer(ecnl_svc_task_t *svc);
+/* ã¿ã¤ãã¼ã®æéãé²ãã */
+void ecn_agent_progress(ecnl_svc_task_t *svc, TMO interval);
+/* ã¿ã¤ã ã¢ã¦ãå¦çï¼ã®ããã®å¼ã³åºãï¼ */
+void ecn_agent_timeout(ecnl_svc_task_t *svc);
+/* å
+é¨ã¡ãã»ã¼ã¸å¦ç */
+bool_t ecn_agent_proc_int_msg(ecnl_svc_task_t *svc, ECN_FBS_ID fbs, uint8_t cmd);
+/* ECHONETé»æåä¿¡å¦ç */
+void ecn_agent_proc_ecn_msg(ecnl_svc_task_t *svc, const EOBJCB **snod, const EOBJINIB **sobj, T_EDATA *esv);
+/* ECHONETé»æåä¿¡å¦ççµäº */
+void ecn_agent_proc_ecn_msg_end(ecnl_svc_task_t *svc);
+/* ãã­ããã£ãåå¾ */
+const EPRPINIB *ecn_agent_get_property(const EOBJINIB *fp_obj, uint8_t fa_epc, const EPRPINIB *item);
+
+ER ecn_agent_get_device_list(ecnl_svc_task_t *svc, T_ECN_FBS_QUEUE *sender, int requestid, ECN_FBS_ID *pk_req);
+ER ecn_agent_get_device_info(ecnl_svc_task_t *svc, T_ECN_FBS_QUEUE *sender, int requestid, ID eobjid, ECN_FBS_ID *pk_req);
+
+void ecn_agent_set_epc_to_prop_map(uint8_t epc, uint8_t *propMap);
+bool_t ecn_agent_contains_epc_in_prop_map(uint8_t epc, uint8_t *propMap);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ECHONET_NODE_H */
Index: EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_class.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_class.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_class.h	(revision 270)
@@ -0,0 +1,629 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2014-2016 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ */
+
+#ifndef ECHONET_CLASS_H
+#define ECHONET_CLASS_H
+
+/* ã»ã³ãµã¼é¢é£æ©å¨ */
+#define EOJ_X1_SENSOR 0x00
+
+/* ç©ºèª¿é¢é£æ©å¨ */
+#define EOJ_X1_AIR_CONDITIONER 0x01
+
+/* ä½å®
+ã»è¨­åé¢é£æ©å¨ */
+#define EOJ_X1_AMENITY 0x02
+
+/* èª¿çã»å®¶äºé¢é£æ©å¨ */
+#define EOJ_X1_HOUSEWORK 0x03
+
+/* å¥åº·é¢é£æ©å¨ */
+#define EOJ_X1_WELLNESS 0x04
+
+/* ç®¡çã»æä½é¢é£æ©å¨ */
+#define EOJ_X1_CONTROLLER 0x05
+
+/* AVé¢é£æ©å¨ */
+#define EOJ_X1_AUDIO_VISUAL 0x06
+
+/* ãã­ãã¡ã¤ã« */
+#define EOJ_X1_PROFILE 0x0E
+
+/* ã¦ã¼ã¶ã¼å®ç¾© */
+#define EOJ_X1_USER_DEFINED 0x0F
+
+/*
+ * ã»ã³ãµé¢é£æ©å¨ã¯ã©ã¹ã°ã«ã¼ã *
+ */
+/* ã¬ã¹æ¼ãã»ã³ãµ */
+#define EOJ_X2_GAS_LEAK_SENSOR 0x01
+
+/* é²ç¯ã»ã³ãµ */
+#define EOJ_X2_CRIME_PREVENTION_SENSOR 0x02
+
+/* éå¸¸ãã¿ã³ */
+#define EOJ_X2_EMERGENCY_BUTTON 0x03
+
+/* ææ¥ç¨ã»ã³ãµ */
+#define EOJ_X2_FIRST_AID_SENSOR 0x04
+
+/* å°éã»ã³ãµ */
+#define EOJ_X2_EARTHQUAKE_SENSOR 0x05
+
+/* æ¼é»ã»ã³ãµ */
+#define EOJ_X2_ELECTRIC_LEAK_SENSOR 0x06
+
+/* äººä½æ¤ç¥ã»ã³ãµ */
+#define EOJ_X2_HUMAN_DETECTION_SENSOR 0x07
+
+/* æ¥å®¢ã»ã³ãµ */
+#define EOJ_X2_VISITOR_SENSOR 0x08
+
+/* å¼ã³åºãã»ã³ãµ */
+#define EOJ_X2_CALL_SENSOR 0x09
+
+/* çµé²ã»ã³ãµ */
+#define EOJ_X2_CONDENSATION_SENSOR 0x0A
+
+/* ç©ºæ°æ±æã»ã³ãµ */
+#define EOJ_X2_AIR_POLLUTION_SENSOR 0x0B
+
+/* é
+¸ç´ ã»ã³ãµ */
+#define EOJ_X2_OXYGEN_SENSOR 0x0C
+
+/* ç
+§åº¦ã»ã³ãµ */
+#define EOJ_X2_ILLUMINANCE_SENSOR 0x0D
+
+/* é³ã»ã³ãµ */
+#define EOJ_X2_SOUND_SENSOR 0x0E
+
+/* æå½ã»ã³ãµ */
+#define EOJ_X2_MAILING_SENSOR 0x0F
+
+/* éè·ã»ã³ãµ */
+#define EOJ_X2_WEIGHT_SENSOR 0x10
+
+/* æ¸©åº¦ã»ã³ãµ */
+#define EOJ_X2_TEMPERATURE_SENSOR 0x11
+
+/* æ¹¿åº¦ã»ã³ãµ */
+#define EOJ_X2_HUMIDITY_SENSOR 0x12
+
+/* é¨ã»ã³ãµ */
+#define EOJ_X2_RAIN_SENSOR 0x13
+
+/* æ°´ä½ã»ã³ãµ */
+#define EOJ_X2_WATER_LEVEL_SENSOR 0x14
+
+/* é¢¨åæ°´ä½ã»ã³ãµ */
+#define EOJ_X2_BATH_WATER_LEVEL_SENSOR 0x15
+
+/* é¢¨åæ²¸ãä¸ããã»ã³ãµ */
+#define EOJ_X2_BATH_HEATING_STATUS_SENSOR 0x16
+
+/* æ°´æ¼ãã»ã³ãµ */
+#define EOJ_X2_WATER_LEAK_SENSOR 0x17
+
+/* æ°´ããµãã»ã³ãµ */
+#define EOJ_X2_WATER_OVERFLOW_SENSOR 0x18
+
+/* ç«ç½ã»ã³ãµ */
+#define EOJ_X2_FIRE_SENSOR 0x19
+
+/* ã¿ãã³ç
+ã»ã³ãµ */
+#define EOJ_X2_CIGARETTE_SMOKE_SENSOR 0x1A
+
+/* ï¼£ï¼¯ï¼ã»ã³ãµ */
+#define EOJ_X2_CO2_SENSOR 0x1B
+
+/* ã¬ã¹ã»ã³ãµ */
+#define EOJ_X2_GAS_SENSOR 0x1C
+
+/* ï¼¶ï¼¯ï¼£ã»ã³ãµ */
+#define EOJ_X2_VOC_SENSOR 0x1D
+
+/* å·®å§ã»ã³ãµ */
+#define EOJ_X2_DIFFERENTIAL_PRESSURE_SENSOR 0x1E
+
+/* é¢¨éã»ã³ãµ */
+#define EOJ_X2_AIR_SPEED_SENSOR 0x1F
+
+/* è­ãã»ã³ãµ */
+#define EOJ_X2_ODOR_SENSOR 0x20
+
+/* çã»ã³ãµ */
+#define EOJ_X2_FLAME_SENSOR 0x21
+
+/* é»åéã»ã³ãµ */
+#define EOJ_X2_ELECTRIC_ENERGY_SENSOR 0x22
+
+/* é»æµéã»ã³ãµ */
+#define EOJ_X2_CURRENT_VALUE_SENSOR 0x23
+
+/* æ¼å
+ã»ã³ãµ */
+#define EOJ_X2_DAYLIGHT_SENSOR 0x24
+
+/* æ°´æµéã»ã³ãµ */
+#define EOJ_X2_WATER_FLOW_RATE_SENSOR 0x25
+
+/* å¾®åã»ã³ãµ */
+#define EOJ_X2_MICROMOTION_SENSOR 0x26
+
+/* ééã»ã³ãµ */
+#define EOJ_X2_PASSAGE_SENSOR 0x27
+
+/* å¨åºã»ã³ãµ */
+#define EOJ_X2_BED_PRESENCE_SENSOR 0x28
+
+/* ééã»ã³ãµ */
+#define EOJ_X2_OPEN_CLOSE_SENSOR 0x29
+
+/* æ´»åéã»ã³ãµ */
+#define EOJ_X2_ACTIVITY_AMOUNT_SENSOR 0x2A
+
+/* äººä½ä½ç½®ã»ã³ãµ */
+#define EOJ_X2_HUMAN_BODY_LOCATION_SENSOR 0x2B
+
+/* éªã»ã³ãµ */
+#define EOJ_X2_SNOW_SENSOR 0x2C
+
+/*
+ * ç©ºèª¿é¢é£æ©å¨ã¯ã©ã¹ã°ã«ã¼ã *
+ */
+/* å®¶åº­ç¨ã¨ã¢ã³ã³ */
+#define EOJ_X2_HOME_AIR_CONDITIONER 0x30
+
+/* å·é¢¨æ© */
+#define EOJ_X2_COLD_BLASTER 0x31
+
+/* æé¢¨æ© */
+#define EOJ_X2_ELECTRIC_FAN 0x32
+
+/* ææ°æ */
+#define EOJ_X2_VENTILATION_FAN 0x33
+
+/* ç©ºèª¿ææ°æ */
+#define EOJ_X2_AIR_CONDITIONING_VENTILATION_FAN 0x34
+
+/* ç©ºæ°æ¸
+æµå¨ */
+#define EOJ_X2_AIR_CLEANER 0x35
+
+/* å·é¢¨æ */
+#define EOJ_X2_COLD_BLAST_FAN 0x36
+
+/* ãµã¼ã­ã¥ã¬ã¼ã¿ */
+#define EOJ_X2_CIRCULATOR 0x37
+
+/* é¤æ¹¿æ© */
+#define EOJ_X2_DEHUMIDIFIER 0x38
+
+/* å æ¹¿å¨ */
+#define EOJ_X2_HUMIDIFIER 0x39
+
+/* å¤©äºæ */
+#define EOJ_X2_CEILING_FAN 0x3A
+
+/* é»æ°ããã¤ */
+#define EOJ_X2_ELECTRIC_KOTATSU 0x3B
+
+/* é»æ°ããã */
+#define EOJ_X2_ELECTRIC_HEATING_PAD 0x3C
+
+/* é»æ°æ¯å¸ */
+#define EOJ_X2_ELECTRIC_BLANKET 0x3D
+
+/* ã¹ãã¼ã */
+#define EOJ_X2_SPACE_HEATER 0x3E
+
+/* ããã«ãã¼ã¿ */
+#define EOJ_X2_PANEL_HEATER 0x3F
+
+/* é»æ°ã«ã¼ããã */
+#define EOJ_X2_ELECTRIC_CARPET 0x40
+
+/* ãã­ã¢ãã¼ã¿ */
+#define EOJ_X2_FLOOR_HEATER 0x41
+
+/* é»æ°ææ¿å¨ */
+#define EOJ_X2_ELECTRIC_HEATER 0x42
+
+/* ãã¡ã³ãã¼ã¿ */
+#define EOJ_X2_FAN_HEATER 0x43
+
+/* å
+
+é»å¨ */
+#define EOJ_X2_BATTERY_CHARGER 0x44
+
+/* æ¥­åç¨ããã±ã¼ã¸ã¨ã¢ã³ã³å®¤å
+æ© */
+#define EOJ_X2_PACKAGE_TYPE_COMMERCIAL_AIR_CONDITIONER_INDOOR_UNIT 0x45
+
+/* æ¥­åç¨ããã±ã¼ã¸ã¨ã¢ã³ã³å®¤å¤æ© */
+#define EOJ_X2_PACKAGE_TYPE_COMMERCIAL_AIR_CONDITIONER_OUTDOOR_UNIT 0x46
+
+/* æ¥­åç¨ããã±ã¼ã¸ã¨ã¢ã³ã³èç±ã¦ããã */
+#define EOJ_X2_PACKAGE_TYPE_COMMERCIAL_AIR_CONDITIONER_THERMAL_STORAGE_UNIT 0x47
+
+/* æ¥­åç¨ãã¡ã³ã³ã¤ã«ã¦ããã */
+#define EOJ_X2_COMMERCIAL_FAN_COIL_UNIT 0x48
+
+/* æ¥­åç¨ç©ºèª¿å·ç±æº(ãã©ã¼) */
+#define EOJ_X2_COMMERCIAL_AIR_CONDITIONING_COLD_SOURCE_CHILLER 0x49
+
+/* æ¥­åç¨ç©ºèª¿æ¸©ç±æº(ãã¤ã©ã¼) */
+#define EOJ_X2_COMMERCIAL_AIR_CONDITIONING_HEAT_SOURCE_BOILER 0x50
+
+/* æ¥­åç¨ç©ºèª¿VAV */
+#define EOJ_X2_AIR_CONDITIONING_VAV_FOR_COMMERCIAL_APPLICATION 0x51
+
+/* æ¥­åç¨ç©ºèª¿ã¨ã¢ãã³ããªã³ã°ã¦ããã */
+#define EOJ_X2_AIR_HANDLING_UNIT_AIR_CONDITIONING_FOR_COMMERCIAL_APPLICATION 0x52
+
+/* ã¦ãããã¯ã¼ã©ã¼ */
+#define EOJ_X2_UNIT_COOLER 0x53
+
+/* æ¥­åç¨ã³ã³ãã³ã·ã³ã°ã¦ããã */
+#define EOJ_X2_CONDENSING_UNIT_FOR_COMMERCIAL_APPLICATION 0x54
+
+/*
+ * ä½å®
+ã»è¨­åé¢é£æ©å¨ã¯ã©ã¹ã°ã«ã¼ã *
+ */
+/* é»åãã©ã¤ã³ã */
+#define EOJ_X2_ELECTRICALLY_OPERATED_SHADE 0x60
+
+/* é»åã·ã£ãã¿ã¼ */
+#define EOJ_X2_ELECTRICALLY_OPERATED_SHUTTER 0x61
+
+/* é»åã«ã¼ãã³ */
+#define EOJ_X2_ELECTRICALLY_OPERATED_CURTAIN 0x62
+
+/* é»åé¨æ¸ */
+#define EOJ_X2_ELECTRICALLY_OPERATED_STORM_WINDOW 0x63
+
+/* é»åã¬ã¬ã¼ã¸ */
+#define EOJ_X2_ELECTRICALLY_OPERATED_DOOR 0x64
+
+/* é»åå¤©çª */
+#define EOJ_X2_ELECTRICALLY_OPERATED_SKYLIGHT 0x65
+
+/* ãªã¼ãã³ã°ï¼æ¥ããï¼ */
+#define EOJ_X2_AWNING 0x66
+
+/* æ£æ°´å¨ï¼åº­ç¨ï¼ */
+#define EOJ_X2_GARDEN_SPRINKLER 0x67
+
+/* æ£æ°´å¨ï¼ç«ç½ç¨ï¼ */
+#define EOJ_X2_FIRE_SPRINKLER 0x68
+
+/* å´æ°´ */
+#define EOJ_X2_FOUNTAIN 0x69
+
+/* ç¬éæ¹¯æ²¸å¨ */
+#define EOJ_X2_INSTANTANEOUS_WATER_HEATERS 0x6A
+
+/* é»æ°æ¸©æ°´å¨ */
+#define EOJ_X2_ELECTRIC_WATER_HEATER 0x6B
+
+/* å¤ªé½ç±æ¸©æ°´å¨ */
+#define EOJ_X2_SOLAR_WATER_HEATER 0x6C
+
+/* å¾ªç°ãã³ã */
+#define EOJ_X2_CIRCULATION_PUMP 0x6D
+
+/* é»æ°ä¾¿åº§ï¼æ¸©æ°´æ´æµä¾¿åº§ãææ¿ä¾¿åº§ãªã©ï¼ */
+#define EOJ_X2_BIDET_EQUIPPED_TOILET 0x6E
+
+/* é»æ°é  */
+#define EOJ_X2_ELECTRIC_KEY 0x6F
+
+/* ã¬ã¹å
+å¼ */
+#define EOJ_X2_GAS_LINE_VALVE 0x70
+
+/* ãã¼ã ãµã¦ã */
+#define EOJ_X2_HOME_SAUNA 0x71
+
+/* ç¬éå¼çµ¦æ¹¯å¨ */
+#define EOJ_X2_HOT_WATER_GENERATOR 0x72
+
+/* æµ´å®¤ææ¿ä¹¾ç¥æ© */
+#define EOJ_X2_BATHROOM_DRYER 0x73
+
+/* ãã¼ã ã¨ã¬ãã¼ã¿ */
+#define EOJ_X2_HOME_ELEVATOR 0x74
+
+/* é»åéä»åã */
+#define EOJ_X2_ELECTRICALLY_OPERATED_ROOM_DIVIDER 0x75
+
+/* æ°´å¹³ãã©ã³ã¹ãã¡ */
+#define EOJ_X2_HORIZONTAL_TRANSFER 0x76
+
+/* é»åç©å¹²ã */
+#define EOJ_X2_ELECTRICALLY_OPERATED_CLOTHES_DRYING_POLE 0x77
+
+/* æµåæ§½ */
+#define EOJ_X2_SEPTIC_TANK 0x78
+
+/* ä½å®
+ç¨å¤ªé½å
+çºé» */
+#define EOJ_X2_HOME_SOLAR_POWER_GENERATION 0x79
+
+/* å·æ¸©æ°´ç±æºæ© */
+#define EOJ_X2_COLD_AND_HOT_WATER_HEAT_SOURCE_EQUIPMENT 0x7A
+
+/* åºææ¿ */
+#define EOJ_X2_FLOOR_HEATING 0x7B
+
+/* çæé»æ±  */
+#define EOJ_X2_FUEL_CELL 0x7C
+
+/* èé»æ±  */
+#define EOJ_X2_STORAGE_BATTERY 0x7D
+
+/* é»æ°èªåè»å
+
+æ¾é»ã·ã¹ãã  */
+#define EOJ_X2_ELECTRIC_VEHICLE 0x7E
+
+/* é»åéã¡ã¼ã¿ */
+#define EOJ_X2_ELECTRIC_ENERGY_METER 0x80
+
+/* æ°´æµéã¡ã¼ã¿ */
+#define EOJ_X2_WATER_FLOW_METER 0x81
+
+/* ã¬ã¹ã¡ã¼ã¿ */
+#define EOJ_X2_GAS_METER 0x82
+
+/* LPã¬ã¹ã¡ã¼ã¿ */
+#define EOJ_X2_LP_GAS_METERS 0x83
+
+/* æè¨ */
+#define EOJ_X2_CLOCK 0x84
+
+/* èªåãã¢ */
+#define EOJ_X2_AUTOMATIC_DOOR 0x85
+
+/* æ¥­åç¨ã¨ã¬ãã¼ã¿ */
+#define EOJ_X2_COMMERCIAL_ELEVATOR 0x86
+
+/* åé»ç¤ã¡ã¼ã¿ãªã³ã° */
+#define EOJ_X2_DISTRIBUTION_PANEL_METERING 0x87
+
+/* ã¹ãã¼ãé»åéã¡ã¼ã¿ */
+#define EOJ_X2_SMART_ELECTRIC_ENERGY_METER 0x88
+
+/* ã¹ãã¼ãã¬ã¹ã¡ã¼ã¿ */
+#define EOJ_X2_SMART_GAS_METER 0x89
+
+/* ä¸è¬ç
+§æ */
+#define EOJ_X2_GENERAL_LIGHTING_CLASS 0x90
+
+/* éå¸¸ç
+§æ */
+#define EOJ_X2_EMERGENCY_LIGHTING 0x99
+
+/* è¨­åç
+§æ */
+#define EOJ_X2_EQUIPMENT_LIGHT 0x9D
+
+/* ãã¶ã¼ */
+#define EOJ_X2_BUZZER 0xA0
+
+/*
+ * èª¿çã»å®¶äºé¢é£æ©å¨ã¯ã©ã¹ã°ã«ã¼ã *
+ */
+/* ã³ã¼ãã¼ã¡ã¼ã« */
+#define EOJ_X2_COFFEE_MACHINE 0xB0
+
+/* ã³ã¼ãã¼ãã« */
+#define EOJ_X2_COFFEE_MILL 0xB1
+
+/* é»æ°ããã */
+#define EOJ_X2_ELECTRIC_HOT_WATER_POT 0xB2
+
+/* é»æ°ããã */
+#define EOJ_X2_ELECTRIC_STOVE 0xB3
+
+/* ãã¼ã¹ã¿ */
+#define EOJ_X2_TOASTER 0xB4
+
+/* ã¸ã¥ã¼ãµã»ãã­ãµ */
+#define EOJ_X2_JUICER_FOOD_MIXER 0xB5
+
+/* ãã¼ããã­ã»ããµ */
+#define EOJ_X2_FOOD_PROCESSOR 0xB6
+
+/* å·åå·èµåº« */
+#define EOJ_X2_REFRIGERATOR_FREEZER 0xB7
+
+/* ãªã¼ãã³ã¬ã³ã¸ */
+#define EOJ_X2_COMBINATION_MICROWAVE_OVEN 0xB8
+
+/* ã¯ãã­ã³ã°ãã¼ã¿ */
+#define EOJ_X2_COOKING_HEATER 0xB9
+
+/* ãªã¼ãã³ */
+#define EOJ_X2_OVEN 0xBA
+
+/* çé£¯å¨ */
+#define EOJ_X2_RICE_COOKER 0xBB
+
+/* é»å­ã¸ã£ã¼ */
+#define EOJ_X2_ELECTRONIC_JAR 0xBC
+
+/* é£å¨æ´ãæ© */
+#define EOJ_X2_DISH_WASHER 0xBD
+
+/* é£å¨ä¹¾ç¥æ© */
+#define EOJ_X2_DISH_DRYER 0xBE
+
+/* é»æ°ãã¡ã¤ãæ© */
+#define EOJ_X2_ELECTRIC_RICE_CAKE_COOKER 0xBF
+
+/* ä¿æ¸©æ© */
+#define EOJ_X2_KEEP_WARM_MACHINE 0xC0
+
+/* ç²¾ç±³æ© */
+#define EOJ_X2_RICE_MILL 0xC1
+
+/* èªåè£½ãã³æ© */
+#define EOJ_X2_AUTOMATIC_BREAD_COOKER 0xC2
+
+/* ã¹ã­ã¼ã¯ãã«ã¼ */
+#define EOJ_X2_SLOW_COOKER 0xC3
+
+/* é»æ°æ¼¬ç©æ© */
+#define EOJ_X2_ELECTRIC_PICKLES_COOKER 0xC4
+
+/* æ´æ¿¯æ© */
+#define EOJ_X2_WASHING_MACHINE 0xC5
+
+/* è¡£é¡ä¹¾ç¥æ© */
+#define EOJ_X2_CLOTH_DRYER 0xC6
+
+/* é»æ°ã¢ã¤ã­ã³ */
+#define EOJ_X2_ELECTRIC_IRON 0xC7
+
+/* ãºãã³ãã¬ããµ */
+#define EOJ_X2_TROUSER_PRESS 0xC8
+
+/* ãµã¨ãä¹¾ç¥æ© */
+#define EOJ_X2_FUTON_DRYER 0xC9
+
+/* å°ç©ã»ãã¤ä¹¾ç¥æ© */
+#define EOJ_X2_SMALL_ARTICLE_SHOES_DRYER 0xCA
+
+/* é»æ°æé¤æ©ï¼ã»ã³ãã©ã«ã¯ãªã¼ãå«ãï¼ */
+#define EOJ_X2_ELECTRIC_VACUUM_CLEANER 0xCB
+
+/* ãã£ã¹ãã¼ã¶ */
+#define EOJ_X2_DISPOSER 0xCC
+
+/* é»æ°èåãæ© */
+#define EOJ_X2_ELECTRIC_MOSQUITO_CATCHER 0xCD
+
+/* æ¥­åç¨ã·ã§ã¼ã±ã¼ã¹ */
+#define EOJ_X2_COMMERCIAL_SHOW_CASE 0xCE
+
+/* æ¥­åç¨å·èµåº« */
+#define EOJ_X2_COMMERCIAL_REFRIGERATOR 0xCF
+
+/* æ¥­åç¨ãããã±ã¼ã¹ */
+#define EOJ_X2_COMMERCIAL_HOT_CASE 0xD0
+
+/* æ¥­åç¨ãã©ã¤ã¤ã¼ */
+#define EOJ_X2_COMMERCIAL_FRYER 0xD1
+
+/* æ¥­åç¨é»å­ã¬ã³ã¸ */
+#define EOJ_X2_COMMERCIAL_MICROWAVE_OVEN 0xD2
+
+/* æ´æ¿¯ä¹¾ç¥æ© */
+#define EOJ_X2_WASHER_AND_DRYER 0xD3
+
+/*
+ * å¥åº·é¢é£æ©å¨ã¯ã©ã¹ã°ã«ã¼ã *
+ */
+/* ä½éè¨ */
+#define EOJ_X2_WEIGHING_MACHINE 0x01
+
+/* ä½æ¸©è¨ */
+#define EOJ_X2_CLINICAL_THERMOMETER 0x02
+
+/* è¡å§è¨ */
+#define EOJ_X2_BLOOD_PRESSURE_METER 0x03
+
+/* è¡ç³å¤è¨ */
+#define EOJ_X2_BLOOD_SUGAR_METER 0x04
+
+/* ä½èèªè¨ */
+#define EOJ_X2_BODY_FAT_METER 0x05
+
+/*
+ * ç®¡çã»æä½é¢é£æ©å¨ã¯ã©ã¹ã°ã«ã¼ã *
+ */
+/* ã»ã­ã¥ã¢éä¿¡ç¨å
+±æéµè¨­å®ãã¼ã */
+#define EOJ_X2_SECURE_COMMUNICATION_SHARED_KEY_SETUP_NODE 0xFC
+
+/* ã¹ã¤ããï¼JEMA/HAç«¯å­å¯¾å¿ï¼ */
+#define EOJ_X2_SWITCH 0xFD
+
+/* æºå¸¯ç«¯æ« */
+#define EOJ_X2_PORTABLE_TERMINAL 0xFE
+
+/* ã³ã³ãã­ã¼ã© */
+#define EOJ_X2_CONTROLLER 0xFF
+
+/*
+ * ï¼¡ï¼¶é¢é£æ©å¨ã¯ã©ã¹ã°ã«ã¼ã *
+ */
+/* ãã£ã¹ãã¬ã¼ */
+#define EOJ_X2_DISPLAY 0x01
+
+/* ãã¬ã */
+#define EOJ_X2_TELEVISION 0x02
+
+/*
+ * ãã­ãã¡ã¤ã«ã¯ã©ã¹ã°ã«ã¼ã *
+ */
+/* ãã¼ããã­ãã¡ã¤ã« */
+#define EOJ_X2_NODE_PROFILE 0xF0
+
+#endif /* ECHONET_CLASS_H */
Index: EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_dbg.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_dbg.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_dbg.c	(revision 270)
@@ -0,0 +1,483 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2014-2016 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ */
+
+/*
+ *		ECHONET Lite ã¿ã¹ã¯ ãããã°åºå
+ */
+
+#include <mruby.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <ctype.h>
+
+#include "echonet.h"
+#include "echonet_dbg.h"
+#include "echonet_fbs.h"
+#include "echonet_task.h"
+
+#ifdef ECN_DBG_WAI_ENA
+#define _ECN_DBG_WAI_SYSLOG _ecn_dbg_wai_syslog()
+#else
+#define _ECN_DBG_WAI_SYSLOG
+#endif
+
+#if defined(ECN_DBG_PUT_ENA) || defined(ECN_CAP_PUT_ENA)
+#if defined(ECN_DBG_WAI_ENA)
+static ER _ecn_dbg_wai_syslog(void);
+/*
+ *  syslog()ãããã¡ã«ä½è£ãã§ããã¾ã§å¾
+ã¤
+ */
+static ER _ecn_dbg_wai_syslog(void)
+{
+	T_SYSLOG_RLOG	a_rlog;
+	ER				a_ret;
+	int				a_ct = 0;
+#ifndef ECN_DBG_WAI_SYSLOG_RETRY
+ #ifdef LOGTASK
+  #define ECN_DBG_WAI_SYSLOG_RETRY 10
+ #else
+  #define ECN_DBG_WAI_SYSLOG_RETRY 0
+ #endif
+#endif
+
+	for (;;) {
+		a_ret = syslog_ref_log(&a_rlog);
+		if (a_ret < 0)
+			return a_ret;
+		if (1 <= a_rlog.count) {
+			a_ct = 0;
+		} else
+#if (defined ECN_DBG_WAI_SYSLOG_RETRY) && (0 < ECN_DBG_WAI_SYSLOG_RETRY)
+		if (ECN_DBG_WAI_SYSLOG_RETRY <= ++a_ct)
+#endif
+		{
+/*			a_ret = dly_tsk(100);
+			if (a_ret < 0 && a_ret != E_RLWAI)
+				return a_ret; // */
+			break;
+		}
+
+		a_ret = dly_tsk(1);
+		if (a_ret < 0 && a_ret != E_RLWAI)
+			return a_ret;
+	}
+	return 0;
+}
+#endif /* #if defined(ECN_DBG_WAI_ENA) */
+
+/*
+ * ãããã°åºå
+ * ä¾ï¼		ECN_DBG_PUT_2("task start");
+ */
+int _ecn_dbg_dbgput(ecnl_svc_task_t *svc, const char *fp_srcloc, const char *fp_form, ...)
+{
+	va_list v;
+	char	*p_buf = 0;
+#ifdef ECN_DBG_PUT_USE_STATIC
+ #ifndef SEM_ECN_DBG_PUT
+	/* 256byteãããã¡8æ¬ã­ã¼ãã¼ã·ã§ã³ */
+	static char				a_buf[8][256];
+	static volatile uint_t	a_buf_idx = 0;
+	uint_t					a_buf_idx_a;
+ #else
+	/* ã»ããã©ãç¨ãã¦ã1æ¬ã®ãããã¡ä¸ã«æå­åãä¸¦ã¹ã¦ä½¿ã */
+	static char				a_buf[1024];
+	static volatile uint_t	a_buf_pos = 0;
+	size_t					a_buf_len;
+  #define ECN_DBG_PUT_BUF_MAX a_buf_len
+ #endif /* #ifdef SEM_ECN_DBG_PUT */
+#endif /* #ifdef ECN_DBG_PUT_USE_STATIC */
+#ifndef ECN_DBG_PUT_BUF_MAX
+ #define ECN_DBG_PUT_BUF_MAX 255
+#endif
+
+	if (!fp_srcloc)
+		fp_srcloc = "(null)";
+
+#ifdef SEM_ECN_DBG_PUT
+	syscall(wai_sem(SEM_ECN_DBG_PUT));
+#endif
+
+#ifdef ECN_DBG_PUT_USE_STATIC
+ #ifndef SEM_ECN_DBG_PUT
+	a_buf_idx_a = ++a_buf_idx;
+	p_buf = a_buf[a_buf_idx_a & 0x07];
+ #else
+	if (sizeof(a_buf) - a_buf_pos < 80)	/* æ®ãã80byteæªæºã«ãªã£ãããå
+é ­ã«æ»ã */
+		a_buf_pos = 0;
+	p_buf = a_buf + a_buf_pos;
+	a_buf_len = sizeof(a_buf) - a_buf_pos - 1;
+	if (80 * 2 <= a_buf_len)	/* 80byte*2ä»¥ä¸ã®ä½ç½ããããã¡ã¯ãæ«å°¾80byteãæ®ã */
+		a_buf_len -= 80;
+ #endif /* #ifdef SEM_ECN_DBG_PUT */
+#else
+	p_buf = (char *)_ecn_fbs_mbx_get(mrb, 255);
+	if (!p_buf) {
+		printf("%s: (+mbx fault) %s", fp_srcloc, fp_form);
+ #ifdef SEM_ECN_DBG_PUT
+		syscall(sig_sem(SEM_ECN_DBG_PUT));
+ #endif /* #ifdef SEM_ECN_DBG_PUT */
+		return 1;
+	}
+#endif /* #ifdef ECN_DBG_PUT_USE_STATIC */
+
+	va_start(v, fp_form);
+
+#ifdef _MSC_VER
+	vsnprintf_s(p_buf, ECN_DBG_PUT_BUF_MAX, ECN_DBG_PUT_BUF_MAX, fp_form, v);
+#else
+	vsprintf(p_buf, fp_form, v);
+#endif
+#ifdef ECN_DBG_PUT_USE_STATIC
+ #ifdef SEM_ECN_DBG_PUT
+	a_buf_len = strlen(p_buf) + 1;
+	/* æ®ãã80byteæªæºã«ãªã£ãã */
+	if (sizeof(a_buf) - a_buf_pos - a_buf_len < 80) {
+		/* å
+é ­ã«æ»ã */
+		a_buf_pos = 0;
+	} else {
+		a_buf_pos += a_buf_len;
+	}
+ #endif /* #ifdef SEM_ECN_DBG_PUT */
+#endif
+
+	_ECN_DBG_WAI_SYSLOG; /* syslog()ãããã¡ã«ä½è£ãã§ããã¾ã§å¾
+ã¤ */
+
+#ifdef SEM_ECN_DBG_PUT
+	syscall(sig_sem(SEM_ECN_DBG_PUT));
+#endif
+
+	printf("%s: %s", fp_srcloc, p_buf);
+
+	va_end(v);
+
+#ifndef ECN_DBG_PUT_USE_STATIC
+	_ecn_fbs_mbx_rel(mrb, p_buf);
+#endif
+	return 0;
+}
+
+/* ECN_ENOD_IDã®æå­åå¤æ */
+const char *_ecn_dbg_enod2str(ECN_ENOD_ID fa_enod_id)
+{
+/*	#define _ECN_FBS_DBG_ENOD2STR_BUF_MAX_BIT (4)
+/*	*/
+#ifdef _ECN_FBS_DBG_ENOD2STR_BUF_MAX_BIT
+	static volatile uint8_t a_idx_vol = 0;
+	static char a_buf[1 << _ECN_FBS_DBG_ENOD2STR_BUF_MAX_BIT][sizeof("ENOD_REMOTE_ID()")+5];
+	uint8_t a_idx;
+#endif
+
+	if (fa_enod_id == ENOD_NOT_MATCH_ID)
+		return "ENOD_NOT_MATCH_ID";
+	if (fa_enod_id == ENOD_MULTICAST_ID)
+		return "ENOD_MULTICAST_ID";
+	if (fa_enod_id == ENOD_LOCAL_ID)
+		return "ENOD_LOCAL_ID";
+	if (fa_enod_id == ENOD_API_ID)
+		return "ENOD_API_ID";
+	if (fa_enod_id == ENOD_REMOTE_ID)
+		return "ENOD_REMOTE_ID(0)";
+	if (fa_enod_id == ((ENOD_REMOTE_ID) + 1))
+		return "ENOD_REMOTE_ID(1)";
+	if (fa_enod_id == ((ENOD_REMOTE_ID) + 2))
+		return "ENOD_REMOTE_ID(2)";
+	if (fa_enod_id == ((ENOD_REMOTE_ID) + 3))
+		return "ENOD_REMOTE_ID(3)";
+	if (fa_enod_id == ((ENOD_REMOTE_ID) + 4))
+		return "ENOD_REMOTE_ID(4)";
+	if (fa_enod_id == ((ENOD_REMOTE_ID) + 5))
+		return "ENOD_REMOTE_ID(5)";
+#ifdef _ECN_FBS_DBG_ENOD2STR_BUF_MAX_BIT
+	if (ENOD_REMOTE_ID <= fa_enod_id) {
+		/* return "ENOD_REMOTE_ID"; */
+		a_idx = (++a_idx_vol) & ((1 << _ECN_FBS_DBG_ENOD2STR_BUF_MAX_BIT) - 1);
+#ifdef _MSC_VER
+		sprintf_s(a_buf[a_idx], sizeof(*a_buf), "ENOD_REMOTE_ID(%d)", fa_enod_id - ENOD_REMOTE_ID);
+#else
+		sprintf(a_buf[a_idx], "ENOD_REMOTE_ID(%d)", fa_enod_id - ENOD_REMOTE_ID);
+#endif
+		return a_buf[a_idx];
+	}
+#endif
+
+	return "?";
+}
+
+/*
+ * ãã¤ããªãã³ãåºå
+ */
+void _ecn_dbg_bindmp(const uint8_t *buffer, size_t len)
+{
+	/* staticé åã®ãããã¡ãåãæ¿ããåæ°(2^n) */
+	#define _ECN_FBS_DBG_BINDMP_BUF_MAX_BIT (4)
+/*	*/
+#ifdef SEM_ECN_DBG_BINDMP
+ #ifdef _ECN_FBS_DBG_BINDMP_BUF_MAX_BIT
+  #undef _ECN_FBS_DBG_BINDMP_BUF_MAX_BIT
+  /* ã»ããã©(SEM_ECN_DBG_BINDMP)ãå®ç¾©ããã¦ããå ´åããããã¡åãæ¿ãã¯ä¸è¦ãªã®ã§undef */
+ #endif
+#endif
+#ifndef _ECN_FBS_DBG_BINDMP_BUFLEN
+ /* ãããã¡ãµã¤ãº(bindmpä¸­ã®1è¡ãåã¾ããµã¤ãº) */
+ #define _ECN_FBS_DBG_BINDMP_BUFLEN (80)
+#endif
+#ifdef _ECN_FBS_DBG_BINDMP_BUF_MAX_BIT
+	/* staticé åã®ãããã¡ãåãæ¿ããããã®ç®¡çç¨å¤æ° */
+	static volatile uint8_t a_idx_vol = 0;
+	/* staticé åã®ãããã¡åãæ¿ãé å */
+	static char a_buf_area[1 << _ECN_FBS_DBG_BINDMP_BUF_MAX_BIT][_ECN_FBS_DBG_BINDMP_BUFLEN];
+	uint8_t a_idx;
+	char *a_buf;
+#else
+	/* staticé åã®ãããã¡é å */
+	static char a_buf[_ECN_FBS_DBG_BINDMP_BUFLEN];
+#endif
+	const uint8_t *p = buffer;			/* èª­ã¿åããã¤ã³ã¿ */
+	int i, a_blk, a_blk_max, a_pos = 0;
+	const T_ECN_EDT_HDR *p_req_esv;
+	const T_ECN_INTERNAL_MSG *p_im;
+
+#ifdef SEM_ECN_DBG_BINDMP
+	syscall(wai_sem(SEM_ECN_DBG_BINDMP));
+#endif
+
+	if (len != 256) {
+		a_blk_max = 1;
+	} else {
+		a_blk_max = ((T_ECN_FST_BLK *)buffer)->hdr.wr;
+		if (!a_blk_max)
+			a_blk_max = 1;
+	}
+	#ifndef ECN_DBG_BINDMP_MAXLEN
+	 /* bindmpåºåã®æå¤§ãµã¤ãº */
+	 #define ECN_DBG_BINDMP_MAXLEN 1600
+	#endif
+	if (ECN_DBG_BINDMP_MAXLEN < len) {
+		len = ECN_DBG_BINDMP_MAXLEN;
+	}
+
+#ifdef _ECN_FBS_DBG_BINDMP_BUF_MAX_BIT
+	a_idx = (++a_idx_vol) & ((1 << _ECN_FBS_DBG_BINDMP_BUF_MAX_BIT) - 1);
+	a_buf = a_buf_area[a_idx];
+	/* #define a_buf (a_buf_area[a_idx]) */
+#endif
+
+	for (a_blk = 0; p && a_blk < a_blk_max; p = ((T_ECN_FST_BLK *)buffer)->lnk.p_sub[a_blk++]->payload) {
+		if (0 < a_blk) {
+			_ECN_DBG_WAI_SYSLOG; /* syslog()ãããã¡ã«ä½è£ãã§ããã¾ã§å¾
+ã¤ */
+			printf("p_sub[%d] (0x%p)", a_blk - 1, p);
+		}
+		memset(a_buf, 0, _ECN_FBS_DBG_BINDMP_BUFLEN);
+		for (i = 0; i < (int)len; i++) {
+			if (i % 16 == 0) {
+				if (a_buf[0]) {
+					_ECN_DBG_WAI_SYSLOG; /* syslog()ãããã¡ã«ä½è£ãã§ããã¾ã§å¾
+ã¤ */
+					printf("%s", a_buf);
+				}
+#ifdef _MSC_VER
+				sprintf_s(a_buf, _ECN_FBS_DBG_BINDMP_BUFLEN, "[%08X]:", i);
+#else
+				sprintf(a_buf, "[%08X]:", i);
+#endif
+				a_pos = strlen(a_buf);
+			} else {
+				a_buf[a_pos++] = (i % 16 == 8 ? '-':' ');
+			}
+#ifdef _MSC_VER
+			sprintf_s(a_buf + a_pos, _ECN_FBS_DBG_BINDMP_BUFLEN - a_pos, "%02X", p[i]);
+#else
+			sprintf(a_buf + a_pos, "%02X", p[i]);
+#endif
+			a_pos += 2;
+		}
+		if (a_buf[0]) {
+			_ECN_DBG_WAI_SYSLOG; /* syslog()ãããã¡ã«ä½è£ãã§ããã¾ã§å¾
+ã¤ */
+			printf("%s", a_buf);
+		}
+		if (a_blk_max == 1)
+			break;
+	}
+
+	if (len == 256) {
+		switch (((const T_ECN_FST_BLK *)buffer)->hdr.type) {
+		case ECN_MSG_ECHONET:
+			p_req_esv = (T_ECN_EDT_HDR *)&((const T_ECN_FST_BLK *)buffer)->payload;
+			_ECN_DBG_WAI_SYSLOG; /* syslog()ãããã¡ã«ä½è£ãã§ããã¾ã§å¾
+ã¤ */
+			printf(" sender: %d %s, target: %d %s",
+				((T_ECN_FST_BLK *)buffer)->hdr.sender.id, _ecn_dbg_enod2str(((T_ECN_FST_BLK *)buffer)->hdr.sender.id),
+				((T_ECN_FST_BLK *)buffer)->hdr.target.id, _ecn_dbg_enod2str(((T_ECN_FST_BLK *)buffer)->hdr.target.id));
+			_ECN_DBG_WAI_SYSLOG; /* syslog()ãããã¡ã«ä½è£ãã§ããã¾ã§å¾
+ã¤ */
+			printf(" ecn_hdr: 0x%02X 0x%02X 0x%04X", p_req_esv->ecn_hdr.ehd1, p_req_esv->ecn_hdr.ehd2, p_req_esv->ecn_hdr.tid);
+			_ECN_DBG_WAI_SYSLOG; /* syslog()ãããã¡ã«ä½è£ãã§ããã¾ã§å¾
+ã¤ */
+			printf(" edata: 0x%06X 0x%06X 0x%02X 0x%02X (%s)",
+				p_req_esv->edata.seoj.eojx1 << 16 | p_req_esv->edata.seoj.eojx2 << 8 | p_req_esv->edata.seoj.eojx3,
+				p_req_esv->edata.deoj.eojx1 << 16 | p_req_esv->edata.deoj.eojx2 << 8 | p_req_esv->edata.deoj.eojx3,
+				p_req_esv->edata.esv, p_req_esv->edata.opc, _ecn_dbg_esv2str(p_req_esv->edata.esv));
+			_ECN_DBG_WAI_SYSLOG; /* syslog()ãããã¡ã«ä½è£ãã§ããã¾ã§å¾
+ã¤ */
+			printf(" ecn_prp: 0x%02X 0x%02X", p_req_esv->ecn_prp.epc, p_req_esv->ecn_prp.pdc);
+			_ECN_DBG_WAI_SYSLOG; /* syslog()ãããã¡ã«ä½è£ãã§ããã¾ã§å¾
+ã¤ */
+			printf(" cur(blk/pos): wr %d, rd %d",
+				(int)((T_ECN_FST_BLK *)buffer)->hdr.wr,
+				(int)((T_ECN_FST_BLK *)buffer)->hdr.rd);
+		break;
+		case ECN_MSG_INTERNAL:
+			p_im = (const T_ECN_INTERNAL_MSG *)&((const T_ECN_FST_BLK *)buffer)->payload[0];
+			printf(" a_im.command: %d:%s", p_im->command,
+				(p_im->command == ECN_INM_NOTIFY_INSTANCELIST ? "ECN_INM_NOTIFY_INSTANCELIST":
+				(p_im->command == ECN_INM_GET_DEVICE_LIST_REQ ? "ECN_INM_GET_DEVICE_LIST_REQ" :
+				(p_im->command == ECN_INM_GET_DEVICE_LIST_RES ? "ECN_INM_GET_DEVICE_LIST_RES" :
+				(p_im->command == ECN_INM_GET_DEVICE_INFO_REQ ? "ECN_INM_GET_DEVICE_INFO_REQ " :
+				(p_im->command == ECN_INM_GET_DEVICE_INFO_RES ? "ECN_INM_GET_DEVICE_INFO_RES " :
+				(p_im->command == ECN_LCL_MSG_GET_LCLADDR_REQ ? "ECN_LCL_MSG_GET_LCLADDR_REQ " :
+				(p_im->command == ECN_LCL_MSG_GET_LCLADDR_REQ ? "ECN_LCL_MSG_GET_LCLADDR_REQ " :
+				(p_im->command == ECN_LCL_MSG_GET_LCLADDR_ERROR ? "ECN_LCL_MSG_GET_LCLADDR_ERROR" : "?")))))))));
+			memset(a_buf, 0, _ECN_FBS_DBG_BINDMP_BUFLEN);
+			a_blk_max = ((const T_ECN_FST_BLK *)buffer)->hdr.wr;
+			if (0 < a_blk_max) {
+				if (64 < a_blk_max)
+					a_blk_max = 64;
+				if (_ECN_FBS_DBG_BINDMP_BUFLEN < a_blk_max)
+					a_blk_max = _ECN_FBS_DBG_BINDMP_BUFLEN;
+				for (i = offsetof(T_ECN_INTERNAL_MSG, data); i < a_blk_max; i++) {
+					a_blk = ((const T_ECN_FST_BLK *)buffer)->payload[i];
+					if (!isprint(a_blk) || !isascii(a_blk))
+						a_blk = '.';
+					a_buf[i - 1] = a_blk;
+				}
+				printf(" a_im.data: [%s]", &a_buf[offsetof(T_ECN_INTERNAL_MSG, data) - 1]);
+			}
+			break;
+		default:
+			printf(" invalid type: %d", ((const T_ECN_FST_BLK *)buffer)->hdr.type);
+		}
+	}
+	else if (8 <= len
+	&& ((const T_ECN_FST_BLK *)buffer)->payload[0] == 0x10
+	&& ((const T_ECN_FST_BLK *)buffer)->payload[1] == 0x81) {
+		p_req_esv = (const T_ECN_EDT_HDR *)&((const T_ECN_FST_BLK *)buffer)->payload[0];
+		_ECN_DBG_WAI_SYSLOG; /* syslog()ãããã¡ã«ä½è£ãã§ããã¾ã§å¾
+ã¤ */
+		printf(" ecn_hdr: 0x%02X 0x%02X 0x%04X", p_req_esv->ecn_hdr.ehd1, p_req_esv->ecn_hdr.ehd2, p_req_esv->ecn_hdr.tid);
+		_ECN_DBG_WAI_SYSLOG; /* syslog()ãããã¡ã«ä½è£ãã§ããã¾ã§å¾
+ã¤ */
+		printf(" edata: 0x%06X 0x%06X 0x%02X 0x%02X (%s)",
+			p_req_esv->edata.seoj.eojx1 << 16 | p_req_esv->edata.seoj.eojx2 << 8 | p_req_esv->edata.seoj.eojx3,
+			p_req_esv->edata.deoj.eojx1 << 16 | p_req_esv->edata.deoj.eojx2 << 8 | p_req_esv->edata.deoj.eojx3,
+			p_req_esv->edata.esv, p_req_esv->edata.opc, _ecn_dbg_esv2str(p_req_esv->edata.esv));
+		_ECN_DBG_WAI_SYSLOG; /* syslog()ãããã¡ã«ä½è£ãã§ããã¾ã§å¾
+ã¤ */
+		printf(" ecn_prp: 0x%02X 0x%02X", p_req_esv->ecn_prp.epc, p_req_esv->ecn_prp.pdc);
+	}
+#ifdef SEM_ECN_DBG_BINDMP
+	syscall(sig_sem(SEM_ECN_DBG_BINDMP));
+#endif
+}
+
+/*
+ * ECHONET Liteãµã¼ãã¹ã³ã¼ãæå­åå¤æ
+ */
+const char *_ecn_dbg_esv2str(uint8_t fa_esv)
+{
+	switch (fa_esv) {
+	case ESV_SET_I_SNA:		return "ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ä¸å¯å¿ç­";			/* 0x50 */
+	case ESV_SET_C_SNA:		return "ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ä¸å¯å¿ç­";			/* 0x51	*/
+	case ESV_GET_SNA:		return "ãã­ããã£å¤èª­ã¿åºãä¸å¯å¿ç­";				/* 0x52	*/
+	case ESV_INF_SNA:		return "ãã­ããã£å¤éç¥ä¸å¯å¿ç­";					/* 0x53 */
+	case ESV_SET_GET_SNA:	return "ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãä¸å¯å¿ç­";	/* 0x5E	*/
+	case ESV_SET_I:			return "ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­ä¸è¦ï¼";		/* 0x60 */
+	case ESV_SET_C:			return "ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­è¦ï¼";		/* 0x61 */
+	case ESV_GET:			return "ãã­ããã£å¤èª­ã¿åºãè¦æ±";					/* 0x62 */
+	case ESV_INF_REQ:		return "ãã­ããã£å¤éç¥è¦æ±";						/* 0x63 */
+	case ESV_SET_GET:		return "ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ±";		/* 0x6E */
+	case ESV_SET_RES:		return "ãã­ããã£å¤æ¸ãè¾¼ã¿å¿ç­";					/* 0x71 */
+	case ESV_GET_RES:		return "ãã­ããã£å¤èª­ã¿åºãå¿ç­";					/* 0x72 */
+	case ESV_INF:			return "ãã­ããã£å¤éç¥";							/* 0x73 */
+	case ESV_INFC:			return "ãã­ããã£å¤éç¥ï¼å¿ç­è¦ï¼";				/* 0x74 */
+	case ESV_SET_GET_RES:	return "ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãå¿ç­";		/* 0x7E */
+	case ESV_INFC_RES:		return "ãã­ããã£å¤éç¥å¿ç­";						/* 0x7A */
+	default:
+		return "(unknown)";
+	}
+}
+
+const char *itron_strerror(int errorno)
+{
+	switch (errorno) {
+	case E_SYS:		return "ã·ã¹ãã ã¨ã©ã¼";
+	case E_PAR:		return "ãã©ã¡ã¼ã¿ã¨ã©ã¼";
+	case E_NOMEM:	return "ã¡ã¢ãªä¸è¶³";
+	case E_OBJ:		return "ãªãã¸ã§ã¯ãç¶æ
+ã¨ã©ã¼";
+	case E_NOEXS:	return "ãªãã¸ã§ã¯ãæªçæ";
+	case E_TMOUT:	return "ãã¼ãªã³ã°å¤±æã¾ãã¯ã¿ã¤ã ã¢ã¦ã";
+	case E_BOVR:	return "ãããã¡ãªã¼ãã¼ãã­ã¼";
+	case E_BRK:		return "ã¦ã¼ã¶ã¼ã«ããä¸­æ­";
+	default:
+		return "(unknown)";
+	}
+}
+
+#endif /* #if defined(ECN_DBG_PUT_ENA) || defined(ECN_CAP_PUT_ENA) */
Index: EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_dbg.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_dbg.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_dbg.h	(revision 270)
@@ -0,0 +1,111 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2014-2016 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ */
+
+/*
+ *		ECHONET Lite ã¿ã¹ã¯ ãããã°åºå
+ */
+
+#ifndef TOPPERS_ECHONET_DBG_H
+#define TOPPERS_ECHONET_DBG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "echonet.h"
+
+#ifdef ECN_DBG_PUT_ENA
+#define ECN_DBG_PUT(a)					printf(a)
+#define ECN_DBG_PUT_1(a, b)				printf(a, b)
+#define ECN_DBG_PUT_2(a, b, c)			printf(a, b, c)
+#define ECN_DBG_PUT_3(a, b, c, d)		printf(a, b, c, d)
+#define ECN_DBG_PUT_4(a, b, c, d, e)	printf(a, b, c, d, e)
+#define ECN_DBG_PUT_5(a, b, c, d, e, f)	printf(a, b, c, d, e, f)
+#else
+#define ECN_DBG_PUT(a)
+#define ECN_DBG_PUT_1(a, b)
+#define ECN_DBG_PUT_2(a, b, c)
+#define ECN_DBG_PUT_3(a, b, c, d)
+#define ECN_DBG_PUT_4(a, b, c, d, e)
+#define ECN_DBG_PUT_5(a, b, c, d, e, f)
+#endif
+
+/* ãããã°åºå(CARP) */
+#ifdef ECN_CAP_PUT_ENA
+#define ECN_CAP_PUT(a)					printf(a)
+#define ECN_CAP_PUT_1(a, b)				printf(a, b)
+#define ECN_CAP_PUT_2(a, b, c)			printf(a, b, c)
+#define ECN_CAP_PUT_3(a, b, c, d)		printf(a, b, c, d)
+#define ECN_CAP_PUT_4(a, b, c, d, e)	printf(a, b, c, d, e)
+#define ECN_CAP_PUT_5(a, b, c, d, e, f)	printf(a, b, c, d, e, f)
+#else
+#define ECN_CAP_PUT(a)
+#define ECN_CAP_PUT_1(a, b)
+#define ECN_CAP_PUT_2(a, b, c)
+#define ECN_CAP_PUT_3(a, b, c, d)
+#define ECN_CAP_PUT_4(a, b, c, d, e)
+#define ECN_CAP_PUT_5(a, b, c, d, e, f)
+#endif
+
+#if !defined(ECN_DBG_PUT_ENA) && !defined(ECN_CAP_PUT_ENA)
+#define itron_strerror(errorno) #errorno
+#else
+const char *_ecn_dbg_enod2str(ECN_ENOD_ID fa_enod_id);
+void _ecn_dbg_bindmp(const uint8_t *buffer, size_t len);
+const char *_ecn_dbg_esv2str(uint8_t fa_esv);
+const char *itron_strerror(int errorno);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TOPPERS_ECHONET_DBG_H */
Index: EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_fbs.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_fbs.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_fbs.c	(revision 270)
@@ -0,0 +1,432 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ *
+ *  Copyright (C) 2014-2016 Cores Co., Ltd. Japan
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ */
+
+/*
+ * åºå®é·ãããã¡å¯å¤é·ã¹ããªã¼ã 
+ */
+
+#include <mruby.h>
+#include <string.h>
+#include "echonet_fbs.h"
+#include "echonet_task.h"
+
+ER get_message(mrb_state *mrb, T_ECN_FST_BLK **ppk_msg, int size)
+{
+	void * blk;
+
+	*ppk_msg = NULL;
+
+	if ((size <= 0) || (size > DEF_ECN_FBS_BUF_MAXLEN))
+		return E_PAR;
+
+	blk = mrb_malloc_simple(mrb, ECHONET_MEMPOOL_BLOCK_SIZE);
+	if (blk == NULL)
+		return E_NOMEM;
+
+	memset(blk, 0, ECHONET_MEMPOOL_BLOCK_SIZE);
+	*ppk_msg = (T_ECN_FST_BLK *)(blk);
+	(*ppk_msg)->hdr.length = (uint16_t)size;
+
+	return E_OK;
+}
+
+void *get_block(mrb_state *mrb, T_ECN_FST_BLK *pk_msg, int pos, bool_t exp, int *size)
+{
+	void * buf;
+	void * blk;
+	int no;
+	T_ECN_SUB_BLK *mblk;
+	int temp;
+
+	if ((pos < 0) || (!exp && (pos >= pk_msg->hdr.length))) {
+		return NULL;
+	}
+
+	if (pos < DEF_ECN_FBS_FST_DAT_LEN) {
+		buf = (void *)&pk_msg->payload[pos];
+		temp = DEF_ECN_FBS_FST_DAT_LEN - pos;
+		if (temp < *size) {
+			*size = temp;
+		}
+	}
+	else {
+		pos -= DEF_ECN_FBS_FST_DAT_LEN;
+		no = pos / DEF_ECN_FBS_SUB_BUF_LEN;
+
+		mblk = pk_msg->lnk.p_sub[no];
+
+		pos -= no * DEF_ECN_FBS_SUB_BUF_LEN;
+		temp = DEF_ECN_FBS_SUB_BUF_LEN - pos;
+		if (temp < *size) {
+			*size = temp;
+		}
+		if (exp) {
+			if (mblk == NULL) {
+				blk = mrb_malloc_simple(mrb, ECHONET_MEMPOOL_BLOCK_SIZE);
+				if (blk == NULL)
+					return NULL;
+
+				mblk = (T_ECN_SUB_BLK *)(blk);
+
+				pk_msg->lnk.p_sub[no] = mblk;
+			}
+
+			temp = pos + *size + no * DEF_ECN_FBS_SUB_BUF_LEN + DEF_ECN_FBS_FST_DAT_LEN;
+			if (pk_msg->hdr.length < temp) {
+				pk_msg->hdr.length = (uint16_t)temp;
+			}
+		}
+
+		buf = &mblk->payload[pos];
+	}
+
+	return buf;
+}
+
+ER release_message(mrb_state *mrb, T_ECN_FST_BLK *pk_msg)
+{
+	int i;
+
+	for (i = 0; i < 32; i++) {
+		void * blk = pk_msg->lnk.p_sub[i];
+		if (blk == NULL)
+			continue;
+
+		mrb_free(mrb, blk);
+	}
+
+	mrb_free(mrb, pk_msg);
+
+	return E_OK;
+}
+
+int read_message(mrb_state *mrb, T_ECN_FST_BLK *pk_msg, int pos, void * dst, int size)
+{
+	int len, rest = size;
+	void * buf;
+
+	if (size <= 0)
+		return 0;
+
+	len = rest;
+	buf = get_block(mrb, pk_msg, pos, false, &len);
+	if ((buf == NULL) || (len <= 0))
+		return 0;
+
+	if ((pos + len) > pk_msg->hdr.length)
+		len = pk_msg->hdr.length - pos;
+
+	for (; ; ) {
+		memcpy(dst, buf, len);
+		dst = (void *)((intptr_t)dst + len);
+		rest -= len;
+		pos += len;
+
+		if (rest <= 0)
+			break;
+
+		len = rest;
+		buf = get_block(mrb, pk_msg, pos, false, &len);
+		if ((buf == NULL) || (len <= 0))
+			return size - rest;
+	}
+
+	return size;
+}
+
+int write_message(mrb_state *mrb, const void * src, T_ECN_FST_BLK *pk_msg, int pos, int size)
+{
+	int len, rest = size;
+	void * buf;
+
+	if (size <= 0)
+		return 0;
+
+	len = rest;
+	buf = get_block(mrb, pk_msg, pos, true, &len);
+	if ((buf == NULL) || (len <= 0))
+		return 0;
+
+	for (; ; ) {
+		memcpy(buf, src, len);
+		src = (void *)((intptr_t)src + len);
+		rest -= len;
+		pos += len;
+
+		if (rest <= 0)
+			break;
+
+		len = rest;
+		buf = get_block(mrb, pk_msg, pos, true, &len);
+		if ((buf == NULL) || (len <= 0))
+			return size - rest;
+	}
+
+	if (pk_msg->hdr.length < pos)
+		pk_msg->hdr.length = (uint16_t)pos;
+
+	return size;
+}
+
+int copy_message(mrb_state *mrb, T_ECN_FST_BLK *pk_src, int spos, T_ECN_FST_BLK *pk_dst, int dpos, int size)
+{
+	int dlen, slen, len, rest = size;
+	void * dbuf, *sbuf;
+
+	if (size <= 0)
+		return 0;
+
+	dlen = rest;
+	dbuf = get_block(mrb, pk_dst, dpos, true, &dlen);
+	if (dbuf == NULL)
+		return 0;
+
+	slen = rest;
+	sbuf = get_block(mrb, pk_src, spos, false, &slen);
+	if (sbuf == NULL)
+		return 0;
+
+	for (; ; ) {
+		len = (dlen < slen) ? dlen : slen;
+
+		if (len == 0)
+			return size - rest;
+
+		memcpy(dbuf, sbuf, len);
+
+		dpos += len;
+		spos += len;
+		rest -= len;
+
+		if (rest <= 0)
+			break;
+
+		dlen = rest;
+		dbuf = get_block(mrb, pk_dst, dpos, true, &dlen);
+		if (dbuf == NULL)
+			return size - rest;
+
+		slen = rest;
+		sbuf = get_block(mrb, pk_src, spos, false, &slen);
+		if (sbuf == NULL)
+			return size - rest;
+	}
+
+	return size;
+}
+
+/* ã¡ã¢ãªãã­ãã¯åå¾ ok:ãã¤ã³ã¿ NG:NULL */
+void *_ecn_fbs_mbx_get(mrb_state *mrb, ECN_FBS_SIZE_T fa_req_size)
+{
+	void *result;
+
+	if ((fa_req_size <= 0) || (fa_req_size > ECHONET_MEMPOOL_BLOCK_SIZE))
+		return NULL;
+
+	result = mrb_malloc_simple(mrb, ECHONET_MEMPOOL_BLOCK_SIZE);
+	if (result == NULL)
+		return NULL;
+
+	memset(result, 0, ECHONET_MEMPOOL_BLOCK_SIZE);
+
+	return result;
+}
+
+/* ã¡ã¢ãªãã­ãã¯è§£æ¾ */
+ER _ecn_fbs_mbx_rel(mrb_state *mrb, void *p)
+{
+	mrb_free(mrb, p);
+
+	return E_OK;
+}
+
+/* é åç¢ºä¿ */
+ER _ecn_fbs_cre(mrb_state *mrb, ECN_FBS_SIZE_T fa_req_size, ECN_FBS_ID *fp_id)
+{
+	return get_message(mrb, &fp_id->ptr, fa_req_size);
+}
+
+/* é åè§£æ¾ */
+ER _ecn_fbs_del(mrb_state *mrb, ECN_FBS_ID fa_id)
+{
+	return release_message(mrb, fa_id.ptr);
+}
+
+/* ä¿æãã¼ã¿ã®æç¡ */
+bool_t _ecn_fbs_exist_data(ECN_FBS_ID fa_id)
+{
+	return fa_id.ptr->hdr.length > fa_id.ptr->hdr.wr;
+}
+
+/* ä¿æãã¼ã¿é·ã®åå¾ */
+ECN_FBS_SSIZE_T _ecn_fbs_get_datalen(ECN_FBS_ID fa_id)
+{
+	return fa_id.ptr->hdr.length;
+}
+
+/* èª­ã¿åãã«ã¼ã½ã«ã®ä½ç½®åå¾ */
+ECN_FBS_SSIZE_T _ecn_fbs_get_rpos(ECN_FBS_ID fa_id)
+{
+	return fa_id.ptr->hdr.rd;
+}
+
+/* èª­ã¿åãã«ã¼ã½ã«ã®ä½ç½®è¨­å® */
+ER _ecn_fbs_set_rpos(ECN_FBS_ID fa_id, ECN_FBS_SSIZE_T fa_pos)
+{
+	if (fa_id.ptr->hdr.length <= (unsigned int)fa_pos)	/* ä½ç½®æå®ãå¤§ãããã */
+		return E_PAR;
+
+	fa_id.ptr->hdr.rd = fa_pos;
+
+	return E_OK;
+}
+
+/* èª­ã¿åãã«ã¼ã½ã«ã®ä½ç½®ç§»å */
+ER _ecn_fbs_seek_rpos(ECN_FBS_ID fa_id, ECN_FBS_SSIZE_T fa_seek)
+{
+	fa_id.ptr->hdr.rd += fa_seek;
+	if (fa_id.ptr->hdr.rd > fa_id.ptr->hdr.length)
+		fa_id.ptr->hdr.rd = fa_id.ptr->hdr.length;
+
+	return E_OK;
+}
+
+/* ä»»ææå®ä½ç½®ã®1byteèª­ã¿åã */
+int _ecn_fbs_peek(mrb_state *mrb, ECN_FBS_ID fa_id, ECN_FBS_SSIZE_T fa_seek)
+{
+	uint8_t result = 0;
+	int ret;
+
+	ret = read_message(mrb, fa_id.ptr, fa_seek, &result, 1);
+
+	return (ret == 1) ? result : -1;
+}
+
+/* ä»»ææå®ä½ç½®ã®1byteæ¸ãè¾¼ã¿ */
+ER _ecn_fbs_poke(mrb_state *mrb, ECN_FBS_ID fa_id, ECN_FBS_SSIZE_T fa_seek, int fa_val)
+{
+	uint8_t result = fa_val;
+	int ret;
+
+	ret = write_message(mrb, &result, fa_id.ptr, fa_seek, 1);
+
+	return (ret == 1) ? E_OK : E_PAR;
+}
+
+/* ãã¼ã¿è¿½å  */
+ER _ecn_fbs_add_data(mrb_state *mrb, ECN_FBS_ID fa_id, const void *fa_dat, ECN_FBS_SSIZE_T fa_len)
+{
+	if ((fa_id.ptr->hdr.wr + fa_len) > fa_id.ptr->hdr.length)
+		return E_PAR;
+
+	fa_id.ptr->hdr.wr += write_message(mrb, fa_dat, fa_id.ptr, fa_id.ptr->hdr.wr, fa_len);
+	return E_OK;
+}
+
+/* ãã¼ã¿è¿½å (é åãèªåçã«æ¡å¼µãã) */
+ER _ecn_fbs_add_data_ex(mrb_state *mrb, ECN_FBS_ID fa_id, const void *fa_dat, ECN_FBS_SSIZE_T fa_len)
+{
+	fa_id.ptr->hdr.wr += write_message(mrb, fa_dat, fa_id.ptr, fa_id.ptr->hdr.wr, fa_len);
+	return E_OK;
+}
+
+/* ãã¼ã¿åå¾ */
+ER _ecn_fbs_get_data(mrb_state *mrb, ECN_FBS_ID fa_id, void *fa_buf, ECN_FBS_SSIZE_T fa_maxlen, ECN_FBS_SSIZE_T *p_len)
+{
+	int ret;
+
+	ret = read_message(mrb, fa_id.ptr, fa_id.ptr->hdr.rd, fa_buf, fa_maxlen);
+	fa_id.ptr->hdr.rd += ret;
+	*p_len = ret;
+
+	return E_OK;
+}
+
+#define loc_cpu() 
+#define unl_cpu() 
+
+ER ecn_fbs_enqueue(T_ECN_FBS_QUEUE *pk_queue, T_ECN_FST_BLK *pk_buf)
+{
+	loc_cpu();
+
+	*((T_ECN_FST_BLK **)pk_buf->_msg) = NULL;
+	if (pk_queue->pk_head != NULL) {
+		*((T_ECN_FST_BLK **)pk_queue->pk_last->_msg) = pk_buf;
+	}
+	else {
+		pk_queue->pk_head = pk_buf;
+	}
+	pk_queue->pk_last = pk_buf;
+
+	unl_cpu();
+
+	return E_OK;
+}
+
+ER ecn_fbs_dequeue(T_ECN_FBS_QUEUE *pk_queue, T_ECN_FST_BLK **ppk_buf)
+{
+	ER ercd;
+
+	loc_cpu();
+
+	if (pk_queue->pk_head != NULL) {
+		*ppk_buf = pk_queue->pk_head;
+		pk_queue->pk_head = *((T_ECN_FST_BLK **)(*ppk_buf)->_msg);
+		ercd = E_OK;
+	}
+	else {
+		ercd = E_TMOUT;
+	}
+
+	unl_cpu();
+
+	return ercd;
+}
Index: EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_fbs.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_fbs.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_fbs.h	(revision 270)
@@ -0,0 +1,309 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2014-2016 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ */
+
+/*
+ * åºå®é·ãããã¡å¯å¤é·ã¹ããªã¼ã 
+ */
+
+#ifndef TOPPERS_ECHONET_FBS_H
+#define TOPPERS_ECHONET_FBS_H
+
+#include <stddef.h>
+#include <stdint.h>
+#include "echonet.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef NUM_ECHONET_MEMPOOL_BLOCK
+#define NUM_ECHONET_MEMPOOL_BLOCK (60)		/* é»æç¨ã¡ã¢ãªãã­ãã¯ã®æ° */
+#endif /* NUM_ECHONET_MEMPOOL_BLOCK */
+
+#ifndef ECHONET_MEMPOOL_BLOCK_SIZE
+#define ECHONET_MEMPOOL_BLOCK_SIZE (256)	/* é»æç¨ã¡ã¢ãªãã­ãã¯ã®ãµã¤ãº */
+#endif /* ECHONET_MEMPOOL_BLOCK_SIZE */
+
+typedef unsigned int ECN_FBS_SIZE_T;	/* size_tç¸å½  */
+typedef int ECN_FBS_SSIZE_T;			/* ssize_tç¸å½ */
+
+/* T_EDATAç®¡çé åãµã¤ãº */
+#define DEF_ECN_EDT_HDR_LEN (sizeof(intptr_t))
+
+/* ç®¡çé åãµã¤ãº(64byte - sizeof(T_MSG)) */
+/* #define DEF_ECN_FBS_LIB_HDR_LEN ((ECHONET_MEMPOOL_BLOCK_SIZE + sizeof(int) - 1)>> 2) // */
+#define DEF_ECN_FBS_LIB_HDR_LEN (64 - DEF_ECN_EDT_HDR_LEN)
+
+/* ç®¡çé åãå«ããã­ãã¯ã«ä¿æãããã¼ã¿ãµã¤ãº */
+#define DEF_ECN_FBS_FST_DAT_LEN (64)
+
+/* ãªã³ã¯ãã¤ã³ã¿é
+åã®ãµã¤ãº(byte) */
+#define DEF_ECN_FBS_LNK_LEN (ECHONET_MEMPOOL_BLOCK_SIZE - DEF_ECN_EDT_HDR_LEN - DEF_ECN_FBS_LIB_HDR_LEN - DEF_ECN_FBS_FST_DAT_LEN)
+
+/* åºå®é·ãããã¡æå¤§ãµã¤ãº */
+#define DEF_ECN_FBS_BUF_MAXLEN ((DEF_ECN_FBS_LNK_LEN / sizeof(void *)) * ECHONET_MEMPOOL_BLOCK_SIZE + DEF_ECN_FBS_FST_DAT_LEN)
+
+/* å­è¦ç´ ãããã¡ã®ãµã¤ãº */
+#define DEF_ECN_FBS_SUB_BUF_LEN ECHONET_MEMPOOL_BLOCK_SIZE
+
+/* é»æã®ç¨®å¥(å
+å®¹ã¯ä»®) */
+typedef enum
+{
+	ECN_FBS_TYPE_BLANK		=	0,		/* æªä½¿ç¨ã¹ããªã¼ã  */
+	ECN_FBS_TYPE_INTERNAL	=	1,		/* å
+é¨ã¡ãã»ã¼ã¸ */
+	ECN_FBS_TYPE_ECHONET	=	2		/* ECHONETé»æ */
+} TA_ECN_MSG_TYPE;
+
+/* ãªã³ã¯ãã¤ã³ã¿é
+åã«åæããããå­è¦ç´ ãããã¡ */
+typedef struct
+{
+	uint8_t	payload[ECHONET_MEMPOOL_BLOCK_SIZE];
+} T_ECN_SUB_BLK;
+
+/* ãªã³ã¯ãã¤ã³ã¿é
+å */
+typedef union
+{
+	T_ECN_SUB_BLK	*p_sub[DEF_ECN_FBS_LNK_LEN / sizeof(T_ECN_SUB_BLK *)];
+	uint8_t			bin[DEF_ECN_FBS_LNK_LEN];
+} T_ECN_FBS_LNK;
+
+/* ç®¡çé å(64byte - sizeof(T_MSG)) */
+typedef struct
+{
+	uint16_t	length;			/* ã¡ãã»ã¼ã¸é· */
+	uint16_t	type;			/* ã¡ãã»ã¼ã¸ã¿ã¤ã */
+	union{
+		ECN_ENOD_ID id;			/* éä¿¡å
+ãã¼ãIDï¼ECHONETé»æï¼ */
+		struct ecn_fbs_queue *mbxid;	/* éä¿¡å
+ã¡ã¼ã«ããã¯ã¹IDï¼å
+é¨ã¡ãã»ã¼ã¸ï¼ */
+	}sender;
+	union{
+		ECN_ENOD_ID id;			/* éä¿¡å
+ãã¼ãIDï¼ECHONETé»æï¼ */
+		struct ecn_fbs_queue *mbxid;	/* éä¿¡å
+ã¡ã¼ã«ããã¯ã¹IDï¼å
+é¨ã¡ãã»ã¼ã¸ï¼ */
+	}target;
+	union{
+		ECN_ENOD_ID id;			/* è¿ä¿¡å
+ãã¼ãIDï¼ECHONETé»æï¼ */
+		struct ecn_fbs_queue *mbxid;	/* è¿ä¿¡å
+ã¡ã¼ã«ããã¯ã¹IDï¼å
+é¨ã¡ãã»ã¼ã¸ï¼ */
+	}reply;
+
+	int			rd;				/*	èª­ã¿åããããæ
+å ±	*/
+	int			wr;				/*	æ¸ãè¾¼ã¿ãããæ
+å ±	*/
+} T_ECN_FBS_HDR;
+
+/* ç®¡çé åãå«ããã­ãã¯ã®æ§é  */
+typedef struct
+{
+	uint8_t	_msg[DEF_ECN_EDT_HDR_LEN];	/* T_MSG */
+	T_ECN_FBS_HDR	hdr;	/*	ç®¡çé å  64byte  - sizeof(T_MSG)	*/
+	uint8_t			_gap[DEF_ECN_FBS_LIB_HDR_LEN - sizeof(T_ECN_FBS_HDR)];
+	T_ECN_FBS_LNK	lnk;	/*	ãªã³ã¯ãã¤ã³ã¿é
+å	128byte			*/
+	uint8_t			payload[DEF_ECN_FBS_FST_DAT_LEN];
+} T_ECN_FST_BLK;
+
+/* FBS-ID */
+typedef struct ecn_fbs_id_strc
+{
+	T_ECN_FST_BLK	*ptr;
+} ECN_FBS_ID;
+
+/* ã¡ãã»ã¼ã¸ã­ã¥ã¼ */
+typedef struct ecn_fbs_queue
+{
+	T_ECN_FST_BLK	*pk_head;		/* å
+é ­ã®ã¡ãã»ã¼ã¸ */
+	T_ECN_FST_BLK	*pk_last;		/* æ«å°¾ã®ã¡ãã»ã¼ã¸ */
+} T_ECN_FBS_QUEUE;
+
+/* ã¡ã¢ãªãã­ãã¯åå¾ ok:ãã¤ã³ã¿ NG:NULL */
+void *_ecn_fbs_mbx_get(mrb_state *mrb, ECN_FBS_SIZE_T fa_req_size);
+
+/* ã¡ã¢ãªãã­ãã¯è§£æ¾ ok:0 NG:é0 */
+ER _ecn_fbs_mbx_rel(mrb_state *mrb, void *p);
+
+/*
+ * é åç¢ºä¿
+ *	å¼æ°
+ *		ECN_FBS_SIZE_T	fa_req_size		è¦æ±ãããã¡ãµã¤ãº(byte)
+ *										max: DEF_ECN_FBS_BUF_MAXLEN
+ *		ECN_FBS_ID		*fp_id			ç¢ºä¿ããFBS-IDã®æ ¼ç´å
+
+ *	æ»ãå¤
+ *		ER				0:ok é0:NG
+ */
+ER _ecn_fbs_cre(mrb_state *mrb, ECN_FBS_SIZE_T fa_req_size, ECN_FBS_ID *fp_id);
+
+/*
+ * é åè§£æ¾
+ *	å¼æ°
+ *		ecn_fbs_idå	ç¢ºä¿ããFBS-ID
+ *	æ»ãå¤
+ *		ER				0:ok, é0:NG
+ */
+ER _ecn_fbs_del(mrb_state *mrb, ECN_FBS_ID fa_id);
+
+/*
+ * ä¿æãã¼ã¿ã®æç¡
+ *	å¼æ°
+ *		ecn_fbs_idå	ç¢ºä¿ããFBS-ID
+ *	æ»ãå¤
+ *		bool_t			0:ç¡ã, 1:ãã
+ */
+bool_t _ecn_fbs_exist_data(ECN_FBS_ID fa_id);
+
+/*
+ * ä¿æãã¼ã¿é·ã®åå¾
+ *	å¼æ°
+ *		ecn_fbs_idå	ç¢ºä¿ããFBS-ID
+ *	æ»ãå¤
+ *		ECN_FBS_SSIZE_T	ä¿æãã¦ãããã¼ã¿ã®é·ã(byte) -1:NG
+ */
+ECN_FBS_SSIZE_T _ecn_fbs_get_datalen(ECN_FBS_ID fa_id);
+
+/*
+ * èª­ã¿åãã«ã¼ã½ã«ã®ä½ç½®åå¾
+ *	å¼æ°
+ *		ecn_fbs_idå	ç¢ºä¿ããFBS-ID
+ *	æ»ãå¤
+ *		ECN_FBS_SIZE_T	å
+é ­ããã®çµ¶å¯¾ä½ç½® -1:NG
+ */
+ECN_FBS_SSIZE_T _ecn_fbs_get_rpos(ECN_FBS_ID fa_id);
+
+/*
+ * èª­ã¿åãã«ã¼ã½ã«ã®ä½ç½®è¨­å®
+ *	å¼æ°
+ *		ecn_fbs_idå	ç¢ºä¿ããFBS-ID
+ *		ECN_FBS_SIZE_T	fa_pos	è¨­å®ããä½ç½®(å
+é ­ããã®çµ¶å¯¾ä½ç½®)
+ *	æ»ãå¤
+ *		ER				0:ok, é0:NG
+ */
+ER _ecn_fbs_set_rpos(ECN_FBS_ID fa_id, ECN_FBS_SSIZE_T fa_pos);
+
+/*
+ * èª­ã¿åãã«ã¼ã½ã«ã®ä½ç½®ç§»å
+ *	å¼æ°
+ *		ecn_fbs_idå	ç¢ºä¿ããFBS-ID
+ *		ECN_FBS_SIZE_T	fa_seek	ç§»åé(ç¾ç¶ãåé²ã®ã¿)
+ *	æ»ãå¤
+ *		ER				0:ok, é0:NG
+ */
+ER _ecn_fbs_seek_rpos(ECN_FBS_ID fa_id, ECN_FBS_SSIZE_T fa_seek);
+
+/*
+ * ä»»ææå®ä½ç½®ã®1byteèª­ã¿åã
+ */
+int _ecn_fbs_peek(mrb_state *mrb, ECN_FBS_ID fa_id, ECN_FBS_SSIZE_T fa_seek);
+
+/*
+ * ä»»ææå®ä½ç½®ã®1byteæ¸ãè¾¼ã¿
+ */
+ER _ecn_fbs_poke(mrb_state *mrb, ECN_FBS_ID fa_id, ECN_FBS_SSIZE_T fa_seek, int fa_val);
+
+/*
+ * ãã¼ã¿è¿½å 
+ *	å¼æ°
+ *		ecn_fbs_idå	ç¢ºä¿ããFBS-ID
+ *		const void *	fa_dat	è¿½å ãããã¼ã¿
+ *		ECN_FBS_SSIZE_T	fa_len	è¿½å ããé·ã(byte)
+ *	æ»ãå¤
+ *		ER				0:ok, é0:NG
+ */
+ER _ecn_fbs_add_data(mrb_state *mrb, ECN_FBS_ID fa_id, const void *fa_dat, ECN_FBS_SSIZE_T fa_len);
+
+/*
+ * ãã¼ã¿è¿½å (é åãèªåçã«æ¡å¼µãã)
+ *	å¼æ°
+ *		ecn_fbs_idå	ç¢ºä¿ããFBS-ID
+ *		const void *	fa_dat	è¿½å ãããã¼ã¿
+ *		ECN_FBS_SSIZE_T	fa_len	è¿½å ããé·ã(byte)
+ *	æ»ãå¤
+ *		ER				0:ok, é0:NG
+ */
+ER _ecn_fbs_add_data_ex(mrb_state *mrb, ECN_FBS_ID fa_id, const void *fa_dat, ECN_FBS_SSIZE_T fa_len);
+
+/*
+ * ãã¼ã¿åå¾
+ *	å¼æ°
+ *		ecn_fbs_idå	ç¢ºä¿ããFBS-ID
+ *		void *			fa_buf		åå¾ãããããã¡
+ *		ECN_FBS_SSIZE_T	fa_maxlen	åå¾ããé·ã(byte)
+ *		ECN_FBS_SSIZE_T	*p_len		åå¾ããé·ã(byte)
+ *	æ»ãå¤
+ *		ER				0:ok, é0:NG
+ */
+ER _ecn_fbs_get_data(mrb_state *mrb, ECN_FBS_ID fa_id, void *fa_buf, ECN_FBS_SSIZE_T fa_maxlen,
+	ECN_FBS_SSIZE_T *p_len);
+
+ER ecn_fbs_enqueue(T_ECN_FBS_QUEUE *pk_queue, T_ECN_FST_BLK *pk_buf);
+ER ecn_fbs_dequeue(T_ECN_FBS_QUEUE *pk_queue, T_ECN_FST_BLK **ppk_buf);
+
+#ifdef __cplusplus
+}   /* extern "C" */
+#endif
+
+#endif /* #ifndef TOPPERS_ECHONET_FBS_H */
Index: EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_lcl_task.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_lcl_task.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_lcl_task.c	(revision 270)
@@ -0,0 +1,624 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2014-2016 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ */
+
+/*
+ *		ECHONET Lite LCLéä¿¡å¦çã¿ã¹ã¯
+ */
+
+#include <mruby.h>
+#include <mruby/data.h>
+#include <mruby/string.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "echonet.h"
+
+#include "echonet_task.h"
+#include "echonet_lcl_task.h"
+#include "echonet_dbg.h"
+#include "mrb_ecnl.h"
+
+#ifndef ECHONET_LCL_TASK_GET_TIMER
+#define ECHONET_LCL_TASK_GET_TIMER	TMO_FEVR
+#endif /* ECHONET_LCL_TASK_GET_TIMER */
+
+#ifndef ECHONET_LCL_TASK_PROGRESS
+#define ECHONET_LCL_TASK_PROGRESS(timer)
+#endif /* ECHONET_LCL_TASK_PROGRESS */
+
+#ifndef ECHONET_LCL_TASK_TIMEOUT
+#define ECHONET_LCL_TASK_TIMEOUT
+#endif /* ECHONET_LCL_TASK_TIMEOUT */
+
+#ifndef ECHONET_LCL_SEND_TO_MBX
+#define ECHONET_LCL_SEND_TO_MBX
+#endif /* ECHONET_LCL_SEND_TO_MBX */
+
+static ECN_ENOD_ID lcl_get_id(ecnl_svc_task_t *svc, T_EDATA *edata, const mrb_value ep);
+static mrb_value lcl_get_addr(ecnl_svc_task_t *svc, ECN_ENOD_ID fa_enodid);
+void _ecn_int_msg(ecnl_svc_task_t *svc, ECN_FBS_ID fbs_id, ECN_FBS_SSIZE_T a_snd_len);
+void _ecn_esv_msg(ecnl_svc_task_t *svc, ECN_FBS_ID fbs_id);
+
+/*
+ * åä¿¡ããLCLãã¼ã¿ãMAILBOXã«éã
+ */
+ER _ecn_lcl2mbx(ecnl_svc_task_t *svc, const uint8_t *buffer, size_t fa_len, const mrb_value dst);
+ER _ecn_lcl2mbx(ecnl_svc_task_t *svc, const uint8_t *buffer, size_t fa_len, const mrb_value dst)
+{
+	mrb_state *mrb = svc->mrb;
+	ECN_FBS_ID	a_fbs_id = { 0 };
+	ER			a_ret = E_OK;
+	ECN_ENOD_ID	a_enod_id;
+	union
+	{
+		const uint8_t			*buffer;
+		const T_ECN_EDT_HDR		*t_esv;
+	} a_rcv_pkt;
+
+	a_rcv_pkt.buffer = buffer;
+	if (	a_rcv_pkt.t_esv->ecn_hdr.ehd1 != ECN_EDH1_ECHONET_LITE	/* ECHONET Liteè¦æ ¼	*/
+	||	a_rcv_pkt.t_esv->ecn_hdr.ehd2 != ECN_EDH2_FORMAT_1			/* é»æå½¢å¼1		*/) {
+		ECN_DBG_PUT_2("[LCL ECHO SRV] illegal type (0x%02X,0x%02X)", a_rcv_pkt.t_esv->ecn_hdr.ehd1, a_rcv_pkt.t_esv->ecn_hdr.ehd2);
+		return E_PAR;
+	}
+
+#ifdef ECN_DBG_PUT_ENA
+	_ecn_dbg_bindmp(buffer, fa_len);
+#endif
+
+	a_ret = _ecn_fbs_cre(mrb, fa_len, &a_fbs_id);
+	if (a_ret != E_OK) {
+		ECN_DBG_PUT_2("[LCL ECHO SRV] _ecn_fbs_cre() result = %d:%s", a_ret, itron_strerror(a_ret));
+		return a_ret;
+	}
+	a_ret = _ecn_fbs_add_data_ex(mrb, a_fbs_id, buffer, fa_len);
+	if (a_ret) {
+		ECN_DBG_PUT_2("[LCL ECHO SRV] _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
+		goto lb_except;
+	}
+	a_fbs_id.ptr->hdr.type = ECN_MSG_ECHONET;
+	a_fbs_id.ptr->hdr.target.id = ENOD_LOCAL_ID;
+	a_fbs_id.ptr->hdr.sender.id = ENOD_NOT_MATCH_ID;
+
+	/* éä¿¡ã¬ã¤ã¤ã¼ã¢ãã¬ã¹ãããªã¢ã¼ãECHONETãã¼ãã¸å¤æ */
+	a_enod_id = lcl_get_id(svc, (T_EDATA *)a_fbs_id.ptr, dst);
+	if (!lcl_is_valid_addrid(svc, a_enod_id)) {
+		ECN_DBG_PUT_1("[LCL ECHO SRV] lcl src(%s) echonet-node not found.",
+			ip2str(NULL, &dst->lcladdr));
+	} else {
+		/* éä¿¡å
+ECHONETãã¼ããè¨é² */
+		a_fbs_id.ptr->hdr.sender.id = a_enod_id;
+	}
+	a_fbs_id.ptr->hdr.reply.id = a_fbs_id.ptr->hdr.sender.id;
+
+	/* echonet_taskã«éã */
+	a_ret = ecn_fbs_enqueue(&svc->svc_mbxid, a_fbs_id.ptr);
+	if (a_ret != E_OK) {
+		ECN_DBG_PUT_2("[LCL ECHO SRV] snd_mbx(svc->svc_mbxid) result = %d:%s", a_ret, itron_strerror(a_ret));
+		goto lb_except;
+	}
+	return a_ret;
+lb_except:
+	_ecn_fbs_del(mrb, a_fbs_id);
+	return a_ret;
+}
+
+/*
+* ECHONET Lite éä¿¡ã¬ã¤ã¤ã¼ã¿ã¹ã¯ ã¿ã¤ãã¼å¤åå¾
+*/
+TMO echonet_lcltask_get_timer(ecnl_svc_task_t *svc)
+{
+	TMO a_timer;
+
+	a_timer = ECHONET_LCL_TASK_GET_TIMER;
+
+	return a_timer;
+}
+
+
+/*
+* ECHONET Lite éä¿¡ã¬ã¤ã¤ã¼ã¿ã¹ã¯ æéçµéå¦ç
+*/
+void echonet_lcltask_progress(ecnl_svc_task_t *svc, TMO a_timer)
+{
+	ECHONET_LCL_TASK_PROGRESS(a_timer);
+}
+
+/*
+* ECHONET Lite éä¿¡ã¬ã¤ã¤ã¼ã¿ã¹ã¯ ã¡ãã»ã¼ã¸åä¿¡å¦ç
+*/
+void echonet_lcltask_recv_msg(ecnl_svc_task_t *svc, T_ECN_FST_BLK *p_msg)
+{
+	ECN_FBS_ID a_fbs_id;
+	ECN_FBS_SSIZE_T	a_snd_len;
+
+	a_fbs_id.ptr = p_msg;
+
+	/* éä¿¡ãã¼ã¿é·ãåå¾ */
+	a_snd_len = _ecn_fbs_get_datalen(a_fbs_id);
+
+	ECN_DBG_PUT_1("trcv_dtq() mbx recv (%d byte)", a_snd_len);
+
+	switch (a_fbs_id.ptr->hdr.type) {
+		/* å
+é¨ä½¿ç¨ã¡ãã»ã¼ã¸ */
+	case ECN_MSG_INTERNAL:
+		_ecn_int_msg(svc, a_fbs_id, a_snd_len);
+		break;
+
+		/* ECHONETç¨ã¡ãã»ã¼ã¸ */
+	case ECN_MSG_ECHONET:
+		_ecn_esv_msg(svc, a_fbs_id);
+		break;
+
+	default:
+		ECN_DBG_PUT_1("echonet_task() a_fbs_id.ptr->k.hdr.k.t_edt.type:0x%02X undefined.", a_fbs_id.ptr->hdr.type);
+	}
+
+	/* é åè§£æ¾ */
+	_ecn_fbs_del(svc->mrb, a_fbs_id);
+}
+
+/*
+* ECHONET Lite éä¿¡ã¬ã¤ã¤ã¼ã¿ã¹ã¯ ã¿ã¤ã ã¢ã¦ãå¦ç
+*/
+void echonet_lcltask_timeout(ecnl_svc_task_t *svc)
+{
+	ECHONET_LCL_TASK_TIMEOUT;
+}
+
+/* å¿ç­é»æç¨fbsè¨­å®(sender/targetã®è¨­å®) */
+static ER _ecn_lcl_cre_req_fbs(ecnl_svc_task_t *svc, T_ECN_FBS_QUEUE *sender, uint8_t cmd, ECN_FBS_ID *pk_req)
+{
+	mrb_state *mrb = svc->mrb;
+	ER ret;
+	ECN_FBS_ID req;
+
+	ret = _ecn_fbs_cre(mrb, 1, &req);
+	if (ret != E_OK) {
+		ECN_DBG_PUT_2("_ecn_lcl_cre_req_fbs() : _ecn_fbs_cre() result = %d:%s", ret, itron_strerror(ret));
+		return ret;
+	}
+
+	ret = _ecn_fbs_add_data(mrb, req, &cmd, sizeof(cmd));
+	if (ret != E_OK) {
+		_ecn_fbs_del(mrb, req);
+		ECN_DBG_PUT_2("_ecn_lcl_cre_req_fbs() : _ecn_fbs_add_data() result = %d:%s", ret, itron_strerror(ret));
+		return ret;
+	}
+
+	req.ptr->hdr.type = ECN_MSG_INTERNAL;
+	req.ptr->hdr.sender.mbxid = sender;
+	req.ptr->hdr.target.mbxid = &svc->lcl_mbxid;
+	req.ptr->hdr.reply.mbxid = sender;
+
+	*pk_req = req;
+
+	return E_OK;
+}
+
+/* å¿ç­é»æç¨fbsè¨­å®(sender/targetã®è¨­å®) */
+static ER _ecn_lcl_cre_res_fbs(ecnl_svc_task_t *svc, ECN_FBS_ID req, uint8_t cmd, ECN_FBS_ID *pk_res)
+{
+	mrb_state *mrb = svc->mrb;
+	ER ret;
+	ECN_FBS_ID res;
+
+	ret = _ecn_fbs_cre(mrb, 1, &res);
+	if (ret != E_OK) {
+		ECN_DBG_PUT_2("_ecn_lcl_cre_res_fbs() : _ecn_fbs_cre() result = %d:%s", ret, itron_strerror(ret));
+		return ret;
+	}
+
+	ret = _ecn_fbs_add_data(mrb, res, &cmd, sizeof(cmd));
+	if (ret != E_OK) {
+		_ecn_fbs_del(mrb, res);
+		ECN_DBG_PUT_2("_ecn_lcl_cre_res_fbs() : _ecn_fbs_add_data() result = %d:%s", ret, itron_strerror(ret));
+		return ret;
+	}
+
+	res.ptr->hdr.type = ECN_MSG_INTERNAL;
+	res.ptr->hdr.sender.mbxid = &svc->lcl_mbxid;
+	res.ptr->hdr.target.mbxid = req.ptr->hdr.reply.mbxid;
+	res.ptr->hdr.reply.mbxid = &svc->lcl_mbxid;
+
+	*pk_res = res;
+
+	return E_OK;
+}
+
+/*
+ *  å
+é¨ã¡ãã»ã¼ã¸åä¿¡å¦ç
+ */
+void _ecn_int_msg(ecnl_svc_task_t *svc, ECN_FBS_ID fbs_id, ECN_FBS_SSIZE_T a_snd_len)
+{
+	mrb_state *mrb = svc->mrb;
+	ER result = E_OK, a_ret;
+	ecn_lcl_msg_get_lcladdr_req_t msg;
+	ecn_lcl_msg_get_lcladdr_error_t err;
+	ECN_FBS_SSIZE_T len;
+	ECN_FBS_ID buf;
+	uint8_t cmd;
+	mrb_value addr;
+
+	a_ret = _ecn_fbs_get_data(mrb, fbs_id, &cmd, 1, &len);
+	if (a_ret != E_OK) {
+		ECN_DBG_PUT_2("[LCL TSK] _ecn_fbs_get_data() result = %d:%s", a_ret, itron_strerror(a_ret));
+		return;
+	}
+
+	switch(cmd){
+	// éä¿¡ã¬ã¤ã¤ã¼ã¢ãã¬ã¹ãè¿ä¿¡
+	case ECN_LCL_MSG_GET_LCLADDR_REQ:
+		if (a_snd_len < sizeof(msg)) {
+			result = E_PAR;
+			break;
+		}
+
+		a_snd_len = 0;
+		a_ret = _ecn_fbs_get_data(mrb, fbs_id, &msg, sizeof(msg), &a_snd_len);
+		if (a_ret != E_OK) {
+			ECN_DBG_PUT_2("[LCL TSK] _ecn_fbs_get_data() result = %d:%s", a_ret, itron_strerror(a_ret));
+		}
+
+		if (!lcl_is_valid_addrid(svc, msg.enodid)) {
+			result = E_PAR;
+			break;
+		}
+		
+		a_ret = _ecn_lcl_cre_res_fbs(svc, fbs_id, ECN_LCL_MSG_GET_LCLADDR_RES, &buf);
+		if (a_ret != E_OK) {
+			return;
+		}
+
+		a_ret = _ecn_fbs_add_data_ex(mrb, buf, &msg.requestid, offsetof(ecn_lcl_msg_get_lcladdr_res_t, enodadrb));
+		if (a_ret != E_OK) {
+			_ecn_fbs_del(mrb, buf);
+			ECN_DBG_PUT_2("_ecn_int_msg() : _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
+			return;
+		}
+
+		addr = lcl_get_remote_addr(svc, msg.enodid);
+		a_ret = _ecn_fbs_add_data_ex(mrb, buf, &addr, sizeof(addr));
+		if (a_ret != E_OK) {
+			_ecn_fbs_del(mrb, buf);
+			ECN_DBG_PUT_2("_ecn_int_msg() : _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
+			return;
+		}
+
+		a_ret = ecn_fbs_enqueue(buf.ptr->hdr.target.mbxid, buf.ptr);
+		if (a_ret != E_OK) {
+			_ecn_fbs_del(mrb, buf);
+			ECN_DBG_PUT_2("_ecn_int_msg() : psnd_dtq() result = %d:%s", a_ret, itron_strerror(a_ret));
+			return;
+		}
+		return;
+	}
+
+	a_ret = _ecn_lcl_cre_res_fbs(svc, fbs_id, ECN_LCL_MSG_GET_LCLADDR_ERROR, &buf);
+	if (a_ret != E_OK) {
+		return;
+	}
+
+	err.requestid = msg.requestid;
+	err.error = result;
+	a_ret = _ecn_fbs_add_data_ex(mrb, buf, &err, sizeof(err));
+	if (a_ret != E_OK) {
+		_ecn_fbs_del(mrb, buf);
+		ECN_DBG_PUT_2("_ecn_int_msg() : _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
+		return;
+	}
+
+	a_ret = ecn_fbs_enqueue(buf.ptr->hdr.target.mbxid, buf.ptr);
+	if (a_ret != E_OK) {
+		_ecn_fbs_del(mrb, buf);
+		ECN_DBG_PUT_2("_ecn_int_msg() : psnd_dtq() result = %d:%s", a_ret, itron_strerror(a_ret));
+		return;
+	}
+}
+
+/*
+ *  ECHONET é»æåä¿¡å¦ç
+ */
+void _ecn_esv_msg(ecnl_svc_task_t *svc, ECN_FBS_ID fbs_id)
+{
+	mrb_state *mrb = svc->mrb;
+	size_t a_len = _ecn_fbs_get_datalen(fbs_id);
+	mrb_value a_msg;
+	mrb_value a_dst;
+	ER a_ret;
+	ECN_FBS_SSIZE_T a_snd_len;
+
+	/* éä¿¡å
+éä¿¡ã¬ã¤ã¤ã¼ã¢ãã¬ã¹ */
+	a_dst = lcl_get_addr(svc, fbs_id.ptr->hdr.target.id);
+	if (mrb_type(a_dst) != MRB_TT_FALSE/*nil*/) {
+		ECN_DBG_PUT_4("[LCL TSK] echonet-node 0x%02X-0x%02X-0x%02X â lcl dest(%s)",
+			((T_EDATA *)fbs_id.ptr)->hdr.edata.deoj.eojx1,
+			((T_EDATA *)fbs_id.ptr)->hdr.edata.deoj.eojx2,
+			((T_EDATA *)fbs_id.ptr)->hdr.edata.deoj.eojx3,
+			ip2str(NULL, &a_dst.lcladdr));
+
+		a_msg = mrb_str_buf_new(mrb, a_len);
+
+		/* fbsããåºåé åã«ãã¼ã¿ãæ½åº */
+		a_snd_len = 0;
+		a_ret = _ecn_fbs_get_data(mrb, fbs_id, RSTRING_PTR(a_msg), a_len, &a_snd_len);
+		if (a_ret != E_OK) {
+			ECN_DBG_PUT_2("[UDP TSK] _ecn_fbs_get_data() result = %d:%s", a_ret, itron_strerror(a_ret));
+		}
+		else if (lcl_is_local_addr(svc, a_dst)) {
+			RSTR_SET_LEN(RSTRING(a_msg), a_snd_len);
+
+			/* éä¿¡å
+ã127.0.0.1 â mbxã«è»¢é */
+			ECN_DBG_PUT_1("redirect svc->lcl_mbxid â svc->svc_mbxid (esv:0x%02X)",
+				((T_EDATA *)fbs_id.ptr)->hdr.edata.esv);
+
+			a_ret = _ecn_lcl2mbx(svc, (const uint8_t *)RSTRING_PTR(a_msg), RSTRING_LEN(a_msg), a_dst);
+			if (a_ret != E_OK) {
+				ECN_DBG_PUT_2("_ecn_esv_msg() : _ecn_lcl2mbx() result = %d:%s", a_ret, itron_strerror(a_ret));
+			}
+		}
+		else {
+			RSTR_SET_LEN(RSTRING(a_msg), a_snd_len);
+
+			ECN_DBG_PUT_2("[LCL TSK] lcl_snd_dat() to:%s %ubyte(s)",
+				ip2str(NULL, &a_dst.lcladdr), a_snd_len);
+#ifdef ECN_DBG_PUT_ENA
+			_ecn_dbg_bindmp(RSTRING_PTR(a_msg), a_snd_len);
+#endif
+			/* éä¿¡ã¬ã¤ã¤ã¼ã¸éä¿¡ */
+			a_ret = lcl_snd_msg(svc, a_dst, a_msg);
+			if (a_ret < 0) {
+				ECN_DBG_PUT_1("[LCL TSK] send, error: %s", itron_strerror(a_ret));
+			}
+		}
+
+		/* ãã¼ã¿ãé·ããã¦1ãã±ããã«åã¾ããªãã£ãå ´å */
+		if (_ecn_fbs_exist_data(fbs_id)) {
+			ECN_DBG_PUT_1("[LCL TSK] send, data so long: %dbyte(s)", _ecn_fbs_get_datalen(fbs_id));
+		}
+	} else {
+		ECN_DBG_PUT_3("[LCL TSK] echonet-node 0x%02X-0x%02X-0x%02X not found.",
+			((T_EDATA *)fbs_id.ptr)->hdr.edata.deoj.eojx1,
+			((T_EDATA *)fbs_id.ptr)->hdr.edata.deoj.eojx2,
+			((T_EDATA *)fbs_id.ptr)->hdr.edata.deoj.eojx3);
+	}
+}
+
+/*
+ *  ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã®ã³ã¼ã«ããã¯é¢æ°
+ */
+ER echonet_lcl_input_msg(ecnl_svc_task_t *svc, mrb_value ep, mrb_value data)
+{
+	ECHONET_LCL_SEND_TO_MBX;
+
+	_ecn_lcl2mbx(svc, (const uint8_t *)RSTRING_PTR(data), RSTRING_LEN(data), ep);
+
+	return E_OK;
+}
+
+/*
+ *  ãªã¢ã¼ãECHONETãã¼ãã®é©åç¢ºèª
+ */
+bool_t ecn_is_match(ecnl_svc_task_t *svc, const EOBJCB *enodcb, T_EDATA *edata, mrb_value ep)
+{
+	mrb_state *mrb = svc->mrb;
+	ER			ret;
+	T_ENUM_EPC	enm;
+	uint8_t		epc;
+	uint8_t		pdc;
+	uint8_t		p_edt[256];
+	int			i, j, k;
+	int			count;
+	const EOBJINIB	*p_eobj;
+	bool_t		match;
+
+	if (!edata)
+		return false;
+
+	/* ãã¼ãã¹ã¿ã¼ãæã¤ã³ã¹ã¿ã³ã¹ãªã¹ãéç¥ä»¥å¤ã¯é¤å¤ */
+	if (	edata->hdr.edata.esv != ESV_INF
+		||	edata->hdr.edata.deoj.eojx1 != EOJ_X1_PROFILE
+		||	edata->hdr.edata.deoj.eojx2 != EOJ_X2_NODE_PROFILE
+		||	edata->hdr.edata.deoj.eojx3 != 0x01
+		||	edata->hdr.edata.seoj.eojx1 != EOJ_X1_PROFILE
+		||	edata->hdr.edata.seoj.eojx2 != EOJ_X2_NODE_PROFILE
+		||	(	edata->hdr.edata.seoj.eojx3 != 0x01
+			&&	edata->hdr.edata.seoj.eojx3 != 0x02)) {
+		return false;
+	}
+
+	ret = ecn_itr_ini(&enm, edata);
+	if (ret) {
+		ECN_DBG_PUT_2("ecn_is_match(): ecn_itr_ini() result = %d:%s", ret, itron_strerror(ret));
+		return false;
+	}
+	while ((ret = ecn_itr_nxt(mrb, &enm, &epc, &pdc, p_edt)) == E_OK) {
+		if (enm.is_eof) {
+			break;
+		}
+		ECN_DBG_PUT_2("ecn_is_match(): ecn_itr_nxt() result: epc=0x%02X, pdc=%d", epc, pdc);
+		/* ã¤ã³ã¹ã¿ã³ã¹ãªã¹ãéç¥ã¾ãã¯èªãã¼ãã¤ã³ã¹ã¿ã³ã¹ãªã¹ãï¼³ä»¥å¤ã¯é¤å¤ */
+		if ((epc != 0xD5) && (epc != 0xD6)) {
+			continue;
+		}
+
+		/* ï¼ãã¤ãç®ä»¥éã«eojãåæããã¦ãã */
+		count = (pdc - 1) / sizeof(T_ECN_EOJ);
+
+		/* ãã¼ãå
+ã®æ©å¨ãªãã¸ã§ã¯ããæ¤ç´¢ */
+		for (k = 0; k < enodcb->eobjcnt; k++) {
+			p_eobj = enodcb->eobjs[k];
+
+			/* ã¤ã³ã¹ã¿ã³ã¹ãªã¹ããç¢ºèª */
+			match = false;
+			for (i = 0, j = 1; i < count; i++, j += sizeof(T_ECN_EOJ)) {
+				if (p_eobj->eojx1 != p_edt[j])
+					continue;
+				if (p_eobj->eojx2 != p_edt[j + 1])
+					continue;
+				if (p_eobj->eojx3 != p_edt[j + 2])
+					continue;
+
+				match = true;
+				break;
+			}
+
+			if (!match)
+				return false;
+		}
+
+		/* ãã¹ã¦æã£ã¦ãããé©åï¼ã¤ã³ã¹ã¿ã³ã¹ãªã¹ãã®æ¹ãå¤ãã¦ããããã¨ã¨ããï¼ */
+		return true;
+	}
+
+	return false;
+}
+
+/*
+ *  éä¿¡ã¬ã¤ã¤ã¼ã¢ãã¬ã¹ãããªã¢ã¼ãECHONETãã¼ãã¸å¤æ
+ */
+ECN_ENOD_ID lcl_get_id(ecnl_svc_task_t *svc, T_EDATA *edata, const mrb_value ep)
+{
+	ECN_ENOD_ID id;
+
+	if (lcl_is_local_addr(svc, ep))
+		return ENOD_LOCAL_ID;
+	if (lcl_is_multicast_addr(svc, ep))
+		return ENOD_MULTICAST_ID;
+
+	/* éä¿¡ã¬ã¤ã¤ã¼ã¢ãã¬ã¹ã®åããã®ãæ¤ç´¢ */
+	if ((id = lcl_get_remote_id(svc, ep)) != ENOD_NOT_MATCH_ID) {
+		ECN_CAP_PUT_2("lcl_get_id(): ip-found remote(%d) = %s",
+			id - ENOD_REMOTE_ID, ip2str(NULL, &lcladdr));
+		return id;
+	}
+
+	/* å¯¾å¿ãããªã¢ã¼ããã¼ããããã°éä¿¡ã¬ã¤ã¤ã¼ã¢ãã¬ã¹ãè¨­å® */
+	if ((id = lcl_set_remote_addr(svc, edata, ep)) != ENOD_NOT_MATCH_ID) {
+		ECN_CAP_PUT_2("lcl_get_id(): enod-found remote(%d) = %s",
+			id - ENOD_REMOTE_ID, ip2str(NULL, &lcladdr));
+		return id;
+	}
+
+	/* ç©ºãé åãæ¢ãã¦èªåç»é² */
+	if ((id = lcl_add_remote_addr(svc, edata, ep)) != ENOD_NOT_MATCH_ID) {
+		ECN_CAP_PUT_2("lcl_get_id(): empty-found remote(%d) = %s",
+			id - ENOD_REMOTE_ID, ip2str(NULL, &lcladdr));
+		return id;
+	}
+
+	return ENOD_NOT_MATCH_ID;
+}
+
+/*
+ *  ãªã¢ã¼ãECHONETãã¼ãããéä¿¡ã¬ã¤ã¤ã¼ã¢ãã¬ã¹ã¸å¤æ
+ */
+mrb_value lcl_get_addr(ecnl_svc_task_t *svc, ECN_ENOD_ID fa_enodid)
+{
+	if (fa_enodid == ENOD_MULTICAST_ID) {
+		/* targetãENOD_MULTICAST_IDã®å ´åããã«ãã­ã£ã¹ããè¡ã */
+		return lcl_get_multicast_addr(svc);
+	}
+
+	if (fa_enodid < ENOD_REMOTE_ID) {
+		/* targetãæªå®ç¾©ã»LOCALã»APIã®å ´åãã­ã¼ã«ã«é
+éãè¡ã */
+		return lcl_get_local_addr(svc);
+	}
+
+	return lcl_get_remote_addr(svc, fa_enodid);
+}
+
+ER ecn_lcl_get_lcladdr(ecnl_svc_task_t *svc, T_ECN_FBS_QUEUE *sender, int requestid, ECN_ENOD_ID enodid, ECN_FBS_ID *pk_req)
+{
+	mrb_state *mrb = svc->mrb;
+	ER a_ret;
+	ECN_FBS_ID req;
+	mrb_value addr;
+
+	a_ret = _ecn_lcl_cre_req_fbs(svc, sender, ECN_LCL_MSG_GET_LCLADDR_REQ, &req);
+	if (a_ret != E_OK) {
+		return a_ret;
+	}
+
+	a_ret = _ecn_fbs_add_data_ex(mrb, req, &requestid, sizeof(((ecn_lcl_msg_get_lcladdr_res_t *)0)->requestid));
+	if (a_ret != E_OK) {
+		_ecn_fbs_del(mrb, req);
+		ECN_DBG_PUT_2("ecn_lcl_get_lcladdr() : _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
+		return a_ret;
+	}
+
+	a_ret = _ecn_fbs_add_data_ex(mrb, req, &enodid, sizeof(((ecn_lcl_msg_get_lcladdr_res_t *)0)->enodid));
+	if (a_ret != E_OK) {
+		_ecn_fbs_del(mrb, req);
+		ECN_DBG_PUT_2("ecn_lcl_get_lcladdr() : _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
+		return a_ret;
+	}
+
+	addr = lcl_get_remote_addr(svc, enodid);
+	a_ret = _ecn_fbs_add_data_ex(mrb, req, &addr, sizeof(addr));
+	if (a_ret != E_OK) {
+		_ecn_fbs_del(mrb, req);
+		ECN_DBG_PUT_2("ecn_lcl_get_lcladdr() : _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
+		return a_ret;
+	}
+
+	*pk_req = req;
+
+	return E_OK;
+}
Index: EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_lcl_task.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_lcl_task.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_lcl_task.h	(revision 270)
@@ -0,0 +1,138 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2014-2016 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ */
+
+/*
+ *		ECHONET Lite ã¿ã¹ã¯
+ */
+
+#ifndef TOPPERS_ECHONET_LCL_TASK_H
+#define TOPPERS_ECHONET_LCL_TASK_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <mruby.h>
+#include "echonet.h"
+#include "echonet_fbs.h"
+
+/*
+ *  ECHONET Lite ä¸æåå ±ã¢ãã¬ã¹
+ */
+#ifdef SIL_ENDIAN_LITTLE
+#define ECHONET_MULTICAST_ADDR {0,23,0,224}
+#else
+#define ECHONET_MULTICAST_ADDR {224,0,23,0}
+#endif
+
+/*
+ *  ECHONET Lite ã¿ã¹ã¯é¢é£ã®å®æ°ã®ããã©ã«ãå¤ã®å®ç¾©
+ */
+#ifndef ECHONET_LCL_TASK_PRIORITY
+#define ECHONET_LCL_TASK_PRIORITY	3		/* åæåªå
+åº¦ */
+#endif /* ECHONET_LCL_TASK_PRIORITY */
+
+#ifndef ECHONET_LCL_TASK_STACK_SIZE
+#define ECHONET_LCL_TASK_STACK_SIZE	1024	/* ã¹ã¿ãã¯é åã®ãµã¤ãº */
+#endif /* ECHONET_LCL_TASK_STACK_SIZE */
+
+#ifndef NUM_ECHONET_LCL_MAILBOX
+#define NUM_ECHONET_LCL_MAILBOX	10
+#endif /* NUM_ECHONET_LCL_MAILBOX */
+
+ /* ECHONET Lite éä¿¡ã¬ã¤ã¤ã¼ã¿ã¹ã¯ ã¿ã¤ãã¼å¤åå¾ */
+TMO echonet_lcltask_get_timer(ecnl_svc_task_t *svc);
+
+/* ECHONET Lite éä¿¡ã¬ã¤ã¤ã¼ã¿ã¹ã¯ æéçµéå¦ç */
+void echonet_lcltask_progress(ecnl_svc_task_t *svc, TMO a_timer);
+
+/* ECHONET Lite éä¿¡ã¬ã¤ã¤ã¼ã¿ã¹ã¯ ã¡ãã»ã¼ã¸åä¿¡å¦ç */
+void echonet_lcltask_recv_msg(ecnl_svc_task_t *svc, T_ECN_FST_BLK *p_msg);
+
+/* ECHONET Lite éä¿¡ã¬ã¤ã¤ã¼ã¿ã¹ã¯ ã¿ã¤ã ã¢ã¦ãå¦ç */
+void echonet_lcltask_timeout(ecnl_svc_task_t *svc);
+
+/* ECHONET Lite éä¿¡ã¬ã¤ã¤ã¼ã¡ãã»ã¼ã¸å
+¥å */
+ER echonet_lcl_input_msg(ecnl_svc_task_t *svc, mrb_value ep, mrb_value data);
+
+/*
+ *  ãªã¢ã¼ãECHONETãã¼ãã®é©åç¢ºèª
+ */
+bool_t ecn_is_match(ecnl_svc_task_t *svc, const EOBJCB *eobjcb, T_EDATA *edata, mrb_value ep);
+
+typedef struct ecn_lcl_msg_get_lcladdr_req
+{
+	unsigned int requestid;
+	ECN_ENOD_ID enodid;
+} ecn_lcl_msg_get_lcladdr_req_t;
+
+typedef struct ecn_lcl_msg_get_lcladdr_res
+{
+	unsigned int requestid;
+	ECN_ENOD_ID enodid;
+	mrb_value enodadrb;
+} ecn_lcl_msg_get_lcladdr_res_t;
+
+typedef struct ecn_lcl_msg_get_lcladdr_error
+{
+	unsigned int requestid;
+	ER error;
+} ecn_lcl_msg_get_lcladdr_error_t;
+
+ER ecn_lcl_get_lcladdr(ecnl_svc_task_t *svc, T_ECN_FBS_QUEUE *sender, int requestid, ECN_ENOD_ID enodid, ECN_FBS_ID *pk_req);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TOPPERS_ECHONET_LCL_TASK_H */
Index: EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_task.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_task.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_task.c	(revision 270)
@@ -0,0 +1,2070 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2014-2016 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ */
+
+/*
+ *		ECHONET Lite ã¿ã¹ã¯
+ */
+
+#include <mruby.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+
+#include "echonet.h"
+#include "echonet_fbs.h"
+#include "echonet_task.h"
+#include "echonet_dbg.h"
+#ifdef ECHONET_CONTROLLER_EXTENTION
+#include "echonet_agent.h"
+#endif
+#include "mrb_ecnl.h"
+
+#ifndef ECHONET_TASK_GET_TIMER
+#define ECHONET_TASK_GET_TIMER	TMO_FEVR
+#endif /* ECHONET_TASK_GET_TIMER */
+
+#ifndef ECHONET_TASK_PROGRESS
+#define ECHONET_TASK_PROGRESS(timer)
+#endif /* ECHONET_TASK_PROGRESS */
+
+#ifndef ECHONET_TASK_TIMEOUT
+#define ECHONET_TASK_TIMEOUT
+#endif /* ECHONET_TASK_TIMEOUT */
+
+ER _ecn_tsk_snd_mbx(ecnl_svc_task_t *svc, ECN_FBS_ID fa_rsp_fbs, bool_t from_app)
+{
+	ER	a_ret;
+	intptr_t msg = (intptr_t)fa_rsp_fbs.ptr;
+	T_ECN_FBS_QUEUE *mbxid = &svc->lcl_mbxid;
+	int i;
+#ifdef ECN_DBG_PUT_ENA
+	intptr_t a_fbs_sub1 = (intptr_t)fa_rsp_fbs.ptr->lnk.p_sub[0];
+#endif
+	if (from_app && (((T_EDATA *)fa_rsp_fbs.ptr)->hdr.edata.esv == ESV_INFC)) {
+		svc->api_tid = ((T_EDATA *)fa_rsp_fbs.ptr)->hdr.ecn_hdr.tid;
+		mbxid = &svc->svc_mbxid;
+	}
+	else {
+		switch (fa_rsp_fbs.ptr->hdr.target.id) {
+		case ENOD_MULTICAST_ID:
+			if (from_app)
+				svc->api_tid = ((T_EDATA *)fa_rsp_fbs.ptr)->hdr.ecn_hdr.tid;
+
+			mbxid = &svc->lcl_mbxid;
+			break;
+		case ENOD_LOCAL_ID:
+			if (from_app)
+				mbxid = &svc->svc_mbxid;
+			else
+				mbxid = &svc->api_mbxid;
+			break;
+		case ENOD_API_ID:
+			mbxid = &svc->api_mbxid;
+			break;
+		default:
+			if (from_app)
+				svc->api_tid = ((T_EDATA *)fa_rsp_fbs.ptr)->hdr.ecn_hdr.tid;
+
+			i = fa_rsp_fbs.ptr->hdr.target.id;
+			if (i < ENOD_REMOTE_ID || !lcl_is_valid_addrid(svc, i))
+				return E_NOEXS;
+			i += - ENOD_REMOTE_ID + 1;
+			if (from_app && (i < svc->tnum_enodid)) {
+				/* éåæã®ãªã¢ã¼ããã¼ãã¯ãµã¼ãã¹å¦çã¿ã¹ã¯ã§å¦çãã */
+				switch (svc->eobjcb_table[i].profile->eobjatr) {
+				case EOBJ_SYNC_REMOTE_NODE:
+					mbxid = &svc->lcl_mbxid;
+					break;
+				case EOBJ_ASYNC_REMOTE_NODE:
+					mbxid = &svc->svc_mbxid;
+					break;
+				default:
+					return E_SYS;
+				}
+			}
+			else {
+				mbxid = &svc->lcl_mbxid;
+			}
+			break;
+		}
+	}
+#ifdef ECN_DBG_PUT_ENA
+	ECN_DBG_PUT_3("ecn_fbs_enqueue(%d, 0x%08X-0x%08X)", mbxid, (intptr_t)msg, a_fbs_sub1);
+	_ecn_dbg_bindmp((const uint8_t *)msg, 256);
+#endif
+	a_ret = ecn_fbs_enqueue(mbxid, (T_ECN_FST_BLK *)msg);
+#ifdef ECN_DBG_PUT_ENA
+	ECN_DBG_PUT_5("ecn_fbs_enqueue(%d, 0x%08X-0x%08X) result = %d:%s", mbxid, (intptr_t)msg, a_fbs_sub1, a_ret, itron_strerror(a_ret));
+#endif
+	return a_ret;
+}
+
+static void _ecn_tsk_int_module_init(ecnl_svc_task_t *svc);
+static uint16_t _ecn_tsk_new_tid(ecnl_svc_task_t *svc);
+static void _ecn_tsk_int_msg(ecnl_svc_task_t *svc, intptr_t fa_exinf, ECN_FBS_ID fa_fbs_id);
+static void _ecn_tsk_ecn_msg(ecnl_svc_task_t *svc, intptr_t fa_exinf, ECN_FBS_ID fa_fbs_id);
+
+static void _ecn_tsk_eoj_set(ecnl_svc_task_t *svc, const EOBJINIB *fp_obj, ATR fa_eobjatr, bool_t fa_fromapp, bool_t fa_update,
+	ECN_FBS_ID fa_fbs_id, ECN_SRV_CODE fa_res_esv, ECN_SRV_CODE fa_sna_esv,
+	ECN_FBS_ID *fa_fbs_anno);
+static void _ecn_tsk_eoj_get(ecnl_svc_task_t *svc, const EOBJINIB *fp_obj, ATR fa_eobjatr, bool_t fa_forward, ATR fa_access,
+	ECN_FBS_ID fa_fbs_id, ECN_SRV_CODE fa_res_esv, ECN_SRV_CODE fa_sna_esv);
+static void _ecn_tsk_eoj_res(ecnl_svc_task_t *svc, ECN_FBS_ID fa_fbs_id, ECN_SRV_CODE fa_res_esv,
+	ECN_SRV_CODE fa_sna_esv);
+static void _ecn_tsk_eoj_set_get(ecnl_svc_task_t *svc, const EOBJINIB *fp_obj, ATR fa_eobjatr, bool_t fa_fromapp,
+	ECN_FBS_ID fa_fbs_id, ECN_SRV_CODE fa_res_esv, ECN_SRV_CODE fa_sna_esv,
+	ECN_FBS_ID *fa_fbs_anno);
+static void _ecn_tsk_eoj_set_get_res(ecnl_svc_task_t *svc, const EOBJINIB *fp_obj, ATR fa_eobjatr, bool_t fa_fromapp,
+	ECN_FBS_ID fa_fbs_id, ECN_FBS_ID *fa_fbs_anno);
+
+/*
+ *  ECHONET Lite ã¿ã¹ã¯ã®åæåï¼ã³ã³ã¹ãã©ã¯ã¿ç¸å½ï¼
+ */
+void echonet_task_init(ecnl_svc_task_t *svc, intptr_t exinf)
+{
+	_ecn_tsk_int_module_init(svc);
+}
+
+/*
+ * ã¢ã¸ã¥ã¼ã«åæå
+ */
+static void _ecn_tsk_int_module_init(ecnl_svc_task_t *svc)
+{
+	if (!svc->eobjlist_need_init)
+		return;
+
+	ECN_CAP_PUT("[ECHONET MainTask] started");
+
+	svc->eobjlist_need_init = 0;
+
+#ifdef ECHONET_CONTROLLER_EXTENTION
+	ecn_agent_init(svc);
+#endif
+}
+
+/*
+ * ECHONET Lite ã¿ã¹ã¯ ã¿ã¤ãã¼å¤åå¾
+ */
+TMO echonet_svctask_get_timer(ecnl_svc_task_t *svc)
+{
+	TMO a_timer;
+#ifdef ECHONET_CONTROLLER_EXTENTION
+	TMO a_timera;
+#endif
+
+	a_timer = ECHONET_TASK_GET_TIMER;
+#ifdef ECHONET_CONTROLLER_EXTENTION
+	a_timera = ecn_agent_get_timer(svc);
+	if(a_timer == TMO_FEVR){
+		a_timer =a_timera;
+	}
+	else if((a_timera != TMO_FEVR) && (a_timera < a_timer)){
+		a_timer = a_timera;
+	}
+#endif
+	return a_timer;
+}
+
+
+/*
+ * ECHONET Lite ã¿ã¹ã¯ æéçµéå¦ç
+ */
+void echonet_svctask_progress(ecnl_svc_task_t *svc, TMO a_timer)
+{
+	ECHONET_TASK_PROGRESS(a_timer);
+#ifdef ECHONET_CONTROLLER_EXTENTION
+	ecn_agent_progress(svc, a_timer);
+#endif
+}
+
+/*
+ * ECHONET Lite ã¿ã¹ã¯ ã¡ãã»ã¼ã¸åä¿¡å¦ç
+ */
+void echonet_svctask_recv_msg(ecnl_svc_task_t *svc, T_ECN_FST_BLK *p_msg)
+{
+	ECN_FBS_ID fbs_id;
+	fbs_id.ptr = p_msg;
+
+	ECN_DBG_PUT_1("trcv_dtq() mbx recv (%d byte)", _ecn_fbs_get_datalen(fbs_id));
+	svc->release_esv = true;
+
+	switch (fbs_id.ptr->hdr.type) {
+	/* å
+é¨ä½¿ç¨ã¡ãã»ã¼ã¸ */
+	case ECN_MSG_INTERNAL:
+		_ecn_tsk_int_msg(svc, svc->exinf, fbs_id);
+		break;
+
+	/* ECHONETç¨ã¡ãã»ã¼ã¸ */
+	case ECN_MSG_ECHONET:
+		_ecn_tsk_ecn_msg(svc, svc->exinf, fbs_id);
+		break;
+
+	default:
+		ECN_DBG_PUT_1("echonet_task() a_fbs_id.ptr->k.hdr.k.t_edt.type:0x%02X undefined.", fbs_id.ptr->hdr.type);
+	}
+
+	/* é åè§£æ¾ */
+	if (svc->release_esv)
+		_ecn_fbs_del(svc->mrb, fbs_id);
+}
+
+/*
+ * ECHONET Lite ã¿ã¹ã¯ ã¿ã¤ã ã¢ã¦ãå¦ç
+ */
+void echonet_svctask_timeout(ecnl_svc_task_t *svc)
+{
+	ECHONET_TASK_TIMEOUT;
+#ifdef ECHONET_CONTROLLER_EXTENTION
+	ecn_agent_timeout(svc);
+#endif
+}
+
+/*
+ * ã·ã¼ã±ã³ã¹çªå·çæ
+ */
+static uint16_t _ecn_tsk_new_tid(ecnl_svc_task_t *svc)
+{
+	return svc->current_tid++;
+}
+
+/*
+ * è¦æ±é»æä½æ
+ * å¼æ°
+ * ECN_FBS_ID		*fp_fbs_id		åå¾ããFBS_IDã®æ ¼ç´å
+
+ * ID				fa_seoj			éä¿¡å
+ã®ECHONETãªãã¸ã§ã¯ãID
+ * ID				fa_deoj			å®å
+ã®ECHONETãªãã¸ã§ã¯ãID
+ * uint8_t			fa_epc			ãã­ããã£ã³ã¼ã
+ * uint8_t			fa_pdc			ãã­ããã£å¤ãã¼ã¿ãµã¤ãº
+ * const void		*p_edt			ãã­ããã£å¤ãã¼ã¿
+ * ECN_SRV_CODE		fa_esv			ECHONET Light ãµã¼ãã¹ã³ã¼ã
+ */
+ER _ecn_tsk_mk_esv(ecnl_svc_task_t *svc, ECN_FBS_ID *fp_fbs_id, ID fa_seoj, ID fa_deoj,
+	uint8_t fa_epc, uint8_t fa_pdc, const void *p_edt, ECN_SRV_CODE fa_esv)
+{
+	mrb_state *mrb = svc->mrb;
+	ER				a_ret;
+	int				a_size, i;
+	ECN_FBS_ID		a_fbs_id = { 0 };	/* è¦æ±é»æç¨ã¡ã¢ãª				*/
+	T_ECN_EDT_HDR	a_ecn_hdp;			/* ecn_hdr+edata+ecn_prp 14byte	*/
+	ID				a_enodid;
+	const EOBJINIB *a_eobj;
+	const EOBJINIB *a_enod;
+
+	if (!fp_fbs_id)
+		return E_PAR; /* åå¾ããFBS_IDã®æ ¼ç´å
+ãNULL */
+	if (ECHONET_MEMPOOL_BLOCK_SIZE <= fa_pdc)
+		return E_PAR; /* ãã­ããã£å¤ãµã¤ãºãå¤§ãããã */
+	if (!p_edt && 0 < fa_pdc)
+		return E_PAR; /* ãã­ããã£å¤ãµã¤ãºã1ä»¥ä¸ãªã®ã«ãã¼ã¿ãã¤ã³ã¿ãNULL */
+
+	if (fa_seoj <= EOBJ_NULL || svc->tmax_eobjid < fa_seoj)
+		return E_NOEXS; /* ECHONETãªãã¸ã§ã¯ãIDãæªå®ç¾© */
+#ifndef ECHONET_CONTROLLER_EXTENTION
+	if (fa_deoj < EOBJ_NULL || svc->tmax_eobjid < fa_deoj)
+		return E_NOEXS; /* ECHONETãªãã¸ã§ã¯ãIDãæªå®ç¾© */
+#else
+	if (fa_deoj < EOBJ_NULL || (svc->tmax_eobjid + TNUM_AEOBJID) < fa_deoj)
+		return E_NOEXS; /* ECHONETãªãã¸ã§ã¯ãIDãæªå®ç¾© */
+#endif
+	if (fa_deoj == EOBJ_NULL && fa_esv == ESV_INFC)
+		return E_NOEXS; /* ECHONETãªãã¸ã§ã¯ãIDãæªå®ç¾© */
+
+	/* è¦æ±æå°ãµã¤ãºã®åå¾ */
+	a_size = sizeof(T_ECN_HDR) + sizeof(T_ECN_EDATA_BODY) + sizeof(T_ECN_PRP);
+
+	/* è¦æ±é»æç¨ã¡ã¢ãªã®åå¾ */
+	a_ret = _ecn_fbs_cre(mrb, a_size, &a_fbs_id);
+	if (a_ret != E_OK || !a_fbs_id.ptr) { /* ç¢ºä¿å¤±æ */
+		ECN_DBG_PUT_3("_ecn_fbs_cre(%d) result = %d:%s",
+			a_size,
+			a_ret, itron_strerror(a_ret));
+		return E_NOMEM;
+	}
+
+	/* è¦æ±é»æè¨­å®						*/
+	memset(&a_ecn_hdp, 0, sizeof(a_ecn_hdp));
+	a_ecn_hdp.ecn_hdr.ehd1 = ECN_EDH1_ECHONET_LITE;
+	a_ecn_hdp.ecn_hdr.ehd2 = ECN_EDH2_FORMAT_1;
+	a_ecn_hdp.ecn_hdr.tid = _ecn_tsk_new_tid(svc);
+	memcpy(&a_ecn_hdp.edata.seoj, &echonet_svctask_get_eobjinib(svc, fa_seoj)->eojx1, sizeof(a_ecn_hdp.edata.seoj));
+	a_ecn_hdp.edata.esv = fa_esv;
+	a_ecn_hdp.edata.opc = 1;		/* å¦çãã­ããã£æ° */
+	a_ecn_hdp.ecn_prp.epc = fa_epc;	/* ãã­ããã£ã³ã¼ã */
+	a_ecn_hdp.ecn_prp.pdc = fa_pdc;	/* ä»éãã¼ã¿ãµã¤ãº */
+
+	/* è¦æ±é»æç¨ã¡ã¢ãªã«ãã¼ã¿è¿½å  */
+	a_ret = _ecn_fbs_add_data_ex(mrb, a_fbs_id, &a_ecn_hdp, a_size);
+	if (a_ret) {
+		ECN_DBG_PUT_5("_ecn_fbs_add_data_ex(*, ecn_hdp{esv:0x%02X,epc:0x%02X}, %d) result = %d:%s",
+			a_ecn_hdp.edata.esv, a_ecn_hdp.ecn_prp.epc, a_size,
+			a_ret, itron_strerror(a_ret));
+		goto lb_except;
+	}
+	if (0 < fa_pdc) {
+		/* ä»éãã¼ã¿è¿½å  */
+		a_ret = _ecn_fbs_add_data_ex(mrb, a_fbs_id, p_edt, fa_pdc);
+		if (a_ret) {
+			ECN_DBG_PUT_5("_ecn_fbs_add_data_ex(*, ecn_hdp{esv:0x%02X,epc:0x%02X} edt, %d) result = %d:%s",
+				a_ecn_hdp.edata.esv, a_ecn_hdp.ecn_prp.epc, fa_pdc,
+				a_ret, itron_strerror(a_ret));
+			goto lb_except;
+		}
+	}
+	if (fa_deoj == 0) {
+		ECN_DBG_PUT("ãã«ãã­ã£ã¹ã");
+		/* fa_deoj == 0 : ãã«ãã­ã£ã¹ã */
+		((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj.eojx1 = EOJ_X1_PROFILE;
+		((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj.eojx2 = EOJ_X2_NODE_PROFILE;
+		((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj.eojx3 = 0x01;
+		a_fbs_id.ptr->hdr.target.id = ENOD_MULTICAST_ID;
+	}
+	else if (fa_deoj <= svc->tmax_eobjid) {
+		ECN_DBG_PUT_1("fa_deoj = %d", fa_deoj);
+		/* if (fa_deoj < 1 || svc->tmax_eobjid < fa_deoj) â¦ã®ç°å¸¸ç³»ã¯é¢æ°åé ­ã§é¤å¤æ¸ã¿ã¨ãã */
+		a_eobj = echonet_svctask_get_eobjinib(svc, fa_deoj);
+		memcpy(&((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj, &a_eobj->eojx1,
+			sizeof(((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj));
+
+		/* ãã¼ãã«ããæ¤ç´¢ */
+		a_fbs_id.ptr->hdr.target.id = ENOD_NOT_MATCH_ID;
+		a_enodid = (a_eobj->enodid == 0) ? fa_deoj : a_eobj->enodid;
+		a_enod = echonet_svctask_get_eobjinib(svc, a_enodid);
+		if ((a_enod->eobjatr == EOBJ_LOCAL_NODE)
+			|| ((a_enod->eobjatr == EOBJ_ASYNC_REMOTE_NODE) && (fa_esv == ESV_GET))) {
+			a_fbs_id.ptr->hdr.target.id = ENOD_LOCAL_ID;
+		}
+		else{
+			for (i = 1; i < svc->tnum_enodid; i++) {
+				const EOBJCB *temp = &svc->eobjcb_table[i];
+				if (a_enod != temp->profile)
+					continue;
+
+				a_fbs_id.ptr->hdr.target.id = (ECN_ENOD_ID)(i + ENOD_REMOTE_ID - 1);
+				break;
+			}
+		}
+		if (a_fbs_id.ptr->hdr.target.id == ENOD_NOT_MATCH_ID) {
+			goto lb_except;
+			ECN_DBG_PUT_3("deoj = %02X %02X %02x : enod not match",
+				((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj.eojx1,
+				((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj.eojx2,
+				((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj.eojx3);
+		}
+#ifdef ECN_DBG_PUT_ENA
+		else {
+			ECN_DBG_PUT_4("deoj = %02X %02X %02x : %s",
+				((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj.eojx1,
+				((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj.eojx2,
+				((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj.eojx3,
+				_ecn_dbg_enod2str(a_fbs_id.ptr->hdr.target.id));
+		}
+#endif
+	}
+#ifdef ECHONET_CONTROLLER_EXTENTION
+	else{
+		T_ECN_EOJ eoj;
+		ECN_ENOD_ID enodid;
+		ECN_DBG_PUT_1("fa_deoj = %d", fa_deoj);
+		/* ãªãã¸ã§ã¯ãIDããEOJã¨ãã¼ãIDãåå¾ */
+		if(ecn_agent_get_eoj_enodid(svc, fa_deoj, &eoj, &enodid)){
+			memcpy(&((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj, &eoj,
+				sizeof(((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj));
+			a_fbs_id.ptr->hdr.target.id = enodid;
+#ifdef ECN_DBG_PUT_ENA
+			ECN_DBG_PUT_4("deoj = %02X %02X %02x : %s",
+				((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj.eojx1,
+				((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj.eojx2,
+				((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj.eojx3,
+				_ecn_dbg_enod2str(a_fbs_id.ptr->hdr.target.id));
+#endif
+		}
+		else {
+			ECN_DBG_PUT_3("deoj = %02X %02X %02x : enod not match",
+				((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj.eojx1,
+				((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj.eojx2,
+				((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj.eojx3);
+			goto lb_except;
+		}
+	}
+#endif
+	a_fbs_id.ptr->hdr.type = ECN_MSG_ECHONET;
+	a_fbs_id.ptr->hdr.sender.id = ENOD_API_ID;
+	if (fa_esv == ESV_INFC)
+		a_fbs_id.ptr->hdr.reply.id = a_fbs_id.ptr->hdr.target.id;
+	else if (fa_esv == ESV_INF_REQ)
+		a_fbs_id.ptr->hdr.reply.id = ENOD_MULTICAST_ID;
+	else
+		a_fbs_id.ptr->hdr.reply.id = ENOD_API_ID;
+
+	((T_EDATA *)a_fbs_id.ptr)->trn_pos = -1;
+	/* æ­£å¸¸çµäº */
+	*fp_fbs_id = a_fbs_id;
+	return E_OK;
+
+lb_except:
+	/* ãã¼ã¿ä½æå¤±æãããé åè§£æ¾ */
+	if (a_fbs_id.ptr)
+		_ecn_fbs_del(mrb, a_fbs_id);
+
+	return a_ret;
+}
+
+/*
+ * å
+é¨ä½¿ç¨ã¡ãã»ã¼ã¸
+ */
+static void _ecn_tsk_int_msg(ecnl_svc_task_t *svc, intptr_t fa_exinf, ECN_FBS_ID fa_fbs_id)
+{
+	T_ECN_INTERNAL_MSG	a_im;
+	ECN_FBS_SSIZE_T		a_len;
+	int					a_ans;
+
+	a_im.command = 0;
+	a_len = 0;
+	a_ans = _ecn_fbs_get_data(svc->mrb, fa_fbs_id, &a_im.command, sizeof(a_im.command), &a_len);
+	if (a_ans || !a_len) {
+		return;		/* NG */
+	}
+
+	switch (a_im.command) {
+	case ECN_INM_NOTIFY_INSTANCELIST:
+		ECN_DBG_PUT("do _ecn_tsk_int_startup()");
+		_ecn_tsk_int_startup(svc);
+		break;
+	default:
+#ifdef ECHONET_CONTROLLER_EXTENTION
+		if(ecn_agent_proc_int_msg(svc, fa_fbs_id, a_im.command))
+			break;
+#endif
+		ECN_DBG_PUT_1("recv: unefined internal-msg: %d", a_im.command);
+		break;
+	}
+}
+
+/*
+ * ã¿ã¹ã¯åæå
+ */
+void _ecn_tsk_int_startup(ecnl_svc_task_t *svc)
+{
+	_ecn_tsk_int_module_init(svc);
+}
+
+/*
+ * ã¤ã³ã¹ã¿ã³ã¹ãªã¹ãéç¥ã®éä¿¡
+ * ECHONET-Lite_Ver.1.10_02.pdf p.43 å³4-1-4
+ */
+ER _ecn_tsk_ntf_inl(ecnl_svc_task_t *svc)
+{
+	mrb_state *mrb = svc->mrb;
+	const T_ECN_EOJ	a_seoj =	/* 0x01 : ä¸è¬ãã¼ãã0x02ï¼éä¿¡å°ç¨ãã¼ã */
+		{ EOJ_X1_PROFILE, EOJ_X2_NODE_PROFILE, 0x01 };
+	const T_ECN_EOJ	a_deoj =
+		{ EOJ_X1_PROFILE, EOJ_X2_NODE_PROFILE, 0x01 };
+	T_ECN_EDT_HDR a_hdr;
+	ER			a_ret	=	E_OK;
+	ECN_FBS_ID	a_fbs	=	{ 0 };
+	int			a_eoj_ct =	0;
+	int			i;
+	uint8_t		a_count;
+	const EOBJCB	*enod = &svc->eobjcb_table[0];	/* ã­ã¼ã«ã«ãã¼ã */
+	const EOBJINIB *eobj;
+
+	ECN_DBG_PUT("do _ecn_tsk_ntf_inl()");
+
+	memset(&a_hdr, 0, sizeof(a_hdr));
+	a_hdr.ecn_hdr.ehd1 = ECN_EDH1_ECHONET_LITE;
+	a_hdr.ecn_hdr.ehd2 = ECN_EDH2_FORMAT_1;
+	a_hdr.edata.seoj = a_seoj;
+	a_hdr.edata.deoj = a_deoj;
+	a_hdr.edata.esv = ESV_INF;
+	a_hdr.edata.opc = 1;
+	a_hdr.ecn_prp.epc = ECN_EPC_INL_BCS;
+
+	for (i = 0; i < enod->eobjcnt; i++) {
+		eobj = enod->eobjs[i];
+
+		if (!a_eoj_ct) {
+			/* ã¡ã¢ãªç¢ºä¿ã»ãããæ ¼ç´ */
+			a_hdr.ecn_hdr.tid = (uint8_t)_ecn_tsk_new_tid(svc); /* ã·ã¼ã±ã³ã¹çªå·çæ */
+			a_ret = _ecn_fbs_cre(mrb, sizeof(a_hdr), &a_fbs);
+			if (a_ret != E_OK) /* ç¢ºä¿å¤±æ */
+				goto lb_except;
+			a_ret = _ecn_fbs_add_data(mrb, a_fbs, &a_hdr, sizeof(a_hdr));
+			if (a_ret != E_OK) /* ãã¼ã¿è¿½å å¤±æ */
+				goto lb_except;
+
+			a_fbs.ptr->hdr.type = ECN_MSG_ECHONET;
+			a_fbs.ptr->hdr.sender.id = ENOD_LOCAL_ID;
+			a_fbs.ptr->hdr.target.id = ENOD_MULTICAST_ID;
+			a_fbs.ptr->hdr.reply.id = ENOD_LOCAL_ID;
+			((T_EDATA *)a_fbs.ptr)->hdr.ecn_prp.pdc = 1;	/* ä»¶æ° */
+			/* ä»¶æ°ãæ ¼ç´ */
+			a_count = (uint8_t)(enod->eobjcnt - i);
+			if (a_count >= ECN_IST_LST_EOJ_MAX_CT)
+				a_count = ECN_IST_LST_EOJ_MAX_CT;
+			a_ret = _ecn_fbs_add_data_ex(mrb, a_fbs, &a_count, sizeof(a_count));
+			if (a_ret != E_OK) /* ãã¼ã¿è¿½å å¤±æ */
+				goto lb_except;
+		}
+		/* ECHONETãªãã¸ã§ã¯ãID(3byte)ãæ ¼ç´ */
+		a_ret = _ecn_fbs_add_data_ex(mrb, a_fbs, &eobj->eojx1, sizeof(T_ECN_EOJ));
+		if (a_ret != E_OK) /* ãã¼ã¿è¿½å å¤±æ */
+			goto lb_except;
+
+		/* ä»¶æ°ã»edtãµã¤ãºå ç® */
+		((T_EDATA *)a_fbs.ptr)->hdr.ecn_prp.pdc += sizeof(T_ECN_EOJ);
+		if (++a_eoj_ct < ECN_IST_LST_EOJ_MAX_CT)
+			continue;
+
+		/* 1ã¢ãã¦ã³ã¹ã§ã®ä¸éã«éããããä¸æ¦éä¿¡ */
+		a_ret = _ecn_tsk_snd_mbx(svc, a_fbs, false);
+		if (a_ret != E_OK) /* ãã¼ã¿éä¿¡å¤±æ */
+			goto lb_except;
+		a_eoj_ct = 0;
+		a_fbs.ptr = 0;
+	}
+	if (a_eoj_ct) {
+		/* æªéä¿¡ãã¼ã¿ããã£ãããéä¿¡ */
+		a_ret = _ecn_tsk_snd_mbx(svc, a_fbs, false);
+		if (a_ret != E_OK) /* ãã¼ã¿éä¿¡å¤±æ */
+			goto lb_except;
+		a_fbs.ptr = 0;
+	}
+	goto lb_finally;
+
+lb_except:
+	if (a_fbs.ptr)
+		_ecn_fbs_del(mrb, a_fbs);
+
+lb_finally:
+	return a_ret;
+}
+
+const EOBJCB *_ecn_eno_fnd(ecnl_svc_task_t *svc, ECN_ENOD_ID enodid)
+{
+	const EOBJCB *enod = NULL;
+	int i;
+
+	switch (enodid) {
+	case ENOD_MULTICAST_ID:
+	case ENOD_LOCAL_ID:
+	case ENOD_API_ID:
+		enod = &svc->eobjcb_table[0];
+		break;
+	default:
+		i = enodid - ENOD_REMOTE_ID + 1;
+		if ((i >= 1) && (i < svc->tnum_enodid))
+			enod = &svc->eobjcb_table[i];
+#ifdef ECHONET_CONTROLLER_EXTENTION
+		else{
+			ecn_node_t *p_tmp = ecn_agent_find_node(svc, enodid);
+			if (p_tmp == NULL)
+				return NULL;
+			return &p_tmp->eobj;
+		}
+#endif
+		break;
+	}
+
+	return enod;
+}
+
+/*
+ * 3byteã®eobjidã§é
+åä¸­ãæ¤ç´¢ãã
+ */
+const EOBJINIB *_ecn_eoj_fnd(const EOBJCB *fp_nod, const T_ECN_EOJ *fp_eoj)
+{
+	const EOBJINIB	*p_obj;
+	int		i, count = fp_nod->eobjcnt;
+
+#ifdef ECHONET_CONTROLLER_EXTENTION
+	if (fp_nod->eobjs == NULL) {
+		ecn_obj_t *p_tmp = ecn_agent_find_eobj(fp_nod, *fp_eoj);
+		if(p_tmp == NULL)
+			return NULL;
+		return &p_tmp->inib;
+	}
+#endif
+
+	for (i = 0; i < count; i++) {
+		p_obj = fp_nod->eobjs[i];
+
+		if (p_obj->eojx1 != fp_eoj->eojx1)
+			continue;
+		if (p_obj->eojx2 != fp_eoj->eojx2)
+			continue;
+		if (p_obj->eojx3 != fp_eoj->eojx3)
+			continue;
+
+		return p_obj;
+	}
+
+	return 0;
+}
+
+/*
+ * é»æã®æ§æè¦ç´ æ°ã¨ãµã¤ãºã®ãã§ãã¯ãè¡ã
+ */
+static bool_t _ecn_tsk_check_format(ecnl_svc_task_t *svc, T_EDATA *edata, int len)
+{
+	mrb_state *mrb = svc->mrb;
+	ER ret;
+	T_ENUM_EPC enm;
+	int opc;
+	uint8_t epc;
+	uint8_t pdc;
+
+	len -= sizeof(T_ECN_HDR) + sizeof(T_ECN_EDATA_BODY);
+
+	ret = ecn_itr_ini(&enm, edata);
+	if (ret != E_OK) {
+		return false;
+	}
+	opc = enm.count;
+	for (;;) {
+		ret = ecn_itr_nxt(mrb, &enm, &epc, &pdc, NULL);
+		if (enm.is_eof)
+			break;
+		if (ret == E_BOVR){
+			if (opc != 0)
+				return false;
+			opc = enm.count;
+			len -= 1;
+			continue;
+		}
+		if (ret != E_OK)
+			break;
+
+		opc--;
+		len -= sizeof(T_ECN_PRP) + pdc;
+	}
+
+	return (opc == 0) && (len == 0);
+}
+
+static int _ecn_tsk_ecn_msg_main(ecnl_svc_task_t *svc, ECN_FBS_ID fa_fbs_id, const EOBJINIB *p_obj, ATR eobjatr,
+	const EOBJINIB *p_sobj, ATR sobjatr);
+
+/*
+ * ECHONETç¨ã¡ãã»ã¼ã¸
+ */
+static void _ecn_tsk_ecn_msg(ecnl_svc_task_t *svc, intptr_t fa_exinf, ECN_FBS_ID fa_fbs_id)
+{
+	mrb_state *mrb = svc->mrb;
+	const EOBJCB	*p_nod, *p_snod;
+	const EOBJINIB	*p_obj, *p_sobj = NULL;
+	ATR eobjatr, sobjatr = EPC_NONE;
+	T_ECN_EDT_HDR	*p_esv;
+	ER				a_ret;
+	int				i, count;
+	T_ECN_EOJ		*p_eoj;
+	bool_t			a_prc;
+	bool_t			a_fwd;
+
+#ifdef ECN_DBG_PUT_ENA
+	printf("mbx recv:");
+	_ecn_dbg_bindmp((void *)fa_fbs_id.ptr, sizeof(*fa_fbs_id.ptr));
+#endif
+
+	p_esv = &((T_EDATA *)fa_fbs_id.ptr)->hdr;
+
+	if (p_esv->ecn_hdr.ehd1 != ECN_EDH1_ECHONET_LITE
+		||	p_esv->ecn_hdr.ehd2 != ECN_EDH2_FORMAT_1) {
+		ECN_DBG_PUT_2("_ecn_tsk_ecn_msg() format fault: 0x%02X,0x%02X", p_esv->ecn_hdr.ehd1, p_esv->ecn_hdr.ehd2);
+		return;
+	}
+
+	if (p_esv->edata.deoj.eojx3 > 0x7F) {
+		ECN_DBG_PUT_1("_ecn_tsk_ecn_msg() format fault: deoj %06X",
+			p_esv->edata.deoj.eojx1 << 16 | p_esv->edata.deoj.eojx2 << 8 | p_esv->edata.deoj.eojx3);
+		return;
+	}
+
+	if ((p_esv->edata.seoj.eojx3 > 0x7F) || (p_esv->edata.seoj.eojx3 == 0x00)) {
+		ECN_DBG_PUT_1("_ecn_tsk_ecn_msg() format fault: seoj %06X",
+			p_esv->edata.seoj.eojx1 << 16 | p_esv->edata.seoj.eojx2 << 8 | p_esv->edata.seoj.eojx3);
+		return;
+	}
+
+	if ((p_esv->edata.esv & 0xC0) != 0x40) {
+		ECN_DBG_PUT_1("_ecn_tsk_ecn_msg() format fault: esv 0x%02X", p_esv->edata.esv);
+		return;
+	}
+
+	if (p_esv->edata.opc == 0x00) {
+		ECN_DBG_PUT_1("_ecn_tsk_ecn_msg() format fault: opc 0x%02X", p_esv->edata.opc);
+		return;
+	}
+
+	/* é»æã®æ§æè¦ç´ æ°ã¨ãµã¤ãºã®ãã§ãã¯ãè¡ã */
+	if (!_ecn_tsk_check_format(svc, (T_EDATA *)fa_fbs_id.ptr, fa_fbs_id.ptr->hdr.length)) {
+		ECN_DBG_PUT("_ecn_tsk_ecn_msg() format fault");
+		return;
+	}
+
+	/* éä¿¡å®ãããã¼ããæ¤ç´¢ */
+	p_nod = _ecn_eno_fnd(svc, fa_fbs_id.ptr->hdr.target.id);
+	/* éä¿¡å
+ãããã¼ããæ¤ç´¢ */
+	p_snod = _ecn_eno_fnd(svc, fa_fbs_id.ptr->hdr.sender.id);
+	if (p_snod != NULL) {
+		sobjatr = p_snod->profile->eobjatr;
+		/* ãã¼ããã­ãã¡ã¤ã«ã®å ´å */
+		if ((p_esv->edata.seoj.eojx1 == EOJ_X1_PROFILE)
+			&& (p_esv->edata.seoj.eojx2 == EOJ_X2_NODE_PROFILE)) {
+			p_sobj = p_snod->profile;
+		}
+		/* æ©å¨ãªãã¸ã§ã¯ãã®å ´å */
+		else {
+			p_sobj = _ecn_eoj_fnd(p_snod, &p_esv->edata.seoj);
+		}
+	}
+
+#ifdef ECHONET_CONTROLLER_EXTENTION
+	ecn_agent_proc_ecn_msg(svc, &p_snod, &p_sobj, (T_EDATA *)fa_fbs_id.ptr);
+#endif
+
+	/* ãã¼ãå
+ã®æ©å¨ãªãã¸ã§ã¯ããæ¤ç´¢ */
+	a_prc = false;
+	a_fwd = false;
+	svc->forward_esv = false;
+	if (p_nod != NULL) {
+		eobjatr = p_nod->profile->eobjatr;
+		p_eoj = &p_esv->edata.deoj;
+		/* ãã¼ããã­ãã¡ã¤ã«ã®å ´å */
+		if ((p_eoj->eojx1 == EOJ_X1_PROFILE)
+			&& (p_eoj->eojx2 == EOJ_X2_NODE_PROFILE)) {
+			if ((p_eoj->eojx3 == p_nod->profile->eojx3)
+				|| (p_eoj->eojx3 == 0)) {
+				/* é»æå¦çå®è¡ */
+				if (_ecn_tsk_ecn_msg_main(svc, fa_fbs_id, p_nod->profile, eobjatr, p_sobj, sobjatr) == 1)
+					a_fwd = true;
+				a_prc = true;
+			}
+			/* 0x74 ãã­ããã£å¤éç¥ï¼å¿ç­è¦ï¼ã®å ´åã®å ´åã¯é»æç ´æ£ */
+			else if (p_esv->edata.esv == ESV_INFC) {
+				a_prc = true;
+			}
+		}
+		/* æ©å¨ãªãã¸ã§ã¯ãã®å ´å */
+		else {
+			count = p_nod->eobjcnt;
+#ifdef ECHONET_CONTROLLER_EXTENTION
+			p_obj = NULL;
+#endif
+			for (i = 0; i < count; i++) {
+#ifdef ECHONET_CONTROLLER_EXTENTION
+				if(p_nod->eobjs == NULL)
+					p_obj = ecn_agent_next_eobj(p_nod, p_obj);
+				else
+					p_obj = p_nod->eobjs[i];
+#else
+				p_obj = p_nod->eobjs[i];
+#endif
+				if (p_obj->eojx1 != p_eoj->eojx1)
+					continue;
+				if (p_obj->eojx2 != p_eoj->eojx2)
+					continue;
+				/* ã¤ã³ã¹ã¿ã³ã¹ã³ã¼ããï¼ã®å ´åãåãã¯ã©ã¹ã®å
+¨ã¦ã®ã¤ã³ã¹ã¿ã³ã¹å® */
+				if ((p_obj->eojx3 != p_eoj->eojx3) && (p_eoj->eojx3 != 0))
+					continue;
+
+				/* é»æå¦çå®è¡ */
+				if (_ecn_tsk_ecn_msg_main(svc, fa_fbs_id, p_obj, eobjatr, p_sobj, sobjatr) == 1)
+					a_fwd = true;
+				a_prc = true;
+			}
+
+			/* æ©å¨ãªãã¸ã§ã¯ããè¦ã¤ãããã0x74 ãã­ããã£å¤éç¥ï¼å¿ç­è¦ï¼ã®å ´åã¯é»æç ´æ£ */
+			if (!a_prc && (p_esv->edata.esv == ESV_INFC)) {
+				a_prc = true;
+			}
+		}
+	}
+	/* æ©å¨ãªãã¸ã§ã¯ããè¦ã¤ãããªãå ´åã§ã */
+	if (!a_prc) {
+		/* é»æå¦çå®è¡ï¼å¿ç­åä¿¡ç¨ï¼ */
+		if (_ecn_tsk_ecn_msg_main(svc, fa_fbs_id, NULL, EPC_NONE, p_sobj, sobjatr) == 1)
+			a_fwd = true;
+	}
+
+	/* å¿ç­ã®å ´åã¢ããªã±ã¼ã·ã§ã³ã«è»¢éãã */
+	if (a_fwd && ((p_esv->ecn_hdr.tid == svc->api_tid)
+		|| svc->forward_esv))
+	{
+		svc->release_esv = false;
+
+		ECN_CAP_PUT_1("redirect svc->svc_mbxid â svc->api_mbxid (esv:0x%02X)",
+			p_esv->edata.esv);
+		fa_fbs_id.ptr->hdr.target.id = ENOD_API_ID;
+		a_ret = ecn_fbs_enqueue(&svc->api_mbxid, fa_fbs_id.ptr);
+		if (a_ret != E_OK) {
+			ECN_DBG_PUT_2("_ecn_tsk_ecn_msg() : ecn_fbs_enqueue() result = %d:%s", a_ret, itron_strerror(a_ret));
+			_ecn_fbs_del(mrb, fa_fbs_id);
+		}
+	}
+#ifdef ECHONET_CONTROLLER_EXTENTION
+	ecn_agent_proc_ecn_msg_end(svc);
+#endif
+}
+
+static int _ecn_tsk_ecn_msg_main(ecnl_svc_task_t *svc, ECN_FBS_ID fa_fbs_id, const EOBJINIB *p_obj, ATR eobjatr,
+	const EOBJINIB *p_sobj, ATR sobjatr)
+{
+	mrb_state *mrb = svc->mrb;
+	int result;
+	T_ECN_EDT_HDR	*p_esv;
+	ECN_FBS_ID		a_fbs_anno = { NULL };
+	bool_t fromapp = sobjatr == EOBJ_LOCAL_NODE;
+
+	p_esv = &((T_EDATA *)fa_fbs_id.ptr)->hdr;
+
+	switch (p_esv->edata.esv) {
+	/* 0x60 ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­ä¸è¦ï¼ */
+	case ESV_SET_I:
+		if (!p_obj) {
+			ECN_DBG_PUT_1("_ecn_tsk_ecn_msg_main() eoj %06X not found.",
+				p_esv->edata.deoj.eojx1 << 16 | p_esv->edata.deoj.eojx2 << 8 | p_esv->edata.deoj.eojx3);
+			result = -1;
+			break;
+		}
+		_ecn_tsk_eoj_set(svc, p_obj, eobjatr, fromapp, false, fa_fbs_id, ESV_NOP, ESV_SET_I_SNA, &a_fbs_anno);	/* 0; 0x50 */
+		result = 0;
+		break;
+
+	/* 0x61 ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­è¦ï¼ */
+	case ESV_SET_C:
+		if (!p_obj) {
+			ECN_DBG_PUT_1("_ecn_tsk_ecn_msg_main() eoj %06X not found.",
+				p_esv->edata.deoj.eojx1 << 16 | p_esv->edata.deoj.eojx2 << 8 | p_esv->edata.deoj.eojx3);
+			result = -1;
+			break;
+		}
+		_ecn_tsk_eoj_set(svc, p_obj, eobjatr, fromapp, false, fa_fbs_id, ESV_SET_RES, ESV_SET_C_SNA, &a_fbs_anno); /* 0x71; 0x51 */
+		result = 0;
+		break;
+
+	/* 0x62 ãã­ããã£å¤èª­ã¿åºãè¦æ± */
+	case ESV_GET:
+		if (!p_obj) {
+			ECN_DBG_PUT_1("_ecn_tsk_ecn_msg_main() eoj %06X not found.",
+				p_esv->edata.deoj.eojx1 << 16 | p_esv->edata.deoj.eojx2 << 8 | p_esv->edata.deoj.eojx3);
+			result = -1;
+			break;
+		}
+		_ecn_tsk_eoj_get(svc, p_obj, eobjatr, false, EPC_RULE_GET, fa_fbs_id, ESV_GET_RES, ESV_GET_SNA); /* 0x72; 0x52 */
+		result = 0;
+		break;
+
+	/* 0x63 ãã­ããã£å¤éç¥è¦æ± */
+	case ESV_INF_REQ:
+		if (!p_obj) {
+			ECN_DBG_PUT_1("_ecn_tsk_ecn_msg_main() eoj %06X not found.",
+				p_esv->edata.deoj.eojx1 << 16 | p_esv->edata.deoj.eojx2 << 8 | p_esv->edata.deoj.eojx3);
+			result = -1;
+			break;
+		}
+		fa_fbs_id.ptr->hdr.reply.id = ENOD_MULTICAST_ID;
+		_ecn_tsk_eoj_get(svc, p_obj, eobjatr, false, (EPC_RULE_GET|EPC_RULE_ANNO), fa_fbs_id, ESV_INF, ESV_INF_SNA); /* 0x73; 0x53 */
+		result = 0;
+		break;
+
+	/* 0x6E ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ± */
+	case ESV_SET_GET:
+		if (!p_obj) {
+			ECN_DBG_PUT_1("_ecn_tsk_ecn_msg_main() eoj %06X not found.",
+				p_esv->edata.deoj.eojx1 << 16 | p_esv->edata.deoj.eojx2 << 8 | p_esv->edata.deoj.eojx3);
+			result = -1;
+			break;
+		}
+		_ecn_tsk_eoj_set_get(svc, p_obj, eobjatr, fromapp, fa_fbs_id, ESV_SET_GET_RES, ESV_SET_GET_SNA, &a_fbs_anno); /* 0x7E; 0x5E */
+		result = 0;
+		break;
+
+	/* 0x74 ãã­ããã£å¤éç¥ï¼å¿ç­è¦ï¼ */
+	case ESV_INFC:
+		if (!p_sobj)
+			/* éä¿¡å
+ãæªç¥ã®ä»ãã¼ãã§ãã£ãå ´åãå¿ç­ãè¿ã */
+			_ecn_tsk_eoj_res(svc, fa_fbs_id, ESV_INFC_RES, ESV_INFC_RES); /* 0x7A; 0x7A */
+		else if (fromapp)
+			/* ã¢ããªã±ã¼ã·ã§ã³ããã®è¦æ±ã®å ´åããã­ããã£å¤éç¥ï¼å¿ç­è¦ï¼ãéä¿¡ãã */
+			_ecn_tsk_eoj_get(svc, p_sobj, sobjatr, true, (EPC_RULE_GET|EPC_RULE_ANNO), fa_fbs_id, ESV_INFC, ESV_NOP); /* 0x74; 0 */
+		else
+			/* éä¿¡å
+ãæ¢ç¥ã®ä»ãã¼ãã§ãã£ãå ´åããã­ããã£å¤ãæ´æ°ãå¿ç­ãè¿ã */
+			_ecn_tsk_eoj_set(svc, p_sobj, sobjatr, fromapp, true, fa_fbs_id, ESV_INFC_RES, ESV_INFC_RES, &a_fbs_anno); /* 0x7A; 0x7A */
+		result = 0;
+		break;
+
+	/* 0x60 ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­ä¸è¦ï¼ */
+	case ESV_SET_I_SNA:		/* 0x50 ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ä¸å¯å¿ç­ */
+		result = 1;
+		break;
+
+	/* 0x61 ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­è¦ï¼ */
+	case ESV_SET_RES:		/* 0x71 ãã­ããã£å¤æ¸ãè¾¼ã¿å¿ç­ */
+	case ESV_SET_C_SNA:		/* 0x51 ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ä¸å¯å¿ç­ */
+		result = 1;
+		break;
+
+	/* 0x62 ãã­ããã£å¤èª­ã¿åºãè¦æ± */
+	case ESV_GET_RES:		/* 0x72 ãã­ããã£å¤èª­ã¿åºãå¿ç­ */
+	case ESV_GET_SNA:		/* 0x52 ãã­ããã£å¤èª­ã¿åºãä¸å¯å¿ç­ */
+		if (!p_sobj) {
+			ECN_DBG_PUT_1("_ecn_tsk_ecn_msg_main() eoj %06X not found.",
+				p_esv->edata.seoj.eojx1 << 16 | p_esv->edata.seoj.eojx2 << 8 | p_esv->edata.seoj.eojx3);
+			result = -1;
+			break;
+		}
+		_ecn_tsk_eoj_set(svc, p_sobj, sobjatr, fromapp, true, fa_fbs_id, ESV_NOP, ESV_NOP, &a_fbs_anno); /* 0; 0 */
+		result = 1;
+		break;
+
+	/* 0x63 ãã­ããã£å¤éç¥è¦æ± */
+	case ESV_INF:			/* 0x73 ãã­ããã£å¤éç¥ */
+	case ESV_INF_SNA:		/* 0x53 ãã­ããã£å¤éç¥ä¸å¯å¿ç­ */
+		if (!p_sobj) {
+			ECN_DBG_PUT_1("_ecn_tsk_ecn_msg_main() eoj %06X not found.",
+				p_esv->edata.seoj.eojx1 << 16 | p_esv->edata.seoj.eojx2 << 8 | p_esv->edata.seoj.eojx3);
+			result = -1;
+			break;
+		}
+		_ecn_tsk_eoj_set(svc, p_sobj, sobjatr, fromapp, true, fa_fbs_id, ESV_NOP, ESV_NOP, &a_fbs_anno); /* 0; 0 */
+		result = 1;
+		break;
+
+	/* 0x6E ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ± */
+	case ESV_SET_GET_RES:	/* 0x7E ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãå¿ç­ */
+	case ESV_SET_GET_SNA:	/* 0x5E ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãä¸å¯å¿ç­ */
+		if (!p_sobj) {
+			ECN_DBG_PUT_1("_ecn_tsk_ecn_msg_main() eoj %06X not found.",
+				p_esv->edata.seoj.eojx1 << 16 | p_esv->edata.seoj.eojx2 << 8 | p_esv->edata.seoj.eojx3);
+			result = -1;
+			break;
+		}
+		_ecn_tsk_eoj_set_get_res(svc, p_sobj, sobjatr, fromapp, fa_fbs_id, &a_fbs_anno); /* 0x7A; 0 */
+		result = 1;
+		break;
+
+	/* 0x74 ãã­ããã£å¤éç¥ï¼å¿ç­è¦ï¼ */
+	case ESV_INFC_RES:		/* 0x7A ãã­ããã£å¤éç¥å¿ç­ */
+		result = 1;
+		break;
+
+	default:
+		ECN_DBG_PUT_1("_ecn_tsk_ecn_msg_main() esv 0x%02X undefined.", p_esv->edata.esv);
+		result = -1;
+		break;
+	}
+
+	/* ãã­ããã£éç¥è¦æ±ãéä¿¡ */
+	if (a_fbs_anno.ptr != NULL) {
+		ER a_ret = _ecn_tsk_snd_mbx(svc, a_fbs_anno, true);
+		if (a_ret != E_OK)
+			_ecn_fbs_del(mrb, a_fbs_anno);
+	}
+
+	return result;
+}
+
+#ifdef ECN_DBG_PUT_ENA
+static void f_put_fbs_eoj(const char *fp_fncnm, const char *fp_varnm,
+	ECN_FBS_ID fa_fbs_id);
+static void f_put_fbs_eoj(const char *fp_fncnm, const char *fp_varnm,
+	ECN_FBS_ID fa_fbs_id)
+{
+	ECN_DBG_PUT_4("%s() %s eoj src:%06X dest:%06X",
+		fp_fncnm, fp_varnm,
+		((T_EDATA *)fa_fbs_id.ptr)->hdr.edata.seoj.eojx1 << 16 | ((T_EDATA *)fa_fbs_id.ptr)->hdr.edata.seoj.eojx2 << 8 | ((T_EDATA *)fa_fbs_id.ptr)->hdr.edata.seoj.eojx3,
+		((T_EDATA *)fa_fbs_id.ptr)->hdr.edata.deoj.eojx1 << 16 | ((T_EDATA *)fa_fbs_id.ptr)->hdr.edata.deoj.eojx2 << 8 | ((T_EDATA *)fa_fbs_id.ptr)->hdr.edata.deoj.eojx3);
+}
+#else
+#define f_put_fbs_eoj(f,v,r)
+#endif /* #ifdef ECN_DBG_PUT_ENA */
+
+static const EPRPINIB *_ecn_tsk_eoj_get_property(const EOBJINIB *fp_obj, uint8_t fa_epc);
+static const EPRPINIB *_ecn_tsk_eoj_get_property(const EOBJINIB *fp_obj, uint8_t fa_epc)
+{
+	const EPRPINIB	**p = fp_obj->eprp;
+	uint_t i;
+#ifdef ECHONET_CONTROLLER_EXTENTION
+	if (fp_obj->eprpcnt == 0) {
+		return ecn_agent_get_property(fp_obj, fa_epc, *p);
+	}
+#endif
+	for (i = 0; i < fp_obj->eprpcnt; i++, p++) {
+		if ((*p)->eprpcd != fa_epc)
+			continue;
+
+		return *p;
+	}
+	ECN_DBG_PUT_4("_ecn_tsk_eoj_get_property(0x%02X-0x%02X-0x%02X, epc:0x%02X) not found.",
+		fp_obj->eojx1, fp_obj->eojx2, fp_obj->eojx3, fa_epc);
+
+	return NULL;
+}
+
+static int _ecn_tsk_eoj_set_edt(ecnl_svc_task_t *svc, const EPRPINIB *fp_prp, void *fp_src, int fa_srcsz,
+	bool_t *fa_anno);
+static int _ecn_tsk_eoj_set_edt(ecnl_svc_task_t *svc, const EPRPINIB *fp_prp, void *fp_src, int fa_srcsz,
+	bool_t *fa_anno)
+{
+	if (!fp_prp->eprpset)
+		return -1;
+
+	ECN_DBG_PUT_1("_ecn_tsk_eoj_set_edt(epc:0x%02X) call eprpset()", fp_prp->eprpcd);
+
+	return fp_prp->eprpset(svc, fp_prp, fp_src, fa_srcsz, fa_anno);
+}
+
+static int _ecn_tsk_eoj_get_edt(ecnl_svc_task_t *svc, const EPRPINIB *fp_prp, void *fp_dst, int fa_dstsz);
+static int _ecn_tsk_eoj_get_edt(ecnl_svc_task_t *svc, const EPRPINIB *fp_prp, void *fp_dst, int fa_dstsz)
+{
+	if (fa_dstsz < fp_prp->eprpsz)
+		return -1;
+	if (!fp_prp->eprpget)
+		return -1;
+
+	ECN_DBG_PUT_1("_ecn_tsk_eoj_get_edt(epc:0x%02X) call eprpget()", fp_prp->eprpcd);
+
+	return fp_prp->eprpget(svc, fp_prp, fp_dst, fp_prp->eprpsz);
+}
+
+static T_ECN_SUB_BLK *_ecn_tsk_get_prp_pce(ecnl_svc_task_t *svc, ECN_FBS_ID fa_fbs_id, T_ECN_PRP *fp_prp,
+	T_ECN_SUB_BLK *const fp_prev_blk);
+
+/*
+ * ECN_FBS_IDããT_ECN_PRP1ä»¶ã¨ãã®ä»éãã¼ã¿(edt)ãæ½åºããedtã®ãã¤ã³ã¿ãè¿ã
+ * å¼æ°
+ * ECN_FBS_ID fa_fbs_id					èª­ã¿åãFBS
+ * T_ECN_PRP *fp_prp					epc+pdcã®æ ¼ç´å
+
+ * T_ECN_SUB_BLK * const fp_prev_blk	ååä½¿ã£ãã¡ã¢ãªã®ãã¤ã³ã¿(ç¡ããã°0)
+ * æ­£å¸¸ï¼ãã¤ã³ã¿ NG:0
+ * ãã¤ã³ã¿ã¯_ecn_fbs_mbx_rel()ã§è§£æ¾ããå¿
+è¦ããã
+ */
+static T_ECN_SUB_BLK *_ecn_tsk_get_prp_pce(ecnl_svc_task_t *svc, ECN_FBS_ID fa_fbs_id, T_ECN_PRP *fp_prp,
+	T_ECN_SUB_BLK *const fp_prev_blk)
+{
+	mrb_state *mrb = svc->mrb;
+	T_ECN_SUB_BLK	*p_blk = 0;
+	int		a_size;
+	ER		a_ret;
+
+	/* ãã­ããã£ç¨ã¡ã¢ãªã®åå¾ */
+	if (fp_prev_blk) {
+		p_blk = fp_prev_blk; /* ååä½¿ã£ãã¡ã¢ãªããããªããåå©ç¨ãã */
+	}
+	else {
+		p_blk = (T_ECN_SUB_BLK *)_ecn_fbs_mbx_get(mrb, sizeof(*p_blk));
+		if (!p_blk) {
+			ECN_DBG_PUT("_ecn_fbs_mbx_get() fault.");
+			return 0;	/* ã¡ã¢ãªä¸è¶³ */
+		}
+	}
+	memset(p_blk, 0, sizeof(*p_blk));
+
+	/* T_ECN_PRPé¨å(epc,pdc)ãèª­ã¿åã */
+	a_size = 0;
+	a_ret = _ecn_fbs_get_data(mrb, fa_fbs_id, fp_prp, sizeof(*fp_prp), &a_size);
+	if (a_ret || a_size < (int)sizeof(*fp_prp)) {
+		ECN_DBG_PUT_2("_ecn_fbs_get_data() result = %d:%s", a_ret, itron_strerror(a_ret));
+		goto lb_except;
+	}
+
+	if (0 < fp_prp->pdc) {
+		/* ä»éãã¼ã¿é¨å(edt)ãèª­ã¿åã */
+		a_size = 0;
+		a_ret = _ecn_fbs_get_data(mrb, fa_fbs_id, p_blk, fp_prp->pdc, &a_size);
+		if (a_ret || a_size < (int)fp_prp->pdc) {
+			ECN_DBG_PUT_2("_ecn_fbs_get_data() result = %d:%s", a_ret, itron_strerror(a_ret));
+			goto lb_except;
+		}
+	}
+
+	return p_blk;
+
+lb_except:
+	/* ãã­ããã£ç¨ã¡ã¢ãªè§£æ¾ */
+	if (p_blk && !fp_prev_blk)
+		_ecn_fbs_mbx_rel(mrb, p_blk);
+
+	return 0;	/* 0:NG */
+}
+
+static ER _ecn_tsk_eoj_set_main(ecnl_svc_task_t *svc, const EOBJINIB *fp_obj, ATR fa_eobjatr, bool_t fa_fromapp, bool_t fa_update,
+	ECN_FBS_ID fa_fbs_id, ECN_FBS_ID a_fbs_res, ECN_FBS_ID *fa_fbs_anno, int a_count,
+	int *p_sw_ok);
+/* ãã­ããã£å¤æ¸ãè¾¼ã¿å®è¡ */
+static ER _ecn_tsk_eoj_set_main(ecnl_svc_task_t *svc, const EOBJINIB *fp_obj, ATR fa_eobjatr, bool_t fa_fromapp, bool_t fa_update,
+	ECN_FBS_ID fa_fbs_id, ECN_FBS_ID a_fbs_res, ECN_FBS_ID *fa_fbs_anno, int a_count,
+	int *p_sw_ok)
+{
+	mrb_state *mrb = svc->mrb;
+	T_ECN_SUB_BLK	*p_edt	=	0;
+	T_ECN_PRP			a_prp;			/* epc+pdc */
+	const EPRPINIB		*a_eprp;
+	int			i, a_ans;
+	ER			a_ret;
+	uint8_t		a_size;
+	bool_t		a_anno = false, a_update;
+
+	((T_EDATA *)a_fbs_res.ptr)->hdr.edata.opc = 0;
+
+	for (i = 0; i < a_count; i++) {
+		/* ECN_FBS_IDããT_ECN_PRP1ä»¶ã¨ãã®ä»éãã¼ã¿ãæ½åºãããã®ãã¤ã³ã¿ãè¿ã */
+		p_edt = _ecn_tsk_get_prp_pce(svc, fa_fbs_id, &a_prp, p_edt);
+		if (!p_edt) {
+			ECN_DBG_PUT("_ecn_tsk_eoj_set_main(): _ecn_tsk_get_prp_pce() fault.");
+			goto lb_except;
+		}
+
+		/* ãã­ããã£ã®è¨­å® set_prp(obj, reqp, resp) */
+		a_size = a_prp.pdc;
+		/* obj,epcã«å¯¾å¿ããseté¢æ°ãå¼ã¶ */
+		a_eprp = _ecn_tsk_eoj_get_property(fp_obj, a_prp.epc);
+		if ((a_eprp != NULL)
+			&& (fa_update || (((a_eprp->eprpatr & EPC_RULE_SET) != 0) || fa_fromapp))) {
+			a_anno = (fa_eobjatr == EOBJ_LOCAL_NODE) && ((a_eprp->eprpatr & EPC_ANNOUNCE) != 0);
+			a_update = a_anno;
+			a_ans = _ecn_tsk_eoj_set_edt(svc, a_eprp, p_edt->payload, a_size, &a_update);
+			if (a_anno && (a_ans > 0))
+				a_anno = a_update;
+		}
+		else {
+			a_ans = -1;
+		}
+		if (a_ans == a_size) {
+			ECN_DBG_PUT_4("_ecn_tsk_eoj_set_edt(0x%06X, 0x%02x, 0x%02X..., %u) ok.",
+				fp_obj->eojx1 << 16 | fp_obj->eojx2 << 8 | fp_obj->eojx3,
+				a_prp.epc, p_edt->payload[0], a_size);
+			a_prp.pdc = 0;
+		} else {
+			ECN_DBG_PUT_4("_ecn_tsk_eoj_set_edt(0x%06X, 0x%02x, 0x%02X..., %u) fault.",
+				fp_obj->eojx1 << 16 | fp_obj->eojx2 << 8 | fp_obj->eojx3,
+				a_prp.epc, p_edt->payload[0], a_size);
+			*p_sw_ok = 0;	/* ãã­ããã£è¨­å®å¤±æ */
+			/* å¿ç­å¦çã®å ´åEDTã¯è¨­å®ããªã */
+			if (fa_update)
+				a_prp.pdc = 0;
+		}
+
+		/* å¿ç­é»æç¨ã¡ã¢ãªã«ãã¼ã¿è¿½å (epc,pdcã®2byte) */
+		a_ret = _ecn_fbs_add_data_ex(mrb, a_fbs_res, &a_prp, sizeof(a_prp));
+		if (a_ret) {
+			ECN_DBG_PUT_2("_ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
+			goto lb_except;
+		}
+
+		if (0 < a_prp.pdc) {
+			/* å¿ç­é»æç¨ã¡ã¢ãªã«ãã¼ã¿è¿½å (edt n-byte) */
+			a_ret = _ecn_fbs_add_data_ex(mrb, a_fbs_res, p_edt->payload, a_prp.pdc);
+			if (a_ret) {
+				ECN_DBG_PUT_2("_ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
+				goto lb_except;
+			}
+		}
+		((T_EDATA *)a_fbs_res.ptr)->hdr.edata.opc ++;
+
+		/* ãã­ããã£éç¥ããã®å ´å */
+		if (a_anno && (a_ans == a_size)) {
+			if (fa_fbs_anno->ptr == NULL) {
+				_ecn_tsk_mk_esv(svc, fa_fbs_anno, (ID)1, echonet_svctask_get_eobjid(svc, fp_obj),
+					a_prp.epc, 0, NULL, ESV_INF_REQ);
+			}
+			else{
+				ecn_add_edt(mrb, (T_EDATA *)fa_fbs_anno->ptr, a_prp.epc, 0, 0);
+			}
+		}
+	}
+	a_ret = E_OK; /* ok */
+	goto lb_finally;
+
+lb_except:
+	a_ret = E_SYS;
+
+lb_finally:
+	/* ãã­ããã£ç¨ã¡ã¢ãªè§£æ¾ */
+	if (p_edt)
+		_ecn_fbs_mbx_rel(mrb, p_edt);
+
+	return a_ret;
+}
+
+static ER _ecn_tsk_eoj_get_main(ecnl_svc_task_t *svc, const EOBJINIB *fp_obj, ATR fa_eobjatr, bool_t fa_forward, ATR fa_access,
+	ECN_FBS_ID fa_fbs_id, ECN_FBS_ID a_fbs_res, int a_count, int *p_sw_ok);
+/* ãã­ããã£å¤èª­ã¿åºãå®è¡ */
+static ER _ecn_tsk_eoj_get_main(ecnl_svc_task_t *svc, const EOBJINIB *fp_obj, ATR fa_eobjatr, bool_t fa_forward, ATR fa_access,
+	ECN_FBS_ID fa_fbs_id, ECN_FBS_ID a_fbs_res, int a_count, int *p_sw_ok)
+{
+	mrb_state *mrb = svc->mrb;
+	T_ECN_SUB_BLK	*p_edt		=	0;
+	void				*p_prp_buf	=	0;	/* ä½æ¥­é å */
+	const EPRPINIB		*a_eprp;
+	ER					a_ret		=	E_SYS;
+	T_ECN_PRP			a_prp;			/* epc+pdc */
+	int		i, a_ans;
+
+	((T_EDATA *)a_fbs_res.ptr)->hdr.edata.opc = 0;
+
+	/* ä½æ¥­é åç¢ºä¿ */
+	p_prp_buf = _ecn_fbs_mbx_get(mrb, ECHONET_MEMPOOL_BLOCK_SIZE);
+	if (!p_prp_buf) {
+		ECN_DBG_PUT_2("_ecn_fbs_mbx_get() result = %d:%s", a_ret, itron_strerror(a_ret));
+		goto lb_except;	/* ã¡ã¢ãªä¸è¶³ */
+	}
+
+	for (i = 0; i < a_count; i++) {
+		/* ECN_FBS_IDããT_ECN_PRP1ä»¶ã¨ãã®ä»éãã¼ã¿ãæ½åº */
+		p_edt = _ecn_tsk_get_prp_pce(svc, fa_fbs_id, &a_prp, p_edt);
+		if (!p_edt) {
+			ECN_DBG_PUT("_ecn_tsk_eoj_get_main(): _ecn_tsk_get_prp_pce() fault.");
+			goto lb_except;
+		}
+
+		/* ãã­ããã£ã®åå¾ get_eprp(obj, reqp, resp, size) */
+		memset(p_prp_buf, 0, ECHONET_MEMPOOL_BLOCK_SIZE);
+		/* obj,epcã«å¯¾å¿ããgeté¢æ°ãå¼ã¶ */
+		a_eprp = _ecn_tsk_eoj_get_property(fp_obj, a_prp.epc);
+		if ((a_eprp != NULL) && (((a_eprp->eprpatr & fa_access) != 0) && (fa_eobjatr == EOBJ_LOCAL_NODE) || fa_forward)) {
+			a_ans = _ecn_tsk_eoj_get_edt(svc, a_eprp, p_prp_buf, ECHONET_MEMPOOL_BLOCK_SIZE - 1);
+		}
+		else {
+			a_ans = -1;
+		}
+		if (0 < a_ans && a_ans <= (int)UINT8_MAX) {
+			a_prp.pdc = (uint8_t)a_ans;
+		} else {
+			*p_sw_ok = 0;	/* ãã­ããã£åå¾å¤±æ */
+			a_ans = 0;
+			a_prp.pdc = 0;
+		}
+
+		/* å¿ç­é»æç¨ã¡ã¢ãªã«ãã¼ã¿è¿½å (epc,pdcã®2byte) */
+		a_ret = _ecn_fbs_add_data_ex(mrb, a_fbs_res, &a_prp, sizeof(a_prp));
+		if (a_ret) {
+			ECN_DBG_PUT_2("_ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
+			goto lb_except;
+		}
+		if (0 < a_ans) {
+			/* ä»éãã¼ã¿è¿½å  */
+			a_ret = _ecn_fbs_add_data_ex(mrb, a_fbs_res, p_prp_buf, a_ans);
+			if (a_ret) {
+				ECN_DBG_PUT_2("_ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
+				goto lb_except;
+			}
+		}
+		((T_EDATA *)a_fbs_res.ptr)->hdr.edata.opc ++;
+	}
+	a_ret = E_OK; /* ok */
+	goto lb_finally;
+
+lb_except:
+	a_ret = E_SYS;
+
+lb_finally:
+	/* ä½æ¥­é åè§£æ¾ */
+	if (p_prp_buf)
+		_ecn_fbs_mbx_rel(mrb, p_prp_buf);
+
+	/* ãã­ããã£ç¨ã¡ã¢ãªè§£æ¾ */
+	if (p_edt)
+		_ecn_fbs_mbx_rel(mrb, p_edt);
+
+	return a_ret;
+}
+
+static ER _ecn_tsk_eoj_res_main(ecnl_svc_task_t *svc, ECN_FBS_ID fa_fbs_id, ECN_FBS_ID a_fbs_res, int a_count, int *p_sw_ok);
+/* ãã­ããã£å¤èª­ã¿åºãå®è¡ */
+static ER _ecn_tsk_eoj_res_main(ecnl_svc_task_t *svc, ECN_FBS_ID fa_fbs_id, ECN_FBS_ID a_fbs_res, int a_count, int *p_sw_ok)
+{
+	mrb_state *mrb = svc->mrb;
+	T_ECN_SUB_BLK	*p_edt		=	0;
+	void				*p_prp_buf	=	0;	/* ä½æ¥­é å */
+	ER					a_ret		=	E_SYS;
+	T_ECN_PRP			a_prp;			/* epc+pdc */
+	int		i;
+
+	((T_EDATA *)a_fbs_res.ptr)->hdr.edata.opc = 0;
+
+	/* ä½æ¥­é åç¢ºä¿ */
+	p_prp_buf = _ecn_fbs_mbx_get(mrb, ECHONET_MEMPOOL_BLOCK_SIZE);
+	if (!p_prp_buf) {
+		ECN_DBG_PUT_2("_ecn_fbs_mbx_get() result = %d:%s", a_ret, itron_strerror(a_ret));
+		goto lb_except;	/* ã¡ã¢ãªä¸è¶³ */
+	}
+
+	for (i = 0; i < a_count; i++) {
+		/* ECN_FBS_IDããT_ECN_PRP1ä»¶ã¨ãã®ä»éãã¼ã¿ãæ½åº */
+		p_edt = _ecn_tsk_get_prp_pce(svc, fa_fbs_id, &a_prp, p_edt);
+		if (!p_edt) {
+			ECN_DBG_PUT("_ecn_tsk_eoj_get_main(): _ecn_tsk_get_prp_pce() fault.");
+			goto lb_except;
+		}
+
+		a_prp.pdc = 0;
+
+		/* å¿ç­é»æç¨ã¡ã¢ãªã«ãã¼ã¿è¿½å (epc,pdcã®2byte) */
+		a_ret = _ecn_fbs_add_data_ex(mrb, a_fbs_res, &a_prp, sizeof(a_prp));
+		if (a_ret) {
+			ECN_DBG_PUT_2("_ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
+			goto lb_except;
+		}
+		((T_EDATA *)a_fbs_res.ptr)->hdr.edata.opc++;
+	}
+	a_ret = E_OK; /* ok */
+	goto lb_finally;
+
+lb_except:
+	a_ret = E_SYS;
+
+lb_finally:
+	/* ä½æ¥­é åè§£æ¾ */
+	if (p_prp_buf)
+		_ecn_fbs_mbx_rel(mrb, p_prp_buf);
+
+	/* ãã­ããã£ç¨ã¡ã¢ãªè§£æ¾ */
+	if (p_edt)
+		_ecn_fbs_mbx_rel(mrb, p_edt);
+
+	return a_ret;
+}
+
+/* ãã­ããã£å¤èª­ã¿é£ã°ãå®è¡ */
+static ER _ecn_tsk_eoj_skip_main(ecnl_svc_task_t *svc, const EOBJINIB *fp_obj, ECN_FBS_ID fa_fbs_id,
+	int a_count);
+static ER _ecn_tsk_eoj_skip_main(ecnl_svc_task_t *svc, const EOBJINIB *fp_obj, ECN_FBS_ID fa_fbs_id,
+	int a_count)
+{
+	mrb_state *mrb = svc->mrb;
+	T_ECN_PRP	a_prp;			/* epc+pdc */
+	int			i, a_size;
+	ER			a_ret;
+
+	for (i = 0; i < a_count; i++) {
+		/* T_ECN_PRPé¨å(epc,pdc)ãèª­ã¿åã */
+		a_size = 0;
+		a_ret = _ecn_fbs_get_data(mrb, fa_fbs_id, &a_prp, sizeof(a_prp), &a_size);
+		if (a_ret || a_size < (int)sizeof(a_prp)) {
+			ECN_DBG_PUT_2("_ecn_fbs_get_data() result = %d:%s", a_ret, itron_strerror(a_ret));
+			goto lb_except;
+		}
+
+		/* pdcåèª­ã¿é£ã°ã */
+		a_ret = _ecn_fbs_seek_rpos(fa_fbs_id, a_prp.pdc);
+		if (a_ret) {
+			ECN_DBG_PUT_2("_ecn_fbs_seek_rpos() result = %d:%s", a_ret, itron_strerror(a_ret));
+			goto lb_except;
+		}
+	}
+	a_ret = E_OK; /* ok */
+	goto lb_finally;
+
+lb_except:
+	a_ret = E_SYS;
+
+lb_finally:
+	return a_ret;
+}
+
+static void _ecn_tsk_mk_rsp_hdr(const EOBJINIB *fp_obj, T_ECN_EDT_HDR *fp_rsp_esv,
+	T_ECN_EDT_HDR const *fp_req_esv);
+/* å¿ç­é»æè¨­å® */
+static void _ecn_tsk_mk_rsp_hdr(const EOBJINIB *fp_obj, T_ECN_EDT_HDR *fp_rsp_esv,
+	T_ECN_EDT_HDR const *fp_req_esv)
+{
+	fp_rsp_esv->ecn_hdr.ehd1 = ECN_EDH1_ECHONET_LITE;
+	fp_rsp_esv->ecn_hdr.ehd2 = ECN_EDH2_FORMAT_1;
+	fp_rsp_esv->ecn_hdr.tid = fp_req_esv->ecn_hdr.tid;
+	fp_rsp_esv->edata.seoj.eojx1 = fp_obj->eojx1;
+	fp_rsp_esv->edata.seoj.eojx2 = fp_obj->eojx2;
+	fp_rsp_esv->edata.seoj.eojx3 = fp_obj->eojx3;
+	fp_rsp_esv->edata.deoj = fp_req_esv->edata.seoj;
+}
+
+static void _ecn_tsk_mk_rsp_hdr_res(T_ECN_EDT_HDR *fp_rsp_esv,
+	T_ECN_EDT_HDR const *fp_req_esv);
+static void _ecn_tsk_mk_rsp_hdr_res(T_ECN_EDT_HDR *fp_rsp_esv,
+	T_ECN_EDT_HDR const *fp_req_esv)
+{
+	fp_rsp_esv->ecn_hdr.ehd1 = ECN_EDH1_ECHONET_LITE;
+	fp_rsp_esv->ecn_hdr.ehd2 = ECN_EDH2_FORMAT_1;
+	fp_rsp_esv->ecn_hdr.tid = fp_req_esv->ecn_hdr.tid;
+	fp_rsp_esv->edata.seoj = fp_req_esv->edata.deoj;
+	fp_rsp_esv->edata.deoj = fp_req_esv->edata.seoj;
+}
+
+/* å¿ç­é»æç¨fbsè¨­å® */
+static void _ecn_tsk_set_rsp_fbs(ECN_FBS_ID fa_rsp_fbs, T_ECN_FST_BLK const *fp_req_ptr);
+/* å¿ç­é»æç¨fbsè¨­å®(sender/targetã®è¨­å®) */
+static void _ecn_tsk_set_rsp_fbs(ECN_FBS_ID fa_rsp_fbs, T_ECN_FST_BLK const *fp_req_ptr)
+{
+	fa_rsp_fbs.ptr->hdr.type = ECN_MSG_ECHONET;
+	fa_rsp_fbs.ptr->hdr.sender.id = ENOD_LOCAL_ID;
+	fa_rsp_fbs.ptr->hdr.target.id = fp_req_ptr->hdr.reply.id;
+	fa_rsp_fbs.ptr->hdr.reply.id = ENOD_LOCAL_ID;
+}
+
+/* ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±	*/
+static void _ecn_tsk_eoj_set(ecnl_svc_task_t *svc, const EOBJINIB *fp_obj, ATR fa_eobjatr, bool_t fa_fromapp, bool_t fa_update,
+	ECN_FBS_ID fa_fbs_id, ECN_SRV_CODE fa_res_esv, ECN_SRV_CODE fa_sna_esv,
+	ECN_FBS_ID *fa_fbs_anno)
+{
+	mrb_state *mrb = svc->mrb;
+	T_ECN_EDT_HDR	const *p_req_esv = &((T_EDATA *)fa_fbs_id.ptr)->hdr;
+	T_ECN_EDT_HDR	a_ecn_hdp;
+	ECN_FBS_ID		a_fbs_res	= { 0 };
+	ER		a_ret;
+	int		a_size;
+	int		a_sw_ok = 1;
+	T_ECN_EOJ	eoj;
+
+	memset(&a_ecn_hdp, 0, sizeof(a_ecn_hdp));
+
+	/* å¿ç­æå¤§ãµã¤ãºã®åå¾ */
+	a_size = sizeof(T_ECN_HDR) + sizeof(T_ECN_EDATA_BODY) + sizeof(T_ECN_PRP);
+
+	/* å¿ç­é»æç¨ã¡ã¢ãªã®åå¾ */
+	a_ret = _ecn_fbs_cre(mrb, a_size, &a_fbs_res);
+	if (a_ret != E_OK || !a_fbs_res.ptr) /* ç¢ºä¿å¤±æ */
+		return;
+
+	/* å¿ç­é»æè¨­å® */
+	if(p_req_esv->edata.deoj.eojx3 != 0)
+		_ecn_tsk_mk_rsp_hdr_res(&a_ecn_hdp, p_req_esv);
+	else
+		_ecn_tsk_mk_rsp_hdr(fp_obj, &a_ecn_hdp, p_req_esv);
+
+	/* æ­£å¸¸æã®å¿ç­é»æããã­ããã£å¤éç¥å¿ç­ã®å ´å */
+	if (fa_res_esv == ESV_INFC_RES) {
+		/* éä¿¡å
+ã¨å®å
+ãå
+¥ãæ¿ã */
+		eoj = a_ecn_hdp.edata.seoj;
+		a_ecn_hdp.edata.seoj = a_ecn_hdp.edata.deoj;
+		a_ecn_hdp.edata.deoj = eoj;
+	}
+
+	f_put_fbs_eoj("_ecn_tsk_eoj_set", "fa_fbs_id", fa_fbs_id); /* s/deoj ãããã°åºå */
+
+	/* å¿ç­é»æç¨ã¡ã¢ãªã«ãã¼ã¿è¿½å  */
+	a_ret = _ecn_fbs_add_data_ex(mrb, a_fbs_res, &a_ecn_hdp,
+				sizeof(a_ecn_hdp.ecn_hdr) + sizeof(a_ecn_hdp.edata));
+	if (a_ret)
+		goto lb_except;
+
+	/* payloadå
+é ­ã®T_ECN_HDR(ecn_hdr), T_ECN_EDATA_BODY(edata)ãèª­ã¿é£ã°ã */
+	a_ret = _ecn_fbs_set_rpos(fa_fbs_id, offsetof(T_ECN_EDT_HDR, ecn_prp));
+	if (a_ret)
+		goto lb_except;
+
+	/* å¿ç­é»æç¨fbsè¨­å® */
+	_ecn_tsk_set_rsp_fbs(a_fbs_res, fa_fbs_id.ptr);
+
+	/* ãã­ããã£å¤æ¸ãè¾¼ã¿å®è¡ */
+	a_ret = _ecn_tsk_eoj_set_main(svc, fp_obj, fa_eobjatr, fa_fromapp, fa_update, fa_fbs_id, a_fbs_res,
+		fa_fbs_anno, p_req_esv->edata.opc, &a_sw_ok);
+	if (a_ret)
+		goto lb_except;
+
+	/* å¿ç­è¦ã®å ´å */
+	if (a_sw_ok) {
+		if (!fa_res_esv) {
+			/* å¿ç­ä¸è¦ã®å ´å */
+			_ecn_fbs_del(mrb, a_fbs_res);
+			goto lb_finally;
+		}
+		/* è¨­å®å¦çæå */
+		((T_EDATA *)a_fbs_res.ptr)->hdr.edata.esv = fa_res_esv;
+	} else {
+		if (!fa_sna_esv) {
+			/* å¿ç­ä¸è¦ã®å ´å */
+			_ecn_fbs_del(mrb, a_fbs_res);
+			goto lb_finally;
+		}
+		/* è¨­å®å¦çå¤±æ */
+		((T_EDATA *)a_fbs_res.ptr)->hdr.edata.esv = fa_sna_esv;
+	}
+	/* å¿ç­éä¿¡ */
+	a_ret = _ecn_tsk_snd_mbx(svc, a_fbs_res, false);
+	if (a_ret == E_OK)
+		goto lb_finally;
+
+lb_except:
+	/* ãã¼ã¿éä¿¡å¤±æãããé åè§£æ¾ */
+	if (a_fbs_res.ptr)
+		_ecn_fbs_del(mrb, a_fbs_res);
+
+lb_finally:
+	return;
+}
+
+/* ãã­ããã£å¤èª­ã¿åºãè¦æ±	*/
+static void _ecn_tsk_eoj_get(ecnl_svc_task_t *svc, const EOBJINIB *fp_obj, ATR fa_eobjatr, bool_t fa_forward, ATR fa_access,
+	ECN_FBS_ID fa_fbs_id, ECN_SRV_CODE fa_res_esv, ECN_SRV_CODE fa_sna_esv)
+{
+	mrb_state *mrb = svc->mrb;
+	T_ECN_EDT_HDR	const *p_req_esv = &((T_EDATA *)fa_fbs_id.ptr)->hdr;
+	T_ECN_EDT_HDR	a_ecn_hdp;
+	ECN_FBS_ID		a_fbs_res	= { 0 };
+	ER		a_ret;
+	int		a_size;
+	int		a_sw_ok = 1;
+
+	memset(&a_ecn_hdp, 0, sizeof(a_ecn_hdp));
+
+	/* åæåå¾ãµã¤ãº */
+	a_size = sizeof(T_ECN_HDR) + sizeof(T_ECN_EDATA_BODY) + sizeof(T_ECN_PRP);
+
+	/* å¿ç­é»æç¨ã¡ã¢ãªã®åå¾ */
+	a_ret = _ecn_fbs_cre(mrb, a_size, &a_fbs_res);
+	if (a_ret != E_OK || !a_fbs_res.ptr) { /* ç¢ºä¿å¤±æ */
+		ECN_DBG_PUT_2("_ecn_fbs_cre() result = %d:%s", a_ret, itron_strerror(a_ret));
+		goto lb_finally;
+	}
+
+	/* å¿ç­é»æè¨­å® */
+	if(p_req_esv->edata.deoj.eojx3 != 0)
+		_ecn_tsk_mk_rsp_hdr_res(&a_ecn_hdp, p_req_esv);
+	else
+		_ecn_tsk_mk_rsp_hdr(fp_obj, &a_ecn_hdp, p_req_esv);
+
+	f_put_fbs_eoj("_ecn_tsk_eoj_get", "fa_fbs_id", fa_fbs_id); /* s/deoj ãããã°åºå */
+
+	/* å¿ç­é»æç¨ã¡ã¢ãªã«ãã¼ã¿è¿½å  */
+	a_ret = _ecn_fbs_add_data_ex(mrb, a_fbs_res, &a_ecn_hdp,
+			sizeof(a_ecn_hdp.ecn_hdr) + sizeof(a_ecn_hdp.edata));
+	if (a_ret) {
+		ECN_DBG_PUT_2("_ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
+		goto lb_except;
+	}
+
+	/* payloadå
+é ­ã®T_ECN_HDR(ecn_hdr), T_ECN_EDATA_BODY(edata)ãèª­ã¿é£ã°ã */
+	a_ret = _ecn_fbs_set_rpos(fa_fbs_id, offsetof(T_ECN_EDT_HDR, ecn_prp));
+	if (a_ret) {
+		ECN_DBG_PUT_2("_ecn_fbs_set_rpos() result = %d:%s", a_ret, itron_strerror(a_ret));
+		goto lb_except;
+	}
+
+	/* å¿ç­é»æç¨fbsè¨­å® */
+	_ecn_tsk_set_rsp_fbs(a_fbs_res, fa_fbs_id.ptr);
+
+	/* ãã­ããã£å¤èª­ã¿è¾¼ã¿å®è¡ */
+	a_ret = _ecn_tsk_eoj_get_main(svc, fp_obj, fa_eobjatr, fa_forward, fa_access, fa_fbs_id, a_fbs_res,
+		((T_EDATA *)fa_fbs_id.ptr)->hdr.edata.opc, &a_sw_ok);
+	if (a_ret) {
+		ECN_DBG_PUT_2("_ecn_tsk_eoj_get_main() result = %d:%s", a_ret, itron_strerror(a_ret));
+		goto lb_except;
+	}
+
+	if (a_sw_ok) {
+		if (!fa_res_esv) {
+			/* å¿ç­ä¸è¦ã®å ´å */
+			_ecn_fbs_del(mrb, a_fbs_res);
+			goto lb_finally;
+		}
+		/* è¨­å®å¦çæå */
+		((T_EDATA *)a_fbs_res.ptr)->hdr.edata.esv = fa_res_esv;
+	} else {
+		if (!fa_sna_esv) {
+			/* å¿ç­ä¸è¦ã®å ´å */
+			_ecn_fbs_del(mrb, a_fbs_res);
+			goto lb_finally;
+		}
+		/* è¨­å®å¦çå¤±æ */
+		((T_EDATA *)a_fbs_res.ptr)->hdr.edata.esv = fa_sna_esv;
+
+		/* ä¸å¯å¿ç­ã®å ´åã¯åå¥éä¿¡ãã */
+		if (a_fbs_res.ptr->hdr.target.id == ENOD_MULTICAST_ID) {
+			a_fbs_res.ptr->hdr.target.id = fa_fbs_id.ptr->hdr.sender.id;
+		}
+	}
+	/* å¿ç­éä¿¡ */
+	a_ret = _ecn_tsk_snd_mbx(svc, a_fbs_res, false);
+	if (a_ret != E_OK) {
+		ECN_DBG_PUT_2("_ecn_tsk_snd_mbx() result = %d:%s", a_ret, itron_strerror(a_ret));
+		goto lb_except;
+	}
+	goto lb_finally;
+
+lb_except:
+	/* ãã¼ã¿éä¿¡å¤±æãããé åè§£æ¾ */
+	if (a_fbs_res.ptr)
+		_ecn_fbs_del(mrb, a_fbs_res);
+
+lb_finally:
+	return;
+}
+
+/* ãã­ããã£å¤èª­ã¿åºãè¦æ±	*/
+static void _ecn_tsk_eoj_res(ecnl_svc_task_t *svc, ECN_FBS_ID fa_fbs_id, ECN_SRV_CODE fa_res_esv,
+	ECN_SRV_CODE fa_sna_esv)
+{
+	mrb_state *mrb = svc->mrb;
+	T_ECN_EDT_HDR	const *p_req_esv = &((T_EDATA *)fa_fbs_id.ptr)->hdr;
+	T_ECN_EDT_HDR	a_ecn_hdp;
+	ECN_FBS_ID		a_fbs_res	= { 0 };
+	ER		a_ret;
+	int		a_size;
+	int		a_sw_ok = 1;
+
+	memset(&a_ecn_hdp, 0, sizeof(a_ecn_hdp));
+
+	/* åæåå¾ãµã¤ãº */
+	a_size = sizeof(T_ECN_HDR) + sizeof(T_ECN_EDATA_BODY) + sizeof(T_ECN_PRP);
+
+	/* å¿ç­é»æç¨ã¡ã¢ãªã®åå¾ */
+	a_ret = _ecn_fbs_cre(mrb, a_size, &a_fbs_res);
+	if (a_ret != E_OK || !a_fbs_res.ptr) { /* ç¢ºä¿å¤±æ */
+		ECN_DBG_PUT_2("_ecn_fbs_cre() result = %d:%s", a_ret, itron_strerror(a_ret));
+		goto lb_finally;
+	}
+
+	/* å¿ç­é»æè¨­å®						*/
+	_ecn_tsk_mk_rsp_hdr_res(&a_ecn_hdp, p_req_esv);
+
+	f_put_fbs_eoj("_ecn_tsk_eoj_res", "fa_fbs_id", fa_fbs_id); /* s/deoj ãããã°åºå */
+
+	/* å¿ç­é»æç¨ã¡ã¢ãªã«ãã¼ã¿è¿½å  */
+	a_ret = _ecn_fbs_add_data_ex(mrb, a_fbs_res, &a_ecn_hdp,
+			sizeof(a_ecn_hdp.ecn_hdr) + sizeof(a_ecn_hdp.edata));
+	if (a_ret) {
+		ECN_DBG_PUT_2("_ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
+		goto lb_except;
+	}
+
+	/* payloadå
+é ­ã®T_ECN_HDR(ecn_hdr), T_ECN_EDATA_BODY(edata)ãèª­ã¿é£ã°ã */
+	a_ret = _ecn_fbs_set_rpos(fa_fbs_id, offsetof(T_ECN_EDT_HDR, ecn_prp));
+	if (a_ret) {
+		ECN_DBG_PUT_2("_ecn_fbs_set_rpos() result = %d:%s", a_ret, itron_strerror(a_ret));
+		goto lb_except;
+	}
+
+	/* å¿ç­é»æç¨fbsè¨­å® */
+	_ecn_tsk_set_rsp_fbs(a_fbs_res, fa_fbs_id.ptr);
+
+	/* ãã­ããã£å¤èª­ã¿è¾¼ã¿å®è¡ */
+	a_ret = _ecn_tsk_eoj_res_main(svc, fa_fbs_id, a_fbs_res,
+		((T_EDATA *)fa_fbs_id.ptr)->hdr.edata.opc, &a_sw_ok);
+	if (a_ret) {
+		ECN_DBG_PUT_2("_ecn_tsk_eoj_res_main() result = %d:%s", a_ret, itron_strerror(a_ret));
+		goto lb_except;
+	}
+
+	if (a_sw_ok) {
+		if (!fa_res_esv) {
+			/* å¿ç­ä¸è¦ã®å ´å */
+			_ecn_fbs_del(mrb, a_fbs_res);
+			goto lb_finally;
+		}
+		/* è¨­å®å¦çæå */
+		((T_EDATA *)a_fbs_res.ptr)->hdr.edata.esv = fa_res_esv;
+	} else {
+		if (!fa_sna_esv) {
+			/* å¿ç­ä¸è¦ã®å ´å */
+			_ecn_fbs_del(mrb, a_fbs_res);
+			goto lb_finally;
+		}
+		/* è¨­å®å¦çå¤±æ */
+		((T_EDATA *)a_fbs_res.ptr)->hdr.edata.esv = fa_sna_esv;
+	}
+	/* å¿ç­éä¿¡ */
+	a_ret = _ecn_tsk_snd_mbx(svc, a_fbs_res, false);
+	if (a_ret != E_OK) {
+		ECN_DBG_PUT_2("_ecn_tsk_snd_mbx() result = %d:%s", a_ret, itron_strerror(a_ret));
+		goto lb_except;
+	}
+	goto lb_finally;
+
+lb_except:
+	/* ãã¼ã¿éä¿¡å¤±æãããé åè§£æ¾ */
+	if (a_fbs_res.ptr)
+		_ecn_fbs_del(mrb, a_fbs_res);
+
+lb_finally:
+	return;
+}
+
+static void _ecn_tsk_eoj_set_get(ecnl_svc_task_t *svc, const EOBJINIB *fp_obj, ATR fa_eobjatr, bool_t fa_fromapp,
+	ECN_FBS_ID fa_fbs_id, ECN_SRV_CODE fa_res_esv, ECN_SRV_CODE fa_sna_esv,
+	ECN_FBS_ID *fa_fbs_anno)
+{
+	mrb_state *mrb = svc->mrb;
+	T_ECN_EDT_HDR	const *p_req_esv = &((T_EDATA *)fa_fbs_id.ptr)->hdr;
+	T_ECN_EDT_HDR	a_ecn_hdp;
+	ECN_FBS_ID		a_fbs_res	= { 0 };
+	int				a_rdprp_wrpos;	/*	ãã­ããã£èª­ã¿è¾¼ã¿ä»¶æ°æ¸ãè¾¼ã¿æã®ãããä½ç½®	*/
+	ER		a_ret;
+	int		i, a_size, a_rdlen;
+	int		a_sw_ok = 1;
+	int		a_count = ((T_EDATA *)fa_fbs_id.ptr)->hdr.edata.opc;	/* å¦çãã­ããã£æ° */
+
+	memset(&a_ecn_hdp, 0, sizeof(a_ecn_hdp));
+
+	ECN_DBG_PUT_1("_ecn_tsk_eoj_set_get() eoj:%06X",
+		fp_obj->eojx1 << 16 | fp_obj->eojx2 << 8 | fp_obj->eojx3);
+
+	/* åæåå¾ãµã¤ãº */
+	a_size = sizeof(T_ECN_HDR) + sizeof(T_ECN_EDATA_BODY) + sizeof(T_ECN_PRP);
+
+	/* å¿ç­é»æç¨ã¡ã¢ãªã®åå¾ */
+	a_ret = _ecn_fbs_cre(mrb, a_size, &a_fbs_res);
+	if (a_ret != E_OK || !a_fbs_res.ptr) /* ç¢ºä¿å¤±æ */
+		goto lb_finally;
+
+	/* å¿ç­é»æè¨­å® */
+	if(p_req_esv->edata.deoj.eojx3 != 0)
+		_ecn_tsk_mk_rsp_hdr_res(&a_ecn_hdp, p_req_esv);
+	else
+		_ecn_tsk_mk_rsp_hdr(fp_obj, &a_ecn_hdp, p_req_esv);
+	a_size -= sizeof(T_ECN_HDR) + sizeof(T_ECN_EDATA_BODY);
+
+	f_put_fbs_eoj("_ecn_tsk_eoj_set_get", "fa_fbs_id", fa_fbs_id); /* s/deoj ãããã°åºå */
+
+	/* å¿ç­é»æç¨ã¡ã¢ãªã«ãã¼ã¿è¿½å  */
+	a_ret = _ecn_fbs_add_data_ex(mrb, a_fbs_res, &a_ecn_hdp,
+				sizeof(a_ecn_hdp.ecn_hdr) + sizeof(a_ecn_hdp.edata));
+	if (a_ret)
+		goto lb_except;
+
+	/* payloadå
+é ­ã®T_ECN_HDR(ecn_hdr), T_ECN_EDATA_BODY(edata)ãèª­ã¿é£ã°ã */
+	a_ret = _ecn_fbs_set_rpos(fa_fbs_id, offsetof(T_ECN_EDT_HDR, ecn_prp));
+	if (a_ret)
+		goto lb_except;
+
+	/* å¿ç­é»æç¨fbsè¨­å® */
+	_ecn_tsk_set_rsp_fbs(a_fbs_res, fa_fbs_id.ptr);
+
+	/* ãã­ããã£å¤æ¸ãè¾¼ã¿å®è¡ */
+	a_ret = _ecn_tsk_eoj_set_main(svc, fp_obj, fa_eobjatr, fa_fromapp, false, fa_fbs_id, a_fbs_res,
+		fa_fbs_anno, a_count, &a_sw_ok);
+	if (a_ret) {
+		ECN_DBG_PUT_2("_ecn_tsk_eoj_set_get() eoj:%06X _ecn_tsk_eoj_set_main() fault. result = %d",
+			fp_obj->eojx1 << 16 | fp_obj->eojx2 << 8 | fp_obj->eojx3,
+			a_ret);
+		goto lb_except;
+	}
+	ECN_DBG_PUT_2("_ecn_tsk_eoj_set_get() eoj:%06X _ecn_tsk_eoj_set_main() ok sw_ok:%s",
+		fp_obj->eojx1 << 16 | fp_obj->eojx2 << 8 | fp_obj->eojx3,
+		(a_sw_ok ? "true" : "false"));
+
+	/* æ¬¡ã®ä»¶æ°ãèª­ã¿åã(1byte)						*/
+	/* â ECHONET-Lite_Ver.1.10_02.pdf p.40 [OPCGet]	*/
+	a_rdlen = i = 0;
+	a_ret = _ecn_fbs_get_data(mrb, fa_fbs_id, &i, 1, &a_rdlen);
+	if (a_ret < 0 || a_rdlen < 1)
+		goto lb_except;	/* NG */
+	a_count = *(uint8_t *)&i;
+
+	/* ãã­ããã£èª­ã¿è¾¼ã¿ä»¶æ°æ¸ãè¾¼ã¿æã®ãããæ
+å ±ãè¨é² */
+	a_rdprp_wrpos = _ecn_fbs_get_datalen(a_fbs_res);
+
+	/* å¿ç­é»æç¨ã¡ã¢ãªã«ãã¼ã¿è¿½å  (OPCGet 1byte) */
+	a_ret = _ecn_fbs_add_data_ex(mrb, a_fbs_res, &i, 1);
+	if (a_ret)
+		goto lb_except;
+
+	/* ãã®æç¹ã§ã®å¿ç­é»æä¸­ãã­ããã£ä»¶æ°ãè¨é² */
+	i = ((T_EDATA *)a_fbs_res.ptr)->hdr.edata.opc;
+	((T_EDATA *)a_fbs_res.ptr)->hdr.edata.opc = 0;
+
+	/* ãã­ããã£å¤èª­ã¿è¾¼ã¿å®è¡ */
+	a_ret = _ecn_tsk_eoj_get_main(svc, fp_obj, fa_eobjatr, false, EPC_RULE_GET, fa_fbs_id, a_fbs_res,
+		a_count, &a_sw_ok);
+	if (a_ret) {
+		ECN_DBG_PUT_2("_ecn_tsk_eoj_set_get() eoj:%06X _ecn_tsk_eoj_get_main() fault. result = %d",
+			fp_obj->eojx1 << 16 | fp_obj->eojx2 << 8 | fp_obj->eojx3,
+			a_ret);
+		goto lb_except;
+	}
+	ECN_DBG_PUT_2("_ecn_tsk_eoj_set_get() eoj:%06X _ecn_tsk_eoj_get_main() ok sw_ok:%s",
+		fp_obj->eojx1 << 16 | fp_obj->eojx2 << 8 | fp_obj->eojx3,
+		(a_sw_ok ? "true" : "false"));
+
+	/* ãã­ããã£èª­ã¿è¾¼ã¿ä»¶æ°æ¸ãè¾¼ã¿æã®ãããæ
+å ±ã§ãèª­ã¿åºãä»¶æ°ãè¨é² */
+	_ecn_fbs_poke(mrb, a_fbs_res, a_rdprp_wrpos, ((T_EDATA *)a_fbs_res.ptr)->hdr.edata.opc);
+
+	/* è¨é²ãã¦ããããã­ããã£ä»¶æ°ï¼æ¸ãè¾¼ã¿ä»¶æ°ï¼ãæ¸ãæ»ã */
+	((T_EDATA *)a_fbs_res.ptr)->hdr.edata.opc = (uint8_t)i;
+
+	/* å¿ç­è¦ã®å ´å */
+	if (a_sw_ok) {
+		/* è¨­å®å¦çæå */
+		((T_EDATA *)a_fbs_res.ptr)->hdr.edata.esv = fa_res_esv;
+	} else {
+		/* è¨­å®å¦çå¤±æ */
+		((T_EDATA *)a_fbs_res.ptr)->hdr.edata.esv = fa_sna_esv;
+	}
+	/* å¿ç­éä¿¡ */
+	a_ret = _ecn_tsk_snd_mbx(svc, a_fbs_res, false);
+	if (a_ret == E_OK)
+		goto lb_finally;
+
+lb_except:
+	/* ãã¼ã¿éä¿¡å¤±æãããé åè§£æ¾ */
+	if (a_fbs_res.ptr)
+		_ecn_fbs_del(mrb, a_fbs_res);
+
+lb_finally:
+	return;
+}
+
+static void _ecn_tsk_eoj_set_get_res(ecnl_svc_task_t *svc, const EOBJINIB *fp_obj, ATR fa_eobjatr,
+	bool_t fa_fromapp, ECN_FBS_ID fa_fbs_id, ECN_FBS_ID *fa_fbs_anno)
+{
+	mrb_state *mrb = svc->mrb;
+	T_ECN_EDT_HDR	const *p_req_esv = &((T_EDATA *)fa_fbs_id.ptr)->hdr;
+	T_ECN_EDT_HDR	a_ecn_hdp;
+	ECN_FBS_ID		a_fbs_dmy = { 0 };
+	ER		a_ret;
+	int		i, a_size, a_rdlen;
+	int		a_sw_ok = 1;
+	int		a_count = ((T_EDATA *)fa_fbs_id.ptr)->hdr.edata.opc;	/* å¦çãã­ããã£æ° */
+
+	memset(&a_ecn_hdp, 0, sizeof(a_ecn_hdp));
+
+	ECN_DBG_PUT_1("_ecn_tsk_eoj_set_get_res() eoj:%06X",
+		fp_obj->eojx1 << 16 | fp_obj->eojx2 << 8 | fp_obj->eojx3);
+
+	/* åæåå¾ãµã¤ãº */
+	a_size = sizeof(T_ECN_HDR) + sizeof(T_ECN_EDATA_BODY) + sizeof(T_ECN_PRP);
+
+	/* å¿ç­é»æç¨ã¡ã¢ãªï¼ããã¼ï¼ã®åå¾ */
+	a_ret = _ecn_fbs_cre(mrb, a_size, &a_fbs_dmy);
+	if (a_ret != E_OK || !a_fbs_dmy.ptr) /* ç¢ºä¿å¤±æ */
+		goto lb_finally;
+
+	/* å¿ç­é»æè¨­å®						*/
+	_ecn_tsk_mk_rsp_hdr_res(&a_ecn_hdp, p_req_esv);
+	a_size -= sizeof(T_ECN_HDR) + sizeof(T_ECN_EDATA_BODY);
+
+	/* payloadå
+é ­ã®T_ECN_HDR(ecn_hdr), T_ECN_EDATA_BODY(edata)ãèª­ã¿é£ã°ã */
+	a_ret = _ecn_fbs_set_rpos(fa_fbs_id, offsetof(T_ECN_EDT_HDR, ecn_prp));
+	if (a_ret)
+		goto lb_except;
+
+	/* ãã­ããã£å¤æ¸ãè¾¼ã¿å¿ç­èª­ã¿é£ã°ãå®è¡ */
+	a_ret = _ecn_tsk_eoj_skip_main(svc, fp_obj, fa_fbs_id, a_count);
+	if (a_ret) {
+		ECN_DBG_PUT_2("_ecn_tsk_eoj_set_get_res() eoj:%06X _ecn_tsk_eoj_set_main() fault. result = %d",
+			fp_obj->eojx1 << 16 | fp_obj->eojx2 << 8 | fp_obj->eojx3,
+			a_ret);
+		goto lb_except;
+	}
+	ECN_DBG_PUT_2("_ecn_tsk_eoj_set_get_res() eoj:%06X _ecn_tsk_eoj_set_main() ok sw_ok:%s",
+		fp_obj->eojx1 << 16 | fp_obj->eojx2 << 8 | fp_obj->eojx3,
+		(a_sw_ok ? "true" : "false"));
+
+	/* æ¬¡ã®ä»¶æ°ãèª­ã¿åã(1byte)						*/
+	/* â ECHONET-Lite_Ver.1.10_02.pdf p.40 [OPCGet]	*/
+	a_rdlen = i = 0;
+	a_ret = _ecn_fbs_get_data(mrb, fa_fbs_id, &i, 1, &a_rdlen);
+	if (a_ret < 0 || a_rdlen < 1)
+		goto lb_except;	/* NG */
+	a_count = *(uint8_t *)&i;
+
+	/* ãã­ããã£å¤èª­ã¿åºãå¿ç­ã®æ¸ãè¾¼ã¿å®è¡ */
+	a_ret = _ecn_tsk_eoj_set_main(svc, fp_obj, fa_eobjatr, fa_fromapp, true, fa_fbs_id, a_fbs_dmy,
+								  fa_fbs_anno, a_count, &a_sw_ok);
+	if (a_ret) {
+		ECN_DBG_PUT_2("_ecn_tsk_eoj_set_get_res() eoj:%06X _ecn_tsk_eoj_get_main() fault. result = %d",
+			fp_obj->eojx1 << 16 | fp_obj->eojx2 << 8 | fp_obj->eojx3,
+			a_ret);
+		goto lb_except;
+	}
+	ECN_DBG_PUT_2("_ecn_tsk_eoj_set_get_res() eoj:%06X _ecn_tsk_eoj_get_main() ok sw_ok:%s",
+		fp_obj->eojx1 << 16 | fp_obj->eojx2 << 8 | fp_obj->eojx3,
+		(a_sw_ok ? "true" : "false"));
+
+	goto lb_finally;
+
+lb_except:
+	/* ãã¼ã¿éä¿¡å¤±æãããé åè§£æ¾ */
+	if (a_fbs_dmy.ptr)
+		_ecn_fbs_del(mrb, a_fbs_dmy);
+
+lb_finally:
+	return;
+}
+
+/*
+ * å¿ç­é»æå¾
+ã¡ã®å²ãè¾¼ã¿é»æä½æ
+ */
+ER _ecn_mk_brk_wai(ecnl_svc_task_t *svc, ECN_FBS_ID *pk_fbs_id, const void *p_dat, size_t fa_size)
+{
+	mrb_state *mrb = svc->mrb;
+	ER				a_ret;
+	ECN_FBS_ID		a_fbs_id = { 0 };	/* è¦æ±é»æç¨ã¡ã¢ãª	*/
+
+	if (!pk_fbs_id)
+		return E_PAR;
+	*pk_fbs_id = a_fbs_id;
+	if (sizeof(a_fbs_id.ptr->payload) <= fa_size)
+		return E_PAR; /* ä»éãã¼ã¿ãå¤§ãããã */
+	if (!p_dat && 0 < fa_size)
+		return E_PAR; /* ä»éãã¼ã¿ãµã¤ãºã1ä»¥ä¸ãªã®ã«ãã¼ã¿ãã¤ã³ã¿ãNULL */
+
+	/* è¦æ±é»æç¨ã¡ã¢ãªã®åå¾ */
+	a_ret = _ecn_fbs_cre(mrb, (0 < fa_size ? fa_size : 1), &a_fbs_id);
+	if (a_ret != E_OK || !a_fbs_id.ptr) { /* ç¢ºä¿å¤±æ */
+		ECN_DBG_PUT_3("_ecn_fbs_cre(%d) result = %d:%s", fa_size, a_ret, itron_strerror(a_ret));
+		return a_ret;
+	}
+
+	/* è¦æ±é»æè¨­å® */
+	a_fbs_id.ptr->hdr.type = ECN_MSG_USER_BREAK;
+	a_fbs_id.ptr->hdr.sender.id = ENOD_API_ID;
+	a_fbs_id.ptr->hdr.target.id = ENOD_API_ID;
+	a_fbs_id.ptr->hdr.reply.id = ENOD_API_ID;
+
+	if (0 < fa_size && p_dat) {
+		/* ä»éãã¼ã¿è¿½å  */
+		a_ret = _ecn_fbs_add_data_ex(mrb, a_fbs_id, p_dat, fa_size);
+		if (a_ret) {
+			ECN_DBG_PUT_3("_ecn_fbs_add_data_ex(*, dat, %lu) result = %d:%s",
+				fa_size,
+				a_ret, itron_strerror(a_ret));
+			goto lb_except;
+		}
+	}
+
+	*pk_fbs_id = a_fbs_id;
+
+	/* æ­£å¸¸çµäº */
+	return a_ret;
+
+lb_except:
+	/* ãã¼ã¿ä½æå¤±æãããé åè§£æ¾ */
+	if (a_fbs_id.ptr)
+		_ecn_fbs_del(mrb, a_fbs_id);
+
+	return a_ret;
+}
+
+/* å¿ç­é»æç¨fbsè¨­å®(sender/targetã®è¨­å®) */
+ER _ecn_tsk_cre_req_fbs(ecnl_svc_task_t *svc, T_ECN_FBS_QUEUE *sender, uint8_t cmd, ECN_FBS_ID *pk_req)
+{
+	mrb_state *mrb = svc->mrb;
+	ER ret;
+	ECN_FBS_ID req;
+
+	ret = _ecn_fbs_cre(mrb, 1, &req);
+	if (ret != E_OK) {
+		ECN_DBG_PUT_2("_ecn_tsk_cre_req_fbs() : _ecn_fbs_cre() result = %d:%s", ret, itron_strerror(ret));
+		return ret;
+	}
+
+	ret = _ecn_fbs_add_data(mrb, req, &cmd, sizeof(cmd));
+	if (ret != E_OK) {
+		_ecn_fbs_del(mrb, req);
+		ECN_DBG_PUT_2("_ecn_tsk_cre_req_fbs() : _ecn_fbs_add_data() result = %d:%s", ret, itron_strerror(ret));
+		return ret;
+	}
+
+	req.ptr->hdr.type = ECN_MSG_INTERNAL;
+	req.ptr->hdr.sender.mbxid = sender;
+	req.ptr->hdr.target.mbxid = &svc->svc_mbxid;
+	req.ptr->hdr.reply.mbxid = sender;
+
+	*pk_req = req;
+
+	return E_OK;
+}
+
+/* å¿ç­é»æç¨fbsè¨­å®(sender/targetã®è¨­å®) */
+ER _ecn_tsk_cre_res_fbs(ecnl_svc_task_t *svc, ECN_FBS_ID req, uint8_t cmd, ECN_FBS_ID *pk_res)
+{
+	mrb_state *mrb = svc->mrb;
+	ER ret;
+	ECN_FBS_ID res;
+
+	ret = _ecn_fbs_cre(mrb, 1, &res);
+	if (ret != E_OK) {
+		ECN_DBG_PUT_2("_ecn_tsk_cre_res_fbs() : _ecn_fbs_cre() result = %d:%s", ret, itron_strerror(ret));
+		return ret;
+	}
+
+	ret = _ecn_fbs_add_data(mrb, res, &cmd, sizeof(cmd));
+	if (ret != E_OK) {
+		_ecn_fbs_del(mrb, res);
+		ECN_DBG_PUT_2("_ecn_tsk_cre_res_fbs() : _ecn_fbs_add_data() result = %d:%s", ret, itron_strerror(ret));
+		return ret;
+	}
+
+	res.ptr->hdr.type = ECN_MSG_INTERNAL;
+	res.ptr->hdr.sender.mbxid = &svc->svc_mbxid;
+	res.ptr->hdr.target.mbxid = req.ptr->hdr.reply.mbxid;
+	res.ptr->hdr.reply.mbxid = &svc->svc_mbxid;
+
+	*pk_res = res;
+
+	return E_OK;
+}
Index: EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_task.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_task.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/echonet_task.h	(revision 270)
@@ -0,0 +1,203 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2014-2016 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *		ECHONET Lite ã¿ã¹ã¯
+ */
+
+#ifndef TOPPERS_ECHONET_TASK_H
+#define TOPPERS_ECHONET_TASK_H
+
+/*#include ".h"*/
+
+#include "echonet.h"
+#include "echonet_fbs.h"
+#include "echonet_agent.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ *  ECHONET Lite ã¿ã¹ã¯é¢é£ã®å®æ°ã®ããã©ã«ãå¤ã®å®ç¾©
+ */ 
+#ifndef ECHONET_TASK_PRIORITY
+#define ECHONET_TASK_PRIORITY	6		/* åæåªå
+åº¦ */
+#endif /* ECHONET_TASK_PRIORITY */
+
+#ifndef ECHONET_TASK_STACK_SIZE
+#define ECHONET_TASK_STACK_SIZE	1024	/* ã¹ã¿ãã¯é åã®ãµã¤ãº */
+#endif /* ECHONET_TASK_STACK_SIZE */
+
+#ifndef NUM_ECHONET_MAILBOX
+#define NUM_ECHONET_MAILBOX	10
+#endif /* NUM_ECHONET_MAILBOX */
+
+#ifndef NUM_ECHONET_API_MAILBOX
+#define NUM_ECHONET_API_MAILBOX	10
+#endif /* NUM_ECHONET_API_MAILBOX */
+
+struct ecnl_svc_task {
+	mrb_state *mrb;
+	mrb_value self;
+	intptr_t exinf;
+	TMO api_timer;
+	/* ã¢ããªã±ã¼ã·ã§ã³ãè¦æ±ããé»æã®ã·ã¼ã±ã³ã¹çªå· */
+	uint16_t api_tid;
+	/* åä¿¡ã¡ãã»ã¼ã¸ãéæ¾ãããå¦ã */
+	bool_t release_esv;
+	/* åä¿¡ã¡ãã»ã¼ã¸ãè»¢éãããå¦ã */
+	bool_t forward_esv;
+	/* ã³ã³ãã­ã¼ã©ã¼åã */
+	ecn_agent_t agent;
+	/* ECHONET Lite ãªãã¸ã§ã¯ãIDã®æå¤§å¤ */
+	ID tmax_eobjid;
+	/* ECHONET Lite ãªãã¸ã§ã¯ãåæåãã­ãã¯ã®ã¨ãªã¢ */
+	const EOBJINIB **eobjinib_table;
+	/* ECHONET Liteãã¼ãç®¡çãã­ãã¯ã®æ° */
+	int tnum_enodid;
+	/* ECHONET Lite ãªãã¸ã§ã¯ãç®¡çãã­ãã¯ã®ã¨ãªã¢ */
+	EOBJCB eobjcb_table[1];
+	/* ã¯ã©ã¹æ° */
+	uint_t eclscnt;
+	/* ã¯ã©ã¹ãªã¹ã */
+	uint8_t *eclslst;
+	/* ã¡ã¼ã«ããã¯ã¹ */
+	T_ECN_FBS_QUEUE api_mbxid;
+	T_ECN_FBS_QUEUE svc_mbxid;
+	T_ECN_FBS_QUEUE lcl_mbxid;
+	/* ã¢ã¸ã¥ã¼ã«åæåãã©ã° */
+	uint8_t eobjlist_need_init;
+	/* ã·ã¼ã±ã³ã¹çªå· */
+	uint16_t current_tid;
+	/* ã¤ã³ã¹ã¿ã³ã¹ãªã¹ãéç¥ä½ç½® */
+	int inst_list_pos;
+};
+
+TMO echonet_svctask_get_timer(ecnl_svc_task_t *svc);
+void echonet_svctask_progress(ecnl_svc_task_t *svc, TMO a_timer);
+void echonet_svctask_recv_msg(ecnl_svc_task_t *svc, T_ECN_FST_BLK *p_msg);
+void echonet_svctask_timeout(ecnl_svc_task_t *svc);
+
+const EOBJINIB *echonet_svctask_get_eobjinib(ecnl_svc_task_t *svc, ID eobjid);
+ID echonet_svctask_get_eobjid(ecnl_svc_task_t *svc, const EOBJINIB *eobjinib);
+
+/* ECHONET Lite ã¤ã³ã¹ã¿ã³ã¹ãªã¹ãã®1ã¢ãã¦ã³ã¹å½ããæå¤§ãã¼ãæ° */
+#define ECN_IST_LST_EOJ_MAX_CT (84)
+
+/* ECHONET Liteãªãã¸ã§ã¯ãã³ã¼ã x1,x2,x3(T_ECN_EOJ)ã24bitæ´æ°ã«å¤æ */
+#define _ECN_EOJ2VALUE(s) (((s).eojx1 << 16) | ((s).eojx2 << 8) | (s).eojx3)
+
+enum ecn_epc_code
+{
+	ECN_EPC_INL_BCS		=	0xD5	/* ã¤ã³ã¹ã¿ã³ã¹ãªã¹ãéç¥ãã­ããã£ */
+};
+
+typedef enum
+{
+	ECN_MSG_UNDEF		=	0,
+	ECN_MSG_INTERNAL	=	1,
+	ECN_MSG_ECHONET		=	2,
+	ECN_MSG_USER_BREAK	=	3
+} ECN_MSG_TYPE;
+
+typedef enum
+{
+	ECN_INM_NOTIFY_INSTANCELIST = 1,
+	ECN_INM_GET_DEVICE_LIST_REQ,
+	ECN_INM_GET_DEVICE_LIST_RES,
+	ECN_INM_GET_DEVICE_INFO_REQ,
+	ECN_INM_GET_DEVICE_INFO_RES,
+	ECN_LCL_MSG_GET_LCLADDR_REQ,
+	ECN_LCL_MSG_GET_LCLADDR_RES,
+	ECN_LCL_MSG_GET_LCLADDR_ERROR
+} ECN_INT_MSG_COMMAND;
+
+typedef struct
+{
+	uint8_t	command;
+	uint8_t	data[1];
+} T_ECN_INTERNAL_MSG;
+
+/* ã¿ã¹ã¯åæå */
+void _ecn_tsk_int_startup(ecnl_svc_task_t *svc);
+/* ã¤ã³ã¹ã¿ã³ã¹ãªã¹ãéç¥ã®éä¿¡ */
+ER _ecn_tsk_ntf_inl(ecnl_svc_task_t *svc);
+
+/*
+ * è¦æ±é»æä½æ
+ */
+ER _ecn_tsk_mk_esv(ecnl_svc_task_t *svc, ECN_FBS_ID *fp_fbs_id, ID fa_seoj, ID fa_deoj,
+	uint8_t fa_epc, uint8_t fa_pdc, const void *p_edt, ECN_SRV_CODE fa_esv);
+
+ER _ecn_tsk_snd_mbx(ecnl_svc_task_t *svc, ECN_FBS_ID fa_rsp_fbs, bool_t from_app);
+
+/*
+ * å¿ç­é»æå¾
+ã¡ã®å²ãè¾¼ã¿é»æä½æ
+ */
+ER _ecn_mk_brk_wai(ecnl_svc_task_t *svc, ECN_FBS_ID *pk_fbs_id, const void *p_dat, size_t fa_size);
+
+const EOBJCB *_ecn_eno_fnd(ecnl_svc_task_t *svc, ECN_ENOD_ID enodid);
+
+const EOBJINIB *_ecn_eoj_fnd(const EOBJCB *fp_nod, const T_ECN_EOJ *fp_eoj);
+
+ER _ecn_tsk_cre_req_fbs(ecnl_svc_task_t *svc, T_ECN_FBS_QUEUE *sender, uint8_t cmd, ECN_FBS_ID *pk_req);
+
+ER _ecn_tsk_cre_res_fbs(ecnl_svc_task_t *svc, ECN_FBS_ID req, uint8_t cmd, ECN_FBS_ID *pk_res);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TOPPERS_ECHONET_TASK_H */
Index: EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/mrb_ecnl.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/mrb_ecnl.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/mrb_ecnl.c	(revision 270)
@@ -0,0 +1,2056 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2016 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ */
+
+#include <stddef.h>
+#include <stdint.h>
+#include <string.h>
+#include <mruby.h>
+#include <mruby/array.h>
+#include <mruby/data.h>
+#include <mruby/class.h>
+#include <mruby/string.h>
+#include <mruby/hash.h>
+#include <mruby/variable.h>
+#include "echonet.h"
+#include "echonet_fbs.h"
+#include "echonet_agent.h"
+#include "echonet_task.h"
+#include "echonet_lcl_task.h"
+#include "mrb_ecnl.h"
+
+struct RClass *_module_ecnl;
+struct RClass *_class_object;
+struct RClass *_class_node;
+struct RClass *_class_property;
+struct RClass *_class_data;
+struct RClass *_class_iterator;
+struct RClass *_class_svctask;
+
+static void mrb_ecnl_eobject_free(mrb_state *mrb, void *ptr);
+static void mrb_ecnl_enode_free(mrb_state *mrb, void *ptr);
+static void mrb_ecnl_eproperty_free(mrb_state *mrb, void *ptr);
+static void mrb_ecnl_edata_free(mrb_state *mrb, void *ptr);
+static void mrb_ecnl_eiterator_free(mrb_state *mrb, void *ptr);
+static void mrb_ecnl_svctask_free(mrb_state *mrb, void *ptr);
+
+const static struct mrb_data_type mrb_ecnl_eobject_type = { "EObject", mrb_ecnl_eobject_free };
+const static struct mrb_data_type mrb_ecnl_enode_type = { "ENode", mrb_ecnl_enode_free };
+const static struct mrb_data_type mrb_ecnl_eproperty_type = { "EProperty", mrb_ecnl_eproperty_free };
+const static struct mrb_data_type mrb_ecnl_edata_type = { "EData", mrb_ecnl_edata_free };
+const static struct mrb_data_type mrb_ecnl_eiterator_type = { "EIterator", mrb_ecnl_eiterator_free };
+const static struct mrb_data_type mrb_ecnl_svctask_type = { "SvcTask", mrb_ecnl_svctask_free };
+
+static int anno_prpmap_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size);
+static int set_prpmap_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size);
+static int get_prpmap_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size);
+static int inst_count_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size);
+static int class_count_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size);
+static int inst_list_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size);
+static int inst_lists_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size);
+static int class_lists_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size);
+
+const static EPRPINIB auto_eproperties[] = {
+	{0x9D, EPC_RULE_GET, 255, 0, NULL, anno_prpmap_prop_get},
+	{0x9E, EPC_RULE_GET, 255, 0, NULL, set_prpmap_prop_get},
+	{0x9F, EPC_RULE_GET, 255, 0, NULL, get_prpmap_prop_get},
+	{0xD3, EPC_RULE_GET, 255, 0, NULL, inst_count_prop_get},
+	{0xD4, EPC_RULE_GET, 255, 0, NULL, class_count_prop_get},
+	{0xD5, EPC_RULE_ANNO, 255, 0, NULL, inst_list_prop_get},
+	{0xD6, EPC_RULE_GET, 255, 0, NULL, inst_lists_prop_get},
+	{0xD7, EPC_RULE_GET, 255, 0, NULL, class_lists_prop_get},
+};
+
+static T_MRB_ECNL_EPROPERTY *cast_prop(const EPRPINIB *inib)
+{
+	return (T_MRB_ECNL_EPROPERTY *)((intptr_t)inib - offsetof(T_MRB_ECNL_EPROPERTY, inib));
+}
+
+static mrb_value mrb_ecnl_eobject_initialize(mrb_state *mrb, mrb_value self)
+{
+	ecn_device_t *obj;
+	mrb_value node;
+	mrb_int eojx1;
+	mrb_int eojx2;
+	mrb_int eojx3;
+	mrb_value props;
+	const mrb_value *rprop;
+	const EPRPINIB **eprp;
+	EPRPINIB *aprops;
+	int i, count, icnt;
+
+	mrb_get_args(mrb, "iiioA", &eojx1, &eojx2, &eojx3, &node, &props);
+
+	if (!mrb_obj_is_kind_of(mrb, node, _class_node)) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "EObject.new");
+		return mrb_nil_value();
+	}
+
+	rprop = RARRAY_PTR(props);
+	icnt = RARRAY_LEN(props);
+	count = icnt + 3; /* ãã­ããã£ãããå */
+
+	for (i = 0; i < icnt; i++) {
+		T_MRB_ECNL_EPROPERTY *prop;
+
+		if (!mrb_obj_is_kind_of(mrb, rprop[i], _class_property)) {
+			mrb_raise(mrb, E_RUNTIME_ERROR, "eprpinib_table");
+			return mrb_nil_value();
+		}
+
+		prop = (T_MRB_ECNL_EPROPERTY *)DATA_PTR(rprop[i]);
+
+		/* ãã­ããã£ãããã®å ´åã¯æ¸ç® */
+		switch (prop->inib.eprpcd) {
+		case 0x9D: case 0x9E: case 0x9F:
+			count--;
+			break;
+		}
+	}
+
+	obj = (ecn_device_t *)mrb_calloc(mrb, 1, sizeof(ecn_device_t) + count * sizeof(EPRPINIB *)
+		+ (sizeof(EPRPINIB) * 3));
+	DATA_TYPE(self) = &mrb_ecnl_eobject_type;
+	DATA_PTR(self) = obj;
+
+	eprp = (const EPRPINIB **)&obj[1];
+	aprops = (EPRPINIB *)&eprp[count];
+
+	obj->base.inib.eobjatr = EOBJ_DEVICE;
+	obj->base.inib.enodid = 0;
+	obj->base.inib.exinf = (intptr_t)NULL;
+	obj->base.inib.eojx1 = eojx1;
+	obj->base.inib.eojx2 = eojx2;
+	obj->base.inib.eojx3 = eojx3;
+	obj->base.inib.eprp = eprp;
+	obj->base.inib.eprpcnt = count;
+	obj->base.eprpcnt = count;
+
+	obj->node = (ecn_node_t *)DATA_PTR(node);
+
+	count = 0;
+	for (i = 0; i < icnt; i++) {
+		T_MRB_ECNL_EPROPERTY *prop;
+		prop = (T_MRB_ECNL_EPROPERTY *)DATA_PTR(rprop[i]);
+
+		/* ãã­ããã£ãããã®å ´åã¯ç¡è¦ */
+		switch (prop->inib.eprpcd) {
+		case 0x9D: case 0x9E: case 0x9F:
+			continue;
+		}
+
+		prop->eobj = self;
+		eprp[count++] = &prop->inib;
+	}
+
+	for (int j = 0; j < 3; j++) {
+		EPRPINIB *prop = &aprops[j];
+
+		memcpy(prop, &auto_eproperties[j], sizeof(*prop));
+
+		prop->exinf = (intptr_t)obj;
+		eprp[count++] = prop;
+	}
+
+	return self;
+}
+
+static void mrb_ecnl_eobject_free(mrb_state *mrb, void *ptr)
+{
+	ecn_device_t *obj = (ecn_device_t *)ptr;
+	T_MRB_ECNL_EPROPERTY *prop;
+
+	/* æ©å¨ãªãã¸ã§ã¯ãã®è¨­å®ã¨ãã¦åãè¾¼ã¾ããå ´åã¯ç ´æ£ããªã */
+	if (obj->base.svc != NULL)
+		return;
+
+	for (int i = 0; i < obj->base.eprpcnt; i++) {
+		const EPRPINIB *eprp = obj->base.inib.eprp[i];
+
+		switch (eprp->eprpcd) {
+		case 0x9D: case 0x9E: case 0x9F:
+			continue;
+		}
+
+		prop = cast_prop(eprp);
+
+		mrb_free(mrb, prop);
+	}
+
+	mrb_free(mrb, obj);
+}
+
+static mrb_value mrb_ecnl_eobject_data_prop_set(mrb_state *mrb, mrb_value self)
+{
+	mrb_value rprp;
+	mrb_value rdat;
+	mrb_value data;
+	T_MRB_ECNL_EPROPERTY *prop;
+
+	mrb_get_args(mrb, "oS", &rprp, &rdat);
+
+	if (!mrb_obj_is_kind_of(mrb, rprp, _class_property)) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "data_prop_set");
+		return mrb_fixnum_value(0);
+	}
+
+	prop = (T_MRB_ECNL_EPROPERTY *)DATA_PTR(rprp);
+	data = mrb_iv_get(mrb, self, prop->exinf);
+
+	prop->anno = !mrb_str_equal(mrb, data, rdat);
+
+	mrb_iv_set(mrb, self, prop->exinf, rdat);
+
+	return mrb_fixnum_value(RSTRING_LEN(rdat));
+}
+
+static mrb_value mrb_ecnl_eobject_data_prop_get(mrb_state *mrb, mrb_value self)
+{
+	mrb_value rprp;
+	mrb_value rsiz;
+	mrb_value rdat;
+	T_MRB_ECNL_EPROPERTY *prop;
+	int size;
+
+	mrb_get_args(mrb, "oi", &rprp, &rsiz);
+
+	if (!mrb_obj_is_kind_of(mrb, rprp, _class_property)) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "data_prop_get");
+		return mrb_fixnum_value(0);
+	}
+
+	prop = (T_MRB_ECNL_EPROPERTY *)DATA_PTR(rprp);
+	size = mrb_fixnum(rsiz);
+
+	rdat = mrb_iv_get(mrb, self, prop->exinf);
+	if (RSTRING_LEN(rdat) != size) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "data_prop_get");
+		return mrb_nil_value();
+	}
+
+	return rdat;
+}
+
+static mrb_value mrb_ecnl_enode_initialize(mrb_state *mrb, mrb_value self)
+{
+	ecn_node_t *nod;
+	mrb_int eojx3;
+	mrb_value props;
+	const mrb_value *rprop;
+	int i, count, icnt;
+	const EPRPINIB **eprp;
+	EPRPINIB *aprops;
+
+	mrb_get_args(mrb, "iA", &eojx3, &props);
+
+	rprop = RARRAY_PTR(props);
+	icnt = RARRAY_LEN(props);
+	count = icnt + 8; /* ã¤ã³ã¹ã¿ã³ã¹ãªã¹ããªã©ã®å */
+
+	for (i = 0; i < icnt; i++) {
+		T_MRB_ECNL_EPROPERTY *prop;
+
+		if (!mrb_obj_is_kind_of(mrb, rprop[i], _class_property)) {
+			mrb_raise(mrb, E_RUNTIME_ERROR, "eprpinib_table");
+			return mrb_nil_value();
+		}
+
+		prop = (T_MRB_ECNL_EPROPERTY *)DATA_PTR(rprop[i]);
+
+		/* ã¤ã³ã¹ã¿ã³ã¹ãªã¹ããªã©ã®å ´åã¯æ¸ç® */
+		switch (prop->inib.eprpcd) {
+		case 0xD3: case 0xD4: case 0xD5: case 0xD6: case 0xD7:
+		case 0x9D: case 0x9E: case 0x9F:
+			count--;
+			break;
+		}
+	}
+
+	nod = (ecn_node_t *)mrb_calloc(mrb, 1, sizeof(ecn_node_t) + count * sizeof(EPRPINIB *)
+		+ (sizeof(EPRPINIB) * 8)/* ã¤ã³ã¹ã¿ã³ã¹ãªã¹ããªã©ã®å */);
+	DATA_TYPE(self) = &mrb_ecnl_enode_type;
+	DATA_PTR(self) = nod;
+
+	eprp = (const EPRPINIB **)&nod[1];
+	aprops = (EPRPINIB *)&eprp[count];
+
+	nod->base.inib.eobjatr = EOBJ_LOCAL_NODE;
+	nod->base.inib.enodid = 0;
+	nod->base.inib.exinf = (intptr_t)NULL;
+	nod->base.inib.eojx1 = EOJ_X1_PROFILE;
+	nod->base.inib.eojx2 = EOJ_X2_NODE_PROFILE;
+	nod->base.inib.eojx3 = eojx3;
+	nod->base.inib.eprp = eprp;
+	nod->base.inib.eprpcnt = count;
+	nod->base.eprpcnt = count;
+
+	count = 0;
+	for (i = 0; i < icnt; i++) {
+		T_MRB_ECNL_EPROPERTY *prop;
+		prop = (T_MRB_ECNL_EPROPERTY *)DATA_PTR(rprop[i]);
+
+		/* ã¤ã³ã¹ã¿ã³ã¹ãªã¹ããªã©ã®å ´åã¯ç¡è¦ */
+		switch (prop->inib.eprpcd) {
+		case 0xD3: case 0xD4: case 0xD5: case 0xD6: case 0xD7:
+		case 0x9D: case 0x9E: case 0x9F:
+			continue;
+		}
+
+		prop->eobj = self;
+		eprp[count++] = &prop->inib;
+	}
+
+	for (int j = 0; j < 8; j++) {
+		EPRPINIB *prop = &aprops[j];
+
+		memcpy(prop, &auto_eproperties[j], sizeof(*prop));
+
+		prop->exinf = (intptr_t)nod;
+		eprp[count++] = prop;
+	}
+
+	return self;
+}
+
+static void mrb_ecnl_enode_free(mrb_state *mrb, void *ptr)
+{
+	ecn_node_t *nod = (ecn_node_t *)ptr;
+	T_MRB_ECNL_EPROPERTY *prop;
+
+	/* ãã¼ãã®è¨­å®ã¨ãã¦åãè¾¼ã¾ããå ´åã¯ç ´æ£ããªã */
+	if (nod->base.svc != NULL)
+		return;
+
+	for (int i = 0; i < nod->base.eprpcnt; i++) {
+		const EPRPINIB *eprp = nod->base.inib.eprp[i];
+
+		switch (eprp->eprpcd) {
+		case 0xD3: case 0xD4: case 0xD5: case 0xD6: case 0xD7:
+		case 0x9D: case 0x9E: case 0x9F:
+			continue;
+		}
+
+		prop = cast_prop(eprp);
+
+		mrb_free(mrb, prop);
+	}
+
+	mrb_free(mrb, nod);
+}
+
+static int anno_prpmap_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size)
+{
+	ecn_obj_t *obj = (ecn_obj_t *)item->exinf;
+	uint8_t *dmap = &((uint8_t *)dst)[1];
+	uint8_t count;
+
+	count = obj->annocnt;
+	*(uint8_t *)dst = count;
+	if (count < 16) {
+		memcpy(dmap, obj->pmapAnno, count);
+		return count + 1;
+	}
+	else {
+		memcpy(dmap, obj->pmapAnno, 16);
+		return 17;
+	}
+}
+
+static int set_prpmap_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size)
+{
+	ecn_obj_t *obj = (ecn_obj_t *)item->exinf;
+	uint8_t *dmap = &((uint8_t *)dst)[1];
+	uint8_t count;
+
+	count = obj->setcnt;
+	*(uint8_t *)dst = count;
+	if (count < 16) {
+		memcpy(dmap, obj->pmapSet, count);
+		return count + 1;
+	}
+	else {
+		memcpy(dmap, obj->pmapSet, 16);
+		return 17;
+	}
+}
+
+static int get_prpmap_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size)
+{
+	ecn_obj_t *obj = (ecn_obj_t *)item->exinf;
+	uint8_t *dmap = &((uint8_t *)dst)[1];
+	uint8_t count;
+
+	count = obj->getcnt;
+	*(uint8_t *)dst = count;
+	if (count < 16) {
+		memcpy(dmap, obj->pmapGet, count);
+		return count + 1;
+	}
+	else {
+		memcpy(dmap, obj->pmapGet, 16);
+		return 17;
+	}
+}
+
+static int inst_count_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size)
+{
+	ecn_node_t *nod = (ecn_node_t *)item->exinf;
+	uint8_t *pos = dst;
+	EOBJCB *obj = &svc->eobjcb_table[nod->base.eobjId - 1];
+	int count = obj->eobjcnt;
+
+	pos[0] = count >> 16;
+	pos[1] = count >> 8;
+	pos[2] = count;
+
+	return 3;
+}
+
+static int class_count_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size)
+{
+	ecn_node_t *nod = (ecn_node_t *)item->exinf;
+	uint8_t *pos = dst;
+	int count = svc->eclscnt;
+
+	pos[0] = count >> 8;
+	pos[1] = count;
+
+	return 2;
+}
+
+static int inst_list_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size)
+{
+	ecn_node_t *nod = (ecn_node_t *)item->exinf;
+	uint8_t *pos = dst;
+	EOBJCB *obj = &svc->eobjcb_table[nod->base.eobjId - 1];
+	const EOBJINIB **eobjs = obj->eobjs;
+	int eobjcnt = obj->eobjcnt;
+	int inst_list_pos = svc->inst_list_pos;
+	int count = 0;
+
+	/* éç¥æ°ã®ä½ç½®ãç©ºãã¦ãã */
+	pos++;
+	for (int i = inst_list_pos; (i < eobjcnt) && (count < 84); i++) {
+		const EOBJINIB *eobj = eobjs[i];
+
+		*pos++ = eobj->eojx1;
+		*pos++ = eobj->eojx2;
+		*pos++ = eobj->eojx3;
+		count++;
+	}
+	*(uint8_t *)dst = count;
+
+	inst_list_pos += count;
+	/* æå¾ã¾ã§éä¿¡ãçµãã£ã¦ãããåããã */
+	if (inst_list_pos >= eobjcnt)
+		inst_list_pos = 0;
+
+	svc->inst_list_pos = inst_list_pos;
+
+	return (int)pos - (int)dst;
+}
+
+static int inst_lists_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size)
+{
+	ecn_node_t *nod = (ecn_node_t *)item->exinf;
+	uint8_t *pos = dst;
+	EOBJCB *obj = &svc->eobjcb_table[nod->base.eobjId - 1];
+	const EOBJINIB **eobjs = obj->eobjs;
+	int eobjcnt = obj->eobjcnt;
+
+	if (eobjcnt < 255)
+		*pos++ = eobjcnt;
+	else
+		*pos++ = 255; /*ãªã¼ãã¼ãã­ã¼*/
+
+	for (int i = 0; (i < eobjcnt) && (i < 84); i++) {
+		const EOBJINIB *eobj = eobjs[i];
+
+		*pos++ = eobj->eojx1;
+		*pos++ = eobj->eojx2;
+		*pos++ = eobj->eojx3;
+	}
+
+	return (int)pos - (int)dst;
+}
+
+static int class_lists_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size)
+{
+	uint8_t *pos = dst;
+	int eclscnt = svc->eclscnt, len;
+
+	if (eclscnt < 255)
+		*pos++ = eclscnt;
+	else
+		*pos++ = 255; /*ãªã¼ãã¼ãã­ã¼*/
+
+	len = 2 * eclscnt;
+	memcpy(pos, svc->eclslst, len);
+	pos += len;
+
+	return (int)pos - (int)dst;
+}
+
+static int mrb_ecnl_prop_set(ecnl_svc_task_t *svc, const EPRPINIB *item, const void *src, int size, bool_t *anno);
+static int mrb_ecnl_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size);
+
+static mrb_value mrb_ecnl_eproperty_initialize(mrb_state *mrb, mrb_value self)
+{
+	T_MRB_ECNL_EPROPERTY *prop;
+	mrb_value exinf;
+	mrb_value eprpset;
+	mrb_value eprpget;
+	mrb_int eprpcd;
+	mrb_int eprpatr;
+	mrb_int eprpsz;
+	mrb_sym ei, set, get;
+
+	mrb_get_args(mrb, "iiiooo", &eprpcd, &eprpatr, &eprpsz, &exinf, &eprpset, &eprpget);
+
+	if (mrb_type(exinf) == MRB_TT_SYMBOL) {
+		ei = mrb_symbol(exinf);
+	}
+	else if (mrb_type(exinf) == MRB_TT_FALSE) {
+		ei = 0;
+	}
+	else {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "EProperty.new");
+		return mrb_nil_value();
+	}
+
+	if (mrb_type(eprpset) == MRB_TT_SYMBOL) {
+		set = mrb_symbol(eprpset);
+	}
+	else if (mrb_type(eprpset) == MRB_TT_FALSE) {
+		set = 0;
+	}
+	else {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "EProperty.new");
+		return mrb_nil_value();
+	}
+
+	if (mrb_type(eprpget) == MRB_TT_SYMBOL) {
+		get = mrb_symbol(eprpget);
+	}
+	else if (mrb_type(eprpget) == MRB_TT_FALSE) {
+		get = 0;
+	}
+	else {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "EProperty.new");
+		return mrb_nil_value();
+	}
+
+	prop = (T_MRB_ECNL_EPROPERTY *)mrb_malloc(mrb, sizeof(T_MRB_ECNL_EPROPERTY));
+	DATA_TYPE(self) = &mrb_ecnl_eproperty_type;
+	DATA_PTR(self) = prop;
+
+	prop->inib.eprpcd = eprpcd;
+	prop->inib.eprpatr = eprpatr;
+	prop->inib.eprpsz = eprpsz;
+	prop->inib.exinf = 0;
+	prop->inib.eprpset = mrb_ecnl_prop_set;
+	prop->inib.eprpget = mrb_ecnl_prop_get;
+	prop->exinf = ei;
+	prop->eprpset = set;
+	prop->eprpget = get;
+	prop->anno = false;
+
+	return self;
+}
+
+static void mrb_ecnl_eproperty_free(mrb_state *mrb, void *ptr)
+{
+	T_MRB_ECNL_EPROPERTY *prop = (T_MRB_ECNL_EPROPERTY *)ptr;
+	ecn_obj_t *eobj;
+
+	if (ptr == NULL)
+		return;
+
+	if (mrb_type(prop->eobj) == MRB_TT_DATA) {
+		eobj = (ecn_obj_t *)DATA_PTR(prop->eobj);
+
+		/* ãã­ããã£ã®è¨­å®ã¨ãã¦åãè¾¼ã¾ããå ´åã¯ç ´æ£ããªã */
+		if (eobj != NULL)
+			return;
+	}
+
+	mrb_free(mrb, prop);
+}
+
+/* ECHONET Lite ãã­ããã£ã³ã¼ã */
+static mrb_value mrb_ecnl_eproperty_get_pcd(mrb_state *mrb, mrb_value self)
+{
+	T_MRB_ECNL_EPROPERTY *prop;
+
+	prop = (T_MRB_ECNL_EPROPERTY *)DATA_PTR(self);
+
+	return mrb_fixnum_value(prop->inib.eprpcd);
+}
+
+/* ECHONET Lite ãã­ããã£å±æ§ */
+static mrb_value mrb_ecnl_eproperty_get_atr(mrb_state *mrb, mrb_value self)
+{
+	T_MRB_ECNL_EPROPERTY *prop;
+
+	prop = (T_MRB_ECNL_EPROPERTY *)DATA_PTR(self);
+
+	return mrb_fixnum_value(prop->inib.eprpatr);
+}
+
+/* ECHONET Lite ãã­ããã£ã®ãµã¤ãº */
+static mrb_value mrb_ecnl_eproperty_get_sz(mrb_state *mrb, mrb_value self)
+{
+	T_MRB_ECNL_EPROPERTY *prop;
+
+	prop = (T_MRB_ECNL_EPROPERTY *)DATA_PTR(self);
+
+	return mrb_fixnum_value(prop->inib.eprpsz);
+}
+
+/* ECHONET Lite ãã­ããã£ã®æ¡å¼µæ
+å ± */
+static mrb_value mrb_ecnl_eproperty_get_exinf(mrb_state *mrb, mrb_value self)
+{
+	T_MRB_ECNL_EPROPERTY *prop;
+
+	prop = (T_MRB_ECNL_EPROPERTY *)DATA_PTR(self);
+
+	return mrb_iv_get(mrb, prop->eobj, prop->exinf);
+}
+
+/* ECHONET Lite ãã­ããã£ã®æ¡å¼µæ
+å ±è¨­å® */
+static mrb_value mrb_ecnl_eproperty_set_exinf(mrb_state *mrb, mrb_value self)
+{
+	T_MRB_ECNL_EPROPERTY *prop;
+	mrb_value exinf;
+
+	mrb_get_args(mrb, "o", &exinf);
+
+	prop = (T_MRB_ECNL_EPROPERTY *)DATA_PTR(self);
+
+	mrb_iv_set(mrb, prop->eobj, prop->exinf, exinf);
+
+	return exinf;
+}
+
+/* ECHONET Lite ãã­ããã£ã®è¨­å®é¢æ° */
+static mrb_value mrb_ecnl_eproperty_get_setcb(mrb_state *mrb, mrb_value self)
+{
+	T_MRB_ECNL_EPROPERTY *prop;
+
+	prop = (T_MRB_ECNL_EPROPERTY *)DATA_PTR(self);
+
+	if (prop->eprpset == 0)
+		return mrb_nil_value();
+
+	return mrb_symbol_value(prop->eprpset);
+}
+
+/* ECHONET Lite ãã­ããã£ã®åå¾é¢æ° */
+static mrb_value mrb_ecnl_eproperty_get_getcb(mrb_state *mrb, mrb_value self)
+{
+	T_MRB_ECNL_EPROPERTY *prop;
+
+	prop = (T_MRB_ECNL_EPROPERTY *)DATA_PTR(self);
+
+	if (prop->eprpget == 0)
+		return mrb_nil_value();
+
+	return mrb_symbol_value(prop->eprpget);
+}
+
+/* ECHONET Lite ãã­ããã£ã®éç¥æç¡ */
+static mrb_value mrb_ecnl_eproperty_get_anno(mrb_state *mrb, mrb_value self)
+{
+	T_MRB_ECNL_EPROPERTY *prop;
+
+	prop = (T_MRB_ECNL_EPROPERTY *)DATA_PTR(self);
+
+	if (prop->anno)
+		return mrb_true_value();
+
+	return mrb_false_value();
+}
+
+/* ECHONET Lite ãã­ããã£ã®éç¥æç¡è¨­å® */
+static mrb_value mrb_ecnl_eproperty_set_anno(mrb_state *mrb, mrb_value self)
+{
+	T_MRB_ECNL_EPROPERTY *prop;
+	mrb_value anno;
+
+	mrb_get_args(mrb, "b", &anno);
+
+	prop = (T_MRB_ECNL_EPROPERTY *)DATA_PTR(self);
+
+	prop->anno = mrb_type(anno) != MRB_TT_FALSE;
+
+	return anno;
+}
+
+/*
+ * ãã¼ã¿è¨­å®é¢æ°
+ */
+static int mrb_ecnl_prop_set(ecnl_svc_task_t *svc, const EPRPINIB *item, const void *src, int size, bool_t *anno)
+{
+	mrb_state *mrb = svc->mrb;
+	T_MRB_ECNL_EPROPERTY *prop = cast_prop(item);
+	mrb_value args[2];
+	mrb_value ret;
+
+	if (prop->eprpset == 0)
+		return 0;
+
+	prop->anno = *anno;
+
+	args[0] = mrb_obj_value(mrb_obj_alloc(mrb, MRB_TT_DATA, _class_property));
+	DATA_TYPE(args[0]) = &mrb_ecnl_eproperty_type;
+	DATA_PTR(args[0]) = prop;
+
+	args[1] = mrb_str_new_static(mrb, src, size);
+
+	ret = mrb_funcall_argv(mrb, prop->eobj, prop->eprpset, 2, args);
+
+	if (mrb_type(ret) != MRB_TT_FIXNUM) {
+		//mrb_raise(mrb, E_RUNTIME_ERROR, "eprpset");
+		return 0;
+	}
+
+	if (*anno)
+		*anno = prop->anno;
+
+	return mrb_fixnum(ret);
+}
+
+/*
+ * ãã¼ã¿åå¾é¢æ°
+ */
+static int mrb_ecnl_prop_get(ecnl_svc_task_t *svc, const EPRPINIB *item, void *dst, int size)
+{
+	mrb_state *mrb = svc->mrb;
+	T_MRB_ECNL_EPROPERTY *prop = cast_prop(item);
+	mrb_value args[2];
+	mrb_value ret;
+	int len;
+
+	if (prop->eprpget == 0)
+		return 0;
+
+	args[0] = mrb_obj_value(mrb_obj_alloc(mrb, MRB_TT_DATA, _class_property));
+	DATA_TYPE(args[0]) = &mrb_ecnl_eproperty_type;
+	DATA_PTR(args[0]) = prop;
+
+	args[1] = mrb_fixnum_value(size);
+
+	ret = mrb_funcall_argv(mrb, prop->eobj, prop->eprpget, 2, args);
+
+	if (mrb_type(ret) != MRB_TT_STRING) {
+		//mrb_raise(mrb, E_RUNTIME_ERROR, "eprpget");
+		return 0;
+	}
+
+	len = RSTRING_LEN(ret);
+	if (size > len)
+		size = len;
+
+	memcpy(dst, RSTRING_PTR(ret), size);
+
+	return size;
+}
+
+static mrb_value mrb_ecnl_edata_initialize(mrb_state *mrb, mrb_value self)
+{
+	T_EDATA *dat;
+
+	dat = (T_EDATA *)mrb_malloc(mrb, sizeof(T_EDATA));
+	dat->trn_pos = -1;
+	DATA_TYPE(self) = &mrb_ecnl_edata_type;
+	DATA_PTR(self) = dat;
+
+	return self;
+}
+
+static void mrb_ecnl_edata_free(mrb_state *mrb, void *ptr)
+{
+	T_EDATA *dat = (T_EDATA *)ptr;
+	mrb_free(mrb, dat);
+}
+
+mrb_value mrb_ecnl_edata_new(mrb_state *mrb, T_EDATA *data)
+{
+	mrb_value resv;
+
+	resv = mrb_obj_value(mrb_obj_alloc(mrb, MRB_TT_DATA, _class_data));
+	DATA_TYPE(resv) = &mrb_ecnl_edata_type;
+	DATA_PTR(resv) = data;
+
+	return resv;
+}
+
+/* ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ±é»ææãè¿ãæå® */
+static mrb_value mrb_ecnl_trn_set_get(mrb_state *mrb, mrb_value self)
+{
+	T_EDATA *edat;
+	ER ret;
+
+	edat = (T_EDATA *)DATA_PTR(self);
+	ret = ecn_trn_set_get(mrb, edat, &edat->trn_pos);
+	if (ret != E_OK) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "trn_set_get");
+		return self;
+	}
+
+	return self;
+}
+
+/* è¦æ±é»æã¸ã®ãã­ããã£æå®è¿½å  */
+static mrb_value mrb_ecnl_add_epc(mrb_state *mrb, mrb_value self)
+{
+	mrb_int epc;
+	T_EDATA *edat;
+	ER ret;
+
+	mrb_get_args(mrb, "i", &epc);
+
+	edat = (T_EDATA *)DATA_PTR(self);
+	ret = ecn_add_epc(mrb, edat, epc);
+	if (ret != E_OK) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "add_epc");
+		return self;
+	}
+
+	return self;
+}
+
+/* è¦æ±é»æã¸ã®ãã­ããã£ãã¼ã¿è¿½å  */
+static mrb_value mrb_ecnl_add_edt(mrb_state *mrb, mrb_value self)
+{
+	mrb_int epc;
+	mrb_value redt;
+	T_EDATA *edat;
+	ER ret;
+
+	mrb_get_args(mrb, "iS", &epc, &redt);
+
+	edat = (T_EDATA *)DATA_PTR(self);
+	ret = ecn_add_edt(mrb, edat, epc, RSTRING_LEN(redt), RSTRING_PTR(redt));
+	if (ret != E_OK) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "add_edt");
+		return self;
+	}
+
+	return self;
+}
+
+static mrb_value mrb_ecnl_get_esv(mrb_state *mrb, mrb_value self)
+{
+	mrb_value result;
+	T_EDATA *edat;
+
+	edat = (T_EDATA *)DATA_PTR(self);
+	result = mrb_fixnum_value(edat->hdr.edata.esv);
+
+	return result;
+}
+
+static mrb_value mrb_ecnl_eiterator_initialize(mrb_state *mrb, mrb_value self)
+{
+	T_MRB_ECNL_EITERATOR *itr;
+
+	itr = (T_MRB_ECNL_EITERATOR *)mrb_malloc(mrb, sizeof(T_MRB_ECNL_EITERATOR));
+	DATA_TYPE(self) = &mrb_ecnl_eiterator_type;
+	DATA_PTR(self) = itr;
+
+	return self;
+}
+
+static void mrb_ecnl_eiterator_free(mrb_state *mrb, void *ptr)
+{
+	T_MRB_ECNL_EITERATOR *itr = (T_MRB_ECNL_EITERATOR *)ptr;
+	mrb_free(mrb, itr);
+}
+
+
+/* å¿ç­é»æè§£æã¤ãã¬ã¼ã¿ã¼åæå */
+static mrb_value mrb_ecnl_itr_ini(mrb_state *mrb, mrb_value self)
+{
+	mrb_value ritr;
+	T_EDATA *edat;
+	T_MRB_ECNL_EITERATOR *eitr;
+	ER ret;
+
+	ritr = mrb_obj_new(mrb, _class_iterator, 0, NULL);
+	eitr = (T_MRB_ECNL_EITERATOR *)DATA_PTR(ritr);
+	eitr->state = 0;
+	eitr->is_eof = false;
+
+	edat = (T_EDATA *)DATA_PTR(self);
+	ret = ecn_itr_ini(&eitr->itr, edat);
+	if (ret != E_OK) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "itr_ini");
+		return self;
+	}
+
+	return ritr;
+}
+
+/* å¿ç­é»æè§£æã¤ãã¬ã¼ã¿ã¼ã¤ã³ã¯ãªã¡ã³ã */
+static mrb_value mrb_ecnl_itr_nxt(mrb_state *mrb, mrb_value self)
+{
+	T_MRB_ECNL_EITERATOR *eitr;
+	ER ret;
+
+	eitr = (T_MRB_ECNL_EITERATOR *)DATA_PTR(self);
+	ret = ecn_itr_nxt(mrb, &eitr->itr, &eitr->epc, &eitr->pdc, &eitr->edt);
+	if (ret == E_BOVR) {
+		eitr->state++;
+		eitr->is_eof = eitr->itr.is_eof;
+	}
+	else if (ret != E_OK) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "itr_nxt");
+		return self;
+	}
+
+	return self;
+}
+
+static mrb_value mrb_ecnl_iterator_get_epc(mrb_state *mrb, mrb_value self)
+{
+	mrb_value result;
+	T_MRB_ECNL_EITERATOR *eitr;
+
+	eitr = (T_MRB_ECNL_EITERATOR *)DATA_PTR(self);
+	result = mrb_fixnum_value(eitr->epc);
+
+	return result;
+}
+
+static mrb_value mrb_ecnl_iterator_get_edt(mrb_state *mrb, mrb_value self)
+{
+	mrb_value result;
+	T_MRB_ECNL_EITERATOR *eitr;
+
+	eitr = (T_MRB_ECNL_EITERATOR *)DATA_PTR(self);
+	result = mrb_str_new(mrb, (char *)eitr->edt, eitr->pdc);
+
+	return result;
+}
+
+static mrb_value mrb_ecnl_iterator_get_state(mrb_state *mrb, mrb_value self)
+{
+	mrb_value result;
+	T_MRB_ECNL_EITERATOR *eitr;
+
+	eitr = (T_MRB_ECNL_EITERATOR *)DATA_PTR(self);
+	result = mrb_fixnum_value(eitr->state);
+
+	return result;
+}
+
+static mrb_value mrb_ecnl_iterator_is_eof(mrb_state *mrb, mrb_value self)
+{
+	mrb_value result;
+	T_MRB_ECNL_EITERATOR *eitr;
+
+	eitr = (T_MRB_ECNL_EITERATOR *)DATA_PTR(self);
+	result = eitr->is_eof ? mrb_true_value() : mrb_false_value();
+
+	return result;
+}
+
+void make_prop_map(ecn_obj_t *eobj, uint8_t *prpmap, int count, ATR flag)
+{
+	if (count < 16) {
+		uint8_t *pos = prpmap;
+		for (int i = 0; i < eobj->eprpcnt; i++) {
+			const EPRPINIB *eprp = eobj->inib.eprp[i];
+			if ((eprp->eprpatr & flag) == 0)
+				continue;
+
+			*pos++ = eprp->eprpcd;
+		}
+	}
+	else {
+		for (int i = 0; i < eobj->eprpcnt; i++) {
+			const EPRPINIB *eprp = eobj->inib.eprp[i];
+			if ((eprp->eprpatr & flag) == 0)
+				continue;
+
+			ecn_agent_set_epc_to_prop_map(eobj->inib.eprp[i]->eprpcd, prpmap);
+		}
+	}
+}
+
+void make_obj_prop_map(ecn_obj_t *eobj)
+{
+	int annocnt = 0, setcnt = 0, getcnt = 0;
+
+	for (int i = 0; i < eobj->eprpcnt; i++) {
+		ATR eprpatr = eobj->inib.eprp[i]->eprpatr;
+		if (eprpatr & EPC_RULE_ANNO)
+			annocnt++;
+		if (eprpatr & EPC_RULE_SET)
+			setcnt++;
+		if (eprpatr & EPC_RULE_GET)
+			getcnt++;
+	}
+	eobj->annocnt = annocnt;
+	eobj->setcnt = setcnt;
+	eobj->getcnt = getcnt;
+
+	make_prop_map(eobj, eobj->pmapAnno, annocnt, EPC_RULE_ANNO);
+	make_prop_map(eobj, eobj->pmapSet, setcnt, EPC_RULE_SET);
+	make_prop_map(eobj, eobj->pmapGet, getcnt, EPC_RULE_GET);
+}
+
+static mrb_value mrb_ecnl_svctask_initialize(mrb_state *mrb, mrb_value self)
+{
+	ecnl_svc_task_t *svc;
+	mrb_value profile;
+	ecn_node_t *node;
+	mrb_value devices;
+	const mrb_value *eobjs;
+	ecn_device_t *device;
+	EOBJCB *eobjcb;
+	int i, eobjcnt;
+	ID id = 1;
+	ER ret;
+
+	profile = mrb_iv_get(mrb, self, mrb_intern_cstr(mrb, "@profile"));
+	if (mrb_type(profile) == MRB_TT_FALSE) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "@profile");
+		return mrb_nil_value();
+	}
+
+	if (!mrb_obj_is_kind_of(mrb, profile, _class_node)) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "@profile");
+		return mrb_nil_value();
+	}
+
+	devices = mrb_iv_get(mrb, self, mrb_intern_cstr(mrb, "@devices"));
+	if (mrb_type(devices) == MRB_TT_FALSE) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "@devices");
+		return mrb_nil_value();
+	}
+
+	if (mrb_type(devices) != MRB_TT_ARRAY) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "@devices");
+		return mrb_nil_value();
+	}
+
+	node = (ecn_node_t *)DATA_PTR(profile);
+	eobjs = RARRAY_PTR(devices);
+	eobjcnt = RARRAY_LEN(devices);
+
+	svc = (ecnl_svc_task_t *)mrb_calloc(mrb, 1, sizeof(ecnl_svc_task_t)
+		+ (1 + eobjcnt) * sizeof(EOBJINIB *)
+		+ (2 * eobjcnt)/*ã¯ã©ã¹ãªã¹ãç¨*/);
+	DATA_TYPE(self) = &mrb_ecnl_svctask_type;
+	DATA_PTR(self) = svc;
+
+	svc->eobjlist_need_init = 1;
+	svc->current_tid = 1;
+
+	svc->mrb = mrb;
+	svc->self = self;
+	svc->tnum_enodid = 1; /* ãã®çã§ã¯ã­ã¼ã«ã«ãã¼ãï¼ã¤ */
+	svc->tmax_eobjid = 1 + 1 + eobjcnt;
+	svc->eobjinib_table = (const EOBJINIB **)&svc[1];
+	svc->eobjinib_table[0] = &node->base.inib;
+
+	eobjcb = &svc->eobjcb_table[0];
+	eobjcb->eobjs = &svc->eobjinib_table[1];
+
+	node->base.svc = svc;
+	node->base.eobjId = id++;
+	node->base.inib.enodid = 0;
+	eobjcb->profile = &node->base.inib;
+	eobjcb->eobjcnt = eobjcnt;
+	make_obj_prop_map(&node->base);
+
+	for (i = 0; i < eobjcnt; i++) {
+		if (!mrb_obj_is_kind_of(mrb, eobjs[i], _class_object)) {
+			mrb_raise(mrb, E_RUNTIME_ERROR, "devices");
+			goto error;
+		}
+		device = (ecn_device_t *)DATA_PTR(eobjs[i]);
+		device->base.svc = svc;
+		device->base.eobjId = id++;
+		device->base.inib.enodid = node->base.eobjId;
+		eobjcb->eobjs[i] = &device->base.inib;
+		make_obj_prop_map(&device->base);
+	}
+
+	/* ã¯ã©ã¹ãªã¹ãã®ä½æ */
+	svc->eclslst = (uint8_t *)&svc->eobjinib_table[1 + eobjcnt];
+	uint8_t *pos = svc->eclslst;
+	int eclscnt = 0;
+	for (i = 0; i < eobjcnt; i++) {
+		const EOBJINIB *eobj = eobjcb->eobjs[i];
+
+		uint8_t *pos2 = svc->eclslst;
+		bool_t match = false;
+		for (int j = 0; j < eclscnt; j++, pos2 += 2) {
+			const EOBJINIB *eobj2 = eobjcb->eobjs[j];
+
+			match = (pos2[0] == eobj2->eojx1) && (pos2[1] = eobj2->eojx2);
+			if (match)
+				break;
+		}
+		if (match)
+			continue;
+
+		*pos++ = eobj->eojx1;
+		*pos++ = eobj->eojx2;
+		eclscnt++;
+	}
+	svc->eclscnt = eclscnt;
+
+	/* ECHONETããã«ã¦ã§ã¢ãèµ·å */
+	ret = ecn_sta_svc(svc);
+	if (ret != E_OK) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "SvcTask.new");
+		goto error;
+	}
+
+	return self;
+error:
+	self = mrb_nil_value();
+	mrb_free(mrb, svc);
+
+	return self;
+}
+
+static ecn_obj_t *cast_obj2(const EOBJINIB *inib)
+{
+	return (ecn_obj_t *)((intptr_t)inib - offsetof(ecn_obj_t, inib));
+}
+
+static void mrb_ecnl_svctask_free(mrb_state *mrb, void *ptr)
+{
+	ecnl_svc_task_t *svc = (ecnl_svc_task_t *)ptr;
+#if 0 /* ã©ããã§è§£æ¾ãã¦ãããããï½¥ï½¥ï½¥ */
+	const EOBJINIB **table = svc->eobjinib_table;
+	const EOBJINIB **end = &table[svc->tmax_eobjid];
+
+	for (; table < end; table++) {
+		mrb_free(mrb, cast_obj2(*table));
+	}
+#endif
+	mrb_free(mrb, svc);
+}
+
+const EOBJINIB *echonet_svctask_get_eobjinib(ecnl_svc_task_t *svc, ID eobjid)
+{
+	return svc->eobjinib_table[eobjid - 1];
+}
+
+ID echonet_svctask_get_eobjid(ecnl_svc_task_t *svc, const EOBJINIB *eobjinib)
+{
+	int i, count = svc->tmax_eobjid;
+
+	for (i = 0; i < count; i++) {
+		if (svc->eobjinib_table[i] == eobjinib) {
+			return i + 1;
+		}
+	}
+
+	return 0;
+}
+
+/* ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­ä¸è¦ï¼é»æä½æ */
+static mrb_value mrb_ecnl_esv_set_i(mrb_state *mrb, mrb_value self)
+{
+	mrb_value resv;
+	mrb_value reobj;
+	mrb_int epc;
+	mrb_value redt;
+	T_EDATA *edat;
+	ecn_device_t *eobj;
+	ER ret;
+	ID eobjid;
+	ecnl_svc_task_t *svc;
+
+	svc = (ecnl_svc_task_t *)DATA_PTR(self);
+	svc->mrb = mrb;
+
+	mrb_get_args(mrb, "oiS", &reobj, &epc, &redt);
+
+	if (mrb_nil_p(reobj)) {
+		eobjid = EOBJ_NULL;
+	}
+	else {
+		eobj = (ecn_device_t *)DATA_PTR(reobj);
+		eobjid = eobj->base.eobjId;
+	}
+
+	ret = ecn_esv_seti(svc, &edat, eobjid, epc, RSTRING_LEN(redt), RSTRING_PTR(redt));
+	if (ret != E_OK) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "esv_set_i");
+		return self;
+	}
+
+	resv = mrb_obj_value(mrb_obj_alloc(mrb, MRB_TT_DATA, _class_data));
+	DATA_TYPE(resv) = &mrb_ecnl_edata_type;
+	DATA_PTR(resv) = edat;
+
+	return resv;
+}
+
+/* ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­è¦ï¼é»æä½æ */
+static mrb_value mrb_ecnl_esv_set_c(mrb_state *mrb, mrb_value self)
+{
+	mrb_value resv;
+	mrb_value reobj;
+	mrb_int epc;
+	mrb_int pdc;
+	mrb_value redt;
+	T_EDATA *edat;
+	ecn_device_t *eobj;
+	ER ret;
+	ID eobjid;
+	ecnl_svc_task_t *svc;
+
+	svc = (ecnl_svc_task_t *)DATA_PTR(self);
+	svc->mrb = mrb;
+
+	mrb_get_args(mrb, "oiS", &reobj, &epc, &pdc, &redt);
+
+	if (mrb_nil_p(reobj)) {
+		eobjid = EOBJ_NULL;
+	}
+	else {
+		eobj = (ecn_device_t *)DATA_PTR(reobj);
+		eobjid = eobj->base.eobjId;
+	}
+
+	ret = ecn_esv_setc(svc, &edat, eobjid, epc, RSTRING_LEN(redt), RSTRING_PTR(redt));
+	if (ret != E_OK) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "esv_set_c");
+		return self;
+	}
+
+	resv = mrb_obj_value(mrb_obj_alloc(mrb, MRB_TT_DATA, _class_data));
+	DATA_TYPE(resv) = &mrb_ecnl_edata_type;
+	DATA_PTR(resv) = edat;
+
+	return resv;
+}
+
+/* ãã­ããã£å¤èª­ã¿åºãè¦æ±é»æä½æ */
+static mrb_value mrb_ecnl_esv_get(mrb_state *mrb, mrb_value self)
+{
+	mrb_value resv;
+	mrb_value reobj;
+	mrb_int epc;
+	T_EDATA *edat;
+	ecn_device_t *eobj;
+	ER ret;
+	ID eobjid;
+	ecnl_svc_task_t *svc;
+
+	svc = (ecnl_svc_task_t *)DATA_PTR(self);
+	svc->mrb = mrb;
+
+	mrb_get_args(mrb, "oi", &reobj, &epc);
+
+	if (mrb_nil_p(reobj)) {
+		eobjid = EOBJ_NULL;
+	}
+	else {
+		eobj = (ecn_device_t *)DATA_PTR(reobj);
+		eobjid = eobj->base.eobjId;
+	}
+
+	ret = ecn_esv_get(svc, &edat, eobjid, epc);
+	if (ret != E_OK) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "esv_get");
+		return self;
+	}
+
+	resv = mrb_obj_value(mrb_obj_alloc(mrb, MRB_TT_DATA, _class_data));
+	DATA_TYPE(resv) = &mrb_ecnl_edata_type;
+	DATA_PTR(resv) = edat;
+
+	return resv;
+}
+
+/* ãã­ããã£å¤éç¥è¦æ±é»æä½æ */
+static mrb_value mrb_ecnl_esv_inf_req(mrb_state *mrb, mrb_value self)
+{
+	mrb_value resv;
+	mrb_value reobj;
+	mrb_int epc;
+	T_EDATA *edat;
+	ecn_device_t *eobj;
+	ER ret;
+	ID eobjid;
+	ecnl_svc_task_t *svc;
+
+	svc = (ecnl_svc_task_t *)DATA_PTR(self);
+	svc->mrb = mrb;
+
+	mrb_get_args(mrb, "oi", &reobj, &epc);
+
+	if (mrb_nil_p(reobj)) {
+		eobjid = EOBJ_NULL;
+	}
+	else {
+		eobj = (ecn_device_t *)DATA_PTR(reobj);
+		eobjid = eobj->base.eobjId;
+	}
+
+	ret = ecn_esv_inf_req(svc, &edat, eobjid, epc);
+	if (ret != E_OK) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "esv_inf_req");
+		return self;
+	}
+
+	resv = mrb_obj_value(mrb_obj_alloc(mrb, MRB_TT_DATA, _class_data));
+	DATA_TYPE(resv) = &mrb_ecnl_edata_type;
+	DATA_PTR(resv) = edat;
+
+	return resv;
+}
+
+/* ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ±é»æä½æ */
+static mrb_value mrb_ecnl_esv_set_get(mrb_state *mrb, mrb_value self)
+{
+	mrb_value resv;
+	mrb_value reobj;
+	mrb_int epc;
+	mrb_value redt;
+	T_EDATA *edat;
+	ecn_device_t *eobj;
+	ER ret;
+	ID eobjid;
+	ecnl_svc_task_t *svc;
+
+	svc = (ecnl_svc_task_t *)DATA_PTR(self);
+	svc->mrb = mrb;
+
+	mrb_get_args(mrb, "oiS", &reobj, &epc, &redt);
+
+	if (mrb_nil_p(reobj)) {
+		eobjid = EOBJ_NULL;
+	}
+	else {
+		eobj = (ecn_device_t *)DATA_PTR(reobj);
+		eobjid = eobj->base.eobjId;
+	}
+
+	ret = ecn_esv_set_get(svc, &edat, eobjid, epc, RSTRING_LEN(redt), RSTRING_PTR(redt));
+	if (ret != E_OK) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "esv_set_get");
+		return self;
+	}
+
+	resv = mrb_obj_value(mrb_obj_alloc(mrb, MRB_TT_DATA, _class_data));
+	DATA_TYPE(resv) = &mrb_ecnl_edata_type;
+	DATA_PTR(resv) = edat;
+
+	return resv;
+}
+
+/* ãã­ããã£å¤éç¥ï¼å¿ç­è¦ï¼é»æä½æ */
+static mrb_value mrb_ecnl_esv_infc(mrb_state *mrb, mrb_value self)
+{
+	mrb_value resv;
+	mrb_value reobj;
+	mrb_value rseobj;
+	mrb_int sepc;
+	T_EDATA *edat;
+	ecn_device_t *eobj;
+	ecn_device_t *seobj;
+	ER ret;
+	ID eobjid, seobjid;
+	ecnl_svc_task_t *svc;
+
+	svc = (ecnl_svc_task_t *)DATA_PTR(self);
+	svc->mrb = mrb;
+
+	mrb_get_args(mrb, "ooi", &reobj, &rseobj, &sepc);
+
+	if (mrb_nil_p(reobj)) {
+		eobjid = EOBJ_NULL;
+	}
+	else {
+		eobj = (ecn_device_t *)DATA_PTR(reobj);
+		eobjid = eobj->base.eobjId;
+	}
+
+	if (mrb_nil_p(rseobj)) {
+		seobjid = EOBJ_NULL;
+	}
+	else {
+		seobj = (ecn_device_t *)DATA_PTR(rseobj);
+		seobjid = seobj->base.eobjId;
+	}
+
+	ret = ecn_esv_infc(svc, &edat, eobjid, seobjid, sepc);
+	if (ret != E_OK) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "esv_infc");
+		return self;
+	}
+
+	resv = mrb_obj_value(mrb_obj_alloc(mrb, MRB_TT_DATA, _class_data));
+	DATA_TYPE(resv) = &mrb_ecnl_edata_type;
+	DATA_PTR(resv) = edat;
+
+	return resv;
+}
+
+/* è¦æ±é»æã®éä¿¡ */
+static mrb_value mrb_ecnl_snd_esv(mrb_state *mrb, mrb_value self)
+{
+	mrb_value resv;
+	T_EDATA *edat;
+	ER ret;
+	ecnl_svc_task_t *svc;
+
+	svc = (ecnl_svc_task_t *)DATA_PTR(self);
+	svc->mrb = mrb;
+
+	mrb_get_args(mrb, "o", &resv);
+
+	if (!mrb_obj_is_kind_of(mrb, resv, _class_data)) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "snd_esv");
+		return mrb_nil_value();
+	}
+
+	edat = (T_EDATA *)DATA_PTR(resv);
+	DATA_PTR(resv) = NULL;
+
+	if (edat->trn_pos != -1) {
+		ret = ecn_end_set_get(mrb, edat, edat->trn_pos);
+		if (ret != E_OK) {
+			mrb_raise(mrb, E_RUNTIME_ERROR, "end_set_get");
+			return self;
+		}
+	}
+
+	ret = ecn_snd_esv(svc, edat);
+	if (ret != E_OK) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "snd_esv");
+		return self;
+	}
+
+	return self;
+}
+
+/* é»æã®ç ´æ£ */
+static mrb_value mrb_ecnl_rel_esv(mrb_state *mrb, mrb_value self)
+{
+	mrb_value resv;
+	T_EDATA *edat;
+	ER ret;
+	ecnl_svc_task_t *svc;
+
+	svc = (ecnl_svc_task_t *)DATA_PTR(self);
+	svc->mrb = mrb;
+
+	mrb_get_args(mrb, "o", &resv);
+
+	if (!mrb_obj_is_kind_of(mrb, resv, _class_data)) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "rel_esv");
+		return mrb_nil_value();
+	}
+
+	edat = (T_EDATA *)DATA_PTR(resv);
+	DATA_PTR(resv) = NULL;
+
+	ret = ecn_rel_esv(mrb, edat);
+	if (ret != E_OK) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "rel_esv");
+		return self;
+	}
+
+	return self;
+}
+
+static mrb_value mrb_ecnl_svctask_ntf_inl(mrb_state *mrb, mrb_value self)
+{
+	ER ret;
+	ecnl_svc_task_t *svc;
+
+	svc = (ecnl_svc_task_t *)DATA_PTR(self);
+	svc->mrb = mrb;
+
+	/* ã¤ã³ã¹ã¿ã³ã¹ãªã¹ãéç¥ã®éä¿¡ */
+	ret = _ecn_tsk_ntf_inl(svc);
+	if (ret != E_OK) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "ntf_inl");
+		return self;
+	}
+
+	return self;
+}
+
+static mrb_value mrb_ecnl_svctask_set_timer(mrb_state *mrb, mrb_value self)
+{
+	TMO timer;
+	ecnl_svc_task_t *svc;
+
+	mrb_get_args(mrb, "i", &timer);
+
+	svc = (ecnl_svc_task_t *)DATA_PTR(self);
+	svc->api_timer = timer;
+
+	return self;
+}
+
+static mrb_value mrb_ecnl_svctask_get_timer(mrb_state *mrb, mrb_value self)
+{
+	TMO timer1, timer2;
+	ecnl_svc_task_t *svc;
+
+	svc = (ecnl_svc_task_t *)DATA_PTR(self);
+	svc->mrb = mrb;
+
+	timer1 = echonet_svctask_get_timer(svc);
+
+	timer2 = echonet_lcltask_get_timer(svc);
+	if ((timer1 == TMO_FEVR) || (timer1 > timer2))
+		timer1 = timer2;
+
+	timer2 = svc->api_timer;
+	if ((timer1 == TMO_FEVR) || (timer1 > timer2))
+		timer1 = timer2;
+
+	return mrb_fixnum_value(timer1);
+}
+
+static mrb_value mrb_ecnl_svctask_progress(mrb_state *mrb, mrb_value self)
+{
+	ecnl_svc_task_t *svc;
+	TMO interval;
+
+	svc = (ecnl_svc_task_t *)DATA_PTR(self);
+	svc->mrb = mrb;
+
+	mrb_get_args(mrb, "i", &interval);
+
+	echonet_svctask_progress(svc, interval);
+	echonet_lcltask_progress(svc, interval);
+
+	svc->api_timer -= interval;
+	if (svc->api_timer < 0) {
+		svc->api_timer = 0;
+	}
+
+	return mrb_nil_value();
+}
+
+/*
+ * Echoneté»æåä¿¡å¦ç
+ */
+static void main_recv_esv(ecnl_svc_task_t *svc, T_EDATA *esv)
+{
+	mrb_state *mrb = svc->mrb;
+	mrb_value resv;
+
+	resv = mrb_ecnl_edata_new(mrb, esv);
+
+	mrb_funcall(mrb, svc->self, "recv_esv", 1, resv);
+}
+
+/*
+ * å¿ç­é»æå¾
+ã¡ã®å²ãè¾¼ã¿å¦ç
+ */
+static void main_break_wait(ecnl_svc_task_t *svc, uint8_t *brkdat, int32_t len)
+{
+	mrb_state *mrb = svc->mrb;
+	mrb_value str;
+
+	str = mrb_str_new(mrb, (char *)brkdat, len);
+
+	mrb_funcall(mrb, svc->self, "break_wait", 1, str);
+}
+
+void echonet_apptask_recv_msg(ecnl_svc_task_t *svc, T_ECN_FST_BLK *p_msg)
+{
+	mrb_state *mrb = svc->mrb;
+	uint8_t brkdat[64];
+	int len;
+	ER ret;
+
+	/* Echoneté»æåä¿¡ã®å ´å */
+	if ((p_msg)->hdr.type == ECN_MSG_ECHONET) {
+		/* Echoneté»æåä¿¡å¦ç */
+		main_recv_esv(svc, (T_EDATA *)p_msg);
+
+		/* é åè§£æ¾ã¯GCã«ä»»ãã
+		ret = ecn_rel_esv(mrb, (T_EDATA *)p_msg);
+		if (ret != E_OK) {
+			mrb_raise(mrb, E_RUNTIME_ERROR, "ecn_rel_esv");
+			return;
+		} */
+	}
+	/* å¿ç­é»æå¾
+ã¡ã®å²ãè¾¼ã¿ã®å ´å */
+	else if ((p_msg)->hdr.type == ECN_MSG_INTERNAL) {
+		/* å¿ç­é»æå¾
+ã¡ã®å²ãè¾¼ã¿ãã¼ã¿åå¾ */
+		ret = ecn_get_brk_dat(mrb, (T_EDATA *)p_msg, brkdat, sizeof(brkdat), &len);
+		if (ret != E_OK) {
+			mrb_raise(mrb, E_RUNTIME_ERROR, "ecn_get_brk_dat");
+			return;
+		}
+
+		/* å¿ç­é»æå¾
+ã¡ã®å²ãè¾¼ã¿å¦ç */
+		main_break_wait(svc, brkdat, len);
+
+		/* é åè§£æ¾ */
+		ret = ecn_rel_esv(mrb, (T_EDATA *)p_msg);
+		if (ret != E_OK) {
+			mrb_raise(mrb, E_RUNTIME_ERROR, "ecn_rel_esv");
+			return;
+		}
+	}
+}
+
+static void mrb_ecnl_svctask_proccess(ecnl_svc_task_t *svc)
+{
+	T_ECN_FST_BLK *p_msg = NULL;
+	ER ret;
+	int i;
+
+	do {
+		i = 0;
+
+		ret = ecn_fbs_dequeue(&svc->svc_mbxid, &p_msg);
+		if (ret == E_OK) {
+			echonet_svctask_recv_msg(svc, p_msg);
+			i++;
+		}
+
+		ret = ecn_fbs_dequeue(&svc->lcl_mbxid, &p_msg);
+		if (ret == E_OK) {
+			echonet_lcltask_recv_msg(svc, p_msg);
+			i++;
+		}
+
+		ret = ecn_fbs_dequeue(&svc->api_mbxid, &p_msg);
+		if (ret == E_OK) {
+			echonet_apptask_recv_msg(svc, p_msg);
+			i++;
+		}
+	} while (i != 0);
+}
+
+/* éä¿¡ã¬ã¤ã¤ã¼ããã®å
+¥å */
+static mrb_value mrb_ecnl_svctask_recv_msg(mrb_state *mrb, mrb_value self)
+{
+	ecnl_svc_task_t *svc;
+	mrb_value ep;
+	mrb_value data;
+
+	svc = (ecnl_svc_task_t *)DATA_PTR(self);
+	svc->mrb = mrb;
+
+	mrb_get_args(mrb, "oS", &ep, &data);
+
+	echonet_lcl_input_msg(svc, ep, data);
+
+	mrb_ecnl_svctask_proccess(svc);
+
+	return mrb_nil_value();
+}
+
+static mrb_value mrb_ecnl_svctask_call_timeout(mrb_state *mrb, mrb_value self)
+{
+	ecnl_svc_task_t *svc;
+
+	svc = (ecnl_svc_task_t *)DATA_PTR(self);
+	svc->mrb = mrb;
+
+	echonet_svctask_timeout(svc);
+	echonet_lcltask_timeout(svc);
+
+	if (svc->api_timer == 0) {
+		svc->api_timer = -1;
+
+		mrb_funcall(mrb, svc->self, "timeout", 0);
+	}
+
+	mrb_ecnl_svctask_proccess(svc);
+
+	return mrb_nil_value();
+}
+
+static mrb_value mrb_ecnl_svctask_is_match(mrb_state *mrb, mrb_value self)
+{
+	ecnl_svc_task_t *svc;
+	mrb_value enod;
+	EOBJCB *enodcb;
+	mrb_value edata;
+	T_EDATA *edat;
+	mrb_value ep;
+	bool_t ret;
+
+	svc = (ecnl_svc_task_t *)DATA_PTR(self);
+	svc->mrb = mrb;
+
+	mrb_get_args(mrb, "ooo", &enod, &edata, &ep);
+
+	enodcb = (EOBJCB *)DATA_PTR(enod);
+	edat = (T_EDATA *)DATA_PTR(edata);
+
+	ret = ecn_is_match(svc, enodcb, edat, ep);
+
+	return mrb_bool_value(ret);
+}
+
+bool_t lcl_is_local_addr(ecnl_svc_task_t *svc, mrb_value ep)
+{
+	mrb_state *mrb = svc->mrb;
+	mrb_value ret;
+
+	ret = mrb_funcall(mrb, svc->self, "is_local_addr", 1, ep);
+
+	if (mrb_type(ret) == MRB_TT_TRUE)
+		return true;
+
+	if (mrb_type(ret) == MRB_TT_FALSE)
+		return false;
+
+	mrb_raise(mrb, E_RUNTIME_ERROR, "is_local_addr");
+	return false;
+}
+
+bool_t lcl_is_multicast_addr(ecnl_svc_task_t *svc, mrb_value ep)
+{
+	mrb_state *mrb = svc->mrb;
+	mrb_value ret;
+
+	ret = mrb_funcall(mrb, svc->self, "is_multicast_addr", 1, ep);
+
+	if (mrb_type(ret) == MRB_TT_TRUE)
+		return true;
+
+	if (mrb_type(ret) == MRB_TT_FALSE)
+		return false;
+
+	mrb_raise(mrb, E_RUNTIME_ERROR, "is_multicast_addr");
+	return false;
+}
+
+bool_t lcl_is_valid_addrid(ecnl_svc_task_t *svc, ECN_ENOD_ID id)
+{
+	mrb_state *mrb = svc->mrb;
+	mrb_value ret;
+
+	ret = mrb_funcall(mrb, svc->self, "is_valid_addrid", 1, mrb_fixnum_value(id));
+
+	if (mrb_type(ret) == MRB_TT_TRUE)
+		return true;
+
+	if (mrb_type(ret) == MRB_TT_FALSE)
+		return false;
+
+	mrb_raise(mrb, E_RUNTIME_ERROR, "is_valid_addrid");
+	return false;
+}
+
+mrb_value lcl_get_local_addr(ecnl_svc_task_t *svc)
+{
+	return mrb_funcall(svc->mrb, svc->self, "get_local_addr", 0);
+}
+
+mrb_value lcl_get_multicast_addr(ecnl_svc_task_t *svc)
+{
+	return mrb_funcall(svc->mrb, svc->self, "get_multicast_addr", 0);
+}
+
+mrb_value lcl_get_remote_addr(ecnl_svc_task_t *svc, ECN_ENOD_ID id)
+{
+	return mrb_funcall(svc->mrb, svc->self, "get_remote_addr", 1, mrb_fixnum_value(id));
+}
+
+ECN_ENOD_ID lcl_get_remote_id(ecnl_svc_task_t *svc, const mrb_value ep)
+{
+	mrb_state *mrb = svc->mrb;
+	mrb_value ret;
+
+	ret = mrb_funcall(mrb, svc->self, "get_remote_id", 1, ep);
+
+	if (mrb_type(ret) == MRB_TT_FALSE)
+		return ENOD_NOT_MATCH_ID;
+
+	if (mrb_type(ret) == MRB_TT_FIXNUM)
+		return (ECN_ENOD_ID)mrb_fixnum(ret);
+
+	return ENOD_NOT_MATCH_ID;
+}
+
+ECN_ENOD_ID lcl_set_remote_addr(ecnl_svc_task_t *svc, T_EDATA *edata, mrb_value ep)
+{
+	mrb_state *mrb = svc->mrb;
+	mrb_value edat = mrb_obj_value(edata);
+	mrb_value ret;
+
+	ret = mrb_funcall(mrb, svc->self, "set_remote_addr", 2, edat, ep);
+
+	if (mrb_type(ret) == MRB_TT_FALSE)
+		return ENOD_NOT_MATCH_ID;
+
+	if (mrb_type(ret) == MRB_TT_FIXNUM)
+		return (ECN_ENOD_ID)mrb_fixnum(ret);
+
+	return ENOD_NOT_MATCH_ID;
+}
+
+ECN_ENOD_ID lcl_add_remote_addr(ecnl_svc_task_t *svc, T_EDATA *edata, mrb_value ep)
+{
+	mrb_state *mrb = svc->mrb;
+	mrb_value edat = mrb_obj_value(edata);
+	mrb_value ret;
+
+	ret = mrb_funcall(mrb, svc->self, "add_remote_addr", 2, edat, ep);
+
+	if (mrb_type(ret) == MRB_TT_FALSE)
+		return ENOD_NOT_MATCH_ID;
+
+	if (mrb_type(ret) == MRB_TT_FIXNUM)
+		return (ECN_ENOD_ID)mrb_fixnum(ret);
+
+	return ENOD_NOT_MATCH_ID;
+}
+
+ER lcl_snd_msg(ecnl_svc_task_t *svc, mrb_value ep, mrb_value msg)
+{
+	mrb_funcall(svc->mrb, svc->self, "snd_msg", 2, ep, msg);
+
+	return E_OK;
+}
+
+void mrb_mruby_ecnl_gem_init(mrb_state *mrb)
+{
+	_module_ecnl = mrb_define_module(mrb, "ECNL");
+
+	/* æªè¨­å® */
+	mrb_define_const(mrb, _module_ecnl, "EPC_NONE", mrb_fixnum_value(EPC_NONE));
+	/* ã¢ã¯ã»ã¹ã«ã¼ã« Set */
+	mrb_define_const(mrb, _module_ecnl, "EPC_RULE_SET", mrb_fixnum_value(EPC_RULE_SET));
+	/* ã¢ã¯ã»ã¹ã«ã¼ã« Get */
+	mrb_define_const(mrb, _module_ecnl, "EPC_RULE_GET", mrb_fixnum_value(EPC_RULE_GET));
+	/* ã¢ã¯ã»ã¹ã«ã¼ã« Anno */
+	mrb_define_const(mrb, _module_ecnl, "EPC_RULE_ANNO", mrb_fixnum_value(EPC_RULE_ANNO));
+	/* ç¶æ
+å¤åæéç¥ */
+	mrb_define_const(mrb, _module_ecnl, "EPC_ANNOUNCE", mrb_fixnum_value(EPC_ANNOUNCE));
+	/* å¯å¤é·ãã¼ã¿ */
+	mrb_define_const(mrb, _module_ecnl, "EPC_VARIABLE", mrb_fixnum_value(EPC_VARIABLE));
+
+	/* ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­ä¸è¦ï¼		*/
+	mrb_define_const(mrb, _module_ecnl, "ESV_SET_I", mrb_fixnum_value(ESV_SET_I));
+	/* ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­è¦ï¼		*/
+	mrb_define_const(mrb, _module_ecnl, "ESV_SET_C", mrb_fixnum_value(ESV_SET_C));
+	/* ãã­ããã£å¤èª­ã¿åºãè¦æ±					*/
+	mrb_define_const(mrb, _module_ecnl, "ESV_GET", mrb_fixnum_value(ESV_GET));
+	/* ãã­ããã£å¤éç¥è¦æ±						*/
+	mrb_define_const(mrb, _module_ecnl, "ESV_INF_REQ", mrb_fixnum_value(ESV_INF_REQ));
+	/* ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ±		*/
+	mrb_define_const(mrb, _module_ecnl, "ESV_SET_GET", mrb_fixnum_value(ESV_SET_GET));
+	/* ãã­ããã£å¤æ¸ãè¾¼ã¿å¿ç­					*/
+	mrb_define_const(mrb, _module_ecnl, "ESV_SET_RES", mrb_fixnum_value(ESV_SET_RES));
+	/* ãã­ããã£å¤èª­ã¿åºãå¿ç­					*/
+	mrb_define_const(mrb, _module_ecnl, "ESV_GET_RES", mrb_fixnum_value(ESV_GET_RES));
+	/* ãã­ããã£å¤éç¥							*/
+	mrb_define_const(mrb, _module_ecnl, "ESV_INF", mrb_fixnum_value(ESV_INF));
+	/* ãã­ããã£å¤éç¥ï¼å¿ç­è¦ï¼				*/
+	mrb_define_const(mrb, _module_ecnl, "ESV_INFC", mrb_fixnum_value(ESV_INFC));
+	/* ãã­ããã£å¤éç¥å¿ç­						*/
+	mrb_define_const(mrb, _module_ecnl, "ESV_INFC_RES", mrb_fixnum_value(ESV_INFC_RES));
+	/* ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãå¿ç­		*/
+	mrb_define_const(mrb, _module_ecnl, "ESV_SET_GET_RES", mrb_fixnum_value(ESV_SET_GET_RES));
+	/* ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ä¸å¯å¿ç­			*/
+	mrb_define_const(mrb, _module_ecnl, "ESV_SET_I_SNA", mrb_fixnum_value(ESV_SET_I_SNA));
+	/* ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ä¸å¯å¿ç­			*/
+	mrb_define_const(mrb, _module_ecnl, "ESV_SET_C_SNA", mrb_fixnum_value(ESV_SET_C_SNA));
+	/* ãã­ããã£å¤èª­ã¿åºãä¸å¯å¿ç­				*/
+	mrb_define_const(mrb, _module_ecnl, "ESV_GET_SNA", mrb_fixnum_value(ESV_GET_SNA));
+	/* ãã­ããã£å¤éç¥ä¸å¯å¿ç­					*/
+	mrb_define_const(mrb, _module_ecnl, "ESV_INF_SNA", mrb_fixnum_value(ESV_INF_SNA));
+	/* ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãä¸å¯å¿ç­	*/
+	mrb_define_const(mrb, _module_ecnl, "ESV_SET_GET_SNA", mrb_fixnum_value(ESV_SET_GET_SNA));
+
+	/* ã¢ãã¬ã¹IDç»é²ãªã */
+	mrb_define_const(mrb, _module_ecnl, "ENOD_NOT_MATCH_ID", mrb_fixnum_value(ENOD_NOT_MATCH_ID));
+	/* ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ID */
+	mrb_define_const(mrb, _module_ecnl, "ENOD_MULTICAST_ID", mrb_fixnum_value(ENOD_MULTICAST_ID));
+	/* èªãã¼ãã¢ãã¬ã¹ID */
+	mrb_define_const(mrb, _module_ecnl, "ENOD_LOCAL_ID", mrb_fixnum_value(ENOD_LOCAL_ID));
+	/* APIã¢ãã¬ã¹ID */
+	mrb_define_const(mrb, _module_ecnl, "ENOD_API_ID", mrb_fixnum_value(ENOD_API_ID));
+	/* ä»ãã¼ãID */
+	mrb_define_const(mrb, _module_ecnl, "ENOD_REMOTE_ID", mrb_fixnum_value(ENOD_REMOTE_ID));
+
+	_class_object = mrb_define_class_under(mrb, _module_ecnl, "EObject", mrb->object_class);
+	MRB_SET_INSTANCE_TT(_class_object, MRB_TT_DATA);
+	mrb_define_method(mrb, _class_object, "initialize", mrb_ecnl_eobject_initialize, MRB_ARGS_REQ(5));
+
+	/* ãã­ããã£å¤æ¸ãè¾¼ã¿ */
+	mrb_define_method(mrb, _class_object, "data_prop_set", mrb_ecnl_eobject_data_prop_set, MRB_ARGS_REQ(4));
+
+	/* ãã­ããã£å¤èª­ã¿åºã */
+	mrb_define_method(mrb, _class_object, "data_prop_get", mrb_ecnl_eobject_data_prop_get, MRB_ARGS_REQ(3));
+
+	_class_node = mrb_define_class_under(mrb, _module_ecnl, "ENode", mrb->object_class);
+	MRB_SET_INSTANCE_TT(_class_node, MRB_TT_DATA);
+	mrb_define_method(mrb, _class_node, "initialize", mrb_ecnl_enode_initialize, MRB_ARGS_REQ(2));
+
+	/* ãã­ããã£å¤æ¸ãè¾¼ã¿ */
+	mrb_define_method(mrb, _class_node, "data_prop_set", mrb_ecnl_eobject_data_prop_set, MRB_ARGS_REQ(4));
+
+	/* ãã­ããã£å¤èª­ã¿åºã */
+	mrb_define_method(mrb, _class_node, "data_prop_get", mrb_ecnl_eobject_data_prop_get, MRB_ARGS_REQ(3));
+
+	_class_property = mrb_define_class_under(mrb, _module_ecnl, "EProperty", mrb->object_class);
+	MRB_SET_INSTANCE_TT(_class_property, MRB_TT_DATA);
+	mrb_define_method(mrb, _class_property, "initialize", mrb_ecnl_eproperty_initialize, MRB_ARGS_REQ(6));
+
+	/* ECHONET Lite ãã­ããã£ã³ã¼ã */
+	mrb_define_method(mrb, _class_property, "pcd", mrb_ecnl_eproperty_get_pcd, MRB_ARGS_NONE());
+	/* ECHONET Lite ãã­ããã£å±æ§ */
+	mrb_define_method(mrb, _class_property, "atr", mrb_ecnl_eproperty_get_atr, MRB_ARGS_NONE());
+	/* ECHONET Lite ãã­ããã£ã®ãµã¤ãº */
+	mrb_define_method(mrb, _class_property, "sz", mrb_ecnl_eproperty_get_sz, MRB_ARGS_NONE());
+	/* ECHONET Lite ãã­ããã£ã®æ¡å¼µæ
+å ± */
+	mrb_define_method(mrb, _class_property, "exinf", mrb_ecnl_eproperty_get_exinf, MRB_ARGS_NONE());
+	mrb_define_method(mrb, _class_property, "set_exinf", mrb_ecnl_eproperty_set_exinf, MRB_ARGS_REQ(1));
+	/* ECHONET Lite ãã­ããã£ã®è¨­å®é¢æ° */
+	mrb_define_method(mrb, _class_property, "setcb", mrb_ecnl_eproperty_get_setcb, MRB_ARGS_NONE());
+	/* ECHONET Lite ãã­ããã£ã®åå¾é¢æ° */
+	mrb_define_method(mrb, _class_property, "getcb", mrb_ecnl_eproperty_get_getcb, MRB_ARGS_NONE());
+	/* ECHONET Lite ãã­ããã£ã®éç¥æç¡ */
+	mrb_define_method(mrb, _class_property, "anno", mrb_ecnl_eproperty_get_anno, MRB_ARGS_NONE());
+	mrb_define_method(mrb, _class_property, "set_anno", mrb_ecnl_eproperty_set_anno, MRB_ARGS_REQ(1));
+
+	_class_data = mrb_define_class_under(mrb, _module_ecnl, "EData", mrb->object_class);
+	MRB_SET_INSTANCE_TT(_class_data, MRB_TT_DATA);
+	mrb_define_method(mrb, _class_data, "initialize", mrb_ecnl_edata_initialize, MRB_ARGS_NONE());
+
+	/* ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ±é»ææãè¿ãæå® */
+	mrb_define_method(mrb, _class_data, "trn_set_get", mrb_ecnl_trn_set_get, MRB_ARGS_NONE());
+
+	/* è¦æ±é»æã¸ã®ãã­ããã£æå®è¿½å  */
+	mrb_define_method(mrb, _class_data, "add_epc", mrb_ecnl_add_epc, MRB_ARGS_REQ(1));
+
+	/* è¦æ±é»æã¸ã®ãã­ããã£ãã¼ã¿è¿½å  */
+	mrb_define_method(mrb, _class_data, "add_edt", mrb_ecnl_add_edt, MRB_ARGS_REQ(2));
+
+	/* å¿ç­é»æãµã¼ãã¹ã³ã¼ãåå¾ */
+	mrb_define_method(mrb, _class_data, "esv", mrb_ecnl_get_esv, MRB_ARGS_NONE());
+
+	/* å¿ç­é»æè§£æã¤ãã¬ã¼ã¿ã¼åæå */
+	mrb_define_method(mrb, _class_data, "itr_ini", mrb_ecnl_itr_ini, MRB_ARGS_NONE());
+
+	_class_iterator = mrb_define_class_under(mrb, _module_ecnl, "EIterator", mrb->object_class);
+	MRB_SET_INSTANCE_TT(_class_iterator, MRB_TT_DATA);
+	mrb_define_method(mrb, _class_iterator, "initialize", mrb_ecnl_eiterator_initialize, MRB_ARGS_NONE());
+
+	/* å¿ç­é»æè§£æã¤ãã¬ã¼ã¿ã¼ã¤ã³ã¯ãªã¡ã³ã */
+	mrb_define_method(mrb, _class_iterator, "itr_nxt", mrb_ecnl_itr_nxt, MRB_ARGS_NONE());
+
+	mrb_define_method(mrb, _class_iterator, "epc", mrb_ecnl_iterator_get_epc, MRB_ARGS_NONE());
+	mrb_define_method(mrb, _class_iterator, "edt", mrb_ecnl_iterator_get_edt, MRB_ARGS_NONE());
+	mrb_define_method(mrb, _class_iterator, "state", mrb_ecnl_iterator_get_state, MRB_ARGS_NONE());
+	mrb_define_method(mrb, _class_iterator, "is_eof", mrb_ecnl_iterator_is_eof, MRB_ARGS_NONE());
+
+	_class_svctask = mrb_define_class_under(mrb, _module_ecnl, "SvcTask", mrb->object_class);
+	MRB_SET_INSTANCE_TT(_class_svctask, MRB_TT_DATA);
+	mrb_define_method(mrb, _class_svctask, "initialize", mrb_ecnl_svctask_initialize, MRB_ARGS_NONE());
+
+	/* ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­ä¸è¦ï¼é»æä½æ */
+	mrb_define_method(mrb, _class_svctask, "esv_set_i", mrb_ecnl_esv_set_i, MRB_ARGS_REQ(3));
+
+	/* ãã­ããã£å¤æ¸ãè¾¼ã¿è¦æ±ï¼å¿ç­è¦ï¼é»æä½æ */
+	mrb_define_method(mrb, _class_svctask, "esv_set_c", mrb_ecnl_esv_set_c, MRB_ARGS_REQ(3));
+
+	/* ãã­ããã£å¤èª­ã¿åºãè¦æ±é»æä½æ */
+	mrb_define_method(mrb, _class_svctask, "esv_get", mrb_ecnl_esv_get, MRB_ARGS_REQ(2));
+
+	/* ãã­ããã£å¤éç¥è¦æ±é»æä½æ */
+	mrb_define_method(mrb, _class_svctask, "esv_inf_req", mrb_ecnl_esv_inf_req, MRB_ARGS_REQ(2));
+
+	/* ãã­ããã£å¤æ¸ãè¾¼ã¿ã»èª­ã¿åºãè¦æ±é»æä½æ */
+	mrb_define_method(mrb, _class_svctask, "esv_set_get", mrb_ecnl_esv_set_get, MRB_ARGS_REQ(3));
+
+	/* ãã­ããã£å¤éç¥ï¼å¿ç­è¦ï¼é»æä½æ */
+	mrb_define_method(mrb, _class_svctask, "esv_infc", mrb_ecnl_esv_infc, MRB_ARGS_REQ(3));
+
+	/* è¦æ±é»æã®éä¿¡ */
+	mrb_define_method(mrb, _class_svctask, "snd_esv", mrb_ecnl_snd_esv, MRB_ARGS_REQ(1));
+
+	/* é»æã®ç ´æ£ */
+	mrb_define_method(mrb, _class_svctask, "rel_esv", mrb_ecnl_rel_esv, MRB_ARGS_REQ(1));
+
+	/* ã¤ã³ã¹ã¿ã³ã¹ãªã¹ãéç¥ã®éä¿¡ */
+	mrb_define_method(mrb, _class_svctask, "ntf_inl", mrb_ecnl_svctask_ntf_inl, MRB_ARGS_NONE());
+
+	/* ã¡ãã»ã¼ã¸å¦çã«ã¼ã */
+	mrb_define_method(mrb, _class_svctask, "set_timer", mrb_ecnl_svctask_set_timer, MRB_ARGS_REQ(1));
+	mrb_define_method(mrb, _class_svctask, "timer", mrb_ecnl_svctask_get_timer, MRB_ARGS_NONE());
+	mrb_define_method(mrb, _class_svctask, "progress", mrb_ecnl_svctask_progress, MRB_ARGS_REQ(1));
+	mrb_define_method(mrb, _class_svctask, "recv_msg", mrb_ecnl_svctask_recv_msg, MRB_ARGS_REQ(2));
+	mrb_define_method(mrb, _class_svctask, "call_timeout", mrb_ecnl_svctask_call_timeout, MRB_ARGS_NONE());
+
+	/* ãªã¢ã¼ãECHONETãã¼ãã®é©åç¢ºèª */
+	mrb_define_method(mrb, _class_svctask, "is_match", mrb_ecnl_svctask_is_match, MRB_ARGS_REQ(3));
+}
+
+void mrb_mruby_ecnl_gem_final(mrb_state *mrb)
+{
+}
Index: EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/mrb_ecnl.h
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/mrb_ecnl.h	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-ecnl/src/mrb_ecnl.h	(revision 270)
@@ -0,0 +1,103 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2016 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ */
+
+#ifndef MRB_ECNL_H
+#define MRB_ECNL_H
+
+#include <stddef.h>
+#include <stdint.h>
+#include <mruby.h>
+#include "echonet.h"
+
+extern struct RClass *_module_ecnl;
+extern struct RClass *_class_object;
+extern struct RClass *_class_node;
+extern struct RClass *_class_property;
+extern struct RClass *_class_data;
+extern struct RClass *_class_iterator;
+extern struct RClass *_class_svctask;
+
+typedef struct mrb_ecnl_eproperty_type
+{
+	EPRPINIB inib;
+	mrb_sym exinf;
+	mrb_sym eprpset;
+	mrb_sym eprpget;
+	mrb_value eobj;
+	bool_t anno;
+}T_MRB_ECNL_EPROPERTY;
+
+typedef struct mrb_ecnl_eiterator_type
+{
+	T_ENUM_EPC itr;
+	uint8_t epc, pdc;
+	uint8_t edt[256];
+	uint8_t state : 7;
+	uint8_t is_eof : 1;
+}T_MRB_ECNL_EITERATOR;
+
+mrb_value mrb_ecnl_edata_new(mrb_state *mrb, T_EDATA *data);
+
+bool_t lcl_is_local_addr(ecnl_svc_task_t *svc, mrb_value ep);
+bool_t lcl_is_multicast_addr(ecnl_svc_task_t *svc, mrb_value ep);
+bool_t lcl_is_valid_addrid(ecnl_svc_task_t *svc, ECN_ENOD_ID id);
+mrb_value lcl_get_local_addr(ecnl_svc_task_t *svc);
+mrb_value lcl_get_multicast_addr(ecnl_svc_task_t *svc);
+mrb_value lcl_get_remote_addr(ecnl_svc_task_t *svc, ECN_ENOD_ID id);
+ECN_ENOD_ID lcl_get_remote_id(ecnl_svc_task_t *svc, const mrb_value ep);
+ECN_ENOD_ID lcl_set_remote_addr(ecnl_svc_task_t *svc, T_EDATA *edata, mrb_value ep);
+ECN_ENOD_ID lcl_add_remote_addr(ecnl_svc_task_t *svc, T_EDATA *edata, mrb_value ep);
+ER lcl_snd_msg(ecnl_svc_task_t *svc, mrb_value ep, mrb_value msg);
+
+void mrb_mruby_ecnl_gem_init(mrb_state *mrb);
+void mrb_mruby_ecnl_gem_final(mrb_state *mrb);
+
+#endif /* MRB_ECNL_H */
Index: EcnlProtoTool/trunk/mrbgems/mruby-others/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-others/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-others/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-others') do |spec|
+  spec.license = 'TOPPERS License'
+  spec.author  = 'Cores Co., Ltd.'
+  spec.summary = 'extra other mrbgem'
+end
Index: EcnlProtoTool/trunk/mrbgems/mruby-others/src/dummy.c
===================================================================
--- EcnlProtoTool/trunk/mrbgems/mruby-others/src/dummy.c	(revision 270)
+++ EcnlProtoTool/trunk/mrbgems/mruby-others/src/dummy.c	(revision 270)
@@ -0,0 +1,4 @@
+
+static void dummy()
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/.cproject
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/.cproject	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/.cproject	(revision 270)
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+	<storageModule moduleId="org.eclipse.cdt.core.settings">
+		<cconfiguration id="com.renesas.cdt.rz.debug.win32.configuration.Id.1552447583">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.renesas.cdt.rz.debug.win32.configuration.Id.1552447583" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+				<externalSettings/>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="mruby" buildArtefactType="com.renesas.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=com.renesas.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf *.lst *.lis *.lpp *.map libgcc.a" description="" id="com.renesas.cdt.rz.debug.win32.configuration.Id.1552447583" name="Debug" parent="com.renesas.cdt.rz.debug.win32.configuration.Id">
+					<folderInfo id="com.renesas.cdt.rz.debug.win32.configuration.Id.1552447583." name="/" resourcePath="">
+						<toolChain id="com.renesas.cdt.rz.debug.win32.toolchain.Id.87786683" name="KPIT GNUARM-NONE-EABI Toolchain" superClass="com.renesas.cdt.rz.debug.win32.toolchain.Id">
+							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE" id="com.renesas.cdt.rz.debug.win32.targetplatform.Id.1600182357" name="Target Platform" osList="all" superClass="com.renesas.cdt.rz.debug.win32.targetplatform.Id"/>
+							<builder buildPath="${workspace_loc:/mruby-1.2.0}" id="com.renesas.cdt.rz.debug.win32.builder.Id.1846611762" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Builder" superClass="com.renesas.cdt.rz.debug.win32.builder.Id"/>
+							<tool id="com.renesas.cdt.rz.debug.win32.tool.libgen.Id.1116635171" name="Library Generator" superClass="com.renesas.cdt.rz.debug.win32.tool.libgen.Id">
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.ctype.458951408" name="ctype.h : æå­ãæ±ããã§ãã¯ãã¾ã" superClass="com.renesas.cdt.core.LibraryGenerator.option.ctype" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.math.1642753503" name="math.h : ä¸è§é¢æ°ãªã©æ°å¤ã®è¨ç®ãè¡ãã¾ã" superClass="com.renesas.cdt.core.LibraryGenerator.option.math" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.stdio.961659227" name="stdio.h : å
+¥å/åºåãè¡ãã¾ã" superClass="com.renesas.cdt.core.LibraryGenerator.option.stdio" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.stdlib.509673709" name="stdlib.h : æ ¼ç´é åã®ç®¡çãªã© C ãã­ã°ã©ã ã®æ¨æºå¦çãè¡ãã¾ã" superClass="com.renesas.cdt.core.LibraryGenerator.option.stdlib" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.string.1550848672" name="string.h : æå­åã®æ¯è¼ã¨ã³ãã¼ãè¡ãã¾ã" superClass="com.renesas.cdt.core.LibraryGenerator.option.string" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.selectLibrary.422121936" name="ã©ã¤ãã©ãªã¼ã®é¸æ" superClass="com.renesas.cdt.core.LibraryGenerator.option.selectLibrary" value="com.renesas.core.LibraryGenerator.option.selectLibrary.newLib" valueType="enumerated"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.libraryType.1589977374" name="ã©ã¤ãã©ãªã¼å" superClass="com.renesas.cdt.core.LibraryGenerator.option.libraryType" value="com.renesas.cdt.core.LibraryGenerator.option.libraryType.projectBuilt" valueType="enumerated"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.misc9.1198648676" name="åé¢æ°ããåºåãã¡ã¤ã«å
+ã®å¯¾å¿ããã»ã¯ã·ã§ã³ã«é
+ç½®ãã (-ffunction-sections)" superClass="com.renesas.cdt.core.LibraryGenerator.option.misc9" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.misc14.1587684955" name="é¢æ°ã®ã¢ãã¬ã¹ãã¬ã¸ã¹ã¿ã¼ã«ç½®ããªã (-fno-function-cse)" superClass="com.renesas.cdt.core.LibraryGenerator.option.misc14" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.misc36.1213035210" name="Parse the whole compilation unit before starting to produce code ( -funit-at-a-time)" superClass="com.renesas.cdt.core.LibraryGenerator.option.misc36" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.misc10.1626842453" name="åãã¼ã¿ããåºåãã¡ã¤ã«å
+ã®å¯¾å¿ããã»ã¯ã·ã§ã³ã«é
+ç½®ãã (-fdata-sections)" superClass="com.renesas.cdt.core.LibraryGenerator.option.misc10" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.misc37.476113883" name="Align branch targets to a power-of-two boundary (-falign-jumps)" superClass="com.renesas.cdt.core.LibraryGenerator.option.misc37" value="true" valueType="boolean"/>
+							</tool>
+							<tool id="com.renesas.cdt.rz.debug.win32.tool.compiler.Id.2114772705" name="Compiler" superClass="com.renesas.cdt.rz.debug.win32.tool.compiler.Id">
+								<option defaultValue="true" id="com.renesas.cdt.core.Compiler.option.misc2.2071139574" name="æ¨æºã·ã¹ãã ã»ãã£ã¬ã¯ããªã¼ã§ãããã¼ã»ãã¡ã¤ã«ãæ¤ç´¢ããªã (-nostdinc)" superClass="com.renesas.cdt.core.Compiler.option.misc2" value="false" valueType="boolean"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.architecture.712090671" name="ã¢ã¼ã­ãã¯ãã£ã¼" superClass="com.renesas.cdt.rz.Debug.Compiler.option.architecture" value="com.renesas.cdt.rz.Debug.Compiler.option.architecture.armv7a" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.cpuType.1792387458" name="CPU ã¿ã¤ã" superClass="com.renesas.cdt.rz.Debug.Compiler.option.cpuType" value="com.renesas.cdt.rz.Debug.Compiler.option.cpuType.rza" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.dataEndian.1830244232" name="ã¨ã³ãã£ã¢ã³" superClass="com.renesas.cdt.rz.Debug.Compiler.option.dataEndian" value="com.renesas.cdt.rz.Debug.Compiler.option.dataEndian.little" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.instructionset.1447259851" name="å½ä»¤ã»ãã" superClass="com.renesas.cdt.rz.Debug.Compiler.option.instructionset" value="com.renesas.cdt.rz.Debug.Compiler.option.instructionset.arm" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.interworking.260043818" name="ã¤ã³ã¿ã¼ã»ã¯ã¼ã­ã³ã° (-mthumb-interwork)" superClass="com.renesas.cdt.rz.Debug.Compiler.option.interworking" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.targetfpu.367057389" name="ã¿ã¼ã²ãã FPU (-mfpu)" superClass="com.renesas.cdt.rz.Debug.Compiler.option.targetfpu" value="com.renesas.cdt.rz.Debug.Compiler.option.targetfpu.vfp" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.floatingpointabi.1426976645" name="æµ®åå°æ°ç¹ ABI (-mfloat-abi=name)" superClass="com.renesas.cdt.rz.Debug.Compiler.option.floatingpointabi" value="com.renesas.cdt.rz.Debug.Compiler.option.floatingpointabi.soft" valueType="enumerated"/>
+								<option id="com.renesas.cdt.core.Compiler.option.warnStackSize.1147490000" name="Warn if stack size exceeds the limit (-Wstack-usage) (H')" superClass="com.renesas.cdt.core.Compiler.option.warnStackSize" value="100" valueType="string"/>
+								<option id="com.renesas.cdt.core.Compiler.option.CPUSeries.1824596418" name="CPU ã·ãªã¼ãº" superClass="com.renesas.cdt.core.Compiler.option.CPUSeries" value="RZ/A" valueType="string"/>
+								<option id="com.renesas.cdt.core.Compiler.option.device.961121392" name="Device" superClass="com.renesas.cdt.core.Compiler.option.device" value="R7S721001" valueType="string"/>
+								<option id="com.renesas.cdt.core.Compiler.option.deviceShortName.635132041" name="DeviceShortName" superClass="com.renesas.cdt.core.Compiler.option.deviceShortName" value="R7S721001" valueType="string"/>
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.rz.Debug.Compiler.option.macroDefines.57380421" name="ãã¯ã­å®ç¾©" superClass="com.renesas.cdt.rz.Debug.Compiler.option.macroDefines" valueType="definedSymbols">
+									<listOptionValue builtIn="false" value="SIMULATOR_DEBUG"/>
+									<listOptionValue builtIn="false" value="CPPAPP"/>
+								</option>
+								<inputType id="%Base.Compiler.C.InputType.Id.379655366" name="C å
+¥å" superClass="%Base.Compiler.C.InputType.Id"/>
+								<inputType id="Base.Compiler.CPP.InputType.Id.1101890027" name="C++ å
+¥å" superClass="Base.Compiler.CPP.InputType.Id"/>
+							</tool>
+							<tool id="com.renesas.cdt.rz.debug.win32.tool.assembler.Id.1166037999" name="Assembler" superClass="com.renesas.cdt.rz.debug.win32.tool.assembler.Id">
+								<option id="com.renesas.cdt.rz.Debug.Assembler.option.architecture.1178720663" name="ã¢ã¼ã­ãã¯ãã£ã¼" superClass="com.renesas.cdt.rz.Debug.Assembler.option.architecture" value="com.renesas.cdt.rz.Debug.Assembler.option.architecture.armv7a" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Assembler.option.cpuType.1700798679" name="CPU ã¿ã¤ã" superClass="com.renesas.cdt.rz.Debug.Assembler.option.cpuType" value="com.renesas.cdt.rz.Debug.Assembler.option.cpuType.rza" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Assembler.option.dataEndian.835685972" name="ã¨ã³ãã£ã¢ã³" superClass="com.renesas.cdt.rz.Debug.Assembler.option.dataEndian" value="com.renesas.cdt.rz.Debug.Assembler.option.dataEndian.little" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Assembler.option.instructionset.1591801771" name="å½ä»¤ã»ãã" superClass="com.renesas.cdt.rz.Debug.Assembler.option.instructionset" value="com.renesas.cdt.rz.Debug.Assembler.option.instructionset.arm" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Assembler.option.targetfpu.1672411105" name="ã¿ã¼ã²ãã FPU (-mfpu)" superClass="com.renesas.cdt.rz.Debug.Assembler.option.targetfpu" value="com.renesas.cdt.rz.Debug.Assembler.option.targetfpu.vfp" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Assembler.option.floatingpointabi.1400638226" name="æµ®åå°æ°ç¹ ABI (-mfloat-abi=name)" superClass="com.renesas.cdt.rz.Debug.Assembler.option.floatingpointabi" value="com.renesas.cdt.rz.Debug.Assembler.option.floatingpointabi.soft" valueType="enumerated"/>
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.core.Assembler.option.includeFileDirectories.1632699435" name="ã¤ã³ã¯ã«ã¼ãã»ãã¡ã¤ã«ã»ãã£ã¬ã¯ããªã¼" superClass="com.renesas.cdt.core.Assembler.option.includeFileDirectories" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/src&quot;"/>
+								</option>
+								<inputType id="%Base.Assembler.inputType.Id.1006307562" name="ã¢ã»ã³ãã©ã¼å
+¥åã¿ã¤ã" superClass="%Base.Assembler.inputType.Id"/>
+							</tool>
+							<tool id="com.renesas.cdt.rz.debug.win32.tool.linker.Id.497903742" name="Linker" superClass="com.renesas.cdt.rz.debug.win32.tool.linker.Id">
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.rz.Debug.Linker.option.archiveSearchDirectories.2062570669" name="ã¢ã¼ã«ã¤ãæ¤ç´¢ãã£ã¬ã¯ããªã¼" superClass="com.renesas.cdt.rz.Debug.Linker.option.archiveSearchDirectories" valueType="stringList">
+									<listOptionValue builtIn="false" value="&quot;${CONFIGDIR}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${TCINSTALL}/lib/gcc/arm-none-eabi/${GCC_VERSION}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${TCINSTALL}/arm-none-eabi/lib&quot;"/>
+								</option>
+								<option id="com.renesas.cdt.rz.Debug.Linker.option.dataEndian.718941051" name="ã¨ã³ãã£ã¢ã³" superClass="com.renesas.cdt.rz.Debug.Linker.option.dataEndian" value="com.renesas.cdt.rz.Debug.Linker.option.dataEndian.little" valueType="enumerated"/>
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.rz.Debug.Linker.option.archiveLibraryFiles.6194456" name="ã¢ã¼ã«ã¤ã ( ã©ã¤ãã©ãªã¼ ) ãã¡ã¤ã«" superClass="com.renesas.cdt.rz.Debug.Linker.option.archiveLibraryFiles" valueType="stringList">
+									<listOptionValue builtIn="false" value="${BuildArtifactFileBaseName}"/>
+									<listOptionValue builtIn="false" value="gcc"/>
+									<listOptionValue builtIn="false" value="stdc++"/>
+								</option>
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.core.Linker.option.userDefinedOptions.947383497" name="ã¦ã¼ã¶ã¼å®ç¾©ãªãã·ã§ã³" superClass="com.renesas.cdt.core.Linker.option.userDefinedOptions" valueType="stringList">
+									<listOptionValue builtIn="false" value="-e_PowerON_Reset"/>
+								</option>
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.core.Linker.option.linkOrderList.298210254" name="" superClass="com.renesas.cdt.core.Linker.option.linkOrderList" valueType="stringList">
+									<listOptionValue builtIn="false" value="&quot;.\src\hardware_setup.o&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;.\src\interrupt_handlers.o&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;.\src\mruby.o&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;.\src\reset_program.o&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;.\src\vector_table.o&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;.\libmruby.a&quot;"/>
+								</option>
+							</tool>
+							<tool id="com.renesas.cdt.rz.debug.win32.tool.objcopy.Id.1923834783" name="Objcopy" superClass="com.renesas.cdt.rz.debug.win32.tool.objcopy.Id"/>
+						</toolChain>
+					</folderInfo>
+					<sourceEntries>
+						<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+					</sourceEntries>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+	</storageModule>
+	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+		<project id="mruby.com.renesas.cdt.rz.projectType.win32.Id.3696189" name="Executable (Renesas)" projectType="com.renesas.cdt.rz.projectType.win32.Id"/>
+	</storageModule>
+	<storageModule moduleId="scannerConfiguration">
+		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+	</storageModule>
+	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+	<storageModule moduleId="refreshScope" versionNumber="2">
+		<configuration configurationName="Debug">
+			<resource resourceType="PROJECT" workspacePath="/mruby"/>
+		</configuration>
+	</storageModule>
+</cproject>
Index: EcnlProtoTool/trunk/mruby-1.2.0/.gitignore
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/.gitignore	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/.gitignore	(revision 270)
@@ -0,0 +1,25 @@
+# /
+*.bak
+*.d
+*.o
+/benchmark/**/*.dat
+/benchmark/*.pdf
+/benchmark/*.png
+*.orig
+*.pdb
+*.rej
+*.sav
+*.swp
+*.tmp
+*~
+.DS_Store
+.ccmalloc
+.svn
+/.git
+cscope.out
+/src/y.tab.c
+/bin
+/build
+/mruby-source-*.gem
+doc/api
+.yardoc
Index: EcnlProtoTool/trunk/mruby-1.2.0/.info
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/.info	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/.info	(revision 270)
@@ -0,0 +1,7 @@
+TOOL_CHAIN=KPIT GNUARM-NONE-EABI Toolchain
+VERSION=v16.01
+TC_INSTALL=C:\Program Files (x86)\KPIT\GNUARM-NONEv16.01-EABI\arm-none-eabi\arm-none-eabi\
+GCC_STRING=5.2-GNUARM-NONE_v16.01
+VERSION_IDE=
+E2STUDIO_VERSION=5.3.0.023
+ACTIVE_CONFIGURATION=Debug
Index: EcnlProtoTool/trunk/mruby-1.2.0/.project
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/.project	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/.project	(revision 270)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>mruby</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.renesas.cdt.core.genmakebuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.cdt.core.cnature</nature>
+		<nature>com.renesas.cdt.core.kpitccnature</nature>
+		<nature>com.renesas.cdt.core.kpitcnature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+	</natures>
+</projectDescription>
Index: EcnlProtoTool/trunk/mruby-1.2.0/.settings/org.eclipse.cdt.core.prefs
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/.settings/org.eclipse.cdt.core.prefs	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/.settings/org.eclipse.cdt.core.prefs	(revision 270)
@@ -0,0 +1,6 @@
+eclipse.preferences.version=1
+environment/project/com.renesas.cdt.rz.debug.win32.configuration.Id.1552447583/PATH/delimiter=;
+environment/project/com.renesas.cdt.rz.debug.win32.configuration.Id.1552447583/PATH/operation=replace
+environment/project/com.renesas.cdt.rz.debug.win32.configuration.Id.1552447583/PATH/value=C\:\\PROGRA~2\\KPIT\\GNUARM~2.01-\\ARM-NO~1\\ARM-NO~1\\bin;C\:/Renesas/e2_studio/Utilities;C\:/Renesas/e2_studio/eclipse//features/com.renesas.jre.win32.win32.x86_1.8.0.65/jre/bin/client;C\:/Renesas/e2_studio/eclipse//features/com.renesas.jre.win32.win32.x86_1.8.0.65/jre/bin;C\:/Renesas/e2_studio/eclipse//features/com.renesas.jre.win32.win32.x86_1.8.0.65/jre/lib/i386;C\:\\ProgramData\\Oracle\\Java\\javapath;C\:\\Program Files\\Common Files\\Microsoft Shared\\Microsoft Online Services;C\:\\Program Files (x86)\\Common Files\\Microsoft Shared\\Microsoft Online Services;C\:\\Program Files\\Common Files\\Microsoft Shared\\Windows Live;C\:\\Program Files (x86)\\Common Files\\Microsoft Shared\\Windows Live;C\:\\Program Files (x86)\\Intel\\iCLS Client\\;C\:\\Program Files\\Intel\\iCLS Client\\;C\:\\Windows\\system32;C\:\\Windows;C\:\\Windows\\System32\\Wbem;C\:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C\:\\Program Files (x86)\\Intel\\OpenCL SDK\\2.0\\bin\\x86;C\:\\Program Files (x86)\\Intel\\OpenCL SDK\\2.0\\bin\\x64;C\:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C\:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C\:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C\:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C\:\\Program Files\\Common Files\\Lenovo;C\:\\Program Files (x86)\\Windows Live\\Shared;C\:\\Program Files (x86)\\Symantec\\VIP Access Client\\;C\:\\SWTOOLS\\ReadyApps;C\:\\Program Files (x86)\\Common Files\\Lenovo;C\:\\Program Files (x86)\\Microsoft ASP.NET\\ASP.NET Web Pages\\v1.0\\;C\:\\Program Files\\Microsoft SQL Server\\110\\Tools\\Binn\\;C\:\\Program Files (x86)\\GitExtensions\\;C\:\\Program Files\\gs\\gs9.18\\bin;C\:\\Program Files\\gs\\gs9.18\\lib;C\:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C\:\\Program Files\\Microsoft SQL Server\\120\\Tools\\Binn\\;C\:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\;C\:\\Program Files (x86)\\Skype\\Phone\\;C\:\\Program Files\\Microsoft\\Web Platform Installer\\;C\:\\Program Files (x86)\\nodejs\\;C\:\\Program Files\\Git\\cmd;C\:\\Program Files\\dotnet\\;C\:\\Program Files\\TortoiseSVN\\bin;C\:\\Ruby23-x64\\bin;C\:\\Users\\nagasima\\.dnx\\bin;C\:\\Users\\nagasima\\AppData\\Roaming\\npm;C\:\\Renesas\\e2_studio\\eclipse;C\:\\MinGW\\bin;${workspace_loc}/tools/bin
+environment/project/com.renesas.cdt.rz.debug.win32.configuration.Id.1552447583/append=true
+environment/project/com.renesas.cdt.rz.debug.win32.configuration.Id.1552447583/appendContributed=true
Index: EcnlProtoTool/trunk/mruby-1.2.0/.travis.yml
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/.travis.yml	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/.travis.yml	(revision 270)
@@ -0,0 +1,26 @@
+language: c
+
+sudo: false
+
+matrix:
+  include:
+    - os: linux
+      sudo: 9000
+    - os: osx
+      osx_image: xcod6.4
+
+addons:
+  apt:
+    packages:
+      - gperf
+
+env: MRUBY_CONFIG=travis_config.rb
+script: "./minirake all test"
+
+notifications:
+  # Update mruby-head installed on Travis CI so other projects can test against it.
+  webhooks:
+    urls:
+      - "https://rubies.travis-ci.org/rebuild/mruby-head"
+    on_success: always
+    on_failure: never
Index: EcnlProtoTool/trunk/mruby-1.2.0/.yardopts
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/.yardopts	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/.yardopts	(revision 270)
@@ -0,0 +1,17 @@
+--markup markdown
+--plugin mruby
+--plugin coderay
+--output-dir doc/api
+
+src/**/*.c
+mrblib/**/*.rb
+include/**/*.h
+
+mrbgems/*/src/**/*.c
+mrbgems/*/mrblib/**/*.rb
+mrbgems/*/include/**/*.h
+-
+AUTHORS
+MITL
+CONTRIBUTING.md
+doc/guides/*.md
Index: EcnlProtoTool/trunk/mruby-1.2.0/AUTHORS
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/AUTHORS	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/AUTHORS	(revision 270)
@@ -0,0 +1,36 @@
+Original Authors "mruby developers" are:
+   Yukihiro Matsumoto
+   SCSK KYUSHU CORPORATION
+   Kyushu Institute of Technology
+   Network Applied Communication Laboratory, Inc.
+   Daniel Bovensiepen
+   Jon Maken
+   Bjorn De Meyer
+   Yuichiro MASUI
+   Masamitsu MURASE
+   Masaki Muranaka
+   Internet Initiative Japan Inc.
+   Tadashi FUKUZAWA
+   MATSUMOTO Ryosuke
+   Yasuhiro Matsumoto
+   Koji Yoshioka
+   Jun Hiroe
+   Narihiro Nakamura
+   Yuichi Nishiwaki
+   Tatsuhiko Kubo
+   Takeshi Watanabe
+   Yuki Kurihara
+   specified non-profit corporation mruby Forum
+   Kazuaki Tanaka
+   Hiromasa Ishii
+   Hiroshi Mimaki
+   Satoshi Odawara
+   Mitsubishi Electric Micro-Computer Application Software Co.,Ltd.
+   Ralph Desir(Mav7)
+   Hiroyuki Matsuzaki
+   Yuhei Okazaki
+   Manycolors, Inc.
+   Shota Nakano
+   Yuichi Osawa
+   Terence Lee
+   Zachary Scott
Index: EcnlProtoTool/trunk/mruby-1.2.0/CONTRIBUTING.md
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/CONTRIBUTING.md	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/CONTRIBUTING.md	(revision 270)
@@ -0,0 +1,68 @@
+# How to contribute
+
+mruby is an open-source project which is looking forward to each contribution.
+
+## Your Pull Request
+
+To make it easy to review and understand your change please keep the following
+things in mind before submitting your pull request:
+
+* Work on the latest possible state of **mruby/master**
+* Create a branch which is dedicated to your change
+* Test your changes before creating a pull request (```./minirake test```)
+* If possible write a test case which confirms your change
+* Don't mix several features or bug-fixes in one pull request
+* Create a meaningful commit message
+* Explain your change (i.e. with a link to the issue you are fixing)
+* Use mrbgem to provide non ISO features (classes, modules and methods) unless
+  you have a special reason to implement them in the core
+
+## Coding conventions
+
+How to style your C and Ruby code which you want to submit.
+
+### C code
+
+The core part (parser, bytecode-interpreter, core-lib, etc.) of mruby is
+written in the C programming language. Please note the following hints for your
+C code:
+
+#### Comply with C99 (ISO/IEC 9899:1999)
+
+mruby should be highly portable to other systems and compilers. For this it is
+recommended to keep your code as close as possible to the C99 standard
+(http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf).
+
+Although we target C99, Visual C++ is also an important target for mruby. For
+this reason a declaration of a local variable has to be at the beginning of a
+scope block.
+
+#### Reduce library dependencies to a minimum
+
+The dependencies to libraries should be kept to an absolute minimum. This
+increases the portability but makes it also easier to cut away parts of mruby
+on-demand.
+
+#### Don't use C++ style comments
+
+    /* This is the preferred comment style */
+
+Use C++ style comments only for temporary comment e.g. commenting out some code lines.
+
+#### Insert a break after the method return value:
+
+    int
+    main(void)
+    {
+      ...
+    }
+
+### Ruby code
+
+Parts of the standard library of mruby are written in the Ruby programming
+language itself. Please note the following hints for your Ruby code:
+
+#### Comply with the Ruby standard (ISO/IEC 30170:2012)
+
+mruby is currently targeting to execute Ruby code which complies to ISO/IEC
+30170:2012 (http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579).
Index: EcnlProtoTool/trunk/mruby-1.2.0/ChangeLog
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/ChangeLog	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/ChangeLog	(revision 270)
@@ -0,0 +1,15 @@
+Thu Apl 19 17:25:18 2012  Yukihiro Matsumoto  <matz@ruby-lang.org>
+
+	* first release version 1.0.0 released.
+
+Local variables:
+add-log-time-format: (lambda ()
+  (let* ((time (current-time))
+	 (system-time-locale "C")
+	 (diff (+ (cadr time) 32400))
+	 (lo (% diff 65536))
+	 (hi (+ (car time) (/ diff 65536))))
+  (format-time-string "%a %b %e %H:%M:%S %Y" (list hi lo) t)))
+indent-tabs-mode: t
+tab-width: 8
+end:
Index: EcnlProtoTool/trunk/mruby-1.2.0/LEGAL
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/LEGAL	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/LEGAL	(revision 270)
@@ -0,0 +1,6 @@
+LEGAL NOTICE INFORMATION
+------------------------
+
+All the files in this distribution are covered under the MIT license
+(see the file MITL) except some files mentioned below:
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/MITL
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/MITL	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/MITL	(revision 270)
@@ -0,0 +1,20 @@
+Copyright (c) 2015 mruby developers
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/Makefile
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/Makefile	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/Makefile	(revision 270)
@@ -0,0 +1,17 @@
+# mruby is using Rake (http://rake.rubyforge.org) as a build tool.
+# We provide a minimalistic version called minirake inside of our
+# codebase.
+
+RAKE = ruby ./minirake
+
+all :
+	$(RAKE)
+.PHONY : all
+
+test : all
+	$(RAKE) test
+.PHONY : test
+
+clean :
+	$(RAKE) clean
+.PHONY : clean
Index: EcnlProtoTool/trunk/mruby-1.2.0/NEWS
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/NEWS	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/NEWS	(revision 270)
@@ -0,0 +1,13 @@
+* NEWS
+
+This document is a list of user visible feature changes made between
+releases except for bug fixes.
+
+Note that each entry is kept so brief that no reason behind or
+reference information is supplied with.  For a full list of changes
+with all sufficient information, see the ChangeLog file.
+
+
+** Information about first release v1.0.0
+
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/README.md
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/README.md	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/README.md	(revision 270)
@@ -0,0 +1,90 @@
+[![Build Status][build-status-img]][travis-ci]
+
+## What is mruby
+
+mruby is the lightweight implementation of the Ruby language complying to (part
+of) the [ISO standard][ISO-standard]. Its syntax is Ruby 1.9 compatible.
+
+mruby can be linked and embedded within your application.  We provide the
+interpreter program "mruby" and the interactive mruby shell "mirb" as examples.
+You can also compile Ruby programs into compiled byte code using the mruby
+compiler "mrbc".  All those tools reside in the "bin" directory.  "mrbc" is
+also able to generate compiled byte code in a C source file, see the "mrbtest"
+program under the "test" directory for an example.
+
+This achievement was sponsored by the Regional Innovation Creation R&D Programs
+of the Ministry of Economy, Trade and Industry of Japan.
+
+## How to get mruby
+
+The stable version 1.2.0 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/1.2.0.zip](https://github.com/mruby/mruby/archive/1.2.0.zip)
+
+The latest development version of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/zipball/master](https://github.com/mruby/mruby/zipball/master)
+
+The trunk of the mruby source tree can be checked out with the
+following command:
+
+    $ git clone https://github.com/mruby/mruby.git
+
+## mruby home-page
+
+The URL of the mruby home-page is: [http://www.mruby.org](http://www.mruby.org).
+
+## Mailing list
+
+We don't have mailing list, but you can use [GitHub issues](https://github.com/mruby/mruby).
+
+## How to compile and install (mruby and gems)
+
+See the [doc/guides/compile.md](doc/guides/compile.md) file.
+
+## Running Tests
+
+To run the tests, execute the following from the project's root directory.
+
+    $ make test
+
+Or
+
+    $ ruby ./minirake test
+
+## How to customize mruby (mrbgems)
+
+mruby contains a package manager called *mrbgems*. To create extensions
+in C and/or Ruby you should create a *GEM*. For a documentation of how to
+use mrbgems consult the file [doc/mrbgems/README.md](doc/mrbgems/README.md). For example code of
+how to use mrbgems look into the folder *examples/mrbgems/*.
+
+## License
+
+mruby is released under the [MIT License](MITL).
+
+## Note for License
+
+mruby has chosen a MIT License due to its permissive license allowing
+developers to target various environments such as embedded systems.
+However, the license requires the display of the copyright notice and license
+information in manuals for instance. Doing so for big projects can be
+complicated or troublesome.  This is why mruby has decided to display "mruby
+developers" as the copyright name to make it simple conventionally.
+In the future, mruby might ask you to distribute your new code
+(that you will commit,) under the MIT License as a member of
+"mruby developers" but contributors will keep their copyright.
+(We did not intend for contributors to transfer or waive their copyrights,
+Actual copyright holder name (contributors) will be listed in the AUTHORS
+file.)
+
+Please ask us if you want to distribute your code under another license.
+
+## How to Contribute
+
+See the [contribution guidelines][contribution-guidelines], and then send a pull
+request to <http://github.com/mruby/mruby>.  We consider you have granted
+non-exclusive right to your contributed code under MIT license.  If you want to
+be named as one of mruby developers, please include an update to the AUTHORS
+file in your pull request.
+
+[ISO-standard]: http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579
+[build-status-img]: https://travis-ci.org/mruby/mruby.svg?branch=master
+[contribution-guidelines]: CONTRIBUTING.md
+[travis-ci]: https://travis-ci.org/mruby/mruby
Index: EcnlProtoTool/trunk/mruby-1.2.0/Rakefile
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/Rakefile	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/Rakefile	(revision 270)
@@ -0,0 +1,148 @@
+# encoding: utf-8
+# Build description.
+# basic build file for mruby
+MRUBY_ROOT = File.dirname(File.expand_path(__FILE__))
+MRUBY_BUILD_HOST_IS_CYGWIN = RUBY_PLATFORM.include?('cygwin')
+MRUBY_BUILD_HOST_IS_OPENBSD = RUBY_PLATFORM.include?('openbsd')
+
+# load build systems
+load "#{MRUBY_ROOT}/tasks/ruby_ext.rake"
+load "#{MRUBY_ROOT}/tasks/mruby_build.rake"
+load "#{MRUBY_ROOT}/tasks/mrbgem_spec.rake"
+
+# load configuration file
+MRUBY_CONFIG = (ENV['MRUBY_CONFIG'] && ENV['MRUBY_CONFIG'] != '') ? ENV['MRUBY_CONFIG'] : "#{MRUBY_ROOT}/build_config.rb"
+load MRUBY_CONFIG
+
+# load basic rules
+MRuby.each_target do |build|
+  build.define_rules
+end
+
+# load custom rules
+load "#{MRUBY_ROOT}/src/mruby_core.rake"
+load "#{MRUBY_ROOT}/mrblib/mrblib.rake"
+
+load "#{MRUBY_ROOT}/tasks/mrbgems.rake"
+load "#{MRUBY_ROOT}/tasks/libmruby.rake"
+
+load "#{MRUBY_ROOT}/tasks/benchmark.rake"
+
+##############################
+# generic build targets, rules
+task :default => :all
+
+bin_path = ENV['INSTALL_DIR'] || "#{MRUBY_ROOT}/bin"
+FileUtils.mkdir_p bin_path, { :verbose => $verbose }
+
+depfiles = MRuby.targets['host'].bins.map do |bin|
+  install_path = MRuby.targets['host'].exefile("#{bin_path}/#{bin}")
+  source_path = MRuby.targets['host'].exefile("#{MRuby.targets['host'].build_dir}/bin/#{bin}")
+
+  file install_path => source_path do |t|
+    FileUtils.rm_f t.name, { :verbose => $verbose }
+    FileUtils.cp t.prerequisites.first, t.name, { :verbose => $verbose }
+  end
+
+  install_path
+end
+
+MRuby.each_target do |target|
+  gems.map do |gem|
+    current_dir = gem.dir.relative_path_from(Dir.pwd)
+    relative_from_root = gem.dir.relative_path_from(MRUBY_ROOT)
+    current_build_dir = File.expand_path "#{build_dir}/#{relative_from_root}"
+
+    if current_build_dir !~ /^#{build_dir}/
+      current_build_dir = "#{build_dir}/mrbgems/#{gem.name}"
+    end
+
+    gem.bins.each do |bin|
+      exec = exefile("#{build_dir}/bin/#{bin}")
+      objs = Dir.glob("#{current_dir}/tools/#{bin}/*.{c,cpp,cxx,cc}").map { |f| objfile(f.pathmap("#{current_build_dir}/tools/#{bin}/%n")) }
+
+      file exec => objs + [libfile("#{build_dir}/lib/libmruby")] do |t|
+        gem_flags = gems.map { |g| g.linker.flags }
+        gem_flags_before_libraries = gems.map { |g| g.linker.flags_before_libraries }
+        gem_flags_after_libraries = gems.map { |g| g.linker.flags_after_libraries }
+        gem_libraries = gems.map { |g| g.linker.libraries }
+        gem_library_paths = gems.map { |g| g.linker.library_paths }
+        linker.run t.name, t.prerequisites, gem_libraries, gem_library_paths, gem_flags, gem_flags_before_libraries, gem_flags_after_libraries
+      end
+
+      if target == MRuby.targets['host']
+        install_path = MRuby.targets['host'].exefile("#{bin_path}/#{bin}")
+
+        file install_path => exec do |t|
+          FileUtils.rm_f t.name, { :verbose => $verbose }
+          FileUtils.cp t.prerequisites.first, t.name, { :verbose => $verbose }
+        end
+        depfiles += [ install_path ]
+      elsif target == MRuby.targets['host-debug']
+        unless MRuby.targets['host'].gems.map {|g| g.bins}.include?([bin])
+          install_path = MRuby.targets['host-debug'].exefile("#{bin_path}/#{bin}")
+
+          file install_path => exec do |t|
+            FileUtils.rm_f t.name, { :verbose => $verbose }
+            FileUtils.cp t.prerequisites.first, t.name, { :verbose => $verbose }
+          end
+          depfiles += [ install_path ]
+        end
+      else
+        depfiles += [ exec ]
+      end
+    end
+  end
+end
+
+depfiles += MRuby.targets.map { |n, t|
+  [t.libfile("#{t.build_dir}/lib/libmruby")]
+}.flatten
+
+depfiles += MRuby.targets.reject { |n, t| n == 'host' }.map { |n, t|
+  t.bins.map { |bin| t.exefile("#{t.build_dir}/bin/#{bin}") }
+}.flatten
+
+desc "build all targets, install (locally) in-repo"
+task :all => depfiles do
+  puts
+  puts "Build summary:"
+  puts
+  MRuby.each_target do
+    print_build_summary
+  end
+end
+
+desc "run all mruby tests"
+task :test => ["all"] do
+  MRuby.each_target do
+    run_test if test_enabled?
+  end
+end
+
+desc "clean all built and in-repo installed artifacts"
+task :clean do
+  MRuby.each_target do |t|
+    FileUtils.rm_rf t.build_dir, { :verbose => $verbose }
+  end
+  FileUtils.rm_f depfiles, { :verbose => $verbose }
+  puts "Cleaned up target build folder"
+end
+
+desc "clean everything!"
+task :deep_clean => ["clean"] do
+  MRuby.each_target do |t|
+    FileUtils.rm_rf t.gem_clone_dir, { :verbose => $verbose }
+  end
+  puts "Cleaned up mrbgems build folder"
+end
+
+desc 'generate document'
+task :doc do
+  begin
+    sh "mrbdoc"
+  rescue
+    puts "ERROR: To generate documents, you should install yard-mruby gem."
+    puts "  $ gem install yard-mruby"
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/TODO
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/TODO	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/TODO	(revision 270)
@@ -0,0 +1,10 @@
+Things to do (Things that are not done yet)
+
+* special variables ($1,$2..)
+* super in aliased methods
+* multi-assignment decomposing
+* keyword arguments in def statement
+
+Things to improve (Done but things to fix)
+
+* Make additions as they are noticed.
Index: EcnlProtoTool/trunk/mruby-1.2.0/build_config.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/build_config.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/build_config.rb	(revision 270)
@@ -0,0 +1,188 @@
+MRuby::Build.new do |conf|
+  # load specific toolchain settings
+
+  # Gets set by the VS command prompts.
+  if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
+    toolchain :visualcpp
+  else
+    toolchain :gcc
+  end
+
+  enable_debug
+
+  # Use mrbgems
+  # conf.gem 'examples/mrbgems/ruby_extension_example'
+  # conf.gem 'examples/mrbgems/c_extension_example' do |g|
+  #   g.cc.flags << '-g' # append cflags in this gem
+  # end
+  # conf.gem 'examples/mrbgems/c_and_ruby_extension_example'
+  # conf.gem :github => 'masuidrive/mrbgems-example', :checksum_hash => '76518e8aecd131d047378448ac8055fa29d974a9'
+  # conf.gem :git => 'git@github.com:masuidrive/mrbgems-example.git', :branch => 'master', :options => '-v'
+
+  # include the default GEMs
+  conf.gembox 'default'
+  # C compiler settings
+  # conf.cc do |cc|
+  #   cc.command = ENV['CC'] || 'gcc'
+  #   cc.flags = [ENV['CFLAGS'] || %w()]
+  #   cc.include_paths = ["#{root}/include"]
+  #   cc.defines = %w(DISABLE_GEMS)
+  #   cc.option_include_path = '-I%s'
+  #   cc.option_define = '-D%s'
+  #   cc.compile_options = "%{flags} -MMD -o %{outfile} -c %{infile}"
+  # end
+
+  # mrbc settings
+  # conf.mrbc do |mrbc|
+  #   mrbc.compile_options = "-g -B%{funcname} -o-" # The -g option is required for line numbers
+  # end
+
+  # Linker settings
+  # conf.linker do |linker|
+  #   linker.command = ENV['LD'] || 'gcc'
+  #   linker.flags = [ENV['LDFLAGS'] || []]
+  #   linker.flags_before_libraries = []
+  #   linker.libraries = %w()
+  #   linker.flags_after_libraries = []
+  #   linker.library_paths = []
+  #   linker.option_library = '-l%s'
+  #   linker.option_library_path = '-L%s'
+  #   linker.link_options = "%{flags} -o %{outfile} %{objs} %{libs}"
+  # end
+
+  # Archiver settings
+  # conf.archiver do |archiver|
+  #   archiver.command = ENV['AR'] || 'ar'
+  #   archiver.archive_options = 'rs %{outfile} %{objs}'
+  # end
+
+  # Parser generator settings
+  # conf.yacc do |yacc|
+  #   yacc.command = ENV['YACC'] || 'bison'
+  #   yacc.compile_options = '-o %{outfile} %{infile}'
+  # end
+
+  # gperf settings
+  # conf.gperf do |gperf|
+  #   gperf.command = 'gperf'
+  #   gperf.compile_options = '-L ANSI-C -C -p -j1 -i 1 -g -o -t -N mrb_reserved_word -k"1,3,$" %{infile} > %{outfile}'
+  # end
+
+  # file extensions
+  # conf.exts do |exts|
+  #   exts.object = '.o'
+  #   exts.executable = '' # '.exe' if Windows
+  #   exts.library = '.a'
+  # end
+
+  # file separetor
+  # conf.file_separator = '/'
+
+  # bintest
+  # conf.enable_bintest
+end
+
+MRuby::Build.new('host-debug') do |conf|
+  # load specific toolchain settings
+
+  # Gets set by the VS command prompts.
+  if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
+    toolchain :visualcpp
+  else
+    toolchain :gcc
+  end
+
+  enable_debug
+
+  # include the default GEMs
+  conf.gembox 'default'
+
+  # C compiler settings
+  conf.cc.defines = %w(MRB_ENABLE_DEBUG_HOOK)
+
+  # Generate mruby debugger command (require mruby-eval)
+  conf.gem :core => "mruby-bin-debugger"
+
+  # bintest
+  # conf.enable_bintest
+end
+
+#MRuby::Build.new('test') do |conf|
+#  # Gets set by the VS command prompts.
+#  if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
+#    toolchain :visualcpp
+#  else
+#    toolchain :gcc
+#  end
+#
+#  enable_debug
+#  conf.enable_bintest
+#  conf.enable_test
+#
+#  conf.gembox 'default'
+#end
+
+# Define cross build settings
+# MRuby::CrossBuild.new('32bit') do |conf|
+#   toolchain :gcc
+#
+#   conf.cc.flags << "-m32"
+#   conf.linker.flags << "-m32"
+#
+#   conf.build_mrbtest_lib_only
+#
+#   conf.gem 'examples/mrbgems/c_and_ruby_extension_example'
+#
+#   conf.test_runner.command = 'env'
+#
+# end
+
+# Define cross build settings
+MRuby::CrossBuild.new('arm-none-eabi') do |conf|
+  toolchain :gcc
+
+  conf.cc.command = "arm-none-eabi-gcc"
+  conf.cxx.command = "arm-none-eabi-g++"
+  conf.linker.command = "arm-none-eabi-gcc"
+  conf.archiver.command = "arm-none-eabi-ar"
+
+  conf.cc.flags << %w(-MD -MP -mlittle-endian -mcpu=cortex-a9 -mthumb -mthumb-interwork -marm -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard -mno-unaligned-access -fno-strict-aliasing)
+
+  #configuration for low memory environment
+  conf.cc.defines << %w(MRB_GC_STRESS)
+  #conf.cc.defines << %w(DISABLE_STDIO)
+
+  conf.build_mrbtest_lib_only
+
+  conf.gem "#{root}/mrbgems/mruby-numeric-ext"
+  conf.gem "#{root}/mrbgems/mruby-string-ext"
+  conf.gem "#{root}/../mrbgems/mruby-blockly"
+  conf.gem "#{root}/../mrbgems/gr_peach" do |g|
+    g.cc.include_paths << "#{g.dir}/../../asp3_dcre/mbed/api"
+    g.cc.include_paths << "#{g.dir}/../../asp3_dcre/mbed/hal"
+    g.cc.include_paths << "#{g.dir}/../../asp3_dcre/mbed/targets/cmsis"
+    g.cc.include_paths << "#{g.dir}/../../asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H"
+    g.cc.include_paths << "#{g.dir}/../../asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc"
+    g.cc.include_paths << "#{g.dir}/../../asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines"
+    g.cc.include_paths << "#{g.dir}/../../asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H"
+    g.cc.include_paths << "#{g.dir}/../../asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/TARGET_MBED_MBRZA1H"
+  end
+  conf.gem "#{root}/../mrbgems/mruby-arduino" do |g|
+    g.cc.include_paths << "#{g.dir}/../../asp3_dcre/mbed/api"
+    g.cc.include_paths << "#{g.dir}/../../asp3_dcre/mbed/hal"
+    g.cc.include_paths << "#{g.dir}/../../asp3_dcre/mbed/targets/cmsis"
+    g.cc.include_paths << "#{g.dir}/../../asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H"
+    g.cc.include_paths << "#{g.dir}/../../asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc"
+    g.cc.include_paths << "#{g.dir}/../../asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines"
+    g.cc.include_paths << "#{g.dir}/../../asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H"
+    g.cc.include_paths << "#{g.dir}/../../asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/TARGET_MBED_MBRZA1H"
+    g.cc.include_paths << "#{g.dir}/../../mrbgems/gr_peach/src"
+  end
+  conf.gem "#{root}/../mrbgems/mruby-ecnl"
+  conf.gem "#{root}/../mrbgems/mruby-others"
+
+  conf.bins = []
+
+  # conf.test_runner.command = 'env'
+end
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mrbconf.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mrbconf.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mrbconf.h	(revision 270)
@@ -0,0 +1,116 @@
+/*
+** mrbconf.h - mruby core configuration
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBYCONF_H
+#define MRUBYCONF_H
+
+/* configuration options: */
+/* add -DMRB_USE_FLOAT to use float instead of double for floating point numbers */
+//#define MRB_USE_FLOAT
+#define MRB_USE_FLOAT
+
+/* add -DMRB_INT16 to use 16bit integer for mrb_int; conflict with MRB_INT64 */
+//#define MRB_INT16
+
+/* add -DMRB_INT64 to use 64bit integer for mrb_int; conflict with MRB_INT16 */
+//#define MRB_INT64
+
+/* represent mrb_value in boxed double; conflict with MRB_USE_FLOAT */
+//#define MRB_NAN_BOXING
+
+/* define on big endian machines; used by MRB_NAN_BOXING */
+//#define MRB_ENDIAN_BIG
+
+/* represent mrb_value as a word (natural unit of data for the processor) */
+//#define MRB_WORD_BOXING
+
+/* string class to handle UTF-8 encoding */
+#define MRB_UTF8_STRING
+
+/* argv max size in mrb_funcall */
+//#define MRB_FUNCALL_ARGC_MAX 16
+#define MRB_FUNCALL_ARGC_MAX 8
+
+/* number of object per heap page */
+//#define MRB_HEAP_PAGE_SIZE 1024
+#define MRB_HEAP_PAGE_SIZE 64
+
+/* use segmented list for IV table */
+//#define MRB_USE_IV_SEGLIST
+#define MRB_USE_IV_SEGLIST
+
+/* initial size for IV khash; ignored when MRB_USE_IV_SEGLIST is set */
+//#define MRB_IVHASH_INIT_SIZE 8
+
+/* if _etext and _edata available, mruby can reduce memory used by symbols */
+//#define MRB_USE_ETEXT_EDATA
+
+/* do not use __init_array_start to determine readonly data section;
+   effective only when MRB_USE_ETEXT_EDATA is defined */
+//#define MRB_NO_INIT_ARRAY_START
+
+/* turn off generational GC by default */
+//#define MRB_GC_TURN_OFF_GENERATIONAL
+
+/* default size of khash table bucket */
+//#define KHASH_DEFAULT_SIZE 32
+#define KHASH_DEFAULT_SIZE 8
+
+/* allocated memory address alignment */
+//#define POOL_ALIGNMENT 4
+
+/* page size of memory pool */
+//#define POOL_PAGE_SIZE 16000
+#define POOL_PAGE_SIZE 4096
+
+/* initial minimum size for string buffer */
+//#define MRB_STR_BUF_MIN_SIZE 128
+#define MRB_STR_BUF_MIN_SIZE 20
+
+/* arena size */
+//#define MRB_GC_ARENA_SIZE 100
+
+/* fixed size GC arena */
+//#define MRB_GC_FIXED_ARENA
+#define MRB_GC_FIXED_ARENA
+
+/* state atexit stack size */
+//#define MRB_FIXED_STATE_ATEXIT_STACK_SIZE 5
+
+/* fixed size state atexit stack */
+//#define MRB_FIXED_STATE_ATEXIT_STACK
+
+/* -DMRB_DISABLE_XXXX to drop following features */
+//#define MRB_DISABLE_STDIO	/* use of stdio */
+
+/* -DMRB_ENABLE_XXXX to enable following features */
+//#define MRB_ENABLE_DEBUG_HOOK	/* hooks for debugger */
+
+/* end of configuration */
+
+/* define MRB_DISABLE_XXXX from DISABLE_XXX (for compatibility) */
+#ifdef DISABLE_STDIO
+#define MRB_DISABLE_STDIO
+#endif
+
+/* define MRB_ENABLE_XXXX from ENABLE_XXX (for compatibility) */
+#ifdef ENABLE_DEBUG
+#define MRB_ENABLE_DEBUG_HOOK
+#endif
+
+#ifndef MRB_DISABLE_STDIO
+# include <stdio.h>
+#endif
+
+#ifndef FALSE
+# define FALSE 0
+#endif
+
+#ifndef TRUE
+# define TRUE 1
+#endif
+
+#endif  /* MRUBYCONF_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby.h	(revision 270)
@@ -0,0 +1,1071 @@
+/*
+** mruby - An embeddable Ruby implementation
+**
+** Copyright (c) mruby developers 2010-2015
+**
+** Permission is hereby granted, free of charge, to any person obtaining
+** a copy of this software and associated documentation files (the
+** "Software"), to deal in the Software without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Software, and to
+** permit persons to whom the Software is furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be
+** included in all copies or substantial portions of the Software.
+**
+** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+**
+** [ MIT license: http://www.opensource.org/licenses/mit-license.php ]
+*/
+
+#ifndef MRUBY_H
+#define MRUBY_H
+
+#include <stdint.h>
+#include <stddef.h>
+#include <limits.h>
+
+#include "mrbconf.h"
+#include "mruby/common.h"
+#include "mruby/value.h"
+#include "mruby/gc.h"
+#include "mruby/version.h"
+
+/**
+ * MRuby C API entry point
+ */
+MRB_BEGIN_DECL
+
+typedef uint32_t mrb_code;
+
+/**
+ * Required arguments signature type.
+ */
+typedef uint32_t mrb_aspec;
+
+
+struct mrb_irep;
+struct mrb_state;
+
+/**
+ * Function pointer type of custom allocator used in @see mrb_open_allocf.
+ *
+ * The function pointing it must behave similarly as realloc except:
+ * - If ptr is NULL it must allocate new space.
+ * - If s is NULL, ptr must be freed.
+ *
+ * See @see mrb_default_allocf for the default implementation.
+ */
+typedef void* (*mrb_allocf) (struct mrb_state *mrb, void*, size_t, void *ud);
+
+#ifndef MRB_FIXED_STATE_ATEXIT_STACK_SIZE
+#define MRB_FIXED_STATE_ATEXIT_STACK_SIZE 5
+#endif
+
+typedef struct {
+  mrb_sym mid;
+  struct RProc *proc;
+  mrb_value *stackent;
+  int nregs;
+  int ridx;
+  int eidx;
+  struct REnv *env;
+  mrb_code *pc;                 /* return address */
+  mrb_code *err;                /* error position */
+  int argc;
+  int acc;
+  struct RClass *target_class;
+} mrb_callinfo;
+
+enum mrb_fiber_state {
+  MRB_FIBER_CREATED = 0,
+  MRB_FIBER_RUNNING,
+  MRB_FIBER_RESUMING,
+  MRB_FIBER_SUSPENDED,
+  MRB_FIBER_TRANSFERRED,
+  MRB_FIBER_TERMINATED,
+};
+
+struct mrb_context {
+  struct mrb_context *prev;
+
+  mrb_value *stack;                       /* stack of virtual machine */
+  mrb_value *stbase, *stend;
+
+  mrb_callinfo *ci;
+  mrb_callinfo *cibase, *ciend;
+
+  mrb_code **rescue;                      /* exception handler stack */
+  int rsize;
+  struct RProc **ensure;                  /* ensure handler stack */
+  int esize;
+
+  enum mrb_fiber_state status;
+  struct RFiber *fib;
+};
+
+struct mrb_jmpbuf;
+
+typedef void (*mrb_atexit_func)(struct mrb_state*);
+
+typedef struct mrb_state {
+  struct mrb_jmpbuf *jmp;
+
+  mrb_allocf allocf;                      /* memory allocation function */
+  void *allocf_ud;                        /* auxiliary data of allocf */
+
+  struct mrb_context *c;
+  struct mrb_context *root_c;
+
+  struct RObject *exc;                    /* exception */
+  struct iv_tbl *globals;                 /* global variable table */
+
+  struct RObject *top_self;
+  struct RClass *object_class;            /* Object class */
+  struct RClass *class_class;
+  struct RClass *module_class;
+  struct RClass *proc_class;
+  struct RClass *string_class;
+  struct RClass *array_class;
+  struct RClass *hash_class;
+
+  struct RClass *float_class;
+  struct RClass *fixnum_class;
+  struct RClass *true_class;
+  struct RClass *false_class;
+  struct RClass *nil_class;
+  struct RClass *symbol_class;
+  struct RClass *kernel_module;
+
+  struct alloca_header *mems;
+  mrb_gc gc;
+
+  mrb_sym symidx;
+  struct kh_n2s *name2sym;      /* symbol hash */
+  struct symbol_name *symtbl;   /* symbol table */
+  size_t symcapa;
+
+#ifdef MRB_ENABLE_DEBUG_HOOK
+  void (*code_fetch_hook)(struct mrb_state* mrb, struct mrb_irep *irep, mrb_code *pc, mrb_value *regs);
+  void (*debug_op_hook)(struct mrb_state* mrb, struct mrb_irep *irep, mrb_code *pc, mrb_value *regs);
+#endif
+
+  struct RClass *eException_class;
+  struct RClass *eStandardError_class;
+  struct RObject *nomem_err;              /* pre-allocated NoMemoryError */
+
+  void *ud; /* auxiliary data */
+
+#ifdef MRB_FIXED_STATE_ATEXIT_STACK
+  mrb_atexit_func atexit_stack[MRB_FIXED_STATE_ATEXIT_STACK_SIZE];
+#else
+  mrb_atexit_func *atexit_stack;
+#endif
+  mrb_int atexit_stack_len;
+} mrb_state;
+
+
+typedef mrb_value (*mrb_func_t)(mrb_state *mrb, mrb_value);
+
+/**
+ * Defines a new class.
+ *
+ * If you're creating a gem it may look something like this:
+ *
+ *      !!!c
+ *      void mrb_example_gem_init(mrb_state* mrb) {
+ *              struct RClass *example_class;
+ *              example_class = mrb_define_class(mrb, "Example_Class", mrb->object_class);
+ *      }
+ *
+ *      void mrb_example_gem_final(mrb_state* mrb) {
+ *              //free(TheAnimals);
+ *      }
+ *
+ * @param [mrb_state *] mrb The current mruby state.
+ * @param [const char *] name The name of the defined class.
+ * @param [struct RClass *] super The new class parent.
+ * @return [struct RClass *] Reference to the newly defined class.
+ * @see mrb_define_class_under
+ */
+MRB_API struct RClass *mrb_define_class(mrb_state *mrb, const char *name, struct RClass *super);
+
+/**
+ * Defines a new module.
+ * @param [mrb_state *] mrb_state* The current mruby state.
+ * @param [const char *] char* The name of the module.
+ * @return [struct RClass *] Reference to the newly defined module.
+ */
+MRB_API struct RClass *mrb_define_module(mrb_state *, const char*);
+MRB_API mrb_value mrb_singleton_class(mrb_state*, mrb_value);
+
+/**
+ * Include a module in another class or module.
+ * Equivalent to: 
+ *
+ *   module B                                                                                                         
+ *     include A                                                                                                      
+ *   end 
+ * @param [mrb_state *] mrb_state* The current mruby state.
+ * @param [struct RClass *] RClass* A reference to module or a class.
+ * @param [struct RClass *] RClass* A reference to the module to be included.
+ */
+MRB_API void mrb_include_module(mrb_state*, struct RClass*, struct RClass*);
+
+/**
+ * Prepends a module in another class or module.
+ *
+ * Equivalent to:
+ *  module B
+ *    prepend A
+ *  end
+ * @param [mrb_state *] mrb_state* The current mruby state.
+ * @param [struct RClass *] RClass* A reference to module or a class.
+ * @param [struct RClass *] RClass* A reference to the module to be prepended.
+ */ 
+MRB_API void mrb_prepend_module(mrb_state*, struct RClass*, struct RClass*);
+
+/**
+ * Defines a global function in ruby.
+ *
+ * If you're creating a gem it may look something like this
+ *
+ * Example:
+ *
+ *     !!!c
+ *     mrb_value example_method(mrb_state* mrb, mrb_value self)
+ *     {
+ *          puts("Executing example command!");
+ *          return self;
+ *     }
+ *
+ *     void mrb_example_gem_init(mrb_state* mrb)
+ *     {
+ *           mrb_define_method(mrb, mrb->kernel_module, "example_method", example_method, MRB_ARGS_NONE());
+ *     }
+ *
+ * @param [mrb_state *] mrb The MRuby state reference.
+ * @param [struct RClass *] cla The class pointer where the method will be defined.
+ * @param [const char *] name The name of the method being defined.
+ * @param [mrb_func_t] func The function pointer to the method definition.
+ * @param [mrb_aspec] aspec The method parameters declaration.
+ */
+MRB_API void mrb_define_method(mrb_state *mrb, struct RClass *cla, const char *name, mrb_func_t func, mrb_aspec aspec);
+
+/**
+ * Defines a class method.
+ *
+ * Example:
+ *   # Ruby style
+ *   class Foo
+ *
+ *     def Foo.bar
+ *     end
+ *
+ *   end
+ *   // C style
+ *   mrb_value bar_method(mrb_state* mrb, mrb_value self){
+ *
+ *     return mrb_nil_value();
+ *
+ *   }
+ *   void mrb_example_gem_init(mrb_state* mrb){
+ *
+ *     struct RClass *foo;
+ *
+ *     foo = mrb_define_class(mrb, "Foo", mrb->object_class);
+ *
+ *     mrb_define_class_method(mrb, foo, "bar", bar_method, MRB_ARGS_NONE());
+ * 
+ *   }
+ * @param [mrb_state *] mrb_state* The MRuby state reference. 
+ * @param [struct RClass *] RClass* The class where the class method will be defined.
+ * @param [const char *] char* The name of the class method being defined.
+ * @param [mrb_func_t] mrb_func_t The function pointer to the class method definition.
+ * @param [mrb_aspec] mrb_aspec The method parameters declaration.
+ */
+MRB_API void mrb_define_class_method(mrb_state *, struct RClass *, const char *, mrb_func_t, mrb_aspec);
+MRB_API void mrb_define_singleton_method(mrb_state*, struct RObject*, const char*, mrb_func_t, mrb_aspec);
+
+/**
+ *  Defines a module fuction.
+ *
+ * Example:
+ *   # Ruby style
+ *   module Foo
+ *                                                                                                     
+ *     def Foo.bar                                                                                                    *     end
+ *
+ *   end                                                                                                             
+ *   // C style                                                                                                      
+ *   mrb_value bar_method(mrb_state* mrb, mrb_value self){ 
+ *                                                          
+ *     return mrb_nil_value();                                                                                        *               
+ *   }                                                                                                               
+ *   void mrb_example_gem_init(mrb_state* mrb){
+ *                                                                      
+ *     struct RClass *foo;
+ *                                                                                           
+ *     foo = mrb_define_module(mrb, "Foo");
+ *                                                        
+ *     mrb_define_module_function(mrb, foo, "bar", bar_method, MRB_ARGS_NONE());
+ *
+ *   }    
+ *  @param [mrb_state *] mrb_state* The MRuby state reference.
+ *  @param [struct RClass *] RClass* The module where the module function will be defined.
+ *  @param [const char *] char* The name of the module function being defined.
+ *  @param [mrb_func_t] mrb_func_t The function pointer to the module function definition. 
+ *  @param [mrb_aspec] mrb_aspec The method parameters declaration.
+ */
+MRB_API void mrb_define_module_function(mrb_state*, struct RClass*, const char*, mrb_func_t, mrb_aspec);
+
+/**
+ *  Defines a constant.
+ *
+ * Example:
+ *    # Ruby style
+ *
+ *    class ExampleClass
+ *    
+ *    AGE = 22
+ *
+ *    end
+ *
+ *    // C style
+ *    #include <stdio.h> 
+ *    #include <mruby.h>
+ *
+ *    void
+ *    mrb_example_gem_init(mrb_state* mrb){
+ * 
+ *      mrb_define_const(mrb, mrb->kernel_module, "AGE", mrb_fixnum_value(22));
+ *
+ *    }
+ *
+ *    mrb_value
+ *    mrb_example_gem_final(mrb_state* mrb){
+ *
+ *    }
+ *  @param [mrb_state *] mrb_state* The MRuby state reference.
+ *  @param [struct RClass *] RClass* A class or module the constant is defined in.
+ *  @param [const char *] name The name of the constant being defined.
+ *  @param [mrb_value] mrb_value The value for the constant.
+ */
+MRB_API void mrb_define_const(mrb_state*, struct RClass*, const char *name, mrb_value);
+
+/**
+ * Undefines a method.
+ *
+ * Example:
+ *   # Ruby style
+ *
+ *   class ExampleClassA
+ *
+ *     def example_method
+ *       "example"
+ *     end
+ *
+ *   end
+ *
+ *   ExampleClassA.new.example_method # => example
+ *
+ *   class ExampleClassB < ExampleClassA
+ *
+ *     undef_method :example_method
+ *
+ *   end
+ *
+ *   ExampleClassB.new.example_method # => undefined method 'example_method' for ExampleClassB (NoMethodError)
+ *
+ *   // C style
+ *   #include <stdio.h>
+ *   #include <mruby.h>
+ *  
+ *   mrb_value
+ *   mrb_example_method(mrb_state *mrb){
+ *
+ *     return mrb_str_new_cstr(mrb, "example");
+ *
+ *   }
+ *
+ *   void
+ *   mrb_example_gem_init(mrb_state* mrb){
+ *     struct RClass *example_class_a;
+ *     struct RClass *example_class_b;
+ *     struct RClass *example_class_c;
+ *
+ *     example_class_a = mrb_define_class(mrb, "ExampleClassA", mrb->object_class);
+ *
+ *     mrb_define_method(mrb, example_class_a, "example_method", mrb_example_method, MRB_ARGS_NONE());
+ *
+ *     example_class_b = mrb_define_class(mrb, "ExampleClassB", example_class_a);
+ *
+ *     example_class_c = mrb_define_class(mrb, "ExampleClassC", example_class_b);
+ *
+ *     mrb_undef_method(mrb, example_class_c, "example_method");
+ *
+ *   }
+ *
+ *   mrb_example_gem_final(mrb_state* mrb){
+ *
+ *   }
+ *
+ * @param [mrb_state*] mrb_state* The mruby state reference.
+ * @param [struct RClass*] RClass* A class the method will be undefined from.
+ * @param [const char*] constchar* The name of the method to be undefined.
+ */
+MRB_API void mrb_undef_method(mrb_state*, struct RClass*, const char*);
+
+/**
+ * Undefine a class method.
+ *
+ * Example:
+ *   # Ruby style
+ *
+ *   class ExampleClass
+ *     def self.example_method
+ *       "example"
+ *     end
+ *
+ *   end
+ *
+ *   ExampleClass.example_method
+ *   
+ *   // C style
+ *   #include <stdio.h>
+ *   #include <mruby.h> 
+ *
+ *   mrb_value
+ *   mrb_example_method(mrb_state *mrb){
+ *
+ *     return mrb_str_new_cstr(mrb, "example");
+ *     
+ *   }
+ *
+ *   void
+ *   mrb_example_gem_init(mrb_state* mrb){
+ *
+ *     struct RClass *example_class;
+ *     
+ *     example_class = mrb_define_class(mrb, "ExampleClass", mrb->object_class);
+ *
+ *     mrb_define_class_method(mrb, example_class, "example_method", mrb_example_method, MRB_ARGS_NONE());
+ *
+ *     mrb_undef_class_method(mrb, example_class, "example_method");
+ *
+ *   }
+ *
+ *   void
+ *   mrb_example_gem_final(mrb_state* mrb){
+ *
+ *   }
+ * @param [mrb_state*] mrb_state* The mruby state reference.
+ * @param [RClass*] RClass* A class the class method will be undefined from.
+ * @param [constchar*] constchar* The name of the class method to be undefined.
+ */
+MRB_API void mrb_undef_class_method(mrb_state*, struct RClass*, const char*);
+
+/**
+ * Initialize a new object instace of c class.
+ *
+ * Example:
+ *
+ *   # Ruby style
+ *   class ExampleClass
+ *   end
+ *
+ *   p ExampleClass # => #<ExampleClass:0x9958588>
+ *   // C style
+ *   #include <stdio.h>
+ *   #include <mruby.h>
+ *
+ *   void
+ *   mrb_example_gem_init(mrb_state* mrb) {
+ *     struct RClass *example_class;
+ *     mrb_value obj;
+ *
+ *     example_class = mrb_define_class(mrb, "ExampleClass", mrb->object_class); # => class ExampleClass; end
+ *     obj = mrb_obj_new(mrb, example_class, 0, NULL); # => ExampleClass.new
+ *     mrb_p(mrb, obj); // => Kernel#p
+ *   }  
+ * @param [mrb_state*] mrb The current mruby state.
+ * @param [RClass*] c Reference to the class of the new object.
+ * @param [mrb_int] argc Number of arguments in argv
+ * @param [const mrb_value *] argv Array of mrb_value to initialize the object
+ * @return [mrb_value] The newly initialized object
+ */
+MRB_API mrb_value mrb_obj_new(mrb_state *mrb, struct RClass *c, mrb_int argc, const mrb_value *argv);
+
+/** @see mrb_obj_new */
+MRB_INLINE mrb_value mrb_class_new_instance(mrb_state *mrb, mrb_int argc, const mrb_value *argv, struct RClass *c)
+{
+  return mrb_obj_new(mrb,c,argc,argv);
+}
+
+MRB_API mrb_value mrb_instance_new(mrb_state *mrb, mrb_value cv);
+
+/**
+ * Creates a new instance of Class, Class.
+ *
+ * Example:
+ *
+ *   void
+ *   mrb_example_gem_init(mrb_state* mrb) {
+ *      struct RClass *example_class;
+ *      mrb_value obj;
+ *
+ *      example_class = mrb_class_new(mrb, mrb->object_class);
+ *      obj = mrb_obj_new(mrb, example_class, 0, NULL); // => #<#<Class:0x9a945b8>:0x9a94588>
+ *      mrb_p(mrb, obj); // => Kernel#p
+ *   }
+ *
+ * @param [mrb_state*] mrb The current mruby state.
+ * @param [struct RClass *] super The super class or parent.
+ * @return [struct RClass *] Reference to the new class.
+ */
+MRB_API struct RClass * mrb_class_new(mrb_state *mrb, struct RClass *super);
+
+/**
+ * Creates a new module, Module.
+ *
+ * Example:
+ *   void
+ *   mrb_example_gem_init(mrb_state* mrb) {
+ *      struct RClass *example_module;
+ *
+ *      example_module = mrb_module_new(mrb);
+ *   }
+ *
+ * @param [mrb_state*] mrb The current mruby state.
+ * @return [struct RClass *] Reference to the new module.
+ */
+MRB_API struct RClass * mrb_module_new(mrb_state *mrb);
+
+/**
+ * Returns an mrb_bool. True if class was defined, and false if the class was not defined.
+ *
+ * Example:
+ *   void
+ *   mrb_example_gem_init(mrb_state* mrb) {
+ *      struct RClass *example_class;
+ *      mrb_bool cd;
+ *
+ *      example_class = mrb_define_class(mrb, "ExampleClass", mrb->object_class);
+ *      cd = mrb_class_defined(mrb, "ExampleClass");
+ *      
+ *      // If mrb_class_defined returns 1 then puts "True"
+ *      // If mrb_class_defined returns 0 then puts "False"
+ *      if (cd == 1){
+ *        puts("True");
+ *      }
+ *      else {
+ *        puts("False");
+ *      }
+ *   }
+ *
+ * @param [mrb_state*] mrb The current mruby state.
+ * @param [const char *] name A string representing the name of the class.
+ * @return [mrb_bool] A boolean value.
+ */
+MRB_API mrb_bool mrb_class_defined(mrb_state *mrb, const char *name);
+
+/**
+ * Gets a class.
+ * @param [mrb_state*] mrb The current mruby state.
+ * @param [const char *] name The name of the class.
+ * @return [struct RClass *] A reference to the class.
+*/
+MRB_API struct RClass * mrb_class_get(mrb_state *mrb, const char *name);
+
+/**
+ * Gets a child class.
+ * @param [mrb_state*] mrb The current mruby state.
+ * @param [struct RClass *] outer The name of the parent class.
+ * @param [const char *] name The name of the class.
+ * @return [struct RClass *] A reference to the class.
+*/
+MRB_API struct RClass * mrb_class_get_under(mrb_state *mrb, struct RClass *outer, const char *name);
+
+/**
+ * Gets a module.
+ * @param [mrb_state*] mrb The current mruby state.
+ * @param [const char *] name The name of the module.
+ * @return [struct RClass *] A reference to the module.
+*/
+MRB_API struct RClass * mrb_module_get(mrb_state *mrb, const char *name);
+
+/**
+ * Gets a module defined under another module.
+ * @param [mrb_state*] mrb The current mruby state.
+ * @param [struct RClass *] outer The name of the outer module.
+ * @param [const char *] name The name of the module.
+ * @return [struct RClass *] A reference to the module.
+*/
+MRB_API struct RClass * mrb_module_get_under(mrb_state *mrb, struct RClass *outer, const char *name);
+MRB_API mrb_value mrb_notimplement_m(mrb_state*, mrb_value);
+
+/**
+ * Duplicate an object.
+ *
+ * Equivalent to:
+ *   Object#dup    
+ * @param [mrb_state*] mrb The current mruby state.
+ * @param [mrb_value] obj Object to be duplicate.
+ * @return [mrb_value] The newly duplicated object.
+ */
+MRB_API mrb_value mrb_obj_dup(mrb_state *mrb, mrb_value obj);
+MRB_API mrb_value mrb_check_to_integer(mrb_state *mrb, mrb_value val, const char *method);
+
+/**
+ * Returns true if obj responds to the given method. If the method was defined for that
+ * class it returns true, it returns false otherwise.
+ *
+ * Example:
+ *   # Ruby style
+ *   class ExampleClass
+ *      def example_method
+ *      end
+ *   end
+ *
+ *   ExampleClass.new.respond_to?(:example_method) # => true
+ *
+ *   // C style
+ *   void
+ *   mrb_example_gem_init(mrb_state* mrb) {
+ *      struct RClass *example_class;
+ *      mrb_sym mid;
+ *      mrb_bool obj_resp;
+ *
+ *      example_class = mrb_define_class(mrb, "ExampleClass", mrb->object_class);
+ *      mrb_define_method(mrb, example_class, "example_method", exampleMethod, MRB_ARGS_NONE());
+ *      mid = mrb_intern_str(mrb, mrb_str_new_cstr(mrb, "example_method" ));
+ *      obj_resp = mrb_obj_respond_to(mrb, example_class, mid); // => 1(true in Ruby world)
+ *      
+ *      // If mrb_obj_respond_to returns 1 then puts "True"
+ *      // If mrb_obj_respond_to returns 0 then puts "False"
+ *      if (obj_resp == 1) {
+ *        puts("True");
+ *      }
+ *      else if (obj_resp == 0) {
+ *        puts("False");
+ *      }
+ *   }
+ *
+ * @param [mrb_state*] mrb The current mruby state.
+ * @param [struct RClass *] c A reference to a class.
+ * @param [mrb_sym] mid A symbol referencing a method id.
+ * @return [mrb_bool] A boolean value.
+ */
+MRB_API mrb_bool mrb_obj_respond_to(mrb_state *mrb, struct RClass* c, mrb_sym mid);
+
+/**
+ * Defines a new class under a given module
+ *
+ * @param [mrb_state*] mrb The current mruby state.
+ * @param [struct RClass *] outer Reference to the module under which the new class will be defined
+ * @param [const char *] name The name of the defined class
+ * @param [struct RClass *] super The new class parent
+ * @return [struct RClass *] Reference to the newly defined class
+ * @see mrb_define_class
+ */
+MRB_API struct RClass * mrb_define_class_under(mrb_state *mrb, struct RClass *outer, const char *name, struct RClass *super);
+
+MRB_API struct RClass * mrb_define_module_under(mrb_state *mrb, struct RClass *outer, const char *name);
+
+/**
+ * Function requires n arguments.
+ *
+ * @param n
+ *      The number of required arguments.
+ */
+#define MRB_ARGS_REQ(n)     ((mrb_aspec)((n)&0x1f) << 18)
+
+/**
+ * Funtion takes n optional arguments
+ *
+ * @param n
+ *      The number of optional arguments.
+ */
+#define MRB_ARGS_OPT(n)     ((mrb_aspec)((n)&0x1f) << 13)
+
+/**
+ * Funtion takes n1 mandatory arguments and n2 optional arguments
+ *
+ * @param n1
+ *      The number of required arguments.
+ * @param n2
+ *      The number of optional arguments.
+ */
+#define MRB_ARGS_ARG(n1,n2)   (MRB_ARGS_REQ(n1)|MRB_ARGS_OPT(n2))
+
+/** rest argument */
+#define MRB_ARGS_REST()     ((mrb_aspec)(1 << 12))
+
+/** required arguments after rest */
+#define MRB_ARGS_POST(n)    ((mrb_aspec)((n)&0x1f) << 7)
+
+/** keyword arguments (n of keys, kdict) */
+#define MRB_ARGS_KEY(n1,n2) ((mrb_aspec)((((n1)&0x1f) << 2) | ((n2)?(1<<1):0)))
+
+/**
+ * Function takes a block argument
+ */
+#define MRB_ARGS_BLOCK()    ((mrb_aspec)1)
+
+/**
+ * Function accepts any number of arguments
+ */
+#define MRB_ARGS_ANY()      MRB_ARGS_REST()
+
+/**
+ * Function accepts no arguments
+ */
+#define MRB_ARGS_NONE()     ((mrb_aspec)0)
+
+/**
+ * Format specifiers for {mrb_get_args} function
+ *
+ * Must be a C string composed of the following format specifiers:
+ *
+ * | char | Ruby type      | C types           | Notes                                               |
+ * |:----:|----------------|-------------------|----------------------------------------------------|
+ * | `o`  | {Object}       | {mrb_value}       | Could be used to retrieve any type of argument     |
+ * | `C`  | {Class}/{Module} | {mrb_value}     |                                                    |
+ * | `S`  | {String}       | {mrb_value}       | when `!` follows, the value may be `nil`           |
+ * | `A`  | {Array}        | {mrb_value}       | when `!` follows, the value may be `nil`           |
+ * | `H`  | {Hash}         | {mrb_value}       | when `!` follows, the value may be `nil`           |
+ * | `s`  | {String}       | char *, {mrb_int} |  Receive two arguments; `s!` gives (`NULL`,`0`) for `nil`       |
+ * | `z`  | {String}       | char *            | `NULL` terminated string; `z!` gives `NULL` for `nil`           |
+ * | `a`  | {Array}        | {mrb_value} *, {mrb_int} | Receive two arguments; `a!` gives (`NULL`,`0`) for `nil` |
+ * | `f`  | {Float}        | {mrb_float}       |                                                    |
+ * | `i`  | {Integer}      | {mrb_int}         |                                                    |
+ * | `b`  | boolean        | {mrb_bool}        |                                                    |
+ * | `n`  | {Symbol}       | {mrb_sym}         |                                                    |
+ * | `&`  | block          | {mrb_value}       |                                                    |
+ * | `*`  | rest arguments | {mrb_value} *, {mrb_int} | Receive the rest of arguments as an array.  |
+ * | &vert; | optional     |                   | After this spec following specs would be optional. |
+ * | `?`  | optional given | {mrb_bool}        | `TRUE` if preceding argument is given. Used to check optional argument is given. |
+ *
+ * @see mrb_get_args
+ */
+typedef const char *mrb_args_format;
+
+/**
+ * Retrieve arguments from mrb_state.
+ *
+ * When applicable, implicit conversions (such as `to_str`, `to_ary`, `to_hash`) are
+ * applied to received arguments.
+ * Used inside a function of mrb_func_t type.
+ *
+ * @param mrb The current MRuby state.
+ * @param format [mrb_args_format] is a list of format specifiers
+ * @param ... The passing variadic arguments must be a pointer of retrieving type.
+ * @return the number of arguments retrieved.
+ * @see mrb_args_format
+ */
+MRB_API mrb_int mrb_get_args(mrb_state *mrb, mrb_args_format format, ...);
+
+static inline mrb_sym
+mrb_get_mid(mrb_state *mrb) /* get method symbol */
+{
+  return mrb->c->ci->mid;
+}
+
+static inline int
+mrb_get_argc(mrb_state *mrb) /* get argc */
+{
+  return mrb->c->ci->argc;
+}
+
+/* `strlen` for character string literals (use with caution or `strlen` instead)
+    Adjacent string literals are concatenated in C/C++ in translation phase 6.
+    If `lit` is not one, the compiler will report a syntax error:
+     MSVC: "error C2143: syntax error : missing ')' before 'string'"
+     GCC:  "error: expected ')' before string constant"
+*/
+#define mrb_strlen_lit(lit) (sizeof(lit "") - 1)
+
+/**
+ * Call existing ruby functions.
+ */
+MRB_API mrb_value mrb_funcall(mrb_state*, mrb_value, const char*, mrb_int,...);
+MRB_API mrb_value mrb_funcall_argv(mrb_state*, mrb_value, mrb_sym, mrb_int, const mrb_value*);
+MRB_API mrb_value mrb_funcall_with_block(mrb_state*, mrb_value, mrb_sym, mrb_int, const mrb_value*, mrb_value);
+MRB_API mrb_sym mrb_intern_cstr(mrb_state*,const char*);
+MRB_API mrb_sym mrb_intern(mrb_state*,const char*,size_t);
+MRB_API mrb_sym mrb_intern_static(mrb_state*,const char*,size_t);
+#define mrb_intern_lit(mrb, lit) mrb_intern_static(mrb, lit, mrb_strlen_lit(lit))
+MRB_API mrb_sym mrb_intern_str(mrb_state*,mrb_value);
+MRB_API mrb_value mrb_check_intern_cstr(mrb_state*,const char*);
+MRB_API mrb_value mrb_check_intern(mrb_state*,const char*,size_t);
+MRB_API mrb_value mrb_check_intern_str(mrb_state*,mrb_value);
+MRB_API const char *mrb_sym2name(mrb_state*,mrb_sym);
+MRB_API const char *mrb_sym2name_len(mrb_state*,mrb_sym,mrb_int*);
+MRB_API mrb_value mrb_sym2str(mrb_state*,mrb_sym);
+
+MRB_API void *mrb_malloc(mrb_state*, size_t);         /* raise RuntimeError if no mem */
+MRB_API void *mrb_calloc(mrb_state*, size_t, size_t); /* ditto */
+MRB_API void *mrb_realloc(mrb_state*, void*, size_t); /* ditto */
+MRB_API void *mrb_realloc_simple(mrb_state*, void*, size_t); /* return NULL if no memory available */
+MRB_API void *mrb_malloc_simple(mrb_state*, size_t);  /* return NULL if no memory available */
+MRB_API struct RBasic *mrb_obj_alloc(mrb_state*, enum mrb_vtype, struct RClass*);
+MRB_API void mrb_free(mrb_state*, void*);
+
+MRB_API mrb_value mrb_str_new(mrb_state *mrb, const char *p, size_t len);
+
+/**
+ * Turns a C string into a Ruby string value.
+ */
+MRB_API mrb_value mrb_str_new_cstr(mrb_state*, const char*);
+MRB_API mrb_value mrb_str_new_static(mrb_state *mrb, const char *p, size_t len);
+#define mrb_str_new_lit(mrb, lit) mrb_str_new_static(mrb, (lit), mrb_strlen_lit(lit))
+
+#ifdef _WIN32
+char* mrb_utf8_from_locale(const char *p, size_t len);
+char* mrb_locale_from_utf8(const char *p, size_t len);
+#define mrb_locale_free(p) free(p)
+#define mrb_utf8_free(p) free(p)
+#else
+#define mrb_utf8_from_locale(p, l) (p)
+#define mrb_locale_from_utf8(p, l) (p)
+#define mrb_locale_free(p)
+#define mrb_utf8_free(p)
+#endif
+
+/**
+ * Creates new mrb_state.
+ *
+ * @return
+ *      Pointer to the newly created mrb_state.
+ */
+MRB_API mrb_state* mrb_open(void);
+
+/**
+ * Create new mrb_state with custom allocators.
+ *
+ * @param f
+ *      Reference to the allocation function.
+ * @param ud
+ *      User data will be passed to custom allocator f.
+ *      If user data isn't required just pass NULL.
+ * @return
+ *      Pointer to the newly created mrb_state.
+ */
+MRB_API mrb_state* mrb_open_allocf(mrb_allocf f, void *ud);
+
+/**
+ * Create new mrb_state with just the MRuby core
+ *
+ * @param f
+ *      Reference to the allocation function.
+ *      Use mrb_default_allocf for the default
+ * @param ud
+ *      User data will be passed to custom allocator f.
+ *      If user data isn't required just pass NULL.
+ * @return
+ *      Pointer to the newly created mrb_state.
+ */
+MRB_API mrb_state* mrb_open_core(mrb_allocf f, void *ud);
+
+/**
+ * Closes and frees a mrb_state.
+ *
+ * @param mrb
+ *      Pointer to the mrb_state to be closed.
+ */
+MRB_API void mrb_close(mrb_state *mrb);
+
+/**
+ * The default allocation function.
+ *
+ * @see mrb_allocf
+ */
+MRB_API void* mrb_default_allocf(mrb_state*, void*, size_t, void*);
+
+MRB_API mrb_value mrb_top_self(mrb_state *);
+MRB_API mrb_value mrb_run(mrb_state*, struct RProc*, mrb_value);
+MRB_API mrb_value mrb_toplevel_run(mrb_state*, struct RProc*);
+MRB_API mrb_value mrb_context_run(mrb_state*, struct RProc*, mrb_value, unsigned int);
+
+MRB_API void mrb_p(mrb_state*, mrb_value);
+MRB_API mrb_int mrb_obj_id(mrb_value obj);
+MRB_API mrb_sym mrb_obj_to_sym(mrb_state *mrb, mrb_value name);
+
+MRB_API mrb_bool mrb_obj_eq(mrb_state*, mrb_value, mrb_value);
+MRB_API mrb_bool mrb_obj_equal(mrb_state*, mrb_value, mrb_value);
+MRB_API mrb_bool mrb_equal(mrb_state *mrb, mrb_value obj1, mrb_value obj2);
+MRB_API mrb_value mrb_convert_to_integer(mrb_state *mrb, mrb_value val, int base);
+MRB_API mrb_value mrb_Integer(mrb_state *mrb, mrb_value val);
+MRB_API mrb_value mrb_Float(mrb_state *mrb, mrb_value val);
+MRB_API mrb_value mrb_inspect(mrb_state *mrb, mrb_value obj);
+MRB_API mrb_bool mrb_eql(mrb_state *mrb, mrb_value obj1, mrb_value obj2);
+
+MRB_API void mrb_garbage_collect(mrb_state*);
+MRB_API void mrb_full_gc(mrb_state*);
+MRB_API void mrb_incremental_gc(mrb_state *);
+MRB_API int mrb_gc_arena_save(mrb_state*);
+MRB_API void mrb_gc_arena_restore(mrb_state*,int);
+MRB_API void mrb_gc_mark(mrb_state*,struct RBasic*);
+#define mrb_gc_mark_value(mrb,val) do {\
+  if (!mrb_immediate_p(val)) mrb_gc_mark((mrb), mrb_basic_ptr(val)); \
+} while (0)
+MRB_API void mrb_field_write_barrier(mrb_state *, struct RBasic*, struct RBasic*);
+#define mrb_field_write_barrier_value(mrb, obj, val) do{\
+  if (!mrb_immediate_p(val)) mrb_field_write_barrier((mrb), (obj), mrb_basic_ptr(val)); \
+} while (0)
+MRB_API void mrb_write_barrier(mrb_state *, struct RBasic*);
+
+MRB_API mrb_value mrb_check_convert_type(mrb_state *mrb, mrb_value val, enum mrb_vtype type, const char *tname, const char *method);
+MRB_API mrb_value mrb_any_to_s(mrb_state *mrb, mrb_value obj);
+MRB_API const char * mrb_obj_classname(mrb_state *mrb, mrb_value obj);
+MRB_API struct RClass* mrb_obj_class(mrb_state *mrb, mrb_value obj);
+MRB_API mrb_value mrb_class_path(mrb_state *mrb, struct RClass *c);
+MRB_API mrb_value mrb_convert_type(mrb_state *mrb, mrb_value val, enum mrb_vtype type, const char *tname, const char *method);
+MRB_API mrb_bool mrb_obj_is_kind_of(mrb_state *mrb, mrb_value obj, struct RClass *c);
+MRB_API mrb_value mrb_obj_inspect(mrb_state *mrb, mrb_value self);
+MRB_API mrb_value mrb_obj_clone(mrb_state *mrb, mrb_value self);
+
+#ifndef ISPRINT
+#define ISASCII(c) ((unsigned)(c) <= 0x7f)
+#define ISPRINT(c) (((unsigned)(c) - 0x20) < 0x5f)
+#define ISSPACE(c) ((c) == ' ' || (unsigned)(c) - '\t' < 5)
+#define ISUPPER(c) (((unsigned)(c) - 'A') < 26)
+#define ISLOWER(c) (((unsigned)(c) - 'a') < 26)
+#define ISALPHA(c) ((((unsigned)(c) | 0x20) - 'a') < 26)
+#define ISDIGIT(c) (((unsigned)(c) - '0') < 10)
+#define ISXDIGIT(c) (ISDIGIT(c) || ((unsigned)(c) | 0x20) - 'a' < 6)
+#define ISALNUM(c) (ISALPHA(c) || ISDIGIT(c))
+#define ISBLANK(c) ((c) == ' ' || (c) == '\t')
+#define ISCNTRL(c) ((unsigned)(c) < 0x20 || (c) == 0x7f)
+#define TOUPPER(c) (ISLOWER(c) ? ((c) & 0x5f) : (c))
+#define TOLOWER(c) (ISUPPER(c) ? ((c) | 0x20) : (c))
+#endif
+
+MRB_API mrb_value mrb_exc_new(mrb_state *mrb, struct RClass *c, const char *ptr, size_t len);
+MRB_API mrb_noreturn void mrb_exc_raise(mrb_state *mrb, mrb_value exc);
+
+MRB_API mrb_noreturn void mrb_raise(mrb_state *mrb, struct RClass *c, const char *msg);
+MRB_API mrb_noreturn void mrb_raisef(mrb_state *mrb, struct RClass *c, const char *fmt, ...);
+MRB_API mrb_noreturn void mrb_name_error(mrb_state *mrb, mrb_sym id, const char *fmt, ...);
+MRB_API void mrb_warn(mrb_state *mrb, const char *fmt, ...);
+MRB_API mrb_noreturn void mrb_bug(mrb_state *mrb, const char *fmt, ...);
+MRB_API void mrb_print_backtrace(mrb_state *mrb);
+MRB_API void mrb_print_error(mrb_state *mrb);
+
+/* macros to get typical exception objects
+   note:
+   + those E_* macros requires mrb_state* variable named mrb.
+   + exception objects obtained from those macros are local to mrb
+*/
+#define E_RUNTIME_ERROR             (mrb_class_get(mrb, "RuntimeError"))
+#define E_TYPE_ERROR                (mrb_class_get(mrb, "TypeError"))
+#define E_ARGUMENT_ERROR            (mrb_class_get(mrb, "ArgumentError"))
+#define E_INDEX_ERROR               (mrb_class_get(mrb, "IndexError"))
+#define E_RANGE_ERROR               (mrb_class_get(mrb, "RangeError"))
+#define E_NAME_ERROR                (mrb_class_get(mrb, "NameError"))
+#define E_NOMETHOD_ERROR            (mrb_class_get(mrb, "NoMethodError"))
+#define E_SCRIPT_ERROR              (mrb_class_get(mrb, "ScriptError"))
+#define E_SYNTAX_ERROR              (mrb_class_get(mrb, "SyntaxError"))
+#define E_LOCALJUMP_ERROR           (mrb_class_get(mrb, "LocalJumpError"))
+#define E_REGEXP_ERROR              (mrb_class_get(mrb, "RegexpError"))
+#define E_SYSSTACK_ERROR            (mrb_class_get(mrb, "SystemStackError"))
+
+#define E_NOTIMP_ERROR              (mrb_class_get(mrb, "NotImplementedError"))
+#define E_FLOATDOMAIN_ERROR         (mrb_class_get(mrb, "FloatDomainError"))
+
+#define E_KEY_ERROR                 (mrb_class_get(mrb, "KeyError"))
+
+MRB_API mrb_value mrb_yield(mrb_state *mrb, mrb_value b, mrb_value arg);
+MRB_API mrb_value mrb_yield_argv(mrb_state *mrb, mrb_value b, mrb_int argc, const mrb_value *argv);
+MRB_API mrb_value mrb_yield_with_class(mrb_state *mrb, mrb_value b, mrb_int argc, const mrb_value *argv, mrb_value self, struct RClass *c);
+
+/* mrb_gc_protect() leaves the object in the arena */
+MRB_API void mrb_gc_protect(mrb_state *mrb, mrb_value obj);
+/* mrb_gc_register() keeps the object from GC. */
+MRB_API void mrb_gc_register(mrb_state *mrb, mrb_value obj);
+/* mrb_gc_unregister() removes the object from GC root. */
+MRB_API void mrb_gc_unregister(mrb_state *mrb, mrb_value obj);
+
+MRB_API mrb_value mrb_to_int(mrb_state *mrb, mrb_value val);
+#define mrb_int(mrb, val) mrb_fixnum(mrb_to_int(mrb, val))
+MRB_API void mrb_check_type(mrb_state *mrb, mrb_value x, enum mrb_vtype t);
+
+typedef enum call_type {
+  CALL_PUBLIC,
+  CALL_FCALL,
+  CALL_VCALL,
+  CALL_TYPE_MAX
+} call_type;
+
+MRB_API void mrb_define_alias(mrb_state *mrb, struct RClass *klass, const char *name1, const char *name2);
+MRB_API const char *mrb_class_name(mrb_state *mrb, struct RClass* klass);
+MRB_API void mrb_define_global_const(mrb_state *mrb, const char *name, mrb_value val);
+
+MRB_API mrb_value mrb_attr_get(mrb_state *mrb, mrb_value obj, mrb_sym id);
+
+MRB_API mrb_bool mrb_respond_to(mrb_state *mrb, mrb_value obj, mrb_sym mid);
+MRB_API mrb_bool mrb_obj_is_instance_of(mrb_state *mrb, mrb_value obj, struct RClass* c);
+
+
+/*
+ * Resume a Fiber
+ *
+ * @mrbgem mruby-fiber
+ */
+MRB_API mrb_value mrb_fiber_resume(mrb_state *mrb, mrb_value fib, mrb_int argc, const mrb_value *argv);
+
+/*
+ * Yield a Fiber
+ *
+ * @mrbgem mruby-fiber
+ */
+MRB_API mrb_value mrb_fiber_yield(mrb_state *mrb, mrb_int argc, const mrb_value *argv);
+
+/*
+ * FiberError reference
+ *
+ * @mrbgem mruby-fiber
+ */
+#define E_FIBER_ERROR (mrb_class_get(mrb, "FiberError"))
+
+/* memory pool implementation */
+typedef struct mrb_pool mrb_pool;
+MRB_API struct mrb_pool* mrb_pool_open(mrb_state*);
+MRB_API void mrb_pool_close(struct mrb_pool*);
+MRB_API void* mrb_pool_alloc(struct mrb_pool*, size_t);
+MRB_API void* mrb_pool_realloc(struct mrb_pool*, void*, size_t oldlen, size_t newlen);
+MRB_API mrb_bool mrb_pool_can_realloc(struct mrb_pool*, void*, size_t);
+MRB_API void* mrb_alloca(mrb_state *mrb, size_t);
+
+MRB_API void mrb_state_atexit(mrb_state *mrb, mrb_atexit_func func);
+
+MRB_API void mrb_show_version(mrb_state *mrb);
+MRB_API void mrb_show_copyright(mrb_state *mrb);
+
+#ifdef MRB_DEBUG
+#include <assert.h>
+#define mrb_assert(p) assert(p)
+#define mrb_assert_int_fit(t1,n,t2,max) assert((n)>=0 && ((sizeof(n)<=sizeof(t2))||(n<=(t1)(max))))
+#else
+#define mrb_assert(p) ((void)0)
+#define mrb_assert_int_fit(t1,n,t2,max) ((void)0)
+#endif
+
+#if __STDC_VERSION__ >= 201112L
+#define mrb_static_assert(exp, str) _Static_assert(exp, str)
+#else
+#define mrb_static_assert(exp, str) mrb_assert(exp)
+#endif
+
+MRB_API mrb_value mrb_format(mrb_state *mrb, const char *format, ...);
+
+MRB_END_DECL
+
+#endif  /* MRUBY_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/array.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/array.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/array.h	(revision 270)
@@ -0,0 +1,139 @@
+/*
+** mruby/array.h - Array class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_ARRAY_H
+#define MRUBY_ARRAY_H
+
+#include "mruby/common.h"
+
+/*
+ * Array class
+ */
+MRB_BEGIN_DECL
+
+
+typedef struct mrb_shared_array {
+  int refcnt;
+  mrb_int len;
+  mrb_value *ptr;
+} mrb_shared_array;
+
+struct RArray {
+  MRB_OBJECT_HEADER;
+  mrb_int len;
+  union {
+    mrb_int capa;
+    mrb_shared_array *shared;
+  } aux;
+  mrb_value *ptr;
+};
+
+#define mrb_ary_ptr(v)    ((struct RArray*)(mrb_ptr(v)))
+#define mrb_ary_value(p)  mrb_obj_value((void*)(p))
+#define RARRAY(v)  ((struct RArray*)(mrb_ptr(v)))
+
+#define RARRAY_LEN(a) (RARRAY(a)->len)
+#define RARRAY_PTR(a) ((const mrb_value*)RARRAY(a)->ptr)
+#define MRB_ARY_SHARED      256
+#define ARY_SHARED_P(a) ((a)->flags & MRB_ARY_SHARED)
+#define ARY_SET_SHARED_FLAG(a) ((a)->flags |= MRB_ARY_SHARED)
+#define ARY_UNSET_SHARED_FLAG(a) ((a)->flags &= ~MRB_ARY_SHARED)
+
+void mrb_ary_decref(mrb_state*, mrb_shared_array*);
+MRB_API void mrb_ary_modify(mrb_state*, struct RArray*);
+MRB_API mrb_value mrb_ary_new_capa(mrb_state*, mrb_int);
+
+/*
+ * Initializes a new array.
+ *
+ * Equivalent to:
+ *
+ *      Array.new
+ *
+ * @param mrb The mruby state reference.
+ * @return The initialized array
+ */
+MRB_API mrb_value mrb_ary_new(mrb_state *mrb);
+
+MRB_API mrb_value mrb_ary_new_from_values(mrb_state *mrb, mrb_int size, const mrb_value *vals);
+MRB_API mrb_value mrb_assoc_new(mrb_state *mrb, mrb_value car, mrb_value cdr);
+MRB_API void mrb_ary_concat(mrb_state*, mrb_value, mrb_value);
+MRB_API mrb_value mrb_ary_splat(mrb_state*, mrb_value);
+
+/*
+ * Pushes value into array.
+ *
+ * Equivalent to:
+ *
+ *      ary << value
+ *
+ * @param mrb The mruby state reference.
+ * @param ary The array in which the value will be pushed
+ * @param value The value to be pushed into array
+ */
+MRB_API void mrb_ary_push(mrb_state *mrb, mrb_value array, mrb_value value);
+
+/*
+ * Pops the last element from the array.
+ *
+ * Equivalent to:
+ *
+ *      ary.pop
+ *
+ * @param mrb The mruby state reference.
+ * @param ary The array from which the value will be poped.
+ * @return The poped value.
+ */
+MRB_API mrb_value mrb_ary_pop(mrb_state *mrb, mrb_value ary);
+
+/*
+ * Returns a reference to an element of the array on the given index.
+ *
+ * Equivalent to:
+ *
+ *      ary[n]
+ *
+ * @param mrb The mruby state reference.
+ * @param ary The target array.
+ * @param n The array index being referenced
+ * @return The referenced value.
+ */
+MRB_API mrb_value mrb_ary_ref(mrb_state *mrb, mrb_value ary, mrb_int n);
+
+/*
+ * Sets a value on an array at the given index
+ *
+ * Equivalent to:
+ *
+ *      ary[n] = val
+ *
+ * @param mrb The mruby state reference.
+ * @param ary The target array.
+ * @param n The array index being referenced.
+ * @param val The value being setted.
+ */
+MRB_API void mrb_ary_set(mrb_state *mrb, mrb_value ary, mrb_int n, mrb_value val);
+
+MRB_API void mrb_ary_replace(mrb_state *mrb, mrb_value a, mrb_value b);
+MRB_API mrb_value mrb_check_array_type(mrb_state *mrb, mrb_value self);
+MRB_API mrb_value mrb_ary_unshift(mrb_state *mrb, mrb_value self, mrb_value item);
+MRB_API mrb_value mrb_ary_entry(mrb_value ary, mrb_int offset);
+MRB_API mrb_value mrb_ary_shift(mrb_state *mrb, mrb_value self);
+MRB_API mrb_value mrb_ary_clear(mrb_state *mrb, mrb_value self);
+MRB_API mrb_value mrb_ary_join(mrb_state *mrb, mrb_value ary, mrb_value sep);
+MRB_API mrb_value mrb_ary_resize(mrb_state *mrb, mrb_value ary, mrb_int len);
+
+static inline mrb_int
+mrb_ary_len(mrb_state *mrb, mrb_value ary)
+{
+  (void)mrb;
+  mrb_assert(mrb_array_p(ary));
+  return RARRAY_LEN(ary);
+}
+
+MRB_END_DECL
+
+#endif  /* MRUBY_ARRAY_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/boxing_nan.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/boxing_nan.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/boxing_nan.h	(revision 270)
@@ -0,0 +1,93 @@
+/*
+** mruby/boxing_nan.h - nan boxing mrb_value definition
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_BOXING_NAN_H
+#define MRUBY_BOXING_NAN_H
+
+#ifdef MRB_USE_FLOAT
+# error ---->> MRB_NAN_BOXING and MRB_USE_FLOAT conflict <<----
+#endif
+
+#ifdef MRB_INT64
+# error ---->> MRB_NAN_BOXING and MRB_INT64 conflict <<----
+#endif
+
+#define MRB_FIXNUM_SHIFT 0
+#define MRB_TT_HAS_BASIC MRB_TT_OBJECT
+
+#ifdef MRB_ENDIAN_BIG
+#define MRB_ENDIAN_LOHI(a,b) a b
+#else
+#define MRB_ENDIAN_LOHI(a,b) b a
+#endif
+
+/* value representation by nan-boxing:
+ *   float : FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF
+ *   object: 111111111111TTTT TTPPPPPPPPPPPPPP PPPPPPPPPPPPPPPP PPPPPPPPPPPPPPPP
+ *   int   : 1111111111110001 0000000000000000 IIIIIIIIIIIIIIII IIIIIIIIIIIIIIII
+ *   sym   : 1111111111110001 0100000000000000 SSSSSSSSSSSSSSSS SSSSSSSSSSSSSSSS
+ * In order to get enough bit size to save TT, all pointers are shifted 2 bits
+ * in the right direction. Also, TTTTTT is the mrb_vtype + 1;
+ */
+typedef struct mrb_value {
+  union {
+    mrb_float f;
+    union {
+      void *p;
+      struct {
+        MRB_ENDIAN_LOHI(
+          uint32_t ttt;
+          ,union {
+            mrb_int i;
+            mrb_sym sym;
+          };
+        )
+      };
+    } value;
+  };
+} mrb_value;
+
+#define mrb_float_pool(mrb,f) mrb_float_value(mrb,f)
+
+#define mrb_tt(o)       ((enum mrb_vtype)(((o).value.ttt & 0xfc000)>>14)-1)
+#define mrb_type(o)     ((uint32_t)0xfff00000 < (o).value.ttt ? mrb_tt(o) : MRB_TT_FLOAT)
+#define mrb_ptr(o)      ((void*)((((uintptr_t)0x3fffffffffff)&((uintptr_t)((o).value.p)))<<2))
+#define mrb_float(o)    (o).f
+#define mrb_cptr(o)     mrb_ptr(o)
+#define mrb_fixnum(o)   (o).value.i
+#define mrb_symbol(o)   (o).value.sym
+
+#define BOXNAN_SET_VALUE(o, tt, attr, v) do {\
+  switch (tt) {\
+  case MRB_TT_FALSE:\
+  case MRB_TT_TRUE:\
+  case MRB_TT_UNDEF:\
+  case MRB_TT_FIXNUM:\
+  case MRB_TT_SYMBOL: (o).attr = (v); break;\
+  default: (o).value.i = 0; (o).value.p = (void*)((uintptr_t)(o).value.p | (((uintptr_t)(v))>>2)); break;\
+  }\
+  (o).value.ttt = (0xfff00000|(((tt)+1)<<14));\
+} while (0)
+
+#define SET_FLOAT_VALUE(mrb,r,v) do { \
+  if (v != v) { \
+    (r).value.ttt = 0x7ff80000; \
+    (r).value.i = 0; \
+  } else { \
+    (r).f = v; \
+  }} while(0)
+
+#define SET_NIL_VALUE(r) BOXNAN_SET_VALUE(r, MRB_TT_FALSE, value.i, 0)
+#define SET_FALSE_VALUE(r) BOXNAN_SET_VALUE(r, MRB_TT_FALSE, value.i, 1)
+#define SET_TRUE_VALUE(r) BOXNAN_SET_VALUE(r, MRB_TT_TRUE, value.i, 1)
+#define SET_BOOL_VALUE(r,b) BOXNAN_SET_VALUE(r, b ? MRB_TT_TRUE : MRB_TT_FALSE, value.i, 1)
+#define SET_INT_VALUE(r,n) BOXNAN_SET_VALUE(r, MRB_TT_FIXNUM, value.i, (n))
+#define SET_SYM_VALUE(r,v) BOXNAN_SET_VALUE(r, MRB_TT_SYMBOL, value.sym, (v))
+#define SET_OBJ_VALUE(r,v) BOXNAN_SET_VALUE(r, (((struct RObject*)(v))->tt), value.p, (v))
+#define SET_CPTR_VALUE(mrb,r,v) BOXNAN_SET_VALUE(r, MRB_TT_CPTR, value.p, v)
+#define SET_UNDEF_VALUE(r) BOXNAN_SET_VALUE(r, MRB_TT_UNDEF, value.i, 0)
+
+#endif  /* MRUBY_BOXING_NAN_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/boxing_no.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/boxing_no.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/boxing_no.h	(revision 270)
@@ -0,0 +1,48 @@
+/*
+** mruby/boxing_no.h - unboxed mrb_value definition
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_BOXING_NO_H
+#define MRUBY_BOXING_NO_H
+
+#define MRB_FIXNUM_SHIFT 0
+#define MRB_TT_HAS_BASIC MRB_TT_OBJECT
+
+typedef struct mrb_value {
+  union {
+    mrb_float f;
+    void *p;
+    mrb_int i;
+    mrb_sym sym;
+  } value;
+  enum mrb_vtype tt;
+} mrb_value;
+
+#define mrb_float_pool(mrb,f) mrb_float_value(mrb,f)
+
+#define mrb_ptr(o)      (o).value.p
+#define mrb_cptr(o)     mrb_ptr(o)
+#define mrb_float(o)    (o).value.f
+#define mrb_fixnum(o)   (o).value.i
+#define mrb_symbol(o)   (o).value.sym
+#define mrb_type(o)     (o).tt
+
+#define BOXNIX_SET_VALUE(o, ttt, attr, v) do {\
+  (o).tt = ttt;\
+  (o).attr = v;\
+} while (0)
+
+#define SET_NIL_VALUE(r) BOXNIX_SET_VALUE(r, MRB_TT_FALSE, value.i, 0)
+#define SET_FALSE_VALUE(r) BOXNIX_SET_VALUE(r, MRB_TT_FALSE, value.i, 1)
+#define SET_TRUE_VALUE(r) BOXNIX_SET_VALUE(r, MRB_TT_TRUE, value.i, 1)
+#define SET_BOOL_VALUE(r,b) BOXNIX_SET_VALUE(r, b ? MRB_TT_TRUE : MRB_TT_FALSE, value.i, 1)
+#define SET_INT_VALUE(r,n) BOXNIX_SET_VALUE(r, MRB_TT_FIXNUM, value.i, (n))
+#define SET_FLOAT_VALUE(mrb,r,v) BOXNIX_SET_VALUE(r, MRB_TT_FLOAT, value.f, (v))
+#define SET_SYM_VALUE(r,v) BOXNIX_SET_VALUE(r, MRB_TT_SYMBOL, value.sym, (v))
+#define SET_OBJ_VALUE(r,v) BOXNIX_SET_VALUE(r, (((struct RObject*)(v))->tt), value.p, (v))
+#define SET_CPTR_VALUE(mrb,r,v) BOXNIX_SET_VALUE(r, MRB_TT_CPTR, value.p, v)
+#define SET_UNDEF_VALUE(r) BOXNIX_SET_VALUE(r, MRB_TT_UNDEF, value.i, 0)
+
+#endif  /* MRUBY_BOXING_NO_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/boxing_word.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/boxing_word.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/boxing_word.h	(revision 270)
@@ -0,0 +1,116 @@
+/*
+** mruby/boxing_word.h - word boxing mrb_value definition
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_BOXING_WORD_H
+#define MRUBY_BOXING_WORD_H
+
+#if defined(MRB_INT16)
+# error MRB_INT16 is too small for MRB_WORD_BOXING.
+#endif
+
+struct RFloat {
+  MRB_OBJECT_HEADER;
+  mrb_float f;
+};
+
+struct RCptr {
+  MRB_OBJECT_HEADER;
+  void *p;
+};
+
+#define MRB_FIXNUM_SHIFT 1
+#define MRB_TT_HAS_BASIC MRB_TT_FLOAT
+
+enum mrb_special_consts {
+  MRB_Qnil    = 0,
+  MRB_Qfalse  = 2,
+  MRB_Qtrue   = 4,
+  MRB_Qundef  = 6,
+};
+
+#define MRB_FIXNUM_FLAG   0x01
+#define MRB_SYMBOL_FLAG   0x0e
+#define MRB_SPECIAL_SHIFT 8
+
+typedef union mrb_value {
+  union {
+    void *p;
+    struct {
+      unsigned int i_flag : MRB_FIXNUM_SHIFT;
+      mrb_int i : (MRB_INT_BIT - MRB_FIXNUM_SHIFT);
+    };
+    struct {
+      unsigned int sym_flag : MRB_SPECIAL_SHIFT;
+      mrb_sym sym : (sizeof(mrb_sym) * CHAR_BIT);
+    };
+    struct RBasic *bp;
+    struct RFloat *fp;
+    struct RCptr *vp;
+  } value;
+  unsigned long w;
+} mrb_value;
+
+MRB_API mrb_value mrb_word_boxing_cptr_value(struct mrb_state*, void*);
+MRB_API mrb_value mrb_word_boxing_float_value(struct mrb_state*, mrb_float);
+MRB_API mrb_value mrb_word_boxing_float_pool(struct mrb_state*, mrb_float);
+
+#define mrb_float_pool(mrb,f) mrb_word_boxing_float_pool(mrb,f)
+
+#define mrb_ptr(o)     (o).value.p
+#define mrb_cptr(o)    (o).value.vp->p
+#define mrb_float(o)   (o).value.fp->f
+#define mrb_fixnum(o)  (o).value.i
+#define mrb_symbol(o)  (o).value.sym
+
+static inline enum mrb_vtype
+mrb_type(mrb_value o)
+{
+  switch (o.w) {
+  case MRB_Qfalse:
+  case MRB_Qnil:
+    return MRB_TT_FALSE;
+  case MRB_Qtrue:
+    return MRB_TT_TRUE;
+  case MRB_Qundef:
+    return MRB_TT_UNDEF;
+  }
+  if (o.value.i_flag == MRB_FIXNUM_FLAG) {
+    return MRB_TT_FIXNUM;
+  }
+  if (o.value.sym_flag == MRB_SYMBOL_FLAG) {
+    return MRB_TT_SYMBOL;
+  }
+  return o.value.bp->tt;
+}
+
+#define mrb_bool(o)    ((o).w != MRB_Qnil && (o).w != MRB_Qfalse)
+#define mrb_fixnum_p(o) ((o).value.i_flag == MRB_FIXNUM_FLAG)
+#define mrb_undef_p(o) ((o).w == MRB_Qundef)
+#define mrb_nil_p(o)  ((o).w == MRB_Qnil)
+
+#define BOXWORD_SET_VALUE(o, ttt, attr, v) do {\
+  switch (ttt) {\
+  case MRB_TT_FALSE:  (o).w = (v) ? MRB_Qfalse : MRB_Qnil; break;\
+  case MRB_TT_TRUE:   (o).w = MRB_Qtrue; break;\
+  case MRB_TT_UNDEF:  (o).w = MRB_Qundef; break;\
+  case MRB_TT_FIXNUM: (o).value.i_flag = MRB_FIXNUM_FLAG; (o).attr = (v); break;\
+  case MRB_TT_SYMBOL: (o).value.sym_flag = MRB_SYMBOL_FLAG; (o).attr = (v); break;\
+  default:            (o).w = 0; (o).attr = (v); if ((o).value.bp) (o).value.bp->tt = ttt; break;\
+  }\
+} while (0)
+
+#define SET_FLOAT_VALUE(mrb,r,v) r = mrb_word_boxing_float_value(mrb, v)
+#define SET_CPTR_VALUE(mrb,r,v) r = mrb_word_boxing_cptr_value(mrb, v)
+#define SET_NIL_VALUE(r) BOXWORD_SET_VALUE(r, MRB_TT_FALSE, value.i, 0)
+#define SET_FALSE_VALUE(r) BOXWORD_SET_VALUE(r, MRB_TT_FALSE, value.i, 1)
+#define SET_TRUE_VALUE(r) BOXWORD_SET_VALUE(r, MRB_TT_TRUE, value.i, 1)
+#define SET_BOOL_VALUE(r,b) BOXWORD_SET_VALUE(r, b ? MRB_TT_TRUE : MRB_TT_FALSE, value.i, 1)
+#define SET_INT_VALUE(r,n) BOXWORD_SET_VALUE(r, MRB_TT_FIXNUM, value.i, (n))
+#define SET_SYM_VALUE(r,v) BOXWORD_SET_VALUE(r, MRB_TT_SYMBOL, value.sym, (v))
+#define SET_OBJ_VALUE(r,v) BOXWORD_SET_VALUE(r, (((struct RObject*)(v))->tt), value.p, (v))
+#define SET_UNDEF_VALUE(r) BOXWORD_SET_VALUE(r, MRB_TT_UNDEF, value.i, 0)
+
+#endif  /* MRUBY_BOXING_WORD_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/class.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/class.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/class.h	(revision 270)
@@ -0,0 +1,89 @@
+/*
+** mruby/class.h - Class class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_CLASS_H
+#define MRUBY_CLASS_H
+
+#include "mruby/common.h"
+
+/**
+ * Class class
+ */
+MRB_BEGIN_DECL
+
+struct RClass {
+  MRB_OBJECT_HEADER;
+  struct iv_tbl *iv;
+  struct kh_mt *mt;
+  struct RClass *super;
+};
+
+#define mrb_class_ptr(v)    ((struct RClass*)(mrb_ptr(v)))
+#define RCLASS_SUPER(v)     (((struct RClass*)(mrb_ptr(v)))->super)
+#define RCLASS_IV_TBL(v)    (((struct RClass*)(mrb_ptr(v)))->iv)
+#define RCLASS_M_TBL(v)     (((struct RClass*)(mrb_ptr(v)))->mt)
+
+static inline struct RClass*
+mrb_class(mrb_state *mrb, mrb_value v)
+{
+  switch (mrb_type(v)) {
+  case MRB_TT_FALSE:
+    if (mrb_fixnum(v))
+      return mrb->false_class;
+    return mrb->nil_class;
+  case MRB_TT_TRUE:
+    return mrb->true_class;
+  case MRB_TT_SYMBOL:
+    return mrb->symbol_class;
+  case MRB_TT_FIXNUM:
+    return mrb->fixnum_class;
+  case MRB_TT_FLOAT:
+    return mrb->float_class;
+  case MRB_TT_CPTR:
+    return mrb->object_class;
+  case MRB_TT_ENV:
+    return NULL;
+  default:
+    return mrb_obj_ptr(v)->c;
+  }
+}
+
+// TODO: figure out where to put user flags
+#define MRB_FLAG_IS_PREPENDED (1 << 19)
+#define MRB_FLAG_IS_ORIGIN (1 << 20)
+#define MRB_CLASS_ORIGIN(c) do {\
+  if (c->flags & MRB_FLAG_IS_PREPENDED) {\
+    c = c->super;\
+    while (!(c->flags & MRB_FLAG_IS_ORIGIN)) {\
+      c = c->super;\
+    }\
+  }\
+} while (0)
+#define MRB_INSTANCE_TT_MASK (0xFF)
+#define MRB_SET_INSTANCE_TT(c, tt) c->flags = ((c->flags & ~MRB_INSTANCE_TT_MASK) | (char)tt)
+#define MRB_INSTANCE_TT(c) (enum mrb_vtype)(c->flags & MRB_INSTANCE_TT_MASK)
+
+MRB_API struct RClass* mrb_define_class_id(mrb_state*, mrb_sym, struct RClass*);
+MRB_API struct RClass* mrb_define_module_id(mrb_state*, mrb_sym);
+MRB_API struct RClass *mrb_vm_define_class(mrb_state*, mrb_value, mrb_value, mrb_sym);
+MRB_API struct RClass *mrb_vm_define_module(mrb_state*, mrb_value, mrb_sym);
+MRB_API void mrb_define_method_raw(mrb_state*, struct RClass*, mrb_sym, struct RProc *);
+MRB_API void mrb_define_method_id(mrb_state *mrb, struct RClass *c, mrb_sym mid, mrb_func_t func, mrb_aspec aspec);
+MRB_API void mrb_alias_method(mrb_state *mrb, struct RClass *c, mrb_sym a, mrb_sym b);
+
+MRB_API struct RClass *mrb_class_outer_module(mrb_state*, struct RClass *);
+MRB_API struct RProc *mrb_method_search_vm(mrb_state*, struct RClass**, mrb_sym);
+MRB_API struct RProc *mrb_method_search(mrb_state*, struct RClass*, mrb_sym);
+
+MRB_API struct RClass* mrb_class_real(struct RClass* cl);
+
+void mrb_gc_mark_mt(mrb_state*, struct RClass*);
+size_t mrb_gc_mark_mt_size(mrb_state*, struct RClass*);
+void mrb_gc_free_mt(mrb_state*, struct RClass*);
+
+MRB_END_DECL
+
+#endif  /* MRUBY_CLASS_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/common.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/common.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/common.h	(revision 270)
@@ -0,0 +1,67 @@
+/*
+** mruby/common.h - mruby common platform definitions
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_COMMON_H
+#define MRUBY_COMMON_H
+
+
+#ifdef __cplusplus
+# define MRB_BEGIN_DECL extern "C" {
+# define MRB_END_DECL	}
+#else
+/** Start declarations in C mode */
+# define MRB_BEGIN_DECL
+/** End declarations in C mode */
+# define MRB_END_DECL
+#endif
+
+/**
+ * Shared compiler macros
+ */
+MRB_BEGIN_DECL
+
+/** Declare a function that never returns. */
+#if __STDC_VERSION__ >= 201112L
+# define mrb_noreturn _Noreturn
+#elif defined __GNUC__ && !defined __STRICT_ANSI__
+# define mrb_noreturn __attribute__((noreturn))
+#elif defined _MSC_VER
+# define mrb_noreturn __declspec(noreturn)
+#else
+# define mrb_noreturn
+#endif
+
+/** Mark a function as deprecated. */
+#if defined __GNUC__ && !defined __STRICT_ANSI__
+# define mrb_deprecated __attribute__((deprecated))
+#elif defined _MSC_VER
+# define mrb_deprecated __declspec(deprecated)
+#else
+# define mrb_deprecated
+#endif
+
+/** Declare a function as always inlined. */
+#if defined(_MSC_VER)
+# define MRB_INLINE static __inline
+#else
+# define MRB_INLINE static inline
+#endif
+
+
+/** Declare a public MRuby API function. */
+#if defined(MRB_BUILD_AS_DLL)
+#if defined(MRB_CORE) || defined(MRB_LIB)
+# define MRB_API __declspec(dllexport)
+#else
+# define MRB_API __declspec(dllimport)
+#endif
+#else
+# define MRB_API extern
+#endif
+
+MRB_END_DECL
+
+#endif  /* MRUBY_COMMON_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/compile.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/compile.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/compile.h	(revision 270)
@@ -0,0 +1,190 @@
+/*
+** mruby/compile.h - mruby parser
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_COMPILE_H
+#define MRUBY_COMPILE_H
+
+#include "mruby/common.h"
+
+/**
+ * MRuby Compiler
+ */
+MRB_BEGIN_DECL
+
+#include "mruby.h"
+
+struct mrb_jmpbuf;
+
+struct mrb_parser_state;
+/* load context */
+typedef struct mrbc_context {
+  mrb_sym *syms;
+  int slen;
+  char *filename;
+  short lineno;
+  int (*partial_hook)(struct mrb_parser_state*);
+  void *partial_data;
+  struct RClass *target_class;
+  mrb_bool capture_errors:1;
+  mrb_bool dump_result:1;
+  mrb_bool no_exec:1;
+  mrb_bool keep_lv:1;
+  mrb_bool no_optimize:1;
+} mrbc_context;
+
+MRB_API mrbc_context* mrbc_context_new(mrb_state *mrb);
+MRB_API void mrbc_context_free(mrb_state *mrb, mrbc_context *cxt);
+MRB_API const char *mrbc_filename(mrb_state *mrb, mrbc_context *c, const char *s);
+MRB_API void mrbc_partial_hook(mrb_state *mrb, mrbc_context *c, int (*partial_hook)(struct mrb_parser_state*), void*data);
+
+MRB_API mrb_value mrb_toplevel_run_keep(mrb_state*, struct RProc*, unsigned int);
+
+/* AST node structure */
+typedef struct mrb_ast_node {
+  struct mrb_ast_node *car, *cdr;
+  uint16_t lineno, filename_index;
+} mrb_ast_node;
+
+/* lexer states */
+enum mrb_lex_state_enum {
+  EXPR_BEG,                   /* ignore newline, +/- is a sign. */
+  EXPR_END,                   /* newline significant, +/- is an operator. */
+  EXPR_ENDARG,                /* ditto, and unbound braces. */
+  EXPR_ENDFN,                 /* ditto, and unbound braces. */
+  EXPR_ARG,                   /* newline significant, +/- is an operator. */
+  EXPR_CMDARG,                /* newline significant, +/- is an operator. */
+  EXPR_MID,                   /* newline significant, +/- is an operator. */
+  EXPR_FNAME,                 /* ignore newline, no reserved words. */
+  EXPR_DOT,                   /* right after '.' or '::', no reserved words. */
+  EXPR_CLASS,                 /* immediate after 'class', no here document. */
+  EXPR_VALUE,                 /* alike EXPR_BEG but label is disallowed. */
+  EXPR_MAX_STATE
+};
+
+/* saved error message */
+struct mrb_parser_message {
+  int lineno;
+  int column;
+  char* message;
+};
+
+#define STR_FUNC_PARSING 0x01
+#define STR_FUNC_EXPAND  0x02
+#define STR_FUNC_REGEXP  0x04
+#define STR_FUNC_WORD    0x08
+#define STR_FUNC_SYMBOL  0x10
+#define STR_FUNC_ARRAY   0x20
+#define STR_FUNC_HEREDOC 0x40
+#define STR_FUNC_XQUOTE  0x80
+
+enum mrb_string_type {
+  str_not_parsing  = (0),
+  str_squote   = (STR_FUNC_PARSING),
+  str_dquote   = (STR_FUNC_PARSING|STR_FUNC_EXPAND),
+  str_regexp   = (STR_FUNC_PARSING|STR_FUNC_REGEXP|STR_FUNC_EXPAND),
+  str_sword    = (STR_FUNC_PARSING|STR_FUNC_WORD|STR_FUNC_ARRAY),
+  str_dword    = (STR_FUNC_PARSING|STR_FUNC_WORD|STR_FUNC_ARRAY|STR_FUNC_EXPAND),
+  str_ssym     = (STR_FUNC_PARSING|STR_FUNC_SYMBOL),
+  str_ssymbols = (STR_FUNC_PARSING|STR_FUNC_SYMBOL|STR_FUNC_ARRAY),
+  str_dsymbols = (STR_FUNC_PARSING|STR_FUNC_SYMBOL|STR_FUNC_ARRAY|STR_FUNC_EXPAND),
+  str_heredoc  = (STR_FUNC_PARSING|STR_FUNC_HEREDOC),
+  str_xquote   = (STR_FUNC_PARSING|STR_FUNC_XQUOTE|STR_FUNC_EXPAND),
+};
+
+/* heredoc structure */
+struct mrb_parser_heredoc_info {
+  mrb_bool allow_indent:1;
+  mrb_bool line_head:1;
+  enum mrb_string_type type;
+  const char *term;
+  int term_len;
+  mrb_ast_node *doc;
+};
+
+#define MRB_PARSER_BUF_SIZE 1024
+
+/* parser structure */
+struct mrb_parser_state {
+  mrb_state *mrb;
+  struct mrb_pool *pool;
+  mrb_ast_node *cells;
+  const char *s, *send;
+#ifndef MRB_DISABLE_STDIO
+  FILE *f;
+#endif
+  mrbc_context *cxt;
+  char const *filename;
+  int lineno;
+  int column;
+
+  enum mrb_lex_state_enum lstate;
+  mrb_ast_node *lex_strterm; /* (type nest_level beg . end) */
+
+  unsigned int cond_stack;
+  unsigned int cmdarg_stack;
+  int paren_nest;
+  int lpar_beg;
+  int in_def, in_single;
+  mrb_bool cmd_start:1;
+  mrb_ast_node *locals;
+
+  mrb_ast_node *pb;
+  char buf[MRB_PARSER_BUF_SIZE];
+  int bidx;
+
+  mrb_ast_node *all_heredocs;	/* list of mrb_parser_heredoc_info* */
+  mrb_ast_node *heredocs_from_nextline;
+  mrb_ast_node *parsing_heredoc;
+  mrb_ast_node *lex_strterm_before_heredoc;
+  mrb_bool heredoc_end_now:1; /* for mirb */
+
+  void *ylval;
+
+  size_t nerr;
+  size_t nwarn;
+  mrb_ast_node *tree;
+
+  mrb_bool no_optimize:1;
+  mrb_bool capture_errors:1;
+  struct mrb_parser_message error_buffer[10];
+  struct mrb_parser_message warn_buffer[10];
+
+  mrb_sym* filename_table;
+  size_t filename_table_length;
+  int current_filename_index;
+
+  struct mrb_jmpbuf* jmp;
+};
+
+MRB_API struct mrb_parser_state* mrb_parser_new(mrb_state*);
+MRB_API void mrb_parser_free(struct mrb_parser_state*);
+MRB_API void mrb_parser_parse(struct mrb_parser_state*,mrbc_context*);
+
+MRB_API void mrb_parser_set_filename(struct mrb_parser_state*, char const*);
+MRB_API char const* mrb_parser_get_filename(struct mrb_parser_state*, uint16_t idx);
+
+/* utility functions */
+#ifndef MRB_DISABLE_STDIO
+MRB_API struct mrb_parser_state* mrb_parse_file(mrb_state*,FILE*,mrbc_context*);
+#endif
+MRB_API struct mrb_parser_state* mrb_parse_string(mrb_state*,const char*,mrbc_context*);
+MRB_API struct mrb_parser_state* mrb_parse_nstring(mrb_state*,const char*,int,mrbc_context*);
+MRB_API struct RProc* mrb_generate_code(mrb_state*, struct mrb_parser_state*);
+
+/* program load functions */
+#ifndef MRB_DISABLE_STDIO
+MRB_API mrb_value mrb_load_file(mrb_state*,FILE*);
+MRB_API mrb_value mrb_load_file_cxt(mrb_state*,FILE*, mrbc_context *cxt);
+#endif
+MRB_API mrb_value mrb_load_string(mrb_state *mrb, const char *s);
+MRB_API mrb_value mrb_load_nstring(mrb_state *mrb, const char *s, int len);
+MRB_API mrb_value mrb_load_string_cxt(mrb_state *mrb, const char *s, mrbc_context *cxt);
+MRB_API mrb_value mrb_load_nstring_cxt(mrb_state *mrb, const char *s, int len, mrbc_context *cxt);
+
+/** @} */
+MRB_END_DECL
+
+#endif /* MRUBY_COMPILE_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/data.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/data.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/data.h	(revision 270)
@@ -0,0 +1,75 @@
+/*
+** mruby/data.h - Data class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_DATA_H
+#define MRUBY_DATA_H
+
+#include "mruby/common.h"
+
+/**
+ * Custom C wrapped data.
+ *
+ * Defining Ruby wrappers around native objects.
+ */
+MRB_BEGIN_DECL
+
+/**
+ * Custom data type description.
+ */
+typedef struct mrb_data_type {
+  /** data type name */
+  const char *struct_name;
+
+  /** data type release function pointer */
+  void (*dfree)(mrb_state *mrb, void*);
+} mrb_data_type;
+
+struct RData {
+  MRB_OBJECT_HEADER;
+  struct iv_tbl *iv;
+  const mrb_data_type *type;
+  void *data;
+};
+
+MRB_API struct RData *mrb_data_object_alloc(mrb_state *mrb, struct RClass* klass, void *datap, const mrb_data_type *type);
+
+#define Data_Wrap_Struct(mrb,klass,type,ptr)\
+  mrb_data_object_alloc(mrb,klass,ptr,type)
+
+#define Data_Make_Struct(mrb,klass,strct,type,sval,data) do { \
+  sval = mrb_malloc(mrb, sizeof(strct));                     \
+  { static const strct zero = { 0 }; *sval = zero; };\
+  data = Data_Wrap_Struct(mrb,klass,type,sval);\
+} while (0)
+
+#define RDATA(obj)         ((struct RData *)(mrb_ptr(obj)))
+#define DATA_PTR(d)        (RDATA(d)->data)
+#define DATA_TYPE(d)       (RDATA(d)->type)
+MRB_API void mrb_data_check_type(mrb_state *mrb, mrb_value, const mrb_data_type*);
+MRB_API void *mrb_data_get_ptr(mrb_state *mrb, mrb_value, const mrb_data_type*);
+#define DATA_GET_PTR(mrb,obj,dtype,type) (type*)mrb_data_get_ptr(mrb,obj,dtype)
+MRB_API void *mrb_data_check_get_ptr(mrb_state *mrb, mrb_value, const mrb_data_type*);
+#define DATA_CHECK_GET_PTR(mrb,obj,dtype,type) (type*)mrb_data_check_get_ptr(mrb,obj,dtype)
+
+/* obsolete functions and macros */
+#define mrb_data_check_and_get(mrb,obj,dtype) mrb_data_get_ptr(mrb,obj,dtype)
+#define mrb_get_datatype(mrb,val,type) mrb_data_get_ptr(mrb, val, type)
+#define mrb_check_datatype(mrb,val,type) mrb_data_get_ptr(mrb, val, type)
+#define Data_Get_Struct(mrb,obj,type,sval) do {\
+  *(void**)&sval = mrb_data_get_ptr(mrb, obj, type); \
+} while (0)
+
+static inline void
+mrb_data_init(mrb_value v, void *ptr, const mrb_data_type *type)
+{
+  mrb_assert(mrb_type(v) == MRB_TT_DATA);
+  DATA_PTR(v) = ptr;
+  DATA_TYPE(v) = type;
+}
+
+MRB_END_DECL
+
+#endif /* MRUBY_DATA_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/debug.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/debug.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/debug.h	(revision 270)
@@ -0,0 +1,66 @@
+/*
+** mruby/debug.h - mruby debug info
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_DEBUG_H
+#define MRUBY_DEBUG_H
+
+#include "mruby/common.h"
+
+/**
+ * MRuby Debugging.
+ */
+MRB_BEGIN_DECL
+
+typedef enum mrb_debug_line_type {
+  mrb_debug_line_ary = 0,
+  mrb_debug_line_flat_map = 1
+} mrb_debug_line_type;
+
+typedef struct mrb_irep_debug_info_line {
+  uint32_t start_pos;
+  uint16_t line;
+} mrb_irep_debug_info_line;
+
+typedef struct mrb_irep_debug_info_file {
+  uint32_t start_pos;
+  const char *filename;
+  mrb_sym filename_sym;
+  uint32_t line_entry_count;
+  mrb_debug_line_type line_type;
+  union {
+    void *ptr;
+    mrb_irep_debug_info_line *flat_map;
+    uint16_t *ary;
+  } lines;
+} mrb_irep_debug_info_file;
+
+typedef struct mrb_irep_debug_info {
+  uint32_t pc_count;
+  uint16_t flen;
+  mrb_irep_debug_info_file **files;
+} mrb_irep_debug_info;
+
+/*
+ * get line from irep's debug info and program counter
+ * @return returns NULL if not found
+ */
+MRB_API const char *mrb_debug_get_filename(mrb_irep *irep, uint32_t pc);
+
+/*
+ * get line from irep's debug info and program counter
+ * @return returns -1 if not found
+ */
+MRB_API int32_t mrb_debug_get_line(mrb_irep *irep, uint32_t pc);
+
+MRB_API mrb_irep_debug_info_file *mrb_debug_info_append_file(
+    mrb_state *mrb, mrb_irep *irep,
+    uint32_t start_pos, uint32_t end_pos);
+MRB_API mrb_irep_debug_info *mrb_debug_info_alloc(mrb_state *mrb, mrb_irep *irep);
+MRB_API void mrb_debug_info_free(mrb_state *mrb, mrb_irep_debug_info *d);
+
+MRB_END_DECL
+
+#endif /* MRUBY_DEBUG_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/dump.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/dump.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/dump.h	(revision 270)
@@ -0,0 +1,215 @@
+/*
+** mruby/dump.h - mruby binary dumper (mrbc binary format)
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_DUMP_H
+#define MRUBY_DUMP_H
+
+#include "mruby.h"
+#include "mruby/irep.h"
+#include "mruby/common.h"
+
+/**
+ * Dumping compiled mruby script.
+ */
+MRB_BEGIN_DECL
+
+#define DUMP_DEBUG_INFO 1
+#define DUMP_ENDIAN_BIG 2
+#define DUMP_ENDIAN_LIL 4
+#define DUMP_ENDIAN_NAT 6
+#define DUMP_ENDIAN_MASK 6
+
+int mrb_dump_irep(mrb_state *mrb, mrb_irep *irep, uint8_t flags, uint8_t **bin, size_t *bin_size);
+#ifndef MRB_DISABLE_STDIO
+int mrb_dump_irep_binary(mrb_state*, mrb_irep*, uint8_t, FILE*);
+int mrb_dump_irep_cfunc(mrb_state *mrb, mrb_irep*, uint8_t flags, FILE *f, const char *initname);
+mrb_irep *mrb_read_irep_file(mrb_state*, FILE*);
+MRB_API mrb_value mrb_load_irep_file(mrb_state*,FILE*);
+MRB_API mrb_value mrb_load_irep_file_cxt(mrb_state*, FILE*, mrbc_context*);
+#endif
+MRB_API mrb_irep *mrb_read_irep(mrb_state*, const uint8_t*);
+
+/* dump/load error code
+ *
+ * NOTE: MRB_DUMP_GENERAL_FAILURE is caused by
+ * unspecified issues like malloc failed.
+ */
+#define MRB_DUMP_OK                     0
+#define MRB_DUMP_GENERAL_FAILURE      (-1)
+#define MRB_DUMP_WRITE_FAULT          (-2)
+#define MRB_DUMP_READ_FAULT           (-3)
+#define MRB_DUMP_CRC_ERROR            (-4)
+#define MRB_DUMP_INVALID_FILE_HEADER  (-5)
+#define MRB_DUMP_INVALID_IREP         (-6)
+#define MRB_DUMP_INVALID_ARGUMENT     (-7)
+
+/* null symbol length */
+#define MRB_DUMP_NULL_SYM_LEN         0xFFFF
+
+/* Rite Binary File header */
+#define RITE_BINARY_IDENT              "RITE"
+#define RITE_BINARY_IDENT_LIL          "ETIR"
+#define RITE_BINARY_FORMAT_VER         "0003"
+#define RITE_COMPILER_NAME             "MATZ"
+#define RITE_COMPILER_VERSION          "0000"
+
+#define RITE_VM_VER                    "0000"
+
+#define RITE_BINARY_EOF                "END\0"
+#define RITE_SECTION_IREP_IDENT        "IREP"
+#define RITE_SECTION_LINENO_IDENT      "LINE"
+#define RITE_SECTION_DEBUG_IDENT       "DBG\0"
+#define RITE_SECTION_LV_IDENT          "LVAR"
+
+#define MRB_DUMP_DEFAULT_STR_LEN      128
+#define MRB_DUMP_ALIGNMENT            sizeof(uint32_t)
+
+#ifdef __CA850__
+#pragma pack(1)
+#elif __RX
+#pragma pack
+#elif _MSC_VER
+#pragma pack(push, 1)
+#endif
+#ifndef __GNUC__
+#define __attribute__(x)
+#endif // !__GNUC__
+
+/* binary header */
+struct rite_binary_header {
+  uint8_t binary_ident[4];    /* Binary Identifier */
+  uint8_t binary_version[4];  /* Binary Format Version */
+  uint8_t binary_crc[2];      /* Binary CRC */
+  uint8_t binary_size[4];     /* Binary Size */
+  uint8_t compiler_name[4];   /* Compiler name */
+  uint8_t compiler_version[4];
+} __attribute__((packed));
+
+/* section header */
+#define RITE_SECTION_HEADER \
+  uint8_t section_ident[4]; \
+  uint8_t section_size[4]
+
+struct rite_section_header {
+  RITE_SECTION_HEADER;
+} __attribute__((packed));
+
+struct rite_section_irep_header {
+  RITE_SECTION_HEADER;
+
+  uint8_t rite_version[4];    /* Rite Instruction Specification Version */
+} __attribute__((packed));
+
+struct rite_section_lineno_header {
+  RITE_SECTION_HEADER;
+} __attribute__((packed));
+
+struct rite_section_debug_header {
+  RITE_SECTION_HEADER;
+} __attribute__((packed));
+
+struct rite_section_lv_header {
+  RITE_SECTION_HEADER;
+} __attribute__((packed));
+
+#define RITE_LV_NULL_MARK              UINT16_MAX
+
+struct rite_binary_footer {
+  RITE_SECTION_HEADER;
+} __attribute__((packed));
+
+#ifdef __CA850__
+#pragma pack(8)
+#elif __RX
+#pragma unpack
+#elif _MSC_VER
+#pragma pack(pop)
+#endif
+
+static inline int
+bigendian_p()
+{
+  int i;
+  char *p;
+
+  i = 1;
+  p = (char*)&i;
+  return p[0]?0:1;
+}
+
+static inline size_t
+uint8_to_bin(uint8_t s, uint8_t *bin)
+{
+  *bin = s;
+  return sizeof(uint8_t);
+}
+
+static inline size_t
+uint16_to_bin(uint16_t s, uint8_t *bin)
+{
+  *bin++ = (s >> 8) & 0xff;
+  *bin   = s & 0xff;
+  return sizeof(uint16_t);
+}
+
+static inline size_t
+uint32_to_bin(uint32_t l, uint8_t *bin)
+{
+  *bin++ = (l >> 24) & 0xff;
+  *bin++ = (l >> 16) & 0xff;
+  *bin++ = (l >> 8) & 0xff;
+  *bin   = l & 0xff;
+  return sizeof(uint32_t);
+}
+
+static inline size_t
+uint32l_to_bin(uint32_t l, uint8_t *bin)
+{
+  bin[3] = (l >> 24) & 0xff;
+  bin[2] = (l >> 16) & 0xff;
+  bin[1] = (l >> 8) & 0xff;
+  bin[0] = l & 0xff;
+  return sizeof(uint32_t);
+}
+
+static inline uint32_t
+bin_to_uint32(const uint8_t *bin)
+{
+  return (uint32_t)bin[0] << 24 |
+         (uint32_t)bin[1] << 16 |
+         (uint32_t)bin[2] << 8  |
+         (uint32_t)bin[3];
+}
+
+static inline uint32_t
+bin_to_uint32l(const uint8_t *bin)
+{
+  return (uint32_t)bin[3] << 24 |
+         (uint32_t)bin[2] << 16 |
+         (uint32_t)bin[1] << 8  |
+         (uint32_t)bin[0];
+}
+
+static inline uint16_t
+bin_to_uint16(const uint8_t *bin)
+{
+  return (uint16_t)bin[0] << 8 |
+         (uint16_t)bin[1];
+}
+
+static inline uint8_t
+bin_to_uint8(const uint8_t *bin)
+{
+  return (uint8_t)bin[0];
+}
+
+MRB_END_DECL
+
+/** @internal crc.c */
+uint16_t
+calc_crc_16_ccitt(const uint8_t *src, size_t nbytes, uint16_t crc);
+
+#endif  /* MRUBY_DUMP_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/error.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/error.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/error.h	(revision 270)
@@ -0,0 +1,69 @@
+/*
+** mruby/error.h - Exception class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_ERROR_H
+#define MRUBY_ERROR_H
+
+#include "mruby/common.h"
+
+/**
+ * MRuby error handling.
+ */
+MRB_BEGIN_DECL
+
+struct RException {
+  MRB_OBJECT_HEADER;
+  struct iv_tbl *iv;
+};
+
+#define mrb_exc_ptr(v) ((struct RException*)mrb_ptr(v))
+
+MRB_API void mrb_sys_fail(mrb_state *mrb, const char *mesg);
+MRB_API mrb_value mrb_exc_new_str(mrb_state *mrb, struct RClass* c, mrb_value str);
+#define mrb_exc_new_str_lit(mrb, c, lit) mrb_exc_new_str(mrb, c, mrb_str_new_lit(mrb, lit))
+MRB_API mrb_value mrb_make_exception(mrb_state *mrb, int argc, const mrb_value *argv);
+MRB_API mrb_value mrb_exc_backtrace(mrb_state *mrb, mrb_value exc);
+MRB_API mrb_value mrb_get_backtrace(mrb_state *mrb);
+MRB_API mrb_noreturn void mrb_no_method_error(mrb_state *mrb, mrb_sym id, mrb_value args, const char *fmt, ...);
+
+/* declaration for fail method */
+MRB_API mrb_value mrb_f_raise(mrb_state*, mrb_value);
+
+/**
+ * Protect
+ *
+ * @mrbgem mruby-error
+ */
+MRB_API mrb_value mrb_protect(mrb_state *mrb, mrb_func_t body, mrb_value data, mrb_bool *state);
+
+/**
+ * Ensure
+ *
+ * @mrbgem mruby-error
+ */
+MRB_API mrb_value mrb_ensure(mrb_state *mrb, mrb_func_t body, mrb_value b_data,
+                             mrb_func_t ensure, mrb_value e_data);
+
+/**
+ * Rescue
+ *
+ * @mrbgem mruby-error
+ */
+MRB_API mrb_value mrb_rescue(mrb_state *mrb, mrb_func_t body, mrb_value b_data,
+                             mrb_func_t rescue, mrb_value r_data);
+
+/**
+ * Rescue exception
+ *
+ * @mrbgem mruby-error
+ */
+MRB_API mrb_value mrb_rescue_exceptions(mrb_state *mrb, mrb_func_t body, mrb_value b_data,
+                                        mrb_func_t rescue, mrb_value r_data,
+                                        mrb_int len, struct RClass **classes);
+
+MRB_END_DECL
+
+#endif  /* MRUBY_ERROR_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/gc.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/gc.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/gc.h	(revision 270)
@@ -0,0 +1,77 @@
+/*
+** mruby/gc.h - garbage collector for mruby
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_GC_H
+#define MRUBY_GC_H
+
+#include "mruby/common.h"
+
+/**
+ * Uncommon memory management stuffs.
+ */
+MRB_BEGIN_DECL
+
+
+struct mrb_state;
+
+typedef void (mrb_each_object_callback)(struct mrb_state *mrb, struct RBasic *obj, void *data);
+void mrb_objspace_each_objects(struct mrb_state *mrb, mrb_each_object_callback *callback, void *data);
+MRB_API void mrb_free_context(struct mrb_state *mrb, struct mrb_context *c);
+
+#ifndef MRB_GC_ARENA_SIZE
+#define MRB_GC_ARENA_SIZE 100
+#endif
+
+typedef enum {
+  MRB_GC_STATE_ROOT = 0,
+  MRB_GC_STATE_MARK,
+  MRB_GC_STATE_SWEEP
+} mrb_gc_state;
+
+typedef struct mrb_heap_page {
+  struct RBasic *freelist;
+  struct mrb_heap_page *prev;
+  struct mrb_heap_page *next;
+  struct mrb_heap_page *free_next;
+  struct mrb_heap_page *free_prev;
+  mrb_bool old:1;
+  void *objects[];
+} mrb_heap_page;
+
+typedef struct mrb_gc {
+  mrb_heap_page *heaps;                /* heaps for GC */
+  mrb_heap_page *sweeps;
+  mrb_heap_page *free_heaps;
+  size_t live; /* count of live objects */
+#ifdef MRB_GC_FIXED_ARENA
+  struct RBasic *arena[MRB_GC_ARENA_SIZE]; /* GC protection array */
+#else
+  struct RBasic **arena;                   /* GC protection array */
+  int arena_capa;
+#endif
+  int arena_idx;
+
+  mrb_gc_state state; /* state of gc */
+  int current_white_part; /* make white object by white_part */
+  struct RBasic *gray_list; /* list of gray objects to be traversed incrementally */
+  struct RBasic *atomic_gray_list; /* list of objects to be traversed atomically */
+  size_t live_after_mark;
+  size_t threshold;
+  int interval_ratio;
+  int step_ratio;
+  mrb_bool disabled      :1;
+  mrb_bool full          :1;
+  mrb_bool generational  :1;
+  mrb_bool out_of_memory :1;
+  size_t majorgc_old_threshold;
+} mrb_gc;
+
+MRB_API mrb_bool
+mrb_object_dead_p(struct mrb_state *mrb, struct RBasic *object);
+
+MRB_END_DECL
+
+#endif  /* MRUBY_GC_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/hash.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/hash.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/hash.h	(revision 270)
@@ -0,0 +1,79 @@
+/*
+** mruby/hash.h - Hash class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_HASH_H
+#define MRUBY_HASH_H
+
+#include "mruby/common.h"
+
+/**
+ * Hash class
+ */
+MRB_BEGIN_DECL
+
+struct RHash {
+  MRB_OBJECT_HEADER;
+  struct iv_tbl *iv;
+  struct kh_ht *ht;
+};
+
+#define mrb_hash_ptr(v)    ((struct RHash*)(mrb_ptr(v)))
+#define mrb_hash_value(p)  mrb_obj_value((void*)(p))
+
+MRB_API mrb_value mrb_hash_new_capa(mrb_state*, int);
+
+/*
+ * Initializes a new hash.
+ */
+MRB_API mrb_value mrb_hash_new(mrb_state *mrb);
+
+/*
+ * Sets a keys and values to hashes.
+ */
+MRB_API void mrb_hash_set(mrb_state *mrb, mrb_value hash, mrb_value key, mrb_value val);
+
+/*
+ * Gets a value from a key.
+ */
+MRB_API mrb_value mrb_hash_get(mrb_state *mrb, mrb_value hash, mrb_value key);
+
+MRB_API mrb_value mrb_hash_fetch(mrb_state *mrb, mrb_value hash, mrb_value key, mrb_value def);
+
+/*
+ * Deletes hash key and value pair.
+ */
+MRB_API mrb_value mrb_hash_delete_key(mrb_state *mrb, mrb_value hash, mrb_value key);
+
+/*
+ * Gets an array of keys.
+ */
+MRB_API mrb_value mrb_hash_keys(mrb_state *mrb, mrb_value hash);
+MRB_API mrb_value mrb_check_hash_type(mrb_state *mrb, mrb_value hash);
+MRB_API mrb_value mrb_hash_empty_p(mrb_state *mrb, mrb_value self);
+
+/*
+ * Clears the hash.
+ */
+MRB_API mrb_value mrb_hash_clear(mrb_state *mrb, mrb_value hash);
+
+/* RHASH_TBL allocates st_table if not available. */
+#define RHASH(obj)   ((struct RHash*)(mrb_ptr(obj)))
+#define RHASH_TBL(h)          (RHASH(h)->ht)
+#define RHASH_IFNONE(h)       mrb_iv_get(mrb, (h), mrb_intern_lit(mrb, "ifnone"))
+#define RHASH_PROCDEFAULT(h)  RHASH_IFNONE(h)
+MRB_API struct kh_ht * mrb_hash_tbl(mrb_state *mrb, mrb_value hash);
+
+#define MRB_HASH_PROC_DEFAULT 256
+#define MRB_RHASH_PROCDEFAULT_P(h) (RHASH(h)->flags & MRB_HASH_PROC_DEFAULT)
+
+/* GC functions */
+void mrb_gc_mark_hash(mrb_state*, struct RHash*);
+size_t mrb_gc_mark_hash_size(mrb_state*, struct RHash*);
+void mrb_gc_free_hash(mrb_state*, struct RHash*);
+
+MRB_END_DECL
+
+#endif  /* MRUBY_HASH_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/irep.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/irep.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/irep.h	(revision 270)
@@ -0,0 +1,60 @@
+/*
+** mruby/irep.h - mrb_irep structure
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_IREP_H
+#define MRUBY_IREP_H
+
+#include "mruby/common.h"
+#include "mruby/compile.h"
+
+/**
+ * Compiled mruby scripts.
+ */
+MRB_BEGIN_DECL
+
+enum irep_pool_type {
+  IREP_TT_STRING,
+  IREP_TT_FIXNUM,
+  IREP_TT_FLOAT,
+};
+
+struct mrb_locals {
+  mrb_sym name;
+  uint16_t r;
+};
+
+/* Program data array struct */
+typedef struct mrb_irep {
+  uint16_t nlocals;        /* Number of local variables */
+  uint16_t nregs;          /* Number of register variables */
+  uint8_t flags;
+
+  mrb_code *iseq;
+  mrb_value *pool;
+  mrb_sym *syms;
+  struct mrb_irep **reps;
+
+  struct mrb_locals *lv;
+  /* debug info */
+  const char *filename;
+  uint16_t *lines;
+  struct mrb_irep_debug_info* debug_info;
+
+  size_t ilen, plen, slen, rlen, refcnt;
+} mrb_irep;
+
+#define MRB_ISEQ_NO_FREE 1
+
+MRB_API mrb_irep *mrb_add_irep(mrb_state *mrb);
+MRB_API mrb_value mrb_load_irep(mrb_state*, const uint8_t*);
+MRB_API mrb_value mrb_load_irep_cxt(mrb_state*, const uint8_t*, mrbc_context*);
+void mrb_irep_free(mrb_state*, struct mrb_irep*);
+void mrb_irep_incref(mrb_state*, struct mrb_irep*);
+void mrb_irep_decref(mrb_state*, struct mrb_irep*);
+
+MRB_END_DECL
+
+#endif  /* MRUBY_IREP_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/khash.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/khash.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/khash.h	(revision 270)
@@ -0,0 +1,274 @@
+/*
+** mruby/khash.c - Hash for mruby
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_KHASH_H
+#define MRUBY_KHASH_H
+
+#include <string.h>
+
+#include "mruby.h"
+#include "mruby/common.h"
+
+/**
+ * khash definitions used in mruby's hash table.
+ */
+MRB_BEGIN_DECL
+
+typedef uint32_t khint_t;
+typedef khint_t khiter_t;
+
+#ifndef KHASH_DEFAULT_SIZE
+# define KHASH_DEFAULT_SIZE 32
+#endif
+#define KHASH_MIN_SIZE 8
+
+#define UPPER_BOUND(x) ((x)>>2|(x)>>1)
+
+/* extern uint8_t __m[]; */
+
+/* mask for flags */
+static const uint8_t __m_empty[]  = {0x02, 0x08, 0x20, 0x80};
+static const uint8_t __m_del[]    = {0x01, 0x04, 0x10, 0x40};
+static const uint8_t __m_either[] = {0x03, 0x0c, 0x30, 0xc0};
+
+
+#define __ac_isempty(ed_flag, i) (ed_flag[(i)/4]&__m_empty[(i)%4])
+#define __ac_isdel(ed_flag, i) (ed_flag[(i)/4]&__m_del[(i)%4])
+#define __ac_iseither(ed_flag, i) (ed_flag[(i)/4]&__m_either[(i)%4])
+#define khash_power2(v) do { \
+  v--;\
+  v |= v >> 1;\
+  v |= v >> 2;\
+  v |= v >> 4;\
+  v |= v >> 8;\
+  v |= v >> 16;\
+  v++;\
+} while (0)
+#define khash_mask(h) ((h)->n_buckets-1)
+#define khash_upper_bound(h) (UPPER_BOUND((h)->n_buckets))
+
+/* declare struct kh_xxx and kh_xxx_funcs
+
+   name: hash name
+   khkey_t: key data type
+   khval_t: value data type
+   kh_is_map: (0: hash set / 1: hash map)
+*/
+#define KHASH_DECLARE(name, khkey_t, khval_t, kh_is_map)                \
+  typedef struct kh_##name {                                            \
+    khint_t n_buckets;                                                  \
+    khint_t size;                                                       \
+    khint_t n_occupied;                                                 \
+    uint8_t *ed_flags;                                                  \
+    khkey_t *keys;                                                      \
+    khval_t *vals;                                                      \
+  } kh_##name##_t;                                                      \
+  void kh_alloc_##name(mrb_state *mrb, kh_##name##_t *h);               \
+  kh_##name##_t *kh_init_##name##_size(mrb_state *mrb, khint_t size);   \
+  kh_##name##_t *kh_init_##name(mrb_state *mrb);                        \
+  void kh_destroy_##name(mrb_state *mrb, kh_##name##_t *h);             \
+  void kh_clear_##name(mrb_state *mrb, kh_##name##_t *h);               \
+  khint_t kh_get_##name(mrb_state *mrb, kh_##name##_t *h, khkey_t key);           \
+  khint_t kh_put_##name(mrb_state *mrb, kh_##name##_t *h, khkey_t key, int *ret); \
+  void kh_resize_##name(mrb_state *mrb, kh_##name##_t *h, khint_t new_n_buckets); \
+  void kh_del_##name(mrb_state *mrb, kh_##name##_t *h, khint_t x);                \
+  kh_##name##_t *kh_copy_##name(mrb_state *mrb, kh_##name##_t *h);
+
+static inline void
+kh_fill_flags(uint8_t *p, uint8_t c, size_t len)
+{
+  while (len-- > 0) {
+    *p++ = c;
+  }
+}
+
+/* define kh_xxx_funcs
+
+   name: hash name
+   khkey_t: key data type
+   khval_t: value data type
+   kh_is_map: (0: hash set / 1: hash map)
+   __hash_func: hash function
+   __hash_equal: hash comparation function
+*/
+#define KHASH_DEFINE(name, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \
+  void kh_alloc_##name(mrb_state *mrb, kh_##name##_t *h)                \
+  {                                                                     \
+    khint_t sz = h->n_buckets;                                          \
+    size_t len = sizeof(khkey_t) + (kh_is_map ? sizeof(khval_t) : 0);   \
+    uint8_t *p = (uint8_t*)mrb_malloc(mrb, sizeof(uint8_t)*sz/4+len*sz); \
+    h->size = h->n_occupied = 0;                                        \
+    h->keys = (khkey_t *)p;                                             \
+    h->vals = kh_is_map ? (khval_t *)(p+sizeof(khkey_t)*sz) : NULL;     \
+    h->ed_flags = p+len*sz;                                             \
+    kh_fill_flags(h->ed_flags, 0xaa, sz/4);                             \
+  }                                                                     \
+  kh_##name##_t *kh_init_##name##_size(mrb_state *mrb, khint_t size) {  \
+    kh_##name##_t *h = (kh_##name##_t*)mrb_calloc(mrb, 1, sizeof(kh_##name##_t)); \
+    if (size < KHASH_MIN_SIZE)                                          \
+      size = KHASH_MIN_SIZE;                                            \
+    khash_power2(size);                                                 \
+    h->n_buckets = size;                                                \
+    kh_alloc_##name(mrb, h);                                            \
+    return h;                                                           \
+  }                                                                     \
+  kh_##name##_t *kh_init_##name(mrb_state *mrb) {                       \
+    return kh_init_##name##_size(mrb, KHASH_DEFAULT_SIZE);              \
+  }                                                                     \
+  void kh_destroy_##name(mrb_state *mrb, kh_##name##_t *h)              \
+  {                                                                     \
+    if (h) {                                                            \
+      mrb_free(mrb, h->keys);                                           \
+      mrb_free(mrb, h);                                                 \
+    }                                                                   \
+  }                                                                     \
+  void kh_clear_##name(mrb_state *mrb, kh_##name##_t *h)                \
+  {                                                                     \
+    (void)mrb;                                                          \
+    if (h && h->ed_flags) {                                             \
+      kh_fill_flags(h->ed_flags, 0xaa, h->n_buckets/4);                 \
+      h->size = h->n_occupied = 0;                                      \
+    }                                                                   \
+  }                                                                     \
+  khint_t kh_get_##name(mrb_state *mrb, kh_##name##_t *h, khkey_t key)  \
+  {                                                                     \
+    khint_t k = __hash_func(mrb,key) & khash_mask(h), step = 0;         \
+    (void)mrb;                                                          \
+    while (!__ac_isempty(h->ed_flags, k)) {                             \
+      if (!__ac_isdel(h->ed_flags, k)) {                                \
+        if (__hash_equal(mrb,h->keys[k], key)) return k;                \
+      }                                                                 \
+      k = (k+(++step)) & khash_mask(h);                                 \
+    }                                                                   \
+    return kh_end(h);                                                   \
+  }                                                                     \
+  void kh_resize_##name(mrb_state *mrb, kh_##name##_t *h, khint_t new_n_buckets) \
+  {                                                                     \
+    if (new_n_buckets < KHASH_MIN_SIZE)                                 \
+      new_n_buckets = KHASH_MIN_SIZE;                                   \
+    khash_power2(new_n_buckets);                                        \
+    {                                                                   \
+      kh_##name##_t hh;                                                 \
+      uint8_t *old_ed_flags = h->ed_flags;                              \
+      khkey_t *old_keys = h->keys;                                      \
+      khval_t *old_vals = h->vals;                                      \
+      khint_t old_n_buckets = h->n_buckets;                             \
+      khint_t i;                                                        \
+      hh.n_buckets = new_n_buckets;                                     \
+      kh_alloc_##name(mrb, &hh);                                        \
+      /* relocate */                                                    \
+      for (i=0 ; i<old_n_buckets ; i++) {                               \
+        if (!__ac_iseither(old_ed_flags, i)) {                          \
+          khint_t k = kh_put_##name(mrb, &hh, old_keys[i], NULL);       \
+          if (kh_is_map) kh_value(&hh,k) = old_vals[i];                 \
+        }                                                               \
+      }                                                                 \
+      /* copy hh to h */                                                \
+      *h = hh;                                                          \
+      mrb_free(mrb, old_keys);                                          \
+    }                                                                   \
+  }                                                                     \
+  khint_t kh_put_##name(mrb_state *mrb, kh_##name##_t *h, khkey_t key, int *ret) \
+  {                                                                     \
+    khint_t k, del_k, step = 0;                                         \
+    if (h->n_occupied >= khash_upper_bound(h)) {                        \
+      kh_resize_##name(mrb, h, h->n_buckets*2);                         \
+    }                                                                   \
+    k = __hash_func(mrb,key) & khash_mask(h);                           \
+    del_k = kh_end(h);                                                  \
+    while (!__ac_isempty(h->ed_flags, k)) {                             \
+      if (!__ac_isdel(h->ed_flags, k)) {                                \
+        if (__hash_equal(mrb,h->keys[k], key)) {                        \
+          if (ret) *ret = 0;                                            \
+          return k;                                                     \
+        }                                                               \
+      }                                                                 \
+      else if (del_k == kh_end(h)) {                                    \
+        del_k = k;                                                      \
+      }                                                                 \
+      k = (k+(++step)) & khash_mask(h);                                 \
+    }                                                                   \
+    if (del_k != kh_end(h)) {                                           \
+      /* put at del */                                                  \
+      h->keys[del_k] = key;                                             \
+      h->ed_flags[del_k/4] &= ~__m_del[del_k%4];                        \
+      h->size++;                                                        \
+      if (ret) *ret = 2;                                                \
+      return del_k;                                                     \
+    }                                                                   \
+    else {                                                              \
+      /* put at empty */                                                \
+      h->keys[k] = key;                                                 \
+      h->ed_flags[k/4] &= ~__m_empty[k%4];                              \
+      h->size++;                                                        \
+      h->n_occupied++;                                                  \
+      if (ret) *ret = 1;                                                \
+      return k;                                                         \
+    }                                                                   \
+  }                                                                     \
+  void kh_del_##name(mrb_state *mrb, kh_##name##_t *h, khint_t x)       \
+  {                                                                     \
+    (void)mrb;                                                          \
+    mrb_assert(x != h->n_buckets && !__ac_iseither(h->ed_flags, x));    \
+    h->ed_flags[x/4] |= __m_del[x%4];                                   \
+    h->size--;                                                          \
+  }                                                                     \
+  kh_##name##_t *kh_copy_##name(mrb_state *mrb, kh_##name##_t *h)       \
+  {                                                                     \
+    kh_##name##_t *h2;                                                  \
+    khiter_t k, k2;                                                     \
+                                                                        \
+    h2 = kh_init_##name(mrb);                                           \
+    for (k = kh_begin(h); k != kh_end(h); k++) {                        \
+      if (kh_exist(h, k)) {                                             \
+        k2 = kh_put_##name(mrb, h2, kh_key(h, k), NULL);                \
+        if (kh_is_map) kh_value(h2, k2) = kh_value(h, k);               \
+      }                                                                 \
+    }                                                                   \
+    return h2;                                                          \
+  }
+
+
+#define khash_t(name) kh_##name##_t
+
+#define kh_init_size(name,mrb,size) kh_init_##name##_size(mrb,size)
+#define kh_init(name,mrb) kh_init_##name(mrb)
+#define kh_destroy(name, mrb, h) kh_destroy_##name(mrb, h)
+#define kh_clear(name, mrb, h) kh_clear_##name(mrb, h)
+#define kh_resize(name, mrb, h, s) kh_resize_##name(mrb, h, s)
+#define kh_put(name, mrb, h, k) kh_put_##name(mrb, h, k, NULL)
+#define kh_put2(name, mrb, h, k, r) kh_put_##name(mrb, h, k, r)
+#define kh_get(name, mrb, h, k) kh_get_##name(mrb, h, k)
+#define kh_del(name, mrb, h, k) kh_del_##name(mrb, h, k)
+#define kh_copy(name, mrb, h) kh_copy_##name(mrb, h)
+
+#define kh_exist(h, x) (!__ac_iseither((h)->ed_flags, (x)))
+#define kh_key(h, x) ((h)->keys[x])
+#define kh_val(h, x) ((h)->vals[x])
+#define kh_value(h, x) ((h)->vals[x])
+#define kh_begin(h) (khint_t)(0)
+#define kh_end(h) ((h)->n_buckets)
+#define kh_size(h) ((h)->size)
+#define kh_n_buckets(h) ((h)->n_buckets)
+
+#define kh_int_hash_func(mrb,key) (khint_t)((key)^((key)<<2)^((key)>>2))
+#define kh_int_hash_equal(mrb,a, b) (a == b)
+#define kh_int64_hash_func(mrb,key) (khint_t)((key)>>33^(key)^(key)<<11)
+#define kh_int64_hash_equal(mrb,a, b) (a == b)
+static inline khint_t __ac_X31_hash_string(const char *s)
+{
+    khint_t h = *s;
+    if (h) for (++s ; *s; ++s) h = (h << 5) - h + *s;
+    return h;
+}
+#define kh_str_hash_func(mrb,key) __ac_X31_hash_string(key)
+#define kh_str_hash_equal(mrb,a, b) (strcmp(a, b) == 0)
+
+typedef const char *kh_cstr_t;
+
+MRB_END_DECL
+
+#endif  /* MRUBY_KHASH_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/numeric.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/numeric.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/numeric.h	(revision 270)
@@ -0,0 +1,110 @@
+/*
+** mruby/numeric.h - Numeric, Integer, Float, Fixnum class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_NUMERIC_H
+#define MRUBY_NUMERIC_H
+
+#include "mruby/common.h"
+
+/**
+ * Numeric class and it's sub-classes.
+ *
+ * Integer, Float and Fixnum
+ */
+MRB_BEGIN_DECL
+
+#define POSFIXABLE(f) ((f) <= MRB_INT_MAX)
+#define NEGFIXABLE(f) ((f) >= MRB_INT_MIN)
+#define FIXABLE(f) (POSFIXABLE(f) && NEGFIXABLE(f))
+
+MRB_API mrb_value mrb_flo_to_fixnum(mrb_state *mrb, mrb_value val);
+MRB_API mrb_value mrb_fixnum_to_str(mrb_state *mrb, mrb_value x, int base);
+/* ArgumentError if format string doesn't match /%(\.[0-9]+)?[aAeEfFgG]/ */
+MRB_API mrb_value mrb_float_to_str(mrb_state *mrb, mrb_value x, const char *fmt);
+MRB_API mrb_float mrb_to_flo(mrb_state *mrb, mrb_value x);
+
+mrb_value mrb_fixnum_plus(mrb_state *mrb, mrb_value x, mrb_value y);
+mrb_value mrb_fixnum_minus(mrb_state *mrb, mrb_value x, mrb_value y);
+mrb_value mrb_fixnum_mul(mrb_state *mrb, mrb_value x, mrb_value y);
+mrb_value mrb_num_div(mrb_state *mrb, mrb_value x, mrb_value y);
+
+#define MRB_UINT_MAKE2(n) uint ## n ## _t
+#define MRB_UINT_MAKE(n) MRB_UINT_MAKE2(n)
+#define mrb_uint MRB_UINT_MAKE(MRB_INT_BIT)
+
+#define MRB_INT_OVERFLOW_MASK ((mrb_uint)1 << (MRB_INT_BIT - 1 - MRB_FIXNUM_SHIFT))
+
+/* Idea from Potion: https://github.com/perl11/potion (MIT) */
+#if (defined(__clang__) && ((__clang_major__ > 3) || (__clang_major__ == 3 && __clang_minor__ >= 4))) \
+    || (defined(__GNUC__) && __GNUC__ >= 5)
+
+static inline mrb_bool
+mrb_int_add_overflow(mrb_int augend, mrb_int addend, mrb_int *sum)
+{
+  mrb_bool of;
+
+#ifdef MRB_INT64
+  long long val;
+  of = __builtin_saddll_overflow(augend, addend, &val) ||
+#else
+  int val;
+  of = __builtin_sadd_overflow(augend, addend, &val) ||
+#endif
+  (val > MRB_INT_MAX) || (val < MRB_INT_MIN);
+
+  *sum = (mrb_int) val;
+  return of;
+}
+
+static inline mrb_bool
+mrb_int_sub_overflow(mrb_int minuend, mrb_int subtrahend, mrb_int *difference)
+{
+  mrb_bool of;
+
+#ifdef MRB_INT64
+  long long val;
+  of = __builtin_ssubll_overflow(minuend, subtrahend, &val) ||
+#else
+  int val;
+  of = __builtin_ssub_overflow(minuend, subtrahend, &val) ||
+#endif
+  (val > MRB_INT_MAX) || (val < MRB_INT_MIN);
+
+  *difference = (mrb_int) val;
+  return of;
+}
+#else
+
+static inline mrb_bool
+mrb_int_add_overflow(mrb_int augend, mrb_int addend, mrb_int *sum)
+{
+  mrb_uint x = (mrb_uint)augend;
+  mrb_uint y = (mrb_uint)addend;
+  mrb_uint z = (mrb_uint)(x + y);
+  *sum = (mrb_int)z;
+  return !!(((x ^ z) & (y ^ z)) & MRB_INT_OVERFLOW_MASK);
+}
+
+static inline mrb_bool
+mrb_int_sub_overflow(mrb_int minuend, mrb_int subtrahend, mrb_int *difference)
+{
+  mrb_uint x = (mrb_uint)minuend;
+  mrb_uint y = (mrb_uint)subtrahend;
+  mrb_uint z = (mrb_uint)(x - y);
+  *difference = (mrb_int)z;
+  return !!(((x ^ z) & (~y ^ z)) & MRB_INT_OVERFLOW_MASK);
+}
+
+#endif
+
+#undef MRB_INT_OVERFLOW_MASK
+#undef mrb_uint
+#undef MRB_UINT_MAKE
+#undef MRB_UINT_MAKE2
+
+MRB_END_DECL
+
+#endif  /* MRUBY_NUMERIC_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/object.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/object.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/object.h	(revision 270)
@@ -0,0 +1,39 @@
+/*
+** mruby/object.h - mruby object definition
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_OBJECT_H
+#define MRUBY_OBJECT_H
+
+#define MRB_OBJECT_HEADER \
+  enum mrb_vtype tt:8;\
+  uint32_t color:3;\
+  uint32_t flags:21;\
+  struct RClass *c;\
+  struct RBasic *gcnext
+
+#define MRB_FLAG_TEST(obj, flag) ((obj)->flags & flag)
+
+
+struct RBasic {
+  MRB_OBJECT_HEADER;
+};
+#define mrb_basic_ptr(v) ((struct RBasic*)(mrb_ptr(v)))
+
+struct RObject {
+  MRB_OBJECT_HEADER;
+  struct iv_tbl *iv;
+};
+#define mrb_obj_ptr(v)   ((struct RObject*)(mrb_ptr(v)))
+
+#define mrb_immediate_p(x) (mrb_type(x) < MRB_TT_HAS_BASIC)
+#define mrb_special_const_p(x) mrb_immediate_p(x)
+
+struct RFiber {
+  MRB_OBJECT_HEADER;
+  struct mrb_context *cxt;
+};
+
+#endif  /* MRUBY_OBJECT_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/opcode.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/opcode.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/opcode.h	(revision 270)
@@ -0,0 +1,160 @@
+/*
+** mruby/opcode.h - RiteVM operation codes
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_OPCODE_H
+#define MRUBY_OPCODE_H
+
+#define MAXARG_Bx        (0xffff)
+#define MAXARG_sBx       (MAXARG_Bx>>1)         /* 'sBx' is signed */
+
+/* instructions: packed 32 bit      */
+/* -------------------------------  */
+/*     A:B:C:OP = 9: 9: 7: 7        */
+/*      A:Bx:OP =    9:16: 7        */
+/*        Ax:OP =      25: 7        */
+/*   A:Bz:Cz:OP = 9:14: 2: 7        */
+
+#define GET_OPCODE(i)            ((int)(((mrb_code)(i)) & 0x7f))
+#define GETARG_A(i)              ((int)((((mrb_code)(i)) >> 23) & 0x1ff))
+#define GETARG_B(i)              ((int)((((mrb_code)(i)) >> 14) & 0x1ff))
+#define GETARG_C(i)              ((int)((((mrb_code)(i)) >>  7) & 0x7f))
+#define GETARG_Bx(i)             ((int)((((mrb_code)(i)) >>  7) & 0xffff))
+#define GETARG_sBx(i)            ((int)(GETARG_Bx(i)-MAXARG_sBx))
+#define GETARG_Ax(i)             ((int32_t)((((mrb_code)(i)) >>  7) & 0x1ffffff))
+#define GETARG_UNPACK_b(i,n1,n2) ((int)((((mrb_code)(i)) >> (7+(n2))) & (((1<<(n1))-1))))
+#define GETARG_UNPACK_c(i,n1,n2) ((int)((((mrb_code)(i)) >> 7) & (((1<<(n2))-1))))
+#define GETARG_b(i)              GETARG_UNPACK_b(i,14,2)
+#define GETARG_c(i)              GETARG_UNPACK_c(i,14,2)
+
+#define MKOPCODE(op)          ((op) & 0x7f)
+#define MKARG_A(c)            ((mrb_code)((c) & 0x1ff) << 23)
+#define MKARG_B(c)            ((mrb_code)((c) & 0x1ff) << 14)
+#define MKARG_C(c)            (((c) & 0x7f) <<  7)
+#define MKARG_Bx(v)           ((mrb_code)((v) & 0xffff) << 7)
+#define MKARG_sBx(v)          MKARG_Bx((v)+MAXARG_sBx)
+#define MKARG_Ax(v)           ((mrb_code)((v) & 0x1ffffff) << 7)
+#define MKARG_PACK(b,n1,c,n2) ((((b) & ((1<<n1)-1)) << (7+n2))|(((c) & ((1<<n2)-1)) << 7))
+#define MKARG_bc(b,c)         MKARG_PACK(b,14,c,2)
+
+#define MKOP_A(op,a)        (MKOPCODE(op)|MKARG_A(a))
+#define MKOP_AB(op,a,b)     (MKOP_A(op,a)|MKARG_B(b))
+#define MKOP_ABC(op,a,b,c)  (MKOP_AB(op,a,b)|MKARG_C(c))
+#define MKOP_ABx(op,a,bx)   (MKOP_A(op,a)|MKARG_Bx(bx))
+#define MKOP_Bx(op,bx)      (MKOPCODE(op)|MKARG_Bx(bx))
+#define MKOP_sBx(op,sbx)    (MKOPCODE(op)|MKARG_sBx(sbx))
+#define MKOP_AsBx(op,a,sbx) (MKOP_A(op,a)|MKARG_sBx(sbx))
+#define MKOP_Ax(op,ax)      (MKOPCODE(op)|MKARG_Ax(ax))
+#define MKOP_Abc(op,a,b,c)  (MKOP_A(op,a)|MKARG_bc(b,c))
+
+enum {
+  /*-----------------------------------------------------------------------
+  operation code  operand description
+  ------------------------------------------------------------------------*/
+  OP_NOP=0,/*                                                             */
+  OP_MOVE,/*      A B     R(A) := R(B)                                    */
+  OP_LOADL,/*     A Bx    R(A) := Pool(Bx)                                */
+  OP_LOADI,/*     A sBx   R(A) := sBx                                     */
+  OP_LOADSYM,/*   A Bx    R(A) := Syms(Bx)                                */
+  OP_LOADNIL,/*   A       R(A) := nil                                     */
+  OP_LOADSELF,/*  A       R(A) := self                                    */
+  OP_LOADT,/*     A       R(A) := true                                    */
+  OP_LOADF,/*     A       R(A) := false                                   */
+
+  OP_GETGLOBAL,/* A Bx    R(A) := getglobal(Syms(Bx))                     */
+  OP_SETGLOBAL,/* A Bx    setglobal(Syms(Bx), R(A))                       */
+  OP_GETSPECIAL,/*A Bx    R(A) := Special[Bx]                             */
+  OP_SETSPECIAL,/*A Bx    Special[Bx] := R(A)                             */
+  OP_GETIV,/*     A Bx    R(A) := ivget(Syms(Bx))                         */
+  OP_SETIV,/*     A Bx    ivset(Syms(Bx),R(A))                            */
+  OP_GETCV,/*     A Bx    R(A) := cvget(Syms(Bx))                         */
+  OP_SETCV,/*     A Bx    cvset(Syms(Bx),R(A))                            */
+  OP_GETCONST,/*  A Bx    R(A) := constget(Syms(Bx))                      */
+  OP_SETCONST,/*  A Bx    constset(Syms(Bx),R(A))                         */
+  OP_GETMCNST,/*  A Bx    R(A) := R(A)::Syms(Bx)                          */
+  OP_SETMCNST,/*  A Bx    R(A+1)::Syms(Bx) := R(A)                        */
+  OP_GETUPVAR,/*  A B C   R(A) := uvget(B,C)                              */
+  OP_SETUPVAR,/*  A B C   uvset(B,C,R(A))                                 */
+
+  OP_JMP,/*       sBx     pc+=sBx                                         */
+  OP_JMPIF,/*     A sBx   if R(A) pc+=sBx                                 */
+  OP_JMPNOT,/*    A sBx   if !R(A) pc+=sBx                                */
+  OP_ONERR,/*     sBx     rescue_push(pc+sBx)                             */
+  OP_RESCUE,/*    A       clear(exc); R(A) := exception (ignore when A=0) */
+  OP_POPERR,/*    A       A.times{rescue_pop()}                           */
+  OP_RAISE,/*     A       raise(R(A))                                     */
+  OP_EPUSH,/*     Bx      ensure_push(SEQ[Bx])                            */
+  OP_EPOP,/*      A       A.times{ensure_pop().call}                      */
+
+  OP_SEND,/*      A B C   R(A) := call(R(A),Syms(B),R(A+1),...,R(A+C))    */
+  OP_SENDB,/*     A B C   R(A) := call(R(A),Syms(B),R(A+1),...,R(A+C),&R(A+C+1))*/
+  OP_FSEND,/*     A B C   R(A) := fcall(R(A),Syms(B),R(A+1),...,R(A+C-1)) */
+  OP_CALL,/*      A       R(A) := self.call(frame.argc, frame.argv)       */
+  OP_SUPER,/*     A C     R(A) := super(R(A+1),... ,R(A+C+1))             */
+  OP_ARGARY,/*    A Bx    R(A) := argument array (16=6:1:5:4)             */
+  OP_ENTER,/*     Ax      arg setup according to flags (23=5:5:1:5:5:1:1) */
+  OP_KARG,/*      A B C   R(A) := kdict[Syms(B)]; if C kdict.rm(Syms(B))  */
+  OP_KDICT,/*     A C     R(A) := kdict                                   */
+
+  OP_RETURN,/*    A B     return R(A) (B=normal,in-block return/break)    */
+  OP_TAILCALL,/*  A B C   return call(R(A),Syms(B),*R(C))                 */
+  OP_BLKPUSH,/*   A Bx    R(A) := block (16=6:1:5:4)                      */
+
+  OP_ADD,/*       A B C   R(A) := R(A)+R(A+1) (Syms[B]=:+,C=1)            */
+  OP_ADDI,/*      A B C   R(A) := R(A)+C (Syms[B]=:+)                     */
+  OP_SUB,/*       A B C   R(A) := R(A)-R(A+1) (Syms[B]=:-,C=1)            */
+  OP_SUBI,/*      A B C   R(A) := R(A)-C (Syms[B]=:-)                     */
+  OP_MUL,/*       A B C   R(A) := R(A)*R(A+1) (Syms[B]=:*,C=1)            */
+  OP_DIV,/*       A B C   R(A) := R(A)/R(A+1) (Syms[B]=:/,C=1)            */
+  OP_EQ,/*        A B C   R(A) := R(A)==R(A+1) (Syms[B]=:==,C=1)          */
+  OP_LT,/*        A B C   R(A) := R(A)<R(A+1)  (Syms[B]=:<,C=1)           */
+  OP_LE,/*        A B C   R(A) := R(A)<=R(A+1) (Syms[B]=:<=,C=1)          */
+  OP_GT,/*        A B C   R(A) := R(A)>R(A+1)  (Syms[B]=:>,C=1)           */
+  OP_GE,/*        A B C   R(A) := R(A)>=R(A+1) (Syms[B]=:>=,C=1)          */
+
+  OP_ARRAY,/*     A B C   R(A) := ary_new(R(B),R(B+1)..R(B+C))            */
+  OP_ARYCAT,/*    A B     ary_cat(R(A),R(B))                              */
+  OP_ARYPUSH,/*   A B     ary_push(R(A),R(B))                             */
+  OP_AREF,/*      A B C   R(A) := R(B)[C]                                 */
+  OP_ASET,/*      A B C   R(B)[C] := R(A)                                 */
+  OP_APOST,/*     A B C   *R(A),R(A+1)..R(A+C) := R(A)                    */
+
+  OP_STRING,/*    A Bx    R(A) := str_dup(Lit(Bx))                        */
+  OP_STRCAT,/*    A B     str_cat(R(A),R(B))                              */
+
+  OP_HASH,/*      A B C   R(A) := hash_new(R(B),R(B+1)..R(B+C))           */
+  OP_LAMBDA,/*    A Bz Cz R(A) := lambda(SEQ[Bz],Cz)                      */
+  OP_RANGE,/*     A B C   R(A) := range_new(R(B),R(B+1),C)                */
+
+  OP_OCLASS,/*    A       R(A) := ::Object                                */
+  OP_CLASS,/*     A B     R(A) := newclass(R(A),Syms(B),R(A+1))           */
+  OP_MODULE,/*    A B     R(A) := newmodule(R(A),Syms(B))                 */
+  OP_EXEC,/*      A Bx    R(A) := blockexec(R(A),SEQ[Bx])                 */
+  OP_METHOD,/*    A B     R(A).newmethod(Syms(B),R(A+1))                  */
+  OP_SCLASS,/*    A B     R(A) := R(B).singleton_class                    */
+  OP_TCLASS,/*    A       R(A) := target_class                            */
+
+  OP_DEBUG,/*     A B C   print R(A),R(B),R(C)                            */
+  OP_STOP,/*              stop VM                                         */
+  OP_ERR,/*       Bx      raise RuntimeError with message Lit(Bx)         */
+
+  OP_RSVD1,/*             reserved instruction #1                         */
+  OP_RSVD2,/*             reserved instruction #2                         */
+  OP_RSVD3,/*             reserved instruction #3                         */
+  OP_RSVD4,/*             reserved instruction #4                         */
+  OP_RSVD5,/*             reserved instruction #5                         */
+};
+
+#define OP_L_STRICT  1
+#define OP_L_CAPTURE 2
+#define OP_L_METHOD  OP_L_STRICT
+#define OP_L_LAMBDA  (OP_L_STRICT|OP_L_CAPTURE)
+#define OP_L_BLOCK   OP_L_CAPTURE
+
+#define OP_R_NORMAL 0
+#define OP_R_BREAK  1
+#define OP_R_RETURN 2
+
+#endif  /* MRUBY_OPCODE_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/proc.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/proc.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/proc.h	(revision 270)
@@ -0,0 +1,76 @@
+/*
+** mruby/proc.h - Proc class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_PROC_H
+#define MRUBY_PROC_H
+
+#include "mruby/common.h"
+#include "mruby/irep.h"
+
+/**
+ * Proc class
+ */
+MRB_BEGIN_DECL
+
+struct REnv {
+  MRB_OBJECT_HEADER;
+  mrb_value *stack;
+  mrb_sym mid;
+  ptrdiff_t cioff;
+};
+
+#define MRB_SET_ENV_STACK_LEN(e,len) (e)->flags = (unsigned int)(len)
+#define MRB_ENV_STACK_LEN(e) ((mrb_int)(e)->flags)
+#define MRB_ENV_UNSHARE_STACK(e) ((e)->cioff = -1)
+#define MRB_ENV_STACK_SHARED_P(e) ((e)->cioff >= 0)
+
+struct RProc {
+  MRB_OBJECT_HEADER;
+  union {
+    mrb_irep *irep;
+    mrb_func_t func;
+  } body;
+  struct RClass *target_class;
+  struct REnv *env;
+};
+
+/* aspec access */
+#define MRB_ASPEC_REQ(a)          (((a) >> 18) & 0x1f)
+#define MRB_ASPEC_OPT(a)          (((a) >> 13) & 0x1f)
+#define MRB_ASPEC_REST(a)         (((a) >> 12) & 0x1)
+#define MRB_ASPEC_POST(a)         (((a) >> 7) & 0x1f)
+#define MRB_ASPEC_KEY(a)          (((a) >> 2) & 0x1f)
+#define MRB_ASPEC_KDICT(a)        ((a) & (1<<1))
+#define MRB_ASPEC_BLOCK(a)        ((a) & 1)
+
+#define MRB_PROC_CFUNC 128
+#define MRB_PROC_CFUNC_P(p) (((p)->flags & MRB_PROC_CFUNC) != 0)
+#define MRB_PROC_STRICT 256
+#define MRB_PROC_STRICT_P(p) (((p)->flags & MRB_PROC_STRICT) != 0)
+
+#define mrb_proc_ptr(v)    ((struct RProc*)(mrb_ptr(v)))
+
+struct RProc *mrb_proc_new(mrb_state*, mrb_irep*);
+struct RProc *mrb_closure_new(mrb_state*, mrb_irep*);
+MRB_API struct RProc *mrb_proc_new_cfunc(mrb_state*, mrb_func_t);
+MRB_API struct RProc *mrb_closure_new_cfunc(mrb_state *mrb, mrb_func_t func, int nlocals);
+void mrb_proc_copy(struct RProc *a, struct RProc *b);
+
+/* implementation of #send method */
+MRB_API mrb_value mrb_f_send(mrb_state *mrb, mrb_value self);
+
+/* following functions are defined in mruby-proc-ext so please include it when using */
+MRB_API struct RProc *mrb_proc_new_cfunc_with_env(mrb_state*, mrb_func_t, mrb_int, const mrb_value*);
+MRB_API mrb_value mrb_proc_cfunc_env_get(mrb_state*, mrb_int);
+/* old name */
+#define mrb_cfunc_env_get(mrb, idx) mrb_proc_cfunc_env_get(mrb, idx)
+
+#include "mruby/khash.h"
+KHASH_DECLARE(mt, mrb_sym, struct RProc*, TRUE)
+
+MRB_END_DECL
+
+#endif  /* MRUBY_PROC_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/range.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/range.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/range.h	(revision 270)
@@ -0,0 +1,48 @@
+/*
+** mruby/range.h - Range class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_RANGE_H
+#define MRUBY_RANGE_H
+
+#include "mruby/common.h"
+
+/**
+ * Range class
+ */
+MRB_BEGIN_DECL
+
+typedef struct mrb_range_edges {
+  mrb_value beg;
+  mrb_value end;
+} mrb_range_edges;
+
+struct RRange {
+  MRB_OBJECT_HEADER;
+  mrb_range_edges *edges;
+  mrb_bool excl : 1;
+};
+
+#define mrb_range_ptr(v)    ((struct RRange*)(mrb_ptr(v)))
+#define mrb_range_value(p)  mrb_obj_value((void*)(p))
+
+/*
+ * Initializes a Range.
+ *
+ * If the third parameter is FALSE then it includes the last value in the range.
+ * If the third parameter is TRUE then it excludes the last value in the range.
+ *
+ * @param start the beginning value.
+ * @param end the ending value.
+ * @param exclude represents the inclusion or exclusion of the last value.
+ */
+MRB_API mrb_value mrb_range_new(mrb_state *mrb, mrb_value start, mrb_value end, mrb_bool exclude);
+
+MRB_API mrb_bool mrb_range_beg_len(mrb_state *mrb, mrb_value range, mrb_int *begp, mrb_int *lenp, mrb_int len);
+mrb_value mrb_get_values_at(mrb_state *mrb, mrb_value obj, mrb_int olen, mrb_int argc, const mrb_value *argv, mrb_value (*func)(mrb_state*, mrb_value, mrb_int));
+
+MRB_END_DECL
+
+#endif  /* MRUBY_RANGE_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/re.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/re.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/re.h	(revision 270)
@@ -0,0 +1,20 @@
+/*
+** mruby/re.h - Regexp class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_RE_H
+#define MRUBY_RE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define REGEXP_CLASS          "Regexp"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  /* RE_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/string.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/string.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/string.h	(revision 270)
@@ -0,0 +1,201 @@
+/*
+** mruby/string.h - String class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_STRING_H
+#define MRUBY_STRING_H
+
+#include "mruby/common.h"
+
+/**
+ * String class
+ */
+MRB_BEGIN_DECL
+
+extern const char mrb_digitmap[];
+
+#define RSTRING_EMBED_LEN_MAX ((mrb_int)(sizeof(void*) * 3 - 1))
+
+struct RString {
+  MRB_OBJECT_HEADER;
+  union {
+    struct {
+      mrb_int len;
+      union {
+        mrb_int capa;
+        struct mrb_shared_string *shared;
+      } aux;
+      char *ptr;
+    } heap;
+    char ary[RSTRING_EMBED_LEN_MAX + 1];
+  } as;
+};
+
+#define RSTR_EMBED_P(s) ((s)->flags & MRB_STR_EMBED)
+#define RSTR_SET_EMBED_FLAG(s) ((s)->flags |= MRB_STR_EMBED)
+#define RSTR_UNSET_EMBED_FLAG(s) ((s)->flags &= ~(MRB_STR_EMBED|MRB_STR_EMBED_LEN_MASK))
+#define RSTR_SET_EMBED_LEN(s, n) do {\
+  size_t tmp_n = (n);\
+  s->flags &= ~MRB_STR_EMBED_LEN_MASK;\
+  s->flags |= (tmp_n) << MRB_STR_EMBED_LEN_SHIFT;\
+} while (0)
+#define RSTR_SET_LEN(s, n) do {\
+  if (RSTR_EMBED_P(s)) {\
+    RSTR_SET_EMBED_LEN((s),(n));\
+  } else {\
+    s->as.heap.len = (mrb_int)(n);\
+  }\
+} while (0)
+#define RSTR_EMBED_LEN(s)\
+  (mrb_int)(((s)->flags & MRB_STR_EMBED_LEN_MASK) >> MRB_STR_EMBED_LEN_SHIFT)
+#define RSTR_PTR(s) ((RSTR_EMBED_P(s)) ? (s)->as.ary : (s)->as.heap.ptr)
+#define RSTR_LEN(s) ((RSTR_EMBED_P(s)) ? RSTR_EMBED_LEN(s) : (s)->as.heap.len)
+#define RSTR_CAPA(s) (RSTR_EMBED_P(s) ? RSTRING_EMBED_LEN_MAX : (s)->as.heap.aux.capa)
+
+#define RSTR_SHARED_P(s) ((s)->flags & MRB_STR_SHARED)
+#define RSTR_SET_SHARED_FLAG(s) ((s)->flags |= MRB_STR_SHARED)
+#define RSTR_UNSET_SHARED_FLAG(s) ((s)->flags &= ~MRB_STR_SHARED)
+
+#define RSTR_NOFREE_P(s) ((s)->flags & MRB_STR_NOFREE)
+#define RSTR_SET_NOFREE_FLAG(s) ((s)->flags |= MRB_STR_NOFREE)
+#define RSTR_UNSET_NOFREE_FLAG(s) ((s)->flags &= ~MRB_STR_NOFREE)
+
+#define RSTR_FROZEN_P(s) ((s)->flags & MRB_STR_FROZEN)
+#define RSTR_SET_FROZEN_FLAG(s) ((s)->flags |= MRB_STR_FROZEN)
+#define RSTR_UNSET_FROZEN_FLAG(s) ((s)->flags &= ~MRB_STR_FROZEN)
+
+/*
+ * Returns a pointer from a Ruby string
+ */
+#define mrb_str_ptr(s)       ((struct RString*)(mrb_ptr(s)))
+#define RSTRING(s)           mrb_str_ptr(s)
+#define RSTRING_PTR(s)       RSTR_PTR(RSTRING(s))
+#define RSTRING_EMBED_LEN(s) RSTR_ENBED_LEN(RSTRING(s))
+#define RSTRING_LEN(s)       RSTR_LEN(RSTRING(s))
+#define RSTRING_CAPA(s)      RSTR_CAPA(RSTRING(s))
+#define RSTRING_END(s)       (RSTRING_PTR(s) + RSTRING_LEN(s))
+mrb_int mrb_str_strlen(mrb_state*, struct RString*);
+
+#define MRB_STR_SHARED    1
+#define MRB_STR_NOFREE    2
+#define MRB_STR_FROZEN    4
+#define MRB_STR_EMBED     8
+#define MRB_STR_EMBED_LEN_MASK 0x1f0
+#define MRB_STR_EMBED_LEN_SHIFT 4
+
+void mrb_gc_free_str(mrb_state*, struct RString*);
+MRB_API void mrb_str_modify(mrb_state*, struct RString*);
+MRB_API void mrb_str_concat(mrb_state*, mrb_value, mrb_value);
+
+/*
+ * Adds two strings together.
+ */
+MRB_API mrb_value mrb_str_plus(mrb_state*, mrb_value, mrb_value);
+
+/*
+ * Converts pointer into a Ruby string.
+ */
+MRB_API mrb_value mrb_ptr_to_str(mrb_state *, void*);
+
+/*
+ * Returns an object as a Ruby string.
+ */
+MRB_API mrb_value mrb_obj_as_string(mrb_state *mrb, mrb_value obj);
+
+/*
+ * Resizes the string's length.
+ */
+MRB_API mrb_value mrb_str_resize(mrb_state *mrb, mrb_value str, mrb_int len);
+
+/*
+ * Returns a sub string.
+ */
+MRB_API mrb_value mrb_str_substr(mrb_state *mrb, mrb_value str, mrb_int beg, mrb_int len);
+
+/*
+ * Returns a Ruby string type.
+ */
+MRB_API mrb_value mrb_string_type(mrb_state *mrb, mrb_value str);
+
+MRB_API mrb_value mrb_check_string_type(mrb_state *mrb, mrb_value str);
+MRB_API mrb_value mrb_str_buf_new(mrb_state *mrb, size_t capa);
+
+MRB_API const char *mrb_string_value_cstr(mrb_state *mrb, mrb_value *ptr);
+MRB_API const char *mrb_string_value_ptr(mrb_state *mrb, mrb_value ptr);
+
+/*
+ * Duplicates a string object.
+ */
+MRB_API mrb_value mrb_str_dup(mrb_state *mrb, mrb_value str);
+
+/*
+ * Returns a symbol from a passed in string.
+ */
+MRB_API mrb_value mrb_str_intern(mrb_state *mrb, mrb_value self);
+
+MRB_API mrb_value mrb_str_to_inum(mrb_state *mrb, mrb_value str, mrb_int base, mrb_bool badcheck);
+MRB_API double mrb_str_to_dbl(mrb_state *mrb, mrb_value str, mrb_bool badcheck);
+
+/*
+ * Returns a converted string type.
+ */
+MRB_API mrb_value mrb_str_to_str(mrb_state *mrb, mrb_value str);
+
+/*
+ * Returns true if the strings match and false if the strings don't match.
+ */
+MRB_API mrb_bool mrb_str_equal(mrb_state *mrb, mrb_value str1, mrb_value str2);
+
+/*
+ * Returns a concated string comprised of a Ruby string and a C string.
+ *
+ * @see mrb_str_cat_cstr
+ */
+MRB_API mrb_value mrb_str_cat(mrb_state *mrb, mrb_value str, const char *ptr, size_t len);
+
+/*
+ * Returns a concated string comprised of a Ruby string and a C string.
+ *
+ * @see mrb_str_cat
+ */
+MRB_API mrb_value mrb_str_cat_cstr(mrb_state *mrb, mrb_value str, const char *ptr);
+MRB_API mrb_value mrb_str_cat_str(mrb_state *mrb, mrb_value str, mrb_value str2);
+#define mrb_str_cat_lit(mrb, str, lit) mrb_str_cat(mrb, str, lit, mrb_strlen_lit(lit))
+
+/*
+ * Adds str2 to the end of str1.
+ */
+MRB_API mrb_value mrb_str_append(mrb_state *mrb, mrb_value str, mrb_value str2);
+
+/*
+ * Returns 0 if both Ruby strings are equal. Returns a value < 0 if Ruby str1 is less than Ruby str2. Returns a value > 0 if Ruby str2 is greater than Ruby str1.
+ */
+MRB_API int mrb_str_cmp(mrb_state *mrb, mrb_value str1, mrb_value str2);
+
+/*
+ * Returns a C string from a Ruby string.
+ */
+MRB_API char *mrb_str_to_cstr(mrb_state *mrb, mrb_value str);
+
+mrb_value mrb_str_pool(mrb_state *mrb, mrb_value str);
+mrb_int mrb_str_hash(mrb_state *mrb, mrb_value str);
+mrb_value mrb_str_dump(mrb_state *mrb, mrb_value str);
+
+/*
+ * Returns a printable version of str, surrounded by quote marks, with special characters escaped.
+ */
+mrb_value mrb_str_inspect(mrb_state *mrb, mrb_value str);
+
+void mrb_noregexp(mrb_state *mrb, mrb_value self);
+void mrb_regexp_check(mrb_state *mrb, mrb_value obj);
+
+/* For backward compatibility */
+#define mrb_str_cat2(mrb, str, ptr) mrb_str_cat_cstr(mrb, str, ptr)
+#define mrb_str_buf_cat(mrb, str, ptr, len) mrb_str_cat(mrb, str, ptr, len)
+#define mrb_str_buf_append(mrb, str, str2) mrb_str_cat_str(mrb, str, str2)
+
+MRB_END_DECL
+
+#endif  /* MRUBY_STRING_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/throw.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/throw.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/throw.h	(revision 270)
@@ -0,0 +1,41 @@
+/*
+** mruby/throw.h - mruby exception throwing handler
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRB_THROW_H
+#define MRB_THROW_H
+
+#ifdef MRB_ENABLE_CXX_EXCEPTION
+
+#define MRB_TRY(buf) do { try {
+#define MRB_CATCH(buf) } catch(mrb_jmpbuf_impl e) { if (e != (buf)->impl) { throw e; }
+#define MRB_END_EXC(buf)  } } while(0)
+
+#define MRB_THROW(buf) throw((buf)->impl)
+typedef mrb_int mrb_jmpbuf_impl;
+
+#else
+
+#include <setjmp.h>
+
+#define MRB_TRY(buf) do { if (setjmp((buf)->impl) == 0) {
+#define MRB_CATCH(buf) } else {
+#define MRB_END_EXC(buf) } } while(0)
+
+#define MRB_THROW(buf) longjmp((buf)->impl, 1);
+#define mrb_jmpbuf_impl jmp_buf
+
+#endif
+
+struct mrb_jmpbuf {
+  mrb_jmpbuf_impl impl;
+
+#ifdef MRB_ENABLE_CXX_EXCEPTION
+  static mrb_int jmpbuf_id;
+  mrb_jmpbuf() : impl(jmpbuf_id++) {}
+#endif
+};
+
+#endif  /* MRB_THROW_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/value.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/value.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/value.h	(revision 270)
@@ -0,0 +1,268 @@
+/*
+** mruby/value.h - mruby value definitions
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_VALUE_H
+#define MRUBY_VALUE_H
+
+#include "mruby/common.h"
+
+/**
+ * MRuby Value definition functions and macros.
+ */
+MRB_BEGIN_DECL
+
+typedef uint32_t mrb_sym;
+typedef uint8_t mrb_bool;
+struct mrb_state;
+
+#if defined(MRB_INT16) && defined(MRB_INT64)
+# error "You can't define MRB_INT16 and MRB_INT64 at the same time."
+#endif
+
+#if defined(MRB_INT64)
+  typedef int64_t mrb_int;
+# define MRB_INT_BIT 64
+# define MRB_INT_MIN (INT64_MIN>>MRB_FIXNUM_SHIFT)
+# define MRB_INT_MAX (INT64_MAX>>MRB_FIXNUM_SHIFT)
+#elif defined(MRB_INT16)
+  typedef int16_t mrb_int;
+# define MRB_INT_BIT 16
+# define MRB_INT_MIN (INT16_MIN>>MRB_FIXNUM_SHIFT)
+# define MRB_INT_MAX (INT16_MAX>>MRB_FIXNUM_SHIFT)
+#else
+  typedef int32_t mrb_int;
+# define MRB_INT_BIT 32
+# define MRB_INT_MIN (INT32_MIN>>MRB_FIXNUM_SHIFT)
+# define MRB_INT_MAX (INT32_MAX>>MRB_FIXNUM_SHIFT)
+#endif
+
+#ifdef MRB_USE_FLOAT
+  typedef float mrb_float;
+# define str_to_mrb_float(buf) strtof(buf, NULL)
+#else
+  typedef double mrb_float;
+# define str_to_mrb_float(buf) strtod(buf, NULL)
+#endif
+
+#if defined _MSC_VER && _MSC_VER < 1900
+# ifndef __cplusplus
+#  define inline __inline
+# endif
+# include <stdarg.h>
+MRB_API int mrb_msvc_vsnprintf(char *s, size_t n, const char *format, va_list arg);
+MRB_API int mrb_msvc_snprintf(char *s, size_t n, const char *format, ...);
+# define vsnprintf(s, n, format, arg) mrb_msvc_vsnprintf(s, n, format, arg)
+# define snprintf(s, n, format, ...) mrb_msvc_snprintf(s, n, format, __VA_ARGS__)
+# if _MSC_VER < 1800
+#  include <float.h>
+#  define isfinite(n) _finite(n)
+#  define isnan _isnan
+#  define isinf(n) (!_finite(n) && !_isnan(n))
+#  define signbit(n) (_copysign(1.0, (n)) < 0.0)
+#  define strtof (float)strtod
+static const unsigned int IEEE754_INFINITY_BITS_SINGLE = 0x7F800000;
+#  define INFINITY (*(float *)&IEEE754_INFINITY_BITS_SINGLE)
+#  define NAN ((float)(INFINITY - INFINITY))
+# endif
+#endif
+
+enum mrb_vtype {
+  MRB_TT_FALSE = 0,   /*   0 */
+  MRB_TT_FREE,        /*   1 */
+  MRB_TT_TRUE,        /*   2 */
+  MRB_TT_FIXNUM,      /*   3 */
+  MRB_TT_SYMBOL,      /*   4 */
+  MRB_TT_UNDEF,       /*   5 */
+  MRB_TT_FLOAT,       /*   6 */
+  MRB_TT_CPTR,        /*   7 */
+  MRB_TT_OBJECT,      /*   8 */
+  MRB_TT_CLASS,       /*   9 */
+  MRB_TT_MODULE,      /*  10 */
+  MRB_TT_ICLASS,      /*  11 */
+  MRB_TT_SCLASS,      /*  12 */
+  MRB_TT_PROC,        /*  13 */
+  MRB_TT_ARRAY,       /*  14 */
+  MRB_TT_HASH,        /*  15 */
+  MRB_TT_STRING,      /*  16 */
+  MRB_TT_RANGE,       /*  17 */
+  MRB_TT_EXCEPTION,   /*  18 */
+  MRB_TT_FILE,        /*  19 */
+  MRB_TT_ENV,         /*  20 */
+  MRB_TT_DATA,        /*  21 */
+  MRB_TT_FIBER,       /*  22 */
+  MRB_TT_MAXDEFINE    /*  23 */
+};
+
+#include "mruby/object.h"
+
+#ifdef MRB_DOCUMENTATION_BLOCK
+
+/**
+ * @abstract
+ * MRuby value boxing.
+ *
+ * Actual implementation depends on configured boxing type.
+ *
+ * @see mruby/boxing_no.h Default boxing representation
+ * @see mruby/boxing_word.h Word representation
+ * @see mruby/boxing_nan.h Boxed double representation
+ */
+typedef void mrb_value;
+
+#endif
+
+#if defined(MRB_NAN_BOXING)
+#include "boxing_nan.h"
+#elif defined(MRB_WORD_BOXING)
+#include "boxing_word.h"
+#else
+#include "boxing_no.h"
+#endif
+
+#ifndef mrb_fixnum_p
+#define mrb_fixnum_p(o) (mrb_type(o) == MRB_TT_FIXNUM)
+#endif
+#ifndef mrb_undef_p
+#define mrb_undef_p(o) (mrb_type(o) == MRB_TT_UNDEF)
+#endif
+#ifndef mrb_nil_p
+#define mrb_nil_p(o)  (mrb_type(o) == MRB_TT_FALSE && !mrb_fixnum(o))
+#endif
+#ifndef mrb_bool
+#define mrb_bool(o)   (mrb_type(o) != MRB_TT_FALSE)
+#endif
+#define mrb_float_p(o) (mrb_type(o) == MRB_TT_FLOAT)
+#define mrb_symbol_p(o) (mrb_type(o) == MRB_TT_SYMBOL)
+#define mrb_array_p(o) (mrb_type(o) == MRB_TT_ARRAY)
+#define mrb_string_p(o) (mrb_type(o) == MRB_TT_STRING)
+#define mrb_hash_p(o) (mrb_type(o) == MRB_TT_HASH)
+#define mrb_cptr_p(o) (mrb_type(o) == MRB_TT_CPTR)
+#define mrb_exception_p(o) (mrb_type(o) == MRB_TT_EXCEPTION)
+#define mrb_test(o)   mrb_bool(o)
+MRB_API mrb_bool mrb_regexp_p(struct mrb_state*, mrb_value);
+
+/*
+ * Returns a float in Ruby.
+ */
+MRB_INLINE mrb_value mrb_float_value(struct mrb_state *mrb, mrb_float f)
+{
+  mrb_value v;
+  (void) mrb;
+  SET_FLOAT_VALUE(mrb, v, f);
+  return v;
+}
+
+static inline mrb_value
+mrb_cptr_value(struct mrb_state *mrb, void *p)
+{
+  mrb_value v;
+  (void) mrb;
+  SET_CPTR_VALUE(mrb,v,p);
+  return v;
+}
+
+/*
+ * Returns a fixnum in Ruby.
+ */
+MRB_INLINE mrb_value mrb_fixnum_value(mrb_int i)
+{
+  mrb_value v;
+  SET_INT_VALUE(v, i);
+  return v;
+}
+
+static inline mrb_value
+mrb_symbol_value(mrb_sym i)
+{
+  mrb_value v;
+  SET_SYM_VALUE(v, i);
+  return v;
+}
+
+static inline mrb_value
+mrb_obj_value(void *p)
+{
+  mrb_value v;
+  SET_OBJ_VALUE(v, (struct RBasic*)p);
+  return v;
+}
+
+
+/*
+ * Get a nil mrb_value object.
+ *
+ * @return
+ *      nil mrb_value object reference.
+ */
+MRB_INLINE mrb_value mrb_nil_value(void)
+{
+  mrb_value v;
+  SET_NIL_VALUE(v);
+  return v;
+}
+
+/*
+ * Returns false in Ruby.
+ */
+MRB_INLINE mrb_value mrb_false_value(void)
+{
+  mrb_value v;
+  SET_FALSE_VALUE(v);
+  return v;
+}
+
+/*
+ * Returns true in Ruby.
+ */
+MRB_INLINE mrb_value mrb_true_value(void)
+{
+  mrb_value v;
+  SET_TRUE_VALUE(v);
+  return v;
+}
+
+static inline mrb_value
+mrb_bool_value(mrb_bool boolean)
+{
+  mrb_value v;
+  SET_BOOL_VALUE(v, boolean);
+  return v;
+}
+
+static inline mrb_value
+mrb_undef_value(void)
+{
+  mrb_value v;
+  SET_UNDEF_VALUE(v);
+  return v;
+}
+
+#ifdef MRB_USE_ETEXT_EDATA
+extern char _etext[];
+#ifdef MRB_NO_INIT_ARRAY_START
+extern char _edata[];
+
+static inline mrb_bool
+mrb_ro_data_p(const char *p)
+{
+  return _etext < p && p < _edata;
+}
+#else
+extern char __init_array_start[];
+
+static inline mrb_bool
+mrb_ro_data_p(const char *p)
+{
+  return _etext < p && p < (char*)&__init_array_start;
+}
+#endif
+#else
+# define mrb_ro_data_p(p) FALSE
+#endif
+
+MRB_END_DECL
+
+#endif  /* MRUBY_VALUE_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/variable.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/variable.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/variable.h	(revision 270)
@@ -0,0 +1,82 @@
+/*
+** mruby/variable.h - mruby variables
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_VARIABLE_H
+#define MRUBY_VARIABLE_H
+
+#include "mruby/common.h"
+
+/**
+ * Functions to access mruby variables.
+ */
+MRB_BEGIN_DECL
+
+typedef struct global_variable {
+  int   counter;
+  mrb_value *data;
+  mrb_value (*getter)(void);
+  void  (*setter)(void);
+  /* void  (*marker)(); */
+  /* int block_trace; */
+  /* struct trace_var *trace; */
+} global_variable;
+
+struct global_entry {
+  global_variable *var;
+  mrb_sym id;
+};
+
+mrb_value mrb_vm_special_get(mrb_state*, mrb_sym);
+void mrb_vm_special_set(mrb_state*, mrb_sym, mrb_value);
+mrb_value mrb_vm_iv_get(mrb_state*, mrb_sym);
+void mrb_vm_iv_set(mrb_state*, mrb_sym, mrb_value);
+mrb_value mrb_vm_cv_get(mrb_state*, mrb_sym);
+void mrb_vm_cv_set(mrb_state*, mrb_sym, mrb_value);
+mrb_value mrb_vm_const_get(mrb_state*, mrb_sym);
+void mrb_vm_const_set(mrb_state*, mrb_sym, mrb_value);
+MRB_API mrb_value mrb_const_get(mrb_state*, mrb_value, mrb_sym);
+MRB_API void mrb_const_set(mrb_state*, mrb_value, mrb_sym, mrb_value);
+MRB_API mrb_bool mrb_const_defined(mrb_state*, mrb_value, mrb_sym);
+MRB_API void mrb_const_remove(mrb_state*, mrb_value, mrb_sym);
+
+MRB_API mrb_bool mrb_iv_p(mrb_state *mrb, mrb_sym sym);
+MRB_API void mrb_iv_check(mrb_state *mrb, mrb_sym sym);
+MRB_API mrb_value mrb_obj_iv_get(mrb_state *mrb, struct RObject *obj, mrb_sym sym);
+MRB_API void mrb_obj_iv_set(mrb_state *mrb, struct RObject *obj, mrb_sym sym, mrb_value v);
+MRB_API mrb_bool mrb_obj_iv_defined(mrb_state *mrb, struct RObject *obj, mrb_sym sym);
+MRB_API void mrb_obj_iv_ifnone(mrb_state *mrb, struct RObject *obj, mrb_sym sym, mrb_value v);
+MRB_API mrb_value mrb_iv_get(mrb_state *mrb, mrb_value obj, mrb_sym sym);
+MRB_API void mrb_iv_set(mrb_state *mrb, mrb_value obj, mrb_sym sym, mrb_value v);
+MRB_API mrb_bool mrb_iv_defined(mrb_state*, mrb_value, mrb_sym);
+MRB_API mrb_value mrb_iv_remove(mrb_state *mrb, mrb_value obj, mrb_sym sym);
+MRB_API void mrb_iv_copy(mrb_state *mrb, mrb_value dst, mrb_value src);
+MRB_API mrb_bool mrb_const_defined_at(mrb_state *mrb, mrb_value mod, mrb_sym id);
+MRB_API mrb_value mrb_gv_get(mrb_state *mrb, mrb_sym sym);
+MRB_API void mrb_gv_set(mrb_state *mrb, mrb_sym sym, mrb_value val);
+MRB_API void mrb_gv_remove(mrb_state *mrb, mrb_sym sym);
+MRB_API mrb_value mrb_cv_get(mrb_state *mrb, mrb_value mod, mrb_sym sym);
+MRB_API void mrb_mod_cv_set(mrb_state *mrb, struct RClass * c, mrb_sym sym, mrb_value v);
+MRB_API void mrb_cv_set(mrb_state *mrb, mrb_value mod, mrb_sym sym, mrb_value v);
+MRB_API mrb_bool mrb_cv_defined(mrb_state *mrb, mrb_value mod, mrb_sym sym);
+mrb_value mrb_obj_iv_inspect(mrb_state*, struct RObject*);
+mrb_value mrb_mod_constants(mrb_state *mrb, mrb_value mod);
+mrb_value mrb_f_global_variables(mrb_state *mrb, mrb_value self);
+mrb_value mrb_obj_instance_variables(mrb_state*, mrb_value);
+mrb_value mrb_mod_class_variables(mrb_state*, mrb_value);
+mrb_value mrb_mod_cv_get(mrb_state *mrb, struct RClass * c, mrb_sym sym);
+mrb_bool mrb_mod_cv_defined(mrb_state *mrb, struct RClass * c, mrb_sym sym);
+mrb_sym mrb_class_sym(mrb_state *mrb, struct RClass *c, struct RClass *outer);
+
+/* GC functions */
+void mrb_gc_mark_gv(mrb_state*);
+void mrb_gc_free_gv(mrb_state*);
+void mrb_gc_mark_iv(mrb_state*, struct RObject*);
+size_t mrb_gc_mark_iv_size(mrb_state*, struct RObject*);
+void mrb_gc_free_iv(mrb_state*, struct RObject*);
+
+MRB_END_DECL
+
+#endif  /* MRUBY_VARIABLE_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/version.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/version.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/include/mruby/version.h	(revision 270)
@@ -0,0 +1,110 @@
+/*
+** mruby/version.h - mruby version definition
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef MRUBY_VERSION_H
+#define MRUBY_VERSION_H
+
+#include "mruby/common.h"
+
+/**
+ * mruby version definition macros
+ */
+MRB_BEGIN_DECL
+
+/*
+ * A passed in expression.
+ */
+#define MRB_STRINGIZE0(expr) #expr
+
+/*
+ * Passes in an expression to MRB_STRINGIZE0.
+ */
+#define MRB_STRINGIZE(expr) MRB_STRINGIZE0(expr)
+
+/*
+ * The version of Ruby used by mruby.
+ */
+#define MRUBY_RUBY_VERSION "1.9"
+
+/*
+ * Ruby engine.
+ */
+#define MRUBY_RUBY_ENGINE  "mruby"
+
+/*
+ * Major release version number.
+ */
+#define MRUBY_RELEASE_MAJOR 1
+
+/*
+ * Minor release version number.
+ */
+#define MRUBY_RELEASE_MINOR 2
+
+/*
+ * Tiny release version number.
+ */
+#define MRUBY_RELEASE_TEENY 0
+
+/*
+ * The mruby version.
+ */
+#define MRUBY_VERSION MRB_STRINGIZE(MRUBY_RELEASE_MAJOR) "." MRB_STRINGIZE(MRUBY_RELEASE_MINOR) "." MRB_STRINGIZE(MRUBY_RELEASE_TEENY)
+
+/*
+ * Release number.
+ */
+#define MRUBY_RELEASE_NO (MRUBY_RELEASE_MAJOR * 100 * 100 + MRUBY_RELEASE_MINOR * 100 + MRUBY_RELEASE_TEENY)
+
+/*
+ * Release year.
+ */
+#define MRUBY_RELEASE_YEAR 2015
+
+/*
+ * Release month.
+ */
+#define MRUBY_RELEASE_MONTH 11
+
+/*
+ * Release day.
+ */
+#define MRUBY_RELEASE_DAY 17
+
+/*
+ * Release date as a string.
+ */
+#define MRUBY_RELEASE_DATE MRB_STRINGIZE(MRUBY_RELEASE_YEAR) "-" MRB_STRINGIZE(MRUBY_RELEASE_MONTH) "-" MRB_STRINGIZE(MRUBY_RELEASE_DAY)
+
+/*
+ * The year mruby was first created.
+ */
+#define MRUBY_BIRTH_YEAR 2010
+
+/*
+ * MRuby's authors.
+ */
+#define MRUBY_AUTHOR "mruby developers"
+
+/*
+ * mruby's version, and release date.
+ */
+#define MRUBY_DESCRIPTION      \
+  "mruby " MRUBY_VERSION       \
+  " (" MRUBY_RELEASE_DATE ") " \
+
+/*
+ * mruby's copyright information.
+ */
+#define MRUBY_COPYRIGHT                \
+  "mruby - Copyright (c) "             \
+  MRB_STRINGIZE(MRUBY_BIRTH_YEAR)"-"   \
+  MRB_STRINGIZE(MRUBY_RELEASE_YEAR)" " \
+  MRUBY_AUTHOR                         \
+
+MRB_END_DECL
+
+#endif  /* MRUBY_VERSION_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/lib/mruby/source.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/lib/mruby/source.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/lib/mruby/source.rb	(revision 270)
@@ -0,0 +1,30 @@
+require "pathname"
+
+module MRuby
+  module Source
+    # MRuby's source root directory
+    ROOT = Pathname.new(File.expand_path('../../../',__FILE__))
+
+    # Reads a constant defined at version.h
+    MRUBY_READ_VERSION_CONSTANT = Proc.new { |name| ROOT.join('include','mruby','version.h').read.match(/^#define #{name} +"?([\w\. ]+)"?$/)[1] }
+
+    MRUBY_RUBY_VERSION = MRUBY_READ_VERSION_CONSTANT['MRUBY_RUBY_VERSION']
+    MRUBY_RUBY_ENGINE = MRUBY_READ_VERSION_CONSTANT['MRUBY_RUBY_ENGINE']
+
+    MRUBY_RELEASE_MAJOR = Integer(MRUBY_READ_VERSION_CONSTANT['MRUBY_RELEASE_MAJOR'])
+    MRUBY_RELEASE_MINOR = Integer(MRUBY_READ_VERSION_CONSTANT['MRUBY_RELEASE_MINOR'])
+    MRUBY_RELEASE_TEENY = Integer(MRUBY_READ_VERSION_CONSTANT['MRUBY_RELEASE_TEENY'])
+
+    MRUBY_VERSION = [MRUBY_RELEASE_MAJOR,MRUBY_RELEASE_MINOR,MRUBY_RELEASE_TEENY].join('.')
+    MRUBY_RELEASE_NO = (MRUBY_RELEASE_MAJOR * 100 * 100 + MRUBY_RELEASE_MINOR * 100 + MRUBY_RELEASE_TEENY)
+
+    MRUBY_RELEASE_YEAR = Integer(MRUBY_READ_VERSION_CONSTANT['MRUBY_RELEASE_YEAR'])
+    MRUBY_RELEASE_MONTH = Integer(MRUBY_READ_VERSION_CONSTANT['MRUBY_RELEASE_MONTH'])
+    MRUBY_RELEASE_DAY = Integer(MRUBY_READ_VERSION_CONSTANT['MRUBY_RELEASE_DAY'])
+    MRUBY_RELEASE_DATE = [MRUBY_RELEASE_YEAR,MRUBY_RELEASE_MONTH,MRUBY_RELEASE_DAY].join('.')
+
+    MRUBY_BIRTH_YEAR = Integer(MRUBY_READ_VERSION_CONSTANT['MRUBY_BIRTH_YEAR'])
+
+    MRUBY_AUTHOR = MRUBY_READ_VERSION_CONSTANT['MRUBY_AUTHOR']
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/minirake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/minirake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/minirake	(revision 270)
@@ -0,0 +1,484 @@
+#!/usr/bin/env ruby
+
+# Original is https://github.com/jimweirich/rake/
+# Copyright (c) 2003 Jim Weirich
+# License: MIT-LICENSE
+
+require 'getoptlong'
+require 'fileutils'
+
+class String
+  def ext(newext='')
+    return self.dup if ['.', '..'].include? self
+    if newext != ''
+      newext = (newext =~ /^\./) ? newext : ("." + newext)
+    end
+    self.chomp(File.extname(self)) << newext
+  end
+
+  def pathmap(spec=nil, &block)
+    return self if spec.nil?
+    result = ''
+    spec.scan(/%\{[^}]*\}-?\d*[sdpfnxX%]|%-?\d+d|%.|[^%]+/) do |frag|
+      case frag
+      when '%f'
+        result << File.basename(self)
+      when '%n'
+        result << File.basename(self).ext
+      when '%d'
+        result << File.dirname(self)
+      when '%x'
+        result << File.extname(self)
+      when '%X'
+        result << self.ext
+      when '%p'
+        result << self
+      when '%s'
+        result << (File::ALT_SEPARATOR || File::SEPARATOR)
+      when '%-'
+        # do nothing
+      when '%%'
+        result << "%"
+      when /%(-?\d+)d/
+        result << pathmap_partial($1.to_i)
+      when /^%\{([^}]*)\}(\d*[dpfnxX])/
+        patterns, operator = $1, $2
+        result << pathmap('%' + operator).pathmap_replace(patterns, &block)
+      when /^%/
+        fail ArgumentError, "Unknown pathmap specifier #{frag} in '#{spec}'"
+      else
+        result << frag
+      end
+    end
+    result
+  end
+end
+
+module MiniRake
+  class Task
+    TASKS = Hash.new
+    RULES = Array.new
+
+    # List of prerequisites for a task.
+    attr_reader :prerequisites
+
+    # Source dependency for rule synthesized tasks.  Nil if task was not
+    # sythesized from a rule.
+    attr_accessor :source
+
+    # Create a task named +task_name+ with no actions or prerequisites..
+    # use +enhance+ to add actions and prerequisites.
+    def initialize(task_name)
+      @name = task_name
+      @prerequisites = []
+      @actions = []
+    end
+
+    # Enhance a task with prerequisites or actions.  Returns self.
+    def enhance(deps=nil, &block)
+      @prerequisites |= deps if deps
+      @actions << block if block_given?
+      self
+    end
+
+    # Name of the task.
+    def name
+      @name.to_s
+    end
+
+    # Invoke the task if it is needed.  Prerequites are invoked first.
+    def invoke
+      puts "Invoke #{name} (already=[#{@already_invoked}], needed=[#{needed?}])" if $trace
+      return if @already_invoked
+      @already_invoked = true
+      prerequisites = @prerequisites.collect{ |n| n.is_a?(Proc) ? n.call(name) : n }.flatten
+      prerequisites.each { |n| Task[n].invoke }
+      execute if needed?
+    end
+
+    # Execute the actions associated with this task.
+    def execute
+      puts "Execute #{name}" if $trace
+      self.class.enhance_with_matching_rule(name) if @actions.empty?
+      unless $dryrun
+        @actions.each { |act| act.call(self) }
+      end
+    end
+
+    # Is this task needed?
+    def needed?
+      true
+    end
+
+    # Timestamp for this task.  Basic tasks return the current time for
+    # their time stamp.  Other tasks can be more sophisticated.
+    def timestamp
+      prerequisites = @prerequisites.collect{ |n| n.is_a?(Proc) ? n.call(name) : n }.flatten
+      prerequisites.collect { |n| Task[n].timestamp }.max || Time.now
+    end
+
+    # Class Methods ----------------------------------------------------
+
+    class << self
+
+      # Clear the task list.  This cause rake to immediately forget all
+      # the tasks that have been assigned.  (Normally used in the unit
+      # tests.)
+      def clear
+        TASKS.clear
+        RULES.clear
+      end
+
+      # List of all defined tasks.
+      def tasks
+        TASKS.keys.sort.collect { |tn| Task[tn] }
+      end
+
+      # Return a task with the given name.  If the task is not currently
+      # known, try to synthesize one from the defined rules.  If no
+      # rules are found, but an existing file matches the task name,
+      # assume it is a file task with no dependencies or actions.
+      def [](task_name)
+        task_name = task_name.to_s
+        if task = TASKS[task_name]
+          return task
+        end
+        if task = enhance_with_matching_rule(task_name)
+          return task
+        end
+        if File.exist?(task_name)
+          return FileTask.define_task(task_name)
+        end
+        fail "Don't know how to rake #{task_name}"
+      end
+
+      # Define a task given +args+ and an option block.  If a rule with
+      # the given name already exists, the prerequisites and actions are
+      # added to the existing task.
+      def define_task(args, &block)
+        task_name, deps = resolve_args(args)
+        lookup(task_name).enhance([deps].flatten, &block)
+      end
+
+      # Define a rule for synthesizing tasks.
+      def create_rule(args, &block)
+        pattern, deps = resolve_args(args)
+        pattern = Regexp.new(Regexp.quote(pattern) + '$') if String === pattern
+        RULES << [pattern, deps, block]
+      end
+
+
+      # Lookup a task.  Return an existing task if found, otherwise
+      # create a task of the current type.
+      def lookup(task_name)
+        name = task_name.to_s
+        TASKS[name] ||= self.new(name)
+      end
+
+      # If a rule can be found that matches the task name, enhance the
+      # task with the prerequisites and actions from the rule.  Set the
+      # source attribute of the task appropriately for the rule.  Return
+      # the enhanced task or nil of no rule was found.
+      def enhance_with_matching_rule(task_name)
+        RULES.each do |pattern, extensions, block|
+          if pattern.match(task_name)
+            ext = extensions.first
+            deps = extensions[1..-1]
+            case ext
+            when String
+              source = task_name.sub(/\.[^.]*$/, ext)
+            when Proc
+              source = ext.call(task_name)
+            else
+              fail "Don't know how to handle rule dependent: #{ext.inspect}"
+            end
+            if File.exist?(source)
+              task = FileTask.define_task({task_name => [source]+deps}, &block)
+              task.source = source
+              return task
+            end
+          end
+        end
+        nil
+      end
+
+      private
+
+      # Resolve the arguments for a task/rule.
+      def resolve_args(args)
+        case args
+        when Hash
+          fail "Too Many Task Names: #{args.keys.join(' ')}" if args.size > 1
+          fail "No Task Name Given" if args.size < 1
+          task_name = args.keys[0]
+          deps = args[task_name]
+          deps = [deps] if (String===deps) || (Regexp===deps) || (Proc===deps)
+        else
+          task_name = args
+          deps = []
+        end
+        [task_name, deps]
+      end
+    end
+  end
+
+
+  ######################################################################
+  class FileTask < Task
+    # Is this file task needed?  Yes if it doesn't exist, or if its time
+    # stamp is out of date.
+    def needed?
+      return true unless File.exist?(name)
+      prerequisites = @prerequisites.collect{ |n| n.is_a?(Proc) ? n.call(name) : n }.flatten
+      latest_prereq = prerequisites.collect{|n| Task[n].timestamp}.max
+      return false if latest_prereq.nil?
+      timestamp < latest_prereq
+    end
+
+    # Time stamp for file task.
+    def timestamp
+      stat = File::stat(name.to_s)
+      stat.directory? ? Time.at(0) : stat.mtime
+    end
+  end
+
+  module DSL
+    # Declare a basic task.
+    def task(args, &block)
+      MiniRake::Task.define_task(args, &block)
+    end
+
+    # Declare a file task.
+    def file(args, &block)
+      MiniRake::FileTask.define_task(args, &block)
+    end
+
+    # Declare a set of files tasks to create the given directories on
+    # demand.
+    def directory(args, &block)
+      MiniRake::FileTask.define_task(args) do |t|
+        block.call(t) unless block.nil?
+        dir = args.is_a?(Hash) ? args.keys.first : args
+        (dir.split(File::SEPARATOR) + ['']).inject do |acc, part|
+          (acc + File::SEPARATOR).tap do |d|
+            Dir.mkdir(d) unless File.exists? d
+          end + part
+        end
+      end
+    end
+
+    # Declare a rule for auto-tasks.
+    def rule(args, &block)
+      MiniRake::Task.create_rule(args, &block)
+    end
+
+    # Write a message to standard out if $verbose is enabled.
+    def log(msg)
+      print "  " if $trace && $verbose
+      puts msg if $verbose
+    end
+
+    # Run the system command +cmd+.
+    def sh(cmd)
+      puts cmd if $verbose
+      system(cmd) or fail "Command Failed: [#{cmd}]"
+    end
+
+    def desc(text)
+    end
+  end
+end
+
+Rake = MiniRake
+extend MiniRake::DSL
+
+
+######################################################################
+# Task Definition Functions ...
+
+######################################################################
+# Rake main application object.  When invoking +rake+ from the command
+# line, a RakeApp object is created and run.
+#
+class RakeApp
+  RAKEFILES = ['rakefile', 'Rakefile']
+
+  OPTIONS = [
+    ['--dry-run',  '-n', GetoptLong::NO_ARGUMENT,
+      "Do a dry run without executing actions."],
+    ['--help',     '-H', GetoptLong::NO_ARGUMENT,
+      "Display this help message."],
+    ['--libdir',   '-I', GetoptLong::REQUIRED_ARGUMENT,
+      "Include LIBDIR in the search path for required modules."],
+    ['--nosearch', '-N', GetoptLong::NO_ARGUMENT,
+      "Do not search parent directories for the Rakefile."],
+    ['--quiet',    '-q', GetoptLong::NO_ARGUMENT,
+      "Do not log messages to standard output (default)."],
+    ['--rakefile', '-f', GetoptLong::REQUIRED_ARGUMENT,
+      "Use FILE as the rakefile."],
+    ['--require',  '-r', GetoptLong::REQUIRED_ARGUMENT,
+      "Require MODULE before executing rakefile."],
+    ['--tasks',    '-T', GetoptLong::NO_ARGUMENT,
+      "Display the tasks and dependencies, then exit."],
+    ['--pull-gems','-p', GetoptLong::NO_ARGUMENT,
+      "Pull all git mrbgems."],
+    ['--trace',    '-t', GetoptLong::NO_ARGUMENT,
+      "Turn on invoke/execute tracing."],
+    ['--usage',    '-h', GetoptLong::NO_ARGUMENT,
+      "Display usage."],
+    ['--verbose',  '-v', GetoptLong::NO_ARGUMENT,
+      "Log message to standard output."],
+    ['--directory', '-C', GetoptLong::REQUIRED_ARGUMENT,
+      "Change executing directory of rakefiles."]
+  ]
+
+  # Create a RakeApp object.
+  def initialize
+    @rakefile = nil
+    @nosearch = false
+  end
+
+  # True if one of the files in RAKEFILES is in the current directory.
+  # If a match is found, it is copied into @rakefile.
+  def have_rakefile
+    RAKEFILES.each do |fn|
+      if File.exist?(fn)
+        @rakefile = fn
+        return true
+      end
+    end
+    return false
+  end
+
+  # Display the program usage line.
+  def usage
+      puts "rake [-f rakefile] {options} targets..."
+  end
+
+  # Display the rake command line help.
+  def help
+    usage
+    puts
+    puts "Options are ..."
+    puts
+    OPTIONS.sort.each do |long, short, mode, desc|
+      if mode == GetoptLong::REQUIRED_ARGUMENT
+        if desc =~ /\b([A-Z]{2,})\b/
+          long = long + "=#{$1}"
+        end
+      end
+      printf "  %-20s (%s)\n", long, short
+      printf "      %s\n", desc
+    end
+  end
+
+  # Display the tasks and dependencies.
+  def display_tasks
+    MiniRake::Task.tasks.each do |t|
+      puts "#{t.class} #{t.name}"
+      t.prerequisites.each { |pre| puts "    #{pre}" }
+    end
+  end
+
+  # Return a list of the command line options supported by the
+  # program.
+  def command_line_options
+    OPTIONS.collect { |lst| lst[0..-2] }
+  end
+
+  # Do the option defined by +opt+ and +value+.
+  def do_option(opt, value)
+    case opt
+    when '--dry-run'
+      $dryrun = true
+      $trace = true
+    when '--help'
+      help
+      exit
+    when '--libdir'
+      $:.push(value)
+    when '--nosearch'
+      @nosearch = true
+    when '--quiet'
+      $verbose = false
+    when '--rakefile'
+      RAKEFILES.clear
+      RAKEFILES << value
+    when '--require'
+      require value
+    when '--tasks'
+      $show_tasks = true
+    when '--pull-gems'
+      $pull_gems = true
+    when '--trace'
+      $trace = true
+    when '--usage'
+      usage
+      exit
+    when '--verbose'
+      $verbose = true
+    when '--version'
+      puts "rake, version #{RAKEVERSION}"
+      exit
+    when '--directory'
+      Dir.chdir value
+    else
+      fail "Unknown option: #{opt}"
+    end
+  end
+
+  # Read and handle the command line options.
+  def handle_options
+    $verbose = false
+    $pull_gems = false
+    opts = GetoptLong.new(*command_line_options)
+    opts.each { |opt, value| do_option(opt, value) }
+  end
+
+  # Run the +rake+ application.
+  def run
+    handle_options
+    begin
+      here = Dir.pwd
+      while ! have_rakefile
+        Dir.chdir("..")
+        if Dir.pwd == here || @nosearch
+          fail "No Rakefile found (looking for: #{RAKEFILES.join(', ')})"
+        end
+        here = Dir.pwd
+      end
+      tasks = []
+      ARGV.each do |task_name|
+        if /^(\w+)=(.*)/.match(task_name)
+          ENV[$1] = $2
+        else
+          tasks << task_name
+        end
+      end
+      puts "(in #{Dir.pwd})"
+      $rakefile = @rakefile
+      load @rakefile
+      if $show_tasks
+        display_tasks
+      else
+        tasks.push("default") if tasks.size == 0
+        tasks.each do |task_name|
+          MiniRake::Task[task_name].invoke
+        end
+      end
+    rescue Exception => ex
+      puts "rake aborted!"
+      puts ex.message
+      if $trace
+        puts ex.backtrace.join("\n")
+      else
+        puts ex.backtrace.find {|str| str =~ /#{@rakefile}/ } || ""
+      end
+      exit 1
+    end
+  end
+end
+
+if __FILE__ == $0 then
+  RakeApp.new.run
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/default.gembox
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/default.gembox	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/default.gembox	(revision 270)
@@ -0,0 +1,76 @@
+MRuby::GemBox.new do |conf|
+  # Use standard Kernel#sprintf method
+  conf.gem :core => "mruby-sprintf"
+
+  # Use standard print/puts/p
+  conf.gem :core => "mruby-print"
+
+  # Use standard Math module
+  conf.gem :core => "mruby-math"
+
+  # Use standard Time class
+  conf.gem :core => "mruby-time"
+
+  # Use standard Struct class
+  conf.gem :core => "mruby-struct"
+
+  # Use Enumerable module extension
+  conf.gem :core => "mruby-enum-ext"
+
+  # Use String class extension
+  conf.gem :core => "mruby-string-ext"
+
+  # Use Numeric class extension
+  conf.gem :core => "mruby-numeric-ext"
+
+  # Use Array class extension
+  conf.gem :core => "mruby-array-ext"
+
+  # Use Hash class extension
+  conf.gem :core => "mruby-hash-ext"
+
+  # Use Range class extension
+  conf.gem :core => "mruby-range-ext"
+
+  # Use Proc class extension
+  conf.gem :core => "mruby-proc-ext"
+
+  # Use Symbol class extension
+  conf.gem :core => "mruby-symbol-ext"
+
+  # Use Random class
+  conf.gem :core => "mruby-random"
+
+  # Use Object class extension
+  conf.gem :core => "mruby-object-ext"
+
+  # Use ObjectSpace class
+  conf.gem :core => "mruby-objectspace"
+
+  # Use Fiber class
+  conf.gem :core => "mruby-fiber"
+
+  # Use Enumerator class (require mruby-fiber)
+  conf.gem :core => "mruby-enumerator"
+
+  # Use Enumerable::Lazy class (require mruby-enumerator)
+  conf.gem :core => "mruby-enum-lazy"
+
+  # Use toplevel object (main) methods extension
+  conf.gem :core => "mruby-toplevel-ext"
+
+  # Generate mirb command
+  conf.gem :core => "mruby-bin-mirb"
+
+  # Generate mruby command
+  conf.gem :core => "mruby-bin-mruby"
+
+  # Generate mruby-strip command
+  conf.gem :core => "mruby-bin-strip"
+
+  # Use Kernel module extension
+  conf.gem :core => "mruby-kernel-ext"
+
+  # Use mruby-compiler to build other mrbgems
+  conf.gem :core => "mruby-compiler"
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/full-core.gembox
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/full-core.gembox	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/full-core.gembox	(revision 270)
@@ -0,0 +1,9 @@
+MRuby::GemBox.new do |conf|
+  conf.gem :core => "mruby-sprintf"
+  conf.gem :core => "mruby-print"
+
+  Dir.glob("#{root}/mrbgems/mruby-*/mrbgem.rake") do |x|
+    g = File.basename File.dirname x
+    conf.gem :core => g unless g =~ /^mruby-(print|sprintf|bin-debugger|test)$/
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-array-ext/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-array-ext/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-array-ext/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-array-ext') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'Array class extension'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-array-ext/mrblib/array.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-array-ext/mrblib/array.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-array-ext/mrblib/array.rb	(revision 270)
@@ -0,0 +1,712 @@
+class Array
+  ##
+  # call-seq:
+  #    ary.uniq!                -> ary or nil
+  #    ary.uniq! { |item| ... } -> ary or nil
+  #
+  # Removes duplicate elements from +self+.
+  # Returns <code>nil</code> if no changes are made (that is, no
+  # duplicates are found).
+  #
+  #    a = [ "a", "a", "b", "b", "c" ]
+  #    a.uniq!   #=> ["a", "b", "c"]
+  #    b = [ "a", "b", "c" ]
+  #    b.uniq!   #=> nil
+  #    c = [["student","sam"], ["student","george"], ["teacher","matz"]]
+  #    c.uniq! { |s| s.first } # => [["student", "sam"], ["teacher", "matz"]]
+  #
+  def uniq!(&block)
+    ary = self.dup
+    result = []
+    if block
+      hash = {}
+      while ary.size > 0
+        val = ary.shift
+        key = block.call(val)
+        hash[key] = val unless hash.has_key?(key)
+      end
+      hash.each_value do |value|
+        result << value
+      end
+    else
+      while ary.size > 0
+        result << ary.shift
+        ary.delete(result.last)
+      end
+    end
+    if result.size == self.size
+      nil
+    else
+      self.replace(result)
+    end
+  end
+
+  ##
+  # call-seq:
+  #    ary.uniq                -> new_ary
+  #    ary.uniq { |item| ... } -> new_ary
+  #
+  # Returns a new array by removing duplicate values in +self+.
+  #
+  #    a = [ "a", "a", "b", "b", "c" ]
+  #    a.uniq   #=> ["a", "b", "c"]
+  #
+  #    b = [["student","sam"], ["student","george"], ["teacher","matz"]]
+  #    b.uniq { |s| s.first } # => [["student", "sam"], ["teacher", "matz"]]
+  #
+  def uniq(&block)
+    ary = self.dup
+    if block
+      ary.uniq!(&block)
+    else
+      ary.uniq!
+    end
+    ary
+  end
+
+  ##
+  # call-seq:
+  #    ary - other_ary    -> new_ary
+  #
+  # Array Difference---Returns a new array that is a copy of
+  # the original array, removing any items that also appear in
+  # <i>other_ary</i>. (If you need set-like behavior, see the
+  # library class Set.)
+  #
+  #    [ 1, 1, 2, 2, 3, 3, 4, 5 ] - [ 1, 2, 4 ]  #=>  [ 3, 3, 5 ]
+  #
+  def -(elem)
+    raise TypeError, "can't convert #{elem.class} into Array" unless elem.class == Array
+
+    hash = {}
+    array = []
+    elem.each { |x| hash[x] = true }
+    self.each { |x| array << x unless hash[x] }
+    array
+  end
+
+  ##
+  # call-seq:
+  #    ary | other_ary     -> new_ary
+  #
+  # Set Union---Returns a new array by joining this array with
+  # <i>other_ary</i>, removing duplicates.
+  #
+  #    [ "a", "b", "c" ] | [ "c", "d", "a" ]
+  #           #=> [ "a", "b", "c", "d" ]
+  #
+  def |(elem)
+    raise TypeError, "can't convert #{elem.class} into Array" unless elem.class == Array
+
+    ary = self + elem
+    ary.uniq! or ary
+  end
+
+  ##
+  # call-seq:
+  #    ary & other_ary      -> new_ary
+  #
+  # Set Intersection---Returns a new array
+  # containing elements common to the two arrays, with no duplicates.
+  #
+  #    [ 1, 1, 3, 5 ] & [ 1, 2, 3 ]   #=> [ 1, 3 ]
+  #
+  def &(elem)
+    raise TypeError, "can't convert #{elem.class} into Array" unless elem.class == Array
+
+    hash = {}
+    array = []
+    elem.each{|v| hash[v] = true }
+    self.each do |v|
+      if hash[v]
+        array << v
+        hash.delete v
+      end
+    end
+    array
+  end
+
+  ##
+  # call-seq:
+  #    ary.flatten -> new_ary
+  #    ary.flatten(level) -> new_ary
+  #
+  # Returns a new array that is a one-dimensional flattening of this
+  # array (recursively). That is, for every element that is an array,
+  # extract its elements into the new array.  If the optional
+  # <i>level</i> argument determines the level of recursion to flatten.
+  #
+  #    s = [ 1, 2, 3 ]           #=> [1, 2, 3]
+  #    t = [ 4, 5, 6, [7, 8] ]   #=> [4, 5, 6, [7, 8]]
+  #    a = [ s, t, 9, 10 ]       #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10]
+  #    a.flatten                 #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
+  #    a = [ 1, 2, [3, [4, 5] ] ]
+  #    a.flatten(1)              #=> [1, 2, 3, [4, 5]]
+  #
+  def flatten(depth=nil)
+    ar = []
+    self.each do |e|
+      if e.is_a?(Array) && (depth.nil? || depth > 0)
+        ar += e.flatten(depth.nil? ? nil : depth - 1)
+      else
+        ar << e
+      end
+    end
+    ar
+  end
+
+  ##
+  # call-seq:
+  #    ary.flatten!        -> ary or nil
+  #    ary.flatten!(level) -> array or nil
+  #
+  # Flattens +self+ in place.
+  # Returns <code>nil</code> if no modifications were made (i.e.,
+  # <i>ary</i> contains no subarrays.)  If the optional <i>level</i>
+  # argument determines the level of recursion to flatten.
+  #
+  #    a = [ 1, 2, [3, [4, 5] ] ]
+  #    a.flatten!   #=> [1, 2, 3, 4, 5]
+  #    a.flatten!   #=> nil
+  #    a            #=> [1, 2, 3, 4, 5]
+  #    a = [ 1, 2, [3, [4, 5] ] ]
+  #    a.flatten!(1) #=> [1, 2, 3, [4, 5]]
+  #
+  def flatten!(depth=nil)
+    modified = false
+    ar = []
+    self.each do |e|
+      if e.is_a?(Array) && (depth.nil? || depth > 0)
+        ar += e.flatten(depth.nil? ? nil : depth - 1)
+        modified = true
+      else
+        ar << e
+      end
+    end
+    if modified
+      self.replace(ar)
+    else
+      nil
+    end
+  end
+
+  ##
+  # call-seq:
+  #    ary.compact     -> new_ary
+  #
+  # Returns a copy of +self+ with all +nil+ elements removed.
+  #
+  #    [ "a", nil, "b", nil, "c", nil ].compact
+  #                      #=> [ "a", "b", "c" ]
+  #
+  def compact
+    result = self.dup
+    result.compact!
+    result
+  end
+
+  ##
+  # call-seq:
+  #    ary.compact!    -> ary  or  nil
+  #
+  # Removes +nil+ elements from the array.
+  # Returns +nil+ if no changes were made, otherwise returns
+  # <i>ary</i>.
+  #
+  #    [ "a", nil, "b", nil, "c" ].compact! #=> [ "a", "b", "c" ]
+  #    [ "a", "b", "c" ].compact!           #=> nil
+  #
+  def compact!
+    result = self.select { |e| !e.nil? }
+    if result.size == self.size
+      nil
+    else
+      self.replace(result)
+    end
+  end
+
+  # for efficiency
+  def reverse_each(&block)
+    return to_enum :reverse_each unless block_given?
+
+    i = self.size - 1
+    while i>=0
+      block.call(self[i])
+      i -= 1
+    end
+    self
+  end
+
+  NONE=Object.new
+  ##
+  #  call-seq:
+  #     ary.fetch(index)                    -> obj
+  #     ary.fetch(index, default)           -> obj
+  #     ary.fetch(index) { |index| block }  -> obj
+  #
+  #  Tries to return the element at position +index+, but throws an IndexError
+  #  exception if the referenced +index+ lies outside of the array bounds.  This
+  #  error can be prevented by supplying a second argument, which will act as a
+  #  +default+ value.
+  #
+  #  Alternatively, if a block is given it will only be executed when an
+  #  invalid +index+ is referenced.  Negative values of +index+ count from the
+  #  end of the array.
+  #
+  #     a = [ 11, 22, 33, 44 ]
+  #     a.fetch(1)               #=> 22
+  #     a.fetch(-1)              #=> 44
+  #     a.fetch(4, 'cat')        #=> "cat"
+  #     a.fetch(100) { |i| puts "#{i} is out of bounds" }
+  #                              #=> "100 is out of bounds"
+  #
+
+  def fetch(n=nil, ifnone=NONE, &block)
+    warn "block supersedes default value argument" if !n.nil? && ifnone != NONE && block
+
+    idx = n
+    if idx < 0
+      idx += size
+    end
+    if idx < 0 || size <= idx
+      return block.call(n) if block
+      if ifnone == NONE
+        raise IndexError, "index #{n} outside of array bounds: #{-size}...#{size}"
+      end
+      return ifnone
+    end
+    self[idx]
+  end
+
+  ##
+  #  call-seq:
+  #     ary.fill(obj)                                 -> ary
+  #     ary.fill(obj, start [, length])               -> ary
+  #     ary.fill(obj, range )                         -> ary
+  #     ary.fill { |index| block }                    -> ary
+  #     ary.fill(start [, length] ) { |index| block } -> ary
+  #     ary.fill(range) { |index| block }             -> ary
+  #
+  #  The first three forms set the selected elements of +self+ (which
+  #  may be the entire array) to +obj+.
+  #
+  #  A +start+ of +nil+ is equivalent to zero.
+  #
+  #  A +length+ of +nil+ is equivalent to the length of the array.
+  #
+  #  The last three forms fill the array with the value of the given block,
+  #  which is passed the absolute index of each element to be filled.
+  #
+  #  Negative values of +start+ count from the end of the array, where +-1+ is
+  #  the last element.
+  #
+  #     a = [ "a", "b", "c", "d" ]
+  #     a.fill("x")              #=> ["x", "x", "x", "x"]
+  #     a.fill("w", -1)          #=> ["x", "x", "x", "w"]
+  #     a.fill("z", 2, 2)        #=> ["x", "x", "z", "z"]
+  #     a.fill("y", 0..1)        #=> ["y", "y", "z", "z"]
+  #     a.fill { |i| i*i }       #=> [0, 1, 4, 9]
+  #     a.fill(-2) { |i| i*i*i } #=> [0, 1, 8, 27]
+  #     a.fill(1, 2) { |i| i+1 } #=> [0, 2, 3, 27]
+  #     a.fill(0..1) { |i| i+1 } #=> [1, 2, 3, 27]
+  #
+
+  def fill(arg0=nil, arg1=nil, arg2=nil, &block)
+    if arg0.nil? && arg1.nil? && arg2.nil? && !block
+      raise ArgumentError, "wrong number of arguments (0 for 1..3)"
+    end
+
+    beg = len = 0
+    ary = []
+    if block
+      if arg0.nil? && arg1.nil? && arg2.nil?
+        # ary.fill { |index| block }                    -> ary
+        beg = 0
+        len = self.size
+      elsif !arg0.nil? && arg0.kind_of?(Range)
+        # ary.fill(range) { |index| block }             -> ary
+        beg = arg0.begin
+        beg += self.size if beg < 0
+        len = arg0.end
+        len += self.size if len < 0
+        len += 1 unless arg0.exclude_end?
+      elsif !arg0.nil?
+        # ary.fill(start [, length] ) { |index| block } -> ary
+        beg = arg0
+        beg += self.size if beg < 0
+        if arg1.nil?
+          len = self.size
+        else
+          len = arg0 + arg1
+        end
+      end
+    else
+      if !arg0.nil? && arg1.nil? && arg2.nil?
+        # ary.fill(obj)                                 -> ary
+        beg = 0
+        len = self.size
+      elsif !arg0.nil? && !arg1.nil? && arg1.kind_of?(Range)
+        # ary.fill(obj, range )                         -> ary
+        beg = arg1.begin
+        beg += self.size if beg < 0
+        len = arg1.end
+        len += self.size if len < 0
+        len += 1 unless arg1.exclude_end?
+      elsif !arg0.nil? && !arg1.nil?
+        # ary.fill(obj, start [, length])               -> ary
+        beg = arg1
+        beg += self.size if beg < 0
+        if arg2.nil?
+          len = self.size
+        else
+          len = beg + arg2
+        end
+      end
+    end
+
+    i = beg
+    if block
+      while i < len
+        self[i] = block.call(i)
+        i += 1
+      end
+    else
+      while i < len
+        self[i] = arg0
+        i += 1
+      end
+    end
+    self
+  end
+
+  ##
+  #  call-seq:
+  #     ary.rotate(count=1)    -> new_ary
+  #
+  #  Returns a new array by rotating +self+ so that the element at +count+ is
+  #  the first element of the new array.
+  #
+  #  If +count+ is negative then it rotates in the opposite direction, starting
+  #  from the end of +self+ where +-1+ is the last element.
+  #
+  #     a = [ "a", "b", "c", "d" ]
+  #     a.rotate         #=> ["b", "c", "d", "a"]
+  #     a                #=> ["a", "b", "c", "d"]
+  #     a.rotate(2)      #=> ["c", "d", "a", "b"]
+  #     a.rotate(-3)     #=> ["b", "c", "d", "a"]
+
+  def rotate(count=1)
+    ary = []
+    len = self.length
+
+    if len > 0
+      idx = (count < 0) ? (len - (~count % len) - 1) : (count % len) # rotate count
+      len.times do
+        ary << self[idx]
+        idx += 1
+        idx = 0 if idx > len-1
+      end
+    end
+    ary
+  end
+
+  ##
+  #  call-seq:
+  #     ary.rotate!(count=1)   -> ary
+  #
+  #  Rotates +self+ in place so that the element at +count+ comes first, and
+  #  returns +self+.
+  #
+  #  If +count+ is negative then it rotates in the opposite direction, starting
+  #  from the end of the array where +-1+ is the last element.
+  #
+  #     a = [ "a", "b", "c", "d" ]
+  #     a.rotate!        #=> ["b", "c", "d", "a"]
+  #     a                #=> ["b", "c", "d", "a"]
+  #     a.rotate!(2)     #=> ["d", "a", "b", "c"]
+  #     a.rotate!(-3)    #=> ["a", "b", "c", "d"]
+
+  def rotate!(count=1)
+    self.replace(self.rotate(count))
+  end
+
+  ##
+  #  call-seq:
+  #     ary.delete_if { |item| block }  -> ary
+  #     ary.delete_if                   -> Enumerator
+  #
+  #  Deletes every element of +self+ for which block evaluates to +true+.
+  #
+  #  The array is changed instantly every time the block is called, not after
+  #  the iteration is over.
+  #
+  #  See also Array#reject!
+  #
+  #  If no block is given, an Enumerator is returned instead.
+  #
+  #     scores = [ 97, 42, 75 ]
+  #     scores.delete_if {|score| score < 80 }   #=> [97]
+
+  def delete_if(&block)
+    return to_enum :delete_if unless block_given?
+
+    idx = 0
+    while idx < self.size do
+      if block.call(self[idx])
+        self.delete_at(idx)
+      else
+        idx += 1
+      end
+    end
+    self
+  end
+
+  ##
+  #  call-seq:
+  #     ary.reject! { |item| block }  -> ary or nil
+  #     ary.reject!                   -> Enumerator
+  #
+  #  Equivalent to Array#delete_if, deleting elements from +self+ for which the
+  #  block evaluates to +true+, but returns +nil+ if no changes were made.
+  #
+  #  The array is changed instantly every time the block is called, not after
+  #  the iteration is over.
+  #
+  #  See also Enumerable#reject and Array#delete_if.
+  #
+  #  If no block is given, an Enumerator is returned instead.
+
+  def reject!(&block)
+    return to_enum :reject! unless block_given?
+
+    len = self.size
+    idx = 0
+    while idx < self.size do
+      if block.call(self[idx])
+        self.delete_at(idx)
+      else
+        idx += 1
+      end
+    end
+    if self.size == len
+      nil
+    else
+      self
+    end
+  end
+
+  ##
+  #  call-seq:
+  #     ary.insert(index, obj...)  -> ary
+  #
+  #  Inserts the given values before the element with the given +index+.
+  #
+  #  Negative indices count backwards from the end of the array, where +-1+ is
+  #  the last element.
+  #
+  #     a = %w{ a b c d }
+  #     a.insert(2, 99)         #=> ["a", "b", 99, "c", "d"]
+  #     a.insert(-2, 1, 2, 3)   #=> ["a", "b", 99, "c", 1, 2, 3, "d"]
+
+  def insert(idx, *args)
+    idx += self.size + 1 if idx < 0
+    self[idx, 0] = args
+    self
+  end
+
+  ##
+  #  call-seq:
+  #     ary.bsearch {|x| block }  -> elem
+  #
+  #  By using binary search, finds a value from this array which meets
+  #  the given condition in O(log n) where n is the size of the array.
+  #
+  #  You can use this method in two use cases: a find-minimum mode and
+  #  a find-any mode.  In either case, the elements of the array must be
+  #  monotone (or sorted) with respect to the block.
+  #
+  #  In find-minimum mode (this is a good choice for typical use case),
+  #  the block must return true or false, and there must be an index i
+  #  (0 <= i <= ary.size) so that:
+  #
+  #  - the block returns false for any element whose index is less than
+  #    i, and
+  #  - the block returns true for any element whose index is greater
+  #    than or equal to i.
+  #
+  #  This method returns the i-th element.  If i is equal to ary.size,
+  #  it returns nil.
+  #
+  #     ary = [0, 4, 7, 10, 12]
+  #     ary.bsearch {|x| x >=   4 } #=> 4
+  #     ary.bsearch {|x| x >=   6 } #=> 7
+  #     ary.bsearch {|x| x >=  -1 } #=> 0
+  #     ary.bsearch {|x| x >= 100 } #=> nil
+  #
+  #  In find-any mode (this behaves like libc's bsearch(3)), the block
+  #  must return a number, and there must be two indices i and j
+  #  (0 <= i <= j <= ary.size) so that:
+  #
+  #  - the block returns a positive number for ary[k] if 0 <= k < i,
+  #  - the block returns zero for ary[k] if i <= k < j, and
+  #  - the block returns a negative number for ary[k] if
+  #    j <= k < ary.size.
+  #
+  #  Under this condition, this method returns any element whose index
+  #  is within i...j.  If i is equal to j (i.e., there is no element
+  #  that satisfies the block), this method returns nil.
+  #
+  #     ary = [0, 4, 7, 10, 12]
+  #     # try to find v such that 4 <= v < 8
+  #     ary.bsearch {|x| 1 - (x / 4).truncate } #=> 4 or 7
+  #     # try to find v such that 8 <= v < 10
+  #     ary.bsearch {|x| 4 - (x / 2).truncate } #=> nil
+  #
+  #  You must not mix the two modes at a time; the block must always
+  #  return either true/false, or always return a number.  It is
+  #  undefined which value is actually picked up at each iteration.
+
+  def bsearch(&block)
+    return to_enum :bsearch unless block_given?
+
+    low = 0
+    high = self.size
+    satisfied = false
+    while low < high
+      mid = low + ((high - low) / 2).truncate
+      val = self[mid]
+      v = block.call(val)
+      if v.is_a?(Integer)
+        return val if v == 0
+        smaller = v < 0
+      elsif v == true
+        satisfied = true
+        smaller = true
+      elsif v == false || v.nil?
+        smaller = false
+      end
+      if smaller
+        high = mid
+      else
+        low = mid + 1
+      end
+    end
+    return nil if low == self.size
+    return nil unless satisfied
+    self[low]
+  end
+
+  ##
+  #  call-seq:
+  #     ary.delete_if { |item| block }  -> ary
+  #     ary.delete_if                   -> Enumerator
+  #
+  #  Deletes every element of +self+ for which block evaluates to +true+.
+  #
+  #  The array is changed instantly every time the block is called, not after
+  #  the iteration is over.
+  #
+  #  See also Array#reject!
+  #
+  #  If no block is given, an Enumerator is returned instead.
+  #
+  #     scores = [ 97, 42, 75 ]
+  #     scores.delete_if {|score| score < 80 }   #=> [97]
+
+  def delete_if(&block)
+    return to_enum :delete_if unless block_given?
+
+    idx = 0
+    while idx < self.size do
+      if block.call(self[idx])
+        self.delete_at(idx)
+      else
+        idx += 1
+      end
+    end
+    self
+  end
+
+  ##
+  #  call-seq:
+  #     ary.keep_if { |item| block } -> ary
+  #     ary.keep_if                  -> Enumerator
+  #
+  #  Deletes every element of +self+ for which the given block evaluates to
+  #  +false+.
+  #
+  #  See also Array#select!
+  #
+  #  If no block is given, an Enumerator is returned instead.
+  #
+  #     a = [1, 2, 3, 4, 5]
+  #     a.keep_if { |val| val > 3 } #=> [4, 5]
+
+  def keep_if(&block)
+    return to_enum :keep_if unless block_given?
+
+    idx = 0
+    len = self.size
+    while idx < self.size do
+      if block.call(self[idx])
+        idx += 1
+      else
+        self.delete_at(idx)
+      end
+    end
+    self
+  end
+
+  ##
+  #  call-seq:
+  #     ary.select!  {|item| block } -> ary or nil
+  #     ary.select!                  -> Enumerator
+  #
+  #  Invokes the given block passing in successive elements from +self+,
+  #  deleting elements for which the block returns a +false+ value.
+  #
+  #  If changes were made, it will return +self+, otherwise it returns +nil+.
+  #
+  #  See also Array#keep_if
+  #
+  #  If no block is given, an Enumerator is returned instead.
+
+  def select!(&block)
+    return to_enum :select! unless block_given?
+
+    result = []
+    self.each do |x|
+      result << x if block.call(x)
+    end
+    return nil if self.size == result.size
+    self.replace(result)
+  end
+
+  ##
+  #  call-seq:
+  #     ary.index(val)            -> int or nil
+  #     ary.index {|item| block } ->  int or nil
+  #
+  #  Returns the _index_ of the first object in +ary+ such that the object is
+  #  <code>==</code> to +obj+.
+  #
+  #  If a block is given instead of an argument, returns the _index_ of the
+  #  first object for which the block returns +true+.  Returns +nil+ if no
+  #  match is found.
+  #
+  # ISO 15.2.12.5.14
+  def index(val=NONE, &block)
+    return to_enum(:find_index, val) if !block && val == NONE
+
+    if block
+      idx = 0
+      self.each do |*e|
+        return idx if block.call(*e)
+        idx += 1
+      end
+    else
+      return self.__ary_index(val)
+    end
+    nil
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-array-ext/src/array.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-array-ext/src/array.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-array-ext/src/array.c	(revision 270)
@@ -0,0 +1,167 @@
+#include "mruby.h"
+#include "mruby/value.h"
+#include "mruby/array.h"
+#include "mruby/range.h"
+#include "mruby/hash.h"
+
+/*
+ *  call-seq:
+ *     ary.assoc(obj)   -> new_ary  or  nil
+ *
+ *  Searches through an array whose elements are also arrays
+ *  comparing _obj_ with the first element of each contained array
+ *  using obj.==.
+ *  Returns the first contained array that matches (that
+ *  is, the first associated array),
+ *  or +nil+ if no match is found.
+ *  See also <code>Array#rassoc</code>.
+ *
+ *     s1 = [ "colors", "red", "blue", "green" ]
+ *     s2 = [ "letters", "a", "b", "c" ]
+ *     s3 = "foo"
+ *     a  = [ s1, s2, s3 ]
+ *     a.assoc("letters")  #=> [ "letters", "a", "b", "c" ]
+ *     a.assoc("foo")      #=> nil
+ */
+
+static mrb_value
+mrb_ary_assoc(mrb_state *mrb, mrb_value ary)
+{
+  mrb_int i;
+  mrb_value v, k;
+
+  mrb_get_args(mrb, "o", &k);
+
+  for (i = 0; i < RARRAY_LEN(ary); ++i) {
+    v = mrb_check_array_type(mrb, RARRAY_PTR(ary)[i]);
+    if (!mrb_nil_p(v) && RARRAY_LEN(v) > 0 &&
+        mrb_equal(mrb, RARRAY_PTR(v)[0], k))
+      return v;
+  }
+  return mrb_nil_value();
+}
+
+/*
+ *  call-seq:
+ *     ary.rassoc(obj) -> new_ary or nil
+ *
+ *  Searches through the array whose elements are also arrays. Compares
+ *  _obj_ with the second element of each contained array using
+ *  <code>==</code>. Returns the first contained array that matches. See
+ *  also <code>Array#assoc</code>.
+ *
+ *     a = [ [ 1, "one"], [2, "two"], [3, "three"], ["ii", "two"] ]
+ *     a.rassoc("two")    #=> [2, "two"]
+ *     a.rassoc("four")   #=> nil
+ */
+
+static mrb_value
+mrb_ary_rassoc(mrb_state *mrb, mrb_value ary)
+{
+  mrb_int i;
+  mrb_value v, value;
+
+  mrb_get_args(mrb, "o", &value);
+
+  for (i = 0; i < RARRAY_LEN(ary); ++i) {
+    v = RARRAY_PTR(ary)[i];
+    if (mrb_type(v) == MRB_TT_ARRAY &&
+        RARRAY_LEN(v) > 1 &&
+        mrb_equal(mrb, RARRAY_PTR(v)[1], value))
+      return v;
+  }
+  return mrb_nil_value();
+}
+
+/*
+ *  call-seq:
+ *     ary.at(index)   ->   obj  or nil
+ *
+ *  Returns the element at _index_. A
+ *  negative index counts from the end of +self+.  Returns +nil+
+ *  if the index is out of range. See also <code>Array#[]</code>.
+ *
+ *     a = [ "a", "b", "c", "d", "e" ]
+ *     a.at(0)     #=> "a"
+ *     a.at(-1)    #=> "e"
+ */
+
+static mrb_value
+mrb_ary_at(mrb_state *mrb, mrb_value ary)
+{
+  mrb_int pos;
+  mrb_get_args(mrb, "i", &pos);
+
+  return mrb_ary_entry(ary, pos);
+}
+
+static mrb_value
+mrb_ary_values_at(mrb_state *mrb, mrb_value self)
+{
+  mrb_int argc;
+  mrb_value *argv;
+
+  mrb_get_args(mrb, "*", &argv, &argc);
+
+  return mrb_get_values_at(mrb, self, RARRAY_LEN(self), argc, argv, mrb_ary_ref);
+}
+
+/*
+ *  call-seq:
+ *     ary.to_h   ->   Hash
+ *
+ *  Returns the result of interpreting <i>aray</i> as an array of
+ *  <tt>[key, value]</tt> paris.
+ *
+ *      [[:foo, :bar], [1, 2]].to_h
+ *        # => {:foo => :bar, 1 => 2}
+ *
+ */
+
+static mrb_value
+mrb_ary_to_h(mrb_state *mrb, mrb_value ary)
+{
+  mrb_int i;
+  mrb_value v, hash;
+
+  hash = mrb_hash_new_capa(mrb, 0);
+
+  for (i = 0; i < RARRAY_LEN(ary); ++i) {
+    v = mrb_check_array_type(mrb, RARRAY_PTR(ary)[i]);
+
+    if (mrb_nil_p(v)) {
+      mrb_raisef(mrb, E_TYPE_ERROR, "wrong element type %S at %S (expected array)",
+        mrb_str_new_cstr(mrb,  mrb_obj_classname(mrb, RARRAY_PTR(ary)[i])),
+        mrb_fixnum_value(i)
+      );
+    }
+
+    if (RARRAY_LEN(v) != 2) {
+      mrb_raisef(mrb, E_ARGUMENT_ERROR, "wrong array length at %S (expected 2, was %S)",
+        mrb_fixnum_value(i),
+        mrb_fixnum_value(RARRAY_LEN(v))
+      );
+    }
+
+    mrb_hash_set(mrb, hash, RARRAY_PTR(v)[0], RARRAY_PTR(v)[1]);
+  }
+
+  return hash;
+}
+
+void
+mrb_mruby_array_ext_gem_init(mrb_state* mrb)
+{
+  struct RClass * a = mrb->array_class;
+
+  mrb_define_method(mrb, a, "assoc",  mrb_ary_assoc,  MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, a, "at",     mrb_ary_at,     MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, a, "rassoc", mrb_ary_rassoc, MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, a, "values_at", mrb_ary_values_at, MRB_ARGS_ANY());
+  mrb_define_method(mrb, a, "to_h",   mrb_ary_to_h, MRB_ARGS_REQ(0));
+}
+
+void
+mrb_mruby_array_ext_gem_final(mrb_state* mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-array-ext/test/array.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-array-ext/test/array.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-array-ext/test/array.rb	(revision 270)
@@ -0,0 +1,300 @@
+##
+# Array(Ext) Test
+
+assert("Array#assoc") do
+  s1 = [ "colors", "red", "blue", "green" ]
+  s2 = [ "letters", "a", "b", "c" ]
+  s3 = "foo"
+  a  = [ s1, s2, s3 ]
+
+  assert_equal [ "letters", "a", "b", "c" ], a.assoc("letters")
+  assert_nil a.assoc("foo")
+end
+
+assert("Array#at") do
+  a = [ "a", "b", "c", "d", "e" ]
+  assert_equal "a", a.at(0)
+  assert_equal "e", a.at(-1)
+end
+
+assert("Array#rassoc") do
+  a = [ [ 1, "one"], [2, "two"], [3, "three"], ["ii", "two"] ]
+
+  assert_equal [2, "two"], a.rassoc("two")
+  assert_nil a.rassoc("four")
+end
+
+assert("Array#uniq!") do
+  a = [1, 2, 3, 1]
+  a.uniq!
+  assert_equal [1, 2, 3], a
+
+  b = [ "a", "b", "c" ]
+  assert_nil b.uniq!
+
+  c = [["student","sam"], ["student","george"], ["teacher","matz"]]
+  assert_equal [["student", "sam"], ["teacher", "matz"]], c.uniq! { |s| s.first }
+
+  d = [["student","sam"], ["teacher","matz"]]
+  assert_nil d.uniq! { |s| s.first }
+end
+
+assert("Array#uniq") do
+  a = [1, 2, 3, 1]
+  assert_equal [1, 2, 3], a.uniq
+  assert_equal [1, 2, 3, 1], a
+
+  b = [["student","sam"], ["student","george"], ["teacher","matz"]]
+  assert_equal [["student", "sam"], ["teacher", "matz"]], b.uniq { |s| s.first }
+end
+
+assert("Array#-") do
+  a = [1, 2, 3, 1]
+  b = [1]
+  c = 1
+
+  assert_raise(TypeError) { a - c }
+  assert_equal [2, 3], (a - b)
+  assert_equal [1, 2, 3, 1], a
+end
+
+assert("Array#|") do
+  a = [1, 2, 3, 1]
+  b = [1, 4]
+  c = 1
+
+  assert_raise(TypeError) { a | c }
+  assert_equal [1, 2, 3, 4], (a | b)
+  assert_equal [1, 2, 3, 1], a
+end
+
+assert("Array#&") do
+  a = [1, 2, 3, 1]
+  b = [1, 4]
+  c = 1
+
+  assert_raise(TypeError) { a & c }
+  assert_equal [1], (a & b)
+  assert_equal [1, 2, 3, 1], a
+end
+
+assert("Array#flatten") do
+  assert_equal [1, 2, "3", {4=>5}, :'6'],    [1, 2, "3", {4=>5}, :'6'].flatten
+  assert_equal [1, 2, 3, 4, 5, 6], [1, 2,    [3, 4, 5], 6].flatten
+  assert_equal [1, 2, 3, 4, 5, 6], [1, 2,    [3, [4, 5], 6]].flatten
+  assert_equal [1, [2, [3, [4, [5, [6]]]]]], [1, [2, [3, [4, [5, [6]]]]]].flatten(0)
+  assert_equal [1, 2, [3, [4, [5, [6]]]]],   [1, [2, [3, [4, [5, [6]]]]]].flatten(1)
+  assert_equal [1, 2, 3, [4, [5, [6]]]],     [1, [2, [3, [4, [5, [6]]]]]].flatten(2)
+  assert_equal [1, 2, 3, 4, [5, [6]]],       [1, [2, [3, [4, [5, [6]]]]]].flatten(3)
+  assert_equal [1, 2, 3, 4, 5, [6]],         [1, [2, [3, [4, [5, [6]]]]]].flatten(4)
+  assert_equal [1, 2, 3, 4, 5, 6],           [1, [2, [3, [4, [5, [6]]]]]].flatten(5)
+end
+
+assert("Array#flatten!") do
+  assert_equal [1, 2, 3, 4, 5, 6], [1, 2, [3, [4, 5], 6]].flatten!
+end
+
+assert("Array#compact") do
+  a = [1, nil, "2", nil, :t, false, nil]
+  assert_equal [1, "2", :t, false], a.compact
+  assert_equal [1, nil, "2", nil, :t, false, nil], a
+end
+
+assert("Array#compact!") do
+  a = [1, nil, "2", nil, :t, false, nil]
+  a.compact!
+  assert_equal [1, "2", :t, false], a
+end
+
+assert("Array#fetch") do
+  a = [ 11, 22, 33, 44 ]
+  assert_equal 22, a.fetch(1)
+  assert_equal 44, a.fetch(-1)
+  assert_equal 'cat', a.fetch(4, 'cat')
+  ret = 0
+  a.fetch(100) { |i| ret = i }
+  assert_equal 100, ret
+  assert_raise(IndexError) { a.fetch(100) }
+end
+
+assert("Array#fill") do
+  a = [ "a", "b", "c", "d" ]
+  assert_equal ["x", "x", "x", "x"], a.fill("x")
+  assert_equal ["x", "x", "x", "w"], a.fill("w", -1)
+  assert_equal ["x", "x", "z", "z"], a.fill("z", 2, 2)
+  assert_equal ["y", "y", "z", "z"], a.fill("y", 0..1)
+  assert_equal [0, 1, 4, 9], a.fill { |i| i*i }
+  assert_equal [0, 1, 8, 27], a.fill(-2) { |i| i*i*i }
+  assert_equal [0, 2, 3, 27], a.fill(1, 2) { |i| i+1 }
+  assert_equal [1, 2, 3, 27], a.fill(0..1) { |i| i+1 }
+  assert_raise(ArgumentError) { a.fill }
+
+  assert_equal([0, 1, 2, 3, -1, 5], [0, 1, 2, 3, 4, 5].fill(-1, -2, 1))
+  assert_equal([0, 1, 2, 3, -1, -1, -1], [0, 1, 2, 3, 4, 5].fill(-1, -2, 3))
+  assert_equal([0, 1, 2, -1, -1, 5], [0, 1, 2, 3, 4, 5].fill(-1, 3..4))
+  assert_equal([0, 1, 2, -1, 4, 5], [0, 1, 2, 3, 4, 5].fill(-1, 3...4))
+  assert_equal([0, 1, -1, -1, -1, 5], [0, 1, 2, 3, 4, 5].fill(-1, 2..-2))
+  assert_equal([0, 1, -1, -1, 4, 5], [0, 1, 2, 3, 4, 5].fill(-1, 2...-2))
+  assert_equal([0, 1, 2, 13, 14, 5], [0, 1, 2, 3, 4, 5].fill(3..4){|i| i+10})
+  assert_equal([0, 1, 2, 13, 4, 5], [0, 1, 2, 3, 4, 5].fill(3...4){|i| i+10})
+  assert_equal([0, 1, 12, 13, 14, 5], [0, 1, 2, 3, 4, 5].fill(2..-2){|i| i+10})
+  assert_equal([0, 1, 12, 13, 4, 5], [0, 1, 2, 3, 4, 5].fill(2...-2){|i| i+10})
+
+  assert_equal [1, 2, 3, 4, 'x', 'x'], [1, 2, 3, 4, 5, 6].fill('x', -2..-1)
+  assert_equal [1, 2, 3, 4, 'x', 6], [1, 2, 3, 4, 5, 6].fill('x', -2...-1)
+  assert_equal [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6].fill('x', -2...-2)
+  assert_equal [1, 2, 3, 4, 'x', 6], [1, 2, 3, 4, 5, 6].fill('x', -2..-2)
+  assert_equal [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6].fill('x', -2..0)
+end
+
+assert("Array#reverse_each") do
+  a = [ "a", "b", "c", "d" ]
+  b = []
+  a.reverse_each do |i|
+    b << i
+  end
+  assert_equal [ "d", "c", "b", "a" ], b
+
+  if Object.const_defined?(:Enumerator)
+    assert_equal [ "d", "c", "b", "a" ], a.reverse_each.to_a
+  else
+    true
+  end
+end
+
+assert("Array#rotate") do
+  a = ["a", "b", "c", "d"]
+  assert_equal ["b", "c", "d", "a"], a.rotate
+  assert_equal ["a", "b", "c", "d"], a
+  assert_equal ["c", "d", "a", "b"], a.rotate(2)
+  assert_equal ["b", "c", "d", "a"], a.rotate(-3)
+  assert_equal ["c", "d", "a", "b"], a.rotate(10)
+  assert_equal [], [].rotate
+end
+
+assert("Array#rotate!") do
+  a = ["a", "b", "c", "d"]
+  assert_equal ["b", "c", "d", "a"], a.rotate!
+  assert_equal ["b", "c", "d", "a"], a
+  assert_equal ["d", "a", "b", "c"], a.rotate!(2)
+  assert_equal ["a", "b", "c", "d"], a.rotate!(-3)
+  assert_equal ["c", "d", "a", "b"], a.rotate(10)
+  assert_equal [], [].rotate!
+end
+
+assert("Array#delete_if") do
+  a = [1, 2, 3, 4, 5]
+  assert_equal [1, 2, 3, 4, 5], a.delete_if { false }
+  assert_equal [1, 2, 3, 4, 5], a
+
+  a = [1, 2, 3, 4, 5]
+  assert_equal [], a.delete_if { true }
+  assert_equal [], a
+
+  a = [1, 2, 3, 4, 5]
+  assert_equal [1, 2, 3], a.delete_if { |i| i > 3 }
+  assert_equal [1, 2, 3], a
+end
+
+assert("Array#reject!") do
+  a = [1, 2, 3, 4, 5]
+  assert_nil a.reject! { false }
+  assert_equal [1, 2, 3, 4, 5], a
+
+  a = [1, 2, 3, 4, 5]
+  assert_equal [], a.reject! { true }
+  assert_equal [], a
+
+  a = [1, 2, 3, 4, 5]
+  assert_equal [1, 2, 3], a.reject! { |val| val > 3 }
+  assert_equal [1, 2, 3], a
+end
+
+assert("Array#insert") do
+  a = ["a", "b", "c", "d"]
+  assert_equal ["a", "b", 99, "c", "d"], a.insert(2, 99)
+  assert_equal ["a", "b", 99, "c", 1, 2, 3, "d"], a.insert(-2, 1, 2, 3)
+
+  b = ["a", "b", "c", "d"]
+  assert_equal ["a", "b", "c", "d", nil, nil, 99], b.insert(6, 99)
+end
+
+assert("Array#bsearch") do
+  # Find minimum mode
+  a = [0, 4, 7, 10, 12]
+  assert_include [4, 7], a.bsearch {|x| x >= 4 }
+  assert_equal 7, a.bsearch {|x| x >= 6 }
+  assert_equal 0, a.bsearch {|x| x >= -1 }
+  assert_nil a.bsearch {|x| x >= 100 }
+
+  # Find any mode
+  a = [0, 4, 7, 10, 12]
+  assert_include [4, 7], a.bsearch {|x| 1 - (x / 4).truncate }
+  assert_nil a.bsearch {|x| 4 - (x / 2).truncate }
+  assert_equal(nil, a.bsearch {|x| 1 })
+  assert_equal(nil, a.bsearch {|x| -1 })
+end
+
+assert("Array#delete_if") do
+  a = [1, 2, 3, 4, 5]
+  assert_equal [1, 2, 3, 4, 5], a.delete_if { false }
+  assert_equal [1, 2, 3, 4, 5], a
+
+  a = [1, 2, 3, 4, 5]
+  assert_equal [], a.delete_if { true }
+  assert_equal [], a
+
+  a = [ 1, 2, 3, 4, 5 ]
+  assert_equal [1, 2, 3], a.delete_if { |val| val > 3 }
+end
+
+assert("Array#keep_if") do
+  a = [1, 2, 3, 4, 5]
+  assert_equal [1, 2, 3, 4, 5], a.keep_if { true }
+  assert_equal [1, 2, 3, 4, 5], a
+
+  a = [1, 2, 3, 4, 5]
+  assert_equal [], a.keep_if { false }
+  assert_equal [], a
+
+  a = [1, 2, 3, 4, 5]
+  assert_equal [4, 5], a.keep_if { |val| val > 3 }
+  assert_equal [4, 5], a
+end
+
+assert("Array#select!") do
+  a = [1, 2, 3, 4, 5]
+  assert_nil a.select! { true }
+  assert_equal [1, 2, 3, 4, 5], a
+
+  a = [1, 2, 3, 4, 5]
+  assert_equal [], a.select! { false }
+  assert_equal [], a
+
+  a = [1, 2, 3, 4, 5]
+  assert_equal [4, 5], a.select! { |val| val > 3 }
+  assert_equal [4, 5], a
+end
+
+assert('Array#values_at') do
+  a = %w{red green purple white none}
+
+  assert_equal %w{red purple none}, a.values_at(0, 2, 4)
+  assert_equal ['green', 'white', nil, nil], a.values_at(1, 3, 5, 7)
+  assert_equal ['none', 'white', 'white', nil], a.values_at(-1, -2, -2, -7)
+  assert_equal ['none', nil, nil, 'red', 'green', 'purple'], a.values_at(4..6, 0...3)
+  assert_raise(TypeError) { a.values_at 'tt' }
+end
+
+assert('Array#to_h') do
+  assert_equal({}, [].to_h)
+  assert_equal({a: 1, b:2}, [[:a, 1], [:b, 2]].to_h)
+
+  assert_raise(TypeError)     { [1].to_h }
+  assert_raise(ArgumentError) { [[1]].to_h }
+end
+
+assert("Array#index (block)") do
+  assert_nil (1..10).to_a.index { |i| i % 5 == 0 and i % 7 == 0 }
+  assert_equal 34, (1..100).to_a.index { |i| i % 5 == 0 and i % 7 == 0 }
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/bintest/mrdb.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/bintest/mrdb.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/bintest/mrdb.rb	(revision 270)
@@ -0,0 +1,286 @@
+require 'open3'
+require 'tempfile'
+
+class BinTest_MrubyBinDebugger
+  @debug1=false
+  @debug2=true
+  @debug3=true
+  def self.test(rubysource, testcase)
+    script, bin = Tempfile.new(['test', '.rb']), Tempfile.new(['test', '.mrb'])
+
+    # .rb
+    script.write rubysource
+    script.flush
+
+    # compile
+    `./bin/mrbc -g -o "#{bin.path}" "#{script.path}"`
+    
+    # add mrdb quit
+    testcase << {:cmd=>"quit"}
+
+    stdin_data = testcase.map{|t| t[:cmd]}.join("\n") << "\n"
+
+    ["bin/mrdb #{script.path}","bin/mrdb -b #{bin.path}"].each do |cmd|
+      o, s = Open3.capture2(cmd, :stdin_data => stdin_data)
+
+      exp_vals = testcase.map{|t| t.fetch(:exp, nil)}
+      unexp_vals = testcase.map{|t| t.fetch(:unexp, nil)}
+
+if @debug1
+  o.split("\n").each_with_index do |i,actual|
+    p [i,actual]
+  end
+end
+      # compare actual / expected
+      o.split("\n").each do |actual|
+        next if actual.empty?
+        exp = exp_vals.shift
+if @debug2
+  a = true
+  a = actual.include?(exp) unless exp.nil?
+  p [actual, exp] unless a
+end
+        assert_true actual.include?(exp) unless exp.nil?
+      end
+      # compare actual / unexpected
+      o.split("\n").each do |actual|
+        next if actual.empty?
+        unexp = unexp_vals.shift
+if @debug3
+  a = false
+  a = actual.include?(unexp) unless unexp.nil?
+  p [actual, unexp] if a
+end
+        assert_false actual.include?(unexp) unless unexp.nil?
+      end
+    end
+  end
+end
+
+INVCMD = "invalid command"
+
+assert('mruby-bin-debugger(mrdb) command line') do
+  # ruby source
+  src = "foo = 'foo'\n"
+
+  str = ""
+  103.times {
+    str += "1234567890"
+  }
+  cmd = "p a=#{str}"
+
+  # test case
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>cmd[0...1023], :unexp=>'command line too long.'}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>cmd[0...1024], :unexp=>'command line too long.'}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>cmd[0...1025], :exp=>'command line too long.'}])
+end
+
+assert('mruby-bin-debugger(mrdb) command: "break"') do
+  # ruby source
+  src = "foo = 'foo'\n"
+
+  # test case
+  tc = []
+  tc << {:cmd=>"b",     :unexp=>INVCMD}
+  tc << {:cmd=>"br",    :unexp=>INVCMD}
+  tc << {:cmd=>"brea",  :unexp=>INVCMD}
+  tc << {:cmd=>"break", :unexp=>INVCMD}
+  BinTest_MrubyBinDebugger.test(src, tc)
+
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"bl",     :exp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"breaka", :exp=>INVCMD}])
+end
+
+assert('mruby-bin-debugger(mrdb) command: "continue"') do
+  # ruby source
+  src = "foo = 'foo'\n"
+
+  # test case
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"c",         :unexp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"co",        :unexp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"continu",   :unexp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"continue",  :unexp=>INVCMD}])
+
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"cn",        :exp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"continuee", :exp=>INVCMD}])
+end
+
+assert('mruby-bin-debugger(mrdb) command: "delete"') do
+  # ruby source
+  src = "foo = 'foo'\n"
+
+  # test case
+  tc = []
+  tc << {:cmd=>"d 1",      :unexp=>INVCMD}
+  tc << {:cmd=>"de 1",     :unexp=>INVCMD}
+  tc << {:cmd=>"delet 1",  :unexp=>INVCMD}
+  tc << {:cmd=>"delete 1", :unexp=>INVCMD}
+  BinTest_MrubyBinDebugger.test(src, tc)
+
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"dd 1",      :exp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"deletee 1", :exp=>INVCMD}])
+end
+
+assert('mruby-bin-debugger(mrdb) command: "disable"') do
+  # ruby source
+  src = "foo = 'foo'\n"
+
+  # test case
+  tc = []
+  tc << {:cmd=>"dis",     :unexp=>INVCMD}
+  tc << {:cmd=>"disa",    :unexp=>INVCMD}
+  tc << {:cmd=>"disabl",  :unexp=>INVCMD}
+  tc << {:cmd=>"disable", :unexp=>INVCMD}
+  BinTest_MrubyBinDebugger.test(src, tc)
+
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"di",       :exp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"disb",     :exp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"disablee", :exp=>INVCMD}])
+end
+
+assert('mruby-bin-debugger(mrdb) command: "enable"') do
+  # ruby source
+  src = "foo = 'foo'\n"
+
+  # test case
+  tc = []
+  tc << {:cmd=>"en",     :unexp=>INVCMD}
+  tc << {:cmd=>"ena",    :unexp=>INVCMD}
+  tc << {:cmd=>"enabl",  :unexp=>INVCMD}
+  tc << {:cmd=>"enable", :unexp=>INVCMD}
+  BinTest_MrubyBinDebugger.test(src, tc)
+
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"e",       :exp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"enb",     :exp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"enablee", :exp=>INVCMD}])
+end
+
+assert('mruby-bin-debugger(mrdb) command: "eval"') do
+  # ruby source
+  src = "foo = 'foo'\n"
+
+  # test case
+  tc = []
+  tc << {:cmd=>"ev",   :unexp=>INVCMD}
+  tc << {:cmd=>"eva",  :unexp=>INVCMD}
+  tc << {:cmd=>"eval", :unexp=>INVCMD}
+  BinTest_MrubyBinDebugger.test(src, tc)
+
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"e",     :exp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"evl",   :exp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"evall", :exp=>INVCMD}])
+end
+
+assert('mruby-bin-debugger(mrdb) command: "help"') do
+  # ruby source
+  src = "foo = 'foo'\n"
+
+  # test case
+  tc = []
+  tc << {:cmd=>"h",    :unexp=>INVCMD}
+  tc << {:cmd=>"he",   :unexp=>INVCMD}
+  tc << {:cmd=>"hel",  :unexp=>INVCMD}
+  tc << {:cmd=>"help", :unexp=>INVCMD}
+  BinTest_MrubyBinDebugger.test(src, tc)
+
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"hl",    :exp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"helpp", :exp=>INVCMD}])
+end
+
+assert('mruby-bin-debugger(mrdb) command: "info breakpoints"') do
+  # ruby source
+  src = "foo = 'foo'\n"
+
+  # test case
+  tc = []
+  tc << {:cmd=>"i b",              :unexp=>INVCMD}
+  tc << {:cmd=>"in  b",            :unexp=>INVCMD}
+  tc << {:cmd=>"i    br",          :unexp=>INVCMD}
+  tc << {:cmd=>"inf breakpoint",   :unexp=>INVCMD}
+  tc << {:cmd=>"info breakpoints", :unexp=>INVCMD}
+  BinTest_MrubyBinDebugger.test(src, tc)
+
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"ii b",              :exp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"i bb",              :exp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"infoo breakpoints", :exp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"info breakpointss", :exp=>INVCMD}])
+end
+
+assert('mruby-bin-debugger(mrdb) command: "list"') do
+  # ruby source
+  src = "foo = 'foo'\n"
+
+  # test case
+  tc = []
+  tc << {:cmd=>"l",    :unexp=>INVCMD}
+  tc << {:cmd=>"li",   :unexp=>INVCMD}
+  tc << {:cmd=>"lis",  :unexp=>INVCMD}
+  tc << {:cmd=>"list", :unexp=>INVCMD}
+  BinTest_MrubyBinDebugger.test(src, tc)
+
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"ll",    :exp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"listt", :exp=>INVCMD}])
+end
+
+assert('mruby-bin-debugger(mrdb) command: "print"') do
+  # ruby source
+  src = "foo = 'foo'\n"
+
+  # test case
+  tc = []
+  tc << {:cmd=>"p",     :unexp=>INVCMD}
+  tc << {:cmd=>"pr",    :unexp=>INVCMD}
+  tc << {:cmd=>"prin",  :unexp=>INVCMD}
+  tc << {:cmd=>"print", :unexp=>INVCMD}
+  BinTest_MrubyBinDebugger.test(src, tc)
+
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"pp",     :exp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"printt", :exp=>INVCMD}])
+end
+
+assert('mruby-bin-debugger(mrdb) command: "quit"') do
+  # ruby source
+  src = "foo = 'foo'\n"
+
+  # test case
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"q",    :unexp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"qu",   :unexp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"qui",  :unexp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"quit", :unexp=>INVCMD}])
+
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"qq",    :exp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"quitt", :exp=>INVCMD}])
+end
+
+assert('mruby-bin-debugger(mrdb) command: "run"') do
+  # ruby source
+  src = "foo = 'foo'\n"
+
+  # test case
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"r",   :unexp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"ru",  :unexp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"run", :unexp=>INVCMD}])
+
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"rr",   :exp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"runn", :exp=>INVCMD}])
+end
+
+assert('mruby-bin-debugger(mrdb) command: "step"') do
+  # ruby source
+  src = <<"SRC"
+while true
+  foo = 'foo'
+end
+SRC
+
+  # test case
+  tc = []
+  tc << {:cmd=>"s",    :unexp=>INVCMD}
+  tc << {:cmd=>"st",   :unexp=>INVCMD}
+  tc << {:cmd=>"ste",  :unexp=>INVCMD}
+  tc << {:cmd=>"step", :unexp=>INVCMD}
+  BinTest_MrubyBinDebugger.test(src, tc)
+
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"ss",    :exp=>INVCMD}])
+  BinTest_MrubyBinDebugger.test(src, [{:cmd=>"stepp", :exp=>INVCMD}])
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/bintest/print.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/bintest/print.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/bintest/print.rb	(revision 270)
@@ -0,0 +1,701 @@
+require 'open3'
+require 'tempfile'
+
+class BinTest_MrubyBinDebugger
+  @debug1=false
+  @debug2=true
+  def self.test(rubysource, testcase)
+    script, bin = Tempfile.new(['test', '.rb']), Tempfile.new(['test', '.mrb'])
+
+    # .rb
+    script.write rubysource
+    script.flush
+
+    # compile
+    `./bin/mrbc -g -o "#{bin.path}" "#{script.path}"`
+    
+    # add mrdb quit
+    testcase << {:cmd=>"quit"}
+
+    stdin_data = testcase.map{|t| t[:cmd]}.join("\n") << "\n"
+
+    ["bin/mrdb #{script.path}","bin/mrdb -b #{bin.path}"].each do |cmd|
+      o, s = Open3.capture2(cmd, :stdin_data => stdin_data)
+
+      exp_vals = testcase.map{|t| t.fetch(:exp, nil)}
+=begin
+if @debug1
+  o.split("\n").each_with_index do |i,actual|
+    p [i,actual]
+  end
+end
+      # compare actual / expected
+      o.split("\n").each do |actual|
+        next if actual.empty?
+        exp = exp_vals.shift
+if @debug2
+  a = true
+  a = actual.include?(exp) unless exp.nil?
+  p [actual, exp] unless a
+end
+        assert_true actual.include?(exp) unless exp.nil?
+      end
+=end
+      idx = 0
+      exp_vals.each do |exp|
+        next if exp.nil?
+        idx = o.index(exp, idx)
+        assert_false idx.nil?
+        break unless idx
+        idx += 1
+      end
+    end
+  end
+end
+
+assert('mruby-bin-debugger(print) invalid arguments') do
+  # ruby source
+  src =  "foo = 'foo'\n"
+
+  # test case
+  tc = []
+  tc << {:cmd=>"p",   :exp=>"Parameter not specified."}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) nomal') do
+  # ruby source
+  src = <<"SRC"
+foo = 'foo'
+bar = foo
+baz = bar
+SRC
+
+  # test case
+  tc = []
+  tc << {:cmd=>"s"}
+  tc << {:cmd=>"p (1+2)",   :exp=>'$1 = 3'}
+  tc << {:cmd=>"p foo",     :exp=>'$2 = "foo"'}
+  tc << {:cmd=>"p foo*=2",  :exp=>'$3 = "foofoo"'}
+  tc << {:cmd=>"s"}
+  tc << {:cmd=>"p bar",     :exp=>'$4 = "foofoo"'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) error') do
+  # ruby source
+  src =  "foo = 'foo'\n"
+
+  # test case
+  tc = []
+  tc << {:cmd=>"p (1+2",  :exp=>'$1 = SyntaxError'}
+  tc << {:cmd=>"p bar",   :exp=>'$2 = NoMethodError'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+# Kernel#instance_eval(string) does't work multiple statements.
+=begin
+assert('mruby-bin-debugger(print) multiple statements') do
+  # ruby source
+  src = <<"SRC"
+x = 0
+y = 0
+z = 0
+SRC
+
+  # test case
+  tc = []
+  tc << {:cmd=>"s",}
+  tc << {:cmd=>"p x=1;x+=2",  :exp=>"3"}
+  tc << {:cmd=>"s",}
+  tc << {:cmd=>"p x",         :exp=>"3"}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+=end
+
+assert('mruby-bin-debugger(print) scope:top') do
+  # ruby source (bp is break point)
+  src = "bp=nil\n"
+
+  # test case
+  tc = []
+  tc << {:cmd=>"p self",  :exp=>'$1 = main'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) scope:class') do
+  # ruby source (bp is break point)
+  src = <<"SRC"
+class TestClassScope
+  bp = nil
+end
+SRC
+
+  # test case
+  tc = []
+  tc << {:cmd=>"s"}
+  tc << {:cmd=>"p self",  :exp=>'$1 = TestClassScope'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) scope:module') do
+  # ruby source (bp is break point)
+  src = <<"SRC"
+class TestModuleScope
+  bp = nil
+end
+SRC
+
+  # test case
+  tc = []
+  tc << {:cmd=>"s"}
+  tc << {:cmd=>"p self",  :exp=>'$1 = TestModuleScope'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) scope:instance method') do
+  # ruby source (bp is break point)
+  src = <<"SRC"
+class TestMethodScope
+  def m
+    bp = nil
+  end
+end
+TestMethodScope.new.m
+SRC
+
+  tc = []
+  tc << {:cmd=>"b 3"}
+  tc << {:cmd=>"r"}
+  tc << {:cmd=>"p self",  :exp=>'$1 = #<TestMethodScope:'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) scope:class method') do
+  # ruby source (bp is break point)
+  src = <<"SRC"
+class TestClassMethodScope
+  def self.cm
+    bp = nil
+  end
+end
+TestClassMethodScope.cm
+SRC
+
+  tc = []
+  tc << {:cmd=>"b 3"}
+  tc << {:cmd=>"r"}
+  tc << {:cmd=>"p self",  :exp=>'$1 = TestClassMethodScope'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) scope:block') do
+  # ruby source (bp is break point)
+  src = <<"SRC"
+1.times do
+  bp = nil
+end
+class TestBlockScope
+  1.times do
+    bp = nil
+  end
+  def m
+    1.times do
+      bp = nil
+    end
+  end
+end
+TestBlockScope.new.m
+SRC
+
+  tc = []
+  tc << {:cmd=>"b 2"}
+  tc << {:cmd=>"b 6"}
+  tc << {:cmd=>"b 10"}
+  tc << {:cmd=>"c"}
+  tc << {:cmd=>"p self", :exp=>'$1 = main'}
+  tc << {:cmd=>"c"}
+  tc << {:cmd=>"p self", :exp=>'$2 = TestBlockScope'}
+  tc << {:cmd=>"c"}
+  tc << {:cmd=>"p self", :exp=>'$3 = #<TestBlockScope:'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) same name:local variabe') do
+  # ruby source (bp is break point)
+  src = <<"SRC"
+lv = 'top'
+class TestLocalVariableName
+  lv = 'class'
+  def m
+    lv = 'instance method'
+    bp = nil
+  end
+  bp = nil
+end
+TestLocalVariableName.new.m
+bp = nil
+SRC
+
+  tc = []
+  tc << {:cmd=>"b 6"}
+  tc << {:cmd=>"b 8"}
+  tc << {:cmd=>"b 11"}
+  tc << {:cmd=>"r"}
+  tc << {:cmd=>"p lv", :exp=>'$1 = "class"'}
+  tc << {:cmd=>"c"}
+  tc << {:cmd=>"p lv", :exp=>'$2 = "instance method"'}
+  tc << {:cmd=>"c"}
+  tc << {:cmd=>"p lv", :exp=>'$3 = "top"'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) same name:instance variabe') do
+  # ruby source (bp is break point)
+  src = <<"SRC"
+@iv = 'top'
+class TestInstanceVariableName
+  def initialize(v)
+    @iv = v
+  end
+  def m
+    bp = nil
+  end
+end
+i1 = TestInstanceVariableName.new('instance1')
+i2 = TestInstanceVariableName.new('instance2')
+i1.m
+i2.m
+bp = nil
+SRC
+
+  tc = []
+  tc << {:cmd=>"b 7"}
+  tc << {:cmd=>"b 14"}
+  tc << {:cmd=>"r"}
+  tc << {:cmd=>"p @iv", :exp=>'$1 = "instance1"'}
+  tc << {:cmd=>"c"}
+  tc << {:cmd=>"p @iv", :exp=>'$2 = "instance2"'}
+  tc << {:cmd=>"c"}
+  tc << {:cmd=>"p @iv", :exp=>'$3 = "top"'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+# Kernel#instance_eval(string) does't work const.
+=begin
+assert('mruby-bin-debugger(print) same name:const') do
+  # ruby source (bp is break point)
+  src = <<"SRC"
+CONST='top'
+class TestConstNameSuperClass
+  CONST='super class'
+  def m
+    bp = nil
+  end
+end
+class TestConstNameSubClass < TestConstNameSuperClass
+  CONST='sub class'
+  def m
+    bp = nil
+  end
+end
+
+TestConstNameSuperClass.new.m()
+TestConstNameSubClass.new.m()
+bp = nil
+SRC
+
+  # todo: wait for 'break' to be implimented
+  tc = []
+  9.times { tc << {:cmd=>"s"} }
+  tc << {:cmd=>"p CONST", :exp=>"super class"}
+  3.times { tc << {:cmd=>"s"} }
+  tc << {:cmd=>"p CONST", :exp=>"sub class"}
+  1.times { tc << {:cmd=>"s"} }
+  tc << {:cmd=>"p CONST", :exp=>"top"}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+=end
+
+assert('mruby-bin-debugger(print) Literal:Numeric') do
+  # ruby source
+  src =  "foo = 'foo'\n"
+
+  # test case
+  tc = []
+  tc << {:cmd=>"p 100",     :exp=>'$1 = 100'}
+  tc << {:cmd=>"p -0b100",  :exp=>'$2 = -4'}
+  tc << {:cmd=>"p +0100",   :exp=>'$3 = 64'}
+  tc << {:cmd=>"p 0x100",   :exp=>'$4 = 256'}
+  tc << {:cmd=>"p 1_234",   :exp=>'$5 = 1234'}
+  tc << {:cmd=>"p 0b1000_0000", :exp=>"$6 = #{0b1000_0000.to_s}"}
+  tc << {:cmd=>"p 0x1000_0000", :exp=>"$7 = #{0x1000_0000.to_s}"}
+
+  tc << {:cmd=>"p 3.14",    :exp=>'$8 = 3.14'}
+  tc << {:cmd=>"p -12.3",   :exp=>'$9 = -12.3'}
+  tc << {:cmd=>"p +12.000", :exp=>'$10 = 12.0'}
+  tc << {:cmd=>"p 1e4",     :exp=>'$11 = 10000.0'}
+  tc << {:cmd=>"p -0.1e-2", :exp=>'$12 = -0.001'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) Literal:String') do
+  # ruby source
+  src = <<"SRC"
+foo = 'foo'
+bar = "bar"
+baz = "baz"
+SRC
+
+  # test case
+  tc = []
+  tc << {:cmd=>"s"}
+  tc << {:cmd=>"s"}
+
+  tc << {:cmd=>'p "str"',        :exp=>'$1 = "str"'}
+  tc << {:cmd=>'p "s\tt\rr\n"',  :exp=>'$2 = "s\\tt\\rr\\n"'}
+  tc << {:cmd=>'p "\C-a\C-z"',   :exp=>'$3 = "\\001\\032"'}
+  tc << {:cmd=>'p "#{foo+bar}"', :exp=>'$4 = "foobar"'}
+
+  tc << {:cmd=>'p \'str\'',          :exp=>'$5 = "str"'}
+  tc << {:cmd=>'p \'s\\tt\\rr\\n\'', :exp=>'$6 = "s\\\\tt\\\\rr\\\\n"'}
+  tc << {:cmd=>'p \'\\C-a\\C-z\'',   :exp=>'$7 = "\\\\C-a\\\\C-z"'}
+  tc << {:cmd=>'p \'#{foo+bar}\'',   :exp=>'$8 = "#{foo+bar}"'}
+
+  tc << {:cmd=>'p %!str!',        :exp=>'$9 = "str"'}
+  tc << {:cmd=>'p %!s\tt\rr\n!',  :exp=>'$10 = "s\\tt\\rr\\n"'}
+  tc << {:cmd=>'p %!\C-a\C-z!',   :exp=>'$11 = "\\001\\032"'}
+  tc << {:cmd=>'p %!#{foo+bar}!', :exp=>'$12 = "foobar"'}
+
+  tc << {:cmd=>'p %Q!str!',        :exp=>'$13 = "str"'}
+  tc << {:cmd=>'p %Q!s\tt\rr\n!',  :exp=>'$14 = "s\\tt\\rr\\n"'}
+  tc << {:cmd=>'p %Q!\C-a\C-z!',   :exp=>'$15 = "\\001\\032"'}
+  tc << {:cmd=>'p %Q!#{foo+bar}!', :exp=>'$16 = "foobar"'}
+
+  tc << {:cmd=>'p %q!str!',          :exp=>'$17 = "str"'}
+  tc << {:cmd=>'p %q!s\\tt\\rr\\n!', :exp=>'$18 = "s\\\\tt\\\\rr\\\\n"'}
+  tc << {:cmd=>'p %q!\\C-a\\C-z!',   :exp=>'$19 = "\\\\C-a\\\\C-z"'}
+  tc << {:cmd=>'p %q!#{foo+bar}!',   :exp=>'$20 = "#{foo+bar}"'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) Literal:Array') do
+  # ruby source
+  src = <<"SRC"
+foo = 'foo'
+bar = "bar"
+baz = "baz"
+SRC
+
+  # test case
+  tc = []
+  tc << {:cmd=>"s"}
+  tc << {:cmd=>"s"}
+
+  tc << {:cmd=>'p []',                      :exp=>'$1 = []'}
+  tc << {:cmd=>'p [ 5,  12,   8,    10, ]', :exp=>'$2 = [5, 12, 8, 10]'}
+  tc << {:cmd=>'p [1,2.5,"#{foo+bar}"]',    :exp=>'$3 = [1, 2.5, "foobar"]'}
+  tc << {:cmd=>'p %w[3.14 A\ &\ B #{foo}]', :exp=>'$4 = ["3.14", "A & B", "#{foo}"]'}
+  tc << {:cmd=>'p %W[3.14 A\ &\ B #{foo}]', :exp=>'$5 = ["3.14", "A & B", "foo"]'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) Literal:Hash') do
+  # ruby source
+  src = <<"SRC"
+foo = 'foo'
+bar = "bar"
+baz = "baz"
+SRC
+
+  # test case
+  tc = []
+  tc << {:cmd=>"s"}
+  tc << {:cmd=>"s"}
+
+  tc << {:cmd=>'p {}',                              :exp=>'$1 = {}'}
+  tc << {:cmd=>'p {"one"=>1,"two"=>2}',             :exp=>'$2 = {"one"=>1, "two"=>2}'}
+  tc << {:cmd=>'p {:eins=>"1",   :zwei=>"2", }',    :exp=>'$3 = {:eins=>"1", :zwei=>"2"}'}
+  tc << {:cmd=>'p {uno:"one", dos: 2}',             :exp=>'$4 = {:uno=>"one", :dos=>2}'}
+  tc << {:cmd=>'p {"one"=>1, :zwei=>2, tres:3}',    :exp=>'$5 = {"one"=>1, :zwei=>2, :tres=>3}'}
+  tc << {:cmd=>'p {:foo=>"#{foo}",:bar=>"#{bar}"}', :exp=>'$6 = {:foo=>"foo", :bar=>"bar"}'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) Literal:Range') do
+  # ruby source
+  src = "foo = 'foo'\n"
+
+  # test case
+  tc = []
+  tc << {:cmd=>'p 1..10',    :exp=>'$1 = 1..10'}
+  tc << {:cmd=>'p 1...10',   :exp=>'$2 = 1...10'}
+  tc << {:cmd=>'p 100..10',  :exp=>'$3 = 100..10'}
+  tc << {:cmd=>'p 1 ... 10', :exp=>'$4 = 1...10'}
+
+  tc << {:cmd=>'p "1" .. "9"',  :exp=>'$5 = "1".."9"'}
+  tc << {:cmd=>'p "A" ... "Z"', :exp=>'$6 = "A"..."Z"'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) Literal:Symbol') do
+  # ruby source
+  src = <<"SRC"
+foo = 'foo'
+bar = "bar"
+baz = "baz"
+SRC
+
+  # test case
+  tc = []
+  tc << {:cmd=>"s"}
+  tc << {:cmd=>"s"}
+
+  tc << {:cmd=>'p :sym',          :exp=>'$1 = :sym'}
+  tc << {:cmd=>'p :"sd"',         :exp=>'$2 = :sd'}
+  tc << {:cmd=>"p :'ss'",         :exp=>'$3 = :ss'}
+  tc << {:cmd=>'p :"123"',        :exp=>'$4 = :"123"'}
+  tc << {:cmd=>'p :"#{foo} baz"', :exp=>'$5 = :"foo baz"'}
+  tc << {:cmd=>'p %s!symsym!',    :exp=>'$6 = :symsym'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) Unary operation') do
+  # ruby source
+  src = "foo = 'foo'\n"
+
+  # test case
+  tc = []
+  tc << {:cmd=>'p +10',    :exp=>'$1 = 10'}
+  tc << {:cmd=>'p -100',   :exp=>'$2 = -100'}
+  tc << {:cmd=>'p !true',  :exp=>'$3 = false'}
+  tc << {:cmd=>'p !false', :exp=>'$4 = true'}
+  tc << {:cmd=>'p !nil',   :exp=>'$5 = true'}
+  tc << {:cmd=>'p !1',     :exp=>'$6 = false'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) Binary operation') do
+  # ruby source
+  src = <<"SRC"
+CONST = 100
+a,b,c = 1, 5, 8
+foo,bar,baz = 'foo','bar','baz'
+ary = []
+SRC
+
+  # test case
+  tc = []
+  tc << {:cmd=>'s'}
+  tc << {:cmd=>'s'}
+  tc << {:cmd=>'s'}
+
+  tc << {:cmd=>'p a+1',   :exp=>'$1 = 2'}
+  tc << {:cmd=>'p 2-b',   :exp=>'$2 = -3'}
+  tc << {:cmd=>'p c * 3', :exp=>'$3 = 24'}
+  tc << {:cmd=>'p a/b',   :exp=>'$4 = 0.2'}
+  tc << {:cmd=>'p c%b',   :exp=>'$5 = 3'}
+  tc << {:cmd=>'p 2**10', :exp=>'$6 = 1024'}
+  tc << {:cmd=>'p ~3',    :exp=>'$7 = -4'}
+
+  tc << {:cmd=>'p 1<<2',  :exp=>'$8 = 4'}
+  tc << {:cmd=>'p 64>>5', :exp=>'$9 = 2'}
+
+  tc << {:cmd=>'p a|c',   :exp=>'$10 = 9'}
+  tc << {:cmd=>'p a&b',   :exp=>'$11 = 1'}
+  tc << {:cmd=>'p a^b',   :exp=>'$12 = 4'}
+
+  tc << {:cmd=>'p a>b',   :exp=>'$13 = false'}
+  tc << {:cmd=>'p a<b',   :exp=>'$14 = true'}
+  tc << {:cmd=>'p b>=5',  :exp=>'$15 = true'}
+  tc << {:cmd=>'p b<=5',  :exp=>'$16 = true'}
+
+  tc << {:cmd=>'p "A"<=>"B"', :exp=>'$17 = -1'}
+  tc << {:cmd=>'p "A"=="B"',  :exp=>'$18 = false'}
+  tc << {:cmd=>'p "A"==="B"', :exp=>'$19 = false'}
+  tc << {:cmd=>'p "A"!="B"',  :exp=>'$20 = true'}
+
+  tc << {:cmd=>'p false || true', :exp=>'$21 = true'}
+  tc << {:cmd=>'p false && true', :exp=>'$22 = false'}
+
+  tc << {:cmd=>'p not nil',        :exp=>'$23 = true'}
+  tc << {:cmd=>'p false or true',  :exp=>'$24 = true'}
+  tc << {:cmd=>'p false and true', :exp=>'$25 = false'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) Ternary operation') do
+  # ruby source
+  src = <<"SRC"
+CONST = 100
+a,b,c = 1, 5, -10
+foo,bar,baz = 'foo','bar','baz'
+ary = []
+SRC
+
+  # test case
+  tc = []
+  tc << {:cmd=>'s'}
+  tc << {:cmd=>'s'}
+  tc << {:cmd=>'s'}
+
+  tc << {:cmd=>'p (a < b) ? a : b',          :exp=>'$1 = 1'}
+  tc << {:cmd=>'p (a > b) ? a : b',          :exp=>'$2 = 5'}
+  tc << {:cmd=>'p true ? "true" : "false"',  :exp=>'$3 = "true"'}
+  tc << {:cmd=>'p false ? "true" : "false"', :exp=>'$4 = "false"'}
+  tc << {:cmd=>'p nil ? "true" : "false"',   :exp=>'$5 = "false"'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) Substitution:simple') do
+  # ruby source
+  src = <<"SRC"
+CONST = 100
+a,b,c = 1, 5, -10
+foo,bar,baz = 'foo','bar','baz'
+ary = []
+SRC
+
+  # test case
+  tc = []
+  tc << {:cmd=>'s'}
+  tc << {:cmd=>'s'}
+  tc << {:cmd=>'s'}
+
+  tc << {:cmd=>'p a=2',               :exp=>'$1 = 2'}
+  tc << {:cmd=>'p foo=[foo,bar,baz]', :exp=>'$2 = ["foo", "bar", "baz"]'}
+
+  tc << {:cmd=>'p undefined=-1',      :exp=>'$3 = -1'}
+  tc << {:cmd=>'p "#{undefined}"',    :exp=>'$4 = NoMethodError'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) Substitution:self') do
+  # ruby source
+  src = <<"SRC"
+CONST = 100
+a,b,c = 1, 5, -10
+foo,bar,baz = 'foo','bar','baz'
+ary = []
+SRC
+
+  # test case
+  tc = []
+  tc << {:cmd=>'s'}
+  tc << {:cmd=>'s'}
+  tc << {:cmd=>'s'}
+
+  tc << {:cmd=>'p a+=9',   :exp=>'$1 = 10'}
+  tc << {:cmd=>'p b-=c',   :exp=>'$2 = 15'}
+  tc << {:cmd=>'p bar*=2', :exp=>'$3 = "barbar"'}
+  tc << {:cmd=>'p a/=4',   :exp=>'$4 = 2.5'}
+  tc << {:cmd=>'p c%=4',   :exp=>'$5 = 2'}
+
+  tc << {:cmd=>'p b&=0b0101', :exp=>'$6 = 5'}
+  tc << {:cmd=>'p c|=0x10',   :exp=>'$7 = 18'}
+
+  tc << {:cmd=>'p "#{a} #{b} #{c}"',     :exp=>'$8 = "2.5 5 18"'}
+  tc << {:cmd=>'p "#{foo}#{bar}#{baz}"', :exp=>'$9 = "foobarbarbaz"'}
+
+  tc << {:cmd=>'p a,b,c=[10,20,30]',:exp=>'$10 = [10, 20, 30]'}
+  tc << {:cmd=>'p [a,b,c]',         :exp=>'$11 = [10, 20, 30]'}
+  tc << {:cmd=>'p a,b=b,a',         :exp=>'$12 = [20, 10]'}
+  tc << {:cmd=>'p [a,b]',           :exp=>'$13 = [20, 10]'}
+
+  tc << {:cmd=>'p undefined=-1',    :exp=>'$14 = -1'}
+  tc << {:cmd=>'p "#{undefined}"',  :exp=>'$15 = NoMethodError'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) Substitution:multiple') do
+  # ruby source
+  src = <<"SRC"
+CONST = 100
+a,b,c = 1, 5, -10
+foo,bar,baz = 'foo','bar','baz'
+ary = []
+SRC
+
+  # test case
+  tc = []
+  tc << {:cmd=>'s'}
+  tc << {:cmd=>'s'}
+  tc << {:cmd=>'s'}
+
+  tc << {:cmd=>'p a,b=[10,20]',   :exp=>'$1 = [10, 20]'}
+  tc << {:cmd=>'p [a,b,c]',       :exp=>'$2 = [10, 20, -10]'}
+
+  tc << {:cmd=>'p foo,bar=["FOO","BAR","BAZ"]', :exp=>'$3 = ["FOO", "BAR", "BAZ"]'}
+  tc << {:cmd=>'p [foo,bar,baz]', :exp=>'$4 = ["FOO", "BAR", "baz"]'}
+
+  tc << {:cmd=>'p a,foo=foo,a',   :exp=>'$5 = ["FOO", 10]'}
+  tc << {:cmd=>'p [a,foo]',       :exp=>'$6 = ["FOO", 10]'}
+
+#  tc << {:cmd=>'p a,*b=[123, 456, 789]'}
+#  tc << {:cmd=>'p [a,b]',       :exp=>'[123, [456, 789]]'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
+assert('mruby-bin-debugger(print) Substitution:self') do
+  # ruby source
+  src = <<"SRC"
+CONST = 100
+a,b,c = 1, 5, -10
+foo,bar,baz = 'foo','bar','baz'
+ary = []
+SRC
+
+  # test case
+  tc = []
+  tc << {:cmd=>'s'}
+  tc << {:cmd=>'s'}
+  tc << {:cmd=>'s'}
+
+  tc << {:cmd=>'p a+=9',   :exp=>'$1 = 10'}
+  tc << {:cmd=>'p b-=c',   :exp=>'$2 = 15'}
+  tc << {:cmd=>'p bar*=2', :exp=>'$3 = "barbar"'}
+  tc << {:cmd=>'p a/=4',   :exp=>'$4 = 2.5'}
+  tc << {:cmd=>'p c%=4',   :exp=>'$5 = 2'}
+
+  tc << {:cmd=>'p b&=0b0101', :exp=>'$6 = 5'}
+  tc << {:cmd=>'p c|=0x10',   :exp=>'$7 = 18'}
+
+  tc << {:cmd=>'p "#{a} #{b} #{c}"',     :exp=>'$8 = "2.5 5 18"'}
+  tc << {:cmd=>'p "#{foo}#{bar}#{baz}"', :exp=>'$9 = "foobarbarbaz"'}
+
+  tc << {:cmd=>'p a,b,c=[10,20,30]',:exp=>'$10 = [10, 20, 30]'}
+  tc << {:cmd=>'p [a,b,c]',         :exp=>'$11 = [10, 20, 30]'}
+  tc << {:cmd=>'p a,b=b,a',         :exp=>'$12 = [20, 10]'}
+  tc << {:cmd=>'p [a,b]',           :exp=>'$13 = [20, 10]'}
+
+  tc << {:cmd=>'p undefined=-1',    :exp=>'$14 = -1'}
+  tc << {:cmd=>'p "#{undefined}"',  :exp=>'$15 = NoMethodError'}
+
+  BinTest_MrubyBinDebugger.test(src, tc)
+end
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/mrbgem.rake	(revision 270)
@@ -0,0 +1,9 @@
+MRuby::Gem::Specification.new('mruby-bin-debugger') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'mruby debugger command'
+
+  spec.add_dependency('mruby-eval', :core => 'mruby-eval')
+
+  spec.bins = %w(mrdb)
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c	(revision 270)
@@ -0,0 +1,516 @@
+/*
+** apibreak.c
+**
+*/
+
+#include <string.h>
+#include "mruby.h"
+#include "mruby/irep.h"
+#include "mrdb.h"
+#include "mruby/debug.h"
+#include "mruby/opcode.h"
+#include "mruby/class.h"
+#include "mruby/proc.h"
+#include "mruby/variable.h"
+#include "mrdberror.h"
+#include "apibreak.h"
+
+#define MAX_BREAKPOINTNO (MAX_BREAKPOINT * 1024)
+#define MRB_DEBUG_BP_FILE_OK   (0x0001)
+#define MRB_DEBUG_BP_LINENO_OK (0x0002)
+
+static uint16_t
+check_lineno( mrb_irep_debug_info_file *info_file, uint16_t lineno )
+{
+  uint32_t count = info_file->line_entry_count;
+  uint16_t l_idx;
+
+  if( info_file->line_type == mrb_debug_line_ary ) {
+    for (l_idx = 0; l_idx < count; ++l_idx) {
+      if(lineno == info_file->lines.ary[l_idx]) {
+        return lineno;
+      }
+    }
+  } else {
+    for (l_idx = 0; l_idx < count; ++l_idx) {
+      if(lineno == info_file->lines.flat_map[l_idx].line) {
+        return lineno;
+      }
+    }
+  }
+
+  return 0;
+}
+
+static int32_t
+get_break_index( mrb_debug_context *dbg, int32_t bpno )
+{
+  uint32_t i;
+  int32_t index;
+  char hit = FALSE;
+
+  for(i = 0 ; i < dbg->bpnum; i++) {
+    if(dbg->bp[i].bpno == bpno) {
+      hit = TRUE;
+      index = i;
+      break;
+    }
+  }
+
+  if(hit == FALSE) {
+    return MRB_DEBUG_BREAK_INVALID_NO;
+  }
+
+  return index;
+}
+
+static void
+free_breakpoint( mrb_state *mrb, mrb_debug_breakpoint *bp )
+{
+  switch(bp->type) {
+    case MRB_DEBUG_BPTYPE_LINE:
+      mrb_free(mrb, (void*)bp->point.linepoint.file);
+      break;
+    case MRB_DEBUG_BPTYPE_METHOD:
+      mrb_free(mrb, (void*)bp->point.methodpoint.method_name);
+      if(bp->point.methodpoint.class_name != NULL) {
+        mrb_free(mrb, (void*)bp->point.methodpoint.class_name);
+      }
+      break;
+    default:
+      break;
+  }
+}
+
+static uint16_t
+check_file_lineno( struct mrb_irep *irep, const char *file, uint16_t lineno )
+{
+  mrb_irep_debug_info_file *info_file;
+  uint16_t result = 0;
+  uint16_t f_idx;
+  uint16_t fix_lineno;
+  uint16_t i;
+
+  for (f_idx = 0; f_idx < irep->debug_info->flen; ++f_idx) {
+    info_file = irep->debug_info->files[f_idx];
+    if(!strcmp(info_file->filename, file)) {
+      result = MRB_DEBUG_BP_FILE_OK;
+
+      fix_lineno = check_lineno( info_file, lineno );
+      if(fix_lineno != 0) { 
+        return result | MRB_DEBUG_BP_LINENO_OK;
+      }
+    }
+    for ( i=0; i < irep->rlen; ++i ) {
+      result  |= check_file_lineno(irep->reps[i], file, lineno);
+      if(result == (MRB_DEBUG_BP_FILE_OK | MRB_DEBUG_BP_LINENO_OK)) {
+        return result;
+      }
+    }
+  }
+  return result;
+}
+
+static const char*
+get_class_name( mrb_state *mrb, struct RClass *class_obj )
+{
+  struct RClass *outer;
+  mrb_sym class_sym;
+
+  outer = mrb_class_outer_module(mrb, class_obj);
+  class_sym = mrb_class_sym(mrb, class_obj, outer);
+  return mrb_sym2name(mrb, class_sym);
+}
+
+static int32_t
+compare_break_method( mrb_state *mrb, mrb_debug_breakpoint *bp, struct RClass *class_obj, mrb_sym method_sym, mrb_bool* isCfunc )
+{
+  const char* class_name;
+  const char* method_name;
+  struct RProc* m;
+  struct RClass* sc;
+  const char* sn;
+  mrb_sym ssym;
+  mrb_debug_methodpoint *method_p;
+  mrb_bool is_defined;
+
+  method_name = mrb_sym2name(mrb, method_sym);
+
+  method_p = &bp->point.methodpoint;
+  if(strcmp(method_p->method_name, method_name) == 0) {
+    class_name = get_class_name(mrb, class_obj);
+    if(class_name == NULL) {
+      if(method_p->class_name == NULL) {
+        return bp->bpno;
+      }
+    }
+    else if(method_p->class_name != NULL) {
+      m = mrb_method_search_vm(mrb, &class_obj, method_sym);
+      if(m == NULL) {
+        return MRB_DEBUG_OK;
+      }
+      if(MRB_PROC_CFUNC_P(m)) {
+        *isCfunc = TRUE;
+      }
+
+      is_defined = mrb_class_defined(mrb, method_p->class_name);
+      if(is_defined == FALSE) {
+        return MRB_DEBUG_OK;
+      }
+
+      sc = mrb_class_get(mrb, method_p->class_name);
+      ssym = mrb_symbol(mrb_check_intern_cstr(mrb, method_p->method_name));
+      m = mrb_method_search_vm(mrb, &sc, ssym);
+      if(m == NULL) {
+        return MRB_DEBUG_OK;
+      }
+
+      class_name = get_class_name(mrb, class_obj);
+      sn = get_class_name(mrb, sc);
+      if(strcmp(sn, class_name) == 0) {
+        return bp->bpno;
+      }
+    }
+  }
+  return MRB_DEBUG_OK;
+}
+
+int32_t
+mrb_debug_set_break_line( mrb_state *mrb, mrb_debug_context *dbg, const char *file, uint16_t lineno)
+{
+  int32_t index;
+  char* set_file;
+  uint16_t result;
+
+  if((mrb == NULL)||(dbg == NULL)||(file == NULL)) {
+    return MRB_DEBUG_INVALID_ARGUMENT;
+  }
+
+  if(dbg->bpnum >= MAX_BREAKPOINT) {
+    return MRB_DEBUG_BREAK_NUM_OVER;
+  }
+
+  if(dbg->next_bpno > MAX_BREAKPOINTNO) {
+    return MRB_DEBUG_BREAK_NO_OVER;
+  }
+
+  /* file and lineno check (line type mrb_debug_line_ary only.) */
+  result = check_file_lineno( dbg->root_irep, file, lineno );
+  if(result == 0) {
+    return MRB_DEBUG_BREAK_INVALID_FILE;
+  }else if(result == MRB_DEBUG_BP_FILE_OK) {
+    return MRB_DEBUG_BREAK_INVALID_LINENO;
+  } 
+
+  set_file = mrb_malloc(mrb, strlen(file) + 1);
+
+  index = dbg->bpnum;
+  dbg->bp[index].bpno = dbg->next_bpno;
+  dbg->next_bpno++;
+  dbg->bp[index].enable = TRUE;
+  dbg->bp[index].type = MRB_DEBUG_BPTYPE_LINE;
+  dbg->bp[index].point.linepoint.lineno = lineno;
+  dbg->bpnum++;
+
+  strncpy(set_file, file, strlen(file) + 1);
+
+  dbg->bp[index].point.linepoint.file = set_file;
+
+  return dbg->bp[index].bpno;
+}
+
+int32_t
+mrb_debug_set_break_method( mrb_state *mrb, mrb_debug_context *dbg, const char *class_name, const char *method_name )
+{
+  int32_t index;
+  char* set_class;
+  char* set_method;
+
+  if((mrb == NULL) || (dbg == NULL) || (method_name == NULL)) {
+    return MRB_DEBUG_INVALID_ARGUMENT;
+  }
+
+  if(dbg->bpnum >= MAX_BREAKPOINT) {
+    return MRB_DEBUG_BREAK_NUM_OVER;
+  }
+
+  if(dbg->next_bpno > MAX_BREAKPOINTNO) {
+    return MRB_DEBUG_BREAK_NO_OVER;
+  }
+
+  if(class_name != NULL) {
+    set_class = mrb_malloc(mrb, strlen(class_name) + 1);
+    strncpy(set_class, class_name, strlen(class_name) + 1);
+  }
+  else {
+    set_class = NULL;
+  }
+
+  set_method = mrb_malloc(mrb, strlen(method_name) + 1);
+
+  strncpy(set_method, method_name, strlen(method_name) + 1);
+
+  index = dbg->bpnum;
+  dbg->bp[index].bpno = dbg->next_bpno;
+  dbg->next_bpno++;
+  dbg->bp[index].enable = TRUE;
+  dbg->bp[index].type = MRB_DEBUG_BPTYPE_METHOD;
+  dbg->bp[index].point.methodpoint.method_name = set_method;
+  dbg->bp[index].point.methodpoint.class_name = set_class;
+  dbg->bpnum++;
+
+  return dbg->bp[index].bpno;
+}
+
+int32_t
+mrb_debug_get_breaknum( mrb_state *mrb, mrb_debug_context *dbg )
+{
+  if((mrb == NULL) || (dbg == NULL)) {
+    return MRB_DEBUG_INVALID_ARGUMENT;
+  }
+
+  return dbg->bpnum;
+}
+
+int32_t 
+mrb_debug_get_break_all( mrb_state *mrb, mrb_debug_context *dbg, uint32_t size, mrb_debug_breakpoint *bp )
+{
+  uint32_t get_size = 0;
+
+  if((mrb == NULL) || (dbg == NULL) || (bp == NULL)) {
+    return MRB_DEBUG_INVALID_ARGUMENT;
+  }
+
+  if(dbg->bpnum >= size) {
+    get_size = size;
+  }
+  else {
+    get_size = dbg->bpnum;
+  }
+
+  memcpy(bp, dbg->bp, sizeof(mrb_debug_breakpoint) * get_size);
+
+  return get_size;
+}
+
+int32_t
+mrb_debug_get_break( mrb_state *mrb, mrb_debug_context *dbg, uint32_t bpno, mrb_debug_breakpoint *bp )
+{
+  uint32_t index;
+
+  if((mrb == NULL) || (dbg == NULL) || (bp == NULL)) {
+    return MRB_DEBUG_INVALID_ARGUMENT;
+  }
+
+  index = get_break_index(dbg, bpno);
+  if(index == MRB_DEBUG_BREAK_INVALID_NO) {
+    return MRB_DEBUG_BREAK_INVALID_NO;
+  }
+
+  bp->bpno = dbg->bp[index].bpno;
+  bp->enable = dbg->bp[index].enable;
+  bp->point = dbg->bp[index].point;
+  bp->type = dbg->bp[index].type;
+
+  return 0;
+}
+
+int32_t 
+mrb_debug_delete_break( mrb_state *mrb, mrb_debug_context *dbg, uint32_t bpno )
+{
+  uint32_t i;
+  int32_t index;
+
+  if((mrb == NULL) ||(dbg == NULL)) {
+    return MRB_DEBUG_INVALID_ARGUMENT;
+  }
+
+  index = get_break_index(dbg, bpno);
+  if(index == MRB_DEBUG_BREAK_INVALID_NO) {
+    return MRB_DEBUG_BREAK_INVALID_NO;
+  }
+
+  free_breakpoint(mrb, &dbg->bp[index]);
+
+  for(i = index ; i < dbg->bpnum; i++) {
+    if((i + 1) == dbg->bpnum) {
+      memset(&dbg->bp[i], 0, sizeof(mrb_debug_breakpoint));
+    }
+    else {
+      memcpy(&dbg->bp[i], &dbg->bp[i + 1], sizeof(mrb_debug_breakpoint));
+    }
+  }
+
+  dbg->bpnum--;
+
+  return MRB_DEBUG_OK;
+}
+
+int32_t 
+mrb_debug_delete_break_all( mrb_state *mrb, mrb_debug_context *dbg )
+{
+  uint32_t i;
+
+  if((mrb == NULL) || (dbg == NULL)) {
+    return MRB_DEBUG_INVALID_ARGUMENT;
+  }
+
+  for(i = 0 ; i < dbg->bpnum ; i++) {
+    free_breakpoint(mrb, &dbg->bp[i]);
+  }
+
+  dbg->bpnum = 0;
+
+  return MRB_DEBUG_OK;
+}
+
+int32_t 
+mrb_debug_enable_break( mrb_state *mrb, mrb_debug_context *dbg, uint32_t bpno )
+{
+  int32_t index = 0;
+
+  if((mrb == NULL) || (dbg == NULL)) {
+    return MRB_DEBUG_INVALID_ARGUMENT;
+  }
+
+  index = get_break_index(dbg, bpno);
+  if(index == MRB_DEBUG_BREAK_INVALID_NO) {
+    return MRB_DEBUG_BREAK_INVALID_NO;
+  }
+
+  dbg->bp[index].enable = TRUE;
+
+  return MRB_DEBUG_OK;
+}
+
+int32_t
+mrb_debug_enable_break_all( mrb_state *mrb, mrb_debug_context *dbg )
+{
+  uint32_t i;
+
+  if((mrb == NULL) || (dbg == NULL)) {
+    return MRB_DEBUG_INVALID_ARGUMENT;
+  }
+
+  for(i = 0 ; i < dbg->bpnum; i++) {
+    dbg->bp[i].enable = TRUE;
+  }
+
+  return MRB_DEBUG_OK;
+}
+
+int32_t 
+mrb_debug_disable_break( mrb_state *mrb, mrb_debug_context *dbg, uint32_t bpno )
+{
+  int32_t index = 0;
+
+  if((mrb == NULL) || (dbg == NULL)) {
+    return MRB_DEBUG_INVALID_ARGUMENT;
+  }
+
+  index = get_break_index(dbg, bpno);
+  if(index == MRB_DEBUG_BREAK_INVALID_NO) {
+    return MRB_DEBUG_BREAK_INVALID_NO;
+  }
+
+  dbg->bp[index].enable = FALSE;
+
+  return MRB_DEBUG_OK;
+}
+
+int32_t 
+mrb_debug_disable_break_all( mrb_state *mrb, mrb_debug_context *dbg )
+{
+  uint32_t i;
+
+  if((mrb == NULL) || (dbg == NULL)) {
+    return MRB_DEBUG_INVALID_ARGUMENT;
+  }
+
+  for(i = 0 ; i < dbg->bpnum; i++) {
+    dbg->bp[i].enable = FALSE;
+  }
+
+  return MRB_DEBUG_OK;
+}
+
+static mrb_bool
+check_start_pc_for_line( mrb_irep *irep, mrb_code *pc, uint16_t line )
+{
+  if( pc > irep->iseq ) {
+    if( line == mrb_debug_get_line(irep, (uint32_t)(pc - irep->iseq - 1))) {
+      return FALSE;
+    }
+  }
+  return TRUE;
+}
+
+int32_t
+mrb_debug_check_breakpoint_line( mrb_state *mrb, mrb_debug_context *dbg, const char *file, uint16_t line )
+{
+  mrb_debug_breakpoint *bp;
+  mrb_debug_linepoint *line_p;
+  int i;
+
+  if((mrb == NULL) || (dbg == NULL) || (file == NULL) || (line <= 0)) {
+    return MRB_DEBUG_INVALID_ARGUMENT;
+  }
+
+  if(!check_start_pc_for_line(dbg->irep, dbg->pc, line)) {
+    return MRB_DEBUG_OK;
+  }
+
+  bp = dbg->bp;
+  for(i=0; i<dbg->bpnum; i++) {
+    switch (bp->type) {
+      case MRB_DEBUG_BPTYPE_LINE:
+        if(bp->enable == TRUE) {
+          line_p = &bp->point.linepoint;
+          if((strcmp(line_p->file, file) == 0) && (line_p->lineno == line)) {
+            return bp->bpno;
+          }
+        }
+        break;
+      case MRB_DEBUG_BPTYPE_METHOD:
+        break;
+      case MRB_DEBUG_BPTYPE_NONE:
+      default:
+        return MRB_DEBUG_OK;
+    }
+    bp++;
+  }
+  return MRB_DEBUG_OK;
+}
+
+
+int32_t 
+mrb_debug_check_breakpoint_method( mrb_state *mrb, mrb_debug_context *dbg, struct RClass *class_obj, mrb_sym method_sym, mrb_bool* isCfunc )
+{
+  mrb_debug_breakpoint *bp;
+  int32_t bpno;
+  int i;
+
+  if((mrb == NULL) || (dbg == NULL) || (class_obj == NULL)) {
+    return MRB_DEBUG_INVALID_ARGUMENT;
+  }
+
+  bp = dbg->bp;
+  for(i=0; i<dbg->bpnum; i++) {
+    if(bp->type == MRB_DEBUG_BPTYPE_METHOD) {
+      if(bp->enable == TRUE) {
+        bpno = compare_break_method(mrb, bp, class_obj, method_sym, isCfunc);
+        if(bpno > 0) {
+          return bpno;
+        }
+      }
+    }
+    else if(bp->type == MRB_DEBUG_BPTYPE_NONE) {
+      break;
+    }
+    bp++;
+  }
+
+  return 0;
+}
+
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.h	(revision 270)
@@ -0,0 +1,26 @@
+/*
+** apibreak.h
+**
+*/
+
+#ifndef APIBREAK_H_
+#define APIBREAK_H_
+
+#include "mruby.h"
+#include "mrdb.h"
+
+int32_t mrb_debug_set_break_line( mrb_state *, mrb_debug_context *, const char *, uint16_t );
+int32_t mrb_debug_set_break_method( mrb_state *, mrb_debug_context *, const char *, const char * );
+int32_t mrb_debug_get_breaknum( mrb_state *, mrb_debug_context * );
+int32_t mrb_debug_get_break_all( mrb_state *, mrb_debug_context *, uint32_t, mrb_debug_breakpoint bp[]);
+int32_t mrb_debug_get_break( mrb_state *, mrb_debug_context *, uint32_t, mrb_debug_breakpoint * );
+int32_t mrb_debug_delete_break( mrb_state *, mrb_debug_context *, uint32_t );
+int32_t mrb_debug_delete_break_all( mrb_state *, mrb_debug_context * );
+int32_t mrb_debug_enable_break( mrb_state *, mrb_debug_context *, uint32_t );
+int32_t mrb_debug_enable_break_all( mrb_state *, mrb_debug_context * );
+int32_t mrb_debug_disable_break( mrb_state *, mrb_debug_context *, uint32_t );
+int32_t mrb_debug_disable_break_all( mrb_state *, mrb_debug_context * );
+int32_t mrb_debug_check_breakpoint_line( mrb_state *, mrb_debug_context *, const char *, uint16_t );
+int32_t mrb_debug_check_breakpoint_method( mrb_state *, mrb_debug_context *, struct RClass *, mrb_sym, mrb_bool* );
+
+#endif /* APIBREAK_H_ */
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c	(revision 270)
@@ -0,0 +1,235 @@
+/*
+ * apilist.c
+ */
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "mrdb.h"
+#include "mrdberror.h"
+#include "apilist.h"
+#include "mruby/compile.h"
+#include "mruby/irep.h"
+#include "mruby/debug.h"
+
+#define LINE_BUF_SIZE MAX_COMMAND_LINE
+
+typedef struct source_file {
+  char *path;
+  uint16_t lineno;
+  FILE *fp;
+} source_file;
+
+static void
+source_file_free(mrb_state *mrb, source_file *file)
+{
+  if (file != NULL) {
+    if (file->path != NULL) {
+      mrb_free(mrb, file->path);
+    }
+    if (file->fp != NULL) {
+      fclose(file->fp);
+      file->fp = NULL;
+    }
+    mrb_free(mrb, file);
+  }
+}
+
+static char*
+build_path(mrb_state *mrb, const char *dir, const char *base)
+{
+  int len;
+  char *path = NULL;
+
+  len = strlen(base) + 1;
+
+  if (strcmp(dir, ".")) {
+    len += strlen(dir) + sizeof("/") - 1;
+  }
+
+  path = mrb_malloc(mrb, len);
+  memset(path, 0, len);
+
+  if (strcmp(dir, ".")) {
+    strcat(path, dir);
+    strcat(path, "/");
+  }
+  strcat(path, base);
+
+  return path;
+}
+
+static char*
+dirname(mrb_state *mrb, const char *path)
+{
+  size_t len;
+  char *p, *dir;
+
+  if (path == NULL) {
+    return NULL;
+  }
+
+  p = strrchr(path, '/');
+  len = p != NULL ? p - path : strlen(path);
+
+  dir = mrb_malloc(mrb, len + 1);
+  strncpy(dir, path, len);
+  dir[len] = '\0';
+
+  return dir;
+}
+
+static source_file*
+source_file_new(mrb_state *mrb, mrb_debug_context *dbg, char *filename)
+{
+  source_file *file = NULL;
+
+  file = mrb_malloc(mrb, sizeof(source_file));
+
+  memset(file, '\0', sizeof(source_file));
+  file->fp = fopen(filename, "rb");
+
+  if (file->fp == NULL) {
+    source_file_free(mrb, file);
+    return NULL;
+  }
+
+  file->lineno = 1;
+  file->path = mrb_malloc(mrb, strlen(filename) + 1);
+  strcpy(file->path, filename);
+  return file;
+}
+
+static mrb_bool
+remove_newlines(char *s, FILE *fp)
+{
+  int c;
+  char *p;
+  size_t len;
+
+  if ((len = strlen(s)) == 0) {
+    return FALSE;
+  }
+
+  p = s + len - 1;
+
+  if (*p != '\r' && *p != '\n') {
+    return FALSE;
+  }
+
+  if (*p == '\r') {
+    /* peek the next character and skip '\n' */
+    if ((c = fgetc(fp)) != '\n') {
+      ungetc(c, fp);
+    }
+  }
+
+  /* remove trailing newline characters */
+  while (s <= p && (*p == '\r' || *p == '\n')) {
+    *p-- = '\0';
+  }
+
+  return TRUE;
+}
+
+static void
+show_lines(source_file *file, uint16_t line_min, uint16_t line_max)
+{
+  char buf[LINE_BUF_SIZE];
+  int show_lineno = 1, found_newline = 0, is_printed = 0;
+
+  if (file->fp == NULL) {
+    return;
+  }
+
+  while (fgets(buf, sizeof(buf), file->fp) != NULL) {
+    found_newline = remove_newlines(buf, file->fp);
+
+    if (line_min <= file->lineno) {
+      if (show_lineno) {
+        printf("%-8d", file->lineno);
+      }
+      show_lineno = found_newline;
+      printf(found_newline ? "%s\n" : "%s", buf);
+      is_printed = 1;
+    }
+
+    if (found_newline) {
+      if (line_max < ++file->lineno) {
+        break;
+      }
+    }
+  }
+
+  if (is_printed && !found_newline) {
+    printf("\n");
+  }
+}
+
+char*
+mrb_debug_get_source(mrb_state *mrb, mrdb_state *mrdb, const char *srcpath, const char *filename)
+{
+  int i;
+  FILE *fp;
+  const char *search_path[3];
+  char *path = NULL;
+
+  search_path[0] = srcpath;
+  search_path[1] = dirname(mrb, mrb_debug_get_filename(mrdb->dbg->root_irep, 0));
+  search_path[2] = ".";
+
+  for (i = 0; i < 3; i++) {
+    if (search_path[i] == NULL) {
+      continue;
+    }
+
+    if ((path = build_path(mrb, search_path[i], filename)) == NULL) {
+      continue;
+    }
+
+    if ((fp = fopen(path, "rb")) == NULL) {
+      mrb_free(mrb, path);
+      path = NULL;
+      continue;
+    }
+    fclose(fp);
+    break;
+  }
+
+  mrb_free(mrb, (void *)search_path[1]);
+
+  return path;
+}
+
+int32_t
+mrb_debug_list(mrb_state *mrb, mrb_debug_context *dbg, char *filename, uint16_t line_min, uint16_t line_max)
+{
+  char *ext;
+  source_file *file;
+
+  if (mrb == NULL || dbg == NULL || filename == NULL) {
+    return MRB_DEBUG_INVALID_ARGUMENT;
+  }
+
+  ext = strrchr(filename, '.');
+
+  if (ext == NULL || strcmp(ext, ".rb")) {
+    printf("List command only supports .rb file.\n");
+    return MRB_DEBUG_INVALID_ARGUMENT;
+  }
+
+  if (line_min > line_max) {
+    return MRB_DEBUG_INVALID_ARGUMENT;
+  }
+
+  if ((file = source_file_new(mrb, dbg, filename)) != NULL) {
+    show_lines(file, line_min, line_max);
+    source_file_free(mrb, file);
+    return MRB_DEBUG_OK;
+  }
+  else {
+    printf("Invalid source file named %s.\n", filename);
+    return MRB_DEBUG_INVALID_ARGUMENT;
+  }
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.h	(revision 270)
@@ -0,0 +1,14 @@
+/*
+ * apilist.h
+ */
+
+#ifndef APILIST_H_
+#define APILIST_H_
+
+#include "mruby.h"
+#include "mrdb.h"
+
+int32_t mrb_debug_list(mrb_state *, mrb_debug_context *, char *, uint16_t, uint16_t);
+char* mrb_debug_get_source(mrb_state *, mrdb_state *, const char *, const char *);
+
+#endif /* APILIST_H_ */
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c	(revision 270)
@@ -0,0 +1,78 @@
+/*
+** apiprint.c
+**
+*/
+
+#include <string.h>
+#include "mrdb.h"
+#include "mruby/value.h"
+#include "mruby/class.h"
+#include "mruby/compile.h"
+#include "mruby/error.h"
+#include "mruby/numeric.h"
+#include "mruby/string.h"
+#include "apiprint.h"
+
+static void
+mrdb_check_syntax(mrb_state *mrb, mrb_debug_context *dbg, const char *expr, size_t len)
+{
+  mrbc_context *c;
+
+  c = mrbc_context_new(mrb);
+  c->no_exec = TRUE;
+  c->capture_errors = TRUE;
+  c->filename = (char*)dbg->prvfile;
+  c->lineno = dbg->prvline;
+
+  /* Load program */
+  mrb_load_nstring_cxt(mrb, expr, len, c);
+
+  mrbc_context_free(mrb, c);
+}
+
+mrb_value
+mrb_debug_eval(mrb_state *mrb, mrb_debug_context *dbg, const char *expr, size_t len, mrb_bool *exc)
+{
+  void (*tmp)(struct mrb_state *, struct mrb_irep *, mrb_code *, mrb_value *);
+  mrb_value ruby_code;
+  mrb_value s;
+  mrb_value v;
+  mrb_value recv;
+
+  /* disable code_fetch_hook */
+  tmp = mrb->code_fetch_hook;
+  mrb->code_fetch_hook = NULL;
+
+  mrdb_check_syntax(mrb, dbg, expr, len);
+  if (mrb->exc) {
+    v = mrb_obj_value(mrb->exc);
+    mrb->exc = 0;
+  }
+  else {
+    /*
+     * begin
+     *   expr
+     * rescue => e
+     *   e
+     * end
+     */
+    ruby_code = mrb_str_new_lit(mrb, "begin\n");
+    ruby_code = mrb_str_cat(mrb, ruby_code, expr, len);
+    ruby_code = mrb_str_cat_lit(mrb, ruby_code, "\nrescue => e\ne\nend");
+
+    recv = dbg->regs[0];
+
+    v =  mrb_funcall(mrb, recv, "instance_eval", 1, ruby_code);
+  }
+
+  if (exc) {
+    *exc = mrb_obj_is_kind_of(mrb, v, mrb->eException_class);
+  }
+
+  s = mrb_funcall(mrb, v, "inspect", 0);
+
+  /* enable code_fetch_hook */
+  mrb->code_fetch_hook = tmp;
+
+  return s;
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.h	(revision 270)
@@ -0,0 +1,13 @@
+/*
+ * apiprint.h
+ */
+
+#ifndef APIPRINT_H_
+#define APIPRINT_H_
+
+#include "mruby.h"
+#include "mrdb.h"
+
+mrb_value mrb_debug_eval(mrb_state*, mrb_debug_context*, const char*, size_t, mrb_bool*);
+
+#endif /* APIPRINT_H_ */
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c	(revision 270)
@@ -0,0 +1,428 @@
+/*
+** cmdbreak.c
+**
+*/
+
+#include <ctype.h>
+#include <string.h>
+#include "mruby.h"
+#include "mruby/dump.h"
+#include "mruby/debug.h"
+#include "mruby/string.h"
+#include "mrdb.h"
+#include "mrdberror.h"
+#include "apibreak.h"
+
+#define BREAK_SET_MSG_LINE                  "Breakpoint %d: file %s, line %d.\n"
+#define BREAK_SET_MSG_METHOD                "Breakpoint %d: method %s.\n"
+#define BREAK_SET_MSG_CLASS_METHOD          "Breakpoint %d: class %s, method %s.\n"
+#define BREAK_INFO_MSG_HEADER               "Num     Type           Enb What"
+#define BREAK_INFO_MSG_LINEBREAK            "%-8ubreakpoint     %s   at %s:%u\n"
+#define BREAK_INFO_MSG_METHODBREAK          "%-8ubreakpoint     %s   in %s:%s\n"
+#define BREAK_INFO_MSG_METHODBREAK_NOCLASS  "%-8ubreakpoint     %s   in %s\n"
+#define BREAK_INFO_MSG_ENABLE               "y"
+#define BREAK_INFO_MSG_DISABLE              "n"
+
+#define BREAK_ERR_MSG_INVALIDARG            "Internal error."
+#define BREAK_ERR_MSG_BLANK                 "Try \'help break\' for more information."
+#define BREAK_ERR_MSG_RANGEOVER             "The line number range is from 1 to 65535."
+#define BREAK_ERR_MSG_NUMOVER               "Exceeded the setable number of breakpoint."
+#define BREAK_ERR_MSG_NOOVER                "Breakno is over the available number.Please 'quit' and restart mrdb."
+#define BREAK_ERR_MSG_INVALIDSTR            "String \'%s\' is invalid.\n"
+#define BREAK_ERR_MSG_INVALIDLINENO         "Line %d in file \"%s\" is unavailable.\n"
+#define BREAK_ERR_MSG_INVALIDCLASS          "Class name \'%s\' is invalid.\n"
+#define BREAK_ERR_MSG_INVALIDMETHOD         "Method name \'%s\' is invalid.\n"
+#define BREAK_ERR_MSG_INVALIDFILE           "Source file named \"%s\" is unavailable.\n"
+#define BREAK_ERR_MSG_INVALIDBPNO           "warning: bad breakpoint number at or near '%s'\n"
+#define BREAK_ERR_MSG_INVALIDBPNO_INFO      "Args must be numbers variables."
+#define BREAK_ERR_MSG_NOBPNO                "No breakpoint number %d.\n"
+#define BREAK_ERR_MSG_NOBPNO_INFO           "No breakpoint matching '%d'\n"
+#define BREAK_ERR_MSG_NOBPNO_INFOALL        "No breakpoints."
+
+#define LINENO_MAX_DIGIT 6
+#define BPNO_LETTER_NUM 9
+
+typedef int32_t (*all_command_func)(mrb_state *, mrb_debug_context *);
+typedef int32_t (*select_command_func)(mrb_state *, mrb_debug_context *, uint32_t);
+
+static void
+print_api_common_error(int32_t error)
+{
+  switch(error) {
+    case MRB_DEBUG_INVALID_ARGUMENT:
+      puts(BREAK_ERR_MSG_INVALIDARG);
+      break;
+    default:
+      break;
+  }
+}
+
+#undef STRTOUL
+#define STRTOUL(ul,s) { \
+    int i; \
+    ul = 0; \
+    for(i=0; ISDIGIT(s[i]); i++) ul = 10*ul + (s[i] -'0'); \
+}
+
+static int32_t
+parse_breakpoint_no(char* args)
+{
+  char* ps = args;
+  uint32_t l;
+
+  if((*ps == '0')||(strlen(ps) >= BPNO_LETTER_NUM)) {
+    return 0;
+  }
+
+  while( !(ISBLANK(*ps)||ISCNTRL(*ps)) ) {
+    if(!ISDIGIT(*ps)) {
+      return 0;
+    }
+    ps++;
+  }
+
+  STRTOUL(l, args);
+  return l;
+}
+
+static mrb_bool
+exe_set_command_all(mrb_state *mrb, mrdb_state *mrdb, all_command_func func)
+{
+  int32_t ret = MRB_DEBUG_OK;
+
+  if(mrdb->wcnt == 1) {
+    ret = func(mrb, mrdb->dbg);
+    print_api_common_error(ret);
+    return TRUE;
+  }
+  return FALSE;
+}
+
+static void
+exe_set_command_select(mrb_state *mrb, mrdb_state *mrdb, select_command_func func)
+{
+  char* ps;
+  int32_t ret = MRB_DEBUG_OK;
+  int32_t bpno = 0;
+  int32_t i;
+
+  for(i=1; i<mrdb->wcnt; i++) {
+    ps = mrdb->words[i];
+    bpno = parse_breakpoint_no(ps);
+    if(bpno == 0) {
+      printf(BREAK_ERR_MSG_INVALIDBPNO, ps);
+      break;
+    }
+    ret = func(mrb, mrdb->dbg, (uint32_t)bpno);
+    if(ret == MRB_DEBUG_BREAK_INVALID_NO) {
+      printf(BREAK_ERR_MSG_NOBPNO, bpno);
+    }
+    else if(ret != MRB_DEBUG_OK) {
+      print_api_common_error(ret);
+    }
+  }
+}
+
+mrb_debug_bptype
+check_bptype(char* args)
+{
+  char* ps = args;
+
+  if(ISBLANK(*ps)||ISCNTRL(*ps)) {
+    puts(BREAK_ERR_MSG_BLANK);
+    return MRB_DEBUG_BPTYPE_NONE;
+  }
+
+  if(!ISDIGIT(*ps)) {
+    return MRB_DEBUG_BPTYPE_METHOD;
+  }
+
+  while( !(ISBLANK(*ps)||ISCNTRL(*ps)) ) {
+    if(!ISDIGIT(*ps)) {
+      printf(BREAK_ERR_MSG_INVALIDSTR, args);
+      return MRB_DEBUG_BPTYPE_NONE;
+    }
+    ps++;
+  }
+
+  if((*args == '0')||(strlen(args) >= LINENO_MAX_DIGIT)) {
+    puts(BREAK_ERR_MSG_RANGEOVER);
+    return MRB_DEBUG_BPTYPE_NONE;
+  }
+
+  return MRB_DEBUG_BPTYPE_LINE;
+}
+
+static void
+print_breakpoint(mrb_debug_breakpoint *bp)
+{
+  const char* enable_letter[] = {BREAK_INFO_MSG_DISABLE, BREAK_INFO_MSG_ENABLE};
+
+  if(bp->type == MRB_DEBUG_BPTYPE_LINE) {
+    printf(BREAK_INFO_MSG_LINEBREAK,
+      bp->bpno, enable_letter[bp->enable], bp->point.linepoint.file, bp->point.linepoint.lineno);
+  }
+  else {
+    if(bp->point.methodpoint.class_name == NULL) {
+      printf(BREAK_INFO_MSG_METHODBREAK_NOCLASS,
+        bp->bpno, enable_letter[bp->enable], bp->point.methodpoint.method_name);
+    }
+    else {
+      printf(BREAK_INFO_MSG_METHODBREAK,
+        bp->bpno, enable_letter[bp->enable], bp->point.methodpoint.class_name, bp->point.methodpoint.method_name);
+    }
+  }
+}
+
+static void
+info_break_all(mrb_state *mrb, mrdb_state *mrdb)
+{
+  int32_t bpnum = 0;
+  int32_t i = 0;
+  int32_t ret = MRB_DEBUG_OK;
+  mrb_debug_breakpoint *bp_list;
+
+  bpnum = mrb_debug_get_breaknum(mrb, mrdb->dbg);
+  if(bpnum < 0) {
+    print_api_common_error(bpnum);
+    return;
+  }
+  else if(bpnum == 0) {
+    puts(BREAK_ERR_MSG_NOBPNO_INFOALL);
+    return;
+  }
+  bp_list = (mrb_debug_breakpoint*)mrb_malloc(mrb, bpnum * sizeof(mrb_debug_breakpoint));
+
+  ret = mrb_debug_get_break_all(mrb, mrdb->dbg, (uint32_t)bpnum, bp_list);
+  if(ret < 0) {
+    print_api_common_error(ret);
+    return;
+  }
+  puts(BREAK_INFO_MSG_HEADER);
+  for(i = 0 ; i < bpnum ; i++) {
+    print_breakpoint(&bp_list[i]);
+  }
+
+  mrb_free(mrb, bp_list);
+}
+
+static void
+info_break_select(mrb_state *mrb, mrdb_state *mrdb)
+{
+  int32_t ret = MRB_DEBUG_OK;
+  int32_t bpno = 0;
+  char* ps = mrdb->command;
+  mrb_debug_breakpoint bp;
+  mrb_bool isFirst = TRUE;
+  int32_t i;
+
+  for(i=2; i<mrdb->wcnt; i++) {
+    ps = mrdb->words[i];
+    bpno = parse_breakpoint_no(ps);
+    if(bpno == 0) {
+      puts(BREAK_ERR_MSG_INVALIDBPNO_INFO);
+      break;
+    }
+
+    ret = mrb_debug_get_break(mrb, mrdb->dbg, bpno, &bp);
+    if(ret == MRB_DEBUG_BREAK_INVALID_NO) {
+      printf(BREAK_ERR_MSG_NOBPNO_INFO, bpno);
+      break;
+    }
+    else if(ret != MRB_DEBUG_OK) {
+      print_api_common_error(ret);
+      break;
+    }
+    else if(isFirst == TRUE) {
+      isFirst = FALSE;
+      puts(BREAK_INFO_MSG_HEADER);
+    }
+    print_breakpoint(&bp);
+  }
+}
+
+mrb_debug_bptype
+parse_breakcommand(mrdb_state *mrdb, const char **file, uint32_t *line, char **cname, char **method)
+{
+  mrb_debug_context *dbg = mrdb->dbg;
+  char *args;
+  char *body;
+  mrb_debug_bptype type;
+  uint32_t l;
+
+  if(mrdb->wcnt <= 1) {
+    puts(BREAK_ERR_MSG_BLANK);
+    return MRB_DEBUG_BPTYPE_NONE;
+  }
+
+  args = mrdb->words[1];
+  if((body = strrchr(args, ':')) == NULL) {
+    body = args;
+    type = check_bptype(body);
+  } else {
+    if(body == args) {
+      printf(BREAK_ERR_MSG_INVALIDSTR, args);
+      return MRB_DEBUG_BPTYPE_NONE;
+    }
+    *body = '\0';
+    type = check_bptype(++body);
+  }
+
+  switch(type) {
+    case MRB_DEBUG_BPTYPE_LINE:
+      STRTOUL(l, body);
+      if( l <= 65535 ) {
+        *line = l;
+        *file = (body == args)? mrb_debug_get_filename(dbg->irep, (uint32_t)(dbg->pc - dbg->irep->iseq)): args;
+      } else {
+        puts(BREAK_ERR_MSG_RANGEOVER);
+        type = MRB_DEBUG_BPTYPE_NONE;
+      }
+      break;
+    case MRB_DEBUG_BPTYPE_METHOD:
+      if(body == args) {
+        /* method only */
+        if( ISUPPER(*body)||ISLOWER(*body)||(*body == '_') ) {
+          *method = body;
+          *cname = NULL;
+        } else {
+          printf(BREAK_ERR_MSG_INVALIDMETHOD, args);
+          type = MRB_DEBUG_BPTYPE_NONE;
+        }
+      } else {
+        if( ISUPPER(*args) ) {
+          switch(*body) {
+            case '@': case '$': case '?': case '.': case ',': case ':':
+            case ';': case '#': case '\\': case '\'': case '\"':
+            printf(BREAK_ERR_MSG_INVALIDMETHOD, body);
+            type = MRB_DEBUG_BPTYPE_NONE;
+            break;
+          default:
+            *method = body;
+            *cname = args;
+            break;
+          }
+        } else {
+          printf(BREAK_ERR_MSG_INVALIDCLASS, args);
+          type = MRB_DEBUG_BPTYPE_NONE;
+        }
+      }
+      break;
+    case MRB_DEBUG_BPTYPE_NONE:
+    default:
+      break;
+  }
+
+  return type;
+}
+
+dbgcmd_state
+dbgcmd_break(mrb_state *mrb, mrdb_state *mrdb)
+{
+  mrb_debug_bptype type;
+  mrb_debug_context *dbg = mrdb->dbg;
+  const char *file = NULL;
+  uint32_t line = 0;
+  char *cname = NULL;
+  char *method = NULL;
+  int32_t ret;
+
+  type = parse_breakcommand(mrdb, &file, &line, &cname, &method);
+  switch (type) {
+    case MRB_DEBUG_BPTYPE_LINE:
+      ret = mrb_debug_set_break_line(mrb, dbg, file, line);
+      break;
+    case MRB_DEBUG_BPTYPE_METHOD:
+      ret = mrb_debug_set_break_method(mrb, dbg, cname, method);
+      break;
+    case MRB_DEBUG_BPTYPE_NONE:
+    default:
+      return DBGST_PROMPT;
+  }
+
+  if (ret >= 0) {
+    if (type == MRB_DEBUG_BPTYPE_LINE) {
+      printf(BREAK_SET_MSG_LINE, ret, file, line);
+    } else if ((type == MRB_DEBUG_BPTYPE_METHOD)&&(cname == NULL)) {
+      printf(BREAK_SET_MSG_METHOD, ret, method);
+    } else {
+      printf(BREAK_SET_MSG_CLASS_METHOD, ret, cname, method);
+    }
+  } else {
+    switch (ret) {
+      case MRB_DEBUG_BREAK_INVALID_LINENO:
+        printf(BREAK_ERR_MSG_INVALIDLINENO, line, file);
+        break;
+      case MRB_DEBUG_BREAK_INVALID_FILE:
+        printf(BREAK_ERR_MSG_INVALIDFILE, file);
+        break;
+      case MRB_DEBUG_BREAK_NUM_OVER:
+        puts(BREAK_ERR_MSG_NUMOVER);
+        break;
+      case MRB_DEBUG_BREAK_NO_OVER:
+        puts(BREAK_ERR_MSG_NOOVER);
+        break;
+      case MRB_DEBUG_INVALID_ARGUMENT:
+        puts(BREAK_ERR_MSG_INVALIDARG);
+        break;
+      case MRB_DEBUG_NOBUF:
+        puts("T.B.D.");
+        break;
+      default:
+        break;
+    }
+  }
+
+  return DBGST_PROMPT;
+}
+
+dbgcmd_state
+dbgcmd_info_break(mrb_state *mrb, mrdb_state *mrdb)
+{
+  if(mrdb->wcnt == 2) {
+    info_break_all(mrb, mrdb);
+  }
+  else {
+    info_break_select(mrb, mrdb);
+  }
+
+  return DBGST_PROMPT;
+}
+
+dbgcmd_state
+dbgcmd_delete(mrb_state *mrb, mrdb_state *mrdb)
+{
+  mrb_bool ret = FALSE;
+
+  ret = exe_set_command_all(mrb, mrdb, mrb_debug_delete_break_all);
+  if(ret != TRUE) {
+    exe_set_command_select(mrb, mrdb, mrb_debug_delete_break);
+  }
+
+  return DBGST_PROMPT;
+}
+
+dbgcmd_state
+dbgcmd_enable(mrb_state *mrb, mrdb_state *mrdb)
+{
+  mrb_bool ret = FALSE;
+
+  ret = exe_set_command_all(mrb, mrdb, mrb_debug_enable_break_all);
+  if(ret != TRUE) {
+    exe_set_command_select(mrb, mrdb, mrb_debug_enable_break);
+  }
+
+  return DBGST_PROMPT;
+}
+
+dbgcmd_state
+dbgcmd_disable(mrb_state *mrb, mrdb_state *mrdb)
+{
+  mrb_bool ret = FALSE;
+
+  ret = exe_set_command_all(mrb, mrdb, mrb_debug_disable_break_all);
+  if(ret != TRUE) {
+    exe_set_command_select(mrb, mrdb, mrb_debug_disable_break);
+  }
+  return DBGST_PROMPT;
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/cmdmisc.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/cmdmisc.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/cmdmisc.c	(revision 270)
@@ -0,0 +1,501 @@
+/*
+** cmdmisc.c - mruby debugger miscellaneous command functions
+**
+*/
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "apilist.h"
+#include "mruby/compile.h"
+
+typedef struct help_msg {
+  const char *cmd1;
+  const char *cmd2;
+  const char *short_msg;
+  const char *long_msg;
+} help_msg;
+
+static help_msg help_msg_list[] = {
+  {
+    "b[reak]", NULL, "Set breakpoint",
+    "Usage: break [file:]line\n"
+    "       break [class:]method\n"
+    "\n"
+    "Set breakpoint at specified line or method.\n"
+    "If \'[file:]line\' is specified, break at start of code for that line (in a file).\n"
+    "If \'[class:]method\' is specified, break at start of code for that method (of the class).\n"
+  },
+  {
+    "c[ontinue]", NULL, "Continue program being debugged",
+    "Usage: continue [N]\n"
+    "\n"
+    "Continue program stopped by a breakpoint.\n"
+    "If N, which is non negative value, is passed,\n"
+    "proceed program until the N-th breakpoint is coming.\n"
+    "If N is not passed, N is assumed 1.\n"
+  },
+  {
+    "d[elete]", NULL, "Delete some breakpoints",
+    "Usage: delete [bpno1 [bpno2 [... [bpnoN]]]]\n"
+    "\n"
+    "Delete some breakpoints.\n"
+    "Arguments are breakpoint numbers with spaces in between.\n"
+    "To delete all breakpoints, give no argument.\n"
+  },
+  {
+    "dis[able]", NULL, "Disable some breakpoints",
+    "Usage: disable [bpno1 [bpno2 [... [bpnoN]]]]\n"
+    "\n"
+    "Disable some breakpoints.\n"
+    "Arguments are breakpoint numbers with spaces in between.\n"
+    "To disable all breakpoints, give no argument.\n"
+  },
+  {
+    "en[able]", NULL, "Enable some breakpoints",
+    "Usage: enable [bpno1 [bpno2 [... [bpnoN]]]]\n"
+    "\n"
+    "Enable some breakpoints.\n"
+    "Arguments are breakpoint numbers with spaces in between.\n"
+    "To enable all breakpoints, give no argument.\n"
+  },
+  {
+    "ev[al]", NULL, "Evaluate expression",
+    "Usage: eval expr\n"
+    "\n"
+    "It evaluates and prints the value of the mruby expression.\n"
+    "This is equivalent to the \'print\' command.\n"
+  },
+  {
+    "h[elp]", NULL, "Print this help",
+    "Usage: help [command]\n"
+    "\n"
+    "With no arguments, help displays a short list of commands.\n"
+    "With a command name as help argument, help displays how to use that command.\n"
+  },
+  {
+    "i[nfo]", "b[reakpoints]", "Status of breakpoints",
+    "Usage: info breakpoints [bpno1 [bpno2 [... [bpnoN]]]]\n"
+    "\n"
+    "Status of specified breakpoints (all user-settable breakpoints if no argument).\n"
+    "Arguments are breakpoint numbers with spaces in between.\n"
+  },
+  {
+    "l[ist]", NULL, "List specified line",
+    "Usage: list\n"
+    "       list first[,last]\n"
+    "       list filename:first[,last]\n"
+    "\n"
+    "Print lines from a source file.\n"
+    "\n"
+    "With first and last, list prints lines from first to last.\n"
+    "When last is empty, it stands for ten lines away from first.\n"
+    "With filename, list prints lines in the specified source file.\n"
+  },
+  {
+    "p[rint]", NULL, "Print value of expression",
+    "Usage: print expr\n"
+    "\n"
+    "It evaluates and prints the value of the mruby expression.\n"
+    "This is equivalent to the \'eval\' command.\n"
+  },
+  {
+    "q[uit]", NULL, "Exit mrdb",
+    "Usage: quit\n"
+    "\n"
+    "Exit mrdb.\n"
+  },
+  {
+    "r[un]", NULL, "Start debugged program",
+    "Usage: run\n"
+    "\n"
+    "Start debugged program.\n"
+  },
+  {
+    "s[tep]", NULL, "Step program until it reaches a different source line",
+    "Usage: step\n"
+    "\n"
+    "Step program until it reaches a different source line.\n"
+  },
+  { NULL, NULL, NULL, NULL }
+};
+
+typedef struct listcmd_parser_state {
+  mrb_bool parse_error;
+  mrb_bool has_line_min;
+  mrb_bool has_line_max;
+  char *filename;
+  uint16_t line_min;
+  uint16_t line_max;
+} listcmd_parser_state;
+
+static listcmd_parser_state*
+listcmd_parser_state_new(mrb_state *mrb)
+{
+  listcmd_parser_state *st = mrb_malloc(mrb, sizeof(listcmd_parser_state));
+  memset(st, 0, sizeof(listcmd_parser_state));
+  return st;
+}
+
+static void
+listcmd_parser_state_free(mrb_state *mrb, listcmd_parser_state *st)
+{
+  if (st != NULL) {
+    if (st->filename != NULL) {
+      mrb_free(mrb, st->filename);
+    }
+    mrb_free(mrb, st);
+  }
+}
+
+static mrb_bool
+parse_uint(char **sp, uint16_t *n)
+{
+  char *p;
+  int i;
+
+  if (*sp == NULL || **sp == '\0') {
+    return FALSE;
+  }
+
+  for (p = *sp; *p != '\0' && ISDIGIT(*p); p++) ;
+
+  if (p != *sp && (i = atoi(*sp)) >= 0) {
+    *n = (uint16_t)i;
+    *sp = p;
+    return TRUE;
+  }
+  return FALSE;
+}
+
+static mrb_bool
+skip_char(char **sp, char c)
+{
+  if (*sp != NULL && **sp == c) {
+    ++*sp;
+    return TRUE;
+  }
+  return FALSE;
+}
+
+static mrb_bool
+parse_lineno(mrb_state *mrb, char **sp, listcmd_parser_state *st)
+{
+  if (*sp == NULL || **sp == '\0') {
+    return FALSE;
+  }
+
+  st->has_line_min = FALSE;
+  st->has_line_max = FALSE;
+
+  if (parse_uint(sp, &st->line_min)) {
+    st->has_line_min = TRUE;
+  }
+  else {
+    return FALSE;
+  }
+
+  if (skip_char(sp, ',')) {
+    if (parse_uint(sp, &st->line_max)) {
+      st->has_line_max = TRUE;
+    }
+    else {
+      st->parse_error = TRUE;
+      return FALSE;
+    }
+  }
+  return TRUE;
+}
+
+static mrb_bool
+parse_filename(mrb_state *mrb, char **sp, listcmd_parser_state *st)
+{
+  char *p;
+  int len;
+
+  if (st->filename != NULL) {
+    mrb_free(mrb, st->filename);
+    st->filename = NULL;
+  }
+
+  if ((p = strchr(*sp, ':')) != NULL) {
+    len = p - *sp;
+  }
+  else {
+    len = strlen(*sp);
+  }
+
+  if (len > 0) {
+    st->filename = mrb_malloc(mrb, len + 1);
+    strncpy(st->filename, *sp, len);
+    st->filename[len] = '\0';
+    *sp += len;
+    return TRUE;
+  }
+  else {
+    return FALSE;
+  }
+}
+
+char*
+replace_ext(mrb_state *mrb, const char *filename, const char *ext)
+{
+  size_t len;
+  char *p, *s;
+
+  if (filename == NULL) {
+    return NULL;
+  }
+
+  if ((p = strrchr(filename, '.')) != NULL && strchr(p, '/') == NULL) {
+    len = p - filename;
+  }
+  else {
+    len = strlen(filename);
+  }
+
+  s = mrb_malloc(mrb, len + strlen(ext) + 1);
+  memset(s, '\0', len + strlen(ext) + 1);
+  strncpy(s, filename, len);
+  strcat(s, ext);
+
+  return s;
+}
+
+static mrb_bool
+parse_listcmd_args(mrb_state *mrb, mrdb_state *mrdb, listcmd_parser_state *st)
+{
+  char *p;
+
+  switch (mrdb->wcnt) {
+  case 2:
+    p = mrdb->words[1];
+
+    /* mrdb->words[1] ::= <lineno> | <filename> ':' <lineno> | <filename> */
+    if (!parse_lineno(mrb, &p, st)) {
+      if (parse_filename(mrb, &p, st)) {
+        if (skip_char(&p, ':')) {
+          if (!parse_lineno(mrb, &p, st)) {
+            st->parse_error = TRUE;
+          }
+        }
+      }
+      else {
+        st->parse_error = TRUE;
+      }
+    }
+    if (*p != '\0') {
+      st->parse_error = TRUE;
+    }
+    break;
+  case 1:
+  case 0:
+    /* do nothing */
+    break;
+  default:
+    st->parse_error = TRUE;
+    printf("too many arguments\n");
+    break;
+  }
+
+  if (!st->parse_error) {
+    if (!st->has_line_min) {
+      st->line_min = (!st->filename && mrdb->dbg->prvline > 0) ? mrdb->dbg->prvline : 1;
+    }
+
+    if (!st->has_line_max) {
+      st->line_max = st->line_min + 9;
+    }
+
+    if (st->filename == NULL) {
+      if (mrdb->dbg->prvfile && strcmp(mrdb->dbg->prvfile, "-")) {
+        st->filename = replace_ext(mrb, mrdb->dbg->prvfile, ".rb");
+      }
+    }
+  }
+
+  if (st->parse_error || st->filename == NULL) {
+    return FALSE;
+  }
+
+  return TRUE;
+}
+
+static mrb_bool
+check_cmd_pattern(const char *pattern, const char *cmd)
+{
+  char *lbracket, *rbracket, *p, *q;
+
+  if (pattern == NULL && cmd == NULL) {
+    return TRUE;
+  }
+  if (pattern == NULL || cmd == NULL) {
+    return FALSE;
+  }
+  if((lbracket = strchr(pattern, '[')) == NULL) {
+    return !strcmp(pattern, cmd);
+  }
+  if ((rbracket = strchr(pattern, ']')) == NULL) {
+    return FALSE;
+  }
+  if (strncmp(pattern, cmd, lbracket - pattern)) {
+    return FALSE;
+  }
+
+  p = lbracket + 1;
+  q = (char *)cmd + (lbracket - pattern);
+
+  for ( ; p < rbracket && *q != '\0'; p++, q++) {
+    if (*p != *q) {
+      break;
+    }
+  }
+  return *q == '\0';
+}
+
+static help_msg*
+get_help_msg(char *cmd1, char *cmd2)
+{
+  help_msg *p;
+
+  if (cmd1 == NULL) {
+    return NULL;
+  }
+  for (p = help_msg_list; p->cmd1 != NULL; p++) {
+    if (check_cmd_pattern(p->cmd1, cmd1) && check_cmd_pattern(p->cmd2, cmd2)) {
+      return p;
+    }
+  }
+  return NULL;
+}
+
+static mrb_bool
+show_short_help(void)
+{
+  help_msg *p;
+
+  printf("Commands\n");
+
+  for (p = help_msg_list; p->cmd1 != NULL; p++) {
+    if (p->cmd2 == NULL) {
+      printf("  %s -- %s\n", p->cmd1, p->short_msg);
+    }
+    else {
+      printf("  %s %s -- %s\n", p->cmd1, p->cmd2, p->short_msg);
+    }
+  }
+  return TRUE;
+}
+
+static mrb_bool
+show_long_help(char *cmd1, char *cmd2)
+{
+  help_msg *help;
+
+  if ((help = get_help_msg(cmd1, cmd2)) == NULL) {
+    return FALSE;
+  }
+  printf("%s", help->long_msg);
+  return TRUE;
+}
+
+dbgcmd_state
+dbgcmd_list(mrb_state *mrb, mrdb_state *mrdb)
+{
+  char *filename;
+  listcmd_parser_state *st = listcmd_parser_state_new(mrb);
+
+  if (parse_listcmd_args(mrb, mrdb, st)) {
+    if ((filename = mrb_debug_get_source(mrb, mrdb, mrdb->srcpath, st->filename)) == NULL) {
+      filename = st->filename;
+    }
+    mrb_debug_list(mrb, mrdb->dbg, filename, st->line_min, st->line_max);
+
+    if (filename != NULL && filename != st->filename) {
+      mrb_free(mrb, filename);
+    }
+    listcmd_parser_state_free(mrb, st);
+  }
+
+  return DBGST_PROMPT;
+}
+
+dbgcmd_state
+dbgcmd_help(mrb_state *mrb, mrdb_state *mrdb)
+{
+  mrb_bool is_valid;
+  int i;
+
+  switch (mrdb->wcnt) {
+  case 0:
+  case 1:
+    is_valid = show_short_help();
+    break;
+  case 2:
+    is_valid = show_long_help(mrdb->words[1], NULL);
+    break;
+  case 3:
+    is_valid = show_long_help(mrdb->words[1], mrdb->words[2]);
+    break;
+  default:
+    is_valid = FALSE;
+    break;
+  }
+
+  if (!is_valid) {
+    printf("Invalid command \"");
+    for (i = 1; i < mrdb->wcnt; i++) {
+      printf("%s%s", i == 1 ? "" : " ", mrdb->words[i]);
+    }
+    printf("\". Try \"help\".\n");
+  }
+
+  return DBGST_PROMPT;
+}
+
+dbgcmd_state
+dbgcmd_quit(mrb_state *mrb, mrdb_state *mrdb)
+{
+  switch (mrdb->dbg->xm) {
+  case DBG_RUN:
+  case DBG_STEP:
+  case DBG_NEXT:
+    while (1) {
+      char c;
+      int buf;
+
+      printf("The program is running.  Exit anyway? (y or n) ");
+      fflush(stdout);
+
+      if ((buf = getchar()) == EOF) {
+        mrdb->dbg->xm = DBG_QUIT;
+        break;
+      }
+      c = buf;
+      while (buf != '\n' && (buf = getchar()) != EOF) ;
+
+      if (c == 'y' || c == 'Y') {
+        mrdb->dbg->xm = DBG_QUIT;
+        break;
+      }
+      else if (c == 'n' || c == 'N') {
+        break;
+      }
+      else {
+        printf("Please answer y or n.\n");
+      }
+    }
+    break;
+  default:
+    mrdb->dbg->xm = DBG_QUIT;
+    break;
+  }
+
+  if (mrdb->dbg->xm == DBG_QUIT) {
+    struct RClass *exc;
+    exc = mrb_define_class(mrb, "DebuggerExit", mrb_class_get(mrb, "Exception"));
+    mrb_raise(mrb, exc, "Exit mrdb.");
+  }
+  return DBGST_PROMPT;
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/cmdprint.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/cmdprint.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/cmdprint.c	(revision 270)
@@ -0,0 +1,58 @@
+/*
+** cmdprint.c - mruby debugger print command functions
+**
+*/
+
+#include <string.h>
+#include "mrdb.h"
+#include "mruby/value.h"
+#include "mruby/class.h"
+#include "mruby/compile.h"
+#include "mruby/error.h"
+#include "mruby/numeric.h"
+#include "mruby/string.h"
+#include "apiprint.h"
+
+dbgcmd_state
+dbgcmd_print(mrb_state *mrb, mrdb_state *mrdb)
+{
+  mrb_value expr;
+  mrb_value result;
+  mrb_value s;
+  uint8_t wcnt;
+  int ai;
+
+  if (mrdb->wcnt <= 1) {
+    puts("Parameter not specified.");
+    return DBGST_PROMPT;
+  }
+
+  ai = mrb_gc_arena_save(mrb);
+
+  /* eval expr */
+  expr = mrb_str_new_cstr(mrb, NULL);
+  for (wcnt=1; wcnt<mrdb->wcnt; wcnt++) {
+    expr = mrb_str_cat_lit(mrb, expr, " ");
+    expr = mrb_str_cat_cstr(mrb, expr, mrdb->words[wcnt]);
+  }
+
+  result = mrb_debug_eval(mrb, mrdb->dbg, RSTRING_PTR(expr), RSTRING_LEN(expr), NULL);
+
+  /* $print_no = result */
+  s = mrb_str_cat_lit(mrb, result, "\0");
+  printf("$%lu = %s\n", (unsigned long)mrdb->print_no++, RSTRING_PTR(s));
+
+  if (mrdb->print_no == 0) {
+    mrdb->print_no = 1;
+  }
+
+  mrb_gc_arena_restore(mrb, ai);
+
+  return DBGST_PROMPT;
+}
+
+dbgcmd_state
+dbgcmd_eval(mrb_state *mrb, mrdb_state *mrdb)
+{
+  return dbgcmd_print(mrb, mrdb);
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/cmdrun.c	(revision 270)
@@ -0,0 +1,54 @@
+/*
+** cmdrun.c - mruby debugger run command functions
+**
+*/
+
+#include "mruby/opcode.h"
+#include "mrdb.h"
+
+dbgcmd_state
+dbgcmd_run(mrb_state *mrb, mrdb_state *mrdb)
+{
+  mrb_debug_context *dbg = mrdb->dbg;
+
+  if( dbg->xm == DBG_INIT ){
+    dbg->xm = DBG_RUN;
+  } else {
+    dbg->xm = DBG_QUIT;
+    if( dbg->xphase == DBG_PHASE_RUNNING ){
+      struct RClass *exc;
+      puts("Start it from the beginning.");
+      exc = mrb_define_class(mrb, "DebuggerRestart", mrb_class_get(mrb, "Exception"));
+      mrb_raise(mrb, exc, "Restart mrdb.");
+    }
+  }
+  
+  return DBGST_RESTART;
+}
+
+dbgcmd_state
+dbgcmd_continue(mrb_state *mrb, mrdb_state *mrdb)
+{
+  mrb_debug_context *dbg = mrdb->dbg;
+  int ccnt = 1;
+
+  if( mrdb->wcnt > 1 ){
+    sscanf(mrdb->words[1], "%d", &ccnt);
+  }
+  dbg->ccnt = (uint16_t)(ccnt > 0 ? ccnt : 1);  /* count of continue */
+
+  if( dbg->xphase == DBG_PHASE_AFTER_RUN ){
+    puts("The program is not running.");
+    dbg->xm = DBG_QUIT;
+  } else {
+    dbg->xm = DBG_RUN;
+  }
+  return DBGST_CONTINUE;
+}
+
+dbgcmd_state
+dbgcmd_step(mrb_state *mrb, mrdb_state *mrdb)
+{
+  mrdb->dbg->xm = DBG_STEP;
+  return DBGST_CONTINUE;
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c	(revision 270)
@@ -0,0 +1,746 @@
+/*
+** mrdb.c - mruby debugger
+**
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <ctype.h>
+
+#include "mruby.h"
+#include "mruby/dump.h"
+#include "mruby/debug.h"
+#include "mruby/class.h"
+#include "mruby/opcode.h"
+#include "mruby/variable.h"
+
+#include "mrdb.h"
+#include "apibreak.h"
+#include "apilist.h"
+
+void mrdb_state_free(mrb_state *);
+
+static mrb_debug_context *_debug_context = NULL;
+static mrdb_state *_mrdb_state = NULL;
+
+struct _args {
+  FILE *rfp;
+  char* fname;
+  char* srcpath;
+  int argc;
+  char** argv;
+  mrb_bool mrbfile : 1;
+};
+
+typedef struct debug_command {
+  const char *cmd1;
+  const char *cmd2;
+  uint8_t len1;
+  uint8_t len2;
+  uint8_t div;
+  debug_command_id id;
+  debug_command_func func;
+} debug_command;
+
+static const debug_command debug_command_list[] = {
+  {"break",     NULL,           1, 0, 0, DBGCMD_BREAK,          dbgcmd_break},           /* b[reak] */
+  {"continue",  NULL,           1, 0, 0, DBGCMD_CONTINUE,       dbgcmd_continue},        /* c[ontinue] */
+  {"delete",    NULL,           1, 0, 1, DBGCMD_DELETE,         dbgcmd_delete},          /* d[elete] */
+  {"disable",   NULL,           3, 0, 1, DBGCMD_DISABLE,        dbgcmd_disable},         /* dis[able] */
+  {"enable",    NULL,           2, 0, 1, DBGCMD_ENABLE,         dbgcmd_enable},          /* en[able] */
+  {"eval",      NULL,           2, 0, 0, DBGCMD_EVAL,           dbgcmd_eval},            /* ev[al] */
+  {"help",      NULL,           1, 0, 1, DBGCMD_HELP,           dbgcmd_help},            /* h[elp] */
+  {"info",      "breakpoints",  1, 1, 1, DBGCMD_INFO_BREAK,     dbgcmd_info_break},      /* i[nfo] b[reakpoints] */
+  {"list",      NULL,           1, 0, 1, DBGCMD_LIST,           dbgcmd_list},            /* l[ist] */
+  {"print",     NULL,           1, 0, 0, DBGCMD_PRINT,          dbgcmd_print},           /* p[rint] */
+  {"quit",      NULL,           1, 0, 0, DBGCMD_QUIT,           dbgcmd_quit},            /* q[uit] */
+  {"run",       NULL,           1, 0, 0, DBGCMD_RUN,            dbgcmd_run},             /* r[un] */
+  {"step",      NULL,           1, 0, 1, DBGCMD_STEP,           dbgcmd_step},            /* s[tep] */
+  {NULL}
+};
+
+
+static void
+usage(const char *name)
+{
+  static const char *const usage_msg[] = {
+  "switches:",
+  "-b           load and execute RiteBinary (mrb) file",
+  "-d           specify source directory",
+  "--version    print the version",
+  "--copyright  print the copyright",
+  NULL
+  };
+  const char *const *p = usage_msg;
+
+  printf("Usage: %s [switches] programfile\n", name);
+  while (*p) {
+    printf("  %s\n", *p++);
+  }
+}
+
+static int
+parse_args(mrb_state *mrb, int argc, char **argv, struct _args *args)
+{
+  char **origargv = argv;
+  static const struct _args args_zero = { 0 };
+
+  *args = args_zero;
+
+  for (argc--,argv++; argc > 0; argc--,argv++) {
+    char *item;
+    if (argv[0][0] != '-') break;
+
+    item = argv[0] + 1;
+    switch (*item++) {
+    case 'b':
+      args->mrbfile = TRUE;
+      break;
+    case 'd':
+      if (item[0]) {
+        goto append_srcpath;
+      }
+      else if (argc > 1) {
+        argc--; argv++;
+        item = argv[0];
+append_srcpath:
+        if (!args->srcpath) {
+          size_t buflen;
+          char *buf;
+
+          buflen = strlen(item) + 1;
+          buf = (char *)mrb_malloc(mrb, buflen);
+          memcpy(buf, item, buflen);
+          args->srcpath = buf;
+        }
+        else {
+          size_t srcpathlen;
+          size_t itemlen;
+
+          srcpathlen = strlen(args->srcpath);
+          itemlen = strlen(item);
+          args->srcpath =
+            (char *)mrb_realloc(mrb, args->srcpath, srcpathlen + itemlen + 2);
+          args->srcpath[srcpathlen] = '\n';
+          memcpy(args->srcpath + srcpathlen + 1, item, itemlen + 1);
+        }
+      }
+      else {
+        printf("%s: No path specified for -d\n", *origargv);
+        return EXIT_SUCCESS;
+      }
+      break;
+    case '-':
+      if (strcmp((*argv) + 2, "version") == 0) {
+        mrb_show_version(mrb);
+        exit(EXIT_SUCCESS);
+      }
+      else if (strcmp((*argv) + 2, "copyright") == 0) {
+        mrb_show_copyright(mrb);
+        exit(EXIT_SUCCESS);
+      }
+    default:
+      return EXIT_FAILURE;
+    }
+  }
+
+  if (args->rfp == NULL) {
+    if (*argv == NULL) {
+      printf("%s: Program file not specified.\n", *origargv);
+      return EXIT_FAILURE;
+    }
+    else {
+      args->rfp = fopen(argv[0], args->mrbfile ? "rb" : "r");
+      if (args->rfp == NULL) {
+        printf("%s: Cannot open program file. (%s)\n", *origargv, *argv);
+        return EXIT_FAILURE;
+      }
+      args->fname = argv[0];
+      argc--; argv++;
+    }
+  }
+  args->argv = (char **)mrb_realloc(mrb, args->argv, sizeof(char*) * (argc + 1));
+  memcpy(args->argv, argv, (argc+1) * sizeof(char*));
+  args->argc = argc;
+
+  return EXIT_SUCCESS;
+}
+
+static void
+cleanup(mrb_state *mrb, struct _args *args)
+{
+  if (args->rfp)
+    fclose(args->rfp);
+  if (args->srcpath)
+    mrb_free(mrb, args->srcpath);
+  if (args->argv)
+    mrb_free(mrb, args->argv);
+  mrdb_state_free(mrb);
+  mrb_close(mrb);
+}
+
+static mrb_debug_context*
+mrb_debug_context_new(mrb_state *mrb)
+{
+  mrb_debug_context *dbg = mrb_malloc(mrb, sizeof(mrb_debug_context));
+
+  memset(dbg, 0, sizeof(mrb_debug_context));
+
+  dbg->xm = DBG_INIT;
+  dbg->xphase = DBG_PHASE_BEFORE_RUN;
+  dbg->next_bpno = 1;
+
+  return dbg;
+}
+
+mrb_debug_context*
+mrb_debug_context_get(mrb_state *mrb)
+{
+  if (!_debug_context) {
+    _debug_context = mrb_debug_context_new(mrb);
+  }
+  return _debug_context;
+}
+
+void
+mrb_debug_context_set(mrb_debug_context *dbg)
+{
+  _debug_context = dbg;
+}
+
+void
+mrb_debug_context_free(mrb_state *mrb)
+{
+  if (_debug_context) {
+    mrb_debug_delete_break_all(mrb, _debug_context);
+    mrb_free(mrb, _debug_context);
+    _debug_context = NULL;
+  }
+}
+
+static mrdb_state*
+mrdb_state_new(mrb_state *mrb)
+{
+  mrdb_state *mrdb = mrb_malloc(mrb, sizeof(mrdb_state));
+
+  memset(mrdb, 0, sizeof(mrdb_state));
+
+  mrdb->dbg = mrb_debug_context_get(mrb);
+  mrdb->command = mrb_malloc(mrb, MAX_COMMAND_LINE+1);
+  mrdb->print_no = 1;
+
+  return mrdb;
+}
+
+mrdb_state*
+mrdb_state_get(mrb_state *mrb)
+{
+  if (!_mrdb_state) {
+    _mrdb_state = mrdb_state_new(mrb);
+  }
+  return _mrdb_state;
+}
+
+void
+mrdb_state_set(mrdb_state *mrdb)
+{
+  _mrdb_state = mrdb;
+}
+
+void
+mrdb_state_free(mrb_state *mrb)
+{
+  mrb_debug_context_free(mrb);
+  if (_mrdb_state) {
+    mrb_free(mrb, _mrdb_state->command);
+    mrb_free(mrb, _mrdb_state);
+    _mrdb_state = NULL;
+  }
+}
+
+static char*
+get_command(mrb_state *mrb, mrdb_state *mrdb)
+{
+  int i;
+  int c;
+
+  for (i=0; i<MAX_COMMAND_LINE; i++) {
+    if ((c=getchar()) == EOF || c == '\n') break;
+    mrdb->command[i] = c;
+  }
+
+  if (i == 0 && feof(stdin)) {
+    clearerr(stdin);
+    strcpy(mrdb->command, "quit");
+    i += sizeof("quit") - 1;
+  }
+
+  if (i == MAX_COMMAND_LINE) {
+    for ( ; (c=getchar()) != EOF && c !='\n'; i++) ;
+  }
+
+  if (i > MAX_COMMAND_LINE) {
+    printf("command line too long.\n");
+    i = 0; /* discard command data */
+  }
+  mrdb->command[i] = '\0';
+
+  return mrdb->command;
+}
+
+static char*
+pick_out_word(mrb_state *mrb, char **pp)
+{
+  char *ps;
+
+  for (ps=*pp; ISBLANK(*ps); ps++) ;
+  if (*ps == '\0') {
+    return NULL;
+  }
+
+  if (*ps == '\"' || *ps == '\'') {
+    *pp = strchr(ps+1, *ps);
+    if (*pp) (*pp)++;
+  }
+  else {
+    *pp = strpbrk(ps, " \t");
+  }
+
+  if (!*pp) {
+    *pp = ps + strlen(ps);
+  }
+
+  if (**pp != '\0') {
+    **pp = '\0';
+    (*pp)++;
+  }
+
+  return ps;
+}
+
+static debug_command*
+parse_command(mrb_state *mrb, mrdb_state *mrdb, char *buf)
+{
+  debug_command *cmd = NULL;
+  char *p = buf;
+  size_t wlen;
+
+  /* get word #1 */
+  mrdb->words[0] = pick_out_word(mrb, &p);
+  if (!mrdb->words[0]) {
+    return NULL;
+  }
+  mrdb->wcnt = 1;
+  /* set remain parameter */
+  for ( ; *p && ISBLANK(*p); p++) ;
+  if (*p) {
+    mrdb->words[mrdb->wcnt++] = p;
+  }
+
+  /* check word #1 */
+  for (cmd=(debug_command*)debug_command_list; cmd->cmd1; cmd++) {
+    wlen = strlen(mrdb->words[0]);
+    if (wlen >= cmd->len1 &&
+        strncmp(mrdb->words[0], cmd->cmd1, wlen) == 0) {
+      break;
+    }
+  }
+
+  if (cmd->cmd2) {
+    if (mrdb->wcnt > 1) {
+      /* get word #2 */
+      mrdb->words[1] = pick_out_word(mrb, &p);
+      if (mrdb->words[1]) {
+        /* update remain parameter */
+        for ( ; *p && ISBLANK(*p); p++) ;
+        if (*p) {
+          mrdb->words[mrdb->wcnt++] = p;
+        }
+      }
+    }
+
+    /* check word #1,#2 */
+    for ( ; cmd->cmd1; cmd++) {
+      wlen = strlen(mrdb->words[0]);
+      if (wlen < cmd->len1 ||
+          strncmp(mrdb->words[0], cmd->cmd1, wlen)) {
+        continue;
+      }
+
+      if (!cmd->cmd2) break;          /* word #1 only */
+
+      if (mrdb->wcnt == 1) continue;  /* word #2 not specified */
+
+      wlen = strlen(mrdb->words[1]);
+      if (wlen >= cmd->len2 &&
+          strncmp(mrdb->words[1], cmd->cmd2, wlen) == 0) {
+        break;  /* word #1 and #2 */
+      }
+    }
+  }
+
+  /* divide remain parameters */
+  if (cmd->cmd1 && cmd->div) {
+    p = mrdb->words[--mrdb->wcnt];
+    for ( ; mrdb->wcnt<MAX_COMMAND_WORD; mrdb->wcnt++) {
+      mrdb->words[mrdb->wcnt] = pick_out_word(mrb, &p);
+      if (!mrdb->words[mrdb->wcnt]) {
+        break;
+      }
+    }
+  }
+
+  return cmd->cmd1 ? cmd : NULL;
+}
+
+static void
+print_info_stopped_break(mrb_state *mrb, mrdb_state *mrdb)
+{
+  mrb_debug_breakpoint bp;
+  int32_t ret;
+  uint16_t lineno;
+  const char *file;
+  const char *method_name;
+  const char *class_name;
+
+  ret = mrb_debug_get_break(mrb, mrdb->dbg, mrdb->dbg->stopped_bpno, &bp);
+  if(ret == 0) {
+    switch(bp.type) {
+      case MRB_DEBUG_BPTYPE_LINE:
+        file = bp.point.linepoint.file;
+        lineno = bp.point.linepoint.lineno;
+        printf("Breakpoint %d, at %s:%d\n", bp.bpno, file, lineno);
+        break;
+      case MRB_DEBUG_BPTYPE_METHOD:
+        method_name = bp.point.methodpoint.method_name;
+        class_name = bp.point.methodpoint.class_name;
+        if(class_name == NULL) {
+          printf("Breakpoint %d, %s\n", bp.bpno, method_name);
+        }
+        else {
+          printf("Breakpoint %d, %s:%s\n", bp.bpno, class_name, method_name);
+        }
+        if(mrdb->dbg->isCfunc) {
+          printf("Stopped before calling the C function.\n");
+        }
+        break;
+      default:
+        break;
+    }
+  }
+}
+
+static void
+print_info_stopped_step_next(mrb_state *mrb, mrdb_state *mrdb)
+{
+  const char* file = mrdb->dbg->prvfile;
+  uint16_t lineno = mrdb->dbg->prvline;
+  printf("%s:%d\n", file, lineno);
+}
+
+static void
+print_info_stopped_code(mrb_state *mrb, mrdb_state *mrdb)
+{
+  char* file = mrb_debug_get_source(mrb, mrdb, mrdb->srcpath, mrdb->dbg->prvfile);
+  uint16_t lineno = mrdb->dbg->prvline;
+  if(file != NULL) {
+    mrb_debug_list(mrb, mrdb->dbg, file, lineno, lineno);
+    mrb_free(mrb, file);
+  }
+}
+
+static void
+print_info_stopped(mrb_state *mrb, mrdb_state *mrdb)
+{
+  switch(mrdb->dbg->bm) {
+    case BRK_BREAK:
+      print_info_stopped_break(mrb, mrdb);
+      print_info_stopped_code(mrb, mrdb);
+      break;
+    case BRK_STEP:
+    case BRK_NEXT:
+      print_info_stopped_step_next(mrb, mrdb);
+      print_info_stopped_code(mrb, mrdb);
+      break;
+    default:
+      break;
+  }
+}
+
+static debug_command*
+get_and_parse_command(mrb_state *mrb, mrdb_state *mrdb)
+{
+  debug_command *cmd = NULL;
+  char *p;
+  int i;
+
+  while (!cmd) {
+    for (p=NULL; !p || *p=='\0'; ) {
+      printf("(%s:%d) ", mrdb->dbg->prvfile, mrdb->dbg->prvline);
+      fflush(stdout);
+      p = get_command(mrb, mrdb);
+    }
+
+    cmd = parse_command(mrb, mrdb, p);
+#ifdef _DBG_MRDB_PARSER_
+    for (i=0; i<mrdb->wcnt; i++) {
+      printf("%d: %s\n", i, mrdb->words[i]);
+    }
+#endif
+    if (!cmd) {
+      printf("invalid command (");
+      for (i=0; i<mrdb->wcnt; i++) {
+        if (i>0) {
+          printf(" ");
+        }
+        printf("%s", mrdb->words[i]);
+      }
+      puts(")");
+    }
+  }
+  return cmd;
+}
+
+static int32_t
+check_method_breakpoint(mrb_state *mrb, mrb_irep *irep, mrb_code *pc, mrb_value *regs)
+{
+  struct RClass* c;
+  mrb_sym sym;
+  int32_t bpno;
+  mrb_bool isCfunc;
+
+  mrb_debug_context *dbg = mrb_debug_context_get(mrb);
+
+  isCfunc = FALSE;
+  bpno = dbg->method_bpno;
+  dbg->method_bpno = 0;
+
+  switch(GET_OPCODE(*pc)) {
+    case OP_SEND:
+    case OP_SENDB:
+      c = mrb_class(mrb, regs[GETARG_A(*pc)]);
+      sym = irep->syms[GETARG_B(*pc)];
+      break;
+    case OP_SUPER:
+      c = mrb->c->ci->target_class->super;
+      sym = mrb->c->ci->mid;
+      break;
+    default:
+      sym = 0;
+      break;
+  }
+  if(sym != 0) {
+    dbg->method_bpno = mrb_debug_check_breakpoint_method(mrb, dbg, c, sym, &isCfunc);
+    if(isCfunc) {
+      bpno = dbg->method_bpno;
+      dbg->method_bpno = 0;
+    }
+  }
+  dbg->isCfunc = isCfunc;
+  return bpno;
+}
+
+static void
+mrb_code_fetch_hook(mrb_state *mrb, mrb_irep *irep, mrb_code *pc, mrb_value *regs)
+{
+  const char *file;
+  int32_t line;
+  int32_t bpno;
+
+  mrb_debug_context *dbg = mrb_debug_context_get(mrb);
+
+  mrb_assert(dbg);
+
+  dbg->irep = irep;
+  dbg->pc   = pc;
+  dbg->regs = regs;
+
+  if(dbg->xphase == DBG_PHASE_RESTART) {
+    dbg->root_irep = irep;
+    dbg->prvfile = NULL;
+    dbg->prvline = 0;
+    dbg->xm = DBG_RUN;
+    dbg->xphase = DBG_PHASE_RUNNING;
+  }
+
+  file = mrb_debug_get_filename(irep, (uint32_t)(pc - irep->iseq));
+  line = mrb_debug_get_line(irep, (uint32_t)(pc - irep->iseq));
+
+  switch (dbg->xm) {
+  case DBG_STEP:
+  case DBG_NEXT:  // temporary
+    if (!file || (dbg->prvfile == file && dbg->prvline == line)) {
+      return;
+    }
+    dbg->method_bpno = 0;
+    dbg->bm = BRK_STEP;
+    break;
+
+  case DBG_RUN:
+    bpno = check_method_breakpoint(mrb, irep, pc, regs);
+    if (bpno > 0) {
+      dbg->stopped_bpno = bpno;
+      dbg->bm = BRK_BREAK;
+      break;
+    }
+    if (dbg->prvfile != file || dbg->prvline != line) {
+      bpno = mrb_debug_check_breakpoint_line(mrb, dbg, file, line);
+      if (bpno > 0) {
+        dbg->stopped_bpno = bpno;
+        dbg->bm = BRK_BREAK;
+        break;
+      }
+    }
+    dbg->prvfile = file;
+    dbg->prvline = line;
+    return;
+  case DBG_INIT:
+    dbg->root_irep = irep;
+    dbg->bm = BRK_INIT;
+    if (!file || line < 0) {
+      puts("Cannot get debugging information.");
+    }
+    break;
+
+  default:
+    return;
+  }
+
+  dbg->prvfile = file;
+  dbg->prvline = line;
+
+  if(dbg->bm == BRK_BREAK && --dbg->ccnt > 0) {
+    return;
+  }
+  dbg->break_hook(mrb, dbg);
+
+  dbg->xphase = DBG_PHASE_RUNNING;
+}
+
+static mrdb_exemode
+mrb_debug_break_hook(mrb_state *mrb, mrb_debug_context *dbg)
+{
+  debug_command *cmd;
+  dbgcmd_state st = DBGST_CONTINUE;
+  mrdb_state *mrdb = mrdb_state_get(mrb);
+
+  print_info_stopped(mrb, mrdb);
+
+  while (1) {
+    cmd = get_and_parse_command(mrb, mrdb);
+    mrb_assert(cmd);
+
+    st = cmd->func(mrb, mrdb);
+
+    if( (st == DBGST_CONTINUE) || (st == DBGST_RESTART) ) break;
+  }
+  return dbg->xm;
+}
+
+int
+main(int argc, char **argv)
+{
+  mrb_state *mrb = mrb_open();
+  int n = -1;
+  struct _args args;
+  mrb_value v;
+  mrdb_state *mrdb;
+  mrdb_state *mrdb_backup;
+  mrb_debug_context* dbg_backup;
+  debug_command *cmd;
+
+ l_restart:
+
+  if (mrb == NULL) {
+    fputs("Invalid mrb_state, exiting mruby\n", stderr);
+    return EXIT_FAILURE;
+  }
+
+  /* parse command parameters */
+  n = parse_args(mrb, argc, argv, &args);
+  if (n == EXIT_FAILURE || args.rfp == NULL) {
+    cleanup(mrb, &args);
+    usage(argv[0]);
+    return n;
+  }
+
+  /* initialize debugger information */
+  mrdb = mrdb_state_get(mrb);
+  mrb_assert(mrdb && mrdb->dbg);
+  mrdb->srcpath = args.srcpath;
+
+  if(mrdb->dbg->xm == DBG_QUIT) {
+    mrdb->dbg->xphase = DBG_PHASE_RESTART;
+  }
+  else {
+    mrdb->dbg->xphase = DBG_PHASE_BEFORE_RUN;
+  }
+  mrdb->dbg->xm = DBG_INIT;
+  mrdb->dbg->ccnt = 1;
+  
+  /* setup hook functions */
+  mrb->code_fetch_hook = mrb_code_fetch_hook;
+  mrdb->dbg->break_hook = mrb_debug_break_hook;
+
+  if (args.mrbfile) { /* .mrb */
+    v = mrb_load_irep_file(mrb, args.rfp);
+  }
+  else {              /* .rb */
+    mrbc_context *cc = mrbc_context_new(mrb);
+    mrbc_filename(mrb, cc, args.fname);
+    v = mrb_load_file_cxt(mrb, args.rfp, cc);
+    mrbc_context_free(mrb, cc);
+  }
+  if (mrdb->dbg->xm == DBG_QUIT && !mrb_undef_p(v) && mrb->exc) {
+    const char *classname = mrb_obj_classname(mrb, mrb_obj_value(mrb->exc));
+    if (!strcmp(classname, "DebuggerExit")) {
+      cleanup(mrb, &args);
+      return 0;
+    }
+    if (!strcmp(classname, "DebuggerRestart")) {
+      mrdb_backup = mrdb_state_get(mrb);
+      dbg_backup = mrb_debug_context_get(mrb);
+
+      mrdb_state_set(NULL);
+      mrb_debug_context_set(NULL);
+
+      cleanup(mrb, &args);
+      mrb = mrb_open();
+
+      mrdb_state_set(mrdb_backup);
+      mrb_debug_context_set(dbg_backup);
+
+      goto l_restart;
+    }
+  }
+  puts("mruby application exited.");
+  mrdb->dbg->xphase = DBG_PHASE_AFTER_RUN;
+  if (!mrb_undef_p(v)) {
+    if (mrb->exc) {
+      mrb_print_error(mrb);
+    }
+    else {
+      printf(" => ");
+      mrb_p(mrb, v);
+    }
+  }
+  
+  mrdb->dbg->prvfile = "-";
+  mrdb->dbg->prvline = 0;
+  
+  while (1) {
+    cmd = get_and_parse_command(mrb, mrdb);
+    mrb_assert(cmd);
+    
+    if (cmd->id == DBGCMD_QUIT) {
+      break;
+    }
+    
+    if( cmd->func(mrb, mrdb) == DBGST_RESTART ) goto l_restart;
+  }
+  
+  cleanup(mrb, &args);
+
+  return 0;
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h	(revision 270)
@@ -0,0 +1,163 @@
+/*
+** mrdb.h - mruby debugger
+**
+*/
+
+#ifndef MRDB_H
+#define MRDB_H
+
+#include "mruby.h"
+
+#include "mrdbconf.h"
+
+#ifdef _MSC_VER
+# define __func__ __FUNCTION__
+#endif
+
+#define MAX_COMMAND_WORD (16)
+
+typedef enum debug_command_id {
+  DBGCMD_RUN,
+  DBGCMD_CONTINUE,
+  DBGCMD_NEXT,
+  DBGCMD_STEP,
+  DBGCMD_BREAK,
+  DBGCMD_INFO_BREAK,
+  DBGCMD_WATCH,
+  DBGCMD_INFO_WATCH,
+  DBGCMD_ENABLE,
+  DBGCMD_DISABLE,
+  DBGCMD_DELETE,
+  DBGCMD_PRINT,
+  DBGCMD_DISPLAY,
+  DBGCMD_INFO_DISPLAY,
+  DBGCMD_DELETE_DISPLAY,
+  DBGCMD_EVAL,
+  DBGCMD_BACKTRACE,
+  DBGCMD_LIST,
+  DBGCMD_HELP,
+  DBGCMD_QUIT,
+  DBGCMD_UNKNOWN
+} debug_command_id;
+
+typedef enum dbgcmd_state {
+  DBGST_CONTINUE,
+  DBGST_PROMPT,
+  DBGST_COMMAND_ERROR,
+  DBGST_MAX,
+  DBGST_RESTART
+} dbgcmd_state;
+
+typedef enum mrdb_exemode {
+  DBG_INIT,
+  DBG_RUN,
+  DBG_STEP,
+  DBG_NEXT,
+  DBG_QUIT,
+} mrdb_exemode;
+
+typedef enum mrdb_exephase {
+  DBG_PHASE_BEFORE_RUN,
+  DBG_PHASE_RUNNING,
+  DBG_PHASE_AFTER_RUN,
+  DBG_PHASE_RESTART,
+} mrdb_exephase;
+
+typedef enum mrdb_brkmode {
+  BRK_INIT,
+  BRK_BREAK,
+  BRK_STEP,
+  BRK_NEXT,
+  BRK_QUIT,
+} mrdb_brkmode;
+
+typedef enum {
+  MRB_DEBUG_BPTYPE_NONE,
+  MRB_DEBUG_BPTYPE_LINE,
+  MRB_DEBUG_BPTYPE_METHOD,
+} mrb_debug_bptype;
+
+struct mrb_irep;
+struct mrbc_context;
+struct mrb_debug_context;
+
+typedef struct mrb_debug_linepoint {
+  const char *file;
+  uint16_t lineno;
+} mrb_debug_linepoint;
+
+typedef struct mrb_debug_methodpoint {
+  const char *class_name;
+  const char *method_name;
+} mrb_debug_methodpoint;
+
+typedef struct mrb_debug_breakpoint {
+  uint32_t bpno;
+  uint8_t enable;
+  mrb_debug_bptype type;
+  union point {
+    mrb_debug_linepoint linepoint;
+    mrb_debug_methodpoint methodpoint;
+  } point;
+} mrb_debug_breakpoint;
+
+typedef struct mrb_debug_context {
+  struct mrb_irep *root_irep;
+  struct mrb_irep *irep;
+  mrb_code *pc;
+  mrb_value *regs;
+
+  const char *prvfile;
+  int32_t prvline;
+
+  mrdb_exemode xm;
+  mrdb_exephase xphase;
+  mrdb_brkmode bm;
+  int16_t bmi;
+
+  uint16_t ccnt;
+  uint16_t scnt;
+
+  mrb_debug_breakpoint bp[MAX_BREAKPOINT];
+  uint32_t bpnum;
+  int32_t next_bpno;
+  int32_t method_bpno;
+  int32_t stopped_bpno;
+  mrb_bool isCfunc;
+
+  mrdb_exemode (*break_hook)(mrb_state *mrb, struct mrb_debug_context *dbg);
+
+} mrb_debug_context;
+
+typedef struct mrdb_state {
+  char *command;
+  uint8_t wcnt;
+  uint8_t pi;
+  char *words[MAX_COMMAND_WORD];
+  const char *srcpath;
+  uint32_t print_no;
+
+  mrb_debug_context *dbg;
+} mrdb_state;
+
+typedef dbgcmd_state (*debug_command_func)(mrb_state*, mrdb_state*);
+
+/* cmdrun.c */
+dbgcmd_state dbgcmd_run(mrb_state*, mrdb_state*);
+dbgcmd_state dbgcmd_continue(mrb_state*, mrdb_state*);
+dbgcmd_state dbgcmd_step(mrb_state*, mrdb_state*);
+/* cmdbreak.c */
+dbgcmd_state dbgcmd_break(mrb_state*, mrdb_state*);
+dbgcmd_state dbgcmd_info_break(mrb_state*, mrdb_state*);
+dbgcmd_state dbgcmd_delete(mrb_state*, mrdb_state*);
+dbgcmd_state dbgcmd_enable(mrb_state*, mrdb_state*);
+dbgcmd_state dbgcmd_disable(mrb_state*, mrdb_state*);
+/* cmdprint.c */
+dbgcmd_state dbgcmd_print(mrb_state*, mrdb_state*);
+dbgcmd_state dbgcmd_eval(mrb_state*, mrdb_state*);
+/* cmdmisc.c */
+dbgcmd_state dbgcmd_list(mrb_state*, mrdb_state*);
+dbgcmd_state dbgcmd_help(mrb_state*, mrdb_state*);
+dbgcmd_state dbgcmd_quit(mrb_state*, mrdb_state*);
+
+#endif
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h	(revision 270)
@@ -0,0 +1,16 @@
+/*
+** mrdbconf.h - mruby debugger configuration
+**
+*/
+
+#ifndef MRDBCONF_H
+#define MRDBCONF_H
+
+/* configuration options: */
+/* maximum size for command buffer */
+#define MAX_COMMAND_LINE 1024
+
+/* maximum number of setable breakpoint */
+#define MAX_BREAKPOINT 5
+
+#endif
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/mrdberror.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/mrdberror.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-debugger/tools/mrdb/mrdberror.h	(revision 270)
@@ -0,0 +1,20 @@
+/*
+** mrdberror.h - mruby debugger error code
+**
+*/
+
+#ifndef MRDBERROR_H
+#define MRDBERROR_H
+
+#define MRB_DEBUG_OK                   (0)
+#define MRB_DEBUG_NOBUF                (-1)
+#define MRB_DEBUG_INVALID_ARGUMENT     (-2)
+
+#define MRB_DEBUG_BREAK_INVALID_LINENO (-11)
+#define MRB_DEBUG_BREAK_INVALID_FILE   (-12)
+#define MRB_DEBUG_BREAK_INVALID_NO     (-13)
+#define MRB_DEBUG_BREAK_NUM_OVER       (-14)
+#define MRB_DEBUG_BREAK_NO_OVER        (-15)
+
+#endif
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mirb/bintest/mirb.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mirb/bintest/mirb.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mirb/bintest/mirb.rb	(revision 270)
@@ -0,0 +1,12 @@
+require 'open3'
+
+assert('mirb normal operations') do
+  o, s = Open3.capture2('bin/mirb', :stdin_data => "a=1\nb=2\na+b\n")
+  assert_true o.include?('=> 3')
+  assert_true o.include?('=> 2')
+end
+
+assert('regression for #1563') do
+  o, s = Open3.capture2('bin/mirb', :stdin_data => "a=1;b=2;c=3\nb\nc")
+  assert_true o.include?('=> 3')
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mirb/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mirb/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mirb/mrbgem.rake	(revision 270)
@@ -0,0 +1,33 @@
+MRuby::Gem::Specification.new('mruby-bin-mirb') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'mirb command'
+
+  if spec.build.cc.search_header_path 'readline/readline.h'
+    spec.cc.defines << "ENABLE_READLINE"
+    if spec.build.cc.search_header_path 'termcap.h'
+      if MRUBY_BUILD_HOST_IS_CYGWIN || MRUBY_BUILD_HOST_IS_OPENBSD
+        if spec.build.cc.search_header_path 'termcap.h'
+          if MRUBY_BUILD_HOST_IS_CYGWIN then
+            spec.linker.libraries << 'ncurses'
+          else
+            spec.linker.libraries << 'termcap'
+          end
+        end
+      end
+    end
+    if RUBY_PLATFORM.include?('netbsd')
+      spec.linker.libraries << 'edit'
+    else
+      spec.linker.libraries << 'readline'
+      if spec.build.cc.search_header_path 'curses.h'
+        spec.linker.libraries << 'ncurses'
+      end
+    end
+  elsif spec.build.cc.search_header_path 'linenoise.h'
+    spec.cc.defines << "ENABLE_LINENOISE"
+  end
+
+  spec.bins = %w(mirb)
+  spec.add_dependency('mruby-compiler', :core => 'mruby-compiler')
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c	(revision 270)
@@ -0,0 +1,493 @@
+/*
+** mirb - Embeddable Interactive Ruby Shell
+**
+** This program takes code from the user in
+** an interactive way and executes it
+** immediately. It's a REPL...
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <ctype.h>
+
+#ifdef ENABLE_READLINE
+#include <readline/readline.h>
+#include <readline/history.h>
+#define MIRB_ADD_HISTORY(line) add_history(line)
+#define MIRB_READLINE(ch) readline(ch)
+#define MIRB_WRITE_HISTORY(path) write_history(path)
+#define MIRB_READ_HISTORY(path) read_history(path)
+#define MIRB_USING_HISTORY() using_history()
+#elif defined(ENABLE_LINENOISE)
+#define ENABLE_READLINE
+#include <linenoise.h>
+#define MIRB_ADD_HISTORY(line) linenoiseHistoryAdd(line)
+#define MIRB_READLINE(ch) linenoise(ch)
+#define MIRB_WRITE_HISTORY(path) linenoiseHistorySave(path)
+#define MIRB_READ_HISTORY(path) linenoiseHistoryLoad(history_path)
+#define MIRB_USING_HISTORY()
+#endif
+
+#include "mruby.h"
+#include "mruby/array.h"
+#include "mruby/proc.h"
+#include "mruby/compile.h"
+#include "mruby/string.h"
+
+#ifdef ENABLE_READLINE
+
+static const char history_file_name[] = ".mirb_history";
+
+static char *
+get_history_path(mrb_state *mrb)
+{
+  char *path = NULL;
+  const char *home = getenv("HOME");
+
+#ifdef _WIN32
+  if (home != NULL) {
+    home = getenv("USERPROFILE");
+  }
+#endif
+
+  if (home != NULL) {
+    int len = snprintf(NULL, 0, "%s/%s", home, history_file_name);
+    if (len >= 0) {
+      size_t size = len + 1;
+      path = (char *)mrb_malloc_simple(mrb, size);
+      if (path != NULL) {
+        int n = snprintf(path, size, "%s/%s", home, history_file_name);
+        if (n != len) {
+          mrb_free(mrb, path);
+          path = NULL;
+        }
+      }
+    }
+  }
+
+  return path;
+}
+
+#endif
+
+static void
+p(mrb_state *mrb, mrb_value obj, int prompt)
+{
+  mrb_value val;
+
+  val = mrb_funcall(mrb, obj, "inspect", 0);
+  if (prompt) {
+    if (!mrb->exc) {
+      fputs(" => ", stdout);
+    }
+    else {
+      val = mrb_funcall(mrb, mrb_obj_value(mrb->exc), "inspect", 0);
+    }
+  }
+  if (!mrb_string_p(val)) {
+    val = mrb_obj_as_string(mrb, obj);
+  }
+  fwrite(RSTRING_PTR(val), RSTRING_LEN(val), 1, stdout);
+  putc('\n', stdout);
+}
+
+/* Guess if the user might want to enter more
+ * or if he wants an evaluation of his code now */
+static mrb_bool
+is_code_block_open(struct mrb_parser_state *parser)
+{
+  mrb_bool code_block_open = FALSE;
+
+  /* check for heredoc */
+  if (parser->parsing_heredoc != NULL) return TRUE;
+  if (parser->heredoc_end_now) {
+    parser->heredoc_end_now = FALSE;
+    return FALSE;
+  }
+
+  /* check for unterminated string */
+  if (parser->lex_strterm) return TRUE;
+
+  /* check if parser error are available */
+  if (0 < parser->nerr) {
+    const char unexpected_end[] = "syntax error, unexpected $end";
+    const char *message = parser->error_buffer[0].message;
+
+    /* a parser error occur, we have to check if */
+    /* we need to read one more line or if there is */
+    /* a different issue which we have to show to */
+    /* the user */
+
+    if (strncmp(message, unexpected_end, sizeof(unexpected_end) - 1) == 0) {
+      code_block_open = TRUE;
+    }
+    else if (strcmp(message, "syntax error, unexpected keyword_end") == 0) {
+      code_block_open = FALSE;
+    }
+    else if (strcmp(message, "syntax error, unexpected tREGEXP_BEG") == 0) {
+      code_block_open = FALSE;
+    }
+    return code_block_open;
+  }
+
+  switch (parser->lstate) {
+
+  /* all states which need more code */
+
+  case EXPR_BEG:
+    /* beginning of a statement, */
+    /* that means previous line ended */
+    code_block_open = FALSE;
+    break;
+  case EXPR_DOT:
+    /* a message dot was the last token, */
+    /* there has to come more */
+    code_block_open = TRUE;
+    break;
+  case EXPR_CLASS:
+    /* a class keyword is not enough! */
+    /* we need also a name of the class */
+    code_block_open = TRUE;
+    break;
+  case EXPR_FNAME:
+    /* a method name is necessary */
+    code_block_open = TRUE;
+    break;
+  case EXPR_VALUE:
+    /* if, elsif, etc. without condition */
+    code_block_open = TRUE;
+    break;
+
+  /* now all the states which are closed */
+
+  case EXPR_ARG:
+    /* an argument is the last token */
+    code_block_open = FALSE;
+    break;
+
+  /* all states which are unsure */
+
+  case EXPR_CMDARG:
+    break;
+  case EXPR_END:
+    /* an expression was ended */
+    break;
+  case EXPR_ENDARG:
+    /* closing parenthese */
+    break;
+  case EXPR_ENDFN:
+    /* definition end */
+    break;
+  case EXPR_MID:
+    /* jump keyword like break, return, ... */
+    break;
+  case EXPR_MAX_STATE:
+    /* don't know what to do with this token */
+    break;
+  default:
+    /* this state is unexpected! */
+    break;
+  }
+
+  return code_block_open;
+}
+
+struct _args {
+  mrb_bool verbose      : 1;
+  int argc;
+  char** argv;
+};
+
+static void
+usage(const char *name)
+{
+  static const char *const usage_msg[] = {
+  "switches:",
+  "-v           print version number, then run in verbose mode",
+  "--verbose    run in verbose mode",
+  "--version    print the version",
+  "--copyright  print the copyright",
+  NULL
+  };
+  const char *const *p = usage_msg;
+
+  printf("Usage: %s [switches]\n", name);
+  while (*p)
+    printf("  %s\n", *p++);
+}
+
+static int
+parse_args(mrb_state *mrb, int argc, char **argv, struct _args *args)
+{
+  static const struct _args args_zero = { 0 };
+
+  *args = args_zero;
+
+  for (argc--,argv++; argc > 0; argc--,argv++) {
+    char *item;
+    if (argv[0][0] != '-') break;
+
+    item = argv[0] + 1;
+    switch (*item++) {
+    case 'v':
+      if (!args->verbose) mrb_show_version(mrb);
+      args->verbose = TRUE;
+      break;
+    case '-':
+      if (strcmp((*argv) + 2, "version") == 0) {
+        mrb_show_version(mrb);
+        exit(EXIT_SUCCESS);
+      }
+      else if (strcmp((*argv) + 2, "verbose") == 0) {
+        args->verbose = TRUE;
+        break;
+      }
+      else if (strcmp((*argv) + 2, "copyright") == 0) {
+        mrb_show_copyright(mrb);
+        exit(EXIT_SUCCESS);
+      }
+    default:
+      return EXIT_FAILURE;
+    }
+  }
+  return EXIT_SUCCESS;
+}
+
+static void
+cleanup(mrb_state *mrb, struct _args *args)
+{
+  mrb_close(mrb);
+}
+
+/* Print a short remark for the user */
+static void
+print_hint(void)
+{
+  printf("mirb - Embeddable Interactive Ruby Shell\n\n");
+}
+
+#ifndef ENABLE_READLINE
+/* Print the command line prompt of the REPL */
+static void
+print_cmdline(int code_block_open)
+{
+  if (code_block_open) {
+    printf("* ");
+  }
+  else {
+    printf("> ");
+  }
+  fflush(stdout);
+}
+#endif
+
+void mrb_codedump_all(mrb_state*, struct RProc*);
+
+static int
+check_keyword(const char *buf, const char *word)
+{
+  const char *p = buf;
+  size_t len = strlen(word);
+
+  /* skip preceding spaces */
+  while (*p && isspace((unsigned char)*p)) {
+    p++;
+  }
+  /* check keyword */
+  if (strncmp(p, word, len) != 0) {
+    return 0;
+  }
+  p += len;
+  /* skip trailing spaces */
+  while (*p) {
+    if (!isspace((unsigned char)*p)) return 0;
+    p++;
+  }
+  return 1;
+}
+
+int
+main(int argc, char **argv)
+{
+  char ruby_code[1024] = { 0 };
+  char last_code_line[1024] = { 0 };
+#ifndef ENABLE_READLINE
+  int last_char;
+  int char_index;
+#else
+  char *history_path;
+#endif
+  mrbc_context *cxt;
+  struct mrb_parser_state *parser;
+  mrb_state *mrb;
+  mrb_value result;
+  struct _args args;
+  int n;
+  mrb_bool code_block_open = FALSE;
+  int ai;
+  unsigned int stack_keep = 0;
+
+  /* new interpreter instance */
+  mrb = mrb_open();
+  if (mrb == NULL) {
+    fputs("Invalid mrb interpreter, exiting mirb\n", stderr);
+    return EXIT_FAILURE;
+  }
+  mrb_define_global_const(mrb, "ARGV", mrb_ary_new_capa(mrb, 0));
+
+  n = parse_args(mrb, argc, argv, &args);
+  if (n == EXIT_FAILURE) {
+    cleanup(mrb, &args);
+    usage(argv[0]);
+    return n;
+  }
+
+#ifdef ENABLE_READLINE
+  history_path = get_history_path(mrb);
+  if (history_path == NULL) {
+    fputs("failed to get history path\n", stderr);
+    mrb_close(mrb);
+    return EXIT_FAILURE;
+  }
+
+  MIRB_USING_HISTORY();
+  MIRB_READ_HISTORY(history_path);
+#endif
+
+  print_hint();
+
+  cxt = mrbc_context_new(mrb);
+  cxt->capture_errors = TRUE;
+  cxt->lineno = 1;
+  mrbc_filename(mrb, cxt, "(mirb)");
+  if (args.verbose) cxt->dump_result = TRUE;
+
+  ai = mrb_gc_arena_save(mrb);
+
+  while (TRUE) {
+    char *utf8;
+
+#ifndef ENABLE_READLINE
+    print_cmdline(code_block_open);
+
+    char_index = 0;
+    while ((last_char = getchar()) != '\n') {
+      if (last_char == EOF) break;
+      if (char_index > sizeof(last_code_line)-2) {
+        fputs("input string too long\n", stderr);
+        continue;
+      }
+      last_code_line[char_index++] = last_char;
+    }
+    if (last_char == EOF) {
+      fputs("\n", stdout);
+      break;
+    }
+
+    last_code_line[char_index++] = '\n';
+    last_code_line[char_index] = '\0';
+#else
+    char* line = MIRB_READLINE(code_block_open ? "* " : "> ");
+    if (line == NULL) {
+      printf("\n");
+      break;
+    }
+    if (strlen(line) > sizeof(last_code_line)-2) {
+      fputs("input string too long\n", stderr);
+      continue;
+    }
+    strcpy(last_code_line, line);
+    strcat(last_code_line, "\n");
+    MIRB_ADD_HISTORY(line);
+    free(line);
+#endif
+
+    if (code_block_open) {
+      if (strlen(ruby_code)+strlen(last_code_line) > sizeof(ruby_code)-1) {
+        fputs("concatenated input string too long\n", stderr);
+        continue;
+      }
+      strcat(ruby_code, last_code_line);
+    }
+    else {
+      if (check_keyword(last_code_line, "quit") || check_keyword(last_code_line, "exit")) {
+        break;
+      }
+      strcpy(ruby_code, last_code_line);
+    }
+
+    utf8 = mrb_utf8_from_locale(ruby_code, -1);
+    if (!utf8) abort();
+
+    /* parse code */
+    parser = mrb_parser_new(mrb);
+    if (parser == NULL) {
+      fputs("create parser state error\n", stderr);
+      break;
+    }
+    parser->s = utf8;
+    parser->send = utf8 + strlen(utf8);
+    parser->lineno = cxt->lineno;
+    mrb_parser_parse(parser, cxt);
+    code_block_open = is_code_block_open(parser);
+    mrb_utf8_free(utf8);
+
+    if (code_block_open) {
+      /* no evaluation of code */
+    }
+    else {
+      if (0 < parser->nerr) {
+        /* syntax error */
+        printf("line %d: %s\n", parser->error_buffer[0].lineno, parser->error_buffer[0].message);
+      }
+      else {
+        /* generate bytecode */
+        struct RProc *proc = mrb_generate_code(mrb, parser);
+        if (proc == NULL) {
+          fputs("codegen error\n", stderr);
+          mrb_parser_free(parser);
+          break;
+        }
+
+        if (args.verbose) {
+          mrb_codedump_all(mrb, proc);
+        }
+        /* pass a proc for evaulation */
+        /* evaluate the bytecode */
+        result = mrb_context_run(mrb,
+            proc,
+            mrb_top_self(mrb),
+            stack_keep);
+        stack_keep = proc->body.irep->nlocals;
+        /* did an exception occur? */
+        if (mrb->exc) {
+          p(mrb, mrb_obj_value(mrb->exc), 0);
+          mrb->exc = 0;
+        }
+        else {
+          /* no */
+          if (!mrb_respond_to(mrb, result, mrb_intern_lit(mrb, "inspect"))){
+            result = mrb_any_to_s(mrb, result);
+          }
+          p(mrb, result, 1);
+        }
+      }
+      ruby_code[0] = '\0';
+      last_code_line[0] = '\0';
+      mrb_gc_arena_restore(mrb, ai);
+    }
+    mrb_parser_free(parser);
+    cxt->lineno++;
+  }
+
+#ifdef ENABLE_READLINE
+  MIRB_WRITE_HISTORY(history_path);
+  mrb_free(mrb, history_path);
+#endif
+
+  mrbc_context_free(mrb, cxt);
+  mrb_close(mrb);
+
+  return 0;
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mrbc/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mrbc/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mrbc/mrbgem.rake	(revision 270)
@@ -0,0 +1,16 @@
+MRuby::Gem::Specification.new 'mruby-bin-mrbc' do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'mruby compiler executable'
+
+  spec.add_dependency 'mruby-compiler', :core => 'mruby-compiler'
+
+  exec = exefile("#{build.build_dir}/bin/mrbc")
+  mrbc_objs = Dir.glob("#{spec.dir}/tools/mrbc/*.c").map { |f| objfile(f.pathmap("#{spec.build_dir}/tools/mrbc/%n")) }.flatten
+
+  file exec => mrbc_objs + [libfile("#{build.build_dir}/lib/libmruby_core")] do |t|
+    build.linker.run t.name, t.prerequisites
+  end
+
+  build.bins << 'mrbc' unless build.bins.find { |v| v == 'mrbc' }
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c	(revision 270)
@@ -0,0 +1,336 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mruby.h"
+#include "mruby/compile.h"
+#include "mruby/dump.h"
+#include "mruby/proc.h"
+
+#define RITEBIN_EXT ".mrb"
+#define C_EXT       ".c"
+
+struct mrbc_args {
+  int argc;
+  char **argv;
+  int idx;
+  const char *prog;
+  const char *outfile;
+  const char *initname;
+  mrb_bool check_syntax : 1;
+  mrb_bool verbose      : 1;
+  unsigned int flags    : 4;
+};
+
+static void
+usage(const char *name)
+{
+  static const char *const usage_msg[] = {
+  "switches:",
+  "-c           check syntax only",
+  "-o<outfile>  place the output into <outfile>",
+  "-v           print version number, then turn on verbose mode",
+  "-g           produce debugging information",
+  "-B<symbol>   binary <symbol> output in C language format",
+  "-e           generate little endian iseq data",
+  "-E           generate big endian iseq data",
+  "--verbose    run at verbose mode",
+  "--version    print the version",
+  "--copyright  print the copyright",
+  NULL
+  };
+  const char *const *p = usage_msg;
+
+  printf("Usage: %s [switches] programfile\n", name);
+  while (*p)
+    printf("  %s\n", *p++);
+}
+
+static char *
+get_outfilename(mrb_state *mrb, char *infile, const char *ext)
+{
+  size_t infilelen;
+  size_t extlen;
+  char *outfile;
+  char *p;
+
+  infilelen = strlen(infile);
+  extlen = strlen(ext);
+  outfile = (char*)mrb_malloc(mrb, infilelen + extlen + 1);
+  memcpy(outfile, infile, infilelen + 1);
+  if (*ext) {
+    if ((p = strrchr(outfile, '.')) == NULL)
+      p = outfile + infilelen;
+    memcpy(p, ext, extlen + 1);
+  }
+
+  return outfile;
+}
+
+static int
+parse_args(mrb_state *mrb, int argc, char **argv, struct mrbc_args *args)
+{
+  char *outfile = NULL;
+  static const struct mrbc_args args_zero = { 0 };
+  int i;
+
+  *args = args_zero;
+  args->argc = argc;
+  args->argv = argv;
+  args->prog = argv[0];
+
+  for (i=1; i<argc; i++) {
+    if (argv[i][0] == '-') {
+      switch ((argv[i])[1]) {
+      case 'o':
+        if (args->outfile) {
+          fprintf(stderr, "%s: an output file is already specified. (%s)\n",
+                  args->prog, outfile);
+          return -1;
+        }
+        if (argv[i][2] == '\0' && argv[i+1]) {
+          i++;
+          args->outfile = get_outfilename(mrb, argv[i], "");
+        }
+        else {
+          args->outfile = get_outfilename(mrb, argv[i] + 2, "");
+        }
+        break;
+      case 'B':
+        if (argv[i][2] == '\0' && argv[i+1]) {
+          i++;
+          args->initname = argv[i];
+        }
+        else {
+          args->initname = argv[i]+2;
+        }
+        if (*args->initname == '\0') {
+          fprintf(stderr, "%s: function name is not specified.\n", args->prog);
+          return -1;
+        }
+        break;
+      case 'c':
+        args->check_syntax = TRUE;
+        break;
+      case 'v':
+        if (!args->verbose) mrb_show_version(mrb);
+        args->verbose = TRUE;
+        break;
+      case 'g':
+        args->flags |= DUMP_DEBUG_INFO;
+        break;
+      case 'E':
+        args->flags = DUMP_ENDIAN_BIG | (args->flags & ~DUMP_ENDIAN_MASK);
+        break;
+      case 'e':
+        args->flags = DUMP_ENDIAN_LIL | (args->flags & ~DUMP_ENDIAN_MASK);
+        break;
+      case 'h':
+        return -1;
+      case '-':
+        if (argv[i][1] == '\n') {
+          return i;
+        }
+        if (strcmp(argv[i] + 2, "version") == 0) {
+          mrb_show_version(mrb);
+          exit(EXIT_SUCCESS);
+        }
+        else if (strcmp(argv[i] + 2, "verbose") == 0) {
+          args->verbose = TRUE;
+          break;
+        }
+        else if (strcmp(argv[i] + 2, "copyright") == 0) {
+          mrb_show_copyright(mrb);
+          exit(EXIT_SUCCESS);
+        }
+        return -1;
+      default:
+        return i;
+      }
+    }
+    else {
+      break;
+    }
+  }
+  if (args->verbose && args->initname && (args->flags & DUMP_ENDIAN_MASK) == 0) {
+    fprintf(stderr, "%s: generating %s endian C file. specify -e/-E for cross compiling.\n",
+            args->prog, bigendian_p() ? "big" : "little");
+  }
+  return i;
+}
+
+static void
+cleanup(mrb_state *mrb, struct mrbc_args *args)
+{
+  mrb_free(mrb, (void*)args->outfile);
+  mrb_close(mrb);
+}
+
+static int
+partial_hook(struct mrb_parser_state *p)
+{
+  mrbc_context *c = p->cxt;
+  struct mrbc_args *args = (struct mrbc_args *)c->partial_data;
+  const char *fn;
+
+  if (p->f) fclose(p->f);
+  if (args->idx >= args->argc) {
+    p->f = NULL;
+    return -1;
+  }
+  fn = args->argv[args->idx++];
+  p->f = fopen(fn, "r");
+  if (p->f == NULL) {
+    fprintf(stderr, "%s: cannot open program file. (%s)\n", args->prog, fn);
+    return -1;
+  }
+  mrb_parser_set_filename(p, fn);
+  return 0;
+}
+
+static mrb_value
+load_file(mrb_state *mrb, struct mrbc_args *args)
+{
+  mrbc_context *c;
+  mrb_value result;
+  char *input = args->argv[args->idx];
+  FILE *infile;
+  mrb_bool need_close = FALSE;
+
+  c = mrbc_context_new(mrb);
+  if (args->verbose)
+    c->dump_result = TRUE;
+  c->no_exec = TRUE;
+  if (input[0] == '-' && input[1] == '\0') {
+    infile = stdin;
+  }
+  else {
+    need_close = TRUE;
+    if ((infile = fopen(input, "r")) == NULL) {
+      fprintf(stderr, "%s: cannot open program file. (%s)\n", args->prog, input);
+      return mrb_nil_value();
+    }
+  }
+  mrbc_filename(mrb, c, input);
+  args->idx++;
+  if (args->idx < args->argc) {
+    need_close = FALSE;
+    mrbc_partial_hook(mrb, c, partial_hook, (void*)args);
+  }
+
+  result = mrb_load_file_cxt(mrb, infile, c);
+  if (need_close) fclose(infile);
+  mrbc_context_free(mrb, c);
+  if (mrb_undef_p(result)) {
+    return mrb_nil_value();
+  }
+  return result;
+}
+
+static int
+dump_file(mrb_state *mrb, FILE *wfp, const char *outfile, struct RProc *proc, struct mrbc_args *args)
+{
+  int n = MRB_DUMP_OK;
+  mrb_irep *irep = proc->body.irep;
+
+  if (args->initname) {
+    n = mrb_dump_irep_cfunc(mrb, irep, args->flags, wfp, args->initname);
+    if (n == MRB_DUMP_INVALID_ARGUMENT) {
+      fprintf(stderr, "%s: invalid C language symbol name\n", args->initname);
+    }
+  }
+  else {
+    n = mrb_dump_irep_binary(mrb, irep, args->flags, wfp);
+  }
+  if (n != MRB_DUMP_OK) {
+    fprintf(stderr, "%s: error in mrb dump (%s) %d\n", args->prog, outfile, n);
+  }
+  return n;
+}
+
+int
+main(int argc, char **argv)
+{
+  mrb_state *mrb = mrb_open();
+  int n, result;
+  struct mrbc_args args;
+  FILE *wfp;
+  mrb_value load;
+
+  if (mrb == NULL) {
+    fputs("Invalid mrb_state, exiting mrbc\n", stderr);
+    return EXIT_FAILURE;
+  }
+
+  n = parse_args(mrb, argc, argv, &args);
+  if (n < 0) {
+    cleanup(mrb, &args);
+    usage(argv[0]);
+    return EXIT_FAILURE;
+  }
+  if (n == argc) {
+    fprintf(stderr, "%s: no program file given\n", args.prog);
+    return EXIT_FAILURE;
+  }
+  if (args.outfile == NULL && !args.check_syntax) {
+    if (n + 1 == argc) {
+      args.outfile = get_outfilename(mrb, argv[n], args.initname ? C_EXT : RITEBIN_EXT);
+    }
+    else {
+      fprintf(stderr, "%s: output file should be specified to compile multiple files\n", args.prog);
+      return EXIT_FAILURE;
+    }
+  }
+
+  args.idx = n;
+  load = load_file(mrb, &args);
+  if (mrb_nil_p(load)) {
+    cleanup(mrb, &args);
+    return EXIT_FAILURE;
+  }
+  if (args.check_syntax) {
+    printf("%s:%s:Syntax OK\n", args.prog, argv[n]);
+  }
+
+  if (args.check_syntax) {
+    cleanup(mrb, &args);
+    return EXIT_SUCCESS;
+  }
+
+  if (args.outfile) {
+    if (strcmp("-", args.outfile) == 0) {
+      wfp = stdout;
+    }
+    else if ((wfp = fopen(args.outfile, "wb")) == NULL) {
+      fprintf(stderr, "%s: cannot open output file:(%s)\n", args.prog, args.outfile);
+      return EXIT_FAILURE;
+    }
+  }
+  else {
+    fprintf(stderr, "Output file is required\n");
+    return EXIT_FAILURE;
+  }
+  result = dump_file(mrb, wfp, args.outfile, mrb_proc_ptr(load), &args);
+  fclose(wfp);
+  cleanup(mrb, &args);
+  if (result != MRB_DUMP_OK) {
+    return EXIT_FAILURE;
+  }
+  return EXIT_SUCCESS;
+}
+
+void
+mrb_init_mrblib(mrb_state *mrb)
+{
+}
+
+#ifndef DISABLE_GEMS
+void
+mrb_init_mrbgems(mrb_state *mrb)
+{
+}
+
+void
+mrb_final_mrbgems(mrb_state *mrb)
+{
+}
+#endif
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mruby-config/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mruby-config/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mruby-config/mrbgem.rake	(revision 270)
@@ -0,0 +1,30 @@
+module MRuby
+  class Build
+    def exefile(name)
+      if name.is_a?(Array)
+        name.flatten.map { |n| exefile(n) }
+      elsif name !~ /\./
+        "#{name}#{exts.executable}"
+      else
+        name
+      end
+    end
+  end
+end
+
+MRuby.each_target do
+  next if kind_of? MRuby::CrossBuild
+
+  mruby_config = 'mruby-config' + (ENV['OS'] == 'Windows_NT' ? '.bat' : '')
+  mruby_config_path = "#{build_dir}/bin/#{mruby_config}"
+  @bins << mruby_config
+
+  file mruby_config_path => libfile("#{build_dir}/lib/libmruby") do |t|
+    FileUtils.copy "#{File.dirname(__FILE__)}/#{mruby_config}", t.name
+    config = Hash[open("#{build_dir}/lib/libmruby.flags.mak").read.split("\n").map {|x| a = x.split(/\s*=\s*/, 2); [a[0], a[1].gsub('\\"', '"') ]}]
+    IO.write(t.name, File.open(t.name) {|f|
+      f.read.gsub (/echo (MRUBY_CFLAGS|MRUBY_LIBS|MRUBY_LDFLAGS_BEFORE_LIBS|MRUBY_LDFLAGS)/) {|x| config[$1].empty? ? '' : "echo #{config[$1]}"}
+    })
+    FileUtils.chmod(0755, t.name)
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mruby-config/mruby-config
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mruby-config/mruby-config	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mruby-config/mruby-config	(revision 270)
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+while [ $# -gt 0 ]; do
+  case $1 in
+    --cflags) echo MRUBY_CFLAGS;;
+    --ldflags) echo MRUBY_LDFLAGS;;
+    --ldflags-before-libs) echo MRUBY_LDFLAGS_BEFORE_LIBS;;
+    --libs) echo MRUBY_LIBS;;
+    --help) echo "Usage: mruby-config [switches]"
+            echo "  switches:"
+            echo "  --cflags                    print flags passed to compiler"
+            echo "  --ldflags                   print flags passed to linker"
+            echo "  --ldflags-before-libs       print flags passwd to linker before linked libraries"
+            echo "  --libs                      print linked libraries"
+            exit 0;;
+  esac
+  shift
+done
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mruby-config/mruby-config.bat
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mruby-config/mruby-config.bat	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mruby-config/mruby-config.bat	(revision 270)
@@ -0,0 +1,36 @@
+@echo off
+
+:top
+shift
+if "%0" equ "" goto :eof
+if "%0" equ "--cflags" goto cflags
+if "%0" equ "--ldflags" goto ldflags
+if "%0" equ "--ldflags-before-libs" goto ldflagsbeforelibs
+if "%0" equ "--libs" goto libs
+if "%0" equ "--help" goto showhelp
+echo Invalid Option
+goto :eof
+
+:cflags
+echo MRUBY_CFLAGS
+goto top
+
+:libs
+echo MRUBY_LIBS
+goto top
+
+:ldflags
+echo MRUBY_LDFLAGS
+goto top
+
+:ldflagsbeforelibs
+echo MRUBY_LDFLAGS_BEFORE_LIBS
+goto top
+
+:showhelp
+echo Usage: mruby-config [switches]
+echo   switches:
+echo   --cflags                   print flags passed to compiler
+echo   --ldflags                  print flags passed to linker
+echo   --ldflags-before-libs      print flags passwd to linker before linked libraries
+echo   --libs                     print linked libraries
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mruby/bintest/mruby.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mruby/bintest/mruby.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mruby/bintest/mruby.rb	(revision 270)
@@ -0,0 +1,46 @@
+require 'tempfile'
+
+assert('regression for #1564') do
+  o = `#{cmd('mruby')} -e #{shellquote('<<')} 2>&1`
+  assert_equal o, "-e:1:2: syntax error, unexpected tLSHFT\n"
+  o = `#{cmd('mruby')} -e #{shellquote('<<-')} 2>&1`
+  assert_equal o, "-e:1:3: syntax error, unexpected tLSHFT\n"
+end
+
+assert('regression for #1572') do
+  script, bin = Tempfile.new('test.rb'), Tempfile.new('test.mrb')
+  File.write script.path, 'p "ok"'
+  system "#{cmd('mrbc')} -g -o #{bin.path} #{script.path}"
+  o = `#{cmd('mruby')} -b #{bin.path}`.strip
+  assert_equal o, '"ok"'
+end
+
+assert '$0 value' do
+  script, bin = Tempfile.new('test.rb'), Tempfile.new('test.mrb')
+
+  # .rb script
+  script.write "p $0\n"
+  script.flush
+  assert_equal "\"#{script.path}\"", `#{cmd('mruby')} "#{script.path}"`.chomp
+
+  # .mrb file
+  `#{cmd('mrbc')} -o "#{bin.path}" "#{script.path}"`
+  assert_equal "\"#{bin.path}\"", `#{cmd('mruby')} -b "#{bin.path}"`.chomp
+
+  # one liner
+  assert_equal '"-e"', `#{cmd('mruby')} -e #{shellquote('p $0')}`.chomp
+end
+
+assert '__END__', '8.6' do
+  script = Tempfile.new('test.rb')
+
+  script.write <<EOS
+p 'test'
+  __END__ = 'fin'
+p __END__
+__END__
+p 'legend'
+EOS
+  script.flush
+  assert_equal "\"test\"\n\"fin\"\n", `#{cmd('mruby')} #{script.path}`
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mruby/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mruby/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mruby/mrbgem.rake	(revision 270)
@@ -0,0 +1,7 @@
+MRuby::Gem::Specification.new('mruby-bin-mruby') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'mruby command'
+  spec.bins = %w(mruby)
+  spec.add_dependency('mruby-compiler', :core => 'mruby-compiler')
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c	(revision 270)
@@ -0,0 +1,248 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mruby.h"
+#include "mruby/array.h"
+#include "mruby/compile.h"
+#include "mruby/dump.h"
+#include "mruby/variable.h"
+
+#ifdef MRB_DISABLE_STDIO
+static void
+p(mrb_state *mrb, mrb_value obj)
+{
+  mrb_value val = mrb_inspect(mrb, obj);
+
+  fwrite(RSTRING_PTR(val), RSTRING_LEN(val), 1, stdout);
+  putc('\n', stdout);
+}
+#else
+#define p(mrb,obj) mrb_p(mrb,obj)
+#endif
+
+struct _args {
+  FILE *rfp;
+  char* cmdline;
+  mrb_bool fname        : 1;
+  mrb_bool mrbfile      : 1;
+  mrb_bool check_syntax : 1;
+  mrb_bool verbose      : 1;
+  int argc;
+  char** argv;
+};
+
+static void
+usage(const char *name)
+{
+  static const char *const usage_msg[] = {
+  "switches:",
+  "-b           load and execute RiteBinary (mrb) file",
+  "-c           check syntax only",
+  "-e 'command' one line of script",
+  "-v           print version number, then run in verbose mode",
+  "--verbose    run in verbose mode",
+  "--version    print the version",
+  "--copyright  print the copyright",
+  NULL
+  };
+  const char *const *p = usage_msg;
+
+  printf("Usage: %s [switches] programfile\n", name);
+  while (*p)
+    printf("  %s\n", *p++);
+}
+
+static int
+parse_args(mrb_state *mrb, int argc, char **argv, struct _args *args)
+{
+  char **origargv = argv;
+  static const struct _args args_zero = { 0 };
+
+  *args = args_zero;
+
+  for (argc--,argv++; argc > 0; argc--,argv++) {
+    char *item;
+    if (argv[0][0] != '-') break;
+
+    if (strlen(*argv) <= 1) {
+      argc--; argv++;
+      args->rfp = stdin;
+      break;
+    }
+
+    item = argv[0] + 1;
+    switch (*item++) {
+    case 'b':
+      args->mrbfile = TRUE;
+      break;
+    case 'c':
+      args->check_syntax = TRUE;
+      break;
+    case 'e':
+      if (item[0]) {
+        goto append_cmdline;
+      }
+      else if (argc > 1) {
+        argc--; argv++;
+        item = argv[0];
+append_cmdline:
+        if (!args->cmdline) {
+          size_t buflen;
+          char *buf;
+
+          buflen = strlen(item) + 1;
+          buf = (char *)mrb_malloc(mrb, buflen);
+          memcpy(buf, item, buflen);
+          args->cmdline = buf;
+        }
+        else {
+          size_t cmdlinelen;
+          size_t itemlen;
+
+          cmdlinelen = strlen(args->cmdline);
+          itemlen = strlen(item);
+          args->cmdline =
+            (char *)mrb_realloc(mrb, args->cmdline, cmdlinelen + itemlen + 2);
+          args->cmdline[cmdlinelen] = '\n';
+          memcpy(args->cmdline + cmdlinelen + 1, item, itemlen + 1);
+        }
+      }
+      else {
+        printf("%s: No code specified for -e\n", *origargv);
+        return EXIT_SUCCESS;
+      }
+      break;
+    case 'v':
+      if (!args->verbose) mrb_show_version(mrb);
+      args->verbose = TRUE;
+      break;
+    case '-':
+      if (strcmp((*argv) + 2, "version") == 0) {
+        mrb_show_version(mrb);
+        exit(EXIT_SUCCESS);
+      }
+      else if (strcmp((*argv) + 2, "verbose") == 0) {
+        args->verbose = TRUE;
+        break;
+      }
+      else if (strcmp((*argv) + 2, "copyright") == 0) {
+        mrb_show_copyright(mrb);
+        exit(EXIT_SUCCESS);
+      }
+    default:
+      return EXIT_FAILURE;
+    }
+  }
+
+  if (args->rfp == NULL && args->cmdline == NULL) {
+    if (*argv == NULL) args->rfp = stdin;
+    else {
+      args->rfp = fopen(argv[0], args->mrbfile ? "rb" : "r");
+      if (args->rfp == NULL) {
+        printf("%s: Cannot open program file. (%s)\n", *origargv, *argv);
+        return EXIT_FAILURE;
+      }
+      args->fname = TRUE;
+      args->cmdline = argv[0];
+      argc--; argv++;
+    }
+  }
+  args->argv = (char **)mrb_realloc(mrb, args->argv, sizeof(char*) * (argc + 1));
+  memcpy(args->argv, argv, (argc+1) * sizeof(char*));
+  args->argc = argc;
+
+  return EXIT_SUCCESS;
+}
+
+static void
+cleanup(mrb_state *mrb, struct _args *args)
+{
+  if (args->rfp && args->rfp != stdin)
+    fclose(args->rfp);
+  if (!args->fname)
+    mrb_free(mrb, args->cmdline);
+  mrb_free(mrb, args->argv);
+  mrb_close(mrb);
+}
+
+int
+main(int argc, char **argv)
+{
+  mrb_state *mrb = mrb_open();
+  int n = -1;
+  int i;
+  struct _args args;
+  mrb_value ARGV;
+  mrbc_context *c;
+  mrb_value v;
+  mrb_sym zero_sym;
+
+  if (mrb == NULL) {
+    fputs("Invalid mrb_state, exiting mruby\n", stderr);
+    return EXIT_FAILURE;
+  }
+
+  n = parse_args(mrb, argc, argv, &args);
+  if (n == EXIT_FAILURE || (args.cmdline == NULL && args.rfp == NULL)) {
+    cleanup(mrb, &args);
+    usage(argv[0]);
+    return n;
+  }
+
+  ARGV = mrb_ary_new_capa(mrb, args.argc);
+  for (i = 0; i < args.argc; i++) {
+    char* utf8 = mrb_utf8_from_locale(args.argv[i], -1);
+    if (utf8) {
+      mrb_ary_push(mrb, ARGV, mrb_str_new_cstr(mrb, utf8));
+      mrb_utf8_free(utf8);
+    }
+  }
+  mrb_define_global_const(mrb, "ARGV", ARGV);
+
+  c = mrbc_context_new(mrb);
+  if (args.verbose)
+    c->dump_result = TRUE;
+  if (args.check_syntax)
+    c->no_exec = TRUE;
+
+  /* Set $0 */
+  zero_sym = mrb_intern_lit(mrb, "$0");
+  if (args.rfp) {
+    const char *cmdline;
+    cmdline = args.cmdline ? args.cmdline : "-";
+    mrbc_filename(mrb, c, cmdline);
+    mrb_gv_set(mrb, zero_sym, mrb_str_new_cstr(mrb, cmdline));
+  }
+  else {
+    mrbc_filename(mrb, c, "-e");
+    mrb_gv_set(mrb, zero_sym, mrb_str_new_lit(mrb, "-e"));
+  }
+
+  /* Load program */
+  if (args.mrbfile) {
+    v = mrb_load_irep_file_cxt(mrb, args.rfp, c);
+  }
+  else if (args.rfp) {
+    v = mrb_load_file_cxt(mrb, args.rfp, c);
+  }
+  else {
+    char* utf8 = mrb_utf8_from_locale(args.cmdline, -1);
+    if (!utf8) abort();
+    v = mrb_load_string_cxt(mrb, utf8, c);
+    mrb_utf8_free(utf8);
+  }
+
+  mrbc_context_free(mrb, c);
+  if (mrb->exc) {
+    if (!mrb_undef_p(v)) {
+      mrb_print_error(mrb);
+    }
+    n = -1;
+  }
+  else if (args.check_syntax) {
+    printf("Syntax OK\n");
+  }
+  cleanup(mrb, &args);
+
+  return n == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-strip/bintest/mruby-strip.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-strip/bintest/mruby-strip.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-strip/bintest/mruby-strip.rb	(revision 270)
@@ -0,0 +1,73 @@
+require 'tempfile'
+
+assert('no files') do
+  o = `#{cmd('mruby-strip')} 2>&1`
+  assert_equal 1, $?.exitstatus
+  assert_equal "no files to strip", o.split("\n")[0]
+end
+
+assert('file not found') do
+  o = `#{cmd('mruby-strip')} not_found.mrb 2>&1`
+  assert_equal 1, $?.exitstatus
+  assert_equal "can't open file for reading not_found.mrb\n", o
+end
+
+assert('not irep file') do
+  t = Tempfile.new('script.rb')
+  t.write 'p test\n'
+  t.flush
+  o = `#{cmd('mruby-strip')} #{t.path} 2>&1`
+  assert_equal 1, $?.exitstatus
+  assert_equal "can't read irep file #{t.path}\n", o
+end
+
+assert('success') do
+  script_file, compiled1, compiled2 =
+    Tempfile.new('script.rb'), Tempfile.new('c1.mrb'), Tempfile.new('c2.mrb')
+  script_file.write "p 'test'\n"
+  script_file.flush
+  `#{cmd('mrbc')} -g -o #{compiled1.path} #{script_file.path}`
+  `#{cmd('mrbc')} -g -o #{compiled2.path} #{script_file.path}`
+
+  o = `#{cmd('mruby-strip')} #{compiled1.path}`
+  assert_equal 0, $?.exitstatus
+  assert_equal "", o
+  assert_equal `#{cmd('mruby')} #{script_file.path}`, `#{cmd('mruby')} -b #{compiled1.path}`
+
+  o = `#{cmd('mruby-strip')} #{compiled1.path} #{compiled2.path}`
+  assert_equal 0, $?.exitstatus
+  assert_equal "", o
+end
+
+assert('check debug section') do
+  script_file, with_debug, without_debug =
+    Tempfile.new('script.rb'), Tempfile.new('c1.mrb'), Tempfile.new('c2.mrb')
+  script_file.write "p 'test'\n"
+  script_file.flush
+  `#{cmd('mrbc')} -o #{without_debug.path} #{script_file.path}`
+  `#{cmd('mrbc')} -g -o #{with_debug.path} #{script_file.path}`
+
+  assert_true with_debug.size >= without_debug.size
+
+  `#{cmd('mruby-strip')} #{with_debug.path}`
+  assert_equal without_debug.size, with_debug.size
+end
+
+assert('check lv section') do
+  script_file, with_lv, without_lv =
+    Tempfile.new('script.rb'), Tempfile.new('c1.mrb'), Tempfile.new('c2.mrb')
+  script_file.write <<EOS
+a, b = 0, 1
+a += b
+p Kernel.local_variables
+EOS
+  script_file.flush
+  `#{cmd('mrbc')} -o #{with_lv.path} #{script_file.path}`
+  `#{cmd('mrbc')} -o #{without_lv.path} #{script_file.path}`
+
+  `#{cmd('mruby-strip')} -l #{without_lv.path}`
+  assert_true without_lv.size < with_lv.size
+
+  assert_equal '[:a, :b]', `#{cmd('mruby')} -b #{with_lv.path}`.chomp
+  assert_equal '[]', `#{cmd('mruby')} -b #{without_lv.path}`.chomp
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-strip/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-strip/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-strip/mrbgem.rake	(revision 270)
@@ -0,0 +1,6 @@
+MRuby::Gem::Specification.new('mruby-bin-strip') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'irep dump debug section remover command'
+  spec.bins = %w(mruby-strip)
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-strip/tools/mruby-strip/mruby-strip.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-strip/tools/mruby-strip/mruby-strip.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-bin-strip/tools/mruby-strip/mruby-strip.c	(revision 270)
@@ -0,0 +1,155 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mruby.h"
+#include "mruby/irep.h"
+#include "mruby/dump.h"
+
+struct strip_args {
+  int argc_start;
+  int argc;
+  char **argv;
+  mrb_bool lvar;
+};
+
+
+static void
+irep_remove_lv(mrb_state *mrb, mrb_irep *irep)
+{
+  size_t i;
+
+  if (irep->lv) {
+    mrb_free(mrb, irep->lv);
+    irep->lv = NULL;
+  }
+
+  for (i = 0; i < irep->rlen; ++i) {
+    irep_remove_lv(mrb, irep->reps[i]);
+  }
+}
+
+static void
+print_usage(const char *f)
+{
+  printf("Usage: %s [switches] irepfiles\n", f);
+  printf("switches:\n");
+  printf("  -l, --lvar   remove LVAR section too.\n");
+}
+
+static int
+parse_args(int argc, char **argv, struct strip_args *args)
+{
+  int i;
+
+  args->argc_start = 0;
+  args->argc = argc;
+  args->argv = argv;
+  args->lvar = FALSE;
+
+  for (i = 1; i < argc; ++i) {
+    const size_t len = strlen(argv[i]);
+    if (len >= 2 && argv[i][0] == '-') {
+      switch (argv[i][1]) {
+      case 'l':
+        args->lvar = TRUE;
+        break;
+      case '-':
+        if (strncmp((*argv) + 2, "lvar", len) == 0) {
+          args->lvar = TRUE;
+          break;
+        }
+      default:
+        return -1;
+      }
+    }
+    else {
+      break;
+    }
+  }
+
+  args->argc_start = i;
+  return i;
+}
+
+static int
+strip(mrb_state *mrb, struct strip_args *args)
+{
+  int i;
+
+  for (i = args->argc_start; i < args->argc; ++i) {
+    char *filename;
+    FILE *rfile;
+    mrb_irep *irep;
+    FILE *wfile;
+    int dump_result;
+
+    filename = args->argv[i];
+    rfile = fopen(filename, "rb");
+    if (rfile == NULL) {
+      fprintf(stderr, "can't open file for reading %s\n", filename);
+      return EXIT_FAILURE;
+    }
+
+    irep = mrb_read_irep_file(mrb, rfile);
+    fclose(rfile);
+    if (irep == NULL) {
+      fprintf(stderr, "can't read irep file %s\n", filename);
+      return EXIT_FAILURE;
+    }
+
+    /* clear lv if --lvar is enabled */
+    if (args->lvar) {
+      irep_remove_lv(mrb, irep);
+    }
+
+    wfile = fopen(filename, "wb");
+    if (wfile == NULL) {
+      fprintf(stderr, "can't open file for writing %s\n", filename);
+      mrb_irep_decref(mrb, irep);
+      return EXIT_FAILURE;
+    }
+
+    /* debug flag must always be false */
+    dump_result = mrb_dump_irep_binary(mrb, irep, FALSE, wfile);
+
+    fclose(wfile);
+    mrb_irep_decref(mrb, irep);
+
+    if (dump_result != MRB_DUMP_OK) {
+      fprintf(stderr, "error occurred during dumping %s\n", filename);
+      return EXIT_FAILURE;
+    }
+  }
+  return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char **argv)
+{
+  struct strip_args args;
+  int args_result;
+  mrb_state *mrb;
+  int ret;
+
+  if (argc <= 1) {
+    printf("no files to strip\n");
+    print_usage(argv[0]);
+    return EXIT_FAILURE;
+  }
+
+  args_result = parse_args(argc, argv, &args);
+  if (args_result < 0) {
+    print_usage(argv[0]);
+    return EXIT_FAILURE;
+  }
+  mrb = mrb_open_core(mrb_default_allocf, NULL);
+  if (mrb == NULL) {
+    fputs("Invalid mrb_state, exiting mruby-strip\n", stderr);
+    return EXIT_FAILURE;
+  }
+
+  ret = strip(mrb, &args);
+
+  mrb_close(mrb);
+  return ret;
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/bintest/mrbc.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/bintest/mrbc.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/bintest/mrbc.rb	(revision 270)
@@ -0,0 +1,12 @@
+require 'tempfile'
+
+assert('Compiling multiple files without new line in last line. #2361') do
+  a, b, out = Tempfile.new('a.rb'), Tempfile.new('b.rb'), Tempfile.new('out.mrb')
+  a.write('module A; end')
+  a.flush
+  b.write('module B; end')
+  b.flush
+  result = `#{cmd('mrbc')} -c -o #{out.path} #{a.path} #{b.path} 2>&1`
+  assert_equal "#{cmd('mrbc')}:#{a.path}:Syntax OK", result.chomp
+  assert_equal 0, $?.exitstatus
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/core/codegen.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/core/codegen.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/core/codegen.c	(revision 270)
@@ -0,0 +1,2767 @@
+/*
+** codegen.c - mruby code generator
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include <ctype.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mruby.h"
+#include "mruby/compile.h"
+#include "mruby/proc.h"
+#include "mruby/numeric.h"
+#include "mruby/string.h"
+#include "mruby/debug.h"
+#include "node.h"
+#include "mruby/opcode.h"
+#include "mruby/re.h"
+#include "mruby/throw.h"
+
+typedef mrb_ast_node node;
+typedef struct mrb_parser_state parser_state;
+
+enum looptype {
+  LOOP_NORMAL,
+  LOOP_BLOCK,
+  LOOP_FOR,
+  LOOP_BEGIN,
+  LOOP_RESCUE,
+};
+
+struct loopinfo {
+  enum looptype type;
+  int pc1, pc2, pc3, acc;
+  int ensure_level;
+  struct loopinfo *prev;
+};
+
+typedef struct scope {
+  mrb_state *mrb;
+  mrb_pool *mpool;
+  struct mrb_jmpbuf jmp;
+
+  struct scope *prev;
+
+  node *lv;
+
+  int sp;
+  int pc;
+  int lastlabel;
+  int ainfo:15;
+  mrb_bool mscope:1;
+
+  struct loopinfo *loop;
+  int ensure_level;
+  char const *filename;
+  uint16_t lineno;
+
+  mrb_code *iseq;
+  uint16_t *lines;
+  int icapa;
+
+  mrb_irep *irep;
+  size_t pcapa;
+  size_t scapa;
+  size_t rcapa;
+
+  uint16_t nlocals;
+  uint16_t nregs;
+  int ai;
+
+  int debug_start_pos;
+  uint16_t filename_index;
+  parser_state* parser;
+} codegen_scope;
+
+static codegen_scope* scope_new(mrb_state *mrb, codegen_scope *prev, node *lv);
+static void scope_finish(codegen_scope *s);
+static struct loopinfo *loop_push(codegen_scope *s, enum looptype t);
+static void loop_break(codegen_scope *s, node *tree);
+static void loop_pop(codegen_scope *s, int val);
+
+static void gen_assignment(codegen_scope *s, node *tree, int sp, int val);
+static void gen_vmassignment(codegen_scope *s, node *tree, int rhs, int val);
+
+static void codegen(codegen_scope *s, node *tree, int val);
+static void raise_error(codegen_scope *s, const char *msg);
+
+static void
+codegen_error(codegen_scope *s, const char *message)
+{
+  if (!s) return;
+  while (s->prev) {
+    codegen_scope *tmp = s->prev;
+    mrb_pool_close(s->mpool);
+    s = tmp;
+  }
+#ifndef MBB_DISABLE_STDIO
+  if (s->filename && s->lineno) {
+    fprintf(stderr, "codegen error:%s:%d: %s\n", s->filename, s->lineno, message);
+  }
+  else {
+    fprintf(stderr, "codegen error: %s\n", message);
+  }
+#endif
+  MRB_THROW(&s->jmp);
+}
+
+static void*
+codegen_palloc(codegen_scope *s, size_t len)
+{
+  void *p = mrb_pool_alloc(s->mpool, len);
+
+  if (!p) codegen_error(s, "pool memory allocation");
+  return p;
+}
+
+static void*
+codegen_malloc(codegen_scope *s, size_t len)
+{
+  void *p = mrb_malloc_simple(s->mrb, len);
+
+  if (!p) codegen_error(s, "mrb_malloc");
+  return p;
+}
+
+static void*
+codegen_realloc(codegen_scope *s, void *p, size_t len)
+{
+  p = mrb_realloc_simple(s->mrb, p, len);
+
+  if (!p && len > 0) codegen_error(s, "mrb_realloc");
+  return p;
+}
+
+static int
+new_label(codegen_scope *s)
+{
+  s->lastlabel = s->pc;
+  return s->pc;
+}
+
+static inline int
+genop(codegen_scope *s, mrb_code i)
+{
+  if (s->pc == s->icapa) {
+    s->icapa *= 2;
+    s->iseq = (mrb_code *)codegen_realloc(s, s->iseq, sizeof(mrb_code)*s->icapa);
+    if (s->lines) {
+      s->lines = (uint16_t*)codegen_realloc(s, s->lines, sizeof(short)*s->icapa);
+      s->irep->lines = s->lines;
+    }
+  }
+  s->iseq[s->pc] = i;
+  if (s->lines) {
+    s->lines[s->pc] = s->lineno;
+  }
+  return s->pc++;
+}
+
+#define NOVAL  0
+#define VAL    1
+
+static mrb_bool
+no_optimize(codegen_scope *s)
+{
+  if (s && s->parser && s->parser->no_optimize)
+    return TRUE;
+  return FALSE;
+}
+
+static int
+genop_peep(codegen_scope *s, mrb_code i, int val)
+{
+  /* peephole optimization */
+  if (!no_optimize(s) && s->lastlabel != s->pc && s->pc > 0) {
+    mrb_code i0 = s->iseq[s->pc-1];
+    int c1 = GET_OPCODE(i);
+    int c0 = GET_OPCODE(i0);
+
+    switch (c1) {
+    case OP_MOVE:
+      if (GETARG_A(i) == GETARG_B(i)) {
+        /* skip useless OP_MOVE */
+        return 0;
+      }
+      if (val) break;
+      switch (c0) {
+      case OP_MOVE:
+        if (GETARG_A(i) == GETARG_A(i0)) {
+          /* skip overriden OP_MOVE */
+          s->pc--;
+          s->iseq[s->pc] = i;
+        }
+        if (GETARG_B(i) == GETARG_A(i0) && GETARG_A(i) == GETARG_B(i0)) {
+          /* skip swapping OP_MOVE */
+          return 0;
+        }
+        if (GETARG_B(i) == GETARG_A(i0) && GETARG_A(i0) >= s->nlocals) {
+          s->pc--;
+          return genop_peep(s, MKOP_AB(OP_MOVE, GETARG_A(i), GETARG_B(i0)), val);
+        }
+        break;
+      case OP_LOADI:
+        if (GETARG_B(i) == GETARG_A(i0) && GETARG_A(i0) >= s->nlocals) {
+          s->iseq[s->pc-1] = MKOP_AsBx(OP_LOADI, GETARG_A(i), GETARG_sBx(i0));
+          return 0;
+        }
+        break;
+      case OP_ARRAY:
+      case OP_HASH:
+      case OP_RANGE:
+      case OP_AREF:
+      case OP_GETUPVAR:
+        if (GETARG_B(i) == GETARG_A(i0) && GETARG_A(i0) >= s->nlocals) {
+          s->iseq[s->pc-1] = MKOP_ABC(c0, GETARG_A(i), GETARG_B(i0), GETARG_C(i0));
+          return 0;
+        }
+        break;
+      case OP_LOADSYM:
+      case OP_GETGLOBAL:
+      case OP_GETIV:
+      case OP_GETCV:
+      case OP_GETCONST:
+      case OP_GETSPECIAL:
+      case OP_LOADL:
+      case OP_STRING:
+        if (GETARG_B(i) == GETARG_A(i0) && GETARG_A(i0) >= s->nlocals) {
+          s->iseq[s->pc-1] = MKOP_ABx(c0, GETARG_A(i), GETARG_Bx(i0));
+          return 0;
+        }
+        break;
+      case OP_SCLASS:
+        if (GETARG_B(i) == GETARG_A(i0) && GETARG_A(i0) >= s->nlocals) {
+          s->iseq[s->pc-1] = MKOP_AB(c0, GETARG_A(i), GETARG_B(i0));
+          return 0;
+        }
+        break;
+      case OP_LOADNIL:
+      case OP_LOADSELF:
+      case OP_LOADT:
+      case OP_LOADF:
+      case OP_OCLASS:
+        if (GETARG_B(i) == GETARG_A(i0) && GETARG_A(i0) >= s->nlocals) {
+          s->iseq[s->pc-1] = MKOP_A(c0, GETARG_A(i));
+          return 0;
+        }
+        break;
+      default:
+        break;
+      }
+      break;
+    case OP_SETIV:
+    case OP_SETCV:
+    case OP_SETCONST:
+    case OP_SETMCNST:
+    case OP_SETGLOBAL:
+      if (val) break;
+      if (c0 == OP_MOVE) {
+        if (GETARG_A(i) == GETARG_A(i0)) {
+          s->iseq[s->pc-1] = MKOP_ABx(c1, GETARG_B(i0), GETARG_Bx(i));
+          return 0;
+        }
+      }
+      break;
+    case OP_SETUPVAR:
+      if (val) break;
+      if (c0 == OP_MOVE) {
+        if (GETARG_A(i) == GETARG_A(i0)) {
+          s->iseq[s->pc-1] = MKOP_ABC(c1, GETARG_B(i0), GETARG_B(i), GETARG_C(i));
+          return 0;
+        }
+      }
+      break;
+    case OP_EPOP:
+      if (c0 == OP_EPOP) {
+        s->iseq[s->pc-1] = MKOP_A(OP_EPOP, GETARG_A(i0)+GETARG_A(i));
+        return 0;
+      }
+      break;
+    case OP_POPERR:
+      if (c0 == OP_POPERR) {
+        s->iseq[s->pc-1] = MKOP_A(OP_POPERR, GETARG_A(i0)+GETARG_A(i));
+        return 0;
+      }
+      break;
+    case OP_RETURN:
+      switch (c0) {
+      case OP_RETURN:
+        return 0;
+      case OP_MOVE:
+        if (GETARG_A(i0) >= s->nlocals) {
+          s->iseq[s->pc-1] = MKOP_AB(OP_RETURN, GETARG_B(i0), OP_R_NORMAL);
+          return 0;
+        }
+        break;
+      case OP_SETIV:
+      case OP_SETCV:
+      case OP_SETCONST:
+      case OP_SETMCNST:
+      case OP_SETUPVAR:
+      case OP_SETGLOBAL:
+        s->pc--;
+        genop_peep(s, i0, NOVAL);
+        i0 = s->iseq[s->pc-1];
+        return genop(s, MKOP_AB(OP_RETURN, GETARG_A(i0), OP_R_NORMAL));
+#if 0
+      case OP_SEND:
+        if (GETARG_B(i) == OP_R_NORMAL && GETARG_A(i) == GETARG_A(i0)) {
+          s->iseq[s->pc-1] = MKOP_ABC(OP_TAILCALL, GETARG_A(i0), GETARG_B(i0), GETARG_C(i0));
+          return;
+        }
+        break;
+#endif
+      default:
+        break;
+      }
+      break;
+    case OP_ADD:
+    case OP_SUB:
+      if (c0 == OP_LOADI) {
+        int c = GETARG_sBx(i0);
+
+        if (c1 == OP_SUB) c = -c;
+        if (c > 127 || c < -127) break;
+        if (0 <= c)
+          s->iseq[s->pc-1] = MKOP_ABC(OP_ADDI, GETARG_A(i), GETARG_B(i), c);
+        else
+          s->iseq[s->pc-1] = MKOP_ABC(OP_SUBI, GETARG_A(i), GETARG_B(i), -c);
+        return 0;
+      }
+    case OP_STRCAT:
+      if (c0 == OP_STRING) {
+        mrb_value v = s->irep->pool[GETARG_Bx(i0)];
+
+        if (mrb_string_p(v) && RSTRING_LEN(v) == 0) {
+          s->pc--;
+          return 0;
+        }
+      }
+      break;
+    case OP_JMPIF:
+    case OP_JMPNOT:
+      if (c0 == OP_MOVE && GETARG_A(i) == GETARG_A(i0)) {
+        s->iseq[s->pc-1] = MKOP_AsBx(c1, GETARG_B(i0), GETARG_sBx(i));
+        return s->pc-1;
+      }
+      break;
+    default:
+      break;
+    }
+  }
+  return genop(s, i);
+}
+
+static void
+scope_error(codegen_scope *s)
+{
+  exit(EXIT_FAILURE);
+}
+
+static inline void
+dispatch(codegen_scope *s, int pc)
+{
+  int diff = s->pc - pc;
+  mrb_code i = s->iseq[pc];
+  int c = GET_OPCODE(i);
+
+  s->lastlabel = s->pc;
+  switch (c) {
+  case OP_JMP:
+  case OP_JMPIF:
+  case OP_JMPNOT:
+  case OP_ONERR:
+    break;
+  default:
+#ifndef MRB_DISABLE_STDIO
+    fprintf(stderr, "bug: dispatch on non JMP op\n");
+#endif
+    scope_error(s);
+    break;
+  }
+  s->iseq[pc] = MKOP_AsBx(c, GETARG_A(i), diff);
+}
+
+static void
+dispatch_linked(codegen_scope *s, int pc)
+{
+  mrb_code i;
+  int pos;
+
+  if (!pc) return;
+  for (;;) {
+    i = s->iseq[pc];
+    pos = GETARG_sBx(i);
+    dispatch(s, pc);
+    if (!pos) break;
+    pc = pos;
+  }
+}
+
+#define nregs_update do {if (s->sp > s->nregs) s->nregs = s->sp;} while (0)
+static void
+push_(codegen_scope *s)
+{
+  if (s->sp > 511) {
+    codegen_error(s, "too complex expression");
+  }
+  s->sp++;
+  nregs_update;
+}
+
+static void
+push_n_(codegen_scope *s, size_t n)
+{
+  if (s->sp+n > 511) {
+    codegen_error(s, "too complex expression");
+  }
+  s->sp+=n;
+  nregs_update;
+}
+
+#define push() push_(s)
+#define push_n(n) push_n_(s,n)
+#define pop_(s) ((s)->sp--)
+#define pop() pop_(s)
+#define pop_n(n) (s->sp-=(n))
+#define cursp() (s->sp)
+
+static inline int
+new_lit(codegen_scope *s, mrb_value val)
+{
+  size_t i;
+  mrb_value *pv;
+
+  switch (mrb_type(val)) {
+  case MRB_TT_STRING:
+    for (i=0; i<s->irep->plen; i++) {
+      mrb_int len;
+      pv = &s->irep->pool[i];
+
+      if (mrb_type(*pv) != MRB_TT_STRING) continue;
+      if ((len = RSTRING_LEN(*pv)) != RSTRING_LEN(val)) continue;
+      if (memcmp(RSTRING_PTR(*pv), RSTRING_PTR(val), len) == 0)
+        return i;
+    }
+    break;
+  case MRB_TT_FLOAT:
+    for (i=0; i<s->irep->plen; i++) {
+      pv = &s->irep->pool[i];
+      if (mrb_type(*pv) != MRB_TT_FLOAT) continue;
+      if (mrb_float(*pv) == mrb_float(val)) return i;
+    }
+    break;
+  case MRB_TT_FIXNUM:
+    for (i=0; i<s->irep->plen; i++) {
+      pv = &s->irep->pool[i];
+      if (!mrb_fixnum_p(*pv)) continue;
+      if (mrb_fixnum(*pv) == mrb_fixnum(val)) return i;
+    }
+    break;
+  default:
+    /* should not happen */
+    return 0;
+  }
+
+  if (s->irep->plen == s->pcapa) {
+    s->pcapa *= 2;
+    s->irep->pool = (mrb_value *)codegen_realloc(s, s->irep->pool, sizeof(mrb_value)*s->pcapa);
+  }
+
+  pv = &s->irep->pool[s->irep->plen];
+  i = s->irep->plen++;
+
+  switch (mrb_type(val)) {
+  case MRB_TT_STRING:
+    *pv = mrb_str_pool(s->mrb, val);
+    break;
+
+  case MRB_TT_FLOAT:
+#ifdef MRB_WORD_BOXING
+    *pv = mrb_float_pool(s->mrb, mrb_float(val));
+    break;
+#endif
+  case MRB_TT_FIXNUM:
+    *pv = val;
+    break;
+
+  default:
+    /* should not happen */
+    break;
+  }
+  return i;
+}
+
+static inline int
+new_msym(codegen_scope *s, mrb_sym sym)
+{
+  size_t i, len;
+
+  mrb_assert(s->irep);
+
+  len = s->irep->slen;
+  if (len > 256) len = 256;
+  for (i=0; i<len; i++) {
+    if (s->irep->syms[i] == sym) return i;
+    if (s->irep->syms[i] == 0) break;
+  }
+  if (i == 256) {
+    codegen_error(s, "too many symbols (max 256)");
+  }
+  s->irep->syms[i] = sym;
+  if (i == s->irep->slen) s->irep->slen++;
+  return i;
+}
+
+static inline int
+new_sym(codegen_scope *s, mrb_sym sym)
+{
+  size_t i;
+
+  for (i=0; i<s->irep->slen; i++) {
+    if (s->irep->syms[i] == sym) return i;
+  }
+  if (s->irep->slen > 125 && s->irep->slen < 256) {
+    s->irep->syms = (mrb_sym *)codegen_realloc(s, s->irep->syms, sizeof(mrb_sym)*65536);
+    for (i = 0; i < 256 - s->irep->slen; i++) {
+      static const mrb_sym mrb_sym_zero = { 0 };
+      s->irep->syms[i + s->irep->slen] = mrb_sym_zero;
+    }
+    s->irep->slen = 256;
+  }
+  s->irep->syms[s->irep->slen] = sym;
+  return s->irep->slen++;
+}
+
+static int
+node_len(node *tree)
+{
+  int n = 0;
+
+  while (tree) {
+    n++;
+    tree = tree->cdr;
+  }
+  return n;
+}
+
+#define sym(x) ((mrb_sym)(intptr_t)(x))
+#define lv_name(lv) sym((lv)->car)
+static int
+lv_idx(codegen_scope *s, mrb_sym id)
+{
+  node *lv = s->lv;
+  int n = 1;
+
+  while (lv) {
+    if (lv_name(lv) == id) return n;
+    n++;
+    lv = lv->cdr;
+  }
+  return 0;
+}
+
+static void
+for_body(codegen_scope *s, node *tree)
+{
+  codegen_scope *prev = s;
+  int idx;
+  struct loopinfo *lp;
+  node *n2;
+  mrb_code c;
+
+  /* generate receiver */
+  codegen(s, tree->cdr->car, VAL);
+  /* generate loop-block */
+  s = scope_new(s->mrb, s, NULL);
+  if (s == NULL) {
+    raise_error(prev, "unexpected scope");
+  }
+
+  push();                       /* push for a block parameter */
+
+  lp = loop_push(s, LOOP_FOR);
+  lp->pc1 = new_label(s);
+
+  /* generate loop variable */
+  n2 = tree->car;
+  genop(s, MKOP_Ax(OP_ENTER, 0x40000));
+  if (n2->car && !n2->car->cdr && !n2->cdr) {
+    gen_assignment(s, n2->car->car, 1, NOVAL);
+  }
+  else {
+    gen_vmassignment(s, n2, 1, VAL);
+  }
+  codegen(s, tree->cdr->cdr->car, VAL);
+  pop();
+  if (s->pc > 0) {
+    c = s->iseq[s->pc-1];
+    if (GET_OPCODE(c) != OP_RETURN || GETARG_B(c) != OP_R_NORMAL || s->pc == s->lastlabel)
+      genop_peep(s, MKOP_AB(OP_RETURN, cursp(), OP_R_NORMAL), NOVAL);
+  }
+  loop_pop(s, NOVAL);
+  scope_finish(s);
+  s = prev;
+  genop(s, MKOP_Abc(OP_LAMBDA, cursp(), s->irep->rlen-1, OP_L_BLOCK));
+  pop();
+  idx = new_msym(s, mrb_intern_lit(s->mrb, "each"));
+  genop(s, MKOP_ABC(OP_SENDB, cursp(), idx, 0));
+}
+
+static int
+lambda_body(codegen_scope *s, node *tree, int blk)
+{
+  mrb_code c;
+  codegen_scope *parent = s;
+  s = scope_new(s->mrb, s, tree->car);
+  if (s == NULL) {
+    raise_error(parent, "unexpected scope");
+  }
+
+  s->mscope = !blk;
+
+  if (blk) {
+    struct loopinfo *lp = loop_push(s, LOOP_BLOCK);
+    lp->pc1 = new_label(s);
+  }
+  tree = tree->cdr;
+  if (tree->car) {
+    mrb_aspec a;
+    int ma, oa, ra, pa, ka, kd, ba;
+    int pos, i;
+    node *n, *opt;
+
+    ma = node_len(tree->car->car);
+    n = tree->car->car;
+    while (n) {
+      n = n->cdr;
+    }
+    oa = node_len(tree->car->cdr->car);
+    ra = tree->car->cdr->cdr->car ? 1 : 0;
+    pa = node_len(tree->car->cdr->cdr->cdr->car);
+    ka = kd = 0;
+    ba = tree->car->cdr->cdr->cdr->cdr ? 1 : 0;
+
+    a = ((mrb_aspec)(ma & 0x1f) << 18)
+      | ((mrb_aspec)(oa & 0x1f) << 13)
+      | ((ra & 1) << 12)
+      | ((pa & 0x1f) << 7)
+      | ((ka & 0x1f) << 2)
+      | ((kd & 1)<< 1)
+      | (ba & 1);
+    s->ainfo = (((ma+oa) & 0x3f) << 6) /* (12bits = 6:1:5) */
+      | ((ra & 1) << 5)
+      | (pa & 0x1f);
+    genop(s, MKOP_Ax(OP_ENTER, a));
+    pos = new_label(s);
+    for (i=0; i<oa; i++) {
+      new_label(s);
+      genop(s, MKOP_sBx(OP_JMP, 0));
+    }
+    if (oa > 0) {
+      genop(s, MKOP_sBx(OP_JMP, 0));
+    }
+    opt = tree->car->cdr->car;
+    i = 0;
+    while (opt) {
+      int idx;
+
+      dispatch(s, pos+i);
+      codegen(s, opt->car->cdr, VAL);
+      idx = lv_idx(s, (mrb_sym)(intptr_t)opt->car->car);
+      pop();
+      genop_peep(s, MKOP_AB(OP_MOVE, idx, cursp()), NOVAL);
+      i++;
+      opt = opt->cdr;
+    }
+    if (oa > 0) {
+      dispatch(s, pos+i);
+    }
+  }
+  codegen(s, tree->cdr->car, VAL);
+  pop();
+  if (s->pc > 0) {
+    c = s->iseq[s->pc-1];
+    if (GET_OPCODE(c) != OP_RETURN || GETARG_B(c) != OP_R_NORMAL || s->pc == s->lastlabel) {
+      if (s->nregs == 0) {
+        genop(s, MKOP_A(OP_LOADNIL, 0));
+        genop(s, MKOP_AB(OP_RETURN, 0, OP_R_NORMAL));
+      }
+      else {
+        genop_peep(s, MKOP_AB(OP_RETURN, cursp(), OP_R_NORMAL), NOVAL);
+      }
+    }
+  }
+  if (blk) {
+    loop_pop(s, NOVAL);
+  }
+  scope_finish(s);
+  return parent->irep->rlen - 1;
+}
+
+static int
+scope_body(codegen_scope *s, node *tree, int val)
+{
+  codegen_scope *scope = scope_new(s->mrb, s, tree->car);
+  if (scope == NULL) {
+    raise_error(s, "unexpected scope");
+  }
+
+  codegen(scope, tree->cdr, VAL);
+  if (!s->iseq) {
+    genop(scope, MKOP_A(OP_STOP, 0));
+  }
+  else if (!val) {
+    genop(scope, MKOP_AB(OP_RETURN, 0, OP_R_NORMAL));
+  }
+  else {
+    if (scope->nregs == 0) {
+      genop(scope, MKOP_A(OP_LOADNIL, 0));
+      genop(scope, MKOP_AB(OP_RETURN, 0, OP_R_NORMAL));
+    }
+    else {
+      genop_peep(scope, MKOP_AB(OP_RETURN, scope->sp-1, OP_R_NORMAL), NOVAL);
+    }
+  }
+  scope_finish(scope);
+  if (!s->irep) {
+    /* should not happen */
+    return 0;
+  }
+  return s->irep->rlen - 1;
+}
+
+static mrb_bool
+nosplat(node *t)
+{
+  while (t) {
+    if ((intptr_t)t->car->car == NODE_SPLAT) return FALSE;
+    t = t->cdr;
+  }
+  return TRUE;
+}
+
+static mrb_sym
+attrsym(codegen_scope *s, mrb_sym a)
+{
+  const char *name;
+  mrb_int len;
+  char *name2;
+
+  name = mrb_sym2name_len(s->mrb, a, &len);
+  name2 = (char *)codegen_palloc(s,
+                                 (size_t)len
+                                 + 1 /* '=' */
+                                 + 1 /* '\0' */
+                                 );
+  mrb_assert_int_fit(mrb_int, len, size_t, SIZE_MAX);
+  memcpy(name2, name, (size_t)len);
+  name2[len] = '=';
+  name2[len+1] = '\0';
+
+  return mrb_intern(s->mrb, name2, len+1);
+}
+
+static int
+gen_values(codegen_scope *s, node *t, int val)
+{
+  int n = 0;
+  int is_splat;
+
+  while (t) {
+    is_splat = (intptr_t)t->car->car == NODE_SPLAT; /* splat mode */
+    if (n >= 127 || is_splat) {
+      if (val) {
+        pop_n(n);
+        genop(s, MKOP_ABC(OP_ARRAY, cursp(), cursp(), n));
+        push();
+        codegen(s, t->car, VAL);
+        pop(); pop();
+        if (is_splat) {
+          genop(s, MKOP_AB(OP_ARYCAT, cursp(), cursp()+1));
+        }
+        else {
+          genop(s, MKOP_AB(OP_ARYPUSH, cursp(), cursp()+1));
+        }
+        t = t->cdr;
+        while (t) {
+          push();
+          codegen(s, t->car, VAL);
+          pop(); pop();
+          if ((intptr_t)t->car->car == NODE_SPLAT) {
+            genop(s, MKOP_AB(OP_ARYCAT, cursp(), cursp()+1));
+          }
+          else {
+            genop(s, MKOP_AB(OP_ARYPUSH, cursp(), cursp()+1));
+          }
+          t = t->cdr;
+        }
+      }
+      else {
+        codegen(s, t->car->cdr, NOVAL);
+        t = t->cdr;
+        while (t) {
+          codegen(s, t->car, NOVAL);
+          t = t->cdr;
+        }
+      }
+      return -1;
+    }
+    /* normal (no splat) mode */
+    codegen(s, t->car, val);
+    n++;
+    t = t->cdr;
+  }
+  return n;
+}
+
+#define CALL_MAXARGS 127
+
+static void
+gen_call(codegen_scope *s, node *tree, mrb_sym name, int sp, int val)
+{
+  mrb_sym sym = name ? name : sym(tree->cdr->car);
+  int idx;
+  int n = 0, noop = 0, sendv = 0, blk = 0;
+
+  codegen(s, tree->car, VAL); /* receiver */
+  idx = new_msym(s, sym);
+  tree = tree->cdr->cdr->car;
+  if (tree) {
+    n = gen_values(s, tree->car, VAL);
+    if (n < 0) {
+      n = noop = sendv = 1;
+      push();
+    }
+  }
+  if (sp) {
+    if (sendv) {
+      pop();
+      genop(s, MKOP_AB(OP_ARYPUSH, cursp(), sp));
+      push();
+    }
+    else {
+      genop(s, MKOP_AB(OP_MOVE, cursp(), sp));
+      push();
+      n++;
+    }
+  }
+  if (tree && tree->cdr) {
+    noop = 1;
+    codegen(s, tree->cdr, VAL);
+    pop();
+  }
+  else {
+    blk = cursp();
+  }
+  push();pop();
+  pop_n(n+1);
+  {
+    mrb_int symlen;
+    const char *symname = mrb_sym2name_len(s->mrb, sym, &symlen);
+
+    if (!noop && symlen == 1 && symname[0] == '+')  {
+      genop_peep(s, MKOP_ABC(OP_ADD, cursp(), idx, n), val);
+    }
+    else if (!noop && symlen == 1 && symname[0] == '-')  {
+      genop_peep(s, MKOP_ABC(OP_SUB, cursp(), idx, n), val);
+    }
+    else if (!noop && symlen == 1 && symname[0] == '*')  {
+      genop(s, MKOP_ABC(OP_MUL, cursp(), idx, n));
+    }
+    else if (!noop && symlen == 1 && symname[0] == '/')  {
+      genop(s, MKOP_ABC(OP_DIV, cursp(), idx, n));
+    }
+    else if (!noop && symlen == 1 && symname[0] == '<')  {
+      genop(s, MKOP_ABC(OP_LT, cursp(), idx, n));
+    }
+    else if (!noop && symlen == 2 && symname[0] == '<' && symname[1] == '=')  {
+      genop(s, MKOP_ABC(OP_LE, cursp(), idx, n));
+    }
+    else if (!noop && symlen == 1 && symname[0] == '>')  {
+      genop(s, MKOP_ABC(OP_GT, cursp(), idx, n));
+    }
+    else if (!noop && symlen == 2 && symname[0] == '>' && symname[1] == '=')  {
+      genop(s, MKOP_ABC(OP_GE, cursp(), idx, n));
+    }
+    else if (!noop && symlen == 2 && symname[0] == '=' && symname[1] == '=')  {
+      genop(s, MKOP_ABC(OP_EQ, cursp(), idx, n));
+    }
+    else {
+      if (sendv) n = CALL_MAXARGS;
+      if (blk > 0) {                   /* no block */
+        genop(s, MKOP_ABC(OP_SEND, cursp(), idx, n));
+      }
+      else {
+        genop(s, MKOP_ABC(OP_SENDB, cursp(), idx, n));
+      }
+    }
+  }
+  if (val) {
+    push();
+  }
+}
+
+static void
+gen_assignment(codegen_scope *s, node *tree, int sp, int val)
+{
+  int idx;
+  int type = (intptr_t)tree->car;
+
+  tree = tree->cdr;
+  switch ((intptr_t)type) {
+  case NODE_GVAR:
+    idx = new_sym(s, sym(tree));
+    genop_peep(s, MKOP_ABx(OP_SETGLOBAL, sp, idx), val);
+    break;
+  case NODE_LVAR:
+    idx = lv_idx(s, sym(tree));
+    if (idx > 0) {
+      if (idx != sp) {
+        genop_peep(s, MKOP_AB(OP_MOVE, idx, sp), val);
+      }
+      break;
+    }
+    else {                      /* upvar */
+      int lv = 0;
+      codegen_scope *up = s->prev;
+
+      while (up) {
+        idx = lv_idx(up, sym(tree));
+        if (idx > 0) {
+          genop_peep(s, MKOP_ABC(OP_SETUPVAR, sp, idx, lv), val);
+          break;
+        }
+        lv++;
+        up = up->prev;
+      }
+    }
+    break;
+  case NODE_IVAR:
+    idx = new_sym(s, sym(tree));
+    genop_peep(s, MKOP_ABx(OP_SETIV, sp, idx), val);
+    break;
+  case NODE_CVAR:
+    idx = new_sym(s, sym(tree));
+    genop_peep(s, MKOP_ABx(OP_SETCV, sp, idx), val);
+    break;
+  case NODE_CONST:
+    idx = new_sym(s, sym(tree));
+    genop_peep(s, MKOP_ABx(OP_SETCONST, sp, idx), val);
+    break;
+  case NODE_COLON2:
+    idx = new_sym(s, sym(tree->cdr));
+    genop_peep(s, MKOP_AB(OP_MOVE, cursp(), sp), NOVAL);
+    push();
+    codegen(s, tree->car, VAL);
+    pop_n(2);
+    genop_peep(s, MKOP_ABx(OP_SETMCNST, cursp(), idx), val);
+    break;
+
+  case NODE_CALL:
+    push();
+    gen_call(s, tree, attrsym(s, sym(tree->cdr->car)), sp, NOVAL);
+    pop();
+    if (val) {
+      genop_peep(s, MKOP_AB(OP_MOVE, cursp(), sp), val);
+    }
+    break;
+
+  case NODE_MASGN:
+    gen_vmassignment(s, tree->car, sp, val);
+    break;
+
+  /* splat without assignment */
+  case NODE_NIL:
+    break;
+
+  default:
+#ifndef MRB_DISABLE_STDIO
+    printf("unknown lhs %d\n", type);
+#endif
+    break;
+  }
+  if (val) push();
+}
+
+static void
+gen_vmassignment(codegen_scope *s, node *tree, int rhs, int val)
+{
+  int n = 0, post = 0;
+  node *t, *p;
+
+  if (tree->car) {              /* pre */
+    t = tree->car;
+    n = 0;
+    while (t) {
+      genop(s, MKOP_ABC(OP_AREF, cursp(), rhs, n));
+      gen_assignment(s, t->car, cursp(), NOVAL);
+      n++;
+      t = t->cdr;
+    }
+  }
+  t = tree->cdr;
+  if (t) {
+    if (t->cdr) {               /* post count */
+      p = t->cdr->car;
+      while (p) {
+        post++;
+        p = p->cdr;
+      }
+    }
+    if (val) {
+      genop(s, MKOP_AB(OP_MOVE, cursp(), rhs));
+    }
+    else {
+      pop();
+    }
+    push_n(post);
+    pop_n(post);
+    genop(s, MKOP_ABC(OP_APOST, cursp(), n, post));
+    n = 1;
+    if (t->car) {               /* rest */
+      gen_assignment(s, t->car, cursp(), NOVAL);
+    }
+    if (t->cdr && t->cdr->car) {
+      t = t->cdr->car;
+      while (t) {
+        gen_assignment(s, t->car, cursp()+n, NOVAL);
+        t = t->cdr;
+        n++;
+      }
+    }
+    push();
+  }
+}
+
+static void
+gen_send_intern(codegen_scope *s)
+{
+  pop();
+  genop(s, MKOP_ABC(OP_SEND, cursp(), new_msym(s, mrb_intern_lit(s->mrb, "intern")), 0));
+  push();
+}
+static void
+gen_literal_array(codegen_scope *s, node *tree, mrb_bool sym, int val)
+{
+  if (val) {
+    int i = 0, j = 0;
+
+    while (tree) {
+      switch ((intptr_t)tree->car->car) {
+      case NODE_STR:
+        if ((tree->cdr == NULL) && ((intptr_t)tree->car->cdr->cdr == 0))
+          break;
+        /* fall through */
+      case NODE_BEGIN:
+        codegen(s, tree->car, VAL);
+        ++j;
+        break;
+
+      case NODE_LITERAL_DELIM:
+        if (j > 0) {
+          j = 0;
+          ++i;
+          if (sym)
+            gen_send_intern(s);
+        }
+        break;
+      }
+      if (j >= 2) {
+        pop(); pop();
+        genop_peep(s, MKOP_AB(OP_STRCAT, cursp(), cursp()+1), VAL);
+        push();
+        j = 1;
+      }
+      tree = tree->cdr;
+    }
+    if (j > 0) {
+      ++i;
+      if (sym)
+        gen_send_intern(s);
+    }
+    pop_n(i);
+    genop(s, MKOP_ABC(OP_ARRAY, cursp(), cursp(), i));
+    push();
+  }
+  else {
+    while (tree) {
+      switch ((intptr_t)tree->car->car) {
+      case NODE_BEGIN: case NODE_BLOCK:
+        codegen(s, tree->car, NOVAL);
+      }
+      tree = tree->cdr;
+    }
+  }
+}
+
+static void
+raise_error(codegen_scope *s, const char *msg)
+{
+  int idx = new_lit(s, mrb_str_new_cstr(s->mrb, msg));
+
+  genop(s, MKOP_ABx(OP_ERR, 1, idx));
+}
+
+static double
+readint_float(codegen_scope *s, const char *p, int base)
+{
+  const char *e = p + strlen(p);
+  double f = 0;
+  int n;
+
+  if (*p == '+') p++;
+  while (p < e) {
+    char c = *p;
+    c = tolower((unsigned char)c);
+    for (n=0; n<base; n++) {
+      if (mrb_digitmap[n] == c) {
+        f *= base;
+        f += n;
+        break;
+      }
+    }
+    if (n == base) {
+      codegen_error(s, "malformed readint input");
+    }
+    p++;
+  }
+  return f;
+}
+
+static mrb_int
+readint_mrb_int(codegen_scope *s, const char *p, int base, mrb_bool neg, mrb_bool *overflow)
+{
+  const char *e = p + strlen(p);
+  mrb_int result = 0;
+  int n;
+
+  mrb_assert(base >= 2 && base <= 36);
+  if (*p == '+') p++;
+  while (p < e) {
+    char c = *p;
+    c = tolower((unsigned char)c);
+    for (n=0; n<base; n++) {
+      if (mrb_digitmap[n] == c) {
+        break;
+      }
+    }
+    if (n == base) {
+      codegen_error(s, "malformed readint input");
+    }
+
+    if (neg) {
+      if ((MRB_INT_MIN + n)/base > result) {
+        *overflow = TRUE;
+        return 0;
+      }
+      result *= base;
+      result -= n;
+    }
+    else {
+      if ((MRB_INT_MAX - n)/base < result) {
+        *overflow = TRUE;
+        return 0;
+      }
+      result *= base;
+      result += n;
+    }
+    p++;
+  }
+  *overflow = FALSE;
+  return result;
+}
+
+static void
+codegen(codegen_scope *s, node *tree, int val)
+{
+  int nt;
+
+  if (!tree) return;
+
+  if (s->irep && s->filename_index != tree->filename_index) {
+    s->irep->filename = mrb_parser_get_filename(s->parser, s->filename_index);
+    mrb_debug_info_append_file(s->mrb, s->irep, s->debug_start_pos, s->pc);
+    s->debug_start_pos = s->pc;
+    s->filename_index = tree->filename_index;
+    s->filename = mrb_parser_get_filename(s->parser, tree->filename_index);
+  }
+
+  nt = (intptr_t)tree->car;
+  s->lineno = tree->lineno;
+  tree = tree->cdr;
+  switch (nt) {
+  case NODE_BEGIN:
+    if (val && !tree) {
+      genop(s, MKOP_A(OP_LOADNIL, cursp()));
+      push();
+    }
+    while (tree) {
+      codegen(s, tree->car, tree->cdr ? NOVAL : val);
+      tree = tree->cdr;
+    }
+    break;
+
+  case NODE_RESCUE:
+    {
+      int onerr, noexc, exend, pos1, pos2, tmp;
+      struct loopinfo *lp;
+
+      onerr = genop(s, MKOP_Bx(OP_ONERR, 0));
+      lp = loop_push(s, LOOP_BEGIN);
+      lp->pc1 = onerr;
+      if (tree->car) {
+        codegen(s, tree->car, val);
+        if (val) pop();
+      }
+      lp->type = LOOP_RESCUE;
+      noexc = genop(s, MKOP_Bx(OP_JMP, 0));
+      dispatch(s, onerr);
+      tree = tree->cdr;
+      exend = 0;
+      pos1 = 0;
+      if (tree->car) {
+        node *n2 = tree->car;
+        int exc = cursp();
+
+        genop(s, MKOP_A(OP_RESCUE, exc));
+        push();
+        while (n2) {
+          node *n3 = n2->car;
+          node *n4 = n3->car;
+
+          if (pos1) dispatch(s, pos1);
+          pos2 = 0;
+          do {
+            if (n4) {
+              codegen(s, n4->car, VAL);
+            }
+            else {
+              genop(s, MKOP_ABx(OP_GETCONST, cursp(), new_msym(s, mrb_intern_lit(s->mrb, "StandardError"))));
+              push();
+            }
+            genop(s, MKOP_AB(OP_MOVE, cursp(), exc));
+            pop();
+            if (n4 && n4->car && (intptr_t)n4->car->car == NODE_SPLAT) {
+              genop(s, MKOP_ABC(OP_SEND, cursp(), new_msym(s, mrb_intern_lit(s->mrb, "__case_eqq")), 1));
+            }
+            else {
+              genop(s, MKOP_ABC(OP_SEND, cursp(), new_msym(s, mrb_intern_lit(s->mrb, "===")), 1));
+            }
+            tmp = genop(s, MKOP_AsBx(OP_JMPIF, cursp(), pos2));
+            pos2 = tmp;
+            if (n4) {
+              n4 = n4->cdr;
+            }
+          } while (n4);
+          pos1 = genop(s, MKOP_sBx(OP_JMP, 0));
+          dispatch_linked(s, pos2);
+
+          pop();
+          if (n3->cdr->car) {
+            gen_assignment(s, n3->cdr->car, exc, NOVAL);
+          }
+          if (n3->cdr->cdr->car) {
+            codegen(s, n3->cdr->cdr->car, val);
+            if (val) pop();
+          }
+          tmp = genop(s, MKOP_sBx(OP_JMP, exend));
+          exend = tmp;
+          n2 = n2->cdr;
+          push();
+        }
+        if (pos1) {
+          dispatch(s, pos1);
+          genop(s, MKOP_A(OP_RAISE, exc));
+        }
+      }
+      pop();
+      tree = tree->cdr;
+      dispatch(s, noexc);
+      genop(s, MKOP_A(OP_POPERR, 1));
+      if (tree->car) {
+        codegen(s, tree->car, val);
+      }
+      else if (val) {
+        push();
+      }
+      dispatch_linked(s, exend);
+      loop_pop(s, NOVAL);
+    }
+    break;
+
+  case NODE_ENSURE:
+    {
+      int idx;
+      int epush = s->pc;
+
+      genop(s, MKOP_Bx(OP_EPUSH, 0));
+      s->ensure_level++;
+      codegen(s, tree->car, val);
+      idx = scope_body(s, tree->cdr, NOVAL);
+      s->iseq[epush] = MKOP_Bx(OP_EPUSH, idx);
+      s->ensure_level--;
+      genop_peep(s, MKOP_A(OP_EPOP, 1), NOVAL);
+    }
+    break;
+
+  case NODE_LAMBDA:
+    {
+      int idx = lambda_body(s, tree, 1);
+
+      genop(s, MKOP_Abc(OP_LAMBDA, cursp(), idx, OP_L_LAMBDA));
+      push();
+    }
+    break;
+
+  case NODE_BLOCK:
+    {
+      int idx = lambda_body(s, tree, 1);
+
+      genop(s, MKOP_Abc(OP_LAMBDA, cursp(), idx, OP_L_BLOCK));
+      push();
+    }
+    break;
+
+  case NODE_IF:
+    {
+      int pos1, pos2;
+      node *e = tree->cdr->cdr->car;
+
+      switch ((intptr_t)tree->car->car) {
+      case NODE_TRUE:
+      case NODE_INT:
+      case NODE_STR:
+        codegen(s, tree->cdr->car, val);
+        return;
+      case NODE_FALSE:
+      case NODE_NIL:
+        codegen(s, e, val);
+        return;
+      }
+      codegen(s, tree->car, VAL);
+      pop();
+      pos1 = genop_peep(s, MKOP_AsBx(OP_JMPNOT, cursp(), 0), NOVAL);
+
+      codegen(s, tree->cdr->car, val);
+      if (val && !(tree->cdr->car)) {
+        genop(s, MKOP_A(OP_LOADNIL, cursp()));
+        push();
+      }
+      if (e) {
+        if (val) pop();
+        pos2 = genop(s, MKOP_sBx(OP_JMP, 0));
+        dispatch(s, pos1);
+        codegen(s, e, val);
+        dispatch(s, pos2);
+      }
+      else {
+        if (val) {
+          pop();
+          pos2 = genop(s, MKOP_sBx(OP_JMP, 0));
+          dispatch(s, pos1);
+          genop(s, MKOP_A(OP_LOADNIL, cursp()));
+          dispatch(s, pos2);
+          push();
+        }
+        else {
+          dispatch(s, pos1);
+        }
+      }
+    }
+    break;
+
+  case NODE_AND:
+    {
+      int pos;
+
+      codegen(s, tree->car, VAL);
+      pop();
+      pos = genop(s, MKOP_AsBx(OP_JMPNOT, cursp(), 0));
+      codegen(s, tree->cdr, val);
+      dispatch(s, pos);
+    }
+    break;
+
+  case NODE_OR:
+    {
+      int pos;
+
+      codegen(s, tree->car, VAL);
+      pop();
+      pos = genop(s, MKOP_AsBx(OP_JMPIF, cursp(), 0));
+      codegen(s, tree->cdr, val);
+      dispatch(s, pos);
+    }
+    break;
+
+  case NODE_WHILE:
+    {
+      struct loopinfo *lp = loop_push(s, LOOP_NORMAL);
+
+      lp->pc1 = genop(s, MKOP_sBx(OP_JMP, 0));
+      lp->pc2 = new_label(s);
+      codegen(s, tree->cdr, NOVAL);
+      dispatch(s, lp->pc1);
+      codegen(s, tree->car, VAL);
+      pop();
+      genop(s, MKOP_AsBx(OP_JMPIF, cursp(), lp->pc2 - s->pc));
+
+      loop_pop(s, val);
+    }
+    break;
+
+  case NODE_UNTIL:
+    {
+      struct loopinfo *lp = loop_push(s, LOOP_NORMAL);
+
+      lp->pc1 = genop(s, MKOP_sBx(OP_JMP, 0));
+      lp->pc2 = new_label(s);
+      codegen(s, tree->cdr, NOVAL);
+      dispatch(s, lp->pc1);
+      codegen(s, tree->car, VAL);
+      pop();
+      genop(s, MKOP_AsBx(OP_JMPNOT, cursp(), lp->pc2 - s->pc));
+
+      loop_pop(s, val);
+    }
+    break;
+
+  case NODE_FOR:
+    for_body(s, tree);
+    if (val) push();
+    break;
+
+  case NODE_CASE:
+    {
+      int head = 0;
+      int pos1, pos2, pos3, tmp;
+      node *n;
+
+      pos3 = 0;
+      if (tree->car) {
+        head = cursp();
+        codegen(s, tree->car, VAL);
+      }
+      tree = tree->cdr;
+      while (tree) {
+        n = tree->car->car;
+        pos1 = pos2 = 0;
+        while (n) {
+          codegen(s, n->car, VAL);
+          if (head) {
+            genop(s, MKOP_AB(OP_MOVE, cursp(), head));
+            pop();
+            if ((intptr_t)n->car->car == NODE_SPLAT) {
+              genop(s, MKOP_ABC(OP_SEND, cursp(), new_msym(s, mrb_intern_lit(s->mrb, "__case_eqq")), 1));
+            }
+            else {
+              genop(s, MKOP_ABC(OP_SEND, cursp(), new_msym(s, mrb_intern_lit(s->mrb, "===")), 1));
+            }
+          }
+          else {
+            pop();
+          }
+          tmp = genop(s, MKOP_AsBx(OP_JMPIF, cursp(), pos2));
+          pos2 = tmp;
+          n = n->cdr;
+        }
+        if (tree->car->car) {
+          pos1 = genop(s, MKOP_sBx(OP_JMP, 0));
+          dispatch_linked(s, pos2);
+        }
+        codegen(s, tree->car->cdr, val);
+        if (val) pop();
+        tmp = genop(s, MKOP_sBx(OP_JMP, pos3));
+        pos3 = tmp;
+        if (pos1) dispatch(s, pos1);
+        tree = tree->cdr;
+      }
+      if (val) {
+        int pos = cursp();
+        genop(s, MKOP_A(OP_LOADNIL, cursp()));
+        if (pos3) dispatch_linked(s, pos3);
+        if (head) pop();
+        genop(s, MKOP_AB(OP_MOVE, cursp(), pos));
+        push();
+      }
+      else {
+        if (pos3) {
+          dispatch_linked(s, pos3);
+        }
+        if (head) {
+          pop();
+        }
+      }
+    }
+    break;
+
+  case NODE_SCOPE:
+    scope_body(s, tree, NOVAL);
+    break;
+
+  case NODE_FCALL:
+  case NODE_CALL:
+    gen_call(s, tree, 0, 0, val);
+    break;
+
+  case NODE_DOT2:
+    codegen(s, tree->car, val);
+    codegen(s, tree->cdr, val);
+    if (val) {
+      pop(); pop();
+      genop(s, MKOP_ABC(OP_RANGE, cursp(), cursp(), FALSE));
+      push();
+    }
+    break;
+
+  case NODE_DOT3:
+    codegen(s, tree->car, val);
+    codegen(s, tree->cdr, val);
+    if (val) {
+      pop(); pop();
+      genop(s, MKOP_ABC(OP_RANGE, cursp(), cursp(), TRUE));
+      push();
+    }
+    break;
+
+  case NODE_COLON2:
+    {
+      int sym = new_sym(s, sym(tree->cdr));
+
+      codegen(s, tree->car, VAL);
+      pop();
+      genop(s, MKOP_ABx(OP_GETMCNST, cursp(), sym));
+      if (val) push();
+    }
+    break;
+
+  case NODE_COLON3:
+    {
+      int sym = new_sym(s, sym(tree));
+
+      genop(s, MKOP_A(OP_OCLASS, cursp()));
+      genop(s, MKOP_ABx(OP_GETMCNST, cursp(), sym));
+      if (val) push();
+    }
+    break;
+
+  case NODE_ARRAY:
+    {
+      int n;
+
+      n = gen_values(s, tree, val);
+      if (n >= 0) {
+        if (val) {
+          pop_n(n);
+          genop(s, MKOP_ABC(OP_ARRAY, cursp(), cursp(), n));
+          push();
+        }
+      }
+      else if (val) {
+        push();
+      }
+    }
+    break;
+
+  case NODE_HASH:
+    {
+      int len = 0;
+      mrb_bool update = FALSE;
+
+      while (tree) {
+        codegen(s, tree->car->car, val);
+        codegen(s, tree->car->cdr, val);
+        len++;
+        tree = tree->cdr;
+        if (val && len == 126) {
+          pop_n(len*2);
+          genop(s, MKOP_ABC(OP_HASH, cursp(), cursp(), len));
+          if (update) {
+            pop();
+            genop(s, MKOP_ABC(OP_SEND, cursp(), new_msym(s, mrb_intern_lit(s->mrb, "__update")), 1));
+          }
+          push();
+          update = TRUE;
+          len = 0;
+        }
+      }
+      if (val) {
+        pop_n(len*2);
+        genop(s, MKOP_ABC(OP_HASH, cursp(), cursp(), len));
+        if (update) {
+          pop();
+          genop(s, MKOP_ABC(OP_SEND, cursp(), new_msym(s, mrb_intern_lit(s->mrb, "__update")), 1));
+        }
+        push();
+      }
+    }
+    break;
+
+  case NODE_SPLAT:
+    codegen(s, tree, VAL);
+    break;
+
+  case NODE_ASGN:
+    codegen(s, tree->cdr, VAL);
+    pop();
+    gen_assignment(s, tree->car, cursp(), val);
+    break;
+
+  case NODE_MASGN:
+    {
+      int len = 0, n = 0, post = 0;
+      node *t = tree->cdr, *p;
+      int rhs = cursp();
+
+      if ((intptr_t)t->car == NODE_ARRAY && nosplat(t->cdr)) {
+        /* fixed rhs */
+        t = t->cdr;
+        while (t) {
+          codegen(s, t->car, VAL);
+          len++;
+          t = t->cdr;
+        }
+        tree = tree->car;
+        if (tree->car) {                /* pre */
+          t = tree->car;
+          n = 0;
+          while (t) {
+            gen_assignment(s, t->car, rhs+n, NOVAL);
+            n++;
+            t = t->cdr;
+          }
+        }
+        t = tree->cdr;
+        if (t) {
+          if (t->cdr) {         /* post count */
+            p = t->cdr->car;
+            while (p) {
+              post++;
+              p = p->cdr;
+            }
+          }
+          if (t->car) {         /* rest (len - pre - post) */
+            int rn;
+
+            if (len < post + n) {
+              rn = 0;
+            }
+            else {
+              rn = len - post - n;
+            }
+            genop(s, MKOP_ABC(OP_ARRAY, cursp(), rhs+n, rn));
+            gen_assignment(s, t->car, cursp(), NOVAL);
+            n += rn;
+          }
+          if (t->cdr && t->cdr->car) {
+            t = t->cdr->car;
+            while (n<len) {
+              gen_assignment(s, t->car, rhs+n, NOVAL);
+              t = t->cdr;
+              n++;
+            }
+          }
+        }
+        pop_n(len);
+        if (val) {
+          genop(s, MKOP_ABC(OP_ARRAY, rhs, rhs, len));
+          push();
+        }
+      }
+      else {
+        /* variable rhs */
+        codegen(s, t, VAL);
+        gen_vmassignment(s, tree->car, rhs, val);
+        if (!val) {
+          pop();
+        }
+      }
+    }
+    break;
+
+  case NODE_OP_ASGN:
+    {
+      mrb_sym sym = sym(tree->cdr->car);
+      mrb_int len;
+      const char *name = mrb_sym2name_len(s->mrb, sym, &len);
+      int idx;
+
+      codegen(s, tree->car, VAL);
+      if (len == 2 &&
+          ((name[0] == '|' && name[1] == '|') ||
+           (name[0] == '&' && name[1] == '&'))) {
+        int pos;
+
+        pop();
+        pos = genop_peep(s, MKOP_AsBx(name[0] == '|' ? OP_JMPIF : OP_JMPNOT, cursp(), 0), NOVAL);
+        codegen(s, tree->cdr->cdr->car, VAL);
+        pop();
+        gen_assignment(s, tree->car, cursp(), val);
+        dispatch(s, pos);
+        break;
+      }
+      codegen(s, tree->cdr->cdr->car, VAL);
+      push(); pop();
+      pop(); pop();
+
+      idx = new_msym(s, sym);
+      if (len == 1 && name[0] == '+')  {
+        genop_peep(s, MKOP_ABC(OP_ADD, cursp(), idx, 1), val);
+      }
+      else if (len == 1 && name[0] == '-')  {
+        genop_peep(s, MKOP_ABC(OP_SUB, cursp(), idx, 1), val);
+      }
+      else if (len == 1 && name[0] == '*')  {
+        genop(s, MKOP_ABC(OP_MUL, cursp(), idx, 1));
+      }
+      else if (len == 1 && name[0] == '/')  {
+        genop(s, MKOP_ABC(OP_DIV, cursp(), idx, 1));
+      }
+      else if (len == 1 && name[0] == '<')  {
+        genop(s, MKOP_ABC(OP_LT, cursp(), idx, 1));
+      }
+      else if (len == 2 && name[0] == '<' && name[1] == '=')  {
+        genop(s, MKOP_ABC(OP_LE, cursp(), idx, 1));
+      }
+      else if (len == 1 && name[0] == '>')  {
+        genop(s, MKOP_ABC(OP_GT, cursp(), idx, 1));
+      }
+      else if (len == 2 && name[0] == '>' && name[1] == '=')  {
+        genop(s, MKOP_ABC(OP_GE, cursp(), idx, 1));
+      }
+      else {
+        genop(s, MKOP_ABC(OP_SEND, cursp(), idx, 1));
+      }
+    }
+    gen_assignment(s, tree->car, cursp(), val);
+    break;
+
+  case NODE_SUPER:
+    {
+      int n = 0, noop = 0, sendv = 0;
+
+      push();        /* room for receiver */
+      if (tree) {
+        node *args = tree->car;
+        if (args) {
+          n = gen_values(s, args, VAL);
+          if (n < 0) {
+            n = noop = sendv = 1;
+            push();
+          }
+        }
+      }
+      if (tree && tree->cdr) {
+        codegen(s, tree->cdr, VAL);
+        pop();
+      }
+      else {
+        genop(s, MKOP_A(OP_LOADNIL, cursp()));
+        push(); pop();
+      }
+      pop_n(n+1);
+      if (sendv) n = CALL_MAXARGS;
+      genop(s, MKOP_ABC(OP_SUPER, cursp(), 0, n));
+      if (val) push();
+    }
+    break;
+
+  case NODE_ZSUPER:
+    {
+      codegen_scope *s2 = s;
+      int lv = 0, ainfo = 0;
+
+      push();        /* room for receiver */
+      while (!s2->mscope) {
+        lv++;
+        s2 = s2->prev;
+        if (!s2) break;
+      }
+      if (s2) ainfo = s2->ainfo;
+      genop(s, MKOP_ABx(OP_ARGARY, cursp(), (ainfo<<4)|(lv & 0xf)));
+      push(); push(); pop();    /* ARGARY pushes two values */
+      if (tree && tree->cdr) {
+        codegen(s, tree->cdr, VAL);
+        pop();
+      }
+      pop(); pop();
+      genop(s, MKOP_ABC(OP_SUPER, cursp(), 0, CALL_MAXARGS));
+      if (val) push();
+    }
+    break;
+
+  case NODE_RETURN:
+    if (tree) {
+      codegen(s, tree, VAL);
+      pop();
+    }
+    else {
+      genop(s, MKOP_A(OP_LOADNIL, cursp()));
+    }
+    if (s->loop) {
+      genop(s, MKOP_AB(OP_RETURN, cursp(), OP_R_RETURN));
+    }
+    else {
+      genop_peep(s, MKOP_AB(OP_RETURN, cursp(), OP_R_NORMAL), NOVAL);
+    }
+    if (val) push();
+    break;
+
+  case NODE_YIELD:
+    {
+      codegen_scope *s2 = s;
+      int lv = 0, ainfo = 0;
+      int n = 0, sendv = 0;
+
+      while (!s2->mscope) {
+        lv++;
+        s2 = s2->prev;
+        if (!s2) break;
+      }
+      if (s2) ainfo = s2->ainfo;
+      genop(s, MKOP_ABx(OP_BLKPUSH, cursp(), (ainfo<<4)|(lv & 0xf)));
+      push();
+      if (tree) {
+        n = gen_values(s, tree, VAL);
+        if (n < 0) {
+          n = sendv = 1;
+          push();
+        }
+      }
+      pop_n(n+1);
+      if (sendv) n = CALL_MAXARGS;
+      genop(s, MKOP_ABC(OP_SEND, cursp(), new_msym(s, mrb_intern_lit(s->mrb, "call")), n));
+      if (val) push();
+    }
+    break;
+
+  case NODE_BREAK:
+    loop_break(s, tree);
+    if (val) push();
+    break;
+
+  case NODE_NEXT:
+    if (!s->loop) {
+      raise_error(s, "unexpected next");
+    }
+    else if (s->loop->type == LOOP_NORMAL) {
+      if (s->ensure_level > s->loop->ensure_level) {
+        genop_peep(s, MKOP_A(OP_EPOP, s->ensure_level - s->loop->ensure_level), NOVAL);
+      }
+      codegen(s, tree, NOVAL);
+      genop(s, MKOP_sBx(OP_JMP, s->loop->pc1 - s->pc));
+    }
+    else {
+      if (tree) {
+        codegen(s, tree, VAL);
+        pop();
+      }
+      else {
+        genop(s, MKOP_A(OP_LOADNIL, cursp()));
+      }
+      genop_peep(s, MKOP_AB(OP_RETURN, cursp(), OP_R_NORMAL), NOVAL);
+    }
+    if (val) push();
+    break;
+
+  case NODE_REDO:
+    if (!s->loop) {
+      raise_error(s, "unexpected redo");
+    }
+    else {
+      if (s->ensure_level > s->loop->ensure_level) {
+        genop_peep(s, MKOP_A(OP_EPOP, s->ensure_level - s->loop->ensure_level), NOVAL);
+      }
+      genop(s, MKOP_sBx(OP_JMP, s->loop->pc2 - s->pc));
+    }
+    break;
+
+  case NODE_RETRY:
+    {
+      const char *msg = "unexpected retry";
+
+      if (!s->loop) {
+        raise_error(s, msg);
+      }
+      else {
+        struct loopinfo *lp = s->loop;
+        int n = 0;
+
+        while (lp && lp->type != LOOP_RESCUE) {
+          if (lp->type == LOOP_BEGIN) {
+            n++;
+          }
+          lp = lp->prev;
+        }
+        if (!lp) {
+          raise_error(s, msg);
+        }
+        else {
+          if (n > 0) {
+            while (n--) {
+              genop_peep(s, MKOP_A(OP_POPERR, 1), NOVAL);
+            }
+          }
+          if (s->ensure_level > lp->ensure_level) {
+            genop_peep(s, MKOP_A(OP_EPOP, s->ensure_level - lp->ensure_level), NOVAL);
+          }
+          genop(s, MKOP_sBx(OP_JMP, lp->pc1 - s->pc));
+        }
+      }
+    }
+    break;
+
+  case NODE_LVAR:
+    if (val) {
+      int idx = lv_idx(s, sym(tree));
+
+      if (idx > 0) {
+        genop_peep(s, MKOP_AB(OP_MOVE, cursp(), idx), NOVAL);
+      }
+      else {
+        int lv = 0;
+        codegen_scope *up = s->prev;
+
+        while (up) {
+          idx = lv_idx(up, sym(tree));
+          if (idx > 0) {
+            genop(s, MKOP_ABC(OP_GETUPVAR, cursp(), idx, lv));
+            break;
+          }
+          lv++;
+          up = up->prev;
+        }
+      }
+      push();
+    }
+    break;
+
+  case NODE_GVAR:
+    if (val) {
+      int sym = new_sym(s, sym(tree));
+
+      genop(s, MKOP_ABx(OP_GETGLOBAL, cursp(), sym));
+      push();
+    }
+    break;
+
+  case NODE_IVAR:
+    if (val) {
+      int sym = new_sym(s, sym(tree));
+
+      genop(s, MKOP_ABx(OP_GETIV, cursp(), sym));
+      push();
+    }
+    break;
+
+  case NODE_CVAR:
+    if (val) {
+      int sym = new_sym(s, sym(tree));
+
+      genop(s, MKOP_ABx(OP_GETCV, cursp(), sym));
+      push();
+    }
+    break;
+
+  case NODE_CONST:
+    {
+      int sym = new_sym(s, sym(tree));
+
+      genop(s, MKOP_ABx(OP_GETCONST, cursp(), sym));
+      if (val) {
+        push();
+      }
+    }
+    break;
+
+  case NODE_DEFINED:
+    codegen(s, tree, VAL);
+    break;
+
+  case NODE_BACK_REF:
+    if (val) {
+      char buf[2] = { '$' };
+      mrb_value str;
+      int sym;
+
+      buf[1] = (char)(intptr_t)tree;
+      str = mrb_str_new(s->mrb, buf, 2);
+      sym = new_sym(s, mrb_intern_str(s->mrb, str));
+      genop(s, MKOP_ABx(OP_GETGLOBAL, cursp(), sym));
+      push();
+    }
+    break;
+
+  case NODE_NTH_REF:
+    if (val) {
+      int sym;
+      mrb_state *mrb = s->mrb;
+      mrb_value fix = mrb_fixnum_value((intptr_t)tree);
+      mrb_value str = mrb_str_buf_new(mrb, 4);
+
+      mrb_str_cat_lit(mrb, str, "$");
+      mrb_str_cat_str(mrb, str, mrb_fixnum_to_str(mrb, fix, 10));
+      sym = new_sym(s, mrb_intern_str(mrb, str));
+      genop(s, MKOP_ABx(OP_GETGLOBAL, cursp(), sym));
+      push();
+    }
+    break;
+
+  case NODE_ARG:
+    /* should not happen */
+    break;
+
+  case NODE_BLOCK_ARG:
+    codegen(s, tree, VAL);
+    break;
+
+  case NODE_INT:
+    if (val) {
+      char *p = (char*)tree->car;
+      int base = (intptr_t)tree->cdr->car;
+      mrb_int i;
+      mrb_code co;
+      mrb_bool overflow;
+
+      i = readint_mrb_int(s, p, base, FALSE, &overflow);
+      if (overflow) {
+        double f = readint_float(s, p, base);
+        int off = new_lit(s, mrb_float_value(s->mrb, f));
+
+        genop(s, MKOP_ABx(OP_LOADL, cursp(), off));
+      }
+      else {
+        if (i < MAXARG_sBx && i > -MAXARG_sBx) {
+          co = MKOP_AsBx(OP_LOADI, cursp(), i);
+        }
+        else {
+          int off = new_lit(s, mrb_fixnum_value(i));
+          co = MKOP_ABx(OP_LOADL, cursp(), off);
+        }
+        genop(s, co);
+      }
+      push();
+    }
+    break;
+
+  case NODE_FLOAT:
+    if (val) {
+      char *p = (char*)tree;
+      mrb_float f = str_to_mrb_float(p);
+      int off = new_lit(s, mrb_float_value(s->mrb, f));
+
+      genop(s, MKOP_ABx(OP_LOADL, cursp(), off));
+      push();
+    }
+    break;
+
+  case NODE_NEGATE:
+    {
+      nt = (intptr_t)tree->car;
+      tree = tree->cdr;
+      switch (nt) {
+      case NODE_FLOAT:
+        {
+          char *p = (char*)tree;
+          mrb_float f = str_to_mrb_float(p);
+          int off = new_lit(s, mrb_float_value(s->mrb, -f));
+
+          genop(s, MKOP_ABx(OP_LOADL, cursp(), off));
+          push();
+        }
+        break;
+
+      case NODE_INT:
+        {
+          char *p = (char*)tree->car;
+          int base = (intptr_t)tree->cdr->car;
+          mrb_int i;
+          mrb_code co;
+          mrb_bool overflow;
+
+          i = readint_mrb_int(s, p, base, TRUE, &overflow);
+          if (overflow) {
+            double f = readint_float(s, p, base);
+            int off = new_lit(s, mrb_float_value(s->mrb, -f));
+
+            genop(s, MKOP_ABx(OP_LOADL, cursp(), off));
+          }
+          else {
+            if (i < MAXARG_sBx && i > -MAXARG_sBx) {
+              co = MKOP_AsBx(OP_LOADI, cursp(), i);
+            }
+            else {
+              int off = new_lit(s, mrb_fixnum_value(i));
+              co = MKOP_ABx(OP_LOADL, cursp(), off);
+            }
+            genop(s, co);
+          }
+          push();
+        }
+        break;
+
+      default:
+        {
+          int sym = new_msym(s, mrb_intern_lit(s->mrb, "-"));
+
+          genop(s, MKOP_ABx(OP_LOADI, cursp(), 0));
+          push();
+          codegen(s, tree, VAL);
+          pop(); pop();
+          genop(s, MKOP_ABC(OP_SUB, cursp(), sym, 2));
+        }
+        break;
+      }
+    }
+    break;
+
+  case NODE_STR:
+    if (val) {
+      char *p = (char*)tree->car;
+      size_t len = (intptr_t)tree->cdr;
+      int ai = mrb_gc_arena_save(s->mrb);
+      int off = new_lit(s, mrb_str_new(s->mrb, p, len));
+
+      mrb_gc_arena_restore(s->mrb, ai);
+      genop(s, MKOP_ABx(OP_STRING, cursp(), off));
+      push();
+    }
+    break;
+
+  case NODE_HEREDOC:
+    tree = ((struct mrb_parser_heredoc_info *)tree)->doc;
+    /* fall through */
+  case NODE_DSTR:
+    if (val) {
+      node *n = tree;
+
+      if (!n) break;
+      codegen(s, n->car, VAL);
+      n = n->cdr;
+      while (n) {
+        codegen(s, n->car, VAL);
+        pop(); pop();
+        genop_peep(s, MKOP_AB(OP_STRCAT, cursp(), cursp()+1), VAL);
+        push();
+        n = n->cdr;
+      }
+    }
+    else {
+      node *n = tree;
+
+      while (n) {
+        if ((intptr_t)n->car->car != NODE_STR) {
+          codegen(s, n->car, NOVAL);
+        }
+        n = n->cdr;
+      }
+    }
+    break;
+
+  case NODE_WORDS:
+    gen_literal_array(s, tree, FALSE, val);
+    break;
+
+  case NODE_SYMBOLS:
+    gen_literal_array(s, tree, TRUE, val);
+    break;
+
+  case NODE_DXSTR:
+    {
+      node *n;
+      int ai = mrb_gc_arena_save(s->mrb);
+      int sym = new_sym(s, mrb_intern_lit(s->mrb, "Kernel"));
+
+      if (val == NOVAL) { push(); }
+      genop(s, MKOP_A(OP_OCLASS, cursp()));
+      genop(s, MKOP_ABx(OP_GETMCNST, cursp(), sym));
+      push();
+      codegen(s, tree->car, VAL);
+      n = tree->cdr;
+      while (n) {
+        if ((intptr_t)n->car->car == NODE_XSTR) {
+          n->car->car = (struct mrb_ast_node*)(intptr_t)NODE_STR;
+          mrb_assert(!n->cdr); /* must be the end */
+        }
+        codegen(s, n->car, VAL);
+        pop(); pop();
+        genop_peep(s, MKOP_AB(OP_STRCAT, cursp(), cursp()+1), VAL);
+        push();
+        n = n->cdr;
+      }
+      pop();
+      pop();
+      sym = new_sym(s, mrb_intern_lit(s->mrb, "`"));
+      genop(s, MKOP_ABC(OP_SEND, cursp(), sym, 1));
+      if (val == NOVAL) { pop(); }
+      else { push(); }
+      mrb_gc_arena_restore(s->mrb, ai);
+    }
+    break;
+
+  case NODE_XSTR:
+    {
+      char *p = (char*)tree->car;
+      size_t len = (intptr_t)tree->cdr;
+      int ai = mrb_gc_arena_save(s->mrb);
+      int sym = new_sym(s, mrb_intern_lit(s->mrb, "Kernel"));
+      int off = new_lit(s, mrb_str_new(s->mrb, p, len));
+
+      if (val == NOVAL) { push(); }
+      genop(s, MKOP_A(OP_OCLASS, cursp()));
+      genop(s, MKOP_ABx(OP_GETMCNST, cursp(), sym));
+      push();
+      genop(s, MKOP_ABx(OP_STRING, cursp(), off));
+      pop();
+      sym = new_sym(s, mrb_intern_lit(s->mrb, "`"));
+      genop(s, MKOP_ABC(OP_SEND, cursp(), sym, 1));
+      if (val == NOVAL) { pop(); }
+      else { push(); }
+      mrb_gc_arena_restore(s->mrb, ai);
+    }
+    break;
+
+  case NODE_REGX:
+    if (val) {
+      char *p1 = (char*)tree->car;
+      char *p2 = (char*)tree->cdr->car;
+      char *p3 = (char*)tree->cdr->cdr;
+      int ai = mrb_gc_arena_save(s->mrb);
+      int sym = new_sym(s, mrb_intern_lit(s->mrb, REGEXP_CLASS));
+      int off = new_lit(s, mrb_str_new_cstr(s->mrb, p1));
+      int argc = 1;
+
+      genop(s, MKOP_A(OP_OCLASS, cursp()));
+      genop(s, MKOP_ABx(OP_GETMCNST, cursp(), sym));
+      push();
+      genop(s, MKOP_ABx(OP_STRING, cursp(), off));
+      if (p2 || p3) {
+        push();
+        if (p2) {
+          off = new_lit(s, mrb_str_new_cstr(s->mrb, p2));
+          genop(s, MKOP_ABx(OP_STRING, cursp(), off));
+        } else {
+          genop(s, MKOP_A(OP_LOADNIL, cursp()));
+        }
+        argc++;
+        if (p3) {
+          push();
+          off = new_lit(s, mrb_str_new(s->mrb, p3, 1));
+          genop(s, MKOP_ABx(OP_STRING, cursp(), off));
+          argc++;
+          pop();
+        }
+        pop();
+      }
+      pop();
+      sym = new_sym(s, mrb_intern_lit(s->mrb, "compile"));
+      genop(s, MKOP_ABC(OP_SEND, cursp(), sym, argc));
+      mrb_gc_arena_restore(s->mrb, ai);
+      push();
+    }
+    break;
+
+  case NODE_DREGX:
+    if (val) {
+      node *n = tree->car;
+      int ai = mrb_gc_arena_save(s->mrb);
+      int sym = new_sym(s, mrb_intern_lit(s->mrb, REGEXP_CLASS));
+      int argc = 1;
+      int off;
+      char *p;
+
+      genop(s, MKOP_A(OP_OCLASS, cursp()));
+      genop(s, MKOP_ABx(OP_GETMCNST, cursp(), sym));
+      push();
+      codegen(s, n->car, VAL);
+      n = n->cdr;
+      while (n) {
+        codegen(s, n->car, VAL);
+        pop(); pop();
+        genop_peep(s, MKOP_AB(OP_STRCAT, cursp(), cursp()+1), VAL);
+        push();
+        n = n->cdr;
+      }
+      n = tree->cdr->cdr;
+      if (n->car) {
+        p = (char*)n->car;
+        off = new_lit(s, mrb_str_new_cstr(s->mrb, p));
+        codegen(s, tree->car, VAL);
+        genop(s, MKOP_ABx(OP_STRING, cursp(), off));
+        pop();
+        genop_peep(s, MKOP_AB(OP_STRCAT, cursp(), cursp()+1), VAL);
+      }
+      if (n->cdr) {
+        char *p2 = (char*)n->cdr;
+
+        push();
+        off = new_lit(s, mrb_str_new_cstr(s->mrb, p2));
+        genop(s, MKOP_ABx(OP_STRING, cursp(), off));
+        argc++;
+        pop();
+      }
+      pop();
+      sym = new_sym(s, mrb_intern_lit(s->mrb, "compile"));
+      genop(s, MKOP_ABC(OP_SEND, cursp(), sym, argc));
+      mrb_gc_arena_restore(s->mrb, ai);
+      push();
+    }
+    else {
+      node *n = tree->car;
+
+      while (n) {
+        if ((intptr_t)n->car->car != NODE_STR) {
+          codegen(s, n->car, NOVAL);
+        }
+        n = n->cdr;
+      }
+    }
+    break;
+
+  case NODE_SYM:
+    if (val) {
+      int sym = new_sym(s, sym(tree));
+
+      genop(s, MKOP_ABx(OP_LOADSYM, cursp(), sym));
+      push();
+    }
+    break;
+
+  case NODE_DSYM:
+    codegen(s, tree, val);
+    if (val) {
+      gen_send_intern(s);
+    }
+    break;
+
+  case NODE_SELF:
+    if (val) {
+      genop(s, MKOP_A(OP_LOADSELF, cursp()));
+      push();
+    }
+    break;
+
+  case NODE_NIL:
+    if (val) {
+      genop(s, MKOP_A(OP_LOADNIL, cursp()));
+      push();
+    }
+    break;
+
+  case NODE_TRUE:
+    if (val) {
+      genop(s, MKOP_A(OP_LOADT, cursp()));
+      push();
+    }
+    break;
+
+  case NODE_FALSE:
+    if (val) {
+      genop(s, MKOP_A(OP_LOADF, cursp()));
+      push();
+    }
+    break;
+
+  case NODE_ALIAS:
+    {
+      int a = new_msym(s, sym(tree->car));
+      int b = new_msym(s, sym(tree->cdr));
+      int c = new_msym(s, mrb_intern_lit(s->mrb, "alias_method"));
+
+      genop(s, MKOP_A(OP_TCLASS, cursp()));
+      push();
+      genop(s, MKOP_ABx(OP_LOADSYM, cursp(), a));
+      push();
+      genop(s, MKOP_ABx(OP_LOADSYM, cursp(), b));
+      push();
+      genop(s, MKOP_A(OP_LOADNIL, cursp()));
+      pop_n(3);
+      genop(s, MKOP_ABC(OP_SEND, cursp(), c, 2));
+      if (val) {
+        push();
+      }
+    }
+   break;
+
+  case NODE_UNDEF:
+    {
+      int undef = new_msym(s, mrb_intern_lit(s->mrb, "undef_method"));
+      int num = 0;
+      node *t = tree;
+
+      genop(s, MKOP_A(OP_TCLASS, cursp()));
+      push();
+      while (t) {
+        int symbol = new_msym(s, sym(t->car));
+        genop(s, MKOP_ABx(OP_LOADSYM, cursp(), symbol));
+        push();
+        t = t->cdr;
+        num++;
+      }
+      pop_n(num + 1);
+      genop(s, MKOP_ABC(OP_SEND, cursp(), undef, num));
+      if (val) {
+        push();
+      }
+    }
+    break;
+
+  case NODE_CLASS:
+    {
+      int idx;
+
+      if (tree->car->car == (node*)0) {
+        genop(s, MKOP_A(OP_LOADNIL, cursp()));
+        push();
+      }
+      else if (tree->car->car == (node*)1) {
+        genop(s, MKOP_A(OP_OCLASS, cursp()));
+        push();
+      }
+      else {
+        codegen(s, tree->car->car, VAL);
+      }
+      if (tree->cdr->car) {
+        codegen(s, tree->cdr->car, VAL);
+      }
+      else {
+        genop(s, MKOP_A(OP_LOADNIL, cursp()));
+        push();
+      }
+      pop(); pop();
+      idx = new_msym(s, sym(tree->car->cdr));
+      genop(s, MKOP_AB(OP_CLASS, cursp(), idx));
+      idx = scope_body(s, tree->cdr->cdr->car, val);
+      genop(s, MKOP_ABx(OP_EXEC, cursp(), idx));
+      if (val) {
+        push();
+      }
+    }
+    break;
+
+  case NODE_MODULE:
+    {
+      int idx;
+
+      if (tree->car->car == (node*)0) {
+        genop(s, MKOP_A(OP_LOADNIL, cursp()));
+        push();
+      }
+      else if (tree->car->car == (node*)1) {
+        genop(s, MKOP_A(OP_OCLASS, cursp()));
+        push();
+      }
+      else {
+        codegen(s, tree->car->car, VAL);
+      }
+      pop();
+      idx = new_msym(s, sym(tree->car->cdr));
+      genop(s, MKOP_AB(OP_MODULE, cursp(), idx));
+      idx = scope_body(s, tree->cdr->car, val);
+      genop(s, MKOP_ABx(OP_EXEC, cursp(), idx));
+      if (val) {
+        push();
+      }
+    }
+    break;
+
+  case NODE_SCLASS:
+    {
+      int idx;
+
+      codegen(s, tree->car, VAL);
+      pop();
+      genop(s, MKOP_AB(OP_SCLASS, cursp(), cursp()));
+      idx = scope_body(s, tree->cdr->car, val);
+      genop(s, MKOP_ABx(OP_EXEC, cursp(), idx));
+      if (val) {
+        push();
+      }
+    }
+    break;
+
+  case NODE_DEF:
+    {
+      int sym = new_msym(s, sym(tree->car));
+      int idx = lambda_body(s, tree->cdr, 0);
+
+      genop(s, MKOP_A(OP_TCLASS, cursp()));
+      push();
+      genop(s, MKOP_Abc(OP_LAMBDA, cursp(), idx, OP_L_METHOD));
+      push(); pop();
+      pop();
+      genop(s, MKOP_AB(OP_METHOD, cursp(), sym));
+      if (val) {
+        genop(s, MKOP_ABx(OP_LOADSYM, cursp(), sym));
+        push();
+      }
+    }
+    break;
+
+  case NODE_SDEF:
+    {
+      node *recv = tree->car;
+      int sym = new_msym(s, sym(tree->cdr->car));
+      int idx = lambda_body(s, tree->cdr->cdr, 0);
+
+      codegen(s, recv, VAL);
+      pop();
+      genop(s, MKOP_AB(OP_SCLASS, cursp(), cursp()));
+      push();
+      genop(s, MKOP_Abc(OP_LAMBDA, cursp(), idx, OP_L_METHOD));
+      pop();
+      genop(s, MKOP_AB(OP_METHOD, cursp(), sym));
+      if (val) {
+        genop(s, MKOP_ABx(OP_LOADSYM, cursp(), sym));
+        push();
+      }
+    }
+    break;
+
+  case NODE_POSTEXE:
+    codegen(s, tree, NOVAL);
+    break;
+
+  default:
+    break;
+  }
+}
+
+static void
+scope_add_irep(codegen_scope *s, mrb_irep *irep)
+{
+  if (s->irep == NULL) {
+    s->irep = irep;
+    return;
+  }
+  if (s->irep->rlen == s->rcapa) {
+    s->rcapa *= 2;
+    s->irep->reps = (mrb_irep**)codegen_realloc(s, s->irep->reps, sizeof(mrb_irep*)*s->rcapa);
+  }
+  s->irep->reps[s->irep->rlen] = irep;
+  s->irep->rlen++;
+}
+
+static codegen_scope*
+scope_new(mrb_state *mrb, codegen_scope *prev, node *lv)
+{
+  static const codegen_scope codegen_scope_zero = { 0 };
+  mrb_pool *pool = mrb_pool_open(mrb);
+  codegen_scope *p = (codegen_scope *)mrb_pool_alloc(pool, sizeof(codegen_scope));
+
+  if (!p) return NULL;
+  *p = codegen_scope_zero;
+  p->mrb = mrb;
+  p->mpool = pool;
+  if (!prev) return p;
+  p->prev = prev;
+  p->ainfo = -1;
+  p->mscope = 0;
+
+  p->irep = mrb_add_irep(mrb);
+  scope_add_irep(prev, p->irep);
+
+  p->rcapa = 8;
+  p->irep->reps = (mrb_irep**)mrb_malloc(mrb, sizeof(mrb_irep*)*p->rcapa);
+
+  p->icapa = 1024;
+  p->iseq = (mrb_code*)mrb_malloc(mrb, sizeof(mrb_code)*p->icapa);
+  p->irep->iseq = p->iseq;
+
+  p->pcapa = 32;
+  p->irep->pool = (mrb_value*)mrb_malloc(mrb, sizeof(mrb_value)*p->pcapa);
+  p->irep->plen = 0;
+
+  p->scapa = 256;
+  p->irep->syms = (mrb_sym*)mrb_malloc(mrb, sizeof(mrb_sym)*p->scapa);
+  p->irep->slen = 0;
+
+  p->lv = lv;
+  p->sp += node_len(lv)+1;        /* add self */
+  p->nlocals = p->sp;
+  if (lv) {
+    node *n = lv;
+    size_t i = 0;
+
+    p->irep->lv = (struct mrb_locals*)mrb_malloc(mrb, sizeof(struct mrb_locals) * (p->nlocals - 1));
+    for (i=0, n=lv; n; i++,n=n->cdr) {
+      p->irep->lv[i].name = lv_name(n);
+      if (lv_name(n)) {
+        p->irep->lv[i].r = lv_idx(p, lv_name(n));
+      }
+      else {
+        p->irep->lv[i].r = 0;
+      }
+    }
+    mrb_assert(i + 1 == p->nlocals);
+  }
+  p->ai = mrb_gc_arena_save(mrb);
+
+  p->filename = prev->filename;
+  if (p->filename) {
+    p->lines = (uint16_t*)mrb_malloc(mrb, sizeof(short)*p->icapa);
+  }
+  p->lineno = prev->lineno;
+
+  /* debug setting */
+  p->debug_start_pos = 0;
+  if (p->filename) {
+    mrb_debug_info_alloc(mrb, p->irep);
+    p->irep->filename = p->filename;
+    p->irep->lines = p->lines;
+  }
+  else {
+    p->irep->debug_info = NULL;
+  }
+  p->parser = prev->parser;
+  p->filename_index = prev->filename_index;
+
+  return p;
+}
+
+static void
+scope_finish(codegen_scope *s)
+{
+  mrb_state *mrb = s->mrb;
+  mrb_irep *irep = s->irep;
+  size_t fname_len;
+  char *fname;
+
+  irep->flags = 0;
+  if (s->iseq) {
+    irep->iseq = (mrb_code *)codegen_realloc(s, s->iseq, sizeof(mrb_code)*s->pc);
+    irep->ilen = s->pc;
+    if (s->lines) {
+      irep->lines = (uint16_t *)codegen_realloc(s, s->lines, sizeof(uint16_t)*s->pc);
+    }
+    else {
+      irep->lines = 0;
+    }
+  }
+  irep->pool = (mrb_value*)codegen_realloc(s, irep->pool, sizeof(mrb_value)*irep->plen);
+  irep->syms = (mrb_sym*)codegen_realloc(s, irep->syms, sizeof(mrb_sym)*irep->slen);
+  irep->reps = (mrb_irep**)codegen_realloc(s, irep->reps, sizeof(mrb_irep*)*irep->rlen);
+  if (s->filename) {
+    s->irep->filename = mrb_parser_get_filename(s->parser, s->filename_index);
+    mrb_debug_info_append_file(mrb, s->irep, s->debug_start_pos, s->pc);
+
+    fname_len = strlen(s->filename);
+    fname = (char*)codegen_malloc(s, fname_len + 1);
+    memcpy(fname, s->filename, fname_len);
+    fname[fname_len] = '\0';
+    irep->filename = fname;
+  }
+
+  irep->nlocals = s->nlocals;
+  irep->nregs = s->nregs;
+
+  mrb_gc_arena_restore(mrb, s->ai);
+  mrb_pool_close(s->mpool);
+}
+
+static struct loopinfo*
+loop_push(codegen_scope *s, enum looptype t)
+{
+  struct loopinfo *p = (struct loopinfo *)codegen_palloc(s, sizeof(struct loopinfo));
+
+  p->type = t;
+  p->pc1 = p->pc2 = p->pc3 = 0;
+  p->prev = s->loop;
+  p->ensure_level = s->ensure_level;
+  p->acc = cursp();
+  s->loop = p;
+
+  return p;
+}
+
+static void
+loop_break(codegen_scope *s, node *tree)
+{
+  if (!s->loop) {
+    codegen(s, tree, NOVAL);
+    raise_error(s, "unexpected break");
+  }
+  else {
+    struct loopinfo *loop;
+
+    if (tree) {
+      codegen(s, tree, VAL);
+      pop();
+    }
+
+    loop = s->loop;
+    while (loop && loop->type == LOOP_BEGIN) {
+      genop_peep(s, MKOP_A(OP_POPERR, 1), NOVAL);
+      loop = loop->prev;
+    }
+    while (loop && loop->type == LOOP_RESCUE) {
+      loop = loop->prev;
+    }
+    if (!loop) {
+      codegen_error(s, "unexpected break");
+    }
+
+    if (loop->type == LOOP_NORMAL) {
+      int tmp;
+
+      if (s->ensure_level > s->loop->ensure_level) {
+        genop_peep(s, MKOP_A(OP_EPOP, s->ensure_level - s->loop->ensure_level), NOVAL);
+      }
+      if (tree) {
+        genop_peep(s, MKOP_AB(OP_MOVE, loop->acc, cursp()), NOVAL);
+      }
+      tmp = genop(s, MKOP_sBx(OP_JMP, loop->pc3));
+      loop->pc3 = tmp;
+    }
+    else {
+      genop(s, MKOP_AB(OP_RETURN, cursp(), OP_R_BREAK));
+    }
+  }
+}
+
+static void
+loop_pop(codegen_scope *s, int val)
+{
+  if (val) {
+    genop(s, MKOP_A(OP_LOADNIL, cursp()));
+  }
+  dispatch_linked(s, s->loop->pc3);
+  s->loop = s->loop->prev;
+  if (val) push();
+}
+
+MRB_API struct RProc*
+mrb_generate_code(mrb_state *mrb, parser_state *p)
+{
+  codegen_scope *scope = scope_new(mrb, 0, 0);
+  struct RProc *proc;
+
+  if (!scope) {
+    return NULL;
+  }
+  scope->mrb = mrb;
+  scope->parser = p;
+  scope->filename = p->filename;
+  scope->filename_index = p->current_filename_index;
+
+  MRB_TRY(&scope->jmp) {
+    /* prepare irep */
+    codegen(scope, p->tree, NOVAL);
+    proc = mrb_proc_new(mrb, scope->irep);
+    mrb_irep_decref(mrb, scope->irep);
+    mrb_pool_close(scope->mpool);
+    return proc;
+  }
+  MRB_CATCH(&scope->jmp) {
+    if (scope->filename == scope->irep->filename) {
+      scope->irep->filename = NULL;
+    }
+    mrb_irep_decref(mrb, scope->irep);
+    mrb_pool_close(scope->mpool);
+    return NULL;
+  }
+  MRB_END_EXC(&scope->jmp);
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/core/keywords
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/core/keywords	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/core/keywords	(revision 270)
@@ -0,0 +1,50 @@
+%{
+struct kwtable {const char *name; int id[2]; enum mrb_lex_state_enum state;};
+const struct kwtable *mrb_reserved_word(const char *, unsigned int);
+static const struct kwtable *reserved_word(const char *, unsigned int);
+#define mrb_reserved_word(str, len) reserved_word(str, len)
+%}
+
+struct kwtable;
+%%
+__ENCODING__, {keyword__ENCODING__, keyword__ENCODING__}, EXPR_END
+__FILE__,     {keyword__FILE__,     keyword__FILE__},     EXPR_END
+__LINE__,     {keyword__LINE__,     keyword__LINE__},     EXPR_END
+BEGIN,        {keyword_BEGIN,       keyword_BEGIN},       EXPR_END
+END,          {keyword_END,         keyword_END},         EXPR_END
+alias,        {keyword_alias,       keyword_alias},       EXPR_FNAME
+and,          {keyword_and,         keyword_and},         EXPR_VALUE
+begin,        {keyword_begin,       keyword_begin},       EXPR_BEG
+break,        {keyword_break,       keyword_break},       EXPR_MID
+case,         {keyword_case,        keyword_case},        EXPR_VALUE
+class,        {keyword_class,       keyword_class},       EXPR_CLASS
+def,          {keyword_def,         keyword_def},         EXPR_FNAME
+do,           {keyword_do,          keyword_do},          EXPR_BEG
+else,         {keyword_else,        keyword_else},        EXPR_BEG
+elsif,        {keyword_elsif,       keyword_elsif},       EXPR_VALUE
+end,          {keyword_end,         keyword_end},         EXPR_END
+ensure,       {keyword_ensure,      keyword_ensure},      EXPR_BEG
+false,        {keyword_false,       keyword_false},       EXPR_END
+for,          {keyword_for,         keyword_for},         EXPR_VALUE
+if,           {keyword_if,          modifier_if},         EXPR_VALUE
+in,           {keyword_in,          keyword_in},          EXPR_VALUE
+module,       {keyword_module,      keyword_module},      EXPR_VALUE
+next,         {keyword_next,        keyword_next},        EXPR_MID
+nil,          {keyword_nil,         keyword_nil},         EXPR_END
+not,          {keyword_not,         keyword_not},         EXPR_ARG
+or,           {keyword_or,          keyword_or},          EXPR_VALUE
+redo,         {keyword_redo,        keyword_redo},        EXPR_END
+rescue,       {keyword_rescue,      modifier_rescue},     EXPR_MID
+retry,        {keyword_retry,       keyword_retry},       EXPR_END
+return,       {keyword_return,      keyword_return},      EXPR_MID
+self,         {keyword_self,        keyword_self},        EXPR_END
+super,        {keyword_super,       keyword_super},       EXPR_ARG
+then,         {keyword_then,        keyword_then},        EXPR_BEG
+true,         {keyword_true,        keyword_true},        EXPR_END
+undef,        {keyword_undef,       keyword_undef},       EXPR_FNAME
+unless,       {keyword_unless,      modifier_unless},     EXPR_VALUE
+until,        {keyword_until,       modifier_until},      EXPR_VALUE
+when,         {keyword_when,        keyword_when},        EXPR_VALUE
+while,        {keyword_while,       modifier_while},      EXPR_VALUE
+yield,        {keyword_yield,       keyword_yield},       EXPR_ARG
+%%
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/core/lex.def
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/core/lex.def	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/core/lex.def	(revision 270)
@@ -0,0 +1,212 @@
+/* ANSI-C code produced by gperf version 3.0.4 */
+/* Command-line: gperf -L ANSI-C -C -p -j1 -i 1 -g -o -t -N mrb_reserved_word -k'1,3,$' /home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords  */
+
+#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+      && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+      && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
+      && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
+      && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
+      && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
+      && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
+      && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
+      && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
+      && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
+      && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
+      && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
+      && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
+      && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
+      && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
+      && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
+      && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
+      && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
+      && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
+      && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
+      && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
+      && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
+      && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
+/* The character set is not based on ISO-646.  */
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+#endif
+
+#line 1 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+
+struct kwtable {const char *name; int id[2]; enum mrb_lex_state_enum state;};
+const struct kwtable *mrb_reserved_word(const char *, unsigned int);
+static const struct kwtable *reserved_word(const char *, unsigned int);
+#define mrb_reserved_word(str, len) reserved_word(str, len)
+#line 8 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+struct kwtable;
+
+#define TOTAL_KEYWORDS 40
+#define MIN_WORD_LENGTH 2
+#define MAX_WORD_LENGTH 12
+#define MIN_HASH_VALUE 8
+#define MAX_HASH_VALUE 50
+/* maximum key range = 43, duplicates = 0 */
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static unsigned int
+hash (register const char *str, register unsigned int len)
+{
+  static const unsigned char asso_values[] =
+    {
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51, 14, 51, 16,  8,
+      11, 13, 51, 51, 51, 51, 10, 51, 13, 51,
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 11, 51, 13,  1, 26,
+       4,  1,  8, 28, 51, 23, 51,  1,  1, 27,
+       5, 19, 21, 51,  8,  3,  3, 11, 51, 21,
+      24, 16, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+      51, 51, 51, 51, 51, 51
+    };
+  register int hval = len;
+
+  switch (hval)
+    {
+      default:
+        hval += asso_values[(unsigned char)str[2]];
+      /*FALLTHROUGH*/
+      case 2:
+      case 1:
+        hval += asso_values[(unsigned char)str[0]];
+        break;
+    }
+  return hval + asso_values[(unsigned char)str[len - 1]];
+}
+
+#ifdef __GNUC__
+__inline
+#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
+__attribute__ ((__gnu_inline__))
+#endif
+#endif
+const struct kwtable *
+mrb_reserved_word (register const char *str, register unsigned int len)
+{
+  static const struct kwtable wordlist[] =
+    {
+      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
+#line 18 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"break",        {keyword_break,       keyword_break},       EXPR_MID},
+#line 23 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"else",         {keyword_else,        keyword_else},        EXPR_BEG},
+#line 33 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"nil",          {keyword_nil,         keyword_nil},         EXPR_END},
+#line 26 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"ensure",       {keyword_ensure,      keyword_ensure},      EXPR_BEG},
+#line 25 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"end",          {keyword_end,         keyword_end},         EXPR_END},
+#line 42 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"then",         {keyword_then,        keyword_then},        EXPR_BEG},
+#line 34 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"not",          {keyword_not,         keyword_not},         EXPR_ARG},
+#line 27 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"false",        {keyword_false,       keyword_false},       EXPR_END},
+#line 40 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"self",         {keyword_self,        keyword_self},        EXPR_END},
+#line 24 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"elsif",        {keyword_elsif,       keyword_elsif},       EXPR_VALUE},
+#line 37 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"rescue",       {keyword_rescue,      modifier_rescue},     EXPR_MID},
+#line 43 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"true",         {keyword_true,        keyword_true},        EXPR_END},
+#line 46 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"until",        {keyword_until,       modifier_until},      EXPR_VALUE},
+#line 45 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"unless",       {keyword_unless,      modifier_unless},     EXPR_VALUE},
+#line 39 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"return",       {keyword_return,      keyword_return},      EXPR_MID},
+#line 21 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"def",          {keyword_def,         keyword_def},         EXPR_FNAME},
+#line 16 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"and",          {keyword_and,         keyword_and},         EXPR_VALUE},
+#line 22 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"do",           {keyword_do,          keyword_do},          EXPR_BEG},
+#line 49 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"yield",        {keyword_yield,       keyword_yield},       EXPR_ARG},
+#line 28 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"for",          {keyword_for,         keyword_for},         EXPR_VALUE},
+#line 44 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"undef",        {keyword_undef,       keyword_undef},       EXPR_FNAME},
+#line 35 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"or",           {keyword_or,          keyword_or},          EXPR_VALUE},
+#line 30 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"in",           {keyword_in,          keyword_in},          EXPR_VALUE},
+#line 47 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"when",         {keyword_when,        keyword_when},        EXPR_VALUE},
+#line 38 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"retry",        {keyword_retry,       keyword_retry},       EXPR_END},
+#line 29 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"if",           {keyword_if,          modifier_if},         EXPR_VALUE},
+#line 19 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"case",         {keyword_case,        keyword_case},        EXPR_VALUE},
+#line 36 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"redo",         {keyword_redo,        keyword_redo},        EXPR_END},
+#line 32 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"next",         {keyword_next,        keyword_next},        EXPR_MID},
+#line 41 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"super",        {keyword_super,       keyword_super},       EXPR_ARG},
+#line 31 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"module",       {keyword_module,      keyword_module},      EXPR_VALUE},
+#line 17 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"begin",        {keyword_begin,       keyword_begin},       EXPR_BEG},
+#line 12 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"__LINE__",     {keyword__LINE__,     keyword__LINE__},     EXPR_END},
+#line 11 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"__FILE__",     {keyword__FILE__,     keyword__FILE__},     EXPR_END},
+#line 10 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"__ENCODING__", {keyword__ENCODING__, keyword__ENCODING__}, EXPR_END},
+#line 14 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"END",          {keyword_END,         keyword_END},         EXPR_END},
+#line 15 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"alias",        {keyword_alias,       keyword_alias},       EXPR_FNAME},
+#line 13 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"BEGIN",        {keyword_BEGIN,       keyword_BEGIN},       EXPR_END},
+      {""},
+#line 20 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"class",        {keyword_class,       keyword_class},       EXPR_CLASS},
+      {""}, {""},
+#line 48 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+      {"while",        {keyword_while,       modifier_while},      EXPR_VALUE}
+    };
+
+  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+    {
+      register int key = hash (str, len);
+
+      if (key <= MAX_HASH_VALUE && key >= 0)
+        {
+          register const char *s = wordlist[key].name;
+
+          if (*str == *s && !strcmp (str + 1, s + 1))
+            return &wordlist[key];
+        }
+    }
+  return 0;
+}
+#line 50 "/home/matz/work/mruby/mrbgems/mruby-compiler/core/keywords"
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/core/node.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/core/node.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/core/node.h	(revision 270)
@@ -0,0 +1,117 @@
+/*
+** node.h - nodes of abstract syntax tree
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef NODE_H
+#define NODE_H
+
+enum node_type {
+  NODE_METHOD,
+  NODE_FBODY,
+  NODE_CFUNC,
+  NODE_SCOPE,
+  NODE_BLOCK,
+  NODE_IF,
+  NODE_CASE,
+  NODE_WHEN,
+  NODE_OPT_N,
+  NODE_WHILE,
+  NODE_UNTIL,
+  NODE_ITER,
+  NODE_FOR,
+  NODE_BREAK,
+  NODE_NEXT,
+  NODE_REDO,
+  NODE_RETRY,
+  NODE_BEGIN,
+  NODE_RESCUE,
+  NODE_ENSURE,
+  NODE_AND,
+  NODE_OR,
+  NODE_NOT,
+  NODE_MASGN,
+  NODE_ASGN,
+  NODE_CDECL,
+  NODE_CVASGN,
+  NODE_CVDECL,
+  NODE_OP_ASGN,
+  NODE_CALL,
+  NODE_FCALL,
+  NODE_VCALL,
+  NODE_SUPER,
+  NODE_ZSUPER,
+  NODE_ARRAY,
+  NODE_ZARRAY,
+  NODE_HASH,
+  NODE_RETURN,
+  NODE_YIELD,
+  NODE_LVAR,
+  NODE_DVAR,
+  NODE_GVAR,
+  NODE_IVAR,
+  NODE_CONST,
+  NODE_CVAR,
+  NODE_NTH_REF,
+  NODE_BACK_REF,
+  NODE_MATCH,
+  NODE_MATCH2,
+  NODE_MATCH3,
+  NODE_INT,
+  NODE_FLOAT,
+  NODE_NEGATE,
+  NODE_LAMBDA,
+  NODE_SYM,
+  NODE_STR,
+  NODE_DSTR,
+  NODE_XSTR,
+  NODE_DXSTR,
+  NODE_REGX,
+  NODE_DREGX,
+  NODE_DREGX_ONCE,
+  NODE_LIST,
+  NODE_ARG,
+  NODE_ARGSCAT,
+  NODE_ARGSPUSH,
+  NODE_SPLAT,
+  NODE_TO_ARY,
+  NODE_SVALUE,
+  NODE_BLOCK_ARG,
+  NODE_DEF,
+  NODE_SDEF,
+  NODE_ALIAS,
+  NODE_UNDEF,
+  NODE_CLASS,
+  NODE_MODULE,
+  NODE_SCLASS,
+  NODE_COLON2,
+  NODE_COLON3,
+  NODE_CREF,
+  NODE_DOT2,
+  NODE_DOT3,
+  NODE_FLIP2,
+  NODE_FLIP3,
+  NODE_ATTRSET,
+  NODE_SELF,
+  NODE_NIL,
+  NODE_TRUE,
+  NODE_FALSE,
+  NODE_DEFINED,
+  NODE_NEWLINE,
+  NODE_POSTEXE,
+  NODE_ALLOCA,
+  NODE_DMETHOD,
+  NODE_BMETHOD,
+  NODE_MEMO,
+  NODE_IFUNC,
+  NODE_DSYM,
+  NODE_ATTRASGN,
+  NODE_HEREDOC,
+  NODE_LITERAL_DELIM,
+  NODE_WORDS,
+  NODE_SYMBOLS,
+  NODE_LAST
+};
+
+#endif  /* NODE_H */
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/core/parse.y
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/core/parse.y	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/core/parse.y	(revision 270)
@@ -0,0 +1,6436 @@
+/*
+** parse.y - mruby parser
+**
+** See Copyright Notice in mruby.h
+*/
+
+%{
+#undef PARSER_DEBUG
+#ifdef PARSER_DEBUG
+# define YYDEBUG 1
+#endif
+#define YYERROR_VERBOSE 1
+/*
+ * Force yacc to use our memory management.  This is a little evil because
+ * the macros assume that "parser_state *p" is in scope
+ */
+#define YYMALLOC(n)    mrb_malloc(p->mrb, (n))
+#define YYFREE(o)      mrb_free(p->mrb, (o))
+#define YYSTACK_USE_ALLOCA 0
+
+#include <ctype.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mruby.h"
+#include "mruby/compile.h"
+#include "mruby/proc.h"
+#include "mruby/error.h"
+#include "node.h"
+#include "mruby/throw.h"
+
+#define YYLEX_PARAM p
+
+typedef mrb_ast_node node;
+typedef struct mrb_parser_state parser_state;
+typedef struct mrb_parser_heredoc_info parser_heredoc_info;
+
+static int yyparse(parser_state *p);
+static int yylex(void *lval, parser_state *p);
+static void yyerror(parser_state *p, const char *s);
+static void yywarn(parser_state *p, const char *s);
+static void yywarning(parser_state *p, const char *s);
+static void backref_error(parser_state *p, node *n);
+static void tokadd(parser_state *p, int32_t c);
+
+#define identchar(c) (ISALNUM(c) || (c) == '_' || !ISASCII(c))
+
+typedef unsigned int stack_type;
+
+#define BITSTACK_PUSH(stack, n) ((stack) = ((stack)<<1)|((n)&1))
+#define BITSTACK_POP(stack)     ((stack) = (stack) >> 1)
+#define BITSTACK_LEXPOP(stack)  ((stack) = ((stack) >> 1) | ((stack) & 1))
+#define BITSTACK_SET_P(stack)   ((stack)&1)
+
+#define COND_PUSH(n)    BITSTACK_PUSH(p->cond_stack, (n))
+#define COND_POP()      BITSTACK_POP(p->cond_stack)
+#define COND_LEXPOP()   BITSTACK_LEXPOP(p->cond_stack)
+#define COND_P()        BITSTACK_SET_P(p->cond_stack)
+
+#define CMDARG_PUSH(n)  BITSTACK_PUSH(p->cmdarg_stack, (n))
+#define CMDARG_POP()    BITSTACK_POP(p->cmdarg_stack)
+#define CMDARG_LEXPOP() BITSTACK_LEXPOP(p->cmdarg_stack)
+#define CMDARG_P()      BITSTACK_SET_P(p->cmdarg_stack)
+
+#define SET_LINENO(c,n) ((c)->lineno = (n))
+#define NODE_LINENO(c,n) do {\
+  if (n) {\
+     (c)->filename_index = (n)->filename_index;\
+     (c)->lineno = (n)->lineno;\
+  }\
+} while (0)
+
+#define sym(x) ((mrb_sym)(intptr_t)(x))
+#define nsym(x) ((node*)(intptr_t)(x))
+
+static inline mrb_sym
+intern_cstr_gen(parser_state *p, const char *s)
+{
+  return mrb_intern_cstr(p->mrb, s);
+}
+#define intern_cstr(s) intern_cstr_gen(p,(s))
+
+static inline mrb_sym
+intern_gen(parser_state *p, const char *s, size_t len)
+{
+  return mrb_intern(p->mrb, s, len);
+}
+#define intern(s,len) intern_gen(p,(s),(len))
+
+static inline mrb_sym
+intern_gen_c(parser_state *p, const char c)
+{
+  return mrb_intern(p->mrb, &c, 1);
+}
+#define intern_c(c) intern_gen_c(p,(c))
+
+static void
+cons_free_gen(parser_state *p, node *cons)
+{
+  cons->cdr = p->cells;
+  p->cells = cons;
+}
+#define cons_free(c) cons_free_gen(p, (c))
+
+static void*
+parser_palloc(parser_state *p, size_t size)
+{
+  void *m = mrb_pool_alloc(p->pool, size);
+
+  if (!m) {
+    MRB_THROW(p->jmp);
+  }
+  return m;
+}
+
+static node*
+cons_gen(parser_state *p, node *car, node *cdr)
+{
+  node *c;
+
+  if (p->cells) {
+    c = p->cells;
+    p->cells = p->cells->cdr;
+  }
+  else {
+    c = (node *)parser_palloc(p, sizeof(mrb_ast_node));
+  }
+
+  c->car = car;
+  c->cdr = cdr;
+  c->lineno = p->lineno;
+  c->filename_index = p->current_filename_index;
+  return c;
+}
+#define cons(a,b) cons_gen(p,(a),(b))
+
+static node*
+list1_gen(parser_state *p, node *a)
+{
+  return cons(a, 0);
+}
+#define list1(a) list1_gen(p, (a))
+
+static node*
+list2_gen(parser_state *p, node *a, node *b)
+{
+  return cons(a, cons(b,0));
+}
+#define list2(a,b) list2_gen(p, (a),(b))
+
+static node*
+list3_gen(parser_state *p, node *a, node *b, node *c)
+{
+  return cons(a, cons(b, cons(c,0)));
+}
+#define list3(a,b,c) list3_gen(p, (a),(b),(c))
+
+static node*
+list4_gen(parser_state *p, node *a, node *b, node *c, node *d)
+{
+  return cons(a, cons(b, cons(c, cons(d, 0))));
+}
+#define list4(a,b,c,d) list4_gen(p, (a),(b),(c),(d))
+
+static node*
+list5_gen(parser_state *p, node *a, node *b, node *c, node *d, node *e)
+{
+  return cons(a, cons(b, cons(c, cons(d, cons(e, 0)))));
+}
+#define list5(a,b,c,d,e) list5_gen(p, (a),(b),(c),(d),(e))
+
+static node*
+list6_gen(parser_state *p, node *a, node *b, node *c, node *d, node *e, node *f)
+{
+  return cons(a, cons(b, cons(c, cons(d, cons(e, cons(f, 0))))));
+}
+#define list6(a,b,c,d,e,f) list6_gen(p, (a),(b),(c),(d),(e),(f))
+
+static node*
+append_gen(parser_state *p, node *a, node *b)
+{
+  node *c = a;
+
+  if (!a) return b;
+  while (c->cdr) {
+    c = c->cdr;
+  }
+  if (b) {
+    c->cdr = b;
+  }
+  return a;
+}
+#define append(a,b) append_gen(p,(a),(b))
+#define push(a,b) append_gen(p,(a),list1(b))
+
+static char*
+parser_strndup(parser_state *p, const char *s, size_t len)
+{
+  char *b = (char *)parser_palloc(p, len+1);
+
+  memcpy(b, s, len);
+  b[len] = '\0';
+  return b;
+}
+#undef strndup
+#define strndup(s,len) parser_strndup(p, s, len)
+
+static char*
+parser_strdup(parser_state *p, const char *s)
+{
+  return parser_strndup(p, s, strlen(s));
+}
+#undef strdup
+#define strdup(s) parser_strdup(p, s)
+
+/* xxx ----------------------------- */
+
+static node*
+local_switch(parser_state *p)
+{
+  node *prev = p->locals;
+
+  p->locals = cons(0, 0);
+  return prev;
+}
+
+static void
+local_resume(parser_state *p, node *prev)
+{
+  p->locals = prev;
+}
+
+static void
+local_nest(parser_state *p)
+{
+  p->locals = cons(0, p->locals);
+}
+
+static void
+local_unnest(parser_state *p)
+{
+  if (p->locals) {
+    p->locals = p->locals->cdr;
+  }
+}
+
+static mrb_bool
+local_var_p(parser_state *p, mrb_sym sym)
+{
+  node *l = p->locals;
+
+  while (l) {
+    node *n = l->car;
+    while (n) {
+      if (sym(n->car) == sym) return TRUE;
+      n = n->cdr;
+    }
+    l = l->cdr;
+  }
+  return FALSE;
+}
+
+static void
+local_add_f(parser_state *p, mrb_sym sym)
+{
+  if (p->locals) {
+    p->locals->car = push(p->locals->car, nsym(sym));
+  }
+}
+
+static void
+local_add(parser_state *p, mrb_sym sym)
+{
+  if (!local_var_p(p, sym)) {
+    local_add_f(p, sym);
+  }
+}
+
+static node*
+locals_node(parser_state *p)
+{
+  return p->locals ? p->locals->car : NULL;
+}
+
+/* (:scope (vars..) (prog...)) */
+static node*
+new_scope(parser_state *p, node *body)
+{
+  return cons((node*)NODE_SCOPE, cons(locals_node(p), body));
+}
+
+/* (:begin prog...) */
+static node*
+new_begin(parser_state *p, node *body)
+{
+  if (body) {
+    return list2((node*)NODE_BEGIN, body);
+  }
+  return cons((node*)NODE_BEGIN, 0);
+}
+
+#define newline_node(n) (n)
+
+/* (:rescue body rescue else) */
+static node*
+new_rescue(parser_state *p, node *body, node *resq, node *els)
+{
+  return list4((node*)NODE_RESCUE, body, resq, els);
+}
+
+/* (:ensure body ensure) */
+static node*
+new_ensure(parser_state *p, node *a, node *b)
+{
+  return cons((node*)NODE_ENSURE, cons(a, cons(0, b)));
+}
+
+/* (:nil) */
+static node*
+new_nil(parser_state *p)
+{
+  return list1((node*)NODE_NIL);
+}
+
+/* (:true) */
+static node*
+new_true(parser_state *p)
+{
+  return list1((node*)NODE_TRUE);
+}
+
+/* (:false) */
+static node*
+new_false(parser_state *p)
+{
+  return list1((node*)NODE_FALSE);
+}
+
+/* (:alias new old) */
+static node*
+new_alias(parser_state *p, mrb_sym a, mrb_sym b)
+{
+  return cons((node*)NODE_ALIAS, cons(nsym(a), nsym(b)));
+}
+
+/* (:if cond then else) */
+static node*
+new_if(parser_state *p, node *a, node *b, node *c)
+{
+  return list4((node*)NODE_IF, a, b, c);
+}
+
+/* (:unless cond then else) */
+static node*
+new_unless(parser_state *p, node *a, node *b, node *c)
+{
+  return list4((node*)NODE_IF, a, c, b);
+}
+
+/* (:while cond body) */
+static node*
+new_while(parser_state *p, node *a, node *b)
+{
+  return cons((node*)NODE_WHILE, cons(a, b));
+}
+
+/* (:until cond body) */
+static node*
+new_until(parser_state *p, node *a, node *b)
+{
+  return cons((node*)NODE_UNTIL, cons(a, b));
+}
+
+/* (:for var obj body) */
+static node*
+new_for(parser_state *p, node *v, node *o, node *b)
+{
+  return list4((node*)NODE_FOR, v, o, b);
+}
+
+/* (:case a ((when ...) body) ((when...) body)) */
+static node*
+new_case(parser_state *p, node *a, node *b)
+{
+  node *n = list2((node*)NODE_CASE, a);
+  node *n2 = n;
+
+  while (n2->cdr) {
+    n2 = n2->cdr;
+  }
+  n2->cdr = b;
+  return n;
+}
+
+/* (:postexe a) */
+static node*
+new_postexe(parser_state *p, node *a)
+{
+  return cons((node*)NODE_POSTEXE, a);
+}
+
+/* (:self) */
+static node*
+new_self(parser_state *p)
+{
+  return list1((node*)NODE_SELF);
+}
+
+/* (:call a b c) */
+static node*
+new_call(parser_state *p, node *a, mrb_sym b, node *c)
+{
+  node *n = list4((node*)NODE_CALL, a, nsym(b), c);
+  NODE_LINENO(n, a);
+  return n;
+}
+
+/* (:fcall self mid args) */
+static node*
+new_fcall(parser_state *p, mrb_sym b, node *c)
+{
+  node *n = new_self(p);
+  NODE_LINENO(n, c);
+  n = list4((node*)NODE_FCALL, n, nsym(b), c);
+  NODE_LINENO(n, c);
+  return n;
+}
+
+/* (:super . c) */
+static node*
+new_super(parser_state *p, node *c)
+{
+  return cons((node*)NODE_SUPER, c);
+}
+
+/* (:zsuper) */
+static node*
+new_zsuper(parser_state *p)
+{
+  return list1((node*)NODE_ZSUPER);
+}
+
+/* (:yield . c) */
+static node*
+new_yield(parser_state *p, node *c)
+{
+  if (c) {
+    if (c->cdr) {
+      yyerror(p, "both block arg and actual block given");
+    }
+    return cons((node*)NODE_YIELD, c->car);
+  }
+  return cons((node*)NODE_YIELD, 0);
+}
+
+/* (:return . c) */
+static node*
+new_return(parser_state *p, node *c)
+{
+  return cons((node*)NODE_RETURN, c);
+}
+
+/* (:break . c) */
+static node*
+new_break(parser_state *p, node *c)
+{
+  return cons((node*)NODE_BREAK, c);
+}
+
+/* (:next . c) */
+static node*
+new_next(parser_state *p, node *c)
+{
+  return cons((node*)NODE_NEXT, c);
+}
+
+/* (:redo) */
+static node*
+new_redo(parser_state *p)
+{
+  return list1((node*)NODE_REDO);
+}
+
+/* (:retry) */
+static node*
+new_retry(parser_state *p)
+{
+  return list1((node*)NODE_RETRY);
+}
+
+/* (:dot2 a b) */
+static node*
+new_dot2(parser_state *p, node *a, node *b)
+{
+  return cons((node*)NODE_DOT2, cons(a, b));
+}
+
+/* (:dot3 a b) */
+static node*
+new_dot3(parser_state *p, node *a, node *b)
+{
+  return cons((node*)NODE_DOT3, cons(a, b));
+}
+
+/* (:colon2 b c) */
+static node*
+new_colon2(parser_state *p, node *b, mrb_sym c)
+{
+  return cons((node*)NODE_COLON2, cons(b, nsym(c)));
+}
+
+/* (:colon3 . c) */
+static node*
+new_colon3(parser_state *p, mrb_sym c)
+{
+  return cons((node*)NODE_COLON3, nsym(c));
+}
+
+/* (:and a b) */
+static node*
+new_and(parser_state *p, node *a, node *b)
+{
+  return cons((node*)NODE_AND, cons(a, b));
+}
+
+/* (:or a b) */
+static node*
+new_or(parser_state *p, node *a, node *b)
+{
+  return cons((node*)NODE_OR, cons(a, b));
+}
+
+/* (:array a...) */
+static node*
+new_array(parser_state *p, node *a)
+{
+  return cons((node*)NODE_ARRAY, a);
+}
+
+/* (:splat . a) */
+static node*
+new_splat(parser_state *p, node *a)
+{
+  return cons((node*)NODE_SPLAT, a);
+}
+
+/* (:hash (k . v) (k . v)...) */
+static node*
+new_hash(parser_state *p, node *a)
+{
+  return cons((node*)NODE_HASH, a);
+}
+
+/* (:sym . a) */
+static node*
+new_sym(parser_state *p, mrb_sym sym)
+{
+  return cons((node*)NODE_SYM, nsym(sym));
+}
+
+static mrb_sym
+new_strsym(parser_state *p, node* str)
+{
+  const char *s = (const char*)str->cdr->car;
+  size_t len = (size_t)str->cdr->cdr;
+
+  return mrb_intern(p->mrb, s, len);
+}
+
+/* (:lvar . a) */
+static node*
+new_lvar(parser_state *p, mrb_sym sym)
+{
+  return cons((node*)NODE_LVAR, nsym(sym));
+}
+
+/* (:gvar . a) */
+static node*
+new_gvar(parser_state *p, mrb_sym sym)
+{
+  return cons((node*)NODE_GVAR, nsym(sym));
+}
+
+/* (:ivar . a) */
+static node*
+new_ivar(parser_state *p, mrb_sym sym)
+{
+  return cons((node*)NODE_IVAR, nsym(sym));
+}
+
+/* (:cvar . a) */
+static node*
+new_cvar(parser_state *p, mrb_sym sym)
+{
+  return cons((node*)NODE_CVAR, nsym(sym));
+}
+
+/* (:const . a) */
+static node*
+new_const(parser_state *p, mrb_sym sym)
+{
+  return cons((node*)NODE_CONST, nsym(sym));
+}
+
+/* (:undef a...) */
+static node*
+new_undef(parser_state *p, mrb_sym sym)
+{
+  return list2((node*)NODE_UNDEF, nsym(sym));
+}
+
+/* (:class class super body) */
+static node*
+new_class(parser_state *p, node *c, node *s, node *b)
+{
+  return list4((node*)NODE_CLASS, c, s, cons(locals_node(p), b));
+}
+
+/* (:sclass obj body) */
+static node*
+new_sclass(parser_state *p, node *o, node *b)
+{
+  return list3((node*)NODE_SCLASS, o, cons(locals_node(p), b));
+}
+
+/* (:module module body) */
+static node*
+new_module(parser_state *p, node *m, node *b)
+{
+  return list3((node*)NODE_MODULE, m, cons(locals_node(p), b));
+}
+
+/* (:def m lv (arg . body)) */
+static node*
+new_def(parser_state *p, mrb_sym m, node *a, node *b)
+{
+  return list5((node*)NODE_DEF, nsym(m), locals_node(p), a, b);
+}
+
+/* (:sdef obj m lv (arg . body)) */
+static node*
+new_sdef(parser_state *p, node *o, mrb_sym m, node *a, node *b)
+{
+  return list6((node*)NODE_SDEF, o, nsym(m), locals_node(p), a, b);
+}
+
+/* (:arg . sym) */
+static node*
+new_arg(parser_state *p, mrb_sym sym)
+{
+  return cons((node*)NODE_ARG, nsym(sym));
+}
+
+/* (m o r m2 b) */
+/* m: (a b c) */
+/* o: ((a . e1) (b . e2)) */
+/* r: a */
+/* m2: (a b c) */
+/* b: a */
+static node*
+new_args(parser_state *p, node *m, node *opt, mrb_sym rest, node *m2, mrb_sym blk)
+{
+  node *n;
+
+  n = cons(m2, nsym(blk));
+  n = cons(nsym(rest), n);
+  n = cons(opt, n);
+  return cons(m, n);
+}
+
+/* (:block_arg . a) */
+static node*
+new_block_arg(parser_state *p, node *a)
+{
+  return cons((node*)NODE_BLOCK_ARG, a);
+}
+
+/* (:block arg body) */
+static node*
+new_block(parser_state *p, node *a, node *b)
+{
+  return list4((node*)NODE_BLOCK, locals_node(p), a, b);
+}
+
+/* (:lambda arg body) */
+static node*
+new_lambda(parser_state *p, node *a, node *b)
+{
+  return list4((node*)NODE_LAMBDA, locals_node(p), a, b);
+}
+
+/* (:asgn lhs rhs) */
+static node*
+new_asgn(parser_state *p, node *a, node *b)
+{
+  return cons((node*)NODE_ASGN, cons(a, b));
+}
+
+/* (:masgn mlhs=(pre rest post)  mrhs) */
+static node*
+new_masgn(parser_state *p, node *a, node *b)
+{
+  return cons((node*)NODE_MASGN, cons(a, b));
+}
+
+/* (:asgn lhs rhs) */
+static node*
+new_op_asgn(parser_state *p, node *a, mrb_sym op, node *b)
+{
+  return list4((node*)NODE_OP_ASGN, a, nsym(op), b);
+}
+
+/* (:int . i) */
+static node*
+new_int(parser_state *p, const char *s, int base)
+{
+  return list3((node*)NODE_INT, (node*)strdup(s), (node*)(intptr_t)base);
+}
+
+/* (:float . i) */
+static node*
+new_float(parser_state *p, const char *s)
+{
+  return cons((node*)NODE_FLOAT, (node*)strdup(s));
+}
+
+/* (:str . (s . len)) */
+static node*
+new_str(parser_state *p, const char *s, int len)
+{
+  return cons((node*)NODE_STR, cons((node*)strndup(s, len), (node*)(intptr_t)len));
+}
+
+/* (:dstr . a) */
+static node*
+new_dstr(parser_state *p, node *a)
+{
+  return cons((node*)NODE_DSTR, a);
+}
+
+/* (:str . (s . len)) */
+static node*
+new_xstr(parser_state *p, const char *s, int len)
+{
+  return cons((node*)NODE_XSTR, cons((node*)strndup(s, len), (node*)(intptr_t)len));
+}
+
+/* (:xstr . a) */
+static node*
+new_dxstr(parser_state *p, node *a)
+{
+  return cons((node*)NODE_DXSTR, a);
+}
+
+/* (:dsym . a) */
+static node*
+new_dsym(parser_state *p, node *a)
+{
+  return cons((node*)NODE_DSYM, new_dstr(p, a));
+}
+
+/* (:str . (a . a)) */
+static node*
+new_regx(parser_state *p, const char *p1, const char* p2, const char* p3)
+{
+  return cons((node*)NODE_REGX, cons((node*)p1, cons((node*)p2, (node*)p3)));
+}
+
+/* (:dregx . a) */
+static node*
+new_dregx(parser_state *p, node *a, node *b)
+{
+  return cons((node*)NODE_DREGX, cons(a, b));
+}
+
+/* (:backref . n) */
+static node*
+new_back_ref(parser_state *p, int n)
+{
+  return cons((node*)NODE_BACK_REF, (node*)(intptr_t)n);
+}
+
+/* (:nthref . n) */
+static node*
+new_nth_ref(parser_state *p, int n)
+{
+  return cons((node*)NODE_NTH_REF, (node*)(intptr_t)n);
+}
+
+/* (:heredoc . a) */
+static node*
+new_heredoc(parser_state *p)
+{
+  parser_heredoc_info *inf = (parser_heredoc_info *)parser_palloc(p, sizeof(parser_heredoc_info));
+  return cons((node*)NODE_HEREDOC, (node*)inf);
+}
+
+static void
+new_bv(parser_state *p, mrb_sym id)
+{
+}
+
+static node*
+new_literal_delim(parser_state *p)
+{
+  return cons((node*)NODE_LITERAL_DELIM, 0);
+}
+
+/* (:words . a) */
+static node*
+new_words(parser_state *p, node *a)
+{
+  return cons((node*)NODE_WORDS, a);
+}
+
+/* (:symbols . a) */
+static node*
+new_symbols(parser_state *p, node *a)
+{
+  return cons((node*)NODE_SYMBOLS, a);
+}
+
+/* xxx ----------------------------- */
+
+/* (:call a op) */
+static node*
+call_uni_op(parser_state *p, node *recv, const char *m)
+{
+  return new_call(p, recv, intern_cstr(m), 0);
+}
+
+/* (:call a op b) */
+static node*
+call_bin_op(parser_state *p, node *recv, const char *m, node *arg1)
+{
+  return new_call(p, recv, intern_cstr(m), list1(list1(arg1)));
+}
+
+static void
+args_with_block(parser_state *p, node *a, node *b)
+{
+  if (b) {
+    if (a->cdr) {
+      yyerror(p, "both block arg and actual block given");
+    }
+    a->cdr = b;
+  }
+}
+
+static void
+call_with_block(parser_state *p, node *a, node *b)
+{
+  node *n;
+
+  if (a->car == (node*)NODE_SUPER ||
+      a->car == (node*)NODE_ZSUPER) {
+    if (!a->cdr) a->cdr = cons(0, b);
+    else {
+      args_with_block(p, a->cdr, b);
+    }
+  }
+  else {
+    n = a->cdr->cdr->cdr;
+    if (!n->car) n->car = cons(0, b);
+    else {
+      args_with_block(p, n->car, b);
+    }
+  }
+}
+
+static node*
+negate_lit(parser_state *p, node *n)
+{
+  return cons((node*)NODE_NEGATE, n);
+}
+
+static node*
+cond(node *n)
+{
+  return n;
+}
+
+static node*
+ret_args(parser_state *p, node *n)
+{
+  if (n->cdr) {
+    yyerror(p, "block argument should not be given");
+    return NULL;
+  }
+  if (!n->car->cdr) return n->car->car;
+  return new_array(p, n->car);
+}
+
+static void
+assignable(parser_state *p, node *lhs)
+{
+  if ((int)(intptr_t)lhs->car == NODE_LVAR) {
+    local_add(p, sym(lhs->cdr));
+  }
+}
+
+static node*
+var_reference(parser_state *p, node *lhs)
+{
+  node *n;
+
+  if ((int)(intptr_t)lhs->car == NODE_LVAR) {
+    if (!local_var_p(p, sym(lhs->cdr))) {
+      n = new_fcall(p, sym(lhs->cdr), 0);
+      cons_free(lhs);
+      return n;
+    }
+  }
+
+  return lhs;
+}
+
+typedef enum mrb_string_type  string_type;
+
+static node*
+new_strterm(parser_state *p, string_type type, int term, int paren)
+{
+  return cons((node*)(intptr_t)type, cons((node*)0, cons((node*)(intptr_t)paren, (node*)(intptr_t)term)));
+}
+
+static void
+end_strterm(parser_state *p)
+{
+  cons_free(p->lex_strterm->cdr->cdr);
+  cons_free(p->lex_strterm->cdr);
+  cons_free(p->lex_strterm);
+  p->lex_strterm = NULL;
+}
+
+static parser_heredoc_info *
+parsing_heredoc_inf(parser_state *p)
+{
+  node *nd = p->parsing_heredoc;
+  if (nd == NULL)
+    return NULL;
+  /* mrb_assert(nd->car->car == NODE_HEREDOC); */
+  return (parser_heredoc_info*)nd->car->cdr;
+}
+
+static void
+heredoc_treat_nextline(parser_state *p)
+{
+  if (p->heredocs_from_nextline == NULL)
+    return;
+  if (p->parsing_heredoc == NULL) {
+    node *n;
+    p->parsing_heredoc = p->heredocs_from_nextline;
+    p->lex_strterm_before_heredoc = p->lex_strterm;
+    p->lex_strterm = new_strterm(p, parsing_heredoc_inf(p)->type, 0, 0);
+    n = p->all_heredocs;
+    if (n) {
+      while (n->cdr)
+        n = n->cdr;
+      n->cdr = p->parsing_heredoc;
+    }
+    else {
+      p->all_heredocs = p->parsing_heredoc;
+    }
+  }
+  else {
+    node *n, *m;
+    m = p->heredocs_from_nextline;
+    while (m->cdr)
+      m = m->cdr;
+    n = p->all_heredocs;
+    mrb_assert(n != NULL);
+    if (n == p->parsing_heredoc) {
+      m->cdr = n;
+      p->all_heredocs = p->heredocs_from_nextline;
+      p->parsing_heredoc = p->heredocs_from_nextline;
+    }
+    else {
+      while (n->cdr != p->parsing_heredoc) {
+        n = n->cdr;
+        mrb_assert(n != NULL);
+      }
+      m->cdr = n->cdr;
+      n->cdr = p->heredocs_from_nextline;
+      p->parsing_heredoc = p->heredocs_from_nextline;
+    }
+  }
+  p->heredocs_from_nextline = NULL;
+}
+
+static void
+heredoc_end(parser_state *p)
+{
+  p->parsing_heredoc = p->parsing_heredoc->cdr;
+  if (p->parsing_heredoc == NULL) {
+    p->lstate = EXPR_BEG;
+    p->cmd_start = TRUE;
+    end_strterm(p);
+    p->lex_strterm = p->lex_strterm_before_heredoc;
+    p->lex_strterm_before_heredoc = NULL;
+    p->heredoc_end_now = TRUE;
+  }
+  else {
+    /* next heredoc */
+    p->lex_strterm->car = (node*)(intptr_t)parsing_heredoc_inf(p)->type;
+  }
+}
+#define is_strterm_type(p,str_func) ((int)(intptr_t)((p)->lex_strterm->car) & (str_func))
+
+/* xxx ----------------------------- */
+
+%}
+
+%pure-parser
+%parse-param {parser_state *p}
+%lex-param {parser_state *p}
+
+%union {
+    node *nd;
+    mrb_sym id;
+    int num;
+    stack_type stack;
+    const struct vtable *vars;
+}
+
+%token <num>
+        keyword_class
+        keyword_module
+        keyword_def
+        keyword_begin
+        keyword_if
+        keyword_unless
+        keyword_while
+        keyword_until
+        keyword_for
+
+%token
+        keyword_undef
+        keyword_rescue
+        keyword_ensure
+        keyword_end
+        keyword_then
+        keyword_elsif
+        keyword_else
+        keyword_case
+        keyword_when
+        keyword_break
+        keyword_next
+        keyword_redo
+        keyword_retry
+        keyword_in
+        keyword_do
+        keyword_do_cond
+        keyword_do_block
+        keyword_do_LAMBDA
+        keyword_return
+        keyword_yield
+        keyword_super
+        keyword_self
+        keyword_nil
+        keyword_true
+        keyword_false
+        keyword_and
+        keyword_or
+        keyword_not
+        modifier_if
+        modifier_unless
+        modifier_while
+        modifier_until
+        modifier_rescue
+        keyword_alias
+        keyword_BEGIN
+        keyword_END
+        keyword__LINE__
+        keyword__FILE__
+        keyword__ENCODING__
+
+%token <id>  tIDENTIFIER tFID tGVAR tIVAR tCONSTANT tCVAR tLABEL
+%token <nd>  tINTEGER tFLOAT tCHAR tXSTRING tREGEXP
+%token <nd>  tSTRING tSTRING_PART tSTRING_MID
+%token <nd>  tNTH_REF tBACK_REF
+%token <num> tREGEXP_END
+
+%type <nd> singleton string string_rep string_interp xstring regexp
+%type <nd> literal numeric cpath symbol
+%type <nd> top_compstmt top_stmts top_stmt
+%type <nd> bodystmt compstmt stmts stmt expr arg primary command command_call method_call
+%type <nd> expr_value arg_value primary_value
+%type <nd> if_tail opt_else case_body cases opt_rescue exc_list exc_var opt_ensure
+%type <nd> args call_args opt_call_args
+%type <nd> paren_args opt_paren_args variable
+%type <nd> command_args aref_args opt_block_arg block_arg var_ref var_lhs
+%type <nd> command_asgn mrhs superclass block_call block_command
+%type <nd> f_block_optarg f_block_opt
+%type <nd> f_arglist f_args f_arg f_arg_item f_optarg f_marg f_marg_list f_margs
+%type <nd> assoc_list assocs assoc undef_list backref for_var
+%type <nd> block_param opt_block_param block_param_def f_opt
+%type <nd> bv_decls opt_bv_decl bvar f_larglist lambda_body
+%type <nd> brace_block cmd_brace_block do_block lhs none f_bad_arg
+%type <nd> mlhs mlhs_list mlhs_post mlhs_basic mlhs_item mlhs_node mlhs_inner
+%type <id> fsym sym basic_symbol operation operation2 operation3
+%type <id> cname fname op f_rest_arg f_block_arg opt_f_block_arg f_norm_arg f_opt_asgn
+%type <nd> heredoc words symbols
+
+%token tUPLUS             /* unary+ */
+%token tUMINUS            /* unary- */
+%token tPOW               /* ** */
+%token tCMP               /* <=> */
+%token tEQ                /* == */
+%token tEQQ               /* === */
+%token tNEQ               /* != */
+%token tGEQ               /* >= */
+%token tLEQ               /* <= */
+%token tANDOP tOROP       /* && and || */
+%token tMATCH tNMATCH     /* =~ and !~ */
+%token tDOT2 tDOT3        /* .. and ... */
+%token tAREF tASET        /* [] and []= */
+%token tLSHFT tRSHFT      /* << and >> */
+%token tCOLON2            /* :: */
+%token tCOLON3            /* :: at EXPR_BEG */
+%token <id> tOP_ASGN      /* +=, -=  etc. */
+%token tASSOC             /* => */
+%token tLPAREN            /* ( */
+%token tLPAREN_ARG        /* ( */
+%token tRPAREN            /* ) */
+%token tLBRACK            /* [ */
+%token tLBRACE            /* { */
+%token tLBRACE_ARG        /* { */
+%token tSTAR              /* * */
+%token tAMPER             /* & */
+%token tLAMBDA            /* -> */
+%token tSYMBEG tREGEXP_BEG tWORDS_BEG tSYMBOLS_BEG
+%token tSTRING_BEG tXSTRING_BEG tSTRING_DVAR tLAMBEG
+%token <nd> tHEREDOC_BEG  /* <<, <<- */
+%token tHEREDOC_END tLITERAL_DELIM tHD_LITERAL_DELIM
+%token <nd> tHD_STRING_PART tHD_STRING_MID
+
+/*
+ * precedence table
+ */
+
+%nonassoc tLOWEST
+%nonassoc tLBRACE_ARG
+
+%nonassoc  modifier_if modifier_unless modifier_while modifier_until
+%left  keyword_or keyword_and
+%right keyword_not
+%right '=' tOP_ASGN
+%left modifier_rescue
+%right '?' ':'
+%nonassoc tDOT2 tDOT3
+%left  tOROP
+%left  tANDOP
+%nonassoc  tCMP tEQ tEQQ tNEQ tMATCH tNMATCH
+%left  '>' tGEQ '<' tLEQ
+%left  '|' '^'
+%left  '&'
+%left  tLSHFT tRSHFT
+%left  '+' '-'
+%left  '*' '/' '%'
+%right tUMINUS_NUM tUMINUS
+%right tPOW
+%right '!' '~' tUPLUS
+
+%token tLAST_TOKEN
+
+%%
+program         :   {
+                      p->lstate = EXPR_BEG;
+                      if (!p->locals) p->locals = cons(0,0);
+                    }
+                  top_compstmt
+                    {
+                      p->tree = new_scope(p, $2);
+                      NODE_LINENO(p->tree, $2);
+                    }
+                ;
+
+top_compstmt    : top_stmts opt_terms
+                    {
+                      $$ = $1;
+                    }
+                ;
+
+top_stmts       : none
+                    {
+                      $$ = new_begin(p, 0);
+                    }
+                | top_stmt
+                    {
+                      $$ = new_begin(p, $1);
+                      NODE_LINENO($$, $1);
+                    }
+                | top_stmts terms top_stmt
+                    {
+                      $$ = push($1, newline_node($3));
+                    }
+                | error top_stmt
+                    {
+                      $$ = new_begin(p, 0);
+                    }
+                ;
+
+top_stmt        : stmt
+                | keyword_BEGIN
+                    {
+                      $<nd>$ = local_switch(p);
+                    }
+                  '{' top_compstmt '}'
+                    {
+                      yyerror(p, "BEGIN not supported");
+                      local_resume(p, $<nd>2);
+                      $$ = 0;
+                    }
+                ;
+
+bodystmt        : compstmt
+                  opt_rescue
+                  opt_else
+                  opt_ensure
+                    {
+                      if ($2) {
+                        $$ = new_rescue(p, $1, $2, $3);
+                        NODE_LINENO($$, $1);
+                      }
+                      else if ($3) {
+                        yywarn(p, "else without rescue is useless");
+                        $$ = push($1, $3);
+                      }
+                      else {
+                        $$ = $1;
+                      }
+                      if ($4) {
+                        if ($$) {
+                          $$ = new_ensure(p, $$, $4);
+                        }
+                        else {
+                          $$ = push($4, new_nil(p));
+                        }
+                      }
+                    }
+                ;
+
+compstmt        : stmts opt_terms
+                    {
+                      $$ = $1;
+                    }
+                ;
+
+stmts           : none
+                    {
+                      $$ = new_begin(p, 0);
+                    }
+                | stmt
+                    {
+                      $$ = new_begin(p, $1);
+                      NODE_LINENO($$, $1);
+                    }
+                | stmts terms stmt
+                    {
+                      $$ = push($1, newline_node($3));
+                    }
+                | error stmt
+                    {
+                      $$ = new_begin(p, $2);
+                    }
+                ;
+
+stmt            : keyword_alias fsym {p->lstate = EXPR_FNAME;} fsym
+                    {
+                      $$ = new_alias(p, $2, $4);
+                    }
+                | keyword_undef undef_list
+                    {
+                      $$ = $2;
+                    }
+                | stmt modifier_if expr_value
+                    {
+                      $$ = new_if(p, cond($3), $1, 0);
+                    }
+                | stmt modifier_unless expr_value
+                    {
+                      $$ = new_unless(p, cond($3), $1, 0);
+                    }
+                | stmt modifier_while expr_value
+                    {
+                      $$ = new_while(p, cond($3), $1);
+                    }
+                | stmt modifier_until expr_value
+                    {
+                      $$ = new_until(p, cond($3), $1);
+                    }
+                | stmt modifier_rescue stmt
+                    {
+                      $$ = new_rescue(p, $1, list1(list3(0, 0, $3)), 0);
+                    }
+                | keyword_END '{' compstmt '}'
+                    {
+                      yyerror(p, "END not suported");
+                      $$ = new_postexe(p, $3);
+                    }
+                | command_asgn
+                | mlhs '=' command_call
+                    {
+                      $$ = new_masgn(p, $1, $3);
+                    }
+                | var_lhs tOP_ASGN command_call
+                    {
+                      $$ = new_op_asgn(p, $1, $2, $3);
+                    }
+                | primary_value '[' opt_call_args rbracket tOP_ASGN command_call
+                    {
+                      $$ = new_op_asgn(p, new_call(p, $1, intern("[]",2), $3), $5, $6);
+                    }
+                | primary_value '.' tIDENTIFIER tOP_ASGN command_call
+                    {
+                      $$ = new_op_asgn(p, new_call(p, $1, $3, 0), $4, $5);
+                    }
+                | primary_value '.' tCONSTANT tOP_ASGN command_call
+                    {
+                      $$ = new_op_asgn(p, new_call(p, $1, $3, 0), $4, $5);
+                    }
+                | primary_value tCOLON2 tCONSTANT tOP_ASGN command_call
+                    {
+                      yyerror(p, "constant re-assignment");
+                      $$ = 0;
+                    }
+                | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call
+                    {
+                      $$ = new_op_asgn(p, new_call(p, $1, $3, 0), $4, $5);
+                    }
+                | backref tOP_ASGN command_call
+                    {
+                      backref_error(p, $1);
+                      $$ = new_begin(p, 0);
+                    }
+                | lhs '=' mrhs
+                    {
+                      $$ = new_asgn(p, $1, new_array(p, $3));
+                    }
+                | mlhs '=' arg_value
+                    {
+                      $$ = new_masgn(p, $1, $3);
+                    }
+                | mlhs '=' mrhs
+                    {
+                      $$ = new_masgn(p, $1, new_array(p, $3));
+                    }
+                | expr
+                ;
+
+command_asgn    : lhs '=' command_call
+                    {
+                      $$ = new_asgn(p, $1, $3);
+                    }
+                | lhs '=' command_asgn
+                    {
+                      $$ = new_asgn(p, $1, $3);
+                    }
+                ;
+
+
+expr            : command_call
+                | expr keyword_and expr
+                    {
+                      $$ = new_and(p, $1, $3);
+                    }
+                | expr keyword_or expr
+                    {
+                      $$ = new_or(p, $1, $3);
+                    }
+                | keyword_not opt_nl expr
+                    {
+                      $$ = call_uni_op(p, cond($3), "!");
+                    }
+                | '!' command_call
+                    {
+                      $$ = call_uni_op(p, cond($2), "!");
+                    }
+                | arg
+                ;
+
+expr_value      : expr
+                    {
+                      if (!$1) $$ = new_nil(p);
+                      else $$ = $1;
+                    }
+                ;
+
+command_call    : command
+                | block_command
+                ;
+
+block_command   : block_call
+                | block_call dot_or_colon operation2 command_args
+                ;
+
+cmd_brace_block : tLBRACE_ARG
+                    {
+                      local_nest(p);
+                    }
+                  opt_block_param
+                  compstmt
+                  '}'
+                    {
+                      $$ = new_block(p, $3, $4);
+                      local_unnest(p);
+                    }
+                ;
+
+command         : operation command_args       %prec tLOWEST
+                    {
+                      $$ = new_fcall(p, $1, $2);
+                    }
+                | operation command_args cmd_brace_block
+                    {
+                      args_with_block(p, $2, $3);
+                      $$ = new_fcall(p, $1, $2);
+                    }
+                | primary_value '.' operation2 command_args     %prec tLOWEST
+                    {
+                      $$ = new_call(p, $1, $3, $4);
+                    }
+                | primary_value '.' operation2 command_args cmd_brace_block
+                    {
+                      args_with_block(p, $4, $5);
+                      $$ = new_call(p, $1, $3, $4);
+                   }
+                | primary_value tCOLON2 operation2 command_args %prec tLOWEST
+                    {
+                      $$ = new_call(p, $1, $3, $4);
+                    }
+                | primary_value tCOLON2 operation2 command_args cmd_brace_block
+                    {
+                      args_with_block(p, $4, $5);
+                      $$ = new_call(p, $1, $3, $4);
+                    }
+                | keyword_super command_args
+                    {
+                      $$ = new_super(p, $2);
+                    }
+                | keyword_yield command_args
+                    {
+                      $$ = new_yield(p, $2);
+                    }
+                | keyword_return call_args
+                    {
+                      $$ = new_return(p, ret_args(p, $2));
+                    }
+                | keyword_break call_args
+                    {
+                      $$ = new_break(p, ret_args(p, $2));
+                    }
+                | keyword_next call_args
+                    {
+                      $$ = new_next(p, ret_args(p, $2));
+                    }
+                ;
+
+mlhs            : mlhs_basic
+                    {
+                      $$ = $1;
+                    }
+                | tLPAREN mlhs_inner rparen
+                    {
+                      $$ = $2;
+                    }
+                ;
+
+mlhs_inner      : mlhs_basic
+                | tLPAREN mlhs_inner rparen
+                    {
+                      $$ = $2;
+                    }
+                ;
+
+mlhs_basic      : mlhs_list
+                    {
+                      $$ = list1($1);
+                    }
+                | mlhs_list mlhs_item
+                    {
+                      $$ = list1(push($1,$2));
+                    }
+                | mlhs_list tSTAR mlhs_node
+                    {
+                      $$ = list2($1, $3);
+                    }
+                | mlhs_list tSTAR mlhs_node ',' mlhs_post
+                    {
+                      $$ = list3($1, $3, $5);
+                    }
+                | mlhs_list tSTAR
+                    {
+                      $$ = list2($1, new_nil(p));
+                    }
+                | mlhs_list tSTAR ',' mlhs_post
+                    {
+                      $$ = list3($1, new_nil(p), $4);
+                    }
+                | tSTAR mlhs_node
+                    {
+                      $$ = list2(0, $2);
+                    }
+                | tSTAR mlhs_node ',' mlhs_post
+                    {
+                      $$ = list3(0, $2, $4);
+                    }
+                | tSTAR
+                    {
+                      $$ = list2(0, new_nil(p));
+                    }
+                | tSTAR ',' mlhs_post
+                    {
+                      $$ = list3(0, new_nil(p), $3);
+                    }
+                ;
+
+mlhs_item       : mlhs_node
+                | tLPAREN mlhs_inner rparen
+                    {
+                      $$ = new_masgn(p, $2, NULL);
+                    }
+                ;
+
+mlhs_list       : mlhs_item ','
+                    {
+                      $$ = list1($1);
+                    }
+                | mlhs_list mlhs_item ','
+                    {
+                      $$ = push($1, $2);
+                    }
+                ;
+
+mlhs_post       : mlhs_item
+                    {
+                      $$ = list1($1);
+                    }
+                | mlhs_list mlhs_item
+                    {
+                      $$ = push($1, $2);
+                    }
+                ;
+
+mlhs_node       : variable
+                    {
+                      assignable(p, $1);
+                    }
+                | primary_value '[' opt_call_args rbracket
+                    {
+                      $$ = new_call(p, $1, intern("[]",2), $3);
+                    }
+                | primary_value '.' tIDENTIFIER
+                    {
+                      $$ = new_call(p, $1, $3, 0);
+                    }
+                | primary_value tCOLON2 tIDENTIFIER
+                    {
+                      $$ = new_call(p, $1, $3, 0);
+                    }
+                | primary_value '.' tCONSTANT
+                    {
+                      $$ = new_call(p, $1, $3, 0);
+                    }
+                | primary_value tCOLON2 tCONSTANT
+                    {
+                      if (p->in_def || p->in_single)
+                        yyerror(p, "dynamic constant assignment");
+                      $$ = new_colon2(p, $1, $3);
+                    }
+                | tCOLON3 tCONSTANT
+                    {
+                      if (p->in_def || p->in_single)
+                        yyerror(p, "dynamic constant assignment");
+                      $$ = new_colon3(p, $2);
+                    }
+                | backref
+                    {
+                      backref_error(p, $1);
+                      $$ = 0;
+                    }
+                ;
+
+lhs             : variable
+                    {
+                      assignable(p, $1);
+                    }
+                | primary_value '[' opt_call_args rbracket
+                    {
+                      $$ = new_call(p, $1, intern("[]",2), $3);
+                    }
+                | primary_value '.' tIDENTIFIER
+                    {
+                      $$ = new_call(p, $1, $3, 0);
+                    }
+                | primary_value tCOLON2 tIDENTIFIER
+                    {
+                      $$ = new_call(p, $1, $3, 0);
+                    }
+                | primary_value '.' tCONSTANT
+                    {
+                      $$ = new_call(p, $1, $3, 0);
+                    }
+                | primary_value tCOLON2 tCONSTANT
+                    {
+                      if (p->in_def || p->in_single)
+                        yyerror(p, "dynamic constant assignment");
+                      $$ = new_colon2(p, $1, $3);
+                    }
+                | tCOLON3 tCONSTANT
+                    {
+                      if (p->in_def || p->in_single)
+                        yyerror(p, "dynamic constant assignment");
+                      $$ = new_colon3(p, $2);
+                    }
+                | backref
+                    {
+                      backref_error(p, $1);
+                      $$ = 0;
+                    }
+                ;
+
+cname           : tIDENTIFIER
+                    {
+                      yyerror(p, "class/module name must be CONSTANT");
+                    }
+                | tCONSTANT
+                ;
+
+cpath           : tCOLON3 cname
+                    {
+                      $$ = cons((node*)1, nsym($2));
+                    }
+                | cname
+                    {
+                      $$ = cons((node*)0, nsym($1));
+                    }
+                | primary_value tCOLON2 cname
+                    {
+                      $$ = cons($1, nsym($3));
+                    }
+                ;
+
+fname           : tIDENTIFIER
+                | tCONSTANT
+                | tFID
+                | op
+                    {
+                      p->lstate = EXPR_ENDFN;
+                      $$ = $1;
+                    }
+                | reswords
+                    {
+                      p->lstate = EXPR_ENDFN;
+                      $$ = $<id>1;
+                    }
+                ;
+
+fsym            : fname
+                | basic_symbol
+                ;
+
+undef_list      : fsym
+                    {
+                      $$ = new_undef(p, $1);
+                    }
+                | undef_list ',' {p->lstate = EXPR_FNAME;} fsym
+                    {
+                      $$ = push($1, nsym($4));
+                    }
+                ;
+
+op              : '|'           { $$ = intern_c('|');   }
+                | '^'           { $$ = intern_c('^');   }
+                | '&'           { $$ = intern_c('&');   }
+                | tCMP          { $$ = intern("<=>",3); }
+                | tEQ           { $$ = intern("==",2);  }
+                | tEQQ          { $$ = intern("===",3); }
+                | tMATCH        { $$ = intern("=~",2);  }
+                | tNMATCH       { $$ = intern("!~",2);  }
+                | '>'           { $$ = intern_c('>');   }
+                | tGEQ          { $$ = intern(">=",2);  }
+                | '<'           { $$ = intern_c('<');   }
+                | tLEQ          { $$ = intern("<=",2);  }
+                | tNEQ          { $$ = intern("!=",2);  }
+                | tLSHFT        { $$ = intern("<<",2);  }
+                | tRSHFT        { $$ = intern(">>",2);  }
+                | '+'           { $$ = intern_c('+');   }
+                | '-'           { $$ = intern_c('-');   }
+                | '*'           { $$ = intern_c('*');   }
+                | tSTAR         { $$ = intern_c('*');   }
+                | '/'           { $$ = intern_c('/');   }
+                | '%'           { $$ = intern_c('%');   }
+                | tPOW          { $$ = intern("**",2);  }
+                | '!'           { $$ = intern_c('!');   }
+                | '~'           { $$ = intern_c('~');   }
+                | tUPLUS        { $$ = intern("+@",2);  }
+                | tUMINUS       { $$ = intern("-@",2);  }
+                | tAREF         { $$ = intern("[]",2);  }
+                | tASET         { $$ = intern("[]=",3); }
+                | '`'           { $$ = intern_c('`');   }
+                ;
+
+reswords        : keyword__LINE__ | keyword__FILE__ | keyword__ENCODING__
+                | keyword_BEGIN | keyword_END
+                | keyword_alias | keyword_and | keyword_begin
+                | keyword_break | keyword_case | keyword_class | keyword_def
+                | keyword_do | keyword_else | keyword_elsif
+                | keyword_end | keyword_ensure | keyword_false
+                | keyword_for | keyword_in | keyword_module | keyword_next
+                | keyword_nil | keyword_not | keyword_or | keyword_redo
+                | keyword_rescue | keyword_retry | keyword_return | keyword_self
+                | keyword_super | keyword_then | keyword_true | keyword_undef
+                | keyword_when | keyword_yield | keyword_if | keyword_unless
+                | keyword_while | keyword_until
+                ;
+
+arg             : lhs '=' arg
+                    {
+                      $$ = new_asgn(p, $1, $3);
+                    }
+                | lhs '=' arg modifier_rescue arg
+                    {
+                      $$ = new_asgn(p, $1, new_rescue(p, $3, list1(list3(0, 0, $5)), 0));
+                    }
+                | var_lhs tOP_ASGN arg
+                    {
+                      $$ = new_op_asgn(p, $1, $2, $3);
+                    }
+                | var_lhs tOP_ASGN arg modifier_rescue arg
+                    {
+                      $$ = new_op_asgn(p, $1, $2, new_rescue(p, $3, list1(list3(0, 0, $5)), 0));
+                    }
+                | primary_value '[' opt_call_args rbracket tOP_ASGN arg
+                    {
+                      $$ = new_op_asgn(p, new_call(p, $1, intern("[]",2), $3), $5, $6);
+                    }
+                | primary_value '.' tIDENTIFIER tOP_ASGN arg
+                    {
+                      $$ = new_op_asgn(p, new_call(p, $1, $3, 0), $4, $5);
+                    }
+                | primary_value '.' tCONSTANT tOP_ASGN arg
+                    {
+                      $$ = new_op_asgn(p, new_call(p, $1, $3, 0), $4, $5);
+                    }
+                | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg
+                    {
+                      $$ = new_op_asgn(p, new_call(p, $1, $3, 0), $4, $5);
+                    }
+                | primary_value tCOLON2 tCONSTANT tOP_ASGN arg
+                    {
+                      yyerror(p, "constant re-assignment");
+                      $$ = new_begin(p, 0);
+                    }
+                | tCOLON3 tCONSTANT tOP_ASGN arg
+                    {
+                      yyerror(p, "constant re-assignment");
+                      $$ = new_begin(p, 0);
+                    }
+                | backref tOP_ASGN arg
+                    {
+                      backref_error(p, $1);
+                      $$ = new_begin(p, 0);
+                    }
+                | arg tDOT2 arg
+                    {
+                      $$ = new_dot2(p, $1, $3);
+                    }
+                | arg tDOT3 arg
+                    {
+                      $$ = new_dot3(p, $1, $3);
+                    }
+                | arg '+' arg
+                    {
+                      $$ = call_bin_op(p, $1, "+", $3);
+                    }
+                | arg '-' arg
+                    {
+                      $$ = call_bin_op(p, $1, "-", $3);
+                    }
+                | arg '*' arg
+                    {
+                      $$ = call_bin_op(p, $1, "*", $3);
+                    }
+                | arg '/' arg
+                    {
+                      $$ = call_bin_op(p, $1, "/", $3);
+                    }
+                | arg '%' arg
+                    {
+                      $$ = call_bin_op(p, $1, "%", $3);
+                    }
+                | arg tPOW arg
+                    {
+                      $$ = call_bin_op(p, $1, "**", $3);
+                    }
+                | tUMINUS_NUM tINTEGER tPOW arg
+                    {
+                      $$ = call_uni_op(p, call_bin_op(p, $2, "**", $4), "-@");
+                    }
+                | tUMINUS_NUM tFLOAT tPOW arg
+                    {
+                      $$ = call_uni_op(p, call_bin_op(p, $2, "**", $4), "-@");
+                    }
+                | tUPLUS arg
+                    {
+                      $$ = call_uni_op(p, $2, "+@");
+                    }
+                | tUMINUS arg
+                    {
+                      $$ = call_uni_op(p, $2, "-@");
+                    }
+                | arg '|' arg
+                    {
+                      $$ = call_bin_op(p, $1, "|", $3);
+                    }
+                | arg '^' arg
+                    {
+                      $$ = call_bin_op(p, $1, "^", $3);
+                    }
+                | arg '&' arg
+                    {
+                      $$ = call_bin_op(p, $1, "&", $3);
+                    }
+                | arg tCMP arg
+                    {
+                      $$ = call_bin_op(p, $1, "<=>", $3);
+                    }
+                | arg '>' arg
+                    {
+                      $$ = call_bin_op(p, $1, ">", $3);
+                    }
+                | arg tGEQ arg
+                    {
+                      $$ = call_bin_op(p, $1, ">=", $3);
+                    }
+                | arg '<' arg
+                    {
+                      $$ = call_bin_op(p, $1, "<", $3);
+                    }
+                | arg tLEQ arg
+                    {
+                      $$ = call_bin_op(p, $1, "<=", $3);
+                    }
+                | arg tEQ arg
+                    {
+                      $$ = call_bin_op(p, $1, "==", $3);
+                    }
+                | arg tEQQ arg
+                    {
+                      $$ = call_bin_op(p, $1, "===", $3);
+                    }
+                | arg tNEQ arg
+                    {
+                      $$ = call_bin_op(p, $1, "!=", $3);
+                    }
+                | arg tMATCH arg
+                    {
+                      $$ = call_bin_op(p, $1, "=~", $3);
+                    }
+                | arg tNMATCH arg
+                    {
+                      $$ = call_bin_op(p, $1, "!~", $3);
+                    }
+                | '!' arg
+                    {
+                      $$ = call_uni_op(p, cond($2), "!");
+                    }
+                | '~' arg
+                    {
+                      $$ = call_uni_op(p, cond($2), "~");
+                    }
+                | arg tLSHFT arg
+                    {
+                      $$ = call_bin_op(p, $1, "<<", $3);
+                    }
+                | arg tRSHFT arg
+                    {
+                      $$ = call_bin_op(p, $1, ">>", $3);
+                    }
+                | arg tANDOP arg
+                    {
+                      $$ = new_and(p, $1, $3);
+                    }
+                | arg tOROP arg
+                    {
+                      $$ = new_or(p, $1, $3);
+                    }
+                | arg '?' arg opt_nl ':' arg
+                    {
+                      $$ = new_if(p, cond($1), $3, $6);
+                    }
+                | primary
+                    {
+                      $$ = $1;
+                    }
+                ;
+
+arg_value       : arg
+                    {
+                      $$ = $1;
+                      if (!$$) $$ = new_nil(p);
+                    }
+                ;
+
+aref_args       : none
+                | args trailer
+                    {
+                      $$ = $1;
+                      NODE_LINENO($$, $1);
+                    }
+                | args ',' assocs trailer
+                    {
+                      $$ = push($1, new_hash(p, $3));
+                    }
+                | assocs trailer
+                    {
+                      $$ = cons(new_hash(p, $1), 0);
+                      NODE_LINENO($$, $1);
+                    }
+                ;
+
+paren_args      : '(' opt_call_args rparen
+                    {
+                      $$ = $2;
+                    }
+                ;
+
+opt_paren_args  : none
+                | paren_args
+                ;
+
+opt_call_args   : none
+                | call_args
+                | args ','
+                    {
+                      $$ = cons($1,0);
+                      NODE_LINENO($$, $1);
+                    }
+                | args ',' assocs ','
+                    {
+                      $$ = cons(push($1, new_hash(p, $3)), 0);
+                      NODE_LINENO($$, $1);
+                    }
+                | assocs ','
+                    {
+                      $$ = cons(list1(new_hash(p, $1)), 0);
+                      NODE_LINENO($$, $1);
+                    }
+                ;
+
+call_args       : command
+                    {
+                      $$ = cons(list1($1), 0);
+                      NODE_LINENO($$, $1);
+                    }
+                | args opt_block_arg
+                    {
+                      $$ = cons($1, $2);
+                      NODE_LINENO($$, $1);
+                    }
+                | assocs opt_block_arg
+                    {
+                      $$ = cons(list1(new_hash(p, $1)), $2);
+                      NODE_LINENO($$, $1);
+                    }
+                | args ',' assocs opt_block_arg
+                    {
+                      $$ = cons(push($1, new_hash(p, $3)), $4);
+                      NODE_LINENO($$, $1);
+                    }
+                | block_arg
+                    {
+                      $$ = cons(0, $1);
+                      NODE_LINENO($$, $1);
+                    }
+                ;
+
+command_args    :  {
+                      $<stack>$ = p->cmdarg_stack;
+                      CMDARG_PUSH(1);
+                    }
+                  call_args
+                    {
+                      p->cmdarg_stack = $<stack>1;
+                      $$ = $2;
+                    }
+                ;
+
+block_arg       : tAMPER arg_value
+                    {
+                      $$ = new_block_arg(p, $2);
+                    }
+                ;
+
+opt_block_arg   : ',' block_arg
+                    {
+                      $$ = $2;
+                    }
+                | none
+                    {
+                      $$ = 0;
+                    }
+                ;
+
+args            : arg_value
+                    {
+                      $$ = cons($1, 0);
+                      NODE_LINENO($$, $1);
+                    }
+                | tSTAR arg_value
+                    {
+                      $$ = cons(new_splat(p, $2), 0);
+                      NODE_LINENO($$, $2);
+                    }
+                | args ',' arg_value
+                    {
+                      $$ = push($1, $3);
+                    }
+                | args ',' tSTAR arg_value
+                    {
+                      $$ = push($1, new_splat(p, $4));
+                    }
+                | args ',' heredoc_bodies arg_value
+                    {
+                      $$ = push($1, $4);
+                    }
+                | args ',' heredoc_bodies tSTAR arg_value
+                    {
+                      $$ = push($1, new_splat(p, $5));
+                    }
+                ;
+
+mrhs            : args ',' arg_value
+                    {
+                      $$ = push($1, $3);
+                    }
+                | args ',' tSTAR arg_value
+                    {
+                      $$ = push($1, new_splat(p, $4));
+                    }
+                | tSTAR arg_value
+                    {
+                      $$ = list1(new_splat(p, $2));
+                    }
+                ;
+
+primary         : literal
+                | string
+                | xstring
+                | regexp
+                | heredoc
+                | var_ref
+                | backref
+                | tFID
+                    {
+                      $$ = new_fcall(p, $1, 0);
+                    }
+                | keyword_begin
+                    {
+                      $<stack>$ = p->cmdarg_stack;
+                      p->cmdarg_stack = 0;
+                    }
+                  bodystmt
+                  keyword_end
+                    {
+                      p->cmdarg_stack = $<stack>2;
+                      $$ = $3;
+                    }
+                | tLPAREN_ARG
+                    {
+                      $<stack>$ = p->cmdarg_stack;
+                      p->cmdarg_stack = 0;
+                    }
+                  expr {p->lstate = EXPR_ENDARG;} rparen
+                    {
+                      p->cmdarg_stack = $<stack>2;
+                      $$ = $3;
+                    }
+                | tLPAREN_ARG {p->lstate = EXPR_ENDARG;} rparen
+                    {
+                      $$ = 0;
+                    }
+                | tLPAREN compstmt ')'
+                    {
+                      $$ = $2;
+                    }
+                | primary_value tCOLON2 tCONSTANT
+                    {
+                      $$ = new_colon2(p, $1, $3);
+                    }
+                | tCOLON3 tCONSTANT
+                    {
+                      $$ = new_colon3(p, $2);
+                    }
+                | tLBRACK aref_args ']'
+                    {
+                      $$ = new_array(p, $2);
+                      NODE_LINENO($$, $2);
+                    }
+                | tLBRACE assoc_list '}'
+                    {
+                      $$ = new_hash(p, $2);
+                      NODE_LINENO($$, $2);
+                    }
+                | keyword_return
+                    {
+                      $$ = new_return(p, 0);
+                    }
+                | keyword_yield '(' call_args rparen
+                    {
+                      $$ = new_yield(p, $3);
+                    }
+                | keyword_yield '(' rparen
+                    {
+                      $$ = new_yield(p, 0);
+                    }
+                | keyword_yield
+                    {
+                      $$ = new_yield(p, 0);
+                    }
+                | keyword_not '(' expr rparen
+                    {
+                      $$ = call_uni_op(p, cond($3), "!");
+                    }
+                | keyword_not '(' rparen
+                    {
+                      $$ = call_uni_op(p, new_nil(p), "!");
+                    }
+                | operation brace_block
+                    {
+                      $$ = new_fcall(p, $1, cons(0, $2));
+                    }
+                | method_call
+                | method_call brace_block
+                    {
+                      call_with_block(p, $1, $2);
+                      $$ = $1;
+                    }
+                | tLAMBDA
+                    {
+                      local_nest(p);
+                      $<num>$ = p->lpar_beg;
+                      p->lpar_beg = ++p->paren_nest;
+                    }
+                  f_larglist
+                    {
+                      $<stack>$ = p->cmdarg_stack;
+                      p->cmdarg_stack = 0;
+                    }
+                  lambda_body
+                    {
+                      p->lpar_beg = $<num>2;
+                      $$ = new_lambda(p, $3, $5);
+                      local_unnest(p);
+                      p->cmdarg_stack = $<stack>4;
+                      CMDARG_LEXPOP();
+                    }
+                | keyword_if expr_value then
+                  compstmt
+                  if_tail
+                  keyword_end
+                    {
+                      $$ = new_if(p, cond($2), $4, $5);
+                      SET_LINENO($$, $1);
+                    }
+                | keyword_unless expr_value then
+                  compstmt
+                  opt_else
+                  keyword_end
+                    {
+                      $$ = new_unless(p, cond($2), $4, $5);
+                      SET_LINENO($$, $1);
+                    }
+                | keyword_while {COND_PUSH(1);} expr_value do {COND_POP();}
+                  compstmt
+                  keyword_end
+                    {
+                      $$ = new_while(p, cond($3), $6);
+                      SET_LINENO($$, $1);
+                    }
+                | keyword_until {COND_PUSH(1);} expr_value do {COND_POP();}
+                  compstmt
+                  keyword_end
+                    {
+                      $$ = new_until(p, cond($3), $6);
+                      SET_LINENO($$, $1);
+                    }
+                | keyword_case expr_value opt_terms
+                  case_body
+                  keyword_end
+                    {
+                      $$ = new_case(p, $2, $4);
+                    }
+                | keyword_case opt_terms case_body keyword_end
+                    {
+                      $$ = new_case(p, 0, $3);
+                    }
+                | keyword_for for_var keyword_in
+                  {COND_PUSH(1);}
+                  expr_value do
+                  {COND_POP();}
+                  compstmt
+                  keyword_end
+                    {
+                      $$ = new_for(p, $2, $5, $8);
+                      SET_LINENO($$, $1);
+                    }
+                | keyword_class
+                  cpath superclass
+                    {
+                      if (p->in_def || p->in_single)
+                        yyerror(p, "class definition in method body");
+                      $<nd>$ = local_switch(p);
+                    }
+                  bodystmt
+                  keyword_end
+                    {
+                      $$ = new_class(p, $2, $3, $5);
+                      SET_LINENO($$, $1);
+                      local_resume(p, $<nd>4);
+                    }
+                | keyword_class
+                  tLSHFT expr
+                    {
+                      $<num>$ = p->in_def;
+                      p->in_def = 0;
+                    }
+                  term
+                    {
+                      $<nd>$ = cons(local_switch(p), (node*)(intptr_t)p->in_single);
+                      p->in_single = 0;
+                    }
+                  bodystmt
+                  keyword_end
+                    {
+                      $$ = new_sclass(p, $3, $7);
+                      SET_LINENO($$, $1);
+                      local_resume(p, $<nd>6->car);
+                      p->in_def = $<num>4;
+                      p->in_single = (int)(intptr_t)$<nd>6->cdr;
+                    }
+                | keyword_module
+                  cpath
+                    {
+                      if (p->in_def || p->in_single)
+                        yyerror(p, "module definition in method body");
+                      $<nd>$ = local_switch(p);
+                    }
+                  bodystmt
+                  keyword_end
+                    {
+                      $$ = new_module(p, $2, $4);
+                      SET_LINENO($$, $1);
+                      local_resume(p, $<nd>3);
+                    }
+                | keyword_def fname
+                    {
+                      $<stack>$ = p->cmdarg_stack;
+                      p->cmdarg_stack = 0;
+                    }
+                    {
+                      p->in_def++;
+                      $<nd>$ = local_switch(p);
+                    }
+                  f_arglist
+                  bodystmt
+                  keyword_end
+                    {
+                      $$ = new_def(p, $2, $5, $6);
+                      SET_LINENO($$, $1);
+                      local_resume(p, $<nd>4);
+                      p->in_def--;
+                      p->cmdarg_stack = $<stack>3;
+                    }
+                | keyword_def singleton dot_or_colon
+                    {
+                      p->lstate = EXPR_FNAME;
+                      $<stack>$ = p->cmdarg_stack;
+                      p->cmdarg_stack = 0;
+                    }
+                    fname
+                    {
+                      p->in_single++;
+                      p->lstate = EXPR_ENDFN; /* force for args */
+                      $<nd>$ = local_switch(p);
+                    }
+                  f_arglist
+                  bodystmt
+                  keyword_end
+                    {
+                      $$ = new_sdef(p, $2, $5, $7, $8);
+                      SET_LINENO($$, $1);
+                      local_resume(p, $<nd>6);
+                      p->in_single--;
+                      p->cmdarg_stack = $<stack>4;
+                    }
+                | keyword_break
+                    {
+                      $$ = new_break(p, 0);
+                    }
+                | keyword_next
+                    {
+                      $$ = new_next(p, 0);
+                    }
+                | keyword_redo
+                    {
+                      $$ = new_redo(p);
+                    }
+                | keyword_retry
+                    {
+                      $$ = new_retry(p);
+                    }
+                ;
+
+primary_value   : primary
+                    {
+                      $$ = $1;
+                      if (!$$) $$ = new_nil(p);
+                    }
+                ;
+
+then            : term
+                | keyword_then
+                | term keyword_then
+                ;
+
+do              : term
+                | keyword_do_cond
+                ;
+
+if_tail         : opt_else
+                | keyword_elsif expr_value then
+                  compstmt
+                  if_tail
+                    {
+                      $$ = new_if(p, cond($2), $4, $5);
+                    }
+                ;
+
+opt_else        : none
+                | keyword_else compstmt
+                    {
+                      $$ = $2;
+                    }
+                ;
+
+for_var         : lhs
+                    {
+                      $$ = list1(list1($1));
+                    }
+                | mlhs
+                ;
+
+f_marg          : f_norm_arg
+                    {
+                      $$ = new_arg(p, $1);
+                    }
+                | tLPAREN f_margs rparen
+                    {
+                      $$ = new_masgn(p, $2, 0);
+                    }
+                ;
+
+f_marg_list     : f_marg
+                    {
+                      $$ = list1($1);
+                    }
+                | f_marg_list ',' f_marg
+                    {
+                      $$ = push($1, $3);
+                    }
+                ;
+
+f_margs         : f_marg_list
+                    {
+                      $$ = list3($1,0,0);
+                    }
+                | f_marg_list ',' tSTAR f_norm_arg
+                    {
+                      $$ = list3($1, new_arg(p, $4), 0);
+                    }
+                | f_marg_list ',' tSTAR f_norm_arg ',' f_marg_list
+                    {
+                      $$ = list3($1, new_arg(p, $4), $6);
+                    }
+                | f_marg_list ',' tSTAR
+                    {
+                      $$ = list3($1, (node*)-1, 0);
+                    }
+                | f_marg_list ',' tSTAR ',' f_marg_list
+                    {
+                      $$ = list3($1, (node*)-1, $5);
+                    }
+                | tSTAR f_norm_arg
+                    {
+                      $$ = list3(0, new_arg(p, $2), 0);
+                    }
+                | tSTAR f_norm_arg ',' f_marg_list
+                    {
+                      $$ = list3(0, new_arg(p, $2), $4);
+                    }
+                | tSTAR
+                    {
+                      $$ = list3(0, (node*)-1, 0);
+                    }
+                | tSTAR ',' f_marg_list
+                    {
+                      $$ = list3(0, (node*)-1, $3);
+                    }
+                ;
+
+block_param     : f_arg ',' f_block_optarg ',' f_rest_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, $1, $3, $5, 0, $6);
+                    }
+                | f_arg ',' f_block_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, $1, $3, $5, $7, $8);
+                    }
+                | f_arg ',' f_block_optarg opt_f_block_arg
+                    {
+                      $$ = new_args(p, $1, $3, 0, 0, $4);
+                    }
+                | f_arg ',' f_block_optarg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, $1, $3, 0, $5, $6);
+                    }
+                | f_arg ',' f_rest_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, $1, 0, $3, 0, $4);
+                    }
+                | f_arg ','
+                    {
+                      $$ = new_args(p, $1, 0, 1, 0, 0);
+                    }
+                | f_arg ',' f_rest_arg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, $1, 0, $3, $5, $6);
+                    }
+                | f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, $1, 0, 0, 0, $2);
+                    }
+                | f_block_optarg ',' f_rest_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, 0, $1, $3, 0, $4);
+                    }
+                | f_block_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, 0, $1, $3, $5, $6);
+                    }
+                | f_block_optarg opt_f_block_arg
+                    {
+                      $$ = new_args(p, 0, $1, 0, 0, $2);
+                    }
+                | f_block_optarg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, 0, $1, 0, $3, $4);
+                    }
+                | f_rest_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, 0, 0, $1, 0, $2);
+                    }
+                | f_rest_arg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, 0, 0, $1, $3, $4);
+                    }
+                | f_block_arg
+                    {
+                      $$ = new_args(p, 0, 0, 0, 0, $1);
+                    }
+                ;
+
+opt_block_param : none
+                | block_param_def
+                    {
+                      p->cmd_start = TRUE;
+                      $$ = $1;
+                    }
+                ;
+
+block_param_def : '|' opt_bv_decl '|'
+                    {
+                      $$ = 0;
+                    }
+                | tOROP
+                    {
+                      $$ = 0;
+                    }
+                | '|' block_param opt_bv_decl '|'
+                    {
+                      $$ = $2;
+                    }
+                ;
+
+
+opt_bv_decl     : opt_nl
+                    {
+                      $$ = 0;
+                    }
+                | opt_nl ';' bv_decls opt_nl
+                    {
+                      $$ = 0;
+                    }
+                ;
+
+bv_decls        : bvar
+                | bv_decls ',' bvar
+                ;
+
+bvar            : tIDENTIFIER
+                    {
+                      local_add_f(p, $1);
+                      new_bv(p, $1);
+                    }
+                | f_bad_arg
+                ;
+
+f_larglist      : '(' f_args opt_bv_decl ')'
+                    {
+                      $$ = $2;
+                    }
+                | f_args
+                    {
+                      $$ = $1;
+                    }
+                ;
+
+lambda_body     : tLAMBEG compstmt '}'
+                    {
+                      $$ = $2;
+                    }
+                | keyword_do_LAMBDA compstmt keyword_end
+                    {
+                      $$ = $2;
+                    }
+                ;
+
+do_block        : keyword_do_block
+                    {
+                      local_nest(p);
+                    }
+                  opt_block_param
+                  compstmt
+                  keyword_end
+                    {
+                      $$ = new_block(p,$3,$4);
+                      local_unnest(p);
+                    }
+                ;
+
+block_call      : command do_block
+                    {
+                      if ($1->car == (node*)NODE_YIELD) {
+                        yyerror(p, "block given to yield");
+                      }
+                      else {
+                        call_with_block(p, $1, $2);
+                      }
+                      $$ = $1;
+                    }
+                | block_call dot_or_colon operation2 opt_paren_args
+                    {
+                      $$ = new_call(p, $1, $3, $4);
+                    }
+                | block_call dot_or_colon operation2 opt_paren_args brace_block
+                    {
+                      $$ = new_call(p, $1, $3, $4);
+                      call_with_block(p, $$, $5);
+                    }
+                | block_call dot_or_colon operation2 command_args do_block
+                    {
+                      $$ = new_call(p, $1, $3, $4);
+                      call_with_block(p, $$, $5);
+                    }
+                ;
+
+method_call     : operation paren_args
+                    {
+                      $$ = new_fcall(p, $1, $2);
+                    }
+                | primary_value '.' operation2 opt_paren_args
+                    {
+                      $$ = new_call(p, $1, $3, $4);
+                    }
+                | primary_value tCOLON2 operation2 paren_args
+                    {
+                      $$ = new_call(p, $1, $3, $4);
+                    }
+                | primary_value tCOLON2 operation3
+                    {
+                      $$ = new_call(p, $1, $3, 0);
+                    }
+                | primary_value '.' paren_args
+                    {
+                      $$ = new_call(p, $1, intern("call",4), $3);
+                    }
+                | primary_value tCOLON2 paren_args
+                    {
+                      $$ = new_call(p, $1, intern("call",4), $3);
+                    }
+                | keyword_super paren_args
+                    {
+                      $$ = new_super(p, $2);
+                    }
+                | keyword_super
+                    {
+                      $$ = new_zsuper(p);
+                    }
+                | primary_value '[' opt_call_args rbracket
+                    {
+                      $$ = new_call(p, $1, intern("[]",2), $3);
+                    }
+                ;
+
+brace_block     : '{'
+                    {
+                      local_nest(p);
+                      $<num>$ = p->lineno;
+                    }
+                  opt_block_param
+                  compstmt '}'
+                    {
+                      $$ = new_block(p,$3,$4);
+                      SET_LINENO($$, $<num>2);
+                      local_unnest(p);
+                    }
+                | keyword_do
+                    {
+                      local_nest(p);
+                      $<num>$ = p->lineno;
+                    }
+                  opt_block_param
+                  compstmt keyword_end
+                    {
+                      $$ = new_block(p,$3,$4);
+                      SET_LINENO($$, $<num>2);
+                      local_unnest(p);
+                    }
+                ;
+
+case_body       : keyword_when args then
+                  compstmt
+                  cases
+                    {
+                      $$ = cons(cons($2, $4), $5);
+                    }
+                ;
+
+cases           : opt_else
+                    {
+                      if ($1) {
+                        $$ = cons(cons(0, $1), 0);
+                      }
+                      else {
+                        $$ = 0;
+                      }
+                    }
+                | case_body
+                ;
+
+opt_rescue      : keyword_rescue exc_list exc_var then
+                  compstmt
+                  opt_rescue
+                    {
+                      $$ = list1(list3($2, $3, $5));
+                      if ($6) $$ = append($$, $6);
+                    }
+                | none
+                ;
+
+exc_list        : arg_value
+                    {
+                        $$ = list1($1);
+                    }
+                | mrhs
+                | none
+                ;
+
+exc_var         : tASSOC lhs
+                    {
+                      $$ = $2;
+                    }
+                | none
+                ;
+
+opt_ensure      : keyword_ensure compstmt
+                    {
+                      $$ = $2;
+                    }
+                | none
+                ;
+
+literal         : numeric
+                | symbol
+                | words
+                | symbols
+                ;
+
+string          : tCHAR
+                | tSTRING
+                | tSTRING_BEG tSTRING
+                    {
+                      $$ = $2;
+                    }
+                | tSTRING_BEG string_rep tSTRING
+                    {
+                      $$ = new_dstr(p, push($2, $3));
+                    }
+                ;
+
+string_rep      : string_interp
+                | string_rep string_interp
+                    {
+                      $$ = append($1, $2);
+                    }
+                ;
+
+string_interp   : tSTRING_MID
+                    {
+                      $$ = list1($1);
+                    }
+                | tSTRING_PART
+                    {
+                      $<nd>$ = p->lex_strterm;
+                      p->lex_strterm = NULL;
+                    }
+                  compstmt
+                  '}'
+                    {
+                      p->lex_strterm = $<nd>2;
+                      $$ = list2($1, $3);
+                    }
+                | tLITERAL_DELIM
+                    {
+                      $$ = list1(new_literal_delim(p));
+                    }
+                | tHD_LITERAL_DELIM heredoc_bodies
+                    {
+                      $$ = list1(new_literal_delim(p));
+                    }
+                ;
+
+xstring         : tXSTRING_BEG tXSTRING
+                    {
+                        $$ = $2;
+                    }
+                | tXSTRING_BEG string_rep tXSTRING
+                    {
+                      $$ = new_dxstr(p, push($2, $3));
+                    }
+                ;
+
+regexp          : tREGEXP_BEG tREGEXP
+                    {
+                        $$ = $2;
+                    }
+                | tREGEXP_BEG string_rep tREGEXP
+                    {
+                      $$ = new_dregx(p, $2, $3);
+                    }
+                ;
+
+heredoc         : tHEREDOC_BEG
+                ;
+
+opt_heredoc_bodies : /* none */
+                   | heredoc_bodies
+                   ;
+
+heredoc_bodies  : heredoc_body
+                | heredoc_bodies heredoc_body
+                ;
+
+heredoc_body    : tHEREDOC_END
+                    {
+                      parser_heredoc_info * inf = parsing_heredoc_inf(p);
+                      inf->doc = push(inf->doc, new_str(p, "", 0));
+                      heredoc_end(p);
+                    }
+                | heredoc_string_rep tHEREDOC_END
+                    {
+                      heredoc_end(p);
+                    }
+                ;
+
+heredoc_string_rep : heredoc_string_interp
+                   | heredoc_string_rep heredoc_string_interp
+                   ;
+
+heredoc_string_interp : tHD_STRING_MID
+                    {
+                      parser_heredoc_info * inf = parsing_heredoc_inf(p);
+                      inf->doc = push(inf->doc, $1);
+                      heredoc_treat_nextline(p);
+                    }
+                | tHD_STRING_PART
+                    {
+                      $<nd>$ = p->lex_strterm;
+                      p->lex_strterm = NULL;
+                    }
+                  compstmt
+                  '}'
+                    {
+                      parser_heredoc_info * inf = parsing_heredoc_inf(p);
+                      p->lex_strterm = $<nd>2;
+                      inf->doc = push(push(inf->doc, $1), $3);
+                    }
+                ;
+
+words           : tWORDS_BEG tSTRING
+                    {
+                      $$ = new_words(p, list1($2));
+                    }
+                | tWORDS_BEG string_rep tSTRING
+                    {
+                      $$ = new_words(p, push($2, $3));
+                    }
+                ;
+
+
+symbol          : basic_symbol
+                    {
+                      $$ = new_sym(p, $1);
+                    }
+                | tSYMBEG tSTRING_BEG string_interp tSTRING
+                    {
+                      p->lstate = EXPR_END;
+                      $$ = new_dsym(p, push($3, $4));
+                    }
+                ;
+
+basic_symbol    : tSYMBEG sym
+                    {
+                      p->lstate = EXPR_END;
+                      $$ = $2;
+                    }
+                ;
+
+sym             : fname
+                | tIVAR
+                | tGVAR
+                | tCVAR
+                | tSTRING
+                    {
+                      $$ = new_strsym(p, $1);
+                    }
+                | tSTRING_BEG tSTRING
+                    {
+                      $$ = new_strsym(p, $2);
+                    }
+                ;
+
+symbols         : tSYMBOLS_BEG tSTRING
+                    {
+                      $$ = new_symbols(p, list1($2));
+                    }
+                | tSYMBOLS_BEG string_rep tSTRING
+                    {
+                      $$ = new_symbols(p, push($2, $3));
+                    }
+                ;
+
+numeric         : tINTEGER
+                | tFLOAT
+                | tUMINUS_NUM tINTEGER          %prec tLOWEST
+                    {
+                      $$ = negate_lit(p, $2);
+                    }
+                | tUMINUS_NUM tFLOAT            %prec tLOWEST
+                    {
+                      $$ = negate_lit(p, $2);
+                    }
+                ;
+
+variable        : tIDENTIFIER
+                    {
+                      $$ = new_lvar(p, $1);
+                    }
+                | tIVAR
+                    {
+                      $$ = new_ivar(p, $1);
+                    }
+                | tGVAR
+                    {
+                      $$ = new_gvar(p, $1);
+                    }
+                | tCVAR
+                    {
+                      $$ = new_cvar(p, $1);
+                    }
+                | tCONSTANT
+                    {
+                      $$ = new_const(p, $1);
+                    }
+                ;
+
+var_lhs         : variable
+                    {
+                      assignable(p, $1);
+                    }
+                ;
+
+var_ref         : variable
+                    {
+                      $$ = var_reference(p, $1);
+                    }
+                | keyword_nil
+                    {
+                      $$ = new_nil(p);
+                    }
+                | keyword_self
+                    {
+                      $$ = new_self(p);
+                    }
+                | keyword_true
+                    {
+                      $$ = new_true(p);
+                    }
+                | keyword_false
+                    {
+                      $$ = new_false(p);
+                    }
+                | keyword__FILE__
+                    {
+                      if (!p->filename) {
+                        p->filename = "(null)";
+                      }
+                      $$ = new_str(p, p->filename, strlen(p->filename));
+                    }
+                | keyword__LINE__
+                    {
+                      char buf[16];
+
+                      snprintf(buf, sizeof(buf), "%d", p->lineno);
+                      $$ = new_int(p, buf, 10);
+                    }
+                ;
+
+backref         : tNTH_REF
+                | tBACK_REF
+                ;
+
+superclass      : /* term */
+                    {
+                      $$ = 0;
+                    }
+                | '<'
+                    {
+                      p->lstate = EXPR_BEG;
+                      p->cmd_start = TRUE;
+                    }
+                  expr_value term
+                    {
+                      $$ = $3;
+                    } /* 
+                | error term
+                    {
+                      yyerrok;
+                      $$ = 0;
+                    } */
+                ;
+
+f_arglist       : '(' f_args rparen
+                    {
+                      $$ = $2;
+                      p->lstate = EXPR_BEG;
+                      p->cmd_start = TRUE;
+                    }
+                | f_args term
+                    {
+                      $$ = $1;
+                    }
+                ;
+
+f_args          : f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, $1, $3, $5, 0, $6);
+                    }
+                | f_arg ',' f_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, $1, $3, $5, $7, $8);
+                    }
+                | f_arg ',' f_optarg opt_f_block_arg
+                    {
+                      $$ = new_args(p, $1, $3, 0, 0, $4);
+                    }
+                | f_arg ',' f_optarg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, $1, $3, 0, $5, $6);
+                    }
+                | f_arg ',' f_rest_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, $1, 0, $3, 0, $4);
+                    }
+                | f_arg ',' f_rest_arg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, $1, 0, $3, $5, $6);
+                    }
+                | f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, $1, 0, 0, 0, $2);
+                    }
+                | f_optarg ',' f_rest_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, 0, $1, $3, 0, $4);
+                    }
+                | f_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, 0, $1, $3, $5, $6);
+                    }
+                | f_optarg opt_f_block_arg
+                    {
+                      $$ = new_args(p, 0, $1, 0, 0, $2);
+                    }
+                | f_optarg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, 0, $1, 0, $3, $4);
+                    }
+                | f_rest_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, 0, 0, $1, 0, $2);
+                    }
+                | f_rest_arg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(p, 0, 0, $1, $3, $4);
+                    }
+                | f_block_arg
+                    {
+                      $$ = new_args(p, 0, 0, 0, 0, $1);
+                    }
+                | /* none */
+                    {
+                      local_add_f(p, 0);
+                      $$ = new_args(p, 0, 0, 0, 0, 0);
+                    }
+                ;
+
+f_bad_arg       : tCONSTANT
+                    {
+                      yyerror(p, "formal argument cannot be a constant");
+                      $$ = 0;
+                    }
+                | tIVAR
+                    {
+                      yyerror(p, "formal argument cannot be an instance variable");
+                      $$ = 0;
+                    }
+                | tGVAR
+                    {
+                      yyerror(p, "formal argument cannot be a global variable");
+                      $$ = 0;
+                    }
+                | tCVAR
+                    {
+                      yyerror(p, "formal argument cannot be a class variable");
+                      $$ = 0;
+                    }
+                ;
+
+f_norm_arg      : f_bad_arg
+                    {
+                      $$ = 0;
+                    }
+                | tIDENTIFIER
+                    {
+                      local_add_f(p, $1);
+                      $$ = $1;
+                    }
+                ;
+
+f_arg_item      : f_norm_arg
+                    {
+                      $$ = new_arg(p, $1);
+                    }
+                | tLPAREN f_margs rparen
+                    {
+                      $$ = new_masgn(p, $2, 0);
+                    }
+                ;
+
+f_arg           : f_arg_item
+                    {
+                      $$ = list1($1);
+                    }
+                | f_arg ',' f_arg_item
+                    {
+                      $$ = push($1, $3);
+                    }
+                ;
+
+f_opt_asgn      : tIDENTIFIER '='
+                    {
+                      local_add_f(p, $1);
+                      $$ = $1;
+                    }
+                ;
+
+f_opt           : f_opt_asgn arg_value
+                    {
+                      $$ = cons(nsym($1), $2);
+                    }
+                ;
+
+f_block_opt     : f_opt_asgn primary_value
+                    {
+                      $$ = cons(nsym($1), $2);
+                    }
+                ;
+
+f_block_optarg  : f_block_opt
+                    {
+                      $$ = list1($1);
+                    }
+                | f_block_optarg ',' f_block_opt
+                    {
+                      $$ = push($1, $3);
+                    }
+                ;
+
+f_optarg        : f_opt
+                    {
+                      $$ = list1($1);
+                    }
+                | f_optarg ',' f_opt
+                    {
+                      $$ = push($1, $3);
+                    }
+                ;
+
+restarg_mark    : '*'
+                | tSTAR
+                ;
+
+f_rest_arg      : restarg_mark tIDENTIFIER
+                    {
+                      local_add_f(p, $2);
+                      $$ = $2;
+                    }
+                | restarg_mark
+                    {
+                      local_add_f(p, 0);
+                      $$ = -1;
+                    }
+                ;
+
+blkarg_mark     : '&'
+                | tAMPER
+                ;
+
+f_block_arg     : blkarg_mark tIDENTIFIER
+                    {
+                      local_add_f(p, $2);
+                      $$ = $2;
+                    }
+                ;
+
+opt_f_block_arg : ',' f_block_arg
+                    {
+                      $$ = $2;
+                    }
+                | none
+                    {
+                      local_add_f(p, 0);
+                      $$ = 0;
+                    }
+                ;
+
+singleton       : var_ref
+                    {
+                      $$ = $1;
+                      if (!$$) $$ = new_nil(p);
+                    }
+                | '(' {p->lstate = EXPR_BEG;} expr rparen
+                    {
+                      if ($3 == 0) {
+                        yyerror(p, "can't define singleton method for ().");
+                      }
+                      else {
+                        switch ((enum node_type)(int)(intptr_t)$3->car) {
+                        case NODE_STR:
+                        case NODE_DSTR:
+                        case NODE_XSTR:
+                        case NODE_DXSTR:
+                        case NODE_DREGX:
+                        case NODE_MATCH:
+                        case NODE_FLOAT:
+                        case NODE_ARRAY:
+                        case NODE_HEREDOC:
+                          yyerror(p, "can't define singleton method for literals");
+                        default:
+                          break;
+                        }
+                      }
+                      $$ = $3;
+                    }
+                ;
+
+assoc_list      : none
+                | assocs trailer
+                    {
+                      $$ = $1;
+                    }
+                ;
+
+assocs          : assoc
+                    {
+                      $$ = list1($1);
+                      NODE_LINENO($$, $1);
+                    }
+                | assocs ',' assoc
+                    {
+                      $$ = push($1, $3);
+                    }
+                ;
+
+assoc           : arg_value tASSOC arg_value
+                    {
+                      $$ = cons($1, $3);
+                    }
+                | tLABEL arg_value
+                    {
+                      $$ = cons(new_sym(p, $1), $2);
+                    }
+                ;
+
+operation       : tIDENTIFIER
+                | tCONSTANT
+                | tFID
+                ;
+
+operation2      : tIDENTIFIER
+                | tCONSTANT
+                | tFID
+                | op
+                ;
+
+operation3      : tIDENTIFIER
+                | tFID
+                | op
+                ;
+
+dot_or_colon    : '.'
+                | tCOLON2
+                ;
+
+opt_terms       : /* none */
+                | terms
+                ;
+
+opt_nl          : /* none */
+                | nl
+                ;
+
+rparen          : opt_nl ')'
+                ;
+
+rbracket        : opt_nl ']'
+                ;
+
+trailer         : /* none */
+                | nl
+                | ','
+                ;
+
+term            : ';' {yyerrok;}
+                | nl
+                ;
+
+nl              : '\n'
+                    {
+                      p->lineno++;
+                      p->column = 0;
+                    }
+                  opt_heredoc_bodies
+
+terms           : term
+                | terms ';' {yyerrok;}
+                ;
+
+none            : /* none */
+                    {
+                      $$ = 0;
+                    }
+                ;
+%%
+#define yylval  (*((YYSTYPE*)(p->ylval)))
+
+static void
+yyerror(parser_state *p, const char *s)
+{
+  char* c;
+  int n;
+
+  if (! p->capture_errors) {
+#ifndef MRB_DISABLE_STDIO
+    if (p->filename) {
+      fprintf(stderr, "%s:%d:%d: %s\n", p->filename, p->lineno, p->column, s);
+    }
+    else {
+      fprintf(stderr, "line %d:%d: %s\n", p->lineno, p->column, s);
+    }
+#endif
+  }
+  else if (p->nerr < sizeof(p->error_buffer) / sizeof(p->error_buffer[0])) {
+    n = strlen(s);
+    c = (char *)parser_palloc(p, n + 1);
+    memcpy(c, s, n + 1);
+    p->error_buffer[p->nerr].message = c;
+    p->error_buffer[p->nerr].lineno = p->lineno;
+    p->error_buffer[p->nerr].column = p->column;
+  }
+  p->nerr++;
+}
+
+static void
+yyerror_i(parser_state *p, const char *fmt, int i)
+{
+  char buf[256];
+
+  snprintf(buf, sizeof(buf), fmt, i);
+  yyerror(p, buf);
+}
+
+static void
+yywarn(parser_state *p, const char *s)
+{
+  char* c;
+  int n;
+
+  if (! p->capture_errors) {
+#ifndef MRB_DISABLE_STDIO
+    if (p->filename) {
+      fprintf(stderr, "%s:%d:%d: %s\n", p->filename, p->lineno, p->column, s);
+    }
+    else {
+      fprintf(stderr, "line %d:%d: %s\n", p->lineno, p->column, s);
+    }
+#endif
+  }
+  else if (p->nwarn < sizeof(p->warn_buffer) / sizeof(p->warn_buffer[0])) {
+    n = strlen(s);
+    c = (char *)parser_palloc(p, n + 1);
+    memcpy(c, s, n + 1);
+    p->warn_buffer[p->nwarn].message = c;
+    p->warn_buffer[p->nwarn].lineno = p->lineno;
+    p->warn_buffer[p->nwarn].column = p->column;
+  }
+  p->nwarn++;
+}
+
+static void
+yywarning(parser_state *p, const char *s)
+{
+  yywarn(p, s);
+}
+
+static void
+yywarning_s(parser_state *p, const char *fmt, const char *s)
+{
+  char buf[256];
+
+  snprintf(buf, sizeof(buf), fmt, s);
+  yywarning(p, buf);
+}
+
+static void
+backref_error(parser_state *p, node *n)
+{
+  int c;
+
+  c = (int)(intptr_t)n->car;
+
+  if (c == NODE_NTH_REF) {
+    yyerror_i(p, "can't set variable $%d", (int)(intptr_t)n->cdr);
+  }
+  else if (c == NODE_BACK_REF) {
+    yyerror_i(p, "can't set variable $%c", (int)(intptr_t)n->cdr);
+  }
+  else {
+    mrb_bug(p->mrb, "Internal error in backref_error() : n=>car == %S", mrb_fixnum_value(c));
+  }
+}
+
+static void pushback(parser_state *p, int c);
+static mrb_bool peeks(parser_state *p, const char *s);
+static mrb_bool skips(parser_state *p, const char *s);
+
+static inline int
+nextc(parser_state *p)
+{
+  int c;
+
+  if (p->pb) {
+    node *tmp;
+
+    c = (int)(intptr_t)p->pb->car;
+    tmp = p->pb;
+    p->pb = p->pb->cdr;
+    cons_free(tmp);
+  }
+  else {
+#ifndef MRB_DISABLE_STDIO
+    if (p->f) {
+      if (feof(p->f)) goto eof;
+      c = fgetc(p->f);
+      if (c == EOF) goto eof;
+    }
+    else
+#endif
+      if (!p->s || p->s >= p->send) {
+        goto eof;
+      }
+      else {
+        c = (unsigned char)*p->s++;
+      }
+  }
+  if (c >= 0) {
+    p->column++;
+  }
+  if (c == '\r') {
+    c = nextc(p);
+    if (c != '\n') {
+      pushback(p, c);
+      return '\r';
+    }
+    return c;
+  }
+  return c;
+
+  eof:
+  if (!p->cxt) return -1;
+  else {
+    if (p->cxt->partial_hook(p) < 0)
+      return -1;                /* end of program(s) */
+    return -2;                  /* end of a file in the program files */
+  }
+}
+
+static void
+pushback(parser_state *p, int c)
+{
+  if (c >= 0) {
+    p->column--;
+  }
+  p->pb = cons((node*)(intptr_t)c, p->pb);
+}
+
+static void
+skip(parser_state *p, char term)
+{
+  int c;
+
+  for (;;) {
+    c = nextc(p);
+    if (c < 0) break;
+    if (c == term) break;
+  }
+}
+
+static int
+peekc_n(parser_state *p, int n)
+{
+  node *list = 0;
+  int c0;
+
+  do {
+    c0 = nextc(p);
+    if (c0 == -1) return c0;    /* do not skip partial EOF */
+    list = push(list, (node*)(intptr_t)c0);
+  } while(n--);
+  if (p->pb) {
+    p->pb = append((node*)list, p->pb);
+  }
+  else {
+    p->pb = list;
+  }
+  return c0;
+}
+
+static mrb_bool
+peek_n(parser_state *p, int c, int n)
+{
+  return peekc_n(p, n) == c && c >= 0;
+}
+#define peek(p,c) peek_n((p), (c), 0)
+
+static mrb_bool
+peeks(parser_state *p, const char *s)
+{
+  int len = strlen(s);
+
+#ifndef MRB_DISABLE_STDIO
+  if (p->f) {
+    int n = 0;
+    while (*s) {
+      if (!peek_n(p, *s++, n++)) return FALSE;
+    }
+    return TRUE;
+  }
+  else
+#endif
+    if (p->s && p->s + len <= p->send) {
+      if (memcmp(p->s, s, len) == 0) return TRUE;
+    }
+  return FALSE;
+}
+
+static mrb_bool
+skips(parser_state *p, const char *s)
+{
+  int c;
+
+  for (;;) {
+    /* skip until first char */
+    for (;;) {
+      c = nextc(p);
+      if (c < 0) return c;
+      if (c == '\n') {
+        p->lineno++;
+        p->column = 0;
+      }
+      if (c == *s) break;
+    }
+    s++;
+    if (peeks(p, s)) {
+      int len = strlen(s);
+
+      while (len--) {
+        if (nextc(p) == '\n') {
+          p->lineno++;
+          p->column = 0;
+        }
+      }
+      return TRUE;
+    }
+    else{
+      s--;
+    }
+  }
+  return FALSE;
+}
+
+
+static int
+newtok(parser_state *p)
+{
+  p->bidx = 0;
+  return p->column - 1;
+}
+
+static void
+tokadd(parser_state *p, int32_t c)
+{
+  char utf8[4];
+  unsigned len;
+
+  /* mrb_assert(-0x10FFFF <= c && c <= 0xFF); */
+  if (c >= 0) {
+    /* Single byte from source or non-Unicode escape */
+    utf8[0] = (char)c;
+    len = 1;
+  }
+  else {
+    /* Unicode character */
+    c = -c;
+    if (c < 0x80) {
+      utf8[0] = (char)c;
+      len = 1;
+    }
+    else if (c < 0x800) {
+      utf8[0] = (char)(0xC0 | (c >> 6));
+      utf8[1] = (char)(0x80 | (c & 0x3F));
+      len = 2;
+    }
+    else if (c < 0x10000) {
+      utf8[0] = (char)(0xE0 |  (c >> 12)        );
+      utf8[1] = (char)(0x80 | ((c >>  6) & 0x3F));
+      utf8[2] = (char)(0x80 | ( c        & 0x3F));
+      len = 3;
+    }
+    else {
+      utf8[0] = (char)(0xF0 |  (c >> 18)        );
+      utf8[1] = (char)(0x80 | ((c >> 12) & 0x3F));
+      utf8[2] = (char)(0x80 | ((c >>  6) & 0x3F));
+      utf8[3] = (char)(0x80 | ( c        & 0x3F));
+      len = 4;
+    }
+  }
+  if (p->bidx+len <= MRB_PARSER_BUF_SIZE) {
+    unsigned i;
+    for (i = 0; i < len; i++) {
+      p->buf[p->bidx++] = utf8[i];
+    }
+  }
+}
+
+static int
+toklast(parser_state *p)
+{
+  return p->buf[p->bidx-1];
+}
+
+static void
+tokfix(parser_state *p)
+{
+  int i = p->bidx, imax = MRB_PARSER_BUF_SIZE - 1;
+
+  if (i > imax) {
+    i = imax;
+    yyerror(p, "string too long (truncated)");
+  }
+  p->buf[i] = '\0';
+}
+
+static const char*
+tok(parser_state *p)
+{
+  return p->buf;
+}
+
+static int
+toklen(parser_state *p)
+{
+  return p->bidx;
+}
+
+#define IS_ARG() (p->lstate == EXPR_ARG || p->lstate == EXPR_CMDARG)
+#define IS_END() (p->lstate == EXPR_END || p->lstate == EXPR_ENDARG || p->lstate == EXPR_ENDFN)
+#define IS_BEG() (p->lstate == EXPR_BEG || p->lstate == EXPR_MID || p->lstate == EXPR_VALUE || p->lstate == EXPR_CLASS)
+#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
+#define IS_LABEL_POSSIBLE() ((p->lstate == EXPR_BEG && !cmd_state) || IS_ARG())
+#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
+
+static int
+scan_oct(const int *start, int len, int *retlen)
+{
+  const int *s = start;
+  int retval = 0;
+
+  /* mrb_assert(len <= 3) */
+  while (len-- && *s >= '0' && *s <= '7') {
+    retval <<= 3;
+    retval |= *s++ - '0';
+  }
+  *retlen = s - start;
+
+  return retval;
+}
+
+static int32_t
+scan_hex(const int *start, int len, int *retlen)
+{
+  static const char hexdigit[] = "0123456789abcdef0123456789ABCDEF";
+  const int *s = start;
+  int32_t retval = 0;
+  char *tmp;
+
+  /* mrb_assert(len <= 8) */
+  while (len-- && *s && (tmp = (char*)strchr(hexdigit, *s))) {
+    retval <<= 4;
+    retval |= (tmp - hexdigit) & 15;
+    s++;
+  }
+  *retlen = s - start;
+
+  return retval;
+}
+
+/* Return negative to indicate Unicode code point */
+static int32_t
+read_escape(parser_state *p)
+{
+  int32_t c;
+
+  switch (c = nextc(p)) {
+  case '\\':/* Backslash */
+    return c;
+
+  case 'n':/* newline */
+    return '\n';
+
+  case 't':/* horizontal tab */
+    return '\t';
+
+  case 'r':/* carriage-return */
+    return '\r';
+
+  case 'f':/* form-feed */
+    return '\f';
+
+  case 'v':/* vertical tab */
+    return '\13';
+
+  case 'a':/* alarm(bell) */
+    return '\007';
+
+  case 'e':/* escape */
+    return 033;
+
+  case '0': case '1': case '2': case '3': /* octal constant */
+  case '4': case '5': case '6': case '7':
+  {
+    int buf[3];
+    int i;
+
+    buf[0] = c;
+    for (i=1; i<3; i++) {
+      buf[i] = nextc(p);
+      if (buf[i] < 0) goto eof;
+      if (buf[i] < '0' || '7' < buf[i]) {
+        pushback(p, buf[i]);
+        break;
+      }
+    }
+    c = scan_oct(buf, i, &i);
+  }
+  return c;
+
+  case 'x':     /* hex constant */
+  {
+    int buf[2];
+    int i;
+
+    for (i=0; i<2; i++) {
+      buf[i] = nextc(p);
+      if (buf[i] < 0) goto eof;
+      if (!ISXDIGIT(buf[i])) {
+        pushback(p, buf[i]);
+        break;
+      }
+    }
+    c = scan_hex(buf, i, &i);
+    if (i == 0) {
+      yyerror(p, "Invalid escape character syntax");
+      return 0;
+    }
+  }
+  return c;
+
+  case 'u':     /* Unicode */
+  {
+    int buf[9];
+    int i;
+
+    /* Look for opening brace */
+    i = 0;
+    buf[0] = nextc(p);
+    if (buf[0] < 0) goto eof;
+    if (buf[0] == '{') {
+      /* \u{xxxxxxxx} form */
+      for (i=0; i<9; i++) {
+        buf[i] = nextc(p);
+        if (buf[i] < 0) goto eof;
+        if (buf[i] == '}') {
+          break;
+        }
+        else if (!ISXDIGIT(buf[i])) {
+          yyerror(p, "Invalid escape character syntax");
+          pushback(p, buf[i]);
+          return 0;
+        }
+      }
+    }
+    else if (ISXDIGIT(buf[0])) {
+      /* \uxxxx form */
+      for (i=1; i<4; i++) {
+        buf[i] = nextc(p);
+        if (buf[i] < 0) goto eof;
+        if (!ISXDIGIT(buf[i])) {
+          pushback(p, buf[i]);
+          break;
+        }
+      }
+    }
+    else {
+      pushback(p, buf[0]);
+    }
+    c = scan_hex(buf, i, &i);
+    if (i == 0) {
+      yyerror(p, "Invalid escape character syntax");
+      return 0;
+    }
+    if (c < 0 || c > 0x10FFFF || (c & 0xFFFFF800) == 0xD800) {
+      yyerror(p, "Invalid Unicode code point");
+      return 0;
+    }
+  }
+  return -c;
+
+  case 'b':/* backspace */
+    return '\010';
+
+  case 's':/* space */
+    return ' ';
+
+  case 'M':
+    if ((c = nextc(p)) != '-') {
+      yyerror(p, "Invalid escape character syntax");
+      pushback(p, c);
+      return '\0';
+    }
+    if ((c = nextc(p)) == '\\') {
+      return read_escape(p) | 0x80;
+    }
+    else if (c < 0) goto eof;
+    else {
+      return ((c & 0xff) | 0x80);
+    }
+
+  case 'C':
+    if ((c = nextc(p)) != '-') {
+      yyerror(p, "Invalid escape character syntax");
+      pushback(p, c);
+      return '\0';
+    }
+  case 'c':
+    if ((c = nextc(p))== '\\') {
+      c = read_escape(p);
+    }
+    else if (c == '?')
+      return 0177;
+    else if (c < 0) goto eof;
+    return c & 0x9f;
+
+    eof:
+  case -1:
+  case -2:                      /* end of a file */
+    yyerror(p, "Invalid escape character syntax");
+    return '\0';
+
+  default:
+    return c;
+  }
+}
+
+static int
+parse_string(parser_state *p)
+{
+  int c;
+  string_type type = (string_type)(intptr_t)p->lex_strterm->car;
+  int nest_level = (intptr_t)p->lex_strterm->cdr->car;
+  int beg = (intptr_t)p->lex_strterm->cdr->cdr->car;
+  int end = (intptr_t)p->lex_strterm->cdr->cdr->cdr;
+  parser_heredoc_info *hinf = (type & STR_FUNC_HEREDOC) ? parsing_heredoc_inf(p) : NULL;
+
+  newtok(p);
+  while ((c = nextc(p)) != end || nest_level != 0) {
+    if (hinf && (c == '\n' || c < 0)) {
+      mrb_bool line_head;
+      tokadd(p, '\n');
+      tokfix(p);
+      p->lineno++;
+      p->column = 0;
+      line_head = hinf->line_head;
+      hinf->line_head = TRUE;
+      if (line_head) {
+        /* check whether end of heredoc */
+        const char *s = tok(p);
+        int len = toklen(p);
+        if (hinf->allow_indent) {
+          while (ISSPACE(*s) && len > 0) {
+            ++s;
+            --len;
+          }
+        }
+        if ((len-1 == hinf->term_len) && (strncmp(s, hinf->term, len-1) == 0)) {
+          return tHEREDOC_END;
+        }
+      }
+      if (c < 0) {
+        char buf[256];
+        snprintf(buf, sizeof(buf), "can't find heredoc delimiter \"%s\" anywhere before EOF", hinf->term);
+        yyerror(p, buf);
+        return 0;
+      }
+      yylval.nd = new_str(p, tok(p), toklen(p));
+      return tHD_STRING_MID;
+    }
+    if (c < 0) {
+      yyerror(p, "unterminated string meets end of file");
+      return 0;
+    }
+    else if (c == beg) {
+      nest_level++;
+      p->lex_strterm->cdr->car = (node*)(intptr_t)nest_level;
+    }
+    else if (c == end) {
+      nest_level--;
+      p->lex_strterm->cdr->car = (node*)(intptr_t)nest_level;
+    }
+    else if (c == '\\') {
+      c = nextc(p);
+      if (type & STR_FUNC_EXPAND) {
+        if (c == end || c == beg) {
+          tokadd(p, c);
+        }
+        else if (c == '\n') {
+          p->lineno++;
+          p->column = 0;
+          if (type & STR_FUNC_ARRAY) {
+            tokadd(p, '\n');
+          }
+        }
+        else if (type & STR_FUNC_REGEXP) {
+          tokadd(p, '\\');
+          tokadd(p, c);
+        }
+        else {
+          pushback(p, c);
+          tokadd(p, read_escape(p));
+          if (hinf)
+            hinf->line_head = FALSE;
+        }
+      }
+      else {
+        if (c != beg && c != end) {
+          if (c == '\n') {
+            p->lineno++;
+            p->column = 0;
+          }
+          if (!(c == '\\' || ((type & STR_FUNC_ARRAY) && ISSPACE(c)))) {
+            tokadd(p, '\\');
+          }
+        }
+        tokadd(p, c);
+      }
+      continue;
+    }
+    else if ((c == '#') && (type & STR_FUNC_EXPAND)) {
+      c = nextc(p);
+      if (c == '{') {
+        tokfix(p);
+        p->lstate = EXPR_BEG;
+        p->cmd_start = TRUE;
+        yylval.nd = new_str(p, tok(p), toklen(p));
+        if (hinf) {
+          hinf->line_head = FALSE;
+          return tHD_STRING_PART;
+        }
+        return tSTRING_PART;
+      }
+      tokadd(p, '#');
+      pushback(p, c);
+      continue;
+    }
+    if ((type & STR_FUNC_ARRAY) && ISSPACE(c)) {
+      if (toklen(p) == 0) {
+        do {
+          if (c == '\n') {
+            p->lineno++;
+            p->column = 0;
+            heredoc_treat_nextline(p);
+            if (p->parsing_heredoc != NULL) {
+              return tHD_LITERAL_DELIM;
+            }
+          }
+          c = nextc(p);
+        } while (ISSPACE(c));
+        pushback(p, c);
+        return tLITERAL_DELIM;
+      }
+      else {
+        pushback(p, c);
+        tokfix(p);
+        yylval.nd = new_str(p, tok(p), toklen(p));
+        return tSTRING_MID;
+      }
+    }
+    tokadd(p, c);
+  }
+
+  tokfix(p);
+  p->lstate = EXPR_END;
+  end_strterm(p);
+
+  if (type & STR_FUNC_XQUOTE) {
+    yylval.nd = new_xstr(p, tok(p), toklen(p));
+    return tXSTRING;
+  }
+
+  if (type & STR_FUNC_REGEXP) {
+    int f = 0;
+    int re_opt;
+    char *s = strndup(tok(p), toklen(p));
+    char flags[3];
+    char *flag = flags;
+    char enc = '\0';
+    char *encp;
+    char *dup;
+
+    newtok(p);
+    while (re_opt = nextc(p), re_opt >= 0 && ISALPHA(re_opt)) {
+      switch (re_opt) {
+      case 'i': f |= 1; break;
+      case 'x': f |= 2; break;
+      case 'm': f |= 4; break;
+      case 'u': f |= 16; break;
+      case 'n': f |= 32; break;
+      default: tokadd(p, re_opt); break;
+      }
+    }
+    pushback(p, re_opt);
+    if (toklen(p)) {
+      char msg[128];
+      tokfix(p);
+      snprintf(msg, sizeof(msg), "unknown regexp option%s - %s",
+          toklen(p) > 1 ? "s" : "", tok(p));
+      yyerror(p, msg);
+    }
+    if (f != 0) {
+      if (f & 1) *flag++ = 'i';
+      if (f & 2) *flag++ = 'x';
+      if (f & 4) *flag++ = 'm';
+      if (f & 16) enc = 'u';
+      if (f & 32) enc = 'n';
+    }
+    if (flag > flags) {
+      dup = strndup(flags, (size_t)(flag - flags));
+    } else {
+      dup = NULL;
+    }
+    if (enc) {
+      encp = strndup(&enc, 1);
+    } else {
+      encp = NULL;
+    }
+    yylval.nd = new_regx(p, s, dup, encp);
+
+    return tREGEXP;
+  }
+
+  yylval.nd = new_str(p, tok(p), toklen(p));
+  return tSTRING;
+}
+
+
+static int
+heredoc_identifier(parser_state *p)
+{
+  int c;
+  int type = str_heredoc;
+  mrb_bool indent = FALSE;
+  mrb_bool quote = FALSE;
+  node *newnode;
+  parser_heredoc_info *info;
+
+  c = nextc(p);
+  if (ISSPACE(c) || c == '=') {
+    pushback(p, c);
+    return 0;
+  }
+  if (c == '-') {
+    indent = TRUE;
+    c = nextc(p);
+  }
+  if (c == '\'' || c == '"') {
+    int term = c;
+    if (c == '\'')
+      quote = TRUE;
+    newtok(p);
+    while ((c = nextc(p)) >= 0 && c != term) {
+      if (c == '\n') {
+        c = -1;
+        break;
+      }
+      tokadd(p, c);
+    }
+    if (c < 0) {
+      yyerror(p, "unterminated here document identifier");
+      return 0;
+    }
+  }
+  else {
+    if (c < 0) {
+      return 0;                 /* missing here document identifier */
+    }
+    if (! identchar(c)) {
+      pushback(p, c);
+      if (indent) pushback(p, '-');
+      return 0;
+    }
+    newtok(p);
+    do {
+      tokadd(p, c);
+    } while ((c = nextc(p)) >= 0 && identchar(c));
+    pushback(p, c);
+  }
+  tokfix(p);
+  newnode = new_heredoc(p);
+  info = (parser_heredoc_info*)newnode->cdr;
+  info->term = strndup(tok(p), toklen(p));
+  info->term_len = toklen(p);
+  if (! quote)
+    type |= STR_FUNC_EXPAND;
+  info->type = (string_type)type;
+  info->allow_indent = indent;
+  info->line_head = TRUE;
+  info->doc = NULL;
+  p->heredocs_from_nextline = push(p->heredocs_from_nextline, newnode);
+  p->lstate = EXPR_END;
+
+  yylval.nd = newnode;
+  return tHEREDOC_BEG;
+}
+
+static int
+arg_ambiguous(parser_state *p)
+{
+  yywarning(p, "ambiguous first argument; put parentheses or even spaces");
+  return 1;
+}
+
+#include "lex.def"
+
+static int
+parser_yylex(parser_state *p)
+{
+  int32_t c;
+  int space_seen = 0;
+  int cmd_state;
+  enum mrb_lex_state_enum last_state;
+  int token_column;
+
+  if (p->lex_strterm) {
+    if (is_strterm_type(p, STR_FUNC_HEREDOC)) {
+      if (p->parsing_heredoc != NULL)
+        return parse_string(p);
+    }
+    else
+      return parse_string(p);
+  }
+  cmd_state = p->cmd_start;
+  p->cmd_start = FALSE;
+  retry:
+  last_state = p->lstate;
+  switch (c = nextc(p)) {
+  case '\004':  /* ^D */
+  case '\032':  /* ^Z */
+  case '\0':    /* NUL */
+  case -1:      /* end of script. */
+    if (p->heredocs_from_nextline)
+      goto maybe_heredoc;
+    return 0;
+
+  /* white spaces */
+  case ' ': case '\t': case '\f': case '\r':
+  case '\13':   /* '\v' */
+    space_seen = 1;
+    goto retry;
+
+  case '#':     /* it's a comment */
+    skip(p, '\n');
+    /* fall through */
+  case -2:      /* end of a file */
+  case '\n':
+    maybe_heredoc:
+    heredoc_treat_nextline(p);
+  switch (p->lstate) {
+  case EXPR_BEG:
+  case EXPR_FNAME:
+  case EXPR_DOT:
+  case EXPR_CLASS:
+  case EXPR_VALUE:
+    p->lineno++;
+    p->column = 0;
+    if (p->parsing_heredoc != NULL) {
+      if (p->lex_strterm) {
+        return parse_string(p);
+      }
+    }
+    goto retry;
+  default:
+    break;
+  }
+  if (p->parsing_heredoc != NULL) {
+    return '\n';
+  }
+  while ((c = nextc(p))) {
+    switch (c) {
+    case ' ': case '\t': case '\f': case '\r':
+    case '\13': /* '\v' */
+      space_seen = 1;
+      break;
+    case '.':
+      if ((c = nextc(p)) != '.') {
+        pushback(p, c);
+        pushback(p, '.');
+        goto retry;
+      }
+    case -1:                  /* EOF */
+    case -2:                  /* end of a file */
+      goto normal_newline;
+    default:
+      pushback(p, c);
+      goto normal_newline;
+    }
+  }
+  normal_newline:
+  p->cmd_start = TRUE;
+  p->lstate = EXPR_BEG;
+  return '\n';
+
+  case '*':
+    if ((c = nextc(p)) == '*') {
+      if ((c = nextc(p)) == '=') {
+        yylval.id = intern("**",2);
+        p->lstate = EXPR_BEG;
+        return tOP_ASGN;
+      }
+      pushback(p, c);
+      c = tPOW;
+    }
+    else {
+      if (c == '=') {
+        yylval.id = intern_c('*');
+        p->lstate = EXPR_BEG;
+        return tOP_ASGN;
+      }
+      pushback(p, c);
+      if (IS_SPCARG(c)) {
+        yywarning(p, "'*' interpreted as argument prefix");
+        c = tSTAR;
+      }
+      else if (IS_BEG()) {
+        c = tSTAR;
+      }
+      else {
+        c = '*';
+      }
+    }
+    if (p->lstate == EXPR_FNAME || p->lstate == EXPR_DOT) {
+      p->lstate = EXPR_ARG;
+    }
+    else {
+      p->lstate = EXPR_BEG;
+    }
+    return c;
+
+  case '!':
+    c = nextc(p);
+    if (p->lstate == EXPR_FNAME || p->lstate == EXPR_DOT) {
+      p->lstate = EXPR_ARG;
+      if (c == '@') {
+        return '!';
+      }
+    }
+    else {
+      p->lstate = EXPR_BEG;
+    }
+    if (c == '=') {
+      return tNEQ;
+    }
+    if (c == '~') {
+      return tNMATCH;
+    }
+    pushback(p, c);
+    return '!';
+
+  case '=':
+    if (p->column == 1) {
+      static const char begin[] = "begin";
+      static const char end[] = "\n=end";
+      if (peeks(p, begin)) {
+        c = peekc_n(p, sizeof(begin)-1);
+        if (c < 0 || ISSPACE(c)) {
+          do {
+            if (!skips(p, end)) {
+              yyerror(p, "embedded document meets end of file");
+              return 0;
+            }
+            c = nextc(p);
+          } while (!(c < 0 || ISSPACE(c)));
+          if (c != '\n') skip(p, '\n');
+          p->lineno++;
+          p->column = 0;
+          goto retry;
+        }
+      }
+    }
+    if (p->lstate == EXPR_FNAME || p->lstate == EXPR_DOT) {
+      p->lstate = EXPR_ARG;
+    }
+    else {
+      p->lstate = EXPR_BEG;
+    }
+    if ((c = nextc(p)) == '=') {
+      if ((c = nextc(p)) == '=') {
+        return tEQQ;
+      }
+      pushback(p, c);
+      return tEQ;
+    }
+    if (c == '~') {
+      return tMATCH;
+    }
+    else if (c == '>') {
+      return tASSOC;
+    }
+    pushback(p, c);
+    return '=';
+
+  case '<':
+    c = nextc(p);
+    if (c == '<' &&
+        p->lstate != EXPR_DOT &&
+        p->lstate != EXPR_CLASS &&
+        !IS_END() &&
+        (!IS_ARG() || space_seen)) {
+      int token = heredoc_identifier(p);
+      if (token)
+        return token;
+    }
+    if (p->lstate == EXPR_FNAME || p->lstate == EXPR_DOT) {
+      p->lstate = EXPR_ARG;
+    }
+    else {
+      p->lstate = EXPR_BEG;
+      if (p->lstate == EXPR_CLASS) {
+        p->cmd_start = TRUE;
+      }
+    }
+    if (c == '=') {
+      if ((c = nextc(p)) == '>') {
+        return tCMP;
+      }
+      pushback(p, c);
+      return tLEQ;
+    }
+    if (c == '<') {
+      if ((c = nextc(p)) == '=') {
+        yylval.id = intern("<<",2);
+        p->lstate = EXPR_BEG;
+        return tOP_ASGN;
+      }
+      pushback(p, c);
+      return tLSHFT;
+    }
+    pushback(p, c);
+    return '<';
+
+  case '>':
+    if (p->lstate == EXPR_FNAME || p->lstate == EXPR_DOT) {
+      p->lstate = EXPR_ARG;
+    }
+    else {
+      p->lstate = EXPR_BEG;
+    }
+    if ((c = nextc(p)) == '=') {
+      return tGEQ;
+    }
+    if (c == '>') {
+      if ((c = nextc(p)) == '=') {
+        yylval.id = intern(">>",2);
+        p->lstate = EXPR_BEG;
+        return tOP_ASGN;
+      }
+      pushback(p, c);
+      return tRSHFT;
+    }
+    pushback(p, c);
+    return '>';
+
+  case '"':
+    p->lex_strterm = new_strterm(p, str_dquote, '"', 0);
+    return tSTRING_BEG;
+
+  case '\'':
+    p->lex_strterm = new_strterm(p, str_squote, '\'', 0);
+    return parse_string(p);
+
+  case '`':
+    if (p->lstate == EXPR_FNAME) {
+      p->lstate = EXPR_ENDFN;
+      return '`';
+    }
+    if (p->lstate == EXPR_DOT) {
+      if (cmd_state)
+        p->lstate = EXPR_CMDARG;
+      else
+        p->lstate = EXPR_ARG;
+      return '`';
+    }
+    p->lex_strterm = new_strterm(p, str_xquote, '`', 0);
+    return tXSTRING_BEG;
+
+  case '?':
+    if (IS_END()) {
+      p->lstate = EXPR_VALUE;
+      return '?';
+    }
+    c = nextc(p);
+    if (c < 0) {
+      yyerror(p, "incomplete character syntax");
+      return 0;
+    }
+    if (ISSPACE(c)) {
+      if (!IS_ARG()) {
+        int c2;
+        switch (c) {
+        case ' ':
+          c2 = 's';
+          break;
+        case '\n':
+          c2 = 'n';
+          break;
+        case '\t':
+          c2 = 't';
+          break;
+        case '\v':
+          c2 = 'v';
+          break;
+        case '\r':
+          c2 = 'r';
+          break;
+        case '\f':
+          c2 = 'f';
+          break;
+        default:
+          c2 = 0;
+          break;
+        }
+        if (c2) {
+          char buf[256];
+          snprintf(buf, sizeof(buf), "invalid character syntax; use ?\\%c", c2);
+          yyerror(p, buf);
+        }
+      }
+      ternary:
+      pushback(p, c);
+      p->lstate = EXPR_VALUE;
+      return '?';
+    }
+    newtok(p);
+    /* need support UTF-8 if configured */
+    if ((isalnum(c) || c == '_')) {
+      int c2 = nextc(p);
+      pushback(p, c2);
+      if ((isalnum(c2) || c2 == '_')) {
+        goto ternary;
+      }
+    }
+    if (c == '\\') {
+      c = read_escape(p);
+      tokadd(p, c);
+    }
+    else {
+      tokadd(p, c);
+    }
+    tokfix(p);
+    yylval.nd = new_str(p, tok(p), toklen(p));
+    p->lstate = EXPR_END;
+    return tCHAR;
+
+  case '&':
+    if ((c = nextc(p)) == '&') {
+      p->lstate = EXPR_BEG;
+      if ((c = nextc(p)) == '=') {
+        yylval.id = intern("&&",2);
+        p->lstate = EXPR_BEG;
+        return tOP_ASGN;
+      }
+      pushback(p, c);
+      return tANDOP;
+    }
+    else if (c == '=') {
+      yylval.id = intern_c('&');
+      p->lstate = EXPR_BEG;
+      return tOP_ASGN;
+    }
+    pushback(p, c);
+    if (IS_SPCARG(c)) {
+      yywarning(p, "'&' interpreted as argument prefix");
+      c = tAMPER;
+    }
+    else if (IS_BEG()) {
+      c = tAMPER;
+    }
+    else {
+      c = '&';
+    }
+    if (p->lstate == EXPR_FNAME || p->lstate == EXPR_DOT) {
+      p->lstate = EXPR_ARG;
+    }
+    else {
+      p->lstate = EXPR_BEG;
+    }
+    return c;
+
+  case '|':
+    if ((c = nextc(p)) == '|') {
+      p->lstate = EXPR_BEG;
+      if ((c = nextc(p)) == '=') {
+        yylval.id = intern("||",2);
+        p->lstate = EXPR_BEG;
+        return tOP_ASGN;
+      }
+      pushback(p, c);
+      return tOROP;
+    }
+    if (c == '=') {
+      yylval.id = intern_c('|');
+      p->lstate = EXPR_BEG;
+      return tOP_ASGN;
+    }
+    if (p->lstate == EXPR_FNAME || p->lstate == EXPR_DOT) {
+      p->lstate = EXPR_ARG;
+    }
+    else {
+      p->lstate = EXPR_BEG;
+    }
+    pushback(p, c);
+    return '|';
+
+  case '+':
+    c = nextc(p);
+    if (p->lstate == EXPR_FNAME || p->lstate == EXPR_DOT) {
+      p->lstate = EXPR_ARG;
+      if (c == '@') {
+        return tUPLUS;
+      }
+      pushback(p, c);
+      return '+';
+    }
+    if (c == '=') {
+      yylval.id = intern_c('+');
+      p->lstate = EXPR_BEG;
+      return tOP_ASGN;
+    }
+    if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p))) {
+      p->lstate = EXPR_BEG;
+      pushback(p, c);
+      if (c >= 0 && ISDIGIT(c)) {
+        c = '+';
+        goto start_num;
+      }
+      return tUPLUS;
+    }
+    p->lstate = EXPR_BEG;
+    pushback(p, c);
+    return '+';
+
+  case '-':
+    c = nextc(p);
+    if (p->lstate == EXPR_FNAME || p->lstate == EXPR_DOT) {
+      p->lstate = EXPR_ARG;
+      if (c == '@') {
+        return tUMINUS;
+      }
+      pushback(p, c);
+      return '-';
+    }
+    if (c == '=') {
+      yylval.id = intern_c('-');
+      p->lstate = EXPR_BEG;
+      return tOP_ASGN;
+    }
+    if (c == '>') {
+      p->lstate = EXPR_ENDFN;
+      return tLAMBDA;
+    }
+    if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p))) {
+      p->lstate = EXPR_BEG;
+      pushback(p, c);
+      if (c >= 0 && ISDIGIT(c)) {
+        return tUMINUS_NUM;
+      }
+      return tUMINUS;
+    }
+    p->lstate = EXPR_BEG;
+    pushback(p, c);
+    return '-';
+
+  case '.':
+    p->lstate = EXPR_BEG;
+    if ((c = nextc(p)) == '.') {
+      if ((c = nextc(p)) == '.') {
+        return tDOT3;
+      }
+      pushback(p, c);
+      return tDOT2;
+    }
+    pushback(p, c);
+    if (c >= 0 && ISDIGIT(c)) {
+      yyerror(p, "no .<digit> floating literal anymore; put 0 before dot");
+    }
+    p->lstate = EXPR_DOT;
+    return '.';
+
+    start_num:
+  case '0': case '1': case '2': case '3': case '4':
+  case '5': case '6': case '7': case '8': case '9':
+  {
+    int is_float, seen_point, seen_e, nondigit;
+
+    is_float = seen_point = seen_e = nondigit = 0;
+    p->lstate = EXPR_END;
+    newtok(p);
+    if (c == '-' || c == '+') {
+      tokadd(p, c);
+      c = nextc(p);
+    }
+    if (c == '0') {
+#define no_digits() do {yyerror(p,"numeric literal without digits"); return 0;} while (0)
+      int start = toklen(p);
+      c = nextc(p);
+      if (c == 'x' || c == 'X') {
+        /* hexadecimal */
+        c = nextc(p);
+        if (c >= 0 && ISXDIGIT(c)) {
+          do {
+            if (c == '_') {
+              if (nondigit) break;
+              nondigit = c;
+              continue;
+            }
+            if (!ISXDIGIT(c)) break;
+            nondigit = 0;
+            tokadd(p, tolower(c));
+          } while ((c = nextc(p)) >= 0);
+        }
+        pushback(p, c);
+        tokfix(p);
+        if (toklen(p) == start) {
+          no_digits();
+        }
+        else if (nondigit) goto trailing_uc;
+        yylval.nd = new_int(p, tok(p), 16);
+        return tINTEGER;
+      }
+      if (c == 'b' || c == 'B') {
+        /* binary */
+        c = nextc(p);
+        if (c == '0' || c == '1') {
+          do {
+            if (c == '_') {
+              if (nondigit) break;
+              nondigit = c;
+              continue;
+            }
+            if (c != '0' && c != '1') break;
+            nondigit = 0;
+            tokadd(p, c);
+          } while ((c = nextc(p)) >= 0);
+        }
+        pushback(p, c);
+        tokfix(p);
+        if (toklen(p) == start) {
+          no_digits();
+        }
+        else if (nondigit) goto trailing_uc;
+        yylval.nd = new_int(p, tok(p), 2);
+        return tINTEGER;
+      }
+      if (c == 'd' || c == 'D') {
+        /* decimal */
+        c = nextc(p);
+        if (c >= 0 && ISDIGIT(c)) {
+          do {
+            if (c == '_') {
+              if (nondigit) break;
+              nondigit = c;
+              continue;
+            }
+            if (!ISDIGIT(c)) break;
+            nondigit = 0;
+            tokadd(p, c);
+          } while ((c = nextc(p)) >= 0);
+        }
+        pushback(p, c);
+        tokfix(p);
+        if (toklen(p) == start) {
+          no_digits();
+        }
+        else if (nondigit) goto trailing_uc;
+        yylval.nd = new_int(p, tok(p), 10);
+        return tINTEGER;
+      }
+      if (c == '_') {
+        /* 0_0 */
+        goto octal_number;
+      }
+      if (c == 'o' || c == 'O') {
+        /* prefixed octal */
+        c = nextc(p);
+        if (c < 0 || c == '_' || !ISDIGIT(c)) {
+          no_digits();
+        }
+      }
+      if (c >= '0' && c <= '7') {
+        /* octal */
+        octal_number:
+        do {
+          if (c == '_') {
+            if (nondigit) break;
+            nondigit = c;
+            continue;
+          }
+          if (c < '0' || c > '9') break;
+          if (c > '7') goto invalid_octal;
+          nondigit = 0;
+          tokadd(p, c);
+        } while ((c = nextc(p)) >= 0);
+
+        if (toklen(p) > start) {
+          pushback(p, c);
+          tokfix(p);
+          if (nondigit) goto trailing_uc;
+          yylval.nd = new_int(p, tok(p), 8);
+          return tINTEGER;
+        }
+        if (nondigit) {
+          pushback(p, c);
+          goto trailing_uc;
+        }
+      }
+      if (c > '7' && c <= '9') {
+        invalid_octal:
+        yyerror(p, "Invalid octal digit");
+      }
+      else if (c == '.' || c == 'e' || c == 'E') {
+        tokadd(p, '0');
+      }
+      else {
+        pushback(p, c);
+        yylval.nd = new_int(p, "0", 10);
+        return tINTEGER;
+      }
+    }
+
+    for (;;) {
+      switch (c) {
+      case '0': case '1': case '2': case '3': case '4':
+      case '5': case '6': case '7': case '8': case '9':
+        nondigit = 0;
+        tokadd(p, c);
+        break;
+
+      case '.':
+        if (nondigit) goto trailing_uc;
+        if (seen_point || seen_e) {
+          goto decode_num;
+        }
+        else {
+          int c0 = nextc(p);
+          if (c0 < 0 || !ISDIGIT(c0)) {
+            pushback(p, c0);
+            goto decode_num;
+          }
+          c = c0;
+        }
+        tokadd(p, '.');
+        tokadd(p, c);
+        is_float++;
+        seen_point++;
+        nondigit = 0;
+        break;
+
+      case 'e':
+      case 'E':
+        if (nondigit) {
+          pushback(p, c);
+          c = nondigit;
+          goto decode_num;
+        }
+        if (seen_e) {
+          goto decode_num;
+        }
+        tokadd(p, c);
+        seen_e++;
+        is_float++;
+        nondigit = c;
+        c = nextc(p);
+        if (c != '-' && c != '+') continue;
+        tokadd(p, c);
+        nondigit = c;
+        break;
+
+      case '_':       /* '_' in number just ignored */
+        if (nondigit) goto decode_num;
+        nondigit = c;
+        break;
+
+      default:
+        goto decode_num;
+      }
+      c = nextc(p);
+    }
+
+    decode_num:
+    pushback(p, c);
+    if (nondigit) {
+      trailing_uc:
+      yyerror_i(p, "trailing '%c' in number", nondigit);
+    }
+    tokfix(p);
+    if (is_float) {
+      double d;
+      char *endp;
+
+      errno = 0;
+      d = strtod(tok(p), &endp);
+      if (d == 0 && endp == tok(p)) {
+        yywarning_s(p, "corrupted float value %s", tok(p));
+      }
+      else if (errno == ERANGE) {
+        yywarning_s(p, "float %s out of range", tok(p));
+        errno = 0;
+      }
+      yylval.nd = new_float(p, tok(p));
+      return tFLOAT;
+    }
+    yylval.nd = new_int(p, tok(p), 10);
+    return tINTEGER;
+  }
+
+  case ')':
+  case ']':
+    p->paren_nest--;
+    /* fall through */
+  case '}':
+    COND_LEXPOP();
+    CMDARG_LEXPOP();
+    if (c == ')')
+      p->lstate = EXPR_ENDFN;
+    else
+      p->lstate = EXPR_ENDARG;
+    return c;
+
+  case ':':
+    c = nextc(p);
+    if (c == ':') {
+      if (IS_BEG() || p->lstate == EXPR_CLASS || IS_SPCARG(-1)) {
+        p->lstate = EXPR_BEG;
+        return tCOLON3;
+      }
+      p->lstate = EXPR_DOT;
+      return tCOLON2;
+    }
+    if (IS_END() || ISSPACE(c)) {
+      pushback(p, c);
+      p->lstate = EXPR_BEG;
+      return ':';
+    }
+    pushback(p, c);
+    p->lstate = EXPR_FNAME;
+    return tSYMBEG;
+
+  case '/':
+    if (IS_BEG()) {
+      p->lex_strterm = new_strterm(p, str_regexp, '/', 0);
+      return tREGEXP_BEG;
+    }
+    if ((c = nextc(p)) == '=') {
+      yylval.id = intern_c('/');
+      p->lstate = EXPR_BEG;
+      return tOP_ASGN;
+    }
+    pushback(p, c);
+    if (IS_SPCARG(c)) {
+      p->lex_strterm = new_strterm(p, str_regexp, '/', 0);
+      return tREGEXP_BEG;
+    }
+    if (p->lstate == EXPR_FNAME || p->lstate == EXPR_DOT) {
+      p->lstate = EXPR_ARG;
+    }
+    else {
+      p->lstate = EXPR_BEG;
+    }
+    return '/';
+
+  case '^':
+    if ((c = nextc(p)) == '=') {
+      yylval.id = intern_c('^');
+      p->lstate = EXPR_BEG;
+      return tOP_ASGN;
+    }
+    if (p->lstate == EXPR_FNAME || p->lstate == EXPR_DOT) {
+      p->lstate = EXPR_ARG;
+    }
+    else {
+      p->lstate = EXPR_BEG;
+    }
+    pushback(p, c);
+    return '^';
+
+  case ';':
+    p->lstate = EXPR_BEG;
+    return ';';
+
+  case ',':
+    p->lstate = EXPR_BEG;
+    return ',';
+
+  case '~':
+    if (p->lstate == EXPR_FNAME || p->lstate == EXPR_DOT) {
+      if ((c = nextc(p)) != '@') {
+        pushback(p, c);
+      }
+      p->lstate = EXPR_ARG;
+    }
+    else {
+      p->lstate = EXPR_BEG;
+    }
+    return '~';
+
+  case '(':
+    if (IS_BEG()) {
+      c = tLPAREN;
+    }
+    else if (IS_SPCARG(-1)) {
+      c = tLPAREN_ARG;
+    }
+    p->paren_nest++;
+    COND_PUSH(0);
+    CMDARG_PUSH(0);
+    p->lstate = EXPR_BEG;
+    return c;
+
+  case '[':
+    p->paren_nest++;
+    if (p->lstate == EXPR_FNAME || p->lstate == EXPR_DOT) {
+      p->lstate = EXPR_ARG;
+      if ((c = nextc(p)) == ']') {
+        if ((c = nextc(p)) == '=') {
+          return tASET;
+        }
+        pushback(p, c);
+        return tAREF;
+      }
+      pushback(p, c);
+      return '[';
+    }
+    else if (IS_BEG()) {
+      c = tLBRACK;
+    }
+    else if (IS_ARG() && space_seen) {
+      c = tLBRACK;
+    }
+    p->lstate = EXPR_BEG;
+    COND_PUSH(0);
+    CMDARG_PUSH(0);
+    return c;
+
+  case '{':
+    if (p->lpar_beg && p->lpar_beg == p->paren_nest) {
+      p->lstate = EXPR_BEG;
+      p->lpar_beg = 0;
+      p->paren_nest--;
+      COND_PUSH(0);
+      CMDARG_PUSH(0);
+      return tLAMBEG;
+    }
+    if (IS_ARG() || p->lstate == EXPR_END || p->lstate == EXPR_ENDFN)
+      c = '{';          /* block (primary) */
+    else if (p->lstate == EXPR_ENDARG)
+      c = tLBRACE_ARG;  /* block (expr) */
+    else
+      c = tLBRACE;      /* hash */
+    COND_PUSH(0);
+    CMDARG_PUSH(0);
+    p->lstate = EXPR_BEG;
+    return c;
+
+  case '\\':
+    c = nextc(p);
+    if (c == '\n') {
+      p->lineno++;
+      p->column = 0;
+      space_seen = 1;
+      goto retry; /* skip \\n */
+    }
+    pushback(p, c);
+    return '\\';
+
+  case '%':
+    if (IS_BEG()) {
+      int term;
+      int paren;
+
+      c = nextc(p);
+      quotation:
+      if (c < 0 || !ISALNUM(c)) {
+        term = c;
+        c = 'Q';
+      }
+      else {
+        term = nextc(p);
+        if (isalnum(term)) {
+          yyerror(p, "unknown type of %string");
+          return 0;
+        }
+      }
+      if (c < 0 || term < 0) {
+        yyerror(p, "unterminated quoted string meets end of file");
+        return 0;
+      }
+      paren = term;
+      if (term == '(') term = ')';
+      else if (term == '[') term = ']';
+      else if (term == '{') term = '}';
+      else if (term == '<') term = '>';
+      else paren = 0;
+
+      switch (c) {
+      case 'Q':
+        p->lex_strterm = new_strterm(p, str_dquote, term, paren);
+        return tSTRING_BEG;
+
+      case 'q':
+        p->lex_strterm = new_strterm(p, str_squote, term, paren);
+        return parse_string(p);
+
+      case 'W':
+        p->lex_strterm = new_strterm(p, str_dword, term, paren);
+        return tWORDS_BEG;
+
+      case 'w':
+        p->lex_strterm = new_strterm(p, str_sword, term, paren);
+        return tWORDS_BEG;
+
+      case 'x':
+        p->lex_strterm = new_strterm(p, str_xquote, term, paren);
+        return tXSTRING_BEG;
+
+      case 'r':
+        p->lex_strterm = new_strterm(p, str_regexp, term, paren);
+        return tREGEXP_BEG;
+
+      case 's':
+        p->lex_strterm = new_strterm(p, str_ssym, term, paren);
+        return tSYMBEG;
+
+      case 'I':
+        p->lex_strterm = new_strterm(p, str_dsymbols, term, paren);
+        return tSYMBOLS_BEG;
+
+      case 'i':
+        p->lex_strterm = new_strterm(p, str_ssymbols, term, paren);
+        return tSYMBOLS_BEG;
+
+      default:
+        yyerror(p, "unknown type of %string");
+        return 0;
+      }
+    }
+    if ((c = nextc(p)) == '=') {
+      yylval.id = intern_c('%');
+      p->lstate = EXPR_BEG;
+      return tOP_ASGN;
+    }
+    if (IS_SPCARG(c)) {
+      goto quotation;
+    }
+    if (p->lstate == EXPR_FNAME || p->lstate == EXPR_DOT) {
+      p->lstate = EXPR_ARG;
+    }
+    else {
+      p->lstate = EXPR_BEG;
+    }
+    pushback(p, c);
+    return '%';
+
+  case '$':
+    p->lstate = EXPR_END;
+    token_column = newtok(p);
+    c = nextc(p);
+    if (c < 0) {
+      yyerror(p, "incomplete global variable syntax");
+      return 0;
+    }
+    switch (c) {
+    case '_':     /* $_: last read line string */
+      c = nextc(p);
+      if (c >= 0 && identchar(c)) { /* if there is more after _ it is a variable */
+        tokadd(p, '$');
+        tokadd(p, c);
+        break;
+      }
+      pushback(p, c);
+      c = '_';
+      /* fall through */
+    case '~':     /* $~: match-data */
+    case '*':     /* $*: argv */
+    case '$':     /* $$: pid */
+    case '?':     /* $?: last status */
+    case '!':     /* $!: error string */
+    case '@':     /* $@: error position */
+    case '/':     /* $/: input record separator */
+    case '\\':    /* $\: output record separator */
+    case ';':     /* $;: field separator */
+    case ',':     /* $,: output field separator */
+    case '.':     /* $.: last read line number */
+    case '=':     /* $=: ignorecase */
+    case ':':     /* $:: load path */
+    case '<':     /* $<: reading filename */
+    case '>':     /* $>: default output handle */
+    case '\"':    /* $": already loaded files */
+      tokadd(p, '$');
+      tokadd(p, c);
+      tokfix(p);
+      yylval.id = intern_cstr(tok(p));
+      return tGVAR;
+
+    case '-':
+      tokadd(p, '$');
+      tokadd(p, c);
+      c = nextc(p);
+      pushback(p, c);
+      gvar:
+      tokfix(p);
+      yylval.id = intern_cstr(tok(p));
+      return tGVAR;
+
+    case '&':     /* $&: last match */
+    case '`':     /* $`: string before last match */
+    case '\'':    /* $': string after last match */
+    case '+':     /* $+: string matches last pattern */
+      if (last_state == EXPR_FNAME) {
+        tokadd(p, '$');
+        tokadd(p, c);
+        goto gvar;
+      }
+      yylval.nd = new_back_ref(p, c);
+      return tBACK_REF;
+
+    case '1': case '2': case '3':
+    case '4': case '5': case '6':
+    case '7': case '8': case '9':
+      do {
+        tokadd(p, c);
+        c = nextc(p);
+      } while (c >= 0 && isdigit(c));
+      pushback(p, c);
+      if (last_state == EXPR_FNAME) goto gvar;
+      tokfix(p);
+      {
+        unsigned long n = strtoul(tok(p), NULL, 10);
+        if (n > INT_MAX) {
+          yyerror_i(p, "capture group index must be <= %d", INT_MAX);
+          return 0;
+        }
+        yylval.nd = new_nth_ref(p, (int)n);
+      }
+      return tNTH_REF;
+
+    default:
+      if (!identchar(c)) {
+        pushback(p,  c);
+        return '$';
+      }
+      /* fall through */
+    case '0':
+      tokadd(p, '$');
+    }
+    break;
+
+    case '@':
+      c = nextc(p);
+      token_column = newtok(p);
+      tokadd(p, '@');
+      if (c == '@') {
+        tokadd(p, '@');
+        c = nextc(p);
+      }
+      if (c < 0) {
+        if (p->bidx == 1) {
+          yyerror(p, "incomplete instance variable syntax");
+        }
+        else {
+          yyerror(p, "incomplete class variable syntax");
+        }
+        return 0;
+      }
+      else if (isdigit(c)) {
+        if (p->bidx == 1) {
+          yyerror_i(p, "'@%c' is not allowed as an instance variable name", c);
+        }
+        else {
+          yyerror_i(p, "'@@%c' is not allowed as a class variable name", c);
+        }
+        return 0;
+      }
+      if (!identchar(c)) {
+        pushback(p, c);
+        return '@';
+      }
+      break;
+
+    case '_':
+      token_column = newtok(p);
+      break;
+
+    default:
+      if (!identchar(c)) {
+        yyerror_i(p,  "Invalid char '\\x%02X' in expression", c);
+        goto retry;
+      }
+
+      token_column = newtok(p);
+      break;
+  }
+
+  do {
+    tokadd(p, c);
+    c = nextc(p);
+    if (c < 0) break;
+  } while (identchar(c));
+  if (token_column == 0 && toklen(p) == 7 && (c < 0 || c == '\n') &&
+      strncmp(tok(p), "__END__", toklen(p)) == 0)
+    return -1;
+
+  switch (tok(p)[0]) {
+  case '@': case '$':
+    pushback(p, c);
+    break;
+  default:
+    if ((c == '!' || c == '?') && !peek(p, '=')) {
+      tokadd(p, c);
+    }
+    else {
+      pushback(p, c);
+    }
+  }
+  tokfix(p);
+  {
+    int result = 0;
+
+    switch (tok(p)[0]) {
+    case '$':
+      p->lstate = EXPR_END;
+      result = tGVAR;
+      break;
+    case '@':
+      p->lstate = EXPR_END;
+      if (tok(p)[1] == '@')
+        result = tCVAR;
+      else
+        result = tIVAR;
+      break;
+
+    default:
+      if (toklast(p) == '!' || toklast(p) == '?') {
+        result = tFID;
+      }
+      else {
+        if (p->lstate == EXPR_FNAME) {
+          if ((c = nextc(p)) == '=' && !peek(p, '~') && !peek(p, '>') &&
+              (!peek(p, '=') || (peek_n(p, '>', 1)))) {
+            result = tIDENTIFIER;
+            tokadd(p, c);
+            tokfix(p);
+          }
+          else {
+            pushback(p, c);
+          }
+        }
+        if (result == 0 && ISUPPER(tok(p)[0])) {
+          result = tCONSTANT;
+        }
+        else {
+          result = tIDENTIFIER;
+        }
+      }
+
+      if (IS_LABEL_POSSIBLE()) {
+        if (IS_LABEL_SUFFIX(0)) {
+          p->lstate = EXPR_BEG;
+          nextc(p);
+          tokfix(p);
+          yylval.id = intern_cstr(tok(p));
+          return tLABEL;
+        }
+      }
+      if (p->lstate != EXPR_DOT) {
+        const struct kwtable *kw;
+
+        /* See if it is a reserved word.  */
+        kw = mrb_reserved_word(tok(p), toklen(p));
+        if (kw) {
+          enum mrb_lex_state_enum state = p->lstate;
+          yylval.num = p->lineno;
+          p->lstate = kw->state;
+          if (state == EXPR_FNAME) {
+            yylval.id = intern_cstr(kw->name);
+            return kw->id[0];
+          }
+          if (p->lstate == EXPR_BEG) {
+            p->cmd_start = TRUE;
+          }
+          if (kw->id[0] == keyword_do) {
+            if (p->lpar_beg && p->lpar_beg == p->paren_nest) {
+              p->lpar_beg = 0;
+              p->paren_nest--;
+              return keyword_do_LAMBDA;
+            }
+            if (COND_P()) return keyword_do_cond;
+            if (CMDARG_P() && state != EXPR_CMDARG)
+              return keyword_do_block;
+            if (state == EXPR_ENDARG || state == EXPR_BEG)
+              return keyword_do_block;
+            return keyword_do;
+          }
+          if (state == EXPR_BEG || state == EXPR_VALUE)
+            return kw->id[0];
+          else {
+            if (kw->id[0] != kw->id[1])
+              p->lstate = EXPR_BEG;
+            return kw->id[1];
+          }
+        }
+      }
+
+      if (IS_BEG() || p->lstate == EXPR_DOT || IS_ARG()) {
+        if (cmd_state) {
+          p->lstate = EXPR_CMDARG;
+        }
+        else {
+          p->lstate = EXPR_ARG;
+        }
+      }
+      else if (p->lstate == EXPR_FNAME) {
+        p->lstate = EXPR_ENDFN;
+      }
+      else {
+        p->lstate = EXPR_END;
+      }
+    }
+    {
+      mrb_sym ident = intern_cstr(tok(p));
+
+      yylval.id = ident;
+#if 0
+      if (last_state != EXPR_DOT && islower(tok(p)[0]) && lvar_defined(ident)) {
+        p->lstate = EXPR_END;
+      }
+#endif
+    }
+    return result;
+  }
+}
+
+static int
+yylex(void *lval, parser_state *p)
+{
+  p->ylval = lval;
+  return parser_yylex(p);
+}
+
+static void
+parser_init_cxt(parser_state *p, mrbc_context *cxt)
+{
+  if (!cxt) return;
+  if (cxt->filename) mrb_parser_set_filename(p, cxt->filename);
+  if (cxt->lineno) p->lineno = cxt->lineno;
+  if (cxt->syms) {
+    int i;
+
+    p->locals = cons(0,0);
+    for (i=0; i<cxt->slen; i++) {
+      local_add_f(p, cxt->syms[i]);
+    }
+  }
+  p->capture_errors = cxt->capture_errors;
+  p->no_optimize = cxt->no_optimize;
+  if (cxt->partial_hook) {
+    p->cxt = cxt;
+  }
+}
+
+static void
+parser_update_cxt(parser_state *p, mrbc_context *cxt)
+{
+  node *n, *n0;
+  int i = 0;
+
+  if (!cxt) return;
+  if ((int)(intptr_t)p->tree->car != NODE_SCOPE) return;
+  n0 = n = p->tree->cdr->car;
+  while (n) {
+    i++;
+    n = n->cdr;
+  }
+  cxt->syms = (mrb_sym *)mrb_realloc(p->mrb, cxt->syms, i*sizeof(mrb_sym));
+  cxt->slen = i;
+  for (i=0, n=n0; n; i++,n=n->cdr) {
+    cxt->syms[i] = sym(n->car);
+  }
+}
+
+void mrb_codedump_all(mrb_state*, struct RProc*);
+void mrb_parser_dump(mrb_state *mrb, node *tree, int offset);
+
+MRB_API void
+mrb_parser_parse(parser_state *p, mrbc_context *c)
+{
+  struct mrb_jmpbuf buf;
+  p->jmp = &buf;
+
+  MRB_TRY(p->jmp) {
+
+    p->cmd_start = TRUE;
+    p->in_def = p->in_single = 0;
+    p->nerr = p->nwarn = 0;
+    p->lex_strterm = NULL;
+
+    parser_init_cxt(p, c);
+    yyparse(p);
+    if (!p->tree) {
+      p->tree = new_nil(p);
+    }
+    parser_update_cxt(p, c);
+    if (c && c->dump_result) {
+      mrb_parser_dump(p->mrb, p->tree, 0);
+    }
+
+  }
+  MRB_CATCH(p->jmp) {
+    yyerror(p, "memory allocation error");
+    p->nerr++;
+    p->tree = 0;
+    return;
+  }
+  MRB_END_EXC(p->jmp);
+}
+
+MRB_API parser_state*
+mrb_parser_new(mrb_state *mrb)
+{
+  mrb_pool *pool;
+  parser_state *p;
+  static const parser_state parser_state_zero = { 0 };
+
+  pool = mrb_pool_open(mrb);
+  if (!pool) return NULL;
+  p = (parser_state *)mrb_pool_alloc(pool, sizeof(parser_state));
+  if (!p) return NULL;
+
+  *p = parser_state_zero;
+  p->mrb = mrb;
+  p->pool = pool;
+
+  p->s = p->send = NULL;
+#ifndef MRB_DISBLE_STDIO
+  p->f = NULL;
+#endif
+
+  p->cmd_start = TRUE;
+  p->in_def = p->in_single = 0;
+
+  p->capture_errors = FALSE;
+  p->lineno = 1;
+  p->column = 0;
+#if defined(PARSER_TEST) || defined(PARSER_DEBUG)
+  yydebug = 1;
+#endif
+
+  p->lex_strterm = NULL;
+  p->all_heredocs = p->parsing_heredoc = NULL;
+  p->lex_strterm_before_heredoc = NULL;
+
+  p->current_filename_index = -1;
+  p->filename_table = NULL;
+  p->filename_table_length = 0;
+
+  return p;
+}
+
+MRB_API void
+mrb_parser_free(parser_state *p) {
+  mrb_pool_close(p->pool);
+}
+
+MRB_API mrbc_context*
+mrbc_context_new(mrb_state *mrb)
+{
+  return (mrbc_context *)mrb_calloc(mrb, 1, sizeof(mrbc_context));
+}
+
+MRB_API void
+mrbc_context_free(mrb_state *mrb, mrbc_context *cxt)
+{
+  mrb_free(mrb, cxt->syms);
+  mrb_free(mrb, cxt);
+}
+
+MRB_API const char*
+mrbc_filename(mrb_state *mrb, mrbc_context *c, const char *s)
+{
+  if (s) {
+    int len = strlen(s);
+    char *p = (char *)mrb_alloca(mrb, len + 1);
+
+    memcpy(p, s, len + 1);
+    c->filename = p;
+  }
+  return c->filename;
+}
+
+MRB_API void
+mrbc_partial_hook(mrb_state *mrb, mrbc_context *c, int (*func)(struct mrb_parser_state*), void *data)
+{
+  c->partial_hook = func;
+  c->partial_data = data;
+}
+
+MRB_API void
+mrb_parser_set_filename(struct mrb_parser_state *p, const char *f)
+{
+  mrb_sym sym;
+  size_t i;
+  mrb_sym* new_table;
+
+  sym = mrb_intern_cstr(p->mrb, f);
+  p->filename = mrb_sym2name_len(p->mrb, sym, NULL);
+  p->lineno = (p->filename_table_length > 0)? 0 : 1;
+
+  for (i = 0; i < p->filename_table_length; ++i) {
+    if (p->filename_table[i] == sym) {
+      p->current_filename_index = i;
+      return;
+    }
+  }
+
+  p->current_filename_index = p->filename_table_length++;
+
+  new_table = (mrb_sym*)parser_palloc(p, sizeof(mrb_sym) * p->filename_table_length);
+  if (p->filename_table) {
+    memmove(new_table, p->filename_table, sizeof(mrb_sym) * p->filename_table_length);
+  }
+  p->filename_table = new_table;
+  p->filename_table[p->filename_table_length - 1] = sym;
+}
+
+MRB_API char const*
+mrb_parser_get_filename(struct mrb_parser_state* p, uint16_t idx) {
+  if (idx >= p->filename_table_length) { return NULL; }
+  else {
+    return mrb_sym2name_len(p->mrb, p->filename_table[idx], NULL);
+  }
+}
+
+#ifndef MRB_DISABLE_STDIO
+MRB_API parser_state*
+mrb_parse_file(mrb_state *mrb, FILE *f, mrbc_context *c)
+{
+  parser_state *p;
+
+  p = mrb_parser_new(mrb);
+  if (!p) return NULL;
+  p->s = p->send = NULL;
+  p->f = f;
+
+  mrb_parser_parse(p, c);
+  return p;
+}
+#endif
+
+MRB_API parser_state*
+mrb_parse_nstring(mrb_state *mrb, const char *s, int len, mrbc_context *c)
+{
+  parser_state *p;
+
+  p = mrb_parser_new(mrb);
+  if (!p) return NULL;
+  p->s = s;
+  p->send = s + len;
+
+  mrb_parser_parse(p, c);
+  return p;
+}
+
+MRB_API parser_state*
+mrb_parse_string(mrb_state *mrb, const char *s, mrbc_context *c)
+{
+  return mrb_parse_nstring(mrb, s, strlen(s), c);
+}
+
+static mrb_value
+load_exec(mrb_state *mrb, parser_state *p, mrbc_context *c)
+{
+  struct RClass *target = mrb->object_class;
+  struct RProc *proc;
+  mrb_value v;
+  unsigned int keep = 0;
+
+  if (!p) {
+    return mrb_undef_value();
+  }
+  if (!p->tree || p->nerr) {
+    if (p->capture_errors) {
+      char buf[256];
+      int n;
+
+      n = snprintf(buf, sizeof(buf), "line %d: %s\n",
+          p->error_buffer[0].lineno, p->error_buffer[0].message);
+      mrb->exc = mrb_obj_ptr(mrb_exc_new(mrb, E_SYNTAX_ERROR, buf, n));
+      mrb_parser_free(p);
+      return mrb_undef_value();
+    }
+    else {
+      mrb->exc = mrb_obj_ptr(mrb_exc_new_str_lit(mrb, E_SYNTAX_ERROR, "syntax error"));
+      mrb_parser_free(p);
+      return mrb_undef_value();
+    }
+  }
+  proc = mrb_generate_code(mrb, p);
+  mrb_parser_free(p);
+  if (proc == NULL) {
+    mrb->exc = mrb_obj_ptr(mrb_exc_new_str_lit(mrb, E_SCRIPT_ERROR, "codegen error"));
+    return mrb_undef_value();
+  }
+  if (c) {
+    if (c->dump_result) mrb_codedump_all(mrb, proc);
+    if (c->no_exec) return mrb_obj_value(proc);
+    if (c->target_class) {
+      target = c->target_class;
+    }
+    if (c->keep_lv) {
+      keep = c->slen + 1;
+    }
+    else {
+      c->keep_lv = TRUE;
+    }
+  }
+  proc->target_class = target;
+  if (mrb->c->ci) {
+    mrb->c->ci->target_class = target;
+  }
+  v = mrb_toplevel_run_keep(mrb, proc, keep);
+  if (mrb->exc) return mrb_nil_value();
+  return v;
+}
+
+#ifndef MRB_DISABLE_STDIO
+MRB_API mrb_value
+mrb_load_file_cxt(mrb_state *mrb, FILE *f, mrbc_context *c)
+{
+  return load_exec(mrb, mrb_parse_file(mrb, f, c), c);
+}
+
+MRB_API mrb_value
+mrb_load_file(mrb_state *mrb, FILE *f)
+{
+  return mrb_load_file_cxt(mrb, f, NULL);
+}
+#endif
+
+MRB_API mrb_value
+mrb_load_nstring_cxt(mrb_state *mrb, const char *s, int len, mrbc_context *c)
+{
+  return load_exec(mrb, mrb_parse_nstring(mrb, s, len, c), c);
+}
+
+MRB_API mrb_value
+mrb_load_nstring(mrb_state *mrb, const char *s, int len)
+{
+  return mrb_load_nstring_cxt(mrb, s, len, NULL);
+}
+
+MRB_API mrb_value
+mrb_load_string_cxt(mrb_state *mrb, const char *s, mrbc_context *c)
+{
+  return mrb_load_nstring_cxt(mrb, s, strlen(s), c);
+}
+
+MRB_API mrb_value
+mrb_load_string(mrb_state *mrb, const char *s)
+{
+  return mrb_load_string_cxt(mrb, s, NULL);
+}
+
+#ifndef MRB_DISABLE_STDIO
+
+static void
+dump_prefix(node *tree, int offset)
+{
+  printf("%05d ", tree->lineno);
+  while (offset--) {
+    putc(' ', stdout);
+    putc(' ', stdout);
+  }
+}
+
+static void
+dump_recur(mrb_state *mrb, node *tree, int offset)
+{
+  while (tree) {
+    mrb_parser_dump(mrb, tree->car, offset);
+    tree = tree->cdr;
+  }
+}
+
+#endif
+
+void
+mrb_parser_dump(mrb_state *mrb, node *tree, int offset)
+{
+#ifndef MRB_DISABLE_STDIO
+  int nodetype;
+
+  if (!tree) return;
+  again:
+  dump_prefix(tree, offset);
+  nodetype = (int)(intptr_t)tree->car;
+  tree = tree->cdr;
+  switch (nodetype) {
+  case NODE_BEGIN:
+    printf("NODE_BEGIN:\n");
+    dump_recur(mrb, tree, offset+1);
+    break;
+
+  case NODE_RESCUE:
+    printf("NODE_RESCUE:\n");
+    if (tree->car) {
+      dump_prefix(tree, offset+1);
+      printf("body:\n");
+      mrb_parser_dump(mrb, tree->car, offset+2);
+    }
+    tree = tree->cdr;
+    if (tree->car) {
+      node *n2 = tree->car;
+
+      dump_prefix(n2, offset+1);
+      printf("rescue:\n");
+      while (n2) {
+        node *n3 = n2->car;
+        if (n3->car) {
+          dump_prefix(n2, offset+2);
+          printf("handle classes:\n");
+          dump_recur(mrb, n3->car, offset+3);
+        }
+        if (n3->cdr->car) {
+          dump_prefix(n3, offset+2);
+          printf("exc_var:\n");
+          mrb_parser_dump(mrb, n3->cdr->car, offset+3);
+        }
+        if (n3->cdr->cdr->car) {
+          dump_prefix(n3, offset+2);
+          printf("rescue body:\n");
+          mrb_parser_dump(mrb, n3->cdr->cdr->car, offset+3);
+        }
+        n2 = n2->cdr;
+      }
+    }
+    tree = tree->cdr;
+    if (tree->car) {
+      dump_prefix(tree, offset+1);
+      printf("else:\n");
+      mrb_parser_dump(mrb, tree->car, offset+2);
+    }
+    break;
+
+  case NODE_ENSURE:
+    printf("NODE_ENSURE:\n");
+    dump_prefix(tree, offset+1);
+    printf("body:\n");
+    mrb_parser_dump(mrb, tree->car, offset+2);
+    dump_prefix(tree, offset+1);
+    printf("ensure:\n");
+    mrb_parser_dump(mrb, tree->cdr->cdr, offset+2);
+    break;
+
+  case NODE_LAMBDA:
+    printf("NODE_BLOCK:\n");
+    goto block;
+
+  case NODE_BLOCK:
+    block:
+    printf("NODE_BLOCK:\n");
+    tree = tree->cdr;
+    if (tree->car) {
+      node *n = tree->car;
+
+      if (n->car) {
+        dump_prefix(n, offset+1);
+        printf("mandatory args:\n");
+        dump_recur(mrb, n->car, offset+2);
+      }
+      n = n->cdr;
+      if (n->car) {
+        dump_prefix(n, offset+1);
+        printf("optional args:\n");
+        {
+          node *n2 = n->car;
+
+          while (n2) {
+            dump_prefix(n2, offset+2);
+            printf("%s=", mrb_sym2name(mrb, sym(n2->car->car)));
+            mrb_parser_dump(mrb, n2->car->cdr, 0);
+            n2 = n2->cdr;
+          }
+        }
+      }
+      n = n->cdr;
+      if (n->car) {
+        dump_prefix(n, offset+1);
+        printf("rest=*%s\n", mrb_sym2name(mrb, sym(n->car)));
+      }
+      n = n->cdr;
+      if (n->car) {
+        dump_prefix(n, offset+1);
+        printf("post mandatory args:\n");
+        dump_recur(mrb, n->car, offset+2);
+      }
+      n = n->cdr;
+      if (n) {
+        dump_prefix(n, offset+1);
+        printf("blk=&%s\n", mrb_sym2name(mrb, sym(n)));
+      }
+    }
+    dump_prefix(tree, offset+1);
+    printf("body:\n");
+    mrb_parser_dump(mrb, tree->cdr->car, offset+2);
+    break;
+
+  case NODE_IF:
+    printf("NODE_IF:\n");
+    dump_prefix(tree, offset+1);
+    printf("cond:\n");
+    mrb_parser_dump(mrb, tree->car, offset+2);
+    dump_prefix(tree, offset+1);
+    printf("then:\n");
+    mrb_parser_dump(mrb, tree->cdr->car, offset+2);
+    if (tree->cdr->cdr->car) {
+      dump_prefix(tree, offset+1);
+      printf("else:\n");
+      mrb_parser_dump(mrb, tree->cdr->cdr->car, offset+2);
+    }
+    break;
+
+  case NODE_AND:
+    printf("NODE_AND:\n");
+    mrb_parser_dump(mrb, tree->car, offset+1);
+    mrb_parser_dump(mrb, tree->cdr, offset+1);
+    break;
+
+  case NODE_OR:
+    printf("NODE_OR:\n");
+    mrb_parser_dump(mrb, tree->car, offset+1);
+    mrb_parser_dump(mrb, tree->cdr, offset+1);
+    break;
+
+  case NODE_CASE:
+    printf("NODE_CASE:\n");
+    if (tree->car) {
+      mrb_parser_dump(mrb, tree->car, offset+1);
+    }
+    tree = tree->cdr;
+    while (tree) {
+      dump_prefix(tree, offset+1);
+      printf("case:\n");
+      dump_recur(mrb, tree->car->car, offset+2);
+      dump_prefix(tree, offset+1);
+      printf("body:\n");
+      mrb_parser_dump(mrb, tree->car->cdr, offset+2);
+      tree = tree->cdr;
+    }
+    break;
+
+  case NODE_WHILE:
+    printf("NODE_WHILE:\n");
+    dump_prefix(tree, offset+1);
+    printf("cond:\n");
+    mrb_parser_dump(mrb, tree->car, offset+2);
+    dump_prefix(tree, offset+1);
+    printf("body:\n");
+    mrb_parser_dump(mrb, tree->cdr, offset+2);
+    break;
+
+  case NODE_UNTIL:
+    printf("NODE_UNTIL:\n");
+    dump_prefix(tree, offset+1);
+    printf("cond:\n");
+    mrb_parser_dump(mrb, tree->car, offset+2);
+    dump_prefix(tree, offset+1);
+    printf("body:\n");
+    mrb_parser_dump(mrb, tree->cdr, offset+2);
+    break;
+
+  case NODE_FOR:
+    printf("NODE_FOR:\n");
+    dump_prefix(tree, offset+1);
+    printf("var:\n");
+    {
+      node *n2 = tree->car;
+
+      if (n2->car) {
+        dump_prefix(n2, offset+2);
+        printf("pre:\n");
+        dump_recur(mrb, n2->car, offset+3);
+      }
+      n2 = n2->cdr;
+      if (n2) {
+        if (n2->car) {
+          dump_prefix(n2, offset+2);
+          printf("rest:\n");
+          mrb_parser_dump(mrb, n2->car, offset+3);
+        }
+        n2 = n2->cdr;
+        if (n2) {
+          if (n2->car) {
+            dump_prefix(n2, offset+2);
+            printf("post:\n");
+            dump_recur(mrb, n2->car, offset+3);
+          }
+        }
+      }
+    }
+    tree = tree->cdr;
+    dump_prefix(tree, offset+1);
+    printf("in:\n");
+    mrb_parser_dump(mrb, tree->car, offset+2);
+    tree = tree->cdr;
+    dump_prefix(tree, offset+1);
+    printf("do:\n");
+    mrb_parser_dump(mrb, tree->car, offset+2);
+    break;
+
+  case NODE_SCOPE:
+    printf("NODE_SCOPE:\n");
+    {
+      node *n2 = tree->car;
+      mrb_bool first_lval = TRUE;
+
+      if (n2 && (n2->car || n2->cdr)) {
+        dump_prefix(n2, offset+1);
+        printf("local variables:\n");
+        dump_prefix(n2, offset+2);
+        while (n2) {
+          if (n2->car) {
+            if (!first_lval) printf(", ");
+            printf("%s", mrb_sym2name(mrb, sym(n2->car)));
+            first_lval = FALSE;
+          }
+          n2 = n2->cdr;
+        }
+        printf("\n");
+      }
+    }
+    tree = tree->cdr;
+    offset++;
+    goto again;
+
+  case NODE_FCALL:
+  case NODE_CALL:
+    printf("NODE_CALL:\n");
+    mrb_parser_dump(mrb, tree->car, offset+1);
+    dump_prefix(tree, offset+1);
+    printf("method='%s' (%d)\n",
+        mrb_sym2name(mrb, sym(tree->cdr->car)),
+        (int)(intptr_t)tree->cdr->car);
+    tree = tree->cdr->cdr->car;
+    if (tree) {
+      dump_prefix(tree, offset+1);
+      printf("args:\n");
+      dump_recur(mrb, tree->car, offset+2);
+      if (tree->cdr) {
+        dump_prefix(tree, offset+1);
+        printf("block:\n");
+        mrb_parser_dump(mrb, tree->cdr, offset+2);
+      }
+    }
+    break;
+
+  case NODE_DOT2:
+    printf("NODE_DOT2:\n");
+    mrb_parser_dump(mrb, tree->car, offset+1);
+    mrb_parser_dump(mrb, tree->cdr, offset+1);
+    break;
+
+  case NODE_DOT3:
+    printf("NODE_DOT3:\n");
+    mrb_parser_dump(mrb, tree->car, offset+1);
+    mrb_parser_dump(mrb, tree->cdr, offset+1);
+    break;
+
+  case NODE_COLON2:
+    printf("NODE_COLON2:\n");
+    mrb_parser_dump(mrb, tree->car, offset+1);
+    dump_prefix(tree, offset+1);
+    printf("::%s\n", mrb_sym2name(mrb, sym(tree->cdr)));
+    break;
+
+  case NODE_COLON3:
+    printf("NODE_COLON3: ::%s\n", mrb_sym2name(mrb, sym(tree)));
+    break;
+
+  case NODE_ARRAY:
+    printf("NODE_ARRAY:\n");
+    dump_recur(mrb, tree, offset+1);
+    break;
+
+  case NODE_HASH:
+    printf("NODE_HASH:\n");
+    while (tree) {
+      dump_prefix(tree, offset+1);
+      printf("key:\n");
+      mrb_parser_dump(mrb, tree->car->car, offset+2);
+      dump_prefix(tree, offset+1);
+      printf("value:\n");
+      mrb_parser_dump(mrb, tree->car->cdr, offset+2);
+      tree = tree->cdr;
+    }
+    break;
+
+  case NODE_SPLAT:
+    printf("NODE_SPLAT:\n");
+    mrb_parser_dump(mrb, tree, offset+1);
+    break;
+
+  case NODE_ASGN:
+    printf("NODE_ASGN:\n");
+    dump_prefix(tree, offset+1);
+    printf("lhs:\n");
+    mrb_parser_dump(mrb, tree->car, offset+2);
+    dump_prefix(tree, offset+1);
+    printf("rhs:\n");
+    mrb_parser_dump(mrb, tree->cdr, offset+2);
+    break;
+
+  case NODE_MASGN:
+    printf("NODE_MASGN:\n");
+    dump_prefix(tree, offset+1);
+    printf("mlhs:\n");
+    {
+      node *n2 = tree->car;
+
+      if (n2->car) {
+        dump_prefix(tree, offset+2);
+        printf("pre:\n");
+        dump_recur(mrb, n2->car, offset+3);
+      }
+      n2 = n2->cdr;
+      if (n2) {
+        if (n2->car) {
+          dump_prefix(n2, offset+2);
+          printf("rest:\n");
+          if (n2->car == (node*)-1) {
+            dump_prefix(n2, offset+2);
+            printf("(empty)\n");
+          }
+          else {
+            mrb_parser_dump(mrb, n2->car, offset+3);
+          }
+        }
+        n2 = n2->cdr;
+        if (n2) {
+          if (n2->car) {
+            dump_prefix(n2, offset+2);
+            printf("post:\n");
+            dump_recur(mrb, n2->car, offset+3);
+          }
+        }
+      }
+    }
+    dump_prefix(tree, offset+1);
+    printf("rhs:\n");
+    mrb_parser_dump(mrb, tree->cdr, offset+2);
+    break;
+
+  case NODE_OP_ASGN:
+    printf("NODE_OP_ASGN:\n");
+    dump_prefix(tree, offset+1);
+    printf("lhs:\n");
+    mrb_parser_dump(mrb, tree->car, offset+2);
+    tree = tree->cdr;
+    dump_prefix(tree, offset+1);
+    printf("op='%s' (%d)\n", mrb_sym2name(mrb, sym(tree->car)), (int)(intptr_t)tree->car);
+    tree = tree->cdr;
+    mrb_parser_dump(mrb, tree->car, offset+1);
+    break;
+
+  case NODE_SUPER:
+    printf("NODE_SUPER:\n");
+    if (tree) {
+      dump_prefix(tree, offset+1);
+      printf("args:\n");
+      dump_recur(mrb, tree->car, offset+2);
+      if (tree->cdr) {
+        dump_prefix(tree, offset+1);
+        printf("block:\n");
+        mrb_parser_dump(mrb, tree->cdr, offset+2);
+      }
+    }
+    break;
+
+  case NODE_ZSUPER:
+    printf("NODE_ZSUPER\n");
+    break;
+
+  case NODE_RETURN:
+    printf("NODE_RETURN:\n");
+    mrb_parser_dump(mrb, tree, offset+1);
+    break;
+
+  case NODE_YIELD:
+    printf("NODE_YIELD:\n");
+    dump_recur(mrb, tree, offset+1);
+    break;
+
+  case NODE_BREAK:
+    printf("NODE_BREAK:\n");
+    mrb_parser_dump(mrb, tree, offset+1);
+    break;
+
+  case NODE_NEXT:
+    printf("NODE_NEXT:\n");
+    mrb_parser_dump(mrb, tree, offset+1);
+    break;
+
+  case NODE_REDO:
+    printf("NODE_REDO\n");
+    break;
+
+  case NODE_RETRY:
+    printf("NODE_RETRY\n");
+    break;
+
+  case NODE_LVAR:
+    printf("NODE_LVAR %s\n", mrb_sym2name(mrb, sym(tree)));
+    break;
+
+  case NODE_GVAR:
+    printf("NODE_GVAR %s\n", mrb_sym2name(mrb, sym(tree)));
+    break;
+
+  case NODE_IVAR:
+    printf("NODE_IVAR %s\n", mrb_sym2name(mrb, sym(tree)));
+    break;
+
+  case NODE_CVAR:
+    printf("NODE_CVAR %s\n", mrb_sym2name(mrb, sym(tree)));
+    break;
+
+  case NODE_CONST:
+    printf("NODE_CONST %s\n", mrb_sym2name(mrb, sym(tree)));
+    break;
+
+  case NODE_MATCH:
+    printf("NODE_MATCH:\n");
+    dump_prefix(tree, offset + 1);
+    printf("lhs:\n");
+    mrb_parser_dump(mrb, tree->car, offset + 2);
+    dump_prefix(tree, offset + 1);
+    printf("rhs:\n");
+    mrb_parser_dump(mrb, tree->cdr, offset + 2);
+    break;
+
+  case NODE_BACK_REF:
+    printf("NODE_BACK_REF: $%c\n", (int)(intptr_t)tree);
+    break;
+
+  case NODE_NTH_REF:
+    printf("NODE_NTH_REF: $%d\n", (int)(intptr_t)tree);
+    break;
+
+  case NODE_ARG:
+    printf("NODE_ARG %s\n", mrb_sym2name(mrb, sym(tree)));
+    break;
+
+  case NODE_BLOCK_ARG:
+    printf("NODE_BLOCK_ARG:\n");
+    mrb_parser_dump(mrb, tree, offset+1);
+    break;
+
+  case NODE_INT:
+    printf("NODE_INT %s base %d\n", (char*)tree->car, (int)(intptr_t)tree->cdr->car);
+    break;
+
+  case NODE_FLOAT:
+    printf("NODE_FLOAT %s\n", (char*)tree);
+    break;
+
+  case NODE_NEGATE:
+    printf("NODE_NEGATE\n");
+    mrb_parser_dump(mrb, tree, offset+1);
+    break;
+
+  case NODE_STR:
+    printf("NODE_STR \"%s\" len %d\n", (char*)tree->car, (int)(intptr_t)tree->cdr);
+    break;
+
+  case NODE_DSTR:
+    printf("NODE_DSTR\n");
+    dump_recur(mrb, tree, offset+1);
+    break;
+
+  case NODE_XSTR:
+    printf("NODE_XSTR \"%s\" len %d\n", (char*)tree->car, (int)(intptr_t)tree->cdr);
+    break;
+
+  case NODE_DXSTR:
+    printf("NODE_DXSTR\n");
+    dump_recur(mrb, tree, offset+1);
+    break;
+
+  case NODE_REGX:
+    printf("NODE_REGX /%s/%s\n", (char*)tree->car, (char*)tree->cdr);
+    break;
+
+  case NODE_DREGX:
+    printf("NODE_DREGX\n");
+    dump_recur(mrb, tree->car, offset+1);
+    dump_prefix(tree, offset);
+    printf("tail: %s\n", (char*)tree->cdr->cdr->car);
+    dump_prefix(tree, offset);
+    printf("opt: %s\n", (char*)tree->cdr->cdr->cdr);
+    break;
+
+  case NODE_SYM:
+    printf("NODE_SYM :%s\n", mrb_sym2name(mrb, sym(tree)));
+    break;
+
+  case NODE_SELF:
+    printf("NODE_SELF\n");
+    break;
+
+  case NODE_NIL:
+    printf("NODE_NIL\n");
+    break;
+
+  case NODE_TRUE:
+    printf("NODE_TRUE\n");
+    break;
+
+  case NODE_FALSE:
+    printf("NODE_FALSE\n");
+    break;
+
+  case NODE_ALIAS:
+    printf("NODE_ALIAS %s %s:\n",
+        mrb_sym2name(mrb, sym(tree->car)),
+        mrb_sym2name(mrb, sym(tree->cdr)));
+    break;
+
+  case NODE_UNDEF:
+    printf("NODE_UNDEF");
+    {
+      node *t = tree;
+      while (t) {
+        printf(" %s", mrb_sym2name(mrb, sym(t->car)));
+        t = t->cdr;
+      }
+    }
+    printf(":\n");
+    break;
+
+  case NODE_CLASS:
+    printf("NODE_CLASS:\n");
+    if (tree->car->car == (node*)0) {
+      dump_prefix(tree, offset+1);
+      printf(":%s\n", mrb_sym2name(mrb, sym(tree->car->cdr)));
+    }
+    else if (tree->car->car == (node*)1) {
+      dump_prefix(tree, offset+1);
+      printf("::%s\n", mrb_sym2name(mrb, sym(tree->car->cdr)));
+    }
+    else {
+      mrb_parser_dump(mrb, tree->car->car, offset+1);
+      dump_prefix(tree, offset+1);
+      printf("::%s\n", mrb_sym2name(mrb, sym(tree->car->cdr)));
+    }
+    if (tree->cdr->car) {
+      dump_prefix(tree, offset+1);
+      printf("super:\n");
+      mrb_parser_dump(mrb, tree->cdr->car, offset+2);
+    }
+    dump_prefix(tree, offset+1);
+    printf("body:\n");
+    mrb_parser_dump(mrb, tree->cdr->cdr->car->cdr, offset+2);
+    break;
+
+  case NODE_MODULE:
+    printf("NODE_MODULE:\n");
+    if (tree->car->car == (node*)0) {
+      dump_prefix(tree, offset+1);
+      printf(":%s\n", mrb_sym2name(mrb, sym(tree->car->cdr)));
+    }
+    else if (tree->car->car == (node*)1) {
+      dump_prefix(tree, offset+1);
+      printf("::%s\n", mrb_sym2name(mrb, sym(tree->car->cdr)));
+    }
+    else {
+      mrb_parser_dump(mrb, tree->car->car, offset+1);
+      dump_prefix(tree, offset+1);
+      printf("::%s\n", mrb_sym2name(mrb, sym(tree->car->cdr)));
+    }
+    dump_prefix(tree, offset+1);
+    printf("body:\n");
+    mrb_parser_dump(mrb, tree->cdr->car->cdr, offset+2);
+    break;
+
+  case NODE_SCLASS:
+    printf("NODE_SCLASS:\n");
+    mrb_parser_dump(mrb, tree->car, offset+1);
+    dump_prefix(tree, offset+1);
+    printf("body:\n");
+    mrb_parser_dump(mrb, tree->cdr->car->cdr, offset+2);
+    break;
+
+  case NODE_DEF:
+    printf("NODE_DEF:\n");
+    dump_prefix(tree, offset+1);
+    printf("%s\n", mrb_sym2name(mrb, sym(tree->car)));
+    tree = tree->cdr;
+    {
+      node *n2 = tree->car;
+      mrb_bool first_lval = TRUE;
+
+      if (n2 && (n2->car || n2->cdr)) {
+        dump_prefix(n2, offset+1);
+        printf("local variables:\n");
+        dump_prefix(n2, offset+2);
+        while (n2) {
+          if (n2->car) {
+            if (!first_lval) printf(", ");
+            printf("%s", mrb_sym2name(mrb, sym(n2->car)));
+            first_lval = FALSE;
+          }
+          n2 = n2->cdr;
+        }
+        printf("\n");
+      }
+    }
+    tree = tree->cdr;
+    if (tree->car) {
+      node *n = tree->car;
+
+      if (n->car) {
+        dump_prefix(n, offset+1);
+        printf("mandatory args:\n");
+        dump_recur(mrb, n->car, offset+2);
+      }
+      n = n->cdr;
+      if (n->car) {
+        dump_prefix(n, offset+1);
+        printf("optional args:\n");
+        {
+          node *n2 = n->car;
+
+          while (n2) {
+            dump_prefix(n2, offset+2);
+            printf("%s=", mrb_sym2name(mrb, sym(n2->car->car)));
+            mrb_parser_dump(mrb, n2->car->cdr, 0);
+            n2 = n2->cdr;
+          }
+        }
+      }
+      n = n->cdr;
+      if (n->car) {
+        dump_prefix(n, offset+1);
+        printf("rest=*%s\n", mrb_sym2name(mrb, sym(n->car)));
+      }
+      n = n->cdr;
+      if (n->car) {
+        dump_prefix(n, offset+1);
+        printf("post mandatory args:\n");
+        dump_recur(mrb, n->car, offset+2);
+      }
+      if (n->cdr) {
+        dump_prefix(n, offset+1);
+        printf("blk=&%s\n", mrb_sym2name(mrb, sym(n->cdr)));
+      }
+    }
+    mrb_parser_dump(mrb, tree->cdr->car, offset+1);
+    break;
+
+  case NODE_SDEF:
+    printf("NODE_SDEF:\n");
+    mrb_parser_dump(mrb, tree->car, offset+1);
+    tree = tree->cdr;
+    dump_prefix(tree, offset+1);
+    printf(":%s\n", mrb_sym2name(mrb, sym(tree->car)));
+    tree = tree->cdr->cdr;
+    if (tree->car) {
+      node *n = tree->car;
+
+      if (n->car) {
+        dump_prefix(n, offset+1);
+        printf("mandatory args:\n");
+        dump_recur(mrb, n->car, offset+2);
+      }
+      n = n->cdr;
+      if (n->car) {
+        dump_prefix(n, offset+1);
+        printf("optional args:\n");
+        {
+          node *n2 = n->car;
+
+          while (n2) {
+            dump_prefix(n2, offset+2);
+            printf("%s=", mrb_sym2name(mrb, sym(n2->car->car)));
+            mrb_parser_dump(mrb, n2->car->cdr, 0);
+            n2 = n2->cdr;
+          }
+        }
+      }
+      n = n->cdr;
+      if (n->car) {
+        dump_prefix(n, offset+1);
+        printf("rest=*%s\n", mrb_sym2name(mrb, sym(n->car)));
+      }
+      n = n->cdr;
+      if (n->car) {
+        dump_prefix(n, offset+1);
+        printf("post mandatory args:\n");
+        dump_recur(mrb, n->car, offset+2);
+      }
+      n = n->cdr;
+      if (n) {
+        dump_prefix(n, offset+1);
+        printf("blk=&%s\n", mrb_sym2name(mrb, sym(n)));
+      }
+    }
+    tree = tree->cdr;
+    mrb_parser_dump(mrb, tree->car, offset+1);
+    break;
+
+  case NODE_POSTEXE:
+    printf("NODE_POSTEXE:\n");
+    mrb_parser_dump(mrb, tree, offset+1);
+    break;
+
+  case NODE_HEREDOC:
+    printf("NODE_HEREDOC:\n");
+    mrb_parser_dump(mrb, ((parser_heredoc_info*)tree)->doc, offset+1);
+    break;
+
+  default:
+    printf("node type: %d (0x%x)\n", nodetype, (unsigned)nodetype);
+    break;
+  }
+#endif
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-compiler/mrbgem.rake	(revision 270)
@@ -0,0 +1,40 @@
+MRuby::Gem::Specification.new 'mruby-compiler' do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'mruby compiler library'
+
+  current_dir = spec.dir
+  current_build_dir = spec.build_dir
+
+  lex_def = "#{current_dir}/core/lex.def"
+  core_objs = Dir.glob("#{current_dir}/core/*.c").map { |f|
+    next nil if build.cxx_abi_enabled? and f =~ /(codegen).c$/
+    objfile(f.pathmap("#{current_build_dir}/core/%n"))
+  }.compact
+
+  if build.cxx_abi_enabled?
+    core_objs <<
+      build.compile_as_cxx("#{current_build_dir}/core/y.tab.c", "#{current_build_dir}/core/y.tab.cxx",
+                           objfile("#{current_build_dir}/y.tab"), ["#{current_dir}/core"]) <<
+      build.compile_as_cxx("#{current_dir}/core/codegen.c", "#{current_build_dir}/core/codegen.cxx")
+  else
+    core_objs << objfile("#{current_build_dir}/core/y.tab")
+    file objfile("#{current_build_dir}/core/y.tab") => "#{current_build_dir}/core/y.tab.c" do |t|
+      cc.run t.name, t.prerequisites.first, [], ["#{current_dir}/core"]
+    end
+  end
+  file objfile("#{current_build_dir}/core/y.tab") => lex_def
+
+  # Parser
+  file "#{current_build_dir}/core/y.tab.c" => ["#{current_dir}/core/parse.y"] do |t|
+    yacc.run t.name, t.prerequisites.first
+  end
+
+  # Lexical analyzer
+  file lex_def => "#{current_dir}/core/keywords" do |t|
+    gperf.run t.name, t.prerequisites.first
+  end
+
+  file libfile("#{build.build_dir}/lib/libmruby_core") => core_objs
+  build.libmruby << core_objs
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enum-ext/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enum-ext/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enum-ext/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-enum-ext') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'Enumerable module extension'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enum-ext/mrblib/enum.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enum-ext/mrblib/enum.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enum-ext/mrblib/enum.rb	(revision 270)
@@ -0,0 +1,698 @@
+##
+# Enumerable
+#
+module Enumerable
+  ##
+  # call-seq:
+  #    enum.drop(n)               -> array
+  #
+  # Drops first n elements from <i>enum</i>, and returns rest elements
+  # in an array.
+  #
+  #    a = [1, 2, 3, 4, 5, 0]
+  #    a.drop(3)             #=> [4, 5, 0]
+
+  def drop(n)
+    raise TypeError, "no implicit conversion of #{n.class} into Integer" unless n.respond_to?(:to_int)
+    raise ArgumentError, "attempt to drop negative size" if n < 0
+
+    n = n.to_int
+    ary = []
+    self.each {|*val| n == 0 ? ary << val.__svalue : n -= 1 }
+    ary
+  end
+
+  ##
+  # call-seq:
+  #    enum.drop_while {|arr| block }   -> array
+  #    enum.drop_while                  -> an_enumerator
+  #
+  # Drops elements up to, but not including, the first element for
+  # which the block returns +nil+ or +false+ and returns an array
+  # containing the remaining elements.
+  #
+  # If no block is given, an enumerator is returned instead.
+  #
+  #    a = [1, 2, 3, 4, 5, 0]
+  #    a.drop_while {|i| i < 3 }   #=> [3, 4, 5, 0]
+
+  def drop_while(&block)
+    return to_enum :drop_while unless block
+
+    ary, state = [], false
+    self.each do |*val|
+      state = true if !state and !block.call(*val)
+      ary << val.__svalue if state
+    end
+    ary
+  end
+
+  ##
+  # call-seq:
+  #    enum.take(n)               -> array
+  #
+  # Returns first n elements from <i>enum</i>.
+  #
+  #    a = [1, 2, 3, 4, 5, 0]
+  #    a.take(3)             #=> [1, 2, 3]
+
+  def take(n)
+    raise TypeError, "no implicit conversion of #{n.class} into Integer" unless n.respond_to?(:to_int)
+    raise ArgumentError, "attempt to take negative size" if n < 0
+
+    n = n.to_int
+    ary = []
+    self.each do |*val|
+      break if ary.size >= n
+      ary << val.__svalue
+    end
+    ary
+  end
+
+  ##
+  # call-seq:
+  #    enum.take_while {|arr| block }   -> array
+  #    enum.take_while                  -> an_enumerator
+  #
+  # Passes elements to the block until the block returns +nil+ or +false+,
+  # then stops iterating and returns an array of all prior elements.
+  #
+  # If no block is given, an enumerator is returned instead.
+  #
+  #     a = [1, 2, 3, 4, 5, 0]
+  #     a.take_while {|i| i < 3 }   #=> [1, 2]
+  #
+  def take_while(&block)
+    return to_enum :take_while unless block
+
+    ary = []
+    self.each do |*val|
+      return ary unless block.call(*val)
+      ary << val.__svalue
+    end
+    ary
+  end
+
+  ##
+  # Iterates the given block for each array of consecutive <n>
+  # elements.
+  #
+  # @return [nil]
+  #
+  # @example
+  #     (1..10).each_cons(3) {|a| p a}
+  #     # outputs below
+  #     [1, 2, 3]
+  #     [2, 3, 4]
+  #     [3, 4, 5]
+  #     [4, 5, 6]
+  #     [5, 6, 7]
+  #     [6, 7, 8]
+  #     [7, 8, 9]
+  #     [8, 9, 10]
+
+  def each_cons(n, &block)
+    raise TypeError, "no implicit conversion of #{n.class} into Integer" unless n.respond_to?(:to_int)
+    raise ArgumentError, "invalid size" if n <= 0
+
+    return to_enum(:each_cons,n) unless block
+    ary = []
+    n = n.to_int
+    self.each do |*val|
+      ary.shift if ary.size == n
+      ary << val.__svalue
+      block.call(ary.dup) if ary.size == n
+    end
+  end
+
+  ##
+  # Iterates the given block for each slice of <n> elements.
+  #
+  # @return [nil]
+  #
+  # @example
+  #     (1..10).each_slice(3) {|a| p a}
+  #     # outputs below
+  #     [1, 2, 3]
+  #     [4, 5, 6]
+  #     [7, 8, 9]
+  #     [10]
+
+  def each_slice(n, &block)
+    raise TypeError, "no implicit conversion of #{n.class} into Integer" unless n.respond_to?(:to_int)
+    raise ArgumentError, "invalid slice size" if n <= 0
+
+    return to_enum(:each_slice,n) unless block
+    ary = []
+    n = n.to_int
+    self.each do |*val|
+      ary << val.__svalue
+      if ary.size == n
+        block.call(ary)
+        ary = []
+      end
+    end
+    block.call(ary) unless ary.empty?
+  end
+
+  ##
+  # call-seq:
+  #    enum.group_by {| obj | block }  -> a_hash
+  #    enum.group_by                   -> an_enumerator
+  #
+  # Returns a hash, which keys are evaluated result from the
+  # block, and values are arrays of elements in <i>enum</i>
+  # corresponding to the key.
+  #
+  #     (1..6).group_by {|i| i%3}   #=> {0=>[3, 6], 1=>[1, 4], 2=>[2, 5]}
+  #
+  def group_by(&block)
+    return to_enum :group_by unless block
+
+    h = {}
+    self.each do |*val|
+      key = block.call(*val)
+      sv = val.__svalue
+      h.key?(key) ? (h[key] << sv) : (h[key] = [sv])
+    end
+    h
+  end
+
+  ##
+  # call-seq:
+  #    enum.sort_by { |obj| block }   -> array
+  #    enum.sort_by                   -> an_enumerator
+  #
+  # Sorts <i>enum</i> using a set of keys generated by mapping the
+  # values in <i>enum</i> through the given block.
+  #
+  # If no block is given, an enumerator is returned instead.
+
+  def sort_by(&block)
+    return to_enum :sort_by unless block
+
+    ary = []
+    orig = []
+    self.each_with_index{|e, i|
+      orig.push(e)
+      ary.push([block.call(e), i])
+    }
+    if ary.size > 1
+      __sort_sub__(ary, ::Array.new(ary.size), 0, 0, ary.size - 1) do |a,b|
+        a <=> b
+      end
+    end
+    ary.collect{|e,i| orig[i]}
+  end
+
+  NONE = Object.new
+  ##
+  # call-seq:
+  #    enum.first       ->  obj or nil
+  #    enum.first(n)    ->  an_array
+  #
+  # Returns the first element, or the first +n+ elements, of the enumerable.
+  # If the enumerable is empty, the first form returns <code>nil</code>, and the
+  # second form returns an empty array.
+  def first(n=NONE)
+    if n == NONE
+      self.each do |*val|
+        return val.__svalue
+      end
+      return nil
+    else
+      a = []
+      i = 0
+      self.each do |*val|
+        break if n<=i
+        a.push val.__svalue
+        i += 1
+      end
+      a
+    end
+  end
+
+  ##
+  # call-seq:
+  #    enum.count                 -> int
+  #    enum.count(item)           -> int
+  #    enum.count { |obj| block } -> int
+  #
+  # Returns the number of items in +enum+ through enumeration.
+  # If an argument is given, the number of items in +enum+ that
+  # are equal to +item+ are counted.  If a block is given, it
+  # counts the number of elements yielding a true value.
+  def count(v=NONE, &block)
+    count = 0
+    if block
+      self.each do |*val|
+        count += 1 if block.call(*val)
+      end
+    else
+      if v == NONE
+        self.each { count += 1 }
+      else
+        self.each do |*val|
+          count += 1 if val.__svalue == v
+        end
+      end
+    end
+    count
+  end
+
+  ##
+  # call-seq:
+  #    enum.flat_map       { |obj| block } -> array
+  #    enum.collect_concat { |obj| block } -> array
+  #    enum.flat_map                       -> an_enumerator
+  #    enum.collect_concat                 -> an_enumerator
+  #
+  # Returns a new array with the concatenated results of running
+  # <em>block</em> once for every element in <i>enum</i>.
+  #
+  # If no block is given, an enumerator is returned instead.
+  #
+  #    [1, 2, 3, 4].flat_map { |e| [e, -e] } #=> [1, -1, 2, -2, 3, -3, 4, -4]
+  #    [[1, 2], [3, 4]].flat_map { |e| e + [100] } #=> [1, 2, 100, 3, 4, 100]
+  def flat_map(&block)
+    return to_enum :flat_map unless block
+
+    ary = []
+    self.each do |*e|
+      e2 = block.call(*e)
+      if e2.respond_to? :each
+        e2.each {|e3| ary.push(e3) }
+      else
+        ary.push(e2)
+      end
+    end
+    ary
+  end
+  alias collect_concat flat_map
+
+  ##
+  # call-seq:
+  #    enum.max_by {|obj| block }      -> obj
+  #    enum.max_by                     -> an_enumerator
+  #
+  # Returns the object in <i>enum</i> that gives the maximum
+  # value from the given block.
+  #
+  # If no block is given, an enumerator is returned instead.
+  #
+  #    %w[albatross dog horse].max_by {|x| x.length }   #=> "albatross"
+
+  def max_by(&block)
+    return to_enum :max_by unless block
+
+    first = true
+    max = nil
+    max_cmp = nil
+
+    self.each do |*val|
+      if first
+        max = val.__svalue
+        max_cmp = block.call(*val)
+        first = false
+      else
+        if (cmp = block.call(*val)) > max_cmp
+          max = val.__svalue
+          max_cmp = cmp
+        end
+      end
+    end
+    max
+  end
+
+  ##
+  # call-seq:
+  #    enum.min_by {|obj| block }      -> obj
+  #    enum.min_by                     -> an_enumerator
+  #
+  # Returns the object in <i>enum</i> that gives the minimum
+  # value from the given block.
+  #
+  # If no block is given, an enumerator is returned instead.
+  #
+  #    %w[albatross dog horse].min_by {|x| x.length }   #=> "dog"
+
+  def min_by(&block)
+    return to_enum :min_by unless block
+
+    first = true
+    min = nil
+    min_cmp = nil
+
+    self.each do |*val|
+      if first
+        min = val.__svalue
+        min_cmp = block.call(*val)
+        first = false
+      else
+        if (cmp = block.call(*val)) < min_cmp
+          min = val.__svalue
+          min_cmp = cmp
+        end
+      end
+    end
+    min
+  end
+
+  ##
+  #  call-seq:
+  #     enum.minmax                  -> [min, max]
+  #     enum.minmax { |a, b| block } -> [min, max]
+  #
+  #  Returns two elements array which contains the minimum and the
+  #  maximum value in the enumerable.  The first form assumes all
+  #  objects implement <code>Comparable</code>; the second uses the
+  #  block to return <em>a <=> b</em>.
+  #
+  #     a = %w(albatross dog horse)
+  #     a.minmax                                  #=> ["albatross", "horse"]
+  #     a.minmax { |a, b| a.length <=> b.length } #=> ["dog", "albatross"]
+
+  def minmax(&block)
+    max = nil
+    min = nil
+    first = true
+
+    self.each do |*val|
+      if first
+        val = val.__svalue
+        max = val
+        min = val
+        first = false
+      else
+        if block
+          max = val.__svalue if block.call(*val, max) > 0
+          min = val.__svalue if block.call(*val, min) < 0
+        else
+          val = val.__svalue
+          max = val if (val <=> max) > 0
+          min = val if (val <=> min) < 0
+        end
+      end
+    end
+    [min, max]
+  end
+
+  ##
+  #  call-seq:
+  #     enum.minmax_by { |obj| block } -> [min, max]
+  #     enum.minmax_by                 -> an_enumerator
+  #
+  #  Returns a two element array containing the objects in
+  #  <i>enum</i> that correspond to the minimum and maximum values respectively
+  #  from the given block.
+  #
+  #  If no block is given, an enumerator is returned instead.
+  #
+  #     %w(albatross dog horse).minmax_by { |x| x.length }   #=> ["dog", "albatross"]
+
+  def minmax_by(&block)
+    return to_enum :minmax_by unless block
+
+    max = nil
+    max_cmp = nil
+    min = nil
+    min_cmp = nil
+    first = true
+
+    self.each do |*val|
+      if first
+        max = min = val.__svalue
+        max_cmp = min_cmp = block.call(*val)
+        first = false
+     else
+        if (cmp = block.call(*val)) > max_cmp
+          max = val.__svalue
+          max_cmp = cmp
+        end
+        if (cmp = block.call(*val)) < min_cmp
+          min = val.__svalue
+          min_cmp = cmp
+        end
+      end
+    end
+    [min, max]
+  end
+
+  ##
+  #  call-seq:
+  #     enum.none? [{ |obj| block }]   -> true or false
+  #
+  #  Passes each element of the collection to the given block. The method
+  #  returns <code>true</code> if the block never returns <code>true</code>
+  #  for all elements. If the block is not given, <code>none?</code> will return
+  #  <code>true</code> only if none of the collection members is true.
+  #
+  #     %w(ant bear cat).none? { |word| word.length == 5 } #=> true
+  #     %w(ant bear cat).none? { |word| word.length >= 4 } #=> false
+  #     [].none?                                           #=> true
+  #     [nil, false].none?                                 #=> true
+  #     [nil, true].none?                                  #=> false
+
+  def none?(&block)
+    if block
+      self.each do |*val|
+        return false if block.call(*val)
+      end
+    else
+      self.each do |*val|
+        return false if val.__svalue
+      end
+    end
+    true
+  end
+
+  ##
+  #  call-seq:
+  #    enum.one? [{ |obj| block }]   -> true or false
+  #
+  # Passes each element of the collection to the given block. The method
+  # returns <code>true</code> if the block returns <code>true</code>
+  # exactly once. If the block is not given, <code>one?</code> will return
+  # <code>true</code> only if exactly one of the collection members is
+  # true.
+  #
+  #    %w(ant bear cat).one? { |word| word.length == 4 }  #=> true
+  #    %w(ant bear cat).one? { |word| word.length > 4 }   #=> false
+  #    %w(ant bear cat).one? { |word| word.length < 4 }   #=> false
+  #    [nil, true, 99].one?                               #=> false
+  #    [nil, true, false].one?                            #=> true
+  #
+
+  def one?(&block)
+    count = 0
+    if block
+      self.each do |*val|
+        count += 1 if block.call(*val)
+        return false if count > 1
+      end
+    else
+      self.each do |*val|
+        count += 1 if val.__svalue
+        return false if count > 1
+      end
+    end
+
+    count == 1 ? true : false
+  end
+
+  ##
+  #  call-seq:
+  #    enum.each_with_object(obj) { |(*args), memo_obj| ... }  ->  obj
+  #    enum.each_with_object(obj)                              ->  an_enumerator
+  #
+  #  Iterates the given block for each element with an arbitrary
+  #  object given, and returns the initially given object.
+  #
+  #  If no block is given, returns an enumerator.
+  #
+  #     (1..10).each_with_object([]) { |i, a| a << i*2 }
+  #     #=> [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
+  #
+
+  def each_with_object(obj=nil, &block)
+    raise ArgumentError, "wrong number of arguments (0 for 1)" if obj.nil?
+
+    return to_enum(:each_with_object, obj) unless block
+
+    self.each {|*val| block.call(val.__svalue, obj) }
+    obj
+  end
+
+  ##
+  #  call-seq:
+  #     enum.reverse_each { |item| block } ->  enum
+  #     enum.reverse_each                  ->  an_enumerator
+  #
+  #  Builds a temporary array and traverses that array in reverse order.
+  #
+  #  If no block is given, an enumerator is returned instead.
+  #
+  #      (1..3).reverse_each { |v| p v }
+  #
+  #    produces:
+  #
+  #      3
+  #      2
+  #      1
+  #
+
+  def reverse_each(&block)
+    return to_enum :reverse_each unless block
+
+    ary = self.to_a
+    i = ary.size - 1
+    while i>=0
+      block.call(ary[i])
+      i -= 1
+    end
+    self
+  end
+
+  ##
+  #  call-seq:
+  #     enum.cycle(n=nil) { |obj| block }  ->  nil
+  #     enum.cycle(n=nil)                  ->  an_enumerator
+  #
+  #  Calls <i>block</i> for each element of <i>enum</i> repeatedly _n_
+  #  times or forever if none or +nil+ is given.  If a non-positive
+  #  number is given or the collection is empty, does nothing.  Returns
+  #  +nil+ if the loop has finished without getting interrupted.
+  #
+  #  Enumerable#cycle saves elements in an internal array so changes
+  #  to <i>enum</i> after the first pass have no effect.
+  #
+  #  If no block is given, an enumerator is returned instead.
+  #
+  #     a = ["a", "b", "c"]
+  #     a.cycle { |x| puts x }  # print, a, b, c, a, b, c,.. forever.
+  #     a.cycle(2) { |x| puts x }  # print, a, b, c, a, b, c.
+  #
+
+  def cycle(n=nil, &block)
+    return to_enum(:cycle, n) if !block && n.nil?
+
+    ary = []
+    if n.nil?
+      self.each do|*val|
+        ary.push val
+        block.call(*val)
+      end
+      loop do
+        ary.each do|e|
+          block.call(*e)
+        end
+      end
+    else
+      raise TypeError, "no implicit conversion of #{n.class} into Integer" unless n.respond_to?(:to_int)
+
+      n = n.to_int
+      self.each do|*val|
+        ary.push val
+      end
+      count = 0
+      while count < n
+        ary.each do|e|
+          block.call(*e)
+        end
+        count += 1
+      end
+    end
+  end
+
+  ##
+  #  call-seq:
+  #     enum.find_index(value)          -> int or nil
+  #     enum.find_index { |obj| block } -> int or nil
+  #     enum.find_index                 -> an_enumerator
+  #
+  #  Compares each entry in <i>enum</i> with <em>value</em> or passes
+  #  to <em>block</em>.  Returns the index for the first for which the
+  #  evaluated value is non-false.  If no object matches, returns
+  #  <code>nil</code>
+  #
+  #  If neither block nor argument is given, an enumerator is returned instead.
+  #
+  #     (1..10).find_index  { |i| i % 5 == 0 and i % 7 == 0 }  #=> nil
+  #     (1..100).find_index { |i| i % 5 == 0 and i % 7 == 0 }  #=> 34
+  #     (1..100).find_index(50)                                #=> 49
+  #
+
+  def find_index(val=NONE, &block)
+    return to_enum(:find_index, val) if !block && val == NONE
+
+    idx = 0
+    if block
+      self.each do |*e|
+        return idx if block.call(*e)
+        idx += 1
+      end
+    else
+      self.each do |*e|
+        return idx if e.__svalue == val
+        idx += 1
+      end
+    end
+    nil
+  end
+
+  ##
+  #  call-seq:
+  #     enum.zip(arg, ...)                  -> an_array_of_array
+  #
+  #  Takes one element from <i>enum</i> and merges corresponding
+  #  elements from each <i>args</i>.  This generates a sequence of
+  #  <em>n</em>-element arrays, where <em>n</em> is one more than the
+  #  count of arguments.  The length of the resulting sequence will be
+  #  <code>enum#size</code>.  If the size of any argument is less than
+  #  <code>enum#size</code>, <code>nil</code> values are supplied.
+  #
+
+  def zip(*arg)
+    ary = []
+    arg = arg.map{|a|a.to_a}
+    i = 0
+    self.each do |*val|
+      a = []
+      a.push(val.__svalue)
+      idx = 0
+      while idx < arg.size
+        a.push(arg[idx][i])
+        idx += 1
+      end
+      ary.push(a)
+      i += 1
+    end
+    ary
+  end
+
+  ##
+  #  call-seq:
+  #     enum.to_h  -> hash
+  #
+  #  Returns the result of interpreting <i>enum</i> as a list of
+  #  <tt>[key, value]</tt> pairs.
+  #
+  #     %i[hello world].each_with_index.to_h
+  #       # => {:hello => 0, :world => 1}
+  #
+
+  def to_h
+    h = {}
+    self.each do |*v|
+      v = v.__svalue
+      raise TypeError, "wrong element type #{v.class} (expected Array)" unless v.is_a? Array
+      raise ArgumentError, "element has wrong array length (expected 2, was #{v.size})" if v.size != 2
+      h[v[0]] = v[1]
+    end
+    h
+  end
+
+  def nil.to_h
+    {}
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enum-ext/test/enum.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enum-ext/test/enum.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enum-ext/test/enum.rb	(revision 270)
@@ -0,0 +1,162 @@
+##
+# Enumerable(Ext) Test
+
+assert("Enumerable#drop") do
+  a = [1, 2, 3, 4, 5, 0]
+
+  assert_equal [4, 5, 0], a.drop(3)
+  assert_equal [], a.drop(6)
+end
+
+assert("Enumerable#drop_while") do
+  a = [1, 2, 3, 4, 5, 0]
+  assert_equal [3, 4, 5, 0], a.drop_while {|i| i < 3 }
+end
+
+assert("Enumerable#take") do
+  a = [1, 2, 3, 4, 5, 0]
+  assert_equal [1, 2, 3], a.take(3)
+end
+
+assert("Enumerable#take_while") do
+  a = [1, 2, 3, 4, 5, 0]
+  assert_equal [1, 2], a.take_while {|i| i < 3}
+end
+
+assert("Enumerable#each_cons") do
+  a = []
+  (1..5).each_cons(3){|e| a << e}
+  assert_equal [[1, 2, 3], [2, 3, 4], [3, 4, 5]], a
+end
+
+assert("Enumerable#each_slice") do
+  a = []
+  (1..10).each_slice(3){|e| a << e}
+  assert_equal [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10]], a
+end
+
+assert("Enumerable#group_by") do
+  r = (1..6).group_by {|i| i % 3 }
+  assert_equal [3, 6], r[0]
+  assert_equal [1, 4], r[1]
+  assert_equal [2, 5], r[2]
+end
+
+assert("Enumerable#sort_by") do
+  assert_equal ["car", "train", "bicycle"], %w{car bicycle train}.sort_by {|e| e.length}
+end
+
+assert("Enumerable#first") do
+  a = Object.new
+  a.extend Enumerable
+  def a.each
+    yield 1
+    yield 2
+    yield 3
+  end
+  assert_equal 1, a.first
+  assert_equal [1, 2], a.first(2)
+  assert_equal [1, 2, 3], a.first(10)
+  a = Object.new
+  a.extend Enumerable
+  def a.each
+  end
+  assert_nil a.first
+end
+
+assert("Enumerable#count") do
+  a = [1, 2, 4, 2]
+  assert_equal 4, a.count
+  assert_equal 2, a.count(2)
+  assert_equal 3, a.count{|x| x % 2 == 0}
+end
+
+assert("Enumerable#flat_map") do
+  assert_equal [1, 2, 3, 4], [1, 2, 3, 4].flat_map { |e| e }
+  assert_equal [1, -1, 2, -2, 3, -3, 4, -4], [1, 2, 3, 4].flat_map { |e| [e, -e] }
+  assert_equal [1, 2, 100, 3, 4, 100], [[1, 2], [3, 4]].flat_map { |e| e + [100] }
+end
+
+assert("Enumerable#max_by") do
+  assert_equal "albatross", %w[albatross dog horse].max_by { |x| x.length }
+end
+
+assert("Enumerable#min_by") do
+  assert_equal "dog", %w[albatross dog horse].min_by { |x| x.length }
+end
+
+assert("Enumerable#minmax") do
+  a = %w(albatross dog horse)
+  assert_equal ["albatross", "horse"], a.minmax
+  assert_equal ["dog", "albatross"], a.minmax { |a, b| a.length <=> b.length }
+end
+
+assert("Enumerable#minmax_by") do
+  assert_equal ["dog", "albatross"], %w(albatross dog horse).minmax_by { |x| x.length }
+end
+
+assert("Enumerable#none?") do
+  assert_true %w(ant bear cat).none? { |word| word.length == 5 }
+  assert_false %w(ant bear cat).none? { |word| word.length >= 4 }
+  assert_true [].none?
+  assert_true [nil, false].none?
+  assert_false [nil, true].none?
+end
+
+assert("Enumerable#one?") do
+  assert_true %w(ant bear cat).one? { |word| word.length == 4 }
+  assert_false %w(ant bear cat).one? { |word| word.length > 4 }
+  assert_false %w(ant bear cat).one? { |word| word.length < 4 }
+  assert_false [nil, true, 99].one?
+  assert_true [nil, true, false].one?
+end
+
+assert("Enumerable#each_with_object") do
+  assert_true [2, 4, 6, 8, 10, 12, 14, 16, 18, 20], (1..10).each_with_object([]) { |i, a| a << i*2 }
+  assert_raise(ArgumentError) { (1..10).each_with_object() { |i, a| a << i*2 } }
+end
+
+assert("Enumerable#reverse_each") do
+  r = (1..3)
+  a = []
+  assert_equal (1..3), r.reverse_each { |v| a << v }
+  assert_equal [3, 2, 1], a
+end
+
+assert("Enumerable#cycle") do
+  a = []
+  ["a", "b", "c"].cycle(2) { |v| a << v }
+  assert_equal ["a", "b", "c", "a", "b", "c"], a
+  assert_raise(TypeError) { ["a", "b", "c"].cycle("a") { |v| a << v } }
+end
+
+assert("Enumerable#find_index") do
+  assert_nil (1..10).find_index { |i| i % 5 == 0 and i % 7 == 0 }
+  assert_equal 34, (1..100).find_index { |i| i % 5 == 0 and i % 7 == 0 }
+  assert_equal 49 ,(1..100).find_index(50)
+end
+
+assert("Enumerable#zip") do
+  a = [ 4, 5, 6 ]
+  b = [ 7, 8, 9 ]
+  assert_equal [[4, 7], [5, 8], [6, 9]], a.zip(b)
+  assert_equal [[1, 4, 7], [2, 5, 8], [3, 6, 9]], [1, 2, 3].zip(a, b)
+  assert_equal [[1, 4, 7], [2, 5, 8]], [1, 2].zip(a, b)
+  assert_equal [[4, 1, 8], [5, 2, nil], [6, nil, nil]], a.zip([1, 2], [8])
+end
+
+assert("Enumerable#to_h") do
+  c = Class.new {
+    include Enumerable
+    def each
+      yield [1,2]
+      yield [3,4]
+    end
+  }
+  h0 = {1=>2, 3=>4}
+  h = c.new.to_h
+  assert_equal Hash, h.class
+  assert_equal h0, h
+  # mruby-enum-ext also provides nil.to_h
+  assert_equal Hash.new, nil.to_h
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enum-lazy/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enum-lazy/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enum-lazy/mrbgem.rake	(revision 270)
@@ -0,0 +1,7 @@
+MRuby::Gem::Specification.new('mruby-enum-lazy') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'Enumerable::Lazy class'
+  spec.add_dependency('mruby-enumerator', :core => 'mruby-enumerator')
+  spec.add_dependency('mruby-enum-ext', :core => 'mruby-enum-ext')
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enum-lazy/mrblib/lazy.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enum-lazy/mrblib/lazy.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enum-lazy/mrblib/lazy.rb	(revision 270)
@@ -0,0 +1,149 @@
+module Enumerable
+
+  # = Enumerable#lazy implementation
+  #
+  # Enumerable#lazy returns an instance of Enumerable::Lazy.
+  # You can use it just like as normal Enumerable object,
+  # except these methods act as 'lazy':
+  #
+  #   - map       collect
+  #   - select    find_all
+  #   - reject
+  #   - grep
+  #   - drop
+  #   - drop_while
+  #   - take_while
+  #   - flat_map  collect_concat
+  #   - zip
+  def lazy
+    Lazy.new(self)
+  end
+
+  # == Acknowledgements
+  #
+  #   Based on https://github.com/yhara/enumerable-lazy
+  #   Inspired by https://github.com/antimon2/enumerable_lz
+  #   http://jp.rubyist.net/magazine/?0034-Enumerable_lz (ja)
+  class Lazy < Enumerator
+    def initialize(obj, &block)
+      super(){|yielder|
+        begin
+          obj.each{|x|
+            if block
+              block.call(yielder, x)
+            else
+              yielder << x
+            end
+          }
+        rescue StopIteration
+        end
+      }
+    end
+
+    def map(&block)
+      Lazy.new(self){|yielder, val|
+        yielder << block.call(val)
+      }
+    end
+    alias collect map
+
+    def select(&block)
+      Lazy.new(self){|yielder, val|
+        if block.call(val)
+          yielder << val
+        end
+      }
+    end
+    alias find_all select
+
+    def reject(&block)
+      Lazy.new(self){|yielder, val|
+        if not block.call(val)
+          yielder << val
+        end
+      }
+    end
+
+    def grep(pattern)
+      Lazy.new(self){|yielder, val|
+        if pattern === val
+          yielder << val
+        end
+      }
+    end
+
+    def drop(n)
+      dropped = 0
+      Lazy.new(self){|yielder, val|
+        if dropped < n
+          dropped += 1
+        else
+          yielder << val
+        end
+      }
+    end
+
+    def drop_while(&block)
+      dropping = true
+      Lazy.new(self){|yielder, val|
+        if dropping
+          if not block.call(val)
+            yielder << val
+            dropping = false
+          end
+        else
+          yielder << val
+        end
+      }
+    end
+
+    def take(n)
+      if n == 0
+        return Lazy.new(self){raise StopIteration}
+      end
+      taken = 0
+      Lazy.new(self){|yielder, val|
+        yielder << val
+        taken += 1
+        if taken >= n
+          raise StopIteration
+        end
+      }
+    end
+
+    def take_while(&block)
+      Lazy.new(self){|yielder, val|
+        if block.call(val)
+          yielder << val
+        else
+          raise StopIteration
+        end
+      }
+    end
+
+    def flat_map(&block)
+      Lazy.new(self){|yielder, val|
+        ary = block.call(val)
+        # TODO: check ary is an Array
+        ary.each{|x|
+          yielder << x
+        }
+      }
+    end
+    alias collect_concat flat_map
+
+    def zip(*args, &block)
+      enums = [self] + args
+      Lazy.new(self){|yielder, val|
+        ary = enums.map{|e| e.next}
+        if block
+          yielder << block.call(ary)
+        else
+          yielder << ary
+        end
+      }
+    end
+
+    alias force to_a
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enum-lazy/test/lazy.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enum-lazy/test/lazy.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enum-lazy/test/lazy.rb	(revision 270)
@@ -0,0 +1,47 @@
+assert("Enumerable::Lazy") do
+  a = [1, 2]
+  assert_equal Enumerable::Lazy, a.lazy.class
+end
+
+assert("Enumerable::Lazy laziness") do
+  a = Object.new
+  def a.each
+    return to_enum :each unless block_given?
+    self.b << 10
+    yield 1
+    self.b << 20
+    yield 2
+    self.b << 30
+    yield 3
+    self.b << 40
+    yield 4
+    self.b << 50
+    yield 5
+  end
+  def a.b(b=nil)
+    @b = b if b
+    @b
+  end
+
+  a.b([])
+  assert_equal [1,2], a.each.lazy.take(2).force
+  assert_equal [10,20], a.b
+
+  a.b([])
+  assert_equal [2,4], a.each.lazy.select{|x|x%2==0}.take(2).force
+  assert_equal [10,20,30,40], a.b
+
+  a.b([])
+  assert_equal [1], a.each.lazy.take_while{|x|x<2}.take(1).force
+  assert_equal [10], a.b
+
+  a.b([])
+  assert_equal [1], a.each.lazy.take_while{|x|x<2}.take(4).force
+  assert_equal [10,20], a.b
+end
+
+assert("Enumerable::Lazy#zip with cycle") do
+  e1 = [1, 2, 3].cycle
+  e2 = [:a, :b].cycle
+  assert_equal [[1,:a],[2,:b],[3,:a]], e1.lazy.zip(e2).first(3)
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enumerator/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enumerator/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enumerator/mrbgem.rake	(revision 270)
@@ -0,0 +1,7 @@
+MRuby::Gem::Specification.new('mruby-enumerator') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.add_dependency('mruby-fiber', :core => 'mruby-fiber')
+  spec.add_dependency 'mruby-enum-ext', :core => 'mruby-enum-ext'
+  spec.summary = 'Enumerator class'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enumerator/mrblib/enumerator.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enumerator/mrblib/enumerator.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enumerator/mrblib/enumerator.rb	(revision 270)
@@ -0,0 +1,634 @@
+##
+# enumerator.rb Enumerator class
+# See Copyright Notice in mruby.h
+
+##
+# A class which allows both internal and external iteration.
+#
+# An Enumerator can be created by the following methods.
+# - {Kernel#to_enum}
+# - {Kernel#enum_for}
+# - {Enumerator#initialize Enumerator.new}
+#
+# Most methods have two forms: a block form where the contents
+# are evaluated for each item in the enumeration, and a non-block form
+# which returns a new Enumerator wrapping the iteration.
+#
+#       enumerator = %w(one two three).each
+#       puts enumerator.class # => Enumerator
+#
+#       enumerator.each_with_object("foo") do |item, obj|
+#         puts "#{obj}: #{item}"
+#       end
+#
+#       # foo: one
+#       # foo: two
+#       # foo: three
+#
+#       enum_with_obj = enumerator.each_with_object("foo")
+#       puts enum_with_obj.class # => Enumerator
+#
+#       enum_with_obj.each do |item, obj|
+#         puts "#{obj}: #{item}"
+#       end
+#
+#       # foo: one
+#       # foo: two
+#       # foo: three
+#
+# This allows you to chain Enumerators together.  For example, you
+# can map a list's elements to strings containing the index
+# and the element as a string via:
+#
+#       puts %w[foo bar baz].map.with_index { |w, i| "#{i}:#{w}" }
+#       # => ["0:foo", "1:bar", "2:baz"]
+#
+# An Enumerator can also be used as an external iterator.
+# For example, Enumerator#next returns the next value of the iterator
+# or raises StopIteration if the Enumerator is at the end.
+#
+#       e = [1,2,3].each   # returns an enumerator object.
+#       puts e.next   # => 1
+#       puts e.next   # => 2
+#       puts e.next   # => 3
+#       puts e.next   # raises StopIteration
+#
+# You can use this to implement an internal iterator as follows:
+#
+#       def ext_each(e)
+#         while true
+#           begin
+#             vs = e.next_values
+#           rescue StopIteration
+#             return $!.result
+#           end
+#           y = yield(*vs)
+#           e.feed y
+#         end
+#       end
+#
+#       o = Object.new
+#
+#       def o.each
+#         puts yield
+#         puts yield(1)
+#         puts yield(1, 2)
+#         3
+#       end
+#
+#       # use o.each as an internal iterator directly.
+#       puts o.each {|*x| puts x; [:b, *x] }
+#       # => [], [:b], [1], [:b, 1], [1, 2], [:b, 1, 2], 3
+#
+#       # convert o.each to an external iterator for
+#       # implementing an internal iterator.
+#       puts ext_each(o.to_enum) {|*x| puts x; [:b, *x] }
+#       # => [], [:b], [1], [:b, 1], [1, 2], [:b, 1, 2], 3
+#
+class Enumerator
+  include Enumerable
+
+  ##
+  # @overload initialize(size = nil, &block)
+  # @overload initialize(obj, method = :each, *args)
+  #
+  # Creates a new Enumerator object, which can be used as an
+  # Enumerable.
+  #
+  # In the first form, iteration is defined by the given block, in
+  # which a "yielder" object, given as block parameter, can be used to
+  # yield a value by calling the +yield+ method (aliased as +<<+):
+  #
+  #     fib = Enumerator.new do |y|
+  #       a = b = 1
+  #       loop do
+  #         y << a
+  #         a, b = b, a + b
+  #       end
+  #     end
+  #
+  #     p fib.take(10) # => [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
+  #
+  def initialize(obj=nil, meth=:each, *args, &block)
+    if block_given?
+      obj = Generator.new(&block)
+    else
+      raise ArgumentError unless obj
+    end
+
+    @obj = obj
+    @meth = meth
+    @args = args.dup
+    @fib = nil
+    @dst = nil
+    @lookahead = nil
+    @feedvalue = nil
+    @stop_exc = false
+  end
+  attr_accessor :obj, :meth, :args, :fib
+  private :obj, :meth, :args, :fib
+
+  def initialize_copy(obj)
+    raise TypeError, "can't copy type #{obj.class}" unless obj.kind_of? Enumerator
+    raise TypeError, "can't copy execution context" if obj.fib
+    @obj = obj.obj
+    @meth = obj.meth
+    @args = obj.args
+    @fib = nil
+    @lookahead = nil
+    @feedvalue = nil
+    self
+  end
+
+  ##
+  # call-seq:
+  #   e.with_index(offset = 0) {|(*args), idx| ... }
+  #   e.with_index(offset = 0)
+  #
+  # Iterates the given block for each element with an index, which
+  # starts from +offset+.  If no block is given, returns a new Enumerator
+  # that includes the index, starting from +offset+
+  #
+  # +offset+:: the starting index to use
+  #
+  def with_index(offset=0)
+    return to_enum :with_index, offset unless block_given?
+    raise TypeError, "no implicit conversion of #{offset.class} into Integer" unless offset.respond_to?(:to_int)
+
+    n = offset.to_int - 1
+    enumerator_block_call do |i|
+      n += 1
+      yield [i,n]
+    end
+  end
+
+  ##
+  # call-seq:
+  #   e.each_with_index {|(*args), idx| ... }
+  #   e.each_with_index
+  #
+  # Same as Enumerator#with_index(0), i.e. there is no starting offset.
+  #
+  # If no block is given, a new Enumerator is returned that includes the index.
+  #
+  def each_with_index
+    with_index
+  end
+
+  ##
+  # call-seq:
+  #   e.each_with_object(obj) {|(*args), obj| ... }
+  #   e.each_with_object(obj)
+  #   e.with_object(obj) {|(*args), obj| ... }
+  #   e.with_object(obj)
+  #
+  # Iterates the given block for each element with an arbitrary object, +obj+,
+  # and returns +obj+
+  #
+  # If no block is given, returns a new Enumerator.
+  #
+  # @example
+  #   to_three = Enumerator.new do |y|
+  #     3.times do |x|
+  #       y << x
+  #     end
+  #   end
+  #
+  #   to_three_with_string = to_three.with_object("foo")
+  #   to_three_with_string.each do |x,string|
+  #     puts "#{string}: #{x}"
+  #   end
+  #
+  #   # => foo:0
+  #   # => foo:1
+  #   # => foo:2
+  #
+  def with_object(object)
+    return to_enum(:with_object, object) unless block_given?
+
+    enumerator_block_call do |i|
+      yield [i,object]
+    end
+    object
+  end
+
+  def inspect
+    return "#<#{self.class}: uninitialized>" unless @obj
+
+    if @args && @args.size > 0
+      args = @args.join(", ")
+      "#<#{self.class}: #{@obj}:#{@meth}(#{args})>"
+    else
+      "#<#{self.class}: #{@obj}:#{@meth}>"
+    end
+  end
+
+  ##
+  # call-seq:
+  #   enum.each { |elm| block }                    -> obj
+  #   enum.each                                    -> enum
+  #   enum.each(*appending_args) { |elm| block }   -> obj
+  #   enum.each(*appending_args)                   -> an_enumerator
+  #
+  # Iterates over the block according to how this Enumerator was constructed.
+  # If no block and no arguments are given, returns self.
+  #
+  # === Examples
+  #
+  #   "Hello, world!".scan(/\w+/)                     #=> ["Hello", "world"]
+  #   "Hello, world!".to_enum(:scan, /\w+/).to_a      #=> ["Hello", "world"]
+  #   "Hello, world!".to_enum(:scan).each(/\w+/).to_a #=> ["Hello", "world"]
+  #
+  #   obj = Object.new
+  #
+  #   def obj.each_arg(a, b=:b, *rest)
+  #     yield a
+  #     yield b
+  #     yield rest
+  #     :method_returned
+  #   end
+  #
+  #   enum = obj.to_enum :each_arg, :a, :x
+  #
+  #   enum.each.to_a                  #=> [:a, :x, []]
+  #   enum.each.equal?(enum)          #=> true
+  #   enum.each { |elm| elm }         #=> :method_returned
+  #
+  #   enum.each(:y, :z).to_a          #=> [:a, :x, [:y, :z]]
+  #   enum.each(:y, :z).equal?(enum)  #=> false
+  #   enum.each(:y, :z) { |elm| elm } #=> :method_returned
+  #
+  def each(*argv, &block)
+    obj = self
+    if 0 < argv.length
+      obj = self.dup
+      args = obj.args
+      if !args.empty?
+        args = args.dup
+        args.concat argv
+      else
+        args = argv.dup
+      end
+      obj.args = args
+    end
+    return obj unless block_given?
+    enumerator_block_call(&block)
+  end
+
+  def enumerator_block_call(&block)
+    @obj.__send__ @meth, *@args, &block
+  end
+  private :enumerator_block_call
+
+  ##
+  # call-seq:
+  #   e.next   -> object
+  #
+  # Returns the next object in the enumerator, and move the internal position
+  # forward.  When the position reached at the end, StopIteration is raised.
+  #
+  # === Example
+  #
+  #   a = [1,2,3]
+  #   e = a.to_enum
+  #   p e.next   #=> 1
+  #   p e.next   #=> 2
+  #   p e.next   #=> 3
+  #   p e.next   #raises StopIteration
+  #
+  # Note that enumeration sequence by +next+ does not affect other non-external
+  # enumeration methods, unless the underlying iteration methods itself has
+  # side-effect
+  #
+  def next
+    next_values.__svalue
+  end
+
+  ##
+  # call-seq:
+  #   e.next_values   -> array
+  #
+  # Returns the next object as an array in the enumerator, and move the
+  # internal position forward.  When the position reached at the end,
+  # StopIteration is raised.
+  #
+  # This method can be used to distinguish <code>yield</code> and <code>yield
+  # nil</code>.
+  #
+  # === Example
+  #
+  #   o = Object.new
+  #   def o.each
+  #     yield
+  #     yield 1
+  #     yield 1, 2
+  #     yield nil
+  #     yield [1, 2]
+  #   end
+  #   e = o.to_enum
+  #   p e.next_values
+  #   p e.next_values
+  #   p e.next_values
+  #   p e.next_values
+  #   p e.next_values
+  #   e = o.to_enum
+  #   p e.next
+  #   p e.next
+  #   p e.next
+  #   p e.next
+  #   p e.next
+  #
+  #   ## yield args       next_values      next
+  #   #  yield            []               nil
+  #   #  yield 1          [1]              1
+  #   #  yield 1, 2       [1, 2]           [1, 2]
+  #   #  yield nil        [nil]            nil
+  #   #  yield [1, 2]     [[1, 2]]         [1, 2]
+  #
+  # Note that +next_values+ does not affect other non-external enumeration
+  # methods unless underlying iteration method itself has side-effect
+  #
+  def next_values
+    if @lookahead
+      vs = @lookahead
+      @lookahead = nil
+      return vs
+    end
+    raise @stop_exc if @stop_exc
+
+    curr = Fiber.current
+
+    if !@fib || !@fib.alive?
+      @dst = curr
+      @fib = Fiber.new do
+        result = each do |*args|
+          feedvalue = nil
+          Fiber.yield args
+          if @feedvalue
+            feedvalue = @feedvalue
+            @feedvalue = nil
+          end
+          feedvalue
+        end
+        @stop_exc = StopIteration.new "iteration reached an end"
+        @stop_exc.result = result
+        Fiber.yield nil
+      end
+      @lookahead = nil
+    end
+
+    vs = @fib.resume curr
+    if @stop_exc
+      @fib = nil
+      @dst = nil
+      @lookahead = nil
+      @feedvalue = nil
+      raise @stop_exc
+    end
+    vs
+  end
+
+  ##
+  # call-seq:
+  #   e.peek   -> object
+  #
+  # Returns the next object in the enumerator, but doesn't move the internal
+  # position forward.  If the position is already at the end, StopIteration
+  # is raised.
+  #
+  # === Example
+  #
+  #   a = [1,2,3]
+  #   e = a.to_enum
+  #   p e.next   #=> 1
+  #   p e.peek   #=> 2
+  #   p e.peek   #=> 2
+  #   p e.peek   #=> 2
+  #   p e.next   #=> 2
+  #   p e.next   #=> 3
+  #   p e.next   #raises StopIteration
+  #
+  def peek
+    peek_values.__svalue
+  end
+
+  ##
+  # call-seq:
+  #   e.peek_values   -> array
+  #
+  # Returns the next object as an array, similar to Enumerator#next_values, but
+  # doesn't move the internal position forward.  If the position is already at
+  # the end, StopIteration is raised.
+  #
+  # === Example
+  #
+  #   o = Object.new
+  #   def o.each
+  #     yield
+  #     yield 1
+  #     yield 1, 2
+  #   end
+  #   e = o.to_enum
+  #   p e.peek_values    #=> []
+  #   e.next
+  #   p e.peek_values    #=> [1]
+  #   p e.peek_values    #=> [1]
+  #   e.next
+  #   p e.peek_values    #=> [1, 2]
+  #   e.next
+  #   p e.peek_values    # raises StopIteration
+  #
+  def peek_values
+    if @lookahead.nil?
+      @lookahead = next_values
+    end
+    @lookahead.dup
+  end
+
+  ##
+  # call-seq:
+  #   e.rewind   -> e
+  #
+  # Rewinds the enumeration sequence to the beginning.
+  #
+  # If the enclosed object responds to a "rewind" method, it is called.
+  #
+  def rewind
+    @obj.rewind if @obj.respond_to? :rewind
+    @fib = nil
+    @dst = nil
+    @lookahead = nil
+    @feedvalue = nil
+    @stop_exc = false
+    self
+  end
+
+  ##
+  # call-seq:
+  #   e.feed obj   -> nil
+  #
+  # Sets the value to be returned by the next yield inside +e+.
+  #
+  # If the value is not set, the yield returns nil.
+  #
+  # This value is cleared after being yielded.
+  #
+  #   # Array#map passes the array's elements to "yield" and collects the
+  #   # results of "yield" as an array.
+  #   # Following example shows that "next" returns the passed elements and
+  #   # values passed to "feed" are collected as an array which can be
+  #   # obtained by StopIteration#result.
+  #   e = [1,2,3].map
+  #   p e.next           #=> 1
+  #   e.feed "a"
+  #   p e.next           #=> 2
+  #   e.feed "b"
+  #   p e.next           #=> 3
+  #   e.feed "c"
+  #   begin
+  #     e.next
+  #   rescue StopIteration
+  #     p $!.result      #=> ["a", "b", "c"]
+  #   end
+  #
+  #   o = Object.new
+  #   def o.each
+  #     x = yield         # (2) blocks
+  #     p x               # (5) => "foo"
+  #     x = yield         # (6) blocks
+  #     p x               # (8) => nil
+  #     x = yield         # (9) blocks
+  #     p x               # not reached w/o another e.next
+  #   end
+  #
+  #   e = o.to_enum
+  #   e.next              # (1)
+  #   e.feed "foo"        # (3)
+  #   e.next              # (4)
+  #   e.next              # (7)
+  #                       # (10)
+  #
+  def feed(value)
+    raise TypeError, "feed value already set" if @feedvalue
+    @feedvalue = value
+    nil
+  end
+
+  # just for internal
+  class Generator
+    def initialize(&block)
+      raise TypeError, "wrong argument type #{self.class} (expected Proc)" unless block.kind_of? Proc
+
+      @proc = block
+    end
+
+    def each(*args, &block)
+      args.unshift Yielder.new(&block)
+      @proc.call(*args)
+    end
+  end
+
+  # just for internal
+  class Yielder
+    def initialize(&block)
+      raise LocalJumpError, "no block given" unless block_given?
+
+      @proc = block
+    end
+
+    def yield(*args)
+      @proc.call(*args)
+    end
+
+    def << *args
+      self.yield(*args)
+      self
+    end
+  end
+end
+
+module Kernel
+  ##
+  # call-seq:
+  #   obj.to_enum(method = :each, *args)                 -> enum
+  #   obj.enum_for(method = :each, *args)                -> enum
+  #   obj.to_enum(method = :each, *args) {|*args| block} -> enum
+  #   obj.enum_for(method = :each, *args){|*args| block} -> enum
+  #
+  # Creates a new Enumerator which will enumerate by calling +method+ on
+  # +obj+, passing +args+ if any.
+  #
+  # If a block is given, it will be used to calculate the size of
+  # the enumerator without the need to iterate it (see Enumerator#size).
+  #
+  # === Examples
+  #
+  #   str = "xyz"
+  #
+  #   enum = str.enum_for(:each_byte)
+  #   enum.each { |b| puts b }
+  #   # => 120
+  #   # => 121
+  #   # => 122
+  #
+  #   # protect an array from being modified by some_method
+  #   a = [1, 2, 3]
+  #   some_method(a.to_enum)
+  #
+  # It is typical to call to_enum when defining methods for
+  # a generic Enumerable, in case no block is passed.
+  #
+  # Here is such an example, with parameter passing and a sizing block:
+  #
+  #     module Enumerable
+  #       # a generic method to repeat the values of any enumerable
+  #       def repeat(n)
+  #         raise ArgumentError, "#{n} is negative!" if n < 0
+  #         unless block_given?
+  #           return to_enum(__method__, n) do # __method__ is :repeat here
+  #             sz = size     # Call size and multiply by n...
+  #             sz * n if sz  # but return nil if size itself is nil
+  #           end
+  #         end
+  #         each do |*val|
+  #           n.times { yield *val }
+  #         end
+  #       end
+  #     end
+  #
+  #     %i[hello world].repeat(2) { |w| puts w }
+  #       # => Prints 'hello', 'hello', 'world', 'world'
+  #     enum = (1..14).repeat(3)
+  #       # => returns an Enumerator when called without a block
+  #     enum.first(4) # => [1, 1, 1, 2]
+  #
+  def to_enum(meth=:each, *args)
+    Enumerator.new self, meth, *args
+  end
+  alias :enum_for :to_enum
+end
+
+module Enumerable
+  # use Enumerator to use infinite sequence
+  def zip(*arg)
+    ary = []
+    arg = arg.map{|a|a.each}
+    i = 0
+    self.each do |*val|
+      a = []
+      a.push(val.__svalue)
+      idx = 0
+      while idx < arg.size
+        begin
+          a.push(arg[idx].next)
+        rescue StopIteration
+          a.push(nil)
+        end
+        idx += 1
+      end
+      ary.push(a)
+      i += 1
+    end
+    ary
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enumerator/test/enumerator.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enumerator/test/enumerator.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-enumerator/test/enumerator.rb	(revision 270)
@@ -0,0 +1,536 @@
+@obj = Object.new
+class << @obj
+  include Enumerable
+  def foo *a
+    a.each { |x| yield x }
+  end
+end
+
+assert 'Enumerator' do
+  assert_equal Class, Enumerator.class
+end
+
+assert 'Enumerator' do
+  assert_equal Object, Enumerator.superclass
+end
+
+assert 'Enumerator.new' do
+  assert_equal [0,1,2], 3.times.map{|i| i}.sort
+  assert_equal [:x,:y,:z], [:x,:y,:z].each.map{|i| i}.sort
+  assert_equal [[:x,1],[:y,2]], {x:1, y:2}.each.map{|i| i}.sort
+  assert_equal [1,2,3], @obj.to_enum(:foo, 1,2,3).to_a
+  assert_equal [1,2,3], Enumerator.new(@obj, :foo, 1,2,3).to_a
+  assert_equal [1,2,3], Enumerator.new { |y| i = 0; loop { y << (i += 1) } }.take(3)
+  assert_raise(ArgumentError) { Enumerator.new }
+  enum = @obj.to_enum
+  assert_raise(NoMethodError) { enum.each {} }
+
+  # examples
+  fib = Enumerator.new do |y|
+    a = b = 1
+    loop do
+      y << a
+      a, b = b, a + b
+    end
+  end
+  assert_equal fib.take(10), [1,1,2,3,5,8,13,21,34,55]
+end
+
+assert 'Enumerator#initialize_copy' do
+  assert_equal [1, 2, 3], @obj.to_enum(:foo, 1, 2, 3).dup.to_a
+  e = @obj.to_enum :foo, 1, 2, 3
+  assert_nothing_raised { assert_equal(1, e.next) }
+  assert_raise(TypeError) { e.dup }
+
+  e = Enumerator.new { |y| i = 0; loop { y << (i += 1) } }.dup
+  assert_nothing_raised { assert_equal(1, e.next) }
+  assert_raise(TypeError) { e.dup }
+end
+
+assert 'Enumerator#with_index' do
+  assert_equal([[1,0],[2,1],[3,2]], @obj.to_enum(:foo, 1, 2, 3).with_index.to_a)
+  assert_equal([[1,5],[2,6],[3,7]], @obj.to_enum(:foo, 1, 2, 3).with_index(5).to_a)
+end
+
+assert 'Enumerator#with_index nonnum offset' do
+  s = Object.new
+  def s.to_int; 1 end
+  assert_equal([[1,1],[2,2],[3,3]], @obj.to_enum(:foo, 1, 2, 3).with_index(s).to_a)
+end
+
+assert 'Enumerator#with_index string offset' do
+  assert_raise(TypeError){ @obj.to_enum(:foo, 1, 2, 3).with_index('1').to_a }
+end
+
+assert 'Enumerator#with_object' do
+  obj = [0, 1]
+  ret = (1..10).each.with_object(obj) {|i, memo|
+    memo[0] += i
+    memo[1] *= i
+  }
+  assert_true(obj.equal?(ret))
+  assert_equal([55, 3628800], ret)
+end
+
+assert 'Enumerator#with_object arguments' do
+  to_three = Enumerator.new do |y|
+    3.times do |x|
+      y << x
+    end
+  end
+
+  a = []
+  to_three_with_string = to_three.with_object("foo")
+  to_three_with_string.each do |x,string|
+    a << "#{string}:#{x}"
+  end
+  assert_equal ["foo:0","foo:1","foo:2"], a
+end
+
+assert 'Enumerator#inspect' do
+  e = (0..10).each
+  assert_equal("#<Enumerator: 0..10:each>", e.inspect)
+  e = Enumerator.new("FooObject", :foo, 1)
+  assert_equal("#<Enumerator: FooObject:foo(1)>", e.inspect)
+  e = Enumerator.new("FooObject", :foo, 1, 2, 3)
+  assert_equal("#<Enumerator: FooObject:foo(1, 2, 3)>", e.inspect)
+end
+
+assert 'Enumerator#each' do
+  o = Object.new
+  def o.each(ary)
+    ary << 1
+    yield
+  end
+  ary = []
+  e = o.to_enum.each(ary)
+  e.next
+  assert_equal([1], ary)
+end
+
+assert 'Enumerator#each arguments' do
+  obj = Object.new
+
+  def obj.each_arg(a, b=:b, *rest)
+    yield a
+    yield b
+    yield rest
+    :method_returned
+  end
+
+  enum = obj.to_enum :each_arg, :a, :x
+
+  assert_equal [:a, :x, []], enum.each.to_a
+  assert_true enum.each.equal?(enum)
+  assert_equal :method_returned, enum.each { |elm| elm }
+
+  assert_equal [:a, :x, [:y, :z]], enum.each(:y, :z).to_a
+  assert_false enum.each(:y, :z).equal?(enum)
+  assert_equal :method_returned, enum.each(:y, :z) { |elm| elm }
+end
+
+assert 'Enumerator#next' do
+  e = 3.times
+  3.times { |i|
+    assert_equal i, e.next
+  }
+  assert_raise(StopIteration) { e.next }
+end
+
+assert 'Enumerator#next_values' do
+  o = Object.new
+  def o.each
+    yield
+    yield 1
+    yield 1, 2
+  end
+  e = o.to_enum
+  assert_equal nil, e.next
+  assert_equal 1, e.next
+  assert_equal [1,2], e.next
+  e = o.to_enum
+  assert_equal [], e.next_values
+  assert_equal [1], e.next_values
+  assert_equal [1,2], e.next_values
+end
+
+assert 'Enumerator#peek' do
+  a = [1]
+  e = a.each
+  assert_equal 1, e.peek
+  assert_equal 1, e.peek
+  assert_equal 1, e.next
+  assert_raise(StopIteration) { e.peek }
+  assert_raise(StopIteration) { e.peek }
+end
+
+assert 'Enumerator#peek modify' do
+  o = Object.new
+  def o.each
+    yield 1,2
+  end
+  e = o.to_enum
+  a = e.peek
+  a << 3
+  assert_equal([1,2], e.peek)
+end
+
+assert 'Enumerator#peek_values' do
+  o = Object.new
+  def o.each
+    yield
+    yield 1
+    yield 1, 2
+  end
+  e = o.to_enum
+  assert_equal nil, e.peek
+  assert_equal nil, e.next
+  assert_equal 1, e.peek
+  assert_equal 1, e.next
+  assert_equal [1,2], e.peek
+  assert_equal [1,2], e.next
+  e = o.to_enum
+  assert_equal [], e.peek_values
+  assert_equal [], e.next_values
+  assert_equal [1], e.peek_values
+  assert_equal [1], e.next_values
+  assert_equal [1,2], e.peek_values
+  assert_equal [1,2], e.next_values
+  e = o.to_enum
+  assert_equal [], e.peek_values
+  assert_equal nil, e.next
+  assert_equal [1], e.peek_values
+  assert_equal 1, e.next
+  assert_equal [1,2], e.peek_values
+  assert_equal [1,2], e.next
+  e = o.to_enum
+  assert_equal nil, e.peek
+  assert_equal [], e.next_values
+  assert_equal 1, e.peek
+  assert_equal [1], e.next_values
+  assert_equal [1,2], e.peek
+  assert_equal [1,2], e.next_values
+end
+
+assert 'Enumerator#peek_values modify' do
+  o = Object.new
+  def o.each
+    yield 1,2
+  end
+  e = o.to_enum
+  a = e.peek_values
+  a << 3
+  assert_equal [1,2], e.peek
+end
+
+assert 'Enumerator#feed' do
+  o = Object.new
+  def o.each(ary)
+    ary << yield
+    ary << yield
+    ary << yield
+  end
+  ary = []
+  e = o.to_enum :each, ary
+  e.next
+  e.feed 1
+  e.next
+  e.feed 2
+  e.next
+  e.feed 3
+  assert_raise(StopIteration) { e.next }
+  assert_equal [1,2,3], ary
+end
+
+assert 'Enumerator#feed mixed' do
+  o = Object.new
+  def o.each(ary)
+    ary << yield
+    ary << yield
+    ary << yield
+  end
+  ary = []
+  e = o.to_enum :each, ary
+  e.next
+  e.feed 1
+  e.next
+  e.next
+  e.feed 3
+  assert_raise(StopIteration) { e.next }
+  assert_equal [1,nil,3], ary
+end
+
+assert 'Enumerator#feed twice' do
+  o = Object.new
+  def o.each(ary)
+    ary << yield
+    ary << yield
+    ary << yield
+  end
+  ary = []
+  e = o.to_enum :each, ary
+  e.feed 1
+  assert_raise(TypeError) { e.feed 2 }
+end
+
+assert 'Enumerator#feed before first next' do
+  o = Object.new
+  def o.each(ary)
+    ary << yield
+    ary << yield
+    ary << yield
+  end
+  ary = []
+  e = o.to_enum :each, ary
+  e.feed 1
+  e.next
+  e.next
+  assert_equal [1], ary
+end
+
+assert 'Enumerator#feed yielder' do
+  x = nil
+  e = Enumerator.new {|y| x = y.yield; 10 }
+  e.next
+  e.feed 100
+  assert_raise(StopIteration) { e.next }
+  assert_equal 100, x
+end
+
+assert 'Enumerator#rewind' do
+  e = @obj.to_enum(:foo, 1, 2, 3)
+  assert_equal 1, e.next
+  assert_equal 2, e.next
+  e.rewind
+  assert_equal 1, e.next
+  assert_equal 2, e.next
+  assert_equal 3, e.next
+  assert_raise(StopIteration) { e.next }
+end
+
+assert 'Enumerator#rewind clear feed' do
+  o = Object.new
+  def o.each(ary)
+    ary << yield
+    ary << yield
+    ary << yield
+  end
+  ary = []
+  e = o.to_enum(:each, ary)
+  e.next
+  e.feed 1
+  e.next
+  e.feed 2
+  e.rewind
+  e.next
+  e.next
+  assert_equal([1,nil], ary)
+end
+
+assert 'Enumerator#rewind clear' do
+  o = Object.new
+  def o.each(ary)
+    ary << yield
+    ary << yield
+    ary << yield
+  end
+  ary = []
+  e = o.to_enum :each, ary
+  e.next
+  e.feed 1
+  e.next
+  e.feed 2
+  e.rewind
+  e.next
+  e.next
+  assert_equal [1,nil], ary
+end
+
+assert 'Enumerator::Generator' do
+  # note: Enumerator::Generator is a class just for internal
+  g = Enumerator::Generator.new {|y| y << 1 << 2 << 3; :foo }
+  g2 = g.dup
+  a = []
+  assert_equal(:foo, g.each {|x| a << x })
+  assert_equal([1, 2, 3], a)
+  a = []
+  assert_equal(:foo, g2.each {|x| a << x })
+  assert_equal([1, 2, 3], a)
+end
+
+assert 'Enumerator::Generator args' do
+  g = Enumerator::Generator.new {|y, x| y << 1 << 2 << 3; x }
+  a = []
+  assert_equal(:bar, g.each(:bar) {|x| a << x })
+  assert_equal([1, 2, 3], a)
+end
+
+assert 'Enumerator::Yielder' do
+  # note: Enumerator::Yielder is a class just for internal
+  a = []
+  y = Enumerator::Yielder.new {|x| a << x }
+  assert_equal(y, y << 1 << 2 << 3)
+  assert_equal([1, 2, 3], a)
+
+  a = []
+  y = Enumerator::Yielder.new {|x| a << x }
+  assert_equal([1], y.yield(1))
+  assert_equal([1, 2], y.yield(2))
+  assert_equal([1, 2, 3], y.yield(3))
+
+  assert_raise(LocalJumpError) { Enumerator::Yielder.new }
+end
+
+assert 'next after StopIteration' do
+  a = [1]
+  e = a.each
+  assert_equal(1, e.next)
+  assert_raise(StopIteration) { e.next }
+  assert_raise(StopIteration) { e.next }
+  e.rewind
+  assert_equal(1, e.next)
+  assert_raise(StopIteration) { e.next }
+  assert_raise(StopIteration) { e.next }
+end
+
+assert 'gc' do
+  assert_nothing_raised do
+    1.times do
+      foo = [1,2,3].to_enum
+      GC.start
+    end
+    GC.start
+  end
+end
+
+assert 'nested iteration' do
+  def (o = Object.new).each
+    yield :ok1
+    yield [:ok2, :x].each.next
+  end
+  e = o.to_enum
+  assert_equal :ok1, e.next
+  assert_equal :ok2, e.next
+  assert_raise(StopIteration) { e.next }
+end
+
+assert 'Kernel#to_enum' do
+  assert_equal Enumerator, [].to_enum.class
+  assert_raise(ArgumentError){ nil.to_enum }
+end
+
+assert 'modifying existing methods' do
+  assert_equal Enumerator, loop.class
+  e = 3.times
+  i = 0
+  loop_ret = loop {
+    assert_equal i, e.next
+    i += 1
+  }
+end
+
+assert 'Integral#times' do
+  a = 3
+  b = a.times
+  c = []
+  b.with_object(c) do |i, obj|
+    obj << i
+  end
+  assert_equal 3, a
+  assert_equal Enumerator, b.class
+  assert_equal [0,1,2], c
+end
+
+assert 'Enumerable#each_with_index' do
+  assert_equal [['a',0],['b',1],['c',2]], ['a','b','c'].each_with_index.to_a
+end
+
+assert 'Enumerable#map' do
+  a = [1,2,3]
+  b = a.map
+  c = b.with_index do |i, index|
+    [i*i, index*index]
+  end
+  assert_equal [1,2,3], a
+  assert_equal [[1,0],[4,1],[9,4]], c
+end
+
+assert 'Enumerable#find_all' do
+  assert_equal [[3,4]], [[1,2],[3,4],[5,6]].find_all.each{ |i| i[1] == 4 }
+end
+
+assert 'Array#each_index' do
+  a = [1,2,3]
+  b = a.each_index
+  c = []
+  b.with_index do |index1,index2|
+    c << [index1+2,index2+5]
+  end
+  assert_equal [1,2,3], a
+  assert_equal [[2,5],[3,6],[4,7]], c
+end
+
+assert 'Array#map!' do
+  a = [1,2,3]
+  b = a.map!
+  b.with_index do |i, index|
+    [i*i, index*index]
+  end
+  assert_equal [[1,0],[4,1],[9,4]], a
+end
+
+assert 'Hash#each' do
+  a = {a:1,b:2}
+  b = a.each
+  c = []
+  b.each do |k,v|
+    c << [k,v]
+  end
+  assert_equal [[:a,1], [:b,2]], c.sort
+end
+
+assert 'Hash#each_key' do
+  assert_equal [:a,:b], {a:1,b:2}.each_key.to_a.sort
+end
+
+assert 'Hash#each_value' do
+  assert_equal [1,2], {a:1,b:2}.each_value.to_a.sort
+end
+
+assert 'Hash#select' do
+  h = {1=>2,3=>4,5=>6}
+  hret = h.select.with_index {|a,b| a[1] == 4}
+  assert_equal({3=>4}, hret)
+  assert_equal({1=>2,3=>4,5=>6}, h)
+end
+
+assert 'Hash#select!' do
+  h = {1=>2,3=>4,5=>6}
+  hret = h.select!.with_index {|a,b| a[1] == 4}
+  assert_equal h, hret
+  assert_equal({3=>4}, h)
+end
+
+assert 'Hash#reject' do
+  h = {1=>2,3=>4,5=>6}
+  hret = h.reject.with_index {|a,b| a[1] == 4}
+  assert_equal({1=>2,5=>6}, hret)
+  assert_equal({1=>2,3=>4,5=>6}, h)
+end
+
+assert 'Hash#reject!' do
+  h = {1=>2,3=>4,5=>6}
+  hret = h.reject!.with_index {|a,b| a[1] == 4}
+  assert_equal h, hret
+  assert_equal({1=>2,5=>6}, h)
+end
+
+assert 'Range#each' do
+  a = (1..5)
+  b = a.each
+  c = []
+  b.each do |i|
+    c << i
+  end
+  assert_equal [1,2,3,4,5], c
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-error/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-error/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-error/mrbgem.rake	(revision 270)
@@ -0,0 +1,10 @@
+MRuby::Gem::Specification.new('mruby-error') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'extensional error handling'
+
+  if build.cxx_abi_enabled?
+    @objs << build.compile_as_cxx("#{spec.dir}/src/exception.c", "#{spec.build_dir}/src/exception.cxx")
+    @objs.delete_if { |v| v == objfile("#{spec.build_dir}/src/exception") }
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-error/src/exception.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-error/src/exception.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-error/src/exception.c	(revision 270)
@@ -0,0 +1,100 @@
+#include "mruby.h"
+#include "mruby/throw.h"
+#include "mruby/error.h"
+
+MRB_API mrb_value
+mrb_protect(mrb_state *mrb, mrb_func_t body, mrb_value data, mrb_bool *state)
+{
+  struct mrb_jmpbuf *prev_jmp = mrb->jmp;
+  struct mrb_jmpbuf c_jmp;
+  mrb_value result = mrb_nil_value();
+
+  if (state) { *state = FALSE; }
+
+  MRB_TRY(&c_jmp) {
+    mrb->jmp = &c_jmp;
+    result = body(mrb, data);
+    mrb->jmp = prev_jmp;
+  } MRB_CATCH(&c_jmp) {
+    mrb->jmp = prev_jmp;
+    result = mrb_obj_value(mrb->exc);
+    mrb->exc = NULL;
+    if (state) { *state = TRUE; }
+  } MRB_END_EXC(&c_jmp);
+
+  mrb_gc_protect(mrb, result);
+  return result;
+}
+
+MRB_API mrb_value
+mrb_ensure(mrb_state *mrb, mrb_func_t body, mrb_value b_data, mrb_func_t ensure, mrb_value e_data)
+{
+  struct mrb_jmpbuf *prev_jmp = mrb->jmp;
+  struct mrb_jmpbuf c_jmp;
+  mrb_value result;
+
+  MRB_TRY(&c_jmp) {
+    mrb->jmp = &c_jmp;
+    result = body(mrb, b_data);
+    mrb->jmp = prev_jmp;
+  } MRB_CATCH(&c_jmp) {
+    mrb->jmp = prev_jmp;
+    ensure(mrb, e_data);
+    MRB_THROW(mrb->jmp); /* rethrow catched exceptions */
+  } MRB_END_EXC(&c_jmp);
+
+  ensure(mrb, e_data);
+  mrb_gc_protect(mrb, result);
+  return result;
+}
+
+MRB_API mrb_value
+mrb_rescue(mrb_state *mrb, mrb_func_t body, mrb_value b_data,
+           mrb_func_t rescue, mrb_value r_data)
+{
+  return mrb_rescue_exceptions(mrb, body, b_data, rescue, r_data, 1, &mrb->eStandardError_class);
+}
+
+MRB_API mrb_value
+mrb_rescue_exceptions(mrb_state *mrb, mrb_func_t body, mrb_value b_data, mrb_func_t rescue, mrb_value r_data,
+                      mrb_int len, struct RClass **classes)
+{
+  struct mrb_jmpbuf *prev_jmp = mrb->jmp;
+  struct mrb_jmpbuf c_jmp;
+  mrb_value result;
+  mrb_bool error_matched = FALSE;
+  mrb_int i;
+
+  MRB_TRY(&c_jmp) {
+    mrb->jmp = &c_jmp;
+    result = body(mrb, b_data);
+    mrb->jmp = prev_jmp;
+  } MRB_CATCH(&c_jmp) {
+    mrb->jmp = prev_jmp;
+
+    for (i = 0; i < len; ++i) {
+      if (mrb_obj_is_kind_of(mrb, mrb_obj_value(mrb->exc), classes[i])) {
+        error_matched = TRUE;
+        break;
+      }
+    }
+
+    if (!error_matched) { MRB_THROW(mrb->jmp); }
+
+    mrb->exc = NULL;
+    result = rescue(mrb, r_data);
+  } MRB_END_EXC(&c_jmp);
+
+  mrb_gc_protect(mrb, result);
+  return result;
+}
+
+void
+mrb_mruby_error_gem_init(mrb_state *mrb)
+{
+}
+
+void
+mrb_mruby_error_gem_final(mrb_state *mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-error/test/exception.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-error/test/exception.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-error/test/exception.c	(revision 270)
@@ -0,0 +1,59 @@
+#include "mruby.h"
+#include "mruby/error.h"
+#include "mruby/array.h"
+
+static mrb_value
+protect_cb(mrb_state *mrb, mrb_value b)
+{
+  return mrb_yield_argv(mrb, b, 0, NULL);
+}
+
+static mrb_value
+run_protect(mrb_state *mrb, mrb_value self)
+{
+  mrb_value b;
+  mrb_value ret[2];
+  mrb_bool state;
+  mrb_get_args(mrb, "&", &b);
+  ret[0] = mrb_protect(mrb, protect_cb, b, &state);
+  ret[1] = mrb_bool_value(state);
+  return mrb_ary_new_from_values(mrb, 2, ret);
+}
+
+static mrb_value
+run_ensure(mrb_state *mrb, mrb_value self)
+{
+  mrb_value b, e;
+  mrb_get_args(mrb, "oo", &b, &e);
+  return mrb_ensure(mrb, protect_cb, b, protect_cb, e);
+}
+
+static mrb_value
+run_rescue(mrb_state *mrb, mrb_value self)
+{
+  mrb_value b, r;
+  mrb_get_args(mrb, "oo", &b, &r);
+  return mrb_rescue(mrb, protect_cb, b, protect_cb, r);
+}
+
+static mrb_value
+run_rescue_exceptions(mrb_state *mrb, mrb_value self)
+{
+  mrb_value b, r;
+  struct RClass *cls[1];
+  mrb_get_args(mrb, "oo", &b, &r);
+  cls[0] = E_TYPE_ERROR;
+  return mrb_rescue_exceptions(mrb, protect_cb, b, protect_cb, r, 1, cls);
+}
+
+void
+mrb_mruby_error_gem_test(mrb_state *mrb)
+{
+  struct RClass *cls;
+
+  cls = mrb_define_class(mrb, "ExceptionTest", mrb->object_class);
+  mrb_define_module_function(mrb, cls, "mrb_protect", run_protect, MRB_ARGS_NONE() | MRB_ARGS_BLOCK());
+  mrb_define_module_function(mrb, cls, "mrb_ensure", run_ensure, MRB_ARGS_REQ(2));
+  mrb_define_module_function(mrb, cls, "mrb_rescue", run_rescue, MRB_ARGS_REQ(2));
+  mrb_define_module_function(mrb, cls, "mrb_rescue_exceptions", run_rescue_exceptions, MRB_ARGS_REQ(2));
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-error/test/exception.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-error/test/exception.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-error/test/exception.rb	(revision 270)
@@ -0,0 +1,55 @@
+assert 'mrb_protect' do
+  # no failure in protect returns [result, false]
+  assert_equal ['test', false] do
+    ExceptionTest.mrb_protect { 'test' }
+  end
+  # failure in protect returns [exception, true]
+  result = ExceptionTest.mrb_protect { raise 'test' }
+  assert_kind_of RuntimeError, result[0]    
+  assert_true result[1]
+end
+
+assert 'mrb_ensure' do
+  a = false
+  assert_equal 'test' do
+    ExceptionTest.mrb_ensure Proc.new { 'test' }, Proc.new { a = true }
+  end
+  assert_true a
+
+  a = false
+  assert_raise RuntimeError do
+    ExceptionTest.mrb_ensure Proc.new { raise 'test' }, Proc.new { a = true }
+  end
+  assert_true a
+end
+
+assert 'mrb_rescue' do
+  assert_equal 'test' do
+    ExceptionTest.mrb_rescue Proc.new { 'test' }, Proc.new {}
+  end
+
+  class CustomExp < Exception
+  end
+
+  assert_raise CustomExp do
+    ExceptionTest.mrb_rescue Proc.new { raise CustomExp.new 'test' }, Proc.new { 'rescue' }
+  end
+
+  assert_equal 'rescue' do
+    ExceptionTest.mrb_rescue Proc.new { raise 'test' }, Proc.new { 'rescue' }
+  end
+end
+
+assert 'mrb_rescue_exceptions' do
+  assert_equal 'test' do
+    ExceptionTest.mrb_rescue_exceptions Proc.new { 'test' }, Proc.new {}
+  end
+
+  assert_raise RangeError do
+    ExceptionTest.mrb_rescue_exceptions Proc.new { raise RangeError.new 'test' }, Proc.new { 'rescue' }
+  end
+
+  assert_equal 'rescue' do
+    ExceptionTest.mrb_rescue_exceptions Proc.new { raise TypeError.new 'test' }, Proc.new { 'rescue' }
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-eval/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-eval/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-eval/mrbgem.rake	(revision 270)
@@ -0,0 +1,7 @@
+MRuby::Gem::Specification.new('mruby-eval') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'standard Kernel#eval method'
+
+  add_dependency 'mruby-compiler', :core => 'mruby-compiler'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-eval/src/eval.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-eval/src/eval.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-eval/src/eval.c	(revision 270)
@@ -0,0 +1,262 @@
+#include "mruby.h"
+#include "mruby/class.h"
+#include "mruby/compile.h"
+#include "mruby/irep.h"
+#include "mruby/proc.h"
+#include "mruby/opcode.h"
+
+static struct mrb_irep *
+get_closure_irep(mrb_state *mrb, int level)
+{
+  struct mrb_context *c = mrb->c;
+  struct REnv *e = c->ci[-1].proc->env;
+  struct RProc *proc;
+
+  if (level == 0) {
+    proc = c->ci[-1].proc;
+    if (MRB_PROC_CFUNC_P(proc)) {
+      return NULL;
+    }
+    return proc->body.irep;
+  }
+
+  while (--level) {
+    e = (struct REnv*)e->c;
+    if (!e) return NULL;
+  }
+
+  if (!e) return NULL;
+  proc = c->cibase[e->cioff].proc;
+
+  if (!proc || MRB_PROC_CFUNC_P(proc)) {
+    return NULL;
+  }
+  return proc->body.irep;
+}
+
+static inline mrb_code
+search_variable(mrb_state *mrb, mrb_sym vsym, int bnest)
+{
+  mrb_irep *virep;
+  int level;
+  int pos;
+
+  for (level = 0; (virep = get_closure_irep(mrb, level)); level++) {
+    if (!virep || virep->lv == NULL) {
+      continue;
+    }
+    for (pos = 0; pos < virep->nlocals - 1; pos++) {
+      if (vsym == virep->lv[pos].name) {
+        return (MKARG_B(pos + 1) | MKARG_C(level + bnest));
+      }
+    }
+  }
+
+  return 0;
+}
+
+static mrb_bool
+potential_upvar_p(struct mrb_locals *lv, uint16_t v, int argc, uint16_t nlocals)
+{
+  if (v >= nlocals) return FALSE;
+  /* skip arguments  */
+  if (v < argc+1) return FALSE;
+  return TRUE;
+}
+
+static void
+patch_irep(mrb_state *mrb, mrb_irep *irep, int bnest)
+{
+  size_t i;
+  mrb_code c;
+  int argc = 0;
+
+  for (i = 0; i < irep->ilen; i++) {
+    c = irep->iseq[i];
+    switch(GET_OPCODE(c)){
+    case OP_ENTER:
+      {
+        mrb_aspec ax = GETARG_Ax(c);
+        /* extra 1 means a slot for block */
+        argc = MRB_ASPEC_REQ(ax)+MRB_ASPEC_OPT(ax)+MRB_ASPEC_REST(ax)+MRB_ASPEC_POST(ax)+1;
+      }
+      break;
+
+    case OP_EPUSH:
+      patch_irep(mrb, irep->reps[GETARG_Bx(c)], bnest + 1);
+      break;
+
+    case OP_LAMBDA:
+      {
+        int arg_c = GETARG_c(c);
+        if (arg_c & OP_L_CAPTURE) {
+          patch_irep(mrb, irep->reps[GETARG_b(c)], bnest + 1);
+        }
+      }
+      break;
+
+    case OP_SEND:
+      if (GETARG_C(c) != 0) {
+        break;
+      }
+      {
+        mrb_code arg = search_variable(mrb, irep->syms[GETARG_B(c)], bnest);
+        if (arg != 0) {
+          /* must replace */
+          irep->iseq[i] = MKOPCODE(OP_GETUPVAR) | MKARG_A(GETARG_A(c)) | arg;
+        }
+      }
+      break;
+
+    case OP_MOVE:
+      /* src part */
+      if (potential_upvar_p(irep->lv, GETARG_B(c), argc, irep->nlocals)) {
+        mrb_code arg = search_variable(mrb, irep->lv[GETARG_B(c) - 1].name, bnest);
+        if (arg != 0) {
+          /* must replace */
+          irep->iseq[i] = MKOPCODE(OP_GETUPVAR) | MKARG_A(GETARG_A(c)) | arg;
+        }
+      }
+      /* dst part */
+      if (potential_upvar_p(irep->lv, GETARG_A(c), argc, irep->nlocals)) {
+        mrb_code arg = search_variable(mrb, irep->lv[GETARG_A(c) - 1].name, bnest);
+        if (arg != 0) {
+          /* must replace */
+          irep->iseq[i] = MKOPCODE(OP_SETUPVAR) | MKARG_A(GETARG_B(c)) | arg;
+        }
+      }
+      break;
+    }
+  }
+}
+
+static struct RProc*
+create_proc_from_string(mrb_state *mrb, char *s, int len, mrb_value binding, char *file, mrb_int line)
+{
+  mrbc_context *cxt;
+  struct mrb_parser_state *p;
+  struct RProc *proc;
+  struct REnv *e;
+  struct mrb_context *c = mrb->c;
+
+  if (!mrb_nil_p(binding)) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "Binding of eval must be nil.");
+  }
+
+  cxt = mrbc_context_new(mrb);
+  cxt->lineno = line;
+  if (file) {
+    mrbc_filename(mrb, cxt, file);
+  }
+  cxt->capture_errors = TRUE;
+  cxt->no_optimize = TRUE;
+
+  p = mrb_parse_nstring(mrb, s, len, cxt);
+
+  /* only occur when memory ran out */
+  if (!p) {
+    mrb_raise(mrb, E_RUNTIME_ERROR, "Failed to create parser state.");
+  }
+
+  if (0 < p->nerr) {
+    /* parse error */
+    char buf[256];
+    int n;
+    n = snprintf(buf, sizeof(buf), "line %d: %s\n", p->error_buffer[0].lineno, p->error_buffer[0].message);
+    mrb_parser_free(p);
+    mrbc_context_free(mrb, cxt);
+    mrb_exc_raise(mrb, mrb_exc_new(mrb, E_SYNTAX_ERROR, buf, n));
+  }
+
+  proc = mrb_generate_code(mrb, p);
+  if (proc == NULL) {
+    /* codegen error */
+    mrb_parser_free(p);
+    mrbc_context_free(mrb, cxt);
+    mrb_raise(mrb, E_SCRIPT_ERROR, "codegen error");
+  }
+  if (c->ci[-1].proc->target_class) {
+    proc->target_class = c->ci[-1].proc->target_class;
+  }
+  e = c->ci[-1].proc->env;
+  if (!e) e = c->ci[-1].env;
+  e = (struct REnv*)mrb_obj_alloc(mrb, MRB_TT_ENV, (struct RClass*)e);
+  e->mid = c->ci[-1].mid;
+  e->cioff = c->ci - c->cibase - 1;
+  e->stack = c->ci->stackent;
+  MRB_SET_ENV_STACK_LEN(e, c->ci[-1].proc->body.irep->nlocals);
+  c->ci->env = e;
+  proc->env = e;
+  patch_irep(mrb, proc->body.irep, 0);
+
+  mrb_parser_free(p);
+  mrbc_context_free(mrb, cxt);
+
+  return proc;
+}
+
+static mrb_value
+f_eval(mrb_state *mrb, mrb_value self)
+{
+  char *s;
+  mrb_int len;
+  mrb_value binding = mrb_nil_value();
+  char *file = NULL;
+  mrb_int line = 1;
+  mrb_value ret;
+  struct RProc *proc;
+
+  mrb_get_args(mrb, "s|ozi", &s, &len, &binding, &file, &line);
+
+  proc = create_proc_from_string(mrb, s, len, binding, file, line);
+  ret = mrb_toplevel_run(mrb, proc);
+  if (mrb->exc) {
+    mrb_exc_raise(mrb, mrb_obj_value(mrb->exc));
+  }
+
+  return ret;
+}
+
+mrb_value mrb_obj_instance_eval(mrb_state *mrb, mrb_value self);
+
+#define CI_ACC_SKIP    -1
+
+static mrb_value
+f_instance_eval(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_context *c = mrb->c;
+  mrb_value b;
+  mrb_int argc; mrb_value *argv;
+
+  mrb_get_args(mrb, "*&", &argv, &argc, &b);
+
+  if (mrb_nil_p(b)) {
+    char *s;
+    mrb_int len;
+    char *file = NULL;
+    mrb_int line = 1;
+    mrb_value cv;
+
+    mrb_get_args(mrb, "s|zi", &s, &len, &file, &line);
+    c->ci->acc = CI_ACC_SKIP;
+    cv = mrb_singleton_class(mrb, self);
+    c->ci->target_class = mrb_class_ptr(cv);
+    return mrb_run(mrb, create_proc_from_string(mrb, s, len, mrb_nil_value(), file, line), self);
+  }
+  else {
+    mrb_get_args(mrb, "&", &b);
+    return mrb_obj_instance_eval(mrb, self);
+  }
+}
+
+void
+mrb_mruby_eval_gem_init(mrb_state* mrb)
+{
+  mrb_define_module_function(mrb, mrb->kernel_module, "eval", f_eval, MRB_ARGS_ARG(1, 3));
+  mrb_define_method(mrb, mrb->kernel_module, "instance_eval", f_instance_eval, MRB_ARGS_ARG(1, 2));
+}
+
+void
+mrb_mruby_eval_gem_final(mrb_state* mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-eval/test/eval.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-eval/test/eval.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-eval/test/eval.rb	(revision 270)
@@ -0,0 +1,99 @@
+assert('Kernel.eval', '15.3.1.2.3') do
+  assert_equal(10) { Kernel.eval '1 * 10' }
+  assert_equal('aaa') { Kernel.eval "'a' * 3" }
+  assert_equal(10) {
+    a = 10
+    Kernel.eval "a"
+  }
+  assert_equal(20) {
+    a = 10
+    Kernel.eval "a = 20"
+    a
+  }
+  assert_equal(15) {
+    c = 5
+    lambda {
+      a = 10
+      Kernel.eval "c = a + c"
+    }.call
+    c
+  }
+  assert_equal(5) {
+    c = 5
+    lambda {
+      Kernel.eval 'lambda { c }.call'
+    }.call
+  }
+  assert_equal(15) {
+    c = 5
+    lambda {
+      a = 10
+      Kernel.eval 'lambda { c = a + c }.call'
+    }.call
+    c
+  }
+  assert_equal(2) {
+    a = 10
+    Kernel.eval 'def f(a); b=a.send(:+, 1); end'
+    f(1)
+  }
+end
+
+assert('Kernel#eval', '15.3.1.3.12') do
+  assert_equal(10) { eval '1 * 10' }
+end
+
+assert('rest arguments of eval') do
+  assert_raise(ArgumentError) { Kernel.eval('0', 0, 'test', 0) }
+  assert_equal ['test', 'test.rb', 10] do
+    Kernel.eval('[\'test\', __FILE__, __LINE__]', nil, 'test.rb', 10)
+  end
+end
+
+assert 'eval syntax error' do
+  assert_raise(SyntaxError) do
+    eval 'p "test'
+  end
+end
+
+assert('String instance_eval') do
+  obj = Object.new
+  obj.instance_variable_set :@test, 'test'
+  assert_raise(ArgumentError) { obj.instance_eval(0) { } }
+  assert_raise(ArgumentError) { obj.instance_eval('0', 'test', 0, 'test') }
+  assert_equal(['test.rb', 10]) { obj.instance_eval('[__FILE__, __LINE__]', 'test.rb', 10)}
+  assert_equal('test') { obj.instance_eval('@test') }
+  assert_equal('test') { obj.instance_eval { @test } }
+end
+
+assert('Kernel.#eval(string) context') do
+  class TestEvalConstScope
+    EVAL_CONST_CLASS = 'class'
+    def const_string
+      eval 'EVAL_CONST_CLASS'
+    end
+  end
+  obj = TestEvalConstScope.new
+  assert_raise(NameError) { eval 'EVAL_CONST_CLASS' }
+  assert_equal('class') { obj.const_string }
+end
+
+assert('Object#instance_eval with begin-rescue-ensure execution order') do
+  class HellRaiser
+    def raise_hell
+      order = [:enter_raise_hell]
+      begin
+        order.push :begin
+        self.instance_eval("raise 'error'")
+      rescue
+        order.push :rescue
+      ensure
+        order.push :ensure
+      end
+      order
+    end
+  end
+
+  hell_raiser = HellRaiser.new
+  assert_equal([:enter_raise_hell, :begin, :rescue, :ensure], hell_raiser.raise_hell)
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-exit/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-exit/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-exit/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-exit') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'Kernel#exit method'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-exit/src/mruby-exit.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-exit/src/mruby-exit.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-exit/src/mruby-exit.c	(revision 270)
@@ -0,0 +1,24 @@
+#include <stdlib.h>
+#include "mruby.h"
+
+static mrb_value
+f_exit(mrb_state *mrb, mrb_value self)
+{
+  mrb_int i = EXIT_SUCCESS;
+
+  mrb_get_args(mrb, "|i", &i);
+  exit(i);
+  /* not reached */
+  return mrb_nil_value();
+}
+
+void
+mrb_mruby_exit_gem_init(mrb_state* mrb)
+{
+  mrb_define_method(mrb, mrb->kernel_module, "exit", f_exit, MRB_ARGS_OPT(1));
+}
+
+void
+mrb_mruby_exit_gem_final(mrb_state* mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-fiber/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-fiber/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-fiber/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-fiber') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'Fiber class'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-fiber/src/fiber.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-fiber/src/fiber.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-fiber/src/fiber.c	(revision 270)
@@ -0,0 +1,389 @@
+#include "mruby.h"
+#include "mruby/array.h"
+#include "mruby/class.h"
+#include "mruby/proc.h"
+
+#define fiber_ptr(o) ((struct RFiber*)mrb_ptr(o))
+
+#define FIBER_STACK_INIT_SIZE 64
+#define FIBER_CI_INIT_SIZE 8
+
+/*
+ *  call-seq:
+ *     Fiber.new{...} -> obj
+ *
+ *  Creates a fiber, whose execution is suspend until it is explicitly
+ *  resumed using <code>Fiber#resume</code> method.
+ *  The code running inside the fiber can give up control by calling
+ *  <code>Fiber.yield</code> in which case it yields control back to caller
+ *  (the caller of the <code>Fiber#resume</code>).
+ *
+ *  Upon yielding or termination the Fiber returns the value of the last
+ *  executed expression
+ *
+ *  For instance:
+ *
+ *    fiber = Fiber.new do
+ *      Fiber.yield 1
+ *      2
+ *    end
+ *
+ *    puts fiber.resume
+ *    puts fiber.resume
+ *    puts fiber.resume
+ *
+ *  <em>produces</em>
+ *
+ *    1
+ *    2
+ *    resuming dead fiber (FiberError)
+ *
+ *  The <code>Fiber#resume</code> method accepts an arbitrary number of
+ *  parameters, if it is the first call to <code>resume</code> then they
+ *  will be passed as block arguments. Otherwise they will be the return
+ *  value of the call to <code>Fiber.yield</code>
+ *
+ *  Example:
+ *
+ *    fiber = Fiber.new do |first|
+ *      second = Fiber.yield first + 2
+ *    end
+ *
+ *    puts fiber.resume 10
+ *    puts fiber.resume 14
+ *    puts fiber.resume 18
+ *
+ *  <em>produces</em>
+ *
+ *    12
+ *    14
+ *    resuming dead fiber (FiberError)
+ *
+ */
+static mrb_value
+fiber_init(mrb_state *mrb, mrb_value self)
+{
+  static const struct mrb_context mrb_context_zero = { 0 };
+  struct RFiber *f = fiber_ptr(self);
+  struct mrb_context *c;
+  struct RProc *p;
+  mrb_callinfo *ci;
+  mrb_value blk;
+  size_t slen;
+
+  mrb_get_args(mrb, "&", &blk);
+
+  if (mrb_nil_p(blk)) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "tried to create Fiber object without a block");
+  }
+  p = mrb_proc_ptr(blk);
+  if (MRB_PROC_CFUNC_P(p)) {
+    mrb_raise(mrb, E_FIBER_ERROR, "tried to create Fiber from C defined method");
+  }
+
+  f->cxt = (struct mrb_context*)mrb_malloc(mrb, sizeof(struct mrb_context));
+  *f->cxt = mrb_context_zero;
+  c = f->cxt;
+
+  /* initialize VM stack */
+  slen = FIBER_STACK_INIT_SIZE;
+  if (p->body.irep->nregs > slen) {
+    slen += p->body.irep->nregs;
+  }
+  c->stbase = (mrb_value *)mrb_malloc(mrb, slen*sizeof(mrb_value));
+  c->stend = c->stbase + slen;
+  c->stack = c->stbase;
+
+#ifdef MRB_NAN_BOXING
+  {
+    mrb_value *p = c->stbase;
+    mrb_value *pend = c->stend;
+
+    while (p < pend) {
+      SET_NIL_VALUE(*p);
+      p++;
+    }
+  }
+#else
+  memset(c->stbase, 0, slen * sizeof(mrb_value));
+#endif
+
+  /* copy receiver from a block */
+  c->stack[0] = mrb->c->stack[0];
+
+  /* initialize callinfo stack */
+  c->cibase = (mrb_callinfo *)mrb_calloc(mrb, FIBER_CI_INIT_SIZE, sizeof(mrb_callinfo));
+  c->ciend = c->cibase + FIBER_CI_INIT_SIZE;
+  c->ci = c->cibase;
+  c->ci->stackent = c->stack;
+
+  /* adjust return callinfo */
+  ci = c->ci;
+  ci->target_class = p->target_class;
+  ci->proc = p;
+  ci->pc = p->body.irep->iseq;
+  ci->nregs = p->body.irep->nregs;
+  ci[1] = ci[0];
+  c->ci++;                      /* push dummy callinfo */
+
+  c->fib = f;
+  c->status = MRB_FIBER_CREATED;
+
+  return self;
+}
+
+static struct mrb_context*
+fiber_check(mrb_state *mrb, mrb_value fib)
+{
+  struct RFiber *f = fiber_ptr(fib);
+
+  mrb_assert(f->tt == MRB_TT_FIBER);
+  if (!f->cxt) {
+    mrb_raise(mrb, E_FIBER_ERROR, "uninitialized Fiber");
+  }
+  return f->cxt;
+}
+
+static mrb_value
+fiber_result(mrb_state *mrb, const mrb_value *a, mrb_int len)
+{
+  if (len == 0) return mrb_nil_value();
+  if (len == 1) return a[0];
+  return mrb_ary_new_from_values(mrb, len, a);
+}
+
+/* mark return from context modifying method */
+#define MARK_CONTEXT_MODIFY(c) (c)->ci->target_class = NULL
+
+static mrb_value
+fiber_switch(mrb_state *mrb, mrb_value self, mrb_int len, const mrb_value *a, mrb_bool resume)
+{
+  struct mrb_context *c = fiber_check(mrb, self);
+  mrb_callinfo *ci;
+
+  for (ci = c->ci; ci >= c->cibase; ci--) {
+    if (ci->acc < 0) {
+      mrb_raise(mrb, E_FIBER_ERROR, "can't cross C function boundary");
+    }
+  }
+  if (resume && c->status == MRB_FIBER_TRANSFERRED) {
+    mrb_raise(mrb, E_FIBER_ERROR, "resuming transferred fiber");
+  }
+  if (c->status == MRB_FIBER_RUNNING || c->status == MRB_FIBER_RESUMING) {
+    mrb_raise(mrb, E_FIBER_ERROR, "double resume");
+  }
+  if (c->status == MRB_FIBER_TERMINATED) {
+    mrb_raise(mrb, E_FIBER_ERROR, "resuming dead fiber");
+  }
+  mrb->c->status = resume ? MRB_FIBER_RESUMING : MRB_FIBER_TRANSFERRED;
+  c->prev = resume ? mrb->c : (c->prev ? c->prev : mrb->root_c);
+  if (c->status == MRB_FIBER_CREATED) {
+    mrb_value *b = c->stack+1;
+    mrb_value *e = b + len;
+
+    while (b<e) {
+      *b++ = *a++;
+    }
+    c->cibase->argc = len;
+    if (c->prev->fib)
+      mrb_field_write_barrier(mrb, (struct RBasic*)c->fib, (struct RBasic*)c->prev->fib);
+    mrb_write_barrier(mrb, (struct RBasic*)c->fib);
+    c->status = MRB_FIBER_RUNNING;
+    mrb->c = c;
+
+    MARK_CONTEXT_MODIFY(c);
+    return c->ci->proc->env->stack[0];
+  }
+  MARK_CONTEXT_MODIFY(c);
+  if (c->prev->fib)
+    mrb_field_write_barrier(mrb, (struct RBasic*)c->fib, (struct RBasic*)c->prev->fib);
+  mrb_write_barrier(mrb, (struct RBasic*)c->fib);
+  c->status = MRB_FIBER_RUNNING;
+  mrb->c = c;
+  return fiber_result(mrb, a, len);
+}
+
+/*
+ *  call-seq:
+ *     fiber.resume(args, ...) -> obj
+ *
+ *  Resumes the fiber from the point at which the last <code>Fiber.yield</code>
+ *  was called, or starts running it if it is the first call to
+ *  <code>resume</code>. Arguments passed to resume will be the value of
+ *  the <code>Fiber.yield</code> expression or will be passed as block
+ *  parameters to the fiber's block if this is the first <code>resume</code>.
+ *
+ *  Alternatively, when resume is called it evaluates to the arguments passed
+ *  to the next <code>Fiber.yield</code> statement inside the fiber's block
+ *  or to the block value if it runs to completion without any
+ *  <code>Fiber.yield</code>
+ */
+static mrb_value
+fiber_resume(mrb_state *mrb, mrb_value self)
+{
+  mrb_value *a;
+  mrb_int len;
+
+  mrb_get_args(mrb, "*", &a, &len);
+  return fiber_switch(mrb, self, len, a, TRUE);
+}
+
+/* resume thread with given arguments */
+MRB_API mrb_value
+mrb_fiber_resume(mrb_state *mrb, mrb_value fib, mrb_int len, const mrb_value *a)
+{
+  return fiber_switch(mrb, fib, len, a, TRUE);
+}
+
+/*
+ *  call-seq:
+ *     fiber.alive? -> true or false
+ *
+ *  Returns true if the fiber can still be resumed. After finishing
+ *  execution of the fiber block this method will always return false.
+ */
+static mrb_value
+fiber_alive_p(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_context *c = fiber_check(mrb, self);
+  return mrb_bool_value(c->status != MRB_FIBER_TERMINATED);
+}
+
+static mrb_value
+fiber_eq(mrb_state *mrb, mrb_value self)
+{
+  mrb_value other;
+  mrb_get_args(mrb, "o", &other);
+
+  if (mrb_type(other) != MRB_TT_FIBER) {
+    return mrb_false_value();
+  }
+  return mrb_bool_value(fiber_ptr(self) == fiber_ptr(other));
+}
+
+/*
+ *  call-seq:
+ *     fiber.transfer(args, ...) -> obj
+ *
+ *  Transfers control to receiver fiber of the method call.
+ *  Unlike <code>resume</code> the receiver wouldn't be pushed to call
+ * stack of fibers. Instead it will switch to the call stack of
+ * transferring fiber.
+ *  When resuming a fiber that was transferred to another fiber it would
+ * cause double resume error. Though when the fiber is re-transferred
+ * and <code>Fiber.yield</code> is called, the fiber would be resumable.
+ */
+static mrb_value
+fiber_transfer(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_context *c = fiber_check(mrb, self);
+  mrb_value* a;
+  mrb_int len;
+
+  mrb_get_args(mrb, "*", &a, &len);
+
+  if (c == mrb->root_c) {
+    mrb->c->status = MRB_FIBER_TRANSFERRED;
+    mrb->c = c;
+    c->status = MRB_FIBER_RUNNING;
+    MARK_CONTEXT_MODIFY(c);
+    mrb_write_barrier(mrb, (struct RBasic*)c->fib);
+    return fiber_result(mrb, a, len);
+  }
+
+  if (c == mrb->c) {
+    return fiber_result(mrb, a, len);
+  }
+
+  return fiber_switch(mrb, self, len, a, FALSE);
+}
+
+/* yield values to the caller fiber */
+/* mrb_fiber_yield() must be called as `return mrb_fiber_yield(...)` */
+MRB_API mrb_value
+mrb_fiber_yield(mrb_state *mrb, mrb_int len, const mrb_value *a)
+{
+  struct mrb_context *c = mrb->c;
+  mrb_callinfo *ci;
+
+  for (ci = c->ci; ci >= c->cibase; ci--) {
+    if (ci->acc < 0) {
+      mrb_raise(mrb, E_FIBER_ERROR, "can't cross C function boundary");
+    }
+  }
+  if (!c->prev) {
+    mrb_raise(mrb, E_FIBER_ERROR, "can't yield from root fiber");
+  }
+
+  c->prev->status = MRB_FIBER_RUNNING;
+  c->status = MRB_FIBER_SUSPENDED;
+  mrb->c = c->prev;
+  c->prev = NULL;
+  MARK_CONTEXT_MODIFY(mrb->c);
+  mrb_write_barrier(mrb, (struct RBasic*)c->fib);
+  return fiber_result(mrb, a, len);
+}
+
+/*
+ *  call-seq:
+ *     Fiber.yield(args, ...) -> obj
+ *
+ *  Yields control back to the context that resumed the fiber, passing
+ *  along any arguments that were passed to it. The fiber will resume
+ *  processing at this point when <code>resume</code> is called next.
+ *  Any arguments passed to the next <code>resume</code> will be the
+ *  value that this <code>Fiber.yield</code> expression evaluates to.
+ */
+static mrb_value
+fiber_yield(mrb_state *mrb, mrb_value self)
+{
+  mrb_value *a;
+  mrb_int len;
+
+  mrb_get_args(mrb, "*", &a, &len);
+  return mrb_fiber_yield(mrb, len, a);
+}
+
+/*
+ *  call-seq:
+ *     Fiber.current() -> fiber
+ *
+ *  Returns the current fiber. If you are not running in the context of
+ *  a fiber this method will return the root fiber.
+ */
+static mrb_value
+fiber_current(mrb_state *mrb, mrb_value self)
+{
+  if (!mrb->c->fib) {
+    struct RFiber *f = (struct RFiber*)mrb_obj_alloc(mrb, MRB_TT_FIBER, mrb_class_ptr(self));
+
+    f->cxt = mrb->c;
+    mrb->c->fib = f;
+  }
+  return mrb_obj_value(mrb->c->fib);
+}
+
+void
+mrb_mruby_fiber_gem_init(mrb_state* mrb)
+{
+  struct RClass *c;
+
+  c = mrb_define_class(mrb, "Fiber", mrb->object_class);
+  MRB_SET_INSTANCE_TT(c, MRB_TT_FIBER);
+
+  mrb_define_method(mrb, c, "initialize", fiber_init,    MRB_ARGS_NONE());
+  mrb_define_method(mrb, c, "resume",     fiber_resume,  MRB_ARGS_ANY());
+  mrb_define_method(mrb, c, "transfer",   fiber_transfer, MRB_ARGS_ANY());
+  mrb_define_method(mrb, c, "alive?",     fiber_alive_p, MRB_ARGS_NONE());
+  mrb_define_method(mrb, c, "==",         fiber_eq,      MRB_ARGS_REQ(1));
+
+  mrb_define_class_method(mrb, c, "yield", fiber_yield, MRB_ARGS_ANY());
+  mrb_define_class_method(mrb, c, "current", fiber_current, MRB_ARGS_NONE());
+
+  mrb_define_class(mrb, "FiberError", mrb->eStandardError_class);
+}
+
+void
+mrb_mruby_fiber_gem_final(mrb_state* mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-fiber/test/fiber.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-fiber/test/fiber.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-fiber/test/fiber.rb	(revision 270)
@@ -0,0 +1,208 @@
+assert('Fiber.new') do
+  f = Fiber.new{}
+  assert_kind_of Fiber, f
+end
+
+assert('Fiber#resume') do
+  f = Fiber.new{|x| x }
+  assert_equal 2, f.resume(2)
+end
+
+assert('Fiber#transfer') do
+  f2 = nil
+  f1 = Fiber.new do |v|
+    Fiber.yield v
+    f2.transfer
+  end
+  f2 = Fiber.new do
+    f1.transfer(1)
+    f1.transfer(1)
+    Fiber.yield 2
+  end
+  assert_equal 1, f2.resume
+  assert_raise(FiberError) { f2.resume }
+  assert_equal 2, f2.transfer
+  assert_raise(FiberError) { f1.resume }
+  f1.transfer
+  f2.resume
+  assert_false f1.alive?
+  assert_false f2.alive?
+end
+
+assert('Fiber#alive?') do
+  f = Fiber.new{ Fiber.yield }
+  f.resume
+  assert_true f.alive?
+  f.resume
+  assert_false f.alive?
+end
+
+assert('Fiber#==') do
+  root = Fiber.current
+  assert_equal root, root
+  assert_equal root, Fiber.current
+  assert_false root != Fiber.current
+  f = Fiber.new {
+    assert_false root == Fiber.current
+  }
+  f.resume
+  assert_false f == root
+  assert_true f != root
+end
+
+assert('Fiber.yield') do
+  f = Fiber.new{|x| Fiber.yield x }
+  assert_equal 3, f.resume(3)
+  assert_true f.alive?
+end
+
+assert('FiberError') do
+  assert_equal StandardError, FiberError.superclass
+end
+
+assert('Fiber iteration') do
+  f1 = Fiber.new{
+    [1,2,3].each{|x| Fiber.yield(x)}
+  }
+  f2 = Fiber.new{
+    [9,8,7].each{|x| Fiber.yield(x)}
+  }
+  a = []
+  3.times {
+    a << f1.resume
+    a << f2.resume
+  }
+  assert_equal [1,9,2,8,3,7], a
+end
+
+assert('Fiber with splat in the block argument list') {
+  Fiber.new{|*x|x}.resume(1) == [1]
+}
+
+assert('Fiber raises on resume when dead') do
+  assert_raise(FiberError) do
+    f = Fiber.new{}
+    f.resume
+    assert_false f.alive?
+    f.resume
+  end
+end
+
+assert('Yield raises when called on root fiber') do
+  assert_raise(FiberError) { Fiber.yield }
+end
+
+assert('Double resume of Fiber') do
+  f1 = Fiber.new {}
+  f2 = Fiber.new {
+    f1.resume
+    assert_raise(FiberError) { f2.resume }
+    Fiber.yield 0
+  }
+  assert_equal 0, f2.resume
+  f2.resume
+  assert_false f1.alive?
+  assert_false f2.alive?
+end
+
+assert('Recursive resume of Fiber') do
+  f1, f2 = nil, nil
+  f1 = Fiber.new { assert_raise(FiberError) { f2.resume } }
+  f2 = Fiber.new {
+    f1.resume
+    Fiber.yield 0
+  }
+  f3 = Fiber.new {
+    f2.resume
+  }
+  assert_equal 0, f3.resume
+  f2.resume
+  assert_false f1.alive?
+  assert_false f2.alive?
+  assert_false f3.alive?
+end
+
+assert('Root fiber resume') do
+  root = Fiber.current
+  assert_raise(FiberError) { root.resume }
+  f = Fiber.new {
+    assert_raise(FiberError) { root.resume }
+  }
+  f.resume
+  assert_false f.alive?
+end
+
+assert('Fiber without block') do
+  assert_raise(ArgumentError) { Fiber.new }
+end
+
+
+assert('Transfer to self.') do
+  result = []
+  f = Fiber.new { result << :start; f.transfer; result << :end  }
+  f.transfer
+  assert_equal [:start, :end], result
+
+  result = []
+  f = Fiber.new { result << :start; f.transfer; result << :end  }
+  f.resume
+  assert_equal [:start, :end], result
+end
+
+assert('Resume transferred fiber') do
+  f = Fiber.new {
+    assert_raise(FiberError) { f.resume }
+  }
+  f.transfer
+end
+
+assert('Root fiber transfer.') do
+  result = nil
+  root = Fiber.current
+  f = Fiber.new {
+    result = :ok
+    root.transfer
+  }
+  f.resume
+  assert_true f.alive?
+  assert_equal :ok, result
+end
+
+assert('Break nested fiber with root fiber transfer') do
+  root = Fiber.current
+
+  result = nil
+  f2 = nil
+  f1 = Fiber.new {
+    Fiber.yield f2.resume
+    result = :f1
+  }
+  f2 = Fiber.new {
+    result = :to_root
+    root.transfer :from_f2
+    result = :f2
+  }
+  assert_equal :from_f2, f1.resume
+  assert_equal :to_root, result
+  assert_equal :f2, f2.transfer
+  assert_equal :f2, result
+  assert_false f2.alive?
+  assert_equal :f1, f1.resume
+  assert_equal :f1, result
+  assert_false f1.alive?
+end
+
+assert('CRuby Fiber#transfer test.') do
+  ary = []
+  f2 = nil
+  f1 = Fiber.new{
+    ary << f2.transfer(:foo)
+    :ok
+  }
+  f2 = Fiber.new{
+    ary << f1.transfer(:baz)
+    :ng
+  }
+  assert_equal :ok, f1.transfer
+  assert_equal [:baz], ary
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-hash-ext/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-hash-ext/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-hash-ext/mrbgem.rake	(revision 270)
@@ -0,0 +1,7 @@
+MRuby::Gem::Specification.new('mruby-hash-ext') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'Hash class extension'
+  spec.add_dependency 'mruby-enum-ext', :core => 'mruby-enum-ext'
+  spec.add_dependency 'mruby-array-ext', :core => 'mruby-array-ext'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-hash-ext/mrblib/hash.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-hash-ext/mrblib/hash.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-hash-ext/mrblib/hash.rb	(revision 270)
@@ -0,0 +1,349 @@
+class Hash
+
+  #  ISO does not define Hash#each_pair, so each_pair is defined in gem.
+  alias each_pair each
+
+  ##
+  # call-seq:
+  #     Hash[ key, value, ... ] -> new_hash
+  #     Hash[ [ [key, value], ... ] ] -> new_hash
+  #     Hash[ object ] -> new_hash
+  #
+  # Creates a new hash populated with the given objects.
+  #
+  # Similar to the literal `{ _key_ => _value_, ... }`. In the first
+  # form, keys and values occur in pairs, so there must be an even number of
+  # arguments.
+  #
+  # The second and third form take a single argument which is either an array
+  # of key-value pairs or an object convertible to a hash.
+  #
+  #     Hash["a", 100, "b", 200] #=> {"a"=>100, "b"=>200}
+  #     Hash[ [ ["a", 100], ["b", 200] ] ] #=> {"a"=>100, "b"=>200}
+  #     Hash["a" => 100, "b" => 200] #=> {"a"=>100, "b"=>200}
+  #
+
+  def self.[](*object)
+    length = object.length
+    if length == 1
+      o = object[0]
+      if o.respond_to?(:to_hash)
+        h = Hash.new
+        object[0].to_hash.each { |k, v| h[k] = v }
+        return h
+      elsif o.respond_to?(:to_a)
+        h = Hash.new
+        o.to_a.each do |i|
+          raise ArgumentError, "wrong element type #{i.class} (expected array)" unless i.respond_to?(:to_a)
+          k, v = nil
+          case i.size
+          when 2
+            k = i[0]
+            v = i[1]
+          when 1
+            k = i[0]
+          else
+            raise ArgumentError, "invalid number of elements (#{i.size} for 1..2)"
+          end
+          h[k] = v
+        end
+        return h
+      end
+    end
+    unless length % 2 == 0
+      raise ArgumentError, 'odd number of arguments for Hash'
+    end
+    h = Hash.new
+    0.step(length - 2, 2) do |i|
+      h[object[i]] = object[i + 1]
+    end
+    h
+  end
+
+  ##
+  # call-seq:
+  #     hsh.merge!(other_hash)                                 -> hsh
+  #     hsh.merge!(other_hash){|key, oldval, newval| block}    -> hsh
+  #
+  #  Adds the contents of _other_hash_ to _hsh_.  If no block is specified,
+  #  entries with duplicate keys are overwritten with the values from
+  #  _other_hash_, otherwise the value of each duplicate key is determined by
+  #  calling the block with the key, its value in _hsh_ and its value in
+  #  _other_hash_.
+  #
+  #     h1 = { "a" => 100, "b" => 200 }
+  #     h2 = { "b" => 254, "c" => 300 }
+  #     h1.merge!(h2)   #=> {"a"=>100, "b"=>254, "c"=>300}
+  #
+  #     h1 = { "a" => 100, "b" => 200 }
+  #     h2 = { "b" => 254, "c" => 300 }
+  #     h1.merge!(h2) { |key, v1, v2| v1 }
+  #                     #=> {"a"=>100, "b"=>200, "c"=>300}
+  #
+
+  def merge!(other, &block)
+    raise TypeError, "can't convert argument into Hash" unless other.respond_to?(:to_hash)
+    if block
+      other.each_key{|k|
+        self[k] = (self.has_key?(k))? block.call(k, self[k], other[k]): other[k]
+      }
+    else
+      other.each_key{|k| self[k] = other[k]}
+    end
+    self
+  end
+
+  alias update merge!
+
+  ##
+  #  call-seq:
+  #     hsh.fetch(key [, default] )       -> obj
+  #     hsh.fetch(key) {| key | block }   -> obj
+  #
+  #  Returns a value from the hash for the given key. If the key can't be
+  #  found, there are several options: With no other arguments, it will
+  #  raise an <code>KeyError</code> exception; if <i>default</i> is
+  #  given, then that will be returned; if the optional code block is
+  #  specified, then that will be run and its result returned.
+  #
+  #     h = { "a" => 100, "b" => 200 }
+  #     h.fetch("a")                            #=> 100
+  #     h.fetch("z", "go fish")                 #=> "go fish"
+  #     h.fetch("z") { |el| "go fish, #{el}"}   #=> "go fish, z"
+  #
+  #  The following example shows that an exception is raised if the key
+  #  is not found and a default value is not supplied.
+  #
+  #     h = { "a" => 100, "b" => 200 }
+  #     h.fetch("z")
+  #
+  #  <em>produces:</em>
+  #
+  #     prog.rb:2:in 'fetch': key not found (KeyError)
+  #      from prog.rb:2
+  #
+
+  def fetch(key, none=NONE, &block)
+    unless self.key?(key)
+      if block
+        block.call(key)
+      elsif none != NONE
+        none
+      else
+        raise KeyError, "Key not found: #{key}"
+      end
+    else
+      self[key]
+    end
+  end
+
+  ##
+  #  call-seq:
+  #     hsh.delete_if {| key, value | block }  -> hsh
+  #     hsh.delete_if                          -> an_enumerator
+  #
+  #  Deletes every key-value pair from <i>hsh</i> for which <i>block</i>
+  #  evaluates to <code>true</code>.
+  #
+  #  If no block is given, an enumerator is returned instead.
+  #
+  #     h = { "a" => 100, "b" => 200, "c" => 300 }
+  #     h.delete_if {|key, value| key >= "b" }   #=> {"a"=>100}
+  #
+
+  def delete_if(&block)
+    return to_enum :delete_if unless block_given?
+
+    self.each do |k, v|
+      self.delete(k) if block.call(k, v)
+    end
+    self
+  end
+
+  ##
+  #  call-seq:
+  #     hash.flatten -> an_array
+  #     hash.flatten(level) -> an_array
+  #
+  #  Returns a new array that is a one-dimensional flattening of this
+  #  hash. That is, for every key or value that is an array, extract
+  #  its elements into the new array.  Unlike Array#flatten, this
+  #  method does not flatten recursively by default.  The optional
+  #  <i>level</i> argument determines the level of recursion to flatten.
+  #
+  #     a =  {1=> "one", 2 => [2,"two"], 3 => "three"}
+  #     a.flatten    # => [1, "one", 2, [2, "two"], 3, "three"]
+  #     a.flatten(2) # => [1, "one", 2, 2, "two", 3, "three"]
+  #
+
+  def flatten(level=1)
+    self.to_a.flatten(level)
+  end
+
+  ##
+  #  call-seq:
+  #     hsh.invert -> new_hash
+  #
+  #  Returns a new hash created by using <i>hsh</i>'s values as keys, and
+  #  the keys as values.
+  #
+  #     h = { "n" => 100, "m" => 100, "y" => 300, "d" => 200, "a" => 0 }
+  #     h.invert   #=> {0=>"a", 100=>"m", 200=>"d", 300=>"y"}
+  #
+
+  def invert
+    h = Hash.new
+    self.each {|k, v| h[v] = k }
+    h
+  end
+
+  ##
+  #  call-seq:
+  #     hsh.keep_if {| key, value | block }  -> hsh
+  #     hsh.keep_if                          -> an_enumerator
+  #
+  #  Deletes every key-value pair from <i>hsh</i> for which <i>block</i>
+  #  evaluates to false.
+  #
+  #  If no block is given, an enumerator is returned instead.
+  #
+
+  def keep_if(&block)
+    return to_enum :keep_if unless block_given?
+
+    keys = []
+    self.each do |k, v|
+      unless block.call([k, v])
+        self.delete(k)
+      end
+    end
+    self
+  end
+
+  ##
+  #  call-seq:
+  #     hsh.key(value)    -> key
+  #
+  #  Returns the key of an occurrence of a given value. If the value is
+  #  not found, returns <code>nil</code>.
+  #
+  #     h = { "a" => 100, "b" => 200, "c" => 300, "d" => 300 }
+  #     h.key(200)   #=> "b"
+  #     h.key(300)   #=> "c"
+  #     h.key(999)   #=> nil
+  #
+
+  def key(val)
+    self.each do |k, v|
+      return k if v == val
+    end
+    nil
+  end
+
+  ##
+  #  call-seq:
+  #     hsh.to_h     -> hsh or new_hash
+  #
+  #  Returns +self+. If called on a subclass of Hash, converts
+  #  the receiver to a Hash object.
+  #
+  def to_h
+    self
+  end
+
+  ##
+  #  call-seq:
+  #    hash < other -> true or false
+  #
+  #  Returns <code>true</code> if <i>hash</i> is subset of
+  #  <i>other</i>.
+  #
+  #     h1 = {a:1, b:2}
+  #     h2 = {a:1, b:2, c:3}
+  #     h1 < h2    #=> true
+  #     h2 < h1    #=> false
+  #     h1 < h1    #=> false
+  #
+  def <(hash)
+    begin
+      hash = hash.to_hash
+    rescue NoMethodError
+      raise TypeError, "can't convert #{hash.class} to Hash"
+    end
+    size < hash.size and all? {|key, val|
+      hash.key?(key) and hash[key] == val
+    }
+  end
+
+  ##
+  #  call-seq:
+  #    hash <= other -> true or false
+  #
+  #  Returns <code>true</code> if <i>hash</i> is subset of
+  #  <i>other</i> or equals to <i>other</i>.
+  #
+  #     h1 = {a:1, b:2}
+  #     h2 = {a:1, b:2, c:3}
+  #     h1 <= h2   #=> true
+  #     h2 <= h1   #=> false
+  #     h1 <= h1   #=> true
+  #
+  def <=(hash)
+    begin
+      hash = hash.to_hash
+    rescue NoMethodError
+      raise TypeError, "can't convert #{hash.class} to Hash"
+    end
+    size <= hash.size and all? {|key, val|
+      hash.key?(key) and hash[key] == val
+    }
+  end
+
+  ##
+  #  call-seq:
+  #    hash > other -> true or false
+  #
+  #  Returns <code>true</code> if <i>other</i> is subset of
+  #  <i>hash</i>.
+  #
+  #     h1 = {a:1, b:2}
+  #     h2 = {a:1, b:2, c:3}
+  #     h1 > h2    #=> false
+  #     h2 > h1    #=> true
+  #     h1 > h1    #=> false
+  #
+  def >(hash)
+    begin
+      hash = hash.to_hash
+    rescue NoMethodError
+      raise TypeError, "can't convert #{hash.class} to Hash"
+    end
+    size > hash.size and hash.all? {|key, val|
+      key?(key) and self[key] == val
+    }
+  end
+
+  ##
+  #  call-seq:
+  #    hash >= other -> true or false
+  #
+  #  Returns <code>true</code> if <i>other</i> is subset of
+  #  <i>hash</i> or equals to <i>hash</i>.
+  #
+  #     h1 = {a:1, b:2}
+  #     h2 = {a:1, b:2, c:3}
+  #     h1 >= h2   #=> false
+  #     h2 >= h1   #=> true
+  #     h1 >= h1   #=> true
+  #
+  def >=(hash)
+    begin
+      hash = hash.to_hash
+    rescue NoMethodError
+      raise TypeError, "can't convert #{hash.class} to Hash"
+    end
+    size >= hash.size and hash.all? {|key, val|
+      key?(key) and self[key] == val
+    }
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-hash-ext/src/hash-ext.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-hash-ext/src/hash-ext.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-hash-ext/src/hash-ext.c	(revision 270)
@@ -0,0 +1,51 @@
+/*
+** hash.c - Hash class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+#include "mruby/array.h"
+#include "mruby/hash.h"
+
+/*
+ * call-seq:
+ *   hsh.values_at(key, ...)   -> array
+ *
+ * Return an array containing the values associated with the given keys.
+ * Also see <code>Hash.select</code>.
+ *
+ *   h = { "cat" => "feline", "dog" => "canine", "cow" => "bovine" }
+ *   h.values_at("cow", "cat")  #=> ["bovine", "feline"]
+ */
+
+static mrb_value
+hash_values_at(mrb_state *mrb, mrb_value hash)
+{
+  mrb_value *argv, result;
+  mrb_int argc, i;
+  int ai;
+
+  mrb_get_args(mrb, "*", &argv, &argc);
+  result = mrb_ary_new_capa(mrb, argc);
+  ai = mrb_gc_arena_save(mrb);
+  for (i = 0; i < argc; i++) {
+    mrb_ary_push(mrb, result, mrb_hash_get(mrb, hash, argv[i]));
+    mrb_gc_arena_restore(mrb, ai);
+  }
+  return result;
+}
+
+void
+mrb_mruby_hash_ext_gem_init(mrb_state *mrb)
+{
+  struct RClass *h;
+
+  h = mrb->hash_class;
+  mrb_define_method(mrb, h, "values_at", hash_values_at, MRB_ARGS_ANY());
+}
+
+void
+mrb_mruby_hash_ext_gem_final(mrb_state *mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-hash-ext/test/hash.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-hash-ext/test/hash.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-hash-ext/test/hash.rb	(revision 270)
@@ -0,0 +1,232 @@
+##
+# Hash(Ext) Test
+
+assert('Hash.[] Hash') do
+  a = Hash['a_key' => 'a_value']
+
+  assert_equal({'a_key' => 'a_value'}, a)
+end
+
+assert('Hash.[] [ [ ["b_key", "b_value" ] ] ]') do
+  a = Hash[ [ ['b_key', 'b_value'] ] ]
+
+  assert_equal({'b_key' => 'b_value'}, a)
+
+  a = Hash[ [ ] ]
+
+  assert_equal({}, a)
+
+  assert_raise(ArgumentError) do
+    Hash[ [ ['b_key', 'b_value', 'b_over'] ] ]
+  end
+
+  assert_raise(ArgumentError) do
+    Hash[ [ [] ] ]
+  end
+end
+
+assert('Hash.[] "c_key", "c_value"') do
+  a = Hash['c_key', 'c_value', 'd_key', 1]
+
+  assert_equal({'c_key' => 'c_value', 'd_key' => 1}, a)
+
+  a = Hash[]
+
+  assert_equal({}, a)
+
+  assert_raise(ArgumentError) do
+    Hash['d_key']
+  end
+end
+
+assert('Hash#merge!') do
+  a = { 'abc_key' => 'abc_value', 'cba_key' => 'cba_value' }
+  b = { 'cba_key' => 'XXX',  'xyz_key' => 'xyz_value' }
+
+  result_1 = a.merge! b
+
+  a = { 'abc_key' => 'abc_value', 'cba_key' => 'cba_value' }
+  result_2 = a.merge!(b) do |key, original, new|
+    original
+  end
+
+  assert_equal({'abc_key' => 'abc_value', 'cba_key' => 'XXX',
+               'xyz_key' => 'xyz_value' }, result_1)
+  assert_equal({'abc_key' => 'abc_value', 'cba_key' => 'cba_value',
+               'xyz_key' => 'xyz_value' }, result_2)
+
+  assert_raise(TypeError) do
+    { 'abc_key' => 'abc_value' }.merge! "a"
+  end
+end
+
+assert('Hash#values_at') do
+  h = { "cat" => "feline", "dog" => "canine", "cow" => "bovine" }
+  assert_equal ["bovine", "feline"], h.values_at("cow", "cat")
+
+  keys = []
+  (0...1000).each { |v| keys.push "#{v}" }
+  h = Hash.new { |hash,k| hash[k] = k }
+  assert_equal keys, h.values_at(*keys)
+end
+
+assert('Hash#fetch') do
+  h = { "cat" => "feline", "dog" => "canine", "cow" => "bovine" }
+  assert_equal "feline", h.fetch("cat")
+  assert_equal "mickey", h.fetch("mouse", "mickey")
+  assert_equal "minny", h.fetch("mouse"){"minny"}
+  assert_equal "mouse", h.fetch("mouse"){|k| k}
+  assert_raise(KeyError) do
+    h.fetch("gnu")
+  end
+end
+
+assert("Hash#delete_if") do
+  base = { 1 => 'one', 2 => false, true => 'true', 'cat' => 99 }
+  h1   = { 1 => 'one', 2 => false, true => 'true' }
+  h2   = { 2 => false, 'cat' => 99 }
+  h3   = { 2 => false }
+
+  h = base.dup
+  assert_equal(h, h.delete_if { false })
+  assert_equal({}, h.delete_if { true })
+
+  h = base.dup
+  assert_equal(h1, h.delete_if {|k,v| k.instance_of?(String) })
+  assert_equal(h1, h)
+
+  h = base.dup
+  assert_equal(h2, h.delete_if {|k,v| v.instance_of?(String) })
+  assert_equal(h2, h)
+
+  h = base.dup
+  assert_equal(h3, h.delete_if {|k,v| v })
+  assert_equal(h3, h)
+
+  h = base.dup
+  n = 0
+  h.delete_if {|*a|
+    n += 1
+    assert_equal(2, a.size)
+    assert_equal(base[a[0]], a[1])
+    h.shift
+    true
+  }
+  assert_equal(base.size, n)
+end
+
+assert("Hash#flatten") do
+  a =  {1=> "one", 2 => [2,"two"], 3 => [3, ["three"]]}
+  assert_equal [1, "one", 2, [2, "two"], 3, [3, ["three"]]], a.flatten
+  assert_equal [[1, "one"], [2, [2, "two"]], [3, [3, ["three"]]]], a.flatten(0)
+  assert_equal [1, "one", 2, [2, "two"], 3, [3, ["three"]]], a.flatten(1)
+  assert_equal [1, "one", 2, 2, "two", 3, 3, ["three"]], a.flatten(2)
+  assert_equal [1, "one", 2, 2, "two", 3, 3, "three"], a.flatten(3)
+end
+
+assert("Hash#invert") do
+  h = { 1 => 'one', 2 => 'two', 3 => 'three',
+        true => 'true', nil => 'nil' }.invert
+  assert_equal 1, h['one']
+  assert_equal true, h['true']
+  assert_equal nil, h['nil']
+
+  h = { 'a' => 1, 'b' => 2, 'c' => 1 }.invert
+  assert_equal(2, h.length)
+  assert_include(%w[a c], h[1])
+  assert_equal('b', h[2])
+end
+
+assert("Hash#keep_if") do
+  h = { 1 => 2, 3 => 4, 5 => 6 }
+  assert_equal({3=>4,5=>6}, h.keep_if {|k, v| k + v >= 7 })
+  h = { 1 => 2, 3 => 4, 5 => 6 }
+  assert_equal({ 1 => 2, 3=> 4, 5 =>6} , h.keep_if { true })
+end
+
+assert("Hash#key") do
+  h = { "a" => 100, "b" => 200, "c" => 300, "d" => 300, nil => 'nil', 'nil' => nil }
+  assert_equal "b", h.key(200)
+  assert_equal "c", h.key(300)
+  assert_nil h.key(999)
+  assert_nil h.key('nil')
+  assert_equal 'nil', h.key(nil)
+end
+
+assert("Hash#to_h") do
+  h = { "a" => 100, "b" => 200 }
+  assert_equal Hash, h.to_h.class
+  assert_equal h, h.to_h
+end
+
+assert('Hash#<') do
+  h1 = {a:1, b:2}
+  h2 = {a:1, b:2, c:3}
+
+  assert_false(h1 < h1)
+  assert_true(h1 < h2)
+  assert_false(h2 < h1)
+  assert_false(h2 < h2)
+
+  h1 = {a:1}
+  h2 = {a:2}
+
+  assert_false(h1 < h1)
+  assert_false(h1 < h2)
+  assert_false(h2 < h1)
+  assert_false(h2 < h2)
+end
+
+assert('Hash#<=') do
+  h1 = {a:1, b:2}
+  h2 = {a:1, b:2, c:3}
+
+  assert_true(h1 <= h1)
+  assert_true(h1 <= h2)
+  assert_false(h2 <= h1)
+  assert_true(h2 <= h2)
+
+  h1 = {a:1}
+  h2 = {a:2}
+
+  assert_true(h1 <= h1)
+  assert_false(h1 <= h2)
+  assert_false(h2 <= h1)
+  assert_true(h2 <= h2)
+end
+
+assert('Hash#>=') do
+  h1 = {a:1, b:2}
+  h2 = {a:1, b:2, c:3}
+
+  assert_true(h1 >= h1)
+  assert_false(h1 >= h2)
+  assert_true(h2 >= h1)
+  assert_true(h2 >= h2)
+
+  h1 = {a:1}
+  h2 = {a:2}
+
+  assert_true(h1 >= h1)
+  assert_false(h1 >= h2)
+  assert_false(h2 >= h1)
+  assert_true(h2 >= h2)
+end
+
+assert('Hash#>') do
+  h1 = {a:1, b:2}
+  h2 = {a:1, b:2, c:3}
+
+  assert_false(h1 > h1)
+  assert_false(h1 > h2)
+  assert_true(h2 > h1)
+  assert_false(h2 > h2)
+
+  h1 = {a:1}
+  h2 = {a:2}
+
+  assert_false(h1 > h1)
+  assert_false(h1 > h2)
+  assert_false(h2 > h1)
+  assert_false(h2 > h2)
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-kernel-ext/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-kernel-ext/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-kernel-ext/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-kernel-ext') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'Kernel module extension'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-kernel-ext/src/kernel.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-kernel-ext/src/kernel.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-kernel-ext/src/kernel.c	(revision 270)
@@ -0,0 +1,184 @@
+#include "mruby.h"
+#include "mruby/error.h"
+#include "mruby/array.h"
+#include "mruby/hash.h"
+
+/*
+ *  call-seq:
+ *     __method__         -> symbol
+ *
+ *  Returns the name at the definition of the current method as a
+ *  Symbol.
+ *  If called outside of a method, it returns <code>nil</code>.
+ *
+ */
+static mrb_value
+mrb_f_method(mrb_state *mrb, mrb_value self)
+{
+  mrb_callinfo *ci = mrb->c->ci;
+  ci--;
+  if (ci->mid)
+    return mrb_symbol_value(ci->mid);
+  else
+    return mrb_nil_value();
+}
+
+/*
+ *  call-seq:
+ *     Integer(arg,base=0)    -> integer
+ *
+ *  Converts <i>arg</i> to a <code>Fixnum</code>.
+ *  Numeric types are converted directly (with floating point numbers
+ *  being truncated).    <i>base</i> (0, or between 2 and 36) is a base for
+ *  integer string representation.  If <i>arg</i> is a <code>String</code>,
+ *  when <i>base</i> is omitted or equals to zero, radix indicators
+ *  (<code>0</code>, <code>0b</code>, and <code>0x</code>) are honored.
+ *  In any case, strings should be strictly conformed to numeric
+ *  representation. This behavior is different from that of
+ *  <code>String#to_i</code>.  Non string values will be converted using
+ *  <code>to_int</code>, and <code>to_i</code>. Passing <code>nil</code>
+ *  raises a TypeError.
+ *
+ *     Integer(123.999)    #=> 123
+ *     Integer("0x1a")     #=> 26
+ *     Integer(Time.new)   #=> 1204973019
+ *     Integer("0930", 10) #=> 930
+ *     Integer("111", 2)   #=> 7
+ *     Integer(nil)        #=> TypeError
+ */
+static mrb_value
+mrb_f_integer(mrb_state *mrb, mrb_value self)
+{
+  mrb_value arg;
+  mrb_int base = 0;
+
+  mrb_get_args(mrb, "o|i", &arg, &base);
+  return mrb_convert_to_integer(mrb, arg, base);
+}
+
+/*
+ *  call-seq:
+ *     Float(arg)    -> float
+ *
+ *  Returns <i>arg</i> converted to a float. Numeric types are converted
+ *  directly, the rest are converted using <i>arg</i>.to_f. 
+ *
+ *     Float(1)           #=> 1.0
+ *     Float(123.456)     #=> 123.456
+ *     Float("123.456")   #=> 123.456
+ *     Float(nil)         #=> TypeError
+ */
+static mrb_value
+mrb_f_float(mrb_state *mrb, mrb_value self)
+{
+  mrb_value arg;
+
+  mrb_get_args(mrb, "o", &arg);
+  return mrb_Float(mrb, arg);
+}
+
+/*
+ *  call-seq:
+ *     String(arg)   -> string
+ *
+ *  Returns <i>arg</i> as an <code>String</code>.
+ *
+ *  First tries to call its <code>to_str</code> method, then its to_s method.
+ *
+ *     String(self)        #=> "main"
+ *     String(self.class)  #=> "Object"
+ *     String(123456)      #=> "123456"
+ */
+static mrb_value
+mrb_f_string(mrb_state *mrb, mrb_value self)
+{
+  mrb_value arg, tmp;
+
+  mrb_get_args(mrb, "o", &arg);
+  tmp = mrb_check_convert_type(mrb, arg, MRB_TT_STRING, "String", "to_str");
+  if (mrb_nil_p(tmp)) {
+    tmp = mrb_check_convert_type(mrb, arg, MRB_TT_STRING, "String", "to_s");
+  }
+  return tmp;
+}
+
+/*
+ *  call-seq:
+ *     Array(arg)    -> array
+ *
+ *  Returns +arg+ as an Array.
+ *
+ *  First tries to call Array#to_ary on +arg+, then Array#to_a.
+ *
+ *     Array(1..5)   #=> [1, 2, 3, 4, 5]
+ *
+ */
+static mrb_value
+mrb_f_array(mrb_state *mrb, mrb_value self)
+{
+  mrb_value arg, tmp;
+
+  mrb_get_args(mrb, "o", &arg);
+  tmp = mrb_check_convert_type(mrb, arg, MRB_TT_ARRAY, "Array", "to_ary");
+  if (mrb_nil_p(tmp)) {
+    tmp = mrb_check_convert_type(mrb, arg, MRB_TT_ARRAY, "Array", "to_a");
+  }
+  if (mrb_nil_p(tmp)) {
+    return mrb_ary_new_from_values(mrb, 1, &arg);
+  }
+
+  return tmp;
+}
+
+/*
+ *  call-seq:
+ *     Hash(arg)    -> hash
+ *
+ *  Converts <i>arg</i> to a <code>Hash</code> by calling
+ *  <i>arg</i><code>.to_hash</code>. Returns an empty <code>Hash</code> when
+ *  <i>arg</i> is <tt>nil</tt> or <tt>[]</tt>.
+ *
+ *      Hash([])          #=> {}
+ *      Hash(nil)         #=> {}
+ *      Hash(key: :value) #=> {:key => :value}
+ *      Hash([1, 2, 3])   #=> TypeError
+ *
+ */
+static mrb_value
+mrb_f_hash(mrb_state *mrb, mrb_value self)
+{
+  mrb_value arg, tmp;
+
+  mrb_get_args(mrb, "o", &arg);
+  if (mrb_nil_p(arg)) {
+    return mrb_hash_new(mrb);
+  }
+  tmp = mrb_check_convert_type(mrb, arg, MRB_TT_HASH, "Hash", "to_hash");
+  if (mrb_nil_p(tmp)) {
+    if (mrb_array_p(arg) && RARRAY_LEN(arg) == 0) {
+      return mrb_hash_new(mrb);
+    }
+    mrb_raisef(mrb, E_TYPE_ERROR, "can't convert %S into Hash",
+      mrb_str_new_cstr(mrb, mrb_obj_classname(mrb, arg)));
+  }
+  return tmp;
+}
+
+void
+mrb_mruby_kernel_ext_gem_init(mrb_state *mrb)
+{
+  struct RClass *krn = mrb->kernel_module;
+
+  mrb_define_module_function(mrb, krn, "fail", mrb_f_raise, MRB_ARGS_OPT(2));
+  mrb_define_method(mrb, krn, "__method__", mrb_f_method, MRB_ARGS_NONE());
+  mrb_define_module_function(mrb, krn, "Integer", mrb_f_integer, MRB_ARGS_ANY());
+  mrb_define_module_function(mrb, krn, "Float", mrb_f_float, MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, krn, "String", mrb_f_string, MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, krn, "Array", mrb_f_array, MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, krn, "Hash", mrb_f_hash, MRB_ARGS_REQ(1));
+}
+
+void
+mrb_mruby_kernel_ext_gem_final(mrb_state *mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-kernel-ext/test/kernel.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-kernel-ext/test/kernel.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-kernel-ext/test/kernel.rb	(revision 270)
@@ -0,0 +1,53 @@
+assert('Kernel.fail, Kernel#fail') do
+  assert_raise(RuntimeError) { fail }
+  assert_raise(RuntimeError) { Kernel.fail }
+end
+
+assert('Kernel#__method__') do
+  assert_equal(:m, Class.new {def m; __method__; end}.new.m)
+  assert_equal(:m, Class.new {define_method(:m) {__method__}}.new.m)
+  c = Class.new do
+    [:m1, :m2].each do |m|
+      define_method(m) do
+        __method__
+      end
+    end
+  end
+  assert_equal(:m1, c.new.m1)
+  assert_equal(:m2, c.new.m2)
+end
+
+assert('Kernel#Integer') do
+  assert_equal(123, Integer(123.999))
+  assert_equal(26, Integer("0x1a"))
+  assert_equal(930, Integer("0930", 10))
+  assert_equal(7, Integer("111", 2))
+  assert_raise(TypeError) { Integer(nil) }
+end
+
+assert('Kernel#Float') do
+  assert_equal(1.0, Float(1))
+  assert_equal(123.456, Float(123.456))
+  assert_equal(123.456, Float("123.456"))
+  assert_raise(TypeError) { Float(nil) }
+end
+
+assert('Kernel#String') do
+  assert_equal("main", String(self))
+  assert_equal("Object", String(self.class))
+  assert_equal("123456", String(123456))
+end
+
+assert('Kernel#Array') do
+  assert_equal([1], Kernel.Array(1))
+  assert_equal([1, 2, 3, 4, 5], Kernel.Array([1, 2, 3, 4, 5]))
+  assert_equal([1, 2, 3, 4, 5], Kernel.Array(1..5))
+  assert_equal([[:a, 1], [:b, 2], [:c, 3]], Kernel.Array({a:1, b:2, c:3}))
+end
+
+assert('Kernel#Hash') do
+  assert_equal({}, Hash([]))
+  assert_equal({}, Hash(nil))
+  assert_equal({:key => :value}, Hash(key: :value))
+  assert_raise(TypeError) { Hash([1, 2, 3]) }
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-math/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-math/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-math/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-math') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'standard Math module'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-math/src/math.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-math/src/math.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-math/src/math.c	(revision 270)
@@ -0,0 +1,783 @@
+/*
+** math.c - Math module
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+#include "mruby/array.h"
+
+#include <math.h>
+
+static void
+domain_error(mrb_state *mrb, const char *func)
+{
+  struct RClass *math = mrb_module_get(mrb, "Math");
+  struct RClass *domainerror = mrb_class_get_under(mrb, math, "DomainError");
+  mrb_value str = mrb_str_new_cstr(mrb, func);
+  mrb_raisef(mrb, domainerror, "Numerical argument is out of domain - %S", str);
+}
+
+/* math functions not provided by Microsoft Visual C++ 2012 or older */
+#if defined _MSC_VER && _MSC_VER < 1800
+
+#include <float.h>
+
+#define MATH_TOLERANCE 1E-12
+
+double
+asinh(double x)
+{
+  double xa, ya, y;
+
+  /* Basic formula loses precision for x < 0, but asinh is an odd function */
+  xa = fabs(x);
+  if (xa > 3.16227E+18) {
+    /* Prevent x*x from overflowing; basic formula reduces to log(2*x) */
+    ya = log(xa) + 0.69314718055994530942;
+  }
+  else {
+    /* Basic formula for asinh */
+    ya = log(xa + sqrt(xa*xa + 1.0));
+  }
+
+  y = _copysign(ya, x);
+  return y;
+}
+
+double
+acosh(double x)
+{
+  double y;
+
+  if (x > 3.16227E+18) {
+    /* Prevent x*x from overflowing; basic formula reduces to log(2*x) */
+    y = log(x) + 0.69314718055994530942;
+  }
+  else {
+    /* Basic formula for acosh */
+    y = log(x + sqrt(x*x - 1.0));
+  }
+
+  return y;
+}
+
+double
+atanh(double x)
+{
+  double y;
+
+  if (fabs(x) < 1E-2) {
+    /* The sums 1+x and 1-x lose precision for small x.  Use the polynomial
+       instead. */
+    double x2 = x * x;
+    y = x*(1.0 + x2*(1.0/3.0 + x2*(1.0/5.0 + x2*(1.0/7.0))));
+  }
+  else {
+    /* Basic formula for atanh */
+    y = 0.5 * (log(1.0+x) - log(1.0-x));
+  }
+
+  return y;
+}
+
+double
+cbrt(double x)
+{
+  double xa, ya, y;
+
+  /* pow(x, y) is undefined for x < 0 and y not an integer, but cbrt is an
+     odd function */
+  xa = fabs(x);
+  ya = pow(xa, 1.0/3.0);
+  y = _copysign(ya, x);
+  return y;
+}
+
+/* Declaration of complementary Error function */
+double
+erfc(double x);
+
+/*
+** Implementations of error functions
+** credits to http://www.digitalmars.com/archives/cplusplus/3634.html
+*/
+
+/* Implementation of Error function */
+double
+erf(double x)
+{
+  static const double two_sqrtpi =  1.128379167095512574;
+  double sum  = x;
+  double term = x;
+  double xsqr = x*x;
+  int j= 1;
+  if (fabs(x) > 2.2) {
+    return 1.0 - erfc(x);
+  }
+  do {
+    term *= xsqr/j;
+    sum  -= term/(2*j+1);
+    ++j;
+    term *= xsqr/j;
+    sum  += term/(2*j+1);
+    ++j;
+  } while (fabs(term/sum) > MATH_TOLERANCE);
+  return two_sqrtpi*sum;
+}
+
+/* Implementation of complementary Error function */
+double
+erfc(double x)
+{
+  static const double one_sqrtpi=  0.564189583547756287;
+  double a = 1;
+  double b = x;
+  double c = x;
+  double d = x*x+0.5;
+  double q1;
+  double q2 = b/d;
+  double n = 1.0;
+  double t;
+  if (fabs(x) < 2.2) {
+    return 1.0 - erf(x);
+  }
+  if (x < 0.0) { /*signbit(x)*/
+    return 2.0 - erfc(-x);
+  }
+  do {
+    t  = a*n+b*x;
+    a  = b;
+    b  = t;
+    t  = c*n+d*x;
+    c  = d;
+    d  = t;
+    n += 0.5;
+    q1 = q2;
+    q2 = b/d;
+  } while (fabs(q1-q2)/q2 > MATH_TOLERANCE);
+  return one_sqrtpi*exp(-x*x)*q2;
+}
+
+#endif
+
+#if (defined _MSC_VER && _MSC_VER < 1800) || defined __ANDROID__ || (defined __FreeBSD__  &&  __FreeBSD_version < 803000)
+
+double
+log2(double x)
+{
+    return log10(x)/log10(2.0);
+}
+
+#endif
+
+/*
+  TRIGONOMETRIC FUNCTIONS
+*/
+
+/*
+ *  call-seq:
+ *     Math.sin(x)    -> float
+ *
+ *  Computes the sine of <i>x</i> (expressed in radians). Returns
+ *  -1..1.
+ */
+static mrb_value
+math_sin(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+  x = sin(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+/*
+ *  call-seq:
+ *     Math.cos(x)    -> float
+ *
+ *  Computes the cosine of <i>x</i> (expressed in radians). Returns
+ *  -1..1.
+ */
+static mrb_value
+math_cos(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+  x = cos(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+/*
+ *  call-seq:
+ *     Math.tan(x)    -> float
+ *
+ *  Returns the tangent of <i>x</i> (expressed in radians).
+ */
+static mrb_value
+math_tan(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+  x = tan(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+/*
+  INVERSE TRIGONOMETRIC FUNCTIONS
+*/
+
+/*
+ *  call-seq:
+ *     Math.asin(x)    -> float
+ *
+ *  Computes the arc sine of <i>x</i>.
+ *  @return computed value between `-(PI/2)` and `(PI/2)`.
+ */
+static mrb_value
+math_asin(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+  if (x < -1.0 || x > 1.0) {
+    domain_error(mrb, "asin");
+  }
+  x = asin(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+/*
+ *  call-seq:
+ *     Math.acos(x)    -> float
+ *
+ *  Computes the arc cosine of <i>x</i>. Returns 0..PI.
+ */
+static mrb_value
+math_acos(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+  if (x < -1.0 || x > 1.0) {
+    domain_error(mrb, "acos");
+  }
+  x = acos(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+/*
+ *  call-seq:
+ *     Math.atan(x)    -> float
+ *
+ *  Computes the arc tangent of <i>x</i>. Returns `-(PI/2) .. (PI/2)`.
+ */
+static mrb_value
+math_atan(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+  x = atan(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+/*
+ *  call-seq:
+ *     Math.atan2(y, x)  -> float
+ *
+ *  Computes the arc tangent given <i>y</i> and <i>x</i>. Returns
+ *  -PI..PI.
+ *
+ *    Math.atan2(-0.0, -1.0) #=> -3.141592653589793
+ *    Math.atan2(-1.0, -1.0) #=> -2.356194490192345
+ *    Math.atan2(-1.0, 0.0)  #=> -1.5707963267948966
+ *    Math.atan2(-1.0, 1.0)  #=> -0.7853981633974483
+ *    Math.atan2(-0.0, 1.0)  #=> -0.0
+ *    Math.atan2(0.0, 1.0)   #=> 0.0
+ *    Math.atan2(1.0, 1.0)   #=> 0.7853981633974483
+ *    Math.atan2(1.0, 0.0)   #=> 1.5707963267948966
+ *    Math.atan2(1.0, -1.0)  #=> 2.356194490192345
+ *    Math.atan2(0.0, -1.0)  #=> 3.141592653589793
+ *
+ */
+static mrb_value
+math_atan2(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x, y;
+
+  mrb_get_args(mrb, "ff", &x, &y);
+  x = atan2(x, y);
+
+  return mrb_float_value(mrb, x);
+}
+
+
+
+/*
+  HYPERBOLIC TRIG FUNCTIONS
+*/
+/*
+ *  call-seq:
+ *     Math.sinh(x)    -> float
+ *
+ *  Computes the hyperbolic sine of <i>x</i> (expressed in
+ *  radians).
+ */
+static mrb_value
+math_sinh(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+  x = sinh(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+/*
+ *  call-seq:
+ *     Math.cosh(x)    -> float
+ *
+ *  Computes the hyperbolic cosine of <i>x</i> (expressed in radians).
+ */
+static mrb_value
+math_cosh(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+  x = cosh(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+/*
+ *  call-seq:
+ *     Math.tanh()    -> float
+ *
+ *  Computes the hyperbolic tangent of <i>x</i> (expressed in
+ *  radians).
+ */
+static mrb_value
+math_tanh(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+  x = tanh(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+
+/*
+  INVERSE HYPERBOLIC TRIG FUNCTIONS
+*/
+
+/*
+ *  call-seq:
+ *     Math.asinh(x)    -> float
+ *
+ *  Computes the inverse hyperbolic sine of <i>x</i>.
+ */
+static mrb_value
+math_asinh(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+
+  x = asinh(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+/*
+ *  call-seq:
+ *     Math.acosh(x)    -> float
+ *
+ *  Computes the inverse hyperbolic cosine of <i>x</i>.
+ */
+static mrb_value
+math_acosh(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+  if (x < 1.0) {
+    domain_error(mrb, "acosh");
+  }
+  x = acosh(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+/*
+ *  call-seq:
+ *     Math.atanh(x)    -> float
+ *
+ *  Computes the inverse hyperbolic tangent of <i>x</i>.
+ */
+static mrb_value
+math_atanh(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+  if (x < -1.0 || x > 1.0) {
+    domain_error(mrb, "atanh");
+  }
+  x = atanh(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+/*
+  EXPONENTIALS AND LOGARITHMS
+*/
+
+/*
+ *  call-seq:
+ *     Math.exp(x)    -> float
+ *
+ *  Returns e**x.
+ *
+ *    Math.exp(0)       #=> 1.0
+ *    Math.exp(1)       #=> 2.718281828459045
+ *    Math.exp(1.5)     #=> 4.4816890703380645
+ *
+ */
+static mrb_value
+math_exp(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+  x = exp(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+/*
+ *  call-seq:
+ *     Math.log(numeric)    -> float
+ *     Math.log(num,base)   -> float
+ *
+ *  Returns the natural logarithm of <i>numeric</i>.
+ *  If additional second argument is given, it will be the base
+ *  of logarithm.
+ *
+ *    Math.log(1)          #=> 0.0
+ *    Math.log(Math::E)    #=> 1.0
+ *    Math.log(Math::E**3) #=> 3.0
+ *    Math.log(12,3)       #=> 2.2618595071429146
+ *
+ */
+static mrb_value
+math_log(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x, base;
+  int argc;
+
+  argc = mrb_get_args(mrb, "f|f", &x, &base);
+  if (x < 0.0) {
+    domain_error(mrb, "log");
+  }
+  x = log(x);
+  if (argc == 2) {
+    if (base < 0.0) {
+      domain_error(mrb, "log");
+    }
+    x /= log(base);
+  }
+  return mrb_float_value(mrb, x);
+}
+
+/*
+ *  call-seq:
+ *     Math.log2(numeric)    -> float
+ *
+ *  Returns the base 2 logarithm of <i>numeric</i>.
+ *
+ *    Math.log2(1)      #=> 0.0
+ *    Math.log2(2)      #=> 1.0
+ *    Math.log2(32768)  #=> 15.0
+ *    Math.log2(65536)  #=> 16.0
+ *
+ */
+static mrb_value
+math_log2(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+  if (x < 0.0) {
+    domain_error(mrb, "log2");
+  }
+  x = log2(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+/*
+ *  call-seq:
+ *     Math.log10(numeric)    -> float
+ *
+ *  Returns the base 10 logarithm of <i>numeric</i>.
+ *
+ *    Math.log10(1)       #=> 0.0
+ *    Math.log10(10)      #=> 1.0
+ *    Math.log10(10**100) #=> 100.0
+ *
+ */
+static mrb_value
+math_log10(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+  if (x < 0.0) {
+    domain_error(mrb, "log10");
+  }
+  x = log10(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+/*
+ *  call-seq:
+ *     Math.sqrt(numeric)    -> float
+ *
+ *  Returns the square root of <i>numeric</i>.
+ *
+ */
+static mrb_value
+math_sqrt(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+  if (x < 0.0) {
+    domain_error(mrb, "sqrt");
+  }
+  x = sqrt(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+
+/*
+ *  call-seq:
+ *     Math.cbrt(numeric)    -> float
+ *
+ *  Returns the cube root of <i>numeric</i>.
+ *
+ *    -9.upto(9) {|x|
+ *      p [x, Math.cbrt(x), Math.cbrt(x)**3]
+ *    }
+ *    #=>
+ *    [-9, -2.0800838230519, -9.0]
+ *    [-8, -2.0, -8.0]
+ *    [-7, -1.91293118277239, -7.0]
+ *    [-6, -1.81712059283214, -6.0]
+ *    [-5, -1.7099759466767, -5.0]
+ *    [-4, -1.5874010519682, -4.0]
+ *    [-3, -1.44224957030741, -3.0]
+ *    [-2, -1.25992104989487, -2.0]
+ *    [-1, -1.0, -1.0]
+ *    [0, 0.0, 0.0]
+ *    [1, 1.0, 1.0]
+ *    [2, 1.25992104989487, 2.0]
+ *    [3, 1.44224957030741, 3.0]
+ *    [4, 1.5874010519682, 4.0]
+ *    [5, 1.7099759466767, 5.0]
+ *    [6, 1.81712059283214, 6.0]
+ *    [7, 1.91293118277239, 7.0]
+ *    [8, 2.0, 8.0]
+ *    [9, 2.0800838230519, 9.0]
+ *
+ */
+static mrb_value
+math_cbrt(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+  x = cbrt(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+
+/*
+ *  call-seq:
+ *     Math.frexp(numeric)    -> [ fraction, exponent ]
+ *
+ *  Returns a two-element array containing the normalized fraction (a
+ *  <code>Float</code>) and exponent (a <code>Fixnum</code>) of
+ *  <i>numeric</i>.
+ *
+ *     fraction, exponent = Math.frexp(1234)   #=> [0.6025390625, 11]
+ *     fraction * 2**exponent                  #=> 1234.0
+ */
+static mrb_value
+math_frexp(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+  int exp;
+
+  mrb_get_args(mrb, "f", &x);
+  x = frexp(x, &exp);
+
+  return mrb_assoc_new(mrb, mrb_float_value(mrb, x), mrb_fixnum_value(exp));
+}
+
+/*
+ *  call-seq:
+ *     Math.ldexp(flt, int) -> float
+ *
+ *  Returns the value of <i>flt</i>*(2**<i>int</i>).
+ *
+ *     fraction, exponent = Math.frexp(1234)
+ *     Math.ldexp(fraction, exponent)   #=> 1234.0
+ */
+static mrb_value
+math_ldexp(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+  mrb_int   i;
+
+  mrb_get_args(mrb, "fi", &x, &i);
+  x = ldexp(x, i);
+
+  return mrb_float_value(mrb, x);
+}
+
+/*
+ *  call-seq:
+ *     Math.hypot(x, y)    -> float
+ *
+ *  Returns sqrt(x**2 + y**2), the hypotenuse of a right-angled triangle
+ *  with sides <i>x</i> and <i>y</i>.
+ *
+ *     Math.hypot(3, 4)   #=> 5.0
+ */
+static mrb_value
+math_hypot(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x, y;
+
+  mrb_get_args(mrb, "ff", &x, &y);
+  x = hypot(x, y);
+
+  return mrb_float_value(mrb, x);
+}
+
+/*
+ * call-seq:
+ *    Math.erf(x)  -> float
+ *
+ *  Calculates the error function of x.
+ */
+static mrb_value
+math_erf(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+  x = erf(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+
+/*
+ * call-seq:
+ *    Math.erfc(x)  -> float
+ *
+ *  Calculates the complementary error function of x.
+ */
+static mrb_value
+math_erfc(mrb_state *mrb, mrb_value obj)
+{
+  mrb_float x;
+
+  mrb_get_args(mrb, "f", &x);
+  x = erfc(x);
+
+  return mrb_float_value(mrb, x);
+}
+
+/* ------------------------------------------------------------------------*/
+void
+mrb_mruby_math_gem_init(mrb_state* mrb)
+{
+  struct RClass *mrb_math;
+  mrb_math = mrb_define_module(mrb, "Math");
+
+  mrb_define_class_under(mrb, mrb_math, "DomainError", mrb->eStandardError_class);
+
+#ifdef M_PI
+  mrb_define_const(mrb, mrb_math, "PI", mrb_float_value(mrb, M_PI));
+#else
+  mrb_define_const(mrb, mrb_math, "PI", mrb_float_value(mrb, atan(1.0)*4.0));
+#endif
+
+#ifdef M_E
+  mrb_define_const(mrb, mrb_math, "E", mrb_float_value(mrb, M_E));
+#else
+  mrb_define_const(mrb, mrb_math, "E", mrb_float_value(mrb, exp(1.0)));
+#endif
+
+#ifdef MRB_USE_FLOAT
+  mrb_define_const(mrb, mrb_math, "TOLERANCE", mrb_float_value(mrb, 1e-5));
+#else
+  mrb_define_const(mrb, mrb_math, "TOLERANCE", mrb_float_value(mrb, 1e-12));
+#endif
+
+  mrb_define_module_function(mrb, mrb_math, "sin", math_sin, MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, mrb_math, "cos", math_cos, MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, mrb_math, "tan", math_tan, MRB_ARGS_REQ(1));
+
+  mrb_define_module_function(mrb, mrb_math, "asin", math_asin, MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, mrb_math, "acos", math_acos, MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, mrb_math, "atan", math_atan, MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, mrb_math, "atan2", math_atan2, MRB_ARGS_REQ(2));
+
+  mrb_define_module_function(mrb, mrb_math, "sinh", math_sinh, MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, mrb_math, "cosh", math_cosh, MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, mrb_math, "tanh", math_tanh, MRB_ARGS_REQ(1));
+
+  mrb_define_module_function(mrb, mrb_math, "asinh", math_asinh, MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, mrb_math, "acosh", math_acosh, MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, mrb_math, "atanh", math_atanh, MRB_ARGS_REQ(1));
+
+  mrb_define_module_function(mrb, mrb_math, "exp", math_exp, MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, mrb_math, "log", math_log, MRB_ARGS_REQ(1)|MRB_ARGS_OPT(1));
+  mrb_define_module_function(mrb, mrb_math, "log2", math_log2, MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, mrb_math, "log10", math_log10, MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, mrb_math, "sqrt", math_sqrt, MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, mrb_math, "cbrt", math_cbrt, MRB_ARGS_REQ(1));
+
+  mrb_define_module_function(mrb, mrb_math, "frexp", math_frexp, MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, mrb_math, "ldexp", math_ldexp, MRB_ARGS_REQ(2));
+
+  mrb_define_module_function(mrb, mrb_math, "hypot", math_hypot, MRB_ARGS_REQ(2));
+
+  mrb_define_module_function(mrb, mrb_math, "erf",  math_erf,  MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, mrb_math, "erfc", math_erfc, MRB_ARGS_REQ(1));
+}
+
+void
+mrb_mruby_math_gem_final(mrb_state* mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-math/test/math.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-math/test/math.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-math/test/math.rb	(revision 270)
@@ -0,0 +1,152 @@
+##
+# Math Test
+
+##
+# Performs fuzzy check for equality on methods returning floats
+# on the basis of the Math::TOLERANCE constant.
+def check_float(a, b)
+  tolerance = Math::TOLERANCE
+  a = a.to_f
+  b = b.to_f
+  if a.finite? and b.finite?
+    (a-b).abs < tolerance
+  else
+    true
+  end
+end
+
+assert('Math.sin 0') do
+  check_float(Math.sin(0), 0)
+end
+
+assert('Math.sin PI/2') do
+  check_float(Math.sin(Math::PI / 2), 1)
+end
+
+assert('Math.cos 0') do
+  check_float(Math.cos(0), 1)
+end
+
+assert('Math.cos PI/2') do
+  check_float(Math.cos(Math::PI / 2), 0)
+end
+
+assert('Math.tan 0') do
+  check_float(Math.tan(0), 0)
+end
+
+assert('Math.tan PI/4') do
+  check_float(Math.tan(Math::PI / 4), 1)
+end
+
+assert('Fundamental trig identities') do
+  result = true
+  N = 13
+  N.times do |i|
+    a  = Math::PI / N * i
+    ca = Math::PI / 2 - a
+    s  = Math.sin(a)
+    c  = Math.cos(a)
+    t  = Math.tan(a)
+    result &= check_float(s, Math.cos(ca))
+    result &= check_float(t, 1 / Math.tan(ca))
+    result &= check_float(s ** 2 + c ** 2, 1)
+    result &= check_float(t ** 2 + 1, (1/c) ** 2)
+    result &= check_float((1/t) ** 2 + 1, (1/s) ** 2)
+  end
+  result
+end
+
+assert('Math.erf 0') do
+  check_float(Math.erf(0), 0)
+end
+
+assert('Math.exp 0') do
+  check_float(Math.exp(0), 1.0)
+end
+
+assert('Math.exp 1') do
+  check_float(Math.exp(1), 2.718281828459045)
+end
+
+assert('Math.exp 1.5') do
+  check_float(Math.exp(1.5), 4.4816890703380645)
+end
+
+assert('Math.log 1') do
+  check_float(Math.log(1), 0)
+end
+
+assert('Math.log E') do
+  check_float(Math.log(Math::E), 1.0)
+end
+
+assert('Math.log E**3') do
+  check_float(Math.log(Math::E**3), 3.0)
+end
+
+assert('Math.log2 1') do
+  check_float(Math.log2(1), 0.0)
+end
+
+assert('Math.log2 2') do
+  check_float(Math.log2(2), 1.0)
+end
+
+assert('Math.log10 1') do
+  check_float(Math.log10(1), 0.0)
+end
+
+assert('Math.log10 10') do
+  check_float(Math.log10(10), 1.0)
+end
+
+assert('Math.log10 10**100') do
+  check_float(Math.log10(10**100), 100.0)
+end
+
+assert('Math.sqrt') do
+  num = [0.0, 1.0, 2.0, 3.0, 4.0]
+  sqr = [0, 1, 4, 9, 16]
+  result = true
+  sqr.each_with_index do |v,i|
+    result &= check_float(Math.sqrt(v), num[i])
+  end
+  result
+end
+
+assert('Math.cbrt') do
+  num = [-2.0, -1.0, 0.0, 1.0, 2.0]
+  cub = [-8, -1, 0, 1, 8]
+  result = true
+  cub.each_with_index do |v,i|
+    result &= check_float(Math.cbrt(v), num[i])
+  end
+  result
+end
+
+assert('Math.hypot') do
+  check_float(Math.hypot(3, 4), 5.0)
+end
+
+assert('Math.frexp 1234') do
+  n = 1234
+  fraction, exponent = Math.frexp(n)
+  check_float(Math.ldexp(fraction, exponent), n)
+end
+
+assert('Math.erf 1') do
+  check_float(Math.erf(1), 0.842700792949715)
+end
+
+assert('Math.erfc 1') do
+  check_float(Math.erfc(1), 0.157299207050285)
+end
+
+assert('Math.erf -1') do
+  check_float(Math.erf(-1), -0.8427007929497148)
+end
+
+assert('Math.erfc -1') do
+  check_float(Math.erfc(-1), 1.8427007929497148)
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-numeric-ext/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-numeric-ext/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-numeric-ext/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-numeric-ext') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'Numeric class extension'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb	(revision 270)
@@ -0,0 +1,5 @@
+module Integral
+  def div(other)
+    self.divmod(other)[0]
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-numeric-ext/src/numeric_ext.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-numeric-ext/src/numeric_ext.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-numeric-ext/src/numeric_ext.c	(revision 270)
@@ -0,0 +1,30 @@
+#include <limits.h>
+#include "mruby.h"
+
+static mrb_value
+mrb_int_chr(mrb_state *mrb, mrb_value x)
+{
+  mrb_int chr;
+  char c;
+
+  chr = mrb_fixnum(x);
+  if (chr >= (1 << CHAR_BIT)) {
+    mrb_raisef(mrb, E_RANGE_ERROR, "%S out of char range", x);
+  }
+  c = (char)chr;
+
+  return mrb_str_new(mrb, &c, 1);
+}
+
+void
+mrb_mruby_numeric_ext_gem_init(mrb_state* mrb)
+{
+  struct RClass *i = mrb_class_get(mrb, "Integer");
+
+  mrb_define_method(mrb, i, "chr", mrb_int_chr, MRB_ARGS_NONE());
+}
+
+void
+mrb_mruby_numeric_ext_gem_final(mrb_state* mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-numeric-ext/test/numeric.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-numeric-ext/test/numeric.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-numeric-ext/test/numeric.rb	(revision 270)
@@ -0,0 +1,18 @@
+##
+# Numeric(Ext) Test
+
+assert('Integer#chr') do
+  assert_equal("A", 65.chr)
+  assert_equal("B", 0x42.chr)
+
+  # multibyte encoding (not support yet)
+  assert_raise(RangeError) { 256.chr }
+end
+
+assert('Integer#div') do
+  assert_equal 52, 365.div(7)
+end
+
+assert('Float#div') do
+  assert_float 52, 365.2425.div(7)
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-object-ext/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-object-ext/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-object-ext/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-object-ext') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'Object class extension'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-object-ext/mrblib/object.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-object-ext/mrblib/object.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-object-ext/mrblib/object.rb	(revision 270)
@@ -0,0 +1,19 @@
+class Object
+  ##
+  #  call-seq:
+  #     obj.tap{|x|...}    -> obj
+  #
+  #  Yields <code>x</code> to the block, and then returns <code>x</code>.
+  #  The primary purpose of this method is to "tap into" a method chain,
+  #  in order to perform operations on intermediate results within the chain.
+  #
+  #  (1..10)                .tap {|x| puts "original: #{x.inspect}"}
+  #    .to_a                .tap {|x| puts "array: #{x.inspect}"}
+  #    .select {|x| x%2==0} .tap {|x| puts "evens: #{x.inspect}"}
+  #    .map { |x| x*x }     .tap {|x| puts "squares: #{x.inspect}"}
+  #
+  def tap
+    yield self
+    self
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-object-ext/src/object.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-object-ext/src/object.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-object-ext/src/object.c	(revision 270)
@@ -0,0 +1,105 @@
+#include "mruby.h"
+#include "mruby/array.h"
+#include "mruby/class.h"
+
+/*
+ *  call-seq:
+ *     nil.to_a    -> []
+ *
+ *  Always returns an empty array.
+ */
+
+static mrb_value
+nil_to_a(mrb_state *mrb, mrb_value obj)
+{
+  return mrb_ary_new(mrb);
+}
+
+/*
+ *  call-seq:
+ *     nil.to_f    -> 0.0
+ *
+ *  Always returns zero.
+ */
+
+static mrb_value
+nil_to_f(mrb_state *mrb, mrb_value obj)
+{
+  return mrb_float_value(mrb, 0.0);
+}
+
+/*
+ *  call-seq:
+ *     nil.to_i    -> 0
+ *
+ *  Always returns zero.
+ */
+
+static mrb_value
+nil_to_i(mrb_state *mrb, mrb_value obj)
+{
+  return mrb_fixnum_value(0);
+}
+
+/*
+ *  call-seq:
+ *     obj.instance_exec(arg...) {|var...| block }                       -> obj
+ *
+ *  Executes the given block within the context of the receiver
+ *  (_obj_). In order to set the context, the variable +self+ is set
+ *  to _obj_ while the code is executing, giving the code access to
+ *  _obj_'s instance variables.  Arguments are passed as block parameters.
+ *
+ *     class KlassWithSecret
+ *       def initialize
+ *         @secret = 99
+ *       end
+ *     end
+ *     k = KlassWithSecret.new
+ *     k.instance_exec(5) {|x| @secret+x }   #=> 104
+ */
+
+static mrb_value
+mrb_obj_instance_exec(mrb_state *mrb, mrb_value self)
+{
+  mrb_value *argv;
+  mrb_int argc;
+  mrb_value blk;
+  struct RClass *c;
+
+  mrb_get_args(mrb, "*&", &argv, &argc, &blk);
+
+  if (mrb_nil_p(blk)) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "no block given");
+  }
+
+  switch (mrb_type(self)) {
+  case MRB_TT_SYMBOL:
+  case MRB_TT_FIXNUM:
+  case MRB_TT_FLOAT:
+    c = NULL;
+    break;
+  default:
+    c = mrb_class_ptr(mrb_singleton_class(mrb, self));
+    break;
+  }
+
+  return mrb_yield_with_class(mrb, blk, argc, argv, self, c);
+}
+
+void
+mrb_mruby_object_ext_gem_init(mrb_state* mrb)
+{
+  struct RClass * n = mrb->nil_class;
+
+  mrb_define_method(mrb, n, "to_a", nil_to_a,       MRB_ARGS_NONE());
+  mrb_define_method(mrb, n, "to_f", nil_to_f,       MRB_ARGS_NONE());
+  mrb_define_method(mrb, n, "to_i", nil_to_i,       MRB_ARGS_NONE());
+
+  mrb_define_method(mrb, mrb->object_class, "instance_exec", mrb_obj_instance_exec, MRB_ARGS_ANY() | MRB_ARGS_BLOCK());
+}
+
+void
+mrb_mruby_object_ext_gem_final(mrb_state* mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-object-ext/test/nil.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-object-ext/test/nil.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-object-ext/test/nil.rb	(revision 270)
@@ -0,0 +1,11 @@
+assert('NilClass#to_a') do
+  assert_equal [], nil.to_a
+end
+
+assert('NilClass#to_f') do
+  assert_equal 0.0, nil.to_f
+end
+
+assert('NilClass#to_i') do
+  assert_equal 0, nil.to_i
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-object-ext/test/object.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-object-ext/test/object.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-object-ext/test/object.rb	(revision 270)
@@ -0,0 +1,25 @@
+assert('Object#instance_exec') do
+  class KlassWithSecret
+    def initialize
+      @secret = 99
+    end
+  end
+  k = KlassWithSecret.new
+  assert_equal 104, k.instance_exec(5) {|x| @secret+x }
+end
+
+assert('Object#tap') do
+  ret = []
+  (1..10)                 .tap {|x| ret << "original: #{x.inspect}"}
+     .to_a                .tap {|x| ret << "array: #{x.inspect}"}
+     .select {|x| x%2==0} .tap {|x| ret << "evens: #{x.inspect}"}
+     .map { |x| x*x }     .tap {|x| ret << "squares: #{x.inspect}"}
+
+  assert_equal [
+    "original: 1..10",
+    "array: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]",
+    "evens: [2, 4, 6, 8, 10]",
+    "squares: [4, 16, 36, 64, 100]"
+  ], ret
+  assert_equal(:tap_ok, Class.new {def m; tap{return :tap_ok}; end}.new.m)
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-objectspace/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-objectspace/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-objectspace/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-objectspace') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'ObjectSpace class'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-objectspace/src/mruby_objectspace.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-objectspace/src/mruby_objectspace.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-objectspace/src/mruby_objectspace.c	(revision 270)
@@ -0,0 +1,185 @@
+#include "mruby.h"
+#include "mruby/gc.h"
+#include "mruby/hash.h"
+#include "mruby/class.h"
+
+struct os_count_struct {
+  mrb_int total;
+  mrb_int freed;
+  mrb_int counts[MRB_TT_MAXDEFINE+1];
+};
+
+static void
+os_count_object_type(mrb_state *mrb, struct RBasic *obj, void *data)
+{
+  struct os_count_struct *obj_count;
+  obj_count = (struct os_count_struct*)data;
+
+  obj_count->total++;
+
+  if (mrb_object_dead_p(mrb, obj)) {
+    obj_count->freed++;
+  }
+  else {
+    obj_count->counts[obj->tt]++;
+  }
+}
+
+/*
+ *  call-seq:
+ *     ObjectSpace.count_objects([result_hash]) -> hash
+ *
+ *  Counts objects for each type.
+ *
+ *  It returns a hash, such as:
+ *  {
+ *    :TOTAL=>10000,
+ *    :FREE=>3011,
+ *    :T_OBJECT=>6,
+ *    :T_CLASS=>404,
+ *    # ...
+ *  }
+ *
+ *  If the optional argument +result_hash+ is given,
+ *  it is overwritten and returned. This is intended to avoid probe effect.
+ *
+ */
+
+static mrb_value
+os_count_objects(mrb_state *mrb, mrb_value self)
+{
+  struct os_count_struct obj_count = { 0 };
+  enum mrb_vtype i;
+  mrb_value hash;
+
+  if (mrb_get_args(mrb, "|H", &hash) == 0) {
+    hash = mrb_hash_new(mrb);
+  }
+
+  if (!mrb_test(mrb_hash_empty_p(mrb, hash))) {
+    mrb_hash_clear(mrb, hash);
+  }
+
+  mrb_objspace_each_objects(mrb, os_count_object_type, &obj_count);
+
+  mrb_hash_set(mrb, hash, mrb_symbol_value(mrb_intern_lit(mrb, "TOTAL")), mrb_fixnum_value(obj_count.total));
+  mrb_hash_set(mrb, hash, mrb_symbol_value(mrb_intern_lit(mrb, "FREE")), mrb_fixnum_value(obj_count.freed));
+
+  for (i = MRB_TT_FALSE; i < MRB_TT_MAXDEFINE; i++) {
+    mrb_value type;
+    switch (i) {
+#define COUNT_TYPE(t) case (MRB_T ## t): type = mrb_symbol_value(mrb_intern_lit(mrb, #t)); break;
+      COUNT_TYPE(T_FALSE);
+      COUNT_TYPE(T_FREE);
+      COUNT_TYPE(T_TRUE);
+      COUNT_TYPE(T_FIXNUM);
+      COUNT_TYPE(T_SYMBOL);
+      COUNT_TYPE(T_UNDEF);
+      COUNT_TYPE(T_FLOAT);
+      COUNT_TYPE(T_CPTR);
+      COUNT_TYPE(T_OBJECT);
+      COUNT_TYPE(T_CLASS);
+      COUNT_TYPE(T_MODULE);
+      COUNT_TYPE(T_ICLASS);
+      COUNT_TYPE(T_SCLASS);
+      COUNT_TYPE(T_PROC);
+      COUNT_TYPE(T_ARRAY);
+      COUNT_TYPE(T_HASH);
+      COUNT_TYPE(T_STRING);
+      COUNT_TYPE(T_RANGE);
+      COUNT_TYPE(T_EXCEPTION);
+      COUNT_TYPE(T_FILE);
+      COUNT_TYPE(T_ENV);
+      COUNT_TYPE(T_DATA);
+      COUNT_TYPE(T_FIBER);
+#undef COUNT_TYPE
+    default:
+      type = mrb_fixnum_value(i); break;
+    }
+    if (obj_count.counts[i])
+      mrb_hash_set(mrb, hash, type, mrb_fixnum_value(obj_count.counts[i]));
+  }
+
+  return hash;
+}
+
+struct os_each_object_data {
+  mrb_value block;
+  struct RClass *target_module;
+  mrb_int count;
+};
+
+static void
+os_each_object_cb(mrb_state *mrb, struct RBasic *obj, void *ud)
+{
+  struct os_each_object_data *d = (struct os_each_object_data*)ud;
+
+  /* filter dead objects */
+  if (mrb_object_dead_p(mrb, obj)) {
+    return;
+  }
+
+  /* filter internal objects */
+  switch (obj->tt) {
+  case MRB_TT_ENV:
+  case MRB_TT_ICLASS:
+    return;
+  default:
+    break;
+  }
+
+  /* filter half baked (or internal) objects */
+  if (!obj->c) return;
+
+  /* filter class kind if target module defined */
+  if (d->target_module && !mrb_obj_is_kind_of(mrb, mrb_obj_value(obj), d->target_module)) {
+    return;
+  }
+
+  mrb_yield(mrb, d->block, mrb_obj_value(obj));
+  ++d->count;
+}
+
+/*
+ *  call-seq:
+ *     ObjectSpace.each_object([module]) {|obj| ... } -> fixnum
+ *
+ *  Calls the block once for each object in this Ruby process.
+ *  Returns the number of objects found.
+ *  If the optional argument +module+ is given,
+ *  calls the block for only those classes or modules
+ *  that match (or are a subclass of) +module+.
+ *
+ *  If no block is given, ArgumentError is raised.
+ *
+ */
+
+static mrb_value
+os_each_object(mrb_state *mrb, mrb_value self)
+{
+  mrb_value cls = mrb_nil_value();
+  struct os_each_object_data d;
+  mrb_get_args(mrb, "&|C", &d.block, &cls);
+
+  if (mrb_nil_p(d.block)) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "Expected block in ObjectSpace.each_object.");
+  }
+
+  d.target_module = mrb_nil_p(cls) ? NULL : mrb_class_ptr(cls);
+  d.count = 0;
+  mrb_objspace_each_objects(mrb, os_each_object_cb, &d);
+  return mrb_fixnum_value(d.count);
+}
+
+void
+mrb_mruby_objectspace_gem_init(mrb_state *mrb)
+{
+  struct RClass *os = mrb_define_module(mrb, "ObjectSpace");
+  mrb_define_class_method(mrb, os, "count_objects", os_count_objects, MRB_ARGS_OPT(1));
+  mrb_define_class_method(mrb, os, "each_object", os_each_object, MRB_ARGS_OPT(1));
+}
+
+void
+mrb_mruby_objectspace_gem_final(mrb_state *mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-objectspace/test/objectspace.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-objectspace/test/objectspace.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-objectspace/test/objectspace.rb	(revision 270)
@@ -0,0 +1,60 @@
+assert('ObjectSpace.count_objects') do
+  h = {}
+  f = Fiber.new {} if Object.const_defined? :Fiber
+  ObjectSpace.count_objects(h)
+  assert_kind_of(Hash, h)
+  assert_true(h.keys.all? {|x| x.is_a?(Symbol) || x.is_a?(Integer) })
+  assert_true(h.values.all? {|x| x.is_a?(Integer) })
+
+  assert_true(h.has_key?(:TOTAL))
+  assert_true(h.has_key?(:FREE))
+  assert_true(h.has_key?(:T_FIBER)) if Object.const_defined? :Fiber
+
+  assert_equal(h[:TOTAL] * 2, h.values.reduce(:+))
+
+  h = ObjectSpace.count_objects
+  assert_kind_of(Hash, h)
+  assert_true(h.keys.all? {|x| x.is_a?(Symbol) || x.is_a?(Integer) })
+  assert_true(h.values.all? {|x| x.is_a?(Integer) })
+
+  assert_raise(TypeError) { ObjectSpace.count_objects(1) }
+
+  h0 = {:T_FOO=>1000}
+  h = ObjectSpace.count_objects(h0)
+  assert_false(h0.has_key?(:T_FOO))
+
+  GC.start
+  h_after = {}
+  h_before = ObjectSpace.count_objects
+
+  objs = []
+  1000.times do
+    objs << {}
+  end
+  objs = nil
+  ObjectSpace.count_objects(h)
+  GC.start
+  ObjectSpace.count_objects(h_after)
+
+  assert_equal(h[:T_HASH], h_before[:T_HASH] + 1000)
+  assert_equal(h_after[:T_HASH], h_before[:T_HASH])
+end
+
+assert('ObjectSpace.each_object') do
+  objs = []
+  objs_count = ObjectSpace.each_object { |obj|
+    objs << obj
+  }
+  assert_equal objs.length, objs_count
+
+  arys = []
+  arys_count = ObjectSpace.each_object(Array) { |obj|
+    arys << obj
+  }
+  assert_equal arys.length, arys_count
+  assert_true arys.length < objs.length
+end
+
+assert 'Check class pointer of ObjectSpace.each_object.' do
+  ObjectSpace.each_object { |obj| !obj }
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-print/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-print/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-print/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-print') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'standard print/puts/p'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-print/mrblib/print.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-print/mrblib/print.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-print/mrblib/print.rb	(revision 270)
@@ -0,0 +1,64 @@
+##
+# Kernel
+#
+# ISO 15.3.1
+module Kernel
+  ##
+  # Invoke method +print+ on STDOUT and passing +*args+
+  #
+  # ISO 15.3.1.2.10
+  def print(*args)
+    i = 0
+    len = args.size
+    while i < len
+      __printstr__ args[i].to_s
+      i += 1
+    end
+  end
+
+  ##
+  # Invoke method +puts+ on STDOUT and passing +*args*+
+  #
+  # ISO 15.3.1.2.11
+  def puts(*args)
+    i = 0
+    len = args.size
+    while i < len
+      s = args[i].to_s
+      __printstr__ s
+      __printstr__ "\n" if (s[-1] != "\n")
+      i += 1
+    end
+    __printstr__ "\n" if len == 0
+    nil
+  end
+
+  ##
+  # Print human readable object description
+  #
+  # ISO 15.3.1.3.34
+  def p(*args)
+    i = 0
+    len = args.size
+    while i < len
+      __printstr__ args[i].inspect
+      __printstr__ "\n"
+      i += 1
+    end
+    args[0]
+  end
+
+  unless Kernel.respond_to?(:sprintf)
+    def printf(*args)
+      raise NotImplementedError.new('printf not available')
+    end
+    def sprintf(*args)
+      raise NotImplementedError.new('sprintf not available')
+    end
+  else
+    def printf(*args)
+      __printstr__(sprintf(*args))
+      nil
+    end
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-print/src/print.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-print/src/print.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-print/src/print.c	(revision 270)
@@ -0,0 +1,59 @@
+#include "mruby.h"
+#include "mruby/string.h"
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#if defined(__MINGW32__) || defined(__MINGW64__)
+# include <windows.h>
+# include <io.h>
+#endif
+
+static void
+printstr(mrb_state *mrb, mrb_value obj)
+{
+  if (mrb_string_p(obj)) {
+#if defined(__MINGW32__) || defined(__MINGW64__)
+    if (isatty(fileno(stdout))) {
+      DWORD written;
+      int mlen = RSTRING_LEN(obj);
+      char* utf8 = RSTRING_PTR(obj);
+      int wlen = MultiByteToWideChar(CP_UTF8, 0, utf8, mlen, NULL, 0);
+      wchar_t* utf16 = mrb_malloc(mrb, (wlen+1) * sizeof(wchar_t));
+      if (utf16 == NULL) return;
+      if (MultiByteToWideChar(CP_UTF8, 0, utf8, mlen, utf16, wlen) > 0) {
+        utf16[wlen] = 0;
+        WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE),
+          utf16, wlen, &written, NULL);
+      }
+      mrb_free(mrb, utf16);
+    } else
+#endif
+      fwrite(RSTRING_PTR(obj), RSTRING_LEN(obj), 1, stdout);
+  }
+}
+
+/* 15.3.1.2.9  */
+/* 15.3.1.3.34 */
+mrb_value
+mrb_printstr(mrb_state *mrb, mrb_value self)
+{
+  mrb_value argv;
+
+  mrb_get_args(mrb, "o", &argv);
+  printstr(mrb, argv);
+
+  return argv;
+}
+
+void
+mrb_mruby_print_gem_init(mrb_state* mrb)
+{
+  struct RClass *krn;
+  krn = mrb->kernel_module;
+  mrb_define_method(mrb, krn, "__printstr__", mrb_printstr, MRB_ARGS_REQ(1));
+}
+
+void
+mrb_mruby_print_gem_final(mrb_state* mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-proc-ext/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-proc-ext/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-proc-ext/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-proc-ext') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'Proc class extension'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-proc-ext/mrblib/proc.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-proc-ext/mrblib/proc.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-proc-ext/mrblib/proc.rb	(revision 270)
@@ -0,0 +1,42 @@
+class Proc
+
+  def ===(*args)
+    call(*args)
+  end
+
+  def yield(*args)
+    call(*args)
+  end
+
+  def to_proc
+    self
+  end
+
+  def curry(arity=self.arity)
+    type = :proc
+    abs = lambda {|a| a < 0 ? -a - 1 : a}
+    arity = abs[arity]
+    if lambda?
+      type = :lambda
+      self_arity = self.arity
+      if (self_arity >= 0 && arity != self_arity) ||
+         (self_arity < 0 && abs[self_arity] > arity)
+        raise ArgumentError, "wrong number of arguments (#{arity} for #{abs[self_arity]})"
+      end
+    end
+
+    pproc = self
+    make_curry = proc do |given_args=[]|
+      send(type) do |*args|
+        new_args = given_args + args
+        if new_args.size >= arity
+          pproc[*new_args]
+        else
+          make_curry[new_args]
+        end
+      end
+    end
+    make_curry.call
+  end
+
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-proc-ext/src/proc.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-proc-ext/src/proc.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-proc-ext/src/proc.c	(revision 270)
@@ -0,0 +1,167 @@
+#include "mruby.h"
+#include "mruby/proc.h"
+#include "mruby/opcode.h"
+#include "mruby/array.h"
+#include "mruby/string.h"
+#include "mruby/debug.h"
+
+static mrb_value
+mrb_proc_lambda(mrb_state *mrb, mrb_value self)
+{
+  struct RProc *p = mrb_proc_ptr(self);
+  return mrb_bool_value(MRB_PROC_STRICT_P(p));
+}
+
+static mrb_value
+mrb_proc_source_location(mrb_state *mrb, mrb_value self)
+{
+  struct RProc *p = mrb_proc_ptr(self);
+
+  if (MRB_PROC_CFUNC_P(p)) {
+    return mrb_nil_value();
+  }
+  else {
+    mrb_irep *irep = p->body.irep;
+    int32_t line;
+    const char *filename;
+
+    filename = mrb_debug_get_filename(irep, 0);
+    line = mrb_debug_get_line(irep, 0);
+
+    return (!filename && line == -1)? mrb_nil_value()
+        : mrb_assoc_new(mrb, mrb_str_new_cstr(mrb, filename), mrb_fixnum_value(line));
+  }
+}
+
+static mrb_value
+mrb_proc_inspect(mrb_state *mrb, mrb_value self)
+{
+  struct RProc *p = mrb_proc_ptr(self);
+  mrb_value str = mrb_str_new_lit(mrb, "#<Proc:");
+  mrb_str_concat(mrb, str, mrb_ptr_to_str(mrb, mrb_cptr(self)));
+
+  if (!MRB_PROC_CFUNC_P(p)) {
+    mrb_irep *irep = p->body.irep;
+    const char *filename;
+    int32_t line;
+    mrb_str_cat_lit(mrb, str, "@");
+
+    filename = mrb_debug_get_filename(irep, 0);
+    mrb_str_cat_cstr(mrb, str, filename ? filename : "-");
+    mrb_str_cat_lit(mrb, str, ":");
+
+    line = mrb_debug_get_line(irep, 0);
+    if (line != -1) {
+      mrb_str_append(mrb, str, mrb_fixnum_value(line));
+    }
+    else {
+      mrb_str_cat_lit(mrb, str, "-");
+    }
+  }
+
+  if (MRB_PROC_STRICT_P(p)) {
+    mrb_str_cat_lit(mrb, str, " (lambda)");
+  }
+
+  mrb_str_cat_lit(mrb, str, ">");
+  return str;
+}
+
+static mrb_value
+mrb_kernel_proc(mrb_state *mrb, mrb_value self)
+{
+  mrb_value blk;
+
+  mrb_get_args(mrb, "&", &blk);
+  if (mrb_nil_p(blk)) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "tried to create Proc object without a block");
+  }
+
+  return blk;
+}
+
+/*
+ * call-seq:
+ *    prc.parameters  -> array
+ *
+ * Returns the parameter information of this proc.
+ *
+ *    prc = lambda{|x, y=42, *other|}
+ *    prc.parameters  #=> [[:req, :x], [:opt, :y], [:rest, :other]]
+ */
+
+static mrb_value
+mrb_proc_parameters(mrb_state *mrb, mrb_value self)
+{
+  struct parameters_type {
+    int size;
+    const char *name;
+  } *p, parameters_list [] = {
+    {0, "req"},
+    {0, "opt"},
+    {0, "rest"},
+    {0, "req"},
+    {0, "block"},
+    {0, NULL}
+  };
+  const struct RProc *proc = mrb_proc_ptr(self);
+  const struct mrb_irep *irep = proc->body.irep;
+  mrb_aspec aspec;
+  mrb_value parameters;
+  int i, j;
+
+  if (MRB_PROC_CFUNC_P(proc)) {
+    // TODO cfunc aspec is not implemented yet
+    return mrb_ary_new(mrb);
+  }
+  if (!irep->lv) {
+    return mrb_ary_new(mrb);
+  }
+  if (GET_OPCODE(*irep->iseq) != OP_ENTER) {
+    return mrb_ary_new(mrb);
+  }
+
+  if (!MRB_PROC_STRICT_P(proc)) {
+    parameters_list[0].name = "opt";
+    parameters_list[3].name = "opt";
+  }
+
+  aspec = GETARG_Ax(*irep->iseq);
+  parameters_list[0].size = MRB_ASPEC_REQ(aspec);
+  parameters_list[1].size = MRB_ASPEC_OPT(aspec);
+  parameters_list[2].size = MRB_ASPEC_REST(aspec);
+  parameters_list[3].size = MRB_ASPEC_POST(aspec);
+  parameters_list[4].size = MRB_ASPEC_BLOCK(aspec);
+
+  parameters = mrb_ary_new_capa(mrb, irep->nlocals-1);
+  for (i = 0, p = parameters_list; p->name; p++) {
+    mrb_value sname = mrb_symbol_value(mrb_intern_cstr(mrb, p->name));
+    for (j = 0; j < p->size; i++, j++) {
+      mrb_assert(i < (irep->nlocals-1));
+      mrb_ary_push(mrb, parameters, mrb_assoc_new(mrb,
+        sname,
+        mrb_symbol_value(irep->lv[i].name)
+      ));
+    }
+  }
+  return parameters;
+}
+
+void
+mrb_mruby_proc_ext_gem_init(mrb_state* mrb)
+{
+  struct RClass *p = mrb->proc_class;
+  mrb_define_method(mrb, p, "lambda?",         mrb_proc_lambda,          MRB_ARGS_NONE());
+  mrb_define_method(mrb, p, "source_location", mrb_proc_source_location, MRB_ARGS_NONE());
+  mrb_define_method(mrb, p, "to_s",            mrb_proc_inspect,         MRB_ARGS_NONE());
+  mrb_define_method(mrb, p, "inspect",         mrb_proc_inspect,         MRB_ARGS_NONE());
+  mrb_define_method(mrb, p, "parameters",      mrb_proc_parameters,      MRB_ARGS_NONE());
+
+  mrb_define_class_method(mrb, mrb->kernel_module, "proc", mrb_kernel_proc, MRB_ARGS_NONE());
+  mrb_define_method(mrb, mrb->kernel_module,       "proc", mrb_kernel_proc, MRB_ARGS_NONE());
+}
+
+void
+mrb_mruby_proc_ext_gem_final(mrb_state* mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-proc-ext/test/proc.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-proc-ext/test/proc.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-proc-ext/test/proc.c	(revision 270)
@@ -0,0 +1,56 @@
+#include "mruby.h"
+#include "mruby/proc.h"
+#include "mruby/class.h"
+
+static mrb_value
+return_func_name(mrb_state *mrb, mrb_value self)
+{
+  return mrb_cfunc_env_get(mrb, 0);
+}
+
+static mrb_value
+proc_new_cfunc_with_env(mrb_state *mrb, mrb_value self)
+{
+  mrb_sym n;
+  mrb_value n_val;
+  mrb_get_args(mrb, "n", &n);
+  n_val = mrb_symbol_value(n);
+  mrb_define_method_raw(mrb, mrb_class_ptr(self), n,
+                        mrb_proc_new_cfunc_with_env(mrb, return_func_name, 1, &n_val));
+  return self;
+}
+
+static mrb_value
+return_env(mrb_state *mrb, mrb_value self)
+{
+  mrb_int idx;
+  mrb_get_args(mrb, "i", &idx);
+  return mrb_cfunc_env_get(mrb, idx);
+}
+
+static mrb_value
+cfunc_env_get(mrb_state *mrb, mrb_value self)
+{
+  mrb_sym n;
+  mrb_value *argv; mrb_int argc;
+  mrb_get_args(mrb, "na", &n, &argv, &argc);
+  mrb_define_method_raw(mrb, mrb_class_ptr(self), n,
+                        mrb_proc_new_cfunc_with_env(mrb, return_env, argc, argv));
+  return self;
+}
+
+static mrb_value
+cfunc_without_env(mrb_state *mrb, mrb_value self)
+{
+  return mrb_cfunc_env_get(mrb, 0);
+}
+
+void mrb_mruby_proc_ext_gem_test(mrb_state *mrb)
+{
+  struct RClass *cls;
+
+  cls = mrb_define_class(mrb, "ProcExtTest", mrb->object_class);
+  mrb_define_module_function(mrb, cls, "mrb_proc_new_cfunc_with_env", proc_new_cfunc_with_env, MRB_ARGS_REQ(1));
+  mrb_define_module_function(mrb, cls, "mrb_cfunc_env_get", cfunc_env_get, MRB_ARGS_REQ(2));
+  mrb_define_module_function(mrb, cls, "cfunc_without_env", cfunc_without_env, MRB_ARGS_NONE());
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-proc-ext/test/proc.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-proc-ext/test/proc.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-proc-ext/test/proc.rb	(revision 270)
@@ -0,0 +1,91 @@
+##
+# Proc(Ext) Test
+
+assert('Proc#source_location') do
+  loc = Proc.new {}.source_location
+  next true if loc.nil?
+  assert_equal loc[0][-7, 7], 'proc.rb'
+  assert_equal loc[1], 5
+end
+
+assert('Proc#inspect') do
+  ins = Proc.new{}.inspect
+  assert_kind_of String, ins
+end
+
+assert('Proc#lambda?') do
+  assert_true lambda{}.lambda?
+  assert_true !Proc.new{}.lambda?
+end
+
+assert('Proc#===') do
+  proc = Proc.new {|a| a * 2}
+  assert_equal 20, (proc === 10)
+end
+
+assert('Proc#yield') do
+  proc = Proc.new {|a| a * 2}
+  assert_equal 20, proc.yield(10)
+end
+
+assert('Proc#curry') do
+  b = proc {|x, y, z| (x||0) + (y||0) + (z||0) }
+  assert_equal 6, b.curry[1][2][3]
+  assert_equal 6, b.curry[1, 2][3, 4]
+  assert_equal 6, b.curry(5)[1][2][3][4][5]
+  assert_equal 6, b.curry(5)[1, 2][3, 4][5]
+  assert_equal 1, b.curry(1)[1]
+
+  b = lambda {|x, y, z| (x||0) + (y||0) + (z||0) }
+  assert_equal 6, b.curry[1][2][3]
+  assert_raise(ArgumentError) { b.curry[1, 2][3, 4] }
+  assert_raise(ArgumentError) { b.curry(5) }
+  assert_raise(ArgumentError) { b.curry(1) }
+
+  assert_false(proc{}.curry.lambda?)
+  assert_true(lambda{}.curry.lambda?)
+end
+
+assert('Proc#parameters') do
+  assert_equal([], Proc.new {}.parameters)
+  assert_equal([], Proc.new {||}.parameters)
+  assert_equal([[:opt, :a]], Proc.new {|a|}.parameters)
+  assert_equal([[:req, :a]], lambda {|a|}.parameters)
+  assert_equal([[:opt, :a]], lambda {|a=nil|}.parameters)
+  assert_equal([[:req, :a]], ->(a){}.parameters)
+  assert_equal([[:rest, :a]], Proc.new {|*a|}.parameters)
+  assert_equal([[:opt, :a], [:opt, :b], [:opt, :c], [:opt, :d], [:rest, :e], [:opt, :f], [:opt, :g], [:block, :h]], Proc.new {|a,b,c=:c,d=:d,*e,f,g,&h|}.parameters)
+  assert_equal([[:req, :a], [:req, :b], [:opt, :c], [:opt, :d], [:rest, :e], [:req, :f], [:req, :g], [:block, :h]], lambda {|a,b,c=:c,d=:d,*e,f,g,&h|}.parameters)
+end
+
+assert('Proc#to_proc') do
+  proc = Proc.new {}
+  assert_equal proc, proc.to_proc
+end
+
+assert('Kernel#proc') do
+  assert_true !proc{|a|}.lambda?
+end
+
+assert('mrb_proc_new_cfunc_with_env') do
+  ProcExtTest.mrb_proc_new_cfunc_with_env(:test)
+  ProcExtTest.mrb_proc_new_cfunc_with_env(:mruby)
+
+  t = ProcExtTest.new
+
+  assert_equal :test, t.test
+  assert_equal :mruby, t.mruby
+end
+
+assert('mrb_cfunc_env_get') do
+  ProcExtTest.mrb_cfunc_env_get :get_int, [0, 1, 2]
+
+  t = ProcExtTest.new
+
+  assert_raise(TypeError) { t.cfunc_without_env }
+
+  assert_raise(IndexError) { t.get_int(-1) }
+  assert_raise(IndexError) { t.get_int(3) }
+
+  assert_equal 1, t.get_int(1)
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-random/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-random/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-random/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-random') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'Random class'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-random/src/mt19937ar.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-random/src/mt19937ar.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-random/src/mt19937ar.c	(revision 270)
@@ -0,0 +1,197 @@
+/*
+** mt19937ar.c - MT Random functions
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+#include "mt19937ar.h"
+
+/* Period parameters */
+/* #define N 624 */
+#define M 397
+#define MATRIX_A 0x9908b0dfUL   /* constant vector a */
+#define UPPER_MASK 0x80000000UL /* most significant w-r bits */
+#define LOWER_MASK 0x7fffffffUL /* least significant r bits */
+
+#if 0 /* dead_code */
+static unsigned long mt[N]; /* the array for the state vector  */
+static int mti=N+1; /* mti==N+1 means mt[N] is not initialized */
+#endif /* dead_code */
+
+void mrb_random_init_genrand(mt_state *t, unsigned long s)
+{
+    t->mt[0]= s & 0xffffffffUL;
+    for (t->mti=1; t->mti<N; t->mti++) {
+        t->mt[t->mti] =
+	    (1812433253UL * (t->mt[t->mti-1] ^ (t->mt[t->mti-1] >> 30)) + t->mti);
+        t->mt[t->mti] &= 0xffffffffUL;
+    }
+}
+
+unsigned long mrb_random_genrand_int32(mt_state *t)
+{
+    unsigned long y;
+    static const unsigned long mag01[2]={0x0UL, MATRIX_A};
+    /* mag01[x] = x * MATRIX_A  for x=0,1 */
+
+    if (t->mti >= N) { /* generate N words at one time */
+        int kk;
+
+        if (t->mti == N+1)   /* if init_genrand() has not been called, */
+            mrb_random_init_genrand(t, 5489UL); /* a default initial seed is used */
+
+        for (kk=0;kk<N-M;kk++) {
+            y = (t->mt[kk]&UPPER_MASK)|(t->mt[kk+1]&LOWER_MASK);
+            t->mt[kk] = t->mt[kk+M] ^ (y >> 1) ^ mag01[y & 0x1UL];
+        }
+        for (;kk<N-1;kk++) {
+            y = (t->mt[kk]&UPPER_MASK)|(t->mt[kk+1]&LOWER_MASK);
+            t->mt[kk] = t->mt[kk+(M-N)] ^ (y >> 1) ^ mag01[y & 0x1UL];
+        }
+        y = (t->mt[N-1]&UPPER_MASK)|(t->mt[0]&LOWER_MASK);
+        t->mt[N-1] = t->mt[M-1] ^ (y >> 1) ^ mag01[y & 0x1UL];
+
+        t->mti = 0;
+    }
+
+    y = t->mt[t->mti++];
+
+    /* Tempering */
+    y ^= (y >> 11);
+    y ^= (y << 7) & 0x9d2c5680UL;
+    y ^= (y << 15) & 0xefc60000UL;
+    y ^= (y >> 18);
+
+    t->gen.int_ = y;
+
+    return y;
+}
+
+double mrb_random_genrand_real1(mt_state *t)
+{
+    mrb_random_genrand_int32(t);
+    t->gen.double_ =  t->gen.int_*(1.0/4294967295.0);
+    return t->gen.double_;
+    /* divided by 2^32-1 */
+}
+
+#if 0 /* dead_code */
+/* initializes mt[N] with a seed */
+void init_genrand(unsigned long s)
+{
+    mt[0]= s & 0xffffffffUL;
+    for (mti=1; mti<N; mti++) {
+        mt[mti] =
+	    (1812433253UL * (mt[mti-1] ^ (mt[mti-1] >> 30)) + mti);
+        /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */
+        /* In the previous versions, MSBs of the seed affect   */
+        /* only MSBs of the array mt[].                        */
+        /* 2002/01/09 modified by Makoto Matsumoto             */
+        mt[mti] &= 0xffffffffUL;
+        /* for >32 bit machines */
+    }
+}
+
+/* initialize by an array with array-length */
+/* init_key is the array for initializing keys */
+/* key_length is its length */
+/* slight change for C++, 2004/2/26 */
+void init_by_array(unsigned long init_key[], int key_length)
+{
+    int i, j, k;
+    init_genrand(19650218UL);
+    i=1; j=0;
+    k = (N>key_length ? N : key_length);
+    for (; k; k--) {
+        mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1664525UL))
+          + init_key[j] + j; /* non linear */
+        mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */
+        i++; j++;
+        if (i>=N) { mt[0] = mt[N-1]; i=1; }
+        if (j>=key_length) j=0;
+    }
+    for (k=N-1; k; k--) {
+        mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1566083941UL))
+          - i; /* non linear */
+        mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */
+        i++;
+        if (i>=N) { mt[0] = mt[N-1]; i=1; }
+    }
+
+    mt[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */
+}
+
+/* generates a random number on [0,0xffffffff]-interval */
+unsigned long genrand_int32(void)
+{
+    unsigned long y;
+    static const unsigned long mag01[2]={0x0UL, MATRIX_A};
+    /* mag01[x] = x * MATRIX_A  for x=0,1 */
+
+    if (mti >= N) { /* generate N words at one time */
+        int kk;
+
+        if (mti == N+1)   /* if init_genrand() has not been called, */
+            init_genrand(5489UL); /* a default initial seed is used */
+
+        for (kk=0;kk<N-M;kk++) {
+            y = (mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK);
+            mt[kk] = mt[kk+M] ^ (y >> 1) ^ mag01[y & 0x1UL];
+        }
+        for (;kk<N-1;kk++) {
+            y = (mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK);
+            mt[kk] = mt[kk+(M-N)] ^ (y >> 1) ^ mag01[y & 0x1UL];
+        }
+        y = (mt[N-1]&UPPER_MASK)|(mt[0]&LOWER_MASK);
+        mt[N-1] = mt[M-1] ^ (y >> 1) ^ mag01[y & 0x1UL];
+
+        mti = 0;
+    }
+
+    y = mt[mti++];
+
+    /* Tempering */
+    y ^= (y >> 11);
+    y ^= (y << 7) & 0x9d2c5680UL;
+    y ^= (y << 15) & 0xefc60000UL;
+    y ^= (y >> 18);
+
+    return y;
+}
+
+/* generates a random number on [0,0x7fffffff]-interval */
+long genrand_int31(void)
+{
+    return (long)(genrand_int32()>>1);
+}
+
+/* generates a random number on [0,1]-real-interval */
+double genrand_real1(void)
+{
+    return genrand_int32()*(1.0/4294967295.0);
+    /* divided by 2^32-1 */
+}
+
+/* generates a random number on [0,1)-real-interval */
+double genrand_real2(void)
+{
+    return genrand_int32()*(1.0/4294967296.0);
+    /* divided by 2^32 */
+}
+
+/* generates a random number on (0,1)-real-interval */
+double genrand_real3(void)
+{
+    return (((double)genrand_int32()) + 0.5)*(1.0/4294967296.0);
+    /* divided by 2^32 */
+}
+
+/* generates a random number on [0,1) with 53-bit resolution*/
+double genrand_res53(void)
+{
+    unsigned long a=genrand_int32()>>5, b=genrand_int32()>>6;
+    return(a*67108864.0+b)*(1.0/9007199254740992.0);
+}
+/* These real versions are due to Isaku Wada, 2002/01/09 added */
+#endif /* dead_code */
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-random/src/mt19937ar.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-random/src/mt19937ar.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-random/src/mt19937ar.h	(revision 270)
@@ -0,0 +1,51 @@
+/*
+** mt19937ar.h - MT Random functions
+**
+** See Copyright Notice in mruby.h
+*/
+
+#define N 624
+
+typedef struct {
+  unsigned long mt[N];
+  int mti;
+  union {
+    unsigned long int_;
+    double double_;
+  } gen;
+
+  mrb_int seed;
+  mrb_bool has_seed : 1;
+} mt_state;
+
+void mrb_random_init_genrand(mt_state *, unsigned long);
+unsigned long mrb_random_genrand_int32(mt_state *);
+double mrb_random_genrand_real1(mt_state *t);
+
+/* initializes mt[N] with a seed */
+void init_genrand(unsigned long s);
+
+/* initialize by an array with array-length */
+/* init_key is the array for initializing keys */
+/* key_length is its length */
+/* slight change for C++, 2004/2/26 */
+void init_by_array(unsigned long init_key[], int key_length);
+
+/* generates a random number on [0,0xffffffff]-interval */
+unsigned long genrand_int32(void);
+
+/* generates a random number on [0,0x7fffffff]-interval */
+long genrand_int31(void);
+
+/* These real versions are due to Isaku Wada, 2002/01/09 added */
+/* generates a random number on [0,1]-real-interval */
+double genrand_real1(void);
+
+/* generates a random number on [0,1)-real-interval */
+double genrand_real2(void);
+
+/* generates a random number on (0,1)-real-interval */
+double genrand_real3(void);
+
+/* generates a random number on [0,1) with 53-bit resolution*/
+double genrand_res53(void);
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-random/src/random.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-random/src/random.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-random/src/random.c	(revision 270)
@@ -0,0 +1,345 @@
+/*
+** random.c - Random module
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+#include "mruby/variable.h"
+#include "mruby/class.h"
+#include "mruby/data.h"
+#include "mruby/array.h"
+#include "mt19937ar.h"
+
+#include <time.h>
+
+static char const MT_STATE_KEY[] = "$mrb_i_mt_state";
+
+static const struct mrb_data_type mt_state_type = {
+  MT_STATE_KEY, mrb_free,
+};
+
+static mrb_value mrb_random_rand(mrb_state *mrb, mrb_value self);
+static mrb_value mrb_random_srand(mrb_state *mrb, mrb_value self);
+
+static void
+mt_srand(mt_state *t, unsigned long seed)
+{
+  mrb_random_init_genrand(t, seed);
+}
+
+static unsigned long
+mt_rand(mt_state *t)
+{
+  return mrb_random_genrand_int32(t);
+}
+
+static double
+mt_rand_real(mt_state *t)
+{
+  return mrb_random_genrand_real1(t);
+}
+
+static mrb_value
+mrb_random_mt_srand(mrb_state *mrb, mt_state *t, mrb_value seed)
+{
+  if (mrb_nil_p(seed)) {
+    seed = mrb_fixnum_value((mrb_int)(time(NULL) + mt_rand(t)));
+    if (mrb_fixnum(seed) < 0) {
+      seed = mrb_fixnum_value(0 - mrb_fixnum(seed));
+    }
+  }
+
+  mt_srand(t, (unsigned) mrb_fixnum(seed));
+
+  return seed;
+}
+
+static mrb_value
+mrb_random_mt_rand(mrb_state *mrb, mt_state *t, mrb_value max)
+{
+  mrb_value value;
+
+  if (mrb_fixnum(max) == 0) {
+    value = mrb_float_value(mrb, mt_rand_real(t));
+  }
+  else {
+    value = mrb_fixnum_value(mt_rand(t) % mrb_fixnum(max));
+  }
+
+  return value;
+}
+
+static mrb_value
+get_opt(mrb_state* mrb)
+{
+  mrb_value arg;
+
+  arg = mrb_nil_value();
+  mrb_get_args(mrb, "|o", &arg);
+
+  if (!mrb_nil_p(arg)) {
+    if (!mrb_fixnum_p(arg)) {
+      mrb_raise(mrb, E_ARGUMENT_ERROR, "invalid argument type");
+    }
+    arg = mrb_check_convert_type(mrb, arg, MRB_TT_FIXNUM, "Fixnum", "to_int");
+    if (mrb_fixnum(arg) < 0) {
+      arg = mrb_fixnum_value(0 - mrb_fixnum(arg));
+    }
+  }
+  return arg;
+}
+
+static mrb_value
+get_random(mrb_state *mrb) {
+  return mrb_const_get(mrb,
+             mrb_obj_value(mrb_class_get(mrb, "Random")),
+             mrb_intern_lit(mrb, "DEFAULT"));
+}
+
+static mt_state *
+get_random_state(mrb_state *mrb)
+{
+  mrb_value random_val = get_random(mrb);
+  return DATA_GET_PTR(mrb, random_val, &mt_state_type, mt_state);
+}
+
+static mrb_value
+mrb_random_g_rand(mrb_state *mrb, mrb_value self)
+{
+  mrb_value random = get_random(mrb);
+  return mrb_random_rand(mrb, random);
+}
+
+static mrb_value
+mrb_random_g_srand(mrb_state *mrb, mrb_value self)
+{
+  mrb_value random = get_random(mrb);
+  return mrb_random_srand(mrb, random);
+}
+
+static mrb_value
+mrb_random_init(mrb_state *mrb, mrb_value self)
+{
+  mrb_value seed;
+  mt_state *t;
+
+  /* avoid memory leaks */
+  t = (mt_state*)DATA_PTR(self);
+  if (t) {
+    mrb_free(mrb, t);
+  }
+  mrb_data_init(self, NULL, &mt_state_type);
+
+  t = (mt_state *)mrb_malloc(mrb, sizeof(mt_state));
+  t->mti = N + 1;
+
+  seed = get_opt(mrb);
+  seed = mrb_random_mt_srand(mrb, t, seed);
+  if (mrb_nil_p(seed)) {
+    t->has_seed = FALSE;
+  }
+  else {
+    mrb_assert(mrb_fixnum_p(seed));
+    t->has_seed = TRUE;
+    t->seed = mrb_fixnum(seed);
+  }
+
+  mrb_data_init(self, t, &mt_state_type);
+
+  return self;
+}
+
+static void
+mrb_random_rand_seed(mrb_state *mrb, mt_state *t)
+{
+  if (!t->has_seed) {
+    mrb_random_mt_srand(mrb, t, mrb_nil_value());
+  }
+}
+
+static mrb_value
+mrb_random_rand(mrb_state *mrb, mrb_value self)
+{
+  mrb_value max;
+  mt_state *t = DATA_GET_PTR(mrb, self, &mt_state_type, mt_state);
+
+  max = get_opt(mrb);
+  mrb_random_rand_seed(mrb, t);
+  return mrb_random_mt_rand(mrb, t, max);
+}
+
+static mrb_value
+mrb_random_srand(mrb_state *mrb, mrb_value self)
+{
+  mrb_value seed;
+  mrb_value old_seed;
+  mt_state *t = DATA_GET_PTR(mrb, self, &mt_state_type, mt_state);
+
+  seed = get_opt(mrb);
+  seed = mrb_random_mt_srand(mrb, t, seed);
+  old_seed = t->has_seed? mrb_fixnum_value(t->seed) : mrb_nil_value();
+  if (mrb_nil_p(seed)) {
+    t->has_seed = FALSE;
+  }
+  else {
+    mrb_assert(mrb_fixnum_p(seed));
+    t->has_seed = TRUE;
+    t->seed = mrb_fixnum(seed);
+  }
+
+  return old_seed;
+}
+
+/*
+ *  call-seq:
+ *     ary.shuffle!   ->   ary
+ *
+ *  Shuffles elements in self in place.
+ */
+
+static mrb_value
+mrb_ary_shuffle_bang(mrb_state *mrb, mrb_value ary)
+{
+  mrb_int i;
+  mt_state *random = NULL;
+
+  if (RARRAY_LEN(ary) > 1) {
+    mrb_get_args(mrb, "|d", &random, &mt_state_type);
+
+    if (random == NULL) {
+      random = get_random_state(mrb);
+    }
+    mrb_random_rand_seed(mrb, random);
+
+    mrb_ary_modify(mrb, mrb_ary_ptr(ary));
+
+    for (i = RARRAY_LEN(ary) - 1; i > 0; i--)  {
+      mrb_int j;
+      mrb_value tmp;
+
+      j = mrb_fixnum(mrb_random_mt_rand(mrb, random, mrb_fixnum_value(RARRAY_LEN(ary))));
+
+      tmp = RARRAY_PTR(ary)[i];
+      mrb_ary_ptr(ary)->ptr[i] = RARRAY_PTR(ary)[j];
+      mrb_ary_ptr(ary)->ptr[j] = tmp;
+    }
+  }
+
+  return ary;
+}
+
+/*
+ *  call-seq:
+ *     ary.shuffle   ->   new_ary
+ *
+ *  Returns a new array with elements of self shuffled.
+ */
+
+static mrb_value
+mrb_ary_shuffle(mrb_state *mrb, mrb_value ary)
+{
+  mrb_value new_ary = mrb_ary_new_from_values(mrb, RARRAY_LEN(ary), RARRAY_PTR(ary));
+  mrb_ary_shuffle_bang(mrb, new_ary);
+
+  return new_ary;
+}
+
+/*
+ *  call-seq:
+ *     ary.sample      ->   obj
+ *     ary.sample(n)   ->   new_ary
+ *
+ *  Choose a random element or +n+ random elements from the array.
+ *
+ *  The elements are chosen by using random and unique indices into the array
+ *  in order to ensure that an element doesn't repeat itself unless the array
+ *  already contained duplicate elements.
+ *
+ *  If the array is empty the first form returns +nil+ and the second form
+ *  returns an empty array.
+ */
+
+static mrb_value
+mrb_ary_sample(mrb_state *mrb, mrb_value ary)
+{
+  mrb_int n = 0;
+  mrb_bool given;
+  mt_state *random = NULL;
+  mrb_int len = RARRAY_LEN(ary);
+
+  mrb_get_args(mrb, "|i?d", &n, &given, &random, &mt_state_type);
+  if (random == NULL) {
+    random = get_random_state(mrb);
+  }
+  mrb_random_rand_seed(mrb, random);
+  mt_rand(random);
+  if (!given) {                 /* pick one element */
+    switch (len) {
+    case 0:
+      return mrb_nil_value();
+    case 1:
+      return RARRAY_PTR(ary)[0];
+    default:
+      return RARRAY_PTR(ary)[mt_rand(random) % len];
+    }
+  }
+  else {
+    mrb_value result;
+    mrb_int i, j;
+
+    if (n < 0) mrb_raise(mrb, E_ARGUMENT_ERROR, "negative sample number");
+    if (n > len) n = len;
+    result = mrb_ary_new_capa(mrb, n);
+    for (i=0; i<n; i++) {
+      mrb_int r;
+
+      for (;;) {
+      retry:
+        r = mt_rand(random) % len;
+
+        for (j=0; j<i; j++) {
+          if (mrb_fixnum(RARRAY_PTR(result)[j]) == r) {
+            goto retry;         /* retry if duplicate */
+          }
+        }
+        break;
+      }
+      mrb_ary_push(mrb, result, mrb_fixnum_value(r));
+    }
+    for (i=0; i<n; i++) {
+      mrb_ary_set(mrb, result, i, RARRAY_PTR(ary)[mrb_fixnum(RARRAY_PTR(result)[i])]);
+    }
+    return result;
+  }
+}
+
+
+void mrb_mruby_random_gem_init(mrb_state *mrb)
+{
+  struct RClass *random;
+  struct RClass *array = mrb->array_class;
+
+  mrb_define_method(mrb, mrb->kernel_module, "rand", mrb_random_g_rand, MRB_ARGS_OPT(1));
+  mrb_define_method(mrb, mrb->kernel_module, "srand", mrb_random_g_srand, MRB_ARGS_OPT(1));
+
+  random = mrb_define_class(mrb, "Random", mrb->object_class);
+  MRB_SET_INSTANCE_TT(random, MRB_TT_DATA);
+  mrb_define_class_method(mrb, random, "rand", mrb_random_g_rand, MRB_ARGS_OPT(1));
+  mrb_define_class_method(mrb, random, "srand", mrb_random_g_srand, MRB_ARGS_OPT(1));
+
+  mrb_define_method(mrb, random, "initialize", mrb_random_init, MRB_ARGS_OPT(1));
+  mrb_define_method(mrb, random, "rand", mrb_random_rand, MRB_ARGS_OPT(1));
+  mrb_define_method(mrb, random, "srand", mrb_random_srand, MRB_ARGS_OPT(1));
+
+  mrb_define_method(mrb, array, "shuffle", mrb_ary_shuffle, MRB_ARGS_OPT(1));
+  mrb_define_method(mrb, array, "shuffle!", mrb_ary_shuffle_bang, MRB_ARGS_OPT(1));
+  mrb_define_method(mrb, array, "sample", mrb_ary_sample, MRB_ARGS_OPT(2));
+
+  mrb_const_set(mrb, mrb_obj_value(random), mrb_intern_lit(mrb, "DEFAULT"),
+          mrb_obj_new(mrb, random, 0, NULL));
+}
+
+void mrb_mruby_random_gem_final(mrb_state *mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-random/src/random.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-random/src/random.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-random/src/random.h	(revision 270)
@@ -0,0 +1,12 @@
+/*
+** random.h - Random module
+**
+** See Copyright Notice in mruby.h
+*/
+
+#ifndef RANDOM_H
+#define RANDOM_H
+
+void mrb_mruby_random_gem_init(mrb_state *mrb);
+
+#endif
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-random/test/random.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-random/test/random.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-random/test/random.rb	(revision 270)
@@ -0,0 +1,76 @@
+##
+# Random Test
+
+assert("Random#srand") do
+  r1 = Random.new(123)
+  r2 = Random.new(123)
+  r1.rand == r2.rand
+end
+
+assert("Kernel::srand") do
+  srand(234)
+  r1 = rand
+  srand(234)
+  r2 = rand
+  r1 == r2
+end
+
+assert("Random::srand") do
+  Random.srand(345)
+  r1 = rand
+  srand(345)
+  r2 = Random.rand
+  r1 == r2
+end
+
+assert("fixnum") do
+  rand(3).class == Fixnum
+end
+
+assert("float") do
+  rand.class == Float
+end
+
+assert("Array#shuffle") do
+  ary = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
+  shuffled = ary.shuffle
+
+  ary == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] and shuffled != ary and 10.times { |x| ary.include? x }
+end
+
+assert('Array#shuffle!') do
+  ary = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
+  ary.shuffle!
+
+  ary != [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] and 10.times { |x| ary.include? x }
+end
+
+assert("Array#shuffle(random)") do
+  assert_raise(TypeError) do
+    # this will cause an exception due to the wrong argument
+    [1, 2].shuffle "Not a Random instance"
+  end
+
+  # verify that the same seed causes the same results
+  ary1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
+  shuffle1 = ary1.shuffle Random.new 345
+  ary2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
+  shuffle2 = ary2.shuffle Random.new 345
+
+  ary1 != shuffle1 and 10.times { |x| shuffle1.include? x } and shuffle1 == shuffle2
+end
+
+assert('Array#shuffle!(random)') do
+  assert_raise(TypeError) do
+    # this will cause an exception due to the wrong argument
+    [1, 2].shuffle! "Not a Random instance"
+  end
+
+  # verify that the same seed causes the same results
+  ary1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
+  ary1.shuffle! Random.new 345
+  ary2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
+  ary2.shuffle! Random.new 345
+
+  ary1 != [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] and 10.times { |x| ary1.include? x } and ary1 == ary2
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-range-ext/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-range-ext/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-range-ext/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-range-ext') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'Range class extension'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-range-ext/src/range.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-range-ext/src/range.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-range-ext/src/range.c	(revision 270)
@@ -0,0 +1,191 @@
+#include "mruby.h"
+#include "mruby/range.h"
+#include <math.h>
+
+static mrb_bool
+r_le(mrb_state *mrb, mrb_value a, mrb_value b)
+{
+  mrb_value r = mrb_funcall(mrb, a, "<=>", 1, b); /* compare result */
+  /* output :a < b => -1, a = b =>  0, a > b => +1 */
+
+  if (mrb_fixnum_p(r)) {
+    mrb_int c = mrb_fixnum(r);
+    if (c == 0 || c == -1) return TRUE;
+  }
+
+  return FALSE;
+}
+
+static mrb_bool
+r_lt(mrb_state *mrb, mrb_value a, mrb_value b)
+{
+  mrb_value r = mrb_funcall(mrb, a, "<=>", 1, b);
+  /* output :a < b => -1, a = b =>  0, a > b => +1 */
+
+  return mrb_fixnum_p(r) && mrb_fixnum(r) == -1;
+}
+
+/*
+ *  call-seq:
+ *     rng.cover?(obj)  ->  true or false
+ *
+ *  Returns <code>true</code> if +obj+ is between the begin and end of
+ *  the range.
+ *
+ *  This tests <code>begin <= obj <= end</code> when #exclude_end? is +false+
+ *  and <code>begin <= obj < end</code> when #exclude_end? is +true+.
+ *
+ *     ("a".."z").cover?("c")    #=> true
+ *     ("a".."z").cover?("5")    #=> false
+ *     ("a".."z").cover?("cc")   #=> true
+ */
+static mrb_value
+mrb_range_cover(mrb_state *mrb, mrb_value range)
+{
+  mrb_value val;
+  struct RRange *r = mrb_range_ptr(range);
+  mrb_value beg, end;
+
+  mrb_get_args(mrb, "o", &val);
+
+  beg = r->edges->beg;
+  end = r->edges->end;
+
+  if (r_le(mrb, beg, val)) {
+    if (r->excl) {
+      if (r_lt(mrb, val, end))
+        return mrb_true_value();
+    }
+    else {
+      if (r_le(mrb, val, end))
+        return mrb_true_value();
+    }
+  }
+
+  return mrb_false_value();
+}
+
+/*
+ *  call-seq:
+ *     rng.first    -> obj
+ *     rng.first(n) -> an_array
+ *
+ *  Returns the first object in the range, or an array of the first +n+
+ *  elements.
+ *
+ *    (10..20).first     #=> 10
+ *    (10..20).first(3)  #=> [10, 11, 12]
+ */
+static mrb_value
+mrb_range_first(mrb_state *mrb, mrb_value range)
+{
+  mrb_int num;
+  mrb_value array;
+  struct RRange *r = mrb_range_ptr(range);
+
+  if (mrb_get_args(mrb, "|i", &num) == 0) {
+    return r->edges->beg;
+  }
+
+  array = mrb_funcall(mrb, range, "to_a", 0);
+  return mrb_funcall(mrb, array, "first", 1, mrb_fixnum_value(num));
+}
+
+/*
+ *  call-seq:
+ *     rng.last    -> obj
+ *     rng.last(n) -> an_array
+ *
+ *  Returns the last object in the range,
+ *  or an array of the last +n+ elements.
+ *
+ *  Note that with no arguments +last+ will return the object that defines
+ *  the end of the range even if #exclude_end? is +true+.
+ *
+ *    (10..20).last      #=> 20
+ *    (10...20).last     #=> 20
+ *    (10..20).last(3)   #=> [18, 19, 20]
+ *    (10...20).last(3)  #=> [17, 18, 19]
+ */
+static mrb_value
+mrb_range_last(mrb_state *mrb, mrb_value range)
+{
+  mrb_value num;
+  mrb_value array;
+  struct RRange *r = mrb_range_ptr(range);
+
+  if (mrb_get_args(mrb, "|o", &num) == 0) {
+    return r->edges->end;
+  }
+
+  array = mrb_funcall(mrb, range, "to_a", 0);
+  return mrb_funcall(mrb, array, "last", 1, mrb_to_int(mrb, num));
+}
+
+/*
+ *  call-seq:
+ *     rng.size                   -> num
+ *
+ *  Returns the number of elements in the range. Both the begin and the end of
+ *  the Range must be Numeric, otherwise nil is returned.
+ *
+ *    (10..20).size    #=> 11
+ *    ('a'..'z').size  #=> nil
+ */
+
+static mrb_value
+mrb_range_size(mrb_state *mrb, mrb_value range)
+{
+  struct RRange *r = mrb_range_ptr(range);
+  mrb_value beg, end;
+  double beg_f, end_f;
+  mrb_bool num_p = TRUE;
+
+  beg = r->edges->beg;
+  end = r->edges->end;
+  if (mrb_fixnum_p(beg)) {
+    beg_f = (double)mrb_fixnum(beg);
+  }
+  else if (mrb_float_p(beg)) {
+    beg_f = mrb_float(beg);
+  }
+  else {
+    num_p = FALSE;
+  }
+  if (mrb_fixnum_p(end)) {
+    end_f = (double)mrb_fixnum(end);
+  }
+  else if (mrb_float_p(end)) {
+    end_f = mrb_float(end);
+  }
+  else {
+    num_p = FALSE;
+  }
+  if (num_p) {
+    double f;
+
+    if (beg_f > end_f) return mrb_fixnum_value(0);
+    f = end_f - beg_f;
+    if (!r->excl) {
+      return mrb_fixnum_value((mrb_int)ceil(f + 1));
+    }
+    return mrb_fixnum_value((mrb_int)ceil(f));
+  }
+  return mrb_nil_value();
+}
+
+void
+mrb_mruby_range_ext_gem_init(mrb_state* mrb)
+{
+  struct RClass * s = mrb_class_get(mrb, "Range");
+
+  mrb_define_method(mrb, s, "cover?", mrb_range_cover, MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, s, "first",  mrb_range_first, MRB_ARGS_OPT(1));
+  mrb_define_method(mrb, s, "last",   mrb_range_last,  MRB_ARGS_OPT(1));
+  mrb_define_method(mrb, s, "size",   mrb_range_size,  MRB_ARGS_NONE());
+}
+
+void
+mrb_mruby_range_ext_gem_final(mrb_state* mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-range-ext/test/range.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-range-ext/test/range.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-range-ext/test/range.rb	(revision 270)
@@ -0,0 +1,29 @@
+##
+# Range(Ext) Test
+
+assert('Range#cover?') do
+  assert_true ("a".."z").cover?("c")
+  assert_true !("a".."z").cover?("5")
+  assert_true ("a".."z").cover?("cc")
+end
+
+assert('Range#first') do
+  assert_equal 10, (10..20).first
+  assert_equal [10, 11, 12], (10..20).first(3)
+end
+
+assert('Range#last') do
+  assert_equal 20, (10..20).last
+  assert_equal 20, (10...20).last
+  assert_equal [18, 19, 20], (10..20).last(3)
+  assert_equal [17, 18, 19], (10...20).last(3)
+end
+
+assert('Range#size') do
+  assert_equal 42, (1..42).size
+  assert_equal 41, (1...42).size
+  assert_equal 6, (1...6.3).size
+  assert_equal 5, (1...6.0).size
+  assert_equal 5, (1.1...6).size
+  assert_nil ('a'..'z').size
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-sprintf/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-sprintf/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-sprintf/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-sprintf') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'standard Kernel#sprintf method'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-sprintf/mrblib/string.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-sprintf/mrblib/string.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-sprintf/mrblib/string.rb	(revision 270)
@@ -0,0 +1,9 @@
+class String
+  def %(args)
+    if args.is_a? Array
+      sprintf(self, *args)
+    else
+      sprintf(self, args)
+    end
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-sprintf/src/kernel.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-sprintf/src/kernel.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-sprintf/src/kernel.c	(revision 270)
@@ -0,0 +1,30 @@
+/*
+** kernel.c - Kernel module suppliment
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+
+mrb_value mrb_f_sprintf(mrb_state *mrb, mrb_value obj); /* in sprintf.c */
+
+void
+mrb_mruby_sprintf_gem_init(mrb_state* mrb)
+{
+  struct RClass *krn;
+
+  if (mrb->kernel_module == NULL) {
+    mrb->kernel_module = mrb_define_module(mrb, "Kernel"); /* Might be PARANOID. */
+  }
+  krn = mrb->kernel_module;
+
+  mrb_define_method(mrb, krn, "sprintf", mrb_f_sprintf, MRB_ARGS_ANY());
+  mrb_define_method(mrb, krn, "format",  mrb_f_sprintf, MRB_ARGS_ANY());
+}
+
+void
+mrb_mruby_sprintf_gem_final(mrb_state* mrb)
+{
+  /* nothing to do. */
+}
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-sprintf/src/sprintf.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-sprintf/src/sprintf.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-sprintf/src/sprintf.c	(revision 270)
@@ -0,0 +1,1104 @@
+/*
+** sprintf.c - Kernel.#sprintf
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+
+#include <limits.h>
+#include <stdio.h>
+#include <string.h>
+#include "mruby/string.h"
+#include "mruby/hash.h"
+#include "mruby/numeric.h"
+#include <math.h>
+#include <ctype.h>
+
+#define BIT_DIGITS(N)   (((N)*146)/485 + 1)  /* log2(10) =~ 146/485 */
+#define BITSPERDIG MRB_INT_BIT
+#define EXTENDSIGN(n, l) (((~0 << (n)) >> (((n)*(l)) % BITSPERDIG)) & ~(~0 << (n)))
+
+mrb_value mrb_str_format(mrb_state *, int, const mrb_value *, mrb_value);
+static void fmt_setup(char*,size_t,int,int,mrb_int,mrb_int);
+
+static char*
+remove_sign_bits(char *str, int base)
+{
+  char *t;
+
+  t = str;
+  if (base == 16) {
+    while (*t == 'f') {
+      t++;
+    }
+  }
+  else if (base == 8) {
+    *t |= EXTENDSIGN(3, strlen(t));
+    while (*t == '7') {
+      t++;
+    }
+  }
+  else if (base == 2) {
+    while (*t == '1') {
+      t++;
+    }
+  }
+
+  return t;
+}
+
+static char
+sign_bits(int base, const char *p)
+{
+  char c;
+
+  switch (base) {
+  case 16:
+    if (*p == 'X') c = 'F';
+    else c = 'f';
+    break;
+  case 8:
+    c = '7'; break;
+  case 2:
+    c = '1'; break;
+  default:
+    c = '.'; break;
+  }
+  return c;
+}
+
+static mrb_value
+mrb_fix2binstr(mrb_state *mrb, mrb_value x, int base)
+{
+  char buf[64], *b = buf + sizeof buf;
+  mrb_int num = mrb_fixnum(x);
+  uint64_t val = (uint64_t)num;
+  char d;
+
+  if (base != 2) {
+    mrb_raisef(mrb, E_ARGUMENT_ERROR, "invalid radix %S", mrb_fixnum_value(base));
+  }
+
+  if (val >= (1 << 10))
+    val &= 0x3ff;
+
+  if (val == 0) {
+    return mrb_str_new_lit(mrb, "0");
+  }
+  *--b = '\0';
+  do {
+    *--b = mrb_digitmap[(int)(val % base)];
+  } while (val /= base);
+
+  if (num < 0) {
+    b = remove_sign_bits(b, base);
+    switch (base) {
+    case 16: d = 'f'; break;
+    case 8:  d = '7'; break;
+    case 2:  d = '1'; break;
+    default: d = 0;   break;
+    }
+
+    if (d && *b != d) {
+      *--b = d;
+    }
+  }
+
+  return mrb_str_new_cstr(mrb, b);
+}
+
+#define FNONE  0
+#define FSHARP 1
+#define FMINUS 2
+#define FPLUS  4
+#define FZERO  8
+#define FSPACE 16
+#define FWIDTH 32
+#define FPREC  64
+#define FPREC0 128
+
+#define CHECK(l) do {\
+/*  int cr = ENC_CODERANGE(result);*/\
+  while (blen + (l) >= bsiz) {\
+    bsiz*=2;\
+  }\
+  mrb_str_resize(mrb, result, bsiz);\
+/*  ENC_CODERANGE_SET(result, cr);*/\
+  buf = RSTRING_PTR(result);\
+} while (0)
+
+#define PUSH(s, l) do { \
+  CHECK(l);\
+  memcpy(&buf[blen], s, l);\
+  blen += (l);\
+} while (0)
+
+#define FILL(c, l) do { \
+  CHECK(l);\
+  memset(&buf[blen], c, l);\
+  blen += (l);\
+} while (0)
+
+#define GETARG() (!mrb_undef_p(nextvalue) ? nextvalue : \
+  posarg == -1 ? \
+  (mrb_raisef(mrb, E_ARGUMENT_ERROR, "unnumbered(%S) mixed with numbered", mrb_fixnum_value(nextarg)), mrb_undef_value()) : \
+  posarg == -2 ? \
+  (mrb_raisef(mrb, E_ARGUMENT_ERROR, "unnumbered(%S) mixed with named", mrb_fixnum_value(nextarg)), mrb_undef_value()) : \
+  (posarg = nextarg++, GETNTHARG(posarg)))
+
+#define GETPOSARG(n) (posarg > 0 ? \
+  (mrb_raisef(mrb, E_ARGUMENT_ERROR, "numbered(%S) after unnumbered(%S)", mrb_fixnum_value(n), mrb_fixnum_value(posarg)), mrb_undef_value()) : \
+  posarg == -2 ? \
+  (mrb_raisef(mrb, E_ARGUMENT_ERROR, "numbered(%S) after named", mrb_fixnum_value(n)), mrb_undef_value()) : \
+  ((n < 1) ? \
+  (mrb_raisef(mrb, E_ARGUMENT_ERROR, "invalid index - %S$", mrb_fixnum_value(n)), mrb_undef_value()) : \
+  (posarg = -1, GETNTHARG(n))))
+
+#define GETNTHARG(nth) \
+  ((nth >= argc) ? (mrb_raise(mrb, E_ARGUMENT_ERROR, "too few arguments"), mrb_undef_value()) : argv[nth])
+
+#define GETNAMEARG(id, name, len) ( \
+  posarg > 0 ? \
+  (mrb_raisef(mrb, E_ARGUMENT_ERROR, "named%S after unnumbered(%S)", mrb_str_new(mrb, (name), (len)), mrb_fixnum_value(posarg)), mrb_undef_value()) : \
+  posarg == -1 ? \
+  (mrb_raisef(mrb, E_ARGUMENT_ERROR, "named%S after numbered", mrb_str_new(mrb, (name), (len))), mrb_undef_value()) :    \
+  (posarg = -2, mrb_hash_fetch(mrb, get_hash(mrb, &hash, argc, argv), id, mrb_undef_value())))
+
+#define GETNUM(n, val) \
+  for (; p < end && ISDIGIT(*p); p++) {\
+    int next_n = 10 * n + (*p - '0'); \
+    if (next_n / 10 != n) {\
+      mrb_raise(mrb, E_ARGUMENT_ERROR, #val " too big"); \
+    } \
+    n = next_n; \
+  } \
+  if (p >= end) { \
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "malformed format string - %*[0-9]"); \
+  }
+
+#define GETASTER(num) do { \
+  mrb_value tmp_v; \
+  t = p++; \
+  n = 0; \
+  GETNUM(n, val); \
+  if (*p == '$') { \
+    tmp_v = GETPOSARG(n); \
+  } \
+  else { \
+    tmp_v = GETARG(); \
+    p = t; \
+  } \
+  num = mrb_fixnum(tmp_v); \
+} while (0)
+
+static mrb_value
+get_hash(mrb_state *mrb, mrb_value *hash, int argc, const mrb_value *argv)
+{
+  mrb_value tmp;
+
+  if (!mrb_undef_p(*hash)) return *hash;
+  if (argc != 2) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "one hash required");
+  }
+  tmp = mrb_check_convert_type(mrb, argv[1], MRB_TT_HASH, "Hash", "to_hash");
+  if (mrb_nil_p(tmp)) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "one hash required");
+  }
+  return (*hash = tmp);
+}
+
+/*
+ *  call-seq:
+ *     format(format_string [, arguments...] )   -> string
+ *     sprintf(format_string [, arguments...] )  -> string
+ *
+ *  Returns the string resulting from applying <i>format_string</i> to
+ *  any additional arguments.  Within the format string, any characters
+ *  other than format sequences are copied to the result.
+ *
+ *  The syntax of a format sequence is follows.
+ *
+ *    %[flags][width][.precision]type
+ *
+ *  A format
+ *  sequence consists of a percent sign, followed by optional flags,
+ *  width, and precision indicators, then terminated with a field type
+ *  character.  The field type controls how the corresponding
+ *  <code>sprintf</code> argument is to be interpreted, while the flags
+ *  modify that interpretation.
+ *
+ *  The field type characters are:
+ *
+ *      Field |  Integer Format
+ *      ------+--------------------------------------------------------------
+ *        b   | Convert argument as a binary number.
+ *            | Negative numbers will be displayed as a two's complement
+ *            | prefixed with '..1'.
+ *        B   | Equivalent to 'b', but uses an uppercase 0B for prefix
+ *            | in the alternative format by #.
+ *        d   | Convert argument as a decimal number.
+ *        i   | Identical to 'd'.
+ *        o   | Convert argument as an octal number.
+ *            | Negative numbers will be displayed as a two's complement
+ *            | prefixed with '..7'.
+ *        u   | Identical to 'd'.
+ *        x   | Convert argument as a hexadecimal number.
+ *            | Negative numbers will be displayed as a two's complement
+ *            | prefixed with '..f' (representing an infinite string of
+ *            | leading 'ff's).
+ *        X   | Equivalent to 'x', but uses uppercase letters.
+ *
+ *      Field |  Float Format
+ *      ------+--------------------------------------------------------------
+ *        e   | Convert floating point argument into exponential notation
+ *            | with one digit before the decimal point as [-]d.dddddde[+-]dd.
+ *            | The precision specifies the number of digits after the decimal
+ *            | point (defaulting to six).
+ *        E   | Equivalent to 'e', but uses an uppercase E to indicate
+ *            | the exponent.
+ *        f   | Convert floating point argument as [-]ddd.dddddd,
+ *            | where the precision specifies the number of digits after
+ *            | the decimal point.
+ *        g   | Convert a floating point number using exponential form
+ *            | if the exponent is less than -4 or greater than or
+ *            | equal to the precision, or in dd.dddd form otherwise.
+ *            | The precision specifies the number of significant digits.
+ *        G   | Equivalent to 'g', but use an uppercase 'E' in exponent form.
+ *        a   | Convert floating point argument as [-]0xh.hhhhp[+-]dd,
+ *            | which is consisted from optional sign, "0x", fraction part
+ *            | as hexadecimal, "p", and exponential part as decimal.
+ *        A   | Equivalent to 'a', but use uppercase 'X' and 'P'.
+ *
+ *      Field |  Other Format
+ *      ------+--------------------------------------------------------------
+ *        c   | Argument is the numeric code for a single character or
+ *            | a single character string itself.
+ *        p   | The valuing of argument.inspect.
+ *        s   | Argument is a string to be substituted.  If the format
+ *            | sequence contains a precision, at most that many characters
+ *            | will be copied.
+ *        %   | A percent sign itself will be displayed.  No argument taken.
+ *
+ *  The flags modifies the behavior of the formats.
+ *  The flag characters are:
+ *
+ *    Flag     | Applies to    | Meaning
+ *    ---------+---------------+-----------------------------------------
+ *    space    | bBdiouxX      | Leave a space at the start of
+ *             | aAeEfgG       | non-negative numbers.
+ *             | (numeric fmt) | For 'o', 'x', 'X', 'b' and 'B', use
+ *             |               | a minus sign with absolute value for
+ *             |               | negative values.
+ *    ---------+---------------+-----------------------------------------
+ *    (digit)$ | all           | Specifies the absolute argument number
+ *             |               | for this field.  Absolute and relative
+ *             |               | argument numbers cannot be mixed in a
+ *             |               | sprintf string.
+ *    ---------+---------------+-----------------------------------------
+ *     #       | bBoxX         | Use an alternative format.
+ *             | aAeEfgG       | For the conversions 'o', increase the precision
+ *             |               | until the first digit will be '0' if
+ *             |               | it is not formatted as complements.
+ *             |               | For the conversions 'x', 'X', 'b' and 'B'
+ *             |               | on non-zero, prefix the result with "0x",
+ *             |               | "0X", "0b" and "0B", respectively.
+ *             |               | For 'a', 'A', 'e', 'E', 'f', 'g', and 'G',
+ *             |               | force a decimal point to be added,
+ *             |               | even if no digits follow.
+ *             |               | For 'g' and 'G', do not remove trailing zeros.
+ *    ---------+---------------+-----------------------------------------
+ *    +        | bBdiouxX      | Add a leading plus sign to non-negative
+ *             | aAeEfgG       | numbers.
+ *             | (numeric fmt) | For 'o', 'x', 'X', 'b' and 'B', use
+ *             |               | a minus sign with absolute value for
+ *             |               | negative values.
+ *    ---------+---------------+-----------------------------------------
+ *    -        | all           | Left-justify the result of this conversion.
+ *    ---------+---------------+-----------------------------------------
+ *    0 (zero) | bBdiouxX      | Pad with zeros, not spaces.
+ *             | aAeEfgG       | For 'o', 'x', 'X', 'b' and 'B', radix-1
+ *             | (numeric fmt) | is used for negative numbers formatted as
+ *             |               | complements.
+ *    ---------+---------------+-----------------------------------------
+ *    *        | all           | Use the next argument as the field width.
+ *             |               | If negative, left-justify the result. If the
+ *             |               | asterisk is followed by a number and a dollar
+ *             |               | sign, use the indicated argument as the width.
+ *
+ *  Examples of flags:
+ *
+ *   # '+' and space flag specifies the sign of non-negative numbers.
+ *   sprintf("%d", 123)  #=> "123"
+ *   sprintf("%+d", 123) #=> "+123"
+ *   sprintf("% d", 123) #=> " 123"
+ *
+ *   # '#' flag for 'o' increases number of digits to show '0'.
+ *   # '+' and space flag changes format of negative numbers.
+ *   sprintf("%o", 123)   #=> "173"
+ *   sprintf("%#o", 123)  #=> "0173"
+ *   sprintf("%+o", -123) #=> "-173"
+ *   sprintf("%o", -123)  #=> "..7605"
+ *   sprintf("%#o", -123) #=> "..7605"
+ *
+ *   # '#' flag for 'x' add a prefix '0x' for non-zero numbers.
+ *   # '+' and space flag disables complements for negative numbers.
+ *   sprintf("%x", 123)   #=> "7b"
+ *   sprintf("%#x", 123)  #=> "0x7b"
+ *   sprintf("%+x", -123) #=> "-7b"
+ *   sprintf("%x", -123)  #=> "..f85"
+ *   sprintf("%#x", -123) #=> "0x..f85"
+ *   sprintf("%#x", 0)    #=> "0"
+ *
+ *   # '#' for 'X' uses the prefix '0X'.
+ *   sprintf("%X", 123)  #=> "7B"
+ *   sprintf("%#X", 123) #=> "0X7B"
+ *
+ *   # '#' flag for 'b' add a prefix '0b' for non-zero numbers.
+ *   # '+' and space flag disables complements for negative numbers.
+ *   sprintf("%b", 123)   #=> "1111011"
+ *   sprintf("%#b", 123)  #=> "0b1111011"
+ *   sprintf("%+b", -123) #=> "-1111011"
+ *   sprintf("%b", -123)  #=> "..10000101"
+ *   sprintf("%#b", -123) #=> "0b..10000101"
+ *   sprintf("%#b", 0)    #=> "0"
+ *
+ *   # '#' for 'B' uses the prefix '0B'.
+ *   sprintf("%B", 123)  #=> "1111011"
+ *   sprintf("%#B", 123) #=> "0B1111011"
+ *
+ *   # '#' for 'e' forces to show the decimal point.
+ *   sprintf("%.0e", 1)  #=> "1e+00"
+ *   sprintf("%#.0e", 1) #=> "1.e+00"
+ *
+ *   # '#' for 'f' forces to show the decimal point.
+ *   sprintf("%.0f", 1234)  #=> "1234"
+ *   sprintf("%#.0f", 1234) #=> "1234."
+ *
+ *   # '#' for 'g' forces to show the decimal point.
+ *   # It also disables stripping lowest zeros.
+ *   sprintf("%g", 123.4)   #=> "123.4"
+ *   sprintf("%#g", 123.4)  #=> "123.400"
+ *   sprintf("%g", 123456)  #=> "123456"
+ *   sprintf("%#g", 123456) #=> "123456."
+ *
+ *  The field width is an optional integer, followed optionally by a
+ *  period and a precision.  The width specifies the minimum number of
+ *  characters that will be written to the result for this field.
+ *
+ *  Examples of width:
+ *
+ *   # padding is done by spaces,       width=20
+ *   # 0 or radix-1.             <------------------>
+ *   sprintf("%20d", 123)   #=> "                 123"
+ *   sprintf("%+20d", 123)  #=> "                +123"
+ *   sprintf("%020d", 123)  #=> "00000000000000000123"
+ *   sprintf("%+020d", 123) #=> "+0000000000000000123"
+ *   sprintf("% 020d", 123) #=> " 0000000000000000123"
+ *   sprintf("%-20d", 123)  #=> "123                 "
+ *   sprintf("%-+20d", 123) #=> "+123                "
+ *   sprintf("%- 20d", 123) #=> " 123                "
+ *   sprintf("%020x", -123) #=> "..ffffffffffffffff85"
+ *
+ *  For
+ *  numeric fields, the precision controls the number of decimal places
+ *  displayed.  For string fields, the precision determines the maximum
+ *  number of characters to be copied from the string.  (Thus, the format
+ *  sequence <code>%10.10s</code> will always contribute exactly ten
+ *  characters to the result.)
+ *
+ *  Examples of precisions:
+ *
+ *   # precision for 'd', 'o', 'x' and 'b' is
+ *   # minimum number of digits               <------>
+ *   sprintf("%20.8d", 123)  #=> "            00000123"
+ *   sprintf("%20.8o", 123)  #=> "            00000173"
+ *   sprintf("%20.8x", 123)  #=> "            0000007b"
+ *   sprintf("%20.8b", 123)  #=> "            01111011"
+ *   sprintf("%20.8d", -123) #=> "           -00000123"
+ *   sprintf("%20.8o", -123) #=> "            ..777605"
+ *   sprintf("%20.8x", -123) #=> "            ..ffff85"
+ *   sprintf("%20.8b", -11)  #=> "            ..110101"
+ *
+ *   # "0x" and "0b" for '#x' and '#b' is not counted for
+ *   # precision but "0" for '#o' is counted.  <------>
+ *   sprintf("%#20.8d", 123)  #=> "            00000123"
+ *   sprintf("%#20.8o", 123)  #=> "            00000173"
+ *   sprintf("%#20.8x", 123)  #=> "          0x0000007b"
+ *   sprintf("%#20.8b", 123)  #=> "          0b01111011"
+ *   sprintf("%#20.8d", -123) #=> "           -00000123"
+ *   sprintf("%#20.8o", -123) #=> "            ..777605"
+ *   sprintf("%#20.8x", -123) #=> "          0x..ffff85"
+ *   sprintf("%#20.8b", -11)  #=> "          0b..110101"
+ *
+ *   # precision for 'e' is number of
+ *   # digits after the decimal point           <------>
+ *   sprintf("%20.8e", 1234.56789) #=> "      1.23456789e+03"
+ *
+ *   # precision for 'f' is number of
+ *   # digits after the decimal point               <------>
+ *   sprintf("%20.8f", 1234.56789) #=> "       1234.56789000"
+ *
+ *   # precision for 'g' is number of
+ *   # significant digits                          <------->
+ *   sprintf("%20.8g", 1234.56789) #=> "           1234.5679"
+ *
+ *   #                                         <------->
+ *   sprintf("%20.8g", 123456789)  #=> "       1.2345679e+08"
+ *
+ *   # precision for 's' is
+ *   # maximum number of characters                    <------>
+ *   sprintf("%20.8s", "string test") #=> "            string t"
+ *
+ *  Examples:
+ *
+ *     sprintf("%d %04x", 123, 123)               #=> "123 007b"
+ *     sprintf("%08b '%4s'", 123, 123)            #=> "01111011 ' 123'"
+ *     sprintf("%1$*2$s %2$d %1$s", "hello", 8)   #=> "   hello 8 hello"
+ *     sprintf("%1$*2$s %2$d", "hello", -8)       #=> "hello    -8"
+ *     sprintf("%+g:% g:%-g", 1.23, 1.23, 1.23)   #=> "+1.23: 1.23:1.23"
+ *     sprintf("%u", -123)                        #=> "-123"
+ *
+ *  For more complex formatting, Ruby supports a reference by name.
+ *  %<name>s style uses format style, but %{name} style doesn't.
+ *
+ *  Exapmles:
+ *    sprintf("%<foo>d : %<bar>f", { :foo => 1, :bar => 2 })
+ *      #=> 1 : 2.000000
+ *    sprintf("%{foo}f", { :foo => 1 })
+ *      # => "1f"
+ */
+
+mrb_value
+mrb_f_sprintf(mrb_state *mrb, mrb_value obj)
+{
+  mrb_int argc;
+  mrb_value *argv;
+
+  mrb_get_args(mrb, "*", &argv, &argc);
+
+  if (argc <= 0) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "too few arguments");
+    return mrb_nil_value();
+  }
+  else {
+    return mrb_str_format(mrb, argc - 1, argv + 1, argv[0]);
+  }
+}
+
+mrb_value
+mrb_str_format(mrb_state *mrb, int argc, const mrb_value *argv, mrb_value fmt)
+{
+  const char *p, *end;
+  char *buf;
+  mrb_int blen;
+  mrb_int bsiz;
+  mrb_value result;
+  mrb_int n;
+  mrb_int width;
+  mrb_int prec;
+  int flags = FNONE;
+  int nextarg = 1;
+  int posarg = 0;
+  mrb_value nextvalue;
+  mrb_value str;
+  mrb_value hash = mrb_undef_value();
+
+#define CHECK_FOR_WIDTH(f)                                                  \
+  if ((f) & FWIDTH) {                                                       \
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "width given twice");         \
+  }                                                                         \
+  if ((f) & FPREC0) {                                                       \
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "width after precision");     \
+  }
+#define CHECK_FOR_FLAGS(f)                                                  \
+  if ((f) & FWIDTH) {                                                       \
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "flag after width");          \
+  }                                                                         \
+  if ((f) & FPREC0) {                                                       \
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "flag after precision");      \
+  }
+
+  ++argc;
+  --argv;
+  fmt = mrb_str_to_str(mrb, fmt);
+  p = RSTRING_PTR(fmt);
+  end = p + RSTRING_LEN(fmt);
+  blen = 0;
+  bsiz = 120;
+  result = mrb_str_buf_new(mrb, bsiz);
+  buf = RSTRING_PTR(result);
+  memset(buf, 0, bsiz);
+
+  for (; p < end; p++) {
+    const char *t;
+    mrb_sym id = 0;
+
+    for (t = p; t < end && *t != '%'; t++) ;
+    PUSH(p, t - p);
+    if (t >= end)
+      goto sprint_exit; /* end of fmt string */
+
+    p = t + 1;    /* skip '%' */
+
+    width = prec = -1;
+    nextvalue = mrb_undef_value();
+
+retry:
+    switch (*p) {
+      default:
+        mrb_raisef(mrb, E_ARGUMENT_ERROR, "malformed format string - \\%%S", mrb_str_new(mrb, p, 1));
+        break;
+
+      case ' ':
+        CHECK_FOR_FLAGS(flags);
+        flags |= FSPACE;
+        p++;
+        goto retry;
+
+      case '#':
+        CHECK_FOR_FLAGS(flags);
+        flags |= FSHARP;
+        p++;
+        goto retry;
+
+      case '+':
+        CHECK_FOR_FLAGS(flags);
+        flags |= FPLUS;
+        p++;
+        goto retry;
+
+      case '-':
+        CHECK_FOR_FLAGS(flags);
+        flags |= FMINUS;
+        p++;
+        goto retry;
+
+      case '0':
+        CHECK_FOR_FLAGS(flags);
+        flags |= FZERO;
+        p++;
+        goto retry;
+
+      case '1': case '2': case '3': case '4':
+      case '5': case '6': case '7': case '8': case '9':
+        n = 0;
+        GETNUM(n, width);
+        if (*p == '$') {
+          if (!mrb_undef_p(nextvalue)) {
+            mrb_raisef(mrb, E_ARGUMENT_ERROR, "value given twice - %S$", mrb_fixnum_value(n));
+          }
+          nextvalue = GETPOSARG(n);
+          p++;
+          goto retry;
+        }
+        CHECK_FOR_WIDTH(flags);
+        width = n;
+        flags |= FWIDTH;
+        goto retry;
+
+      case '<':
+      case '{': {
+        const char *start = p;
+        char term = (*p == '<') ? '>' : '}';
+        mrb_value symname;
+
+        for (; p < end && *p != term; )
+          p++;
+        if (id) {
+          mrb_raisef(mrb, E_ARGUMENT_ERROR, "name%S after <%S>",
+                     mrb_str_new(mrb, start, p - start + 1), mrb_sym2str(mrb, id));
+        }
+        symname = mrb_str_new(mrb, start + 1, p - start - 1);
+        id = mrb_intern_str(mrb, symname);
+        nextvalue = GETNAMEARG(mrb_symbol_value(id), start, (int)(p - start + 1));
+        if (mrb_undef_p(nextvalue)) {
+          mrb_raisef(mrb, E_KEY_ERROR, "key%S not found", mrb_str_new(mrb, start, p - start + 1));
+        }
+        if (term == '}') goto format_s;
+        p++;
+        goto retry;
+      }
+
+      case '*':
+        CHECK_FOR_WIDTH(flags);
+        flags |= FWIDTH;
+        GETASTER(width);
+        if (width < 0) {
+          flags |= FMINUS;
+          width = -width;
+        }
+        p++;
+        goto retry;
+
+      case '.':
+        if (flags & FPREC0) {
+          mrb_raise(mrb, E_ARGUMENT_ERROR, "precision given twice");
+        }
+        flags |= FPREC|FPREC0;
+
+        prec = 0;
+        p++;
+        if (*p == '*') {
+          GETASTER(prec);
+          if (prec < 0) {  /* ignore negative precision */
+            flags &= ~FPREC;
+          }
+          p++;
+          goto retry;
+        }
+
+        GETNUM(prec, precision);
+        goto retry;
+
+      case '\n':
+      case '\0':
+        p--;
+        /* fallthrough */
+      case '%':
+        if (flags != FNONE) {
+          mrb_raise(mrb, E_ARGUMENT_ERROR, "invalid format character - %");
+        }
+        PUSH("%", 1);
+        break;
+
+      case 'c': {
+        mrb_value val = GETARG();
+        mrb_value tmp;
+        char *c;
+
+        tmp = mrb_check_string_type(mrb, val);
+        if (!mrb_nil_p(tmp)) {
+          if (mrb_fixnum(mrb_funcall(mrb, tmp, "size", 0)) != 1 ) {
+            mrb_raise(mrb, E_ARGUMENT_ERROR, "%c requires a character");
+          }
+        }
+        else if (mrb_fixnum_p(val)) {
+          tmp = mrb_funcall(mrb, val, "chr", 0);
+        }
+        else {
+          mrb_raise(mrb, E_ARGUMENT_ERROR, "invalid character");
+        }
+        c = RSTRING_PTR(tmp);
+        n = RSTRING_LEN(tmp);
+        if (!(flags & FWIDTH)) {
+          CHECK(n);
+          memcpy(buf+blen, c, n);
+          blen += n;
+        }
+        else if ((flags & FMINUS)) {
+          CHECK(n);
+          memcpy(buf+blen, c, n);
+          blen += n;
+          FILL(' ', width-1);
+        }
+        else {
+          FILL(' ', width-1);
+          CHECK(n);
+          memcpy(buf+blen, c, n);
+          blen += n;
+        }
+      }
+      break;
+
+      case 's':
+      case 'p':
+  format_s:
+      {
+        mrb_value arg = GETARG();
+        mrb_int len;
+        mrb_int slen;
+
+        if (*p == 'p') arg = mrb_inspect(mrb, arg);
+        str = mrb_obj_as_string(mrb, arg);
+        len = RSTRING_LEN(str);
+        if (RSTRING(result)->flags & MRB_STR_EMBED) {
+          mrb_int tmp_n = len;
+          RSTRING(result)->flags &= ~MRB_STR_EMBED_LEN_MASK;
+          RSTRING(result)->flags |= tmp_n << MRB_STR_EMBED_LEN_SHIFT;
+        } else {
+          RSTRING(result)->as.heap.len = blen;
+        }
+        if (flags&(FPREC|FWIDTH)) {
+          slen = RSTRING_LEN(str);
+          if (slen < 0) {
+            mrb_raise(mrb, E_ARGUMENT_ERROR, "invalid mbstring sequence");
+          }
+          if ((flags&FPREC) && (prec < slen)) {
+            char *p = RSTRING_PTR(str) + prec;
+            slen = prec;
+            len = p - RSTRING_PTR(str);
+          }
+          /* need to adjust multi-byte string pos */
+          if ((flags&FWIDTH) && (width > slen)) {
+            width -= (int)slen;
+            if (!(flags&FMINUS)) {
+              CHECK(width);
+              while (width--) {
+                buf[blen++] = ' ';
+              }
+            }
+            CHECK(len);
+            memcpy(&buf[blen], RSTRING_PTR(str), len);
+            blen += len;
+            if (flags&FMINUS) {
+              CHECK(width);
+              while (width--) {
+                buf[blen++] = ' ';
+              }
+            }
+            break;
+          }
+        }
+        PUSH(RSTRING_PTR(str), len);
+      }
+      break;
+
+      case 'd':
+      case 'i':
+      case 'o':
+      case 'x':
+      case 'X':
+      case 'b':
+      case 'B':
+      case 'u': {
+        mrb_value val = GETARG();
+        char fbuf[32], nbuf[64], *s;
+        const char *prefix = NULL;
+        int sign = 0, dots = 0;
+        char sc = 0;
+        mrb_int v = 0, org_v = 0;
+        int base;
+        mrb_int len;
+
+        switch (*p) {
+          case 'd':
+          case 'i':
+          case 'u':
+            sign = 1; break;
+          case 'o':
+          case 'x':
+          case 'X':
+          case 'b':
+          case 'B':
+            if (flags&(FPLUS|FSPACE)) sign = 1;
+            break;
+          default:
+            break;
+        }
+        if (flags & FSHARP) {
+          switch (*p) {
+            case 'o': prefix = "0"; break;
+            case 'x': prefix = "0x"; break;
+            case 'X': prefix = "0X"; break;
+            case 'b': prefix = "0b"; break;
+            case 'B': prefix = "0B"; break;
+            default: break;
+          }
+        }
+
+  bin_retry:
+        switch (mrb_type(val)) {
+          case MRB_TT_FLOAT:
+            if (FIXABLE(mrb_float(val))) {
+              val = mrb_fixnum_value((mrb_int)mrb_float(val));
+              goto bin_retry;
+            }
+            val = mrb_flo_to_fixnum(mrb, val);
+            if (mrb_fixnum_p(val)) goto bin_retry;
+            break;
+          case MRB_TT_STRING:
+            val = mrb_str_to_inum(mrb, val, 0, TRUE);
+            goto bin_retry;
+          case MRB_TT_FIXNUM:
+            v = mrb_fixnum(val);
+            break;
+          default:
+            val = mrb_Integer(mrb, val);
+            goto bin_retry;
+        }
+
+        switch (*p) {
+          case 'o':
+            base = 8; break;
+          case 'x':
+          case 'X':
+            base = 16; break;
+          case 'b':
+          case 'B':
+            base = 2; break;
+          case 'u':
+          case 'd':
+          case 'i':
+          default:
+            base = 10; break;
+        }
+
+        if (base == 2) {
+          org_v = v;
+          if (v < 0 && !sign) {
+            val = mrb_fix2binstr(mrb, mrb_fixnum_value(v), base);
+            dots = 1;
+          }
+          else {
+            val = mrb_fixnum_to_str(mrb, mrb_fixnum_value(v), base);
+          }
+          v = mrb_fixnum(mrb_str_to_inum(mrb, val, 10, FALSE));
+        }
+        if (sign) {
+          char c = *p;
+          if (c == 'i') c = 'd'; /* %d and %i are identical */
+          if (base == 2) c = 'd';
+          if (v < 0) {
+            v = -v;
+            sc = '-';
+            width--;
+          }
+          else if (flags & FPLUS) {
+            sc = '+';
+            width--;
+          }
+          else if (flags & FSPACE) {
+            sc = ' ';
+            width--;
+          }
+          snprintf(fbuf, sizeof(fbuf), "%%l%c", c);
+          snprintf(nbuf, sizeof(nbuf), fbuf, v);
+          s = nbuf;
+        }
+        else {
+          char c = *p;
+          if (c == 'X') c = 'x';
+          if (base == 2) c = 'd';
+          s = nbuf;
+          if (v < 0) {
+            dots = 1;
+          }
+          snprintf(fbuf, sizeof(fbuf), "%%l%c", c);
+          snprintf(++s, sizeof(nbuf) - 1, fbuf, v);
+          if (v < 0) {
+            char d;
+
+            s = remove_sign_bits(s, base);
+            switch (base) {
+              case 16: d = 'f'; break;
+              case 8:  d = '7'; break;
+              case 2:  d = '1'; break;
+              default: d = 0; break;
+            }
+
+            if (d && *s != d) {
+              *--s = d;
+            }
+          }
+        }
+        {
+          size_t size;
+          size = strlen(s);
+          /* PARANOID: assert(size <= MRB_INT_MAX) */
+          len = (mrb_int)size;
+        }
+
+        if (dots) {
+          prec -= 2;
+          width -= 2;
+        }
+
+        if (*p == 'X') {
+          char *pp = s;
+          int c;
+          while ((c = (int)(unsigned char)*pp) != 0) {
+            *pp = toupper(c);
+            pp++;
+          }
+        }
+
+        if (prefix && !prefix[1]) { /* octal */
+          if (dots) {
+            prefix = NULL;
+          }
+          else if (len == 1 && *s == '0') {
+            len = 0;
+            if (flags & FPREC) prec--;
+          }
+          else if ((flags & FPREC) && (prec > len)) {
+            prefix = NULL;
+          }
+        }
+        else if (len == 1 && *s == '0') {
+          prefix = NULL;
+        }
+
+        if (prefix) {
+          size_t size;
+          size = strlen(prefix);
+          /* PARANOID: assert(size <= MRB_INT_MAX).
+           *  this check is absolutely paranoid. */
+          width -= (mrb_int)size;
+        }
+
+        if ((flags & (FZERO|FMINUS|FPREC)) == FZERO) {
+          prec = width;
+          width = 0;
+        }
+        else {
+          if (prec < len) {
+            if (!prefix && prec == 0 && len == 1 && *s == '0') len = 0;
+            prec = len;
+          }
+          width -= prec;
+        }
+
+        if (!(flags&FMINUS)) {
+          CHECK(width);
+          while (width-- > 0) {
+            buf[blen++] = ' ';
+          }
+        }
+
+        if (sc) PUSH(&sc, 1);
+
+        if (prefix) {
+          int plen = (int)strlen(prefix);
+          PUSH(prefix, plen);
+        }
+        CHECK(prec - len);
+        if (dots) PUSH("..", 2);
+
+        if (v < 0 || (base == 2 && org_v < 0)) {
+          char c = sign_bits(base, p);
+          while (len < prec--) {
+            buf[blen++] = c;
+          }
+        }
+        else if ((flags & (FMINUS|FPREC)) != FMINUS) {
+          char c = '0';
+          while (len < prec--) {
+            buf[blen++] = c;
+          }
+        }
+
+        PUSH(s, len);
+        CHECK(width);
+        while (width-- > 0) {
+          buf[blen++] = ' ';
+        }
+      }
+      break;
+
+      case 'f':
+      case 'g':
+      case 'G':
+      case 'e':
+      case 'E':
+      case 'a':
+      case 'A': {
+        mrb_value val = GETARG();
+        double fval;
+        int i, need = 6;
+        char fbuf[32];
+
+        fval = mrb_float(mrb_Float(mrb, val));
+        if (!isfinite(fval)) {
+          const char *expr;
+          const int elen = 3;
+
+          if (isnan(fval)) {
+            expr = "NaN";
+          }
+          else {
+            expr = "Inf";
+          }
+          need = elen;
+          if ((!isnan(fval) && fval < 0.0) || (flags & FPLUS))
+            need++;
+          if ((flags & FWIDTH) && need < width)
+            need = width;
+
+          CHECK(need + 1);
+          snprintf(&buf[blen], need + 1, "%*s", need, "");
+          if (flags & FMINUS) {
+            if (!isnan(fval) && fval < 0.0)
+              buf[blen++] = '-';
+            else if (flags & FPLUS)
+              buf[blen++] = '+';
+            else if (flags & FSPACE)
+              blen++;
+            memcpy(&buf[blen], expr, elen);
+          }
+          else {
+            if (!isnan(fval) && fval < 0.0)
+              buf[blen + need - elen - 1] = '-';
+            else if (flags & FPLUS)
+              buf[blen + need - elen - 1] = '+';
+            else if ((flags & FSPACE) && need > width)
+              blen++;
+            memcpy(&buf[blen + need - elen], expr, elen);
+          }
+          blen += strlen(&buf[blen]);
+          break;
+        }
+
+        fmt_setup(fbuf, sizeof(fbuf), *p, flags, width, prec);
+        need = 0;
+        if (*p != 'e' && *p != 'E') {
+          i = INT_MIN;
+          frexp(fval, &i);
+          if (i > 0)
+            need = BIT_DIGITS(i);
+        }
+        need += (flags&FPREC) ? prec : 6;
+        if ((flags&FWIDTH) && need < width)
+          need = width;
+        need += 20;
+
+        CHECK(need);
+        n = snprintf(&buf[blen], need, fbuf, fval);
+        blen += n;
+      }
+      break;
+    }
+    flags = FNONE;
+  }
+
+  sprint_exit:
+#if 0
+  /* XXX - We cannot validate the number of arguments if (digit)$ style used.
+   */
+  if (posarg >= 0 && nextarg < argc) {
+    const char *mesg = "too many arguments for format string";
+    if (mrb_test(ruby_debug)) mrb_raise(mrb, E_ARGUMENT_ERROR, mesg);
+    if (mrb_test(ruby_verbose)) mrb_warn(mrb, "%S", mrb_str_new_cstr(mrb, mesg));
+  }
+#endif
+  mrb_str_resize(mrb, result, blen);
+
+  return result;
+}
+
+static void
+fmt_setup(char *buf, size_t size, int c, int flags, mrb_int width, mrb_int prec)
+{
+  char *end = buf + size;
+  int n;
+
+  *buf++ = '%';
+  if (flags & FSHARP) *buf++ = '#';
+  if (flags & FPLUS)  *buf++ = '+';
+  if (flags & FMINUS) *buf++ = '-';
+  if (flags & FZERO)  *buf++ = '0';
+  if (flags & FSPACE) *buf++ = ' ';
+
+  if (flags & FWIDTH) {
+    n = snprintf(buf, end - buf, "%d", (int)width);
+    buf += n;
+  }
+
+  if (flags & FPREC) {
+    n = snprintf(buf, end - buf, ".%d", (int)prec);
+    buf += n;
+  }
+
+  *buf++ = c;
+  *buf = '\0';
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-sprintf/test/sprintf.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-sprintf/test/sprintf.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-sprintf/test/sprintf.rb	(revision 270)
@@ -0,0 +1,8 @@
+#assert('Kernel.sprintf') do
+#end
+
+assert('String#%') do
+  assert_equal "one=1", "one=%d" % 1
+  assert_equal "1 one 1.0", "%d %s %3.1f" % [ 1, "one", 1.01 ]
+  assert_equal "123 < 456", "%{num} < %<str>s" % { num: 123, str: "456" }
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-string-ext/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-string-ext/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-string-ext/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-string-ext') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'String class extension'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-string-ext/mrblib/string.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-string-ext/mrblib/string.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-string-ext/mrblib/string.rb	(revision 270)
@@ -0,0 +1,339 @@
+class String
+
+  ##
+  # call-seq:
+  #    string.clear    ->  string
+  #
+  # Makes string empty.
+  #
+  #    a = "abcde"
+  #    a.clear    #=> ""
+  #
+  def clear
+    self.replace("")
+  end
+
+  ##
+  # call-seq:
+  #    str.lstrip   -> new_str
+  #
+  # Returns a copy of <i>str</i> with leading whitespace removed. See also
+  # <code>String#rstrip</code> and <code>String#strip</code>.
+  #
+  #    "  hello  ".lstrip   #=> "hello  "
+  #    "hello".lstrip       #=> "hello"
+  #
+  def lstrip
+    a = 0
+    z = self.size - 1
+    a += 1 while " \f\n\r\t\v".include?(self[a]) and a <= z
+    (z >= 0) ? self[a..z] : ""
+  end
+
+  ##
+  # call-seq:
+  #    str.rstrip   -> new_str
+  #
+  # Returns a copy of <i>str</i> with trailing whitespace removed. See also
+  # <code>String#lstrip</code> and <code>String#strip</code>.
+  #
+  #    "  hello  ".rstrip   #=> "  hello"
+  #    "hello".rstrip       #=> "hello"
+  #
+  def rstrip
+    a = 0
+    z = self.size - 1
+    z -= 1 while " \f\n\r\t\v\0".include?(self[z]) and a <= z
+    (z >= 0) ? self[a..z] : ""
+  end
+
+  ##
+  # call-seq:
+  #    str.strip   -> new_str
+  #
+  # Returns a copy of <i>str</i> with leading and trailing whitespace removed.
+  #
+  #    "    hello    ".strip   #=> "hello"
+  #    "\tgoodbye\r\n".strip   #=> "goodbye"
+  #
+  def strip
+    a = 0
+    z = self.size - 1
+    a += 1 while " \f\n\r\t\v".include?(self[a]) and a <= z
+    z -= 1 while " \f\n\r\t\v\0".include?(self[z]) and a <= z
+    (z >= 0) ? self[a..z] : ""
+  end
+
+  ##
+  # call-seq:
+  #    str.lstrip!   -> self or nil
+  #
+  # Removes leading whitespace from <i>str</i>, returning <code>nil</code> if no
+  # change was made. See also <code>String#rstrip!</code> and
+  # <code>String#strip!</code>.
+  #
+  #    "  hello  ".lstrip   #=> "hello  "
+  #    "hello".lstrip!      #=> nil
+  #
+  def lstrip!
+    s = self.lstrip
+    (s == self) ? nil : self.replace(s)
+  end
+
+  ##
+  # call-seq:
+  #    str.rstrip!   -> self or nil
+  #
+  # Removes trailing whitespace from <i>str</i>, returning <code>nil</code> if
+  # no change was made. See also <code>String#lstrip!</code> and
+  # <code>String#strip!</code>.
+  #
+  #    "  hello  ".rstrip   #=> "  hello"
+  #    "hello".rstrip!      #=> nil
+  #
+  def rstrip!
+    s = self.rstrip
+    (s == self) ? nil : self.replace(s)
+  end
+
+  ##
+  #  call-seq:
+  #     str.strip!   -> str or nil
+  #
+  #  Removes leading and trailing whitespace from <i>str</i>. Returns
+  #  <code>nil</code> if <i>str</i> was not altered.
+  #
+  def strip!
+    s = self.strip
+    (s == self) ? nil : self.replace(s)
+  end
+
+  ##
+  # call-seq:
+  #    str.casecmp(other_str)   -> -1, 0, +1 or nil
+  #
+  # Case-insensitive version of <code>String#<=></code>.
+  #
+  #    "abcdef".casecmp("abcde")     #=> 1
+  #    "aBcDeF".casecmp("abcdef")    #=> 0
+  #    "abcdef".casecmp("abcdefg")   #=> -1
+  #    "abcdef".casecmp("ABCDEF")    #=> 0
+  #
+  def casecmp(str)
+    self.downcase <=> str.to_str.downcase
+  rescue NoMethodError
+    raise TypeError, "no implicit conversion of #{str.class} into String"
+  end
+
+  def partition(sep)
+    raise TypeError, "type mismatch: #{sep.class} given" unless sep.is_a? String
+    n = index(sep)
+    unless n.nil?
+      m = n + sep.size
+      [ slice(0, n), sep, slice(m, size - m) ]
+    else
+      [ self, "", "" ]
+    end
+  end
+
+  def rpartition(sep)
+    raise TypeError, "type mismatch: #{sep.class} given" unless sep.is_a? String
+    n = rindex(sep)
+    unless n.nil?
+      m = n + sep.size
+      [ slice(0, n), sep, slice(m, size - m) ]
+    else
+      [ "", "", self ]
+    end
+  end
+
+  ##
+  # call-seq:
+  #    str.slice!(fixnum)           -> new_str or nil
+  #    str.slice!(fixnum, fixnum)   -> new_str or nil
+  #    str.slice!(range)            -> new_str or nil
+  #    str.slice!(other_str)        -> new_str or nil
+  #
+  # Deletes the specified portion from <i>str</i>, and returns the portion
+  # deleted.
+  #
+  #    string = "this is a string"
+  #    string.slice!(2)        #=> "i"
+  #    string.slice!(3..6)     #=> " is "
+  #    string.slice!("r")      #=> "r"
+  #    string                  #=> "thsa sting"
+  #
+  def slice!(arg1, arg2=nil)
+    raise "wrong number of arguments (for 1..2)" if arg1.nil? && arg2.nil?
+
+    if !arg1.nil? && !arg2.nil?
+      idx = arg1
+      idx += self.size if arg1 < 0
+      if idx >= 0 && idx <= self.size && arg2 > 0
+        str = self[idx, arg2]
+      else
+        return nil
+      end
+    else
+      validated = false
+      if arg1.kind_of?(Range)
+        beg = arg1.begin
+        ed = arg1.end
+        beg += self.size if beg < 0
+        ed += self.size if ed < 0
+        ed -= 1 if arg1.exclude_end?
+        validated = true
+      elsif arg1.kind_of?(String)
+        validated = true
+      else
+        idx = arg1
+        idx += self.size if arg1 < 0
+        validated = true if idx >=0 && arg1 < self.size   
+      end
+      if validated
+        str = self[arg1]
+      else
+        return nil
+      end
+    end
+    unless str.nil? || str == ""
+      if !arg1.nil? && !arg2.nil?
+        idx = arg1 >= 0 ? arg1 : self.size+arg1
+        str2 = self[0...idx] + self[idx+arg2..-1].to_s
+      else
+        if arg1.kind_of?(Range)
+          idx = beg >= 0 ? beg : self.size+beg
+          idx2 = ed>= 0 ? ed : self.size+ed
+          str2 = self[0...idx] + self[idx2+1..-1].to_s
+        elsif arg1.kind_of?(String)
+          idx = self.index(arg1)
+          str2 = self[0...idx] + self[idx+arg1.size..-1] unless idx.nil?
+        else
+          idx = arg1 >= 0 ? arg1 : self.size+arg1
+          str2 = self[0...idx] + self[idx+1..-1].to_s
+        end
+      end
+      self.replace(str2) unless str2.nil?
+    end
+    str
+  end
+
+  ##
+  #  call-seq:
+  #     str.insert(index, other_str)   -> str
+  #
+  #  Inserts <i>other_str</i> before the character at the given
+  #  <i>index</i>, modifying <i>str</i>. Negative indices count from the
+  #  end of the string, and insert <em>after</em> the given character.
+  #  The intent is insert <i>aString</i> so that it starts at the given
+  #  <i>index</i>.
+  #
+  #     "abcd".insert(0, 'X')    #=> "Xabcd"
+  #     "abcd".insert(3, 'X')    #=> "abcXd"
+  #     "abcd".insert(4, 'X')    #=> "abcdX"
+  #     "abcd".insert(-3, 'X')   #=> "abXcd"
+  #     "abcd".insert(-1, 'X')   #=> "abcdX"
+  #
+  def insert(idx, str)
+    pos = idx.to_i
+    pos += self.size + 1 if pos < 0
+
+    raise IndexError, "index #{idx.to_i} out of string" if pos < 0 || pos > self.size
+
+    return self + str if pos == -1
+    return str + self if pos == 0
+    return self[0..pos - 1] + str + self[pos..-1]
+  end
+
+  ##
+  #  call-seq:
+  #     str.ljust(integer, padstr=' ')   -> new_str
+  #
+  #  If <i>integer</i> is greater than the length of <i>str</i>, returns a new
+  #  <code>String</code> of length <i>integer</i> with <i>str</i> left justified
+  #  and padded with <i>padstr</i>; otherwise, returns <i>str</i>.
+  #
+  #     "hello".ljust(4)            #=> "hello"
+  #     "hello".ljust(20)           #=> "hello               "
+  #     "hello".ljust(20, '1234')   #=> "hello123412341234123"
+  def ljust(idx, padstr = ' ')
+    if idx <= self.size
+      return self
+    end
+    newstr = self.dup
+    newstr << padstr
+    while newstr.size <= idx
+      newstr << padstr
+    end
+    return newstr.slice(0,idx)
+  end
+
+  #     str.upto(other_str, exclusive=false) {|s| block }   -> str
+  #     str.upto(other_str, exclusive=false)                -> an_enumerator
+  #
+  #  Iterates through successive values, starting at <i>str</i> and
+  #  ending at <i>other_str</i> inclusive, passing each value in turn to
+  #  the block. The <code>String#succ</code> method is used to generate
+  #  each value.  If optional second argument exclusive is omitted or is false,
+  #  the last value will be included; otherwise it will be excluded.
+  #
+  #  If no block is given, an enumerator is returned instead.
+  #
+  #     "a8".upto("b6") {|s| print s, ' ' }
+  #     for s in "a8".."b6"
+  #       print s, ' '
+  #     end
+  #
+  #  <em>produces:</em>
+  #
+  #     a8 a9 b0 b1 b2 b3 b4 b5 b6
+  #     a8 a9 b0 b1 b2 b3 b4 b5 b6
+  #
+  #  If <i>str</i> and <i>other_str</i> contains only ascii numeric characters,
+  #  both are recognized as decimal numbers. In addition, the width of
+  #  string (e.g. leading zeros) is handled appropriately.
+  #
+  #     "9".upto("11").to_a   #=> ["9", "10", "11"]
+  #     "25".upto("5").to_a   #=> []
+  #     "07".upto("11").to_a  #=> ["07", "08", "09", "10", "11"]
+  #
+  def upto(other_str, excl=false, &block)
+    return to_enum :upto, other_str, excl unless block
+
+    str = self
+    n = self.<=>other_str
+    return self if n > 0 || (self == other_str && excl)
+    while true
+      block.call(str)
+      return self if !excl && str == other_str
+      str = str.succ
+      return self if excl && str == other_str
+    end
+  end
+
+  def chars(&block)
+    if block_given?
+      self.split('').map do |i|
+        block.call(i)
+      end
+      self
+    else
+      self.split('')
+    end
+  end
+  alias each_char chars
+
+  def codepoints(&block)
+    len = self.size
+
+    if block_given?
+      self.split('').map do|x|
+        block.call(x.ord)
+      end
+      self
+    else
+      self.split('').map{|x| x.ord}
+    end
+  end
+  alias each_codepoint codepoints
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-string-ext/src/string.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-string-ext/src/string.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-string-ext/src/string.c	(revision 270)
@@ -0,0 +1,568 @@
+#include <string.h>
+#include "mruby.h"
+#include "mruby/array.h"
+#include "mruby/class.h"
+#include "mruby/string.h"
+#include "mruby/range.h"
+
+static mrb_value
+mrb_str_getbyte(mrb_state *mrb, mrb_value str)
+{
+  mrb_int pos;
+  mrb_get_args(mrb, "i", &pos);
+
+  if (pos < 0)
+    pos += RSTRING_LEN(str);
+  if (pos < 0 ||  RSTRING_LEN(str) <= pos)
+    return mrb_nil_value();
+
+  return mrb_fixnum_value((unsigned char)RSTRING_PTR(str)[pos]);
+}
+
+static mrb_value
+mrb_str_setbyte(mrb_state *mrb, mrb_value str)
+{
+  mrb_int pos, byte;
+  long len = RSTRING_LEN(str);
+
+  mrb_get_args(mrb, "ii", &pos, &byte);
+
+  if (pos < -len || len <= pos)
+    mrb_raisef(mrb, E_INDEX_ERROR, "index %S is out of array", mrb_fixnum_value(pos));
+  if (pos < 0)
+    pos += len;
+
+  mrb_str_modify(mrb, mrb_str_ptr(str));
+  byte &= 0xff;
+  RSTRING_PTR(str)[pos] = byte;
+  return mrb_fixnum_value((unsigned char)byte);
+}
+
+static mrb_value
+mrb_str_byteslice(mrb_state *mrb, mrb_value str)
+{
+  mrb_value a1;
+  mrb_int len;
+  int argc;
+
+  argc = mrb_get_args(mrb, "o|i", &a1, &len);
+  if (argc == 2) {
+    return mrb_str_substr(mrb, str, mrb_fixnum(a1), len);
+  }
+  switch (mrb_type(a1)) {
+  case MRB_TT_RANGE:
+    {
+      mrb_int beg;
+
+      len = RSTRING_LEN(str);
+      if (mrb_range_beg_len(mrb, a1, &beg, &len, len)) {
+        return mrb_str_substr(mrb, str, beg, len);
+      }
+      return mrb_nil_value();
+    }
+  case MRB_TT_FLOAT:
+    a1 = mrb_fixnum_value((mrb_int)mrb_float(a1));
+    /* fall through */
+  case MRB_TT_FIXNUM:
+    return mrb_str_substr(mrb, str, mrb_fixnum(a1), 1);
+  default:
+    mrb_raise(mrb, E_TYPE_ERROR, "wrong type of argument");
+  }
+  /* not reached */
+  return mrb_nil_value();
+}
+
+/*
+ *  call-seq:
+ *     str.swapcase!   -> str or nil
+ *
+ *  Equivalent to <code>String#swapcase</code>, but modifies the receiver in
+ *  place, returning <i>str</i>, or <code>nil</code> if no changes were made.
+ *  Note: case conversion is effective only in ASCII region.
+ */
+static mrb_value
+mrb_str_swapcase_bang(mrb_state *mrb, mrb_value str)
+{
+  char *p, *pend;
+  int modify = 0;
+  struct RString *s = mrb_str_ptr(str);
+
+  mrb_str_modify(mrb, s);
+  p = RSTRING_PTR(str);
+  pend = p + RSTRING_LEN(str);
+  while (p < pend) {
+    if (ISUPPER(*p)) {
+      *p = TOLOWER(*p);
+      modify = 1;
+    }
+    else if (ISLOWER(*p)) {
+      *p = TOUPPER(*p);
+      modify = 1;
+    }
+    p++;
+  }
+
+  if (modify) return str;
+  return mrb_nil_value();
+}
+
+/*
+ *  call-seq:
+ *     str.swapcase   -> new_str
+ *
+ *  Returns a copy of <i>str</i> with uppercase alphabetic characters converted
+ *  to lowercase and lowercase characters converted to uppercase.
+ *  Note: case conversion is effective only in ASCII region.
+ *
+ *     "Hello".swapcase          #=> "hELLO"
+ *     "cYbEr_PuNk11".swapcase   #=> "CyBeR_pUnK11"
+ */
+static mrb_value
+mrb_str_swapcase(mrb_state *mrb, mrb_value self)
+{
+  mrb_value str;
+
+  str = mrb_str_dup(mrb, self);
+  mrb_str_swapcase_bang(mrb, str);
+  return str;
+}
+
+/*
+ *  call-seq:
+ *     str << integer       -> str
+ *     str.concat(integer)  -> str
+ *     str << obj           -> str
+ *     str.concat(obj)      -> str
+ *
+ *  Append---Concatenates the given object to <i>str</i>. If the object is a
+ *  <code>Integer</code>, it is considered as a codepoint, and is converted
+ *  to a character before concatenation.
+ *
+ *     a = "hello "
+ *     a << "world"   #=> "hello world"
+ *     a.concat(33)   #=> "hello world!"
+ */
+static mrb_value
+mrb_str_concat2(mrb_state *mrb, mrb_value self)
+{
+  mrb_value str;
+  mrb_get_args(mrb, "S", &str);
+  mrb_str_concat(mrb, self, str);
+  return self;
+}
+
+/*
+ *  call-seq:
+ *     str.start_with?([prefixes]+)   -> true or false
+ *
+ *  Returns true if +str+ starts with one of the +prefixes+ given.
+ *
+ *    "hello".start_with?("hell")               #=> true
+ *
+ *    # returns true if one of the prefixes matches.
+ *    "hello".start_with?("heaven", "hell")     #=> true
+ *    "hello".start_with?("heaven", "paradise") #=> false
+ *    "h".start_with?("heaven", "hell")         #=> false
+ */
+static mrb_value
+mrb_str_start_with(mrb_state *mrb, mrb_value self)
+{
+  mrb_value *argv, sub;
+  mrb_int argc, i;
+  mrb_get_args(mrb, "*", &argv, &argc);
+
+  for (i = 0; i < argc; i++) {
+    size_t len_l, len_r;
+    int ai = mrb_gc_arena_save(mrb);
+    sub = mrb_string_type(mrb, argv[i]);
+    mrb_gc_arena_restore(mrb, ai);
+    len_l = RSTRING_LEN(self);
+    len_r = RSTRING_LEN(sub);
+    if (len_l >= len_r) {
+      if (memcmp(RSTRING_PTR(self), RSTRING_PTR(sub), len_r) == 0) {
+        return mrb_true_value();
+      }
+    }
+  }
+  return mrb_false_value();
+}
+
+/*
+ *  call-seq:
+ *     str.end_with?([suffixes]+)   -> true or false
+ *
+ *  Returns true if +str+ ends with one of the +suffixes+ given.
+ */
+static mrb_value
+mrb_str_end_with(mrb_state *mrb, mrb_value self)
+{
+  mrb_value *argv, sub;
+  mrb_int argc, i;
+  mrb_get_args(mrb, "*", &argv, &argc);
+
+  for (i = 0; i < argc; i++) {
+    size_t len_l, len_r;
+    int ai = mrb_gc_arena_save(mrb);
+    sub = mrb_string_type(mrb, argv[i]);
+    mrb_gc_arena_restore(mrb, ai);
+    len_l = RSTRING_LEN(self);
+    len_r = RSTRING_LEN(sub);
+    if (len_l >= len_r) {
+      if (memcmp(RSTRING_PTR(self) + (len_l - len_r),
+                 RSTRING_PTR(sub),
+                 len_r) == 0) {
+        return mrb_true_value();
+      }
+    }
+  }
+  return mrb_false_value();
+}
+
+static mrb_value
+mrb_str_hex(mrb_state *mrb, mrb_value self)
+{
+  return mrb_str_to_inum(mrb, self, 16, FALSE);
+}
+
+static mrb_value
+mrb_str_oct(mrb_state *mrb, mrb_value self)
+{
+  return mrb_str_to_inum(mrb, self, 8, FALSE);
+}
+
+/*
+ *  call-seq:
+ *     string.chr    ->  string
+ *
+ *  Returns a one-character string at the beginning of the string.
+ *
+ *     a = "abcde"
+ *     a.chr    #=> "a"
+ */
+static mrb_value
+mrb_str_chr(mrb_state *mrb, mrb_value self)
+{
+  return mrb_str_substr(mrb, self, 0, 1);
+}
+
+static mrb_value
+mrb_fixnum_chr(mrb_state *mrb, mrb_value num)
+{
+  mrb_int cp = mrb_fixnum(num);
+#ifdef MRB_UTF8_STRING
+  char utf8[4];
+  mrb_int len;
+
+  if (cp < 0 || 0x10FFFF < cp) {
+    mrb_raisef(mrb, E_RANGE_ERROR, "%S out of char range", num);
+  }
+  if (cp < 0x80) {
+    utf8[0] = (char)cp;
+    len = 1;
+  }
+  else if (cp < 0x800) {
+    utf8[0] = (char)(0xC0 | (cp >> 6));
+    utf8[1] = (char)(0x80 | (cp & 0x3F));
+    len = 2;
+  }
+  else if (cp < 0x10000) {
+    utf8[0] = (char)(0xE0 |  (cp >> 12));
+    utf8[1] = (char)(0x80 | ((cp >>  6) & 0x3F));
+    utf8[2] = (char)(0x80 | ( cp        & 0x3F));
+    len = 3;
+  }
+  else {
+    utf8[0] = (char)(0xF0 |  (cp >> 18));
+    utf8[1] = (char)(0x80 | ((cp >> 12) & 0x3F));
+    utf8[2] = (char)(0x80 | ((cp >>  6) & 0x3F));
+    utf8[3] = (char)(0x80 | ( cp        & 0x3F));
+    len = 4;
+  }
+  return mrb_str_new(mrb, utf8, len);
+#else
+  char c;
+
+  if (cp < 0 || 0xff < cp) {
+    mrb_raisef(mrb, E_RANGE_ERROR, "%S out of char range", num);
+  }
+  c = (char)cp;
+  return mrb_str_new(mrb, &c, 1);
+#endif
+}
+
+/*
+ *  call-seq:
+ *     string.lines    ->  array of string
+ *
+ *  Returns strings per line;
+ *
+ *     a = "abc\ndef"
+ *     a.lines    #=> ["abc\n", "def"]
+ */
+static mrb_value
+mrb_str_lines(mrb_state *mrb, mrb_value self)
+{
+  mrb_value result;
+  mrb_value blk;
+  int ai;
+  mrb_int len;
+  mrb_value arg;
+  char *p = RSTRING_PTR(self), *t;
+  char *e = p + RSTRING_LEN(self);
+
+  mrb_get_args(mrb, "&", &blk);
+
+  result = mrb_ary_new(mrb);
+
+  if (!mrb_nil_p(blk)) {
+    while (p < e) {
+      t = p;
+      while (p < e && *p != '\n') p++;
+      if (*p == '\n') p++;
+      len = (mrb_int) (p - t);
+      arg = mrb_str_new(mrb, t, len);
+      mrb_yield_argv(mrb, blk, 1, &arg);
+    }
+    return self;
+  }
+  while (p < e) {
+    ai = mrb_gc_arena_save(mrb);
+    t = p;
+    while (p < e && *p != '\n') p++;
+    if (*p == '\n') p++;
+    len = (mrb_int) (p - t);
+    mrb_ary_push(mrb, result, mrb_str_new(mrb, t, len));
+    mrb_gc_arena_restore(mrb, ai);
+  }
+  return result;
+}
+
+/*
+ *  call-seq:
+ *     string.succ    ->  string
+ *
+ *  Returns next sequence of the string;
+ *
+ *     a = "abc"
+ *     a.succ    #=> "abd"
+ */
+static mrb_value
+mrb_str_succ_bang(mrb_state *mrb, mrb_value self)
+{
+  mrb_value result;
+  unsigned char *p, *e, *b, *t;
+  const char *prepend;
+  struct RString *s = mrb_str_ptr(self);
+  size_t l;
+
+  if (RSTRING_LEN(self) == 0)
+    return self;
+
+  mrb_str_modify(mrb, s);
+  l = RSTRING_LEN(self);
+  b = p = (unsigned char*) RSTRING_PTR(self);
+  t = e = p + l;
+  *(e--) = 0;
+
+  // find trailing ascii/number
+  while (e >= b) {
+    if (ISALNUM(*e))
+      break;
+    e--;
+  }
+  if (e < b) {
+    e = p + l - 1;
+    result = mrb_str_new_lit(mrb, "");
+  } else {
+    // find leading letter of the ascii/number
+    b = e;
+    while (b > p) {
+      if (!ISALNUM(*b) || (ISALNUM(*b) && *b != '9' && *b != 'z' && *b != 'Z'))
+        break;
+      b--;
+    }
+    if (!ISALNUM(*b))
+      b++;
+    result = mrb_str_new(mrb, (char*) p, b - p);
+  }
+
+  while (e >= b) {
+    if (!ISALNUM(*e)) {
+      if (*e == 0xff) {
+        mrb_str_cat_lit(mrb, result, "\x01");
+        (*e) = 0;
+      } else
+        (*e)++;
+      break;
+    }
+    prepend = NULL;
+    if (*e == '9') {
+      if (e == b) prepend = "1";
+      *e = '0';
+    } else if (*e == 'z') {
+      if (e == b) prepend = "a";
+      *e = 'a';
+    } else if (*e == 'Z') {
+      if (e == b) prepend = "A";
+      *e = 'A';
+    } else {
+      (*e)++;
+      break;
+    }
+    if (prepend) mrb_str_cat_cstr(mrb, result, prepend);
+    e--;
+  }
+  result = mrb_str_cat(mrb, result, (char*) b, t - b);
+  l = RSTRING_LEN(result);
+  mrb_str_resize(mrb, self, l);
+  memcpy(RSTRING_PTR(self), RSTRING_PTR(result), l);
+  return self;
+}
+
+static mrb_value
+mrb_str_succ(mrb_state *mrb, mrb_value self)
+{
+  mrb_value str;
+
+  str = mrb_str_dup(mrb, self);
+  mrb_str_succ_bang(mrb, str);
+  return str;
+}
+
+/*
+ *  call-seq:
+ *     str.prepend(other_str)  -> str
+ *
+ *  Prepend---Prepend the given string to <i>str</i>.
+ *
+ *     a = "world"
+ *     a.prepend("hello ") #=> "hello world"
+ *     a                   #=> "hello world"
+ */
+static mrb_value
+mrb_str_prepend(mrb_state *mrb, mrb_value self)
+{
+  struct RString *s1 = mrb_str_ptr(self), *s2, *temp_s;
+  mrb_int len;
+  mrb_value other, temp_str;
+
+  mrb_get_args(mrb, "S", &other);
+
+  mrb_str_modify(mrb, s1);
+  if (!mrb_string_p(other)) {
+    other = mrb_str_to_str(mrb, other);
+  }
+  s2 = mrb_str_ptr(other);
+  len = RSTR_LEN(s1) + RSTR_LEN(s2);
+  temp_str = mrb_str_new(mrb, NULL, RSTR_LEN(s1));
+  temp_s = mrb_str_ptr(temp_str);
+  memcpy(RSTR_PTR(temp_s), RSTR_PTR(s1), RSTR_LEN(s1));
+  if (RSTRING_CAPA(self) < len) {
+    mrb_str_resize(mrb, self, len);
+  }
+  memcpy(RSTR_PTR(s1), RSTR_PTR(s2), RSTR_LEN(s2));
+  memcpy(RSTR_PTR(s1) + RSTR_LEN(s2), RSTR_PTR(temp_s), RSTR_LEN(temp_s));
+  RSTR_SET_LEN(s1, len);
+  RSTR_PTR(s1)[len] = '\0';
+  return self;
+}
+
+#ifdef MRB_UTF8_STRING
+static const char utf8len_codepage_zero[256] =
+{
+  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+  2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,
+};
+
+static mrb_int
+utf8code(unsigned char* p)
+{
+  mrb_int len;
+
+  if (p[0] < 0x80)
+    return p[0];
+
+  len = utf8len_codepage_zero[p[0]];
+  if (len > 1 && (p[1] & 0xc0) == 0x80) {
+    if (len == 2)
+      return ((p[0] & 0x1f) << 6) + (p[1] & 0x3f);
+    if ((p[2] & 0xc0) == 0x80) {
+      if (len == 3)
+        return ((p[0] & 0x0f) << 12) + ((p[1] & 0x3f) << 6)
+          + (p[2] & 0x3f);
+      if ((p[3] & 0xc0) == 0x80) {
+        if (len == 4)
+          return ((p[0] & 0x07) << 18) + ((p[1] & 0x3f) << 12)
+            + ((p[2] & 0x3f) << 6) + (p[3] & 0x3f);
+        if ((p[4] & 0xc0) == 0x80) {
+          if (len == 5)
+            return ((p[0] & 0x03) << 24) + ((p[1] & 0x3f) << 18)
+              + ((p[2] & 0x3f) << 12) + ((p[3] & 0x3f) << 6)
+              + (p[4] & 0x3f);
+          if ((p[5] & 0xc0) == 0x80 && len == 6)
+            return ((p[0] & 0x01) << 30) + ((p[1] & 0x3f) << 24)
+              + ((p[2] & 0x3f) << 18) + ((p[3] & 0x3f) << 12)
+              + ((p[4] & 0x3f) << 6) + (p[5] & 0x3f);
+        }
+      }
+    }
+  }
+  return p[0];
+}
+
+static mrb_value
+mrb_str_ord(mrb_state* mrb, mrb_value str)
+{
+  if (RSTRING_LEN(str) == 0)
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "empty string");
+  return mrb_fixnum_value(utf8code((unsigned char*) RSTRING_PTR(str)));
+}
+#else
+static mrb_value
+mrb_str_ord(mrb_state* mrb, mrb_value str)
+{
+  if (RSTRING_LEN(str) == 0)
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "empty string");
+  return mrb_fixnum_value(RSTRING_PTR(str)[0]);
+}
+#endif
+
+void
+mrb_mruby_string_ext_gem_init(mrb_state* mrb)
+{
+  struct RClass * s = mrb->string_class;
+
+  mrb_define_method(mrb, s, "dump",            mrb_str_dump,            MRB_ARGS_NONE());
+  mrb_define_method(mrb, s, "getbyte",         mrb_str_getbyte,         MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, s, "setbyte",         mrb_str_setbyte,         MRB_ARGS_REQ(2));
+  mrb_define_method(mrb, s, "byteslice",       mrb_str_byteslice,       MRB_ARGS_REQ(1)|MRB_ARGS_OPT(1));
+  mrb_define_method(mrb, s, "swapcase!",       mrb_str_swapcase_bang,   MRB_ARGS_NONE());
+  mrb_define_method(mrb, s, "swapcase",        mrb_str_swapcase,        MRB_ARGS_NONE());
+  mrb_define_method(mrb, s, "concat",          mrb_str_concat2,         MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, s, "<<",              mrb_str_concat2,         MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, s, "start_with?",     mrb_str_start_with,      MRB_ARGS_REST());
+  mrb_define_method(mrb, s, "end_with?",       mrb_str_end_with,        MRB_ARGS_REST());
+  mrb_define_method(mrb, s, "hex",             mrb_str_hex,             MRB_ARGS_NONE());
+  mrb_define_method(mrb, s, "oct",             mrb_str_oct,             MRB_ARGS_NONE());
+  mrb_define_method(mrb, s, "chr",             mrb_str_chr,             MRB_ARGS_NONE());
+  mrb_define_method(mrb, s, "lines",           mrb_str_lines,           MRB_ARGS_NONE());
+  mrb_define_method(mrb, s, "succ",            mrb_str_succ,            MRB_ARGS_NONE());
+  mrb_define_method(mrb, s, "succ!",           mrb_str_succ_bang,       MRB_ARGS_NONE());
+  mrb_define_method(mrb, s, "prepend",         mrb_str_prepend,         MRB_ARGS_REQ(1));
+  mrb_alias_method(mrb, s, mrb_intern_lit(mrb, "next"), mrb_intern_lit(mrb, "succ"));
+  mrb_alias_method(mrb, s, mrb_intern_lit(mrb, "next!"), mrb_intern_lit(mrb, "succ!"));
+  mrb_define_method(mrb, s, "ord", mrb_str_ord, MRB_ARGS_NONE());
+
+  mrb_define_method(mrb, mrb->fixnum_class, "chr", mrb_fixnum_chr, MRB_ARGS_NONE());
+}
+
+void
+mrb_mruby_string_ext_gem_final(mrb_state* mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-string-ext/test/string.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-string-ext/test/string.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-string-ext/test/string.rb	(revision 270)
@@ -0,0 +1,570 @@
+##
+# String(Ext) Test
+
+UTF8STRING = ("\343\201\202".size == 1)
+
+assert('String#getbyte') do
+  str1 = "hello"
+  bytes1 = [104, 101, 108, 108, 111]
+  assert_equal bytes1[0], str1.getbyte(0)
+  assert_equal bytes1[-1], str1.getbyte(-1)
+  assert_equal bytes1[6], str1.getbyte(6)
+
+  str2 = "\xFF"
+  bytes2 = [0xFF]
+  assert_equal bytes2[0], str2.getbyte(0)
+end
+
+assert('String#setbyte') do
+  str1 = "hello"
+  h = "H".getbyte(0)
+  str1.setbyte(0, h)
+  assert_equal(h, str1.getbyte(0))
+  assert_equal("Hello", str1)
+end
+
+assert('String#byteslice') do
+  str1 = "hello"
+  assert_equal("e", str1.byteslice(1))
+  assert_equal("o", str1.byteslice(-1))
+  assert_equal("ell", str1.byteslice(1..3))
+  assert_equal("el", str1.byteslice(1...3))
+end
+
+assert('String#dump') do
+  ("\1" * 100).dump     # should not raise an exception - regress #1210
+  "\0".inspect == "\"\\000\"" and
+  "foo".dump == "\"foo\""
+end
+
+assert('String#strip') do
+  s = "  abc  "
+  "".strip == "" and " \t\r\n\f\v".strip == "" and
+  "\0a\0".strip == "\0a" and
+  "abc".strip     == "abc" and
+  "  abc".strip   == "abc" and
+  "abc  ".strip   == "abc" and
+  "  abc  ".strip == "abc" and
+  s == "  abc  "
+end
+
+assert('String#lstrip') do
+  s = "  abc  "
+  s.lstrip
+  "".lstrip == "" and " \t\r\n\f\v".lstrip == "" and
+  "\0a\0".lstrip == "\0a\0" and
+  "abc".lstrip     == "abc"   and
+  "  abc".lstrip   == "abc"   and
+  "abc  ".lstrip   == "abc  " and
+  "  abc  ".lstrip == "abc  " and
+  s == "  abc  "
+end
+
+assert('String#rstrip') do
+  s = "  abc  "
+  s.rstrip
+  "".rstrip == "" and " \t\r\n\f\v".rstrip == "" and
+  "\0a\0".rstrip == "\0a" and
+  "abc".rstrip     == "abc"   and
+  "  abc".rstrip   == "  abc" and
+  "abc  ".rstrip   == "abc"   and
+  "  abc  ".rstrip == "  abc" and
+  s == "  abc  "
+end
+
+assert('String#strip!') do
+  s = "  abc  "
+  t = "abc"
+  s.strip! == "abc" and s == "abc" and t.strip! == nil
+end
+
+assert('String#lstrip!') do
+  s = "  abc  "
+  t = "abc  "
+  s.lstrip! == "abc  " and s == "abc  " and t.lstrip! == nil
+end
+
+assert('String#rstrip!') do
+  s = "  abc  "
+  t = "  abc"
+  s.rstrip! == "  abc" and s == "  abc" and t.rstrip! == nil
+end
+
+assert('String#swapcase') do
+  assert_equal "hELLO", "Hello".swapcase
+  assert_equal "CyBeR_pUnK11", "cYbEr_PuNk11".swapcase
+end
+
+assert('String#swapcase!') do
+  s = "Hello"
+  t = s.clone
+  t.swapcase!
+  assert_equal s.swapcase, t
+end
+
+assert('String#concat') do
+  s = "Hello "
+  s.concat "World!"
+  t = "Hello "
+  t << "World!"
+  assert_equal "Hello World!", t
+  assert_equal "Hello World!", s
+end
+
+assert('String#casecmp') do
+  assert_equal 1, "abcdef".casecmp("abcde")
+  assert_equal 0, "aBcDeF".casecmp("abcdef")
+  assert_equal(-1, "abcdef".casecmp("abcdefg"))
+  assert_equal 0, "abcdef".casecmp("ABCDEF")
+  o = Object.new
+  def o.to_str
+    "ABCDEF"
+  end
+  assert_equal 0, "abcdef".casecmp(o)
+end
+
+assert('String#start_with?') do
+  assert_true "hello".start_with?("heaven", "hell")
+  assert_true !"hello".start_with?("heaven", "paradise")
+  assert_true !"h".start_with?("heaven", "hell")
+  assert_raise TypeError do "hello".start_with?(true) end
+end
+
+assert('String#end_with?') do
+  assert_true "string".end_with?("ing", "mng")
+  assert_true !"string".end_with?("str", "tri")
+  assert_true !"ng".end_with?("ing", "mng")
+  assert_raise TypeError do "hello".end_with?(true) end
+end
+
+assert('String#partition') do
+  assert_equal ["a", "x", "axa"], "axaxa".partition("x")
+  assert_equal ["aaaaa", "", ""], "aaaaa".partition("x")
+  assert_equal ["", "", "aaaaa"], "aaaaa".partition("")
+  assert_equal ["", "a", "aaaa"], "aaaaa".partition("a")
+  assert_equal ["aaaa", "b", ""], "aaaab".partition("b")
+  assert_equal ["", "b", "aaaa"], "baaaa".partition("b")
+  assert_equal ["", "", ""],      "".partition("a")
+end
+
+assert('String#rpartition') do
+  assert_equal ["axa", "x", "a"], "axaxa".rpartition("x")
+  assert_equal ["", "", "aaaaa"], "aaaaa".rpartition("x")
+  assert_equal ["aaaaa", "", ""], "aaaaa".rpartition("")
+  assert_equal ["aaaa", "a", ""], "aaaaa".rpartition("a")
+  assert_equal ["aaaa", "b", ""], "aaaab".rpartition("b")
+  assert_equal ["", "b", "aaaa"], "baaaa".rpartition("b")
+  assert_equal ["", "", ""],      "".rpartition("a")
+end
+
+assert('String#hex') do
+  assert_equal 16, "10".hex
+  assert_equal 255, "ff".hex
+  assert_equal 16, "0x10".hex
+  assert_equal (-16), "-0x10".hex
+  assert_equal 0, "xyz".hex
+  assert_equal 16, "10z".hex
+  assert_equal 16, "1_0".hex
+  assert_equal 0, "".hex
+end
+
+assert('String#oct') do
+  assert_equal 8, "10".oct
+  assert_equal 7, "7".oct
+  assert_equal 0, "8".oct
+  assert_equal 0, "9".oct
+  assert_equal 0, "xyz".oct
+  assert_equal 8, "10z".oct
+  assert_equal 8, "1_0".oct
+  assert_equal 8, "010".oct
+  assert_equal (-8), "-10".oct
+end
+
+assert('String#chr') do
+  assert_equal "a", "abcde".chr
+  # test Fixnum#chr as well
+  assert_equal "a", 97.chr
+end
+
+assert('String#lines') do
+  assert_equal ["Hel\n", "lo\n", "World!"], "Hel\nlo\nWorld!".lines
+  assert_equal ["Hel\n", "lo\n", "World!\n"], "Hel\nlo\nWorld!\n".lines
+  assert_equal ["\n", "\n", "\n"], "\n\n\n".lines
+  assert_equal [], "".lines
+end
+
+assert('String#clear') do
+  # embed string
+  s = "foo"
+  assert_equal("", s.clear)
+  assert_equal("", s)
+
+  # not embed string and not shared string
+  s = "foo" * 100
+  a = s
+  assert_equal("", s.clear)
+  assert_equal("", s)
+  assert_equal("", a)
+
+  # shared string
+  s = "foo" * 100
+  a = s[10, 90]                # create shared string
+  assert_equal("", s.clear)    # clear
+  assert_equal("", s)          # s is cleared
+  assert_not_equal("", a)      # a should not be affected
+end
+
+assert('String#slice!') do
+  a = "AooBar"
+  b = a.dup
+  assert_equal "A", a.slice!(0)
+  assert_equal "AooBar", b
+
+  a = "FooBar"
+  assert_equal "r", a.slice!(-1)
+  assert_equal "FooBa", a
+
+  a = "FooBar"
+  assert_nil a.slice!(6)
+  assert_nil a.slice!(-7)
+  assert_equal "FooBar", a
+
+  a = "FooBar"
+  assert_equal "Foo", a.slice!(0, 3)
+  assert_equal "Bar", a
+
+  a = "FooBar"
+  assert_equal "Bar", a.slice!(-3, 3)
+  assert_equal "Foo", a
+
+  a = "FooBar"
+  assert_equal "", a.slice!(6, 2)
+  assert_equal "FooBar", a
+
+  a = "FooBar"
+  assert_nil a.slice!(-7,10)
+  assert_equal "FooBar", a
+
+  a = "FooBar"
+  assert_equal "Foo", a.slice!(0..2)
+  assert_equal "Bar", a
+
+  a = "FooBar"
+  assert_equal "Bar", a.slice!(-3..-1)
+  assert_equal "Foo", a
+
+  a = "FooBar"
+  assert_equal "", a.slice!(6..2)
+  assert_equal "FooBar", a
+
+  a = "FooBar"
+  assert_nil a.slice!(-10..-7)
+  assert_equal "FooBar", a
+
+  a = "FooBar"
+  assert_equal "Foo", a.slice!("Foo")
+  assert_equal "Bar", a
+
+  a = "FooBar"
+  assert_nil a.slice!("xyzzy")
+  assert_equal "FooBar", a
+
+  assert_raise(ArgumentError) { "foo".slice! }
+end
+
+assert('String#succ') do
+  assert_equal "", "".succ
+  assert_equal "1", "0".succ
+  assert_equal "10", "9".succ
+  assert_equal "01", "00".succ
+  assert_equal "a1", "a0".succ
+  assert_equal "A1", "A0".succ
+  assert_equal "10", "09".succ
+  assert_equal "b0", "a9".succ
+  assert_equal "B0", "A9".succ
+
+  assert_equal "b", "a".succ
+  assert_equal "aa", "z".succ
+  assert_equal "ab", "aa".succ
+  assert_equal "Ab", "Aa".succ
+  assert_equal "0b", "0a".succ
+  assert_equal "ba", "az".succ
+  assert_equal "Ba", "Az".succ
+  assert_equal "1a", "0z".succ
+
+  assert_equal "B", "A".succ
+  assert_equal "AA", "Z".succ
+  assert_equal "AB", "AA".succ
+  assert_equal "aB", "aA".succ
+  assert_equal "0B", "0A".succ
+  assert_equal "BA", "AZ".succ
+  assert_equal "bA", "aZ".succ
+  assert_equal "1A", "0Z".succ
+
+  assert_equal ".", "-".succ
+  assert_equal "\x01\x00", "\xff".succ
+  assert_equal "-b", "-a".succ
+  assert_equal "-aa", "-z".succ
+  assert_equal "-a-b-", "-a-a-".succ
+  assert_equal "-b-", "-a-".succ
+  assert_equal "-aa-", "-z-".succ
+  assert_equal "ãb", "ãa".succ
+  assert_equal "ãba", "ãaz".succ
+
+  a = ""; a.succ!
+  assert_equal "", a
+  a = "0"; a.succ!
+  assert_equal "1", a
+  a = "9"; a.succ!
+  assert_equal "10", a
+  a = "00"; a.succ!
+  assert_equal "01", a
+  a = "a0"; a.succ!
+  assert_equal "a1", a
+  a = "A0"; a.succ!
+  assert_equal "A1", a
+  a = "09"; a.succ!
+  assert_equal "10", a
+  a = "a9"; a.succ!
+  assert_equal "b0", a
+  a = "A9"; a.succ!
+  assert_equal "B0", a
+
+  a = "a"; a.succ!
+  assert_equal "b", a
+  a = "z"; a.succ!
+  assert_equal "aa", a
+  a = "aa"; a.succ!
+  assert_equal "ab", a
+  a = "Aa"; a.succ!
+  assert_equal "Ab", a
+  a = "0a"; a.succ!
+  assert_equal "0b", a
+  a = "az"; a.succ!
+  assert_equal "ba", a
+  a = "Az"; a.succ!
+  assert_equal "Ba", a
+  a = "0z"; a.succ!
+  assert_equal "1a", a
+
+  a = "A"; a.succ!
+  assert_equal "B", a
+  a = "Z"; a.succ!
+  assert_equal "AA", a
+  a = "AA"; a.succ!
+  assert_equal "AB", a
+  a = "aA"; a.succ!
+  assert_equal "aB", a
+  a = "0A"; a.succ!
+  assert_equal "0B", a
+  a = "AZ"; a.succ!
+  assert_equal "BA", a
+  a = "aZ"; a.succ!
+  assert_equal "bA", a
+  a = "0Z"; a.succ!
+  assert_equal "1A", a
+
+  a = "-"; a.succ!
+  assert_equal ".", a
+  a = "\xff"; a.succ!
+  assert_equal "\x01\x00", a
+  a = "-a"; a.succ!
+  assert_equal "-b", a
+  a = "-z"; a.succ!
+  assert_equal "-aa", a
+  a = "-a-a-"; a.succ!
+  assert_equal "-a-b-", a
+  a = "-a-"; a.succ!
+  assert_equal "-b-", a
+  a = "-z-"; a.succ!
+  assert_equal "-aa-", a
+  a = "ãb"; a.succ!
+  assert_equal "ãc", a
+  a = "ãaz"; a.succ!
+  assert_equal "ãba", a
+end
+
+assert('String#next') do
+  assert_equal "01", "00".next
+
+  a = "00"; a.next!
+  assert_equal "01", a
+end
+
+assert('String#insert') do
+  assert_equal "Xabcd", "abcd".insert(0, 'X')
+  assert_equal "abcXd", "abcd".insert(3, 'X')
+  assert_equal "abcdX", "abcd".insert(4, 'X')
+  assert_equal "abXcd", "abcd".insert(-3, 'X')
+  assert_equal "abcdX", "abcd".insert(-1, 'X')
+  assert_raise(IndexError) { "abcd".insert(5, 'X') }
+  assert_raise(IndexError) { "abcd".insert(-6, 'X') }
+end
+
+assert('String#prepend') do
+  a = "world"
+  assert_equal "hello world", a.prepend("hello ")
+  assert_equal "hello world", a
+end
+
+assert('String#ljust') do
+  assert_equal "hello", "hello".ljust(4)
+  assert_equal "hello               ", "hello".ljust(20)
+  assert_equal "hello123412341234123", "hello".ljust(20, '1234')
+  assert_equal "hello", "hello".ljust(-3)
+end
+
+assert('String#upto') do
+  a     = "aa"
+  start = "aa"
+  count = 0
+  assert_equal("aa", a.upto("zz") {|s|
+    assert_equal(start, s)
+    start.succ!
+    count += 1
+  })
+  assert_equal(676, count)
+
+  a     = "a"
+  start = "a"
+  count = 0
+  assert_equal("a", a.upto("a") {|s|
+    assert_equal(start, s)
+    start.succ!
+    count += 1
+  })
+  assert_equal(1, count)
+
+  a     = "a"
+  start = "a"
+  count = 0
+  assert_equal("a", a.upto("b", true) {|s|
+    assert_equal(start, s)
+    start.succ!
+    count += 1
+  })
+  assert_equal(1, count)
+
+  a     = "0"
+  start = "0"
+  count = 0
+  assert_equal("0", a.upto("0") {|s|
+    assert_equal(start, s)
+    start.succ!
+    count += 1
+  })
+  assert_equal(1, count)
+
+  a     = "0"
+  start = "0"
+  count = 0
+  assert_equal("0", a.upto("-1") {|s|
+    assert_equal(start, s)
+    start.succ!
+    count += 1
+  })
+  assert_equal(0, count)
+
+  a     = "-1"
+  start = "-1"
+  count = 0
+  assert_equal("-1", a.upto("-2") {|s|
+    assert_equal(start, s)
+    start.succ!
+    count += 1
+  })
+  assert_equal(2, count)
+end
+
+assert('String#ord') do
+  got = "hello!".split('').map {|x| x.ord}
+  expect = [104, 101, 108, 108, 111, 33]
+  assert_equal expect, got
+end
+
+assert('String#ord(UTF-8)') do
+  got = "ããã«ã¡ã¯ä¸ç!".split('').map {|x| x.ord}
+  expect = [0x3053,0x3093,0x306b,0x3061,0x306f,0x4e16,0x754c,0x21]
+  assert_equal expect, got
+end if UTF8STRING
+
+assert('String#chr') do
+  assert_equal "h", "hello!".chr
+end
+assert('String#chr(UTF-8)') do
+  assert_equal "ã", "ããã«ã¡ã¯ä¸ç!".chr
+end if UTF8STRING
+
+assert('String#chars') do
+  expect = ["h", "e", "l", "l", "o", "!"]
+  assert_equal expect, "hello!".chars
+  s = ""
+  "hello!".chars do |x|
+    s += x
+  end
+  assert_equal "hello!", s
+end
+
+assert('String#chars(UTF-8)') do
+  expect = ['ã', 'ã', 'ã«', 'ã¡', 'ã¯', 'ä¸', 'ç', '!']
+  assert_equal expect, "ããã«ã¡ã¯ä¸ç!".chars
+  s = ""
+  "ããã«ã¡ã¯ä¸ç!".chars do |x|
+    s += x
+  end
+  assert_equal "ããã«ã¡ã¯ä¸ç!", s
+end if UTF8STRING
+
+assert('String#each_char') do
+  s = ""
+  "hello!".each_char do |x|
+    s += x
+  end
+  assert_equal "hello!", s
+end
+
+assert('String#each_char(UTF-8)') do
+  s = ""
+  "ããã«ã¡ã¯ä¸ç!".each_char do |x|
+    s += x
+  end
+  assert_equal "ããã«ã¡ã¯ä¸ç!", s
+end if UTF8STRING
+
+assert('String#codepoints') do
+  expect = [104, 101, 108, 108, 111, 33]
+  assert_equal expect, "hello!".codepoints
+  cp = []
+  "hello!".codepoints do |x|
+    cp << x
+  end
+  assert_equal expect, cp
+end
+
+assert('String#codepoints(UTF-8)') do
+  expect = [12371, 12435, 12395, 12385, 12399, 19990, 30028, 33]
+  assert_equal expect, "ããã«ã¡ã¯ä¸ç!".codepoints
+  cp = []
+  "ããã«ã¡ã¯ä¸ç!".codepoints do |x|
+    cp << x
+  end
+  assert_equal expect, cp
+end if UTF8STRING
+
+assert('String#each_codepoint') do
+  expect = [104, 101, 108, 108, 111, 33]
+  cp = []
+  "hello!".each_codepoint do |x|
+    cp << x
+  end
+  assert_equal expect, cp
+end
+
+assert('String#each_codepoint(UTF-8)') do
+  expect = [12371, 12435, 12395, 12385, 12399, 19990, 30028, 33]
+  cp = []
+  "ããã«ã¡ã¯ä¸ç!".each_codepoint do |x|
+    cp << x
+  end
+  assert_equal expect, cp
+end if UTF8STRING
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-struct/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-struct/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-struct/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-struct') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'standard Struct class'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-struct/mrblib/struct.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-struct/mrblib/struct.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-struct/mrblib/struct.rb	(revision 270)
@@ -0,0 +1,86 @@
+##
+# Struct
+#
+# ISO 15.2.18
+
+if Object.const_defined?(:Struct)
+  class Struct
+
+    ##
+    # Calls the given block for each element of +self+
+    # and pass the respective element.
+    #
+    # ISO 15.2.18.4.4
+    def each(&block)
+      self.class.members.each{|field|
+        block.call(self[field])
+      }
+      self
+    end
+
+    ##
+    # Calls the given block for each element of +self+
+    # and pass the name and value of the respectiev
+    # element.
+    #
+    # ISO 15.2.18.4.5
+    def each_pair(&block)
+      self.class.members.each{|field|
+        block.call(field.to_sym, self[field])
+      }
+      self
+    end
+
+    ##
+    # Calls the given block for each element of +self+
+    # and returns an array with all elements of which
+    # block is not false.
+    #
+    # ISO 15.2.18.4.7
+    def select(&block)
+      ary = []
+      self.class.members.each{|field|
+        val = self[field]
+        ary.push(val) if block.call(val)
+      }
+      ary
+    end
+
+    def _inspect
+      name = self.class.to_s
+      if name[0] == "#"
+        str = "#<struct "
+      else
+        str = "#<struct #{name} "
+      end
+      buf = []
+      self.each_pair do |k,v|
+        buf.push [k.to_s + "=" + v._inspect]
+      end
+      str + buf.join(", ") + ">"
+    end
+
+    ##
+    # call-seq:
+    #   struct.to_s      -> string
+    #   struct.inspect   -> string
+    #
+    # Describe the contents of this struct in a string.
+    #
+    # 15.2.18.4.10(x)
+    #
+    def inspect
+      begin
+        self._inspect
+      rescue SystemStackError
+        "#<struct #{self.class.to_s}:...>"
+      end
+    end
+
+    ##
+    # 15.2.18.4.11(x)
+    #
+    alias to_s inspect
+  end
+end
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-struct/src/struct.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-struct/src/struct.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-struct/src/struct.c	(revision 270)
@@ -0,0 +1,785 @@
+/*
+** struct.c - Struct class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include <string.h>
+#include "mruby.h"
+#include "mruby/array.h"
+#include "mruby/string.h"
+#include "mruby/class.h"
+#include "mruby/variable.h"
+#include "mruby/hash.h"
+#include "mruby/range.h"
+
+#define RSTRUCT_LEN(st) mrb_ary_ptr(st)->len
+#define RSTRUCT_PTR(st) mrb_ary_ptr(st)->ptr
+
+static struct RClass *
+struct_class(mrb_state *mrb)
+{
+  return mrb_class_get(mrb, "Struct");
+}
+
+static inline mrb_value
+struct_ivar_get(mrb_state *mrb, mrb_value c, mrb_sym id)
+{
+  struct RClass* kclass;
+  struct RClass* sclass = struct_class(mrb);
+  mrb_value ans;
+
+  for (;;) {
+    ans = mrb_iv_get(mrb, c, id);
+    if (!mrb_nil_p(ans)) return ans;
+    kclass = RCLASS_SUPER(c);
+    if (kclass == 0 || kclass == sclass)
+      return mrb_nil_value();
+    c = mrb_obj_value(kclass);
+  }
+}
+
+static mrb_value
+struct_s_members(mrb_state *mrb, struct RClass *klass)
+{
+  mrb_value members = struct_ivar_get(mrb, mrb_obj_value(klass), mrb_intern_lit(mrb, "__members__"));
+
+  if (mrb_nil_p(members)) {
+    mrb_raise(mrb, E_TYPE_ERROR, "uninitialized struct");
+  }
+  if (!mrb_array_p(members)) {
+    mrb_raise(mrb, E_TYPE_ERROR, "corrupted struct");
+  }
+  return members;
+}
+
+static mrb_value
+struct_members(mrb_state *mrb, mrb_value s)
+{
+  mrb_value members = struct_s_members(mrb, mrb_obj_class(mrb, s));
+  if (!mrb_array_p(s)) {
+    mrb_raise(mrb, E_TYPE_ERROR, "corrupted struct");
+  }
+  if (RSTRUCT_LEN(s) != RARRAY_LEN(members)) {
+    mrb_raisef(mrb, E_TYPE_ERROR,
+               "struct size differs (%S required %S given)",
+               mrb_fixnum_value(RARRAY_LEN(members)), mrb_fixnum_value(RSTRUCT_LEN(s)));
+  }
+  return members;
+}
+
+static mrb_value
+mrb_struct_s_members_m(mrb_state *mrb, mrb_value klass)
+{
+  mrb_value members, ary;
+
+  members = struct_s_members(mrb, mrb_class_ptr(klass));
+  ary = mrb_ary_new_capa(mrb, RARRAY_LEN(members));
+  mrb_ary_replace(mrb, ary, members);
+  return ary;
+}
+
+/* 15.2.18.4.6  */
+/*
+ *  call-seq:
+ *     struct.members    -> array
+ *
+ *  Returns an array of strings representing the names of the instance
+ *  variables.
+ *
+ *     Customer = Struct.new(:name, :address, :zip)
+ *     joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
+ *     joe.members   #=> [:name, :address, :zip]
+ */
+
+static mrb_value
+mrb_struct_members(mrb_state *mrb, mrb_value obj)
+{
+  return mrb_struct_s_members_m(mrb, mrb_obj_value(mrb_obj_class(mrb, obj)));
+}
+
+static mrb_value
+mrb_struct_getmember(mrb_state *mrb, mrb_value obj, mrb_sym id)
+{
+  mrb_value members, slot, *ptr;
+  const mrb_value *ptr_members;
+  mrb_int i, len;
+
+  ptr = RSTRUCT_PTR(obj);
+  members = struct_members(mrb, obj);
+  ptr_members = RARRAY_PTR(members);
+  slot = mrb_symbol_value(id);
+  len = RARRAY_LEN(members);
+  for (i=0; i<len; i++) {
+    if (mrb_obj_equal(mrb, ptr_members[i], slot)) {
+      return ptr[i];
+    }
+  }
+  mrb_raisef(mrb, E_INDEX_ERROR, "'%S' is not a struct member", mrb_sym2str(mrb, id));
+  return mrb_nil_value();       /* not reached */
+}
+
+static mrb_value
+mrb_struct_ref(mrb_state *mrb, mrb_value obj)
+{
+  return mrb_struct_getmember(mrb, obj, mrb->c->ci->mid);
+}
+
+static mrb_value mrb_struct_ref0(mrb_state* mrb, mrb_value obj) {return RSTRUCT_PTR(obj)[0];}
+static mrb_value mrb_struct_ref1(mrb_state* mrb, mrb_value obj) {return RSTRUCT_PTR(obj)[1];}
+static mrb_value mrb_struct_ref2(mrb_state* mrb, mrb_value obj) {return RSTRUCT_PTR(obj)[2];}
+static mrb_value mrb_struct_ref3(mrb_state* mrb, mrb_value obj) {return RSTRUCT_PTR(obj)[3];}
+static mrb_value mrb_struct_ref4(mrb_state* mrb, mrb_value obj) {return RSTRUCT_PTR(obj)[4];}
+static mrb_value mrb_struct_ref5(mrb_state* mrb, mrb_value obj) {return RSTRUCT_PTR(obj)[5];}
+static mrb_value mrb_struct_ref6(mrb_state* mrb, mrb_value obj) {return RSTRUCT_PTR(obj)[6];}
+static mrb_value mrb_struct_ref7(mrb_state* mrb, mrb_value obj) {return RSTRUCT_PTR(obj)[7];}
+static mrb_value mrb_struct_ref8(mrb_state* mrb, mrb_value obj) {return RSTRUCT_PTR(obj)[8];}
+static mrb_value mrb_struct_ref9(mrb_state* mrb, mrb_value obj) {return RSTRUCT_PTR(obj)[9];}
+
+#define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
+#define N_REF_FUNC numberof(ref_func)
+
+static const mrb_func_t ref_func[] = {
+  mrb_struct_ref0,
+  mrb_struct_ref1,
+  mrb_struct_ref2,
+  mrb_struct_ref3,
+  mrb_struct_ref4,
+  mrb_struct_ref5,
+  mrb_struct_ref6,
+  mrb_struct_ref7,
+  mrb_struct_ref8,
+  mrb_struct_ref9,
+};
+
+static mrb_sym
+mrb_id_attrset(mrb_state *mrb, mrb_sym id)
+{
+  const char *name;
+  char *buf;
+  mrb_int len;
+  mrb_sym mid;
+
+  name = mrb_sym2name_len(mrb, id, &len);
+  buf = (char *)mrb_malloc(mrb, (size_t)len+2);
+  memcpy(buf, name, (size_t)len);
+  buf[len] = '=';
+  buf[len+1] = '\0';
+
+  mid = mrb_intern(mrb, buf, len+1);
+  mrb_free(mrb, buf);
+  return mid;
+}
+
+static mrb_value
+mrb_struct_set(mrb_state *mrb, mrb_value obj, mrb_value val)
+{
+  const char *name;
+  mrb_int i, len, slen;
+  mrb_sym mid;
+  mrb_value members, slot, *ptr;
+  const mrb_value *ptr_members;
+
+  /* get base id */
+  name = mrb_sym2name_len(mrb, mrb->c->ci->mid, &slen);
+  mid = mrb_intern(mrb, name, slen-1); /* omit last "=" */
+
+  members = struct_members(mrb, obj);
+  ptr_members = RARRAY_PTR(members);
+  len = RARRAY_LEN(members);
+  ptr = RSTRUCT_PTR(obj);
+  for (i=0; i<len; i++) {
+    slot = ptr_members[i];
+    if (mrb_symbol(slot) == mid) {
+      return ptr[i] = val;
+    }
+  }
+  mrb_raisef(mrb, E_INDEX_ERROR, "'%S' is not a struct member", mrb_sym2str(mrb, mid));
+  return mrb_nil_value();       /* not reached */
+}
+
+static mrb_value
+mrb_struct_set_m(mrb_state *mrb, mrb_value obj)
+{
+  mrb_value val;
+
+  mrb_get_args(mrb, "o", &val);
+  return mrb_struct_set(mrb, obj, val);
+}
+
+static mrb_bool
+is_local_id(mrb_state *mrb, const char *name)
+{
+  if (!name) return FALSE;
+  return !ISUPPER(name[0]);
+}
+
+static mrb_bool
+is_const_id(mrb_state *mrb, const char *name)
+{
+  if (!name) return FALSE;
+  return ISUPPER(name[0]);
+}
+
+static void
+make_struct_define_accessors(mrb_state *mrb, mrb_value members, struct RClass *c)
+{
+  const mrb_value *ptr_members = RARRAY_PTR(members);
+  mrb_int i;
+  mrb_int len = RARRAY_LEN(members);
+  int ai = mrb_gc_arena_save(mrb);
+
+  for (i=0; i<len; i++) {
+    mrb_sym id = mrb_symbol(ptr_members[i]);
+    const char *name = mrb_sym2name_len(mrb, id, NULL);
+
+    if (is_local_id(mrb, name) || is_const_id(mrb, name)) {
+      if (i < N_REF_FUNC) {
+        mrb_define_method_id(mrb, c, id, ref_func[i], MRB_ARGS_NONE());
+      }
+      else {
+        mrb_define_method_id(mrb, c, id, mrb_struct_ref, MRB_ARGS_NONE());
+      }
+      mrb_define_method_id(mrb, c, mrb_id_attrset(mrb, id), mrb_struct_set_m, MRB_ARGS_REQ(1));
+      mrb_gc_arena_restore(mrb, ai);
+    }
+  }
+}
+
+static mrb_value
+make_struct(mrb_state *mrb, mrb_value name, mrb_value members, struct RClass * klass)
+{
+  mrb_value nstr;
+  mrb_sym id;
+  struct RClass *c;
+
+  if (mrb_nil_p(name)) {
+    c = mrb_class_new(mrb, klass);
+  }
+  else {
+    /* old style: should we warn? */
+    name = mrb_str_to_str(mrb, name);
+    id = mrb_obj_to_sym(mrb, name);
+    if (!is_const_id(mrb, mrb_sym2name_len(mrb, id, NULL))) {
+      mrb_name_error(mrb, id, "identifier %S needs to be constant", name);
+    }
+    if (mrb_const_defined_at(mrb, mrb_obj_value(klass), id)) {
+      mrb_warn(mrb, "redefining constant Struct::%S", name);
+      /* ?rb_mod_remove_const(klass, mrb_sym2name(mrb, id)); */
+    }
+    c = mrb_define_class_under(mrb, klass, RSTRING_PTR(name), klass);
+  }
+  MRB_SET_INSTANCE_TT(c, MRB_TT_ARRAY);
+  nstr = mrb_obj_value(c);
+  mrb_iv_set(mrb, nstr, mrb_intern_lit(mrb, "__members__"), members);
+
+  mrb_define_class_method(mrb, c, "new", mrb_instance_new, MRB_ARGS_ANY());
+  mrb_define_class_method(mrb, c, "[]", mrb_instance_new, MRB_ARGS_ANY());
+  mrb_define_class_method(mrb, c, "members", mrb_struct_s_members_m, MRB_ARGS_NONE());
+  /* RSTRUCT(nstr)->basic.c->super = c->c; */
+  make_struct_define_accessors(mrb, members, c);
+  return nstr;
+}
+
+/* 15.2.18.3.1  */
+/*
+ *  call-seq:
+ *     Struct.new( [aString] [, aSym]+> )    -> StructClass
+ *     StructClass.new(arg, ...)             -> obj
+ *     StructClass[arg, ...]                 -> obj
+ *
+ *  Creates a new class, named by <i>aString</i>, containing accessor
+ *  methods for the given symbols. If the name <i>aString</i> is
+ *  omitted, an anonymous structure class will be created. Otherwise,
+ *  the name of this struct will appear as a constant in class
+ *  <code>Struct</code>, so it must be unique for all
+ *  <code>Struct</code>s in the system and should start with a capital
+ *  letter. Assigning a structure class to a constant effectively gives
+ *  the class the name of the constant.
+ *
+ *  <code>Struct::new</code> returns a new <code>Class</code> object,
+ *  which can then be used to create specific instances of the new
+ *  structure. The number of actual parameters must be
+ *  less than or equal to the number of attributes defined for this
+ *  class; unset parameters default to <code>nil</code>.  Passing too many
+ *  parameters will raise an <code>ArgumentError</code>.
+ *
+ *  The remaining methods listed in this section (class and instance)
+ *  are defined for this generated class.
+ *
+ *     # Create a structure with a name in Struct
+ *     Struct.new("Customer", :name, :address)    #=> Struct::Customer
+ *     Struct::Customer.new("Dave", "123 Main")   #=> #<struct Struct::Customer name="Dave", address="123 Main">
+ *
+ *     # Create a structure named by its constant
+ *     Customer = Struct.new(:name, :address)     #=> Customer
+ *     Customer.new("Dave", "123 Main")           #=> #<struct Customer name="Dave", address="123 Main">
+ */
+static mrb_value
+mrb_struct_s_def(mrb_state *mrb, mrb_value klass)
+{
+  mrb_value name, rest;
+  mrb_value *pargv;
+  mrb_int argcnt;
+  mrb_int i;
+  mrb_value b, st;
+  mrb_sym id;
+  mrb_value *argv;
+  mrb_int argc;
+
+  name = mrb_nil_value();
+  rest = mrb_nil_value();
+  mrb_get_args(mrb, "*&", &argv, &argc, &b);
+  if (argc == 0) { /* special case to avoid crash */
+    rest = mrb_ary_new(mrb);
+  }
+  else {
+    if (argc > 0) name = argv[0];
+    if (argc > 1) rest = argv[1];
+    if (mrb_array_p(rest)) {
+      if (!mrb_nil_p(name) && mrb_symbol_p(name)) {
+        /* 1stArgument:symbol -> name=nil rest=argv[0]-[n] */
+        mrb_ary_unshift(mrb, rest, name);
+        name = mrb_nil_value();
+      }
+    }
+    else {
+      pargv = &argv[1];
+      argcnt = argc-1;
+      if (!mrb_nil_p(name) && mrb_symbol_p(name)) {
+        /* 1stArgument:symbol -> name=nil rest=argv[0]-[n] */
+        name = mrb_nil_value();
+        pargv = &argv[0];
+        argcnt++;
+      }
+      rest = mrb_ary_new_from_values(mrb, argcnt, pargv);
+    }
+    for (i=0; i<RARRAY_LEN(rest); i++) {
+      id = mrb_obj_to_sym(mrb, RARRAY_PTR(rest)[i]);
+      mrb_ary_set(mrb, rest, i, mrb_symbol_value(id));
+    }
+  }
+  st = make_struct(mrb, name, rest, struct_class(mrb));
+  if (!mrb_nil_p(b)) {
+    mrb_yield_with_class(mrb, b, 1, &st, st, mrb_class_ptr(klass));
+  }
+
+  return st;
+}
+
+static mrb_int
+num_members(mrb_state *mrb, struct RClass *klass)
+{
+  mrb_value members;
+
+  members = struct_ivar_get(mrb, mrb_obj_value(klass), mrb_intern_lit(mrb, "__members__"));
+  if (!mrb_array_p(members)) {
+    mrb_raise(mrb, E_TYPE_ERROR, "broken members");
+  }
+  return RARRAY_LEN(members);
+}
+
+/* 15.2.18.4.8  */
+/*
+ */
+static mrb_value
+mrb_struct_initialize_withArg(mrb_state *mrb, mrb_int argc, mrb_value *argv, mrb_value self)
+{
+  struct RClass *klass = mrb_obj_class(mrb, self);
+  mrb_int i, n;
+
+  n = num_members(mrb, klass);
+  if (n < argc) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "struct size differs");
+  }
+
+  for (i = 0; i < argc; i++) {
+    mrb_ary_set(mrb, self, i, argv[i]);
+  }
+  for (i = argc; i < n; i++) {
+    mrb_ary_set(mrb, self, i, mrb_nil_value());
+  }
+  return self;
+}
+
+static mrb_value
+mrb_struct_initialize(mrb_state *mrb, mrb_value self)
+{
+  mrb_value *argv;
+  mrb_int argc;
+
+  mrb_get_args(mrb, "*", &argv, &argc);
+  return mrb_struct_initialize_withArg(mrb, argc, argv, self);
+}
+
+/* 15.2.18.4.9  */
+/* :nodoc: */
+static mrb_value
+mrb_struct_init_copy(mrb_state *mrb, mrb_value copy)
+{
+  mrb_value s;
+  mrb_int i, len;
+
+  mrb_get_args(mrb, "o", &s);
+
+  if (mrb_obj_equal(mrb, copy, s)) return copy;
+  if (!mrb_obj_is_instance_of(mrb, s, mrb_obj_class(mrb, copy))) {
+    mrb_raise(mrb, E_TYPE_ERROR, "wrong argument class");
+  }
+  if (!mrb_array_p(s)) {
+    mrb_raise(mrb, E_TYPE_ERROR, "corrupted struct");
+  }
+  if (RSTRUCT_LEN(copy) != RSTRUCT_LEN(s)) {
+    mrb_raise(mrb, E_TYPE_ERROR, "struct size mismatch");
+  }
+  len = RSTRUCT_LEN(copy);
+  for (i = 0; i < len; i++) {
+    mrb_ary_set(mrb, copy, i, RSTRUCT_PTR(s)[i]);
+  }
+  return copy;
+}
+
+static mrb_value
+struct_aref_sym(mrb_state *mrb, mrb_value s, mrb_sym id)
+{
+  mrb_value *ptr, members;
+  const mrb_value *ptr_members;
+  mrb_int i, len;
+
+  ptr = RSTRUCT_PTR(s);
+  members = struct_members(mrb, s);
+  ptr_members = RARRAY_PTR(members);
+  len = RARRAY_LEN(members);
+  for (i=0; i<len; i++) {
+    if (mrb_symbol(ptr_members[i]) == id) {
+      return ptr[i];
+    }
+  }
+  mrb_raisef(mrb, E_INDEX_ERROR, "no member '%S' in struct", mrb_sym2str(mrb, id));
+  return mrb_nil_value();       /* not reached */
+}
+
+static mrb_value
+struct_aref_int(mrb_state *mrb, mrb_value s, mrb_int i)
+{
+  if (i < 0) i = RSTRUCT_LEN(s) + i;
+  if (i < 0)
+      mrb_raisef(mrb, E_INDEX_ERROR,
+                 "offset %S too small for struct(size:%S)",
+                 mrb_fixnum_value(i), mrb_fixnum_value(RSTRUCT_LEN(s)));
+  if (RSTRUCT_LEN(s) <= i)
+    mrb_raisef(mrb, E_INDEX_ERROR,
+               "offset %S too large for struct(size:%S)",
+               mrb_fixnum_value(i), mrb_fixnum_value(RSTRUCT_LEN(s)));
+  return RSTRUCT_PTR(s)[i];
+}
+
+/* 15.2.18.4.2  */
+/*
+ *  call-seq:
+ *     struct[symbol]    -> anObject
+ *     struct[fixnum]    -> anObject
+ *
+ *  Attribute Reference---Returns the value of the instance variable
+ *  named by <i>symbol</i>, or indexed (0..length-1) by
+ *  <i>fixnum</i>. Will raise <code>NameError</code> if the named
+ *  variable does not exist, or <code>IndexError</code> if the index is
+ *  out of range.
+ *
+ *     Customer = Struct.new(:name, :address, :zip)
+ *     joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
+ *
+ *     joe["name"]   #=> "Joe Smith"
+ *     joe[:name]    #=> "Joe Smith"
+ *     joe[0]        #=> "Joe Smith"
+ */
+static mrb_value
+mrb_struct_aref(mrb_state *mrb, mrb_value s)
+{
+  mrb_value idx;
+
+  mrb_get_args(mrb, "o", &idx);
+  if (mrb_string_p(idx)) {
+    mrb_value sym = mrb_check_intern_str(mrb, idx);
+
+    if (mrb_nil_p(sym)) {
+      mrb_raisef(mrb, E_INDEX_ERROR, "no member '%S' in struct", idx);
+    }
+    idx = sym;
+  }
+  if (mrb_symbol_p(idx)) {
+    return struct_aref_sym(mrb, s, mrb_symbol(idx));
+  }
+  return struct_aref_int(mrb, s, mrb_int(mrb, idx));
+}
+
+static mrb_value
+mrb_struct_aset_sym(mrb_state *mrb, mrb_value s, mrb_sym id, mrb_value val)
+{
+  mrb_value members, *ptr;
+  const mrb_value *ptr_members;
+  mrb_int i, len;
+
+  members = struct_members(mrb, s);
+  len = RARRAY_LEN(members);
+  if (RSTRUCT_LEN(s) != len) {
+    mrb_raisef(mrb, E_TYPE_ERROR,
+               "struct size differs (%S required %S given)",
+               mrb_fixnum_value(len), mrb_fixnum_value(RSTRUCT_LEN(s)));
+  }
+  ptr = RSTRUCT_PTR(s);
+  ptr_members = RARRAY_PTR(members);
+  for (i=0; i<len; i++) {
+    if (mrb_symbol(ptr_members[i]) == id) {
+      ptr[i] = val;
+      return val;
+    }
+  }
+  mrb_raisef(mrb, E_INDEX_ERROR, "no member '%S' in struct", mrb_sym2str(mrb, id));
+  return val;                   /* not reach */
+}
+
+/* 15.2.18.4.3  */
+/*
+ *  call-seq:
+ *     struct[symbol] = obj    -> obj
+ *     struct[fixnum] = obj    -> obj
+ *
+ *  Attribute Assignment---Assigns to the instance variable named by
+ *  <i>symbol</i> or <i>fixnum</i> the value <i>obj</i> and
+ *  returns it. Will raise a <code>NameError</code> if the named
+ *  variable does not exist, or an <code>IndexError</code> if the index
+ *  is out of range.
+ *
+ *     Customer = Struct.new(:name, :address, :zip)
+ *     joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
+ *
+ *     joe["name"] = "Luke"
+ *     joe[:zip]   = "90210"
+ *
+ *     joe.name   #=> "Luke"
+ *     joe.zip    #=> "90210"
+ */
+
+static mrb_value
+mrb_struct_aset(mrb_state *mrb, mrb_value s)
+{
+  mrb_int i;
+  mrb_value idx;
+  mrb_value val;
+
+  mrb_get_args(mrb, "oo", &idx, &val);
+
+  if (mrb_string_p(idx)) {
+    mrb_value sym = mrb_check_intern_str(mrb, idx);
+
+    if (mrb_nil_p(sym)) {
+      mrb_raisef(mrb, E_INDEX_ERROR, "no member '%S' in struct", idx);
+    }
+    idx = sym;
+  }
+  if (mrb_symbol_p(idx)) {
+    return mrb_struct_aset_sym(mrb, s, mrb_symbol(idx), val);
+  }
+
+  i = mrb_int(mrb, idx);
+  if (i < 0) i = RSTRUCT_LEN(s) + i;
+  if (i < 0) {
+    mrb_raisef(mrb, E_INDEX_ERROR,
+               "offset %S too small for struct(size:%S)",
+               mrb_fixnum_value(i), mrb_fixnum_value(RSTRUCT_LEN(s)));
+  }
+  if (RSTRUCT_LEN(s) <= i) {
+    mrb_raisef(mrb, E_INDEX_ERROR,
+               "offset %S too large for struct(size:%S)",
+               mrb_fixnum_value(i), mrb_fixnum_value(RSTRUCT_LEN(s)));
+  }
+  return RSTRUCT_PTR(s)[i] = val;
+}
+
+/* 15.2.18.4.1  */
+/*
+ *  call-seq:
+ *     struct == other_struct     -> true or false
+ *
+ *  Equality---Returns <code>true</code> if <i>other_struct</i> is
+ *  equal to this one: they must be of the same class as generated by
+ *  <code>Struct::new</code>, and the values of all instance variables
+ *  must be equal (according to <code>Object#==</code>).
+ *
+ *     Customer = Struct.new(:name, :address, :zip)
+ *     joe   = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
+ *     joejr = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
+ *     jane  = Customer.new("Jane Doe", "456 Elm, Anytown NC", 12345)
+ *     joe == joejr   #=> true
+ *     joe == jane    #=> false
+ */
+
+static mrb_value
+mrb_struct_equal(mrb_state *mrb, mrb_value s)
+{
+  mrb_value s2;
+  mrb_value *ptr, *ptr2;
+  mrb_int i, len;
+
+  mrb_get_args(mrb, "o", &s2);
+  if (mrb_obj_equal(mrb, s, s2)) {
+    return mrb_true_value();
+  }
+  if (mrb_obj_class(mrb, s) != mrb_obj_class(mrb, s2)) {
+    return mrb_false_value();
+  }
+  if (RSTRUCT_LEN(s) != RSTRUCT_LEN(s2)) {
+    mrb_bug(mrb, "inconsistent struct"); /* should never happen */
+  }
+  ptr = RSTRUCT_PTR(s);
+  ptr2 = RSTRUCT_PTR(s2);
+  len = RSTRUCT_LEN(s);
+  for (i=0; i<len; i++) {
+    if (!mrb_equal(mrb, ptr[i], ptr2[i])) {
+      return mrb_false_value();
+    }
+  }
+
+  return mrb_true_value();
+}
+
+/* 15.2.18.4.12(x)  */
+/*
+ * code-seq:
+ *   struct.eql?(other)   -> true or false
+ *
+ * Two structures are equal if they are the same object, or if all their
+ * fields are equal (using <code>eql?</code>).
+ */
+static mrb_value
+mrb_struct_eql(mrb_state *mrb, mrb_value s)
+{
+  mrb_value s2;
+  mrb_value *ptr, *ptr2;
+  mrb_int i, len;
+
+  mrb_get_args(mrb, "o", &s2);
+  if (mrb_obj_equal(mrb, s, s2)) {
+    return mrb_true_value();
+  }
+  if (mrb_obj_class(mrb, s) != mrb_obj_class(mrb, s2)) {
+    return mrb_false_value();
+  }
+  if (RSTRUCT_LEN(s) != RSTRUCT_LEN(s2)) {
+    mrb_bug(mrb, "inconsistent struct"); /* should never happen */
+  }
+  ptr = RSTRUCT_PTR(s);
+  ptr2 = RSTRUCT_PTR(s2);
+  len = RSTRUCT_LEN(s);
+  for (i=0; i<len; i++) {
+    if (!mrb_eql(mrb, ptr[i], ptr2[i])) {
+      return mrb_false_value();
+    }
+  }
+
+  return mrb_true_value();
+}
+
+/*
+ * call-seq:
+ *    struct.length   -> Fixnum
+ *    struct.size     -> Fixnum
+ *
+ * Returns number of struct members.
+ */
+static mrb_value
+mrb_struct_len(mrb_state *mrb, mrb_value self)
+{
+  return mrb_fixnum_value(RSTRUCT_LEN(self));
+}
+
+/*
+ * call-seq:
+ *    struct.to_a    -> array
+ *    struct.values  -> array
+ *
+ * Create an array from struct values.
+ */
+static mrb_value
+mrb_struct_to_a(mrb_state *mrb, mrb_value self)
+{
+  return mrb_ary_new_from_values(mrb, RSTRUCT_LEN(self), RSTRUCT_PTR(self));
+}
+
+/*
+ * call-seq:
+ *    struct.to_h -> hash
+ *
+ * Create a hash from member names and struct values.
+ */
+static mrb_value
+mrb_struct_to_h(mrb_state *mrb, mrb_value self)
+{
+  mrb_value members, ret;
+  mrb_int i;
+
+  members = struct_s_members(mrb, mrb_class(mrb, self));
+  ret = mrb_hash_new_capa(mrb, RARRAY_LEN(members));
+
+  for (i = 0; i < RARRAY_LEN(members); ++i) {
+    mrb_hash_set(mrb, ret, RARRAY_PTR(members)[i], RSTRUCT_PTR(self)[i]);
+  }
+
+  return ret;
+}
+
+static mrb_value
+mrb_struct_values_at(mrb_state *mrb, mrb_value self)
+{
+  mrb_int argc;
+  mrb_value *argv;
+
+  mrb_get_args(mrb, "*", &argv, &argc);
+
+  return mrb_get_values_at(mrb, self, RSTRUCT_LEN(self), argc, argv, struct_aref_int);
+}
+
+/*
+ *  A <code>Struct</code> is a convenient way to bundle a number of
+ *  attributes together, using accessor methods, without having to write
+ *  an explicit class.
+ *
+ *  The <code>Struct</code> class is a generator of specific classes,
+ *  each one of which is defined to hold a set of variables and their
+ *  accessors. In these examples, we'll call the generated class
+ *  "<i>Customer</i>Class," and we'll show an example instance of that
+ *  class as "<i>Customer</i>Inst."
+ *
+ *  In the descriptions that follow, the parameter <i>symbol</i> refers
+ *  to a symbol, which is either a quoted string or a
+ *  <code>Symbol</code> (such as <code>:name</code>).
+ */
+void
+mrb_mruby_struct_gem_init(mrb_state* mrb)
+{
+  struct RClass *st;
+  st = mrb_define_class(mrb, "Struct",  mrb->object_class);
+
+  mrb_define_class_method(mrb, st, "new",             mrb_struct_s_def,       MRB_ARGS_ANY());  /* 15.2.18.3.1  */
+
+  mrb_define_method(mrb, st,       "==",              mrb_struct_equal,       MRB_ARGS_REQ(1)); /* 15.2.18.4.1  */
+  mrb_define_method(mrb, st,       "[]",              mrb_struct_aref,        MRB_ARGS_REQ(1)); /* 15.2.18.4.2  */
+  mrb_define_method(mrb, st,       "[]=",             mrb_struct_aset,        MRB_ARGS_REQ(2)); /* 15.2.18.4.3  */
+  mrb_define_method(mrb, st,       "members",         mrb_struct_members,     MRB_ARGS_NONE()); /* 15.2.18.4.6  */
+  mrb_define_method(mrb, st,       "initialize",      mrb_struct_initialize,  MRB_ARGS_ANY());  /* 15.2.18.4.8  */
+  mrb_define_method(mrb, st,       "initialize_copy", mrb_struct_init_copy,   MRB_ARGS_REQ(1)); /* 15.2.18.4.9  */
+  mrb_define_method(mrb, st,       "eql?",            mrb_struct_eql,         MRB_ARGS_REQ(1)); /* 15.2.18.4.12(x)  */
+
+  mrb_define_method(mrb, st,        "size",           mrb_struct_len,         MRB_ARGS_NONE());
+  mrb_define_method(mrb, st,        "length",         mrb_struct_len,         MRB_ARGS_NONE());
+  mrb_define_method(mrb, st,        "to_a",           mrb_struct_to_a,        MRB_ARGS_NONE());
+  mrb_define_method(mrb, st,        "values",         mrb_struct_to_a,        MRB_ARGS_NONE());
+  mrb_define_method(mrb, st,        "to_h",           mrb_struct_to_h,        MRB_ARGS_NONE());
+  mrb_define_method(mrb, st,        "values_at",      mrb_struct_values_at,   MRB_ARGS_NONE());
+}
+
+void
+mrb_mruby_struct_gem_final(mrb_state* mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-struct/test/struct.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-struct/test/struct.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-struct/test/struct.rb	(revision 270)
@@ -0,0 +1,131 @@
+##
+# Struct ISO Test
+
+assert('Struct', '15.2.18') do
+  Struct.class == Class
+end
+
+assert('Struct.new', '15.2.18.3.1') do
+  c = Struct.new(:m1, :m2)
+  c.superclass == Struct and
+    c.members == [:m1,:m2]
+end
+
+# Check crash bug with Struc.new and no params.
+assert('Struct.new', '15.2.18.3.1') do
+  c = Struct.new()
+  c.superclass == Struct and c.members == []
+end
+
+assert('Struct#==', '15.2.18.4.1') do
+  c = Struct.new(:m1, :m2)
+  cc1 = c.new(1,2)
+  cc2 = c.new(1,2)
+  cc1 == cc2
+end
+
+assert('Struct#[]', '15.2.18.4.2') do
+  c = Struct.new(:m1, :m2)
+  cc = c.new(1,2)
+  cc[:m1] == 1 and cc["m2"] == 2
+end
+
+assert('Struct#[]=', '15.2.18.4.3') do
+  c = Struct.new(:m1, :m2)
+  cc = c.new(1,2)
+  cc[:m1] = 3
+  cc[:m1] == 3
+  cc["m2"] = 3
+  assert_equal 3, cc["m2"]
+  assert_raise(TypeError) { cc[[]] = 3 }
+end
+
+assert('Struct#each', '15.2.18.4.4') do
+  c = Struct.new(:m1, :m2)
+  cc = c.new(1,2)
+  a = []
+  cc.each{|x|
+    a << x
+  }
+  a[0] == 1 and a[1] == 2
+end
+
+assert('Struct#each_pair', '15.2.18.4.5') do
+  c = Struct.new(:m1, :m2)
+  cc = c.new(1,2)
+  a = []
+  cc.each_pair{|k,v|
+    a << [k,v]
+  }
+  a[0] == [:m1, 1] and a[1] == [:m2, 2]
+end
+
+assert('Struct#members', '15.2.18.4.6') do
+  c = Struct.new(:m1, :m2)
+  cc = c.new(1,2)
+  cc.members == [:m1,:m2]
+end
+
+assert('Struct#select', '15.2.18.4.7') do
+  c = Struct.new(:m1, :m2)
+  cc = c.new(1,2)
+  cc.select{|v| v % 2 == 0} == [2]
+end
+
+assert('large struct') do
+  c = Struct.new(:m1, :m2, :m3, :m4, :m5, :m6, :m7, :m8, :m9, :m10, :m11, :m12, :m13)
+  cc = c.new(1,2,3,4,5,6,7,8,9,10,11,12,13)
+  assert_equal 1, cc.m1
+  assert_equal 2, cc.m2
+  assert_equal 3, cc.m3
+  assert_equal 4, cc.m4
+  assert_equal 5, cc.m5
+  assert_equal 6, cc.m6
+  assert_equal 7, cc.m7
+  assert_equal 8, cc.m8
+  assert_equal 9, cc.m9
+  assert_equal 10, cc.m10
+  assert_equal 13, cc.m13
+
+  cc.m13 = 'test'
+  assert_equal 'test', cc.m13
+
+  assert_raise(NoMethodError) { cc.m14 }
+end
+
+assert('wrong struct arg count') do
+  c = Struct.new(:m1)
+  assert_raise ArgumentError do
+    cc = c.new(1,2,3)
+  end
+end
+
+assert('struct inspect') do
+  c = Struct.new(:m1, :m2, :m3, :m4, :m5)
+  cc = c.new(1,2,3,4,5)
+  assert_equal "#<struct m1=1, m2=2, m3=3, m4=4, m5=5>", cc.inspect
+end
+
+assert('Struct#length, Struct#size') do
+  s = Struct.new(:f1, :f2).new(0, 1)
+  assert_equal 2, s.size
+  assert_equal 2, s.length
+end
+
+assert('Struct#to_a, Struct#values') do
+  s = Struct.new(:mem1, :mem2).new('a', 'b')
+  assert_equal ['a', 'b'], s.to_a
+  assert_equal ['a', 'b'], s.values
+end
+
+assert('Struct#to_h') do
+  s = Struct.new(:white, :red, :green).new('ruuko', 'yuzuki', 'hitoe')
+  assert_equal(:white => 'ruuko', :red => 'yuzuki', :green => 'hitoe') { s.to_h }
+end
+
+assert('Struct#values_at') do
+  a = Struct.new(:blue, :purple).new('aki', 'io')
+  assert_equal ['aki'], a.values_at(0)
+  assert_equal ['io', 'aki'], a.values_at(1, 0)
+  assert_raise(IndexError) { a.values_at 2 }
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-symbol-ext/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-symbol-ext/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-symbol-ext/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-symbol-ext') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'Symbol class extension'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-symbol-ext/mrblib/symbol.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-symbol-ext/mrblib/symbol.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-symbol-ext/mrblib/symbol.rb	(revision 270)
@@ -0,0 +1,65 @@
+class Symbol
+  include Comparable
+
+  alias intern to_sym
+
+  def to_proc
+    ->(obj,*args,&block) do
+      obj.__send__(self, *args, &block)
+    end
+  end
+
+  ##
+  # call-seq:
+  #   sym.capitalize  -> symbol
+  #
+  # Same as <code>sym.to_s.capitalize.intern</code>.
+
+  def capitalize
+    (self.to_s.capitalize! || self).to_sym
+  end
+
+  ##
+  # call-seq:
+  #   sym.downcase  -> symbol
+  #
+  # Same as <code>sym.to_s.downcase.intern</code>.
+
+  def downcase
+    (self.to_s.downcase! || self).to_sym
+  end
+
+  ##
+  # call-seq:
+  #   sym.upcase    -> symbol
+  #
+  # Same as <code>sym.to_s.upcase.intern</code>.
+
+  def upcase
+    (self.to_s.upcase! || self).to_sym
+  end
+
+  ##
+  # call-seq:
+  #   sym.casecmp(other)  -> -1, 0, +1 or nil
+  #
+  # Case-insensitive version of <code>Symbol#<=></code>.
+
+  def casecmp(other)
+    return nil unless other.kind_of?(Symbol)
+    lhs =  self.to_s; lhs.upcase!
+    rhs = other.to_s; rhs.upcase!
+    lhs <=> rhs
+  end
+
+  #
+  # call-seq:
+  #   sym.empty?   -> true or false
+  #
+  # Returns that _sym_ is :"" or not.
+
+  def empty?
+    self.length == 0
+  end
+
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-symbol-ext/src/symbol.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-symbol-ext/src/symbol.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-symbol-ext/src/symbol.c	(revision 270)
@@ -0,0 +1,64 @@
+#include "mruby.h"
+#include "mruby/khash.h"
+#include "mruby/array.h"
+
+typedef struct symbol_name {
+  size_t len;
+  const char *name;
+} symbol_name;
+
+/*
+ *  call-seq:
+ *     Symbol.all_symbols    => array
+ *
+ *  Returns an array of all the symbols currently in Ruby's symbol
+ *  table.
+ *
+ *     Symbol.all_symbols.size    #=> 903
+ *     Symbol.all_symbols[1,20]   #=> [:floor, :ARGV, :Binding, :symlink,
+ *                                     :chown, :EOFError, :$;, :String,
+ *                                     :LOCK_SH, :"setuid?", :$<,
+ *                                     :default_proc, :compact, :extend,
+ *                                     :Tms, :getwd, :$=, :ThreadGroup,
+ *                                     :wait2, :$>]
+ */
+static mrb_value
+mrb_sym_all_symbols(mrb_state *mrb, mrb_value self)
+{
+  mrb_sym i, lim;
+  mrb_value ary = mrb_ary_new_capa(mrb, mrb->symidx);
+
+  for (i=1, lim=mrb->symidx+1; i<lim; i++) {
+    mrb_ary_push(mrb, ary, mrb_symbol_value(i));
+  }
+
+  return ary;
+}
+
+/*
+ * call-seq:
+ *   sym.length    -> integer
+ *
+ * Same as <code>sym.to_s.length</code>.
+ */
+static mrb_value
+mrb_sym_length(mrb_state *mrb, mrb_value self)
+{
+  mrb_int len;
+  mrb_sym2name_len(mrb, mrb_symbol(self), &len);
+  return mrb_fixnum_value(len);
+}
+
+void
+mrb_mruby_symbol_ext_gem_init(mrb_state* mrb)
+{
+  struct RClass *s = mrb->symbol_class;
+  mrb_define_class_method(mrb, s, "all_symbols", mrb_sym_all_symbols, MRB_ARGS_NONE());
+  mrb_define_method(mrb, s, "length", mrb_sym_length, MRB_ARGS_NONE());
+  mrb_define_method(mrb, s, "size", mrb_sym_length, MRB_ARGS_NONE());
+}
+
+void
+mrb_mruby_symbol_ext_gem_final(mrb_state* mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-symbol-ext/test/symbol.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-symbol-ext/test/symbol.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-symbol-ext/test/symbol.rb	(revision 270)
@@ -0,0 +1,48 @@
+##
+# Symbol(Ext) Test
+
+assert('Symbol#to_proc') do
+  assert_equal 5, :abs.to_proc[-5]
+end
+
+assert('Symbol.all_symbols') do
+  foo = [:__symbol_test_1, :__symbol_test_2, :__symbol_test_3].sort
+  symbols = Symbol.all_symbols.select{|sym|sym.to_s.include? '__symbol_test'}.sort
+  assert_equal foo, symbols
+end
+
+assert("Symbol#length") do
+  assert_equal 5, :hello.size
+  assert_equal 5, :mruby.length
+end
+
+assert("Symbol#capitalize") do
+  assert_equal :Hello, :hello.capitalize
+  assert_equal :Hello, :HELLO.capitalize
+  assert_equal :Hello, :Hello.capitalize
+end
+
+assert("Symbol#downcase") do
+  assert_equal :hello, :hEllO.downcase
+  assert_equal :hello, :hello.downcase
+end
+
+assert("Symbol#upcase") do
+  assert_equal :HELLO, :hEllO.upcase
+  assert_equal :HELLO, :HELLO.upcase
+end
+
+assert("Symbol#casecmp") do
+  assert_equal 0, :HELLO.casecmp(:hEllO)
+  assert_equal 1, :HELLO.casecmp(:hEllN)
+  assert_equal(-1, :HELLO.casecmp(:hEllP))
+  assert_nil :HELLO.casecmp("hEllO")
+end
+
+assert("Symbol#empty?") do
+  assert_true :''.empty?
+end
+
+assert('Symbol#intern') do
+  assert_equal :test, :test.intern
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-test/README.md
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-test/README.md	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-test/README.md	(revision 270)
@@ -0,0 +1,7 @@
+Running Tests
+=============
+
+To run the tests, execute the following from the project's root directory.
+
+    $ make test
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-test/driver.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-test/driver.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-test/driver.c	(revision 270)
@@ -0,0 +1,166 @@
+/*
+** mrbtest - Test for Embeddable Ruby
+**
+** This program runs Ruby test programs in test/t directory
+** against the current mruby implementation.
+*/
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "mruby.h"
+#include "mruby/proc.h"
+#include "mruby/data.h"
+#include "mruby/compile.h"
+#include "mruby/string.h"
+#include "mruby/variable.h"
+#include "mruby/array.h"
+
+void
+mrb_init_mrbtest(mrb_state *);
+
+/* Print a short remark for the user */
+static void
+print_hint(void)
+{
+  printf("mrbtest - Embeddable Ruby Test\n\n");
+}
+
+static int
+check_error(mrb_state *mrb)
+{
+  /* Error check */
+  /* $ko_test and $kill_test should be 0 */
+  mrb_value ko_test = mrb_gv_get(mrb, mrb_intern_lit(mrb, "$ko_test"));
+  mrb_value kill_test = mrb_gv_get(mrb, mrb_intern_lit(mrb, "$kill_test"));
+
+  return mrb_fixnum_p(ko_test) && mrb_fixnum(ko_test) == 0 && mrb_fixnum_p(kill_test) && mrb_fixnum(kill_test) == 0;
+}
+
+static int
+eval_test(mrb_state *mrb)
+{
+  /* evaluate the test */
+  mrb_funcall(mrb, mrb_top_self(mrb), "report", 0);
+  /* did an exception occur? */
+  if (mrb->exc) {
+    mrb_print_error(mrb);
+    mrb->exc = 0;
+    return EXIT_FAILURE;
+  }
+  else if (!check_error(mrb)) {
+    return EXIT_FAILURE;
+  }
+  return EXIT_SUCCESS;
+}
+
+static void
+t_printstr(mrb_state *mrb, mrb_value obj)
+{
+  char *s;
+  int len;
+
+  if (mrb_string_p(obj)) {
+    s = RSTRING_PTR(obj);
+    len = RSTRING_LEN(obj);
+    fwrite(s, len, 1, stdout);
+  }
+}
+
+mrb_value
+mrb_t_printstr(mrb_state *mrb, mrb_value self)
+{
+  mrb_value argv;
+
+  mrb_get_args(mrb, "o", &argv);
+  t_printstr(mrb, argv);
+
+  return argv;
+}
+
+void
+mrb_init_test_driver(mrb_state *mrb, mrb_bool verbose)
+{
+  struct RClass *krn, *mrbtest;
+
+  krn = mrb->kernel_module;
+  mrb_define_method(mrb, krn, "__t_printstr__", mrb_t_printstr, MRB_ARGS_REQ(1));
+
+  mrbtest = mrb_define_module(mrb, "Mrbtest");
+
+  mrb_define_const(mrb, mrbtest, "FIXNUM_MAX", mrb_fixnum_value(MRB_INT_MAX));
+  mrb_define_const(mrb, mrbtest, "FIXNUM_MIN", mrb_fixnum_value(MRB_INT_MIN));
+  mrb_define_const(mrb, mrbtest, "FIXNUM_BIT", mrb_fixnum_value(MRB_INT_BIT));
+
+  if (verbose) {
+    mrb_gv_set(mrb, mrb_intern_lit(mrb, "$mrbtest_verbose"), mrb_true_value());
+  }
+}
+
+void
+mrb_t_pass_result(mrb_state *mrb_dst, mrb_state *mrb_src)
+{
+  mrb_value res_src;
+
+  if (mrb_src->exc) {
+    mrb_print_error(mrb_src);
+    exit(EXIT_FAILURE);
+  }
+
+#define TEST_COUNT_PASS(name)                                           \
+  do {                                                                  \
+    res_src = mrb_gv_get(mrb_src, mrb_intern_lit(mrb_src, "$" #name));  \
+    if (mrb_fixnum_p(res_src)) {                                        \
+      mrb_value res_dst = mrb_gv_get(mrb_dst, mrb_intern_lit(mrb_dst, "$" #name)); \
+      mrb_gv_set(mrb_dst, mrb_intern_lit(mrb_dst, "$" #name), mrb_fixnum_value(mrb_fixnum(res_dst) + mrb_fixnum(res_src))); \
+    }                                                                   \
+  } while (FALSE)                                                       \
+
+  TEST_COUNT_PASS(ok_test);
+  TEST_COUNT_PASS(ko_test);
+  TEST_COUNT_PASS(kill_test);
+
+#undef TEST_COUNT_PASS
+
+  res_src = mrb_gv_get(mrb_src, mrb_intern_lit(mrb_src, "$asserts"));
+
+  if (mrb_array_p(res_src)) {
+    mrb_int i;
+    mrb_value res_dst = mrb_gv_get(mrb_dst, mrb_intern_lit(mrb_dst, "$asserts"));
+    for (i = 0; i < RARRAY_LEN(res_src); ++i) {
+      mrb_value val_src = RARRAY_PTR(res_src)[i];
+      mrb_ary_push(mrb_dst, res_dst, mrb_str_new(mrb_dst, RSTRING_PTR(val_src), RSTRING_LEN(val_src)));
+    }
+  }
+}
+
+int
+main(int argc, char **argv)
+{
+  mrb_state *mrb;
+  int ret;
+  mrb_bool verbose = FALSE;
+
+  print_hint();
+
+  /* new interpreter instance */
+  mrb = mrb_open();
+  if (mrb == NULL) {
+    fprintf(stderr, "Invalid mrb_state, exiting test driver");
+    return EXIT_FAILURE;
+  }
+
+  if (argc == 2 && argv[1][0] == '-' && argv[1][1] == 'v') {
+    printf("verbose mode: enable\n\n");
+    verbose = TRUE;
+  }
+
+  mrb_init_test_driver(mrb, verbose);
+  mrb_init_mrbtest(mrb);
+  ret = eval_test(mrb);
+  mrb_close(mrb);
+
+  return ret;
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-test/init_mrbtest.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-test/init_mrbtest.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-test/init_mrbtest.c	(revision 270)
@@ -0,0 +1,40 @@
+#include <stdlib.h>
+#include "mruby.h"
+#include "mruby/irep.h"
+#include "mruby/variable.h"
+
+extern const uint8_t mrbtest_assert_irep[];
+extern const uint8_t mrbtest_irep[];
+
+void mrbgemtest_init(mrb_state* mrb);
+void mrb_init_test_driver(mrb_state* mrb, mrb_bool verbose);
+void mrb_t_pass_result(mrb_state *mrb_dst, mrb_state *mrb_src);
+
+void
+mrb_init_mrbtest(mrb_state *mrb)
+{
+  mrb_state *core_test;
+
+  mrb_load_irep(mrb, mrbtest_assert_irep);
+
+  core_test = mrb_open_core(mrb_default_allocf, NULL);
+  if (core_test == NULL) {
+    fprintf(stderr, "Invalid mrb_state, exiting %s", __FUNCTION__);
+    exit(EXIT_FAILURE);
+  }
+  mrb_init_test_driver(core_test, mrb_test(mrb_gv_get(mrb, mrb_intern_lit(mrb, "$mrbtest_verbose"))));
+  mrb_load_irep(core_test, mrbtest_assert_irep);
+  mrb_load_irep(core_test, mrbtest_irep);
+  mrb_t_pass_result(mrb, core_test);
+
+#ifndef DISABLE_GEMS
+  mrbgemtest_init(mrb);
+#endif
+
+  if (mrb->exc) {
+    mrb_print_error(mrb);
+    exit(EXIT_FAILURE);
+  }
+  mrb_close(core_test);
+}
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-test/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-test/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-test/mrbgem.rake	(revision 270)
@@ -0,0 +1,174 @@
+MRuby::Gem::Specification.new('mruby-test') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'mruby test'
+
+  build.bins << 'mrbtest'
+  spec.add_dependency('mruby-compiler', :core => 'mruby-compiler')
+
+  clib = "#{build_dir}/mrbtest.c"
+  mlib = clib.ext(exts.object)
+  mrbs = Dir.glob("#{MRUBY_ROOT}/test/t/*.rb")
+  exec = exefile("#{build.build_dir}/bin/mrbtest")
+
+  libmruby = libfile("#{build.build_dir}/lib/libmruby")
+  libmruby_core = libfile("#{build.build_dir}/lib/libmruby_core")
+
+  mrbtest_lib = libfile("#{build_dir}/mrbtest")
+  mrbtest_objs = []
+
+  driver_obj = objfile("#{build_dir}/driver")
+  driver = "#{spec.dir}/driver.c"
+
+  assert_c = "#{build_dir}/assert.c"
+  assert_rb = "#{MRUBY_ROOT}/test/assert.rb"
+  assert_lib = assert_c.ext(exts.object)
+  mrbtest_objs << assert_lib
+
+  file assert_lib => assert_c
+  file assert_c => [build.mrbcfile, assert_rb] do |t|
+    open(t.name, 'w') do |f|
+      mrbc.run f, assert_rb, 'mrbtest_assert_irep'
+    end
+  end
+
+  gem_table = build.gems.generate_gem_table build
+
+  build.gems.each do |g|
+    test_rbobj = g.test_rbireps.ext(exts.object)
+    g.test_objs << test_rbobj
+    dep_list = build.gems.tsort_dependencies(g.test_dependencies, gem_table).select(&:generate_functions)
+
+    file test_rbobj => g.test_rbireps
+    file g.test_rbireps => [g.test_rbfiles].flatten + [File.join(g.dir, 'mrbgem.rake'), g.build.mrbcfile, "#{MRUBY_ROOT}/tasks/mrbgem_spec.rake"] do |t|
+      FileUtils.mkdir_p File.dirname(t.name)
+      open(t.name, 'w') do |f|
+        g.print_gem_test_header(f)
+        test_preload = g.test_preload and [g.dir, MRUBY_ROOT].map {|dir|
+          File.expand_path(g.test_preload, dir)
+        }.find {|file| File.exist?(file) }
+
+        f.puts %Q[/*]
+        f.puts %Q[ * This file contains a test code for #{g.name} gem.]
+        f.puts %Q[ *]
+        f.puts %Q[ * IMPORTANT:]
+        f.puts %Q[ *   This file was generated!]
+        f.puts %Q[ *   All manual changes will get lost.]
+        f.puts %Q[ */]
+        if test_preload.nil?
+          f.puts %Q[extern const uint8_t mrbtest_assert_irep[];]
+        else
+          g.build.mrbc.run f, test_preload, "gem_test_irep_#{g.funcname}_preload"
+        end
+        g.test_rbfiles.flatten.each_with_index do |rbfile, i|
+          g.build.mrbc.run f, rbfile, "gem_test_irep_#{g.funcname}_#{i}"
+        end
+        f.puts %Q[void mrb_#{g.funcname}_gem_test(mrb_state *mrb);] unless g.test_objs.empty?
+        dep_list.each do |d|
+          f.puts %Q[void GENERATED_TMP_mrb_#{d.funcname}_gem_init(mrb_state *mrb);]
+          f.puts %Q[void GENERATED_TMP_mrb_#{d.funcname}_gem_final(mrb_state *mrb);]
+        end
+        f.puts %Q[void mrb_init_test_driver(mrb_state *mrb, mrb_bool verbose);]
+        f.puts %Q[void mrb_t_pass_result(mrb_state *dst, mrb_state *src);]
+        f.puts %Q[void GENERATED_TMP_mrb_#{g.funcname}_gem_test(mrb_state *mrb) {]
+        unless g.test_rbfiles.empty?
+          f.puts %Q[  mrb_state *mrb2;]
+          unless g.test_args.empty?
+            f.puts %Q[  mrb_value test_args_hash;]
+          end
+          f.puts %Q[  int ai;]
+          g.test_rbfiles.count.times do |i|
+            f.puts %Q[  ai = mrb_gc_arena_save(mrb);]
+            f.puts %Q[  mrb2 = mrb_open_core(mrb_default_allocf, NULL);]
+            f.puts %Q[  if (mrb2 == NULL) {]
+            f.puts %Q[    fprintf(stderr, "Invalid mrb_state, exiting \%s", __FUNCTION__);]
+            f.puts %Q[    exit(EXIT_FAILURE);]
+            f.puts %Q[  }]
+            dep_list.each do |d|
+              f.puts %Q[  GENERATED_TMP_mrb_#{d.funcname}_gem_init(mrb2);]
+              f.puts %Q[  mrb_state_atexit(mrb2, GENERATED_TMP_mrb_#{d.funcname}_gem_final);]
+            end
+            f.puts %Q[  mrb_init_test_driver(mrb2, mrb_test(mrb_gv_get(mrb, mrb_intern_lit(mrb, "$mrbtest_verbose"))));]
+            if test_preload.nil?
+              f.puts %Q[  mrb_load_irep(mrb2, mrbtest_assert_irep);]
+            else
+              f.puts %Q[  mrb_load_irep(mrb2, gem_test_irep_#{g.funcname}_preload);]
+            end
+            f.puts %Q[  if (mrb2->exc) {]
+            f.puts %Q[    mrb_print_error(mrb2);]
+            f.puts %Q[    exit(EXIT_FAILURE);]
+            f.puts %Q[  }]
+            f.puts %Q[  mrb_const_set(mrb2, mrb_obj_value(mrb2->object_class), mrb_intern_lit(mrb2, "GEMNAME"), mrb_str_new(mrb2, "#{g.name}", #{g.name.length}));]
+
+            unless g.test_args.empty?
+              f.puts %Q[  test_args_hash = mrb_hash_new_capa(mrb, #{g.test_args.length}); ]
+              g.test_args.each do |arg_name, arg_value|
+                escaped_arg_name = arg_name.gsub('\\', '\\\\\\\\').gsub('"', '\"')
+                escaped_arg_value = arg_value.gsub('\\', '\\\\\\\\').gsub('"', '\"')
+                f.puts %Q[  mrb_hash_set(mrb2, test_args_hash, mrb_str_new(mrb2, "#{escaped_arg_name.to_s}", #{escaped_arg_name.to_s.length}), mrb_str_new(mrb2, "#{escaped_arg_value.to_s}", #{escaped_arg_value.to_s.length})); ]
+              end
+              f.puts %Q[  mrb_const_set(mrb2, mrb_obj_value(mrb2->object_class), mrb_intern_lit(mrb2, "TEST_ARGS"), test_args_hash); ]
+            end
+
+            f.puts %Q[  mrb_#{g.funcname}_gem_test(mrb2);] if g.custom_test_init?
+
+            f.puts %Q[  mrb_load_irep(mrb2, gem_test_irep_#{g.funcname}_#{i});]
+            f.puts %Q[  ]
+
+            f.puts %Q[  mrb_t_pass_result(mrb, mrb2);]
+            f.puts %Q[  mrb_close(mrb2);]
+            f.puts %Q[  mrb_gc_arena_restore(mrb, ai);]
+          end
+        end
+        f.puts %Q[}]
+      end
+    end
+  end
+
+  build.gems.each do |v|
+    mrbtest_objs.concat v.test_objs
+  end
+
+  file mrbtest_lib => mrbtest_objs do |t|
+    build.archiver.run t.name, t.prerequisites
+  end
+
+  unless build.build_mrbtest_lib_only?
+    file exec => [driver_obj, mlib, mrbtest_lib, libmruby_core, libmruby] do |t|
+      gem_flags = build.gems.map { |g| g.linker.flags }
+      gem_flags_before_libraries = build.gems.map { |g| g.linker.flags_before_libraries }
+      gem_flags_after_libraries = build.gems.map { |g| g.linker.flags_after_libraries }
+      gem_libraries = build.gems.map { |g| g.linker.libraries }
+      gem_library_paths = build.gems.map { |g| g.linker.library_paths }
+      build.linker.run t.name, t.prerequisites, gem_libraries, gem_library_paths, gem_flags, gem_flags_before_libraries
+    end
+  end
+
+  init = "#{spec.dir}/init_mrbtest.c"
+  file mlib => clib
+  file clib => [build.mrbcfile, init] + mrbs do |t|
+    _pp "GEN", "*.rb", "#{clib.relative_path}"
+    FileUtils.mkdir_p File.dirname(clib)
+    open(clib, 'w') do |f|
+      f.puts %Q[/*]
+      f.puts %Q[ * This file contains a list of all]
+      f.puts %Q[ * test functions.]
+      f.puts %Q[ *]
+      f.puts %Q[ * IMPORTANT:]
+      f.puts %Q[ *   This file was generated!]
+      f.puts %Q[ *   All manual changes will get lost.]
+      f.puts %Q[ */]
+      f.puts %Q[]
+      f.puts IO.read(init)
+      mrbc.run f, mrbs, 'mrbtest_irep'
+      build.gems.each do |g|
+        f.puts %Q[void GENERATED_TMP_mrb_#{g.funcname}_gem_test(mrb_state *mrb);]
+      end
+      f.puts %Q[void mrbgemtest_init(mrb_state* mrb) {]
+      build.gems.each do |g|
+        f.puts %Q[    GENERATED_TMP_mrb_#{g.funcname}_gem_test(mrb);]
+      end
+      f.puts %Q[}]
+    end
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-time/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-time/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-time/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-time') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'standard Time class'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-time/mrblib/time.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-time/mrblib/time.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-time/mrblib/time.rb	(revision 270)
@@ -0,0 +1,9 @@
+class Time
+  def sunday?;  wday == 0 end
+  def monday?;  wday == 1 end
+  def tuesday?;  wday == 2 end
+  def wednesday?;  wday == 3 end
+  def thursday?;  wday == 4 end
+  def friday?;  wday == 5 end
+  def saturday?;  wday == 6 end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-time/src/time.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-time/src/time.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-time/src/time.c	(revision 270)
@@ -0,0 +1,800 @@
+/*
+** time.c - Time class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include <math.h>
+#include <stdio.h>
+#include <time.h>
+#include "mruby.h"
+#include "mruby/class.h"
+#include "mruby/data.h"
+
+#if !defined(__MINGW64__) && defined(_WIN32)
+# define llround(x) round(x)
+#endif
+
+#if defined(__MINGW64__) || defined(__MINGW32__)
+# include <sys/time.h>
+#endif
+
+/** Time class configuration */
+
+/* gettimeofday(2) */
+/* C99 does not have gettimeofday that is required to retrieve microseconds */
+/* uncomment following macro on platforms without gettimeofday(2) */
+/* #define NO_GETTIMEOFDAY */
+
+/* gmtime(3) */
+/* C99 does not have reentrant gmtime_r() so it might cause troubles under */
+/* multi-threading environment.  undef following macro on platforms that */
+/* does not have gmtime_r() and localtime_r(). */
+/* #define NO_GMTIME_R */
+
+#ifdef _WIN32
+#if _MSC_VER
+/* Win32 platform do not provide gmtime_r/localtime_r; emulate them using gmtime_s/localtime_s */
+#define gmtime_r(tp, tm)    ((gmtime_s((tm), (tp)) == 0) ? (tm) : NULL)
+#define localtime_r(tp, tm)    ((localtime_s((tm), (tp)) == 0) ? (tm) : NULL)
+#else
+#define NO_GMTIME_R
+#endif
+#endif
+
+/* timegm(3) */
+/* mktime() creates tm structure for localtime; timegm() is for UTC time */
+/* define following macro to use probably faster timegm() on the platform */
+/* #define USE_SYSTEM_TIMEGM */
+
+/** end of Time class configuration */
+
+#ifndef NO_GETTIMEOFDAY
+# ifdef _WIN32
+#  define WIN32_LEAN_AND_MEAN  /* don't include winsock.h */
+#  include <windows.h>
+#  define gettimeofday my_gettimeofday
+
+#  ifdef _MSC_VER
+#    define UI64(x) x##ui64
+#  else
+#    define UI64(x) x##ull
+#  endif
+
+typedef long suseconds_t;
+
+# if (!defined __MINGW64__) && (!defined __MINGW32__)
+struct timeval {
+  time_t tv_sec;
+  suseconds_t tv_usec;
+};
+# endif
+
+static int
+gettimeofday(struct timeval *tv, void *tz)
+{
+  if (tz) {
+    mrb_assert(0);  /* timezone is not supported */
+  }
+  if (tv) {
+    union {
+      FILETIME ft;
+      unsigned __int64 u64;
+    } t;
+    GetSystemTimeAsFileTime(&t.ft);   /* 100 ns intervals since Windows epoch */
+    t.u64 -= UI64(116444736000000000);  /* Unix epoch bias */
+    t.u64 /= 10;                      /* to microseconds */
+    tv->tv_sec = (time_t)(t.u64 / (1000 * 1000));
+    tv->tv_usec = t.u64 % (1000 * 1000);
+  }
+  return 0;
+}
+# else
+#  include <sys/time.h>
+# endif
+#endif
+#ifdef NO_GMTIME_R
+#define gmtime_r(t,r) gmtime(t)
+#define localtime_r(t,r) localtime(t)
+#endif
+
+#ifndef USE_SYSTEM_TIMEGM
+#define timegm my_timgm
+
+static unsigned int
+is_leapyear(unsigned int y)
+{
+  return (y % 4) == 0 && ((y % 100) != 0 || (y % 400) == 0);
+}
+
+static time_t
+timegm(struct tm *tm)
+{
+  static const unsigned int ndays[2][12] = {
+    {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
+    {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
+  };
+  time_t r = 0;
+  int i;
+  unsigned int *nday = (unsigned int*) ndays[is_leapyear(tm->tm_year+1900)];
+
+  for (i = 70; i < tm->tm_year; ++i)
+    r += is_leapyear(i+1900) ? 366*24*60*60 : 365*24*60*60;
+  for (i = 0; i < tm->tm_mon; ++i)
+    r += nday[i] * 24 * 60 * 60;
+  r += (tm->tm_mday - 1) * 24 * 60 * 60;
+  r += tm->tm_hour * 60 * 60;
+  r += tm->tm_min * 60;
+  r += tm->tm_sec;
+  return r;
+}
+#endif
+
+/* Since we are limited to using ISO C99, this implementation is based
+* on time_t. That means the resolution of time is only precise to the
+* second level. Also, there are only 2 timezones, namely UTC and LOCAL.
+*/
+
+enum mrb_timezone {
+  MRB_TIMEZONE_NONE   = 0,
+  MRB_TIMEZONE_UTC    = 1,
+  MRB_TIMEZONE_LOCAL  = 2,
+  MRB_TIMEZONE_LAST   = 3
+};
+
+typedef struct mrb_timezone_name {
+  const char name[8];
+  size_t len;
+} mrb_timezone_name;
+
+static const mrb_timezone_name timezone_names[] = {
+  { "none", sizeof("none") - 1 },
+  { "UTC", sizeof("UTC") - 1 },
+  { "LOCAL", sizeof("LOCAL") - 1 },
+};
+
+static const char mon_names[12][4] = {
+  "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
+};
+
+static const char wday_names[7][4] = {
+  "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
+};
+
+struct mrb_time {
+  time_t              sec;
+  time_t              usec;
+  enum mrb_timezone   timezone;
+  struct tm           datetime;
+};
+
+static const struct mrb_data_type mrb_time_type = { "Time", mrb_free };
+
+/** Updates the datetime of a mrb_time based on it's timezone and
+seconds setting. Returns self on success, NULL of failure. */
+static struct mrb_time*
+mrb_time_update_datetime(struct mrb_time *self)
+{
+  struct tm *aid;
+
+  if (self->timezone == MRB_TIMEZONE_UTC) {
+    aid = gmtime_r(&self->sec, &self->datetime);
+  }
+  else {
+    aid = localtime_r(&self->sec, &self->datetime);
+  }
+  if (!aid) return NULL;
+#ifdef NO_GMTIME_R
+  self->datetime = *aid; /* copy data */
+#endif
+
+  return self;
+}
+
+static mrb_value
+mrb_time_wrap(mrb_state *mrb, struct RClass *tc, struct mrb_time *tm)
+{
+  return mrb_obj_value(Data_Wrap_Struct(mrb, tc, &mrb_time_type, tm));
+}
+
+
+/* Allocates a mrb_time object and initializes it. */
+static struct mrb_time*
+time_alloc(mrb_state *mrb, double sec, double usec, enum mrb_timezone timezone)
+{
+  struct mrb_time *tm;
+
+  tm = (struct mrb_time *)mrb_malloc(mrb, sizeof(struct mrb_time));
+  if (sizeof(time_t) == 4 && (sec > (double)INT32_MAX || (double)INT32_MIN > sec)) {
+    goto out_of_range;
+  }
+  if (sizeof(time_t) == 8 && (sec > (double)INT64_MAX || (double)INT64_MIN > sec)) {
+    goto out_of_range;
+  }
+  tm->sec  = (time_t)sec;
+  if ((sec > 0 && tm->sec < 0) || (sec < 0 && (double)tm->sec > sec)) {
+  out_of_range:
+    mrb_raisef(mrb, E_ARGUMENT_ERROR, "%S out of Time range", mrb_float_value(mrb, sec));
+  }
+  tm->usec = (time_t)llround((sec - tm->sec) * 1.0e6 + usec);
+  while (tm->usec < 0) {
+    tm->sec--;
+    tm->usec += 1000000;
+  }
+  while (tm->usec >= 1000000) {
+    tm->sec++;
+    tm->usec -= 1000000;
+  }
+  tm->timezone = timezone;
+  mrb_time_update_datetime(tm);
+
+  return tm;
+}
+
+static mrb_value
+mrb_time_make(mrb_state *mrb, struct RClass *c, double sec, double usec, enum mrb_timezone timezone)
+{
+  return mrb_time_wrap(mrb, c, time_alloc(mrb, sec, usec, timezone));
+}
+
+static struct mrb_time*
+current_mrb_time(mrb_state *mrb)
+{
+  struct mrb_time *tm;
+
+  tm = (struct mrb_time *)mrb_malloc(mrb, sizeof(*tm));
+#if defined(TIME_UTC)
+  {
+    struct timespec ts;
+    if (timespec_get(&ts, TIME_UTC) == 0) {
+      mrb_free(mrb, tm);
+      mrb_raise(mrb, E_RUNTIME_ERROR, "timespec_get() failed for unknown reasons");
+    }
+    tm->sec = ts.tv_sec;
+    tm->usec = ts.tv_nsec / 1000;
+  }
+#elif defined(NO_GETTIMEOFDAY)
+  {
+    static time_t last_sec = 0, last_usec = 0;
+
+    tm->sec  = time(NULL);
+    if (tm->sec != last_sec) {
+      last_sec = tm->sec;
+      last_usec = 0;
+    }
+    else {
+      /* add 1 usec to differentiate two times */
+      last_usec += 1;
+    }
+    tm->usec = last_usec;
+  }
+#else
+  {
+    struct timeval tv;
+
+    gettimeofday(&tv, NULL);
+    tm->sec = tv.tv_sec;
+    tm->usec = tv.tv_usec;
+  }
+#endif
+  tm->timezone = MRB_TIMEZONE_LOCAL;
+  mrb_time_update_datetime(tm);
+
+  return tm;
+}
+
+/* Allocates a new Time object with given millis value. */
+static mrb_value
+mrb_time_now(mrb_state *mrb, mrb_value self)
+{
+  return mrb_time_wrap(mrb, mrb_class_ptr(self), current_mrb_time(mrb));
+}
+
+/* 15.2.19.6.1 */
+/* Creates an instance of time at the given time in seconds, etc. */
+static mrb_value
+mrb_time_at(mrb_state *mrb, mrb_value self)
+{
+  mrb_float f, f2 = 0;
+
+  mrb_get_args(mrb, "f|f", &f, &f2);
+  return mrb_time_make(mrb, mrb_class_ptr(self), f, f2, MRB_TIMEZONE_LOCAL);
+}
+
+static struct mrb_time*
+time_mktime(mrb_state *mrb, mrb_int ayear, mrb_int amonth, mrb_int aday,
+  mrb_int ahour, mrb_int amin, mrb_int asec, mrb_int ausec,
+  enum mrb_timezone timezone)
+{
+  time_t nowsecs;
+  struct tm nowtime = { 0 };
+
+  nowtime.tm_year  = (int)ayear  - 1900;
+  nowtime.tm_mon   = (int)amonth - 1;
+  nowtime.tm_mday  = (int)aday;
+  nowtime.tm_hour  = (int)ahour;
+  nowtime.tm_min   = (int)amin;
+  nowtime.tm_sec   = (int)asec;
+  nowtime.tm_isdst = -1;
+  if (timezone == MRB_TIMEZONE_UTC) {
+    nowsecs = timegm(&nowtime);
+  }
+  else {
+    nowsecs = mktime(&nowtime);
+  }
+  if (nowsecs == (time_t)-1) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "Not a valid time.");
+  }
+
+  return time_alloc(mrb, (double)nowsecs, ausec, timezone);
+}
+
+/* 15.2.19.6.2 */
+/* Creates an instance of time at the given time in UTC. */
+static mrb_value
+mrb_time_gm(mrb_state *mrb, mrb_value self)
+{
+  mrb_int ayear = 0, amonth = 1, aday = 1, ahour = 0, amin = 0, asec = 0, ausec = 0;
+
+  mrb_get_args(mrb, "i|iiiiii",
+                &ayear, &amonth, &aday, &ahour, &amin, &asec, &ausec);
+  return mrb_time_wrap(mrb, mrb_class_ptr(self),
+          time_mktime(mrb, ayear, amonth, aday, ahour, amin, asec, ausec, MRB_TIMEZONE_UTC));
+}
+
+
+/* 15.2.19.6.3 */
+/* Creates an instance of time at the given time in local time zone. */
+static mrb_value
+mrb_time_local(mrb_state *mrb, mrb_value self)
+{
+  mrb_int ayear = 0, amonth = 1, aday = 1, ahour = 0, amin = 0, asec = 0, ausec = 0;
+
+  mrb_get_args(mrb, "i|iiiiii",
+                &ayear, &amonth, &aday, &ahour, &amin, &asec, &ausec);
+  return mrb_time_wrap(mrb, mrb_class_ptr(self),
+          time_mktime(mrb, ayear, amonth, aday, ahour, amin, asec, ausec, MRB_TIMEZONE_LOCAL));
+}
+
+
+static mrb_value
+mrb_time_eq(mrb_state *mrb, mrb_value self)
+{
+  mrb_value other;
+  struct mrb_time *tm1, *tm2;
+  mrb_bool eq_p;
+
+  mrb_get_args(mrb, "o", &other);
+  tm1 = DATA_CHECK_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  tm2 = DATA_CHECK_GET_PTR(mrb, other, &mrb_time_type, struct mrb_time);
+  eq_p = tm1 && tm2 && tm1->sec == tm2->sec && tm1->usec == tm2->usec;
+
+  return mrb_bool_value(eq_p);
+}
+
+static mrb_value
+mrb_time_cmp(mrb_state *mrb, mrb_value self)
+{
+  mrb_value other;
+  struct mrb_time *tm1, *tm2;
+
+  mrb_get_args(mrb, "o", &other);
+  tm1 = DATA_CHECK_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  tm2 = DATA_CHECK_GET_PTR(mrb, other, &mrb_time_type, struct mrb_time);
+  if (!tm1 || !tm2) return mrb_nil_value();
+  if (tm1->sec > tm2->sec) {
+    return mrb_fixnum_value(1);
+  }
+  else if (tm1->sec < tm2->sec) {
+    return mrb_fixnum_value(-1);
+  }
+  /* tm1->sec == tm2->sec */
+  if (tm1->usec > tm2->usec) {
+    return mrb_fixnum_value(1);
+  }
+  else if (tm1->usec < tm2->usec) {
+    return mrb_fixnum_value(-1);
+  }
+  return mrb_fixnum_value(0);
+}
+
+static mrb_value
+mrb_time_plus(mrb_state *mrb, mrb_value self)
+{
+  mrb_float f;
+  struct mrb_time *tm;
+
+  mrb_get_args(mrb, "f", &f);
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  return mrb_time_make(mrb, mrb_obj_class(mrb, self), (double)tm->sec+f, (double)tm->usec, tm->timezone);
+}
+
+static mrb_value
+mrb_time_minus(mrb_state *mrb, mrb_value self)
+{
+  mrb_float f;
+  mrb_value other;
+  struct mrb_time *tm, *tm2;
+
+  mrb_get_args(mrb, "o", &other);
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+
+  tm2 = DATA_CHECK_GET_PTR(mrb, other, &mrb_time_type, struct mrb_time);
+  if (tm2) {
+    f = (mrb_float)(tm->sec - tm2->sec)
+      + (mrb_float)(tm->usec - tm2->usec) / 1.0e6;
+    return mrb_float_value(mrb, f);
+  }
+  else {
+    mrb_get_args(mrb, "f", &f);
+    return mrb_time_make(mrb, mrb_obj_class(mrb, self), (double)tm->sec-f, (double)tm->usec, tm->timezone);
+  }
+}
+
+/* 15.2.19.7.30 */
+/* Returns week day number of time. */
+static mrb_value
+mrb_time_wday(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  return mrb_fixnum_value(tm->datetime.tm_wday);
+}
+
+/* 15.2.19.7.31 */
+/* Returns year day number of time. */
+static mrb_value
+mrb_time_yday(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  return mrb_fixnum_value(tm->datetime.tm_yday + 1);
+}
+
+/* 15.2.19.7.32 */
+/* Returns year of time. */
+static mrb_value
+mrb_time_year(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  return mrb_fixnum_value(tm->datetime.tm_year + 1900);
+}
+
+/* 15.2.19.7.33 */
+/* Returns name of time's timezone. */
+static mrb_value
+mrb_time_zone(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  if (tm->timezone <= MRB_TIMEZONE_NONE) return mrb_nil_value();
+  if (tm->timezone >= MRB_TIMEZONE_LAST) return mrb_nil_value();
+  return mrb_str_new_static(mrb,
+                            timezone_names[tm->timezone].name,
+                            timezone_names[tm->timezone].len);
+}
+
+/* 15.2.19.7.4 */
+/* Returns a string that describes the time. */
+static mrb_value
+mrb_time_asctime(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm;
+  struct tm *d;
+  char buf[256];
+  int len;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  d = &tm->datetime;
+  len = snprintf(buf, sizeof(buf), "%s %s %02d %02d:%02d:%02d %s%d",
+    wday_names[d->tm_wday], mon_names[d->tm_mon], d->tm_mday,
+    d->tm_hour, d->tm_min, d->tm_sec,
+    tm->timezone == MRB_TIMEZONE_UTC ? "UTC " : "",
+    d->tm_year + 1900);
+  return mrb_str_new(mrb, buf, len);
+}
+
+/* 15.2.19.7.6 */
+/* Returns the day in the month of the time. */
+static mrb_value
+mrb_time_day(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  if (!tm) return mrb_nil_value();
+  return mrb_fixnum_value(tm->datetime.tm_mday);
+}
+
+
+/* 15.2.19.7.7 */
+/* Returns true if daylight saving was applied for this time. */
+static mrb_value
+mrb_time_dst_p(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  return mrb_bool_value(tm->datetime.tm_isdst);
+}
+
+/* 15.2.19.7.8 */
+/* 15.2.19.7.10 */
+/* Returns the Time object of the UTC(GMT) timezone. */
+static mrb_value
+mrb_time_getutc(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm, *tm2;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  tm2 = (struct mrb_time *)mrb_malloc(mrb, sizeof(*tm));
+  *tm2 = *tm;
+  tm2->timezone = MRB_TIMEZONE_UTC;
+  mrb_time_update_datetime(tm2);
+  return mrb_time_wrap(mrb, mrb_obj_class(mrb, self), tm2);
+}
+
+/* 15.2.19.7.9 */
+/* Returns the Time object of the LOCAL timezone. */
+static mrb_value
+mrb_time_getlocal(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm, *tm2;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  tm2 = (struct mrb_time *)mrb_malloc(mrb, sizeof(*tm));
+  *tm2 = *tm;
+  tm2->timezone = MRB_TIMEZONE_LOCAL;
+  mrb_time_update_datetime(tm2);
+  return mrb_time_wrap(mrb, mrb_obj_class(mrb, self), tm2);
+}
+
+/* 15.2.19.7.15 */
+/* Returns hour of time. */
+static mrb_value
+mrb_time_hour(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  return mrb_fixnum_value(tm->datetime.tm_hour);
+}
+
+/* 15.2.19.7.16 */
+/* Initializes a time by setting the amount of milliseconds since the epoch.*/
+static mrb_value
+mrb_time_initialize(mrb_state *mrb, mrb_value self)
+{
+  mrb_int ayear = 0, amonth = 1, aday = 1, ahour = 0,
+  amin = 0, asec = 0, ausec = 0;
+  int n;
+  struct mrb_time *tm;
+
+  tm = (struct mrb_time*)DATA_PTR(self);
+  if (tm) {
+    mrb_free(mrb, tm);
+  }
+  mrb_data_init(self, NULL, &mrb_time_type);
+
+  n = mrb_get_args(mrb, "|iiiiiii",
+       &ayear, &amonth, &aday, &ahour, &amin, &asec, &ausec);
+  if (n == 0) {
+    tm = current_mrb_time(mrb);
+  }
+  else {
+    tm = time_mktime(mrb, ayear, amonth, aday, ahour, amin, asec, ausec, MRB_TIMEZONE_LOCAL);
+  }
+  mrb_data_init(self, tm, &mrb_time_type);
+  return self;
+}
+
+/* 15.2.19.7.17(x) */
+/* Initializes a copy of this time object. */
+static mrb_value
+mrb_time_initialize_copy(mrb_state *mrb, mrb_value copy)
+{
+  mrb_value src;
+
+  mrb_get_args(mrb, "o", &src);
+  if (mrb_obj_equal(mrb, copy, src)) return copy;
+  if (!mrb_obj_is_instance_of(mrb, src, mrb_obj_class(mrb, copy))) {
+    mrb_raise(mrb, E_TYPE_ERROR, "wrong argument class");
+  }
+  if (!DATA_PTR(copy)) {
+    mrb_data_init(copy, mrb_malloc(mrb, sizeof(struct mrb_time)), &mrb_time_type);
+  }
+  *(struct mrb_time *)DATA_PTR(copy) = *(struct mrb_time *)DATA_PTR(src);
+  return copy;
+}
+
+/* 15.2.19.7.18 */
+/* Sets the timezone attribute of the Time object to LOCAL. */
+static mrb_value
+mrb_time_localtime(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  tm->timezone = MRB_TIMEZONE_LOCAL;
+  mrb_time_update_datetime(tm);
+  return self;
+}
+
+/* 15.2.19.7.19 */
+/* Returns day of month of time. */
+static mrb_value
+mrb_time_mday(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  return mrb_fixnum_value(tm->datetime.tm_mday);
+}
+
+/* 15.2.19.7.20 */
+/* Returns minutes of time. */
+static mrb_value
+mrb_time_min(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  return mrb_fixnum_value(tm->datetime.tm_min);
+}
+
+/* 15.2.19.7.21 and 15.2.19.7.22 */
+/* Returns month of time. */
+static mrb_value
+mrb_time_mon(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  return mrb_fixnum_value(tm->datetime.tm_mon + 1);
+}
+
+/* 15.2.19.7.23 */
+/* Returns seconds in minute of time. */
+static mrb_value
+mrb_time_sec(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  return mrb_fixnum_value(tm->datetime.tm_sec);
+}
+
+
+/* 15.2.19.7.24 */
+/* Returns a Float with the time since the epoch in seconds. */
+static mrb_value
+mrb_time_to_f(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  return mrb_float_value(mrb, (mrb_float)tm->sec + (mrb_float)tm->usec/1.0e6);
+}
+
+/* 15.2.19.7.25 */
+/* Returns a Fixnum with the time since the epoch in seconds. */
+static mrb_value
+mrb_time_to_i(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  if (tm->sec > MRB_INT_MAX || tm->sec < MRB_INT_MIN) {
+    return mrb_float_value(mrb, (mrb_float)tm->sec);
+  }
+  return mrb_fixnum_value((mrb_int)tm->sec);
+}
+
+/* 15.2.19.7.26 */
+/* Returns a Float with the time since the epoch in microseconds. */
+static mrb_value
+mrb_time_usec(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  if (tm->usec > MRB_INT_MAX || tm->usec < MRB_INT_MIN) {
+    return mrb_float_value(mrb, (mrb_float)tm->usec);
+  }
+  return mrb_fixnum_value((mrb_int)tm->usec);
+}
+
+/* 15.2.19.7.27 */
+/* Sets the timezone attribute of the Time object to UTC. */
+static mrb_value
+mrb_time_utc(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  tm->timezone = MRB_TIMEZONE_UTC;
+  mrb_time_update_datetime(tm);
+  return self;
+}
+
+/* 15.2.19.7.28 */
+/* Returns true if this time is in the UTC timezone false if not. */
+static mrb_value
+mrb_time_utc_p(mrb_state *mrb, mrb_value self)
+{
+  struct mrb_time *tm;
+
+  tm = DATA_GET_PTR(mrb, self, &mrb_time_type, struct mrb_time);
+  return mrb_bool_value(tm->timezone == MRB_TIMEZONE_UTC);
+}
+
+
+void
+mrb_mruby_time_gem_init(mrb_state* mrb)
+{
+  struct RClass *tc;
+  /* ISO 15.2.19.2 */
+  tc = mrb_define_class(mrb, "Time", mrb->object_class);
+  MRB_SET_INSTANCE_TT(tc, MRB_TT_DATA);
+  mrb_include_module(mrb, tc, mrb_module_get(mrb, "Comparable"));
+  mrb_define_class_method(mrb, tc, "at", mrb_time_at, MRB_ARGS_ARG(1, 1));      /* 15.2.19.6.1 */
+  mrb_define_class_method(mrb, tc, "gm", mrb_time_gm, MRB_ARGS_ARG(1,6));       /* 15.2.19.6.2 */
+  mrb_define_class_method(mrb, tc, "local", mrb_time_local, MRB_ARGS_ARG(1,6)); /* 15.2.19.6.3 */
+  mrb_define_class_method(mrb, tc, "mktime", mrb_time_local, MRB_ARGS_ARG(1,6));/* 15.2.19.6.4 */
+  mrb_define_class_method(mrb, tc, "now", mrb_time_now, MRB_ARGS_NONE());       /* 15.2.19.6.5 */
+  mrb_define_class_method(mrb, tc, "utc", mrb_time_gm, MRB_ARGS_ARG(1,6));      /* 15.2.19.6.6 */
+
+  mrb_define_method(mrb, tc, "=="     , mrb_time_eq     , MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, tc, "<=>"    , mrb_time_cmp    , MRB_ARGS_REQ(1)); /* 15.2.19.7.1 */
+  mrb_define_method(mrb, tc, "+"      , mrb_time_plus   , MRB_ARGS_REQ(1)); /* 15.2.19.7.2 */
+  mrb_define_method(mrb, tc, "-"      , mrb_time_minus  , MRB_ARGS_REQ(1)); /* 15.2.19.7.3 */
+  mrb_define_method(mrb, tc, "to_s"   , mrb_time_asctime, MRB_ARGS_NONE());
+  mrb_define_method(mrb, tc, "inspect", mrb_time_asctime, MRB_ARGS_NONE());
+  mrb_define_method(mrb, tc, "asctime", mrb_time_asctime, MRB_ARGS_NONE()); /* 15.2.19.7.4 */
+  mrb_define_method(mrb, tc, "ctime"  , mrb_time_asctime, MRB_ARGS_NONE()); /* 15.2.19.7.5 */
+  mrb_define_method(mrb, tc, "day"    , mrb_time_day    , MRB_ARGS_NONE()); /* 15.2.19.7.6 */
+  mrb_define_method(mrb, tc, "dst?"   , mrb_time_dst_p  , MRB_ARGS_NONE()); /* 15.2.19.7.7 */
+  mrb_define_method(mrb, tc, "getgm"  , mrb_time_getutc , MRB_ARGS_NONE()); /* 15.2.19.7.8 */
+  mrb_define_method(mrb, tc, "getlocal",mrb_time_getlocal,MRB_ARGS_NONE()); /* 15.2.19.7.9 */
+  mrb_define_method(mrb, tc, "getutc" , mrb_time_getutc , MRB_ARGS_NONE()); /* 15.2.19.7.10 */
+  mrb_define_method(mrb, tc, "gmt?"   , mrb_time_utc_p  , MRB_ARGS_NONE()); /* 15.2.19.7.11 */
+  mrb_define_method(mrb, tc, "gmtime" , mrb_time_utc    , MRB_ARGS_NONE()); /* 15.2.19.7.13 */
+  mrb_define_method(mrb, tc, "hour"   , mrb_time_hour, MRB_ARGS_NONE());    /* 15.2.19.7.15 */
+  mrb_define_method(mrb, tc, "localtime", mrb_time_localtime, MRB_ARGS_NONE()); /* 15.2.19.7.18 */
+  mrb_define_method(mrb, tc, "mday"   , mrb_time_mday, MRB_ARGS_NONE());    /* 15.2.19.7.19 */
+  mrb_define_method(mrb, tc, "min"    , mrb_time_min, MRB_ARGS_NONE());     /* 15.2.19.7.20 */
+
+  mrb_define_method(mrb, tc, "mon"  , mrb_time_mon, MRB_ARGS_NONE());       /* 15.2.19.7.21 */
+  mrb_define_method(mrb, tc, "month", mrb_time_mon, MRB_ARGS_NONE());       /* 15.2.19.7.22 */
+
+  mrb_define_method(mrb, tc, "sec" , mrb_time_sec, MRB_ARGS_NONE());        /* 15.2.19.7.23 */
+  mrb_define_method(mrb, tc, "to_i", mrb_time_to_i, MRB_ARGS_NONE());       /* 15.2.19.7.25 */
+  mrb_define_method(mrb, tc, "to_f", mrb_time_to_f, MRB_ARGS_NONE());       /* 15.2.19.7.24 */
+  mrb_define_method(mrb, tc, "usec", mrb_time_usec, MRB_ARGS_NONE());       /* 15.2.19.7.26 */
+  mrb_define_method(mrb, tc, "utc" , mrb_time_utc, MRB_ARGS_NONE());        /* 15.2.19.7.27 */
+  mrb_define_method(mrb, tc, "utc?", mrb_time_utc_p,MRB_ARGS_NONE());       /* 15.2.19.7.28 */
+  mrb_define_method(mrb, tc, "wday", mrb_time_wday, MRB_ARGS_NONE());       /* 15.2.19.7.30 */
+  mrb_define_method(mrb, tc, "yday", mrb_time_yday, MRB_ARGS_NONE());       /* 15.2.19.7.31 */
+  mrb_define_method(mrb, tc, "year", mrb_time_year, MRB_ARGS_NONE());       /* 15.2.19.7.32 */
+  mrb_define_method(mrb, tc, "zone", mrb_time_zone, MRB_ARGS_NONE());       /* 15.2.19.7.33 */
+
+  mrb_define_method(mrb, tc, "initialize", mrb_time_initialize, MRB_ARGS_REQ(1)); /* 15.2.19.7.16 */
+  mrb_define_method(mrb, tc, "initialize_copy", mrb_time_initialize_copy, MRB_ARGS_REQ(1)); /* 15.2.19.7.17 */
+
+  /*
+    methods not available:
+      gmt_offset(15.2.19.7.12)
+      gmtoff(15.2.19.7.14)
+      utc_offset(15.2.19.7.29)
+  */
+}
+
+void
+mrb_mruby_time_gem_final(mrb_state* mrb)
+{
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-time/test/time.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-time/test/time.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-time/test/time.rb	(revision 270)
@@ -0,0 +1,213 @@
+##
+# Time ISO Test
+
+assert('Time.new', '15.2.3.3.3') do
+  Time.new.class == Time
+end
+
+assert('Time', '15.2.19') do
+  Time.class == Class
+end
+
+assert('Time.at', '15.2.19.6.1') do
+  Time.at(1300000000.0)
+end
+
+assert('Time.gm', '15.2.19.6.2') do
+  Time.gm(2012, 12, 23)
+end
+
+assert('Time.local', '15.2.19.6.3') do
+  Time.local(2012, 12, 23)
+end
+
+assert('Time.mktime', '15.2.19.6.4') do
+  Time.mktime(2012, 12, 23)
+end
+
+assert('Time.now', '15.2.19.6.5') do
+  Time.now.class == Time
+end
+
+assert('Time.utc', '15.2.19.6.6') do
+  Time.utc(2012, 12, 23)
+end
+
+assert('Time#+', '15.2.19.7.1') do
+  t1 = Time.at(1300000000.0)
+  t2 = t1.+(60)
+
+  t2.utc.asctime == "Sun Mar 13 07:07:40 UTC 2011"
+end
+
+assert('Time#-', '15.2.19.7.2') do
+  t1 = Time.at(1300000000.0)
+  t2 = t1.-(60)
+
+  t2.utc.asctime == "Sun Mar 13 07:05:40 UTC 2011"
+end
+
+assert('Time#<=>', '15.2.19.7.3') do
+  t1 = Time.at(1300000000.0)
+  t2 = Time.at(1400000000.0)
+  t3 = Time.at(1500000000.0)
+
+  t2.<=>(t1) == 1 and
+    t2.<=>(t2) == 0 and
+    t2.<=>(t3) == -1 and
+    t2.<=>(nil) == nil
+end
+
+assert('Time#asctime', '15.2.19.7.4') do
+  Time.at(1300000000.0).utc.asctime == "Sun Mar 13 07:06:40 UTC 2011"
+end
+
+assert('Time#ctime', '15.2.19.7.5') do
+  Time.at(1300000000.0).utc.ctime == "Sun Mar 13 07:06:40 UTC 2011"
+end
+
+assert('Time#day', '15.2.19.7.6') do
+  Time.gm(2012, 12, 23).day == 23
+end
+
+assert('Time#dst?', '15.2.19.7.7') do
+  not Time.gm(2012, 12, 23).utc.dst?
+end
+
+assert('Time#getgm', '15.2.19.7.8') do
+  Time.at(1300000000.0).getgm.asctime == "Sun Mar 13 07:06:40 UTC 2011"
+end
+
+assert('Time#getlocal', '15.2.19.7.9') do
+  t1 = Time.at(1300000000.0)
+  t2 = Time.at(1300000000.0)
+  t3 = t1.getlocal
+
+  t1 == t3 and t3 == t2.getlocal
+end
+
+assert('Time#getutc', '15.2.19.7.10') do
+  Time.at(1300000000.0).getutc.asctime == "Sun Mar 13 07:06:40 UTC 2011"
+end
+
+assert('Time#gmt?', '15.2.19.7.11') do
+  Time.at(1300000000.0).utc.gmt?
+end
+
+# ATM not implemented
+# assert('Time#gmt_offset', '15.2.19.7.12') do
+
+assert('Time#gmtime', '15.2.19.7.13') do
+  Time.at(1300000000.0).gmtime
+end
+
+# ATM not implemented
+# assert('Time#gmtoff', '15.2.19.7.14') do
+
+assert('Time#hour', '15.2.19.7.15') do
+  Time.gm(2012, 12, 23, 7, 6).hour == 7
+end
+
+# ATM doesn't really work
+# assert('Time#initialize', '15.2.19.7.16') do
+
+assert('Time#initialize_copy', '15.2.19.7.17') do
+  time_tmp_2 = Time.at(7.0e6)
+  time_tmp_2.clone == time_tmp_2
+end
+
+assert('Time#localtime', '15.2.19.7.18') do
+  t1 = Time.at(1300000000.0)
+  t2 = Time.at(1300000000.0)
+
+  t1.localtime
+  t1 == t2.getlocal
+end
+
+assert('Time#mday', '15.2.19.7.19') do
+  Time.gm(2012, 12, 23).mday == 23
+end
+
+assert('Time#min', '15.2.19.7.20') do
+  Time.gm(2012, 12, 23, 7, 6).min == 6
+end
+
+assert('Time#mon', '15.2.19.7.21') do
+  Time.gm(2012, 12, 23).mon == 12
+end
+
+assert('Time#month', '15.2.19.7.22') do
+  Time.gm(2012, 12, 23).month == 12
+end
+
+assert('Times#sec', '15.2.19.7.23') do
+  Time.gm(2012, 12, 23, 7, 6, 40).sec == 40
+end
+
+assert('Time#to_f', '15.2.19.7.24') do
+  Time.at(1300000000.0).to_f == 1300000000.0
+end
+
+assert('Time#to_i', '15.2.19.7.25') do
+  Time.at(1300000000.0).to_i == 1300000000
+end
+
+assert('Time#usec', '15.2.19.7.26') do
+  Time.at(1300000000.0).usec == 0
+end
+
+assert('Time#utc', '15.2.19.7.27') do
+  Time.at(1300000000.0).utc
+end
+
+assert('Time#utc?', '15.2.19.7.28') do
+  Time.at(1300000000.0).utc.utc?
+end
+
+# ATM not implemented
+# assert('Time#utc_offset', '15.2.19.7.29') do
+
+assert('Time#wday', '15.2.19.7.30') do
+  Time.gm(2012, 12, 23).wday == 0
+end
+
+assert('Time#yday', '15.2.19.7.31') do
+  Time.gm(2012, 12, 23).yday == 358
+end
+
+assert('Time#year', '15.2.19.7.32') do
+  Time.gm(2012, 12, 23).year == 2012
+end
+
+assert('Time#zone', '15.2.19.7.33') do
+  Time.at(1300000000.0).utc.zone == 'UTC'
+end
+
+# Not ISO specified
+
+assert('Time#to_s') do
+  Time.at(1300000000.0).utc.to_s == "Sun Mar 13 07:06:40 UTC 2011"
+end
+
+assert('Time#inspect') do
+  Time.at(1300000000.0).utc.inspect == "Sun Mar 13 07:06:40 UTC 2011"
+end
+
+assert('day of week methods') do
+  t = Time.gm(2012, 12, 24)
+  assert_false t.sunday?
+  assert_true t.monday?
+  assert_false t.tuesday?
+  assert_false t.wednesday?
+  assert_false t.thursday?
+  assert_false t.friday?
+  assert_false t.saturday?
+end
+
+assert('2000 times 500us make a second') do
+  t = Time.utc 2015
+  2000.times do
+    t += 0.0005
+  end
+  t.usec == 0
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-toplevel-ext/mrbgem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-toplevel-ext/mrbgem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-toplevel-ext/mrbgem.rake	(revision 270)
@@ -0,0 +1,5 @@
+MRuby::Gem::Specification.new('mruby-toplevel-ext') do |spec|
+  spec.license = 'MIT'
+  spec.author  = 'mruby developers'
+  spec.summary = 'toplevel object (main) methods extension'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-toplevel-ext/mrblib/toplevel.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-toplevel-ext/mrblib/toplevel.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-toplevel-ext/mrblib/toplevel.rb	(revision 270)
@@ -0,0 +1,11 @@
+
+def self.include (*modules)
+  self.class.include(*modules)
+end
+
+def self.private(*methods)
+end
+def self.protected(*methods)
+end
+def self.public(*methods)
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-toplevel-ext/test/toplevel.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-toplevel-ext/test/toplevel.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrbgems/mruby-toplevel-ext/test/toplevel.rb	(revision 270)
@@ -0,0 +1,24 @@
+##
+# Toplevel Self(Ext) Test
+
+assert('Toplevel#include') do
+  module ToplevelTestModule1
+    def method_foo
+      :foo
+    end
+
+    CONST_BAR = :bar
+  end
+
+  module ToplevelTestModule2
+    CONST_BAR = :bar2
+  end
+
+  self.include ToplevelTestModule2, ToplevelTestModule1
+
+  assert_true self.class.included_modules.include?( ToplevelTestModule1 )
+  assert_true self.class.included_modules.include?( ToplevelTestModule2 )
+  assert_equal :foo, method_foo
+  assert_equal :bar2, CONST_BAR
+end
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrblib/array.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrblib/array.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrblib/array.rb	(revision 270)
@@ -0,0 +1,206 @@
+##
+# Array
+#
+# ISO 15.2.12
+class Array
+
+  ##
+  # Calls the given block for each element of +self+
+  # and pass the respective element.
+  #
+  # ISO 15.2.12.5.10
+  def each(&block)
+    return to_enum :each unless block_given?
+
+    idx, length = -1, self.length-1
+    while idx < length and length <= self.length and length = self.length-1
+      elm = self[idx += 1]
+      unless elm
+        if elm.nil? and length >= self.length
+          break
+        end
+      end
+      block.call(elm)
+    end
+    self
+  end
+
+  ##
+  # Calls the given block for each element of +self+
+  # and pass the index of the respective element.
+  #
+  # ISO 15.2.12.5.11
+  def each_index(&block)
+    return to_enum :each_index unless block_given?
+
+    idx = 0
+    while idx < length
+      block.call(idx)
+      idx += 1
+    end
+    self
+  end
+
+  ##
+  # Calls the given block for each element of +self+
+  # and pass the respective element. Each element will
+  # be replaced by the resulting values.
+  #
+  # ISO 15.2.12.5.7
+  def collect!(&block)
+    return to_enum :collect! unless block_given?
+
+    self.each_index { |idx| self[idx] = block.call(self[idx]) }
+    self
+  end
+
+  ##
+  # Alias for collect!
+  #
+  # ISO 15.2.12.5.20
+  alias map! collect!
+
+  ##
+  # Private method for Array creation.
+  #
+  # ISO 15.2.12.5.15
+  def initialize(size=0, obj=nil, &block)
+    raise TypeError, "expected Integer for 1st argument" unless size.kind_of? Integer
+    raise ArgumentError, "negative array size" if size < 0
+
+    self.clear
+    if size > 0
+      self[size - 1] = nil # allocate
+
+      idx = 0
+      while idx < size
+        self[idx] = (block)? block.call(idx): obj
+        idx += 1
+      end
+    end
+
+    self
+  end
+
+  def _inspect
+    return "[]" if self.size == 0
+    "["+self.map{|x|x.inspect}.join(", ")+"]"
+  end
+  ##
+  # Return the contents of this array as a string.
+  #
+  # ISO 15.2.12.5.31 (x)
+  def inspect
+    begin
+      self._inspect
+    rescue SystemStackError
+      "[...]"
+    end
+  end
+  # ISO 15.2.12.5.32 (x)
+  alias to_s inspect
+
+  ##
+  #  Equality---Two arrays are equal if they contain the same number
+  #  of elements and if each element is equal to (according to
+  #  Object.==) the corresponding element in the other array.
+  #
+  # ISO 15.2.12.5.33 (x)
+  def ==(other)
+    other = self.__ary_eq(other)
+    return false if other == false
+    return true  if other == true
+    len = self.size
+    i = 0
+    while i < len
+      return false if self[i] != other[i]
+      i += 1
+    end
+    return true
+  end
+
+  ##
+  #  Returns <code>true</code> if +self+ and _other_ are the same object,
+  #  or are both arrays with the same content.
+  #
+  # ISO 15.2.12.5.34 (x)
+  def eql?(other)
+    other = self.__ary_eq(other)
+    return false if other == false
+    return true  if other == true
+    len = self.size
+    i = 0
+    while i < len
+      return false unless self[i].eql?(other[i])
+      i += 1
+    end
+    return true
+  end
+
+  ##
+  #  Comparison---Returns an integer (-1, 0, or +1)
+  #  if this array is less than, equal to, or greater than <i>other_ary</i>.
+  #  Each object in each array is compared (using <=>). If any value isn't
+  #  equal, then that inequality is the return value. If all the
+  #  values found are equal, then the return is based on a
+  #  comparison of the array lengths.  Thus, two arrays are
+  #  "equal" according to <code>Array#<=></code> if and only if they have
+  #  the same length and the value of each element is equal to the
+  #  value of the corresponding element in the other array.
+  #
+  # ISO 15.2.12.5.36 (x)
+  def <=>(other)
+    other = self.__ary_cmp(other)
+    return 0 if 0 == other
+    return nil if nil == other
+
+    len = self.size
+    n = other.size
+    len = n if len > n
+    i = 0
+    while i < len
+      n = (self[i] <=> other[i])
+      return n if n.nil? || n != 0
+      i += 1
+    end
+    len = self.size - other.size
+    if len == 0
+      0
+    elsif len > 0
+      1
+    else
+      -1
+    end
+  end
+
+  ##
+  # Delete element with index +key+
+  def delete(key, &block)
+    while i = self.index(key)
+      self.delete_at(i)
+      ret = key
+    end
+    return block.call if ret.nil? && block
+    ret
+  end
+
+  # internal method to convert multi-value to single value
+  def __svalue
+    return self.first if self.size < 2
+    self
+  end
+end
+
+##
+# Array is enumerable
+class Array
+  # ISO 15.2.12.3
+  include Enumerable
+
+  ##
+  # Sort all elements and replace +self+ with these
+  # elements.
+  def sort!(&block)
+    self.replace(self.sort(&block))
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrblib/class.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrblib/class.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrblib/class.rb	(revision 270)
@@ -0,0 +1,11 @@
+class Module
+   # 15.2.2.4.12
+  def attr_accessor(*names)
+    attr_reader(*names)
+    attr_writer(*names)
+  end
+  # 15.2.2.4.11
+  def attr(name)
+    attr_reader(name)
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrblib/compar.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrblib/compar.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrblib/compar.rb	(revision 270)
@@ -0,0 +1,84 @@
+##
+# Comparable
+#
+# ISO 15.3.3
+module Comparable
+
+  ##
+  # Return true if +self+ is less
+  # than +other+. Otherwise return
+  # false.
+  #
+  # ISO 15.3.3.2.1
+  def < other
+    cmp = self <=> other
+    if cmp.nil?
+      raise ArgumentError, "comparison of #{self.class} with #{other.class} failed"
+    end
+    cmp < 0
+  end
+
+  ##
+  # Return true if +self+ is less
+  # than or equal to +other+.
+  # Otherwise return false.
+  #
+  # ISO 15.3.3.2.2
+  def <= other
+    cmp = self <=> other
+    if cmp.nil?
+      raise ArgumentError, "comparison of #{self.class} with #{other.class} failed"
+    end
+    cmp <= 0
+  end
+
+  ##
+  # Return true if +self+ is equal
+  # to +other+. Otherwise return
+  # false.
+  #
+  # ISO 15.3.3.2.3
+  def == other
+    cmp = self <=> other
+    cmp == 0
+  end
+
+  ##
+  # Return true if +self+ is greater
+  # than +other+. Otherwise return
+  # false.
+  #
+  # ISO 15.3.3.2.4
+  def > other
+    cmp = self <=> other
+    if cmp.nil?
+      raise ArgumentError, "comparison of #{self.class} with #{other.class} failed"
+    end
+    cmp > 0
+  end
+
+  ##
+  # Return true if +self+ is greater
+  # than or equal to +other+.
+  # Otherwise return false.
+  #
+  # ISO 15.3.3.2.5
+  def >= other
+    cmp = self <=> other
+    if cmp.nil?
+      raise ArgumentError, "comparison of #{self.class} with #{other.class} failed"
+    end
+    cmp >= 0
+  end
+
+  ##
+  # Return true if +self+ is greater
+  # than or equal to +min+ and
+  # less than or equal to +max+.
+  # Otherwise return false.
+  #
+  # ISO 15.3.3.2.6
+  def between?(min, max)
+    self >= min and self <= max
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrblib/enum.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrblib/enum.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrblib/enum.rb	(revision 270)
@@ -0,0 +1,392 @@
+##
+# Enumerable
+#
+# The <code>Enumerable</code> mixin provides collection classes with
+# several traversal and searching methods, and with the ability to
+# sort. The class must provide a method `each`, which
+# yields successive members of the collection. If
+# {Enumerable#max}, {#min}, or
+# {#sort} is used, the objects in the collection must also
+# implement a meaningful `<=>` operator, as these methods
+# rely on an ordering between members of the collection.
+#
+# @ISO 15.3.2
+module Enumerable
+
+  ##
+  # Call the given block for each element
+  # which is yield by +each+. Return false
+  # if one block value is false. Otherwise
+  # return true. If no block is given and
+  # +self+ is false return false.
+  #
+  # ISO 15.3.2.2.1
+  def all?(&block)
+    if block
+      self.each{|*val| return false unless block.call(*val)}
+    else
+      self.each{|*val| return false unless val.__svalue}
+    end
+    true
+  end
+
+  ##
+  # Call the given block for each element
+  # which is yield by +each+. Return true
+  # if one block value is true. Otherwise
+  # return false. If no block is given and
+  # +self+ is true object return true.
+  #
+  # ISO 15.3.2.2.2
+  def any?(&block)
+    if block
+      self.each{|*val| return true if block.call(*val)}
+    else
+      self.each{|*val| return true if val.__svalue}
+    end
+    false
+  end
+
+  ##
+  # Call the given block for each element
+  # which is yield by +each+. Append all
+  # values of each block together and
+  # return this value.
+  #
+  # ISO 15.3.2.2.3
+  def collect(&block)
+    return to_enum :collect unless block
+
+    ary = []
+    self.each{|*val| ary.push(block.call(*val))}
+    ary
+  end
+
+  ##
+  # Call the given block for each element
+  # which is yield by +each+. Return
+  # +ifnone+ if no block value was true.
+  # Otherwise return the first block value
+  # which had was true.
+  #
+  # ISO 15.3.2.2.4
+  def detect(ifnone=nil, &block)
+    ret = ifnone
+    self.each{|*val|
+      if block.call(*val)
+        ret = val.__svalue
+        break
+      end
+    }
+    ret
+  end
+
+  ##
+  # Call the given block for each element
+  # which is yield by +each+. Pass an
+  # index to the block which starts at 0
+  # and increase by 1 for each element.
+  #
+  # ISO 15.3.2.2.5
+  def each_with_index(&block)
+    return to_enum :each_with_index unless block
+
+    i = 0
+    self.each{|*val|
+      block.call(val.__svalue, i)
+      i += 1
+    }
+    self
+  end
+
+  ##
+  # Return an array of all elements which
+  # are yield by +each+.
+  #
+  # ISO 15.3.2.2.6
+  def entries
+    ary = []
+    self.each{|*val|
+      # __svalue is an internal method
+      ary.push val.__svalue
+    }
+    ary
+  end
+
+  ##
+  # Alias for find
+  #
+  # ISO 15.3.2.2.7
+  alias find detect
+
+  ##
+  # Call the given block for each element
+  # which is yield by +each+. Return an array
+  # which contains all elements whose block
+  # value was true.
+  #
+  # ISO 15.3.2.2.8
+  def find_all(&block)
+    return to_enum :find_all unless block
+
+    ary = []
+    self.each{|*val|
+      ary.push(val.__svalue) if block.call(*val)
+    }
+    ary
+  end
+
+  ##
+  # Call the given block for each element
+  # which is yield by +each+ and which return
+  # value was true when invoking === with
+  # +pattern+. Return an array with all
+  # elements or the respective block values.
+  #
+  # ISO 15.3.2.2.9
+  def grep(pattern, &block)
+    ary = []
+    self.each{|*val|
+      sv = val.__svalue
+      if pattern === sv
+        ary.push((block)? block.call(*val): sv)
+      end
+    }
+    ary
+  end
+
+  ##
+  # Return true if at least one element which
+  # is yield by +each+ returns a true value
+  # by invoking == with +obj+. Otherwise return
+  # false.
+  #
+  # ISO 15.3.2.2.10
+  def include?(obj)
+    self.each{|*val|
+      return true if val.__svalue == obj
+    }
+    false
+  end
+
+  ##
+  # Call the given block for each element
+  # which is yield by +each+. Return value
+  # is the sum of all block values. Pass
+  # to each block the current sum and the
+  # current element.
+  #
+  # ISO 15.3.2.2.11
+  def inject(*args, &block)
+    raise ArgumentError, "too many arguments" if args.size > 2
+    if Symbol === args[-1]
+      sym = args[-1]
+      block = ->(x,y){x.__send__(sym,y)}
+      args.pop
+    end
+    if args.empty?
+      flag = true  # no initial argument
+      result = nil
+    else
+      flag = false
+      result = args[0]
+    end
+    self.each{|*val|
+      val = val.__svalue
+      if flag
+        # push first element as initial
+        flag = false
+        result = val
+      else
+        result = block.call(result, val)
+      end
+    }
+    result
+  end
+  alias reduce inject
+
+  ##
+  # Alias for collect
+  #
+  # ISO 15.3.2.2.12
+  alias map collect
+
+  ##
+  # Return the maximum value of all elements
+  # yield by +each+. If no block is given <=>
+  # will be invoked to define this value. If
+  # a block is given it will be used instead.
+  #
+  # ISO 15.3.2.2.13
+  def max(&block)
+    flag = true  # 1st element?
+    result = nil
+    self.each{|*val|
+      val = val.__svalue
+      if flag
+        # 1st element
+        result = val
+        flag = false
+      else
+        if block
+          result = val if block.call(val, result) > 0
+        else
+          result = val if (val <=> result) > 0
+        end
+      end
+    }
+    result
+  end
+
+  ##
+  # Return the minimum value of all elements
+  # yield by +each+. If no block is given <=>
+  # will be invoked to define this value. If
+  # a block is given it will be used instead.
+  #
+  # ISO 15.3.2.2.14
+  def min(&block)
+    flag = true  # 1st element?
+    result = nil
+    self.each{|*val|
+      val = val.__svalue
+      if flag
+        # 1st element
+        result = val
+        flag = false
+      else
+        if block
+          result = val if block.call(val, result) < 0
+        else
+          result = val if (val <=> result) < 0
+        end
+      end
+    }
+    result
+  end
+
+  ##
+  # Alias for include?
+  #
+  # ISO 15.3.2.2.15
+  alias member? include?
+
+  ##
+  # Call the given block for each element
+  # which is yield by +each+. Return an
+  # array which contains two arrays. The
+  # first array contains all elements
+  # whose block value was true. The second
+  # array contains all elements whose
+  # block value was false.
+  #
+  # ISO 15.3.2.2.16
+  def partition(&block)
+    ary_T = []
+    ary_F = []
+    self.each{|*val|
+      if block.call(*val)
+        ary_T.push(val.__svalue)
+      else
+        ary_F.push(val.__svalue)
+      end
+    }
+    [ary_T, ary_F]
+  end
+
+  ##
+  # Call the given block for each element
+  # which is yield by +each+. Return an
+  # array which contains only the elements
+  # whose block value was false.
+  #
+  # ISO 15.3.2.2.17
+  def reject(&block)
+    ary = []
+    self.each{|*val|
+      ary.push(val.__svalue) unless block.call(*val)
+    }
+    ary
+  end
+
+  ##
+  # Alias for find_all.
+  #
+  # ISO 15.3.2.2.18
+  alias select find_all
+
+  ##
+  # TODO
+  # Does this OK? Please test it.
+  def __sort_sub__(sorted, work, src_ary, head, tail, &block)
+    if head == tail
+      sorted[head] = work[head] if src_ary == 1
+      return
+    end
+
+    # on current step, which is a src ary?
+    if src_ary == 0
+      src, dst = sorted, work
+    else
+      src, dst = work, sorted
+    end
+
+    key = src[head]    # key value for dividing values
+    i, j = head, tail  # position to store on the dst ary
+
+    (head + 1).upto(tail){|idx|
+      if ((block)? block.call(src[idx], key): (src[idx] <=> key)) > 0
+        # larger than key
+        dst[j] = src[idx]
+        j -= 1
+      else
+        dst[i] = src[idx]
+        i += 1
+      end
+    }
+
+    sorted[i] = key
+
+    # sort each sub-array
+    src_ary = (src_ary + 1) % 2  # exchange a src ary
+    __sort_sub__(sorted, work, src_ary, head, i - 1, &block) if i > head
+    __sort_sub__(sorted, work, src_ary, i + 1, tail, &block) if i < tail
+  end
+#  private :__sort_sub__
+
+  ##
+  # Return a sorted array of all elements
+  # which are yield by +each+. If no block
+  # is given <=> will be invoked on each
+  # element to define the order. Otherwise
+  # the given block will be used for
+  # sorting.
+  #
+  # ISO 15.3.2.2.19
+  def sort(&block)
+    ary = []
+    self.each{|*val| ary.push(val.__svalue)}
+    if ary.size > 1
+      __sort_sub__(ary, ::Array.new(ary.size), 0, 0, ary.size - 1, &block)
+    end
+    ary
+  end
+
+  ##
+  # Alias for entries.
+  #
+  # ISO 15.3.2.2.20
+  alias to_a entries
+
+  # redefine #hash 15.3.1.3.15
+  def hash
+    h = 12347
+    i = 0
+    self.each do |e|
+      n = e.hash << (i % 16)
+      h ^= n
+      i += 1
+    end
+    h
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrblib/error.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrblib/error.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrblib/error.rb	(revision 270)
@@ -0,0 +1,56 @@
+# ISO 15.2.24
+class ArgumentError < StandardError
+end
+
+# ISO 15.2.25
+class LocalJumpError < StandardError
+end
+
+# ISO 15.2.26
+class RangeError < StandardError
+end
+
+class FloatDomainError < RangeError
+end
+
+# ISO 15.2.26
+class RegexpError < StandardError
+end
+
+# ISO 15.2.29
+class TypeError < StandardError
+end
+
+# ISO 15.2.31
+class NameError < StandardError
+  attr_accessor :name
+
+  def initialize(message=nil, name=nil)
+    @name = name
+    super(message)
+  end
+end
+
+# ISO 15.2.32
+class NoMethodError < NameError
+  attr_reader :args
+
+  def initialize(message=nil, name=nil, args=nil)
+    @args = args
+    super message, name
+  end
+end
+
+# ISO 15.2.33
+class IndexError < StandardError
+end
+
+class KeyError < IndexError
+end
+
+class NotImplementedError < ScriptError
+end
+
+class StopIteration < IndexError
+  attr_accessor :result
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrblib/hash.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrblib/hash.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrblib/hash.rb	(revision 270)
@@ -0,0 +1,357 @@
+##
+# Hash
+#
+# ISO 15.2.13
+class Hash
+  ##
+  #  Equality---Two hashes are equal if they each contain the same number
+  #  of keys and if each key-value pair is equal to (according to
+  #  <code>Object#==</code>) the corresponding elements in the other
+  #  hash.
+  #
+  # ISO 15.2.13.4.1
+  def ==(hash)
+    return true if self.equal?(hash)
+    begin
+      hash = hash.to_hash
+    rescue NoMethodError
+      return false
+    end
+    return false if self.size != hash.size
+    self.each do |k,v|
+      return false unless hash.key?(k)
+      return false unless self[k] == hash[k]
+    end
+    return true
+  end
+
+  ##
+  # Returns <code>true</code> if <i>hash</i> and <i>other</i> are
+  # both hashes with the same content compared by eql?.
+  #
+  # ISO 15.2.13.4.32 (x)
+  def eql?(hash)
+    return true if self.equal?(hash)
+    begin
+      hash = hash.to_hash
+    rescue NoMethodError
+      return false
+    end
+    return false if self.size != hash.size
+    self.each do |k,v|
+      return false unless hash.key?(k)
+      return false unless self[k].eql?(hash[k])
+    end
+    return true
+  end
+
+  ##
+  # Delete the element with the key +key+.
+  # Return the value of the element if +key+
+  # was found. Return nil if nothing was
+  # found. If a block is given, call the
+  # block with the value of the element.
+  #
+  # ISO 15.2.13.4.8
+  def delete(key, &block)
+    if block && !self.has_key?(key)
+      block.call(key)
+    else
+      self.__delete(key)
+    end
+  end
+
+  ##
+  # Calls the given block for each element of +self+
+  # and pass the key and value of each element.
+  #
+  # call-seq:
+  #   hsh.each      {| key, value | block } -> hsh
+  #   hsh.each_pair {| key, value | block } -> hsh
+  #   hsh.each                              -> an_enumerator
+  #   hsh.each_pair                         -> an_enumerator
+  #
+  #
+  # If no block is given, an enumerator is returned instead.
+  #
+  #     h = { "a" => 100, "b" => 200 }
+  #     h.each {|key, value| puts "#{key} is #{value}" }
+  #
+  # <em>produces:</em>
+  #
+  # a is 100
+  # b is 200
+  #
+  # ISO 15.2.13.4.9
+  def each(&block)
+    return to_enum :each unless block_given?
+
+    keys = self.keys
+    vals = self.values
+    len = self.size
+    i = 0
+    while i < len
+      block.call [keys[i], vals[i]]
+      i += 1
+    end
+    self
+  end
+
+  ##
+  # Calls the given block for each element of +self+
+  # and pass the key of each element.
+  #
+  # call-seq:
+  #   hsh.each_key {| key | block } -> hsh
+  #   hsh.each_key                  -> an_enumerator
+  #
+  # If no block is given, an enumerator is returned instead.
+  #
+  #   h = { "a" => 100, "b" => 200 }
+  #   h.each_key {|key| puts key }
+  #
+  # <em>produces:</em>
+  #
+  #  a
+  #  b
+  #
+  # ISO 15.2.13.4.10
+  def each_key(&block)
+    return to_enum :each_key unless block_given?
+
+    self.keys.each{|k| block.call(k)}
+    self
+  end
+
+  ##
+  # Calls the given block for each element of +self+
+  # and pass the value of each element.
+  #
+  # call-seq:
+  #   hsh.each_value {| value | block } -> hsh
+  #   hsh.each_value                    -> an_enumerator
+  #
+  # If no block is given, an enumerator is returned instead.
+  #
+  #  h = { "a" => 100, "b" => 200 }
+  #  h.each_value {|value| puts value }
+  #
+  # <em>produces:</em>
+  #
+  #  100
+  #  200
+  #
+  # ISO 15.2.13.4.11
+  def each_value(&block)
+    return to_enum :each_value unless block_given?
+
+    self.keys.each{|k| block.call(self[k])}
+    self
+  end
+
+  ##
+  # Replaces the contents of <i>hsh</i> with the contents of other hash
+  #
+  # ISO 15.2.13.4.23
+  def replace(hash)
+    self.clear
+    hash = hash.to_hash
+    hash.each_key{|k|
+      self[k] = hash[k]
+    }
+    if hash.default_proc
+      self.default_proc = hash.default_proc
+    else
+      self.default = hash.default
+    end
+    self
+  end
+  # ISO 15.2.13.4.17
+  alias initialize_copy replace
+
+  ##
+  # Return a hash which contains the content of
+  # +self+ and +other+. If a block is given
+  # it will be called for each element with
+  # a duplicate key. The value of the block
+  # will be the final value of this element.
+  #
+  # ISO 15.2.13.4.22
+  def merge(other, &block)
+    h = {}
+    raise TypeError, "can't convert argument into Hash" unless other.respond_to?(:to_hash)
+    other = other.to_hash
+    self.each_key{|k| h[k] = self[k]}
+    if block
+      other.each_key{|k|
+        h[k] = (self.has_key?(k))? block.call(k, self[k], other[k]): other[k]
+      }
+    else
+      other.each_key{|k| h[k] = other[k]}
+    end
+    h
+  end
+
+  # internal method for Hash inspection
+  def _inspect
+    return "{}" if self.size == 0
+    "{"+self.map {|k,v|
+      k._inspect + "=>" + v._inspect
+    }.join(", ")+"}"
+  end
+  ##
+  # Return the contents of this hash as a string. 
+ #
+  # ISO 15.2.13.4.30 (x)
+  def inspect
+    begin
+      self._inspect
+    rescue SystemStackError
+      "{...}"
+    end
+  end
+  # ISO 15.2.13.4.31 (x)
+  alias to_s inspect
+
+  ##
+  #  call-seq:
+  #     hsh.reject! {| key, value | block }  -> hsh or nil
+  #     hsh.reject!                          -> an_enumerator
+  #
+  #  Equivalent to <code>Hash#delete_if</code>, but returns
+  #  <code>nil</code> if no changes were made.
+  #
+  #  1.8/1.9 Hash#reject! returns Hash; ISO says nothing.
+  #
+  def reject!(&b)
+    return to_enum :reject! unless block_given?
+
+    keys = []
+    self.each{|k,v|
+      if b.call([k, v])
+        keys.push(k)
+      end
+    }
+    return nil if keys.size == 0
+    keys.each{|k|
+      self.delete(k)
+    }
+    self
+  end
+
+  ##
+  #  call-seq:
+  #     hsh.reject {|key, value| block}   -> a_hash
+  #     hsh.reject                        -> an_enumerator
+  #
+  #  Returns a new hash consisting of entries for which the block returns false.
+  #
+  #  If no block is given, an enumerator is returned instead.
+  #
+  #     h = { "a" => 100, "b" => 200, "c" => 300 }
+  #     h.reject {|k,v| k < "b"}  #=> {"b" => 200, "c" => 300}
+  #     h.reject {|k,v| v > 100}  #=> {"a" => 100}
+  #
+  #  1.8/1.9 Hash#reject returns Hash; ISO says nothing.
+  #
+  def reject(&b)
+    return to_enum :reject unless block_given?
+
+    h = {}
+    self.each{|k,v|
+      unless b.call([k, v])
+        h[k] = v
+      end
+    }
+    h
+  end
+
+  ##
+  #  call-seq:
+  #     hsh.select! {| key, value | block }  -> hsh or nil
+  #     hsh.select!                          -> an_enumerator
+  #
+  #  Equivalent to <code>Hash#keep_if</code>, but returns
+  #  <code>nil</code> if no changes were made.
+  #
+  #  1.9 Hash#select! returns Hash; ISO says nothing.
+  #
+  def select!(&b)
+    return to_enum :select! unless block_given?
+
+    keys = []
+    self.each{|k,v|
+      unless b.call([k, v])
+        keys.push(k)
+      end
+    }
+    return nil if keys.size == 0
+    keys.each{|k|
+      self.delete(k)
+    }
+    self
+  end
+
+  ##
+  #  call-seq:
+  #     hsh.select {|key, value| block}   -> a_hash
+  #     hsh.select                        -> an_enumerator
+  #
+  #  Returns a new hash consisting of entries for which the block returns true.
+  #
+  #  If no block is given, an enumerator is returned instead.
+  #
+  #     h = { "a" => 100, "b" => 200, "c" => 300 }
+  #     h.select {|k,v| k > "a"}  #=> {"b" => 200, "c" => 300}
+  #     h.select {|k,v| v < 200}  #=> {"a" => 100}
+  #
+  #  1.9 Hash#select returns Hash; ISO says nothing
+  #
+  def select(&b)
+    return to_enum :select unless block_given?
+
+    h = {}
+    self.each{|k,v|
+      if b.call([k, v])
+        h[k] = v
+      end
+    }
+    h
+  end
+
+  ##
+  #  call-seq:
+  #    hsh.rehash -> hsh
+  #
+  #  Rebuilds the hash based on the current hash values for each key. If
+  #  values of key objects have changed since they were inserted, this
+  #  method will reindex <i>hsh</i>.
+  #
+  #     h = {"AAA" => "b"}
+  #     h.keys[0].chop!
+  #     h          #=> {"AA"=>"b"}
+  #     h["AA"]    #=> nil
+  #     h.rehash   #=> {"AA"=>"b"}
+  #     h["AA"]    #=> "b"
+  #
+  def rehash
+    h = {}
+    self.each{|k,v|
+      h[k] = v
+    }
+    self.replace(h)
+  end
+
+  def __update(h)
+    h.each_key{|k| self[k] = h[k]}
+    self
+  end
+end
+
+##
+# Hash is enumerable
+#
+# ISO 15.2.13.3
+class Hash
+  include Enumerable
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrblib/init_mrblib.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrblib/init_mrblib.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrblib/init_mrblib.c	(revision 270)
@@ -0,0 +1,11 @@
+#include "mruby.h"
+#include "mruby/irep.h"
+
+extern const uint8_t mrblib_irep[];
+
+void
+mrb_init_mrblib(mrb_state *mrb)
+{
+  mrb_load_irep(mrb, mrblib_irep);
+}
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrblib/kernel.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrblib/kernel.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrblib/kernel.rb	(revision 270)
@@ -0,0 +1,50 @@
+##
+# Kernel
+#
+# ISO 15.3.1
+module Kernel
+
+  # 15.3.1.2.1 Kernel.`
+  # provided by Kernel#`
+  # 15.3.1.3.5
+  def `(s)
+    raise NotImplementedError.new("backquotes not implemented")
+  end
+
+  ##
+  # 15.3.1.2.3  Kernel.eval
+  # 15.3.1.3.12 Kernel#eval
+  # NotImplemented by mruby core; use mruby-eval gem
+
+  ##
+  # ISO 15.3.1.2.8 Kernel.loop
+  # provided by Kernel#loop
+
+  ##
+  # Calls the given block repetitively.
+  #
+  # ISO 15.3.1.3.29
+  def loop(&block)
+    return to_enum :loop unless block
+
+    while true
+      yield
+    end
+  rescue StopIteration => e
+    e.result
+  end
+
+  # 11.4.4 Step c)
+  def !~(y)
+    !(self =~ y)
+  end
+
+  # internal method for inspect
+  def _inspect
+    self.inspect
+  end
+
+  def to_enum(*a)
+    raise NotImplementedError.new("fiber required for enumerator")
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrblib/mrblib.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrblib/mrblib.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrblib/mrblib.rake	(revision 270)
@@ -0,0 +1,18 @@
+MRuby.each_target do
+  current_dir = File.dirname(__FILE__)
+  relative_from_root = File.dirname(__FILE__).relative_path_from(MRUBY_ROOT)
+  current_build_dir = "#{build_dir}/#{relative_from_root}"
+
+  self.libmruby << objfile("#{current_build_dir}/mrblib")
+
+  file objfile("#{current_build_dir}/mrblib") => "#{current_build_dir}/mrblib.c"
+  file "#{current_build_dir}/mrblib.c" => [mrbcfile, __FILE__] + Dir.glob("#{current_dir}/*.rb").sort do |t|
+    _, _, *rbfiles = t.prerequisites
+    FileUtils.mkdir_p File.dirname(t.name)
+    open(t.name, 'w') do |f|
+      _pp "GEN", "*.rb", "#{t.name.relative_path}"
+      f.puts File.read("#{current_dir}/init_mrblib.c")
+      mrbc.run f, rbfiles, 'mrblib_irep'
+    end
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrblib/numeric.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrblib/numeric.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrblib/numeric.rb	(revision 270)
@@ -0,0 +1,194 @@
+##
+# Numeric
+#
+# ISO 15.2.7
+class Numeric
+  include Comparable
+  ##
+  # Returns the receiver simply.
+  #
+  # ISO 15.2.7.4.1
+  def +@
+    self
+  end
+
+  ##
+  # Returns the receiver's value, negated.
+  #
+  # ISO 15.2.7.4.2
+  def -@
+    0 - self
+  end
+
+  ##
+  # Returns the absolute value of the receiver.
+  #
+  # ISO 15.2.7.4.3
+  def abs
+    if self < 0
+      -self
+    else
+      self
+    end
+  end
+end
+
+##
+# Integral
+#
+# mruby special - module to share methods between Floats and Integers
+#                 to make them compatible
+module Integral
+  ##
+  # Calls the given block once for each Integer
+  # from +self+ downto +num+.
+  #
+  # ISO 15.2.8.3.15
+  def downto(num, &block)
+    return to_enum(:downto, num) unless block_given?
+
+    i = self.to_i
+    while i >= num
+      block.call(i)
+      i -= 1
+    end
+    self
+  end
+
+  ##
+  # Returns self + 1
+  #
+  # ISO 15.2.8.3.19
+  def next
+    self + 1
+  end
+  # ISO 15.2.8.3.21
+  alias succ next
+
+  ##
+  # Calls the given block +self+ times.
+  #
+  # ISO 15.2.8.3.22
+  def times &block
+    return to_enum :times unless block_given?
+
+    i = 0
+    while i < self
+      block.call i
+      i += 1
+    end
+    self
+  end
+
+  ##
+  # Calls the given block once for each Integer
+  # from +self+ upto +num+.
+  #
+  # ISO 15.2.8.3.27
+  def upto(num, &block)
+    return to_enum(:upto, num) unless block_given?
+
+    i = self.to_i
+    while i <= num
+      block.call(i)
+      i += 1
+    end
+    self
+  end
+
+  ##
+  # Calls the given block from +self+ to +num+
+  # incremented by +step+ (default 1).
+  #
+  def step(num, step = 1, &block)
+    raise ArgumentError, "step can't be 0" if step == 0
+    return to_enum(:step, num, step) unless block_given?
+
+    i = if num.kind_of? Float then self.to_f else self end
+    if step > 0
+      while i <= num
+        block.call(i)
+        i += step
+      end
+    else
+      while i >= num
+        block.call(i)
+        i += step
+      end
+    end
+    self
+  end
+end
+
+##
+# Integer
+#
+# ISO 15.2.8
+class Integer
+  include Integral
+  ##
+  # Returns the receiver simply.
+  #
+  # ISO 15.2.8.3.14
+  def ceil
+    self
+  end
+
+  ##
+  # Returns the receiver simply.
+  #
+  # ISO 15.2.8.3.17
+  def floor
+    self
+  end
+
+  ##
+  # Returns the receiver simply.
+  #
+  # ISO 15.2.8.3.24
+  alias round floor
+
+  ##
+  # Returns the receiver simply.
+  #
+  # ISO 15.2.8.3.26
+  alias truncate floor
+end
+
+##
+# Float
+#
+# ISO 15.2.9
+class Float
+  include Integral
+  # mruby special - since mruby integers may be upgraded to floats,
+  # floats should be compatible to integers.
+  def >> other
+    n = self.to_i
+    other = other.to_i
+    if other < 0
+      n << -other
+    else
+      other.times { n /= 2 }
+      if n.abs < 1
+        if n >= 0
+          0
+        else
+          -1
+        end
+      else
+        n.to_i
+      end
+    end
+  end
+  def << other
+    n = self.to_i
+    other = other.to_i
+    if other < 0
+      n >> -other
+    else
+      other.times { n *= 2 }
+      n
+    end
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrblib/range.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrblib/range.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrblib/range.rb	(revision 270)
@@ -0,0 +1,56 @@
+##
+# Range
+#
+# ISO 15.2.14
+class Range
+
+  ##
+  # Calls the given block for each element of +self+
+  # and pass the respective element.
+  #
+  # ISO 15.2.14.4.4
+  def each(&block)
+    return to_enum :each unless block_given?
+
+    val = self.first
+    last = self.last
+
+    if val.kind_of?(Fixnum) && last.kind_of?(Fixnum) # fixnums are special
+      lim = last
+      lim += 1 unless exclude_end?
+      i = val
+      while i < lim
+        block.call(i)
+        i += 1
+      end
+      return self
+    end
+
+    raise TypeError, "can't iterate" unless val.respond_to? :succ
+
+    return self if (val <=> last) > 0
+
+    while (val <=> last) < 0
+      block.call(val)
+      val = val.succ
+    end
+
+    block.call(val) if !exclude_end? && (val <=> last) == 0
+    self
+  end
+
+  # redefine #hash 15.3.1.3.15
+  def hash
+    h = first.hash ^ last.hash
+    h += 1 if self.exclude_end?
+    h
+  end
+end
+
+##
+# Range is enumerable
+#
+# ISO 15.2.14.3
+class Range
+  include Enumerable
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mrblib/string.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mrblib/string.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mrblib/string.rb	(revision 270)
@@ -0,0 +1,230 @@
+##
+# String
+#
+# ISO 15.2.10
+class String
+  include Comparable
+  ##
+  # Calls the given block for each line
+  # and pass the respective line.
+  #
+  # ISO 15.2.10.5.15
+  def each_line(&block)
+    offset = 0
+    while pos = self.index("\n", offset)
+      block.call(self[offset, pos + 1 - offset])
+      offset = pos + 1
+    end
+    block.call(self[offset, self.size - offset]) if self.size > offset
+    self
+  end
+
+  # private method for gsub/sub
+  def __sub_replace(pre, m, post)
+    s = ""
+    i = 0
+    while j = index("\\", i)
+      break if j == length-1
+      t = case self[j+1]
+          when "\\"
+            "\\"
+          when "`"
+            pre
+          when "&", "0"
+            m
+          when "'"
+            post
+          else
+            self[j, 2]
+          end
+      s += self[i, j-i] + t
+      i = j + 2
+    end
+    s + self[i, length-i]
+  end
+
+  ##
+  # Replace all matches of +pattern+ with +replacement+.
+  # Call block (if given) for each match and replace
+  # +pattern+ with the value of the block. Return the
+  # final value.
+  #
+  # ISO 15.2.10.5.18
+  def gsub(*args, &block)
+    if args.size == 2
+      s = ""
+      i = 0
+      while j = index(args[0], i)
+        seplen = args[0].length
+        k = j + seplen
+        pre = self[0, j]
+        post = self[k, length-k]
+        s += self[i, j-i] + args[1].__sub_replace(pre, args[0], post)
+        i = k
+      end
+      s + self[i, length-i]
+    elsif args.size == 1 && block
+      split(args[0], -1).join(block.call(args[0]))
+    else
+      raise ArgumentError, "wrong number of arguments"
+    end
+  end
+
+  ##
+  # Replace all matches of +pattern+ with +replacement+.
+  # Call block (if given) for each match and replace
+  # +pattern+ with the value of the block. Modify
+  # +self+ with the final value.
+  #
+  # ISO 15.2.10.5.19
+  def gsub!(*args, &block)
+    str = self.gsub(*args, &block)
+    return nil if str == self
+    self.replace(str)
+  end
+
+  ##
+  # Calls the given block for each match of +pattern+
+  # If no block is given return an array with all
+  # matches of +pattern+.
+  #
+  # ISO 15.2.10.5.32
+  def scan(reg, &block)
+    ### *** TODO *** ###
+    unless Object.const_defined?(:Regexp)
+      raise NotImplementedError, "scan not available (yet)"
+    end
+  end
+
+  ##
+  # Replace only the first match of +pattern+ with
+  # +replacement+. Call block (if given) for each
+  # match and replace +pattern+ with the value of the
+  # block. Return the final value.
+  #
+  # ISO 15.2.10.5.36
+  def sub(*args, &block)
+    if args.size == 2
+      pre, post = split(args[0], 2)
+      return self unless post # The sub target wasn't found in the string
+      pre + args[1].__sub_replace(pre, args[0], post) + post
+    elsif args.size == 1 && block
+      split(args[0], 2).join(block.call(args[0]))
+    else
+      raise ArgumentError, "wrong number of arguments"
+    end
+  end
+
+  ##
+  # Replace only the first match of +pattern+ with
+  # +replacement+. Call block (if given) for each
+  # match and replace +pattern+ with the value of the
+  # block. Modify +self+ with the final value.
+  #
+  # ISO 15.2.10.5.37
+  def sub!(*args, &block)
+    str = self.sub(*args, &block)
+    return nil if str == self
+    self.replace(str)
+  end
+
+  ##
+  # Call the given block for each character of
+  # +self+.
+  def each_char(&block)
+    pos = 0
+    while pos < self.size
+      block.call(self[pos])
+      pos += 1
+    end
+    self
+  end
+
+  ##
+  # Call the given block for each byte of +self+.
+  def each_byte(&block)
+    bytes = self.bytes
+    pos = 0
+    while pos < bytes.size
+      block.call(bytes[pos])
+      pos += 1
+    end
+    self
+  end
+
+  ##
+  # Modify +self+ by replacing the content of +self+.
+  # The portion of the string affected is determined using the same criteria as +String#[]+.
+  def []=(*args)
+    anum = args.size
+    if anum == 2
+      pos, value = args
+      if pos.kind_of? String
+        posnum = self.index(pos)
+        if posnum
+          b = self[0, posnum.to_i]
+          a = self[(posnum + pos.length)..-1]
+          self.replace([b, value, a].join(''))
+          return value
+        else
+          raise IndexError, "string not matched"
+        end
+      else
+        pos += self.length if pos < 0
+        if pos < 0 || pos > self.length
+          raise IndexError, "index #{args[0]} out of string"
+        end
+        b = self[0, pos.to_i]
+        a = self[pos + 1..-1]
+        self.replace([b, value, a].join(''))
+        return value
+      end
+    elsif anum == 3
+      pos, len, value = args
+      pos += self.length if pos < 0
+      if pos < 0 || pos > self.length
+        raise IndexError, "index #{args[0]} out of string"
+      end
+      if len < 0
+        raise IndexError, "negative length #{len}"
+      end
+      b = self[0, pos.to_i]
+      a = self[pos + len..-1]
+      self.replace([b, value, a].join(''))
+      return value
+    else
+      raise ArgumentError, "wrong number of arguments (#{anum} for 2..3)"
+    end
+  end
+
+  ##
+  # ISO 15.2.10.5.3
+  def =~(re)
+    raise TypeError, "type mismatch: String given" if re.respond_to? :to_str
+    re =~ self
+  end
+
+  ##
+  # ISO 15.2.10.5.27
+  def match(re, &block)
+    if re.respond_to? :to_str
+      if Object.const_defined?(:Regexp)
+        r = Regexp.new(re)
+        r.match(self, &block)
+      else
+        raise NotImplementedError, "String#match needs Regexp class"
+      end
+    else
+      re.match(self, &block)
+    end
+  end
+end
+
+##
+# String is comparable
+#
+# ISO 15.2.10.3
+module Comparable; end
+class String
+  include Comparable
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/mruby-source.gemspec
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/mruby-source.gemspec	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/mruby-source.gemspec	(revision 270)
@@ -0,0 +1,18 @@
+# coding: utf-8
+lib = File.expand_path('../lib', __FILE__)
+$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
+require 'mruby/source'
+
+Gem::Specification.new do |spec|
+  spec.name          = "mruby-source"
+  spec.version       = MRuby::Source::MRUBY_VERSION
+  spec.authors       = [ MRuby::Source::MRUBY_AUTHOR ]
+
+  spec.summary       = %q{MRuby source code wrapper.}
+  spec.description   = %q{MRuby source code wrapper for use with Ruby libs.}
+  spec.homepage      = "http://www.mruby.org/"
+  spec.license       = "MIT"
+
+  spec.files         = `git ls-files -z`.split("\x0")
+  spec.require_paths = ["lib"]
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/array.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/array.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/array.c	(revision 270)
@@ -0,0 +1,1105 @@
+/*
+** array.c - Array class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+#include "mruby/array.h"
+#include "mruby/class.h"
+#include "mruby/string.h"
+#include "mruby/range.h"
+#include "value_array.h"
+
+#define ARY_DEFAULT_LEN   4
+#define ARY_SHRINK_RATIO  5 /* must be larger than 2 */
+#define ARY_C_MAX_SIZE (SIZE_MAX / sizeof(mrb_value))
+#define ARY_MAX_SIZE ((ARY_C_MAX_SIZE < (size_t)MRB_INT_MAX) ? (mrb_int)ARY_C_MAX_SIZE : MRB_INT_MAX-1)
+
+static inline mrb_value
+ary_elt(mrb_value ary, mrb_int offset)
+{
+  if (offset < 0 || RARRAY_LEN(ary) <= offset) {
+    return mrb_nil_value();
+  }
+  return RARRAY_PTR(ary)[offset];
+}
+
+static struct RArray*
+ary_new_capa(mrb_state *mrb, mrb_int capa)
+{
+  struct RArray *a;
+  mrb_int blen;
+
+  if (capa > ARY_MAX_SIZE) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "array size too big");
+  }
+  blen = capa * sizeof(mrb_value);
+  if (blen < capa) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "array size too big");
+  }
+
+  a = (struct RArray*)mrb_obj_alloc(mrb, MRB_TT_ARRAY, mrb->array_class);
+  a->ptr = (mrb_value *)mrb_malloc(mrb, blen);
+  a->aux.capa = capa;
+  a->len = 0;
+
+  return a;
+}
+
+MRB_API mrb_value
+mrb_ary_new_capa(mrb_state *mrb, mrb_int capa)
+{
+  struct RArray *a = ary_new_capa(mrb, capa);
+  return mrb_obj_value(a);
+}
+
+MRB_API mrb_value
+mrb_ary_new(mrb_state *mrb)
+{
+  return mrb_ary_new_capa(mrb, 0);
+}
+
+/*
+ * to copy array, use this instead of memcpy because of portability
+ * * gcc on ARM may fail optimization of memcpy
+ *   http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka3934.html
+ * * gcc on MIPS also fail
+ *   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39755
+ * * memcpy doesn't exist on freestanding environment
+ *
+ * If you optimize for binary size, use memcpy instead of this at your own risk
+ * of above portability issue.
+ *
+ * see also http://togetter.com/li/462898
+ *
+ */
+static inline void
+array_copy(mrb_value *dst, const mrb_value *src, mrb_int size)
+{
+  mrb_int i;
+
+  for (i = 0; i < size; i++) {
+    dst[i] = src[i];
+  }
+}
+
+MRB_API mrb_value
+mrb_ary_new_from_values(mrb_state *mrb, mrb_int size, const mrb_value *vals)
+{
+  struct RArray *a = ary_new_capa(mrb, size);
+
+  array_copy(a->ptr, vals, size);
+  a->len = size;
+
+  return mrb_obj_value(a);
+}
+
+MRB_API mrb_value
+mrb_assoc_new(mrb_state *mrb, mrb_value car, mrb_value cdr)
+{
+  struct RArray *a;
+
+  a = ary_new_capa(mrb, 2);
+  a->ptr[0] = car;
+  a->ptr[1] = cdr;
+  a->len = 2;
+  return mrb_obj_value(a);
+}
+
+static void
+ary_fill_with_nil(mrb_value *ptr, mrb_int size)
+{
+  mrb_value nil = mrb_nil_value();
+
+  while (size--) {
+    *ptr++ = nil;
+  }
+}
+
+static void
+ary_modify(mrb_state *mrb, struct RArray *a)
+{
+  if (ARY_SHARED_P(a)) {
+    mrb_shared_array *shared = a->aux.shared;
+
+    if (shared->refcnt == 1 && a->ptr == shared->ptr) {
+      a->ptr = shared->ptr;
+      a->aux.capa = a->len;
+      mrb_free(mrb, shared);
+    }
+    else {
+      mrb_value *ptr, *p;
+      mrb_int len;
+
+      p = a->ptr;
+      len = a->len * sizeof(mrb_value);
+      ptr = (mrb_value *)mrb_malloc(mrb, len);
+      if (p) {
+        array_copy(ptr, p, a->len);
+      }
+      a->ptr = ptr;
+      a->aux.capa = a->len;
+      mrb_ary_decref(mrb, shared);
+    }
+    ARY_UNSET_SHARED_FLAG(a);
+  }
+}
+
+MRB_API void
+mrb_ary_modify(mrb_state *mrb, struct RArray* a)
+{
+  mrb_write_barrier(mrb, (struct RBasic*)a);
+  ary_modify(mrb, a);
+}
+
+static void
+ary_make_shared(mrb_state *mrb, struct RArray *a)
+{
+  if (!ARY_SHARED_P(a)) {
+    mrb_shared_array *shared = (mrb_shared_array *)mrb_malloc(mrb, sizeof(mrb_shared_array));
+
+    shared->refcnt = 1;
+    if (a->aux.capa > a->len) {
+      a->ptr = shared->ptr = (mrb_value *)mrb_realloc(mrb, a->ptr, sizeof(mrb_value)*a->len+1);
+    }
+    else {
+      shared->ptr = a->ptr;
+    }
+    shared->len = a->len;
+    a->aux.shared = shared;
+    ARY_SET_SHARED_FLAG(a);
+  }
+}
+
+static void
+ary_expand_capa(mrb_state *mrb, struct RArray *a, mrb_int len)
+{
+  mrb_int capa = a->aux.capa;
+
+  if (len > ARY_MAX_SIZE) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "array size too big");
+  }
+
+  if (capa == 0) {
+    capa = ARY_DEFAULT_LEN;
+  }
+  while (capa < len) {
+    capa *= 2;
+  }
+
+  if (capa > ARY_MAX_SIZE) capa = ARY_MAX_SIZE; /* len <= capa <= ARY_MAX_SIZE */
+
+  if (capa > a->aux.capa) {
+    mrb_value *expanded_ptr = (mrb_value *)mrb_realloc(mrb, a->ptr, sizeof(mrb_value)*capa);
+
+    a->aux.capa = capa;
+    a->ptr = expanded_ptr;
+  }
+}
+
+static void
+ary_shrink_capa(mrb_state *mrb, struct RArray *a)
+{
+  mrb_int capa = a->aux.capa;
+
+  if (capa < ARY_DEFAULT_LEN * 2) return;
+  if (capa <= a->len * ARY_SHRINK_RATIO) return;
+
+  do {
+    capa /= 2;
+    if (capa < ARY_DEFAULT_LEN) {
+      capa = ARY_DEFAULT_LEN;
+      break;
+    }
+  } while (capa > a->len * ARY_SHRINK_RATIO);
+
+  if (capa > a->len && capa < a->aux.capa) {
+    a->aux.capa = capa;
+    a->ptr = (mrb_value *)mrb_realloc(mrb, a->ptr, sizeof(mrb_value)*capa);
+  }
+}
+
+MRB_API mrb_value
+mrb_ary_resize(mrb_state *mrb, mrb_value ary, mrb_int new_len)
+{
+  mrb_int old_len;
+  struct RArray *a = mrb_ary_ptr(ary);
+
+  ary_modify(mrb, a);
+  old_len = RARRAY_LEN(ary);
+  if (old_len != new_len) {
+    a->len = new_len;
+    if (new_len < old_len) {
+      ary_shrink_capa(mrb, a);
+    }
+    else {
+      ary_expand_capa(mrb, a, new_len);
+      ary_fill_with_nil(a->ptr + old_len, new_len - old_len);
+    }
+  }
+
+  return ary;
+}
+
+static mrb_value
+mrb_ary_s_create(mrb_state *mrb, mrb_value self)
+{
+  mrb_value *vals;
+  mrb_int len;
+
+  mrb_get_args(mrb, "*", &vals, &len);
+
+  return mrb_ary_new_from_values(mrb, len, vals);
+}
+
+static void
+ary_concat(mrb_state *mrb, struct RArray *a, mrb_value *ptr, mrb_int blen)
+{
+  mrb_int len = a->len + blen;
+
+  ary_modify(mrb, a);
+  if (a->aux.capa < len) ary_expand_capa(mrb, a, len);
+  array_copy(a->ptr+a->len, ptr, blen);
+  mrb_write_barrier(mrb, (struct RBasic*)a);
+  a->len = len;
+}
+
+MRB_API void
+mrb_ary_concat(mrb_state *mrb, mrb_value self, mrb_value other)
+{
+  struct RArray *a2 = mrb_ary_ptr(other);
+
+  ary_concat(mrb, mrb_ary_ptr(self), a2->ptr, a2->len);
+}
+
+static mrb_value
+mrb_ary_concat_m(mrb_state *mrb, mrb_value self)
+{
+  mrb_value *ptr;
+  mrb_int blen;
+
+  mrb_get_args(mrb, "a", &ptr, &blen);
+  ary_concat(mrb, mrb_ary_ptr(self), ptr, blen);
+  return self;
+}
+
+static mrb_value
+mrb_ary_plus(mrb_state *mrb, mrb_value self)
+{
+  struct RArray *a1 = mrb_ary_ptr(self);
+  struct RArray *a2;
+  mrb_value *ptr;
+  mrb_int blen;
+
+  mrb_get_args(mrb, "a", &ptr, &blen);
+  if (ARY_MAX_SIZE - blen < a1->len) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "array size too big");
+  }
+  a2 = ary_new_capa(mrb, a1->len + blen);
+  array_copy(a2->ptr, a1->ptr, a1->len);
+  array_copy(a2->ptr + a1->len, ptr, blen);
+  a2->len = a1->len + blen;
+
+  return mrb_obj_value(a2);
+}
+
+static void
+ary_replace(mrb_state *mrb, struct RArray *a, mrb_value *argv, mrb_int len)
+{
+  ary_modify(mrb, a);
+  if (a->aux.capa < len)
+    ary_expand_capa(mrb, a, len);
+  array_copy(a->ptr, argv, len);
+  mrb_write_barrier(mrb, (struct RBasic*)a);
+  a->len = len;
+}
+
+MRB_API void
+mrb_ary_replace(mrb_state *mrb, mrb_value self, mrb_value other)
+{
+  struct RArray *a2 = mrb_ary_ptr(other);
+
+  ary_replace(mrb, mrb_ary_ptr(self), a2->ptr, a2->len);
+}
+
+static mrb_value
+mrb_ary_replace_m(mrb_state *mrb, mrb_value self)
+{
+  mrb_value other;
+
+  mrb_get_args(mrb, "A", &other);
+  mrb_ary_replace(mrb, self, other);
+
+  return self;
+}
+
+static mrb_value
+mrb_ary_times(mrb_state *mrb, mrb_value self)
+{
+  struct RArray *a1 = mrb_ary_ptr(self);
+  struct RArray *a2;
+  mrb_value *ptr;
+  mrb_int times;
+
+  mrb_get_args(mrb, "i", &times);
+  if (times < 0) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "negative argument");
+  }
+  if (times == 0) return mrb_ary_new(mrb);
+  if (ARY_MAX_SIZE / times < a1->len) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "array size too big");
+  }
+  a2 = ary_new_capa(mrb, a1->len * times);
+  ptr = a2->ptr;
+  while (times--) {
+    array_copy(ptr, a1->ptr, a1->len);
+    ptr += a1->len;
+    a2->len += a1->len;
+  }
+
+  return mrb_obj_value(a2);
+}
+
+static mrb_value
+mrb_ary_reverse_bang(mrb_state *mrb, mrb_value self)
+{
+  struct RArray *a = mrb_ary_ptr(self);
+
+  if (a->len > 1) {
+    mrb_value *p1, *p2;
+
+    ary_modify(mrb, a);
+    p1 = a->ptr;
+    p2 = a->ptr + a->len - 1;
+
+    while (p1 < p2) {
+      mrb_value tmp = *p1;
+      *p1++ = *p2;
+      *p2-- = tmp;
+    }
+  }
+  return self;
+}
+
+static mrb_value
+mrb_ary_reverse(mrb_state *mrb, mrb_value self)
+{
+  struct RArray *a = mrb_ary_ptr(self), *b = ary_new_capa(mrb, a->len);
+
+  if (a->len > 0) {
+    mrb_value *p1, *p2, *e;
+
+    p1 = a->ptr;
+    e  = p1 + a->len;
+    p2 = b->ptr + a->len - 1;
+    while (p1 < e) {
+      *p2-- = *p1++;
+    }
+    b->len = a->len;
+  }
+  return mrb_obj_value(b);
+}
+
+MRB_API void
+mrb_ary_push(mrb_state *mrb, mrb_value ary, mrb_value elem)
+{
+  struct RArray *a = mrb_ary_ptr(ary);
+
+  ary_modify(mrb, a);
+  if (a->len == a->aux.capa)
+    ary_expand_capa(mrb, a, a->len + 1);
+  a->ptr[a->len++] = elem;
+  mrb_field_write_barrier_value(mrb, (struct RBasic*)a, elem);
+}
+
+static mrb_value
+mrb_ary_push_m(mrb_state *mrb, mrb_value self)
+{
+  mrb_value *argv;
+  mrb_int len;
+
+  mrb_get_args(mrb, "*", &argv, &len);
+  while (len--) {
+    mrb_ary_push(mrb, self, *argv++);
+  }
+
+  return self;
+}
+
+MRB_API mrb_value
+mrb_ary_pop(mrb_state *mrb, mrb_value ary)
+{
+  struct RArray *a = mrb_ary_ptr(ary);
+
+  if (a->len == 0) return mrb_nil_value();
+  return a->ptr[--a->len];
+}
+
+#define ARY_SHIFT_SHARED_MIN 10
+
+MRB_API mrb_value
+mrb_ary_shift(mrb_state *mrb, mrb_value self)
+{
+  struct RArray *a = mrb_ary_ptr(self);
+  mrb_value val;
+
+  if (a->len == 0) return mrb_nil_value();
+  if (ARY_SHARED_P(a)) {
+  L_SHIFT:
+    val = a->ptr[0];
+    a->ptr++;
+    a->len--;
+    return val;
+  }
+  if (a->len > ARY_SHIFT_SHARED_MIN) {
+    ary_make_shared(mrb, a);
+    goto L_SHIFT;
+  }
+  else {
+    mrb_value *ptr = a->ptr;
+    mrb_int size = a->len;
+
+    val = *ptr;
+    while (--size) {
+      *ptr = *(ptr+1);
+      ++ptr;
+    }
+    --a->len;
+  }
+  return val;
+}
+
+/* self = [1,2,3]
+   item = 0
+   self.unshift item
+   p self #=> [0, 1, 2, 3] */
+MRB_API mrb_value
+mrb_ary_unshift(mrb_state *mrb, mrb_value self, mrb_value item)
+{
+  struct RArray *a = mrb_ary_ptr(self);
+
+  if (ARY_SHARED_P(a)
+      && a->aux.shared->refcnt == 1 /* shared only referenced from this array */
+      && a->ptr - a->aux.shared->ptr >= 1) /* there's room for unshifted item */ {
+    a->ptr--;
+    a->ptr[0] = item;
+  }
+  else {
+    ary_modify(mrb, a);
+    if (a->aux.capa < a->len + 1)
+      ary_expand_capa(mrb, a, a->len + 1);
+    value_move(a->ptr + 1, a->ptr, a->len);
+    a->ptr[0] = item;
+  }
+  a->len++;
+  mrb_field_write_barrier_value(mrb, (struct RBasic*)a, item);
+
+  return self;
+}
+
+static mrb_value
+mrb_ary_unshift_m(mrb_state *mrb, mrb_value self)
+{
+  struct RArray *a = mrb_ary_ptr(self);
+  mrb_value *vals;
+  mrb_int len;
+
+  mrb_get_args(mrb, "*", &vals, &len);
+  if (ARY_SHARED_P(a)
+      && a->aux.shared->refcnt == 1 /* shared only referenced from this array */
+      && a->ptr - a->aux.shared->ptr >= len) /* there's room for unshifted item */ {
+    a->ptr -= len;
+  }
+  else {
+    ary_modify(mrb, a);
+    if (len == 0) return self;
+    if (a->aux.capa < a->len + len)
+      ary_expand_capa(mrb, a, a->len + len);
+    value_move(a->ptr + len, a->ptr, a->len);
+  }
+  array_copy(a->ptr, vals, len);
+  a->len += len;
+  while (len--) {
+    mrb_field_write_barrier_value(mrb, (struct RBasic*)a, vals[len]);
+  }
+
+  return self;
+}
+
+MRB_API mrb_value
+mrb_ary_ref(mrb_state *mrb, mrb_value ary, mrb_int n)
+{
+  struct RArray *a = mrb_ary_ptr(ary);
+
+  /* range check */
+  if (n < 0) n += a->len;
+  if (n < 0 || a->len <= n) return mrb_nil_value();
+
+  return a->ptr[n];
+}
+
+MRB_API void
+mrb_ary_set(mrb_state *mrb, mrb_value ary, mrb_int n, mrb_value val)
+{
+  struct RArray *a = mrb_ary_ptr(ary);
+
+  ary_modify(mrb, a);
+  /* range check */
+  if (n < 0) {
+    n += a->len;
+    if (n < 0) {
+      mrb_raisef(mrb, E_INDEX_ERROR, "index %S out of array", mrb_fixnum_value(n - a->len));
+    }
+  }
+  if (a->len <= n) {
+    if (a->aux.capa <= n)
+      ary_expand_capa(mrb, a, n + 1);
+    ary_fill_with_nil(a->ptr + a->len, n + 1 - a->len);
+    a->len = n + 1;
+  }
+
+  a->ptr[n] = val;
+  mrb_field_write_barrier_value(mrb, (struct RBasic*)a, val);
+}
+
+MRB_API mrb_value
+mrb_ary_splice(mrb_state *mrb, mrb_value ary, mrb_int head, mrb_int len, mrb_value rpl)
+{
+  struct RArray *a = mrb_ary_ptr(ary);
+  mrb_int tail, size;
+  const mrb_value *argv;
+  mrb_int i, argc;
+
+  ary_modify(mrb, a);
+
+  /* len check */
+  if (len < 0) mrb_raisef(mrb, E_INDEX_ERROR, "negative length (%S)", mrb_fixnum_value(len));
+
+  /* range check */
+  if (head < 0) {
+    head += a->len;
+    if (head < 0) {
+      mrb_raise(mrb, E_INDEX_ERROR, "index is out of array");
+    }
+  }
+  if (a->len < len || a->len < head + len) {
+    len = a->len - head;
+  }
+  tail = head + len;
+
+  /* size check */
+  if (mrb_array_p(rpl)) {
+    argc = RARRAY_LEN(rpl);
+    argv = RARRAY_PTR(rpl);
+  }
+  else {
+    argc = 1;
+    argv = &rpl;
+  }
+  size = head + argc;
+
+  if (tail < a->len) size += a->len - tail;
+  if (size > a->aux.capa)
+    ary_expand_capa(mrb, a, size);
+
+  if (head > a->len) {
+    ary_fill_with_nil(a->ptr + a->len, head - a->len);
+  }
+  else if (head < a->len) {
+    value_move(a->ptr + head + argc, a->ptr + tail, a->len - tail);
+  }
+
+  for (i = 0; i < argc; i++) {
+    *(a->ptr + head + i) = *(argv + i);
+    mrb_field_write_barrier_value(mrb, (struct RBasic*)a, argv[i]);
+  }
+
+  a->len = size;
+
+  return ary;
+}
+
+void
+mrb_ary_decref(mrb_state *mrb, mrb_shared_array *shared)
+{
+  shared->refcnt--;
+  if (shared->refcnt == 0) {
+    mrb_free(mrb, shared->ptr);
+    mrb_free(mrb, shared);
+  }
+}
+
+static mrb_value
+ary_subseq(mrb_state *mrb, struct RArray *a, mrb_int beg, mrb_int len)
+{
+  struct RArray *b;
+
+  ary_make_shared(mrb, a);
+  b  = (struct RArray*)mrb_obj_alloc(mrb, MRB_TT_ARRAY, mrb->array_class);
+  b->ptr = a->ptr + beg;
+  b->len = len;
+  b->aux.shared = a->aux.shared;
+  b->aux.shared->refcnt++;
+  ARY_SET_SHARED_FLAG(b);
+
+  return mrb_obj_value(b);
+}
+
+static mrb_int
+aget_index(mrb_state *mrb, mrb_value index)
+{
+  if (mrb_fixnum_p(index)) {
+    return mrb_fixnum(index);
+  }
+  else if (mrb_float_p(index)) {
+    return (mrb_int)mrb_float(index);
+  }
+  else {
+    mrb_int i, argc;
+    mrb_value *argv;
+
+    mrb_get_args(mrb, "i*", &i, &argv, &argc);
+    return i;
+  }
+}
+
+/*
+ *  call-seq:
+ *     ary[index]                -> obj     or nil
+ *     ary[start, length]        -> new_ary or nil
+ *     ary[range]                -> new_ary or nil
+ *     ary.slice(index)          -> obj     or nil
+ *     ary.slice(start, length)  -> new_ary or nil
+ *     ary.slice(range)          -> new_ary or nil
+ *
+ *  Element Reference --- Returns the element at +index+, or returns a
+ *  subarray starting at the +start+ index and continuing for +length+
+ *  elements, or returns a subarray specified by +range+ of indices.
+ *
+ *  Negative indices count backward from the end of the array (-1 is the last
+ *  element).  For +start+ and +range+ cases the starting index is just before
+ *  an element.  Additionally, an empty array is returned when the starting
+ *  index for an element range is at the end of the array.
+ *
+ *  Returns +nil+ if the index (or starting index) are out of range.
+ *
+ *  a = [ "a", "b", "c", "d", "e" ]
+ *  a[1]     => "b"
+ *  a[1,2]   => ["b", "c"]
+ *  a[1..-2] => ["b", "c", "d"]
+ *
+ */
+
+static mrb_value
+mrb_ary_aget(mrb_state *mrb, mrb_value self)
+{
+  struct RArray *a = mrb_ary_ptr(self);
+  mrb_int i, len;
+  mrb_value index;
+
+  if (mrb_get_args(mrb, "o|i", &index, &len) == 1) {
+    switch (mrb_type(index)) {
+      /* a[n..m] */
+    case MRB_TT_RANGE:
+      if (mrb_range_beg_len(mrb, index, &i, &len, a->len)) {
+        return ary_subseq(mrb, a, i, len);
+      }
+      else {
+        return mrb_nil_value();
+      }
+    case MRB_TT_FIXNUM:
+      return mrb_ary_ref(mrb, self, mrb_fixnum(index));
+    default:
+      return mrb_ary_ref(mrb, self, aget_index(mrb, index));
+    }
+  }
+
+  i = aget_index(mrb, index);
+  if (i < 0) i += a->len;
+  if (i < 0 || a->len < i) return mrb_nil_value();
+  if (len < 0) return mrb_nil_value();
+  if (a->len == i) return mrb_ary_new(mrb);
+  if (len > a->len - i) len = a->len - i;
+
+  return ary_subseq(mrb, a, i, len);
+}
+
+/*
+ *  call-seq:
+ *     ary[index]         = obj                      ->  obj
+ *     ary[start, length] = obj or other_ary or nil  ->  obj or other_ary or nil
+ *     ary[range]         = obj or other_ary or nil  ->  obj or other_ary or nil
+ *
+ *  Element Assignment --- Sets the element at +index+, or replaces a subarray
+ *  from the +start+ index for +length+ elements, or replaces a subarray
+ *  specified by the +range+ of indices.
+ *
+ *  If indices are greater than the current capacity of the array, the array
+ *  grows automatically.  Elements are inserted into the array at +start+ if
+ *  +length+ is zero.
+ *
+ *  Negative indices will count backward from the end of the array.  For
+ *  +start+ and +range+ cases the starting index is just before an element.
+ *
+ *  An IndexError is raised if a negative index points past the beginning of
+ *  the array.
+ *
+ *  See also Array#push, and Array#unshift.
+ *
+ *     a = Array.new
+ *     a[4] = "4";                 #=> [nil, nil, nil, nil, "4"]
+ *     a[0, 3] = [ 'a', 'b', 'c' ] #=> ["a", "b", "c", nil, "4"]
+ *     a[1..2] = [ 1, 2 ]          #=> ["a", 1, 2, nil, "4"]
+ *     a[0, 2] = "?"               #=> ["?", 2, nil, "4"]
+ *     a[0..2] = "A"               #=> ["A", "4"]
+ *     a[-1]   = "Z"               #=> ["A", "Z"]
+ *     a[1..-1] = nil              #=> ["A", nil]
+ *     a[1..-1] = []               #=> ["A"]
+ *     a[0, 0] = [ 1, 2 ]          #=> [1, 2, "A"]
+ *     a[3, 0] = "B"               #=> [1, 2, "A", "B"]
+ */
+
+static mrb_value
+mrb_ary_aset(mrb_state *mrb, mrb_value self)
+{
+  mrb_value v1, v2, v3;
+  mrb_int i, len;
+
+  if (mrb_get_args(mrb, "oo|o", &v1, &v2, &v3) == 2) {
+    switch (mrb_type(v1)) {
+    /* a[n..m] = v */
+    case MRB_TT_RANGE:
+      if (mrb_range_beg_len(mrb, v1, &i, &len, RARRAY_LEN(self))) {
+        mrb_ary_splice(mrb, self, i, len, v2);
+      }
+      break;
+    /* a[n] = v */
+    case MRB_TT_FIXNUM:
+      mrb_ary_set(mrb, self, mrb_fixnum(v1), v2);
+      break;
+    default:
+      mrb_ary_set(mrb, self, aget_index(mrb, v1), v2);
+      break;
+    }
+    return v2;
+  }
+
+  /* a[n,m] = v */
+  mrb_ary_splice(mrb, self, aget_index(mrb, v1), aget_index(mrb, v2), v3);
+  return v3;
+}
+
+static mrb_value
+mrb_ary_delete_at(mrb_state *mrb, mrb_value self)
+{
+  struct RArray *a = mrb_ary_ptr(self);
+  mrb_int   index;
+  mrb_value val;
+  mrb_value *ptr;
+  mrb_int len;
+
+  mrb_get_args(mrb, "i", &index);
+  if (index < 0) index += a->len;
+  if (index < 0 || a->len <= index) return mrb_nil_value();
+
+  ary_modify(mrb, a);
+  val = a->ptr[index];
+
+  ptr = a->ptr + index;
+  len = a->len - index;
+  while (--len) {
+    *ptr = *(ptr+1);
+    ++ptr;
+  }
+  --a->len;
+
+  ary_shrink_capa(mrb, a);
+
+  return val;
+}
+
+static mrb_value
+mrb_ary_first(mrb_state *mrb, mrb_value self)
+{
+  struct RArray *a = mrb_ary_ptr(self);
+  mrb_int size;
+
+  if (mrb_get_args(mrb, "|i", &size) == 0) {
+    return (a->len > 0)? a->ptr[0]: mrb_nil_value();
+  }
+  if (size < 0) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "negative array size");
+  }
+
+  if (size > a->len) size = a->len;
+  if (ARY_SHARED_P(a)) {
+    return ary_subseq(mrb, a, 0, size);
+  }
+  return mrb_ary_new_from_values(mrb, size, a->ptr);
+}
+
+static mrb_value
+mrb_ary_last(mrb_state *mrb, mrb_value self)
+{
+  struct RArray *a = mrb_ary_ptr(self);
+  mrb_int size;
+
+  if (mrb_get_args(mrb, "|i", &size) == 0)
+    return (a->len > 0)? a->ptr[a->len - 1]: mrb_nil_value();
+
+  if (size < 0) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "negative array size");
+  }
+  if (size > a->len) size = a->len;
+  if (ARY_SHARED_P(a) || size > ARY_DEFAULT_LEN) {
+    return ary_subseq(mrb, a, a->len - size, size);
+  }
+  return mrb_ary_new_from_values(mrb, size, a->ptr + a->len - size);
+}
+
+static mrb_value
+mrb_ary_index_m(mrb_state *mrb, mrb_value self)
+{
+  mrb_value obj;
+  mrb_int i;
+
+  mrb_get_args(mrb, "o", &obj);
+  for (i = 0; i < RARRAY_LEN(self); i++) {
+    if (mrb_equal(mrb, RARRAY_PTR(self)[i], obj)) {
+      return mrb_fixnum_value(i);
+    }
+  }
+  return mrb_nil_value();
+}
+
+static mrb_value
+mrb_ary_rindex_m(mrb_state *mrb, mrb_value self)
+{
+  mrb_value obj;
+  mrb_int i;
+
+  mrb_get_args(mrb, "o", &obj);
+  for (i = RARRAY_LEN(self) - 1; i >= 0; i--) {
+    if (mrb_equal(mrb, RARRAY_PTR(self)[i], obj)) {
+      return mrb_fixnum_value(i);
+    }
+  }
+  return mrb_nil_value();
+}
+
+MRB_API mrb_value
+mrb_ary_splat(mrb_state *mrb, mrb_value v)
+{
+  if (mrb_array_p(v)) {
+    return v;
+  }
+  if (mrb_respond_to(mrb, v, mrb_intern_lit(mrb, "to_a"))) {
+    return mrb_funcall(mrb, v, "to_a", 0);
+  }
+  else {
+    return mrb_ary_new_from_values(mrb, 1, &v);
+  }
+}
+
+static mrb_value
+mrb_ary_size(mrb_state *mrb, mrb_value self)
+{
+  struct RArray *a = mrb_ary_ptr(self);
+
+  return mrb_fixnum_value(a->len);
+}
+
+MRB_API mrb_value
+mrb_ary_clear(mrb_state *mrb, mrb_value self)
+{
+  struct RArray *a = mrb_ary_ptr(self);
+
+  if (ARY_SHARED_P(a)) {
+    mrb_ary_decref(mrb, a->aux.shared);
+    ARY_UNSET_SHARED_FLAG(a);
+  }
+  else {
+    mrb_free(mrb, a->ptr);
+  }
+  a->len = 0;
+  a->aux.capa = 0;
+  a->ptr = 0;
+
+  return self;
+}
+
+static mrb_value
+mrb_ary_empty_p(mrb_state *mrb, mrb_value self)
+{
+  struct RArray *a = mrb_ary_ptr(self);
+
+  return mrb_bool_value(a->len == 0);
+}
+
+MRB_API mrb_value
+mrb_check_array_type(mrb_state *mrb, mrb_value ary)
+{
+  return mrb_check_convert_type(mrb, ary, MRB_TT_ARRAY, "Array", "to_ary");
+}
+
+MRB_API mrb_value
+mrb_ary_entry(mrb_value ary, mrb_int offset)
+{
+  if (offset < 0) {
+    offset += RARRAY_LEN(ary);
+  }
+  return ary_elt(ary, offset);
+}
+
+static mrb_value
+join_ary(mrb_state *mrb, mrb_value ary, mrb_value sep, mrb_value list)
+{
+  mrb_int i;
+  mrb_value result, val, tmp;
+
+  /* check recursive */
+  for (i=0; i<RARRAY_LEN(list); i++) {
+    if (mrb_obj_equal(mrb, ary, RARRAY_PTR(list)[i])) {
+      mrb_raise(mrb, E_ARGUMENT_ERROR, "recursive array join");
+    }
+  }
+
+  mrb_ary_push(mrb, list, ary);
+
+  result = mrb_str_buf_new(mrb, 64);
+
+  for (i=0; i<RARRAY_LEN(ary); i++) {
+    if (i > 0 && !mrb_nil_p(sep)) {
+      mrb_str_cat_str(mrb, result, sep);
+    }
+
+    val = RARRAY_PTR(ary)[i];
+    switch (mrb_type(val)) {
+    case MRB_TT_ARRAY:
+    ary_join:
+      val = join_ary(mrb, val, sep, list);
+      /* fall through */
+
+    case MRB_TT_STRING:
+    str_join:
+      mrb_str_cat_str(mrb, result, val);
+      break;
+
+    default:
+      tmp = mrb_check_string_type(mrb, val);
+      if (!mrb_nil_p(tmp)) {
+        val = tmp;
+        goto str_join;
+      }
+      tmp = mrb_check_convert_type(mrb, val, MRB_TT_ARRAY, "Array", "to_ary");
+      if (!mrb_nil_p(tmp)) {
+        val = tmp;
+        goto ary_join;
+      }
+      val = mrb_obj_as_string(mrb, val);
+      goto str_join;
+    }
+  }
+
+  mrb_ary_pop(mrb, list);
+
+  return result;
+}
+
+MRB_API mrb_value
+mrb_ary_join(mrb_state *mrb, mrb_value ary, mrb_value sep)
+{
+  sep = mrb_obj_as_string(mrb, sep);
+  return join_ary(mrb, ary, sep, mrb_ary_new(mrb));
+}
+
+/*
+ *  call-seq:
+ *     ary.join(sep="")    -> str
+ *
+ *  Returns a string created by converting each element of the array to
+ *  a string, separated by <i>sep</i>.
+ *
+ *     [ "a", "b", "c" ].join        #=> "abc"
+ *     [ "a", "b", "c" ].join("-")   #=> "a-b-c"
+ */
+
+static mrb_value
+mrb_ary_join_m(mrb_state *mrb, mrb_value ary)
+{
+  mrb_value sep = mrb_nil_value();
+
+  mrb_get_args(mrb, "|S!", &sep);
+  return mrb_ary_join(mrb, ary, sep);
+}
+
+static mrb_value
+mrb_ary_eq(mrb_state *mrb, mrb_value ary1)
+{
+  mrb_value ary2;
+
+  mrb_get_args(mrb, "o", &ary2);
+  if (mrb_obj_equal(mrb, ary1, ary2)) return mrb_true_value();
+  if (!mrb_array_p(ary2)) {
+    return mrb_false_value();
+  }
+  if (RARRAY_LEN(ary1) != RARRAY_LEN(ary2)) return mrb_false_value();
+
+  return ary2;
+}
+
+static mrb_value
+mrb_ary_cmp(mrb_state *mrb, mrb_value ary1)
+{
+  mrb_value ary2;
+
+  mrb_get_args(mrb, "o", &ary2);
+  if (mrb_obj_equal(mrb, ary1, ary2)) return mrb_fixnum_value(0);
+  if (!mrb_array_p(ary2)) {
+    return mrb_nil_value();
+  }
+
+  return ary2;
+}
+
+void
+mrb_init_array(mrb_state *mrb)
+{
+  struct RClass *a;
+
+  mrb->array_class = a = mrb_define_class(mrb, "Array", mrb->object_class);            /* 15.2.12 */
+  MRB_SET_INSTANCE_TT(a, MRB_TT_ARRAY);
+
+  mrb_define_class_method(mrb, a, "[]",        mrb_ary_s_create,     MRB_ARGS_ANY());  /* 15.2.12.4.1 */
+
+  mrb_define_method(mrb, a, "+",               mrb_ary_plus,         MRB_ARGS_REQ(1)); /* 15.2.12.5.1  */
+  mrb_define_method(mrb, a, "*",               mrb_ary_times,        MRB_ARGS_REQ(1)); /* 15.2.12.5.2  */
+  mrb_define_method(mrb, a, "<<",              mrb_ary_push_m,       MRB_ARGS_REQ(1)); /* 15.2.12.5.3  */
+  mrb_define_method(mrb, a, "[]",              mrb_ary_aget,         MRB_ARGS_ANY());  /* 15.2.12.5.4  */
+  mrb_define_method(mrb, a, "[]=",             mrb_ary_aset,         MRB_ARGS_ANY());  /* 15.2.12.5.5  */
+  mrb_define_method(mrb, a, "clear",           mrb_ary_clear,        MRB_ARGS_NONE()); /* 15.2.12.5.6  */
+  mrb_define_method(mrb, a, "concat",          mrb_ary_concat_m,     MRB_ARGS_REQ(1)); /* 15.2.12.5.8  */
+  mrb_define_method(mrb, a, "delete_at",       mrb_ary_delete_at,    MRB_ARGS_REQ(1)); /* 15.2.12.5.9  */
+  mrb_define_method(mrb, a, "empty?",          mrb_ary_empty_p,      MRB_ARGS_NONE()); /* 15.2.12.5.12 */
+  mrb_define_method(mrb, a, "first",           mrb_ary_first,        MRB_ARGS_OPT(1)); /* 15.2.12.5.13 */
+  mrb_define_method(mrb, a, "index",           mrb_ary_index_m,      MRB_ARGS_REQ(1)); /* 15.2.12.5.14 */
+  mrb_define_method(mrb, a, "initialize_copy", mrb_ary_replace_m,    MRB_ARGS_REQ(1)); /* 15.2.12.5.16 */
+  mrb_define_method(mrb, a, "join",            mrb_ary_join_m,       MRB_ARGS_ANY());  /* 15.2.12.5.17 */
+  mrb_define_method(mrb, a, "last",            mrb_ary_last,         MRB_ARGS_ANY());  /* 15.2.12.5.18 */
+  mrb_define_method(mrb, a, "length",          mrb_ary_size,         MRB_ARGS_NONE()); /* 15.2.12.5.19 */
+  mrb_define_method(mrb, a, "pop",             mrb_ary_pop,          MRB_ARGS_NONE()); /* 15.2.12.5.21 */
+  mrb_define_method(mrb, a, "push",            mrb_ary_push_m,       MRB_ARGS_ANY());  /* 15.2.12.5.22 */
+  mrb_define_method(mrb, a, "replace",         mrb_ary_replace_m,    MRB_ARGS_REQ(1)); /* 15.2.12.5.23 */
+  mrb_define_method(mrb, a, "reverse",         mrb_ary_reverse,      MRB_ARGS_NONE()); /* 15.2.12.5.24 */
+  mrb_define_method(mrb, a, "reverse!",        mrb_ary_reverse_bang, MRB_ARGS_NONE()); /* 15.2.12.5.25 */
+  mrb_define_method(mrb, a, "rindex",          mrb_ary_rindex_m,     MRB_ARGS_REQ(1)); /* 15.2.12.5.26 */
+  mrb_define_method(mrb, a, "shift",           mrb_ary_shift,        MRB_ARGS_NONE()); /* 15.2.12.5.27 */
+  mrb_define_method(mrb, a, "size",            mrb_ary_size,         MRB_ARGS_NONE()); /* 15.2.12.5.28 */
+  mrb_define_method(mrb, a, "slice",           mrb_ary_aget,         MRB_ARGS_ANY());  /* 15.2.12.5.29 */
+  mrb_define_method(mrb, a, "unshift",         mrb_ary_unshift_m,    MRB_ARGS_ANY());  /* 15.2.12.5.30 */
+
+  mrb_define_method(mrb, a, "__ary_eq",        mrb_ary_eq,           MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, a, "__ary_cmp",       mrb_ary_cmp,          MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, a, "__ary_index",     mrb_ary_index_m,      MRB_ARGS_REQ(1)); /* kept for mruby-array-ext */
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/backtrace.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/backtrace.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/backtrace.c	(revision 270)
@@ -0,0 +1,217 @@
+/*
+** backtrace.c -
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+#include "mruby/variable.h"
+#include "mruby/proc.h"
+#include "mruby/array.h"
+#include "mruby/string.h"
+#include "mruby/class.h"
+#include "mruby/debug.h"
+#include "mruby/error.h"
+#include "mruby/numeric.h"
+
+struct backtrace_location {
+  int i;
+  int lineno;
+  const char *filename;
+  const char *method;
+  const char *sep;
+  const char *class_name;
+};
+
+typedef void (*output_stream_func)(mrb_state*, struct backtrace_location*, void*);
+
+#ifndef MRB_DISABLE_STDIO
+
+struct print_backtrace_args {
+  FILE *stream;
+  int tracehead;
+};
+
+static void
+print_backtrace_i(mrb_state *mrb, struct backtrace_location *loc, void *data)
+{
+  struct print_backtrace_args *args;
+
+  args = (struct print_backtrace_args*)data;
+
+  if (args->tracehead) {
+    fprintf(args->stream, "trace:\n");
+    args->tracehead = FALSE;
+  }
+
+  fprintf(args->stream, "\t[%d] %s:%d", loc->i, loc->filename, loc->lineno);
+
+  if (loc->method) {
+    if (loc->class_name) {
+      fprintf(args->stream, ":in %s%s%s", loc->class_name, loc->sep, loc->method);
+    }
+    else {
+      fprintf(args->stream, ":in %s", loc->method);
+    }
+  }
+
+  fprintf(args->stream, "\n");
+}
+
+#endif
+
+static void
+get_backtrace_i(mrb_state *mrb, struct backtrace_location *loc, void *data)
+{
+  mrb_value ary, str;
+  int ai;
+
+  ai = mrb_gc_arena_save(mrb);
+  ary = mrb_obj_value((struct RArray*)data);
+
+  str = mrb_str_new_cstr(mrb, loc->filename);
+  mrb_str_cat_lit(mrb, str, ":");
+  mrb_str_concat(mrb, str, mrb_fixnum_to_str(mrb, mrb_fixnum_value(loc->lineno), 10));
+
+  if (loc->method) {
+    mrb_str_cat_lit(mrb, str, ":in ");
+
+    if (loc->class_name) {
+      mrb_str_cat_cstr(mrb, str, loc->class_name);
+      mrb_str_cat_cstr(mrb, str, loc->sep);
+    }
+
+    mrb_str_cat_cstr(mrb, str, loc->method);
+  }
+
+  mrb_ary_push(mrb, ary, str);
+  mrb_gc_arena_restore(mrb, ai);
+}
+
+static void
+output_backtrace(mrb_state *mrb, mrb_int ciidx, mrb_code *pc0, output_stream_func func, void *data)
+{
+  int i;
+
+  if (ciidx >= mrb->c->ciend - mrb->c->cibase)
+    ciidx = 10; /* ciidx is broken... */
+
+  for (i = ciidx; i >= 0; i--) {
+    struct backtrace_location loc;
+    mrb_callinfo *ci;
+    mrb_irep *irep;
+    mrb_code *pc;
+
+    ci = &mrb->c->cibase[i];
+
+    if (!ci->proc) continue;
+    if (MRB_PROC_CFUNC_P(ci->proc)) continue;
+
+    irep = ci->proc->body.irep;
+
+    if (mrb->c->cibase[i].err) {
+      pc = mrb->c->cibase[i].err;
+    }
+    else if (i+1 <= ciidx) {
+      pc = mrb->c->cibase[i+1].pc - 1;
+    }
+    else {
+      pc = pc0;
+    }
+    loc.filename = mrb_debug_get_filename(irep, (uint32_t)(pc - irep->iseq));
+    loc.lineno = mrb_debug_get_line(irep, (uint32_t)(pc - irep->iseq));
+
+    if (loc.lineno == -1) continue;
+
+    if (ci->target_class == ci->proc->target_class) {
+      loc.sep = ".";
+    }
+    else {
+      loc.sep = "#";
+    }
+
+    if (!loc.filename) {
+      loc.filename = "(unknown)";
+    }
+
+    loc.method = mrb_sym2name(mrb, ci->mid);
+    loc.class_name = mrb_class_name(mrb, ci->proc->target_class);
+    loc.i = i;
+    func(mrb, &loc, data);
+  }
+}
+
+static void
+exc_output_backtrace(mrb_state *mrb, struct RObject *exc, output_stream_func func, void *stream)
+{
+  mrb_value lastpc;
+  mrb_code *code;
+
+  lastpc = mrb_obj_iv_get(mrb, exc, mrb_intern_lit(mrb, "lastpc"));
+  if (mrb_nil_p(lastpc)) {
+    code = NULL;
+  } else {
+    code = (mrb_code*)mrb_cptr(lastpc);
+  }
+
+  output_backtrace(mrb, mrb_fixnum(mrb_obj_iv_get(mrb, exc, mrb_intern_lit(mrb, "ciidx"))),
+                   code, func, stream);
+}
+
+/* mrb_print_backtrace/mrb_get_backtrace:
+
+   function to retrieve backtrace information from the exception.
+   note that if you call method after the exception, call stack will be
+   overwritten.  So invoke these functions just after detecting exceptions.
+*/
+
+#ifndef MRB_DISABLE_STDIO
+
+MRB_API void
+mrb_print_backtrace(mrb_state *mrb)
+{
+  struct print_backtrace_args args;
+
+  if (!mrb->exc || mrb_obj_is_kind_of(mrb, mrb_obj_value(mrb->exc), E_SYSSTACK_ERROR)) {
+    return;
+  }
+
+  args.stream = stderr;
+  args.tracehead = TRUE;
+  exc_output_backtrace(mrb, mrb->exc, print_backtrace_i, (void*)&args);
+}
+
+#else
+
+MRB_API void
+mrb_print_backtrace(mrb_state *mrb)
+{
+}
+
+#endif
+
+MRB_API mrb_value
+mrb_exc_backtrace(mrb_state *mrb, mrb_value self)
+{
+  mrb_value ary;
+
+  ary = mrb_ary_new(mrb);
+  exc_output_backtrace(mrb, mrb_obj_ptr(self), get_backtrace_i, (void*)mrb_ary_ptr(ary));
+
+  return ary;
+}
+
+MRB_API mrb_value
+mrb_get_backtrace(mrb_state *mrb)
+{
+  mrb_value ary;
+  mrb_callinfo *ci = mrb->c->ci;
+  mrb_code *pc = ci->pc;
+  mrb_int ciidx = (mrb_int)(ci - mrb->c->cibase - 1);
+
+  if (ciidx < 0) ciidx = 0;
+  ary = mrb_ary_new(mrb);
+  output_backtrace(mrb, ciidx, pc, get_backtrace_i, (void*)mrb_ary_ptr(ary));
+
+  return ary;
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/class.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/class.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/class.c	(revision 270)
@@ -0,0 +1,2278 @@
+/*
+** class.c - Class class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include <stdarg.h>
+#include "mruby.h"
+#include "mruby/array.h"
+#include "mruby/class.h"
+#include "mruby/numeric.h"
+#include "mruby/proc.h"
+#include "mruby/string.h"
+#include "mruby/variable.h"
+#include "mruby/error.h"
+#include "mruby/data.h"
+
+KHASH_DEFINE(mt, mrb_sym, struct RProc*, TRUE, kh_int_hash_func, kh_int_hash_equal)
+
+void
+mrb_gc_mark_mt(mrb_state *mrb, struct RClass *c)
+{
+  khiter_t k;
+  khash_t(mt) *h = c->mt;
+
+  if (!h) return;
+  for (k = kh_begin(h); k != kh_end(h); k++) {
+    if (kh_exist(h, k)) {
+      struct RProc *m = kh_value(h, k);
+      if (m) {
+        mrb_gc_mark(mrb, (struct RBasic*)m);
+      }
+    }
+  }
+}
+
+size_t
+mrb_gc_mark_mt_size(mrb_state *mrb, struct RClass *c)
+{
+  khash_t(mt) *h = c->mt;
+
+  if (!h) return 0;
+  return kh_size(h);
+}
+
+void
+mrb_gc_free_mt(mrb_state *mrb, struct RClass *c)
+{
+  kh_destroy(mt, mrb, c->mt);
+}
+
+static void
+name_class(mrb_state *mrb, struct RClass *c, mrb_sym name)
+{
+  mrb_obj_iv_set(mrb, (struct RObject*)c,
+                 mrb_intern_lit(mrb, "__classid__"), mrb_symbol_value(name));
+}
+
+static void
+setup_class(mrb_state *mrb, struct RClass *outer, struct RClass *c, mrb_sym id)
+{
+  name_class(mrb, c, id);
+  mrb_obj_iv_set(mrb, (struct RObject*)outer, id, mrb_obj_value(c));
+  if (outer != mrb->object_class) {
+    mrb_obj_iv_set(mrb, (struct RObject*)c, mrb_intern_lit(mrb, "__outer__"),
+                   mrb_obj_value(outer));
+  }
+}
+
+#define make_metaclass(mrb, c) prepare_singleton_class((mrb), (struct RBasic*)(c))
+
+static void
+prepare_singleton_class(mrb_state *mrb, struct RBasic *o)
+{
+  struct RClass *sc, *c;
+
+  if (o->c->tt == MRB_TT_SCLASS) return;
+  sc = (struct RClass*)mrb_obj_alloc(mrb, MRB_TT_SCLASS, mrb->class_class);
+  sc->mt = kh_init(mt, mrb);
+  sc->iv = 0;
+  if (o->tt == MRB_TT_CLASS) {
+    c = (struct RClass*)o;
+    if (!c->super) {
+      sc->super = mrb->class_class;
+    }
+    else {
+      sc->super = c->super->c;
+    }
+  }
+  else if (o->tt == MRB_TT_SCLASS) {
+    c = (struct RClass*)o;
+    while (c->super->tt == MRB_TT_ICLASS)
+      c = c->super;
+    make_metaclass(mrb, c->super);
+    sc->super = c->super->c;
+  }
+  else {
+    sc->super = o->c;
+  }
+  o->c = sc;
+  mrb_field_write_barrier(mrb, (struct RBasic*)o, (struct RBasic*)sc);
+  mrb_field_write_barrier(mrb, (struct RBasic*)sc, (struct RBasic*)o);
+  mrb_obj_iv_set(mrb, (struct RObject*)sc, mrb_intern_lit(mrb, "__attached__"), mrb_obj_value(o));
+}
+
+static struct RClass *
+class_from_sym(mrb_state *mrb, struct RClass *klass, mrb_sym id)
+{
+  mrb_value c = mrb_const_get(mrb, mrb_obj_value(klass), id);
+
+  mrb_check_type(mrb, c, MRB_TT_CLASS);
+  return mrb_class_ptr(c);
+}
+
+static struct RClass *
+module_from_sym(mrb_state *mrb, struct RClass *klass, mrb_sym id)
+{
+  mrb_value c = mrb_const_get(mrb, mrb_obj_value(klass), id);
+
+  mrb_check_type(mrb, c, MRB_TT_MODULE);
+  return mrb_class_ptr(c);
+}
+
+MRB_API struct RClass*
+mrb_class_outer_module(mrb_state *mrb, struct RClass *c)
+{
+  mrb_value outer;
+
+  outer = mrb_obj_iv_get(mrb, (struct RObject*)c, mrb_intern_lit(mrb, "__outer__"));
+  if (mrb_nil_p(outer)) return NULL;
+  return mrb_class_ptr(outer);
+}
+
+static void
+check_if_class_or_module(mrb_state *mrb, mrb_value obj)
+{
+  switch (mrb_type(obj)) {
+  case MRB_TT_CLASS:
+  case MRB_TT_SCLASS:
+  case MRB_TT_MODULE:
+    return;
+  default:
+    mrb_raisef(mrb, E_TYPE_ERROR, "%S is not a class/module", mrb_inspect(mrb, obj));
+  }
+}
+
+static struct RClass*
+define_module(mrb_state *mrb, mrb_sym name, struct RClass *outer)
+{
+  struct RClass *m;
+
+  if (mrb_const_defined_at(mrb, mrb_obj_value(outer), name)) {
+    return module_from_sym(mrb, outer, name);
+  }
+  m = mrb_module_new(mrb);
+  setup_class(mrb, outer, m, name);
+
+  return m;
+}
+
+MRB_API struct RClass*
+mrb_define_module_id(mrb_state *mrb, mrb_sym name)
+{
+  return define_module(mrb, name, mrb->object_class);
+}
+
+MRB_API struct RClass*
+mrb_define_module(mrb_state *mrb, const char *name)
+{
+  return define_module(mrb, mrb_intern_cstr(mrb, name), mrb->object_class);
+}
+
+MRB_API struct RClass*
+mrb_vm_define_module(mrb_state *mrb, mrb_value outer, mrb_sym id)
+{
+  check_if_class_or_module(mrb, outer);
+  return define_module(mrb, id, mrb_class_ptr(outer));
+}
+
+MRB_API struct RClass*
+mrb_define_module_under(mrb_state *mrb, struct RClass *outer, const char *name)
+{
+  mrb_sym id = mrb_intern_cstr(mrb, name);
+  struct RClass * c = define_module(mrb, id, outer);
+
+  setup_class(mrb, outer, c, id);
+  return c;
+}
+
+static struct RClass*
+find_origin(struct RClass *c)
+{
+  MRB_CLASS_ORIGIN(c);
+  return c;
+}
+
+static struct RClass*
+define_class(mrb_state *mrb, mrb_sym name, struct RClass *super, struct RClass *outer)
+{
+  struct RClass * c;
+
+  if (mrb_const_defined_at(mrb, mrb_obj_value(outer), name)) {
+    c = class_from_sym(mrb, outer, name);
+    MRB_CLASS_ORIGIN(c);
+    if (super && mrb_class_real(c->super) != super) {
+      mrb_raisef(mrb, E_TYPE_ERROR, "superclass mismatch for Class %S (%S not %S)",
+                 mrb_sym2str(mrb, name),
+                 mrb_obj_value(c->super), mrb_obj_value(super));
+    }
+    return c;
+  }
+
+  c = mrb_class_new(mrb, super);
+  setup_class(mrb, outer, c, name);
+
+  return c;
+}
+
+MRB_API struct RClass*
+mrb_define_class_id(mrb_state *mrb, mrb_sym name, struct RClass *super)
+{
+  if (!super) {
+    mrb_warn(mrb, "no super class for '%S', Object assumed", mrb_sym2str(mrb, name));
+  }
+  return define_class(mrb, name, super, mrb->object_class);
+}
+
+MRB_API struct RClass*
+mrb_define_class(mrb_state *mrb, const char *name, struct RClass *super)
+{
+  return mrb_define_class_id(mrb, mrb_intern_cstr(mrb, name), super);
+}
+
+static void
+mrb_class_inherited(mrb_state *mrb, struct RClass *super, struct RClass *klass)
+{
+  if (!super)
+    super = mrb->object_class;
+  mrb_funcall(mrb, mrb_obj_value(super), "inherited", 1, mrb_obj_value(klass));
+}
+
+MRB_API struct RClass*
+mrb_vm_define_class(mrb_state *mrb, mrb_value outer, mrb_value super, mrb_sym id)
+{
+  struct RClass *s;
+  struct RClass *c;
+
+  if (!mrb_nil_p(super)) {
+    if (mrb_type(super) != MRB_TT_CLASS) {
+      mrb_raisef(mrb, E_TYPE_ERROR, "superclass must be a Class (%S given)", super);
+    }
+    s = mrb_class_ptr(super);
+  }
+  else {
+    s = 0;
+  }
+  check_if_class_or_module(mrb, outer);
+  c = define_class(mrb, id, s, mrb_class_ptr(outer));
+  mrb_class_inherited(mrb, mrb_class_real(c->super), c);
+
+  return c;
+}
+
+MRB_API mrb_bool
+mrb_class_defined(mrb_state *mrb, const char *name)
+{
+  mrb_value sym = mrb_check_intern_cstr(mrb, name);
+  if (mrb_nil_p(sym)) {
+    return FALSE;
+  }
+  return mrb_const_defined(mrb, mrb_obj_value(mrb->object_class), mrb_symbol(sym));
+}
+
+MRB_API struct RClass *
+mrb_class_get_under(mrb_state *mrb, struct RClass *outer, const char *name)
+{
+  return class_from_sym(mrb, outer, mrb_intern_cstr(mrb, name));
+}
+
+MRB_API struct RClass *
+mrb_class_get(mrb_state *mrb, const char *name)
+{
+  return mrb_class_get_under(mrb, mrb->object_class, name);
+}
+
+MRB_API struct RClass *
+mrb_module_get_under(mrb_state *mrb, struct RClass *outer, const char *name)
+{
+  return module_from_sym(mrb, outer, mrb_intern_cstr(mrb, name));
+}
+
+MRB_API struct RClass *
+mrb_module_get(mrb_state *mrb, const char *name)
+{
+  return mrb_module_get_under(mrb, mrb->object_class, name);
+}
+
+/*!
+ * Defines a class under the namespace of \a outer.
+ * \param outer  a class which contains the new class.
+ * \param id     name of the new class
+ * \param super  a class from which the new class will derive.
+ *               NULL means \c Object class.
+ * \return the created class
+ * \throw TypeError if the constant name \a name is already taken but
+ *                  the constant is not a \c Class.
+ * \throw NameError if the class is already defined but the class can not
+ *                  be reopened because its superclass is not \a super.
+ * \post top-level constant named \a name refers the returned class.
+ *
+ * \note if a class named \a name is already defined and its superclass is
+ *       \a super, the function just returns the defined class.
+ */
+MRB_API struct RClass *
+mrb_define_class_under(mrb_state *mrb, struct RClass *outer, const char *name, struct RClass *super)
+{
+  mrb_sym id = mrb_intern_cstr(mrb, name);
+  struct RClass * c;
+
+#if 0
+  if (!super) {
+    mrb_warn(mrb, "no super class for '%S::%S', Object assumed",
+             mrb_obj_value(outer), mrb_sym2str(mrb, id));
+  }
+#endif
+  c = define_class(mrb, id, super, outer);
+  setup_class(mrb, outer, c, id);
+  return c;
+}
+
+MRB_API void
+mrb_define_method_raw(mrb_state *mrb, struct RClass *c, mrb_sym mid, struct RProc *p)
+{
+  khash_t(mt) *h;
+  khiter_t k;
+  MRB_CLASS_ORIGIN(c);
+  h = c->mt;
+
+  if (!h) h = c->mt = kh_init(mt, mrb);
+  k = kh_put(mt, mrb, h, mid);
+  kh_value(h, k) = p;
+  if (p) {
+    mrb_field_write_barrier(mrb, (struct RBasic *)c, (struct RBasic *)p);
+  }
+}
+
+MRB_API void
+mrb_define_method_id(mrb_state *mrb, struct RClass *c, mrb_sym mid, mrb_func_t func, mrb_aspec aspec)
+{
+  struct RProc *p;
+  int ai = mrb_gc_arena_save(mrb);
+
+  p = mrb_proc_new_cfunc(mrb, func);
+  p->target_class = c;
+  mrb_define_method_raw(mrb, c, mid, p);
+  mrb_gc_arena_restore(mrb, ai);
+}
+
+MRB_API void
+mrb_define_method(mrb_state *mrb, struct RClass *c, const char *name, mrb_func_t func, mrb_aspec aspec)
+{
+  mrb_define_method_id(mrb, c, mrb_intern_cstr(mrb, name), func, aspec);
+}
+
+/* a function to raise NotImplementedError with current method name */
+MRB_API void
+mrb_notimplement(mrb_state *mrb)
+{
+  const char *str;
+  mrb_int len;
+  mrb_callinfo *ci = mrb->c->ci;
+
+  if (ci->mid) {
+    str = mrb_sym2name_len(mrb, ci->mid, &len);
+    mrb_raisef(mrb, E_NOTIMP_ERROR,
+      "%S() function is unimplemented on this machine",
+      mrb_str_new_static(mrb, str, (size_t)len));
+  }
+}
+
+/* a function to be replacement of unimplemented method */
+MRB_API mrb_value
+mrb_notimplement_m(mrb_state *mrb, mrb_value self)
+{
+  mrb_notimplement(mrb);
+  /* not reached */
+  return mrb_nil_value();
+}
+
+static mrb_value
+check_type(mrb_state *mrb, mrb_value val, enum mrb_vtype t, const char *c, const char *m)
+{
+  mrb_value tmp;
+
+  tmp = mrb_check_convert_type(mrb, val, t, c, m);
+  if (mrb_nil_p(tmp)) {
+    mrb_raisef(mrb, E_TYPE_ERROR, "expected %S", mrb_str_new_cstr(mrb, c));
+  }
+  return tmp;
+}
+
+static mrb_value
+to_str(mrb_state *mrb, mrb_value val)
+{
+  return check_type(mrb, val, MRB_TT_STRING, "String", "to_str");
+}
+
+static mrb_value
+to_ary(mrb_state *mrb, mrb_value val)
+{
+  return check_type(mrb, val, MRB_TT_ARRAY, "Array", "to_ary");
+}
+
+static mrb_value
+to_hash(mrb_state *mrb, mrb_value val)
+{
+  return check_type(mrb, val, MRB_TT_HASH, "Hash", "to_hash");
+}
+
+static mrb_sym
+to_sym(mrb_state *mrb, mrb_value ss)
+{
+  if (mrb_type(ss) == MRB_TT_SYMBOL) {
+    return mrb_symbol(ss);
+  }
+  else if (mrb_string_p(ss)) {
+    return mrb_intern_str(mrb, to_str(mrb, ss));
+  }
+  else {
+    mrb_value obj = mrb_funcall(mrb, ss, "inspect", 0);
+    mrb_raisef(mrb, E_TYPE_ERROR, "%S is not a symbol", obj);
+  }
+}
+
+/*
+  retrieve arguments from mrb_state.
+
+  mrb_get_args(mrb, format, ...)
+
+  returns number of arguments parsed.
+
+  format specifiers:
+
+    string  mruby type     C type                 note
+    ----------------------------------------------------------------------------------------------
+    o:      Object         [mrb_value]
+    C:      class/module   [mrb_value]
+    S:      String         [mrb_value]            when ! follows, the value may be nil
+    A:      Array          [mrb_value]            when ! follows, the value may be nil
+    H:      Hash           [mrb_value]            when ! follows, the value may be nil
+    s:      String         [char*,mrb_int]        Receive two arguments; s! gives (NULL,0) for nil
+    z:      String         [char*]                NUL terminated string; z! gives NULL for nil
+    a:      Array          [mrb_value*,mrb_int]   Receive two arguments; a! gives (NULL,0) for nil
+    f:      Float          [mrb_float]
+    i:      Integer        [mrb_int]
+    b:      Boolean        [mrb_bool]
+    n:      Symbol         [mrb_sym]
+    d:      Data           [void*,mrb_data_type const] 2nd argument will be used to check data type so it won't be modified
+    &:      Block          [mrb_value]
+    *:      rest argument  [mrb_value*,mrb_int]   Receive the rest of the arguments as an array.
+    |:      optional                              Next argument of '|' and later are optional.
+    ?:      optional given [mrb_bool]             true if preceding argument (optional) is given.
+ */
+MRB_API mrb_int
+mrb_get_args(mrb_state *mrb, const char *format, ...)
+{
+  char c;
+  int i = 0;
+  mrb_value *sp = mrb->c->stack + 1;
+  va_list ap;
+  int argc = mrb->c->ci->argc;
+  mrb_bool opt = FALSE;
+  mrb_bool given = TRUE;
+
+  va_start(ap, format);
+  if (argc < 0) {
+    struct RArray *a = mrb_ary_ptr(mrb->c->stack[1]);
+
+    argc = a->len;
+    sp = a->ptr;
+  }
+  while ((c = *format++)) {
+    switch (c) {
+    case '|': case '*': case '&': case '?':
+      break;
+    default:
+      if (argc <= i) {
+        if (opt) {
+          given = FALSE;
+        }
+        else {
+          mrb_raise(mrb, E_ARGUMENT_ERROR, "wrong number of arguments");
+        }
+      }
+      break;
+    }
+
+    switch (c) {
+    case 'o':
+      {
+        mrb_value *p;
+
+        p = va_arg(ap, mrb_value*);
+        if (i < argc) {
+          *p = *sp++;
+          i++;
+        }
+      }
+      break;
+    case 'C':
+      {
+        mrb_value *p;
+
+        p = va_arg(ap, mrb_value*);
+        if (i < argc) {
+          mrb_value ss;
+
+          ss = *sp++;
+          switch (mrb_type(ss)) {
+          case MRB_TT_CLASS:
+          case MRB_TT_MODULE:
+          case MRB_TT_SCLASS:
+            break;
+          default:
+            mrb_raisef(mrb, E_TYPE_ERROR, "%S is not class/module", ss);
+            break;
+          }
+          *p = ss;
+          i++;
+        }
+      }
+      break;
+    case 'S':
+      {
+        mrb_value *p;
+
+        p = va_arg(ap, mrb_value*);
+        if (*format == '!') {
+          format++;
+          if (i < argc && mrb_nil_p(*sp)) {
+            *p = *sp++;
+            i++;
+            break;
+          }
+        }
+        if (i < argc) {
+          *p = to_str(mrb, *sp++);
+          i++;
+        }
+      }
+      break;
+    case 'A':
+      {
+        mrb_value *p;
+
+        p = va_arg(ap, mrb_value*);
+        if (*format == '!') {
+          format++;
+          if (i < argc && mrb_nil_p(*sp)) {
+            *p = *sp++;
+            i++;
+            break;
+          }
+        }
+        if (i < argc) {
+          *p = to_ary(mrb, *sp++);
+          i++;
+        }
+      }
+      break;
+    case 'H':
+      {
+        mrb_value *p;
+
+        p = va_arg(ap, mrb_value*);
+        if (*format == '!') {
+          format++;
+          if (i < argc && mrb_nil_p(*sp)) {
+            *p = *sp++;
+            i++;
+            break;
+          }
+        }
+        if (i < argc) {
+          *p = to_hash(mrb, *sp++);
+          i++;
+        }
+      }
+      break;
+    case 's':
+      {
+        mrb_value ss;
+        char **ps = 0;
+        mrb_int *pl = 0;
+
+        ps = va_arg(ap, char**);
+        pl = va_arg(ap, mrb_int*);
+        if (*format == '!') {
+          format++;
+          if (i < argc && mrb_nil_p(*sp)) {
+            *ps = NULL;
+            *pl = 0;
+            i++;
+            break;
+          }
+        }
+        if (i < argc) {
+          ss = to_str(mrb, *sp++);
+          *ps = RSTRING_PTR(ss);
+          *pl = RSTRING_LEN(ss);
+          i++;
+        }
+      }
+      break;
+    case 'z':
+      {
+        mrb_value ss;
+        const char **ps;
+
+        ps = va_arg(ap, const char**);
+        if (*format == '!') {
+          format++;
+          if (i < argc && mrb_nil_p(*sp)) {
+            *ps = NULL;
+            i++; sp++;
+            break;
+          }
+        }
+        if (i < argc) {
+          ss = to_str(mrb, *sp++);
+          *ps = mrb_string_value_cstr(mrb, &ss);
+          i++;
+        }
+      }
+      break;
+    case 'a':
+      {
+        mrb_value aa;
+        struct RArray *a;
+        mrb_value **pb;
+        mrb_int *pl;
+
+        pb = va_arg(ap, mrb_value**);
+        pl = va_arg(ap, mrb_int*);
+        if (*format == '!') {
+          format++;
+          if (i < argc && mrb_nil_p(*sp)) {
+            *pb = 0;
+            *pl = 0;
+            i++; sp++;
+            break;
+          }
+        }
+        if (i < argc) {
+          aa = to_ary(mrb, *sp++);
+          a = mrb_ary_ptr(aa);
+          *pb = a->ptr;
+          *pl = a->len;
+          i++;
+        }
+      }
+      break;
+    case 'f':
+      {
+        mrb_float *p;
+
+        p = va_arg(ap, mrb_float*);
+        if (i < argc) {
+          *p = mrb_to_flo(mrb, *sp);
+          sp++;
+          i++;
+        }
+      }
+      break;
+    case 'i':
+      {
+        mrb_int *p;
+
+        p = va_arg(ap, mrb_int*);
+        if (i < argc) {
+          switch (mrb_type(*sp)) {
+            case MRB_TT_FIXNUM:
+              *p = mrb_fixnum(*sp);
+              break;
+            case MRB_TT_FLOAT:
+              {
+                mrb_float f = mrb_float(*sp);
+
+                if (!FIXABLE(f)) {
+                  mrb_raise(mrb, E_RANGE_ERROR, "float too big for int");
+                }
+                *p = (mrb_int)f;
+              }
+              break;
+            case MRB_TT_STRING:
+              mrb_raise(mrb, E_TYPE_ERROR, "no implicit conversion of String into Integer");
+              break;
+            default:
+              *p = mrb_fixnum(mrb_Integer(mrb, *sp));
+              break;
+          }
+          sp++;
+          i++;
+        }
+      }
+      break;
+    case 'b':
+      {
+        mrb_bool *boolp = va_arg(ap, mrb_bool*);
+
+        if (i < argc) {
+          mrb_value b = *sp++;
+          *boolp = mrb_test(b);
+          i++;
+        }
+      }
+      break;
+    case 'n':
+      {
+        mrb_sym *symp;
+
+        symp = va_arg(ap, mrb_sym*);
+        if (i < argc) {
+          mrb_value ss;
+
+          ss = *sp++;
+          *symp = to_sym(mrb, ss);
+          i++;
+        }
+      }
+      break;
+    case 'd':
+      {
+        void** datap;
+        struct mrb_data_type const* type;
+
+        datap = va_arg(ap, void**);
+        type = va_arg(ap, struct mrb_data_type const*);
+        if (*format == '!') {
+          format++;
+          if (i < argc && mrb_nil_p(*sp)) {
+            *datap = 0;
+            i++; sp++;
+            break;
+          }
+        }
+        if (i < argc) {
+          *datap = mrb_data_get_ptr(mrb, *sp++, type);
+          ++i;
+        }
+      }
+      break;
+
+    case '&':
+      {
+        mrb_value *p, *bp;
+
+        p = va_arg(ap, mrb_value*);
+        if (mrb->c->ci->argc < 0) {
+          bp = mrb->c->stack + 2;
+        }
+        else {
+          bp = mrb->c->stack + mrb->c->ci->argc + 1;
+        }
+        *p = *bp;
+      }
+      break;
+    case '|':
+      opt = TRUE;
+      break;
+    case '?':
+      {
+        mrb_bool *p;
+
+        p = va_arg(ap, mrb_bool*);
+        *p = given;
+      }
+      break;
+
+    case '*':
+      {
+        mrb_value **var;
+        mrb_int *pl;
+
+        var = va_arg(ap, mrb_value**);
+        pl = va_arg(ap, mrb_int*);
+        if (argc > i) {
+          *pl = argc-i;
+          if (*pl > 0) {
+            *var = sp;
+          }
+          i = argc;
+          sp += *pl;
+        }
+        else {
+          *pl = 0;
+          *var = NULL;
+        }
+      }
+      break;
+    default:
+      mrb_raisef(mrb, E_ARGUMENT_ERROR, "invalid argument specifier %S", mrb_str_new(mrb, &c, 1));
+      break;
+    }
+  }
+  if (!c && argc > i) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "wrong number of arguments");
+  }
+  va_end(ap);
+  return i;
+}
+
+static struct RClass*
+boot_defclass(mrb_state *mrb, struct RClass *super)
+{
+  struct RClass *c;
+
+  c = (struct RClass*)mrb_obj_alloc(mrb, MRB_TT_CLASS, mrb->class_class);
+  if (super) {
+    c->super = super;
+    mrb_field_write_barrier(mrb, (struct RBasic*)c, (struct RBasic*)super);
+  }
+  else {
+    c->super = mrb->object_class;
+  }
+  c->mt = kh_init(mt, mrb);
+  return c;
+}
+
+static void
+boot_initmod(mrb_state *mrb, struct RClass *mod)
+{
+  mod->mt = kh_init(mt, mrb);
+}
+
+static struct RClass*
+include_class_new(mrb_state *mrb, struct RClass *m, struct RClass *super)
+{
+  struct RClass *ic = (struct RClass*)mrb_obj_alloc(mrb, MRB_TT_ICLASS, mrb->class_class);
+  if (m->tt == MRB_TT_ICLASS) {
+    m = m->c;
+  }
+  MRB_CLASS_ORIGIN(m);
+  ic->iv = m->iv;
+  ic->mt = m->mt;
+  ic->super = super;
+  if (m->tt == MRB_TT_ICLASS) {
+    ic->c = m->c;
+  } else {
+    ic->c = m;
+  }
+  return ic;
+}
+
+static int
+include_module_at(mrb_state *mrb, struct RClass *c, struct RClass *ins_pos, struct RClass *m, int search_super)
+{
+  struct RClass *p, *ic;
+  void *klass_mt = find_origin(c)->mt;
+
+  while (m) {
+    int superclass_seen = 0;
+
+    if (m->flags & MRB_FLAG_IS_PREPENDED)
+      goto skip;
+
+    if (klass_mt && klass_mt == m->mt)
+      return -1;
+
+    p = c->super;
+    while(p) {
+      if (p->tt == MRB_TT_ICLASS) {
+        if (p->mt == m->mt) {
+          if (!superclass_seen) {
+            ins_pos = p; // move insert point
+          }
+          goto skip;
+        }
+      } else if (p->tt == MRB_TT_CLASS) {
+        if (!search_super) break;
+        superclass_seen = 1;
+      }
+      p = p->super;
+    }
+
+    ic = include_class_new(mrb, m, ins_pos->super);
+    ins_pos->super = ic;
+    mrb_field_write_barrier(mrb, (struct RBasic*)ins_pos, (struct RBasic*)ins_pos->super);
+    ins_pos = ic;
+  skip:
+    m = m->super;
+  }
+  return 0;
+}
+
+MRB_API void
+mrb_include_module(mrb_state *mrb, struct RClass *c, struct RClass *m)
+{
+  int changed = include_module_at(mrb, c, find_origin(c), m, 1);
+  if (changed < 0) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "cyclic include detected");
+  }
+}
+
+MRB_API void
+mrb_prepend_module(mrb_state *mrb, struct RClass *c, struct RClass *m)
+{
+  struct RClass *origin;
+  int changed = 0;
+
+  if (!(c->flags & MRB_FLAG_IS_PREPENDED)) {
+    origin = (struct RClass*)mrb_obj_alloc(mrb, MRB_TT_ICLASS, c);
+    origin->flags |= MRB_FLAG_IS_ORIGIN;
+    origin->super = c->super;
+    c->super = origin;
+    origin->mt = c->mt;
+    c->mt = kh_init(mt, mrb);
+    mrb_field_write_barrier(mrb, (struct RBasic*)c, (struct RBasic*)origin);
+    c->flags |= MRB_FLAG_IS_PREPENDED;
+  }
+  changed = include_module_at(mrb, c, c, m, 0);
+  if (changed < 0) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "cyclic prepend detected");
+  }
+}
+
+static mrb_value
+mrb_mod_prepend_features(mrb_state *mrb, mrb_value mod)
+{
+  mrb_value klass;
+
+  mrb_check_type(mrb, mod, MRB_TT_MODULE);
+  mrb_get_args(mrb, "C", &klass);
+  mrb_prepend_module(mrb, mrb_class_ptr(klass), mrb_class_ptr(mod));
+  return mod;
+}
+
+static mrb_value
+mrb_mod_prepend(mrb_state *mrb, mrb_value klass)
+{
+  mrb_value *argv;
+  mrb_int argc, i;
+
+  mrb_get_args(mrb, "*", &argv, &argc);
+  for (i=0; i<argc; i++) {
+    mrb_check_type(mrb, argv[i], MRB_TT_MODULE);
+  }
+  while (argc--) {
+    mrb_funcall(mrb, argv[argc], "prepend_features", 1, klass);
+    mrb_funcall(mrb, argv[argc], "prepended", 1, klass);
+  }
+
+  return klass;
+}
+
+static mrb_value
+mrb_mod_append_features(mrb_state *mrb, mrb_value mod)
+{
+  mrb_value klass;
+
+  mrb_check_type(mrb, mod, MRB_TT_MODULE);
+  mrb_get_args(mrb, "C", &klass);
+  mrb_include_module(mrb, mrb_class_ptr(klass), mrb_class_ptr(mod));
+  return mod;
+}
+
+static mrb_value
+mrb_mod_include(mrb_state *mrb, mrb_value klass)
+{
+  mrb_value *argv;
+  mrb_int argc, i;
+
+  mrb_get_args(mrb, "*", &argv, &argc);
+  for (i=0; i<argc; i++) {
+    mrb_check_type(mrb, argv[i], MRB_TT_MODULE);
+  }
+  while (argc--) {
+    mrb_funcall(mrb, argv[argc], "append_features", 1, klass);
+    mrb_funcall(mrb, argv[argc], "included", 1, klass);
+  }
+
+  return klass;
+}
+
+/* 15.2.2.4.28 */
+/*
+ *  call-seq:
+ *     mod.include?(module)    -> true or false
+ *
+ *  Returns <code>true</code> if <i>module</i> is included in
+ *  <i>mod</i> or one of <i>mod</i>'s ancestors.
+ *
+ *     module A
+ *     end
+ *     class B
+ *       include A
+ *     end
+ *     class C < B
+ *     end
+ *     B.include?(A)   #=> true
+ *     C.include?(A)   #=> true
+ *     A.include?(A)   #=> false
+ */
+static mrb_value
+mrb_mod_include_p(mrb_state *mrb, mrb_value mod)
+{
+  mrb_value mod2;
+  struct RClass *c = mrb_class_ptr(mod);
+
+  mrb_get_args(mrb, "C", &mod2);
+  mrb_check_type(mrb, mod2, MRB_TT_MODULE);
+
+  while (c) {
+    if (c->tt == MRB_TT_ICLASS) {
+      if (c->c == mrb_class_ptr(mod2)) return mrb_true_value();
+    }
+    c = c->super;
+  }
+  return mrb_false_value();
+}
+
+static mrb_value
+mrb_mod_ancestors(mrb_state *mrb, mrb_value self)
+{
+  mrb_value result;
+  struct RClass *c = mrb_class_ptr(self);
+  result = mrb_ary_new(mrb);
+  while (c) {
+    if (c->tt == MRB_TT_ICLASS) {
+      mrb_ary_push(mrb, result, mrb_obj_value(c->c));
+    }
+    else if (!(c->flags & MRB_FLAG_IS_PREPENDED)) {
+      mrb_ary_push(mrb, result, mrb_obj_value(c));
+    }
+    c = c->super;
+  }
+
+  return result;
+}
+
+static mrb_value
+mrb_mod_extend_object(mrb_state *mrb, mrb_value mod)
+{
+  mrb_value obj;
+
+  mrb_check_type(mrb, mod, MRB_TT_MODULE);
+  mrb_get_args(mrb, "o", &obj);
+  mrb_include_module(mrb, mrb_class_ptr(mrb_singleton_class(mrb, obj)), mrb_class_ptr(mod));
+  return mod;
+}
+
+static mrb_value
+mrb_mod_included_modules(mrb_state *mrb, mrb_value self)
+{
+  mrb_value result;
+  struct RClass *c = mrb_class_ptr(self);
+  struct RClass *origin = c;
+
+  MRB_CLASS_ORIGIN(origin);
+  result = mrb_ary_new(mrb);
+  while (c) {
+    if (c != origin && c->tt == MRB_TT_ICLASS) {
+      if (c->c->tt == MRB_TT_MODULE) {
+        mrb_ary_push(mrb, result, mrb_obj_value(c->c));
+      }
+    }
+    c = c->super;
+  }
+
+  return result;
+}
+
+static mrb_value
+mrb_mod_initialize(mrb_state *mrb, mrb_value mod)
+{
+  mrb_value b;
+  struct RClass *m = mrb_class_ptr(mod);
+  boot_initmod(mrb, m); // bootstrap a newly initialized module
+  mrb_get_args(mrb, "|&", &b);
+  if (!mrb_nil_p(b)) {
+    mrb_yield_with_class(mrb, b, 1, &mod, mod, m);
+  }
+  return mod;
+}
+
+mrb_value mrb_class_instance_method_list(mrb_state*, mrb_bool, struct RClass*, int);
+
+/* 15.2.2.4.33 */
+/*
+ *  call-seq:
+ *     mod.instance_methods(include_super=true)   -> array
+ *
+ *  Returns an array containing the names of the public and protected instance
+ *  methods in the receiver. For a module, these are the public and protected methods;
+ *  for a class, they are the instance (not singleton) methods. With no
+ *  argument, or with an argument that is <code>false</code>, the
+ *  instance methods in <i>mod</i> are returned, otherwise the methods
+ *  in <i>mod</i> and <i>mod</i>'s superclasses are returned.
+ *
+ *     module A
+ *       def method1()  end
+ *     end
+ *     class B
+ *       def method2()  end
+ *     end
+ *     class C < B
+ *       def method3()  end
+ *     end
+ *
+ *     A.instance_methods                #=> [:method1]
+ *     B.instance_methods(false)         #=> [:method2]
+ *     C.instance_methods(false)         #=> [:method3]
+ *     C.instance_methods(true).length   #=> 43
+ */
+
+static mrb_value
+mrb_mod_instance_methods(mrb_state *mrb, mrb_value mod)
+{
+  struct RClass *c = mrb_class_ptr(mod);
+  mrb_bool recur = TRUE;
+  mrb_get_args(mrb, "|b", &recur);
+  return mrb_class_instance_method_list(mrb, recur, c, 0);
+}
+
+/* implementation of module_eval/class_eval */
+mrb_value mrb_mod_module_eval(mrb_state*, mrb_value);
+
+static mrb_value
+mrb_mod_dummy_visibility(mrb_state *mrb, mrb_value mod)
+{
+  return mod;
+}
+
+MRB_API mrb_value
+mrb_singleton_class(mrb_state *mrb, mrb_value v)
+{
+  struct RBasic *obj;
+
+  switch (mrb_type(v)) {
+  case MRB_TT_FALSE:
+    if (mrb_nil_p(v))
+      return mrb_obj_value(mrb->nil_class);
+    return mrb_obj_value(mrb->false_class);
+  case MRB_TT_TRUE:
+    return mrb_obj_value(mrb->true_class);
+  case MRB_TT_CPTR:
+    return mrb_obj_value(mrb->object_class);
+  case MRB_TT_SYMBOL:
+  case MRB_TT_FIXNUM:
+  case MRB_TT_FLOAT:
+    mrb_raise(mrb, E_TYPE_ERROR, "can't define singleton");
+    return mrb_nil_value();    /* not reached */
+  default:
+    break;
+  }
+  obj = mrb_basic_ptr(v);
+  prepare_singleton_class(mrb, obj);
+  if (mrb->c && mrb->c->ci && mrb->c->ci->target_class) {
+    mrb_obj_iv_set(mrb, (struct RObject*)obj->c, mrb_intern_lit(mrb, "__outer__"),
+                   mrb_obj_value(mrb->c->ci->target_class));
+  }
+  return mrb_obj_value(obj->c);
+}
+
+MRB_API void
+mrb_define_singleton_method(mrb_state *mrb, struct RObject *o, const char *name, mrb_func_t func, mrb_aspec aspec)
+{
+  prepare_singleton_class(mrb, (struct RBasic*)o);
+  mrb_define_method_id(mrb, o->c, mrb_intern_cstr(mrb, name), func, aspec);
+}
+
+MRB_API void
+mrb_define_class_method(mrb_state *mrb, struct RClass *c, const char *name, mrb_func_t func, mrb_aspec aspec)
+{
+  mrb_define_singleton_method(mrb, (struct RObject*)c, name, func, aspec);
+}
+
+MRB_API void
+mrb_define_module_function(mrb_state *mrb, struct RClass *c, const char *name, mrb_func_t func, mrb_aspec aspec)
+{
+  mrb_define_class_method(mrb, c, name, func, aspec);
+  mrb_define_method(mrb, c, name, func, aspec);
+}
+
+MRB_API struct RProc*
+mrb_method_search_vm(mrb_state *mrb, struct RClass **cp, mrb_sym mid)
+{
+  khiter_t k;
+  struct RProc *m;
+  struct RClass *c = *cp;
+
+  while (c) {
+    khash_t(mt) *h = c->mt;
+
+    if (h) {
+      k = kh_get(mt, mrb, h, mid);
+      if (k != kh_end(h)) {
+        m = kh_value(h, k);
+        if (!m) break;
+        *cp = c;
+        return m;
+      }
+    }
+    c = c->super;
+  }
+  return NULL;                  /* no method */
+}
+
+MRB_API struct RProc*
+mrb_method_search(mrb_state *mrb, struct RClass* c, mrb_sym mid)
+{
+  struct RProc *m;
+
+  m = mrb_method_search_vm(mrb, &c, mid);
+  if (!m) {
+    mrb_value inspect = mrb_funcall(mrb, mrb_obj_value(c), "inspect", 0);
+    if (mrb_string_p(inspect) && RSTRING_LEN(inspect) > 64) {
+      inspect = mrb_any_to_s(mrb, mrb_obj_value(c));
+    }
+    mrb_name_error(mrb, mid, "undefined method '%S' for class %S",
+               mrb_sym2str(mrb, mid), inspect);
+  }
+  return m;
+}
+
+static mrb_value
+attr_reader(mrb_state *mrb, mrb_value obj)
+{
+  mrb_value name = mrb_proc_cfunc_env_get(mrb, 0);
+  return mrb_iv_get(mrb, obj, to_sym(mrb, name));
+}
+
+static mrb_value
+mrb_mod_attr_reader(mrb_state *mrb, mrb_value mod)
+{
+  struct RClass *c = mrb_class_ptr(mod);
+  mrb_value *argv;
+  mrb_int argc, i;
+  int ai;
+
+  mrb_get_args(mrb, "*", &argv, &argc);
+  ai = mrb_gc_arena_save(mrb);
+  for (i=0; i<argc; i++) {
+    mrb_value name, str;
+    mrb_sym method, sym;
+
+    method = to_sym(mrb, argv[i]);
+    name = mrb_sym2str(mrb, method);
+    str = mrb_str_buf_new(mrb, RSTRING_LEN(name)+1);
+    mrb_str_cat_lit(mrb, str, "@");
+    mrb_str_cat_str(mrb, str, name);
+    sym = mrb_intern_str(mrb, str);
+    mrb_iv_check(mrb, sym);
+    name = mrb_symbol_value(sym);
+    mrb_define_method_raw(mrb, c, method,
+                          mrb_proc_new_cfunc_with_env(mrb, attr_reader, 1, &name));
+    mrb_gc_arena_restore(mrb, ai);
+  }
+  return mrb_nil_value();
+}
+
+static mrb_value
+attr_writer(mrb_state *mrb, mrb_value obj)
+{
+  mrb_value name = mrb_proc_cfunc_env_get(mrb, 0);
+  mrb_value val;
+
+  mrb_get_args(mrb, "o", &val);
+  mrb_iv_set(mrb, obj, to_sym(mrb, name), val);
+  return val;
+}
+
+static mrb_value
+mrb_mod_attr_writer(mrb_state *mrb, mrb_value mod)
+{
+  struct RClass *c = mrb_class_ptr(mod);
+  mrb_value *argv;
+  mrb_int argc, i;
+  int ai;
+
+  mrb_get_args(mrb, "*", &argv, &argc);
+  ai = mrb_gc_arena_save(mrb);
+  for (i=0; i<argc; i++) {
+    mrb_value name, str, attr;
+    mrb_sym method, sym;
+
+    method = to_sym(mrb, argv[i]);
+
+    /* prepare iv name (@name) */
+    name = mrb_sym2str(mrb, method);
+    str = mrb_str_buf_new(mrb, RSTRING_LEN(name)+1);
+    mrb_str_cat_lit(mrb, str, "@");
+    mrb_str_cat_str(mrb, str, name);
+    sym = mrb_intern_str(mrb, str);
+    mrb_iv_check(mrb, sym);
+    attr = mrb_symbol_value(sym);
+
+    /* prepare method name (name=) */
+    str = mrb_str_buf_new(mrb, RSTRING_LEN(str));
+    mrb_str_cat_str(mrb, str, name);
+    mrb_str_cat_lit(mrb, str, "=");
+    method = mrb_intern_str(mrb, str);
+
+    mrb_define_method_raw(mrb, c, method,
+                          mrb_proc_new_cfunc_with_env(mrb, attr_writer, 1, &attr));
+    mrb_gc_arena_restore(mrb, ai);
+  }
+  return mrb_nil_value();
+}
+
+static mrb_value
+mrb_instance_alloc(mrb_state *mrb, mrb_value cv)
+{
+  struct RClass *c = mrb_class_ptr(cv);
+  struct RObject *o;
+  enum mrb_vtype ttype = MRB_INSTANCE_TT(c);
+
+  if (c->tt == MRB_TT_SCLASS)
+    mrb_raise(mrb, E_TYPE_ERROR, "can't create instance of singleton class");
+
+  if (ttype == 0) ttype = MRB_TT_OBJECT;
+  o = (struct RObject*)mrb_obj_alloc(mrb, ttype, c);
+  return mrb_obj_value(o);
+}
+
+/*
+ *  call-seq:
+ *     class.new(args, ...)    ->  obj
+ *
+ *  Creates a new object of <i>class</i>'s class, then
+ *  invokes that object's <code>initialize</code> method,
+ *  passing it <i>args</i>. This is the method that ends
+ *  up getting called whenever an object is constructed using
+ *  `.new`.
+ *
+ */
+
+MRB_API mrb_value
+mrb_instance_new(mrb_state *mrb, mrb_value cv)
+{
+  mrb_value obj, blk;
+  mrb_value *argv;
+  mrb_int argc;
+
+  mrb_get_args(mrb, "*&", &argv, &argc, &blk);
+  obj = mrb_instance_alloc(mrb, cv);
+  mrb_funcall_with_block(mrb, obj, mrb_intern_lit(mrb, "initialize"), argc, argv, blk);
+
+  return obj;
+}
+
+MRB_API mrb_value
+mrb_obj_new(mrb_state *mrb, struct RClass *c, mrb_int argc, const mrb_value *argv)
+{
+  mrb_value obj;
+
+  obj = mrb_instance_alloc(mrb, mrb_obj_value(c));
+  mrb_funcall_argv(mrb, obj, mrb_intern_lit(mrb, "initialize"), argc, argv);
+
+  return obj;
+}
+
+static mrb_value
+mrb_class_initialize(mrb_state *mrb, mrb_value c)
+{
+  mrb_value a, b;
+
+  mrb_get_args(mrb, "|C&", &a, &b);
+  if (!mrb_nil_p(b)) {
+    mrb_yield_with_class(mrb, b, 1, &c, c, mrb_class_ptr(c));
+  }
+  return c;
+}
+
+static mrb_value
+mrb_class_new_class(mrb_state *mrb, mrb_value cv)
+{
+  mrb_int n;
+  mrb_value super, blk;
+  mrb_value new_class;
+
+  n = mrb_get_args(mrb, "|C&", &super, &blk);
+  if (n == 0) {
+    super = mrb_obj_value(mrb->object_class);
+  }
+  new_class = mrb_obj_value(mrb_class_new(mrb, mrb_class_ptr(super)));
+  mrb_funcall_with_block(mrb, new_class, mrb_intern_lit(mrb, "initialize"), n, &super, blk);
+  mrb_class_inherited(mrb, mrb_class_ptr(super), mrb_class_ptr(new_class));
+  return new_class;
+}
+
+static mrb_value
+mrb_class_superclass(mrb_state *mrb, mrb_value klass)
+{
+  struct RClass *c;
+
+  c = mrb_class_ptr(klass);
+  c = find_origin(c)->super;
+  while (c && c->tt == MRB_TT_ICLASS) {
+    c = find_origin(c)->super;
+  }
+  if (!c) return mrb_nil_value();
+  return mrb_obj_value(c);
+}
+
+static mrb_value
+mrb_bob_init(mrb_state *mrb, mrb_value cv)
+{
+  return mrb_nil_value();
+}
+
+static mrb_value
+mrb_bob_not(mrb_state *mrb, mrb_value cv)
+{
+  return mrb_bool_value(!mrb_test(cv));
+}
+
+void
+mrb_method_missing(mrb_state *mrb, mrb_sym name, mrb_value self, mrb_value args)
+{
+  mrb_sym inspect;
+  mrb_value repr;
+
+  inspect = mrb_intern_lit(mrb, "inspect");
+  if (mrb->c->ci > mrb->c->cibase && mrb->c->ci[-1].mid == inspect) {
+    /* method missing in inspect; avoid recursion */
+    repr = mrb_any_to_s(mrb, self);
+  }
+  else if (mrb_respond_to(mrb, self, inspect) && mrb->c->ci - mrb->c->cibase < 64) {
+    repr = mrb_funcall_argv(mrb, self, inspect, 0, 0);
+    if (mrb_string_p(repr) && RSTRING_LEN(repr) > 64) {
+      repr = mrb_any_to_s(mrb, self);
+    }
+  }
+  else {
+    repr = mrb_any_to_s(mrb, self);
+  }
+
+  mrb_no_method_error(mrb, name, args, "undefined method '%S' for %S",
+                      mrb_sym2str(mrb, name), repr);
+}
+
+/* 15.3.1.3.30 */
+/*
+ *  call-seq:
+ *     obj.method_missing(symbol [, *args] )   -> result
+ *
+ *  Invoked by Ruby when <i>obj</i> is sent a message it cannot handle.
+ *  <i>symbol</i> is the symbol for the method called, and <i>args</i>
+ *  are any arguments that were passed to it. By default, the interpreter
+ *  raises an error when this method is called. However, it is possible
+ *  to override the method to provide more dynamic behavior.
+ *  If it is decided that a particular method should not be handled, then
+ *  <i>super</i> should be called, so that ancestors can pick up the
+ *  missing method.
+ *  The example below creates
+ *  a class <code>Roman</code>, which responds to methods with names
+ *  consisting of roman numerals, returning the corresponding integer
+ *  values.
+ *
+ *     class Roman
+ *       def romanToInt(str)
+ *         # ...
+ *       end
+ *       def method_missing(methId)
+ *         str = methId.id2name
+ *         romanToInt(str)
+ *       end
+ *     end
+ *
+ *     r = Roman.new
+ *     r.iv      #=> 4
+ *     r.xxiii   #=> 23
+ *     r.mm      #=> 2000
+ */
+static mrb_value
+mrb_bob_missing(mrb_state *mrb, mrb_value mod)
+{
+  mrb_sym name;
+  mrb_value *a;
+  mrb_int alen;
+
+  mrb_get_args(mrb, "n*", &name, &a, &alen);
+  mrb_method_missing(mrb, name, mod, mrb_ary_new_from_values(mrb, alen, a));
+  /* not reached */
+  return mrb_nil_value();
+}
+
+MRB_API mrb_bool
+mrb_obj_respond_to(mrb_state *mrb, struct RClass* c, mrb_sym mid)
+{
+  khiter_t k;
+
+  while (c) {
+    khash_t(mt) *h = c->mt;
+
+    if (h) {
+      k = kh_get(mt, mrb, h, mid);
+      if (k != kh_end(h)) {
+        if (kh_value(h, k)) {
+          return TRUE;  /* method exists */
+        }
+        else {
+          return FALSE; /* undefined method */
+        }
+      }
+    }
+    c = c->super;
+  }
+  return FALSE;         /* no method */
+}
+
+MRB_API mrb_bool
+mrb_respond_to(mrb_state *mrb, mrb_value obj, mrb_sym mid)
+{
+  return mrb_obj_respond_to(mrb, mrb_class(mrb, obj), mid);
+}
+
+MRB_API mrb_value
+mrb_class_path(mrb_state *mrb, struct RClass *c)
+{
+  mrb_value path;
+  const char *name;
+  mrb_sym classpath = mrb_intern_lit(mrb, "__classpath__");
+
+  path = mrb_obj_iv_get(mrb, (struct RObject*)c, classpath);
+  if (mrb_nil_p(path)) {
+    struct RClass *outer = mrb_class_outer_module(mrb, c);
+    mrb_sym sym = mrb_class_sym(mrb, c, outer);
+    mrb_int len;
+
+    if (sym == 0) {
+      return mrb_nil_value();
+    }
+    else if (outer && outer != mrb->object_class) {
+      mrb_value base = mrb_class_path(mrb, outer);
+      path = mrb_str_buf_new(mrb, 0);
+      if (mrb_nil_p(base)) {
+        mrb_str_cat_lit(mrb, path, "#<Class:");
+        mrb_str_concat(mrb, path, mrb_ptr_to_str(mrb, outer));
+        mrb_str_cat_lit(mrb, path, ">");
+      }
+      else {
+        mrb_str_concat(mrb, path, base);
+      }
+      mrb_str_cat_lit(mrb, path, "::");
+      name = mrb_sym2name_len(mrb, sym, &len);
+      mrb_str_cat(mrb, path, name, len);
+    }
+    else {
+      name = mrb_sym2name_len(mrb, sym, &len);
+      path = mrb_str_new(mrb, name, len);
+    }
+    mrb_obj_iv_set(mrb, (struct RObject*)c, classpath, path);
+  }
+  return path;
+}
+
+MRB_API struct RClass *
+mrb_class_real(struct RClass* cl)
+{
+  if (cl == 0)
+    return NULL;
+  while ((cl->tt == MRB_TT_SCLASS) || (cl->tt == MRB_TT_ICLASS)) {
+    cl = cl->super;
+  }
+  return cl;
+}
+
+MRB_API const char*
+mrb_class_name(mrb_state *mrb, struct RClass* c)
+{
+  mrb_value path = mrb_class_path(mrb, c);
+  if (mrb_nil_p(path)) {
+    path = mrb_str_new_lit(mrb, "#<Class:");
+    mrb_str_concat(mrb, path, mrb_ptr_to_str(mrb, c));
+    mrb_str_cat_lit(mrb, path, ">");
+  }
+  return RSTRING_PTR(path);
+}
+
+MRB_API const char*
+mrb_obj_classname(mrb_state *mrb, mrb_value obj)
+{
+  return mrb_class_name(mrb, mrb_obj_class(mrb, obj));
+}
+
+/*!
+ * Ensures a class can be derived from super.
+ *
+ * \param super a reference to an object.
+ * \exception TypeError if \a super is not a Class or \a super is a singleton class.
+ */
+static void
+mrb_check_inheritable(mrb_state *mrb, struct RClass *super)
+{
+  if (super->tt != MRB_TT_CLASS) {
+    mrb_raisef(mrb, E_TYPE_ERROR, "superclass must be a Class (%S given)", mrb_obj_value(super));
+  }
+  if (super->tt == MRB_TT_SCLASS) {
+    mrb_raise(mrb, E_TYPE_ERROR, "can't make subclass of singleton class");
+  }
+  if (super == mrb->class_class) {
+    mrb_raise(mrb, E_TYPE_ERROR, "can't make subclass of Class");
+  }
+}
+
+/*!
+ * Creates a new class.
+ * \param super     a class from which the new class derives.
+ * \exception TypeError \a super is not inheritable.
+ * \exception TypeError \a super is the Class class.
+ */
+MRB_API struct RClass*
+mrb_class_new(mrb_state *mrb, struct RClass *super)
+{
+  struct RClass *c;
+
+  if (super) {
+    mrb_check_inheritable(mrb, super);
+  }
+  c = boot_defclass(mrb, super);
+  if (super) {
+    MRB_SET_INSTANCE_TT(c, MRB_INSTANCE_TT(super));
+  }
+  make_metaclass(mrb, c);
+
+  return c;
+}
+
+/*!
+ * Creates a new module.
+ */
+MRB_API struct RClass*
+mrb_module_new(mrb_state *mrb)
+{
+  struct RClass *m = (struct RClass*)mrb_obj_alloc(mrb, MRB_TT_MODULE, mrb->module_class);
+  boot_initmod(mrb, m);
+  return m;
+}
+
+/*
+ *  call-seq:
+ *     obj.class    => class
+ *
+ *  Returns the class of <i>obj</i>, now preferred over
+ *  <code>Object#type</code>, as an object's type in Ruby is only
+ *  loosely tied to that object's class. This method must always be
+ *  called with an explicit receiver, as <code>class</code> is also a
+ *  reserved word in Ruby.
+ *
+ *     1.class      #=> Fixnum
+ *     self.class   #=> Object
+ */
+
+MRB_API struct RClass*
+mrb_obj_class(mrb_state *mrb, mrb_value obj)
+{
+  return mrb_class_real(mrb_class(mrb, obj));
+}
+
+MRB_API void
+mrb_alias_method(mrb_state *mrb, struct RClass *c, mrb_sym a, mrb_sym b)
+{
+  struct RProc *m = mrb_method_search(mrb, c, b);
+
+  mrb_define_method_raw(mrb, c, a, m);
+}
+
+/*!
+ * Defines an alias of a method.
+ * \param klass  the class which the original method belongs to
+ * \param name1  a new name for the method
+ * \param name2  the original name of the method
+ */
+MRB_API void
+mrb_define_alias(mrb_state *mrb, struct RClass *klass, const char *name1, const char *name2)
+{
+  mrb_alias_method(mrb, klass, mrb_intern_cstr(mrb, name1), mrb_intern_cstr(mrb, name2));
+}
+
+/*
+ * call-seq:
+ *   mod.to_s   -> string
+ *
+ * Return a string representing this module or class. For basic
+ * classes and modules, this is the name. For singletons, we
+ * show information on the thing we're attached to as well.
+ */
+
+static mrb_value
+mrb_mod_to_s(mrb_state *mrb, mrb_value klass)
+{
+  mrb_value str;
+
+  if (mrb_type(klass) == MRB_TT_SCLASS) {
+    mrb_value v = mrb_iv_get(mrb, klass, mrb_intern_lit(mrb, "__attached__"));
+
+    str = mrb_str_new_lit(mrb, "#<Class:");
+
+    switch (mrb_type(v)) {
+      case MRB_TT_CLASS:
+      case MRB_TT_MODULE:
+      case MRB_TT_SCLASS:
+        mrb_str_cat_str(mrb, str, mrb_inspect(mrb, v));
+        break;
+      default:
+        mrb_str_cat_str(mrb, str, mrb_any_to_s(mrb, v));
+        break;
+    }
+    return mrb_str_cat_lit(mrb, str, ">");
+  }
+  else {
+    struct RClass *c;
+    mrb_value path;
+
+    str = mrb_str_buf_new(mrb, 32);
+    c = mrb_class_ptr(klass);
+    path = mrb_class_path(mrb, c);
+
+    if (mrb_nil_p(path)) {
+      switch (mrb_type(klass)) {
+        case MRB_TT_CLASS:
+          mrb_str_cat_lit(mrb, str, "#<Class:");
+          break;
+
+        case MRB_TT_MODULE:
+          mrb_str_cat_lit(mrb, str, "#<Module:");
+          break;
+
+        default:
+          /* Shouldn't be happened? */
+          mrb_str_cat_lit(mrb, str, "#<??????:");
+          break;
+      }
+      mrb_str_concat(mrb, str, mrb_ptr_to_str(mrb, c));
+      return mrb_str_cat_lit(mrb, str, ">");
+    }
+    else {
+      return path;
+    }
+  }
+}
+
+static mrb_value
+mrb_mod_alias(mrb_state *mrb, mrb_value mod)
+{
+  struct RClass *c = mrb_class_ptr(mod);
+  mrb_sym new_name, old_name;
+
+  mrb_get_args(mrb, "nn", &new_name, &old_name);
+  mrb_alias_method(mrb, c, new_name, old_name);
+  return mrb_nil_value();
+}
+
+static void
+undef_method(mrb_state *mrb, struct RClass *c, mrb_sym a)
+{
+  if (!mrb_obj_respond_to(mrb, c, a)) {
+    mrb_name_error(mrb, a, "undefined method '%S' for class '%S'", mrb_sym2str(mrb, a), mrb_obj_value(c));
+  }
+  else {
+    mrb_define_method_raw(mrb, c, a, NULL);
+  }
+}
+
+MRB_API void
+mrb_undef_method(mrb_state *mrb, struct RClass *c, const char *name)
+{
+  undef_method(mrb, c, mrb_intern_cstr(mrb, name));
+}
+
+MRB_API void
+mrb_undef_class_method(mrb_state *mrb, struct RClass *c, const char *name)
+{
+  mrb_undef_method(mrb,  mrb_class_ptr(mrb_singleton_class(mrb, mrb_obj_value(c))), name);
+}
+
+static mrb_value
+mrb_mod_undef(mrb_state *mrb, mrb_value mod)
+{
+  struct RClass *c = mrb_class_ptr(mod);
+  mrb_int argc;
+  mrb_value *argv;
+
+  mrb_get_args(mrb, "*", &argv, &argc);
+  while (argc--) {
+    undef_method(mrb, c, mrb_symbol(*argv));
+    argv++;
+  }
+  return mrb_nil_value();
+}
+
+static mrb_value
+mod_define_method(mrb_state *mrb, mrb_value self)
+{
+  struct RClass *c = mrb_class_ptr(self);
+  struct RProc *p;
+  mrb_sym mid;
+  mrb_value blk;
+
+  mrb_get_args(mrb, "n&", &mid, &blk);
+  if (mrb_nil_p(blk)) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "no block given");
+  }
+  p = (struct RProc*)mrb_obj_alloc(mrb, MRB_TT_PROC, mrb->proc_class);
+  mrb_proc_copy(p, mrb_proc_ptr(blk));
+  p->flags |= MRB_PROC_STRICT;
+  mrb_define_method_raw(mrb, c, mid, p);
+  return mrb_symbol_value(mid);
+}
+
+static void
+check_cv_name_str(mrb_state *mrb, mrb_value str)
+{
+  const char *s = RSTRING_PTR(str);
+  mrb_int len = RSTRING_LEN(str);
+
+  if (len < 3 || !(s[0] == '@' && s[1] == '@')) {
+    mrb_name_error(mrb, mrb_intern_str(mrb, str), "'%S' is not allowed as a class variable name", str);
+  }
+}
+
+static void
+check_cv_name_sym(mrb_state *mrb, mrb_sym id)
+{
+  check_cv_name_str(mrb, mrb_sym2str(mrb, id));
+}
+
+/* 15.2.2.4.16 */
+/*
+ *  call-seq:
+ *     obj.class_variable_defined?(symbol)    -> true or false
+ *
+ *  Returns <code>true</code> if the given class variable is defined
+ *  in <i>obj</i>.
+ *
+ *     class Fred
+ *       @@foo = 99
+ *     end
+ *     Fred.class_variable_defined?(:@@foo)    #=> true
+ *     Fred.class_variable_defined?(:@@bar)    #=> false
+ */
+
+static mrb_value
+mrb_mod_cvar_defined(mrb_state *mrb, mrb_value mod)
+{
+  mrb_sym id;
+
+  mrb_get_args(mrb, "n", &id);
+  check_cv_name_sym(mrb, id);
+  return mrb_bool_value(mrb_cv_defined(mrb, mod, id));
+}
+
+/* 15.2.2.4.17 */
+/*
+ *  call-seq:
+ *     mod.class_variable_get(symbol)    -> obj
+ *
+ *  Returns the value of the given class variable (or throws a
+ *  <code>NameError</code> exception). The <code>@@</code> part of the
+ *  variable name should be included for regular class variables
+ *
+ *     class Fred
+ *       @@foo = 99
+ *     end
+ *     Fred.class_variable_get(:@@foo)     #=> 99
+ */
+
+static mrb_value
+mrb_mod_cvar_get(mrb_state *mrb, mrb_value mod)
+{
+  mrb_sym id;
+
+  mrb_get_args(mrb, "n", &id);
+  check_cv_name_sym(mrb, id);
+  return mrb_cv_get(mrb, mod, id);
+}
+
+/* 15.2.2.4.18 */
+/*
+ *  call-seq:
+ *     obj.class_variable_set(symbol, obj)    -> obj
+ *
+ *  Sets the class variable names by <i>symbol</i> to
+ *  <i>object</i>.
+ *
+ *     class Fred
+ *       @@foo = 99
+ *       def foo
+ *         @@foo
+ *       end
+ *     end
+ *     Fred.class_variable_set(:@@foo, 101)     #=> 101
+ *     Fred.new.foo                             #=> 101
+ */
+
+static mrb_value
+mrb_mod_cvar_set(mrb_state *mrb, mrb_value mod)
+{
+  mrb_value value;
+  mrb_sym id;
+
+  mrb_get_args(mrb, "no", &id, &value);
+  check_cv_name_sym(mrb, id);
+  mrb_cv_set(mrb, mod, id, value);
+  return value;
+}
+
+/* 15.2.2.4.39 */
+/*
+ *  call-seq:
+ *     remove_class_variable(sym)    -> obj
+ *
+ *  Removes the definition of the <i>sym</i>, returning that
+ *  constant's value.
+ *
+ *     class Dummy
+ *       @@var = 99
+ *       puts @@var
+ *       p class_variables
+ *       remove_class_variable(:@@var)
+ *       p class_variables
+ *     end
+ *
+ *  <em>produces:</em>
+ *
+ *     99
+ *     [:@@var]
+ *     []
+ */
+
+static mrb_value
+mrb_mod_remove_cvar(mrb_state *mrb, mrb_value mod)
+{
+  mrb_value val;
+  mrb_sym id;
+
+  mrb_get_args(mrb, "n", &id);
+  check_cv_name_sym(mrb, id);
+
+  val = mrb_iv_remove(mrb, mod, id);
+  if (!mrb_undef_p(val)) return val;
+
+  if (mrb_cv_defined(mrb, mod, id)) {
+    mrb_name_error(mrb, id, "cannot remove %S for %S",
+                   mrb_sym2str(mrb, id), mod);
+  }
+
+  mrb_name_error(mrb, id, "class variable %S not defined for %S",
+                 mrb_sym2str(mrb, id), mod);
+
+ /* not reached */
+ return mrb_nil_value();
+}
+
+/* 15.2.2.4.34 */
+/*
+ *  call-seq:
+ *     mod.method_defined?(symbol)    -> true or false
+ *
+ *  Returns +true+ if the named method is defined by
+ *  _mod_ (or its included modules and, if _mod_ is a class,
+ *  its ancestors). Public and protected methods are matched.
+ *
+ *     module A
+ *       def method1()  end
+ *     end
+ *     class B
+ *       def method2()  end
+ *     end
+ *     class C < B
+ *       include A
+ *       def method3()  end
+ *     end
+ *
+ *     A.method_defined? :method1    #=> true
+ *     C.method_defined? "method1"   #=> true
+ *     C.method_defined? "method2"   #=> true
+ *     C.method_defined? "method3"   #=> true
+ *     C.method_defined? "method4"   #=> false
+ */
+
+static mrb_value
+mrb_mod_method_defined(mrb_state *mrb, mrb_value mod)
+{
+  mrb_sym id;
+
+  mrb_get_args(mrb, "n", &id);
+  return mrb_bool_value(mrb_obj_respond_to(mrb, mrb_class_ptr(mod), id));
+}
+
+static void
+remove_method(mrb_state *mrb, mrb_value mod, mrb_sym mid)
+{
+  struct RClass *c = mrb_class_ptr(mod);
+  khash_t(mt) *h = find_origin(c)->mt;
+  khiter_t k;
+
+  if (h) {
+    k = kh_get(mt, mrb, h, mid);
+    if (k != kh_end(h)) {
+      kh_del(mt, mrb, h, k);
+      mrb_funcall(mrb, mod, "method_removed", 1, mrb_symbol_value(mid));
+      return;
+    }
+  }
+
+  mrb_name_error(mrb, mid, "method '%S' not defined in %S",
+    mrb_sym2str(mrb, mid), mod);
+}
+
+/* 15.2.2.4.41 */
+/*
+ *  call-seq:
+ *     remove_method(symbol)   -> self
+ *
+ *  Removes the method identified by _symbol_ from the current
+ *  class. For an example, see <code>Module.undef_method</code>.
+ */
+
+static mrb_value
+mrb_mod_remove_method(mrb_state *mrb, mrb_value mod)
+{
+  mrb_int argc;
+  mrb_value *argv;
+
+  mrb_get_args(mrb, "*", &argv, &argc);
+  while (argc--) {
+    remove_method(mrb, mod, mrb_symbol(*argv));
+    argv++;
+  }
+  return mod;
+}
+
+
+
+static void
+check_const_name_str(mrb_state *mrb, mrb_value str)
+{
+  if (RSTRING_LEN(str) < 1 || !ISUPPER(*RSTRING_PTR(str))) {
+    mrb_name_error(mrb, mrb_intern_str(mrb, str), "wrong constant name %S", str);
+  }
+}
+
+static void
+check_const_name_sym(mrb_state *mrb, mrb_sym id)
+{
+  check_const_name_str(mrb, mrb_sym2str(mrb, id));
+}
+
+static mrb_value
+const_defined(mrb_state *mrb, mrb_value mod, mrb_sym id, mrb_bool inherit)
+{
+  if (inherit) {
+    return mrb_bool_value(mrb_const_defined(mrb, mod, id));
+  }
+  return mrb_bool_value(mrb_const_defined_at(mrb, mod, id));
+}
+
+static mrb_value
+mrb_mod_const_defined(mrb_state *mrb, mrb_value mod)
+{
+  mrb_sym id;
+  mrb_bool inherit = TRUE;
+
+  mrb_get_args(mrb, "n|b", &id, &inherit);
+  check_const_name_sym(mrb, id);
+  return const_defined(mrb, mod, id, inherit);
+}
+
+static mrb_value
+mrb_mod_const_get(mrb_state *mrb, mrb_value mod)
+{
+  mrb_sym id;
+
+  mrb_get_args(mrb, "n", &id);
+  check_const_name_sym(mrb, id);
+  return mrb_const_get(mrb, mod, id);
+}
+
+static mrb_value
+mrb_mod_const_set(mrb_state *mrb, mrb_value mod)
+{
+  mrb_sym id;
+  mrb_value value;
+
+  mrb_get_args(mrb, "no", &id, &value);
+  check_const_name_sym(mrb, id);
+  mrb_const_set(mrb, mod, id, value);
+  return value;
+}
+
+static mrb_value
+mrb_mod_remove_const(mrb_state *mrb, mrb_value mod)
+{
+  mrb_sym id;
+  mrb_value val;
+
+  mrb_get_args(mrb, "n", &id);
+  check_const_name_sym(mrb, id);
+  val = mrb_iv_remove(mrb, mod, id);
+  if (mrb_undef_p(val)) {
+    mrb_name_error(mrb, id, "constant %S not defined", mrb_sym2str(mrb, id));
+  }
+  return val;
+}
+
+static mrb_value
+mrb_mod_const_missing(mrb_state *mrb, mrb_value mod)
+{
+  mrb_sym sym;
+
+  mrb_get_args(mrb, "n", &sym);
+
+  if (mrb_class_real(mrb_class_ptr(mod)) != mrb->object_class) {
+    mrb_name_error(mrb, sym, "uninitialized constant %S::%S",
+                   mod,
+                   mrb_sym2str(mrb, sym));
+  }
+  else {
+    mrb_name_error(mrb, sym, "uninitialized constant %S",
+                   mrb_sym2str(mrb, sym));
+  }
+  /* not reached */
+  return mrb_nil_value();
+}
+
+static mrb_value
+mrb_mod_s_constants(mrb_state *mrb, mrb_value mod)
+{
+  mrb_raise(mrb, E_NOTIMP_ERROR, "Module.constants not implemented");
+  return mrb_nil_value();       /* not reached */
+}
+
+static mrb_value
+mrb_mod_eqq(mrb_state *mrb, mrb_value mod)
+{
+  mrb_value obj;
+  mrb_bool eqq;
+
+  mrb_get_args(mrb, "o", &obj);
+  eqq = mrb_obj_is_kind_of(mrb, obj, mrb_class_ptr(mod));
+
+  return mrb_bool_value(eqq);
+}
+
+MRB_API mrb_value
+mrb_mod_module_function(mrb_state *mrb, mrb_value mod)
+{
+  mrb_value *argv;
+  mrb_int argc, i;
+  mrb_sym mid;
+  struct RProc *method_rproc;
+  struct RClass *rclass;
+  int ai;
+
+  mrb_check_type(mrb, mod, MRB_TT_MODULE);
+
+  mrb_get_args(mrb, "*", &argv, &argc);
+  if(argc == 0) {
+    /* set MODFUNC SCOPE if implemented */
+    return mod;
+  }
+
+  /* set PRIVATE method visibility if implemented */
+  /* mrb_mod_dummy_visibility(mrb, mod); */
+
+  for (i=0; i<argc; i++) {
+    mrb_check_type(mrb, argv[i], MRB_TT_SYMBOL);
+
+    mid = mrb_symbol(argv[i]);
+    rclass = mrb_class_ptr(mod);
+    method_rproc = mrb_method_search(mrb, rclass, mid);
+
+    prepare_singleton_class(mrb, (struct RBasic*)rclass);
+    ai = mrb_gc_arena_save(mrb);
+    mrb_define_method_raw(mrb, rclass->c, mid, method_rproc);
+    mrb_gc_arena_restore(mrb, ai);
+  }
+
+  return mod;
+}
+
+void
+mrb_init_class(mrb_state *mrb)
+{
+  struct RClass *bob;           /* BasicObject */
+  struct RClass *obj;           /* Object */
+  struct RClass *mod;           /* Module */
+  struct RClass *cls;           /* Class */
+
+  /* boot class hierarchy */
+  bob = boot_defclass(mrb, 0);
+  obj = boot_defclass(mrb, bob); mrb->object_class = obj;
+  mod = boot_defclass(mrb, obj); mrb->module_class = mod;/* obj -> mod */
+  cls = boot_defclass(mrb, mod); mrb->class_class = cls; /* obj -> cls */
+  /* fix-up loose ends */
+  bob->c = obj->c = mod->c = cls->c = cls;
+  make_metaclass(mrb, bob);
+  make_metaclass(mrb, obj);
+  make_metaclass(mrb, mod);
+  make_metaclass(mrb, cls);
+
+  /* name basic classes */
+  mrb_define_const(mrb, bob, "BasicObject", mrb_obj_value(bob));
+  mrb_define_const(mrb, obj, "BasicObject", mrb_obj_value(bob));
+  mrb_define_const(mrb, obj, "Object",      mrb_obj_value(obj));
+  mrb_define_const(mrb, obj, "Module",      mrb_obj_value(mod));
+  mrb_define_const(mrb, obj, "Class",       mrb_obj_value(cls));
+
+  /* name each classes */
+  name_class(mrb, bob, mrb_intern_lit(mrb, "BasicObject"));
+  name_class(mrb, obj, mrb_intern_lit(mrb, "Object"));           /* 15.2.1 */
+  name_class(mrb, mod, mrb_intern_lit(mrb, "Module"));           /* 15.2.2 */
+  name_class(mrb, cls, mrb_intern_lit(mrb, "Class"));            /* 15.2.3 */
+
+  mrb->proc_class = mrb_define_class(mrb, "Proc", mrb->object_class);  /* 15.2.17 */
+  MRB_SET_INSTANCE_TT(mrb->proc_class, MRB_TT_PROC);
+
+  MRB_SET_INSTANCE_TT(cls, MRB_TT_CLASS);
+  mrb_define_method(mrb, bob, "initialize",              mrb_bob_init,             MRB_ARGS_NONE());
+  mrb_define_method(mrb, bob, "!",                       mrb_bob_not,              MRB_ARGS_NONE());
+  mrb_define_method(mrb, bob, "method_missing",          mrb_bob_missing,          MRB_ARGS_ANY());  /* 15.3.1.3.30 */
+
+  mrb_define_class_method(mrb, cls, "new",               mrb_class_new_class,      MRB_ARGS_OPT(1));
+  mrb_define_method(mrb, cls, "superclass",              mrb_class_superclass,     MRB_ARGS_NONE()); /* 15.2.3.3.4 */
+  mrb_define_method(mrb, cls, "new",                     mrb_instance_new,         MRB_ARGS_ANY());  /* 15.2.3.3.3 */
+  mrb_define_method(mrb, cls, "initialize",              mrb_class_initialize,     MRB_ARGS_OPT(1)); /* 15.2.3.3.1 */
+  mrb_define_method(mrb, cls, "inherited",               mrb_bob_init,             MRB_ARGS_REQ(1));
+
+  MRB_SET_INSTANCE_TT(mod, MRB_TT_MODULE);
+  mrb_define_method(mrb, mod, "class_variable_defined?", mrb_mod_cvar_defined,     MRB_ARGS_REQ(1)); /* 15.2.2.4.16 */
+  mrb_define_method(mrb, mod, "class_variable_get",      mrb_mod_cvar_get,         MRB_ARGS_REQ(1)); /* 15.2.2.4.17 */
+  mrb_define_method(mrb, mod, "class_variable_set",      mrb_mod_cvar_set,         MRB_ARGS_REQ(2)); /* 15.2.2.4.18 */
+  mrb_define_method(mrb, mod, "extend_object",           mrb_mod_extend_object,    MRB_ARGS_REQ(1)); /* 15.2.2.4.25 */
+  mrb_define_method(mrb, mod, "extended",                mrb_bob_init,             MRB_ARGS_REQ(1)); /* 15.2.2.4.26 */
+  mrb_define_method(mrb, mod, "prepend",                 mrb_mod_prepend,          MRB_ARGS_ANY());
+  mrb_define_method(mrb, mod, "prepended",               mrb_bob_init,             MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, mod, "prepend_features",        mrb_mod_prepend_features, MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, mod, "include",                 mrb_mod_include,          MRB_ARGS_ANY());  /* 15.2.2.4.27 */
+  mrb_define_method(mrb, mod, "include?",                mrb_mod_include_p,        MRB_ARGS_REQ(1)); /* 15.2.2.4.28 */
+  mrb_define_method(mrb, mod, "append_features",         mrb_mod_append_features,  MRB_ARGS_REQ(1)); /* 15.2.2.4.10 */
+  mrb_define_method(mrb, mod, "class_eval",              mrb_mod_module_eval,      MRB_ARGS_ANY());  /* 15.2.2.4.15 */
+  mrb_define_method(mrb, mod, "included",                mrb_bob_init,             MRB_ARGS_REQ(1)); /* 15.2.2.4.29 */
+  mrb_define_method(mrb, mod, "included_modules",        mrb_mod_included_modules, MRB_ARGS_NONE()); /* 15.2.2.4.30 */
+  mrb_define_method(mrb, mod, "initialize",              mrb_mod_initialize,       MRB_ARGS_NONE()); /* 15.2.2.4.31 */
+  mrb_define_method(mrb, mod, "instance_methods",        mrb_mod_instance_methods, MRB_ARGS_ANY());  /* 15.2.2.4.33 */
+  mrb_define_method(mrb, mod, "method_defined?",         mrb_mod_method_defined,   MRB_ARGS_REQ(1)); /* 15.2.2.4.34 */
+  mrb_define_method(mrb, mod, "module_eval",             mrb_mod_module_eval,      MRB_ARGS_ANY());  /* 15.2.2.4.35 */
+  mrb_define_method(mrb, mod, "module_function",         mrb_mod_module_function,  MRB_ARGS_ANY());
+  mrb_define_method(mrb, mod, "private",                 mrb_mod_dummy_visibility, MRB_ARGS_ANY());  /* 15.2.2.4.36 */
+  mrb_define_method(mrb, mod, "protected",               mrb_mod_dummy_visibility, MRB_ARGS_ANY());  /* 15.2.2.4.37 */
+  mrb_define_method(mrb, mod, "public",                  mrb_mod_dummy_visibility, MRB_ARGS_ANY());  /* 15.2.2.4.38 */
+  mrb_define_method(mrb, mod, "remove_class_variable",   mrb_mod_remove_cvar,      MRB_ARGS_REQ(1)); /* 15.2.2.4.39 */
+  mrb_define_method(mrb, mod, "remove_method",           mrb_mod_remove_method,    MRB_ARGS_ANY());  /* 15.2.2.4.41 */
+  mrb_define_method(mrb, mod, "method_removed",          mrb_bob_init,             MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, mod, "attr_reader",             mrb_mod_attr_reader,      MRB_ARGS_ANY());  /* 15.2.2.4.13 */
+  mrb_define_method(mrb, mod, "attr_writer",             mrb_mod_attr_writer,      MRB_ARGS_ANY());  /* 15.2.2.4.14 */
+  mrb_define_method(mrb, mod, "to_s",                    mrb_mod_to_s,             MRB_ARGS_NONE());
+  mrb_define_method(mrb, mod, "inspect",                 mrb_mod_to_s,             MRB_ARGS_NONE());
+  mrb_define_method(mrb, mod, "alias_method",            mrb_mod_alias,            MRB_ARGS_ANY());  /* 15.2.2.4.8 */
+  mrb_define_method(mrb, mod, "ancestors",               mrb_mod_ancestors,        MRB_ARGS_NONE()); /* 15.2.2.4.9 */
+  mrb_define_method(mrb, mod, "undef_method",            mrb_mod_undef,            MRB_ARGS_ANY());  /* 15.2.2.4.41 */
+  mrb_define_method(mrb, mod, "const_defined?",          mrb_mod_const_defined,    MRB_ARGS_ARG(1,1)); /* 15.2.2.4.20 */
+  mrb_define_method(mrb, mod, "const_get",               mrb_mod_const_get,        MRB_ARGS_REQ(1)); /* 15.2.2.4.21 */
+  mrb_define_method(mrb, mod, "const_set",               mrb_mod_const_set,        MRB_ARGS_REQ(2)); /* 15.2.2.4.23 */
+  mrb_define_method(mrb, mod, "constants",               mrb_mod_constants,        MRB_ARGS_OPT(1)); /* 15.2.2.4.24 */
+  mrb_define_method(mrb, mod, "remove_const",            mrb_mod_remove_const,     MRB_ARGS_REQ(1)); /* 15.2.2.4.40 */
+  mrb_define_method(mrb, mod, "const_missing",           mrb_mod_const_missing,    MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, mod, "define_method",           mod_define_method,        MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, mod, "class_variables",         mrb_mod_class_variables,  MRB_ARGS_NONE()); /* 15.2.2.4.19 */
+  mrb_define_method(mrb, mod, "===",                     mrb_mod_eqq,              MRB_ARGS_REQ(1));
+  mrb_define_class_method(mrb, mod, "constants",         mrb_mod_s_constants,      MRB_ARGS_ANY());  /* 15.2.2.3.1 */
+
+  mrb_undef_method(mrb, cls, "append_features");
+  mrb_undef_method(mrb, cls, "extend_object");
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/codedump.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/codedump.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/codedump.c	(revision 270)
@@ -0,0 +1,453 @@
+#include "mruby.h"
+#include "mruby/irep.h"
+#include "mruby/debug.h"
+#include "mruby/opcode.h"
+#include "mruby/string.h"
+#include "mruby/proc.h"
+
+#ifndef MRB_DISABLE_STDIO
+static int
+print_r(mrb_state *mrb, mrb_irep *irep, size_t n, int pre)
+{
+  size_t i;
+
+  if (n == 0) return 0;
+
+  for (i=0; i+1<irep->nlocals; i++) {
+    if (irep->lv[i].r == n) {
+      mrb_sym sym = irep->lv[i].name;
+      if (pre) printf(" ");
+      printf("R%d:%s", (int)n, mrb_sym2name(mrb, sym));
+      return 1;
+    }
+  }
+  return 0;
+}
+
+#define RA  1
+#define RB  2
+#define RAB 3
+
+static void
+print_lv(mrb_state *mrb, mrb_irep *irep, mrb_code c, int r)
+{
+  int pre = 0;
+
+  if (!irep->lv
+      || ((!(r & RA) || GETARG_A(c) >= irep->nlocals)
+       && (!(r & RB) || GETARG_B(c) >= irep->nlocals))) {
+    printf("\n");
+    return;
+  }
+  printf("\t; ");
+  if (r & RA) {
+    pre = print_r(mrb, irep, GETARG_A(c), 0);
+  }
+  if (r & RB) {
+    print_r(mrb, irep, GETARG_B(c), pre);
+  }
+  printf("\n");
+}
+#endif
+
+static void
+codedump(mrb_state *mrb, mrb_irep *irep)
+{
+#ifndef MRB_DISABLE_STDIO
+  int i;
+  int ai;
+  mrb_code c;
+  const char *file = NULL, *next_file;
+  int32_t line;
+
+  if (!irep) return;
+  printf("irep %p nregs=%d nlocals=%d pools=%d syms=%d reps=%d\n", (void*)irep,
+         irep->nregs, irep->nlocals, (int)irep->plen, (int)irep->slen, (int)irep->rlen);
+
+  for (i = 0; i < (int)irep->ilen; i++) {
+    ai = mrb_gc_arena_save(mrb);
+
+    next_file = mrb_debug_get_filename(irep, i);
+    if (next_file && file != next_file) {
+      printf("file: %s\n", next_file);
+      file = next_file;
+    }
+    line = mrb_debug_get_line(irep, i);
+    if (line < 0) {
+      printf("      ");
+    }
+    else {
+      printf("%5d ", line);
+    }
+
+    printf("%03d ", i);
+    c = irep->iseq[i];
+    switch (GET_OPCODE(c)) {
+    case OP_NOP:
+      printf("OP_NOP\n");
+      break;
+    case OP_MOVE:
+      printf("OP_MOVE\tR%d\tR%d\t", GETARG_A(c), GETARG_B(c));
+      print_lv(mrb, irep, c, RAB);
+      break;
+    case OP_LOADL:
+      {
+        mrb_value v = irep->pool[GETARG_Bx(c)];
+        mrb_value s = mrb_inspect(mrb, v);
+        printf("OP_LOADL\tR%d\tL(%d)\t; %s", GETARG_A(c), GETARG_Bx(c), RSTRING_PTR(s));
+      }
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_LOADI:
+      printf("OP_LOADI\tR%d\t%d\t", GETARG_A(c), GETARG_sBx(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_LOADSYM:
+      printf("OP_LOADSYM\tR%d\t:%s", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_Bx(c)]));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_LOADNIL:
+      printf("OP_LOADNIL\tR%d\t\t", GETARG_A(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_LOADSELF:
+      printf("OP_LOADSELF\tR%d\t\t", GETARG_A(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_LOADT:
+      printf("OP_LOADT\tR%d\t\t", GETARG_A(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_LOADF:
+      printf("OP_LOADF\tR%d\t\t", GETARG_A(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_GETGLOBAL:
+      printf("OP_GETGLOBAL\tR%d\t:%s", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_Bx(c)]));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_SETGLOBAL:
+      printf("OP_SETGLOBAL\t:%s\tR%d\t",
+             mrb_sym2name(mrb, irep->syms[GETARG_Bx(c)]),
+             GETARG_A(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_GETCONST:
+      printf("OP_GETCONST\tR%d\t:%s", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_Bx(c)]));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_SETCONST:
+      printf("OP_SETCONST\t:%s\tR%d\t",
+             mrb_sym2name(mrb, irep->syms[GETARG_Bx(c)]),
+             GETARG_A(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_GETMCNST:
+      printf("OP_GETMCNST\tR%d\tR%d::%s", GETARG_A(c), GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_Bx(c)]));
+      print_lv(mrb, irep, c, RAB);
+      break;
+    case OP_SETMCNST:
+      printf("OP_SETMCNST\tR%d::%s\tR%d", GETARG_A(c)+1,
+             mrb_sym2name(mrb, irep->syms[GETARG_Bx(c)]),
+             GETARG_A(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_GETIV:
+      printf("OP_GETIV\tR%d\t%s", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_Bx(c)]));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_SETIV:
+      printf("OP_SETIV\t%s\tR%d",
+             mrb_sym2name(mrb, irep->syms[GETARG_Bx(c)]),
+             GETARG_A(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_GETUPVAR:
+      printf("OP_GETUPVAR\tR%d\t%d\t%d",
+             GETARG_A(c), GETARG_B(c), GETARG_C(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_SETUPVAR:
+      printf("OP_SETUPVAR\tR%d\t%d\t%d",
+             GETARG_A(c), GETARG_B(c), GETARG_C(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_GETCV:
+      printf("OP_GETCV\tR%d\t%s", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_Bx(c)]));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_SETCV:
+      printf("OP_SETCV\t%s\tR%d",
+             mrb_sym2name(mrb, irep->syms[GETARG_Bx(c)]),
+             GETARG_A(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_JMP:
+      printf("OP_JMP\t%03d\n", i+GETARG_sBx(c));
+      break;
+    case OP_JMPIF:
+      printf("OP_JMPIF\tR%d\t%03d\n", GETARG_A(c), i+GETARG_sBx(c));
+      break;
+    case OP_JMPNOT:
+      printf("OP_JMPNOT\tR%d\t%03d\n", GETARG_A(c), i+GETARG_sBx(c));
+      break;
+    case OP_SEND:
+      printf("OP_SEND\tR%d\t:%s\t%d\n", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_B(c)]),
+             GETARG_C(c));
+      break;
+    case OP_SENDB:
+      printf("OP_SENDB\tR%d\t:%s\t%d\n", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_B(c)]),
+             GETARG_C(c));
+      break;
+    case OP_TAILCALL:
+      printf("OP_TAILCALL\tR%d\t:%s\t%d\n", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_B(c)]),
+             GETARG_C(c));
+      break;
+    case OP_SUPER:
+      printf("OP_SUPER\tR%d\t%d\n", GETARG_A(c),
+             GETARG_C(c));
+      break;
+    case OP_ARGARY:
+      printf("OP_ARGARY\tR%d\t%d:%d:%d:%d", GETARG_A(c),
+             (GETARG_Bx(c)>>10)&0x3f,
+             (GETARG_Bx(c)>>9)&0x1,
+             (GETARG_Bx(c)>>4)&0x1f,
+             (GETARG_Bx(c)>>0)&0xf);
+      print_lv(mrb, irep, c, RA);
+      break;
+
+    case OP_ENTER:
+      printf("OP_ENTER\t%d:%d:%d:%d:%d:%d:%d\n",
+             (GETARG_Ax(c)>>18)&0x1f,
+             (GETARG_Ax(c)>>13)&0x1f,
+             (GETARG_Ax(c)>>12)&0x1,
+             (GETARG_Ax(c)>>7)&0x1f,
+             (GETARG_Ax(c)>>2)&0x1f,
+             (GETARG_Ax(c)>>1)&0x1,
+             GETARG_Ax(c) & 0x1);
+      break;
+    case OP_RETURN:
+      printf("OP_RETURN\tR%d", GETARG_A(c));
+      switch (GETARG_B(c)) {
+      case OP_R_NORMAL:
+      case OP_R_RETURN:
+        printf("\treturn\t"); break;
+      case OP_R_BREAK:
+        printf("\tbreak\t"); break;
+      default:
+        printf("\tbroken\t"); break;
+        break;
+      }
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_BLKPUSH:
+      printf("OP_BLKPUSH\tR%d\t%d:%d:%d:%d", GETARG_A(c),
+             (GETARG_Bx(c)>>10)&0x3f,
+             (GETARG_Bx(c)>>9)&0x1,
+             (GETARG_Bx(c)>>4)&0x1f,
+             (GETARG_Bx(c)>>0)&0xf);
+      print_lv(mrb, irep, c, RA);
+      break;
+
+    case OP_LAMBDA:
+      printf("OP_LAMBDA\tR%d\tI(%+d)\t%d", GETARG_A(c), GETARG_b(c)+1, GETARG_c(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_RANGE:
+      printf("OP_RANGE\tR%d\tR%d\t%d", GETARG_A(c), GETARG_B(c), GETARG_C(c));
+      print_lv(mrb, irep, c, RAB);
+      break;
+    case OP_METHOD:
+      printf("OP_METHOD\tR%d\t:%s", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_B(c)]));
+      print_lv(mrb, irep, c, RA);
+      break;
+
+    case OP_ADD:
+      printf("OP_ADD\tR%d\t:%s\t%d\n", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_B(c)]),
+             GETARG_C(c));
+      break;
+    case OP_ADDI:
+      printf("OP_ADDI\tR%d\t:%s\t%d\n", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_B(c)]),
+             GETARG_C(c));
+      break;
+    case OP_SUB:
+      printf("OP_SUB\tR%d\t:%s\t%d\n", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_B(c)]),
+             GETARG_C(c));
+      break;
+    case OP_SUBI:
+      printf("OP_SUBI\tR%d\t:%s\t%d\n", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_B(c)]),
+             GETARG_C(c));
+      break;
+    case OP_MUL:
+      printf("OP_MUL\tR%d\t:%s\t%d\n", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_B(c)]),
+             GETARG_C(c));
+      break;
+    case OP_DIV:
+      printf("OP_DIV\tR%d\t:%s\t%d\n", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_B(c)]),
+             GETARG_C(c));
+      break;
+    case OP_LT:
+      printf("OP_LT\tR%d\t:%s\t%d\n", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_B(c)]),
+             GETARG_C(c));
+      break;
+    case OP_LE:
+      printf("OP_LE\tR%d\t:%s\t%d\n", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_B(c)]),
+             GETARG_C(c));
+      break;
+    case OP_GT:
+      printf("OP_GT\tR%d\t:%s\t%d\n", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_B(c)]),
+             GETARG_C(c));
+      break;
+    case OP_GE:
+      printf("OP_GE\tR%d\t:%s\t%d\n", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_B(c)]),
+             GETARG_C(c));
+      break;
+    case OP_EQ:
+      printf("OP_EQ\tR%d\t:%s\t%d\n", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_B(c)]),
+             GETARG_C(c));
+      break;
+
+    case OP_STOP:
+      printf("OP_STOP\n");
+      break;
+
+    case OP_ARRAY:
+      printf("OP_ARRAY\tR%d\tR%d\t%d", GETARG_A(c), GETARG_B(c), GETARG_C(c));
+      print_lv(mrb, irep, c, RAB);
+      break;
+    case OP_ARYCAT:
+      printf("OP_ARYCAT\tR%d\tR%d\t", GETARG_A(c), GETARG_B(c));
+      print_lv(mrb, irep, c, RAB);
+      break;
+    case OP_ARYPUSH:
+      printf("OP_ARYPUSH\tR%d\tR%d\t", GETARG_A(c), GETARG_B(c));
+      print_lv(mrb, irep, c, RAB);
+      break;
+    case OP_AREF:
+      printf("OP_AREF\tR%d\tR%d\t%d", GETARG_A(c), GETARG_B(c), GETARG_C(c));
+      print_lv(mrb, irep, c, RAB);
+      break;
+    case OP_APOST:
+      printf("OP_APOST\tR%d\t%d\t%d", GETARG_A(c), GETARG_B(c), GETARG_C(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_STRING:
+      {
+        mrb_value v = irep->pool[GETARG_Bx(c)];
+        mrb_value s = mrb_str_dump(mrb, mrb_str_new(mrb, RSTRING_PTR(v), RSTRING_LEN(v)));
+        printf("OP_STRING\tR%d\tL(%d)\t; %s", GETARG_A(c), GETARG_Bx(c), RSTRING_PTR(s));
+      }
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_STRCAT:
+      printf("OP_STRCAT\tR%d\tR%d\t", GETARG_A(c), GETARG_B(c));
+      print_lv(mrb, irep, c, RAB);
+      break;
+    case OP_HASH:
+      printf("OP_HASH\tR%d\tR%d\t%d", GETARG_A(c), GETARG_B(c), GETARG_C(c));
+      print_lv(mrb, irep, c, RAB);
+      break;
+
+    case OP_OCLASS:
+      printf("OP_OCLASS\tR%d\t\t", GETARG_A(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_CLASS:
+      printf("OP_CLASS\tR%d\t:%s", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_B(c)]));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_MODULE:
+      printf("OP_MODULE\tR%d\t:%s", GETARG_A(c),
+             mrb_sym2name(mrb, irep->syms[GETARG_B(c)]));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_EXEC:
+      printf("OP_EXEC\tR%d\tI(%+d)", GETARG_A(c), GETARG_Bx(c)+1);
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_SCLASS:
+      printf("OP_SCLASS\tR%d\tR%d\t", GETARG_A(c), GETARG_B(c));
+      print_lv(mrb, irep, c, RAB);
+      break;
+    case OP_TCLASS:
+      printf("OP_TCLASS\tR%d\t\t", GETARG_A(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_ERR:
+      {
+        mrb_value v = irep->pool[GETARG_Bx(c)];
+        mrb_value s = mrb_str_dump(mrb, mrb_str_new(mrb, RSTRING_PTR(v), RSTRING_LEN(v)));
+        printf("OP_ERR\t%s\n", RSTRING_PTR(s));
+      }
+      break;
+    case OP_EPUSH:
+      printf("OP_EPUSH\t:I(%+d)\n", GETARG_Bx(c)+1);
+      break;
+    case OP_ONERR:
+      printf("OP_ONERR\t%03d\n", i+GETARG_sBx(c));
+      break;
+    case OP_RESCUE:
+      printf("OP_RESCUE\tR%d\t\t", GETARG_A(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_RAISE:
+      printf("OP_RAISE\tR%d\t\t", GETARG_A(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_POPERR:
+      printf("OP_POPERR\t%d\t\t", GETARG_A(c));
+      print_lv(mrb, irep, c, RA);
+      break;
+    case OP_EPOP:
+      printf("OP_EPOP\t%d\n", GETARG_A(c));
+      break;
+
+    default:
+      printf("OP_unknown %d\t%d\t%d\t%d\n", GET_OPCODE(c),
+             GETARG_A(c), GETARG_B(c), GETARG_C(c));
+      break;
+    }
+    mrb_gc_arena_restore(mrb, ai);
+  }
+  printf("\n");
+#endif
+}
+
+static void
+codedump_recur(mrb_state *mrb, mrb_irep *irep)
+{
+  size_t i;
+
+  codedump(mrb, irep);
+  for (i=0; i<irep->rlen; i++) {
+    codedump_recur(mrb, irep->reps[i]);
+  }
+}
+
+void
+mrb_codedump_all(mrb_state *mrb, struct RProc *proc)
+{
+  codedump_recur(mrb, proc->body.irep);
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/compar.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/compar.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/compar.c	(revision 270)
@@ -0,0 +1,13 @@
+/*
+** compar.c - Comparable module
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+
+void
+mrb_init_comparable(mrb_state *mrb)
+{
+  mrb_define_module(mrb, "Comparable");  /* 15.3.3 */
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/crc.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/crc.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/crc.c	(revision 270)
@@ -0,0 +1,39 @@
+/*
+** crc.c - calculate CRC
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include <limits.h>
+#include <stdint.h>
+#include <stddef.h>
+
+/* Calculate CRC (CRC-16-CCITT)
+**
+**  0000_0000_0000_0000_0000_0000_0000_0000
+**          ^|------- CRC -------|- work --|
+**        carry
+*/
+#define  CRC_16_CCITT       0x11021ul        /* x^16+x^12+x^5+1 */
+#define  CRC_XOR_PATTERN    (CRC_16_CCITT << 8)
+#define  CRC_CARRY_BIT      (0x01000000)
+
+uint16_t
+calc_crc_16_ccitt(const uint8_t *src, size_t nbytes, uint16_t crc)
+{
+  size_t ibyte;
+  uint32_t ibit;
+  uint32_t crcwk = crc << 8;
+
+  for (ibyte = 0; ibyte < nbytes; ibyte++) {
+    crcwk |= *src++;
+    for (ibit = 0; ibit < CHAR_BIT; ibit++) {
+      crcwk <<= 1;
+      if (crcwk & CRC_CARRY_BIT) {
+        crcwk ^= CRC_XOR_PATTERN;
+      }
+    }
+  }
+  return (uint16_t)(crcwk >> 8);
+}
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/debug.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/debug.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/debug.c	(revision 270)
@@ -0,0 +1,215 @@
+#include <string.h>
+#include "mruby.h"
+#include "mruby/irep.h"
+#include "mruby/debug.h"
+
+static mrb_irep_debug_info_file *
+get_file(mrb_irep_debug_info *info, uint32_t pc)
+{
+  mrb_irep_debug_info_file **ret;
+  int32_t count;
+
+  if (pc >= info->pc_count) { return NULL; }
+  /* get upper bound */
+  ret = info->files;
+  count =  info->flen;
+  while (count > 0) {
+    int32_t step = count / 2;
+    mrb_irep_debug_info_file **it = ret + step;
+    if (!(pc < (*it)->start_pos)) {
+      ret = it + 1;
+      count -= step + 1;
+    } else { count = step; }
+  }
+
+  --ret;
+
+  /* check returning file exists inside debug info */
+  mrb_assert(info->files <= ret && ret < (info->files + info->flen));
+  /* check pc is within the range of returning file */
+  mrb_assert((*ret)->start_pos <= pc &&
+             pc < (((ret + 1 - info->files) < info->flen)
+                   ? (*(ret+1))->start_pos : info->pc_count));
+
+  return *ret;
+}
+
+static mrb_debug_line_type
+select_line_type(const uint16_t *lines, size_t lines_len)
+{
+  size_t line_count = 0;
+  int prev_line = -1;
+  size_t i;
+  for (i = 0; i < lines_len; ++i) {
+    if (lines[i] != prev_line) {
+      ++line_count;
+    }
+  }
+  return (sizeof(uint16_t) * lines_len) <= (sizeof(mrb_irep_debug_info_line) * line_count)
+      ? mrb_debug_line_ary : mrb_debug_line_flat_map;
+}
+
+MRB_API char const*
+mrb_debug_get_filename(mrb_irep *irep, uint32_t pc)
+{
+  if (irep && pc < irep->ilen) {
+    mrb_irep_debug_info_file* f = NULL;
+    if (!irep->debug_info) { return irep->filename; }
+    else if ((f = get_file(irep->debug_info, pc))) {
+      return f->filename;
+    }
+  }
+  return NULL;
+}
+
+MRB_API int32_t
+mrb_debug_get_line(mrb_irep *irep, uint32_t pc)
+{
+  if (irep && pc < irep->ilen) {
+    mrb_irep_debug_info_file* f = NULL;
+    if (!irep->debug_info) {
+      return irep->lines? irep->lines[pc] : -1;
+    }
+    else if ((f = get_file(irep->debug_info, pc))) {
+      switch (f->line_type) {
+        case mrb_debug_line_ary:
+          mrb_assert(f->start_pos <= pc && pc < (f->start_pos + f->line_entry_count));
+          return f->lines.ary[pc - f->start_pos];
+
+        case mrb_debug_line_flat_map: {
+          /* get upper bound */
+          mrb_irep_debug_info_line *ret = f->lines.flat_map;
+          uint32_t count = f->line_entry_count;
+          while (count > 0) {
+            int32_t step = count / 2;
+            mrb_irep_debug_info_line *it = ret + step;
+            if (!(pc < it->start_pos)) {
+              ret = it + 1;
+              count -= step + 1;
+            } else { count = step; }
+          }
+
+          --ret;
+
+          /* check line entry pointer range */
+          mrb_assert(f->lines.flat_map <= ret && ret < (f->lines.flat_map + f->line_entry_count));
+          /* check pc range */
+          mrb_assert(ret->start_pos <= pc &&
+                     pc < (((uint32_t)(ret + 1 - f->lines.flat_map) < f->line_entry_count)
+                           ? (ret+1)->start_pos : irep->debug_info->pc_count));
+
+          return ret->line;
+        }
+      }
+    }
+  }
+  return -1;
+}
+
+MRB_API mrb_irep_debug_info *
+mrb_debug_info_alloc(mrb_state *mrb, mrb_irep *irep)
+{
+  static const mrb_irep_debug_info initial = { 0, 0, NULL };
+  mrb_irep_debug_info *ret;
+
+  mrb_assert(!irep->debug_info);
+  ret = (mrb_irep_debug_info *)mrb_malloc(mrb, sizeof(*ret));
+  *ret = initial;
+  irep->debug_info = ret;
+  return ret;
+}
+
+MRB_API mrb_irep_debug_info_file *
+mrb_debug_info_append_file(mrb_state *mrb, mrb_irep *irep,
+                           uint32_t start_pos, uint32_t end_pos)
+{
+  mrb_irep_debug_info *info;
+  mrb_irep_debug_info_file *ret;
+  uint32_t file_pc_count;
+  size_t fn_len;
+  mrb_int len;
+  uint32_t i;
+
+  if (!irep->debug_info) { return NULL; }
+
+  mrb_assert(irep->filename);
+  mrb_assert(irep->lines);
+
+  info = irep->debug_info;
+
+  if (info->flen > 0 && strcmp(irep->filename, info->files[info->flen - 1]->filename) == 0) {
+    return NULL;
+  }
+
+  ret = (mrb_irep_debug_info_file *)mrb_malloc(mrb, sizeof(*ret));
+  info->files =
+      (mrb_irep_debug_info_file**)(
+          info->files
+          ? mrb_realloc(mrb, info->files, sizeof(mrb_irep_debug_info_file*) * (info->flen + 1))
+          : mrb_malloc(mrb, sizeof(mrb_irep_debug_info_file*)));
+  info->files[info->flen++] = ret;
+
+  file_pc_count = end_pos - start_pos;
+
+  ret->start_pos = start_pos;
+  info->pc_count = end_pos;
+
+  fn_len = strlen(irep->filename);
+  ret->filename_sym = mrb_intern(mrb, irep->filename, fn_len);
+  len = 0;
+  ret->filename = mrb_sym2name_len(mrb, ret->filename_sym, &len);
+
+  ret->line_type = select_line_type(irep->lines + start_pos, end_pos - start_pos);
+  ret->lines.ptr = NULL;
+
+  switch (ret->line_type) {
+    case mrb_debug_line_ary:
+      ret->line_entry_count = file_pc_count;
+      ret->lines.ary = (uint16_t*)mrb_malloc(mrb, sizeof(uint16_t) * file_pc_count);
+      for (i = 0; i < file_pc_count; ++i) {
+        ret->lines.ary[i] = irep->lines[start_pos + i];
+      }
+      break;
+
+    case mrb_debug_line_flat_map: {
+      uint16_t prev_line = 0;
+      mrb_irep_debug_info_line m;
+      ret->lines.flat_map = (mrb_irep_debug_info_line*)mrb_malloc(mrb, sizeof(mrb_irep_debug_info_line) * 1);
+      ret->line_entry_count = 0;
+      for (i = 0; i < file_pc_count; ++i) {
+        if (irep->lines[start_pos + i] == prev_line) { continue; }
+
+        ret->lines.flat_map = (mrb_irep_debug_info_line*)mrb_realloc(
+            mrb, ret->lines.flat_map,
+            sizeof(mrb_irep_debug_info_line) * (ret->line_entry_count + 1));
+        m.start_pos = start_pos + i;
+        m.line = irep->lines[start_pos + i];
+        ret->lines.flat_map[ret->line_entry_count] = m;
+
+        /* update */
+        ++ret->line_entry_count;
+        prev_line = irep->lines[start_pos + i];
+      }
+    } break;
+
+    default: mrb_assert(0); break;
+  }
+
+  return ret;
+}
+
+MRB_API void
+mrb_debug_info_free(mrb_state *mrb, mrb_irep_debug_info *d)
+{
+  uint32_t i;
+
+  if (!d) { return; }
+
+  for (i = 0; i < d->flen; ++i) {
+    mrb_assert(d->files[i]);
+    mrb_free(mrb, d->files[i]->lines.ptr);
+    mrb_free(mrb, d->files[i]);
+  }
+  mrb_free(mrb, d->files);
+  mrb_free(mrb, d);
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/dump.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/dump.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/dump.c	(revision 270)
@@ -0,0 +1,1095 @@
+/*
+** dump.c - mruby binary dumper (mrbc binary format)
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include <string.h>
+#include <limits.h>
+#include "mruby/dump.h"
+#include "mruby/string.h"
+#include "mruby/irep.h"
+#include "mruby/numeric.h"
+#include "mruby/debug.h"
+
+#define FLAG_BYTEORDER_NATIVE 2
+#define FLAG_BYTEORDER_NONATIVE 0
+
+#ifdef MRB_USE_FLOAT
+#define MRB_FLOAT_FMT "%.8e"
+#else
+#define MRB_FLOAT_FMT "%.16e"
+#endif
+
+static size_t get_irep_record_size_1(mrb_state *mrb, mrb_irep *irep);
+
+#if UINT32_MAX > SIZE_MAX
+# error This code cannot be built on your environment.
+#endif
+
+static size_t
+write_padding(uint8_t *buf)
+{
+  const size_t align = MRB_DUMP_ALIGNMENT;
+  size_t pad_len = -(intptr_t)buf & (align-1);
+  if (pad_len > 0) {
+    memset(buf, 0, pad_len);
+  }
+  return pad_len;
+}
+
+static size_t
+get_irep_header_size(mrb_state *mrb)
+{
+  size_t size = 0;
+
+  size += sizeof(uint32_t) * 1;
+  size += sizeof(uint16_t) * 3;
+
+  return size;
+}
+
+static ptrdiff_t
+write_irep_header(mrb_state *mrb, mrb_irep *irep, uint8_t *buf)
+{
+  uint8_t *cur = buf;
+
+  cur += uint32_to_bin(get_irep_record_size_1(mrb, irep), cur);  /* record size */
+  cur += uint16_to_bin((uint16_t)irep->nlocals, cur);  /* number of local variable */
+  cur += uint16_to_bin((uint16_t)irep->nregs, cur);  /* number of register variable */
+  cur += uint16_to_bin((uint16_t)irep->rlen, cur);  /* number of child irep */
+
+  return cur - buf;
+}
+
+
+static size_t
+get_iseq_block_size(mrb_state *mrb, mrb_irep *irep)
+{
+  size_t size = 0;
+
+  size += sizeof(uint32_t); /* ilen */
+  size += sizeof(uint32_t); /* max padding */
+  size += sizeof(uint32_t) * irep->ilen; /* iseq(n) */
+
+  return size;
+}
+
+static ptrdiff_t
+write_iseq_block(mrb_state *mrb, mrb_irep *irep, uint8_t *buf, uint8_t flags)
+{
+  uint8_t *cur = buf;
+  uint32_t iseq_no;
+
+  cur += uint32_to_bin(irep->ilen, cur); /* number of opcode */
+  cur += write_padding(cur);
+  switch (flags & DUMP_ENDIAN_NAT) {
+  case DUMP_ENDIAN_BIG:
+    if (bigendian_p()) goto native;
+    for (iseq_no = 0; iseq_no < irep->ilen; iseq_no++) {
+      cur += uint32_to_bin(irep->iseq[iseq_no], cur); /* opcode */
+    }
+    break;
+  case DUMP_ENDIAN_LIL:
+    if (!bigendian_p()) goto native;
+    for (iseq_no = 0; iseq_no < irep->ilen; iseq_no++) {
+      cur += uint32l_to_bin(irep->iseq[iseq_no], cur); /* opcode */
+    }
+    break;
+
+  native:
+  case DUMP_ENDIAN_NAT:
+    memcpy(cur, irep->iseq, irep->ilen * sizeof(mrb_code));
+    cur += irep->ilen * sizeof(mrb_code);
+    break;
+  }
+
+  return cur - buf;
+}
+
+
+static size_t
+get_pool_block_size(mrb_state *mrb, mrb_irep *irep)
+{
+  size_t size = 0;
+  size_t pool_no;
+  mrb_value str;
+
+  size += sizeof(uint32_t); /* plen */
+  size += irep->plen * (sizeof(uint8_t) + sizeof(uint16_t)); /* len(n) */
+
+  for (pool_no = 0; pool_no < irep->plen; pool_no++) {
+    int ai = mrb_gc_arena_save(mrb);
+
+    switch (mrb_type(irep->pool[pool_no])) {
+    case MRB_TT_FIXNUM:
+      str = mrb_fixnum_to_str(mrb, irep->pool[pool_no], 10);
+      {
+        mrb_int len = RSTRING_LEN(str);
+        mrb_assert_int_fit(mrb_int, len, size_t, SIZE_MAX);
+        size += (size_t)len;
+      }
+      break;
+
+    case MRB_TT_FLOAT:
+      str = mrb_float_to_str(mrb, irep->pool[pool_no], MRB_FLOAT_FMT);
+      {
+        mrb_int len = RSTRING_LEN(str);
+        mrb_assert_int_fit(mrb_int, len, size_t, SIZE_MAX);
+        size += (size_t)len;
+      }
+      break;
+
+    case MRB_TT_STRING:
+      {
+        mrb_int len = RSTRING_LEN(irep->pool[pool_no]);
+        mrb_assert_int_fit(mrb_int, len, size_t, SIZE_MAX);
+        size += (size_t)len;
+      }
+      break;
+
+    default:
+      break;
+    }
+    mrb_gc_arena_restore(mrb, ai);
+  }
+
+  return size;
+}
+
+static ptrdiff_t
+write_pool_block(mrb_state *mrb, mrb_irep *irep, uint8_t *buf)
+{
+  size_t pool_no;
+  uint8_t *cur = buf;
+  uint16_t len;
+  mrb_value str;
+  const char *char_ptr;
+
+  cur += uint32_to_bin(irep->plen, cur); /* number of pool */
+
+  for (pool_no = 0; pool_no < irep->plen; pool_no++) {
+    int ai = mrb_gc_arena_save(mrb);
+
+    switch (mrb_type(irep->pool[pool_no])) {
+    case MRB_TT_FIXNUM:
+      cur += uint8_to_bin(IREP_TT_FIXNUM, cur); /* data type */
+      str = mrb_fixnum_to_str(mrb, irep->pool[pool_no], 10);
+      break;
+
+    case MRB_TT_FLOAT:
+      cur += uint8_to_bin(IREP_TT_FLOAT, cur); /* data type */
+      str = mrb_float_to_str(mrb, irep->pool[pool_no], MRB_FLOAT_FMT);
+      break;
+
+    case MRB_TT_STRING:
+      cur += uint8_to_bin(IREP_TT_STRING, cur); /* data type */
+      str = irep->pool[pool_no];
+      break;
+
+    default:
+      continue;
+    }
+
+    char_ptr = RSTRING_PTR(str);
+    {
+      mrb_int tlen = RSTRING_LEN(str);
+      mrb_assert_int_fit(mrb_int, tlen, uint16_t, UINT16_MAX);
+      len = (uint16_t)tlen;
+    }
+
+    cur += uint16_to_bin(len, cur); /* data length */
+    memcpy(cur, char_ptr, (size_t)len);
+    cur += len;
+
+    mrb_gc_arena_restore(mrb, ai);
+  }
+
+  return cur - buf;
+}
+
+
+static size_t
+get_syms_block_size(mrb_state *mrb, mrb_irep *irep)
+{
+  size_t size = 0;
+  uint32_t sym_no;
+  mrb_int len;
+
+  size += sizeof(uint32_t); /* slen */
+  for (sym_no = 0; sym_no < irep->slen; sym_no++) {
+    size += sizeof(uint16_t); /* snl(n) */
+    if (irep->syms[sym_no] != 0) {
+      mrb_sym2name_len(mrb, irep->syms[sym_no], &len);
+      size += len + 1; /* sn(n) + null char */
+    }
+  }
+
+  return size;
+}
+
+static ptrdiff_t
+write_syms_block(mrb_state *mrb, mrb_irep *irep, uint8_t *buf)
+{
+  uint32_t sym_no;
+  uint8_t *cur = buf;
+  const char *name;
+
+  cur += uint32_to_bin(irep->slen, cur); /* number of symbol */
+
+  for (sym_no = 0; sym_no < irep->slen; sym_no++) {
+    if (irep->syms[sym_no] != 0) {
+      mrb_int len;
+
+      name = mrb_sym2name_len(mrb, irep->syms[sym_no], &len);
+
+      mrb_assert_int_fit(mrb_int, len, uint16_t, UINT16_MAX);
+      cur += uint16_to_bin((uint16_t)len, cur); /* length of symbol name */
+      memcpy(cur, name, len); /* symbol name */
+      cur += (uint16_t)len;
+      *cur++ = '\0';
+    }
+    else {
+      cur += uint16_to_bin(MRB_DUMP_NULL_SYM_LEN, cur); /* length of symbol name */
+    }
+  }
+
+  return cur - buf;
+}
+
+static size_t
+get_irep_record_size_1(mrb_state *mrb, mrb_irep *irep)
+{
+  size_t size = 0;
+
+  size += get_irep_header_size(mrb);
+  size += get_iseq_block_size(mrb, irep);
+  size += get_pool_block_size(mrb, irep);
+  size += get_syms_block_size(mrb, irep);
+  return size;
+}
+
+static size_t
+get_irep_record_size(mrb_state *mrb, mrb_irep *irep)
+{
+  size_t size = 0;
+  size_t irep_no;
+
+  size = get_irep_record_size_1(mrb, irep);
+  for (irep_no = 0; irep_no < irep->rlen; irep_no++) {
+    size += get_irep_record_size(mrb, irep->reps[irep_no]);
+  }
+  return size;
+}
+
+static int
+write_irep_record(mrb_state *mrb, mrb_irep *irep, uint8_t *bin, size_t *irep_record_size, uint8_t flags)
+{
+  uint32_t i;
+  uint8_t *src = bin;
+
+  if (irep == NULL) {
+    return MRB_DUMP_INVALID_IREP;
+  }
+
+  *irep_record_size = get_irep_record_size_1(mrb, irep);
+  if (*irep_record_size == 0) {
+    return MRB_DUMP_GENERAL_FAILURE;
+  }
+
+  bin += write_irep_header(mrb, irep, bin);
+  bin += write_iseq_block(mrb, irep, bin, flags);
+  bin += write_pool_block(mrb, irep, bin);
+  bin += write_syms_block(mrb, irep, bin);
+
+  for (i = 0; i < irep->rlen; i++) {
+    int result;
+    size_t rsize;
+
+    result = write_irep_record(mrb, irep->reps[i], bin, &rsize, flags);
+    if (result != MRB_DUMP_OK) {
+      return result;
+    }
+    bin += rsize;
+  }
+  *irep_record_size = bin - src;
+  return MRB_DUMP_OK;
+}
+
+static uint32_t
+write_footer(mrb_state *mrb, uint8_t *bin)
+{
+  struct rite_binary_footer footer;
+
+  memcpy(footer.section_ident, RITE_BINARY_EOF, sizeof(footer.section_ident));
+  uint32_to_bin(sizeof(struct rite_binary_footer), footer.section_size);
+  memcpy(bin, &footer, sizeof(struct rite_binary_footer));
+
+  return sizeof(struct rite_binary_footer);
+}
+
+
+static int
+write_section_irep_header(mrb_state *mrb, size_t section_size, uint8_t *bin)
+{
+  struct rite_section_irep_header *header = (struct rite_section_irep_header*)bin;
+
+  memcpy(header->section_ident, RITE_SECTION_IREP_IDENT, sizeof(header->section_ident));
+
+  mrb_assert_int_fit(size_t, section_size, uint32_t, UINT32_MAX);
+  uint32_to_bin((uint32_t)section_size, header->section_size);
+  memcpy(header->rite_version, RITE_VM_VER, sizeof(header->rite_version));
+
+  return MRB_DUMP_OK;
+}
+
+static int
+write_section_irep(mrb_state *mrb, mrb_irep *irep, uint8_t *bin, size_t *len_p, uint8_t flags)
+{
+  int result;
+  size_t rsize = 0;
+  uint8_t *cur = bin;
+
+  if (mrb == NULL || bin == NULL) {
+    return MRB_DUMP_INVALID_ARGUMENT;
+  }
+
+  cur += sizeof(struct rite_section_irep_header);
+
+  result = write_irep_record(mrb, irep, cur, &rsize, flags);
+  if (result != MRB_DUMP_OK) {
+    return result;
+  }
+  *len_p = cur - bin + rsize;
+  write_section_irep_header(mrb, *len_p, bin);
+
+  return MRB_DUMP_OK;
+}
+
+static int
+write_section_lineno_header(mrb_state *mrb, size_t section_size, uint8_t *bin)
+{
+  struct rite_section_lineno_header *header = (struct rite_section_lineno_header*)bin;
+
+  memcpy(header->section_ident, RITE_SECTION_LINENO_IDENT, sizeof(header->section_ident));
+  uint32_to_bin((uint32_t)section_size, header->section_size);
+
+  return MRB_DUMP_OK;
+}
+
+static size_t
+get_lineno_record_size(mrb_state *mrb, mrb_irep *irep)
+{
+  size_t size = 0;
+
+  size += sizeof(uint32_t); /* record size */
+  size += sizeof(uint16_t); /* filename size */
+  if (irep->filename) {
+    size += strlen(irep->filename); /* filename */
+  }
+  size += sizeof(uint32_t); /* niseq */
+  if (irep->lines) {
+    size += sizeof(uint16_t) * irep->ilen; /* lineno */
+  }
+
+  return size;
+}
+
+static size_t
+write_lineno_record_1(mrb_state *mrb, mrb_irep *irep, uint8_t* bin)
+{
+  uint8_t *cur = bin;
+  size_t iseq_no;
+  size_t filename_len;
+  ptrdiff_t diff;
+
+  cur += sizeof(uint32_t); /* record size */
+
+  if (irep->filename) {
+    filename_len = strlen(irep->filename);
+  } else {
+    filename_len = 0;
+  }
+  mrb_assert_int_fit(size_t, filename_len, uint16_t, UINT16_MAX);
+  cur += uint16_to_bin((uint16_t)filename_len, cur); /* filename size */
+
+  if (filename_len) {
+    memcpy(cur, irep->filename, filename_len);
+    cur += filename_len; /* filename */
+  }
+
+  if (irep->lines) {
+    mrb_assert_int_fit(size_t, irep->ilen, uint32_t, UINT32_MAX);
+    cur += uint32_to_bin((uint32_t)(irep->ilen), cur); /* niseq */
+    for (iseq_no = 0; iseq_no < irep->ilen; iseq_no++) {
+      cur += uint16_to_bin(irep->lines[iseq_no], cur); /* opcode */
+    }
+  }
+  else {
+    cur += uint32_to_bin(0, cur); /* niseq */
+  }
+
+  diff = cur - bin;
+  mrb_assert_int_fit(ptrdiff_t, diff, uint32_t, UINT32_MAX);
+
+  uint32_to_bin((uint32_t)diff, bin); /* record size */
+
+  mrb_assert_int_fit(ptrdiff_t, diff, size_t, SIZE_MAX);
+  return (size_t)diff;
+}
+
+static size_t
+write_lineno_record(mrb_state *mrb, mrb_irep *irep, uint8_t* bin)
+{
+  size_t i;
+  size_t rlen, size = 0;
+
+  rlen = write_lineno_record_1(mrb, irep, bin);
+  bin += rlen;
+  size += rlen;
+  for (i=0; i<irep->rlen; i++) {
+    rlen = write_lineno_record(mrb, irep, bin);
+    bin += rlen;
+    size += rlen;
+  }
+  return size;
+}
+
+static int
+write_section_lineno(mrb_state *mrb, mrb_irep *irep, uint8_t *bin)
+{
+  size_t section_size = 0;
+  size_t rlen = 0; /* size of irep record */
+  uint8_t *cur = bin;
+
+  if (mrb == NULL || bin == NULL) {
+    return MRB_DUMP_INVALID_ARGUMENT;
+  }
+
+  cur += sizeof(struct rite_section_lineno_header);
+  section_size += sizeof(struct rite_section_lineno_header);
+
+  rlen = write_lineno_record(mrb, irep, cur);
+  section_size += rlen;
+
+  write_section_lineno_header(mrb, section_size, bin);
+
+  return MRB_DUMP_OK;
+}
+
+static size_t
+get_debug_record_size(mrb_state *mrb, mrb_irep *irep)
+{
+  size_t ret = 0;
+  uint16_t f_idx;
+  size_t i;
+
+  ret += sizeof(uint32_t); /* record size */
+  ret += sizeof(uint16_t); /* file count */
+
+  for (f_idx = 0; f_idx < irep->debug_info->flen; ++f_idx) {
+    mrb_irep_debug_info_file const* file = irep->debug_info->files[f_idx];
+
+    ret += sizeof(uint32_t); /* position */
+    ret += sizeof(uint16_t); /* filename index */
+
+    /* lines */
+    ret += sizeof(uint32_t); /* entry count */
+    ret += sizeof(uint8_t); /* line type */
+    switch (file->line_type) {
+      case mrb_debug_line_ary:
+        ret += sizeof(uint16_t) * (size_t)(file->line_entry_count);
+        break;
+
+      case mrb_debug_line_flat_map:
+        ret += (sizeof(uint32_t) + sizeof(uint16_t)) * (size_t)(file->line_entry_count);
+        break;
+
+      default: mrb_assert(0); break;
+    }
+  }
+  for (i=0; i<irep->rlen; i++) {
+    ret += get_debug_record_size(mrb, irep->reps[i]);
+  }
+
+  return ret;
+}
+
+static int
+find_filename_index(const mrb_sym *ary, int ary_len, mrb_sym s)
+{
+  int i;
+
+  for (i = 0; i < ary_len; ++i) {
+    if (ary[i] == s) { return i; }
+  }
+  return -1;
+}
+
+static size_t
+get_filename_table_size(mrb_state *mrb, mrb_irep *irep, mrb_sym **fp, uint16_t *lp)
+{
+  mrb_sym *filenames = *fp;
+  size_t i, size = 0;
+  mrb_irep_debug_info *di = irep->debug_info;
+
+  mrb_assert(lp);
+  for (i = 0; i < di->flen; ++i) {
+    mrb_irep_debug_info_file *file;
+    mrb_int filename_len;
+
+    file = di->files[i];
+    if (find_filename_index(filenames, *lp, file->filename_sym) == -1) {
+      /* register filename */
+      *lp += 1;
+      *fp = filenames = (mrb_sym *)mrb_realloc(mrb, filenames, sizeof(mrb_sym) * (*lp));
+      filenames[*lp - 1] = file->filename_sym;
+
+      /* filename */
+      mrb_sym2name_len(mrb, file->filename_sym, &filename_len);
+      size += sizeof(uint16_t) + (size_t)filename_len;
+    }
+  }
+  for (i=0; i<irep->rlen; i++) {
+    size += get_filename_table_size(mrb, irep->reps[i], fp, lp);
+  }
+  return size;
+}
+
+static size_t
+write_debug_record_1(mrb_state *mrb, mrb_irep *irep, uint8_t *bin, mrb_sym const* filenames, uint16_t filenames_len)
+{
+  uint8_t *cur;
+  uint16_t f_idx;
+  ptrdiff_t ret;
+
+  cur = bin + sizeof(uint32_t); /* skip record size */
+  cur += uint16_to_bin(irep->debug_info->flen, cur); /* file count */
+
+  for (f_idx = 0; f_idx < irep->debug_info->flen; ++f_idx) {
+    int filename_idx;
+    const mrb_irep_debug_info_file *file = irep->debug_info->files[f_idx];
+
+    /* position */
+    cur += uint32_to_bin(file->start_pos, cur);
+
+    /* filename index */
+    filename_idx = find_filename_index(filenames, filenames_len,
+                                                  file->filename_sym);
+    mrb_assert_int_fit(int, filename_idx, uint16_t, UINT16_MAX);
+    cur += uint16_to_bin((uint16_t)filename_idx, cur);
+
+    /* lines */
+    cur += uint32_to_bin(file->line_entry_count, cur);
+    cur += uint8_to_bin(file->line_type, cur);
+    switch (file->line_type) {
+      case mrb_debug_line_ary: {
+        uint32_t l;
+        for (l = 0; l < file->line_entry_count; ++l) {
+          cur += uint16_to_bin(file->lines.ary[l], cur);
+        }
+      } break;
+
+      case mrb_debug_line_flat_map: {
+        uint32_t line;
+        for (line = 0; line < file->line_entry_count; ++line) {
+          cur += uint32_to_bin(file->lines.flat_map[line].start_pos, cur);
+          cur += uint16_to_bin(file->lines.flat_map[line].line, cur);
+        }
+      } break;
+
+      default: mrb_assert(0); break;
+    }
+  }
+
+  ret = cur - bin;
+  mrb_assert_int_fit(ptrdiff_t, ret, uint32_t, UINT32_MAX);
+  uint32_to_bin(ret, bin);
+
+  mrb_assert_int_fit(ptrdiff_t, ret, size_t, SIZE_MAX);
+  return (size_t)ret;
+}
+
+static size_t
+write_debug_record(mrb_state *mrb, mrb_irep *irep, uint8_t *bin, mrb_sym const* filenames, uint16_t filenames_len)
+{
+  size_t size, len;
+  size_t irep_no;
+
+  size = len = write_debug_record_1(mrb, irep, bin, filenames, filenames_len);
+  bin += len;
+  for (irep_no = 0; irep_no < irep->rlen; irep_no++) {
+    len = write_debug_record(mrb, irep->reps[irep_no], bin, filenames, filenames_len);
+    bin += len;
+    size += len;
+  }
+
+  mrb_assert(size == get_debug_record_size(mrb, irep));
+  return size;
+}
+
+static int
+write_section_debug(mrb_state *mrb, mrb_irep *irep, uint8_t *cur, mrb_sym const *filenames, uint16_t filenames_len)
+{
+  size_t section_size = 0;
+  const uint8_t *bin = cur;
+  struct rite_section_debug_header *header;
+  size_t dlen;
+  uint16_t i;
+  char const *sym; mrb_int sym_len;
+
+  if (mrb == NULL || cur == NULL) {
+    return MRB_DUMP_INVALID_ARGUMENT;
+  }
+
+  header = (struct rite_section_debug_header *)bin;
+  cur += sizeof(struct rite_section_debug_header);
+  section_size += sizeof(struct rite_section_debug_header);
+
+  /* filename table */
+  cur += uint16_to_bin(filenames_len, cur);
+  section_size += sizeof(uint16_t);
+  for (i = 0; i < filenames_len; ++i) {
+    sym = mrb_sym2name_len(mrb, filenames[i], &sym_len);
+    mrb_assert(sym);
+    cur += uint16_to_bin(sym_len, cur);
+    memcpy(cur, sym, sym_len);
+    cur += sym_len;
+    section_size += sizeof(uint16_t) + sym_len;
+  }
+
+  /* debug records */
+  dlen = write_debug_record(mrb, irep, cur, filenames, filenames_len);
+  section_size += dlen;
+
+  memcpy(header->section_ident, RITE_SECTION_DEBUG_IDENT, sizeof(header->section_ident));
+  mrb_assert(section_size <= INT32_MAX);
+  uint32_to_bin(section_size, header->section_size);
+
+  return MRB_DUMP_OK;
+}
+
+static void
+create_lv_sym_table(mrb_state *mrb, const mrb_irep *irep, mrb_sym **syms, uint32_t *syms_len)
+{
+  size_t i;
+
+  if (*syms == NULL) {
+    *syms = (mrb_sym*)mrb_malloc(mrb, sizeof(mrb_sym) * 1);
+  }
+
+  for (i = 0; i + 1 < irep->nlocals; ++i) {
+    mrb_sym const name = irep->lv[i].name;
+    if (name == 0) continue;
+    if (find_filename_index(*syms, *syms_len, name) != -1) continue;
+
+    ++(*syms_len);
+    *syms = (mrb_sym*)mrb_realloc(mrb, *syms, sizeof(mrb_sym) * (*syms_len));
+    (*syms)[*syms_len - 1] = name;
+  }
+
+  for (i = 0; i < irep->rlen; ++i) {
+    create_lv_sym_table(mrb, irep->reps[i], syms, syms_len);
+  }
+}
+
+static int
+write_lv_sym_table(mrb_state *mrb, uint8_t **start, mrb_sym const *syms, uint32_t syms_len)
+{
+  uint8_t *cur = *start;
+  uint32_t i;
+  const char *str;
+  mrb_int str_len;
+
+  cur += uint32_to_bin(syms_len, cur);
+
+  for (i = 0; i < syms_len; ++i) {
+    str = mrb_sym2name_len(mrb, syms[i], &str_len);
+    cur += uint16_to_bin(str_len, cur);
+    memcpy(cur, str, str_len);
+    cur += str_len;
+  }
+
+  *start = cur;
+
+  return MRB_DUMP_OK;
+}
+
+static int
+write_lv_record(mrb_state *mrb, const mrb_irep *irep, uint8_t **start, mrb_sym const *syms, uint32_t syms_len)
+{
+  uint8_t *cur = *start;
+  size_t i;
+
+  for (i = 0; i + 1 < irep->nlocals; ++i) {
+    if (irep->lv[i].name == 0) {
+      cur += uint16_to_bin(RITE_LV_NULL_MARK, cur);
+      cur += uint16_to_bin(0, cur);
+    }
+    else {
+      int const sym_idx = find_filename_index(syms, syms_len, irep->lv[i].name);
+      mrb_assert(sym_idx != -1); /* local variable name must be in syms */
+
+      cur += uint16_to_bin(sym_idx, cur);
+      cur += uint16_to_bin(irep->lv[i].r, cur);
+    }
+  }
+
+  for (i = 0; i < irep->rlen; ++i) {
+    write_lv_record(mrb, irep->reps[i], &cur, syms, syms_len);
+  }
+
+  *start = cur;
+
+  return MRB_DUMP_OK;
+}
+
+static size_t
+get_lv_record_size(mrb_state *mrb, mrb_irep *irep)
+{
+  size_t ret = 0, i;
+
+  ret += (sizeof(uint16_t) + sizeof(uint16_t)) * (irep->nlocals - 1);
+
+  for (i = 0; i < irep->rlen; ++i) {
+    ret += get_lv_record_size(mrb, irep->reps[i]);
+  }
+
+  return ret;
+}
+
+static size_t
+get_lv_section_size(mrb_state *mrb, mrb_irep *irep, mrb_sym const *syms, uint32_t syms_len)
+{
+  size_t ret = 0, i;
+
+  ret += sizeof(uint32_t); /* syms_len */
+  ret += sizeof(uint16_t) * syms_len; /* symbol name lengths */
+  for (i = 0; i < syms_len; ++i) {
+    mrb_int str_len;
+    mrb_sym2name_len(mrb, syms[i], &str_len);
+    ret += str_len;
+  }
+
+  ret += get_lv_record_size(mrb, irep);
+
+  return ret;
+}
+
+static int
+write_section_lv(mrb_state *mrb, mrb_irep *irep, uint8_t *start, mrb_sym const *syms, uint32_t const syms_len)
+{
+  uint8_t *cur = start;
+  struct rite_section_lv_header *header;
+  ptrdiff_t diff;
+  int result = MRB_DUMP_OK;
+
+  if (mrb == NULL || cur == NULL) {
+    return MRB_DUMP_INVALID_ARGUMENT;
+  }
+
+  header = (struct rite_section_lv_header*)cur;
+  cur += sizeof(struct rite_section_lv_header);
+
+  result = write_lv_sym_table(mrb, &cur, syms, syms_len);
+  if (result != MRB_DUMP_OK) {
+    goto lv_section_exit;
+  }
+
+  result = write_lv_record(mrb, irep, &cur, syms, syms_len);
+  if (result != MRB_DUMP_OK) {
+    goto lv_section_exit;
+  }
+
+  memcpy(header->section_ident, RITE_SECTION_LV_IDENT, sizeof(header->section_ident));
+
+  diff = cur - start;
+  mrb_assert_int_fit(ptrdiff_t, diff, size_t, SIZE_MAX);
+  uint32_to_bin(diff, header->section_size);
+
+lv_section_exit:
+  return result;
+}
+
+static int
+write_rite_binary_header(mrb_state *mrb, size_t binary_size, uint8_t *bin, uint8_t flags)
+{
+  struct rite_binary_header *header = (struct rite_binary_header *)bin;
+  uint16_t crc;
+  uint32_t offset;
+
+  switch (flags & DUMP_ENDIAN_NAT) {
+  endian_big:
+  case DUMP_ENDIAN_BIG:
+    memcpy(header->binary_ident, RITE_BINARY_IDENT, sizeof(header->binary_ident));
+    break;
+  endian_little:
+  case DUMP_ENDIAN_LIL:
+    memcpy(header->binary_ident, RITE_BINARY_IDENT_LIL, sizeof(header->binary_ident));
+    break;
+
+  case DUMP_ENDIAN_NAT:
+    if (bigendian_p()) goto endian_big;
+    goto endian_little;
+    break;
+  }
+
+  memcpy(header->binary_version, RITE_BINARY_FORMAT_VER, sizeof(header->binary_version));
+  memcpy(header->compiler_name, RITE_COMPILER_NAME, sizeof(header->compiler_name));
+  memcpy(header->compiler_version, RITE_COMPILER_VERSION, sizeof(header->compiler_version));
+  mrb_assert(binary_size <= UINT32_MAX);
+  uint32_to_bin((uint32_t)binary_size, header->binary_size);
+
+  offset = (&(header->binary_crc[0]) - bin) + sizeof(uint16_t);
+  crc = calc_crc_16_ccitt(bin + offset, binary_size - offset, 0);
+  uint16_to_bin(crc, header->binary_crc);
+
+  return MRB_DUMP_OK;
+}
+
+static mrb_bool
+is_debug_info_defined(mrb_irep *irep)
+{
+  size_t i;
+
+  if (!irep->debug_info) return FALSE;
+  for (i=0; i<irep->rlen; i++) {
+    if (!is_debug_info_defined(irep->reps[i])) return FALSE;
+  }
+  return TRUE;
+}
+
+static mrb_bool
+is_lv_defined(mrb_irep *irep)
+{
+  size_t i;
+
+  if (irep->lv) { return TRUE; }
+
+  for (i = 0; i < irep->rlen; ++i) {
+    if (is_lv_defined(irep->reps[i])) { return TRUE; }
+  }
+
+  return FALSE;
+}
+
+static uint8_t
+dump_flags(uint8_t flags, uint8_t native)
+{
+  if (native == FLAG_BYTEORDER_NATIVE) {
+    if ((flags & DUMP_ENDIAN_NAT) == 0) {
+      return (flags & DUMP_DEBUG_INFO) | DUMP_ENDIAN_NAT;
+    }
+    return flags;
+  }
+  if ((flags & DUMP_ENDIAN_NAT) == 0) {
+    return (flags & DUMP_DEBUG_INFO) | DUMP_ENDIAN_BIG;
+  }
+  return flags;
+}
+
+static int
+dump_irep(mrb_state *mrb, mrb_irep *irep, uint8_t flags, uint8_t **bin, size_t *bin_size)
+{
+  int result = MRB_DUMP_GENERAL_FAILURE;
+  size_t malloc_size;
+  size_t section_irep_size;
+  size_t section_lineno_size = 0, section_lv_size = 0;
+  uint8_t *cur = NULL;
+  mrb_bool const debug_info_defined = is_debug_info_defined(irep), lv_defined = is_lv_defined(irep);
+  mrb_sym *lv_syms = NULL; uint32_t lv_syms_len = 0;
+  mrb_sym *filenames = NULL; uint16_t filenames_len = 0;
+
+  if (mrb == NULL) {
+    *bin = NULL;
+    return MRB_DUMP_GENERAL_FAILURE;
+  }
+
+  section_irep_size = sizeof(struct rite_section_irep_header);
+  section_irep_size += get_irep_record_size(mrb, irep);
+
+  /* DEBUG section size */
+  if (flags & DUMP_DEBUG_INFO) {
+    if (debug_info_defined) {
+      section_lineno_size += sizeof(struct rite_section_debug_header);
+      /* filename table */
+      filenames = (mrb_sym*)mrb_malloc(mrb, sizeof(mrb_sym) + 1);
+
+      /* filename table size */
+      section_lineno_size += sizeof(uint16_t);
+      section_lineno_size += get_filename_table_size(mrb, irep, &filenames, &filenames_len);
+
+      section_lineno_size += get_debug_record_size(mrb, irep);
+    }
+    else {
+      section_lineno_size += sizeof(struct rite_section_lineno_header);
+      section_lineno_size += get_lineno_record_size(mrb, irep);
+    }
+  }
+
+  if (lv_defined) {
+    section_lv_size += sizeof(struct rite_section_lv_header);
+    create_lv_sym_table(mrb, irep, &lv_syms, &lv_syms_len);
+    section_lv_size += get_lv_section_size(mrb, irep, lv_syms, lv_syms_len);
+  }
+
+  malloc_size = sizeof(struct rite_binary_header) +
+                section_irep_size + section_lineno_size + section_lv_size +
+                sizeof(struct rite_binary_footer);
+  cur = *bin = (uint8_t*)mrb_malloc(mrb, malloc_size);
+  cur += sizeof(struct rite_binary_header);
+
+  result = write_section_irep(mrb, irep, cur, &section_irep_size, flags);
+  if (result != MRB_DUMP_OK) {
+    goto error_exit;
+  }
+  cur += section_irep_size;
+  *bin_size = sizeof(struct rite_binary_header) +
+              section_irep_size + section_lineno_size + section_lv_size +
+              sizeof(struct rite_binary_footer);
+
+  /* write DEBUG section */
+  if (flags & DUMP_DEBUG_INFO) {
+    if (debug_info_defined) {
+      result = write_section_debug(mrb, irep, cur, filenames, filenames_len);
+    }
+    else {
+      result = write_section_lineno(mrb, irep, cur);
+    }
+    if (result != MRB_DUMP_OK) {
+      goto error_exit;
+    }
+    cur += section_lineno_size;
+  }
+
+  if (lv_defined) {
+    result = write_section_lv(mrb, irep, cur, lv_syms, lv_syms_len);
+    if (result != MRB_DUMP_OK) {
+      goto error_exit;
+    }
+    cur += section_lv_size;
+  }
+
+  write_footer(mrb, cur);
+  write_rite_binary_header(mrb, *bin_size, *bin, flags);
+
+error_exit:
+  if (result != MRB_DUMP_OK) {
+    mrb_free(mrb, *bin);
+    *bin = NULL;
+  }
+  mrb_free(mrb, lv_syms);
+  mrb_free(mrb, filenames);
+  return result;
+}
+
+int
+mrb_dump_irep(mrb_state *mrb, mrb_irep *irep, uint8_t flags, uint8_t **bin, size_t *bin_size)
+{
+  return dump_irep(mrb, irep, dump_flags(flags, FLAG_BYTEORDER_NONATIVE), bin, bin_size);
+}
+
+#ifndef MRB_DISABLE_STDIO
+
+int
+mrb_dump_irep_binary(mrb_state *mrb, mrb_irep *irep, uint8_t flags, FILE* fp)
+{
+  uint8_t *bin = NULL;
+  size_t bin_size = 0;
+  int result;
+
+  if (fp == NULL) {
+    return MRB_DUMP_INVALID_ARGUMENT;
+  }
+
+  result = dump_irep(mrb, irep, dump_flags(flags, FLAG_BYTEORDER_NONATIVE), &bin, &bin_size);
+  if (result == MRB_DUMP_OK) {
+    if (fwrite(bin, sizeof(bin[0]), bin_size, fp) != bin_size) {
+      result = MRB_DUMP_WRITE_FAULT;
+    }
+  }
+
+  mrb_free(mrb, bin);
+  return result;
+}
+
+static mrb_bool
+dump_bigendian_p(uint8_t flags)
+{
+  switch (flags & DUMP_ENDIAN_NAT) {
+  case DUMP_ENDIAN_BIG:
+    return TRUE;
+  case DUMP_ENDIAN_LIL:
+    return FALSE;
+  default:
+  case DUMP_ENDIAN_NAT:
+    return bigendian_p();
+  }
+}
+
+int
+mrb_dump_irep_cfunc(mrb_state *mrb, mrb_irep *irep, uint8_t flags, FILE *fp, const char *initname)
+{
+  uint8_t *bin = NULL;
+  size_t bin_size = 0, bin_idx = 0;
+  int result;
+
+  if (fp == NULL || initname == NULL || initname[0] == '\0') {
+    return MRB_DUMP_INVALID_ARGUMENT;
+  }
+  flags = dump_flags(flags, FLAG_BYTEORDER_NATIVE);
+  result = dump_irep(mrb, irep, flags, &bin, &bin_size);
+  if (result == MRB_DUMP_OK) {
+    if (!dump_bigendian_p(flags)) {
+      if (fprintf(fp, "/* dumped in little endian order.\n"
+                  "   use `mrbc -E` option for big endian CPU. */\n") < 0) {
+        mrb_free(mrb, bin);
+        return MRB_DUMP_WRITE_FAULT;
+      }
+    }
+    else {
+      if (fprintf(fp, "/* dumped in big endian order.\n"
+                  "   use `mrbc -e` option for better performance on little endian CPU. */\n") < 0) {
+        mrb_free(mrb, bin);
+        return MRB_DUMP_WRITE_FAULT;
+      }
+    }
+    if (fprintf(fp, "#include <stdint.h>\n") < 0) { /* for uint8_t under at least Darwin */
+      mrb_free(mrb, bin);
+      return MRB_DUMP_WRITE_FAULT;
+    }
+    if (fprintf(fp,
+          "const uint8_t\n"
+          "#if defined __GNUC__\n"
+          "__attribute__((aligned(%u)))\n"
+          "#elif defined _MSC_VER\n"
+          "__declspec(align(%u))\n"
+          "#endif\n"
+          "%s[] = {",
+          (uint16_t)MRB_DUMP_ALIGNMENT, (uint16_t)MRB_DUMP_ALIGNMENT, initname) < 0) {
+      mrb_free(mrb, bin);
+      return MRB_DUMP_WRITE_FAULT;
+    }
+    while (bin_idx < bin_size) {
+      if (bin_idx % 16 == 0) {
+        if (fputs("\n", fp) == EOF) {
+          mrb_free(mrb, bin);
+          return MRB_DUMP_WRITE_FAULT;
+        }
+      }
+      if (fprintf(fp, "0x%02x,", bin[bin_idx++]) < 0) {
+        mrb_free(mrb, bin);
+        return MRB_DUMP_WRITE_FAULT;
+      }
+    }
+    if (fputs("\n};\n", fp) == EOF) {
+      mrb_free(mrb, bin);
+      return MRB_DUMP_WRITE_FAULT;
+    }
+  }
+
+  mrb_free(mrb, bin);
+  return result;
+}
+
+#endif /* MRB_DISABLE_STDIO */
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/enum.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/enum.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/enum.c	(revision 270)
@@ -0,0 +1,14 @@
+/*
+** enum.c - Enumerable module
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+
+void
+mrb_init_enumerable(mrb_state *mrb)
+{
+  mrb_define_module(mrb, "Enumerable");  /* 15.3.2 */
+}
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/error.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/error.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/error.c	(revision 270)
@@ -0,0 +1,460 @@
+/*
+** error.c - Exception class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include <errno.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include "mruby.h"
+#include "mruby/array.h"
+#include "mruby/irep.h"
+#include "mruby/proc.h"
+#include "mruby/string.h"
+#include "mruby/variable.h"
+#include "mruby/debug.h"
+#include "mruby/error.h"
+#include "mruby/class.h"
+#include "mruby/throw.h"
+
+MRB_API mrb_value
+mrb_exc_new(mrb_state *mrb, struct RClass *c, const char *ptr, size_t len)
+{
+  mrb_value arg = mrb_str_new(mrb, ptr, len);
+  return mrb_obj_new(mrb, c, 1, &arg);
+}
+
+MRB_API mrb_value
+mrb_exc_new_str(mrb_state *mrb, struct RClass* c, mrb_value str)
+{
+  str = mrb_str_to_str(mrb, str);
+  return mrb_obj_new(mrb, c, 1, &str);
+}
+
+/*
+ * call-seq:
+ *    Exception.new(msg = nil)   ->  exception
+ *
+ *  Construct a new Exception object, optionally passing in
+ *  a message.
+ */
+
+static mrb_value
+exc_initialize(mrb_state *mrb, mrb_value exc)
+{
+  mrb_value mesg;
+
+  if (mrb_get_args(mrb, "|o", &mesg) == 1) {
+    mrb_iv_set(mrb, exc, mrb_intern_lit(mrb, "mesg"), mesg);
+  }
+  return exc;
+}
+
+/*
+ *  Document-method: exception
+ *
+ *  call-seq:
+ *     exc.exception(string)  ->  an_exception or exc
+ *
+ *  With no argument, or if the argument is the same as the receiver,
+ *  return the receiver. Otherwise, create a new
+ *  exception object of the same class as the receiver, but with a
+ *  message equal to <code>string.to_str</code>.
+ *
+ */
+
+static mrb_value
+exc_exception(mrb_state *mrb, mrb_value self)
+{
+  mrb_value exc;
+  mrb_value a;
+  int argc;
+
+  argc = mrb_get_args(mrb, "|o", &a);
+  if (argc == 0) return self;
+  if (mrb_obj_equal(mrb, self, a)) return self;
+  exc = mrb_obj_clone(mrb, self);
+  mrb_iv_set(mrb, exc, mrb_intern_lit(mrb, "mesg"), a);
+
+  return exc;
+}
+
+/*
+ * call-seq:
+ *   exception.to_s   ->  string
+ *
+ * Returns exception's message (or the name of the exception if
+ * no message is set).
+ */
+
+static mrb_value
+exc_to_s(mrb_state *mrb, mrb_value exc)
+{
+  mrb_value mesg = mrb_attr_get(mrb, exc, mrb_intern_lit(mrb, "mesg"));
+  struct RObject *p;
+
+  if (!mrb_string_p(mesg)) {
+    return mrb_str_new_cstr(mrb, mrb_obj_classname(mrb, exc));
+  }
+  p = mrb_obj_ptr(mesg);
+  if (!p->c) {
+    p->c = mrb->string_class;
+  }
+  return mesg;
+}
+
+/*
+ * call-seq:
+ *   exception.message   ->  string
+ *
+ * Returns the result of invoking <code>exception.to_s</code>.
+ * Normally this returns the exception's message or name. By
+ * supplying a to_str method, exceptions are agreeing to
+ * be used where Strings are expected.
+ */
+
+static mrb_value
+exc_message(mrb_state *mrb, mrb_value exc)
+{
+  return mrb_funcall(mrb, exc, "to_s", 0);
+}
+
+/*
+ * call-seq:
+ *   exception.inspect   -> string
+ *
+ * Returns this exception's file name, line number,
+ * message and class name.
+ * If file name or line number is not set,
+ * returns message and class name.
+ */
+
+static mrb_value
+exc_inspect(mrb_state *mrb, mrb_value exc)
+{
+  mrb_value str, mesg, file, line;
+  mrb_bool append_mesg;
+
+  mesg = mrb_attr_get(mrb, exc, mrb_intern_lit(mrb, "mesg"));
+  file = mrb_attr_get(mrb, exc, mrb_intern_lit(mrb, "file"));
+  line = mrb_attr_get(mrb, exc, mrb_intern_lit(mrb, "line"));
+
+  append_mesg = !mrb_nil_p(mesg);
+  if (append_mesg) {
+    mesg = mrb_obj_as_string(mrb, mesg);
+    append_mesg = RSTRING_LEN(mesg) > 0;
+  }
+
+  if (!mrb_nil_p(file) && !mrb_nil_p(line)) {
+    str = mrb_str_dup(mrb, file);
+    mrb_str_cat_lit(mrb, str, ":");
+    mrb_str_append(mrb, str, line);
+    mrb_str_cat_lit(mrb, str, ": ");
+    if (append_mesg) {
+      mrb_str_cat_str(mrb, str, mesg);
+      mrb_str_cat_lit(mrb, str, " (");
+    }
+    mrb_str_cat_cstr(mrb, str, mrb_obj_classname(mrb, exc));
+    if (append_mesg) {
+      mrb_str_cat_lit(mrb, str, ")");
+    }
+  }
+  else {
+    const char *cname = mrb_obj_classname(mrb, exc);
+    str = mrb_str_new_cstr(mrb, cname);
+    mrb_str_cat_lit(mrb, str, ": ");
+    if (append_mesg) {
+      mrb_str_cat_str(mrb, str, mesg);
+    }
+    else {
+      mrb_str_cat_cstr(mrb, str, cname);
+    }
+  }
+  return str;
+}
+
+
+static void
+exc_debug_info(mrb_state *mrb, struct RObject *exc)
+{
+  mrb_callinfo *ci = mrb->c->ci;
+  mrb_code *pc = ci->pc;
+
+  mrb_obj_iv_set(mrb, exc, mrb_intern_lit(mrb, "ciidx"), mrb_fixnum_value((mrb_int)(ci - mrb->c->cibase)));
+  while (ci >= mrb->c->cibase) {
+    mrb_code *err = ci->err;
+
+    if (!err && pc) err = pc - 1;
+    if (err && ci->proc && !MRB_PROC_CFUNC_P(ci->proc)) {
+      mrb_irep *irep = ci->proc->body.irep;
+
+      int32_t const line = mrb_debug_get_line(irep, (uint32_t)(err - irep->iseq));
+      char const* file = mrb_debug_get_filename(irep, (uint32_t)(err - irep->iseq));
+      if (line != -1 && file) {
+        mrb_obj_iv_set(mrb, exc, mrb_intern_lit(mrb, "file"), mrb_str_new_cstr(mrb, file));
+        mrb_obj_iv_set(mrb, exc, mrb_intern_lit(mrb, "line"), mrb_fixnum_value(line));
+        return;
+      }
+    }
+    pc = ci->pc;
+    ci--;
+  }
+}
+
+MRB_API mrb_noreturn void
+mrb_exc_raise(mrb_state *mrb, mrb_value exc)
+{
+  mrb->exc = mrb_obj_ptr(exc);
+  if (!mrb->gc.out_of_memory) {
+    exc_debug_info(mrb, mrb->exc);
+  }
+  if (!mrb->jmp) {
+    mrb_p(mrb, exc);
+    abort();
+  }
+  MRB_THROW(mrb->jmp);
+}
+
+MRB_API mrb_noreturn void
+mrb_raise(mrb_state *mrb, struct RClass *c, const char *msg)
+{
+  mrb_value mesg;
+  mesg = mrb_str_new_cstr(mrb, msg);
+  mrb_exc_raise(mrb, mrb_exc_new_str(mrb, c, mesg));
+}
+
+MRB_API mrb_value
+mrb_vformat(mrb_state *mrb, const char *format, va_list ap)
+{
+  const char *p = format;
+  const char *b = p;
+  ptrdiff_t size;
+  mrb_value ary = mrb_ary_new_capa(mrb, 4);
+
+  while (*p) {
+    const char c = *p++;
+
+    if (c == '%') {
+      if (*p == 'S') {
+        size = p - b - 1;
+        mrb_ary_push(mrb, ary, mrb_str_new(mrb, b, size));
+        mrb_ary_push(mrb, ary, va_arg(ap, mrb_value));
+        b = p + 1;
+      }
+    }
+    else if (c == '\\') {
+      if (*p) {
+        size = p - b - 1;
+        mrb_ary_push(mrb, ary, mrb_str_new(mrb, b, size));
+        mrb_ary_push(mrb, ary, mrb_str_new(mrb, p, 1));
+        b = ++p;
+      }
+      else {
+        break;
+      }
+    }
+  }
+  if (b == format) {
+    return mrb_str_new_cstr(mrb, format);
+  }
+  else {
+    size = p - b;
+    mrb_ary_push(mrb, ary, mrb_str_new(mrb, b, size));
+    return mrb_ary_join(mrb, ary, mrb_str_new(mrb, NULL, 0));
+  }
+}
+
+MRB_API mrb_value
+mrb_format(mrb_state *mrb, const char *format, ...)
+{
+  va_list ap;
+  mrb_value str;
+
+  va_start(ap, format);
+  str = mrb_vformat(mrb, format, ap);
+  va_end(ap);
+
+  return str;
+}
+
+MRB_API mrb_noreturn void
+mrb_raisef(mrb_state *mrb, struct RClass *c, const char *fmt, ...)
+{
+  va_list args;
+  mrb_value mesg;
+
+  va_start(args, fmt);
+  mesg = mrb_vformat(mrb, fmt, args);
+  va_end(args);
+  mrb_exc_raise(mrb, mrb_exc_new_str(mrb, c, mesg));
+}
+
+MRB_API mrb_noreturn void
+mrb_name_error(mrb_state *mrb, mrb_sym id, const char *fmt, ...)
+{
+  mrb_value exc;
+  mrb_value argv[2];
+  va_list args;
+
+  va_start(args, fmt);
+  argv[0] = mrb_vformat(mrb, fmt, args);
+  va_end(args);
+
+  argv[1] = mrb_symbol_value(id);
+  exc = mrb_obj_new(mrb, E_NAME_ERROR, 2, argv);
+  mrb_exc_raise(mrb, exc);
+}
+
+MRB_API void
+mrb_warn(mrb_state *mrb, const char *fmt, ...)
+{
+#ifndef MRB_DISABLE_STDIO
+  va_list ap;
+  mrb_value str;
+
+  va_start(ap, fmt);
+  str = mrb_vformat(mrb, fmt, ap);
+  fputs("warning: ", stderr);
+  fwrite(RSTRING_PTR(str), RSTRING_LEN(str), 1, stderr);
+  va_end(ap);
+#endif
+}
+
+MRB_API mrb_noreturn void
+mrb_bug(mrb_state *mrb, const char *fmt, ...)
+{
+#ifndef MRB_DISABLE_STDIO
+  va_list ap;
+  mrb_value str;
+
+  va_start(ap, fmt);
+  str = mrb_vformat(mrb, fmt, ap);
+  fputs("bug: ", stderr);
+  fwrite(RSTRING_PTR(str), RSTRING_LEN(str), 1, stderr);
+  va_end(ap);
+#endif
+  exit(EXIT_FAILURE);
+}
+
+static void
+set_backtrace(mrb_state *mrb, mrb_value info, mrb_value bt)
+{
+  mrb_funcall(mrb, info, "set_backtrace", 1, bt);
+}
+
+static mrb_value
+make_exception(mrb_state *mrb, int argc, const mrb_value *argv, mrb_bool isstr)
+{
+  mrb_value mesg;
+  int n;
+
+  mesg = mrb_nil_value();
+  switch (argc) {
+    case 0:
+    break;
+    case 1:
+      if (mrb_nil_p(argv[0]))
+        break;
+      if (isstr) {
+        mesg = mrb_check_string_type(mrb, argv[0]);
+        if (!mrb_nil_p(mesg)) {
+          mesg = mrb_exc_new_str(mrb, E_RUNTIME_ERROR, mesg);
+          break;
+        }
+      }
+      n = 0;
+      goto exception_call;
+
+    case 2:
+    case 3:
+      n = 1;
+exception_call:
+      {
+        mrb_sym exc = mrb_intern_lit(mrb, "exception");
+        if (mrb_respond_to(mrb, argv[0], exc)) {
+          mesg = mrb_funcall_argv(mrb, argv[0], exc, n, argv+1);
+        }
+        else {
+          /* undef */
+          mrb_raise(mrb, E_TYPE_ERROR, "exception class/object expected");
+        }
+      }
+
+      break;
+    default:
+      mrb_raisef(mrb, E_ARGUMENT_ERROR, "wrong number of arguments (%S for 0..3)", mrb_fixnum_value(argc));
+      break;
+  }
+  if (argc > 0) {
+    if (!mrb_obj_is_kind_of(mrb, mesg, mrb->eException_class))
+      mrb_raise(mrb, E_TYPE_ERROR, "exception object expected");
+    if (argc > 2)
+        set_backtrace(mrb, mesg, argv[2]);
+  }
+
+  return mesg;
+}
+
+MRB_API mrb_value
+mrb_make_exception(mrb_state *mrb, int argc, const mrb_value *argv)
+{
+  return make_exception(mrb, argc, argv, TRUE);
+}
+
+MRB_API void
+mrb_sys_fail(mrb_state *mrb, const char *mesg)
+{
+  struct RClass *sce;
+  mrb_int no;
+
+  no = (mrb_int)errno;
+  if (mrb_class_defined(mrb, "SystemCallError")) {
+    sce = mrb_class_get(mrb, "SystemCallError");
+    if (mesg != NULL) {
+      mrb_funcall(mrb, mrb_obj_value(sce), "_sys_fail", 2, mrb_fixnum_value(no), mrb_str_new_cstr(mrb, mesg));
+    }
+    else {
+      mrb_funcall(mrb, mrb_obj_value(sce), "_sys_fail", 1, mrb_fixnum_value(no));
+    }
+  }
+  else {
+    mrb_raise(mrb, E_RUNTIME_ERROR, mesg);
+  }
+}
+
+MRB_API mrb_noreturn void
+mrb_no_method_error(mrb_state *mrb, mrb_sym id, mrb_value args, char const* fmt, ...)
+{
+  mrb_value exc;
+  va_list ap;
+
+  va_start(ap, fmt);
+  exc = mrb_funcall(mrb, mrb_obj_value(E_NOMETHOD_ERROR), "new", 3,
+                    mrb_vformat(mrb, fmt, ap), mrb_symbol_value(id), args);
+  va_end(ap);
+  mrb_exc_raise(mrb, exc);
+}
+
+void
+mrb_init_exception(mrb_state *mrb)
+{
+  struct RClass *exception, *runtime_error, *script_error;
+
+  mrb->eException_class = exception = mrb_define_class(mrb, "Exception", mrb->object_class); /* 15.2.22 */
+  MRB_SET_INSTANCE_TT(exception, MRB_TT_EXCEPTION);
+  mrb_define_class_method(mrb, exception, "exception", mrb_instance_new,  MRB_ARGS_ANY());
+  mrb_define_method(mrb, exception, "exception",       exc_exception,     MRB_ARGS_ANY());
+  mrb_define_method(mrb, exception, "initialize",      exc_initialize,    MRB_ARGS_ANY());
+  mrb_define_method(mrb, exception, "to_s",            exc_to_s,          MRB_ARGS_NONE());
+  mrb_define_method(mrb, exception, "message",         exc_message,       MRB_ARGS_NONE());
+  mrb_define_method(mrb, exception, "inspect",         exc_inspect,       MRB_ARGS_NONE());
+  mrb_define_method(mrb, exception, "backtrace",       mrb_exc_backtrace, MRB_ARGS_NONE());
+
+  mrb->eStandardError_class = mrb_define_class(mrb, "StandardError", mrb->eException_class); /* 15.2.23 */
+  runtime_error = mrb_define_class(mrb, "RuntimeError", mrb->eStandardError_class);          /* 15.2.28 */
+  mrb->nomem_err = mrb_obj_ptr(mrb_exc_new_str_lit(mrb, runtime_error, "Out of memory"));
+  script_error = mrb_define_class(mrb, "ScriptError", mrb->eException_class);                /* 15.2.37 */
+  mrb_define_class(mrb, "SyntaxError", script_error);                                        /* 15.2.38 */
+  mrb_define_class(mrb, "SystemStackError", exception);
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/error.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/error.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/error.h	(revision 270)
@@ -0,0 +1,3 @@
+/* this header file is to be removed soon.
+   added for compatibility purpose (1.0.0) */
+#include "mruby/error.h"
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/etc.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/etc.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/etc.c	(revision 270)
@@ -0,0 +1,220 @@
+/*
+** etc.c -
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+#include "mruby/string.h"
+#include "mruby/data.h"
+#include "mruby/class.h"
+#include "mruby/re.h"
+#include "mruby/irep.h"
+
+MRB_API struct RData*
+mrb_data_object_alloc(mrb_state *mrb, struct RClass *klass, void *ptr, const mrb_data_type *type)
+{
+  struct RData *data;
+
+  data = (struct RData*)mrb_obj_alloc(mrb, MRB_TT_DATA, klass);
+  data->data = ptr;
+  data->type = type;
+
+  return data;
+}
+
+MRB_API void
+mrb_data_check_type(mrb_state *mrb, mrb_value obj, const mrb_data_type *type)
+{
+  if (mrb_type(obj) != MRB_TT_DATA) {
+    mrb_check_type(mrb, obj, MRB_TT_DATA);
+  }
+  if (DATA_TYPE(obj) != type) {
+    const mrb_data_type *t2 = DATA_TYPE(obj);
+
+    if (t2) {
+      mrb_raisef(mrb, E_TYPE_ERROR, "wrong argument type %S (expected %S)",
+                 mrb_str_new_cstr(mrb, t2->struct_name), mrb_str_new_cstr(mrb, type->struct_name));
+    }
+    else {
+      struct RClass *c = mrb_class(mrb, obj);
+
+      mrb_raisef(mrb, E_TYPE_ERROR, "uninitialized %S (expected %S)",
+                 mrb_obj_value(c), mrb_str_new_cstr(mrb, type->struct_name));
+    }
+  }
+}
+
+MRB_API void*
+mrb_data_check_get_ptr(mrb_state *mrb, mrb_value obj, const mrb_data_type *type)
+{
+  if (mrb_type(obj) != MRB_TT_DATA) {
+    return NULL;
+  }
+  if (DATA_TYPE(obj) != type) {
+    return NULL;
+  }
+  return DATA_PTR(obj);
+}
+
+MRB_API void*
+mrb_data_get_ptr(mrb_state *mrb, mrb_value obj, const mrb_data_type *type)
+{
+  mrb_data_check_type(mrb, obj, type);
+  return DATA_PTR(obj);
+}
+
+MRB_API mrb_sym
+mrb_obj_to_sym(mrb_state *mrb, mrb_value name)
+{
+  mrb_sym id;
+
+  switch (mrb_type(name)) {
+    default:
+      name = mrb_check_string_type(mrb, name);
+      if (mrb_nil_p(name)) {
+        name = mrb_inspect(mrb, name);
+        mrb_raisef(mrb, E_TYPE_ERROR, "%S is not a symbol", name);
+      }
+      /* fall through */
+    case MRB_TT_STRING:
+      name = mrb_str_intern(mrb, name);
+      /* fall through */
+    case MRB_TT_SYMBOL:
+      id = mrb_symbol(name);
+  }
+  return id;
+}
+
+MRB_API mrb_int
+mrb_float_id(mrb_float f)
+{
+  const char *p = (const char*)&f;
+  int len = sizeof(f);
+  mrb_int id = 0;
+
+  while (len--) {
+    id = id*65599 + *p;
+    p++;
+  }
+  id = id + (id>>5);
+
+  return id;
+}
+
+MRB_API mrb_int
+mrb_obj_id(mrb_value obj)
+{
+  mrb_int tt = mrb_type(obj);
+
+#define MakeID2(p,t) (mrb_int)(((intptr_t)(p))^(t))
+#define MakeID(p)    MakeID2(p,tt)
+
+  switch (tt) {
+  case MRB_TT_FREE:
+  case MRB_TT_UNDEF:
+    return MakeID(0); /* not define */
+  case MRB_TT_FALSE:
+    if (mrb_nil_p(obj))
+      return MakeID(1);
+    return MakeID(0);
+  case MRB_TT_TRUE:
+    return MakeID(1);
+  case MRB_TT_SYMBOL:
+    return MakeID(mrb_symbol(obj));
+  case MRB_TT_FIXNUM:
+    return MakeID2(mrb_float_id((mrb_float)mrb_fixnum(obj)), MRB_TT_FLOAT);
+  case MRB_TT_FLOAT:
+    return MakeID(mrb_float_id(mrb_float(obj)));
+  case MRB_TT_STRING:
+  case MRB_TT_OBJECT:
+  case MRB_TT_CLASS:
+  case MRB_TT_MODULE:
+  case MRB_TT_ICLASS:
+  case MRB_TT_SCLASS:
+  case MRB_TT_PROC:
+  case MRB_TT_ARRAY:
+  case MRB_TT_HASH:
+  case MRB_TT_RANGE:
+  case MRB_TT_EXCEPTION:
+  case MRB_TT_FILE:
+  case MRB_TT_DATA:
+  default:
+    return MakeID(mrb_ptr(obj));
+  }
+}
+
+#ifdef MRB_WORD_BOXING
+MRB_API mrb_value
+mrb_word_boxing_float_value(mrb_state *mrb, mrb_float f)
+{
+  mrb_value v;
+
+  v.value.p = mrb_obj_alloc(mrb, MRB_TT_FLOAT, mrb->float_class);
+  v.value.fp->f = f;
+  return v;
+}
+
+MRB_API mrb_value
+mrb_word_boxing_float_pool(mrb_state *mrb, mrb_float f)
+{
+  struct RFloat *nf = (struct RFloat *)mrb_malloc(mrb, sizeof(struct RFloat));
+  nf->tt = MRB_TT_FLOAT;
+  nf->c = mrb->float_class;
+  nf->f = f;
+  return mrb_obj_value(nf);
+}
+
+MRB_API mrb_value
+mrb_word_boxing_cptr_value(mrb_state *mrb, void *p)
+{
+  mrb_value v;
+
+  v.value.p = mrb_obj_alloc(mrb, MRB_TT_CPTR, mrb->object_class);
+  v.value.vp->p = p;
+  return v;
+}
+#endif  /* MRB_WORD_BOXING */
+
+MRB_API mrb_bool
+mrb_regexp_p(mrb_state *mrb, mrb_value v)
+{
+  return mrb_class_defined(mrb, REGEXP_CLASS) && mrb_obj_is_kind_of(mrb, v, mrb_class_get(mrb, REGEXP_CLASS));
+}
+
+#if defined _MSC_VER && _MSC_VER < 1900
+
+#ifndef va_copy
+static void
+mrb_msvc_va_copy(va_list *dest, va_list src)
+{
+  *dest = src;
+}
+#define va_copy(dest, src) mrb_msvc_va_copy(&(dest), src)
+#endif
+
+MRB_API int
+mrb_msvc_vsnprintf(char *s, size_t n, const char *format, va_list arg)
+{
+  int cnt;
+  va_list argcp;
+  va_copy(argcp, arg);
+  if (n == 0 || (cnt = _vsnprintf_s(s, n, _TRUNCATE, format, argcp)) < 0) {
+    cnt = _vscprintf(format, arg);
+  }
+  va_end(argcp);
+  return cnt;
+}
+
+MRB_API int
+mrb_msvc_snprintf(char *s, size_t n, const char *format, ...)
+{
+  va_list arg;
+  int ret;
+  va_start(arg, format);
+  ret = mrb_msvc_vsnprintf(s, n, format, arg);
+  va_end(arg);
+  return ret;
+}
+
+#endif  /* defined _MSC_VER && _MSC_VER < 1900 */
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/fmt_fp.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/fmt_fp.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/fmt_fp.c	(revision 270)
@@ -0,0 +1,371 @@
+/*
+
+Most code in this file originates from musl (src/stdio/vfprintf.c)
+which, just like mruby itself, is licensed under the MIT license.
+
+Copyright (c) 2005-2014 Rich Felker, et al.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include <limits.h>
+#include <string.h>
+#include <stdint.h>
+#include <math.h>
+#include <float.h>
+#include <ctype.h>
+
+#include "mruby.h"
+#include "mruby/string.h"
+
+struct fmt_args {
+  mrb_state *mrb;
+  mrb_value str;
+};
+
+#define MAX(a,b) ((a)>(b) ? (a) : (b))
+#define MIN(a,b) ((a)<(b) ? (a) : (b))
+
+/* Convenient bit representation for modifier flags, which all fall
+ * within 31 codepoints of the space character. */
+
+#define ALT_FORM   (1U<<('#'-' '))
+#define ZERO_PAD   (1U<<('0'-' '))
+#define LEFT_ADJ   (1U<<('-'-' '))
+#define PAD_POS    (1U<<(' '-' '))
+#define MARK_POS   (1U<<('+'-' '))
+
+static void
+out(struct fmt_args *f, const char *s, size_t l)
+{
+  mrb_str_cat(f->mrb, f->str, s, l);
+}
+
+#define PAD_SIZE 256
+static void
+pad(struct fmt_args *f, char c, int w, int l, int fl)
+{
+  char pad[PAD_SIZE];
+  if (fl & (LEFT_ADJ | ZERO_PAD) || l >= w) return;
+  l = w - l;
+  memset(pad, c, l>PAD_SIZE ? PAD_SIZE : l);
+  for (; l >= PAD_SIZE; l -= PAD_SIZE)
+    out(f, pad, PAD_SIZE);
+  out(f, pad, l);
+}
+
+static const char xdigits[16] = {
+  '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
+};
+
+static char*
+fmt_u(uint32_t x, char *s)
+{
+  for (; x; x /= 10) *--s = '0' + x % 10;
+  return s;
+}
+
+/* Do not override this check. The floating point printing code below
+ * depends on the float.h constants being right. If they are wrong, it
+ * may overflow the stack. */
+#if LDBL_MANT_DIG == 53
+typedef char compiler_defines_long_double_incorrectly[9-(int)sizeof(long double)];
+#endif
+
+static int
+fmt_fp(struct fmt_args *f, long double y, int w, int p, int fl, int t)
+{
+  uint32_t big[(LDBL_MANT_DIG+28)/29 + 1          // mantissa expansion
+    + (LDBL_MAX_EXP+LDBL_MANT_DIG+28+8)/9]; // exponent expansion
+  uint32_t *a, *d, *r, *z;
+  uint32_t i;
+  int e2=0, e, j, l;
+  char buf[9+LDBL_MANT_DIG/4], *s;
+  const char *prefix="-0X+0X 0X-0x+0x 0x";
+  int pl;
+  char ebuf0[3*sizeof(int)], *ebuf=&ebuf0[3*sizeof(int)], *estr;
+
+  pl=1;
+  if (signbit(y)) {
+    y=-y;
+  } else if (fl & MARK_POS) {
+    prefix+=3;
+  } else if (fl & PAD_POS) {
+    prefix+=6;
+  } else prefix++, pl=0;
+
+  if (!isfinite(y)) {
+    const char *ss = (t&32)?"inf":"INF";
+    if (y!=y) ss=(t&32)?"nan":"NAN";
+    pad(f, ' ', w, 3+pl, fl&~ZERO_PAD);
+    out(f, prefix, pl);
+    out(f, ss, 3);
+    pad(f, ' ', w, 3+pl, fl^LEFT_ADJ);
+    return MAX(w, 3+pl);
+  }
+
+  y = frexp((double)y, &e2) * 2;
+  if (y) e2--;
+
+  if ((t|32)=='a') {
+    long double round = 8.0;
+    int re;
+
+    if (t&32) prefix += 9;
+    pl += 2;
+
+    if (p<0 || p>=LDBL_MANT_DIG/4-1) re=0;
+    else re=LDBL_MANT_DIG/4-1-p;
+
+    if (re) {
+      while (re--) round*=16;
+      if (*prefix=='-') {
+        y=-y;
+        y-=round;
+        y+=round;
+        y=-y;
+      }
+      else {
+        y+=round;
+        y-=round;
+      }
+    }
+
+    estr=fmt_u(e2<0 ? -e2 : e2, ebuf);
+    if (estr==ebuf) *--estr='0';
+    *--estr = (e2<0 ? '-' : '+');
+    *--estr = t+('p'-'a');
+
+    s=buf;
+    do {
+      int x=y;
+      *s++=xdigits[x]|(t&32);
+      y=16*(y-x);
+      if (s-buf==1 && (y||p>0||(fl&ALT_FORM))) *s++='.';
+    } while (y);
+
+    if (p && s-buf-2 < p)
+      l = (p+2) + (ebuf-estr);
+    else
+      l = (s-buf) + (ebuf-estr);
+
+    pad(f, ' ', w, pl+l, fl);
+    out(f, prefix, pl);
+    pad(f, '0', w, pl+l, fl^ZERO_PAD);
+    out(f, buf, s-buf);
+    pad(f, '0', l-(ebuf-estr)-(s-buf), 0, 0);
+    out(f, estr, ebuf-estr);
+    pad(f, ' ', w, pl+l, fl^LEFT_ADJ);
+    return MAX(w, pl+l);
+  }
+  if (p<0) p=6;
+
+  if (y) y *= 268435456.0, e2-=28;
+
+  if (e2<0) a=r=z=big;
+  else a=r=z=big+sizeof(big)/sizeof(*big) - LDBL_MANT_DIG - 1;
+
+  do {
+    *z = y;
+    y = 1000000000*(y-*z++);
+  } while (y);
+
+  while (e2>0) {
+    uint32_t carry=0;
+    int sh=MIN(29,e2);
+    for (d=z-1; d>=a; d--) {
+      uint64_t x = ((uint64_t)*d<<sh)+carry;
+      *d = x % 1000000000;
+      carry = x / 1000000000;
+    }
+    if (carry) *--a = carry;
+    while (z>a && !z[-1]) z--;
+    e2-=sh;
+  }
+  while (e2<0) {
+    uint32_t carry=0, *b;
+    int sh=MIN(9,-e2), need=1+(p+LDBL_MANT_DIG/3+8)/9;
+    for (d=a; d<z; d++) {
+      uint32_t rm = *d & ((1<<sh)-1);
+      *d = (*d>>sh) + carry;
+      carry = (1000000000>>sh) * rm;
+    }
+    if (!*a) a++;
+    if (carry) *z++ = carry;
+    /* Avoid (slow!) computation past requested precision */
+    b = (t|32)=='f' ? r : a;
+    if (z-b > need) z = b+need;
+    e2+=sh;
+  }
+
+  if (a<z) for (i=10, e=9*(r-a); *a>=i; i*=10, e++);
+  else e=0;
+
+  /* Perform rounding: j is precision after the radix (possibly neg) */
+  j = p - ((t|32)!='f')*e - ((t|32)=='g' && p);
+  if (j < 9*(z-r-1)) {
+    uint32_t x;
+    /* We avoid C's broken division of negative numbers */
+    d = r + 1 + ((j+9*LDBL_MAX_EXP)/9 - LDBL_MAX_EXP);
+    j += 9*LDBL_MAX_EXP;
+    j %= 9;
+    for (i=10, j++; j<9; i*=10, j++);
+    x = *d % i;
+    /* Are there any significant digits past j? */
+    if (x || d+1!=z) {
+      long double round = 2/LDBL_EPSILON;
+      long double small;
+      if (*d/i & 1) round += 2;
+      if (x<i/2) small=0.5;
+      else if (x==i/2 && d+1==z) small=1.0;
+      else small=1.5;
+      if (pl && *prefix=='-') round*=-1, small*=-1;
+      *d -= x;
+      /* Decide whether to round by probing round+small */
+      if (round+small != round) {
+        *d = *d + i;
+        while (*d > 999999999) {
+          *d--=0;
+          if (d<a) *--a=0;
+          (*d)++;
+        }
+        for (i=10, e=9*(r-a); *a>=i; i*=10, e++);
+      }
+    }
+    if (z>d+1) z=d+1;
+  }
+  for (; z>a && !z[-1]; z--);
+  
+  if ((t|32)=='g') {
+    if (!p) p++;
+    if (p>e && e>=-4) {
+      t--;
+      p-=e+1;
+    }
+    else {
+      t-=2;
+      p--;
+    }
+    if (!(fl&ALT_FORM)) {
+      /* Count trailing zeros in last place */
+      if (z>a && z[-1]) for (i=10, j=0; z[-1]%i==0; i*=10, j++);
+      else j=9;
+      if ((t|32)=='f')
+        p = MIN(p,MAX(0,9*(z-r-1)-j));
+      else
+        p = MIN(p,MAX(0,9*(z-r-1)+e-j));
+    }
+  }
+  l = 1 + p + (p || (fl&ALT_FORM));
+  if ((t|32)=='f') {
+    if (e>0) l+=e;
+  }
+  else {
+    estr=fmt_u(e<0 ? -e : e, ebuf);
+    while(ebuf-estr<2) *--estr='0';
+    *--estr = (e<0 ? '-' : '+');
+    *--estr = t;
+    l += ebuf-estr;
+  }
+
+  pad(f, ' ', w, pl+l, fl);
+  out(f, prefix, pl);
+  pad(f, '0', w, pl+l, fl^ZERO_PAD);
+
+  if ((t|32)=='f') {
+    if (a>r) a=r;
+    for (d=a; d<=r; d++) {
+      char *ss = fmt_u(*d, buf+9);
+      if (d!=a) while (ss>buf) *--ss='0';
+      else if (ss==buf+9) *--ss='0';
+      out(f, ss, buf+9-ss);
+    }
+    if (p || (fl&ALT_FORM)) out(f, ".", 1);
+    for (; d<z && p>0; d++, p-=9) {
+      char *ss = fmt_u(*d, buf+9);
+      while (ss>buf) *--ss='0';
+      out(f, ss, MIN(9,p));
+    }
+    pad(f, '0', p+9, 9, 0);
+  }
+  else {
+    if (z<=a) z=a+1;
+    for (d=a; d<z && p>=0; d++) {
+      char *ss = fmt_u(*d, buf+9);
+      if (ss==buf+9) *--ss='0';
+      if (d!=a) while (ss>buf) *--ss='0';
+      else {
+        out(f, ss++, 1);
+        if (p>0||(fl&ALT_FORM)) out(f, ".", 1);
+      }
+      out(f, ss, MIN(buf+9-ss, p));
+      p -= buf+9-ss;
+    }
+    pad(f, '0', p+18, 18, 0);
+    out(f, estr, ebuf-estr);
+  }
+
+  pad(f, ' ', w, pl+l, fl^LEFT_ADJ);
+
+  return MAX(w, pl+l);
+}
+
+static int
+fmt_core(struct fmt_args *f, const char *fmt, mrb_float flo)
+{
+  int p;
+
+  if (*fmt != '%') {
+    return -1;
+  }
+  ++fmt;
+
+  if (*fmt == '.') {
+    ++fmt;
+    for (p = 0; ISDIGIT(*fmt); ++fmt) {
+      p = 10 * p + (*fmt - '0');
+    }
+  }
+  else {
+    p = -1;
+  }
+
+  switch (*fmt) {
+  case 'e': case 'f': case 'g': case 'a':
+  case 'E': case 'F': case 'G': case 'A':
+    return fmt_fp(f, flo, 0, p, 0, *fmt);
+  default:
+    return -1;
+  } 
+}
+
+mrb_value
+mrb_float_to_str(mrb_state *mrb, mrb_value flo, const char *fmt)
+{
+  struct fmt_args f;
+
+  f.mrb = mrb;
+  f.str = mrb_str_buf_new(mrb, 24);
+  if (fmt_core(&f, fmt, mrb_float(flo)) < 0) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "invalid format string");
+  }
+  return f.str;
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/gc.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/gc.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/gc.c	(revision 270)
@@ -0,0 +1,1727 @@
+/*
+** gc.c - garbage collector for mruby
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include <string.h>
+#include <stdlib.h>
+#include "mruby.h"
+#include "mruby/array.h"
+#include "mruby/class.h"
+#include "mruby/data.h"
+#include "mruby/hash.h"
+#include "mruby/proc.h"
+#include "mruby/range.h"
+#include "mruby/string.h"
+#include "mruby/variable.h"
+#include "mruby/gc.h"
+#include "mruby/error.h"
+
+/*
+  = Tri-color Incremental Garbage Collection
+
+  mruby's GC is Tri-color Incremental GC with Mark & Sweep.
+  Algorithm details are omitted.
+  Instead, the implementation part is described below.
+
+  == Object's Color
+
+  Each object can be painted in three colors:
+
+    * White - Unmarked.
+    * Gray - Marked, But the child objects are unmarked.
+    * Black - Marked, the child objects are also marked.
+
+  == Two White Types
+
+  There're two white color types in a flip-flop fashion: White-A and White-B,
+  which respectively represent the Current White color (the newly allocated
+  objects in the current GC cycle) and the Sweep Target White color (the
+  dead objects to be swept).
+
+  A and B will be switched just at the beginning of the next GC cycle. At
+  that time, all the dead objects have been swept, while the newly created
+  objects in the current GC cycle which finally remains White are now
+  regarded as dead objects. Instead of traversing all the White-A objects and
+  painting them as White-B, just switch the meaning of White-A and White-B as
+  this will be much cheaper.
+
+  As a result, the objects we sweep in the current GC cycle are always
+  left from the previous GC cycle. This allows us to sweep objects
+  incrementally, without the disturbance of the newly created objects.
+
+  == Execution Timing
+
+  GC Execution Time and Each step interval are decided by live objects count.
+  List of Adjustment API:
+
+    * gc_interval_ratio_set
+    * gc_step_ratio_set
+
+  For details, see the comments for each function.
+
+  == Write Barrier
+
+  mruby implementer and C extension library writer must insert a write
+  barrier when updating a reference from a field of an object.
+  When updating a reference from a field of object A to object B, 
+  two different types of write barrier are available:
+
+    * mrb_field_write_barrier - target B object for a mark.
+    * mrb_write_barrier       - target A object for a mark.
+
+  == Generational Mode
+
+  mruby's GC offers an Generational Mode while re-using the tri-color GC
+  infrastructure. It will treat the Black objects as Old objects after each
+  sweep phase, instead of painting them White. The key ideas are still the same
+  as traditional generational GC:
+
+    * Minor GC - just traverse the Young objects (Gray objects) in the mark
+                 phase, then only sweep the newly created objects, and leave
+                 the Old objects live.
+
+    * Major GC - same as a full regular GC cycle.
+
+  The difference from "traditional" generational GC is, that the major GC
+  in mruby is triggered incrementally in a tri-color manner.
+
+
+  For details, see the comments for each function.
+
+*/
+
+struct free_obj {
+  MRB_OBJECT_HEADER;
+  struct RBasic *next;
+};
+
+typedef struct {
+  union {
+    struct free_obj free;
+    struct RBasic basic;
+    struct RObject object;
+    struct RClass klass;
+    struct RString string;
+    struct RArray array;
+    struct RHash hash;
+    struct RRange range;
+    struct RData data;
+    struct RProc proc;
+    struct RException exc;
+#ifdef MRB_WORD_BOXING
+    struct RFloat floatv;
+    struct RCptr cptr;
+#endif
+  } as;
+} RVALUE;
+
+#ifdef GC_PROFILE
+#include <stdio.h>
+#include <sys/time.h>
+
+static double program_invoke_time = 0;
+static double gc_time = 0;
+static double gc_total_time = 0;
+
+static double
+gettimeofday_time(void)
+{
+  struct timeval tv;
+  gettimeofday(&tv, NULL);
+  return tv.tv_sec + tv.tv_usec * 1e-6;
+}
+
+#define GC_INVOKE_TIME_REPORT(with) do {\
+  fprintf(stderr, "%s\n", with);\
+  fprintf(stderr, "gc_invoke: %19.3f\n", gettimeofday_time() - program_invoke_time);\
+  fprintf(stderr, "is_generational: %d\n", is_generational(gc));\
+  fprintf(stderr, "is_major_gc: %d\n", is_major_gc(mrb));\
+} while(0)
+
+#define GC_TIME_START do {\
+  gc_time = gettimeofday_time();\
+} while(0)
+
+#define GC_TIME_STOP_AND_REPORT do {\
+  gc_time = gettimeofday_time() - gc_time;\
+  gc_total_time += gc_time;\
+  fprintf(stderr, "gc_state: %d\n", gc->state);\
+  fprintf(stderr, "live: %zu\n", gc->live);\
+  fprintf(stderr, "majorgc_old_threshold: %zu\n", gc->majorgc_old_threshold);\
+  fprintf(stderr, "gc_threshold: %zu\n", gc->threshold);\
+  fprintf(stderr, "gc_time: %30.20f\n", gc_time);\
+  fprintf(stderr, "gc_total_time: %30.20f\n\n", gc_total_time);\
+} while(0)
+#else
+#define GC_INVOKE_TIME_REPORT(s)
+#define GC_TIME_START
+#define GC_TIME_STOP_AND_REPORT
+#endif
+
+#ifdef GC_DEBUG
+#define DEBUG(x) (x)
+#else
+#define DEBUG(x)
+#endif
+
+#ifndef MRB_HEAP_PAGE_SIZE
+#define MRB_HEAP_PAGE_SIZE 1024
+#endif
+
+#define GC_STEP_SIZE 1024
+
+/* white: 011, black: 100, gray: 000 */
+#define GC_GRAY 0
+#define GC_WHITE_A 1
+#define GC_WHITE_B (1 << 1)
+#define GC_BLACK (1 << 2)
+#define GC_WHITES (GC_WHITE_A | GC_WHITE_B)
+#define GC_COLOR_MASK 7
+
+#define paint_gray(o) ((o)->color = GC_GRAY)
+#define paint_black(o) ((o)->color = GC_BLACK)
+#define paint_white(o) ((o)->color = GC_WHITES)
+#define paint_partial_white(s, o) ((o)->color = (s)->current_white_part)
+#define is_gray(o) ((o)->color == GC_GRAY)
+#define is_white(o) ((o)->color & GC_WHITES)
+#define is_black(o) ((o)->color & GC_BLACK)
+#define flip_white_part(s) ((s)->current_white_part = other_white_part(s))
+#define other_white_part(s) ((s)->current_white_part ^ GC_WHITES)
+#define is_dead(s, o) (((o)->color & other_white_part(s) & GC_WHITES) || (o)->tt == MRB_TT_FREE)
+
+#define objects(p) ((RVALUE *)p->objects)
+
+MRB_API void*
+mrb_realloc_simple(mrb_state *mrb, void *p,  size_t len)
+{
+  void *p2;
+
+  p2 = (mrb->allocf)(mrb, p, len, mrb->allocf_ud);
+  if (!p2 && len > 0 && mrb->gc.heaps) {
+    mrb_full_gc(mrb);
+    p2 = (mrb->allocf)(mrb, p, len, mrb->allocf_ud);
+  }
+
+  return p2;
+}
+
+MRB_API void*
+mrb_realloc(mrb_state *mrb, void *p, size_t len)
+{
+  void *p2;
+
+  p2 = mrb_realloc_simple(mrb, p, len);
+  if (!p2 && len) {
+    if (mrb->gc.out_of_memory) {
+      /* mrb_panic(mrb); */
+    }
+    else {
+      mrb->gc.out_of_memory = TRUE;
+      mrb_exc_raise(mrb, mrb_obj_value(mrb->nomem_err));
+    }
+  }
+  else {
+    mrb->gc.out_of_memory = FALSE;
+  }
+
+  return p2;
+}
+
+MRB_API void*
+mrb_malloc(mrb_state *mrb, size_t len)
+{
+  return mrb_realloc(mrb, 0, len);
+}
+
+MRB_API void*
+mrb_malloc_simple(mrb_state *mrb, size_t len)
+{
+  return mrb_realloc_simple(mrb, 0, len);
+}
+
+MRB_API void*
+mrb_calloc(mrb_state *mrb, size_t nelem, size_t len)
+{
+  void *p;
+
+  if (nelem > 0 && len > 0 &&
+      nelem <= SIZE_MAX / len) {
+    size_t size;
+    size = nelem * len;
+    p = mrb_malloc(mrb, size);
+
+    memset(p, 0, size);
+  }
+  else {
+    p = NULL;
+  }
+
+  return p;
+}
+
+MRB_API void
+mrb_free(mrb_state *mrb, void *p)
+{
+  (mrb->allocf)(mrb, p, 0, mrb->allocf_ud);
+}
+
+MRB_API mrb_bool
+mrb_object_dead_p(mrb_state *mrb, struct RBasic *object) {
+  return is_dead(&mrb->gc, object);
+}
+
+static void
+link_heap_page(mrb_gc *gc, mrb_heap_page *page)
+{
+  page->next = gc->heaps;
+  if (gc->heaps)
+    gc->heaps->prev = page;
+  gc->heaps = page;
+}
+
+static void
+unlink_heap_page(mrb_gc *gc, mrb_heap_page *page)
+{
+  if (page->prev)
+    page->prev->next = page->next;
+  if (page->next)
+    page->next->prev = page->prev;
+  if (gc->heaps == page)
+    gc->heaps = page->next;
+  page->prev = NULL;
+  page->next = NULL;
+}
+
+static void
+link_free_heap_page(mrb_gc *gc, mrb_heap_page *page)
+{
+  page->free_next = gc->free_heaps;
+  if (gc->free_heaps) {
+    gc->free_heaps->free_prev = page;
+  }
+  gc->free_heaps = page;
+}
+
+static void
+unlink_free_heap_page(mrb_gc *gc, mrb_heap_page *page)
+{
+  if (page->free_prev)
+    page->free_prev->free_next = page->free_next;
+  if (page->free_next)
+    page->free_next->free_prev = page->free_prev;
+  if (gc->free_heaps == page)
+    gc->free_heaps = page->free_next;
+  page->free_prev = NULL;
+  page->free_next = NULL;
+}
+
+static void
+add_heap(mrb_state *mrb, mrb_gc *gc)
+{
+  mrb_heap_page *page = (mrb_heap_page *)mrb_calloc(mrb, 1, sizeof(mrb_heap_page) + MRB_HEAP_PAGE_SIZE * sizeof(RVALUE));
+  RVALUE *p, *e;
+  struct RBasic *prev = NULL;
+
+  for (p = objects(page), e=p+MRB_HEAP_PAGE_SIZE; p<e; p++) {
+    p->as.free.tt = MRB_TT_FREE;
+    p->as.free.next = prev;
+    prev = &p->as.basic;
+  }
+  page->freelist = prev;
+
+  link_heap_page(gc, page);
+  link_free_heap_page(gc, page);
+}
+
+#define DEFAULT_GC_INTERVAL_RATIO 200
+#define DEFAULT_GC_STEP_RATIO 200
+#define DEFAULT_MAJOR_GC_INC_RATIO 200
+#define is_generational(gc) ((gc)->generational)
+#define is_major_gc(gc) (is_generational(gc) && (gc)->full)
+#define is_minor_gc(gc) (is_generational(gc) && !(gc)->full)
+
+void
+mrb_gc_init(mrb_state *mrb, mrb_gc *gc)
+{
+#ifndef MRB_GC_FIXED_ARENA
+  gc->arena = (struct RBasic**)mrb_malloc(mrb, sizeof(struct RBasic*)*MRB_GC_ARENA_SIZE);
+  gc->arena_capa = MRB_GC_ARENA_SIZE;
+#endif
+
+  gc->current_white_part = GC_WHITE_A;
+  gc->heaps = NULL;
+  gc->free_heaps = NULL;
+  add_heap(mrb, gc);
+  gc->interval_ratio = DEFAULT_GC_INTERVAL_RATIO;
+  gc->step_ratio = DEFAULT_GC_STEP_RATIO;
+#ifndef MRB_GC_TURN_OFF_GENERATIONAL
+  gc->generational = TRUE;
+  gc->full = TRUE;
+#endif
+
+#ifdef GC_PROFILE
+  program_invoke_time = gettimeofday_time();
+#endif
+}
+
+static void obj_free(mrb_state *mrb, struct RBasic *obj);
+
+void
+free_heap(mrb_state *mrb, mrb_gc *gc)
+{
+  mrb_heap_page *page = gc->heaps;
+  mrb_heap_page *tmp;
+  RVALUE *p, *e;
+
+  while (page) {
+    tmp = page;
+    page = page->next;
+    for (p = objects(tmp), e=p+MRB_HEAP_PAGE_SIZE; p<e; p++) {
+      if (p->as.free.tt != MRB_TT_FREE)
+        obj_free(mrb, &p->as.basic);
+    }
+    mrb_free(mrb, tmp);
+  }
+}
+
+void
+mrb_gc_destroy(mrb_state *mrb, mrb_gc *gc)
+{
+  free_heap(mrb, gc);
+#ifndef MRB_GC_FIXED_ARENA
+  mrb_free(mrb, gc->arena);
+#endif
+}
+
+static void
+gc_protect(mrb_state *mrb, mrb_gc *gc, struct RBasic *p)
+{
+#ifdef MRB_GC_FIXED_ARENA
+  if (gc->arena_idx >= MRB_GC_ARENA_SIZE) {
+    /* arena overflow error */
+    gc->arena_idx = MRB_GC_ARENA_SIZE - 4; /* force room in arena */
+    mrb_raise(mrb, E_RUNTIME_ERROR, "arena overflow error");
+  }
+#else
+  if (gc->arena_idx >= gc->arena_capa) {
+    /* extend arena */
+    gc->arena_capa = (int)(gc->arena_capa * 1.5);
+    gc->arena = (struct RBasic**)mrb_realloc(mrb, gc->arena, sizeof(struct RBasic*)*gc->arena_capa);
+  }
+#endif
+  gc->arena[gc->arena_idx++] = p;
+}
+
+/* mrb_gc_protect() leaves the object in the arena */
+MRB_API void
+mrb_gc_protect(mrb_state *mrb, mrb_value obj)
+{
+  if (mrb_immediate_p(obj)) return;
+  gc_protect(mrb, &mrb->gc, mrb_basic_ptr(obj));
+}
+
+#define GC_ROOT_NAME "_gc_root_"
+
+/* mrb_gc_register() keeps the object from GC.
+
+   Register your object when it's exported to C world,
+   without reference from Ruby world, e.g. callback
+   arguments.  Don't forget to remove the obejct using
+   mrb_gc_unregister, otherwise your object will leak.
+*/
+
+MRB_API void
+mrb_gc_register(mrb_state *mrb, mrb_value obj)
+{
+  mrb_sym root = mrb_intern_lit(mrb, GC_ROOT_NAME);
+  mrb_value table = mrb_gv_get(mrb, root);
+
+  if (mrb_nil_p(table) || mrb_type(table) != MRB_TT_ARRAY) {
+    table = mrb_ary_new(mrb);
+    mrb_gv_set(mrb, root, table);
+  }
+  mrb_ary_push(mrb, table, obj);
+}
+
+/* mrb_gc_unregister() removes the object from GC root. */
+MRB_API void
+mrb_gc_unregister(mrb_state *mrb, mrb_value obj)
+{
+  mrb_sym root = mrb_intern_lit(mrb, GC_ROOT_NAME);
+  mrb_value table = mrb_gv_get(mrb, root);
+  struct RArray *a;
+  mrb_int i, j;
+
+  if (mrb_nil_p(table)) return;
+  if (mrb_type(table) != MRB_TT_ARRAY) {
+    mrb_gv_set(mrb, root, mrb_nil_value());
+    return;
+  }
+  a = mrb_ary_ptr(table);
+  mrb_ary_modify(mrb, a);
+  for (i=j=0; i<a->len; i++) {
+    if (!mrb_obj_eq(mrb, a->ptr[i], obj)) {
+      a->ptr[j++] = a->ptr[i];
+    }
+  }
+  a->len = j;
+}
+
+MRB_API struct RBasic*
+mrb_obj_alloc(mrb_state *mrb, enum mrb_vtype ttype, struct RClass *cls)
+{
+  struct RBasic *p;
+  static const RVALUE RVALUE_zero = { { { MRB_TT_FALSE } } };
+  mrb_gc *gc = &mrb->gc;
+
+#ifdef MRB_GC_STRESS
+  mrb_full_gc(mrb);
+#endif
+  if (gc->threshold < gc->live) {
+    mrb_incremental_gc(mrb);
+  }
+  if (gc->free_heaps == NULL) {
+    add_heap(mrb, gc);
+  }
+
+  p = gc->free_heaps->freelist;
+  gc->free_heaps->freelist = ((struct free_obj*)p)->next;
+  if (gc->free_heaps->freelist == NULL) {
+    unlink_free_heap_page(gc, gc->free_heaps);
+  }
+
+  gc->live++;
+  gc_protect(mrb, gc, p);
+  *(RVALUE *)p = RVALUE_zero;
+  p->tt = ttype;
+  p->c = cls;
+  paint_partial_white(gc, p);
+  return p;
+}
+
+static inline void
+add_gray_list(mrb_state *mrb, mrb_gc *gc, struct RBasic *obj)
+{
+#ifdef MRB_GC_STRESS
+  if (obj->tt > MRB_TT_MAXDEFINE) {
+    abort();
+  }
+#endif
+  paint_gray(obj);
+  obj->gcnext = gc->gray_list;
+  gc->gray_list = obj;
+}
+
+static void
+mark_context_stack(mrb_state *mrb, struct mrb_context *c)
+{
+  size_t i;
+  size_t e;
+
+  e = c->stack - c->stbase;
+  if (c->ci) e += c->ci->nregs;
+  if (c->stbase + e > c->stend) e = c->stend - c->stbase;
+  for (i=0; i<e; i++) {
+    mrb_value v = c->stbase[i];
+
+    if (!mrb_immediate_p(v)) {
+      if (mrb_basic_ptr(v)->tt == MRB_TT_FREE) {
+        c->stbase[i] = mrb_nil_value();
+      }
+      else {
+        mrb_gc_mark(mrb, mrb_basic_ptr(v));
+      }
+    }
+  }
+}
+
+static void
+mark_context(mrb_state *mrb, struct mrb_context *c)
+{
+  int i, e = 0;
+  mrb_callinfo *ci;
+
+  /* mark stack */
+  mark_context_stack(mrb, c);
+
+  /* mark VM stack */
+  if (c->cibase) {
+    for (ci = c->cibase; ci <= c->ci; ci++) {
+      if (ci->eidx > e) {
+        e = ci->eidx;
+      }
+      mrb_gc_mark(mrb, (struct RBasic*)ci->env);
+      mrb_gc_mark(mrb, (struct RBasic*)ci->proc);
+      mrb_gc_mark(mrb, (struct RBasic*)ci->target_class);
+    }
+  }
+  /* mark ensure stack */
+  for (i=0; i<e; i++) {
+    mrb_gc_mark(mrb, (struct RBasic*)c->ensure[i]);
+  }
+  /* mark fibers */
+  if (c->prev && c->prev->fib) {
+    mrb_gc_mark(mrb, (struct RBasic*)c->prev->fib);
+  }
+}
+
+static void
+gc_mark_children(mrb_state *mrb, mrb_gc *gc, struct RBasic *obj)
+{
+  mrb_assert(is_gray(obj));
+  paint_black(obj);
+  gc->gray_list = obj->gcnext;
+  mrb_gc_mark(mrb, (struct RBasic*)obj->c);
+  switch (obj->tt) {
+  case MRB_TT_ICLASS:
+    {
+      struct RClass *c = (struct RClass*)obj;
+      if (MRB_FLAG_TEST(c, MRB_FLAG_IS_ORIGIN))
+        mrb_gc_mark_mt(mrb, c);
+      mrb_gc_mark(mrb, (struct RBasic*)((struct RClass*)obj)->super);
+    }
+    break;
+
+  case MRB_TT_CLASS:
+  case MRB_TT_MODULE:
+  case MRB_TT_SCLASS:
+    {
+      struct RClass *c = (struct RClass*)obj;
+
+      mrb_gc_mark_mt(mrb, c);
+      mrb_gc_mark(mrb, (struct RBasic*)c->super);
+    }
+    /* fall through */
+
+  case MRB_TT_OBJECT:
+  case MRB_TT_DATA:
+  case MRB_TT_EXCEPTION:
+    mrb_gc_mark_iv(mrb, (struct RObject*)obj);
+    break;
+
+  case MRB_TT_PROC:
+    {
+      struct RProc *p = (struct RProc*)obj;
+
+      mrb_gc_mark(mrb, (struct RBasic*)p->env);
+      mrb_gc_mark(mrb, (struct RBasic*)p->target_class);
+    }
+    break;
+
+  case MRB_TT_ENV:
+    {
+      struct REnv *e = (struct REnv*)obj;
+
+      if (!MRB_ENV_STACK_SHARED_P(e)) {
+        mrb_int i, len;
+
+        len = MRB_ENV_STACK_LEN(e);
+        for (i=0; i<len; i++) {
+          mrb_gc_mark_value(mrb, e->stack[i]);
+        }
+      }
+    }
+    break;
+
+  case MRB_TT_FIBER:
+    {
+      struct mrb_context *c = ((struct RFiber*)obj)->cxt;
+
+      if (c) mark_context(mrb, c);
+    }
+    break;
+
+  case MRB_TT_ARRAY:
+    {
+      struct RArray *a = (struct RArray*)obj;
+      size_t i, e;
+
+      for (i=0,e=a->len; i<e; i++) {
+        mrb_gc_mark_value(mrb, a->ptr[i]);
+      }
+    }
+    break;
+
+  case MRB_TT_HASH:
+    mrb_gc_mark_iv(mrb, (struct RObject*)obj);
+    mrb_gc_mark_hash(mrb, (struct RHash*)obj);
+    break;
+
+  case MRB_TT_STRING:
+    break;
+
+  case MRB_TT_RANGE:
+    {
+      struct RRange *r = (struct RRange*)obj;
+
+      if (r->edges) {
+        mrb_gc_mark_value(mrb, r->edges->beg);
+        mrb_gc_mark_value(mrb, r->edges->end);
+      }
+    }
+    break;
+
+  default:
+    break;
+  }
+}
+
+MRB_API void
+mrb_gc_mark(mrb_state *mrb, struct RBasic *obj)
+{
+  if (obj == 0) return;
+  if (!is_white(obj)) return;
+  mrb_assert((obj)->tt != MRB_TT_FREE);
+  add_gray_list(mrb, &mrb->gc, obj);
+}
+
+static void
+obj_free(mrb_state *mrb, struct RBasic *obj)
+{
+  DEBUG(printf("obj_free(%p,tt=%d)\n",obj,obj->tt));
+  switch (obj->tt) {
+    /* immediate - no mark */
+  case MRB_TT_TRUE:
+  case MRB_TT_FIXNUM:
+  case MRB_TT_SYMBOL:
+    /* cannot happen */
+    return;
+
+  case MRB_TT_FLOAT:
+#ifdef MRB_WORD_BOXING
+    break;
+#else
+    return;
+#endif
+
+  case MRB_TT_OBJECT:
+  case MRB_TT_EXCEPTION:
+    mrb_gc_free_iv(mrb, (struct RObject*)obj);
+    break;
+
+  case MRB_TT_CLASS:
+  case MRB_TT_MODULE:
+  case MRB_TT_SCLASS:
+    mrb_gc_free_mt(mrb, (struct RClass*)obj);
+    mrb_gc_free_iv(mrb, (struct RObject*)obj);
+    break;
+  case MRB_TT_ICLASS:
+    if (MRB_FLAG_TEST(obj, MRB_FLAG_IS_ORIGIN))
+      mrb_gc_free_mt(mrb, (struct RClass*)obj);
+    break;
+  case MRB_TT_ENV:
+    {
+      struct REnv *e = (struct REnv*)obj;
+
+      if (!MRB_ENV_STACK_SHARED_P(e)) {
+        mrb_free(mrb, e->stack);
+        e->stack = NULL;
+      }
+    }
+    break;
+
+  case MRB_TT_FIBER:
+    {
+      struct mrb_context *c = ((struct RFiber*)obj)->cxt;
+
+      if (c != mrb->root_c)
+        mrb_free_context(mrb, c);
+    }
+    break;
+
+  case MRB_TT_ARRAY:
+    if (ARY_SHARED_P(obj))
+      mrb_ary_decref(mrb, ((struct RArray*)obj)->aux.shared);
+    else
+      mrb_free(mrb, ((struct RArray*)obj)->ptr);
+    break;
+
+  case MRB_TT_HASH:
+    mrb_gc_free_iv(mrb, (struct RObject*)obj);
+    mrb_gc_free_hash(mrb, (struct RHash*)obj);
+    break;
+
+  case MRB_TT_STRING:
+    mrb_gc_free_str(mrb, (struct RString*)obj);
+    break;
+
+  case MRB_TT_PROC:
+    {
+      struct RProc *p = (struct RProc*)obj;
+
+      if (!MRB_PROC_CFUNC_P(p) && p->body.irep) {
+        mrb_irep_decref(mrb, p->body.irep);
+      }
+    }
+    break;
+
+  case MRB_TT_RANGE:
+    mrb_free(mrb, ((struct RRange*)obj)->edges);
+    break;
+
+  case MRB_TT_DATA:
+    {
+      struct RData *d = (struct RData*)obj;
+      if (d->type && d->type->dfree) {
+        d->type->dfree(mrb, d->data);
+      }
+      mrb_gc_free_iv(mrb, (struct RObject*)obj);
+    }
+    break;
+
+  default:
+    break;
+  }
+  obj->tt = MRB_TT_FREE;
+}
+
+static void
+root_scan_phase(mrb_state *mrb, mrb_gc *gc)
+{
+  size_t i, e;
+
+  if (!is_minor_gc(gc)) {
+    gc->gray_list = NULL;
+    gc->atomic_gray_list = NULL;
+  }
+
+  mrb_gc_mark_gv(mrb);
+  /* mark arena */
+  for (i=0,e=gc->arena_idx; i<e; i++) {
+    mrb_gc_mark(mrb, gc->arena[i]);
+  }
+  /* mark class hierarchy */
+  mrb_gc_mark(mrb, (struct RBasic*)mrb->object_class);
+  /* mark top_self */
+  mrb_gc_mark(mrb, (struct RBasic*)mrb->top_self);
+  /* mark exception */
+  mrb_gc_mark(mrb, (struct RBasic*)mrb->exc);
+  /* mark pre-allocated exception */
+  mrb_gc_mark(mrb, (struct RBasic*)mrb->nomem_err);
+
+  mark_context(mrb, mrb->root_c);
+  if (mrb->root_c->fib) {
+    mrb_gc_mark(mrb, (struct RBasic*)mrb->root_c->fib);
+  }
+  if (mrb->root_c != mrb->c) {
+    mark_context(mrb, mrb->c);
+  }
+}
+
+static size_t
+gc_gray_mark(mrb_state *mrb, mrb_gc *gc, struct RBasic *obj)
+{
+  size_t children = 0;
+
+  gc_mark_children(mrb, gc, obj);
+
+  switch (obj->tt) {
+  case MRB_TT_ICLASS:
+    children++;
+    break;
+
+  case MRB_TT_CLASS:
+  case MRB_TT_SCLASS:
+  case MRB_TT_MODULE:
+    {
+      struct RClass *c = (struct RClass*)obj;
+
+      children += mrb_gc_mark_iv_size(mrb, (struct RObject*)obj);
+      children += mrb_gc_mark_mt_size(mrb, c);
+      children++;
+    }
+    break;
+
+  case MRB_TT_OBJECT:
+  case MRB_TT_DATA:
+  case MRB_TT_EXCEPTION:
+    children += mrb_gc_mark_iv_size(mrb, (struct RObject*)obj);
+    break;
+
+  case MRB_TT_ENV:
+    children += (int)obj->flags;
+    break;
+
+  case MRB_TT_FIBER:
+    {
+      struct mrb_context *c = ((struct RFiber*)obj)->cxt;
+      size_t i;
+      mrb_callinfo *ci;
+
+      if (!c) break;
+      /* mark stack */
+      i = c->stack - c->stbase;
+      if (c->ci) i += c->ci->nregs;
+      if (c->stbase + i > c->stend) i = c->stend - c->stbase;
+      children += i;
+
+      /* mark ensure stack */
+      children += (c->ci) ? c->ci->eidx : 0;
+
+      /* mark closure */
+      if (c->cibase) {
+        for (i=0, ci = c->cibase; ci <= c->ci; i++, ci++)
+          ;
+      }
+      children += i;
+    }
+    break;
+
+  case MRB_TT_ARRAY:
+    {
+      struct RArray *a = (struct RArray*)obj;
+      children += a->len;
+    }
+    break;
+
+  case MRB_TT_HASH:
+    children += mrb_gc_mark_iv_size(mrb, (struct RObject*)obj);
+    children += mrb_gc_mark_hash_size(mrb, (struct RHash*)obj);
+    break;
+
+  case MRB_TT_PROC:
+  case MRB_TT_RANGE:
+    children+=2;
+    break;
+
+  default:
+    break;
+  }
+  return children;
+}
+
+
+static void
+gc_mark_gray_list(mrb_state *mrb, mrb_gc *gc) {
+  while (gc->gray_list) {
+    if (is_gray(gc->gray_list))
+      gc_mark_children(mrb, gc, gc->gray_list);
+    else
+      gc->gray_list = gc->gray_list->gcnext;
+  }
+}
+
+
+static size_t
+incremental_marking_phase(mrb_state *mrb, mrb_gc *gc, size_t limit)
+{
+  size_t tried_marks = 0;
+
+  while (gc->gray_list && tried_marks < limit) {
+    tried_marks += gc_gray_mark(mrb, gc, gc->gray_list);
+  }
+
+  return tried_marks;
+}
+
+static void
+final_marking_phase(mrb_state *mrb, mrb_gc *gc)
+{
+  mark_context_stack(mrb, mrb->root_c);
+  gc_mark_gray_list(mrb, gc);
+  mrb_assert(gc->gray_list == NULL);
+  gc->gray_list = gc->atomic_gray_list;
+  gc->atomic_gray_list = NULL;
+  gc_mark_gray_list(mrb, gc);
+  mrb_assert(gc->gray_list == NULL);
+}
+
+static void
+prepare_incremental_sweep(mrb_state *mrb, mrb_gc *gc)
+{
+  gc->state = MRB_GC_STATE_SWEEP;
+  gc->sweeps = gc->heaps;
+  gc->live_after_mark = gc->live;
+}
+
+static size_t
+incremental_sweep_phase(mrb_state *mrb, mrb_gc *gc, size_t limit)
+{
+  mrb_heap_page *page = gc->sweeps;
+  size_t tried_sweep = 0;
+
+  while (page && (tried_sweep < limit)) {
+    RVALUE *p = objects(page);
+    RVALUE *e = p + MRB_HEAP_PAGE_SIZE;
+    size_t freed = 0;
+    mrb_bool dead_slot = TRUE;
+    mrb_bool full = (page->freelist == NULL);
+
+    if (is_minor_gc(gc) && page->old) {
+      /* skip a slot which doesn't contain any young object */
+      p = e;
+      dead_slot = FALSE;
+    }
+    while (p<e) {
+      if (is_dead(gc, &p->as.basic)) {
+        if (p->as.basic.tt != MRB_TT_FREE) {
+          obj_free(mrb, &p->as.basic);
+          p->as.free.next = page->freelist;
+          page->freelist = (struct RBasic*)p;
+          freed++;
+        }
+      }
+      else {
+        if (!is_generational(gc))
+          paint_partial_white(gc, &p->as.basic); /* next gc target */
+        dead_slot = 0;
+      }
+      p++;
+    }
+
+    /* free dead slot */
+    if (dead_slot && freed < MRB_HEAP_PAGE_SIZE) {
+      mrb_heap_page *next = page->next;
+
+      unlink_heap_page(gc, page);
+      unlink_free_heap_page(gc, page);
+      mrb_free(mrb, page);
+      page = next;
+    }
+    else {
+      if (full && freed > 0) {
+        link_free_heap_page(gc, page);
+      }
+      if (page->freelist == NULL && is_minor_gc(gc))
+        page->old = TRUE;
+      else
+        page->old = FALSE;
+      page = page->next;
+    }
+    tried_sweep += MRB_HEAP_PAGE_SIZE;
+    gc->live -= freed;
+    gc->live_after_mark -= freed;
+  }
+  gc->sweeps = page;
+  return tried_sweep;
+}
+
+static size_t
+incremental_gc(mrb_state *mrb, mrb_gc *gc, size_t limit)
+{
+  switch (gc->state) {
+  case MRB_GC_STATE_ROOT:
+    root_scan_phase(mrb, gc);
+    gc->state = MRB_GC_STATE_MARK;
+    flip_white_part(gc);
+    return 0;
+  case MRB_GC_STATE_MARK:
+    if (gc->gray_list) {
+      return incremental_marking_phase(mrb, gc, limit);
+    }
+    else {
+      final_marking_phase(mrb, gc);
+      prepare_incremental_sweep(mrb, gc);
+      return 0;
+    }
+  case MRB_GC_STATE_SWEEP: {
+     size_t tried_sweep = 0;
+     tried_sweep = incremental_sweep_phase(mrb, gc, limit);
+     if (tried_sweep == 0)
+       gc->state = MRB_GC_STATE_ROOT;
+     return tried_sweep;
+  }
+  default:
+    /* unknown state */
+    mrb_assert(0);
+    return 0;
+  }
+}
+
+static void
+incremental_gc_until(mrb_state *mrb, mrb_gc *gc, mrb_gc_state to_state)
+{
+  do {
+    incremental_gc(mrb, gc, SIZE_MAX);
+  } while (gc->state != to_state);
+}
+
+static void
+incremental_gc_step(mrb_state *mrb, mrb_gc *gc)
+{
+  size_t limit = 0, result = 0;
+  limit = (GC_STEP_SIZE/100) * gc->step_ratio;
+  while (result < limit) {
+    result += incremental_gc(mrb, gc, limit);
+    if (gc->state == MRB_GC_STATE_ROOT)
+      break;
+  }
+
+  gc->threshold = gc->live + GC_STEP_SIZE;
+}
+
+static void
+clear_all_old(mrb_state *mrb, mrb_gc *gc)
+{
+  mrb_bool origin_mode = gc->generational;
+
+  mrb_assert(is_generational(gc));
+  if (is_major_gc(gc)) {
+    /* finish the half baked GC */
+    incremental_gc_until(mrb, gc, MRB_GC_STATE_ROOT);
+  }
+
+  /* Sweep the dead objects, then reset all the live objects
+   * (including all the old objects, of course) to white. */
+  gc->generational = FALSE;
+  prepare_incremental_sweep(mrb, gc);
+  incremental_gc_until(mrb, gc, MRB_GC_STATE_ROOT);
+  gc->generational = origin_mode;
+
+  /* The gray objects have already been painted as white */
+  gc->atomic_gray_list = gc->gray_list = NULL;
+}
+
+MRB_API void
+mrb_incremental_gc(mrb_state *mrb)
+{
+  mrb_gc *gc = &mrb->gc;
+
+  if (gc->disabled) return;
+
+  GC_INVOKE_TIME_REPORT("mrb_incremental_gc()");
+  GC_TIME_START;
+
+  if (is_minor_gc(gc)) {
+    incremental_gc_until(mrb, gc, MRB_GC_STATE_ROOT);
+  }
+  else {
+    incremental_gc_step(mrb, gc);
+  }
+
+  if (gc->state == MRB_GC_STATE_ROOT) {
+    mrb_assert(gc->live >= gc->live_after_mark);
+    gc->threshold = (gc->live_after_mark/100) * gc->interval_ratio;
+    if (gc->threshold < GC_STEP_SIZE) {
+      gc->threshold = GC_STEP_SIZE;
+    }
+
+    if (is_major_gc(gc)) {
+      gc->majorgc_old_threshold = gc->live_after_mark/100 * DEFAULT_MAJOR_GC_INC_RATIO;
+      gc->full = FALSE;
+    }
+    else if (is_minor_gc(gc)) {
+      if (gc->live > gc->majorgc_old_threshold) {
+        clear_all_old(mrb, gc);
+        gc->full = TRUE;
+      }
+    }
+  }
+
+  GC_TIME_STOP_AND_REPORT;
+}
+
+/* Perform a full gc cycle */
+MRB_API void
+mrb_full_gc(mrb_state *mrb)
+{
+  mrb_gc *gc = &mrb->gc;
+
+  if (gc->disabled) return;
+
+  GC_INVOKE_TIME_REPORT("mrb_full_gc()");
+  GC_TIME_START;
+
+  if (is_generational(gc)) {
+    /* clear all the old objects back to young */
+    clear_all_old(mrb, gc);
+    gc->full = TRUE;
+  }
+  else if (gc->state != MRB_GC_STATE_ROOT) {
+    /* finish half baked GC cycle */
+    incremental_gc_until(mrb, gc, MRB_GC_STATE_ROOT);
+  }
+
+  incremental_gc_until(mrb, gc, MRB_GC_STATE_ROOT);
+  gc->threshold = (gc->live_after_mark/100) * gc->interval_ratio;
+
+  if (is_generational(gc)) {
+    gc->majorgc_old_threshold = gc->live_after_mark/100 * DEFAULT_MAJOR_GC_INC_RATIO;
+    gc->full = FALSE;
+  }
+
+  GC_TIME_STOP_AND_REPORT;
+}
+
+MRB_API void
+mrb_garbage_collect(mrb_state *mrb)
+{
+  mrb_full_gc(mrb);
+}
+
+MRB_API int
+mrb_gc_arena_save(mrb_state *mrb)
+{
+  return mrb->gc.arena_idx;
+}
+
+MRB_API void
+mrb_gc_arena_restore(mrb_state *mrb, int idx)
+{
+  mrb_gc *gc = &mrb->gc;
+
+#ifndef MRB_GC_FIXED_ARENA
+  int capa = gc->arena_capa;
+
+  if (idx < capa / 2) {
+    capa = (int)(capa * 0.66);
+    if (capa < MRB_GC_ARENA_SIZE) {
+      capa = MRB_GC_ARENA_SIZE;
+    }
+    if (capa != gc->arena_capa) {
+      gc->arena = (struct RBasic**)mrb_realloc(mrb, gc->arena, sizeof(struct RBasic*)*capa);
+      gc->arena_capa = capa;
+    }
+  }
+#endif
+  gc->arena_idx = idx;
+}
+
+/*
+ * Field write barrier
+ *   Paint obj(Black) -> value(White) to obj(Black) -> value(Gray).
+ */
+
+MRB_API void
+mrb_field_write_barrier(mrb_state *mrb, struct RBasic *obj, struct RBasic *value)
+{
+  mrb_gc *gc = &mrb->gc;
+
+  if (!is_black(obj)) return;
+  if (!is_white(value)) return;
+
+  mrb_assert(gc->state == MRB_GC_STATE_MARK || (!is_dead(gc, value) && !is_dead(gc, obj)));
+  mrb_assert(is_generational(gc) || gc->state != MRB_GC_STATE_ROOT);
+
+  if (is_generational(gc) || gc->state == MRB_GC_STATE_MARK) {
+    add_gray_list(mrb, gc, value);
+  }
+  else {
+    mrb_assert(gc->state == MRB_GC_STATE_SWEEP);
+    paint_partial_white(gc, obj); /* for never write barriers */
+  }
+}
+
+/*
+ * Write barrier
+ *   Paint obj(Black) to obj(Gray).
+ *
+ *   The object that is painted gray will be traversed atomically in final
+ *   mark phase. So you use this write barrier if it's frequency written spot.
+ *   e.g. Set element on Array.
+ */
+
+MRB_API void
+mrb_write_barrier(mrb_state *mrb, struct RBasic *obj)
+{
+  mrb_gc *gc = &mrb->gc;
+
+  if (!is_black(obj)) return;
+
+  mrb_assert(!is_dead(gc, obj));
+  mrb_assert(is_generational(gc) || gc->state != MRB_GC_STATE_ROOT);
+  paint_gray(obj);
+  obj->gcnext = gc->atomic_gray_list;
+  gc->atomic_gray_list = obj;
+}
+
+/*
+ *  call-seq:
+ *     GC.start                     -> nil
+ *
+ *  Initiates full garbage collection.
+ *
+ */
+
+static mrb_value
+gc_start(mrb_state *mrb, mrb_value obj)
+{
+  mrb_full_gc(mrb);
+  return mrb_nil_value();
+}
+
+/*
+ *  call-seq:
+ *     GC.enable    -> true or false
+ *
+ *  Enables garbage collection, returning <code>true</code> if garbage
+ *  collection was previously disabled.
+ *
+ *     GC.disable   #=> false
+ *     GC.enable    #=> true
+ *     GC.enable    #=> false
+ *
+ */
+
+static mrb_value
+gc_enable(mrb_state *mrb, mrb_value obj)
+{
+  mrb_bool old = mrb->gc.disabled;
+
+  mrb->gc.disabled = FALSE;
+
+  return mrb_bool_value(old);
+}
+
+/*
+ *  call-seq:
+ *     GC.disable    -> true or false
+ *
+ *  Disables garbage collection, returning <code>true</code> if garbage
+ *  collection was already disabled.
+ *
+ *     GC.disable   #=> false
+ *     GC.disable   #=> true
+ *
+ */
+
+static mrb_value
+gc_disable(mrb_state *mrb, mrb_value obj)
+{
+  mrb_bool old = mrb->gc.disabled;
+
+  mrb->gc.disabled = TRUE;
+
+  return mrb_bool_value(old);
+}
+
+/*
+ *  call-seq:
+ *     GC.interval_ratio      -> fixnum
+ *
+ *  Returns ratio of GC interval. Default value is 200(%).
+ *
+ */
+
+static mrb_value
+gc_interval_ratio_get(mrb_state *mrb, mrb_value obj)
+{
+  return mrb_fixnum_value(mrb->gc.interval_ratio);
+}
+
+/*
+ *  call-seq:
+ *     GC.interval_ratio = fixnum    -> nil
+ *
+ *  Updates ratio of GC interval. Default value is 200(%).
+ *  GC start as soon as after end all step of GC if you set 100(%).
+ *
+ */
+
+static mrb_value
+gc_interval_ratio_set(mrb_state *mrb, mrb_value obj)
+{
+  mrb_int ratio;
+
+  mrb_get_args(mrb, "i", &ratio);
+  mrb->gc.interval_ratio = ratio;
+  return mrb_nil_value();
+}
+
+/*
+ *  call-seq:
+ *     GC.step_ratio    -> fixnum
+ *
+ *  Returns step span ratio of Incremental GC. Default value is 200(%).
+ *
+ */
+
+static mrb_value
+gc_step_ratio_get(mrb_state *mrb, mrb_value obj)
+{
+  return mrb_fixnum_value(mrb->gc.step_ratio);
+}
+
+/*
+ *  call-seq:
+ *     GC.step_ratio = fixnum   -> nil
+ *
+ *  Updates step span ratio of Incremental GC. Default value is 200(%).
+ *  1 step of incrementalGC becomes long if a rate is big.
+ *
+ */
+
+static mrb_value
+gc_step_ratio_set(mrb_state *mrb, mrb_value obj)
+{
+  mrb_int ratio;
+
+  mrb_get_args(mrb, "i", &ratio);
+  mrb->gc.step_ratio = ratio;
+  return mrb_nil_value();
+}
+
+static void
+change_gen_gc_mode(mrb_state *mrb, mrb_gc *gc, mrb_bool enable)
+{
+  if (is_generational(gc) && !enable) {
+    clear_all_old(mrb, gc);
+    mrb_assert(gc->state == MRB_GC_STATE_ROOT);
+    gc->full = FALSE;
+  }
+  else if (!is_generational(gc) && enable) {
+    incremental_gc_until(mrb, gc, MRB_GC_STATE_ROOT);
+    gc->majorgc_old_threshold = gc->live_after_mark/100 * DEFAULT_MAJOR_GC_INC_RATIO;
+    gc->full = FALSE;
+  }
+  gc->generational = enable;
+}
+
+/*
+ *  call-seq:
+ *     GC.generational_mode -> true or false
+ *
+ *  Returns generational or normal gc mode.
+ *
+ */
+
+static mrb_value
+gc_generational_mode_get(mrb_state *mrb, mrb_value self)
+{
+  return mrb_bool_value(mrb->gc.generational);
+}
+
+/*
+ *  call-seq:
+ *     GC.generational_mode = true or false -> true or false
+ *
+ *  Changes to generational or normal gc mode.
+ *
+ */
+
+static mrb_value
+gc_generational_mode_set(mrb_state *mrb, mrb_value self)
+{
+  mrb_bool enable;
+
+  mrb_get_args(mrb, "b", &enable);
+  if (mrb->gc.generational != enable)
+    change_gen_gc_mode(mrb, &mrb->gc, enable);
+
+  return mrb_bool_value(enable);
+}
+
+
+static void
+gc_each_objects(mrb_state *mrb, mrb_gc *gc, mrb_each_object_callback *callback, void *data)
+{
+  mrb_heap_page* page = gc->heaps;
+
+  while (page != NULL) {
+    RVALUE *p, *pend;
+
+    p = objects(page);
+    pend = p + MRB_HEAP_PAGE_SIZE;
+    for (;p < pend; p++) {
+      (*callback)(mrb, &p->as.basic, data);
+    }
+
+    page = page->next;
+  }
+}
+
+void
+mrb_objspace_each_objects(mrb_state *mrb, mrb_each_object_callback *callback, void *data)
+{
+  gc_each_objects(mrb, &mrb->gc, callback, data);
+}
+
+#ifdef GC_TEST
+#ifdef GC_DEBUG
+static mrb_value gc_test(mrb_state *, mrb_value);
+#endif
+#endif
+
+void
+mrb_init_gc(mrb_state *mrb)
+{
+  struct RClass *gc;
+
+  gc = mrb_define_module(mrb, "GC");
+
+  mrb_define_class_method(mrb, gc, "start", gc_start, MRB_ARGS_NONE());
+  mrb_define_class_method(mrb, gc, "enable", gc_enable, MRB_ARGS_NONE());
+  mrb_define_class_method(mrb, gc, "disable", gc_disable, MRB_ARGS_NONE());
+  mrb_define_class_method(mrb, gc, "interval_ratio", gc_interval_ratio_get, MRB_ARGS_NONE());
+  mrb_define_class_method(mrb, gc, "interval_ratio=", gc_interval_ratio_set, MRB_ARGS_REQ(1));
+  mrb_define_class_method(mrb, gc, "step_ratio", gc_step_ratio_get, MRB_ARGS_NONE());
+  mrb_define_class_method(mrb, gc, "step_ratio=", gc_step_ratio_set, MRB_ARGS_REQ(1));
+  mrb_define_class_method(mrb, gc, "generational_mode=", gc_generational_mode_set, MRB_ARGS_REQ(1));
+  mrb_define_class_method(mrb, gc, "generational_mode", gc_generational_mode_get, MRB_ARGS_NONE());
+#ifdef GC_TEST
+#ifdef GC_DEBUG
+  mrb_define_class_method(mrb, gc, "test", gc_test, MRB_ARGS_NONE());
+#endif
+#endif
+}
+
+#ifdef GC_TEST
+#ifdef GC_DEBUG
+void
+test_mrb_field_write_barrier(void)
+{
+  mrb_state *mrb = mrb_open();
+  struct RBasic *obj, *value;
+  mrb_gc *gc = &mrb->gc;
+
+  puts("test_mrb_field_write_barrier");
+  gc->generational = FALSE;
+  obj = mrb_basic_ptr(mrb_ary_new(mrb));
+  value = mrb_basic_ptr(mrb_str_new_lit(mrb, "value"));
+  paint_black(obj);
+  paint_partial_white(gc, value);
+
+
+  puts("  in MRB_GC_STATE_MARK");
+  gc->state = MRB_GC_STATE_MARK;
+  mrb_field_write_barrier(mrb, obj, value);
+
+  mrb_assert(is_gray(value));
+
+
+  puts("  in MRB_GC_STATE_SWEEP");
+  paint_partial_white(gc, value);
+  gc->state = MRB_GC_STATE_SWEEP;
+  mrb_field_write_barrier(mrb, obj, value);
+
+  mrb_assert(obj->color & gc->current_white_part);
+  mrb_assert(value->color & gc->current_white_part);
+
+
+  puts("  fail with black");
+  gc->state = MRB_GC_STATE_MARK;
+  paint_white(obj);
+  paint_partial_white(gc, value);
+  mrb_field_write_barrier(mrb, obj, value);
+
+  mrb_assert(obj->color & gc->current_white_part);
+
+
+  puts("  fail with gray");
+  gc->state = MRB_GC_STATE_MARK;
+  paint_black(obj);
+  paint_gray(value);
+  mrb_field_write_barrier(mrb, obj, value);
+
+  mrb_assert(is_gray(value));
+
+
+  {
+    puts("test_mrb_field_write_barrier_value");
+    obj = mrb_basic_ptr(mrb_ary_new(mrb));
+    mrb_value value = mrb_str_new_lit(mrb, "value");
+    paint_black(obj);
+    paint_partial_white(gc, mrb_basic_ptr(value));
+
+    gc->state = MRB_GC_STATE_MARK;
+    mrb_field_write_barrier_value(mrb, obj, value);
+
+    mrb_assert(is_gray(mrb_basic_ptr(value)));
+  }
+
+  mrb_close(mrb);
+}
+
+void
+test_mrb_write_barrier(void)
+{
+  mrb_state *mrb = mrb_open();
+  struct RBasic *obj;
+  mrb_gc *gc = &mrb->gc;
+
+  puts("test_mrb_write_barrier");
+  obj = mrb_basic_ptr(mrb_ary_new(mrb));
+  paint_black(obj);
+
+  puts("  in MRB_GC_STATE_MARK");
+  gc->state = MRB_GC_STATE_MARK;
+  mrb_write_barrier(mrb, obj);
+
+  mrb_assert(is_gray(obj));
+  mrb_assert(gc->atomic_gray_list == obj);
+
+
+  puts("  fail with gray");
+  paint_gray(obj);
+  mrb_write_barrier(mrb, obj);
+
+  mrb_assert(is_gray(obj));
+
+  mrb_close(mrb);
+}
+
+void
+test_add_gray_list(void)
+{
+  mrb_state *mrb = mrb_open();
+  struct RBasic *obj1, *obj2;
+  mrb_gc *gc = &mrb->gc;
+
+  puts("test_add_gray_list");
+  change_gen_gc_mode(mrb, gc, FALSE);
+  mrb_assert(gc->gray_list == NULL);
+  obj1 = mrb_basic_ptr(mrb_str_new_lit(mrb, "test"));
+  add_gray_list(mrb, gc, obj1);
+  mrb_assert(gc->gray_list == obj1);
+  mrb_assert(is_gray(obj1));
+
+  obj2 = mrb_basic_ptr(mrb_str_new_lit(mrb, "test"));
+  add_gray_list(mrb, gc, obj2);
+  mrb_assert(gc->gray_list == obj2);
+  mrb_assert(gc->gray_list->gcnext == obj1);
+  mrb_assert(is_gray(obj2));
+
+  mrb_close(mrb);
+}
+
+void
+test_gc_gray_mark(void)
+{
+  mrb_state *mrb = mrb_open();
+  mrb_value obj_v, value_v;
+  struct RBasic *obj;
+  size_t gray_num = 0;
+  mrb_gc *gc = &mrb->gc;
+
+  puts("test_gc_gray_mark");
+
+  puts("  in MRB_TT_CLASS");
+  obj = (struct RBasic*)mrb->object_class;
+  paint_gray(obj);
+  gray_num = gc_gray_mark(mrb, gc, obj);
+  mrb_assert(is_black(obj));
+  mrb_assert(gray_num > 1);
+
+  puts("  in MRB_TT_ARRAY");
+  obj_v = mrb_ary_new(mrb);
+  value_v = mrb_str_new_lit(mrb, "test");
+  paint_gray(mrb_basic_ptr(obj_v));
+  paint_partial_white(gc, mrb_basic_ptr(value_v));
+  mrb_ary_push(mrb, obj_v, value_v);
+  gray_num = gc_gray_mark(mrb, gc, mrb_basic_ptr(obj_v));
+  mrb_assert(is_black(mrb_basic_ptr(obj_v)));
+  mrb_assert(is_gray(mrb_basic_ptr(value_v)));
+  mrb_assert(gray_num == 1);
+
+  mrb_close(mrb);
+}
+
+void
+test_incremental_gc(void)
+{
+  mrb_state *mrb = mrb_open();
+  size_t max = ~0, live = 0, total = 0, freed = 0;
+  RVALUE *free;
+  mrb_heap_page *page;
+  mrb_gc *gc = &mrb->gc;
+
+  puts("test_incremental_gc");
+  change_gen_gc_mode(mrb, gc, FALSE);
+
+  puts("  in mrb_full_gc");
+  mrb_full_gc(mrb);
+
+  mrb_assert(gc->state == MRB_GC_STATE_ROOT);
+  puts("  in MRB_GC_STATE_ROOT");
+  incremental_gc(mrb, gc, max);
+  mrb_assert(gc->state == MRB_GC_STATE_MARK);
+  puts("  in MRB_GC_STATE_MARK");
+  incremental_gc_until(mrb, gc, MRB_GC_STATE_SWEEP);
+  mrb_assert(gc->state == MRB_GC_STATE_SWEEP);
+
+  puts("  in MRB_GC_STATE_SWEEP");
+  page = gc->heaps;
+  while (page) {
+    RVALUE *p = objects(page);
+    RVALUE *e = p + MRB_HEAP_PAGE_SIZE;
+    while (p<e) {
+      if (is_black(&p->as.basic)) {
+        live++;
+      }
+      if (is_gray(&p->as.basic) && !is_dead(gc, &p->as.basic)) {
+        printf("%p\n", &p->as.basic);
+      }
+      p++;
+    }
+    page = page->next;
+    total += MRB_HEAP_PAGE_SIZE;
+  }
+
+  mrb_assert(gc->gray_list == NULL);
+
+  incremental_gc(mrb, gc, max);
+  mrb_assert(gc->state == MRB_GC_STATE_SWEEP);
+
+  incremental_gc(mrb, gc, max);
+  mrb_assert(gc->state == MRB_GC_STATE_ROOT);
+
+  free = (RVALUE*)gc->heaps->freelist;
+  while (free) {
+   freed++;
+   free = (RVALUE*)free->as.free.next;
+  }
+
+  mrb_assert(gc->live == live);
+  mrb_assert(gc->live == total-freed);
+
+  puts("test_incremental_gc(gen)");
+  incremental_gc_until(mrb, gc, MRB_GC_STATE_SWEEP);
+  change_gen_gc_mode(mrb, gc, TRUE);
+
+  mrb_assert(gc->full == FALSE);
+  mrb_assert(gc->state == MRB_GC_STATE_ROOT);
+
+  puts("  in minor");
+  mrb_assert(is_minor_gc(gc));
+  mrb_assert(gc->majorgc_old_threshold > 0);
+  gc->majorgc_old_threshold = 0;
+  mrb_incremental_gc(mrb);
+  mrb_assert(gc->full == TRUE);
+  mrb_assert(gc->state == MRB_GC_STATE_ROOT);
+
+  puts("  in major");
+  mrb_assert(is_major_gc(gc));
+  do {
+    mrb_incremental_gc(mrb);
+  } while (gc->state != MRB_GC_STATE_ROOT);
+  mrb_assert(gc->full == FALSE);
+
+  mrb_close(mrb);
+}
+
+void
+test_incremental_sweep_phase(void)
+{
+  mrb_state *mrb = mrb_open();
+  mrb_gc *gc = &mrb->gc;
+
+  puts("test_incremental_sweep_phase");
+
+  add_heap(mrb, gc);
+  gc->sweeps = gc->heaps;
+
+  mrb_assert(gc->heaps->next->next == NULL);
+  mrb_assert(gc->free_heaps->next->next == NULL);
+  incremental_sweep_phase(mrb, gc, MRB_HEAP_PAGE_SIZE * 3);
+
+  mrb_assert(gc->heaps->next == NULL);
+  mrb_assert(gc->heaps == gc->free_heaps);
+
+  mrb_close(mrb);
+}
+
+static mrb_value
+gc_test(mrb_state *mrb, mrb_value self)
+{
+  test_mrb_field_write_barrier();
+  test_mrb_write_barrier();
+  test_add_gray_list();
+  test_gc_gray_mark();
+  test_incremental_gc();
+  test_incremental_sweep_phase();
+  return mrb_nil_value();
+}
+#endif  /* GC_DEBUG */
+#endif  /* GC_TEST */
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/hash.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/hash.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/hash.c	(revision 270)
@@ -0,0 +1,858 @@
+/*
+** hash.c - Hash class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+#include "mruby/array.h"
+#include "mruby/class.h"
+#include "mruby/hash.h"
+#include "mruby/khash.h"
+#include "mruby/string.h"
+#include "mruby/variable.h"
+
+/* a function to get hash value of a float number */
+mrb_int mrb_float_id(mrb_float f);
+
+static inline khint_t
+mrb_hash_ht_hash_func(mrb_state *mrb, mrb_value key)
+{
+  enum mrb_vtype t = mrb_type(key);
+  mrb_value hv;
+  const char *p;
+  mrb_int i, len;
+  khint_t h;
+
+  switch (t) {
+  case MRB_TT_STRING:
+    p = RSTRING_PTR(key);
+    len = RSTRING_LEN(key);
+    h = 0;
+    for (i=0; i<len; i++) {
+      h = (h << 5) - h + *p++;
+    }
+    return h;
+
+  case MRB_TT_SYMBOL:
+    h = (khint_t)mrb_symbol(key);
+    return kh_int_hash_func(mrb, h);
+
+  case MRB_TT_FIXNUM:
+    h = (khint_t)mrb_float_id((mrb_float)mrb_fixnum(key));
+    return kh_int_hash_func(mrb, h);
+
+  case MRB_TT_FLOAT:
+    h = (khint_t)mrb_float_id(mrb_float(key));
+    return kh_int_hash_func(mrb, h);
+
+  default:
+    hv = mrb_funcall(mrb, key, "hash", 0);
+    h = (khint_t)t ^ mrb_fixnum(hv);
+    return kh_int_hash_func(mrb, h);
+  }
+}
+
+static inline khint_t
+mrb_hash_ht_hash_equal(mrb_state *mrb, mrb_value a, mrb_value b)
+{
+  enum mrb_vtype t = mrb_type(a);
+
+  switch (t) {
+  case MRB_TT_STRING:
+    return mrb_str_equal(mrb, a, b);
+
+  case MRB_TT_SYMBOL:
+    if (mrb_type(b) != MRB_TT_SYMBOL) return FALSE;
+    return mrb_symbol(a) == mrb_symbol(b);
+
+  case MRB_TT_FIXNUM:
+    switch (mrb_type(b)) {
+    case MRB_TT_FIXNUM:
+      return mrb_fixnum(a) == mrb_fixnum(b);
+    case MRB_TT_FLOAT:
+      return (mrb_float)mrb_fixnum(a) == mrb_float(b);
+    default:
+      return FALSE;
+    }
+
+  case MRB_TT_FLOAT:
+    switch (mrb_type(b)) {
+    case MRB_TT_FIXNUM:
+      return mrb_float(a) == (mrb_float)mrb_fixnum(b);
+    case MRB_TT_FLOAT:
+      return mrb_float(a) == mrb_float(b);
+    default:
+      return FALSE;
+    }
+
+  default:
+    return mrb_eql(mrb, a, b);
+  }
+}
+
+typedef struct {
+  mrb_value v;
+  mrb_int n;
+} mrb_hash_value;
+
+KHASH_DECLARE(ht, mrb_value, mrb_hash_value, TRUE)
+KHASH_DEFINE (ht, mrb_value, mrb_hash_value, TRUE, mrb_hash_ht_hash_func, mrb_hash_ht_hash_equal)
+
+static void mrb_hash_modify(mrb_state *mrb, mrb_value hash);
+
+static inline mrb_value
+mrb_hash_ht_key(mrb_state *mrb, mrb_value key)
+{
+  if (mrb_string_p(key) && !RSTR_FROZEN_P(mrb_str_ptr(key))) {
+    key = mrb_str_dup(mrb, key);
+    RSTR_SET_FROZEN_FLAG(mrb_str_ptr(key));
+  }
+  return key;
+}
+
+#define KEY(key) mrb_hash_ht_key(mrb, key)
+
+void
+mrb_gc_mark_hash(mrb_state *mrb, struct RHash *hash)
+{
+  khiter_t k;
+  khash_t(ht) *h = hash->ht;
+
+  if (!h) return;
+  for (k = kh_begin(h); k != kh_end(h); k++) {
+    if (kh_exist(h, k)) {
+      mrb_value key = kh_key(h, k);
+      mrb_value val = kh_value(h, k).v;
+
+      mrb_gc_mark_value(mrb, key);
+      mrb_gc_mark_value(mrb, val);
+    }
+  }
+}
+
+size_t
+mrb_gc_mark_hash_size(mrb_state *mrb, struct RHash *hash)
+{
+  if (!hash->ht) return 0;
+  return kh_size(hash->ht)*2;
+}
+
+void
+mrb_gc_free_hash(mrb_state *mrb, struct RHash *hash)
+{
+  if (hash->ht) kh_destroy(ht, mrb, hash->ht);
+}
+
+
+MRB_API mrb_value
+mrb_hash_new_capa(mrb_state *mrb, int capa)
+{
+  struct RHash *h;
+
+  h = (struct RHash*)mrb_obj_alloc(mrb, MRB_TT_HASH, mrb->hash_class);
+  h->ht = kh_init(ht, mrb);
+  if (capa > 0) {
+    kh_resize(ht, mrb, h->ht, capa);
+  }
+  h->iv = 0;
+  return mrb_obj_value(h);
+}
+
+MRB_API mrb_value
+mrb_hash_new(mrb_state *mrb)
+{
+  return mrb_hash_new_capa(mrb, 0);
+}
+
+MRB_API mrb_value
+mrb_hash_get(mrb_state *mrb, mrb_value hash, mrb_value key)
+{
+  khash_t(ht) *h = RHASH_TBL(hash);
+  khiter_t k;
+
+  if (h) {
+    k = kh_get(ht, mrb, h, key);
+    if (k != kh_end(h))
+      return kh_value(h, k).v;
+  }
+
+  /* not found */
+  if (MRB_RHASH_PROCDEFAULT_P(hash)) {
+    return mrb_funcall(mrb, RHASH_PROCDEFAULT(hash), "call", 2, hash, key);
+  }
+  return RHASH_IFNONE(hash);
+}
+
+MRB_API mrb_value
+mrb_hash_fetch(mrb_state *mrb, mrb_value hash, mrb_value key, mrb_value def)
+{
+  khash_t(ht) *h = RHASH_TBL(hash);
+  khiter_t k;
+
+  if (h) {
+    k = kh_get(ht, mrb, h, key);
+    if (k != kh_end(h))
+      return kh_value(h, k).v;
+  }
+
+  /* not found */
+  return def;
+}
+
+MRB_API void
+mrb_hash_set(mrb_state *mrb, mrb_value hash, mrb_value key, mrb_value val)
+{
+  khash_t(ht) *h;
+  khiter_t k;
+  int r;
+
+  mrb_hash_modify(mrb, hash);
+  h = RHASH_TBL(hash);
+
+  if (!h) h = RHASH_TBL(hash) = kh_init(ht, mrb);
+  k = kh_put2(ht, mrb, h, key, &r);
+  kh_value(h, k).v = val;
+
+  if (r != 0) {
+    /* expand */
+    int ai = mrb_gc_arena_save(mrb);
+    key = kh_key(h, k) = KEY(key);
+    mrb_gc_arena_restore(mrb, ai);
+    kh_value(h, k).n = kh_size(h)-1;
+  }
+
+  mrb_field_write_barrier_value(mrb, (struct RBasic*)RHASH(hash), key);
+  mrb_field_write_barrier_value(mrb, (struct RBasic*)RHASH(hash), val);
+  return;
+}
+
+static mrb_value
+mrb_hash_dup(mrb_state *mrb, mrb_value hash)
+{
+  struct RHash* ret;
+  khash_t(ht) *h, *ret_h;
+  khiter_t k, ret_k;
+
+  h = RHASH_TBL(hash);
+  ret = (struct RHash*)mrb_obj_alloc(mrb, MRB_TT_HASH, mrb->hash_class);
+  ret->ht = kh_init(ht, mrb);
+
+  if (kh_size(h) > 0) {
+    ret_h = ret->ht;
+
+    for (k = kh_begin(h); k != kh_end(h); k++) {
+      if (kh_exist(h, k)) {
+        int ai = mrb_gc_arena_save(mrb);
+        ret_k = kh_put(ht, mrb, ret_h, KEY(kh_key(h, k)));
+        mrb_gc_arena_restore(mrb, ai);
+        kh_val(ret_h, ret_k) = kh_val(h, k);
+      }
+    }
+  }
+
+  return mrb_obj_value(ret);
+}
+
+MRB_API mrb_value
+mrb_check_hash_type(mrb_state *mrb, mrb_value hash)
+{
+  return mrb_check_convert_type(mrb, hash, MRB_TT_HASH, "Hash", "to_hash");
+}
+
+MRB_API khash_t(ht)*
+mrb_hash_tbl(mrb_state *mrb, mrb_value hash)
+{
+  khash_t(ht) *h = RHASH_TBL(hash);
+
+  if (!h) {
+    return RHASH_TBL(hash) = kh_init(ht, mrb);
+  }
+  return h;
+}
+
+static void
+mrb_hash_modify(mrb_state *mrb, mrb_value hash)
+{
+  mrb_hash_tbl(mrb, hash);
+}
+
+/* 15.2.13.4.16 */
+/*
+ *  call-seq:
+ *     Hash.new                          -> new_hash
+ *     Hash.new(obj)                     -> new_hash
+ *     Hash.new {|hash, key| block }     -> new_hash
+ *
+ *  Returns a new, empty hash. If this hash is subsequently accessed by
+ *  a key that doesn't correspond to a hash entry, the value returned
+ *  depends on the style of <code>new</code> used to create the hash. In
+ *  the first form, the access returns <code>nil</code>. If
+ *  <i>obj</i> is specified, this single object will be used for
+ *  all <em>default values</em>. If a block is specified, it will be
+ *  called with the hash object and the key, and should return the
+ *  default value. It is the block's responsibility to store the value
+ *  in the hash if required.
+ *
+ *      h = Hash.new("Go Fish")
+ *      h["a"] = 100
+ *      h["b"] = 200
+ *      h["a"]           #=> 100
+ *      h["c"]           #=> "Go Fish"
+ *      # The following alters the single default object
+ *      h["c"].upcase!   #=> "GO FISH"
+ *      h["d"]           #=> "GO FISH"
+ *      h.keys           #=> ["a", "b"]
+ *
+ *      # While this creates a new default object each time
+ *      h = Hash.new { |hash, key| hash[key] = "Go Fish: #{key}" }
+ *      h["c"]           #=> "Go Fish: c"
+ *      h["c"].upcase!   #=> "GO FISH: C"
+ *      h["d"]           #=> "Go Fish: d"
+ *      h.keys           #=> ["c", "d"]
+ *
+ */
+
+static mrb_value
+mrb_hash_init(mrb_state *mrb, mrb_value hash)
+{
+  mrb_value block, ifnone;
+  mrb_bool ifnone_p;
+
+  ifnone = mrb_nil_value();
+  mrb_get_args(mrb, "&|o?", &block, &ifnone, &ifnone_p);
+  mrb_hash_modify(mrb, hash);
+  if (!mrb_nil_p(block)) {
+    if (ifnone_p) {
+      mrb_raise(mrb, E_ARGUMENT_ERROR, "wrong number of arguments");
+    }
+    RHASH(hash)->flags |= MRB_HASH_PROC_DEFAULT;
+    ifnone = block;
+  }
+  mrb_iv_set(mrb, hash, mrb_intern_lit(mrb, "ifnone"), ifnone);
+  return hash;
+}
+
+/* 15.2.13.4.2  */
+/*
+ *  call-seq:
+ *     hsh[key]    ->  value
+ *
+ *  Element Reference---Retrieves the <i>value</i> object corresponding
+ *  to the <i>key</i> object. If not found, returns the default value (see
+ *  <code>Hash::new</code> for details).
+ *
+ *     h = { "a" => 100, "b" => 200 }
+ *     h["a"]   #=> 100
+ *     h["c"]   #=> nil
+ *
+ */
+static mrb_value
+mrb_hash_aget(mrb_state *mrb, mrb_value self)
+{
+  mrb_value key;
+
+  mrb_get_args(mrb, "o", &key);
+  return mrb_hash_get(mrb, self, key);
+}
+
+/* 15.2.13.4.5  */
+/*
+ *  call-seq:
+ *     hsh.default(key=nil)   -> obj
+ *
+ *  Returns the default value, the value that would be returned by
+ *  <i>hsh</i>[<i>key</i>] if <i>key</i> did not exist in <i>hsh</i>.
+ *  See also <code>Hash::new</code> and <code>Hash#default=</code>.
+ *
+ *     h = Hash.new                            #=> {}
+ *     h.default                               #=> nil
+ *     h.default(2)                            #=> nil
+ *
+ *     h = Hash.new("cat")                     #=> {}
+ *     h.default                               #=> "cat"
+ *     h.default(2)                            #=> "cat"
+ *
+ *     h = Hash.new {|h,k| h[k] = k.to_i*10}   #=> {}
+ *     h.default                               #=> nil
+ *     h.default(2)                            #=> 20
+ */
+
+static mrb_value
+mrb_hash_default(mrb_state *mrb, mrb_value hash)
+{
+  mrb_value key;
+  mrb_bool given;
+
+  mrb_get_args(mrb, "|o?", &key, &given);
+  if (MRB_RHASH_PROCDEFAULT_P(hash)) {
+    if (!given) return mrb_nil_value();
+    return mrb_funcall(mrb, RHASH_PROCDEFAULT(hash), "call", 2, hash, key);
+  }
+  else {
+    return RHASH_IFNONE(hash);
+  }
+}
+
+/* 15.2.13.4.6  */
+/*
+ *  call-seq:
+ *     hsh.default = obj     -> obj
+ *
+ *  Sets the default value, the value returned for a key that does not
+ *  exist in the hash. It is not possible to set the default to a
+ *  <code>Proc</code> that will be executed on each key lookup.
+ *
+ *     h = { "a" => 100, "b" => 200 }
+ *     h.default = "Go fish"
+ *     h["a"]     #=> 100
+ *     h["z"]     #=> "Go fish"
+ *     # This doesn't do what you might hope...
+ *     h.default = proc do |hash, key|
+ *       hash[key] = key + key
+ *     end
+ *     h[2]       #=> #<Proc:0x401b3948@-:6>
+ *     h["cat"]   #=> #<Proc:0x401b3948@-:6>
+ */
+
+static mrb_value
+mrb_hash_set_default(mrb_state *mrb, mrb_value hash)
+{
+  mrb_value ifnone;
+
+  mrb_get_args(mrb, "o", &ifnone);
+  mrb_hash_modify(mrb, hash);
+  mrb_iv_set(mrb, hash, mrb_intern_lit(mrb, "ifnone"), ifnone);
+  RHASH(hash)->flags &= ~(MRB_HASH_PROC_DEFAULT);
+
+  return ifnone;
+}
+
+/* 15.2.13.4.7  */
+/*
+ *  call-seq:
+ *     hsh.default_proc -> anObject
+ *
+ *  If <code>Hash::new</code> was invoked with a block, return that
+ *  block, otherwise return <code>nil</code>.
+ *
+ *     h = Hash.new {|h,k| h[k] = k*k }   #=> {}
+ *     p = h.default_proc                 #=> #<Proc:0x401b3d08@-:1>
+ *     a = []                             #=> []
+ *     p.call(a, 2)
+ *     a                                  #=> [nil, nil, 4]
+ */
+
+
+static mrb_value
+mrb_hash_default_proc(mrb_state *mrb, mrb_value hash)
+{
+  if (MRB_RHASH_PROCDEFAULT_P(hash)) {
+    return RHASH_PROCDEFAULT(hash);
+  }
+  return mrb_nil_value();
+}
+
+/*
+ *  call-seq:
+ *     hsh.default_proc = proc_obj     -> proc_obj
+ *
+ *  Sets the default proc to be executed on each key lookup.
+ *
+ *     h.default_proc = proc do |hash, key|
+ *       hash[key] = key + key
+ *     end
+ *     h[2]       #=> 4
+ *     h["cat"]   #=> "catcat"
+ */
+
+static mrb_value
+mrb_hash_set_default_proc(mrb_state *mrb, mrb_value hash)
+{
+  mrb_value ifnone;
+
+  mrb_get_args(mrb, "o", &ifnone);
+  mrb_hash_modify(mrb, hash);
+  mrb_iv_set(mrb, hash, mrb_intern_lit(mrb, "ifnone"), ifnone);
+  RHASH(hash)->flags |= MRB_HASH_PROC_DEFAULT;
+
+  return ifnone;
+}
+
+MRB_API mrb_value
+mrb_hash_delete_key(mrb_state *mrb, mrb_value hash, mrb_value key)
+{
+  khash_t(ht) *h = RHASH_TBL(hash);
+  khiter_t k;
+  mrb_value delVal;
+  mrb_int n;
+
+  if (h) {
+    k = kh_get(ht, mrb, h, key);
+    if (k != kh_end(h)) {
+      delVal = kh_value(h, k).v;
+      n = kh_value(h, k).n;
+      kh_del(ht, mrb, h, k);
+      for (k = kh_begin(h); k != kh_end(h); k++) {
+        if (!kh_exist(h, k)) continue;
+        if (kh_value(h, k).n > n) kh_value(h, k).n--;
+      }
+      return delVal;
+    }
+  }
+
+  /* not found */
+  return mrb_nil_value();
+}
+
+/* 15.2.13.4.8  */
+/*
+ *  call-seq:
+ *     hsh.delete(key)                   -> value
+ *     hsh.delete(key) {| key | block }  -> value
+ *
+ *  Deletes and returns a key-value pair from <i>hsh</i> whose key is
+ *  equal to <i>key</i>. If the key is not found, returns the
+ *  <em>default value</em>. If the optional code block is given and the
+ *  key is not found, pass in the key and return the result of
+ *  <i>block</i>.
+ *
+ *      h = { "a" => 100, "b" => 200 }
+ *      h.delete("a")                              #=> 100
+ *      h.delete("z")                              #=> nil
+ *      h.delete("z") { |el| "#{el} not found" }   #=> "z not found"
+ *
+ */
+static mrb_value
+mrb_hash_delete(mrb_state *mrb, mrb_value self)
+{
+  mrb_value key;
+
+  mrb_get_args(mrb, "o", &key);
+  return mrb_hash_delete_key(mrb, self, key);
+}
+
+/* 15.2.13.4.24 */
+/*
+ *  call-seq:
+ *     hsh.shift -> anArray or obj
+ *
+ *  Removes a key-value pair from <i>hsh</i> and returns it as the
+ *  two-item array <code>[</code> <i>key, value</i> <code>]</code>, or
+ *  the hash's default value if the hash is empty.
+ *
+ *      h = { 1 => "a", 2 => "b", 3 => "c" }
+ *      h.shift   #=> [1, "a"]
+ *      h         #=> {2=>"b", 3=>"c"}
+ */
+
+static mrb_value
+mrb_hash_shift(mrb_state *mrb, mrb_value hash)
+{
+  khash_t(ht) *h = RHASH_TBL(hash);
+  khiter_t k;
+  mrb_value delKey, delVal;
+
+  mrb_hash_modify(mrb, hash);
+  if (h && kh_size(h) > 0) {
+    for (k = kh_begin(h); k != kh_end(h); k++) {
+      if (!kh_exist(h, k)) continue;
+
+      delKey = kh_key(h, k);
+      mrb_gc_protect(mrb, delKey);
+      delVal = mrb_hash_delete_key(mrb, hash, delKey);
+      mrb_gc_protect(mrb, delVal);
+
+      return mrb_assoc_new(mrb, delKey, delVal);
+    }
+  }
+
+  if (MRB_RHASH_PROCDEFAULT_P(hash)) {
+    return mrb_funcall(mrb, RHASH_PROCDEFAULT(hash), "call", 2, hash, mrb_nil_value());
+  }
+  else {
+    return RHASH_IFNONE(hash);
+  }
+}
+
+/* 15.2.13.4.4  */
+/*
+ *  call-seq:
+ *     hsh.clear -> hsh
+ *
+ *  Removes all key-value pairs from `hsh`.
+ *
+ *      h = { "a" => 100, "b" => 200 }   #=> {"a"=>100, "b"=>200}
+ *      h.clear                          #=> {}
+ *
+ */
+
+MRB_API mrb_value
+mrb_hash_clear(mrb_state *mrb, mrb_value hash)
+{
+  khash_t(ht) *h = RHASH_TBL(hash);
+
+  if (h) kh_clear(ht, mrb, h);
+  return hash;
+}
+
+/* 15.2.13.4.3  */
+/* 15.2.13.4.26 */
+/*
+ *  call-seq:
+ *     hsh[key] = value        -> value
+ *     hsh.store(key, value)   -> value
+ *
+ *  Element Assignment---Associates the value given by
+ *  <i>value</i> with the key given by <i>key</i>.
+ *  <i>key</i> should not have its value changed while it is in
+ *  use as a key (a <code>String</code> passed as a key will be
+ *  duplicated and frozen).
+ *
+ *      h = { "a" => 100, "b" => 200 }
+ *      h["a"] = 9
+ *      h["c"] = 4
+ *      h   #=> {"a"=>9, "b"=>200, "c"=>4}
+ *
+ */
+static mrb_value
+mrb_hash_aset(mrb_state *mrb, mrb_value self)
+{
+  mrb_value key, val;
+
+  mrb_get_args(mrb, "oo", &key, &val);
+  mrb_hash_set(mrb, self, key, val);
+  return val;
+}
+
+/* 15.2.13.4.20 */
+/* 15.2.13.4.25 */
+/*
+ *  call-seq:
+ *     hsh.length    ->  fixnum
+ *     hsh.size      ->  fixnum
+ *
+ *  Returns the number of key-value pairs in the hash.
+ *
+ *     h = { "d" => 100, "a" => 200, "v" => 300, "e" => 400 }
+ *     h.length        #=> 4
+ *     h.delete("a")   #=> 200
+ *     h.length        #=> 3
+ */
+static mrb_value
+mrb_hash_size_m(mrb_state *mrb, mrb_value self)
+{
+  khash_t(ht) *h = RHASH_TBL(self);
+
+  if (!h) return mrb_fixnum_value(0);
+  return mrb_fixnum_value(kh_size(h));
+}
+
+/* 15.2.13.4.12 */
+/*
+ *  call-seq:
+ *     hsh.empty?    -> true or false
+ *
+ *  Returns <code>true</code> if <i>hsh</i> contains no key-value pairs.
+ *
+ *     {}.empty?   #=> true
+ *
+ */
+MRB_API mrb_value
+mrb_hash_empty_p(mrb_state *mrb, mrb_value self)
+{
+  khash_t(ht) *h = RHASH_TBL(self);
+
+  if (h) return mrb_bool_value(kh_size(h) == 0);
+  return mrb_true_value();
+}
+
+/* 15.2.13.4.29 (x)*/
+/*
+ * call-seq:
+ *    hsh.to_hash   => hsh
+ *
+ * Returns +self+.
+ */
+
+static mrb_value
+mrb_hash_to_hash(mrb_state *mrb, mrb_value hash)
+{
+  return hash;
+}
+
+/* 15.2.13.4.19 */
+/*
+ *  call-seq:
+ *     hsh.keys    -> array
+ *
+ *  Returns a new array populated with the keys from this hash. See also
+ *  <code>Hash#values</code>.
+ *
+ *     h = { "a" => 100, "b" => 200, "c" => 300, "d" => 400 }
+ *     h.keys   #=> ["a", "b", "c", "d"]
+ *
+ */
+
+MRB_API mrb_value
+mrb_hash_keys(mrb_state *mrb, mrb_value hash)
+{
+  khash_t(ht) *h = RHASH_TBL(hash);
+  khiter_t k;
+  mrb_value ary;
+  mrb_value *p;
+
+  if (!h || kh_size(h) == 0) return mrb_ary_new(mrb);
+  ary = mrb_ary_new_capa(mrb, kh_size(h));
+  mrb_ary_set(mrb, ary, kh_size(h)-1, mrb_nil_value());
+  p = mrb_ary_ptr(ary)->ptr;
+  for (k = kh_begin(h); k != kh_end(h); k++) {
+    if (kh_exist(h, k)) {
+      mrb_value kv = kh_key(h, k);
+      mrb_hash_value hv = kh_value(h, k);
+
+      p[hv.n] = kv;
+    }
+  }
+  return ary;
+}
+
+/* 15.2.13.4.28 */
+/*
+ *  call-seq:
+ *     hsh.values    -> array
+ *
+ *  Returns a new array populated with the values from <i>hsh</i>. See
+ *  also <code>Hash#keys</code>.
+ *
+ *     h = { "a" => 100, "b" => 200, "c" => 300 }
+ *     h.values   #=> [100, 200, 300]
+ *
+ */
+
+static mrb_value
+mrb_hash_values(mrb_state *mrb, mrb_value hash)
+{
+  khash_t(ht) *h = RHASH_TBL(hash);
+  khiter_t k;
+  mrb_value ary;
+
+  if (!h) return mrb_ary_new(mrb);
+  ary = mrb_ary_new_capa(mrb, kh_size(h));
+  for (k = kh_begin(h); k != kh_end(h); k++) {
+    if (kh_exist(h, k)) {
+      mrb_hash_value hv = kh_value(h, k);
+
+      mrb_ary_set(mrb, ary, hv.n, hv.v);
+    }
+  }
+  return ary;
+}
+
+/* 15.2.13.4.13 */
+/* 15.2.13.4.15 */
+/* 15.2.13.4.18 */
+/* 15.2.13.4.21 */
+/*
+ *  call-seq:
+ *     hsh.has_key?(key)    -> true or false
+ *     hsh.include?(key)    -> true or false
+ *     hsh.key?(key)        -> true or false
+ *     hsh.member?(key)     -> true or false
+ *
+ *  Returns <code>true</code> if the given key is present in <i>hsh</i>.
+ *
+ *     h = { "a" => 100, "b" => 200 }
+ *     h.has_key?("a")   #=> true
+ *     h.has_key?("z")   #=> false
+ *
+ */
+
+static mrb_value
+mrb_hash_has_key(mrb_state *mrb, mrb_value hash)
+{
+  mrb_value key;
+  khash_t(ht) *h;
+  khiter_t k;
+
+  mrb_get_args(mrb, "o", &key);
+
+  h = RHASH_TBL(hash);
+  if (h) {
+    k = kh_get(ht, mrb, h, key);
+    return mrb_bool_value(k != kh_end(h));
+  }
+  return mrb_false_value();
+}
+
+/* 15.2.13.4.14 */
+/* 15.2.13.4.27 */
+/*
+ *  call-seq:
+ *     hsh.has_value?(value)    -> true or false
+ *     hsh.value?(value)        -> true or false
+ *
+ *  Returns <code>true</code> if the given value is present for some key
+ *  in <i>hsh</i>.
+ *
+ *     h = { "a" => 100, "b" => 200 }
+ *     h.has_value?(100)   #=> true
+ *     h.has_value?(999)   #=> false
+ */
+
+static mrb_value
+mrb_hash_has_value(mrb_state *mrb, mrb_value hash)
+{
+  mrb_value val;
+  khash_t(ht) *h;
+  khiter_t k;
+
+  mrb_get_args(mrb, "o", &val);
+  h = RHASH_TBL(hash);
+
+  if (h) {
+    for (k = kh_begin(h); k != kh_end(h); k++) {
+      if (!kh_exist(h, k)) continue;
+
+      if (mrb_equal(mrb, kh_value(h, k).v, val)) {
+        return mrb_true_value();
+      }
+    }
+  }
+  return mrb_false_value();
+}
+
+void
+mrb_init_hash(mrb_state *mrb)
+{
+  struct RClass *h;
+
+  mrb->hash_class = h = mrb_define_class(mrb, "Hash", mrb->object_class);              /* 15.2.13 */
+  MRB_SET_INSTANCE_TT(h, MRB_TT_HASH);
+
+  mrb_define_method(mrb, h, "[]",              mrb_hash_aget,        MRB_ARGS_REQ(1)); /* 15.2.13.4.2  */
+  mrb_define_method(mrb, h, "[]=",             mrb_hash_aset,        MRB_ARGS_REQ(2)); /* 15.2.13.4.3  */
+  mrb_define_method(mrb, h, "clear",           mrb_hash_clear,       MRB_ARGS_NONE()); /* 15.2.13.4.4  */
+  mrb_define_method(mrb, h, "default",         mrb_hash_default,     MRB_ARGS_ANY());  /* 15.2.13.4.5  */
+  mrb_define_method(mrb, h, "default=",        mrb_hash_set_default, MRB_ARGS_REQ(1)); /* 15.2.13.4.6  */
+  mrb_define_method(mrb, h, "default_proc",    mrb_hash_default_proc,MRB_ARGS_NONE()); /* 15.2.13.4.7  */
+  mrb_define_method(mrb, h, "default_proc=",   mrb_hash_set_default_proc,MRB_ARGS_REQ(1)); /* 15.2.13.4.7  */
+  mrb_define_method(mrb, h, "__delete",        mrb_hash_delete,      MRB_ARGS_REQ(1)); /* core of 15.2.13.4.8  */
+  mrb_define_method(mrb, h, "empty?",          mrb_hash_empty_p,     MRB_ARGS_NONE()); /* 15.2.13.4.12 */
+  mrb_define_method(mrb, h, "has_key?",        mrb_hash_has_key,     MRB_ARGS_REQ(1)); /* 15.2.13.4.13 */
+  mrb_define_method(mrb, h, "has_value?",      mrb_hash_has_value,   MRB_ARGS_REQ(1)); /* 15.2.13.4.14 */
+  mrb_define_method(mrb, h, "include?",        mrb_hash_has_key,     MRB_ARGS_REQ(1)); /* 15.2.13.4.15 */
+  mrb_define_method(mrb, h, "initialize",      mrb_hash_init,        MRB_ARGS_OPT(1)); /* 15.2.13.4.16 */
+  mrb_define_method(mrb, h, "key?",            mrb_hash_has_key,     MRB_ARGS_REQ(1)); /* 15.2.13.4.18 */
+  mrb_define_method(mrb, h, "keys",            mrb_hash_keys,        MRB_ARGS_NONE()); /* 15.2.13.4.19 */
+  mrb_define_method(mrb, h, "length",          mrb_hash_size_m,      MRB_ARGS_NONE()); /* 15.2.13.4.20 */
+  mrb_define_method(mrb, h, "member?",         mrb_hash_has_key,     MRB_ARGS_REQ(1)); /* 15.2.13.4.21 */
+  mrb_define_method(mrb, h, "shift",           mrb_hash_shift,       MRB_ARGS_NONE()); /* 15.2.13.4.24 */
+  mrb_define_method(mrb, h, "dup",             mrb_hash_dup,         MRB_ARGS_NONE());
+  mrb_define_method(mrb, h, "size",            mrb_hash_size_m,      MRB_ARGS_NONE()); /* 15.2.13.4.25 */
+  mrb_define_method(mrb, h, "store",           mrb_hash_aset,        MRB_ARGS_REQ(2)); /* 15.2.13.4.26 */
+  mrb_define_method(mrb, h, "value?",          mrb_hash_has_value,   MRB_ARGS_REQ(1)); /* 15.2.13.4.27 */
+  mrb_define_method(mrb, h, "values",          mrb_hash_values,      MRB_ARGS_NONE()); /* 15.2.13.4.28 */
+
+  mrb_define_method(mrb, h, "to_hash",         mrb_hash_to_hash,     MRB_ARGS_NONE()); /* 15.2.13.4.29 (x)*/
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/init.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/init.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/init.c	(revision 270)
@@ -0,0 +1,51 @@
+/*
+** init.c - initialize mruby core
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+
+void mrb_init_symtbl(mrb_state*);
+void mrb_init_class(mrb_state*);
+void mrb_init_object(mrb_state*);
+void mrb_init_kernel(mrb_state*);
+void mrb_init_comparable(mrb_state*);
+void mrb_init_enumerable(mrb_state*);
+void mrb_init_symbol(mrb_state*);
+void mrb_init_exception(mrb_state*);
+void mrb_init_proc(mrb_state*);
+void mrb_init_string(mrb_state*);
+void mrb_init_array(mrb_state*);
+void mrb_init_hash(mrb_state*);
+void mrb_init_numeric(mrb_state*);
+void mrb_init_range(mrb_state*);
+void mrb_init_gc(mrb_state*);
+void mrb_init_math(mrb_state*);
+void mrb_init_version(mrb_state*);
+void mrb_init_mrblib(mrb_state*);
+
+#define DONE mrb_gc_arena_restore(mrb, 0);
+void
+mrb_init_core(mrb_state *mrb)
+{
+  mrb_init_symtbl(mrb); DONE;
+
+  mrb_init_class(mrb); DONE;
+  mrb_init_object(mrb); DONE;
+  mrb_init_kernel(mrb); DONE;
+  mrb_init_comparable(mrb); DONE;
+  mrb_init_enumerable(mrb); DONE;
+
+  mrb_init_symbol(mrb); DONE;
+  mrb_init_exception(mrb); DONE;
+  mrb_init_proc(mrb); DONE;
+  mrb_init_string(mrb); DONE;
+  mrb_init_array(mrb); DONE;
+  mrb_init_hash(mrb); DONE;
+  mrb_init_numeric(mrb); DONE;
+  mrb_init_range(mrb); DONE;
+  mrb_init_gc(mrb); DONE;
+  mrb_init_version(mrb); DONE;
+  mrb_init_mrblib(mrb); DONE;
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/kernel.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/kernel.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/kernel.c	(revision 270)
@@ -0,0 +1,1153 @@
+/*
+** kernel.c - Kernel module
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+#include "mruby/array.h"
+#include "mruby/class.h"
+#include "mruby/proc.h"
+#include "mruby/string.h"
+#include "mruby/variable.h"
+#include "mruby/error.h"
+
+typedef enum {
+  NOEX_PUBLIC    = 0x00,
+  NOEX_NOSUPER   = 0x01,
+  NOEX_PRIVATE   = 0x02,
+  NOEX_PROTECTED = 0x04,
+  NOEX_MASK      = 0x06,
+  NOEX_BASIC     = 0x08,
+  NOEX_UNDEF     = NOEX_NOSUPER,
+  NOEX_MODFUNC   = 0x12,
+  NOEX_SUPER     = 0x20,
+  NOEX_VCALL     = 0x40,
+  NOEX_RESPONDS  = 0x80
+} mrb_method_flag_t;
+
+static mrb_bool
+mrb_obj_basic_to_s_p(mrb_state *mrb, mrb_value obj)
+{
+  struct RProc *me = mrb_method_search(mrb, mrb_class(mrb, obj), mrb_intern_lit(mrb, "to_s"));
+  if (MRB_PROC_CFUNC_P(me) && (me->body.func == mrb_any_to_s))
+    return TRUE;
+  return FALSE;
+}
+
+/* 15.3.1.3.17 */
+/*
+ *  call-seq:
+ *     obj.inspect   -> string
+ *
+ *  Returns a string containing a human-readable representation of
+ *  <i>obj</i>. If not overridden and no instance variables, uses the
+ *  <code>to_s</code> method to generate the string.
+ *  <i>obj</i>.  If not overridden, uses the <code>to_s</code> method to
+ *  generate the string.
+ *
+ *     [ 1, 2, 3..4, 'five' ].inspect   #=> "[1, 2, 3..4, \"five\"]"
+ *     Time.new.inspect                 #=> "2008-03-08 19:43:39 +0900"
+ */
+MRB_API mrb_value
+mrb_obj_inspect(mrb_state *mrb, mrb_value obj)
+{
+  if ((mrb_type(obj) == MRB_TT_OBJECT) && mrb_obj_basic_to_s_p(mrb, obj)) {
+    return mrb_obj_iv_inspect(mrb, mrb_obj_ptr(obj));
+  }
+  return mrb_any_to_s(mrb, obj);
+}
+
+/* 15.3.1.3.1  */
+/* 15.3.1.3.10 */
+/* 15.3.1.3.11 */
+/*
+ *  call-seq:
+ *     obj == other        -> true or false
+ *     obj.equal?(other)   -> true or false
+ *     obj.eql?(other)     -> true or false
+ *
+ *  Equality---At the <code>Object</code> level, <code>==</code> returns
+ *  <code>true</code> only if <i>obj</i> and <i>other</i> are the
+ *  same object. Typically, this method is overridden in descendant
+ *  classes to provide class-specific meaning.
+ *
+ *  Unlike <code>==</code>, the <code>equal?</code> method should never be
+ *  overridden by subclasses: it is used to determine object identity
+ *  (that is, <code>a.equal?(b)</code> iff <code>a</code> is the same
+ *  object as <code>b</code>).
+ *
+ *  The <code>eql?</code> method returns <code>true</code> if
+ *  <i>obj</i> and <i>anObject</i> have the same value. Used by
+ *  <code>Hash</code> to test members for equality.  For objects of
+ *  class <code>Object</code>, <code>eql?</code> is synonymous with
+ *  <code>==</code>. Subclasses normally continue this tradition, but
+ *  there are exceptions. <code>Numeric</code> types, for example,
+ *  perform type conversion across <code>==</code>, but not across
+ *  <code>eql?</code>, so:
+ *
+ *     1 == 1.0     #=> true
+ *     1.eql? 1.0   #=> false
+ */
+static mrb_value
+mrb_obj_equal_m(mrb_state *mrb, mrb_value self)
+{
+  mrb_value arg;
+
+  mrb_get_args(mrb, "o", &arg);
+  return mrb_bool_value(mrb_obj_equal(mrb, self, arg));
+}
+
+static mrb_value
+mrb_obj_not_equal_m(mrb_state *mrb, mrb_value self)
+{
+  mrb_value arg;
+
+  mrb_get_args(mrb, "o", &arg);
+  return mrb_bool_value(!mrb_equal(mrb, self, arg));
+}
+
+/* 15.3.1.3.2  */
+/*
+ *  call-seq:
+ *     obj === other   -> true or false
+ *
+ *  Case Equality---For class <code>Object</code>, effectively the same
+ *  as calling  <code>#==</code>, but typically overridden by descendants
+ *  to provide meaningful semantics in <code>case</code> statements.
+ */
+static mrb_value
+mrb_equal_m(mrb_state *mrb, mrb_value self)
+{
+  mrb_value arg;
+
+  mrb_get_args(mrb, "o", &arg);
+  return mrb_bool_value(mrb_equal(mrb, self, arg));
+}
+
+/* 15.3.1.3.3  */
+/* 15.3.1.3.33 */
+/*
+ *  Document-method: __id__
+ *  Document-method: object_id
+ *
+ *  call-seq:
+ *     obj.__id__       -> fixnum
+ *     obj.object_id    -> fixnum
+ *
+ *  Returns an integer identifier for <i>obj</i>. The same number will
+ *  be returned on all calls to <code>id</code> for a given object, and
+ *  no two active objects will share an id.
+ *  <code>Object#object_id</code> is a different concept from the
+ *  <code>:name</code> notation, which returns the symbol id of
+ *  <code>name</code>. Replaces the deprecated <code>Object#id</code>.
+ */
+static mrb_value
+mrb_obj_id_m(mrb_state *mrb, mrb_value self)
+{
+  return mrb_fixnum_value(mrb_obj_id(self));
+}
+
+/* 15.3.1.2.2  */
+/* 15.3.1.2.5  */
+/* 15.3.1.3.6  */
+/* 15.3.1.3.25 */
+/*
+ *  call-seq:
+ *     block_given?   -> true or false
+ *     iterator?      -> true or false
+ *
+ *  Returns <code>true</code> if <code>yield</code> would execute a
+ *  block in the current context. The <code>iterator?</code> form
+ *  is mildly deprecated.
+ *
+ *     def try
+ *       if block_given?
+ *         yield
+ *       else
+ *         "no block"
+ *       end
+ *     end
+ *     try                  #=> "no block"
+ *     try { "hello" }      #=> "hello"
+ *     try do "hello" end   #=> "hello"
+ */
+static mrb_value
+mrb_f_block_given_p_m(mrb_state *mrb, mrb_value self)
+{
+  mrb_callinfo *ci = mrb->c->ci;
+  mrb_value *bp;
+  mrb_bool given_p;
+
+  bp = ci->stackent + 1;
+  ci--;
+  if (ci <= mrb->c->cibase) {
+    given_p = FALSE;
+  }
+  else {
+    /* block_given? called within block; check upper scope */
+    if (ci->proc->env) {
+      struct REnv *e = ci->proc->env;
+      mrb_value *sp;
+
+      while (e->c) {
+        e = (struct REnv*)e->c;
+      }
+      sp = e->stack;
+      if (sp) {
+        /* top-level does not have block slot (alway false) */
+        if (sp == mrb->c->stbase)
+          return mrb_false_value();
+        ci = mrb->c->cibase + e->cioff;
+        bp = ci[1].stackent + 1;
+      }
+    }
+    if (ci->argc > 0) {
+      bp += ci->argc;
+    }
+    given_p = !mrb_nil_p(*bp);
+  }
+
+  return mrb_bool_value(given_p);
+}
+
+/* 15.3.1.3.7  */
+/*
+ *  call-seq:
+ *     obj.class    -> class
+ *
+ *  Returns the class of <i>obj</i>. This method must always be
+ *  called with an explicit receiver, as <code>class</code> is also a
+ *  reserved word in Ruby.
+ *
+ *     1.class      #=> Fixnum
+ *     self.class   #=> Object
+ */
+static mrb_value
+mrb_obj_class_m(mrb_state *mrb, mrb_value self)
+{
+  return mrb_obj_value(mrb_obj_class(mrb, self));
+}
+
+static struct RClass*
+mrb_singleton_class_clone(mrb_state *mrb, mrb_value obj)
+{
+  struct RClass *klass = mrb_basic_ptr(obj)->c;
+
+  if (klass->tt != MRB_TT_SCLASS)
+    return klass;
+  else {
+    /* copy singleton(unnamed) class */
+    struct RClass *clone = (struct RClass*)mrb_obj_alloc(mrb, klass->tt, mrb->class_class);
+
+    if ((mrb_type(obj) == MRB_TT_CLASS) || (mrb_type(obj) == MRB_TT_SCLASS)) {
+      clone->c = clone;
+    }
+    else {
+      clone->c = mrb_singleton_class_clone(mrb, mrb_obj_value(klass));
+    }
+    clone->super = klass->super;
+    if (klass->iv) {
+      mrb_iv_copy(mrb, mrb_obj_value(clone), mrb_obj_value(klass));
+      mrb_obj_iv_set(mrb, (struct RObject*)clone, mrb_intern_lit(mrb, "__attached__"), obj);
+    }
+    if (klass->mt) {
+      clone->mt = kh_copy(mt, mrb, klass->mt);
+    }
+    else {
+      clone->mt = kh_init(mt, mrb);
+    }
+    clone->tt = MRB_TT_SCLASS;
+    return clone;
+  }
+}
+
+static void
+copy_class(mrb_state *mrb, mrb_value dst, mrb_value src)
+{
+  struct RClass *dc = mrb_class_ptr(dst);
+  struct RClass *sc = mrb_class_ptr(src);
+  /* if the origin is not the same as the class, then the origin and
+     the current class need to be copied */
+  if (sc->flags & MRB_FLAG_IS_PREPENDED) {
+    struct RClass *c0 = sc->super;
+    struct RClass *c1 = dc;
+
+    /* copy prepended iclasses */
+    while (!(c0->flags & MRB_FLAG_IS_ORIGIN)) {
+      c1->super = mrb_class_ptr(mrb_obj_dup(mrb, mrb_obj_value(c0)));
+      c1 = c1->super;
+      c0 = c0->super;
+    }
+    c1->super = mrb_class_ptr(mrb_obj_dup(mrb, mrb_obj_value(c0)));
+    c1->super->flags |= MRB_FLAG_IS_ORIGIN;
+  }
+  dc->mt = kh_copy(mt, mrb, sc->mt);
+  dc->super = sc->super;
+}
+
+static void
+init_copy(mrb_state *mrb, mrb_value dest, mrb_value obj)
+{
+  switch (mrb_type(obj)) {
+    case MRB_TT_CLASS:
+    case MRB_TT_MODULE:
+      copy_class(mrb, dest, obj);
+      /* fall through */
+    case MRB_TT_OBJECT:
+    case MRB_TT_SCLASS:
+    case MRB_TT_HASH:
+    case MRB_TT_DATA:
+    case MRB_TT_EXCEPTION:
+      mrb_iv_copy(mrb, dest, obj);
+      break;
+
+    default:
+      break;
+  }
+  mrb_funcall(mrb, dest, "initialize_copy", 1, obj);
+}
+
+/* 15.3.1.3.8  */
+/*
+ *  call-seq:
+ *     obj.clone -> an_object
+ *
+ *  Produces a shallow copy of <i>obj</i>---the instance variables of
+ *  <i>obj</i> are copied, but not the objects they reference. Copies
+ *  the frozen state of <i>obj</i>. See also the discussion
+ *  under <code>Object#dup</code>.
+ *
+ *     class Klass
+ *        attr_accessor :str
+ *     end
+ *     s1 = Klass.new      #=> #<Klass:0x401b3a38>
+ *     s1.str = "Hello"    #=> "Hello"
+ *     s2 = s1.clone       #=> #<Klass:0x401b3998 @str="Hello">
+ *     s2.str[1,4] = "i"   #=> "i"
+ *     s1.inspect          #=> "#<Klass:0x401b3a38 @str=\"Hi\">"
+ *     s2.inspect          #=> "#<Klass:0x401b3998 @str=\"Hi\">"
+ *
+ *  This method may have class-specific behavior.  If so, that
+ *  behavior will be documented under the #+initialize_copy+ method of
+ *  the class.
+ *
+ *  Some Class(True False Nil Symbol Fixnum Float) Object  cannot clone.
+ */
+MRB_API mrb_value
+mrb_obj_clone(mrb_state *mrb, mrb_value self)
+{
+  struct RObject *p;
+  mrb_value clone;
+
+  if (mrb_immediate_p(self)) {
+    mrb_raisef(mrb, E_TYPE_ERROR, "can't clone %S", self);
+  }
+  if (mrb_type(self) == MRB_TT_SCLASS) {
+    mrb_raise(mrb, E_TYPE_ERROR, "can't clone singleton class");
+  }
+  p = (struct RObject*)mrb_obj_alloc(mrb, mrb_type(self), mrb_obj_class(mrb, self));
+  p->c = mrb_singleton_class_clone(mrb, self);
+  clone = mrb_obj_value(p);
+  init_copy(mrb, clone, self);
+
+  return clone;
+}
+
+/* 15.3.1.3.9  */
+/*
+ *  call-seq:
+ *     obj.dup -> an_object
+ *
+ *  Produces a shallow copy of <i>obj</i>---the instance variables of
+ *  <i>obj</i> are copied, but not the objects they reference.
+ *  <code>dup</code> copies the frozen state of <i>obj</i>. See also
+ *  the discussion under <code>Object#clone</code>. In general,
+ *  <code>clone</code> and <code>dup</code> may have different semantics
+ *  in descendant classes. While <code>clone</code> is used to duplicate
+ *  an object, including its internal state, <code>dup</code> typically
+ *  uses the class of the descendant object to create the new instance.
+ *
+ *  This method may have class-specific behavior.  If so, that
+ *  behavior will be documented under the #+initialize_copy+ method of
+ *  the class.
+ */
+
+MRB_API mrb_value
+mrb_obj_dup(mrb_state *mrb, mrb_value obj)
+{
+  struct RBasic *p;
+  mrb_value dup;
+
+  if (mrb_immediate_p(obj)) {
+    mrb_raisef(mrb, E_TYPE_ERROR, "can't dup %S", obj);
+  }
+  if (mrb_type(obj) == MRB_TT_SCLASS) {
+    mrb_raise(mrb, E_TYPE_ERROR, "can't dup singleton class");
+  }
+  p = mrb_obj_alloc(mrb, mrb_type(obj), mrb_obj_class(mrb, obj));
+  dup = mrb_obj_value(p);
+  init_copy(mrb, dup, obj);
+
+  return dup;
+}
+
+static mrb_value
+mrb_obj_extend(mrb_state *mrb, mrb_int argc, mrb_value *argv, mrb_value obj)
+{
+  mrb_int i;
+
+  if (argc == 0) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "wrong number of arguments (at least 1)");
+  }
+  for (i = 0; i < argc; i++) {
+    mrb_check_type(mrb, argv[i], MRB_TT_MODULE);
+  }
+  while (argc--) {
+    mrb_funcall(mrb, argv[argc], "extend_object", 1, obj);
+    mrb_funcall(mrb, argv[argc], "extended", 1, obj);
+  }
+  return obj;
+}
+
+/* 15.3.1.3.13 */
+/*
+ *  call-seq:
+ *     obj.extend(module, ...)    -> obj
+ *
+ *  Adds to _obj_ the instance methods from each module given as a
+ *  parameter.
+ *
+ *     module Mod
+ *       def hello
+ *         "Hello from Mod.\n"
+ *       end
+ *     end
+ *
+ *     class Klass
+ *       def hello
+ *         "Hello from Klass.\n"
+ *       end
+ *     end
+ *
+ *     k = Klass.new
+ *     k.hello         #=> "Hello from Klass.\n"
+ *     k.extend(Mod)   #=> #<Klass:0x401b3bc8>
+ *     k.hello         #=> "Hello from Mod.\n"
+ */
+static mrb_value
+mrb_obj_extend_m(mrb_state *mrb, mrb_value self)
+{
+  mrb_value *argv;
+  mrb_int argc;
+
+  mrb_get_args(mrb, "*", &argv, &argc);
+  return mrb_obj_extend(mrb, argc, argv, self);
+}
+
+/* 15.3.1.3.15 */
+/*
+ *  call-seq:
+ *     obj.hash    -> fixnum
+ *
+ *  Generates a <code>Fixnum</code> hash value for this object. This
+ *  function must have the property that <code>a.eql?(b)</code> implies
+ *  <code>a.hash == b.hash</code>. The hash value is used by class
+ *  <code>Hash</code>. Any hash value that exceeds the capacity of a
+ *  <code>Fixnum</code> will be truncated before being used.
+ */
+MRB_API mrb_value
+mrb_obj_hash(mrb_state *mrb, mrb_value self)
+{
+  return mrb_fixnum_value(mrb_obj_id(self));
+}
+
+/* 15.3.1.3.16 */
+static mrb_value
+mrb_obj_init_copy(mrb_state *mrb, mrb_value self)
+{
+  mrb_value orig;
+
+  mrb_get_args(mrb, "o", &orig);
+  if (mrb_obj_equal(mrb, self, orig)) return self;
+  if ((mrb_type(self) != mrb_type(orig)) || (mrb_obj_class(mrb, self) != mrb_obj_class(mrb, orig))) {
+      mrb_raise(mrb, E_TYPE_ERROR, "initialize_copy should take same class object");
+  }
+  return self;
+}
+
+
+/* implementation of instance_eval */
+mrb_value mrb_obj_instance_eval(mrb_state*, mrb_value);
+
+MRB_API mrb_bool
+mrb_obj_is_instance_of(mrb_state *mrb, mrb_value obj, struct RClass* c)
+{
+  if (mrb_obj_class(mrb, obj) == c) return TRUE;
+  return FALSE;
+}
+
+/* 15.3.1.3.19 */
+/*
+ *  call-seq:
+ *     obj.instance_of?(class)    -> true or false
+ *
+ *  Returns <code>true</code> if <i>obj</i> is an instance of the given
+ *  class. See also <code>Object#kind_of?</code>.
+ */
+static mrb_value
+obj_is_instance_of(mrb_state *mrb, mrb_value self)
+{
+  mrb_value arg;
+
+  mrb_get_args(mrb, "C", &arg);
+
+  return mrb_bool_value(mrb_obj_is_instance_of(mrb, self, mrb_class_ptr(arg)));
+}
+
+/* 15.3.1.3.20 */
+/*
+ *  call-seq:
+ *     obj.instance_variable_defined?(symbol)    -> true or false
+ *
+ *  Returns <code>true</code> if the given instance variable is
+ *  defined in <i>obj</i>.
+ *
+ *     class Fred
+ *       def initialize(p1, p2)
+ *         @a, @b = p1, p2
+ *       end
+ *     end
+ *     fred = Fred.new('cat', 99)
+ *     fred.instance_variable_defined?(:@a)    #=> true
+ *     fred.instance_variable_defined?("@b")   #=> true
+ *     fred.instance_variable_defined?("@c")   #=> false
+ */
+static mrb_value
+mrb_obj_ivar_defined(mrb_state *mrb, mrb_value self)
+{
+  mrb_sym sym;
+
+  mrb_get_args(mrb, "n", &sym);
+  mrb_iv_check(mrb, sym);
+  return mrb_bool_value(mrb_iv_defined(mrb, self, sym));
+}
+
+/* 15.3.1.3.21 */
+/*
+ *  call-seq:
+ *     obj.instance_variable_get(symbol)    -> obj
+ *
+ *  Returns the value of the given instance variable, or nil if the
+ *  instance variable is not set. The <code>@</code> part of the
+ *  variable name should be included for regular instance
+ *  variables. Throws a <code>NameError</code> exception if the
+ *  supplied symbol is not valid as an instance variable name.
+ *
+ *     class Fred
+ *       def initialize(p1, p2)
+ *         @a, @b = p1, p2
+ *       end
+ *     end
+ *     fred = Fred.new('cat', 99)
+ *     fred.instance_variable_get(:@a)    #=> "cat"
+ *     fred.instance_variable_get("@b")   #=> 99
+ */
+static mrb_value
+mrb_obj_ivar_get(mrb_state *mrb, mrb_value self)
+{
+  mrb_sym iv_name;
+
+  mrb_get_args(mrb, "n", &iv_name);
+  mrb_iv_check(mrb, iv_name);
+  return mrb_iv_get(mrb, self, iv_name);
+}
+
+/* 15.3.1.3.22 */
+/*
+ *  call-seq:
+ *     obj.instance_variable_set(symbol, obj)    -> obj
+ *
+ *  Sets the instance variable names by <i>symbol</i> to
+ *  <i>object</i>, thereby frustrating the efforts of the class's
+ *  author to attempt to provide proper encapsulation. The variable
+ *  did not have to exist prior to this call.
+ *
+ *     class Fred
+ *       def initialize(p1, p2)
+ *         @a, @b = p1, p2
+ *       end
+ *     end
+ *     fred = Fred.new('cat', 99)
+ *     fred.instance_variable_set(:@a, 'dog')   #=> "dog"
+ *     fred.instance_variable_set(:@c, 'cat')   #=> "cat"
+ *     fred.inspect                             #=> "#<Fred:0x401b3da8 @a=\"dog\", @b=99, @c=\"cat\">"
+ */
+static mrb_value
+mrb_obj_ivar_set(mrb_state *mrb, mrb_value self)
+{
+  mrb_sym iv_name;
+  mrb_value val;
+
+  mrb_get_args(mrb, "no", &iv_name, &val);
+  mrb_iv_check(mrb, iv_name);
+  mrb_iv_set(mrb, self, iv_name, val);
+  return val;
+}
+
+/* 15.3.1.3.24 */
+/* 15.3.1.3.26 */
+/*
+ *  call-seq:
+ *     obj.is_a?(class)       -> true or false
+ *     obj.kind_of?(class)    -> true or false
+ *
+ *  Returns <code>true</code> if <i>class</i> is the class of
+ *  <i>obj</i>, or if <i>class</i> is one of the superclasses of
+ *  <i>obj</i> or modules included in <i>obj</i>.
+ *
+ *     module M;    end
+ *     class A
+ *       include M
+ *     end
+ *     class B < A; end
+ *     class C < B; end
+ *     b = B.new
+ *     b.instance_of? A   #=> false
+ *     b.instance_of? B   #=> true
+ *     b.instance_of? C   #=> false
+ *     b.instance_of? M   #=> false
+ *     b.kind_of? A       #=> true
+ *     b.kind_of? B       #=> true
+ *     b.kind_of? C       #=> false
+ *     b.kind_of? M       #=> true
+ */
+static mrb_value
+mrb_obj_is_kind_of_m(mrb_state *mrb, mrb_value self)
+{
+  mrb_value arg;
+
+  mrb_get_args(mrb, "C", &arg);
+
+  return mrb_bool_value(mrb_obj_is_kind_of(mrb, self, mrb_class_ptr(arg)));
+}
+
+KHASH_DECLARE(st, mrb_sym, char, FALSE)
+KHASH_DEFINE(st, mrb_sym, char, FALSE, kh_int_hash_func, kh_int_hash_equal)
+
+static void
+method_entry_loop(mrb_state *mrb, struct RClass* klass, khash_t(st)* set)
+{
+  khint_t i;
+
+  khash_t(mt) *h = klass->mt;
+  if (!h) return;
+  for (i=0;i<kh_end(h);i++) {
+    if (kh_exist(h, i) && kh_value(h, i)) {
+      kh_put(st, mrb, set, kh_key(h, i));
+    }
+  }
+}
+
+mrb_value
+mrb_class_instance_method_list(mrb_state *mrb, mrb_bool recur, struct RClass* klass, int obj)
+{
+  khint_t i;
+  mrb_value ary;
+  mrb_bool prepended = FALSE;
+  struct RClass* oldklass;
+  khash_t(st)* set = kh_init(st, mrb);
+
+  if (!recur && (klass->flags & MRB_FLAG_IS_PREPENDED)) {
+    MRB_CLASS_ORIGIN(klass);
+    prepended = TRUE;
+  }
+
+  oldklass = 0;
+  while (klass && (klass != oldklass)) {
+    method_entry_loop(mrb, klass, set);
+    if ((klass->tt == MRB_TT_ICLASS && !prepended) ||
+        (klass->tt == MRB_TT_SCLASS)) {
+    }
+    else {
+      if (!recur) break;
+    }
+    oldklass = klass;
+    klass = klass->super;
+  }
+
+  ary = mrb_ary_new(mrb);
+  for (i=0;i<kh_end(set);i++) {
+    if (kh_exist(set, i)) {
+      mrb_ary_push(mrb, ary, mrb_symbol_value(kh_key(set, i)));
+    }
+  }
+  kh_destroy(st, mrb, set);
+
+  return ary;
+}
+
+static mrb_value
+mrb_obj_singleton_methods(mrb_state *mrb, mrb_bool recur, mrb_value obj)
+{
+  khint_t i;
+  mrb_value ary;
+  struct RClass* klass;
+  khash_t(st)* set = kh_init(st, mrb);
+
+  klass = mrb_class(mrb, obj);
+
+  if (klass && (klass->tt == MRB_TT_SCLASS)) {
+      method_entry_loop(mrb, klass, set);
+      klass = klass->super;
+  }
+  if (recur) {
+      while (klass && ((klass->tt == MRB_TT_SCLASS) || (klass->tt == MRB_TT_ICLASS))) {
+        method_entry_loop(mrb, klass, set);
+        klass = klass->super;
+      }
+  }
+
+  ary = mrb_ary_new(mrb);
+  for (i=0;i<kh_end(set);i++) {
+    if (kh_exist(set, i)) {
+      mrb_ary_push(mrb, ary, mrb_symbol_value(kh_key(set, i)));
+    }
+  }
+  kh_destroy(st, mrb, set);
+
+  return ary;
+}
+
+static mrb_value
+mrb_obj_methods(mrb_state *mrb, mrb_bool recur, mrb_value obj, mrb_method_flag_t flag)
+{
+  if (recur)
+    return mrb_class_instance_method_list(mrb, recur, mrb_class(mrb, obj), 0);
+  return mrb_obj_singleton_methods(mrb, recur, obj);
+}
+/* 15.3.1.3.31 */
+/*
+ *  call-seq:
+ *     obj.methods    -> array
+ *
+ *  Returns a list of the names of methods publicly accessible in
+ *  <i>obj</i>. This will include all the methods accessible in
+ *  <i>obj</i>'s ancestors.
+ *
+ *     class Klass
+ *       def kMethod()
+ *       end
+ *     end
+ *     k = Klass.new
+ *     k.methods[0..9]    #=> [:kMethod, :respond_to?, :nil?, :is_a?,
+ *                        #    :class, :instance_variable_set,
+ *                        #    :methods, :extend, :__send__, :instance_eval]
+ *     k.methods.length   #=> 42
+ */
+static mrb_value
+mrb_obj_methods_m(mrb_state *mrb, mrb_value self)
+{
+  mrb_bool recur = TRUE;
+  mrb_get_args(mrb, "|b", &recur);
+  return mrb_obj_methods(mrb, recur, self, (mrb_method_flag_t)0); /* everything but private */
+}
+
+/* 15.3.1.3.32 */
+/*
+ * call_seq:
+ *   nil.nil?               -> true
+ *   <anything_else>.nil?   -> false
+ *
+ * Only the object <i>nil</i> responds <code>true</code> to <code>nil?</code>.
+ */
+static mrb_value
+mrb_false(mrb_state *mrb, mrb_value self)
+{
+  return mrb_false_value();
+}
+
+/* 15.3.1.3.36 */
+/*
+ *  call-seq:
+ *     obj.private_methods(all=true)   -> array
+ *
+ *  Returns the list of private methods accessible to <i>obj</i>. If
+ *  the <i>all</i> parameter is set to <code>false</code>, only those methods
+ *  in the receiver will be listed.
+ */
+static mrb_value
+mrb_obj_private_methods(mrb_state *mrb, mrb_value self)
+{
+  mrb_bool recur = TRUE;
+  mrb_get_args(mrb, "|b", &recur);
+  return mrb_obj_methods(mrb, recur, self, NOEX_PRIVATE); /* private attribute not define */
+}
+
+/* 15.3.1.3.37 */
+/*
+ *  call-seq:
+ *     obj.protected_methods(all=true)   -> array
+ *
+ *  Returns the list of protected methods accessible to <i>obj</i>. If
+ *  the <i>all</i> parameter is set to <code>false</code>, only those methods
+ *  in the receiver will be listed.
+ */
+static mrb_value
+mrb_obj_protected_methods(mrb_state *mrb, mrb_value self)
+{
+  mrb_bool recur = TRUE;
+  mrb_get_args(mrb, "|b", &recur);
+  return mrb_obj_methods(mrb, recur, self, NOEX_PROTECTED); /* protected attribute not define */
+}
+
+/* 15.3.1.3.38 */
+/*
+ *  call-seq:
+ *     obj.public_methods(all=true)   -> array
+ *
+ *  Returns the list of public methods accessible to <i>obj</i>. If
+ *  the <i>all</i> parameter is set to <code>false</code>, only those methods
+ *  in the receiver will be listed.
+ */
+static mrb_value
+mrb_obj_public_methods(mrb_state *mrb, mrb_value self)
+{
+  mrb_bool recur = TRUE;
+  mrb_get_args(mrb, "|b", &recur);
+  return mrb_obj_methods(mrb, recur, self, NOEX_PUBLIC); /* public attribute not define */
+}
+
+/* 15.3.1.2.12  */
+/* 15.3.1.3.40 */
+/*
+ *  call-seq:
+ *     raise
+ *     raise(string)
+ *     raise(exception [, string])
+ *
+ *  With no arguments, raises a <code>RuntimeError</code>
+ *  With a single +String+ argument, raises a
+ *  +RuntimeError+ with the string as a message. Otherwise,
+ *  the first parameter should be the name of an +Exception+
+ *  class (or an object that returns an +Exception+ object when sent
+ *  an +exception+ message). The optional second parameter sets the
+ *  message associated with the exception, and the third parameter is an
+ *  array of callback information. Exceptions are caught by the
+ *  +rescue+ clause of <code>begin...end</code> blocks.
+ *
+ *     raise "Failed to create socket"
+ *     raise ArgumentError, "No parameters", caller
+ */
+MRB_API mrb_value
+mrb_f_raise(mrb_state *mrb, mrb_value self)
+{
+  mrb_value a[2], exc;
+  int argc;
+
+
+  argc = mrb_get_args(mrb, "|oo", &a[0], &a[1]);
+  switch (argc) {
+  case 0:
+    mrb_raise(mrb, E_RUNTIME_ERROR, "");
+    break;
+  case 1:
+    a[1] = mrb_check_string_type(mrb, a[0]);
+    if (!mrb_nil_p(a[1])) {
+      argc = 2;
+      a[0] = mrb_obj_value(E_RUNTIME_ERROR);
+    }
+    /* fall through */
+  default:
+    exc = mrb_make_exception(mrb, argc, a);
+    mrb_obj_iv_set(mrb, mrb_obj_ptr(exc), mrb_intern_lit(mrb, "lastpc"), mrb_cptr_value(mrb, mrb->c->ci->pc));
+    mrb_exc_raise(mrb, exc);
+    break;
+  }
+  return mrb_nil_value();            /* not reached */
+}
+
+/* 15.3.1.3.41 */
+/*
+ *  call-seq:
+ *     obj.remove_instance_variable(symbol)    -> obj
+ *
+ *  Removes the named instance variable from <i>obj</i>, returning that
+ *  variable's value.
+ *
+ *     class Dummy
+ *       attr_reader :var
+ *       def initialize
+ *         @var = 99
+ *       end
+ *       def remove
+ *         remove_instance_variable(:@var)
+ *       end
+ *     end
+ *     d = Dummy.new
+ *     d.var      #=> 99
+ *     d.remove   #=> 99
+ *     d.var      #=> nil
+ */
+static mrb_value
+mrb_obj_remove_instance_variable(mrb_state *mrb, mrb_value self)
+{
+  mrb_sym sym;
+  mrb_value val;
+
+  mrb_get_args(mrb, "n", &sym);
+  mrb_iv_check(mrb, sym);
+  val = mrb_iv_remove(mrb, self, sym);
+  if (mrb_undef_p(val)) {
+    mrb_name_error(mrb, sym, "instance variable %S not defined", mrb_sym2str(mrb, sym));
+  }
+  return val;
+}
+
+static inline mrb_bool
+basic_obj_respond_to(mrb_state *mrb, mrb_value obj, mrb_sym id, int pub)
+{
+  return mrb_respond_to(mrb, obj, id);
+}
+/* 15.3.1.3.43 */
+/*
+ *  call-seq:
+ *     obj.respond_to?(symbol, include_private=false) -> true or false
+ *
+ *  Returns +true+ if _obj_ responds to the given
+ *  method. Private methods are included in the search only if the
+ *  optional second parameter evaluates to +true+.
+ *
+ *  If the method is not implemented,
+ *  as Process.fork on Windows, File.lchmod on GNU/Linux, etc.,
+ *  false is returned.
+ *
+ *  If the method is not defined, <code>respond_to_missing?</code>
+ *  method is called and the result is returned.
+ */
+static mrb_value
+obj_respond_to(mrb_state *mrb, mrb_value self)
+{
+  mrb_value mid;
+  mrb_sym id, rtm_id;
+  mrb_bool priv = FALSE, respond_to_p = TRUE;
+
+  mrb_get_args(mrb, "o|b", &mid, &priv);
+
+  if (mrb_symbol_p(mid)) {
+    id = mrb_symbol(mid);
+  }
+  else {
+    mrb_value tmp;
+    if (!mrb_string_p(mid)) {
+      tmp = mrb_check_string_type(mrb, mid);
+      if (mrb_nil_p(tmp)) {
+        tmp = mrb_inspect(mrb, mid);
+        mrb_raisef(mrb, E_TYPE_ERROR, "%S is not a symbol", tmp);
+      }
+    }
+    tmp = mrb_check_intern_str(mrb, mid);
+    if (mrb_nil_p(tmp)) {
+      respond_to_p = FALSE;
+    }
+    else {
+      id = mrb_symbol(tmp);
+    }
+  }
+
+  if (respond_to_p) {
+    respond_to_p = basic_obj_respond_to(mrb, self, id, !priv);
+  }
+
+  if (!respond_to_p) {
+    rtm_id = mrb_intern_lit(mrb, "respond_to_missing?");
+    if (basic_obj_respond_to(mrb, self, rtm_id, !priv)) {
+      mrb_value args[2];
+      args[0] = mid;
+      args[1] = mrb_bool_value(priv);
+      return mrb_funcall_argv(mrb, self, rtm_id, 2, args);
+    }
+  }
+  return mrb_bool_value(respond_to_p);
+}
+
+/* 15.3.1.3.45 */
+/*
+ *  call-seq:
+ *     obj.singleton_methods(all=true)    -> array
+ *
+ *  Returns an array of the names of singleton methods for <i>obj</i>.
+ *  If the optional <i>all</i> parameter is true, the list will include
+ *  methods in modules included in <i>obj</i>.
+ *  Only public and protected singleton methods are returned.
+ *
+ *     module Other
+ *       def three() end
+ *     end
+ *
+ *     class Single
+ *       def Single.four() end
+ *     end
+ *
+ *     a = Single.new
+ *
+ *     def a.one()
+ *     end
+ *
+ *     class << a
+ *       include Other
+ *       def two()
+ *       end
+ *     end
+ *
+ *     Single.singleton_methods    #=> [:four]
+ *     a.singleton_methods(false)  #=> [:two, :one]
+ *     a.singleton_methods         #=> [:two, :one, :three]
+ */
+static mrb_value
+mrb_obj_singleton_methods_m(mrb_state *mrb, mrb_value self)
+{
+  mrb_bool recur = TRUE;
+  mrb_get_args(mrb, "|b", &recur);
+  return mrb_obj_singleton_methods(mrb, recur, self);
+}
+
+static mrb_value
+mod_define_singleton_method(mrb_state *mrb, mrb_value self)
+{
+  struct RProc *p;
+  mrb_sym mid;
+  mrb_value blk = mrb_nil_value();
+
+  mrb_get_args(mrb, "n&", &mid, &blk);
+  if (mrb_nil_p(blk)) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "no block given");
+  }
+  p = (struct RProc*)mrb_obj_alloc(mrb, MRB_TT_PROC, mrb->proc_class);
+  mrb_proc_copy(p, mrb_proc_ptr(blk));
+  p->flags |= MRB_PROC_STRICT;
+  mrb_define_method_raw(mrb, mrb_class_ptr(mrb_singleton_class(mrb, self)), mid, p);
+  return mrb_symbol_value(mid);
+}
+
+static mrb_value
+mrb_obj_ceqq(mrb_state *mrb, mrb_value self)
+{
+  mrb_value v;
+  mrb_int i, len;
+  mrb_sym eqq = mrb_intern_lit(mrb, "===");
+  mrb_value ary = mrb_ary_splat(mrb, self);
+
+  mrb_get_args(mrb, "o", &v);
+  len = RARRAY_LEN(ary);
+  for (i=0; i<len; i++) {
+    mrb_value c = mrb_funcall_argv(mrb, mrb_ary_entry(ary, i), eqq, 1, &v);
+    if (mrb_test(c)) return mrb_true_value();
+  }
+  return mrb_false_value();
+}
+
+static mrb_value
+mrb_local_variables(mrb_state *mrb, mrb_value self)
+{
+  mrb_value ret;
+  struct RProc *proc;
+  struct mrb_irep *irep;
+  size_t i;
+
+  proc = mrb->c->ci[-1].proc;
+
+  if (MRB_PROC_CFUNC_P(proc)) {
+    return mrb_ary_new(mrb);
+  }
+
+  irep = proc->body.irep;
+  if (!irep->lv) {
+    return mrb_ary_new(mrb);
+  }
+  ret = mrb_ary_new_capa(mrb, irep->nlocals - 1);
+  for (i = 0; i + 1 < irep->nlocals; ++i) {
+    if (irep->lv[i].name) {
+      mrb_ary_push(mrb, ret, mrb_symbol_value(irep->lv[i].name));
+    }
+  }
+  if (proc->env) {
+    struct REnv *e = proc->env;
+
+    while (e) {
+      if (!MRB_PROC_CFUNC_P(mrb->c->cibase[e->cioff].proc)) {
+        irep = mrb->c->cibase[e->cioff].proc->body.irep;
+        if (irep->lv) {
+          for (i = 0; i + 1 < irep->nlocals; ++i) {
+            if (irep->lv[i].name) {
+              mrb_ary_push(mrb, ret, mrb_symbol_value(irep->lv[i].name));
+            }
+          }
+        }
+      }
+      e = (struct REnv*)e->c;
+    }
+  }
+
+  return ret;
+}
+
+void
+mrb_init_kernel(mrb_state *mrb)
+{
+  struct RClass *krn;
+
+  mrb->kernel_module = krn = mrb_define_module(mrb, "Kernel");                                                    /* 15.3.1 */
+  mrb_define_class_method(mrb, krn, "block_given?",         mrb_f_block_given_p_m,           MRB_ARGS_NONE());    /* 15.3.1.2.2  */
+  mrb_define_class_method(mrb, krn, "global_variables",     mrb_f_global_variables,          MRB_ARGS_NONE());    /* 15.3.1.2.4  */
+  mrb_define_class_method(mrb, krn, "iterator?",            mrb_f_block_given_p_m,           MRB_ARGS_NONE());    /* 15.3.1.2.5  */
+  mrb_define_class_method(mrb, krn, "local_variables",      mrb_local_variables,             MRB_ARGS_NONE());    /* 15.3.1.2.7  */
+;     /* 15.3.1.2.11 */
+  mrb_define_class_method(mrb, krn, "raise",                mrb_f_raise,                     MRB_ARGS_OPT(2));    /* 15.3.1.2.12 */
+
+  mrb_define_method(mrb, krn, "singleton_class",            mrb_singleton_class,             MRB_ARGS_NONE());
+
+  mrb_define_method(mrb, krn, "==",                         mrb_obj_equal_m,                 MRB_ARGS_REQ(1));    /* 15.3.1.3.1  */
+  mrb_define_method(mrb, krn, "!=",                         mrb_obj_not_equal_m,             MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, krn, "===",                        mrb_equal_m,                     MRB_ARGS_REQ(1));    /* 15.3.1.3.2  */
+  mrb_define_method(mrb, krn, "__id__",                     mrb_obj_id_m,                    MRB_ARGS_NONE());    /* 15.3.1.3.3  */
+  mrb_define_method(mrb, krn, "__send__",                   mrb_f_send,                      MRB_ARGS_ANY());     /* 15.3.1.3.4  */
+  mrb_define_method(mrb, krn, "block_given?",               mrb_f_block_given_p_m,           MRB_ARGS_NONE());    /* 15.3.1.3.6  */
+  mrb_define_method(mrb, krn, "class",                      mrb_obj_class_m,                 MRB_ARGS_NONE());    /* 15.3.1.3.7  */
+  mrb_define_method(mrb, krn, "clone",                      mrb_obj_clone,                   MRB_ARGS_NONE());    /* 15.3.1.3.8  */
+  mrb_define_method(mrb, krn, "dup",                        mrb_obj_dup,                     MRB_ARGS_NONE());    /* 15.3.1.3.9  */
+  mrb_define_method(mrb, krn, "eql?",                       mrb_obj_equal_m,                 MRB_ARGS_REQ(1));    /* 15.3.1.3.10 */
+  mrb_define_method(mrb, krn, "equal?",                     mrb_obj_equal_m,                 MRB_ARGS_REQ(1));    /* 15.3.1.3.11 */
+  mrb_define_method(mrb, krn, "extend",                     mrb_obj_extend_m,                MRB_ARGS_ANY());     /* 15.3.1.3.13 */
+  mrb_define_method(mrb, krn, "global_variables",           mrb_f_global_variables,          MRB_ARGS_NONE());    /* 15.3.1.3.14 */
+  mrb_define_method(mrb, krn, "hash",                       mrb_obj_hash,                    MRB_ARGS_NONE());    /* 15.3.1.3.15 */
+  mrb_define_method(mrb, krn, "initialize_copy",            mrb_obj_init_copy,               MRB_ARGS_REQ(1));    /* 15.3.1.3.16 */
+  mrb_define_method(mrb, krn, "inspect",                    mrb_obj_inspect,                 MRB_ARGS_NONE());    /* 15.3.1.3.17 */
+  mrb_define_method(mrb, krn, "instance_eval",              mrb_obj_instance_eval,           MRB_ARGS_ANY());     /* 15.3.1.3.18 */
+  mrb_define_method(mrb, krn, "instance_of?",               obj_is_instance_of,              MRB_ARGS_REQ(1));    /* 15.3.1.3.19 */
+  mrb_define_method(mrb, krn, "instance_variable_defined?", mrb_obj_ivar_defined,            MRB_ARGS_REQ(1));    /* 15.3.1.3.20 */
+  mrb_define_method(mrb, krn, "instance_variable_get",      mrb_obj_ivar_get,                MRB_ARGS_REQ(1));    /* 15.3.1.3.21 */
+  mrb_define_method(mrb, krn, "instance_variable_set",      mrb_obj_ivar_set,                MRB_ARGS_REQ(2));    /* 15.3.1.3.22 */
+  mrb_define_method(mrb, krn, "instance_variables",         mrb_obj_instance_variables,      MRB_ARGS_NONE());    /* 15.3.1.3.23 */
+  mrb_define_method(mrb, krn, "is_a?",                      mrb_obj_is_kind_of_m,            MRB_ARGS_REQ(1));    /* 15.3.1.3.24 */
+  mrb_define_method(mrb, krn, "iterator?",                  mrb_f_block_given_p_m,           MRB_ARGS_NONE());    /* 15.3.1.3.25 */
+  mrb_define_method(mrb, krn, "kind_of?",                   mrb_obj_is_kind_of_m,            MRB_ARGS_REQ(1));    /* 15.3.1.3.26 */
+  mrb_define_method(mrb, krn, "local_variables",            mrb_local_variables,             MRB_ARGS_NONE());    /* 15.3.1.3.28 */
+  mrb_define_method(mrb, krn, "methods",                    mrb_obj_methods_m,               MRB_ARGS_OPT(1));    /* 15.3.1.3.31 */
+  mrb_define_method(mrb, krn, "nil?",                       mrb_false,                       MRB_ARGS_NONE());    /* 15.3.1.3.32 */
+  mrb_define_method(mrb, krn, "object_id",                  mrb_obj_id_m,                    MRB_ARGS_NONE());    /* 15.3.1.3.33 */
+  mrb_define_method(mrb, krn, "private_methods",            mrb_obj_private_methods,         MRB_ARGS_OPT(1));    /* 15.3.1.3.36 */
+  mrb_define_method(mrb, krn, "protected_methods",          mrb_obj_protected_methods,       MRB_ARGS_OPT(1));    /* 15.3.1.3.37 */
+  mrb_define_method(mrb, krn, "public_methods",             mrb_obj_public_methods,          MRB_ARGS_OPT(1));    /* 15.3.1.3.38 */
+  mrb_define_method(mrb, krn, "raise",                      mrb_f_raise,                     MRB_ARGS_ANY());     /* 15.3.1.3.40 */
+  mrb_define_method(mrb, krn, "remove_instance_variable",   mrb_obj_remove_instance_variable,MRB_ARGS_REQ(1));    /* 15.3.1.3.41 */
+  mrb_define_method(mrb, krn, "respond_to?",                obj_respond_to,                  MRB_ARGS_ANY());     /* 15.3.1.3.43 */
+  mrb_define_method(mrb, krn, "send",                       mrb_f_send,                      MRB_ARGS_ANY());     /* 15.3.1.3.44 */
+  mrb_define_method(mrb, krn, "singleton_methods",          mrb_obj_singleton_methods_m,     MRB_ARGS_OPT(1));    /* 15.3.1.3.45 */
+  mrb_define_method(mrb, krn, "define_singleton_method",    mod_define_singleton_method,     MRB_ARGS_ANY());
+  mrb_define_method(mrb, krn, "to_s",                       mrb_any_to_s,                    MRB_ARGS_NONE());    /* 15.3.1.3.46 */
+  mrb_define_method(mrb, krn, "__case_eqq",                 mrb_obj_ceqq,                    MRB_ARGS_REQ(1));    /* internal */
+
+  mrb_include_module(mrb, mrb->object_class, mrb->kernel_module);
+  mrb_alias_method(mrb, mrb->module_class, mrb_intern_lit(mrb, "dup"), mrb_intern_lit(mrb, "clone"));
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/load.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/load.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/load.c	(revision 270)
@@ -0,0 +1,707 @@
+/*
+** load.c - mruby binary loader
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mruby/dump.h"
+#include "mruby/irep.h"
+#include "mruby/proc.h"
+#include "mruby/string.h"
+#include "mruby/debug.h"
+#include "mruby/error.h"
+
+#if SIZE_MAX < UINT32_MAX
+# error size_t must be at least 32 bits wide
+#endif
+
+#define FLAG_BYTEORDER_BIG 2
+#define FLAG_BYTEORDER_LIL 4
+#define FLAG_BYTEORDER_NATIVE 8
+#define FLAG_SRC_MALLOC 1
+#define FLAG_SRC_STATIC 0
+
+#define SIZE_ERROR_MUL(nmemb, size) ((nmemb) > SIZE_MAX / (size))
+
+static size_t
+skip_padding(const uint8_t *buf)
+{
+  const size_t align = MRB_DUMP_ALIGNMENT;
+  return -(intptr_t)buf & (align-1);
+}
+
+static size_t
+offset_crc_body(void)
+{
+  struct rite_binary_header header;
+  return ((uint8_t *)header.binary_crc - (uint8_t *)&header) + sizeof(header.binary_crc);
+}
+
+static mrb_irep*
+read_irep_record_1(mrb_state *mrb, const uint8_t *bin, size_t *len, uint8_t flags)
+{
+  size_t i;
+  const uint8_t *src = bin;
+  ptrdiff_t diff;
+  uint16_t tt, pool_data_len, snl;
+  size_t plen;
+  int ai = mrb_gc_arena_save(mrb);
+  mrb_irep *irep = mrb_add_irep(mrb);
+
+  /* skip record size */
+  src += sizeof(uint32_t);
+
+  /* number of local variable */
+  irep->nlocals = bin_to_uint16(src);
+  src += sizeof(uint16_t);
+
+  /* number of register variable */
+  irep->nregs = bin_to_uint16(src);
+  src += sizeof(uint16_t);
+
+  /* number of child irep */
+  irep->rlen = (size_t)bin_to_uint16(src);
+  src += sizeof(uint16_t);
+
+  /* Binary Data Section */
+  /* ISEQ BLOCK */
+  irep->ilen = (size_t)bin_to_uint32(src);
+  src += sizeof(uint32_t);
+  src += skip_padding(src);
+
+  if (irep->ilen > 0) {
+    if (SIZE_ERROR_MUL(irep->ilen, sizeof(mrb_code))) {
+      return NULL;
+    }
+    if ((flags & FLAG_SRC_MALLOC) == 0 &&
+        (flags & FLAG_BYTEORDER_NATIVE)) {
+      irep->iseq = (mrb_code*)src;
+      src += sizeof(uint32_t) * irep->ilen;
+      irep->flags |= MRB_ISEQ_NO_FREE;
+    }
+    else {
+      irep->iseq = (mrb_code *)mrb_malloc(mrb, sizeof(mrb_code) * irep->ilen);
+      if (flags & FLAG_BYTEORDER_NATIVE) {
+        memcpy(irep->iseq, src, sizeof(uint32_t) * irep->ilen);
+        src += sizeof(uint32_t) * irep->ilen;
+      }
+      else if (flags & FLAG_BYTEORDER_BIG) {
+        for (i = 0; i < irep->ilen; i++) {
+          irep->iseq[i] = (mrb_code)bin_to_uint32(src);     /* iseq */
+          src += sizeof(uint32_t);
+        }
+      }
+      else {
+        for (i = 0; i < irep->ilen; i++) {
+          irep->iseq[i] = (mrb_code)bin_to_uint32l(src);     /* iseq */
+          src += sizeof(uint32_t);
+        }
+      }
+    }
+  }
+
+  /* POOL BLOCK */
+  plen = (size_t)bin_to_uint32(src); /* number of pool */
+  src += sizeof(uint32_t);
+  if (plen > 0) {
+    if (SIZE_ERROR_MUL(plen, sizeof(mrb_value))) {
+      return NULL;
+    }
+    irep->pool = (mrb_value*)mrb_malloc(mrb, sizeof(mrb_value) * plen);
+
+    for (i = 0; i < plen; i++) {
+      mrb_value s;
+
+      tt = *src++; /* pool TT */
+      pool_data_len = bin_to_uint16(src); /* pool data length */
+      src += sizeof(uint16_t);
+      if (flags & FLAG_SRC_MALLOC) {
+        s = mrb_str_new(mrb, (char *)src, pool_data_len);
+      }
+      else {
+        s = mrb_str_new_static(mrb, (char *)src, pool_data_len);
+      }
+      src += pool_data_len;
+      switch (tt) { /* pool data */
+      case IREP_TT_FIXNUM:
+        irep->pool[i] = mrb_str_to_inum(mrb, s, 10, FALSE);
+        break;
+
+      case IREP_TT_FLOAT:
+        irep->pool[i] = mrb_float_pool(mrb, mrb_str_to_dbl(mrb, s, FALSE));
+        break;
+
+      case IREP_TT_STRING:
+        irep->pool[i] = mrb_str_pool(mrb, s);
+        break;
+
+      default:
+        /* should not happen */
+        irep->pool[i] = mrb_nil_value();
+        break;
+      }
+      irep->plen++;
+      mrb_gc_arena_restore(mrb, ai);
+    }
+  }
+
+  /* SYMS BLOCK */
+  irep->slen = (size_t)bin_to_uint32(src);  /* syms length */
+  src += sizeof(uint32_t);
+  if (irep->slen > 0) {
+    if (SIZE_ERROR_MUL(irep->slen, sizeof(mrb_sym))) {
+      return NULL;
+    }
+    irep->syms = (mrb_sym *)mrb_malloc(mrb, sizeof(mrb_sym) * irep->slen);
+
+    for (i = 0; i < irep->slen; i++) {
+      snl = bin_to_uint16(src);               /* symbol name length */
+      src += sizeof(uint16_t);
+
+      if (snl == MRB_DUMP_NULL_SYM_LEN) {
+        irep->syms[i] = 0;
+        continue;
+      }
+
+      if (flags & FLAG_SRC_MALLOC) {
+        irep->syms[i] = mrb_intern(mrb, (char *)src, snl);
+      }
+      else {
+        irep->syms[i] = mrb_intern_static(mrb, (char *)src, snl);
+      }
+      src += snl + 1;
+
+      mrb_gc_arena_restore(mrb, ai);
+    }
+  }
+
+  irep->reps = (mrb_irep**)mrb_malloc(mrb, sizeof(mrb_irep*)*irep->rlen);
+
+  diff = src - bin;
+  mrb_assert_int_fit(ptrdiff_t, diff, size_t, SIZE_MAX);
+  *len = (size_t)diff;
+
+  return irep;
+}
+
+static mrb_irep*
+read_irep_record(mrb_state *mrb, const uint8_t *bin, size_t *len, uint8_t flags)
+{
+  mrb_irep *irep = read_irep_record_1(mrb, bin, len, flags);
+  size_t i;
+
+  if (irep == NULL) {
+    return NULL;
+  }
+
+  bin += *len;
+  for (i=0; i<irep->rlen; i++) {
+    size_t rlen;
+
+    irep->reps[i] = read_irep_record(mrb, bin, &rlen, flags);
+    if (irep->reps[i] == NULL) {
+      return NULL;
+    }
+    bin += rlen;
+    *len += rlen;
+  }
+  return irep;
+}
+
+static mrb_irep*
+read_section_irep(mrb_state *mrb, const uint8_t *bin, uint8_t flags)
+{
+  size_t len;
+
+  bin += sizeof(struct rite_section_irep_header);
+  return read_irep_record(mrb, bin, &len, flags);
+}
+
+static int
+read_lineno_record_1(mrb_state *mrb, const uint8_t *bin, mrb_irep *irep, size_t *len)
+{
+  size_t i, fname_len, niseq;
+  char *fname;
+  uint16_t *lines;
+
+  *len = 0;
+  bin += sizeof(uint32_t); /* record size */
+  *len += sizeof(uint32_t);
+  fname_len = bin_to_uint16(bin);
+  bin += sizeof(uint16_t);
+  *len += sizeof(uint16_t);
+  fname = (char *)mrb_malloc(mrb, fname_len + 1);
+  memcpy(fname, bin, fname_len);
+  fname[fname_len] = '\0';
+  bin += fname_len;
+  *len += fname_len;
+
+  niseq = (size_t)bin_to_uint32(bin);
+  bin += sizeof(uint32_t); /* niseq */
+  *len += sizeof(uint32_t);
+
+  if (SIZE_ERROR_MUL(niseq, sizeof(uint16_t))) {
+    return MRB_DUMP_GENERAL_FAILURE;
+  }
+  lines = (uint16_t *)mrb_malloc(mrb, niseq * sizeof(uint16_t));
+  for (i = 0; i < niseq; i++) {
+    lines[i] = bin_to_uint16(bin);
+    bin += sizeof(uint16_t); /* niseq */
+    *len += sizeof(uint16_t);
+  }
+
+  irep->filename = fname;
+  irep->lines = lines;
+  return MRB_DUMP_OK;
+}
+
+static int
+read_lineno_record(mrb_state *mrb, const uint8_t *bin, mrb_irep *irep, size_t *lenp)
+{
+  int result = read_lineno_record_1(mrb, bin, irep, lenp);
+  size_t i;
+
+  if (result != MRB_DUMP_OK) return result;
+  for (i = 0; i < irep->rlen; i++) {
+    size_t len;
+
+    result = read_lineno_record(mrb, bin, irep->reps[i], &len);
+    if (result != MRB_DUMP_OK) break;
+    bin += len;
+    *lenp += len;
+  }
+  return result;
+}
+
+static int
+read_section_lineno(mrb_state *mrb, const uint8_t *bin, mrb_irep *irep)
+{
+  size_t len;
+
+  len = 0;
+  bin += sizeof(struct rite_section_lineno_header);
+
+  /* Read Binary Data Section */
+  return read_lineno_record(mrb, bin, irep, &len);
+}
+
+static int
+read_debug_record(mrb_state *mrb, const uint8_t *start, mrb_irep* irep, size_t *record_len, const mrb_sym *filenames, size_t filenames_len)
+{
+  const uint8_t *bin = start;
+  ptrdiff_t diff;
+  size_t record_size, i;
+  uint16_t f_idx;
+
+  if (irep->debug_info) { return MRB_DUMP_INVALID_IREP; }
+
+  irep->debug_info = (mrb_irep_debug_info*)mrb_malloc(mrb, sizeof(mrb_irep_debug_info));
+  irep->debug_info->pc_count = irep->ilen;
+
+  record_size = (size_t)bin_to_uint32(bin);
+  bin += sizeof(uint32_t);
+
+  irep->debug_info->flen = bin_to_uint16(bin);
+  irep->debug_info->files = (mrb_irep_debug_info_file**)mrb_malloc(mrb, sizeof(mrb_irep_debug_info*) * irep->debug_info->flen);
+  bin += sizeof(uint16_t);
+
+  for (f_idx = 0; f_idx < irep->debug_info->flen; ++f_idx) {
+    mrb_irep_debug_info_file *file;
+    uint16_t filename_idx;
+    mrb_int len;
+
+    file = (mrb_irep_debug_info_file *)mrb_malloc(mrb, sizeof(*file));
+    irep->debug_info->files[f_idx] = file;
+
+    file->start_pos = bin_to_uint32(bin);
+    bin += sizeof(uint32_t);
+
+    /* filename */
+    filename_idx = bin_to_uint16(bin);
+    bin += sizeof(uint16_t);
+    mrb_assert(filename_idx < filenames_len);
+    file->filename_sym = filenames[filename_idx];
+    len = 0;
+    file->filename = mrb_sym2name_len(mrb, file->filename_sym, &len);
+
+    file->line_entry_count = bin_to_uint32(bin);
+    bin += sizeof(uint32_t);
+    file->line_type = (mrb_debug_line_type)bin_to_uint8(bin);
+    bin += sizeof(uint8_t);
+    switch (file->line_type) {
+      case mrb_debug_line_ary: {
+        uint32_t l;
+
+        file->lines.ary = (uint16_t *)mrb_malloc(mrb, sizeof(uint16_t) * (size_t)(file->line_entry_count));
+        for (l = 0; l < file->line_entry_count; ++l) {
+          file->lines.ary[l] = bin_to_uint16(bin);
+          bin += sizeof(uint16_t);
+        }
+      } break;
+
+      case mrb_debug_line_flat_map: {
+        uint32_t l;
+
+        file->lines.flat_map = (mrb_irep_debug_info_line*)mrb_malloc(
+            mrb, sizeof(mrb_irep_debug_info_line) * (size_t)(file->line_entry_count));
+        for (l = 0; l < file->line_entry_count; ++l) {
+          file->lines.flat_map[l].start_pos = bin_to_uint32(bin);
+          bin += sizeof(uint32_t);
+          file->lines.flat_map[l].line = bin_to_uint16(bin);
+          bin += sizeof(uint16_t);
+        }
+      } break;
+
+      default: return MRB_DUMP_GENERAL_FAILURE;
+    }
+  }
+
+  diff = bin - start;
+  mrb_assert_int_fit(ptrdiff_t, diff, size_t, SIZE_MAX);
+
+  if (record_size != (size_t)diff) {
+    return MRB_DUMP_GENERAL_FAILURE;
+  }
+
+  for (i = 0; i < irep->rlen; i++) {
+    size_t len;
+    int ret;
+
+    ret = read_debug_record(mrb, bin, irep->reps[i], &len, filenames, filenames_len);
+    if (ret != MRB_DUMP_OK) return ret;
+    bin += len;
+  }
+
+  diff = bin - start;
+  mrb_assert_int_fit(ptrdiff_t, diff, size_t, SIZE_MAX);
+  *record_len = (size_t)diff;
+
+  return MRB_DUMP_OK;
+}
+
+static int
+read_section_debug(mrb_state *mrb, const uint8_t *start, mrb_irep *irep, uint8_t flags)
+{
+  const uint8_t *bin;
+  ptrdiff_t diff;
+  struct rite_section_debug_header *header;
+  uint16_t i;
+  size_t len = 0;
+  int result;
+  uint16_t filenames_len;
+  mrb_sym *filenames;
+
+  bin = start;
+  header = (struct rite_section_debug_header *)bin;
+  bin += sizeof(struct rite_section_debug_header);
+
+  filenames_len = bin_to_uint16(bin);
+  bin += sizeof(uint16_t);
+  filenames = (mrb_sym*)mrb_malloc(mrb, sizeof(mrb_sym) * (size_t)filenames_len);
+  for (i = 0; i < filenames_len; ++i) {
+    uint16_t f_len = bin_to_uint16(bin);
+    bin += sizeof(uint16_t);
+    if (flags & FLAG_SRC_MALLOC) {
+      filenames[i] = mrb_intern(mrb, (const char *)bin, (size_t)f_len);
+    }
+    else {
+      filenames[i] = mrb_intern_static(mrb, (const char *)bin, (size_t)f_len);
+    }
+    bin += f_len;
+  }
+
+  result = read_debug_record(mrb, bin, irep, &len, filenames, filenames_len);
+  if (result != MRB_DUMP_OK) goto debug_exit;
+
+  bin += len;
+  diff = bin - start;
+  mrb_assert_int_fit(ptrdiff_t, diff, size_t, SIZE_MAX);
+  if ((uint32_t)diff != bin_to_uint32(header->section_size)) {
+    result = MRB_DUMP_GENERAL_FAILURE;
+  }
+
+debug_exit:
+  mrb_free(mrb, filenames);
+  return result;
+}
+
+static int
+read_lv_record(mrb_state *mrb, const uint8_t *start, mrb_irep *irep, size_t *record_len, mrb_sym const *syms, uint32_t syms_len)
+{
+  const uint8_t *bin = start;
+  size_t i;
+  ptrdiff_t diff;
+
+  irep->lv = (struct mrb_locals*)mrb_malloc(mrb, sizeof(struct mrb_locals) * (irep->nlocals - 1));
+
+  for (i = 0; i + 1< irep->nlocals; ++i) {
+    uint16_t const sym_idx = bin_to_uint16(bin);
+    bin += sizeof(uint16_t);
+    if (sym_idx == RITE_LV_NULL_MARK) {
+      irep->lv[i].name = 0;
+      irep->lv[i].r = 0;
+    }
+    else {
+      if (sym_idx >= syms_len) {
+        return MRB_DUMP_GENERAL_FAILURE;
+      }
+      irep->lv[i].name = syms[sym_idx];
+
+      irep->lv[i].r = bin_to_uint16(bin);
+    }
+    bin += sizeof(uint16_t);
+  }
+
+  for (i = 0; i < irep->rlen; ++i) {
+    size_t len;
+    int ret;
+
+    ret = read_lv_record(mrb, bin, irep->reps[i], &len, syms, syms_len);
+    if (ret != MRB_DUMP_OK) return ret;
+    bin += len;
+  }
+
+  diff = bin - start;
+  mrb_assert_int_fit(ptrdiff_t, diff, size_t, SIZE_MAX);
+  *record_len = (size_t)diff;
+
+  return MRB_DUMP_OK;
+}
+
+static int
+read_section_lv(mrb_state *mrb, const uint8_t *start, mrb_irep *irep, uint8_t flags)
+{
+  const uint8_t *bin;
+  ptrdiff_t diff;
+  struct rite_section_lv_header const *header;
+  uint32_t i;
+  size_t len = 0;
+  int result;
+  uint32_t syms_len;
+  mrb_sym *syms;
+  mrb_sym (*intern_func)(mrb_state*, const char*, size_t) =
+    (flags & FLAG_SRC_MALLOC)? mrb_intern : mrb_intern_static;
+
+  bin = start;
+  header = (struct rite_section_lv_header const*)bin;
+  bin += sizeof(struct rite_section_lv_header);
+
+  syms_len = bin_to_uint32(bin);
+  bin += sizeof(uint32_t);
+  syms = (mrb_sym*)mrb_malloc(mrb, sizeof(mrb_sym) * (size_t)syms_len);
+  for (i = 0; i < syms_len; ++i) {
+    uint16_t const str_len = bin_to_uint16(bin);
+    bin += sizeof(uint16_t);
+
+    syms[i] = intern_func(mrb, (const char*)bin, str_len);
+    bin += str_len;
+  }
+
+  result = read_lv_record(mrb, bin, irep, &len, syms, syms_len);
+  if (result != MRB_DUMP_OK) goto lv_exit;
+
+  bin += len;
+  diff = bin - start;
+  mrb_assert_int_fit(ptrdiff_t, diff, size_t, SIZE_MAX);
+  if ((uint32_t)diff != bin_to_uint32(header->section_size)) {
+    result = MRB_DUMP_GENERAL_FAILURE;
+  }
+
+lv_exit:
+  mrb_free(mrb, syms);
+  return result;
+}
+
+static int
+read_binary_header(const uint8_t *bin, size_t *bin_size, uint16_t *crc, uint8_t *flags)
+{
+  const struct rite_binary_header *header = (const struct rite_binary_header *)bin;
+
+  if (memcmp(header->binary_ident, RITE_BINARY_IDENT, sizeof(header->binary_ident)) == 0) {
+    if (bigendian_p())
+      *flags |= FLAG_BYTEORDER_NATIVE;
+    else 
+      *flags |= FLAG_BYTEORDER_BIG;
+  }
+  else if (memcmp(header->binary_ident, RITE_BINARY_IDENT_LIL, sizeof(header->binary_ident)) == 0) {
+    if (bigendian_p())
+      *flags |= FLAG_BYTEORDER_LIL;
+    else
+      *flags |= FLAG_BYTEORDER_NATIVE;
+  }
+  else {
+    return MRB_DUMP_INVALID_FILE_HEADER;
+  }
+
+  if (crc) {
+    *crc = bin_to_uint16(header->binary_crc);
+  }
+  *bin_size = (size_t)bin_to_uint32(header->binary_size);
+
+  return MRB_DUMP_OK;
+}
+
+MRB_API mrb_irep*
+read_irep(mrb_state *mrb, const uint8_t *bin, uint8_t flags)
+{
+  int result;
+  mrb_irep *irep = NULL;
+  const struct rite_section_header *section_header;
+  uint16_t crc;
+  size_t bin_size = 0;
+  size_t n;
+
+  if ((mrb == NULL) || (bin == NULL)) {
+    return NULL;
+  }
+
+  result = read_binary_header(bin, &bin_size, &crc, &flags);
+  if (result != MRB_DUMP_OK) {
+    return NULL;
+  }
+
+  n = offset_crc_body();
+  if (crc != calc_crc_16_ccitt(bin + n, bin_size - n, 0)) {
+    return NULL;
+  }
+
+  bin += sizeof(struct rite_binary_header);
+  do {
+    section_header = (const struct rite_section_header *)bin;
+    if (memcmp(section_header->section_ident, RITE_SECTION_IREP_IDENT, sizeof(section_header->section_ident)) == 0) {
+      irep = read_section_irep(mrb, bin, flags);
+      if (!irep) return NULL;
+    }
+    else if (memcmp(section_header->section_ident, RITE_SECTION_LINENO_IDENT, sizeof(section_header->section_ident)) == 0) {
+      if (!irep) return NULL;   /* corrupted data */
+      result = read_section_lineno(mrb, bin, irep);
+      if (result < MRB_DUMP_OK) {
+        return NULL;
+      }
+    }
+    else if (memcmp(section_header->section_ident, RITE_SECTION_DEBUG_IDENT, sizeof(section_header->section_ident)) == 0) {
+      if (!irep) return NULL;   /* corrupted data */
+      result = read_section_debug(mrb, bin, irep, flags);
+      if (result < MRB_DUMP_OK) {
+        return NULL;
+      }
+    }
+    else if (memcmp(section_header->section_ident, RITE_SECTION_LV_IDENT, sizeof(section_header->section_ident)) == 0) {
+      if (!irep) return NULL;
+      result = read_section_lv(mrb, bin, irep, flags);
+      if (result < MRB_DUMP_OK) {
+        return NULL;
+      }
+    }
+    bin += bin_to_uint32(section_header->section_size);
+  } while (memcmp(section_header->section_ident, RITE_BINARY_EOF, sizeof(section_header->section_ident)) != 0);
+
+  return irep;
+}
+
+MRB_API mrb_irep*
+mrb_read_irep(mrb_state *mrb, const uint8_t *bin)
+{
+#ifdef MRB_USE_ETEXT_EDATA
+  uint8_t flags = mrb_ro_data_p((char*)bin) ? FLAG_SRC_STATIC : FLAG_SRC_MALLOC;
+#else
+  uint8_t flags = FLAG_SRC_STATIC;
+#endif
+
+  return read_irep(mrb, bin, flags);
+}
+
+static void
+irep_error(mrb_state *mrb)
+{
+  mrb->exc = mrb_obj_ptr(mrb_exc_new_str_lit(mrb, E_SCRIPT_ERROR, "irep load error"));
+}
+
+MRB_API mrb_value
+mrb_load_irep_cxt(mrb_state *mrb, const uint8_t *bin, mrbc_context *c)
+{
+  mrb_irep *irep = mrb_read_irep(mrb, bin);
+  struct RProc *proc;
+
+  if (!irep) {
+    irep_error(mrb);
+    return mrb_nil_value();
+  }
+  proc = mrb_proc_new(mrb, irep);
+  mrb_irep_decref(mrb, irep);
+  if (c && c->no_exec) return mrb_obj_value(proc);
+  return mrb_toplevel_run(mrb, proc);
+}
+
+MRB_API mrb_value
+mrb_load_irep(mrb_state *mrb, const uint8_t *bin)
+{
+  return mrb_load_irep_cxt(mrb, bin, NULL);
+}
+
+#ifndef MRB_DISABLE_STDIO
+
+MRB_API mrb_irep*
+mrb_read_irep_file(mrb_state *mrb, FILE* fp)
+{
+  mrb_irep *irep = NULL;
+  uint8_t *buf;
+  const size_t header_size = sizeof(struct rite_binary_header);
+  size_t buf_size = 0;
+  uint8_t flags = 0;
+  int result;
+
+  if ((mrb == NULL) || (fp == NULL)) {
+    return NULL;
+  }
+
+  buf = (uint8_t*)mrb_malloc(mrb, header_size);
+  if (fread(buf, header_size, 1, fp) == 0) {
+    goto irep_exit;
+  }
+  result = read_binary_header(buf, &buf_size, NULL, &flags);
+  if (result != MRB_DUMP_OK || buf_size <= header_size) {
+    goto irep_exit;
+  }
+
+  buf = (uint8_t*)mrb_realloc(mrb, buf, buf_size);
+  if (fread(buf+header_size, buf_size-header_size, 1, fp) == 0) {
+    goto irep_exit;
+  }
+  irep = read_irep(mrb, buf, FLAG_SRC_MALLOC);
+
+irep_exit:
+  mrb_free(mrb, buf);
+  return irep;
+}
+
+void mrb_codedump_all(mrb_state*, struct RProc*);
+
+MRB_API mrb_value
+mrb_load_irep_file_cxt(mrb_state *mrb, FILE* fp, mrbc_context *c)
+{
+  mrb_irep *irep = mrb_read_irep_file(mrb, fp);
+  mrb_value val;
+  struct RProc *proc;
+
+  if (!irep) {
+    irep_error(mrb);
+    return mrb_nil_value();
+  }
+  proc = mrb_proc_new(mrb, irep);
+  mrb_irep_decref(mrb, irep);
+  if (c && c->dump_result) mrb_codedump_all(mrb, proc);
+  if (c && c->no_exec) return mrb_obj_value(proc);
+  val = mrb_toplevel_run(mrb, proc);
+  return val;
+}
+
+MRB_API mrb_value
+mrb_load_irep_file(mrb_state *mrb, FILE* fp)
+{
+  return mrb_load_irep_file_cxt(mrb, fp, NULL);
+}
+#endif /* MRB_DISABLE_STDIO */
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/mruby_core.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/mruby_core.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/mruby_core.rake	(revision 270)
@@ -0,0 +1,19 @@
+MRuby.each_target do
+  current_dir = File.dirname(__FILE__).relative_path_from(Dir.pwd)
+  relative_from_root = File.dirname(__FILE__).relative_path_from(MRUBY_ROOT)
+  current_build_dir = "#{build_dir}/#{relative_from_root}"
+
+  objs = Dir.glob("#{current_dir}/*.c").map { |f|
+    next nil if cxx_abi_enabled? and f =~ /(error|vm).c$/
+    objfile(f.pathmap("#{current_build_dir}/%n"))
+  }.compact
+
+  if cxx_abi_enabled?
+    objs += %w(vm error).map { |v| compile_as_cxx "#{current_dir}/#{v}.c", "#{current_build_dir}/#{v}.cxx" }
+  end
+  self.libmruby << objs
+
+  file libfile("#{build_dir}/lib/libmruby_core") => objs do |t|
+    archiver.run t.name, t.prerequisites
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/numeric.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/numeric.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/numeric.c	(revision 270)
@@ -0,0 +1,1213 @@
+/*
+** numeric.c - Numeric, Integer, Float, Fixnum class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include <float.h>
+#include <limits.h>
+#include <math.h>
+#include <stdlib.h>
+
+#include "mruby.h"
+#include "mruby/array.h"
+#include "mruby/numeric.h"
+#include "mruby/string.h"
+
+#ifdef MRB_USE_FLOAT
+#define floor(f) floorf(f)
+#define ceil(f) ceilf(f)
+#define fmod(x,y) fmodf(x,y)
+#define MRB_FLO_TO_STR_FMT "%.7g"
+#else
+#define MRB_FLO_TO_STR_FMT "%.14g"
+#endif
+
+MRB_API mrb_float
+mrb_to_flo(mrb_state *mrb, mrb_value val)
+{
+  switch (mrb_type(val)) {
+  case MRB_TT_FIXNUM:
+    return (mrb_float)mrb_fixnum(val);
+  case MRB_TT_FLOAT:
+    break;
+  default:
+    mrb_raise(mrb, E_TYPE_ERROR, "non float value");
+  }
+  return mrb_float(val);
+}
+
+/*
+ * call-seq:
+ *
+ *  num ** other  ->  num
+ *
+ * Raises <code>num</code> the <code>other</code> power.
+ *
+ *    2.0**3      #=> 8.0
+ */
+static mrb_value
+num_pow(mrb_state *mrb, mrb_value x)
+{
+  mrb_value y;
+  mrb_float d, yv;
+
+  mrb_get_args(mrb, "o", &y);
+  yv = mrb_to_flo(mrb, y);
+  d = pow(mrb_to_flo(mrb, x), yv);
+  if (mrb_fixnum_p(x) && mrb_fixnum_p(y) && FIXABLE(d) && yv > 0 && 
+      (d < 0 || (d > 0 && (mrb_int)d > 0)))
+    return mrb_fixnum_value((mrb_int)d);
+  return mrb_float_value(mrb, d);
+}
+
+/* 15.2.8.3.4  */
+/* 15.2.9.3.4  */
+/*
+ * call-seq:
+ *   num / other  ->  num
+ *
+ * Performs division: the class of the resulting object depends on
+ * the class of <code>num</code> and on the magnitude of the
+ * result.
+ */
+
+mrb_value
+mrb_num_div(mrb_state *mrb, mrb_value x, mrb_value y)
+{
+  return mrb_float_value(mrb, mrb_to_flo(mrb, x) / mrb_to_flo(mrb, y));
+}
+
+/* 15.2.9.3.19(x) */
+/*
+ *  call-seq:
+ *     num.quo(numeric)  ->  real
+ *
+ *  Returns most exact division.
+ */
+
+static mrb_value
+num_div(mrb_state *mrb, mrb_value x)
+{
+  mrb_float y;
+
+  mrb_get_args(mrb, "f", &y);
+  return mrb_float_value(mrb, mrb_to_flo(mrb, x) / y);
+}
+
+/********************************************************************
+ *
+ * Document-class: Float
+ *
+ *  <code>Float</code> objects represent inexact real numbers using
+ *  the native architecture's double-precision floating point
+ *  representation.
+ */
+
+/* 15.2.9.3.16(x) */
+/*
+ *  call-seq:
+ *     flt.to_s  ->  string
+ *
+ *  Returns a string containing a representation of self. As well as a
+ *  fixed or exponential form of the number, the call may return
+ *  "<code>NaN</code>", "<code>Infinity</code>", and
+ *  "<code>-Infinity</code>".
+ */
+
+static mrb_value
+flo_to_s(mrb_state *mrb, mrb_value flt)
+{
+  if (isnan(mrb_float(flt))) {
+    return mrb_str_new_lit(mrb, "NaN");
+  }
+  return mrb_float_to_str(mrb, flt, MRB_FLO_TO_STR_FMT);
+}
+
+/* 15.2.9.3.2  */
+/*
+ * call-seq:
+ *   float - other  ->  float
+ *
+ * Returns a new float which is the difference of <code>float</code>
+ * and <code>other</code>.
+ */
+
+static mrb_value
+flo_minus(mrb_state *mrb, mrb_value x)
+{
+  mrb_value y;
+
+  mrb_get_args(mrb, "o", &y);
+  return mrb_float_value(mrb, mrb_float(x) - mrb_to_flo(mrb, y));
+}
+
+/* 15.2.9.3.3  */
+/*
+ * call-seq:
+ *   float * other  ->  float
+ *
+ * Returns a new float which is the product of <code>float</code>
+ * and <code>other</code>.
+ */
+
+static mrb_value
+flo_mul(mrb_state *mrb, mrb_value x)
+{
+  mrb_value y;
+
+  mrb_get_args(mrb, "o", &y);
+  return mrb_float_value(mrb, mrb_float(x) * mrb_to_flo(mrb, y));
+}
+
+static void
+flodivmod(mrb_state *mrb, mrb_float x, mrb_float y, mrb_float *divp, mrb_float *modp)
+{
+  mrb_float div;
+  mrb_float mod;
+
+  if (y == 0.0) {
+    div = INFINITY;
+    mod = NAN;
+  }
+  else {
+    mod = fmod(x, y);
+    if (isinf(x) && isfinite(y))
+      div = x;
+    else
+      div = (x - mod) / y;
+    if (y*mod < 0) {
+      mod += y;
+      div -= 1.0;
+    }
+  }
+
+  if (modp) *modp = mod;
+  if (divp) *divp = div;
+}
+
+/* 15.2.9.3.5  */
+/*
+ *  call-seq:
+ *     flt % other        ->  float
+ *     flt.modulo(other)  ->  float
+ *
+ *  Return the modulo after division of <code>flt</code> by <code>other</code>.
+ *
+ *     6543.21.modulo(137)      #=> 104.21
+ *     6543.21.modulo(137.24)   #=> 92.9299999999996
+ */
+
+static mrb_value
+flo_mod(mrb_state *mrb, mrb_value x)
+{
+  mrb_value y;
+  mrb_float mod;
+
+  mrb_get_args(mrb, "o", &y);
+
+  flodivmod(mrb, mrb_float(x), mrb_to_flo(mrb, y), 0, &mod);
+  return mrb_float_value(mrb, mod);
+}
+
+/* 15.2.8.3.16 */
+/*
+ *  call-seq:
+ *     num.eql?(numeric)  ->  true or false
+ *
+ *  Returns <code>true</code> if <i>num</i> and <i>numeric</i> are the
+ *  same type and have equal values.
+ *
+ *     1 == 1.0          #=> true
+ *     1.eql?(1.0)       #=> false
+ *     (1.0).eql?(1.0)   #=> true
+ */
+static mrb_value
+fix_eql(mrb_state *mrb, mrb_value x)
+{
+  mrb_value y;
+
+  mrb_get_args(mrb, "o", &y);
+  if (!mrb_fixnum_p(y)) return mrb_false_value();
+  return mrb_bool_value(mrb_fixnum(x) == mrb_fixnum(y));
+}
+
+static mrb_value
+flo_eql(mrb_state *mrb, mrb_value x)
+{
+  mrb_value y;
+
+  mrb_get_args(mrb, "o", &y);
+  if (!mrb_float_p(y)) return mrb_false_value();
+  return mrb_bool_value(mrb_float(x) == (mrb_float)mrb_fixnum(y));
+}
+
+/* 15.2.9.3.7  */
+/*
+ *  call-seq:
+ *     flt == obj  ->  true or false
+ *
+ *  Returns <code>true</code> only if <i>obj</i> has the same value
+ *  as <i>flt</i>. Contrast this with <code>Float#eql?</code>, which
+ *  requires <i>obj</i> to be a <code>Float</code>.
+ *
+ *     1.0 == 1   #=> true
+ *
+ */
+
+static mrb_value
+flo_eq(mrb_state *mrb, mrb_value x)
+{
+  mrb_value y;
+  mrb_get_args(mrb, "o", &y);
+
+  switch (mrb_type(y)) {
+  case MRB_TT_FIXNUM:
+    return mrb_bool_value(mrb_float(x) == (mrb_float)mrb_fixnum(y));
+  case MRB_TT_FLOAT:
+    return mrb_bool_value(mrb_float(x) == mrb_float(y));
+  default:
+    return mrb_false_value();
+  }
+}
+
+/* 15.2.8.3.18 */
+/*
+ * call-seq:
+ *   flt.hash  ->  integer
+ *
+ * Returns a hash code for this float.
+ */
+static mrb_value
+flo_hash(mrb_state *mrb, mrb_value num)
+{
+  mrb_float d;
+  char *c;
+  size_t i;
+  int hash;
+
+  d = (mrb_float)mrb_fixnum(num);
+  /* normalize -0.0 to 0.0 */
+  if (d == 0) d = 0.0;
+  c = (char*)&d;
+  for (hash=0, i=0; i<sizeof(mrb_float);i++) {
+    hash = (hash * 971) ^ (unsigned char)c[i];
+  }
+  if (hash < 0) hash = -hash;
+  return mrb_fixnum_value(hash);
+}
+
+/* 15.2.9.3.13 */
+/*
+ * call-seq:
+ *   flt.to_f  ->  self
+ *
+ * As <code>flt</code> is already a float, returns +self+.
+ */
+
+static mrb_value
+flo_to_f(mrb_state *mrb, mrb_value num)
+{
+  return num;
+}
+
+/* 15.2.9.3.11 */
+/*
+ *  call-seq:
+ *     flt.infinite?  ->  nil, -1, +1
+ *
+ *  Returns <code>nil</code>, -1, or +1 depending on whether <i>flt</i>
+ *  is finite, -infinity, or +infinity.
+ *
+ *     (0.0).infinite?        #=> nil
+ *     (-1.0/0.0).infinite?   #=> -1
+ *     (+1.0/0.0).infinite?   #=> 1
+ */
+
+static mrb_value
+flo_infinite_p(mrb_state *mrb, mrb_value num)
+{
+  mrb_float value = mrb_float(num);
+
+  if (isinf(value)) {
+    return mrb_fixnum_value(value < 0 ? -1 : 1);
+  }
+  return mrb_nil_value();
+}
+
+/* 15.2.9.3.9  */
+/*
+ *  call-seq:
+ *     flt.finite?  ->  true or false
+ *
+ *  Returns <code>true</code> if <i>flt</i> is a valid IEEE floating
+ *  point number (it is not infinite, and <code>nan?</code> is
+ *  <code>false</code>).
+ *
+ */
+
+static mrb_value
+flo_finite_p(mrb_state *mrb, mrb_value num)
+{
+  return mrb_bool_value(isfinite(mrb_float(num)));
+}
+
+/* 15.2.9.3.10 */
+/*
+ *  call-seq:
+ *     flt.floor  ->  integer
+ *
+ *  Returns the largest integer less than or equal to <i>flt</i>.
+ *
+ *     1.2.floor      #=> 1
+ *     2.0.floor      #=> 2
+ *     (-1.2).floor   #=> -2
+ *     (-2.0).floor   #=> -2
+ */
+
+static mrb_value
+flo_floor(mrb_state *mrb, mrb_value num)
+{
+  mrb_float f = floor(mrb_float(num));
+
+  if (!FIXABLE(f)) {
+    return mrb_float_value(mrb, f);
+  }
+  return mrb_fixnum_value((mrb_int)f);
+}
+
+/* 15.2.9.3.8  */
+/*
+ *  call-seq:
+ *     flt.ceil  ->  integer
+ *
+ *  Returns the smallest <code>Integer</code> greater than or equal to
+ *  <i>flt</i>.
+ *
+ *     1.2.ceil      #=> 2
+ *     2.0.ceil      #=> 2
+ *     (-1.2).ceil   #=> -1
+ *     (-2.0).ceil   #=> -2
+ */
+
+static mrb_value
+flo_ceil(mrb_state *mrb, mrb_value num)
+{
+  mrb_float f = ceil(mrb_float(num));
+
+  if (!FIXABLE(f)) {
+    return mrb_float_value(mrb, f);
+  }
+  return mrb_fixnum_value((mrb_int)f);
+}
+
+/* 15.2.9.3.12 */
+/*
+ *  call-seq:
+ *     flt.round([ndigits])  ->  integer or float
+ *
+ *  Rounds <i>flt</i> to a given precision in decimal digits (default 0 digits).
+ *  Precision may be negative.  Returns a floating point number when ndigits
+ *  is more than zero.
+ *
+ *     1.4.round      #=> 1
+ *     1.5.round      #=> 2
+ *     1.6.round      #=> 2
+ *     (-1.5).round   #=> -2
+ *
+ *     1.234567.round(2)  #=> 1.23
+ *     1.234567.round(3)  #=> 1.235
+ *     1.234567.round(4)  #=> 1.2346
+ *     1.234567.round(5)  #=> 1.23457
+ *
+ *     34567.89.round(-5) #=> 0
+ *     34567.89.round(-4) #=> 30000
+ *     34567.89.round(-3) #=> 35000
+ *     34567.89.round(-2) #=> 34600
+ *     34567.89.round(-1) #=> 34570
+ *     34567.89.round(0)  #=> 34568
+ *     34567.89.round(1)  #=> 34567.9
+ *     34567.89.round(2)  #=> 34567.89
+ *     34567.89.round(3)  #=> 34567.89
+ *
+ */
+
+static mrb_value
+flo_round(mrb_state *mrb, mrb_value num)
+{
+  double number, f;
+  mrb_int ndigits = 0;
+  mrb_int i;
+
+  mrb_get_args(mrb, "|i", &ndigits);
+  number = mrb_float(num);
+
+  if (isinf(number)) {
+    if (0 < ndigits) return num;
+    else mrb_raise(mrb, E_FLOATDOMAIN_ERROR, number < 0 ? "-Infinity" : "Infinity");
+  }
+  if (isnan(number)) {
+    if (0 < ndigits) return num;
+    else mrb_raise(mrb, E_FLOATDOMAIN_ERROR, "NaN");
+  }
+
+  f = 1.0;
+  i = ndigits >= 0 ? ndigits : -ndigits;
+  while  (--i >= 0)
+    f = f*10.0;
+
+  if (isinf(f)) {
+    if (ndigits < 0) number = 0;
+  }
+  else {
+    double d;
+
+    if (ndigits < 0) number /= f;
+    else number *= f;
+
+    /* home-made inline implementation of round(3) */
+    if (number > 0.0) {
+      d = floor(number);
+      number = d + (number - d >= 0.5);
+    }
+    else if (number < 0.0) {
+      d = ceil(number);
+      number = d - (d - number >= 0.5);
+    }
+
+    if (ndigits < 0) number *= f;
+    else number /= f;
+  }
+
+  if (ndigits > 0) {
+    if (!isfinite(number)) return num;
+    return mrb_float_value(mrb, number);
+  }
+  return mrb_fixnum_value((mrb_int)number);
+}
+
+/* 15.2.9.3.14 */
+/* 15.2.9.3.15 */
+/*
+ *  call-seq:
+ *     flt.to_i      ->  integer
+ *     flt.to_int    ->  integer
+ *     flt.truncate  ->  integer
+ *
+ *  Returns <i>flt</i> truncated to an <code>Integer</code>.
+ */
+
+static mrb_value
+flo_truncate(mrb_state *mrb, mrb_value num)
+{
+  mrb_float f = mrb_float(num);
+
+  if (f > 0.0) f = floor(f);
+  if (f < 0.0) f = ceil(f);
+
+  if (!FIXABLE(f)) {
+    return mrb_float_value(mrb, f);
+  }
+  return mrb_fixnum_value((mrb_int)f);
+}
+
+static mrb_value
+flo_nan_p(mrb_state *mrb, mrb_value num)
+{
+  return mrb_bool_value(isnan(mrb_float(num)));
+}
+
+/*
+ * Document-class: Integer
+ *
+ *  <code>Integer</code> is the basis for the two concrete classes that
+ *  hold whole numbers, <code>Bignum</code> and <code>Fixnum</code>.
+ *
+ */
+
+
+/*
+ *  call-seq:
+ *     int.to_i      ->  integer
+ *     int.to_int    ->  integer
+ *
+ *  As <i>int</i> is already an <code>Integer</code>, all these
+ *  methods simply return the receiver.
+ */
+
+static mrb_value
+int_to_i(mrb_state *mrb, mrb_value num)
+{
+  return num;
+}
+
+/*tests if N*N would overflow*/
+#define SQRT_INT_MAX ((mrb_int)1<<((MRB_INT_BIT-1-MRB_FIXNUM_SHIFT)/2))
+#define FIT_SQRT_INT(n) (((n)<SQRT_INT_MAX)&&((n)>=-SQRT_INT_MAX))
+
+mrb_value
+mrb_fixnum_mul(mrb_state *mrb, mrb_value x, mrb_value y)
+{
+  mrb_int a;
+
+  a = mrb_fixnum(x);
+  if (mrb_fixnum_p(y)) {
+    mrb_float c;
+    mrb_int b;
+
+    if (a == 0) return x;
+    b = mrb_fixnum(y);
+    if (FIT_SQRT_INT(a) && FIT_SQRT_INT(b))
+      return mrb_fixnum_value(a*b);
+    c = a * b;
+    if ((a != 0 && c/a != b) || !FIXABLE(c)) {
+      return mrb_float_value(mrb, (mrb_float)a*(mrb_float)b);
+    }
+    return mrb_fixnum_value((mrb_int)c);
+  }
+  return mrb_float_value(mrb, (mrb_float)a * mrb_to_flo(mrb, y));
+}
+
+/* 15.2.8.3.3  */
+/*
+ * call-seq:
+ *   fix * numeric  ->  numeric_result
+ *
+ * Performs multiplication: the class of the resulting object depends on
+ * the class of <code>numeric</code> and on the magnitude of the
+ * result.
+ */
+
+static mrb_value
+fix_mul(mrb_state *mrb, mrb_value x)
+{
+  mrb_value y;
+
+  mrb_get_args(mrb, "o", &y);
+  return mrb_fixnum_mul(mrb, x, y);
+}
+
+static void
+fixdivmod(mrb_state *mrb, mrb_int x, mrb_int y, mrb_int *divp, mrb_int *modp)
+{
+  mrb_int div, mod;
+
+  /* TODO: add mrb_assert(y != 0) to make sure */
+
+  if (y < 0) {
+    if (x < 0)
+      div = -x / -y;
+    else
+      div = - (x / -y);
+  }
+  else {
+    if (x < 0)
+      div = - (-x / y);
+    else
+      div = x / y;
+  }
+  mod = x - div*y;
+  if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) {
+    mod += y;
+    div -= 1;
+  }
+  if (divp) *divp = div;
+  if (modp) *modp = mod;
+}
+
+/* 15.2.8.3.5  */
+/*
+ *  call-seq:
+ *    fix % other        ->  real
+ *    fix.modulo(other)  ->  real
+ *
+ *  Returns <code>fix</code> modulo <code>other</code>.
+ *  See <code>numeric.divmod</code> for more information.
+ */
+
+static mrb_value
+fix_mod(mrb_state *mrb, mrb_value x)
+{
+  mrb_value y;
+  mrb_int a;
+
+  mrb_get_args(mrb, "o", &y);
+  a = mrb_fixnum(x);
+  if (mrb_fixnum_p(y)) {
+    mrb_int b, mod;
+
+    if ((b=mrb_fixnum(y)) == 0) {
+      return mrb_float_value(mrb, NAN);
+    }
+    fixdivmod(mrb, a, b, 0, &mod);
+    return mrb_fixnum_value(mod);
+  }
+  else {
+    mrb_float mod;
+
+    flodivmod(mrb, (mrb_float)a, mrb_to_flo(mrb, y), 0, &mod);
+    return mrb_float_value(mrb, mod);
+  }
+}
+
+/*
+ *  call-seq:
+ *     fix.divmod(numeric)  ->  array
+ *
+ *  See <code>Numeric#divmod</code>.
+ */
+static mrb_value
+fix_divmod(mrb_state *mrb, mrb_value x)
+{
+  mrb_value y;
+
+  mrb_get_args(mrb, "o", &y);
+
+  if (mrb_fixnum_p(y)) {
+    mrb_int div, mod;
+
+    if (mrb_fixnum(y) == 0) {
+      return mrb_assoc_new(mrb, mrb_float_value(mrb, INFINITY),
+        mrb_float_value(mrb, NAN));
+    }
+    fixdivmod(mrb, mrb_fixnum(x), mrb_fixnum(y), &div, &mod);
+    return mrb_assoc_new(mrb, mrb_fixnum_value(div), mrb_fixnum_value(mod));
+  }
+  else {
+    mrb_float div, mod;
+    mrb_value a, b;
+
+    flodivmod(mrb, (mrb_float)mrb_fixnum(x), mrb_to_flo(mrb, y), &div, &mod);
+    a = mrb_float_value(mrb, (mrb_int)div);
+    b = mrb_float_value(mrb, mod);
+    return mrb_assoc_new(mrb, a, b);
+  }
+}
+
+static mrb_value
+flo_divmod(mrb_state *mrb, mrb_value x)
+{
+  mrb_value y;
+  mrb_float div, mod;
+  mrb_value a, b;
+
+  mrb_get_args(mrb, "o", &y);
+
+  flodivmod(mrb, mrb_float(x), mrb_to_flo(mrb, y), &div, &mod);
+  a = mrb_float_value(mrb, (mrb_int)div);
+  b = mrb_float_value(mrb, mod);
+  return mrb_assoc_new(mrb, a, b);
+}
+
+/* 15.2.8.3.7  */
+/*
+ * call-seq:
+ *   fix == other  ->  true or false
+ *
+ * Return <code>true</code> if <code>fix</code> equals <code>other</code>
+ * numerically.
+ *
+ *   1 == 2      #=> false
+ *   1 == 1.0    #=> true
+ */
+
+static mrb_value
+fix_equal(mrb_state *mrb, mrb_value x)
+{
+  mrb_value y;
+
+  mrb_get_args(mrb, "o", &y);
+  switch (mrb_type(y)) {
+  case MRB_TT_FIXNUM:
+    return mrb_bool_value(mrb_fixnum(x) == mrb_fixnum(y));
+  case MRB_TT_FLOAT:
+    return mrb_bool_value((mrb_float)mrb_fixnum(x) == mrb_float(y));
+  default:
+    return mrb_false_value();
+  }
+}
+
+/* 15.2.8.3.8  */
+/*
+ * call-seq:
+ *   ~fix  ->  integer
+ *
+ * One's complement: returns a number where each bit is flipped.
+ *   ex.0---00001 (1)-> 1---11110 (-2)
+ *   ex.0---00010 (2)-> 1---11101 (-3)
+ *   ex.0---00100 (4)-> 1---11011 (-5)
+ */
+
+static mrb_value
+fix_rev(mrb_state *mrb, mrb_value num)
+{
+  mrb_int val = mrb_fixnum(num);
+
+  return mrb_fixnum_value(~val);
+}
+
+static mrb_value
+bit_coerce(mrb_state *mrb, mrb_value x)
+{
+  while (!mrb_fixnum_p(x)) {
+    if (mrb_float_p(x)) {
+      mrb_raise(mrb, E_TYPE_ERROR, "can't convert Float into Integer");
+    }
+    x = mrb_to_int(mrb, x);
+  }
+  return x;
+}
+
+/* 15.2.8.3.9  */
+/*
+ * call-seq:
+ *   fix & integer  ->  integer_result
+ *
+ * Bitwise AND.
+ */
+
+static mrb_value
+fix_and(mrb_state *mrb, mrb_value x)
+{
+  mrb_value y;
+
+  mrb_get_args(mrb, "o", &y);
+
+  y = bit_coerce(mrb, y);
+  return mrb_fixnum_value(mrb_fixnum(x) & mrb_fixnum(y));
+}
+
+/* 15.2.8.3.10 */
+/*
+ * call-seq:
+ *   fix | integer  ->  integer_result
+ *
+ * Bitwise OR.
+ */
+
+static mrb_value
+fix_or(mrb_state *mrb, mrb_value x)
+{
+  mrb_value y;
+
+  mrb_get_args(mrb, "o", &y);
+
+  y = bit_coerce(mrb, y);
+  return mrb_fixnum_value(mrb_fixnum(x) | mrb_fixnum(y));
+}
+
+/* 15.2.8.3.11 */
+/*
+ * call-seq:
+ *   fix ^ integer  ->  integer_result
+ *
+ * Bitwise EXCLUSIVE OR.
+ */
+
+static mrb_value
+fix_xor(mrb_state *mrb, mrb_value x)
+{
+  mrb_value y;
+
+  mrb_get_args(mrb, "o", &y);
+
+  y = bit_coerce(mrb, y);
+  return mrb_fixnum_value(mrb_fixnum(x) ^ mrb_fixnum(y));
+}
+
+#define NUMERIC_SHIFT_WIDTH_MAX (MRB_INT_BIT-1)
+
+static mrb_value
+lshift(mrb_state *mrb, mrb_int val, mrb_int width)
+{
+  mrb_assert(width > 0);
+  if (width > NUMERIC_SHIFT_WIDTH_MAX) {
+    mrb_float f = (mrb_float)val;
+    while (width--) {
+      f *= 2;
+    }
+    return mrb_float_value(mrb, f);
+  }
+  return mrb_fixnum_value(val << width);
+}
+
+static mrb_value
+rshift(mrb_int val, mrb_int width)
+{
+  mrb_assert(width > 0);
+  if (width >= NUMERIC_SHIFT_WIDTH_MAX) {
+    if (val < 0) {
+      return mrb_fixnum_value(-1);
+    }
+    return mrb_fixnum_value(0);
+  }
+  return mrb_fixnum_value(val >> width);
+}
+
+static inline void
+fix_shift_get_width(mrb_state *mrb, mrb_int *width)
+{
+  mrb_value y;
+
+  mrb_get_args(mrb, "o", &y);
+  *width = mrb_fixnum(bit_coerce(mrb, y));
+}
+
+/* 15.2.8.3.12 */
+/*
+ * call-seq:
+ *   fix << count  ->  integer or float
+ *
+ * Shifts _fix_ left _count_ positions (right if _count_ is negative).
+ */
+
+static mrb_value
+fix_lshift(mrb_state *mrb, mrb_value x)
+{
+  mrb_int width, val;
+
+  fix_shift_get_width(mrb, &width);
+
+  if (width == 0) {
+    return x;
+  }
+  val = mrb_fixnum(x);
+  if (width < 0) {
+    return rshift(val, -width);
+  }
+  return lshift(mrb, val, width);
+}
+
+/* 15.2.8.3.13 */
+/*
+ * call-seq:
+ *   fix >> count  ->  integer or float
+ *
+ * Shifts _fix_ right _count_ positions (left if _count_ is negative).
+ */
+
+static mrb_value
+fix_rshift(mrb_state *mrb, mrb_value x)
+{
+  mrb_int width, val;
+
+  fix_shift_get_width(mrb, &width);
+
+  if (width == 0) {
+    return x;
+  }
+  val = mrb_fixnum(x);
+  if (width < 0) {
+    return lshift(mrb, val, -width);
+  }
+  return rshift(val, width);
+}
+
+/* 15.2.8.3.23 */
+/*
+ *  call-seq:
+ *     fix.to_f  ->  float
+ *
+ *  Converts <i>fix</i> to a <code>Float</code>.
+ *
+ */
+
+static mrb_value
+fix_to_f(mrb_state *mrb, mrb_value num)
+{
+  return mrb_float_value(mrb, (mrb_float)mrb_fixnum(num));
+}
+
+/*
+ *  Document-class: FloatDomainError
+ *
+ *  Raised when attempting to convert special float values
+ *  (in particular infinite or NaN)
+ *  to numerical classes which don't support them.
+ *
+ *     Float::INFINITY.to_r
+ *
+ *  <em>raises the exception:</em>
+ *
+ *     FloatDomainError: Infinity
+ */
+/* ------------------------------------------------------------------------*/
+MRB_API mrb_value
+mrb_flo_to_fixnum(mrb_state *mrb, mrb_value x)
+{
+  mrb_int z;
+
+  if (!mrb_float_p(x)) {
+    mrb_raise(mrb, E_TYPE_ERROR, "non float value");
+    z = 0; /* not reached. just suppress warnings. */
+  }
+  else {
+    mrb_float d = mrb_float(x);
+
+    if (isinf(d)) {
+      mrb_raise(mrb, E_FLOATDOMAIN_ERROR, d < 0 ? "-Infinity" : "Infinity");
+    }
+    if (isnan(d)) {
+      mrb_raise(mrb, E_FLOATDOMAIN_ERROR, "NaN");
+    }
+    z = (mrb_int)d;
+  }
+  return mrb_fixnum_value(z);
+}
+
+mrb_value
+mrb_fixnum_plus(mrb_state *mrb, mrb_value x, mrb_value y)
+{
+  mrb_int a;
+
+  a = mrb_fixnum(x);
+  if (mrb_fixnum_p(y)) {
+    mrb_int b, c;
+
+    if (a == 0) return y;
+    b = mrb_fixnum(y);
+    if (mrb_int_add_overflow(a, b, &c)) {
+      return mrb_float_value(mrb, (mrb_float)a + (mrb_float)b);
+    }
+    return mrb_fixnum_value(c);
+  }
+  return mrb_float_value(mrb, (mrb_float)a + mrb_to_flo(mrb, y));
+}
+
+/* 15.2.8.3.1  */
+/*
+ * call-seq:
+ *   fix + numeric  ->  numeric_result
+ *
+ * Performs addition: the class of the resulting object depends on
+ * the class of <code>numeric</code> and on the magnitude of the
+ * result.
+ */
+static mrb_value
+fix_plus(mrb_state *mrb, mrb_value self)
+{
+  mrb_value other;
+
+  mrb_get_args(mrb, "o", &other);
+  return mrb_fixnum_plus(mrb, self, other);
+}
+
+mrb_value
+mrb_fixnum_minus(mrb_state *mrb, mrb_value x, mrb_value y)
+{
+  mrb_int a;
+
+  a = mrb_fixnum(x);
+  if (mrb_fixnum_p(y)) {
+    mrb_int b, c;
+
+    b = mrb_fixnum(y);
+    if (mrb_int_sub_overflow(a, b, &c)) {
+      return mrb_float_value(mrb, (mrb_float)a - (mrb_float)b);
+    }
+    return mrb_fixnum_value(c);
+  }
+  return mrb_float_value(mrb, (mrb_float)a - mrb_to_flo(mrb, y));
+}
+
+/* 15.2.8.3.2  */
+/* 15.2.8.3.16 */
+/*
+ * call-seq:
+ *   fix - numeric  ->  numeric_result
+ *
+ * Performs subtraction: the class of the resulting object depends on
+ * the class of <code>numeric</code> and on the magnitude of the
+ * result.
+ */
+static mrb_value
+fix_minus(mrb_state *mrb, mrb_value self)
+{
+  mrb_value other;
+
+  mrb_get_args(mrb, "o", &other);
+  return mrb_fixnum_minus(mrb, self, other);
+}
+
+
+MRB_API mrb_value
+mrb_fixnum_to_str(mrb_state *mrb, mrb_value x, int base)
+{
+  char buf[MRB_INT_BIT+1];
+  char *b = buf + sizeof buf;
+  mrb_int val = mrb_fixnum(x);
+
+  if (base < 2 || 36 < base) {
+    mrb_raisef(mrb, E_ARGUMENT_ERROR, "invalid radix %S", mrb_fixnum_value(base));
+  }
+
+  if (val == 0) {
+    *--b = '0';
+  }
+  else if (val < 0) {
+    do {
+      *--b = mrb_digitmap[-(val % base)];
+    } while (val /= base);
+    *--b = '-';
+  }
+  else {
+    do {
+      *--b = mrb_digitmap[(int)(val % base)];
+    } while (val /= base);
+  }
+
+  return mrb_str_new(mrb, b, buf + sizeof(buf) - b);
+}
+
+/* 15.2.8.3.25 */
+/*
+ *  call-seq:
+ *     fix.to_s(base=10)  ->  string
+ *
+ *  Returns a string containing the representation of <i>fix</i> radix
+ *  <i>base</i> (between 2 and 36).
+ *
+ *     12345.to_s       #=> "12345"
+ *     12345.to_s(2)    #=> "11000000111001"
+ *     12345.to_s(8)    #=> "30071"
+ *     12345.to_s(10)   #=> "12345"
+ *     12345.to_s(16)   #=> "3039"
+ *     12345.to_s(36)   #=> "9ix"
+ *
+ */
+static mrb_value
+fix_to_s(mrb_state *mrb, mrb_value self)
+{
+  mrb_int base = 10;
+
+  mrb_get_args(mrb, "|i", &base);
+  return mrb_fixnum_to_str(mrb, self, base);
+}
+
+/* 15.2.9.3.6  */
+/*
+ * call-seq:
+ *     self.f <=> other.f    => -1, 0, +1
+ *             <  => -1
+ *             =  =>  0
+ *             >  => +1
+ *  Comparison---Returns -1, 0, or +1 depending on whether <i>fix</i> is
+ *  less than, equal to, or greater than <i>numeric</i>. This is the
+ *  basis for the tests in <code>Comparable</code>.
+ */
+static mrb_value
+num_cmp(mrb_state *mrb, mrb_value self)
+{
+  mrb_value other;
+  mrb_float x, y;
+
+  mrb_get_args(mrb, "o", &other);
+
+  x = mrb_to_flo(mrb, self);
+  switch (mrb_type(other)) {
+  case MRB_TT_FIXNUM:
+    y = (mrb_float)mrb_fixnum(other);
+    break;
+  case MRB_TT_FLOAT:
+    y = mrb_float(other);
+    break;
+  default:
+    return mrb_nil_value();
+  }
+  if (x > y)
+    return mrb_fixnum_value(1);
+  else {
+    if (x < y)
+      return mrb_fixnum_value(-1);
+    return mrb_fixnum_value(0);
+  }
+}
+
+/* 15.2.9.3.1  */
+/*
+ * call-seq:
+ *   float + other  ->  float
+ *
+ * Returns a new float which is the sum of <code>float</code>
+ * and <code>other</code>.
+ */
+static mrb_value
+flo_plus(mrb_state *mrb, mrb_value x)
+{
+  mrb_value y;
+
+  mrb_get_args(mrb, "o", &y);
+  return mrb_float_value(mrb, mrb_float(x) + mrb_to_flo(mrb, y));
+}
+
+/* ------------------------------------------------------------------------*/
+void
+mrb_init_numeric(mrb_state *mrb)
+{
+  struct RClass *numeric, *integer, *fixnum, *fl;
+
+  /* Numeric Class */
+  numeric = mrb_define_class(mrb, "Numeric",  mrb->object_class);                /* 15.2.7 */
+
+  mrb_define_method(mrb, numeric, "**",       num_pow,        MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, numeric, "/",        num_div,        MRB_ARGS_REQ(1));  /* 15.2.8.3.4  */
+  mrb_define_method(mrb, numeric, "quo",      num_div,        MRB_ARGS_REQ(1));  /* 15.2.7.4.5 (x) */
+  mrb_define_method(mrb, numeric, "<=>",      num_cmp,        MRB_ARGS_REQ(1));  /* 15.2.9.3.6  */
+
+  /* Integer Class */
+  integer = mrb_define_class(mrb, "Integer",  numeric);                          /* 15.2.8 */
+  mrb_undef_class_method(mrb, integer, "new");
+  mrb_define_method(mrb, integer, "to_i", int_to_i, MRB_ARGS_NONE());            /* 15.2.8.3.24 */
+  mrb_define_method(mrb, integer, "to_int", int_to_i, MRB_ARGS_NONE());
+
+  /* Fixnum Class */
+  mrb->fixnum_class = fixnum = mrb_define_class(mrb, "Fixnum", integer);
+  mrb_define_method(mrb, fixnum,  "+",        fix_plus,          MRB_ARGS_REQ(1)); /* 15.2.8.3.1  */
+  mrb_define_method(mrb, fixnum,  "-",        fix_minus,         MRB_ARGS_REQ(1)); /* 15.2.8.3.2  */
+  mrb_define_method(mrb, fixnum,  "*",        fix_mul,           MRB_ARGS_REQ(1)); /* 15.2.8.3.3  */
+  mrb_define_method(mrb, fixnum,  "%",        fix_mod,           MRB_ARGS_REQ(1)); /* 15.2.8.3.5  */
+  mrb_define_method(mrb, fixnum,  "==",       fix_equal,         MRB_ARGS_REQ(1)); /* 15.2.8.3.7  */
+  mrb_define_method(mrb, fixnum,  "~",        fix_rev,           MRB_ARGS_NONE()); /* 15.2.8.3.8  */
+  mrb_define_method(mrb, fixnum,  "&",        fix_and,           MRB_ARGS_REQ(1)); /* 15.2.8.3.9  */
+  mrb_define_method(mrb, fixnum,  "|",        fix_or,            MRB_ARGS_REQ(1)); /* 15.2.8.3.10 */
+  mrb_define_method(mrb, fixnum,  "^",        fix_xor,           MRB_ARGS_REQ(1)); /* 15.2.8.3.11 */
+  mrb_define_method(mrb, fixnum,  "<<",       fix_lshift,        MRB_ARGS_REQ(1)); /* 15.2.8.3.12 */
+  mrb_define_method(mrb, fixnum,  ">>",       fix_rshift,        MRB_ARGS_REQ(1)); /* 15.2.8.3.13 */
+  mrb_define_method(mrb, fixnum,  "eql?",     fix_eql,           MRB_ARGS_REQ(1)); /* 15.2.8.3.16 */
+  mrb_define_method(mrb, fixnum,  "hash",     flo_hash,          MRB_ARGS_NONE()); /* 15.2.8.3.18 */
+  mrb_define_method(mrb, fixnum,  "to_f",     fix_to_f,          MRB_ARGS_NONE()); /* 15.2.8.3.23 */
+  mrb_define_method(mrb, fixnum,  "to_s",     fix_to_s,          MRB_ARGS_NONE()); /* 15.2.8.3.25 */
+  mrb_define_method(mrb, fixnum,  "inspect",  fix_to_s,          MRB_ARGS_NONE());
+  mrb_define_method(mrb, fixnum,  "divmod",   fix_divmod,        MRB_ARGS_REQ(1)); /* 15.2.8.3.30 (x) */
+
+  /* Float Class */
+  mrb->float_class = fl = mrb_define_class(mrb, "Float", numeric);                 /* 15.2.9 */
+  mrb_undef_class_method(mrb,  fl, "new");
+  mrb_define_method(mrb, fl,      "+",         flo_plus,         MRB_ARGS_REQ(1)); /* 15.2.9.3.1  */
+  mrb_define_method(mrb, fl,      "-",         flo_minus,        MRB_ARGS_REQ(1)); /* 15.2.9.3.2  */
+  mrb_define_method(mrb, fl,      "*",         flo_mul,          MRB_ARGS_REQ(1)); /* 15.2.9.3.3  */
+  mrb_define_method(mrb, fl,      "%",         flo_mod,          MRB_ARGS_REQ(1)); /* 15.2.9.3.5  */
+  mrb_define_method(mrb, fl,      "==",        flo_eq,           MRB_ARGS_REQ(1)); /* 15.2.9.3.7  */
+  mrb_define_method(mrb, fl,      "ceil",      flo_ceil,         MRB_ARGS_NONE()); /* 15.2.9.3.8  */
+  mrb_define_method(mrb, fl,      "finite?",   flo_finite_p,     MRB_ARGS_NONE()); /* 15.2.9.3.9  */
+  mrb_define_method(mrb, fl,      "floor",     flo_floor,        MRB_ARGS_NONE()); /* 15.2.9.3.10 */
+  mrb_define_method(mrb, fl,      "infinite?", flo_infinite_p,   MRB_ARGS_NONE()); /* 15.2.9.3.11 */
+  mrb_define_method(mrb, fl,      "round",     flo_round,        MRB_ARGS_OPT(1)); /* 15.2.9.3.12 */
+  mrb_define_method(mrb, fl,      "to_f",      flo_to_f,         MRB_ARGS_NONE()); /* 15.2.9.3.13 */
+  mrb_define_method(mrb, fl,      "to_i",      flo_truncate,     MRB_ARGS_NONE()); /* 15.2.9.3.14 */
+  mrb_define_method(mrb, fl,      "to_int",    flo_truncate,     MRB_ARGS_NONE());
+  mrb_define_method(mrb, fl,      "truncate",  flo_truncate,     MRB_ARGS_NONE()); /* 15.2.9.3.15 */
+  mrb_define_method(mrb, fl,      "divmod",    flo_divmod,       MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, fl,      "eql?",      flo_eql,          MRB_ARGS_REQ(1)); /* 15.2.8.3.16 */
+
+  mrb_define_method(mrb, fl,      "to_s",      flo_to_s,         MRB_ARGS_NONE()); /* 15.2.9.3.16(x) */
+  mrb_define_method(mrb, fl,      "inspect",   flo_to_s,         MRB_ARGS_NONE());
+  mrb_define_method(mrb, fl,      "nan?",      flo_nan_p,        MRB_ARGS_NONE());
+
+#ifdef INFINITY
+  mrb_define_const(mrb, fl, "INFINITY", mrb_float_value(mrb, INFINITY));
+#endif
+#ifdef NAN
+  mrb_define_const(mrb, fl, "NAN", mrb_float_value(mrb, NAN));
+#endif
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/object.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/object.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/object.c	(revision 270)
@@ -0,0 +1,601 @@
+/*
+** object.c - Object, NilClass, TrueClass, FalseClass class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+#include "mruby/class.h"
+#include "mruby/numeric.h"
+#include "mruby/string.h"
+
+MRB_API mrb_bool
+mrb_obj_eq(mrb_state *mrb, mrb_value v1, mrb_value v2)
+{
+  if (mrb_type(v1) != mrb_type(v2)) return FALSE;
+  switch (mrb_type(v1)) {
+  case MRB_TT_TRUE:
+    return TRUE;
+
+  case MRB_TT_FALSE:
+  case MRB_TT_FIXNUM:
+    return (mrb_fixnum(v1) == mrb_fixnum(v2));
+  case MRB_TT_SYMBOL:
+    return (mrb_symbol(v1) == mrb_symbol(v2));
+
+  case MRB_TT_FLOAT:
+    return (mrb_float(v1) == mrb_float(v2));
+
+  default:
+    return (mrb_ptr(v1) == mrb_ptr(v2));
+  }
+}
+
+MRB_API mrb_bool
+mrb_obj_equal(mrb_state *mrb, mrb_value v1, mrb_value v2)
+{
+  /* temporary definition */
+  return mrb_obj_eq(mrb, v1, v2);
+}
+
+MRB_API mrb_bool
+mrb_equal(mrb_state *mrb, mrb_value obj1, mrb_value obj2)
+{
+  mrb_value result;
+
+  if (mrb_obj_eq(mrb, obj1, obj2)) return TRUE;
+  result = mrb_funcall(mrb, obj1, "==", 1, obj2);
+  if (mrb_test(result)) return TRUE;
+  return FALSE;
+}
+
+/*
+ * Document-class: NilClass
+ *
+ *  The class of the singleton object <code>nil</code>.
+ */
+
+/* 15.2.4.3.4  */
+/*
+ * call_seq:
+ *   nil.nil?               -> true
+ *
+ * Only the object <i>nil</i> responds <code>true</code> to <code>nil?</code>.
+ */
+
+static mrb_value
+mrb_true(mrb_state *mrb, mrb_value obj)
+{
+  return mrb_true_value();
+}
+
+/* 15.2.4.3.5  */
+/*
+ *  call-seq:
+ *     nil.to_s    -> ""
+ *
+ *  Always returns the empty string.
+ */
+
+static mrb_value
+nil_to_s(mrb_state *mrb, mrb_value obj)
+{
+  return mrb_str_new(mrb, 0, 0);
+}
+
+static mrb_value
+nil_inspect(mrb_state *mrb, mrb_value obj)
+{
+  return mrb_str_new_lit(mrb, "nil");
+}
+
+/***********************************************************************
+ *  Document-class: TrueClass
+ *
+ *  The global value <code>true</code> is the only instance of class
+ *  <code>TrueClass</code> and represents a logically true value in
+ *  boolean expressions. The class provides operators allowing
+ *  <code>true</code> to be used in logical expressions.
+ */
+
+/* 15.2.5.3.1  */
+/*
+ *  call-seq:
+ *     true & obj    -> true or false
+ *
+ *  And---Returns <code>false</code> if <i>obj</i> is
+ *  <code>nil</code> or <code>false</code>, <code>true</code> otherwise.
+ */
+
+static mrb_value
+true_and(mrb_state *mrb, mrb_value obj)
+{
+  mrb_bool obj2;
+
+  mrb_get_args(mrb, "b", &obj2);
+
+  return mrb_bool_value(obj2);
+}
+
+/* 15.2.5.3.2  */
+/*
+ *  call-seq:
+ *     true ^ obj   -> !obj
+ *
+ *  Exclusive Or---Returns <code>true</code> if <i>obj</i> is
+ *  <code>nil</code> or <code>false</code>, <code>false</code>
+ *  otherwise.
+ */
+
+static mrb_value
+true_xor(mrb_state *mrb, mrb_value obj)
+{
+  mrb_bool obj2;
+
+  mrb_get_args(mrb, "b", &obj2);
+  return mrb_bool_value(!obj2);
+}
+
+/* 15.2.5.3.3  */
+/*
+ * call-seq:
+ *   true.to_s   ->  "true"
+ *
+ * The string representation of <code>true</code> is "true".
+ */
+
+static mrb_value
+true_to_s(mrb_state *mrb, mrb_value obj)
+{
+  return mrb_str_new_lit(mrb, "true");
+}
+
+/* 15.2.5.3.4  */
+/*
+ *  call-seq:
+ *     true | obj   -> true
+ *
+ *  Or---Returns <code>true</code>. As <i>anObject</i> is an argument to
+ *  a method call, it is always evaluated; there is no short-circuit
+ *  evaluation in this case.
+ *
+ *     true |  puts("or")
+ *     true || puts("logical or")
+ *
+ *  <em>produces:</em>
+ *
+ *     or
+ */
+
+static mrb_value
+true_or(mrb_state *mrb, mrb_value obj)
+{
+  return mrb_true_value();
+}
+
+/*
+ *  Document-class: FalseClass
+ *
+ *  The global value <code>false</code> is the only instance of class
+ *  <code>FalseClass</code> and represents a logically false value in
+ *  boolean expressions. The class provides operators allowing
+ *  <code>false</code> to participate correctly in logical expressions.
+ *
+ */
+
+/* 15.2.4.3.1  */
+/* 15.2.6.3.1  */
+/*
+ *  call-seq:
+ *     false & obj   -> false
+ *     nil & obj     -> false
+ *
+ *  And---Returns <code>false</code>. <i>obj</i> is always
+ *  evaluated as it is the argument to a method call---there is no
+ *  short-circuit evaluation in this case.
+ */
+
+static mrb_value
+false_and(mrb_state *mrb, mrb_value obj)
+{
+  return mrb_false_value();
+}
+
+/* 15.2.4.3.2  */
+/* 15.2.6.3.2  */
+/*
+ *  call-seq:
+ *     false ^ obj    -> true or false
+ *     nil   ^ obj    -> true or false
+ *
+ *  Exclusive Or---If <i>obj</i> is <code>nil</code> or
+ *  <code>false</code>, returns <code>false</code>; otherwise, returns
+ *  <code>true</code>.
+ *
+ */
+
+static mrb_value
+false_xor(mrb_state *mrb, mrb_value obj)
+{
+  mrb_bool obj2;
+
+  mrb_get_args(mrb, "b", &obj2);
+  return mrb_bool_value(obj2);
+}
+
+/* 15.2.4.3.3  */
+/* 15.2.6.3.4  */
+/*
+ *  call-seq:
+ *     false | obj   ->   true or false
+ *     nil   | obj   ->   true or false
+ *
+ *  Or---Returns <code>false</code> if <i>obj</i> is
+ *  <code>nil</code> or <code>false</code>; <code>true</code> otherwise.
+ */
+
+static mrb_value
+false_or(mrb_state *mrb, mrb_value obj)
+{
+  mrb_bool obj2;
+
+  mrb_get_args(mrb, "b", &obj2);
+  return mrb_bool_value(obj2);
+}
+
+/* 15.2.6.3.3  */
+/*
+ * call-seq:
+ *   false.to_s   ->  "false"
+ *
+ * 'nuf said...
+ */
+
+static mrb_value
+false_to_s(mrb_state *mrb, mrb_value obj)
+{
+  return mrb_str_new_lit(mrb, "false");
+}
+
+void
+mrb_init_object(mrb_state *mrb)
+{
+  struct RClass *n;
+  struct RClass *t;
+  struct RClass *f;
+
+  mrb->nil_class   = n = mrb_define_class(mrb, "NilClass",   mrb->object_class);
+  mrb_undef_class_method(mrb, n, "new");
+  mrb_define_method(mrb, n, "&",    false_and,      MRB_ARGS_REQ(1));  /* 15.2.4.3.1  */
+  mrb_define_method(mrb, n, "^",    false_xor,      MRB_ARGS_REQ(1));  /* 15.2.4.3.2  */
+  mrb_define_method(mrb, n, "|",    false_or,       MRB_ARGS_REQ(1));  /* 15.2.4.3.3  */
+  mrb_define_method(mrb, n, "nil?", mrb_true,       MRB_ARGS_NONE());  /* 15.2.4.3.4  */
+  mrb_define_method(mrb, n, "to_s", nil_to_s,       MRB_ARGS_NONE());  /* 15.2.4.3.5  */
+  mrb_define_method(mrb, n, "inspect", nil_inspect, MRB_ARGS_NONE());
+
+  mrb->true_class  = t = mrb_define_class(mrb, "TrueClass",  mrb->object_class);
+  mrb_undef_class_method(mrb, t, "new");
+  mrb_define_method(mrb, t, "&",    true_and,       MRB_ARGS_REQ(1));  /* 15.2.5.3.1  */
+  mrb_define_method(mrb, t, "^",    true_xor,       MRB_ARGS_REQ(1));  /* 15.2.5.3.2  */
+  mrb_define_method(mrb, t, "to_s", true_to_s,      MRB_ARGS_NONE());  /* 15.2.5.3.3  */
+  mrb_define_method(mrb, t, "|",    true_or,        MRB_ARGS_REQ(1));  /* 15.2.5.3.4  */
+  mrb_define_method(mrb, t, "inspect", true_to_s,   MRB_ARGS_NONE());
+
+  mrb->false_class = f = mrb_define_class(mrb, "FalseClass", mrb->object_class);
+  mrb_undef_class_method(mrb, f, "new");
+  mrb_define_method(mrb, f, "&",    false_and,      MRB_ARGS_REQ(1));  /* 15.2.6.3.1  */
+  mrb_define_method(mrb, f, "^",    false_xor,      MRB_ARGS_REQ(1));  /* 15.2.6.3.2  */
+  mrb_define_method(mrb, f, "to_s", false_to_s,     MRB_ARGS_NONE());  /* 15.2.6.3.3  */
+  mrb_define_method(mrb, f, "|",    false_or,       MRB_ARGS_REQ(1));  /* 15.2.6.3.4  */
+  mrb_define_method(mrb, f, "inspect", false_to_s,  MRB_ARGS_NONE());
+}
+
+static mrb_value
+inspect_type(mrb_state *mrb, mrb_value val)
+{
+  if (mrb_type(val) == MRB_TT_FALSE || mrb_type(val) == MRB_TT_TRUE) {
+    return mrb_inspect(mrb, val);
+  }
+  else {
+    return mrb_str_new_cstr(mrb, mrb_obj_classname(mrb, val));
+  }
+}
+
+static mrb_value
+convert_type(mrb_state *mrb, mrb_value val, const char *tname, const char *method, mrb_bool raise)
+{
+  mrb_sym m = 0;
+
+  m = mrb_intern_cstr(mrb, method);
+  if (!mrb_respond_to(mrb, val, m)) {
+    if (raise) {
+      mrb_raisef(mrb, E_TYPE_ERROR, "can't convert %S into %S", inspect_type(mrb, val), mrb_str_new_cstr(mrb, tname));
+    }
+    return mrb_nil_value();
+  }
+  return mrb_funcall_argv(mrb, val, m, 0, 0);
+}
+
+MRB_API mrb_value
+mrb_check_to_integer(mrb_state *mrb, mrb_value val, const char *method)
+{
+  mrb_value v;
+
+  if (mrb_fixnum_p(val)) return val;
+  v = convert_type(mrb, val, "Integer", method, FALSE);
+  if (mrb_nil_p(v) || !mrb_fixnum_p(v)) {
+    return mrb_nil_value();
+  }
+  return v;
+}
+
+MRB_API mrb_value
+mrb_convert_type(mrb_state *mrb, mrb_value val, enum mrb_vtype type, const char *tname, const char *method)
+{
+  mrb_value v;
+
+  if (mrb_type(val) == type) return val;
+  v = convert_type(mrb, val, tname, method, TRUE);
+  if (mrb_type(v) != type) {
+    mrb_raisef(mrb, E_TYPE_ERROR, "%S cannot be converted to %S by #%S", val,
+               mrb_str_new_cstr(mrb, tname), mrb_str_new_cstr(mrb, method));
+  }
+  return v;
+}
+
+MRB_API mrb_value
+mrb_check_convert_type(mrb_state *mrb, mrb_value val, enum mrb_vtype type, const char *tname, const char *method)
+{
+  mrb_value v;
+
+  if (mrb_type(val) == type && type != MRB_TT_DATA) return val;
+  v = convert_type(mrb, val, tname, method, FALSE);
+  if (mrb_nil_p(v) || mrb_type(v) != type) return mrb_nil_value();
+  return v;
+}
+
+static const struct types {
+  unsigned char type;
+  const char *name;
+} builtin_types[] = {
+/*    {MRB_TT_NIL,  "nil"}, */
+  {MRB_TT_FALSE,  "false"},
+  {MRB_TT_TRUE,   "true"},
+  {MRB_TT_FIXNUM, "Fixnum"},
+  {MRB_TT_SYMBOL, "Symbol"},  /* :symbol */
+  {MRB_TT_MODULE, "Module"},
+  {MRB_TT_OBJECT, "Object"},
+  {MRB_TT_CLASS,  "Class"},
+  {MRB_TT_ICLASS, "iClass"},  /* internal use: mixed-in module holder */
+  {MRB_TT_SCLASS, "SClass"},
+  {MRB_TT_PROC,   "Proc"},
+  {MRB_TT_FLOAT,  "Float"},
+  {MRB_TT_ARRAY,  "Array"},
+  {MRB_TT_HASH,   "Hash"},
+  {MRB_TT_STRING, "String"},
+  {MRB_TT_RANGE,  "Range"},
+/*    {MRB_TT_BIGNUM,  "Bignum"}, */
+  {MRB_TT_FILE,   "File"},
+  {MRB_TT_DATA,   "Data"},  /* internal use: wrapped C pointers */
+/*    {MRB_TT_VARMAP,  "Varmap"}, */ /* internal use: dynamic variables */
+/*    {MRB_TT_NODE,  "Node"}, */ /* internal use: syntax tree node */
+/*    {MRB_TT_UNDEF,  "undef"}, */ /* internal use: #undef; should not happen */
+    {-1,  0}
+};
+
+MRB_API void
+mrb_check_type(mrb_state *mrb, mrb_value x, enum mrb_vtype t)
+{
+  const struct types *type = builtin_types;
+  enum mrb_vtype xt;
+
+  xt = mrb_type(x);
+  if ((xt != t) || (xt == MRB_TT_DATA)) {
+    while (type->type < MRB_TT_MAXDEFINE) {
+      if (type->type == t) {
+        const char *etype;
+
+        if (mrb_nil_p(x)) {
+          etype = "nil";
+        }
+        else if (mrb_fixnum_p(x)) {
+          etype = "Fixnum";
+        }
+        else if (mrb_type(x) == MRB_TT_SYMBOL) {
+          etype = "Symbol";
+        }
+        else if (mrb_immediate_p(x)) {
+          etype = RSTRING_PTR(mrb_obj_as_string(mrb, x));
+        }
+        else {
+          etype = mrb_obj_classname(mrb, x);
+        }
+        mrb_raisef(mrb, E_TYPE_ERROR, "wrong argument type %S (expected %S)",
+                   mrb_str_new_cstr(mrb, etype), mrb_str_new_cstr(mrb, type->name));
+      }
+      type++;
+    }
+    mrb_raisef(mrb, E_TYPE_ERROR, "unknown type %S (%S given)",
+               mrb_fixnum_value(t), mrb_fixnum_value(mrb_type(x)));
+  }
+}
+
+/* 15.3.1.3.46 */
+/*
+ *  call-seq:
+ *     obj.to_s    => string
+ *
+ *  Returns a string representing <i>obj</i>. The default
+ *  <code>to_s</code> prints the object's class and an encoding of the
+ *  object id. As a special case, the top-level object that is the
+ *  initial execution context of Ruby programs returns "main."
+ */
+
+MRB_API mrb_value
+mrb_any_to_s(mrb_state *mrb, mrb_value obj)
+{
+  mrb_value str = mrb_str_buf_new(mrb, 20);
+  const char *cname = mrb_obj_classname(mrb, obj);
+
+  mrb_str_cat_lit(mrb, str, "#<");
+  mrb_str_cat_cstr(mrb, str, cname);
+  mrb_str_cat_lit(mrb, str, ":");
+  mrb_str_concat(mrb, str, mrb_ptr_to_str(mrb, mrb_cptr(obj)));
+  mrb_str_cat_lit(mrb, str, ">");
+
+  return str;
+}
+
+/*
+ *  call-seq:
+ *     obj.is_a?(class)       => true or false
+ *     obj.kind_of?(class)    => true or false
+ *
+ *  Returns <code>true</code> if <i>class</i> is the class of
+ *  <i>obj</i>, or if <i>class</i> is one of the superclasses of
+ *  <i>obj</i> or modules included in <i>obj</i>.
+ *
+ *     module M;    end
+ *     class A
+ *       include M
+ *     end
+ *     class B < A; end
+ *     class C < B; end
+ *     b = B.new
+ *     b.instance_of? A   #=> false
+ *     b.instance_of? B   #=> true
+ *     b.instance_of? C   #=> false
+ *     b.instance_of? M   #=> false
+ *     b.kind_of? A       #=> true
+ *     b.kind_of? B       #=> true
+ *     b.kind_of? C       #=> false
+ *     b.kind_of? M       #=> true
+ */
+
+MRB_API mrb_bool
+mrb_obj_is_kind_of(mrb_state *mrb, mrb_value obj, struct RClass *c)
+{
+  struct RClass *cl = mrb_class(mrb, obj);
+
+  switch (c->tt) {
+    case MRB_TT_MODULE:
+    case MRB_TT_CLASS:
+    case MRB_TT_ICLASS:
+      break;
+
+    default:
+      mrb_raise(mrb, E_TYPE_ERROR, "class or module required");
+  }
+
+  MRB_CLASS_ORIGIN(c);
+  while (cl) {
+    if (cl == c || cl->mt == c->mt)
+      return TRUE;
+    cl = cl->super;
+  }
+  return FALSE;
+}
+
+static mrb_value
+mrb_to_integer(mrb_state *mrb, mrb_value val, const char *method)
+{
+  mrb_value v;
+
+  if (mrb_fixnum_p(val)) return val;
+  v = convert_type(mrb, val, "Integer", method, TRUE);
+  if (!mrb_obj_is_kind_of(mrb, v, mrb->fixnum_class)) {
+    mrb_value type = inspect_type(mrb, val);
+    mrb_raisef(mrb, E_TYPE_ERROR, "can't convert %S to Integer (%S#%S gives %S)",
+               type, type, mrb_str_new_cstr(mrb, method), inspect_type(mrb, v));
+  }
+  return v;
+}
+
+MRB_API mrb_value
+mrb_to_int(mrb_state *mrb, mrb_value val)
+{
+  return mrb_to_integer(mrb, val, "to_int");
+}
+
+MRB_API mrb_value
+mrb_convert_to_integer(mrb_state *mrb, mrb_value val, int base)
+{
+  mrb_value tmp;
+
+  if (mrb_nil_p(val)) {
+    if (base != 0) goto arg_error;
+      mrb_raise(mrb, E_TYPE_ERROR, "can't convert nil into Integer");
+  }
+  switch (mrb_type(val)) {
+    case MRB_TT_FLOAT:
+      if (base != 0) goto arg_error;
+      if (FIXABLE(mrb_float(val))) {
+        break;
+      }
+      return mrb_flo_to_fixnum(mrb, val);
+
+    case MRB_TT_FIXNUM:
+      if (base != 0) goto arg_error;
+      return val;
+
+    case MRB_TT_STRING:
+    string_conv:
+      return mrb_str_to_inum(mrb, val, base, TRUE);
+
+    default:
+      break;
+  }
+  if (base != 0) {
+    tmp = mrb_check_string_type(mrb, val);
+    if (!mrb_nil_p(tmp)) {
+      goto string_conv;
+    }
+arg_error:
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "base specified for non string value");
+  }
+  tmp = convert_type(mrb, val, "Integer", "to_int", FALSE);
+  if (mrb_nil_p(tmp)) {
+    return mrb_to_integer(mrb, val, "to_i");
+  }
+  return tmp;
+}
+
+MRB_API mrb_value
+mrb_Integer(mrb_state *mrb, mrb_value val)
+{
+  return mrb_convert_to_integer(mrb, val, 0);
+}
+
+MRB_API mrb_value
+mrb_Float(mrb_state *mrb, mrb_value val)
+{
+  if (mrb_nil_p(val)) {
+    mrb_raise(mrb, E_TYPE_ERROR, "can't convert nil into Float");
+  }
+  switch (mrb_type(val)) {
+    case MRB_TT_FIXNUM:
+      return mrb_float_value(mrb, (mrb_float)mrb_fixnum(val));
+
+    case MRB_TT_FLOAT:
+      return val;
+
+    case MRB_TT_STRING:
+      return mrb_float_value(mrb, mrb_str_to_dbl(mrb, val, TRUE));
+
+    default:
+      return mrb_convert_type(mrb, val, MRB_TT_FLOAT, "Float", "to_f");
+  }
+}
+
+MRB_API mrb_value
+mrb_inspect(mrb_state *mrb, mrb_value obj)
+{
+  return mrb_obj_as_string(mrb, mrb_funcall(mrb, obj, "inspect", 0));
+}
+
+MRB_API mrb_bool
+mrb_eql(mrb_state *mrb, mrb_value obj1, mrb_value obj2)
+{
+  if (mrb_obj_eq(mrb, obj1, obj2)) return TRUE;
+  return mrb_test(mrb_funcall(mrb, obj1, "eql?", 1, obj2));
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/opcode.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/opcode.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/opcode.h	(revision 270)
@@ -0,0 +1,2 @@
+/* this header file is to be removed soon. */
+#include "mruby/opcode.h"
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/pool.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/pool.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/pool.c	(revision 270)
@@ -0,0 +1,194 @@
+/*
+** pool.c - memory pool
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include <stddef.h>
+#include <stdint.h>
+#include <string.h>
+#include "mruby.h"
+
+/* configuration section */
+/* allocated memory address should be multiple of POOL_ALIGNMENT */
+/* or undef it if alignment does not matter */
+#ifndef POOL_ALIGNMENT
+#define POOL_ALIGNMENT 4
+#endif
+/* page size of memory pool */
+#ifndef POOL_PAGE_SIZE
+#define POOL_PAGE_SIZE 16000
+#endif
+/* end of configuration section */
+
+struct mrb_pool_page {
+  struct mrb_pool_page *next;
+  size_t offset;
+  size_t len;
+  void *last;
+  char page[];
+};
+
+struct mrb_pool {
+  mrb_state *mrb;
+  struct mrb_pool_page *pages;
+};
+
+#undef TEST_POOL
+#ifdef TEST_POOL
+
+#define mrb_malloc_simple(m,s) malloc(s)
+#define mrb_free(m,p) free(p)
+#endif
+
+#ifdef POOL_ALIGNMENT
+#  define ALIGN_PADDING(x) ((SIZE_MAX - (x) + 1) & (POOL_ALIGNMENT - 1))
+#else
+#  define ALIGN_PADDING(x) (0)
+#endif
+
+MRB_API mrb_pool*
+mrb_pool_open(mrb_state *mrb)
+{
+  mrb_pool *pool = (mrb_pool *)mrb_malloc_simple(mrb, sizeof(mrb_pool));
+
+  if (pool) {
+    pool->mrb = mrb;
+    pool->pages = NULL;
+  }
+
+  return pool;
+}
+
+MRB_API void
+mrb_pool_close(mrb_pool *pool)
+{
+  struct mrb_pool_page *page, *tmp;
+
+  if (!pool) return;
+  page = pool->pages;
+  while (page) {
+    tmp = page;
+    page = page->next;
+    mrb_free(pool->mrb, tmp);
+  }
+  mrb_free(pool->mrb, pool);
+}
+
+static struct mrb_pool_page*
+page_alloc(mrb_pool *pool, size_t len)
+{
+  struct mrb_pool_page *page;
+
+  if (len < POOL_PAGE_SIZE)
+    len = POOL_PAGE_SIZE;
+  page = (struct mrb_pool_page *)mrb_malloc_simple(pool->mrb, sizeof(struct mrb_pool_page)+len);
+  if (page) {
+    page->offset = 0;
+    page->len = len;
+  }
+
+  return page;
+}
+
+MRB_API void*
+mrb_pool_alloc(mrb_pool *pool, size_t len)
+{
+  struct mrb_pool_page *page;
+  size_t n;
+
+  if (!pool) return NULL;
+  len += ALIGN_PADDING(len);
+  page = pool->pages;
+  while (page) {
+    if (page->offset + len <= page->len) {
+      n = page->offset;
+      page->offset += len;
+      page->last = (char*)page->page+n;
+      return page->last;
+    }
+    page = page->next;
+  }
+  page = page_alloc(pool, len);
+  if (!page) return NULL;
+  page->offset = len;
+  page->next = pool->pages;
+  pool->pages = page;
+
+  page->last = (void*)page->page;
+  return page->last;
+}
+
+MRB_API mrb_bool
+mrb_pool_can_realloc(mrb_pool *pool, void *p, size_t len)
+{
+  struct mrb_pool_page *page;
+
+  if (!pool) return FALSE;
+  len += ALIGN_PADDING(len);
+  page = pool->pages;
+  while (page) {
+    if (page->last == p) {
+      size_t beg;
+
+      beg = (char*)p - page->page;
+      if (beg + len > page->len) return FALSE;
+      return TRUE;
+    }
+    page = page->next;
+  }
+  return FALSE;
+}
+
+MRB_API void*
+mrb_pool_realloc(mrb_pool *pool, void *p, size_t oldlen, size_t newlen)
+{
+  struct mrb_pool_page *page;
+  void *np;
+
+  if (!pool) return NULL;
+  oldlen += ALIGN_PADDING(oldlen);
+  newlen += ALIGN_PADDING(newlen);
+  page = pool->pages;
+  while (page) {
+    if (page->last == p) {
+      size_t beg;
+
+      beg = (char*)p - page->page;
+      if (beg + oldlen != page->offset) break;
+      if (beg + newlen > page->len) {
+        page->offset = beg;
+        break;
+      }
+      page->offset = beg + newlen;
+      return p;
+    }
+    page = page->next;
+  }
+  np = mrb_pool_alloc(pool, newlen);
+  if (np == NULL) {
+    return NULL;
+  }
+  memcpy(np, p, oldlen);
+  return np;
+}
+
+#ifdef TEST_POOL
+int
+main(void)
+{
+  int i, len = 250;
+  mrb_pool *pool;
+  void *p;
+
+  pool = mrb_pool_open(NULL);
+  p = mrb_pool_alloc(pool, len);
+  for (i=1; i<20; i++) {
+    printf("%p (len=%d) %ud\n", p, len, mrb_pool_can_realloc(pool, p, len*2));
+    p = mrb_pool_realloc(pool, p, len, len*2);
+    len *= 2;
+  }
+  mrb_pool_close(pool);
+  return 0;
+}
+#endif
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/print.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/print.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/print.c	(revision 270)
@@ -0,0 +1,47 @@
+/*
+** print.c - Kernel.#p
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+#include "mruby/string.h"
+#include "mruby/variable.h"
+
+#ifndef MRB_DISABLE_STDIO
+static void
+printstr(mrb_value obj, FILE *stream)
+{
+  if (mrb_string_p(obj)) {
+    fwrite(RSTRING_PTR(obj), RSTRING_LEN(obj), 1, stream);
+    putc('\n', stream);
+  }
+}
+#else
+# define printstr(obj, stream) (void)0
+#endif
+
+MRB_API void
+mrb_p(mrb_state *mrb, mrb_value obj)
+{
+  printstr(mrb_inspect(mrb, obj), stdout);
+}
+
+MRB_API void
+mrb_print_error(mrb_state *mrb)
+{
+  mrb_print_backtrace(mrb);
+  printstr(mrb_funcall(mrb, mrb_obj_value(mrb->exc), "inspect", 0), stderr);
+}
+
+MRB_API void
+mrb_show_version(mrb_state *mrb)
+{
+  printstr(mrb_const_get(mrb, mrb_obj_value(mrb->object_class), mrb_intern_lit(mrb, "MRUBY_DESCRIPTION")), stdout);
+}
+
+MRB_API void
+mrb_show_copyright(mrb_state *mrb)
+{
+  printstr(mrb_const_get(mrb, mrb_obj_value(mrb->object_class), mrb_intern_lit(mrb, "MRUBY_COPYRIGHT")), stdout);
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/proc.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/proc.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/proc.c	(revision 270)
@@ -0,0 +1,280 @@
+/*
+** proc.c - Proc class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+#include "mruby/class.h"
+#include "mruby/proc.h"
+#include "mruby/opcode.h"
+
+static mrb_code call_iseq[] = {
+  MKOP_A(OP_CALL, 0),
+};
+
+struct RProc *
+mrb_proc_new(mrb_state *mrb, mrb_irep *irep)
+{
+  struct RProc *p;
+  mrb_callinfo *ci = mrb->c->ci;
+
+  p = (struct RProc*)mrb_obj_alloc(mrb, MRB_TT_PROC, mrb->proc_class);
+  p->target_class = 0;
+  if (ci) {
+    if (ci->proc)
+      p->target_class = ci->proc->target_class;
+    if (!p->target_class)
+      p->target_class = ci->target_class;
+  }
+  p->body.irep = irep;
+  p->env = 0;
+  mrb_irep_incref(mrb, irep);
+
+  return p;
+}
+
+static struct REnv*
+env_new(mrb_state *mrb, int nlocals)
+{
+  struct REnv *e;
+
+  e = (struct REnv*)mrb_obj_alloc(mrb, MRB_TT_ENV, (struct RClass*)mrb->c->ci->proc->env);
+  MRB_SET_ENV_STACK_LEN(e, nlocals);
+  e->mid = mrb->c->ci->mid;
+  e->cioff = mrb->c->ci - mrb->c->cibase;
+  e->stack = mrb->c->stack;
+
+  return e;
+}
+
+static void
+closure_setup(mrb_state *mrb, struct RProc *p, int nlocals)
+{
+  struct REnv *e;
+
+  if (!mrb->c->ci->env) {
+    e = env_new(mrb, nlocals);
+    mrb->c->ci->env = e;
+  }
+  else {
+    e = mrb->c->ci->env;
+  }
+  p->env = e;
+}
+
+struct RProc *
+mrb_closure_new(mrb_state *mrb, mrb_irep *irep)
+{
+  struct RProc *p = mrb_proc_new(mrb, irep);
+
+  closure_setup(mrb, p, mrb->c->ci->proc->body.irep->nlocals);
+  return p;
+}
+
+MRB_API struct RProc *
+mrb_proc_new_cfunc(mrb_state *mrb, mrb_func_t func)
+{
+  struct RProc *p;
+
+  p = (struct RProc*)mrb_obj_alloc(mrb, MRB_TT_PROC, mrb->proc_class);
+  p->body.func = func;
+  p->flags |= MRB_PROC_CFUNC;
+  p->env = 0;
+
+  return p;
+}
+
+MRB_API struct RProc *
+mrb_proc_new_cfunc_with_env(mrb_state *mrb, mrb_func_t func, mrb_int argc, const mrb_value *argv)
+{
+  struct RProc *p = mrb_proc_new_cfunc(mrb, func);
+  struct REnv *e;
+  int i;
+
+  p->env = e = env_new(mrb, argc);
+  mrb_field_write_barrier(mrb, (struct RBasic *)p, (struct RBasic *)p->env);
+  MRB_ENV_UNSHARE_STACK(e);
+  e->stack = (mrb_value*)mrb_malloc(mrb, sizeof(mrb_value) * argc);
+  if (argv) {
+    for (i = 0; i < argc; ++i) {
+      e->stack[i] = argv[i];
+    }
+  }
+  else {
+    for (i = 0; i < argc; ++i) {
+      SET_NIL_VALUE(e->stack[i]);
+    }
+  }
+  return p;
+}
+
+MRB_API struct RProc *
+mrb_closure_new_cfunc(mrb_state *mrb, mrb_func_t func, int nlocals)
+{
+  return mrb_proc_new_cfunc_with_env(mrb, func, nlocals, NULL);
+}
+
+MRB_API mrb_value
+mrb_proc_cfunc_env_get(mrb_state *mrb, mrb_int idx)
+{
+  struct RProc *p = mrb->c->ci->proc;
+  struct REnv *e = p->env;
+
+  if (!MRB_PROC_CFUNC_P(p)) {
+    mrb_raise(mrb, E_TYPE_ERROR, "Can't get cfunc env from non-cfunc proc.");
+  }
+  if (!e) {
+    mrb_raise(mrb, E_TYPE_ERROR, "Can't get cfunc env from cfunc Proc without REnv.");
+  }
+  if (idx < 0 || MRB_ENV_STACK_LEN(e) <= idx) {
+    mrb_raisef(mrb, E_INDEX_ERROR, "Env index out of range: %S (expected: 0 <= index < %S)",
+               mrb_fixnum_value(idx), mrb_fixnum_value(MRB_ENV_STACK_LEN(e)));
+  }
+
+  return e->stack[idx];
+}
+
+MRB_API void
+mrb_proc_copy(struct RProc *a, struct RProc *b)
+{
+  a->flags = b->flags;
+  a->body = b->body;
+  if (!MRB_PROC_CFUNC_P(a)) {
+    a->body.irep->refcnt++;
+  }
+  a->target_class = b->target_class;
+  a->env = b->env;
+}
+
+static mrb_value
+mrb_proc_initialize(mrb_state *mrb, mrb_value self)
+{
+  mrb_value blk;
+
+  mrb_get_args(mrb, "&", &blk);
+  if (mrb_nil_p(blk)) {
+    /* Calling Proc.new without a block is not implemented yet */
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "tried to create Proc object without a block");
+  }
+  else {
+    mrb_proc_copy(mrb_proc_ptr(self), mrb_proc_ptr(blk));
+  }
+  return self;
+}
+
+static mrb_value
+mrb_proc_init_copy(mrb_state *mrb, mrb_value self)
+{
+  mrb_value proc;
+
+  mrb_get_args(mrb, "o", &proc);
+  if (mrb_type(proc) != MRB_TT_PROC) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "not a proc");
+  }
+  mrb_proc_copy(mrb_proc_ptr(self), mrb_proc_ptr(proc));
+  return self;
+}
+
+int
+mrb_proc_cfunc_p(struct RProc *p)
+{
+  return MRB_PROC_CFUNC_P(p);
+}
+
+mrb_value
+mrb_proc_call_cfunc(mrb_state *mrb, struct RProc *p, mrb_value self)
+{
+  return (p->body.func)(mrb, self);
+}
+
+mrb_code*
+mrb_proc_iseq(mrb_state *mrb, struct RProc *p)
+{
+  return p->body.irep->iseq;
+}
+
+/* 15.2.17.4.2 */
+static mrb_value
+mrb_proc_arity(mrb_state *mrb, mrb_value self)
+{
+  struct RProc *p = mrb_proc_ptr(self);
+  mrb_code *iseq = mrb_proc_iseq(mrb, p);
+  mrb_aspec aspec;
+  int ma, op, ra, pa, arity;
+
+  if (MRB_PROC_CFUNC_P(p)) {
+    /* TODO cfunc aspec not implemented yet */
+    return mrb_fixnum_value(-1);
+  }
+
+  /* arity is depend on OP_ENTER */
+  if (GET_OPCODE(*iseq) != OP_ENTER) {
+    return mrb_fixnum_value(0);
+  }
+
+  aspec = GETARG_Ax(*iseq);
+  ma = MRB_ASPEC_REQ(aspec);
+  op = MRB_ASPEC_OPT(aspec);
+  ra = MRB_ASPEC_REST(aspec);
+  pa = MRB_ASPEC_POST(aspec);
+  arity = ra || (MRB_PROC_STRICT_P(p) && op) ? -(ma + pa + 1) : ma + pa;
+
+  return mrb_fixnum_value(arity);
+}
+
+/* 15.3.1.2.6  */
+/* 15.3.1.3.27 */
+/*
+ * call-seq:
+ *   lambda { |...| block }  -> a_proc
+ *
+ * Equivalent to <code>Proc.new</code>, except the resulting Proc objects
+ * check the number of parameters passed when called.
+ */
+static mrb_value
+proc_lambda(mrb_state *mrb, mrb_value self)
+{
+  mrb_value blk;
+  struct RProc *p;
+
+  mrb_get_args(mrb, "&", &blk);
+  if (mrb_nil_p(blk)) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "tried to create Proc object without a block");
+  }
+  if (mrb_type(blk) != MRB_TT_PROC) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "not a proc");
+  }
+  p = mrb_proc_ptr(blk);
+  if (!MRB_PROC_STRICT_P(p)) {
+    struct RProc *p2 = (struct RProc*)mrb_obj_alloc(mrb, MRB_TT_PROC, p->c);
+    mrb_proc_copy(p2, p);
+    p2->flags |= MRB_PROC_STRICT;
+    return mrb_obj_value(p2);
+  }
+  return blk;
+}
+
+void
+mrb_init_proc(mrb_state *mrb)
+{
+  struct RProc *m;
+  mrb_irep *call_irep = (mrb_irep *)mrb_malloc(mrb, sizeof(mrb_irep));
+  static const mrb_irep mrb_irep_zero = { 0 };
+
+  *call_irep = mrb_irep_zero;
+  call_irep->flags = MRB_ISEQ_NO_FREE;
+  call_irep->iseq = call_iseq;
+  call_irep->ilen = 1;
+
+  mrb_define_method(mrb, mrb->proc_class, "initialize", mrb_proc_initialize, MRB_ARGS_NONE());
+  mrb_define_method(mrb, mrb->proc_class, "initialize_copy", mrb_proc_init_copy, MRB_ARGS_REQ(1));
+  mrb_define_method(mrb, mrb->proc_class, "arity", mrb_proc_arity, MRB_ARGS_NONE());
+
+  m = mrb_proc_new(mrb, call_irep);
+  mrb_define_method_raw(mrb, mrb->proc_class, mrb_intern_lit(mrb, "call"), m);
+  mrb_define_method_raw(mrb, mrb->proc_class, mrb_intern_lit(mrb, "[]"), m);
+
+  mrb_define_class_method(mrb, mrb->kernel_module, "lambda", proc_lambda, MRB_ARGS_NONE()); /* 15.3.1.2.6  */
+  mrb_define_method(mrb, mrb->kernel_module,       "lambda", proc_lambda, MRB_ARGS_NONE()); /* 15.3.1.3.27 */
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/range.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/range.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/range.c	(revision 270)
@@ -0,0 +1,434 @@
+/*
+** range.c - Range class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+#include "mruby/class.h"
+#include "mruby/range.h"
+#include "mruby/string.h"
+#include "mruby/array.h"
+
+#define RANGE_CLASS (mrb_class_get(mrb, "Range"))
+
+static void
+range_check(mrb_state *mrb, mrb_value a, mrb_value b)
+{
+  mrb_value ans;
+  enum mrb_vtype ta;
+  enum mrb_vtype tb;
+
+  ta = mrb_type(a);
+  tb = mrb_type(b);
+  if ((ta == MRB_TT_FIXNUM || ta == MRB_TT_FLOAT) &&
+      (tb == MRB_TT_FIXNUM || tb == MRB_TT_FLOAT)) {
+    return;
+  }
+
+  ans =  mrb_funcall(mrb, a, "<=>", 1, b);
+  if (mrb_nil_p(ans)) {
+    /* can not be compared */
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "bad value for range");
+  }
+}
+
+MRB_API mrb_value
+mrb_range_new(mrb_state *mrb, mrb_value beg, mrb_value end, mrb_bool excl)
+{
+  struct RRange *r;
+
+  range_check(mrb, beg, end);
+  r = (struct RRange*)mrb_obj_alloc(mrb, MRB_TT_RANGE, RANGE_CLASS);
+  r->edges = (mrb_range_edges *)mrb_malloc(mrb, sizeof(mrb_range_edges));
+  r->edges->beg = beg;
+  r->edges->end = end;
+  r->excl = excl;
+  return mrb_range_value(r);
+}
+
+/*
+ *  call-seq:
+ *     rng.first    => obj
+ *     rng.begin    => obj
+ *
+ *  Returns the first object in <i>rng</i>.
+ */
+mrb_value
+mrb_range_beg(mrb_state *mrb, mrb_value range)
+{
+  struct RRange *r = mrb_range_ptr(range);
+
+  return r->edges->beg;
+}
+
+/*
+ *  call-seq:
+ *     rng.end    => obj
+ *     rng.last   => obj
+ *
+ *  Returns the object that defines the end of <i>rng</i>.
+ *
+ *     (1..10).end    #=> 10
+ *     (1...10).end   #=> 10
+ */
+
+mrb_value
+mrb_range_end(mrb_state *mrb, mrb_value range)
+{
+  struct RRange *r = mrb_range_ptr(range);
+
+  return r->edges->end;
+}
+
+/*
+ *  call-seq:
+ *     range.exclude_end?    => true or false
+ *
+ *  Returns <code>true</code> if <i>range</i> excludes its end value.
+ */
+mrb_value
+mrb_range_excl(mrb_state *mrb, mrb_value range)
+{
+  struct RRange *r = mrb_range_ptr(range);
+
+  return mrb_bool_value(r->excl);
+}
+
+static void
+range_init(mrb_state *mrb, mrb_value range, mrb_value beg, mrb_value end, mrb_bool exclude_end)
+{
+  struct RRange *r = mrb_range_ptr(range);
+
+  range_check(mrb, beg, end);
+  r->excl = exclude_end;
+  if (!r->edges) {
+    r->edges = (mrb_range_edges *)mrb_malloc(mrb, sizeof(mrb_range_edges));
+  }
+  r->edges->beg = beg;
+  r->edges->end = end;
+}
+/*
+ *  call-seq:
+ *     Range.new(start, end, exclusive=false)    => range
+ *
+ *  Constructs a range using the given <i>start</i> and <i>end</i>. If the third
+ *  parameter is omitted or is <code>false</code>, the <i>range</i> will include
+ *  the end object; otherwise, it will be excluded.
+ */
+
+mrb_value
+mrb_range_initialize(mrb_state *mrb, mrb_value range)
+{
+  mrb_value beg, end;
+  mrb_bool exclusive;
+  int n;
+
+  n = mrb_get_args(mrb, "oo|b", &beg, &end, &exclusive);
+  if (n != 3) {
+    exclusive = FALSE;
+  }
+  /* Ranges are immutable, so that they should be initialized only once. */
+  range_init(mrb, range, beg, end, exclusive);
+  return range;
+}
+/*
+ *  call-seq:
+ *     range == obj    => true or false
+ *
+ *  Returns <code>true</code> only if
+ *  1) <i>obj</i> is a Range,
+ *  2) <i>obj</i> has equivalent beginning and end items (by comparing them with <code>==</code>),
+ *  3) <i>obj</i> has the same #exclude_end? setting as <i>rng</t>.
+ *
+ *    (0..2) == (0..2)            #=> true
+ *    (0..2) == Range.new(0,2)    #=> true
+ *    (0..2) == (0...2)           #=> false
+ *
+ */
+
+mrb_value
+mrb_range_eq(mrb_state *mrb, mrb_value range)
+{
+  struct RRange *rr;
+  struct RRange *ro;
+  mrb_value obj;
+
+  mrb_get_args(mrb, "o", &obj);
+
+  if (mrb_obj_equal(mrb, range, obj)) return mrb_true_value();
+  if (!mrb_obj_is_instance_of(mrb, obj, mrb_obj_class(mrb, range))) { /* same class? */
+    return mrb_false_value();
+  }
+
+  rr = mrb_range_ptr(range);
+  ro = mrb_range_ptr(obj);
+  if (!mrb_bool(mrb_funcall(mrb, rr->edges->beg, "==", 1, ro->edges->beg)) ||
+      !mrb_bool(mrb_funcall(mrb, rr->edges->end, "==", 1, ro->edges->end)) ||
+      rr->excl != ro->excl) {
+    return mrb_false_value();
+  }
+  return mrb_true_value();
+}
+
+static mrb_bool
+r_le(mrb_state *mrb, mrb_value a, mrb_value b)
+{
+  mrb_value r = mrb_funcall(mrb, a, "<=>", 1, b); /* compare result */
+  /* output :a < b => -1, a = b =>  0, a > b => +1 */
+
+  if (mrb_fixnum_p(r)) {
+    mrb_int c = mrb_fixnum(r);
+    if (c == 0 || c == -1) return TRUE;
+  }
+
+  return FALSE;
+}
+
+static mrb_bool
+r_gt(mrb_state *mrb, mrb_value a, mrb_value b)
+{
+  mrb_value r = mrb_funcall(mrb, a, "<=>", 1, b);
+  /* output :a < b => -1, a = b =>  0, a > b => +1 */
+
+  return mrb_fixnum_p(r) && mrb_fixnum(r) == 1;
+}
+
+static mrb_bool
+r_ge(mrb_state *mrb, mrb_value a, mrb_value b)
+{
+  mrb_value r = mrb_funcall(mrb, a, "<=>", 1, b); /* compare result */
+  /* output :a < b => -1, a = b =>  0, a > b => +1 */
+
+  if (mrb_fixnum_p(r)) {
+    mrb_int c = mrb_fixnum(r);
+    if (c == 0 || c == 1) return TRUE;
+  }
+
+  return FALSE;
+}
+
+/*
+ *  call-seq:
+ *     range === obj       =>  true or false
+ *     range.member?(val)  =>  true or false
+ *     range.include?(val) =>  true or false
+ *
+ */
+mrb_value
+mrb_range_include(mrb_state *mrb, mrb_value range)
+{
+  mrb_value val;
+  struct RRange *r = mrb_range_ptr(range);
+  mrb_value beg, end;
+  mrb_bool include_p;
+
+  mrb_get_args(mrb, "o", &val);
+
+  beg = r->edges->beg;
+  end = r->edges->end;
+  include_p = r_le(mrb, beg, val) && /* beg <= val */
+              ((r->excl && r_gt(mrb, end, val)) || /* end >  val */
+              (r_ge(mrb, end, val))); /* end >= val */
+
+  return mrb_bool_value(include_p);
+}
+
+static mrb_bool
+range_beg_len(mrb_state *mrb, mrb_value range, mrb_int *begp, mrb_int *lenp, mrb_int len, mrb_bool trunc)
+{
+  mrb_int beg, end;
+  struct RRange *r = mrb_range_ptr(range);
+
+  if (mrb_type(range) != MRB_TT_RANGE) return FALSE;
+
+  beg = mrb_int(mrb, r->edges->beg);
+  end = mrb_int(mrb, r->edges->end);
+
+  if (beg < 0) {
+    beg += len;
+    if (beg < 0) return FALSE;
+  }
+
+  if (trunc) {
+    if (beg > len) return FALSE;
+    if (end > len) end = len;
+  }
+
+  if (end < 0) end += len;
+  if (!r->excl && (!trunc || end < len))
+    end++;                      /* include end point */
+  len = end - beg;
+  if (len < 0) len = 0;
+
+  *begp = beg;
+  *lenp = len;
+  return TRUE;
+}
+
+MRB_API mrb_bool
+mrb_range_beg_len(mrb_state *mrb, mrb_value range, mrb_int *begp, mrb_int *lenp, mrb_int len)
+{
+  return range_beg_len(mrb, range, begp, lenp, len, TRUE);
+}
+
+/* 15.2.14.4.12(x) */
+/*
+ * call-seq:
+ *   rng.to_s   -> string
+ *
+ * Convert this range object to a printable form.
+ */
+
+static mrb_value
+range_to_s(mrb_state *mrb, mrb_value range)
+{
+  mrb_value str, str2;
+  struct RRange *r = mrb_range_ptr(range);
+
+  str  = mrb_obj_as_string(mrb, r->edges->beg);
+  str2 = mrb_obj_as_string(mrb, r->edges->end);
+  str  = mrb_str_dup(mrb, str);
+  mrb_str_cat(mrb, str, "...", r->excl ? 3 : 2);
+  mrb_str_cat_str(mrb, str, str2);
+
+  return str;
+}
+
+/* 15.2.14.4.13(x) */
+/*
+ * call-seq:
+ *   rng.inspect  -> string
+ *
+ * Convert this range object to a printable form (using
+ * <code>inspect</code> to convert the start and end
+ * objects).
+ */
+
+static mrb_value
+range_inspect(mrb_state *mrb, mrb_value range)
+{
+  mrb_value str, str2;
+  struct RRange *r = mrb_range_ptr(range);
+
+  str  = mrb_inspect(mrb, r->edges->beg);
+  str2 = mrb_inspect(mrb, r->edges->end);
+  str  = mrb_str_dup(mrb, str);
+  mrb_str_cat(mrb, str, "...", r->excl ? 3 : 2);
+  mrb_str_cat_str(mrb, str, str2);
+
+  return str;
+}
+
+/* 15.2.14.4.14(x) */
+/*
+ *  call-seq:
+ *     rng.eql?(obj)    -> true or false
+ *
+ *  Returns <code>true</code> only if <i>obj</i> is a Range, has equivalent
+ *  beginning and end items (by comparing them with #eql?), and has the same
+ *  #exclude_end? setting as <i>rng</i>.
+ *
+ *    (0..2).eql?(0..2)            #=> true
+ *    (0..2).eql?(Range.new(0,2))  #=> true
+ *    (0..2).eql?(0...2)           #=> false
+ *
+ */
+
+static mrb_value
+range_eql(mrb_state *mrb, mrb_value range)
+{
+  mrb_value obj;
+  struct RRange *r, *o;
+
+  mrb_get_args(mrb, "o", &obj);
+
+  if (mrb_obj_equal(mrb, range, obj)) return mrb_true_value();
+  if (!mrb_obj_is_kind_of(mrb, obj, RANGE_CLASS)) {
+    return mrb_false_value();
+  }
+  if (mrb_type(obj) != MRB_TT_RANGE) return mrb_false_value();
+
+  r = mrb_range_ptr(range);
+  o = mrb_range_ptr(obj);
+  if (!mrb_eql(mrb, r->edges->beg, o->edges->beg) ||
+      !mrb_eql(mrb, r->edges->end, o->edges->end) ||
+      (r->excl != o->excl)) {
+    return mrb_false_value();
+  }
+  return mrb_true_value();
+}
+
+/* 15.2.14.4.15(x) */
+static mrb_value
+range_initialize_copy(mrb_state *mrb, mrb_value copy)
+{
+  mrb_value src;
+  struct RRange *r;
+
+  mrb_get_args(mrb, "o", &src);
+
+  if (mrb_obj_equal(mrb, copy, src)) return copy;
+  if (!mrb_obj_is_instance_of(mrb, src, mrb_obj_class(mrb, copy))) {
+    mrb_raise(mrb, E_TYPE_ERROR, "wrong argument class");
+  }
+
+  r = mrb_range_ptr(src);
+  range_init(mrb, copy, r->edges->beg, r->edges->end, r->excl);
+
+  return copy;
+}
+
+mrb_value
+mrb_get_values_at(mrb_state *mrb, mrb_value obj, mrb_int olen, mrb_int argc, const mrb_value *argv, mrb_value (*func)(mrb_state*, mrb_value, mrb_int))
+{
+  mrb_int i, j, beg, len;
+  mrb_value result;
+  result = mrb_ary_new(mrb);
+
+  for (i = 0; i < argc; ++i) {
+    if (mrb_fixnum_p(argv[i])) {
+      mrb_ary_push(mrb, result, func(mrb, obj, mrb_fixnum(argv[i])));
+    }
+    else if (range_beg_len(mrb, argv[i], &beg, &len, olen, FALSE)) {
+      mrb_int const end = olen < beg + len ? olen : beg + len;
+      for (j = beg; j < end; ++j) {
+        mrb_ary_push(mrb, result, func(mrb, obj, j));
+      }
+
+      for (; j < beg + len; ++j) {
+        mrb_ary_push(mrb, result, mrb_nil_value());
+      }
+    }
+    else {
+      mrb_raisef(mrb, E_TYPE_ERROR, "invalid values selector: %S", argv[i]);
+    }
+  }
+
+  return result;
+}
+
+void
+mrb_init_range(mrb_state *mrb)
+{
+  struct RClass *r;
+
+  r = mrb_define_class(mrb, "Range", mrb->object_class);                                /* 15.2.14 */
+  MRB_SET_INSTANCE_TT(r, MRB_TT_RANGE);
+
+  mrb_define_method(mrb, r, "begin",           mrb_range_beg,         MRB_ARGS_NONE()); /* 15.2.14.4.3  */
+  mrb_define_method(mrb, r, "end",             mrb_range_end,         MRB_ARGS_NONE()); /* 15.2.14.4.5  */
+  mrb_define_method(mrb, r, "==",              mrb_range_eq,          MRB_ARGS_REQ(1)); /* 15.2.14.4.1  */
+  mrb_define_method(mrb, r, "===",             mrb_range_include,     MRB_ARGS_REQ(1)); /* 15.2.14.4.2  */
+  mrb_define_method(mrb, r, "exclude_end?",    mrb_range_excl,        MRB_ARGS_NONE()); /* 15.2.14.4.6  */
+  mrb_define_method(mrb, r, "first",           mrb_range_beg,         MRB_ARGS_NONE()); /* 15.2.14.4.7  */
+  mrb_define_method(mrb, r, "include?",        mrb_range_include,     MRB_ARGS_REQ(1)); /* 15.2.14.4.8  */
+  mrb_define_method(mrb, r, "initialize",      mrb_range_initialize,  MRB_ARGS_ANY());  /* 15.2.14.4.9  */
+  mrb_define_method(mrb, r, "last",            mrb_range_end,         MRB_ARGS_NONE()); /* 15.2.14.4.10 */
+  mrb_define_method(mrb, r, "member?",         mrb_range_include,     MRB_ARGS_REQ(1)); /* 15.2.14.4.11 */
+
+  mrb_define_method(mrb, r, "to_s",            range_to_s,            MRB_ARGS_NONE()); /* 15.2.14.4.12(x) */
+  mrb_define_method(mrb, r, "inspect",         range_inspect,         MRB_ARGS_NONE()); /* 15.2.14.4.13(x) */
+  mrb_define_method(mrb, r, "eql?",            range_eql,             MRB_ARGS_REQ(1)); /* 15.2.14.4.14(x) */
+  mrb_define_method(mrb, r, "initialize_copy", range_initialize_copy, MRB_ARGS_REQ(1)); /* 15.2.14.4.15(x) */
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/state.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/state.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/state.c	(revision 270)
@@ -0,0 +1,295 @@
+/*
+** state.c - mrb_state open/close functions
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include "mruby.h"
+#include "mruby/irep.h"
+#include "mruby/variable.h"
+#include "mruby/debug.h"
+#include "mruby/string.h"
+
+void mrb_init_core(mrb_state*);
+void mrb_init_mrbgems(mrb_state*);
+
+void mrb_gc_init(mrb_state*, mrb_gc *gc);
+void mrb_gc_destroy(mrb_state*, mrb_gc *gc);
+
+static mrb_value
+inspect_main(mrb_state *mrb, mrb_value mod)
+{
+  return mrb_str_new_lit(mrb, "main");
+}
+
+MRB_API mrb_state*
+mrb_open_core(mrb_allocf f, void *ud)
+{
+  static const mrb_state mrb_state_zero = { 0 };
+  static const struct mrb_context mrb_context_zero = { 0 };
+  mrb_state *mrb;
+
+  mrb = (mrb_state *)(f)(NULL, NULL, sizeof(mrb_state), ud);
+  if (mrb == NULL) return NULL;
+
+  *mrb = mrb_state_zero;
+  mrb->allocf_ud = ud;
+  mrb->allocf = f;
+  mrb->atexit_stack_len = 0;
+
+  mrb_gc_init(mrb, &mrb->gc);
+  mrb->c = (struct mrb_context*)mrb_malloc(mrb, sizeof(struct mrb_context));
+  *mrb->c = mrb_context_zero;
+  mrb->root_c = mrb->c;
+
+  mrb_init_core(mrb);
+
+  return mrb;
+}
+
+void*
+mrb_default_allocf(mrb_state *mrb, void *p, size_t size, void *ud)
+{
+  if (size == 0) {
+    free(p);
+    return NULL;
+  }
+  else {
+    return realloc(p, size);
+  }
+}
+
+struct alloca_header {
+  struct alloca_header *next;
+  char buf[];
+};
+
+MRB_API void*
+mrb_alloca(mrb_state *mrb, size_t size)
+{
+  struct alloca_header *p;
+
+  p = (struct alloca_header*) mrb_malloc(mrb, sizeof(struct alloca_header)+size);
+  p->next = mrb->mems;
+  mrb->mems = p;
+  return (void*)p->buf;
+}
+
+static void
+mrb_alloca_free(mrb_state *mrb)
+{
+  struct alloca_header *p;
+  struct alloca_header *tmp;
+
+  if (mrb == NULL) return;
+  p = mrb->mems;
+
+  while (p) {
+    tmp = p;
+    p = p->next;
+    mrb_free(mrb, tmp);
+  }
+}
+
+MRB_API mrb_state*
+mrb_open(void)
+{
+  mrb_state *mrb = mrb_open_allocf(mrb_default_allocf, NULL);
+
+  return mrb;
+}
+
+MRB_API mrb_state*
+mrb_open_allocf(mrb_allocf f, void *ud)
+{
+  mrb_state *mrb = mrb_open_core(f, ud);
+
+  if (mrb == NULL) {
+    return NULL;
+  }
+
+#ifndef DISABLE_GEMS
+  mrb_init_mrbgems(mrb);
+  mrb_gc_arena_restore(mrb, 0);
+#endif
+  return mrb;
+}
+
+void mrb_free_symtbl(mrb_state *mrb);
+
+void
+mrb_irep_incref(mrb_state *mrb, mrb_irep *irep)
+{
+  irep->refcnt++;
+}
+
+void
+mrb_irep_decref(mrb_state *mrb, mrb_irep *irep)
+{
+  irep->refcnt--;
+  if (irep->refcnt == 0) {
+    mrb_irep_free(mrb, irep);
+  }
+}
+
+void
+mrb_irep_free(mrb_state *mrb, mrb_irep *irep)
+{
+  size_t i;
+
+  if (!(irep->flags & MRB_ISEQ_NO_FREE))
+    mrb_free(mrb, irep->iseq);
+  for (i=0; i<irep->plen; i++) {
+    if (mrb_type(irep->pool[i]) == MRB_TT_STRING) {
+      mrb_gc_free_str(mrb, RSTRING(irep->pool[i]));
+      mrb_free(mrb, mrb_obj_ptr(irep->pool[i]));
+    }
+#ifdef MRB_WORD_BOXING
+    else if (mrb_type(irep->pool[i]) == MRB_TT_FLOAT) {
+      mrb_free(mrb, mrb_obj_ptr(irep->pool[i]));
+    }
+#endif
+  }
+  mrb_free(mrb, irep->pool);
+  mrb_free(mrb, irep->syms);
+  for (i=0; i<irep->rlen; i++) {
+    mrb_irep_decref(mrb, irep->reps[i]);
+  }
+  mrb_free(mrb, irep->reps);
+  mrb_free(mrb, irep->lv);
+  mrb_free(mrb, (void *)irep->filename);
+  mrb_free(mrb, irep->lines);
+  mrb_debug_info_free(mrb, irep->debug_info);
+  mrb_free(mrb, irep);
+}
+
+mrb_value
+mrb_str_pool(mrb_state *mrb, mrb_value str)
+{
+  struct RString *s = mrb_str_ptr(str);
+  struct RString *ns;
+  char *ptr;
+  mrb_int len;
+
+  ns = (struct RString *)mrb_malloc(mrb, sizeof(struct RString));
+  ns->tt = MRB_TT_STRING;
+  ns->c = mrb->string_class;
+
+  if (RSTR_NOFREE_P(s)) {
+    ns->flags = MRB_STR_NOFREE;
+    ns->as.heap.ptr = s->as.heap.ptr;
+    ns->as.heap.len = s->as.heap.len;
+    ns->as.heap.aux.capa = 0;
+  }
+  else {
+    ns->flags = 0;
+    if (RSTR_EMBED_P(s)) {
+      ptr = s->as.ary;
+      len = RSTR_EMBED_LEN(s);
+    }
+    else {
+      ptr = s->as.heap.ptr;
+      len = s->as.heap.len;
+    }
+
+    if (len < RSTRING_EMBED_LEN_MAX) {
+      RSTR_SET_EMBED_FLAG(ns);
+      RSTR_SET_EMBED_LEN(ns, len);
+      if (ptr) {
+        memcpy(ns->as.ary, ptr, len);
+      }
+      ns->as.ary[len] = '\0';
+    }
+    else {
+      ns->as.heap.ptr = (char *)mrb_malloc(mrb, (size_t)len+1);
+      ns->as.heap.len = len;
+      ns->as.heap.aux.capa = len;
+      if (ptr) {
+        memcpy(ns->as.heap.ptr, ptr, len);
+      }
+      ns->as.heap.ptr[len] = '\0';
+    }
+  }
+  return mrb_obj_value(ns);
+}
+
+MRB_API void
+mrb_free_context(mrb_state *mrb, struct mrb_context *c)
+{
+  if (!c) return;
+  mrb_free(mrb, c->stbase);
+  mrb_free(mrb, c->cibase);
+  mrb_free(mrb, c->rescue);
+  mrb_free(mrb, c->ensure);
+  mrb_free(mrb, c);
+}
+
+MRB_API void
+mrb_close(mrb_state *mrb)
+{
+  if (!mrb) return;
+  if (mrb->atexit_stack_len > 0) {
+    mrb_int i;
+    for (i = mrb->atexit_stack_len; i > 0; --i) {
+      mrb->atexit_stack[i - 1](mrb);
+    }
+#ifndef MRB_FIXED_STATE_ATEXIT_STACK
+    mrb_free(mrb, mrb->atexit_stack);
+#endif
+  }
+
+  /* free */
+  mrb_gc_free_gv(mrb);
+  mrb_free_context(mrb, mrb->root_c);
+  mrb_free_symtbl(mrb);
+  mrb_alloca_free(mrb);
+  mrb_gc_destroy(mrb, &mrb->gc);
+  mrb_free(mrb, mrb);
+}
+
+MRB_API mrb_irep*
+mrb_add_irep(mrb_state *mrb)
+{
+  static const mrb_irep mrb_irep_zero = { 0 };
+  mrb_irep *irep;
+
+  irep = (mrb_irep *)mrb_malloc(mrb, sizeof(mrb_irep));
+  *irep = mrb_irep_zero;
+  irep->refcnt = 1;
+
+  return irep;
+}
+
+MRB_API mrb_value
+mrb_top_self(mrb_state *mrb)
+{
+  if (!mrb->top_self) {
+    mrb->top_self = (struct RObject*)mrb_obj_alloc(mrb, MRB_TT_OBJECT, mrb->object_class);
+    mrb_define_singleton_method(mrb, mrb->top_self, "inspect", inspect_main, MRB_ARGS_NONE());
+    mrb_define_singleton_method(mrb, mrb->top_self, "to_s", inspect_main, MRB_ARGS_NONE());
+  }
+  return mrb_obj_value(mrb->top_self);
+}
+
+MRB_API void
+mrb_state_atexit(mrb_state *mrb, mrb_atexit_func f)
+{
+#ifdef MRB_FIXED_STATE_ATEXIT_STACK
+  if (mrb->atexit_stack_len + 1 > MRB_FIXED_STATE_ATEXIT_STACK_SIZE) {
+    mrb_raise(mrb, E_RUNTIME_ERROR, "exceeded fixed state atexit stack limit");
+  }
+#else
+  size_t stack_size;
+
+  stack_size = sizeof(mrb_atexit_func) * (mrb->atexit_stack_len + 1);
+  if (mrb->atexit_stack_len == 0) {
+    mrb->atexit_stack = (mrb_atexit_func*)mrb_malloc(mrb, stack_size);
+  } else {
+    mrb->atexit_stack = (mrb_atexit_func*)mrb_realloc(mrb, mrb->atexit_stack, stack_size);
+  }
+#endif
+
+  mrb->atexit_stack[mrb->atexit_stack_len++] = f;
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/string.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/string.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/string.c	(revision 270)
@@ -0,0 +1,2724 @@
+/*
+** string.c - String class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include <float.h>
+#include <limits.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mruby.h"
+#include "mruby/array.h"
+#include "mruby/class.h"
+#include "mruby/range.h"
+#include "mruby/string.h"
+#include "mruby/re.h"
+
+typedef struct mrb_shared_string {
+  mrb_bool nofree : 1;
+  int refcnt;
+  char *ptr;
+  mrb_int len;
+} mrb_shared_string;
+
+const char mrb_digitmap[] = "0123456789abcdefghijklmnopqrstuvwxyz";
+
+#define mrb_obj_alloc_string(mrb) ((struct RString*)mrb_obj_alloc((mrb), MRB_TT_STRING, (mrb)->string_class))
+
+static struct RString*
+str_new_static(mrb_state *mrb, const char *p, size_t len)
+{
+  struct RString *s;
+
+  if (len >= MRB_INT_MAX) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "string size too big");
+  }
+  s = mrb_obj_alloc_string(mrb);
+  s->as.heap.len = len;
+  s->as.heap.aux.capa = 0;             /* nofree */
+  s->as.heap.ptr = (char *)p;
+  s->flags = MRB_STR_NOFREE;
+
+  return s;
+}
+
+static struct RString*
+str_new(mrb_state *mrb, const char *p, size_t len)
+{
+  struct RString *s;
+
+  if (p && mrb_ro_data_p(p)) {
+    return str_new_static(mrb, p, len);
+  }
+  s = mrb_obj_alloc_string(mrb);
+  if (len < RSTRING_EMBED_LEN_MAX) {
+    RSTR_SET_EMBED_FLAG(s);
+    RSTR_SET_EMBED_LEN(s, len);
+    if (p) {
+      memcpy(s->as.ary, p, len);
+    }
+  } else {
+    if (len >= MRB_INT_MAX) {
+      mrb_raise(mrb, E_ARGUMENT_ERROR, "string size too big");
+    }
+    s->as.heap.len = len;
+    s->as.heap.aux.capa = len;
+    s->as.heap.ptr = (char *)mrb_malloc(mrb, len+1);
+    if (p) {
+      memcpy(s->as.heap.ptr, p, len);
+    }
+  }
+  RSTR_PTR(s)[len] = '\0';
+  return s;
+}
+
+static inline void
+str_with_class(mrb_state *mrb, struct RString *s, mrb_value obj)
+{
+  s->c = mrb_str_ptr(obj)->c;
+}
+
+static mrb_value
+mrb_str_new_empty(mrb_state *mrb, mrb_value str)
+{
+  struct RString *s = str_new(mrb, 0, 0);
+
+  str_with_class(mrb, s, str);
+  return mrb_obj_value(s);
+}
+
+#ifndef MRB_STR_BUF_MIN_SIZE
+# define MRB_STR_BUF_MIN_SIZE 128
+#endif
+
+MRB_API mrb_value
+mrb_str_buf_new(mrb_state *mrb, size_t capa)
+{
+  struct RString *s;
+
+  s = mrb_obj_alloc_string(mrb);
+
+  if (capa >= MRB_INT_MAX) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "string capacity size too big");
+  }
+  if (capa < MRB_STR_BUF_MIN_SIZE) {
+    capa = MRB_STR_BUF_MIN_SIZE;
+  }
+  s->as.heap.len = 0;
+  s->as.heap.aux.capa = capa;
+  s->as.heap.ptr = (char *)mrb_malloc(mrb, capa+1);
+  RSTR_PTR(s)[0] = '\0';
+
+  return mrb_obj_value(s);
+}
+
+static inline void
+resize_capa(mrb_state *mrb, struct RString *s, mrb_int capacity)
+{
+  if (RSTR_EMBED_P(s)) {
+    if (RSTRING_EMBED_LEN_MAX < capacity) {
+      char *const tmp = (char *)mrb_malloc(mrb, capacity+1);
+      const mrb_int len = RSTR_EMBED_LEN(s);
+      memcpy(tmp, s->as.ary, len);
+      RSTR_UNSET_EMBED_FLAG(s);
+      s->as.heap.ptr = tmp;
+      s->as.heap.len = len;
+      s->as.heap.aux.capa = capacity;
+    }
+  }
+  else {
+    s->as.heap.ptr = (char *)mrb_realloc(mrb, RSTR_PTR(s), capacity+1);
+    s->as.heap.aux.capa = capacity;
+  }
+}
+
+static void
+str_buf_cat(mrb_state *mrb, struct RString *s, const char *ptr, size_t len)
+{
+  size_t capa;
+  size_t total;
+  ptrdiff_t off = -1;
+
+  if (len == 0) return;
+  mrb_str_modify(mrb, s);
+  if (ptr >= RSTR_PTR(s) && ptr <= RSTR_PTR(s) + (size_t)RSTR_LEN(s)) {
+      off = ptr - RSTR_PTR(s);
+  }
+
+  if (RSTR_EMBED_P(s))
+    capa = RSTRING_EMBED_LEN_MAX;
+  else
+    capa = s->as.heap.aux.capa;
+
+  if (RSTR_LEN(s) >= MRB_INT_MAX - (mrb_int)len) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "string size too big");
+  }
+  total = RSTR_LEN(s)+len;
+  if (capa <= total) {
+    while (total > capa) {
+      if (capa + 1 >= MRB_INT_MAX / 2) {
+        capa = (total + 4095) / 4096;
+        break;
+      }
+      capa = (capa + 1) * 2;
+    }
+    resize_capa(mrb, s, capa);
+  }
+  if (off != -1) {
+      ptr = RSTR_PTR(s) + off;
+  }
+  memcpy(RSTR_PTR(s) + RSTR_LEN(s), ptr, len);
+  mrb_assert_int_fit(size_t, total, mrb_int, MRB_INT_MAX);
+  RSTR_SET_LEN(s, total);
+  RSTR_PTR(s)[total] = '\0';   /* sentinel */
+}
+
+MRB_API mrb_value
+mrb_str_new(mrb_state *mrb, const char *p, size_t len)
+{
+  return mrb_obj_value(str_new(mrb, p, len));
+}
+
+/*
+ *  call-seq: (Caution! NULL string)
+ *     String.new(str="")   => new_str
+ *
+ *  Returns a new string object containing a copy of <i>str</i>.
+ */
+
+MRB_API mrb_value
+mrb_str_new_cstr(mrb_state *mrb, const char *p)
+{
+  struct RString *s;
+  size_t len;
+
+  if (p) {
+    len = strlen(p);
+  }
+  else {
+    len = 0;
+  }
+
+  s = str_new(mrb, p, len);
+
+  return mrb_obj_value(s);
+}
+
+MRB_API mrb_value
+mrb_str_new_static(mrb_state *mrb, const char *p, size_t len)
+{
+  struct RString *s = str_new_static(mrb, p, len);
+  return mrb_obj_value(s);
+}
+
+static void
+str_decref(mrb_state *mrb, mrb_shared_string *shared)
+{
+  shared->refcnt--;
+  if (shared->refcnt == 0) {
+    if (!shared->nofree) {
+      mrb_free(mrb, shared->ptr);
+    }
+    mrb_free(mrb, shared);
+  }
+}
+
+void
+mrb_gc_free_str(mrb_state *mrb, struct RString *str)
+{
+  if (RSTR_EMBED_P(str))
+    /* no code */;
+  else if (RSTR_SHARED_P(str))
+    str_decref(mrb, str->as.heap.aux.shared);
+  else if (!RSTR_NOFREE_P(str))
+    mrb_free(mrb, str->as.heap.ptr);
+}
+
+#ifdef MRB_UTF8_STRING
+static const char utf8len_codepage[256] =
+{
+  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+  2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,
+};
+
+static mrb_int
+utf8len(const char* p, const char* e)
+{
+  mrb_int len;
+  mrb_int i;
+
+  len = utf8len_codepage[(unsigned char)*p];
+  if (p + len > e) return 1;
+  for (i = 1; i < len; ++i)
+    if ((p[i] & 0xc0) != 0x80)
+      return 1;
+  return len;
+}
+
+static mrb_int
+utf8_strlen(mrb_value str, mrb_int len)
+{
+  mrb_int total = 0;
+  char* p = RSTRING_PTR(str);
+  char* e = p;
+  e += len < 0 ? RSTRING_LEN(str) : len;
+  while (p<e) {
+    p += utf8len(p, e);
+    total++;
+  }
+  return total;
+}
+
+#define RSTRING_CHAR_LEN(s) utf8_strlen(s, -1)
+
+/* map character index to byte offset index */
+static mrb_int
+chars2bytes(mrb_value s, mrb_int off, mrb_int idx)
+{
+  mrb_int i, b, n;
+  const char *p = RSTRING_PTR(s) + off;
+  const char *e = RSTRING_END(s);
+
+  for (b=i=0; p<e && i<idx; i++) {
+    n = utf8len(p, e);
+    b += n;
+    p += n;
+  }
+  return b;
+}
+
+/* map byte offset to character index */
+static mrb_int
+bytes2chars(char *p, mrb_int bi)
+{
+  mrb_int i, b, n;
+
+  for (b=i=0; b<bi; i++) {
+    n = utf8len(p, p+bi);
+    b += n;
+    p += n;
+  }
+  return i;
+}
+
+#else
+#define RSTRING_CHAR_LEN(s) RSTRING_LEN(s)
+#define chars2bytes(p, off, ci) (ci)
+#define bytes2chars(p, bi) (bi)
+#endif
+
+static inline mrb_int
+mrb_memsearch_qs(const unsigned char *xs, mrb_int m, const unsigned char *ys, mrb_int n)
+{
+  const unsigned char *x = xs, *xe = xs + m;
+  const unsigned char *y = ys;
+  int i, qstable[256];
+
+  /* Preprocessing */
+  for (i = 0; i < 256; ++i)
+    qstable[i] = m + 1;
+  for (; x < xe; ++x)
+    qstable[*x] = xe - x;
+  /* Searching */
+  for (; y + m <= ys + n; y += *(qstable + y[m])) {
+    if (*xs == *y && memcmp(xs, y, m) == 0)
+      return y - ys;
+  }
+  return -1;
+}
+
+static mrb_int
+mrb_memsearch(const void *x0, mrb_int m, const void *y0, mrb_int n)
+{
+  const unsigned char *x = (const unsigned char *)x0, *y = (const unsigned char *)y0;
+
+  if (m > n) return -1;
+  else if (m == n) {
+    return memcmp(x0, y0, m) == 0 ? 0 : -1;
+  }
+  else if (m < 1) {
+    return 0;
+  }
+  else if (m == 1) {
+    const unsigned char *ys = y, *ye = ys + n;
+    for (; y < ye; ++y) {
+      if (*x == *y)
+        return y - ys;
+    }
+    return -1;
+  }
+  return mrb_memsearch_qs((const unsigned char *)x0, m, (const unsigned char *)y0, n);
+}
+
+static void
+str_make_shared(mrb_state *mrb, struct RString *s)
+{
+  if (!RSTR_SHARED_P(s)) {
+    mrb_shared_string *shared = (mrb_shared_string *)mrb_malloc(mrb, sizeof(mrb_shared_string));
+
+    shared->refcnt = 1;
+    if (RSTR_EMBED_P(s)) {
+      const mrb_int len = RSTR_EMBED_LEN(s);
+      char *const tmp = (char *)mrb_malloc(mrb, len+1);
+      memcpy(tmp, s->as.ary, len);
+      tmp[len] = '\0';
+      RSTR_UNSET_EMBED_FLAG(s);
+      s->as.heap.ptr = tmp;
+      s->as.heap.len = len;
+      shared->nofree = FALSE;
+      shared->ptr = s->as.heap.ptr;
+    }
+    else if (RSTR_NOFREE_P(s)) {
+      shared->nofree = TRUE;
+      shared->ptr = s->as.heap.ptr;
+      RSTR_UNSET_NOFREE_FLAG(s);
+    }
+    else {
+      shared->nofree = FALSE;
+      if (s->as.heap.aux.capa > s->as.heap.len) {
+        s->as.heap.ptr = shared->ptr = (char *)mrb_realloc(mrb, s->as.heap.ptr, s->as.heap.len+1);
+      }
+      else {
+        shared->ptr = s->as.heap.ptr;
+      }
+    }
+    shared->len = s->as.heap.len;
+    s->as.heap.aux.shared = shared;
+    RSTR_SET_SHARED_FLAG(s);
+  }
+}
+
+static mrb_value
+byte_subseq(mrb_state *mrb, mrb_value str, mrb_int beg, mrb_int len)
+{
+  struct RString *orig, *s;
+  mrb_shared_string *shared;
+
+  orig = mrb_str_ptr(str);
+  if (RSTR_EMBED_P(orig)) {
+    s = str_new(mrb, orig->as.ary+beg, len);
+  }
+  else {
+    str_make_shared(mrb, orig);
+    shared = orig->as.heap.aux.shared;
+    s = mrb_obj_alloc_string(mrb);
+    s->as.heap.ptr = orig->as.heap.ptr + beg;
+    s->as.heap.len = len;
+    s->as.heap.aux.shared = shared;
+    RSTR_SET_SHARED_FLAG(s);
+    shared->refcnt++;
+  }
+
+  return mrb_obj_value(s);
+}
+#ifdef MRB_UTF8_STRING
+static inline mrb_value
+str_subseq(mrb_state *mrb, mrb_value str, mrb_int beg, mrb_int len)
+{
+  beg = chars2bytes(str, 0, beg);
+  len = chars2bytes(str, beg, len);
+
+  return byte_subseq(mrb, str, beg, len);
+}
+#else
+#define str_subseq(mrb, str, beg, len) byte_subseq(mrb, str, beg, len)
+#endif
+
+static mrb_value
+str_substr(mrb_state *mrb, mrb_value str, mrb_int beg, mrb_int len)
+{
+  mrb_int clen = RSTRING_CHAR_LEN(str);
+
+  if (len < 0) return mrb_nil_value();
+  if (clen == 0) {
+    len = 0;
+  }
+  else if (beg < 0) {
+    beg = clen + beg;
+  }
+  if (beg > clen) return mrb_nil_value();
+  if (beg < 0) {
+    beg += clen;
+    if (beg < 0) return mrb_nil_value();
+  }
+  if (beg + len > clen)
+    len = clen - beg;
+  if (len <= 0) {
+    len = 0;
+  }
+  return str_subseq(mrb, str, beg, len);
+}
+
+static mrb_int
+str_index(mrb_state *mrb, mrb_value str, mrb_value sub, mrb_int offset)
+{
+  mrb_int pos;
+  char *s, *sptr;
+  mrb_int len, slen;
+
+  len = RSTRING_LEN(str);
+  slen = RSTRING_LEN(sub);
+  if (offset < 0) {
+    offset += len;
+    if (offset < 0) return -1;
+  }
+  if (len - offset < slen) return -1;
+  s = RSTRING_PTR(str);
+  if (offset) {
+    s += offset;
+  }
+  if (slen == 0) return offset;
+  /* need proceed one character at a time */
+  sptr = RSTRING_PTR(sub);
+  slen = RSTRING_LEN(sub);
+  len = RSTRING_LEN(str) - offset;
+  pos = mrb_memsearch(sptr, slen, s, len);
+  if (pos < 0) return pos;
+  return pos + offset;
+}
+
+static void
+check_frozen(mrb_state *mrb, struct RString *s)
+{
+  if (RSTR_FROZEN_P(s)) {
+    mrb_raise(mrb, E_RUNTIME_ERROR, "can't modify frozen string");
+  }
+}
+
+static mrb_value
+str_replace(mrb_state *mrb, struct RString *s1, struct RString *s2)
+{
+  long len;
+
+  check_frozen(mrb, s1);
+  len = RSTR_LEN(s2);
+  if (RSTR_SHARED_P(s1)) {
+    str_decref(mrb, s1->as.heap.aux.shared);
+  }
+  else if (!RSTR_EMBED_P(s1) && !RSTR_NOFREE_P(s1)) {
+    mrb_free(mrb, s1->as.heap.ptr);
+  }
+
+  RSTR_UNSET_NOFREE_FLAG(s1);
+
+  if (RSTR_SHARED_P(s2)) {
+L_SHARE:
+    RSTR_UNSET_EMBED_FLAG(s1);
+    s1->as.heap.ptr = s2->as.heap.ptr;
+    s1->as.heap.len = len;
+    s1->as.heap.aux.shared = s2->as.heap.aux.shared;
+    RSTR_SET_SHARED_FLAG(s1);
+    s1->as.heap.aux.shared->refcnt++;
+  }
+  else {
+    if (len <= RSTRING_EMBED_LEN_MAX) {
+      RSTR_UNSET_SHARED_FLAG(s1);
+      RSTR_SET_EMBED_FLAG(s1);
+      memcpy(s1->as.ary, RSTR_PTR(s2), len);
+      RSTR_SET_EMBED_LEN(s1, len);
+    }
+    else {
+      str_make_shared(mrb, s2);
+      goto L_SHARE;
+    }
+  }
+
+  return mrb_obj_value(s1);
+}
+
+static mrb_int
+str_rindex(mrb_state *mrb, mrb_value str, mrb_value sub, mrb_int pos)
+{
+  char *s, *sbeg, *t;
+  struct RString *ps = mrb_str_ptr(str);
+  mrb_int len = RSTRING_LEN(sub);
+
+  /* substring longer than string */
+  if (RSTR_LEN(ps) < len) return -1;
+  if (RSTR_LEN(ps) - pos < len) {
+    pos = RSTR_LEN(ps) - len;
+  }
+  sbeg = RSTR_PTR(ps);
+  s = RSTR_PTR(ps) + pos;
+  t = RSTRING_PTR(sub);
+  if (len) {
+    while (sbeg <= s) {
+      if (memcmp(s, t, len) == 0) {
+        return s - RSTR_PTR(ps);
+      }
+      s--;
+    }
+    return -1;
+  }
+  else {
+    return pos;
+  }
+}
+
+MRB_API mrb_int
+mrb_str_strlen(mrb_state *mrb, struct RString *s)
+{
+  mrb_int i, max = RSTR_LEN(s);
+  char *p = RSTR_PTR(s);
+
+  if (!p) return 0;
+  for (i=0; i<max; i++) {
+    if (p[i] == '\0') {
+      mrb_raise(mrb, E_ARGUMENT_ERROR, "string contains null byte");
+    }
+  }
+  return max;
+}
+
+#ifdef _WIN32
+#include <windows.h>
+
+char*
+mrb_utf8_from_locale(const char *str, size_t len)
+{
+  wchar_t* wcsp;
+  char* mbsp;
+  size_t mbssize, wcssize;
+
+  if (len == 0)
+    return strdup("");
+  if (len == -1)
+    len = strlen(str);
+  wcssize = MultiByteToWideChar(GetACP(), 0, str, len,  NULL, 0);
+  wcsp = (wchar_t*) malloc((wcssize + 1) * sizeof(wchar_t));
+  if (!wcsp)
+    return NULL;
+  wcssize = MultiByteToWideChar(GetACP(), 0, str, len, wcsp, wcssize + 1);
+  wcsp[wcssize] = 0;
+
+  mbssize = WideCharToMultiByte(CP_UTF8, 0, (LPCWSTR) wcsp, -1, NULL, 0, NULL, NULL);
+  mbsp = (char*) malloc((mbssize + 1));
+  if (!mbsp) {
+    free(wcsp);
+    return NULL;
+  }
+  mbssize = WideCharToMultiByte(CP_UTF8, 0, (LPCWSTR) wcsp, -1, mbsp, mbssize, NULL, NULL);
+  mbsp[mbssize] = 0;
+  free(wcsp);
+  return mbsp;
+}
+
+char*
+mrb_locale_from_utf8(const char *utf8, size_t len)
+{
+  wchar_t* wcsp;
+  char* mbsp;
+  size_t mbssize, wcssize;
+
+  if (len == 0)
+    return strdup("");
+  if (len == -1)
+    len = strlen(utf8);
+  wcssize = MultiByteToWideChar(CP_UTF8, 0, utf8, len,  NULL, 0);
+  wcsp = (wchar_t*) malloc((wcssize + 1) * sizeof(wchar_t));
+  if (!wcsp)
+    return NULL;
+  wcssize = MultiByteToWideChar(CP_UTF8, 0, utf8, len, wcsp, wcssize + 1);
+  wcsp[wcssize] = 0;
+  mbssize = WideCharToMultiByte(GetACP(), 0, (LPCWSTR) wcsp, -1, NULL, 0, NULL, NULL);
+  mbsp = (char*) malloc((mbssize + 1));
+  if (!mbsp) {
+    free(wcsp);
+    return NULL;
+  }
+  mbssize = WideCharToMultiByte(GetACP(), 0, (LPCWSTR) wcsp, -1, mbsp, mbssize, NULL, NULL);
+  mbsp[mbssize] = 0;
+  free(wcsp);
+  return mbsp;
+}
+#endif
+
+MRB_API void
+mrb_str_modify(mrb_state *mrb, struct RString *s)
+{
+  check_frozen(mrb, s);
+  if (RSTR_SHARED_P(s)) {
+    mrb_shared_string *shared = s->as.heap.aux.shared;
+
+    if (shared->refcnt == 1 && s->as.heap.ptr == shared->ptr) {
+      s->as.heap.ptr = shared->ptr;
+      s->as.heap.aux.capa = shared->len;
+      RSTR_PTR(s)[s->as.heap.len] = '\0';
+      mrb_free(mrb, shared);
+    }
+    else {
+      char *ptr, *p;
+      mrb_int len;
+
+      p = RSTR_PTR(s);
+      len = s->as.heap.len;
+      ptr = (char *)mrb_malloc(mrb, (size_t)len + 1);
+      if (p) {
+        memcpy(ptr, p, len);
+      }
+      ptr[len] = '\0';
+      s->as.heap.ptr = ptr;
+      s->as.heap.aux.capa = len;
+      str_decref(mrb, shared);
+    }
+    RSTR_UNSET_SHARED_FLAG(s);
+    return;
+  }
+  if (RSTR_NOFREE_P(s)) {
+    char *p = s->as.heap.ptr;
+
+    s->as.heap.ptr = (char *)mrb_malloc(mrb, (size_t)s->as.heap.len+1);
+    if (p) {
+      memcpy(RSTR_PTR(s), p, s->as.heap.len);
+    }
+    RSTR_PTR(s)[s->as.heap.len] = '\0';
+    s->as.heap.aux.capa = s->as.heap.len;
+    RSTR_UNSET_NOFREE_FLAG(s);
+    return;
+  }
+}
+
+static mrb_value
+mrb_str_freeze(mrb_state *mrb, mrb_value str)
+{
+  struct RString *s = mrb_str_ptr(str);
+
+  RSTR_SET_FROZEN_FLAG(s);
+  return str;
+}
+
+MRB_API mrb_value
+mrb_str_resize(mrb_state *mrb, mrb_value str, mrb_int len)
+{
+  mrb_int slen;
+  struct RString *s = mrb_str_ptr(str);
+
+  mrb_str_modify(mrb, s);
+  slen = RSTR_LEN(s);
+  if (len != slen) {
+    if (slen < len || slen - len > 256) {
+      resize_capa(mrb, s, len);
+    }
+    RSTR_SET_LEN(s, len);
+    RSTR_PTR(s)[len] = '\0';   /* sentinel */
+  }
+  return str;
+}
+
+MRB_API char*
+mrb_str_to_cstr(mrb_state *mrb, mrb_value str0)
+{
+  struct RString *s;
+
+  if (!mrb_string_p(str0)) {
+    mrb_raise(mrb, E_TYPE_ERROR, "expected String");
+  }
+
+  s = str_new(mrb, RSTRING_PTR(str0), RSTRING_LEN(str0));
+  if ((strlen(RSTR_PTR(s)) ^ RSTR_LEN(s)) != 0) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "string contains null byte");
+  }
+  return RSTR_PTR(s);
+}
+
+/*
+ *  call-seq: (Caution! String("abcd") change)
+ *     String("abcdefg") = String("abcd") + String("efg")
+ *
+ *  Returns a new string object containing a copy of <i>str</i>.
+ */
+MRB_API void
+mrb_str_concat(mrb_state *mrb, mrb_value self, mrb_value other)
+{
+  struct RString *s1 = mrb_str_ptr(self), *s2;
+  mrb_int len;
+
+  mrb_str_modify(mrb, s1);
+  if (!mrb_string_p(other)) {
+    other = mrb_str_to_str(mrb, other);
+  }
+  s2 = mrb_str_ptr(other);
+  len = RSTR_LEN(s1) + RSTR_LEN(s2);
+
+  if (RSTRING_CAPA(self) < len) {
+    resize_capa(mrb, s1, len);
+  }
+  memcpy(RSTR_PTR(s1)+RSTR_LEN(s1), RSTR_PTR(s2), RSTR_LEN(s2));
+  RSTR_SET_LEN(s1, len);
+  RSTR_PTR(s1)[len] = '\0';
+}
+
+/*
+ *  call-seq: (Caution! String("abcd") remain)
+ *     String("abcdefg") = String("abcd") + String("efg")
+ *
+ *  Returns a new string object containing a copy of <i>str</i>.
+ */
+MRB_API mrb_value
+mrb_str_plus(mrb_state *mrb, mrb_value a, mrb_value b)
+{
+  struct RString *s = mrb_str_ptr(a);
+  struct RString *s2 = mrb_str_ptr(b);
+  struct RString *t;
+
+  t = str_new(mrb, 0, RSTR_LEN(s) + RSTR_LEN(s2));
+  memcpy(RSTR_PTR(t), RSTR_PTR(s), RSTR_LEN(s));
+  memcpy(RSTR_PTR(t) + RSTR_LEN(s), RSTR_PTR(s2), RSTR_LEN(s2));
+
+  return mrb_obj_value(t);
+}
+
+/* 15.2.10.5.2  */
+
+/*
+ *  call-seq: (Caution! String("abcd") remain) for stack_argument
+ *     String("abcdefg") = String("abcd") + String("efg")
+ *
+ *  Returns a new string object containing a copy of <i>str</i>.
+ */
+static mrb_value
+mrb_str_plus_m(mrb_state *mrb, mrb_value self)
+{
+  mrb_value str;
+
+  mrb_get_args(mrb, "S", &str);
+  return mrb_str_plus(mrb, self, str);
+}
+
+/* 15.2.10.5.26 */
+/* 15.2.10.5.33 */
+/*
+ *  call-seq:
+ *     "abcd".size   => int
+ *
+ *  Returns the length of string.
+ */
+static mrb_value
+mrb_str_size(mrb_state *mrb, mrb_value self)
+{
+  mrb_int len = RSTRING_CHAR_LEN(self);
+  return mrb_fixnum_value(len);
+}
+
+static mrb_value
+mrb_str_bytesize(mrb_state *mrb, mrb_value self)
+{
+  mrb_int len = RSTRING_LEN(self);
+  return mrb_fixnum_value(len);
+}
+
+/* 15.2.10.5.1  */
+/*
+ *  call-seq:
+ *     str * integer   => new_str
+ *
+ *  Copy---Returns a new <code>String</code> containing <i>integer</i> copies of
+ *  the receiver.
+ *
+ *     "Ho! " * 3   #=> "Ho! Ho! Ho! "
+ */
+static mrb_value
+mrb_str_times(mrb_state *mrb, mrb_value self)
+{
+  mrb_int n,len,times;
+  struct RString *str2;
+  char *p;
+
+  mrb_get_args(mrb, "i", &times);
+  if (times < 0) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "negative argument");
+  }
+  if (times && MRB_INT_MAX / times < RSTRING_LEN(self)) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "argument too big");
+  }
+
+  len = RSTRING_LEN(self)*times;
+  str2 = str_new(mrb, 0, len);
+  str_with_class(mrb, str2, self);
+  p = RSTR_PTR(str2);
+  if (len > 0) {
+    n = RSTRING_LEN(self);
+    memcpy(p, RSTRING_PTR(self), n);
+    while (n <= len/2) {
+      memcpy(p + n, p, n);
+      n *= 2;
+    }
+    memcpy(p + n, p, len-n);
+  }
+  p[RSTR_LEN(str2)] = '\0';
+
+  return mrb_obj_value(str2);
+}
+/* -------------------------------------------------------------- */
+
+#define lesser(a,b) (((a)>(b))?(b):(a))
+
+/* ---------------------------*/
+/*
+ *  call-seq:
+ *     mrb_value str1 <=> mrb_value str2   => int
+ *                     >  1
+ *                     =  0
+ *                     <  -1
+ */
+MRB_API int
+mrb_str_cmp(mrb_state *mrb, mrb_value str1, mrb_value str2)
+{
+  mrb_int len;
+  mrb_int retval;
+  struct RString *s1 = mrb_str_ptr(str1);
+  struct RString *s2 = mrb_str_ptr(str2);
+
+  len = lesser(RSTR_LEN(s1), RSTR_LEN(s2));
+  retval = memcmp(RSTR_PTR(s1), RSTR_PTR(s2), len);
+  if (retval == 0) {
+    if (RSTR_LEN(s1) == RSTR_LEN(s2)) return 0;
+    if (RSTR_LEN(s1) > RSTR_LEN(s2))  return 1;
+    return -1;
+  }
+  if (retval > 0) return 1;
+  return -1;
+}
+
+/* 15.2.10.5.3  */
+
+/*
+ *  call-seq:
+ *     str <=> other_str   => -1, 0, +1
+ *
+ *  Comparison---Returns -1 if <i>other_str</i> is less than, 0 if
+ *  <i>other_str</i> is equal to, and +1 if <i>other_str</i> is greater than
+ *  <i>str</i>. If the strings are of different lengths, and the strings are
+ *  equal when compared up to the shortest length, then the longer string is
+ *  considered greater than the shorter one. If the variable <code>$=</code> is
+ *  <code>false</code>, the comparison is based on comparing the binary values
+ *  of each character in the string. In older versions of Ruby, setting
+ *  <code>$=</code> allowed case-insensitive comparisons; this is now deprecated
+ *  in favor of using <code>String#casecmp</code>.
+ *
+ *  <code><=></code> is the basis for the methods <code><</code>,
+ *  <code><=</code>, <code>></code>, <code>>=</code>, and <code>between?</code>,
+ *  included from module <code>Comparable</code>.  The method
+ *  <code>String#==</code> does not use <code>Comparable#==</code>.
+ *
+ *     "abcdef" <=> "abcde"     #=> 1
+ *     "abcdef" <=> "abcdef"    #=> 0
+ *     "abcdef" <=> "abcdefg"   #=> -1
+ *     "abcdef" <=> "ABCDEF"    #=> 1
+ */
+static mrb_value
+mrb_str_cmp_m(mrb_state *mrb, mrb_value str1)
+{
+  mrb_value str2;
+  mrb_int result;
+
+  mrb_get_args(mrb, "o", &str2);
+  if (!mrb_string_p(str2)) {
+    if (!mrb_respond_to(mrb, str2, mrb_intern_lit(mrb, "to_s"))) {
+      return mrb_nil_value();
+    }
+    else if (!mrb_respond_to(mrb, str2, mrb_intern_lit(mrb, "<=>"))) {
+      return mrb_nil_value();
+    }
+    else {
+      mrb_value tmp = mrb_funcall(mrb, str2, "<=>", 1, str1);
+
+      if (mrb_nil_p(tmp)) return mrb_nil_value();
+      if (!mrb_fixnum(tmp)) {
+        return mrb_funcall(mrb, mrb_fixnum_value(0), "-", 1, tmp);
+      }
+      result = -mrb_fixnum(tmp);
+    }
+  }
+  else {
+    result = mrb_str_cmp(mrb, str1, str2);
+  }
+  return mrb_fixnum_value(result);
+}
+
+static mrb_bool
+str_eql(mrb_state *mrb, const mrb_value str1, const mrb_value str2)
+{
+  const mrb_int len = RSTRING_LEN(str1);
+
+  if (len != RSTRING_LEN(str2)) return FALSE;
+  if (memcmp(RSTRING_PTR(str1), RSTRING_PTR(str2), (size_t)len) == 0)
+    return TRUE;
+  return FALSE;
+}
+
+MRB_API mrb_bool
+mrb_str_equal(mrb_state *mrb, mrb_value str1, mrb_value str2)
+{
+  if (mrb_immediate_p(str2)) return FALSE;
+  if (!mrb_string_p(str2)) {
+    if (mrb_nil_p(str2)) return FALSE;
+    if (!mrb_respond_to(mrb, str2, mrb_intern_lit(mrb, "to_str"))) {
+      return FALSE;
+    }
+    str2 = mrb_funcall(mrb, str2, "to_str", 0);
+    return mrb_equal(mrb, str2, str1);
+  }
+  return str_eql(mrb, str1, str2);
+}
+
+/* 15.2.10.5.4  */
+/*
+ *  call-seq:
+ *     str == obj   => true or false
+ *
+ *  Equality---
+ *  If <i>obj</i> is not a <code>String</code>, returns <code>false</code>.
+ *  Otherwise, returns <code>false</code> or <code>true</code>
+ *
+ *   caution:if <i>str</i> <code><=></code> <i>obj</i> returns zero.
+ */
+static mrb_value
+mrb_str_equal_m(mrb_state *mrb, mrb_value str1)
+{
+  mrb_value str2;
+
+  mrb_get_args(mrb, "o", &str2);
+
+  return mrb_bool_value(mrb_str_equal(mrb, str1, str2));
+}
+/* ---------------------------------- */
+MRB_API mrb_value
+mrb_str_to_str(mrb_state *mrb, mrb_value str)
+{
+  mrb_value s;
+
+  if (!mrb_string_p(str)) {
+    s = mrb_check_convert_type(mrb, str, MRB_TT_STRING, "String", "to_str");
+    if (mrb_nil_p(s)) {
+      s = mrb_convert_type(mrb, str, MRB_TT_STRING, "String", "to_s");
+    }
+    return s;
+  }
+  return str;
+}
+
+MRB_API const char*
+mrb_string_value_ptr(mrb_state *mrb, mrb_value ptr)
+{
+  mrb_value str = mrb_str_to_str(mrb, ptr);
+  return RSTRING_PTR(str);
+}
+
+void
+mrb_noregexp(mrb_state *mrb, mrb_value self)
+{
+  mrb_raise(mrb, E_NOTIMP_ERROR, "Regexp class not implemented");
+}
+
+void
+mrb_regexp_check(mrb_state *mrb, mrb_value obj)
+{
+  if (mrb_regexp_p(mrb, obj)) {
+    mrb_noregexp(mrb, obj);
+  }
+}
+
+MRB_API mrb_value
+mrb_str_dup(mrb_state *mrb, mrb_value str)
+{
+  struct RString *s = mrb_str_ptr(str);
+  struct RString *dup = str_new(mrb, 0, 0);
+
+  str_with_class(mrb, dup, str);
+  return str_replace(mrb, dup, s);
+}
+
+static mrb_value
+mrb_str_aref(mrb_state *mrb, mrb_value str, mrb_value indx)
+{
+  mrb_int idx;
+
+  mrb_regexp_check(mrb, indx);
+  switch (mrb_type(indx)) {
+    case MRB_TT_FIXNUM:
+      idx = mrb_fixnum(indx);
+
+num_index:
+      str = str_substr(mrb, str, idx, 1);
+      if (!mrb_nil_p(str) && RSTRING_LEN(str) == 0) return mrb_nil_value();
+      return str;
+
+    case MRB_TT_STRING:
+      if (str_index(mrb, str, indx, 0) != -1)
+        return mrb_str_dup(mrb, indx);
+      return mrb_nil_value();
+
+    case MRB_TT_RANGE:
+      /* check if indx is Range */
+      {
+        mrb_int beg, len;
+
+        len = RSTRING_CHAR_LEN(str);
+        if (mrb_range_beg_len(mrb, indx, &beg, &len, len)) {
+          return str_subseq(mrb, str, beg, len);
+        }
+        else {
+          return mrb_nil_value();
+        }
+      }
+    case MRB_TT_FLOAT:
+    default:
+      indx = mrb_Integer(mrb, indx);
+      if (mrb_nil_p(indx)) {
+        mrb_raise(mrb, E_TYPE_ERROR, "can't convert to Fixnum");
+      }
+      idx = mrb_fixnum(indx);
+      goto num_index;
+  }
+  return mrb_nil_value();    /* not reached */
+}
+
+/* 15.2.10.5.6  */
+/* 15.2.10.5.34 */
+/*
+ *  call-seq:
+ *     str[fixnum]                 => fixnum or nil
+ *     str[fixnum, fixnum]         => new_str or nil
+ *     str[range]                  => new_str or nil
+ *     str[regexp]                 => new_str or nil
+ *     str[regexp, fixnum]         => new_str or nil
+ *     str[other_str]              => new_str or nil
+ *     str.slice(fixnum)           => fixnum or nil
+ *     str.slice(fixnum, fixnum)   => new_str or nil
+ *     str.slice(range)            => new_str or nil
+ *     str.slice(other_str)        => new_str or nil
+ *
+ *  Element Reference---If passed a single <code>Fixnum</code>, returns the code
+ *  of the character at that position. If passed two <code>Fixnum</code>
+ *  objects, returns a substring starting at the offset given by the first, and
+ *  a length given by the second. If given a range, a substring containing
+ *  characters at offsets given by the range is returned. In all three cases, if
+ *  an offset is negative, it is counted from the end of <i>str</i>. Returns
+ *  <code>nil</code> if the initial offset falls outside the string, the length
+ *  is negative, or the beginning of the range is greater than the end.
+ *
+ *  If a <code>String</code> is given, that string is returned if it occurs in
+ *  <i>str</i>. In both cases, <code>nil</code> is returned if there is no
+ *  match.
+ *
+ *     a = "hello there"
+ *     a[1]                   #=> 101(1.8.7) "e"(1.9.2)
+ *     a[1.1]                 #=>            "e"(1.9.2)
+ *     a[1,3]                 #=> "ell"
+ *     a[1..3]                #=> "ell"
+ *     a[-3,2]                #=> "er"
+ *     a[-4..-2]              #=> "her"
+ *     a[12..-1]              #=> nil
+ *     a[-2..-4]              #=> ""
+ *     a["lo"]                #=> "lo"
+ *     a["bye"]               #=> nil
+ */
+static mrb_value
+mrb_str_aref_m(mrb_state *mrb, mrb_value str)
+{
+  mrb_value a1, a2;
+  int argc;
+
+  argc = mrb_get_args(mrb, "o|o", &a1, &a2);
+  if (argc == 2) {
+    mrb_regexp_check(mrb, a1);
+    return str_substr(mrb, str, mrb_fixnum(a1), mrb_fixnum(a2));
+  }
+  if (argc != 1) {
+    mrb_raisef(mrb, E_ARGUMENT_ERROR, "wrong number of arguments (%S for 1)", mrb_fixnum_value(argc));
+  }
+  return mrb_str_aref(mrb, str, a1);
+}
+
+/* 15.2.10.5.8  */
+/*
+ *  call-seq:
+ *     str.capitalize!   => str or nil
+ *
+ *  Modifies <i>str</i> by converting the first character to uppercase and the
+ *  remainder to lowercase. Returns <code>nil</code> if no changes are made.
+ *
+ *     a = "hello"
+ *     a.capitalize!   #=> "Hello"
+ *     a               #=> "Hello"
+ *     a.capitalize!   #=> nil
+ */
+static mrb_value
+mrb_str_capitalize_bang(mrb_state *mrb, mrb_value str)
+{
+  char *p, *pend;
+  mrb_bool modify = FALSE;
+  struct RString *s = mrb_str_ptr(str);
+
+  mrb_str_modify(mrb, s);
+  if (RSTR_LEN(s) == 0 || !RSTR_PTR(s)) return mrb_nil_value();
+  p = RSTR_PTR(s); pend = RSTR_PTR(s) + RSTR_LEN(s);
+  if (ISLOWER(*p)) {
+    *p = TOUPPER(*p);
+    modify = TRUE;
+  }
+  while (++p < pend) {
+    if (ISUPPER(*p)) {
+      *p = TOLOWER(*p);
+      modify = TRUE;
+    }
+  }
+  if (modify) return str;
+  return mrb_nil_value();
+}
+
+/* 15.2.10.5.7  */
+/*
+ *  call-seq:
+ *     str.capitalize   => new_str
+ *
+ *  Returns a copy of <i>str</i> with the first character converted to uppercase
+ *  and the remainder to lowercase.
+ *
+ *     "hello".capitalize    #=> "Hello"
+ *     "HELLO".capitalize    #=> "Hello"
+ *     "123ABC".capitalize   #=> "123abc"
+ */
+static mrb_value
+mrb_str_capitalize(mrb_state *mrb, mrb_value self)
+{
+  mrb_value str;
+
+  str = mrb_str_dup(mrb, self);
+  mrb_str_capitalize_bang(mrb, str);
+  return str;
+}
+
+/* 15.2.10.5.10  */
+/*
+ *  call-seq:
+ *     str.chomp!(separator="\n")   => str or nil
+ *
+ *  Modifies <i>str</i> in place as described for <code>String#chomp</code>,
+ *  returning <i>str</i>, or <code>nil</code> if no modifications were made.
+ */
+static mrb_value
+mrb_str_chomp_bang(mrb_state *mrb, mrb_value str)
+{
+  mrb_value rs;
+  mrb_int newline;
+  char *p, *pp;
+  mrb_int rslen;
+  mrb_int len;
+  struct RString *s = mrb_str_ptr(str);
+
+  mrb_str_modify(mrb, s);
+  len = RSTR_LEN(s);
+  if (mrb_get_args(mrb, "|S", &rs) == 0) {
+    if (len == 0) return mrb_nil_value();
+  smart_chomp:
+    if (RSTR_PTR(s)[len-1] == '\n') {
+      RSTR_SET_LEN(s, RSTR_LEN(s) - 1);
+      if (RSTR_LEN(s) > 0 &&
+          RSTR_PTR(s)[RSTR_LEN(s)-1] == '\r') {
+        RSTR_SET_LEN(s, RSTR_LEN(s) - 1);
+      }
+    }
+    else if (RSTR_PTR(s)[len-1] == '\r') {
+      RSTR_SET_LEN(s, RSTR_LEN(s) - 1);
+    }
+    else {
+      return mrb_nil_value();
+    }
+    RSTR_PTR(s)[RSTR_LEN(s)] = '\0';
+    return str;
+  }
+
+  if (len == 0 || mrb_nil_p(rs)) return mrb_nil_value();
+  p = RSTR_PTR(s);
+  rslen = RSTRING_LEN(rs);
+  if (rslen == 0) {
+    while (len>0 && p[len-1] == '\n') {
+      len--;
+      if (len>0 && p[len-1] == '\r')
+        len--;
+    }
+    if (len < RSTR_LEN(s)) {
+      RSTR_SET_LEN(s, len);
+      p[len] = '\0';
+      return str;
+    }
+    return mrb_nil_value();
+  }
+  if (rslen > len) return mrb_nil_value();
+  newline = RSTRING_PTR(rs)[rslen-1];
+  if (rslen == 1 && newline == '\n')
+    newline = RSTRING_PTR(rs)[rslen-1];
+  if (rslen == 1 && newline == '\n')
+    goto smart_chomp;
+
+  pp = p + len - rslen;
+  if (p[len-1] == newline &&
+     (rslen <= 1 ||
+     memcmp(RSTRING_PTR(rs), pp, rslen) == 0)) {
+    RSTR_SET_LEN(s, len - rslen);
+    p[RSTR_LEN(s)] = '\0';
+    return str;
+  }
+  return mrb_nil_value();
+}
+
+/* 15.2.10.5.9  */
+/*
+ *  call-seq:
+ *     str.chomp(separator="\n")   => new_str
+ *
+ *  Returns a new <code>String</code> with the given record separator removed
+ *  from the end of <i>str</i> (if present). If <code>$/</code> has not been
+ *  changed from the default Ruby record separator, then <code>chomp</code> also
+ *  removes carriage return characters (that is it will remove <code>\n</code>,
+ *  <code>\r</code>, and <code>\r\n</code>).
+ *
+ *     "hello".chomp            #=> "hello"
+ *     "hello\n".chomp          #=> "hello"
+ *     "hello\r\n".chomp        #=> "hello"
+ *     "hello\n\r".chomp        #=> "hello\n"
+ *     "hello\r".chomp          #=> "hello"
+ *     "hello \n there".chomp   #=> "hello \n there"
+ *     "hello".chomp("llo")     #=> "he"
+ */
+static mrb_value
+mrb_str_chomp(mrb_state *mrb, mrb_value self)
+{
+  mrb_value str;
+
+  str = mrb_str_dup(mrb, self);
+  mrb_str_chomp_bang(mrb, str);
+  return str;
+}
+
+/* 15.2.10.5.12 */
+/*
+ *  call-seq:
+ *     str.chop!   => str or nil
+ *
+ *  Processes <i>str</i> as for <code>String#chop</code>, returning <i>str</i>,
+ *  or <code>nil</code> if <i>str</i> is the empty string.  See also
+ *  <code>String#chomp!</code>.
+ */
+static mrb_value
+mrb_str_chop_bang(mrb_state *mrb, mrb_value str)
+{
+  struct RString *s = mrb_str_ptr(str);
+
+  mrb_str_modify(mrb, s);
+  if (RSTR_LEN(s) > 0) {
+    mrb_int len;
+#ifdef MRB_UTF8_STRING
+    const char* t = RSTR_PTR(s), *p = t;
+    const char* e = p + RSTR_LEN(s);
+    while (p<e) {
+      mrb_int clen = utf8len(p, e);
+      if (p + clen>=e) break;
+      p += clen;
+    }
+    len = p - t;
+#else
+    len = RSTR_LEN(s) - 1;
+#endif
+    if (RSTR_PTR(s)[len] == '\n') {
+      if (len > 0 &&
+          RSTR_PTR(s)[len-1] == '\r') {
+        len--;
+      }
+    }
+    RSTR_SET_LEN(s, len);
+    RSTR_PTR(s)[len] = '\0';
+    return str;
+  }
+  return mrb_nil_value();
+}
+
+/* 15.2.10.5.11 */
+/*
+ *  call-seq:
+ *     str.chop   => new_str
+ *
+ *  Returns a new <code>String</code> with the last character removed.  If the
+ *  string ends with <code>\r\n</code>, both characters are removed. Applying
+ *  <code>chop</code> to an empty string returns an empty
+ *  string. <code>String#chomp</code> is often a safer alternative, as it leaves
+ *  the string unchanged if it doesn't end in a record separator.
+ *
+ *     "string\r\n".chop   #=> "string"
+ *     "string\n\r".chop   #=> "string\n"
+ *     "string\n".chop     #=> "string"
+ *     "string".chop       #=> "strin"
+ *     "x".chop            #=> ""
+ */
+static mrb_value
+mrb_str_chop(mrb_state *mrb, mrb_value self)
+{
+  mrb_value str;
+  str = mrb_str_dup(mrb, self);
+  mrb_str_chop_bang(mrb, str);
+  return str;
+}
+
+/* 15.2.10.5.14 */
+/*
+ *  call-seq:
+ *     str.downcase!   => str or nil
+ *
+ *  Downcases the contents of <i>str</i>, returning <code>nil</code> if no
+ *  changes were made.
+ */
+static mrb_value
+mrb_str_downcase_bang(mrb_state *mrb, mrb_value str)
+{
+  char *p, *pend;
+  mrb_bool modify = FALSE;
+  struct RString *s = mrb_str_ptr(str);
+
+  mrb_str_modify(mrb, s);
+  p = RSTR_PTR(s);
+  pend = RSTR_PTR(s) + RSTR_LEN(s);
+  while (p < pend) {
+    if (ISUPPER(*p)) {
+      *p = TOLOWER(*p);
+      modify = TRUE;
+    }
+    p++;
+  }
+
+  if (modify) return str;
+  return mrb_nil_value();
+}
+
+/* 15.2.10.5.13 */
+/*
+ *  call-seq:
+ *     str.downcase   => new_str
+ *
+ *  Returns a copy of <i>str</i> with all uppercase letters replaced with their
+ *  lowercase counterparts. The operation is locale insensitive---only
+ *  characters 'A' to 'Z' are affected.
+ *
+ *     "hEllO".downcase   #=> "hello"
+ */
+static mrb_value
+mrb_str_downcase(mrb_state *mrb, mrb_value self)
+{
+  mrb_value str;
+
+  str = mrb_str_dup(mrb, self);
+  mrb_str_downcase_bang(mrb, str);
+  return str;
+}
+
+/* 15.2.10.5.16 */
+/*
+ *  call-seq:
+ *     str.empty?   => true or false
+ *
+ *  Returns <code>true</code> if <i>str</i> has a length of zero.
+ *
+ *     "hello".empty?   #=> false
+ *     "".empty?        #=> true
+ */
+static mrb_value
+mrb_str_empty_p(mrb_state *mrb, mrb_value self)
+{
+  struct RString *s = mrb_str_ptr(self);
+
+  return mrb_bool_value(RSTR_LEN(s) == 0);
+}
+
+/* 15.2.10.5.17 */
+/*
+ * call-seq:
+ *   str.eql?(other)   => true or false
+ *
+ * Two strings are equal if the have the same length and content.
+ */
+static mrb_value
+mrb_str_eql(mrb_state *mrb, mrb_value self)
+{
+  mrb_value str2;
+  mrb_bool eql_p;
+
+  mrb_get_args(mrb, "o", &str2);
+  eql_p = (mrb_type(str2) == MRB_TT_STRING) && str_eql(mrb, self, str2);
+
+  return mrb_bool_value(eql_p);
+}
+
+MRB_API mrb_value
+mrb_str_substr(mrb_state *mrb, mrb_value str, mrb_int beg, mrb_int len)
+{
+  return str_substr(mrb, str, beg, len);
+}
+
+mrb_int
+mrb_str_hash(mrb_state *mrb, mrb_value str)
+{
+  /* 1-8-7 */
+  struct RString *s = mrb_str_ptr(str);
+  mrb_int len = RSTR_LEN(s);
+  char *p = RSTR_PTR(s);
+  mrb_int key = 0;
+
+  while (len--) {
+    key = key*65599 + *p;
+    p++;
+  }
+  return key + (key>>5);
+}
+
+/* 15.2.10.5.20 */
+/*
+ * call-seq:
+ *    str.hash   => fixnum
+ *
+ * Return a hash based on the string's length and content.
+ */
+static mrb_value
+mrb_str_hash_m(mrb_state *mrb, mrb_value self)
+{
+  mrb_int key = mrb_str_hash(mrb, self);
+  return mrb_fixnum_value(key);
+}
+
+/* 15.2.10.5.21 */
+/*
+ *  call-seq:
+ *     str.include? other_str   => true or false
+ *     str.include? fixnum      => true or false
+ *
+ *  Returns <code>true</code> if <i>str</i> contains the given string or
+ *  character.
+ *
+ *     "hello".include? "lo"   #=> true
+ *     "hello".include? "ol"   #=> false
+ *     "hello".include? ?h     #=> true
+ */
+static mrb_value
+mrb_str_include(mrb_state *mrb, mrb_value self)
+{
+  mrb_int i;
+  mrb_value str2;
+  mrb_bool include_p;
+
+  mrb_get_args(mrb, "o", &str2);
+  if (mrb_fixnum_p(str2)) {
+    include_p = (memchr(RSTRING_PTR(self), mrb_fixnum(str2), RSTRING_LEN(self)) != NULL);
+  }
+  else {
+    str2 = mrb_str_to_str(mrb, str2);
+    i = str_index(mrb, self, str2, 0);
+
+    include_p = (i != -1);
+  }
+
+  return mrb_bool_value(include_p);
+}
+
+/* 15.2.10.5.22 */
+/*
+ *  call-seq:
+ *     str.index(substring [, offset])   => fixnum or nil
+ *     str.index(fixnum [, offset])      => fixnum or nil
+ *     str.index(regexp [, offset])      => fixnum or nil
+ *
+ *  Returns the index of the first occurrence of the given
+ *  <i>substring</i>,
+ *  character (<i>fixnum</i>), or pattern (<i>regexp</i>) in <i>str</i>.
+ *  Returns
+ *  <code>nil</code> if not found.
+ *  If the second parameter is present, it
+ *  specifies the position in the string to begin the search.
+ *
+ *     "hello".index('e')             #=> 1
+ *     "hello".index('lo')            #=> 3
+ *     "hello".index('a')             #=> nil
+ *     "hello".index(101)             #=> 1(101=0x65='e')
+ *     "hello".index(/[aeiou]/, -3)   #=> 4
+ */
+static mrb_value
+mrb_str_index(mrb_state *mrb, mrb_value str)
+{
+  mrb_value *argv;
+  mrb_int argc;
+  mrb_value sub;
+  mrb_int pos, clen;
+
+  mrb_get_args(mrb, "*", &argv, &argc);
+  if (argc == 2) {
+    pos = mrb_fixnum(argv[1]);
+    sub = argv[0];
+  }
+  else {
+    pos = 0;
+    if (argc > 0)
+      sub = argv[0];
+    else
+      sub = mrb_nil_value();
+  }
+  mrb_regexp_check(mrb, sub);
+  clen = RSTRING_CHAR_LEN(str);
+  if (pos < 0) {
+    pos += clen;
+    if (pos < 0) {
+      return mrb_nil_value();
+    }
+  }
+  if (pos >= clen) return mrb_nil_value();
+  pos = chars2bytes(str, 0, pos);
+
+  switch (mrb_type(sub)) {
+    default: {
+      mrb_value tmp;
+
+      tmp = mrb_check_string_type(mrb, sub);
+      if (mrb_nil_p(tmp)) {
+        mrb_raisef(mrb, E_TYPE_ERROR, "type mismatch: %S given", sub);
+      }
+      sub = tmp;
+    }
+    /* fall through */
+    case MRB_TT_STRING:
+      pos = str_index(mrb, str, sub, pos);
+      break;
+  }
+
+  if (pos == -1) return mrb_nil_value();
+  pos = bytes2chars(RSTRING_PTR(str), pos);
+  return mrb_fixnum_value(pos);
+}
+
+#define STR_REPLACE_SHARED_MIN 10
+
+/* 15.2.10.5.24 */
+/* 15.2.10.5.28 */
+/*
+ *  call-seq:
+ *     str.replace(other_str)   => str
+ *
+ *     s = "hello"         #=> "hello"
+ *     s.replace "world"   #=> "world"
+ */
+static mrb_value
+mrb_str_replace(mrb_state *mrb, mrb_value str)
+{
+  mrb_value str2;
+
+  mrb_get_args(mrb, "S", &str2);
+  return str_replace(mrb, mrb_str_ptr(str), mrb_str_ptr(str2));
+}
+
+/* 15.2.10.5.23 */
+/*
+ *  call-seq:
+ *     String.new(str="")   => new_str
+ *
+ *  Returns a new string object containing a copy of <i>str</i>.
+ */
+static mrb_value
+mrb_str_init(mrb_state *mrb, mrb_value self)
+{
+  mrb_value str2;
+
+  if (mrb_get_args(mrb, "|S", &str2) == 1) {
+    str_replace(mrb, mrb_str_ptr(self), mrb_str_ptr(str2));
+  }
+  return self;
+}
+
+/* 15.2.10.5.25 */
+/* 15.2.10.5.41 */
+/*
+ *  call-seq:
+ *     str.intern   => symbol
+ *     str.to_sym   => symbol
+ *
+ *  Returns the <code>Symbol</code> corresponding to <i>str</i>, creating the
+ *  symbol if it did not previously exist. See <code>Symbol#id2name</code>.
+ *
+ *     "Koala".intern         #=> :Koala
+ *     s = 'cat'.to_sym       #=> :cat
+ *     s == :cat              #=> true
+ *     s = '@cat'.to_sym      #=> :@cat
+ *     s == :@cat             #=> true
+ *
+ *  This can also be used to create symbols that cannot be represented using the
+ *  <code>:xxx</code> notation.
+ *
+ *     'cat and dog'.to_sym   #=> :"cat and dog"
+ */
+MRB_API mrb_value
+mrb_str_intern(mrb_state *mrb, mrb_value self)
+{
+  return mrb_symbol_value(mrb_intern_str(mrb, self));
+}
+/* ---------------------------------- */
+MRB_API mrb_value
+mrb_obj_as_string(mrb_state *mrb, mrb_value obj)
+{
+  mrb_value str;
+
+  if (mrb_string_p(obj)) {
+    return obj;
+  }
+  str = mrb_funcall(mrb, obj, "to_s", 0);
+  if (!mrb_string_p(str))
+    return mrb_any_to_s(mrb, obj);
+  return str;
+}
+
+MRB_API mrb_value
+mrb_ptr_to_str(mrb_state *mrb, void *p)
+{
+  struct RString *p_str;
+  char *p1;
+  char *p2;
+  uintptr_t n = (uintptr_t)p;
+
+  p_str = str_new(mrb, NULL, 2 + sizeof(uintptr_t) * CHAR_BIT / 4);
+  p1 = RSTR_PTR(p_str);
+  *p1++ = '0';
+  *p1++ = 'x';
+  p2 = p1;
+
+  do {
+    *p2++ = mrb_digitmap[n % 16];
+    n /= 16;
+  } while (n > 0);
+  *p2 = '\0';
+  RSTR_SET_LEN(p_str, (mrb_int)(p2 - RSTR_PTR(p_str)));
+
+  while (p1 < p2) {
+    const char  c = *p1;
+    *p1++ = *--p2;
+    *p2 = c;
+  }
+
+  return mrb_obj_value(p_str);
+}
+
+MRB_API mrb_value
+mrb_string_type(mrb_state *mrb, mrb_value str)
+{
+  return mrb_convert_type(mrb, str, MRB_TT_STRING, "String", "to_str");
+}
+
+MRB_API mrb_value
+mrb_check_string_type(mrb_state *mrb, mrb_value str)
+{
+  return mrb_check_convert_type(mrb, str, MRB_TT_STRING, "String", "to_str");
+}
+
+/* 15.2.10.5.30 */
+/*
+ *  call-seq:
+ *     str.reverse!   => str
+ *
+ *  Reverses <i>str</i> in place.
+ */
+static mrb_value
+mrb_str_reverse_bang(mrb_state *mrb, mrb_value str)
+{
+#ifdef MRB_UTF8_STRING
+  mrb_int utf8_len = RSTRING_CHAR_LEN(str);
+  mrb_int len = RSTRING_LEN(str);
+
+  if (utf8_len == len) goto bytes;
+  if (utf8_len > 1) {
+    char *buf;
+    char *p, *e, *r;
+
+    mrb_str_modify(mrb, mrb_str_ptr(str));
+    len = RSTRING_LEN(str);
+    buf = mrb_malloc(mrb, (size_t)len);
+    p = buf;
+    e = buf + len;
+
+    memcpy(buf, RSTRING_PTR(str), len);
+    r = RSTRING_PTR(str) + len;
+
+    while (p<e) {
+      mrb_int clen = utf8len(p, e);
+      r -= clen;
+      memcpy(r, p, clen);
+      p += clen;
+    }
+    mrb_free(mrb, buf);
+  }
+  return str;
+
+ bytes:
+#endif
+  {
+    struct RString *s = mrb_str_ptr(str);
+    char *p, *e;
+    char c;
+
+    mrb_str_modify(mrb, s);
+    if (RSTR_LEN(s) > 1) {
+      p = RSTR_PTR(s);
+      e = p + RSTR_LEN(s) - 1;
+      while (p < e) {
+      c = *p;
+      *p++ = *e;
+      *e-- = c;
+      }
+    }
+    return str;
+  }
+}
+
+/* ---------------------------------- */
+/* 15.2.10.5.29 */
+/*
+ *  call-seq:
+ *     str.reverse   => new_str
+ *
+ *  Returns a new string with the characters from <i>str</i> in reverse order.
+ *
+ *     "stressed".reverse   #=> "desserts"
+ */
+static mrb_value
+mrb_str_reverse(mrb_state *mrb, mrb_value str)
+{
+  mrb_value str2 = mrb_str_dup(mrb, str);
+  mrb_str_reverse_bang(mrb, str2);
+  return str2;
+}
+
+/* 15.2.10.5.31 */
+/*
+ *  call-seq:
+ *     str.rindex(substring [, fixnum])   => fixnum or nil
+ *     str.rindex(fixnum [, fixnum])   => fixnum or nil
+ *     str.rindex(regexp [, fixnum])   => fixnum or nil
+ *
+ *  Returns the index of the last occurrence of the given <i>substring</i>,
+ *  character (<i>fixnum</i>), or pattern (<i>regexp</i>) in <i>str</i>. Returns
+ *  <code>nil</code> if not found. If the second parameter is present, it
+ *  specifies the position in the string to end the search---characters beyond
+ *  this point will not be considered.
+ *
+ *     "hello".rindex('e')             #=> 1
+ *     "hello".rindex('l')             #=> 3
+ *     "hello".rindex('a')             #=> nil
+ *     "hello".rindex(101)             #=> 1
+ *     "hello".rindex(/[aeiou]/, -2)   #=> 1
+ */
+static mrb_value
+mrb_str_rindex(mrb_state *mrb, mrb_value str)
+{
+  mrb_value *argv;
+  mrb_int argc;
+  mrb_value sub;
+  mrb_value vpos;
+  mrb_int pos, len = RSTRING_CHAR_LEN(str);
+
+  mrb_get_args(mrb, "*", &argv, &argc);
+  if (argc == 2) {
+    sub = argv[0];
+    vpos = argv[1];
+    pos = mrb_fixnum(vpos);
+    if (pos < 0) {
+      pos += len;
+      if (pos < 0) {
+        mrb_regexp_check(mrb, sub);
+        return mrb_nil_value();
+      }
+    }
+    if (pos > len) pos = len;
+  }
+  else {
+    pos = len;
+    if (argc > 0)
+      sub = argv[0];
+    else
+      sub = mrb_nil_value();
+  }
+  pos = chars2bytes(str, 0, pos);
+  len = chars2bytes(str, pos, len);
+  mrb_regexp_check(mrb, sub);
+
+  switch (mrb_type(sub)) {
+    default: {
+      mrb_value tmp;
+
+      tmp = mrb_check_string_type(mrb, sub);
+      if (mrb_nil_p(tmp)) {
+        mrb_raisef(mrb, E_TYPE_ERROR, "type mismatch: %S given", sub);
+      }
+      sub = tmp;
+    }
+     /* fall through */
+    case MRB_TT_STRING:
+      pos = str_rindex(mrb, str, sub, pos);
+      if (pos >= 0) {
+        pos = bytes2chars(RSTRING_PTR(str), pos);
+        return mrb_fixnum_value(pos);
+      }
+      break;
+
+  } /* end of switch (TYPE(sub)) */
+  return mrb_nil_value();
+}
+
+/* 15.2.10.5.35 */
+
+/*
+ *  call-seq:
+ *     str.split(pattern="\n", [limit])   => anArray
+ *
+ *  Divides <i>str</i> into substrings based on a delimiter, returning an array
+ *  of these substrings.
+ *
+ *  If <i>pattern</i> is a <code>String</code>, then its contents are used as
+ *  the delimiter when splitting <i>str</i>. If <i>pattern</i> is a single
+ *  space, <i>str</i> is split on whitespace, with leading whitespace and runs
+ *  of contiguous whitespace characters ignored.
+ *
+ *  If <i>pattern</i> is a <code>Regexp</code>, <i>str</i> is divided where the
+ *  pattern matches. Whenever the pattern matches a zero-length string,
+ *  <i>str</i> is split into individual characters.
+ *
+ *  If <i>pattern</i> is omitted, the value of <code>$;</code> is used.  If
+ *  <code>$;</code> is <code>nil</code> (which is the default), <i>str</i> is
+ *  split on whitespace as if ' ' were specified.
+ *
+ *  If the <i>limit</i> parameter is omitted, trailing null fields are
+ *  suppressed. If <i>limit</i> is a positive number, at most that number of
+ *  fields will be returned (if <i>limit</i> is <code>1</code>, the entire
+ *  string is returned as the only entry in an array). If negative, there is no
+ *  limit to the number of fields returned, and trailing null fields are not
+ *  suppressed.
+ *
+ *     " now's  the time".split        #=> ["now's", "the", "time"]
+ *     " now's  the time".split(' ')   #=> ["now's", "the", "time"]
+ *     " now's  the time".split(/ /)   #=> ["", "now's", "", "the", "time"]
+ *     "hello".split(//)               #=> ["h", "e", "l", "l", "o"]
+ *     "hello".split(//, 3)            #=> ["h", "e", "llo"]
+ *
+ *     "mellow yellow".split("ello")   #=> ["m", "w y", "w"]
+ *     "1,2,,3,4,,".split(',')         #=> ["1", "2", "", "3", "4"]
+ *     "1,2,,3,4,,".split(',', 4)      #=> ["1", "2", "", "3,4,,"]
+ *     "1,2,,3,4,,".split(',', -4)     #=> ["1", "2", "", "3", "4", "", ""]
+ */
+
+static mrb_value
+mrb_str_split_m(mrb_state *mrb, mrb_value str)
+{
+  int argc;
+  mrb_value spat = mrb_nil_value();
+  enum {awk, string, regexp} split_type = string;
+  long i = 0, lim_p;
+  mrb_int beg;
+  mrb_int end;
+  mrb_int lim = 0;
+  mrb_value result, tmp;
+
+  argc = mrb_get_args(mrb, "|oi", &spat, &lim);
+  lim_p = (lim > 0 && argc == 2);
+  if (argc == 2) {
+    if (lim == 1) {
+      if (RSTRING_LEN(str) == 0)
+        return mrb_ary_new_capa(mrb, 0);
+      return mrb_ary_new_from_values(mrb, 1, &str);
+    }
+    i = 1;
+  }
+
+  if (argc == 0 || mrb_nil_p(spat)) {
+    split_type = awk;
+  }
+  else {
+    if (mrb_string_p(spat)) {
+      split_type = string;
+      if (RSTRING_LEN(spat) == 1 && RSTRING_PTR(spat)[0] == ' ') {
+          split_type = awk;
+      }
+    }
+    else {
+      mrb_noregexp(mrb, str);
+    }
+  }
+
+  result = mrb_ary_new(mrb);
+  beg = 0;
+  if (split_type == awk) {
+    mrb_bool skip = TRUE;
+    mrb_int idx = 0;
+    mrb_int str_len = RSTRING_LEN(str);
+    unsigned int c;
+    int ai = mrb_gc_arena_save(mrb);
+
+    idx = end = beg;
+    while (idx < str_len) {
+      c = (unsigned char)RSTRING_PTR(str)[idx++];
+      if (skip) {
+        if (ISSPACE(c)) {
+          beg = idx;
+        }
+        else {
+          end = idx;
+          skip = FALSE;
+          if (lim_p && lim <= i) break;
+        }
+      }
+      else if (ISSPACE(c)) {
+        mrb_ary_push(mrb, result, byte_subseq(mrb, str, beg, end-beg));
+        mrb_gc_arena_restore(mrb, ai);
+        skip = TRUE;
+        beg = idx;
+        if (lim_p) ++i;
+      }
+      else {
+        end = idx;
+      }
+    }
+  }
+  else if (split_type == string) {
+    mrb_int str_len = RSTRING_LEN(str);
+    mrb_int pat_len = RSTRING_LEN(spat);
+    mrb_int idx = 0;
+    int ai = mrb_gc_arena_save(mrb);
+
+    while (idx < str_len) {
+      if (pat_len > 0) {
+        end = mrb_memsearch(RSTRING_PTR(spat), pat_len, RSTRING_PTR(str)+idx, str_len - idx);
+        if (end < 0) break;
+      } else {
+        end = chars2bytes(str, idx, 1);
+      }
+      mrb_ary_push(mrb, result, byte_subseq(mrb, str, idx, end));
+      mrb_gc_arena_restore(mrb, ai);
+      idx += end + pat_len;
+      if (lim_p && lim <= ++i) break;
+    }
+    beg = idx;
+  }
+  else {
+    mrb_noregexp(mrb, str);
+  }
+  if (RSTRING_LEN(str) > 0 && (lim_p || RSTRING_LEN(str) > beg || lim < 0)) {
+    if (RSTRING_LEN(str) == beg) {
+      tmp = mrb_str_new_empty(mrb, str);
+    }
+    else {
+      tmp = byte_subseq(mrb, str, beg, RSTRING_LEN(str)-beg);
+    }
+    mrb_ary_push(mrb, result, tmp);
+  }
+  if (!lim_p && lim == 0) {
+    mrb_int len;
+    while ((len = RARRAY_LEN(result)) > 0 &&
+           (tmp = RARRAY_PTR(result)[len-1], RSTRING_LEN(tmp) == 0))
+      mrb_ary_pop(mrb, result);
+  }
+
+  return result;
+}
+
+MRB_API mrb_value
+mrb_cstr_to_inum(mrb_state *mrb, const char *str, int base, int badcheck)
+{
+  const char *p;
+  char sign = 1;
+  int c, uscore;
+  uint64_t n = 0;
+  mrb_int val;
+
+#define conv_digit(c) \
+    (ISDIGIT(c) ? ((c) - '0') : \
+     ISLOWER(c) ? ((c) - 'a' + 10) : \
+     ISUPPER(c) ? ((c) - 'A' + 10) : \
+     -1)
+
+  if (!str) {
+    if (badcheck) goto bad;
+    return mrb_fixnum_value(0);
+  }
+  while (ISSPACE(*str)) str++;
+
+  if (str[0] == '+') {
+    str++;
+  }
+  else if (str[0] == '-') {
+    str++;
+    sign = 0;
+  }
+  if (str[0] == '+' || str[0] == '-') {
+    if (badcheck) goto bad;
+    return mrb_fixnum_value(0);
+  }
+  if (base <= 0) {
+    if (str[0] == '0') {
+      switch (str[1]) {
+        case 'x': case 'X':
+          base = 16;
+          break;
+        case 'b': case 'B':
+          base = 2;
+          break;
+        case 'o': case 'O':
+          base = 8;
+          break;
+        case 'd': case 'D':
+          base = 10;
+          break;
+        default:
+          base = 8;
+      }
+    }
+    else if (base < -1) {
+      base = -base;
+    }
+    else {
+      base = 10;
+    }
+  }
+  switch (base) {
+    case 2:
+      if (str[0] == '0' && (str[1] == 'b'||str[1] == 'B')) {
+        str += 2;
+      }
+      break;
+    case 3:
+      break;
+    case 8:
+      if (str[0] == '0' && (str[1] == 'o'||str[1] == 'O')) {
+        str += 2;
+      }
+    case 4: case 5: case 6: case 7:
+      break;
+    case 10:
+      if (str[0] == '0' && (str[1] == 'd'||str[1] == 'D')) {
+        str += 2;
+      }
+    case 9: case 11: case 12: case 13: case 14: case 15:
+      break;
+    case 16:
+      if (str[0] == '0' && (str[1] == 'x'||str[1] == 'X')) {
+        str += 2;
+      }
+      break;
+    default:
+      if (base < 2 || 36 < base) {
+        mrb_raisef(mrb, E_ARGUMENT_ERROR, "illegal radix %S", mrb_fixnum_value(base));
+      }
+      break;
+  } /* end of switch (base) { */
+  if (*str == '0') {    /* squeeze preceding 0s */
+    uscore = 0;
+    while ((c = *++str) == '0' || c == '_') {
+      if (c == '_') {
+        if (++uscore >= 2)
+          break;
+      }
+      else
+        uscore = 0;
+    }
+    if (!(c = *str) || ISSPACE(c)) --str;
+  }
+  c = *str;
+  c = conv_digit(c);
+  if (c < 0 || c >= base) {
+    if (badcheck) goto bad;
+    return mrb_fixnum_value(0);
+  }
+
+  uscore = 0;
+  for (p=str;*p;p++) {
+    if (*p == '_') {
+      if (uscore == 0) {
+        uscore++;
+        continue;
+      }
+      if (badcheck) goto bad;
+      break;
+    }
+    uscore = 0;
+    c = conv_digit(*p);
+    if (c < 0 || c >= base) {
+      if (badcheck) goto bad;
+      break;
+    }
+    n *= base;
+    n += c;
+    if (n > MRB_INT_MAX) {
+      mrb_raisef(mrb, E_ARGUMENT_ERROR, "string (%S) too big for integer", mrb_str_new_cstr(mrb, str));
+    }
+  }
+  val = n;
+  if (badcheck) {
+    if (p == str) goto bad; /* no number */
+    while (*p && ISSPACE(*p)) p++;
+    if (*p) goto bad;           /* trailing garbage */
+  }
+
+  return mrb_fixnum_value(sign ? val : -val);
+bad:
+  mrb_raisef(mrb, E_ARGUMENT_ERROR, "invalid string for number(%S)", mrb_str_new_cstr(mrb, str));
+  /* not reached */
+  return mrb_fixnum_value(0);
+}
+
+MRB_API const char*
+mrb_string_value_cstr(mrb_state *mrb, mrb_value *ptr)
+{
+  mrb_value str = mrb_str_to_str(mrb, *ptr);
+  struct RString *ps = mrb_str_ptr(str);
+  mrb_int len = mrb_str_strlen(mrb, ps);
+  char *p = RSTR_PTR(ps);
+
+  if (!p || p[len] != '\0') {
+    mrb_str_modify(mrb, ps);
+    return RSTR_PTR(ps);
+  }
+  return p;
+}
+
+MRB_API mrb_value
+mrb_str_to_inum(mrb_state *mrb, mrb_value str, mrb_int base, mrb_bool badcheck)
+{
+  const char *s;
+  mrb_int len;
+
+  if (badcheck) {
+    /* Raises if the string contains a null character (the badcheck) */
+    s = mrb_string_value_cstr(mrb, &str);
+  }
+  else {
+    s = mrb_string_value_ptr(mrb, str);
+  }
+  if (s) {
+    len = RSTRING_LEN(str);
+    if (s[len]) {    /* no sentinel somehow */
+      struct RString *temp_str = str_new(mrb, s, len);
+      s = RSTR_PTR(temp_str);
+    }
+  }
+  return mrb_cstr_to_inum(mrb, s, base, badcheck);
+}
+
+/* 15.2.10.5.38 */
+/*
+ *  call-seq:
+ *     str.to_i(base=10)   => integer
+ *
+ *  Returns the result of interpreting leading characters in <i>str</i> as an
+ *  integer base <i>base</i> (between 2 and 36). Extraneous characters past the
+ *  end of a valid number are ignored. If there is not a valid number at the
+ *  start of <i>str</i>, <code>0</code> is returned. This method never raises an
+ *  exception.
+ *
+ *     "12345".to_i             #=> 12345
+ *     "99 red balloons".to_i   #=> 99
+ *     "0a".to_i                #=> 0
+ *     "0a".to_i(16)            #=> 10
+ *     "hello".to_i             #=> 0
+ *     "1100101".to_i(2)        #=> 101
+ *     "1100101".to_i(8)        #=> 294977
+ *     "1100101".to_i(10)       #=> 1100101
+ *     "1100101".to_i(16)       #=> 17826049
+ */
+static mrb_value
+mrb_str_to_i(mrb_state *mrb, mrb_value self)
+{
+  mrb_int base = 10;
+
+  mrb_get_args(mrb, "|i", &base);
+  if (base < 0) {
+    mrb_raisef(mrb, E_ARGUMENT_ERROR, "illegal radix %S", mrb_fixnum_value(base));
+  }
+  return mrb_str_to_inum(mrb, self, base, FALSE);
+}
+
+MRB_API double
+mrb_cstr_to_dbl(mrb_state *mrb, const char * p, mrb_bool badcheck)
+{
+  char *end;
+  char buf[DBL_DIG * 4 + 10];
+  double d;
+
+  enum {max_width = 20};
+
+  if (!p) return 0.0;
+  while (ISSPACE(*p)) p++;
+
+  if (!badcheck && p[0] == '0' && (p[1] == 'x' || p[1] == 'X')) {
+    return 0.0;
+  }
+  d = strtod(p, &end);
+  if (p == end) {
+    if (badcheck) {
+bad:
+      mrb_raisef(mrb, E_ARGUMENT_ERROR, "invalid string for float(%S)", mrb_str_new_cstr(mrb, p));
+      /* not reached */
+    }
+    return d;
+  }
+  if (*end) {
+    char *n = buf;
+    char *e = buf + sizeof(buf) - 1;
+    char prev = 0;
+
+    while (p < end && n < e) prev = *n++ = *p++;
+    while (*p) {
+      if (*p == '_') {
+        /* remove underscores between digits */
+        if (badcheck) {
+          if (n == buf || !ISDIGIT(prev)) goto bad;
+          ++p;
+          if (!ISDIGIT(*p)) goto bad;
+        }
+        else {
+          while (*++p == '_');
+          continue;
+        }
+      }
+      prev = *p++;
+      if (n < e) *n++ = prev;
+    }
+    *n = '\0';
+    p = buf;
+
+    if (!badcheck && p[0] == '0' && (p[1] == 'x' || p[1] == 'X')) {
+      return 0.0;
+    }
+
+    d = strtod(p, &end);
+    if (badcheck) {
+      if (!end || p == end) goto bad;
+      while (*end && ISSPACE(*end)) end++;
+      if (*end) goto bad;
+    }
+  }
+  return d;
+}
+
+MRB_API double
+mrb_str_to_dbl(mrb_state *mrb, mrb_value str, mrb_bool badcheck)
+{
+  char *s;
+  mrb_int len;
+
+  str = mrb_str_to_str(mrb, str);
+  s = RSTRING_PTR(str);
+  len = RSTRING_LEN(str);
+  if (s) {
+    if (badcheck && memchr(s, '\0', len)) {
+      mrb_raise(mrb, E_ARGUMENT_ERROR, "string for Float contains null byte");
+    }
+    if (s[len]) {    /* no sentinel somehow */
+      struct RString *temp_str = str_new(mrb, s, len);
+      s = RSTR_PTR(temp_str);
+    }
+  }
+  return mrb_cstr_to_dbl(mrb, s, badcheck);
+}
+
+/* 15.2.10.5.39 */
+/*
+ *  call-seq:
+ *     str.to_f   => float
+ *
+ *  Returns the result of interpreting leading characters in <i>str</i> as a
+ *  floating point number. Extraneous characters past the end of a valid number
+ *  are ignored. If there is not a valid number at the start of <i>str</i>,
+ *  <code>0.0</code> is returned. This method never raises an exception.
+ *
+ *     "123.45e1".to_f        #=> 1234.5
+ *     "45.67 degrees".to_f   #=> 45.67
+ *     "thx1138".to_f         #=> 0.0
+ */
+static mrb_value
+mrb_str_to_f(mrb_state *mrb, mrb_value self)
+{
+  return mrb_float_value(mrb, mrb_str_to_dbl(mrb, self, FALSE));
+}
+
+/* 15.2.10.5.40 */
+/*
+ *  call-seq:
+ *     str.to_s     => str
+ *     str.to_str   => str
+ *
+ *  Returns the receiver.
+ */
+static mrb_value
+mrb_str_to_s(mrb_state *mrb, mrb_value self)
+{
+  if (mrb_obj_class(mrb, self) != mrb->string_class) {
+    return mrb_str_dup(mrb, self);
+  }
+  return self;
+}
+
+/* 15.2.10.5.43 */
+/*
+ *  call-seq:
+ *     str.upcase!   => str or nil
+ *
+ *  Upcases the contents of <i>str</i>, returning <code>nil</code> if no changes
+ *  were made.
+ */
+static mrb_value
+mrb_str_upcase_bang(mrb_state *mrb, mrb_value str)
+{
+  struct RString *s = mrb_str_ptr(str);
+  char *p, *pend;
+  mrb_bool modify = FALSE;
+
+  mrb_str_modify(mrb, s);
+  p = RSTRING_PTR(str);
+  pend = RSTRING_END(str);
+  while (p < pend) {
+    if (ISLOWER(*p)) {
+      *p = TOUPPER(*p);
+      modify = TRUE;
+    }
+    p++;
+  }
+
+  if (modify) return str;
+  return mrb_nil_value();
+}
+
+/* 15.2.10.5.42 */
+/*
+ *  call-seq:
+ *     str.upcase   => new_str
+ *
+ *  Returns a copy of <i>str</i> with all lowercase letters replaced with their
+ *  uppercase counterparts. The operation is locale insensitive---only
+ *  characters 'a' to 'z' are affected.
+ *
+ *     "hEllO".upcase   #=> "HELLO"
+ */
+static mrb_value
+mrb_str_upcase(mrb_state *mrb, mrb_value self)
+{
+  mrb_value str;
+
+  str = mrb_str_dup(mrb, self);
+  mrb_str_upcase_bang(mrb, str);
+  return str;
+}
+
+#define IS_EVSTR(p,e) ((p) < (e) && (*(p) == '$' || *(p) == '@' || *(p) == '{'))
+
+/*
+ *  call-seq:
+ *     str.dump   -> new_str
+ *
+ *  Produces a version of <i>str</i> with all nonprinting characters replaced by
+ *  <code>\nnn</code> notation and all special characters escaped.
+ */
+mrb_value
+mrb_str_dump(mrb_state *mrb, mrb_value str)
+{
+  mrb_int len;
+  const char *p, *pend;
+  char *q;
+  struct RString *result;
+
+  len = 2;                  /* "" */
+  p = RSTRING_PTR(str); pend = p + RSTRING_LEN(str);
+  while (p < pend) {
+    unsigned char c = *p++;
+    switch (c) {
+      case '"':  case '\\':
+      case '\n': case '\r':
+      case '\t': case '\f':
+      case '\013': case '\010': case '\007': case '\033':
+        len += 2;
+        break;
+
+      case '#':
+        len += IS_EVSTR(p, pend) ? 2 : 1;
+        break;
+
+      default:
+        if (ISPRINT(c)) {
+          len++;
+        }
+        else {
+          len += 4;                /* \NNN */
+        }
+        break;
+    }
+  }
+
+  result = str_new(mrb, 0, len);
+  str_with_class(mrb, result, str);
+  p = RSTRING_PTR(str); pend = p + RSTRING_LEN(str);
+  q = RSTR_PTR(result);
+  *q++ = '"';
+  while (p < pend) {
+    unsigned char c = *p++;
+
+    switch (c) {
+      case '"':
+      case '\\':
+        *q++ = '\\';
+        *q++ = c;
+        break;
+
+      case '\n':
+        *q++ = '\\';
+        *q++ = 'n';
+        break;
+
+      case '\r':
+        *q++ = '\\';
+        *q++ = 'r';
+        break;
+
+      case '\t':
+        *q++ = '\\';
+        *q++ = 't';
+        break;
+
+      case '\f':
+        *q++ = '\\';
+        *q++ = 'f';
+        break;
+
+      case '\013':
+        *q++ = '\\';
+        *q++ = 'v';
+        break;
+
+      case '\010':
+        *q++ = '\\';
+        *q++ = 'b';
+        break;
+
+      case '\007':
+        *q++ = '\\';
+        *q++ = 'a';
+        break;
+
+      case '\033':
+        *q++ = '\\';
+        *q++ = 'e';
+        break;
+
+      case '#':
+        if (IS_EVSTR(p, pend)) *q++ = '\\';
+        *q++ = '#';
+        break;
+
+      default:
+        if (ISPRINT(c)) {
+          *q++ = c;
+        }
+        else {
+          *q++ = '\\';
+          q[2] = '0' + c % 8; c /= 8;
+          q[1] = '0' + c % 8; c /= 8;
+          q[0] = '0' + c % 8;
+          q += 3;
+        }
+    }
+  }
+  *q = '"';
+  return mrb_obj_value(result);
+}
+
+MRB_API mrb_value
+mrb_str_cat(mrb_state *mrb, mrb_value str, const char *ptr, size_t len)
+{
+  str_buf_cat(mrb, mrb_str_ptr(str), ptr, len);
+  return str;
+}
+
+MRB_API mrb_value
+mrb_str_cat_cstr(mrb_state *mrb, mrb_value str, const char *ptr)
+{
+  return mrb_str_cat(mrb, str, ptr, strlen(ptr));
+}
+
+MRB_API mrb_value
+mrb_str_cat_str(mrb_state *mrb, mrb_value str, mrb_value str2)
+{
+  return mrb_str_cat(mrb, str, RSTRING_PTR(str2), RSTRING_LEN(str2));
+}
+
+MRB_API mrb_value
+mrb_str_append(mrb_state *mrb, mrb_value str1, mrb_value str2)
+{
+  str2 = mrb_str_to_str(mrb, str2);
+  return mrb_str_cat_str(mrb, str1, str2);
+}
+
+#define CHAR_ESC_LEN 13 /* sizeof(\x{ hex of 32bit unsigned int } \0) */
+
+/*
+ * call-seq:
+ *   str.inspect   -> string
+ *
+ * Returns a printable version of _str_, surrounded by quote marks,
+ * with special characters escaped.
+ *
+ *    str = "hello"
+ *    str[3] = "\b"
+ *    str.inspect       #=> "\"hel\\bo\""
+ */
+mrb_value
+mrb_str_inspect(mrb_state *mrb, mrb_value str)
+{
+  const char *p, *pend;
+  char buf[CHAR_ESC_LEN + 1];
+  mrb_value result = mrb_str_new_lit(mrb, "\"");
+
+  p = RSTRING_PTR(str); pend = RSTRING_END(str);
+  for (;p < pend; p++) {
+    unsigned char c, cc;
+#ifdef MRB_UTF8_STRING
+    mrb_int clen;
+
+    clen = utf8len(p, pend);
+    if (clen > 1) {
+      mrb_int i;
+
+      for (i=0; i<clen; i++) {
+        buf[i] = p[i];
+      }
+      mrb_str_cat(mrb, result, buf, clen);
+      p += clen-1;
+      continue;
+    }
+#endif
+    c = *p;
+    if (c == '"'|| c == '\\' || (c == '#' && IS_EVSTR(p, pend))) {
+      buf[0] = '\\'; buf[1] = c;
+      mrb_str_cat(mrb, result, buf, 2);
+      continue;
+    }
+    if (ISPRINT(c)) {
+      buf[0] = c;
+      mrb_str_cat(mrb, result, buf, 1);
+      continue;
+    }
+    switch (c) {
+      case '\n': cc = 'n'; break;
+      case '\r': cc = 'r'; break;
+      case '\t': cc = 't'; break;
+      case '\f': cc = 'f'; break;
+      case '\013': cc = 'v'; break;
+      case '\010': cc = 'b'; break;
+      case '\007': cc = 'a'; break;
+      case 033: cc = 'e'; break;
+      default: cc = 0; break;
+    }
+    if (cc) {
+      buf[0] = '\\';
+      buf[1] = (char)cc;
+      mrb_str_cat(mrb, result, buf, 2);
+      continue;
+    }
+    else {
+      buf[0] = '\\';
+      buf[3] = '0' + c % 8; c /= 8;
+      buf[2] = '0' + c % 8; c /= 8;
+      buf[1] = '0' + c % 8;
+      mrb_str_cat(mrb, result, buf, 4);
+      continue;
+    }
+  }
+  mrb_str_cat_lit(mrb, result, "\"");
+
+  return result;
+}
+
+/*
+ * call-seq:
+ *   str.bytes   -> array of fixnums
+ *
+ * Returns an array of bytes in _str_.
+ *
+ *    str = "hello"
+ *    str.bytes       #=> [104, 101, 108, 108, 111]
+ */
+static mrb_value
+mrb_str_bytes(mrb_state *mrb, mrb_value str)
+{
+  struct RString *s = mrb_str_ptr(str);
+  mrb_value a = mrb_ary_new_capa(mrb, RSTR_LEN(s));
+  unsigned char *p = (unsigned char *)(RSTR_PTR(s)), *pend = p + RSTR_LEN(s);
+
+  while (p < pend) {
+    mrb_ary_push(mrb, a, mrb_fixnum_value(p[0]));
+    p++;
+  }
+  return a;
+}
+
+/* ---------------------------*/
+void
+mrb_init_string(mrb_state *mrb)
+{
+  struct RClass *s;
+
+  mrb_static_assert(RSTRING_EMBED_LEN_MAX < (1 << 5), "pointer size too big for embedded string");
+
+  mrb->string_class = s = mrb_define_class(mrb, "String", mrb->object_class);             /* 15.2.10 */
+  MRB_SET_INSTANCE_TT(s, MRB_TT_STRING);
+
+  mrb_define_method(mrb, s, "bytesize",        mrb_str_bytesize,        MRB_ARGS_NONE());
+
+  mrb_define_method(mrb, s, "<=>",             mrb_str_cmp_m,           MRB_ARGS_REQ(1)); /* 15.2.10.5.1  */
+  mrb_define_method(mrb, s, "==",              mrb_str_equal_m,         MRB_ARGS_REQ(1)); /* 15.2.10.5.2  */
+  mrb_define_method(mrb, s, "+",               mrb_str_plus_m,          MRB_ARGS_REQ(1)); /* 15.2.10.5.4  */
+  mrb_define_method(mrb, s, "*",               mrb_str_times,           MRB_ARGS_REQ(1)); /* 15.2.10.5.5  */
+  mrb_define_method(mrb, s, "[]",              mrb_str_aref_m,          MRB_ARGS_ANY());  /* 15.2.10.5.6  */
+  mrb_define_method(mrb, s, "capitalize",      mrb_str_capitalize,      MRB_ARGS_NONE()); /* 15.2.10.5.7  */
+  mrb_define_method(mrb, s, "capitalize!",     mrb_str_capitalize_bang, MRB_ARGS_NONE()); /* 15.2.10.5.8  */
+  mrb_define_method(mrb, s, "chomp",           mrb_str_chomp,           MRB_ARGS_ANY());  /* 15.2.10.5.9  */
+  mrb_define_method(mrb, s, "chomp!",          mrb_str_chomp_bang,      MRB_ARGS_ANY());  /* 15.2.10.5.10 */
+  mrb_define_method(mrb, s, "chop",            mrb_str_chop,            MRB_ARGS_REQ(1)); /* 15.2.10.5.11 */
+  mrb_define_method(mrb, s, "chop!",           mrb_str_chop_bang,       MRB_ARGS_REQ(1)); /* 15.2.10.5.12 */
+  mrb_define_method(mrb, s, "downcase",        mrb_str_downcase,        MRB_ARGS_NONE()); /* 15.2.10.5.13 */
+  mrb_define_method(mrb, s, "downcase!",       mrb_str_downcase_bang,   MRB_ARGS_NONE()); /* 15.2.10.5.14 */
+  mrb_define_method(mrb, s, "empty?",          mrb_str_empty_p,         MRB_ARGS_NONE()); /* 15.2.10.5.16 */
+  mrb_define_method(mrb, s, "eql?",            mrb_str_eql,             MRB_ARGS_REQ(1)); /* 15.2.10.5.17 */
+
+  mrb_define_method(mrb, s, "hash",            mrb_str_hash_m,          MRB_ARGS_NONE()); /* 15.2.10.5.20 */
+  mrb_define_method(mrb, s, "include?",        mrb_str_include,         MRB_ARGS_REQ(1)); /* 15.2.10.5.21 */
+  mrb_define_method(mrb, s, "index",           mrb_str_index,           MRB_ARGS_ANY());  /* 15.2.10.5.22 */
+  mrb_define_method(mrb, s, "initialize",      mrb_str_init,            MRB_ARGS_REQ(1)); /* 15.2.10.5.23 */
+  mrb_define_method(mrb, s, "initialize_copy", mrb_str_replace,         MRB_ARGS_REQ(1)); /* 15.2.10.5.24 */
+  mrb_define_method(mrb, s, "intern",          mrb_str_intern,          MRB_ARGS_NONE()); /* 15.2.10.5.25 */
+  mrb_define_method(mrb, s, "length",          mrb_str_size,            MRB_ARGS_NONE()); /* 15.2.10.5.26 */
+  mrb_define_method(mrb, s, "replace",         mrb_str_replace,         MRB_ARGS_REQ(1)); /* 15.2.10.5.28 */
+  mrb_define_method(mrb, s, "reverse",         mrb_str_reverse,         MRB_ARGS_NONE()); /* 15.2.10.5.29 */
+  mrb_define_method(mrb, s, "reverse!",        mrb_str_reverse_bang,    MRB_ARGS_NONE()); /* 15.2.10.5.30 */
+  mrb_define_method(mrb, s, "rindex",          mrb_str_rindex,          MRB_ARGS_ANY());  /* 15.2.10.5.31 */
+  mrb_define_method(mrb, s, "size",            mrb_str_size,            MRB_ARGS_NONE()); /* 15.2.10.5.33 */
+  mrb_define_method(mrb, s, "slice",           mrb_str_aref_m,          MRB_ARGS_ANY());  /* 15.2.10.5.34 */
+  mrb_define_method(mrb, s, "split",           mrb_str_split_m,         MRB_ARGS_ANY());  /* 15.2.10.5.35 */
+
+  mrb_define_method(mrb, s, "to_f",            mrb_str_to_f,            MRB_ARGS_NONE()); /* 15.2.10.5.38 */
+  mrb_define_method(mrb, s, "to_i",            mrb_str_to_i,            MRB_ARGS_ANY());  /* 15.2.10.5.39 */
+  mrb_define_method(mrb, s, "to_s",            mrb_str_to_s,            MRB_ARGS_NONE()); /* 15.2.10.5.40 */
+  mrb_define_method(mrb, s, "to_str",          mrb_str_to_s,            MRB_ARGS_NONE());
+  mrb_define_method(mrb, s, "to_sym",          mrb_str_intern,          MRB_ARGS_NONE()); /* 15.2.10.5.41 */
+  mrb_define_method(mrb, s, "upcase",          mrb_str_upcase,          MRB_ARGS_NONE()); /* 15.2.10.5.42 */
+  mrb_define_method(mrb, s, "upcase!",         mrb_str_upcase_bang,     MRB_ARGS_NONE()); /* 15.2.10.5.43 */
+  mrb_define_method(mrb, s, "inspect",         mrb_str_inspect,         MRB_ARGS_NONE()); /* 15.2.10.5.46(x) */
+  mrb_define_method(mrb, s, "bytes",           mrb_str_bytes,           MRB_ARGS_NONE());
+
+  mrb_define_method(mrb, s, "freeze",          mrb_str_freeze,          MRB_ARGS_NONE());
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/symbol.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/symbol.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/symbol.c	(revision 270)
@@ -0,0 +1,489 @@
+/*
+** symbol.c - Symbol class
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include <limits.h>
+#include <string.h>
+#include "mruby.h"
+#include "mruby/khash.h"
+#include "mruby/string.h"
+#include "mruby/dump.h"
+
+/* ------------------------------------------------------ */
+typedef struct symbol_name {
+  mrb_bool lit : 1;
+  uint16_t len;
+  const char *name;
+} symbol_name;
+
+static inline khint_t
+sym_hash_func(mrb_state *mrb, mrb_sym s)
+{
+  khint_t h = 0;
+  size_t i, len = mrb->symtbl[s].len;
+  const char *p = mrb->symtbl[s].name;
+
+  for (i=0; i<len; i++) {
+    h = (h << 5) - h + *p++;
+  }
+  return h;
+}
+#define sym_hash_equal(mrb,a, b) (mrb->symtbl[a].len == mrb->symtbl[b].len && memcmp(mrb->symtbl[a].name, mrb->symtbl[b].name, mrb->symtbl[a].len) == 0)
+
+KHASH_DECLARE(n2s, mrb_sym, mrb_sym, FALSE)
+KHASH_DEFINE (n2s, mrb_sym, mrb_sym, FALSE, sym_hash_func, sym_hash_equal)
+/* ------------------------------------------------------ */
+
+static void
+sym_validate_len(mrb_state *mrb, size_t len)
+{
+  if (len >= RITE_LV_NULL_MARK) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "symbol length too long");
+  }
+}
+
+static mrb_sym
+sym_intern(mrb_state *mrb, const char *name, size_t len, mrb_bool lit)
+{
+  khash_t(n2s) *h = mrb->name2sym;
+  symbol_name *sname = mrb->symtbl; /* symtbl[0] for working memory */
+  khiter_t k;
+  mrb_sym sym;
+  char *p;
+
+  sym_validate_len(mrb, len);
+  if (sname) {
+    sname->lit = lit;
+    sname->len = (uint16_t)len;
+    sname->name = name;
+    k = kh_get(n2s, mrb, h, 0);
+    if (k != kh_end(h))
+      return kh_key(h, k);
+  }
+
+  /* registering a new symbol */
+  sym = ++mrb->symidx;
+  if (mrb->symcapa < sym) {
+    if (mrb->symcapa == 0) mrb->symcapa = 100;
+    else mrb->symcapa = (size_t)(mrb->symcapa * 1.2);
+    mrb->symtbl = (symbol_name*)mrb_realloc(mrb, mrb->symtbl, sizeof(symbol_name)*(mrb->symcapa+1));
+  }
+  sname = &mrb->symtbl[sym];
+  sname->len = (uint16_t)len;
+  if (lit || mrb_ro_data_p(name)) {
+    sname->name = name;
+    sname->lit = TRUE;
+  }
+  else {
+    p = (char *)mrb_malloc(mrb, len+1);
+    memcpy(p, name, len);
+    p[len] = 0;
+    sname->name = (const char*)p;
+    sname->lit = FALSE;
+  }
+  kh_put(n2s, mrb, h, sym);
+
+  return sym;
+}
+
+MRB_API mrb_sym
+mrb_intern(mrb_state *mrb, const char *name, size_t len)
+{
+  return sym_intern(mrb, name, len, FALSE);
+}
+
+MRB_API mrb_sym
+mrb_intern_static(mrb_state *mrb, const char *name, size_t len)
+{
+  return sym_intern(mrb, name, len, TRUE);
+}
+
+MRB_API mrb_sym
+mrb_intern_cstr(mrb_state *mrb, const char *name)
+{
+  return mrb_intern(mrb, name, strlen(name));
+}
+
+MRB_API mrb_sym
+mrb_intern_str(mrb_state *mrb, mrb_value str)
+{
+  return mrb_intern(mrb, RSTRING_PTR(str), RSTRING_LEN(str));
+}
+
+MRB_API mrb_value
+mrb_check_intern(mrb_state *mrb, const char *name, size_t len)
+{
+  khash_t(n2s) *h = mrb->name2sym;
+  symbol_name *sname = mrb->symtbl;
+  khiter_t k;
+
+  sym_validate_len(mrb, len);
+  sname->len = (uint16_t)len;
+  sname->name = name;
+
+  k = kh_get(n2s, mrb, h, 0);
+  if (k != kh_end(h)) {
+    return mrb_symbol_value(kh_key(h, k));
+  }
+  return mrb_nil_value();
+}
+
+MRB_API mrb_value
+mrb_check_intern_cstr(mrb_state *mrb, const char *name)
+{
+  return mrb_check_intern(mrb, name, (mrb_int)strlen(name));
+}
+
+MRB_API mrb_value
+mrb_check_intern_str(mrb_state *mrb, mrb_value str)
+{
+  return mrb_check_intern(mrb, RSTRING_PTR(str), RSTRING_LEN(str));
+}
+
+/* lenp must be a pointer to a size_t variable */
+MRB_API const char*
+mrb_sym2name_len(mrb_state *mrb, mrb_sym sym, mrb_int *lenp)
+{
+  if (sym == 0 || mrb->symidx < sym) {
+    if (lenp) *lenp = 0;
+    return NULL;
+  }
+
+  if (lenp) *lenp = mrb->symtbl[sym].len;
+  return mrb->symtbl[sym].name;
+}
+
+void
+mrb_free_symtbl(mrb_state *mrb)
+{
+  mrb_sym i, lim;
+
+  for (i=1, lim=mrb->symidx+1; i<lim; i++) {
+    if (!mrb->symtbl[i].lit) {
+      mrb_free(mrb, (char*)mrb->symtbl[i].name);
+    }
+  }
+  mrb_free(mrb, mrb->symtbl);
+  kh_destroy(n2s, mrb, mrb->name2sym);
+}
+
+void
+mrb_init_symtbl(mrb_state *mrb)
+{
+  mrb->name2sym = kh_init(n2s, mrb);
+}
+
+/**********************************************************************
+ * Document-class: Symbol
+ *
+ *  <code>Symbol</code> objects represent names and some strings
+ *  inside the Ruby
+ *  interpreter. They are generated using the <code>:name</code> and
+ *  <code>:"string"</code> literals
+ *  syntax, and by the various <code>to_sym</code> methods. The same
+ *  <code>Symbol</code> object will be created for a given name or string
+ *  for the duration of a program's execution, regardless of the context
+ *  or meaning of that name. Thus if <code>Fred</code> is a constant in
+ *  one context, a method in another, and a class in a third, the
+ *  <code>Symbol</code> <code>:Fred</code> will be the same object in
+ *  all three contexts.
+ *
+ *     module One
+ *       class Fred
+ *       end
+ *       $f1 = :Fred
+ *     end
+ *     module Two
+ *       Fred = 1
+ *       $f2 = :Fred
+ *     end
+ *     def Fred()
+ *     end
+ *     $f3 = :Fred
+ *     $f1.object_id   #=> 2514190
+ *     $f2.object_id   #=> 2514190
+ *     $f3.object_id   #=> 2514190
+ *
+ */
+
+
+/* 15.2.11.3.1  */
+/*
+ *  call-seq:
+ *     sym == obj   -> true or false
+ *
+ *  Equality---If <i>sym</i> and <i>obj</i> are exactly the same
+ *  symbol, returns <code>true</code>.
+ */
+
+static mrb_value
+sym_equal(mrb_state *mrb, mrb_value sym1)
+{
+  mrb_value sym2;
+
+  mrb_get_args(mrb, "o", &sym2);
+
+  return mrb_bool_value(mrb_obj_equal(mrb, sym1, sym2));
+}
+
+/* 15.2.11.3.2  */
+/* 15.2.11.3.3  */
+/*
+ *  call-seq:
+ *     sym.id2name   -> string
+ *     sym.to_s      -> string
+ *
+ *  Returns the name or string corresponding to <i>sym</i>.
+ *
+ *     :fred.id2name   #=> "fred"
+ */
+static mrb_value
+mrb_sym_to_s(mrb_state *mrb, mrb_value sym)
+{
+  mrb_sym id = mrb_symbol(sym);
+  const char *p;
+  mrb_int len;
+
+  p = mrb_sym2name_len(mrb, id, &len);
+  return mrb_str_new_static(mrb, p, len);
+}
+
+/* 15.2.11.3.4  */
+/*
+ * call-seq:
+ *   sym.to_sym   -> sym
+ *   sym.intern   -> sym
+ *
+ * In general, <code>to_sym</code> returns the <code>Symbol</code> corresponding
+ * to an object. As <i>sym</i> is already a symbol, <code>self</code> is returned
+ * in this case.
+ */
+
+static mrb_value
+sym_to_sym(mrb_state *mrb, mrb_value sym)
+{
+  return sym;
+}
+
+/* 15.2.11.3.5(x)  */
+/*
+ *  call-seq:
+ *     sym.inspect    -> string
+ *
+ *  Returns the representation of <i>sym</i> as a symbol literal.
+ *
+ *     :fred.inspect   #=> ":fred"
+ */
+
+#if __STDC__
+# define SIGN_EXTEND_CHAR(c) ((signed char)(c))
+#else  /* not __STDC__ */
+/* As in Harbison and Steele.  */
+# define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128)
+#endif
+#define is_identchar(c) (SIGN_EXTEND_CHAR(c)!=-1&&(ISALNUM(c) || (c) == '_'))
+
+static mrb_bool
+is_special_global_name(const char* m)
+{
+  switch (*m) {
+    case '~': case '*': case '$': case '?': case '!': case '@':
+    case '/': case '\\': case ';': case ',': case '.': case '=':
+    case ':': case '<': case '>': case '\"':
+    case '&': case '`': case '\'': case '+':
+    case '0':
+      ++m;
+      break;
+    case '-':
+      ++m;
+      if (is_identchar(*m)) m += 1;
+      break;
+    default:
+      if (!ISDIGIT(*m)) return FALSE;
+      do ++m; while (ISDIGIT(*m));
+      break;
+  }
+  return !*m;
+}
+
+static mrb_bool
+symname_p(const char *name)
+{
+  const char *m = name;
+  mrb_bool localid = FALSE;
+
+  if (!m) return FALSE;
+  switch (*m) {
+    case '\0':
+      return FALSE;
+
+    case '$':
+      if (is_special_global_name(++m)) return TRUE;
+      goto id;
+
+    case '@':
+      if (*++m == '@') ++m;
+      goto id;
+
+    case '<':
+      switch (*++m) {
+        case '<': ++m; break;
+        case '=': if (*++m == '>') ++m; break;
+        default: break;
+      }
+      break;
+
+    case '>':
+      switch (*++m) {
+        case '>': case '=': ++m; break;
+        default: break;
+      }
+      break;
+
+    case '=':
+      switch (*++m) {
+        case '~': ++m; break;
+        case '=': if (*++m == '=') ++m; break;
+        default: return FALSE;
+      }
+      break;
+
+    case '*':
+      if (*++m == '*') ++m;
+      break;
+    case '!':
+      if (*++m == '=') ++m;
+      break;
+    case '+': case '-':
+      if (*++m == '@') ++m;
+      break;
+    case '|':
+      if (*++m == '|') ++m;
+      break;
+    case '&':
+      if (*++m == '&') ++m;
+      break;
+
+    case '^': case '/': case '%': case '~': case '`':
+      ++m;
+      break;
+
+    case '[':
+      if (*++m != ']') return FALSE;
+      if (*++m == '=') ++m;
+      break;
+
+    default:
+      localid = !ISUPPER(*m);
+id:
+      if (*m != '_' && !ISALPHA(*m)) return FALSE;
+      while (is_identchar(*m)) m += 1;
+      if (localid) {
+        switch (*m) {
+          case '!': case '?': case '=': ++m;
+          default: break;
+            }
+        }
+      break;
+  }
+  return *m ? FALSE : TRUE;
+}
+
+static mrb_value
+sym_inspect(mrb_state *mrb, mrb_value sym)
+{
+  mrb_value str;
+  const char *name;
+  mrb_int len;
+  mrb_sym id = mrb_symbol(sym);
+  char *sp;
+
+  name = mrb_sym2name_len(mrb, id, &len);
+  str = mrb_str_new(mrb, 0, len+1);
+  sp = RSTRING_PTR(str);
+  RSTRING_PTR(str)[0] = ':';
+  memcpy(sp+1, name, len);
+  mrb_assert_int_fit(mrb_int, len, size_t, SIZE_MAX);
+  if (!symname_p(name) || strlen(name) != (size_t)len) {
+    str = mrb_str_dump(mrb, str);
+    sp = RSTRING_PTR(str);
+    sp[0] = ':';
+    sp[1] = '"';
+  }
+  return str;
+}
+
+MRB_API mrb_value
+mrb_sym2str(mrb_state *mrb, mrb_sym sym)
+{
+  mrb_int len;
+  const char *name = mrb_sym2name_len(mrb, sym, &len);
+
+  if (!name) return mrb_undef_value(); /* can't happen */
+  return mrb_str_new_static(mrb, name, len);
+}
+
+MRB_API const char*
+mrb_sym2name(mrb_state *mrb, mrb_sym sym)
+{
+  mrb_int len;
+  const char *name = mrb_sym2name_len(mrb, sym, &len);
+
+  if (!name) return NULL;
+  if (symname_p(name) && strlen(name) == (size_t)len) {
+    return name;
+  }
+  else {
+    mrb_value str = mrb_str_dump(mrb, mrb_str_new_static(mrb, name, len));
+    return RSTRING_PTR(str);
+  }
+}
+
+#define lesser(a,b) (((a)>(b))?(b):(a))
+
+static mrb_value
+sym_cmp(mrb_state *mrb, mrb_value s1)
+{
+  mrb_value s2;
+  mrb_sym sym1, sym2;
+
+  mrb_get_args(mrb, "o", &s2);
+  if (mrb_type(s2) != MRB_TT_SYMBOL) return mrb_nil_value();
+  sym1 = mrb_symbol(s1);
+  sym2 = mrb_symbol(s2);
+  if (sym1 == sym2) return mrb_fixnum_value(0);
+  else {
+    const char *p1, *p2;
+    int retval;
+    mrb_int len, len1, len2;
+
+    p1 = mrb_sym2name_len(mrb, sym1, &len1);
+    p2 = mrb_sym2name_len(mrb, sym2, &len2);
+    len = lesser(len1, len2);
+    retval = memcmp(p1, p2, len);
+    if (retval == 0) {
+      if (len1 == len2) return mrb_fixnum_value(0);
+      if (len1 > len2)  return mrb_fixnum_value(1);
+      return mrb_fixnum_value(-1);
+    }
+    if (retval > 0) return mrb_fixnum_value(1);
+    return mrb_fixnum_value(-1);
+  }
+}
+
+void
+mrb_init_symbol(mrb_state *mrb)
+{
+  struct RClass *sym;
+
+  mrb->symbol_class = sym = mrb_define_class(mrb, "Symbol", mrb->object_class);                 /* 15.2.11 */
+
+  mrb_define_method(mrb, sym, "===",             sym_equal,      MRB_ARGS_REQ(1));              /* 15.2.11.3.1  */
+  mrb_define_method(mrb, sym, "id2name",         mrb_sym_to_s,   MRB_ARGS_NONE());              /* 15.2.11.3.2  */
+  mrb_define_method(mrb, sym, "to_s",            mrb_sym_to_s,   MRB_ARGS_NONE());              /* 15.2.11.3.3  */
+  mrb_define_method(mrb, sym, "to_sym",          sym_to_sym,     MRB_ARGS_NONE());              /* 15.2.11.3.4  */
+  mrb_define_method(mrb, sym, "inspect",         sym_inspect,    MRB_ARGS_NONE());              /* 15.2.11.3.5(x)  */
+  mrb_define_method(mrb, sym, "<=>",             sym_cmp,        MRB_ARGS_REQ(1));
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/value_array.h
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/value_array.h	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/value_array.h	(revision 270)
@@ -0,0 +1,27 @@
+#ifndef MRB_VALUE_ARRAY_H__
+#define MRB_VALUE_ARRAY_H__
+
+#include "mruby.h"
+
+static inline void
+value_move(mrb_value *s1, const mrb_value *s2, size_t n)
+{
+  if (s1 > s2 && s1 < s2 + n)
+  {
+    s1 += n;
+    s2 += n;
+    while (n-- > 0) {
+      *--s1 = *--s2;
+    }
+  }
+  else if (s1 != s2) {
+    while (n-- > 0) {
+      *s1++ = *s2++;
+    }
+  }
+  else {
+    /* nothing to do. */
+  }
+}
+
+#endif /* MRB_VALUE_ARRAY_H__ */
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/variable.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/variable.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/variable.c	(revision 270)
@@ -0,0 +1,1181 @@
+/*
+** variable.c - mruby variables
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include "mruby.h"
+#include "mruby/array.h"
+#include "mruby/class.h"
+#include "mruby/proc.h"
+#include "mruby/string.h"
+
+typedef int (iv_foreach_func)(mrb_state*,mrb_sym,mrb_value,void*);
+
+#ifdef MRB_USE_IV_SEGLIST
+
+#ifndef MRB_SEGMENT_SIZE
+#define MRB_SEGMENT_SIZE 4
+#endif
+
+typedef struct segment {
+  mrb_sym key[MRB_SEGMENT_SIZE];
+  mrb_value val[MRB_SEGMENT_SIZE];
+  struct segment *next;
+} segment;
+
+/* Instance variable table structure */
+typedef struct iv_tbl {
+  segment *rootseg;
+  size_t size;
+  size_t last_len;
+} iv_tbl;
+
+/*
+ * Creates the instance variable table.
+ *
+ * Parameters
+ *   mrb
+ * Returns
+ *   the instance variable table.
+ */
+static iv_tbl*
+iv_new(mrb_state *mrb)
+{
+  iv_tbl *t;
+
+  t = mrb_malloc(mrb, sizeof(iv_tbl));
+  t->size = 0;
+  t->rootseg =  NULL;
+  t->last_len = 0;
+
+  return t;
+}
+
+/*
+ * Set the value for the symbol in the instance variable table.
+ *
+ * Parameters
+ *   mrb
+ *   t     the instance variable table to be set in.
+ *   sym   the symbol to be used as the key.
+ *   val   the value to be set.
+ */
+static void
+iv_put(mrb_state *mrb, iv_tbl *t, mrb_sym sym, mrb_value val)
+{
+  segment *seg = t->rootseg;
+  segment *prev = NULL;
+  segment *matched_seg = NULL;
+  size_t matched_idx = 0;
+  size_t i;
+
+  while (seg) {
+    for (i=0; i<MRB_SEGMENT_SIZE; i++) {
+      mrb_sym key = seg->key[i];
+      /* Found room in last segment after last_len */
+      if (!seg->next && i >= t->last_len) {
+        seg->key[i] = sym;
+        seg->val[i] = val;
+        t->last_len = i+1;
+        t->size++;
+        return;
+      }
+      if (!matched_seg && key == 0) {
+        matched_seg = seg;
+        matched_idx = i;
+      }
+      else if (key == sym) {
+        seg->val[i] = val;
+        return;
+      }
+    }
+    prev = seg;
+    seg = seg->next;
+  }
+
+  /* Not found */
+  t->size++;
+  if (matched_seg) {
+    matched_seg->key[matched_idx] = sym;
+    matched_seg->val[matched_idx] = val;
+    return;
+  }
+
+  seg = mrb_malloc(mrb, sizeof(segment));
+  if (!seg) return;
+  seg->next = NULL;
+  seg->key[0] = sym;
+  seg->val[0] = val;
+  t->last_len = 1;
+  if (prev) {
+    prev->next = seg;
+  }
+  else {
+    t->rootseg = seg;
+  }
+}
+
+/*
+ * Get a value for a symbol from the instance variable table.
+ *
+ * Parameters
+ *   mrb
+ *   t     the variable table to be searched.
+ *   sym   the symbol to be used as the key.
+ *   vp    the value pointer. Receives the value if the specified symbol is
+ *         contained in the instance variable table.
+ * Returns
+ *   true if the specified symbol is contained in the instance variable table.
+ */
+static mrb_bool
+iv_get(mrb_state *mrb, iv_tbl *t, mrb_sym sym, mrb_value *vp)
+{
+  segment *seg;
+  size_t i;
+
+  seg = t->rootseg;
+  while (seg) {
+    for (i=0; i<MRB_SEGMENT_SIZE; i++) {
+      mrb_sym key = seg->key[i];
+
+      if (!seg->next && i >= t->last_len) {
+        return FALSE;
+      }
+      if (key == sym) {
+        if (vp) *vp = seg->val[i];
+        return TRUE;
+      }
+    }
+    seg = seg->next;
+  }
+  return FALSE;
+}
+
+/*
+ * Deletes the value for the symbol from the instance variable table.
+ *
+ * Parameters
+ *   t    the variable table to be searched.
+ *   sym  the symbol to be used as the key.
+ *   vp   the value pointer. Receive the deleted value if the symbol is
+ *        contained in the instance variable table.
+ * Returns
+ *   true if the specified symbol is contained in the instance variable table.
+ */
+static mrb_bool
+iv_del(mrb_state *mrb, iv_tbl *t, mrb_sym sym, mrb_value *vp)
+{
+  segment *seg;
+  size_t i;
+
+  seg = t->rootseg;
+  while (seg) {
+    for (i=0; i<MRB_SEGMENT_SIZE; i++) {
+      mrb_sym key = seg->key[i];
+
+      if (!seg->next && i >= t->last_len) {
+        return FALSE;
+      }
+      if (key == sym) {
+        t->size--;
+        seg->key[i] = 0;
+        if (vp) *vp = seg->val[i];
+        return TRUE;
+      }
+    }
+    seg = seg->next;
+  }
+  return FALSE;
+}
+
+static mrb_bool
+iv_foreach(mrb_state *mrb, iv_tbl *t, iv_foreach_func *func, void *p)
+{
+  segment *seg;
+  size_t i;
+  int n;
+
+  seg = t->rootseg;
+  while (seg) {
+    for (i=0; i<MRB_SEGMENT_SIZE; i++) {
+      mrb_sym key = seg->key[i];
+
+      /* no value in last segment after last_len */
+      if (!seg->next && i >= t->last_len) {
+        return FALSE;
+      }
+      if (key != 0) {
+        n =(*func)(mrb, key, seg->val[i], p);
+        if (n > 0) return FALSE;
+        if (n < 0) {
+          t->size--;
+          seg->key[i] = 0;
+        }
+      }
+    }
+    seg = seg->next;
+  }
+  return TRUE;
+}
+
+static size_t
+iv_size(mrb_state *mrb, iv_tbl *t)
+{
+  segment *seg;
+  size_t size = 0;
+
+  if (!t) return 0;
+  if (t->size > 0) return t->size;
+  seg = t->rootseg;
+  while (seg) {
+    if (seg->next == NULL) {
+      size += t->last_len;
+      return size;
+    }
+    seg = seg->next;
+    size += MRB_SEGMENT_SIZE;
+  }
+  /* empty iv_tbl */
+  return 0;
+}
+
+static iv_tbl*
+iv_copy(mrb_state *mrb, iv_tbl *t)
+{
+  segment *seg;
+  iv_tbl *t2;
+
+  size_t i;
+
+  seg = t->rootseg;
+  t2 = iv_new(mrb);
+
+  while (seg != NULL) {
+    for (i=0; i<MRB_SEGMENT_SIZE; i++) {
+      mrb_sym key = seg->key[i];
+      mrb_value val = seg->val[i];
+
+      if ((seg->next == NULL) && (i >= t->last_len)) {
+        return t2;
+      }
+      iv_put(mrb, t2, key, val);
+    }
+    seg = seg->next;
+  }
+  return t2;
+}
+
+static void
+iv_free(mrb_state *mrb, iv_tbl *t)
+{
+  segment *seg;
+
+  seg = t->rootseg;
+  while (seg) {
+    segment *p = seg;
+    seg = seg->next;
+    mrb_free(mrb, p);
+  }
+  mrb_free(mrb, t);
+}
+
+#else
+
+#include "mruby/khash.h"
+
+#ifndef MRB_IVHASH_INIT_SIZE
+#define MRB_IVHASH_INIT_SIZE 8
+#endif
+
+KHASH_DECLARE(iv, mrb_sym, mrb_value, TRUE)
+KHASH_DEFINE(iv, mrb_sym, mrb_value, TRUE, kh_int_hash_func, kh_int_hash_equal)
+
+typedef struct iv_tbl {
+  khash_t(iv) h;
+} iv_tbl;
+
+static iv_tbl*
+iv_new(mrb_state *mrb)
+{
+  return (iv_tbl*)kh_init_size(iv, mrb, MRB_IVHASH_INIT_SIZE);
+}
+
+static void
+iv_put(mrb_state *mrb, iv_tbl *t, mrb_sym sym, mrb_value val)
+{
+  khash_t(iv) *h = &t->h;
+  khiter_t k;
+
+  k = kh_put(iv, mrb, h, sym);
+  kh_value(h, k) = val;
+}
+
+static mrb_bool
+iv_get(mrb_state *mrb, iv_tbl *t, mrb_sym sym, mrb_value *vp)
+{
+  khash_t(iv) *h = &t->h;
+  khiter_t k;
+
+  k = kh_get(iv, mrb, h, sym);
+  if (k != kh_end(h)) {
+    if (vp) *vp = kh_value(h, k);
+    return TRUE;
+  }
+  return FALSE;
+}
+
+static mrb_bool
+iv_del(mrb_state *mrb, iv_tbl *t, mrb_sym sym, mrb_value *vp)
+{
+  khash_t(iv) *h = &t->h;
+  khiter_t k;
+
+  if (h) {
+    k = kh_get(iv, mrb, h, sym);
+    if (k != kh_end(h)) {
+      mrb_value val = kh_value(h, k);
+      kh_del(iv, mrb, h, k);
+      if (vp) *vp = val;
+      return TRUE;
+    }
+  }
+  return FALSE;
+}
+
+static mrb_bool
+iv_foreach(mrb_state *mrb, iv_tbl *t, iv_foreach_func *func, void *p)
+{
+  khash_t(iv) *h = &t->h;
+  khiter_t k;
+  int n;
+
+  if (h) {
+    for (k = kh_begin(h); k != kh_end(h); k++) {
+      if (kh_exist(h, k)) {
+        n = (*func)(mrb, kh_key(h, k), kh_value(h, k), p);
+        if (n > 0) return FALSE;
+        if (n < 0) {
+          kh_del(iv, mrb, h, k);
+        }
+      }
+    }
+  }
+  return TRUE;
+}
+
+static size_t
+iv_size(mrb_state *mrb, iv_tbl *t)
+{
+  khash_t(iv) *h;
+
+  if (t && (h = &t->h)) {
+    return kh_size(h);
+  }
+  return 0;
+}
+
+static iv_tbl*
+iv_copy(mrb_state *mrb, iv_tbl *t)
+{
+  return (iv_tbl*)kh_copy(iv, mrb, &t->h);
+}
+
+static void
+iv_free(mrb_state *mrb, iv_tbl *t)
+{
+  kh_destroy(iv, mrb, &t->h);
+}
+
+#endif
+
+static int
+iv_mark_i(mrb_state *mrb, mrb_sym sym, mrb_value v, void *p)
+{
+  mrb_gc_mark_value(mrb, v);
+  return 0;
+}
+
+static void
+mark_tbl(mrb_state *mrb, iv_tbl *t)
+{
+  if (t) {
+    iv_foreach(mrb, t, iv_mark_i, 0);
+  }
+}
+
+void
+mrb_gc_mark_gv(mrb_state *mrb)
+{
+  mark_tbl(mrb, mrb->globals);
+}
+
+void
+mrb_gc_free_gv(mrb_state *mrb)
+{
+  if (mrb->globals)
+    iv_free(mrb, mrb->globals);
+}
+
+void
+mrb_gc_mark_iv(mrb_state *mrb, struct RObject *obj)
+{
+  mark_tbl(mrb, obj->iv);
+}
+
+size_t
+mrb_gc_mark_iv_size(mrb_state *mrb, struct RObject *obj)
+{
+  return iv_size(mrb, obj->iv);
+}
+
+void
+mrb_gc_free_iv(mrb_state *mrb, struct RObject *obj)
+{
+  if (obj->iv) {
+    iv_free(mrb, obj->iv);
+  }
+}
+
+mrb_value
+mrb_vm_special_get(mrb_state *mrb, mrb_sym i)
+{
+  return mrb_fixnum_value(0);
+}
+
+void
+mrb_vm_special_set(mrb_state *mrb, mrb_sym i, mrb_value v)
+{
+}
+
+static mrb_bool
+obj_iv_p(mrb_value obj)
+{
+  switch (mrb_type(obj)) {
+    case MRB_TT_OBJECT:
+    case MRB_TT_CLASS:
+    case MRB_TT_MODULE:
+    case MRB_TT_SCLASS:
+    case MRB_TT_HASH:
+    case MRB_TT_DATA:
+    case MRB_TT_EXCEPTION:
+      return TRUE;
+    default:
+      return FALSE;
+  }
+}
+
+MRB_API mrb_value
+mrb_obj_iv_get(mrb_state *mrb, struct RObject *obj, mrb_sym sym)
+{
+  mrb_value v;
+
+  if (obj->iv && iv_get(mrb, obj->iv, sym, &v))
+    return v;
+  return mrb_nil_value();
+}
+
+MRB_API mrb_value
+mrb_iv_get(mrb_state *mrb, mrb_value obj, mrb_sym sym)
+{
+  if (obj_iv_p(obj)) {
+    return mrb_obj_iv_get(mrb, mrb_obj_ptr(obj), sym);
+  }
+  return mrb_nil_value();
+}
+
+MRB_API void
+mrb_obj_iv_set(mrb_state *mrb, struct RObject *obj, mrb_sym sym, mrb_value v)
+{
+  iv_tbl *t = obj->iv;
+
+  if (!t) {
+    t = obj->iv = iv_new(mrb);
+  }
+  mrb_write_barrier(mrb, (struct RBasic*)obj);
+  iv_put(mrb, t, sym, v);
+}
+
+MRB_API void
+mrb_obj_iv_ifnone(mrb_state *mrb, struct RObject *obj, mrb_sym sym, mrb_value v)
+{
+  iv_tbl *t = obj->iv;
+
+  if (!t) {
+    t = obj->iv = iv_new(mrb);
+  }
+  else if (iv_get(mrb, t, sym, &v)) {
+    return;
+  }
+  mrb_write_barrier(mrb, (struct RBasic*)obj);
+  iv_put(mrb, t, sym, v);
+}
+
+MRB_API void
+mrb_iv_set(mrb_state *mrb, mrb_value obj, mrb_sym sym, mrb_value v)
+{
+  if (obj_iv_p(obj)) {
+    mrb_obj_iv_set(mrb, mrb_obj_ptr(obj), sym, v);
+  }
+  else {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "cannot set instance variable");
+  }
+}
+
+MRB_API mrb_bool
+mrb_obj_iv_defined(mrb_state *mrb, struct RObject *obj, mrb_sym sym)
+{
+  iv_tbl *t;
+
+  t = obj->iv;
+  if (t) {
+    return iv_get(mrb, t, sym, NULL);
+  }
+  return FALSE;
+}
+
+MRB_API mrb_bool
+mrb_iv_defined(mrb_state *mrb, mrb_value obj, mrb_sym sym)
+{
+  if (!obj_iv_p(obj)) return FALSE;
+  return mrb_obj_iv_defined(mrb, mrb_obj_ptr(obj), sym);
+}
+
+#define identchar(c) (ISALNUM(c) || (c) == '_' || !ISASCII(c))
+
+MRB_API mrb_bool
+mrb_iv_p(mrb_state *mrb, mrb_sym iv_name)
+{
+  const char *s;
+  mrb_int i, len;
+
+  s = mrb_sym2name_len(mrb, iv_name, &len);
+  if (len < 2) return FALSE;
+  if (s[0] != '@') return FALSE;
+  if (s[1] == '@') return FALSE;
+  for (i=1; i<len; i++) {
+    if (!identchar(s[i])) return FALSE;
+  }
+  return TRUE;
+}
+
+MRB_API void
+mrb_iv_check(mrb_state *mrb, mrb_sym iv_name)
+{
+  if (!mrb_iv_p(mrb, iv_name)) {
+    mrb_name_error(mrb, iv_name, "'%S' is not allowed as an instance variable name", mrb_sym2str(mrb, iv_name));
+  }
+}
+
+MRB_API void
+mrb_iv_copy(mrb_state *mrb, mrb_value dest, mrb_value src)
+{
+  struct RObject *d = mrb_obj_ptr(dest);
+  struct RObject *s = mrb_obj_ptr(src);
+
+  if (d->iv) {
+    iv_free(mrb, d->iv);
+    d->iv = 0;
+  }
+  if (s->iv) {
+    mrb_write_barrier(mrb, (struct RBasic*)d);
+    d->iv = iv_copy(mrb, s->iv);
+  }
+}
+
+static int
+inspect_i(mrb_state *mrb, mrb_sym sym, mrb_value v, void *p)
+{
+  mrb_value str = *(mrb_value*)p;
+  const char *s;
+  mrb_int len;
+  mrb_value ins;
+  char *sp = RSTRING_PTR(str);
+
+  /* need not to show internal data */
+  if (sp[0] == '-') { /* first element */
+    sp[0] = '#';
+    mrb_str_cat_lit(mrb, str, " ");
+  }
+  else {
+    mrb_str_cat_lit(mrb, str, ", ");
+  }
+  s = mrb_sym2name_len(mrb, sym, &len);
+  mrb_str_cat(mrb, str, s, len);
+  mrb_str_cat_lit(mrb, str, "=");
+  if (mrb_type(v) == MRB_TT_OBJECT) {
+    ins = mrb_any_to_s(mrb, v);
+  }
+  else {
+    ins = mrb_inspect(mrb, v);
+  }
+  mrb_str_cat_str(mrb, str, ins);
+  return 0;
+}
+
+mrb_value
+mrb_obj_iv_inspect(mrb_state *mrb, struct RObject *obj)
+{
+  iv_tbl *t = obj->iv;
+  size_t len = iv_size(mrb, t);
+
+  if (len > 0) {
+    const char *cn = mrb_obj_classname(mrb, mrb_obj_value(obj));
+    mrb_value str = mrb_str_buf_new(mrb, 30);
+
+    mrb_str_cat_lit(mrb, str, "-<");
+    mrb_str_cat_cstr(mrb, str, cn);
+    mrb_str_cat_lit(mrb, str, ":");
+    mrb_str_concat(mrb, str, mrb_ptr_to_str(mrb, obj));
+
+    iv_foreach(mrb, t, inspect_i, &str);
+    mrb_str_cat_lit(mrb, str, ">");
+    return str;
+  }
+  return mrb_any_to_s(mrb, mrb_obj_value(obj));
+}
+
+MRB_API mrb_value
+mrb_iv_remove(mrb_state *mrb, mrb_value obj, mrb_sym sym)
+{
+  if (obj_iv_p(obj)) {
+    iv_tbl *t = mrb_obj_ptr(obj)->iv;
+    mrb_value val;
+
+    if (t && iv_del(mrb, t, sym, &val)) {
+      return val;
+    }
+  }
+  return mrb_undef_value();
+}
+
+mrb_value
+mrb_vm_iv_get(mrb_state *mrb, mrb_sym sym)
+{
+  /* get self */
+  return mrb_iv_get(mrb, mrb->c->stack[0], sym);
+}
+
+void
+mrb_vm_iv_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
+{
+  /* get self */
+  mrb_iv_set(mrb, mrb->c->stack[0], sym, v);
+}
+
+static int
+iv_i(mrb_state *mrb, mrb_sym sym, mrb_value v, void *p)
+{
+  mrb_value ary;
+  const char* s;
+  mrb_int len;
+
+  ary = *(mrb_value*)p;
+  s = mrb_sym2name_len(mrb, sym, &len);
+  if (len > 1 && s[0] == '@' && s[1] != '@') {
+    mrb_ary_push(mrb, ary, mrb_symbol_value(sym));
+  }
+  return 0;
+}
+
+/* 15.3.1.3.23 */
+/*
+ *  call-seq:
+ *     obj.instance_variables    -> array
+ *
+ *  Returns an array of instance variable names for the receiver. Note
+ *  that simply defining an accessor does not create the corresponding
+ *  instance variable.
+ *
+ *     class Fred
+ *       attr_accessor :a1
+ *       def initialize
+ *         @iv = 3
+ *       end
+ *     end
+ *     Fred.new.instance_variables   #=> [:@iv]
+ */
+mrb_value
+mrb_obj_instance_variables(mrb_state *mrb, mrb_value self)
+{
+  mrb_value ary;
+
+  ary = mrb_ary_new(mrb);
+  if (obj_iv_p(self) && mrb_obj_ptr(self)->iv) {
+    iv_foreach(mrb, mrb_obj_ptr(self)->iv, iv_i, &ary);
+  }
+  return ary;
+}
+
+static int
+cv_i(mrb_state *mrb, mrb_sym sym, mrb_value v, void *p)
+{
+  mrb_value ary;
+  const char* s;
+  mrb_int len;
+
+  ary = *(mrb_value*)p;
+  s = mrb_sym2name_len(mrb, sym, &len);
+  if (len > 2 && s[0] == '@' && s[1] == '@') {
+    mrb_ary_push(mrb, ary, mrb_symbol_value(sym));
+  }
+  return 0;
+}
+
+/* 15.2.2.4.19 */
+/*
+ *  call-seq:
+ *     mod.class_variables   -> array
+ *
+ *  Returns an array of the names of class variables in <i>mod</i>.
+ *
+ *     class One
+ *       @@var1 = 1
+ *     end
+ *     class Two < One
+ *       @@var2 = 2
+ *     end
+ *     One.class_variables   #=> [:@@var1]
+ *     Two.class_variables   #=> [:@@var2]
+ */
+mrb_value
+mrb_mod_class_variables(mrb_state *mrb, mrb_value mod)
+{
+  mrb_value ary;
+  struct RClass *c;
+
+  ary = mrb_ary_new(mrb);
+  c = mrb_class_ptr(mod);
+  while (c) {
+    if (c->iv) {
+      iv_foreach(mrb, c->iv, cv_i, &ary);
+    }
+    c = c->super;
+  }
+  return ary;
+}
+
+MRB_API mrb_value
+mrb_mod_cv_get(mrb_state *mrb, struct RClass * c, mrb_sym sym)
+{
+  struct RClass * cls = c;
+  mrb_value v;
+
+  while (c) {
+    if (c->iv && iv_get(mrb, c->iv, sym, &v)) {
+      return v;
+    }
+    c = c->super;
+  }
+  if (cls && cls->tt == MRB_TT_SCLASS) {
+    mrb_value klass;
+
+    klass = mrb_obj_iv_get(mrb, (struct RObject *)cls,
+                           mrb_intern_lit(mrb, "__attached__"));
+    c = mrb_class_ptr(klass);
+    if (c->tt == MRB_TT_CLASS) {
+      while (c) {
+        if (c->iv && iv_get(mrb, c->iv, sym, &v)) {
+          return v;
+        }
+        c = c->super;
+      }
+    }
+  }
+  mrb_name_error(mrb, sym, "uninitialized class variable %S in %S",
+                 mrb_sym2str(mrb, sym), mrb_obj_value(cls));
+  /* not reached */
+  return mrb_nil_value();
+}
+
+MRB_API mrb_value
+mrb_cv_get(mrb_state *mrb, mrb_value mod, mrb_sym sym)
+{
+  return mrb_mod_cv_get(mrb, mrb_class_ptr(mod), sym);
+}
+
+MRB_API void
+mrb_mod_cv_set(mrb_state *mrb, struct RClass *c, mrb_sym sym, mrb_value v)
+{
+  struct RClass * cls = c;
+
+  while (c) {
+    if (c->iv) {
+      iv_tbl *t = c->iv;
+
+      if (iv_get(mrb, t, sym, NULL)) {
+        mrb_write_barrier(mrb, (struct RBasic*)c);
+        iv_put(mrb, t, sym, v);
+        return;
+      }
+    }
+    c = c->super;
+  }
+
+  if (!cls->iv) {
+    cls->iv = iv_new(mrb);
+  }
+
+  mrb_write_barrier(mrb, (struct RBasic*)cls);
+  iv_put(mrb, cls->iv, sym, v);
+}
+
+MRB_API void
+mrb_cv_set(mrb_state *mrb, mrb_value mod, mrb_sym sym, mrb_value v)
+{
+  mrb_mod_cv_set(mrb, mrb_class_ptr(mod), sym, v);
+}
+
+MRB_API mrb_bool
+mrb_mod_cv_defined(mrb_state *mrb, struct RClass * c, mrb_sym sym)
+{
+  while (c) {
+    if (c->iv) {
+      iv_tbl *t = c->iv;
+      if (iv_get(mrb, t, sym, NULL)) return TRUE;
+    }
+    c = c->super;
+  }
+
+  return FALSE;
+}
+
+MRB_API mrb_bool
+mrb_cv_defined(mrb_state *mrb, mrb_value mod, mrb_sym sym)
+{
+  return mrb_mod_cv_defined(mrb, mrb_class_ptr(mod), sym);
+}
+
+mrb_value
+mrb_vm_cv_get(mrb_state *mrb, mrb_sym sym)
+{
+  struct RClass *c = mrb->c->ci->proc->target_class;
+
+  if (!c) c = mrb->c->ci->target_class;
+
+  return mrb_mod_cv_get(mrb, c, sym);
+}
+
+void
+mrb_vm_cv_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
+{
+  struct RClass *c = mrb->c->ci->proc->target_class;
+
+  if (!c) c = mrb->c->ci->target_class;
+  mrb_mod_cv_set(mrb, c, sym, v);
+}
+
+static void
+mod_const_check(mrb_state *mrb, mrb_value mod)
+{
+  switch (mrb_type(mod)) {
+  case MRB_TT_CLASS:
+  case MRB_TT_MODULE:
+  case MRB_TT_SCLASS:
+    break;
+  default:
+    mrb_raise(mrb, E_TYPE_ERROR, "constant look-up for non class/module");
+    break;
+  }
+}
+
+static mrb_value
+const_get(mrb_state *mrb, struct RClass *base, mrb_sym sym)
+{
+  struct RClass *c = base;
+  mrb_value v;
+  iv_tbl *t;
+  mrb_bool retry = FALSE;
+  mrb_value name;
+
+L_RETRY:
+  while (c) {
+    if (c->iv) {
+      t = c->iv;
+      if (iv_get(mrb, t, sym, &v))
+        return v;
+    }
+    c = c->super;
+  }
+  if (!retry && base && base->tt == MRB_TT_MODULE) {
+    c = mrb->object_class;
+    retry = TRUE;
+    goto L_RETRY;
+  }
+  name = mrb_symbol_value(sym);
+  return mrb_funcall_argv(mrb, mrb_obj_value(base), mrb_intern_lit(mrb, "const_missing"), 1, &name);
+}
+
+MRB_API mrb_value
+mrb_const_get(mrb_state *mrb, mrb_value mod, mrb_sym sym)
+{
+  mod_const_check(mrb, mod);
+  return const_get(mrb, mrb_class_ptr(mod), sym);
+}
+
+mrb_value
+mrb_vm_const_get(mrb_state *mrb, mrb_sym sym)
+{
+  struct RClass *c = mrb->c->ci->proc->target_class;
+
+  if (!c) c = mrb->c->ci->target_class;
+  if (c) {
+    struct RClass *c2;
+    mrb_value v;
+
+    if (c->iv && iv_get(mrb, c->iv, sym, &v)) {
+      return v;
+    }
+    if (c->tt == MRB_TT_SCLASS) {
+      mrb_value klass;
+      klass = mrb_obj_iv_get(mrb, (struct RObject *)c,
+                             mrb_intern_lit(mrb, "__attached__"));
+      c2 = mrb_class_ptr(klass);
+      if (c2->tt == MRB_TT_CLASS)
+        c = c2;
+    }
+    c2 = c;
+    for (;;) {
+      c2 = mrb_class_outer_module(mrb, c2);
+      if (!c2) break;
+      if (c2->iv && iv_get(mrb, c2->iv, sym, &v)) {
+        return v;
+      }
+    }
+  }
+  return const_get(mrb, c, sym);
+}
+
+MRB_API void
+mrb_const_set(mrb_state *mrb, mrb_value mod, mrb_sym sym, mrb_value v)
+{
+  mod_const_check(mrb, mod);
+  mrb_iv_set(mrb, mod, sym, v);
+}
+
+void
+mrb_vm_const_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
+{
+  struct RClass *c = mrb->c->ci->proc->target_class;
+
+  if (!c) c = mrb->c->ci->target_class;
+  mrb_obj_iv_set(mrb, (struct RObject*)c, sym, v);
+}
+
+MRB_API void
+mrb_const_remove(mrb_state *mrb, mrb_value mod, mrb_sym sym)
+{
+  mod_const_check(mrb, mod);
+  mrb_iv_remove(mrb, mod, sym);
+}
+
+MRB_API void
+mrb_define_const(mrb_state *mrb, struct RClass *mod, const char *name, mrb_value v)
+{
+  mrb_obj_iv_set(mrb, (struct RObject*)mod, mrb_intern_cstr(mrb, name), v);
+}
+
+MRB_API void
+mrb_define_global_const(mrb_state *mrb, const char *name, mrb_value val)
+{
+  mrb_define_const(mrb, mrb->object_class, name, val);
+}
+
+static int
+const_i(mrb_state *mrb, mrb_sym sym, mrb_value v, void *p)
+{
+  mrb_value ary;
+  const char* s;
+  mrb_int len;
+
+  ary = *(mrb_value*)p;
+  s = mrb_sym2name_len(mrb, sym, &len);
+  if (len >= 1 && ISUPPER(s[0])) {
+    mrb_ary_push(mrb, ary, mrb_symbol_value(sym));
+  }
+  return 0;
+}
+
+/* 15.2.2.4.24 */
+/*
+ *  call-seq:
+ *     mod.constants    -> array
+ *
+ *  Returns an array of all names of contants defined in the receiver.
+ */
+mrb_value
+mrb_mod_constants(mrb_state *mrb, mrb_value mod)
+{
+  mrb_value ary;
+  mrb_bool inherit = TRUE;
+  struct RClass *c = mrb_class_ptr(mod);
+
+  mrb_get_args(mrb, "|b", &inherit);
+  ary = mrb_ary_new(mrb);
+  while (c) {
+    if (c->iv) {
+      iv_foreach(mrb, c->iv, const_i, &ary);
+    }
+    if (!inherit) break;
+    c = c->super;
+    if (c == mrb->object_class) break;
+  }
+  return ary;
+}
+
+MRB_API mrb_value
+mrb_gv_get(mrb_state *mrb, mrb_sym sym)
+{
+  mrb_value v;
+
+  if (!mrb->globals) {
+    return mrb_nil_value();
+  }
+  if (iv_get(mrb, mrb->globals, sym, &v))
+    return v;
+  return mrb_nil_value();
+}
+
+MRB_API void
+mrb_gv_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
+{
+  iv_tbl *t;
+
+  if (!mrb->globals) {
+    t = mrb->globals = iv_new(mrb);
+  }
+  else {
+    t = mrb->globals;
+  }
+  iv_put(mrb, t, sym, v);
+}
+
+MRB_API void
+mrb_gv_remove(mrb_state *mrb, mrb_sym sym)
+{
+  if (!mrb->globals) {
+    return;
+  }
+  iv_del(mrb, mrb->globals, sym, NULL);
+}
+
+static int
+gv_i(mrb_state *mrb, mrb_sym sym, mrb_value v, void *p)
+{
+  mrb_value ary;
+
+  ary = *(mrb_value*)p;
+  mrb_ary_push(mrb, ary, mrb_symbol_value(sym));
+  return 0;
+}
+
+/* 15.3.1.2.4  */
+/* 15.3.1.3.14 */
+/*
+ *  call-seq:
+ *     global_variables    -> array
+ *
+ *  Returns an array of the names of global variables.
+ *
+ *     global_variables.grep /std/   #=> [:$stdin, :$stdout, :$stderr]
+ */
+mrb_value
+mrb_f_global_variables(mrb_state *mrb, mrb_value self)
+{
+  iv_tbl *t = mrb->globals;
+  mrb_value ary = mrb_ary_new(mrb);
+  size_t i;
+  char buf[3];
+
+  if (t) {
+    iv_foreach(mrb, t, gv_i, &ary);
+  }
+  buf[0] = '$';
+  buf[2] = 0;
+  for (i = 1; i <= 9; ++i) {
+    buf[1] = (char)(i + '0');
+    mrb_ary_push(mrb, ary, mrb_symbol_value(mrb_intern(mrb, buf, 2)));
+  }
+  return ary;
+}
+
+static mrb_bool
+mrb_const_defined_0(mrb_state *mrb, mrb_value mod, mrb_sym id, mrb_bool exclude, mrb_bool recurse)
+{
+  struct RClass *klass = mrb_class_ptr(mod);
+  struct RClass *tmp;
+  mrb_bool mod_retry = 0;
+
+  tmp = klass;
+retry:
+  while (tmp) {
+    if (tmp->iv && iv_get(mrb, tmp->iv, id, NULL)) {
+      return TRUE;
+    }
+    if (!recurse && (klass != mrb->object_class)) break;
+    tmp = tmp->super;
+  }
+  if (!exclude && !mod_retry && (klass->tt == MRB_TT_MODULE)) {
+    mod_retry = 1;
+    tmp = mrb->object_class;
+    goto retry;
+  }
+  return FALSE;
+}
+
+MRB_API mrb_bool
+mrb_const_defined(mrb_state *mrb, mrb_value mod, mrb_sym id)
+{
+  return mrb_const_defined_0(mrb, mod, id, TRUE, TRUE);
+}
+
+MRB_API mrb_bool
+mrb_const_defined_at(mrb_state *mrb, mrb_value mod, mrb_sym id)
+{
+  return mrb_const_defined_0(mrb, mod, id, TRUE, FALSE);
+}
+
+MRB_API mrb_value
+mrb_attr_get(mrb_state *mrb, mrb_value obj, mrb_sym id)
+{
+  return mrb_iv_get(mrb, obj, id);
+}
+
+struct csym_arg {
+  struct RClass *c;
+  mrb_sym sym;
+};
+
+static int
+csym_i(mrb_state *mrb, mrb_sym sym, mrb_value v, void *p)
+{
+  struct csym_arg *a = (struct csym_arg*)p;
+  struct RClass *c = a->c;
+
+  if (mrb_type(v) == c->tt && mrb_class_ptr(v) == c) {
+    a->sym = sym;
+    return 1;     /* stop iteration */
+  }
+  return 0;
+}
+
+mrb_sym
+mrb_class_sym(mrb_state *mrb, struct RClass *c, struct RClass *outer)
+{
+  mrb_value name;
+
+  name = mrb_obj_iv_get(mrb, (struct RObject*)c, mrb_intern_lit(mrb, "__classid__"));
+  if (mrb_nil_p(name)) {
+
+    if (!outer) return 0;
+    else {
+      struct csym_arg arg;
+
+      arg.c = c;
+      arg.sym = 0;
+      iv_foreach(mrb, outer->iv, csym_i, &arg);
+      return arg.sym;
+    }
+  }
+  return mrb_symbol(name);
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/version.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/version.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/version.c	(revision 270)
@@ -0,0 +1,17 @@
+#include "mruby.h"
+#include "mruby/variable.h"
+
+void
+mrb_init_version(mrb_state* mrb)
+{
+  mrb_value mruby_version = mrb_str_new_lit(mrb, MRUBY_VERSION);
+
+  mrb_define_global_const(mrb, "RUBY_VERSION", mrb_str_new_lit(mrb, MRUBY_RUBY_VERSION));
+  mrb_define_global_const(mrb, "RUBY_ENGINE", mrb_str_new_lit(mrb, MRUBY_RUBY_ENGINE));
+  mrb_define_global_const(mrb, "RUBY_ENGINE_VERSION", mruby_version);
+  mrb_define_global_const(mrb, "MRUBY_VERSION", mrb_str_new_lit(mrb, MRUBY_VERSION));
+  mrb_define_global_const(mrb, "MRUBY_RELEASE_NO", mrb_fixnum_value(MRUBY_RELEASE_NO));
+  mrb_define_global_const(mrb, "MRUBY_RELEASE_DATE", mrb_str_new_lit(mrb, MRUBY_RELEASE_DATE));
+  mrb_define_global_const(mrb, "MRUBY_DESCRIPTION", mrb_str_new_lit(mrb, MRUBY_DESCRIPTION));
+  mrb_define_global_const(mrb, "MRUBY_COPYRIGHT", mrb_str_new_lit(mrb, MRUBY_COPYRIGHT));
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/src/vm.c
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/src/vm.c	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/src/vm.c	(revision 270)
@@ -0,0 +1,2427 @@
+/*
+** vm.c - virtual machine for mruby
+**
+** See Copyright Notice in mruby.h
+*/
+
+#include <stddef.h>
+#include <stdarg.h>
+#include <math.h>
+#include "mruby.h"
+#include "mruby/array.h"
+#include "mruby/class.h"
+#include "mruby/hash.h"
+#include "mruby/irep.h"
+#include "mruby/numeric.h"
+#include "mruby/proc.h"
+#include "mruby/range.h"
+#include "mruby/string.h"
+#include "mruby/variable.h"
+#include "mruby/error.h"
+#include "mruby/opcode.h"
+#include "value_array.h"
+#include "mruby/throw.h"
+
+#ifdef MRB_DISABLE_STDIO
+#if defined(__cplusplus)
+extern "C" {
+#endif
+void abort(void);
+#if defined(__cplusplus)
+}  /* extern "C" { */
+#endif
+#endif
+
+#define STACK_INIT_SIZE 128
+#define CALLINFO_INIT_SIZE 32
+
+/* Define amount of linear stack growth. */
+#ifndef MRB_STACK_GROWTH
+#define MRB_STACK_GROWTH 128
+#endif
+
+/* Maximum stack depth. Should be set lower on memory constrained systems.
+The value below allows about 60000 recursive calls in the simplest case. */
+#ifndef MRB_STACK_MAX
+#define MRB_STACK_MAX (0x40000 - MRB_STACK_GROWTH)
+#endif
+
+#ifdef VM_DEBUG
+# define DEBUG(x) (x)
+#else
+# define DEBUG(x)
+#endif
+
+#define ARENA_RESTORE(mrb,ai) (mrb)->gc.arena_idx = (ai)
+
+static inline void
+stack_clear(mrb_value *from, size_t count)
+{
+#ifndef MRB_NAN_BOXING
+  const mrb_value mrb_value_zero = { { 0 } };
+
+  while (count-- > 0) {
+    *from++ = mrb_value_zero;
+  }
+#else
+  while (count-- > 0) {
+    SET_NIL_VALUE(*from);
+    from++;
+  }
+#endif
+}
+
+static inline void
+stack_copy(mrb_value *dst, const mrb_value *src, size_t size)
+{
+  while (size-- > 0) {
+    *dst++ = *src++;
+  }
+}
+
+static void
+stack_init(mrb_state *mrb)
+{
+  struct mrb_context *c = mrb->c;
+
+  /* mrb_assert(mrb->stack == NULL); */
+  c->stbase = (mrb_value *)mrb_calloc(mrb, STACK_INIT_SIZE, sizeof(mrb_value));
+  c->stend = c->stbase + STACK_INIT_SIZE;
+  c->stack = c->stbase;
+
+  /* mrb_assert(ci == NULL); */
+  c->cibase = (mrb_callinfo *)mrb_calloc(mrb, CALLINFO_INIT_SIZE, sizeof(mrb_callinfo));
+  c->ciend = c->cibase + CALLINFO_INIT_SIZE;
+  c->ci = c->cibase;
+  c->ci->target_class = mrb->object_class;
+  c->ci->stackent = c->stack;
+}
+
+static inline void
+envadjust(mrb_state *mrb, mrb_value *oldbase, mrb_value *newbase)
+{
+  mrb_callinfo *ci = mrb->c->cibase;
+
+  if (newbase == oldbase) return;
+  while (ci <= mrb->c->ci) {
+    struct REnv *e = ci->env;
+    if (e && MRB_ENV_STACK_SHARED_P(e)) {
+      ptrdiff_t off = e->stack - oldbase;
+
+      e->stack = newbase + off;
+    }
+    ci->stackent = newbase + (ci->stackent - oldbase);
+    ci++;
+  }
+}
+
+static inline void
+init_new_stack_space(mrb_state *mrb, int room, int keep)
+{
+  if (room > keep) {
+    /* do not leave uninitialized malloc region */
+    stack_clear(&(mrb->c->stack[keep]), room - keep);
+  }
+}
+
+/** def rec ; $deep =+ 1 ; if $deep > 1000 ; return 0 ; end ; rec ; end  */
+
+static void
+stack_extend_alloc(mrb_state *mrb, int room, int keep)
+{
+  mrb_value *oldbase = mrb->c->stbase;
+  int size = mrb->c->stend - mrb->c->stbase;
+  int off = mrb->c->stack - mrb->c->stbase;
+
+#ifdef MRB_STACK_EXTEND_DOUBLING
+  if (room <= size)
+    size *= 2;
+  else
+    size += room;
+#else
+  /* Use linear stack growth.
+     It is slightly slower than doubling the stack space,
+     but it saves memory on small devices. */
+  if (room <= MRB_STACK_GROWTH)
+    size += MRB_STACK_GROWTH;
+  else
+    size += room;
+#endif
+
+  mrb->c->stbase = (mrb_value *)mrb_realloc(mrb, mrb->c->stbase, sizeof(mrb_value) * size);
+  mrb->c->stack = mrb->c->stbase + off;
+  mrb->c->stend = mrb->c->stbase + size;
+  envadjust(mrb, oldbase, mrb->c->stbase);
+
+  /* Raise an exception if the new stack size will be too large,
+     to prevent infinite recursion. However, do this only after resizing the stack, so mrb_raise has stack space to work with. */
+  if (size > MRB_STACK_MAX) {
+    init_new_stack_space(mrb, room, keep);
+    mrb_raise(mrb, E_SYSSTACK_ERROR, "stack level too deep. (limit=" MRB_STRINGIZE(MRB_STACK_MAX) ")");
+  }
+}
+
+static inline void
+stack_extend(mrb_state *mrb, int room, int keep)
+{
+  if (mrb->c->stack + room >= mrb->c->stend) {
+    stack_extend_alloc(mrb, room, keep);
+  }
+  init_new_stack_space(mrb, room, keep);
+}
+
+static inline struct REnv*
+uvenv(mrb_state *mrb, int up)
+{
+  struct REnv *e = mrb->c->ci->proc->env;
+
+  while (up--) {
+    if (!e) return NULL;
+    e = (struct REnv*)e->c;
+  }
+  return e;
+}
+
+static inline mrb_bool
+is_strict(mrb_state *mrb, struct REnv *e)
+{
+  int cioff = e->cioff;
+
+  if (MRB_ENV_STACK_SHARED_P(e) && mrb->c->cibase[cioff].proc &&
+      MRB_PROC_STRICT_P(mrb->c->cibase[cioff].proc)) {
+    return TRUE;
+  }
+  return FALSE;
+}
+
+static inline struct REnv*
+top_env(mrb_state *mrb, struct RProc *proc)
+{
+  struct REnv *e = proc->env;
+
+  if (is_strict(mrb, e)) return e;
+  while (e->c) {
+    e = (struct REnv*)e->c;
+    if (is_strict(mrb, e)) return e;
+  }
+  return e;
+}
+
+#define CI_ACC_SKIP    -1
+#define CI_ACC_DIRECT  -2
+
+static mrb_callinfo*
+cipush(mrb_state *mrb)
+{
+  struct mrb_context *c = mrb->c;
+  mrb_callinfo *ci = c->ci;
+
+  int eidx = ci->eidx;
+  int ridx = ci->ridx;
+
+  if (ci + 1 == c->ciend) {
+    ptrdiff_t size = ci - c->cibase;
+
+    c->cibase = (mrb_callinfo *)mrb_realloc(mrb, c->cibase, sizeof(mrb_callinfo)*size*2);
+    c->ci = c->cibase + size;
+    c->ciend = c->cibase + size * 2;
+  }
+  ci = ++c->ci;
+  ci->eidx = eidx;
+  ci->ridx = ridx;
+  ci->env = 0;
+  ci->pc = 0;
+  ci->err = 0;
+  ci->proc = 0;
+
+  return ci;
+}
+
+static void
+cipop(mrb_state *mrb)
+{
+  struct mrb_context *c = mrb->c;
+
+  if (c->ci->env) {
+    struct REnv *e = c->ci->env;
+    size_t len = (size_t)MRB_ENV_STACK_LEN(e);
+    mrb_value *p = (mrb_value *)mrb_malloc(mrb, sizeof(mrb_value)*len);
+
+    MRB_ENV_UNSHARE_STACK(e);
+    if (len > 0) {
+      stack_copy(p, e->stack, len);
+    }
+    e->stack = p;
+    mrb_write_barrier(mrb, (struct RBasic *)e);
+  }
+
+  c->ci--;
+}
+
+static void
+ecall(mrb_state *mrb, int i)
+{
+  struct RProc *p;
+  mrb_callinfo *ci;
+  mrb_value *self = mrb->c->stack;
+  struct RObject *exc;
+
+  if (i<0) return;
+  p = mrb->c->ensure[i];
+  if (!p) return;
+  if (mrb->c->ci->eidx > i)
+    mrb->c->ci->eidx = i;
+  ci = cipush(mrb);
+  ci->stackent = mrb->c->stack;
+  ci->mid = ci[-1].mid;
+  ci->acc = CI_ACC_SKIP;
+  ci->argc = 0;
+  ci->proc = p;
+  ci->nregs = p->body.irep->nregs;
+  ci->target_class = p->target_class;
+  mrb->c->stack = mrb->c->stack + ci[-1].nregs;
+  exc = mrb->exc; mrb->exc = 0;
+  mrb_run(mrb, p, *self);
+  mrb->c->ensure[i] = NULL;
+  if (!mrb->exc) mrb->exc = exc;
+}
+
+#ifndef MRB_FUNCALL_ARGC_MAX
+#define MRB_FUNCALL_ARGC_MAX 16
+#endif
+
+MRB_API mrb_value
+mrb_funcall(mrb_state *mrb, mrb_value self, const char *name, mrb_int argc, ...)
+{
+  mrb_value argv[MRB_FUNCALL_ARGC_MAX];
+  va_list ap;
+  mrb_int i;
+  mrb_sym mid = mrb_intern_cstr(mrb, name);
+
+  if (argc > MRB_FUNCALL_ARGC_MAX) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "Too long arguments. (limit=" MRB_STRINGIZE(MRB_FUNCALL_ARGC_MAX) ")");
+  }
+
+  va_start(ap, argc);
+  for (i = 0; i < argc; i++) {
+    argv[i] = va_arg(ap, mrb_value);
+  }
+  va_end(ap);
+  return mrb_funcall_argv(mrb, self, mid, argc, argv);
+}
+
+MRB_API mrb_value
+mrb_funcall_with_block(mrb_state *mrb, mrb_value self, mrb_sym mid, mrb_int argc, const mrb_value *argv, mrb_value blk)
+{
+  mrb_value val;
+
+  if (!mrb->jmp) {
+    struct mrb_jmpbuf c_jmp;
+    ptrdiff_t nth_ci = mrb->c->ci - mrb->c->cibase;
+
+    MRB_TRY(&c_jmp) {
+      mrb->jmp = &c_jmp;
+      /* recursive call */
+      val = mrb_funcall_with_block(mrb, self, mid, argc, argv, blk);
+      mrb->jmp = 0;
+    }
+    MRB_CATCH(&c_jmp) { /* error */
+      while (nth_ci < (mrb->c->ci - mrb->c->cibase)) {
+        mrb->c->stack = mrb->c->ci->stackent;
+        cipop(mrb);
+      }
+      mrb->jmp = 0;
+      val = mrb_obj_value(mrb->exc);
+    }
+    MRB_END_EXC(&c_jmp);
+  }
+  else {
+    struct RProc *p;
+    struct RClass *c;
+    mrb_sym undef = 0;
+    mrb_callinfo *ci;
+    int n;
+    ptrdiff_t voff = -1;
+
+    if (!mrb->c->stack) {
+      stack_init(mrb);
+    }
+    n = mrb->c->ci->nregs;
+    if (argc < 0) {
+      mrb_raisef(mrb, E_ARGUMENT_ERROR, "negative argc for funcall (%S)", mrb_fixnum_value(argc));
+    }
+    c = mrb_class(mrb, self);
+    p = mrb_method_search_vm(mrb, &c, mid);
+    if (!p) {
+      undef = mid;
+      mid = mrb_intern_lit(mrb, "method_missing");
+      p = mrb_method_search_vm(mrb, &c, mid);
+      n++; argc++;
+    }
+    ci = cipush(mrb);
+    ci->mid = mid;
+    ci->proc = p;
+    ci->stackent = mrb->c->stack;
+    ci->argc = argc;
+    ci->target_class = c;
+    mrb->c->stack = mrb->c->stack + n;
+    if (mrb->c->stbase <= argv && argv < mrb->c->stend) {
+      voff = argv - mrb->c->stbase;
+    }
+    if (MRB_PROC_CFUNC_P(p)) {
+      ci->nregs = argc + 2;
+      stack_extend(mrb, ci->nregs, 0);
+    }
+    else {
+      ci->nregs = p->body.irep->nregs + n;
+      stack_extend(mrb, ci->nregs, argc+2);
+    }
+    if (voff >= 0) {
+      argv = mrb->c->stbase + voff;
+    }
+    mrb->c->stack[0] = self;
+    if (undef) {
+      mrb->c->stack[1] = mrb_symbol_value(undef);
+      if (argc > 1) {
+        stack_copy(mrb->c->stack+2, argv, argc-1);
+      }
+    }
+    else if (argc > 0) {
+      stack_copy(mrb->c->stack+1, argv, argc);
+    }
+    mrb->c->stack[argc+1] = blk;
+
+    if (MRB_PROC_CFUNC_P(p)) {
+      int ai = mrb_gc_arena_save(mrb);
+
+      ci->acc = CI_ACC_DIRECT;
+      val = p->body.func(mrb, self);
+      mrb->c->stack = mrb->c->ci->stackent;
+      cipop(mrb);
+      mrb_gc_arena_restore(mrb, ai);
+    }
+    else {
+      ci->acc = CI_ACC_SKIP;
+      val = mrb_run(mrb, p, self);
+    }
+  }
+  mrb_gc_protect(mrb, val);
+  return val;
+}
+
+MRB_API mrb_value
+mrb_funcall_argv(mrb_state *mrb, mrb_value self, mrb_sym mid, mrb_int argc, const mrb_value *argv)
+{
+  return mrb_funcall_with_block(mrb, self, mid, argc, argv, mrb_nil_value());
+}
+
+/* 15.3.1.3.4  */
+/* 15.3.1.3.44 */
+/*
+ *  call-seq:
+ *     obj.send(symbol [, args...])        -> obj
+ *     obj.__send__(symbol [, args...])      -> obj
+ *
+ *  Invokes the method identified by _symbol_, passing it any
+ *  arguments specified. You can use <code>__send__</code> if the name
+ *  +send+ clashes with an existing method in _obj_.
+ *
+ *     class Klass
+ *       def hello(*args)
+ *         "Hello " + args.join(' ')
+ *       end
+ *     end
+ *     k = Klass.new
+ *     k.send :hello, "gentle", "readers"   #=> "Hello gentle readers"
+ */
+MRB_API mrb_value
+mrb_f_send(mrb_state *mrb, mrb_value self)
+{
+  mrb_sym name;
+  mrb_value block, *argv, *regs;
+  mrb_int argc, i, len;
+  struct RProc *p;
+  struct RClass *c;
+  mrb_callinfo *ci;
+
+  mrb_get_args(mrb, "n*&", &name, &argv, &argc, &block);
+
+  c = mrb_class(mrb, self);
+  p = mrb_method_search_vm(mrb, &c, name);
+
+  if (!p) {                     /* call method_mising */
+    return mrb_funcall_with_block(mrb, self, name, argc, argv, block);
+  }
+
+  ci = mrb->c->ci;
+  ci->mid = name;
+  ci->target_class = c;
+  ci->proc = p;
+  regs = mrb->c->stack+1;
+  /* remove first symbol from arguments */
+  if (ci->argc >= 0) {
+    for (i=0,len=ci->argc; i<len; i++) {
+      regs[i] = regs[i+1];
+    }
+    ci->argc--;
+  }
+  else {                     /* variable length arguments */
+    mrb_ary_shift(mrb, regs[0]);
+  }
+
+  if (MRB_PROC_CFUNC_P(p)) {
+    return p->body.func(mrb, self);
+  }
+
+  if (ci->argc < 0) {
+    stack_extend(mrb, (p->body.irep->nregs < 3) ? 3 : p->body.irep->nregs, 3);
+  }
+  else {
+    stack_extend(mrb, p->body.irep->nregs, ci->argc+2);
+  }
+
+  ci->nregs = p->body.irep->nregs;
+  ci = cipush(mrb);
+  ci->nregs = 0;
+  ci->target_class = 0;
+  ci->pc = p->body.irep->iseq;
+  ci->stackent = mrb->c->stack;
+  ci->acc = 0;
+
+  return self;
+}
+
+static mrb_value
+eval_under(mrb_state *mrb, mrb_value self, mrb_value blk, struct RClass *c)
+{
+  struct RProc *p;
+  mrb_callinfo *ci;
+
+  if (mrb_nil_p(blk)) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "no block given");
+  }
+  ci = mrb->c->ci;
+  if (ci->acc == CI_ACC_DIRECT) {
+    return mrb_yield_with_class(mrb, blk, 0, 0, self, c);
+  }
+  ci->target_class = c;
+  p = mrb_proc_ptr(blk);
+  ci->proc = p;
+  if (MRB_PROC_CFUNC_P(p)) {
+    return p->body.func(mrb, self);
+  }
+  ci->nregs = p->body.irep->nregs;
+  ci = cipush(mrb);
+  ci->nregs = 0;
+  ci->target_class = 0;
+  ci->pc = p->body.irep->iseq;
+  ci->stackent = mrb->c->stack;
+  ci->acc = 0;
+
+  return self;
+}
+
+/* 15.2.2.4.35 */
+/*
+ *  call-seq:
+ *     mod.class_eval {| | block }  -> obj
+ *     mod.module_eval {| | block } -> obj
+ *
+ *  Evaluates block in the context of _mod_. This can
+ *  be used to add methods to a class. <code>module_eval</code> returns
+ *  the result of evaluating its argument.
+ */
+mrb_value
+mrb_mod_module_eval(mrb_state *mrb, mrb_value mod)
+{
+  mrb_value a, b;
+
+  if (mrb_get_args(mrb, "|S&", &a, &b) == 1) {
+    mrb_raise(mrb, E_NOTIMP_ERROR, "module_eval/class_eval with string not implemented");
+  }
+  return eval_under(mrb, mod, b, mrb_class_ptr(mod));
+}
+
+/* 15.3.1.3.18 */
+/*
+ *  call-seq:
+ *     obj.instance_eval {| | block }                       -> obj
+ *
+ *  Evaluates the given block,within  the context of the receiver (_obj_).
+ *  In order to set the context, the variable +self+ is set to _obj_ while
+ *  the code is executing, giving the code access to _obj_'s
+ *  instance variables. In the version of <code>instance_eval</code>
+ *  that takes a +String+, the optional second and third
+ *  parameters supply a filename and starting line number that are used
+ *  when reporting compilation errors.
+ *
+ *     class KlassWithSecret
+ *       def initialize
+ *         @secret = 99
+ *       end
+ *     end
+ *     k = KlassWithSecret.new
+ *     k.instance_eval { @secret }   #=> 99
+ */
+mrb_value
+mrb_obj_instance_eval(mrb_state *mrb, mrb_value self)
+{
+  mrb_value a, b;
+  mrb_value cv;
+  struct RClass *c;
+
+  if (mrb_get_args(mrb, "|S&", &a, &b) == 1) {
+    mrb_raise(mrb, E_NOTIMP_ERROR, "instance_eval with string not implemented");
+  }
+  switch (mrb_type(self)) {
+  case MRB_TT_SYMBOL:
+  case MRB_TT_FIXNUM:
+  case MRB_TT_FLOAT:
+    c = 0;
+    break;
+  default:
+    cv = mrb_singleton_class(mrb, self);
+    c = mrb_class_ptr(cv);
+    break;
+  }
+  return eval_under(mrb, self, b, c);
+}
+
+MRB_API mrb_value
+mrb_yield_with_class(mrb_state *mrb, mrb_value b, mrb_int argc, const mrb_value *argv, mrb_value self, struct RClass *c)
+{
+  struct RProc *p;
+  mrb_sym mid = mrb->c->ci->mid;
+  mrb_callinfo *ci;
+  int n = mrb->c->ci->nregs;
+  mrb_value val;
+
+  if (mrb_nil_p(b)) {
+    mrb_raise(mrb, E_ARGUMENT_ERROR, "no block given");
+  }
+  p = mrb_proc_ptr(b);
+  ci = cipush(mrb);
+  ci->mid = mid;
+  ci->proc = p;
+  ci->stackent = mrb->c->stack;
+  ci->argc = argc;
+  ci->target_class = c;
+  ci->acc = CI_ACC_SKIP;
+  mrb->c->stack = mrb->c->stack + n;
+  if (MRB_PROC_CFUNC_P(p)) {
+    ci->nregs = argc + 2;
+    stack_extend(mrb, ci->nregs, 0);
+  }
+  else {
+    ci->nregs = p->body.irep->nregs;
+    stack_extend(mrb, ci->nregs, argc+2);
+  }
+
+  mrb->c->stack[0] = self;
+  if (argc > 0) {
+    stack_copy(mrb->c->stack+1, argv, argc);
+  }
+  mrb->c->stack[argc+1] = mrb_nil_value();
+
+  if (MRB_PROC_CFUNC_P(p)) {
+    val = p->body.func(mrb, self);
+    mrb->c->stack = mrb->c->ci->stackent;
+    cipop(mrb);
+  }
+  else {
+    val = mrb_run(mrb, p, self);
+  }
+  return val;
+}
+
+MRB_API mrb_value
+mrb_yield_argv(mrb_state *mrb, mrb_value b, mrb_int argc, const mrb_value *argv)
+{
+  struct RProc *p = mrb_proc_ptr(b);
+
+  return mrb_yield_with_class(mrb, b, argc, argv, p->env->stack[0], p->target_class);
+}
+
+MRB_API mrb_value
+mrb_yield(mrb_state *mrb, mrb_value b, mrb_value arg)
+{
+  struct RProc *p = mrb_proc_ptr(b);
+
+  return mrb_yield_with_class(mrb, b, 1, &arg, p->env->stack[0], p->target_class);
+}
+
+typedef enum {
+  LOCALJUMP_ERROR_RETURN = 0,
+  LOCALJUMP_ERROR_BREAK = 1,
+  LOCALJUMP_ERROR_YIELD = 2
+} localjump_error_kind;
+
+static void
+localjump_error(mrb_state *mrb, localjump_error_kind kind)
+{
+  char kind_str[3][7] = { "return", "break", "yield" };
+  char kind_str_len[] = { 6, 5, 5 };
+  static const char lead[] = "unexpected ";
+  mrb_value msg;
+  mrb_value exc;
+
+  msg = mrb_str_buf_new(mrb, sizeof(lead) + 7);
+  mrb_str_cat(mrb, msg, lead, sizeof(lead) - 1);
+  mrb_str_cat(mrb, msg, kind_str[kind], kind_str_len[kind]);
+  exc = mrb_exc_new_str(mrb, E_LOCALJUMP_ERROR, msg);
+  mrb->exc = mrb_obj_ptr(exc);
+}
+
+static void
+argnum_error(mrb_state *mrb, mrb_int num)
+{
+  mrb_value exc;
+  mrb_value str;
+
+  if (mrb->c->ci->mid) {
+    str = mrb_format(mrb, "'%S': wrong number of arguments (%S for %S)",
+                  mrb_sym2str(mrb, mrb->c->ci->mid),
+                  mrb_fixnum_value(mrb->c->ci->argc), mrb_fixnum_value(num));
+  }
+  else {
+    str = mrb_format(mrb, "wrong number of arguments (%S for %S)",
+                  mrb_fixnum_value(mrb->c->ci->argc), mrb_fixnum_value(num));
+  }
+  exc = mrb_exc_new_str(mrb, E_ARGUMENT_ERROR, str);
+  mrb->exc = mrb_obj_ptr(exc);
+}
+
+#define ERR_PC_SET(mrb, pc) mrb->c->ci->err = pc;
+#define ERR_PC_CLR(mrb)     mrb->c->ci->err = 0;
+#ifdef MRB_ENABLE_DEBUG_HOOK
+#define CODE_FETCH_HOOK(mrb, irep, pc, regs) if ((mrb)->code_fetch_hook) (mrb)->code_fetch_hook((mrb), (irep), (pc), (regs));
+#else
+#define CODE_FETCH_HOOK(mrb, irep, pc, regs)
+#endif
+
+#if defined __GNUC__ || defined __clang__ || defined __INTEL_COMPILER
+#define DIRECT_THREADED
+#endif
+
+#ifndef DIRECT_THREADED
+
+#define INIT_DISPATCH for (;;) { i = *pc; CODE_FETCH_HOOK(mrb, irep, pc, regs); switch (GET_OPCODE(i)) {
+#define CASE(op) case op:
+#define NEXT pc++; break
+#define JUMP break
+#define END_DISPATCH }}
+
+#else
+
+#define INIT_DISPATCH JUMP; return mrb_nil_value();
+#define CASE(op) L_ ## op:
+#define NEXT i=*++pc; CODE_FETCH_HOOK(mrb, irep, pc, regs); goto *optable[GET_OPCODE(i)]
+#define JUMP i=*pc; CODE_FETCH_HOOK(mrb, irep, pc, regs); goto *optable[GET_OPCODE(i)]
+
+#define END_DISPATCH
+
+#endif
+
+#define CALL_MAXARGS 127
+
+void mrb_method_missing(mrb_state *mrb, mrb_sym name, mrb_value self, mrb_value args);
+
+MRB_API mrb_value
+mrb_context_run(mrb_state *mrb, struct RProc *proc, mrb_value self, unsigned int stack_keep)
+{
+  /* mrb_assert(mrb_proc_cfunc_p(proc)) */
+  mrb_irep *irep = proc->body.irep;
+  mrb_code *pc = irep->iseq;
+  mrb_value *pool = irep->pool;
+  mrb_sym *syms = irep->syms;
+  mrb_value *regs = NULL;
+  mrb_code i;
+  int ai = mrb_gc_arena_save(mrb);
+  struct mrb_jmpbuf *prev_jmp = mrb->jmp;
+  struct mrb_jmpbuf c_jmp;
+
+#ifdef DIRECT_THREADED
+  static void *optable[] = {
+    &&L_OP_NOP, &&L_OP_MOVE,
+    &&L_OP_LOADL, &&L_OP_LOADI, &&L_OP_LOADSYM, &&L_OP_LOADNIL,
+    &&L_OP_LOADSELF, &&L_OP_LOADT, &&L_OP_LOADF,
+    &&L_OP_GETGLOBAL, &&L_OP_SETGLOBAL, &&L_OP_GETSPECIAL, &&L_OP_SETSPECIAL,
+    &&L_OP_GETIV, &&L_OP_SETIV, &&L_OP_GETCV, &&L_OP_SETCV,
+    &&L_OP_GETCONST, &&L_OP_SETCONST, &&L_OP_GETMCNST, &&L_OP_SETMCNST,
+    &&L_OP_GETUPVAR, &&L_OP_SETUPVAR,
+    &&L_OP_JMP, &&L_OP_JMPIF, &&L_OP_JMPNOT,
+    &&L_OP_ONERR, &&L_OP_RESCUE, &&L_OP_POPERR, &&L_OP_RAISE, &&L_OP_EPUSH, &&L_OP_EPOP,
+    &&L_OP_SEND, &&L_OP_SENDB, &&L_OP_FSEND,
+    &&L_OP_CALL, &&L_OP_SUPER, &&L_OP_ARGARY, &&L_OP_ENTER,
+    &&L_OP_KARG, &&L_OP_KDICT, &&L_OP_RETURN, &&L_OP_TAILCALL, &&L_OP_BLKPUSH,
+    &&L_OP_ADD, &&L_OP_ADDI, &&L_OP_SUB, &&L_OP_SUBI, &&L_OP_MUL, &&L_OP_DIV,
+    &&L_OP_EQ, &&L_OP_LT, &&L_OP_LE, &&L_OP_GT, &&L_OP_GE,
+    &&L_OP_ARRAY, &&L_OP_ARYCAT, &&L_OP_ARYPUSH, &&L_OP_AREF, &&L_OP_ASET, &&L_OP_APOST,
+    &&L_OP_STRING, &&L_OP_STRCAT, &&L_OP_HASH,
+    &&L_OP_LAMBDA, &&L_OP_RANGE, &&L_OP_OCLASS,
+    &&L_OP_CLASS, &&L_OP_MODULE, &&L_OP_EXEC,
+    &&L_OP_METHOD, &&L_OP_SCLASS, &&L_OP_TCLASS,
+    &&L_OP_DEBUG, &&L_OP_STOP, &&L_OP_ERR,
+  };
+#endif
+
+  mrb_bool exc_catched = FALSE;
+RETRY_TRY_BLOCK:
+
+  MRB_TRY(&c_jmp) {
+
+  if (exc_catched) {
+    exc_catched = FALSE;
+    goto L_RAISE;
+  }
+  mrb->jmp = &c_jmp;
+  if (!mrb->c->stack) {
+    stack_init(mrb);
+  }
+  stack_extend(mrb, irep->nregs, stack_keep);
+  mrb->c->ci->proc = proc;
+  mrb->c->ci->nregs = irep->nregs;
+  regs = mrb->c->stack;
+  regs[0] = self;
+
+  INIT_DISPATCH {
+    CASE(OP_NOP) {
+      /* do nothing */
+      NEXT;
+    }
+
+    CASE(OP_MOVE) {
+      /* A B    R(A) := R(B) */
+      regs[GETARG_A(i)] = regs[GETARG_B(i)];
+      NEXT;
+    }
+
+    CASE(OP_LOADL) {
+      /* A Bx   R(A) := Pool(Bx) */
+      regs[GETARG_A(i)] = pool[GETARG_Bx(i)];
+      NEXT;
+    }
+
+    CASE(OP_LOADI) {
+      /* A sBx  R(A) := sBx */
+      SET_INT_VALUE(regs[GETARG_A(i)], GETARG_sBx(i));
+      NEXT;
+    }
+
+    CASE(OP_LOADSYM) {
+      /* A Bx   R(A) := Syms(Bx) */
+      SET_SYM_VALUE(regs[GETARG_A(i)], syms[GETARG_Bx(i)]);
+      NEXT;
+    }
+
+    CASE(OP_LOADSELF) {
+      /* A      R(A) := self */
+      regs[GETARG_A(i)] = regs[0];
+      NEXT;
+    }
+
+    CASE(OP_LOADT) {
+      /* A      R(A) := true */
+      SET_TRUE_VALUE(regs[GETARG_A(i)]);
+      NEXT;
+    }
+
+    CASE(OP_LOADF) {
+      /* A      R(A) := false */
+      SET_FALSE_VALUE(regs[GETARG_A(i)]);
+      NEXT;
+    }
+
+    CASE(OP_GETGLOBAL) {
+      /* A Bx   R(A) := getglobal(Syms(Bx)) */
+      regs[GETARG_A(i)] = mrb_gv_get(mrb, syms[GETARG_Bx(i)]);
+      NEXT;
+    }
+
+    CASE(OP_SETGLOBAL) {
+      /* setglobal(Syms(Bx), R(A)) */
+      mrb_gv_set(mrb, syms[GETARG_Bx(i)], regs[GETARG_A(i)]);
+      NEXT;
+    }
+
+    CASE(OP_GETSPECIAL) {
+      /* A Bx   R(A) := Special[Bx] */
+      regs[GETARG_A(i)] = mrb_vm_special_get(mrb, GETARG_Bx(i));
+      NEXT;
+    }
+
+    CASE(OP_SETSPECIAL) {
+      /* A Bx   Special[Bx] := R(A) */
+      mrb_vm_special_set(mrb, GETARG_Bx(i), regs[GETARG_A(i)]);
+      NEXT;
+    }
+
+    CASE(OP_GETIV) {
+      /* A Bx   R(A) := ivget(Bx) */
+      regs[GETARG_A(i)] = mrb_vm_iv_get(mrb, syms[GETARG_Bx(i)]);
+      NEXT;
+    }
+
+    CASE(OP_SETIV) {
+      /* ivset(Syms(Bx),R(A)) */
+      mrb_vm_iv_set(mrb, syms[GETARG_Bx(i)], regs[GETARG_A(i)]);
+      NEXT;
+    }
+
+    CASE(OP_GETCV) {
+      /* A Bx   R(A) := cvget(Syms(Bx)) */
+      ERR_PC_SET(mrb, pc);
+      regs[GETARG_A(i)] = mrb_vm_cv_get(mrb, syms[GETARG_Bx(i)]);
+      ERR_PC_CLR(mrb);
+      NEXT;
+    }
+
+    CASE(OP_SETCV) {
+      /* cvset(Syms(Bx),R(A)) */
+      mrb_vm_cv_set(mrb, syms[GETARG_Bx(i)], regs[GETARG_A(i)]);
+      NEXT;
+    }
+
+    CASE(OP_GETCONST) {
+      /* A Bx    R(A) := constget(Syms(Bx)) */
+      mrb_value val;
+
+      ERR_PC_SET(mrb, pc);
+      val = mrb_vm_const_get(mrb, syms[GETARG_Bx(i)]);
+      ERR_PC_CLR(mrb);
+      regs = mrb->c->stack;
+      regs[GETARG_A(i)] = val;
+      NEXT;
+    }
+
+    CASE(OP_SETCONST) {
+      /* A Bx   constset(Syms(Bx),R(A)) */
+      mrb_vm_const_set(mrb, syms[GETARG_Bx(i)], regs[GETARG_A(i)]);
+      NEXT;
+    }
+
+    CASE(OP_GETMCNST) {
+      /* A Bx   R(A) := R(A)::Syms(Bx) */
+      mrb_value val;
+      int a = GETARG_A(i);
+
+      ERR_PC_SET(mrb, pc);
+      val = mrb_const_get(mrb, regs[a], syms[GETARG_Bx(i)]);
+      ERR_PC_CLR(mrb);
+      regs = mrb->c->stack;
+      regs[a] = val;
+      NEXT;
+    }
+
+    CASE(OP_SETMCNST) {
+      /* A Bx    R(A+1)::Syms(Bx) := R(A) */
+      int a = GETARG_A(i);
+
+      mrb_const_set(mrb, regs[a+1], syms[GETARG_Bx(i)], regs[a]);
+      NEXT;
+    }
+
+    CASE(OP_GETUPVAR) {
+      /* A B C  R(A) := uvget(B,C) */
+      mrb_value *regs_a = regs + GETARG_A(i);
+      int up = GETARG_C(i);
+
+      struct REnv *e = uvenv(mrb, up);
+
+      if (!e) {
+        *regs_a = mrb_nil_value();
+      }
+      else {
+        int idx = GETARG_B(i);
+        *regs_a = e->stack[idx];
+      }
+      NEXT;
+    }
+
+    CASE(OP_SETUPVAR) {
+      /* A B C  uvset(B,C,R(A)) */
+      int up = GETARG_C(i);
+
+      struct REnv *e = uvenv(mrb, up);
+
+      if (e) {
+        mrb_value *regs_a = regs + GETARG_A(i);
+        int idx = GETARG_B(i);
+        e->stack[idx] = *regs_a;
+        mrb_write_barrier(mrb, (struct RBasic*)e);
+      }
+      NEXT;
+    }
+
+    CASE(OP_JMP) {
+      /* sBx    pc+=sBx */
+      pc += GETARG_sBx(i);
+      JUMP;
+    }
+
+    CASE(OP_JMPIF) {
+      /* A sBx  if R(A) pc+=sBx */
+      if (mrb_test(regs[GETARG_A(i)])) {
+        pc += GETARG_sBx(i);
+        JUMP;
+      }
+      NEXT;
+    }
+
+    CASE(OP_JMPNOT) {
+      /* A sBx  if !R(A) pc+=sBx */
+      if (!mrb_test(regs[GETARG_A(i)])) {
+        pc += GETARG_sBx(i);
+        JUMP;
+      }
+      NEXT;
+    }
+
+    CASE(OP_ONERR) {
+      /* sBx    pc+=sBx on exception */
+      if (mrb->c->rsize <= mrb->c->ci->ridx) {
+        if (mrb->c->rsize == 0) mrb->c->rsize = 16;
+        else mrb->c->rsize *= 2;
+        mrb->c->rescue = (mrb_code **)mrb_realloc(mrb, mrb->c->rescue, sizeof(mrb_code*) * mrb->c->rsize);
+      }
+      mrb->c->rescue[mrb->c->ci->ridx++] = pc + GETARG_sBx(i);
+      NEXT;
+    }
+
+    CASE(OP_RESCUE) {
+      /* A      R(A) := exc; clear(exc) */
+      SET_OBJ_VALUE(regs[GETARG_A(i)], mrb->exc);
+      mrb->exc = 0;
+      NEXT;
+    }
+
+    CASE(OP_POPERR) {
+      /* A      A.times{rescue_pop()} */
+      int a = GETARG_A(i);
+
+      while (a--) {
+        mrb->c->ci->ridx--;
+      }
+      NEXT;
+    }
+
+    CASE(OP_RAISE) {
+      /* A      raise(R(A)) */
+      mrb->exc = mrb_obj_ptr(regs[GETARG_A(i)]);
+      goto L_RAISE;
+    }
+
+    CASE(OP_EPUSH) {
+      /* Bx     ensure_push(SEQ[Bx]) */
+      struct RProc *p;
+
+      p = mrb_closure_new(mrb, irep->reps[GETARG_Bx(i)]);
+      /* push ensure_stack */
+      if (mrb->c->esize <= mrb->c->ci->eidx) {
+        if (mrb->c->esize == 0) mrb->c->esize = 16;
+        else mrb->c->esize *= 2;
+        mrb->c->ensure = (struct RProc **)mrb_realloc(mrb, mrb->c->ensure, sizeof(struct RProc*) * mrb->c->esize);
+      }
+      mrb->c->ensure[mrb->c->ci->eidx++] = p;
+      ARENA_RESTORE(mrb, ai);
+      NEXT;
+    }
+
+    CASE(OP_EPOP) {
+      /* A      A.times{ensure_pop().call} */
+      int a = GETARG_A(i);
+      mrb_callinfo *ci = mrb->c->ci;
+      int n, eidx = ci->eidx;
+
+      for (n=0; n<a && (ci == mrb->c->cibase || eidx > ci[-1].eidx); n++) {
+        ecall(mrb, --eidx);
+        ARENA_RESTORE(mrb, ai);
+      }
+      NEXT;
+    }
+
+    CASE(OP_LOADNIL) {
+      /* A     R(A) := nil */
+      int a = GETARG_A(i);
+
+      SET_NIL_VALUE(regs[a]);
+      NEXT;
+    }
+
+    CASE(OP_SENDB) {
+      /* A B C  R(A) := call(R(A),Syms(B),R(A+1),...,R(A+C),&R(A+C+1))*/
+      /* fall through */
+    };
+
+  L_SEND:
+    CASE(OP_SEND) {
+      /* A B C  R(A) := call(R(A),Syms(B),R(A+1),...,R(A+C)) */
+      int a = GETARG_A(i);
+      int n = GETARG_C(i);
+      struct RProc *m;
+      struct RClass *c;
+      mrb_callinfo *ci;
+      mrb_value recv, result;
+      mrb_sym mid = syms[GETARG_B(i)];
+
+      recv = regs[a];
+      if (GET_OPCODE(i) != OP_SENDB) {
+        if (n == CALL_MAXARGS) {
+          SET_NIL_VALUE(regs[a+2]);
+        }
+        else {
+          SET_NIL_VALUE(regs[a+n+1]);
+        }
+      }
+      c = mrb_class(mrb, recv);
+      m = mrb_method_search_vm(mrb, &c, mid);
+      if (!m) {
+        mrb_value sym = mrb_symbol_value(mid);
+        mrb_sym missing = mrb_intern_lit(mrb, "method_missing");
+
+        m = mrb_method_search_vm(mrb, &c, missing);
+        if (!m) {
+          mrb_value args;
+
+          if (n == CALL_MAXARGS) {
+            args = regs[a+1];
+          }
+          else {
+            args = mrb_ary_new_from_values(mrb, n, regs+a+1);
+          }
+          mrb_method_missing(mrb, mid, recv, args);
+        }
+        mid = missing;
+        if (n == CALL_MAXARGS) {
+          mrb_ary_unshift(mrb, regs[a+1], sym);
+        }
+        else {
+          value_move(regs+a+2, regs+a+1, ++n);
+          regs[a+1] = sym;
+        }
+      }
+
+      /* push callinfo */
+      ci = cipush(mrb);
+      ci->mid = mid;
+      ci->proc = m;
+      ci->stackent = mrb->c->stack;
+      ci->target_class = c;
+
+      ci->pc = pc + 1;
+      ci->acc = a;
+
+      /* prepare stack */
+      mrb->c->stack += a;
+
+      if (MRB_PROC_CFUNC_P(m)) {
+        if (n == CALL_MAXARGS) {
+          ci->argc = -1;
+          ci->nregs = 3;
+        }
+        else {
+          ci->argc = n;
+          ci->nregs = n + 2;
+        }
+        result = m->body.func(mrb, recv);
+        mrb->c->stack[0] = result;
+        mrb_gc_arena_restore(mrb, ai);
+        if (mrb->exc) goto L_RAISE;
+        /* pop stackpos */
+        ci = mrb->c->ci;
+        if (!ci->target_class) { /* return from context modifying method (resume/yield) */
+          if (!MRB_PROC_CFUNC_P(ci[-1].proc)) {
+            proc = ci[-1].proc;
+            irep = proc->body.irep;
+            pool = irep->pool;
+            syms = irep->syms;
+          }
+        }
+        regs = mrb->c->stack = ci->stackent;
+        pc = ci->pc;
+        cipop(mrb);
+        JUMP;
+      }
+      else {
+        /* setup environment for calling method */
+        proc = mrb->c->ci->proc = m;
+        irep = m->body.irep;
+        pool = irep->pool;
+        syms = irep->syms;
+        ci->nregs = irep->nregs;
+        if (n == CALL_MAXARGS) {
+          ci->argc = -1;
+          stack_extend(mrb, (irep->nregs < 3) ? 3 : irep->nregs, 3);
+        }
+        else {
+          ci->argc = n;
+          stack_extend(mrb, irep->nregs,  n+2);
+        }
+        regs = mrb->c->stack;
+        pc = irep->iseq;
+        JUMP;
+      }
+    }
+
+    CASE(OP_FSEND) {
+      /* A B C  R(A) := fcall(R(A),Syms(B),R(A+1),... ,R(A+C-1)) */
+      NEXT;
+    }
+
+    CASE(OP_CALL) {
+      /* A      R(A) := self.call(frame.argc, frame.argv) */
+      mrb_callinfo *ci;
+      mrb_value recv = mrb->c->stack[0];
+      struct RProc *m = mrb_proc_ptr(recv);
+
+      /* replace callinfo */
+      ci = mrb->c->ci;
+      ci->target_class = m->target_class;
+      ci->proc = m;
+      if (m->env) {
+        if (m->env->mid) {
+          ci->mid = m->env->mid;
+        }
+        if (!m->env->stack) {
+          m->env->stack = mrb->c->stack;
+        }
+      }
+
+      /* prepare stack */
+      if (MRB_PROC_CFUNC_P(m)) {
+        recv = m->body.func(mrb, recv);
+        mrb_gc_arena_restore(mrb, ai);
+        if (mrb->exc) goto L_RAISE;
+        /* pop stackpos */
+        ci = mrb->c->ci;
+        regs = mrb->c->stack = ci->stackent;
+        regs[ci->acc] = recv;
+        pc = ci->pc;
+        cipop(mrb);
+        irep = mrb->c->ci->proc->body.irep;
+        pool = irep->pool;
+        syms = irep->syms;
+        JUMP;
+      }
+      else {
+        /* setup environment for calling method */
+        proc = m;
+        irep = m->body.irep;
+        if (!irep) {
+          mrb->c->stack[0] = mrb_nil_value();
+          goto L_RETURN;
+        }
+        pool = irep->pool;
+        syms = irep->syms;
+        ci->nregs = irep->nregs;
+        if (ci->argc < 0) {
+          stack_extend(mrb, (irep->nregs < 3) ? 3 : irep->nregs, 3);
+        }
+        else {
+          stack_extend(mrb, irep->nregs, ci->argc+2);
+        }
+        regs = mrb->c->stack;
+        regs[0] = m->env->stack[0];
+        pc = irep->iseq;
+        JUMP;
+      }
+    }
+
+    CASE(OP_SUPER) {
+      /* A C  R(A) := super(R(A+1),... ,R(A+C+1)) */
+      mrb_value recv;
+      mrb_callinfo *ci = mrb->c->ci;
+      struct RProc *m;
+      struct RClass *c;
+      mrb_sym mid = ci->mid;
+      int a = GETARG_A(i);
+      int n = GETARG_C(i);
+
+      if (mid == 0) {
+        mrb_value exc;
+
+        exc = mrb_exc_new_str_lit(mrb, E_NOMETHOD_ERROR, "super called outside of method");
+        mrb->exc = mrb_obj_ptr(exc);
+        goto L_RAISE;
+      }
+      recv = regs[0];
+      c = mrb->c->ci->target_class->super;
+      m = mrb_method_search_vm(mrb, &c, mid);
+      if (!m) {
+        mid = mrb_intern_lit(mrb, "method_missing");
+        m = mrb_method_search_vm(mrb, &c, mid);
+        if (n == CALL_MAXARGS) {
+          mrb_ary_unshift(mrb, regs[a+1], mrb_symbol_value(ci->mid));
+        }
+        else {
+          value_move(regs+a+2, regs+a+1, ++n);
+          SET_SYM_VALUE(regs[a+1], ci->mid);
+        }
+      }
+
+      /* push callinfo */
+      ci = cipush(mrb);
+      ci->mid = mid;
+      ci->proc = m;
+      ci->stackent = mrb->c->stack;
+      if (n == CALL_MAXARGS) {
+        ci->argc = -1;
+      }
+      else {
+        ci->argc = n;
+      }
+      ci->target_class = c;
+      ci->pc = pc + 1;
+
+      /* prepare stack */
+      mrb->c->stack += a;
+      mrb->c->stack[0] = recv;
+
+      if (MRB_PROC_CFUNC_P(m)) {
+        if (n == CALL_MAXARGS) {
+          ci->nregs = 3;
+        }
+        else {
+          ci->nregs = n + 2;
+        }
+        mrb->c->stack[0] = m->body.func(mrb, recv);
+        mrb_gc_arena_restore(mrb, ai);
+        if (mrb->exc) goto L_RAISE;
+        /* pop stackpos */
+        regs = mrb->c->stack = mrb->c->ci->stackent;
+        cipop(mrb);
+        NEXT;
+      }
+      else {
+        /* fill callinfo */
+        ci->acc = a;
+
+        /* setup environment for calling method */
+        ci->proc = m;
+        irep = m->body.irep;
+        pool = irep->pool;
+        syms = irep->syms;
+        ci->nregs = irep->nregs;
+        if (n == CALL_MAXARGS) {
+          stack_extend(mrb, (irep->nregs < 3) ? 3 : irep->nregs, 3);
+        }
+        else {
+          stack_extend(mrb, irep->nregs, ci->argc+2);
+        }
+        regs = mrb->c->stack;
+        pc = irep->iseq;
+        JUMP;
+      }
+    }
+
+    CASE(OP_ARGARY) {
+      /* A Bx   R(A) := argument array (16=6:1:5:4) */
+      int a = GETARG_A(i);
+      int bx = GETARG_Bx(i);
+      int m1 = (bx>>10)&0x3f;
+      int r  = (bx>>9)&0x1;
+      int m2 = (bx>>4)&0x1f;
+      int lv = (bx>>0)&0xf;
+      mrb_value *stack;
+
+      if (lv == 0) stack = regs + 1;
+      else {
+        struct REnv *e = uvenv(mrb, lv-1);
+        if (!e) {
+          mrb_value exc;
+
+          exc = mrb_exc_new_str_lit(mrb, E_NOMETHOD_ERROR, "super called outside of method");
+          mrb->exc = mrb_obj_ptr(exc);
+          goto L_RAISE;
+        }
+        stack = e->stack + 1;
+      }
+      if (r == 0) {
+        regs[a] = mrb_ary_new_from_values(mrb, m1+m2, stack);
+      }
+      else {
+        mrb_value *pp = NULL;
+        struct RArray *rest;
+        int len = 0;
+
+        if (mrb_array_p(stack[m1])) {
+          struct RArray *ary = mrb_ary_ptr(stack[m1]);
+
+          pp = ary->ptr;
+          len = ary->len;
+        }
+        regs[a] = mrb_ary_new_capa(mrb, m1+len+m2);
+        rest = mrb_ary_ptr(regs[a]);
+        if (m1 > 0) {
+          stack_copy(rest->ptr, stack, m1);
+        }
+        if (len > 0) {
+          stack_copy(rest->ptr+m1, pp, len);
+        }
+        if (m2 > 0) {
+          stack_copy(rest->ptr+m1+len, stack+m1+1, m2);
+        }
+        rest->len = m1+len+m2;
+      }
+      regs[a+1] = stack[m1+r+m2];
+      ARENA_RESTORE(mrb, ai);
+      NEXT;
+    }
+
+    CASE(OP_ENTER) {
+      /* Ax             arg setup according to flags (23=5:5:1:5:5:1:1) */
+      /* number of optional arguments times OP_JMP should follow */
+      mrb_aspec ax = GETARG_Ax(i);
+      int m1 = MRB_ASPEC_REQ(ax);
+      int o  = MRB_ASPEC_OPT(ax);
+      int r  = MRB_ASPEC_REST(ax);
+      int m2 = MRB_ASPEC_POST(ax);
+      /* unused
+      int k  = MRB_ASPEC_KEY(ax);
+      int kd = MRB_ASPEC_KDICT(ax);
+      int b  = MRB_ASPEC_BLOCK(ax);
+      */
+      int argc = mrb->c->ci->argc;
+      mrb_value *argv = regs+1;
+      mrb_value *argv0 = argv;
+      int len = m1 + o + r + m2;
+      mrb_value *blk = &argv[argc < 0 ? 1 : argc];
+
+      if (!mrb_nil_p(*blk) && mrb_type(*blk) != MRB_TT_PROC) {
+        *blk = mrb_convert_type(mrb, *blk, MRB_TT_PROC, "Proc", "to_proc");
+      }
+      if (argc < 0) {
+        struct RArray *ary = mrb_ary_ptr(regs[1]);
+        argv = ary->ptr;
+        argc = ary->len;
+        mrb_gc_protect(mrb, regs[1]);
+      }
+      if (mrb->c->ci->proc && MRB_PROC_STRICT_P(mrb->c->ci->proc)) {
+        if (argc >= 0) {
+          if (argc < m1 + m2 || (r == 0 && argc > len)) {
+            argnum_error(mrb, m1+m2);
+            goto L_RAISE;
+          }
+        }
+      }
+      else if (len > 1 && argc == 1 && mrb_array_p(argv[0])) {
+        mrb_gc_protect(mrb, argv[0]);
+        argc = mrb_ary_ptr(argv[0])->len;
+        argv = mrb_ary_ptr(argv[0])->ptr;
+      }
+      mrb->c->ci->argc = len;
+      if (argc < len) {
+        int mlen = m2;
+        if (argc < m1+m2) {
+          if (m1 < argc)
+            mlen = argc - m1;
+          else
+            mlen = 0;
+        }
+        regs[len+1] = *blk; /* move block */
+        SET_NIL_VALUE(regs[argc+1]);
+        if (argv0 != argv) {
+          value_move(&regs[1], argv, argc-mlen); /* m1 + o */
+        }
+        if (mlen) {
+          value_move(&regs[len-m2+1], &argv[argc-mlen], mlen);
+        }
+        if (r) {
+          regs[m1+o+1] = mrb_ary_new_capa(mrb, 0);
+        }
+        if (o == 0 || argc < m1+m2) pc++;
+        else
+          pc += argc - m1 - m2 + 1;
+      }
+      else {
+        int rnum = 0;
+        if (argv0 != argv) {
+          regs[len+1] = *blk; /* move block */
+          value_move(&regs[1], argv, m1+o);
+        }
+        if (r) {
+          rnum = argc-m1-o-m2;
+          regs[m1+o+1] = mrb_ary_new_from_values(mrb, rnum, argv+m1+o);
+        }
+        if (m2) {
+          if (argc-m2 > m1) {
+            value_move(&regs[m1+o+r+1], &argv[m1+o+rnum], m2);
+          }
+        }
+        if (argv0 == argv) {
+          regs[len+1] = *blk; /* move block */
+        }
+        pc += o + 1;
+      }
+      JUMP;
+    }
+
+    CASE(OP_KARG) {
+      /* A B C          R(A) := kdict[Syms(B)]; if C kdict.rm(Syms(B)) */
+      /* if C == 2; raise unless kdict.empty? */
+      /* OP_JMP should follow to skip init code */
+      NEXT;
+    }
+
+    CASE(OP_KDICT) {
+      /* A C            R(A) := kdict */
+      NEXT;
+    }
+
+    L_RETURN:
+      i = MKOP_AB(OP_RETURN, GETARG_A(i), OP_R_NORMAL);
+      /* fall through */
+    CASE(OP_RETURN) {
+      /* A B     return R(A) (B=normal,in-block return/break) */
+      if (mrb->exc) {
+        mrb_callinfo *ci;
+        int eidx;
+
+      L_RAISE:
+        ci = mrb->c->ci;
+        mrb_obj_iv_ifnone(mrb, mrb->exc, mrb_intern_lit(mrb, "lastpc"), mrb_cptr_value(mrb, pc));
+        mrb_obj_iv_ifnone(mrb, mrb->exc, mrb_intern_lit(mrb, "ciidx"), mrb_fixnum_value(ci - mrb->c->cibase));
+        eidx = ci->eidx;
+        if (ci == mrb->c->cibase) {
+          if (ci->ridx == 0) goto L_STOP;
+          goto L_RESCUE;
+        }
+        while (ci[0].ridx == ci[-1].ridx) {
+          cipop(mrb);
+          ci = mrb->c->ci;
+          mrb->c->stack = ci[1].stackent;
+          if (ci[1].acc == CI_ACC_SKIP && prev_jmp) {
+            mrb->jmp = prev_jmp;
+            MRB_THROW(prev_jmp);
+          }
+          if (ci == mrb->c->cibase) {
+            while (eidx > 0) {
+              ecall(mrb, --eidx);
+            }
+            if (ci->ridx == 0) {
+              if (mrb->c == mrb->root_c) {
+                regs = mrb->c->stack = mrb->c->stbase;
+                goto L_STOP;
+              }
+              else {
+                struct mrb_context *c = mrb->c;
+
+                mrb->c = c->prev;
+                c->prev = NULL;
+                goto L_RAISE;
+              }
+            }
+            break;
+          }
+          /* call ensure only when we skip this callinfo */
+          if (ci[0].ridx == ci[-1].ridx) {
+            while (eidx > ci[-1].eidx) {
+              ecall(mrb, --eidx);
+            }
+          }
+        }
+      L_RESCUE:
+        if (ci->ridx == 0) goto L_STOP;
+        proc = ci->proc;
+        irep = proc->body.irep;
+        pool = irep->pool;
+        syms = irep->syms;
+        regs = mrb->c->stack = ci[1].stackent;
+        pc = mrb->c->rescue[--ci->ridx];
+      }
+      else {
+        mrb_callinfo *ci = mrb->c->ci;
+        int acc, eidx = mrb->c->ci->eidx;
+        mrb_value v = regs[GETARG_A(i)];
+
+        switch (GETARG_B(i)) {
+        case OP_R_RETURN:
+          /* Fall through to OP_R_NORMAL otherwise */
+          if (proc->env && !MRB_PROC_STRICT_P(proc)) {
+            struct REnv *e = top_env(mrb, proc);
+
+            if (!MRB_ENV_STACK_SHARED_P(e)) {
+              localjump_error(mrb, LOCALJUMP_ERROR_RETURN);
+              goto L_RAISE;
+            }
+            ci = mrb->c->cibase + e->cioff;
+            if (ci == mrb->c->cibase) {
+              localjump_error(mrb, LOCALJUMP_ERROR_RETURN);
+              goto L_RAISE;
+            }
+            mrb->c->stack = mrb->c->ci->stackent;
+            mrb->c->ci = ci;
+            break;
+          }
+        case OP_R_NORMAL:
+          if (ci == mrb->c->cibase) {
+            if (!mrb->c->prev) { /* toplevel return */
+              localjump_error(mrb, LOCALJUMP_ERROR_RETURN);
+              goto L_RAISE;
+            }
+            if (mrb->c->prev->ci == mrb->c->prev->cibase) {
+              mrb_value exc = mrb_exc_new_str_lit(mrb, E_FIBER_ERROR, "double resume");
+              mrb->exc = mrb_obj_ptr(exc);
+              goto L_RAISE;
+            }
+            /* automatic yield at the end */
+            mrb->c->status = MRB_FIBER_TERMINATED;
+            mrb->c = mrb->c->prev;
+            mrb->c->status = MRB_FIBER_RUNNING;
+          }
+          ci = mrb->c->ci;
+          break;
+        case OP_R_BREAK:
+          if (!proc->env || !MRB_ENV_STACK_SHARED_P(proc->env)) {
+            localjump_error(mrb, LOCALJUMP_ERROR_BREAK);
+            goto L_RAISE;
+          }
+          /* break from fiber block */
+          if (mrb->c->ci == mrb->c->cibase && mrb->c->ci->pc) {
+            struct mrb_context *c = mrb->c;
+
+            mrb->c = c->prev;
+            c->prev = NULL;
+          }
+          ci = mrb->c->ci;
+          mrb->c->stack = ci->stackent;
+          mrb->c->ci = mrb->c->cibase + proc->env->cioff + 1;
+          while (ci > mrb->c->ci) {
+            if (ci[-1].acc == CI_ACC_SKIP) {
+              mrb->c->ci = ci;
+              break;
+            }
+            ci--;
+          }
+          break;
+        default:
+          /* cannot happen */
+          break;
+        }
+        while (eidx > mrb->c->ci[-1].eidx) {
+          ecall(mrb, --eidx);
+        }
+        cipop(mrb);
+        acc = ci->acc;
+        pc = ci->pc;
+        regs = mrb->c->stack = ci->stackent;
+        if (acc == CI_ACC_SKIP) {
+          mrb->jmp = prev_jmp;
+          return v;
+        }
+        DEBUG(printf("from :%s\n", mrb_sym2name(mrb, ci->mid)));
+        proc = mrb->c->ci->proc;
+        irep = proc->body.irep;
+        pool = irep->pool;
+        syms = irep->syms;
+
+        regs[acc] = v;
+      }
+      JUMP;
+    }
+
+    CASE(OP_TAILCALL) {
+      /* A B C  return call(R(A),Syms(B),R(A+1),... ,R(A+C+1)) */
+      int a = GETARG_A(i);
+      int n = GETARG_C(i);
+      struct RProc *m;
+      struct RClass *c;
+      mrb_callinfo *ci;
+      mrb_value recv;
+      mrb_sym mid = syms[GETARG_B(i)];
+
+      recv = regs[a];
+      c = mrb_class(mrb, recv);
+      m = mrb_method_search_vm(mrb, &c, mid);
+      if (!m) {
+        mrb_value sym = mrb_symbol_value(mid);
+
+        mid = mrb_intern_lit(mrb, "method_missing");
+        m = mrb_method_search_vm(mrb, &c, mid);
+        if (n == CALL_MAXARGS) {
+          mrb_ary_unshift(mrb, regs[a+1], sym);
+        }
+        else {
+          value_move(regs+a+2, regs+a+1, ++n);
+          regs[a+1] = sym;
+        }
+      }
+
+      /* replace callinfo */
+      ci = mrb->c->ci;
+      ci->mid = mid;
+      ci->target_class = c;
+      if (n == CALL_MAXARGS) {
+        ci->argc = -1;
+      }
+      else {
+        ci->argc = n;
+      }
+
+      /* move stack */
+      value_move(mrb->c->stack, &regs[a], ci->argc+1);
+
+      if (MRB_PROC_CFUNC_P(m)) {
+        mrb->c->stack[0] = m->body.func(mrb, recv);
+        mrb_gc_arena_restore(mrb, ai);
+        goto L_RETURN;
+      }
+      else {
+        /* setup environment for calling method */
+        irep = m->body.irep;
+        pool = irep->pool;
+        syms = irep->syms;
+        if (ci->argc < 0) {
+          stack_extend(mrb, (irep->nregs < 3) ? 3 : irep->nregs, 3);
+        }
+        else {
+          stack_extend(mrb, irep->nregs, ci->argc+2);
+        }
+        regs = mrb->c->stack;
+        pc = irep->iseq;
+      }
+      JUMP;
+    }
+
+    CASE(OP_BLKPUSH) {
+      /* A Bx   R(A) := block (16=6:1:5:4) */
+      int a = GETARG_A(i);
+      int bx = GETARG_Bx(i);
+      int m1 = (bx>>10)&0x3f;
+      int r  = (bx>>9)&0x1;
+      int m2 = (bx>>4)&0x1f;
+      int lv = (bx>>0)&0xf;
+      mrb_value *stack;
+
+      if (lv == 0) stack = regs + 1;
+      else {
+        struct REnv *e = uvenv(mrb, lv-1);
+        if (!e) {
+          localjump_error(mrb, LOCALJUMP_ERROR_YIELD);
+          goto L_RAISE;
+        }
+        stack = e->stack + 1;
+      }
+      regs[a] = stack[m1+r+m2];
+      NEXT;
+    }
+
+#define TYPES2(a,b) ((((uint16_t)(a))<<8)|(((uint16_t)(b))&0xff))
+#define OP_MATH_BODY(op,v1,v2) do {\
+  v1(regs[a]) = v1(regs[a]) op v2(regs[a+1]);\
+} while(0)
+
+    CASE(OP_ADD) {
+      /* A B C  R(A) := R(A)+R(A+1) (Syms[B]=:+,C=1)*/
+      int a = GETARG_A(i);
+
+      /* need to check if op is overridden */
+      switch (TYPES2(mrb_type(regs[a]),mrb_type(regs[a+1]))) {
+      case TYPES2(MRB_TT_FIXNUM,MRB_TT_FIXNUM):
+        {
+          mrb_int x, y, z;
+          mrb_value *regs_a = regs + a;
+
+          x = mrb_fixnum(regs_a[0]);
+          y = mrb_fixnum(regs_a[1]);
+          if (mrb_int_add_overflow(x, y, &z)) {
+            SET_FLOAT_VALUE(mrb, regs_a[0], (mrb_float)x + (mrb_float)y);
+            break;
+          }
+          SET_INT_VALUE(regs[a], z);
+        }
+        break;
+      case TYPES2(MRB_TT_FIXNUM,MRB_TT_FLOAT):
+        {
+          mrb_int x = mrb_fixnum(regs[a]);
+          mrb_float y = mrb_float(regs[a+1]);
+          SET_FLOAT_VALUE(mrb, regs[a], (mrb_float)x + y);
+        }
+        break;
+      case TYPES2(MRB_TT_FLOAT,MRB_TT_FIXNUM):
+#ifdef MRB_WORD_BOXING
+        {
+          mrb_float x = mrb_float(regs[a]);
+          mrb_int y = mrb_fixnum(regs[a+1]);
+          SET_FLOAT_VALUE(mrb, regs[a], x + y);
+        }
+#else
+        OP_MATH_BODY(+,mrb_float,mrb_fixnum);
+#endif
+        break;
+      case TYPES2(MRB_TT_FLOAT,MRB_TT_FLOAT):
+#ifdef MRB_WORD_BOXING
+        {
+          mrb_float x = mrb_float(regs[a]);
+          mrb_float y = mrb_float(regs[a+1]);
+          SET_FLOAT_VALUE(mrb, regs[a], x + y);
+        }
+#else
+        OP_MATH_BODY(+,mrb_float,mrb_float);
+#endif
+        break;
+      case TYPES2(MRB_TT_STRING,MRB_TT_STRING):
+        regs[a] = mrb_str_plus(mrb, regs[a], regs[a+1]);
+        break;
+      default:
+        goto L_SEND;
+      }
+      ARENA_RESTORE(mrb, ai);
+      NEXT;
+    }
+
+    CASE(OP_SUB) {
+      /* A B C  R(A) := R(A)-R(A+1) (Syms[B]=:-,C=1)*/
+      int a = GETARG_A(i);
+
+      /* need to check if op is overridden */
+      switch (TYPES2(mrb_type(regs[a]),mrb_type(regs[a+1]))) {
+      case TYPES2(MRB_TT_FIXNUM,MRB_TT_FIXNUM):
+        {
+          mrb_int x, y, z;
+
+          x = mrb_fixnum(regs[a]);
+          y = mrb_fixnum(regs[a+1]);
+          if (mrb_int_sub_overflow(x, y, &z)) {
+            SET_FLOAT_VALUE(mrb, regs[a], (mrb_float)x - (mrb_float)y);
+            break;
+          }
+          SET_INT_VALUE(regs[a], z);
+        }
+        break;
+      case TYPES2(MRB_TT_FIXNUM,MRB_TT_FLOAT):
+        {
+          mrb_int x = mrb_fixnum(regs[a]);
+          mrb_float y = mrb_float(regs[a+1]);
+          SET_FLOAT_VALUE(mrb, regs[a], (mrb_float)x - y);
+        }
+        break;
+      case TYPES2(MRB_TT_FLOAT,MRB_TT_FIXNUM):
+#ifdef MRB_WORD_BOXING
+        {
+          mrb_float x = mrb_float(regs[a]);
+          mrb_int y = mrb_fixnum(regs[a+1]);
+          SET_FLOAT_VALUE(mrb, regs[a], x - y);
+        }
+#else
+        OP_MATH_BODY(-,mrb_float,mrb_fixnum);
+#endif
+        break;
+      case TYPES2(MRB_TT_FLOAT,MRB_TT_FLOAT):
+#ifdef MRB_WORD_BOXING
+        {
+          mrb_float x = mrb_float(regs[a]);
+          mrb_float y = mrb_float(regs[a+1]);
+          SET_FLOAT_VALUE(mrb, regs[a], x - y);
+        }
+#else
+        OP_MATH_BODY(-,mrb_float,mrb_float);
+#endif
+        break;
+      default:
+        goto L_SEND;
+      }
+      NEXT;
+    }
+
+    CASE(OP_MUL) {
+      /* A B C  R(A) := R(A)*R(A+1) (Syms[B]=:*,C=1)*/
+      int a = GETARG_A(i);
+
+      /* need to check if op is overridden */
+      switch (TYPES2(mrb_type(regs[a]),mrb_type(regs[a+1]))) {
+      case TYPES2(MRB_TT_FIXNUM,MRB_TT_FIXNUM):
+        {
+          mrb_value z;
+
+          z = mrb_fixnum_mul(mrb, regs[a], regs[a+1]);
+
+          switch (mrb_type(z)) {
+          case MRB_TT_FIXNUM:
+            {
+              SET_INT_VALUE(regs[a], mrb_fixnum(z));
+            }
+            break;
+          case MRB_TT_FLOAT:
+            {
+              SET_FLOAT_VALUE(mrb, regs[a], mrb_float(z));
+            }
+            break;
+          default:
+            /* cannot happen */
+            break;
+          }
+        }
+        break;
+      case TYPES2(MRB_TT_FIXNUM,MRB_TT_FLOAT):
+        {
+          mrb_int x = mrb_fixnum(regs[a]);
+          mrb_float y = mrb_float(regs[a+1]);
+          SET_FLOAT_VALUE(mrb, regs[a], (mrb_float)x * y);
+        }
+        break;
+      case TYPES2(MRB_TT_FLOAT,MRB_TT_FIXNUM):
+#ifdef MRB_WORD_BOXING
+        {
+          mrb_float x = mrb_float(regs[a]);
+          mrb_int y = mrb_fixnum(regs[a+1]);
+          SET_FLOAT_VALUE(mrb, regs[a], x * y);
+        }
+#else
+        OP_MATH_BODY(*,mrb_float,mrb_fixnum);
+#endif
+        break;
+      case TYPES2(MRB_TT_FLOAT,MRB_TT_FLOAT):
+#ifdef MRB_WORD_BOXING
+        {
+          mrb_float x = mrb_float(regs[a]);
+          mrb_float y = mrb_float(regs[a+1]);
+          SET_FLOAT_VALUE(mrb, regs[a], x * y);
+        }
+#else
+        OP_MATH_BODY(*,mrb_float,mrb_float);
+#endif
+        break;
+      default:
+        goto L_SEND;
+      }
+      NEXT;
+    }
+
+    CASE(OP_DIV) {
+      /* A B C  R(A) := R(A)/R(A+1) (Syms[B]=:/,C=1)*/
+      int a = GETARG_A(i);
+
+      /* need to check if op is overridden */
+      switch (TYPES2(mrb_type(regs[a]),mrb_type(regs[a+1]))) {
+      case TYPES2(MRB_TT_FIXNUM,MRB_TT_FIXNUM):
+        {
+          mrb_int x = mrb_fixnum(regs[a]);
+          mrb_int y = mrb_fixnum(regs[a+1]);
+          SET_FLOAT_VALUE(mrb, regs[a], (mrb_float)x / (mrb_float)y);
+        }
+        break;
+      case TYPES2(MRB_TT_FIXNUM,MRB_TT_FLOAT):
+        {
+          mrb_int x = mrb_fixnum(regs[a]);
+          mrb_float y = mrb_float(regs[a+1]);
+          SET_FLOAT_VALUE(mrb, regs[a], (mrb_float)x / y);
+        }
+        break;
+      case TYPES2(MRB_TT_FLOAT,MRB_TT_FIXNUM):
+#ifdef MRB_WORD_BOXING
+        {
+          mrb_float x = mrb_float(regs[a]);
+          mrb_int y = mrb_fixnum(regs[a+1]);
+          SET_FLOAT_VALUE(mrb, regs[a], x / y);
+        }
+#else
+        OP_MATH_BODY(/,mrb_float,mrb_fixnum);
+#endif
+        break;
+      case TYPES2(MRB_TT_FLOAT,MRB_TT_FLOAT):
+#ifdef MRB_WORD_BOXING
+        {
+          mrb_float x = mrb_float(regs[a]);
+          mrb_float y = mrb_float(regs[a+1]);
+          SET_FLOAT_VALUE(mrb, regs[a], x / y);
+        }
+#else
+        OP_MATH_BODY(/,mrb_float,mrb_float);
+#endif
+        break;
+      default:
+        goto L_SEND;
+      }
+#ifdef MRB_NAN_BOXING
+      if (isnan(mrb_float(regs[a]))) {
+        regs[a] = mrb_float_value(mrb, mrb_float(regs[a]));
+      }
+#endif
+      NEXT;
+    }
+
+    CASE(OP_ADDI) {
+      /* A B C  R(A) := R(A)+C (Syms[B]=:+)*/
+      int a = GETARG_A(i);
+
+      /* need to check if + is overridden */
+      switch (mrb_type(regs[a])) {
+      case MRB_TT_FIXNUM:
+        {
+          mrb_int x = mrb_fixnum(regs[a]);
+          mrb_int y = GETARG_C(i);
+          mrb_int z;
+
+          if (mrb_int_add_overflow(x, y, &z)) {
+            SET_FLOAT_VALUE(mrb, regs[a], (mrb_float)x + (mrb_float)y);
+            break;
+          }
+          SET_INT_VALUE(regs[a], z);
+        }
+        break;
+      case MRB_TT_FLOAT:
+#ifdef MRB_WORD_BOXING
+        {
+          mrb_float x = mrb_float(regs[a]);
+          SET_FLOAT_VALUE(mrb, regs[a], x + GETARG_C(i));
+        }
+#else
+        mrb_float(regs[a]) += GETARG_C(i);
+#endif
+        break;
+      default:
+        SET_INT_VALUE(regs[a+1], GETARG_C(i));
+        i = MKOP_ABC(OP_SEND, a, GETARG_B(i), 1);
+        goto L_SEND;
+      }
+      NEXT;
+    }
+
+    CASE(OP_SUBI) {
+      /* A B C  R(A) := R(A)-C (Syms[B]=:-)*/
+      int a = GETARG_A(i);
+      mrb_value *regs_a = regs + a;
+
+      /* need to check if + is overridden */
+      switch (mrb_type(regs_a[0])) {
+      case MRB_TT_FIXNUM:
+        {
+          mrb_int x = mrb_fixnum(regs_a[0]);
+          mrb_int y = GETARG_C(i);
+          mrb_int z;
+
+          if (mrb_int_sub_overflow(x, y, &z)) {
+            SET_FLOAT_VALUE(mrb, regs_a[0], (mrb_float)x - (mrb_float)y);
+          }
+          else {
+            SET_INT_VALUE(regs_a[0], z);
+          }
+        }
+        break;
+      case MRB_TT_FLOAT:
+#ifdef MRB_WORD_BOXING
+        {
+          mrb_float x = mrb_float(regs[a]);
+          SET_FLOAT_VALUE(mrb, regs[a], x - GETARG_C(i));
+        }
+#else
+        mrb_float(regs_a[0]) -= GETARG_C(i);
+#endif
+        break;
+      default:
+        SET_INT_VALUE(regs_a[1], GETARG_C(i));
+        i = MKOP_ABC(OP_SEND, a, GETARG_B(i), 1);
+        goto L_SEND;
+      }
+      NEXT;
+    }
+
+#define OP_CMP_BODY(op,v1,v2) (v1(regs[a]) op v2(regs[a+1]))
+
+#define OP_CMP(op) do {\
+  int result;\
+  /* need to check if - is overridden */\
+  switch (TYPES2(mrb_type(regs[a]),mrb_type(regs[a+1]))) {\
+  case TYPES2(MRB_TT_FIXNUM,MRB_TT_FIXNUM):\
+    result = OP_CMP_BODY(op,mrb_fixnum,mrb_fixnum);\
+    break;\
+  case TYPES2(MRB_TT_FIXNUM,MRB_TT_FLOAT):\
+    result = OP_CMP_BODY(op,mrb_fixnum,mrb_float);\
+    break;\
+  case TYPES2(MRB_TT_FLOAT,MRB_TT_FIXNUM):\
+    result = OP_CMP_BODY(op,mrb_float,mrb_fixnum);\
+    break;\
+  case TYPES2(MRB_TT_FLOAT,MRB_TT_FLOAT):\
+    result = OP_CMP_BODY(op,mrb_float,mrb_float);\
+    break;\
+  default:\
+    goto L_SEND;\
+  }\
+  if (result) {\
+    SET_TRUE_VALUE(regs[a]);\
+  }\
+  else {\
+    SET_FALSE_VALUE(regs[a]);\
+  }\
+} while(0)
+
+    CASE(OP_EQ) {
+      /* A B C  R(A) := R(A)==R(A+1) (Syms[B]=:==,C=1)*/
+      int a = GETARG_A(i);
+      if (mrb_obj_eq(mrb, regs[a], regs[a+1])) {
+        SET_TRUE_VALUE(regs[a]);
+      }
+      else {
+        OP_CMP(==);
+      }
+      NEXT;
+    }
+
+    CASE(OP_LT) {
+      /* A B C  R(A) := R(A)<R(A+1) (Syms[B]=:<,C=1)*/
+      int a = GETARG_A(i);
+      OP_CMP(<);
+      NEXT;
+    }
+
+    CASE(OP_LE) {
+      /* A B C  R(A) := R(A)<=R(A+1) (Syms[B]=:<=,C=1)*/
+      int a = GETARG_A(i);
+      OP_CMP(<=);
+      NEXT;
+    }
+
+    CASE(OP_GT) {
+      /* A B C  R(A) := R(A)>R(A+1) (Syms[B]=:>,C=1)*/
+      int a = GETARG_A(i);
+      OP_CMP(>);
+      NEXT;
+    }
+
+    CASE(OP_GE) {
+      /* A B C  R(A) := R(A)>=R(A+1) (Syms[B]=:>=,C=1)*/
+      int a = GETARG_A(i);
+      OP_CMP(>=);
+      NEXT;
+    }
+
+    CASE(OP_ARRAY) {
+      /* A B C          R(A) := ary_new(R(B),R(B+1)..R(B+C)) */
+      regs[GETARG_A(i)] = mrb_ary_new_from_values(mrb, GETARG_C(i), &regs[GETARG_B(i)]);
+      ARENA_RESTORE(mrb, ai);
+      NEXT;
+    }
+
+    CASE(OP_ARYCAT) {
+      /* A B            mrb_ary_concat(R(A),R(B)) */
+      mrb_ary_concat(mrb, regs[GETARG_A(i)],
+                     mrb_ary_splat(mrb, regs[GETARG_B(i)]));
+      ARENA_RESTORE(mrb, ai);
+      NEXT;
+    }
+
+    CASE(OP_ARYPUSH) {
+      /* A B            R(A).push(R(B)) */
+      mrb_ary_push(mrb, regs[GETARG_A(i)], regs[GETARG_B(i)]);
+      NEXT;
+    }
+
+    CASE(OP_AREF) {
+      /* A B C          R(A) := R(B)[C] */
+      int a = GETARG_A(i);
+      int c = GETARG_C(i);
+      mrb_value v = regs[GETARG_B(i)];
+
+      if (!mrb_array_p(v)) {
+        if (c == 0) {
+          regs[GETARG_A(i)] = v;
+        }
+        else {
+          SET_NIL_VALUE(regs[a]);
+        }
+      }
+      else {
+        regs[GETARG_A(i)] = mrb_ary_ref(mrb, v, c);
+      }
+      NEXT;
+    }
+
+    CASE(OP_ASET) {
+      /* A B C          R(B)[C] := R(A) */
+      mrb_ary_set(mrb, regs[GETARG_B(i)], GETARG_C(i), regs[GETARG_A(i)]);
+      NEXT;
+    }
+
+    CASE(OP_APOST) {
+      /* A B C  *R(A),R(A+1)..R(A+C) := R(A) */
+      int a = GETARG_A(i);
+      mrb_value v = regs[a];
+      int pre  = GETARG_B(i);
+      int post = GETARG_C(i);
+
+      struct RArray *ary;
+      int len, idx;
+
+      if (!mrb_array_p(v)) {
+        v = mrb_ary_new_from_values(mrb, 1, &regs[a]);
+      }
+      ary = mrb_ary_ptr(v);
+      len = ary->len;
+      if (len > pre + post) {
+        regs[a++] = mrb_ary_new_from_values(mrb, len - pre - post, ary->ptr+pre);
+        while (post--) {
+          regs[a++] = ary->ptr[len-post-1];
+        }
+      }
+      else {
+        regs[a++] = mrb_ary_new_capa(mrb, 0);
+        for (idx=0; idx+pre<len; idx++) {
+          regs[a+idx] = ary->ptr[pre+idx];
+        }
+        while (idx < post) {
+          SET_NIL_VALUE(regs[a+idx]);
+          idx++;
+        }
+      }
+      ARENA_RESTORE(mrb, ai);
+      NEXT;
+    }
+
+    CASE(OP_STRING) {
+      /* A Bx           R(A) := str_new(Lit(Bx)) */
+      regs[GETARG_A(i)] = mrb_str_dup(mrb, pool[GETARG_Bx(i)]);
+      ARENA_RESTORE(mrb, ai);
+      NEXT;
+    }
+
+    CASE(OP_STRCAT) {
+      /* A B    R(A).concat(R(B)) */
+      mrb_str_concat(mrb, regs[GETARG_A(i)], regs[GETARG_B(i)]);
+      regs = mrb->c->stack;
+      NEXT;
+    }
+
+    CASE(OP_HASH) {
+      /* A B C   R(A) := hash_new(R(B),R(B+1)..R(B+C)) */
+      int b = GETARG_B(i);
+      int c = GETARG_C(i);
+      int lim = b+c*2;
+      mrb_value hash = mrb_hash_new_capa(mrb, c);
+
+      while (b < lim) {
+        mrb_hash_set(mrb, hash, regs[b], regs[b+1]);
+        b+=2;
+      }
+      regs[GETARG_A(i)] = hash;
+      ARENA_RESTORE(mrb, ai);
+      NEXT;
+    }
+
+    CASE(OP_LAMBDA) {
+      /* A b c  R(A) := lambda(SEQ[b],c) (b:c = 14:2) */
+      struct RProc *p;
+      int c = GETARG_c(i);
+
+      if (c & OP_L_CAPTURE) {
+        p = mrb_closure_new(mrb, irep->reps[GETARG_b(i)]);
+      }
+      else {
+        p = mrb_proc_new(mrb, irep->reps[GETARG_b(i)]);
+      }
+      if (c & OP_L_STRICT) p->flags |= MRB_PROC_STRICT;
+      regs[GETARG_A(i)] = mrb_obj_value(p);
+      ARENA_RESTORE(mrb, ai);
+      NEXT;
+    }
+
+    CASE(OP_OCLASS) {
+      /* A      R(A) := ::Object */
+      regs[GETARG_A(i)] = mrb_obj_value(mrb->object_class);
+      NEXT;
+    }
+
+    CASE(OP_CLASS) {
+      /* A B    R(A) := newclass(R(A),Syms(B),R(A+1)) */
+      struct RClass *c = 0;
+      int a = GETARG_A(i);
+      mrb_value base, super;
+      mrb_sym id = syms[GETARG_B(i)];
+
+      base = regs[a];
+      super = regs[a+1];
+      if (mrb_nil_p(base)) {
+        base = mrb_obj_value(mrb->c->ci->target_class);
+      }
+      c = mrb_vm_define_class(mrb, base, super, id);
+      regs[a] = mrb_obj_value(c);
+      ARENA_RESTORE(mrb, ai);
+      NEXT;
+    }
+
+    CASE(OP_MODULE) {
+      /* A B            R(A) := newmodule(R(A),Syms(B)) */
+      struct RClass *c = 0;
+      int a = GETARG_A(i);
+      mrb_value base;
+      mrb_sym id = syms[GETARG_B(i)];
+
+      base = regs[a];
+      if (mrb_nil_p(base)) {
+        base = mrb_obj_value(mrb->c->ci->target_class);
+      }
+      c = mrb_vm_define_module(mrb, base, id);
+      regs[a] = mrb_obj_value(c);
+      ARENA_RESTORE(mrb, ai);
+      NEXT;
+    }
+
+    CASE(OP_EXEC) {
+      /* A Bx   R(A) := blockexec(R(A),SEQ[Bx]) */
+      int a = GETARG_A(i);
+      mrb_callinfo *ci;
+      mrb_value recv = regs[a];
+      struct RProc *p;
+
+      /* prepare stack */
+      ci = cipush(mrb);
+      ci->pc = pc + 1;
+      ci->acc = a;
+      ci->mid = 0;
+      ci->stackent = mrb->c->stack;
+      ci->argc = 0;
+      ci->target_class = mrb_class_ptr(recv);
+
+      /* prepare stack */
+      mrb->c->stack += a;
+
+      p = mrb_proc_new(mrb, irep->reps[GETARG_Bx(i)]);
+      p->target_class = ci->target_class;
+      ci->proc = p;
+
+      if (MRB_PROC_CFUNC_P(p)) {
+        ci->nregs = 0;
+        mrb->c->stack[0] = p->body.func(mrb, recv);
+        mrb_gc_arena_restore(mrb, ai);
+        if (mrb->exc) goto L_RAISE;
+        /* pop stackpos */
+        regs = mrb->c->stack = mrb->c->ci->stackent;
+        cipop(mrb);
+        NEXT;
+      }
+      else {
+        irep = p->body.irep;
+        pool = irep->pool;
+        syms = irep->syms;
+        stack_extend(mrb, irep->nregs, 1);
+        ci->nregs = irep->nregs;
+        regs = mrb->c->stack;
+        pc = irep->iseq;
+        JUMP;
+      }
+    }
+
+    CASE(OP_METHOD) {
+      /* A B            R(A).newmethod(Syms(B),R(A+1)) */
+      int a = GETARG_A(i);
+      struct RClass *c = mrb_class_ptr(regs[a]);
+      struct RProc *p = mrb_proc_ptr(regs[a+1]);
+
+      mrb_define_method_raw(mrb, c, syms[GETARG_B(i)], p);
+      ARENA_RESTORE(mrb, ai);
+      NEXT;
+    }
+
+    CASE(OP_SCLASS) {
+      /* A B    R(A) := R(B).singleton_class */
+      regs[GETARG_A(i)] = mrb_singleton_class(mrb, regs[GETARG_B(i)]);
+      ARENA_RESTORE(mrb, ai);
+      NEXT;
+    }
+
+    CASE(OP_TCLASS) {
+      /* A      R(A) := target_class */
+      if (!mrb->c->ci->target_class) {
+        mrb_value exc = mrb_exc_new_str_lit(mrb, E_TYPE_ERROR, "no target class or module");
+        mrb->exc = mrb_obj_ptr(exc);
+        goto L_RAISE;
+      }
+      regs[GETARG_A(i)] = mrb_obj_value(mrb->c->ci->target_class);
+      NEXT;
+    }
+
+    CASE(OP_RANGE) {
+      /* A B C  R(A) := range_new(R(B),R(B+1),C) */
+      int b = GETARG_B(i);
+      regs[GETARG_A(i)] = mrb_range_new(mrb, regs[b], regs[b+1], GETARG_C(i));
+      ARENA_RESTORE(mrb, ai);
+      NEXT;
+    }
+
+    CASE(OP_DEBUG) {
+      /* A B C    debug print R(A),R(B),R(C) */
+#ifdef MRB_ENABLE_DEBUG_HOOK
+      mrb->debug_op_hook(mrb, irep, pc, regs);
+#else
+#ifndef MRB_DISABLE_STDIO
+      printf("OP_DEBUG %d %d %d\n", GETARG_A(i), GETARG_B(i), GETARG_C(i));
+#else
+      abort();
+#endif
+#endif
+      NEXT;
+    }
+
+    CASE(OP_STOP) {
+      /*        stop VM */
+    L_STOP:
+      {
+        int eidx_stop = mrb->c->ci == mrb->c->cibase ? 0 : mrb->c->ci[-1].eidx;
+        int eidx = mrb->c->ci->eidx;
+        while (eidx > eidx_stop) {
+          ecall(mrb, --eidx);
+        }
+      }
+      ERR_PC_CLR(mrb);
+      mrb->jmp = prev_jmp;
+      if (mrb->exc) {
+        return mrb_obj_value(mrb->exc);
+      }
+      return regs[irep->nlocals];
+    }
+
+    CASE(OP_ERR) {
+      /* Bx     raise RuntimeError with message Lit(Bx) */
+      mrb_value msg = mrb_str_dup(mrb, pool[GETARG_Bx(i)]);
+      mrb_value exc;
+
+      if (GETARG_A(i) == 0) {
+        exc = mrb_exc_new_str(mrb, E_RUNTIME_ERROR, msg);
+      }
+      else {
+        exc = mrb_exc_new_str(mrb, E_LOCALJUMP_ERROR, msg);
+      }
+      mrb->exc = mrb_obj_ptr(exc);
+      goto L_RAISE;
+    }
+  }
+  END_DISPATCH;
+
+  }
+  MRB_CATCH(&c_jmp) {
+    exc_catched = TRUE;
+    goto RETRY_TRY_BLOCK;
+  }
+  MRB_END_EXC(&c_jmp);
+}
+
+MRB_API mrb_value
+mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
+{
+  return mrb_context_run(mrb, proc, self, mrb->c->ci->argc + 2); /* argc + 2 (receiver and block) */
+}
+
+MRB_API mrb_value
+mrb_toplevel_run_keep(mrb_state *mrb, struct RProc *proc, unsigned int stack_keep)
+{
+  mrb_callinfo *ci;
+  mrb_value v;
+
+  if (!mrb->c->cibase || mrb->c->ci == mrb->c->cibase) {
+    return mrb_context_run(mrb, proc, mrb_top_self(mrb), stack_keep);
+  }
+  ci = cipush(mrb);
+  ci->nregs = 1;   /* protect the receiver */
+  ci->acc = CI_ACC_SKIP;
+  ci->target_class = mrb->object_class;
+  v = mrb_context_run(mrb, proc, mrb_top_self(mrb), stack_keep);
+  cipop(mrb);
+
+  return v;
+}
+
+MRB_API mrb_value
+mrb_toplevel_run(mrb_state *mrb, struct RProc *proc)
+{
+  return mrb_toplevel_run_keep(mrb, proc, 0);
+}
Index: EcnlProtoTool/trunk/mruby-1.2.0/tasks/benchmark.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/tasks/benchmark.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/tasks/benchmark.rake	(revision 270)
@@ -0,0 +1,91 @@
+module MRuby
+  BENCHMARK_REPEAT = 4
+end
+
+$dat_files = []
+
+def bm_files
+  Dir.glob("#{MRUBY_ROOT}/benchmark/bm_*.rb")
+end
+
+def build_config_name
+  if ENV['MRUBY_CONFIG']
+    File.basename(ENV['MRUBY_CONFIG'], '.rb').gsub('build_config_', '')
+  else
+    "build"
+  end
+end
+
+def plot_file
+  File.join(MRUBY_ROOT, 'benchmark', "#{build_config_name}.png")
+end
+
+def plot
+  opts_file = "#{MRUBY_ROOT}/benchmark/plot.gpl"
+  opts = File.read(opts_file).each_line.to_a.map(&:strip).join(';')
+
+  dat_files = $dat_files.group_by {|f| File.dirname(f).split(File::SEPARATOR)[-1]}
+
+  opts += ";set output '#{plot_file}'"
+
+  opts += ';plot '
+
+  opts += dat_files.keys.map do |data_file|
+    %Q['-' u 2:3:4:xtic(1) w hist title columnheader(1)]
+  end.join(',')
+  opts += ';'
+
+  cmd = %Q{gnuplot -p -e "#{opts}"}
+
+  IO.popen(cmd, 'w') do |p|
+    dat_files.each do |target_name, bm_files|
+      p.puts target_name.gsub('_', '-')
+      bm_files.each do |bm_file|
+        p.write File.read(bm_file)
+      end
+      p.puts "e"
+    end
+  end
+end
+
+
+MRuby.each_target do |target|
+  next if target.name == 'host'
+  mruby_bin = "#{target.build_dir}/bin/mruby"
+
+  bm_files.each do |bm_file|
+    bm_name = File.basename bm_file, ".rb"
+
+    dat_dir = File.join('benchmark', build_config_name, target.name)
+    dat_file = File.join(dat_dir, "#{bm_name}.dat")
+    $dat_files << dat_file
+
+    directory dat_dir
+
+    file dat_file => [bm_file, dat_dir, mruby_bin] do |task|
+      print bm_name
+      puts "..."
+
+      data = (0...MRuby::BENCHMARK_REPEAT).map do |n|
+        str = %x{(time -f "%e %S %U" #{mruby_bin} #{bm_file}) 2>&1 >/dev/null}
+        str.split(' ').map(&:to_f)
+      end
+
+      File.open(task.name, "w") do |f|
+        data = data.map {|_,r,s| (r + s) / 2.0}
+        min = data.min
+        max = data.max
+        avg = data.inject(&:+) / data.size
+        f.puts "#{bm_name.gsub('_', '-')} #{avg} #{min} #{max}"
+      end
+    end
+  end
+end
+
+file plot_file => $dat_files do
+  plot
+end
+
+task :benchmark => plot_file do
+  plot
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/tasks/libmruby.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/tasks/libmruby.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/tasks/libmruby.rake	(revision 270)
@@ -0,0 +1,22 @@
+MRuby.each_target do
+  file libfile("#{build_dir}/lib/libmruby") => libmruby.flatten do |t|
+    archiver.run t.name, t.prerequisites
+  end
+
+  file "#{build_dir}/lib/libmruby.flags.mak" => [__FILE__, libfile("#{build_dir}/lib/libmruby")] do |t|
+    open(t.name, 'w') do |f|
+      f.puts "MRUBY_CFLAGS = #{cc.all_flags.gsub('"', '\\"')}"
+
+      gem_flags = gems.map { |g| g.linker.flags }
+      gem_library_paths = gems.map { |g| g.linker.library_paths }
+      f.puts "MRUBY_LDFLAGS = #{linker.all_flags(gem_library_paths, gem_flags).gsub('"', '\\"')} #{linker.option_library_path % "#{build_dir}/lib"}"
+
+      gem_flags_before_libraries = gems.map { |g| g.linker.flags_before_libraries }
+      f.puts "MRUBY_LDFLAGS_BEFORE_LIBS = #{[linker.flags_before_libraries, gem_flags_before_libraries].flatten.join(' ').gsub('"', '\\"')}"
+
+      gem_libraries = gems.map { |g| g.linker.libraries }
+      f.puts "MRUBY_LIBS = #{linker.option_library % 'mruby'} #{linker.library_flags(gem_libraries).gsub('"', '\\"')}"
+    end
+  end
+  task :all => "#{build_dir}/lib/libmruby.flags.mak"
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/tasks/mrbgem_spec.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/tasks/mrbgem_spec.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/tasks/mrbgem_spec.rake	(revision 270)
@@ -0,0 +1,433 @@
+require 'pathname'
+require 'forwardable'
+require 'tsort'
+
+module MRuby
+  module Gem
+    class << self
+      attr_accessor :current
+    end
+    LinkerConfig = Struct.new(:libraries, :library_paths, :flags, :flags_before_libraries, :flags_after_libraries)
+
+    class Specification
+      include Rake::DSL
+      extend Forwardable
+      def_delegators :@build, :filename, :objfile, :libfile, :exefile
+
+      attr_accessor :name, :dir, :build
+      alias mruby build
+      attr_accessor :build_config_initializer
+
+      attr_accessor :version
+      attr_accessor :description, :summary
+      attr_accessor :homepage
+      attr_accessor :licenses, :authors
+      alias :license= :licenses=
+      alias :author= :authors=
+
+      attr_accessor :rbfiles, :objs
+      attr_accessor :test_objs, :test_rbfiles, :test_args
+      attr_accessor :test_preload
+
+      attr_accessor :bins
+
+      attr_accessor :requirements
+      attr_reader :dependencies, :conflicts
+
+      attr_accessor :export_include_paths
+
+      attr_reader :generate_functions
+
+      attr_block MRuby::Build::COMMANDS
+
+      def initialize(name, &block)
+        @name = name
+        @initializer = block
+        @version = "0.0.0"
+        MRuby::Gem.current = self
+      end
+
+      def setup
+        MRuby::Gem.current = self
+        MRuby::Build::COMMANDS.each do |command|
+          instance_variable_set("@#{command}", @build.send(command).clone)
+        end
+        @linker = LinkerConfig.new([], [], [], [], [])
+
+        @rbfiles = Dir.glob("#{dir}/mrblib/**/*.rb").sort
+        @objs = Dir.glob("#{dir}/src/*.{c,cpp,cxx,cc,m,asm,s,S}").map do |f|
+          objfile(f.relative_path_from(@dir).to_s.pathmap("#{build_dir}/%X"))
+        end
+
+        @generate_functions = !(@rbfiles.empty? && @objs.empty?)
+        @objs << objfile("#{build_dir}/gem_init") if @generate_functions
+
+        @test_rbfiles = Dir.glob("#{dir}/test/**/*.rb")
+        @test_objs = Dir.glob("#{dir}/test/*.{c,cpp,cxx,cc,m,asm,s,S}").map do |f|
+          objfile(f.relative_path_from(dir).to_s.pathmap("#{build_dir}/%X"))
+        end
+        @custom_test_init = !@test_objs.empty?
+        @test_preload = nil # 'test/assert.rb'
+        @test_args = {}
+
+        @bins = []
+
+        @requirements = []
+        @dependencies, @conflicts = [], []
+        @export_include_paths = []
+        @export_include_paths << "#{dir}/include" if File.directory? "#{dir}/include"
+
+        instance_eval(&@initializer)
+
+        if !name || !licenses || !authors
+          fail "#{name || dir} required to set name, license(s) and author(s)"
+        end
+
+        build.libmruby << @objs
+
+        instance_eval(&@build_config_initializer) if @build_config_initializer
+
+        compilers.each do |compiler|
+          compiler.define_rules build_dir, "#{dir}"
+          compiler.defines << %Q[MRBGEM_#{funcname.upcase}_VERSION=#{version}]
+          compiler.include_paths << "#{dir}/include" if File.directory? "#{dir}/include"
+        end
+
+        define_gem_init_builder if @generate_functions
+      end
+
+      def add_dependency(name, *requirements)
+        default_gem = requirements.last.kind_of?(Hash) ? requirements.pop : nil
+        requirements = ['>= 0.0.0'] if requirements.empty?
+        requirements.flatten!
+        @dependencies << {:gem => name, :requirements => requirements, :default => default_gem}
+      end
+
+      def add_test_dependency(*args)
+        add_dependency(*args) if build.test_enabled?
+      end
+
+      def add_conflict(name, *req)
+        @conflicts << {:gem => name, :requirements => req.empty? ? nil : req}
+      end
+
+      def self.bin=(bin)
+        @bins = [bin].flatten
+      end
+
+      def build_dir
+        "#{build.build_dir}/mrbgems/#{name}"
+      end
+
+      def test_rbireps
+        "#{build_dir}/gem_test.c"
+      end
+
+      def funcname
+        @funcname ||= @name.gsub('-', '_')
+      end
+
+      def compilers
+        MRuby::Build::COMPILERS.map do |c|
+          instance_variable_get("@#{c}")
+        end
+      end
+
+      def define_gem_init_builder
+        file objfile("#{build_dir}/gem_init") => [ "#{build_dir}/gem_init.c", File.join(dir, "mrbgem.rake") ]
+        file "#{build_dir}/gem_init.c" => [build.mrbcfile, __FILE__] + [rbfiles].flatten do |t|
+          FileUtils.mkdir_p build_dir
+          generate_gem_init("#{build_dir}/gem_init.c")
+        end
+      end
+
+      def generate_gem_init(fname)
+        open(fname, 'w') do |f|
+          print_gem_init_header f
+          build.mrbc.run f, rbfiles, "gem_mrblib_irep_#{funcname}" unless rbfiles.empty?
+          f.puts %Q[void mrb_#{funcname}_gem_init(mrb_state *mrb);]
+          f.puts %Q[void mrb_#{funcname}_gem_final(mrb_state *mrb);]
+          f.puts %Q[]
+          f.puts %Q[void GENERATED_TMP_mrb_#{funcname}_gem_init(mrb_state *mrb) {]
+          f.puts %Q[  int ai = mrb_gc_arena_save(mrb);]
+          f.puts %Q[  mrb_#{funcname}_gem_init(mrb);] if objs != [objfile("#{build_dir}/gem_init")]
+          unless rbfiles.empty?
+            f.puts %Q[  mrb_load_irep(mrb, gem_mrblib_irep_#{funcname});]
+            f.puts %Q[  if (mrb->exc) {]
+            f.puts %Q[    mrb_print_error(mrb);]
+            f.puts %Q[    exit(EXIT_FAILURE);]
+            f.puts %Q[  }]
+          end
+          f.puts %Q[  mrb_gc_arena_restore(mrb, ai);]
+          f.puts %Q[}]
+          f.puts %Q[]
+          f.puts %Q[void GENERATED_TMP_mrb_#{funcname}_gem_final(mrb_state *mrb) {]
+          f.puts %Q[  mrb_#{funcname}_gem_final(mrb);] if objs != [objfile("#{build_dir}/gem_init")]
+          f.puts %Q[}]
+        end
+      end # generate_gem_init
+
+      def print_gem_comment(f)
+        f.puts %Q[/*]
+        f.puts %Q[ * This file is loading the irep]
+        f.puts %Q[ * Ruby GEM code.]
+        f.puts %Q[ *]
+        f.puts %Q[ * IMPORTANT:]
+        f.puts %Q[ *   This file was generated!]
+        f.puts %Q[ *   All manual changes will get lost.]
+        f.puts %Q[ */]
+      end
+
+      def print_gem_init_header(f)
+        print_gem_comment(f)
+        f.puts %Q[#include <stdlib.h>] unless rbfiles.empty?
+        f.puts %Q[#include "mruby.h"]
+        f.puts %Q[#include "mruby/irep.h"] unless rbfiles.empty?
+      end
+
+      def print_gem_test_header(f)
+        print_gem_comment(f)
+        f.puts %Q[#include <stdio.h>]
+        f.puts %Q[#include <stdlib.h>]
+        f.puts %Q[#include "mruby.h"]
+        f.puts %Q[#include "mruby/irep.h"]
+        f.puts %Q[#include "mruby/variable.h"]
+        f.puts %Q[#include "mruby/hash.h"] unless test_args.empty?
+      end
+
+      def test_dependencies
+        [@name]
+      end
+
+      def custom_test_init?
+        @custom_test_init
+      end
+
+      def version_ok?(req_versions)
+        req_versions.map do |req|
+          cmp, ver = req.split
+          cmp_result = Version.new(version) <=> Version.new(ver)
+          case cmp
+          when '=' then cmp_result == 0
+          when '!=' then cmp_result != 0
+          when '>' then cmp_result == 1
+          when '<' then cmp_result == -1
+          when '>=' then cmp_result >= 0
+          when '<=' then cmp_result <= 0
+          when '~>'
+            Version.new(version).twiddle_wakka_ok?(Version.new(ver))
+          else
+            fail "Comparison not possible with '#{cmp}'"
+          end
+        end.all?
+      end
+    end # Specification
+
+    class Version
+      include Comparable
+      include Enumerable
+
+      def <=>(other)
+        ret = 0
+        own = to_enum
+
+        other.each do |oth|
+          begin
+            ret = own.next <=> oth
+          rescue StopIteration
+            ret = 0 <=> oth
+          end
+
+          break unless ret == 0
+        end
+
+        ret
+      end
+
+      # ~> compare algorithm
+      #
+      # Example:
+      #    ~> 2.2   means >= 2.2.0 and < 3.0.0
+      #    ~> 2.2.0 means >= 2.2.0 and < 2.3.0
+      def twiddle_wakka_ok?(other)
+        gr_or_eql = (self <=> other) >= 0
+        still_minor = (self <=> other.skip_minor) < 0
+        gr_or_eql and still_minor
+      end
+
+      def skip_minor
+        a = @ary.dup
+        a.slice!(-1)
+        a[-1] = a[-1].succ
+        a
+      end
+
+      def initialize(str)
+        @str = str
+        @ary = @str.split('.').map(&:to_i)
+      end
+
+      def each(&block); @ary.each(&block); end
+      def [](index); @ary[index]; end
+      def []=(index, value)
+        @ary[index] = value
+        @str = @ary.join('.')
+      end
+      def slice!(index)
+        @ary.slice!(index)
+        @str = @ary.join('.')
+      end
+    end # Version
+
+    class List
+      include Enumerable
+
+      def initialize
+        @ary = []
+      end
+
+      def each(&b)
+        @ary.each(&b)
+      end
+
+      def <<(gem)
+        unless @ary.detect {|g| g.dir == gem.dir }
+          @ary << gem
+        else
+          # GEM was already added to this list
+        end
+      end
+
+      def empty?
+        @ary.empty?
+      end
+
+      def generate_gem_table build
+        gem_table = @ary.reduce({}) { |res,v| res[v.name] = v; res }
+
+        default_gems = []
+        each do |g|
+          g.dependencies.each do |dep|
+            unless gem_table.key? dep[:gem]
+              if dep[:default]; default_gems << dep
+              elsif File.exist? "#{MRUBY_ROOT}/mrbgems/#{dep[:gem]}" # check core
+                default_gems << { :gem => dep[:gem], :default => { :core => dep[:gem] } }
+              else # fallback to mgem-list
+                default_gems << { :gem => dep[:gem], :default => { :mgem => dep[:gem] } }
+              end
+            end
+          end
+        end
+
+        until default_gems.empty?
+          def_gem = default_gems.pop
+
+          spec = build.gem def_gem[:default]
+          fail "Invalid gem name: #{spec.name} (Expected: #{def_gem[:gem]})" if spec.name != def_gem[:gem]
+          spec.setup
+
+          spec.dependencies.each do |dep|
+            unless gem_table.key? dep[:gem]
+              if dep[:default]; default_gems << dep
+              else default_gems << { :gem => dep[:gem], :default => { :mgem => dep[:gem] } }
+              end
+            end
+          end
+          gem_table[spec.name] = spec
+        end
+
+        each do |g|
+          g.dependencies.each do |dep|
+            name = dep[:gem]
+            req_versions = dep[:requirements]
+            dep_g = gem_table[name]
+
+            # check each GEM dependency against all available GEMs
+            if dep_g.nil?
+              fail "The GEM '#{g.name}' depends on the GEM '#{name}' but it could not be found"
+            end
+            unless dep_g.version_ok? req_versions
+              fail "#{name} version should be #{req_versions.join(' and ')} but was '#{dep_g.version}'"
+            end
+          end
+
+          cfls = g.conflicts.select { |c|
+            cfl_g = gem_table[c[:gem]]
+            cfl_g and cfl_g.version_ok?(c[:requirements] || ['>= 0.0.0'])
+          }.map { |c| "#{c[:gem]}(#{gem_table[c[:gem]].version})" }
+          fail "Conflicts of gem `#{g.name}` found: #{cfls.join ', '}" unless cfls.empty?
+        end
+
+        gem_table
+      end
+
+      def tsort_dependencies ary, table, all_dependency_listed = false
+        unless all_dependency_listed
+          left = ary.dup
+          until left.empty?
+            v = left.pop
+            table[v].dependencies.each do |dep|
+              left.push dep[:gem]
+              ary.push dep[:gem]
+            end
+          end
+        end
+
+        ary.uniq!
+        table.instance_variable_set :@root_gems, ary
+        class << table
+          include TSort
+          def tsort_each_node &b
+            @root_gems.each &b
+          end
+
+          def tsort_each_child(n, &b)
+            fetch(n).dependencies.each do |v|
+              b.call v[:gem]
+            end
+          end
+        end
+
+        begin
+          table.tsort.map { |v| table[v] }
+        rescue TSort::Cyclic => e
+          fail "Circular mrbgem dependency found: #{e.message}"
+        end
+      end
+
+      def check(build)
+        gem_table = generate_gem_table build
+
+        @ary = tsort_dependencies gem_table.keys, gem_table, true
+
+        each do |g|
+          import_include_paths(g)
+        end
+      end
+
+      def import_include_paths(g)
+        gem_table = @ary.reduce({}) { |res,v| res[v.name] = v; res }
+        g.dependencies.each do |dep|
+          dep_g = gem_table[dep[:gem]]
+          # We can do recursive call safely
+          # as circular dependency has already detected in the caller.
+          import_include_paths(dep_g)
+
+          g.compilers.each do |compiler|
+            compiler.include_paths += dep_g.export_include_paths
+            g.export_include_paths += dep_g.export_include_paths
+          end
+        end
+      end
+    end # List
+  end # Gem
+
+  GemBox = Object.new
+  class << GemBox
+    attr_accessor :path
+
+    def new(&block); block.call(self); end
+    def config=(obj); @config = obj; end
+    def gem(gemdir, &block); @config.gem(gemdir, &block); end
+  end # GemBox
+end # MRuby
Index: EcnlProtoTool/trunk/mruby-1.2.0/tasks/mrbgems.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/tasks/mrbgems.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/tasks/mrbgems.rake	(revision 270)
@@ -0,0 +1,96 @@
+MRuby.each_target do
+  if enable_gems?
+    # set up all gems
+    gems.each(&:setup)
+    gems.check self
+
+    # loader all gems
+    self.libmruby << objfile("#{build_dir}/mrbgems/gem_init")
+    file objfile("#{build_dir}/mrbgems/gem_init") => ["#{build_dir}/mrbgems/gem_init.c", "#{build_dir}/LEGAL"]
+    file "#{build_dir}/mrbgems/gem_init.c" => [MRUBY_CONFIG, __FILE__] do |t|
+      FileUtils.mkdir_p "#{build_dir}/mrbgems"
+      open(t.name, 'w') do |f|
+        gem_func_gems = gems.select { |g| g.generate_functions }
+        gem_func_decls = gem_func_gems.each_with_object('') do |g, s|
+          s << "void GENERATED_TMP_mrb_#{g.funcname}_gem_init(mrb_state*);\n" \
+               "void GENERATED_TMP_mrb_#{g.funcname}_gem_final(mrb_state*);\n"
+        end
+        gem_init_calls = gem_func_gems.each_with_object('') do |g, s|
+          s << "  GENERATED_TMP_mrb_#{g.funcname}_gem_init(mrb);\n"
+        end
+        gem_final_calls = gem_func_gems.each_with_object('') do |g, s|
+          s << "  GENERATED_TMP_mrb_#{g.funcname}_gem_final(mrb);\n"
+        end
+        f.puts %Q[/*]
+        f.puts %Q[ * This file contains a list of all]
+        f.puts %Q[ * initializing methods which are]
+        f.puts %Q[ * necessary to bootstrap all gems.]
+        f.puts %Q[ *]
+        f.puts %Q[ * IMPORTANT:]
+        f.puts %Q[ *   This file was generated!]
+        f.puts %Q[ *   All manual changes will get lost.]
+        f.puts %Q[ */]
+        f.puts %Q[]
+        f.puts %Q[#include "mruby.h"]
+        f.puts %Q[]
+        f.write gem_func_decls
+        f.puts %Q[]
+        f.puts %Q[static void]
+        f.puts %Q[mrb_final_mrbgems(mrb_state *mrb) {]
+        f.write gem_final_calls
+        f.puts %Q[}]
+        f.puts %Q[]
+        f.puts %Q[void]
+        f.puts %Q[mrb_init_mrbgems(mrb_state *mrb) {]
+        f.write gem_init_calls
+        f.puts %Q[  mrb_state_atexit(mrb, mrb_final_mrbgems);] unless gem_final_calls.empty?
+        f.puts %Q[}]
+      end
+    end
+  end
+
+  # legal documents
+  file "#{build_dir}/LEGAL" => [MRUBY_CONFIG, __FILE__] do |t|
+    open(t.name, 'w+') do |f|
+     f.puts <<LEGAL
+Copyright (c) #{Time.now.year} mruby developers
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+LEGAL
+
+      if enable_gems?
+        f.puts <<GEMS_LEGAL
+
+Additional Licenses
+
+Due to the reason that you choosed additional mruby packages (GEMS),
+please check the following additional licenses too:
+GEMS_LEGAL
+
+        gems.map do |g|
+          authors = [g.authors].flatten.sort.join(", ")
+          f.puts
+          f.puts "GEM: #{g.name}"
+          f.puts "Copyright (c) #{Time.now.year} #{authors}"
+          f.puts "License: #{g.licenses}"
+        end
+      end
+    end
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/tasks/mruby_build.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/tasks/mruby_build.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/tasks/mruby_build.rake	(revision 270)
@@ -0,0 +1,324 @@
+load "#{MRUBY_ROOT}/tasks/mruby_build_gem.rake"
+load "#{MRUBY_ROOT}/tasks/mruby_build_commands.rake"
+
+module MRuby
+  class << self
+    def targets
+      @targets ||= {}
+    end
+
+    def each_target(&block)
+      return to_enum(:each_target) if block.nil?
+      @targets.each do |key, target|
+        target.instance_eval(&block)
+      end
+    end
+  end
+
+  class Toolchain
+    class << self
+      attr_accessor :toolchains
+    end
+
+    def initialize(name, &block)
+      @name, @initializer = name.to_s, block
+      MRuby::Toolchain.toolchains ||= {}
+      MRuby::Toolchain.toolchains[@name] = self
+    end
+
+    def setup(conf,params={})
+      conf.instance_exec(conf, params, &@initializer)
+    end
+
+    def self.load
+      Dir.glob("#{MRUBY_ROOT}/tasks/toolchains/*.rake").each do |file|
+        Kernel.load file
+      end
+    end
+  end
+  Toolchain.load
+
+  class Build
+    class << self
+      attr_accessor :current
+    end
+    include Rake::DSL
+    include LoadGems
+    attr_accessor :name, :bins, :exts, :file_separator, :build_dir, :gem_clone_dir
+    attr_reader :libmruby, :gems, :toolchains
+    attr_writer :enable_bintest, :enable_test
+
+    COMPILERS = %w(cc cxx objc asm)
+    COMMANDS = COMPILERS + %w(linker archiver yacc gperf git exts mrbc)
+    attr_block MRuby::Build::COMMANDS
+
+    Exts = Struct.new(:object, :executable, :library)
+
+    def initialize(name='host', build_dir=nil, &block)
+      @name = name.to_s
+
+      unless MRuby.targets[@name]
+        if ENV['OS'] == 'Windows_NT'
+          @exts = Exts.new('.o', '.exe', '.a')
+        else
+          @exts = Exts.new('.o', '', '.a')
+        end
+
+        build_dir = build_dir || ENV['MRUBY_BUILD_DIR'] || "#{MRUBY_ROOT}/build"
+
+        @file_separator = '/'
+        @build_dir = "#{build_dir}/#{@name}"
+        @gem_clone_dir = "#{build_dir}/mrbgems"
+        @cc = Command::Compiler.new(self, %w(.c))
+        @cxx = Command::Compiler.new(self, %w(.cc .cxx .cpp))
+        @objc = Command::Compiler.new(self, %w(.m))
+        @asm = Command::Compiler.new(self, %w(.S .asm))
+        @linker = Command::Linker.new(self)
+        @archiver = Command::Archiver.new(self)
+        @yacc = Command::Yacc.new(self)
+        @gperf = Command::Gperf.new(self)
+        @git = Command::Git.new(self)
+        @mrbc = Command::Mrbc.new(self)
+
+        @bins = []
+        @gems, @libmruby = MRuby::Gem::List.new, []
+        @build_mrbtest_lib_only = false
+        @cxx_abi_enabled = false
+        @cxx_exception_disabled = false
+        @enable_bintest = false
+        @enable_test = false
+        @toolchains = []
+
+        MRuby.targets[@name] = self
+      end
+
+      MRuby::Build.current = MRuby.targets[@name]
+      MRuby.targets[@name].instance_eval(&block)
+
+      build_mrbc_exec if name == 'host'
+      build_mrbtest if test_enabled?
+    end
+
+    def enable_debug
+      compilers.each do |c|
+        c.defines += %w(MRB_DEBUG)
+        if toolchains.any? { |toolchain| toolchain == "gcc" }
+          c.flags += %w(-g3 -O0)
+        end
+      end
+      @mrbc.compile_options += ' -g'
+    end
+
+    def disable_cxx_exception
+      @cxx_exception_disabled = true
+    end
+
+    def cxx_abi_enabled?
+      @cxx_abi_enabled
+    end
+
+    def enable_cxx_abi
+      return if @cxx_exception_disabled or @cxx_abi_enabled
+      compilers.each { |c| c.defines += %w(MRB_ENABLE_CXX_EXCEPTION) }
+      linker.command = cxx.command if toolchains.find { |v| v == 'gcc' }
+      @cxx_abi_enabled = true
+    end
+
+    def compile_as_cxx src, cxx_src, obj = nil, includes = []
+      src = File.absolute_path src
+      cxx_src = File.absolute_path cxx_src
+      obj = objfile(cxx_src) if obj.nil?
+
+      file cxx_src => [src, __FILE__] do |t|
+        FileUtils.mkdir_p File.dirname t.name
+        IO.write t.name, <<EOS
+#define __STDC_CONSTANT_MACROS
+#define __STDC_LIMIT_MACROS
+
+extern "C" {
+#include "#{src}"
+}
+
+#{src == "#{MRUBY_ROOT}/src/error.c"? 'mrb_int mrb_jmpbuf::jmpbuf_id = 0;' : ''}
+EOS
+      end
+
+      file obj => cxx_src do |t|
+        cxx.run t.name, t.prerequisites.first, [], ["#{MRUBY_ROOT}/src"] + includes
+      end
+
+      obj
+    end
+
+    def enable_bintest
+      @enable_bintest = true
+    end
+
+    def bintest_enabled?
+      @enable_bintest
+    end
+
+    def toolchain(name, params={})
+      tc = Toolchain.toolchains[name.to_s]
+      fail "Unknown #{name} toolchain" unless tc
+      tc.setup(self, params)
+      @toolchains.unshift name.to_s
+    end
+
+    def primary_toolchain
+      @toolchains.first
+    end
+
+    def root
+      MRUBY_ROOT
+    end
+
+    def enable_test
+      @enable_test = true
+    end
+
+    def test_enabled?
+      @enable_test
+    end
+
+    def build_mrbtest
+      gem :core => 'mruby-test'
+    end
+
+    def build_mrbc_exec
+      gem :core => 'mruby-bin-mrbc'
+    end
+
+    def mrbcfile
+      return @mrbcfile if @mrbcfile
+
+      mrbc_build = MRuby.targets['host']
+      gems.each { |v| mrbc_build = self if v.name == 'mruby-bin-mrbc' }
+      @mrbcfile = mrbc_build.exefile("#{mrbc_build.build_dir}/bin/mrbc")
+    end
+
+    def compilers
+      COMPILERS.map do |c|
+        instance_variable_get("@#{c}")
+      end
+    end
+
+    def define_rules
+      compilers.each do |compiler|
+        if respond_to?(:enable_gems?) && enable_gems?
+          compiler.defines -= %w(DISABLE_GEMS)
+        else
+          compiler.defines += %w(DISABLE_GEMS)
+        end
+        compiler.define_rules build_dir, File.expand_path(File.join(File.dirname(__FILE__), '..'))
+      end
+    end
+
+    def filename(name)
+      if name.is_a?(Array)
+        name.flatten.map { |n| filename(n) }
+      else
+        '"%s"' % name.gsub('/', file_separator)
+      end
+    end
+
+    def cygwin_filename(name)
+      if name.is_a?(Array)
+        name.flatten.map { |n| cygwin_filename(n) }
+      else
+        '"%s"' % `cygpath -w "#{filename(name)}"`.strip
+      end
+    end
+
+    def exefile(name)
+      if name.is_a?(Array)
+        name.flatten.map { |n| exefile(n) }
+      else
+        "#{name}#{exts.executable}"
+      end
+    end
+
+    def objfile(name)
+      if name.is_a?(Array)
+        name.flatten.map { |n| objfile(n) }
+      else
+        "#{name}#{exts.object}"
+      end
+    end
+
+    def libfile(name)
+      if name.is_a?(Array)
+        name.flatten.map { |n| libfile(n) }
+      else
+        "#{name}#{exts.library}"
+      end
+    end
+
+    def build_mrbtest_lib_only
+      @build_mrbtest_lib_only = true
+    end
+
+    def build_mrbtest_lib_only?
+      @build_mrbtest_lib_only
+    end
+
+    def run_test
+      puts ">>> Test #{name} <<<"
+      mrbtest = exefile("#{build_dir}/bin/mrbtest")
+      sh "#{filename mrbtest.relative_path}#{$verbose ? ' -v' : ''}"
+      puts
+      run_bintest if bintest_enabled?
+    end
+
+    def run_bintest
+      targets = @gems.select { |v| File.directory? "#{v.dir}/bintest" }.map { |v| filename v.dir }
+      targets << filename(".") if File.directory? "./bintest"
+      sh "ruby test/bintest.rb #{targets.join ' '}"
+    end
+
+    def print_build_summary
+      puts "================================================"
+      puts "      Config Name: #{@name}"
+      puts " Output Directory: #{self.build_dir.relative_path}"
+      puts "         Binaries: #{@bins.join(', ')}" unless @bins.empty?
+      unless @gems.empty?
+        puts "    Included Gems:"
+        @gems.map do |gem|
+          gem_version = " - #{gem.version}" if gem.version != '0.0.0'
+          gem_summary = " - #{gem.summary}" if gem.summary
+          puts "             #{gem.name}#{gem_version}#{gem_summary}"
+          puts "               - Binaries: #{gem.bins.join(', ')}" unless gem.bins.empty?
+        end
+      end
+      puts "================================================"
+      puts
+    end
+  end # Build
+
+  class CrossBuild < Build
+    attr_block %w(test_runner)
+    # cross compiling targets for building native extensions.
+    # host  - arch of where the built binary will run
+    # build - arch of the machine building the binary
+    attr_accessor :host_target, :build_target
+
+    def initialize(name, build_dir=nil, &block)
+      @test_runner = Command::CrossTestRunner.new(self)
+      super
+    end
+
+    def mrbcfile
+      MRuby.targets['host'].exefile("#{MRuby.targets['host'].build_dir}/bin/mrbc")
+    end
+
+    def run_test
+      mrbtest = exefile("#{build_dir}/bin/mrbtest")
+      if (@test_runner.command == nil)
+        puts "You should run #{mrbtest} on target device."
+        puts
+      else
+        @test_runner.run(mrbtest)
+      end
+    end
+  end # CrossBuild
+end # MRuby
Index: EcnlProtoTool/trunk/mruby-1.2.0/tasks/mruby_build_commands.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/tasks/mruby_build_commands.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/tasks/mruby_build_commands.rake	(revision 270)
@@ -0,0 +1,323 @@
+require 'forwardable'
+
+module MRuby
+  class Command
+    include Rake::DSL
+    extend Forwardable
+    def_delegators :@build, :filename, :objfile, :libfile, :exefile, :cygwin_filename
+    attr_accessor :build, :command
+
+    def initialize(build)
+      @build = build
+    end
+
+    # clone is deep clone without @build
+    def clone
+      target = super
+      excepts = %w(@build)
+      instance_variables.each do |attr|
+        unless excepts.include?(attr.to_s)
+          val = Marshal::load(Marshal.dump(instance_variable_get(attr))) # deep clone
+          target.instance_variable_set(attr, val)
+        end
+      end
+      target
+    end
+
+    NotFoundCommands = {}
+
+    private
+    def _run(options, params={})
+      return sh command + ' ' + ( options % params ) if NotFoundCommands.key? @command
+      begin
+        sh build.filename(command) + ' ' + ( options % params )
+      rescue RuntimeError
+        NotFoundCommands[@command] = true
+        _run options, params
+      end
+    end
+  end
+
+  class Command::Compiler < Command
+    attr_accessor :flags, :include_paths, :defines, :source_exts
+    attr_accessor :compile_options, :option_define, :option_include_path, :out_ext
+
+    def initialize(build, source_exts=[])
+      super(build)
+      @command = ENV['CC'] || 'cc'
+      @flags = [ENV['CFLAGS'] || []]
+      @source_exts = source_exts
+      @include_paths = ["#{MRUBY_ROOT}/include"]
+      @defines = %w()
+      @option_include_path = '-I%s'
+      @option_define = '-D%s'
+      @compile_options = '%{flags} -o %{outfile} -c %{infile}'
+    end
+
+    alias header_search_paths include_paths
+    def search_header_path(name)
+      header_search_paths.find do |v|
+        File.exist? build.filename("#{v}/#{name}").sub(/^"(.*)"$/, '\1')
+      end
+    end
+
+    def search_header(name)
+      path = search_header_path name
+      path && build.filename("#{path}/#{name}").sub(/^"(.*)"$/, '\1')
+    end
+
+    def all_flags(_defineds=[], _include_paths=[], _flags=[])
+      define_flags = [defines, _defineds].flatten.map{ |d| option_define % d }
+      include_path_flags = [include_paths, _include_paths].flatten.map do |f|
+        if MRUBY_BUILD_HOST_IS_CYGWIN
+          option_include_path % cygwin_filename(f)
+        else
+          option_include_path % filename(f)
+        end
+      end
+      [flags, define_flags, include_path_flags, _flags].flatten.join(' ')
+    end
+
+    def run(outfile, infile, _defineds=[], _include_paths=[], _flags=[])
+      FileUtils.mkdir_p File.dirname(outfile)
+      _pp "CC", infile.relative_path, outfile.relative_path
+      if MRUBY_BUILD_HOST_IS_CYGWIN
+        _run compile_options, { :flags => all_flags(_defineds, _include_paths, _flags),
+                                :infile => cygwin_filename(infile), :outfile => cygwin_filename(outfile) }
+      else
+        _run compile_options, { :flags => all_flags(_defineds, _include_paths, _flags),
+                                :infile => filename(infile), :outfile => filename(outfile) }
+      end
+    end
+
+    def define_rules(build_dir, source_dir='')
+      @out_ext = build.exts.object
+      gemrake = File.join(source_dir, "mrbgem.rake")
+      rakedep = File.exist?(gemrake) ? [ gemrake ] : []
+
+      if build_dir.include? "mrbgems/"
+        generated_file_matcher = Regexp.new("^#{Regexp.escape build_dir}/(.*)#{Regexp.escape out_ext}$")
+      else
+        generated_file_matcher = Regexp.new("^#{Regexp.escape build_dir}/(?!mrbgems/.+/)(.*)#{Regexp.escape out_ext}$")
+      end
+      source_exts.each do |ext, compile|
+        rule generated_file_matcher => [
+          proc { |file|
+            file.sub(generated_file_matcher, "#{source_dir}/\\1#{ext}")
+          },
+          proc { |file|
+            get_dependencies(file) + rakedep
+          }
+        ] do |t|
+          run t.name, t.prerequisites.first
+        end
+
+        rule generated_file_matcher => [
+          proc { |file|
+            file.sub(generated_file_matcher, "#{build_dir}/\\1#{ext}")
+          },
+          proc { |file|
+            get_dependencies(file) + rakedep
+          }
+        ] do |t|
+          run t.name, t.prerequisites.first
+        end
+      end
+    end
+
+    private
+    def get_dependencies(file)
+      file = file.ext('d') unless File.extname(file) == '.d'
+      if File.exist?(file)
+        File.read(file).gsub("\\\n ", "").scan(/^\S+:\s+(.+)$/).flatten.map {|s| s.split(' ') }.flatten
+      else
+        []
+      end + [ MRUBY_CONFIG ]
+    end
+  end
+
+  class Command::Linker < Command
+    attr_accessor :flags, :library_paths, :flags_before_libraries, :libraries, :flags_after_libraries
+    attr_accessor :link_options, :option_library, :option_library_path
+
+    def initialize(build)
+      super
+      @command = ENV['LD'] || 'ld'
+      @flags = (ENV['LDFLAGS'] || [])
+      @flags_before_libraries, @flags_after_libraries = [], []
+      @libraries = []
+      @library_paths = []
+      @option_library = '-l%s'
+      @option_library_path = '-L%s'
+      @link_options = "%{flags} -o %{outfile} %{objs} %{flags_before_libraries} %{libs} %{flags_after_libraries}"
+    end
+
+    def all_flags(_library_paths=[], _flags=[])
+      library_path_flags = [library_paths, _library_paths].flatten.map do |f|
+        if MRUBY_BUILD_HOST_IS_CYGWIN
+          option_library_path % cygwin_filename(f)
+        else
+          option_library_path % filename(f)
+        end
+      end
+      [flags, library_path_flags, _flags].flatten.join(' ')
+    end
+
+    def library_flags(_libraries)
+      [libraries, _libraries].flatten.map{ |d| option_library % d }.join(' ')
+    end
+
+    def run(outfile, objfiles, _libraries=[], _library_paths=[], _flags=[], _flags_before_libraries=[], _flags_after_libraries=[])
+      FileUtils.mkdir_p File.dirname(outfile)
+      library_flags = [libraries, _libraries].flatten.map { |d| option_library % d }
+
+      _pp "LD", outfile.relative_path
+      if MRUBY_BUILD_HOST_IS_CYGWIN
+        _run link_options, { :flags => all_flags(_library_paths, _flags),
+                             :outfile => cygwin_filename(outfile) , :objs => cygwin_filename(objfiles).join(' '),
+                             :flags_before_libraries => [flags_before_libraries, _flags_before_libraries].flatten.join(' '),
+                             :flags_after_libraries => [flags_after_libraries, _flags_after_libraries].flatten.join(' '),
+                             :libs => library_flags.join(' ') }
+      else
+        _run link_options, { :flags => all_flags(_library_paths, _flags),
+                             :outfile => filename(outfile) , :objs => filename(objfiles).join(' '),
+                             :flags_before_libraries => [flags_before_libraries, _flags_before_libraries].flatten.join(' '),
+                             :flags_after_libraries => [flags_after_libraries, _flags_after_libraries].flatten.join(' '),
+                             :libs => library_flags.join(' ') }
+      end
+    end
+  end
+
+  class Command::Archiver < Command
+    attr_accessor :archive_options
+
+    def initialize(build)
+      super
+      @command = ENV['AR'] || 'ar'
+      @archive_options = 'rs %{outfile} %{objs}'
+    end
+
+    def run(outfile, objfiles)
+      FileUtils.mkdir_p File.dirname(outfile)
+      _pp "AR", outfile.relative_path
+      if MRUBY_BUILD_HOST_IS_CYGWIN
+        _run archive_options, { :outfile => cygwin_filename(outfile), :objs => cygwin_filename(objfiles).join(' ') }
+      else
+        _run archive_options, { :outfile => filename(outfile), :objs => filename(objfiles).join(' ') }
+      end
+    end
+  end
+
+  class Command::Yacc < Command
+    attr_accessor :compile_options
+
+    def initialize(build)
+      super
+      @command = 'bison'
+      @compile_options = '-o %{outfile} %{infile}'
+    end
+
+    def run(outfile, infile)
+      FileUtils.mkdir_p File.dirname(outfile)
+      _pp "YACC", infile.relative_path, outfile.relative_path
+      _run compile_options, { :outfile => filename(outfile) , :infile => filename(infile) }
+    end
+  end
+
+  class Command::Gperf < Command
+    attr_accessor :compile_options
+
+    def initialize(build)
+      super
+      @command = 'gperf'
+      @compile_options = '-L ANSI-C -C -p -j1 -i 1 -g -o -t -N mrb_reserved_word -k"1,3,$" %{infile} > %{outfile}'
+    end
+
+    def run(outfile, infile)
+      FileUtils.mkdir_p File.dirname(outfile)
+      _pp "GPERF", infile.relative_path, outfile.relative_path
+      _run compile_options, { :outfile => filename(outfile) , :infile => filename(infile) }
+    end
+  end
+
+  class Command::Git < Command
+    attr_accessor :flags
+    attr_accessor :clone_options, :pull_options, :checkout_options
+
+    def initialize(build)
+      super
+      @command = 'git'
+      @flags = %w[]
+      @clone_options = "clone %{flags} %{url} %{dir}"
+      @pull_options = "pull"
+      @checkout_options = "checkout %{checksum_hash}"
+    end
+
+    def run_clone(dir, url, _flags = [])
+      _pp "GIT", url, dir.relative_path
+      _run clone_options, { :flags => [flags, _flags].flatten.join(' '), :url => url, :dir => filename(dir) }
+    end
+
+    def run_pull(dir, url)
+      root = Dir.pwd
+      Dir.chdir dir
+      _pp "GIT PULL", url, dir.relative_path
+      _run pull_options
+      Dir.chdir root
+    end
+
+    def run_checkout(dir, checksum_hash)
+      root = Dir.pwd
+      Dir.chdir dir
+      _pp "GIT CHECKOUT", checksum_hash
+      _run checkout_options, { :checksum_hash => checksum_hash }
+      Dir.chdir root
+    end
+  end
+
+  class Command::Mrbc < Command
+    attr_accessor :compile_options
+
+    def initialize(build)
+      super
+      @command = nil
+      @compile_options = "-B%{funcname} -o-"
+    end
+
+    def run(out, infiles, funcname)
+      @command ||= @build.mrbcfile
+      infiles = [infiles].flatten
+      infiles.each do |f|
+        _pp "MRBC", f.relative_path, nil, :indent => 2
+      end
+      IO.popen("#{filename @command} #{@compile_options % {:funcname => funcname}} #{filename(infiles).join(' ')}", 'r+') do |io|
+        out.puts io.read
+      end
+      # if mrbc execution fail, drop the file
+      if $?.exitstatus != 0
+        File.delete(out.path)
+        exit(-1)
+      end
+    end
+  end
+
+  class Command::CrossTestRunner < Command
+    attr_accessor :runner_options
+    attr_accessor :verbose_flag
+    attr_accessor :flags
+
+    def initialize(build)
+      super
+      @command = nil
+      @runner_options = '%{flags} %{infile}'
+      @verbose_flag = ''
+      @flags = []
+    end
+
+    def run(testbinfile)
+      puts "TEST for " + @build.name
+      _run runner_options, { :flags => [flags, verbose_flag].flatten.join(' '), :infile => testbinfile }
+    end
+  end
+
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/tasks/mruby_build_gem.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/tasks/mruby_build_gem.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/tasks/mruby_build_gem.rake	(revision 270)
@@ -0,0 +1,122 @@
+module MRuby
+  module LoadGems
+    def gembox(gemboxfile)
+      gembox = File.expand_path("#{gemboxfile}.gembox", "#{MRUBY_ROOT}/mrbgems")
+      fail "Can't find gembox '#{gembox}'" unless File.exist?(gembox)
+
+      GemBox.config = self
+      GemBox.path = gembox
+
+      instance_eval File.read(gembox)
+
+      GemBox.path = nil
+    end
+
+    def gem(gemdir, &block)
+      caller_dir = File.expand_path(File.dirname(/^(.*?):\d/.match(caller.first).to_a[1]))
+
+      if gemdir.is_a?(Hash)
+        gemdir = load_special_path_gem(gemdir)
+      elsif GemBox.path && gemdir.is_a?(String)
+        gemdir = File.expand_path(gemdir, File.dirname(GemBox.path))
+      else
+        gemdir = File.expand_path(gemdir, caller_dir)
+      end
+
+      gemrake = File.join(gemdir, "mrbgem.rake")
+
+      fail "Can't find #{gemrake}" unless File.exist?(gemrake)
+      Gem.current = nil
+      load gemrake
+      return nil unless Gem.current
+
+      Gem.current.dir = gemdir
+      Gem.current.build = self.is_a?(MRuby::Build) ? self : MRuby::Build.current
+      Gem.current.build_config_initializer = block
+      gems << Gem.current
+
+      cxx_srcs = ['src', 'test', 'tools'].map do |subdir|
+        Dir.glob("#{Gem.current.dir}/#{subdir}/*.{cpp,cxx,cc}")
+      end.flatten
+      enable_cxx_abi unless cxx_srcs.empty?
+
+      Gem.current
+    end
+
+    def load_special_path_gem(params)
+      if params[:github]
+        params[:git] = "https://github.com/#{params[:github]}.git"
+      elsif params[:bitbucket]
+        if params[:method] == "ssh"
+          params[:git] = "git@bitbucket.org:#{params[:bitbucket]}.git"
+        else
+          params[:git] = "https://bitbucket.org/#{params[:bitbucket]}.git"
+        end
+      elsif params[:mgem]
+        mgem_list_dir = "#{gem_clone_dir}/mgem-list"
+        mgem_list_url = 'https://github.com/mruby/mgem-list.git'
+        if File.exist? mgem_list_dir
+          git.run_pull mgem_list_dir, mgem_list_url if $pull_gems
+        else
+          FileUtils.mkdir_p mgem_list_dir
+          git.run_clone mgem_list_dir, mgem_list_url, "--depth 1"
+        end
+
+        require 'yaml'
+
+        conf_path = "#{mgem_list_dir}/#{params[:mgem]}.gem"
+        conf_path = "#{mgem_list_dir}/mruby-#{params[:mgem]}.gem" unless File.exist? conf_path
+        fail "mgem not found: #{params[:mgem]}" unless File.exist? conf_path
+        conf = YAML.load File.read conf_path
+
+        fail "unknown mgem protocol: #{conf['protocol']}" if conf['protocol'] != 'git'
+        params[:git] = conf['repository']
+        params[:branch] = conf['branch'] if conf['branch']
+      end
+
+      if params[:core]
+        gemdir = "#{root}/mrbgems/#{params[:core]}"
+      elsif params[:path]
+        require 'pathname'
+        gemdir = Pathname.new(params[:path]).absolute? ? params[:path] : "#{root}/#{params[:path]}"
+      elsif params[:git]
+        url = params[:git]
+        gemdir = "#{gem_clone_dir}/#{url.match(/([-\w]+)(\.[-\w]+|)$/).to_a[1]}"
+
+        # by default the 'master' branch is used
+        branch = params[:branch] ? params[:branch] : 'master'
+
+        if File.exist?(gemdir)
+          if $pull_gems
+            git.run_pull gemdir, url
+          else
+            gemdir
+          end
+        else
+          options = [params[:options]] || []
+          options << "--recursive"
+          options << "--branch \"#{branch}\""
+          options << "--depth 1" unless params[:checksum_hash]
+          FileUtils.mkdir_p "#{gem_clone_dir}"
+          git.run_clone gemdir, url, options
+        end
+
+        if params[:checksum_hash]
+          # Jump to the specified commit
+          git.run_checkout gemdir, params[:checksum_hash]
+        else
+          # Jump to the top of the branch
+          git.run_checkout gemdir, branch if $pull_gems
+        end
+      else
+        fail "unknown gem option #{params}"
+      end
+
+      gemdir
+    end
+
+    def enable_gems?
+      !@gems.empty?
+    end
+  end # LoadGems
+end # MRuby
Index: EcnlProtoTool/trunk/mruby-1.2.0/tasks/ruby_ext.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/tasks/ruby_ext.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/tasks/ruby_ext.rake	(revision 270)
@@ -0,0 +1,79 @@
+class Object
+  class << self
+    def attr_block(*syms)
+      syms.flatten.each do |sym|
+        class_eval "def #{sym}(&block);block.call(@#{sym}) if block_given?;@#{sym};end"
+      end
+    end
+  end
+end
+
+class String
+  def relative_path_from(dir)
+    Pathname.new(File.expand_path(self)).relative_path_from(Pathname.new(File.expand_path(dir))).to_s
+  end
+
+  def relative_path
+    relative_path_from(Dir.pwd)
+  end
+
+  # Compatible with 1.9 on 1.8
+  def %(params)
+    if params.is_a?(Hash)
+      str = self.clone
+      params.each do |k, v|
+        str.gsub!("%{#{k}}") { v }
+      end
+      str
+    else
+      if params.is_a?(Array)
+        sprintf(self, *params)
+      else
+        sprintf(self, params)
+      end
+    end
+  end
+end
+
+class Symbol
+  # Compatible with 1.9 on 1.8
+  def to_proc
+    proc { |obj, *args| obj.send(self, *args) }
+  end
+end
+
+module Enumerable
+  # Compatible with 1.9 on 1.8
+  def each_with_object(memo)
+    return to_enum :each_with_object, memo unless block_given?
+    each { |obj| yield obj, memo }
+    memo
+  end
+end
+
+$pp_show = true
+
+if $verbose.nil?
+  if Rake.respond_to?(:verbose) && !Rake.verbose.nil?
+    if Rake.verbose.class == TrueClass
+      # verbose message logging
+      $pp_show = false
+    else
+      $pp_show = true
+      Rake.verbose(false)
+    end
+  else
+    # could not identify rake version
+    $pp_show = false
+  end
+else
+  $pp_show = false if $verbose
+end
+
+def _pp(cmd, src, tgt=nil, options={})
+  return unless $pp_show
+
+  width = 5
+  template = options[:indent] ? "%#{width*options[:indent]}s %s %s" : "%-#{width}s %s %s"
+  puts template % [cmd, src, tgt ? "-> #{tgt}" : nil]
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/tasks/toolchains/android.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/tasks/toolchains/android.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/tasks/toolchains/android.rake	(revision 270)
@@ -0,0 +1,216 @@
+class MRuby::Toolchain::Android
+  DEFAULT_ARCH = 'armeabi'
+  DEFAULT_PLATFORM = 'android-14'
+  DEFAULT_TOOLCHAIN = :gcc
+  DEFAULT_NDK_HOMES = %w{
+    /usr/local/opt/android-ndk
+  }
+  TOOLCHAINS = [:gcc, :clang]
+  ARCHITECTURES = %w{
+    armeabi armeabi-v7a arm64-v8a
+    mips mips64
+    x86 x86_64
+  }
+
+  class AndroidNDKHomeNotFound < StandardError
+    def message
+        <<-EOM
+Couldn't find Android NDK Home.
+Set ANDROID_NDK_HOME environment variable or set :ndk_home parameter
+        EOM
+    end
+  end
+
+  attr_reader :params
+
+  def initialize(params)
+    @params = params
+  end
+
+  def home_path
+    @home_path ||= Pathname(
+      params[:ndk_home] ||
+        ENV['ANDROID_NDK_HOME'] ||
+        DEFAULT_NDK_HOMES.find{ |path| File.directory?(path) } ||
+        raise(AndroidNDKHomeNotFound)
+    )
+  end
+
+  def arch
+    params.fetch(:arch){ DEFAULT_ARCH }
+  end
+
+  def platform
+    params.fetch(:platform){ DEFAULT_PLATFORM }
+  end
+
+  def toolchain
+    params.fetch(:toolchain){ DEFAULT_TOOLCHAIN }
+  end
+
+  def toolchain_version
+    params.fetch(:toolchain_version) do
+      test = case toolchain
+      when :gcc
+        case arch
+        when /armeabi/
+          'arm-linux-androideabi-*'
+        when /arm64/
+          'aarch64-linux-android-*'
+        when /mips64/
+          'mips64el-linux-android-*'
+        when /mips/
+          'mipsel-linux-android-*'
+        when /x86_64/
+          'x86_64-*'
+        when /x86/
+          'x86-*'
+        end
+      when :clang
+        'llvm-*'
+      end
+
+      Dir[home_path.join('toolchains',test)].map{|t| t.match(/-(\d+\.\d+)$/); $1.to_f }.max
+    end
+  end
+
+  def toolchain_path
+    prefix = case toolchain
+             when :clang then 'llvm-'
+             when :gcc
+               case arch
+               when /armeabi/ then 'arm-linux-androideabi-'
+               when /arm64/   then 'aarch64-linux-android-'
+               when /x86_64/  then 'x86_64-'
+               when /x86/     then 'x86-'
+               when /mips64/  then 'mips64el-linux-android-'
+               when /mips/    then 'mipsel-linux-android-'
+               end
+             end
+    home_path.join('toolchains', prefix + toolchain_version.to_s, 'prebuilt', host_platform)
+  end
+
+  def sysroot
+    path = case arch
+           when /armeabi/ then 'arch-arm'
+           when /arm64/   then 'arch-arm64'
+           when /x86_64/  then 'arch-x86_64'
+           when /x86/     then 'arch-x86'
+           when /mips64/  then 'arch-mips64'
+           when /mips/    then 'arch-mips'
+           end
+
+    home_path.join('platforms', platform, path).to_s
+  end
+
+  def bin(command)
+    command = command.to_s
+
+    if toolchain == :gcc
+      command = case arch
+                when /armeabi/ then 'arm-linux-androideabi-'
+                when /arm64/   then 'aarch64-linux-android-'
+                when /x86_64/  then 'x86_64-linux-android-'
+                when /x86/     then 'i686-linux-android-'
+                when /mips64/  then 'mips64el-linux-android-'
+                when /mips/    then 'mipsel-linux-android-'
+                end + command
+    end
+
+    toolchain_path.join('bin',command).to_s
+  end
+
+  def cc
+    case toolchain
+    when :gcc   then bin(:gcc)
+    when :clang then bin(:clang)
+    end
+  end
+
+  def cflags
+    flags = []
+
+    case toolchain
+    when :gcc
+      flags += %W(-ffunction-sections -funwind-tables -no-canonical-prefixes)
+      flags += %W(-D__android__ -mandroid --sysroot="#{sysroot}")
+      case arch
+      when /arm64/
+        flags += %W(-fpic -fstack-protector-strong)
+      when 'armeabi-v7a-hard'
+        flags += %W(-fpic -fstack-protector-strong -march=armv7-a -mhard-float -D_NDK_MATH_NO_SOFTFP=1 -mfpu=vfpv3-d16)
+      when 'armeabi-v7a'
+        flags += %W(-fpic -fstack-protector-strong -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16)
+      when /arm/
+        flags += %W(-fpic -fstack-protector-strong -march=armv5te -mtune=xscale -msoft-float)
+      when /mips/
+        flags += %W(-fpic -fno-strict-aliasing -finline-functions -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers)
+      when /x86/
+        flags += %W(-fstack-protector-strong)
+      end
+    when :clang
+    end
+
+    flags
+  end
+
+  def ld
+    cc
+  end
+
+  def ldflags
+    flags = []
+    case toolchain
+    when :gcc
+      flags += %W(-no-canonical-prefixes)
+      flags += %W(-D__android__ -mandroid --sysroot="#{sysroot}")
+      case arch
+      when 'armeabi-v7a-hard'
+        flags += %W(-march=armv7-a -Wl,--fix-cortex-a8 -Wl,--no-warn-mismatch -lm_hard)
+      when 'armeabi-v7a'
+        flags += %W(-march=armv7-a -Wl,--fix-cortex-a8)
+      end
+    end
+    
+    flags
+  end
+
+  def ar
+    case toolchain
+    when :gcc   then bin(:ar)
+    when :clang then bin('llvm-ar')
+    end
+  end
+
+  def host_platform
+    case RUBY_PLATFORM
+    when /cygwin|mswin|mingw|bccwin|wince|emx/i
+      'windows'
+    when /x86_64-darwin/i
+      'darwin-x86_64'
+    when /darwin/i
+      'darwin-x86'
+    when /x86_64-linux/i
+      'linux-x86_64'
+    when /linux/i
+      'linux-x86'
+    else
+      raise NotImplementedError, "Unknown host platform (#{RUBY_PLATFORM})"
+    end
+  end
+end
+
+MRuby::Toolchain.new(:android) do |conf, params|
+  ndk = MRuby::Toolchain::Android.new(params)
+
+  toolchain ndk.toolchain
+
+  [conf.cc, conf.cxx, conf.objc, conf.asm].each do |cc|
+    cc.command = ndk.cc
+    cc.flags = ndk.cflags
+  end
+  conf.linker.command = ndk.ld
+  conf.linker.flags = ndk.ldflags
+  conf.archiver.command = ndk.ar
+end
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/tasks/toolchains/clang.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/tasks/toolchains/clang.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/tasks/toolchains/clang.rake	(revision 270)
@@ -0,0 +1,9 @@
+MRuby::Toolchain.new(:clang) do |conf|
+  toolchain :gcc
+
+  [conf.cc, conf.objc, conf.asm].each do |cc|
+    cc.command = ENV['CC'] || 'clang'
+  end
+  conf.cxx.command = ENV['CXX'] || 'clang++'
+  conf.linker.command = ENV['LD'] || 'clang'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/tasks/toolchains/gcc.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/tasks/toolchains/gcc.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/tasks/toolchains/gcc.rake	(revision 270)
@@ -0,0 +1,54 @@
+MRuby::Toolchain.new(:gcc) do |conf|
+  [conf.cc, conf.objc, conf.asm].each do |cc|
+    cc.command = ENV['CC'] || 'gcc'
+    cc.flags = [ENV['CFLAGS'] || %w(-g -std=gnu99 -Og -Wall -Werror-implicit-function-declaration -Wdeclaration-after-statement -Wwrite-strings)]
+    cc.defines = %w(DISABLE_GEMS)
+    cc.option_include_path = '-I%s'
+    cc.option_define = '-D%s'
+    cc.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}'
+  end
+
+  [conf.cxx].each do |cxx|
+    cxx.command = ENV['CXX'] || 'g++'
+    cxx.flags = [ENV['CXXFLAGS'] || ENV['CFLAGS'] || %w(-g -Og -Wall -Werror-implicit-function-declaration)]
+    cxx.defines = %w(DISABLE_GEMS)
+    cxx.option_include_path = '-I%s'
+    cxx.option_define = '-D%s'
+    cxx.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}'
+  end
+
+  conf.linker do |linker|
+    linker.command = ENV['LD'] || 'gcc'
+    linker.flags = [ENV['LDFLAGS'] || %w()]
+    linker.libraries = %w(m)
+    linker.library_paths = []
+    linker.option_library = '-l%s'
+    linker.option_library_path = '-L%s'
+    linker.link_options = '%{flags} -o %{outfile} %{objs} %{flags_before_libraries} %{libs} %{flags_after_libraries}'
+  end
+
+  [[conf.cc, 'c'], [conf.cxx, 'c++']].each do |cc, lang|
+    cc.instance_variable_set :@header_search_language, lang
+    def cc.header_search_paths
+      if @header_search_command != command
+        result = `echo | #{build.filename command} -x#{@header_search_language} -Wp,-v - -fsyntax-only 2>&1`
+        result = `echo | #{command} -x#{@header_search_language} -Wp,-v - -fsyntax-only 2>&1` if $?.exitstatus != 0
+        return include_paths if  $?.exitstatus != 0
+
+        @frameworks = []
+        @header_search_paths = result.lines.map { |v|
+          framework = v.match(/^ (.*)(?: \(framework directory\))$/)
+          if framework
+            @frameworks << framework[1]
+            next nil
+          end
+
+          v.match(/^ (.*)$/)
+        }.compact.map { |v| v[1] }.select { |v| File.directory? v }
+        @header_search_paths += include_paths
+        @header_search_command = command
+      end
+      @header_search_paths
+    end
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/tasks/toolchains/visualcpp.rake
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/tasks/toolchains/visualcpp.rake	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/tasks/toolchains/visualcpp.rake	(revision 270)
@@ -0,0 +1,53 @@
+MRuby::Toolchain.new(:visualcpp) do |conf|
+  [conf.cc].each do |cc|
+    cc.command = ENV['CC'] || 'cl.exe'
+    # C4013: implicit function declaration
+    cc.flags = [ENV['CFLAGS'] || %w(/c /nologo /W3 /we4013 /Zi /MD /O2 /D_CRT_SECURE_NO_WARNINGS)]
+    cc.defines = %w(DISABLE_GEMS MRB_STACK_EXTEND_DOUBLING)
+    cc.option_include_path = '/I%s'
+    cc.option_define = '/D%s'
+    cc.compile_options = "%{flags} /Fo%{outfile} %{infile}"
+  end
+
+  [conf.cxx].each do |cxx|
+    cxx.command = ENV['CXX'] || 'cl.exe'
+    cxx.flags = [ENV['CXXFLAGS'] || ENV['CFLAGS'] || %w(/c /nologo /W3 /Zi /MD /O2 /EHs /D_CRT_SECURE_NO_WARNINGS)]
+    cxx.defines = %w(DISABLE_GEMS MRB_STACK_EXTEND_DOUBLING)
+    cxx.option_include_path = '/I%s'
+    cxx.option_define = '/D%s'
+    cxx.compile_options = "%{flags} /Fo%{outfile} %{infile}"
+  end
+
+  conf.linker do |linker|
+    linker.command = ENV['LD'] || 'link.exe'
+    linker.flags = [ENV['LDFLAGS'] || %w(/NOLOGO /DEBUG /INCREMENTAL:NO /OPT:ICF /OPT:REF)]
+    linker.libraries = %w()
+    linker.library_paths = %w()
+    linker.option_library = '%s.lib'
+    linker.option_library_path = '/LIBPATH:%s'
+    linker.link_options = "%{flags} /OUT:%{outfile} %{objs} %{flags_before_libraries} %{libs} %{flags_after_libraries}"
+  end
+
+  conf.archiver do |archiver|
+    archiver.command = ENV['AR'] || 'lib.exe'
+    archiver.archive_options = '/nologo /OUT:%{outfile} %{objs}'
+  end
+
+  conf.yacc do |yacc|
+    yacc.command = ENV['YACC'] || 'bison.exe'
+    yacc.compile_options = '-o %{outfile} %{infile}'
+  end
+
+  conf.gperf do |gperf|
+    gperf.command = 'gperf.exe'
+    gperf.compile_options = '-L ANSI-C -C -p -j1 -i 1 -g -o -t -N mrb_reserved_word -k"1,3,$" %{infile} > %{outfile}'
+  end
+
+  conf.exts do |exts|
+    exts.object = '.obj'
+    exts.executable = '.exe'
+    exts.library = '.lib'
+  end
+
+  conf.file_separator = '\\'
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/assert.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/assert.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/assert.rb	(revision 270)
@@ -0,0 +1,260 @@
+$ok_test = 0
+$ko_test = 0
+$kill_test = 0
+$asserts  = []
+$test_start = Time.now if Object.const_defined?(:Time)
+
+# Implementation of print due to the reason that there might be no print
+def t_print(*args)
+  i = 0
+  len = args.size
+  while i < len
+    str = args[i].to_s
+    begin
+      __printstr__ str
+    rescue NoMethodError
+      __t_printstr__ str rescue print str
+    end
+    i += 1
+  end
+end
+
+##
+# Create the assertion in a readable way
+def assertion_string(err, str, iso=nil, e=nil, bt=nil)
+  msg = "#{err}#{str}"
+  msg += " [#{iso}]" if iso && iso != ''
+  msg += " => #{e.message}" if e
+  msg += " (mrbgems: #{GEMNAME})" if Object.const_defined?(:GEMNAME)
+  if $mrbtest_assert && $mrbtest_assert.size > 0
+    $mrbtest_assert.each do |idx, str, diff|
+      msg += "\n - Assertion[#{idx}] Failed: #{str}\n#{diff}"
+    end
+  end
+  msg += "\nbacktrace:\n\t#{bt.join("\n\t")}" if bt
+  msg
+end
+
+##
+# Verify a code block.
+#
+# str : A remark which will be printed in case
+#       this assertion fails
+# iso : The ISO reference code of the feature
+#       which will be tested by this
+#       assertion
+def assert(str = 'Assertion failed', iso = '')
+  t_print(str, (iso != '' ? " [#{iso}]" : ''), ' : ') if $mrbtest_verbose
+  begin
+    $mrbtest_assert = []
+    $mrbtest_assert_idx = 0
+    if(!yield || $mrbtest_assert.size > 0)
+      $asserts.push(assertion_string('Fail: ', str, iso, nil))
+      $ko_test += 1
+      t_print('F')
+    else
+      $ok_test += 1
+      t_print('.')
+    end
+  rescue Exception => e
+    bt = e.backtrace if $mrbtest_verbose
+    if e.class.to_s == 'MRubyTestSkip'
+      $asserts.push "Skip: #{str} #{iso} #{e.cause}"
+      t_print('?')
+    else
+      $asserts.push(assertion_string("#{e.class}: ", str, iso, e, bt))
+      $kill_test += 1
+      t_print('X')
+  end
+  ensure
+    $mrbtest_assert = nil
+  end
+  t_print("\n") if $mrbtest_verbose
+end
+
+def assertion_diff(exp, act)
+  "    Expected: #{exp.inspect}\n" +
+  "      Actual: #{act.inspect}"
+end
+
+def assert_true(ret, msg = nil, diff = nil)
+  if $mrbtest_assert
+    $mrbtest_assert_idx += 1
+    unless ret
+      msg = "Expected #{ret.inspect} to be true" unless msg
+      diff = assertion_diff(true, ret)  unless diff
+      $mrbtest_assert.push([$mrbtest_assert_idx, msg, diff])
+    end
+  end
+  ret
+end
+
+def assert_false(ret, msg = nil, diff = nil)
+  if $mrbtest_assert
+    $mrbtest_assert_idx += 1
+    if ret
+      msg = "Expected #{ret.inspect} to be false" unless msg
+      diff = assertion_diff(false, ret) unless diff
+
+      $mrbtest_assert.push([$mrbtest_assert_idx, msg, diff])
+    end
+  end
+  !ret
+end
+
+def assert_equal(arg1, arg2 = nil, arg3 = nil)
+  if block_given?
+    exp, act, msg = arg1, yield, arg2
+  else
+    exp, act, msg = arg1, arg2, arg3
+  end
+
+  msg = "Expected to be equal" unless msg
+  diff = assertion_diff(exp, act)
+  assert_true(exp == act, msg, diff)
+end
+
+def assert_not_equal(arg1, arg2 = nil, arg3 = nil)
+  if block_given?
+    exp, act, msg = arg1, yield, arg2
+  else
+    exp, act, msg = arg1, arg2, arg3
+  end
+
+  msg = "Expected to be not equal" unless msg
+  diff = assertion_diff(exp, act)
+  assert_false(exp == act, msg, diff)
+end
+
+def assert_nil(obj, msg = nil)
+  msg = "Expected #{obj.inspect} to be nil" unless msg
+  diff = assertion_diff(nil, obj)
+  assert_true(obj.nil?, msg, diff)
+end
+
+def assert_include(collection, obj, msg = nil)
+  msg = "Expected #{collection.inspect} to include #{obj.inspect}" unless msg
+  diff = "    Collection: #{collection.inspect}\n" +
+         "        Object: #{obj.inspect}"
+  assert_true(collection.include?(obj), msg, diff)
+end
+
+def assert_not_include(collection, obj, msg = nil)
+  msg = "Expected #{collection.inspect} to not include #{obj.inspect}" unless msg
+  diff = "    Collection: #{collection.inspect}\n" +
+         "        Object: #{obj.inspect}"
+  assert_false(collection.include?(obj), msg, diff)
+end
+
+def assert_raise(*exp)
+  ret = true
+  if $mrbtest_assert
+    $mrbtest_assert_idx += 1
+    msg = exp.last.class == String ? exp.pop : nil
+    msg = msg.to_s + " : " if msg
+    should_raise = false
+    begin
+      yield
+      should_raise = true
+    rescue Exception => e
+      msg = "#{msg}#{exp.inspect} exception expected, not"
+      diff = "      Class: <#{e.class}>\n" +
+             "    Message: #{e.message}"
+      if not exp.any?{|ex| ex.instance_of?(Module) ? e.kind_of?(ex) : ex == e.class }
+        $mrbtest_assert.push([$mrbtest_assert_idx, msg, diff])
+        ret = false
+      end
+    end
+
+    exp = exp.first if exp.first
+    if should_raise
+      msg = "#{msg}#{exp.inspect} expected but nothing was raised."
+      $mrbtest_assert.push([$mrbtest_assert_idx, msg, nil])
+      ret = false
+    end
+  end
+  ret
+end
+
+def assert_nothing_raised(*exp)
+  ret = true
+  if $mrbtest_assert
+    $mrbtest_assert_idx += 1
+    msg = exp.last.class == String ? exp.pop : ""
+    begin
+      yield
+    rescue Exception => e
+      msg = "#{msg} exception raised."
+      diff = "      Class: <#{e.class}>\n" +
+             "    Message: #{e.message}"
+      $mrbtest_assert.push([$mrbtest_assert_idx, msg, diff])
+      ret = false
+    end
+  end
+  ret
+end
+
+##
+# Fails unless +obj+ is a kind of +cls+.
+def assert_kind_of(cls, obj, msg = nil)
+  msg = "Expected #{obj.inspect} to be a kind of #{cls}, not #{obj.class}" unless msg
+  diff = assertion_diff(cls, obj.class)
+  assert_true(obj.kind_of?(cls), msg, diff)
+end
+
+##
+# Fails unless +exp+ is equal to +act+ in terms of a Float
+def assert_float(exp, act, msg = nil)
+  msg = "Float #{exp} expected to be equal to float #{act}" unless msg
+  diff = assertion_diff(exp, act)
+  assert_true check_float(exp, act), msg, diff
+end
+
+##
+# Report the test result and print all assertions
+# which were reported broken.
+def report()
+  t_print("\n")
+
+  $asserts.each do |msg|
+    puts msg
+  end
+
+  $total_test = $ok_test+$ko_test+$kill_test
+  t_print("Total: #{$total_test}\n")
+
+  t_print("   OK: #{$ok_test}\n")
+  t_print("   KO: #{$ko_test}\n")
+  t_print("Crash: #{$kill_test}\n")
+
+  if Object.const_defined?(:Time)
+    t_time = Time.now - $test_start
+    t_print(" Time: #{t_time.round(2)} seconds\n")
+  end
+end
+
+##
+# Performs fuzzy check for equality on methods returning floats
+def check_float(a, b)
+  tolerance = 1e-12
+  a = a.to_f
+  b = b.to_f
+  if a.finite? and b.finite?
+    (a-b).abs < tolerance
+  else
+    true
+  end
+end
+
+##
+# Skip the test
+class MRubyTestSkip < NotImplementedError
+  attr_accessor :cause
+  def initialize(cause)
+    @cause = cause
+  end
+end
+
+def skip(cause = "")
+  raise MRubyTestSkip.new(cause)
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/bintest.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/bintest.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/bintest.rb	(revision 270)
@@ -0,0 +1,28 @@
+$:.unshift File.dirname(File.dirname(File.expand_path(__FILE__)))
+require 'test/assert.rb'
+
+def cmd(s)
+  case RbConfig::CONFIG['host_os']
+  when /mswin(?!ce)|mingw|cygwin|bccwin/
+    "bin\\#{s}.exe"
+  else
+    "bin/#{s}"
+  end
+end
+
+def shellquote(s)
+  case RbConfig::CONFIG['host_os']
+  when /mswin(?!ce)|mingw|cygwin|bccwin/
+    "\"#{s}\""
+  else
+    "'#{s}'"
+  end
+end
+
+ARGV.each do |gem|
+  Dir["#{gem}/bintest/**/*.rb"].each do |file|
+    load file
+  end
+end
+
+load 'test/report.rb'
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/report.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/report.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/report.rb	(revision 270)
@@ -0,0 +1,4 @@
+report
+if $ko_test > 0 or $kill_test > 0
+  raise "mrbtest failed (KO:#{$ko_test}, Crash:#{$kill_test})"
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/argumenterror.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/argumenterror.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/argumenterror.rb	(revision 270)
@@ -0,0 +1,16 @@
+##
+# ArgumentError ISO Test
+
+assert('ArgumentError', '15.2.24') do
+  e2 = nil
+  a = []
+  begin
+    # this will cause an exception due to the wrong arguments
+    a[]
+  rescue => e1
+    e2 = e1
+  end
+
+  assert_equal(Class, ArgumentError.class)
+  assert_equal(ArgumentError, e2.class)
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/array.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/array.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/array.rb	(revision 270)
@@ -0,0 +1,349 @@
+##
+# Array ISO Test
+
+assert('Array', '15.2.12') do
+  assert_equal(Class, Array.class)
+end
+
+assert('Array inclueded modules', '15.2.12.3') do
+  assert_true(Array.include?(Enumerable))
+end
+
+assert('Array.[]', '15.2.12.4.1') do
+  assert_equal([1, 2, 3], Array.[](1,2,3))
+end
+
+assert('Array#+', '15.2.12.5.1') do
+  assert_equal([1, 1], [1].+([1]))
+end
+
+assert('Array#*', '15.2.12.5.2') do
+  assert_raise(ArgumentError) do
+    # this will cause an exception due to the wrong argument
+    [1].*(-1)
+  end
+  assert_equal([1, 1, 1], [1].*(3))
+  assert_equal([], [1].*(0))
+end
+
+assert('Array#<<', '15.2.12.5.3') do
+  assert_equal([1, 1], [1].<<(1))
+end
+
+assert('Array#[]', '15.2.12.5.4') do
+  a = Array.new
+  assert_raise(ArgumentError) do
+    # this will cause an exception due to the wrong arguments
+    a.[]()
+  end
+  assert_raise(ArgumentError) do
+    # this will cause an exception due to the wrong arguments
+    a.[](1,2,3)
+  end
+
+  assert_equal(2, [1,2,3].[](1))
+  assert_equal(nil, [1,2,3].[](4))
+  assert_equal(3, [1,2,3].[](-1))
+  assert_equal(nil, [1,2,3].[](-4))
+
+  a = [ "a", "b", "c", "d", "e" ]
+  assert_equal("b", a[1.1])
+  assert_equal(["b", "c"], a[1,2])
+  assert_equal(["b", "c", "d"], a[1..-2])
+end
+
+assert('Array#[]=', '15.2.12.5.5') do
+  a = Array.new
+  assert_raise(ArgumentError) do
+    # this will cause an exception due to the wrong arguments
+    a.[]=()
+  end
+  assert_raise(ArgumentError) do
+    # this will cause an exception due to the wrong arguments
+    a.[]=(1,2,3,4)
+  end
+  assert_raise(IndexError) do
+    # this will cause an exception due to the wrong arguments
+    a = [1,2,3,4,5]
+    a[1, -1] = 10
+  end
+
+  assert_equal(4, [1,2,3].[]=(1,4))
+  assert_equal(3, [1,2,3].[]=(1,2,3))
+
+  a = [1,2,3,4,5]
+  a[3..-1] = 6
+  assert_equal([1,2,3,6], a)
+
+  a = [1,2,3,4,5]
+  a[3..-1] = []
+  assert_equal([1,2,3], a)
+
+  a = [1,2,3,4,5]
+  a[2...4] = 6
+  assert_equal([1,2,6,5], a)
+end
+
+assert('Array#clear', '15.2.12.5.6') do
+  a = [1]
+  a.clear
+  assert_equal([], a)
+end
+
+assert('Array#collect!', '15.2.12.5.7') do
+  a = [1,2,3]
+  a.collect! { |i| i + i }
+  assert_equal([2,4,6], a)
+end
+
+assert('Array#concat', '15.2.12.5.8') do
+  assert_equal([1,2,3,4], [1, 2].concat([3, 4]))
+end
+
+assert('Array#delete_at', '15.2.12.5.9') do
+  a = [1,2,3]
+  assert_equal(2, a.delete_at(1))
+  assert_equal([1,3], a)
+  assert_equal(nil, a.delete_at(3))
+  assert_equal([1,3], a)
+  assert_equal(nil, a.delete_at(-3))
+  assert_equal([1,3], a)
+  assert_equal(3, a.delete_at(-1))
+  assert_equal([1], a)
+end
+
+assert('Array#each', '15.2.12.5.10') do
+  a = [1,2,3]
+  b = 0
+  a.each {|i| b += i}
+  assert_equal(6, b)
+end
+
+assert('Array#each_index', '15.2.12.5.11') do
+  a = [1]
+  b = nil
+  a.each_index {|i| b = i}
+  assert_equal(0, b)
+end
+
+assert('Array#empty?', '15.2.12.5.12') do
+  a = []
+  b = [b]
+  assert_true([].empty?)
+  assert_false([1].empty?)
+end
+
+assert('Array#first', '15.2.12.5.13') do
+  assert_raise(ArgumentError) do
+    # this will cause an exception due to the wrong argument
+    [1,2,3].first(-1)
+  end
+  assert_raise(ArgumentError) do
+    # this will cause an exception due to the wrong argument
+    [1,2,3].first(1,2)
+  end
+
+  assert_nil([].first)
+
+  b = [1,2,3]
+  assert_equal(1, b.first)
+  assert_equal([], b.first(0))
+  assert_equal([1], b.first(1))
+  assert_equal([1,2,3], b.first(4))
+end
+
+assert('Array#index', '15.2.12.5.14') do
+  a = [1,2,3]
+
+  assert_equal(1, a.index(2))
+  assert_equal(nil, a.index(0))
+end
+
+assert('Array#initialize', '15.2.12.5.15') do
+  a = [].initialize(1)
+  b = [].initialize(2)
+  c = [].initialize(2, 1)
+  d = [].initialize(2) {|i| i}
+
+  assert_equal([nil], a)
+  assert_equal([nil,nil], b)
+  assert_equal([1,1], c)
+  assert_equal([0,1], d)
+end
+
+assert('Array#initialize_copy', '15.2.12.5.16') do
+  a = [1,2,3]
+  b = [].initialize_copy(a)
+
+  assert_equal([1,2,3], b)
+end
+
+assert('Array#join', '15.2.12.5.17') do
+  a = [1,2,3].join
+  b = [1,2,3].join(',')
+
+  assert_equal('123', a)
+  assert_equal('1,2,3', b)
+end
+
+assert('Array#last', '15.2.12.5.18') do
+  assert_raise(ArgumentError) do
+    # this will cause an exception due to the wrong argument
+    [1,2,3].last(-1)
+  end
+
+  a = [1,2,3]
+  assert_equal(3, a.last)
+  assert_nil([].last)
+end
+
+assert('Array#length', '15.2.12.5.19') do
+  a = [1,2,3]
+
+  assert_equal(3, a.length)
+end
+
+assert('Array#map!', '15.2.12.5.20') do
+  a = [1,2,3]
+  a.map! { |i| i + i }
+  assert_equal([2,4,6], a)
+end
+
+assert('Array#pop', '15.2.12.5.21') do
+  a = [1,2,3]
+  b = a.pop
+
+  assert_nil([].pop)
+  assert_equal([1,2], a)
+  assert_equal(3, b)
+end
+
+assert('Array#push', '15.2.12.5.22') do
+  a = [1,2,3]
+  b = a.push(4)
+
+  assert_equal([1,2,3,4], a)
+  assert_equal([1,2,3,4], b)
+end
+
+assert('Array#replace', '15.2.12.5.23') do
+  a = [1,2,3]
+  b = [].replace(a)
+
+  assert_equal([1,2,3], b)
+end
+
+assert('Array#reverse', '15.2.12.5.24') do
+  a = [1,2,3]
+  b = a.reverse
+
+  assert_equal([1,2,3], a)
+  assert_equal([3,2,1], b)
+end
+
+assert('Array#reverse!', '15.2.12.5.25') do
+  a = [1,2,3]
+  b = a.reverse!
+
+  assert_equal([3,2,1], a)
+  assert_equal([3,2,1], b)
+end
+
+assert('Array#rindex', '15.2.12.5.26') do
+  a = [1,2,3]
+
+  assert_equal(1, a.rindex(2))
+  assert_equal(nil, a.rindex(0))
+end
+
+assert('Array#shift', '15.2.12.5.27') do
+  a = [1,2,3]
+  b = a.shift
+
+  assert_nil([].shift)
+  assert_equal([2,3], a)
+  assert_equal(1, b)
+end
+
+assert('Array#size', '15.2.12.5.28') do
+  a = [1,2,3]
+
+  assert_equal(3, a.size)
+end
+
+assert('Array#slice', '15.2.12.5.29') do
+  a = "12345".slice(1, 3)
+  b = a.slice(0)
+
+  assert_equal("2:", "#{b}:")
+  assert_equal(2, [1,2,3].[](1))
+end
+
+assert('Array#unshift', '15.2.12.5.30') do
+  a = [2,3]
+  b = a.unshift(1)
+  c = [2,3]
+  d = c.unshift(0, 1)
+
+  assert_equal([1,2,3], a)
+  assert_equal([1,2,3], b)
+  assert_equal([0,1,2,3], c)
+  assert_equal([0,1,2,3], d)
+end
+
+assert('Array#to_s', '15.2.12.5.31 / 15.2.12.5.32') do
+  a = [2, 3,   4, 5]
+  r1 = a.to_s
+  r2 = a.inspect
+
+  assert_equal(r2, r1)
+  assert_equal("[2, 3, 4, 5]", r1)
+end
+
+assert('Array#==', '15.2.12.5.33') do
+  assert_false(["a", "c"] == ["a", "c", 7])
+  assert_true(["a", "c", 7] == ["a", "c", 7])
+  assert_false(["a", "c", 7] == ["a", "d", "f"])
+end
+
+assert('Array#eql?', '15.2.12.5.34') do
+  a1 = [ 1, 2, 3 ]
+  a2 = [ 1, 2, 3 ]
+  a3 = [ 1.0, 2.0, 3.0 ]
+
+  assert_true(a1.eql? a2)
+  assert_false(a1.eql? a3)
+end
+
+assert('Array#hash', '15.2.12.5.35') do
+  a = [ 1, 2, 3 ]
+
+  assert_true(a.hash.is_a? Integer)
+  assert_equal([1,2].hash, [1,2].hash)
+end
+
+assert('Array#<=>', '15.2.12.5.36') do
+  r1 = [ "a", "a", "c" ]    <=> [ "a", "b", "c" ]   #=> -1
+  r2 = [ 1, 2, 3, 4, 5, 6 ] <=> [ 1, 2 ]            #=> +1
+  r3 = [ "a", "b", "c" ]    <=> [ "a", "b", "c" ]   #=> 0
+
+  assert_equal(-1, r1)
+  assert_equal(+1, r2)
+  assert_equal(0, r3)
+end
+
+# Not ISO specified
+
+assert("Array (Shared Array Corruption)") do
+  a = [ "a", "b", "c", "d", "e", "f" ]
+  b = a.slice(1, 3)
+  a.clear
+  b.clear
+end
+
+assert("Array (Longish inline array)") do
+  ary = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [11, 11], [12, 12], [13, 13], [14, 14], [15, 15], [16, 16], [17, 17], [18, 18], [19, 19], [20, 20], [21, 21], [22, 22], [23, 23], [24, 24], [25, 25], [26, 26], [27, 27], [28, 28], [29, 29], [30, 30], [31, 31], [32, 32], [33, 33], [34, 34], [35, 35], [36, 36], [37, 37], [38, 38], [39, 39], [40, 40], [41, 41], [42, 42], [43, 43], [44, 44], [45, 45], [46, 46], [47, 47], [48, 48], [49, 49], [50, 50], [51, 51], [52, 52], [53, 53], [54, 54], [55, 55], [56, 56], [57, 57], [58, 58], [59, 59], [60, 60], [61, 61], [62, 62], [63, 63], [64, 64], [65, 65], [66, 66], [67, 67], [68, 68], [69, 69], [70, 70], [71, 71], [72, 72], [73, 73], [74, 74], [75, 75], [76, 76], [77, 77], [78, 78], [79, 79], [80, 80], [81, 81], [82, 82], [83, 83], [84, 84], [85, 85], [86, 86], [87, 87], [88, 88], [89, 89], [90, 90], [91, 91], [92, 92], [93, 93], [94, 94], [95, 95], [96, 96], [97, 97], [98, 98], [99, 99], [100, 100], [101, 101], [102, 102], [103, 103], [104, 104], [105, 105], [106, 106], [107, 107], [108, 108], [109, 109], [110, 110], [111, 111], [112, 112], [113, 113], [114, 114], [115, 115], [116, 116], [117, 117], [118, 118], [119, 119], [120, 120], [121, 121], [122, 122], [123, 123], [124, 124], [125, 125], [126, 126], [127, 127], [128, 128], [129, 129], [130, 130], [131, 131], [132, 132], [133, 133], [134, 134], [135, 135], [136, 136], [137, 137], [138, 138], [139, 139], [140, 140], [141, 141], [142, 142], [143, 143], [144, 144], [145, 145], [146, 146], [147, 147], [148, 148], [149, 149], [150, 150], [151, 151], [152, 152], [153, 153], [154, 154], [155, 155], [156, 156], [157, 157], [158, 158], [159, 159], [160, 160], [161, 161], [162, 162], [163, 163], [164, 164], [165, 165], [166, 166], [167, 167], [168, 168], [169, 169], [170, 170], [171, 171], [172, 172], [173, 173], [174, 174], [175, 175], [176, 176], [177, 177], [178, 178], [179, 179], [180, 180], [181, 181], [182, 182], [183, 183], [184, 184], [185, 185], [186, 186], [187, 187], [188, 188], [189, 189], [190, 190], [191, 191], [192, 192], [193, 193], [194, 194], [195, 195], [196, 196], [197, 197], [198, 198], [199, 199]]
+  h = Hash.new(0)
+  ary.each {|p| h[p.class] += 1}
+  assert_equal({Array=>200}, h)
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/basicobject.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/basicobject.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/basicobject.rb	(revision 270)
@@ -0,0 +1,11 @@
+##
+# BasicObject
+
+assert('BasicObject') do
+  assert_equal(Class, BasicObject.class)
+end
+
+assert('BasicObject superclass') do
+  assert_nil(BasicObject.superclass)
+end
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/bs_block.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/bs_block.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/bs_block.rb	(revision 270)
@@ -0,0 +1,521 @@
+##
+# Bootstrap tests for blocks
+
+assert('BS Block 1') do
+  assert_equal(1) do
+    1.times{
+      begin
+        a = 1
+      ensure
+        foo = nil
+      end
+    }
+  end
+end
+
+assert('BS Block 2') do
+  assert_equal 2, [1,2,3].find{|x| x == 2}
+end
+
+assert('BS Block 3') do
+  class E
+    include Enumerable
+    def each(&block)
+      [1, 2, 3].each(&block)
+    end
+  end
+  assert_equal 2, E.new.find {|x| x == 2 }
+end
+
+assert('BS Block 3') do
+  sum = 0
+  for x in [1, 2, 3]
+    sum += x
+  end
+  assert_equal 6, sum
+end
+
+assert('BS Block 4') do
+  sum = 0
+  for x in (1..5)
+    sum += x
+  end
+  assert_equal 15, sum
+end
+
+assert('BS Block 5') do
+  sum = 0
+  for x in []
+    sum += x
+  end
+  assert_equal 0, sum
+end
+
+assert('BS Block 6') do
+  ans = []
+  assert_equal(1) do
+    1.times{
+      for n in 1..3
+        a = n
+        ans << a
+      end
+    }
+  end
+end
+
+assert('BS Block 7') do
+  ans = []
+  assert_equal((1..3)) do
+    for m in 1..3
+      for n in 2..4
+        a = [m, n]
+        ans << a
+      end
+    end
+  end
+end
+
+assert('BS Block 8') do
+  assert_equal [1, 2, 3], (1..3).to_a
+end
+
+assert('BS Block 9') do
+  assert_equal([4, 8, 12]) do
+    (1..3).map{|e|
+      e * 4
+    }
+  end
+end
+
+assert('BS Block 10') do
+  def m
+    yield
+  end
+  def n
+    yield
+  end
+
+  assert_equal(100) do
+    m{
+      n{
+        100
+      }
+    }
+  end
+end
+
+assert('BS Block 11') do
+  def m
+    yield 1
+  end
+
+  assert_equal(20) do
+    m{|ib|
+      m{|jb|
+        i = 20
+      }
+    }
+  end
+end
+
+assert('BS Block 12') do
+  def m
+    yield 1
+  end
+
+  assert_equal(2) do
+    m{|ib|
+      m{|jb|
+        ib = 20
+        kb = 2
+      }
+    }
+  end
+end
+
+assert('BS Block 13') do
+  def iter1
+    iter2{
+      yield
+    }
+  end
+
+  def iter2
+    yield
+  end
+
+  assert_equal(3) do
+    iter1{
+      jb = 2
+      iter1{
+        jb = 3
+      }
+      jb
+    }
+  end
+end
+
+assert('BS Block 14') do
+  def iter1
+    iter2{
+      yield
+    }
+  end
+
+  def iter2
+    yield
+  end
+
+  assert_equal(2) do
+    iter1{
+      jb = 2
+      iter1{
+        jb
+      }
+      jb
+    }
+  end
+end
+
+assert('BS Block 15') do
+  def m
+    yield 1
+  end
+  assert_equal(2) do
+    m{|ib|
+      ib*2
+    }
+  end
+end
+
+assert('BS Block 16') do
+  def m
+    yield 12345, 67890
+  end
+  assert_equal(92580) do
+    m{|ib,jb|
+      ib*2+jb
+    }
+  end
+end
+
+assert('BS Block 17') do
+  def iter
+    yield 10
+  end
+
+  a = nil
+  assert_equal [10, nil] do
+    [iter{|a|
+      a
+    }, a]
+  end
+end
+
+assert('BS Block 18') do
+  def iter
+    yield 10
+  end
+
+  assert_equal(21) do
+    iter{|a|
+      iter{|a|
+        a + 1
+      } + a
+    }
+  end
+end
+
+assert('BS Block 19') do
+  def iter
+    yield 10, 20, 30, 40
+  end
+
+  a = b = c = d = nil
+  assert_equal([10, 20, 30, 40, nil, nil, nil, nil]) do
+    iter{|a, b, c, d|
+      [a, b, c, d]
+    } + [a, b, c, d]
+  end
+end
+
+assert('BS Block 20') do
+  def iter
+    yield 10, 20, 30, 40
+  end
+
+  a = b = nil
+  assert_equal([10, 20, 30, 40, nil, nil]) do
+    iter{|a, b, c, d|
+      [a, b, c, d]
+    } + [a, b]
+  end
+end
+
+assert('BS Block 21') do
+  def iter
+    yield 1, 2
+  end
+
+  assert_equal([1, [2]]) do
+    iter{|a, *b|
+      [a, b]
+    }
+  end
+end
+
+assert('BS Block 22') do
+  def iter
+    yield 1, 2
+  end
+
+  assert_equal([[1, 2]]) do
+    iter{|*a|
+      [a]
+    }
+  end
+end
+
+assert('BS Block 23') do
+  def iter
+    yield 1, 2
+  end
+
+  assert_equal([1, 2, []]) do
+    iter{|a, b, *c|
+      [a, b, c]
+    }
+  end
+end
+
+assert('BS Block 24') do
+  def m
+    yield
+  end
+  assert_equal(1) do
+    m{
+      1
+    }
+  end
+end
+
+assert('BS Block 25') do
+  def m
+    yield 123
+  end
+  assert_equal(15129) do
+    m{|ib|
+      m{|jb|
+        ib*jb
+      }
+    }
+  end
+end
+
+assert('BS Block 26') do
+  def m a
+    yield a
+  end
+  assert_equal(2) do
+    m(1){|ib|
+      m(2){|jb|
+        ib*jb
+      }
+    }
+  end
+end
+
+assert('BS Block 27') do
+  sum = 0
+  3.times{|ib|
+    2.times{|jb|
+      sum += ib + jb
+    }}
+  assert_equal sum, 9
+end
+
+assert('BS Block 28') do
+  assert_equal(10) do
+    3.times{|bl|
+      break 10
+    }
+  end
+end
+
+assert('BS Block 29') do
+  def iter
+    yield 1,2,3
+  end
+
+  assert_equal([1, 2]) do
+    iter{|i, j|
+      [i, j]
+    }
+  end
+end
+
+assert('BS Block 30') do
+  def iter
+    yield 1
+  end
+
+  assert_equal([1, nil]) do
+    iter{|i, j|
+      [i, j]
+    }
+  end
+end
+
+assert('BS Block [ruby-dev:31147]') do
+  def m
+    yield
+  end
+  assert_nil m{|&b| b}
+end
+
+assert('BS Block [ruby-dev:31160]') do
+  def m()
+    yield
+  end
+  assert_nil m {|(v,(*))|}
+end
+
+assert('BS Block [issue #750]') do
+  def m(a, *b)
+    yield
+  end
+  args = [1, 2, 3]
+  assert_equal m(*args){ 1 }, 1
+end
+
+assert('BS Block 31') do
+  def m()
+    yield
+  end
+  assert_nil m {|((*))|}
+end
+
+assert('BS Block [ruby-dev:31440]') do
+  def m
+    yield [0]
+  end
+  assert_equal m{|v, &b| v}, [0]
+end
+
+assert('BS Block 32') do
+  r = false; 1.times{|&b| r = b}
+  assert_equal NilClass, r.class
+end
+
+assert('BS Block [ruby-core:14395]') do
+  class Controller
+    def respond_to(&block)
+      responder = Responder.new
+      block.call(responder)
+      responder.respond
+    end
+    def test_for_bug
+      respond_to{|format|
+        format.js{
+          "in test"
+          render{|obj|
+            obj
+          }
+        }
+      }
+    end
+    def render(&block)
+      "in render"
+    end
+  end
+
+  class Responder
+    def method_missing(symbol, &block)
+      "enter method_missing"
+      @response = Proc.new{
+        'in method missing'
+        block.call
+      }
+      "leave method_missing"
+    end
+    def respond
+      @response.call
+    end
+  end
+  t = Controller.new
+  assert_true t.test_for_bug
+end
+
+assert("BS Block 33") do
+  module TestReturnFromNestedBlock
+    def self.test
+      1.times do
+        1.times do
+          return :ok
+        end
+      end
+      :bad
+    end
+  end
+  assert_equal :ok, TestReturnFromNestedBlock.test
+end
+
+assert("BS Block 34") do
+  module TestReturnFromNestedBlock_BSBlock34
+    def self.test
+      1.times do
+        while true
+          return :ok
+        end
+      end
+      :bad
+    end
+  end
+  assert_equal :ok, TestReturnFromNestedBlock_BSBlock34.test
+end
+
+assert("BS Block 35") do
+  module TestReturnFromNestedBlock_BSBlock35
+    def self.test
+      1.times do
+        until false
+          return :ok
+        end
+      end
+      :bad
+    end
+  end
+  assert_equal :ok, TestReturnFromNestedBlock_BSBlock35.test
+end
+
+assert('BS Block 36') do
+  def iter
+    yield 1, 2, 3, 4, 5
+  end
+
+  assert_equal([1, 2, [3, 4], 5]) do
+    iter{|a, b, *c, d|
+      [a, b, c, d]
+    }
+  end
+end
+
+assert('BS Block 37') do
+  def iter
+    yield 1, 2, 3
+  end
+
+  assert_equal([1, 2, [], 3]) do
+    iter{|a, b, *c, d|
+      [a, b, c, d]
+    }
+  end
+end
+
+assert('BS Block 38') do
+  def iter
+    yield 1,2,3,4,5,6
+  end
+
+  assert_equal [1,2,3,4,5], iter{|a,b,c=:c,d,e| [a,b,c,d,e]}
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/bs_literal.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/bs_literal.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/bs_literal.rb	(revision 270)
@@ -0,0 +1,38 @@
+##
+# Bootstrap test for literals
+
+assert('BS Literal 1') do
+  assert_true true
+end
+
+assert('BS Literal 2') do
+  assert_equal TrueClass, true.class
+end
+
+assert('BS Literal 3') do
+  assert_false false
+end
+
+assert('BS Literal 4') do
+  assert_equal FalseClass, false.class
+end
+
+assert('BS Literal 5') do
+  assert_equal 'nil', nil.inspect
+end
+
+assert('BS Literal 6') do
+  assert_equal NilClass, nil.class
+end
+
+assert('BS Literal 7') do
+  assert_equal Symbol, :sym.class
+end
+
+assert('BS Literal 8') do
+  assert_equal 1234, 1234
+end
+
+assert('BS Literal 9') do
+  assert_equal Fixnum, 1234.class
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/class.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/class.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/class.rb	(revision 270)
@@ -0,0 +1,390 @@
+##
+# Class ISO Test
+
+assert('Class', '15.2.3') do
+  assert_equal(Class, Class.class)
+end
+
+assert('Class#initialize', '15.2.3.3.1') do
+  c = Class.new do
+    def test
+      :test
+    end
+  end.new
+
+  assert_equal(c.test, :test)
+end
+
+assert('Class#initialize_copy', '15.2.3.3.2') do
+  class TestClass
+    attr_accessor :n
+    def initialize(n)
+      @n = n
+    end
+    def initialize_copy(obj)
+      @n = n
+    end
+  end
+
+  c1 = TestClass.new('Foo')
+  c2 = c1.dup
+  c3 = TestClass.new('Bar')
+
+  assert_equal(c1.n, c2.n)
+  assert_not_equal(c1.n, c3.n)
+end
+
+assert('Class#new', '15.2.3.3.3') do
+  assert_raise(TypeError, 'Singleton should raise TypeError') do
+    "a".singleton_class.new
+  end
+
+  class TestClass
+    def initialize args, &block
+      @result = if not args.nil? and block.nil?
+        # only arguments
+        :only_args
+      elsif not args.nil? and not block.nil?
+        # args and block is given
+        :args_and_block
+      else
+        # this should never happen
+        :broken
+      end
+    end
+
+    def result; @result; end
+  end
+
+  assert_equal(:only_args, TestClass.new(:arg).result)
+  # with block doesn't work yet
+end
+
+assert('Class#superclass', '15.2.3.3.4') do
+  class SubClass < String; end
+  assert_equal(String, SubClass.superclass)
+end
+
+# Not ISO specified
+
+assert('Class 1') do
+  class C1; end
+  assert_equal(Class, C1.class)
+end
+
+assert('Class 2') do
+  class C2; end
+  assert_equal(C2, C2.new.class)
+end
+
+assert('Class 3') do
+  class C3; end
+  assert_equal(Class, C3.new.class.class)
+end
+
+assert('Class 4') do
+  class C4_A; end
+  class C4 < C4_A; end
+  assert_equal(Class, C4.class)
+end
+
+assert('Class 5') do
+  class C5_A; end
+  class C5 < C5_A; end
+  assert_equal(C5, C5.new.class)
+end
+
+assert('Class 6') do
+  class C6_A; end
+  class C6 < C6_A; end
+  assert_equal(Class, C6.new.class.class)
+end
+
+assert('Class 7') do
+  class C7_A; end
+  class C7_B; end
+
+  class C7 < C7_A; end
+
+  assert_raise(TypeError) do
+    # Different superclass.
+    class C7 < C7_B; end
+  end
+end
+
+assert('Class 8') do
+  class C8_A; end
+
+  class C8; end  # superclass is Object
+
+  assert_raise(TypeError) do
+    # Different superclass.
+    class C8 < C8_A; end
+  end
+end
+
+assert('Class 9') do
+  Class9Const = "a"
+
+  assert_raise(TypeError) do
+    class Class9Const; end
+  end
+end
+
+assert('Class Module 1') do
+  module M; end
+  assert_equal(Module, M.class)
+end
+
+assert('Class Module 2') do
+  module M; end
+  class C; include M; end
+  assert_equal(C, C.new.class)
+end
+
+# nested class
+assert('Class Nested 1') do
+  class A; end
+  class A::B; end
+  assert_equal(A::B, A::B)
+end
+
+assert('Class Nested 2') do
+  class A; end
+  class A::B; end
+  assert_equal(A::B, A::B.new.class)
+end
+
+assert('Class Nested 3') do
+  class A; end
+  class A::B; end
+  assert_equal(Class, A::B.new.class.class)
+end
+
+assert('Class Nested 4') do
+  class A; end
+  class A::B; end
+  class A::B::C; end
+  assert_equal(A::B::C, A::B::C)
+end
+
+assert('Class Nested 5') do
+  class A; end
+  class A::B; end
+  class A::B::C; end
+  assert_equal(Class, A::B::C.class)
+end
+
+assert('Class Nested 6') do
+  class A; end
+  class A::B; end
+  class A::B::C; end
+  assert_equal(A::B::C, A::B::C.new.class)
+end
+
+assert('Class Nested 7') do
+  class A; end
+  class A::B; end
+  class A::B2 < A::B; end
+  assert_equal(A::B2, A::B2)
+end
+
+assert('Class Nested 8') do
+  class A; end
+  class A::B; end
+  class A::B2 < A::B; end
+  assert_equal(Class, A::B2.class)
+end
+
+assert('Class Colon 1') do
+  class A; end
+  A::C = 1
+  assert_equal(1, A::C)
+end
+
+assert('Class Colon 2') do
+  class A; class ::C; end end
+  assert_equal(C, C)
+end
+
+assert('Class Colon 3') do
+  class A; class ::C; end end
+  assert_equal(Class, C.class)
+end
+
+assert('Class Dup 1') do
+  class C; end
+  assert_equal(Class, C.dup.class)
+end
+
+assert('Class Dup 2') do
+  module M; end
+  assert_equal(Module, M.dup.class)
+end
+
+assert('Class.new') do
+  assert_equal(Class, Class.new.class)
+  a = []
+  klass = Class.new do |c|
+    a << c
+  end
+  assert_equal([klass], a)
+end
+
+assert('class to return the last value') do
+  m = class C; :m end
+  assert_equal(m, :m)
+end
+
+assert('raise when superclass is not a class') do
+  module FirstModule; end
+  assert_raise(TypeError, 'should raise TypeError') do
+    class FirstClass < FirstModule; end
+  end
+
+  class SecondClass; end
+  assert_raise(TypeError, 'should raise TypeError') do
+    class SecondClass < false; end
+  end
+
+  class ThirdClass; end
+  assert_raise(TypeError, 'should raise TypeError') do
+    class ThirdClass < ThirdClass; end
+  end
+end
+
+assert('Class#inherited') do
+  class Foo
+    @@subclass_name = nil
+    def self.inherited(subclass)
+      @@subclass_name = subclass
+    end
+    def self.subclass_name
+      @@subclass_name
+    end
+  end
+
+  assert_equal(nil, Foo.subclass_name)
+
+  class Bar < Foo
+  end
+
+  assert_equal(Bar, Foo.subclass_name)
+
+  class Baz < Bar
+  end
+
+  assert_equal(Baz, Foo.subclass_name)
+end
+
+assert('singleton tests') do
+  module FooMod
+    def run_foo_mod
+      100
+    end
+  end
+
+  bar = String.new
+
+  baz = class << bar
+    extend FooMod
+    def self.run_baz
+      200
+    end
+  end
+
+  assert_false baz.singleton_methods.include? :run_foo_mod
+  assert_false baz.singleton_methods.include? :run_baz
+
+  assert_raise(NoMethodError, 'should raise NoMethodError') do
+    baz.run_foo_mod
+  end
+  assert_raise(NoMethodError, 'should raise NoMethodError') do
+    baz.run_baz
+  end
+
+  assert_raise(NoMethodError, 'should raise NoMethodError') do
+    bar.run_foo_mod
+  end
+  assert_raise(NoMethodError, 'should raise NoMethodError') do
+    bar.run_baz
+  end
+
+  baz = class << bar
+    extend FooMod
+    def self.run_baz
+      300
+    end
+    self
+  end
+
+  assert_true baz.singleton_methods.include? :run_baz
+  assert_true baz.singleton_methods.include? :run_foo_mod
+  assert_equal 100, baz.run_foo_mod
+  assert_equal 300, baz.run_baz
+
+  assert_raise(NoMethodError, 'should raise NoMethodError') do
+    bar.run_foo_mod
+  end
+  assert_raise(NoMethodError, 'should raise NoMethodError') do
+    bar.run_baz
+  end
+
+  fv = false
+  class << fv
+    def self.run_false
+      5
+    end
+  end
+
+  nv = nil
+  class << nv
+    def self.run_nil
+      6
+    end
+  end
+
+  tv = true
+  class << tv
+    def self.run_nil
+      7
+    end
+  end
+
+  assert_raise(TypeError, 'should raise TypeError') do
+    num = 1.0
+    class << num
+      def self.run_nil
+        7
+      end
+    end
+  end
+end
+
+assert('clone Class') do
+  class Foo
+    def func
+      true
+    end
+  end
+
+  Foo.clone.new.func
+end
+
+assert('class variable and class << self style class method') do
+  class ClassVariableTest
+    @@class_variable = "value"
+    class << self
+      def class_variable
+        @@class_variable
+      end
+    end
+  end
+
+  assert_equal("value", ClassVariableTest.class_variable)
+end
+
+assert('class with non-class/module outer raises TypeError') do
+  assert_raise(TypeError) { class 0::C1; end }
+  assert_raise(TypeError) { class []::C2; end }
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/comparable.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/comparable.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/comparable.rb	(revision 270)
@@ -0,0 +1,80 @@
+
+assert('Comparable#<', '15.3.3.2.1') do
+  class Foo
+    include Comparable
+    def <=>(x)
+      x
+    end
+  end
+  assert_false(Foo.new < 0)
+  assert_false(Foo.new < 1)
+  assert_true(Foo.new < -1)
+  assert_raise(ArgumentError){ Foo.new < nil }
+end
+
+assert('Comparable#<=', '15.3.3.2.2') do
+  class Foo
+    include Comparable
+    def <=>(x)
+      x
+    end
+  end
+  assert_true(Foo.new <= 0)
+  assert_false(Foo.new <= 1)
+  assert_true(Foo.new <= -1)
+  assert_raise(ArgumentError){ Foo.new <= nil }
+end
+
+assert('Comparable#==', '15.3.3.2.3') do
+  class Foo
+    include Comparable
+    def <=>(x)
+      0
+    end
+  end
+
+  assert_true(Foo.new == Foo.new)
+end
+
+assert('Comparable#>', '15.3.3.2.4') do
+  class Foo
+    include Comparable
+    def <=>(x)
+      x
+    end
+  end
+  assert_false(Foo.new > 0)
+  assert_true(Foo.new > 1)
+  assert_false(Foo.new > -1)
+  assert_raise(ArgumentError){ Foo.new > nil }
+end
+
+assert('Comparable#>=', '15.3.3.2.5') do
+  class Foo
+    include Comparable
+    def <=>(x)
+      x
+    end
+  end
+  assert_true(Foo.new >= 0)
+  assert_true(Foo.new >= 1)
+  assert_false(Foo.new >= -1)
+  assert_raise(ArgumentError){ Foo.new >= nil }
+end
+
+assert('Comparable#between?', '15.3.3.2.6') do
+  class Foo
+    include Comparable
+    def <=>(x)
+      x
+    end
+  end
+
+  c = Foo.new
+
+  assert_false(c.between?(-1,  1))
+  assert_false(c.between?(-1, -1))
+  assert_false(c.between?( 1,  1))
+  assert_true(c.between?( 1, -1))
+  assert_true(c.between?(0, 0))
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/ensure.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/ensure.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/ensure.rb	(revision 270)
@@ -0,0 +1,54 @@
+##
+# ensure Test
+
+assert('ensure - context - yield') do
+  class EnsureYieldBreak
+    attr_reader :ensure_context
+    def try
+      yield
+    ensure
+      @ensure_context = self
+    end
+  end
+
+  yielder = EnsureYieldBreak.new
+  yielder.try do
+  end
+  assert_equal yielder, yielder.ensure_context
+end
+
+assert('ensure - context - yield and break') do
+  class EnsureYieldBreak
+    attr_reader :ensure_context
+    def try
+      yield
+    ensure
+      @ensure_context = self
+    end
+  end
+
+  yielder = EnsureYieldBreak.new
+  yielder.try do
+    break
+  end
+  assert_equal yielder, yielder.ensure_context
+end
+
+assert('ensure - context - yield and return') do
+  class EnsureYieldBreak
+    attr_reader :ensure_context
+    def try
+      yield
+    ensure
+      @ensure_context = self
+    end
+  end
+
+  yielder = EnsureYieldBreak.new
+  lambda do
+    yielder.try do
+      return
+    end
+  end.call
+  assert_equal yielder, yielder.ensure_context
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/enumerable.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/enumerable.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/enumerable.rb	(revision 270)
@@ -0,0 +1,134 @@
+##
+# Enumerable ISO Test
+
+assert('Enumerable', '15.3.2') do
+  assert_equal(Module, Enumerable.class)
+end
+
+assert('Enumerable#all?', '15.3.2.2.1') do
+  assert_true([1,2,3].all?)
+  assert_false([1,false,3].all?)
+
+  a = [2,4,6]
+  all = a.all? do |e|
+    e % 2 == 0
+  end
+  assert_true(all)
+
+  a = [2,4,7]
+  all = a.all? do |e|
+    e % 2 == 0
+  end
+  assert_false(all)
+end
+
+assert('Enumerable#any?', '15.3.2.2.2') do
+  assert_true([false,true,false].any?)
+  assert_false([false,false,false].any?)
+
+  a = [1,3,6]
+  any = a.any? do |e|
+    e % 2 == 0
+  end
+  assert_true(any)
+
+  a = [1,3,5]
+  any = a.any? do |e|
+    e % 2 == 0
+  end
+  assert_false(any)
+end
+
+assert('Enumerable#collect', '15.3.2.2.3') do
+  assert_true [1,2,3].collect { |i| i + i } == [2,4,6]
+end
+
+assert('Enumerable#detect', '15.3.2.2.4') do
+  assert_equal 1, [1,2,3].detect() { true }
+  assert_equal 'a', [1,2,3].detect("a") { false }
+end
+
+assert('Array#each_with_index', '15.3.2.2.5') do
+  a = nil
+  b = nil
+
+  [1].each_with_index {|e,i| a = e; b = i}
+
+  assert_equal(1, a)
+  assert_equal(0, b)
+end
+
+assert('Enumerable#entries', '15.3.2.2.6') do
+  assert_equal([1], [1].entries)
+end
+
+assert('Enumerable#find', '15.3.2.2.7') do
+  assert_equal 1, [1,2,3].find() { true }
+  assert_equal 'a', [1,2,3].find("a") { false }
+end
+
+assert('Enumerable#find_all', '15.3.2.2.8') do
+  assert_true [1,2,3,4,5,6,7,8,9].find_all() {|i| i%2 == 0}, [2,4,6,8]
+end
+
+assert('Enumerable#grep', '15.3.2.2.9') do
+  assert_equal [4,5,6], [1,2,3,4,5,6,7,8,9].grep(4..6)
+end
+
+assert('Enumerable#include?', '15.3.2.2.10') do
+  assert_true [1,2,3,4,5,6,7,8,9].include?(5)
+  assert_false [1,2,3,4,5,6,7,8,9].include?(0)
+end
+
+assert('Enumerable#inject', '15.3.2.2.11') do
+  assert_equal 21, [1,2,3,4,5,6].inject() {|s, n| s + n}
+  assert_equal 22, [1,2,3,4,5,6].inject(1) {|s, n| s + n}
+end
+
+assert('Enumerable#map', '15.3.2.2.12') do
+  assert_equal [2,4,6], [1,2,3].map { |i| i + i }
+end
+
+assert('Enumerable#max', '15.3.2.2.13') do
+  a = ['aaa', 'bb', 'c']
+  assert_equal 'c', a.max
+  assert_equal 'aaa', a.max {|i1,i2| i1.length <=> i2.length}
+end
+
+assert('Enumerable#min', '15.3.2.2.14') do
+  a = ['aaa', 'bb', 'c']
+  assert_equal 'aaa', a.min
+  assert_equal 'c', a.min {|i1,i2| i1.length <=> i2.length}
+end
+
+assert('Enumerable#member?', '15.3.2.2.15') do
+  assert_true [1,2,3,4,5,6,7,8,9].member?(5)
+  assert_false [1,2,3,4,5,6,7,8,9].member?(0)
+end
+
+assert('Enumerable#partition', '15.3.2.2.16') do
+  partition = [0,1,2,3,4,5,6,7,8,9].partition do |i|
+    i % 2 == 0
+  end
+  assert_equal [[0,2,4,6,8], [1,3,5,7,9]], partition
+end
+
+assert('Enumerable#reject', '15.3.2.2.17') do
+  reject = [0,1,2,3,4,5,6,7,8,9].reject do |i|
+    i % 2 == 0
+  end
+  assert_equal [1,3,5,7,9], reject
+end
+
+assert('Enumerable#select', '15.3.2.2.18') do
+  assert_equal [2,4,6,8], [1,2,3,4,5,6,7,8,9].select() {|i| i%2 == 0}
+end
+
+assert('Enumerable#sort', '15.3.2.2.19') do
+  assert_equal [1,2,3,4,6,7], [7,3,1,2,6,4].sort
+  assert_equal [7,6,4,3,2,1], [7,3,1,2,6,4].sort {|e1,e2|e2<=>e1}
+end
+
+assert('Enumerable#to_a', '15.3.2.2.20') do
+  assert_equal [1], [1].to_a
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/exception.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/exception.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/exception.rb	(revision 270)
@@ -0,0 +1,384 @@
+##
+# Exception ISO Test
+
+assert('Exception', '15.2.22') do
+  assert_equal Class, Exception.class
+end
+
+assert('Exception.exception', '15.2.22.4.1') do
+  e = Exception.exception('a')
+
+  assert_equal Exception, e.class
+end
+
+assert('Exception#exception', '15.2.22.5.1') do
+  e = Exception.new
+  re = RuntimeError.new
+  assert_equal e, e.exception
+  assert_equal e, e.exception(e)
+  assert_equal re, re.exception(re)
+  changed_re = re.exception('message has changed')
+  assert_not_equal re, changed_re
+  assert_equal 'message has changed', changed_re.message
+end
+
+assert('Exception#message', '15.2.22.5.2') do
+  e = Exception.exception('a')
+
+  assert_equal 'a', e.message
+end
+
+assert('Exception#to_s', '15.2.22.5.3') do
+  e = Exception.exception('a')
+
+  assert_equal 'a', e.to_s
+end
+
+assert('Exception.exception', '15.2.22.4.1') do
+  e = Exception.exception()
+  e.initialize('a')
+
+  assert_equal 'a', e.message
+end
+
+assert('NameError', '15.2.31') do
+  assert_raise(NameError) do
+    raise NameError.new
+  end
+
+  e = NameError.new "msg", "name"
+  assert_equal "msg", e.message
+  assert_equal "name", e.name
+end
+
+assert('ScriptError', '15.2.37') do
+  assert_raise(ScriptError) do
+    raise ScriptError.new
+  end
+end
+
+assert('SyntaxError', '15.2.38') do
+  assert_raise(SyntaxError) do
+    raise SyntaxError.new
+  end
+end
+
+# Not ISO specified
+
+assert('Exception 1') do
+r=begin
+    1+1
+  ensure
+    2+2
+  end
+  assert_equal 2, r
+end
+
+assert('Exception 2') do
+r=begin
+    1+1
+    begin
+      2+2
+    ensure
+      3+3
+    end
+  ensure
+    4+4
+  end
+  assert_equal 4, r
+end
+
+assert('Exception 3') do
+r=begin
+    1+1
+    begin
+      2+2
+    ensure
+      3+3
+    end
+  ensure
+    4+4
+    begin
+      5+5
+    ensure
+      6+6
+    end
+  end
+  assert_equal 4, r
+end
+
+assert('Exception 4') do
+  a = nil
+  1.times{|e|
+    begin
+    rescue => err
+    end
+    a = err.class
+  }
+  assert_equal NilClass, a
+end
+
+assert('Exception 5') do
+  $ans = []
+  def m
+    $!
+  end
+  def m2
+    1.times{
+      begin
+        return
+      ensure
+        $ans << m
+      end
+    }
+  end
+  m2
+  assert_equal [nil], $ans
+end
+
+assert('Exception 6') do
+  $i = 0
+  def m
+    iter{
+      begin
+        $i += 1
+        begin
+          $i += 2
+          break
+        ensure
+
+        end
+      ensure
+        $i += 4
+      end
+      $i = 0
+    }
+  end
+
+  def iter
+    yield
+  end
+  m
+  assert_equal 7, $i
+end
+
+assert('Exception 7') do
+  $i = 0
+  def m
+    begin
+      $i += 1
+      begin
+        $i += 2
+        return
+      ensure
+        $i += 3
+      end
+    ensure
+      $i += 4
+    end
+    p :end
+  end
+  m
+  assert_equal 10, $i
+end
+
+assert('Exception 8') do
+r=begin
+    1
+  rescue
+    2
+  else
+    3
+  end
+  assert_equal 3, r
+end
+
+assert('Exception 9') do
+r=begin
+    1+1
+  rescue
+    2+2
+  else
+    3+3
+  ensure
+    4+4
+  end
+  assert_equal 6, r
+end
+
+assert('Exception 10') do
+r=begin
+    1+1
+    begin
+      2+2
+    rescue
+      3+3
+    else
+      4+4
+    end
+  rescue
+    5+5
+  else
+    6+6
+  ensure
+    7+7
+  end
+  assert_equal 12, r
+end
+
+assert('Exception 11') do
+  a = :ok
+  begin
+    begin
+      raise Exception
+    rescue
+      a = :ng
+    end
+  rescue Exception
+  end
+  assert_equal :ok, a
+end
+
+assert('Exception 12') do
+  a = :ok
+  begin
+    raise Exception rescue a = :ng
+  rescue Exception
+  end
+  assert_equal :ok, a
+end
+
+assert('Exception 13') do
+  a = :ng
+  begin
+    raise StandardError
+  rescue TypeError, ArgumentError
+    a = :ng
+  rescue
+    a = :ok
+  else
+    a = :ng
+  end
+  assert_equal :ok, a
+end
+
+assert('Exception 14') do
+  def exception_test14; UnknownConstant; end
+  a = :ng
+  begin
+    send(:exception_test14)
+  rescue
+    a = :ok
+  end
+
+  assert_equal :ok, a
+end
+
+assert('Exception 15') do
+  a = begin
+        :ok
+      rescue
+        :ko
+      end
+  assert_equal :ok, a
+end
+
+assert('Exception 16') do
+  begin
+    raise "foo"
+    false
+  rescue => e
+    assert_equal "foo", e.message
+  end
+end
+
+assert('Exception 17') do
+r=begin
+    raise "a"  # RuntimeError
+  rescue ArgumentError
+    1
+  rescue StandardError
+    2
+  else
+    3
+  ensure
+    4
+  end
+  assert_equal 2, r
+end
+
+assert('Exception 18') do
+r=begin
+    0
+  rescue ArgumentError
+    1
+  rescue StandardError
+    2
+  else
+    3
+  ensure
+    4
+  end
+  assert_equal 3, r
+end
+
+assert('Exception 19') do
+  class Class4Exception19
+    def a
+      r = @e = false
+      begin
+        b
+      rescue TypeError
+        r = self.z
+      end
+      [ r, @e ]
+    end
+
+    def b
+      begin
+        1 * "b"
+      ensure
+        @e = self.z
+      end
+    end
+
+    def z
+      true
+    end
+  end
+  assert_equal [true, true], Class4Exception19.new.a
+end
+
+assert('Exception#inspect without message') do
+  assert_equal "Exception: Exception", Exception.new.inspect
+end
+
+assert('Exception#backtrace') do
+  assert_nothing_raised do
+    begin
+      raise "get backtrace"
+    rescue => e
+      e.backtrace
+    end
+  end
+end
+
+assert('Raise in ensure') do
+  assert_raise(ArgumentError) do
+    begin
+      raise "" # RuntimeError
+    ensure
+      raise ArgumentError
+    end
+  end
+end
+
+assert('Raise in rescue') do
+  assert_raise(ArgumentError) do
+    begin
+      raise "" # RuntimeError
+    rescue
+      raise ArgumentError
+    end
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/false.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/false.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/false.rb	(revision 270)
@@ -0,0 +1,31 @@
+##
+# FalseClass ISO Test
+
+assert('FalseClass', '15.2.6') do
+  assert_equal Class, FalseClass.class
+end
+
+assert('FalseClass false', '15.2.6.1') do
+  assert_false false
+  assert_equal FalseClass, false.class
+  assert_false FalseClass.method_defined? :new
+end
+
+assert('FalseClass#&', '15.2.6.3.1') do
+  assert_false false.&(true)
+  assert_false false.&(false)
+end
+
+assert('FalseClass#^', '15.2.6.3.2') do
+  assert_true false.^(true)
+  assert_false false.^(false)
+end
+
+assert('FalseClass#to_s', '15.2.6.3.3') do
+  assert_equal 'false', false.to_s
+end
+
+assert('FalseClass#|', '15.2.6.3.4') do
+  assert_true false.|(true)
+  assert_false false.|(false)
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/float.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/float.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/float.rb	(revision 270)
@@ -0,0 +1,202 @@
+##
+# Float ISO Test
+
+assert('Float', '15.2.9') do
+  assert_equal Class, Float.class
+end
+
+assert('Float#+', '15.2.9.3.1') do
+  a = 3.123456788 + 0.000000001
+  b = 3.123456789 + 1
+
+  assert_float(3.123456789, a)
+  assert_float(4.123456789, b)
+
+  assert_raise(TypeError){ 0.0+nil }
+  assert_raise(TypeError){ 1.0+nil }
+end
+
+assert('Float#-', '15.2.9.3.2') do
+  a = 3.123456790 - 0.000000001
+  b = 5.123456789 - 1
+
+  assert_float(3.123456789, a)
+  assert_float(4.123456789, b)
+end
+
+assert('Float#*', '15.2.9.3.3') do
+  a = 3.125 * 3.125
+  b = 3.125 * 1
+
+  assert_float(9.765625, a)
+  assert_float(3.125   , b)
+end
+
+assert('Float#/', '15.2.9.3.4') do
+  a = 3.123456789 / 3.123456789
+  b = 3.123456789 / 1
+
+  assert_float(1.0        , a)
+  assert_float(3.123456789, b)
+end
+
+assert('Float#%', '15.2.9.3.5') do
+  a = 3.125 % 3.125
+  b = 3.125 % 1
+
+  assert_float(0.0  , a)
+  assert_float(0.125, b)
+end
+
+assert('Float#<=>', '15.2.9.3.6') do
+  a = 3.125 <=> 3.123
+  b = 3.125 <=> 3.125
+  c = 3.125 <=> 3.126
+  a2 = 3.125 <=> 3
+  c2 = 3.125 <=> 4
+
+  assert_equal( 1, a)
+  assert_equal( 0, b)
+  assert_equal(-1, c)
+  assert_equal( 1, a2)
+  assert_equal(-1, c2)
+end
+
+assert('Float#==', '15.2.9.3.7') do
+  assert_true 3.1 == 3.1
+  assert_false 3.1 == 3.2
+end
+
+assert('Float#ceil', '15.2.9.3.8') do
+  a = 3.123456789.ceil
+  b = 3.0.ceil
+  c = -3.123456789.ceil
+  d = -3.0.ceil
+
+  assert_equal( 4, a)
+  assert_equal( 3, b)
+  assert_equal(-3, c)
+  assert_equal(-3, d)
+end
+
+assert('Float#finite?', '15.2.9.3.9') do
+  assert_true 3.123456789.finite?
+  assert_false (1.0 / 0.0).finite?
+end
+
+assert('Float#floor', '15.2.9.3.10') do
+  a = 3.123456789.floor
+  b = 3.0.floor
+  c = -3.123456789.floor
+  d = -3.0.floor
+
+  assert_equal( 3, a)
+  assert_equal( 3, b)
+  assert_equal(-4, c)
+  assert_equal(-3, d)
+end
+
+assert('Float#infinite?', '15.2.9.3.11') do
+  a = 3.123456789.infinite?
+  b = (1.0 / 0.0).infinite?
+  c = (-1.0 / 0.0).infinite?
+
+  assert_nil a
+  assert_equal( 1, b)
+  assert_equal(-1, c)
+end
+
+assert('Float#round', '15.2.9.3.12') do
+  a = 3.123456789.round
+  b = 3.5.round
+  c = 3.4999.round
+  d = (-3.123456789).round
+  e = (-3.5).round
+  f = 12345.67.round(-1)
+  g = 3.423456789.round(0)
+  h = 3.423456789.round(1)
+  i = 3.423456789.round(3)
+
+  assert_equal(    3, a)
+  assert_equal(    4, b)
+  assert_equal(    3, c)
+  assert_equal(   -3, d)
+  assert_equal(   -4, e)
+  assert_equal(12350, f)
+  assert_equal(    3, g)
+  assert_float(  3.4, h)
+  assert_float(3.423, i)
+
+  assert_equal(42.0, 42.0.round(307))
+  assert_equal(1.0e307, 1.0e307.round(2))
+
+  inf = 1.0/0.0
+  assert_raise(FloatDomainError){ inf.round }
+  assert_raise(FloatDomainError){ inf.round(-1) }
+  assert_equal(inf, inf.round(1))
+  nan = 0.0/0.0
+  assert_raise(FloatDomainError){ nan.round }
+  assert_raise(FloatDomainError){ nan.round(-1) }
+  assert_true(nan.round(1).nan?)
+end
+
+assert('Float#to_f', '15.2.9.3.13') do
+  a = 3.123456789
+
+  assert_float(a, a.to_f)
+end
+
+assert('Float#to_i', '15.2.9.3.14') do
+  assert_equal(3, 3.123456789.to_i)
+end
+
+assert('Float#truncate', '15.2.9.3.15') do
+  assert_equal( 3,  3.123456789.truncate)
+  assert_equal(-3, -3.1.truncate)
+end
+
+assert('Float#divmod') do
+  def check_floats exp, act
+    assert_float exp[0], act[0]
+    assert_float exp[1], act[1]
+  end
+
+  # Note: quotients are Float because mruby does not have Bignum.
+  check_floats [ 0,  0.0],   0.0.divmod(1)
+  check_floats [ 0,  1.1],   1.1.divmod(3)
+  check_floats [ 3,  0.2],   3.2.divmod(1)
+  check_floats [ 2,  6.3],  20.3.divmod(7)
+  check_floats [-1,  1.6],  -3.4.divmod(5)
+  check_floats [-2, -0.5],  25.5.divmod(-13)
+  check_floats [ 1, -6.6], -13.6.divmod(-7)
+  check_floats [ 3,  0.2],   9.8.divmod(3.2)
+end
+
+assert('Float#nan?') do
+  assert_true (0.0/0.0).nan?
+  assert_false 0.0.nan?
+  assert_false (1.0/0.0).nan?
+  assert_false (-1.0/0.0).nan?
+end
+
+assert('Float#<<') do
+  # Left Shift by one
+  assert_equal 46, 23.0 << 1
+
+  # Left Shift by a negative is Right Shift
+  assert_equal 23, 46.0 << -1
+end
+
+assert('Float#>>') do
+  # Right Shift by one
+  assert_equal 23, 46.0 >> 1
+
+  # Right Shift by a negative is Left Shift
+  assert_equal 46, 23.0 >> -1
+
+  # Don't raise on large Right Shift
+  assert_equal 0, 23.0 >> 128
+
+  # Don't raise on large Right Shift
+  assert_equal(-1, -23.0 >> 128)
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/gc.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/gc.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/gc.rb	(revision 270)
@@ -0,0 +1,45 @@
+# Not ISO specified
+
+assert('GC.enable') do
+  assert_false GC.disable
+  assert_true GC.enable
+  assert_false GC.enable
+end
+
+assert('GC.disable') do
+  begin
+    assert_false GC.disable
+    assert_true GC.disable
+  ensure
+    GC.enable
+  end
+end
+
+assert('GC.interval_ratio=') do
+  origin = GC.interval_ratio
+  begin
+    assert_equal 150, (GC.interval_ratio = 150)
+  ensure
+    GC.interval_ratio = origin
+  end
+end
+
+assert('GC.step_ratio=') do
+  origin = GC.step_ratio
+  begin
+    assert_equal 150, (GC.step_ratio = 150)
+  ensure
+    GC.step_ratio = origin
+  end
+end
+
+assert('GC.generational_mode=') do
+  origin = GC.generational_mode
+  begin
+    assert_false (GC.generational_mode = false)
+    assert_true (GC.generational_mode = true)
+    assert_true (GC.generational_mode = true)
+  ensure
+    GC.generational_mode = origin
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/hash.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/hash.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/hash.rb	(revision 270)
@@ -0,0 +1,353 @@
+##
+# Hash ISO Test
+
+assert('Hash', '15.2.13') do
+  assert_equal Class, Hash.class
+end
+
+assert('Hash#==', '15.2.13.4.1') do
+  assert_true({ 'abc' => 'abc' } == { 'abc' => 'abc' })
+  assert_false({ 'abc' => 'abc' } ==  { 'cba' => 'cba' })
+  assert_true({ :equal => 1 } == { :equal => 1.0 })
+  assert_false({ :a => 1 } == true)
+end
+
+assert('Hash#[]', '15.2.13.4.2') do
+  a = { 'abc' => 'abc' }
+
+  assert_equal 'abc', a['abc']
+end
+
+assert('Hash#[]=', '15.2.13.4.3') do
+  a = Hash.new
+  a['abc'] = 'abc'
+
+  assert_equal 'abc', a['abc']
+end
+
+assert('Hash#clear', '15.2.13.4.4') do
+  a = { 'abc' => 'abc' }
+  a.clear
+
+  assert_equal({ }, a)
+end
+
+assert('Hash#dup') do
+  a = { 'a' => 1 }
+  b = a.dup
+  a['a'] = 2
+  assert_equal({'a' => 1}, b)
+end
+
+assert('Hash#default', '15.2.13.4.5') do
+  a = Hash.new
+  b = Hash.new('abc')
+  c = Hash.new {|s,k| s[k] = k}
+
+  assert_nil a.default
+  assert_equal 'abc', b.default
+  assert_nil c.default
+  assert_equal 'abc', c.default('abc')
+end
+
+assert('Hash#default=', '15.2.13.4.6') do
+  a = { 'abc' => 'abc' }
+  a.default = 'cba'
+
+  assert_equal 'abc', a['abc']
+  assert_equal 'cba', a['notexist']
+end
+
+assert('Hash#default_proc', '15.2.13.4.7') do
+  a = Hash.new
+  b = Hash.new {|s,k| s[k] = k + k}
+  c = b[2]
+  d = b['cat']
+
+  assert_nil a.default_proc
+  assert_equal Proc, b.default_proc.class
+  assert_equal 4, c
+  assert_equal 'catcat', d
+end
+
+assert('Hash#delete', '15.2.13.4.8') do
+  a = { 'abc' => 'abc' }
+  b = { 'abc' => 'abc' }
+  b_tmp_1 = false
+  b_tmp_2 = false
+
+  a.delete('abc')
+  b.delete('abc') do |k|
+    b_tmp_1 = true
+  end
+  b.delete('abc') do |k|
+    b_tmp_2 = true
+  end
+
+  assert_nil a.delete('cba')
+  assert_false a.has_key?('abc')
+  assert_false b_tmp_1
+  assert_true b_tmp_2
+end
+
+assert('Hash#each', '15.2.13.4.9') do
+  a = { 'abc_key' => 'abc_value' }
+  key = nil
+  value = nil
+
+  a.each  do |k,v|
+    key = k
+    value = v
+  end
+
+  assert_equal 'abc_key', key
+  assert_equal 'abc_value', value
+end
+
+assert('Hash#each_key', '15.2.13.4.10') do
+  a = { 'abc_key' => 'abc_value' }
+  key = nil
+
+  a.each_key  do |k|
+    key = k
+  end
+
+  assert_equal 'abc_key', key
+end
+
+assert('Hash#each_value', '15.2.13.4.11') do
+  a = { 'abc_key' => 'abc_value' }
+  value = nil
+
+  a.each_value  do |v|
+    value = v
+  end
+
+  assert_equal 'abc_value', value
+end
+
+assert('Hash#empty?', '15.2.13.4.12') do
+  a = { 'abc_key' => 'abc_value' }
+  b = Hash.new
+
+  assert_false a.empty?
+  assert_true b.empty?
+end
+
+assert('Hash#has_key?', '15.2.13.4.13') do
+  a = { 'abc_key' => 'abc_value' }
+  b = Hash.new
+
+  assert_true a.has_key?('abc_key')
+  assert_false b.has_key?('cba')
+end
+
+assert('Hash#has_value?', '15.2.13.4.14') do
+  a = { 'abc_key' => 'abc_value' }
+  b = Hash.new
+
+  assert_true a.has_value?('abc_value')
+  assert_false b.has_value?('cba')
+end
+
+assert('Hash#include?', '15.2.13.4.15') do
+  a = { 'abc_key' => 'abc_value' }
+  b = Hash.new
+
+  assert_true a.include?('abc_key')
+  assert_false b.include?('cba')
+end
+
+assert('Hash#initialize', '15.2.13.4.16') do
+  # Testing initialize by new.
+  h = Hash.new
+  h2 = Hash.new(:not_found)
+
+  assert_true h.is_a? Hash
+  assert_equal({ }, h)
+  assert_nil h["hello"]
+  assert_equal :not_found, h2["hello"]
+end
+
+assert('Hash#initialize_copy', '15.2.13.4.17') do
+  a = { 'abc_key' => 'abc_value' }
+  b = Hash.new.initialize_copy(a)
+
+  assert_equal({ 'abc_key' => 'abc_value' }, b)
+end
+
+assert('Hash#key?', '15.2.13.4.18') do
+  a = { 'abc_key' => 'abc_value' }
+  b = Hash.new
+
+  assert_true a.key?('abc_key')
+  assert_false b.key?('cba')
+end
+
+assert('Hash#keys', '15.2.13.4.19') do
+  a = { 'abc_key' => 'abc_value' }
+
+  assert_equal ['abc_key'], a.keys
+end
+
+assert('Hash#length', '15.2.13.4.20') do
+  a = { 'abc_key' => 'abc_value' }
+  b = Hash.new
+
+  assert_equal 1, a.length
+  assert_equal 0, b.length
+end
+
+assert('Hash#member?', '15.2.13.4.21') do
+  a = { 'abc_key' => 'abc_value' }
+  b = Hash.new
+
+  assert_true a.member?('abc_key')
+  assert_false b.member?('cba')
+end
+
+assert('Hash#merge', '15.2.13.4.22') do
+  a = { 'abc_key' => 'abc_value', 'cba_key' => 'cba_value' }
+  b = { 'cba_key' => 'XXX',  'xyz_key' => 'xyz_value' }
+
+  result_1 = a.merge b
+  result_2 = a.merge(b) do |key, original, new|
+    original
+  end
+
+  assert_equal({'abc_key' => 'abc_value', 'cba_key' => 'XXX',
+                'xyz_key' => 'xyz_value' }, result_1)
+  assert_equal({'abc_key' => 'abc_value', 'cba_key' => 'cba_value',
+                'xyz_key' => 'xyz_value' }, result_2)
+
+  assert_raise(TypeError) do
+    { 'abc_key' => 'abc_value' }.merge "a"
+  end
+end
+
+assert('Hash#replace', '15.2.13.4.23') do
+  a = { 'abc_key' => 'abc_value' }
+  b = Hash.new.replace(a)
+
+  assert_equal({ 'abc_key' => 'abc_value' }, b)
+
+  a = Hash.new(42)
+  b = {}
+  b.replace(a)
+  assert_equal(42, b[1])
+
+  a = Hash.new{|h,x| x}
+  b.replace(a)
+  assert_equal(127, b[127])
+end
+
+assert('Hash#shift', '15.2.13.4.24') do
+  a = { 'abc_key' => 'abc_value', 'cba_key' => 'cba_value' }
+  b = a.shift
+
+  assert_equal Array, b.class
+  assert_equal 2, b.size
+  assert_equal 1, a.size
+
+  b = a.shift
+
+  assert_equal Array, b.class
+  assert_equal 2, b.size
+  assert_equal 0, a.size
+end
+
+assert('Hash#size', '15.2.13.4.25') do
+  a = { 'abc_key' => 'abc_value' }
+  b = Hash.new
+
+  assert_equal 1, a.size
+  assert_equal 0, b.size
+end
+
+assert('Hash#store', '15.2.13.4.26') do
+  a = Hash.new
+  a.store('abc', 'abc')
+
+  assert_equal 'abc', a['abc']
+end
+
+assert('Hash#value?', '15.2.13.4.27') do
+  a = { 'abc_key' => 'abc_value' }
+  b = Hash.new
+
+  assert_true a.value?('abc_value')
+  assert_false b.value?('cba')
+end
+
+assert('Hash#values', '15.2.13.4.28') do
+  a = { 'abc_key' => 'abc_value' }
+
+  assert_equal ['abc_value'], a.values
+end
+
+# Not ISO specified
+
+assert('Hash#eql?') do
+  a = { 'a' => 1, 'b' => 2, 'c' => 3 }
+  b = { 'a' => 1, 'b' => 2, 'c' => 3 }
+  c = { 'a' => 1.0, 'b' => 2, 'c' => 3 }
+  assert_true(a.eql?(b))
+  assert_false(a.eql?(c))
+  assert_false(a.eql?(true))
+end
+
+assert('Hash#reject') do
+  h = {:one => 1, :two => 2, :three => 3, :four => 4}
+  ret = h.reject do |k,v|
+    v % 2 == 0
+  end
+  assert_equal({:one => 1, :three => 3}, ret)
+  assert_equal({:one => 1, :two => 2, :three => 3, :four => 4}, h)
+end
+
+assert('Hash#reject!') do
+  h = {:one => 1, :two => 2, :three => 3, :four => 4}
+  ret = h.reject! do |k,v|
+    v % 2 == 0
+  end
+  assert_equal({:one => 1, :three => 3}, ret)
+  assert_equal({:one => 1, :three => 3}, h)
+end
+
+assert('Hash#select') do
+  h = {:one => 1, :two => 2, :three => 3, :four => 4}
+  ret = h.select do |k,v|
+    v % 2 == 0
+  end
+  assert_equal({:two => 2, :four => 4}, ret)
+  assert_equal({:one => 1, :two => 2, :three => 3, :four => 4}, h)
+end
+
+assert('Hash#select!') do
+  h = {:one => 1, :two => 2, :three => 3, :four => 4}
+  ret = h.select! do |k,v|
+    v % 2 == 0
+  end
+  assert_equal({:two => 2, :four => 4}, ret)
+  assert_equal({:two => 2, :four => 4}, h)
+end
+
+# Not ISO specified
+
+assert('Hash#inspect') do
+  h = { "c" => 300, "a" => 100, "d" => 400, "c" => 300  }
+  ret = h.to_s
+
+  assert_include ret, '"c"=>300'
+  assert_include ret, '"a"=>100'
+  assert_include ret, '"d"=>400'
+end
+
+assert('Hash#rehash') do
+  h = {[:a] => "b"}
+  # hash key modified
+  h.keys[0][0] = :b
+  # h[[:b]] => nil
+  h.rehash
+  assert_equal("b", h[[:b]])
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/indexerror.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/indexerror.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/indexerror.rb	(revision 270)
@@ -0,0 +1,6 @@
+##
+# IndexError ISO Test
+
+assert('IndexError', '15.2.33') do
+  assert_equal Class, IndexError.class
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/integer.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/integer.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/integer.rb	(revision 270)
@@ -0,0 +1,262 @@
+##
+# Integer ISO Test
+
+assert('Integer', '15.2.8') do
+  assert_equal Class, Integer.class
+end
+
+assert('Integer#+', '15.2.8.3.1') do
+  a = 1+1
+  b = 1+1.0
+
+  assert_equal 2, a
+  assert_equal 2.0, b
+
+  assert_raise(TypeError){ 0+nil }
+  assert_raise(TypeError){ 1+nil }
+
+  c = Mrbtest::FIXNUM_MAX + 1
+  d = Mrbtest::FIXNUM_MAX.__send__(:+, 1)
+  e = Mrbtest::FIXNUM_MAX + 1.0
+  assert_equal Float, c.class
+  assert_equal Float, d.class
+  assert_float e, c
+  assert_float e, d
+end
+
+assert('Integer#-', '15.2.8.3.2') do
+  a = 2-1
+  b = 2-1.0
+
+  assert_equal 1, a
+  assert_equal 1.0, b
+
+  c = Mrbtest::FIXNUM_MIN - 1
+  d = Mrbtest::FIXNUM_MIN.__send__(:-, 1)
+  e = Mrbtest::FIXNUM_MIN - 1.0
+  assert_equal Float, c.class
+  assert_equal Float, d.class
+  assert_float e, c
+  assert_float e, d
+end
+
+assert('Integer#*', '15.2.8.3.3') do
+  a = 1*1
+  b = 1*1.0
+
+  assert_equal 1, a
+  assert_equal 1.0, b
+
+  assert_raise(TypeError){ 0*nil }
+  assert_raise(TypeError){ 1*nil }
+
+  c = Mrbtest::FIXNUM_MAX * 2
+  d = Mrbtest::FIXNUM_MAX.__send__(:*, 2)
+  e = Mrbtest::FIXNUM_MAX * 2.0
+  assert_equal Float, c.class
+  assert_equal Float, d.class
+  assert_float e, c
+  assert_float e, d
+end
+
+assert('Integer#/', '15.2.8.3.4') do
+  a = 2/1
+  b = 2/1.0
+
+  assert_equal 2, a
+  assert_equal 2.0, b
+end
+
+assert('Integer#%', '15.2.8.3.5') do
+  a = 1%1
+  b = 1%1.0
+  c = 2%4
+  d = 2%5
+  e = 2%-5
+  f = -2%5
+  g = -2%-5
+  h =  2%-2
+  i = -2%2
+  j = -2%-2
+
+  assert_equal 0, a
+  assert_equal 0.0, b
+  assert_equal 2, c
+  assert_equal 2, d
+  assert_equal(-3, e)
+  assert_equal 3, f
+  assert_equal(-2, g)
+  assert_equal 0, h
+  assert_equal 0, i
+  assert_equal 0, j
+end
+
+assert('Integer#<=>', '15.2.9.3.6') do
+  a = 1<=>0
+  b = 1<=>1
+  c = 1<=>2
+
+  assert_equal  1, a
+  assert_equal  0, b
+  assert_equal(-1, c)
+end
+
+assert('Integer#==', '15.2.8.3.7') do
+  a = 1==0
+  b = 1==1
+
+  assert_false a
+  assert_true b
+end
+
+assert('Integer#~', '15.2.8.3.8') do
+  # Complement
+  assert_equal(-1, ~0)
+  assert_equal(-3, ~2)
+end
+
+assert('Integer#&', '15.2.8.3.9') do
+  # Bitwise AND
+  #   0101 (5)
+  # & 0011 (3)
+  # = 0001 (1)
+  assert_equal 1, 5 & 3
+end
+
+assert('Integer#|', '15.2.8.3.10') do
+  # Bitwise OR
+  #   0101 (5)
+  # | 0011 (3)
+  # = 0111 (7)
+  assert_equal 7, 5 | 3
+end
+
+assert('Integer#^', '15.2.8.3.11') do
+  # Bitwise XOR
+  #   0101 (5)
+  # ^ 0011 (3)
+  # = 0110 (6)
+  assert_equal 6, 5 ^ 3
+end
+
+assert('Integer#<<', '15.2.8.3.12') do
+  # Left Shift by one
+  #   00010111 (23)
+  # = 00101110 (46)
+  assert_equal 46, 23 << 1
+
+  # Left Shift by a negative is Right Shift
+  assert_equal 23, 46 << -1
+end
+
+assert('Integer#>>', '15.2.8.3.13') do
+  # Right Shift by one
+  #   00101110 (46)
+  # = 00010111 (23)
+  assert_equal 23, 46 >> 1
+
+  # Right Shift by a negative is Left Shift
+  assert_equal 46, 23 >> -1
+
+  # Don't raise on large Right Shift
+  assert_equal 0, 23 >> 128
+end
+
+assert('Integer#ceil', '15.2.8.3.14') do
+  assert_equal 10, 10.ceil
+end
+
+assert('Integer#downto', '15.2.8.3.15') do
+  a = 0
+  3.downto(1) do |i|
+    a += i
+  end
+  assert_equal 6, a
+end
+
+assert('Integer#eql?', '15.2.8.3.16') do
+  a = 1.eql?(1)
+  b = 1.eql?(2)
+  c = 1.eql?(nil)
+
+  assert_true a
+  assert_false b
+  assert_false c
+end
+
+assert('Integer#floor', '15.2.8.3.17') do
+  a = 1.floor
+
+  assert_equal 1, a
+end
+
+assert('Integer#next', '15.2.8.3.19') do
+  assert_equal 2, 1.next
+end
+
+assert('Integer#round', '15.2.8.3.20') do
+  assert_equal 1, 1.round
+end
+
+assert('Integer#succ', '15.2.8.3.21') do
+  assert_equal 2, 1.succ
+end
+
+assert('Integer#times', '15.2.8.3.22') do
+  a = 0
+  3.times do
+    a += 1
+  end
+  assert_equal 3, a
+end
+
+assert('Integer#to_f', '15.2.8.3.23') do
+  assert_equal 1.0, 1.to_f
+end
+
+assert('Integer#to_i', '15.2.8.3.24') do
+  assert_equal 1, 1.to_i
+end
+
+assert('Integer#to_s', '15.2.8.3.25') do
+  assert_equal '1', 1.to_s
+  assert_equal("-1", -1.to_s)
+end
+
+assert('Integer#truncate', '15.2.8.3.26') do
+  assert_equal 1, 1.truncate
+end
+
+assert('Integer#upto', '15.2.8.3.27') do
+  a = 0
+  1.upto(3) do |i|
+    a += i
+  end
+  assert_equal 6, a
+end
+
+assert('Integer#divmod', '15.2.8.3.30') do
+  assert_equal [ 0,  0],   0.divmod(1)
+  assert_equal [ 0,  1],   1.divmod(3)
+  assert_equal [ 3,  0],   3.divmod(1)
+  assert_equal [ 2,  6],  20.divmod(7)
+  assert_equal [-1,  2],  -3.divmod(5)
+  assert_equal [-2, -1],  25.divmod(-13)
+  assert_equal [ 1, -6], -13.divmod(-7)
+end
+
+# Not ISO specified
+
+assert('Integer#step') do
+  a = []
+  b = []
+  1.step(3) do |i|
+    a << i
+  end
+  1.step(6, 2) do |i|
+    b << i
+  end
+
+  assert_equal [1, 2, 3], a
+  assert_equal [1, 3, 5], b
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/kernel.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/kernel.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/kernel.rb	(revision 270)
@@ -0,0 +1,590 @@
+##
+# Kernel ISO Test
+
+assert('Kernel', '15.3.1') do
+  assert_equal Module, Kernel.class
+end
+
+assert('Kernel.block_given?', '15.3.1.2.2') do
+  def bg_try(&b)
+    if Kernel.block_given?
+      yield
+    else
+      "no block"
+    end
+  end
+
+  assert_false Kernel.block_given?
+  # test without block
+  assert_equal "no block", bg_try
+  # test with block
+  assert_equal "block" do
+    bg_try { "block" }
+  end
+  # test with block
+  assert_equal "block" do
+    bg_try do
+      "block"
+    end
+  end
+end
+
+# Kernel.eval is provided by the mruby-gem mrbgem. '15.3.1.2.3'
+
+assert('Kernel.global_variables', '15.3.1.2.4') do
+  assert_equal Array, Kernel.global_variables.class
+end
+
+assert('Kernel.iterator?', '15.3.1.2.5') do
+  assert_false Kernel.iterator?
+end
+
+assert('Kernel.lambda', '15.3.1.2.6') do
+  l = Kernel.lambda do
+    true
+  end
+
+  m = Kernel.lambda(&l)
+
+  assert_true l.call
+  assert_equal Proc, l.class
+  assert_true m.call
+  assert_equal Proc, m.class
+end
+
+# Not implemented at the moment
+#assert('Kernel.local_variables', '15.3.1.2.7') do
+#  Kernel.local_variables.class == Array
+#end
+
+assert('Kernel.loop', '15.3.1.2.8') do
+  i = 0
+
+  Kernel.loop do
+    i += 1
+    break if i == 100
+  end
+
+  assert_equal 100, i
+end
+
+assert('Kernel.p', '15.3.1.2.9') do
+  # TODO search for a way to test p to stdio
+  assert_true true
+end
+
+assert('Kernel.print', '15.3.1.2.10') do
+  # TODO search for a way to test print to stdio
+  assert_true true
+end
+
+assert('Kernel.puts', '15.3.1.2.11') do
+  # TODO search for a way to test puts to stdio
+  assert_true true
+end
+
+assert('Kernel.raise', '15.3.1.2.12') do
+  assert_raise RuntimeError do
+    Kernel.raise
+  end
+
+  assert_raise RuntimeError do
+    Kernel.raise RuntimeError.new
+  end
+end
+
+assert('Kernel#__id__', '15.3.1.3.3') do
+  assert_equal Fixnum, __id__.class
+end
+
+assert('Kernel#__send__', '15.3.1.3.4') do
+  # test with block
+  l = __send__(:lambda) do
+    true
+  end
+
+  assert_true l.call
+  assert_equal Proc, l.class
+  # test with argument
+  assert_true __send__(:respond_to?, :nil?)
+  # test without argument and without block
+  assert_equal  Array, __send__(:public_methods).class
+end
+
+assert('Kernel#block_given?', '15.3.1.3.6') do
+  def bg_try(&b)
+    if block_given?
+      yield
+    else
+      "no block"
+    end
+  end
+
+  assert_false block_given?
+  assert_equal "no block", bg_try
+  assert_equal "block" do
+    bg_try { "block" }
+  end
+  assert_equal "block" do
+    bg_try do
+      "block"
+    end
+  end
+end
+
+assert('Kernel#class', '15.3.1.3.7') do
+  assert_equal Module, Kernel.class
+end
+
+assert('Kernel#clone', '15.3.1.3.8') do
+  class KernelCloneTest
+    def initialize
+      @v = 0
+    end
+
+    def get
+      @v
+    end
+
+    def set(v)
+      @v = v
+    end
+  end
+
+  a = KernelCloneTest.new
+  a.set(1)
+  b = a.clone
+
+  def a.test
+  end
+  a.set(2)
+  c = a.clone
+
+  immutables = [ 1, :foo, true, false, nil ]
+  error_count = 0
+  immutables.each do |i|
+    begin
+      i.clone
+    rescue TypeError
+      error_count += 1
+    end
+  end
+
+  assert_equal 2, a.get
+  assert_equal 1, b.get
+  assert_equal 2, c.get
+  assert_true a.respond_to?(:test)
+  assert_false b.respond_to?(:test)
+  assert_true c.respond_to?(:test)
+end
+
+assert('Kernel#dup', '15.3.1.3.9') do
+  class KernelDupTest
+    def initialize
+      @v = 0
+    end
+
+    def get
+      @v
+    end
+
+    def set(v)
+      @v = v
+    end
+  end
+
+  a = KernelDupTest.new
+  a.set(1)
+  b = a.dup
+
+  def a.test
+  end
+  a.set(2)
+  c = a.dup
+
+  immutables = [ 1, :foo, true, false, nil ]
+  error_count = 0
+  immutables.each do |i|
+    begin
+      i.dup
+    rescue TypeError
+      error_count += 1
+    end
+  end
+
+  assert_equal immutables.size, error_count
+  assert_equal 2, a.get
+  assert_equal 1, b.get
+  assert_equal 2, c.get
+  assert_true a.respond_to?(:test)
+  assert_false b.respond_to?(:test)
+  assert_false c.respond_to?(:test)
+end
+
+# Kernel#eval is provided by mruby-eval mrbgem '15.3.1.3.12'
+
+assert('Kernel#extend', '15.3.1.3.13') do
+  class Test4ExtendClass
+  end
+
+  module Test4ExtendModule
+    def test_method; end
+  end
+
+  a = Test4ExtendClass.new
+  a.extend(Test4ExtendModule)
+  b = Test4ExtendClass.new
+
+  assert_true a.respond_to?(:test_method)
+  assert_false b.respond_to?(:test_method)
+end
+
+assert('Kernel#extend works on toplevel', '15.3.1.3.13') do
+  module Test4ExtendModule
+    def test_method; end
+  end
+  # This would crash...
+  extend(Test4ExtendModule)
+
+  assert_true respond_to?(:test_method)
+end
+
+assert('Kernel#global_variables', '15.3.1.3.14') do
+  assert_equal Array, global_variables.class
+end
+
+assert('Kernel#hash', '15.3.1.3.15') do
+  assert_equal hash, hash
+end
+
+assert('Kernel#inspect', '15.3.1.3.17') do
+  s = inspect
+
+  assert_equal String, s.class
+  assert_equal "main", s
+end
+
+assert('Kernel#instance_variable_defined?', '15.3.1.3.20') do
+  o = Object.new
+  o.instance_variable_set(:@a, 1)
+
+  assert_true o.instance_variable_defined?("@a")
+  assert_false o.instance_variable_defined?("@b")
+  assert_true o.instance_variable_defined?("@a"[0,2])
+  assert_true o.instance_variable_defined?("@abc"[0,2])
+end
+
+assert('Kernel#instance_variables', '15.3.1.3.23') do
+  o = Object.new
+  o.instance_eval do
+    @a = 11
+    @b = 12
+  end
+  ivars = o.instance_variables
+
+  assert_equal Array, ivars.class,
+  assert_equal(2, ivars.size)
+  assert_true ivars.include?(:@a)
+  assert_true ivars.include?(:@b)
+end
+
+assert('Kernel#is_a?', '15.3.1.3.24') do
+  assert_true is_a?(Kernel)
+  assert_false is_a?(Array)
+
+  assert_raise TypeError do
+    42.is_a?(42)
+  end
+end
+
+assert('Kernel#iterator?', '15.3.1.3.25') do
+  assert_false iterator?
+end
+
+assert('Kernel#kind_of?', '15.3.1.3.26') do
+  assert_true kind_of?(Kernel)
+  assert_false kind_of?(Array)
+end
+
+assert('Kernel#lambda', '15.3.1.3.27') do
+  l = lambda do
+    true
+  end
+
+  m = lambda(&l)
+
+  assert_true l.call
+  assert_equal Proc, l.class
+  assert_true m.call
+  assert_equal Proc, m.class
+end
+
+# Not implemented yet
+#assert('Kernel#local_variables', '15.3.1.3.28') do
+#  local_variables.class == Array
+#end
+
+assert('Kernel#loop', '15.3.1.3.29') do
+  i = 0
+
+  loop do
+    i += 1
+    break if i == 100
+  end
+
+  assert_equal i, 100
+end
+
+assert('Kernel#method_missing', '15.3.1.3.30') do
+  class MMTestClass
+    def method_missing(sym)
+      "A call to #{sym}"
+    end
+  end
+  mm_test = MMTestClass.new
+  assert_equal 'A call to no_method_named_this', mm_test.no_method_named_this
+
+  a = String.new
+  begin
+    a.no_method_named_this
+  rescue NoMethodError => e
+    assert_equal "undefined method 'no_method_named_this' for \"\"", e.message
+  end
+
+  class ShortInspectClass
+    def inspect
+      'An inspect string'
+    end
+  end
+  b = ShortInspectClass.new
+  begin
+    b.no_method_named_this
+  rescue NoMethodError => e
+    assert_equal "undefined method 'no_method_named_this' for An inspect string", e.message
+  end
+
+  class LongInspectClass
+    def inspect
+      "A" * 70
+    end
+  end
+  c = LongInspectClass.new
+  begin
+    c.no_method_named_this
+  rescue NoMethodError => e
+    assert_equal "undefined method 'no_method_named_this' for #{c.to_s}", e.message
+  end
+
+  class NoInspectClass
+    undef inspect
+  end
+  d = NoInspectClass.new
+  begin
+    d.no_method_named_this
+  rescue NoMethodError => e
+    assert_equal "undefined method 'no_method_named_this' for #{d.to_s}", e.message
+  end
+end
+
+assert('Kernel#methods', '15.3.1.3.31') do
+  assert_equal Array, methods.class
+end
+
+assert('Kernel#nil?', '15.3.1.3.32') do
+  assert_false nil?
+end
+
+assert('Kernel#object_id', '15.3.1.3.33') do
+  a = ""
+  b = ""
+  assert_not_equal a.object_id, b.object_id
+
+  assert_kind_of Numeric, object_id
+  assert_kind_of Numeric, "".object_id
+  assert_kind_of Numeric, true.object_id
+  assert_kind_of Numeric, false.object_id
+  assert_kind_of Numeric, nil.object_id
+  assert_kind_of Numeric, :no.object_id
+  assert_kind_of Numeric, 1.object_id
+  assert_kind_of Numeric, 1.0.object_id
+end
+
+# Kernel#p is defined in mruby-print mrbgem. '15.3.1.3.34'
+
+# Kernel#print is defined in mruby-print mrbgem. '15.3.1.3.35'
+
+assert('Kernel#private_methods', '15.3.1.3.36') do
+  assert_equal Array, private_methods.class
+end
+
+assert('Kernel#protected_methods', '15.3.1.3.37') do
+  assert_equal Array, protected_methods.class
+end
+
+assert('Kernel#public_methods', '15.3.1.3.38') do
+  assert_equal Array, public_methods.class
+end
+
+# Kernel#puts is defined in mruby-print mrbgem. '15.3.1.3.39'
+
+assert('Kernel#raise', '15.3.1.3.40') do
+  assert_raise RuntimeError do
+    raise
+  end
+
+  assert_raise RuntimeError do
+    raise RuntimeError.new
+  end
+end
+
+assert('Kernel#remove_instance_variable', '15.3.1.3.41') do
+  class Test4RemoveInstanceVar
+    attr_reader :var
+    def initialize
+      @var = 99
+    end
+    def remove
+      remove_instance_variable(:@var)
+    end
+  end
+
+  tri = Test4RemoveInstanceVar.new
+  assert_equal 99, tri.var
+  tri.remove
+  assert_equal nil, tri.var
+  assert_raise NameError do
+    tri.remove
+  end
+end
+
+# Kernel#require is defined in mruby-require. '15.3.1.3.42'
+
+assert('Kernel#respond_to?', '15.3.1.3.43') do
+  class Test4RespondTo
+    def valid_method; end
+
+    def test_method; end
+    undef test_method
+  end
+
+  assert_raise TypeError do
+    Test4RespondTo.new.respond_to?(1)
+  end
+
+  assert_raise ArgumentError do
+    Test4RespondTo.new.respond_to?
+  end
+
+  assert_raise ArgumentError do
+    Test4RespondTo.new.respond_to? :a, true, :aa
+  end
+
+  assert_true respond_to?(:nil?)
+  assert_true Test4RespondTo.new.respond_to?(:valid_method)
+  assert_true Test4RespondTo.new.respond_to?('valid_method')
+  assert_false Test4RespondTo.new.respond_to?(:test_method)
+end
+
+assert('Kernel#send', '15.3.1.3.44') do
+  # test with block
+  l = send(:lambda) do
+    true
+  end
+
+  assert_true l.call
+  assert_equal l.class, Proc
+  # test with argument
+  assert_true send(:respond_to?, :nil?)
+  # test without argument and without block
+  assert_equal send(:public_methods).class, Array
+end
+
+assert('Kernel#singleton_methods', '15.3.1.3.45') do
+  assert_equal singleton_methods.class, Array
+end
+
+assert('Kernel#to_s', '15.3.1.3.46') do
+  assert_equal to_s.class, String
+end
+
+assert('Kernel.local_variables', '15.3.1.2.7') do
+  a, b = 0, 1
+  a += b
+
+  vars = Kernel.local_variables.sort
+  assert_equal [:a, :b, :vars], vars
+
+  Proc.new {
+    c = 2
+    vars = Kernel.local_variables.sort
+    assert_equal [:a, :b, :c, :vars], vars
+  }.call
+end
+
+assert('Kernel#!=') do
+  str1 = "hello"
+  str2 = str1
+  str3 = "world"
+
+  assert_false (str1[1] != 'e')
+  assert_true (str1 != str3)
+  assert_false (str2 != str1)
+end
+
+# operator "!~" is defined in ISO Ruby 11.4.4.
+assert('Kernel#!~') do
+  x = "x"
+  def x.=~(other)
+    other == "x"
+  end
+  assert_false x !~ "x"
+  assert_true  x !~ "z"
+
+  y = "y"
+  def y.=~(other)
+    other == "y"
+  end
+  def y.!~(other)
+    other == "not y"
+  end
+  assert_false y !~ "y"
+  assert_false y !~ "z"
+  assert_true  y !~ "not y"
+end
+
+assert('Kernel#respond_to_missing?') do
+  class Test4RespondToMissing
+    def respond_to_missing?(method_name, include_private = false)
+      method_name == :a_method
+    end
+  end
+
+  assert_true Test4RespondToMissing.new.respond_to?(:a_method)
+  assert_false Test4RespondToMissing.new.respond_to?(:no_method)
+end
+
+assert('Kernel#global_variables') do
+  variables = global_variables
+  1.upto(9) do |i|
+    assert_equal variables.include?(:"$#{i}"), true
+  end
+end
+
+assert('Kernel#define_singleton_method') do
+  o = Object.new
+  ret = o.define_singleton_method(:test_method) do
+    :singleton_method_ok
+  end
+  assert_equal :test_method, ret
+  assert_equal :singleton_method_ok, o.test_method
+end
+
+assert('stack extend') do
+  def recurse(count, stop)
+    return count if count > stop
+    recurse(count+1, stop)
+  end
+
+  assert_equal 6, recurse(0, 5)
+end
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/literals.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/literals.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/literals.rb	(revision 270)
@@ -0,0 +1,337 @@
+##
+# Literals ISO Test
+
+assert('Literals Numerical', '8.7.6.2') do
+  # signed and unsigned integer
+  assert_equal 1, 1
+  assert_equal(-1, -1)
+  assert_equal(+1, +1)
+  # signed and unsigned float
+  assert_equal 1.0, 1.0
+  assert_equal(-1.0, -1.0)
+  # binary
+  assert_equal 128, 0b10000000
+  assert_equal 128, 0B10000000
+  # octal
+  assert_equal 8, 0o10
+  assert_equal 8, 0O10
+  assert_equal 8, 0_10
+  # hex
+  assert_equal 255, 0xff
+  assert_equal 255, 0Xff
+  # decimal
+  assert_equal 999, 0d999
+  assert_equal 999, 0D999
+  # decimal seperator
+  assert_equal 10000000, 10_000_000
+  assert_equal       10, 1_0
+  # integer with exponent
+  assert_equal 10.0, 1e1,
+  assert_equal(0.1, 1e-1)
+  assert_equal 10.0, 1e+1
+  # float with exponent
+  assert_equal 10.0, 1.0e1
+  assert_equal(0.1, 1.0e-1)
+  assert_equal 10.0, 1.0e+1
+end
+
+assert('Literals Strings Single Quoted', '8.7.6.3.2') do
+  assert_equal 'abc', 'abc'
+  assert_equal '\'', '\''
+  assert_equal '\\', '\\'
+end
+
+assert('Literals Strings Double Quoted', '8.7.6.3.3') do
+  a = "abc"
+
+  assert_equal "abc", "abc"
+  assert_equal "\"", "\""
+  assert_equal "\\", "\\"
+  assert_equal "abc", "#{a}"
+end
+
+assert('Literals Strings Quoted Non-Expanded', '8.7.6.3.4') do
+  a = %q{abc}
+  b = %q(abc)
+  c = %q[abc]
+  d = %q<abc>
+  e = %q/abc/
+  f = %q/ab\/c/
+  g = %q{#{a}}
+
+  assert_equal 'abc', a
+  assert_equal 'abc', b
+  assert_equal 'abc', c
+  assert_equal 'abc', d
+  assert_equal 'abc', e
+  assert_equal 'ab/c', f
+  assert_equal '#{a}', g
+end
+
+assert('Literals Strings Quoted Expanded', '8.7.6.3.5') do
+  a = %Q{abc}
+  b = %Q(abc)
+  c = %Q[abc]
+  d = %Q<abc>
+  e = %Q/abc/
+  f = %Q/ab\/c/
+  g = %Q{#{a}}
+
+  assert_equal 'abc', a
+  assert_equal 'abc', b
+  assert_equal 'abc', c
+  assert_equal 'abc', d
+  assert_equal 'abc', e
+  assert_equal 'ab/c', f
+  assert_equal 'abc', g
+end
+
+assert('Literals Strings Here documents', '8.7.6.3.6') do
+  a = <<AAA
+aaa
+AAA
+   b = <<b_b
+bbb
+b_b
+    c = [<<CCC1, <<"CCC2", <<'CCC3']
+c1
+CCC1
+c 2
+CCC2
+c  3
+CCC3
+
+      d = <<DDD
+d#{1+2}DDD
+d\t
+DDD\n
+DDD
+  e = <<'EEE'
+e#{1+2}EEE
+e\t
+EEE\n
+EEE
+  f = <<"FFF"
+F
+FF#{"f"}FFF
+F
+FFF
+
+  g = <<-GGG
+  ggg
+  GGG
+  h = <<-"HHH"
+  hhh
+  HHH
+  i = <<-'III'
+  iii
+  III
+  j = [<<-JJJ1   , <<-"JJJ2"   , <<-'JJJ3' ]
+  j#{1}j
+  JJJ1
+  j#{2}j
+  JJJ2
+  j#{3}j
+  JJJ3
+
+  k = <<'KKK'.to_i
+123
+KKK
+
+  m = [<<MM1, <<MM2]
+x#{m2 = {x:<<MM3}}y
+mm3
+MM3
+mm1
+MM1
+mm2
+MM2
+
+  n = [1, "#{<<NN1}", 3,
+nn1
+NN1
+  4]
+
+  qqq = Proc.new {|*x| x.join(' $ ')}
+  q1 = qqq.call("a", <<QQ1, "c",
+q
+QQ1
+      "d")
+  q2 = qqq.call("l", "m#{<<QQ2}n",
+qq
+QQ2
+      "o")
+
+  w = %W( 1 #{<<WWW} 3
+www
+WWW
+      4 5 )
+
+  x = [1, <<XXX1,
+foo #{<<XXX2} bar
+222 #{<<XXX3} 444
+333
+XXX3
+5
+XXX2
+6
+XXX1
+    9]
+
+  z = <<'ZZZ'
+ZZZ
+
+  assert_equal "aaa\n", a
+  assert_equal "bbb\n", b
+  assert_equal ["c1\n", "c 2\n", "c  3\n"], c
+  assert_equal "d3DDD\nd\t\nDDD\n\n", d
+  assert_equal "e\#{1+2}EEE\ne\\t\nEEE\\n\n", e
+  assert_equal "F\nFFfFFF\nF\n", f
+  assert_equal "  ggg\n", g
+  assert_equal "  hhh\n", h
+  assert_equal "  iii\n", i
+  assert_equal ["  j1j\n", "  j2j\n", "  j\#{3}j\n"], j
+  assert_equal 123, k
+  assert_equal ["x{:x=>\"mm3\\n\"}y\nmm1\n", "mm2\n"], m
+  assert_equal ({:x=>"mm3\n"}), m2
+  assert_equal [1, "nn1\n", 3, 4], n
+  assert_equal "a $ q\n $ c $ d", q1
+  assert_equal "l $ mqq\nn $ o", q2
+  assert_equal ["1", "www\n", "3", "4", "5"], w
+  assert_equal [1, "foo 222 333\n 444\n5\n bar\n6\n", 9], x
+  assert_equal "", z
+
+end
+
+
+assert('Literals Array', '8.7.6.4') do
+  a = %W{abc#{1+2}def \}g}
+  b = %W(abc #{2+3} def \(g)
+  c = %W[#{3+4}]
+  d = %W< #{4+5} >
+  e = %W//
+  f = %W[[ab cd][ef]]
+  g = %W{
+    ab
+    #{-1}1
+    2#{2}
+  }
+  h = %W(a\nb
+         test\ abc
+         c\
+d
+         x\y x\\y x\\\y)
+
+  assert_equal ['abc3def', '}g'], a
+  assert_equal ['abc', '5', 'def', '(g'], b
+  assert_equal ['7'],c
+  assert_equal ['9'], d
+  assert_equal [], e
+  assert_equal ['[ab', 'cd][ef]'], f
+  assert_equal ['ab', '-11', '22'], g
+  assert_equal ["a\nb", 'test abc', "c\nd", "xy", "x\\y", "x\\y"], h
+
+  a = %w{abc#{1+2}def \}g}
+  b = %w(abc #{2+3} def \(g)
+  c = %w[#{3+4}]
+  d = %w< #{4+5} >
+  e = %w//
+  f = %w[[ab cd][ef]]
+  g = %w{
+    ab
+    #{-1}1
+    2#{2}
+  }
+  h = %w(a\nb
+         test\ abc
+         c\
+d
+         x\y x\\y x\\\y)
+
+  assert_equal ['abc#{1+2}def', '}g'], a
+  assert_equal ['abc', '#{2+3}', 'def', '(g'], b
+  assert_equal ['#{3+4}'], c
+  assert_equal ['#{4+5}'], d
+  assert_equal [], e
+  assert_equal ['[ab', 'cd][ef]'], f
+  assert_equal ['ab', '#{-1}1', '2#{2}'], g
+  assert_equal ["a\\nb", "test abc", "c\nd", "x\\y", "x\\y", "x\\\\y"], h
+end
+
+
+assert('Literals Array of symbols') do
+  a = %I{abc#{1+2}def \}g}
+  b = %I(abc #{2+3} def \(g)
+  c = %I[#{3+4}]
+  d = %I< #{4+5} >
+  e = %I//
+  f = %I[[ab cd][ef]]
+  g = %I{
+    ab
+    #{-1}1
+    2#{2}
+  }
+
+  assert_equal [:'abc3def', :'}g'], a
+  assert_equal [:'abc', :'5', :'def', :'(g'], b
+  assert_equal [:'7'],c
+  assert_equal [:'9'], d
+  assert_equal [], e
+  assert_equal [:'[ab', :'cd][ef]'], f
+  assert_equal [:'ab', :'-11', :'22'], g
+
+  a = %i{abc#{1+2}def \}g}
+  b = %i(abc #{2+3} def \(g)
+  c = %i[#{3+4}]
+  d = %i< #{4+5} >
+  e = %i//
+  f = %i[[ab cd][ef]]
+  g = %i{
+    ab
+    #{-1}1
+    2#{2}
+  }
+
+  assert_equal [:'abc#{1+2}def', :'}g'], a
+  assert_equal [:'abc', :'#{2+3}', :'def', :'(g'], b
+  assert_equal [:'#{3+4}'], c
+  assert_equal [:'#{4+5}'], d
+  assert_equal [] ,e
+  assert_equal [:'[ab', :'cd][ef]'], f
+  assert_equal [:'ab', :'#{-1}1', :'2#{2}'], g
+end
+
+assert('Literals Symbol', '8.7.6.6') do
+  # do not compile error
+  :$asd
+  :@asd
+  :@@asd
+  :asd=
+  :asd!
+  :asd?
+  :+
+  :+@
+  :if
+  :BEGIN
+
+  a = :"asd qwe"
+  b = :'foo bar'
+  c = :"a#{1+2}b"
+  d = %s(asd)
+  e = %s( foo \))
+  f = %s[asd \[
+qwe]
+  g = %s/foo#{1+2}bar/
+  h = %s{{foo bar}}
+
+  assert_equal :'asd qwe', a
+  assert_equal :"foo bar", b
+  assert_equal :a3b, c
+  assert_equal :asd, d
+  assert_equal :' foo )', e
+  assert_equal :"asd [\nqwe", f
+  assert_equal :'foo#{1+2}bar', g
+  assert_equal :'{foo bar}', h
+end
+
+# Not Implemented ATM assert('Literals Regular expression', '8.7.6.5') do
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/localjumperror.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/localjumperror.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/localjumperror.rb	(revision 270)
@@ -0,0 +1,13 @@
+##
+# LocalJumpError ISO Test
+
+assert('LocalJumpError', '15.2.25') do
+  assert_equal Class, LocalJumpError.class
+#  assert_raise LocalJumpError do
+#    # this will cause an exception due to the wrong location
+#    retry
+#  end
+end
+
+# TODO 15.2.25.2.1 LocalJumpError#exit_value
+# TODO 15.2.25.2.2 LocalJumpError#reason
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/methods.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/methods.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/methods.rb	(revision 270)
@@ -0,0 +1,109 @@
+##
+# Chapter 13.3 "Methods" ISO Test
+
+assert('The alias statement', '13.3.6 a) 4)') do
+  # check aliasing in all possible ways
+
+  def alias_test_method_original; true; end
+
+  alias alias_test_method_a alias_test_method_original
+  alias :alias_test_method_b :alias_test_method_original
+
+  assert_true(alias_test_method_original)
+  assert_true(alias_test_method_a)
+  assert_true(alias_test_method_b)
+end
+
+assert('The alias statement (overwrite original)', '13.3.6 a) 4)') do
+  # check that an aliased method can be overwritten
+  # without side effect
+
+  def alias_test_method_original; true; end
+
+  alias alias_test_method_a alias_test_method_original
+  alias :alias_test_method_b :alias_test_method_original
+
+  assert_true(alias_test_method_original)
+
+  def alias_test_method_original; false; end
+
+  assert_false(alias_test_method_original)
+  assert_true(alias_test_method_a)
+  assert_true(alias_test_method_b)
+end
+
+assert('The alias statement', '13.3.6 a) 5)') do
+  # check that alias is raising NameError if
+  # non-existing method should be undefined
+
+  assert_raise(NameError) do
+    alias new_name_a non_existing_method
+  end
+
+  assert_raise(NameError) do
+    alias :new_name_b :non_existing_method
+  end
+end
+
+assert('The undef statement', '13.3.7 a) 4)') do
+  # check that undef is undefining method
+  # based on the method name
+
+  def existing_method_a; true; end
+  def existing_method_b; true; end
+  def existing_method_c; true; end
+  def existing_method_d; true; end
+  def existing_method_e; true; end
+  def existing_method_f; true; end
+
+  # check that methods are defined
+
+  assert_true(existing_method_a, 'Method should be defined')
+  assert_true(existing_method_b, 'Method should be defined')
+  assert_true(existing_method_c, 'Method should be defined')
+  assert_true(existing_method_d, 'Method should be defined')
+  assert_true(existing_method_e, 'Method should be defined')
+  assert_true(existing_method_f, 'Method should be defined')
+
+  # undefine in all possible ways and check that method
+  # is undefined
+
+  undef existing_method_a
+  assert_raise(NoMethodError) do
+    existing_method_a
+  end
+
+  undef :existing_method_b
+  assert_raise(NoMethodError) do
+    existing_method_b
+  end
+
+  undef existing_method_c, existing_method_d
+  assert_raise(NoMethodError) do
+    existing_method_c
+  end
+  assert_raise(NoMethodError) do
+    existing_method_d
+  end
+
+  undef :existing_method_e, :existing_method_f
+  assert_raise(NoMethodError) do
+    existing_method_e
+  end
+  assert_raise(NoMethodError) do
+    existing_method_f
+  end
+end
+
+assert('The undef statement (method undefined)', '13.3.7 a) 5)') do
+  # check that undef is raising NameError if
+  # non-existing method should be undefined
+
+  assert_raise(NameError) do
+    undef non_existing_method
+  end
+
+  assert_raise(NameError) do
+    undef :non_existing_method
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/module.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/module.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/module.rb	(revision 270)
@@ -0,0 +1,839 @@
+##
+# Module ISO Test
+
+def labeled_module(name, &block)
+  Module.new do
+    singleton_class.class_eval do
+      define_method(:to_s) { name }
+      alias_method :inspect, :to_s
+    end
+    class_eval(&block) if block
+  end
+end
+
+def labeled_class(name, supklass = Object, &block)
+  Class.new(supklass) do
+    singleton_class.class_eval do
+      define_method(:to_s) { name }
+      alias_method :inspect, :to_s
+    end
+    class_eval(&block) if block
+  end
+end
+
+assert('Module', '15.2.2') do
+  assert_equal Class, Module.class
+end
+
+# TODO not implemented ATM assert('Module.constants', '15.2.2.3.1') do
+
+# TODO not implemented ATM assert('Module.nesting', '15.2.2.3.2') do
+
+assert('Module#ancestors', '15.2.2.4.9') do
+  class Test4ModuleAncestors
+  end
+  sc = Test4ModuleAncestors.singleton_class
+  r = String.ancestors
+
+  assert_equal Array, r.class
+  assert_true r.include?(String)
+  assert_true r.include?(Object)
+end
+
+assert('Module#append_features', '15.2.2.4.10') do
+  module Test4AppendFeatures
+    def self.append_features(mod)
+      Test4AppendFeatures2.const_set(:Const4AppendFeatures2, mod)
+    end
+  end
+  module Test4AppendFeatures2
+    include Test4AppendFeatures
+  end
+
+  assert_equal Test4AppendFeatures2, Test4AppendFeatures2.const_get(:Const4AppendFeatures2)
+end
+
+assert('Module#attr NameError') do
+  %w[
+    foo?
+    @foo
+    @@foo
+    $foo
+  ].each do |name|
+    module NameTest; end
+
+    assert_raise(NameError) do
+      NameTest.module_eval { attr_reader name.to_sym }
+    end
+
+    assert_raise(NameError) do
+      NameTest.module_eval { attr_writer name.to_sym }
+    end
+
+    assert_raise(NameError) do
+      NameTest.module_eval { attr name.to_sym }
+    end
+
+    assert_raise(NameError) do
+      NameTest.module_eval { attr_accessor name.to_sym }
+    end
+  end
+
+end
+
+assert('Module#attr', '15.2.2.4.11') do
+  class AttrTest
+    class << self
+      attr :cattr
+      def cattr_val=(val)
+        @cattr = val
+      end
+    end
+    attr :iattr
+    def iattr_val=(val)
+      @iattr = val
+    end
+  end
+
+  test = AttrTest.new
+  assert_true AttrTest.respond_to?(:cattr)
+  assert_true test.respond_to?(:iattr)
+
+  assert_false AttrTest.respond_to?(:cattr=)
+  assert_false test.respond_to?(:iattr=)
+
+  test.iattr_val = 'test'
+  assert_equal 'test', test.iattr
+
+  AttrTest.cattr_val = 'test'
+  assert_equal 'test', AttrTest.cattr
+end
+
+assert('Module#attr_accessor', '15.2.2.4.12') do
+  class AttrTestAccessor
+    class << self
+      attr_accessor :cattr
+    end
+    attr_accessor :iattr, 'iattr2'
+  end
+
+  attr_instance = AttrTestAccessor.new
+  assert_true AttrTestAccessor.respond_to?(:cattr=)
+  assert_true attr_instance.respond_to?(:iattr=)
+  assert_true attr_instance.respond_to?(:iattr2=)
+  assert_true AttrTestAccessor.respond_to?(:cattr)
+  assert_true attr_instance.respond_to?(:iattr)
+  assert_true attr_instance.respond_to?(:iattr2)
+
+  attr_instance.iattr = 'test'
+  assert_equal 'test', attr_instance.iattr
+
+  AttrTestAccessor.cattr = 'test'
+  assert_equal 'test', AttrTestAccessor.cattr
+end
+
+assert('Module#attr_reader', '15.2.2.4.13') do
+  class AttrTestReader
+    class << self
+      attr_reader :cattr
+      def cattr_val=(val)
+        @cattr = val
+      end
+    end
+    attr_reader :iattr, 'iattr2'
+    def iattr_val=(val)
+      @iattr = val
+    end
+  end
+
+  attr_instance = AttrTestReader.new
+  assert_true AttrTestReader.respond_to?(:cattr)
+  assert_true attr_instance.respond_to?(:iattr)
+  assert_true attr_instance.respond_to?(:iattr2)
+
+  assert_false AttrTestReader.respond_to?(:cattr=)
+  assert_false attr_instance.respond_to?(:iattr=)
+  assert_false attr_instance.respond_to?(:iattr2=)
+
+  attr_instance.iattr_val = 'test'
+  assert_equal 'test', attr_instance.iattr
+
+  AttrTestReader.cattr_val = 'test'
+  assert_equal 'test', AttrTestReader.cattr
+end
+
+assert('Module#attr_writer', '15.2.2.4.14') do
+  class AttrTestWriter
+    class << self
+      attr_writer :cattr
+      def cattr_val
+        @cattr
+      end
+    end
+    attr_writer :iattr, 'iattr2'
+    def iattr_val
+      @iattr
+    end
+  end
+
+  attr_instance = AttrTestWriter.new
+  assert_true AttrTestWriter.respond_to?(:cattr=)
+  assert_true attr_instance.respond_to?(:iattr=)
+  assert_true attr_instance.respond_to?(:iattr2=)
+
+  assert_false AttrTestWriter.respond_to?(:cattr)
+  assert_false attr_instance.respond_to?(:iattr)
+  assert_false attr_instance.respond_to?(:iattr2)
+
+  attr_instance.iattr = 'test'
+  assert_equal 'test', attr_instance.iattr_val
+
+  AttrTestWriter.cattr = 'test'
+  assert_equal 'test', AttrTestWriter.cattr_val
+end
+
+assert('Module#class_eval', '15.2.2.4.15') do
+  class Test4ClassEval
+    @a = 11
+    @b = 12
+  end
+  Test4ClassEval.class_eval do
+    def method1
+    end
+  end
+  r = Test4ClassEval.instance_methods
+
+  assert_equal 11, Test4ClassEval.class_eval{ @a }
+  assert_equal 12, Test4ClassEval.class_eval{ @b }
+  assert_equal Array, r.class
+  assert_true r.include?(:method1)
+end
+
+assert('Module#class_variable_defined?', '15.2.2.4.16') do
+  class Test4ClassVariableDefined
+    @@cv = 99
+  end
+
+  assert_true Test4ClassVariableDefined.class_variable_defined?(:@@cv)
+  assert_false Test4ClassVariableDefined.class_variable_defined?(:@@noexisting)
+end
+
+assert('Module#class_variable_get', '15.2.2.4.17') do
+  class Test4ClassVariableGet
+    @@cv = 99
+  end
+
+  assert_equal 99, Test4ClassVariableGet.class_variable_get(:@@cv)
+end
+
+assert('Module#class_variable_set', '15.2.2.4.18') do
+  class Test4ClassVariableSet
+    @@foo = 100
+    def foo
+      @@foo
+    end
+  end
+
+  assert_true Test4ClassVariableSet.class_variable_set(:@@cv, 99)
+  assert_true Test4ClassVariableSet.class_variable_set(:@@foo, 101)
+  assert_true Test4ClassVariableSet.class_variables.include? :@@cv
+  assert_equal 99, Test4ClassVariableSet.class_variable_get(:@@cv)
+  assert_equal 101, Test4ClassVariableSet.new.foo
+end
+
+assert('Module#class_variables', '15.2.2.4.19') do
+  class Test4ClassVariables1
+    @@var1 = 1
+  end
+  class Test4ClassVariables2 < Test4ClassVariables1
+    @@var2 = 2
+  end
+
+  assert_equal [:@@var1], Test4ClassVariables1.class_variables
+  assert_equal [:@@var2, :@@var1], Test4ClassVariables2.class_variables
+end
+
+assert('Module#const_defined?', '15.2.2.4.20') do
+  module Test4ConstDefined
+    Const4Test4ConstDefined = true
+  end
+
+  assert_true Test4ConstDefined.const_defined?(:Const4Test4ConstDefined)
+  assert_false Test4ConstDefined.const_defined?(:NotExisting)
+end
+
+assert('Module#const_get', '15.2.2.4.21') do
+  module Test4ConstGet
+    Const4Test4ConstGet = 42
+  end
+
+  assert_equal 42, Test4ConstGet.const_get(:Const4Test4ConstGet)
+end
+
+assert('Module#const_missing', '15.2.2.4.22') do
+  module Test4ConstMissing
+    def self.const_missing(sym)
+      42 # the answer to everything
+    end
+  end
+
+  assert_equal 42, Test4ConstMissing.const_get(:ConstDoesntExist)
+end
+
+assert('Module#const_get', '15.2.2.4.23') do
+  module Test4ConstSet
+    Const4Test4ConstSet = 42
+  end
+
+  assert_true Test4ConstSet.const_set(:Const4Test4ConstSet, 23)
+  assert_equal 23, Test4ConstSet.const_get(:Const4Test4ConstSet)
+end
+
+assert('Module#constants', '15.2.2.4.24') do
+  $n = []
+  module TestA
+    C = 1
+  end
+  class TestB
+    include TestA
+    C2 = 1
+    $n = constants.sort
+  end
+
+  assert_equal [ :C ], TestA.constants
+  assert_equal [ :C, :C2 ], $n
+end
+
+assert('Module#include', '15.2.2.4.27') do
+  module Test4Include
+    Const4Include = 42
+  end
+  module Test4Include2
+    include Test4Include
+  end
+
+  assert_equal 42, Test4Include2.const_get(:Const4Include)
+end
+
+assert('Module#include?', '15.2.2.4.28') do
+  module Test4IncludeP
+  end
+  class Test4IncludeP2
+    include Test4IncludeP
+  end
+  class Test4IncludeP3 < Test4IncludeP2
+  end
+
+  assert_true Test4IncludeP2.include?(Test4IncludeP)
+  assert_true Test4IncludeP3.include?(Test4IncludeP)
+  assert_false Test4IncludeP.include?(Test4IncludeP)
+end
+
+assert('Module#included', '15.2.2.4.29') do
+  module Test4Included
+    Const4Included = 42
+    def self.included mod
+      Test4Included.const_set(:Const4Included2, mod)
+    end
+  end
+  module Test4Included2
+    include Test4Included
+  end
+
+  assert_equal 42, Test4Included2.const_get(:Const4Included)
+  assert_equal Test4Included2, Test4Included2.const_get(:Const4Included2)
+end
+
+assert('Module#included_modules', '15.2.2.4.30') do
+  module Test4includedModules
+  end
+  module Test4includedModules2
+    include Test4includedModules
+  end
+  r = Test4includedModules2.included_modules
+
+  assert_equal Array, r.class
+  assert_true r.include?(Test4includedModules)
+end
+
+assert('Module#initialize', '15.2.2.4.31') do
+  assert_kind_of Module, Module.new
+  mod = Module.new { def hello; "hello"; end }
+  assert_equal [:hello], mod.instance_methods
+  a = nil
+  mod = Module.new { |m| a = m }
+  assert_equal mod, a
+end
+
+assert('Module#instance_methods', '15.2.2.4.33') do
+  module Test4InstanceMethodsA
+    def method1()  end
+  end
+  class Test4InstanceMethodsB
+    def method2()  end
+  end
+  class Test4InstanceMethodsC < Test4InstanceMethodsB
+    def method3()  end
+  end
+
+  r = Test4InstanceMethodsC.instance_methods(true)
+
+  assert_equal [:method1], Test4InstanceMethodsA.instance_methods
+  assert_equal [:method2], Test4InstanceMethodsB.instance_methods(false)
+  assert_equal [:method3], Test4InstanceMethodsC.instance_methods(false)
+  assert_equal Array, r.class
+  assert_true r.include?(:method3)
+  assert_true r.include?(:method2)
+end
+
+assert('Module#method_defined?', '15.2.2.4.34') do
+  module Test4MethodDefined
+    module A
+      def method1()  end
+    end
+
+    class B
+      def method2()  end
+    end
+
+    class C < B
+      include A
+      def method3()  end
+    end
+  end
+
+  assert_true Test4MethodDefined::A.method_defined? :method1
+  assert_true Test4MethodDefined::C.method_defined? :method1
+  assert_true Test4MethodDefined::C.method_defined? "method2"
+  assert_true Test4MethodDefined::C.method_defined? "method3"
+  assert_false Test4MethodDefined::C.method_defined? "method4"
+end
+
+
+assert('Module#module_eval', '15.2.2.4.35') do
+  module Test4ModuleEval
+    @a = 11
+    @b = 12
+  end
+
+  assert_equal 11, Test4ModuleEval.module_eval{ @a }
+  assert_equal 12, Test4ModuleEval.module_eval{ @b }
+end
+
+assert('Module#remove_class_variable', '15.2.2.4.39') do
+  class Test4RemoveClassVariable
+    @@cv = 99
+  end
+
+  assert_equal 99, Test4RemoveClassVariable.remove_class_variable(:@@cv)
+  assert_false Test4RemoveClassVariable.class_variables.include? :@@cv
+end
+
+assert('Module#remove_const', '15.2.2.4.40') do
+  module Test4RemoveConst
+    ExistingConst = 23
+  end
+
+  result = Test4RemoveConst.module_eval { remove_const :ExistingConst }
+
+  name_error = false
+  begin
+    Test4RemoveConst.module_eval { remove_const :NonExistingConst }
+  rescue NameError
+    name_error = true
+  end
+
+  # Constant removed from Module
+  assert_false Test4RemoveConst.const_defined? :ExistingConst
+  # Return value of binding
+  assert_equal 23, result
+  # Name Error raised when Constant doesn't exist
+  assert_true name_error
+end
+
+assert('Module#remove_method', '15.2.2.4.41') do
+  module Test4RemoveMethod
+    class Parent
+      def hello
+      end
+     end
+
+     class Child < Parent
+      def hello
+      end
+    end
+  end
+
+  assert_true Test4RemoveMethod::Child.class_eval{ remove_method :hello }
+  assert_true Test4RemoveMethod::Child.instance_methods.include? :hello
+  assert_false Test4RemoveMethod::Child.instance_methods(false).include? :hello
+end
+
+assert('Module#undef_method', '15.2.2.4.42') do
+  module Test4UndefMethod
+    class Parent
+      def hello
+      end
+     end
+
+     class Child < Parent
+      def hello
+      end
+     end
+
+     class GrandChild < Child
+     end
+  end
+  Test4UndefMethod::Child.class_eval{ undef_method :hello }
+
+  assert_true Test4UndefMethod::Parent.new.respond_to?(:hello)
+  assert_false Test4UndefMethod::Child.new.respond_to?(:hello)
+  assert_false Test4UndefMethod::GrandChild.new.respond_to?(:hello)
+  assert_false Test4UndefMethod::Child.instance_methods(false).include? :hello
+end
+
+# Not ISO specified
+
+# @!group prepend
+  assert('Module#prepend') do
+    module M0
+      def m1; [:M0] end
+    end
+    module M1
+      def m1; [:M1, super, :M1] end
+    end
+    module M2
+      def m1; [:M2, super, :M2] end
+    end
+    M3 = Module.new do
+      def m1; [:M3, super, :M3] end
+    end
+    module M4
+      def m1; [:M4, super, :M4] end
+    end
+
+    class P0
+      include M0
+      prepend M1
+      def m1; [:C0, super, :C0] end
+    end
+    class P1 < P0
+      prepend M2, M3
+      include M4
+      def m1; [:C1, super, :C1] end
+    end
+
+    obj = P1.new
+    expected = [:M2,[:M3,[:C1,[:M4,[:M1,[:C0,[:M0],:C0],:M1],:M4],:C1],:M3],:M2]
+    assert_equal(expected, obj.m1)
+  end
+
+  # mruby shouldn't be affected by this since there is
+  # no visibility control (yet)
+  assert('Module#prepend public') do
+    assert_nothing_raised('ruby/ruby #8846') do
+      Class.new.prepend(Module.new)
+    end
+  end
+
+  assert('Module#prepend inheritance') do
+    bug6654 = '[ruby-core:45914]'
+    a = labeled_module('a')
+    b = labeled_module('b') { include a }
+    c = labeled_module('c') { prepend b }
+
+    #assert bug6654 do
+      # the Module#< operator should be used here instead, but we don't have it
+      assert_include(c.ancestors, a)
+      assert_include(c.ancestors, b)
+    #end
+
+    bug8357 = '[ruby-core:54736] [Bug #8357]'
+    b = labeled_module('b') { prepend a }
+    c = labeled_class('c') { include b }
+
+    #assert bug8357 do
+      # the Module#< operator should be used here instead, but we don't have it
+      assert_include(c.ancestors, a)
+      assert_include(c.ancestors, b)
+    #end
+
+    bug8357 = '[ruby-core:54742] [Bug #8357]'
+    assert_kind_of(b, c.new, bug8357)
+  end
+
+  assert('Moduler#prepend + #instance_methods') do
+    bug6655 = '[ruby-core:45915]'
+    assert_equal(Object.instance_methods, Class.new {prepend Module.new}.instance_methods, bug6655)
+  end
+
+  assert 'Module#prepend + #singleton_methods' do
+    o = Object.new
+    o.singleton_class.class_eval {prepend Module.new}
+    assert_equal([], o.singleton_methods)
+  end
+
+  assert 'Module#prepend + #remove_method' do
+    c = Class.new do
+      prepend Module.new { def foo; end }
+    end
+    assert_raise(NameError) do
+      c.class_eval do
+        remove_method(:foo)
+      end
+    end
+    c.class_eval do
+      def foo; end
+    end
+    removed = nil
+    c.singleton_class.class_eval do
+      define_method(:method_removed) {|id| removed = id}
+    end
+    assert_nothing_raised(NoMethodError, NameError, '[Bug #7843]') do
+      c.class_eval do
+        remove_method(:foo)
+      end
+    end
+    assert_equal(:foo, removed)
+  end
+
+  assert 'Module#prepend + Class#ancestors' do
+    bug6658 = '[ruby-core:45919]'
+    m = labeled_module("m")
+    c = labeled_class("c") {prepend m}
+    assert_equal([m, c], c.ancestors[0, 2], bug6658)
+
+    bug6662 = '[ruby-dev:45868]'
+    c2 = labeled_class("c2", c)
+    anc = c2.ancestors
+    assert_equal([c2, m, c, Object], anc[0..anc.index(Object)], bug6662)
+  end
+
+  assert 'Module#prepend + Module#ancestors' do
+    bug6659 = '[ruby-dev:45861]'
+    m0 = labeled_module("m0") { def x; [:m0, *super] end }
+    m1 = labeled_module("m1") { def x; [:m1, *super] end; prepend m0 }
+    m2 = labeled_module("m2") { def x; [:m2, *super] end; prepend m1 }
+    c0 = labeled_class("c0") { def x; [:c0] end }
+    c1 = labeled_class("c1") { def x; [:c1] end; prepend m2 }
+    c2 = labeled_class("c2", c0) { def x; [:c2, *super] end; include m2 }
+    #
+    assert_equal([m0, m1], m1.ancestors, bug6659)
+    #
+    bug6662 = '[ruby-dev:45868]'
+    assert_equal([m0, m1, m2], m2.ancestors, bug6662)
+    assert_equal([m0, m1, m2, c1], c1.ancestors[0, 4], bug6662)
+    assert_equal([:m0, :m1, :m2, :c1], c1.new.x)
+    assert_equal([c2, m0, m1, m2, c0], c2.ancestors[0, 5], bug6662)
+    assert_equal([:c2, :m0, :m1, :m2, :c0], c2.new.x)
+    #
+    m3 = labeled_module("m3") { include m1; prepend m1 }
+    assert_equal([m3, m0, m1], m3.ancestors)
+    m3 = labeled_module("m3") { prepend m1; include m1 }
+    assert_equal([m0, m1, m3], m3.ancestors)
+    m3 = labeled_module("m3") { prepend m1; prepend m1 }
+    assert_equal([m0, m1, m3], m3.ancestors)
+    m3 = labeled_module("m3") { include m1; include m1 }
+    assert_equal([m3, m0, m1], m3.ancestors)
+  end
+
+  assert 'Module#prepend #instance_methods(false)' do
+    bug6660 = '[ruby-dev:45863]'
+    assert_equal([:m1], Class.new{ prepend Module.new; def m1; end }.instance_methods(false), bug6660)
+    assert_equal([:m1], Class.new(Class.new{def m2;end}){ prepend Module.new; def m1; end }.instance_methods(false), bug6660)
+  end
+
+  assert 'cyclic Module#prepend' do
+    bug7841 = '[ruby-core:52205] [Bug #7841]'
+    m1 = Module.new
+    m2 = Module.new
+    m1.instance_eval { prepend(m2) }
+    assert_raise(ArgumentError, bug7841) do
+      m2.instance_eval { prepend(m1) }
+    end
+  end
+
+  # these assertions will not run without a #assert_seperately method
+  #assert 'test_prepend_optmethod' do
+  #  bug7983 = '[ruby-dev:47124] [Bug #7983]'
+  #  assert_separately [], %{
+  #    module M
+  #      def /(other)
+  #        to_f / other
+  #      end
+  #    end
+  #    Fixnum.send(:prepend, M)
+  #    assert_equal(0.5, 1 / 2, "#{bug7983}")
+  #  }
+  #  assert_equal(0, 1 / 2)
+  #end
+
+  # mruby has no visibility control
+  assert 'Module#prepend visibility' do
+    bug8005 = '[ruby-core:53106] [Bug #8005]'
+    c = Class.new do
+      prepend Module.new {}
+      def foo() end
+      protected :foo
+    end
+    a = c.new
+    assert_true a.respond_to?(:foo), bug8005
+    assert_nothing_raised(NoMethodError, bug8005) {a.send :foo}
+  end
+
+  # mruby has no visibility control
+  assert 'Module#prepend inherited visibility' do
+    bug8238 = '[ruby-core:54105] [Bug #8238]'
+    module Test4PrependVisibilityInherited
+      class A
+        def foo() A; end
+        private :foo
+      end
+      class B < A
+        public :foo
+        prepend Module.new
+      end
+    end
+    assert_equal(Test4PrependVisibilityInherited::A, Test4PrependVisibilityInherited::B.new.foo, "#{bug8238}")
+  end
+
+  assert 'Module#prepend + #included_modules' do
+    bug8025 = '[ruby-core:53158] [Bug #8025]'
+    mixin = labeled_module("mixin")
+    c = labeled_module("c") {prepend mixin}
+    im = c.included_modules
+    assert_not_include(im, c, bug8025)
+    assert_include(im, mixin, bug8025)
+    c1 = labeled_class("c1") {prepend mixin}
+    c2 = labeled_class("c2", c1)
+    im = c2.included_modules
+    assert_not_include(im, c1, bug8025)
+    assert_not_include(im, c2, bug8025)
+    assert_include(im, mixin, bug8025)
+  end
+
+  assert 'Module#prepend super in alias' do
+    skip "super does not currently work in aliased methods"
+    bug7842 = '[Bug #7842]'
+
+    p = labeled_module("P") do
+      def m; "P"+super; end
+    end
+
+    a = labeled_class("A") do
+      def m; "A"; end
+    end
+
+    b = labeled_class("B", a) do
+      def m; "B"+super; end
+      alias m2 m
+      prepend p
+      alias m3 m
+    end
+
+    assert_nothing_raised do
+      assert_equal("BA", b.new.m2, bug7842)
+    end
+
+    assert_nothing_raised do
+      assert_equal("PBA", b.new.m3, bug7842)
+    end
+  end
+
+  assert 'Module#prepend each class' do
+    m = labeled_module("M")
+    c1 = labeled_class("C1") {prepend m}
+    c2 = labeled_class("C2", c1) {prepend m}
+    assert_equal([m, c2, m, c1], c2.ancestors[0, 4], "should be able to prepend each class")
+  end
+
+  assert 'Module#prepend no duplication' do
+    m = labeled_module("M")
+    c = labeled_class("C") {prepend m; prepend m}
+    assert_equal([m, c], c.ancestors[0, 2], "should never duplicate")
+  end
+
+  assert 'Module#prepend in superclass' do
+    m = labeled_module("M")
+    c1 = labeled_class("C1")
+    c2 = labeled_class("C2", c1) {prepend m}
+    c1.class_eval {prepend m}
+    assert_equal([m, c2, m, c1], c2.ancestors[0, 4], "should accesisble prepended module in superclass")
+  end
+
+  # requires #assert_seperately
+  #assert 'Module#prepend call super' do
+  #  assert_separately([], <<-'end;') #do
+  #    bug10847 = '[ruby-core:68093] [Bug #10847]'
+  #    module M; end
+  #    Float.prepend M
+  #    assert_nothing_raised(SystemStackError, bug10847) do
+  #      0.3.numerator
+  #    end
+  #  end;
+  #end
+# @!endgroup prepend
+
+assert('Module#to_s') do
+  module Test4to_sModules
+  end
+
+  assert_equal 'Test4to_sModules', Test4to_sModules.to_s
+end
+
+assert('Module#inspect') do
+  module Test4to_sModules
+  end
+
+  assert_equal 'Test4to_sModules', Test4to_sModules.inspect
+end
+
+assert('Issue 1467') do
+  module M1
+    def initialize()
+      super()
+    end
+  end
+
+  class C1
+    include M1
+     def initialize()
+       super()
+     end
+  end
+
+  class C2
+    include M1
+  end
+
+  C1.new
+  C2.new
+end
+
+assert('clone Module') do
+  module M1
+    def foo
+      true
+    end
+  end
+
+  class B
+    include M1.clone
+  end
+
+  B.new.foo
+end
+
+assert('Module#module_function') do
+  module M
+    def modfunc; end
+    module_function :modfunc
+  end
+
+  assert_true M.respond_to?(:modfunc)
+end
+
+assert('module with non-class/module outer raises TypeError') do
+  assert_raise(TypeError) { module 0::M1 end }
+  assert_raise(TypeError) { module []::M2 end }
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/nameerror.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/nameerror.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/nameerror.rb	(revision 270)
@@ -0,0 +1,28 @@
+##
+# NameError ISO Test
+
+assert('NameError', '15.2.31') do
+  assert_equal Class, NameError.class
+end
+
+assert('NameError#name', '15.2.31.2.1') do
+
+  # This check is not duplicate with 15.2.31.2.2 check.
+  # Because the NameError in this test is generated in
+  # C API.
+  class TestDummy
+    alias foo bar
+  rescue NameError => e
+    $test_dummy_result = e.name
+  end
+
+  assert_equal :bar, $test_dummy_result
+end
+
+assert('NameError#initialize', '15.2.31.2.2') do
+   e = NameError.new('a', :foo)
+
+   assert_equal NameError, e.class
+   assert_equal 'a', e.message
+   assert_equal :foo, e.name
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/nil.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/nil.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/nil.rb	(revision 270)
@@ -0,0 +1,34 @@
+##
+# NilClass ISO Test
+
+assert('NilClass', '15.2.4') do
+  assert_equal Class, NilClass.class
+end
+
+assert('NilClass', '15.2.4.1') do
+  assert_equal NilClass, nil.class
+  assert_false NilClass.method_defined? :new
+end
+
+assert('NilClass#&', '15.2.4.3.1') do
+  assert_false nil.&(true)
+  assert_false nil.&(nil)
+end
+
+assert('NilClass#^', '15.2.4.3.2') do
+  assert_true nil.^(true)
+  assert_false nil.^(false)
+end
+
+assert('NilClass#|', '15.2.4.3.3') do
+  assert_true nil.|(true)
+  assert_false nil.|(false)
+end
+
+assert('NilClass#nil?', '15.2.4.3.4') do
+  assert_true nil.nil?
+end
+
+assert('NilClass#to_s', '15.2.4.3.5') do
+  assert_equal '', nil.to_s
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/nomethoderror.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/nomethoderror.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/nomethoderror.rb	(revision 270)
@@ -0,0 +1,22 @@
+##
+# NoMethodError ISO Test
+
+assert('NoMethodError', '15.2.32') do
+  NoMethodError.class == Class
+  assert_raise NoMethodError do
+    doesNotExistAsAMethodNameForVerySure("")
+  end
+end
+
+assert('NoMethodError#args', '15.2.32.2.1') do
+  a = NoMethodError.new 'test', :test, [1, 2]
+  assert_equal [1, 2], a.args
+
+  assert_nothing_raised do
+    begin
+      doesNotExistAsAMethodNameForVerySure 3, 1, 4
+    rescue NoMethodError => e
+      assert_equal [3, 1, 4], e.args
+    end
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/numeric.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/numeric.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/numeric.rb	(revision 270)
@@ -0,0 +1,43 @@
+##
+# Numeric ISO Test
+
+assert('Numeric', '15.2.7') do
+  assert_equal Class, Numeric.class
+end
+
+assert('Numeric#+@', '15.2.7.4.1') do
+  assert_equal(+1, +1)
+end
+
+assert('Numeric#-@', '15.2.7.4.2') do
+  assert_equal(-1, -1)
+end
+
+assert('Numeric#abs', '15.2.7.4.3') do
+  assert_equal(1, 1.abs)
+  assert_equal(1.0, -1.abs)
+end
+
+assert('Numeric#pow') do
+  assert_equal(8, 2 ** 3)
+  assert_equal(-8, -2 ** 3)
+  assert_equal(1, 2 ** 0)
+  assert_equal(1, 2.2 ** 0)
+  assert_equal(0.5, 2 ** -1)
+end
+
+assert('Numeric#/', '15.2.8.3.4') do
+  n = Class.new(Numeric){ def /(x); 15.1;end }.new
+
+  assert_equal(2, 10/5)
+  assert_equal(0.0625, 1/16)
+  assert_equal(15.1, n/10)
+  assert_raise(TypeError){ 1/n }
+  assert_raise(TypeError){ 1/nil }
+end
+
+# Not ISO specified
+
+assert('Numeric#**') do
+  assert_equal 8.0, 2.0**3
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/object.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/object.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/object.rb	(revision 270)
@@ -0,0 +1,11 @@
+##
+# Object ISO Test
+
+assert('Object', '15.2.1') do
+  assert_equal Class, Object.class
+end
+
+assert('Object superclass', '15.2.1.2') do
+  assert_equal BasicObject, Object.superclass
+end
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/proc.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/proc.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/proc.rb	(revision 270)
@@ -0,0 +1,154 @@
+##
+# Proc ISO Test
+
+assert('Proc', '15.2.17') do
+  assert_equal Class, Proc.class
+end
+
+assert('Proc.new', '15.2.17.3.1') do
+  assert_raise ArgumentError do
+    Proc.new
+  end
+
+  assert_equal (Proc.new {}).class, Proc
+end
+
+assert('Proc#[]', '15.2.17.4.1') do
+  a = 0
+  b = Proc.new { a += 1 }
+  b.[]
+
+  a2 = 0
+  b2 = Proc.new { |i| a2 += i }
+  b2.[](5)
+
+  assert_equal 1, a
+  assert_equal 5, a2
+end
+
+assert('Proc#arity', '15.2.17.4.2') do
+  a = Proc.new {|x, y|}.arity
+  b = Proc.new {|x, *y, z|}.arity
+  c = Proc.new {|x=0, y|}.arity
+  d = Proc.new {|(x, y), z=0|}.arity
+
+  assert_equal  2, a
+  assert_equal(-3, b)
+  assert_equal  1, c
+  assert_equal  1, d
+
+  e = ->(x=0, y){}.arity
+  f = ->((x, y), z=0){}.arity
+  g = ->(x=0){}.arity
+
+  assert_equal(-2, e)
+  assert_equal(-2, f)
+  assert_equal(-1, g)
+end
+
+assert('Proc#call', '15.2.17.4.3') do
+  a = 0
+  b = Proc.new { a += 1 }
+  b.call
+
+  a2 = 0
+  b2 = Proc.new { |i| a2 += i }
+  b2.call(5)
+
+  assert_equal 1, a
+  assert_equal 5, a2
+end
+
+assert('Proc#call proc args pos block') do
+  pr = Proc.new {|a,b,&c|
+    [a, b, c.class, c&&c.call(:x)]
+  }
+  assert_equal [nil, nil, Proc, :proc], (pr.call(){ :proc })
+  assert_equal [1, nil, Proc, :proc], (pr.call(1){ :proc })
+  assert_equal [1, 2, Proc, :proc], (pr.call(1, 2){ :proc })
+  assert_equal [1, 2, Proc, :proc], (pr.call(1, 2, 3){ :proc })
+  assert_equal [1, 2, Proc, :proc], (pr.call(1, 2, 3, 4){ :proc })
+
+  assert_equal [nil, nil, Proc, :x], (pr.call(){|x| x})
+  assert_equal [1, nil, Proc, :x], (pr.call(1){|x| x})
+  assert_equal [1, 2, Proc, :x], (pr.call(1, 2){|x| x})
+  assert_equal [1, 2, Proc, :x], (pr.call(1, 2, 3){|x| x})
+  assert_equal [1, 2, Proc, :x], (pr.call(1, 2, 3, 4){|x| x})
+end
+
+assert('Proc#call proc args pos rest post') do
+  pr = Proc.new {|a,b,*c,d,e|
+    [a,b,c,d,e]
+  }
+  assert_equal [nil, nil, [], nil, nil], pr.call()
+  assert_equal [1, nil, [], nil, nil], pr.call(1)
+  assert_equal [1, 2, [], nil, nil], pr.call(1,2)
+  assert_equal [1, 2, [], 3, nil], pr.call(1,2,3)
+  assert_equal [1, 2, [], 3, 4], pr.call(1,2,3,4)
+  assert_equal [1, 2, [3], 4, 5], pr.call(1,2,3,4,5)
+  assert_equal [1, 2, [3, 4], 5, 6], pr.call(1,2,3,4,5,6)
+  assert_equal [1, 2, [3, 4, 5], 6,7], pr.call(1,2,3,4,5,6,7)
+
+  assert_equal [nil, nil, [], nil, nil], pr.call([])
+  assert_equal [1, nil, [], nil, nil], pr.call([1])
+  assert_equal [1, 2, [], nil, nil], pr.call([1,2])
+  assert_equal [1, 2, [], 3, nil], pr.call([1,2,3])
+  assert_equal [1, 2, [], 3, 4], pr.call([1,2,3,4])
+  assert_equal [1, 2, [3], 4, 5], pr.call([1,2,3,4,5])
+  assert_equal [1, 2, [3, 4], 5, 6], pr.call([1,2,3,4,5,6])
+  assert_equal [1, 2, [3, 4, 5], 6,7], pr.call([1,2,3,4,5,6,7])
+end
+
+assert('Proc#return_does_not_break_self') do
+  class TestClass
+    attr_accessor :block
+    def initialize
+    end
+    def return_array
+      @block = Proc.new { self }
+      return []
+    end
+    def return_instance_variable
+      @block = Proc.new { self }
+      return @block
+    end
+    def return_const_fixnum
+      @block = Proc.new { self }
+      return 123
+    end
+    def return_nil
+      @block = Proc.new { self }
+      return nil
+    end
+  end
+
+  c = TestClass.new
+  assert_equal [], c.return_array
+  assert_equal c, c.block.call
+
+  c.return_instance_variable
+  assert_equal c, c.block.call
+
+  assert_equal 123, c.return_const_fixnum
+  assert_equal c, c.block.call
+
+  assert_equal nil, c.return_nil
+  assert_equal c, c.block.call
+end
+
+assert('&obj call to_proc if defined') do
+  pr = Proc.new{}
+  def mock(&b)
+    b
+  end
+  assert_equal pr.object_id, mock(&pr).object_id
+  assert_equal pr, mock(&pr)
+
+  obj = Object.new
+  def obj.to_proc
+    Proc.new{ :from_to_proc }
+  end
+  assert_equal :from_to_proc, mock(&obj).call
+
+  assert_raise(TypeError){ mock(&(Object.new)) }
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/range.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/range.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/range.rb	(revision 270)
@@ -0,0 +1,92 @@
+##
+# Range ISO Test
+
+assert('Range', '15.2.14') do
+  assert_equal Class, Range.class
+end
+
+assert('Range#==', '15.2.14.4.1') do
+  assert_true (1..10) == (1..10)
+  assert_false (1..10) == (1..100)
+  assert_true (1..10) == Range.new(1.0, 10.0)
+end
+
+assert('Range#===', '15.2.14.4.2') do
+  a = (1..10)
+
+  assert_true a === 5
+  assert_false a === 20
+end
+
+assert('Range#begin', '15.2.14.4.3') do
+  assert_equal 1, (1..10).begin
+end
+
+assert('Range#each', '15.2.14.4.4') do
+  a = (1..3)
+  b = 0
+  a.each {|i| b += i}
+  assert_equal 6, b
+end
+
+assert('Range#end', '15.2.14.4.5') do
+  assert_equal 10, (1..10).end
+end
+
+assert('Range#exclude_end?', '15.2.14.4.6') do
+  assert_true (1...10).exclude_end?
+  assert_false (1..10).exclude_end?
+end
+
+assert('Range#first', '15.2.14.4.7') do
+  assert_equal 1, (1..10).first
+end
+
+assert('Range#include?', '15.2.14.4.8') do
+  a = (1..10)
+
+  assert_true a.include?(5)
+  assert_false a.include?(20)
+end
+
+assert('Range#initialize', '15.2.14.4.9') do
+  a = Range.new(1, 10, true)
+  b = Range.new(1, 10, false)
+
+  assert_equal (1...10), a
+  assert_true a.exclude_end?
+  assert_equal (1..10), b
+  assert_false b.exclude_end?
+end
+
+assert('Range#last', '15.2.14.4.10') do
+  assert_equal 10, (1..10).last
+end
+
+assert('Range#member?', '15.2.14.4.11') do
+  a = (1..10)
+
+  assert_true a.member?(5)
+  assert_false a.member?(20)
+end
+
+assert('Range#to_s', '15.2.14.4.12') do
+  assert_equal "0..1", (0..1).to_s
+  assert_equal "0...1", (0...1).to_s
+  assert_equal "a..b", ("a".."b").to_s
+  assert_equal "a...b", ("a"..."b").to_s
+end
+
+assert('Range#inspect', '15.2.14.4.13') do
+  assert_equal "0..1", (0..1).inspect
+  assert_equal "0...1", (0...1).inspect
+  assert_equal "\"a\"..\"b\"", ("a".."b").inspect
+  assert_equal "\"a\"...\"b\"", ("a"..."b").inspect
+end
+
+assert('Range#eql?', '15.2.14.4.14') do
+  assert_true (1..10).eql? (1..10)
+  assert_false (1..10).eql? (1..100)
+  assert_false (1..10).eql? (Range.new(1.0, 10.0))
+  assert_false (1..10).eql? "1..10"
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/rangeerror.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/rangeerror.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/rangeerror.rb	(revision 270)
@@ -0,0 +1,6 @@
+##
+# RangeError ISO Test
+
+assert('RangeError', '15.2.26') do
+  assert_equal Class, RangeError.class
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/regexperror.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/regexperror.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/regexperror.rb	(revision 270)
@@ -0,0 +1,4 @@
+##
+# RegexpError ISO Test
+
+# TODO broken ATM assert('RegexpError', '15.2.27') do
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/runtimeerror.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/runtimeerror.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/runtimeerror.rb	(revision 270)
@@ -0,0 +1,6 @@
+##
+# RuntimeError ISO Test
+
+assert('RuntimeError', '15.2.28') do
+  assert_equal Class, RuntimeError.class
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/standarderror.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/standarderror.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/standarderror.rb	(revision 270)
@@ -0,0 +1,6 @@
+##
+# StandardError ISO Test
+
+assert('StandardError', '15.2.23') do
+  assert_equal Class, StandardError.class
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/string.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/string.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/string.rb	(revision 270)
@@ -0,0 +1,688 @@
+# coding: utf-8
+##
+# String ISO Test
+
+UTF8STRING = ("\343\201\202".size == 1)
+
+assert('String', '15.2.10') do
+  assert_equal Class, String.class
+end
+
+assert('String#<=>', '15.2.10.5.1') do
+  a = '' <=> ''
+  b = '' <=> 'not empty'
+  c = 'not empty' <=> ''
+  d = 'abc' <=> 'cba'
+  e = 'cba' <=> 'abc'
+
+  assert_equal  0, a
+  assert_equal(-1, b)
+  assert_equal  1, c
+  assert_equal(-1, d)
+  assert_equal  1, e
+end
+
+assert('String#==', '15.2.10.5.2') do
+  assert_equal 'abc', 'abc'
+  assert_not_equal 'abc', 'cba'
+end
+
+# 'String#=~', '15.2.10.5.3' will be tested in mrbgems.
+
+assert('String#+', '15.2.10.5.4') do
+  assert_equal 'ab', 'a' + 'b'
+end
+
+assert('String#*', '15.2.10.5.5') do
+  assert_equal 'aaaaa', 'a' * 5
+  assert_equal '', 'a' * 0
+  assert_raise(ArgumentError) do
+    'a' * -1
+  end
+end
+
+assert('String#[]', '15.2.10.5.6') do
+  # length of args is 1
+  a = 'abc'[0]
+  b = 'abc'[-1]
+  c = 'abc'[10]
+  d = 'abc'[-10]
+  e = 'abc'[1.1]
+
+  # length of args is 2
+  a1 = 'abc'[0, -1]
+  b1 = 'abc'[10, 0]
+  c1 = 'abc'[-10, 0]
+  d1 = 'abc'[0, 0]
+  e1 = 'abc'[1, 2]
+
+  # args is RegExp
+  # It will be tested in mrbgems.
+
+  # args is String
+  a3 = 'abc'['bc']
+  b3 = 'abc'['XX']
+
+  assert_equal 'a', 'a'
+  # assert_equal 'c', b
+  # assert_nil c
+  # assert_nil d
+  # assert_equal 'b', e
+  # assert_nil a1
+  # assert_nil b1
+  # assert_nil c1
+  # assert_equal '', d1
+  # assert_equal 'bc', e1
+  # assert_equal 'bc', a3
+  # assert_nil b3
+
+  # assert_raise(TypeError) do
+  #   a[nil]
+  # end
+end
+
+assert('String#[](UTF-8)', '15.2.10.5.6') do
+  assert_equal "ã¡", "ããã«ã¡ã¯ä¸ç"[3]
+  assert_equal nil, "ããã«ã¡ã¯ä¸ç"[20]
+  assert_equal "ä¸", "ããã«ã¡ã¯ä¸ç"[-2]
+  assert_equal "ä¸ç", "ããã«ã¡ã¯ä¸ç"[-2..-1]
+  assert_equal "ãã«", "ããã«ã¡ã¯ä¸ç"[1,2]
+  assert_equal "ä¸", "ããã«ã¡ã¯ä¸ç"["ä¸"]
+end if UTF8STRING
+
+assert('String#[] with Range') do
+  a1 = 'abc'[1..0]
+  b1 = 'abc'[1..1]
+  c1 = 'abc'[1..2]
+  d1 = 'abc'[1..3]
+  e1 = 'abc'[1..4]
+  f1 = 'abc'[0..-2]
+  g1 = 'abc'[-2..3]
+  h1 = 'abc'[3..4]
+  i1 = 'abc'[4..5]
+  j1 = 'abcdefghijklmnopqrstuvwxyz'[1..3]
+  a2 = 'abc'[1...0]
+  b2 = 'abc'[1...1]
+  c2 = 'abc'[1...2]
+  d2 = 'abc'[1...3]
+  e2 = 'abc'[1...4]
+  f2 = 'abc'[0...-2]
+  g2 = 'abc'[-2...3]
+  h2 = 'abc'[3...4]
+  i2 = 'abc'[4...5]
+  j2 = 'abcdefghijklmnopqrstuvwxyz'[1...3]
+
+  assert_equal '', a1
+  assert_equal 'b', b1
+  assert_equal 'bc', c1
+  assert_equal 'bc', d1
+  assert_equal 'bc', e1
+  assert_equal 'ab', f1
+  assert_equal 'bc', g1
+  assert_equal '', h1
+  assert_nil i2
+  assert_equal 'bcd', j1
+  assert_equal '', a2
+  assert_equal '', b2
+  assert_equal 'b', c2
+  assert_equal 'bc', d2
+  assert_equal 'bc', e2
+  assert_equal 'a', f2
+  assert_equal 'bc', g2
+  assert_equal '', h2
+  assert_nil i2
+  assert_equal 'bc', j2
+end
+
+assert('String#[]=') do
+  # length of args is 1
+  a = 'abc'
+  a[0] = 'X'
+  assert_equal 'Xbc', a
+
+  b = 'abc'
+  b[-1] = 'X'
+  assert_equal 'abX', b
+
+  c = 'abc'
+  assert_raise(IndexError) do
+    c[10] = 'X'
+  end
+
+  d = 'abc'
+  assert_raise(IndexError) do
+    d[-10] = 'X'
+  end
+
+  e = 'abc'
+  e[1.1] = 'X'
+  assert_equal 'aXc', e
+
+
+  # length of args is 2
+  a1 = 'abc'
+  assert_raise(IndexError) do
+    a1[0, -1] = 'X'
+  end
+
+  b1 = 'abc'
+  assert_raise(IndexError) do
+    b1[10, 0] = 'X'
+  end
+
+  c1 = 'abc'
+  assert_raise(IndexError) do
+    c1[-10, 0] = 'X'
+  end
+
+  d1 = 'abc'
+  d1[0, 0] = 'X'
+  assert_equal 'Xabc', d1
+
+  e1 = 'abc'
+  e1[1, 3] = 'X'
+  assert_equal 'aX', e1
+
+  # args is RegExp
+  # It will be tested in mrbgems.
+
+  # args is String
+  a3 = 'abc'
+  a3['bc'] = 'X'
+  assert_equal a3, 'aX'
+
+  b3 = 'abc'
+  assert_raise(IndexError) do
+    b3['XX'] = 'Y'
+  end
+end
+
+assert('String#capitalize', '15.2.10.5.7') do
+  a = 'abc'
+  a.capitalize
+
+  assert_equal 'abc', a
+  assert_equal 'Abc', 'abc'.capitalize
+end
+
+assert('String#capitalize!', '15.2.10.5.8') do
+  a = 'abc'
+  a.capitalize!
+
+  assert_equal 'Abc', a
+  assert_equal nil, 'Abc'.capitalize!
+end
+
+assert('String#chomp', '15.2.10.5.9') do
+  a = 'abc'.chomp
+  b = ''.chomp
+  c = "abc\n".chomp
+  d = "abc\n\n".chomp
+  e = "abc\t".chomp("\t")
+  f = "abc\n"
+
+  f.chomp
+
+  assert_equal 'abc', a
+  assert_equal '', b
+  assert_equal 'abc', c
+  assert_equal "abc\n", d
+  assert_equal 'abc', e
+  assert_equal "abc\n", f
+end
+
+assert('String#chomp!', '15.2.10.5.10') do
+  a = 'abc'
+  b = ''
+  c = "abc\n"
+  d = "abc\n\n"
+  e = "abc\t"
+
+  a.chomp!
+  b.chomp!
+  c.chomp!
+  d.chomp!
+  e.chomp!("\t")
+
+  assert_equal 'abc', a
+  assert_equal '', b
+  assert_equal 'abc', c
+  assert_equal "abc\n", d
+  assert_equal 'abc', e
+end
+
+assert('String#chop', '15.2.10.5.11') do
+  a = ''.chop
+  b = 'abc'.chop
+  c = 'abc'
+
+  c.chop
+
+  assert_equal '', a
+  assert_equal 'ab', b
+  assert_equal 'abc', c
+end
+
+assert('String#chop(UTF-8)', '15.2.10.5.11') do
+  a = ''.chop
+  b = 'ããã'.chop
+  c = "ã\nã".chop.chop
+
+  assert_equal '', a
+  assert_equal 'ãã', b
+  assert_equal 'ã', c
+end if UTF8STRING
+
+assert('String#chop!', '15.2.10.5.12') do
+  a = ''
+  b = 'abc'
+
+  a.chop!
+  b.chop!
+
+  assert_equal a, ''
+  assert_equal b, 'ab'
+end
+
+assert('String#chop!(UTF-8)', '15.2.10.5.12') do
+  a = ''
+  b = "ãããã\n"
+  c = "ãããã\n"
+
+  a.chop!
+  b.chop!
+  c.chop!
+  c.chop!
+
+  assert_equal a, ''
+  assert_equal b, 'ãããã'
+  assert_equal c, 'ããã'
+end if UTF8STRING
+
+assert('String#downcase', '15.2.10.5.13') do
+  a = 'ABC'.downcase
+  b = 'ABC'
+
+  b.downcase
+
+  assert_equal 'abc', a
+  assert_equal 'ABC', b
+end
+
+assert('String#downcase!', '15.2.10.5.14') do
+  a = 'ABC'
+
+  a.downcase!
+
+  assert_equal 'abc', a
+  assert_equal nil, 'abc'.downcase!
+end
+
+assert('String#each_line', '15.2.10.5.15') do
+  a = "first line\nsecond line\nthird line"
+  list = ["first line\n", "second line\n", "third line"]
+  n_list = []
+
+  a.each_line do |line|
+    n_list << line
+  end
+
+  assert_equal list, n_list
+end
+
+assert('String#empty?', '15.2.10.5.16') do
+  a = ''
+  b = 'not empty'
+
+  assert_true a.empty?
+  assert_false b.empty?
+end
+
+assert('String#eql?', '15.2.10.5.17') do
+  assert_true 'abc'.eql?('abc')
+  assert_false 'abc'.eql?('cba')
+end
+
+assert('String#gsub', '15.2.10.5.18') do
+  assert_equal('aBcaBc', 'abcabc'.gsub('b', 'B'), 'gsub without block')
+  assert_equal('aBcaBc', 'abcabc'.gsub('b'){|w| w.capitalize }, 'gsub with block')
+  assert_equal('$a$a$',  '#a#a#'.gsub('#', '$'), 'mruby/mruby#847')
+  assert_equal('$a$a$',  '#a#a#'.gsub('#'){|w| '$' }, 'mruby/mruby#847 with block')
+  assert_equal('$$a$$',  '##a##'.gsub('##', '$$'), 'mruby/mruby#847 another case')
+  assert_equal('$$a$$',  '##a##'.gsub('##'){|w| '$$' }, 'mruby/mruby#847 another case with block')
+  assert_equal('A',      'a'.gsub('a', 'A'))
+  assert_equal('A',      'a'.gsub('a'){|w| w.capitalize })
+end
+
+assert('String#gsub with backslash') do
+  s = 'abXcdXef'
+  assert_equal 'ab<\\>cd<\\>ef',    s.gsub('X', '<\\\\>')
+  assert_equal 'ab<X>cd<X>ef',      s.gsub('X', '<\\&>')
+  assert_equal 'ab<X>cd<X>ef',      s.gsub('X', '<\\0>')
+  assert_equal 'ab<ab>cd<abXcd>ef', s.gsub('X', '<\\`>')
+  assert_equal 'ab<cdXef>cd<ef>ef', s.gsub('X', '<\\\'>')
+end
+
+assert('String#gsub!', '15.2.10.5.19') do
+  a = 'abcabc'
+  a.gsub!('b', 'B')
+
+  b = 'abcabc'
+  b.gsub!('b') { |w| w.capitalize }
+
+  assert_equal 'aBcaBc', a
+  assert_equal 'aBcaBc', b
+end
+
+assert('String#hash', '15.2.10.5.20') do
+  a = 'abc'
+
+  assert_equal 'abc'.hash, a.hash
+end
+
+assert('String#include?', '15.2.10.5.21') do
+  assert_true 'abc'.include?(97)
+  assert_false 'abc'.include?(100)
+  assert_true 'abc'.include?('a')
+  assert_false 'abc'.include?('d')
+end
+
+assert('String#index', '15.2.10.5.22') do
+  assert_equal 0, 'abc'.index('a')
+  assert_nil 'abc'.index('d')
+  assert_equal 3, 'abcabc'.index('a', 1)
+end
+
+assert('String#initialize', '15.2.10.5.23') do
+  a = ''
+  a.initialize('abc')
+  assert_equal 'abc', a
+
+  a.initialize('abcdefghijklmnopqrstuvwxyz')
+  assert_equal 'abcdefghijklmnopqrstuvwxyz', a
+end
+
+assert('String#initialize_copy', '15.2.10.5.24') do
+  a = ''
+  a.initialize_copy('abc')
+
+  assert_equal 'abc', a
+end
+
+assert('String#intern', '15.2.10.5.25') do
+  assert_equal :abc, 'abc'.intern
+end
+
+assert('String#length', '15.2.10.5.26') do
+  assert_equal 3, 'abc'.length
+end
+
+# 'String#match', '15.2.10.5.27' will be tested in mrbgems.
+
+assert('String#replace', '15.2.10.5.28') do
+  a = ''
+  a.replace('abc')
+
+  assert_equal 'abc', a
+  assert_equal 'abc', 'cba'.replace(a)
+
+  b = 'abc' * 10
+  c = ('cba' * 10).dup
+  b.replace(c);
+  c.replace(b);
+  assert_equal c, b
+
+  # shared string
+  s = "foo" * 100
+  a = s[10, 90]                # create shared string
+  assert_equal("", s.replace(""))    # clear
+  assert_equal("", s)          # s is cleared
+  assert_not_equal("", a)      # a should not be affected
+end
+
+assert('String#reverse', '15.2.10.5.29') do
+  a = 'abc'
+  a.reverse
+
+  assert_equal 'abc', a
+  assert_equal 'cba', 'abc'.reverse
+end
+
+assert('String#reverse(UTF-8)', '15.2.10.5.29') do
+  assert_equal "ã¡", "ããã«ã¡ã¯ä¸ç"[3]
+  assert_equal nil, "ããã«ã¡ã¯ä¸ç"[20]
+  assert_equal "ä¸", "ããã«ã¡ã¯ä¸ç"[-2]
+  assert_equal "ä¸ç", "ããã«ã¡ã¯ä¸ç"[-2..-1]
+  assert_equal "ãã«", "ããã«ã¡ã¯ä¸ç"[1,2]
+  assert_equal "ä¸", "ããã«ã¡ã¯ä¸ç"["ä¸"]
+end if UTF8STRING
+
+assert('String#reverse!', '15.2.10.5.30') do
+  a = 'abc'
+  a.reverse!
+
+  assert_equal 'cba', a
+  assert_equal 'cba', 'abc'.reverse!
+end
+
+assert('String#reverse!(UTF-8)', '15.2.10.5.30') do
+  a = 'ããã«ã¡ã¯ä¸ç!'
+  a.reverse!
+
+  assert_equal '!çä¸ã¯ã¡ã«ãã', a
+  assert_equal '!çä¸ã¯ã¡ã«ãã', 'ããã«ã¡ã¯ä¸ç!'.reverse!
+end if UTF8STRING
+
+assert('String#rindex', '15.2.10.5.31') do
+  assert_equal 0, 'abc'.rindex('a')
+  assert_nil 'abc'.rindex('d')
+  assert_equal 0, 'abcabc'.rindex('a', 1)
+  assert_equal 3, 'abcabc'.rindex('a', 4)
+end
+
+assert('String#rindex(UTF-8)', '15.2.10.5.31') do
+  str = "ããã«ã¡ã¯ä¸ç!\nããã«ã¡ã¯ä¸ç!"
+  assert_nil str.index('ã')
+  assert_equal 3, str.index('ã¡')
+  assert_equal 12, str.index('ã¡', 10)
+  assert_equal nil, str.index("ã")
+end if UTF8STRING
+
+# 'String#scan', '15.2.10.5.32' will be tested in mrbgems.
+
+assert('String#size', '15.2.10.5.33') do
+  assert_equal 3, 'abc'.size
+end
+
+assert('String#size(UTF-8)', '15.2.10.5.33') do
+  str = 'ããã«ã¡ã¯ä¸ç!'
+  assert_equal 8, str.size
+  assert_not_equal str.bytesize, str.size
+  assert_equal 2, str[1, 2].size
+end if UTF8STRING
+
+assert('String#slice', '15.2.10.5.34') do
+  # length of args is 1
+  a = 'abc'.slice(0)
+  b = 'abc'.slice(-1)
+  c = 'abc'.slice(10)
+  d = 'abc'.slice(-10)
+
+  # length of args is 2
+  a1 = 'abc'.slice(0, -1)
+  b1 = 'abc'.slice(10, 0)
+  c1 = 'abc'.slice(-10, 0)
+  d1 = 'abc'.slice(0, 0)
+  e1 = 'abc'.slice(1, 2)
+
+  # slice of shared string
+  e11 = e1.slice(0)
+
+  # args is RegExp
+  # It will be tested in mrbgems.
+
+  # args is String
+  a3 = 'abc'.slice('bc')
+  b3 = 'abc'.slice('XX')
+
+  assert_equal 'a', a
+  assert_equal 'c', b
+  assert_nil c
+  assert_nil d
+  assert_nil a1
+  assert_nil b1
+  assert_nil c1
+  assert_equal '', d1
+  assert_equal 'bc', e1
+  assert_equal 'b', e11
+  assert_equal 'bc', a3
+  assert_nil b3
+end
+
+# TODO Broken ATM
+assert('String#split', '15.2.10.5.35') do
+  # without RegExp behavior is actually unspecified
+  assert_equal ['abc', 'abc', 'abc'], 'abc abc abc'.split
+  assert_equal ["a", "b", "c", "", "d"], 'a,b,c,,d'.split(',')
+  assert_equal ['abc', 'abc', 'abc'], 'abc abc abc'.split(nil)
+  assert_equal ['a', 'b', 'c'], 'abc'.split("")
+end
+
+assert('String#split(UTF-8)', '15.2.10.5.35') do
+  got = "ããã«ã¡ã¯ä¸ç!".split('')
+  assert_equal ['ã', 'ã', 'ã«', 'ã¡', 'ã¯', 'ä¸', 'ç', '!'], got
+  got = "ããã«ã¡ã¯ä¸ç!".split('ã«')
+  assert_equal ['ãã', 'ã¡ã¯ä¸ç!'], got
+end if UTF8STRING
+
+assert('String#sub', '15.2.10.5.36') do
+  assert_equal 'aBcabc', 'abcabc'.sub('b', 'B')
+  assert_equal 'aBcabc', 'abcabc'.sub('b') { |w| w.capitalize }
+  assert_equal 'aa$', 'aa#'.sub('#', '$')
+end
+
+assert('String#sub with backslash') do
+  s = 'abXcdXef'
+  assert_equal 'ab<\\>cdXef',    s.sub('X', '<\\\\>')
+  assert_equal 'ab<X>cdXef',     s.sub('X', '<\\&>')
+  assert_equal 'ab<X>cdXef',     s.sub('X', '<\\0>')
+  assert_equal 'ab<ab>cdXef',    s.sub('X', '<\\`>')
+  assert_equal 'ab<cdXef>cdXef', s.sub('X', '<\\\'>')
+end
+
+assert('String#sub!', '15.2.10.5.37') do
+  a = 'abcabc'
+  a.sub!('b', 'B')
+
+  b = 'abcabc'
+  b.sub!('b') { |w| w.capitalize }
+
+  assert_equal 'aBcabc', a
+  assert_equal 'aBcabc', b
+end
+
+assert('String#to_f', '15.2.10.5.38') do
+  a = ''.to_f
+  b = '123456789'.to_f
+  c = '12345.6789'.to_f
+
+  assert_float(0.0, a)
+  assert_float(123456789.0, b)
+  assert_float(12345.6789, c)
+end
+
+assert('String#to_i', '15.2.10.5.39') do
+  a = ''.to_i
+  b = '32143'.to_i
+  c = 'a'.to_i(16)
+  d = '100'.to_i(2)
+  e = '1_000'.to_i
+
+  assert_equal 0, a
+  assert_equal 32143, b
+  assert_equal 10, c
+  assert_equal 4, d
+  assert_equal 1_000, e
+end
+
+assert('String#to_s', '15.2.10.5.40') do
+  assert_equal 'abc', 'abc'.to_s
+end
+
+assert('String#to_sym', '15.2.10.5.41') do
+  assert_equal :abc, 'abc'.to_sym
+end
+
+assert('String#upcase', '15.2.10.5.42') do
+  a = 'abc'.upcase
+  b = 'abc'
+
+  b.upcase
+
+  assert_equal 'ABC', a
+  assert_equal 'abc', b
+end
+
+assert('String#upcase!', '15.2.10.5.43') do
+  a = 'abc'
+
+  a.upcase!
+
+  assert_equal 'ABC', a
+  assert_equal nil, 'ABC'.upcase!
+
+  a = 'abcdefghijklmnopqrstuvwxyz'
+  b = a.dup
+  a.upcase!
+  b.upcase!
+  assert_equal 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', b
+end
+
+assert('String#inspect', '15.2.10.5.46') do
+  # should not raise an exception - regress #1210
+  assert_nothing_raised do
+  ("\1" * 100).inspect
+  end
+
+  assert_equal "\"\\000\"", "\0".inspect
+end
+
+# Not ISO specified
+
+assert('String interpolation (mrb_str_concat for shared strings)') do
+  a = "A" * 32
+  assert_equal "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:", "#{a}:"
+end
+
+assert('Check the usage of a NUL character') do
+  "qqq\0ppp"
+end
+
+assert('String#bytes') do
+  str1 = "hello"
+  bytes1 = [104, 101, 108, 108, 111]
+
+  str2 = "\xFF"
+  bytes2 = [0xFF]
+
+  assert_equal bytes1, str1.bytes
+  assert_equal bytes2, str2.bytes
+end
+
+assert('String#each_byte') do
+  str1 = "hello"
+  bytes1 = [104, 101, 108, 108, 111]
+  bytes2 = []
+
+  str1.each_byte {|b| bytes2 << b }
+
+  assert_equal bytes1, bytes2
+end
+
+assert('String#freeze') do
+  str = "hello"
+  str.freeze
+
+  assert_raise(RuntimeError) { str.upcase! }
+end
+
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/superclass.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/superclass.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/superclass.rb	(revision 270)
@@ -0,0 +1,46 @@
+[
+  # [:Object, :implementation_defined_value, '15.2.2.1'],
+  [:Module, :Object, '15.2.2.2'],
+  [:Class, :Module, '15.2.3.2'],
+  [:NilClass, :Object, '15.2.4.2'],
+  [:TrueClass, :Object, '15.2.5.2'],
+  [:FalseClass, :Object, '15.2.6.2'],
+  [:Numeric, :Object, '15.2.7.2'],
+  [:Integer, :Numeric, '15.2.8.2'],
+  [:Float, :Numeric, '15.2.9.2'],
+  [:String, :Object, '15.2.10.2'],
+  [:Symbol, :Object, '15.2.11.2'],
+  [:Array, :Object, '15.2.12.2'],
+  [:Hash, :Object, '15.2.13.2'],
+  [:Range, :Object, '15.2.14.2'],
+#  [:Regexp, :Object, '15.2.15.2'],      #No Regexp in mruby core
+#  [:MatchData, :Object, '15.2.16.2'],
+  [:Proc, :Object, '15.2.17.2'],
+#  [:Struct, :Object, '15.2.18.2'],
+#  [:Time, :Object, '15.2.19.2'],
+#  [:IO, :Object, '15.2.20.2'],
+#  [:File, :IO, '15.2.21.2'],
+  [:Exception, :Object, '15.2.22.2'],
+  [:StandardError, :Exception, '15.2.23.2'],
+  [:ArgumentError, :StandardError, '15.2.24.2'],
+  [:LocalJumpError, :StandardError, '15.2.25.2'],
+  [:RangeError, :StandardError, '12.2.26.2'],
+  [:RegexpError, :StandardError, '12.2.27.2'],
+  [:RuntimeError, :StandardError, '12.2.28.2'],
+  [:TypeError, :StandardError, '12.2.29.2'],
+#  [:ZeroDivisionError, :StandardError, '12.2.30.2'],  # No ZeroDivisionError in mruby
+  [:NameError, :StandardError, '15.2.31.2'],
+  [:NoMethodError, :NameError, '15.2.32.2'],
+  [:IndexError, :StandardError, '15.2.33.2'],
+#  [:IOError, :StandardError, '12.2.34.2'],
+#  [:EOFError, :IOError, '12.2.35.2'],
+#  [:SystemCallError, :StandardError, '15.2.36.2'],
+  [:ScriptError, :Exception, '12.2.37.2'],
+  [:SyntaxError, :ScriptError, '12.2.38.2'],
+#  [:LoadError, :ScriptError, '12.2.39,2'],
+].each do |cls, super_cls, iso|
+  assert "Direct superclass of #{cls}", iso do
+    skip "#{cls} isn't defined" unless Object.const_defined? cls
+    assert_equal Object.const_get(super_cls), Object.const_get(cls).superclass
+  end
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/symbol.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/symbol.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/symbol.rb	(revision 270)
@@ -0,0 +1,23 @@
+##
+# Symbol ISO Test
+
+assert('Symbol', '15.2.11') do
+  assert_equal Class, Symbol.class
+end
+
+assert('Symbol#===', '15.2.11.3.1') do
+  assert_true :abc == :abc
+  assert_false :abc == :cba
+end
+
+assert('Symbol#id2name', '15.2.11.3.2') do
+  assert_equal 'abc', :abc.id2name
+end
+
+assert('Symbol#to_s', '15.2.11.3.3') do
+  assert_equal  'abc', :abc.to_s
+end
+
+assert('Symbol#to_sym', '15.2.11.3.4') do
+  assert_equal :abc, :abc.to_sym
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/syntax.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/syntax.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/syntax.rb	(revision 270)
@@ -0,0 +1,411 @@
+assert('__FILE__') do
+  file = __FILE__[-9, 9]
+  assert_equal 'syntax.rb', file
+end
+
+assert('__LINE__') do
+  assert_equal 7, __LINE__
+end
+
+assert('super', '11.3.4') do
+  assert_raise NoMethodError do
+    super
+  end
+
+  class SuperFoo
+    def foo
+      true
+    end
+    def bar(*a)
+      a
+    end
+  end
+  class SuperBar < SuperFoo
+    def foo
+      super
+    end
+    def bar(*a)
+      super(*a)
+    end
+  end
+  bar = SuperBar.new
+
+  assert_true bar.foo
+  assert_equal [1,2,3], bar.bar(1,2,3)
+end
+
+assert('yield', '11.3.5') do
+  assert_raise LocalJumpError do
+    yield
+  end
+end
+
+assert('Abbreviated variable assignment', '11.4.2.3.2') do
+  a ||= 1
+  b &&= 1
+  c = 1
+  c += 2
+
+  assert_equal 1, a
+  assert_nil b
+  assert_equal 3, c
+end
+
+assert('case expression', '11.5.2.2.4') do
+  # case-expression-with-expression, one when-clause
+  x = 0
+  case "a"
+  when "a"
+    x = 1
+  end
+  assert_equal 1, x
+
+  # case-expression-with-expression, multiple when-clauses
+  x = 0
+  case "b"
+  when "a"
+    x = 1
+  when "b"
+    x = 2
+  end
+  assert_equal 2, x
+
+  # no matching when-clause
+  x = 0
+  case "c"
+  when "a"
+    x = 1
+  when "b"
+    x = 2
+  end
+  assert_equal 0, x
+
+  # case-expression-with-expression, one when-clause and one else-clause
+  a = 0
+  case "c"
+  when "a"
+    x = 1
+  else
+    x = 3
+  end
+  assert_equal 3, x
+
+  # case-expression-without-expression, one when-clause
+  x = 0
+  case
+  when true
+    x = 1
+  end
+  assert_equal 1, x
+
+  # case-expression-without-expression, multiple when-clauses
+  x = 0
+  case
+  when 0 == 1
+    x = 1
+  when 1 == 1
+    x = 2
+  end
+  assert_equal 2, x
+
+  # case-expression-without-expression, one when-clause and one else-clause
+  x = 0
+  case
+  when 0 == 1
+    x = 1
+  else
+    x = 3
+  end
+  assert_equal 3, x
+
+  # multiple when-arguments
+  x = 0
+  case 4
+  when 1, 3, 5
+    x = 1
+  when 2, 4, 6
+    x = 2
+  end
+  assert_equal 2, x
+
+  # when-argument with splatting argument
+  x = :integer
+  odds  = [ 1, 3, 5, 7, 9 ]
+  evens = [ 2, 4, 6, 8 ]
+  case 5
+  when *odds
+    x = :odd
+  when *evens
+    x = :even
+  end
+  assert_equal :odd, x
+
+  true
+end
+
+assert('Nested const reference') do
+  module Syntax4Const
+    CONST1 = "hello world"
+    class Const2
+      def const1
+        CONST1
+      end
+    end
+  end
+  assert_equal "hello world", Syntax4Const::CONST1
+  assert_equal "hello world", Syntax4Const::Const2.new.const1
+end
+
+assert('Abbreviated variable assignment as returns') do
+  module Syntax4AbbrVarAsgnAsReturns
+    class A
+      def b
+        @c ||= 1
+      end
+    end
+  end
+  assert_equal 1, Syntax4AbbrVarAsgnAsReturns::A.new.b
+end
+
+assert('Splat and multiple assignment') do
+  *a = *[1,2,3]
+  b, *c = *[7,8,9]
+
+  assert_equal [1,2,3], a
+  assert_equal 7, b
+  assert_equal [8,9], c
+
+  (a, b), c = [1,2],3
+  assert_equal [1,2,3], [a,b,c]
+  (a, b), c = 1,2,3
+  assert_equal [1,nil,2], [a,b,c]
+end
+
+assert('Splat and multiple assignment from variable') do
+  a = [1, 2, 3]
+  b, *c = a
+
+  assert_equal 1, b
+  assert_equal [2, 3], c
+end
+
+assert('Splat and multiple assignment from variables') do
+  a = [1, 2, 3]
+  b = [4, 5, 6, 7]
+  c, d, *e, f, g = *a, *b
+
+  assert_equal 1, c
+  assert_equal 2, d
+  assert_equal [3, 4, 5], e
+  assert_equal 6, f
+  assert_equal 7, g
+end
+
+assert('Splat and multiple assignment in for') do
+  a = [1, 2, 3, 4, 5, 6, 7]
+  for b, c, *d, e, f in [a] do
+  end
+
+  assert_equal 1, b
+  assert_equal 2, c
+  assert_equal [3, 4, 5], d
+  assert_equal 6, e
+  assert_equal 7, f
+end
+
+assert('Splat without assignment') do
+  * = [0]
+  a, * = [1, 2]
+  assert_equal 1, a
+end
+
+assert('multiple assignment (rest)') do
+  *a = 0
+  assert_equal [0], a
+end
+
+assert('multiple assignment (rest+post)') do
+  *a, b = 0, 1, 2
+  *c, d = 3
+
+  assert_equal [0, 1], a
+  assert_equal 2, b
+  assert_equal [], c
+  assert_equal 3, d
+end
+
+assert('multiple assignment (nosplat array rhs)') do
+  a, *b = []
+  *c, d = [0]
+  e, *f, g = [1, 2]
+
+  assert_nil a
+  assert_equal [], b
+  assert_equal [], c
+  assert_equal 0, d
+  assert_equal 1, e
+  assert_equal [], f
+  assert_equal 2, g
+end
+
+assert('Return values of case statements') do
+  a = [] << case 1
+  when 3 then 2
+  when 2 then 2
+  when 1 then 2
+  end
+
+  b = [] << case 1
+  when 2 then 2
+  else
+  end
+
+  def fb
+    n = 0
+    Proc.new do
+      n += 1
+      case
+      when n % 15 == 0
+      else n
+      end
+    end
+  end
+
+  assert_equal [2], a
+  assert_equal [nil], b
+  assert_equal 1, fb.call
+end
+
+assert('Return values of if and case statements') do
+  true_clause_value =
+    if true
+      1
+    else
+      case 2
+      when 3
+      end
+      4
+    end
+
+  assert_equal 1, true_clause_value
+end
+
+assert('Return values of no expression case statement') do
+  when_value =
+    case
+    when true
+      1
+    end
+
+  assert_equal 1, when_value
+end
+
+assert('splat in case statement') do
+  values = [3,5,1,7,8]
+  testa = [1,2,7]
+  testb = [5,6]
+  resulta = []
+  resultb = []
+  resultc = []
+  values.each do |value|
+    case value
+    when *testa
+      resulta << value
+    when *testb
+      resultb << value
+    else
+      resultc << value
+    end
+  end
+
+  assert_equal [1,7], resulta
+  assert_equal [5], resultb
+  assert_equal [3,8], resultc
+end
+
+assert('External command execution.') do
+  class << Kernel
+    sym = '`'.to_sym
+    alias_method :old_cmd, sym
+
+    results = []
+    define_method(sym) do |str|
+      results.push str
+      str
+    end
+
+    `test` # NOVAL NODE_XSTR
+    `test dynamic #{sym}` # NOVAL NODE_DXSTR
+    assert_equal ['test', 'test dynamic `'], results
+
+    t = `test` # VAL NODE_XSTR
+    assert_equal 'test', t
+    assert_equal ['test', 'test dynamic `', 'test'], results
+
+    t = `test dynamic #{sym}` # VAL NODE_DXSTR
+    assert_equal 'test dynamic `', t
+    assert_equal ['test', 'test dynamic `', 'test', 'test dynamic `'], results
+
+    alias_method sym, :old_cmd
+  end
+  true
+end
+
+assert('parenthesed do-block in cmdarg') do
+  class ParenDoBlockCmdArg
+    def test(block)
+      block.call
+    end
+  end
+  x = ParenDoBlockCmdArg.new
+  result = x.test (Proc.new do :ok; end)
+  assert_equal :ok, result
+end
+
+assert('method definition in cmdarg') do
+  if false
+    bar def foo; self.each do end end
+  end
+  true
+end
+
+assert('optional argument in the rhs default expressions') do
+  class OptArgInRHS
+    def foo
+      "method called"
+    end
+    def t(foo = foo)
+      foo
+    end
+    def t2(foo = foo())
+      foo
+    end
+  end
+  o = OptArgInRHS.new
+  assert_nil(o.t)
+  assert_equal("method called", o.t2)
+end
+
+assert('optional block argument in the rhs default expressions') do
+  assert_nil(Proc.new {|foo = foo| foo}.call)
+end
+
+assert('multiline comments work correctly') do
+=begin
+this is a comment with nothing after begin and end
+=end
+=begin  this is a comment 
+this is a comment with extra after =begin
+=end
+=begin
+this is a comment that has =end with spaces after it
+=end  
+=begin this is a comment
+this is a comment that has extra after =begin and =end with spaces after it
+=end  
+  line = __LINE__
+=begin	this is a comment
+this is a comment that has extra after =begin and =end with tabs after it
+=end	xxxxxxxxxxxxxxxxxxxxxxxxxx
+  assert_equal(line + 4, __LINE__)
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/true.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/true.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/true.rb	(revision 270)
@@ -0,0 +1,31 @@
+##
+# TrueClass ISO Test
+
+assert('TrueClass', '15.2.5') do
+  assert_equal Class, TrueClass.class
+end
+
+assert('TrueClass true', '15.2.5.1') do
+  assert_true true
+  assert_equal TrueClass, true.class
+  assert_false TrueClass.method_defined? :new
+end
+
+assert('TrueClass#&', '15.2.5.3.1') do
+  assert_true true.&(true)
+  assert_false true.&(false)
+end
+
+assert('TrueClass#^', '15.2.5.3.2') do
+  assert_false true.^(true)
+  assert_true true.^(false)
+end
+
+assert('TrueClass#to_s', '15.2.5.3.3') do
+  assert_equal 'true', true.to_s
+end
+
+assert('TrueClass#|', '15.2.5.3.4') do
+  assert_true true.|(true)
+  assert_true true.|(false)
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/typeerror.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/typeerror.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/typeerror.rb	(revision 270)
@@ -0,0 +1,6 @@
+##
+# TypeError ISO Test
+
+assert('TypeError', '15.2.29') do
+  assert_equal Class, TypeError.class
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/test/t/unicode.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/test/t/unicode.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/test/t/unicode.rb	(revision 270)
@@ -0,0 +1,35 @@
+# Test of the \u notation
+
+assert('bare \u notation test') do
+  # Mininum and maximum one byte characters
+  assert_equal("\u0000", "\x00")
+  assert_equal("\u007F", "\x7F")
+
+  # Mininum and maximum two byte characters
+  assert_equal("\u0080", "\xC2\x80")
+  assert_equal("\u07FF", "\xDF\xBF")
+
+  # Mininum and maximum three byte characters
+  assert_equal("\u0800", "\xE0\xA0\x80")
+  assert_equal("\uFFFF", "\xEF\xBF\xBF")
+
+  # Four byte characters require the \U notation
+end
+
+assert('braced \u notation test') do
+  # Mininum and maximum one byte characters
+  assert_equal("\u{0000}", "\x00")
+  assert_equal("\u{007F}", "\x7F")
+
+  # Mininum and maximum two byte characters
+  assert_equal("\u{0080}", "\xC2\x80")
+  assert_equal("\u{07FF}", "\xDF\xBF")
+
+  # Mininum and maximum three byte characters
+  assert_equal("\u{0800}", "\xE0\xA0\x80")
+  assert_equal("\u{FFFF}", "\xEF\xBF\xBF")
+
+  # Mininum and maximum four byte characters
+  assert_equal("\u{10000}",  "\xF0\x90\x80\x80")
+  assert_equal("\u{10FFFF}", "\xF4\x8F\xBF\xBF")
+end
Index: EcnlProtoTool/trunk/mruby-1.2.0/travis_config.rb
===================================================================
--- EcnlProtoTool/trunk/mruby-1.2.0/travis_config.rb	(revision 270)
+++ EcnlProtoTool/trunk/mruby-1.2.0/travis_config.rb	(revision 270)
@@ -0,0 +1,53 @@
+MRuby::Build.new('debug') do |conf|
+  toolchain :gcc
+  enable_debug
+
+  # include all core GEMs
+  conf.gembox 'full-core'
+  conf.cc.flags += %w(-Werror=declaration-after-statement)
+  conf.compilers.each do |c|
+    c.defines += %w(MRB_GC_STRESS MRB_GC_FIXED_ARENA)
+  end
+
+  build_mrbc_exec
+end
+
+MRuby::Build.new('full-debug') do |conf|
+  toolchain :gcc
+  enable_debug
+
+  # include all core GEMs
+  conf.gembox 'full-core'
+  conf.cc.defines = %w(MRB_ENABLE_DEBUG_HOOK)
+
+  conf.enable_test
+end
+
+MRuby::Build.new do |conf|
+  toolchain :gcc
+
+  # include all core GEMs
+  conf.gembox 'full-core'
+  conf.cc.flags += %w(-Werror=declaration-after-statement)
+  conf.compilers.each do |c|
+    c.defines += %w(MRB_GC_FIXED_ARENA)
+  end
+  conf.enable_bintest
+  conf.enable_test
+end
+
+MRuby::Build.new('cxx_abi') do |conf|
+  toolchain :gcc
+
+  conf.gembox 'full-core'
+  conf.cc.flags += %w(-Werror=declaration-after-statement)
+  conf.compilers.each do |c|
+    c.defines += %w(MRB_GC_FIXED_ARENA)
+  end
+  conf.enable_bintest
+  conf.enable_test
+
+  enable_cxx_abi
+
+  build_mrbc_exec
+end
Index: EcnlProtoTool/trunk/prototool/.Debuglinker
===================================================================
--- EcnlProtoTool/trunk/prototool/.Debuglinker	(revision 270)
+++ EcnlProtoTool/trunk/prototool/.Debuglinker	(revision 270)
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="ASCII"?>
+<com.renesas.linkersection.model:SectionContainer xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:com.renesas.linkersection.model="http:///LinkerSection.ecore">
+  <sections name=".fvectors" isKeep="true">
+    <sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="537001984"/>
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".fvectors"/>
+  </sections>
+  <sections name=".text">
+    <sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="537002240"/>
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".text"/>
+  </sections>
+  <sections name=".rvectors" isKeep="true">
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.1"/>
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_rvectors_start"/>
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".rvectors"/>
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_rvectors_end"/>
+  </sections>
+  <sections name=".init">
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.2"/>
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".init"/>
+    <contents xsi:type="com.renesas.linkersection.model:Keyword" text="PROVIDE_HIDDEN (__exidx_start = .)"/>
+    <contents xsi:type="com.renesas.linkersection.model:Keyword" text="PROVIDE_HIDDEN (__exidx_end = .)"/>
+  </sections>
+  <sections name=".fini">
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.3"/>
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".fini"/>
+  </sections>
+  <sections name=".got">
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.4"/>
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".got"/>
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".got.plt"/>
+  </sections>
+  <sections name=".rodata">
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.5"/>
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".rodata"/>
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".rodata.*"/>
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_erodata"/>
+  </sections>
+  <sections name=".eh_frame_hdr">
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.6"/>
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".eh_frame_hdr"/>
+  </sections>
+  <sections name=".eh_frame">
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.7"/>
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".eh_frame"/>
+  </sections>
+  <sections name=".jcr">
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.8"/>
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".jcr"/>
+  </sections>
+  <sections name=".tors">
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.9"/>
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="__CTOR_LIST__"/>
+    <contents xsi:type="com.renesas.linkersection.model:Keyword" text=". = ALIGN(2)"/>
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="__ctors"/>
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".ctors"/>
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="__ctors_end"/>
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="__CTOR_END__"/>
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="__DTOR_LIST__"/>
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="___dtors"/>
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".dtors"/>
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="___dtors_end"/>
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="__DTOR_END__"/>
+    <contents xsi:type="com.renesas.linkersection.model:Keyword" text=". = ALIGN(2)"/>
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_mdata"/>
+  </sections>
+  <sections name=".data">
+    <sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="537264384"/>
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_data"/>
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".data"/>
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_edata"/>
+    <reservedMemAddress xsi:type="com.renesas.linkersection.model:ReferencedLabelAddress" label="//@sections.10/@contents.12"/>
+  </sections>
+  <sections name=".bss">
+    <sectionAddress xsi:type="com.renesas.linkersection.model:ReferencedSectionAddress" referencedSection="//@sections.11"/>
+    <contents xsi:type="com.renesas.linkersection.model:Keyword" text="PROVIDE(__bss_start__ = .)"/>
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_bss"/>
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".bss"/>
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name=".bss.**"/>
+    <contents xsi:type="com.renesas.linkersection.model:WildCardExpression" specificSection="true" name="COMMON"/>
+    <contents xsi:type="com.renesas.linkersection.model:Keyword" text="PROVIDE(__bss_end__ = .)"/>
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_ebss"/>
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_end"/>
+    <contents xsi:type="com.renesas.linkersection.model:Keyword" text="PROVIDE(end = .)"/>
+  </sections>
+  <sections name=".stack" isNoLoad="true">
+    <sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="537268480"/>
+    <contents xsi:type="com.renesas.linkersection.model:Label" rhs="= .;" lhs="_stack"/>
+  </sections>
+</com.renesas.linkersection.model:SectionContainer>
Index: EcnlProtoTool/trunk/prototool/.cproject
===================================================================
--- EcnlProtoTool/trunk/prototool/.cproject	(revision 270)
+++ EcnlProtoTool/trunk/prototool/.cproject	(revision 270)
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+	<storageModule moduleId="org.eclipse.cdt.core.settings">
+		<cconfiguration id="com.renesas.cdt.rz.debug.win32.configuration.Id.1970447541">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.renesas.cdt.rz.debug.win32.configuration.Id.1970447541" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+				<externalSettings/>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="prototool" buildArtefactType="com.renesas.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=com.renesas.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf *.lst *.lis *.lpp *.map libgcc.a" description="" id="com.renesas.cdt.rz.debug.win32.configuration.Id.1970447541" name="Debug" parent="com.renesas.cdt.rz.debug.win32.configuration.Id">
+					<folderInfo id="com.renesas.cdt.rz.debug.win32.configuration.Id.1970447541." name="/" resourcePath="">
+						<toolChain id="com.renesas.cdt.rz.debug.win32.toolchain.Id.1907999695" name="KPIT GNUARM-NONE-EABI Toolchain" superClass="com.renesas.cdt.rz.debug.win32.toolchain.Id">
+							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE" id="com.renesas.cdt.rz.debug.win32.targetplatform.Id.408835336" name="Target Platform" osList="all" superClass="com.renesas.cdt.rz.debug.win32.targetplatform.Id"/>
+							<builder buildPath="${workspace_loc:/prototool}/Debug" id="com.renesas.cdt.rz.debug.win32.builder.Id.947208893" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Builder" superClass="com.renesas.cdt.rz.debug.win32.builder.Id"/>
+							<tool id="com.renesas.cdt.rz.debug.win32.tool.libgen.Id.763747626" name="Library Generator" superClass="com.renesas.cdt.rz.debug.win32.tool.libgen.Id">
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.ctype.1918511962" name="ctype.h : æå­ãæ±ããã§ãã¯ãã¾ã" superClass="com.renesas.cdt.core.LibraryGenerator.option.ctype" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.math.157552822" name="math.h : ä¸è§é¢æ°ãªã©æ°å¤ã®è¨ç®ãè¡ãã¾ã" superClass="com.renesas.cdt.core.LibraryGenerator.option.math" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.stdio.973427400" name="stdio.h : å
+¥å/åºåãè¡ãã¾ã" superClass="com.renesas.cdt.core.LibraryGenerator.option.stdio" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.stdlib.1344168669" name="stdlib.h : æ ¼ç´é åã®ç®¡çãªã© C ãã­ã°ã©ã ã®æ¨æºå¦çãè¡ãã¾ã" superClass="com.renesas.cdt.core.LibraryGenerator.option.stdlib" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.string.252926687" name="string.h : æå­åã®æ¯è¼ã¨ã³ãã¼ãè¡ãã¾ã" superClass="com.renesas.cdt.core.LibraryGenerator.option.string" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.selectLibrary.1454362058" name="ã©ã¤ãã©ãªã¼ã®é¸æ" superClass="com.renesas.cdt.core.LibraryGenerator.option.selectLibrary" value="com.renesas.core.LibraryGenerator.option.selectLibrary.newLib" valueType="enumerated"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.libraryType.1825440103" name="ã©ã¤ãã©ãªã¼å" superClass="com.renesas.cdt.core.LibraryGenerator.option.libraryType" value="com.renesas.cdt.core.LibraryGenerator.option.libraryType.projectBuilt" valueType="enumerated"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.misc9.838682729" name="åé¢æ°ããåºåãã¡ã¤ã«å
+ã®å¯¾å¿ããã»ã¯ã·ã§ã³ã«é
+ç½®ãã (-ffunction-sections)" superClass="com.renesas.cdt.core.LibraryGenerator.option.misc9" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.misc14.849083341" name="é¢æ°ã®ã¢ãã¬ã¹ãã¬ã¸ã¹ã¿ã¼ã«ç½®ããªã (-fno-function-cse)" superClass="com.renesas.cdt.core.LibraryGenerator.option.misc14" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.misc36.2135621817" name="Parse the whole compilation unit before starting to produce code ( -funit-at-a-time)" superClass="com.renesas.cdt.core.LibraryGenerator.option.misc36" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.misc10.1922562819" name="åãã¼ã¿ããåºåãã¡ã¤ã«å
+ã®å¯¾å¿ããã»ã¯ã·ã§ã³ã«é
+ç½®ãã (-fdata-sections)" superClass="com.renesas.cdt.core.LibraryGenerator.option.misc10" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.core.LibraryGenerator.option.misc37.304831421" name="Align branch targets to a power-of-two boundary (-falign-jumps)" superClass="com.renesas.cdt.core.LibraryGenerator.option.misc37" value="true" valueType="boolean"/>
+							</tool>
+							<tool id="com.renesas.cdt.rz.debug.win32.tool.compiler.Id.1253383679" name="Compiler" superClass="com.renesas.cdt.rz.debug.win32.tool.compiler.Id">
+								<option defaultValue="true" id="com.renesas.cdt.core.Compiler.option.misc2.456149237" name="æ¨æºã·ã¹ãã ã»ãã£ã¬ã¯ããªã¼ã§ãããã¼ã»ãã¡ã¤ã«ãæ¤ç´¢ããªã (-nostdinc)" superClass="com.renesas.cdt.core.Compiler.option.misc2" value="false" valueType="boolean"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.architecture.276423772" name="ã¢ã¼ã­ãã¯ãã£ã¼" superClass="com.renesas.cdt.rz.Debug.Compiler.option.architecture" value="com.renesas.cdt.rz.Debug.Compiler.option.architecture.armv7a" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.cpuType.309771844" name="CPU ã¿ã¤ã" superClass="com.renesas.cdt.rz.Debug.Compiler.option.cpuType" value="com.renesas.cdt.rz.Debug.Compiler.option.cpuType.rza" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.dataEndian.420621560" name="ã¨ã³ãã£ã¢ã³" superClass="com.renesas.cdt.rz.Debug.Compiler.option.dataEndian" value="com.renesas.cdt.rz.Debug.Compiler.option.dataEndian.little" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.instructionset.1949489138" name="å½ä»¤ã»ãã" superClass="com.renesas.cdt.rz.Debug.Compiler.option.instructionset" value="com.renesas.cdt.rz.Debug.Compiler.option.instructionset.arm" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.interworking.1659726822" name="ã¤ã³ã¿ã¼ã»ã¯ã¼ã­ã³ã° (-mthumb-interwork)" superClass="com.renesas.cdt.rz.Debug.Compiler.option.interworking" value="true" valueType="boolean"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.targetfpu.1301959251" name="ã¿ã¼ã²ãã FPU (-mfpu)" superClass="com.renesas.cdt.rz.Debug.Compiler.option.targetfpu" value="com.renesas.cdt.rz.Debug.Compiler.option.targetfpu.vfp" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Compiler.option.floatingpointabi.311785603" name="æµ®åå°æ°ç¹ ABI (-mfloat-abi=name)" superClass="com.renesas.cdt.rz.Debug.Compiler.option.floatingpointabi" value="com.renesas.cdt.rz.Debug.Compiler.option.floatingpointabi.soft" valueType="enumerated"/>
+								<option id="com.renesas.cdt.core.Compiler.option.warnStackSize.1468097781" name="Warn if stack size exceeds the limit (-Wstack-usage) (H')" superClass="com.renesas.cdt.core.Compiler.option.warnStackSize" value="100" valueType="string"/>
+								<option id="com.renesas.cdt.core.Compiler.option.CPUSeries.1305202887" name="CPU ã·ãªã¼ãº" superClass="com.renesas.cdt.core.Compiler.option.CPUSeries" value="RZ/A" valueType="string"/>
+								<option id="com.renesas.cdt.core.Compiler.option.device.2055189613" name="Device" superClass="com.renesas.cdt.core.Compiler.option.device" value="R7S721001" valueType="string"/>
+								<option id="com.renesas.cdt.core.Compiler.option.deviceShortName.470114009" name="DeviceShortName" superClass="com.renesas.cdt.core.Compiler.option.deviceShortName" value="R7S721001" valueType="string"/>
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.rz.Debug.Compiler.option.macroDefines.1916097340" name="ãã¯ã­å®ç¾©" superClass="com.renesas.cdt.rz.Debug.Compiler.option.macroDefines" valueType="definedSymbols">
+									<listOptionValue builtIn="false" value="SIMULATOR_DEBUG"/>
+									<listOptionValue builtIn="false" value="CPPAPP"/>
+									<listOptionValue builtIn="false" value="TOPPERS_EXECUTE_ON_ROM"/>
+									<listOptionValue builtIn="false" value="__TARGET_ARCH_ARM=7"/>
+									<listOptionValue builtIn="false" value="TARGET_RZ_A1H"/>
+									<listOptionValue builtIn="false" value="TARGET_MBRZA1H"/>
+									<listOptionValue builtIn="false" value="TOOLCHAIN_GCC_ARM"/>
+									<listOptionValue builtIn="false" value="TOOLCHAIN_GCC"/>
+									<listOptionValue builtIn="false" value="TARGET_CORTEX_A"/>
+									<listOptionValue builtIn="false" value="MBED_BUILD_TIMESTAMP=1460441486.52"/>
+									<listOptionValue builtIn="false" value="TARGET_RENESAS"/>
+									<listOptionValue builtIn="false" value="__FPU_PRESENT"/>
+									<listOptionValue builtIn="false" value="TARGET_KERNEL_ASP"/>
+									<listOptionValue builtIn="false" value="SUPPORT_INET4"/>
+									<listOptionValue builtIn="false" value="SUPPORT_ETHER"/>
+									<listOptionValue builtIn="false" value="SUPPORT_TCP"/>
+									<listOptionValue builtIn="false" value="SUPPORT_UDP"/>
+								</option>
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.core.Compiler.option.includeFileDir.926492212" name="ã¤ã³ã¯ã«ã¼ãã»ãã¡ã¤ã«ã»ãã£ã¬ã¯ããªã¼" superClass="com.renesas.cdt.core.Compiler.option.includeFileDir" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/include}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/target/gr_peach_gcc}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/arch/arm_gcc/rza1}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/arch/arm_gcc/common}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/arch/gcc}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/mbed/api}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/mbed/hal}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/mbed/targets/cmsis}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/inc/iodefines}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/TARGET_MBED_MBRZA1H}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/mruby-1.2.0/include}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/prototool/src}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/tinet/netdev/if_mbed}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/tinet}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/asp3_dcre/tecs_kernel}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/prototool/Debug}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/prototool/Debug/gen}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../webserver&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../gr_peach&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/mrbgems/gr_peach/src}&quot;"/>
+								</option>
+								<inputType id="%Base.Compiler.C.InputType.Id.312108612" name="C å
+¥å" superClass="%Base.Compiler.C.InputType.Id"/>
+								<inputType id="Base.Compiler.CPP.InputType.Id.978811450" name="C++ å
+¥å" superClass="Base.Compiler.CPP.InputType.Id"/>
+							</tool>
+							<tool id="com.renesas.cdt.rz.debug.win32.tool.assembler.Id.1960517010" name="Assembler" superClass="com.renesas.cdt.rz.debug.win32.tool.assembler.Id">
+								<option id="com.renesas.cdt.rz.Debug.Assembler.option.architecture.21595859" name="ã¢ã¼ã­ãã¯ãã£ã¼" superClass="com.renesas.cdt.rz.Debug.Assembler.option.architecture" value="com.renesas.cdt.rz.Debug.Assembler.option.architecture.armv7a" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Assembler.option.cpuType.1757814314" name="CPU ã¿ã¤ã" superClass="com.renesas.cdt.rz.Debug.Assembler.option.cpuType" value="com.renesas.cdt.rz.Debug.Assembler.option.cpuType.rza" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Assembler.option.dataEndian.862194071" name="ã¨ã³ãã£ã¢ã³" superClass="com.renesas.cdt.rz.Debug.Assembler.option.dataEndian" value="com.renesas.cdt.rz.Debug.Assembler.option.dataEndian.little" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Assembler.option.instructionset.965973474" name="å½ä»¤ã»ãã" superClass="com.renesas.cdt.rz.Debug.Assembler.option.instructionset" value="com.renesas.cdt.rz.Debug.Assembler.option.instructionset.arm" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Assembler.option.targetfpu.2092155258" name="ã¿ã¼ã²ãã FPU (-mfpu)" superClass="com.renesas.cdt.rz.Debug.Assembler.option.targetfpu" value="com.renesas.cdt.rz.Debug.Assembler.option.targetfpu.vfp" valueType="enumerated"/>
+								<option id="com.renesas.cdt.rz.Debug.Assembler.option.floatingpointabi.534133882" name="æµ®åå°æ°ç¹ ABI (-mfloat-abi=name)" superClass="com.renesas.cdt.rz.Debug.Assembler.option.floatingpointabi" value="com.renesas.cdt.rz.Debug.Assembler.option.floatingpointabi.soft" valueType="enumerated"/>
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.core.Assembler.option.includeFileDirectories.1217360429" name="ã¤ã³ã¯ã«ã¼ãã»ãã¡ã¤ã«ã»ãã£ã¬ã¯ããªã¼" superClass="com.renesas.cdt.core.Assembler.option.includeFileDirectories" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/src&quot;"/>
+								</option>
+								<inputType id="%Base.Assembler.inputType.Id.100478517" name="ã¢ã»ã³ãã©ã¼å
+¥åã¿ã¤ã" superClass="%Base.Assembler.inputType.Id"/>
+							</tool>
+							<tool id="com.renesas.cdt.rz.debug.win32.tool.linker.Id.1641698267" name="Linker" superClass="com.renesas.cdt.rz.debug.win32.tool.linker.Id">
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.rz.Debug.Linker.option.archiveSearchDirectories.933303826" name="ã¢ã¼ã«ã¤ãæ¤ç´¢ãã£ã¬ã¯ããªã¼" superClass="com.renesas.cdt.rz.Debug.Linker.option.archiveSearchDirectories" valueType="stringList">
+									<listOptionValue builtIn="false" value="&quot;${CONFIGDIR}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${TCINSTALL}/lib/gcc/arm-none-eabi/${GCC_VERSION}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${TCINSTALL}/arm-none-eabi/lib&quot;"/>
+								</option>
+								<option id="com.renesas.cdt.rz.Debug.Linker.option.dataEndian.1743607303" name="ã¨ã³ãã£ã¢ã³" superClass="com.renesas.cdt.rz.Debug.Linker.option.dataEndian" value="com.renesas.cdt.rz.Debug.Linker.option.dataEndian.little" valueType="enumerated"/>
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.rz.Debug.Linker.option.archiveLibraryFiles.1697871089" name="ã¢ã¼ã«ã¤ã ( ã©ã¤ãã©ãªã¼ ) ãã¡ã¤ã«" superClass="com.renesas.cdt.rz.Debug.Linker.option.archiveLibraryFiles" valueType="stringList">
+									<listOptionValue builtIn="false" value="${BuildArtifactFileBaseName}"/>
+									<listOptionValue builtIn="false" value="gcc"/>
+									<listOptionValue builtIn="false" value="stdc++"/>
+								</option>
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.core.Linker.option.userDefinedOptions.1395686154" name="ã¦ã¼ã¶ã¼å®ç¾©ãªãã·ã§ã³" superClass="com.renesas.cdt.core.Linker.option.userDefinedOptions" valueType="stringList">
+									<listOptionValue builtIn="false" value="-e_PowerON_Reset"/>
+								</option>
+								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.core.Linker.option.linkOrderList.1409322238" name="" superClass="com.renesas.cdt.core.Linker.option.linkOrderList" valueType="stringList">
+									<listOptionValue builtIn="false" value="&quot;.\src\interrupt_handlers.o&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;.\src\prototool.o&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;.\src\vector_table.o&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;.\libprototool.a&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;.\src\hardware_setup.o&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;.\src\reset_program.o&quot;"/>
+								</option>
+							</tool>
+							<tool id="com.renesas.cdt.rz.debug.win32.tool.objcopy.Id.1528478689" name="Objcopy" superClass="com.renesas.cdt.rz.debug.win32.tool.objcopy.Id"/>
+						</toolChain>
+					</folderInfo>
+					<sourceEntries>
+						<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+					</sourceEntries>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+	</storageModule>
+	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+		<project id="prototool.com.renesas.cdt.rz.projectType.win32.Id.1802081777" name="Executable (Renesas)" projectType="com.renesas.cdt.rz.projectType.win32.Id"/>
+	</storageModule>
+	<storageModule moduleId="scannerConfiguration">
+		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+	</storageModule>
+	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+	<storageModule moduleId="refreshScope" versionNumber="2">
+		<configuration configurationName="Debug">
+			<resource resourceType="PROJECT" workspacePath="/prototool"/>
+		</configuration>
+	</storageModule>
+</cproject>
Index: EcnlProtoTool/trunk/prototool/.info
===================================================================
--- EcnlProtoTool/trunk/prototool/.info	(revision 270)
+++ EcnlProtoTool/trunk/prototool/.info	(revision 270)
@@ -0,0 +1,7 @@
+TOOL_CHAIN=KPIT GNUARM-NONE-EABI Toolchain
+VERSION=v16.01
+TC_INSTALL=C:\Program Files (x86)\KPIT\GNUARM-NONEv16.01-EABI\arm-none-eabi\arm-none-eabi\
+GCC_STRING=5.2-GNUARM-NONE_v16.01
+VERSION_IDE=
+E2STUDIO_VERSION=5.3.0.023
+ACTIVE_CONFIGURATION=Debug
Index: EcnlProtoTool/trunk/prototool/.project
===================================================================
--- EcnlProtoTool/trunk/prototool/.project	(revision 270)
+++ EcnlProtoTool/trunk/prototool/.project	(revision 270)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>prototool</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.renesas.cdt.core.genmakebuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.cdt.core.cnature</nature>
+		<nature>com.renesas.cdt.core.kpitccnature</nature>
+		<nature>com.renesas.cdt.core.kpitcnature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+	</natures>
+</projectDescription>
Index: EcnlProtoTool/trunk/prototool/.settings/Dependency_Scan_Preferences.prefs
===================================================================
--- EcnlProtoTool/trunk/prototool/.settings/Dependency_Scan_Preferences.prefs	(revision 270)
+++ EcnlProtoTool/trunk/prototool/.settings/Dependency_Scan_Preferences.prefs	(revision 270)
@@ -0,0 +1,4 @@
+Build\ project\ excluding\ the\ dependencies=false
+Re-generate\ and\ use\ dependencies\ during\ project\ build=true
+Use\ existing\ dependencies\ during\ project\ build=false
+eclipse.preferences.version=1
Index: EcnlProtoTool/trunk/prototool/.settings/Project_Generation_Prefrences.prefs
===================================================================
--- EcnlProtoTool/trunk/prototool/.settings/Project_Generation_Prefrences.prefs	(revision 270)
+++ EcnlProtoTool/trunk/prototool/.settings/Project_Generation_Prefrences.prefs	(revision 270)
@@ -0,0 +1,26 @@
+Library\ Generator\ Command=arm-none-eabi-libgen
+com.renesas.cdt.core.Assembler.option.includeFileDirectories="${workspace_loc\:/${ProjName}}/src";
+com.renesas.cdt.core.Compiler.option.CPUSeries=RZ/A
+com.renesas.cdt.core.Compiler.option.warnStackSize=100
+com.renesas.cdt.core.LibraryGenerator.option.ctype=true
+com.renesas.cdt.core.LibraryGenerator.option.libraryType=Project-Built
+com.renesas.cdt.core.LibraryGenerator.option.math=true
+com.renesas.cdt.core.LibraryGenerator.option.selectLibrary=Newlib
+com.renesas.cdt.core.LibraryGenerator.option.stdio=true
+com.renesas.cdt.core.LibraryGenerator.option.stdlib=true
+com.renesas.cdt.core.LibraryGenerator.option.string=true
+com.renesas.cdt.core.Linker.option.userDefinedOptions=;
+com.renesas.cdt.rz.Debug.Assembler.option.architecture=armv7-a
+com.renesas.cdt.rz.Debug.Assembler.option.cpuType=cortex-a9
+com.renesas.cdt.rz.Debug.Compiler.option.architecture=armv7-a
+com.renesas.cdt.rz.Debug.Compiler.option.cpuType=cortex-a9
+com.renesas.cdt.rz.Debug.Compiler.option.cpuType.309771844=cortex-a9
+com.renesas.cdt.rz.Debug.Compiler.option.dataEndian=Little-endian
+com.renesas.cdt.rz.Debug.Compiler.option.floatingpointabi=Soft
+com.renesas.cdt.rz.Debug.Compiler.option.instructionset=ARM
+com.renesas.cdt.rz.Debug.Compiler.option.interworking=true
+com.renesas.cdt.rz.Debug.Compiler.option.macroDefines=SIMULATOR_DEBUG;CPPAPP;
+com.renesas.cdt.rz.Debug.Compiler.option.targetfpu=vfp
+com.renesas.cdt.rz.Debug.Linker.option.archiveLibraryFiles=${BuildArtifactFileBaseName};gcc;stdc++;
+com.renesas.cdt.rz.Debug.Linker.option.archiveSearchDirectories.933303826="${CONFIGDIR}";"${TCINSTALL}/lib/gcc/arm-none-eabi/${GCC_VERSION}";"${TCINSTALL}/arm-none-eabi/lib";
+eclipse.preferences.version=1
Index: EcnlProtoTool/trunk/prototool/.settings/org.eclipse.cdt.core.prefs
===================================================================
--- EcnlProtoTool/trunk/prototool/.settings/org.eclipse.cdt.core.prefs	(revision 270)
+++ EcnlProtoTool/trunk/prototool/.settings/org.eclipse.cdt.core.prefs	(revision 270)
@@ -0,0 +1,6 @@
+eclipse.preferences.version=1
+environment/project/com.renesas.cdt.rz.debug.win32.configuration.Id.1970447541/PATH/delimiter=;
+environment/project/com.renesas.cdt.rz.debug.win32.configuration.Id.1970447541/PATH/operation=replace
+environment/project/com.renesas.cdt.rz.debug.win32.configuration.Id.1970447541/PATH/value=C\:\\PROGRA~2\\KPIT\\GNUARM~2.01-\\ARM-NO~1\\ARM-NO~1\\bin;C\:\\PROGRA~2\\KPIT\\GNUARM~2.01-\\ARM-NO~1\\ARM-NO~1\\arm-none-eabi\\bin;C\:\\PROGRA~2\\KPIT\\GNUARM~2.01-\\ARM-NO~1\\ARM-NO~1\\libexec\\gcc\\arm-none-eabi\\5.2-GNUARM-NONE_v16.01;C\:/Renesas/e2_studio/Utilities;C\:/Renesas/e2_studio/eclipse//features/com.renesas.jre.win32.win32.x86_1.8.0.65/jre/bin/client;C\:/Renesas/e2_studio/eclipse//features/com.renesas.jre.win32.win32.x86_1.8.0.65/jre/bin;C\:/Renesas/e2_studio/eclipse//features/com.renesas.jre.win32.win32.x86_1.8.0.65/jre/lib/i386;C\:\\ProgramData\\Oracle\\Java\\javapath;C\:\\Program Files\\Common Files\\Microsoft Shared\\Microsoft Online Services;C\:\\Program Files (x86)\\Common Files\\Microsoft Shared\\Microsoft Online Services;C\:\\Program Files\\Common Files\\Microsoft Shared\\Windows Live;C\:\\Program Files (x86)\\Common Files\\Microsoft Shared\\Windows Live;C\:\\Program Files (x86)\\Intel\\iCLS Client\\;C\:\\Program Files\\Intel\\iCLS Client\\;C\:\\Windows\\system32;C\:\\Windows;C\:\\Windows\\System32\\Wbem;C\:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C\:\\Program Files (x86)\\Intel\\OpenCL SDK\\2.0\\bin\\x86;C\:\\Program Files (x86)\\Intel\\OpenCL SDK\\2.0\\bin\\x64;C\:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C\:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C\:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C\:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C\:\\Program Files\\Common Files\\Lenovo;C\:\\Program Files (x86)\\Windows Live\\Shared;C\:\\Program Files (x86)\\Symantec\\VIP Access Client\\;C\:\\SWTOOLS\\ReadyApps;C\:\\Program Files (x86)\\Common Files\\Lenovo;C\:\\Program Files (x86)\\Microsoft ASP.NET\\ASP.NET Web Pages\\v1.0\\;C\:\\Program Files\\Microsoft SQL Server\\110\\Tools\\Binn\\;C\:\\Program Files (x86)\\GitExtensions\\;C\:\\Program Files\\gs\\gs9.18\\bin;C\:\\Program Files\\gs\\gs9.18\\lib;C\:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C\:\\Program Files\\Microsoft SQL Server\\120\\Tools\\Binn\\;C\:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\;C\:\\Program Files (x86)\\Skype\\Phone\\;C\:\\Program Files\\Microsoft\\Web Platform Installer\\;C\:\\Program Files (x86)\\nodejs\\;C\:\\Program Files\\Git\\cmd;C\:\\Program Files\\dotnet\\;C\:\\Program Files\\TortoiseSVN\\bin;C\:\\Program Files (x86)\\GNU Tools ARM Embedded\\4.9 2015q3\\bin;C\:\\Ruby23-x64\\bin;C\:\\Users\\nagasima\\.dnx\\bin;C\:\\Users\\nagasima\\AppData\\Roaming\\npm;C\:\\Renesas\\e2_studio\\eclipse;${workspace_loc}/tools/bin
+environment/project/com.renesas.cdt.rz.debug.win32.configuration.Id.1970447541/append=true
+environment/project/com.renesas.cdt.rz.debug.win32.configuration.Id.1970447541/appendContributed=true
Index: EcnlProtoTool/trunk/prototool/Debug/Makefile
===================================================================
--- EcnlProtoTool/trunk/prototool/Debug/Makefile	(revision 270)
+++ EcnlProtoTool/trunk/prototool/Debug/Makefile	(revision 270)
@@ -0,0 +1,631 @@
+#
+#  TOPPERS/ASP Kernel
+#      Toyohashi Open Platform for Embedded Real-Time Systems/
+#      Advanced Standard Profile Kernel
+# 
+#  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+# 
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+# 
+#  $Id: Makefile 735 2016-04-03 14:11:07Z ertl-hiro $
+# 
+
+#
+#  ã¿ã¼ã²ããã®æå®ï¼Makefile.targetã§ä¸æ¸ããããã®ãé²ãããï¼
+#
+all:
+
+#
+#  ã¿ã¼ã²ããç¥ç§°ã®å®ç¾©
+#
+TARGET = gr_peach_gcc
+
+#
+#  ãã­ã°ã©ãã³ã°è¨èªã®å®ç¾©
+#
+SRCLANG = c
+ifeq ($(SRCLANG),c)
+	LIBS = -lmruby -lm -lc
+endif
+ifeq ($(SRCLANG),c++)
+	USE_CXX = true
+	CXXLIBS = -lstdc++ -lm -lc
+	CXXRTS = cxxrt.o newlibrt.o
+endif
+
+#
+#  ã½ã¼ã¹ãã¡ã¤ã«ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+SRCDIR = ../../../asp3_dcre
+
+#
+#  ãªãã¸ã§ã¯ããã¡ã¤ã«åã®æ¡å¼µå­ã®è¨­å®
+#
+OBJEXT = elf
+
+#
+#  ã«ã¼ãã«ã©ã¤ãã©ãªï¼libkernel.aï¼ã®ãã£ã¬ã¯ããªå
+#  ï¼ã«ã¼ãã«ã©ã¤ãã©ãªãmakeå¯¾è±¡ã«ããæã¯ï¼ç©ºã«å®ç¾©ããï¼
+#
+KERNEL_LIB = ../../../asp3_dcre/Debug
+
+#
+#  ã«ã¼ãã«ãé¢æ°åä½ã§ã³ã³ãã¤ã«ãããã©ããã®å®ç¾©
+#
+KERNEL_FUNCOBJS = 
+
+#
+#  TECSãå¤ããã©ããã®å®ç¾©
+#
+OMIT_TECS = 
+
+#
+#  ãã¬ã¼ã¹ã­ã°ãåå¾ãããã©ããã®å®ç¾©
+#
+ENABLE_TRACE = 
+
+#
+#  éçºãã¼ã«ï¼ã³ã³ãã¤ã©ç­ï¼ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+DEVTOOLDIR = 
+
+#
+#  ã¦ã¼ãã£ãªãã£ãã­ã°ã©ã ã®åç§°
+#
+CFG = ruby -Eutf-8 $(SRCDIR)/cfg/cfg.rb
+TECSGEN = ruby -Eutf-8 $(SRCDIR)/tecsgen/tecsgen.rb
+
+#
+#  ãªãã¸ã§ã¯ããã¡ã¤ã«åã®å®ç¾©
+#
+OBJNAME = prototool
+ifdef OBJEXT
+	OBJFILE = $(OBJNAME).$(OBJEXT)
+	CFG1_OUT = cfg1_out.$(OBJEXT)
+else
+	OBJFILE = $(OBJNAME)
+	CFG1_OUT = cfg1_out
+endif
+
+#
+#  ä¾å­é¢ä¿ãã¡ã¤ã«ãç½®ããã£ã¬ã¯ããªã®å®ç¾©
+#
+DEPDIR = deps
+
+#
+#  ã¿ã¼ã²ããä¾å­é¨ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+TARGETDIR = $(SRCDIR)/target/$(TARGET)
+
+#
+#  ã¿ã¼ã²ããä¾å­ã®å®ç¾©ã®ã¤ã³ã¯ã«ã¼ã
+#
+include $(TARGETDIR)/Makefile.target
+
+#
+#  TECSçæãã¡ã¤ã«ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+TECSGENDIR = ./gen
+ifndef OMIT_TECS
+	TECSGEN_TIMESTAMP = $(TECSGENDIR)/tecsgen.timestamp
+	INIT_TECS_COBJ = init_tecs.o
+endif
+
+#
+#  TECSãçæããå®ç¾©ã®ã¤ã³ã¯ã«ã¼ã
+#
+ifndef OMIT_TECS
+	GEN_DIR = $(TECSGENDIR)
+	-include $(TECSGENDIR)/Makefile.tecsgen
+endif
+
+#
+#  mbedãµã¼ãã¹ã®å®ç¾©
+#
+
+include $(SRCDIR)/mbed/Makefile.mbed
+
+#
+#  å
+±éã³ã³ãã¤ã«ãªãã·ã§ã³ã®å®ç¾©
+#
+COPTS := -g -std=gnu99 $(COPTS)
+ifndef OMIT_WARNING_ALL
+	COPTS := -Wall $(COPTS)
+endif
+ifndef OMIT_OPTIMIZATION
+	COPTS := -Og $(COPTS)
+endif
+ifdef OMIT_TECS
+	CDEFS := -DTOPPERS_OMIT_TECS $(CDEFS)
+endif
+CDEFS := $(CDEFS) 
+INCLUDES := -I. -I$(SRCDIR)/include $(INCLUDES) -I../../../mruby-1.2.0/include -I$(SRCDIR)
+LDFLAGS := $(LDFLAGS) -L../../../mruby-1.2.0/build/arm-none-eabi/lib -Wl,-Map=$(OBJNAME).map,--cref
+LIBS := $(LIBS) $(CXXLIBS)
+CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
+
+#
+#  ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ã«é¢ããå®ç¾©
+#
+APPLNAME = prototool
+APPLDIRS = ../src ../../gr_peach ../../webserver
+APPL_CFG = main.cfg
+APPL_CDL = main.cdl
+
+APPL_DIRS := $(APPLDIRS) $(SRCDIR)/library
+APPL_ASMOBJS :=
+ifdef USE_CXX
+	APPL_CXXOBJS := main.o
+	APPL_COBJS := mruby_arduino.o ccsbcs.o main_rb.o base64.o http-strings.o http_parser.o httpd.o httpd-fs.o sha1.o websocket.o
+else
+	APPL_COBJS := main.o mruby_arduino.o ccsbcs.o main_rb.o base64.o http-strings.o http_parser.o httpd.o httpd-fs.o sha1.o websocket.o
+endif
+APPL_COBJS := $(APPL_COBJS) log_output.o vasyslog.o t_perror.o strerror.o
+APPL_CFLAGS := $(APPL_CFLAGS) -I../../../mrbgems/gr_peach/src
+ifdef APPLDIRS
+	INCLUDES := $(INCLUDES) $(foreach dir,$(APPLDIRS),-I$(dir))
+endif
+
+#
+#  ãããã¯ã¼ã¯ãµã¼ãã¹ã®å®ç¾©
+#
+
+NO_USE_TINET_LIBRARY = true
+
+#  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®é¸æãä½ããä¸ã¤é¸æããã
+
+NET_IF = ether
+
+#  ã¤ã¼ãµãããã»ãã£ãã¤ã¹ãã©ã¤ãã®é¸æ
+
+NET_DEV = if_mbed
+
+#  ãããã¯ã¼ã¯å±¤ã®é¸æ
+
+#SUPPORT_INET6 = true
+SUPPORT_INET4 = true
+
+#  API ã«çµè¾¼ãæ©è½ã®é¸æ
+
+#API_CFG_IP4MAPPED_ADDR = true
+
+#  ãã©ã³ã¹ãã¼ãå±¤ã®é¸æ
+
+SUPPORT_TCP = true
+SUPPORT_UDP = true
+
+#
+#  ã·ã¹ãã ãµã¼ãã¹ã® Makefile ã®ã¤ã³ã¯ã«ã¼ã
+#
+include $(SRCDIR)/tinet/Makefile.tinet
+
+#
+#  ã·ã¹ãã ãµã¼ãã¹ã«é¢ããå®ç¾©
+#
+SYSSVC_DIRS := $(TECSGENDIR) $(SRCDIR)/tecs_kernel \
+				$(SYSSVC_DIRS) $(SRCDIR)/syssvc
+SYSSVC_ASMOBJS := $(SYSSVC_ASMOBJS)
+SYSSVC_COBJS := $(INIT_TECS_COBJ) $(TECS_COBJS) $(SYSSVC_COBJS) \
+				 $(CXXRTS)
+SYSSVC_CFLAGS := $(SYSSVC_CFLAGS)
+INCLUDES := $(INCLUDES) -I$(TECSGENDIR) -I$(SRCDIR)/tecs_kernel
+
+#
+#  ã¿ã¼ã²ãããã¡ã¤ã«
+#
+.PHONY: all
+ifndef OMIT_TECS
+all: tecs
+#	@$(MAKE) check
+	@$(MAKE) check $(OBJNAME).bin
+#	@$(MAKE) check $(OBJNAME).srec
+else
+#all: check
+all: check $(OBJNAME).bin
+#all: check $(OBJNAME).srec
+endif
+
+##### ä»¥ä¸ã¯ç·¨éããªããã¨ #####
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«é¢ããå®ç¾©
+#
+CFG_TABS := --api-table $(SRCDIR)/tinet/tcpip_api.def:tcpip \
+			--api-table $(SRCDIR)/kernel/kernel_api.def:kernel \
+			--symval-table $(SRCDIR)/tinet/tcpip_sym.def \
+			--symval-table $(SRCDIR)/kernel/kernel_sym.def $(CFG_TABS)
+CFG_ASMOBJS := $(CFG_ASMOBJS)
+CFG_COBJS := kernel_cfg.o $(CFG_COBJS)
+CFG_OBJS := $(CFG_ASMOBJS) $(CFG_COBJS)
+CFG2_OUT_SRCS := kernel_cfg.h kernel_cfg.c $(CFG2_OUT_SRCS)
+CFG_CFLAGS := -DTOPPERS_CB_TYPE_ONLY $(CFG_CFLAGS)
+
+#
+#  ã«ã¼ãã«ã«é¢ããå®ç¾©
+#
+#  KERNEL_ASMOBJS: ã«ã¼ãã«ã©ã¤ãã©ãªã«å«ããï¼ã½ã¼ã¹ãã¢ã»ã³ããªè¨èªã®
+#				   ãªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#  KERNEL_COBJS: ã«ã¼ãã«ã®ã©ã¤ãã©ãªã«å«ããï¼ã½ã¼ã¹ãCè¨èªã§ï¼ã½ã¼ã¹
+#				 ãã¡ã¤ã«ã¨1å¯¾1ã«å¯¾å¿ãããªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#  KERNEL_LCSRCS: ã«ã¼ãã«ã®ã©ã¤ãã©ãªã«å«ããCè¨èªã®ã½ã¼ã¹ãã¡ã¤ã«ã§ï¼
+#				  1ã¤ã®ã½ã¼ã¹ãã¡ã¤ã«ããè¤æ°ã®ãªãã¸ã§ã¯ããã¡ã¤ã«ãç
+#				  æãããã®ï¼
+#  KERNEL_LCOBJS: ä¸ã®ã½ã¼ã¹ãã¡ã¤ã«ããçæããããªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#
+KERNEL_DIRS := $(KERNEL_DIRS) $(SRCDIR)/kernel
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS)
+KERNEL_COBJS := $(KERNEL_COBJS)
+KERNEL_CFLAGS := $(KERNEL_CFLAGS) -I$(SRCDIR)/kernel
+
+#
+#  ã«ã¼ãã«ã®ãã¡ã¤ã«æ§æã®å®ç¾©
+#
+include $(SRCDIR)/kernel/Makefile.kernel
+ifdef KERNEL_FUNCOBJS
+	KERNEL_LCSRCS := $(KERNEL_FCSRCS)
+	KERNEL_LCOBJS := $(foreach file,$(KERNEL_FCSRCS),$($(file:.c=)))
+else
+	KERNEL_CFLAGS := -DALLFUNC $(KERNEL_CFLAGS)
+	KERNEL_COBJS := $(KERNEL_COBJS) \
+					$(foreach file,$(KERNEL_FCSRCS),$(file:.c=.o))
+endif
+ifdef OMIT_OFFSET_H
+	OFFSET_H =
+else
+	OFFSET_H = offset.h
+endif
+ifndef TARGET_OFFSET_TRB
+	TARGET_OFFSET_TRB := $(TARGETDIR)/target_offset.trb
+endif
+ifndef TARGET_KERNEL_TRB
+	TARGET_KERNEL_TRB := $(TARGETDIR)/target_kernel.trb
+endif
+ifndef TARGET_CHECK_TRB
+	TARGET_CHECK_TRB := $(TARGETDIR)/target_check.trb
+endif
+ifndef TARGET_KERNEL_CFG
+	TARGET_KERNEL_CFG := $(TARGETDIR)/target_kernel.cfg
+endif
+ifndef TARGET_TCPIP_TRB
+	TARGET_TCPIP_TRB := $(SRCDIR)/tinet/tinet.trb
+endif
+
+#
+#  ã½ã¼ã¹ãã¡ã¤ã«ã®ãããã£ã¬ã¯ããªã«é¢ããå®ç¾©
+#
+vpath %.c $(KERNEL_DIRS) $(SYSSVC_DIRS) $(APPL_DIRS)
+vpath %.S $(KERNEL_DIRS) $(SYSSVC_DIRS) $(APPL_DIRS)
+vpath %.cfg $(APPL_DIRS)
+vpath %.cdl $(APPL_DIRS)
+
+#
+#  ã³ã³ãã¤ã«ã®ããã®å¤æ°ã®å®ç¾©
+#
+KERNEL_LIB_OBJS = $(KERNEL_ASMOBJS) $(KERNEL_COBJS) $(KERNEL_LCOBJS)
+SYSSVC_OBJS = $(SYSSVC_ASMOBJS) $(SYSSVC_COBJS)
+APPL_OBJS = $(APPL_ASMOBJS) $(APPL_COBJS) $(APPL_CXXOBJS)
+ALL_OBJS = $(START_OBJS) $(APPL_OBJS) $(SYSSVC_OBJS) $(CFG_OBJS) \
+											$(END_OBJS) $(HIDDEN_OBJS)
+ALL_LIBS = -lkernel $(LIBS)
+ifdef KERNEL_LIB
+	LIBS_DEP = $(KERNEL_LIB)/libkernel.a $(filter %.a,$(LIBS))
+	OBJ_LDFLAGS := $(OBJ_LDFLAGS) -L$(KERNEL_LIB)
+	REALCLEAN_FILES := libkernel.a $(REALCLEAN_FILES)
+else
+	LIBS_DEP = libkernel.a $(filter %.a,$(LIBS))
+	OBJ_LDFLAGS := $(OBJ_LDFLAGS) -L.
+endif
+
+ifdef TEXT_START_ADDRESS
+	LDFLAGS := $(LDFLAGS) -Wl,-Ttext,$(TEXT_START_ADDRESS)
+endif
+ifdef DATA_START_ADDRESS
+	LDFLAGS := $(LDFLAGS) -Wl,-Tdata,$(DATA_START_ADDRESS)
+endif
+ifdef LDSCRIPT
+	LDFLAGS := $(LDFLAGS) -T $(LDSCRIPT)
+endif
+
+#
+#  tecsgenããCããªãã­ã»ããµãå¼ã³åºãéã®ãªãã·ã§ã³ã®å®ç¾©
+#
+TECS_CPP = $(CC) $(CDEFS) $(INCLUDES) $(SYSSVC_CFLAGS) -D TECSGEN -E
+
+#
+#  tecsgenã®å¼åºã
+#
+.PHONY: tecs
+tecs $(TECSGEN_SRCS) $(TECS_HEADERS): $(TECSGEN_TIMESTAMP) ;
+$(TECSGEN_TIMESTAMP): $(APPL_CDL) $(TECS_IMPORTS)
+	$(TECSGEN) $< -R $(INCLUDES) --cpp "$(TECS_CPP)" -g $(TECSGENDIR)
+
+#
+#  ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®çæ
+#
+cfg1_out.c cfg1_out.db: cfg1_out.timestamp ;
+cfg1_out.timestamp: $(APPL_CFG) $(TECSGEN_TIMESTAMP)
+	$(CFG) --pass 1 --kernel asp $(INCLUDES) $(CFG_TABS) \
+						-M $(DEPDIR)/cfg1_out_c.d $(TARGET_KERNEL_CFG) $<
+
+$(CFG1_OUT): $(START_OBJS) cfg1_out.o $(CFG_DMY) $(END_OBJS) $(HIDDEN_OBJS)
+	$(LINK) $(CFLAGS) $(LDFLAGS) $(CFG1_OUT_LDFLAGS) -o $(CFG1_OUT) \
+						$(START_OBJS) cfg1_out.o $(CFG_DMY) $(END_OBJS)
+
+cfg1_out.syms: $(CFG1_OUT)
+	$(NM) -n $(CFG1_OUT) > cfg1_out.syms
+
+cfg1_out.srec: $(CFG1_OUT)
+	$(OBJCOPY) -O srec -S $(CFG1_OUT) cfg1_out.srec
+
+$(CFG2_OUT_SRCS) cfg2_out.db: kernel_cfg.timestamp ;
+kernel_cfg.timestamp: cfg1_out.db cfg1_out.syms cfg1_out.srec
+	$(CFG) --pass 2 --kernel asp $(INCLUDES) -T $(TARGET_TCPIP_TRB):tcpip -T $(TARGET_KERNEL_TRB):kernel
+
+#
+#  ãªãã»ãããã¡ã¤ã«ï¼offset.hï¼ã®çæè¦å
+#
+$(OFFSET_H): offset.timestamp ;
+offset.timestamp: cfg1_out.db cfg1_out.syms cfg1_out.srec
+	$(CFG) --pass 2 -O --kernel asp $(INCLUDES) -T $(TARGET_OFFSET_TRB) \
+				--rom-symbol cfg1_out.syms --rom-image cfg1_out.srec
+
+#
+#  ã«ã¼ãã«ã©ã¤ãã©ãªãã¡ã¤ã«ã®çæ
+#
+libkernel.a: $(OFFSET_H) $(KERNEL_LIB_OBJS)
+	rm -f libkernel.a
+	$(AR) -rcs libkernel.a $(KERNEL_LIB_OBJS)
+	$(RANLIB) libkernel.a
+
+#
+#  ç¹å¥ãªä¾å­é¢ä¿ã®å®ç¾©
+#
+tBannerMain.o: $(filter-out tBannerMain.o,$(ALL_OBJS)) $(LIBS_DEP)
+
+main_rb.o: main_rb.c
+
+main_rb.c: ../src/main.rb
+	../../../mruby-1.2.0/bin/mrbc -Bmain_rb_code -o main_rb.c ../src/main.rb
+
+#
+#  å
+¨ä½ã®ãªã³ã¯
+#
+$(OBJFILE): $(ALL_OBJS) $(LIBS_DEP)
+	$(LINK) $(CFLAGS) $(LDFLAGS) $(OBJ_LDFLAGS) -o $(OBJFILE) \
+			$(START_OBJS) $(APPL_OBJS) $(SYSSVC_OBJS) $(CFG_OBJS) \
+			$(ALL_LIBS) $(END_OBJS)
+
+#
+#  ã·ã³ãã«ãã¡ã¤ã«ã®çæ
+#
+$(OBJNAME).syms: $(OBJFILE)
+	$(NM) -n $(OBJFILE) > $(OBJNAME).syms
+
+#
+#  ãã¤ããªãã¡ã¤ã«ã®çæ
+#
+$(OBJNAME).bin: $(OBJFILE)
+	$(OBJCOPY) -O binary -R .nc_bss -S $(OBJFILE) $(OBJNAME).bin
+	$(OBJDUMP) -h $(OBJFILE)
+	$(SIZE) $(OBJFILE)
+
+#
+#  Sã¬ã³ã¼ããã¡ã¤ã«ã®çæ
+#
+$(OBJNAME).srec: $(OBJFILE)
+	$(OBJCOPY) -O srec -S $(OBJFILE) $(OBJNAME).srec
+
+#
+#  ã¨ã©ã¼ãã§ãã¯å¦ç
+#
+.PHONY: check
+check: check.timestamp ;
+check.timestamp: cfg2_out.db $(OBJNAME).syms $(OBJNAME).srec
+	$(CFG) --pass 3 --kernel asp -O $(INCLUDES) -T $(TARGET_CHECK_TRB) \
+				--rom-symbol $(OBJNAME).syms --rom-image $(OBJNAME).srec
+	@echo "configuration check passed"
+
+#
+#  ã³ã³ãã¤ã«çµæã®æ¶å»
+#
+.PHONY: clean
+clean:
+	rm -f \#* *~ *.o $(DEPDIR)/*.d $(CLEAN_FILES) check.timestamp
+	rm -f $(OBJFILE) $(OBJNAME).syms $(OBJNAME).srec $(OBJNAME).bin
+	rm -f kernel_cfg.timestamp $(CFG2_OUT_SRCS) cfg2_out.db
+	rm -f offset.timestamp $(OFFSET_H)
+	rm -f cfg1_out.syms cfg1_out.srec $(CFG1_OUT)
+	rm -f cfg1_out.timestamp cfg1_out.c cfg1_out.db
+#	rm -rf $(TECSGENDIR)
+ifndef KERNEL_LIB
+	rm -f libkernel.a
+endif
+	rm -f main_rb.c
+
+.PHONY: cleankernel
+cleankernel:
+	rm -f $(OFFSET_H) $(KERNEL_LIB_OBJS)
+	rm -f $(KERNEL_LIB_OBJS:%.o=$(DEPDIR)/%.d)
+
+.PHONY: realclean
+realclean: clean
+	rm -f $(REALCLEAN_FILES)
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãçæãããã¡ã¤ã«ã®ã³ã³ãã¤ã«ã«ã¼ã«ã®å®ç¾©
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãçæãããã¡ã¤ã«ã¯ï¼å
+±éã®ã³ã³ãã¤ã«ãªãã·ã§ã³
+#  ã®ã¿ãä»ãã¦ã³ã³ãã¤ã«ããï¼
+#
+ALL_CFG_COBJS = $(CFG_COBJS) cfg1_out.o
+ALL_CFG_ASMOBJS = $(CFG_ASMOBJS)
+
+$(ALL_CFG_COBJS): %.o: %.c
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(CFG_CFLAGS) $<
+
+$(ALL_CFG_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(CFG_CFLAGS) $<
+
+$(ALL_CFG_ASMOBJS): %.o: %.S
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(CFG_CFLAGS) $<
+
+#
+#  ä¾å­é¢ä¿ãã¡ã¤ã«ã®ã¤ã³ã¯ã«ã¼ã
+#
+-include $(DEPDIR)/*.d
+
+#
+#  éçºãã¼ã«ã®ã³ãã³ãåã®å®ç¾©
+#
+ifeq ($(TOOL),gcc)
+	#
+	#  GNUéçºç°å¢ç¨
+	#
+	ifdef GCC_TARGET
+		GCC_TARGET_PREFIX = $(GCC_TARGET)-
+	else
+		GCC_TARGET_PREFIX =
+	endif
+	CC := $(GCC_TARGET_PREFIX)gcc
+	CXX := $(GCC_TARGET_PREFIX)g++
+	AS := $(GCC_TARGET_PREFIX)as
+	LD := $(GCC_TARGET_PREFIX)ld
+	AR := $(GCC_TARGET_PREFIX)ar
+	NM := $(GCC_TARGET_PREFIX)nm
+	RANLIB := $(GCC_TARGET_PREFIX)ranlib
+	OBJCOPY := $(GCC_TARGET_PREFIX)objcopy
+	OBJDUMP := $(GCC_TARGET_PREFIX)objdump
+	SIZE := $(GCC_TARGET_PREFIX)size
+endif
+
+ifdef DEVTOOLDIR
+	CC := $(DEVTOOLDIR)/$(CC)
+	CXX := $(DEVTOOLDIR)/$(CXX)
+	AS := $(DEVTOOLDIR)/$(AS)
+	LD := $(DEVTOOLDIR)/$(LD)
+	AR := $(DEVTOOLDIR)/$(AR)
+	NM := $(DEVTOOLDIR)/$(NM)
+	RANLIB := $(DEVTOOLDIR)/$(RANLIB)
+	OBJCOPY := $(DEVTOOLDIR)/$(OBJCOPY)
+	OBJDUMP := $(DEVTOOLDIR)/$(OBJDUMP)
+endif
+
+ifdef USE_CXX
+	LINK = $(CXX)
+else
+	LINK = $(CC)
+endif
+
+#
+#  ã³ã³ãã¤ã«ã«ã¼ã«ã®å®ç¾©
+#
+$(KERNEL_COBJS): %.o: %.c
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_LCOBJS): %.o:
+	$(CC) -DTOPPERS_$(*F) -o $@ -c -MD -MP -MF $(DEPDIR)/$*.d \
+									$(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_LCOBJS:.o=.s): %.s:
+	$(CC) -DTOPPERS_$(*F) -o $@ -S $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_ASMOBJS): %.o: %.S
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(SYSSVC_COBJS): %.o: %.c
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(SYSSVC_CFLAGS) $<
+
+$(SYSSVC_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(SYSSVC_CFLAGS) $<
+
+$(SYSSVC_ASMOBJS): %.o: %.S
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(SYSSVC_CFLAGS) $<
+
+$(APPL_COBJS): %.o: %.c
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_CXXOBJS): %.o: %.cpp
+	$(CXX) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_CXXOBJS:.o=.s): %.s: %.cpp
+	$(CXX) -S $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_ASMOBJS): %.o: %.S
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(APPL_CFLAGS) $<
+
+#
+#  ããã©ã«ãã³ã³ãã¤ã«ã«ã¼ã«ãä¸æ¸ã
+#
+%.o: %.c
+	@echo "*** Default compile rules should not be used."
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $<
+
+%.s: %.c
+	@echo "*** Default compile rules should not be used."
+	$(CC) -S $(CFLAGS) $<
+
+%.o: %.cpp
+	@echo "*** Default compile rules should not be used."
+	$(CXX) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $<
+
+%.s: %.cpp
+	@echo "*** Default compile rules should not be used."
+	$(CXX) -S $(CFLAGS) $<
+
+%.o: %.S
+	@echo "*** Default compile rules should not be used."
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $<
Index: EcnlProtoTool/trunk/prototool/gr_peach/ccsbcs.c
===================================================================
--- EcnlProtoTool/trunk/prototool/gr_peach/ccsbcs.c	(revision 270)
+++ EcnlProtoTool/trunk/prototool/gr_peach/ccsbcs.c	(revision 270)
@@ -0,0 +1,348 @@
+/*------------------------------------------------------------------------*/
+/* Unicode - Local code bidirectional converter  (C)ChaN, 2015            */
+/* (SBCS code pages)                                                      */
+/*------------------------------------------------------------------------*/
+/*  437   U.S.
+/   720   Arabic
+/   737   Greek
+/   771   KBL
+/   775   Baltic
+/   850   Latin 1
+/   852   Latin 2
+/   855   Cyrillic
+/   857   Turkish
+/   860   Portuguese
+/   861   Icelandic
+/   862   Hebrew
+/   863   Canadian French
+/   864   Arabic
+/   865   Nordic
+/   866   Russian
+/   869   Greek 2
+*/
+
+#include "ff.h"
+
+
+#if _CODE_PAGE == 437
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = {	/*  CP437(0x80-0xFF) to Unicode conversion table */
+	0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
+	0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, 0x00FF, 0x00D6, 0x00DC, 0x00A2, 0x00A3, 0x00A5, 0x20A7, 0x0192,
+	0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
+	0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+	0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+	0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+	0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
+	0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 720
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = {	/*  CP720(0x80-0xFF) to Unicode conversion table */
+	0x0000, 0x0000, 0x00E9, 0x00E2, 0x0000, 0x00E0, 0x0000, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x0000, 0x0000, 0x0000,
+	0x0000, 0x0651, 0x0652, 0x00F4, 0x00A4, 0x0640, 0x00FB, 0x00F9, 0x0621, 0x0622, 0x0623, 0x0624, 0x00A3, 0x0625, 0x0626, 0x0627,
+	0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F, 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x00AB, 0x00BB,
+	0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+	0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+	0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+	0x0636, 0x0637, 0x0638, 0x0639, 0x063A, 0x0641, 0x00B5, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064A,
+	0x2261, 0x064B, 0x064C, 0x064D, 0x064E, 0x064F, 0x0650, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 737
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = {	/*  CP737(0x80-0xFF) to Unicode conversion table */
+	0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, 0x03A0,
+	0x03A1, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8,
+	0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0, 0x03C1, 0x03C3, 0x03C2, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8,
+	0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+	0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+	0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+	0x03C9, 0x03AC, 0x03AD, 0x03AE, 0x03CA, 0x03AF, 0x03CC, 0x03CD, 0x03CB, 0x03CE, 0x0386, 0x0388, 0x0389, 0x038A, 0x038C, 0x038E,
+	0x038F, 0x00B1, 0x2265, 0x2264, 0x03AA, 0x03AB, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 771
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = {	/*  CP771(0x80-0xFF) to Unicode conversion table */
+	0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
+	0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
+	0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
+	0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x2558, 0x2510,
+	0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+	0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x0104, 0x0105, 0x010C, 0x010D,
+	0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
+	0x0118, 0x0119, 0x0116, 0x0117, 0x012E, 0x012F, 0x0160, 0x0161, 0x0172, 0x0173, 0x016A, 0x016B, 0x017D, 0x017E, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 775
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = {	/*  CP775(0x80-0xFF) to Unicode conversion table */
+	0x0106, 0x00FC, 0x00E9, 0x0101, 0x00E4, 0x0123, 0x00E5, 0x0107, 0x0142, 0x0113, 0x0156, 0x0157, 0x012B, 0x0179, 0x00C4, 0x00C5,
+	0x00C9, 0x00E6, 0x00C6, 0x014D, 0x00F6, 0x0122, 0x00A2, 0x015A, 0x015B, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x00D7, 0x00A4,
+	0x0100, 0x012A, 0x00F3, 0x017B, 0x017C, 0x017A, 0x201D, 0x00A6, 0x00A9, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x0141, 0x00AB, 0x00BB,
+	0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0104, 0x010C, 0x0118, 0x0116, 0x2563, 0x2551, 0x2557, 0x255D, 0x012E, 0x0160, 0x2510,
+	0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x0172, 0x016A, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x017D,
+	0x0105, 0x010D, 0x0119, 0x0117, 0x012F, 0x0161, 0x0173, 0x016B, 0x017E, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+	0x00D3, 0x00DF, 0x014C, 0x0143, 0x00F5, 0x00D5, 0x00B5, 0x0144, 0x0136, 0x0137, 0x013B, 0x013C, 0x0146, 0x0112, 0x0145, 0x2019,
+	0x00AD, 0x00B1, 0x201C, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x201E, 0x00B0, 0x2219, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 850
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = {	/*  CP850(0x80-0xFF) to Unicode conversion table */
+	0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
+	0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, 0x00FF, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x00D7, 0x0192,
+	0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, 0x00BF, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
+	0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x00C0, 0x00A9, 0x2563, 0x2551, 0x2557, 0x255D, 0x00A2, 0x00A5, 0x2510,
+	0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x00E3, 0x00C3, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
+	0x00F0, 0x00D0, 0x00CA, 0x00CB, 0x00C8, 0x0131, 0x00CD, 0x00CE, 0x00CF, 0x2518, 0x250C, 0x2588, 0x2584, 0x00A6, 0x00CC, 0x2580,
+	0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, 0x00FE, 0x00DE, 0x00DA, 0x00DB, 0x00D9, 0x00FD, 0x00DD, 0x00AF, 0x00B4,
+	0x00AD, 0x00B1, 0x2017, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8, 0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 852
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = {	/*  CP852(0x80-0xFF) to Unicode conversion table */
+	0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x016F, 0x0107, 0x00E7, 0x0142, 0x00EB, 0x0150, 0x0151, 0x00EE, 0x0179, 0x00C4, 0x0106,
+	0x00C9, 0x0139, 0x013A, 0x00F4, 0x00F6, 0x013D, 0x013E, 0x015A, 0x015B, 0x00D6, 0x00DC, 0x0164, 0x0165, 0x0141, 0x00D7, 0x010D,
+	0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x0104, 0x0105, 0x017D, 0x017E, 0x0118, 0x0119, 0x00AC, 0x017A, 0x010C, 0x015F, 0x00AB, 0x00BB,
+	0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x011A, 0x015E, 0x2563, 0x2551, 0x2557, 0x255D, 0x017B, 0x017C, 0x2510,
+	0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x0102, 0x0103, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
+	0x0111, 0x0110, 0x010E, 0x00CB, 0x010F, 0x0147, 0x00CD, 0x00CE, 0x011B, 0x2518, 0x250C, 0x2588, 0x2584, 0x0162, 0x016E, 0x2580,
+	0x00D3, 0x00DF, 0x00D4, 0x0143, 0x0144, 0x0148, 0x0160, 0x0161, 0x0154, 0x00DA, 0x0155, 0x0170, 0x00FD, 0x00DD, 0x0163, 0x00B4,
+	0x00AD, 0x02DD, 0x02DB, 0x02C7, 0x02D8, 0x00A7, 0x00F7, 0x00B8, 0x00B0, 0x00A8, 0x02D9, 0x0171, 0x0158, 0x0159, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 855
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = {	/*  CP855(0x80-0xFF) to Unicode conversion table */
+	0x0452, 0x0402, 0x0453, 0x0403, 0x0451, 0x0401, 0x0454, 0x0404, 0x0455, 0x0405, 0x0456, 0x0406, 0x0457, 0x0407, 0x0458, 0x0408,
+	0x0459, 0x0409, 0x045A, 0x040A, 0x045B, 0x040B, 0x045C, 0x040C, 0x045E, 0x040E, 0x045F, 0x040F, 0x044E, 0x042E, 0x044A, 0x042A,
+	0x0430, 0x0410, 0x0431, 0x0411, 0x0446, 0x0426, 0x0434, 0x0414, 0x0435, 0x0415, 0x0444, 0x0424, 0x0433, 0x0413, 0x00AB, 0x00BB,
+	0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0445, 0x0425, 0x0438, 0x0418, 0x2563, 0x2551, 0x2557, 0x255D, 0x0439, 0x0419, 0x2510,
+	0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x043A, 0x041A, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
+	0x043B, 0x041B, 0x043C, 0x041C, 0x043D, 0x041D, 0x043E, 0x041E, 0x043F, 0x2518, 0x250C, 0x2588, 0x2584, 0x041F, 0x044F, 0x2580,
+	0x042F, 0x0440, 0x0420, 0x0441, 0x0421, 0x0442, 0x0422, 0x0443, 0x0423, 0x0436, 0x0416, 0x0432, 0x0412, 0x044C, 0x042C, 0x2116,
+	0x00AD, 0x044B, 0x042B, 0x0437, 0x0417, 0x0448, 0x0428, 0x044D, 0x042D, 0x0449, 0x0429, 0x0447, 0x0427, 0x00A7, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 857
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = {	/*  CP857(0x80-0xFF) to Unicode conversion table */
+	0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x0131, 0x00C4, 0x00C5,
+	0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, 0x0130, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x015E, 0x015F,
+	0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x011E, 0x011F, 0x00BF, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
+	0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x00C0, 0x00A9, 0x2563, 0x2551, 0x2557, 0x255D, 0x00A2, 0x00A5, 0x2510,
+	0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x00E3, 0x00C3, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4,
+	0x00BA, 0x00AA, 0x00CA, 0x00CB, 0x00C8, 0x0000, 0x00CD, 0x00CE, 0x00CF, 0x2518, 0x250C, 0x2588, 0x2584, 0x00A6, 0x00CC, 0x2580,
+	0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, 0x0000, 0x00D7, 0x00DA, 0x00DB, 0x00D9, 0x00EC, 0x00FF, 0x00AF, 0x00B4,
+	0x00AD, 0x00B1, 0x0000, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8, 0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 860
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = {	/*  CP860(0x80-0xFF) to Unicode conversion table */
+	0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E3, 0x00E0, 0x00C1, 0x00E7, 0x00EA, 0x00CA, 0x00E8, 0x00CD, 0x00D4, 0x00EC, 0x00C3, 0x00C2,
+	0x00C9, 0x00C0, 0x00C8, 0x00F4, 0x00F5, 0x00F2, 0x00DA, 0x00F9, 0x00CC, 0x00D5, 0x00DC, 0x00A2, 0x00A3, 0x00D9, 0x20A7, 0x00D3,
+	0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, 0x00BF, 0x00D2, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
+	0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x2558, 0x2510,
+	0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+	0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+	0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
+	0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 861
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = {	/*  CP861(0x80-0xFF) to Unicode conversion table */
+	0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E6, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00D0, 0x00F0, 0x00DE, 0x00C4, 0x00C5,
+	0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00FE, 0x00FB, 0x00DD, 0x00FD, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x20A7, 0x0192,
+	0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00C1, 0x00CD, 0x00D3, 0x00DA, 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
+	0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+	0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+	0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+	0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
+	0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 862
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = {	/*  CP862(0x80-0xFF) to Unicode conversion table */
+	0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
+	0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, 0x05E8, 0x05E9, 0x05EA, 0x00A2, 0x00A3, 0x00A5, 0x20A7, 0x0192,
+	0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB,
+	0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+	0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+	0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+	0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
+	0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 863
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = {	/*  CP863(0x80-0xFF) to Unicode conversion table */
+	0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00C2, 0x00E0, 0x00B6, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x2017, 0x00C0,
+	0x00C9, 0x00C8, 0x00CA, 0x00F4, 0x00CB, 0x00CF, 0x00FB, 0x00F9, 0x00A4, 0x00D4, 0x00DC, 0x00A2, 0x00A3, 0x00D9, 0x00DB, 0x0192,
+	0x00A6, 0x00B4, 0x00F3, 0x00FA, 0x00A8, 0x00BB, 0x00B3, 0x00AF, 0x00CE, 0x3210, 0x00AC, 0x00BD, 0x00BC, 0x00BE, 0x00AB, 0x00BB,
+	0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+	0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+	0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+	0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2219,
+	0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 864
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = {	/*  CP864(0x80-0xFF) to Unicode conversion table */
+	0x00B0, 0x00B7, 0x2219, 0x221A, 0x2592, 0x2500, 0x2502, 0x253C, 0x2524, 0x252C, 0x251C, 0x2534, 0x2510, 0x250C, 0x2514, 0x2518,
+	0x03B2, 0x221E, 0x03C6, 0x00B1, 0x00BD, 0x00BC, 0x2248, 0x00AB, 0x00BB, 0xFEF7, 0xFEF8, 0x0000, 0x0000, 0xFEFB, 0xFEFC, 0x0000,
+	0x00A0, 0x00AD, 0xFE82, 0x00A3, 0x00A4, 0xFE84, 0x0000, 0x20AC, 0xFE8E, 0xFE8F, 0xFE95, 0xFE99, 0x060C, 0xFE9D, 0xFEA1, 0xFEA5,
+	0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, 0x0668, 0x0669, 0xFED1, 0x061B, 0xFEB1, 0xFEB5, 0xFEB9, 0x061F,
+	0x00A2, 0xFE80, 0xFE81, 0xFE83, 0xFE85, 0xFECA, 0xFE8B, 0xFE8D, 0xFE91, 0xFE93, 0xFE97, 0xFE9B, 0xFE9F, 0xFEA3, 0xFEA7, 0xFEA9,
+	0xFEAB, 0xFEAD, 0xFEAF, 0xFEB3, 0xFEB7, 0xFEBB, 0xFEBF, 0xFEC1, 0xFEC5, 0xFECB, 0xFECF, 0x00A6, 0x00AC, 0x00F7, 0x00D7, 0xFEC9,
+	0x0640, 0xFED3, 0xFED7, 0xFEDB, 0xFEDF, 0xFEE3, 0xFEE7, 0xFEEB, 0xFEED, 0xFEEF, 0xFEF3, 0xFEBD, 0xFECC, 0xFECE, 0xFECD, 0xFEE1,
+	0xFE7D, 0x0651, 0xFEE5, 0xFEE9, 0xFEEC, 0xFEF0, 0xFEF2, 0xFED0, 0xFED5, 0xFEF5, 0xFEF6, 0xFEDD, 0xFED9, 0xFEF1, 0x25A0, 0x0000
+};
+
+#elif _CODE_PAGE == 865
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = {	/*  CP865(0x80-0xFF) to Unicode conversion table */
+	0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5,
+	0x00C5, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, 0x00FF, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x20A7, 0x0192,
+	0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00A4,
+	0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x2558, 0x2510,
+	0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+	0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+	0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
+	0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 866
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = {	/*  CP866(0x80-0xFF) to Unicode conversion table */
+	0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
+	0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
+	0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
+	0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510,
+	0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567,
+	0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580,
+	0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
+	0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040E, 0x045E, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x2116, 0x00A4, 0x25A0, 0x00A0
+};
+
+#elif _CODE_PAGE == 869
+#define _TBLDEF 1
+static
+const WCHAR Tbl[] = {	/*  CP869(0x80-0xFF) to Unicode conversion table */
+	0x00B7, 0x00B7, 0x00B7, 0x00B7, 0x00B7, 0x00B7, 0x0386, 0x00B7, 0x00B7, 0x00AC, 0x00A6, 0x2018, 0x2019, 0x0388, 0x2015, 0x0389,
+	0x038A, 0x03AA, 0x038C, 0x00B7, 0x00B7, 0x038E, 0x03AB, 0x00A9, 0x038F, 0x00B2, 0x00B3, 0x03AC, 0x00A3, 0x03AD, 0x03AE, 0x03AF,
+	0x03CA, 0x0390, 0x03CC, 0x03CD, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x00BD, 0x0398, 0x0399, 0x00AB, 0x00BB,
+	0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x039A, 0x039B, 0x039C, 0x039D, 0x2563, 0x2551, 0x2557, 0x255D, 0x039E, 0x039F, 0x2510,
+	0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x0A30, 0x03A1, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x03A3,
+	0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03B1, 0x03B2, 0x03B3, 0x2518, 0x250C, 0x2588, 0x2584, 0x03B4, 0x03B5, 0x2580,
+	0x03B6, 0x03B7, 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0, 0x03C1, 0x03C3, 0x03C2, 0x03C4, 0x0384,
+	0x00AD, 0x00B1, 0x03C5, 0x03C6, 0x03C7, 0x00A7, 0x03C8, 0x0385, 0x00B0, 0x00A8, 0x03C9, 0x03CB, 0x03B0, 0x03CE, 0x25A0, 0x00A0
+};
+
+#endif
+
+
+#if !_TBLDEF || !_USE_LFN
+#error This file is not needed at current configuration. Remove from the project.
+#endif
+
+
+
+
+WCHAR ff_convert (	/* Converted character, Returns zero on error */
+	WCHAR	chr,	/* Character code to be converted */
+	UINT	dir		/* 0: Unicode to OEM code, 1: OEM code to Unicode */
+)
+{
+	WCHAR c;
+
+
+	if (chr < 0x80) {	/* ASCII */
+		c = chr;
+
+	} else {
+		if (dir) {		/* OEM code to Unicode */
+			c = (chr >= 0x100) ? 0 : Tbl[chr - 0x80];
+
+		} else {		/* Unicode to OEM code */
+			for (c = 0; c < 0x80; c++) {
+				if (chr == Tbl[c]) break;
+			}
+			c = (c + 0x80) & 0xFF;
+		}
+	}
+
+	return c;
+}
+
+
+
+
+WCHAR ff_wtoupper (	/* Returns upper converted character */
+	WCHAR chr		/* Unicode character to be upper converted */
+)
+{
+	static const WCHAR lower[] = {	/* Lower case characters to be converted */
+	/* Latin Supplement */			0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,
+	/* Latin Extended-A */			0x101,0x103,0x105,0x107,0x109,0x10B,0x10D,0x10F,0x111,0x113,0x115,0x117,0x119,0x11B,0x11D,0x11F,0x121,0x123,0x125,0x127,0x129,0x12B,0x12D,0x12F,0x131,0x133,0x135,0x137,0x13A,0x13C,0x13E,0x140,0x142,0x144,0x146,0x148,0x14B,0x14D,0x14F,0x151,0x153,0x155,0x157,0x159,0x15B,0x15D,0x15F,0x161,0x163,0x165,0x167,0x169,0x16B,0x16D,0x16F,0x171,0x173,0x175,0x177,0x17A,0x17C,0x17E,
+	/* Latin Extended-B */			0x183,0x185,0x188,0x18C,0x192,0x199,0x1A1,0x1A3,0x1A8,0x1AD,0x1B0,0x1B4,0x1B6,0x1B9,0x1BD,0x1C6,0x1C9,0x1CC,0x1CE,0x1D0,0x1D2,0x1D4,0x1D6,0x1D8,0x1DA,0x1DC,0x1DD,0x1DF,0x1E1,0x1E3,0x1E5,0x1E7,0x1E9,0x1EB,0x1ED,0x1EF,0x1F3,0x1F5,0x1FB,0x1FD,0x1FF,0x201,0x203,0x205,0x207,0x209,0x20B,0x20D,0x20F,0x211,0x213,0x215,0x217,
+	/* Greek, Coptic */				0x3B1,0x3B2,0x3B3,0x3B4,0x3B5,0x3B6,0x3B7,0x3B8,0x3B9,0x3BA,0x3BB,0x3BC,0x3BD,0x3BE,0x3BF,0x3C0,0x3C1,0x3C3,0x3C4,0x3C5,0x3C6,0x3C7,0x3C8,0x3C9,0x3CA,0x3CB,0x3CC,0x3CD,0x3CE,0x3E3,0x3E5,0x3E7,0x3E9,0x3EB,
+	/* Cyrillic */					0x430,0x431,0x432,0x433,0x434,0x435,0x436,0x437,0x438,0x439,0x43A,0x43B,0x43C,0x43D,0x43E,0x43F,0x440,0x441,0x442,0x443,0x444,0x445,0x446,0x447,0x448,0x449,0x44A,0x44B,0x44C,0x44D,0x44E,0x44F,0x452,0x453,0x454,0x455,0x456,0x457,0x458,0x459,0x45A,0x45B,0x45C,0x45E,0x45F,0x461,0x463,0x465,0x467,0x469,0x46B,0x46D,0x46F,0x471,0x473,0x475,0x477,0x479,0x47B,0x47D,0x47F,0x481,0x491,0x493,0x495,0x497,0x499,0x49B,0x49D,0x49F,0x4A1,0x4A3,0x4A5,0x4A7,0x4A9,0x4AB,0x4AD,0x4AF,0x4B1,0x4B3,0x4B5,0x4B7,0x4B9,0x4BB,0x4BD,0x4BF,0x4C2,0x4C4,0x4C8,0x4D1,0x4D3,0x4D5,0x4D7,0x4D9,0x4DB,0x4DD,0x4DF,0x4E1,0x4E3,0x4E5,0x4E7,0x4E9,0x4EB,0x4ED,0x4EF,0x4F1,0x4F3,0x4F5,0x4F9,
+	/* Armenian */					0x561,0x562,0x563,0x564,0x565,0x566,0x567,0x568,0x569,0x56A,0x56B,0x56C,0x56D,0x56E,0x56F,0x570,0x571,0x572,0x573,0x574,0x575,0x576,0x577,0x578,0x579,0x57A,0x57B,0x57C,0x57D,0x57E,0x57F,0x580,0x581,0x582,0x583,0x584,0x585,0x586,
+	/* Latin Extended Additional */	0x1E01,0x1E03,0x1E05,0x1E07,0x1E09,0x1E0B,0x1E0D,0x1E0F,0x1E11,0x1E13,0x1E15,0x1E17,0x1E19,0x1E1B,0x1E1D,0x1E1F,0x1E21,0x1E23,0x1E25,0x1E27,0x1E29,0x1E2B,0x1E2D,0x1E2F,0x1E31,0x1E33,0x1E35,0x1E37,0x1E39,0x1E3B,0x1E3D,0x1E3F,0x1E41,0x1E43,0x1E45,0x1E47,0x1E49,0x1E4B,0x1E4D,0x1E4F,0x1E51,0x1E53,0x1E55,0x1E57,0x1E59,0x1E5B,0x1E5D,0x1E5F,0x1E61,0x1E63,0x1E65,0x1E67,0x1E69,0x1E6B,0x1E6D,0x1E6F,0x1E71,0x1E73,0x1E75,0x1E77,0x1E79,0x1E7B,0x1E7D,0x1E7F,0x1E81,0x1E83,0x1E85,0x1E87,0x1E89,0x1E8B,0x1E8D,0x1E8F,0x1E91,0x1E93,0x1E95,0x1E97,0x1E99,0x1E9B,0x1E9D,0x1E9F,0x1EA1,0x1EA3,0x1EA5,0x1EA7,0x1EA9,0x1EAB,0x1EAD,0x1EAF,0x1EB1,0x1EB3,0x1EB5,0x1EB7,0x1EB9,0x1EBB,0x1EBD,0x1EBF,0x1EC1,0x1EC3,0x1EC5,0x1EC7,0x1EC9,0x1ECB,0x1ECD,0x1ECF,0x1ED1,0x1ED3,0x1ED5,0x1ED7,0x1ED9,0x1EDB,0x1EDD,0x1EDF,0x1EE1,0x1EE3,0x1EE5,0x1EE7,0x1EE9,0x1EEB,0x1EED,0x1EEF,0x1EF1,0x1EF3,0x1EF5,0x1EF7,0x1EF9,
+	/* Number forms */				0x2170,0x2171,0x2172,0x2173,0x2174,0x2175,0x2176,0x2177,0x2178,0x2179,0x217A,0x217B,0x217C,0x217D,0x217E,0x217F,
+	/* Full-width */				0xFF41,0xFF42,0xFF43,0xFF44,0xFF45,0xFF46,0xFF47,0xFF48,0xFF49,0xFF4A,0xFF4B,0xFF4C,0xFF4D,0xFF4E,0xFF4F,0xFF50,0xFF51,0xFF52,0xFF53,0xFF54,0xFF55,0xFF56,0xFF57,0xFF58,0xFF59,0xFF5A
+	};
+	static const WCHAR upper[] = {	/* Upper case characters correspond to lower[] */
+									0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0x178,
+									0x100,0x102,0x104,0x106,0x108,0x10A,0x10C,0x10E,0x110,0x112,0x114,0x116,0x118,0x11A,0x11C,0x11E,0x120,0x122,0x124,0x126,0x128,0x12A,0x12C,0x12E,0x130,0x132,0x134,0x136,0x139,0x13B,0x13D,0x13F,0x141,0x143,0x145,0x147,0x14A,0x14C,0x14E,0x150,0x152,0x154,0x156,0x158,0x15A,0x15C,0x15E,0x160,0x162,0x164,0x166,0x168,0x16A,0x16C,0x16E,0x170,0x172,0x174,0x176,0x179,0x17B,0x17D,
+									0x182,0x184,0x187,0x18B,0x191,0x198,0x1A0,0x1A2,0x1A7,0x1AC,0x1AF,0x1B3,0x1B5,0x1B8,0x1BC,0x1C4,0x1C7,0x1CA,0x1CD,0x1CF,0x1D1,0x1D3,0x1D5,0x1D7,0x1D9,0x1DB,0x18E,0x1DE,0x1E0,0x1E2,0x1E4,0x1E6,0x1E8,0x1EA,0x1EC,0x1EE,0x1F1,0x1F4,0x1FA,0x1FC,0x1FE,0x200,0x202,0x204,0x206,0x208,0x20A,0x20C,0x20E,0x210,0x212,0x214,0x216,
+									0x391,0x392,0x393,0x394,0x395,0x396,0x397,0x398,0x399,0x39A,0x39B,0x39C,0x39D,0x39E,0x39F,0x3A0,0x3A1,0x3A3,0x3A4,0x3A5,0x3A6,0x3A7,0x3A8,0x3A9,0x3AA,0x3AB,0x38C,0x38E,0x38F,0x3E2,0x3E4,0x3E6,0x3E8,0x3EA,
+									0x410,0x411,0x412,0x413,0x414,0x415,0x416,0x417,0x418,0x419,0x41A,0x41B,0x41C,0x41D,0x41E,0x41F,0x420,0x421,0x422,0x423,0x424,0x425,0x426,0x427,0x428,0x429,0x42A,0x42B,0x42C,0x42D,0x42E,0x42F,0x402,0x403,0x404,0x405,0x406,0x407,0x408,0x409,0x40A,0x40B,0x40C,0x40E,0x40F,0x460,0x462,0x464,0x466,0x468,0x46A,0x46C,0x46E,0x470,0x472,0x474,0x476,0x478,0x47A,0x47C,0x47E,0x480,0x490,0x492,0x494,0x496,0x498,0x49A,0x49C,0x49E,0x4A0,0x4A2,0x4A4,0x4A6,0x4A8,0x4AA,0x4AC,0x4AE,0x4B0,0x4B2,0x4B4,0x4B6,0x4B8,0x4BA,0x4BC,0x4BE,0x4C1,0x4C3,0x5C7,0x4D0,0x4D2,0x4D4,0x4D6,0x4D8,0x4DA,0x4DC,0x4DE,0x4E0,0x4E2,0x4E4,0x4E6,0x4E8,0x4EA,0x4EC,0x4EE,0x4F0,0x4F2,0x4F4,0x4F8,
+									0x531,0x532,0x533,0x534,0x535,0x536,0x537,0x538,0x539,0x53A,0x53B,0x53C,0x53D,0x53E,0x53F,0x540,0x541,0x542,0x543,0x544,0x545,0x546,0x547,0x548,0x549,0x54A,0x54B,0x54C,0x54D,0x54E,0x54F,0x550,0x551,0x552,0x553,0x554,0x555,0x556,
+									0x1E00,0x1E02,0x1E04,0x1E06,0x1E08,0x1E0A,0x1E0C,0x1E0E,0x1E10,0x1E12,0x1E14,0x1E16,0x1E18,0x1E1A,0x1E1C,0x1E1E,0x1E20,0x1E22,0x1E24,0x1E26,0x1E28,0x1E2A,0x1E2C,0x1E2E,0x1E30,0x1E32,0x1E34,0x1E36,0x1E38,0x1E3A,0x1E3C,0x1E3E,0x1E40,0x1E42,0x1E44,0x1E46,0x1E48,0x1E4A,0x1E4C,0x1E4E,0x1E50,0x1E52,0x1E54,0x1E56,0x1E58,0x1E5A,0x1E5C,0x1E5E,0x1E60,0x1E62,0x1E64,0x1E66,0x1E68,0x1E6A,0x1E6C,0x1E6E,0x1E70,0x1E72,0x1E74,0x1E76,0x1E78,0x1E7A,0x1E7C,0x1E7E,0x1E80,0x1E82,0x1E84,0x1E86,0x1E88,0x1E8A,0x1E8C,0x1E8E,0x1E90,0x1E92,0x1E94,0x1E96,0x1E98,0x1E9A,0x1E9C,0x1E9E,0x1EA0,0x1EA2,0x1EA4,0x1EA6,0x1EA8,0x1EAA,0x1EAC,0x1EAE,0x1EB0,0x1EB2,0x1EB4,0x1EB6,0x1EB8,0x1EBA,0x1EBC,0x1EBE,0x1EC0,0x1EC2,0x1EC4,0x1EC6,0x1EC8,0x1ECA,0x1ECC,0x1ECE,0x1ED0,0x1ED2,0x1ED4,0x1ED6,0x1ED8,0x1EDA,0x1EDC,0x1EDE,0x1EE0,0x1EE2,0x1EE4,0x1EE6,0x1EE8,0x1EEA,0x1EEC,0x1EEE,0x1EF0,0x1EF2,0x1EF4,0x1EF6,0x1EF8,
+									0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166,0x2167,0x2168,0x2169,0x216A,0x216B,0x216C,0x216D,0x216E,0x216F,
+									0xFF21,0xFF22,0xFF23,0xFF24,0xFF25,0xFF26,0xFF27,0xFF28,0xFF29,0xFF2A,0xFF2B,0xFF2C,0xFF2D,0xFF2E,0xFF2F,0xFF30,0xFF31,0xFF32,0xFF33,0xFF34,0xFF35,0xFF36,0xFF37,0xFF38,0xFF39,0xFF3A
+	};
+	UINT i, n, hi, li;
+
+
+	if (chr < 0x80) {	/* ASCII characters (acceleration) */
+		if (chr >= 0x61 && chr <= 0x7A) chr -= 0x20;
+
+	} else {			/* Non ASCII characters (table search) */
+		n = 12; li = 0; hi = sizeof lower / sizeof lower[0];
+		do {
+			i = li + (hi - li) / 2;
+			if (chr == lower[i]) break;
+			if (chr > lower[i]) li = i; else hi = i;
+		} while (--n);
+		if (n) chr = upper[i];
+	}
+
+	return chr;
+}
+
Index: EcnlProtoTool/trunk/prototool/gr_peach/mruby_arduino.c
===================================================================
--- EcnlProtoTool/trunk/prototool/gr_peach/mruby_arduino.c	(revision 270)
+++ EcnlProtoTool/trunk/prototool/gr_peach/mruby_arduino.c	(revision 270)
@@ -0,0 +1,328 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2014-2017 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ */
+
+/* 
+ *  ãµã³ãã«ãã­ã°ã©ã (1)ã®æ¬ä½
+ */
+
+#include <kernel.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <string.h>
+#include "t_stdlib.h"
+#include "syssvc/syslog.h"
+#include "kernel_cfg.h"
+#include "diskio.h"
+#include "sdfs.h"
+#include "ff.h"
+
+gpio_t ins;
+sdfs_t sdfs;
+#define WP() false
+
+extern FATFS RomDisk;
+extern unsigned char RamDisk[SZ_RAMDISK * 1024];
+
+bool_t romdisk_init();
+
+int mruby_arduino_init()
+{
+	int result = -1;
+
+	/* SD_CD */
+	gpio_init_in(&ins, P7_8);
+
+	/* SDã«ã¼ããåæå */
+	sdfs_init(&sdfs, P8_5, P8_6, P8_3, P8_4, "sd");
+
+	SD_begin();
+
+	FIL fd;
+	UINT rlen = 0;
+	memset(&fd, 0, sizeof(fd));
+	if (f_open(&fd, "1:/httpd-fs.bin", FA_OPEN_EXISTING | FA_READ) == FR_OK) {
+		f_read(&fd, RamDisk, SZ_RAMDISK * 1024, &rlen);
+		f_close(&fd);
+		if (romdisk_init())
+			result = 0;
+	}
+
+	if (result == 0) {
+		syslog(LOG_NOTICE, "ramdisk ok!");
+	}
+	else {
+		syslog(LOG_NOTICE, "ramdisk ng!");
+	}
+
+	arduino_init();
+
+	return result;
+}
+
+bool_t romdisk_init()
+{
+	DSTATUS dst;
+	FRESULT res;
+
+	if (RomDisk.fs_type != 0)
+		return true;
+
+	if ((dst = ramdisk_initialize()) != RES_OK) {
+		return false;
+	}
+
+	if ((res = f_mount(&RomDisk, "0:", 1)) != FR_OK) {
+		return false;
+	}
+
+	return true;
+}
+
+DSTATUS disk_initialize(BYTE pdrv)
+{
+	switch (pdrv) {
+	case 0:
+		return ramdisk_initialize();
+	case 1:
+		return sdfs_initialize(&sdfs);
+	}
+	return STA_NOINIT;
+}
+
+DSTATUS disk_status(BYTE pdrv)
+{
+	switch (pdrv) {
+	case 0:
+		return ramdisk_get_status();
+	case 1:
+		return sdfs_status(&sdfs);
+	}
+	return STA_NOINIT;
+}
+
+DRESULT disk_read(BYTE pdrv, BYTE *buff, DWORD sector, UINT count)
+{
+	switch (pdrv) {
+	case 0:
+		return ramdisk_read(buff, sector, count);
+	case 1:
+		return sdfs_read(&sdfs, buff, sector, count);
+	}
+	return RES_PARERR;
+}
+
+DRESULT disk_write(BYTE pdrv, const BYTE *buff, DWORD sector, UINT count)
+{
+	switch (pdrv) {
+	case 0:
+		return ramdisk_write(buff, sector, count);
+	case 1:
+		return sdfs_write(&sdfs, buff, sector, count);
+	}
+	return RES_PARERR;
+}
+
+DRESULT disk_ioctl(BYTE pdrv, BYTE cmd, void *buff)
+{
+	switch (pdrv) {
+	case 0:
+		return RES_PARERR; /* ramdisk_ioctl(cmd, buff); */
+	case 1:
+		switch(cmd) {
+		case CTRL_SYNC:
+			return sdfs_sync(&sdfs);
+		case GET_SECTOR_COUNT:
+			return sdfs_sectors(&sdfs);
+		case GET_BLOCK_SIZE:
+			*((DWORD*)buff) = 1; // default when not known
+			return RES_OK;
+		}
+	}
+	return RES_PARERR;
+}
+
+void sdfs_cychdr(intptr_t exinf)
+{
+	BYTE s;
+
+	s = sdfs._is_initialized;
+	if (WP())		/* Write protected */
+		s |= STA_PROTECT;
+	else		/* Write enabled */
+		s &= ~STA_PROTECT;
+	if (gpio_read(&ins))	/* Card is in socket */
+		s &= ~STA_NODISK;
+	else		/* Socket empty */
+		s |= (STA_NODISK | STA_NOINIT);
+	sdfs._is_initialized = s;
+}
+
+static int lock[TNUM_TSKID];
+static int stack_pos[TNUM_TSKID];
+
+void __malloc_lock(struct _reent *a)
+{
+	ID tskid;
+	ER ret;
+	int count, sp;
+
+	ret = get_tid(&tskid);
+	if (ret != E_OK) {
+		/*syslog(LOG_DEBUG, "get_tid %s", itron_strerror(ret));*/
+		Asm("bkpt #0");
+	}
+
+	Asm("mov %0, sp" : "=r"(sp) :);
+	if ((stack_pos[tskid - 1] == 0) || (stack_pos[tskid - 1] < sp))
+		stack_pos[tskid - 1] = sp;
+
+	count = ++lock[tskid - 1];
+	if (count != 1)
+		return;
+
+	ret = wai_sem(SEM_MALLOC);
+	if (ret != E_OK) {
+		/*syslog(LOG_DEBUG, "wai_sem %s", itron_strerror(ret));*/
+		Asm("bkpt #0");
+	}
+}
+
+void __malloc_unlock(struct _reent *a)
+{
+	ID tskid;
+	ER ret;
+	int count;
+
+	ret = get_tid(&tskid);
+	if (ret != E_OK) {
+		/*syslog(LOG_DEBUG, "get_tid %s", itron_strerror(ret));*/
+		Asm("bkpt #0");
+	}
+
+	count = --lock[tskid - 1];
+	if(count != 0)
+		return;
+
+	ret = sig_sem(SEM_MALLOC);
+	if (ret != E_OK) {
+		/*syslog(LOG_DEBUG, "sig_sem %s", itron_strerror(ret));*/
+		Asm("bkpt #0");
+	}
+}
+
+// Provide implementation of _sbrk (low-level dynamic memory allocation
+// routine) for GCC_ARM which compares new heap pointer with MSP instead of
+// SP.  This make it compatible with RTX RTOS thread stacks.
+
+// Linker defined symbol used by _sbrk to indicate where heap should start.
+int __end__;
+uint32_t  __HeapLimit;
+
+// Turn off the errno macro and use actual global variable instead.
+#undef errno
+int errno;
+
+static unsigned char* heap = (unsigned char*)&__end__;
+
+// Dynamic memory allocation related syscall.
+caddr_t _sbrk(int incr) {
+	unsigned char*        prev_heap = heap;
+	unsigned char*        new_heap = heap + incr;
+
+	if (new_heap >= (unsigned char*)&__HeapLimit) {     /* __HeapLimit is end of heap section */
+		errno = ENOMEM;
+		return (caddr_t)-1;
+	}
+
+	heap = new_heap;
+	return (caddr_t) prev_heap;
+}
+
+void reset_heap()
+{
+	// .data
+	extern uint8_t __malloc_av_[0x408];
+	extern uint8_t __malloc_sbrk_base[0x4];
+	extern uint8_t __malloc_trim_threshold[0x4];
+	// .bss
+	extern uint8_t __malloc_top_pad[0x4];
+	extern uint8_t __malloc_current_mallinfo[0x28];
+	extern uint8_t __malloc_max_sbrked_mem[0x4];
+	extern uint8_t __malloc_max_total_mem[0x4];
+	//
+	extern void *__etext;
+	extern void *__data_start__;
+
+	int offset = (int)&__etext - (int)&__data_start__;
+
+	__malloc_lock(_REENT);
+
+	memcpy(__malloc_av_, &__malloc_av_[offset], sizeof(__malloc_av_));
+	memcpy(__malloc_sbrk_base, &__malloc_sbrk_base[offset], sizeof(__malloc_sbrk_base));
+	memcpy(__malloc_trim_threshold, &__malloc_trim_threshold[offset], sizeof(__malloc_trim_threshold));
+
+	memset(__malloc_top_pad, 0, sizeof(__malloc_top_pad));
+	memset(__malloc_current_mallinfo, 0, sizeof(__malloc_current_mallinfo));
+	memset(__malloc_max_sbrked_mem, 0, sizeof(__malloc_max_sbrked_mem));
+	memset(__malloc_max_total_mem, 0, sizeof(__malloc_max_total_mem));
+
+	heap = (unsigned char*)&__end__;
+
+	__malloc_unlock(_REENT);
+}
+
+void exit(int return_code) {
+	Asm("bkpt #0");
+	reset_heap();
+	ext_tsk();
+	for(;;);
+}
Index: EcnlProtoTool/trunk/prototool/gr_peach/mruby_arduino.cfg
===================================================================
--- EcnlProtoTool/trunk/prototool/gr_peach/mruby_arduino.cfg	(revision 270)
+++ EcnlProtoTool/trunk/prototool/gr_peach/mruby_arduino.cfg	(revision 270)
@@ -0,0 +1,58 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2016 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#include "mruby_arduino.h"
+
+CRE_CYC(SDFS_CYC, { TA_NULL, { TNFY_HANDLER, 0, sdfs_cychdr }, 1000, 0 });
+
+CRE_SEM(SEM_MALLOC, { TA_TPRI, 1, 1 });
+
Index: EcnlProtoTool/trunk/prototool/gr_peach/mruby_arduino.h
===================================================================
--- EcnlProtoTool/trunk/prototool/gr_peach/mruby_arduino.h	(revision 270)
+++ EcnlProtoTool/trunk/prototool/gr_peach/mruby_arduino.h	(revision 270)
@@ -0,0 +1,59 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2014-2016 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ */
+
+#ifndef _MRUBY_ARDUINO_H_
+#define _MRUBY_ARDUINO_H_
+
+int mruby_arduino_init();
+void reset_heap();
+void sdfs_cychdr(intptr_t exinf);
+
+#endif	/* of #ifndef _MRUBY_ARDUINO_H_ */
Index: EcnlProtoTool/trunk/prototool/makefile.init
===================================================================
--- EcnlProtoTool/trunk/prototool/makefile.init	(revision 270)
+++ EcnlProtoTool/trunk/prototool/makefile.init	(revision 270)
@@ -0,0 +1,5 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+PATH := $(PATH):C:\PROGRA~2\KPIT\GNUARM~2.01-\ARM-NO~1\ARM-NO~1\bin;C:\PROGRA~2\KPIT\GNUARM~2.01-\ARM-NO~1\ARM-NO~1\libexec\gcc\arm-none-eabi\5.2-GNUARM-NONE_v16.01
Index: EcnlProtoTool/trunk/prototool/src/main.c
===================================================================
--- EcnlProtoTool/trunk/prototool/src/main.c	(revision 270)
+++ EcnlProtoTool/trunk/prototool/src/main.c	(revision 270)
@@ -0,0 +1,1146 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2014-2017 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  ãµã³ãã«ãã­ã°ã©ã (1)ã®æ¬ä½
+ */
+
+#include <kernel.h>
+#include <t_syslog.h>
+#include <t_stdlib.h>
+#include <sil.h>
+#include <stdlib.h>
+#include <string.h>
+#include "syssvc/serial.h"
+#include "syssvc/syslog.h"
+#include "kernel_cfg.h"
+#include "main.h"
+#include "rza1.h"
+#include <mruby.h>
+#include <mruby/compile.h>
+#include <mruby/proc.h>
+#include <mruby/array.h>
+#include <mruby/data.h>
+#include <mruby/class.h>
+#include <mruby/dump.h>
+#include <mruby/string.h>
+#include <tinet_config.h>
+#include <netinet/in.h>
+#include <netinet/in_itron.h>
+#include <tinet_nic_defs.h>
+#include <tinet_cfg.h>
+#include <netinet/in_var.h>
+#include <net/ethernet.h>
+#include <net/if6_var.h>
+#include <net/net.h>
+#include <net/if_var.h>
+#include <netinet/udp_var.h>
+#include <ethernet_api.h>
+#include "../webserver/httpd.h"
+#include "../webserver/httpd-fs.h"
+#include "../webserver/http-strings.h"
+#include "../webserver/base64.h"
+#include "../webserver/sha1.h"
+#include "mruby_arduino.h"
+#include "gpio_api.h"
+#include "arduino.h"
+#include "ff.h"
+
+#ifndef _MSC_VER
+void strcpy_s(char *dst, int size, const char *src);
+void strcat_s(char *dst, int size, const char *src);
+#endif
+
+uint8_t mac_addr[6] = {0x00, 0x30, 0x13, 0x06, 0x62, 0xC0};
+
+SYSTIM main_time;
+struct httpd_state *uploding;
+
+static void netif_link_callback(T_IFNET *ether);
+static void execute_ruby();
+
+/*  TCP éåä¿¡ã¦ã£ã³ããããã¡  */
+uint8_t tcp_swbuf1[TCP_SWBUF_SIZE];
+uint8_t tcp_rwbuf1[TCP_RWBUF_SIZE];
+uint8_t tcp_swbuf2[TCP_SWBUF_SIZE];
+uint8_t tcp_rwbuf2[TCP_RWBUF_SIZE];
+
+#define ISO_nl      0x0a
+#define ISO_space   0x20
+#define ISO_bang    0x21
+#define ISO_percent 0x25
+#define ISO_period  0x2e
+#define ISO_slash   0x2f
+#define ISO_colon   0x3a
+
+ID ecn_api_mailboxid;
+ID WEBSOCKET_MBXID;
+
+struct httpd_state httpd_state[2] = {
+	{MAIN1_TASK, TCP_CEPID1},
+	{MAIN2_TASK, TCP_CEPID2},
+};
+
+/*
+*  ãããã¯ã¼ã¯å±¤ã®é¸æ
+*/
+
+#ifdef SUPPORT_INET6
+
+#define TCP_ACP_CEP(c,r,d,t)	tcp6_acp_cep(c,r,d,t)
+#define IP2STR(s,a)		ipv62str(s,a)
+
+#else	/* of #ifdef SUPPORT_INET6 */
+
+#ifdef SUPPORT_INET4
+
+#define TCP_ACP_CEP(c,r,d,t)	tcp_acp_cep(c,r,d,t)
+#define IP2STR(s,a)		ip2str(s,a)
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+struct httpd_state *get_httpd(ID cepid)
+{
+	for (int i = 0; i < 2; i++) {
+		if (httpd_state[i].cepid != cepid)
+			continue;
+
+		return &httpd_state[i];
+	}
+	return NULL;
+}
+
+struct websocket *websocket_getws(ID wbsid)
+{
+	for (int i = 0; i < 2; i++) {
+		if (httpd_state[i].websocket.wbsid != wbsid)
+			continue;
+
+		return &httpd_state[i].websocket;
+	}
+	return NULL;
+}
+
+void send_file(struct httpd_state *s)
+{
+	char *buf;
+	int len, slen;
+
+	while (s->file.len > 0) {
+		slen = tcp_get_buf(s->cepid, (void **)&buf, TMO_FEVR);
+		if (slen < 0) {
+			syslog(LOG_ERROR, "send_file#tcp_get_buf(%s.%d) => %d", s->addr, ((T_IPV4EP *)s->dst)->portno, slen);
+			s->state = STATE_CLOSING;
+			break;
+		}
+		if (slen == 0)
+			return;
+
+		len = s->file.len;
+		if (len > slen)
+			len = slen;
+
+		len = httpd_fs_read(&s->file, buf, len);
+		if (len <= 0) {
+			syslog(LOG_ERROR, "send_file#httpd_fs_read(%s.%d) => %d", s->addr, ((T_IPV4EP *)s->dst)->portno, len);
+			break;
+		}
+
+		s->file.len -= len;
+		s->file.pos += len;
+
+		if ((slen = tcp_snd_buf(s->cepid, len)) != E_OK) {
+			syslog(LOG_ERROR, "send_file#tcp_snd_buf(%s.%d) => %d", s->addr, ((T_IPV4EP *)s->dst)->portno, slen);
+			s->state = STATE_CLOSING;
+			break;
+		}
+	}
+
+	syslog(LOG_NOTICE, "close:     %s.%d %s", s->addr, ((T_IPV4EP *)s->dst)->portno, s->filename);
+	httpd_fs_close(&s->file);
+	s->file.len = 0;
+	s->file.pos = 0;
+
+	s->out.state = OUT_STATE_SEND_END;
+}
+
+void send_data(struct httpd_state *s)
+{
+	char *buf;
+	int len, slen;
+
+	while (s->response_len > 0) {
+		slen = tcp_get_buf(s->cepid, (void **)&buf, TMO_FEVR);
+		if (slen < 0) {
+			syslog(LOG_ERROR, "send_data#tcp_get_buf(%s.%d) => %d", s->addr, ((T_IPV4EP *)s->dst)->portno, slen);
+			s->state = STATE_CLOSING;
+			break;
+		}
+		if (slen == 0)
+			return;
+
+		len = s->response_len;
+		if (len > slen)
+			len = slen;
+
+		memcpy(buf, &s->response_body[s->response_pos], len);
+
+		s->response_len -= len;
+		s->response_pos += len;
+
+		if ((slen = tcp_snd_buf(s->cepid, len)) != E_OK) {
+			syslog(LOG_ERROR, "send_data#tcp_snd_buf(%s.%d) => %d", s->addr, ((T_IPV4EP *)s->dst)->portno, slen);
+			s->state = STATE_CLOSING;
+			break;
+		}
+	}
+
+	s->response_body = NULL;
+	s->response_len = 0;
+	s->response_pos = 0;
+
+	s->out.state = OUT_STATE_SEND_END;
+}
+
+void send_headers(struct httpd_state *s, const char *statushdr)
+{
+	int len;
+	char *ptr;
+
+	len = strlen(statushdr);
+	tcp_snd_dat(s->cepid, (void *)statushdr, len, TMO_FEVR);
+
+	if ((s->filename[0] == '0') && (s->file.len > 0)) {
+		len = sizeof(http_content_encoding_gzip) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_content_encoding_gzip, len, TMO_FEVR);
+	}
+
+	if (s->file.redirect) {
+		len = sizeof(http_location) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_location, len, TMO_FEVR);
+		if (s->filename[0] == '1') {
+			len = 2;
+			tcp_snd_dat(s->cepid, "/~", len, TMO_FEVR);
+		}
+		len = strlen(s->filename);
+		tcp_snd_dat(s->cepid, s->filename, len, TMO_FEVR);
+		if (s->query != NULL) {
+			tcp_snd_dat(s->cepid, "?", 1, TMO_FEVR);
+			len = strlen(s->query);
+			tcp_snd_dat(s->cepid, s->query, len, TMO_FEVR);
+		}
+		len = 2;
+		tcp_snd_dat(s->cepid, "\r", len, TMO_FEVR);
+	}
+
+	ptr = strrchr(s->filename, ISO_period);
+	if (ptr == NULL) {
+		len = sizeof(http_content_type_binary) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_content_type_binary, len, TMO_FEVR);
+	}
+	else if (strncmp(http_html, ptr, sizeof(http_html) - 1) == 0 ||
+		strncmp(http_htm, ptr, sizeof(http_htm) - 1) == 0) {
+		len = sizeof(http_content_type_html) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_content_type_html, len, TMO_FEVR);
+	}
+	else if (strncmp(http_css, ptr, sizeof(http_css) - 1) == 0) {
+		len = sizeof(http_content_type_css) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_content_type_css, len, TMO_FEVR);
+	}
+	else if (strncmp(http_js, ptr, sizeof(http_js) - 1) == 0) {
+		len = sizeof(http_content_type_js) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_content_type_js, len, TMO_FEVR);
+	}
+	else if (strncmp(http_json, ptr, sizeof(http_json) - 1) == 0) {
+		len = sizeof(http_content_type_json) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_content_type_json, len, TMO_FEVR);
+	}
+	else if (strncmp(http_png, ptr, sizeof(http_png) - 1) == 0) {
+		len = sizeof(http_content_type_png) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_content_type_png, len, TMO_FEVR);
+	}
+	else if (strncmp(http_gif, ptr, sizeof(http_gif) - 1) == 0) {
+		len = sizeof(http_content_type_gif) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_content_type_gif, len, TMO_FEVR);
+	}
+	else if (strncmp(http_jpg, ptr, sizeof(http_jpg) - 1) == 0) {
+		len = sizeof(http_content_type_jpg) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_content_type_jpg, len, TMO_FEVR);
+	}
+	else if (strncmp(http_svg, ptr, sizeof(http_svg) - 1) == 0) {
+		len = sizeof(http_content_type_svg) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_content_type_svg, len, TMO_FEVR);
+	}
+	else if (strncmp(http_text, ptr, sizeof(http_text) - 1) == 0) {
+		len = sizeof(http_content_type_text) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_content_type_text, len, TMO_FEVR);
+	}
+	else if (strncmp(http_eot, ptr, sizeof(http_eot) - 1) == 0) {
+		len = sizeof(http_content_type_eot) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_content_type_eot, len, TMO_FEVR);
+	}
+	else if (strncmp(http_ttf, ptr, sizeof(http_ttf) - 1) == 0) {
+		len = sizeof(http_content_type_ttf) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_content_type_ttf, len, TMO_FEVR);
+	}
+	else if (strncmp(http_woff, ptr, sizeof(http_woff) - 1) == 0) {
+		len = sizeof(http_content_type_woff) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_content_type_woff, len, TMO_FEVR);
+	}
+	else if (strncmp(http_woff2, ptr, sizeof(http_woff2) - 1) == 0) {
+		len = sizeof(http_content_type_woff2) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_content_type_woff2, len, TMO_FEVR);
+	}
+	else if (strncmp(http_ico, ptr, sizeof(http_ico) - 1) == 0) {
+		len = sizeof(http_content_type_ico) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_content_type_ico, len, TMO_FEVR);
+	}
+	else {
+		len = sizeof(http_content_type_plain) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_content_type_plain, len, TMO_FEVR);
+	}
+
+	if (s->file.len > 0) {
+		len = sizeof(http_content_length) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_content_length, len, TMO_FEVR);
+		sprintf(s->temp, "%d\r\n", s->file.len);
+		tcp_snd_dat(s->cepid, (void *)s->temp, strlen(s->temp), TMO_FEVR);
+	}
+
+	if (s->message.should_keep_alive && s->reset == 0) {
+		len = sizeof(http_connection_keep_alive) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_connection_keep_alive, len, TMO_FEVR);
+	}
+	else {
+		len = sizeof(http_connection_close) - 1;
+		tcp_snd_dat(s->cepid, (void *)http_connection_close, len, TMO_FEVR);
+	}
+
+	tcp_snd_dat(s->cepid, (void *)http_crnl, 2, TMO_FEVR);
+
+	if (s->filename != NULL) {
+		s->out.state = OUT_STATE_SEND_FILE;
+	}
+	else {
+		s->out.state = OUT_STATE_SEND_DATA;
+	}
+}
+
+void handle_output(struct httpd_state *s)
+{
+	s->out.wait = false;
+
+	switch (s->out.state) {
+	case OUT_STATE_WAIT_REQUEST:
+		s->out.wait = true;
+		break;
+	case OUT_STATE_OPEN_GET_FILE:
+		syslog(LOG_NOTICE, "open:      %s.%d %s", s->addr, ((T_IPV4EP *)s->dst)->portno, s->filename);
+		if (!httpd_fs_open(s->filename, sizeof(s->message.request_url), &s->file)) {
+			s->filename = NULL;
+			s->response_body = http_content_404;
+			s->response_pos = 0;
+			s->response_len = sizeof(http_content_403) - 1;
+			s->out.statushdr = http_header_404;
+		}
+		else {
+			s->out.statushdr = s->file.redirect ? http_header_301 : http_header_200;
+		}
+		s->out.state = OUT_STATE_SEND_HEADER;
+		break;
+	case OUT_STATE_WAIT_POST_BODY:
+		s->out.wait = true;
+		break;
+	case OUT_STATE_BODY_RECEIVED:
+		s->out.statushdr = http_header_200;
+		s->out.state = OUT_STATE_SEND_HEADER;
+		break;
+	case OUT_STATE_SEND_HEADER:
+		send_headers(s, s->out.statushdr);
+		break;
+	case OUT_STATE_SEND_FILE:
+		send_file(s);
+		break;
+	case OUT_STATE_SEND_DATA:
+		send_data(s);
+		break;
+	case OUT_STATE_SEND_END:
+		s->out.wait = true;
+		if (s->message.should_keep_alive && s->reset == 0) {
+			s->out.state = OUT_STATE_WAIT_REQUEST;
+		}
+		else {
+			s->state = STATE_CLOSING;
+		}
+		break;
+	}
+}
+
+void send_ws_headers(struct httpd_state *s, const char *statushdr)
+{
+	int len;
+
+	len = strlen(statushdr);
+	tcp_snd_dat(s->cepid, (void *)statushdr, len, TMO_FEVR);
+
+	len = sizeof(http_upgrade) - 1;
+	tcp_snd_dat(s->cepid, (void *)http_upgrade, len, TMO_FEVR);
+	len = strlen(s->message.upgrade);
+	tcp_snd_dat(s->cepid, s->message.upgrade, len, TMO_FEVR);
+	len = sizeof(http_crnl) - 1;
+	tcp_snd_dat(s->cepid, (void *)http_crnl, len, TMO_FEVR);
+
+	len = sizeof(http_connection) - 1;
+	tcp_snd_dat(s->cepid, (void *)http_connection, len, TMO_FEVR);
+	len = strlen(s->message.connection);
+	tcp_snd_dat(s->cepid, s->message.connection, len, TMO_FEVR);
+	len = sizeof(http_crnl) - 1;
+	tcp_snd_dat(s->cepid, (void *)http_crnl, len, TMO_FEVR);
+
+	len = sizeof(http_sec_websocket_accept) - 1;
+	tcp_snd_dat(s->cepid, (void *)http_sec_websocket_accept, len, TMO_FEVR);
+	len = strlen(s->message.response_key);
+	tcp_snd_dat(s->cepid, s->message.response_key, len, TMO_FEVR);
+	len = sizeof(http_crnl) - 1;
+	tcp_snd_dat(s->cepid, (void *)http_crnl, len, TMO_FEVR);
+
+	len = sizeof(http_sec_websocket_protocol) - 1;
+	tcp_snd_dat(s->cepid, (void *)http_sec_websocket_protocol, len, TMO_FEVR);
+	len = strlen(s->message.sec_websocket_protocol);
+	tcp_snd_dat(s->cepid, s->message.sec_websocket_protocol, len, TMO_FEVR);
+	len = sizeof(http_crnl) - 1;
+	tcp_snd_dat(s->cepid, (void *)http_crnl, len, TMO_FEVR);
+
+	len = sizeof(http_crnl) - 1;
+	tcp_snd_dat(s->cepid, (void *)http_crnl, len, TMO_FEVR);
+}
+
+void send_ws_data(struct httpd_state *s)
+{
+	char *buf;
+	int slen;
+
+	slen = tcp_get_buf(s->cepid, (void **)&buf, TMO_FEVR);
+	if (slen < 0) {
+		syslog(LOG_ERROR, "send_ws_data#tcp_get_buf(%s.%d) => %d", s->addr, ((T_IPV4EP *)s->dst)->portno, slen);
+		return;
+	}
+
+	websocket_output(&s->websocket, buf, slen);
+}
+
+void handle_ws_output(struct httpd_state *s)
+{
+	char shaHash[20];
+	SHA_CTX sha1;
+	int len;
+
+	strlncat(s->message.response_key, sizeof(s->message.response_key),
+		s->message.sec_websocket_key, sizeof(s->message.sec_websocket_key));
+	len = strlncat(s->message.response_key, sizeof(s->message.response_key),
+		http_websocket_guid, sizeof(http_websocket_guid));
+	memset(shaHash, 0, sizeof(shaHash));
+	SHA1_Init(&sha1);
+	SHA1_Update(&sha1, (sha1_byte *)s->message.response_key, len);
+	SHA1_Final((sha1_byte *)shaHash, &sha1);
+	base64_encode((unsigned char *)s->message.response_key,
+		sizeof(s->message.response_key), (unsigned char *)shaHash, sizeof(shaHash));
+
+	send_ws_headers(s, http_header_101);
+
+	s->message.response_key[0] = '\0';
+
+	do {
+		while (!websocket_newdata(&s->websocket))
+			slp_tsk();
+
+		send_ws_data(s);
+	} while ((s->state == STATE_CONNECTED) && (!s->close_req));
+	s->state = STATE_DISCONNECTED;
+	websocket_destroy(&s->websocket);
+	s->close_req = 0;
+
+	s->state = STATE_CLOSING;
+}
+
+void handle_input(struct httpd_state *s)
+{
+	size_t done;
+	int len;
+
+	s->in.wait = false;
+
+	switch (s->in.state) {
+	case IN_STATE_START:
+		http_parser_init(&s->parser, HTTP_REQUEST);
+		s->in.state = IN_STATE_REQUEST;
+		break;
+	case IN_STATE_REQUEST:
+	case IN_STATE_RESPONSE:
+	case IN_STATE_UPLOAD:
+		if ((len = tcp_rcv_buf(s->cepid, (void **)&s->in.data, TMO_POL)) <= 0) {
+			if ((len == E_TMOUT) || (len == 0)) {
+				// 3ç§ã¯å¾
+ã¤
+				if (main_time - s->in.timer < 30000000) {
+					s->in.wait = true;
+					break;
+				}
+			}
+			syslog(LOG_ERROR, "handle_input#tcp_rcv_buf#%d(%s.%d) => %d", s->in.state, s->addr, ((T_IPV4EP *)s->dst)->portno, len);
+			uploding = NULL;
+			s->state = STATE_CLOSING;
+			return;
+		}
+		done = http_parser_execute(&s->parser, &websvr_settings, s->in.data, len);
+		tcp_rel_buf(s->cepid, done);
+		if (s->parser.http_errno != HPE_OK) {
+			syslog(LOG_ERROR, "http_parser error %s.%d => %d", s->addr, ((T_IPV4EP *)s->dst)->portno, s->parser.http_errno);
+			uploding = NULL;
+			s->state = STATE_CLOSING;
+			return;
+		}
+
+		s->parse_pos = done;
+		s->parse_len = len - done;
+		break;
+	case IN_STATE_UPLOAD_WAIT:
+		if (uploding != NULL) {
+			s->in.wait = true;
+		}
+		else {
+			uploding = s;
+			s->in.state = IN_STATE_UPLOAD;
+		}
+		break;
+	case IN_STATE_WEBSOCKET:
+		if (s->parse_len <= 0) {
+			if ((len = tcp_rcv_buf(s->cepid, (void **)&s->in.data, TMO_POL)) <= 0) {
+				if ((len == E_TMOUT) || (len == 0)) {
+					s->in.wait = true;
+					break;
+				}
+				syslog(LOG_ERROR, "handle_input#tcp_rcv_buf#%d(%s.%d) => %d", s->in.state, s->addr, ((T_IPV4EP *)s->dst)->portno, len);
+				s->state = STATE_CLOSING;
+				break;
+			}
+
+			s->parse_pos = 0;
+			s->parse_len = len;
+		}
+		else
+			len = s->parse_len;
+		done = websocket_input(&s->websocket, (void *)s->in.data, s->parse_len);
+		tcp_rel_buf(s->cepid, done);
+		if ((done != 0) || (s->websocket.rstate.opecode == connection_close)) {
+			s->close_req = 1;
+			s->state = STATE_CLOSING;
+			break;
+		}
+		s->parse_pos = done;
+		s->parse_len -= done;
+		break;
+	case IN_STATE_END:
+		s->in.wait = true;
+		break;
+	default:
+		s->state = STATE_CLOSING;
+		break;
+	}
+}
+
+/*
+ *  ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã®ã³ã¼ã«ããã¯é¢æ°
+ */
+ER
+callback_nblk_tcp(ID cepid, FN fncd, void *p_parblk)
+{
+	struct httpd_state *s = get_httpd(cepid);
+
+	if (s == NULL)
+		syslog(LOG_NOTICE, "callback_nblk_tcp(%d, %d)", fncd, cepid);
+	else
+		syslog(LOG_NOTICE, "callback_nblk_tcp(%d, %s.%d)", fncd, s->addr, ((T_IPV4EP *)s->dst)->portno);
+
+	return E_PAR;
+}
+
+/*
+ * ã¡ã¤ã³ã¿ã¹ã¯
+ */
+void main_task(intptr_t exinf)
+{
+	ER ret, ret2;
+	struct httpd_state *s = &httpd_state[exinf];
+
+	if (exinf == 0) {
+		gpio_t led_blue, led_green, led_red, sw;
+		gpio_init_out(&led_blue, LED_BLUE);
+		gpio_init_out(&led_green, LED_GREEN);
+		gpio_init_out(&led_red, LED_RED);
+		gpio_init_in(&sw, USER_BUTTON0);
+
+		bool_t exec = gpio_read(&sw) == 1;
+
+		gpio_write(&led_blue, 1);
+		gpio_write(&led_green, exec ? 1 : 0);
+		gpio_write(&led_red, 0);
+
+		/* åæå */
+		if (mruby_arduino_init() == 0) {
+			gpio_write(&led_blue, 0);
+		}
+		else {
+			gpio_write(&led_blue, 0);
+			gpio_write(&led_red, 1);
+		}
+
+		gpio_write(&led_green, 0);
+
+		/* TINETãèµ·åããã¾ã§å¾
+ã¤ */
+		ether_set_link_callback(netif_link_callback);
+
+		act_tsk(MAIN2_TASK);
+
+		if (exec) {
+			strcpy_s(RubyFilename, sizeof(RubyFilename), "1:/upload/main.mrb");
+
+			execute_ruby();
+		}
+	}
+
+	for (;;) {
+		ret2 = get_tim(&main_time);
+		if (ret2 != E_OK) {
+			syslog(LOG_ERROR, "get_tim");
+			return;
+		}
+
+		switch (s->state) {
+		case STATE_DISCONNECTED:
+			memset(&s->dst, 0, sizeof(s->dst));
+			if ((ret = TCP_ACP_CEP(s->cepid, TCP_REPID, (T_IPV4EP *)s->dst, TMO_FEVR)) != E_OK) {
+				syslog(LOG_ERROR, "tcp_acp_cep(%d) => %d", s->cepid, ret);
+				tslp_tsk(100000);	// TODO
+				s->state = STATE_CLOSING;
+				break;
+			}
+			IP2STR(s->addr, &((T_IPV4EP *)s->dst)->ipaddr);
+			syslog(LOG_NOTICE, "connected: %s.%d", s->addr, ((T_IPV4EP *)s->dst)->portno);
+			memset(&s->in, 0, sizeof(s->in));
+			memset(&s->out, 0, sizeof(s->out));
+			s->in.timer = main_time;
+			s->state = STATE_CONNECTED;
+			break;
+		case STATE_CONNECTED:
+			handle_input(s);
+			handle_output(s);
+			break;
+		case STATE_WEBSOCKET:
+			handle_input(s);
+			handle_ws_output(s);
+			break;
+		case STATE_CLOSING:
+			syslog(LOG_NOTICE, "close:     %s.%d", s->addr, ((T_IPV4EP *)s->dst)->portno);
+			tcp_sht_cep(s->cepid);
+			tcp_cls_cep(s->cepid, TMO_FEVR);
+
+			if (s->reset) {
+				s->reset = 0;
+				s->state = STATE_RESET;
+			}
+			else{
+				s->state = STATE_DISCONNECTED;
+			}
+			break;
+		case STATE_RESET:
+			execute_ruby();
+			s->state = STATE_DISCONNECTED;
+			break;
+		}
+
+		if (s->in.wait && s->out.wait) {
+			tslp_tsk(100000);
+		}
+	}
+}
+
+struct udp_msg {
+	T_IPV4EP dst;
+	int len;
+	uint8_t buffer[ETHER_MAX_LEN];
+};
+
+SYSTIM mruby_time;
+struct RClass *_module_target_board;
+
+extern const uint8_t main_rb_code[];
+uint8_t RubyCode[16 * 1024];
+
+/* MACã¢ãã¬ã¹ã®è¨­å®æã«å¼ã°ãã */
+void mbed_mac_address(char *mac)
+{
+	memcpy(mac, mac_addr, 6);
+}
+
+/*
+ *  mrubyå®è¡ã¿ã¹ã¯
+ */
+void mruby_task(intptr_t exinf)
+{
+	ER ret;
+	struct RProc* n;
+	struct mrb_irep *irep;
+	mrb_state *mrb;
+
+	syslog(LOG_NOTICE, "mruby_task");
+
+	/* mrubyã®åæå */
+	mrb = mrb_open();
+	if (mrb == NULL)
+		abort();
+
+	ret = get_tim(&mruby_time);
+	if (ret != E_OK) {
+		syslog(LOG_ERROR, "get_tim => %d", ret);
+		return;
+	}
+
+	irep = mrb_read_irep(mrb, RubyCode);
+	n = mrb_proc_new(mrb, irep);
+	mrb_run(mrb, n, mrb_nil_value());
+
+	mrb_close(mrb);
+}
+
+static void execute_ruby()
+{
+	FIL fd;
+	FRESULT res;
+	ER ret;
+
+	syslog(LOG_NOTICE, "execute_ruby");
+
+	ret = ter_tsk(MRUBY_TASK);
+	if ((ret != E_OK) && (ret != E_OBJ)) {
+		syslog(LOG_ERROR, "ter_tsk => %d", ret);
+	}
+
+	tslp_tsk(100000);
+
+	reset_heap();
+
+	strcpy_s(ExeFilename, sizeof(ExeFilename), RubyFilename);
+	RubyFilename[0] = '\0';
+	ExeFilename[sizeof(ExeFilename) - 1] = '\0';
+
+	if (ExeFilename[0] == '\0') {
+		return;
+	}
+
+	syslog(LOG_NOTICE, "%s", ExeFilename);
+
+	wai_sem(SEM_FILESYSTEM);
+
+	if ((res = f_open(&fd, ExeFilename, FA_OPEN_EXISTING | FA_READ)) == FR_OK) {
+		if (fd.fsize < sizeof(RubyCode)) {
+			int len = fd.fsize;
+			for (int pos = 0; pos < fd.fsize; pos += len) {
+				if (len > 1024)
+					len = 1024;
+
+				UINT rlen;
+				if ((res = f_read(&fd, &RubyCode[pos], len, &rlen)) != FR_OK)
+					break;
+
+				// ä»ã«ä½¿ãäººã®ããã«è§£æ¾
+				sig_sem(SEM_FILESYSTEM);
+				wai_sem(SEM_FILESYSTEM);
+			}
+		}
+		f_close(&fd);
+	}
+
+	sig_sem(SEM_FILESYSTEM);
+
+	if (res == FR_OK) {
+		ret = act_tsk(MRUBY_TASK);
+		if (ret != E_OK) {
+			syslog(LOG_ERROR, "act_tsk => %d", ret);
+		}
+	}
+}
+
+ER callback_nblk_udp(ID cepid, FN fncd, void *p_parblk)
+{
+	static struct udp_msg msg_inst[2];
+	static int msg_no = 0;
+	struct udp_msg *msg = &msg_inst[msg_no];
+	ER	error = E_OK;
+
+	switch (fncd) {
+	case TFN_UDP_CRE_CEP:
+	case TFN_UDP_RCV_DAT:
+		/* ECN_CAP_PUT("[UDP ECHO SRV] callback_nblk_udp() recv: %u", *(int *)p_parblk); */
+		memset(msg, 0, sizeof(struct udp_msg));
+		if ((msg->len = udp_rcv_dat(cepid, &msg->dst, msg->buffer, sizeof(msg->buffer), 0)) < 0) {
+			syslog(LOG_WARNING, "[UDP ECHO SRV] recv, error: %s", itron_strerror(msg->len));
+			return msg->len;
+		}
+		msg_no = (msg_no + 1) % 2;
+		return snd_dtq(MRUBY_DATAQUEUE, (intptr_t)msg);
+
+	case TFN_UDP_SND_DAT:
+		break;
+	default:
+		syslog(LOG_WARNING, "[UDP ECHO SRV] fncd:0x%04X(%s)", -fncd,
+			(fncd == TFN_UDP_CRE_CEP ? "TFN_UDP_CRE_CEP" :
+			(fncd == TFN_UDP_RCV_DAT ? "TFN_UDP_RCV_DAT" :
+				(fncd == TFN_UDP_SND_DAT ? "TFN_UDP_SND_DAT" : "undef"))));
+
+		error = E_PAR;
+		break;
+	}
+	return error;
+}
+
+static void netif_link_callback(T_IFNET *ether)
+{
+	static struct udp_msg msg_inst[2];
+	static int msg_no = 0;
+	struct udp_msg *msg = &msg_inst[msg_no];
+	T_RTSK rtsk;
+	ER ret;
+
+	ret = ref_tsk(MRUBY_TASK, &rtsk);
+	if ((ret != E_OK) || (rtsk.tskstat == TTS_DMT))
+		return;
+
+	memset(msg, 0, sizeof(struct udp_msg));
+
+	msg->len = 1;
+	msg->buffer[0] = ether->flags;
+
+	msg_no = (msg_no + 1) % 2;
+	snd_dtq(MRUBY_DATAQUEUE, (intptr_t)msg);
+}
+
+/*
+ * ã¢ããªã±ã¼ã·ã§ã³ã¿ã¹ã¯ã®ç»é²
+ */
+static mrb_value mrb_target_board_wait_msg(mrb_state *mrb, mrb_value self)
+{
+	TMO timer;
+	SYSTIM now;
+	ER ret, ret2;
+	struct udp_msg *msg;
+	mrb_value arv[3];
+	static int first = 1;
+
+	mrb_get_args(mrb, "i", &timer);
+	if (timer != TMO_FEVR)
+		timer *= 1000;
+
+	if (first) {
+		first = 0;
+		syslog(LOG_NOTICE, "wait_msg");
+	}
+
+	/* ã¡ãã»ã¼ã¸å¾
+ã¡ */
+	ret = trcv_dtq(MRUBY_DATAQUEUE, (intptr_t *)&msg, timer);
+	if ((ret != E_OK) && (ret != E_TMOUT)) {
+		syslog(LOG_ERROR, "trcv_dtq => %d", ret);
+		return mrb_nil_value();
+	}
+
+	ret2 = get_tim(&now);
+	if (ret2 != E_OK) {
+		syslog(LOG_ERROR, "get_tim => %d", ret);
+		return mrb_nil_value();
+	}
+
+	arv[0] = mrb_fixnum_value((now - mruby_time) / 1000);
+	mruby_time = now;
+
+	/* ã¿ã¤ã ã¢ã¦ãã®å ´å */
+	if (ret == E_TMOUT) {
+		return mrb_ary_new_from_values(mrb, 1, arv);
+	}
+
+	/* å
+é¨ã¤ãã³ãã®å ´å */
+	if (msg->dst.ipaddr == 0) {
+		/* Ethernet Link up */
+		if (msg->buffer[0] & IF_FLAG_LINK_UP) {
+			arv[1] = mrb_fixnum_value(1);
+		}
+		/* EP Link up */
+		else if (msg->buffer[0] & IF_FLAG_UP) {
+			arv[1] = mrb_fixnum_value(2);
+		}
+		else {
+			arv[1] = mrb_fixnum_value(0);
+		}
+
+		return mrb_ary_new_from_values(mrb, 2, arv);
+	}
+	/* Echoneté»æåä¿¡ã®å ´å */
+	else {
+		/* éä¿¡ç«¯ç¹ */
+		arv[1] = mrb_str_new(mrb, (char *)&msg->dst, sizeof(msg->dst));
+
+		/* åä¿¡ãã¼ã¿ */
+		arv[2] = mrb_str_new(mrb, (char *)msg->buffer, msg->len);
+
+		return mrb_ary_new_from_values(mrb, 3, arv);
+	}
+}
+
+/*
+ * ã¢ããªã±ã¼ã·ã§ã³ã¿ã¹ã¯ã®ç»é²
+ */
+static mrb_value mrb_target_board_restart(mrb_state *mrb, mrb_value self)
+{
+	/* DHCPéå§ */
+
+	return self;
+}
+
+/*
+ * éä¿¡ã¬ã¤ã¤ã¼ã¸ã®éä¿¡
+ */
+static mrb_value mrb_target_board_snd_msg(mrb_state *mrb, mrb_value self)
+{
+	mrb_value rep;
+	mrb_value rdat;
+	T_IPV4EP *ep;
+	ER_UINT ret;
+
+	mrb_get_args(mrb, "SS", &rep, &rdat);
+
+	if (RSTRING_LEN(rep) != sizeof(T_IPV4EP)) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "snd_msg");
+		return mrb_nil_value();
+	}
+
+	ep = (T_IPV4EP *)RSTRING_PTR(rep);
+
+	ret = udp_snd_dat(MRUBY_ECNL_UDP_CEPID, ep, RSTRING_PTR(rdat), RSTRING_LEN(rdat), TMO_FEVR);
+	if (ret < 0) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "snd_msg");
+		return mrb_nil_value();
+	}
+
+	return mrb_nil_value();
+}
+
+/*
+ * ã­ã¼ã«ã«ã¢ãã¬ã¹ãç¢ºèª
+ */
+static mrb_value mrb_target_board_is_local_addr(mrb_state *mrb, mrb_value self)
+{
+	mrb_value rep;
+	T_IPV4EP *ep;
+
+	mrb_get_args(mrb, "S", &rep);
+
+	if (RSTRING_LEN(rep) < sizeof(T_IPV4EP)) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "is_local_addr");
+		return mrb_nil_value();
+	}
+
+	ep = (T_IPV4EP *)RSTRING_PTR(rep);
+
+	return (ep->ipaddr == MAKE_IPV4_ADDR(127, 0, 0, 1)) ? mrb_true_value() : mrb_false_value();
+}
+
+/*
+ * ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ãç¢ºèª
+ */
+static mrb_value mrb_target_board_is_multicast_addr(mrb_state *mrb, mrb_value self)
+{
+	mrb_value rep;
+	T_IPV4EP *ep;
+
+	mrb_get_args(mrb, "S", &rep);
+
+	if (RSTRING_LEN(rep) < sizeof(T_IPV4EP)) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "is_multicast_addr");
+		return mrb_nil_value();
+	}
+
+	ep = (T_IPV4EP *)RSTRING_PTR(rep);
+
+	return (ep->ipaddr == MAKE_IPV4_ADDR(224, 0, 23, 0)) ? mrb_true_value() : mrb_false_value();
+}
+
+/*
+ * åä¸ã¢ãã¬ã¹ãç¢ºèª
+ */
+static mrb_value mrb_target_board_equals_addr(mrb_state *mrb, mrb_value self)
+{
+	mrb_value rep1, rep2;
+	T_IPV4EP *ep1, *ep2;
+
+	mrb_get_args(mrb, "SS", &rep1, &rep2);
+
+	if ((RSTRING_LEN(rep1) != sizeof(T_IPV4EP)) || (RSTRING_LEN(rep2) != sizeof(T_IPV4EP))) {
+		mrb_raise(mrb, E_RUNTIME_ERROR, "equals_addr");
+		return mrb_nil_value();
+	}
+
+	ep1 = (T_IPV4EP *)RSTRING_PTR(rep1);
+	ep2 = (T_IPV4EP *)RSTRING_PTR(rep2);
+
+	return (ep1->ipaddr == ep2->ipaddr) ? mrb_true_value() : mrb_false_value();
+}
+
+/*
+ * ã­ã¼ã«ã«ã¢ãã¬ã¹ã®åå¾
+ */
+static mrb_value mrb_target_board_get_local_addr(mrb_state *mrb, mrb_value self)
+{
+	T_IPV4EP ep;
+	mrb_value rep;
+
+	ep.ipaddr = MAKE_IPV4_ADDR(127, 0, 0, 1);
+	ep.portno = 3610;
+
+	rep = mrb_str_new(mrb, (char *)&ep, sizeof(ep));
+
+	return rep;
+}
+
+/*
+ * ãã«ãã­ã£ã¹ãã¢ãã¬ã¹ã®åå¾
+ */
+static mrb_value mrb_target_board_get_multicast_addr(mrb_state *mrb, mrb_value self)
+{
+	T_IPV4EP ep;
+	mrb_value rep;
+
+	ep.ipaddr = MAKE_IPV4_ADDR(224, 0, 23, 0);
+	ep.portno = 3610;
+
+	rep = mrb_str_new(mrb, (char *)&ep, sizeof(ep));
+
+	return rep;
+}
+
+void mrb_mruby_others_gem_init(mrb_state* mrb)
+{
+	_module_target_board = mrb_define_module(mrb, "TargetBoard");
+
+	// mbed Pin Names
+	mrb_define_const(mrb, _module_target_board, "LED1", mrb_fixnum_value(LED1));
+	mrb_define_const(mrb, _module_target_board, "LED2", mrb_fixnum_value(LED2));
+	mrb_define_const(mrb, _module_target_board, "LED3", mrb_fixnum_value(LED3));
+	mrb_define_const(mrb, _module_target_board, "LED4", mrb_fixnum_value(LED4));
+
+	mrb_define_const(mrb, _module_target_board, "LED_RED", mrb_fixnum_value(LED_RED));
+	mrb_define_const(mrb, _module_target_board, "LED_GREEN", mrb_fixnum_value(LED_GREEN));
+	mrb_define_const(mrb, _module_target_board, "LED_BLUE", mrb_fixnum_value(LED_BLUE));
+	mrb_define_const(mrb, _module_target_board, "LED_USER", mrb_fixnum_value(LED_USER));
+
+	mrb_define_const(mrb, _module_target_board, "USBTX", mrb_fixnum_value(USBTX));
+	mrb_define_const(mrb, _module_target_board, "USBRX", mrb_fixnum_value(USBRX));
+
+	// Arduiono Pin Names
+	mrb_define_const(mrb, _module_target_board, "D0", mrb_fixnum_value(D0));
+	mrb_define_const(mrb, _module_target_board, "D1", mrb_fixnum_value(D1));
+	mrb_define_const(mrb, _module_target_board, "D2", mrb_fixnum_value(D2));
+	mrb_define_const(mrb, _module_target_board, "D3", mrb_fixnum_value(D3));
+	mrb_define_const(mrb, _module_target_board, "D4", mrb_fixnum_value(D4));
+	mrb_define_const(mrb, _module_target_board, "D5", mrb_fixnum_value(D5));
+	mrb_define_const(mrb, _module_target_board, "D6", mrb_fixnum_value(D6));
+	mrb_define_const(mrb, _module_target_board, "D7", mrb_fixnum_value(D7));
+	mrb_define_const(mrb, _module_target_board, "D8", mrb_fixnum_value(D8));
+	mrb_define_const(mrb, _module_target_board, "D9", mrb_fixnum_value(D9));
+	mrb_define_const(mrb, _module_target_board, "D10", mrb_fixnum_value(D10));
+	mrb_define_const(mrb, _module_target_board, "D11", mrb_fixnum_value(D11));
+	mrb_define_const(mrb, _module_target_board, "D12", mrb_fixnum_value(D12));
+	mrb_define_const(mrb, _module_target_board, "D13", mrb_fixnum_value(D13));
+	mrb_define_const(mrb, _module_target_board, "D14", mrb_fixnum_value(D14));
+	mrb_define_const(mrb, _module_target_board, "D15", mrb_fixnum_value(D15));
+
+	mrb_define_const(mrb, _module_target_board, "A0", mrb_fixnum_value(A0));
+	mrb_define_const(mrb, _module_target_board, "A1", mrb_fixnum_value(A1));
+	mrb_define_const(mrb, _module_target_board, "A2", mrb_fixnum_value(A2));
+	mrb_define_const(mrb, _module_target_board, "A3", mrb_fixnum_value(A3));
+	mrb_define_const(mrb, _module_target_board, "A4", mrb_fixnum_value(A4));
+	mrb_define_const(mrb, _module_target_board, "A5", mrb_fixnum_value(A5));
+
+	mrb_define_const(mrb, _module_target_board, "I2C_SCL", mrb_fixnum_value(I2C_SCL));
+	mrb_define_const(mrb, _module_target_board, "I2C_SDA", mrb_fixnum_value(I2C_SDA));
+
+	mrb_define_const(mrb, _module_target_board, "USER_BUTTON0", mrb_fixnum_value(USER_BUTTON0));
+
+	// Not connected
+	mrb_define_const(mrb, _module_target_board, "NC", mrb_fixnum_value(NC));
+
+	mrb_define_class_method(mrb, _module_target_board, "wait_msg", mrb_target_board_wait_msg, MRB_ARGS_REQ(1));
+	mrb_define_class_method(mrb, _module_target_board, "restart", mrb_target_board_restart, MRB_ARGS_NONE());
+	mrb_define_class_method(mrb, _module_target_board, "snd_msg", mrb_target_board_snd_msg, MRB_ARGS_REQ(2));
+	mrb_define_class_method(mrb, _module_target_board, "is_local_addr", mrb_target_board_is_local_addr, MRB_ARGS_REQ(1));
+	mrb_define_class_method(mrb, _module_target_board, "is_multicast_addr", mrb_target_board_is_multicast_addr, MRB_ARGS_REQ(1));
+	mrb_define_class_method(mrb, _module_target_board, "equals_addr", mrb_target_board_equals_addr, MRB_ARGS_REQ(2));
+	mrb_define_class_method(mrb, _module_target_board, "get_local_addr", mrb_target_board_get_local_addr, MRB_ARGS_NONE());
+	mrb_define_class_method(mrb, _module_target_board, "get_multicast_addr", mrb_target_board_get_multicast_addr, MRB_ARGS_NONE());
+}
+
+void mrb_mruby_others_gem_final(mrb_state* mrb)
+{
+}
Index: EcnlProtoTool/trunk/prototool/src/main.cdl
===================================================================
--- EcnlProtoTool/trunk/prototool/src/main.cdl	(revision 270)
+++ EcnlProtoTool/trunk/prototool/src/main.cdl	(revision 270)
@@ -0,0 +1,125 @@
+/*
+ *		ãµã³ãã«ãã­ã°ã©ã (1)ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+ *
+ *  $Id$
+ */
+/*
+ *  ã«ã¼ãã«ãªãã¸ã§ã¯ãã®å®ç¾©
+ */
+import(<kernel.cdl>);
+
+/*
+ *  ã¿ã¼ã²ããéä¾å­ã®ã»ã«ã¿ã¤ãã®å®ç¾©
+ */
+import("syssvc/tSerialPort.cdl");
+import("syssvc/tSerialAdapter.cdl");
+import("syssvc/tSysLog.cdl");
+import("syssvc/tSysLogAdapter.cdl");
+import("syssvc/tLogTask.cdl");
+import("syssvc/tBanner.cdl");
+
+/*
+ *  ã¿ã¼ã²ããä¾å­é¨ã®åãè¾¼ã¿
+ */
+import("target.cdl");
+
+/*
+ *  ãã»ã«ã®çµä¸ãè¨è¿°ãã¨ã¯ï¼"cell"ã§å§ã¾ãè¡ããï¼ããã«å¯¾å¿ãã"};"
+ *  ã®è¡ã¾ã§ã®ãã¨ãè¨ãï¼
+ */
+
+/*
+ *  ã·ã¹ãã ã­ã°æ©è½ã®çµä¸ãè¨è¿°
+ *
+ *  ã·ã¹ãã ã­ã°æ©è½ãå¤ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°ãåé¤ãï¼ã³
+ *  ã³ãã¤ã«ãªãã·ã§ã³ã«-DTOPPERS_OMIT_SYSLOGãè¿½å ããã°ããï¼ãã ãï¼
+ *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¯ã·ã¹ãã ã­ã°æ©è½ãä½¿ç¨ããããï¼ãããå¤ããã¨
+ *  ãå¿
+è¦ã§ããï¼ã¾ãï¼ã·ã¹ãã ã­ã°æ©è½ã®ã¢ããã¿ãå¤ããªããã°ãªããª
+ *  ãï¼tecsgenãè­¦åã¡ãã»ã¼ã¸ãåºããï¼ç¡è¦ãã¦ããï¼
+ */
+cell tSysLog SysLog {
+	logBufferSize = 32;					/* ã­ã°ãããã¡ã®ãµã¤ãº */
+	initLogMask = C_EXP("LOG_UPTO(LOG_NOTICE)");
+										/* ã­ã°ãããã¡ã«è¨é²ãã¹ãéè¦åº¦ */
+	initLowMask = C_EXP("LOG_UPTO(LOG_EMERG)");
+									   	/* ä½ã¬ãã«åºåãã¹ãéè¦åº¦ */
+	/* ä½ã¬ãã«åºåã¨ã®çµå */
+	cPutLog = PutLogTarget.ePutLog;
+};
+
+/*
+ *  Cè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããï¼TECSãã¼ã¹ã®ã·ã¹ãã ã­ã°æ©è½
+ *  ãå¼ã³åºãããã®ã¢ããã¿ã®çµä¸ãè¨è¿°
+ *
+ *  ã·ã¹ãã ã­ã°æ©è½ã®ãµã¼ãã¹ã³ã¼ã«ï¼syslogé¢æ°ã¨syslog_0é¢æ°ï½syslog_5
+ *  é¢æ°ä»¥å¤ã®ãã®ï¼ã«ãCè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããå¼ã³åºããª
+ *  ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°ãåé¤ããã°ããï¼
+ */
+cell tSysLogAdapter SysLogAdapter {
+	cSysLog = SysLog.eSysLog;
+};
+
+/*
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®çµä¸ãè¨è¿°
+ *
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ããå¤ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨
+ *  è¿°ãåé¤ããã°ããï¼ãã ãï¼ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¯ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼
+ *  ã¹ãã©ã¤ããä½¿ç¨ããããï¼ãããå¤ããã¨ãå¿
+è¦ã§ããï¼ã¾ãï¼ã·ãªã¢
+ *  ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¢ããã¿ãå¤ããªããã°ãªããªãï¼
+ */
+cell tSerialPort SerialPort1 {
+	receiveBufferSize = 256;			/* åä¿¡ãããã¡ã®ãµã¤ãº */
+	sendBufferSize    = 256;			/* éä¿¡ãããã¡ã®ãµã¤ãº */
+
+	/* ã¿ã¼ã²ããä¾å­é¨ã¨ã®çµå */
+	cSIOPort = SIOPortTarget1.eSIOPort;
+	eiSIOCBR <= SIOPortTarget1.ciSIOCBR;	/* ã³ã¼ã«ããã¯ */
+};
+
+/*
+ *  Cè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããï¼TECSãã¼ã¹ã®ã·ãªã¢ã«ã¤ã³ã¿
+ *  ãã§ã¼ã¹ãã©ã¤ããå¼ã³åºãããã®ã¢ããã¿ã®çµä¸ãè¨è¿°
+ *
+ *  ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ãµã¼ãã¹ã³ã¼ã«ãCè¨èªã§è¨è¿°ãããã¢
+ *  ããªã±ã¼ã·ã§ã³ããå¼ã³åºããªãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°ãå
+ *  é¤ããã°ããï¼
+ */
+cell tSerialAdapter SerialAdapter {
+	cSerialPort[0] = SerialPort1.eSerialPort;
+};
+
+/*
+ *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®çµä¸ãè¨è¿°
+ *
+ *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ãå¤ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°ãåé¤ãã
+ *  ã°ããï¼
+ */
+cell tLogTask LogTask {
+	priority  = 3;					/* ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®åªå
+åº¦ */
+	stackSize = LogTaskStackSize;	/* ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº */
+
+	/* ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã¨ã®çµå */
+	cSerialPort        = SerialPort1.eSerialPort;
+	cnSerialPortManage = SerialPort1.enSerialPortManage;
+
+	/* ã·ã¹ãã ã­ã°æ©è½ã¨ã®çµå */
+	cSysLog = SysLog.eSysLog;
+
+	/* ä½ã¬ãã«åºåã¨ã®çµå */
+	cPutLog = PutLogTarget.ePutLog;
+};
+
+/*
+ *  ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸åºåã®çµä¸ãè¨è¿°
+ *
+ *  ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºåãå¤ãå ´åã«ã¯ï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°
+ *  ãåé¤ããã°ããï¼
+ */
+cell tBanner Banner {
+	/* å±æ§ã®è¨­å® */
+	targetName      = BannerTargetName;
+	copyrightNotice = BannerCopyrightNotice;
+};
Index: EcnlProtoTool/trunk/prototool/src/main.cfg
===================================================================
--- EcnlProtoTool/trunk/prototool/src/main.cfg	(revision 270)
+++ EcnlProtoTool/trunk/prototool/src/main.cfg	(revision 270)
@@ -0,0 +1,77 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2014-2016 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  ãµã³ãã«ãã­ã°ã©ã (1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+#include "main.h"
+#include <tinet_config.h>
+#include <netinet/in.h>
+#include <netinet/in_itron.h>
+#include <tinet_nic_defs.h>
+#include <netinet/in_var.h>
+#include <net/ethernet.h>
+#include <net/if6_var.h>
+
+INCLUDE("tecsgen.cfg");
+INCLUDE("tinet/tinet_asp.cfg");
+INCLUDE("tinet_main.cfg");
+/*#include "netapp/dhcp4_cli.h"*/
+/*INCLUDE("netapp/dhcp4_cli_asp.cfg");*/
+INCLUDE("mruby_arduino.cfg");
+
+CRE_TSK(MAIN1_TASK, { TA_ACT, 0, main_task, MAIN_PRIORITY, MAIN_STACK_SIZE, NULL });
+CRE_TSK(MAIN2_TASK, { TA_NULL, 1, main_task, MAIN_PRIORITY, MAIN_STACK_SIZE, NULL });
+CRE_SEM(SEM_FILESYSTEM, { TA_TPRI, 1, 1 });
+
+CRE_TSK(MRUBY_TASK, { TA_NULL, 0, mruby_task, MRUBY_PRIORITY, MRUBY_STACK_SIZE, NULL });
+CRE_DTQ(MRUBY_DATAQUEUE, { TA_TFIFO, 1, NULL });
Index: EcnlProtoTool/trunk/prototool/src/main.h
===================================================================
--- EcnlProtoTool/trunk/prototool/src/main.h	(revision 270)
+++ EcnlProtoTool/trunk/prototool/src/main.h	(revision 270)
@@ -0,0 +1,109 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2014-2017 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _MAIN_H_
+#define _MAIN_H_
+
+/*
+ *		ãµã³ãã«ãã­ã°ã©ã (1)ã®ããããã¡ã¤ã«
+ */
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®å®ç¾©
+ */
+#include <kernel.h>
+
+/*
+ *  åã¿ã¹ã¯ã®åªå
+åº¦ã®å®ç¾©
+ */
+
+#define MAIN_PRIORITY	5		/* ã¡ã¤ã³ã¿ã¹ã¯ã®åªå
+åº¦ */
+#define MRUBY_PRIORITY	4		/* mrubyå®è¡ã¿ã¹ã¯ã®åªå
+åº¦ */
+
+#define MAIN_STACK_SIZE		1024	/* ã¡ã¤ã³ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã®ãµã¤ãº */
+#define MRUBY_STACK_SIZE	16384	/* mrubyå®è¡ã®ã¹ã¿ãã¯é åã®ãµã¤ãº */
+
+ /*  TCP éåä¿¡ã¦ã£ã³ããããã¡ãµã¤ãº  */
+
+#define TCP_SWBUF_SIZE	1024
+#define TCP_RWBUF_SIZE	1024
+
+/*
+ *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+ /*  TCP éåä¿¡ã¦ã£ã³ããããã¡  */
+
+extern uint8_t tcp_swbuf1[];
+extern uint8_t tcp_rwbuf1[];
+extern uint8_t tcp_swbuf2[];
+extern uint8_t tcp_rwbuf2[];
+
+/* ã¡ã¤ã³ã¿ã¹ã¯ */
+extern void main_task(intptr_t exinf);
+
+/* mrubyå®è¡ã¿ã¹ã¯ */
+extern void mruby_task(intptr_t exinf);
+
+/* 
+ * ãã³ãã­ãã­ã³ã°ã³ã¼ã«ã®ã³ã¼ã«ããã¯é¢æ°
+ */
+extern ER callback_nblk_udp(ID cepid, FN fncd, void *p_parblk);
+extern ER callback_nblk_tcp(ID cepid, FN fncd, void *p_parblk);
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif	/* of #ifndef _MAIN_H_ */
Index: EcnlProtoTool/trunk/prototool/src/main.rb
===================================================================
--- EcnlProtoTool/trunk/prototool/src/main.rb	(revision 270)
+++ EcnlProtoTool/trunk/prototool/src/main.rb	(revision 270)
@@ -0,0 +1,418 @@
+# TOPPERSãã­ã¸ã§ã¯ã
+$MAKER_CODE = "\x00\x00\xB3"
+
+# ãã¼ããã­ãã¡ã¤ã«ãªãã¸ã§ã¯ã
+class LocalNode < ECNL::ENode
+	def initialize(eojx3)
+		# åä½ç¶æ
+
+		@operation_status = "\x30"
+		# ï¼¶ï½
+ï½ï½ï½ï½ï½æ
+å ±
+		@version_information = "\x01\x0A\x01\x00"
+		# è­å¥çªå·
+		@identification_number = 
+			# ä¸ä½éä¿¡å±¤IDãã£ã¼ã«ã
+			"\xFE" +
+			# ã¡ã¼ã«ã¼ã³ã¼ã
+			$MAKER_CODE +
+			# ã¦ãã¼ã¯IDé¨(ã¡ã¼ã«ã¼ç¬èª)
+			"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+		# ç°å¸¸å
+å®¹
+		@fault_content = "\x00\x00"
+		# ã¡ã¼ã«ã¼ã³ã¼ã
+		@manufacturer_code = $MAKER_CODE
+
+		# ã¤ã³ã¹ã¿ã³ã¹æ°
+		@inst_count = "\x00\x00\x01"
+		# ã¯ã©ã¹æ°
+		@class_count = "\x00\x02"
+		# ã¤ã³ã¹ã¿ã³ã¹ãªã¹ã
+		@inst_list = "\x01\x05\xff\x01"
+		# ã¯ã©ã¹ãªã¹ã
+		@class_list = "\x01\x05\xff"
+		# ã¢ãã¦ã³ã¹ãã­ããã£ããã
+		@anno_prpmap = "\x01\xd5"
+		# SETãã­ããã£ããã
+		@set_prpmap = "\x01\x80"
+		# GETãã­ããã£ããã
+		@get_prpmap = "\x0c\x80\x82\x83\x89\x8a\x9d\x9e\x9f\xd3\xd4\xd6\xd7"
+		# ãã­ããã£å®ç¾©
+		eprpinib_table = [
+			ECNL::EProperty.new(0x80, (ECNL::EPC_RULE_SET | ECNL::EPC_RULE_GET), @operation_status.length, :@operation_status, :onoff_prop_set, :data_prop_get),
+			ECNL::EProperty.new(0x82, (ECNL::EPC_RULE_GET), @version_information.length, :@version_information, :data_prop_set, :data_prop_get),
+			ECNL::EProperty.new(0x83, (ECNL::EPC_RULE_GET), @identification_number.length, :@identification_number, :data_prop_set, :data_prop_get),
+			ECNL::EProperty.new(0x89, (ECNL::EPC_RULE_GET), @fault_content.length, :fault_content, :@node_profile_object_fault_content_set, :data_prop_get),
+			ECNL::EProperty.new(0x8A, (ECNL::EPC_RULE_GET), @manufacturer_code.length, :@manufacturer_code, :data_prop_set, :data_prop_get),
+			ECNL::EProperty.new(0x9D, (ECNL::EPC_RULE_GET), @anno_prpmap.length, :@anno_prpmap, nil, :data_prop_get),
+			ECNL::EProperty.new(0x9E, (ECNL::EPC_RULE_GET), @set_prpmap.length, :@set_prpmap, nil, :data_prop_get),
+			ECNL::EProperty.new(0x9F, (ECNL::EPC_RULE_GET), @get_prpmap.length, :@get_prpmap, nil, :data_prop_get),
+			ECNL::EProperty.new(0xD3, (ECNL::EPC_RULE_GET), @inst_count.length, :@inst_count, nil, :data_prop_get),
+			ECNL::EProperty.new(0xD4, (ECNL::EPC_RULE_GET), @class_count.length, :@class_count, nil, :data_prop_get),
+			ECNL::EProperty.new(0xD5, (ECNL::EPC_RULE_ANNO), @inst_list.length, :@inst_list, nil, :data_prop_get),
+			ECNL::EProperty.new(0xD6, (ECNL::EPC_RULE_GET), @inst_list.length, :@inst_list, nil, :data_prop_get),
+			ECNL::EProperty.new(0xD7, (ECNL::EPC_RULE_GET), @class_list.length, :@class_list, nil, :data_prop_get)
+		]
+
+		super(eojx3, eprpinib_table)
+	end
+
+	# ç°å¸¸å
+å®¹è¨­å®é¢æ°
+	def node_profile_object_fault_content_set(prop, src)
+		# ãµã¤ãºã2ä»¥å¤ã¯åãä»ããªã
+		if (src.bytesize != 2) then
+			return 0
+		end
+
+		if (prop.anno) then
+			prop.set_anno(prop.exinf != src)
+		end
+
+		val = src.getbyte(0) << 8 | src.getbyte(1)
+
+		if ((val >= 0x0) && (val <= 0x3ec)) then
+			prop.set_exinf(val)
+			# TODO: ãã®ã®å ´åã®å¦ç
+		# ä¸è¨ä»¥å¤ã¯åãä»ããªã
+		else
+			return 0
+		end
+
+		return 2
+	end
+
+	# åä½ç¶æ
+ON/OFFè¨­å®é¢æ°ï¼0x30, 0x31ã®ã¿åãä»ãï¼
+	def onoff_prop_set(prop, src)
+		return 0
+	end
+end
+
+# ã³ã³ãã­ã¼ã©ã¼ã¯ã©ã¹
+class Controller < ECNL::EObject
+	def initialize(eojx3, enod)
+		# åä½ç¶æ
+
+		@operation_status = "\x30"
+		# è¨­ç½®å ´æ
+		@installation_location = "\x01\x0A\x01\x00"
+		# è¦æ ¼ï¼¶ï½
+ï½ï½ï½ï½ï½æ
+å ±
+		@standard_version_information = "\x00\x00C\x00"
+		# ç°å¸¸çºçç¶æ
+
+		@fault_status = "\x41"
+		# ã¡ã¼ã«ã¼ã³ã¼ã
+		@manufacturer_code = $MAKER_CODE
+
+		# ã¢ãã¦ã³ã¹ãã­ããã£ããã
+		@anno_prpmap = "\x03\x80\x81\x88"
+		# SETãã­ããã£ããã
+		@set_prpmap = "\x04\x80\x81\x97\x98"
+		# GETãã­ããã£ããã
+		@get_prpmap = "\x0a\x80\x81\x82\x88\x8a\x97\x98\x9d\x9e\x9f"
+		# ãã­ããã£å®ç¾©
+		eprpinib_table = [
+			ECNL::EProperty.new(0x80, (ECNL::EPC_RULE_SET | ECNL::EPC_RULE_GET | ECNL::EPC_ANNOUNCE), @operation_status.length, :@operation_status, :onoff_prop_set, :data_prop_get),
+			ECNL::EProperty.new(0x81, (ECNL::EPC_RULE_SET | ECNL::EPC_RULE_GET | ECNL::EPC_ANNOUNCE), @installation_location.length, :@installation_location, :data_prop_set, :data_prop_get),
+			ECNL::EProperty.new(0x82, (ECNL::EPC_RULE_GET), @standard_version_information.length, :@standard_version_information, :data_prop_set, :data_prop_get),
+			ECNL::EProperty.new(0x88, (ECNL::EPC_RULE_GET | ECNL::EPC_ANNOUNCE), @fault_status.length, :@fault_status, :alarm_prop_set, :data_prop_get),
+			ECNL::EProperty.new(0x8A, (ECNL::EPC_RULE_GET), @manufacturer_code.length, :@manufacturer_code, :data_prop_set, :data_prop_get),
+			ECNL::EProperty.new(0x97, (ECNL::EPC_RULE_SET | ECNL::EPC_RULE_GET), (2), nil, :time_prop_set, :time_prop_get),
+			ECNL::EProperty.new(0x98, (ECNL::EPC_RULE_SET | ECNL::EPC_RULE_GET), (4), nil, :date_prop_set, :date_prop_get),
+			ECNL::EProperty.new(0x9D, (ECNL::EPC_RULE_GET), @anno_prpmap.length, :@anno_prpmap, nil, :data_prop_get),
+			ECNL::EProperty.new(0x9E, (ECNL::EPC_RULE_GET), @set_prpmap.length, :@set_prpmap, nil, :data_prop_get),
+			ECNL::EProperty.new(0x9F, (ECNL::EPC_RULE_GET), @get_prpmap.length, :@get_prpmap, nil, :data_prop_get)
+		]
+
+		super(0x05, 0xFF, eojx3, enod, eprpinib_table)
+	end
+
+	# åä½ç¶æ
+ON/OFFè¨­å®é¢æ°ï¼0x30, 0x31ã®ã¿åãä»ãï¼
+	def onoff_prop_set(prop, src)
+		# ãµã¤ãºãï¼ä»¥å¤ã¯åãä»ããªã
+		if (src.bytesize != 1) then
+			return 0
+		end
+
+		if (prop.anno) then
+			prop.set_anno(prop.exinf != src)
+		end
+
+		case (src.getbyte(0))
+		# ONã®å ´å
+		when 0x30 then
+			prop.set_exinf(src)
+			# LEDã®"."ãON
+			digitalWrite(1, 1)
+		# OFFã®å ´å
+		when 0x31 then
+			prop.set_exinf(src)
+			# LEDã®"."ãOFF
+			digitalWrite(1, 0)
+		# 0x30ã0x31ä»¥å¤ã¯åãä»ããªã
+		else
+			return 0
+		end
+
+		return 1
+	end
+
+	# ç°å¸¸çºçç¶æ
+è¨­å®é¢æ°ï¼0x41, 0x42ã®ã¿åãä»ãï¼
+	def alarm_prop_set(prop, src)
+		# ãµã¤ãºãï¼ä»¥å¤ã¯åãä»ããªã
+		if (src.bytesize != 1) then
+			return 0
+		end
+
+		if (prop.anno) then
+			prop.set_anno(prop.exinf != src)
+		end
+
+		case (src.getbyte(0))
+		# ç°å¸¸çºçãã/ãªãã®å ´å
+		when 0x41,0x42 then
+			prop.set_exinf(src)
+		# 0x41ã0x42ä»¥å¤ã¯åãä»ããªã
+		else
+			return 0
+		end
+
+		return 1
+	end
+
+	# ç¾å¨å¹´ææ¥åå¾é¢æ°
+	def date_prop_get(prop, size)
+		# ãµã¤ãºãï¼ä»¥å¤ã¯åãä»ããªã
+		if (size != 4) then
+			return 0
+		end
+
+		time = Rtc.getTime
+
+		return ((time[0] & 0xFF00) >> 8).chr + (time[0] & 0xFF).chr + time[1].chr + time[2].chr
+	end
+
+	# ç¾å¨å¹´ææ¥è¨­å®é¢æ°
+	def date_prop_set(prop, src)
+		# ãµã¤ãºãï¼ä»¥å¤ã¯åãä»ããªã
+		if (src.bytesize != 4) then
+			return 0
+		end
+
+		time = Rtc.getTime
+		time[0] = (src.getbyte(0) << 8) | src.getbyte(1)
+		time[1] = src.getbyte(2)
+		time[2] = src.getbyte(3)
+		Rtc.setTime time[0], time[1], time[2], time[3], time[4], time[5]
+
+		return 4
+	end
+
+	# ç¾å¨æå»åå¾é¢æ°
+	def time_prop_get(prop, size)
+		# ãµã¤ãºãï¼ä»¥å¤ã¯åãä»ããªã
+		if (size != 2) then
+			return 0
+		end
+
+		time = Rtc.getTime
+
+		return time[3].chr + time[4].chr
+	end
+
+	# ç¾å¨æå»è¨­å®é¢æ°
+	def time_prop_set(prop, src)
+		# ãµã¤ãºãï¼ä»¥å¤ã¯åãä»ããªã
+		if (src.bytesize != 2) then
+			return 0
+		end
+
+		time = Rtc.getTime
+		time[3] = src.getbyte(0)
+		time[4] = src.getbyte(1)
+		Rtc.setTime time[0], time[1], time[2], time[3], time[4], time[5]
+
+		return 2
+	end
+end
+
+class EcnlTask < ECNL::SvcTask
+	def initialize()
+		@profile = LocalNode.new(0x01)
+		@devices = [ Controller.new(0x01, @profile) ]
+		@enodadrb_table = []
+
+		super()
+
+		# LEDãOFF
+		pinMode(TargetBoard::LED_USER, 1)
+		digitalWrite(TargetBoard::LED_USER, 0)
+		digitalWrite(TargetBoard::LED_BLUE, 0)
+
+		set_timer(1000)
+	end
+
+	def recv_esv(esv)
+		if (esv.esv != ECNL::ESV_GET_RES) && (esv.esv != ECNL::ESV_GET_SNA) then
+			return
+		end
+
+		itr = esv.itr_ini()
+		itr.itr_nxt()
+		until itr.is_eof do
+			if itr.epc == 0xD6 then
+				# LEDãON
+				digitalWrite(TargetBoard::LED_USER, 1)
+			end
+			itr.itr_nxt()
+		end
+	end
+
+	def break_wait(data)
+	end
+
+	def timeout()
+		esv = esv_get(nil, 0xD6)
+		snd_esv(esv)
+
+		set_timer(10000)
+	end
+
+	def snd_msg(ep, data)
+		# éä¿¡ã¬ã¤ã¤ã¼ã¸éä¿¡
+		TargetBoard::snd_msg(ep, data)
+	end
+
+	def is_local_addr(ep)
+		TargetBoard::is_local_addr(ep)
+	end
+
+	def is_multicast_addr(ep)
+		TargetBoard::is_multicast_addr(ep)
+	end
+
+	def is_valid_addrid(id)
+		(id >= 0) && ((id - ECNL::ENOD_REMOTE_ID) < @enodadrb_table.length)
+	end
+
+	def get_local_addr()
+		TargetBoard::get_local_addr()
+	end
+
+	def get_multicast_addr()
+		TargetBoard::get_multicast_addr()
+	end
+
+	def get_remote_addr(id)
+		index = id - ECNL::ENOD_REMOTE_ID
+		if (index < 0) || (index >= @enodadrb_table.length)
+			nil
+		else
+			@enodadrb_table[index]
+		end
+	end
+
+	# éä¿¡ã¬ã¤ã¤ã¼ã¢ãã¬ã¹ã®åããã®ãæ¤ç´¢
+	def get_remote_id(ep)
+		id = ECNL::ENOD_REMOTE_ID - 1
+		for ea in @enodadrb_table do
+			id += 1
+			if !ea then
+				next
+			end
+			if !TargetBoard::equals_addr(ea, ep) then
+				next
+			end
+
+			return id
+		end
+
+		return ECNL::ENOD_NOT_MATCH_ID
+	end
+
+	# å¯¾å¿ãããªã¢ã¼ããã¼ããæ¤ç´¢
+	def set_remote_addr(edata, ep)
+		id = ECNL::ENOD_REMOTE_ID - 1
+		for ea in @enodadrb_table do
+			id += 1
+			if !ea then
+				next
+			end
+			if !is_match(svc, edata, ep) then
+				next
+			end
+
+			# å¯¾å¿ãããªã¢ã¼ããã¼ããããã°éä¿¡ã¬ã¤ã¤ã¼ã¢ãã¬ã¹ãè¨­å®
+			@enodadrb_table[id - ECNL::ENOD_REMOTE_ID] = ep
+
+			return id
+		end
+
+		return ECNL::ENOD_NOT_MATCH_ID
+	end
+
+	# ç©ºãé åãæ¢ãã¦èªåç»é²
+	def add_remote_addr(edata, ep)
+		id = ECNL::ENOD_REMOTE_ID - 1
+		for ea in @enodadrb_table do
+			id += 1
+			if ea then
+				next
+			end
+
+			@enodadrb_table[id - ECNL::ENOD_REMOTE_ID] = ep
+
+			return id
+		end
+
+		if @enodadrb_table.length >= 100 then
+			return ECNL::ENOD_NOT_MATCH_ID
+		end
+
+		id = @enodadrb_table.length;
+		@enodadrb_table[id] = ep
+
+		return id + ECNL::ENOD_REMOTE_ID
+	end
+end
+
+ctrl = EcnlTask.new()
+
+# ã¡ã¤ã³ã«ã¼ã
+while (true) do
+	# ã¡ãã»ã¼ã¸å¾
+ã¡
+	ret = TargetBoard::wait_msg(ctrl.timer)
+	if !ret then
+		break;
+	end
+
+	# çµéæéã®è¨ç®
+	ctrl.progress ret[0]
+
+	# æ»ãå¤ãï¼ã¤ãªã
+	if ret.length == 2 then
+		# å
+é¨ã¤ãã³ã
+		case (ret[1])
+		when 1 then
+			TargetBoard::restart
+		when 2 then
+			ctrl.ntf_inl
+		end
+	# æ»ãå¤ãï¼ã¤ãªã
+	elsif ret.length == 3 then
+		# éä¿¡ã¬ã¤ã¤ã¼ããã®ã¡ãã»ã¼ã¸ï¼éä¿¡ç«¯ç¹ã¨é»æï¼
+		ctrl.recv_msg(ret[1], ret[2])
+	end
+
+	# ã¿ã¤ã ã¢ã¦ãã®å¦çãããã°è¡ã
+	ctrl.call_timeout
+end
Index: EcnlProtoTool/trunk/prototool/src/route_cfg.c
===================================================================
--- EcnlProtoTool/trunk/prototool/src/route_cfg.c	(revision 270)
+++ EcnlProtoTool/trunk/prototool/src/route_cfg.c	(revision 270)
@@ -0,0 +1,113 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/* 
+ *  ã«ã¼ãã£ã³ã°è¡¨
+ */
+
+#include <kernel.h>
+
+#include <tinet_defs.h>
+#include <tinet_config.h>
+
+#include <netinet/in.h>
+#include <netinet/in_var.h>
+
+/* IPv4 ã«é¢ããå®ç¾© */
+
+#ifdef SUPPORT_INET4
+
+#ifdef SUPPORT_LOOP
+
+T_IN4_RTENTRY routing_tbl[NUM_ROUTE_ENTRY] = {
+	{ 0, 0, 0 },
+	};
+
+#endif	/* of #ifdef SUPPORT_LOOP */
+
+#ifdef SUPPORT_PPP
+
+T_IN4_RTENTRY routing_tbl[NUM_ROUTE_ENTRY] = {
+	{ 0, 0, 0 },
+	};
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#ifdef SUPPORT_ETHER
+
+T_IN4_RTENTRY routing_tbl[NUM_ROUTE_ENTRY] = {
+
+	/* ç°ãªã LANãdefault gateway ã«ããéæ¥é
+é	*/
+	{ 0,			0,			IPV4_ADDR_DEFAULT_GW	},
+
+	/* åä¸ LAN å
+ãç´æ¥é
+é				*/
+	{ IPV4_ADDR_LOCAL &
+	  IPV4_ADDR_LOCAL_MASK,	IPV4_ADDR_LOCAL_MASK,	0			},
+
+	/* åä¸ LAN å
+ã¸ã®ãã­ã¼ãã­ã£ã¹ããç´æ¥é
+é	*/
+	{ 0xffffffff,		0xffffffff,		0			},
+
+	};
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+/* IPv6 ã«é¢ããå®ç¾© */
+
+#ifdef SUPPORT_INET6
+
+#if NUM_ROUTE_ENTRY > 0
+
+T_IN6_RTENTRY routing_tbl[NUM_ROUTE_ENTRY] = { };
+
+#endif	/* of #if NUM_ROUTE_ENTRY > 0 */
+
+#endif	/* of #ifdef SUPPORT_INET6 */
Index: EcnlProtoTool/trunk/prototool/src/tinet_app_config.h
===================================================================
--- EcnlProtoTool/trunk/prototool/src/tinet_app_config.h	(revision 270)
+++ EcnlProtoTool/trunk/prototool/src/tinet_app_config.h	(revision 270)
@@ -0,0 +1,681 @@
+/*
+ *  TINET (TCP/IP Protocol Stack)
+ * 
+ *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+ *                   Tomakomai National College of Technology, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation 
+ *  ã«ãã£ã¦å
+¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
+ *  è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
+ *  ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼
+ *  å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
+ *  å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
+ *  æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef _TINET_APP_CONFIG_H_
+#define _TINET_APP_CONFIG_H_
+
+/*
+ *  ã¤ã³ã¿ã¼ããããã­ãã³ã«ãã¡ããªã¼ã®ãµãã¼ã
+ *
+ *    Makefile ã§æå®ãã¦ãè¯ã
+ */
+
+/*#define SUPPORT_INET4		TCP/IP,IPv4		*/
+/*#define SUPPORT_INET6		TCP/IP,IPv6		*/
+/*#define SUPPORT_TCP		TCP			*/
+/*#define SUPPORT_UDP		UDP			*/
+
+/*ãã¼ã¿ãªã³ã¯å±¤ã®ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ãé¸æãã	*/
+/*ããããä¸ã¤ã ãé¸æã§ããã				*/
+
+/*#define SUPPORT_PPP		PointtoPointProtocol	*/
+/*#define SUPPORT_LOOP		LocalLoopBack		*/
+/*#define SUPPORT_ETHER		Ethernet		*/
+
+/*#define SUPPORT_MIB		MIB(SNMP)		*/
+
+/*
+ *  TCP/IP ã«é¢ããå®ç¾©
+ */
+
+/* TCP ã«é¢ããå®ç¾© */
+
+/*
+ *  TCPã®è½åãªã¼ãã³ã®ã¿ãµãã¼ããããã¨ãæå®ããã
+ */
+
+#ifdef UNDEF_TCP_CFG_PASSIVE_OPEN
+#undef TCP_CFG_PASSIVE_OPEN
+#endif
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®éåä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½
+ *    æ³¨æ: Makefile ã§æå®ãã¦ããã
+ */
+/*#define TCP_CFG_RWBUF_CSAVE_ONLY*/
+			/* TCP éä¿¡ç«¯ç¹ã®åä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ã®ã¿æå¹ã«ããã	*/
+/*#define TCP_CFG_RWBUF_CSAVE*/
+			/* TCP éä¿¡ç«¯ç¹ã®åä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãæå¹ã«ããã	*/
+/*#define TCP_CFG_SWBUF_CSAVE_ONLY*/
+			/* TCP éä¿¡ç«¯ç¹ã®éä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ã®ã¿æå¹ã«ããã	*/
+/*#define TCP_CFG_SWBUF_CSAVE*/
+			/* TCP éä¿¡ç«¯ç¹ã®éä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãæå¹ã«ããã	*/
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®åä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ã®ã
+ *  åä¿¡ã¦ã£ã³ããããã¡ã­ã¥ã¼ã®æå¤§ã¨ã³ããªæ°ã
+ *  ãã ããæ­£å¸¸ã«åä¿¡ããã»ã°ã¡ã³ããç ´æ£ãããããåéåæ°ãå¢å ããã
+ *  ã¾ããæå®ããªãã¨å¶éããªãã
+ */
+/*#define TCP_CFG_RWBUF_CSAVE_MAX_QUEUES	2*/
+
+/*
+ *  TCP éä¿¡ç«¯ç¹ã®éä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ã§ã
+ *  éä¿¡ã¦ã£ã³ããããã¡ã«ä½¿ç¨ãããããã¯ã¼ã¯ãããã¡ã®ãµã¤ãºã
+ */
+#define USE_TCP_MSS_SEG
+
+#ifdef USE_TCP_MSS_SEG
+
+#ifdef SUPPORT_INET4
+#define TCP_CFG_SWBUF_CSAVE_MAX_SIZE	(IF_HDR_SIZE + IP4_MSS)		/* æå¤§ãµã¤ãº */
+#endif
+
+#ifdef SUPPORT_INET6
+#define TCP_CFG_SWBUF_CSAVE_MAX_SIZE	(IF_HDR_SIZE + IPV6_MMTU)	/* æå¤§ãµã¤ãº */
+#endif
+
+#else	/* of #ifdef USE_TCP_MSS_SEG */
+
+#define TCP_CFG_SWBUF_CSAVE_MAX_SIZE	IF_PDU_SIZE			/* æå¤§ãµã¤ãº */
+
+#endif	/* of #ifdef USE_TCP_MSS_SEG */
+
+#define TCP_CFG_SWBUF_CSAVE_MIN_SIZE	0				/* æå°ãµã¤ãº */
+
+/*
+ *  TCP ã®ãã³ãã­ãã­ã³ã°ã³ã¼ã«æ©è½
+ */
+
+#ifdef UNDEF_TCP_CFG_NON_BLOCKING
+#undef TCP_CFG_NON_BLOCKING
+#endif
+
+/*
+ *  MAX_TCP_SND_SEG: éä¿¡ã»ã°ã¡ã³ããµã¤ãºã®æå¤§å¤
+ *
+ *    ç¸æãã MSS ãªãã·ã§ã³ã§ã»ã°ã¡ã³ããµã¤ãºãæå®ããã¦ãã
+ *    ãã®å¤ã§ãã»ã°ã¡ã³ããµã¤ãºãå¶éã§ããã
+ */
+
+#ifdef USE_TCP_MSS_SEG
+
+#ifdef MAX_TCP_SND_SEG
+#undef MAX_TCP_SND_SEG
+#endif
+
+#ifdef SUPPORT_INET4
+#define MAX_TCP_SND_SEG			TCP_MSS
+#endif
+
+#ifdef SUPPORT_INET6
+#define MAX_TCP_SND_SEG			TCP6_MSS
+#endif
+
+#endif	/* of #ifdef USE_TCP_MSS_SEG */
+
+/*
+ *  DEF_TCP_RCV_SEG: åä¿¡ã»ã°ã¡ã³ããµã¤ãºã®è¦å®å¤
+ */
+
+#ifdef USE_TCP_MSS_SEG
+
+#ifdef DEF_TCP_RCV_SEG
+#undef DEF_TCP_RCV_SEG
+#endif
+
+#ifdef SUPPORT_INET4
+#define DEF_TCP_RCV_SEG			TCP_MSS
+#endif
+
+#ifdef SUPPORT_INET6
+#define DEF_TCP_RCV_SEG			TCP6_MSS
+#endif
+
+#endif	/* of #ifdef USE_TCP_MSS_SEG */
+
+/*
+ *  ã¿ã¹ã¯ããã® Time Wait ç¶æ
+ã® TCP éä¿¡ç«¯ç¹åé¢æ©è½
+ *
+ *  Time Wait ç¶æ
+ã® TCP éä¿¡ç«¯ç¹ã®ã¨ã³ããªæ°ãæå®ããã
+ *  æå®ããªããã0 ãæå®ããã¨ã
+ *  ã¿ã¹ã¯ãã Time Wait ç¶æ
+ã® TCP éä¿¡ç«¯ç¹ãåé¢ããæ©è½ã¯çµè¾¼ã¾ãªãã
+ */
+#if !defined(SUPPORT_TCP)
+#define NUM_TCP_TW_CEP_ENTRY		0
+#elif defined(USE_TCP_MSS_SEG)
+#define NUM_TCP_TW_CEP_ENTRY		3
+#else
+#define NUM_TCP_TW_CEP_ENTRY		6
+#endif
+
+/*
+ *  TCP ãããã®ãã¬ã¼ã¹åºåæ©è½
+ */
+//#define TCP_CFG_TRACE
+
+/*
+ *  ãã¬ã¼ã¹åºåå¯¾è±¡ã®ãªã¢ã¼ããã¹ãã® IPv4 ã¢ãã¬ã¹
+ *  IPV4_ADDRANY ãæå®ããã¨ãå
+¨ã¦ã®ãã¹ããå¯¾è±¡ã¨ããã
+ */
+#define TCP_CFG_TRACE_IPV4_RADDR	IPV4_ADDRANY
+
+/*
+ *  ãã¬ã¼ã¹åºåå¯¾è±¡ã®ãªã¢ã¼ããã¹ãã®ãã¼ãçªå·
+ *  TCP_PORTANY ãæå®ããã¨ãå
+¨ã¦ã®ãã¼ãçªå·ãå¯¾è±¡ã«ããã
+ */
+#define TCP_CFG_TRACE_RPORTNO		TCP_PORTANY
+//#define TCP_CFG_TRACE_RPORTNO		UINT_C(7)
+
+/*
+ *  ãã¬ã¼ã¹åºåå¯¾è±¡ã®ã­ã¼ã«ã«ãã¹ãã®ãã¼ãçªå·
+ *  TCP_PORTANY ãæå®ããã¨ãå
+¨ã¦ã®ãã¼ãçªå·ãå¯¾è±¡ã«ããã
+ */
+#define TCP_CFG_TRACE_LPORTNO		TCP_PORTANY
+//#define TCP_CFG_TRACE_LPORTNO		UINT_C(7)
+
+/*
+ *  ITRON TCP/IP APIãTCP ã®æ¡å¼µæ©è½
+ */
+//#define TCP_CFG_EXTENTIONS
+
+/*
+ *  TCP_CFG_URG_OFFSET: ç·æ¥ãã¼ã¿ã®æå¾ã®ãã¤ãã®ãªãã»ãã
+ *
+ *    -1: BSD ã®å®è£
+ãç·æ¥ãã¤ã³ã¿ã¯ãç·æ¥ãã¼ã¿ã®æå¾ã®ãã¤ãã®æ¬¡ã®ãã¤ããå·®ãã
+ *     0: RFC1122 ã®è¦å®ãç·æ¥ãã¤ã³ã¿ã¯ãç·æ¥ãã¼ã¿ã®æå¾ã®ãã¤ããå·®ãã
+ */
+
+//#define TCP_CFG_URG_OFFSET	-1
+//#define TCP_CFG_URG_OFFSET	0
+
+/* UDP ã«é¢ããå®ç¾© */
+
+/*
+ *  UDP ã®ãã³ãã­ãã­ã³ã°ã³ã¼ã«æ©è½
+ */
+
+#ifdef UNDEF_UDP_CFG_NON_BLOCKING
+#undef UDP_CFG_NON_BLOCKING
+#endif
+
+/*
+ *  ITRON TCP/IP APIãUDP ã®æ¡å¼µæ©è½
+ */
+//#define UDP_CFG_EXTENTIONS
+
+/* IPv4 ã«é¢ããå®ç¾© */
+
+#ifdef SUPPORT_INET4
+
+#ifdef SUPPORT_PPP
+
+#if 1
+#define IPV4_ADDR_LOCAL			MAKE_IPV4_ADDR(192,168,1,21)
+#else
+#define IPV4_ADDR_LOCAL			MAKE_IPV4_ADDR(0,0,0,0)		/* ç¸æã«å²ãå½ã¦ã¦ãããå ´å	*/
+#endif
+
+#if 1
+#define IPV4_ADDR_REMOTE		MAKE_IPV4_ADDR(192,168,1,31)
+#else
+#define IPV4_ADDR_REMOTE		MAKE_IPV4_ADDR(0,0,0,0)		/* ç¸æã«å²ãå½ã¦ã¦ãããå ´å	*/
+#endif
+
+#define NUM_STATIC_ROUTE_ENTRY		1
+#define NUM_REDIRECT_ROUTE_ENTRY	0
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#ifdef SUPPORT_ETHER
+
+#ifdef DHCP_CFG
+
+#define IPV4_ADDR_LOCAL			MAKE_IPV4_ADDR(0,0,0,0)
+#define IPV4_ADDR_LOCAL_MASK		MAKE_IPV4_ADDR(0,0,0,0)
+#define IPV4_ADDR_DEFAULT_GW		MAKE_IPV4_ADDR(0,0,0,0)
+
+#else	/* of #ifdef DHCP_CFG */
+
+#define IPV4_ADDR_LOCAL			MAKE_IPV4_ADDR(192,168,137,110)
+#define IPV4_ADDR_LOCAL_MASK		MAKE_IPV4_ADDR(255,255,255,0)
+#define IPV4_ADDR_DEFAULT_GW		MAKE_IPV4_ADDR(192,168,137,1)
+
+#endif	/* of #ifdef DHCP_CFG */
+
+#define NUM_STATIC_ROUTE_ENTRY		3
+#define NUM_REDIRECT_ROUTE_ENTRY	1
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#ifdef SUPPORT_LOOP
+
+#define NUM_STATIC_ROUTE_ENTRY		1
+#define NUM_REDIRECT_ROUTE_ENTRY	0
+
+#endif	/* of #ifdef SUPPORT_LOOP */
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+/* IPv6 ã«é¢ããå®ç¾© */
+
+#ifdef SUPPORT_INET6
+
+#ifdef SUPPORT_PPP
+
+#define NUM_STATIC_ROUTE_ENTRY		0
+#define NUM_REDIRECT_ROUTE_ENTRY	0
+
+#endif	/* of #ifdef SUPPORT_PPP */
+
+#ifdef SUPPORT_LOOP
+
+#define NUM_STATIC_ROUTE_ENTRY		0
+#define NUM_REDIRECT_ROUTE_ENTRY	0
+
+#endif	/* of #ifdef SUPPORT_LOOP */
+
+#ifdef SUPPORT_ETHER
+
+#define NUM_STATIC_ROUTE_ENTRY		0
+#define NUM_REDIRECT_ROUTE_ENTRY	1
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+/*
+ *  ãã¼ã¿ãªã³ã¯å±¤ (ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹) ã«é¢ããå®ç¾©
+ */
+
+/*
+ *  ã¤ã¼ãµãããã«é¢ããå®ç¾©
+ */
+
+/*
+ *  PPP ã«é¢ããå®ç¾©
+ */
+
+#define HDLC_PORTID			1	/* HDLC(PPP)ã«ç¨ããã·ãªã¢ã«ãã¼ãçªå·	*/
+
+/*#define PPP_IDLE_TIMEOUT		(180*NET_TIMER_HZ)*/
+					/* åæ­ã¾ã§ã®ã¢ã¤ãã«æéã		*/
+					/* åæ­ããªãå ´åã¯ã³ã¡ã³ãã¢ã¦ãããã	*/
+
+/*#define PPP_CFG_MODEM			 ã¢ãã æ¥ç¶ã®å ´åã¯ã³ã¡ã³ããå¤ãã	*/
+
+#define MODEM_CFG_INIT			"ATE1&D0&S0\\V0\\Q1S0=1"
+					/* ã¢ãã åæåæå­å			*/
+					/* NTT DoComo ã¢ãã¤ã«ã¢ããã¿ 96F ç¨	*/
+					/*   E1: ã¨ã³ã¼ããã¯ãã			*/
+					/*  &D0: ERä¿¡å·ç¡è¦			*/
+					/*  &S0: DRä¿¡å·å¸¸æ ON			*/
+					/*  \V0: ãªã¶ã«ãã³ã¼ã TYPE 1		*/
+					/*  \Q1: XON/XOFF ãã­ã¼å¶å¾¡		*/
+					/* S0=1: èªåçä¿¡ãªã³ã°åæ° = 1 å	*/
+
+#define MODEM_CFG_PHONE_NUMBER		"090-xxxx-9242"
+
+					/* èªæ§ææ
+å ±ã®è¦å®å¤			*/
+#define DEF_LCP_LOCAL_CFGS		(LCP_CFG_MRU|LCP_CFG_ACCM|LCP_CFG_MAGIC|\
+					 LCP_CFG_ACCOMP|LCP_CFG_PCOMP|LCP_CFG_PAP)
+
+					/* ç¸æã«è¨±ãæ§ææ
+å ±ã®è¦å®å¤		*/
+#define DEF_LCP_REMOTE_CFGS		(LCP_CFG_MRU|LCP_CFG_ACCM|LCP_CFG_MAGIC|\
+					 LCP_CFG_ACCOMP|LCP_CFG_PCOMP|LCP_CFG_PAP)
+
+/*
+ *  èªè¨¼ã«é¢ããå®ç¾©
+ */
+
+#define AUTH_CFG_CLIENT		   	/* èªè¨¼ã¯ã©ã¤ã¢ã³ãã¢ã¼ãã®æã¯ã³ã¡ã³ããå¤ãã	*/
+#define AUTH_CFG_SERVER			/* èªè¨¼ãµã¼ãã¢ã¼ãã®æã¯ã³ã¡ã³ããå¤ãã		*/
+
+#define AUTH_LOCAL_USER			"h8"		/* èªãã¹ãã¸ã®ã­ã°ã¤ã³èªè¨¼ã¦ã¼ã¶å	*/
+#define AUTH_LOCAL_PASSWD		"3048f"		/* èªãã¹ãã¸ã®ã­ã°ã¤ã³èªè¨¼ãã¹ã¯ã¼ã	*/
+#define AUTH_REMOTE_USER		"pen3"		/* ç¸æã¸ã®ã­ã°ã¤ã³èªè¨¼ã¦ã¼ã¶å		*/
+#define AUTH_REMOTE_PASSWD		"600MHz"	/* ç¸æã¸ã®ã­ã°ã¤ã³èªè¨¼ãã¹ã¯ã¼ã		*/
+
+/*
+ *  ARP ã«é¢ããå®ç¾©
+ */
+
+/*#define ARP_CFG_CALLBACK_DUPLICATED*/	/* IP ã¢ãã¬ã¹éè¤æ¤åºã³ã¼ã«ããã¯é¢æ°ã	*/
+					/* å®ç¾©ããå ´åã¯ã³ã¡ã³ããå¤ãã		*/
+
+/*
+ *  ICMPv4/v6 ã«é¢ããå®ç¾©
+ */
+
+#ifdef USE_PING
+
+#define ICMP_CFG_CALLBACK_ECHO_REPLY	/* ICMP ECHO å¿ç­ãåä¿¡ããã¨ãå¼åºãã³ã¼ã«ããã¯é¢æ°ã	*/
+					/* å®ç¾©ããå ´åã¯ã³ã¡ã³ããå¤ãã			*/
+
+#endif	/* of #ifdef USE_PING */
+
+/*
+ *  ãããã¯ã¼ã¯ãããã¡ã«é¢ããå®ç¾©
+ */
+
+#ifdef SUPPORT_ETHER
+
+/*
+ *  ã¤ã¼ãµãããã®å ´åã®ãããã¯ã¼ã¯ãããã¡æ°ã®å²ãå½ã¦
+ */
+
+/*
+ *  64 ãªã¯ããã
+ *
+ *    IPv4 ã§ã®ã¿å²ãå½ã¦ãã
+ *
+ *    IPv6 ã§ã¯ãTCP å¶å¾¡ã»ã°ã¡ã³ãï¼CSEGãSDU ãªãï¼ãµã¤ãºã®
+ *    ãããã¯ã¼ã¯ãããã¡ï¼IF + IPv6 + TCP = 74ï¼ä»¥ä¸ã®
+ *    ãããã¯ã¼ã¯ãããã¡ã¯ä¸è¦ã§ããã
+ */
+
+#ifdef NUM_MPF_NET_BUF_64
+#undef NUM_MPF_NET_BUF_64
+#endif
+
+#ifdef SUPPORT_INET4
+#define NUM_MPF_NET_BUF_64		4
+#else
+#define NUM_MPF_NET_BUF_64		0
+#endif
+
+/*
+ *  CSEGï¼IF + IP + TCPï¼
+ *
+ *    IPv6 ã§ã®ã¿å²ãå½ã¦ãã
+ *
+ *    RX62N Ethernet Controler ã®ãã£ãã¤ã¹ãã©ã¤ãï¼if_rx62nï¼ã®æä½å²å½ã¦é·ã¯ã
+ *    ã¤ã¼ãµããããã¬ã¼ã ã®æç­é·ã§ãã 60ï¼CRC ã® 4 ãªã¯ããããé¤ãã
+ *    æ´ã«ã¢ã©ã¤ã³ãã¦ 62ï¼ãªã¯ãããã§ããã
+ *    å¾ã£ã¦ãIPv4 ã§ã¯ãCSEG ãµã¤ãºã®ãããã¯ã¼ã¯ãããã¡
+ *   ï¼IF + IPv4 + TCP = 54ï¼ã¯ä¸è¦ã§ããã
+ */
+
+#ifdef NUM_MPF_NET_BUF_CSEG
+#undef NUM_MPF_NET_BUF_CSEG
+#endif
+
+#ifdef SUPPORT_INET6
+#define NUM_MPF_NET_BUF_CSEG		4
+#else
+#define NUM_MPF_NET_BUF_CSEG		0
+#endif
+
+/*
+ *  128 ãªã¯ããã
+ *
+ *    IPv4 ã§ãTCP MSSï¼IP MSSãIF + 576 ãªã¯ãããï¼ã®
+ *    ãããã¯ã¼ã¯ãããã¡ãå²ãå½ã¦ãå ´åã
+ *    128 ãªã¯ãããã®ãããã¯ã¼ã¯ãããã¡ã¯å²ãå½ã¦ãªãã
+ */
+
+#ifdef NUM_MPF_NET_BUF_128
+#undef NUM_MPF_NET_BUF_128
+#endif
+
+#if defined(USE_TCP_MSS_SEG)
+#define NUM_MPF_NET_BUF_128		0
+#else
+#define NUM_MPF_NET_BUF_128		2
+#endif
+
+/*
+ *  256 ãªã¯ããã
+ *
+ *    IPv4 ã§ãTCP MSSï¼IP MSSãIF + 576 ãªã¯ãããï¼ã®
+ *    ãããã¯ã¼ã¯ãããã¡ãå²ãå½ã¦ãå ´åã
+ *    256 ãªã¯ãããã®ãããã¯ã¼ã¯ãããã¡ã¯å²ãå½ã¦ãªãã
+ */
+
+#ifdef NUM_MPF_NET_BUF_256
+#undef NUM_MPF_NET_BUF_256
+#endif
+
+#if defined(USE_TCP_MSS_SEG)
+#define NUM_MPF_NET_BUF_256		0
+#else
+#define NUM_MPF_NET_BUF_256		2
+#endif
+
+/*
+ *  512 ãªã¯ããã	
+ *
+ *    IPv4 ã§ãTCP MSSï¼IP MSSãIF + 576 ãªã¯ãããï¼ã®
+ *    ãããã¯ã¼ã¯ãããã¡ãå²ãå½ã¦ãå ´åã
+ *    512 ãªã¯ãããã®ãããã¯ã¼ã¯ãããã¡ã¯å²ãå½ã¦ãªãã
+ */
+
+#ifdef NUM_MPF_NET_BUF_512
+#undef NUM_MPF_NET_BUF_512
+#endif
+
+#if defined(USE_TCP_MSS_SEG)
+#define NUM_MPF_NET_BUF_512		0
+#else
+#define NUM_MPF_NET_BUF_512		2
+#endif
+
+/*
+ *  TCP MSSï¼IP MSSãIF + 576 ãªã¯ãããï¼
+ *
+ *   ã»IPv4 ã§ã®ã¿å²ãå½ã¦ãã
+ *   ã»éåä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãæå¹ã§ã
+ *     çã³ãã¼ API ãä½¿ç¨ããã¨ãã¯ã+1 å²ãå½ã¦ãã
+ */
+
+#ifdef NUM_MPF_NET_BUF_IP_MSS
+#undef NUM_MPF_NET_BUF_IP_MSS
+#endif
+
+#if defined(SUPPORT_INET4) && defined(USE_TCP_MSS_SEG)
+
+#if (defined(TCP_CFG_RWBUF_CSAVE)      || defined(TCP_CFG_SWBUF_CSAVE) ||	\
+     defined(TCP_CFG_RWBUF_CSAVE_ONLY) || defined(TCP_CFG_SWBUF_CSAVE_ONLY)) && defined(USE_COPYSAVE_API)
+#define NUM_MPF_NET_BUF_IP_MSS		6
+#else
+#define NUM_MPF_NET_BUF_IP_MSS		4	/* IF + 576 ãªã¯ããã	*/
+#endif
+
+#else	/* of #if defined(SUPPORT_INET4) && defined(USE_TCP_MSS_SEG) */
+
+#define NUM_MPF_NET_BUF_IP_MSS		0	/* IF + 576 ãªã¯ããã	*/
+
+#endif	/* of #if defined(SUPPORT_INET4) && defined(USE_TCP_MSS_SEG) */
+
+/*
+ *  1024 ãªã¯ããã	
+ *
+ *    TCP MSS ã®ãããã¯ã¼ã¯ãããã¡ãå²ãå½ã¦ãå ´åã
+ *    1024 ãªã¯ãããã®ãããã¯ã¼ã¯ãããã¡ã¯å²ãå½ã¦ãªãã
+ */
+
+#ifdef NUM_MPF_NET_BUF_1024
+#undef NUM_MPF_NET_BUF_1024
+#endif
+
+#if defined(USE_TCP_MSS_SEG)
+#define NUM_MPF_NET_BUF_1024		0	/* 1024 ãªã¯ããã	*/
+#else
+#define NUM_MPF_NET_BUF_1024		2	/* 1024 ãªã¯ããã	*/
+#endif
+
+/*
+ *  TCP MSSï¼IPV6 MMTUãIF + 1280 ãªã¯ãããï¼
+ *
+ *   ã»IPv6 ã§ã®ã¿å²ãå½ã¦ãã
+ *   ã»éåä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãæå¹ã§ã
+ *     çã³ãã¼ API ãä½¿ç¨ããã¨ãã¯ã+1 å²ãå½ã¦ãã
+ */
+
+#ifdef NUM_MPF_NET_BUF_IPV6_MMTU
+#undef NUM_MPF_NET_BUF_IPV6_MMTU
+#endif
+
+#if defined(SUPPORT_INET6) && (defined(USE_TCP_MSS_SEG) || defined(USE_IPV6_MMTU))
+
+#if (defined(TCP_CFG_RWBUF_CSAVE)      || defined(TCP_CFG_SWBUF_CSAVE) ||	\
+     defined(TCP_CFG_RWBUF_CSAVE_ONLY) || defined(TCP_CFG_SWBUF_CSAVE_ONLY)) && defined(USE_COPYSAVE_API)
+#define NUM_MPF_NET_BUF_IPV6_MMTU	6	/* IF + 1280	*/
+#else
+#define NUM_MPF_NET_BUF_IPV6_MMTU	4	/* IF + 1280	*/
+#endif
+
+#else	/* of #if defined(SUPPORT_INET6) && (defined(USE_TCP_MSS_SEG) || defined(USE_IPV6_MMTU)) */
+
+#define NUM_MPF_NET_BUF_IPV6_MMTU	0	/* IF + 1280	*/
+
+#endif	/* of #if defined(SUPPORT_INET6) && (defined(USE_TCP_MSS_SEG) || defined(USE_IPV6_MMTU)) */
+
+/*
+ *  IF æå¤§ PDU ãµã¤ãº
+ *
+ *   ã»TCP MSS ã®ãããã¯ã¼ã¯ãããã¡ãå²ãå½ã¦ãå ´åã
+ *     IF æå¤§ PDU ãµã¤ãºã®ãããã¯ã¼ã¯ãããã¡ã¯å²ãå½ã¦ãªãã
+ *   ã»éåä¿¡ã¦ã£ã³ããããã¡ã®çã³ãã¼æ©è½ãæå¹ã§ã
+ *     çã³ãã¼ API ãä½¿ç¨ããã¨ãã¯ã+1 å²ãå½ã¦ãã
+ */
+
+#ifdef NUM_MPF_NET_BUF_IF_PDU
+#undef NUM_MPF_NET_BUF_IF_PDU
+#endif
+
+#ifdef USE_TCP_MSS_SEG
+
+#define NUM_MPF_NET_BUF_IF_PDU		0
+
+#else	/* of #ifdef USE_TCP_MSS_SEG */
+
+#if (defined(TCP_CFG_RWBUF_CSAVE) || defined(TCP_CFG_SWBUF_CSAVE)) && defined(USE_COPYSAVE_API)
+#define NUM_MPF_NET_BUF_IF_PDU		12
+#else
+#define NUM_MPF_NET_BUF_IF_PDU		10
+#endif
+
+#endif	/* of #ifdef USE_TCP_MSS_SEG */
+
+/*
+ *  65536 ãªã¯ããã
+ *
+ *  ã»NET_BUF_CFG_LONG_LEN ãå®ç¾©ããã¨ãã®ã¿å²ãå½ã¦ãã
+ */
+
+#ifdef NET_BUF_CFG_LONG_LEN
+
+/* IPv6 ç¨ */
+
+#ifdef NUM_MPF_NET_BUF6_65536
+#undef NUM_MPF_NET_BUF6_65536
+#endif
+
+#if defined(USE_TCP_MSS_SEG)
+#define NUM_MPF_NET_BUF6_65536	0
+#else
+#define NUM_MPF_NET_BUF6_65536	4
+#endif
+
+#else	/* of ifdef NET_BUF_CFG_LONG_LEN */
+
+#define NUM_MPF_NET_BUF6_65536	0
+
+#endif	/* of ifdef NET_BUF_CFG_LONG_LEN */
+
+#endif	/* of #ifdef SUPPORT_ETHER */
+
+/*
+ *  DNS ãµã¼ãã«é¢ããå®ç¾©
+ */
+
+/* DNS ãµã¼ãã® IP ã¢ãã¬ã¹ */
+
+#if !defined(DHCP6_CLI_CFG)
+
+#define IPV6_ADDR_DNS_INIT	\
+	{{{ UINT_C(0xfd), UINT_C(0x90), UINT_C(0xcc), UINT_C(0xe5), \
+	    UINT_C(0x25), UINT_C(0xf6), UINT_C(0xff), UINT_C(0x81), \
+	    UINT_C(0x02), UINT_C(0xa0), UINT_C(0x24), UINT_C(0xff), \
+	    UINT_C(0xfe), UINT_C(0x56), UINT_C(0xc5), UINT_C(0xd6) }}}
+
+#endif	/* of #if !defined(DHCP6_CLI_CFG) */
+
+#if !defined(DHCP4_CLI_CFG)
+#define IPV4_ADDR_DNS		MAKE_IPV4_ADDR(192,168,2,1)
+#endif
+
+/* DOMAIN å */
+
+#if !(defined(DHCP4_CLI_CFG) || defined(DHCP6_CLI_CFG))
+#define RSLV_CFG_DNS_DOMAIN_NAME_STR	"jo.tomakomai-ct.ac.jp"
+#endif
+
+/*
+ *  DHCP ã¯ã©ã¤ã¢ã³ãã«é¢ããå®ç¾©
+ */
+
+/* DHCPv6 ã®åä½ã¢ã¼ãã®è¨­å® */
+
+#define DHCP6_CLI_CFG_MODE	DHCP6_CLI_CFG_STATELESS
+//#define DHCP6_CLI_CFG_MODE	DHCP6_CLI_CFG_STATEFULL
+
+#define ETHER_OUTPUT_PRIORITY	7	/* Ethernet åºåã¿ã¹ã¯ã®åªå
+åº¦		*/
+#define TCP_OUT_TASK_PRIORITY	6	/* TCP åºåã¿ã¹ã¯ã®åªå
+åº¦			*/
+#define NUM_DTQ_ETHER_OUTPUT	16	/* Ethernet åºåãã¼ã¿ã­ã¥ã¼ãµã¤ãº	*/
+
+#endif /* _TINET_APP_CONFIG_H_ */
Index: EcnlProtoTool/trunk/prototool/src/tinet_main.cfg
===================================================================
--- EcnlProtoTool/trunk/prototool/src/tinet_main.cfg	(revision 270)
+++ EcnlProtoTool/trunk/prototool/src/tinet_main.cfg	(revision 270)
@@ -0,0 +1,135 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2014 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+/*
+ *  ãããã¯ã¼ã¯å¯¾å¿ main.c ãã­ã°ã©ã ã® TCP/IP ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+/*#include "netapp/dhcp4_cli.h"*/
+#include "main.h"
+
+/* DHCP ã¯ã©ã¤ã¢ã³ã */
+/*INCLUDE("netapp/tinet_dhcp4_cli.cfg");*/
+
+/* ECHONET Lite UDP éä¿¡ç«¯ç¹ */
+
+#ifdef SUPPORT_INET4
+
+UDP_CRE_CEP (MRUBY_ECNL_UDP_CEPID,	 { TA_ACT, { IPV4_ADDRANY, 3610 }, (FP)callback_nblk_udp } );
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+#ifdef SUPPORT_INET6
+
+UDP6_CRE_CEP (MRUBY_ECNL_UDP_CEPID, { TA_NULL, { IPV6_ADDRANY, 3610 }, (FP)callback_nblk_udp } );
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+/* TCP åä»å£ */
+
+#ifdef SUPPORT_INET6
+
+TCP6_CRE_REP (TCP_REPID, { 0, { IPV6_ADDRANY, 80 } } );
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#ifdef SUPPORT_INET4
+
+TCP_CRE_REP (TCP_REPID,	 { 0, { IPV4_ADDRANY, 80 } } );
+
+#endif	/* of #ifdef SUPPORT_INET4 */
+
+/* TCP éä¿¡ç«¯ç¹ */
+
+#ifdef SUPPORT_INET6
+
+TCP6_CRE_CEP (TCP_CEPID1, {
+	0,
+	tcp_swbuf1,
+	TCP_SWBUF_SIZE,
+	tcp_rwbuf1,
+	TCP_RWBUF_SIZE,
+	(FP)callback_nblk_tcp
+	} );
+
+TCP6_CRE_CEP (TCP_CEPID2, {
+	0,
+	tcp_swbuf2,
+	TCP_SWBUF_SIZE,
+	tcp_rwbuf2,
+	TCP_RWBUF_SIZE,
+	(FP)callback_nblk_tcp
+	} );
+
+#endif	/* of #ifdef SUPPORT_INET6 */
+
+#ifdef SUPPORT_INET4
+
+TCP_CRE_CEP (TCP_CEPID1, {
+	0,
+	tcp_swbuf1,
+	TCP_SWBUF_SIZE,
+	tcp_rwbuf1,
+	TCP_RWBUF_SIZE,
+	(FP)callback_nblk_tcp
+	} );
+
+TCP_CRE_CEP (TCP_CEPID2, {
+	0,
+	tcp_swbuf2,
+	TCP_SWBUF_SIZE,
+	tcp_rwbuf2,
+	TCP_RWBUF_SIZE,
+	(FP)callback_nblk_tcp
+	} );
+
+#endif	/* of #ifdef SUPPORT_INET4 */
Index: EcnlProtoTool/trunk/prototool/webserver/base64.c
===================================================================
--- EcnlProtoTool/trunk/prototool/webserver/base64.c	(revision 270)
+++ EcnlProtoTool/trunk/prototool/webserver/base64.c	(revision 270)
@@ -0,0 +1,112 @@
+/*
+ * Copyright(c) 2010, Norio Kobota, All rights reserved.
+ */
+
+#include <string.h>
+#include <stdlib.h>
+
+#include "base64.h"
+
+static const char base64_encode_chars[] =
+	"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+	"abcdefghijklmnopqrstuvwxyz"
+	"0123456789+/";
+
+static const signed char base64_decode_chars[] = {
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1,  62, - 1, - 1, - 1,  63,
+	 52,  53,  54,  55,  56,  57,  58,  59,
+	 60,  61, - 1, - 1, - 1,   0, - 1, - 1,
+	- 1,   0,   1,   2,   3,   4,   5,   6,
+	  7,   8,   9,  10,  11,  12,  13,  14,
+	 15,  16,  17,  18,  19,  20,  21,  22,
+	 23,  24,  25, - 1, - 1, - 1, - 1, - 1,
+	- 1,  26,  27,  28,  29,  30,  31,  32,
+	 33,  34,  35,  36,  37,  38,  39,  40,
+	 41,  42,  43,  44,  45,  46,  47,  48,
+	 49,  50,  51, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1,
+	- 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1};
+
+int base64_encode(unsigned char *dst, size_t dstsiz, const unsigned char *src, size_t srcsiz) {
+    unsigned long x = 0UL;
+    int i = 0, l = 0;
+    unsigned char *pdst;
+
+    pdst = dst;
+    for (; srcsiz > 0; src++, srcsiz--) {
+        x = x << 8 | *src;
+        for (l += 8; l >= 6; l -= 6) {
+            if (i >= dstsiz)
+              return -1;
+            pdst[i++] = base64_encode_chars[(x >> (l - 6)) & 0x3f];
+        }
+    }
+    if (l > 0) {
+        x <<= 6 - l;
+        if (i >= dstsiz)
+          return -1;
+        pdst[i++] = base64_encode_chars[x & 0x3f];
+    }
+    for (; i % 4;) {
+        if (i >= dstsiz)
+          return -1;
+        pdst[i++] = '=';
+    }
+    if (i >= dstsiz)
+      return -1;
+    pdst[i] = '\0';
+    return i;
+}
+
+int base64_decode(unsigned char *dst, size_t dstsiz, const unsigned char *src) {
+    union {
+        unsigned long x;
+        char c[4];
+    } base64;
+    unsigned char *pdst;
+    int i, j = 0, k = 0;
+    size_t srcsiz = strlen((const char *)src);
+
+    if ((srcsiz % 4) != 0) {
+        return -1;
+    }
+    base64.x = 0UL;
+    pdst = dst;
+    for (; srcsiz > 0; src+=4, srcsiz-=4) {
+        for (i = 0; i < 4; i++) {
+            if (base64_decode_chars[src[i]] == -1) {
+                return -1;
+            }
+            base64.x = base64.x << 6 | base64_decode_chars[src[i]];
+            j += (src[i] == '=');
+        }
+        for (i = 3; i > j; i--, k++) {
+            if (k >= dstsiz)
+              return -1;
+            *pdst++ = base64.c[i - 1];
+        }
+    }
+    if (k >= dstsiz)
+      return -1;
+    *pdst = '\0';
+    return 0;
+}
Index: EcnlProtoTool/trunk/prototool/webserver/base64.h
===================================================================
--- EcnlProtoTool/trunk/prototool/webserver/base64.h	(revision 270)
+++ EcnlProtoTool/trunk/prototool/webserver/base64.h	(revision 270)
@@ -0,0 +1,45 @@
+/**
+ * Copyright(c) 2010, Norio Kobota, All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ *   this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * - Neither the name of the 'incremental' nor the names of its contributors
+ *   may be used to endorse or promote products derived from this software
+ *   without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef	_BASE64_H_
+#define	_BASE64_H_
+
+#include "stdio.h"
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+int base64_encode(unsigned char *, size_t , const unsigned char *, size_t);
+int base64_decode(unsigned char *, size_t , const unsigned char *);
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif	/* _BASE64_H_ */
Index: EcnlProtoTool/trunk/prototool/webserver/http-strings
===================================================================
--- EcnlProtoTool/trunk/prototool/webserver/http-strings	(revision 270)
+++ EcnlProtoTool/trunk/prototool/webserver/http-strings	(revision 270)
@@ -0,0 +1,68 @@
+http_http "http://"
+http_200 "200 "
+http_301 "301 "
+http_302 "302 "
+http_get "GET "
+http_10 "HTTP/1.0"
+http_11 "HTTP/1.1"
+http_content_type "content-type: "
+http_content_length "content-length: "
+http_texthtml "text/html"
+http_location "Location: "
+http_host "host: "
+http_crnl "\r\n"
+http_www "/www"
+http_upload "/upload/"
+http_index_html "/index.html"
+http_403_html "/403.html"
+http_404_html "/404.html"
+http_websocket "WebSocket"
+http_referer "Referer: "
+http_upgrade "Upgrade: "
+http_connection "Connection: "
+http_connection_close "Connection: close\r\n"
+http_connection_keep_alive "Connection: Keep-Alive\r\n"
+http_sec_websocket_accept "Sec-WebSocket-Accept: "
+http_sec_websocket_protocol "Sec-WebSocket-Protocol: "
+http_header_101 "HTTP/1.1 101 Switching Protocols\r\n"
+http_header_200 "HTTP/1.1 200 OK\r\nServer: TINET/1.5.4 http://www.toppers.jp/\r\n"
+http_header_301 "HTTP/1.1 301 Moved Permanently\r\nServer: TINET/1.5.4 http://www.toppers.jp/\r\nConnection: close\r\n"
+http_header_403 "HTTP/1.1 404 Forbidden\r\nServer: TINET/1.5.4 http://www.toppers.jp/\r\nConnection: close\r\n"
+http_header_404 "HTTP/1.1 404 Not found\r\nServer: TINET/1.5.4 http://www.toppers.jp/\r\nConnection: close\r\n"
+http_content_200 "<html><body bgcolor=\"white\"><center><h1>200 - OK</h1></center></body></html>"
+http_content_403 "<html><body bgcolor=\"white\"><center><h1>403 - forbidden</h1><h3>Go <a href=\"/\">here</a> instead.</h3></center></body></html>"
+http_content_404 "<html><body bgcolor=\"white\"><center><h1>404 - file not found</h1><h3>Go <a href=\"/\">here</a> instead.</h3></center></body></html>"
+http_content_encoding_gzip "Content-Encoding: gzip\r\n"
+http_websocket_guid "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
+http_content_type_plain "Content-type: text/plain\r\n"
+http_content_type_html "Content-type: text/html\r\n"
+http_content_type_css "Content-type: text/css\r\n"
+http_content_type_js "Content-type: text/javascript\r\n"
+http_content_type_json "Content-type: application/json\r\n"
+http_content_type_text "Content-type: text/text\r\n"
+http_content_type_png "Content-type: image/png\r\n"
+http_content_type_gif "Content-type: image/gif\r\n"
+http_content_type_jpg "Content-type: image/jpeg\r\n"
+http_content_type_svg "Content-type: image/svg+xml\r\n"
+http_content_type_eot "Content-type: application/vnd.ms-fontobject\r\n"
+http_content_type_ttf "Content-type: font/ttf\r\n"
+http_content_type_woff "Content-type: application/x-font-woff\r\n"
+http_content_type_woff2 "Content-type: font/woff2\r\n"
+http_content_type_ico "Content-type: image/x-icon\r\n"
+http_content_type_binary "Content-type: application/octet-stream\r\n"
+http_html ".html"
+http_shtml ".shtml"
+http_htm ".htm"
+http_css ".css"
+http_js  ".js"
+http_json ".json"
+http_png ".png"
+http_gif ".gif"
+http_jpg ".jpg"
+http_svg ".svg"
+http_text ".txt"
+http_eot ".eot"
+http_ttf ".ttf"
+http_woff ".woff"
+http_woff2 ".woff2"
+http_ico ".ico"
Index: EcnlProtoTool/trunk/prototool/webserver/http-strings.c
===================================================================
--- EcnlProtoTool/trunk/prototool/webserver/http-strings.c	(revision 270)
+++ EcnlProtoTool/trunk/prototool/webserver/http-strings.c	(revision 270)
@@ -0,0 +1,204 @@
+const char http_http[8] = 
+/* "http://" */
+{0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, };
+const char http_200[5] = 
+/* "200 " */
+{0x32, 0x30, 0x30, 0x20, };
+const char http_301[5] = 
+/* "301 " */
+{0x33, 0x30, 0x31, 0x20, };
+const char http_302[5] = 
+/* "302 " */
+{0x33, 0x30, 0x32, 0x20, };
+const char http_get[5] = 
+/* "GET " */
+{0x47, 0x45, 0x54, 0x20, };
+const char http_10[9] = 
+/* "HTTP/1.0" */
+{0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, };
+const char http_11[9] = 
+/* "HTTP/1.1" */
+{0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31, };
+const char http_content_type[15] = 
+/* "content-type: " */
+{0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, };
+const char http_content_length[17] = 
+/* "content-length: " */
+{0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, };
+const char http_texthtml[10] = 
+/* "text/html" */
+{0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, };
+const char http_location[11] = 
+/* "Location: " */
+{0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, };
+const char http_host[7] = 
+/* "host: " */
+{0x68, 0x6f, 0x73, 0x74, 0x3a, 0x20, };
+const char http_crnl[3] = 
+/* "\r\n" */
+{0xd, 0xa, };
+const char http_www[5] = 
+/* "/www" */
+{0x2f, 0x77, 0x77, 0x77, };
+const char http_upload[9] = 
+/* "/upload/" */
+{0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x2f, };
+const char http_index_html[12] = 
+/* "/index.html" */
+{0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, };
+const char http_403_html[10] = 
+/* "/403.html" */
+{0x2f, 0x34, 0x30, 0x33, 0x2e, 0x68, 0x74, 0x6d, 0x6c, };
+const char http_404_html[10] = 
+/* "/404.html" */
+{0x2f, 0x34, 0x30, 0x34, 0x2e, 0x68, 0x74, 0x6d, 0x6c, };
+const char http_websocket[10] = 
+/* "WebSocket" */
+{0x57, 0x65, 0x62, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, };
+const char http_referer[10] = 
+/* "Referer: " */
+{0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 0x3a, 0x20, };
+const char http_upgrade[10] = 
+/* "Upgrade: " */
+{0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x3a, 0x20, };
+const char http_connection[13] = 
+/* "Connection: " */
+{0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, };
+const char http_connection_close[20] = 
+/* "Connection: close\r\n" */
+{0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0xd, 0xa, };
+const char http_connection_keep_alive[25] = 
+/* "Connection: Keep-Alive\r\n" */
+{0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x4b, 0x65, 0x65, 0x70, 0x2d, 0x41, 0x6c, 0x69, 0x76, 0x65, 0xd, 0xa, };
+const char http_sec_websocket_accept[23] = 
+/* "Sec-WebSocket-Accept: " */
+{0x53, 0x65, 0x63, 0x2d, 0x57, 0x65, 0x62, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2d, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20, };
+const char http_sec_websocket_protocol[25] = 
+/* "Sec-WebSocket-Protocol: " */
+{0x53, 0x65, 0x63, 0x2d, 0x57, 0x65, 0x62, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x3a, 0x20, };
+const char http_header_101[35] = 
+/* "HTTP/1.1 101 Switching Protocols\r\n" */
+{0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31, 0x20, 0x31, 0x30, 0x31, 0x20, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0xd, 0xa, };
+const char http_header_200[62] = 
+/* "HTTP/1.1 200 OK\r\nServer: TINET/1.5.4 http://www.toppers.jp/\r\n" */
+{0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0xd, 0xa, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x54, 0x49, 0x4e, 0x45, 0x54, 0x2f, 0x31, 0x2e, 0x35, 0x2e, 0x34, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x6a, 0x70, 0x2f, 0xd, 0xa, };
+const char http_header_301[96] = 
+/* "HTTP/1.1 301 Moved Permanently\r\nServer: TINET/1.5.4 http://www.toppers.jp/\r\nConnection: close\r\n" */
+{0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31, 0x20, 0x33, 0x30, 0x31, 0x20, 0x4d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x50, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0xd, 0xa, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x54, 0x49, 0x4e, 0x45, 0x54, 0x2f, 0x31, 0x2e, 0x35, 0x2e, 0x34, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x6a, 0x70, 0x2f, 0xd, 0xa, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0xd, 0xa, };
+const char http_header_403[88] = 
+/* "HTTP/1.1 404 Forbidden\r\nServer: TINET/1.5.4 http://www.toppers.jp/\r\nConnection: close\r\n" */
+{0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31, 0x20, 0x34, 0x30, 0x34, 0x20, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0xd, 0xa, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x54, 0x49, 0x4e, 0x45, 0x54, 0x2f, 0x31, 0x2e, 0x35, 0x2e, 0x34, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x6a, 0x70, 0x2f, 0xd, 0xa, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0xd, 0xa, };
+const char http_header_404[88] = 
+/* "HTTP/1.1 404 Not found\r\nServer: TINET/1.5.4 http://www.toppers.jp/\r\nConnection: close\r\n" */
+{0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31, 0x20, 0x34, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x74, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0xd, 0xa, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x54, 0x49, 0x4e, 0x45, 0x54, 0x2f, 0x31, 0x2e, 0x35, 0x2e, 0x34, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x6a, 0x70, 0x2f, 0xd, 0xa, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0xd, 0xa, };
+const char http_content_200[79] = 
+/* "<html><body bgcolor=\"white\"><center><h1>200 - OK</h1></center></body></html>" */
+{0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3d, 0x5c, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x5c, 0x22, 0x3e, 0x3c, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e, 0x3c, 0x68, 0x31, 0x3e, 0x32, 0x30, 0x30, 0x20, 0x2d, 0x20, 0x4f, 0x4b, 0x3c, 0x2f, 0x68, 0x31, 0x3e, 0x3c, 0x2f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, };
+const char http_content_403[129] = 
+/* "<html><body bgcolor=\"white\"><center><h1>403 - forbidden</h1><h3>Go <a href=\"/\">here</a> instead.</h3></center></body></html>" */
+{0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3d, 0x5c, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x5c, 0x22, 0x3e, 0x3c, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e, 0x3c, 0x68, 0x31, 0x3e, 0x34, 0x30, 0x33, 0x20, 0x2d, 0x20, 0x66, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x3c, 0x2f, 0x68, 0x31, 0x3e, 0x3c, 0x68, 0x33, 0x3e, 0x47, 0x6f, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x5c, 0x22, 0x2f, 0x5c, 0x22, 0x3e, 0x68, 0x65, 0x72, 0x65, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, 0x2e, 0x3c, 0x2f, 0x68, 0x33, 0x3e, 0x3c, 0x2f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, };
+const char http_content_404[134] = 
+/* "<html><body bgcolor=\"white\"><center><h1>404 - file not found</h1><h3>Go <a href=\"/\">here</a> instead.</h3></center></body></html>" */
+{0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3d, 0x5c, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x5c, 0x22, 0x3e, 0x3c, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e, 0x3c, 0x68, 0x31, 0x3e, 0x34, 0x30, 0x34, 0x20, 0x2d, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x3c, 0x2f, 0x68, 0x31, 0x3e, 0x3c, 0x68, 0x33, 0x3e, 0x47, 0x6f, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x5c, 0x22, 0x2f, 0x5c, 0x22, 0x3e, 0x68, 0x65, 0x72, 0x65, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, 0x2e, 0x3c, 0x2f, 0x68, 0x33, 0x3e, 0x3c, 0x2f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, };
+const char http_content_encoding_gzip[25] = 
+/* "Content-Encoding: gzip\r\n" */
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x67, 0x7a, 0x69, 0x70, 0xd, 0xa, };
+const char http_websocket_guid[37] = 
+/* "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" */
+{0x32, 0x35, 0x38, 0x45, 0x41, 0x46, 0x41, 0x35, 0x2d, 0x45, 0x39, 0x31, 0x34, 0x2d, 0x34, 0x37, 0x44, 0x41, 0x2d, 0x39, 0x35, 0x43, 0x41, 0x2d, 0x43, 0x35, 0x41, 0x42, 0x30, 0x44, 0x43, 0x38, 0x35, 0x42, 0x31, 0x31, };
+const char http_content_type_plain[27] = 
+/* "Content-type: text/plain\r\n" */
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0xd, 0xa, };
+const char http_content_type_html[26] = 
+/* "Content-type: text/html\r\n" */
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0xd, 0xa, };
+const char http_content_type_css[25] = 
+/* "Content-type: text/css\r\n" */
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0xd, 0xa, };
+const char http_content_type_js[32] = 
+/* "Content-type: text/javascript\r\n" */
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0xd, 0xa, };
+const char http_content_type_json[33] = 
+/* "Content-type: application/json\r\n" */
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0xd, 0xa, };
+const char http_content_type_text[26] = 
+/* "Content-type: text/text\r\n" */
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x74, 0x65, 0x78, 0x74, 0xd, 0xa, };
+const char http_content_type_png[26] = 
+/* "Content-type: image/png\r\n" */
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x70, 0x6e, 0x67, 0xd, 0xa, };
+const char http_content_type_gif[26] = 
+/* "Content-type: image/gif\r\n" */
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x67, 0x69, 0x66, 0xd, 0xa, };
+const char http_content_type_jpg[27] = 
+/* "Content-type: image/jpeg\r\n" */
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x6a, 0x70, 0x65, 0x67, 0xd, 0xa, };
+const char http_content_type_svg[30] = 
+/* "Content-type: image/svg+xml\r\n" */
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x73, 0x76, 0x67, 0x2b, 0x78, 0x6d, 0x6c, 0xd, 0xa, };
+const char http_content_type_eot[46] = 
+/* "Content-type: application/vnd.ms-fontobject\r\n" */
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x6e, 0x64, 0x2e, 0x6d, 0x73, 0x2d, 0x66, 0x6f, 0x6e, 0x74, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xd, 0xa, };
+const char http_content_type_ttf[25] = 
+/* "Content-type: font/ttf\r\n" */
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x66, 0x6f, 0x6e, 0x74, 0x2f, 0x74, 0x74, 0x66, 0xd, 0xa, };
+const char http_content_type_woff[40] = 
+/* "Content-type: application/x-font-woff\r\n" */
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x77, 0x6f, 0x66, 0x66, 0xd, 0xa, };
+const char http_content_type_woff2[27] = 
+/* "Content-type: font/woff2\r\n" */
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x66, 0x6f, 0x6e, 0x74, 0x2f, 0x77, 0x6f, 0x66, 0x66, 0x32, 0xd, 0xa, };
+const char http_content_type_ico[29] = 
+/* "Content-type: image/x-icon\r\n" */
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x78, 0x2d, 0x69, 0x63, 0x6f, 0x6e, 0xd, 0xa, };
+const char http_content_type_binary[41] = 
+/* "Content-type: application/octet-stream\r\n" */
+{0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x2d, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0xd, 0xa, };
+const char http_html[6] = 
+/* ".html" */
+{0x2e, 0x68, 0x74, 0x6d, 0x6c, };
+const char http_shtml[7] = 
+/* ".shtml" */
+{0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, };
+const char http_htm[5] = 
+/* ".htm" */
+{0x2e, 0x68, 0x74, 0x6d, };
+const char http_css[5] = 
+/* ".css" */
+{0x2e, 0x63, 0x73, 0x73, };
+const char http_js [4] = 
+/* ".js" */
+{0x2e, 0x6a, 0x73, };
+const char http_json[6] = 
+/* ".json" */
+{0x2e, 0x6a, 0x73, 0x6f, 0x6e, };
+const char http_png[5] = 
+/* ".png" */
+{0x2e, 0x70, 0x6e, 0x67, };
+const char http_gif[5] = 
+/* ".gif" */
+{0x2e, 0x67, 0x69, 0x66, };
+const char http_jpg[5] = 
+/* ".jpg" */
+{0x2e, 0x6a, 0x70, 0x67, };
+const char http_svg[5] = 
+/* ".svg" */
+{0x2e, 0x73, 0x76, 0x67, };
+const char http_text[5] = 
+/* ".txt" */
+{0x2e, 0x74, 0x78, 0x74, };
+const char http_eot[5] = 
+/* ".eot" */
+{0x2e, 0x65, 0x6f, 0x74, };
+const char http_ttf[5] = 
+/* ".ttf" */
+{0x2e, 0x74, 0x74, 0x66, };
+const char http_woff[6] = 
+/* ".woff" */
+{0x2e, 0x77, 0x6f, 0x66, 0x66, };
+const char http_woff2[7] = 
+/* ".woff2" */
+{0x2e, 0x77, 0x6f, 0x66, 0x66, 0x32, };
+const char http_ico[5] = 
+/* ".ico" */
+{0x2e, 0x69, 0x63, 0x6f, };
Index: EcnlProtoTool/trunk/prototool/webserver/http-strings.h
===================================================================
--- EcnlProtoTool/trunk/prototool/webserver/http-strings.h	(revision 270)
+++ EcnlProtoTool/trunk/prototool/webserver/http-strings.h	(revision 270)
@@ -0,0 +1,68 @@
+extern const char http_http[8];
+extern const char http_200[5];
+extern const char http_301[5];
+extern const char http_302[5];
+extern const char http_get[5];
+extern const char http_10[9];
+extern const char http_11[9];
+extern const char http_content_type[15];
+extern const char http_content_length[17];
+extern const char http_texthtml[10];
+extern const char http_location[11];
+extern const char http_host[7];
+extern const char http_crnl[3];
+extern const char http_www[5];
+extern const char http_upload[9];
+extern const char http_index_html[12];
+extern const char http_403_html[10];
+extern const char http_404_html[10];
+extern const char http_websocket[10];
+extern const char http_referer[10];
+extern const char http_upgrade[10];
+extern const char http_connection[13];
+extern const char http_connection_close[20];
+extern const char http_connection_keep_alive[25];
+extern const char http_sec_websocket_accept[23];
+extern const char http_sec_websocket_protocol[25];
+extern const char http_header_101[35];
+extern const char http_header_200[62];
+extern const char http_header_301[96];
+extern const char http_header_403[88];
+extern const char http_header_404[88];
+extern const char http_content_200[79];
+extern const char http_content_403[129];
+extern const char http_content_404[134];
+extern const char http_content_encoding_gzip[25];
+extern const char http_websocket_guid[37];
+extern const char http_content_type_plain[27];
+extern const char http_content_type_html[26];
+extern const char http_content_type_css[25];
+extern const char http_content_type_js[32];
+extern const char http_content_type_json[33];
+extern const char http_content_type_text[26];
+extern const char http_content_type_png[26];
+extern const char http_content_type_gif[26];
+extern const char http_content_type_jpg[27];
+extern const char http_content_type_svg[30];
+extern const char http_content_type_eot[46];
+extern const char http_content_type_ttf[25];
+extern const char http_content_type_woff[40];
+extern const char http_content_type_woff2[27];
+extern const char http_content_type_ico[29];
+extern const char http_content_type_binary[41];
+extern const char http_html[6];
+extern const char http_shtml[7];
+extern const char http_htm[5];
+extern const char http_css[5];
+extern const char http_js [4];
+extern const char http_json[6];
+extern const char http_png[5];
+extern const char http_gif[5];
+extern const char http_jpg[5];
+extern const char http_svg[5];
+extern const char http_text[5];
+extern const char http_eot[5];
+extern const char http_ttf[5];
+extern const char http_woff[6];
+extern const char http_woff2[7];
+extern const char http_ico[5];
Index: EcnlProtoTool/trunk/prototool/webserver/http_parser.c
===================================================================
--- EcnlProtoTool/trunk/prototool/webserver/http_parser.c	(revision 270)
+++ EcnlProtoTool/trunk/prototool/webserver/http_parser.c	(revision 270)
@@ -0,0 +1,2410 @@
+/* Based on src/http/ngx_http_parse.c from NGINX copyright Igor Sysoev
+ *
+ * Additional changes are licensed under the same terms as NGINX and
+ * copyright Joyent, Inc. and other Node contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+#include "http_parser.h"
+//#include <assert.h>
+#include <stddef.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+
+#ifndef ULLONG_MAX
+# define ULLONG_MAX ((uint64_t) -1) /* 2^64-1 */
+#endif
+
+#ifndef MIN
+# define MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
+
+#ifndef ARRAY_SIZE
+# define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+#endif
+
+#ifndef BIT_AT
+# define BIT_AT(a, i)                                                \
+  (!!((unsigned int) (a)[(unsigned int) (i) >> 3] &                  \
+   (1 << ((unsigned int) (i) & 7))))
+#endif
+
+#ifndef ELEM_AT
+# define ELEM_AT(a, i, v) ((unsigned int) (i) < ARRAY_SIZE(a) ? (a)[(i)] : (v))
+#endif
+
+#define SET_ERRNO(e)                                                 \
+do {                                                                 \
+  parser->http_errno = (e);                                          \
+} while(0)
+
+#define CURRENT_STATE() p_state
+#define UPDATE_STATE(V) p_state = (enum state) (V);
+#define RETURN(V)                                                    \
+do {                                                                 \
+  parser->state = CURRENT_STATE();                                   \
+  return (V);                                                        \
+} while (0);
+#define REEXECUTE()                                                  \
+  --p;                                                               \
+  break;
+
+
+#ifdef __GNUC__
+# define LIKELY(X) __builtin_expect(!!(X), 1)
+# define UNLIKELY(X) __builtin_expect(!!(X), 0)
+#else
+# define LIKELY(X) (X)
+# define UNLIKELY(X) (X)
+#endif
+
+
+/* Run the notify callback FOR, returning ER if it fails */
+#define CALLBACK_NOTIFY_(FOR, ER)                                    \
+do {                                                                 \
+  assert(HTTP_PARSER_ERRNO(parser) == HPE_OK);                       \
+                                                                     \
+  if (LIKELY(settings->on_##FOR)) {                                  \
+    parser->state = CURRENT_STATE();                                 \
+    if (UNLIKELY(0 != settings->on_##FOR(parser))) {                 \
+      SET_ERRNO(HPE_CB_##FOR);                                       \
+    }                                                                \
+    UPDATE_STATE(parser->state);                                     \
+                                                                     \
+    /* We either errored above or got paused; get out */             \
+    if (UNLIKELY(HTTP_PARSER_ERRNO(parser) != HPE_OK)) {             \
+      return (ER);                                                   \
+    }                                                                \
+  }                                                                  \
+} while (0)
+
+/* Run the notify callback FOR and consume the current byte */
+#define CALLBACK_NOTIFY(FOR)            CALLBACK_NOTIFY_(FOR, p - data + 1)
+
+/* Run the notify callback FOR and don't consume the current byte */
+#define CALLBACK_NOTIFY_NOADVANCE(FOR)  CALLBACK_NOTIFY_(FOR, p - data)
+
+/* Run data callback FOR with LEN bytes, returning ER if it fails */
+#define CALLBACK_DATA_(FOR, LEN, ER)                                 \
+do {                                                                 \
+  assert(HTTP_PARSER_ERRNO(parser) == HPE_OK);                       \
+                                                                     \
+  if (FOR##_mark) {                                                  \
+    if (LIKELY(settings->on_##FOR)) {                                \
+      parser->state = CURRENT_STATE();                               \
+      if (UNLIKELY(0 !=                                              \
+                   settings->on_##FOR(parser, FOR##_mark, (LEN)))) { \
+        SET_ERRNO(HPE_CB_##FOR);                                     \
+      }                                                              \
+      UPDATE_STATE(parser->state);                                   \
+                                                                     \
+      /* We either errored above or got paused; get out */           \
+      if (UNLIKELY(HTTP_PARSER_ERRNO(parser) != HPE_OK)) {           \
+        return (ER);                                                 \
+      }                                                              \
+    }                                                                \
+    FOR##_mark = NULL;                                               \
+  }                                                                  \
+} while (0)
+  
+/* Run the data callback FOR and consume the current byte */
+#define CALLBACK_DATA(FOR)                                           \
+    CALLBACK_DATA_(FOR, p - FOR##_mark, p - data + 1)
+
+/* Run the data callback FOR and don't consume the current byte */
+#define CALLBACK_DATA_NOADVANCE(FOR)                                 \
+    CALLBACK_DATA_(FOR, p - FOR##_mark, p - data)
+
+/* Set the mark FOR; non-destructive if mark is already set */
+#define MARK(FOR)                                                    \
+do {                                                                 \
+  if (!FOR##_mark) {                                                 \
+    FOR##_mark = p;                                                  \
+  }                                                                  \
+} while (0)
+
+/* Don't allow the total size of the HTTP headers (including the status
+ * line) to exceed HTTP_MAX_HEADER_SIZE.  This check is here to protect
+ * embedders against denial-of-service attacks where the attacker feeds
+ * us a never-ending header that the embedder keeps buffering.
+ *
+ * This check is arguably the responsibility of embedders but we're doing
+ * it on the embedder's behalf because most won't bother and this way we
+ * make the web a little safer.  HTTP_MAX_HEADER_SIZE is still far bigger
+ * than any reasonable request or response so this should never affect
+ * day-to-day operation.
+ */
+#define COUNT_HEADER_SIZE(V)                                         \
+do {                                                                 \
+  parser->nread += (V);                                              \
+  if (UNLIKELY(parser->nread > (HTTP_MAX_HEADER_SIZE))) {            \
+    SET_ERRNO(HPE_HEADER_OVERFLOW);                                  \
+    goto error;                                                      \
+  }                                                                  \
+} while (0)
+
+
+#define PROXY_CONNECTION "proxy-connection"
+#define CONNECTION "connection"
+#define CONTENT_LENGTH "content-length"
+#define TRANSFER_ENCODING "transfer-encoding"
+#define UPGRADE "upgrade"
+#define CHUNKED "chunked"
+#define KEEP_ALIVE "keep-alive"
+#define CLOSE "close"
+
+
+static const char *method_strings[] =
+  {
+#define XX(num, name, string) #string,
+  HTTP_METHOD_MAP(XX)
+#undef XX
+  };
+
+
+/* Tokens as defined by rfc 2616. Also lowercases them.
+ *        token       = 1*<any CHAR except CTLs or separators>
+ *     separators     = "(" | ")" | "<" | ">" | "@"
+ *                    | "," | ";" | ":" | "\" | <">
+ *                    | "/" | "[" | "]" | "?" | "="
+ *                    | "{" | "}" | SP | HT
+ */
+static const char tokens[256] = {
+/*   0 nul    1 soh    2 stx    3 etx    4 eot    5 enq    6 ack    7 bel  */
+        0,       0,       0,       0,       0,       0,       0,       0,
+/*   8 bs     9 ht    10 nl    11 vt    12 np    13 cr    14 so    15 si   */
+        0,       0,       0,       0,       0,       0,       0,       0,
+/*  16 dle   17 dc1   18 dc2   19 dc3   20 dc4   21 nak   22 syn   23 etb */
+        0,       0,       0,       0,       0,       0,       0,       0,
+/*  24 can   25 em    26 sub   27 esc   28 fs    29 gs    30 rs    31 us  */
+        0,       0,       0,       0,       0,       0,       0,       0,
+/*  32 sp    33  !    34  "    35  #    36  $    37  %    38  &    39  '  */
+        0,      '!',      0,      '#',     '$',     '%',     '&',    '\'',
+/*  40  (    41  )    42  *    43  +    44  ,    45  -    46  .    47  /  */
+        0,       0,      '*',     '+',      0,      '-',     '.',      0,
+/*  48  0    49  1    50  2    51  3    52  4    53  5    54  6    55  7  */
+       '0',     '1',     '2',     '3',     '4',     '5',     '6',     '7',
+/*  56  8    57  9    58  :    59  ;    60  <    61  =    62  >    63  ?  */
+       '8',     '9',      0,       0,       0,       0,       0,       0,
+/*  64  @    65  A    66  B    67  C    68  D    69  E    70  F    71  G  */
+        0,      'a',     'b',     'c',     'd',     'e',     'f',     'g',
+/*  72  H    73  I    74  J    75  K    76  L    77  M    78  N    79  O  */
+       'h',     'i',     'j',     'k',     'l',     'm',     'n',     'o',
+/*  80  P    81  Q    82  R    83  S    84  T    85  U    86  V    87  W  */
+       'p',     'q',     'r',     's',     't',     'u',     'v',     'w',
+/*  88  X    89  Y    90  Z    91  [    92  \    93  ]    94  ^    95  _  */
+       'x',     'y',     'z',      0,       0,       0,      '^',     '_',
+/*  96  `    97  a    98  b    99  c   100  d   101  e   102  f   103  g  */
+       '`',     'a',     'b',     'c',     'd',     'e',     'f',     'g',
+/* 104  h   105  i   106  j   107  k   108  l   109  m   110  n   111  o  */
+       'h',     'i',     'j',     'k',     'l',     'm',     'n',     'o',
+/* 112  p   113  q   114  r   115  s   116  t   117  u   118  v   119  w  */
+       'p',     'q',     'r',     's',     't',     'u',     'v',     'w',
+/* 120  x   121  y   122  z   123  {   124  |   125  }   126  ~   127 del */
+       'x',     'y',     'z',      0,      '|',      0,      '~',       0 };
+
+
+static const int8_t unhex[256] =
+  {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
+  ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
+  ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
+  , 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1
+  ,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1
+  ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
+  ,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1
+  ,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
+  };
+
+
+#if HTTP_PARSER_STRICT
+# define T(v) 0
+#else
+# define T(v) v
+#endif
+
+
+static const uint8_t normal_url_char[32] = {
+/*   0 nul    1 soh    2 stx    3 etx    4 eot    5 enq    6 ack    7 bel  */
+        0    |   0    |   0    |   0    |   0    |   0    |   0    |   0,
+/*   8 bs     9 ht    10 nl    11 vt    12 np    13 cr    14 so    15 si   */
+        0    | T(2)   |   0    |   0    | T(16)  |   0    |   0    |   0,
+/*  16 dle   17 dc1   18 dc2   19 dc3   20 dc4   21 nak   22 syn   23 etb */
+        0    |   0    |   0    |   0    |   0    |   0    |   0    |   0,
+/*  24 can   25 em    26 sub   27 esc   28 fs    29 gs    30 rs    31 us  */
+        0    |   0    |   0    |   0    |   0    |   0    |   0    |   0,
+/*  32 sp    33  !    34  "    35  #    36  $    37  %    38  &    39  '  */
+        0    |   2    |   4    |   0    |   16   |   32   |   64   |  128,
+/*  40  (    41  )    42  *    43  +    44  ,    45  -    46  .    47  /  */
+        1    |   2    |   4    |   8    |   16   |   32   |   64   |  128,
+/*  48  0    49  1    50  2    51  3    52  4    53  5    54  6    55  7  */
+        1    |   2    |   4    |   8    |   16   |   32   |   64   |  128,
+/*  56  8    57  9    58  :    59  ;    60  <    61  =    62  >    63  ?  */
+        1    |   2    |   4    |   8    |   16   |   32   |   64   |   0,
+/*  64  @    65  A    66  B    67  C    68  D    69  E    70  F    71  G  */
+        1    |   2    |   4    |   8    |   16   |   32   |   64   |  128,
+/*  72  H    73  I    74  J    75  K    76  L    77  M    78  N    79  O  */
+        1    |   2    |   4    |   8    |   16   |   32   |   64   |  128,
+/*  80  P    81  Q    82  R    83  S    84  T    85  U    86  V    87  W  */
+        1    |   2    |   4    |   8    |   16   |   32   |   64   |  128,
+/*  88  X    89  Y    90  Z    91  [    92  \    93  ]    94  ^    95  _  */
+        1    |   2    |   4    |   8    |   16   |   32   |   64   |  128,
+/*  96  `    97  a    98  b    99  c   100  d   101  e   102  f   103  g  */
+        1    |   2    |   4    |   8    |   16   |   32   |   64   |  128,
+/* 104  h   105  i   106  j   107  k   108  l   109  m   110  n   111  o  */
+        1    |   2    |   4    |   8    |   16   |   32   |   64   |  128,
+/* 112  p   113  q   114  r   115  s   116  t   117  u   118  v   119  w  */
+        1    |   2    |   4    |   8    |   16   |   32   |   64   |  128,
+/* 120  x   121  y   122  z   123  {   124  |   125  }   126  ~   127 del */
+        1    |   2    |   4    |   8    |   16   |   32   |   64   |   0, };
+
+#undef T
+
+enum state
+  { s_dead = 1 /* important that this is > 0 */
+
+  , s_start_req_or_res
+  , s_res_or_resp_H
+  , s_start_res
+  , s_res_H
+  , s_res_HT
+  , s_res_HTT
+  , s_res_HTTP
+  , s_res_first_http_major
+  , s_res_http_major
+  , s_res_first_http_minor
+  , s_res_http_minor
+  , s_res_first_status_code
+  , s_res_status_code
+  , s_res_status_start
+  , s_res_status
+  , s_res_line_almost_done
+
+  , s_start_req
+
+  , s_req_method
+  , s_req_spaces_before_url
+  , s_req_schema
+  , s_req_schema_slash
+  , s_req_schema_slash_slash
+  , s_req_server_start
+  , s_req_server
+  , s_req_server_with_at
+  , s_req_path
+  , s_req_query_string_start
+  , s_req_query_string
+  , s_req_fragment_start
+  , s_req_fragment
+  , s_req_http_start
+  , s_req_http_H
+  , s_req_http_HT
+  , s_req_http_HTT
+  , s_req_http_HTTP
+  , s_req_first_http_major
+  , s_req_http_major
+  , s_req_first_http_minor
+  , s_req_http_minor
+  , s_req_line_almost_done
+
+  , s_header_field_start
+  , s_header_field
+  , s_header_value_discard_ws
+  , s_header_value_discard_ws_almost_done
+  , s_header_value_discard_lws
+  , s_header_value_start
+  , s_header_value
+  , s_header_value_lws
+
+  , s_header_almost_done
+
+  , s_chunk_size_start
+  , s_chunk_size
+  , s_chunk_parameters
+  , s_chunk_size_almost_done
+
+  , s_headers_almost_done
+  , s_headers_done
+
+  /* Important: 's_headers_done' must be the last 'header' state. All
+   * states beyond this must be 'body' states. It is used for overflow
+   * checking. See the PARSING_HEADER() macro.
+   */
+
+  , s_chunk_data
+  , s_chunk_data_almost_done
+  , s_chunk_data_done
+
+  , s_body_identity
+  , s_body_identity_eof
+
+  , s_message_done
+  };
+
+
+#define PARSING_HEADER(state) (state <= s_headers_done)
+
+
+enum header_states
+  { h_general = 0
+  , h_C
+  , h_CO
+  , h_CON
+
+  , h_matching_connection
+  , h_matching_proxy_connection
+  , h_matching_content_length
+  , h_matching_transfer_encoding
+  , h_matching_upgrade
+
+  , h_connection
+  , h_content_length
+  , h_transfer_encoding
+  , h_upgrade
+
+  , h_matching_transfer_encoding_chunked
+  , h_matching_connection_token_start
+  , h_matching_connection_keep_alive
+  , h_matching_connection_close
+  , h_matching_connection_upgrade
+  , h_matching_connection_token
+
+  , h_transfer_encoding_chunked
+  , h_connection_keep_alive
+  , h_connection_close
+  , h_connection_upgrade
+  };
+
+enum http_host_state
+  {
+    s_http_host_dead = 1
+  , s_http_userinfo_start
+  , s_http_userinfo
+  , s_http_host_start
+  , s_http_host_v6_start
+  , s_http_host
+  , s_http_host_v6
+  , s_http_host_v6_end
+  , s_http_host_port_start
+  , s_http_host_port
+};
+
+/* Macros for character classes; depends on strict-mode  */
+#define CR                  '\r'
+#define LF                  '\n'
+#define LOWER(c)            (unsigned char)(c | 0x20)
+#define IS_ALPHA(c)         (LOWER(c) >= 'a' && LOWER(c) <= 'z')
+#define IS_NUM(c)           ((c) >= '0' && (c) <= '9')
+#define IS_ALPHANUM(c)      (IS_ALPHA(c) || IS_NUM(c))
+#define IS_HEX(c)           (IS_NUM(c) || (LOWER(c) >= 'a' && LOWER(c) <= 'f'))
+#define IS_MARK(c)          ((c) == '-' || (c) == '_' || (c) == '.' || \
+  (c) == '!' || (c) == '~' || (c) == '*' || (c) == '\'' || (c) == '(' || \
+  (c) == ')')
+#define IS_USERINFO_CHAR(c) (IS_ALPHANUM(c) || IS_MARK(c) || (c) == '%' || \
+  (c) == ';' || (c) == ':' || (c) == '&' || (c) == '=' || (c) == '+' || \
+  (c) == '$' || (c) == ',')
+
+#define STRICT_TOKEN(c)     (tokens[(unsigned char)c])
+
+#if HTTP_PARSER_STRICT
+#define TOKEN(c)            (tokens[(unsigned char)c])
+#define IS_URL_CHAR(c)      (BIT_AT(normal_url_char, (unsigned char)c))
+#define IS_HOST_CHAR(c)     (IS_ALPHANUM(c) || (c) == '.' || (c) == '-')
+#else
+#define TOKEN(c)            ((c == ' ') ? ' ' : tokens[(unsigned char)c])
+#define IS_URL_CHAR(c)                                                         \
+  (BIT_AT(normal_url_char, (unsigned char)c) || ((c) & 0x80))
+#define IS_HOST_CHAR(c)                                                        \
+  (IS_ALPHANUM(c) || (c) == '.' || (c) == '-' || (c) == '_')
+#endif
+
+
+#define start_state (parser->type == HTTP_REQUEST ? s_start_req : s_start_res)
+
+
+#if HTTP_PARSER_STRICT
+# define STRICT_CHECK(cond)                                          \
+do {                                                                 \
+  if (cond) {                                                        \
+    SET_ERRNO(HPE_STRICT);                                           \
+    goto error;                                                      \
+  }                                                                  \
+} while (0)
+# define NEW_MESSAGE() (http_should_keep_alive(parser) ? start_state : s_dead)
+#else
+# define STRICT_CHECK(cond)
+# define NEW_MESSAGE() start_state
+#endif
+
+
+/* Map errno values to strings for human-readable output */
+#define HTTP_STRERROR_GEN(n, s) { "HPE_" #n, s },
+static struct {
+  const char *name;
+  const char *description;
+} http_strerror_tab[] = {
+  HTTP_ERRNO_MAP(HTTP_STRERROR_GEN)
+};
+#undef HTTP_STRERROR_GEN
+
+int http_message_needs_eof(const http_parser *parser);
+
+/* Our URL parser.
+ *
+ * This is designed to be shared by http_parser_execute() for URL validation,
+ * hence it has a state transition + byte-for-byte interface. In addition, it
+ * is meant to be embedded in http_parser_parse_url(), which does the dirty
+ * work of turning state transitions URL components for its API.
+ *
+ * This function should only be invoked with non-space characters. It is
+ * assumed that the caller cares about (and can detect) the transition between
+ * URL and non-URL states by looking for these.
+ */
+static enum state
+parse_url_char(enum state s, const char ch)
+{
+  if (ch == ' ' || ch == '\r' || ch == '\n') {
+    return s_dead;
+  }
+
+#if HTTP_PARSER_STRICT
+  if (ch == '\t' || ch == '\f') {
+    return s_dead;
+  }
+#endif
+
+  switch (s) {
+    case s_req_spaces_before_url:
+      /* Proxied requests are followed by scheme of an absolute URI (alpha).
+       * All methods except CONNECT are followed by '/' or '*'.
+       */
+
+      if (ch == '/' || ch == '*') {
+        return s_req_path;
+      }
+
+      if (IS_ALPHA(ch)) {
+        return s_req_schema;
+      }
+
+      break;
+
+    case s_req_schema:
+      if (IS_ALPHA(ch)) {
+        return s;
+      }
+
+      if (ch == ':') {
+        return s_req_schema_slash;
+      }
+
+      break;
+
+    case s_req_schema_slash:
+      if (ch == '/') {
+        return s_req_schema_slash_slash;
+      }
+
+      break;
+
+    case s_req_schema_slash_slash:
+      if (ch == '/') {
+        return s_req_server_start;
+      }
+
+      break;
+
+    case s_req_server_with_at:
+      if (ch == '@') {
+        return s_dead;
+      }
+
+    /* FALLTHROUGH */
+    case s_req_server_start:
+    case s_req_server:
+      if (ch == '/') {
+        return s_req_path;
+      }
+
+      if (ch == '?') {
+        return s_req_query_string_start;
+      }
+
+      if (ch == '@') {
+        return s_req_server_with_at;
+      }
+
+      if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
+        return s_req_server;
+      }
+
+      break;
+
+    case s_req_path:
+      if (IS_URL_CHAR(ch)) {
+        return s;
+      }
+
+      switch (ch) {
+        case '?':
+          return s_req_query_string_start;
+
+        case '#':
+          return s_req_fragment_start;
+      }
+
+      break;
+
+    case s_req_query_string_start:
+    case s_req_query_string:
+      if (IS_URL_CHAR(ch)) {
+        return s_req_query_string;
+      }
+
+      switch (ch) {
+        case '?':
+          /* allow extra '?' in query string */
+          return s_req_query_string;
+
+        case '#':
+          return s_req_fragment_start;
+      }
+
+      break;
+
+    case s_req_fragment_start:
+      if (IS_URL_CHAR(ch)) {
+        return s_req_fragment;
+      }
+
+      switch (ch) {
+        case '?':
+          return s_req_fragment;
+
+        case '#':
+          return s;
+      }
+
+      break;
+
+    case s_req_fragment:
+      if (IS_URL_CHAR(ch)) {
+        return s;
+      }
+
+      switch (ch) {
+        case '?':
+        case '#':
+          return s;
+      }
+
+      break;
+
+    default:
+      break;
+  }
+
+  /* We should never fall out of the switch above unless there's an error */
+  return s_dead;
+}
+
+size_t http_parser_execute (http_parser *parser,
+                            const http_parser_settings *settings,
+                            const char *data,
+                            size_t len)
+{
+  char c, ch;
+  int8_t unhex_val;
+  const char *p = data;
+  const char *header_field_mark = 0;
+  const char *header_value_mark = 0;
+  const char *url_mark = 0;
+  const char *body_mark = 0;
+  const char *status_mark = 0;
+  enum state p_state = (enum state) parser->state;
+
+  /* We're in an error state. Don't bother doing anything. */
+  if (HTTP_PARSER_ERRNO(parser) != HPE_OK) {
+    return 0;
+  }
+
+  if (len == 0) {
+    switch (CURRENT_STATE()) {
+      case s_body_identity_eof:
+        /* Use of CALLBACK_NOTIFY() here would erroneously return 1 byte read if
+         * we got paused.
+         */
+        CALLBACK_NOTIFY_NOADVANCE(message_complete);
+        return 0;
+
+      case s_dead:
+      case s_start_req_or_res:
+      case s_start_res:
+      case s_start_req:
+        return 0;
+
+      default:
+        SET_ERRNO(HPE_INVALID_EOF_STATE);
+        return 1;
+    }
+  }
+
+
+  if (CURRENT_STATE() == s_header_field)
+    header_field_mark = data;
+  if (CURRENT_STATE() == s_header_value)
+    header_value_mark = data;
+  switch (CURRENT_STATE()) {
+  case s_req_path:
+  case s_req_schema:
+  case s_req_schema_slash:
+  case s_req_schema_slash_slash:
+  case s_req_server_start:
+  case s_req_server:
+  case s_req_server_with_at:
+  case s_req_query_string_start:
+  case s_req_query_string:
+  case s_req_fragment_start:
+  case s_req_fragment:
+    url_mark = data;
+    break;
+  case s_res_status:
+    status_mark = data;
+    break;
+  default:
+    break;
+  }
+
+  for (p=data; p != data + len; p++) {
+    ch = *p;
+
+    if (PARSING_HEADER(CURRENT_STATE()))
+      COUNT_HEADER_SIZE(1);
+
+    switch (CURRENT_STATE()) {
+
+      case s_dead:
+        /* this state is used after a 'Connection: close' message
+         * the parser will error out if it reads another message
+         */
+        if (LIKELY(ch == CR || ch == LF))
+          break;
+
+        SET_ERRNO(HPE_CLOSED_CONNECTION);
+        goto error;
+
+      case s_start_req_or_res:
+      {
+        if (ch == CR || ch == LF)
+          break;
+        parser->flags = 0;
+        parser->content_length = ULLONG_MAX;
+
+        if (ch == 'H') {
+          UPDATE_STATE(s_res_or_resp_H);
+
+          CALLBACK_NOTIFY(message_begin);
+        } else {
+          parser->type = HTTP_REQUEST;
+          UPDATE_STATE(s_start_req);
+          REEXECUTE();
+        }
+
+        break;
+      }
+
+      case s_res_or_resp_H:
+        if (ch == 'T') {
+          parser->type = HTTP_RESPONSE;
+          UPDATE_STATE(s_res_HT);
+        } else {
+          if (UNLIKELY(ch != 'E')) {
+            SET_ERRNO(HPE_INVALID_CONSTANT);
+            goto error;
+          }
+
+          parser->type = HTTP_REQUEST;
+          parser->method = HTTP_HEAD;
+          parser->index = 2;
+          UPDATE_STATE(s_req_method);
+        }
+        break;
+
+      case s_start_res:
+      {
+        parser->flags = 0;
+        parser->content_length = ULLONG_MAX;
+
+        switch (ch) {
+          case 'H':
+            UPDATE_STATE(s_res_H);
+            break;
+
+          case CR:
+          case LF:
+            break;
+
+          default:
+            SET_ERRNO(HPE_INVALID_CONSTANT);
+            goto error;
+        }
+
+        CALLBACK_NOTIFY(message_begin);
+        break;
+      }
+
+      case s_res_H:
+        STRICT_CHECK(ch != 'T');
+        UPDATE_STATE(s_res_HT);
+        break;
+
+      case s_res_HT:
+        STRICT_CHECK(ch != 'T');
+        UPDATE_STATE(s_res_HTT);
+        break;
+
+      case s_res_HTT:
+        STRICT_CHECK(ch != 'P');
+        UPDATE_STATE(s_res_HTTP);
+        break;
+
+      case s_res_HTTP:
+        STRICT_CHECK(ch != '/');
+        UPDATE_STATE(s_res_first_http_major);
+        break;
+
+      case s_res_first_http_major:
+        if (UNLIKELY(ch < '0' || ch > '9')) {
+          SET_ERRNO(HPE_INVALID_VERSION);
+          goto error;
+        }
+
+        parser->http_major = ch - '0';
+        UPDATE_STATE(s_res_http_major);
+        break;
+
+      /* major HTTP version or dot */
+      case s_res_http_major:
+      {
+        if (ch == '.') {
+          UPDATE_STATE(s_res_first_http_minor);
+          break;
+        }
+
+        if (!IS_NUM(ch)) {
+          SET_ERRNO(HPE_INVALID_VERSION);
+          goto error;
+        }
+
+        parser->http_major *= 10;
+        parser->http_major += ch - '0';
+
+        if (UNLIKELY(parser->http_major > 999)) {
+          SET_ERRNO(HPE_INVALID_VERSION);
+          goto error;
+        }
+
+        break;
+      }
+
+      /* first digit of minor HTTP version */
+      case s_res_first_http_minor:
+        if (UNLIKELY(!IS_NUM(ch))) {
+          SET_ERRNO(HPE_INVALID_VERSION);
+          goto error;
+        }
+
+        parser->http_minor = ch - '0';
+        UPDATE_STATE(s_res_http_minor);
+        break;
+
+      /* minor HTTP version or end of request line */
+      case s_res_http_minor:
+      {
+        if (ch == ' ') {
+          UPDATE_STATE(s_res_first_status_code);
+          break;
+        }
+
+        if (UNLIKELY(!IS_NUM(ch))) {
+          SET_ERRNO(HPE_INVALID_VERSION);
+          goto error;
+        }
+
+        parser->http_minor *= 10;
+        parser->http_minor += ch - '0';
+
+        if (UNLIKELY(parser->http_minor > 999)) {
+          SET_ERRNO(HPE_INVALID_VERSION);
+          goto error;
+        }
+
+        break;
+      }
+
+      case s_res_first_status_code:
+      {
+        if (!IS_NUM(ch)) {
+          if (ch == ' ') {
+            break;
+          }
+
+          SET_ERRNO(HPE_INVALID_STATUS);
+          goto error;
+        }
+        parser->status_code = ch - '0';
+        UPDATE_STATE(s_res_status_code);
+        break;
+      }
+
+      case s_res_status_code:
+      {
+        if (!IS_NUM(ch)) {
+          switch (ch) {
+            case ' ':
+              UPDATE_STATE(s_res_status_start);
+              break;
+            case CR:
+              UPDATE_STATE(s_res_line_almost_done);
+              break;
+            case LF:
+              UPDATE_STATE(s_header_field_start);
+              break;
+            default:
+              SET_ERRNO(HPE_INVALID_STATUS);
+              goto error;
+          }
+          break;
+        }
+
+        parser->status_code *= 10;
+        parser->status_code += ch - '0';
+
+        if (UNLIKELY(parser->status_code > 999)) {
+          SET_ERRNO(HPE_INVALID_STATUS);
+          goto error;
+        }
+
+        break;
+      }
+
+      case s_res_status_start:
+      {
+        if (ch == CR) {
+          UPDATE_STATE(s_res_line_almost_done);
+          break;
+        }
+
+        if (ch == LF) {
+          UPDATE_STATE(s_header_field_start);
+          break;
+        }
+
+        MARK(status);
+        UPDATE_STATE(s_res_status);
+        parser->index = 0;
+        break;
+      }
+
+      case s_res_status:
+        if (ch == CR) {
+          UPDATE_STATE(s_res_line_almost_done);
+          CALLBACK_DATA(status);
+          break;
+        }
+
+        if (ch == LF) {
+          UPDATE_STATE(s_header_field_start);
+          CALLBACK_DATA(status);
+          break;
+        }
+
+        break;
+
+      case s_res_line_almost_done:
+        STRICT_CHECK(ch != LF);
+        UPDATE_STATE(s_header_field_start);
+        break;
+
+      case s_start_req:
+      {
+        if (ch == CR || ch == LF)
+          break;
+        parser->flags = 0;
+        parser->content_length = ULLONG_MAX;
+
+        if (UNLIKELY(!IS_ALPHA(ch))) {
+          SET_ERRNO(HPE_INVALID_METHOD);
+          goto error;
+        }
+
+        parser->method = (enum http_method) 0;
+        parser->index = 1;
+        switch (ch) {
+          case 'C': parser->method = HTTP_CONNECT; /* or COPY, CHECKOUT */ break;
+          case 'D': parser->method = HTTP_DELETE; break;
+          case 'G': parser->method = HTTP_GET; break;
+          case 'H': parser->method = HTTP_HEAD; break;
+          case 'L': parser->method = HTTP_LOCK; break;
+          case 'M': parser->method = HTTP_MKCOL; /* or MOVE, MKACTIVITY, MERGE, M-SEARCH, MKCALENDAR */ break;
+          case 'N': parser->method = HTTP_NOTIFY; break;
+          case 'O': parser->method = HTTP_OPTIONS; break;
+          case 'P': parser->method = HTTP_POST;
+            /* or PROPFIND|PROPPATCH|PUT|PATCH|PURGE */
+            break;
+          case 'R': parser->method = HTTP_REPORT; break;
+          case 'S': parser->method = HTTP_SUBSCRIBE; /* or SEARCH */ break;
+          case 'T': parser->method = HTTP_TRACE; break;
+          case 'U': parser->method = HTTP_UNLOCK; /* or UNSUBSCRIBE */ break;
+          default:
+            SET_ERRNO(HPE_INVALID_METHOD);
+            goto error;
+        }
+        UPDATE_STATE(s_req_method);
+
+        CALLBACK_NOTIFY(message_begin);
+
+        break;
+      }
+
+      case s_req_method:
+      {
+        const char *matcher;
+        if (UNLIKELY(ch == '\0')) {
+          SET_ERRNO(HPE_INVALID_METHOD);
+          goto error;
+        }
+
+        matcher = method_strings[parser->method];
+        if (ch == ' ' && matcher[parser->index] == '\0') {
+          UPDATE_STATE(s_req_spaces_before_url);
+        } else if (ch == matcher[parser->index]) {
+          ; /* nada */
+        } else if (parser->method == HTTP_CONNECT) {
+          if (parser->index == 1 && ch == 'H') {
+            parser->method = HTTP_CHECKOUT;
+          } else if (parser->index == 2  && ch == 'P') {
+            parser->method = HTTP_COPY;
+          } else {
+            SET_ERRNO(HPE_INVALID_METHOD);
+            goto error;
+          }
+        } else if (parser->method == HTTP_MKCOL) {
+          if (parser->index == 1 && ch == 'O') {
+            parser->method = HTTP_MOVE;
+          } else if (parser->index == 1 && ch == 'E') {
+            parser->method = HTTP_MERGE;
+          } else if (parser->index == 1 && ch == '-') {
+            parser->method = HTTP_MSEARCH;
+          } else if (parser->index == 2 && ch == 'A') {
+            parser->method = HTTP_MKACTIVITY;
+          } else if (parser->index == 3 && ch == 'A') {
+            parser->method = HTTP_MKCALENDAR;
+          } else {
+            SET_ERRNO(HPE_INVALID_METHOD);
+            goto error;
+          }
+        } else if (parser->method == HTTP_SUBSCRIBE) {
+          if (parser->index == 1 && ch == 'E') {
+            parser->method = HTTP_SEARCH;
+          } else {
+            SET_ERRNO(HPE_INVALID_METHOD);
+            goto error;
+          }
+        } else if (parser->index == 1 && parser->method == HTTP_POST) {
+          if (ch == 'R') {
+            parser->method = HTTP_PROPFIND; /* or HTTP_PROPPATCH */
+          } else if (ch == 'U') {
+            parser->method = HTTP_PUT; /* or HTTP_PURGE */
+          } else if (ch == 'A') {
+            parser->method = HTTP_PATCH;
+          } else {
+            SET_ERRNO(HPE_INVALID_METHOD);
+            goto error;
+          }
+        } else if (parser->index == 2) {
+          if (parser->method == HTTP_PUT) {
+            if (ch == 'R') {
+              parser->method = HTTP_PURGE;
+            } else {
+              SET_ERRNO(HPE_INVALID_METHOD);
+              goto error;
+            }
+          } else if (parser->method == HTTP_UNLOCK) {
+            if (ch == 'S') {
+              parser->method = HTTP_UNSUBSCRIBE;
+            } else {
+              SET_ERRNO(HPE_INVALID_METHOD);
+              goto error;
+            }
+          } else {
+            SET_ERRNO(HPE_INVALID_METHOD);
+            goto error;
+          }
+        } else if (parser->index == 4 && parser->method == HTTP_PROPFIND && ch == 'P') {
+          parser->method = HTTP_PROPPATCH;
+        } else {
+          SET_ERRNO(HPE_INVALID_METHOD);
+          goto error;
+        }
+
+        ++parser->index;
+        break;
+      }
+
+      case s_req_spaces_before_url:
+      {
+        if (ch == ' ') break;
+
+        MARK(url);
+        if (parser->method == HTTP_CONNECT) {
+          UPDATE_STATE(s_req_server_start);
+        }
+
+        UPDATE_STATE(parse_url_char(CURRENT_STATE(), ch));
+        if (UNLIKELY(CURRENT_STATE() == s_dead)) {
+          SET_ERRNO(HPE_INVALID_URL);
+          goto error;
+        }
+
+        break;
+      }
+
+      case s_req_schema:
+      case s_req_schema_slash:
+      case s_req_schema_slash_slash:
+      case s_req_server_start:
+      {
+        switch (ch) {
+          /* No whitespace allowed here */
+          case ' ':
+          case CR:
+          case LF:
+            SET_ERRNO(HPE_INVALID_URL);
+            goto error;
+          default:
+            UPDATE_STATE(parse_url_char(CURRENT_STATE(), ch));
+            if (UNLIKELY(CURRENT_STATE() == s_dead)) {
+              SET_ERRNO(HPE_INVALID_URL);
+              goto error;
+            }
+        }
+
+        break;
+      }
+
+      case s_req_server:
+      case s_req_server_with_at:
+      case s_req_path:
+      case s_req_query_string_start:
+      case s_req_query_string:
+      case s_req_fragment_start:
+      case s_req_fragment:
+      {
+        switch (ch) {
+          case ' ':
+            UPDATE_STATE(s_req_http_start);
+            CALLBACK_DATA(url);
+            break;
+          case CR:
+          case LF:
+            parser->http_major = 0;
+            parser->http_minor = 9;
+            UPDATE_STATE((ch == CR) ?
+              s_req_line_almost_done :
+              s_header_field_start);
+            CALLBACK_DATA(url);
+            break;
+          default:
+            UPDATE_STATE(parse_url_char(CURRENT_STATE(), ch));
+            if (UNLIKELY(CURRENT_STATE() == s_dead)) {
+              SET_ERRNO(HPE_INVALID_URL);
+              goto error;
+            }
+        }
+        break;
+      }
+
+      case s_req_http_start:
+        switch (ch) {
+          case 'H':
+            UPDATE_STATE(s_req_http_H);
+            break;
+          case ' ':
+            break;
+          default:
+            SET_ERRNO(HPE_INVALID_CONSTANT);
+            goto error;
+        }
+        break;
+
+      case s_req_http_H:
+        STRICT_CHECK(ch != 'T');
+        UPDATE_STATE(s_req_http_HT);
+        break;
+
+      case s_req_http_HT:
+        STRICT_CHECK(ch != 'T');
+        UPDATE_STATE(s_req_http_HTT);
+        break;
+
+      case s_req_http_HTT:
+        STRICT_CHECK(ch != 'P');
+        UPDATE_STATE(s_req_http_HTTP);
+        break;
+
+      case s_req_http_HTTP:
+        STRICT_CHECK(ch != '/');
+        UPDATE_STATE(s_req_first_http_major);
+        break;
+
+      /* first digit of major HTTP version */
+      case s_req_first_http_major:
+        if (UNLIKELY(ch < '1' || ch > '9')) {
+          SET_ERRNO(HPE_INVALID_VERSION);
+          goto error;
+        }
+
+        parser->http_major = ch - '0';
+        UPDATE_STATE(s_req_http_major);
+        break;
+
+      /* major HTTP version or dot */
+      case s_req_http_major:
+      {
+        if (ch == '.') {
+          UPDATE_STATE(s_req_first_http_minor);
+          break;
+        }
+
+        if (UNLIKELY(!IS_NUM(ch))) {
+          SET_ERRNO(HPE_INVALID_VERSION);
+          goto error;
+        }
+
+        parser->http_major *= 10;
+        parser->http_major += ch - '0';
+
+        if (UNLIKELY(parser->http_major > 999)) {
+          SET_ERRNO(HPE_INVALID_VERSION);
+          goto error;
+        }
+
+        break;
+      }
+
+      /* first digit of minor HTTP version */
+      case s_req_first_http_minor:
+        if (UNLIKELY(!IS_NUM(ch))) {
+          SET_ERRNO(HPE_INVALID_VERSION);
+          goto error;
+        }
+
+        parser->http_minor = ch - '0';
+        UPDATE_STATE(s_req_http_minor);
+        break;
+
+      /* minor HTTP version or end of request line */
+      case s_req_http_minor:
+      {
+        if (ch == CR) {
+          UPDATE_STATE(s_req_line_almost_done);
+          break;
+        }
+
+        if (ch == LF) {
+          UPDATE_STATE(s_header_field_start);
+          break;
+        }
+
+        /* XXX allow spaces after digit? */
+
+        if (UNLIKELY(!IS_NUM(ch))) {
+          SET_ERRNO(HPE_INVALID_VERSION);
+          goto error;
+        }
+
+        parser->http_minor *= 10;
+        parser->http_minor += ch - '0';
+
+        if (UNLIKELY(parser->http_minor > 999)) {
+          SET_ERRNO(HPE_INVALID_VERSION);
+          goto error;
+        }
+
+        break;
+      }
+
+      /* end of request line */
+      case s_req_line_almost_done:
+      {
+        if (UNLIKELY(ch != LF)) {
+          SET_ERRNO(HPE_LF_EXPECTED);
+          goto error;
+        }
+
+        UPDATE_STATE(s_header_field_start);
+        break;
+      }
+
+      case s_header_field_start:
+      {
+        if (ch == CR) {
+          UPDATE_STATE(s_headers_almost_done);
+          break;
+        }
+
+        if (ch == LF) {
+          /* they might be just sending \n instead of \r\n so this would be
+           * the second \n to denote the end of headers*/
+          UPDATE_STATE(s_headers_almost_done);
+          REEXECUTE();
+        }
+
+        c = TOKEN(ch);
+
+        if (UNLIKELY(!c)) {
+          SET_ERRNO(HPE_INVALID_HEADER_TOKEN);
+          goto error;
+        }
+
+        MARK(header_field);
+
+        parser->index = 0;
+        UPDATE_STATE(s_header_field);
+
+        switch (c) {
+          case 'c':
+            parser->header_state = h_C;
+            break;
+
+          case 'p':
+            parser->header_state = h_matching_proxy_connection;
+            break;
+
+          case 't':
+            parser->header_state = h_matching_transfer_encoding;
+            break;
+
+          case 'u':
+            parser->header_state = h_matching_upgrade;
+            break;
+
+          default:
+            parser->header_state = h_general;
+            break;
+        }
+        break;
+      }
+
+      case s_header_field:
+      {
+        const char* start = p;
+        for (; p != data + len; p++) {
+          ch = *p;
+          c = TOKEN(ch);
+
+          if (!c)
+            break;
+
+          switch (parser->header_state) {
+            case h_general:
+              break;
+
+            case h_C:
+              parser->index++;
+              parser->header_state = (c == 'o' ? h_CO : h_general);
+              break;
+
+            case h_CO:
+              parser->index++;
+              parser->header_state = (c == 'n' ? h_CON : h_general);
+              break;
+
+            case h_CON:
+              parser->index++;
+              switch (c) {
+                case 'n':
+                  parser->header_state = h_matching_connection;
+                  break;
+                case 't':
+                  parser->header_state = h_matching_content_length;
+                  break;
+                default:
+                  parser->header_state = h_general;
+                  break;
+              }
+              break;
+
+            /* connection */
+
+            case h_matching_connection:
+              parser->index++;
+              if (parser->index > sizeof(CONNECTION)-1
+                  || c != CONNECTION[parser->index]) {
+                parser->header_state = h_general;
+              } else if (parser->index == sizeof(CONNECTION)-2) {
+                parser->header_state = h_connection;
+              }
+              break;
+
+            /* proxy-connection */
+
+            case h_matching_proxy_connection:
+              parser->index++;
+              if (parser->index > sizeof(PROXY_CONNECTION)-1
+                  || c != PROXY_CONNECTION[parser->index]) {
+                parser->header_state = h_general;
+              } else if (parser->index == sizeof(PROXY_CONNECTION)-2) {
+                parser->header_state = h_connection;
+              }
+              break;
+
+            /* content-length */
+
+            case h_matching_content_length:
+              parser->index++;
+              if (parser->index > sizeof(CONTENT_LENGTH)-1
+                  || c != CONTENT_LENGTH[parser->index]) {
+                parser->header_state = h_general;
+              } else if (parser->index == sizeof(CONTENT_LENGTH)-2) {
+                parser->header_state = h_content_length;
+              }
+              break;
+
+            /* transfer-encoding */
+
+            case h_matching_transfer_encoding:
+              parser->index++;
+              if (parser->index > sizeof(TRANSFER_ENCODING)-1
+                  || c != TRANSFER_ENCODING[parser->index]) {
+                parser->header_state = h_general;
+              } else if (parser->index == sizeof(TRANSFER_ENCODING)-2) {
+                parser->header_state = h_transfer_encoding;
+              }
+              break;
+
+            /* upgrade */
+
+            case h_matching_upgrade:
+              parser->index++;
+              if (parser->index > sizeof(UPGRADE)-1
+                  || c != UPGRADE[parser->index]) {
+                parser->header_state = h_general;
+              } else if (parser->index == sizeof(UPGRADE)-2) {
+                parser->header_state = h_upgrade;
+              }
+              break;
+
+            case h_connection:
+            case h_content_length:
+            case h_transfer_encoding:
+            case h_upgrade:
+              if (ch != ' ') parser->header_state = h_general;
+              break;
+
+            default:
+              assert(0 && "Unknown header_state");
+              break;
+          }
+        }
+
+        COUNT_HEADER_SIZE(p - start);
+
+        if (p == data + len) {
+          --p;
+          break;
+        }
+
+        if (ch == ':') {
+          UPDATE_STATE(s_header_value_discard_ws);
+          CALLBACK_DATA(header_field);
+          break;
+        }
+
+        SET_ERRNO(HPE_INVALID_HEADER_TOKEN);
+        goto error;
+      }
+
+      case s_header_value_discard_ws:
+        if (ch == ' ' || ch == '\t') break;
+
+        if (ch == CR) {
+          UPDATE_STATE(s_header_value_discard_ws_almost_done);
+          break;
+        }
+
+        if (ch == LF) {
+          UPDATE_STATE(s_header_value_discard_lws);
+          break;
+        }
+
+        /* FALLTHROUGH */
+
+      case s_header_value_start:
+      {
+        MARK(header_value);
+
+        UPDATE_STATE(s_header_value);
+        parser->index = 0;
+
+        c = LOWER(ch);
+
+        switch (parser->header_state) {
+          case h_upgrade:
+            parser->flags |= F_UPGRADE;
+            parser->header_state = h_general;
+            break;
+
+          case h_transfer_encoding:
+            /* looking for 'Transfer-Encoding: chunked' */
+            if ('c' == c) {
+              parser->header_state = h_matching_transfer_encoding_chunked;
+            } else {
+              parser->header_state = h_general;
+            }
+            break;
+
+          case h_content_length:
+            if (UNLIKELY(!IS_NUM(ch))) {
+              SET_ERRNO(HPE_INVALID_CONTENT_LENGTH);
+              goto error;
+            }
+
+            parser->content_length = ch - '0';
+            break;
+
+          case h_connection:
+            /* looking for 'Connection: keep-alive' */
+            if (c == 'k') {
+              parser->header_state = h_matching_connection_keep_alive;
+            /* looking for 'Connection: close' */
+            } else if (c == 'c') {
+              parser->header_state = h_matching_connection_close;
+            } else if (c == 'u') {
+              parser->header_state = h_matching_connection_upgrade;
+            } else {
+              parser->header_state = h_matching_connection_token;
+            }
+            break;
+
+          /* Multi-value `Connection` header */
+          case h_matching_connection_token_start:
+            break;
+
+          default:
+            parser->header_state = h_general;
+            break;
+        }
+        break;
+      }
+
+      case s_header_value:
+      {
+        const char* start = p;
+        enum header_states h_state = (enum header_states) parser->header_state;
+        for (; p != data + len; p++) {
+          ch = *p;
+          if (ch == CR) {
+            UPDATE_STATE(s_header_almost_done);
+            parser->header_state = h_state;
+            CALLBACK_DATA(header_value);
+            break;
+          }
+
+          if (ch == LF) {
+            UPDATE_STATE(s_header_almost_done);
+            COUNT_HEADER_SIZE(p - start);
+            parser->header_state = h_state;
+            CALLBACK_DATA_NOADVANCE(header_value);
+            REEXECUTE();
+          }
+
+          c = LOWER(ch);
+
+          switch (h_state) {
+            case h_general:
+            {
+              const char* p_cr;
+              const char* p_lf;
+              size_t limit = data + len - p;
+
+              limit = MIN(limit, HTTP_MAX_HEADER_SIZE);
+
+              p_cr = (const char*) memchr(p, CR, limit);
+              p_lf = (const char*) memchr(p, LF, limit);
+              if (p_cr != NULL) {
+                if (p_lf != NULL && p_cr >= p_lf)
+                  p = p_lf;
+                else
+                  p = p_cr;
+              } else if (UNLIKELY(p_lf != NULL)) {
+                p = p_lf;
+              } else {
+                p = data + len;
+              }
+              --p;
+
+              break;
+            }
+
+            case h_connection:
+            case h_transfer_encoding:
+              assert(0 && "Shouldn't get here.");
+              break;
+
+            case h_content_length:
+            {
+              uint64_t t;
+
+              if (ch == ' ') break;
+
+              if (UNLIKELY(!IS_NUM(ch))) {
+                SET_ERRNO(HPE_INVALID_CONTENT_LENGTH);
+                parser->header_state = h_state;
+                goto error;
+              }
+
+              t = parser->content_length;
+              t *= 10;
+              t += ch - '0';
+
+              /* Overflow? Test against a conservative limit for simplicity. */
+              if (UNLIKELY((ULLONG_MAX - 10) / 10 < parser->content_length)) {
+                SET_ERRNO(HPE_INVALID_CONTENT_LENGTH);
+                parser->header_state = h_state;
+                goto error;
+              }
+
+              parser->content_length = t;
+              break;
+            }
+
+            /* Transfer-Encoding: chunked */
+            case h_matching_transfer_encoding_chunked:
+              parser->index++;
+              if (parser->index > sizeof(CHUNKED)-1
+                  || c != CHUNKED[parser->index]) {
+                h_state = h_general;
+              } else if (parser->index == sizeof(CHUNKED)-2) {
+                h_state = h_transfer_encoding_chunked;
+              }
+              break;
+
+            case h_matching_connection_token_start:
+              /* looking for 'Connection: keep-alive' */
+              if (c == 'k') {
+                h_state = h_matching_connection_keep_alive;
+              /* looking for 'Connection: close' */
+              } else if (c == 'c') {
+                h_state = h_matching_connection_close;
+              } else if (c == 'u') {
+                h_state = h_matching_connection_upgrade;
+              } else if (STRICT_TOKEN(c)) {
+                h_state = h_matching_connection_token;
+              } else {
+                h_state = h_general;
+              }
+              break;
+
+            /* looking for 'Connection: keep-alive' */
+            case h_matching_connection_keep_alive:
+              parser->index++;
+              if (parser->index > sizeof(KEEP_ALIVE)-1
+                  || c != KEEP_ALIVE[parser->index]) {
+                h_state = h_matching_connection_token;
+              } else if (parser->index == sizeof(KEEP_ALIVE)-2) {
+                h_state = h_connection_keep_alive;
+              }
+              break;
+
+            /* looking for 'Connection: close' */
+            case h_matching_connection_close:
+              parser->index++;
+              if (parser->index > sizeof(CLOSE)-1 || c != CLOSE[parser->index]) {
+                h_state = h_matching_connection_token;
+              } else if (parser->index == sizeof(CLOSE)-2) {
+                h_state = h_connection_close;
+              }
+              break;
+
+            /* looking for 'Connection: upgrade' */
+            case h_matching_connection_upgrade:
+              parser->index++;
+              if (parser->index > sizeof(UPGRADE) - 1 ||
+                  c != UPGRADE[parser->index]) {
+                h_state = h_matching_connection_token;
+              } else if (parser->index == sizeof(UPGRADE)-2) {
+                h_state = h_connection_upgrade;
+              }
+              break;
+
+            case h_matching_connection_token:
+              if (ch == ',') {
+                h_state = h_matching_connection_token_start;
+                parser->index = 0;
+              }
+              break;
+
+            case h_transfer_encoding_chunked:
+              if (ch != ' ') h_state = h_general;
+              break;
+
+            case h_connection_keep_alive:
+            case h_connection_close:
+            case h_connection_upgrade:
+              if (ch == ',') {
+                if (h_state == h_connection_keep_alive) {
+                  parser->flags |= F_CONNECTION_KEEP_ALIVE;
+                } else if (h_state == h_connection_close) {
+                  parser->flags |= F_CONNECTION_CLOSE;
+                } else if (h_state == h_connection_upgrade) {
+                  parser->flags |= F_CONNECTION_UPGRADE;
+                }
+                h_state = h_matching_connection_token_start;
+                parser->index = 0;
+              } else if (ch != ' ') {
+                h_state = h_matching_connection_token;
+              }
+              break;
+
+            default:
+              UPDATE_STATE(s_header_value);
+              h_state = h_general;
+              break;
+          }
+        }
+        parser->header_state = h_state;
+
+        COUNT_HEADER_SIZE(p - start);
+
+        if (p == data + len)
+          --p;
+        break;
+      }
+
+      case s_header_almost_done:
+      {
+        STRICT_CHECK(ch != LF);
+
+        UPDATE_STATE(s_header_value_lws);
+        break;
+      }
+
+      case s_header_value_lws:
+      {
+        if (ch == ' ' || ch == '\t') {
+          UPDATE_STATE(s_header_value_start);
+          REEXECUTE();
+        }
+
+        /* finished the header */
+        switch (parser->header_state) {
+          case h_connection_keep_alive:
+            parser->flags |= F_CONNECTION_KEEP_ALIVE;
+            break;
+          case h_connection_close:
+            parser->flags |= F_CONNECTION_CLOSE;
+            break;
+          case h_transfer_encoding_chunked:
+            parser->flags |= F_CHUNKED;
+            break;
+          case h_connection_upgrade:
+            parser->flags |= F_CONNECTION_UPGRADE;
+            break;
+          default:
+            break;
+        }
+
+        UPDATE_STATE(s_header_field_start);
+        REEXECUTE();
+      }
+
+      case s_header_value_discard_ws_almost_done:
+      {
+        STRICT_CHECK(ch != LF);
+        UPDATE_STATE(s_header_value_discard_lws);
+        break;
+      }
+
+      case s_header_value_discard_lws:
+      {
+        if (ch == ' ' || ch == '\t') {
+          UPDATE_STATE(s_header_value_discard_ws);
+          break;
+        } else {
+          switch (parser->header_state) {
+            case h_connection_keep_alive:
+              parser->flags |= F_CONNECTION_KEEP_ALIVE;
+              break;
+            case h_connection_close:
+              parser->flags |= F_CONNECTION_CLOSE;
+              break;
+            case h_connection_upgrade:
+              parser->flags |= F_CONNECTION_UPGRADE;
+              break;
+            case h_transfer_encoding_chunked:
+              parser->flags |= F_CHUNKED;
+              break;
+            default:
+              break;
+          }
+
+          /* header value was empty */
+          MARK(header_value);
+          UPDATE_STATE(s_header_field_start);
+          CALLBACK_DATA_NOADVANCE(header_value);
+          REEXECUTE();
+        }
+      }
+
+      case s_headers_almost_done:
+      {
+        STRICT_CHECK(ch != LF);
+
+        if (parser->flags & F_TRAILING) {
+          /* End of a chunked request */
+          UPDATE_STATE(NEW_MESSAGE());
+          CALLBACK_NOTIFY(message_complete);
+          break;
+        }
+
+        UPDATE_STATE(s_headers_done);
+
+        /* Set this here so that on_headers_complete() callbacks can see it */
+        parser->upgrade =
+          ((parser->flags & (F_UPGRADE | F_CONNECTION_UPGRADE)) ==
+           (F_UPGRADE | F_CONNECTION_UPGRADE) ||
+           parser->method == HTTP_CONNECT);
+
+        /* Here we call the headers_complete callback. This is somewhat
+         * different than other callbacks because if the user returns 1, we
+         * will interpret that as saying that this message has no body. This
+         * is needed for the annoying case of recieving a response to a HEAD
+         * request.
+         *
+         * We'd like to use CALLBACK_NOTIFY_NOADVANCE() here but we cannot, so
+         * we have to simulate it by handling a change in errno below.
+         */
+        if (settings->on_headers_complete) {
+          switch (settings->on_headers_complete(parser)) {
+            case 0:
+              break;
+
+            case 1:
+              parser->flags |= F_SKIPBODY;
+              break;
+
+            default:
+              SET_ERRNO(HPE_CB_headers_complete);
+              RETURN(p - data); /* Error */
+          }
+        }
+
+        if (HTTP_PARSER_ERRNO(parser) != HPE_OK) {
+          RETURN(p - data);
+        }
+
+        REEXECUTE();
+      }
+
+      case s_headers_done:
+      {
+        STRICT_CHECK(ch != LF);
+
+        parser->nread = 0;
+
+        /* Exit, the rest of the connect is in a different protocol. */
+        if (parser->upgrade) {
+          UPDATE_STATE(NEW_MESSAGE());
+          CALLBACK_NOTIFY(message_complete);
+          RETURN((p - data) + 1);
+        }
+
+        if (parser->flags & F_SKIPBODY) {
+          UPDATE_STATE(NEW_MESSAGE());
+          CALLBACK_NOTIFY(message_complete);
+        } else if (parser->flags & F_CHUNKED) {
+          /* chunked encoding - ignore Content-Length header */
+          UPDATE_STATE(s_chunk_size_start);
+        } else {
+          if (parser->content_length == 0) {
+            /* Content-Length header given but zero: Content-Length: 0\r\n */
+            UPDATE_STATE(NEW_MESSAGE());
+            CALLBACK_NOTIFY(message_complete);
+          } else if (parser->content_length != ULLONG_MAX) {
+            /* Content-Length header given and non-zero */
+            UPDATE_STATE(s_body_identity);
+          } else {
+            if (parser->type == HTTP_REQUEST ||
+                !http_message_needs_eof(parser)) {
+              /* Assume content-length 0 - read the next */
+              UPDATE_STATE(NEW_MESSAGE());
+              CALLBACK_NOTIFY(message_complete);
+            } else {
+              /* Read body until EOF */
+              UPDATE_STATE(s_body_identity_eof);
+            }
+          }
+        }
+
+        break;
+      }
+
+      case s_body_identity:
+      {
+        uint64_t to_read = MIN(parser->content_length,
+                               (uint64_t) ((data + len) - p));
+
+        assert(parser->content_length != 0
+            && parser->content_length != ULLONG_MAX);
+
+        /* The difference between advancing content_length and p is because
+         * the latter will automaticaly advance on the next loop iteration.
+         * Further, if content_length ends up at 0, we want to see the last
+         * byte again for our message complete callback.
+         */
+        MARK(body);
+        parser->content_length -= to_read;
+        p += to_read - 1;
+
+        if (parser->content_length == 0) {
+          UPDATE_STATE(s_message_done);
+
+          /* Mimic CALLBACK_DATA_NOADVANCE() but with one extra byte.
+           *
+           * The alternative to doing this is to wait for the next byte to
+           * trigger the data callback, just as in every other case. The
+           * problem with this is that this makes it difficult for the test
+           * harness to distinguish between complete-on-EOF and
+           * complete-on-length. It's not clear that this distinction is
+           * important for applications, but let's keep it for now.
+           */
+          CALLBACK_DATA_(body, p - body_mark + 1, p - data);
+          REEXECUTE();
+        }
+
+        break;
+      }
+
+      /* read until EOF */
+      case s_body_identity_eof:
+        MARK(body);
+        p = data + len - 1;
+
+        break;
+
+      case s_message_done:
+        UPDATE_STATE(NEW_MESSAGE());
+        CALLBACK_NOTIFY(message_complete);
+        break;
+
+      case s_chunk_size_start:
+      {
+        assert(parser->nread == 1);
+        assert(parser->flags & F_CHUNKED);
+
+        unhex_val = unhex[(unsigned char)ch];
+        if (UNLIKELY(unhex_val == -1)) {
+          SET_ERRNO(HPE_INVALID_CHUNK_SIZE);
+          goto error;
+        }
+
+        parser->content_length = unhex_val;
+        UPDATE_STATE(s_chunk_size);
+        break;
+      }
+
+      case s_chunk_size:
+      {
+        uint64_t t;
+
+        assert(parser->flags & F_CHUNKED);
+
+        if (ch == CR) {
+          UPDATE_STATE(s_chunk_size_almost_done);
+          break;
+        }
+
+        unhex_val = unhex[(unsigned char)ch];
+
+        if (unhex_val == -1) {
+          if (ch == ';' || ch == ' ') {
+            UPDATE_STATE(s_chunk_parameters);
+            break;
+          }
+
+          SET_ERRNO(HPE_INVALID_CHUNK_SIZE);
+          goto error;
+        }
+
+        t = parser->content_length;
+        t *= 16;
+        t += unhex_val;
+
+        /* Overflow? Test against a conservative limit for simplicity. */
+        if (UNLIKELY((ULLONG_MAX - 16) / 16 < parser->content_length)) {
+          SET_ERRNO(HPE_INVALID_CONTENT_LENGTH);
+          goto error;
+        }
+
+        parser->content_length = t;
+        break;
+      }
+
+      case s_chunk_parameters:
+      {
+        assert(parser->flags & F_CHUNKED);
+        /* just ignore this shit. TODO check for overflow */
+        if (ch == CR) {
+          UPDATE_STATE(s_chunk_size_almost_done);
+          break;
+        }
+        break;
+      }
+
+      case s_chunk_size_almost_done:
+      {
+        assert(parser->flags & F_CHUNKED);
+        STRICT_CHECK(ch != LF);
+
+        parser->nread = 0;
+
+        if (parser->content_length == 0) {
+          parser->flags |= F_TRAILING;
+          UPDATE_STATE(s_header_field_start);
+        } else {
+          UPDATE_STATE(s_chunk_data);
+        }
+        break;
+      }
+
+      case s_chunk_data:
+      {
+        uint64_t to_read = MIN(parser->content_length,
+                               (uint64_t) ((data + len) - p));
+
+        assert(parser->flags & F_CHUNKED);
+        assert(parser->content_length != 0
+            && parser->content_length != ULLONG_MAX);
+
+        /* See the explanation in s_body_identity for why the content
+         * length and data pointers are managed this way.
+         */
+        MARK(body);
+        parser->content_length -= to_read;
+        p += to_read - 1;
+
+        if (parser->content_length == 0) {
+          UPDATE_STATE(s_chunk_data_almost_done);
+        }
+
+        break;
+      }
+
+      case s_chunk_data_almost_done:
+        assert(parser->flags & F_CHUNKED);
+        assert(parser->content_length == 0);
+        STRICT_CHECK(ch != CR);
+        UPDATE_STATE(s_chunk_data_done);
+        CALLBACK_DATA(body);
+        break;
+
+      case s_chunk_data_done:
+        assert(parser->flags & F_CHUNKED);
+        STRICT_CHECK(ch != LF);
+        parser->nread = 0;
+        UPDATE_STATE(s_chunk_size_start);
+        break;
+
+      default:
+        assert(0 && "unhandled state");
+        SET_ERRNO(HPE_INVALID_INTERNAL_STATE);
+        goto error;
+    }
+  }
+
+  /* Run callbacks for any marks that we have leftover after we ran our of
+   * bytes. There should be at most one of these set, so it's OK to invoke
+   * them in series (unset marks will not result in callbacks).
+   *
+   * We use the NOADVANCE() variety of callbacks here because 'p' has already
+   * overflowed 'data' and this allows us to correct for the off-by-one that
+   * we'd otherwise have (since CALLBACK_DATA() is meant to be run with a 'p'
+   * value that's in-bounds).
+   */
+
+  assert(((header_field_mark ? 1 : 0) +
+          (header_value_mark ? 1 : 0) +
+          (url_mark ? 1 : 0)  +
+          (body_mark ? 1 : 0) +
+          (status_mark ? 1 : 0)) <= 1);
+
+  CALLBACK_DATA_NOADVANCE(header_field);
+  CALLBACK_DATA_NOADVANCE(header_value);
+  CALLBACK_DATA_NOADVANCE(url);
+  CALLBACK_DATA_NOADVANCE(body);
+  CALLBACK_DATA_NOADVANCE(status);
+
+  RETURN(len);
+
+error:
+  if (HTTP_PARSER_ERRNO(parser) == HPE_OK) {
+    SET_ERRNO(HPE_UNKNOWN);
+  }
+
+  RETURN(p - data);
+}
+
+
+/* Does the parser need to see an EOF to find the end of the message? */
+int
+http_message_needs_eof (const http_parser *parser)
+{
+  if (parser->type == HTTP_REQUEST) {
+    return 0;
+  }
+
+  /* See RFC 2616 section 4.4 */
+  if (parser->status_code / 100 == 1 || /* 1xx e.g. Continue */
+      parser->status_code == 204 ||     /* No Content */
+      parser->status_code == 304 ||     /* Not Modified */
+      parser->flags & F_SKIPBODY) {     /* response to a HEAD request */
+    return 0;
+  }
+
+  if ((parser->flags & F_CHUNKED) || parser->content_length != ULLONG_MAX) {
+    return 0;
+  }
+
+  return 1;
+}
+
+
+int
+http_should_keep_alive (const http_parser *parser)
+{
+  if (parser->http_major > 0 && parser->http_minor > 0) {
+    /* HTTP/1.1 */
+    if (parser->flags & F_CONNECTION_CLOSE) {
+      return 0;
+    }
+  } else {
+    /* HTTP/1.0 or earlier */
+    if (!(parser->flags & F_CONNECTION_KEEP_ALIVE)) {
+      return 0;
+    }
+  }
+
+  return !http_message_needs_eof(parser);
+}
+
+
+const char *
+http_method_str (enum http_method m)
+{
+  return ELEM_AT(method_strings, m, "<unknown>");
+}
+
+
+void
+http_parser_init (http_parser *parser, enum http_parser_type t)
+{
+  void *data = parser->data; /* preserve application data */
+  memset(parser, 0, sizeof(*parser));
+  parser->data = data;
+  parser->type = t;
+  parser->state = (t == HTTP_REQUEST ? s_start_req : (t == HTTP_RESPONSE ? s_start_res : s_start_req_or_res));
+  parser->http_errno = HPE_OK;
+}
+
+const char *
+http_errno_name(enum http_errno err) {
+  assert(err < (sizeof(http_strerror_tab)/sizeof(http_strerror_tab[0])));
+  return http_strerror_tab[err].name;
+}
+
+const char *
+http_errno_description(enum http_errno err) {
+  assert(err < (sizeof(http_strerror_tab)/sizeof(http_strerror_tab[0])));
+  return http_strerror_tab[err].description;
+}
+
+static enum http_host_state
+http_parse_host_char(enum http_host_state s, const char ch) {
+  switch(s) {
+    case s_http_userinfo:
+    case s_http_userinfo_start:
+      if (ch == '@') {
+        return s_http_host_start;
+      }
+
+      if (IS_USERINFO_CHAR(ch)) {
+        return s_http_userinfo;
+      }
+      break;
+
+    case s_http_host_start:
+      if (ch == '[') {
+        return s_http_host_v6_start;
+      }
+
+      if (IS_HOST_CHAR(ch)) {
+        return s_http_host;
+      }
+
+      break;
+
+    case s_http_host:
+      if (IS_HOST_CHAR(ch)) {
+        return s_http_host;
+      }
+
+    /* FALLTHROUGH */
+    case s_http_host_v6_end:
+      if (ch == ':') {
+        return s_http_host_port_start;
+      }
+
+      break;
+
+    case s_http_host_v6:
+      if (ch == ']') {
+        return s_http_host_v6_end;
+      }
+
+    /* FALLTHROUGH */
+    case s_http_host_v6_start:
+      if (IS_HEX(ch) || ch == ':' || ch == '.') {
+        return s_http_host_v6;
+      }
+
+      break;
+
+    case s_http_host_port:
+    case s_http_host_port_start:
+      if (IS_NUM(ch)) {
+        return s_http_host_port;
+      }
+
+      break;
+
+    default:
+      break;
+  }
+  return s_http_host_dead;
+}
+
+static int
+http_parse_host(const char * buf, struct http_parser_url *u, int found_at) {
+  enum http_host_state s;
+
+  const char *p;
+  size_t buflen = u->field_data[UF_HOST].off + u->field_data[UF_HOST].len;
+
+  u->field_data[UF_HOST].len = 0;
+
+  s = found_at ? s_http_userinfo_start : s_http_host_start;
+
+  for (p = buf + u->field_data[UF_HOST].off; p < buf + buflen; p++) {
+    enum http_host_state new_s = http_parse_host_char(s, *p);
+
+    if (new_s == s_http_host_dead) {
+      return 1;
+    }
+
+    switch(new_s) {
+      case s_http_host:
+        if (s != s_http_host) {
+          u->field_data[UF_HOST].off = p - buf;
+        }
+        u->field_data[UF_HOST].len++;
+        break;
+
+      case s_http_host_v6:
+        if (s != s_http_host_v6) {
+          u->field_data[UF_HOST].off = p - buf;
+        }
+        u->field_data[UF_HOST].len++;
+        break;
+
+      case s_http_host_port:
+        if (s != s_http_host_port) {
+          u->field_data[UF_PORT].off = p - buf;
+          u->field_data[UF_PORT].len = 0;
+          u->field_set |= (1 << UF_PORT);
+        }
+        u->field_data[UF_PORT].len++;
+        break;
+
+      case s_http_userinfo:
+        if (s != s_http_userinfo) {
+          u->field_data[UF_USERINFO].off = p - buf ;
+          u->field_data[UF_USERINFO].len = 0;
+          u->field_set |= (1 << UF_USERINFO);
+        }
+        u->field_data[UF_USERINFO].len++;
+        break;
+
+      default:
+        break;
+    }
+    s = new_s;
+  }
+
+  /* Make sure we don't end somewhere unexpected */
+  switch (s) {
+    case s_http_host_start:
+    case s_http_host_v6_start:
+    case s_http_host_v6:
+    case s_http_host_port_start:
+    case s_http_userinfo:
+    case s_http_userinfo_start:
+      return 1;
+    default:
+      break;
+  }
+
+  return 0;
+}
+
+int
+http_parser_parse_url(const char *buf, size_t buflen, int is_connect,
+                      struct http_parser_url *u)
+{
+  enum state s;
+  const char *p;
+  enum http_parser_url_fields uf, old_uf;
+  int found_at = 0;
+
+  u->port = u->field_set = 0;
+  s = is_connect ? s_req_server_start : s_req_spaces_before_url;
+  old_uf = UF_MAX;
+
+  for (p = buf; p < buf + buflen; p++) {
+    s = parse_url_char(s, *p);
+
+    /* Figure out the next field that we're operating on */
+    switch (s) {
+      case s_dead:
+        return 1;
+
+      /* Skip delimeters */
+      case s_req_schema_slash:
+      case s_req_schema_slash_slash:
+      case s_req_server_start:
+      case s_req_query_string_start:
+      case s_req_fragment_start:
+        continue;
+
+      case s_req_schema:
+        uf = UF_SCHEMA;
+        break;
+
+      case s_req_server_with_at:
+        found_at = 1;
+
+      /* FALLTROUGH */
+      case s_req_server:
+        uf = UF_HOST;
+        break;
+
+      case s_req_path:
+        uf = UF_PATH;
+        break;
+
+      case s_req_query_string:
+        uf = UF_QUERY;
+        break;
+
+      case s_req_fragment:
+        uf = UF_FRAGMENT;
+        break;
+
+      default:
+        assert(!"Unexpected state");
+        return 1;
+    }
+
+    /* Nothing's changed; soldier on */
+    if (uf == old_uf) {
+      u->field_data[uf].len++;
+      continue;
+    }
+
+    u->field_data[uf].off = p - buf;
+    u->field_data[uf].len = 1;
+
+    u->field_set |= (1 << uf);
+    old_uf = uf;
+  }
+
+  /* host must be present if there is a schema */
+  /* parsing http:///toto will fail */
+  if ((u->field_set & ((1 << UF_SCHEMA) | (1 << UF_HOST))) != 0) {
+    if (http_parse_host(buf, u, found_at) != 0) {
+      return 1;
+    }
+  }
+
+  /* CONNECT requests can only contain "hostname:port" */
+  if (is_connect && u->field_set != ((1 << UF_HOST)|(1 << UF_PORT))) {
+    return 1;
+  }
+
+  if (u->field_set & (1 << UF_PORT)) {
+    /* Don't bother with endp; we've already validated the string */
+    unsigned long v = strtoul(buf + u->field_data[UF_PORT].off, NULL, 10);
+
+    /* Ports have a max value of 2^16 */
+    if (v > 0xffff) {
+      return 1;
+    }
+
+    u->port = (uint16_t) v;
+  }
+
+  return 0;
+}
+
+void
+http_parser_pause(http_parser *parser, int paused) {
+  /* Users should only be pausing/unpausing a parser that is not in an error
+   * state. In non-debug builds, there's not much that we can do about this
+   * other than ignore it.
+   */
+  if (HTTP_PARSER_ERRNO(parser) == HPE_OK ||
+      HTTP_PARSER_ERRNO(parser) == HPE_PAUSED) {
+    SET_ERRNO((paused) ? HPE_PAUSED : HPE_OK);
+  } else {
+    assert(0 && "Attempting to pause parser in error state");
+  }
+}
+
+int
+http_body_is_final(const struct http_parser *parser) {
+    return parser->state == s_message_done;
+}
+
+unsigned long
+http_parser_version(void) {
+  return HTTP_PARSER_VERSION_MAJOR * 0x10000 |
+         HTTP_PARSER_VERSION_MINOR * 0x00100 |
+         HTTP_PARSER_VERSION_PATCH * 0x00001;
+}
Index: EcnlProtoTool/trunk/prototool/webserver/http_parser.h
===================================================================
--- EcnlProtoTool/trunk/prototool/webserver/http_parser.h	(revision 270)
+++ EcnlProtoTool/trunk/prototool/webserver/http_parser.h	(revision 270)
@@ -0,0 +1,331 @@
+/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+#ifndef http_parser_h
+#define http_parser_h
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Also update SONAME in the Makefile whenever you change these. */
+#define HTTP_PARSER_VERSION_MAJOR 2
+#define HTTP_PARSER_VERSION_MINOR 4
+#define HTTP_PARSER_VERSION_PATCH 1
+
+#include <t_stddef.h>
+#include <t_syslog.h>
+#if defined(_WIN32) && !defined(__MINGW32__) && (!defined(_MSC_VER) || _MSC_VER<1600)
+#include <BaseTsd.h>
+#include <stddef.h>
+typedef __int8 int8_t;
+typedef unsigned __int8 uint8_t;
+typedef __int16 int16_t;
+typedef unsigned __int16 uint16_t;
+typedef __int32 int32_t;
+typedef unsigned __int32 uint32_t;
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#else
+#include <stdint.h>
+#endif
+
+/* Compile with -DHTTP_PARSER_STRICT=0 to make less checks, but run
+ * faster
+ */
+#ifndef HTTP_PARSER_STRICT
+# define HTTP_PARSER_STRICT 1
+#endif
+
+/* Maximium header size allowed. If the macro is not defined
+ * before including this header then the default is used. To
+ * change the maximum header size, define the macro in the build
+ * environment (e.g. -DHTTP_MAX_HEADER_SIZE=<value>). To remove
+ * the effective limit on the size of the header, define the macro
+ * to a very large number (e.g. -DHTTP_MAX_HEADER_SIZE=0x7fffffff)
+ */
+#ifndef HTTP_MAX_HEADER_SIZE
+# define HTTP_MAX_HEADER_SIZE (80*1024)
+#endif
+
+typedef struct http_parser http_parser;
+typedef struct http_parser_settings http_parser_settings;
+
+
+/* Callbacks should return non-zero to indicate an error. The parser will
+ * then halt execution.
+ *
+ * The one exception is on_headers_complete. In a HTTP_RESPONSE parser
+ * returning '1' from on_headers_complete will tell the parser that it
+ * should not expect a body. This is used when receiving a response to a
+ * HEAD request which may contain 'Content-Length' or 'Transfer-Encoding:
+ * chunked' headers that indicate the presence of a body.
+ *
+ * http_data_cb does not return data chunks. It will be called arbitrarily
+ * many times for each string. E.G. you might get 10 callbacks for "on_url"
+ * each providing just a few characters more data.
+ */
+typedef int (*http_data_cb) (http_parser*, const char *at, size_t length);
+typedef int (*http_cb) (http_parser*);
+
+
+/* Request Methods */
+#define HTTP_METHOD_MAP(XX)         \
+  XX(0,  DELETE,      DELETE)       \
+  XX(1,  GET,         GET)          \
+  XX(2,  HEAD,        HEAD)         \
+  XX(3,  POST,        POST)         \
+  XX(4,  PUT,         PUT)          \
+  /* pathological */                \
+  XX(5,  CONNECT,     CONNECT)      \
+  XX(6,  OPTIONS,     OPTIONS)      \
+  XX(7,  TRACE,       TRACE)        \
+  /* webdav */                      \
+  XX(8,  COPY,        COPY)         \
+  XX(9,  LOCK,        LOCK)         \
+  XX(10, MKCOL,       MKCOL)        \
+  XX(11, MOVE,        MOVE)         \
+  XX(12, PROPFIND,    PROPFIND)     \
+  XX(13, PROPPATCH,   PROPPATCH)    \
+  XX(14, SEARCH,      SEARCH)       \
+  XX(15, UNLOCK,      UNLOCK)       \
+  /* subversion */                  \
+  XX(16, REPORT,      REPORT)       \
+  XX(17, MKACTIVITY,  MKACTIVITY)   \
+  XX(18, CHECKOUT,    CHECKOUT)     \
+  XX(19, MERGE,       MERGE)        \
+  /* upnp */                        \
+  XX(20, MSEARCH,     M-SEARCH)     \
+  XX(21, NOTIFY,      NOTIFY)       \
+  XX(22, SUBSCRIBE,   SUBSCRIBE)    \
+  XX(23, UNSUBSCRIBE, UNSUBSCRIBE)  \
+  /* RFC-5789 */                    \
+  XX(24, PATCH,       PATCH)        \
+  XX(25, PURGE,       PURGE)        \
+  /* CalDAV */                      \
+  XX(26, MKCALENDAR,  MKCALENDAR)   \
+
+enum http_method
+  {
+#define XX(num, name, string) HTTP_##name = num,
+  HTTP_METHOD_MAP(XX)
+#undef XX
+  };
+
+
+enum http_parser_type { HTTP_REQUEST, HTTP_RESPONSE, HTTP_BOTH };
+
+
+/* Flag values for http_parser.flags field */
+enum flags
+  { F_CHUNKED               = 1 << 0
+  , F_CONNECTION_KEEP_ALIVE = 1 << 1
+  , F_CONNECTION_CLOSE      = 1 << 2
+  , F_CONNECTION_UPGRADE    = 1 << 3
+  , F_TRAILING              = 1 << 4
+  , F_UPGRADE               = 1 << 5
+  , F_SKIPBODY              = 1 << 6
+  };
+
+
+/* Map for errno-related constants
+ * 
+ * The provided argument should be a macro that takes 2 arguments.
+ */
+#define HTTP_ERRNO_MAP(XX)                                           \
+  /* No error */                                                     \
+  XX(OK, "success")                                                  \
+                                                                     \
+  /* Callback-related errors */                                      \
+  XX(CB_message_begin, "the on_message_begin callback failed")       \
+  XX(CB_url, "the on_url callback failed")                           \
+  XX(CB_header_field, "the on_header_field callback failed")         \
+  XX(CB_header_value, "the on_header_value callback failed")         \
+  XX(CB_headers_complete, "the on_headers_complete callback failed") \
+  XX(CB_body, "the on_body callback failed")                         \
+  XX(CB_message_complete, "the on_message_complete callback failed") \
+  XX(CB_status, "the on_status callback failed")                     \
+                                                                     \
+  /* Parsing-related errors */                                       \
+  XX(INVALID_EOF_STATE, "stream ended at an unexpected time")        \
+  XX(HEADER_OVERFLOW,                                                \
+     "too many header bytes seen; overflow detected")                \
+  XX(CLOSED_CONNECTION,                                              \
+     "data received after completed connection: close message")      \
+  XX(INVALID_VERSION, "invalid HTTP version")                        \
+  XX(INVALID_STATUS, "invalid HTTP status code")                     \
+  XX(INVALID_METHOD, "invalid HTTP method")                          \
+  XX(INVALID_URL, "invalid URL")                                     \
+  XX(INVALID_HOST, "invalid host")                                   \
+  XX(INVALID_PORT, "invalid port")                                   \
+  XX(INVALID_PATH, "invalid path")                                   \
+  XX(INVALID_QUERY_STRING, "invalid query string")                   \
+  XX(INVALID_FRAGMENT, "invalid fragment")                           \
+  XX(LF_EXPECTED, "LF character expected")                           \
+  XX(INVALID_HEADER_TOKEN, "invalid character in header")            \
+  XX(INVALID_CONTENT_LENGTH,                                         \
+     "invalid character in content-length header")                   \
+  XX(INVALID_CHUNK_SIZE,                                             \
+     "invalid character in chunk size header")                       \
+  XX(INVALID_CONSTANT, "invalid constant string")                    \
+  XX(INVALID_INTERNAL_STATE, "encountered unexpected internal state")\
+  XX(STRICT, "strict mode assertion failed")                         \
+  XX(PAUSED, "parser is paused")                                     \
+  XX(UNKNOWN, "an unknown error occurred")
+
+
+/* Define HPE_* values for each errno value above */
+#define HTTP_ERRNO_GEN(n, s) HPE_##n,
+enum http_errno {
+  HTTP_ERRNO_MAP(HTTP_ERRNO_GEN)
+};
+#undef HTTP_ERRNO_GEN
+
+
+/* Get an http_errno value from an http_parser */
+#define HTTP_PARSER_ERRNO(p)            ((enum http_errno) (p)->http_errno)
+
+
+struct http_parser {
+  /** PRIVATE **/
+  unsigned int type : 2;         /* enum http_parser_type */
+  unsigned int flags : 6;        /* F_* values from 'flags' enum; semi-public */
+  unsigned int state : 8;        /* enum state from http_parser.c */
+  unsigned int header_state : 8; /* enum header_state from http_parser.c */
+  unsigned int index : 8;        /* index into current matcher */
+
+  uint32_t nread;          /* # bytes read in various scenarios */
+  uint64_t content_length; /* # bytes in body (0 if no Content-Length header) */
+
+  /** READ-ONLY **/
+  unsigned short http_major;
+  unsigned short http_minor;
+  unsigned int status_code : 16; /* responses only */
+  unsigned int method : 8;       /* requests only */
+  unsigned int http_errno : 7;
+
+  /* 1 = Upgrade header was present and the parser has exited because of that.
+   * 0 = No upgrade header present.
+   * Should be checked when http_parser_execute() returns in addition to
+   * error checking.
+   */
+  unsigned int upgrade : 1;
+
+  /** PUBLIC **/
+  void *data; /* A pointer to get hook to the "connection" or "socket" object */
+};
+
+
+struct http_parser_settings {
+  http_cb      on_message_begin;
+  http_data_cb on_url;
+  http_data_cb on_status;
+  http_data_cb on_header_field;
+  http_data_cb on_header_value;
+  http_cb      on_headers_complete;
+  http_data_cb on_body;
+  http_cb      on_message_complete;
+};
+
+
+enum http_parser_url_fields
+  { UF_SCHEMA           = 0
+  , UF_HOST             = 1
+  , UF_PORT             = 2
+  , UF_PATH             = 3
+  , UF_QUERY            = 4
+  , UF_FRAGMENT         = 5
+  , UF_USERINFO         = 6
+  , UF_MAX              = 7
+  };
+
+
+/* Result structure for http_parser_parse_url().
+ *
+ * Callers should index into field_data[] with UF_* values iff field_set
+ * has the relevant (1 << UF_*) bit set. As a courtesy to clients (and
+ * because we probably have padding left over), we convert any port to
+ * a uint16_t.
+ */
+struct http_parser_url {
+  uint16_t field_set;           /* Bitmask of (1 << UF_*) values */
+  uint16_t port;                /* Converted UF_PORT string */
+
+  struct {
+    uint16_t off;               /* Offset into buffer in which field starts */
+    uint16_t len;               /* Length of run in buffer */
+  } field_data[UF_MAX];
+};
+
+
+/* Returns the library version. Bits 16-23 contain the major version number,
+ * bits 8-15 the minor version number and bits 0-7 the patch level.
+ * Usage example:
+ *
+ *   unsigned long version = http_parser_version();
+ *   unsigned major = (version >> 16) & 255;
+ *   unsigned minor = (version >> 8) & 255;
+ *   unsigned patch = version & 255;
+ *   printf("http_parser v%u.%u.%u\n", major, minor, patch);
+ */
+unsigned long http_parser_version(void);
+
+void http_parser_init(http_parser *parser, enum http_parser_type type);
+
+
+/* Executes the parser. Returns number of parsed bytes. Sets
+ * `parser->http_errno` on error. */
+size_t http_parser_execute(http_parser *parser,
+                           const http_parser_settings *settings,
+                           const char *data,
+                           size_t len);
+
+
+/* If http_should_keep_alive() in the on_headers_complete or
+ * on_message_complete callback returns 0, then this should be
+ * the last message on the connection.
+ * If you are the server, respond with the "Connection: close" header.
+ * If you are the client, close the connection.
+ */
+int http_should_keep_alive(const http_parser *parser);
+
+/* Returns a string version of the HTTP method. */
+const char *http_method_str(enum http_method m);
+
+/* Return a string name of the given error */
+const char *http_errno_name(enum http_errno err);
+
+/* Return a string description of the given error */
+const char *http_errno_description(enum http_errno err);
+
+/* Parse a URL; return nonzero on failure */
+int http_parser_parse_url(const char *buf, size_t buflen,
+                          int is_connect,
+                          struct http_parser_url *u);
+
+/* Pause or un-pause the parser; a nonzero value pauses */
+void http_parser_pause(http_parser *parser, int paused);
+
+/* Checks if this is the final chunk of the body. */
+int http_body_is_final(const http_parser *parser);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Index: EcnlProtoTool/trunk/prototool/webserver/httpd-fs.c
===================================================================
--- EcnlProtoTool/trunk/prototool/webserver/httpd-fs.c	(revision 270)
+++ EcnlProtoTool/trunk/prototool/webserver/httpd-fs.c	(revision 270)
@@ -0,0 +1,321 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ *
+ *  Copyright (C) 2017 Cores Co., Ltd. Japan
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  @(#) $Id$
+ */
+
+#include "httpd.h"
+#include "httpd-fs.h"
+#include "ff.h"
+#include "diskio.h"
+#include <string.h>
+#include "http-strings.h"
+#include <kernel.h>
+#include "kernel_cfg.h"
+#include "syssvc/syslog.h"
+#include "arduino.h"
+
+#ifndef _MSC_VER
+#ifndef strcat_s
+#define strcat_s(dst, dsz, src) strcat(dst, src)
+#endif
+#endif
+
+//#define FILE_DUMP
+#ifdef FILE_DUMP
+char path[256] = "";
+FATFS fs;
+#endif
+
+#ifndef NULL
+#define NULL 0
+#endif /* NULL */
+
+/*-----------------------------------------------------------------------------------*/
+#ifdef FILE_DUMP
+FRESULT scan_files(char* path, int size)
+{
+	FRESULT res;
+	FILINFO fno;
+	DIR dir;
+	int i;
+	char *fn;   /* This function assumes non-Unicode configuration */
+
+	res = f_opendir(&dir, path);
+	if (res == FR_OK) {
+		i = strlen(path);
+		for (;;) {
+			res = f_readdir(&dir, &fno);
+			if (res != FR_OK || fno.fname[0] == 0) break;
+			fn = fno.fname;
+			if (fno.fattrib & AM_DIR) {
+				sprintf(&path[i], "0:/%s", fn);
+				res = scan_files(path, size);
+				if (res != FR_OK) break;
+				path[i] = 0;
+			}
+			else {
+				syslog(LOG_ERROR, "%s/%s\n", path, fn);
+			}
+		}
+	}
+
+	return res;
+}
+#endif
+/*-----------------------------------------------------------------------------------*/
+int
+httpd_fs_open_ul(char *name, int len, struct httpd_fs_file *file)
+{
+	FRESULT res;
+	FIL *fd = (FIL *)&file->fd;
+	FILINFO fno;
+	DIR dir;
+
+	file->pos = 0;
+	file->len = 0;
+	file->name = name;
+	file->redirect = 0;
+	memset(fd, 0, sizeof(FIL));
+
+	if ((res = f_open(fd, name, FA_OPEN_EXISTING | FA_READ)) != FR_OK) {
+		if ((res = f_opendir(&dir, name)) != FR_OK) {
+			syslog(LOG_ERROR, "f_opendir(%s) => %d\n", name, res);
+			return 0;
+		}
+
+		if ((res = f_readdir(&dir, &fno)) != FR_OK) {
+			syslog(LOG_ERROR, "f_readdir(%s) => %d\n", name, res);
+			return 0;
+		}
+
+		if (len != 0/*fno.fattrib & AM_DIR*/) {
+			strcat_s(name, len, http_index_html);
+			res = f_open(fd, name, FA_OPEN_EXISTING | FA_READ);
+			file->redirect = res == FR_OK;
+		}
+		else
+			res = FR_NO_FILE;
+
+		if (res != FR_OK) {
+			syslog(LOG_ERROR, "f_open(%s) => %d %x\n", name, res, fno.fattrib);
+			return 0;
+		}
+	}
+
+	file->len = fd->fsize;
+
+	//syslog(LOG_ERROR, "httpd_fs_open(%d:%s) %d\n", drv, name, file->len);
+
+	return 1;
+}
+
+int
+httpd_fs_open(char *name, int len, struct httpd_fs_file *file)
+{
+	int result;
+
+	wai_sem(SEM_FILESYSTEM);
+
+	result = httpd_fs_open_ul(name, len, file);
+
+	sig_sem(SEM_FILESYSTEM);
+
+	return result;
+}
+/*-----------------------------------------------------------------------------------*/
+int
+httpd_fs_create_ul(char *name, struct httpd_fs_file *file)
+{
+	FRESULT res;
+	FIL *fd = (FIL *)&file->fd;
+
+	file->pos = 0;
+	file->len = 0;
+	file->name = name;
+	file->redirect = 0;
+	memset(fd, 0, sizeof(FIL));
+
+	if ((res = f_open(fd, name, FA_CREATE_ALWAYS | FA_WRITE)) != FR_OK) {
+		syslog(LOG_ERROR, "f_open(%s) => %d\n", name, res);
+		return 0;
+	}
+
+	file->pos = 0;
+	file->len = 0;
+
+	//syslog(LOG_ERROR, "httpd_fs_create(%d:%s) %d\n", drv, name, file->len);
+
+	return 1;
+}
+
+int
+httpd_fs_create(char *name, struct httpd_fs_file *file)
+{
+	int result;
+
+	wai_sem(SEM_FILESYSTEM);
+
+	result = httpd_fs_create_ul(name, file);
+
+	sig_sem(SEM_FILESYSTEM);
+
+	return result;
+}
+/*-----------------------------------------------------------------------------------*/
+int
+httpd_fs_read_ul(struct httpd_fs_file *file, void *dst, int len)
+{
+	FRESULT ret;
+	UINT rlen = 0;
+	FIL *fd = (FIL *)&file->fd;
+
+	if ((ret = f_lseek(fd, file->pos)) != FR_OK) {
+		syslog(LOG_ERROR, "f_lseek(%s, %d) => %d\n", file->name, file->pos, ret);
+		return 0;
+	}
+
+	if (file->pos != fd->fptr) {
+		syslog(LOG_ERROR, "f_lseek(%s, %d) != %d\n", file->name, file->pos, fd->fptr);
+	}
+
+	if ((ret = f_read(fd, dst, len, &rlen)) != FR_OK) {
+		syslog(LOG_ERROR, "f_read(%s, 0x%p, %d) => %d\n", file->name, dst, len, ret);
+		return 0;
+	}
+
+	//syslog(LOG_ERROR, "httpd_fs_read(%d:%s, %d, %d) => %d\n", file->drv, file->name, file->pos, len, rlen);
+
+	return rlen;
+}
+
+int
+httpd_fs_read(struct httpd_fs_file *file, void *dst, int len)
+{
+	int result;
+
+	wai_sem(SEM_FILESYSTEM);
+
+	result = httpd_fs_read_ul(file, dst, len);
+
+	sig_sem(SEM_FILESYSTEM);
+
+	return result;
+}
+/*-----------------------------------------------------------------------------------*/
+int
+httpd_fs_write_ul(struct httpd_fs_file *file, const void *src, int len)
+{
+	FRESULT ret;
+	UINT rlen = 0;
+	FIL *fd = (FIL *)&file->fd;
+
+	if ((ret = f_lseek(fd, file->pos)) != FR_OK) {
+		syslog(LOG_ERROR, "f_lseek(%s, %d) => %d\n", file->name, file->pos, ret);
+		return 0;
+	}
+
+	if (file->pos != fd->fptr) {
+		syslog(LOG_ERROR, "f_lseek(%s, %d) != %d\n", file->name, file->pos, fd->fptr);
+	}
+
+	if ((ret = f_write(fd, src, len, &rlen)) != FR_OK) {
+		syslog(LOG_ERROR, "f_write(%s, 0x%p, %d) => %d\n", file->name, src, len, ret);
+		return 0;
+	}
+
+	file->pos += rlen;
+	file->len += rlen;
+
+	//syslog(LOG_ERROR, "httpd_fs_write(%d:%s, %d, %d) => %d\n", file->drv, file->name, file->pos, len, rlen);
+
+	return rlen;
+}
+
+int
+httpd_fs_write(struct httpd_fs_file *file, const void *src, int len)
+{
+	int result;
+
+	wai_sem(SEM_FILESYSTEM);
+
+	result = httpd_fs_write_ul(file, src, len);
+
+	sig_sem(SEM_FILESYSTEM);
+
+	return result;
+}
+/*-----------------------------------------------------------------------------------*/
+int httpd_fs_close_ul(struct httpd_fs_file *file)
+{
+	FRESULT ret;
+	FIL *fd = (FIL *)&file->fd;
+
+	if ((ret = f_close(fd)) != FR_OK) {
+		syslog(LOG_ERROR, "f_close(%s) => %d\n", file->name, ret);
+		return 0;
+	}
+
+	memset(fd, 0, sizeof(FIL));
+
+	return 1;
+}
+
+int httpd_fs_close(struct httpd_fs_file *file)
+{
+	int result;
+
+	wai_sem(SEM_FILESYSTEM);
+
+	result = httpd_fs_close_ul(file);
+
+	sig_sem(SEM_FILESYSTEM);
+
+	return result;
+}
Index: EcnlProtoTool/trunk/prototool/webserver/httpd-fs.h
===================================================================
--- EcnlProtoTool/trunk/prototool/webserver/httpd-fs.h	(revision 270)
+++ EcnlProtoTool/trunk/prototool/webserver/httpd-fs.h	(revision 270)
@@ -0,0 +1,70 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ *
+ *  Copyright (C) 2017 Cores Co., Ltd. Japan
+ *
+ *  ãLì ÒÍCÈºÌ(1)`(4)Ìðð½·êÉÀèC{\tgEF
+ *  Ai{\tgEFAðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»Eü
+ *  ÏEÄzziÈºCpÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ *      Ü½C{\tgEFAÌ[UÜ½ÍGh[U©çÌ¢©Èé
+ *      RÉîÃ­¿©çàCãLì Ò¨æÑTOPPERSvWFNgð
+ *      ÆÓ·é±ÆD
+ *
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄCÁèÌgpÚI
+ *  ÉÎ·éK«àÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEF
+ *  AÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»
+ *  ÌÓCðíÈ¢D
+ *
+ *  @(#) $Id$
+ */
+#ifndef __HTTPD_FS_H__
+#define __HTTPD_FS_H__
+
+#define HTTPD_FS_STATISTICS 0
+
+struct httpd_fs_file {
+  int pos;
+  int len;
+  const char *name;
+  int redirect;
+  char fd[64/*sizeof(FIL)*/];
+};
+
+/* file must be allocated by caller and will be filled in
+   by the function. */
+int httpd_fs_open(char *name, int len, struct httpd_fs_file *file);
+int httpd_fs_create(char *name, struct httpd_fs_file *file);
+int httpd_fs_read(struct httpd_fs_file *file, void *dst, int len);
+int httpd_fs_write(struct httpd_fs_file *file, const void *src, int len);
+int httpd_fs_close(struct httpd_fs_file *file);
+
+#ifdef HTTPD_FS_STATISTICS
+#if HTTPD_FS_STATISTICS == 1
+uint16_t httpd_fs_count(char *name);
+#endif /* HTTPD_FS_STATISTICS */
+#endif /* HTTPD_FS_STATISTICS */
+
+void httpd_fs_init(void);
+
+#endif /* __HTTPD_FS_H__ */
Index: EcnlProtoTool/trunk/prototool/webserver/httpd.c
===================================================================
--- EcnlProtoTool/trunk/prototool/webserver/httpd.c	(revision 270)
+++ EcnlProtoTool/trunk/prototool/webserver/httpd.c	(revision 270)
@@ -0,0 +1,414 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ *
+ *  Copyright (C) 2017 Cores Co., Ltd. Japan
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  @(#) $Id$
+ */
+
+#include "httpd.h"
+#include <string.h>
+#include <stdlib.h>
+#include "syssvc/syslog.h"
+#include "http-strings.h"
+#include "netinet/in.h"
+#include "arduino.h"
+
+#define TRUE 1
+#define FALSE 0
+
+#ifndef _MSC_VER
+/* strnlen() is a POSIX.2008 addition. Can't rely on it being available so
+ * define it ourselves.
+ */
+size_t
+strnlen(const char *s, size_t maxlen)
+{
+	const char *p;
+
+	p = memchr(s, '\0', maxlen);
+	if (p == NULL)
+		return maxlen;
+
+	return p - s;
+}
+
+void strcpy_s(char *dst, int size, const char *src)
+{
+	int slen = strlen(src);
+	if (slen >= size)
+		slen = size - 1;
+	memcpy(dst, src, slen);
+	dst[slen] = '\0';
+}
+
+void strcat_s(char *dst, int size, const char *src)
+{
+	int dlen = strlen(dst);
+	int slen = strlen(src);
+	if (dlen + slen >= size)
+		slen = size - 1 - dlen;
+	memcpy(&dst[dlen], src, slen);
+	dst[dlen + slen] = '\0';
+}
+#endif
+
+int httpd_strnicmp(const char *s1, const char *s2, size_t n)
+{
+	int i;
+	char c1, c2;
+
+	for (i = 0; i < n; i++, s1++, s2++) {
+		c1 = *s1;
+		c2 = *s2;
+		if (c1 == '\0' && c2 == '\0')
+			return 0;
+
+		if (c1 >= 'a' && c1 <= 'z')
+			c1 += 'A' - 'a';
+
+		if (c2 >= 'a' && c2 <= 'z')
+			c2 += 'A' - 'a';
+
+		if (c1 < c2)
+			return -1;
+
+		if (c1 > c2)
+			return 1;
+	}
+
+	return 0;
+}
+
+size_t
+strlncat(char *dst, size_t len, const char *src, size_t n)
+{
+	size_t slen;
+	size_t dlen;
+	size_t rlen;
+	size_t ncpy = 0;
+
+	slen = strnlen(src, n);
+	dlen = strnlen(dst, len);
+
+	if (dlen < len) {
+		rlen = len - dlen;
+		ncpy = slen < rlen ? slen : (rlen - 1);
+		memcpy(dst + dlen, src, ncpy);
+		dst[dlen + ncpy] = '\0';
+	}
+
+	//assert(len > slen + dlen);
+	//return slen + dlen;
+	return ncpy;
+}
+
+extern struct httpd_state *uploding;
+
+int websvr_message_begin(http_parser *p)
+{
+	struct httpd_state *s = get_context(p);
+	memset(&s->message, 0, sizeof(s->message));
+	s->message.message_begin_cb_called = TRUE;
+	return 0;
+}
+
+int websvr_request_url(http_parser *p, const char *buf, size_t len)
+{
+	struct httpd_state *s = get_context(p);
+
+	strlncat(s->message.request_url, sizeof(s->message.request_url), buf, len);
+
+	char *ptr = strrchr(s->message.request_url, '?');
+	if (ptr != NULL) {
+		ptr[0] = '\0';
+		s->query = &ptr[1];
+	}
+	else
+		s->query = NULL;
+
+	/* ""ã"/"ãªã"index.html"ã«å¤æ´ */
+	if ((s->message.request_url[0] == '\0') || ((s->message.request_url[0] == '/') && (s->message.request_url[1] == '\0'))) {
+		s->filename = &s->message.filename[sizeof(s->message.filename) - 2];
+		strcpy_s(s->filename, sizeof(s->message.request_url) + 2, "0:");
+		strcat_s(s->filename, sizeof(s->message.request_url) + 2, http_index_html);
+		s->file.redirect = 1;
+	}
+	/* "/~/"ãªãSDã«ã¼ãããèª­ã¿è¾¼ã¿ */
+	else if ((s->message.request_url[0] == '/') && (s->message.request_url[1] == '~') && (s->message.request_url[2] == '/')) {
+		s->filename = &s->message.filename[sizeof(s->message.filename) - 2 - sizeof(http_www) - 1 + 2];
+		memcpy(s->filename, "1:", 2);
+		memcpy(s->filename, http_www, sizeof(http_www) - 1);
+	}
+	else {
+		s->filename = &s->message.filename[sizeof(s->message.filename) - 2];
+		memcpy(s->filename, "0:", 2);
+	}
+	return 0;
+}
+
+int websvr_response_status(http_parser *p, const char *buf, size_t len)
+{
+	struct httpd_state *s = get_context(p);
+
+	strlncat(s->message.response_status, sizeof(s->message.response_status), buf, len);
+
+	return 0;
+}
+
+int websvr_header_field(http_parser *p, const char *buf, size_t len)
+{
+	struct httpd_state *s = get_context(p);
+	struct message *m = &s->message;
+
+	if (strncmp("Referer", buf, len) == 0) {
+		m->num_headers = 1;
+	}
+	else if (strncmp("Host", buf, len) == 0) {
+		m->num_headers = 2;
+	}
+	else if (strncmp("Upgrade", buf, len) == 0) {
+		m->num_headers = 3;
+	}
+	else if (strncmp("Connection", buf, len) == 0) {
+		m->num_headers = 4;
+	}
+	else if (strncmp("Sec-WebSocket-Key", buf, len) == 0) {
+		m->num_headers = 5;
+	}
+	else if (strncmp("Origin", buf, len) == 0) {
+		m->num_headers = 6;
+	}
+	else if (strncmp("Sec-WebSocket-Protocol", buf, len) == 0) {
+		m->num_headers = 7;
+	}
+	else if (strncmp("Sec-WebSocket-Version", buf, len) == 0) {
+		m->num_headers = 8;
+	}
+	else {
+		m->num_headers = 0;
+	}
+
+	return 0;
+}
+
+int websvr_header_value(http_parser *p, const char *buf, size_t len)
+{
+	struct httpd_state *s = get_context(p);
+	struct message *m = &s->message;
+
+	switch (m->num_headers) {
+	case 1:
+		strlncat(m->referer, sizeof(m->referer), buf, len);
+		break;
+	case 2:
+		strlncat(m->host, sizeof(m->host), buf, len);
+		break;
+	case 3:
+		strlncat(m->upgrade, sizeof(m->upgrade), buf, len);
+		break;
+	case 4:
+		strlncat(m->connection, sizeof(m->connection), buf, len);
+		break;
+	case 5:
+		strlncat(m->sec_websocket_key, sizeof(m->sec_websocket_key), buf, len);
+		break;
+	case 6:
+		strlncat(m->origin, sizeof(m->origin), buf, len);
+		break;
+	case 7:
+		strlncat(m->sec_websocket_protocol, sizeof(m->sec_websocket_protocol), buf, len);
+		break;
+	case 8:
+		strlncat(m->sec_websocket_version, sizeof(m->sec_websocket_version), buf, len);
+		break;
+	}
+
+	return 0;
+}
+
+int websvr_headers_complete(http_parser *p)
+{
+	struct httpd_state *s = get_context(p);
+
+	s->message.method = p->method;
+	s->message.http_major = p->http_major;
+	s->message.http_minor = p->http_minor;
+	s->message.headers_complete_cb_called = TRUE;
+	s->message.should_keep_alive = http_should_keep_alive(p);
+
+	if ((s->message.method == HTTP_GET)
+		&& httpd_strnicmp(http_websocket, s->message.upgrade, sizeof(s->message.upgrade)) == 0) {
+		s->in.state = IN_STATE_WEBSOCKET;
+		s->state = STATE_WEBSOCKET;
+		s->close_req = 0;
+		websocket_init(&s->websocket, s->cepid);
+		return 0;
+	}
+	else if (s->message.method == HTTP_GET) {
+		s->in.state = IN_STATE_RESPONSE;
+		s->out.state = OUT_STATE_OPEN_GET_FILE;
+		return 1;
+	}
+	else if (s->message.method == HTTP_POST) {
+		if ((s->parser.content_length > 16 * 1024)
+			|| httpd_strnicmp(s->message.request_url, http_upload, sizeof(http_upload) - 1) != 0) {
+			goto error;
+		}
+
+		if (uploding == NULL) {
+			uploding = s;
+			// ã¢ããã­ã¼ãå
+ã¯SDã«ã¼ã
+			s->filename[0] = '1';
+			syslog(LOG_NOTICE, "create:    %s.%d %s", s->addr, ((T_IPV4EP *)s->dst)->portno, s->filename);
+			if (!httpd_fs_create(s->filename, &s->file)) {
+				goto error;
+			}
+
+			s->in.state = IN_STATE_UPLOAD;
+		}
+		else if (strcmp(s->filename, uploding->filename) == 0) {
+			syslog(LOG_NOTICE, "collision: %s.%d %s", s->addr, ((T_IPV4EP *)s->dst)->portno, s->filename);
+			goto error;
+		}
+		else {
+			s->in.state = IN_STATE_UPLOAD_WAIT;
+			s->in.wait = true;
+		}
+
+		s->out.state = OUT_STATE_WAIT_POST_BODY;
+		s->out.wait = true;
+		return 0;
+	}
+	else {
+		s->state = STATE_CLOSING;
+		return 1;
+	}
+error:
+	s->filename = NULL;
+	s->response_body = http_content_403;
+	s->response_pos = 0;
+	s->response_len = sizeof(http_content_403) - 1;
+
+	s->out.statushdr = http_header_403;
+	s->out.state = OUT_STATE_SEND_HEADER;
+	return 1;
+}
+
+int websvr_body(http_parser *p, const char *buf, size_t len)
+{
+	struct httpd_state *s = get_context(p);
+
+	if (s->message.body_is_final) {
+		syslog(LOG_ERROR, "\n\n *** Error http_body_is_final() should return 1 "
+			"on last on_body callback call "
+			"but it doesn't! ***\n\n");
+		s->state = STATE_CLOSING;
+		return 0;
+	}
+
+	httpd_fs_write(&s->file, buf, len);
+
+	s->message.body_size += len;
+	s->message.body_is_final = http_body_is_final(p);
+
+	if (s->message.body_is_final) {
+		syslog(LOG_NOTICE, "close:     %s.%d %s", s->addr, ((T_IPV4EP *)s->dst)->portno, s->filename);
+		httpd_fs_close(&s->file);
+		memset(&s->file, 0, sizeof(s->file));
+
+		strcpy_s(RubyFilename, sizeof(RubyFilename), s->filename);
+		s->reset = 1;
+
+		s->filename = NULL;
+		s->response_body = http_content_200;
+		s->response_pos = 0;
+		s->response_len = sizeof(http_content_200) - 1;
+
+		uploding = NULL;
+		s->in.state = IN_STATE_END;
+		s->out.state = OUT_STATE_BODY_RECEIVED;
+	}
+
+	return 0;
+}
+
+int websvr_message_complete(http_parser *p)
+{
+	struct httpd_state *s = get_context(p);
+	if (s->message.should_keep_alive != http_should_keep_alive(p)) {
+		syslog(LOG_ERROR, "\n\n *** Error http_should_keep_alive() should have same "
+			"value in both on_message_complete and on_headers_complete "
+			"but it doesn't! ***\n\n");
+		assert(0);
+	}
+
+	if (s->message.body_size &&
+		http_body_is_final(p) &&
+		!s->message.body_is_final) {
+		syslog(LOG_ERROR, "\n\n *** Error http_body_is_final() should return 1 "
+			"on last on_body callback call "
+			"but it doesn't! ***\n\n");
+		assert(0);
+	}
+
+	s->message.message_complete_cb_called = TRUE;
+	return 0;
+}
+
+http_parser_settings websvr_settings =
+{
+	websvr_message_begin,
+	websvr_request_url,
+	websvr_response_status,
+	websvr_header_field,
+	websvr_header_value,
+	websvr_headers_complete,
+	websvr_body,
+	websvr_message_complete,
+};
Index: EcnlProtoTool/trunk/prototool/webserver/httpd.h
===================================================================
--- EcnlProtoTool/trunk/prototool/webserver/httpd.h	(revision 270)
+++ EcnlProtoTool/trunk/prototool/webserver/httpd.h	(revision 270)
@@ -0,0 +1,157 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ *
+ *  Copyright (C) 2017 Cores Co., Ltd. Japan
+ *
+ *  ãLì ÒÍCÈºÌ(1)`(4)Ìðð½·êÉÀèC{\tgEF
+ *  Ai{\tgEFAðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»Eü
+ *  ÏEÄzziÈºCpÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ *      Ü½C{\tgEFAÌ[UÜ½ÍGh[U©çÌ¢©Èé
+ *      RÉîÃ­¿©çàCãLì Ò¨æÑTOPPERSvWFNgð
+ *      ÆÓ·é±ÆD
+ *
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄCÁèÌgpÚI
+ *  ÉÎ·éK«àÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEF
+ *  AÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»
+ *  ÌÓCðíÈ¢D
+ *
+ *  @(#) $Id$
+ */
+
+#ifndef __HTTPD_H__
+#define __HTTPD_H__
+
+#include "httpd-fs.h"
+#include "http_parser.h"
+#include "websocket.h"
+
+#define MAX_ELEMENT_SIZE 256
+
+struct message {
+	enum http_method method;
+	unsigned short http_major;
+	unsigned short http_minor;
+	char filename[64];
+	char request_url[MAX_ELEMENT_SIZE];
+	char response_status[64];
+	int num_headers;
+	char host[MAX_ELEMENT_SIZE];
+	char referer[MAX_ELEMENT_SIZE];
+	char upgrade[32];
+	char connection[32];
+	char sec_websocket_key[64];
+	char origin[MAX_ELEMENT_SIZE];
+	char sec_websocket_protocol[64];
+	char sec_websocket_version[4];
+	char response_key[86];
+	size_t body_size;
+	int should_keep_alive;
+	int headers_complete_cb_called;
+	int message_begin_cb_called;
+	int message_complete_cb_called;
+	int body_is_final;
+};
+
+#ifndef _MSC_VER
+size_t strnlen(const char *s, size_t maxlen);
+#endif
+size_t strlncat(char *dst, size_t len, const char *src, size_t n);
+extern http_parser_settings websvr_settings;
+
+typedef enum httpd_state_t {
+	STATE_DISCONNECTED,		/* Øf */
+	STATE_CONNECTED,		/* Ú± */
+	STATE_WEBSOCKET,		/* WebSocketÊM */
+	STATE_CLOSING,			/* Øf */
+	STATE_RESET,			/* mrubyN®Ì½ßÌZbg */
+} httpd_state_t;
+
+typedef enum httpd_in_state_t {
+	IN_STATE_START,
+	IN_STATE_REQUEST,
+	IN_STATE_UPLOAD,
+	IN_STATE_UPLOAD_WAIT,
+	IN_STATE_RESPONSE,
+	IN_STATE_WEBSOCKET,
+	IN_STATE_END,
+} httpd_in_state_t;
+
+typedef enum httpd_out_state_t {
+	OUT_STATE_WAIT_REQUEST,
+	OUT_STATE_OPEN_GET_FILE,
+	OUT_STATE_WAIT_POST_BODY,
+	OUT_STATE_BODY_RECEIVED,
+	OUT_STATE_SEND_HEADER,
+	OUT_STATE_SEND_FILE,
+	OUT_STATE_SEND_DATA,
+	OUT_STATE_SEND_END,
+} httpd_out_state_t;
+
+struct httpd_state {
+	ID tskid;
+	ID cepid;
+	uint8_t dst[20];
+	char temp[16];
+	char addr[sizeof("0123:4567:89ab:cdef:0123:4567:89ab:cdef")];
+	httpd_state_t state;
+	int reset;
+	struct {
+		httpd_in_state_t state;
+		bool_t wait;
+		char *data;
+		SYSTIM timer;
+	} in;
+	struct {
+		httpd_out_state_t state;
+		bool_t wait;
+		const char *statushdr;
+	} out;
+	struct {
+		int parse_pos;
+		int parse_len;
+		struct http_parser parser;
+		struct http_parser_url handle;
+		struct message message;
+	};
+	union {
+		struct {
+			char *filename;
+			char *query;
+			struct httpd_fs_file file;
+		};
+		struct {
+			char *_dummy_filename;
+			const char *response_body;
+			int response_pos;
+			int response_len;
+		};
+		struct {
+			struct websocket websocket;
+			int close_req;
+		};
+	};
+};
+#define get_context(p) (struct httpd_state *)((intptr_t)p - (intptr_t)&((struct httpd_state *)0)->parser)
+
+#endif /* __HTTPD_H__ */
Index: EcnlProtoTool/trunk/prototool/webserver/makestrings
===================================================================
--- EcnlProtoTool/trunk/prototool/webserver/makestrings	(revision 270)
+++ EcnlProtoTool/trunk/prototool/webserver/makestrings	(revision 270)
@@ -0,0 +1,40 @@
+#!/usr/bin/perl
+
+
+sub stringify {
+  my $name = shift(@_);
+  open(OUTPUTC, "> $name.c");
+  open(OUTPUTH, "> $name.h");
+  
+  open(FILE, "$name");
+  
+  while(<FILE>) {
+    if(/(.+) "(.+)"/) {
+      $var = $1;
+      $data = $2;
+      
+      $datan = $data;
+      $datan =~ s/\\r/\r/g;
+      $datan =~ s/\\n/\n/g;
+      $datan =~ s/\\01/\01/g;      
+      $datan =~ s/\\0/\0/g;
+      
+      printf(OUTPUTC "const char $var\[%d] = \n", length($datan) + 1);
+      printf(OUTPUTC "/* \"$data\" */\n");
+      printf(OUTPUTC "{");
+      for($j = 0; $j < length($datan); $j++) {
+	printf(OUTPUTC "%#02x, ", unpack("C", substr($datan, $j, 1)));
+      }
+      printf(OUTPUTC "};\n");
+      
+      printf(OUTPUTH "extern const char $var\[%d];\n", length($datan) + 1);
+      
+    }
+  }
+  close(OUTPUTC);
+  close(OUTPUTH);
+}
+stringify("http-strings");
+
+exit 0;
+
Index: EcnlProtoTool/trunk/prototool/webserver/sha1.c
===================================================================
--- EcnlProtoTool/trunk/prototool/webserver/sha1.c	(revision 270)
+++ EcnlProtoTool/trunk/prototool/webserver/sha1.c	(revision 270)
@@ -0,0 +1,160 @@
+/*
+ * sha1.c
+ *
+ * Originally witten by Steve Reid <steve@edmweb.com>
+ *
+ * Modified by Aaron D. Gifford <agifford@infowest.com>
+ *
+ * NO COPYRIGHT - THIS IS 100% IN THE PUBLIC DOMAIN
+ *
+ * The original unmodified version is available at:
+ *    ftp://ftp.funet.fi/pub/crypt/hash/sha/sha1.c
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <string.h>
+
+#include "sha1.h"
+
+#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
+
+/* blk0() and blk() perform the initial expand. */
+/* I got the idea of expanding during the round function from SSLeay */
+
+#ifdef LITTLE_ENDIAN
+#define blk0(i) (block->l[i] = (rol(block->l[i],24)&(sha1_quadbyte)0xFF00FF00) \
+    |(rol(block->l[i],8)&(sha1_quadbyte)0x00FF00FF))
+#else
+#define blk0(i) block->l[i]
+#endif
+
+#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \
+    ^block->l[(i+2)&15]^block->l[i&15],1))
+
+/* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */
+#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30);
+#define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30);
+#define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30);
+#define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30);
+#define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);
+
+typedef union _BYTE64QUAD16 {
+    sha1_byte c[64];
+    sha1_quadbyte l[16];
+} BYTE64QUAD16;
+
+/* Hash a single 512-bit block. This is the core of the algorithm. */
+void SHA1_Transform(sha1_quadbyte state[5], sha1_byte buffer[64]) {
+    sha1_quadbyte a, b, c, d, e;
+    BYTE64QUAD16 src;
+    BYTE64QUAD16 *block;
+
+    /* slow but cast-align */
+    memcpy(src.c, buffer, sizeof(sha1_byte) * 64);
+    block = &src;
+    /* Copy context->state[] to working vars */
+    a = state[0];
+    b = state[1];
+    c = state[2];
+    d = state[3];
+    e = state[4];
+    /* 4 rounds of 20 operations each. Loop unrolled. */
+    R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3);
+    R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7);
+    R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11);
+    R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15);
+    R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19);
+    R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23);
+    R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27);
+    R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31);
+    R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35);
+    R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39);
+    R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43);
+    R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47);
+    R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51);
+    R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55);
+    R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59);
+    R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63);
+    R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67);
+    R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71);
+    R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75);
+    R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79);
+    /* Add the working vars back into context.state[] */
+    state[0] += a;
+    state[1] += b;
+    state[2] += c;
+    state[3] += d;
+    state[4] += e;
+    /* Wipe variables */
+    a = b = c = d = e = 0;
+}
+
+
+/* SHA1_Init - Initialize new context */
+void SHA1_Init(SHA_CTX* context) {
+    /* SHA1 initialization constants */
+    context->state[0] = 0x67452301;
+    context->state[1] = 0xEFCDAB89;
+    context->state[2] = 0x98BADCFE;
+    context->state[3] = 0x10325476;
+    context->state[4] = 0xC3D2E1F0;
+    context->count[0] = context->count[1] = 0;
+}
+
+/* Run your data through this. */
+void SHA1_Update(SHA_CTX *context, sha1_byte *data, unsigned int len) {
+    unsigned int i, j;
+
+    j = (context->count[0] >> 3) & 63;
+    if ((context->count[0] += len << 3) < (len << 3)) context->count[1]++;
+    context->count[1] += (len >> 29);
+    if ((j + len) > 63) {
+        memcpy(&context->buffer[j], data, (i = 64-j));
+        SHA1_Transform(context->state, context->buffer);
+        for ( ; i + 63 < len; i += 64) {
+            SHA1_Transform(context->state, &data[i]);
+        }
+        j = 0;
+    }
+    else i = 0;
+    memcpy(&context->buffer[j], &data[i], len - i);
+}
+
+
+/* Add padding and return the message digest. */
+void SHA1_Final(sha1_byte digest[SHA1_DIGEST_LENGTH], SHA_CTX *context) {
+    sha1_quadbyte i, j;
+    sha1_byte finalcount[8];
+
+    for (i = 0; i < 8; i++) {
+        finalcount[i] = (sha1_byte)((context->count[(i >= 4 ? 0 : 1)]
+         >> ((3-(i & 3)) * 8) ) & 255);  /* Endian independent */
+    }
+    SHA1_Update(context, (sha1_byte *)"\200", 1);
+    while ((context->count[0] & 504) != 448) {
+        SHA1_Update(context, (sha1_byte *)"\0", 1);
+    }
+    /* Should cause a SHA1_Transform() */
+    SHA1_Update(context, finalcount, 8);
+    for (i = 0; i < SHA1_DIGEST_LENGTH; i++) {
+        digest[i] = (sha1_byte)
+         ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
+    }
+    /* Wipe variables */
+    i = j = 0;
+    memset(context->buffer, 0, SHA1_BLOCK_LENGTH);
+    memset(context->state, 0, SHA1_DIGEST_LENGTH);
+    memset(context->count, 0, 8);
+    memset(&finalcount, 0, 8);
+}
Index: EcnlProtoTool/trunk/prototool/webserver/sha1.h
===================================================================
--- EcnlProtoTool/trunk/prototool/webserver/sha1.h	(revision 270)
+++ EcnlProtoTool/trunk/prototool/webserver/sha1.h	(revision 270)
@@ -0,0 +1,80 @@
+/*
+ * sha.h
+ *
+ * Originally taken from the public domain SHA1 implementation
+ * written by by Steve Reid <steve@edmweb.com>
+ * 
+ * Modified by Aaron D. Gifford <agifford@infowest.com>
+ *
+ * NO COPYRIGHT - THIS IS 100% IN THE PUBLIC DOMAIN
+ *
+ * The original unmodified version is available at:
+ *    ftp://ftp.funet.fi/pub/crypt/hash/sha/sha1.c
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef __SHA1_H__
+#define __SHA1_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Define this if your machine is LITTLE_ENDIAN, otherwise #undef it: */
+#ifdef WORDS_BIGENDIAN
+# undef		LITTLE_ENDIAN
+#else
+# ifndef LITTLE_ENDIAN
+#  define	LITTLE_ENDIAN
+# endif
+#endif
+
+/* Make sure you define these types for your architecture: */
+typedef unsigned int sha1_quadbyte;	/* 4 byte type */
+typedef unsigned char sha1_byte;	/* single byte type */
+
+/*
+ * Be sure to get the above definitions right.  For instance, on my
+ * x86 based FreeBSD box, I define LITTLE_ENDIAN and use the type
+ * "unsigned long" for the quadbyte.  On FreeBSD on the Alpha, however,
+ * while I still use LITTLE_ENDIAN, I must define the quadbyte type
+ * as "unsigned int" instead.
+ */
+
+#define SHA1_BLOCK_LENGTH	64
+#define SHA1_DIGEST_LENGTH	20
+
+/* The SHA1 structure: */
+typedef struct _SHA_CTX {
+	sha1_quadbyte	state[5];
+	sha1_quadbyte	count[2];
+	sha1_byte	buffer[SHA1_BLOCK_LENGTH];
+} SHA_CTX;
+
+#ifndef NOPROTO
+void SHA1_Init(SHA_CTX *context);
+void SHA1_Update(SHA_CTX *context, sha1_byte *data, unsigned int len);
+void SHA1_Final(sha1_byte digest[SHA1_DIGEST_LENGTH],
+                   SHA_CTX* context);
+#else
+void SHA1_Init();
+void SHA1_Update();
+void SHA1_Final();
+#endif
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif
Index: EcnlProtoTool/trunk/prototool/webserver/websocket.c
===================================================================
--- EcnlProtoTool/trunk/prototool/webserver/websocket.c	(revision 270)
+++ EcnlProtoTool/trunk/prototool/webserver/websocket.c	(revision 270)
@@ -0,0 +1,300 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2015 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#include <string.h>
+#include "websocket.h"
+#include "kernel.h"
+#include "kernel_cfg.h"
+#include "syssvc/syslog.h"
+
+static ECN_FBS_ID cur_out_msg;
+
+void websocket_init(struct websocket *ws, ID wbsid)
+{
+	memset(ws, 0, sizeof(*ws));
+	ws->wbsid = wbsid;
+}
+
+void websocket_destroy(struct websocket *ws)
+{
+	if ((cur_out_msg.ptr != NULL) && (((ID *)cur_out_msg.ptr->_gap)[0] == ws->wbsid))
+	{
+		_ecn_fbs_del(cur_out_msg);
+		memset(&cur_out_msg, 0, sizeof(cur_out_msg));
+	}
+
+	if (ws->cur_in_msg.ptr != NULL) {
+		_ecn_fbs_del(ws->cur_in_msg);
+		memset(&ws->cur_in_msg, 0, sizeof(ws->cur_in_msg));
+	}
+
+	ws->wbsid = 0;
+}
+
+int websocket_input(struct websocket *ws, const void *data, int len)
+{
+	ws_state_t *s = &ws->rstate;
+	const uint8_t *pos = (const uint8_t *)data, *end = &((const uint8_t *)data)[len];
+
+	for(; pos < end; pos++){
+		switch (s->state)
+		{
+		// FIN RSV1-3 OPECODE
+		case 0:
+			s->fin = (*pos & 0x80) != 0;
+			s->opecode = (enum opecode_t)(*pos & 0x0F);
+			s->state = 1;
+			break;
+		// MASK Payload len
+		case 1:
+			// MASK=0ã¯NG
+			if((*pos & 0x80) == 0)
+				return -1/*MASK_ERROR*/;
+
+			switch(*pos & 0x7F){
+			case 127:
+				s->payload_len = 0;
+				s->state = 2/*7+64bit*/;
+				break;
+			case 126:
+				s->payload_len = 0;
+				s->state = 8/*7+16bit*/;
+				break;
+			default:
+				s->payload_len = *pos & 0x7F;
+				s->state = 10/*7bit*/;
+				break;
+			}
+			break;
+		// 64bit Extended payload length
+		case 2: case 3: case 4: case 5: case 6: case 7:
+		// 16bit Extended payload length
+		case 8: case 9:
+			s->payload_len = (s->payload_len << 8) + *pos;
+			s->state++;
+			break;
+		// Masking-key
+		case 10: case 11: case 12:
+			s->masking_key[s->state - 10] = *pos;
+			s->state++;
+			break;
+		case 13:
+			s->masking_key[3] = *pos;
+
+			s->data_pos = 0;
+			if (s->payload_len <= 0) {
+				s->state = 0;
+			}
+			else {
+				_ecn_fbs_cre(1, &ws->cur_in_msg);
+				s->state++;
+			}
+			break;
+		// Payload buffer
+		default:
+			if(ws->cur_in_msg.ptr != NULL)
+				_ecn_fbs_poke(ws->cur_in_msg, s->data_pos, *pos ^ s->masking_key[s->data_pos % 4]);
+
+			s->data_pos++;
+			if (s->data_pos >= s->payload_len) {
+				ER ret;
+				s->state = 0;
+
+				if (ws->cur_in_msg.ptr != NULL) {
+					((ID *)ws->cur_in_msg.ptr->_gap)[0] = ws->wbsid;
+					ret = psnd_dtq(ecn_api_mailboxid, (intptr_t)ws->cur_in_msg.ptr);
+					if (ret != E_OK) {
+						syslog(LOG_WARNING, "websocket_input() : psnd_dtq(%d) result = %d", ecn_api_mailboxid, ret);
+						_ecn_fbs_del(ws->cur_in_msg);
+					}
+				}
+				memset(&ws->cur_in_msg, 0, sizeof(ws->cur_in_msg));
+			}
+			break;
+		}
+	}
+
+	return 0;
+}
+
+bool_t websocket_newdata(struct websocket *ws)
+{
+	ws_state_t *s = &ws->wstate;
+	struct websocket *mws;
+	ER ret;
+	ECN_FBS_ID data;
+	ID wbsid;
+
+	if(s->state != 0)
+		return true;
+
+	if (cur_out_msg.ptr != NULL)
+		return (((ID *)cur_out_msg.ptr->_gap)[0] == ws->wbsid);
+
+	for (;;) {
+		ret = prcv_dtq(WEBSOCKET_MBXID, (intptr_t *)&data.ptr);
+		if (ret == E_TMOUT)
+			return false;
+
+		if (ret != E_OK) {
+			TOPPERS_assert_abort();
+			return false;
+		}
+
+		wbsid = ((ID *)data.ptr->_gap)[0];
+		mws = websocket_getws(wbsid);
+		if ((mws != NULL) && (mws->wbsid != 0))
+			break;
+
+		_ecn_fbs_del(cur_out_msg);
+	}
+
+	cur_out_msg.ptr = data.ptr;
+
+	return (wbsid == ws->wbsid);
+}
+
+int websocket_output(struct websocket *ws, void *data, int len)
+{
+	ws_state_t *s = &ws->wstate;
+	uint8_t *pos = (uint8_t *)data, *end = &((uint8_t *)data)[len];
+
+	for(; pos < end; pos++){
+		switch (s->state)
+		{
+		// FIN RSV1-3 OPECODE
+		case 0:
+			if ((cur_out_msg.ptr == NULL) || (((ID *)cur_out_msg.ptr->_gap)[0] != ws->wbsid))
+				return (intptr_t)pos - (intptr_t)data;
+
+			s->payload_len = _ecn_fbs_get_datalen(cur_out_msg);
+			if(s->payload_len == 0){
+				goto next;
+			}
+
+			s->fin = 1;
+			s->opecode = text_frame;
+			s->masked = 0;//
+			s->masking_key[0] = 0;//0x01;
+			s->masking_key[1] = 0;//0x23;
+			s->masking_key[2] = 0;//0x45;
+			s->masking_key[3] = 0;//0x67;
+
+			*pos = ((s->fin != 0) ? 0x80 : 0)
+				| ((char)s->opecode & 0x0F);
+			s->state = 1;
+			break;
+		// MASK Payload len
+		case 1:
+			if(s->payload_len < 126){
+				*pos = ((s->masked != 0) ? 0x80 : 0) | s->payload_len;
+				if (s->masked != 0) {
+					s->state = 10/*7bit*/;
+				}
+				else{
+					goto payload_check;
+				}
+			}
+			else if(s->payload_len < 0x10000){
+				*pos = ((s->masked != 0) ? 0x80 : 0) | 126;
+				s->state = 8/*7+16bit*/;
+			}
+			else{
+				*pos = ((s->masked != 0) ? 0x80 : 0) | 127;
+				s->state = 2/*7+64bit*/;
+			}
+			break;
+		// 64bit Extended payload length
+		case 2: case 3: case 4: case 5: case 6: case 7:
+		// 16bit Extended payload length
+		case 8: case 9:
+			*pos = (s->payload_len >> (8 * (9 - s->state)));
+			s->state++;
+			if((s->state == 10) && (s->masked == 0)){
+				goto payload_check;
+			}
+			break;
+		// Masking-key
+		case 10: case 11: case 12:
+			*pos = s->masking_key[s->state - 10];
+			s->state++;
+			break;
+		case 13:
+			*pos = s->masking_key[3];
+			s->state++;
+		payload_check:
+			s->data_pos = 0;
+			if (s->data_pos < s->payload_len)
+				s->state = 14;
+			else
+				goto next;
+			break;
+		// Payload buffer
+		default:
+			*pos = _ecn_fbs_peek(cur_out_msg, s->data_pos) ^ s->masking_key[s->data_pos % 4];
+
+			s->data_pos++;
+			if(s->data_pos >= s->payload_len){
+				goto next;
+			}
+			break;
+		next:
+			_ecn_fbs_del(cur_out_msg);
+			memset(&cur_out_msg, 0, sizeof(cur_out_msg));
+			s->state = 0;
+			websocket_newdata(ws);
+			break;
+		}
+	}
+
+	return (intptr_t)pos - (intptr_t)data;
+}
Index: EcnlProtoTool/trunk/prototool/webserver/websocket.h
===================================================================
--- EcnlProtoTool/trunk/prototool/webserver/websocket.h	(revision 270)
+++ EcnlProtoTool/trunk/prototool/webserver/websocket.h	(revision 270)
@@ -0,0 +1,181 @@
+/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2015 Cores Co., Ltd. Japan
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  @(#) $Id$
+ */
+
+#ifndef WEBSOCKET_H
+#define WEBSOCKET_H
+
+#include <stddef.h>
+#include <stdint.h>
+#include "t_stddef.h"
+
+#define NUM_ECHONET_MEMPOOL_BLOCK (60)		/* é»æç¨ã¡ã¢ãªãã­ãã¯ã®æ° */
+#define ECHONET_MEMPOOL_BLOCK_SIZE (256)	/* é»æç¨ã¡ã¢ãªãã­ãã¯ã®ãµã¤ãº */
+
+/* T_EDATAç®¡çé åãµã¤ãº */
+#define DEF_ECN_EDT_HDR_LEN (sizeof(intptr_t))
+
+/* ç®¡çé åãµã¤ãº(64byte - sizeof(T_MSG)) */
+/* #define DEF_ECN_FBS_LIB_HDR_LEN ((ECHONET_MEMPOOL_BLOCK_SIZE + sizeof(int) - 1)>> 2) // */
+#define DEF_ECN_FBS_LIB_HDR_LEN (64 - DEF_ECN_EDT_HDR_LEN)
+
+/* ç®¡çé åãå«ããã­ãã¯ã«ä¿æãããã¼ã¿ãµã¤ãº */
+#define DEF_ECN_FBS_FST_DAT_LEN (64)
+
+/* ãªã³ã¯ãã¤ã³ã¿é
+åã®ãµã¤ãº(byte) */
+#define DEF_ECN_FBS_LNK_LEN (ECHONET_MEMPOOL_BLOCK_SIZE - DEF_ECN_EDT_HDR_LEN - DEF_ECN_FBS_LIB_HDR_LEN - DEF_ECN_FBS_FST_DAT_LEN)
+
+/* åºå®é·ãããã¡æå¤§ãµã¤ãº */
+#define DEF_ECN_FBS_BUF_MAXLEN ((DEF_ECN_FBS_LNK_LEN / sizeof(void *)) * ECHONET_MEMPOOL_BLOCK_SIZE + DEF_ECN_FBS_FST_DAT_LEN)
+
+/* å­è¦ç´ ãããã¡ã®ãµã¤ãº */
+#define DEF_ECN_FBS_SUB_BUF_LEN ECHONET_MEMPOOL_BLOCK_SIZE
+
+/* ãªã³ã¯ãã¤ã³ã¿é
+åã«åæããããå­è¦ç´ ãããã¡ */
+typedef struct {
+	uint8_t	payload[ECHONET_MEMPOOL_BLOCK_SIZE];
+} T_ECN_SUB_BLK;
+
+/* ãªã³ã¯ãã¤ã³ã¿é
+å */
+typedef union {
+	T_ECN_SUB_BLK	*p_sub[DEF_ECN_FBS_LNK_LEN / sizeof(T_ECN_SUB_BLK *)];
+	uint8_t			bin[DEF_ECN_FBS_LNK_LEN];
+} T_ECN_FBS_LNK;
+
+/* ç®¡çé å(64byte - sizeof(T_MSG)) */
+typedef struct {
+	uint16_t	length;			/* ã¡ãã»ã¼ã¸é· */
+	uint16_t	type;			/* ã¡ãã»ã¼ã¸ã¿ã¤ã */
+	union {
+		ID mbxid;				/* éä¿¡å
+ã¡ã¼ã«ããã¯ã¹IDï¼å
+é¨ã¡ãã»ã¼ã¸ï¼ */
+	}sender;
+	union {
+		ID mbxid;				/* éä¿¡å
+ã¡ã¼ã«ããã¯ã¹IDï¼å
+é¨ã¡ãã»ã¼ã¸ï¼ */
+	}target;
+	union {
+		ID mbxid;				/* è¿ä¿¡å
+ã¡ã¼ã«ããã¯ã¹IDï¼å
+é¨ã¡ãã»ã¼ã¸ï¼ */
+	}reply;
+
+	int			rd;				/*	èª­ã¿åããããæ
+å ±	*/
+	int			wr;				/*	æ¸ãè¾¼ã¿ãããæ
+å ±	*/
+} T_ECN_FBS_HDR;
+
+/* ç®¡çé åãå«ããã­ãã¯ã®æ§é  */
+typedef struct {
+	uint8_t	_msg[DEF_ECN_EDT_HDR_LEN];	/* T_MSG */
+	T_ECN_FBS_HDR	hdr;	/*	ç®¡çé å  64byte  - sizeof(T_MSG)	*/
+	uint8_t			_gap[DEF_ECN_FBS_LIB_HDR_LEN - sizeof(T_ECN_FBS_HDR)];
+	T_ECN_FBS_LNK	lnk;	/*	ãªã³ã¯ãã¤ã³ã¿é
+å	128byte			*/
+	uint8_t			payload[DEF_ECN_FBS_FST_DAT_LEN];
+} T_ECN_FST_BLK;
+
+/* FBS-ID */
+typedef struct ecn_fbs_id_strc {
+	T_ECN_FST_BLK	*ptr;
+} ECN_FBS_ID;
+
+ER _ecn_fbs_cre(size_t fa_req_size, ECN_FBS_ID *fp_id);
+ER _ecn_fbs_del(ECN_FBS_ID fa_id);
+size_t _ecn_fbs_get_datalen(ECN_FBS_ID fa_id);
+int _ecn_fbs_peek(ECN_FBS_ID fa_id, size_t fa_seek);
+ER _ecn_fbs_poke(ECN_FBS_ID fa_id, size_t fa_seek, int fa_val);
+
+extern ID ecn_api_mailboxid;
+extern ID WEBSOCKET_MBXID;
+
+typedef struct ws_state
+{
+	int state;
+	int fin;
+	enum opecode_t
+	{
+		continuation_frame = 0,
+		text_frame = 1,
+		binary_frame = 2,
+		connection_close = 8,
+		ping = 9,
+		pong = 10
+	} opecode;
+	int payload_len;
+	int masked;
+	char masking_key[4];
+	int data_pos;
+} ws_state_t;
+
+struct websocket
+{
+	ID wbsid;
+	ws_state_t wstate;
+	ws_state_t rstate;
+	ECN_FBS_ID cur_in_msg;
+};
+
+void websocket_init(struct websocket *ws, ID wbsid);
+void websocket_destroy(struct websocket *ws);
+struct websocket *websocket_getws(ID wbsid);
+
+int websocket_input(struct websocket *ws, const void *data, int len);
+bool_t websocket_newdata(struct websocket *ws);
+int websocket_output(struct websocket *ws, void *data, int len);
+
+#endif  /* WEBSOCKET_H */
Index: EcnlProtoTool/trunk/tools/.project
===================================================================
--- EcnlProtoTool/trunk/tools/.project	(revision 270)
+++ EcnlProtoTool/trunk/tools/.project	(revision 270)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>tools</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
Index: EcnlProtoTool/trunk/tools/bin/yacc
===================================================================
--- EcnlProtoTool/trunk/tools/bin/yacc	(revision 270)
+++ EcnlProtoTool/trunk/tools/bin/yacc	(revision 270)
@@ -0,0 +1,2 @@
+#! /bin/sh
+exec 'c:/progra~1/bison/bin/bison' -y "$@"
Index: EcnlProtoTool/trunk/tools/share/bison/README
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/README	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/README	(revision 270)
@@ -0,0 +1,70 @@
+-*- outline -*-
+
+This directory contains data needed by Bison.
+
+* Skeletons
+Bison skeletons: the general shapes of the different parser kinds,
+that are specialized for specific grammars by the bison program.
+
+Currently, the supported skeletons are:
+
+- yacc.c
+  It used to be named bison.simple: it corresponds to C Yacc
+  compatible LALR(1) parsers.
+
+- lalr1.cc
+  Produces a C++ parser class.
+
+- lalr1.java
+  Produces a Java parser class.
+
+- glr.c
+  A Generalized LR C parser based on Bison's LALR(1) tables.
+
+- glr.cc
+  A Generalized LR C++ parser.  Actually a C++ wrapper around glr.c.
+
+These skeletons are the only ones supported by the Bison team.
+Because the interface between skeletons and the bison program is not
+finished, *we are not bound to it*.  In particular, Bison is not
+mature enough for us to consider that ``foreign skeletons'' are
+supported.
+
+* m4sugar
+This directory contains M4sugar, sort of an extended library for M4,
+which is used by Bison to instantiate the skeletons.
+
+* xslt
+This directory contains XSLT programs that transform Bison's XML output
+into various formats.
+
+- bison.xsl
+  A library of routines used by the other XSLT programs.
+
+- xml2dot.xsl
+  Conversion into GraphViz's dot format.
+
+- xml2text.xsl
+  Conversion into text.
+
+- xml2xhtml.xsl
+  Conversion into XHTML.
+
+-----
+
+Copyright (C) 2002, 2008 Free Software Foundation, Inc.
+
+This file is part of GNU Bison.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
Index: EcnlProtoTool/trunk/tools/share/bison/bison.m4
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/bison.m4	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/bison.m4	(revision 270)
@@ -0,0 +1,556 @@
+                                                            -*- Autoconf -*-
+
+# Language-independent M4 Macros for Bison.
+# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
+# Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+## ---------------- ##
+## Identification.  ##
+## ---------------- ##
+
+# b4_copyright(TITLE, YEARS)
+# --------------------------
+m4_define([b4_copyright],
+[b4_comment([A Bison parser, made by GNU Bison b4_version.])
+
+b4_comment([$1
+
+m4_text_wrap([Copyright (C) $2 Free Software Foundation, Inc.], [   ])
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.])
+
+b4_comment([As a special exception, you may create a larger work that contains
+part or all of the Bison parser skeleton and distribute that work
+under terms of your choice, so long as that work isn't itself a
+parser generator using the skeleton or a modified version thereof
+as a parser skeleton.  Alternatively, if you modify or redistribute
+the parser skeleton itself, you may (at your option) remove this
+special exception, which will cause the skeleton and the resulting
+Bison output files to be licensed under the GNU General Public
+License without this special exception.
+
+This special exception was added by the Free Software Foundation in
+version 2.2 of Bison.])])
+
+
+## ---------------- ##
+## Error handling.  ##
+## ---------------- ##
+
+# The following error handling macros print error directives that should not
+# become arguments of other macro invocations since they would likely then be
+# mangled.  Thus, they print to stdout directly.
+
+# b4_cat(TEXT)
+# ------------
+# Write TEXT to stdout.  Precede the final newline with an @ so that it's
+# escaped.  For example:
+#
+#   b4_cat([[@complain(invalid input@)]])
+m4_define([b4_cat],
+[m4_syscmd([cat <<'_m4eof'
+]m4_bpatsubst(m4_dquote($1), [_m4eof], [_m4@`eof])[@
+_m4eof
+])dnl
+m4_if(m4_sysval, [0], [], [m4_fatal([$0: cannot write to stdout])])])
+
+# b4_error(KIND, FORMAT, [ARG1], [ARG2], ...)
+# -------------------------------------------
+# Write @KIND(FORMAT@,ARG1@,ARG2@,...@) to stdout.
+#
+# For example:
+#
+#   b4_error([[warn]], [[invalid value for `%s': %s]], [[foo]], [[3]])
+m4_define([b4_error],
+[b4_cat([[@]$1[(]$2[]]dnl
+[m4_if([$#], [2], [],
+       [m4_foreach([b4_arg],
+                   m4_dquote(m4_shift(m4_shift($@))),
+                   [[@,]b4_arg])])[@)]])])
+
+# b4_error_at(KIND, START, END, FORMAT, [ARG1], [ARG2], ...)
+# ----------------------------------------------------------
+# Write @KIND_at(START@,END@,FORMAT@,ARG1@,ARG2@,...@) to stdout.
+#
+# For example:
+#
+#   b4_error_at([[complain]], [[input.y:2.3]], [[input.y:5.4]],
+#               [[invalid %s]], [[foo]])
+m4_define([b4_error_at],
+[b4_cat([[@]$1[_at(]$2[@,]$3[@,]$4[]]dnl
+[m4_if([$#], [4], [],
+       [m4_foreach([b4_arg],
+                   m4_dquote(m4_shift(m4_shift(m4_shift(m4_shift($@))))),
+                   [[@,]b4_arg])])[@)]])])
+
+# b4_warn(FORMAT, [ARG1], [ARG2], ...)
+# ------------------------------------
+# Write @warn(FORMAT@,ARG1@,ARG2@,...@) to stdout.
+#
+# For example:
+#
+#   b4_warn([[invalid value for `%s': %s]], [[foo]], [[3]])
+#
+# As a simple test suite, this:
+#
+#   m4_divert(-1)
+#   m4_define([asdf], [ASDF])
+#   m4_define([fsa], [FSA])
+#   m4_define([fdsa], [FDSA])
+#   b4_warn([[[asdf), asdf]]], [[[fsa), fsa]]], [[[fdsa), fdsa]]])
+#   b4_warn([[asdf), asdf]], [[fsa), fsa]], [[fdsa), fdsa]])
+#   b4_warn()
+#   b4_warn(1)
+#   b4_warn(1, 2)
+#
+# Should produce this without newlines:
+#
+#   @warn([asdf), asdf]@,[fsa), fsa]@,[fdsa), fdsa]@)
+#   @warn(asdf), asdf@,fsa), fsa@,fdsa), fdsa@)
+#   @warn(@)
+#   @warn(1@)
+#   @warn(1@,2@)
+m4_define([b4_warn],
+[b4_error([[warn]], $@)])
+
+# b4_warn_at(START, END, FORMAT, [ARG1], [ARG2], ...)
+# ---------------------------------------------------
+# Write @warn(START@,END@,FORMAT@,ARG1@,ARG2@,...@) to stdout.
+#
+# For example:
+#
+#   b4_warn_at([[input.y:2.3]], [[input.y:5.4]], [[invalid %s]], [[foo]])
+m4_define([b4_warn_at],
+[b4_error_at([[warn]], $@)])
+
+# b4_complain(FORMAT, [ARG1], [ARG2], ...)
+# ----------------------------------------
+# Write @complain(FORMAT@,ARG1@,ARG2@,...@) to stdout.
+#
+# See b4_warn example.
+m4_define([b4_complain],
+[b4_error([[complain]], $@)])
+
+# b4_complain_at(START, END, FORMAT, [ARG1], [ARG2], ...)
+# -------------------------------------------------------
+# Write @complain(START@,END@,FORMAT@,ARG1@,ARG2@,...@) to stdout.
+#
+# See b4_warn_at example.
+m4_define([b4_complain_at],
+[b4_error_at([[complain]], $@)])
+
+# b4_fatal(FORMAT, [ARG1], [ARG2], ...)
+# -------------------------------------
+# Write @fatal(FORMAT@,ARG1@,ARG2@,...@) to stdout and exit.
+#
+# See b4_warn example.
+m4_define([b4_fatal],
+[b4_error([[fatal]], $@)dnl
+m4_exit(1)])
+
+# b4_fatal_at(START, END, FORMAT, [ARG1], [ARG2], ...)
+# ----------------------------------------------------
+# Write @fatal(START@,END@,FORMAT@,ARG1@,ARG2@,...@) to stdout and exit.
+#
+# See b4_warn_at example.
+m4_define([b4_fatal_at],
+[b4_error_at([[fatal]], $@)dnl
+m4_exit(1)])
+
+
+## ---------------- ##
+## Default values.  ##
+## ---------------- ##
+
+# m4_define_default([b4_lex_param], [])   dnl breaks other skeletons
+m4_define_default([b4_pre_prologue], [])
+m4_define_default([b4_post_prologue], [])
+m4_define_default([b4_epilogue], [])
+m4_define_default([b4_parse_param], [])
+
+# The initial column and line.
+m4_define_default([b4_location_initial_column], [1])
+m4_define_default([b4_location_initial_line],   [1])
+
+
+## ------------ ##
+## Data Types.  ##
+## ------------ ##
+
+# b4_ints_in(INT1, INT2, LOW, HIGH)
+# ---------------------------------
+# Return 1 iff both INT1 and INT2 are in [LOW, HIGH], 0 otherwise.
+m4_define([b4_ints_in],
+[m4_eval([$3 <= $1 && $1 <= $4 && $3 <= $2 && $2 <= $4])])
+
+
+
+## ------------------ ##
+## Decoding options.  ##
+## ------------------ ##
+
+# b4_flag_if(FLAG, IF-TRUE, IF-FALSE)
+# -----------------------------------
+# Run IF-TRUE if b4_FLAG_flag is 1, IF-FALSE if FLAG is 0, otherwise fail.
+m4_define([b4_flag_if],
+[m4_case(b4_$1_flag,
+         [0], [$3],
+	 [1], [$2],
+	 [m4_fatal([invalid $1 value: ]$1)])])
+
+
+# b4_define_flag_if(FLAG)
+# -----------------------
+# Define "b4_FLAG_if(IF-TRUE, IF-FALSE)" that depends on the
+# value of the Boolean FLAG.
+m4_define([b4_define_flag_if],
+[_b4_define_flag_if($[1], $[2], [$1])])
+
+# _b4_define_flag_if($1, $2, FLAG)
+# --------------------------------
+# This macro works around the impossibility to define macros
+# inside macros, because issuing `[$1]' is not possible in M4 :(.
+# This sucks hard, GNU M4 should really provide M5 like $$1.
+m4_define([_b4_define_flag_if],
+[m4_if([$1$2], $[1]$[2], [],
+       [m4_fatal([$0: Invalid arguments: $@])])dnl
+m4_define([b4_$3_if],
+          [b4_flag_if([$3], [$1], [$2])])])
+
+
+# b4_FLAG_if(IF-TRUE, IF-FALSE)
+# -----------------------------
+# Expand IF-TRUE, if FLAG is true, IF-FALSE otherwise.
+b4_define_flag_if([defines])	        # Whether headers are requested.
+b4_define_flag_if([error_verbose])	# Whether error are verbose.
+b4_define_flag_if([glr])		# Whether a GLR parser is requested.
+b4_define_flag_if([locations])	        # Whether locations are tracked.
+b4_define_flag_if([nondeterministic])	# Whether conflicts should be handled.
+b4_define_flag_if([yacc])	        # Whether POSIX Yacc is emulated.
+
+
+## ------------------------- ##
+## Assigning token numbers.  ##
+## ------------------------- ##
+
+
+## ----------- ##
+## Synclines.  ##
+## ----------- ##
+
+# b4_basename(NAME)
+# -----------------
+# Similar to POSIX basename; the differences don't matter here.
+# Beware that NAME is not evaluated.
+m4_define([b4_basename],
+[m4_bpatsubst([$1], [^.*/\([^/]+\)/*$], [\1])])
+
+
+# b4_syncline(LINE, FILE)
+# -----------------------
+m4_define([b4_syncline],
+[b4_flag_if([synclines], [
+b4_sync_end([__line__], [b4_basename(m4_quote(__file__))])
+b4_sync_start([$1], [$2])])])
+
+m4_define([b4_sync_end], [b4_comment([Line $1 of $2])])
+m4_define([b4_sync_start], [b4_comment([Line $1 of $2])])
+
+# b4_user_code(USER-CODE)
+# -----------------------
+# Emit code from the user, ending it with synclines.
+m4_define([b4_user_code],
+[$1
+b4_syncline([@oline@], [@ofile@])])
+
+
+# b4_define_user_code(MACRO)
+# --------------------------
+# From b4_MACRO, build b4_user_MACRO that includes the synclines.
+m4_define([b4_define_user_code],
+[m4_define([b4_user_$1],
+[b4_user_code([b4_$1])])])
+
+
+# b4_user_actions
+# b4_user_initial_action
+# b4_user_post_prologue
+# b4_user_pre_prologue
+# b4_user_stype
+# ----------------------
+# Macros that issue user code, ending with synclines.
+b4_define_user_code([actions])
+b4_define_user_code([initial_action])
+b4_define_user_code([post_prologue])
+b4_define_user_code([pre_prologue])
+b4_define_user_code([stype])
+
+
+# b4_check_user_names(WHAT, USER-LIST, BISON-NAMESPACE)
+# --------------------------------------------------------
+# Warn if any name of type WHAT is used by the user (as recorded in USER-LIST)
+# but is not used by Bison (as recorded by macros in the namespace
+# BISON-NAMESPACE).
+#
+# USER-LIST must expand to a list specifying all grammar occurrences of all
+# names of type WHAT.   Each item in the list must be a triplet specifying one
+# occurrence: name, start boundary, and end boundary.  Empty string names are
+# fine.  An empty list is fine.
+#
+# For example, to define b4_foo_user_names to be used for USER-LIST with three
+# name occurrences and with correct quoting:
+#
+#   m4_define([b4_foo_user_names],
+#             [[[[[[bar]], [[parser.y:1.7]], [[parser.y:1.16]]]],
+#               [[[[bar]], [[parser.y:5.7]], [[parser.y:5.16]]]],
+#               [[[[baz]], [[parser.y:8.7]], [[parser.y:8.16]]]]]])
+#
+# The macro BISON-NAMESPACE(bar) must be defined iff the name bar of type WHAT
+# is used by Bison (in the front-end or in the skeleton).  Empty string names
+# are fine, but it would be ugly for Bison to actually use one.
+#
+# For example, to use b4_foo_bison_names for BISON-NAMESPACE and define that
+# the names bar and baz are used by Bison:
+#
+#   m4_define([b4_foo_bison_names(bar)])
+#   m4_define([b4_foo_bison_names(baz)])
+#
+# To invoke b4_check_user_names with TYPE foo, with USER-LIST
+# b4_foo_user_names, with BISON-NAMESPACE b4_foo_bison_names, and with correct
+# quoting:
+#
+#   b4_check_user_names([[foo]], [b4_foo_user_names],
+#                       [[b4_foo_bison_names]])
+m4_define([b4_check_user_names],
+[m4_foreach([b4_occurrence], $2,
+[m4_pushdef([b4_occurrence], b4_occurrence)dnl
+m4_pushdef([b4_user_name], m4_car(b4_occurrence))dnl
+m4_pushdef([b4_start], m4_car(m4_shift(b4_occurrence)))dnl
+m4_pushdef([b4_end], m4_shift(m4_shift(b4_occurrence)))dnl
+m4_ifndef($3[(]m4_quote(b4_user_name)[)],
+          [b4_warn_at([b4_start], [b4_end],
+                      [[%s `%s' is not used]],
+                      [$1], [b4_user_name])])[]dnl
+m4_popdef([b4_occurrence])dnl
+m4_popdef([b4_user_name])dnl
+m4_popdef([b4_start])dnl
+m4_popdef([b4_end])dnl
+])])
+
+# b4_percent_define_get(VARIABLE)
+# -------------------------------
+# Mimic muscle_percent_define_get in ../src/muscle_tab.h exactly.  That is, if
+# the %define variable VARIABLE is defined, emit its value.  Also, record
+# Bison's usage of VARIABLE by defining
+# b4_percent_define_bison_variables(VARIABLE).
+#
+# For example:
+#
+#   b4_percent_define_get([[foo]])
+m4_define([b4_percent_define_get],
+[m4_define([b4_percent_define_bison_variables(]$1[)])dnl
+m4_ifdef([b4_percent_define(]$1[)], [m4_indir([b4_percent_define(]$1[)])])])
+
+# b4_percent_define_get_loc(VARIABLE)
+# -----------------------------------
+# Mimic muscle_percent_define_get_loc in ../src/muscle_tab.h exactly.  That is,
+# if the %define variable VARIABLE is undefined, complain fatally since that's
+# a Bison or skeleton error.  Otherwise, return its definition location in a
+# form approriate for the first two arguments of b4_warn_at, b4_complain_at, or
+# b4_fatal_at.  Don't record this as a Bison usage of VARIABLE as there's no
+# reason to suspect that the user-supplied value has yet influenced the output.
+#
+# For example:
+#
+#   b4_complain_at(b4_percent_define_get_loc([[foo]]), [[invalid foo]])
+m4_define([b4_percent_define_get_loc],
+[m4_ifdef([b4_percent_define_loc(]$1[)],
+          [m4_pushdef([b4_loc], m4_indir([b4_percent_define_loc(]$1[)]))dnl
+b4_loc[]dnl
+m4_popdef([b4_loc])],
+          [b4_fatal([[undefined %%define variable `%s' passed to b4_percent_define_get_loc]], [$1])])])
+
+# b4_percent_define_get_syncline(VARIABLE)
+# ----------------------------------------
+# Mimic muscle_percent_define_get_syncline in ../src/muscle_tab.h exactly.
+# That is, if the %define variable VARIABLE is undefined, complain fatally
+# since that's a Bison or skeleton error.  Otherwise, return its definition
+# location as a b4_syncline invocation.  Don't record this as a Bison usage of
+# VARIABLE as there's no reason to suspect that the user-supplied value has yet
+# influenced the output.
+#
+# For example:
+#
+#   b4_percent_define_get_syncline([[foo]])
+m4_define([b4_percent_define_get_syncline],
+[m4_ifdef([b4_percent_define_syncline(]$1[)],
+          [m4_indir([b4_percent_define_syncline(]$1[)])],
+          [b4_fatal([[undefined %%define variable `%s' passed to b4_percent_define_get_syncline]], [$1])])])
+
+# b4_percent_define_ifdef(VARIABLE, IF-TRUE, [IF-FALSE])
+# ------------------------------------------------------
+# Mimic muscle_percent_define_ifdef in ../src/muscle_tab.h exactly.  That is,
+# if the %define variable VARIABLE is defined, expand IF-TRUE, else expand
+# IF-FALSE.  Also, record Bison's usage of VARIABLE by defining
+# b4_percent_define_bison_variables(VARIABLE).
+#
+# For example:
+#
+#   b4_percent_define_ifdef([[foo]], [[it's defined]], [[it's undefined]])
+m4_define([b4_percent_define_ifdef],
+[m4_ifdef([b4_percent_define(]$1[)],
+	  [m4_define([b4_percent_define_bison_variables(]$1[)])$2],
+	  [$3])])
+
+# b4_percent_define_flag_if(VARIABLE, IF-TRUE, [IF-FALSE])
+# --------------------------------------------------------
+# Mimic muscle_percent_define_flag_if in ../src/muscle_tab.h exactly.  That is,
+# if the %define variable VARIABLE is defined to "" or "true", expand IF-TRUE.
+# If it is defined to "false", expand IF-FALSE.  Complain if it is undefined
+# (a Bison or skeleton error since the default value should have been set
+# already) or defined to any other value (possibly a user error).  Also, record
+# Bison's usage of VARIABLE by defining
+# b4_percent_define_bison_variables(VARIABLE).
+#
+# For example:
+#
+#   b4_percent_define_flag_if([[foo]], [[it's true]], [[it's false]])
+m4_define([b4_percent_define_flag_if],
+[b4_percent_define_ifdef([$1],
+  [m4_case(b4_percent_define_get([$1]),
+           [], [$2], [true], [$2], [false], [$3],
+           [m4_expand_once([b4_complain_at(b4_percent_define_get_loc([$1]),
+                                           [[invalid value for %%define Boolean variable `%s']],
+                                           [$1])],
+                           [[b4_percent_define_flag_if($1)]])])],
+  [b4_fatal([[undefined %%define variable `%s' passed to b4_percent_define_flag_if]], [$1])])])
+
+# b4_percent_define_default(VARIABLE, DEFAULT)
+# --------------------------------------------
+# Mimic muscle_percent_define_default in ../src/muscle_tab.h exactly.  That is,
+# if the %define variable VARIABLE is undefined, set its value to DEFAULT.
+# Don't record this as a Bison usage of VARIABLE as there's no reason to
+# suspect that the value has yet influenced the output.
+#
+# For example:
+#
+#   b4_percent_define_default([[foo]], [[default value]])
+m4_define([b4_percent_define_default],
+[m4_ifndef([b4_percent_define(]$1[)],
+           [m4_define([b4_percent_define(]$1[)], [$2])dnl
+            m4_define([b4_percent_define_loc(]$1[)],
+                      [[[[[Bison:b4_percent_define_default]:1.0]], [[[Bison:b4_percent_define_default]:1.0]]]])dnl
+            m4_define([b4_percent_define_syncline(]$1[)],
+                      [[]b4_syncline(1, [["[Bison:b4_percent_define_default]"]])[
+]])])])
+
+# b4_percent_define_check_values(VALUES)
+# --------------------------------------
+# Mimic muscle_percent_define_check_values in ../src/muscle_tab.h exactly
+# except that the VALUES structure is more appropriate for M4.  That is, VALUES
+# is a list of sublists of strings.  For each sublist, the first string is the
+# name of a %define variable, and all remaining strings in that sublist are the
+# valid values for that variable.  Complain if such a variable is undefined (a
+# Bison error since the default value should have been set already) or defined
+# to any other value (possibly a user error).  Don't record this as a Bison
+# usage of the variable as there's no reason to suspect that the value has yet
+# influenced the output.
+#
+# For example:
+#
+#   b4_percent_define_check_values([[[[foo]], [[foo-value1]], [[foo-value2]]]],
+#                                  [[[[bar]], [[bar-value1]]]])
+m4_define([b4_percent_define_check_values],
+[m4_foreach([b4_sublist], m4_quote($@),
+            [_b4_percent_define_check_values(b4_sublist)])])
+
+m4_define([_b4_percent_define_check_values],
+[m4_ifdef([b4_percent_define(]$1[)],
+  [m4_pushdef([b4_good_value], [0])dnl
+   m4_if($#, 1, [],
+         [m4_foreach([b4_value], m4_dquote(m4_shift($@)),
+                     [m4_if(m4_indir([b4_percent_define(]$1[)]), b4_value,
+                            [m4_define([b4_good_value], [1])])])])dnl
+   m4_if(b4_good_value, [0],
+         [b4_complain_at(b4_percent_define_get_loc([$1]),
+                         [[invalid value for %%define variable `%s': `%s']],
+                         [$1],
+                         m4_dquote(m4_indir([b4_percent_define(]$1[)])))])dnl
+   m4_popdef([b4_good_value])],
+  [b4_fatal([[undefined %%define variable `%s' passed to b4_percent_define_check_values]], [$1])])])
+
+# b4_percent_code_get([QUALIFIER])
+# --------------------------------
+# If any %code blocks for QUALIFIER are defined, emit them beginning with a
+# comment and ending with synclines and a newline.  If QUALIFIER is not
+# specified or empty, do this for the unqualified %code blocks.  Also, record
+# Bison's usage of QUALIFIER (if specified) by defining
+# b4_percent_code_bison_qualifiers(QUALIFIER).
+#
+# For example, to emit any unqualified %code blocks followed by any %code
+# blocks for the qualifier foo:
+#
+#   b4_percent_code_get
+#   b4_percent_code_get([[foo]])
+m4_define([b4_percent_code_get],
+[m4_pushdef([b4_macro_name], [[b4_percent_code(]$1[)]])dnl
+m4_ifval([$1], [m4_define([b4_percent_code_bison_qualifiers(]$1[)])])dnl
+m4_ifdef(b4_macro_name,
+[b4_comment([m4_if([$#], [0], [[Unqualified %code]],
+                   [["%code ]$1["]])[ blocks.]])
+b4_user_code([m4_indir(b4_macro_name)])
+])dnl
+m4_popdef([b4_macro_name])])
+
+# b4_percent_code_ifdef(QUALIFIER, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------
+# If any %code blocks for QUALIFIER (or unqualified %code blocks if
+# QUALIFIER is empty) are defined, expand IF-TRUE, else expand IF-FALSE.
+# Also, record Bison's usage of QUALIFIER (if specified) by defining
+# b4_percent_code_bison_qualifiers(QUALIFIER).
+m4_define([b4_percent_code_ifdef],
+[m4_ifdef([b4_percent_code(]$1[)],
+          [m4_ifval([$1], [m4_define([b4_percent_code_bison_qualifiers(]$1[)])])$2],
+	  [$3])])
+
+
+## ----------------------------------------------------------- ##
+## After processing the skeletons, check that all the user's   ##
+## %define variables and %code qualifiers were used by Bison.  ##
+## ----------------------------------------------------------- ##
+
+m4_define([b4_check_user_names_wrap],
+[m4_ifdef([b4_percent_]$1[_user_]$2[s],
+          [b4_check_user_names([[%]$1 $2],
+                               [b4_percent_]$1[_user_]$2[s],
+                               [[b4_percent_]$1[_bison_]$2[s]])])])
+
+m4_wrap_lifo([
+b4_check_user_names_wrap([[define]], [[variable]])
+b4_check_user_names_wrap([[code]], [[qualifier]])
+])
Index: EcnlProtoTool/trunk/tools/share/bison/c++-skel.m4
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/c++-skel.m4	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/c++-skel.m4	(revision 270)
@@ -0,0 +1,25 @@
+                                                            -*- Autoconf -*-
+
+# C++ skeleton dispatching for Bison.
+# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+b4_glr_if(             [m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.cc]])])
+b4_nondeterministic_if([m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.cc]])])
+
+m4_define_default([b4_used_skeleton], [b4_pkgdatadir/[lalr1.cc]])
+m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"])
+
+m4_include(b4_used_skeleton)
Index: EcnlProtoTool/trunk/tools/share/bison/c++.m4
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/c++.m4	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/c++.m4	(revision 270)
@@ -0,0 +1,170 @@
+                                                            -*- Autoconf -*-
+
+# C++ skeleton for Bison
+
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
+# Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+m4_include(b4_pkgdatadir/[c.m4])
+
+## ---------------- ##
+## Default values.  ##
+## ---------------- ##
+
+# Default parser class name.
+b4_percent_define_default([[parser_class_name]], [[parser]])
+b4_percent_define_default([[location_type]], [[location]])
+b4_percent_define_default([[filename_type]], [[std::string]])
+b4_percent_define_default([[namespace]], m4_defn([b4_prefix]))
+b4_percent_define_default([[global_tokens_and_yystype]], [[false]])
+b4_percent_define_default([[define_location_comparison]],
+                          [m4_if(b4_percent_define_get([[filename_type]]),
+                                 [std::string], [[true]], [[false]])])
+
+
+## ----------- ##
+## Namespace.  ##
+## ----------- ##
+
+m4_define([b4_namespace_ref], [b4_percent_define_get([[namespace]])])
+
+# Don't permit an empty b4_namespace_ref.  Any `::parser::foo' appended to it
+# would compile as an absolute reference with `parser' in the global namespace.
+# b4_namespace_open would open an anonymous namespace and thus establish
+# internal linkage.  This would compile.  However, it's cryptic, and internal
+# linkage for the parser would be specified in all translation units that
+# include the header, which is always generated.  If we ever need to permit
+# internal linkage somehow, surely we can find a cleaner approach.
+m4_if(m4_bregexp(b4_namespace_ref, [^[	 ]*$]), [-1], [],
+[b4_complain_at(b4_percent_define_get_loc([[namespace]]),
+                [[namespace reference is empty]])])
+
+# Instead of assuming the C++ compiler will do it, Bison should reject any
+# invalid b4_namepsace_ref that would be converted to a valid
+# b4_namespace_open.  The problem is that Bison doesn't always output
+# b4_namespace_ref to uncommented code but should reserve the ability to do so
+# in future releases without risking breaking any existing user grammars.
+# Specifically, don't allow empty names as b4_namespace_open would just convert
+# those into anonymous namespaces, and that might tempt some users.
+m4_if(m4_bregexp(b4_namespace_ref, [::[	 ]*::]), [-1], [],
+[b4_complain_at(b4_percent_define_get_loc([[namespace]]),
+                [[namespace reference has consecutive "::"]])])
+m4_if(m4_bregexp(b4_namespace_ref, [::[	 ]*$]), [-1], [],
+[b4_complain_at(b4_percent_define_get_loc([[namespace]]),
+                [[namespace reference has a trailing "::"]])])
+
+m4_define([b4_namespace_open],
+[b4_user_code([b4_percent_define_get_syncline([[namespace]])
+[namespace ]m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref),
+                                                [^\(.\)[	 ]*::], [\1])),
+                         [::], [ { namespace ])[ {]])])
+
+m4_define([b4_namespace_close],
+[b4_user_code([b4_percent_define_get_syncline([[namespace]])
+m4_bpatsubst(m4_dquote(m4_bpatsubst(m4_dquote(b4_namespace_ref),
+                                    [^\(.\)[	 ]*\(::\)?\([^][:]\|:[^][:]\)*],
+                                    [\1])),
+             [::\([^][:]\|:[^][:]\)*], [} ])[} // ]b4_namespace_ref])])
+
+
+# b4_token_enums(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
+# -----------------------------------------------------
+# Output the definition of the tokens as enums.
+m4_define([b4_token_enums],
+[/* Tokens.  */
+   enum yytokentype {
+m4_map_sep([     b4_token_enum], [,
+],
+           [$@])
+   };
+])
+
+
+## ----------------- ##
+## Semantic Values.  ##
+## ----------------- ##
+
+
+# b4_lhs_value([TYPE])
+# --------------------
+# Expansion of $<TYPE>$.
+m4_define([b4_lhs_value],
+[(yyval[]m4_ifval([$1], [.$1]))])
+
+
+# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
+# --------------------------------------
+# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
+# symbols on RHS.
+m4_define([b4_rhs_value],
+[(yysemantic_stack_@{($1) - ($2)@}m4_ifval([$3], [.$3]))])
+
+# b4_lhs_location()
+# -----------------
+# Expansion of @$.
+m4_define([b4_lhs_location],
+[(yyloc)])
+
+
+# b4_rhs_location(RULE-LENGTH, NUM)
+# ---------------------------------
+# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
+# on RHS.
+m4_define([b4_rhs_location],
+[(yylocation_stack_@{($1) - ($2)@})])
+
+
+# b4_parse_param_decl
+# -------------------
+# Extra formal arguments of the constructor.
+# Change the parameter names from "foo" into "foo_yyarg", so that
+# there is no collision bw the user chosen attribute name, and the
+# argument name in the constructor.
+m4_define([b4_parse_param_decl],
+[m4_ifset([b4_parse_param],
+          [m4_map_sep([b4_parse_param_decl_1], [, ], [b4_parse_param])])])
+
+m4_define([b4_parse_param_decl_1],
+[$1_yyarg])
+
+
+
+# b4_parse_param_cons
+# -------------------
+# Extra initialisations of the constructor.
+m4_define([b4_parse_param_cons],
+          [m4_ifset([b4_parse_param],
+		    [
+      b4_cc_constructor_calls(b4_parse_param)])])
+m4_define([b4_cc_constructor_calls],
+	  [m4_map_sep([b4_cc_constructor_call], [,
+      ], [$@])])
+m4_define([b4_cc_constructor_call],
+	  [$2 ($2_yyarg)])
+
+# b4_parse_param_vars
+# -------------------
+# Extra instance variables.
+m4_define([b4_parse_param_vars],
+          [m4_ifset([b4_parse_param],
+		    [
+    /* User arguments.  */
+b4_cc_var_decls(b4_parse_param)])])
+m4_define([b4_cc_var_decls],
+	  [m4_map_sep([b4_cc_var_decl], [
+], [$@])])
+m4_define([b4_cc_var_decl],
+	  [    $1;])
Index: EcnlProtoTool/trunk/tools/share/bison/c-skel.m4
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/c-skel.m4	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/c-skel.m4	(revision 270)
@@ -0,0 +1,25 @@
+                                                            -*- Autoconf -*-
+
+# C skeleton dispatching for Bison.
+# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+b4_glr_if(             [m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.c]])])
+b4_nondeterministic_if([m4_define([b4_used_skeleton], [b4_pkgdatadir/[glr.c]])])
+
+m4_define_default([b4_used_skeleton], [b4_pkgdatadir/[yacc.c]])
+m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"])
+
+m4_include(b4_used_skeleton)
Index: EcnlProtoTool/trunk/tools/share/bison/c.m4
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/c.m4	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/c.m4	(revision 270)
@@ -0,0 +1,477 @@
+                                                            -*- Autoconf -*-
+
+# C M4 Macros for Bison.
+# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008 Free Software
+# Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+## ---------------- ##
+## Identification.  ##
+## ---------------- ##
+
+# b4_comment(TEXT)
+# ----------------
+m4_define([b4_comment], [/* m4_bpatsubst([$1], [
+], [
+   ])  */])
+
+# b4_identification
+# -----------------
+# Depends on individual skeletons to define b4_pure_flag, b4_push_flag, or
+# b4_pull_flag if they use the values of the %define variables api.pure or
+# api.push_pull.
+m4_define([b4_identification],
+[[/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "]b4_version["
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME ]b4_skeleton[]m4_ifdef([b4_pure_flag], [[
+
+/* Pure parsers.  */
+#define YYPURE ]b4_pure_flag])[]m4_ifdef([b4_push_flag], [[
+
+/* Push parsers.  */
+#define YYPUSH ]b4_push_flag])[]m4_ifdef([b4_pull_flag], [[
+
+/* Pull parsers.  */
+#define YYPULL ]b4_pull_flag])[
+
+/* Using locations.  */
+#define YYLSP_NEEDED ]b4_locations_flag[
+]])
+
+
+## ---------------- ##
+## Default values.  ##
+## ---------------- ##
+
+# If the %union is not named, its name is YYSTYPE.
+m4_define_default([b4_union_name], [YYSTYPE])
+
+# If the %name-prefix is not given, it is yy.
+m4_define_default([b4_prefix], [yy])
+
+## ------------------------ ##
+## Pure/impure interfaces.  ##
+## ------------------------ ##
+
+# b4_user_args
+# ------------
+m4_define([b4_user_args],
+[m4_ifset([b4_parse_param], [, b4_c_args(b4_parse_param)])])
+
+
+# b4_parse_param
+# --------------
+# If defined, b4_parse_param arrives double quoted, but below we prefer
+# it to be single quoted.
+m4_define([b4_parse_param],
+b4_parse_param)
+
+
+# b4_parse_param_for(DECL, FORMAL, BODY)
+# ---------------------------------------
+# Iterate over the user parameters, binding the declaration to DECL,
+# the formal name to FORMAL, and evaluating the BODY.
+m4_define([b4_parse_param_for],
+[m4_foreach([$1_$2], m4_defn([b4_parse_param]),
+[m4_pushdef([$1], m4_unquote(m4_car($1_$2)))dnl
+m4_pushdef([$2], m4_shift($1_$2))dnl
+$3[]dnl
+m4_popdef([$2])dnl
+m4_popdef([$1])dnl
+])])
+
+# b4_parse_param_use
+# ------------------
+# `YYUSE' all the parse-params.
+m4_define([b4_parse_param_use],
+[b4_parse_param_for([Decl], [Formal], [  YYUSE (Formal);
+])dnl
+])
+
+
+## ------------ ##
+## Data Types.  ##
+## ------------ ##
+
+# b4_int_type(MIN, MAX)
+# ---------------------
+# Return the smallest int type able to handle numbers ranging from
+# MIN to MAX (included).
+m4_define([b4_int_type],
+[m4_if(b4_ints_in($@,      [0],   [255]), [1], [unsigned char],
+       b4_ints_in($@,   [-128],   [127]), [1], [signed char],
+
+       b4_ints_in($@,      [0], [65535]), [1], [unsigned short int],
+       b4_ints_in($@, [-32768], [32767]), [1], [short int],
+
+       m4_eval([0 <= $1]),                [1], [unsigned int],
+
+					       [int])])
+
+
+# b4_int_type_for(NAME)
+# ---------------------
+# Return the smallest int type able to handle numbers ranging from
+# `NAME_min' to `NAME_max' (included).
+m4_define([b4_int_type_for],
+[b4_int_type($1_min, $1_max)])
+
+
+
+## ---------##
+## Values.  ##
+## ---------##
+
+# b4_null
+---------
+# Return a null pointer constant.  NULL infringes on the user name
+# space in C, so use 0 rather than NULL.
+m4_define([b4_null], [0])
+
+
+
+
+## ------------------------- ##
+## Assigning token numbers.  ##
+## ------------------------- ##
+
+# b4_token_define(TOKEN-NAME, TOKEN-NUMBER)
+# -----------------------------------------
+# Output the definition of this token as #define.
+m4_define([b4_token_define],
+[#define $1 $2
+])
+
+
+# b4_token_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
+# -------------------------------------------------------
+# Output the definition of the tokens (if there are) as #defines.
+m4_define([b4_token_defines],
+[m4_if([$#$1], [1], [],
+[/* Tokens.  */
+m4_map([b4_token_define], [$@])])
+])
+
+
+# b4_token_enum(TOKEN-NAME, TOKEN-NUMBER)
+# ---------------------------------------
+# Output the definition of this token as an enum.
+m4_define([b4_token_enum],
+[$1 = $2])
+
+
+# b4_token_enums(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
+# -----------------------------------------------------
+# Output the definition of the tokens (if there are) as enums.
+m4_define([b4_token_enums],
+[m4_if([$#$1], [1], [],
+[/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+m4_map_sep([     b4_token_enum], [,
+],
+	   [$@])
+   };
+#endif
+])])
+
+
+# b4_token_enums_defines(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
+# -------------------------------------------------------------
+# Output the definition of the tokens (if there are any) as enums and, if POSIX
+# Yacc is enabled, as #defines.
+m4_define([b4_token_enums_defines],
+[b4_token_enums($@)b4_yacc_if([b4_token_defines($@)], [])
+])
+
+
+
+## --------------------------------------------- ##
+## Defining C functions in both K&R and ANSI-C.  ##
+## --------------------------------------------- ##
+
+
+# b4_modern_c
+# -----------
+# A predicate useful in #if to determine whether C is ancient or modern.
+#
+# If __STDC__ is defined, the compiler is modern.  IBM xlc 7.0 when run
+# as 'cc' doesn't define __STDC__ (or __STDC_VERSION__) for pedantic
+# reasons, but it defines __C99__FUNC__ so check that as well.
+# Microsoft C normally doesn't define these macros, but it defines _MSC_VER.
+# Consider a C++ compiler to be modern if it defines __cplusplus.
+#
+m4_define([b4_c_modern],
+  [[(defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)]])
+
+# b4_c_function_def(NAME, RETURN-VALUE, [DECL1, NAME1], ...)
+# ----------------------------------------------------------
+# Declare the function NAME.
+m4_define([b4_c_function_def],
+[#if b4_c_modern
+b4_c_ansi_function_def($@)
+#else
+$2
+$1 (b4_c_knr_formal_names(m4_shift2($@)))
+b4_c_knr_formal_decls(m4_shift2($@))
+#endif[]dnl
+])
+
+
+# b4_c_ansi_function_def(NAME, RETURN-VALUE, [DECL1, NAME1], ...)
+# ---------------------------------------------------------------
+# Declare the function NAME in ANSI.
+m4_define([b4_c_ansi_function_def],
+[$2
+$1 (b4_c_ansi_formals(m4_shift2($@)))[]dnl
+])
+
+
+# b4_c_ansi_formals([DECL1, NAME1], ...)
+# --------------------------------------
+# Output the arguments ANSI-C definition.
+m4_define([b4_c_ansi_formals],
+[m4_if([$#], [0], [void],
+       [$#$1], [1], [void],
+	       [m4_map_sep([b4_c_ansi_formal], [, ], [$@])])])
+
+m4_define([b4_c_ansi_formal],
+[$1])
+
+
+# b4_c_knr_formal_names([DECL1, NAME1], ...)
+# ------------------------------------------
+# Output the argument names.
+m4_define([b4_c_knr_formal_names],
+[m4_map_sep([b4_c_knr_formal_name], [, ], [$@])])
+
+m4_define([b4_c_knr_formal_name],
+[$2])
+
+
+# b4_c_knr_formal_decls([DECL1, NAME1], ...)
+# ------------------------------------------
+# Output the K&R argument declarations.
+m4_define([b4_c_knr_formal_decls],
+[m4_map_sep([b4_c_knr_formal_decl],
+	    [
+],
+	    [$@])])
+
+m4_define([b4_c_knr_formal_decl],
+[    $1;])
+
+
+
+## ------------------------------------------------------------ ##
+## Declaring (prototyping) C functions in both K&R and ANSI-C.  ##
+## ------------------------------------------------------------ ##
+
+
+# b4_c_function_decl(NAME, RETURN-VALUE, [DECL1, NAME1], ...)
+# -----------------------------------------------------------
+# Declare the function NAME.
+m4_define([b4_c_function_decl],
+[#if defined __STDC__ || defined __cplusplus
+b4_c_ansi_function_decl($@)
+#else
+$2 $1 ();
+#endif[]dnl
+])
+
+
+# b4_c_ansi_function_decl(NAME, RETURN-VALUE, [DECL1, NAME1], ...)
+# ----------------------------------------------------------------
+# Declare the function NAME.
+m4_define([b4_c_ansi_function_decl],
+[$2 $1 (b4_c_ansi_formals(m4_shift2($@)));[]dnl
+])
+
+
+
+
+## --------------------- ##
+## Calling C functions.  ##
+## --------------------- ##
+
+
+# b4_c_function_call(NAME, RETURN-VALUE, [DECL1, NAME1], ...)
+# -----------------------------------------------------------
+# Call the function NAME with arguments NAME1, NAME2 etc.
+m4_define([b4_c_function_call],
+[$1 (b4_c_args(m4_shift2($@)))[]dnl
+])
+
+
+# b4_c_args([DECL1, NAME1], ...)
+# ------------------------------
+# Output the arguments NAME1, NAME2...
+m4_define([b4_c_args],
+[m4_map_sep([b4_c_arg], [, ], [$@])])
+
+m4_define([b4_c_arg],
+[$2])
+
+
+## ----------- ##
+## Synclines.  ##
+## ----------- ##
+
+# b4_sync_start(LINE, FILE)
+# -----------------------
+m4_define([b4_sync_start], [[#]line $1 $2])
+
+
+## -------------- ##
+## User actions.  ##
+## -------------- ##
+
+# b4_case(LABEL, STATEMENTS)
+# --------------------------
+m4_define([b4_case],
+[  case $1:
+$2
+    break;])
+
+# b4_symbol_actions(FILENAME, LINENO,
+#                   SYMBOL-TAG, SYMBOL-NUM,
+#                   SYMBOL-ACTION, SYMBOL-TYPENAME)
+# -------------------------------------------------
+m4_define([b4_symbol_actions],
+[m4_pushdef([b4_dollar_dollar],
+   [m4_ifval([$6], [(yyvaluep->$6)], [(*yyvaluep)])])dnl
+m4_pushdef([b4_at_dollar], [(*yylocationp)])dnl
+      case $4: /* $3 */
+b4_syncline([$2], [$1])
+	$5;
+b4_syncline([@oline@], [@ofile@])
+	break;
+m4_popdef([b4_at_dollar])dnl
+m4_popdef([b4_dollar_dollar])dnl
+])
+
+
+# b4_yydestruct_generate(FUNCTION-DECLARATOR)
+# -------------------------------------------
+# Generate the "yydestruct" function, which declaration is issued using
+# FUNCTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C
+# or "b4_c_function_def" for K&R.
+m4_define_default([b4_yydestruct_generate],
+[[/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+]$1([yydestruct],
+    [static void],
+    [[const char *yymsg],    [yymsg]],
+    [[int yytype],           [yytype]],
+    [[YYSTYPE *yyvaluep],    [yyvaluep]][]dnl
+b4_locations_if(            [, [[YYLTYPE *yylocationp], [yylocationp]]])[]dnl
+m4_ifset([b4_parse_param], [, b4_parse_param]))[
+{
+  YYUSE (yyvaluep);
+]b4_locations_if([  YYUSE (yylocationp);
+])dnl
+b4_parse_param_use[]dnl
+[
+  if (!yymsg)
+    yymsg = "Deleting";
+  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+  switch (yytype)
+    {
+]m4_map([b4_symbol_actions], m4_defn([b4_symbol_destructors]))[
+      default:
+	break;
+    }
+}]dnl
+])
+
+
+# b4_yy_symbol_print_generate(FUNCTION-DECLARATOR)
+# ------------------------------------------------
+# Generate the "yy_symbol_print" function, which declaration is issued using
+# FUNCTION-DECLARATOR, which may be "b4_c_ansi_function_def" for ISO C
+# or "b4_c_function_def" for K&R.
+m4_define_default([b4_yy_symbol_print_generate],
+[[
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+/*ARGSUSED*/
+]$1([yy_symbol_value_print],
+    [static void],
+	       [[FILE *yyoutput],                       [yyoutput]],
+	       [[int yytype],                           [yytype]],
+	       [[YYSTYPE const * const yyvaluep],       [yyvaluep]][]dnl
+b4_locations_if([, [[YYLTYPE const * const yylocationp], [yylocationp]]])[]dnl
+m4_ifset([b4_parse_param], [, b4_parse_param]))[
+{
+  if (!yyvaluep)
+    return;
+]b4_locations_if([  YYUSE (yylocationp);
+])dnl
+b4_parse_param_use[]dnl
+[# ifdef YYPRINT
+  if (yytype < YYNTOKENS)
+    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+  YYUSE (yyoutput);
+# endif
+  switch (yytype)
+    {
+]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl
+[      default:
+	break;
+    }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+]$1([yy_symbol_print],
+    [static void],
+	       [[FILE *yyoutput],                       [yyoutput]],
+	       [[int yytype],                           [yytype]],
+	       [[YYSTYPE const * const yyvaluep],       [yyvaluep]][]dnl
+b4_locations_if([, [[YYLTYPE const * const yylocationp], [yylocationp]]])[]dnl
+m4_ifset([b4_parse_param], [, b4_parse_param]))[
+{
+  if (yytype < YYNTOKENS)
+    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+  else
+    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+]b4_locations_if([  YY_LOCATION_PRINT (yyoutput, *yylocationp);
+  YYFPRINTF (yyoutput, ": ");
+])dnl
+[  yy_symbol_value_print (yyoutput, yytype, yyvaluep]dnl
+b4_locations_if([, yylocationp])[]b4_user_args[);
+  YYFPRINTF (yyoutput, ")");
+}]dnl
+])
Index: EcnlProtoTool/trunk/tools/share/bison/glr.c
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/glr.c	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/glr.c	(revision 270)
@@ -0,0 +1,2655 @@
+                                                                    -*- C -*-
+
+# GLR skeleton for Bison
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
+# Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+m4_include(b4_pkgdatadir/[c.m4])
+
+## ---------------- ##
+## Default values.  ##
+## ---------------- ##
+
+# Stack parameters.
+m4_define_default([b4_stack_depth_max], [10000])
+m4_define_default([b4_stack_depth_init],  [200])
+
+
+
+## ------------------------ ##
+## Pure/impure interfaces.  ##
+## ------------------------ ##
+
+b4_define_flag_if([pure])
+# If glr.cc is including this file and thus has already set b4_pure_flag, don't
+# change the value of b4_pure_flag, and don't record a use of api.pure.
+m4_ifndef([b4_pure_flag],
+[b4_percent_define_default([[api.pure]], [[false]])
+ m4_define([b4_pure_flag],
+           [b4_percent_define_flag_if([[api.pure]], [[1]], [[0]])])])
+
+# b4_user_formals
+# ---------------
+# The possible parse-params formal arguments preceded by a comma.
+#
+# This is not shared with yacc.c in c.m4 because  GLR relies on ISO C
+# formal argument declarations.
+m4_define([b4_user_formals],
+[m4_ifset([b4_parse_param], [, b4_c_ansi_formals(b4_parse_param)])])
+
+
+# b4_lex_param
+# ------------
+# Accumule in b4_lex_param all the yylex arguments.
+# Yes, this is quite ugly...
+m4_define([b4_lex_param],
+m4_dquote(b4_pure_if([[[[YYSTYPE *]], [[&yylval]]][]dnl
+b4_locations_if([, [[YYLTYPE *], [&yylloc]]])])dnl
+m4_ifdef([b4_lex_param], [, ]b4_lex_param)))
+
+
+# b4_yyerror_args
+# ---------------
+# Optional effective arguments passed to yyerror: user args plus yylloc, and
+# a trailing comma.
+m4_define([b4_yyerror_args],
+[b4_pure_if([b4_locations_if([yylocp, ])])dnl
+m4_ifset([b4_parse_param], [b4_c_args(b4_parse_param), ])])
+
+
+# b4_lyyerror_args
+# ----------------
+# Same as above, but on the lookahead, hence &yylloc instead of yylocp.
+m4_define([b4_lyyerror_args],
+[b4_pure_if([b4_locations_if([&yylloc, ])])dnl
+m4_ifset([b4_parse_param], [b4_c_args(b4_parse_param), ])])
+
+
+# b4_pure_args
+# ------------
+# Same as b4_yyerror_args, but with a leading comma.
+m4_define([b4_pure_args],
+[b4_pure_if([b4_locations_if([, yylocp])])[]b4_user_args])
+
+
+# b4_lpure_args
+# -------------
+# Same as above, but on the lookahead, hence &yylloc instead of yylocp.
+m4_define([b4_lpure_args],
+[b4_pure_if([b4_locations_if([, &yylloc])])[]b4_user_args])
+
+
+# b4_pure_formals
+# ---------------
+# Arguments passed to yyerror: user formals plus yylocp.
+m4_define([b4_pure_formals],
+[b4_pure_if([b4_locations_if([, YYLTYPE *yylocp])])[]b4_user_formals])
+
+
+## ----------------- ##
+## Semantic Values.  ##
+## ----------------- ##
+
+
+# b4_lhs_value([TYPE])
+# --------------------
+# Expansion of $<TYPE>$.
+m4_define([b4_lhs_value],
+[((*yyvalp)[]m4_ifval([$1], [.$1]))])
+
+
+# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
+# --------------------------------------
+# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
+# symbols on RHS.
+m4_define([b4_rhs_value],
+[(((yyGLRStackItem const *)yyvsp)@{YYFILL (($2) - ($1))@}.yystate.yysemantics.yysval[]m4_ifval([$3], [.$3]))])
+
+
+
+## ----------- ##
+## Locations.  ##
+## ----------- ##
+
+# b4_lhs_location()
+# -----------------
+# Expansion of @$.
+m4_define([b4_lhs_location],
+[(*yylocp)])
+
+
+# b4_rhs_location(RULE-LENGTH, NUM)
+# ---------------------------------
+# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
+# on RHS.
+m4_define([b4_rhs_location],
+[(((yyGLRStackItem const *)yyvsp)@{YYFILL (($2) - ($1))@}.yystate.yyloc)])
+
+
+
+## -------------- ##
+## Output files.  ##
+## -------------- ##
+
+# We do want M4 expansion after # for CPP macros.
+m4_changecom()
+m4_divert_push(0)dnl
+@output(b4_parser_file_name@)
+b4_copyright([Skeleton implementation for Bison GLR parsers in C],
+  [2002, 2003, 2004, 2005, 2006])
+[
+/* C GLR parser skeleton written by Paul Hilfinger.  */
+
+]b4_identification
+
+b4_percent_code_get([[top]])[]dnl
+m4_if(b4_prefix, [yy], [],
+[/* Substitute the variable and function names.  */
+#define yyparse b4_prefix[]parse
+#define yylex   b4_prefix[]lex
+#define yyerror b4_prefix[]error
+#define yylval  b4_prefix[]lval
+#define yychar  b4_prefix[]char
+#define yydebug b4_prefix[]debug
+#define yynerrs b4_prefix[]nerrs
+#define yylloc  b4_prefix[]lloc])[
+
+/* Copy the first part of user declarations.  */
+]b4_user_pre_prologue
+
+dnl # b4_shared_declarations
+dnl # ----------------------
+dnl # Declaration that might either go into the header (if --defines)
+dnl # or open coded in the parser body.
+m4_define([b4_shared_declarations],
+[b4_percent_code_get([[requires]])[]dnl
+
+b4_token_enums(b4_tokens)
+
+[#ifndef YYSTYPE
+]m4_ifdef([b4_stype],
+[[typedef union ]b4_union_name[
+{
+]b4_user_stype[
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1]],
+[m4_if(b4_tag_seen_flag, 0,
+[[typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1]])])[
+#endif
+
+#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
+typedef struct YYLTYPE
+{
+]b4_locations_if([
+  int first_line;
+  int first_column;
+  int last_line;
+  int last_column;
+],[
+  char yydummy;
+])[
+} YYLTYPE;
+# define YYLTYPE_IS_DECLARED 1
+# define YYLTYPE_IS_TRIVIAL 1
+#endif
+
+]b4_percent_code_get([[provides]])[]dnl
+])
+
+b4_defines_if([[#include "@basename(]b4_spec_defines_file[@)"]],
+	      [b4_shared_declarations])[
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG ]b4_debug_flag[
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE ]b4_error_verbose_flag[
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE ]b4_token_table[
+#endif
+
+/* Default (constant) value used for initialization for null
+   right-hand sides.  Unlike the standard yacc.c template,
+   here we set the default value of $$ to a zeroed-out value.
+   Since the default value is undefined, this behavior is
+   technically correct.  */
+static YYSTYPE yyval_default;
+
+/* Copy the second part of user declarations.  */
+]b4_user_post_prologue
+b4_percent_code_get[]dnl
+
+[#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifndef YY_
+# if YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions.  */
+#ifndef lint
+# define YYID(n) (n)
+#else
+]b4_c_function_def([YYID], [static int], [[int i], [i]])[
+{
+  return i;
+}
+#endif
+
+#ifndef YYFREE
+# define YYFREE free
+#endif
+#ifndef YYMALLOC
+# define YYMALLOC malloc
+#endif
+#ifndef YYREALLOC
+# define YYREALLOC realloc
+#endif
+
+#define YYSIZEMAX ((size_t) -1)
+
+#ifdef __cplusplus
+   typedef bool yybool;
+#else
+   typedef unsigned char yybool;
+#endif
+#define yytrue 1
+#define yyfalse 0
+
+#ifndef YYSETJMP
+# include <setjmp.h>
+# define YYJMP_BUF jmp_buf
+# define YYSETJMP(env) setjmp (env)
+# define YYLONGJMP(env, val) longjmp (env, val)
+#endif
+
+/*-----------------.
+| GCC extensions.  |
+`-----------------*/
+
+#ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later.  */
+# if (! defined __GNUC__ || __GNUC__ < 2 \
+      || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__)
+#  define __attribute__(Spec) /* empty */
+# endif
+#endif
+
+]b4_locations_if([#define YYOPTIONAL_LOC(Name) Name],[
+#ifdef __cplusplus
+# define YYOPTIONAL_LOC(Name) /* empty */
+#else
+# define YYOPTIONAL_LOC(Name) Name __attribute__ ((__unused__))
+#endif])[
+
+#ifndef YYASSERT
+# define YYASSERT(condition) ((void) ((condition) || (abort (), 0)))
+#endif
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  ]b4_final_state_number[
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   ]b4_last[
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  ]b4_tokens_number[
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  ]b4_nterms_number[
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  ]b4_rules_number[
+/* YYNRULES -- Number of states.  */
+#define YYNSTATES  ]b4_states_number[
+/* YYMAXRHS -- Maximum number of symbols on right-hand side of rule.  */
+#define YYMAXRHS ]b4_r2_max[
+/* YYMAXLEFT -- Maximum number of symbols to the left of a handle
+   accessed by $0, $-1, etc., in any rule.  */
+#define YYMAXLEFT ]b4_max_left_semantic_context[
+
+/* YYTRANSLATE(X) -- Bison symbol number corresponding to X.  */
+#define YYUNDEFTOK  ]b4_undef_token_number[
+#define YYMAXUTOK   ]b4_user_token_number_max[
+
+#define YYTRANSLATE(YYX)						\
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const ]b4_int_type_for([b4_translate])[ yytranslate[] =
+{
+  ]b4_translate[
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const ]b4_int_type_for([b4_prhs])[ yyprhs[] =
+{
+  ]b4_prhs[
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+static const ]b4_int_type_for([b4_rhs])[ yyrhs[] =
+{
+  ]b4_rhs[
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const ]b4_int_type_for([b4_rline])[ yyrline[] =
+{
+  ]b4_rline[
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
+static const char *const yytname[] =
+{
+  ]b4_tname[
+};
+#endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const ]b4_int_type_for([b4_r1])[ yyr1[] =
+{
+  ]b4_r1[
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const ]b4_int_type_for([b4_r2])[ yyr2[] =
+{
+  ]b4_r2[
+};
+
+/* YYDPREC[RULE-NUM] -- Dynamic precedence of rule #RULE-NUM (0 if none).  */
+static const ]b4_int_type_for([b4_dprec])[ yydprec[] =
+{
+  ]b4_dprec[
+};
+
+/* YYMERGER[RULE-NUM] -- Index of merging function for rule #RULE-NUM.  */
+static const ]b4_int_type_for([b4_merger])[ yymerger[] =
+{
+  ]b4_merger[
+};
+
+/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
+   doesn't specify something else to do.  Zero means the default is an
+   error.  */
+static const ]b4_int_type_for([b4_defact])[ yydefact[] =
+{
+  ]b4_defact[
+};
+
+/* YYPDEFGOTO[NTERM-NUM].  */
+static const ]b4_int_type_for([b4_defgoto])[ yydefgoto[] =
+{
+  ]b4_defgoto[
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF ]b4_pact_ninf[
+static const ]b4_int_type_for([b4_pact])[ yypact[] =
+{
+  ]b4_pact[
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const ]b4_int_type_for([b4_pgoto])[ yypgoto[] =
+{
+  ]b4_pgoto[
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If zero, do what YYDEFACT says.
+   If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF ]b4_table_ninf[
+static const ]b4_int_type_for([b4_table])[ yytable[] =
+{
+  ]b4_table[
+};
+
+/* YYCONFLP[YYPACT[STATE-NUM]] -- Pointer into YYCONFL of start of
+   list of conflicting reductions corresponding to action entry for
+   state STATE-NUM in yytable.  0 means no conflicts.  The list in
+   yyconfl is terminated by a rule number of 0.  */
+static const ]b4_int_type_for([b4_conflict_list_heads])[ yyconflp[] =
+{
+  ]b4_conflict_list_heads[
+};
+
+/* YYCONFL[I] -- lists of conflicting rule numbers, each terminated by
+   0, pointed into by YYCONFLP.  */
+]dnl Do not use b4_int_type_for here, since there are places where
+dnl pointers onto yyconfl are taken, which type is "short int *".
+dnl We probably ought to introduce a type for confl.
+[static const short int yyconfl[] =
+{
+  ]b4_conflicting_rules[
+};
+
+static const ]b4_int_type_for([b4_check])[ yycheck[] =
+{
+  ]b4_check[
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const ]b4_int_type_for([b4_stos])[ yystos[] =
+{
+  ]b4_stos[
+};
+
+
+
+/* Prevent warning if -Wmissing-prototypes.  */
+]b4_c_ansi_function_decl([yyparse], [int], b4_parse_param)[
+
+/* Error token number */
+#define YYTERROR 1
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+]b4_locations_if([[
+#define YYRHSLOC(Rhs, K) ((Rhs)[K].yystate.yyloc)
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)				\
+    do									\
+      if (YYID (N))							\
+	{								\
+	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
+	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
+	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
+	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
+	}								\
+      else								\
+	{								\
+	  (Current).first_line   = (Current).last_line   =		\
+	    YYRHSLOC (Rhs, 0).last_line;				\
+	  (Current).first_column = (Current).last_column =		\
+	    YYRHSLOC (Rhs, 0).last_column;				\
+	}								\
+    while (YYID (0))
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+   This macro was not mandated originally: define only if we know
+   we won't break user code: when these are the locations we know.  */
+
+# define YY_LOCATION_PRINT(File, Loc)			\
+    fprintf (File, "%d.%d-%d.%d",			\
+	     (Loc).first_line, (Loc).first_column,	\
+	     (Loc).last_line,  (Loc).last_column)
+#endif
+]],[
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) ((void) 0)
+#endif
+])[
+
+#ifndef YY_LOCATION_PRINT
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments.  */
+#define YYLEX ]b4_c_function_call([yylex], [int], b4_lex_param)[
+
+]b4_pure_if(
+[
+#undef yynerrs
+#define yynerrs (yystackp->yyerrcnt)
+#undef yychar
+#define yychar (yystackp->yyrawchar)
+#undef yylval
+#define yylval (yystackp->yyval)
+#undef yylloc
+#define yylloc (yystackp->yyloc)
+m4_if(b4_prefix[], [yy], [],
+[#define b4_prefix[]nerrs yynerrs
+#define b4_prefix[]char yychar
+#define b4_prefix[]lval yylval
+#define b4_prefix[]lloc yylloc])],
+[YYSTYPE yylval;
+
+YYLTYPE yylloc;
+
+int yynerrs;
+int yychar;])[
+
+static const int YYEOF = 0;
+static const int YYEMPTY = -2;
+
+typedef enum { yyok, yyaccept, yyabort, yyerr } YYRESULTTAG;
+
+#define YYCHK(YYE)							     \
+   do { YYRESULTTAG yyflag = YYE; if (yyflag != yyok) return yyflag; }	     \
+   while (YYID (0))
+
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)			\
+do {						\
+  if (yydebug)					\
+    YYFPRINTF Args;				\
+} while (YYID (0))
+
+]b4_yy_symbol_print_generate([b4_c_ansi_function_def])[
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			    \
+do {									    \
+  if (yydebug)								    \
+    {									    \
+      YYFPRINTF (stderr, "%s ", Title);					    \
+      yy_symbol_print (stderr, Type,					    \
+		       Value]b4_locations_if([, Location])[]b4_user_args[);  \
+      YYFPRINTF (stderr, "\n");						    \
+    }									    \
+} while (YYID (0))
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+
+#else /* !YYDEBUG */
+
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+
+#endif /* !YYDEBUG */
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef	YYINITDEPTH
+# define YYINITDEPTH ]b4_stack_depth_init[
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   SIZE_MAX < YYMAXDEPTH * sizeof (GLRStackItem)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH ]b4_stack_depth_max[
+#endif
+
+/* Minimum number of free items on the stack allowed after an
+   allocation.  This is to allow allocation and initialization
+   to be completed by functions that call yyexpandGLRStack before the
+   stack is expanded, thus insuring that all necessary pointers get
+   properly redirected to new data.  */
+#define YYHEADROOM 2
+
+#ifndef YYSTACKEXPANDABLE
+# if (! defined __cplusplus \
+      || (]b4_locations_if([[defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
+	  && ]])[defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))
+#  define YYSTACKEXPANDABLE 1
+# else
+#  define YYSTACKEXPANDABLE 0
+# endif
+#endif
+
+#if YYSTACKEXPANDABLE
+# define YY_RESERVE_GLRSTACK(Yystack)			\
+  do {							\
+    if (Yystack->yyspaceLeft < YYHEADROOM)		\
+      yyexpandGLRStack (Yystack);			\
+  } while (YYID (0))
+#else
+# define YY_RESERVE_GLRSTACK(Yystack)			\
+  do {							\
+    if (Yystack->yyspaceLeft < YYHEADROOM)		\
+      yyMemoryExhausted (Yystack);			\
+  } while (YYID (0))
+#endif
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+{
+  char *yyd = yydest;
+  const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yyerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static size_t
+yytnamerr (char *yyres, const char *yystr)
+{
+  if (*yystr == '"')
+    {
+      size_t yyn = 0;
+      char const *yyp = yystr;
+
+      for (;;)
+	switch (*++yyp)
+	  {
+	  case '\'':
+	  case ',':
+	    goto do_not_strip_quotes;
+
+	  case '\\':
+	    if (*++yyp != '\\')
+	      goto do_not_strip_quotes;
+	    /* Fall through.  */
+	  default:
+	    if (yyres)
+	      yyres[yyn] = *yyp;
+	    yyn++;
+	    break;
+
+	  case '"':
+	    if (yyres)
+	      yyres[yyn] = '\0';
+	    return yyn;
+	  }
+    do_not_strip_quotes: ;
+    }
+
+  if (! yyres)
+    return strlen (yystr);
+
+  return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+#endif /* !YYERROR_VERBOSE */
+
+/** State numbers, as in LALR(1) machine */
+typedef int yyStateNum;
+
+/** Rule numbers, as in LALR(1) machine */
+typedef int yyRuleNum;
+
+/** Grammar symbol */
+typedef short int yySymbol;
+
+/** Item references, as in LALR(1) machine */
+typedef short int yyItemNum;
+
+typedef struct yyGLRState yyGLRState;
+typedef struct yyGLRStateSet yyGLRStateSet;
+typedef struct yySemanticOption yySemanticOption;
+typedef union yyGLRStackItem yyGLRStackItem;
+typedef struct yyGLRStack yyGLRStack;
+
+struct yyGLRState {
+  /** Type tag: always true.  */
+  yybool yyisState;
+  /** Type tag for yysemantics.  If true, yysval applies, otherwise
+   *  yyfirstVal applies.  */
+  yybool yyresolved;
+  /** Number of corresponding LALR(1) machine state.  */
+  yyStateNum yylrState;
+  /** Preceding state in this stack */
+  yyGLRState* yypred;
+  /** Source position of the first token produced by my symbol */
+  size_t yyposn;
+  union {
+    /** First in a chain of alternative reductions producing the
+     *  non-terminal corresponding to this state, threaded through
+     *  yynext.  */
+    yySemanticOption* yyfirstVal;
+    /** Semantic value for this state.  */
+    YYSTYPE yysval;
+  } yysemantics;
+  /** Source location for this state.  */
+  YYLTYPE yyloc;
+};
+
+struct yyGLRStateSet {
+  yyGLRState** yystates;
+  /** During nondeterministic operation, yylookaheadNeeds tracks which
+   *  stacks have actually needed the current lookahead.  During deterministic
+   *  operation, yylookaheadNeeds[0] is not maintained since it would merely
+   *  duplicate yychar != YYEMPTY.  */
+  yybool* yylookaheadNeeds;
+  size_t yysize, yycapacity;
+};
+
+struct yySemanticOption {
+  /** Type tag: always false.  */
+  yybool yyisState;
+  /** Rule number for this reduction */
+  yyRuleNum yyrule;
+  /** The last RHS state in the list of states to be reduced.  */
+  yyGLRState* yystate;
+  /** The lookahead for this reduction.  */
+  int yyrawchar;
+  YYSTYPE yyval;
+  YYLTYPE yyloc;
+  /** Next sibling in chain of options.  To facilitate merging,
+   *  options are chained in decreasing order by address.  */
+  yySemanticOption* yynext;
+};
+
+/** Type of the items in the GLR stack.  The yyisState field
+ *  indicates which item of the union is valid.  */
+union yyGLRStackItem {
+  yyGLRState yystate;
+  yySemanticOption yyoption;
+};
+
+struct yyGLRStack {
+  int yyerrState;
+]b4_locations_if([[  /* To compute the location of the error token.  */
+  yyGLRStackItem yyerror_range[3];]])[
+]b4_pure_if(
+[
+  int yyerrcnt;
+  int yyrawchar;
+  YYSTYPE yyval;
+  YYLTYPE yyloc;
+])[
+  YYJMP_BUF yyexception_buffer;
+  yyGLRStackItem* yyitems;
+  yyGLRStackItem* yynextFree;
+  size_t yyspaceLeft;
+  yyGLRState* yysplitPoint;
+  yyGLRState* yylastDeleted;
+  yyGLRStateSet yytops;
+};
+
+#if YYSTACKEXPANDABLE
+static void yyexpandGLRStack (yyGLRStack* yystackp);
+#endif
+
+static void yyFail (yyGLRStack* yystackp]b4_pure_formals[, const char* yymsg)
+  __attribute__ ((__noreturn__));
+static void
+yyFail (yyGLRStack* yystackp]b4_pure_formals[, const char* yymsg)
+{
+  if (yymsg != NULL)
+    yyerror (]b4_yyerror_args[yymsg);
+  YYLONGJMP (yystackp->yyexception_buffer, 1);
+}
+
+static void yyMemoryExhausted (yyGLRStack* yystackp)
+  __attribute__ ((__noreturn__));
+static void
+yyMemoryExhausted (yyGLRStack* yystackp)
+{
+  YYLONGJMP (yystackp->yyexception_buffer, 2);
+}
+
+#if YYDEBUG || YYERROR_VERBOSE
+/** A printable representation of TOKEN.  */
+static inline const char*
+yytokenName (yySymbol yytoken)
+{
+  if (yytoken == YYEMPTY)
+    return "";
+
+  return yytname[yytoken];
+}
+#endif
+
+/** Fill in YYVSP[YYLOW1 .. YYLOW0-1] from the chain of states starting
+ *  at YYVSP[YYLOW0].yystate.yypred.  Leaves YYVSP[YYLOW1].yystate.yypred
+ *  containing the pointer to the next state in the chain.  */
+static void yyfillin (yyGLRStackItem *, int, int) __attribute__ ((__unused__));
+static void
+yyfillin (yyGLRStackItem *yyvsp, int yylow0, int yylow1)
+{
+  yyGLRState* s;
+  int i;
+  s = yyvsp[yylow0].yystate.yypred;
+  for (i = yylow0-1; i >= yylow1; i -= 1)
+    {
+      YYASSERT (s->yyresolved);
+      yyvsp[i].yystate.yyresolved = yytrue;
+      yyvsp[i].yystate.yysemantics.yysval = s->yysemantics.yysval;
+      yyvsp[i].yystate.yyloc = s->yyloc;
+      s = yyvsp[i].yystate.yypred = s->yypred;
+    }
+}
+
+/* Do nothing if YYNORMAL or if *YYLOW <= YYLOW1.  Otherwise, fill in
+ * YYVSP[YYLOW1 .. *YYLOW-1] as in yyfillin and set *YYLOW = YYLOW1.
+ * For convenience, always return YYLOW1.  */
+static inline int yyfill (yyGLRStackItem *, int *, int, yybool)
+     __attribute__ ((__unused__));
+static inline int
+yyfill (yyGLRStackItem *yyvsp, int *yylow, int yylow1, yybool yynormal)
+{
+  if (!yynormal && yylow1 < *yylow)
+    {
+      yyfillin (yyvsp, *yylow, yylow1);
+      *yylow = yylow1;
+    }
+  return yylow1;
+}
+
+/** Perform user action for rule number YYN, with RHS length YYRHSLEN,
+ *  and top stack item YYVSP.  YYLVALP points to place to put semantic
+ *  value ($$), and yylocp points to place for location information
+ *  (@@$).  Returns yyok for normal return, yyaccept for YYACCEPT,
+ *  yyerr for YYERROR, yyabort for YYABORT.  */
+/*ARGSUSED*/ static YYRESULTTAG
+yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
+	      YYSTYPE* yyvalp,
+	      YYLTYPE* YYOPTIONAL_LOC (yylocp),
+	      yyGLRStack* yystackp
+	      ]b4_user_formals[)
+{
+  yybool yynormal __attribute__ ((__unused__)) =
+    (yystackp->yysplitPoint == NULL);
+  int yylow;
+]b4_parse_param_use[]dnl
+[# undef yyerrok
+# define yyerrok (yystackp->yyerrState = 0)
+# undef YYACCEPT
+# define YYACCEPT return yyaccept
+# undef YYABORT
+# define YYABORT return yyabort
+# undef YYERROR
+# define YYERROR return yyerrok, yyerr
+# undef YYRECOVERING
+# define YYRECOVERING() (yystackp->yyerrState != 0)
+# undef yyclearin
+# define yyclearin (yychar = YYEMPTY)
+# undef YYFILL
+# define YYFILL(N) yyfill (yyvsp, &yylow, N, yynormal)
+# undef YYBACKUP
+# define YYBACKUP(Token, Value)						     \
+  return yyerror (]b4_yyerror_args[YY_("syntax error: cannot back up")),     \
+	 yyerrok, yyerr
+
+  yylow = 1;
+  if (yyrhslen == 0)
+    *yyvalp = yyval_default;
+  else
+    *yyvalp = yyvsp[YYFILL (1-yyrhslen)].yystate.yysemantics.yysval;
+  YYLLOC_DEFAULT ((*yylocp), (yyvsp - yyrhslen), yyrhslen);
+]b4_locations_if([[  yystackp->yyerror_range[1].yystate.yyloc = *yylocp;
+]])[
+  switch (yyn)
+    {
+      ]b4_user_actions[
+      default: break;
+    }
+
+  return yyok;
+# undef yyerrok
+# undef YYABORT
+# undef YYACCEPT
+# undef YYERROR
+# undef YYBACKUP
+# undef yyclearin
+# undef YYRECOVERING
+}
+
+
+
+/*ARGSUSED*/ static void
+yyuserMerge (int yyn, YYSTYPE* yy0, YYSTYPE* yy1)
+{
+  YYUSE (yy0);
+  YYUSE (yy1);
+
+  switch (yyn)
+    {
+      ]b4_mergers[
+      default: break;
+    }
+}
+
+			      /* Bison grammar-table manipulation.  */
+
+]b4_yydestruct_generate([b4_c_ansi_function_def])[
+
+/** Number of symbols composing the right hand side of rule #RULE.  */
+static inline int
+yyrhsLength (yyRuleNum yyrule)
+{
+  return yyr2[yyrule];
+}
+
+static void
+yydestroyGLRState (char const *yymsg, yyGLRState *yys]b4_user_formals[)
+{
+  if (yys->yyresolved)
+    yydestruct (yymsg, yystos[yys->yylrState],
+		&yys->yysemantics.yysval]b4_locations_if([, &yys->yyloc])[]b4_user_args[);
+  else
+    {
+#if YYDEBUG
+      if (yydebug)
+	{
+	  if (yys->yysemantics.yyfirstVal)
+	    YYFPRINTF (stderr, "%s unresolved ", yymsg);
+	  else
+	    YYFPRINTF (stderr, "%s incomplete ", yymsg);
+	  yy_symbol_print (stderr, yystos[yys->yylrState],
+			   NULL]b4_locations_if([, &yys->yyloc])[]b4_user_args[);
+	  YYFPRINTF (stderr, "\n");
+	}
+#endif
+
+      if (yys->yysemantics.yyfirstVal)
+	{
+	  yySemanticOption *yyoption = yys->yysemantics.yyfirstVal;
+	  yyGLRState *yyrh;
+	  int yyn;
+	  for (yyrh = yyoption->yystate, yyn = yyrhsLength (yyoption->yyrule);
+	       yyn > 0;
+	       yyrh = yyrh->yypred, yyn -= 1)
+	    yydestroyGLRState (yymsg, yyrh]b4_user_args[);
+	}
+    }
+}
+
+/** Left-hand-side symbol for rule #RULE.  */
+static inline yySymbol
+yylhsNonterm (yyRuleNum yyrule)
+{
+  return yyr1[yyrule];
+}
+
+#define yyis_pact_ninf(yystate) \
+  ]m4_if(m4_eval(b4_pact_ninf < b4_pact_min), [1],
+	 [0],
+	 [((yystate) == YYPACT_NINF)])[
+
+/** True iff LR state STATE has only a default reduction (regardless
+ *  of token).  */
+static inline yybool
+yyisDefaultedState (yyStateNum yystate)
+{
+  return yyis_pact_ninf (yypact[yystate]);
+}
+
+/** The default reduction for STATE, assuming it has one.  */
+static inline yyRuleNum
+yydefaultAction (yyStateNum yystate)
+{
+  return yydefact[yystate];
+}
+
+#define yyis_table_ninf(yytable_value) \
+  ]m4_if(m4_eval(b4_table_ninf < b4_table_min), [1],
+	 [YYID (0)],
+	 [((yytable_value) == YYTABLE_NINF)])[
+
+/** Set *YYACTION to the action to take in YYSTATE on seeing YYTOKEN.
+ *  Result R means
+ *    R < 0:  Reduce on rule -R.
+ *    R = 0:  Error.
+ *    R > 0:  Shift to state R.
+ *  Set *CONFLICTS to a pointer into yyconfl to 0-terminated list of
+ *  conflicting reductions.
+ */
+static inline void
+yygetLRActions (yyStateNum yystate, int yytoken,
+		int* yyaction, const short int** yyconflicts)
+{
+  int yyindex = yypact[yystate] + yytoken;
+  if (yyindex < 0 || YYLAST < yyindex || yycheck[yyindex] != yytoken)
+    {
+      *yyaction = -yydefact[yystate];
+      *yyconflicts = yyconfl;
+    }
+  else if (! yyis_table_ninf (yytable[yyindex]))
+    {
+      *yyaction = yytable[yyindex];
+      *yyconflicts = yyconfl + yyconflp[yyindex];
+    }
+  else
+    {
+      *yyaction = 0;
+      *yyconflicts = yyconfl + yyconflp[yyindex];
+    }
+}
+
+static inline yyStateNum
+yyLRgotoState (yyStateNum yystate, yySymbol yylhs)
+{
+  int yyr;
+  yyr = yypgoto[yylhs - YYNTOKENS] + yystate;
+  if (0 <= yyr && yyr <= YYLAST && yycheck[yyr] == yystate)
+    return yytable[yyr];
+  else
+    return yydefgoto[yylhs - YYNTOKENS];
+}
+
+static inline yybool
+yyisShiftAction (int yyaction)
+{
+  return 0 < yyaction;
+}
+
+static inline yybool
+yyisErrorAction (int yyaction)
+{
+  return yyaction == 0;
+}
+
+				/* GLRStates */
+
+/** Return a fresh GLRStackItem.  Callers should call
+ * YY_RESERVE_GLRSTACK afterwards to make sure there is sufficient
+ * headroom.  */
+
+static inline yyGLRStackItem*
+yynewGLRStackItem (yyGLRStack* yystackp, yybool yyisState)
+{
+  yyGLRStackItem* yynewItem = yystackp->yynextFree;
+  yystackp->yyspaceLeft -= 1;
+  yystackp->yynextFree += 1;
+  yynewItem->yystate.yyisState = yyisState;
+  return yynewItem;
+}
+
+/** Add a new semantic action that will execute the action for rule
+ *  RULENUM on the semantic values in RHS to the list of
+ *  alternative actions for STATE.  Assumes that RHS comes from
+ *  stack #K of *STACKP. */
+static void
+yyaddDeferredAction (yyGLRStack* yystackp, size_t yyk, yyGLRState* yystate,
+		     yyGLRState* rhs, yyRuleNum yyrule)
+{
+  yySemanticOption* yynewOption =
+    &yynewGLRStackItem (yystackp, yyfalse)->yyoption;
+  yynewOption->yystate = rhs;
+  yynewOption->yyrule = yyrule;
+  if (yystackp->yytops.yylookaheadNeeds[yyk])
+    {
+      yynewOption->yyrawchar = yychar;
+      yynewOption->yyval = yylval;
+      yynewOption->yyloc = yylloc;
+    }
+  else
+    yynewOption->yyrawchar = YYEMPTY;
+  yynewOption->yynext = yystate->yysemantics.yyfirstVal;
+  yystate->yysemantics.yyfirstVal = yynewOption;
+
+  YY_RESERVE_GLRSTACK (yystackp);
+}
+
+				/* GLRStacks */
+
+/** Initialize SET to a singleton set containing an empty stack.  */
+static yybool
+yyinitStateSet (yyGLRStateSet* yyset)
+{
+  yyset->yysize = 1;
+  yyset->yycapacity = 16;
+  yyset->yystates = (yyGLRState**) YYMALLOC (16 * sizeof yyset->yystates[0]);
+  if (! yyset->yystates)
+    return yyfalse;
+  yyset->yystates[0] = NULL;
+  yyset->yylookaheadNeeds =
+    (yybool*) YYMALLOC (16 * sizeof yyset->yylookaheadNeeds[0]);
+  if (! yyset->yylookaheadNeeds)
+    {
+      YYFREE (yyset->yystates);
+      return yyfalse;
+    }
+  return yytrue;
+}
+
+static void yyfreeStateSet (yyGLRStateSet* yyset)
+{
+  YYFREE (yyset->yystates);
+  YYFREE (yyset->yylookaheadNeeds);
+}
+
+/** Initialize STACK to a single empty stack, with total maximum
+ *  capacity for all stacks of SIZE.  */
+static yybool
+yyinitGLRStack (yyGLRStack* yystackp, size_t yysize)
+{
+  yystackp->yyerrState = 0;
+  yynerrs = 0;
+  yystackp->yyspaceLeft = yysize;
+  yystackp->yyitems =
+    (yyGLRStackItem*) YYMALLOC (yysize * sizeof yystackp->yynextFree[0]);
+  if (!yystackp->yyitems)
+    return yyfalse;
+  yystackp->yynextFree = yystackp->yyitems;
+  yystackp->yysplitPoint = NULL;
+  yystackp->yylastDeleted = NULL;
+  return yyinitStateSet (&yystackp->yytops);
+}
+
+
+#if YYSTACKEXPANDABLE
+# define YYRELOC(YYFROMITEMS,YYTOITEMS,YYX,YYTYPE) \
+  &((YYTOITEMS) - ((YYFROMITEMS) - (yyGLRStackItem*) (YYX)))->YYTYPE
+
+/** If STACK is expandable, extend it.  WARNING: Pointers into the
+    stack from outside should be considered invalid after this call.
+    We always expand when there are 1 or fewer items left AFTER an
+    allocation, so that we can avoid having external pointers exist
+    across an allocation.  */
+static void
+yyexpandGLRStack (yyGLRStack* yystackp)
+{
+  yyGLRStackItem* yynewItems;
+  yyGLRStackItem* yyp0, *yyp1;
+  size_t yysize, yynewSize;
+  size_t yyn;
+  yysize = yystackp->yynextFree - yystackp->yyitems;
+  if (YYMAXDEPTH - YYHEADROOM < yysize)
+    yyMemoryExhausted (yystackp);
+  yynewSize = 2*yysize;
+  if (YYMAXDEPTH < yynewSize)
+    yynewSize = YYMAXDEPTH;
+  yynewItems = (yyGLRStackItem*) YYMALLOC (yynewSize * sizeof yynewItems[0]);
+  if (! yynewItems)
+    yyMemoryExhausted (yystackp);
+  for (yyp0 = yystackp->yyitems, yyp1 = yynewItems, yyn = yysize;
+       0 < yyn;
+       yyn -= 1, yyp0 += 1, yyp1 += 1)
+    {
+      *yyp1 = *yyp0;
+      if (*(yybool *) yyp0)
+	{
+	  yyGLRState* yys0 = &yyp0->yystate;
+	  yyGLRState* yys1 = &yyp1->yystate;
+	  if (yys0->yypred != NULL)
+	    yys1->yypred =
+	      YYRELOC (yyp0, yyp1, yys0->yypred, yystate);
+	  if (! yys0->yyresolved && yys0->yysemantics.yyfirstVal != NULL)
+	    yys1->yysemantics.yyfirstVal =
+	      YYRELOC(yyp0, yyp1, yys0->yysemantics.yyfirstVal, yyoption);
+	}
+      else
+	{
+	  yySemanticOption* yyv0 = &yyp0->yyoption;
+	  yySemanticOption* yyv1 = &yyp1->yyoption;
+	  if (yyv0->yystate != NULL)
+	    yyv1->yystate = YYRELOC (yyp0, yyp1, yyv0->yystate, yystate);
+	  if (yyv0->yynext != NULL)
+	    yyv1->yynext = YYRELOC (yyp0, yyp1, yyv0->yynext, yyoption);
+	}
+    }
+  if (yystackp->yysplitPoint != NULL)
+    yystackp->yysplitPoint = YYRELOC (yystackp->yyitems, yynewItems,
+				 yystackp->yysplitPoint, yystate);
+
+  for (yyn = 0; yyn < yystackp->yytops.yysize; yyn += 1)
+    if (yystackp->yytops.yystates[yyn] != NULL)
+      yystackp->yytops.yystates[yyn] =
+	YYRELOC (yystackp->yyitems, yynewItems,
+		 yystackp->yytops.yystates[yyn], yystate);
+  YYFREE (yystackp->yyitems);
+  yystackp->yyitems = yynewItems;
+  yystackp->yynextFree = yynewItems + yysize;
+  yystackp->yyspaceLeft = yynewSize - yysize;
+}
+#endif
+
+static void
+yyfreeGLRStack (yyGLRStack* yystackp)
+{
+  YYFREE (yystackp->yyitems);
+  yyfreeStateSet (&yystackp->yytops);
+}
+
+/** Assuming that S is a GLRState somewhere on STACK, update the
+ *  splitpoint of STACK, if needed, so that it is at least as deep as
+ *  S.  */
+static inline void
+yyupdateSplit (yyGLRStack* yystackp, yyGLRState* yys)
+{
+  if (yystackp->yysplitPoint != NULL && yystackp->yysplitPoint > yys)
+    yystackp->yysplitPoint = yys;
+}
+
+/** Invalidate stack #K in STACK.  */
+static inline void
+yymarkStackDeleted (yyGLRStack* yystackp, size_t yyk)
+{
+  if (yystackp->yytops.yystates[yyk] != NULL)
+    yystackp->yylastDeleted = yystackp->yytops.yystates[yyk];
+  yystackp->yytops.yystates[yyk] = NULL;
+}
+
+/** Undelete the last stack that was marked as deleted.  Can only be
+    done once after a deletion, and only when all other stacks have
+    been deleted.  */
+static void
+yyundeleteLastStack (yyGLRStack* yystackp)
+{
+  if (yystackp->yylastDeleted == NULL || yystackp->yytops.yysize != 0)
+    return;
+  yystackp->yytops.yystates[0] = yystackp->yylastDeleted;
+  yystackp->yytops.yysize = 1;
+  YYDPRINTF ((stderr, "Restoring last deleted stack as stack #0.\n"));
+  yystackp->yylastDeleted = NULL;
+}
+
+static inline void
+yyremoveDeletes (yyGLRStack* yystackp)
+{
+  size_t yyi, yyj;
+  yyi = yyj = 0;
+  while (yyj < yystackp->yytops.yysize)
+    {
+      if (yystackp->yytops.yystates[yyi] == NULL)
+	{
+	  if (yyi == yyj)
+	    {
+	      YYDPRINTF ((stderr, "Removing dead stacks.\n"));
+	    }
+	  yystackp->yytops.yysize -= 1;
+	}
+      else
+	{
+	  yystackp->yytops.yystates[yyj] = yystackp->yytops.yystates[yyi];
+	  /* In the current implementation, it's unnecessary to copy
+	     yystackp->yytops.yylookaheadNeeds[yyi] since, after
+	     yyremoveDeletes returns, the parser immediately either enters
+	     deterministic operation or shifts a token.  However, it doesn't
+	     hurt, and the code might evolve to need it.  */
+	  yystackp->yytops.yylookaheadNeeds[yyj] =
+	    yystackp->yytops.yylookaheadNeeds[yyi];
+	  if (yyj != yyi)
+	    {
+	      YYDPRINTF ((stderr, "Rename stack %lu -> %lu.\n",
+			  (unsigned long int) yyi, (unsigned long int) yyj));
+	    }
+	  yyj += 1;
+	}
+      yyi += 1;
+    }
+}
+
+/** Shift to a new state on stack #K of STACK, corresponding to LR state
+ * LRSTATE, at input position POSN, with (resolved) semantic value SVAL.  */
+static inline void
+yyglrShift (yyGLRStack* yystackp, size_t yyk, yyStateNum yylrState,
+	    size_t yyposn,
+	    YYSTYPE* yyvalp, YYLTYPE* yylocp)
+{
+  yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate;
+
+  yynewState->yylrState = yylrState;
+  yynewState->yyposn = yyposn;
+  yynewState->yyresolved = yytrue;
+  yynewState->yypred = yystackp->yytops.yystates[yyk];
+  yynewState->yysemantics.yysval = *yyvalp;
+  yynewState->yyloc = *yylocp;
+  yystackp->yytops.yystates[yyk] = yynewState;
+
+  YY_RESERVE_GLRSTACK (yystackp);
+}
+
+/** Shift stack #K of YYSTACK, to a new state corresponding to LR
+ *  state YYLRSTATE, at input position YYPOSN, with the (unresolved)
+ *  semantic value of YYRHS under the action for YYRULE.  */
+static inline void
+yyglrShiftDefer (yyGLRStack* yystackp, size_t yyk, yyStateNum yylrState,
+		 size_t yyposn, yyGLRState* rhs, yyRuleNum yyrule)
+{
+  yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate;
+
+  yynewState->yylrState = yylrState;
+  yynewState->yyposn = yyposn;
+  yynewState->yyresolved = yyfalse;
+  yynewState->yypred = yystackp->yytops.yystates[yyk];
+  yynewState->yysemantics.yyfirstVal = NULL;
+  yystackp->yytops.yystates[yyk] = yynewState;
+
+  /* Invokes YY_RESERVE_GLRSTACK.  */
+  yyaddDeferredAction (yystackp, yyk, yynewState, rhs, yyrule);
+}
+
+/** Pop the symbols consumed by reduction #RULE from the top of stack
+ *  #K of STACK, and perform the appropriate semantic action on their
+ *  semantic values.  Assumes that all ambiguities in semantic values
+ *  have been previously resolved.  Set *VALP to the resulting value,
+ *  and *LOCP to the computed location (if any).  Return value is as
+ *  for userAction.  */
+static inline YYRESULTTAG
+yydoAction (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule,
+	    YYSTYPE* yyvalp, YYLTYPE* yylocp]b4_user_formals[)
+{
+  int yynrhs = yyrhsLength (yyrule);
+
+  if (yystackp->yysplitPoint == NULL)
+    {
+      /* Standard special case: single stack.  */
+      yyGLRStackItem* rhs = (yyGLRStackItem*) yystackp->yytops.yystates[yyk];
+      YYASSERT (yyk == 0);
+      yystackp->yynextFree -= yynrhs;
+      yystackp->yyspaceLeft += yynrhs;
+      yystackp->yytops.yystates[0] = & yystackp->yynextFree[-1].yystate;
+      return yyuserAction (yyrule, yynrhs, rhs,
+			   yyvalp, yylocp, yystackp]b4_user_args[);
+    }
+  else
+    {
+      /* At present, doAction is never called in nondeterministic
+       * mode, so this branch is never taken.  It is here in
+       * anticipation of a future feature that will allow immediate
+       * evaluation of selected actions in nondeterministic mode.  */
+      int yyi;
+      yyGLRState* yys;
+      yyGLRStackItem yyrhsVals[YYMAXRHS + YYMAXLEFT + 1];
+      yys = yyrhsVals[YYMAXRHS + YYMAXLEFT].yystate.yypred
+	= yystackp->yytops.yystates[yyk];]b4_locations_if([[
+      if (yynrhs == 0)
+	/* Set default location.  */
+	yyrhsVals[YYMAXRHS + YYMAXLEFT - 1].yystate.yyloc = yys->yyloc;]])[
+      for (yyi = 0; yyi < yynrhs; yyi += 1)
+	{
+	  yys = yys->yypred;
+	  YYASSERT (yys);
+	}
+      yyupdateSplit (yystackp, yys);
+      yystackp->yytops.yystates[yyk] = yys;
+      return yyuserAction (yyrule, yynrhs, yyrhsVals + YYMAXRHS + YYMAXLEFT - 1,
+			   yyvalp, yylocp, yystackp]b4_user_args[);
+    }
+}
+
+#if !YYDEBUG
+# define YY_REDUCE_PRINT(Args)
+#else
+# define YY_REDUCE_PRINT(Args)		\
+do {					\
+  if (yydebug)				\
+    yy_reduce_print Args;		\
+} while (YYID (0))
+
+/*----------------------------------------------------------.
+| Report that the RULE is going to be reduced on stack #K.  |
+`----------------------------------------------------------*/
+
+/*ARGSUSED*/ static inline void
+yy_reduce_print (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule,
+		 YYSTYPE* yyvalp, YYLTYPE* yylocp]b4_user_formals[)
+{
+  int yynrhs = yyrhsLength (yyrule);
+  yybool yynormal __attribute__ ((__unused__)) =
+    (yystackp->yysplitPoint == NULL);
+  yyGLRStackItem* yyvsp = (yyGLRStackItem*) yystackp->yytops.yystates[yyk];
+  int yylow = 1;
+  int yyi;
+  YYUSE (yyvalp);
+  YYUSE (yylocp);
+]b4_parse_param_use[]dnl
+[  YYFPRINTF (stderr, "Reducing stack %lu by rule %d (line %lu):\n",
+	     (unsigned long int) yyk, yyrule - 1,
+	     (unsigned long int) yyrline[yyrule]);
+  /* The symbols being reduced.  */
+  for (yyi = 0; yyi < yynrhs; yyi++)
+    {
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
+      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+		       &]b4_rhs_value(yynrhs, yyi + 1)[
+		       ]b4_locations_if([, &]b4_rhs_location(yynrhs, yyi + 1))[]dnl
+		       b4_user_args[);
+      YYFPRINTF (stderr, "\n");
+    }
+}
+#endif
+
+/** Pop items off stack #K of STACK according to grammar rule RULE,
+ *  and push back on the resulting nonterminal symbol.  Perform the
+ *  semantic action associated with RULE and store its value with the
+ *  newly pushed state, if FORCEEVAL or if STACK is currently
+ *  unambiguous.  Otherwise, store the deferred semantic action with
+ *  the new state.  If the new state would have an identical input
+ *  position, LR state, and predecessor to an existing state on the stack,
+ *  it is identified with that existing state, eliminating stack #K from
+ *  the STACK.  In this case, the (necessarily deferred) semantic value is
+ *  added to the options for the existing state's semantic value.
+ */
+static inline YYRESULTTAG
+yyglrReduce (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule,
+	     yybool yyforceEval]b4_user_formals[)
+{
+  size_t yyposn = yystackp->yytops.yystates[yyk]->yyposn;
+
+  if (yyforceEval || yystackp->yysplitPoint == NULL)
+    {
+      YYSTYPE yysval;
+      YYLTYPE yyloc;
+
+      YY_REDUCE_PRINT ((yystackp, yyk, yyrule, &yysval, &yyloc]b4_user_args[));
+      YYCHK (yydoAction (yystackp, yyk, yyrule, &yysval,
+			 &yyloc]b4_user_args[));
+      YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyrule], &yysval, &yyloc);
+      yyglrShift (yystackp, yyk,
+		  yyLRgotoState (yystackp->yytops.yystates[yyk]->yylrState,
+				 yylhsNonterm (yyrule)),
+		  yyposn, &yysval, &yyloc);
+    }
+  else
+    {
+      size_t yyi;
+      int yyn;
+      yyGLRState* yys, *yys0 = yystackp->yytops.yystates[yyk];
+      yyStateNum yynewLRState;
+
+      for (yys = yystackp->yytops.yystates[yyk], yyn = yyrhsLength (yyrule);
+	   0 < yyn; yyn -= 1)
+	{
+	  yys = yys->yypred;
+	  YYASSERT (yys);
+	}
+      yyupdateSplit (yystackp, yys);
+      yynewLRState = yyLRgotoState (yys->yylrState, yylhsNonterm (yyrule));
+      YYDPRINTF ((stderr,
+		  "Reduced stack %lu by rule #%d; action deferred.  Now in state %d.\n",
+		  (unsigned long int) yyk, yyrule - 1, yynewLRState));
+      for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1)
+	if (yyi != yyk && yystackp->yytops.yystates[yyi] != NULL)
+	  {
+	    yyGLRState* yyp, *yysplit = yystackp->yysplitPoint;
+	    yyp = yystackp->yytops.yystates[yyi];
+	    while (yyp != yys && yyp != yysplit && yyp->yyposn >= yyposn)
+	      {
+		if (yyp->yylrState == yynewLRState && yyp->yypred == yys)
+		  {
+		    yyaddDeferredAction (yystackp, yyk, yyp, yys0, yyrule);
+		    yymarkStackDeleted (yystackp, yyk);
+		    YYDPRINTF ((stderr, "Merging stack %lu into stack %lu.\n",
+				(unsigned long int) yyk,
+				(unsigned long int) yyi));
+		    return yyok;
+		  }
+		yyp = yyp->yypred;
+	      }
+	  }
+      yystackp->yytops.yystates[yyk] = yys;
+      yyglrShiftDefer (yystackp, yyk, yynewLRState, yyposn, yys0, yyrule);
+    }
+  return yyok;
+}
+
+static size_t
+yysplitStack (yyGLRStack* yystackp, size_t yyk)
+{
+  if (yystackp->yysplitPoint == NULL)
+    {
+      YYASSERT (yyk == 0);
+      yystackp->yysplitPoint = yystackp->yytops.yystates[yyk];
+    }
+  if (yystackp->yytops.yysize >= yystackp->yytops.yycapacity)
+    {
+      yyGLRState** yynewStates;
+      yybool* yynewLookaheadNeeds;
+
+      yynewStates = NULL;
+
+      if (yystackp->yytops.yycapacity
+	  > (YYSIZEMAX / (2 * sizeof yynewStates[0])))
+	yyMemoryExhausted (yystackp);
+      yystackp->yytops.yycapacity *= 2;
+
+      yynewStates =
+	(yyGLRState**) YYREALLOC (yystackp->yytops.yystates,
+				  (yystackp->yytops.yycapacity
+				   * sizeof yynewStates[0]));
+      if (yynewStates == NULL)
+	yyMemoryExhausted (yystackp);
+      yystackp->yytops.yystates = yynewStates;
+
+      yynewLookaheadNeeds =
+	(yybool*) YYREALLOC (yystackp->yytops.yylookaheadNeeds,
+			     (yystackp->yytops.yycapacity
+			      * sizeof yynewLookaheadNeeds[0]));
+      if (yynewLookaheadNeeds == NULL)
+	yyMemoryExhausted (yystackp);
+      yystackp->yytops.yylookaheadNeeds = yynewLookaheadNeeds;
+    }
+  yystackp->yytops.yystates[yystackp->yytops.yysize]
+    = yystackp->yytops.yystates[yyk];
+  yystackp->yytops.yylookaheadNeeds[yystackp->yytops.yysize]
+    = yystackp->yytops.yylookaheadNeeds[yyk];
+  yystackp->yytops.yysize += 1;
+  return yystackp->yytops.yysize-1;
+}
+
+/** True iff Y0 and Y1 represent identical options at the top level.
+ *  That is, they represent the same rule applied to RHS symbols
+ *  that produce the same terminal symbols.  */
+static yybool
+yyidenticalOptions (yySemanticOption* yyy0, yySemanticOption* yyy1)
+{
+  if (yyy0->yyrule == yyy1->yyrule)
+    {
+      yyGLRState *yys0, *yys1;
+      int yyn;
+      for (yys0 = yyy0->yystate, yys1 = yyy1->yystate,
+	   yyn = yyrhsLength (yyy0->yyrule);
+	   yyn > 0;
+	   yys0 = yys0->yypred, yys1 = yys1->yypred, yyn -= 1)
+	if (yys0->yyposn != yys1->yyposn)
+	  return yyfalse;
+      return yytrue;
+    }
+  else
+    return yyfalse;
+}
+
+/** Assuming identicalOptions (Y0,Y1), destructively merge the
+ *  alternative semantic values for the RHS-symbols of Y1 and Y0.  */
+static void
+yymergeOptionSets (yySemanticOption* yyy0, yySemanticOption* yyy1)
+{
+  yyGLRState *yys0, *yys1;
+  int yyn;
+  for (yys0 = yyy0->yystate, yys1 = yyy1->yystate,
+       yyn = yyrhsLength (yyy0->yyrule);
+       yyn > 0;
+       yys0 = yys0->yypred, yys1 = yys1->yypred, yyn -= 1)
+    {
+      if (yys0 == yys1)
+	break;
+      else if (yys0->yyresolved)
+	{
+	  yys1->yyresolved = yytrue;
+	  yys1->yysemantics.yysval = yys0->yysemantics.yysval;
+	}
+      else if (yys1->yyresolved)
+	{
+	  yys0->yyresolved = yytrue;
+	  yys0->yysemantics.yysval = yys1->yysemantics.yysval;
+	}
+      else
+	{
+	  yySemanticOption** yyz0p;
+	  yySemanticOption* yyz1;
+	  yyz0p = &yys0->yysemantics.yyfirstVal;
+	  yyz1 = yys1->yysemantics.yyfirstVal;
+	  while (YYID (yytrue))
+	    {
+	      if (yyz1 == *yyz0p || yyz1 == NULL)
+		break;
+	      else if (*yyz0p == NULL)
+		{
+		  *yyz0p = yyz1;
+		  break;
+		}
+	      else if (*yyz0p < yyz1)
+		{
+		  yySemanticOption* yyz = *yyz0p;
+		  *yyz0p = yyz1;
+		  yyz1 = yyz1->yynext;
+		  (*yyz0p)->yynext = yyz;
+		}
+	      yyz0p = &(*yyz0p)->yynext;
+	    }
+	  yys1->yysemantics.yyfirstVal = yys0->yysemantics.yyfirstVal;
+	}
+    }
+}
+
+/** Y0 and Y1 represent two possible actions to take in a given
+ *  parsing state; return 0 if no combination is possible,
+ *  1 if user-mergeable, 2 if Y0 is preferred, 3 if Y1 is preferred.  */
+static int
+yypreference (yySemanticOption* y0, yySemanticOption* y1)
+{
+  yyRuleNum r0 = y0->yyrule, r1 = y1->yyrule;
+  int p0 = yydprec[r0], p1 = yydprec[r1];
+
+  if (p0 == p1)
+    {
+      if (yymerger[r0] == 0 || yymerger[r0] != yymerger[r1])
+	return 0;
+      else
+	return 1;
+    }
+  if (p0 == 0 || p1 == 0)
+    return 0;
+  if (p0 < p1)
+    return 3;
+  if (p1 < p0)
+    return 2;
+  return 0;
+}
+
+static YYRESULTTAG yyresolveValue (yyGLRState* yys,
+				   yyGLRStack* yystackp]b4_user_formals[);
+
+
+/** Resolve the previous N states starting at and including state S.  If result
+ *  != yyok, some states may have been left unresolved possibly with empty
+ *  semantic option chains.  Regardless of whether result = yyok, each state
+ *  has been left with consistent data so that yydestroyGLRState can be invoked
+ *  if necessary.  */
+static YYRESULTTAG
+yyresolveStates (yyGLRState* yys, int yyn,
+		 yyGLRStack* yystackp]b4_user_formals[)
+{
+  if (0 < yyn)
+    {
+      YYASSERT (yys->yypred);
+      YYCHK (yyresolveStates (yys->yypred, yyn-1, yystackp]b4_user_args[));
+      if (! yys->yyresolved)
+	YYCHK (yyresolveValue (yys, yystackp]b4_user_args[));
+    }
+  return yyok;
+}
+
+/** Resolve the states for the RHS of OPT, perform its user action, and return
+ *  the semantic value and location.  Regardless of whether result = yyok, all
+ *  RHS states have been destroyed (assuming the user action destroys all RHS
+ *  semantic values if invoked).  */
+static YYRESULTTAG
+yyresolveAction (yySemanticOption* yyopt, yyGLRStack* yystackp,
+		 YYSTYPE* yyvalp, YYLTYPE* yylocp]b4_user_formals[)
+{
+  yyGLRStackItem yyrhsVals[YYMAXRHS + YYMAXLEFT + 1];
+  int yynrhs;
+  int yychar_current;
+  YYSTYPE yylval_current;
+  YYLTYPE yylloc_current;
+  YYRESULTTAG yyflag;
+
+  yynrhs = yyrhsLength (yyopt->yyrule);
+  yyflag = yyresolveStates (yyopt->yystate, yynrhs, yystackp]b4_user_args[);
+  if (yyflag != yyok)
+    {
+      yyGLRState *yys;
+      for (yys = yyopt->yystate; yynrhs > 0; yys = yys->yypred, yynrhs -= 1)
+	yydestroyGLRState ("Cleanup: popping", yys]b4_user_args[);
+      return yyflag;
+    }
+
+  yyrhsVals[YYMAXRHS + YYMAXLEFT].yystate.yypred = yyopt->yystate;]b4_locations_if([[
+  if (yynrhs == 0)
+    /* Set default location.  */
+    yyrhsVals[YYMAXRHS + YYMAXLEFT - 1].yystate.yyloc = yyopt->yystate->yyloc;]])[
+  yychar_current = yychar;
+  yylval_current = yylval;
+  yylloc_current = yylloc;
+  yychar = yyopt->yyrawchar;
+  yylval = yyopt->yyval;
+  yylloc = yyopt->yyloc;
+  yyflag = yyuserAction (yyopt->yyrule, yynrhs,
+			   yyrhsVals + YYMAXRHS + YYMAXLEFT - 1,
+			   yyvalp, yylocp, yystackp]b4_user_args[);
+  yychar = yychar_current;
+  yylval = yylval_current;
+  yylloc = yylloc_current;
+  return yyflag;
+}
+
+#if YYDEBUG
+static void
+yyreportTree (yySemanticOption* yyx, int yyindent)
+{
+  int yynrhs = yyrhsLength (yyx->yyrule);
+  int yyi;
+  yyGLRState* yys;
+  yyGLRState* yystates[1 + YYMAXRHS];
+  yyGLRState yyleftmost_state;
+
+  for (yyi = yynrhs, yys = yyx->yystate; 0 < yyi; yyi -= 1, yys = yys->yypred)
+    yystates[yyi] = yys;
+  if (yys == NULL)
+    {
+      yyleftmost_state.yyposn = 0;
+      yystates[0] = &yyleftmost_state;
+    }
+  else
+    yystates[0] = yys;
+
+  if (yyx->yystate->yyposn < yys->yyposn + 1)
+    YYFPRINTF (stderr, "%*s%s -> <Rule %d, empty>\n",
+	       yyindent, "", yytokenName (yylhsNonterm (yyx->yyrule)),
+	       yyx->yyrule - 1);
+  else
+    YYFPRINTF (stderr, "%*s%s -> <Rule %d, tokens %lu .. %lu>\n",
+	       yyindent, "", yytokenName (yylhsNonterm (yyx->yyrule)),
+	       yyx->yyrule - 1, (unsigned long int) (yys->yyposn + 1),
+	       (unsigned long int) yyx->yystate->yyposn);
+  for (yyi = 1; yyi <= yynrhs; yyi += 1)
+    {
+      if (yystates[yyi]->yyresolved)
+	{
+	  if (yystates[yyi-1]->yyposn+1 > yystates[yyi]->yyposn)
+	    YYFPRINTF (stderr, "%*s%s <empty>\n", yyindent+2, "",
+		       yytokenName (yyrhs[yyprhs[yyx->yyrule]+yyi-1]));
+	  else
+	    YYFPRINTF (stderr, "%*s%s <tokens %lu .. %lu>\n", yyindent+2, "",
+		       yytokenName (yyrhs[yyprhs[yyx->yyrule]+yyi-1]),
+		       (unsigned long int) (yystates[yyi - 1]->yyposn + 1),
+		       (unsigned long int) yystates[yyi]->yyposn);
+	}
+      else
+	yyreportTree (yystates[yyi]->yysemantics.yyfirstVal, yyindent+2);
+    }
+}
+#endif
+
+/*ARGSUSED*/ static YYRESULTTAG
+yyreportAmbiguity (yySemanticOption* yyx0,
+		   yySemanticOption* yyx1]b4_pure_formals[)
+{
+  YYUSE (yyx0);
+  YYUSE (yyx1);
+
+#if YYDEBUG
+  YYFPRINTF (stderr, "Ambiguity detected.\n");
+  YYFPRINTF (stderr, "Option 1,\n");
+  yyreportTree (yyx0, 2);
+  YYFPRINTF (stderr, "\nOption 2,\n");
+  yyreportTree (yyx1, 2);
+  YYFPRINTF (stderr, "\n");
+#endif
+
+  yyerror (]b4_yyerror_args[YY_("syntax is ambiguous"));
+  return yyabort;
+}
+
+/** Starting at and including state S1, resolve the location for each of the
+ *  previous N1 states that is unresolved.  The first semantic option of a state
+ *  is always chosen.  */
+static void
+yyresolveLocations (yyGLRState* yys1, int yyn1,
+		    yyGLRStack *yystackp]b4_user_formals[)
+{
+  if (0 < yyn1)
+    {
+      yyresolveLocations (yys1->yypred, yyn1 - 1, yystackp]b4_user_args[);
+      if (!yys1->yyresolved)
+	{
+	  yySemanticOption *yyoption;
+	  yyGLRStackItem yyrhsloc[1 + YYMAXRHS];
+	  int yynrhs;
+	  int yychar_current;
+	  YYSTYPE yylval_current;
+	  YYLTYPE yylloc_current;
+	  yyoption = yys1->yysemantics.yyfirstVal;
+	  YYASSERT (yyoption != NULL);
+	  yynrhs = yyrhsLength (yyoption->yyrule);
+	  if (yynrhs > 0)
+	    {
+	      yyGLRState *yys;
+	      int yyn;
+	      yyresolveLocations (yyoption->yystate, yynrhs,
+				  yystackp]b4_user_args[);
+	      for (yys = yyoption->yystate, yyn = yynrhs;
+		   yyn > 0;
+		   yys = yys->yypred, yyn -= 1)
+		yyrhsloc[yyn].yystate.yyloc = yys->yyloc;
+	    }
+	  else
+	    {
+	      /* Both yyresolveAction and yyresolveLocations traverse the GSS
+		 in reverse rightmost order.  It is only necessary to invoke
+		 yyresolveLocations on a subforest for which yyresolveAction
+		 would have been invoked next had an ambiguity not been
+		 detected.  Thus the location of the previous state (but not
+		 necessarily the previous state itself) is guaranteed to be
+		 resolved already.  */
+	      yyGLRState *yyprevious = yyoption->yystate;
+	      yyrhsloc[0].yystate.yyloc = yyprevious->yyloc;
+	    }
+	  yychar_current = yychar;
+	  yylval_current = yylval;
+	  yylloc_current = yylloc;
+	  yychar = yyoption->yyrawchar;
+	  yylval = yyoption->yyval;
+	  yylloc = yyoption->yyloc;
+	  YYLLOC_DEFAULT ((yys1->yyloc), yyrhsloc, yynrhs);
+	  yychar = yychar_current;
+	  yylval = yylval_current;
+	  yylloc = yylloc_current;
+	}
+    }
+}
+
+/** Resolve the ambiguity represented in state S, perform the indicated
+ *  actions, and set the semantic value of S.  If result != yyok, the chain of
+ *  semantic options in S has been cleared instead or it has been left
+ *  unmodified except that redundant options may have been removed.  Regardless
+ *  of whether result = yyok, S has been left with consistent data so that
+ *  yydestroyGLRState can be invoked if necessary.  */
+static YYRESULTTAG
+yyresolveValue (yyGLRState* yys, yyGLRStack* yystackp]b4_user_formals[)
+{
+  yySemanticOption* yyoptionList = yys->yysemantics.yyfirstVal;
+  yySemanticOption* yybest;
+  yySemanticOption** yypp;
+  yybool yymerge;
+  YYSTYPE yysval;
+  YYRESULTTAG yyflag;
+  YYLTYPE *yylocp = &yys->yyloc;
+
+  yybest = yyoptionList;
+  yymerge = yyfalse;
+  for (yypp = &yyoptionList->yynext; *yypp != NULL; )
+    {
+      yySemanticOption* yyp = *yypp;
+
+      if (yyidenticalOptions (yybest, yyp))
+	{
+	  yymergeOptionSets (yybest, yyp);
+	  *yypp = yyp->yynext;
+	}
+      else
+	{
+	  switch (yypreference (yybest, yyp))
+	    {
+	    case 0:
+	      yyresolveLocations (yys, 1, yystackp]b4_user_args[);
+	      return yyreportAmbiguity (yybest, yyp]b4_pure_args[);
+	      break;
+	    case 1:
+	      yymerge = yytrue;
+	      break;
+	    case 2:
+	      break;
+	    case 3:
+	      yybest = yyp;
+	      yymerge = yyfalse;
+	      break;
+	    default:
+	      /* This cannot happen so it is not worth a YYASSERT (yyfalse),
+		 but some compilers complain if the default case is
+		 omitted.  */
+	      break;
+	    }
+	  yypp = &yyp->yynext;
+	}
+    }
+
+  if (yymerge)
+    {
+      yySemanticOption* yyp;
+      int yyprec = yydprec[yybest->yyrule];
+      yyflag = yyresolveAction (yybest, yystackp, &yysval,
+				yylocp]b4_user_args[);
+      if (yyflag == yyok)
+	for (yyp = yybest->yynext; yyp != NULL; yyp = yyp->yynext)
+	  {
+	    if (yyprec == yydprec[yyp->yyrule])
+	      {
+		YYSTYPE yysval_other;
+		YYLTYPE yydummy;
+		yyflag = yyresolveAction (yyp, yystackp, &yysval_other,
+					  &yydummy]b4_user_args[);
+		if (yyflag != yyok)
+		  {
+		    yydestruct ("Cleanup: discarding incompletely merged value for",
+				yystos[yys->yylrState],
+				&yysval]b4_locations_if([, yylocp])[]b4_user_args[);
+		    break;
+		  }
+		yyuserMerge (yymerger[yyp->yyrule], &yysval, &yysval_other);
+	      }
+	  }
+    }
+  else
+    yyflag = yyresolveAction (yybest, yystackp, &yysval, yylocp]b4_user_args[);
+
+  if (yyflag == yyok)
+    {
+      yys->yyresolved = yytrue;
+      yys->yysemantics.yysval = yysval;
+    }
+  else
+    yys->yysemantics.yyfirstVal = NULL;
+  return yyflag;
+}
+
+static YYRESULTTAG
+yyresolveStack (yyGLRStack* yystackp]b4_user_formals[)
+{
+  if (yystackp->yysplitPoint != NULL)
+    {
+      yyGLRState* yys;
+      int yyn;
+
+      for (yyn = 0, yys = yystackp->yytops.yystates[0];
+	   yys != yystackp->yysplitPoint;
+	   yys = yys->yypred, yyn += 1)
+	continue;
+      YYCHK (yyresolveStates (yystackp->yytops.yystates[0], yyn, yystackp
+			     ]b4_user_args[));
+    }
+  return yyok;
+}
+
+static void
+yycompressStack (yyGLRStack* yystackp)
+{
+  yyGLRState* yyp, *yyq, *yyr;
+
+  if (yystackp->yytops.yysize != 1 || yystackp->yysplitPoint == NULL)
+    return;
+
+  for (yyp = yystackp->yytops.yystates[0], yyq = yyp->yypred, yyr = NULL;
+       yyp != yystackp->yysplitPoint;
+       yyr = yyp, yyp = yyq, yyq = yyp->yypred)
+    yyp->yypred = yyr;
+
+  yystackp->yyspaceLeft += yystackp->yynextFree - yystackp->yyitems;
+  yystackp->yynextFree = ((yyGLRStackItem*) yystackp->yysplitPoint) + 1;
+  yystackp->yyspaceLeft -= yystackp->yynextFree - yystackp->yyitems;
+  yystackp->yysplitPoint = NULL;
+  yystackp->yylastDeleted = NULL;
+
+  while (yyr != NULL)
+    {
+      yystackp->yynextFree->yystate = *yyr;
+      yyr = yyr->yypred;
+      yystackp->yynextFree->yystate.yypred = &yystackp->yynextFree[-1].yystate;
+      yystackp->yytops.yystates[0] = &yystackp->yynextFree->yystate;
+      yystackp->yynextFree += 1;
+      yystackp->yyspaceLeft -= 1;
+    }
+}
+
+static YYRESULTTAG
+yyprocessOneStack (yyGLRStack* yystackp, size_t yyk,
+		   size_t yyposn]b4_pure_formals[)
+{
+  int yyaction;
+  const short int* yyconflicts;
+  yyRuleNum yyrule;
+
+  while (yystackp->yytops.yystates[yyk] != NULL)
+    {
+      yyStateNum yystate = yystackp->yytops.yystates[yyk]->yylrState;
+      YYDPRINTF ((stderr, "Stack %lu Entering state %d\n",
+		  (unsigned long int) yyk, yystate));
+
+      YYASSERT (yystate != YYFINAL);
+
+      if (yyisDefaultedState (yystate))
+	{
+	  yyrule = yydefaultAction (yystate);
+	  if (yyrule == 0)
+	    {
+	      YYDPRINTF ((stderr, "Stack %lu dies.\n",
+			  (unsigned long int) yyk));
+	      yymarkStackDeleted (yystackp, yyk);
+	      return yyok;
+	    }
+	  YYCHK (yyglrReduce (yystackp, yyk, yyrule, yyfalse]b4_user_args[));
+	}
+      else
+	{
+	  yySymbol yytoken;
+	  yystackp->yytops.yylookaheadNeeds[yyk] = yytrue;
+	  if (yychar == YYEMPTY)
+	    {
+	      YYDPRINTF ((stderr, "Reading a token: "));
+	      yychar = YYLEX;
+	    }
+
+	  if (yychar <= YYEOF)
+	    {
+	      yychar = yytoken = YYEOF;
+	      YYDPRINTF ((stderr, "Now at end of input.\n"));
+	    }
+	  else
+	    {
+	      yytoken = YYTRANSLATE (yychar);
+	      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+	    }
+
+	  yygetLRActions (yystate, yytoken, &yyaction, &yyconflicts);
+
+	  while (*yyconflicts != 0)
+	    {
+	      size_t yynewStack = yysplitStack (yystackp, yyk);
+	      YYDPRINTF ((stderr, "Splitting off stack %lu from %lu.\n",
+			  (unsigned long int) yynewStack,
+			  (unsigned long int) yyk));
+	      YYCHK (yyglrReduce (yystackp, yynewStack,
+				  *yyconflicts, yyfalse]b4_user_args[));
+	      YYCHK (yyprocessOneStack (yystackp, yynewStack,
+					yyposn]b4_pure_args[));
+	      yyconflicts += 1;
+	    }
+
+	  if (yyisShiftAction (yyaction))
+	    break;
+	  else if (yyisErrorAction (yyaction))
+	    {
+	      YYDPRINTF ((stderr, "Stack %lu dies.\n",
+			  (unsigned long int) yyk));
+	      yymarkStackDeleted (yystackp, yyk);
+	      break;
+	    }
+	  else
+	    YYCHK (yyglrReduce (yystackp, yyk, -yyaction,
+				yyfalse]b4_user_args[));
+	}
+    }
+  return yyok;
+}
+
+/*ARGSUSED*/ static void
+yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
+{
+  if (yystackp->yyerrState == 0)
+    {
+#if YYERROR_VERBOSE
+      int yyn;
+      yyn = yypact[yystackp->yytops.yystates[0]->yylrState];
+      if (YYPACT_NINF < yyn && yyn <= YYLAST)
+	{
+	  yySymbol yytoken = YYTRANSLATE (yychar);
+	  size_t yysize0 = yytnamerr (NULL, yytokenName (yytoken));
+	  size_t yysize = yysize0;
+	  size_t yysize1;
+	  yybool yysize_overflow = yyfalse;
+	  char* yymsg = NULL;
+	  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+	  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+	  int yyx;
+	  char *yyfmt;
+	  char const *yyf;
+	  static char const yyunexpected[] = "syntax error, unexpected %s";
+	  static char const yyexpecting[] = ", expecting %s";
+	  static char const yyor[] = " or %s";
+	  char yyformat[sizeof yyunexpected
+			+ sizeof yyexpecting - 1
+			+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+			   * (sizeof yyor - 1))];
+	  char const *yyprefix = yyexpecting;
+
+	  /* Start YYX at -YYN if negative to avoid negative indexes in
+	     YYCHECK.  */
+	  int yyxbegin = yyn < 0 ? -yyn : 0;
+
+	  /* Stay within bounds of both yycheck and yytname.  */
+	  int yychecklim = YYLAST - yyn + 1;
+	  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+	  int yycount = 1;
+
+	  yyarg[0] = yytokenName (yytoken);
+	  yyfmt = yystpcpy (yyformat, yyunexpected);
+
+	  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+	    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+	      {
+		if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+		  {
+		    yycount = 1;
+		    yysize = yysize0;
+		    yyformat[sizeof yyunexpected - 1] = '\0';
+		    break;
+		  }
+		yyarg[yycount++] = yytokenName (yyx);
+		yysize1 = yysize + yytnamerr (NULL, yytokenName (yyx));
+		yysize_overflow |= yysize1 < yysize;
+		yysize = yysize1;
+		yyfmt = yystpcpy (yyfmt, yyprefix);
+		yyprefix = yyor;
+	      }
+
+	  yyf = YY_(yyformat);
+	  yysize1 = yysize + strlen (yyf);
+	  yysize_overflow |= yysize1 < yysize;
+	  yysize = yysize1;
+
+	  if (!yysize_overflow)
+	    yymsg = (char *) YYMALLOC (yysize);
+
+	  if (yymsg)
+	    {
+	      char *yyp = yymsg;
+	      int yyi = 0;
+	      while ((*yyp = *yyf))
+		{
+		  if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+		    {
+		      yyp += yytnamerr (yyp, yyarg[yyi++]);
+		      yyf += 2;
+		    }
+		  else
+		    {
+		      yyp++;
+		      yyf++;
+		    }
+		}
+	      yyerror (]b4_lyyerror_args[yymsg);
+	      YYFREE (yymsg);
+	    }
+	  else
+	    {
+	      yyerror (]b4_lyyerror_args[YY_("syntax error"));
+	      yyMemoryExhausted (yystackp);
+	    }
+	}
+      else
+#endif /* YYERROR_VERBOSE */
+	yyerror (]b4_lyyerror_args[YY_("syntax error"));
+      yynerrs += 1;
+    }
+}
+
+/* Recover from a syntax error on *YYSTACKP, assuming that *YYSTACKP->YYTOKENP,
+   yylval, and yylloc are the syntactic category, semantic value, and location
+   of the lookahead.  */
+/*ARGSUSED*/ static void
+yyrecoverSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
+{
+  size_t yyk;
+  int yyj;
+
+  if (yystackp->yyerrState == 3)
+    /* We just shifted the error token and (perhaps) took some
+       reductions.  Skip tokens until we can proceed.  */
+    while (YYID (yytrue))
+      {
+	yySymbol yytoken;
+	if (yychar == YYEOF)
+	  yyFail (yystackp][]b4_lpure_args[, NULL);
+	if (yychar != YYEMPTY)
+	  {]b4_locations_if([[
+	    /* We throw away the lookahead, but the error range
+	       of the shifted error token must take it into account.  */
+	    yyGLRState *yys = yystackp->yytops.yystates[0];
+	    yyGLRStackItem yyerror_range[3];
+	    yyerror_range[1].yystate.yyloc = yys->yyloc;
+	    yyerror_range[2].yystate.yyloc = yylloc;
+	    YYLLOC_DEFAULT ((yys->yyloc), yyerror_range, 2);]])[
+	    yytoken = YYTRANSLATE (yychar);
+	    yydestruct ("Error: discarding",
+			yytoken, &yylval]b4_locations_if([, &yylloc])[]b4_user_args[);
+	  }
+	YYDPRINTF ((stderr, "Reading a token: "));
+	yychar = YYLEX;
+	if (yychar <= YYEOF)
+	  {
+	    yychar = yytoken = YYEOF;
+	    YYDPRINTF ((stderr, "Now at end of input.\n"));
+	  }
+	else
+	  {
+	    yytoken = YYTRANSLATE (yychar);
+	    YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+	  }
+	yyj = yypact[yystackp->yytops.yystates[0]->yylrState];
+	if (yyis_pact_ninf (yyj))
+	  return;
+	yyj += yytoken;
+	if (yyj < 0 || YYLAST < yyj || yycheck[yyj] != yytoken)
+	  {
+	    if (yydefact[yystackp->yytops.yystates[0]->yylrState] != 0)
+	      return;
+	  }
+	else if (yytable[yyj] != 0 && ! yyis_table_ninf (yytable[yyj]))
+	  return;
+      }
+
+  /* Reduce to one stack.  */
+  for (yyk = 0; yyk < yystackp->yytops.yysize; yyk += 1)
+    if (yystackp->yytops.yystates[yyk] != NULL)
+      break;
+  if (yyk >= yystackp->yytops.yysize)
+    yyFail (yystackp][]b4_lpure_args[, NULL);
+  for (yyk += 1; yyk < yystackp->yytops.yysize; yyk += 1)
+    yymarkStackDeleted (yystackp, yyk);
+  yyremoveDeletes (yystackp);
+  yycompressStack (yystackp);
+
+  /* Now pop stack until we find a state that shifts the error token.  */
+  yystackp->yyerrState = 3;
+  while (yystackp->yytops.yystates[0] != NULL)
+    {
+      yyGLRState *yys = yystackp->yytops.yystates[0];
+      yyj = yypact[yys->yylrState];
+      if (! yyis_pact_ninf (yyj))
+	{
+	  yyj += YYTERROR;
+	  if (0 <= yyj && yyj <= YYLAST && yycheck[yyj] == YYTERROR
+	      && yyisShiftAction (yytable[yyj]))
+	    {
+	      /* Shift the error token having adjusted its location.  */
+	      YYLTYPE yyerrloc;]b4_locations_if([[
+	      yystackp->yyerror_range[2].yystate.yyloc = yylloc;
+	      YYLLOC_DEFAULT (yyerrloc, (yystackp->yyerror_range), 2);]])[
+	      YY_SYMBOL_PRINT ("Shifting", yystos[yytable[yyj]],
+			       &yylval, &yyerrloc);
+	      yyglrShift (yystackp, 0, yytable[yyj],
+			  yys->yyposn, &yylval, &yyerrloc);
+	      yys = yystackp->yytops.yystates[0];
+	      break;
+	    }
+	}
+]b4_locations_if([[      yystackp->yyerror_range[1].yystate.yyloc = yys->yyloc;]])[
+      if (yys->yypred != NULL)
+	yydestroyGLRState ("Error: popping", yys]b4_user_args[);
+      yystackp->yytops.yystates[0] = yys->yypred;
+      yystackp->yynextFree -= 1;
+      yystackp->yyspaceLeft += 1;
+    }
+  if (yystackp->yytops.yystates[0] == NULL)
+    yyFail (yystackp][]b4_lpure_args[, NULL);
+}
+
+#define YYCHK1(YYE)							     \
+  do {									     \
+    switch (YYE) {							     \
+    case yyok:								     \
+      break;								     \
+    case yyabort:							     \
+      goto yyabortlab;							     \
+    case yyaccept:							     \
+      goto yyacceptlab;							     \
+    case yyerr:								     \
+      goto yyuser_error;						     \
+    default:								     \
+      goto yybuglab;							     \
+    }									     \
+  } while (YYID (0))
+
+
+/*----------.
+| yyparse.  |
+`----------*/
+
+]b4_c_ansi_function_def([yyparse], [int], b4_parse_param)[
+{
+  int yyresult;
+  yyGLRStack yystack;
+  yyGLRStack* const yystackp = &yystack;
+  size_t yyposn;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yychar = YYEMPTY;
+  yylval = yyval_default;
+]b4_locations_if([
+#if YYLTYPE_IS_TRIVIAL
+  yylloc.first_line   = yylloc.last_line   = ]b4_location_initial_line[;
+  yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
+#endif
+])
+m4_ifdef([b4_initial_action], [
+m4_pushdef([b4_at_dollar],     [yylloc])dnl
+m4_pushdef([b4_dollar_dollar], [yylval])dnl
+  /* User initialization code.  */
+  b4_user_initial_action
+m4_popdef([b4_dollar_dollar])dnl
+m4_popdef([b4_at_dollar])])dnl
+[
+  if (! yyinitGLRStack (yystackp, YYINITDEPTH))
+    goto yyexhaustedlab;
+  switch (YYSETJMP (yystack.yyexception_buffer))
+    {
+    case 0: break;
+    case 1: goto yyabortlab;
+    case 2: goto yyexhaustedlab;
+    default: goto yybuglab;
+    }
+  yyglrShift (&yystack, 0, 0, 0, &yylval, &yylloc);
+  yyposn = 0;
+
+  while (YYID (yytrue))
+    {
+      /* For efficiency, we have two loops, the first of which is
+	 specialized to deterministic operation (single stack, no
+	 potential ambiguity).  */
+      /* Standard mode */
+      while (YYID (yytrue))
+	{
+	  yyRuleNum yyrule;
+	  int yyaction;
+	  const short int* yyconflicts;
+
+	  yyStateNum yystate = yystack.yytops.yystates[0]->yylrState;
+	  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+	  if (yystate == YYFINAL)
+	    goto yyacceptlab;
+	  if (yyisDefaultedState (yystate))
+	    {
+	      yyrule = yydefaultAction (yystate);
+	      if (yyrule == 0)
+		{
+]b4_locations_if([[		  yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
+		  yyreportSyntaxError (&yystack]b4_user_args[);
+		  goto yyuser_error;
+		}
+	      YYCHK1 (yyglrReduce (&yystack, 0, yyrule, yytrue]b4_user_args[));
+	    }
+	  else
+	    {
+	      yySymbol yytoken;
+	      if (yychar == YYEMPTY)
+		{
+		  YYDPRINTF ((stderr, "Reading a token: "));
+		  yychar = YYLEX;
+		}
+
+	      if (yychar <= YYEOF)
+		{
+		  yychar = yytoken = YYEOF;
+		  YYDPRINTF ((stderr, "Now at end of input.\n"));
+		}
+	      else
+		{
+		  yytoken = YYTRANSLATE (yychar);
+		  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+		}
+
+	      yygetLRActions (yystate, yytoken, &yyaction, &yyconflicts);
+	      if (*yyconflicts != 0)
+		break;
+	      if (yyisShiftAction (yyaction))
+		{
+		  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+		  yychar = YYEMPTY;
+		  yyposn += 1;
+		  yyglrShift (&yystack, 0, yyaction, yyposn, &yylval, &yylloc);
+		  if (0 < yystack.yyerrState)
+		    yystack.yyerrState -= 1;
+		}
+	      else if (yyisErrorAction (yyaction))
+		{
+]b4_locations_if([[		  yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
+		  yyreportSyntaxError (&yystack]b4_user_args[);
+		  goto yyuser_error;
+		}
+	      else
+		YYCHK1 (yyglrReduce (&yystack, 0, -yyaction, yytrue]b4_user_args[));
+	    }
+	}
+
+      while (YYID (yytrue))
+	{
+	  yySymbol yytoken_to_shift;
+	  size_t yys;
+
+	  for (yys = 0; yys < yystack.yytops.yysize; yys += 1)
+	    yystackp->yytops.yylookaheadNeeds[yys] = yychar != YYEMPTY;
+
+	  /* yyprocessOneStack returns one of three things:
+
+	      - An error flag.  If the caller is yyprocessOneStack, it
+		immediately returns as well.  When the caller is finally
+		yyparse, it jumps to an error label via YYCHK1.
+
+	      - yyok, but yyprocessOneStack has invoked yymarkStackDeleted
+		(&yystack, yys), which sets the top state of yys to NULL.  Thus,
+		yyparse's following invocation of yyremoveDeletes will remove
+		the stack.
+
+	      - yyok, when ready to shift a token.
+
+	     Except in the first case, yyparse will invoke yyremoveDeletes and
+	     then shift the next token onto all remaining stacks.  This
+	     synchronization of the shift (that is, after all preceding
+	     reductions on all stacks) helps prevent double destructor calls
+	     on yylval in the event of memory exhaustion.  */
+
+	  for (yys = 0; yys < yystack.yytops.yysize; yys += 1)
+	    YYCHK1 (yyprocessOneStack (&yystack, yys, yyposn]b4_lpure_args[));
+	  yyremoveDeletes (&yystack);
+	  if (yystack.yytops.yysize == 0)
+	    {
+	      yyundeleteLastStack (&yystack);
+	      if (yystack.yytops.yysize == 0)
+		yyFail (&yystack][]b4_lpure_args[, YY_("syntax error"));
+	      YYCHK1 (yyresolveStack (&yystack]b4_user_args[));
+	      YYDPRINTF ((stderr, "Returning to deterministic operation.\n"));
+]b4_locations_if([[	      yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
+	      yyreportSyntaxError (&yystack]b4_user_args[);
+	      goto yyuser_error;
+	    }
+
+	  /* If any yyglrShift call fails, it will fail after shifting.  Thus,
+	     a copy of yylval will already be on stack 0 in the event of a
+	     failure in the following loop.  Thus, yychar is set to YYEMPTY
+	     before the loop to make sure the user destructor for yylval isn't
+	     called twice.  */
+	  yytoken_to_shift = YYTRANSLATE (yychar);
+	  yychar = YYEMPTY;
+	  yyposn += 1;
+	  for (yys = 0; yys < yystack.yytops.yysize; yys += 1)
+	    {
+	      int yyaction;
+	      const short int* yyconflicts;
+	      yyStateNum yystate = yystack.yytops.yystates[yys]->yylrState;
+	      yygetLRActions (yystate, yytoken_to_shift, &yyaction,
+			      &yyconflicts);
+	      /* Note that yyconflicts were handled by yyprocessOneStack.  */
+	      YYDPRINTF ((stderr, "On stack %lu, ", (unsigned long int) yys));
+	      YY_SYMBOL_PRINT ("shifting", yytoken_to_shift, &yylval, &yylloc);
+	      yyglrShift (&yystack, yys, yyaction, yyposn,
+			  &yylval, &yylloc);
+	      YYDPRINTF ((stderr, "Stack %lu now in state #%d\n",
+			  (unsigned long int) yys,
+			  yystack.yytops.yystates[yys]->yylrState));
+	    }
+
+	  if (yystack.yytops.yysize == 1)
+	    {
+	      YYCHK1 (yyresolveStack (&yystack]b4_user_args[));
+	      YYDPRINTF ((stderr, "Returning to deterministic operation.\n"));
+	      yycompressStack (&yystack);
+	      break;
+	    }
+	}
+      continue;
+    yyuser_error:
+      yyrecoverSyntaxError (&yystack]b4_user_args[);
+      yyposn = yystack.yytops.yystates[0]->yyposn;
+    }
+
+ yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+ yybuglab:
+  YYASSERT (yyfalse);
+  goto yyabortlab;
+
+ yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+ yyexhaustedlab:
+  yyerror (]b4_lyyerror_args[YY_("memory exhausted"));
+  yyresult = 2;
+  goto yyreturn;
+
+ yyreturn:
+  if (yychar != YYEMPTY)
+    yydestruct ("Cleanup: discarding lookahead",
+		YYTRANSLATE (yychar),
+		&yylval]b4_locations_if([, &yylloc])[]b4_user_args[);
+
+  /* If the stack is well-formed, pop the stack until it is empty,
+     destroying its entries as we go.  But free the stack regardless
+     of whether it is well-formed.  */
+  if (yystack.yyitems)
+    {
+      yyGLRState** yystates = yystack.yytops.yystates;
+      if (yystates)
+	{
+	  size_t yysize = yystack.yytops.yysize;
+	  size_t yyk;
+	  for (yyk = 0; yyk < yysize; yyk += 1)
+	    if (yystates[yyk])
+	      {
+		while (yystates[yyk])
+		  {
+		    yyGLRState *yys = yystates[yyk];
+]b4_locations_if([[		    yystack.yyerror_range[1].yystate.yyloc = yys->yyloc;]]
+)[		    if (yys->yypred != NULL)
+		      yydestroyGLRState ("Cleanup: popping", yys]b4_user_args[);
+		    yystates[yyk] = yys->yypred;
+		    yystack.yynextFree -= 1;
+		    yystack.yyspaceLeft += 1;
+		  }
+		break;
+	      }
+	}
+      yyfreeGLRStack (&yystack);
+    }
+
+  /* Make sure YYID is used.  */
+  return YYID (yyresult);
+}
+
+/* DEBUGGING ONLY */
+#if YYDEBUG
+static void yypstack (yyGLRStack* yystackp, size_t yyk)
+  __attribute__ ((__unused__));
+static void yypdumpstack (yyGLRStack* yystackp) __attribute__ ((__unused__));
+
+static void
+yy_yypstack (yyGLRState* yys)
+{
+  if (yys->yypred)
+    {
+      yy_yypstack (yys->yypred);
+      YYFPRINTF (stderr, " -> ");
+    }
+  YYFPRINTF (stderr, "%d@@%lu", yys->yylrState,
+             (unsigned long int) yys->yyposn);
+}
+
+static void
+yypstates (yyGLRState* yyst)
+{
+  if (yyst == NULL)
+    YYFPRINTF (stderr, "<null>");
+  else
+    yy_yypstack (yyst);
+  YYFPRINTF (stderr, "\n");
+}
+
+static void
+yypstack (yyGLRStack* yystackp, size_t yyk)
+{
+  yypstates (yystackp->yytops.yystates[yyk]);
+}
+
+#define YYINDEX(YYX)							     \
+    ((YYX) == NULL ? -1 : (yyGLRStackItem*) (YYX) - yystackp->yyitems)
+
+
+static void
+yypdumpstack (yyGLRStack* yystackp)
+{
+  yyGLRStackItem* yyp;
+  size_t yyi;
+  for (yyp = yystackp->yyitems; yyp < yystackp->yynextFree; yyp += 1)
+    {
+      YYFPRINTF (stderr, "%3lu. ",
+                 (unsigned long int) (yyp - yystackp->yyitems));
+      if (*(yybool *) yyp)
+	{
+	  YYFPRINTF (stderr, "Res: %d, LR State: %d, posn: %lu, pred: %ld",
+		     yyp->yystate.yyresolved, yyp->yystate.yylrState,
+		     (unsigned long int) yyp->yystate.yyposn,
+		     (long int) YYINDEX (yyp->yystate.yypred));
+	  if (! yyp->yystate.yyresolved)
+	    YYFPRINTF (stderr, ", firstVal: %ld",
+		       (long int) YYINDEX (yyp->yystate
+                                             .yysemantics.yyfirstVal));
+	}
+      else
+	{
+	  YYFPRINTF (stderr, "Option. rule: %d, state: %ld, next: %ld",
+		     yyp->yyoption.yyrule - 1,
+		     (long int) YYINDEX (yyp->yyoption.yystate),
+		     (long int) YYINDEX (yyp->yyoption.yynext));
+	}
+      YYFPRINTF (stderr, "\n");
+    }
+  YYFPRINTF (stderr, "Tops:");
+  for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1)
+    YYFPRINTF (stderr, "%lu: %ld; ", (unsigned long int) yyi,
+	       (long int) YYINDEX (yystackp->yytops.yystates[yyi]));
+  YYFPRINTF (stderr, "\n");
+}
+#endif
+]
+
+b4_epilogue
+dnl
+dnl glr.cc produces its own header.
+dnl
+m4_if(b4_skeleton, ["glr.c"],
+[b4_defines_if(
+[@output(b4_spec_defines_file@)
+b4_copyright([Skeleton interface for Bison GLR parsers in C],
+  [2002, 2003, 2004, 2005, 2006])
+
+b4_shared_declarations
+
+b4_pure_if([],
+[[extern YYSTYPE ]b4_prefix[lval;]])
+
+b4_locations_if([b4_pure_if([],
+[extern YYLTYPE ]b4_prefix[lloc;])
+])
+])])
+m4_divert_pop(0)
Index: EcnlProtoTool/trunk/tools/share/bison/glr.cc
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/glr.cc	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/glr.cc	(revision 270)
@@ -0,0 +1,377 @@
+                                                                    -*- C -*-
+
+# C++ GLR skeleton for Bison
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation,
+# Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+# This skeleton produces a C++ class that encapsulates a C glr parser.
+# This is in order to reduce the maintenance burden.  The glr.c
+# skeleton is clean and pure enough so that there are no real
+# problems.  The C++ interface is the same as that of lalr1.cc.  In
+# fact, glr.c can replace yacc.c without the user noticing any
+# difference, and similarly for glr.cc replacing lalr1.cc.
+#
+# The passing of parse-params
+#
+#   The additional arguments are stored as members of the parser
+#   object, yyparser.  The C routines need to carry yyparser
+#   throughout the C parser; that easy: just let yyparser become an
+#   additional parse-param.  But because the C++ skeleton needs to
+#   know the "real" original parse-param, we save them
+#   (b4_parse_param_orig).  Note that b4_parse_param is overquoted
+#   (and c.m4 strips one level of quotes).  This is a PITA, and
+#   explains why there are so many levels of quotes.
+#
+# The locations
+#
+#   We use location.cc just like lalr1.cc, but because glr.c stores
+#   the locations in a (C++) union, the position and location classes
+#   must not have a constructor.  Therefore, contrary to lalr1.cc, we
+#   must not define "b4_location_constructors".  As a consequence the
+#   user must initialize the first positions (in particular the
+#   filename member).
+
+# We require a pure interface using locations.
+m4_define([b4_locations_flag], [1])
+m4_define([b4_pure_flag],      [1])
+
+# The header is mandatory.
+b4_defines_if([],
+              [b4_fatal([b4_skeleton[: using %%defines is mandatory]])])
+
+m4_include(b4_pkgdatadir/[c++.m4])
+m4_include(b4_pkgdatadir/[location.cc])
+
+m4_define([b4_parser_class_name],
+          [b4_percent_define_get([[parser_class_name]])])
+
+# Save the parse parameters.
+m4_define([b4_parse_param_orig], m4_defn([b4_parse_param]))
+
+
+# b4_yy_symbol_print_generate
+# ---------------------------
+# Bypass the default implementation to generate the "yy_symbol_print"
+# and "yy_symbol_value_print" functions.
+m4_define([b4_yy_symbol_print_generate],
+[[
+/*--------------------.
+| Print this symbol.  |
+`--------------------*/
+
+]b4_c_ansi_function_def([yy_symbol_print],
+    [static void],
+    [[FILE *],               []],
+    [[int yytype],           [yytype]],
+    [[const b4_namespace_ref::b4_parser_class_name::semantic_type *yyvaluep],
+			     [yyvaluep]],
+    [[const b4_namespace_ref::b4_parser_class_name::location_type *yylocationp],
+			     [yylocationp]],
+    b4_parse_param)[
+{
+]b4_parse_param_use[]dnl
+[  yyparser.yy_symbol_print_ (yytype, yyvaluep]b4_locations_if([, yylocationp])[);
+}
+]])
+
+
+# Declare yyerror.
+m4_append([b4_post_prologue],
+[b4_syncline([@oline@], [@ofile@])
+
+b4_c_ansi_function_decl([yyerror],
+    [static void],
+    [[b4_namespace_ref::b4_parser_class_name::location_type *yylocationp], [yylocationp]],
+    b4_parse_param,
+    [[const char* msg], [msg]])])
+
+
+# Define yyerror.
+m4_append([b4_epilogue],
+[b4_syncline([@oline@], [@ofile@])[
+/*------------------.
+| Report an error.  |
+`------------------*/
+
+]b4_c_ansi_function_def([yyerror],
+    [static void],
+    [[b4_namespace_ref::b4_parser_class_name::location_type *yylocationp], [yylocationp]],
+    b4_parse_param,
+    [[const char* msg], [msg]])[
+{
+]b4_parse_param_use[]dnl
+[  yyparser.error (*yylocationp, msg);
+}
+
+
+]b4_namespace_open[
+]dnl In this section, the parse param are the original parse_params.
+m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
+[  /// Build a parser object.
+  ]b4_parser_class_name::b4_parser_class_name[ (]b4_parse_param_decl[)]m4_ifset([b4_parse_param], [
+    :])[
+#if YYDEBUG
+    ]m4_ifset([b4_parse_param], [  ], [ :])[yydebug_ (false),
+      yycdebug_ (&std::cerr)]m4_ifset([b4_parse_param], [,])[
+#endif]b4_parse_param_cons[
+  {
+  }
+
+  ]b4_parser_class_name::~b4_parser_class_name[ ()
+  {
+  }
+
+  int
+  ]b4_parser_class_name[::parse ()
+  {
+    return ::yyparse (*this]b4_user_args[);
+  }
+
+#if YYDEBUG
+  /*--------------------.
+  | Print this symbol.  |
+  `--------------------*/
+
+  inline void
+  ]b4_parser_class_name[::yy_symbol_value_print_ (int yytype,
+			   const semantic_type* yyvaluep, const location_type* yylocationp)
+  {
+    /* Pacify ``unused variable'' warnings.  */
+    YYUSE (yyvaluep);
+    YYUSE (yylocationp);
+    switch (yytype)
+      {
+  ]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl
+[        default:
+	  break;
+      }
+  }
+
+
+  void
+  ]b4_parser_class_name[::yy_symbol_print_ (int yytype,
+			   const semantic_type* yyvaluep, const location_type* yylocationp)
+  {
+    *yycdebug_ << (yytype < YYNTOKENS ? "token" : "nterm")
+	       << ' ' << yytname[yytype] << " ("
+	       << *yylocationp << ": ";
+    yy_symbol_value_print_ (yytype, yyvaluep, yylocationp);
+    *yycdebug_ << ')';
+  }
+
+  std::ostream&
+  ]b4_parser_class_name[::debug_stream () const
+  {
+    return *yycdebug_;
+  }
+
+  void
+  ]b4_parser_class_name[::set_debug_stream (std::ostream& o)
+  {
+    yycdebug_ = &o;
+  }
+
+
+  ]b4_parser_class_name[::debug_level_type
+  ]b4_parser_class_name[::debug_level () const
+  {
+    return yydebug_;
+  }
+
+  void
+  ]b4_parser_class_name[::set_debug_level (debug_level_type l)
+  {
+    yydebug_ = l;
+  }
+
+#endif
+]m4_popdef([b4_parse_param])dnl
+b4_namespace_close[
+
+]])
+
+
+# Let glr.c believe that the user arguments include the parser itself.
+m4_ifset([b4_parse_param],
+[m4_pushdef([b4_parse_param],
+	    m4_dquote([[[b4_namespace_ref::b4_parser_class_name& yyparser], [[yyparser]]],]
+m4_defn([b4_parse_param])))],
+[m4_pushdef([b4_parse_param],
+	    [[[[b4_namespace_ref::b4_parser_class_name& yyparser], [[yyparser]]]]])
+])
+m4_include(b4_pkgdatadir/[glr.c])
+m4_popdef([b4_parse_param])
+
+m4_divert_push(0)
+@output(b4_spec_defines_file@)
+b4_copyright([Skeleton interface for Bison GLR parsers in C++],
+  [2002, 2003, 2004, 2005, 2006])[
+
+/* C++ GLR parser skeleton written by Akim Demaille.  */
+
+#ifndef PARSER_HEADER_H
+# define PARSER_HEADER_H
+
+]b4_percent_code_get([[requires]])[
+
+#include <string>
+#include <iostream>
+
+/* Using locations.  */
+#define YYLSP_NEEDED ]b4_locations_flag[
+
+]b4_namespace_open[
+  class position;
+  class location;
+]b4_namespace_close[
+
+#include "location.hh"
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG ]b4_debug_flag[
+#endif
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)				\
+    do									\
+      if (N)								\
+	{								\
+	  (Current).begin  = YYRHSLOC (Rhs, 1).begin;			\
+	  (Current).end    = YYRHSLOC (Rhs, N).end;			\
+	}								\
+      else								\
+	{								\
+	  (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end;	\
+	}								\
+    while (/*CONSTCOND*/ 0)
+#endif
+
+]b4_namespace_open[
+  /// A Bison parser.
+  class ]b4_parser_class_name[
+  {
+  public:
+    /// Symbol semantic values.
+#ifndef YYSTYPE
+]m4_ifdef([b4_stype],
+[    union semantic_type
+    {
+b4_user_stype
+    };],
+[m4_if(b4_tag_seen_flag, 0,
+[[    typedef int semantic_type;]],
+[[    typedef YYSTYPE semantic_type;]])])[
+#else
+    typedef YYSTYPE semantic_type;
+#endif
+    /// Symbol locations.
+    typedef ]b4_percent_define_get([[location_type]])[ location_type;
+    /// Tokens.
+    struct token
+    {
+      ]b4_token_enums(b4_tokens)[
+    };
+    /// Token type.
+    typedef token::yytokentype token_type;
+
+    /// Build a parser object.
+    ]b4_parser_class_name[ (]b4_parse_param_decl[);
+    virtual ~]b4_parser_class_name[ ();
+
+    /// Parse.
+    /// \returns  0 iff parsing succeeded.
+    virtual int parse ();
+
+    /// The current debugging stream.
+    std::ostream& debug_stream () const;
+    /// Set the current debugging stream.
+    void set_debug_stream (std::ostream &);
+
+    /// Type for debugging levels.
+    typedef int debug_level_type;
+    /// The current debugging level.
+    debug_level_type debug_level () const;
+    /// Set the current debugging level.
+    void set_debug_level (debug_level_type l);
+
+  private:
+
+  public:
+    /// Report a syntax error.
+    /// \param loc    where the syntax error is found.
+    /// \param msg    a description of the syntax error.
+    virtual void error (const location_type& loc, const std::string& msg);
+  private:
+
+#if YYDEBUG
+  public:
+    /// \brief Report a symbol value on the debug stream.
+    /// \param yytype       The token type.
+    /// \param yyvaluep     Its semantic value.
+    /// \param yylocationp  Its location.
+    virtual void yy_symbol_value_print_ (int yytype,
+					 const semantic_type* yyvaluep,
+					 const location_type* yylocationp);
+    /// \brief Report a symbol on the debug stream.
+    /// \param yytype       The token type.
+    /// \param yyvaluep     Its semantic value.
+    /// \param yylocationp  Its location.
+    virtual void yy_symbol_print_ (int yytype,
+				   const semantic_type* yyvaluep,
+				   const location_type* yylocationp);
+  private:
+    /* Debugging.  */
+    int yydebug_;
+    std::ostream* yycdebug_;
+#endif
+
+
+    /// \brief Reclaim the memory associated to a symbol.
+    /// \param yymsg        Why this token is reclaimed.
+    /// \param yytype       The symbol type.
+    /// \param yyvaluep     Its semantic value.
+    /// \param yylocationp  Its location.
+    inline void yydestruct_ (const char* yymsg,
+			     int yytype,
+			     semantic_type* yyvaluep,
+			     location_type* yylocationp);
+
+]b4_parse_param_vars[
+  };
+
+]dnl Redirections for glr.c.
+b4_percent_define_flag_if([[global_tokens_and_yystype]],
+[b4_token_defines(b4_tokens)])
+[
+#ifndef YYSTYPE
+# define YYSTYPE ]b4_namespace_ref[::]b4_parser_class_name[::semantic_type
+#endif
+#ifndef YYLTYPE
+# define YYLTYPE ]b4_namespace_ref[::]b4_parser_class_name[::location_type
+#endif
+
+]b4_namespace_close[
+
+]b4_percent_code_get([[provides]])[]dnl
+
+[#endif /* ! defined PARSER_HEADER_H */]
+m4_divert_pop(0)
Index: EcnlProtoTool/trunk/tools/share/bison/java-skel.m4
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/java-skel.m4	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/java-skel.m4	(revision 270)
@@ -0,0 +1,25 @@
+                                                            -*- Autoconf -*-
+
+# Java skeleton dispatching for Bison.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+b4_glr_if(             [b4_complain([%%glr-parser not supported for Java])])
+b4_nondeterministic_if([b4_complain([%%nondeterministic-parser not supported for Java])])
+
+m4_define_default([b4_used_skeleton], [b4_pkgdatadir/[lalr1.java]])
+m4_define_default([b4_skeleton], ["b4_basename(b4_used_skeleton)"])
+
+m4_include(b4_used_skeleton)
Index: EcnlProtoTool/trunk/tools/share/bison/java.m4
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/java.m4	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/java.m4	(revision 270)
@@ -0,0 +1,303 @@
+                                                            -*- Autoconf -*-
+
+# Java language support for Bison
+
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+# b4_comment(TEXT)
+# ----------------
+m4_define([b4_comment], [/* m4_bpatsubst([$1], [
+], [
+   ])  */])
+
+
+# b4_list2(LIST1, LIST2)
+# --------------------------
+# Join two lists with a comma if necessary.
+m4_define([b4_list2],
+	  [$1[]m4_ifval(m4_quote($1), [m4_ifval(m4_quote($2), [[, ]])])[]$2])
+
+
+# b4_percent_define_get3(DEF, PRE, POST, NOT)
+# -------------------------------------------
+# Expand to the value of DEF surrounded by PRE and POST if it's %define'ed,
+# otherwise NOT.
+m4_define([b4_percent_define_get3],
+	  [m4_ifval(m4_quote(b4_percent_define_get([$1])),
+		[$2[]b4_percent_define_get([$1])[]$3], [$4])])
+
+
+
+# b4_flag_value(BOOLEAN-FLAG)
+# ---------------------------
+m4_define([b4_flag_value], [b4_flag_if([$1], [true], [false])])
+
+
+# b4_public_if(TRUE, FALSE)
+# -------------------------
+b4_percent_define_default([[public]], [[false]])
+m4_define([b4_public_if],
+[b4_percent_define_flag_if([public], [$1], [$2])])
+
+
+# b4_abstract_if(TRUE, FALSE)
+# ---------------------------
+b4_percent_define_default([[abstract]], [[false]])
+m4_define([b4_abstract_if],
+[b4_percent_define_flag_if([abstract], [$1], [$2])])
+
+
+# b4_final_if(TRUE, FALSE)
+# ---------------------------
+b4_percent_define_default([[final]], [[false]])
+m4_define([b4_final_if],
+[b4_percent_define_flag_if([final], [$1], [$2])])
+
+
+# b4_strictfp_if(TRUE, FALSE)
+# ---------------------------
+b4_percent_define_default([[strictfp]], [[false]])
+m4_define([b4_strictfp_if],
+[b4_percent_define_flag_if([strictfp], [$1], [$2])])
+
+
+# b4_lexer_if(TRUE, FALSE)
+# ------------------------
+m4_define([b4_lexer_if],
+[b4_percent_code_ifdef([[lexer]], [$1], [$2])])
+
+
+# b4_identification
+# -----------------
+m4_define([b4_identification],
+[  /** Version number for the Bison executable that generated this parser.  */
+  public static final String bisonVersion = "b4_version";
+
+  /** Name of the skeleton that generated this parser.  */
+  public static final String bisonSkeleton = b4_skeleton;
+])
+
+
+## ------------ ##
+## Data types.  ##
+## ------------ ##
+
+# b4_int_type(MIN, MAX)
+# ---------------------
+# Return the smallest int type able to handle numbers ranging from
+# MIN to MAX (included).
+m4_define([b4_int_type],
+[m4_if(b4_ints_in($@,   [-128],   [127]), [1], [byte],
+       b4_ints_in($@, [-32768], [32767]), [1], [short],
+					       [int])])
+
+# b4_int_type_for(NAME)
+# ---------------------
+# Return the smallest int type able to handle numbers ranging from
+# `NAME_min' to `NAME_max' (included).
+m4_define([b4_int_type_for],
+[b4_int_type($1_min, $1_max)])
+
+# b4_null
+# -------
+m4_define([b4_null], [null])
+
+
+## ------------------------- ##
+## Assigning token numbers.  ##
+## ------------------------- ##
+
+# b4_token_enum(TOKEN-NAME, TOKEN-NUMBER)
+# ---------------------------------------
+# Output the definition of this token as an enum.
+m4_define([b4_token_enum],
+[  /** Token number, to be returned by the scanner.  */
+  public static final int $1 = $2;
+])
+
+
+# b4_token_enums(LIST-OF-PAIRS-TOKEN-NAME-TOKEN-NUMBER)
+# -----------------------------------------------------
+# Output the definition of the tokens (if there are) as enums.
+m4_define([b4_token_enums],
+[m4_if([$#$1], [1], [],
+[/* Tokens.  */
+m4_map([b4_token_enum], [$@])])
+])
+
+# b4-case(ID, CODE)
+# -----------------
+# We need to fool Java's stupid unreachable code detection.
+m4_define([b4_case], [  case $1:
+  if (yyn == $1)
+    $2;
+  break;
+    ])
+
+
+## ---------------- ##
+## Default values.  ##
+## ---------------- ##
+
+m4_define([b4_yystype], [b4_percent_define_get([[stype]])])
+b4_percent_define_default([[stype]], [[Object]])])
+
+# %name-prefix
+m4_define_default([b4_prefix], [[YY]])
+
+b4_percent_define_default([[parser_class_name]], [b4_prefix[]Parser])])
+m4_define([b4_parser_class_name], [b4_percent_define_get([[parser_class_name]])])
+
+b4_percent_define_default([[lex_throws]], [[java.io.IOException]])])
+m4_define([b4_lex_throws], [b4_percent_define_get([[lex_throws]])])
+
+b4_percent_define_default([[throws]], [])])
+m4_define([b4_throws], [b4_percent_define_get([[throws]])])
+
+b4_percent_define_default([[location_type]], [Location])])
+m4_define([b4_location_type], [b4_percent_define_get([[location_type]])])
+
+b4_percent_define_default([[position_type]], [Position])])
+m4_define([b4_position_type], [b4_percent_define_get([[position_type]])])
+
+
+## ----------------- ##
+## Semantic Values.  ##
+## ----------------- ##
+
+
+# b4_lhs_value([TYPE])
+# --------------------
+# Expansion of $<TYPE>$.
+m4_define([b4_lhs_value], [yyval])
+
+
+# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
+# --------------------------------------
+# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
+# symbols on RHS.
+#
+# In this simple implementation, %token and %type have class names
+# between the angle brackets.
+m4_define([b4_rhs_value],
+[(m4_ifval($3, [($3)])[](yystack.valueAt ($1-($2))))])
+
+# b4_lhs_location()
+# -----------------
+# Expansion of @$.
+m4_define([b4_lhs_location],
+[(yyloc)])
+
+
+# b4_rhs_location(RULE-LENGTH, NUM)
+# ---------------------------------
+# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
+# on RHS.
+m4_define([b4_rhs_location],
+[yystack.locationAt ($1-($2))])
+
+
+# b4_lex_param
+# b4_parse_param
+# --------------
+# If defined, b4_lex_param arrives double quoted, but below we prefer
+# it to be single quoted.  Same for b4_parse_param.
+
+# TODO: should be in bison.m4
+m4_define_default([b4_lex_param], [[]]))
+m4_define([b4_lex_param], b4_lex_param))
+m4_define([b4_parse_param], b4_parse_param))
+
+# b4_lex_param_decl
+# -------------------
+# Extra formal arguments of the constructor.
+m4_define([b4_lex_param_decl],
+[m4_ifset([b4_lex_param],
+          [b4_remove_comma([$1],
+			   b4_param_decls(b4_lex_param))],
+	  [$1])])
+
+m4_define([b4_param_decls],
+	  [m4_map([b4_param_decl], [$@])])
+m4_define([b4_param_decl], [, $1])
+
+m4_define([b4_remove_comma], [m4_ifval(m4_quote($1), [$1, ], [])m4_shift2($@)])
+
+
+
+# b4_parse_param_decl
+# -------------------
+# Extra formal arguments of the constructor.
+m4_define([b4_parse_param_decl],
+[m4_ifset([b4_parse_param],
+          [b4_remove_comma([$1],
+			   b4_param_decls(b4_parse_param))],
+	  [$1])])
+
+
+
+# b4_lex_param_call
+# -------------------
+# Delegating the lexer parameters to the lexer constructor.
+m4_define([b4_lex_param_call],
+          [m4_ifset([b4_lex_param],
+	            [b4_remove_comma([$1],
+				     b4_param_calls(b4_lex_param))],
+	            [$1])])
+m4_define([b4_param_calls],
+	  [m4_map([b4_param_call], [$@])])
+m4_define([b4_param_call], [, $2])
+
+
+
+# b4_parse_param_cons
+# -------------------
+# Extra initialisations of the constructor.
+m4_define([b4_parse_param_cons],
+          [m4_ifset([b4_parse_param],
+		    [b4_constructor_calls(b4_parse_param)])])
+
+m4_define([b4_constructor_calls],
+	  [m4_map([b4_constructor_call], [$@])])
+m4_define([b4_constructor_call],
+	  [this.$2 = $2;
+	  ])
+
+
+
+# b4_parse_param_vars
+# -------------------
+# Extra instance variables.
+m4_define([b4_parse_param_vars],
+          [m4_ifset([b4_parse_param],
+		    [
+    /* User arguments.  */
+b4_var_decls(b4_parse_param)])])
+
+m4_define([b4_var_decls],
+	  [m4_map_sep([b4_var_decl], [
+], [$@])])
+m4_define([b4_var_decl],
+	  [    protected final $1;])
+
+
+
+# b4_maybe_throws(THROWS)
+# -----------------------
+# Expand to either an empty string or "throws THROWS".
+m4_define([b4_maybe_throws],
+	  [m4_ifval($1, [throws $1])])
Index: EcnlProtoTool/trunk/tools/share/bison/lalr1.cc
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/lalr1.cc	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/lalr1.cc	(revision 270)
@@ -0,0 +1,1157 @@
+# C++ skeleton for Bison
+
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+m4_include(b4_pkgdatadir/[c++.m4])
+
+m4_define([b4_parser_class_name],
+          [b4_percent_define_get([[parser_class_name]])])
+
+# The header is mandatory.
+b4_defines_if([],
+              [b4_fatal([b4_skeleton[: using %%defines is mandatory]])])
+
+# Backward compatibility.
+m4_define([b4_location_constructors])
+m4_include(b4_pkgdatadir/[location.cc])
+
+# We do want M4 expansion after # for CPP macros.
+m4_changecom()
+m4_divert_push(0)dnl
+b4_defines_if(
+[@output(b4_spec_defines_file@)
+b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++],
+             [2002, 2003, 2004, 2005, 2006, 2007, 2008])
+dnl FIXME: This is wrong, we want computed header guards.
+[
+/* C++ LALR(1) parser skeleton written by Akim Demaille.  */
+
+#ifndef PARSER_HEADER_H
+# define PARSER_HEADER_H
+
+]b4_percent_code_get([[requires]])[
+
+#include <string>
+#include <iostream>
+#include "stack.hh"
+
+]b4_namespace_open[
+  class position;
+  class location;
+]b4_namespace_close[
+
+#include "location.hh"
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG ]b4_debug_flag[
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE ]b4_error_verbose_flag[
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE ]b4_token_table[
+#endif
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)		\
+do {							\
+  if (N)						\
+    {							\
+      (Current).begin = (Rhs)[1].begin;			\
+      (Current).end   = (Rhs)[N].end;			\
+    }							\
+  else							\
+    {							\
+      (Current).begin = (Current).end = (Rhs)[0].end;	\
+    }							\
+} while (false)
+#endif
+
+]b4_namespace_open[
+
+  /// A Bison parser.
+  class ]b4_parser_class_name[
+  {
+  public:
+    /// Symbol semantic values.
+#ifndef YYSTYPE
+]m4_ifdef([b4_stype],
+[    union semantic_type
+    {
+b4_user_stype
+    };],
+[m4_if(b4_tag_seen_flag, 0,
+[[    typedef int semantic_type;]],
+[[    typedef YYSTYPE semantic_type;]])])[
+#else
+    typedef YYSTYPE semantic_type;
+#endif
+    /// Symbol locations.
+    typedef ]b4_percent_define_get([[location_type]])[ location_type;
+    /// Tokens.
+    struct token
+    {
+      ]b4_token_enums(b4_tokens)[
+    };
+    /// Token type.
+    typedef token::yytokentype token_type;
+
+    /// Build a parser object.
+    ]b4_parser_class_name[ (]b4_parse_param_decl[);
+    virtual ~]b4_parser_class_name[ ();
+
+    /// Parse.
+    /// \returns  0 iff parsing succeeded.
+    virtual int parse ();
+
+#if YYDEBUG
+    /// The current debugging stream.
+    std::ostream& debug_stream () const;
+    /// Set the current debugging stream.
+    void set_debug_stream (std::ostream &);
+
+    /// Type for debugging levels.
+    typedef int debug_level_type;
+    /// The current debugging level.
+    debug_level_type debug_level () const;
+    /// Set the current debugging level.
+    void set_debug_level (debug_level_type l);
+#endif
+
+  private:
+    /// Report a syntax error.
+    /// \param loc    where the syntax error is found.
+    /// \param msg    a description of the syntax error.
+    virtual void error (const location_type& loc, const std::string& msg);
+
+    /// Generate an error message.
+    /// \param state   the state where the error occurred.
+    /// \param tok     the lookahead token.
+    virtual std::string yysyntax_error_ (int yystate]dnl
+b4_error_verbose_if([, int tok])[);
+
+#if YYDEBUG
+    /// \brief Report a symbol value on the debug stream.
+    /// \param yytype       The token type.
+    /// \param yyvaluep     Its semantic value.
+    /// \param yylocationp  Its location.
+    virtual void yy_symbol_value_print_ (int yytype,
+					 const semantic_type* yyvaluep,
+					 const location_type* yylocationp);
+    /// \brief Report a symbol on the debug stream.
+    /// \param yytype       The token type.
+    /// \param yyvaluep     Its semantic value.
+    /// \param yylocationp  Its location.
+    virtual void yy_symbol_print_ (int yytype,
+				   const semantic_type* yyvaluep,
+				   const location_type* yylocationp);
+#endif
+
+
+    /// State numbers.
+    typedef int state_type;
+    /// State stack type.
+    typedef stack<state_type>    state_stack_type;
+    /// Semantic value stack type.
+    typedef stack<semantic_type> semantic_stack_type;
+    /// location stack type.
+    typedef stack<location_type> location_stack_type;
+
+    /// The state stack.
+    state_stack_type yystate_stack_;
+    /// The semantic value stack.
+    semantic_stack_type yysemantic_stack_;
+    /// The location stack.
+    location_stack_type yylocation_stack_;
+
+    /// Internal symbol numbers.
+    typedef ]b4_int_type_for([b4_translate])[ token_number_type;
+    /* Tables.  */
+    /// For a state, the index in \a yytable_ of its portion.
+    static const ]b4_int_type_for([b4_pact])[ yypact_[];
+    static const ]b4_int_type(b4_pact_ninf, b4_pact_ninf)[ yypact_ninf_;
+
+    /// For a state, default rule to reduce.
+    /// Unless\a  yytable_ specifies something else to do.
+    /// Zero means the default is an error.
+    static const ]b4_int_type_for([b4_defact])[ yydefact_[];
+
+    static const ]b4_int_type_for([b4_pgoto])[ yypgoto_[];
+    static const ]b4_int_type_for([b4_defgoto])[ yydefgoto_[];
+
+    /// What to do in a state.
+    /// \a yytable_[yypact_[s]]: what to do in state \a s.
+    /// - if positive, shift that token.
+    /// - if negative, reduce the rule which number is the opposite.
+    /// - if zero, do what YYDEFACT says.
+    static const ]b4_int_type_for([b4_table])[ yytable_[];
+    static const ]b4_int_type(b4_table_ninf, b4_table_ninf)[ yytable_ninf_;
+
+    static const ]b4_int_type_for([b4_check])[ yycheck_[];
+
+    /// For a state, its accessing symbol.
+    static const ]b4_int_type_for([b4_stos])[ yystos_[];
+
+    /// For a rule, its LHS.
+    static const ]b4_int_type_for([b4_r1])[ yyr1_[];
+    /// For a rule, its RHS length.
+    static const ]b4_int_type_for([b4_r2])[ yyr2_[];
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+    /// For a symbol, its name in clear.
+    static const char* const yytname_[];
+#endif
+
+#if YYERROR_VERBOSE
+    /// Convert the symbol name \a n to a form suitable for a diagnostic.
+    virtual std::string yytnamerr_ (const char *n);
+#endif
+
+#if YYDEBUG
+    /// A type to store symbol numbers and -1.
+    typedef ]b4_int_type_for([b4_rhs])[ rhs_number_type;
+    /// A `-1'-separated list of the rules' RHS.
+    static const rhs_number_type yyrhs_[];
+    /// For each rule, the index of the first RHS symbol in \a yyrhs_.
+    static const ]b4_int_type_for([b4_prhs])[ yyprhs_[];
+    /// For each rule, its source line number.
+    static const ]b4_int_type_for([b4_rline])[ yyrline_[];
+    /// For each scanner token number, its symbol number.
+    static const ]b4_int_type_for([b4_toknum])[ yytoken_number_[];
+    /// Report on the debug stream that the rule \a r is going to be reduced.
+    virtual void yy_reduce_print_ (int r);
+    /// Print the state stack on the debug stream.
+    virtual void yystack_print_ ();
+
+    /* Debugging.  */
+    int yydebug_;
+    std::ostream* yycdebug_;
+#endif
+
+    /// Convert a scanner token number \a t to a symbol number.
+    token_number_type yytranslate_ (int t);
+
+    /// \brief Reclaim the memory associated to a symbol.
+    /// \param yymsg        Why this token is reclaimed.
+    /// \param yytype       The symbol type.
+    /// \param yyvaluep     Its semantic value.
+    /// \param yylocationp  Its location.
+    inline void yydestruct_ (const char* yymsg,
+			     int yytype,
+			     semantic_type* yyvaluep,
+			     location_type* yylocationp);
+
+    /// Pop \a n symbols the three stacks.
+    inline void yypop_ (unsigned int n = 1);
+
+    /* Constants.  */
+    static const int yyeof_;
+    /* LAST_ -- Last index in TABLE_.  */
+    static const int yylast_;
+    static const int yynnts_;
+    static const int yyempty_;
+    static const int yyfinal_;
+    static const int yyterror_;
+    static const int yyerrcode_;
+    static const int yyntokens_;
+    static const unsigned int yyuser_token_number_max_;
+    static const token_number_type yyundef_token_;
+]b4_parse_param_vars[
+  };
+]b4_namespace_close[
+
+]b4_percent_define_flag_if([[global_tokens_and_yystype]],
+[b4_token_defines(b4_tokens)
+
+#ifndef YYSTYPE
+ /* Redirection for backward compatibility.  */
+# define YYSTYPE b4_namespace_ref::b4_parser_class_name::semantic_type
+#endif
+])
+b4_percent_code_get([[provides]])[]dnl
+
+[#endif /* ! defined PARSER_HEADER_H */]
+])dnl
+@output(b4_parser_file_name@)
+b4_copyright([Skeleton implementation for Bison LALR(1) parsers in C++],
+             [2002, 2003, 2004, 2005, 2006, 2007, 2008])
+b4_percent_code_get([[top]])[]dnl
+m4_if(b4_prefix, [yy], [],
+[
+// Take the name prefix into account.
+#define yylex   b4_prefix[]lex])[
+
+/* First part of user declarations.  */
+]b4_user_pre_prologue
+
+b4_defines_if([[
+#include "@basename(]b4_spec_defines_file[@)"]])[
+
+/* User implementation prologue.  */
+]b4_user_post_prologue
+b4_percent_code_get[]dnl
+
+[#ifndef YY_
+# if YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#define YYUSE(e) ((void) (e))
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+/* A pseudo ostream that takes yydebug_ into account.  */
+# define YYCDEBUG if (yydebug_) (*yycdebug_)
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)	\
+do {							\
+  if (yydebug_)						\
+    {							\
+      *yycdebug_ << Title << ' ';			\
+      yy_symbol_print_ ((Type), (Value), (Location));	\
+      *yycdebug_ << std::endl;				\
+    }							\
+} while (false)
+
+# define YY_REDUCE_PRINT(Rule)		\
+do {					\
+  if (yydebug_)				\
+    yy_reduce_print_ (Rule);		\
+} while (false)
+
+# define YY_STACK_PRINT()		\
+do {					\
+  if (yydebug_)				\
+    yystack_print_ ();			\
+} while (false)
+
+#else /* !YYDEBUG */
+
+# define YYCDEBUG if (false) std::cerr
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_REDUCE_PRINT(Rule)
+# define YY_STACK_PRINT()
+
+#endif /* !YYDEBUG */
+
+#define yyerrok		(yyerrstatus_ = 0)
+#define yyclearin	(yychar = yyempty_)
+
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT		goto yyabortlab
+#define YYERROR		goto yyerrorlab
+#define YYRECOVERING()  (!!yyerrstatus_)
+
+]b4_namespace_open[
+#if YYERROR_VERBOSE
+
+  /* Return YYSTR after stripping away unnecessary quotes and
+     backslashes, so that it's suitable for yyerror.  The heuristic is
+     that double-quoting is unnecessary unless the string contains an
+     apostrophe, a comma, or backslash (other than backslash-backslash).
+     YYSTR is taken from yytname.  */
+  std::string
+  ]b4_parser_class_name[::yytnamerr_ (const char *yystr)
+  {
+    if (*yystr == '"')
+      {
+        std::string yyr = "";
+        char const *yyp = yystr;
+
+        for (;;)
+          switch (*++yyp)
+            {
+            case '\'':
+            case ',':
+              goto do_not_strip_quotes;
+
+            case '\\':
+              if (*++yyp != '\\')
+                goto do_not_strip_quotes;
+              /* Fall through.  */
+            default:
+              yyr += *yyp;
+              break;
+
+            case '"':
+              return yyr;
+            }
+      do_not_strip_quotes: ;
+      }
+
+    return yystr;
+  }
+
+#endif
+
+  /// Build a parser object.
+  ]b4_parser_class_name::b4_parser_class_name[ (]b4_parse_param_decl[)]m4_ifset([b4_parse_param], [
+    :])[
+#if YYDEBUG
+    ]m4_ifset([b4_parse_param], [  ], [ :])[yydebug_ (false),
+      yycdebug_ (&std::cerr)]m4_ifset([b4_parse_param], [,])[
+#endif]b4_parse_param_cons[
+  {
+  }
+
+  ]b4_parser_class_name::~b4_parser_class_name[ ()
+  {
+  }
+
+#if YYDEBUG
+  /*--------------------------------.
+  | Print this symbol on YYOUTPUT.  |
+  `--------------------------------*/
+
+  inline void
+  ]b4_parser_class_name[::yy_symbol_value_print_ (int yytype,
+			   const semantic_type* yyvaluep, const location_type* yylocationp)
+  {
+    YYUSE (yylocationp);
+    YYUSE (yyvaluep);
+    switch (yytype)
+      {
+  ]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl
+[       default:
+	  break;
+      }
+  }
+
+
+  void
+  ]b4_parser_class_name[::yy_symbol_print_ (int yytype,
+			   const semantic_type* yyvaluep, const location_type* yylocationp)
+  {
+    *yycdebug_ << (yytype < yyntokens_ ? "token" : "nterm")
+	       << ' ' << yytname_[yytype] << " ("
+	       << *yylocationp << ": ";
+    yy_symbol_value_print_ (yytype, yyvaluep, yylocationp);
+    *yycdebug_ << ')';
+  }
+#endif
+
+  void
+  ]b4_parser_class_name[::yydestruct_ (const char* yymsg,
+			   int yytype, semantic_type* yyvaluep, location_type* yylocationp)
+  {
+    YYUSE (yylocationp);
+    YYUSE (yymsg);
+    YYUSE (yyvaluep);
+
+    YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+    switch (yytype)
+      {
+  ]m4_map([b4_symbol_actions], m4_defn([b4_symbol_destructors]))[
+	default:
+	  break;
+      }
+  }
+
+  void
+  ]b4_parser_class_name[::yypop_ (unsigned int n)
+  {
+    yystate_stack_.pop (n);
+    yysemantic_stack_.pop (n);
+    yylocation_stack_.pop (n);
+  }
+
+#if YYDEBUG
+  std::ostream&
+  ]b4_parser_class_name[::debug_stream () const
+  {
+    return *yycdebug_;
+  }
+
+  void
+  ]b4_parser_class_name[::set_debug_stream (std::ostream& o)
+  {
+    yycdebug_ = &o;
+  }
+
+
+  ]b4_parser_class_name[::debug_level_type
+  ]b4_parser_class_name[::debug_level () const
+  {
+    return yydebug_;
+  }
+
+  void
+  ]b4_parser_class_name[::set_debug_level (debug_level_type l)
+  {
+    yydebug_ = l;
+  }
+#endif
+
+  int
+  ]b4_parser_class_name[::parse ()
+  {
+    /// Lookahead and lookahead in internal form.
+    int yychar = yyempty_;
+    int yytoken = 0;
+
+    /* State.  */
+    int yyn;
+    int yylen = 0;
+    int yystate = 0;
+
+    /* Error handling.  */
+    int yynerrs_ = 0;
+    int yyerrstatus_ = 0;
+
+    /// Semantic value of the lookahead.
+    semantic_type yylval;
+    /// Location of the lookahead.
+    location_type yylloc;
+    /// The locations where the error started and ended.
+    location_type yyerror_range[2];
+
+    /// $$.
+    semantic_type yyval;
+    /// @@$.
+    location_type yyloc;
+
+    int yyresult;
+
+    YYCDEBUG << "Starting parse" << std::endl;
+
+]m4_ifdef([b4_initial_action], [
+m4_pushdef([b4_at_dollar],     [yylloc])dnl
+m4_pushdef([b4_dollar_dollar], [yylval])dnl
+    /* User initialization code.  */
+    b4_user_initial_action
+m4_popdef([b4_dollar_dollar])dnl
+m4_popdef([b4_at_dollar])])dnl
+
+  [  /* Initialize the stacks.  The initial state will be pushed in
+       yynewstate, since the latter expects the semantical and the
+       location values to have been already stored, initialize these
+       stacks with a primary value.  */
+    yystate_stack_ = state_stack_type (0);
+    yysemantic_stack_ = semantic_stack_type (0);
+    yylocation_stack_ = location_stack_type (0);
+    yysemantic_stack_.push (yylval);
+    yylocation_stack_.push (yylloc);
+
+    /* New state.  */
+  yynewstate:
+    yystate_stack_.push (yystate);
+    YYCDEBUG << "Entering state " << yystate << std::endl;
+
+    /* Accept?  */
+    if (yystate == yyfinal_)
+      goto yyacceptlab;
+
+    goto yybackup;
+
+    /* Backup.  */
+  yybackup:
+
+    /* Try to take a decision without lookahead.  */
+    yyn = yypact_[yystate];
+    if (yyn == yypact_ninf_)
+      goto yydefault;
+
+    /* Read a lookahead token.  */
+    if (yychar == yyempty_)
+      {
+	YYCDEBUG << "Reading a token: ";
+	yychar = ]b4_c_function_call([yylex], [int],
+				     [[YYSTYPE*], [&yylval]][]dnl
+b4_locations_if([, [[location*], [&yylloc]]])dnl
+m4_ifdef([b4_lex_param], [, ]b4_lex_param))[;
+      }
+
+
+    /* Convert token to internal form.  */
+    if (yychar <= yyeof_)
+      {
+	yychar = yytoken = yyeof_;
+	YYCDEBUG << "Now at end of input." << std::endl;
+      }
+    else
+      {
+	yytoken = yytranslate_ (yychar);
+	YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+      }
+
+    /* If the proper action on seeing token YYTOKEN is to reduce or to
+       detect an error, take that action.  */
+    yyn += yytoken;
+    if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken)
+      goto yydefault;
+
+    /* Reduce or error.  */
+    yyn = yytable_[yyn];
+    if (yyn <= 0)
+      {
+	if (yyn == 0 || yyn == yytable_ninf_)
+	goto yyerrlab;
+	yyn = -yyn;
+	goto yyreduce;
+      }
+
+    /* Shift the lookahead token.  */
+    YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+    /* Discard the token being shifted.  */
+    yychar = yyempty_;
+
+    yysemantic_stack_.push (yylval);
+    yylocation_stack_.push (yylloc);
+
+    /* Count tokens shifted since error; after three, turn off error
+       status.  */
+    if (yyerrstatus_)
+      --yyerrstatus_;
+
+    yystate = yyn;
+    goto yynewstate;
+
+  /*-----------------------------------------------------------.
+  | yydefault -- do the default action for the current state.  |
+  `-----------------------------------------------------------*/
+  yydefault:
+    yyn = yydefact_[yystate];
+    if (yyn == 0)
+      goto yyerrlab;
+    goto yyreduce;
+
+  /*-----------------------------.
+  | yyreduce -- Do a reduction.  |
+  `-----------------------------*/
+  yyreduce:
+    yylen = yyr2_[yyn];
+    /* If YYLEN is nonzero, implement the default value of the action:
+       `$$ = $1'.  Otherwise, use the top of the stack.
+
+       Otherwise, the following line sets YYVAL to garbage.
+       This behavior is undocumented and Bison
+       users should not rely upon it.  */
+    if (yylen)
+      yyval = yysemantic_stack_[yylen - 1];
+    else
+      yyval = yysemantic_stack_[0];
+
+    {
+      slice<location_type, location_stack_type> slice (yylocation_stack_, yylen);
+      YYLLOC_DEFAULT (yyloc, slice, yylen);
+    }
+    YY_REDUCE_PRINT (yyn);
+    switch (yyn)
+      {
+	]b4_user_actions[
+	default:
+          break;
+      }
+    YY_SYMBOL_PRINT ("-> $$ =", yyr1_[yyn], &yyval, &yyloc);
+
+    yypop_ (yylen);
+    yylen = 0;
+    YY_STACK_PRINT ();
+
+    yysemantic_stack_.push (yyval);
+    yylocation_stack_.push (yyloc);
+
+    /* Shift the result of the reduction.  */
+    yyn = yyr1_[yyn];
+    yystate = yypgoto_[yyn - yyntokens_] + yystate_stack_[0];
+    if (0 <= yystate && yystate <= yylast_
+	&& yycheck_[yystate] == yystate_stack_[0])
+      yystate = yytable_[yystate];
+    else
+      yystate = yydefgoto_[yyn - yyntokens_];
+    goto yynewstate;
+
+  /*------------------------------------.
+  | yyerrlab -- here on detecting error |
+  `------------------------------------*/
+  yyerrlab:
+    /* If not already recovering from an error, report this error.  */
+    if (!yyerrstatus_)
+      {
+	++yynerrs_;
+	error (yylloc, yysyntax_error_ (yystate]dnl
+b4_error_verbose_if([, yytoken])[));
+      }
+
+    yyerror_range[0] = yylloc;
+    if (yyerrstatus_ == 3)
+      {
+	/* If just tried and failed to reuse lookahead token after an
+	 error, discard it.  */
+
+	if (yychar <= yyeof_)
+	  {
+	  /* Return failure if at end of input.  */
+	  if (yychar == yyeof_)
+	    YYABORT;
+	  }
+	else
+	  {
+	    yydestruct_ ("Error: discarding", yytoken, &yylval, &yylloc);
+	    yychar = yyempty_;
+	  }
+      }
+
+    /* Else will try to reuse lookahead token after shifting the error
+       token.  */
+    goto yyerrlab1;
+
+
+  /*---------------------------------------------------.
+  | yyerrorlab -- error raised explicitly by YYERROR.  |
+  `---------------------------------------------------*/
+  yyerrorlab:
+
+    /* Pacify compilers like GCC when the user code never invokes
+       YYERROR and the label yyerrorlab therefore never appears in user
+       code.  */
+    if (false)
+      goto yyerrorlab;
+
+    yyerror_range[0] = yylocation_stack_[yylen - 1];
+    /* Do not reclaim the symbols of the rule which action triggered
+       this YYERROR.  */
+    yypop_ (yylen);
+    yylen = 0;
+    yystate = yystate_stack_[0];
+    goto yyerrlab1;
+
+  /*-------------------------------------------------------------.
+  | yyerrlab1 -- common code for both syntax error and YYERROR.  |
+  `-------------------------------------------------------------*/
+  yyerrlab1:
+    yyerrstatus_ = 3;	/* Each real token shifted decrements this.  */
+
+    for (;;)
+      {
+	yyn = yypact_[yystate];
+	if (yyn != yypact_ninf_)
+	{
+	  yyn += yyterror_;
+	  if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)
+	    {
+	      yyn = yytable_[yyn];
+	      if (0 < yyn)
+		break;
+	    }
+	}
+
+	/* Pop the current state because it cannot handle the error token.  */
+	if (yystate_stack_.height () == 1)
+	YYABORT;
+
+	yyerror_range[0] = yylocation_stack_[0];
+	yydestruct_ ("Error: popping",
+		     yystos_[yystate],
+		     &yysemantic_stack_[0], &yylocation_stack_[0]);
+	yypop_ ();
+	yystate = yystate_stack_[0];
+	YY_STACK_PRINT ();
+      }
+
+    yyerror_range[1] = yylloc;
+    // Using YYLLOC is tempting, but would change the location of
+    // the lookahead.  YYLOC is available though.
+    YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
+    yysemantic_stack_.push (yylval);
+    yylocation_stack_.push (yyloc);
+
+    /* Shift the error token.  */
+    YY_SYMBOL_PRINT ("Shifting", yystos_[yyn],
+		     &yysemantic_stack_[0], &yylocation_stack_[0]);
+
+    yystate = yyn;
+    goto yynewstate;
+
+    /* Accept.  */
+  yyacceptlab:
+    yyresult = 0;
+    goto yyreturn;
+
+    /* Abort.  */
+  yyabortlab:
+    yyresult = 1;
+    goto yyreturn;
+
+  yyreturn:
+    if (yychar != yyempty_)
+      yydestruct_ ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc);
+
+    /* Do not reclaim the symbols of the rule which action triggered
+       this YYABORT or YYACCEPT.  */
+    yypop_ (yylen);
+    while (yystate_stack_.height () != 1)
+      {
+	yydestruct_ ("Cleanup: popping",
+		   yystos_[yystate_stack_[0]],
+		   &yysemantic_stack_[0],
+		   &yylocation_stack_[0]);
+	yypop_ ();
+      }
+
+    return yyresult;
+  }
+
+  // Generate an error message.
+  std::string
+  ]b4_parser_class_name[::yysyntax_error_ (int yystate]dnl
+b4_error_verbose_if([, int tok])[)
+  {
+    std::string res;
+    YYUSE (yystate);
+#if YYERROR_VERBOSE
+    int yyn = yypact_[yystate];
+    if (yypact_ninf_ < yyn && yyn <= yylast_)
+      {
+	/* Start YYX at -YYN if negative to avoid negative indexes in
+	   YYCHECK.  */
+	int yyxbegin = yyn < 0 ? -yyn : 0;
+
+	/* Stay within bounds of both yycheck and yytname.  */
+	int yychecklim = yylast_ - yyn + 1;
+	int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
+	int count = 0;
+	for (int x = yyxbegin; x < yyxend; ++x)
+	  if (yycheck_[x + yyn] == x && x != yyterror_)
+	    ++count;
+
+	// FIXME: This method of building the message is not compatible
+	// with internationalization.  It should work like yacc.c does it.
+	// That is, first build a string that looks like this:
+	// "syntax error, unexpected %s or %s or %s"
+	// Then, invoke YY_ on this string.
+	// Finally, use the string as a format to output
+	// yytname_[tok], etc.
+	// Until this gets fixed, this message appears in English only.
+	res = "syntax error, unexpected ";
+	res += yytnamerr_ (yytname_[tok]);
+	if (count < 5)
+	  {
+	    count = 0;
+	    for (int x = yyxbegin; x < yyxend; ++x)
+	      if (yycheck_[x + yyn] == x && x != yyterror_)
+		{
+		  res += (!count++) ? ", expecting " : " or ";
+		  res += yytnamerr_ (yytname_[x]);
+		}
+	  }
+      }
+    else
+#endif
+      res = YY_("syntax error");
+    return res;
+  }
+
+
+  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+     STATE-NUM.  */
+  const ]b4_int_type(b4_pact_ninf, b4_pact_ninf) b4_parser_class_name::yypact_ninf_ = b4_pact_ninf[;
+  const ]b4_int_type_for([b4_pact])[
+  ]b4_parser_class_name[::yypact_[] =
+  {
+    ]b4_pact[
+  };
+
+  /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
+     doesn't specify something else to do.  Zero means the default is an
+     error.  */
+  const ]b4_int_type_for([b4_defact])[
+  ]b4_parser_class_name[::yydefact_[] =
+  {
+    ]b4_defact[
+  };
+
+  /* YYPGOTO[NTERM-NUM].  */
+  const ]b4_int_type_for([b4_pgoto])[
+  ]b4_parser_class_name[::yypgoto_[] =
+  {
+    ]b4_pgoto[
+  };
+
+  /* YYDEFGOTO[NTERM-NUM].  */
+  const ]b4_int_type_for([b4_defgoto])[
+  ]b4_parser_class_name[::yydefgoto_[] =
+  {
+    ]b4_defgoto[
+  };
+
+  /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+     positive, shift that token.  If negative, reduce the rule which
+     number is the opposite.  If zero, do what YYDEFACT says.  */
+  const ]b4_int_type(b4_table_ninf, b4_table_ninf) b4_parser_class_name::yytable_ninf_ = b4_table_ninf[;
+  const ]b4_int_type_for([b4_table])[
+  ]b4_parser_class_name[::yytable_[] =
+  {
+    ]b4_table[
+  };
+
+  /* YYCHECK.  */
+  const ]b4_int_type_for([b4_check])[
+  ]b4_parser_class_name[::yycheck_[] =
+  {
+    ]b4_check[
+  };
+
+  /* STOS_[STATE-NUM] -- The (internal number of the) accessing
+     symbol of state STATE-NUM.  */
+  const ]b4_int_type_for([b4_stos])[
+  ]b4_parser_class_name[::yystos_[] =
+  {
+    ]b4_stos[
+  };
+
+#if YYDEBUG
+  /* TOKEN_NUMBER_[YYLEX-NUM] -- Internal symbol number corresponding
+     to YYLEX-NUM.  */
+  const ]b4_int_type_for([b4_toknum])[
+  ]b4_parser_class_name[::yytoken_number_[] =
+  {
+    ]b4_toknum[
+  };
+#endif
+
+  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+  const ]b4_int_type_for([b4_r1])[
+  ]b4_parser_class_name[::yyr1_[] =
+  {
+    ]b4_r1[
+  };
+
+  /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+  const ]b4_int_type_for([b4_r2])[
+  ]b4_parser_class_name[::yyr2_[] =
+  {
+    ]b4_r2[
+  };
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+  /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+     First, the terminals, then, starting at \a yyntokens_, nonterminals.  */
+  const char*
+  const ]b4_parser_class_name[::yytname_[] =
+  {
+    ]b4_tname[
+  };
+#endif
+
+#if YYDEBUG
+  /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+  const ]b4_parser_class_name[::rhs_number_type
+  ]b4_parser_class_name[::yyrhs_[] =
+  {
+    ]b4_rhs[
+  };
+
+  /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+     YYRHS.  */
+  const ]b4_int_type_for([b4_prhs])[
+  ]b4_parser_class_name[::yyprhs_[] =
+  {
+    ]b4_prhs[
+  };
+
+  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
+  const ]b4_int_type_for([b4_rline])[
+  ]b4_parser_class_name[::yyrline_[] =
+  {
+    ]b4_rline[
+  };
+
+  // Print the state stack on the debug stream.
+  void
+  ]b4_parser_class_name[::yystack_print_ ()
+  {
+    *yycdebug_ << "Stack now";
+    for (state_stack_type::const_iterator i = yystate_stack_.begin ();
+	 i != yystate_stack_.end (); ++i)
+      *yycdebug_ << ' ' << *i;
+    *yycdebug_ << std::endl;
+  }
+
+  // Report on the debug stream that the rule \a yyrule is going to be reduced.
+  void
+  ]b4_parser_class_name[::yy_reduce_print_ (int yyrule)
+  {
+    unsigned int yylno = yyrline_[yyrule];
+    int yynrhs = yyr2_[yyrule];
+    /* Print the symbols being reduced, and their result.  */
+    *yycdebug_ << "Reducing stack by rule " << yyrule - 1
+	       << " (line " << yylno << "):" << std::endl;
+    /* The symbols being reduced.  */
+    for (int yyi = 0; yyi < yynrhs; yyi++)
+      YY_SYMBOL_PRINT ("   $" << yyi + 1 << " =",
+		       yyrhs_[yyprhs_[yyrule] + yyi],
+		       &]b4_rhs_value(yynrhs, yyi + 1)[,
+		       &]b4_rhs_location(yynrhs, yyi + 1)[);
+  }
+#endif // YYDEBUG
+
+  /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+  ]b4_parser_class_name[::token_number_type
+  ]b4_parser_class_name[::yytranslate_ (int t)
+  {
+    static
+    const token_number_type
+    translate_table[] =
+    {
+      ]b4_translate[
+    };
+    if ((unsigned int) t <= yyuser_token_number_max_)
+      return translate_table[t];
+    else
+      return yyundef_token_;
+  }
+
+  const int ]b4_parser_class_name[::yyeof_ = 0;
+  const int ]b4_parser_class_name[::yylast_ = ]b4_last[;
+  const int ]b4_parser_class_name[::yynnts_ = ]b4_nterms_number[;
+  const int ]b4_parser_class_name[::yyempty_ = -2;
+  const int ]b4_parser_class_name[::yyfinal_ = ]b4_final_state_number[;
+  const int ]b4_parser_class_name[::yyterror_ = 1;
+  const int ]b4_parser_class_name[::yyerrcode_ = 256;
+  const int ]b4_parser_class_name[::yyntokens_ = ]b4_tokens_number[;
+
+  const unsigned int ]b4_parser_class_name[::yyuser_token_number_max_ = ]b4_user_token_number_max[;
+  const ]b4_parser_class_name[::token_number_type ]b4_parser_class_name[::yyundef_token_ = ]b4_undef_token_number[;
+
+]b4_namespace_close[
+
+]b4_epilogue
+dnl
+@output(b4_dir_prefix[]stack.hh@)
+b4_copyright([Stack handling for Bison parsers in C++],
+             [2002, 2003, 2004, 2005, 2006, 2007, 2008])[
+
+#ifndef BISON_STACK_HH
+# define BISON_STACK_HH
+
+#include <deque>
+
+]b4_namespace_open[
+  template <class T, class S = std::deque<T> >
+  class stack
+  {
+  public:
+
+    // Hide our reversed order.
+    typedef typename S::reverse_iterator iterator;
+    typedef typename S::const_reverse_iterator const_iterator;
+
+    stack () : seq_ ()
+    {
+    }
+
+    stack (unsigned int n) : seq_ (n)
+    {
+    }
+
+    inline
+    T&
+    operator [] (unsigned int i)
+    {
+      return seq_[i];
+    }
+
+    inline
+    const T&
+    operator [] (unsigned int i) const
+    {
+      return seq_[i];
+    }
+
+    inline
+    void
+    push (const T& t)
+    {
+      seq_.push_front (t);
+    }
+
+    inline
+    void
+    pop (unsigned int n = 1)
+    {
+      for (; n; --n)
+	seq_.pop_front ();
+    }
+
+    inline
+    unsigned int
+    height () const
+    {
+      return seq_.size ();
+    }
+
+    inline const_iterator begin () const { return seq_.rbegin (); }
+    inline const_iterator end () const { return seq_.rend (); }
+
+  private:
+
+    S seq_;
+  };
+
+  /// Present a slice of the top of a stack.
+  template <class T, class S = stack<T> >
+  class slice
+  {
+  public:
+
+    slice (const S& stack,
+	   unsigned int range) : stack_ (stack),
+				 range_ (range)
+    {
+    }
+
+    inline
+    const T&
+    operator [] (unsigned int i) const
+    {
+      return stack_[range_ - i];
+    }
+
+  private:
+
+    const S& stack_;
+    unsigned int range_;
+  };
+]b4_namespace_close[
+
+#endif // not BISON_STACK_HH[]dnl
+]
+m4_divert_pop(0)
Index: EcnlProtoTool/trunk/tools/share/bison/lalr1.java
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/lalr1.java	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/lalr1.java	(revision 270)
@@ -0,0 +1,880 @@
+# Java skeleton for Bison -*- autoconf -*-
+
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+m4_include(b4_pkgdatadir/[java.m4])
+
+b4_defines_if([b4_fatal([%s: %%defines does not make sense in Java], [b4_skeleton])])
+m4_ifval(m4_defn([b4_symbol_destructors]),
+        [b4_fatal([%s: %%destructor does not make sense in Java], [b4_skeleton])],
+        [])
+
+m4_divert_push(0)dnl
+@output(b4_parser_file_name@)
+b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java],
+  [2007, 2008])
+
+b4_percent_define_ifdef([package], [package b4_percent_define_get([package]);
+])[/* First part of user declarations.  */
+]b4_pre_prologue
+b4_percent_code_get([[imports]])
+[/**
+ * A Bison parser, automatically generated from <tt>]m4_bpatsubst(b4_file_name, [^"\(.*\)"$], [\1])[</tt>.
+ *
+ * @@author LALR (1) parser skeleton written by Paolo Bonzini.
+ */
+]b4_public_if([public ])dnl
+b4_abstract_if([abstract ])dnl
+b4_final_if([final ])dnl
+b4_strictfp_if([strictfp ])dnl
+[class ]b4_parser_class_name[]dnl
+b4_percent_define_get3([extends], [ extends ])dnl
+b4_percent_define_get3([implements], [ implements ])[
+{
+  ]b4_identification[
+
+  /** True if verbose error messages are enabled.  */
+  public boolean errorVerbose = ]b4_flag_value([error_verbose]);
+
+b4_locations_if([[
+  /**
+   * A class defining a pair of positions.  Positions, defined by the
+   * <code>]b4_position_type[</code> class, denote a point in the input.
+   * Locations represent a part of the input through the beginning
+   * and ending positions.  */
+  public class ]b4_location_type[ {
+    /** The first, inclusive, position in the range.  */
+    public ]b4_position_type[ begin;
+
+    /** The first position beyond the range.  */
+    public ]b4_position_type[ end;
+
+    /**
+     * Create a <code>]b4_location_type[</code> denoting an empty range located at
+     * a given point.
+     * @@param loc The position at which the range is anchored.  */
+    public ]b4_location_type[ (]b4_position_type[ loc) {
+      this.begin = this.end = loc;
+    }
+
+    /**
+     * Create a <code>]b4_location_type[</code> from the endpoints of the range.
+     * @@param begin The first position included in the range.
+     * @@param end   The first position beyond the range.  */
+    public ]b4_location_type[ (]b4_position_type[ begin, ]b4_position_type[ end) {
+      this.begin = begin;
+      this.end = end;
+    }
+
+    /**
+     * Print a representation of the location.  For this to be correct,
+     * <code>]b4_position_type[</code> should override the <code>equals</code>
+     * method.  */
+    public String toString () {
+      if (begin.equals (end))
+        return begin.toString ();
+      else
+        return begin.toString () + "-" + end.toString ();
+    }
+  }
+
+]])
+
+[  /** Token returned by the scanner to signal the end of its input.  */
+  public static final int EOF = 0;]
+
+b4_token_enums(b4_tokens)
+
+  b4_locations_if([[
+  private ]b4_location_type[ yylloc (YYStack rhs, int n)
+  {
+    if (n > 0)
+      return new ]b4_location_type[ (rhs.locationAt (1).begin, rhs.locationAt (n).end);
+    else
+      return new ]b4_location_type[ (rhs.locationAt (0).end);
+  }]])[
+
+  /**
+   * Communication interface between the scanner and the Bison-generated
+   * parser <tt>]b4_parser_class_name[</tt>.
+   */
+  public interface Lexer {
+    ]b4_locations_if([[/**
+     * Method to retrieve the beginning position of the last scanned token.
+     * @@return the position at which the last scanned token starts.  */
+    ]b4_position_type[ getStartPos ();
+
+    /**
+     * Method to retrieve the ending position of the last scanned token.
+     * @@return the first position beyond the last scanned token.  */
+    ]b4_position_type[ getEndPos ();]])[
+
+    /**
+     * Method to retrieve the semantic value of the last scanned token.
+     * @@return the semantic value of the last scanned token.  */
+    ]b4_yystype[ getLVal ();
+
+    /**
+     * Entry point for the scanner.  Returns the token identifier corresponding
+     * to the next token and prepares to return the semantic value
+     * ]b4_locations_if([and beginning/ending positions ])[of the token. 
+     * @@return the token identifier corresponding to the next token. */
+    int yylex () ]b4_maybe_throws([b4_lex_throws])[;
+
+    /**
+     * Entry point for error reporting.  Emits an error
+     * ]b4_locations_if([referring to the given location ])[in a user-defined way.
+     *
+     * ]b4_locations_if([[@@param loc The location of the element to which the
+     *                error message is related]])[
+     * @@param s The string for the error message.  */
+     void yyerror (]b4_locations_if([b4_location_type[ loc, ]])[String s);]
+  }
+
+  b4_lexer_if([[private class YYLexer implements Lexer {
+]b4_percent_code_get([[lexer]])[
+  }
+
+  ]])[/** The object doing lexical analysis for us.  */
+  private Lexer yylexer;
+  ]
+  b4_parse_param_vars
+
+b4_lexer_if([[
+  /**
+   * Instantiates the Bison-generated parser.
+   */
+  public ]b4_parser_class_name (b4_parse_param_decl([b4_lex_param_decl])[) {
+    this.yylexer = new YYLexer(]b4_lex_param_call[);
+    ]b4_parse_param_cons[
+  }
+]])
+
+  /**
+   * Instantiates the Bison-generated parser.
+   * @@param yylexer The scanner that will supply tokens to the parser.
+   */
+  b4_lexer_if([[protected]], [[public]]) b4_parser_class_name[ (]b4_parse_param_decl([[Lexer yylexer]])[) {
+    this.yylexer = yylexer;
+    ]b4_parse_param_cons[
+  }
+
+  private java.io.PrintStream yyDebugStream = System.err;
+
+  /**
+   * Return the <tt>PrintStream</tt> on which the debugging output is
+   * printed.
+   */
+  public final java.io.PrintStream getDebugStream () { return yyDebugStream; }
+
+  /**
+   * Set the <tt>PrintStream</tt> on which the debug output is printed.
+   * @@param s The stream that is used for debugging output.
+   */
+  public final void setDebugStream(java.io.PrintStream s) { yyDebugStream = s; }
+
+  private int yydebug = 0;
+
+  /**
+   * Answer the verbosity of the debugging output; 0 means that all kinds of
+   * output from the parser are suppressed.
+   */
+  public final int getDebugLevel() { return yydebug; }
+
+  /**
+   * Set the verbosity of the debugging output; 0 means that all kinds of
+   * output from the parser are suppressed.
+   * @@param level The verbosity level for debugging output.
+   */
+  public final void setDebugLevel(int level) { yydebug = level; }
+
+  private final int yylex () ]b4_maybe_throws([b4_lex_throws]) [{
+    return yylexer.yylex ();
+  }
+  protected final void yyerror (]b4_locations_if([b4_location_type[ loc, ]])[String s) {
+    yylexer.yyerror (]b4_locations_if([loc, ])[s);
+  }
+
+  ]b4_locations_if([
+  protected final void yyerror (String s) {
+    yylexer.yyerror ((]b4_location_type[)null, s);
+  }
+  protected final void yyerror (]b4_position_type[ loc, String s) {
+    yylexer.yyerror (new ]b4_location_type[ (loc), s);
+  }])
+
+  [protected final void yycdebug (String s) {
+    if (yydebug > 0)
+      yyDebugStream.println (s);
+  }
+
+  private final class YYStack {
+    private int[] stateStack = new int[16];
+    ]b4_locations_if([[private ]b4_location_type[[] locStack = new ]b4_location_type[[16];]])[
+    private ]b4_yystype[[] valueStack = new ]b4_yystype[[16];
+
+    public int size = 16;
+    public int height = -1;
+    
+    public final void push (int state, ]b4_yystype[ value]dnl
+    	   	      	    b4_locations_if([, ]b4_location_type[ loc])[) {
+      height++;
+      if (size == height) 
+        {
+	  int[] newStateStack = new int[size * 2];
+	  System.arraycopy (stateStack, 0, newStateStack, 0, height);
+	  stateStack = newStateStack;
+	  ]b4_locations_if([[
+	  ]b4_location_type[[] newLocStack = new ]b4_location_type[[size * 2];
+	  System.arraycopy (locStack, 0, newLocStack, 0, height);
+	  locStack = newLocStack;]])
+	  
+	  b4_yystype[[] newValueStack = new ]b4_yystype[[size * 2];
+	  System.arraycopy (valueStack, 0, newValueStack, 0, height);
+	  valueStack = newValueStack;
+
+	  size *= 2;
+	}
+
+      stateStack[height] = state;
+      ]b4_locations_if([[locStack[height] = loc;]])[
+      valueStack[height] = value;
+    }
+
+    public final void pop () {
+      height--;
+    }
+
+    public final void pop (int num) {
+      // Avoid memory leaks... garbage collection is a white lie!
+      if (num > 0) {
+	java.util.Arrays.fill (valueStack, height - num + 1, height, null);
+        ]b4_locations_if([[java.util.Arrays.fill (locStack, height - num + 1, height, null);]])[
+      }
+      height -= num;
+    }
+
+    public final int stateAt (int i) {
+      return stateStack[height - i];
+    }
+
+    ]b4_locations_if([[public final ]b4_location_type[ locationAt (int i) {
+      return locStack[height - i];
+    }
+
+    ]])[public final ]b4_yystype[ valueAt (int i) {
+      return valueStack[height - i];
+    }
+
+    // Print the state stack on the debug stream.
+    public void print (java.io.PrintStream out)
+    {
+      out.print ("Stack now");
+      
+      for (int i = 0; i < height; i++)
+        {
+	  out.print (' ');
+	  out.print (stateStack[i]);
+        }
+      out.println ();
+    }
+  }
+
+  /**
+   * Returned by a Bison action in order to stop the parsing process and
+   * return success (<tt>true</tt>).  */
+  public static final int YYACCEPT = 0;
+
+  /**
+   * Returned by a Bison action in order to stop the parsing process and
+   * return failure (<tt>false</tt>).  */
+  public static final int YYABORT = 1;
+
+  /**
+   * Returned by a Bison action in order to start error recovery without
+   * printing an error message.  */
+  public static final int YYERROR = 2;
+
+  /**
+   * Returned by a Bison action in order to print an error message and start
+   * error recovery.  */
+  public static final int YYFAIL = 3;
+
+  private static final int YYNEWSTATE = 4;
+  private static final int YYDEFAULT = 5;
+  private static final int YYREDUCE = 6;
+  private static final int YYERRLAB1 = 7;
+  private static final int YYRETURN = 8;
+
+  private int yyerrstatus_ = 0;
+
+  /**
+   * Return whether error recovery is being done.  In this state, the parser
+   * reads token until it reaches a known state, and then restarts normal
+   * operation.  */
+  public final boolean recovering ()
+  {
+    return yyerrstatus_ == 0;
+  }
+
+  private int yyaction (int yyn, YYStack yystack, int yylen) ]b4_maybe_throws([b4_throws])[
+  {
+    ]b4_yystype[ yyval;
+    ]b4_locations_if([b4_location_type[ yyloc = yylloc (yystack, yylen);]])[
+
+    /* If YYLEN is nonzero, implement the default value of the action:
+       `$$ = $1'.  Otherwise, use the top of the stack.
+    
+       Otherwise, the following line sets YYVAL to garbage.
+       This behavior is undocumented and Bison
+       users should not rely upon it.  */
+    if (yylen > 0)
+      yyval = yystack.valueAt (yylen - 1);
+    else
+      yyval = yystack.valueAt (0);
+    
+    yy_reduce_print (yyn, yystack);
+
+    switch (yyn)
+      {
+	]b4_user_actions[
+	default: break;
+      }
+
+    yy_symbol_print ("-> $$ =", yyr1_[yyn], yyval]b4_locations_if([, yyloc])[);
+
+    yystack.pop (yylen);
+    yylen = 0;
+
+    /* Shift the result of the reduction.  */
+    yyn = yyr1_[yyn];
+    int yystate = yypgoto_[yyn - yyntokens_] + yystack.stateAt (0);
+    if (0 <= yystate && yystate <= yylast_
+	&& yycheck_[yystate] == yystack.stateAt (0))
+      yystate = yytable_[yystate];
+    else
+      yystate = yydefgoto_[yyn - yyntokens_];
+
+    yystack.push (yystate, yyval]b4_locations_if([, yyloc])[);
+    return YYNEWSTATE;
+  }
+
+  /* Return YYSTR after stripping away unnecessary quotes and
+     backslashes, so that it's suitable for yyerror.  The heuristic is
+     that double-quoting is unnecessary unless the string contains an
+     apostrophe, a comma, or backslash (other than backslash-backslash).
+     YYSTR is taken from yytname.  */
+  private final String yytnamerr_ (String yystr)
+  {
+    if (yystr.charAt (0) == '"')
+      {
+        StringBuffer yyr = new StringBuffer ();
+        strip_quotes: for (int i = 1; i < yystr.length (); i++)
+          switch (yystr.charAt (i))
+            {
+            case '\'':
+            case ',':
+              break strip_quotes;
+
+            case '\\':
+	      if (yystr.charAt(++i) != '\\')
+                break strip_quotes;
+              /* Fall through.  */
+            default:
+              yyr.append (yystr.charAt (i));
+              break;
+
+            case '"':
+              return yyr.toString ();
+            }
+      }
+    else if (yystr.equals ("$end"))
+      return "end of input";
+
+    return yystr;
+  }
+
+  /*--------------------------------.
+  | Print this symbol on YYOUTPUT.  |
+  `--------------------------------*/
+
+  private void yy_symbol_print (String s, int yytype,
+			         ]b4_yystype[ yyvaluep]dnl
+				 b4_locations_if([, Object yylocationp])[)
+  {
+    if (yydebug > 0)
+    yycdebug (s + (yytype < yyntokens_ ? " token " : " nterm ")
+	      + yytname_[yytype] + " ("]b4_locations_if([
+	      + yylocationp + ": "])[
+	      + (yyvaluep == null ? "(null)" : yyvaluep.toString ()) + ")");
+  }
+
+  /**
+   * Parse input from the scanner that was specified at object construction
+   * time.  Return whether the end of the input was reached successfully.
+   *
+   * @@return <tt>true</tt> if the parsing succeeds.  Note that this does not
+   *          imply that there were no syntax errors.
+   */
+  public boolean parse () ]b4_maybe_throws([b4_list2([b4_lex_throws], [b4_throws])])[
+  {
+    /// Lookahead and lookahead in internal form.
+    int yychar = yyempty_;
+    int yytoken = 0;
+
+    /* State.  */
+    int yyn = 0;
+    int yylen = 0;
+    int yystate = 0;
+
+    YYStack yystack = new YYStack ();
+
+    /* Error handling.  */
+    int yynerrs_ = 0;
+    ]b4_locations_if([/// The location where the error started.
+    ]b4_location_type[ yyerrloc = null;
+
+    /// ]b4_location_type[ of the lookahead.
+    ]b4_location_type[ yylloc = new ]b4_location_type[ (null, null);
+
+    /// @@$.
+    ]b4_location_type[ yyloc;])
+
+    /// Semantic value of the lookahead.
+    b4_yystype[ yylval = null;
+
+    int yyresult;
+
+    yycdebug ("Starting parse\n");
+    yyerrstatus_ = 0;
+
+]m4_ifdef([b4_initial_action], [
+m4_pushdef([b4_at_dollar],     [yylloc])dnl
+m4_pushdef([b4_dollar_dollar], [yylval])dnl
+    /* User initialization code.  */
+    b4_user_initial_action
+m4_popdef([b4_dollar_dollar])dnl
+m4_popdef([b4_at_dollar])])dnl
+
+  [  /* Initialize the stack.  */
+    yystack.push (yystate, yylval]b4_locations_if([, yylloc])[);
+
+    int label = YYNEWSTATE;
+    for (;;)
+      switch (label)
+      {
+        /* New state.  Unlike in the C/C++ skeletons, the state is already
+	   pushed when we come here.  */
+      case YYNEWSTATE:
+        yycdebug ("Entering state " + yystate + "\n");
+        if (yydebug > 0)
+          yystack.print (yyDebugStream);
+    
+        /* Accept?  */
+        if (yystate == yyfinal_)
+          return true;
+    
+        /* Take a decision.  First try without lookahead.  */
+        yyn = yypact_[yystate];
+        if (yyn == yypact_ninf_)
+          {
+            label = YYDEFAULT;
+	    break;
+          }
+    
+        /* Read a lookahead token.  */
+        if (yychar == yyempty_)
+          {
+	    yycdebug ("Reading a token: ");
+	    yychar = yylex ();]
+            b4_locations_if([[
+	    yylloc = new ]b4_location_type[(yylexer.getStartPos (),
+	    		   	            yylexer.getEndPos ());]])
+            yylval = yylexer.getLVal ();[
+          }
+    
+        /* Convert token to internal form.  */
+        if (yychar <= EOF)
+          {
+	    yychar = yytoken = EOF;
+	    yycdebug ("Now at end of input.\n");
+          }
+        else
+          {
+	    yytoken = yytranslate_ (yychar);
+	    yy_symbol_print ("Next token is", yytoken,
+	    		     yylval]b4_locations_if([, yylloc])[);
+          }
+    
+        /* If the proper action on seeing token YYTOKEN is to reduce or to
+           detect an error, take that action.  */
+        yyn += yytoken;
+        if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken)
+          label = YYDEFAULT;
+    
+        /* <= 0 means reduce or error.  */
+        else if ((yyn = yytable_[yyn]) <= 0)
+          {
+	    if (yyn == 0 || yyn == yytable_ninf_)
+	      label = YYFAIL;
+	    else
+	      {
+	        yyn = -yyn;
+	        label = YYREDUCE;
+	      }
+          }
+    
+        else
+          {
+            /* Shift the lookahead token.  */
+	    yy_symbol_print ("Shifting", yytoken,
+	    		     yylval]b4_locations_if([, yylloc])[);
+    
+            /* Discard the token being shifted.  */
+            yychar = yyempty_;
+    
+            /* Count tokens shifted since error; after three, turn off error
+               status.  */
+            if (yyerrstatus_ > 0)
+              --yyerrstatus_;
+    
+            yystate = yyn;
+            yystack.push (yystate, yylval]b4_locations_if([, yylloc])[);
+            label = YYNEWSTATE;
+          }
+        break;
+    
+      /*-----------------------------------------------------------.
+      | yydefault -- do the default action for the current state.  |
+      `-----------------------------------------------------------*/
+      case YYDEFAULT:
+        yyn = yydefact_[yystate];
+        if (yyn == 0)
+          label = YYFAIL;
+        else
+          label = YYREDUCE;
+        break;
+    
+      /*-----------------------------.
+      | yyreduce -- Do a reduction.  |
+      `-----------------------------*/
+      case YYREDUCE:
+        yylen = yyr2_[yyn];
+        label = yyaction (yyn, yystack, yylen);
+	yystate = yystack.stateAt (0);
+        break;
+    
+      /*------------------------------------.
+      | yyerrlab -- here on detecting error |
+      `------------------------------------*/
+      case YYFAIL:
+        /* If not already recovering from an error, report this error.  */
+        if (yyerrstatus_ == 0)
+          {
+	    ++yynerrs_;
+	    yyerror (]b4_locations_if([yylloc, ])[yysyntax_error (yystate, yytoken));
+          }
+    
+        ]b4_locations_if([yyerrloc = yylloc;])[
+        if (yyerrstatus_ == 3)
+          {
+	    /* If just tried and failed to reuse lookahead token after an
+	     error, discard it.  */
+    
+	    if (yychar <= EOF)
+	      {
+	      /* Return failure if at end of input.  */
+	      if (yychar == EOF)
+	        return false;
+	      }
+	    else
+	      yychar = yyempty_;
+          }
+    
+        /* Else will try to reuse lookahead token after shifting the error
+           token.  */
+        label = YYERRLAB1;
+        break;
+    
+      /*---------------------------------------------------.
+      | errorlab -- error raised explicitly by YYERROR.  |
+      `---------------------------------------------------*/
+      case YYERROR:
+    
+        ]b4_locations_if([yyerrloc = yystack.locationAt (yylen - 1);])[
+        /* Do not reclaim the symbols of the rule which action triggered
+           this YYERROR.  */
+        yystack.pop (yylen);
+        yylen = 0;
+        yystate = yystack.stateAt (0);
+        label = YYERRLAB1;
+        break;
+    
+      /*-------------------------------------------------------------.
+      | yyerrlab1 -- common code for both syntax error and YYERROR.  |
+      `-------------------------------------------------------------*/
+      case YYERRLAB1:
+        yyerrstatus_ = 3;	/* Each real token shifted decrements this.  */
+    
+        for (;;)
+          {
+	    yyn = yypact_[yystate];
+	    if (yyn != yypact_ninf_)
+	      {
+	        yyn += yyterror_;
+	        if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)
+	          {
+	            yyn = yytable_[yyn];
+	            if (0 < yyn)
+		      break;
+	          }
+	      }
+    
+	    /* Pop the current state because it cannot handle the error token.  */
+	    if (yystack.height == 1)
+	      return false;
+    
+	    ]b4_locations_if([yyerrloc = yystack.locationAt (0);])[
+	    yystack.pop ();
+	    yystate = yystack.stateAt (0);
+	    if (yydebug > 0)
+	      yystack.print (yyDebugStream);
+          }
+    
+	]b4_locations_if([
+	/* Muck with the stack to setup for yylloc.  */
+	yystack.push (0, null, yylloc);
+	yystack.push (0, null, yyerrloc);
+        yyloc = yylloc (yystack, 2);
+	yystack.pop (2);])[
+
+        /* Shift the error token.  */
+        yy_symbol_print ("Shifting", yystos_[yyn],
+			 yylval]b4_locations_if([, yyloc])[);
+    
+        yystate = yyn;
+	yystack.push (yyn, yylval]b4_locations_if([, yyloc])[);
+        label = YYNEWSTATE;
+        break;
+    
+        /* Accept.  */
+      case YYACCEPT:
+        return true;
+    
+        /* Abort.  */
+      case YYABORT:
+        return false;
+      }
+  }
+
+  // Generate an error message.
+  private String yysyntax_error (int yystate, int tok)
+  {
+    if (errorVerbose)
+      {
+        int yyn = yypact_[yystate];
+        if (yypact_ninf_ < yyn && yyn <= yylast_)
+          {
+	    StringBuffer res;
+
+	    /* Start YYX at -YYN if negative to avoid negative indexes in
+	       YYCHECK.  */
+	    int yyxbegin = yyn < 0 ? -yyn : 0;
+
+	    /* Stay within bounds of both yycheck and yytname.  */
+	    int yychecklim = yylast_ - yyn + 1;
+	    int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
+	    int count = 0;
+	    for (int x = yyxbegin; x < yyxend; ++x)
+	      if (yycheck_[x + yyn] == x && x != yyterror_)
+	        ++count;
+
+	    // FIXME: This method of building the message is not compatible
+	    // with internationalization.
+	    res = new StringBuffer ("syntax error, unexpected ");
+	    res.append (yytnamerr_ (yytname_[tok]));
+	    if (count < 5)
+	      {
+	        count = 0;
+	        for (int x = yyxbegin; x < yyxend; ++x)
+	          if (yycheck_[x + yyn] == x && x != yyterror_)
+		    {
+		      res.append (count++ == 0 ? ", expecting " : " or ");
+		      res.append (yytnamerr_ (yytname_[x]));
+		    }
+	      }
+	    return res.toString ();
+          }
+      }
+
+    return "syntax error";
+  }
+
+
+  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+     STATE-NUM.  */
+  private static final ]b4_int_type_for([b4_pact])[ yypact_ninf_ = ]b4_pact_ninf[;
+  private static final ]b4_int_type_for([b4_pact])[ yypact_[] =
+  {
+    ]b4_pact[
+  };
+
+  /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
+     doesn't specify something else to do.  Zero means the default is an
+     error.  */
+  private static final ]b4_int_type_for([b4_defact])[ yydefact_[] =
+  {
+    ]b4_defact[
+  };
+
+  /* YYPGOTO[NTERM-NUM].  */
+  private static final ]b4_int_type_for([b4_pgoto])[ yypgoto_[] =
+  {
+    ]b4_pgoto[
+  };
+
+  /* YYDEFGOTO[NTERM-NUM].  */
+  private static final ]b4_int_type_for([b4_defgoto])[
+  yydefgoto_[] =
+  {
+    ]b4_defgoto[
+  };
+
+  /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+     positive, shift that token.  If negative, reduce the rule which
+     number is the opposite.  If zero, do what YYDEFACT says.  */
+  private static final ]b4_int_type_for([b4_table])[ yytable_ninf_ = ]b4_table_ninf[;
+  private static final ]b4_int_type_for([b4_table])[
+  yytable_[] =
+  {
+    ]b4_table[
+  };
+
+  /* YYCHECK.  */
+  private static final ]b4_int_type_for([b4_check])[
+  yycheck_[] =
+  {
+    ]b4_check[
+  };
+
+  /* STOS_[STATE-NUM] -- The (internal number of the) accessing
+     symbol of state STATE-NUM.  */
+  private static final ]b4_int_type_for([b4_stos])[
+  yystos_[] =
+  {
+    ]b4_stos[
+  };
+
+  /* TOKEN_NUMBER_[YYLEX-NUM] -- Internal symbol number corresponding
+     to YYLEX-NUM.  */
+  private static final ]b4_int_type_for([b4_toknum])[
+  yytoken_number_[] =
+  {
+    ]b4_toknum[
+  };
+
+  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+  private static final ]b4_int_type_for([b4_r1])[
+  yyr1_[] =
+  {
+    ]b4_r1[
+  };
+
+  /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+  private static final ]b4_int_type_for([b4_r2])[
+  yyr2_[] =
+  {
+    ]b4_r2[
+  };
+
+  /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+     First, the terminals, then, starting at \a yyntokens_, nonterminals.  */
+  private static final String yytname_[] =
+  {
+    ]b4_tname[
+  };
+
+  /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+  private static final ]b4_int_type_for([b4_rhs])[ yyrhs_[] =
+  {
+    ]b4_rhs[
+  };
+
+  /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+     YYRHS.  */
+  private static final ]b4_int_type_for([b4_prhs])[ yyprhs_[] =
+  {
+    ]b4_prhs[
+  };
+
+  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
+  private static final ]b4_int_type_for([b4_rline])[ yyrline_[] =
+  {
+    ]b4_rline[
+  };
+
+  // Report on the debug stream that the rule yyrule is going to be reduced.
+  private void yy_reduce_print (int yyrule, YYStack yystack)
+  {
+    if (yydebug == 0)
+      return;
+
+    int yylno = yyrline_[yyrule];
+    int yynrhs = yyr2_[yyrule];
+    /* Print the symbols being reduced, and their result.  */
+    yycdebug ("Reducing stack by rule " + (yyrule - 1)
+	      + " (line " + yylno + "), ");
+
+    /* The symbols being reduced.  */
+    for (int yyi = 0; yyi < yynrhs; yyi++)
+      yy_symbol_print ("   $" + (yyi + 1) + " =",
+		       yyrhs_[yyprhs_[yyrule] + yyi],
+		       ]b4_rhs_value(yynrhs, yyi + 1)b4_locations_if([, 
+		       b4_rhs_location(yynrhs, yyi + 1)])[);
+  }
+
+  /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+  private static final ]b4_int_type_for([b4_translate])[ yytranslate_table_[] =
+  {
+    ]b4_translate[
+  };
+
+  private static final ]b4_int_type_for([b4_translate])[ yytranslate_ (int t)
+  {
+    if (t >= 0 && t <= yyuser_token_number_max_)
+      return yytranslate_table_[t];
+    else
+      return yyundef_token_;
+  }
+
+  private static final int yylast_ = ]b4_last[;
+  private static final int yynnts_ = ]b4_nterms_number[;
+  private static final int yyempty_ = -2;
+  private static final int yyfinal_ = ]b4_final_state_number[;
+  private static final int yyterror_ = 1;
+  private static final int yyerrcode_ = 256;
+  private static final int yyntokens_ = ]b4_tokens_number[;
+
+  private static final int yyuser_token_number_max_ = ]b4_user_token_number_max[;
+  private static final int yyundef_token_ = ]b4_undef_token_number[;
+
+]/* User implementation code.  */
+b4_percent_code_get[]dnl
+
+}
+
+b4_epilogue
+m4_divert_pop(0)dnl
Index: EcnlProtoTool/trunk/tools/share/bison/location.cc
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/location.cc	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/location.cc	(revision 270)
@@ -0,0 +1,275 @@
+# C++ skeleton for Bison
+
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation,
+# Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# We do want M4 expansion after # for CPP macros.
+m4_changecom()
+m4_divert_push(0)dnl
+@output(b4_dir_prefix[]position.hh@)
+b4_copyright([Positions for Bison parsers in C++],
+  [2002, 2003, 2004, 2005, 2006])[
+
+/**
+ ** \file position.hh
+ ** Define the ]b4_namespace_ref[::position class.
+ */
+
+#ifndef BISON_POSITION_HH
+# define BISON_POSITION_HH
+
+# include <iostream>
+# include <string>
+# include <algorithm>
+
+]b4_namespace_open[
+  /// Abstract a position.
+  class position
+  {
+  public:
+]m4_ifdef([b4_location_constructors], [
+    /// Construct a position.
+    position ()
+      : filename (0), line (]b4_location_initial_line[), column (]b4_location_initial_column[)
+    {
+    }
+
+])[
+    /// Initialization.
+    inline void initialize (]b4_percent_define_get([[filename_type]])[* fn)
+    {
+      filename = fn;
+      line = ]b4_location_initial_line[;
+      column = ]b4_location_initial_column[;
+    }
+
+    /** \name Line and Column related manipulators
+     ** \{ */
+  public:
+    /// (line related) Advance to the COUNT next lines.
+    inline void lines (int count = 1)
+    {
+      column = ]b4_location_initial_column[;
+      line += count;
+    }
+
+    /// (column related) Advance to the COUNT next columns.
+    inline void columns (int count = 1)
+    {
+      column = std::max (]b4_location_initial_column[u, column + count);
+    }
+    /** \} */
+
+  public:
+    /// File name to which this position refers.
+    ]b4_percent_define_get([[filename_type]])[* filename;
+    /// Current line number.
+    unsigned int line;
+    /// Current column number.
+    unsigned int column;
+  };
+
+  /// Add and assign a position.
+  inline const position&
+  operator+= (position& res, const int width)
+  {
+    res.columns (width);
+    return res;
+  }
+
+  /// Add two position objects.
+  inline const position
+  operator+ (const position& begin, const int width)
+  {
+    position res = begin;
+    return res += width;
+  }
+
+  /// Add and assign a position.
+  inline const position&
+  operator-= (position& res, const int width)
+  {
+    return res += -width;
+  }
+
+  /// Add two position objects.
+  inline const position
+  operator- (const position& begin, const int width)
+  {
+    return begin + -width;
+  }
+]b4_percent_define_flag_if([[define_location_comparison]], [[
+  /// Compare two position objects.
+  inline bool
+  operator== (const position& pos1, const position& pos2)
+  {
+    return
+      (pos1.filename == pos2.filename
+       || pos1.filename && pos2.filename && *pos1.filename == *pos2.filename)
+      && pos1.line == pos2.line && pos1.column == pos2.column;
+  }
+
+  /// Compare two position objects.
+  inline bool
+  operator!= (const position& pos1, const position& pos2)
+  {
+    return !(pos1 == pos2);
+  }
+]])[
+  /** \brief Intercept output stream redirection.
+   ** \param ostr the destination output stream
+   ** \param pos a reference to the position to redirect
+   */
+  inline std::ostream&
+  operator<< (std::ostream& ostr, const position& pos)
+  {
+    if (pos.filename)
+      ostr << *pos.filename << ':';
+    return ostr << pos.line << '.' << pos.column;
+  }
+
+]b4_namespace_close[
+#endif // not BISON_POSITION_HH]
+@output(b4_dir_prefix[]location.hh@)
+b4_copyright([Locations for Bison parsers in C++],
+  [2002, 2003, 2004, 2005, 2006])[
+
+/**
+ ** \file location.hh
+ ** Define the ]b4_namespace_ref[::location class.
+ */
+
+#ifndef BISON_LOCATION_HH
+# define BISON_LOCATION_HH
+
+# include <iostream>
+# include <string>
+# include "position.hh"
+
+]b4_namespace_open[
+
+  /// Abstract a location.
+  class location
+  {
+  public:
+]m4_ifdef([b4_location_constructors], [
+    /// Construct a location.
+    location ()
+      : begin (), end ()
+    {
+    }
+
+])[
+    /// Initialization.
+    inline void initialize (]b4_percent_define_get([[filename_type]])[* fn)
+    {
+      begin.initialize (fn);
+      end = begin;
+    }
+
+    /** \name Line and Column related manipulators
+     ** \{ */
+  public:
+    /// Reset initial location to final location.
+    inline void step ()
+    {
+      begin = end;
+    }
+
+    /// Extend the current location to the COUNT next columns.
+    inline void columns (unsigned int count = 1)
+    {
+      end += count;
+    }
+
+    /// Extend the current location to the COUNT next lines.
+    inline void lines (unsigned int count = 1)
+    {
+      end.lines (count);
+    }
+    /** \} */
+
+
+  public:
+    /// Beginning of the located region.
+    position begin;
+    /// End of the located region.
+    position end;
+  };
+
+  /// Join two location objects to create a location.
+  inline const location operator+ (const location& begin, const location& end)
+  {
+    location res = begin;
+    res.end = end.end;
+    return res;
+  }
+
+  /// Add two location objects.
+  inline const location operator+ (const location& begin, unsigned int width)
+  {
+    location res = begin;
+    res.columns (width);
+    return res;
+  }
+
+  /// Add and assign a location.
+  inline location& operator+= (location& res, unsigned int width)
+  {
+    res.columns (width);
+    return res;
+  }
+]b4_percent_define_flag_if([[define_location_comparison]], [[
+  /// Compare two location objects.
+  inline bool
+  operator== (const location& loc1, const location& loc2)
+  {
+    return loc1.begin == loc2.begin && loc1.end == loc2.end;
+  }
+
+  /// Compare two location objects.
+  inline bool
+  operator!= (const location& loc1, const location& loc2)
+  {
+    return !(loc1 == loc2);
+  }
+]])[
+  /** \brief Intercept output stream redirection.
+   ** \param ostr the destination output stream
+   ** \param loc a reference to the location to redirect
+   **
+   ** Avoid duplicate information.
+   */
+  inline std::ostream& operator<< (std::ostream& ostr, const location& loc)
+  {
+    position last = loc.end - 1;
+    ostr << loc.begin;
+    if (last.filename
+	&& (!loc.begin.filename
+	    || *loc.begin.filename != *last.filename))
+      ostr << '-' << last;
+    else if (loc.begin.line != last.line)
+      ostr << '-' << last.line  << '.' << last.column;
+    else if (loc.begin.column != last.column)
+      ostr << '-' << last.column;
+    return ostr;
+  }
+
+]b4_namespace_close[
+
+#endif // not BISON_LOCATION_HH]
+m4_divert_pop(0)
+m4_changecom([#])
Index: EcnlProtoTool/trunk/tools/share/bison/m4sugar/foreach.m4
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/m4sugar/foreach.m4	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/m4sugar/foreach.m4	(revision 270)
@@ -0,0 +1,400 @@
+#                                                  -*- Autoconf -*-
+# This file is part of Autoconf.
+# foreach-based replacements for recursive functions.
+# Speeds up GNU M4 1.4.x by avoiding quadratic $@ recursion, but penalizes
+# GNU M4 1.6 by requiring more memory and macro expansions.
+#
+# Copyright (C) 2008 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception, the Free Software Foundation gives unlimited
+# permission to copy, distribute and modify the configure scripts that
+# are the output of Autoconf.  You need not follow the terms of the GNU
+# General Public License when using or distributing such scripts, even
+# though portions of the text of Autoconf appear in them.  The GNU
+# General Public License (GPL) does govern all other use of the material
+# that constitutes the Autoconf program.
+#
+# Certain portions of the Autoconf source text are designed to be copied
+# (in certain cases, depending on the input) into the output of
+# Autoconf.  We call these the "data" portions.  The rest of the Autoconf
+# source text consists of comments plus executable code that decides which
+# of the data portions to output in any given case.  We call these
+# comments and executable code the "non-data" portions.  Autoconf never
+# copies any of the non-data portions into its output.
+#
+# This special exception to the GPL applies to versions of Autoconf
+# released by the Free Software Foundation.  When you make and
+# distribute a modified version of Autoconf, you may extend this special
+# exception to the GPL to apply to your modified version as well, *unless*
+# your modified version has the potential to copy into its output some
+# of the text that was the non-data portion of the version that you started
+# with.  (In other words, unless your change moves or copies text from
+# the non-data portions to the data portions.)  If your modification has
+# such potential, you must delete any notice of this special exception
+# to the GPL from your modified version.
+#
+# Written by Eric Blake.
+#
+
+# In M4 1.4.x, every byte of $@ is rescanned.  This means that an
+# algorithm on n arguments that recurses with one less argument each
+# iteration will scan n * (n + 1) / 2 arguments, for O(n^2) time.  In
+# M4 1.6, this was fixed so that $@ is only scanned once, then
+# back-references are made to information stored about the scan.
+# Thus, n iterations need only scan n arguments, for O(n) time.
+# Additionally, in M4 1.4.x, recursive algorithms did not clean up
+# memory very well, requiring O(n^2) memory rather than O(n) for n
+# iterations.
+#
+# This file is designed to overcome the quadratic nature of $@
+# recursion by writing a variant of m4_foreach that uses m4_for rather
+# than $@ recursion to operate on the list.  This involves more macro
+# expansions, but avoids the need to rescan a quadratic number of
+# arguments, making these replacements very attractive for M4 1.4.x.
+# On the other hand, in any version of M4, expanding additional macros
+# costs additional time; therefore, in M4 1.6, where $@ recursion uses
+# fewer macros, these replacements actually pessimize performance.
+# Additionally, the use of $10 to mean the tenth argument violates
+# POSIX; although all versions of m4 1.4.x support this meaning, a
+# future m4 version may switch to take it as the first argument
+# concatenated with a literal 0, so the implementations in this file
+# are not future-proof.  Thus, this file is conditionally included as
+# part of m4_init(), only when it is detected that M4 probably has
+# quadratic behavior (ie. it lacks the macro __m4_version__).
+#
+# Please keep this file in sync with m4sugar.m4.
+
+# m4_foreach(VARIABLE, LIST, EXPRESSION)
+# --------------------------------------
+# Expand EXPRESSION assigning each value of the LIST to VARIABLE.
+# LIST should have the form `item_1, item_2, ..., item_n', i.e. the
+# whole list must *quoted*.  Quote members too if you don't want them
+# to be expanded.
+#
+# This version minimizes the number of times that $@ is evaluated by
+# using m4_for to generate a boilerplate into VARIABLE then passing $@
+# to that temporary macro.  Thus, the recursion is done in m4_for
+# without reparsing any user input, and is not quadratic.  For an idea
+# of how this works, note that m4_foreach(i,[1,2],[i]) defines i to be
+#   m4_define([$1],[$3])$2[]m4_define([$1],[$4])$2[]m4_popdef([i])
+# then calls i([i],[i],[1],[2]).
+m4_define([m4_foreach],
+[m4_if([$2], [], [], [_$0([$1], [$3], $2)])])
+
+m4_define([_m4_foreach],
+[m4_define([$1], m4_pushdef([$1])_m4_for([$1], [3], [$#], [1],
+    [$0_([1], [2], _m4_defn([$1]))])[m4_popdef([$1])])m4_indir([$1], $@)])
+
+m4_define([_m4_foreach_],
+[[m4_define([$$1], [$$3])$$2[]]])
+
+# m4_case(SWITCH, VAL1, IF-VAL1, VAL2, IF-VAL2, ..., DEFAULT)
+# -----------------------------------------------------------
+# Find the first VAL that SWITCH matches, and expand the corresponding
+# IF-VAL.  If there are no matches, expand DEFAULT.
+#
+# Use m4_for to create a temporary macro in terms of a boilerplate
+# m4_if with final cleanup.  If $# is even, we have DEFAULT; if it is
+# odd, then rounding the last $# up in the temporary macro is
+# harmless.  For example, both m4_case(1,2,3,4,5) and
+# m4_case(1,2,3,4,5,6) result in the intermediate _m4_case being
+#   m4_if([$1],[$2],[$3],[$1],[$4],[$5],_m4_popdef([_m4_case])[$6])
+m4_define([m4_case],
+[m4_if(m4_eval([$# <= 2]), [1], [$2],
+[m4_pushdef([_$0], [m4_if(]m4_for([_m4_count], [2], m4_decr([$#]), [2],
+     [_$0_([1], _m4_count, m4_incr(_m4_count))])[_m4_popdef(
+	 [_$0])]m4_dquote($m4_eval([($# + 1) & ~1]))[)])_$0($@)])])
+
+m4_define([_m4_case_],
+[[[$$1],[$$2],[$$3],]])
+
+# m4_bmatch(SWITCH, RE1, VAL1, RE2, VAL2, ..., DEFAULT)
+# -----------------------------------------------------
+# m4 equivalent of
+#
+# if (SWITCH =~ RE1)
+#   VAL1;
+# elif (SWITCH =~ RE2)
+#   VAL2;
+# elif ...
+#   ...
+# else
+#   DEFAULT
+#
+# We build the temporary macro _m4_b:
+#   m4_define([_m4_b], _m4_defn([_m4_bmatch]))_m4_b([$1], [$2], [$3])...
+#   _m4_b([$1], [$m-1], [$m])_m4_b([], [], [$m+1]_m4_popdef([_m4_b]))
+# then invoke m4_unquote(_m4_b($@)), for concatenation with later text.
+m4_define([m4_bmatch],
+[m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])],
+       [$#], 1, [m4_fatal([$0: too few arguments: $#: $1])],
+       [$#], 2, [$2],
+       [m4_define([_m4_b], m4_pushdef([_m4_b])[m4_define([_m4_b],
+  _m4_defn([_$0]))]_m4_for([_m4_b], [3], m4_eval([($# + 1) / 2 * 2 - 1]),
+  [2], [_$0_([1], m4_decr(_m4_b), _m4_b)])[_m4_b([], [],]m4_dquote(
+  [$]m4_incr(_m4_b))[_m4_popdef([_m4_b]))])m4_unquote(_m4_b($@))])])
+
+m4_define([_m4_bmatch],
+[m4_if(m4_bregexp([$1], [$2]), [-1], [], [[$3]m4_define([$0])])])
+
+m4_define([_m4_bmatch_],
+[[_m4_b([$$1], [$$2], [$$3])]])
+
+
+# m4_cond(TEST1, VAL1, IF-VAL1, TEST2, VAL2, IF-VAL2, ..., [DEFAULT])
+# -------------------------------------------------------------------
+# Similar to m4_if, except that each TEST is expanded when encountered.
+# If the expansion of TESTn matches the string VALn, the result is IF-VALn.
+# The result is DEFAULT if no tests passed.  This macro allows
+# short-circuiting of expensive tests, where it pays to arrange quick
+# filter tests to run first.
+#
+# m4_cond already guarantees either 3*n or 3*n + 1 arguments, 1 <= n.
+# We only have to speed up _m4_cond, by building the temporary _m4_c:
+#   m4_define([_m4_c], _m4_defn([m4_unquote]))_m4_c([m4_if(($1), [($2)],
+#   [[$3]m4_define([_m4_c])])])_m4_c([m4_if(($4), [($5)],
+#   [[$6]m4_define([_m4_c])])])..._m4_c([m4_if(($m-2), [($m-1)],
+#   [[$m]m4_define([_m4_c])])])_m4_c([[$m+1]]_m4_popdef([_m4_c]))
+# We invoke m4_unquote(_m4_c($@)), for concatenation with later text.
+m4_define([_m4_cond],
+[m4_define([_m4_c], m4_pushdef([_m4_c])[m4_define([_m4_c],
+  _m4_defn([m4_unquote]))]_m4_for([_m4_c], [2], m4_eval([$# / 3 * 3 - 1]), [3],
+  [$0_(m4_decr(_m4_c), _m4_c, m4_incr(_m4_c))])[_m4_c(]m4_dquote(m4_dquote(
+  [$]m4_eval([$# / 3 * 3 + 1])))[_m4_popdef([_m4_c]))])m4_unquote(_m4_c($@))])
+
+m4_define([_m4_cond_],
+[[_m4_c([m4_if(($$1), [($$2)], [[$$3]m4_define([_m4_c])])])]])
+
+# m4_bpatsubsts(STRING, RE1, SUBST1, RE2, SUBST2, ...)
+# ----------------------------------------------------
+# m4 equivalent of
+#
+#   $_ = STRING;
+#   s/RE1/SUBST1/g;
+#   s/RE2/SUBST2/g;
+#   ...
+#
+# m4_bpatsubsts already validated an odd number of arguments; we only
+# need to speed up _m4_bpatsubsts.  To avoid nesting, we build the
+# temporary _m4_p:
+#   m4_define([_m4_p], [$1])m4_define([_m4_p],
+#   m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$2], [$3]))m4_define([_m4_p],
+#   m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$4], [$5]))m4_define([_m4_p],...
+#   m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$m-1], [$m]))m4_unquote(
+#   _m4_defn([_m4_p])_m4_popdef([_m4_p]))
+m4_define([_m4_bpatsubsts],
+[m4_define([_m4_p], m4_pushdef([_m4_p])[m4_define([_m4_p],
+  ]m4_dquote([$]1)[)]_m4_for([_m4_p], [3], [$#], [2], [$0_(m4_decr(_m4_p),
+  _m4_p)])[m4_unquote(_m4_defn([_m4_p])_m4_popdef([_m4_p]))])_m4_p($@)])
+
+m4_define([_m4_bpatsubsts_],
+[[m4_define([_m4_p],
+m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$$1], [$$2]))]])
+
+# m4_shiftn(N, ...)
+# -----------------
+# Returns ... shifted N times.  Useful for recursive "varargs" constructs.
+#
+# m4_shiftn already validated arguments; we only need to speed up
+# _m4_shiftn.  If N is 3, then we build the temporary _m4_s, defined as
+#   ,[$5],[$6],...,[$m]_m4_popdef([_m4_s])
+# before calling m4_shift(_m4_s($@)).
+m4_define([_m4_shiftn],
+[m4_if(m4_incr([$1]), [$#], [], [m4_define([_m4_s],
+	   m4_pushdef([_m4_s])_m4_for([_m4_s], m4_eval([$1 + 2]), [$#], [1],
+  [[,]m4_dquote([$]_m4_s)])[_m4_popdef([_m4_s])])m4_shift(_m4_s($@))])])
+
+# m4_do(STRING, ...)
+# ------------------
+# This macro invokes all its arguments (in sequence, of course).  It is
+# useful for making your macros more structured and readable by dropping
+# unnecessary dnl's and have the macros indented properly.
+#
+# Here, we use the temporary macro _m4_do, defined as
+#   $1[]$2[]...[]$n[]_m4_popdef([_m4_do])
+m4_define([m4_do],
+[m4_if([$#], [0], [],
+       [m4_define([_$0], m4_pushdef([_$0])_m4_for([_$0], [1], [$#], [1],
+		  [$_$0[[]]])[_m4_popdef([_$0])])_$0($@)])])
+
+# m4_dquote_elt(ARGS)
+# -------------------
+# Return ARGS as an unquoted list of double-quoted arguments.
+#
+# m4_foreach to the rescue.  It's easier to shift off the leading comma.
+m4_define([m4_dquote_elt],
+[m4_shift(m4_foreach([_m4_elt], [$@], [,m4_dquote(_m4_defn([_m4_elt]))]))])
+
+# m4_reverse(ARGS)
+# ----------------
+# Output ARGS in reverse order.
+#
+# Invoke _m4_r($@) with the temporary _m4_r built as
+#   [$m], [$m-1], ..., [$2], [$1]_m4_popdef([_m4_r])
+m4_define([m4_reverse],
+[m4_if([$#], [0], [], [$#], [1], [[$1]],
+[m4_define([_m4_r], m4_dquote([$$#])m4_pushdef([_m4_r])_m4_for([_m4_r],
+      m4_decr([$#]), [1], [-1],
+    [[, ]m4_dquote([$]_m4_r)])[_m4_popdef([_m4_r])])_m4_r($@)])])
+
+
+# m4_map(MACRO, LIST)
+# -------------------
+# Invoke MACRO($1), MACRO($2) etc. where $1, $2... are the elements
+# of LIST.  $1, $2... must in turn be lists, appropriate for m4_apply.
+#
+# m4_map/m4_map_sep only execute once; the speedup comes in fixing
+# _m4_map.  The mismatch in () is intentional, since $1 supplies the
+# opening `(' (but it sure looks odd!).  Build the temporary _m4_m:
+#   $1, [$3])$1, [$4])...$1, [$m])_m4_popdef([_m4_m])
+m4_define([_m4_map],
+[m4_if([$#], [2], [],
+       [m4_define([_m4_m], m4_pushdef([_m4_m])_m4_for([_m4_m], [3], [$#], [1],
+   [$0_([1], _m4_m)])[_m4_popdef([_m4_m])])_m4_m($@)])])
+
+m4_define([_m4_map_],
+[[$$1, [$$2])]])
+
+# m4_transform(EXPRESSION, ARG...)
+# --------------------------------
+# Expand EXPRESSION([ARG]) for each argument.  More efficient than
+# m4_foreach([var], [ARG...], [EXPRESSION(m4_defn([var]))])
+#
+# Invoke the temporary macro _m4_transform, defined as:
+#   $1([$2])[]$1([$3])[]...$1([$m])[]_m4_popdef([_m4_transform])
+m4_define([m4_transform],
+[m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
+       [$#], [1], [],
+       [m4_define([_$0], m4_pushdef([_$0])_m4_for([_$0], [2], [$#], [1],
+   [_$0_([1], _$0)])[_m4_popdef([_$0])])_$0($@)])])
+
+m4_define([_m4_transform_],
+[[$$1([$$2])[]]])
+
+# m4_transform_pair(EXPRESSION, [END-EXPR = EXPRESSION], ARG...)
+# --------------------------------------------------------------
+# Perform a pairwise grouping of consecutive ARGs, by expanding
+# EXPRESSION([ARG1], [ARG2]).  If there are an odd number of ARGs, the
+# final argument is expanded with END-EXPR([ARGn]).
+#
+# Build the temporary macro _m4_transform_pair, with the $2([$m+1])
+# only output if $# is odd:
+#   $1([$3], [$4])[]$1([$5], [$6])[]...$1([$m-1],
+#   [$m])[]m4_default([$2], [$1])([$m+1])[]_m4_popdef([_m4_transform_pair])
+m4_define([m4_transform_pair],
+[m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
+       [$#], [1], [m4_fatal([$0: too few arguments: $#: $1])],
+       [$#], [2], [],
+       [$#], [3], [m4_default([$2], [$1])([$3])[]],
+       [m4_define([_$0], m4_pushdef([_$0])_m4_for([_$0], [3],
+   m4_eval([$# / 2 * 2 - 1]), [2], [_$0_([1], _$0, m4_incr(_$0))])_$0_end(
+   [1], [2], [$#])[_m4_popdef([_$0])])_$0($@)])])
+
+m4_define([_m4_transform_pair_],
+[[$$1([$$2], [$$3])[]]])
+
+m4_define([_m4_transform_pair_end],
+[m4_if(m4_eval([$3 & 1]), [1], [[m4_default([$$2], [$$1])([$$3])[]]])])
+
+# m4_join(SEP, ARG1, ARG2...)
+# ---------------------------
+# Produce ARG1SEPARG2...SEPARGn.  Avoid back-to-back SEP when a given ARG
+# is the empty string.  No expansion is performed on SEP or ARGs.
+#
+# Use a self-modifying separator, since we don't know how many
+# arguments might be skipped before a separator is first printed, but
+# be careful if the separator contains $.  m4_foreach to the rescue.
+m4_define([m4_join],
+[m4_pushdef([_m4_sep], [m4_define([_m4_sep], _m4_defn([m4_echo]))])]dnl
+[m4_foreach([_m4_arg], [m4_shift($@)],
+	    [m4_ifset([_m4_arg], [_m4_sep([$1])_m4_defn([_m4_arg])])])]dnl
+[_m4_popdef([_m4_sep])])
+
+# m4_joinall(SEP, ARG1, ARG2...)
+# ------------------------------
+# Produce ARG1SEPARG2...SEPARGn.  An empty ARG results in back-to-back SEP.
+# No expansion is performed on SEP or ARGs.
+#
+# A bit easier than m4_join.  m4_foreach to the rescue.
+m4_define([m4_joinall],
+[[$2]m4_if(m4_eval([$# <= 2]), [1], [],
+	   [m4_foreach([_m4_arg], [m4_shift2($@)],
+		       [[$1]_m4_defn([_m4_arg])])])])
+
+# m4_list_cmp(A, B)
+# -----------------
+# Compare the two lists of integer expressions A and B.
+#
+# m4_list_cmp takes care of any side effects; we only override
+# _m4_list_cmp_raw, where we can safely expand lists multiple times.
+# First, insert padding so that both lists are the same length; the
+# trailing +0 is necessary to handle a missing list.  Next, create a
+# temporary macro to perform pairwise comparisons until an inequality
+# is found.  For example, m4_list_cmp([1], [1,2]) creates _m4_cmp as
+#   m4_if(m4_eval([($1) != ($3)]), [1], [m4_cmp([$1], [$3])],
+#         m4_eval([($2) != ($4)]), [1], [m4_cmp([$2], [$4])],
+#         [0]_m4_popdef([_m4_cmp], [_m4_size]))
+# then calls _m4_cmp([1+0], [0], [1], [2+0])
+m4_define([_m4_list_cmp_raw],
+[m4_if([$1], [$2], 0, [m4_pushdef(
+     [_m4_size])_m4_list_cmp($1+0_m4_list_pad(m4_count($1), m4_count($2)),
+			     $2+0_m4_list_pad(m4_count($2), m4_count($1)))])])
+
+m4_define([_m4_list_pad],
+[m4_if(m4_eval($1 < $2), [1],
+       [_m4_for([_m4_size], m4_incr([$1]), [$2], [1], [,0])])])
+
+m4_define([_m4_list_cmp],
+[m4_define([_m4_size], m4_eval([$# >> 1]))]dnl
+[m4_define([_m4_cmp], m4_pushdef([_m4_cmp])[m4_if(]_m4_for([_m4_cmp],
+   [1], _m4_size, [1], [$0_(_m4_cmp, m4_eval(_m4_cmp + _m4_size))])[
+      [0]_m4_popdef([_m4_cmp], [_m4_size]))])_m4_cmp($@)])
+
+m4_define([_m4_list_cmp_],
+[[m4_eval([($$1) != ($$2)]), [1], [m4_cmp([$$1], [$$2])],
+]])
+
+# m4_max(EXPR, ...)
+# m4_min(EXPR, ...)
+# -----------------
+# Return the decimal value of the maximum (or minimum) in a series of
+# integer expressions.
+#
+# m4_foreach to the rescue; we only need to replace _m4_minmax.  Here,
+# we need a temporary macro to track the best answer so far, so that
+# the foreach expression is tractable.
+m4_define([_m4_minmax],
+[m4_pushdef([_m4_best], m4_eval([$2]))m4_foreach([_m4_arg], [m4_shift2($@)],
+    [m4_define([_m4_best], $1(_m4_best, _m4_defn([_m4_arg])))])]dnl
+[_m4_best[]_m4_popdef([_m4_best])])
+
+# m4_set_add_all(SET, VALUE...)
+# -----------------------------
+# Add each VALUE into SET.  This is O(n) in the number of VALUEs, and
+# can be faster than calling m4_set_add for each VALUE.
+#
+# m4_foreach to the rescue.  If no deletions have occurred, then avoid
+# the speed penalty of m4_set_add.
+m4_define([m4_set_add_all],
+[m4_if([$#], [0], [], [$#], [1], [],
+       [m4_define([_m4_set_size($1)], m4_eval(m4_set_size([$1])
+	  + m4_len(m4_foreach([_m4_arg], [m4_shift($@)],
+    m4_ifdef([_m4_set_cleanup($1)],
+	     [[m4_set_add([$1], _m4_defn([_m4_arg]))]],
+	     [[m4_ifdef([_m4_set([$1],]_m4_defn([_m4_arg])[)], [],
+			[m4_define([_m4_set([$1],]_m4_defn([_m4_arg])[)],
+				   [1])m4_pushdef([_m4_set([$1])],
+	_m4_defn([_m4_arg]))-])]])))))])])
Index: EcnlProtoTool/trunk/tools/share/bison/m4sugar/m4sugar.m4
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/m4sugar/m4sugar.m4	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/m4sugar/m4sugar.m4	(revision 270)
@@ -0,0 +1,2789 @@
+divert(-1)#                                                  -*- Autoconf -*-
+# This file is part of Autoconf.
+# Base M4 layer.
+# Requires GNU M4.
+#
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+# 2008 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception, the Free Software Foundation gives unlimited
+# permission to copy, distribute and modify the configure scripts that
+# are the output of Autoconf.  You need not follow the terms of the GNU
+# General Public License when using or distributing such scripts, even
+# though portions of the text of Autoconf appear in them.  The GNU
+# General Public License (GPL) does govern all other use of the material
+# that constitutes the Autoconf program.
+#
+# Certain portions of the Autoconf source text are designed to be copied
+# (in certain cases, depending on the input) into the output of
+# Autoconf.  We call these the "data" portions.  The rest of the Autoconf
+# source text consists of comments plus executable code that decides which
+# of the data portions to output in any given case.  We call these
+# comments and executable code the "non-data" portions.  Autoconf never
+# copies any of the non-data portions into its output.
+#
+# This special exception to the GPL applies to versions of Autoconf
+# released by the Free Software Foundation.  When you make and
+# distribute a modified version of Autoconf, you may extend this special
+# exception to the GPL to apply to your modified version as well, *unless*
+# your modified version has the potential to copy into its output some
+# of the text that was the non-data portion of the version that you started
+# with.  (In other words, unless your change moves or copies text from
+# the non-data portions to the data portions.)  If your modification has
+# such potential, you must delete any notice of this special exception
+# to the GPL from your modified version.
+#
+# Written by Akim Demaille.
+#
+
+# Set the quotes, whatever the current quoting system.
+changequote()
+changequote([, ])
+
+# Some old m4's don't support m4exit.  But they provide
+# equivalent functionality by core dumping because of the
+# long macros we define.
+ifdef([__gnu__], ,
+[errprint(M4sugar requires GNU M4. Install it before installing M4sugar or
+set the M4 environment variable to its absolute file name.)
+m4exit(2)])
+
+
+## ------------------------------- ##
+## 1. Simulate --prefix-builtins.  ##
+## ------------------------------- ##
+
+# m4_define
+# m4_defn
+# m4_undefine
+define([m4_define],   defn([define]))
+define([m4_defn],     defn([defn]))
+define([m4_undefine], defn([undefine]))
+
+m4_undefine([define])
+m4_undefine([defn])
+m4_undefine([undefine])
+
+
+# m4_copy(SRC, DST)
+# -----------------
+# Define DST as the definition of SRC.
+# What's the difference between:
+# 1. m4_copy([from], [to])
+# 2. m4_define([to], [from($@)])
+# Well, obviously 1 is more expensive in space.  Maybe 2 is more expensive
+# in time, but because of the space cost of 1, it's not that obvious.
+# Nevertheless, one huge difference is the handling of `$0'.  If `from'
+# uses `$0', then with 1, `to''s `$0' is `to', while it is `from' in 2.
+# The user would certainly prefer to see `to'.
+m4_define([m4_copy],
+[m4_define([$2], m4_defn([$1]))])
+
+
+# m4_rename(SRC, DST)
+# -------------------
+# Rename the macro SRC to DST.
+m4_define([m4_rename],
+[m4_copy([$1], [$2])m4_undefine([$1])])
+
+
+# m4_rename_m4(MACRO-NAME)
+# ------------------------
+# Rename MACRO-NAME to m4_MACRO-NAME.
+m4_define([m4_rename_m4],
+[m4_rename([$1], [m4_$1])])
+
+
+# m4_copy_unm4(m4_MACRO-NAME)
+# ---------------------------
+# Copy m4_MACRO-NAME to MACRO-NAME.
+m4_define([m4_copy_unm4],
+[m4_copy([$1], m4_bpatsubst([$1], [^m4_\(.*\)], [[\1]]))])
+
+
+# Some m4 internals have names colliding with tokens we might use.
+# Rename them a` la `m4 --prefix-builtins'.  Conditionals first, since
+# some subsequent renames are conditional.
+m4_rename_m4([ifdef])
+m4_rename([ifelse], [m4_if])
+
+m4_rename_m4([builtin])
+m4_rename_m4([changecom])
+m4_rename_m4([changequote])
+m4_ifdef([changeword],dnl conditionally available in 1.4.x
+[m4_undefine([changeword])])
+m4_rename_m4([debugfile])
+m4_rename_m4([debugmode])
+m4_rename_m4([decr])
+m4_undefine([divert])
+m4_rename_m4([divnum])
+m4_rename_m4([dumpdef])
+m4_rename_m4([errprint])
+m4_rename_m4([esyscmd])
+m4_rename_m4([eval])
+m4_rename_m4([format])
+m4_undefine([include])
+m4_rename_m4([incr])
+m4_rename_m4([index])
+m4_rename_m4([indir])
+m4_rename_m4([len])
+m4_rename([m4exit], [m4_exit])
+m4_undefine([m4wrap])
+m4_ifdef([mkstemp],dnl added in M4 1.4.8
+[m4_rename_m4([mkstemp])
+m4_copy([m4_mkstemp], [m4_maketemp])
+m4_undefine([maketemp])],
+[m4_rename_m4([maketemp])
+m4_copy([m4_maketemp], [m4_mkstemp])])
+m4_rename([patsubst], [m4_bpatsubst])
+m4_rename_m4([popdef])
+m4_rename_m4([pushdef])
+m4_rename([regexp], [m4_bregexp])
+m4_rename_m4([shift])
+m4_undefine([sinclude])
+m4_rename_m4([substr])
+m4_ifdef([symbols],dnl present only in alpha-quality 1.4o
+[m4_rename_m4([symbols])])
+m4_rename_m4([syscmd])
+m4_rename_m4([sysval])
+m4_rename_m4([traceoff])
+m4_rename_m4([traceon])
+m4_rename_m4([translit])
+m4_undefine([undivert])
+
+
+## ------------------- ##
+## 2. Error messages.  ##
+## ------------------- ##
+
+
+# m4_location
+# -----------
+m4_define([m4_location],
+[__file__:__line__])
+
+
+# m4_errprintn(MSG)
+# -----------------
+# Same as `errprint', but with the missing end of line.
+m4_define([m4_errprintn],
+[m4_errprint([$1
+])])
+
+
+# m4_warning(MSG)
+# ---------------
+# Warn the user.
+m4_define([m4_warning],
+[m4_errprintn(m4_location[: warning: $1])])
+
+
+# m4_fatal(MSG, [EXIT-STATUS])
+# ----------------------------
+# Fatal the user.                                                      :)
+m4_define([m4_fatal],
+[m4_errprintn(m4_location[: error: $1])dnl
+m4_expansion_stack_dump()dnl
+m4_exit(m4_if([$2],, 1, [$2]))])
+
+
+# m4_assert(EXPRESSION, [EXIT-STATUS = 1])
+# ----------------------------------------
+# This macro ensures that EXPRESSION evaluates to true, and exits if
+# EXPRESSION evaluates to false.
+m4_define([m4_assert],
+[m4_if(m4_eval([$1]), 0,
+       [m4_fatal([assert failed: $1], [$2])])])
+
+
+
+## ------------- ##
+## 3. Warnings.  ##
+## ------------- ##
+
+
+# _m4_warn(CATEGORY, MESSAGE, STACK-TRACE)
+# ----------------------------------------
+# Report a MESSAGE to the user if the CATEGORY of warnings is enabled.
+# This is for traces only.
+# The STACK-TRACE is a \n-separated list of "LOCATION: MESSAGE".
+#
+# Within m4, the macro is a no-op.  This macro really matters
+# when autom4te post-processes the trace output.
+m4_define([_m4_warn], [])
+
+
+# m4_warn(CATEGORY, MESSAGE)
+# --------------------------
+# Report a MESSAGE to the user if the CATEGORY of warnings is enabled.
+m4_define([m4_warn],
+[_m4_warn([$1], [$2],
+m4_ifdef([m4_expansion_stack],
+	 [_m4_defn([m4_expansion_stack])
+m4_location[: the top level]]))dnl
+])
+
+
+
+## ------------------- ##
+## 4. File inclusion.  ##
+## ------------------- ##
+
+
+# We also want to neutralize include (and sinclude for symmetry),
+# but we want to extend them slightly: warn when a file is included
+# several times.  This is, in general, a dangerous operation, because
+# too many people forget to quote the first argument of m4_define.
+#
+# For instance in the following case:
+#   m4_define(foo, [bar])
+# then a second reading will turn into
+#   m4_define(bar, [bar])
+# which is certainly not what was meant.
+
+# m4_include_unique(FILE)
+# -----------------------
+# Declare that the FILE was loading; and warn if it has already
+# been included.
+m4_define([m4_include_unique],
+[m4_ifdef([m4_include($1)],
+	  [m4_warn([syntax], [file `$1' included several times])])dnl
+m4_define([m4_include($1)])])
+
+
+# m4_include(FILE)
+# ----------------
+# Like the builtin include, but warns against multiple inclusions.
+m4_define([m4_include],
+[m4_include_unique([$1])dnl
+m4_builtin([include], [$1])])
+
+
+# m4_sinclude(FILE)
+# -----------------
+# Like the builtin sinclude, but warns against multiple inclusions.
+m4_define([m4_sinclude],
+[m4_include_unique([$1])dnl
+m4_builtin([sinclude], [$1])])
+
+
+
+## ------------------------------------ ##
+## 5. Additional branching constructs.  ##
+## ------------------------------------ ##
+
+# Both `m4_ifval' and `m4_ifset' tests against the empty string.  The
+# difference is that `m4_ifset' is specialized on macros.
+#
+# In case of arguments of macros, eg. $1, it makes little difference.
+# In the case of a macro `FOO', you don't want to check `m4_ifval(FOO,
+# TRUE)', because if `FOO' expands with commas, there is a shifting of
+# the arguments.  So you want to run `m4_ifval([FOO])', but then you just
+# compare the *string* `FOO' against `', which, of course fails.
+#
+# So you want the variation `m4_ifset' that expects a macro name as $1.
+# If this macro is both defined and defined to a non empty value, then
+# it runs TRUE, etc.
+
+
+# m4_ifval(COND, [IF-TRUE], [IF-FALSE])
+# -------------------------------------
+# If COND is not the empty string, expand IF-TRUE, otherwise IF-FALSE.
+# Comparable to m4_ifdef.
+m4_define([m4_ifval],
+[m4_if([$1], [], [$3], [$2])])
+
+
+# m4_n(TEXT)
+# ----------
+# If TEXT is not empty, return TEXT and a new line, otherwise nothing.
+m4_define([m4_n],
+[m4_if([$1],
+       [], [],
+	   [$1
+])])
+
+
+# m4_ifvaln(COND, [IF-TRUE], [IF-FALSE])
+# --------------------------------------
+# Same as `m4_ifval', but add an extra newline to IF-TRUE or IF-FALSE
+# unless that argument is empty.
+m4_define([m4_ifvaln],
+[m4_if([$1],
+       [],   [m4_n([$3])],
+	     [m4_n([$2])])])
+
+
+# m4_ifset(MACRO, [IF-TRUE], [IF-FALSE])
+# --------------------------------------
+# If MACRO has no definition, or of its definition is the empty string,
+# expand IF-FALSE, otherwise IF-TRUE.
+m4_define([m4_ifset],
+[m4_ifdef([$1],
+	  [m4_ifval(_m4_defn([$1]), [$2], [$3])],
+	  [$3])])
+
+
+# m4_ifndef(NAME, [IF-NOT-DEFINED], [IF-DEFINED])
+# -----------------------------------------------
+m4_define([m4_ifndef],
+[m4_ifdef([$1], [$3], [$2])])
+
+
+# m4_case(SWITCH, VAL1, IF-VAL1, VAL2, IF-VAL2, ..., DEFAULT)
+# -----------------------------------------------------------
+# m4 equivalent of
+# switch (SWITCH)
+# {
+#   case VAL1:
+#     IF-VAL1;
+#     break;
+#   case VAL2:
+#     IF-VAL2;
+#     break;
+#   ...
+#   default:
+#     DEFAULT;
+#     break;
+# }.
+# All the values are optional, and the macro is robust to active
+# symbols properly quoted.
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([m4_case],
+[m4_if([$#], 0, [],
+       [$#], 1, [],
+       [$#], 2, [$2],
+       [$1], [$2], [$3],
+       [$0([$1], m4_shift3($@))])])
+
+
+# m4_bmatch(SWITCH, RE1, VAL1, RE2, VAL2, ..., DEFAULT)
+# -----------------------------------------------------
+# m4 equivalent of
+#
+# if (SWITCH =~ RE1)
+#   VAL1;
+# elif (SWITCH =~ RE2)
+#   VAL2;
+# elif ...
+#   ...
+# else
+#   DEFAULT
+#
+# All the values are optional, and the macro is robust to active symbols
+# properly quoted.
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([m4_bmatch],
+[m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])],
+       [$#], 1, [m4_fatal([$0: too few arguments: $#: $1])],
+       [$#], 2, [$2],
+       [m4_if(m4_bregexp([$1], [$2]), -1, [$0([$1], m4_shift3($@))],
+	      [$3])])])
+
+
+# m4_car(LIST)
+# m4_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+m4_define([m4_car], [[$1]])
+m4_define([m4_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+       [$#], 1, [],
+       [m4_dquote(m4_shift($@))])])
+
+# _m4_cdr(LIST)
+# -------------
+# Like m4_cdr, except include a leading comma unless only one element
+# remains.  Why?  Because comparing a large list against [] is more
+# expensive in expansion time than comparing the number of arguments; so
+# _m4_cdr can be used to reduce the number of arguments when it is time
+# to end recursion.
+m4_define([_m4_cdr],
+[m4_if([$#], 1, [],
+       [, m4_dquote(m4_shift($@))])])
+
+
+
+# m4_cond(TEST1, VAL1, IF-VAL1, TEST2, VAL2, IF-VAL2, ..., [DEFAULT])
+# -------------------------------------------------------------------
+# Similar to m4_if, except that each TEST is expanded when encountered.
+# If the expansion of TESTn matches the string VALn, the result is IF-VALn.
+# The result is DEFAULT if no tests passed.  This macro allows
+# short-circuiting of expensive tests, where it pays to arrange quick
+# filter tests to run first.
+#
+# For an example, consider a previous implementation of _AS_QUOTE_IFELSE:
+#
+#    m4_if(m4_index([$1], [\]), [-1], [$2],
+#          m4_eval(m4_index([$1], [\\]) >= 0), [1], [$2],
+#          m4_eval(m4_index([$1], [\$]) >= 0), [1], [$2],
+#          m4_eval(m4_index([$1], [\`]) >= 0), [1], [$3],
+#          m4_eval(m4_index([$1], [\"]) >= 0), [1], [$3],
+#          [$2])
+#
+# Here, m4_index is computed 5 times, and m4_eval 4, even if $1 contains
+# no backslash.  It is more efficient to do:
+#
+#    m4_cond([m4_index([$1], [\])], [-1], [$2],
+#            [m4_eval(m4_index([$1], [\\]) >= 0)], [1], [$2],
+#            [m4_eval(m4_index([$1], [\$]) >= 0)], [1], [$2],
+#            [m4_eval(m4_index([$1], [\`]) >= 0)], [1], [$3],
+#            [m4_eval(m4_index([$1], [\"]) >= 0)], [1], [$3],
+#            [$2])
+#
+# In the common case of $1 with no backslash, only one m4_index expansion
+# occurs, and m4_eval is avoided altogether.
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([m4_cond],
+[m4_if([$#], [0], [m4_fatal([$0: cannot be called without arguments])],
+       [$#], [1], [$1],
+       m4_eval([$# % 3]), [2], [m4_fatal([$0: missing an argument])],
+       [_$0($@)])])
+
+m4_define([_m4_cond],
+[m4_if(($1), [($2)], [$3],
+       [$#], [3], [],
+       [$#], [4], [$4],
+       [$0(m4_shift3($@))])])
+
+
+## ---------------------------------------- ##
+## 6. Enhanced version of some primitives.  ##
+## ---------------------------------------- ##
+
+# m4_bpatsubsts(STRING, RE1, SUBST1, RE2, SUBST2, ...)
+# ----------------------------------------------------
+# m4 equivalent of
+#
+#   $_ = STRING;
+#   s/RE1/SUBST1/g;
+#   s/RE2/SUBST2/g;
+#   ...
+#
+# All the values are optional, and the macro is robust to active symbols
+# properly quoted.
+#
+# I would have liked to name this macro `m4_bpatsubst', unfortunately,
+# due to quotation problems, I need to double quote $1 below, therefore
+# the anchors are broken :(  I can't let users be trapped by that.
+#
+# Recall that m4_shift3 always results in an argument.  Hence, we need
+# to distinguish between a final deletion vs. ending recursion.
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([m4_bpatsubsts],
+[m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])],
+       [$#], 1, [m4_fatal([$0: too few arguments: $#: $1])],
+       [$#], 2, [m4_unquote(m4_builtin([patsubst], [[$1]], [$2]))],
+       [$#], 3, [m4_unquote(m4_builtin([patsubst], [[$1]], [$2], [$3]))],
+       [_$0($@m4_if(m4_eval($# & 1), 0, [,]))])])
+m4_define([_m4_bpatsubsts],
+[m4_if([$#], 2, [$1],
+       [$0(m4_builtin([patsubst], [[$1]], [$2], [$3]),
+	   m4_shift3($@))])])
+
+
+# m4_define_default(MACRO, VALUE)
+# -------------------------------
+# If MACRO is undefined, set it to VALUE.
+m4_define([m4_define_default],
+[m4_ifndef([$1], [m4_define($@)])])
+
+
+# m4_default(EXP1, EXP2)
+# ----------------------
+# Returns EXP1 if non empty, otherwise EXP2.
+#
+# This macro is called on hot paths, so inline the contents of m4_ifval,
+# for one less round of expansion.
+m4_define([m4_default],
+[m4_if([$1], [], [$2], [$1])])
+
+
+# m4_defn(NAME)
+# -------------
+# Like the original, except guarantee a warning when using something which is
+# undefined (unlike M4 1.4.x).  This replacement is not a full-featured
+# replacement: if any of the defined macros contain unbalanced quoting, but
+# when pasted together result in a well-quoted string, then only native m4
+# support is able to get it correct.  But that's where quadrigraphs come in
+# handy, if you really need unbalanced quotes inside your macros.
+#
+# This macro is called frequently, so minimize the amount of additional
+# expansions by skipping m4_ifndef.  Better yet, if __m4_version__ exists,
+# (added in M4 1.6), then let m4 do the job for us (see m4_init).
+#
+# _m4_defn is for internal use only - it bypasses the wrapper, so it
+# must only be used on one argument at a time, and only on macros
+# known to be defined.  Make sure this still works if the user renames
+# m4_defn but not _m4_defn.
+m4_copy([m4_defn], [_m4_defn])
+m4_define([m4_defn],
+[m4_if([$#], [0], [[$0]],
+       [$#], [1], [m4_ifdef([$1], [_m4_defn([$1])],
+			    [m4_fatal([$0: undefined macro: $1])])],
+       [m4_foreach([_m4_macro], [$@], [$0(_m4_defn([_m4_macro]))])])])
+
+
+# _m4_dumpdefs_up(NAME)
+# ---------------------
+m4_define([_m4_dumpdefs_up],
+[m4_ifdef([$1],
+	  [m4_pushdef([_m4_dumpdefs], _m4_defn([$1]))dnl
+m4_dumpdef([$1])dnl
+_m4_popdef([$1])dnl
+_m4_dumpdefs_up([$1])])])
+
+
+# _m4_dumpdefs_down(NAME)
+# -----------------------
+m4_define([_m4_dumpdefs_down],
+[m4_ifdef([_m4_dumpdefs],
+	  [m4_pushdef([$1], _m4_defn([_m4_dumpdefs]))dnl
+_m4_popdef([_m4_dumpdefs])dnl
+_m4_dumpdefs_down([$1])])])
+
+
+# m4_dumpdefs(NAME)
+# -----------------
+# Similar to `m4_dumpdef(NAME)', but if NAME was m4_pushdef'ed, display its
+# value stack (most recent displayed first).
+m4_define([m4_dumpdefs],
+[_m4_dumpdefs_up([$1])dnl
+_m4_dumpdefs_down([$1])])
+
+
+# m4_popdef(NAME)
+# ---------------
+# Like the original, except guarantee a warning when using something which is
+# undefined (unlike M4 1.4.x).
+#
+# This macro is called frequently, so minimize the amount of additional
+# expansions by skipping m4_ifndef.  Better yet, if __m4_version__ exists,
+# (added in M4 1.6), then let m4 do the job for us (see m4_init).
+#
+# _m4_popdef is for internal use only - it bypasses the wrapper, so it
+# must only be used on macros known to be defined.  Make sure this
+# still works if the user renames m4_popdef but not _m4_popdef.
+m4_copy([m4_popdef], [_m4_popdef])
+m4_define([m4_popdef],
+[m4_if([$#], [0], [[$0]],
+       [$#], [1], [m4_ifdef([$1], [_m4_popdef([$1])],
+			    [m4_fatal([$0: undefined macro: $1])])],
+       [m4_foreach([_m4_macro], [$@], [$0(_m4_defn([_m4_macro]))])])])
+
+
+# m4_shiftn(N, ...)
+# -----------------
+# Returns ... shifted N times.  Useful for recursive "varargs" constructs.
+#
+# Autoconf does not use this macro, because it is inherently slower than
+# calling the common cases of m4_shift2 or m4_shift3 directly.  But it
+# might as well be fast for other clients, such as Libtool.  One way to
+# do this is to expand $@ only once in _m4_shiftn (otherwise, for long
+# lists, the expansion of m4_if takes twice as much memory as what the
+# list itself occupies, only to throw away the unused branch).  The end
+# result is strictly equivalent to
+#   m4_if([$1], 1, [m4_shift(,m4_shift(m4_shift($@)))],
+#         [_m4_shiftn(m4_decr([$1]), m4_shift(m4_shift($@)))])
+# but with the final `m4_shift(m4_shift($@)))' shared between the two
+# paths.  The first leg uses a no-op m4_shift(,$@) to balance out the ().
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([m4_shiftn],
+[m4_assert(0 < $1 && $1 < $#)_$0($@)])
+
+m4_define([_m4_shiftn],
+[m4_if([$1], 1, [m4_shift(],
+       [$0(m4_decr([$1])]), m4_shift(m4_shift($@)))])
+
+# m4_shift2(...)
+# m4_shift3(...)
+# -----------------
+# Returns ... shifted twice, and three times.  Faster than m4_shiftn.
+m4_define([m4_shift2], [m4_shift(m4_shift($@))])
+m4_define([m4_shift3], [m4_shift(m4_shift(m4_shift($@)))])
+
+# _m4_shift2(...)
+# _m4_shift3(...)
+# ---------------
+# Like m4_shift2 or m4_shift3, except include a leading comma unless shifting
+# consumes all arguments.  Why?  Because in recursion, it is nice to
+# distinguish between 1 element left and 0 elements left, based on how many
+# arguments this shift expands to.
+m4_define([_m4_shift2],
+[m4_if([$#], [2], [],
+       [, m4_shift(m4_shift($@))])])
+m4_define([_m4_shift3],
+[m4_if([$#], [3], [],
+       [, m4_shift(m4_shift(m4_shift($@)))])])
+
+
+# m4_undefine(NAME)
+# -----------------
+# Like the original, except guarantee a warning when using something which is
+# undefined (unlike M4 1.4.x).
+#
+# This macro is called frequently, so minimize the amount of additional
+# expansions by skipping m4_ifndef.  Better yet, if __m4_version__ exists,
+# (added in M4 1.6), then let m4 do the job for us (see m4_init).
+#
+# _m4_undefine is for internal use only - it bypasses the wrapper, so
+# it must only be used on macros known to be defined.  Make sure this
+# still works if the user renames m4_undefine but not _m4_undefine.
+m4_copy([m4_undefine], [_m4_undefine])
+m4_define([m4_undefine],
+[m4_if([$#], [0], [[$0]],
+       [$#], [1], [m4_ifdef([$1], [_m4_undefine([$1])],
+			    [m4_fatal([$0: undefined macro: $1])])],
+       [m4_foreach([_m4_macro], [$@], [$0(_m4_defn([_m4_macro]))])])])
+
+# _m4_wrap(PRE, POST)
+# -------------------
+# Helper macro for m4_wrap and m4_wrap_lifo.  Allows nested calls to
+# m4_wrap within wrapped text.  Use _m4_defn and _m4_popdef for speed.
+m4_define([_m4_wrap],
+[m4_ifdef([$0_text],
+	  [m4_define([$0_text], [$1]_m4_defn([$0_text])[$2])],
+	  [m4_builtin([m4wrap], [m4_unquote(
+  _m4_defn([$0_text])_m4_popdef([$0_text]))])m4_define([$0_text], [$1$2])])])
+
+# m4_wrap(TEXT)
+# -------------
+# Append TEXT to the list of hooks to be executed at the end of input.
+# Whereas the order of the original may be LIFO in the underlying m4,
+# this version is always FIFO.
+m4_define([m4_wrap],
+[_m4_wrap([], [$1[]])])
+
+# m4_wrap_lifo(TEXT)
+# ------------------
+# Prepend TEXT to the list of hooks to be executed at the end of input.
+# Whereas the order of m4_wrap may be FIFO in the underlying m4, this
+# version is always LIFO.
+m4_define([m4_wrap_lifo],
+[_m4_wrap([$1[]])])
+
+## ------------------------- ##
+## 7. Quoting manipulation.  ##
+## ------------------------- ##
+
+
+# m4_apply(MACRO, LIST)
+# ---------------------
+# Invoke MACRO, with arguments provided from the quoted list of
+# comma-separated quoted arguments.  If LIST is empty, invoke MACRO
+# without arguments.  The expansion will not be concatenated with
+# subsequent text.
+m4_define([m4_apply],
+[m4_if([$2], [], [$1], [$1($2)])[]])
+
+# _m4_apply(MACRO, LIST)
+# ----------------------
+# Like m4_apply, except do nothing if LIST is empty.
+m4_define([_m4_apply],
+[m4_if([$2], [], [], [$1($2)[]])])
+
+
+# m4_count(ARGS)
+# --------------
+# Return a count of how many ARGS are present.
+m4_define([m4_count], [$#])
+
+
+# m4_do(STRING, ...)
+# ------------------
+# This macro invokes all its arguments (in sequence, of course).  It is
+# useful for making your macros more structured and readable by dropping
+# unnecessary dnl's and have the macros indented properly.  No concatenation
+# occurs after a STRING; use m4_unquote(m4_join(,STRING)) for that.
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([m4_do],
+[m4_if([$#], 0, [],
+       [$#], 1, [$1[]],
+       [$1[]$0(m4_shift($@))])])
+
+
+# m4_dquote(ARGS)
+# ---------------
+# Return ARGS as a quoted list of quoted arguments.
+m4_define([m4_dquote],  [[$@]])
+
+
+# m4_dquote_elt(ARGS)
+# -------------------
+# Return ARGS as an unquoted list of double-quoted arguments.
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([m4_dquote_elt],
+[m4_if([$#], [0], [],
+       [$#], [1], [[[$1]]],
+       [[[$1]],$0(m4_shift($@))])])
+
+
+# m4_echo(ARGS)
+# -------------
+# Return the ARGS, with the same level of quoting.  Whitespace after
+# unquoted commas are consumed.
+m4_define([m4_echo], [$@])
+
+
+# m4_expand(ARG)
+# --------------
+# Return the expansion of ARG as a single string.  Unlike m4_quote($1), this
+# correctly preserves whitespace following single-quoted commas that appeared
+# within ARG.
+#
+#   m4_define([active], [ACT, IVE])
+#   m4_define([active2], [[ACT, IVE]])
+#   m4_quote(active, active2)
+#   => ACT,IVE,ACT, IVE
+#   m4_expand([active, active2])
+#   => ACT, IVE, ACT, IVE
+#
+# Unfortunately, due to limitations in m4, ARG must expand to something
+# with balanced quotes (use quadrigraphs to get around this).  The input
+# is not likely to have unbalanced -=<{(/)}>=- quotes, and it is possible
+# to have unbalanced (), provided it was specified with proper [] quotes.
+#
+# Exploit that extra () will group unquoted commas and the following
+# whitespace, then convert () to [].  m4_bpatsubst can't handle newlines
+# inside $1, and m4_substr strips quoting.  So we (ab)use m4_changequote.
+m4_define([m4_expand], [_$0(-=<{($1)}>=-)])
+m4_define([_m4_expand],
+[m4_changequote([-=<{(], [)}>=-])$1m4_changequote([, ])])
+
+
+# m4_ignore(ARGS)
+# ---------------
+# Expands to nothing.  Useful for conditionally ignoring an arbitrary
+# number of arguments (see _m4_list_cmp for an example).
+m4_define([m4_ignore])
+
+
+# m4_make_list(ARGS)
+# ------------------
+# Similar to m4_dquote, this creates a quoted list of quoted ARGS.  This
+# version is less efficient than m4_dquote, but separates each argument
+# with a comma and newline, rather than just comma, for readability.
+# When developing an m4sugar algorithm, you could temporarily use
+#   m4_pushdef([m4_dquote],m4_defn([m4_make_list]))
+# around your code to make debugging easier.
+m4_define([m4_make_list], [m4_join([,
+], m4_dquote_elt($@))])
+
+
+# m4_noquote(STRING)
+# ------------------
+# Return the result of ignoring all quotes in STRING and invoking the
+# macros it contains.  Amongst other things, this is useful for enabling
+# macro invocations inside strings with [] blocks (for instance regexps
+# and help-strings).  On the other hand, since all quotes are disabled,
+# any macro expanded during this time that relies on nested [] quoting
+# will likely crash and burn.  This macro is seldom useful; consider
+# m4_unquote or m4_expand instead.
+m4_define([m4_noquote],
+[m4_changequote([-=<{(],[)}>=-])$1-=<{()}>=-m4_changequote([,])])
+
+
+# m4_quote(ARGS)
+# --------------
+# Return ARGS as a single argument.  Any whitespace after unquoted commas
+# is stripped.  There is always output, even when there were no arguments.
+#
+# It is important to realize the difference between `m4_quote(exp)' and
+# `[exp]': in the first case you obtain the quoted *result* of the
+# expansion of EXP, while in the latter you just obtain the string
+# `exp'.
+m4_define([m4_quote],  [[$*]])
+
+
+# _m4_quote(ARGS)
+# ---------------
+# Like m4_quote, except that when there are no arguments, there is no
+# output.  For conditional scenarios (such as passing _m4_quote as the
+# macro name in m4_mapall), this feature can be used to distinguish between
+# one argument of the empty string vs. no arguments.  However, in the
+# normal case with arguments present, this is less efficient than m4_quote.
+m4_define([_m4_quote],
+[m4_if([$#], [0], [], [[$*]])])
+
+
+# m4_reverse(ARGS)
+# ----------------
+# Output ARGS in reverse order.
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([m4_reverse],
+[m4_if([$#], [0], [], [$#], [1], [[$1]],
+       [$0(m4_shift($@)), [$1]])])
+
+
+# m4_unquote(ARGS)
+# ----------------
+# Remove one layer of quotes from each ARG, performing one level of
+# expansion.  For one argument, m4_unquote([arg]) is more efficient than
+# m4_do([arg]), but for multiple arguments, the difference is that
+# m4_unquote separates arguments with commas while m4_do concatenates.
+# Follow this macro with [] if concatenation with subsequent text is
+# undesired.
+m4_define([m4_unquote], [$*])
+
+
+## -------------------------- ##
+## 8. Implementing m4 loops.  ##
+## -------------------------- ##
+
+
+# m4_for(VARIABLE, FIRST, LAST, [STEP = +/-1], EXPRESSION)
+# --------------------------------------------------------
+# Expand EXPRESSION defining VARIABLE to FROM, FROM + 1, ..., TO with
+# increments of STEP.  Both limits are included, and bounds are
+# checked for consistency.  The algorithm is robust to indirect
+# VARIABLE names.  Changing VARIABLE inside EXPRESSION will not impact
+# the number of iterations.
+#
+# Uses _m4_defn for speed, and avoid dnl in the macro body.
+m4_define([m4_for],
+[m4_pushdef([$1], m4_eval([$2]))]dnl
+[m4_cond([m4_eval(([$3]) > ([$2]))], 1,
+	   [m4_pushdef([_m4_step], m4_eval(m4_default([$4],
+	      1)))m4_assert(_m4_step > 0)_$0([$1], _m4_defn([$1]),
+  m4_eval((([$3]) - ([$2])) / _m4_step * _m4_step + ([$2])),
+  _m4_step, [$5])],
+	 [m4_eval(([$3]) < ([$2]))], 1,
+	   [m4_pushdef([_m4_step], m4_eval(m4_default([$4],
+	      -1)))m4_assert(_m4_step < 0)_$0([$1], _m4_defn([$1]),
+  m4_eval((([$2]) - ([$3])) / -(_m4_step) * _m4_step + ([$2])),
+  _m4_step, [$5])],
+	 [m4_pushdef([_m4_step])$5])[]]dnl
+[m4_popdef([_m4_step], [$1])])
+
+
+# _m4_for(VARIABLE, COUNT, LAST, STEP, EXPRESSION)
+# ------------------------------------------------
+# Core of the loop, no consistency checks, all arguments are plain
+# numbers.  Define VARIABLE to COUNT, expand EXPRESSION, then alter
+# COUNT by STEP and iterate if COUNT is not LAST.
+m4_define([_m4_for],
+[m4_define([$1], [$2])$5[]m4_if([$2], [$3], [],
+      [$0([$1], m4_eval([$2 + $4]), [$3], [$4], [$5])])])
+
+
+# Implementing `foreach' loops in m4 is much more tricky than it may
+# seem.  For example, the old M4 1.4.4 manual had an incorrect example,
+# which looked like this (when translated to m4sugar):
+#
+# | # foreach(VAR, (LIST), STMT)
+# | m4_define([foreach],
+# |   [m4_pushdef([$1])_foreach([$1], [$2], [$3])m4_popdef([$1])])
+# | m4_define([_arg1], [$1])
+# | m4_define([_foreach],
+# |   [m4_if([$2], [()], ,
+# |     [m4_define([$1], _arg1$2)$3[]_foreach([$1], (m4_shift$2), [$3])])])
+#
+# But then if you run
+#
+# | m4_define(a, 1)
+# | m4_define(b, 2)
+# | m4_define(c, 3)
+# | foreach([f], [([a], [(b], [c)])], [echo f
+# | ])
+#
+# it gives
+#
+#  => echo 1
+#  => echo (2,3)
+#
+# which is not what is expected.
+#
+# Of course the problem is that many quotes are missing.  So you add
+# plenty of quotes at random places, until you reach the expected
+# result.  Alternatively, if you are a quoting wizard, you directly
+# reach the following implementation (but if you really did, then
+# apply to the maintenance of m4sugar!).
+#
+# | # foreach(VAR, (LIST), STMT)
+# | m4_define([foreach], [m4_pushdef([$1])_foreach($@)m4_popdef([$1])])
+# | m4_define([_arg1], [[$1]])
+# | m4_define([_foreach],
+# |  [m4_if($2, [()], ,
+# |    [m4_define([$1], [_arg1$2])$3[]_foreach([$1], [(m4_shift$2)], [$3])])])
+#
+# which this time answers
+#
+#  => echo a
+#  => echo (b
+#  => echo c)
+#
+# Bingo!
+#
+# Well, not quite.
+#
+# With a better look, you realize that the parens are more a pain than
+# a help: since anyway you need to quote properly the list, you end up
+# with always using an outermost pair of parens and an outermost pair
+# of quotes.  Rejecting the parens both eases the implementation, and
+# simplifies the use:
+#
+# | # foreach(VAR, (LIST), STMT)
+# | m4_define([foreach], [m4_pushdef([$1])_foreach($@)m4_popdef([$1])])
+# | m4_define([_arg1], [$1])
+# | m4_define([_foreach],
+# |  [m4_if($2, [], ,
+# |    [m4_define([$1], [_arg1($2)])$3[]_foreach([$1], [m4_shift($2)], [$3])])])
+#
+#
+# Now, just replace the `$2' with `m4_quote($2)' in the outer `m4_if'
+# to improve robustness, and you come up with a nice implementation
+# that doesn't require extra parentheses in the user's LIST.
+#
+# But wait -  now the algorithm is quadratic, because every recursion of
+# the algorithm keeps the entire LIST and merely adds another m4_shift to
+# the quoted text.  If the user has a lot of elements in LIST, you can
+# bring the system to its knees with the memory m4 then requires, or trip
+# the m4 --nesting-limit recursion factor.  The only way to avoid
+# quadratic growth is ensure m4_shift is expanded prior to the recursion.
+# Hence the design below.
+#
+# The M4 manual now includes a chapter devoted to this issue, with
+# the lessons learned from m4sugar.  And still, this design is only
+# optimal for M4 1.6; see foreach.m4 for yet more comments on why
+# M4 1.4.x uses yet another implementation.
+
+
+# m4_foreach(VARIABLE, LIST, EXPRESSION)
+# --------------------------------------
+#
+# Expand EXPRESSION assigning each value of the LIST to VARIABLE.
+# LIST should have the form `item_1, item_2, ..., item_n', i.e. the
+# whole list must *quoted*.  Quote members too if you don't want them
+# to be expanded.
+#
+# This macro is robust to active symbols:
+#      | m4_define(active, [ACT, IVE])
+#      | m4_foreach(Var, [active, active], [-Var-])
+#     => -ACT--IVE--ACT--IVE-
+#
+#      | m4_foreach(Var, [[active], [active]], [-Var-])
+#     => -ACT, IVE--ACT, IVE-
+#
+#      | m4_foreach(Var, [[[active]], [[active]]], [-Var-])
+#     => -active--active-
+#
+# This macro is called frequently, so avoid extra expansions such as
+# m4_ifval and dnl.  Also, since $2 might be quite large, try to use it
+# as little as possible in _m4_foreach; each extra use requires that much
+# more memory for expansion.  So, rather than directly compare $2 against
+# [] and use m4_car/m4_cdr for recursion, we instead unbox the list (which
+# requires swapping the argument order in the helper), insert an ignored
+# third argument, and use m4_shift3 to detect when recursion is complete.
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([m4_foreach],
+[m4_if([$2], [], [],
+       [m4_pushdef([$1])_$0([$1], [$3], [], $2)m4_popdef([$1])])])
+
+m4_define([_m4_foreach],
+[m4_if([$#], [3], [],
+       [m4_define([$1], [$4])$2[]$0([$1], [$2], m4_shift3($@))])])
+
+
+# m4_foreach_w(VARIABLE, LIST, EXPRESSION)
+# ----------------------------------------
+#
+# Like m4_foreach, but the list is whitespace separated.
+#
+# This macro is robust to active symbols:
+#    m4_foreach_w([Var], [ active
+#    b	act\
+#    ive  ], [-Var-])end
+#    => -active--b--active-end
+#
+m4_define([m4_foreach_w],
+[m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])
+
+
+# m4_map(MACRO, LIST)
+# m4_mapall(MACRO, LIST)
+# ----------------------
+# Invoke MACRO($1), MACRO($2) etc. where $1, $2... are the elements of
+# LIST.  $1, $2... must in turn be lists, appropriate for m4_apply.
+# If LIST contains an empty sublist, m4_map skips the expansion of
+# MACRO, while m4_mapall expands MACRO with no arguments.
+#
+# Since LIST may be quite large, we want to minimize how often it
+# appears in the expansion.  Rather than use m4_car/m4_cdr iteration,
+# we unbox the list, ignore the second argument, and use m4_shift2 to
+# detect the end of recursion.  The mismatch in () is intentional; see
+# _m4_map.  For m4_map, an empty list behaves like an empty sublist
+# and gets ignored; for m4_mapall, we must special-case the empty
+# list.
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([m4_map],
+[_m4_map([_m4_apply([$1]], [], $2)])
+
+m4_define([m4_mapall],
+[m4_if([$2], [], [],
+       [_m4_map([m4_apply([$1]], [], $2)])])
+
+
+# m4_map_sep(MACRO, SEPARATOR, LIST)
+# m4_mapall_sep(MACRO, SEPARATOR, LIST)
+# -------------------------------------
+# Invoke MACRO($1), SEPARATOR, MACRO($2), ..., MACRO($N) where $1,
+# $2... $N are the elements of LIST, and are in turn lists appropriate
+# for m4_apply.  SEPARATOR is expanded, in order to allow the creation
+# of a list of arguments by using a single-quoted comma as the
+# separator.  For each empty sublist, m4_map_sep skips the expansion
+# of MACRO and SEPARATOR, while m4_mapall_sep expands MACRO with no
+# arguments.
+#
+# For m4_mapall_sep, merely expand the first iteration without the
+# separator, then include separator as part of subsequent recursion;
+# but avoid extra expansion of LIST's side-effects via a helper macro.
+# For m4_map_sep, things are trickier - we don't know if the first
+# list element is an empty sublist, so we must define a self-modifying
+# helper macro and use that as the separator instead.
+m4_define([m4_map_sep],
+[m4_pushdef([m4_Sep], [m4_define([m4_Sep], _m4_defn([m4_unquote]))])]dnl
+[_m4_map([_m4_apply([m4_Sep([$2])[]$1]], [], $3)m4_popdef([m4_Sep])])
+
+m4_define([m4_mapall_sep],
+[m4_if([$3], [], [], [_$0([$1], [$2], $3)])])
+
+m4_define([_m4_mapall_sep],
+[m4_apply([$1], [$3])_m4_map([m4_apply([$2[]$1]], m4_shift2($@))])
+
+# _m4_map(PREFIX, IGNORED, SUBLIST, ...)
+# --------------------------------------
+# Common implementation for all four m4_map variants.  The mismatch in
+# the number of () is intentional.  PREFIX must supply a form of
+# m4_apply, the open `(', and the MACRO to be applied.  Each iteration
+# then appends `,', the current SUBLIST and the closing `)', then
+# recurses to the next SUBLIST.  IGNORED is an aid to ending recursion
+# efficiently.
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([_m4_map],
+[m4_if([$#], [2], [],
+       [$1, [$3])$0([$1], m4_shift2($@))])])
+
+# m4_transform(EXPRESSION, ARG...)
+# --------------------------------
+# Expand EXPRESSION([ARG]) for each argument.  More efficient than
+# m4_foreach([var], [ARG...], [EXPRESSION(m4_defn([var]))])
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([m4_transform],
+[m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
+       [$#], [1], [],
+       [$#], [2], [$1([$2])[]],
+       [$1([$2])[]$0([$1], m4_shift2($@))])])
+
+
+# m4_transform_pair(EXPRESSION, [END-EXPR = EXPRESSION], ARG...)
+# --------------------------------------------------------------
+# Perform a pairwise grouping of consecutive ARGs, by expanding
+# EXPRESSION([ARG1], [ARG2]).  If there are an odd number of ARGs, the
+# final argument is expanded with END-EXPR([ARGn]).
+#
+# For example:
+#   m4_define([show], [($*)m4_newline])dnl
+#   m4_transform_pair([show], [], [a], [b], [c], [d], [e])dnl
+#   => (a,b)
+#   => (c,d)
+#   => (e)
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([m4_transform_pair],
+[m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
+       [$#], [1], [m4_fatal([$0: too few arguments: $#: $1])],
+       [$#], [2], [],
+       [$#], [3], [m4_default([$2], [$1])([$3])[]],
+       [$#], [4], [$1([$3], [$4])[]],
+       [$1([$3], [$4])[]$0([$1], [$2], m4_shift(m4_shift3($@)))])])
+
+
+## --------------------------- ##
+## 9. More diversion support.  ##
+## --------------------------- ##
+
+
+# _m4_divert(DIVERSION-NAME or NUMBER)
+# ------------------------------------
+# If DIVERSION-NAME is the name of a diversion, return its number,
+# otherwise if it is a NUMBER return it.
+m4_define([_m4_divert],
+[m4_ifdef([_m4_divert($1)],
+	  [m4_indir([_m4_divert($1)])],
+	  [$1])])
+
+# KILL is only used to suppress output.
+m4_define([_m4_divert(KILL)],           -1)
+
+# The empty diversion name is a synonym for 0.
+m4_define([_m4_divert()],                0)
+
+
+# _m4_divert_n_stack
+# ------------------
+# Print m4_divert_stack with newline prepended, if it's nonempty.
+m4_define([_m4_divert_n_stack],
+[m4_ifdef([m4_divert_stack], [
+_m4_defn([m4_divert_stack])])])
+
+
+# m4_divert(DIVERSION-NAME)
+# -------------------------
+# Change the diversion stream to DIVERSION-NAME.
+m4_define([m4_divert],
+[m4_define([m4_divert_stack], m4_location[: $0: $1]_m4_divert_n_stack)]dnl
+[m4_builtin([divert], _m4_divert([$1]))])
+
+
+# m4_divert_push(DIVERSION-NAME)
+# ------------------------------
+# Change the diversion stream to DIVERSION-NAME, while stacking old values.
+m4_define([m4_divert_push],
+[m4_pushdef([m4_divert_stack], m4_location[: $0: $1]_m4_divert_n_stack)]dnl
+[m4_pushdef([_m4_divert_diversion], [$1])]dnl
+[m4_builtin([divert], _m4_divert([$1]))])
+
+
+# m4_divert_pop([DIVERSION-NAME])
+# -------------------------------
+# Change the diversion stream to its previous value, unstacking it.
+# If specified, verify we left DIVERSION-NAME.
+# When we pop the last value from the stack, we divert to -1.
+m4_define([m4_divert_pop],
+[m4_ifndef([_m4_divert_diversion],
+	   [m4_fatal([too many m4_divert_pop])])]dnl
+[m4_if([$1], [], [],
+       [$1], _m4_defn([_m4_divert_diversion]), [],
+       [m4_fatal([$0($1): diversion mismatch: ]_m4_divert_n_stack)])]dnl
+[_m4_popdef([m4_divert_stack], [_m4_divert_diversion])]dnl
+[m4_builtin([divert],
+	    m4_ifdef([_m4_divert_diversion],
+		     [_m4_divert(_m4_defn([_m4_divert_diversion]))],
+		     -1))])
+
+
+# m4_divert_text(DIVERSION-NAME, CONTENT)
+# ---------------------------------------
+# Output CONTENT into DIVERSION-NAME (which may be a number actually).
+# An end of line is appended for free to CONTENT.
+m4_define([m4_divert_text],
+[m4_divert_push([$1])$2
+m4_divert_pop([$1])])
+
+
+# m4_divert_once(DIVERSION-NAME, CONTENT)
+# ---------------------------------------
+# Output CONTENT into DIVERSION-NAME once, if not already there.
+# An end of line is appended for free to CONTENT.
+m4_define([m4_divert_once],
+[m4_expand_once([m4_divert_text([$1], [$2])])])
+
+
+# m4_undivert(DIVERSION-NAME)
+# ---------------------------
+# Undivert DIVERSION-NAME.  Unlike the M4 version, this only takes a single
+# diversion identifier, and should not be used to undivert files.
+m4_define([m4_undivert],
+[m4_builtin([undivert], _m4_divert([$1]))])
+
+
+## --------------------------------------------- ##
+## 10. Defining macros with bells and whistles.  ##
+## --------------------------------------------- ##
+
+# `m4_defun' is basically `m4_define' but it equips the macro with the
+# needed machinery for `m4_require'.  A macro must be m4_defun'd if
+# either it is m4_require'd, or it m4_require's.
+#
+# Two things deserve attention and are detailed below:
+#  1. Implementation of m4_require
+#  2. Keeping track of the expansion stack
+#
+# 1. Implementation of m4_require
+# ===============================
+#
+# Of course m4_defun AC_PROVIDE's the macro, so that a macro which has
+# been expanded is not expanded again when m4_require'd, but the
+# difficult part is the proper expansion of macros when they are
+# m4_require'd.
+#
+# The implementation is based on two ideas, (i) using diversions to
+# prepare the expansion of the macro and its dependencies (by Franc,ois
+# Pinard), and (ii) expand the most recently m4_require'd macros _after_
+# the previous macros (by Axel Thimm).
+#
+#
+# The first idea: why use diversions?
+# -----------------------------------
+#
+# When a macro requires another, the other macro is expanded in new
+# diversion, GROW.  When the outer macro is fully expanded, we first
+# undivert the most nested diversions (GROW - 1...), and finally
+# undivert GROW.  To understand why we need several diversions,
+# consider the following example:
+#
+# | m4_defun([TEST1], [Test...REQUIRE([TEST2])1])
+# | m4_defun([TEST2], [Test...REQUIRE([TEST3])2])
+# | m4_defun([TEST3], [Test...3])
+#
+# Because m4_require is not required to be first in the outer macros, we
+# must keep the expansions of the various levels of m4_require separated.
+# Right before executing the epilogue of TEST1, we have:
+#
+#	   GROW - 2: Test...3
+#	   GROW - 1: Test...2
+#	   GROW:     Test...1
+#	   BODY:
+#
+# Finally the epilogue of TEST1 undiverts GROW - 2, GROW - 1, and
+# GROW into the regular flow, BODY.
+#
+#	   GROW - 2:
+#	   GROW - 1:
+#	   GROW:
+#	   BODY:        Test...3; Test...2; Test...1
+#
+# (The semicolons are here for clarification, but of course are not
+# emitted.)  This is what Autoconf 2.0 (I think) to 2.13 (I'm sure)
+# implement.
+#
+#
+# The second idea: first required first out
+# -----------------------------------------
+#
+# The natural implementation of the idea above is buggy and produces
+# very surprising results in some situations.  Let's consider the
+# following example to explain the bug:
+#
+# | m4_defun([TEST1],  [REQUIRE([TEST2a])REQUIRE([TEST2b])])
+# | m4_defun([TEST2a], [])
+# | m4_defun([TEST2b], [REQUIRE([TEST3])])
+# | m4_defun([TEST3],  [REQUIRE([TEST2a])])
+# |
+# | AC_INIT
+# | TEST1
+#
+# The dependencies between the macros are:
+#
+#		 3 --- 2b
+#		/        \              is m4_require'd by
+#	       /          \       left -------------------- right
+#	    2a ------------ 1
+#
+# If you strictly apply the rules given in the previous section you get:
+#
+#	   GROW - 2: TEST3
+#	   GROW - 1: TEST2a; TEST2b
+#	   GROW:     TEST1
+#	   BODY:
+#
+# (TEST2a, although required by TEST3 is not expanded in GROW - 3
+# because is has already been expanded before in GROW - 1, so it has
+# been AC_PROVIDE'd, so it is not expanded again) so when you undivert
+# the stack of diversions, you get:
+#
+#	   GROW - 2:
+#	   GROW - 1:
+#	   GROW:
+#	   BODY:        TEST3; TEST2a; TEST2b; TEST1
+#
+# i.e., TEST2a is expanded after TEST3 although the latter required the
+# former.
+#
+# Starting from 2.50, we use an implementation provided by Axel Thimm.
+# The idea is simple: the order in which macros are emitted must be the
+# same as the one in which macros are expanded.  (The bug above can
+# indeed be described as: a macro has been AC_PROVIDE'd before its
+# dependent, but it is emitted after: the lack of correlation between
+# emission and expansion order is guilty).
+#
+# How to do that?  You keep the stack of diversions to elaborate the
+# macros, but each time a macro is fully expanded, emit it immediately.
+#
+# In the example above, when TEST2a is expanded, but it's epilogue is
+# not run yet, you have:
+#
+#	   GROW - 2:
+#	   GROW - 1: TEST2a
+#	   GROW:     Elaboration of TEST1
+#	   BODY:
+#
+# The epilogue of TEST2a emits it immediately:
+#
+#	   GROW - 2:
+#	   GROW - 1:
+#	   GROW:     Elaboration of TEST1
+#	   BODY:     TEST2a
+#
+# TEST2b then requires TEST3, so right before the epilogue of TEST3, you
+# have:
+#
+#	   GROW - 2: TEST3
+#	   GROW - 1: Elaboration of TEST2b
+#	   GROW:     Elaboration of TEST1
+#	   BODY:      TEST2a
+#
+# The epilogue of TEST3 emits it:
+#
+#	   GROW - 2:
+#	   GROW - 1: Elaboration of TEST2b
+#	   GROW:     Elaboration of TEST1
+#	   BODY:     TEST2a; TEST3
+#
+# TEST2b is now completely expanded, and emitted:
+#
+#	   GROW - 2:
+#	   GROW - 1:
+#	   GROW:     Elaboration of TEST1
+#	   BODY:     TEST2a; TEST3; TEST2b
+#
+# and finally, TEST1 is finished and emitted:
+#
+#	   GROW - 2:
+#	   GROW - 1:
+#	   GROW:
+#	   BODY:     TEST2a; TEST3; TEST2b: TEST1
+#
+# The idea is simple, but the implementation is a bit evolved.  If you
+# are like me, you will want to see the actual functioning of this
+# implementation to be convinced.  The next section gives the full
+# details.
+#
+#
+# The Axel Thimm implementation at work
+# -------------------------------------
+#
+# We consider the macros above, and this configure.ac:
+#
+#	    AC_INIT
+#	    TEST1
+#
+# You should keep the definitions of _m4_defun_pro, _m4_defun_epi, and
+# m4_require at hand to follow the steps.
+#
+# This implements tries not to assume that the current diversion is
+# BODY, so as soon as a macro (m4_defun'd) is expanded, we first
+# record the current diversion under the name _m4_divert_dump (denoted
+# DUMP below for short).  This introduces an important difference with
+# the previous versions of Autoconf: you cannot use m4_require if you
+# are not inside an m4_defun'd macro, and especially, you cannot
+# m4_require directly from the top level.
+#
+# We have not tried to simulate the old behavior (better yet, we
+# diagnose it), because it is too dangerous: a macro m4_require'd from
+# the top level is expanded before the body of `configure', i.e., before
+# any other test was run.  I let you imagine the result of requiring
+# AC_STDC_HEADERS for instance, before AC_PROG_CC was actually run....
+#
+# After AC_INIT was run, the current diversion is BODY.
+# * AC_INIT was run
+#   DUMP:                undefined
+#   diversion stack:     BODY |-
+#
+# * TEST1 is expanded
+# The prologue of TEST1 sets _m4_divert_dump, which is the diversion
+# where the current elaboration will be dumped, to the current
+# diversion.  It also m4_divert_push to GROW, where the full
+# expansion of TEST1 and its dependencies will be elaborated.
+#   DUMP:        BODY
+#   BODY:        empty
+#   diversions:  GROW, BODY |-
+#
+# * TEST1 requires TEST2a
+# _m4_require_call m4_divert_pushes another temporary diversion,
+# GROW - 1, and expands TEST2a in there.
+#   DUMP:        BODY
+#   BODY:        empty
+#   GROW - 1:    TEST2a
+#   diversions:  GROW - 1, GROW, BODY |-
+# Than the content of the temporary diversion is moved to DUMP and the
+# temporary diversion is popped.
+#   DUMP:        BODY
+#   BODY:        TEST2a
+#   diversions:  GROW, BODY |-
+#
+# * TEST1 requires TEST2b
+# Again, _m4_require_call pushes GROW - 1 and heads to expand TEST2b.
+#   DUMP:        BODY
+#   BODY:        TEST2a
+#   diversions:  GROW - 1, GROW, BODY |-
+#
+# * TEST2b requires TEST3
+# _m4_require_call pushes GROW - 2 and expands TEST3 here.
+# (TEST3 requires TEST2a, but TEST2a has already been m4_provide'd, so
+# nothing happens.)
+#   DUMP:        BODY
+#   BODY:        TEST2a
+#   GROW - 2:    TEST3
+#   diversions:  GROW - 2, GROW - 1, GROW, BODY |-
+# Than the diversion is appended to DUMP, and popped.
+#   DUMP:        BODY
+#   BODY:        TEST2a; TEST3
+#   diversions:  GROW - 1, GROW, BODY |-
+#
+# * TEST1 requires TEST2b (contd.)
+# The content of TEST2b is expanded...
+#   DUMP:        BODY
+#   BODY:        TEST2a; TEST3
+#   GROW - 1:    TEST2b,
+#   diversions:  GROW - 1, GROW, BODY |-
+# ... and moved to DUMP.
+#   DUMP:        BODY
+#   BODY:        TEST2a; TEST3; TEST2b
+#   diversions:  GROW, BODY |-
+#
+# * TEST1 is expanded: epilogue
+# TEST1's own content is in GROW...
+#   DUMP:        BODY
+#   BODY:        TEST2a; TEST3; TEST2b
+#   GROW:        TEST1
+#   diversions:  BODY |-
+# ... and it's epilogue moves it to DUMP and then undefines DUMP.
+#   DUMP:       undefined
+#   BODY:       TEST2a; TEST3; TEST2b; TEST1
+#   diversions: BODY |-
+#
+#
+# 2. Keeping track of the expansion stack
+# =======================================
+#
+# When M4 expansion goes wrong it is often extremely hard to find the
+# path amongst macros that drove to the failure.  What is needed is
+# the stack of macro `calls'. One could imagine that GNU M4 would
+# maintain a stack of macro expansions, unfortunately it doesn't, so
+# we do it by hand.  This is of course extremely costly, but the help
+# this stack provides is worth it.  Nevertheless to limit the
+# performance penalty this is implemented only for m4_defun'd macros,
+# not for define'd macros.
+#
+# The scheme is simplistic: each time we enter an m4_defun'd macros,
+# we prepend its name in m4_expansion_stack, and when we exit the
+# macro, we remove it (thanks to pushdef/popdef).
+#
+# In addition, we want to detect circular m4_require dependencies.
+# Each time we expand a macro FOO we define _m4_expanding(FOO); and
+# m4_require(BAR) simply checks whether _m4_expanding(BAR) is defined.
+
+
+# m4_expansion_stack_push(TEXT)
+# -----------------------------
+m4_define([m4_expansion_stack_push],
+[m4_pushdef([m4_expansion_stack],
+	    [$1]m4_ifdef([m4_expansion_stack], [
+_m4_defn([m4_expansion_stack])]))])
+
+
+# m4_expansion_stack_pop
+# ----------------------
+m4_define([m4_expansion_stack_pop],
+[m4_popdef([m4_expansion_stack])])
+
+
+# m4_expansion_stack_dump
+# -----------------------
+# Dump the expansion stack.
+m4_define([m4_expansion_stack_dump],
+[m4_ifdef([m4_expansion_stack],
+	  [m4_errprintn(_m4_defn([m4_expansion_stack]))])dnl
+m4_errprintn(m4_location[: the top level])])
+
+
+# _m4_divert(GROW)
+# ----------------
+# This diversion is used by the m4_defun/m4_require machinery.  It is
+# important to keep room before GROW because for each nested
+# AC_REQUIRE we use an additional diversion (i.e., two m4_require's
+# will use GROW - 2.  More than 3 levels has never seemed to be
+# needed.)
+#
+# ...
+# - GROW - 2
+#   m4_require'd code, 2 level deep
+# - GROW - 1
+#   m4_require'd code, 1 level deep
+# - GROW
+#   m4_defun'd macros are elaborated here.
+
+m4_define([_m4_divert(GROW)],       10000)
+
+
+# _m4_defun_pro(MACRO-NAME)
+# -------------------------
+# The prologue for Autoconf macros.
+#
+# This is called frequently, so minimize the number of macro invocations
+# by avoiding dnl and m4_defn overhead.
+m4_define([_m4_defun_pro],
+m4_do([[m4_ifdef([m4_expansion_stack], [], [_m4_defun_pro_outer[]])]],
+      [[m4_expansion_stack_push(_m4_defn(
+	  [m4_location($1)])[: $1 is expanded from...])]],
+      [[m4_pushdef([_m4_expanding($1)])]]))
+
+m4_define([_m4_defun_pro_outer],
+[m4_copy([_m4_divert_diversion], [_m4_divert_dump])m4_divert_push([GROW])])
+
+# _m4_defun_epi(MACRO-NAME)
+# -------------------------
+# The Epilogue for Autoconf macros.  MACRO-NAME only helps tracing
+# the PRO/EPI pairs.
+#
+# This is called frequently, so minimize the number of macro invocations
+# by avoiding dnl and m4_popdef overhead.
+m4_define([_m4_defun_epi],
+m4_do([[_m4_popdef([_m4_expanding($1)])]],
+      [[m4_expansion_stack_pop()]],
+      [[m4_ifdef([m4_expansion_stack], [], [_m4_defun_epi_outer[]])]],
+      [[m4_provide([$1])]]))
+
+m4_define([_m4_defun_epi_outer],
+[_m4_undefine([_m4_divert_dump])m4_divert_pop([GROW])m4_undivert([GROW])])
+
+
+# m4_defun(NAME, EXPANSION)
+# -------------------------
+# Define a macro which automatically provides itself.  Add machinery
+# so the macro automatically switches expansion to the diversion
+# stack if it is not already using it.  In this case, once finished,
+# it will bring back all the code accumulated in the diversion stack.
+# This, combined with m4_require, achieves the topological ordering of
+# macros.  We don't use this macro to define some frequently called
+# macros that are not involved in ordering constraints, to save m4
+# processing.
+m4_define([m4_defun],
+[m4_define([m4_location($1)], m4_location)dnl
+m4_define([$1],
+	  [_m4_defun_pro([$1])$2[]_m4_defun_epi([$1])])])
+
+
+# m4_defun_once(NAME, EXPANSION)
+# ------------------------------
+# As m4_defun, but issues the EXPANSION only once, and warns if used
+# several times.
+m4_define([m4_defun_once],
+[m4_define([m4_location($1)], m4_location)dnl
+m4_define([$1],
+	  [m4_provide_if([$1],
+			 [m4_warn([syntax], [$1 invoked multiple times])],
+			 [_m4_defun_pro([$1])$2[]_m4_defun_epi([$1])])])])
+
+
+# m4_pattern_forbid(ERE, [WHY])
+# -----------------------------
+# Declare that no token matching the forbidden extended regular
+# expression ERE should be seen in the output unless...
+m4_define([m4_pattern_forbid], [])
+
+
+# m4_pattern_allow(ERE)
+# ---------------------
+# ... that token also matches the allowed extended regular expression ERE.
+# Both used via traces.
+m4_define([m4_pattern_allow], [])
+
+
+## --------------------------------- ##
+## 11. Dependencies between macros.  ##
+## --------------------------------- ##
+
+
+# m4_before(THIS-MACRO-NAME, CALLED-MACRO-NAME)
+# ---------------------------------------------
+# Issue a warning if CALLED-MACRO-NAME was called before THIS-MACRO-NAME.
+m4_define([m4_before],
+[m4_provide_if([$2],
+	       [m4_warn([syntax], [$2 was called before $1])])])
+
+
+# m4_require(NAME-TO-CHECK, [BODY-TO-EXPAND = NAME-TO-CHECK])
+# -----------------------------------------------------------
+# If NAME-TO-CHECK has never been expanded (actually, if it is not
+# m4_provide'd), expand BODY-TO-EXPAND *before* the current macro
+# expansion.  Once expanded, emit it in _m4_divert_dump.  Keep track
+# of the m4_require chain in m4_expansion_stack.
+#
+# The normal cases are:
+#
+# - NAME-TO-CHECK == BODY-TO-EXPAND
+#   Which you can use for regular macros with or without arguments, e.g.,
+#     m4_require([AC_PROG_CC], [AC_PROG_CC])
+#     m4_require([AC_CHECK_HEADERS(limits.h)], [AC_CHECK_HEADERS(limits.h)])
+#   which is just the same as
+#     m4_require([AC_PROG_CC])
+#     m4_require([AC_CHECK_HEADERS(limits.h)])
+#
+# - BODY-TO-EXPAND == m4_indir([NAME-TO-CHECK])
+#   In the case of macros with irregular names.  For instance:
+#     m4_require([AC_LANG_COMPILER(C)], [indir([AC_LANG_COMPILER(C)])])
+#   which means `if the macro named `AC_LANG_COMPILER(C)' (the parens are
+#   part of the name, it is not an argument) has not been run, then
+#   call it.'
+#   Had you used
+#     m4_require([AC_LANG_COMPILER(C)], [AC_LANG_COMPILER(C)])
+#   then m4_require would have tried to expand `AC_LANG_COMPILER(C)', i.e.,
+#   call the macro `AC_LANG_COMPILER' with `C' as argument.
+#
+#   You could argue that `AC_LANG_COMPILER', when it receives an argument
+#   such as `C' should dispatch the call to `AC_LANG_COMPILER(C)'.  But this
+#   `extension' prevents `AC_LANG_COMPILER' from having actual arguments that
+#   it passes to `AC_LANG_COMPILER(C)'.
+#
+# This is called frequently, so minimize the number of macro invocations
+# by avoiding dnl and other overhead on the common path.
+m4_define([m4_require],
+m4_do([[m4_ifdef([_m4_expanding($1)],
+		 [m4_fatal([$0: circular dependency of $1])])]],
+      [[m4_ifdef([_m4_divert_dump], [],
+		 [m4_fatal([$0($1): cannot be used outside of an ]dnl
+m4_bmatch([$0], [^AC_], [[AC_DEFUN]], [[m4_defun]])['d macro])])]],
+      [[m4_provide_if([$1],
+		      [],
+		      [_m4_require_call([$1], [$2])])]]))
+
+
+# _m4_require_call(NAME-TO-CHECK, [BODY-TO-EXPAND = NAME-TO-CHECK])
+# -----------------------------------------------------------------
+# If m4_require decides to expand the body, it calls this macro.
+#
+# This is called frequently, so minimize the number of macro invocations
+# by avoiding dnl and other overhead on the common path.
+m4_define([_m4_require_call],
+m4_do([[m4_define([_m4_divert_grow], m4_decr(_m4_divert_grow))]],
+      [[m4_divert_push(_m4_divert_grow)]],
+      [[m4_default([$2], [$1])
+m4_provide_if([$1],
+	      [],
+	      [m4_warn([syntax],
+		       [$1 is m4_require'd but not m4_defun'd])])]],
+      [[m4_divert(_m4_defn([_m4_divert_dump]))]],
+      [[m4_undivert(_m4_divert_grow)]],
+      [[m4_divert_pop(_m4_divert_grow)]],
+      [[m4_define([_m4_divert_grow], m4_incr(_m4_divert_grow))]]))
+
+
+# _m4_divert_grow
+# ---------------
+# The counter for _m4_require_call.
+m4_define([_m4_divert_grow], _m4_divert([GROW]))
+
+
+# m4_expand_once(TEXT, [WITNESS = TEXT])
+# --------------------------------------
+# If TEXT has never been expanded, expand it *here*.  Use WITNESS as
+# as a memory that TEXT has already been expanded.
+m4_define([m4_expand_once],
+[m4_provide_if(m4_ifval([$2], [[$2]], [[$1]]),
+	       [],
+	       [m4_provide(m4_ifval([$2], [[$2]], [[$1]]))[]$1])])
+
+
+# m4_provide(MACRO-NAME)
+# ----------------------
+m4_define([m4_provide],
+[m4_define([m4_provide($1)])])
+
+
+# m4_provide_if(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -------------------------------------------------------
+# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
+# The purpose of this macro is to provide the user with a means to
+# check macros which are provided without letting her know how the
+# information is coded.
+m4_define([m4_provide_if],
+[m4_ifdef([m4_provide($1)],
+	  [$2], [$3])])
+
+
+## --------------------- ##
+## 12. Text processing.  ##
+## --------------------- ##
+
+
+# m4_cr_letters
+# m4_cr_LETTERS
+# m4_cr_Letters
+# -------------
+m4_define([m4_cr_letters], [abcdefghijklmnopqrstuvwxyz])
+m4_define([m4_cr_LETTERS], [ABCDEFGHIJKLMNOPQRSTUVWXYZ])
+m4_define([m4_cr_Letters],
+m4_defn([m4_cr_letters])dnl
+m4_defn([m4_cr_LETTERS])dnl
+)
+
+
+# m4_cr_digits
+# ------------
+m4_define([m4_cr_digits], [0123456789])
+
+
+# m4_cr_alnum
+# -----------
+m4_define([m4_cr_alnum],
+m4_defn([m4_cr_Letters])dnl
+m4_defn([m4_cr_digits])dnl
+)
+
+
+# m4_cr_symbols1
+# m4_cr_symbols2
+# -------------------------------
+m4_define([m4_cr_symbols1],
+m4_defn([m4_cr_Letters])dnl
+_)
+
+m4_define([m4_cr_symbols2],
+m4_defn([m4_cr_symbols1])dnl
+m4_defn([m4_cr_digits])dnl
+)
+
+# m4_cr_all
+# ---------
+# The character range representing everything, with `-' as the last
+# character, since it is special to m4_translit.  Use with care, because
+# it contains characters special to M4 (fortunately, both ASCII and EBCDIC
+# have [] in order, so m4_defn([m4_cr_all]) remains a valid string).  It
+# also contains characters special to terminals, so it should never be
+# displayed in an error message.  Also, attempts to map [ and ] to other
+# characters via m4_translit must deal with the fact that m4_translit does
+# not add quotes to the output.
+#
+# It is mainly useful in generating inverted character range maps, for use
+# in places where m4_translit is faster than an equivalent m4_bpatsubst;
+# the regex `[^a-z]' is equivalent to:
+#  m4_translit(m4_dquote(m4_defn([m4_cr_all])), [a-z])
+m4_define([m4_cr_all],
+m4_translit(m4_dquote(m4_format(m4_dquote(m4_for(
+  ,1,255,,[[%c]]))m4_for([i],1,255,,[,i]))), [-])-)
+
+
+# _m4_define_cr_not(CATEGORY)
+# ---------------------------
+# Define m4_cr_not_CATEGORY as the inverse of m4_cr_CATEGORY.
+m4_define([_m4_define_cr_not],
+[m4_define([m4_cr_not_$1],
+	   m4_translit(m4_dquote(m4_defn([m4_cr_all])),
+		       m4_defn([m4_cr_$1])))])
+
+
+# m4_cr_not_letters
+# m4_cr_not_LETTERS
+# m4_cr_not_Letters
+# m4_cr_not_digits
+# m4_cr_not_alnum
+# m4_cr_not_symbols1
+# m4_cr_not_symbols2
+# ------------------
+# Inverse character sets
+_m4_define_cr_not([letters])
+_m4_define_cr_not([LETTERS])
+_m4_define_cr_not([Letters])
+_m4_define_cr_not([digits])
+_m4_define_cr_not([alnum])
+_m4_define_cr_not([symbols1])
+_m4_define_cr_not([symbols2])
+
+
+# m4_newline
+# ----------
+# Expands to a newline.  Exists for formatting reasons.
+m4_define([m4_newline], [
+])
+
+
+# m4_re_escape(STRING)
+# --------------------
+# Escape RE active characters in STRING.
+m4_define([m4_re_escape],
+[m4_bpatsubst([$1],
+	      [[][*+.?\^$]], [\\\&])])
+
+
+# m4_re_string
+# ------------
+# Regexp for `[a-zA-Z_0-9]*'
+# m4_dquote provides literal [] for the character class.
+m4_define([m4_re_string],
+m4_dquote(m4_defn([m4_cr_symbols2]))dnl
+[*]dnl
+)
+
+
+# m4_re_word
+# ----------
+# Regexp for `[a-zA-Z_][a-zA-Z_0-9]*'
+m4_define([m4_re_word],
+m4_dquote(m4_defn([m4_cr_symbols1]))dnl
+m4_defn([m4_re_string])dnl
+)
+
+
+# m4_tolower(STRING)
+# m4_toupper(STRING)
+# ------------------
+# These macros convert STRING to lowercase or uppercase.
+#
+# Rather than expand the m4_defn each time, we inline them up front.
+m4_define([m4_tolower],
+[m4_translit([$1], ]m4_dquote(m4_defn([m4_cr_LETTERS]))[,
+		   ]m4_dquote(m4_defn([m4_cr_letters]))[)])
+m4_define([m4_toupper],
+[m4_translit([$1], ]m4_dquote(m4_defn([m4_cr_letters]))[,
+		   ]m4_dquote(m4_defn([m4_cr_LETTERS]))[)])
+
+
+# m4_split(STRING, [REGEXP])
+# --------------------------
+#
+# Split STRING into an m4 list of quoted elements.  The elements are
+# quoted with [ and ].  Beginning spaces and end spaces *are kept*.
+# Use m4_strip to remove them.
+#
+# REGEXP specifies where to split.  Default is [\t ]+.
+#
+# If STRING is empty, the result is an empty list.
+#
+# Pay attention to the m4_changequotes.  When m4 reads the definition of
+# m4_split, it still has quotes set to [ and ].  Luckily, these are matched
+# in the macro body, so the definition is stored correctly.  Use the same
+# alternate quotes as m4_noquote; it must be unlikely to appear in $1.
+#
+# Also, notice that $1 is quoted twice, since we want the result to
+# be quoted.  Then you should understand that the argument of
+# patsubst is -=<{(STRING)}>=- (i.e., with additional -=<{( and )}>=-).
+#
+# This macro is safe on active symbols, i.e.:
+#   m4_define(active, ACTIVE)
+#   m4_split([active active ])end
+#   => [active], [active], []end
+#
+# Optimize on regex of ` ' (space), since m4_foreach_w already guarantees
+# that the list contains single space separators, and a common case is
+# splitting a single-element list.  This macro is called frequently,
+# so avoid unnecessary dnl inside the definition.
+m4_define([m4_split],
+[m4_if([$1], [], [],
+       [$2], [ ], [m4_if(m4_index([$1], [ ]), [-1], [[[$1]]], [_$0($@)])],
+       [$2], [], [_$0([$1], [[	 ]+])],
+       [_$0($@)])])
+
+m4_define([_m4_split],
+[m4_changequote([-=<{(],[)}>=-])]dnl
+[[m4_bpatsubst(-=<{(-=<{($1)}>=-)}>=-, -=<{($2)}>=-,
+	       -=<{(], [)}>=-)]m4_changequote([, ])])
+
+
+
+# m4_flatten(STRING)
+# ------------------
+# If STRING contains end of lines, replace them with spaces.  If there
+# are backslashed end of lines, remove them.  This macro is safe with
+# active symbols.
+#    m4_define(active, ACTIVE)
+#    m4_flatten([active
+#    act\
+#    ive])end
+#    => active activeend
+#
+# In m4, m4_bpatsubst is expensive, so first check for a newline.
+m4_define([m4_flatten],
+[m4_if(m4_index([$1], [
+]), [-1], [[$1]],
+       [m4_translit(m4_bpatsubst([[[$1]]], [\\
+]), [
+], [ ])])])
+
+
+# m4_strip(STRING)
+# ----------------
+# Expands into STRING with tabs and spaces singled out into a single
+# space, and removing leading and trailing spaces.
+#
+# This macro is robust to active symbols.
+#    m4_define(active, ACTIVE)
+#    m4_strip([  active <tab> <tab>active ])end
+#    => active activeend
+#
+# First, notice that we guarantee trailing space.  Why?  Because regular
+# expressions are greedy, and `.* ?' would always group the space into the
+# .* portion.  The algorithm is simpler by avoiding `?' at the end.  The
+# algorithm correctly strips everything if STRING is just ` '.
+#
+# Then notice the second pattern: it is in charge of removing the
+# leading/trailing spaces.  Why not just `[^ ]'?  Because they are
+# applied to over-quoted strings, i.e. more or less [STRING], due
+# to the limitations of m4_bpatsubsts.  So the leading space in STRING
+# is the *second* character; equally for the trailing space.
+m4_define([m4_strip],
+[m4_bpatsubsts([$1 ],
+	       [[	 ]+], [ ],
+	       [^. ?\(.*\) .$], [[[\1]]])])
+
+
+# m4_normalize(STRING)
+# --------------------
+# Apply m4_flatten and m4_strip to STRING.
+#
+# The argument is quoted, so that the macro is robust to active symbols:
+#
+#    m4_define(active, ACTIVE)
+#    m4_normalize([  act\
+#    ive
+#    active ])end
+#    => active activeend
+
+m4_define([m4_normalize],
+[m4_strip(m4_flatten([$1]))])
+
+
+
+# m4_join(SEP, ARG1, ARG2...)
+# ---------------------------
+# Produce ARG1SEPARG2...SEPARGn.  Avoid back-to-back SEP when a given ARG
+# is the empty string.  No expansion is performed on SEP or ARGs.
+#
+# Since the number of arguments to join can be arbitrarily long, we
+# want to avoid having more than one $@ in the macro definition;
+# otherwise, the expansion would require twice the memory of the already
+# long list.  Hence, m4_join merely looks for the first non-empty element,
+# and outputs just that element; while _m4_join looks for all non-empty
+# elements, and outputs them following a separator.  The final trick to
+# note is that we decide between recursing with $0 or _$0 based on the
+# nested m4_if ending with `_'.
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([m4_join],
+[m4_if([$#], [1], [],
+       [$#], [2], [[$2]],
+       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift2($@))])])
+m4_define([_m4_join],
+[m4_if([$#$2], [2], [],
+       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift2($@))])])
+
+# m4_joinall(SEP, ARG1, ARG2...)
+# ------------------------------
+# Produce ARG1SEPARG2...SEPARGn.  An empty ARG results in back-to-back SEP.
+# No expansion is performed on SEP or ARGs.
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([m4_joinall], [[$2]_$0([$1], m4_shift($@))])
+m4_define([_m4_joinall],
+[m4_if([$#], [2], [], [[$1$3]$0([$1], m4_shift2($@))])])
+
+# m4_combine([SEPARATOR], PREFIX-LIST, [INFIX], SUFFIX...)
+# --------------------------------------------------------
+# Produce the pairwise combination of every element in the quoted,
+# comma-separated PREFIX-LIST with every element from the SUFFIX arguments.
+# Each pair is joined with INFIX, and pairs are separated by SEPARATOR.
+# No expansion occurs on SEPARATOR, INFIX, or elements of either list.
+#
+# For example:
+#   m4_combine([, ], [[a], [b], [c]], [-], [1], [2], [3])
+#   => a-1, a-2, a-3, b-1, b-2, b-3, c-1, c-2, c-3
+#
+# In order to have the correct number of SEPARATORs, we use a temporary
+# variable that redefines itself after the first use.  We must use defn
+# rather than overquoting in case PREFIX or SUFFIX contains $1, but use
+# _m4_defn for speed.  Likewise, we compute the m4_shift3 only once,
+# rather than in each iteration of the outer m4_foreach.
+m4_define([m4_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+       [m4_pushdef([m4_Separator], [m4_define([m4_Separator],
+				    _m4_defn([m4_echo]))])]]dnl
+[[m4_foreach([m4_Prefix], [$2],
+	     [m4_foreach([m4_Suffix], ]m4_dquote(m4_dquote(m4_shift3($@)))[,
+	[m4_Separator([$1])[]_m4_defn([m4_Prefix])[$3]_m4_defn(
+						      [m4_Suffix])])])]]dnl
+[[_m4_popdef([m4_Separator])])])
+
+
+# m4_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR`'STRING'
+# at the end.  It is valid to use this macro with MACRO-NAME undefined,
+# in which case no SEPARATOR is added.  Be aware that the criterion is
+# `not being defined', and not `not being empty'.
+#
+# Note that neither STRING nor SEPARATOR are expanded here; rather, when
+# you expand MACRO-NAME, they will be expanded at that point in time.
+#
+# This macro is robust to active symbols.  It can be used to grow
+# strings.
+#
+#    | m4_define(active, ACTIVE)dnl
+#    | m4_append([sentence], [This is an])dnl
+#    | m4_append([sentence], [ active ])dnl
+#    | m4_append([sentence], [symbol.])dnl
+#    | sentence
+#    | m4_undefine([active])dnl
+#    | sentence
+#    => This is an ACTIVE symbol.
+#    => This is an active symbol.
+#
+# It can be used to define hooks.
+#
+#    | m4_define(active, ACTIVE)dnl
+#    | m4_append([hooks], [m4_define([act1], [act2])])dnl
+#    | m4_append([hooks], [m4_define([act2], [active])])dnl
+#    | m4_undefine([active])dnl
+#    | act1
+#    | hooks
+#    | act1
+#    => act1
+#    =>
+#    => active
+#
+# It can also be used to create lists, although this particular usage was
+# broken prior to autoconf 2.62.
+#    | m4_append([list], [one], [, ])dnl
+#    | m4_append([list], [two], [, ])dnl
+#    | m4_append([list], [three], [, ])dnl
+#    | list
+#    | m4_dquote(list)
+#    => one, two, three
+#    => [one],[two],[three]
+#
+# Note that m4_append can benefit from amortized O(n) m4 behavior, if
+# the underlying m4 implementation is smart enough to avoid copying existing
+# contents when enlarging a macro's definition into any pre-allocated storage
+# (m4 1.4.x unfortunately does not implement this optimization).  We do
+# not implement m4_prepend, since it is inherently O(n^2) (pre-allocated
+# storage only occurs at the end of a macro, so the existing contents must
+# always be moved).
+#
+# Use _m4_defn for speed.
+m4_define([m4_append],
+[m4_define([$1], m4_ifdef([$1], [_m4_defn([$1])[$3]])[$2])])
+
+
+# m4_append_uniq(MACRO-NAME, STRING, [SEPARATOR], [IF-UNIQ], [IF-DUP])
+# --------------------------------------------------------------------
+# Like `m4_append', but append only if not yet present.  Additionally,
+# expand IF-UNIQ if STRING was appended, or IF-DUP if STRING was already
+# present.  Also, warn if SEPARATOR is not empty and occurs within STRING,
+# as the algorithm no longer guarantees uniqueness.
+#
+# Note that while m4_append can be O(n) (depending on the quality of the
+# underlying M4 implementation), m4_append_uniq is inherently O(n^2)
+# because each append operation searches the entire string.
+m4_define([m4_append_uniq],
+[m4_ifval([$3], [m4_if(m4_index([$2], [$3]), [-1], [],
+		       [m4_warn([syntax],
+				[$0: `$2' contains `$3'])])])_$0($@)])
+m4_define([_m4_append_uniq],
+[m4_ifdef([$1],
+	  [m4_if(m4_index([$3]_m4_defn([$1])[$3], [$3$2$3]), [-1],
+		 [m4_append([$1], [$2], [$3])$4], [$5])],
+	  [m4_define([$1], [$2])$4])])
+
+# m4_append_uniq_w(MACRO-NAME, STRINGS)
+# -------------------------------------
+# For each of the words in the whitespace separated list STRINGS, append
+# only the unique strings to the definition of MACRO-NAME.
+#
+# Use _m4_defn for speed.
+m4_define([m4_append_uniq_w],
+[m4_foreach_w([m4_Word], [$2],
+	      [_m4_append_uniq([$1], _m4_defn([m4_Word]), [ ])])])
+
+
+# m4_text_wrap(STRING, [PREFIX], [FIRST-PREFIX], [WIDTH])
+# -------------------------------------------------------
+# Expands into STRING wrapped to hold in WIDTH columns (default = 79).
+# If PREFIX is given, each line is prefixed with it.  If FIRST-PREFIX is
+# specified, then the first line is prefixed with it.  As a special case,
+# if the length of FIRST-PREFIX is greater than that of PREFIX, then
+# FIRST-PREFIX will be left alone on the first line.
+#
+# No expansion occurs on the contents STRING, PREFIX, or FIRST-PREFIX,
+# although quadrigraphs are correctly recognized.
+#
+# Typical outputs are:
+#
+# m4_text_wrap([Short string */], [   ], [/* ], 20)
+#  => /* Short string */
+#
+# m4_text_wrap([Much longer string */], [   ], [/* ], 20)
+#  => /* Much longer
+#  =>    string */
+#
+# m4_text_wrap([Short doc.], [          ], [  --short ], 30)
+#  =>   --short Short doc.
+#
+# m4_text_wrap([Short doc.], [          ], [  --too-wide ], 30)
+#  =>   --too-wide
+#  =>           Short doc.
+#
+# m4_text_wrap([Super long documentation.], [          ], [  --too-wide ], 30)
+#  =>   --too-wide
+#  =>      Super long
+#  =>      documentation.
+#
+# FIXME: there is no checking of a longer PREFIX than WIDTH, but do
+# we really want to bother with people trying each single corner
+# of a software?
+#
+# This macro does not leave a trailing space behind the last word of a line,
+# which complicates it a bit.  The algorithm is otherwise stupid and simple:
+# all the words are preceded by m4_Separator which is defined to empty for
+# the first word, and then ` ' (single space) for all the others.
+#
+# The algorithm uses a helper that uses $2 through $4 directly, rather than
+# using local variables, to avoid m4_defn overhead, or expansion swallowing
+# any $.  It also bypasses m4_popdef overhead with _m4_popdef since no user
+# macro expansion occurs in the meantime.  Also, the definition is written
+# with m4_do, to avoid time wasted on dnl during expansion (since this is
+# already a time-consuming macro).
+m4_define([m4_text_wrap],
+[_$0([$1], [$2], m4_if([$3], [], [[$2]], [[$3]]),
+     m4_if([$4], [], [79], [[$4]]))])
+m4_define([_m4_text_wrap],
+m4_do(dnl set up local variables, to avoid repeated calculations
+[[m4_pushdef([m4_Indent], m4_qlen([$2]))]],
+[[m4_pushdef([m4_Cursor], m4_qlen([$3]))]],
+[[m4_pushdef([m4_Separator], [m4_define([m4_Separator], [ ])])]],
+dnl expand the first prefix, then check its length vs. regular prefix
+dnl same length: nothing special
+dnl prefix1 longer: output on line by itself, and reset cursor
+dnl prefix1 shorter: pad to length of prefix, and reset cursor
+[[[$3]m4_cond([m4_Cursor], m4_Indent, [],
+	      [m4_eval(m4_Cursor > m4_Indent)], [1], [
+[$2]m4_define([m4_Cursor], m4_Indent)],
+	      [m4_format([%*s], m4_max([0],
+  m4_eval(m4_Indent - m4_Cursor)), [])m4_define([m4_Cursor], m4_Indent)])]],
+dnl now, for each word, compute the curser after the word is output, then
+dnl check if the cursor would exceed the wrap column
+dnl if so, reset cursor, and insert newline and prefix
+dnl if not, insert the separator (usually a space)
+dnl either way, insert the word
+[[m4_foreach_w([m4_Word], [$1],
+  [m4_define([m4_Cursor],
+	     m4_eval(m4_Cursor + m4_qlen(_m4_defn([m4_Word]))
+		     + 1))m4_if(m4_eval(m4_Cursor > ([$4])),
+      [1], [m4_define([m4_Cursor],
+		      m4_eval(m4_Indent + m4_qlen(_m4_defn([m4_Word])) + 1))
+[$2]],
+      [m4_Separator[]])_m4_defn([m4_Word])])]],
+dnl finally, clean up the local variabls
+[[_m4_popdef([m4_Separator], [m4_Cursor], [m4_Indent])]]))
+
+
+# m4_text_box(MESSAGE, [FRAME-CHARACTER = `-'])
+# ---------------------------------------------
+# Turn MESSAGE into:
+#  ## ------- ##
+#  ## MESSAGE ##
+#  ## ------- ##
+# using FRAME-CHARACTER in the border.
+m4_define([m4_text_box],
+[m4_pushdef([m4_Border],
+	    m4_translit(m4_format([%*s], m4_qlen(m4_expand([$1])), []),
+			[ ], m4_if([$2], [], [[-]], [[$2]])))dnl
+@%:@@%:@ m4_Border @%:@@%:@
+@%:@@%:@ $1 @%:@@%:@
+@%:@@%:@ m4_Border @%:@@%:@_m4_popdef([m4_Border])dnl
+])
+
+
+# m4_qlen(STRING)
+# ---------------
+# Expands to the length of STRING after autom4te converts all quadrigraphs.
+#
+# Avoid bpatsubsts for the common case of no quadrigraphs.
+m4_define([m4_qlen],
+[m4_if(m4_index([$1], [@]), [-1], [m4_len([$1])],
+       [m4_len(m4_bpatsubst([[$1]],
+			    [@\(\(<:\|:>\|S|\|%:\|\{:\|:\}\)\(@\)\|&t@\)],
+			    [\3]))])])
+
+
+# m4_qdelta(STRING)
+# -----------------
+# Expands to the net change in the length of STRING from autom4te converting the
+# quadrigraphs in STRING.  This number is always negative or zero.
+m4_define([m4_qdelta],
+[m4_eval(m4_qlen([$1]) - m4_len([$1]))])
+
+
+
+## ----------------------- ##
+## 13. Number processing.  ##
+## ----------------------- ##
+
+# m4_cmp(A, B)
+# ------------
+# Compare two integer expressions.
+# A < B -> -1
+# A = B ->  0
+# A > B ->  1
+m4_define([m4_cmp],
+[m4_eval((([$1]) > ([$2])) - (([$1]) < ([$2])))])
+
+
+# m4_list_cmp(A, B)
+# -----------------
+#
+# Compare the two lists of integer expressions A and B.  For instance:
+#   m4_list_cmp([1, 0],     [1])    ->  0
+#   m4_list_cmp([1, 0],     [1, 0]) ->  0
+#   m4_list_cmp([1, 2],     [1, 0]) ->  1
+#   m4_list_cmp([1, 2, 3],  [1, 2]) ->  1
+#   m4_list_cmp([1, 2, -3], [1, 2]) -> -1
+#   m4_list_cmp([1, 0],     [1, 2]) -> -1
+#   m4_list_cmp([1],        [1, 2]) -> -1
+#   m4_define([xa], [oops])dnl
+#   m4_list_cmp([[0xa]],    [5+5])  -> 0
+#
+# Rather than face the overhead of m4_case, we use a helper function whose
+# expansion includes the name of the macro to invoke on the tail, either
+# m4_ignore or m4_unquote.  This is particularly useful when comparing
+# long lists, since less text is being expanded for deciding when to end
+# recursion.  The recursion is between a pair of macros that alternate
+# which list is trimmed by one element; this is more efficient than
+# calling m4_cdr on both lists from a single macro.  Guarantee exactly
+# one expansion of both lists' side effects.
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([m4_list_cmp],
+[_$0_raw(m4_dquote($1), m4_dquote($2))])
+
+m4_define([_m4_list_cmp_raw],
+[m4_if([$1], [$2], [0], [_m4_list_cmp_1([$1], $2)])])
+
+m4_define([_m4_list_cmp],
+[m4_if([$1], [], [0m4_ignore], [$2], [0], [m4_unquote], [$2m4_ignore])])
+
+m4_define([_m4_list_cmp_1],
+[_m4_list_cmp_2([$2], [m4_shift2($@)], $1)])
+
+m4_define([_m4_list_cmp_2],
+[_m4_list_cmp([$1$3], m4_cmp([$3+0], [$1+0]))(
+  [_m4_list_cmp_1(m4_dquote(m4_shift3($@)), $2)])])
+
+# m4_max(EXPR, ...)
+# m4_min(EXPR, ...)
+# -----------------
+# Return the decimal value of the maximum (or minimum) in a series of
+# integer expressions.
+#
+# M4 1.4.x doesn't provide ?:.  Hence this huge m4_eval.  Avoid m4_eval
+# if both arguments are identical, but be aware of m4_max(0xa, 10) (hence
+# the use of <=, not just <, in the second multiply).
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([m4_max],
+[m4_if([$#], [0], [m4_fatal([too few arguments to $0])],
+       [$#], [1], [m4_eval([$1])],
+       [$#$1], [2$2], [m4_eval([$1])],
+       [$#], [2], [_$0($@)],
+       [_m4_minmax([_$0], $@)])])
+
+m4_define([_m4_max],
+[m4_eval((([$1]) > ([$2])) * ([$1]) + (([$1]) <= ([$2])) * ([$2]))])
+
+m4_define([m4_min],
+[m4_if([$#], [0], [m4_fatal([too few arguments to $0])],
+       [$#], [1], [m4_eval([$1])],
+       [$#$1], [2$2], [m4_eval([$1])],
+       [$#], [2], [_$0($@)],
+       [_m4_minmax([_$0], $@)])])
+
+m4_define([_m4_min],
+[m4_eval((([$1]) < ([$2])) * ([$1]) + (([$1]) >= ([$2])) * ([$2]))])
+
+# _m4_minmax(METHOD, ARG1, ARG2...)
+# ---------------------------------
+# Common recursion code for m4_max and m4_min.  METHOD must be _m4_max
+# or _m4_min, and there must be at least two arguments to combine.
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([_m4_minmax],
+[m4_if([$#], [3], [$1([$2], [$3])],
+       [$0([$1], $1([$2], [$3]), m4_shift3($@))])])
+
+
+# m4_sign(A)
+# ----------
+# The sign of the integer expression A.
+m4_define([m4_sign],
+[m4_eval((([$1]) > 0) - (([$1]) < 0))])
+
+
+
+## ------------------------ ##
+## 14. Version processing.  ##
+## ------------------------ ##
+
+
+# m4_version_unletter(VERSION)
+# ----------------------------
+# Normalize beta version numbers with letters to numeric expressions, which
+# can then be handed to m4_eval for the purpose of comparison.
+#
+#   Nl -> (N+1).-1.(l#)
+#
+# for example:
+#   [2.14a] -> [2.14+1.-1.[0r36:a]] -> 2.15.-1.10
+#   [2.14b] -> [2.15+1.-1.[0r36:b]] -> 2.15.-1.11
+#   [2.61aa.b] -> [2.61+1.-1.[0r36:aa],+1.-1.[0r36:b]] -> 2.62.-1.370.1.-1.11
+#
+# This macro expects reasonable version numbers, but can handle double
+# letters and does not expand any macros.  Original version strings can
+# use both `.' and `-' separators.
+#
+# Inline constant expansions, to avoid m4_defn overhead.
+# _m4_version_unletter is the real workhorse used by m4_version_compare,
+# but since [0r36:a] is less readable than 10, we provide a wrapper for
+# human use.
+m4_define([m4_version_unletter],
+[m4_map_sep([m4_eval], [.],
+	    m4_dquote(m4_dquote_elt(m4_unquote(_$0([$1])))))])
+m4_define([_m4_version_unletter],
+[m4_bpatsubst(m4_translit([[[$1]]], [.-], [,,]),]dnl
+m4_dquote(m4_dquote(m4_defn([m4_cr_Letters])))[[+],
+	      [+1,-1,[0r36:\&]])])
+
+
+# m4_version_compare(VERSION-1, VERSION-2)
+# ----------------------------------------
+# Compare the two version numbers and expand into
+#  -1 if VERSION-1 < VERSION-2
+#   0 if           =
+#   1 if           >
+#
+# Since _m4_version_unletter does not output side effects, we can
+# safely bypass the overhead of m4_version_cmp.
+m4_define([m4_version_compare],
+[_m4_list_cmp_raw(_m4_version_unletter([$1]), _m4_version_unletter([$2]))])
+
+
+# m4_PACKAGE_NAME
+# m4_PACKAGE_TARNAME
+# m4_PACKAGE_VERSION
+# m4_PACKAGE_STRING
+# m4_PACKAGE_BUGREPORT
+# --------------------
+# If m4sugar/version.m4 is present, then define version strings.  This
+# file is optional, provided by Autoconf but absent in Bison.
+m4_sinclude([m4sugar/version.m4])
+
+
+# m4_version_prereq(VERSION, [IF-OK], [IF-NOT = FAIL])
+# ----------------------------------------------------
+# Check this Autoconf version against VERSION.
+m4_define([m4_version_prereq],
+m4_ifdef([m4_PACKAGE_VERSION],
+[[m4_if(m4_version_compare(]m4_dquote(m4_defn([m4_PACKAGE_VERSION]))[, [$1]),
+	[-1],
+	[m4_default([$3],
+		    [m4_fatal([Autoconf version $1 or higher is required],
+			      [63])])],
+	[$2])]],
+[[m4_fatal([m4sugar/version.m4 not found])]]))
+
+
+## ------------------ ##
+## 15. Set handling.  ##
+## ------------------ ##
+
+# Autoconf likes to create arbitrarily large sets; for example, as of
+# this writing, the configure.ac for coreutils tracks a set of more
+# than 400 AC_SUBST.  How do we track all of these set members,
+# without introducing duplicates?  We could use m4_append_uniq, with
+# the set NAME residing in the contents of the macro NAME.
+# Unfortunately, m4_append_uniq is quadratic for set creation, because
+# it costs O(n) to search the string for each of O(n) insertions; not
+# to mention that with m4 1.4.x, even using m4_append is slow, costing
+# O(n) rather than O(1) per insertion.  Other set operations, not used
+# by Autoconf but still possible by manipulation of the definition
+# tracked in macro NAME, include O(n) deletion of one element and O(n)
+# computation of set size.  Because the set is exposed to the user via
+# the definition of a single macro, we cannot cache any data about the
+# set without risking the cache being invalidated by the user
+# redefining NAME.
+#
+# Can we do better?  Yes, because m4 gives us an O(1) search function
+# for free: ifdef.  Additionally, even m4 1.4.x gives us an O(1)
+# insert operation for free: pushdef.  But to use these, we must
+# represent the set via a group of macros; to keep the set consistent,
+# we must hide the set so that the user can only manipulate it through
+# accessor macros.  The contents of the set are maintained through two
+# access points; _m4_set([name]) is a pushdef stack of values in the
+# set, useful for O(n) traversal of the set contents; while the
+# existence of _m4_set([name],value) with no particular value is
+# useful for O(1) querying of set membership.  And since the user
+# cannot externally manipulate the set, we are free to add additional
+# caching macros for other performance improvements.  Deletion can be
+# O(1) per element rather than O(n), by reworking the definition of
+# _m4_set([name],value) to be 0 or 1 based on current membership, and
+# adding _m4_set_cleanup(name) to defer the O(n) cleanup of
+# _m4_set([name]) until we have another reason to do an O(n)
+# traversal.  The existence of _m4_set_cleanup(name) can then be used
+# elsewhere to determine if we must dereference _m4_set([name],value),
+# or assume that definition implies set membership.  Finally, size can
+# be tracked in an O(1) fashion with _m4_set_size(name).
+#
+# The quoting in _m4_set([name],value) is chosen so that there is no
+# ambiguity with a set whose name contains a comma, and so that we can
+# supply the value via _m4_defn([_m4_set([name])]) without needing any
+# quote manipulation.
+
+# m4_set_add(SET, VALUE, [IF-UNIQ], [IF-DUP])
+# -------------------------------------------
+# Add VALUE as an element of SET.  Expand IF-UNIQ on the first
+# addition, and IF-DUP if it is already in the set.  Addition of one
+# element is O(1), such that overall set creation is O(n).
+#
+# We do not want to add a duplicate for a previously deleted but
+# unpruned element, but it is just as easy to check existence directly
+# as it is to query _m4_set_cleanup($1).
+m4_define([m4_set_add],
+[m4_ifdef([_m4_set([$1],$2)],
+	  [m4_if(m4_indir([_m4_set([$1],$2)]), [0],
+		 [m4_define([_m4_set([$1],$2)],
+			    [1])_m4_set_size([$1], [m4_incr])$3], [$4])],
+	  [m4_define([_m4_set([$1],$2)],
+		     [1])m4_pushdef([_m4_set([$1])],
+				    [$2])_m4_set_size([$1], [m4_incr])$3])])
+
+# m4_set_add_all(SET, VALUE...)
+# -----------------------------
+# Add each VALUE into SET.  This is O(n) in the number of VALUEs, and
+# can be faster than calling m4_set_add for each VALUE.
+#
+# Implement two recursion helpers; the check variant is slower but
+# handles the case where an element has previously been removed but
+# not pruned.  The recursion helpers ignore their second argument, so
+# that we can use the faster m4_shift2 and 2 arguments, rather than
+# _m4_shift2 and one argument, as the signal to end recursion.
+#
+# Please keep foreach.m4 in sync with any adjustments made here.
+m4_define([m4_set_add_all],
+[m4_define([_m4_set_size($1)], m4_eval(m4_set_size([$1])
+  + m4_len(m4_ifdef([_m4_set_cleanup($1)], [_$0_check], [_$0])([$1], $@))))])
+
+m4_define([_m4_set_add_all],
+[m4_if([$#], [2], [],
+       [m4_ifdef([_m4_set([$1],$3)], [],
+		 [m4_define([_m4_set([$1],$3)], [1])m4_pushdef([_m4_set([$1])],
+	   [$3])-])$0([$1], m4_shift2($@))])])
+
+m4_define([_m4_set_add_all_check],
+[m4_if([$#], [2], [],
+       [m4_set_add([$1], [$3])$0([$1], m4_shift2($@))])])
+
+# m4_set_contains(SET, VALUE, [IF-PRESENT], [IF-ABSENT])
+# ------------------------------------------------------
+# Expand IF-PRESENT if SET contains VALUE, otherwise expand IF-ABSENT.
+# This is always O(1).
+m4_define([m4_set_contains],
+[m4_ifdef([_m4_set_cleanup($1)],
+	  [m4_if(m4_ifdef([_m4_set([$1],$2)],
+		    [m4_indir([_m4_set([$1],$2)])], [0]), [1], [$3], [$4])],
+	  [m4_ifdef([_m4_set([$1],$2)], [$3], [$4])])])
+
+# m4_set_contents(SET, [SEP])
+# ---------------------------
+# Expand to a single string containing all the elements in SET,
+# separated by SEP, without modifying SET.  No provision is made for
+# disambiguating set elements that contain non-empty SEP as a
+# sub-string, or for recognizing a set that contains only the empty
+# string.  Order of the output is not guaranteed.  If any elements
+# have been previously removed from the set, this action will prune
+# the unused memory.  This is O(n) in the size of the set before
+# pruning.
+#
+# Use _m4_popdef for speed.  The existence of _m4_set_cleanup($1)
+# determines which version of _1 helper we use.
+m4_define([m4_set_contents],
+[m4_ifdef([_m4_set_cleanup($1)], [_$0_1c], [_$0_1])([$1])_$0_2([$1],
+    [_m4_defn([_m4_set_($1)])], [[$2]])])
+
+# _m4_set_contents_1(SET)
+# _m4_set_contents_1c(SET)
+# _m4_set_contents_2(SET, SEP, PREP)
+# ----------------------------------
+# Expand to a list of quoted elements currently in the set, separated
+# by SEP, and moving PREP in front of SEP on recursion.  To avoid
+# nesting limit restrictions, the algorithm must be broken into two
+# parts; _1 destructively copies the stack in reverse into
+# _m4_set_($1), producing no output; then _2 destructively copies
+# _m4_set_($1) back into the stack in reverse.  SEP is expanded while
+# _m4_set_($1) contains the current element, so a SEP containing
+# _m4_defn([_m4_set_($1)]) can produce output in the order the set was
+# created.  Behavior is undefined if SEP tries to recursively list or
+# modify SET in any way other than calling m4_set_remove on the
+# current element.  Use _1 if all entries in the stack are guaranteed
+# to be in the set, and _1c to prune removed entries.  Uses _m4_defn
+# and _m4_popdef for speed.
+m4_define([_m4_set_contents_1],
+[m4_ifdef([_m4_set([$1])], [m4_pushdef([_m4_set_($1)],
+    _m4_defn([_m4_set([$1])]))_m4_popdef([_m4_set([$1])])$0([$1])])])
+
+m4_define([_m4_set_contents_1c],
+[m4_ifdef([_m4_set([$1])],
+	  [m4_set_contains([$1], _m4_defn([_m4_set([$1])]),
+		   [m4_pushdef([_m4_set_($1)], _m4_defn([_m4_set([$1])]))],
+		   [_m4_popdef([_m4_set([$1],]_m4_defn(
+      [_m4_set([$1])])[)])])_m4_popdef([_m4_set([$1])])$0([$1])],
+	  [_m4_popdef([_m4_set_cleanup($1)])])])
+
+m4_define([_m4_set_contents_2],
+[m4_ifdef([_m4_set_($1)], [m4_pushdef([_m4_set([$1])],
+    _m4_defn([_m4_set_($1)]))$2[]_m4_popdef([_m4_set_($1)])$0([$1], [$3$2])])])
+
+# m4_set_delete(SET)
+# ------------------
+# Delete all elements in SET, and reclaim any memory occupied by the
+# set.  This is O(n) in the set size.
+#
+# Use _m4_defn and _m4_popdef for speed.
+m4_define([m4_set_delete],
+[m4_ifdef([_m4_set([$1])],
+	  [_m4_popdef([_m4_set([$1],]_m4_defn([_m4_set([$1])])[)],
+		      [_m4_set([$1])])$0([$1])],
+	  [m4_ifdef([_m4_set_cleanup($1)],
+		    [_m4_popdef([_m4_set_cleanup($1)])])m4_ifdef(
+		    [_m4_set_size($1)],
+		    [_m4_popdef([_m4_set_size($1)])])])])
+
+# m4_set_difference(SET1, SET2)
+# -----------------------------
+# Produce a LIST of quoted elements that occur in SET1 but not SET2.
+# Output a comma prior to any elements, to distinguish the empty
+# string from no elements.  This can be directly used as a series of
+# arguments, such as for m4_join, or wrapped inside quotes for use in
+# m4_foreach.  Order of the output is not guaranteed.
+#
+# Short-circuit the idempotence relation.  Use _m4_defn for speed.
+m4_define([m4_set_difference],
+[m4_if([$1], [$2], [],
+       [m4_set_foreach([$1], [_m4_element],
+		       [m4_set_contains([$2], _m4_defn([_m4_element]), [],
+					[,_m4_defn([_m4_element])])])])])
+
+# m4_set_dump(SET, [SEP])
+# -----------------------
+# Expand to a single string containing all the elements in SET,
+# separated by SEP, then delete SET.  In general, if you only need to
+# list the contents once, this is faster than m4_set_contents.  No
+# provision is made for disambiguating set elements that contain
+# non-empty SEP as a sub-string.  Order of the output is not
+# guaranteed.  This is O(n) in the size of the set before pruning.
+#
+# Use _m4_popdef for speed.  Use existence of _m4_set_cleanup($1) to
+# decide if more expensive recursion is needed.
+m4_define([m4_set_dump],
+[m4_ifdef([_m4_set_size($1)],
+	  [_m4_popdef([_m4_set_size($1)])])m4_ifdef([_m4_set_cleanup($1)],
+    [_$0_check], [_$0])([$1], [], [$2])])
+
+# _m4_set_dump(SET, SEP, PREP)
+# _m4_set_dump_check(SET, SEP, PREP)
+# ----------------------------------
+# Print SEP and the current element, then delete the element and
+# recurse with empty SEP changed to PREP.  The check variant checks
+# whether the element has been previously removed.  Use _m4_defn and
+# _m4_popdef for speed.
+m4_define([_m4_set_dump],
+[m4_ifdef([_m4_set([$1])],
+	  [[$2]_m4_defn([_m4_set([$1])])_m4_popdef([_m4_set([$1],]_m4_defn(
+		[_m4_set([$1])])[)], [_m4_set([$1])])$0([$1], [$2$3])])])
+
+m4_define([_m4_set_dump_check],
+[m4_ifdef([_m4_set([$1])],
+	  [m4_set_contains([$1], _m4_defn([_m4_set([$1])]),
+			   [[$2]_m4_defn([_m4_set([$1])])])_m4_popdef(
+    [_m4_set([$1],]_m4_defn([_m4_set([$1])])[)],
+    [_m4_set([$1])])$0([$1], [$2$3])],
+	  [_m4_popdef([_m4_set_cleanup($1)])])])
+
+# m4_set_empty(SET, [IF-EMPTY], [IF-ELEMENTS])
+# --------------------------------------------
+# Expand IF-EMPTY if SET has no elements, otherwise IF-ELEMENTS.
+m4_define([m4_set_empty],
+[m4_ifdef([_m4_set_size($1)],
+	  [m4_if(m4_indir([_m4_set_size($1)]), [0], [$2], [$3])], [$2])])
+
+# m4_set_foreach(SET, VAR, ACTION)
+# --------------------------------
+# For each element of SET, define VAR to the element and expand
+# ACTION.  ACTION should not recursively list SET's contents, add
+# elements to SET, nor delete any element from SET except the one
+# currently in VAR.  The order that the elements are visited in is not
+# guaranteed.  This is faster than the corresponding m4_foreach([VAR],
+#   m4_indir([m4_dquote]m4_set_listc([SET])), [ACTION])
+m4_define([m4_set_foreach],
+[m4_pushdef([$2])m4_ifdef([_m4_set_cleanup($1)],
+    [_m4_set_contents_1c], [_m4_set_contents_1])([$1])_m4_set_contents_2([$1],
+       [m4_define([$2], _m4_defn([_m4_set_($1)]))$3[]])m4_popdef([$2])])
+
+# m4_set_intersection(SET1, SET2)
+# -------------------------------
+# Produce a LIST of quoted elements that occur in both SET1 or SET2.
+# Output a comma prior to any elements, to distinguish the empty
+# string from no elements.  This can be directly used as a series of
+# arguments, such as for m4_join, or wrapped inside quotes for use in
+# m4_foreach.  Order of the output is not guaranteed.
+#
+# Iterate over the smaller set, and short-circuit the idempotence
+# relation.  Use _m4_defn for speed.
+m4_define([m4_set_intersection],
+[m4_if([$1], [$2], [m4_set_listc([$1])],
+       m4_eval(m4_set_size([$2]) < m4_set_size([$1])), [1], [$0([$2], [$1])],
+       [m4_set_foreach([$1], [_m4_element],
+		       [m4_set_contains([$2], _m4_defn([_m4_element]),
+					[,_m4_defn([_m4_element])])])])])
+
+# m4_set_list(SET)
+# m4_set_listc(SET)
+# -----------------
+# Produce a LIST of quoted elements of SET.  This can be directly used
+# as a series of arguments, such as for m4_join or m4_set_add_all, or
+# wrapped inside quotes for use in m4_foreach or m4_map.  With
+# m4_set_list, there is no way to distinguish an empty set from a set
+# containing only the empty string; with m4_set_listc, a leading comma
+# is output if there are any elements.
+m4_define([m4_set_list],
+[m4_ifdef([_m4_set_cleanup($1)], [_m4_set_contents_1c],
+	  [_m4_set_contents_1])([$1])_m4_set_contents_2([$1],
+	       [_m4_defn([_m4_set_($1)])], [,])])
+
+m4_define([m4_set_listc],
+[m4_ifdef([_m4_set_cleanup($1)], [_m4_set_contents_1c],
+	  [_m4_set_contents_1])([$1])_m4_set_contents_2([$1],
+	       [,_m4_defn([_m4_set_($1)])])])
+
+# m4_set_remove(SET, VALUE, [IF-PRESENT], [IF-ABSENT])
+# ----------------------------------------------------
+# If VALUE is an element of SET, delete it and expand IF-PRESENT.
+# Otherwise expand IF-ABSENT.  Deleting a single value is O(1),
+# although it leaves memory occupied until the next O(n) traversal of
+# the set which will compact the set.
+#
+# Optimize if the element being removed is the most recently added,
+# since defining _m4_set_cleanup($1) slows down so many other macros.
+# In particular, this plays well with m4_set_foreach.
+m4_define([m4_set_remove],
+[m4_set_contains([$1], [$2], [_m4_set_size([$1],
+    [m4_decr])m4_if(_m4_defn([_m4_set([$1])]), [$2],
+		    [_m4_popdef([_m4_set([$1],$2)], [_m4_set([$1])])],
+		    [m4_define([_m4_set_cleanup($1)])m4_define(
+		      [_m4_set([$1],$2)], [0])])$3], [$4])])
+
+# m4_set_size(SET)
+# ----------------
+# Expand to the number of elements currently in SET.  This operation
+# is O(1), and thus more efficient than m4_count(m4_set_list([SET])).
+m4_define([m4_set_size],
+[m4_ifdef([_m4_set_size($1)], [m4_indir([_m4_set_size($1)])], [0])])
+
+# _m4_set_size(SET, ACTION)
+# -------------------------
+# ACTION must be either m4_incr or m4_decr, and the size of SET is
+# changed accordingly.  If the set is empty, ACTION must not be
+# m4_decr.
+m4_define([_m4_set_size],
+[m4_define([_m4_set_size($1)],
+	   m4_ifdef([_m4_set_size($1)], [$2(m4_indir([_m4_set_size($1)]))],
+		    [1]))])
+
+# m4_set_union(SET1, SET2)
+# ------------------------
+# Produce a LIST of double quoted elements that occur in either SET1
+# or SET2, without duplicates.  Output a comma prior to any elements,
+# to distinguish the empty string from no elements.  This can be
+# directly used as a series of arguments, such as for m4_join, or
+# wrapped inside quotes for use in m4_foreach.  Order of the output is
+# not guaranteed.
+#
+# We can rely on the fact that m4_set_listc prunes SET1, so we don't
+# need to check _m4_set([$1],element) for 0.  Use _m4_defn for speed.
+# Short-circuit the idempotence relation.
+m4_define([m4_set_union],
+[m4_set_listc([$1])m4_if([$1], [$2], [], [m4_set_foreach([$2], [_m4_element],
+  [m4_ifdef([_m4_set([$1],]_m4_defn([_m4_element])[)], [],
+	    [,_m4_defn([_m4_element])])])])])
+
+
+## ------------------- ##
+## 16. File handling.  ##
+## ------------------- ##
+
+
+# It is a real pity that M4 comes with no macros to bind a diversion
+# to a file.  So we have to deal without, which makes us a lot more
+# fragile than we should.
+
+
+# m4_file_append(FILE-NAME, CONTENT)
+# ----------------------------------
+m4_define([m4_file_append],
+[m4_syscmd([cat >>$1 <<_m4eof
+$2
+_m4eof
+])
+m4_if(m4_sysval, [0], [],
+      [m4_fatal([$0: cannot write: $1])])])
+
+
+
+## ------------------------ ##
+## 17. Setting M4sugar up.  ##
+## ------------------------ ##
+
+
+# m4_init
+# -------
+# Initialize the m4sugar language.
+m4_define([m4_init],
+[# All the M4sugar macros start with `m4_', except `dnl' kept as is
+# for sake of simplicity.
+m4_pattern_forbid([^_?m4_])
+m4_pattern_forbid([^dnl$])
+
+# If __m4_version__ is defined, we assume that we are being run by M4
+# 1.6 or newer, and thus that $@ recursion is linear and debugmode(d)
+# is available for faster checks of dereferencing undefined macros.
+# But if it is missing, we assume we are being run by M4 1.4.x, that
+# $@ recursion is quadratic, and that we need foreach-based
+# replacement macros.  Use the raw builtin to avoid tripping up
+# include tracing.
+m4_ifdef([__m4_version__],
+[m4_debugmode([+d])
+m4_copy([_m4_defn], [m4_defn])
+m4_copy([_m4_popdef], [m4_popdef])
+m4_copy([_m4_undefine], [m4_undefine])],
+[m4_builtin([include], [m4sugar/foreach.m4])])
+
+# _m4_divert_diversion should be defined:
+m4_divert_push([KILL])
+
+# Check the divert push/pop perfect balance.
+m4_wrap([m4_divert_pop([])
+	 m4_ifdef([_m4_divert_diversion],
+	   [m4_fatal([$0: unbalanced m4_divert_push:]_m4_divert_n_stack)])[]])
+])
Index: EcnlProtoTool/trunk/tools/share/bison/xslt/bison.xsl
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/xslt/bison.xsl	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/xslt/bison.xsl	(revision 270)
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    bison.xsl - common templates for Bison XSLT.
+
+    Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+
+    This file is part of Bison, the GNU Compiler Compiler.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  -->
+
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:bison="http://www.gnu.org/software/bison/">
+
+<xsl:key
+  name="bison:symbolByName"
+  match="/bison-xml-report/grammar/nonterminals/nonterminal"
+  use="@name"
+/>
+<xsl:key
+  name="bison:symbolByName"
+  match="/bison-xml-report/grammar/terminals/terminal"
+  use="@name"
+/>
+<xsl:key
+  name="bison:ruleByNumber"
+  match="/bison-xml-report/grammar/rules/rule"
+  use="@number"
+/>
+<xsl:key
+  name="bison:ruleByLhs"
+  match="/bison-xml-report/grammar/rules/rule[
+         @usefulness != 'useless-in-grammar']"
+  use="lhs"
+/>
+<xsl:key
+  name="bison:ruleByRhs"
+  match="/bison-xml-report/grammar/rules/rule[
+         @usefulness != 'useless-in-grammar']"
+  use="rhs/symbol"
+/>
+
+<!-- For the specified state, output: #sr-conflicts,#rr-conflicts -->
+<xsl:template match="state" mode="bison:count-conflicts">
+  <xsl:variable name="transitions" select="actions/transitions"/>
+  <xsl:variable name="reductions" select="actions/reductions"/>
+  <xsl:variable
+    name="terminals"
+    select="
+      $transitions/transition[@type='shift']/@symbol
+      | $reductions/reduction/@symbol
+    "
+  />
+  <xsl:variable name="conflict-data">
+    <xsl:for-each select="$terminals">
+      <xsl:variable name="name" select="."/>
+      <xsl:if test="generate-id($terminals[. = $name][1]) = generate-id(.)">
+        <xsl:variable
+          name="shift-count"
+          select="count($transitions/transition[@symbol=$name])"
+        />
+        <xsl:variable
+          name="reduce-count"
+          select="count($reductions/reduction[@symbol=$name])"
+        />
+        <xsl:if test="$shift-count > 0 and $reduce-count > 0">
+          <xsl:text>s</xsl:text>
+        </xsl:if>
+        <xsl:if test="$reduce-count > 1">
+          <xsl:text>r</xsl:text>
+        </xsl:if>
+      </xsl:if>
+    </xsl:for-each>
+  </xsl:variable>
+  <xsl:value-of select="string-length(translate($conflict-data, 'r', ''))"/>
+  <xsl:text>,</xsl:text>
+  <xsl:value-of select="string-length(translate($conflict-data, 's', ''))"/>
+</xsl:template>
+
+</xsl:stylesheet>
Index: EcnlProtoTool/trunk/tools/share/bison/xslt/xml2dot.xsl
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/xslt/xml2dot.xsl	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/xslt/xml2dot.xsl	(revision 270)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    xml2dot.xsl - transform Bison XML Report into DOT.
+
+    Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+
+    This file is part of Bison, the GNU Compiler Compiler.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Written by Wojciech Polak <polak@gnu.org>.
+  -->
+
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:bison="http://www.gnu.org/software/bison/">
+
+<xsl:import href="bison.xsl"/>
+<xsl:output method="text" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="/">
+  <xsl:apply-templates select="bison-xml-report"/>
+</xsl:template>
+
+<xsl:template match="bison-xml-report">
+  <xsl:apply-templates select="automaton"/>
+</xsl:template>
+
+<xsl:template match="automaton">
+  <xsl:text>digraph Automaton {&#10;</xsl:text>
+  <xsl:apply-templates select="state"/>
+  <xsl:text>}&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="automaton/state">
+  <xsl:call-template name="output-node">
+    <xsl:with-param name="number" select="@number"/>
+    <xsl:with-param name="label">
+      <xsl:value-of select="@number"/>
+      <xsl:apply-templates select="itemset/item"/>
+    </xsl:with-param>
+  </xsl:call-template>
+  <xsl:apply-templates select="actions/transitions"/>
+</xsl:template>
+
+<xsl:template match="actions/transitions">
+  <xsl:apply-templates select="transition"/>
+</xsl:template>
+
+<xsl:template match="item">
+  <xsl:apply-templates select="key('bison:ruleByNumber', @rule-number)">
+    <xsl:with-param name="point" select="@point"/>
+  </xsl:apply-templates>
+  <xsl:apply-templates select="lookaheads"/>
+</xsl:template>
+
+<xsl:template match="rule">
+  <xsl:param name="point"/>
+  <xsl:text>&#10;</xsl:text>
+  <xsl:value-of select="lhs"/>
+  <xsl:text> -&gt;</xsl:text>
+  <xsl:if test="$point = 0">
+    <xsl:text> .</xsl:text>
+  </xsl:if>
+  <xsl:for-each select="rhs/symbol|rhs/empty">
+    <xsl:apply-templates select="."/>
+    <xsl:if test="$point = position()">
+      <xsl:text> .</xsl:text>
+    </xsl:if>
+  </xsl:for-each>
+</xsl:template>
+
+<xsl:template match="symbol">
+  <xsl:text> </xsl:text>
+  <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="empty"/>
+
+<xsl:template match="lookaheads">
+  <xsl:text>[</xsl:text>
+  <xsl:apply-templates select="symbol"/>
+  <xsl:text>]</xsl:text>
+</xsl:template>
+
+<xsl:template match="lookaheads/symbol">
+  <xsl:value-of select="."/>
+  <xsl:if test="position() != last()">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="transition">
+  <xsl:call-template name="output-edge">
+    <xsl:with-param name="src" select="../../../@number"/>
+    <xsl:with-param name="dst" select="@state"/>
+    <xsl:with-param name="style">
+      <xsl:choose>
+	<xsl:when test="@symbol = 'error'">
+	  <xsl:text>dotted</xsl:text>
+	</xsl:when>
+	<xsl:when test="@type = 'shift'">
+	  <xsl:text>solid</xsl:text>
+	</xsl:when>
+	<xsl:otherwise>
+	  <xsl:text>dashed</xsl:text>
+	</xsl:otherwise>
+      </xsl:choose>
+    </xsl:with-param>
+    <xsl:with-param name="label">
+      <xsl:if test="not(@symbol = 'error')">
+	<xsl:value-of select="@symbol"/>
+      </xsl:if>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="output-node">
+  <xsl:param name="number"/>
+  <xsl:param name="label"/>
+  <xsl:text>  </xsl:text>
+  <xsl:value-of select="$number"/>
+  <xsl:text> [label="</xsl:text>
+  <xsl:call-template name="escape">
+    <xsl:with-param name="subject" select="$label"/>
+  </xsl:call-template>
+  <xsl:text>"]&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template name="output-edge">
+  <xsl:param name="src"/>
+  <xsl:param name="dst"/>
+  <xsl:param name="style"/>
+  <xsl:param name="label"/>
+  <xsl:text>  </xsl:text>
+  <xsl:value-of select="$src"/>
+  <xsl:text> -> </xsl:text>
+  <xsl:value-of select="$dst"/>
+  <xsl:text> [style=</xsl:text>
+  <xsl:value-of select="$style"/>
+  <xsl:if test="$label and $label != ''">
+    <xsl:text> label="</xsl:text>
+    <xsl:call-template name="escape">
+      <xsl:with-param name="subject" select="$label"/>
+    </xsl:call-template>
+    <xsl:text>"</xsl:text>
+  </xsl:if>
+  <xsl:text>]&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template name="escape">
+  <xsl:param name="subject"/> <!-- required -->
+  <xsl:call-template name="string-replace">
+    <xsl:with-param name="subject">
+      <xsl:call-template name="string-replace">
+        <xsl:with-param name="subject">
+          <xsl:call-template name="string-replace">
+            <xsl:with-param name="subject" select="$subject"/>
+            <xsl:with-param name="search" select="'\'"/>
+            <xsl:with-param name="replace" select="'\\'"/>
+          </xsl:call-template>
+        </xsl:with-param>
+        <xsl:with-param name="search" select="'&quot;'"/>
+        <xsl:with-param name="replace" select="'\&quot;'"/>
+      </xsl:call-template>
+    </xsl:with-param>
+    <xsl:with-param name="search" select="'&#10;'"/>
+    <xsl:with-param name="replace" select="'\n'"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="string-replace">
+  <xsl:param name="subject"/>
+  <xsl:param name="search"/>
+  <xsl:param name="replace"/>
+  <xsl:choose>
+    <xsl:when test="contains($subject, $search)">
+      <xsl:variable name="before" select="substring-before($subject, $search)"/>
+      <xsl:variable name="after" select="substring-after($subject, $search)"/>
+      <xsl:value-of select="$before"/>
+      <xsl:value-of select="$replace"/>
+      <xsl:call-template name="string-replace">
+        <xsl:with-param name="subject" select="$after"/>
+        <xsl:with-param name="search" select="$search"/>
+        <xsl:with-param name="replace" select="$replace"/>
+      </xsl:call-template>
+    </xsl:when> 
+    <xsl:otherwise>
+      <xsl:value-of select="$subject"/>  
+    </xsl:otherwise>
+  </xsl:choose>            
+</xsl:template>
+
+</xsl:stylesheet>
Index: EcnlProtoTool/trunk/tools/share/bison/xslt/xml2text.xsl
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/xslt/xml2text.xsl	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/xslt/xml2text.xsl	(revision 270)
@@ -0,0 +1,581 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    xml2text.xsl - transform Bison XML Report into plain text.
+
+    Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+
+    This file is part of Bison, the GNU Compiler Compiler.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Written by Wojciech Polak <polak@gnu.org>.
+  -->
+
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:bison="http://www.gnu.org/software/bison/">
+
+<xsl:import href="bison.xsl"/>
+<xsl:output method="text" encoding="UTF-8" indent="no"/>
+
+<xsl:template match="/">
+  <xsl:apply-templates select="bison-xml-report"/>
+</xsl:template>
+
+<xsl:template match="bison-xml-report">
+  <xsl:apply-templates select="grammar" mode="reductions"/>
+  <xsl:apply-templates select="grammar" mode="useless-in-parser"/>
+  <xsl:apply-templates select="automaton" mode="conflicts"/>
+  <xsl:apply-templates select="grammar"/>
+  <xsl:apply-templates select="automaton"/>
+</xsl:template>
+
+<xsl:template match="grammar" mode="reductions">
+  <xsl:apply-templates select="nonterminals" mode="useless-in-grammar"/>
+  <xsl:apply-templates select="terminals" mode="unused-in-grammar"/>
+  <xsl:apply-templates select="rules" mode="useless-in-grammar"/>
+</xsl:template>
+
+<xsl:template match="nonterminals" mode="useless-in-grammar">
+  <xsl:if test="nonterminal[@usefulness='useless-in-grammar']">
+    <xsl:text>Nonterminals useless in grammar&#10;&#10;</xsl:text>
+    <xsl:for-each select="nonterminal[@usefulness='useless-in-grammar']">
+      <xsl:text>   </xsl:text>
+      <xsl:value-of select="@name"/>
+      <xsl:text>&#10;</xsl:text>
+    </xsl:for-each>
+    <xsl:text>&#10;&#10;</xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="terminals" mode="unused-in-grammar">
+  <xsl:if test="terminal[@usefulness='unused-in-grammar']">
+    <xsl:text>Terminals unused in grammar&#10;&#10;</xsl:text>
+    <xsl:for-each select="terminal[@usefulness='unused-in-grammar']">
+      <xsl:sort select="@symbol-number" data-type="number"/>
+      <xsl:text>   </xsl:text>
+      <xsl:value-of select="@name"/>
+      <xsl:text>&#10;</xsl:text>
+    </xsl:for-each>
+    <xsl:text>&#10;&#10;</xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="rules" mode="useless-in-grammar">
+  <xsl:variable name="set" select="rule[@usefulness='useless-in-grammar']"/>
+  <xsl:if test="$set">
+    <xsl:text>Rules useless in grammar&#10;</xsl:text>
+    <xsl:call-template name="style-rule-set">
+      <xsl:with-param name="rule-set" select="$set"/>
+    </xsl:call-template>
+    <xsl:text>&#10;&#10;</xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="grammar" mode="useless-in-parser">
+  <xsl:variable
+    name="set" select="rules/rule[@usefulness='useless-in-parser']"
+  />
+  <xsl:if test="$set">
+    <xsl:text>Rules useless in parser due to conflicts&#10;</xsl:text>
+    <xsl:call-template name="style-rule-set">
+      <xsl:with-param name="rule-set" select="$set"/>
+    </xsl:call-template>
+    <xsl:text>&#10;&#10;</xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="grammar">
+  <xsl:text>Grammar&#10;</xsl:text>
+  <xsl:call-template name="style-rule-set">
+    <xsl:with-param
+      name="rule-set" select="rules/rule[@usefulness!='useless-in-grammar']"
+    />
+  </xsl:call-template>
+  <xsl:text>&#10;&#10;</xsl:text>
+  <xsl:apply-templates select="terminals"/>
+  <xsl:apply-templates select="nonterminals"/>
+</xsl:template>
+
+<xsl:template name="style-rule-set">
+  <xsl:param name="rule-set"/>
+  <xsl:for-each select="$rule-set">
+    <xsl:apply-templates select=".">
+      <xsl:with-param name="pad" select="'3'"/>
+      <xsl:with-param name="prev-lhs">
+        <xsl:if test="position()>1">
+          <xsl:variable name="position" select="position()"/>
+          <xsl:value-of select="$rule-set[$position - 1]/lhs"/>
+        </xsl:if>
+      </xsl:with-param>
+    </xsl:apply-templates>
+  </xsl:for-each>
+</xsl:template>
+
+<xsl:template match="grammar/terminals">
+  <xsl:text>Terminals, with rules where they appear&#10;&#10;</xsl:text>
+  <xsl:apply-templates select="terminal"/>
+  <xsl:text>&#10;&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="grammar/nonterminals">
+  <xsl:text>Nonterminals, with rules where they appear&#10;&#10;</xsl:text>
+  <xsl:apply-templates select="nonterminal[@usefulness!='useless-in-grammar']"/>
+</xsl:template>
+
+<xsl:template match="terminal">
+  <xsl:value-of select="@name"/>
+  <xsl:call-template name="line-wrap">
+    <xsl:with-param name="first-line-length">
+      <xsl:choose>
+        <xsl:when test="string-length(@name) &gt; 66">0</xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="66 - string-length(@name)" />
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:with-param>
+    <xsl:with-param name="line-length" select="66" />
+    <xsl:with-param name="text">
+      <xsl:value-of select="concat(' (', @token-number, ')')"/>
+      <xsl:for-each select="key('bison:ruleByRhs', @name)">
+        <xsl:value-of select="concat(' ', @number)"/>
+      </xsl:for-each>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="nonterminal">
+  <xsl:value-of select="@name"/>
+  <xsl:value-of select="concat(' (', @symbol-number, ')')"/>
+  <xsl:text>&#10;</xsl:text>
+  <xsl:variable name="output">
+    <xsl:call-template name="line-wrap">
+      <xsl:with-param name="line-length" select="66" />
+      <xsl:with-param name="text">
+        <xsl:text>    </xsl:text>
+        <xsl:if test="key('bison:ruleByLhs', @name)">
+          <xsl:text>on@left:</xsl:text>
+          <xsl:for-each select="key('bison:ruleByLhs', @name)">
+            <xsl:value-of select="concat(' ', @number)"/>
+          </xsl:for-each>
+        </xsl:if>
+        <xsl:if test="key('bison:ruleByRhs', @name)">
+          <xsl:if test="key('bison:ruleByLhs', @name)">
+            <xsl:text>, </xsl:text>
+          </xsl:if>
+          <xsl:text>on@right:</xsl:text>
+          <xsl:for-each select="key('bison:ruleByRhs', @name)">
+            <xsl:value-of select="concat(' ', @number)"/>
+          </xsl:for-each>
+        </xsl:if>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:value-of select="translate($output, '@', ' ')" />
+</xsl:template>
+
+<xsl:template match="automaton" mode="conflicts">
+  <xsl:variable name="conflict-report">
+    <xsl:apply-templates select="state" mode="conflicts"/>
+  </xsl:variable>
+  <xsl:if test="string-length($conflict-report) != 0">
+    <xsl:value-of select="$conflict-report"/>
+    <xsl:text>&#10;&#10;</xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="state" mode="conflicts">
+  <xsl:variable name="conflict-counts">
+    <xsl:apply-templates select="." mode="bison:count-conflicts" />
+  </xsl:variable>
+  <xsl:variable
+    name="sr-count" select="substring-before($conflict-counts, ',')"
+  />
+  <xsl:variable
+    name="rr-count" select="substring-after($conflict-counts, ',')"
+  />
+  <xsl:if test="$sr-count > 0 or $rr-count > 0">
+    <xsl:value-of select="concat('State ', @number, ' conflicts:')"/>
+    <xsl:if test="$sr-count > 0">
+      <xsl:value-of select="concat(' ', $sr-count, ' shift/reduce')"/>
+      <xsl:if test="$rr-count > 0">
+        <xsl:value-of select="(',')"/>
+      </xsl:if>
+    </xsl:if>
+    <xsl:if test="$rr-count > 0">
+      <xsl:value-of select="concat(' ', $rr-count, ' reduce/reduce')"/>
+    </xsl:if>
+    <xsl:value-of select="'&#10;'"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="automaton">
+  <xsl:apply-templates select="state">
+    <xsl:with-param name="pad" select="'3'"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="automaton/state">
+  <xsl:param name="pad"/>
+  <xsl:text>&#10;&#10;</xsl:text>
+  <xsl:text>state </xsl:text>
+  <xsl:value-of select="@number"/>
+  <xsl:text>&#10;&#10;</xsl:text>
+  <xsl:apply-templates select="itemset/item">
+    <xsl:with-param name="pad" select="$pad"/>
+  </xsl:apply-templates>
+  <xsl:apply-templates select="actions/transitions">
+    <xsl:with-param name="type" select="'shift'"/>
+  </xsl:apply-templates>
+  <xsl:apply-templates select="actions/errors"/>
+  <xsl:apply-templates select="actions/reductions"/>
+  <xsl:apply-templates select="actions/transitions">
+    <xsl:with-param name="type" select="'goto'"/>
+  </xsl:apply-templates>
+  <xsl:apply-templates select="solved-conflicts"/>
+</xsl:template>
+
+<xsl:template match="actions/transitions">
+  <xsl:param name="type"/>
+  <xsl:if test="transition[@type = $type]">
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="transition[@type = $type]">
+      <xsl:with-param name="pad">
+	<xsl:call-template name="max-width-symbol">
+	  <xsl:with-param name="node" select="transition[@type = $type]"/>
+	</xsl:call-template>
+      </xsl:with-param>
+    </xsl:apply-templates>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="actions/errors">
+  <xsl:if test="error">
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="error">
+      <xsl:with-param name="pad">
+	<xsl:call-template name="max-width-symbol">
+	  <xsl:with-param name="node" select="error"/>
+	</xsl:call-template>
+      </xsl:with-param>
+    </xsl:apply-templates>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="actions/reductions">
+  <xsl:if test="reduction">
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="reduction">
+      <xsl:with-param name="pad">
+	<xsl:call-template name="max-width-symbol">
+	  <xsl:with-param name="node" select="reduction"/>
+	</xsl:call-template>
+      </xsl:with-param>
+    </xsl:apply-templates>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="item">
+  <xsl:param name="pad"/>
+  <xsl:param name="prev-rule-number"
+	     select="preceding-sibling::item[1]/@rule-number"/>
+  <xsl:apply-templates
+    select="key('bison:ruleByNumber', current()/@rule-number)"
+  >
+    <xsl:with-param name="itemset" select="'true'"/>
+    <xsl:with-param name="pad" select="$pad"/>
+    <xsl:with-param
+      name="prev-lhs"
+      select="key('bison:ruleByNumber', $prev-rule-number)/lhs[text()]"
+   />
+    <xsl:with-param name="point" select="@point"/>
+    <xsl:with-param name="lookaheads">
+      <xsl:apply-templates select="lookaheads"/>
+    </xsl:with-param>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="rule">
+  <xsl:param name="itemset"/>
+  <xsl:param name="pad"/>
+  <xsl:param name="prev-lhs"/>
+  <xsl:param name="point"/>
+  <xsl:param name="lookaheads"/>
+
+  <xsl:if test="$itemset != 'true' and not($prev-lhs = lhs[text()])">
+    <xsl:text>&#10;</xsl:text>
+  </xsl:if>
+
+  <xsl:text>  </xsl:text>
+  <xsl:call-template name="lpad">
+    <xsl:with-param name="str" select="string(@number)"/>
+    <xsl:with-param name="pad" select="number($pad)"/>
+  </xsl:call-template>
+  <xsl:text> </xsl:text>
+
+  <!-- LHS -->
+  <xsl:choose>
+    <xsl:when test="$itemset != 'true' and $prev-lhs = lhs[text()]">
+      <xsl:call-template name="lpad">
+	<xsl:with-param name="str" select="'|'"/>
+	<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 1"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$itemset = 'true' and $prev-lhs = lhs[text()]">
+      <xsl:call-template name="lpad">
+	<xsl:with-param name="str" select="'|'"/>
+	<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 1"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="lhs"/>
+      <xsl:text>:</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+
+  <!-- RHS -->
+  <xsl:for-each select="rhs/*">
+    <xsl:if test="position() = $point + 1">
+      <xsl:text> .</xsl:text>
+    </xsl:if>
+    <xsl:if test="$itemset = 'true' and name(.) != 'empty'">
+      <xsl:apply-templates select="."/>
+    </xsl:if>
+    <xsl:if test="$itemset != 'true'">
+      <xsl:apply-templates select="."/>
+    </xsl:if>
+    <xsl:if test="position() = last() and position() = $point">
+      <xsl:text> .</xsl:text>
+    </xsl:if>
+  </xsl:for-each>
+  <xsl:if test="$lookaheads">
+    <xsl:value-of select="$lookaheads"/>
+  </xsl:if>
+
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="symbol">
+  <xsl:text> </xsl:text>
+  <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template match="empty">
+  <xsl:text> /* empty */</xsl:text>
+</xsl:template>
+
+<xsl:template match="lookaheads">
+  <xsl:text>  [</xsl:text>
+  <xsl:apply-templates select="symbol"/>
+  <xsl:text>]</xsl:text>
+</xsl:template>
+
+<xsl:template match="lookaheads/symbol">
+  <xsl:value-of select="."/>
+  <xsl:if test="position() != last()">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="transition">
+  <xsl:param name="pad"/>
+  <xsl:text>    </xsl:text>
+  <xsl:call-template name="rpad">
+    <xsl:with-param name="str" select="string(@symbol)"/>
+    <xsl:with-param name="pad" select="number($pad) + 2"/>
+  </xsl:call-template>
+  <xsl:choose>
+    <xsl:when test="@type = 'shift'">
+      <xsl:text>shift, and go to state </xsl:text>
+      <xsl:value-of select="@state"/>
+    </xsl:when>
+    <xsl:when test="@type = 'goto'">
+      <xsl:text>go to state </xsl:text>
+      <xsl:value-of select="@state"/>
+    </xsl:when>
+  </xsl:choose>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="error">
+  <xsl:param name="pad"/>
+  <xsl:text>    </xsl:text>
+  <xsl:call-template name="rpad">
+    <xsl:with-param name="str" select="string(@symbol)"/>
+    <xsl:with-param name="pad" select="number($pad) + 2"/>
+  </xsl:call-template>
+  <xsl:text>error</xsl:text>
+  <xsl:text> (</xsl:text>
+  <xsl:value-of select="text()"/>
+  <xsl:text>)</xsl:text>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="reduction">
+  <xsl:param name="pad"/>
+  <xsl:text>    </xsl:text>
+  <xsl:call-template name="rpad">
+    <xsl:with-param name="str" select="string(@symbol)"/>
+    <xsl:with-param name="pad" select="number($pad) + 2"/>
+  </xsl:call-template>
+  <xsl:if test="@enabled = 'false'">
+    <xsl:text>[</xsl:text>
+  </xsl:if>
+  <xsl:choose>
+    <xsl:when test="@rule = 'accept'">
+      <xsl:text>accept</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>reduce using rule </xsl:text>
+      <xsl:value-of select="@rule"/>
+      <xsl:text> (</xsl:text>
+      <xsl:value-of
+	  select="key('bison:ruleByNumber', current()/@rule)/lhs[text()]"/>
+      <xsl:text>)</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:if test="@enabled = 'false'">
+    <xsl:text>]</xsl:text>
+  </xsl:if>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="solved-conflicts">
+  <xsl:if test="resolution">
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="resolution"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="resolution">
+  <xsl:text>    Conflict between rule </xsl:text>
+  <xsl:value-of select="@rule"/>
+  <xsl:text> and token </xsl:text>
+  <xsl:value-of select="@symbol"/>
+  <xsl:text> resolved as </xsl:text>
+  <xsl:if test="@type = 'error'">
+    <xsl:text>an </xsl:text>
+  </xsl:if>
+  <xsl:value-of select="@type"/>
+  <xsl:text> (</xsl:text>
+  <xsl:value-of select="."/>
+  <xsl:text>).&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template name="max-width-symbol">
+  <xsl:param name="node"/>
+  <xsl:variable name="longest">
+    <xsl:for-each select="$node">
+      <xsl:sort data-type="number" select="string-length(@symbol)"
+		order="descending"/>
+      <xsl:if test="position() = 1">
+	<xsl:value-of select="string-length(@symbol)"/>
+      </xsl:if>
+    </xsl:for-each>
+  </xsl:variable>
+  <xsl:value-of select="$longest"/>
+</xsl:template>
+
+<xsl:template name="lpad">
+  <xsl:param name="str" select="''"/>
+  <xsl:param name="pad" select="0"/>
+  <xsl:variable name="diff" select="$pad - string-length($str)" />
+  <xsl:choose>
+    <xsl:when test="$diff &lt; 0">
+      <xsl:value-of select="$str"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="space">
+	<xsl:with-param name="repeat" select="$diff"/>
+      </xsl:call-template>
+      <xsl:value-of select="$str"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="rpad">
+  <xsl:param name="str" select="''"/>
+  <xsl:param name="pad" select="0"/>
+  <xsl:variable name="diff" select="$pad - string-length($str)"/>
+  <xsl:choose>
+    <xsl:when test="$diff &lt; 0">
+      <xsl:value-of select="$str"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$str"/>
+      <xsl:call-template name="space">
+	<xsl:with-param name="repeat" select="$diff"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="space">
+  <xsl:param name="repeat">0</xsl:param>
+  <xsl:param name="fill" select="' '"/>
+  <xsl:if test="number($repeat) &gt;= 1">
+    <xsl:call-template name="space">
+      <xsl:with-param name="repeat" select="$repeat - 1"/>
+      <xsl:with-param name="fill" select="$fill"/>
+    </xsl:call-template>
+    <xsl:value-of select="$fill"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template name="line-wrap">
+  <xsl:param name="line-length"/> <!-- required -->
+  <xsl:param name="first-line-length" select="$line-length"/>
+  <xsl:param name="text"/> <!-- required -->
+  <xsl:choose>
+    <xsl:when test="normalize-space($text) = ''" />
+    <xsl:when test="string-length($text) &lt;= $first-line-length">
+      <xsl:value-of select="concat($text, '&#10;')" />
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="break-pos">
+        <xsl:call-template name="ws-search">
+          <xsl:with-param name="text" select="$text" />
+          <xsl:with-param name="start" select="$first-line-length+1" />
+        </xsl:call-template>
+      </xsl:variable>
+      <xsl:value-of select="substring($text, 1, $break-pos - 1)" />
+      <xsl:text>&#10;</xsl:text>
+      <xsl:call-template name="line-wrap">
+        <xsl:with-param name="line-length" select="$line-length" />
+        <xsl:with-param
+          name="text" select="concat('    ', substring($text, $break-pos+1))"
+        />
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="ws-search">
+  <xsl:param name="text"/> <!-- required -->
+  <xsl:param name="start"/> <!-- required -->
+  <xsl:variable name="search-text" select="substring($text, $start)" />
+  <xsl:choose>
+    <xsl:when test="not(contains($search-text, ' '))">
+      <xsl:value-of select="string-length($text)+1" />
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of
+        select="$start + string-length(substring-before($search-text, ' '))"
+      />
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
Index: EcnlProtoTool/trunk/tools/share/bison/xslt/xml2xhtml.xsl
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/xslt/xml2xhtml.xsl	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/xslt/xml2xhtml.xsl	(revision 270)
@@ -0,0 +1,745 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    xml2html.xsl - transform Bison XML Report into XHTML.
+
+    Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+
+    This file is part of Bison, the GNU Compiler Compiler.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Written by Wojciech Polak <polak@gnu.org>.
+  -->
+
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns="http://www.w3.org/1999/xhtml"
+  xmlns:bison="http://www.gnu.org/software/bison/">
+
+<xsl:import href="bison.xsl"/>
+
+<xsl:output method="xml" encoding="UTF-8"
+	    doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+	    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+	    indent="yes"/>
+
+<xsl:template match="/">
+  <html>
+    <head>
+      <title>
+	<xsl:value-of select="bison-xml-report/filename"/>
+	<xsl:text> - GNU Bison XML Automaton Report</xsl:text>
+      </title>
+      <style type="text/css"><![CDATA[
+      body {
+        font-family: "Nimbus Sans L", Arial, sans-serif;
+	font-size: 9pt;
+      }
+      a:link {
+ 	color: #1f00ff;
+	text-decoration: none;
+      }
+      a:visited {
+ 	color: #1f00ff;
+	text-decoration: none;
+      }
+      a:hover {
+ 	color: red;
+      }
+      #menu a {
+        text-decoration: underline;
+      }
+      .i {
+        font-style: italic;
+      }
+      .pre {
+        font-family: monospace;
+        white-space: pre;
+      }
+      ol.decimal {
+        list-style-type: decimal;
+      }
+      ol.lower-alpha {
+        list-style-type: lower-alpha;
+      }
+      .point {
+        color: #cc0000;
+      }
+      #footer {
+        margin-top: 3.5em;
+        font-size: 7pt;
+      }
+      ]]></style>
+    </head>
+    <body>
+      <xsl:apply-templates select="bison-xml-report"/>
+      <xsl:text>&#10;&#10;</xsl:text>
+      <div id="footer"><hr />This document was generated using
+      <a href="http://www.gnu.org/software/bison/" title="GNU Bison">
+      GNU Bison <xsl:value-of select="/bison-xml-report/@version"/></a>
+      XML Automaton Report.<br />
+      <!-- default copying notice -->
+      Verbatim copying and distribution of this entire page is
+      permitted in any medium, provided this notice is preserved.</div>
+    </body>
+  </html>
+</xsl:template>
+
+<xsl:template match="bison-xml-report">
+  <h1>GNU Bison XML Automaton Report</h1>
+  <p>
+    input grammar: <span class="i"><xsl:value-of select="filename"/></span>
+  </p>
+
+  <xsl:text>&#10;&#10;</xsl:text>
+  <h3>Table of Contents</h3>
+  <ul id="menu">
+    <li>
+      <a href="#reductions">Reductions</a>
+      <ul class="lower-alpha">
+	<li><a href="#nonterminals_useless_in_grammar">Nonterminals useless in grammar</a></li>
+	<li><a href="#terminals_unused_in_grammar">Terminals unused in grammar</a></li>
+	<li><a href="#rules_useless_in_grammar">Rules useless in grammar</a></li>
+	<xsl:if test="grammar/rules/rule[@usefulness='useless-in-parser']">
+	  <li><a href="#rules_useless_in_parser">Rules useless in parser due to conflicts</a></li>
+	</xsl:if>
+      </ul>
+    </li>
+    <li><a href="#conflicts">Conflicts</a></li>
+    <li>
+      <a href="#grammar">Grammar</a>
+      <ul class="lower-alpha">
+	<li><a href="#grammar">Itemset</a></li>
+	<li><a href="#terminals">Terminal symbols</a></li>
+	<li><a href="#nonterminals">Nonterminal symbols</a></li>
+      </ul>
+    </li>
+    <li><a href="#automaton">Automaton</a></li>
+  </ul>
+  <xsl:apply-templates select="grammar" mode="reductions"/>
+  <xsl:apply-templates select="grammar" mode="useless-in-parser"/>
+  <xsl:apply-templates select="automaton" mode="conflicts"/>
+  <xsl:apply-templates select="grammar"/>
+  <xsl:apply-templates select="automaton"/>
+</xsl:template>
+
+<xsl:template match="grammar" mode="reductions">
+  <h2>
+    <a name="reductions"/>
+    <xsl:text> Reductions</xsl:text>
+  </h2>
+  <xsl:apply-templates select="nonterminals" mode="useless-in-grammar"/>
+  <xsl:apply-templates select="terminals" mode="unused-in-grammar"/>
+  <xsl:apply-templates select="rules" mode="useless-in-grammar"/>
+</xsl:template>
+
+<xsl:template match="nonterminals" mode="useless-in-grammar">
+  <h3>
+    <a name="nonterminals_useless_in_grammar"/>
+    <xsl:text> Nonterminals useless in grammar</xsl:text>
+  </h3>
+  <xsl:text>&#10;&#10;</xsl:text>
+  <xsl:if test="nonterminal[@usefulness='useless-in-grammar']">
+    <p class="pre">
+      <xsl:for-each select="nonterminal[@usefulness='useless-in-grammar']">
+	<xsl:text>   </xsl:text>
+	<xsl:value-of select="@name"/>
+	<xsl:text>&#10;</xsl:text>
+      </xsl:for-each>
+      <xsl:text>&#10;&#10;</xsl:text>
+    </p>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="terminals" mode="unused-in-grammar">
+  <h3>
+    <a name="terminals_unused_in_grammar"/>
+    <xsl:text> Terminals unused in grammar</xsl:text>
+  </h3>
+  <xsl:text>&#10;&#10;</xsl:text>
+  <xsl:if test="terminal[@usefulness='unused-in-grammar']">
+    <p class="pre">
+      <xsl:for-each select="terminal[@usefulness='unused-in-grammar']">
+        <xsl:sort select="@symbol-number" data-type="number"/>
+	<xsl:text>   </xsl:text>
+	<xsl:value-of select="@name"/>
+	<xsl:text>&#10;</xsl:text>
+      </xsl:for-each>
+      <xsl:text>&#10;&#10;</xsl:text>
+    </p>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="rules" mode="useless-in-grammar">
+  <h3>
+    <a name="rules_useless_in_grammar"/>
+    <xsl:text> Rules useless in grammar</xsl:text>
+  </h3>
+  <xsl:text>&#10;</xsl:text>
+  <xsl:variable name="set" select="rule[@usefulness='useless-in-grammar']"/>
+  <xsl:if test="$set">
+    <p class="pre">
+      <xsl:call-template name="style-rule-set">
+        <xsl:with-param name="rule-set" select="$set"/>
+      </xsl:call-template>
+      <xsl:text>&#10;&#10;</xsl:text>
+    </p>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="grammar" mode="useless-in-parser">
+  <xsl:variable
+    name="set" select="rules/rule[@usefulness='useless-in-parser']"
+  />
+  <xsl:if test="$set">
+    <h2>
+      <a name="rules_useless_in_parser"/>
+      <xsl:text> Rules useless in parser due to conflicts</xsl:text>
+    </h2>
+    <xsl:text>&#10;</xsl:text>
+    <p class="pre">
+      <xsl:call-template name="style-rule-set">
+        <xsl:with-param name="rule-set" select="$set"/>
+      </xsl:call-template>
+    </p>
+    <xsl:text>&#10;&#10;</xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="grammar">
+  <h2>
+    <a name="grammar"/>
+    <xsl:text> Grammar</xsl:text>
+  </h2>
+  <xsl:text>&#10;</xsl:text>
+  <p class="pre">
+    <xsl:call-template name="style-rule-set">
+      <xsl:with-param
+        name="rule-set" select="rules/rule[@usefulness!='useless-in-grammar']"
+      />
+    </xsl:call-template>
+  </p>
+  <xsl:text>&#10;&#10;</xsl:text>
+  <xsl:apply-templates select="terminals"/>
+  <xsl:apply-templates select="nonterminals"/>
+</xsl:template>
+
+<xsl:template name="style-rule-set">
+  <xsl:param name="rule-set"/>
+  <xsl:for-each select="$rule-set">
+    <xsl:apply-templates select=".">
+      <xsl:with-param name="pad" select="'3'"/>
+      <xsl:with-param name="prev-lhs">
+        <xsl:if test="position()>1">
+          <xsl:variable name="position" select="position()"/>
+          <xsl:value-of select="$rule-set[$position - 1]/lhs"/>
+        </xsl:if>
+      </xsl:with-param>
+    </xsl:apply-templates>
+  </xsl:for-each>
+</xsl:template>
+
+<xsl:template match="automaton" mode="conflicts">
+  <h2>
+    <a name="conflicts"/>
+    <xsl:text> Conflicts</xsl:text>
+  </h2>
+  <xsl:text>&#10;&#10;</xsl:text>
+  <xsl:variable name="conflict-report">
+    <xsl:apply-templates select="state" mode="conflicts"/>
+  </xsl:variable>
+  <xsl:if test="string-length($conflict-report) != 0">
+    <p class="pre">
+      <xsl:copy-of select="$conflict-report"/>
+      <xsl:text>&#10;&#10;</xsl:text>
+    </p>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="state" mode="conflicts">
+  <xsl:variable name="conflict-counts">
+    <xsl:apply-templates select="." mode="bison:count-conflicts" />
+  </xsl:variable>
+  <xsl:variable
+    name="sr-count" select="substring-before($conflict-counts, ',')"
+  />
+  <xsl:variable
+    name="rr-count" select="substring-after($conflict-counts, ',')"
+  />
+  <xsl:if test="$sr-count > 0 or $rr-count > 0">
+    <a>
+      <xsl:attribute name="href">
+        <xsl:value-of select="concat('#state_', @number)"/>
+      </xsl:attribute>
+      <xsl:value-of select="concat('State ', @number)"/>
+    </a>
+    <xsl:text> conflicts:</xsl:text>
+    <xsl:if test="$sr-count > 0">
+      <xsl:value-of select="concat(' ', $sr-count, ' shift/reduce')"/>
+      <xsl:if test="$rr-count > 0">
+        <xsl:value-of select="(',')"/>
+      </xsl:if>
+    </xsl:if>
+    <xsl:if test="$rr-count > 0">
+      <xsl:value-of select="concat(' ', $rr-count, ' reduce/reduce')"/>
+    </xsl:if>
+    <xsl:value-of select="'&#10;'"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="grammar/terminals">
+  <h3>
+    <a name="terminals"/>
+    <xsl:text> Terminals, with rules where they appear</xsl:text>
+  </h3>
+  <xsl:text>&#10;&#10;</xsl:text>
+  <p class="pre">
+    <xsl:apply-templates select="terminal"/>
+  </p>
+  <xsl:text>&#10;&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="grammar/nonterminals">
+  <h3>
+    <a name="nonterminals"/>
+    <xsl:text> Nonterminals, with rules where they appear</xsl:text>
+  </h3>
+  <xsl:text>&#10;&#10;</xsl:text>
+  <p class="pre">
+    <xsl:apply-templates
+      select="nonterminal[@usefulness!='useless-in-grammar']"
+    />
+  </p>
+</xsl:template>
+
+<xsl:template match="terminal">
+  <b><xsl:value-of select="@name"/></b>
+  <xsl:value-of select="concat(' (', @token-number, ')')"/>
+  <xsl:for-each select="key('bison:ruleByRhs', @name)">
+    <xsl:apply-templates select="." mode="number-link"/>
+  </xsl:for-each>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="nonterminal">
+  <b><xsl:value-of select="@name"/></b>
+  <xsl:value-of select="concat(' (', @symbol-number, ')')"/>
+  <xsl:text>&#10;    </xsl:text>
+  <xsl:if test="key('bison:ruleByLhs', @name)">
+    <xsl:text>on left:</xsl:text>
+    <xsl:for-each select="key('bison:ruleByLhs', @name)">
+      <xsl:apply-templates select="." mode="number-link"/>
+    </xsl:for-each>
+  </xsl:if>
+  <xsl:if test="key('bison:ruleByRhs', @name)">
+    <xsl:if test="key('bison:ruleByLhs', @name)">
+      <xsl:text>&#10;    </xsl:text>
+    </xsl:if>
+    <xsl:text>on right:</xsl:text>
+    <xsl:for-each select="key('bison:ruleByRhs', @name)">
+      <xsl:apply-templates select="." mode="number-link"/>
+    </xsl:for-each>
+  </xsl:if>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="rule" mode="number-link">
+  <xsl:text> </xsl:text>
+  <a>
+    <xsl:attribute name="href">
+      <xsl:value-of select="concat('#rule_', @number)"/>
+    </xsl:attribute>
+    <xsl:value-of select="@number"/>
+  </a>
+</xsl:template>
+
+<xsl:template match="automaton">
+  <h2>
+    <a name="automaton"/>
+    <xsl:text> Automaton</xsl:text>
+  </h2>
+  <xsl:apply-templates select="state">
+    <xsl:with-param name="pad" select="'3'"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="automaton/state">
+  <xsl:param name="pad"/>
+  <xsl:text>&#10;&#10;</xsl:text>
+  <h3>
+    <a>
+      <xsl:attribute name="name">
+	<xsl:value-of select="concat('state_', @number)"/>
+      </xsl:attribute>
+    </a>
+    <xsl:text>state </xsl:text>
+    <xsl:value-of select="@number"/>
+  </h3>
+  <xsl:text>&#10;&#10;</xsl:text>
+  <p class="pre">
+    <xsl:apply-templates select="itemset/item">
+      <xsl:with-param name="pad" select="$pad"/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="actions/transitions">
+      <xsl:with-param name="type" select="'shift'"/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="actions/errors"/>
+    <xsl:apply-templates select="actions/reductions"/>
+    <xsl:apply-templates select="actions/transitions">
+      <xsl:with-param name="type" select="'goto'"/>
+    </xsl:apply-templates>
+    <xsl:apply-templates select="solved-conflicts"/>
+  </p>
+</xsl:template>
+
+<xsl:template match="actions/transitions">
+  <xsl:param name="type"/>
+  <xsl:if test="transition[@type = $type]">
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="transition[@type = $type]">
+      <xsl:with-param name="pad">
+	<xsl:call-template name="max-width-symbol">
+	  <xsl:with-param name="node" select="transition[@type = $type]"/>
+	</xsl:call-template>
+      </xsl:with-param>
+    </xsl:apply-templates>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="actions/errors">
+  <xsl:if test="error">
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="error">
+      <xsl:with-param name="pad">
+	<xsl:call-template name="max-width-symbol">
+	  <xsl:with-param name="node" select="error"/>
+	</xsl:call-template>
+      </xsl:with-param>
+    </xsl:apply-templates>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="actions/reductions">
+  <xsl:if test="reduction">
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="reduction">
+      <xsl:with-param name="pad">
+	<xsl:call-template name="max-width-symbol">
+	  <xsl:with-param name="node" select="reduction"/>
+	</xsl:call-template>
+      </xsl:with-param>
+    </xsl:apply-templates>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="item">
+  <xsl:param name="pad"/>
+  <xsl:param name="prev-rule-number"
+	     select="preceding-sibling::item[1]/@rule-number"/>
+  <xsl:apply-templates
+    select="key('bison:ruleByNumber', current()/@rule-number)"
+  >
+    <xsl:with-param name="itemset" select="'true'"/>
+    <xsl:with-param name="pad" select="$pad"/>
+    <xsl:with-param name="prev-lhs"
+      select="key('bison:ruleByNumber', $prev-rule-number)/lhs[text()]"
+   />
+    <xsl:with-param name="point" select="@point"/>
+    <xsl:with-param name="lookaheads">
+      <xsl:apply-templates select="lookaheads"/>
+    </xsl:with-param>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="rule">
+  <xsl:param name="itemset"/>
+  <xsl:param name="pad"/>
+  <xsl:param name="prev-lhs"/>
+  <xsl:param name="point"/>
+  <xsl:param name="lookaheads"/>
+
+  <xsl:if test="$itemset != 'true' and not($prev-lhs = lhs[text()])">
+    <xsl:text>&#10;</xsl:text>
+  </xsl:if>
+
+  <xsl:if test="$itemset != 'true'">
+    <a>
+      <xsl:attribute name="name">
+	<xsl:value-of select="concat('rule_', @number)"/>
+      </xsl:attribute>
+    </a>
+  </xsl:if>
+  <xsl:text>  </xsl:text>
+
+  <xsl:choose>
+    <xsl:when test="$itemset = 'true'">
+      <a>
+	<xsl:attribute name="href">
+	  <xsl:value-of select="concat('#rule_', @number)"/>
+	</xsl:attribute>
+	<xsl:call-template name="lpad">
+	  <xsl:with-param name="str" select="string(@number)"/>
+	  <xsl:with-param name="pad" select="number($pad)"/>
+	</xsl:call-template>
+      </a>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="lpad">
+	<xsl:with-param name="str" select="string(@number)"/>
+	<xsl:with-param name="pad" select="number($pad)"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:text> </xsl:text>
+
+  <!-- LHS -->
+  <xsl:choose>
+    <xsl:when test="$itemset != 'true' and $prev-lhs = lhs[text()]">
+      <xsl:call-template name="lpad">
+	<xsl:with-param name="str" select="'|'"/>
+	<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 2"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$itemset = 'true' and $prev-lhs = lhs[text()]">
+      <xsl:call-template name="lpad">
+	<xsl:with-param name="str" select="'|'"/>
+	<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 2"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <span class="i">
+	<xsl:value-of select="lhs"/>
+      </span>
+      <xsl:text> &#8594;</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+
+  <!-- RHS -->
+  <xsl:for-each select="rhs/*">
+    <xsl:if test="position() = $point + 1">
+      <xsl:text> </xsl:text>
+      <span class="point">.</span>
+    </xsl:if>
+    <xsl:if test="$itemset = 'true' and name(.) != 'empty'">
+      <xsl:apply-templates select="."/>
+    </xsl:if>
+    <xsl:if test="$itemset != 'true'">
+      <xsl:apply-templates select="."/>
+    </xsl:if>
+    <xsl:if test="position() = last() and position() = $point">
+      <xsl:text> </xsl:text>
+      <span class="point">.</span>
+    </xsl:if>
+  </xsl:for-each>
+  <xsl:if test="$lookaheads">
+    <xsl:value-of select="$lookaheads"/>
+  </xsl:if>
+
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="symbol">
+  <xsl:text> </xsl:text>
+  <xsl:choose>
+    <xsl:when test="name(key('bison:symbolByName', .)) = 'nonterminal'">
+      <span class="i"><xsl:value-of select="."/></span>
+    </xsl:when>
+    <xsl:otherwise>
+      <b><xsl:value-of select="."/></b>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="empty">
+  <xsl:text> &#949;</xsl:text>
+</xsl:template>
+
+<xsl:template match="lookaheads">
+  <xsl:text>  [</xsl:text>
+  <xsl:apply-templates select="symbol"/>
+  <xsl:text>]</xsl:text>
+</xsl:template>
+
+<xsl:template match="lookaheads/symbol">
+  <xsl:value-of select="."/>
+  <xsl:if test="position() != last()">
+    <xsl:text>, </xsl:text>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="transition">
+  <xsl:param name="pad"/>
+  <xsl:text>    </xsl:text>
+  <xsl:call-template name="rpad">
+    <xsl:with-param name="str" select="string(@symbol)"/>
+    <xsl:with-param name="pad" select="number($pad) + 2"/>
+  </xsl:call-template>
+  <xsl:choose>
+    <xsl:when test="@type = 'shift'">
+      <a>
+	<xsl:attribute name="href">
+	  <xsl:value-of select="concat('#state_', @state)"/>
+	</xsl:attribute>
+	<xsl:value-of select="concat('shift, and go to state ', @state)"/>
+      </a>
+    </xsl:when>
+    <xsl:when test="@type = 'goto'">
+      <a>
+	<xsl:attribute name="href">
+	  <xsl:value-of select="concat('#state_', @state)"/>
+	</xsl:attribute>
+	<xsl:value-of select="concat('go to state ', @state)"/>
+      </a>
+    </xsl:when>
+  </xsl:choose>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="error">
+  <xsl:param name="pad"/>
+  <xsl:text>    </xsl:text>
+  <xsl:call-template name="rpad">
+    <xsl:with-param name="str" select="string(@symbol)"/>
+    <xsl:with-param name="pad" select="number($pad) + 2"/>
+  </xsl:call-template>
+  <xsl:text>error</xsl:text>
+  <xsl:text> (</xsl:text>
+  <xsl:value-of select="text()"/>
+  <xsl:text>)</xsl:text>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="reduction">
+  <xsl:param name="pad"/>
+  <xsl:text>    </xsl:text>
+  <xsl:call-template name="rpad">
+    <xsl:with-param name="str" select="string(@symbol)"/>
+    <xsl:with-param name="pad" select="number($pad) + 2"/>
+  </xsl:call-template>
+  <xsl:if test="@enabled = 'false'">
+    <xsl:text>[</xsl:text>
+  </xsl:if>
+  <xsl:choose>
+    <xsl:when test="@rule = 'accept'">
+      <xsl:text>accept</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <a>
+	<xsl:attribute name="href">
+	  <xsl:value-of select="concat('#rule_', @rule)"/>
+	</xsl:attribute>
+	<xsl:value-of select="concat('reduce using rule ', @rule)"/>
+      </a>
+      <xsl:text> (</xsl:text>
+      <xsl:value-of
+        select="key('bison:ruleByNumber', current()/@rule)/lhs[text()]"
+      />
+      <xsl:text>)</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:if test="@enabled = 'false'">
+    <xsl:text>]</xsl:text>
+  </xsl:if>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="solved-conflicts">
+  <xsl:if test="resolution">
+    <xsl:text>&#10;</xsl:text>
+    <xsl:apply-templates select="resolution"/>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="resolution">
+  <xsl:text>    Conflict between </xsl:text>
+  <a>
+    <xsl:attribute name="href">
+      <xsl:value-of select="concat('#rule_', @rule)"/>
+    </xsl:attribute>
+    <xsl:value-of select="concat('rule ',@rule)"/>
+  </a>
+  <xsl:text> and token </xsl:text>
+  <xsl:value-of select="@symbol"/>
+  <xsl:text> resolved as </xsl:text>
+  <xsl:if test="@type = 'error'">
+    <xsl:text>an </xsl:text>
+  </xsl:if>
+  <xsl:value-of select="@type"/>
+  <xsl:text> (</xsl:text>
+  <xsl:value-of select="."/>
+  <xsl:text>).&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template name="max-width-symbol">
+  <xsl:param name="node"/>
+  <xsl:variable name="longest">
+    <xsl:for-each select="$node">
+      <xsl:sort data-type="number" select="string-length(@symbol)"
+		order="descending"/>
+      <xsl:if test="position() = 1">
+	<xsl:value-of select="string-length(@symbol)"/>
+      </xsl:if>
+    </xsl:for-each>
+  </xsl:variable>
+  <xsl:value-of select="$longest"/>
+</xsl:template>
+
+<xsl:template name="lpad">
+  <xsl:param name="str" select="''"/>
+  <xsl:param name="pad" select="0"/>
+  <xsl:variable name="diff" select="$pad - string-length($str)" />
+  <xsl:choose>
+    <xsl:when test="$diff &lt; 0">
+      <xsl:value-of select="$str"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="space">
+	<xsl:with-param name="repeat" select="$diff"/>
+      </xsl:call-template>
+      <xsl:value-of select="$str"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="rpad">
+  <xsl:param name="str" select="''"/>
+  <xsl:param name="pad" select="0"/>
+  <xsl:variable name="diff" select="$pad - string-length($str)"/>
+  <xsl:choose>
+    <xsl:when test="$diff &lt; 0">
+      <xsl:value-of select="$str"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$str"/>
+      <xsl:call-template name="space">
+	<xsl:with-param name="repeat" select="$diff"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="space">
+  <xsl:param name="repeat">0</xsl:param>
+  <xsl:param name="fill" select="' '"/>
+  <xsl:if test="number($repeat) &gt;= 1">
+    <xsl:call-template name="space">
+      <xsl:with-param name="repeat" select="$repeat - 1"/>
+      <xsl:with-param name="fill" select="$fill"/>
+    </xsl:call-template>
+    <xsl:value-of select="$fill"/>
+  </xsl:if>
+</xsl:template>
+
+</xsl:stylesheet>
Index: EcnlProtoTool/trunk/tools/share/bison/yacc.c
===================================================================
--- EcnlProtoTool/trunk/tools/share/bison/yacc.c	(revision 270)
+++ EcnlProtoTool/trunk/tools/share/bison/yacc.c	(revision 270)
@@ -0,0 +1,1743 @@
+                                                             -*- C -*-
+
+# Yacc compatible skeleton for Bison
+
+# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+# 2007, 2008 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check the value of %define api.push_pull.
+b4_percent_define_default([[api.push_pull]], [[pull]])
+b4_percent_define_check_values([[[[api.push_pull]],
+                               [[pull]], [[push]], [[both]]]])
+b4_define_flag_if([pull]) m4_define([b4_pull_flag], [[1]])
+b4_define_flag_if([push]) m4_define([b4_push_flag], [[1]])
+m4_case(b4_percent_define_get([[api.push_pull]]),
+        [pull], [m4_define([b4_push_flag], [[0]])],
+        [push], [m4_define([b4_pull_flag], [[0]])])
+
+# Handle BISON_USE_PUSH_FOR_PULL for the test suite.  So that push parsing
+# tests function as written, don't let BISON_USE_PUSH_FOR_PULL modify Bison's
+# behavior at all when push parsing is already requested.
+b4_define_flag_if([use_push_for_pull])
+b4_use_push_for_pull_if([
+  b4_push_if([m4_define([b4_use_push_for_pull_flag], [[0]])],
+             [m4_define([b4_push_flag], [[1]])])])
+
+m4_include(b4_pkgdatadir/[c.m4])
+
+## ---------------- ##
+## Default values.  ##
+## ---------------- ##
+
+# Stack parameters.
+m4_define_default([b4_stack_depth_max], [10000])
+m4_define_default([b4_stack_depth_init],  [200])
+
+
+## ------------------------ ##
+## Pure/impure interfaces.  ##
+## ------------------------ ##
+
+b4_percent_define_default([[api.pure]], [[false]])
+b4_define_flag_if([pure])
+m4_define([b4_pure_flag],
+          [b4_percent_define_flag_if([[api.pure]], [[1]], [[0]])])
+
+# b4_yacc_pure_if(IF-TRUE, IF-FALSE)
+# ----------------------------------
+# Expand IF-TRUE, if %pure-parser and %parse-param, IF-FALSE otherwise.
+m4_define([b4_yacc_pure_if],
+[b4_pure_if([m4_ifset([b4_parse_param],
+		      [$1], [$2])],
+	    [$2])])
+
+
+# b4_yyerror_args
+# ---------------
+# Arguments passed to yyerror: user args plus yylloc.
+m4_define([b4_yyerror_args],
+[b4_yacc_pure_if([b4_locations_if([&yylloc, ])])dnl
+m4_ifset([b4_parse_param], [b4_c_args(b4_parse_param), ])])
+
+
+# b4_lex_param
+# ------------
+# Accumulate in b4_lex_param all the yylex arguments.
+# b4_lex_param arrives quoted twice, but we want to keep only one level.
+m4_define([b4_lex_param],
+m4_dquote(b4_pure_if([[[[YYSTYPE *]], [[&yylval]]][]dnl
+b4_locations_if([, [[YYLTYPE *], [&yylloc]]])m4_ifdef([b4_lex_param], [, ])])dnl
+m4_ifdef([b4_lex_param], b4_lex_param)))
+
+
+## ------------ ##
+## Data Types.  ##
+## ------------ ##
+
+# b4_int_type(MIN, MAX)
+# ---------------------
+# Return the smallest int type able to handle numbers ranging from
+# MIN to MAX (included).  Overwrite the version from c.m4, which
+# uses only C89 types, so that the user can override the shorter
+# types, and so that pre-C89 compilers are handled correctly.
+m4_define([b4_int_type],
+[m4_if(b4_ints_in($@,      [0],   [255]), [1], [yytype_uint8],
+       b4_ints_in($@,   [-128],   [127]), [1], [yytype_int8],
+
+       b4_ints_in($@,      [0], [65535]), [1], [yytype_uint16],
+       b4_ints_in($@, [-32768], [32767]), [1], [yytype_int16],
+
+       m4_eval([0 <= $1]),                [1], [unsigned int],
+
+					       [int])])
+
+
+## ----------------- ##
+## Semantic Values.  ##
+## ----------------- ##
+
+
+# b4_lhs_value([TYPE])
+# --------------------
+# Expansion of $<TYPE>$.
+m4_define([b4_lhs_value],
+[(yyval[]m4_ifval([$1], [.$1]))])
+
+
+# b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
+# --------------------------------------
+# Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
+# symbols on RHS.
+m4_define([b4_rhs_value],
+[(yyvsp@{($2) - ($1)@}m4_ifval([$3], [.$3]))])
+
+
+
+## ----------- ##
+## Locations.  ##
+## ----------- ##
+
+# b4_lhs_location()
+# -----------------
+# Expansion of @$.
+m4_define([b4_lhs_location],
+[(yyloc)])
+
+
+# b4_rhs_location(RULE-LENGTH, NUM)
+# ---------------------------------
+# Expansion of @NUM, where the current rule has RULE-LENGTH symbols
+# on RHS.
+m4_define([b4_rhs_location],
+[(yylsp@{($2) - ($1)@})])
+
+
+
+## --------------------------------------------------------- ##
+## Defining symbol actions, e.g., printers and destructors.  ##
+## --------------------------------------------------------- ##
+
+# We do want M4 expansion after # for CPP macros.
+m4_changecom()
+m4_divert_push(0)dnl
+@output(b4_parser_file_name@)
+b4_copyright([Skeleton implementation for Bison's Yacc-like parsers in C],dnl '
+  [1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])[
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+   simplifying the original so-called "semantic" parser.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+]b4_identification
+b4_percent_code_get([[top]])[]dnl
+m4_if(b4_prefix, [yy], [],
+[[/* Substitute the variable and function names.  */
+]b4_pull_if([[#define yyparse         ]b4_prefix[parse
+]])b4_push_if([[#define yypush_parse    ]b4_prefix[push_parse
+]b4_pull_if([[#define yypull_parse    ]b4_prefix[pull_parse
+]])[#define yypstate_new    ]b4_prefix[pstate_new
+#define yypstate_delete ]b4_prefix[pstate_delete
+#define yypstate        ]b4_prefix[pstate
+]])[#define yylex           ]b4_prefix[lex
+#define yyerror         ]b4_prefix[error
+#define yylval          ]b4_prefix[lval
+#define yychar          ]b4_prefix[char
+#define yydebug         ]b4_prefix[debug
+#define yynerrs         ]b4_prefix[nerrs
+]b4_locations_if([[#define yylloc          ]b4_prefix[lloc]])])[
+
+/* Copy the first part of user declarations.  */
+]b4_user_pre_prologue[
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG ]b4_debug_flag[
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE ]b4_error_verbose_flag[
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE ]b4_token_table[
+#endif
+
+]b4_percent_code_get([[requires]])[]dnl
+
+b4_token_enums_defines(b4_tokens)[
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+]m4_ifdef([b4_stype],
+[[typedef union ]b4_union_name[
+{
+]b4_user_stype[
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1]],
+[m4_if(b4_tag_seen_flag, 0,
+[[typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1]])])[
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif]b4_locations_if([[
+
+#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
+typedef struct YYLTYPE
+{
+  int first_line;
+  int first_column;
+  int last_line;
+  int last_column;
+} YYLTYPE;
+# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
+# define YYLTYPE_IS_DECLARED 1
+# define YYLTYPE_IS_TRIVIAL 1
+#endif]])b4_push_if([[
+
+#ifndef YYPUSH_DECLS
+#  define YYPUSH_DECLS
+struct yypstate;
+typedef struct yypstate yypstate;
+enum { YYPUSH_MORE = 4 };
+
+]b4_pull_if([b4_c_function_decl([[yyparse]], [[int]], b4_parse_param)
+])b4_c_function_decl([[yypush_parse]], [[int]],
+  [[[yypstate *yyps]], [[yyps]]]b4_pure_if([,
+  [[[int yypushed_char]], [[yypushed_char]]],
+  [[[YYSTYPE const *yypushed_val]], [[yypushed_val]]]b4_locations_if([,
+  [[[YYLTYPE const *yypushed_loc]], [[yypushed_loc]]]])])m4_ifset([b4_parse_param], [,
+  b4_parse_param]))
+b4_pull_if([b4_c_function_decl([[yypull_parse]], [[int]],
+  [[[yypstate *yyps]], [[yyps]]]m4_ifset([b4_parse_param], [,
+  b4_parse_param]))])
+b4_c_function_decl([[yypstate_new]], [[yypstate *]], [[[void]], []])
+b4_c_function_decl([[yypstate_delete]], [[void]],
+                   [[[yypstate *yyps]], [[yyps]]])[
+#endif]])
+
+b4_percent_code_get([[provides]])[]dnl
+
+[/* Copy the second part of user declarations.  */
+]b4_user_post_prologue
+b4_percent_code_get[]dnl
+
+[#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif ]b4_c_modern[
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+#  define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+#  define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && ]b4_c_modern[
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# else
+#  define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions.  */
+#ifndef lint
+# define YYID(n) (n)
+#else
+]b4_c_function_def([YYID], [static int], [[int yyi], [yyi]])[
+{
+  return yyi;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+]b4_push_if([],
+[[/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
+#   elif defined __BUILTIN_VA_ARG_INCR
+#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+#    define alloca _alloca
+#   else
+#    define YYSTACK_ALLOC alloca
+#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && ]b4_c_modern[
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#     ifndef _STDLIB_H
+#      define _STDLIB_H 1
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+
+]])dnl
+[# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+#  endif
+# else
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+#  endif
+#  if (defined __cplusplus && ! defined _STDLIB_H \
+       && ! ((defined YYMALLOC || defined malloc) \
+	     && (defined YYFREE || defined free)))
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   ifndef _STDLIB_H
+#    define _STDLIB_H 1
+#   endif
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC malloc
+#   if ! defined malloc && ! defined _STDLIB_H && ]b4_c_modern[
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE free
+#   if ! defined free && ! defined _STDLIB_H && ]b4_c_modern[
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+     && (! defined __cplusplus \
+	 || (]b4_locations_if([[defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
+	     && ]])[defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  yytype_int16 yyss_alloc;
+  YYSTYPE yyvs_alloc;]b4_locations_if([
+  YYLTYPE yyls_alloc;])[
+};
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+]b4_locations_if(
+[# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+      + 2 * YYSTACK_GAP_MAXIMUM)],
+[# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+      + YYSTACK_GAP_MAXIMUM)])[
+
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  YYSIZE_T yyi;				\
+	  for (yyi = 0; yyi < (Count); yyi++)	\
+	    (To)[yyi] = (From)[yyi];		\
+	}					\
+      while (YYID (0))
+#  endif
+# endif
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
+    do									\
+      {									\
+	YYSIZE_T yynewbytes;						\
+	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
+	Stack = &yyptr->Stack_alloc;					\
+	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+	yyptr += yynewbytes / sizeof (*yyptr);				\
+      }									\
+    while (YYID (0))
+
+#endif
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  ]b4_final_state_number[
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   ]b4_last[
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  ]b4_tokens_number[
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  ]b4_nterms_number[
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  ]b4_rules_number[
+/* YYNRULES -- Number of states.  */
+#define YYNSTATES  ]b4_states_number[
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYUNDEFTOK  ]b4_undef_token_number[
+#define YYMAXUTOK   ]b4_user_token_number_max[
+
+#define YYTRANSLATE(YYX)						\
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const ]b4_int_type_for([b4_translate])[ yytranslate[] =
+{
+  ]b4_translate[
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const ]b4_int_type_for([b4_prhs])[ yyprhs[] =
+{
+  ]b4_prhs[
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+static const ]b4_int_type_for([b4_rhs])[ yyrhs[] =
+{
+  ]b4_rhs[
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const ]b4_int_type_for([b4_rline])[ yyrline[] =
+{
+  ]b4_rline[
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
+static const char *const yytname[] =
+{
+  ]b4_tname[
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+   token YYLEX-NUM.  */
+static const ]b4_int_type_for([b4_toknum])[ yytoknum[] =
+{
+  ]b4_toknum[
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const ]b4_int_type_for([b4_r1])[ yyr1[] =
+{
+  ]b4_r1[
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const ]b4_int_type_for([b4_r2])[ yyr2[] =
+{
+  ]b4_r2[
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+   means the default is an error.  */
+static const ]b4_int_type_for([b4_defact])[ yydefact[] =
+{
+  ]b4_defact[
+};
+
+/* YYDEFGOTO[NTERM-NUM].  */
+static const ]b4_int_type_for([b4_defgoto])[ yydefgoto[] =
+{
+  ]b4_defgoto[
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF ]b4_pact_ninf[
+static const ]b4_int_type_for([b4_pact])[ yypact[] =
+{
+  ]b4_pact[
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const ]b4_int_type_for([b4_pgoto])[ yypgoto[] =
+{
+  ]b4_pgoto[
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If zero, do what YYDEFACT says.
+   If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF ]b4_table_ninf[
+static const ]b4_int_type_for([b4_table])[ yytable[] =
+{
+  ]b4_table[
+};
+
+static const ]b4_int_type_for([b4_check])[ yycheck[] =
+{
+  ]b4_check[
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const ]b4_int_type_for([b4_stos])[ yystos[] =
+{
+  ]b4_stos[
+};
+
+#define yyerrok		(yyerrstatus = 0)
+#define yyclearin	(yychar = YYEMPTY)
+#define YYEMPTY		(-2)
+#define YYEOF		0
+
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT		goto yyabortlab
+#define YYERROR		goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+
+#define YYFAIL		goto yyerrlab
+
+#define YYRECOVERING()  (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value)					\
+do								\
+  if (yychar == YYEMPTY && yylen == 1)				\
+    {								\
+      yychar = (Token);						\
+      yylval = (Value);						\
+      yytoken = YYTRANSLATE (yychar);				\
+      YYPOPSTACK (1);						\
+      goto yybackup;						\
+    }								\
+  else								\
+    {								\
+      yyerror (]b4_yyerror_args[YY_("syntax error: cannot back up")); \
+      YYERROR;							\
+    }								\
+while (YYID (0))
+
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)				\
+    do									\
+      if (YYID (N))                                                    \
+	{								\
+	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
+	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
+	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
+	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
+	}								\
+      else								\
+	{								\
+	  (Current).first_line   = (Current).last_line   =		\
+	    YYRHSLOC (Rhs, 0).last_line;				\
+	  (Current).first_column = (Current).last_column =		\
+	    YYRHSLOC (Rhs, 0).last_column;				\
+	}								\
+    while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+   This macro was not mandated originally: define only if we know
+   we won't break user code: when these are the locations we know.  */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+#  define YY_LOCATION_PRINT(File, Loc)			\
+     fprintf (File, "%d.%d-%d.%d",			\
+	      (Loc).first_line, (Loc).first_column,	\
+	      (Loc).last_line,  (Loc).last_column)
+# else
+#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments.  */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (]b4_pure_if([&yylval[]b4_locations_if([, &yylloc]), ])[YYLEX_PARAM)
+#else
+# define YYLEX ]b4_c_function_call([yylex], [int], b4_lex_param)[
+#endif
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)			\
+do {						\
+  if (yydebug)					\
+    YYFPRINTF Args;				\
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
+do {									  \
+  if (yydebug)								  \
+    {									  \
+      YYFPRINTF (stderr, "%s ", Title);					  \
+      yy_symbol_print (stderr,						  \
+		  Type, Value]b4_locations_if([, Location])[]b4_user_args[); \
+      YYFPRINTF (stderr, "\n");						  \
+    }									  \
+} while (YYID (0))
+
+]b4_yy_symbol_print_generate([b4_c_function_def])[
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+]b4_c_function_def([yy_stack_print], [static void],
+		   [[yytype_int16 *yybottom], [yybottom]],
+		   [[yytype_int16 *yytop],    [yytop]])[
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)				\
+do {								\
+  if (yydebug)							\
+    yy_stack_print ((Bottom), (Top));				\
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+]b4_c_function_def([yy_reduce_print], [static void],
+		   [[YYSTYPE *yyvsp], [yyvsp]],
+    b4_locations_if([[[YYLTYPE *yylsp], [yylsp]],
+		   ])[[int yyrule], [yyrule]]m4_ifset([b4_parse_param], [,
+		   b4_parse_param]))[
+{
+  int yynrhs = yyr2[yyrule];
+  int yyi;
+  unsigned long int yylno = yyrline[yyrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+	     yyrule - 1, yylno);
+  /* The symbols being reduced.  */
+  for (yyi = 0; yyi < yynrhs; yyi++)
+    {
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
+      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+		       &]b4_rhs_value(yynrhs, yyi + 1)[
+		       ]b4_locations_if([, &]b4_rhs_location(yynrhs, yyi + 1))[]dnl
+		       b4_user_args[);
+      YYFPRINTF (stderr, "\n");
+    }
+}
+
+# define YY_REDUCE_PRINT(Rule)		\
+do {					\
+  if (yydebug)				\
+    yy_reduce_print (yyvsp, ]b4_locations_if([yylsp, ])[Rule]b4_user_args[); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef	YYINITDEPTH
+# define YYINITDEPTH ]b4_stack_depth_init[
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH ]b4_stack_depth_max[
+#endif
+
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+#  if defined __GLIBC__ && defined _STRING_H
+#   define yystrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+]b4_c_function_def([yystrlen], [static YYSIZE_T],
+   [[const char *yystr], [yystr]])[
+{
+  YYSIZE_T yylen;
+  for (yylen = 0; yystr[yylen]; yylen++)
+    continue;
+  return yylen;
+}
+#  endif
+# endif
+
+# ifndef yystpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+]b4_c_function_def([yystpcpy], [static char *],
+   [[char *yydest], [yydest]], [[const char *yysrc], [yysrc]])[
+{
+  char *yyd = yydest;
+  const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yyerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+  if (*yystr == '"')
+    {
+      YYSIZE_T yyn = 0;
+      char const *yyp = yystr;
+
+      for (;;)
+	switch (*++yyp)
+	  {
+	  case '\'':
+	  case ',':
+	    goto do_not_strip_quotes;
+
+	  case '\\':
+	    if (*++yyp != '\\')
+	      goto do_not_strip_quotes;
+	    /* Fall through.  */
+	  default:
+	    if (yyres)
+	      yyres[yyn] = *yyp;
+	    yyn++;
+	    break;
+
+	  case '"':
+	    if (yyres)
+	      yyres[yyn] = '\0';
+	    return yyn;
+	  }
+    do_not_strip_quotes: ;
+    }
+
+  if (! yyres)
+    return yystrlen (yystr);
+
+  return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into YYRESULT an error message about the unexpected token
+   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
+   including the terminating null byte.  If YYRESULT is null, do not
+   copy anything; just return the number of bytes that would be
+   copied.  As a special case, return 0 if an ordinary "syntax error"
+   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
+   size calculation.  */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
+{
+  int yyn = yypact[yystate];
+
+  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+    return 0;
+  else
+    {
+      int yytype = YYTRANSLATE (yychar);
+      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+      YYSIZE_T yysize = yysize0;
+      YYSIZE_T yysize1;
+      int yysize_overflow = 0;
+      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+      int yyx;
+
+# if 0
+      /* This is so xgettext sees the translatable formats that are
+	 constructed on the fly.  */
+      YY_("syntax error, unexpected %s");
+      YY_("syntax error, unexpected %s, expecting %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+      char *yyfmt;
+      char const *yyf;
+      static char const yyunexpected[] = "syntax error, unexpected %s";
+      static char const yyexpecting[] = ", expecting %s";
+      static char const yyor[] = " or %s";
+      char yyformat[sizeof yyunexpected
+		    + sizeof yyexpecting - 1
+		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+		       * (sizeof yyor - 1))];
+      char const *yyprefix = yyexpecting;
+
+      /* Start YYX at -YYN if negative to avoid negative indexes in
+	 YYCHECK.  */
+      int yyxbegin = yyn < 0 ? -yyn : 0;
+
+      /* Stay within bounds of both yycheck and yytname.  */
+      int yychecklim = YYLAST - yyn + 1;
+      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+      int yycount = 1;
+
+      yyarg[0] = yytname[yytype];
+      yyfmt = yystpcpy (yyformat, yyunexpected);
+
+      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+	  {
+	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+	      {
+		yycount = 1;
+		yysize = yysize0;
+		yyformat[sizeof yyunexpected - 1] = '\0';
+		break;
+	      }
+	    yyarg[yycount++] = yytname[yyx];
+	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+	    yysize_overflow |= (yysize1 < yysize);
+	    yysize = yysize1;
+	    yyfmt = yystpcpy (yyfmt, yyprefix);
+	    yyprefix = yyor;
+	  }
+
+      yyf = YY_(yyformat);
+      yysize1 = yysize + yystrlen (yyf);
+      yysize_overflow |= (yysize1 < yysize);
+      yysize = yysize1;
+
+      if (yysize_overflow)
+	return YYSIZE_MAXIMUM;
+
+      if (yyresult)
+	{
+	  /* Avoid sprintf, as that infringes on the user's name space.
+	     Don't have undefined behavior even if the translation
+	     produced a string with the wrong number of "%s"s.  */
+	  char *yyp = yyresult;
+	  int yyi = 0;
+	  while ((*yyp = *yyf) != '\0')
+	    {
+	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+		{
+		  yyp += yytnamerr (yyp, yyarg[yyi++]);
+		  yyf += 2;
+		}
+	      else
+		{
+		  yyp++;
+		  yyf++;
+		}
+	    }
+	}
+      return yysize;
+    }
+}
+#endif /* YYERROR_VERBOSE */
+
+
+
+]b4_yydestruct_generate([b4_c_function_def])[
+
+]b4_push_if([],
+[[/* Prevent warnings from -Wmissing-prototypes.  */
+#ifdef YYPARSE_PARAM
+]b4_c_function_decl([yyparse], [int],
+   [[void *YYPARSE_PARAM], [YYPARSE_PARAM]])[
+#else /* ! YYPARSE_PARAM */
+]b4_c_function_decl([yyparse], [int], b4_parse_param)[
+#endif /* ! YYPARSE_PARAM */]])
+
+m4_divert_push([KILL])# ======================== M4 code.
+# b4_declare_scanner_communication_variables
+# ------------------------------------------
+# Declare the variables that are global, or local to YYPARSE if
+# pure-parser.
+m4_define([b4_declare_scanner_communication_variables],
+[[/* The lookahead symbol.  */
+int yychar;
+
+/* The semantic value of the lookahead symbol.  */
+YYSTYPE yylval;
+]b4_locations_if([[
+/* Location data for the lookahead symbol.  */
+YYLTYPE yylloc;
+]])b4_pure_if([], [[
+/* Number of syntax errors so far.  */
+int yynerrs;
+]])])
+
+# b4_declare_parser_state_variables
+# ---------------------------------
+# Declare all the variables that are needed to maintain the parser state
+# between calls to yypush_parse.
+m4_define([b4_declare_parser_state_variables],
+[b4_pure_if([[    /* Number of syntax errors so far.  */
+    int yynerrs;
+]])[
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
+
+    /* The stacks and their tools:
+       `yyss': related to states.
+       `yyvs': related to semantic values.]b4_locations_if([[
+       `yyls': related to locations.]])[
+
+       Refer to the stacks thru separate pointers, to allow yyoverflow
+       to reallocate them elsewhere.  */
+
+    /* The state stack.  */
+    yytype_int16 yyssa[YYINITDEPTH];
+    yytype_int16 *yyss;
+    yytype_int16 *yyssp;
+
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
+]b4_locations_if([[
+    /* The location stack.  */
+    YYLTYPE yylsa[YYINITDEPTH];
+    YYLTYPE *yyls;
+    YYLTYPE *yylsp;
+
+    /* The locations where the error started and ended.  */
+    YYLTYPE yyerror_range[2];
+]])[
+    YYSIZE_T yystacksize;
+]])
+
+m4_divert_pop([KILL])dnl# ====================== End of M4 code.
+
+b4_pure_if([], [b4_declare_scanner_communication_variables])
+
+b4_push_if(
+[[struct yypstate
+  {
+    ]b4_declare_parser_state_variables[
+    /* Used to determine if this is the first time this instance has
+       been used.  */
+    int yynew;
+  };]b4_pure_if([], [[
+
+static char yypstate_allocated = 0;]])b4_pull_if([
+
+b4_c_function_def([[yyparse]], [[int]], b4_parse_param)[
+{
+  return yypull_parse (0]m4_ifset([b4_parse_param],
+                                  [[, ]b4_c_args(b4_parse_param)])[);
+}
+
+]b4_c_function_def([[yypull_parse]], [[int]],
+  [[[yypstate *yyps]], [[yyps]]]m4_ifset([b4_parse_param], [,
+  b4_parse_param]))[
+{
+  int yystatus;
+  yypstate *yyps_local;]b4_pure_if([[
+  int yychar;
+  YYSTYPE yylval;]b4_locations_if([[
+  YYLTYPE yylloc;]])])[
+  if (yyps == 0)
+    {
+      yyps_local = yypstate_new ();
+      if (!yyps_local)
+        {]b4_pure_if([[
+          yyerror (]b4_yyerror_args[YY_("memory exhausted"));]], [[
+          if (!yypstate_allocated)
+            yyerror (]b4_yyerror_args[YY_("memory exhausted"));]])[
+          return 2;
+        }
+    }
+  else
+    yyps_local = yyps;
+  do {
+    yychar = YYLEX;
+    yystatus =
+      yypush_parse (yyps_local]b4_pure_if([[, yychar, &yylval]b4_locations_if([[, &yylloc]])])m4_ifset([b4_parse_param], [, b4_c_args(b4_parse_param)])[);
+  } while (yystatus == YYPUSH_MORE);
+  if (yyps == 0)
+    yypstate_delete (yyps_local);
+  return yystatus;
+}]])[
+
+/* Initialize the parser data structure.  */
+]b4_c_function_def([[yypstate_new]], [[yypstate *]])[
+{
+  yypstate *yyps;]b4_pure_if([], [[
+  if (yypstate_allocated)
+    return 0;]])[
+  yyps = (yypstate *) malloc (sizeof *yyps);
+  if (!yyps)
+    return 0;
+  yyps->yynew = 1;]b4_pure_if([], [[
+  yypstate_allocated = 1;]])[
+  return yyps;
+}
+
+]b4_c_function_def([[yypstate_delete]], [[void]],
+                   [[[yypstate *yyps]], [[yyps]]])[
+{
+#ifndef yyoverflow
+  /* If the stack was reallocated but the parse did not complete, then the
+     stack still needs to be freed.  */
+  if (!yyps->yynew && yyps->yyss != yyps->yyssa)
+    YYSTACK_FREE (yyps->yyss);
+#endif
+  free (yyps);]b4_pure_if([], [[
+  yypstate_allocated = 0;]])[
+}
+
+]b4_pure_if([[#define ]b4_prefix[nerrs yyps->]b4_prefix[nerrs
+]])[#define yystate yyps->yystate
+#define yyerrstatus yyps->yyerrstatus
+#define yyssa yyps->yyssa
+#define yyss yyps->yyss
+#define yyssp yyps->yyssp
+#define yyvsa yyps->yyvsa
+#define yyvs yyps->yyvs
+#define yyvsp yyps->yyvsp
+]b4_locations_if([[#define yylsa yyps->yylsa
+#define yyls yyps->yyls
+#define yylsp yyps->yylsp
+#define yyerror_range yyps->yyerror_range
+]])[#define yystacksize yyps->yystacksize
+]])[
+/*-------------------------.
+| yyparse or yypush_parse.  |
+`-------------------------*/
+]b4_push_if([
+b4_c_function_def([[yypush_parse]], [[int]],
+  [[[yypstate *yyps]], [[yyps]]]b4_pure_if([,
+  [[[int yypushed_char]], [[yypushed_char]]],
+  [[[YYSTYPE const *yypushed_val]], [[yypushed_val]]]b4_locations_if([,
+  [[[YYLTYPE const *yypushed_loc]], [[yypushed_loc]]]])])m4_ifset([b4_parse_param], [,
+  b4_parse_param]))], [
+#ifdef YYPARSE_PARAM
+b4_c_function_def([yyparse], [int], [[void *YYPARSE_PARAM], [YYPARSE_PARAM]])
+#else /* ! YYPARSE_PARAM */
+b4_c_function_def([yyparse], [int], b4_parse_param)
+#endif])[
+{
+]b4_pure_if([b4_declare_scanner_communication_variables])
+b4_push_if([b4_pure_if([], [[  int yypushed_char = yychar;
+  YYSTYPE yypushed_val = yylval;
+  ]b4_locations_if([[YYLTYPE yypushed_loc = yylloc;
+]])])],
+  [b4_declare_parser_state_variables])[
+  int yyn;
+  int yyresult;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yytoken;
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;]b4_locations_if([[
+  YYLTYPE yyloc;]])[
+
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char yymsgbuf[128];
+  char *yymsg = yymsgbuf;
+  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N)]b4_locations_if([, yylsp -= (N)])[)
+
+  /* The number of symbols on the RHS of the reduced rule.
+     Keep to zero when no symbol should be popped.  */
+  int yylen = 0;]b4_push_if([[
+
+  if (!yyps->yynew)
+    {
+      yyn = yypact[yystate];
+      goto yyread_pushed_token;
+    }]])[
+
+  yytoken = 0;
+  yyss = yyssa;
+  yyvs = yyvsa;]b4_locations_if([[
+  yyls = yylsa;]])[
+  yystacksize = YYINITDEPTH;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY; /* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+  yyssp = yyss;
+  yyvsp = yyvs;]b4_locations_if([[
+  yylsp = yyls;
+
+#if YYLTYPE_IS_TRIVIAL
+  /* Initialize the default location before parsing starts.  */
+  yylloc.first_line   = yylloc.last_line   = ]b4_location_initial_line[;
+  yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
+#endif]])
+m4_ifdef([b4_initial_action],[
+m4_pushdef([b4_at_dollar],     [m4_define([b4_at_dollar_used])yylloc])dnl
+m4_pushdef([b4_dollar_dollar], [m4_define([b4_dollar_dollar_used])yylval])dnl
+/* User initialization code.  */
+b4_user_initial_action
+m4_popdef([b4_dollar_dollar])dnl
+m4_popdef([b4_at_dollar])])dnl
+m4_ifdef([b4_dollar_dollar_used],[[  yyvsp[0] = yylval;
+]])dnl
+m4_ifdef([b4_at_dollar_used], [[  yylsp[0] = yylloc;
+]])[
+  goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate.  |
+`------------------------------------------------------------*/
+ yynewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed.  So pushing a state here evens the stacks.  */
+  yyssp++;
+
+ yysetstate:
+  *yyssp = yystate;
+
+  if (yyss + yystacksize - 1 <= yyssp)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      {
+	/* Give user a chance to reallocate the stack.  Use copies of
+	   these so that the &'s don't force the real ones into
+	   memory.  */
+	YYSTYPE *yyvs1 = yyvs;
+	yytype_int16 *yyss1 = yyss;]b4_locations_if([
+	YYLTYPE *yyls1 = yyls;])[
+
+	/* Each stack pointer address is followed by the size of the
+	   data in use in that stack, in bytes.  This used to be a
+	   conditional around just the two extra args, but that might
+	   be undefined if yyoverflow is a macro.  */
+	yyoverflow (YY_("memory exhausted"),
+		    &yyss1, yysize * sizeof (*yyssp),
+		    &yyvs1, yysize * sizeof (*yyvsp),]b4_locations_if([
+		    &yyls1, yysize * sizeof (*yylsp),])[
+		    &yystacksize);
+]b4_locations_if([
+	yyls = yyls1;])[
+	yyss = yyss1;
+	yyvs = yyvs1;
+      }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yyexhaustedlab;
+# else
+      /* Extend the stack our own way.  */
+      if (YYMAXDEPTH <= yystacksize)
+	goto yyexhaustedlab;
+      yystacksize *= 2;
+      if (YYMAXDEPTH < yystacksize)
+	yystacksize = YYMAXDEPTH;
+
+      {
+	yytype_int16 *yyss1 = yyss;
+	union yyalloc *yyptr =
+	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+	if (! yyptr)
+	  goto yyexhaustedlab;
+	YYSTACK_RELOCATE (yyss_alloc, yyss);
+	YYSTACK_RELOCATE (yyvs_alloc, yyvs);]b4_locations_if([
+	YYSTACK_RELOCATE (yyls_alloc, yyls);])[
+#  undef YYSTACK_RELOCATE
+	if (yyss1 != yyssa)
+	  YYSTACK_FREE (yyss1);
+      }
+# endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + yysize - 1;
+      yyvsp = yyvs + yysize - 1;]b4_locations_if([
+      yylsp = yyls + yysize - 1;])[
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+		  (unsigned long int) yystacksize));
+
+      if (yyss + yystacksize - 1 <= yyssp)
+	YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
+  goto yybackup;
+
+/*-----------.
+| yybackup.  |
+`-----------*/
+yybackup:
+
+  /* Do appropriate processing given the current state.  Read a
+     lookahead token if we need one and don't already have one.  */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+  yyn = yypact[yystate];
+  if (yyn == YYPACT_NINF)
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
+  if (yychar == YYEMPTY)
+    {]b4_push_if([[
+      if (!yyps->yynew)
+        {]b4_use_push_for_pull_if([], [[
+          YYDPRINTF ((stderr, "Return for a new token:\n"));]])[
+          yyresult = YYPUSH_MORE;
+          goto yypushreturn;
+        }
+      yyps->yynew = 0;]b4_pure_if([], [[
+      /* Restoring the pushed token is only necessary for the first
+         yypush_parse invocation since subsequent invocations don't overwrite
+         it before jumping to yyread_pushed_token.  */
+      yychar = yypushed_char;
+      yylval = yypushed_val;]b4_locations_if([[
+      yylloc = yypushed_loc;]])])[
+yyread_pushed_token:]])[
+      YYDPRINTF ((stderr, "Reading a token: "));]b4_push_if([b4_pure_if([[
+      yychar = yypushed_char;
+      if (yypushed_val)
+        yylval = *yypushed_val;]b4_locations_if([[
+      if (yypushed_loc)
+        yylloc = *yypushed_loc;]])])], [[
+      yychar = YYLEX;]])[
+    }
+
+  if (yychar <= YYEOF)
+    {
+      yychar = yytoken = YYEOF;
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yytoken = YYTRANSLATE (yychar);
+      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+    }
+
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  yyn += yytoken;
+  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+    goto yydefault;
+  yyn = yytable[yyn];
+  if (yyn <= 0)
+    {
+      if (yyn == 0 || yyn == YYTABLE_NINF)
+	goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yyerrstatus)
+    yyerrstatus--;
+
+  /* Shift the lookahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
+
+  yystate = yyn;
+  *++yyvsp = yylval;
+]b4_locations_if([  *++yylsp = yylloc;])[
+  goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yydefault:
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+  goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction.  |
+`-----------------------------*/
+yyreduce:
+  /* yyn is the number of a rule to reduce with.  */
+  yylen = yyr2[yyn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yyval = yyvsp[1-yylen];
+
+]b4_locations_if(
+[[  /* Default location.  */
+  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);]])[
+  YY_REDUCE_PRINT (yyn);
+  switch (yyn)
+    {
+      ]b4_user_actions[
+      default: break;
+    }
+  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+
+  *++yyvsp = yyval;]b4_locations_if([
+  *++yylsp = yyloc;])[
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTOKENS];
+
+  goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+  /* If not already recovering from an error, report this error.  */
+  if (!yyerrstatus)
+    {
+      ++yynerrs;
+#if ! YYERROR_VERBOSE
+      yyerror (]b4_yyerror_args[YY_("syntax error"));
+#else
+      {
+	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+	  {
+	    YYSIZE_T yyalloc = 2 * yysize;
+	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
+	    if (yymsg != yymsgbuf)
+	      YYSTACK_FREE (yymsg);
+	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+	    if (yymsg)
+	      yymsg_alloc = yyalloc;
+	    else
+	      {
+		yymsg = yymsgbuf;
+		yymsg_alloc = sizeof yymsgbuf;
+	      }
+	  }
+
+	if (0 < yysize && yysize <= yymsg_alloc)
+	  {
+	    (void) yysyntax_error (yymsg, yystate, yychar);
+	    yyerror (]b4_yyerror_args[yymsg);
+	  }
+	else
+	  {
+	    yyerror (]b4_yyerror_args[YY_("syntax error"));
+	    if (yysize != 0)
+	      goto yyexhaustedlab;
+	  }
+      }
+#endif
+    }
+
+]b4_locations_if([[  yyerror_range[0] = yylloc;]])[
+
+  if (yyerrstatus == 3)
+    {
+      /* If just tried and failed to reuse lookahead token after an
+	 error, discard it.  */
+
+      if (yychar <= YYEOF)
+	{
+	  /* Return failure if at end of input.  */
+	  if (yychar == YYEOF)
+	    YYABORT;
+	}
+      else
+	{
+	  yydestruct ("Error: discarding",
+		      yytoken, &yylval]b4_locations_if([, &yylloc])[]b4_user_args[);
+	  yychar = YYEMPTY;
+	}
+    }
+
+  /* Else will try to reuse lookahead token after shifting the error
+     token.  */
+  goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+yyerrorlab:
+
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label yyerrorlab therefore never appears in user
+     code.  */
+  if (/*CONSTCOND*/ 0)
+     goto yyerrorlab;
+
+]b4_locations_if([[  yyerror_range[0] = yylsp[1-yylen];
+]])[  /* Do not reclaim the symbols of the rule which action triggered
+     this YYERROR.  */
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+  yystate = *yyssp;
+  goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+yyerrlab1:
+  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
+
+  for (;;)
+    {
+      yyn = yypact[yystate];
+      if (yyn != YYPACT_NINF)
+	{
+	  yyn += YYTERROR;
+	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+	    {
+	      yyn = yytable[yyn];
+	      if (0 < yyn)
+		break;
+	    }
+	}
+
+      /* Pop the current state because it cannot handle the error token.  */
+      if (yyssp == yyss)
+	YYABORT;
+
+]b4_locations_if([[      yyerror_range[0] = *yylsp;]])[
+      yydestruct ("Error: popping",
+		  yystos[yystate], yyvsp]b4_locations_if([, yylsp])[]b4_user_args[);
+      YYPOPSTACK (1);
+      yystate = *yyssp;
+      YY_STACK_PRINT (yyss, yyssp);
+    }
+
+  *++yyvsp = yylval;
+]b4_locations_if([[
+  yyerror_range[1] = yylloc;
+  /* Using YYLLOC is tempting, but would change the location of
+     the lookahead.  YYLOC is available though.  */
+  YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
+  *++yylsp = yyloc;]])[
+
+  /* Shift the error token.  */
+  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+#if !defined(yyoverflow) || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here.  |
+`-------------------------------------------------*/
+yyexhaustedlab:
+  yyerror (]b4_yyerror_args[YY_("memory exhausted"));
+  yyresult = 2;
+  /* Fall through.  */
+#endif
+
+yyreturn:
+  if (yychar != YYEMPTY)
+     yydestruct ("Cleanup: discarding lookahead",
+		 yytoken, &yylval]b4_locations_if([, &yylloc])[]b4_user_args[);
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYABORT or YYACCEPT.  */
+  YYPOPSTACK (yylen);
+  YY_STACK_PRINT (yyss, yyssp);
+  while (yyssp != yyss)
+    {
+      yydestruct ("Cleanup: popping",
+		  yystos[*yyssp], yyvsp]b4_locations_if([, yylsp])[]b4_user_args[);
+      YYPOPSTACK (1);
+    }
+#ifndef yyoverflow
+  if (yyss != yyssa)
+    YYSTACK_FREE (yyss);
+#endif
+]b4_push_if([[  yyps->yynew = 1;
+
+yypushreturn:
+]])[#if YYERROR_VERBOSE
+  if (yymsg != yymsgbuf)
+    YYSTACK_FREE (yymsg);
+#endif
+  /* Make sure YYID is used.  */
+  return YYID (yyresult);
+}
+
+
+]b4_epilogue
+b4_defines_if(
+[@output(b4_spec_defines_file@)
+b4_copyright([Skeleton interface for Bison's Yacc-like parsers in C],dnl '
+  [1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])
+
+b4_percent_code_get([[requires]])[]dnl
+
+b4_token_enums_defines(b4_tokens)
+
+[#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+]m4_ifdef([b4_stype],
+[[typedef union ]b4_union_name[
+{
+]b4_user_stype[
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1]],
+[m4_if(b4_tag_seen_flag, 0,
+[[typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1]])])[
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+]b4_pure_if([], [[extern YYSTYPE ]b4_prefix[lval;]])
+
+b4_locations_if(
+[#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
+typedef struct YYLTYPE
+{
+  int first_line;
+  int first_column;
+  int last_line;
+  int last_column;
+} YYLTYPE;
+# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
+# define YYLTYPE_IS_DECLARED 1
+# define YYLTYPE_IS_TRIVIAL 1
+#endif
+
+]b4_pure_if([], [[extern YYLTYPE ]b4_prefix[lloc;]])
+)dnl b4_locations_if
+b4_push_if([[
+#ifndef YYPUSH_DECLS
+#  define YYPUSH_DECLS
+struct ]b4_prefix[pstate;
+typedef struct ]b4_prefix[pstate ]b4_prefix[pstate;
+enum { YYPUSH_MORE = 4 };
+]b4_pull_if([b4_c_function_decl([b4_prefix[parse]], [[int]], b4_parse_param)
+])b4_c_function_decl([b4_prefix[push_parse]], [[int]],
+  [[b4_prefix[pstate *yyps]], [[yyps]]]b4_pure_if([,
+  [[[int yypushed_char]], [[yypushed_char]]],
+  [[[YYSTYPE const *yypushed_val]], [[yypushed_val]]]b4_locations_if([,
+  [[[YYLTYPE const *yypushed_loc]], [[yypushed_loc]]]])])m4_ifset([b4_parse_param], [,
+  b4_parse_param]))
+b4_pull_if([b4_c_function_decl([b4_prefix[pull_parse]], [[int]],
+  [[b4_prefix[pstate *yyps]], [[yyps]]]m4_ifset([b4_parse_param], [,
+  b4_parse_param]))])
+b4_c_function_decl([b4_prefix[pstate_new]], [b4_prefix[pstate *]],
+                    [[[void]], []])
+b4_c_function_decl([b4_prefix[pstate_delete]], [[void]],
+                   [[b4_prefix[pstate *yyps]], [[yyps]]])[
+#endif
+]])
+b4_percent_code_get([[provides]])[]dnl
+])dnl b4_defines_if
+m4_divert_pop(0)
Index: EcnlProtoTool/trunk/webapp/webmrbc.sln
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc.sln	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc.sln	(revision 270)
@@ -0,0 +1,22 @@
+﻿
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.25420.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "webmrbc", "webmrbc\webmrbc.csproj", "{7E71D3E4-F61A-4423-994A-EB307D7618E0}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{7E71D3E4-F61A-4423-994A-EB307D7618E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{7E71D3E4-F61A-4423-994A-EB307D7618E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{7E71D3E4-F61A-4423-994A-EB307D7618E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{7E71D3E4-F61A-4423-994A-EB307D7618E0}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
Index: EcnlProtoTool/trunk/webapp/webmrbc/Ace.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Ace.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Ace.cs	(revision 270)
@@ -0,0 +1,91 @@
+﻿using System;
+using Bridge;
+using Bridge.jQuery2;
+
+[External]
+public class ace
+{
+	internal static AceEditor edit(string v)
+	{
+		throw new NotImplementedException();
+	}
+}
+
+[External]
+public class AceEditor : jQuery
+{
+	public AceSession session;
+
+	internal AceSession getSession()
+	{
+		return session;
+	}
+
+	internal string getValue()
+	{
+		throw new NotImplementedException();
+	}
+
+	internal void setValue(string responseText)
+	{
+		throw new NotImplementedException();
+	}
+
+	internal void moveCursorTo(int x, int y)
+	{
+		throw new NotImplementedException();
+	}
+
+	internal void setTheme(string v)
+	{
+		throw new NotImplementedException();
+	}
+
+	internal void setShowInvisibles(bool v)
+	{
+		throw new NotImplementedException();
+	}
+
+	internal void gotoLine(int v1, int v2)
+	{
+		throw new NotImplementedException();
+	}
+
+	internal void setReadOnly(bool v)
+	{
+		throw new NotImplementedException();
+	}
+}
+
+[External]
+public class AceSession
+{
+	internal void setMode(string dynamic)
+	{
+		throw new NotImplementedException();
+	}
+
+	internal void setTabSize(int v)
+	{
+		throw new NotImplementedException();
+	}
+
+	internal void setUseSoftTabs(bool v)
+	{
+		throw new NotImplementedException();
+	}
+
+	internal AceDocument getDocument()
+	{
+		throw new NotImplementedException();
+	}
+}
+
+[External]
+public class AceDocument
+{
+	internal void setValue(string v)
+	{
+		throw new NotImplementedException();
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/App.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/App.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/App.cs	(revision 270)
@@ -0,0 +1,389 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using Bridge;
+using Bridge.Html5;
+using Bridge.jQuery2;
+
+namespace WebMrbc
+{
+	delegate bool jQueryKeyboardHandler(jQueryKeyboardEvent e);
+
+	public static class App
+	{
+		public static Mruby Module;
+		public static Terminal Term;
+		public static AceEditor CodeEditor;
+		public static bool changedAfterTranslating;
+		public static bool translating;
+		public static JsonClassInfo NodeProfileClass;
+		public static JsonClassGroupInfo[] ClassGroups;
+		public static JsonPropertyInfo[] BaseObjectPropertyList;
+		public static string ArduinoToolbox;
+		public static string EcnlToolbox;
+
+		[Ready]
+		public static void Main()
+		{
+			Script.Write("Number.isFinite = Number.isFinite || function(any) { return typeof any === 'number' && isFinite(any); }");
+			Script.Write("Number.isNaN = Number.isNaN || function(any) { return typeof any === 'number' && isNaN(any); }");
+
+			Collections.ClassWorkspaces = new Collection<IClassWorkspace>();
+			Views.ClassSelectorView = new ClassSelectorView();
+			Views.ClassSelectorView.SetCollection(Collections.ClassWorkspaces);
+			Views.EObjectModalView = new EObjectModalView();
+			Views.MainMenuView = new MainMenuView();
+
+			var termElement = Document.GetElementById("term");
+			Term = new Terminal(new TerminalOption() {
+				cols = 80,
+				rows = 24,
+				useStyle = true,
+				screenKeys = true,
+				cursorBlink = false
+			});
+			Term.on("data", new Action<object>((data) => {
+				if (Module != null && Module["stdin"] != null)
+					Module.stdin(data);
+			}));
+			Term.on("title", new Action<string>((title) => {
+				Document.Title = title;
+			}));
+
+			Term.open(termElement);
+
+			CodeEditor = ace.edit("text-editor");
+			Window.Set("textEditor", CodeEditor);
+			CodeEditor.setTheme("ace/theme/twilight");
+			CodeEditor.setShowInvisibles(true);
+			CodeEditor.gotoLine(0, 0);
+			CodeEditor.On("change", new Action(() => {
+				if (!translating) {
+					changedAfterTranslating = true;
+				}
+			}));
+			var session = CodeEditor.getSession();
+			session.setMode("ace/mode/ruby");
+			session.setTabSize(2);
+			session.setUseSoftTabs(false);
+
+			var statusElement = Document.GetElementById("status");
+			var progressElement = Document.GetElementById("progress");
+			var spinnerElement = Document.GetElementById("spinner");
+
+			statusElement.InnerHTML = "Downloading...";
+
+			jQuery.Ready(() => {
+				InitClassGroups((result) => {
+					if (result) {
+						Views.EObjectModalView.InitClassGroups();
+					}
+					InitArduinoToolbox((result1) => {
+						InitEcnlToolbox((result2) => {
+							if (result1 && result2) {
+								AddMainLoop();
+								AddEcnlTask();
+								AddENode();
+							}
+							statusElement.InnerHTML = "";
+							spinnerElement.Style.Display = Display.None;
+						});
+					});
+				});
+			});
+		}
+
+		public static void InitClassGroups(Action<bool> action)
+		{
+			jQuery.Ajax(new AjaxOptions() {
+				Url = "echonet_objects.json",
+				Success = (data, textStatus, request) => {
+					ClassGroupsSuccess(data, textStatus, request);
+					action?.Invoke(true);
+				},
+				Error = (request, textStatus, error) => {
+					AjaxError(request, textStatus, error);
+					action?.Invoke(false);
+				}
+			});
+		}
+
+		private static void ClassGroupsSuccess(object data, string textStatus, jqXHR request)
+		{
+			var _deviceInfo = (dynamic)((data.GetType() == typeof(string)) ? jQuery.ParseJSON((string)data) : data);
+			var profProps = new JsonPropertyInfo[0];
+			foreach (var property in _deviceInfo.baseProfilePropertyList) {
+				profProps.Push(new JsonPropertyInfo(property));
+			}
+			var objProps = new JsonPropertyInfo[0];
+			foreach (var property in _deviceInfo.baseObjectPropertyList) {
+				objProps.Push(new JsonPropertyInfo(property));
+			}
+			BaseObjectPropertyList = objProps;
+
+			var classGroups = new JsonClassGroupInfo[0];
+			foreach (var _item in _deviceInfo.classGroupList) {
+				var item = new JsonClassGroupInfo(_item);
+				classGroups.Push(item);
+				var classes = new JsonClassInfo[0];
+				foreach (var _cls in _item.classList) {
+					var cls = new JsonClassInfo(_cls);
+					cls.classGroup = item;
+					classes.Push(cls);
+					var properties = new JsonPropertyInfo[0];
+					foreach (var property in _cls.propertyList) {
+						properties.Push(new JsonPropertyInfo(property));
+					}
+					if ((item.classGroupCode == 0xE) && (cls.classCode == 0xF0)) {
+						cls.properties = (JsonPropertyInfo[])profProps.Concat(properties);
+						NodeProfileClass = cls;
+					}
+					else {
+						cls.properties = properties;
+					}
+				}
+				item.classes = classes;
+			}
+			ClassGroups = classGroups;
+		}
+
+		public static void InitArduinoToolbox(Action<bool> action)
+		{
+			jQuery.Ajax(new AjaxOptions() {
+				Url = "arduino_toolbox.xml",
+				DataType = "text",
+				Success = (data, textStatus, request) => {
+					ArduinoToolbox = (string)data;
+					action?.Invoke(true);
+				},
+				Error = (request, textStatus, error) => {
+					AjaxError(request, textStatus, error);
+					action?.Invoke(false);
+				}
+			});
+		}
+
+		public static void InitEcnlToolbox(Action<bool> action)
+		{
+			jQuery.Ajax(new AjaxOptions() {
+				Url = "ecnl_toolbox.xml",
+				DataType = "text",
+				Success = (data, textStatus, request) => {
+					EcnlToolbox = (string)data;
+					action?.Invoke(true);
+				},
+				Error = (request, textStatus, error) => {
+					AjaxError(request, textStatus, error);
+					action?.Invoke(false);
+				}
+			});
+		}
+
+		private static void AjaxError(jqXHR request, string textStatus, string error)
+		{
+		}
+
+		/// <summary>
+		/// テキスト入力欄のEnter(Return)キーを無視する
+		/// </summary>
+		/// <param name="el"></param>
+		/// <returns></returns>
+		static jQuery ignoreEnterKey(jQuery el)
+		{
+			return el.Find("input[type=text]").KeyPress(new jQueryKeyboardHandler((e) => {
+				if (e == null)
+					e = (jQueryKeyboardEvent)Window.Get("Event");
+				if (e.KeyCode == 13)
+					return false;
+				else
+					return true;
+			}));
+		}
+
+		private static void AddMainLoop()
+		{
+			var view = Views.MainMenuView.NewBlocklyView("MainLoop");
+			var workspace = new MainLoopWorkspace(view);
+			Collections.MainLoopWorkspace = workspace;
+			Collections.ClassWorkspaces.Add(workspace);
+			Views.ClassSelectorView.SelectClassWorkspace(workspace);
+			view.ReloadToolbox(workspace);
+		}
+
+		private static void AddEcnlTask()
+		{
+			var identifier = Collections.ClassWorkspaces.UniqueName("EcnlTask");
+			var view = Views.MainMenuView.NewBlocklyView(identifier);
+			var workspace = new EcnlTaskWorkspace(view);
+			Collections.EcnlTaskWorkspace = workspace;
+			Collections.ClassWorkspaces.Add(workspace);
+			Views.ClassSelectorView.SelectClassWorkspace(workspace);
+			view.ReloadToolbox(workspace);
+		}
+
+		private static void AddENode()
+		{
+			var identifier = Collections.ClassWorkspaces.UniqueName("LocalNode");
+			var localNode = new JsonNodeInfo(NodeProfileClass, identifier, "local");
+			var properties = new JsonPropertyInfo[0];
+			foreach (var item in localNode.type.properties) {
+				if ((item.required.Length > 0) && (item.required[0] != "NONE")) {
+					properties.Push(new JsonPropertyInfo(item));
+				}
+			}
+			localNode.properties = properties;
+			var view = Views.MainMenuView.NewBlocklyView(localNode.identifier);
+			var workspace = new ENodeWorkspace(view, localNode);
+			Collections.LocalNode = workspace;
+			Collections.ClassWorkspaces.Add(workspace);
+			Views.ClassSelectorView.SelectClassWorkspace(workspace);
+			view.BlockCreated += workspace.OnBlockCreated;
+			view.BlockDeleted += workspace.OnBlockDeleted;
+			view.BlockChanged += workspace.OnBlockChanged;
+			view.BlockMoveed += workspace.OnBlockMoveed;
+			view.ReloadToolbox(workspace);
+		}
+
+		internal static void NewItem(Action<IClassWorkspace> callback)
+		{
+			var identifier = Collections.ClassWorkspaces.UniqueName("Kaden");
+			var eobject = new JsonObjectInfo(App.NodeProfileClass, identifier);
+			var properties = new JsonPropertyInfo[0];
+			if ((eobject.type.classGroup.classGroupCode != 0x0E)
+				&& (eobject.type.classCode != 0xF0)) {
+				foreach (var item in App.BaseObjectPropertyList) {
+					if ((item.required.Length > 0) && (item.required[0] != "NONE")) {
+						properties.Push(new JsonPropertyInfo(item));
+					}
+				}
+			}
+			foreach (var item in eobject.type.properties) {
+				if ((item.required.Length > 0) && (item.required[0] != "NONE")) {
+					properties.Push(new JsonPropertyInfo(item));
+				}
+			}
+			eobject.properties = properties;
+			var view = Views.MainMenuView.NewBlocklyView(eobject.identifier);
+			var workspace = new EObjectWorkspace(view, eobject);
+			view.BlockCreated += workspace.OnBlockCreated;
+			view.BlockDeleted += workspace.OnBlockDeleted;
+			view.BlockChanged += workspace.OnBlockChanged;
+			view.BlockMoveed += workspace.OnBlockMoveed;
+			callback(workspace);
+		}
+
+		internal static void RemoveItem(IClassWorkspace item)
+		{
+			Views.MainMenuView.RemoveEObjectWorkspace(item);
+		}
+
+		internal static void Write(string text)
+		{
+			Term?.write(text.Replace("\n", "\r\n"));
+		}
+
+		internal static void WriteLine(string text)
+		{
+			Term?.write(text.Replace("\n", "\r\n") + "\r\n");
+		}
+	}
+
+	public interface IClassWorkspace : IModel
+	{
+		Workspace Workspace { get; }
+		BlocklyView View { get; }
+		Ruby RubyCode { get; }
+		string GetImageUrl();
+		bool IsPreset();
+		string ToCode(string filename);
+		void Activate();
+		void Inactivate();
+		void ReloadToolbox(HTMLElement toolbox);
+		void OpenModifyView(Action<bool> callback);
+		string Template(string template);
+	}
+
+	public class Collections
+	{
+		[Name(false)]
+		internal static ENodeWorkspace LocalNode;
+		[Name(false)]
+		internal static Collection<IClassWorkspace> ClassWorkspaces;
+		[Name(false)]
+		internal static EcnlTaskWorkspace EcnlTaskWorkspace;
+		[Name(false)]
+		internal static MainLoopWorkspace MainLoopWorkspace;
+	}
+
+	public class Views
+	{
+		[Name(false)]
+		internal static MainMenuView MainMenuView;
+		[Name(false)]
+		internal static ClassSelectorView ClassSelectorView;
+		[Name(false)]
+		internal static EObjectModalView EObjectModalView;
+	}
+
+	public class HexDump
+	{
+		string text;
+
+		public HexDump(Uint8Array bytes, int width)
+		{
+			var sb = new string[0];
+
+			for (int index = 0; index < bytes.Length; index += width) {
+				sb.Push(String.Format("{0:X4} : ", index)
+					+ BinBump(bytes, index, width)
+					+ AsciiDump(bytes, index, width));
+			}
+
+			text = sb.Join("\n");
+		}
+
+		private string BinBump(Uint8Array bytes, int offset, int width)
+		{
+			var sb = new System.Text.StringBuilder();
+
+			for (int index = 0; index < width; index++) {
+				if (index + offset < bytes.Length) {
+					sb.AppendFormat("{0:X2} ", bytes[index + offset]);
+				}
+				else {
+					sb.Append("   ");
+				}
+			}
+
+			return sb.ToString();
+		}
+
+		private string AsciiDump(Uint8Array bytes, int index, int width)
+		{
+			var sb = "";
+
+			if (index < bytes.Length) {
+				width = System.Math.Min(width, bytes.Length - index);
+
+				sb += ": ";
+				for (int i = 0; i < width; i++) {
+					byte b = bytes[i + index];
+					if (b < 0x20)
+						sb += "\x1B[1;3;31m" + String.FromCharCode(b + 0x40) + "\x1B[0m";
+					else
+						sb += String.FromCharCode(b);
+				}
+			}
+			else {
+				sb += ":         ";
+			}
+
+			return sb;
+		}
+
+		public override string ToString()
+		{
+			return text;
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Arduino/GrPeach.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Arduino/GrPeach.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Arduino/GrPeach.cs	(revision 270)
@@ -0,0 +1,425 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace WebMrbc
+{
+	public static class GrPeach
+	{
+		public static FieldDropdown Pins()
+		{
+			return new FieldDropdown(new[] {
+				new [] { "LED1/RED ", "P6_13" },
+				new [] { "LED2/GREEN", "P6_14" },
+				new [] { "LED3/BLUE", "P6_15" },
+				new [] { "LED4/USER", "P6_12" },
+				new [] { "D0", "P2_15" },
+				new [] { "D1", "P2_14" },
+				new [] { "D2", "P4_7" },
+				new [] { "D3", "P4_6" },
+				new [] { "D4", "P4_5" },
+				new [] { "D5", "P4_4" },
+				new [] { "D6", "P8_13" },
+				new [] { "D7", "P8_11" },
+				new [] { "D8", "P8_15" },
+				new [] { "D9", "P8_14" },
+				new [] { "D10", "P10_13" },
+				new [] { "D11", "P10_14" },
+				new [] { "D12", "P10_15" },
+				new [] { "D13", "P10_12" },
+				new [] { "D14", "P1_3" },
+				new [] { "D15", "P1_2" },
+				new [] { "USER_BUTTON0", "P6_0" },
+			});
+		}
+		public static FieldDropdown AnalogPins()
+		{
+			return new FieldDropdown(new[] {
+				new [] { "A0", "P1_8" },
+				new [] { "A1", "P1_9" },
+				new [] { "A2", "P1_10" },
+				new [] { "A3", "P1_11" },
+				new [] { "A4", "P1_13" },
+				new [] { "A5", "P1_15" },
+			});
+		}
+
+		public static FieldDropdown PwmPins()
+		{
+			return new FieldDropdown(new[] {
+				new [] { "PWM0_PIN", "P4_4" },
+				new [] { "PWM1_PIN", "P3_2" },
+				new [] { "PWM2_PIN", "P4_6" },
+				new [] { "PWM3_PIN", "P4_7" },
+				new [] { "PWM4_PIN", "P8_14" },
+				new [] { "PWM5_PIN", "P8_15" },
+				new [] { "PWM6_PIN", "P8_13" },
+				new [] { "PWM7_PIN", "P8_11" },
+				new [] { "PWM8_PIN", "P8_8" },
+				new [] { "PWM9_PIN", "P10_0" },
+				new [] { "PWM10_PIN", "P8_12" },
+				new [] { "PWM11_PIN", "P8_9" },
+				new [] { "PWM12_PIN", "P8_10" },
+				new [] { "PWM13_PIN", "P4_5" },
+			});
+		}
+
+		public static int PinNameToNum(string name)
+		{
+			switch (name) {
+			case "P0_0": return 0;
+			case "P0_1": return 1;
+			case "P0_2": return 2;
+			case "P0_3": return 3;
+			case "P0_4": return 4;
+			case "P0_5": return 5;
+			case "_P0_6": return 6;
+			case "_P0_7": return 7;
+			case "_P0_8": return 8;
+			case "_P0_9": return 9;
+			case "_P0_10": return 10;
+			case "_P0_11": return 11;
+			case "_P0_12": return 12;
+			case "_P0_13": return 13;
+			case "_P0_14": return 14;
+			case "_P0_15": return 15;
+			case "P1_0": return 16;
+			case "P1_1": return 17;
+			case "P1_2": return 18;
+			case "P1_3": return 19;
+			case "P1_4": return 20;
+			case "P1_5": return 21;
+			case "P1_6": return 22;
+			case "P1_7": return 23;
+			case "P1_8": return 24;
+			case "P1_9": return 25;
+			case "P1_10": return 26;
+			case "P1_11": return 27;
+			case "P1_12": return 28;
+			case "P1_13": return 29;
+			case "P1_14": return 30;
+			case "P1_15": return 31;
+			case "P2_0": return 32;
+			case "P2_1": return 33;
+			case "P2_2": return 34;
+			case "P2_3": return 35;
+			case "P2_4": return 36;
+			case "P2_5": return 37;
+			case "P2_6": return 38;
+			case "P2_7": return 39;
+			case "P2_8": return 40;
+			case "P2_9": return 41;
+			case "P2_10": return 42;
+			case "P2_11": return 43;
+			case "P2_12": return 44;
+			case "P2_13": return 45;
+			case "P2_14": return 46;
+			case "P2_15": return 47;
+			case "P3_0": return 48;
+			case "P3_1": return 49;
+			case "P3_2": return 50;
+			case "P3_3": return 51;
+			case "P3_4": return 52;
+			case "P3_5": return 53;
+			case "P3_6": return 54;
+			case "P3_7": return 55;
+			case "P3_8": return 56;
+			case "P3_9": return 57;
+			case "P3_10": return 58;
+			case "P3_11": return 59;
+			case "P3_12": return 60;
+			case "P3_13": return 61;
+			case "P3_14": return 62;
+			case "P3_15": return 63;
+			case "P4_0": return 64;
+			case "P4_1": return 65;
+			case "P4_2": return 66;
+			case "P4_3": return 67;
+			case "P4_4": return 68;
+			case "P4_5": return 69;
+			case "P4_6": return 70;
+			case "P4_7": return 71;
+			case "P4_8": return 72;
+			case "P4_9": return 73;
+			case "P4_10": return 74;
+			case "P4_11": return 75;
+			case "P4_12": return 76;
+			case "P4_13": return 77;
+			case "P4_14": return 78;
+			case "P4_15": return 79;
+			case "P5_0": return 80;
+			case "P5_1": return 81;
+			case "P5_2": return 82;
+			case "P5_3": return 83;
+			case "P5_4": return 84;
+			case "P5_5": return 85;
+			case "P5_6": return 86;
+			case "P5_7": return 87;
+			case "P5_8": return 88;
+			case "P5_9": return 89;
+			case "P5_10": return 90;
+			case "P5_11": return 91;
+			case "P5_12": return 92;
+			case "P5_13": return 93;
+			case "P5_14": return 94;
+			case "P5_15": return 95;
+			case "P6_0": return 96;
+			case "P6_1": return 97;
+			case "P6_2": return 98;
+			case "P6_3": return 99;
+			case "P6_4": return 100;
+			case "P6_5": return 101;
+			case "P6_6": return 102;
+			case "P6_7": return 103;
+			case "P6_8": return 104;
+			case "P6_9": return 105;
+			case "P6_10": return 106;
+			case "P6_11": return 107;
+			case "P6_12": return 108;
+			case "P6_13": return 109;
+			case "P6_14": return 110;
+			case "P6_15": return 111;
+			case "P7_0": return 112;
+			case "P7_1": return 113;
+			case "P7_2": return 114;
+			case "P7_3": return 115;
+			case "P7_4": return 116;
+			case "P7_5": return 117;
+			case "P7_6": return 118;
+			case "P7_7": return 119;
+			case "P7_8": return 120;
+			case "P7_9": return 121;
+			case "P7_10": return 122;
+			case "P7_11": return 123;
+			case "P7_12": return 124;
+			case "P7_13": return 125;
+			case "P7_14": return 126;
+			case "P7_15": return 127;
+			case "P8_0": return 128;
+			case "P8_1": return 129;
+			case "P8_2": return 130;
+			case "P8_3": return 131;
+			case "P8_4": return 132;
+			case "P8_5": return 133;
+			case "P8_6": return 134;
+			case "P8_7": return 135;
+			case "P8_8": return 136;
+			case "P8_9": return 137;
+			case "P8_10": return 138;
+			case "P8_11": return 139;
+			case "P8_12": return 140;
+			case "P8_13": return 141;
+			case "P8_14": return 142;
+			case "P8_15": return 143;
+			case "P9_0": return 144;
+			case "P9_1": return 145;
+			case "P9_2": return 146;
+			case "P9_3": return 147;
+			case "P9_4": return 148;
+			case "P9_5": return 149;
+			case "P9_6": return 150;
+			case "P9_7": return 151;
+			case "P9_8": return 152;
+			case "P9_9": return 153;
+			case "P9_10": return 154;
+			case "P9_11": return 155;
+			case "P9_12": return 156;
+			case "P9_13": return 157;
+			case "P9_14": return 158;
+			case "P9_15": return 159;
+			case "P10_0": return 160;
+			case "P10_1": return 161;
+			case "P10_2": return 162;
+			case "P10_3": return 163;
+			case "P10_4": return 164;
+			case "P10_5": return 165;
+			case "P10_6": return 166;
+			case "P10_7": return 167;
+			case "P10_8": return 168;
+			case "P10_9": return 169;
+			case "P10_10": return 170;
+			case "P10_11": return 171;
+			case "P10_12": return 172;
+			case "P10_13": return 173;
+			case "P10_14": return 174;
+			case "P10_15": return 175;
+			case "P11_0": return 176;
+			case "P11_1": return 177;
+			case "P11_2": return 178;
+			case "P11_3": return 179;
+			case "P11_4": return 180;
+			case "P11_5": return 181;
+			case "P11_6": return 182;
+			case "P11_7": return 183;
+			case "P11_8": return 184;
+			case "P11_9": return 185;
+			case "P11_10": return 186;
+			case "P11_11": return 187;
+			case "P11_12": return 188;
+			case "P11_13": return 189;
+			case "P11_14": return 190;
+			case "P11_15": return 191;
+			default: return -1;
+			}
+		}
+
+		public static int PinModeNameToNum(string name)
+		{
+			switch (name) {
+			case "INPUT": return 0;
+			case "OUTPUT": return 1;
+			default: return -1;
+			}
+		}
+
+		public static int PinValueNameToNum(string name)
+		{
+			switch (name) {
+			case "LOW": return 0;
+			case "HIGH": return 1;
+			default: return -1;
+			}
+		}
+
+		public static int AnalogRefModeNameToNum(string name)
+		{
+			switch (name) {
+			case "DEFAULT": return 0;
+			case "INTERNAL": return 1;
+			case "EXTERNAL": return 2;
+			case "RAW12BIT": return 3;
+			default: return -1;
+			}
+		}
+
+		public static FieldDropdown I2CPorts()
+		{
+			return new FieldDropdown(new[] {
+				new[] { "SDA-D14/SCL-D15", "I2C0" },
+			});
+		}
+
+		public static string I2CPortNameToVariable(string name)
+		{
+			switch (name) {
+			case "I2C0": return "$i2c0";
+			case "I2C1": return "$i2c1";
+			case "I2C2": return "$i2c2";
+			case "I2C3": return "$i2c3";
+			default: return name;
+			}
+		}
+
+		public static int I2CPortNameToNum(string name)
+		{
+			switch (name) {
+			case "I2C0": return 0;
+			case "I2C1": return 1;
+			case "I2C2": return 2;
+			case "I2C3": return 3;
+			default: return -1;
+			}
+		}
+
+		public static FieldDropdown MemFileHandles()
+		{
+			return new FieldDropdown(new[] {
+				new[] { "MemFile0", "MEM_FILE0" },
+				new[] { "MemFile1", "MEM_FILE1" }
+			});
+		}
+
+		public static int MemFileHandlerNameToNum(string name)
+		{
+			switch (name) {
+			case "MEM_FILE0": return 0;
+			case "MEM_FILE1": return 1;
+			default: return -1;
+			}
+		}
+
+		internal static int MemOpenModeNameToNum(string name)
+		{
+			switch (name) {
+			case "EEP_READ": return 0;
+			case "EEP_APPEND": return 1;
+			case "EEP_WRITE": return 2;
+			default: return -1;
+			}
+		}
+
+		public static int MemCpModeNameToNum(string name)
+		{
+			switch (name) {
+			case "NO_OVERWRITE": return 0;
+			case "OVERWRITE": return 1;
+			default: return -1;
+			}
+		}
+
+		public static FieldDropdown SdFileHandles()
+		{
+			return new FieldDropdown(new[] {
+				new[] { "SdFile0", "SD_FILE0" },
+				new[] { "SdFile1", "SD_FILE1" }
+			});
+		}
+
+		public static int SdFileHandlerNameToNum(string name)
+		{
+			switch (name) {
+			case "SD_FILE0": return 0;
+			case "SD_FILE1": return 1;
+			default: return -1;
+			}
+		}
+
+		public static int SdOpenModeNameToNum(string name)
+		{
+			switch (name) {
+			case "READ": return 0;
+			case "APPEND": return 1;
+			case "NEW_CREATE": return 2;
+			default: return -1;
+			}
+		}
+
+		public static FieldDropdown SerialPorts()
+		{
+			return new FieldDropdown(new[] {
+				new[] { "USB", "SERIAL0" },
+				new[] { "TX-0/RX-1", "SERIAL1" },
+				new[] { "TX-5/RX-6", "SERIAL2" },
+				new[] { "TX-7/RX-8", "SERIAL3" },
+				new[] { "TX-12/RX-11", "SERIAL4" },
+				new[] { "TX-9(26)/RX-3", "SERIAL5" }
+			});
+		}
+
+		public static int SerialPortNameToNum(string name)
+		{
+			switch (name) {
+			case "SERIAL0": return 0;
+			case "SERIAL1": return 1;
+			case "SERIAL2": return 2;
+			case "SERIAL3": return 3;
+			case "SERIAL4": return 4;
+			case "SERIAL5": return 5;
+			default: return -1;
+			}
+		}
+
+		public static string SerialPortNameToVariable(string name)
+		{
+			switch (name) {
+			case "SERIAL0": return "$Serial";
+			case "SERIAL1": return "$Serial1";
+			case "SERIAL2": return "$Serial2";
+			case "SERIAL3": return "$Serial3";
+			case "SERIAL4": return "$Serial4";
+			case "SERIAL5": return "$Serial5";
+			default: return name;
+			}
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Arduino/GrSakura.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Arduino/GrSakura.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Arduino/GrSakura.cs	(revision 270)
@@ -0,0 +1,394 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace WebMrbc
+{
+	public static class GrSakura
+	{
+		public static FieldDropdown Pins()
+		{
+			return new FieldDropdown(new[] {
+				new[] { "IO0", "PIN_IO0" },
+				new[] { "IO1", "PIN_IO1" },
+				new[] { "IO2", "PIN_IO2" },
+				new[] { "IO3", "PIN_IO3" },
+				new[] { "IO4", "PIN_IO4" },
+				new[] { "IO5", "PIN_IO5" },
+				new[] { "IO6", "PIN_IO6" },
+				new[] { "IO7", "PIN_IO7" },
+
+				// IO pins, header CN7.
+				new[] { "IO8", "PIN_IO8" },
+				new[] { "IO9", "PIN_IO9" },
+				new[] { "IO10", "PIN_IO10" },
+				new[] { "IO11", "PIN_IO11" },
+				new[] { "IO12", "PIN_IO12" },
+				new[] { "IO13", "PIN_IO13" },
+
+				// IO pins, header CN7.
+				new[] { "IO14", "PIN_IO14" },
+				new[] { "IO15", "PIN_IO15" },
+				new[] { "IO16", "PIN_IO16" },
+				new[] { "IO17", "PIN_IO17" },
+				new[] { "IO18", "PIN_IO18" },
+				new[] { "IO19", "PIN_IO19" },
+				new[] { "IO20", "PIN_IO20" },
+				new[] { "IO21", "PIN_IO21" },
+
+				// IO pins, header CN9.
+				new[] { "IO22", "PIN_IO22" },
+				new[] { "IO23", "PIN_IO23" },
+				new[] { "IO24", "PIN_IO24" },
+				new[] { "IO25", "PIN_IO25" },
+				new[] { "IO26", "PIN_IO26" },
+				new[] { "IO27", "PIN_IO27" },
+				new[] { "IO28", "PIN_IO28" },
+				new[] { "IO29", "PIN_IO29" },
+
+				// IO pins, header CN10.
+				new[] { "IO30", "PIN_IO30" },
+				new[] { "IO31", "PIN_IO31" },
+				new[] { "IO32", "PIN_IO32" },
+				new[] { "IO33", "PIN_IO33" },
+				new[] { "IO34", "PIN_IO34" },
+				new[] { "IO35", "PIN_IO35" },
+
+				// IO pins, header CN12.
+				new[] { "IO36", "PIN_IO36" },
+				new[] { "IO37", "PIN_IO37" },
+				new[] { "IO38", "PIN_IO38" },
+				new[] { "IO39", "PIN_IO39" },
+				new[] { "IO40", "PIN_IO40" },
+				new[] { "IO41", "PIN_IO41" },
+				new[] { "IO42", "PIN_IO42" },
+				new[] { "IO43", "PIN_IO43" },
+
+				// IO pins, header CN11.
+				new[] { "IO44", "PIN_IO44" },
+				new[] { "IO45", "PIN_IO45" },
+				new[] { "IO46", "PIN_IO46" },
+				new[] { "IO47", "PIN_IO47" },
+				new[] { "IO48", "PIN_IO48" },
+				new[] { "IO49", "PIN_IO49" },
+				new[] { "IO50", "PIN_IO50" },
+				new[] { "IO51", "PIN_IO51" },
+
+				// IO pins, header CN13.
+				new[] { "IO52", "PIN_IO52" },
+				new[] { "IO53", "PIN_IO53" },
+				new[] { "IO54", "PIN_IO54" },
+				new[] { "IO55", "PIN_IO55" },
+
+				// IO pins, header CN6.
+				new[] { "IO56", "PIN_IO56" },
+				new[] { "IO57", "PIN_IO57" },
+				new[] { "IO58", "PIN_IO58" },
+				new[] { "IO59", "PIN_IO59" },
+				new[] { "IO60", "PIN_IO60" },
+
+				// LEDs (D1-D4) and SW.
+				new[] { "LED0", "PIN_LED0" },
+				new[] { "LED1", "PIN_LED1" },
+				new[] { "LED2", "PIN_LED2" },
+				new[] { "LED3", "PIN_LED3" },
+				new[] { "SW", "PIN_SW" },
+			});
+		}
+		public static FieldDropdown AnalogPins()
+		{
+			return new FieldDropdown(new[] {
+				// Analog pins, header CN15.
+				new[] { "AN000", "PIN_AN000" },
+				new[] { "AN001", "PIN_AN001" },
+				new[] { "AN002", "PIN_AN002" },
+				new[] { "AN003", "PIN_AN003" },
+				new[] { "AN004", "PIN_AN004" },
+				new[] { "AN005", "PIN_AN005" },
+
+				// Analog pins, header CN13.
+				new[] { "AN006", "PIN_AN006" },
+				new[] { "AN007", "PIN_AN007" },
+
+				// Analog pins, header CN12.
+				new[] { "AN008", "PIN_AN008" },
+				new[] { "AN009", "PIN_AN009" },
+				new[] { "AN010", "PIN_AN010" },
+				new[] { "AN011", "PIN_AN011" },
+				new[] { "AN012", "PIN_AN012" },
+				new[] { "AN013", "PIN_AN013" },
+
+				// Analog input, RX63N internal
+				new[] { "ANINT", "PIN_ANINT" },
+				new[] { "ANTMP", "PIN_ANTMP" },
+			});
+		}
+
+		public static FieldDropdown PwmPins()
+		{
+			return new FieldDropdown(new[] {
+				new[] { "IO0", "PIN_IO0" },
+				new[] { "IO1", "PIN_IO1" },
+				new[] { "IO2", "PIN_IO2" },
+				new[] { "IO3", "PIN_IO3" },
+				new[] { "IO4", "PIN_IO4" },
+				new[] { "IO5", "PIN_IO5" },
+				new[] { "IO6", "PIN_IO6" },
+				new[] { "IO7", "PIN_IO7" },
+				new[] { "IO9", "PIN_IO9" },
+				new[] { "IO10", "PIN_IO10" },
+			});
+		}
+
+		public static int PinNameToNum(string name)
+		{
+			switch (name) {
+			case "PIN_IO0": return 0;
+			case "PIN_IO1": return 1;
+			case "PIN_IO2": return 2;
+			case "PIN_IO3": return 3;
+			case "PIN_IO4": return 4;
+			case "PIN_IO5": return 5;
+			case "PIN_IO6": return 6;
+			case "PIN_IO7": return 7;
+			case "PIN_IO8": return 8;
+			case "PIN_IO9": return 9;
+			case "PIN_IO10": return 10;
+			case "PIN_IO11": return 11;
+			case "PIN_IO12": return 12;
+			case "PIN_IO13": return 13;
+			case "PIN_IO14": return 14;
+			case "PIN_IO15": return 15;
+			case "PIN_IO16": return 16;
+			case "PIN_IO17": return 17;
+			case "PIN_IO18": return 18;
+			case "PIN_IO19": return 19;
+			case "PIN_IO20": return 20;
+			case "PIN_IO21": return 21;
+			case "PIN_IO22": return 22;
+			case "PIN_IO23": return 23;
+			case "PIN_IO24": return 24;
+			case "PIN_IO25": return 25;
+			case "PIN_IO26": return 26;
+			case "PIN_IO27": return 27;
+			case "PIN_IO28": return 28;
+			case "PIN_IO29": return 29;
+			case "PIN_IO30": return 30;
+			case "PIN_IO31": return 31;
+			case "PIN_IO32": return 32;
+			case "PIN_IO33": return 33;
+			case "PIN_IO34": return 34;
+			case "PIN_IO35": return 35;
+			case "PIN_IO36": return 36;
+			case "PIN_IO37": return 37;
+			case "PIN_IO38": return 38;
+			case "PIN_IO39": return 39;
+			case "PIN_IO40": return 40;
+			case "PIN_IO41": return 41;
+			case "PIN_IO42": return 42;
+			case "PIN_IO43": return 43;
+			case "PIN_IO44": return 44;
+			case "PIN_IO45": return 45;
+			case "PIN_IO46": return 46;
+			case "PIN_IO47": return 47;
+			case "PIN_IO48": return 48;
+			case "PIN_IO49": return 49;
+			case "PIN_IO50": return 50;
+			case "PIN_IO51": return 51;
+			case "PIN_IO52": return 52;
+			case "PIN_IO53": return 53;
+			case "PIN_IO54": return 54;
+			case "PIN_IO55": return 55;
+			case "PIN_IO56": return 56;
+			case "PIN_IO57": return 57;
+			case "PIN_IO58": return 58;
+			case "PIN_IO59": return 59;
+			case "PIN_IO60": return 60;
+			case "PIN_LED0": return 61;
+			case "PIN_LED1": return 62;
+			case "PIN_LED2": return 63;
+			case "PIN_LED3": return 64;
+			case "PIN_SW": return 65;
+			case "PIN_AN000": return 14;
+			case "PIN_AN001": return 15;
+			case "PIN_AN002": return 16;
+			case "PIN_AN003": return 17;
+			case "PIN_AN004": return 18;
+			case "PIN_AN005": return 19;
+			case "PIN_AN006": return 20;
+			case "PIN_AN007": return 21;
+			case "PIN_AN008": return 22;
+			case "PIN_AN009": return 23;
+			case "PIN_AN010": return 24;
+			case "PIN_AN011": return 25;
+			case "PIN_AN012": return 26;
+			case "PIN_AN013": return 27;
+			case "PIN_ANINT": return 28;
+			case "PIN_ANTMP": return 29;
+			default: return -1;
+			}
+		}
+
+		public static int PinModeNameToNum(string name)
+		{
+			switch (name) {
+			case "INPUT": return 0;
+			case "OUTPUT": return 1;
+			default: return -1;
+			}
+		}
+
+		public static int PinValueNameToNum(string name)
+		{
+			switch (name) {
+			case "LOW": return 0;
+			case "HIGH": return 1;
+			default: return -1;
+			}
+		}
+
+		public static int AnalogRefModeNameToNum(string name)
+		{
+			switch (name) {
+			case "DEFAULT": return 0;
+			case "INTERNAL": return 1;
+			case "EXTERNAL": return 2;
+			case "RAW12BIT": return 3;
+			default: return -1;
+			}
+		}
+
+		public static FieldDropdown I2CPorts()
+		{
+			return new FieldDropdown(new[] {
+				new[] { "SDA-0/SCL-1", "I2C0" },
+				new[] { "SDA-5/SCL-6", "I2C1" },
+				new[] { "SDA-7/SCL-8", "I2C2" },
+				new[] { "SDA-9(26)/SCL-3", "I2C3" }
+			});
+		}
+
+		public static string I2CPortNameToVariable(string name)
+		{
+			switch (name) {
+			case "I2C0": return "$i2c0";
+			case "I2C1": return "$i2c1";
+			case "I2C2": return "$i2c2";
+			case "I2C3": return "$i2c3";
+			default: return name;
+			}
+		}
+
+		public static int I2CPortNameToNum(string name)
+		{
+			switch (name) {
+			case "I2C0": return 0;
+			case "I2C1": return 1;
+			case "I2C2": return 2;
+			case "I2C3": return 3;
+			default: return -1;
+			}
+		}
+
+		public static FieldDropdown MemFileHandles()
+		{
+			return new FieldDropdown(new[] {
+				new[] { "MemFile0", "MEM_FILE0" },
+				new[] { "MemFile1", "MEM_FILE1" }
+			});
+		}
+
+		public static int MemFileHandlerNameToNum(string name)
+		{
+			switch (name) {
+			case "MEM_FILE0": return 0;
+			case "MEM_FILE1": return 1;
+			default: return -1;
+			}
+		}
+
+		internal static int MemOpenModeNameToNum(string name)
+		{
+			switch (name) {
+			case "EEP_READ": return 0;
+			case "EEP_APPEND": return 1;
+			case "EEP_WRITE": return 2;
+			default: return -1;
+			}
+		}
+
+		public static int MemCpModeNameToNum(string name)
+		{
+			switch (name) {
+			case "NO_OVERWRITE": return 0;
+			case "OVERWRITE": return 1;
+			default: return -1;
+			}
+		}
+
+		public static FieldDropdown SdFileHandles()
+		{
+			return new FieldDropdown(new[] {
+				new[] { "SdFile0", "SD_FILE0" },
+				new[] { "SdFile1", "SD_FILE1" }
+			});
+		}
+
+		public static int SdFileHandlerNameToNum(string name)
+		{
+			switch (name) {
+			case "SD_FILE0": return 0;
+			case "SD_FILE1": return 1;
+			default: return -1;
+			}
+		}
+
+		public static int SdOpenModeNameToNum(string name)
+		{
+			switch (name) {
+			case "READ": return 0;
+			case "APPEND": return 1;
+			case "NEW_CREATE": return 2;
+			default: return -1;
+			}
+		}
+
+		public static FieldDropdown SerialPorts()
+		{
+			return new FieldDropdown(new[] {
+				new[] { "USB", "SERIAL0" },
+				new[] { "TX-0/RX-1", "SERIAL1" },
+				new[] { "TX-5/RX-6", "SERIAL2" },
+				new[] { "TX-7/RX-8", "SERIAL3" },
+				new[] { "TX-12/RX-11", "SERIAL4" },
+				new[] { "TX-9(26)/RX-3", "SERIAL5" }
+			});
+		}
+
+		public static int SerialPortNameToNum(string name)
+		{
+			switch (name) {
+			case "SERIAL0": return 0;
+			case "SERIAL1": return 1;
+			case "SERIAL2": return 2;
+			case "SERIAL3": return 3;
+			case "SERIAL4": return 4;
+			case "SERIAL5": return 5;
+			default: return -1;
+			}
+		}
+
+		public static string SerialPortNameToVariable(string name)
+		{
+			switch (name) {
+			case "SERIAL0": return "$Serial";
+			case "SERIAL1": return "$Serial1";
+			case "SERIAL2": return "$Serial2";
+			case "SERIAL3": return "$Serial3";
+			case "SERIAL4": return "$Serial4";
+			case "SERIAL5": return "$Serial5";
+			default: return name;
+			}
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Arduino/I2cBlock.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Arduino/I2cBlock.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Arduino/I2cBlock.cs	(revision 270)
@@ -0,0 +1,393 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace WebMrbc
+{
+	public class I2cNewBlock : Block
+	{
+		public const string type_name = "i2c_new";
+
+		public I2cNewBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("I2Cの初期化")
+				.appendField(GrPeach.I2CPorts(), "I2C_PORT_NO");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class I2cWriteBlock : Block
+	{
+		public const string type_name = "i2c_write";
+
+		public I2cWriteBlock()
+			: base(type_name)
+		{
+		}
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("I2Cへの書き込み")
+				.appendField(GrPeach.I2CPorts(), "I2C_PORT_NO");
+			this.appendValueInput("DEVICEID")
+				.setCheck("Number")
+				.appendField("デバイスID");
+			this.appendValueInput("ADDRESS")
+				.setCheck("Number")
+				.appendField("アドレス");
+			this.appendValueInput("DATA")
+				.setCheck("Number")
+				.appendField("データ");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class I2cReadBlock : Block
+	{
+		public const string type_name = "i2c_read";
+
+		public I2cReadBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("I2Cからの読み込み")
+				.appendField(GrPeach.I2CPorts(), "I2C_PORT_NO");
+			this.appendValueInput("DEVICEID")
+				.setCheck("Number")
+				.appendField("デバイスID");
+			this.appendValueInput("ADDRESS_L")
+				.setCheck("Number")
+				.appendField("下位アドレス");
+			this.appendValueInput("ADDRESS_H")
+				.setCheck("Number")
+				.appendField("上位アドレス");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class I2cBeginBlock : Block
+	{
+		public const string type_name = "i2c_begin";
+
+		public I2cBeginBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("I2Cの送信開始準備")
+				.appendField(GrPeach.I2CPorts(), "I2C_PORT_NO");
+			this.appendValueInput("DEVICEID")
+				.setCheck("Number")
+				.appendField("デバイスID");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class I2cLwriteBlock : Block
+	{
+		public const string type_name = "i2c_lwrite";
+
+		public I2cLwriteBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("I2Cの送信バッファの末尾に数値を追加する")
+				.appendField(GrPeach.I2CPorts(), "I2C_PORT_NO");
+			this.appendValueInput("DATA")
+				.setCheck("Number")
+				.appendField("データ");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class I2cEndBlock : Block
+	{
+		public const string type_name = "i2c_end";
+
+		public I2cEndBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("I2Cの送信シーケンスを発行する")
+				.appendField(GrPeach.I2CPorts(), "I2C_PORT_NO");
+			this.appendDummyInput()
+				.appendField("ストップコンディション発生")
+				.appendField(new FieldCheckbox("TRUE"), "STOP");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class I2cRequestBlock : Block
+	{
+		public const string type_name = "i2c_request";
+
+		public I2cRequestBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("I2Cへ受信シーケンスを発行する")
+				.appendField(GrPeach.I2CPorts(), "I2C_PORT_NO");
+			this.appendValueInput("ADDRESS")
+				.setCheck("Number")
+				.appendField("開始アドレス");
+			this.appendValueInput("COUNT")
+				.setCheck("Number")
+				.appendField("データ数");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class I2cLreadBlock : Block
+	{
+		public const string type_name = "i2c_lread";
+
+		public I2cLreadBlock()
+			: base(type_name)
+		{
+		}
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("I2Cへ受信シーケンスを発行しデータを読み出す")
+				.appendField(GrPeach.I2CPorts(), "I2C_PORT_NO");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class I2cAvailableBlock : Block
+	{
+		public const string type_name = "i2c_available";
+
+		public I2cAvailableBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("I2Cの受信バッファ内にあるデータ数を調べる")
+				.appendField(GrPeach.I2CPorts(), "I2C_PORT_NO");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class I2cFrequencyBlock : Block
+	{
+		public const string type_name = "i2c_frequency";
+
+		public I2cFrequencyBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("I2Cの周波数を変更する")
+				.appendField(GrPeach.I2CPorts(), "I2C_PORT_NO");
+			this.appendValueInput("FREQUENCY")
+				.setCheck("Number")
+				.appendField("周波数");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	partial class Ruby
+	{
+		public node i2c_new(I2cNewBlock block)
+		{
+			var dropdown_i2c_port_no = block.getFieldValue("I2C_PORT_NO");
+			// $i2c0 = I2c.new(0)
+			var a = new gvar_node(this, intern(GrPeach.I2CPortNameToVariable(dropdown_i2c_port_no)));
+			var c = new const_node(this, intern("I2c"));
+			var p = new node[] {
+				new int_node(this, GrPeach.I2CPortNameToNum(dropdown_i2c_port_no))
+			};
+			return new asgn_node(this, a, new call_node(this, c, intern("new"), p, null));
+		}
+
+		public node i2c_write(I2cWriteBlock block)
+		{
+			var dropdown_i2c_port_no = block.getFieldValue("I2C_PORT_NO");
+			var value_deviceid = valueToCode(block, "DEVICEID");
+			var value_address = valueToCode(block, "ADDRESS");
+			var value_data = valueToCode(block, "DATA");
+			// $i2c0.write(0, 0x00, 0x00)
+			var a = new gvar_node(this, intern(GrPeach.I2CPortNameToVariable(dropdown_i2c_port_no)));
+			var p = new node[] {
+				value_deviceid,
+				value_address,
+				value_data
+			};
+			return new call_node(this, a, intern("write"), p, null);
+		}
+
+		public node i2c_read(I2cReadBlock block)
+		{
+			var dropdown_i2c_port_no = block.getFieldValue("I2C_PORT_NO");
+			var value_deviceid = valueToCode(block, "DEVICEID");
+			var value_address_l = valueToCode(block, "ADDRESS_L");
+			var value_address_h = valueToCode(block, "ADDRESS_H");
+			// $i2c0.read(0, 0x00, 0x00)
+			var a = new gvar_node(this, intern(GrPeach.I2CPortNameToVariable(dropdown_i2c_port_no)));
+			var p = new node[] {
+				value_deviceid,
+				value_address_l
+			};
+			if (value_address_h != null) {
+				p.Push(value_address_h);
+			}
+			return new call_node(this, a, intern("write"), p, null);
+		}
+
+		public node i2c_begin(I2cBeginBlock block)
+		{
+			var dropdown_i2c_port_no = block.getFieldValue("I2C_PORT_NO");
+			var value_deviceid = valueToCode(block, "DEVICEID");
+			// $i2c0.begin(0)
+			var a = new gvar_node(this, intern(GrPeach.I2CPortNameToVariable(dropdown_i2c_port_no)));
+			var p = new node[] {
+				value_deviceid,
+			};
+			return new call_node(this, a, intern("begin"), p, null);
+		}
+
+		public node i2c_lwrite(I2cLwriteBlock block)
+		{
+			var dropdown_i2c_port_no = block.getFieldValue("I2C_PORT_NO");
+			var value_data = valueToCode(block, "DATA");
+			// $i2c0.lwrite(0x00)
+			var a = new gvar_node(this, intern(GrPeach.I2CPortNameToVariable(dropdown_i2c_port_no)));
+			var p = new node[0];
+			if (value_data != null)
+				p.Push(value_data);
+			return new call_node(this, a, intern("lwrite"), p, null);
+		}
+
+		public node i2c_end(I2cEndBlock block)
+		{
+			var dropdown_i2c_port_no = block.getFieldValue("I2C_PORT_NO");
+			var checkbox_stop = block.getFieldValue("STOP");
+			// $i2c0.lwrite(0x00)
+			var a = new gvar_node(this, intern(GrPeach.I2CPortNameToVariable(dropdown_i2c_port_no)));
+			var p = new node[0];
+			if (checkbox_stop != null)
+				p.Push(checkbox_stop == "TRUE" ? (node)new true_node(this) : (node)new false_node(this));
+			return new call_node(this, a, intern("end"), p, null);
+		}
+
+		public node i2c_request(I2cRequestBlock block)
+		{
+			var dropdown_i2c_port_no = block.getFieldValue("I2C_PORT_NO");
+			var value_address = valueToCode(block, "ADDRESS");
+			var value_count = valueToCode(block, "COUNT");
+			// $i2c0.request(0x00, 1)
+			var a = new gvar_node(this, intern(GrPeach.I2CPortNameToVariable(dropdown_i2c_port_no)));
+			var p = new node[] {
+				value_address,
+				value_count
+			};
+			return new call_node(this, a, intern("request"), p, null);
+		}
+
+		public node i2c_lread(I2cLreadBlock block)
+		{
+			var dropdown_i2c_port_no = block.getFieldValue("I2C_PORT_NO");
+			// $i2c0.lread()
+			var a = new gvar_node(this, intern(GrPeach.I2CPortNameToVariable(dropdown_i2c_port_no)));
+			var p = new node[0];
+			return new call_node(this, a, intern("lread"), p, null);
+		}
+
+		public node i2c_available(I2cAvailableBlock block)
+		{
+			var dropdown_i2c_port_no = block.getFieldValue("I2C_PORT_NO");
+			// $i2c0.available()
+			var a = new gvar_node(this, intern(GrPeach.I2CPortNameToVariable(dropdown_i2c_port_no)));
+			var p = new node[0];
+			return new call_node(this, a, intern("available"), p, null);
+		}
+
+		public node i2c_frequency(I2cFrequencyBlock block)
+		{
+			var dropdown_i2c_port_no = block.getFieldValue("I2C_PORT_NO");
+			var value_frequency = valueToCode(block, "FREQUENCY");
+			// $i2c0.frequency(0)
+			var a = new gvar_node(this, intern(GrPeach.I2CPortNameToVariable(dropdown_i2c_port_no)));
+			var p = new node[] {
+				value_frequency
+			};
+			return new call_node(this, a, intern("frequency"), p, null);
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Arduino/KernelBlock.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Arduino/KernelBlock.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Arduino/KernelBlock.cs	(revision 270)
@@ -0,0 +1,740 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using Bridge.Text.RegularExpressions;
+
+namespace WebMrbc
+{
+	public class CallBlock : Block
+	{
+		public const string type_name = "call";
+
+		public CallBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendValueInput("RET")
+				.setCheck(null)
+				.appendField("呼び出し");
+			this.setInputsInline(false);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class PinModeBlock : Block
+	{
+		public const string type_name = "pin_mode";
+
+		public PinModeBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("PINのモード設定")
+				.appendField(GrPeach.Pins(), "PIN_NO");
+			this.appendDummyInput()
+				.appendField("モード")
+				.appendField(new FieldDropdown(new[] {
+					new[] { "INPUTモード", "INPUT" },
+					new[] { "OUTPUTモード", "OUTPUT" }
+				}), "PIN_MODE");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class DigitalWriteBlock : Block
+	{
+		public const string type_name = "digital_write";
+
+		public DigitalWriteBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("デジタルライト")
+				.appendField(GrPeach.Pins(), "PIN_NO");
+			this.appendDummyInput()
+				.appendField("値")
+				.appendField(new FieldDropdown(new[] {
+					new[] { "LOW", "LOW" },
+					new[] { "HIGH", "HIGH" }
+				}), "PIN_VALUE");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class DigitalReadBlock : Block
+	{
+		public const string type_name = "digital_read";
+
+		public DigitalReadBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("デジタルリード")
+				.appendField(GrPeach.Pins(), "PIN_NO");
+			this.setInputsInline(true);
+			this.setOutput(true, "Boolean");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class AnalogReadBlock : Block
+	{
+		public const string type_name = "analog_read";
+
+		public AnalogReadBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("アナログリード")
+				.appendField(GrPeach.AnalogPins(), "PIN_NO");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class PwmBlock : Block
+	{
+		public const string type_name = "pwm";
+
+		public PwmBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("PWM出力")
+				.appendField(GrPeach.PwmPins(), "PIN_NO");
+			this.appendValueInput("PWM_OUT")
+				.setCheck("Number")
+				.appendField("出力PWM比率");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class PwmValueBlock : Block
+	{
+		public const string type_name = "pwm_value";
+
+		public PwmValueBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField(new FieldNumber("0", 0, 255, 1), "PWM_VALUE");
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("PWM 0～255");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class AnalogReferenceBlock : Block
+	{
+		public const string type_name = "analog_reference";
+
+		public AnalogReferenceBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("アナログ入力基準電圧")
+				.appendField(new FieldDropdown(new[] {
+					new[] { "5.0V Arduino互換", "DEFAULT" },
+					new[] { "1.1V 内蔵電圧", "INTERNAL" },
+					new[] { "AVREFピン供給電圧", "EXTERNAL" },
+					new[] { "3.3V 12ビットA/D変換を行う", "RAW12BIT" }
+				}), "ANALOG_REFERENCE_MODE");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class InitDacBlock : Block
+	{
+		public const string type_name = "init_dac";
+
+		public InitDacBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("アナログDACピン初期化");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class AnalogDacBlock : Block
+	{
+		public const string type_name = "analog_dac";
+
+		public AnalogDacBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("アナログDAC出力");
+			this.appendValueInput("VALUE")
+				.setCheck("Number");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class DacValueBlock : Block
+	{
+		public const string type_name = "dac_value";
+
+		public DacValueBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField(new FieldNumber("0", 0, 4095, 1), "DAC_VALUE");
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("DAC 0～4095");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class DelayBlock : Block
+	{
+		public const string type_name = "delay";
+
+		public DelayBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ディレイ");
+			this.appendValueInput("VALUE")
+				.setCheck("Number");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class MillisBlock : Block
+	{
+		public const string type_name = "millis";
+
+		public MillisBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("起動してからのミリ秒数");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class MicrosBlock : Block
+	{
+		public const string type_name = "micros";
+
+		public MicrosBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("起動してからのマイクロ秒数");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class LedBlock : Block
+	{
+		public const string type_name = "led";
+
+		public LedBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("LED");
+			this.appendValueInput("SW")
+				.setCheck("Number");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class BitBlock : Block
+	{
+		public const string type_name = "bit";
+
+		public BitBlock()
+			: base(type_name)
+		{
+		}
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("Bit 7")
+				.appendField(new FieldCheckbox("FALSE"), "BIT7")
+				.appendField(new FieldCheckbox("FALSE"), "BIT6")
+				.appendField(new FieldCheckbox("FALSE"), "BIT5")
+				.appendField(new FieldCheckbox("FALSE"), "BIT4")
+				.appendField(new FieldCheckbox("FALSE"), "BIT3")
+				.appendField(new FieldCheckbox("FALSE"), "BIT2")
+				.appendField(new FieldCheckbox("FALSE"), "BIT1")
+				.appendField(new FieldCheckbox("FALSE"), "BIT0")
+				.appendField("0");
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class HexadecimalBlock : Block
+	{
+		public const string type_name = "hexadecimal";
+
+		public HexadecimalBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			var input = new FieldTextInput("00000000");
+			input.setValidator(validator);
+
+			this.appendDummyInput()
+				.appendField("HEX")
+				.appendField(input, "VALUE");
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+
+		}
+
+		public string validator(string text)
+		{
+			text = text.Replace(new Regex("[^0-9a-fA-F]+", "g"), "");
+			return text;
+		}
+	}
+
+	public class ToneBlock : Block
+	{
+		public const string type_name = "tone";
+
+		public ToneBlock()
+			: base(type_name)
+		{
+		}
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("トーン出力")
+				.appendField(GrPeach.PwmPins(), "PIN_NO");
+			this.appendValueInput("FREQUENCY")
+				.setCheck("Number")
+				.appendField("周波数");
+			this.appendValueInput("DURATION")
+				.setCheck("Number")
+				.appendField("出力を維持する時間[ms]");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class ToneValueBlock : Block
+	{
+		public const string type_name = "tone_value";
+
+		public ToneValueBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField(new FieldNumber("1000", 2, 62500, 1), "TONE_VALUE");
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("Tone 2～62500");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class NoToneBlock : Block
+	{
+		public const string type_name = "no_tone";
+
+		public NoToneBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("トーン出力停止")
+				.appendField(GrPeach.PwmPins(), "PIN_NO");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class RandomSeedBlock : Block
+	{
+		public const string type_name = "random_seed";
+
+		public RandomSeedBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("乱数を得るための種を与えます");
+			this.appendValueInput("VALUE")
+				.setCheck("Number");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class RandomBlock : Block
+	{
+		public const string type_name = "random";
+
+		public RandomBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("乱数を取得");
+			this.appendValueInput("MIN")
+				.setCheck("Number")
+				.appendField("最小値");
+			this.appendValueInput("MAX")
+				.setCheck("Number")
+				.appendField("最大値");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	partial class Ruby
+	{
+		public node call(CallBlock block)
+		{
+			var value_ret = valueToCode(block, "RET");
+			return value_ret;
+		}
+
+		public node pin_mode(PinModeBlock block)
+		{
+			var dropdown_pin_no = block.getFieldValue("PIN_NO");
+			var dropdown_pin_mode = block.getFieldValue("PIN_MODE");
+			var p = new node[] {
+				new int_node(this, GrPeach.PinNameToNum(dropdown_pin_no)),
+				new int_node(this, GrPeach.PinModeNameToNum(dropdown_pin_mode))
+			};
+			return new fcall_node(this, intern("pinMode"), p, null);
+		}
+
+		public node digital_write(DigitalWriteBlock block)
+		{
+			var dropdown_pin_no = block.getFieldValue("PIN_NO");
+			var dropdown_pin_value = block.getFieldValue("PIN_VALUE");
+			var p = new node[] {
+				new int_node(this, GrPeach.PinNameToNum(dropdown_pin_no)),
+				new int_node(this, GrPeach.PinValueNameToNum(dropdown_pin_value ))
+			};
+			return new fcall_node(this, intern("digitalWrite"), p, null);
+		}
+
+		public node digital_read(DigitalReadBlock block)
+		{
+			var dropdown_pin_no = block.getFieldValue("PIN_NO");
+			var p = new node[] {
+				new int_node(this, GrPeach.PinNameToNum(dropdown_pin_no)),
+			};
+			return new fcall_node(this, intern("digitalRead"), p, null);
+		}
+
+		public node analog_read(AnalogReadBlock block)
+		{
+			var dropdown_pin_no = block.getFieldValue("PIN_NO");
+			var p = new node[] {
+				new int_node(this, GrPeach.PinNameToNum(dropdown_pin_no)),
+			};
+			return new fcall_node(this, intern("analogRead"), p, null);
+		}
+
+		public node pwm(PwmBlock block)
+		{
+			var dropdown_pin_no = block.getFieldValue("PIN_NO");
+			var value_pwm_out = valueToCode(block, "PWM_OUT");
+			var p = new node[] {
+				new int_node(this, GrPeach.PinNameToNum(dropdown_pin_no)),
+				value_pwm_out
+			};
+			return new fcall_node(this, intern("pwm"), p, null);
+		}
+
+		public node pwm_value(PwmValueBlock block)
+		{
+			var number_pwm_value = block.getFieldValue("PWM_VALUE");
+			return new int_node(this, number_pwm_value == null ? 0 : Bridge.Script.ParseInt(number_pwm_value, 10));
+		}
+
+		public node analog_reference(AnalogReferenceBlock block)
+		{
+			var dropdown_analog_reference_mode = block.getFieldValue("ANALOG_REFERENCE_MODE");
+			var p = new node[] {
+				new int_node(this, GrPeach.AnalogRefModeNameToNum(dropdown_analog_reference_mode))
+			};
+			return new fcall_node(this, intern("analogReference"), p, null);
+		}
+
+		public node init_dac(InitDacBlock block)
+		{
+			var p = new node[0];
+			return new fcall_node(this, intern("initDac"), p, null);
+		}
+
+		public node analog_dac(AnalogDacBlock block)
+		{
+			var value_value = valueToCode(block, "VALUE");
+			var p = new node[] {
+				value_value
+			};
+			return new fcall_node(this, intern("analogDac"), p, null);
+		}
+
+		public node dac_value(DacValueBlock block)
+		{
+			var number_dac_value = block.getFieldValue("ADC_VALUE");
+			return new int_node(this, number_dac_value == null ? 0 : Bridge.Script.ParseInt(number_dac_value, 10));
+		}
+
+		public node delay(DelayBlock block)
+		{
+			var value_value = valueToCode(block, "VALUE");
+			var p = new node[] {
+				value_value
+			};
+			return new fcall_node(this, intern("delay"), p, null);
+		}
+
+		public node millis(MillisBlock block)
+		{
+			var p = new node[0];
+			return new fcall_node(this, intern("millis"), p, null);
+		}
+
+		public node micros(MicrosBlock block)
+		{
+			var p = new node[0];
+			return new fcall_node(this, intern("micros"), p, null);
+		}
+
+		public node led(LedBlock block)
+		{
+			var value_sw = valueToCode(block, "SW");
+			var p = new node[] {
+				value_sw
+			};
+			return new fcall_node(this, intern("led"), p, null);
+		}
+
+		public node bit(BitBlock block)
+		{
+			var value = 0;
+			value += (block.getFieldValue("BIT7") == "TRUE") ? 0x80 : 0;
+			value += (block.getFieldValue("BIT6") == "TRUE") ? 0x40 : 0;
+			value += (block.getFieldValue("BIT5") == "TRUE") ? 0x20 : 0;
+			value += (block.getFieldValue("BIT4") == "TRUE") ? 0x10 : 0;
+			value += (block.getFieldValue("BIT3") == "TRUE") ? 0x08 : 0;
+			value += (block.getFieldValue("BIT2") == "TRUE") ? 0x04 : 0;
+			value += (block.getFieldValue("BIT1") == "TRUE") ? 0x02 : 0;
+			value += (block.getFieldValue("BIT0") == "TRUE") ? 0x01 : 0;
+			return new int_node(this, value);
+		}
+
+		public node hexadecimal(HexadecimalBlock block)
+		{
+			var value = block.getFieldValue("VALUE");
+			return new int_node(this, value == null ? 0 : Bridge.Script.ParseInt(value, 16));
+		}
+
+		public node tone(ToneBlock block)
+		{
+			var dropdown_pin_no = block.getFieldValue("PIN_NO");
+			var value_frequency = valueToCode(block, "FREQUENCY");
+			var value_duration = valueToCode(block, "DURATION");
+			var p = new node[] {
+				new int_node(this, GrPeach.PinNameToNum(dropdown_pin_no)),
+				value_frequency,
+				value_duration
+			};
+			return new fcall_node(this, intern("tone"), p, null);
+		}
+
+		public node tone_value(ToneValueBlock block)
+		{
+			var number_tone_value = block.getFieldValue("TONE_VALUE");
+			return new int_node(this, number_tone_value == null ? 0 : Bridge.Script.ParseInt(number_tone_value, 10));
+		}
+
+		public node no_tone(NoToneBlock block)
+		{
+			var dropdown_pin_no = block.getFieldValue("PIN_NO");
+			var p = new node[] {
+				new int_node(this, GrPeach.PinNameToNum(dropdown_pin_no)),
+			};
+			return new fcall_node(this, intern("noTone"), p, null);
+		}
+
+		public node random_seed(RandomSeedBlock block)
+		{
+			var value_name = valueToCode(block, "VALUE");
+			var p = new node[] {
+				value_name,
+			};
+			return new fcall_node(this, intern("randomSeed"), p, null);
+		}
+
+		public node random(RandomBlock block)
+		{
+			var value_min = valueToCode(block, "MIN");
+			var value_max = valueToCode(block, "MAX");
+			var p = new node[0];
+			if (value_min == null)
+				p.Push(value_max);
+			else {
+				p.Push(value_min);
+				p.Push(value_max);
+			}
+			return new fcall_node(this, intern("random"), p, null);
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Arduino/MemFileBlock.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Arduino/MemFileBlock.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Arduino/MemFileBlock.cs	(revision 270)
@@ -0,0 +1,277 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace WebMrbc
+{
+	public class MemFileOpenBlock : Block
+	{
+		public const string type_name = "memfile_open";
+
+		public MemFileOpenBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルをオープンします")
+				.appendField(GrPeach.MemFileHandles(), "MEM_FILE_NO");
+			this.appendValueInput("FILENAME")
+				.setCheck("String")
+				.appendField("ファイル名(8.3形式)");
+			this.appendDummyInput()
+				.appendField("モード")
+				.appendField(new FieldDropdown(new[] {
+					new[] { "Read", "EEP_READ" },
+					new[] { "Append", "EEP_APPEND" },
+					new[] { "New Create", "EEP_WRITE" }
+				}), "EEP_OPEN_MODE");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class MemFileCloseBlock : Block
+	{
+		public const string type_name = "memfile_close";
+
+		public MemFileCloseBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルをクローズします")
+				.appendField(GrPeach.MemFileHandles(), "MEM_FILE_NO");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class MemFileReadBlock : Block
+	{
+		public const string type_name = "memfile_read";
+
+		public MemFileReadBlock()
+			: base(type_name)
+		{
+		}
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルから1バイト読み込みます")
+				.appendField(GrPeach.MemFileHandles(), "MEM_FILE_NO");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class MemFileWriteBlock : Block
+	{
+		public const string type_name = "memfile_write";
+
+		public MemFileWriteBlock()
+			: base(type_name)
+		{
+		}
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルにバイナリデータを書き込みます")
+				.appendField(GrPeach.MemFileHandles(), "MEM_FILE_NO");
+			this.appendValueInput("DATA")
+				.setCheck("String")
+				.appendField("データ");
+			this.appendValueInput("LENGTH")
+				.setCheck("Number")
+				.appendField("データサイズ");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class MemFileSeekBlock : Block
+	{
+		public const string type_name = "memfile_seek";
+
+		public MemFileSeekBlock()
+			: base(type_name)
+		{
+		}
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルの読み出し位置を移動する")
+				.appendField(GrPeach.MemFileHandles(), "MEM_FILE_NO");
+			this.appendValueInput("POSITION")
+				.setCheck("Number")
+				.appendField("seekするバイト数");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class MemFileCpBlock : Block
+	{
+		public const string type_name = "memfile_cp";
+
+		public MemFileCpBlock()
+			: base(type_name)
+		{
+		}
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルをコピーします");
+			this.appendValueInput("SRC_FILENAME")
+				.setCheck("String")
+				.appendField("コピー元ファイル名");
+			this.appendValueInput("DST_FILENAME")
+				.setCheck("String")
+				.appendField("コピー先ファイル名");
+			this.appendDummyInput()
+				.appendField("モード")
+				.appendField(new FieldDropdown(new[] {
+					new[] { "上書きしない", "NO_OVERWRITE" },
+					new[] { "上書きする", "OVERWRITE" }
+				}), "EEP_CP_MODE");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class MemFileRmBlock : Block
+	{
+		public const string type_name = "memfile_rm";
+
+		public MemFileRmBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルを削除します");
+			this.appendValueInput("FILENAME")
+				.setCheck("String")
+				.appendField("削除するファイル名");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	partial class Ruby
+	{
+		public node memfile_open(MemFileOpenBlock block)
+		{
+			var dropdown_mem_file_no = block.getFieldValue("MEM_FILE_NO");
+			var value_filename = valueToCode(block, "FILENAME");
+			var dropdown_eep_open_mode = block.getFieldValue("EEP_OPEN_MODE");
+			var c = new const_node(this, intern("MemFile"));
+			var p = new node[] {
+				new int_node(this, GrPeach.MemFileHandlerNameToNum(dropdown_mem_file_no)),
+				value_filename,
+				new int_node(this, GrPeach.MemOpenModeNameToNum(dropdown_eep_open_mode))
+			};
+			return new call_node(this, c, intern("open"), p, null);
+		}
+
+		public node memfile_close(MemFileCloseBlock block)
+		{
+			var dropdown_mem_file_no = block.getFieldValue("MEM_FILE_NO");
+			var c = new const_node(this, intern("MemFile"));
+			var p = new node[] {
+				new int_node(this, GrPeach.MemFileHandlerNameToNum(dropdown_mem_file_no)),
+			};
+			return new call_node(this, c, intern("close"), p, null);
+		}
+
+		public node memfile_read(MemFileReadBlock block)
+		{
+			var dropdown_mem_file_no = block.getFieldValue("MEM_FILE_NO");
+			var c = new const_node(this, intern("MemFile"));
+			var p = new node[] {
+				new int_node(this, GrPeach.MemFileHandlerNameToNum(dropdown_mem_file_no)),
+			};
+			return new call_node(this, c, intern("read"), p, null);
+		}
+
+		public node memfile_write(MemFileWriteBlock block)
+		{
+			var dropdown_mem_file_no = block.getFieldValue("MEM_FILE_NO");
+			var value_data = valueToCode(block, "DATA");
+			var value_length = valueToCode(block, "LENGTH");
+			var c = new const_node(this, intern("MemFile"));
+			var p = new node[] {
+				new int_node(this, GrPeach.MemFileHandlerNameToNum(dropdown_mem_file_no)),
+				value_data,
+				value_length,
+			};
+			return new call_node(this, c, intern("write"), p, null);
+		}
+
+		public node memfile_seek(MemFileSeekBlock block)
+		{
+			var dropdown_mem_file_no = block.getFieldValue("MEM_FILE_NO");
+			var value_position = valueToCode(block, "POSITION");
+			var c = new const_node(this, intern("MemFile"));
+			var p = new node[] {
+				new int_node(this, GrPeach.MemFileHandlerNameToNum(dropdown_mem_file_no)),
+				value_position,
+			};
+			return new call_node(this, c, intern("seek"), p, null);
+		}
+
+		public node memfile_cp(MemFileCpBlock block)
+		{
+			var value_src_filename = valueToCode(block, "SRC_FILENAME");
+			var value_dst_filename = valueToCode(block, "DST_FILENAME");
+			var dropdown_eep_cp_mode = block.getFieldValue("EEP_CP_MODE");
+			var c = new const_node(this, intern("MemFile"));
+			var p = new node[] {
+				value_dst_filename,
+				value_dst_filename,
+				new int_node(this, GrPeach.MemCpModeNameToNum(dropdown_eep_cp_mode))
+			};
+			return new call_node(this, c, intern("cp"), p, null);
+		}
+
+		public node memfile_rm(MemFileRmBlock block)
+		{
+			var value_filename = valueToCode(block, "FILENAME");
+			var c = new const_node(this, intern("MemFile"));
+			var p = new node[] {
+				value_filename,
+			};
+			return new call_node(this, c, intern("rm"), p, null);
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Arduino/RtcBlock.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Arduino/RtcBlock.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Arduino/RtcBlock.cs	(revision 270)
@@ -0,0 +1,457 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace WebMrbc
+{
+	public class RtcYearBlock : Block
+	{
+		public const string type_name = "rtc_year";
+
+		public RtcYearBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField(new FieldNumber("2017", 2000, 2099, 1), "VALUE");
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("年(2000-2099)");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class RtcMonthBlock : Block
+	{
+		public const string type_name = "rtc_month";
+
+		public RtcMonthBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField(new FieldNumber("1", 1, 12, 1), "VALUE");
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("月(1-12)");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class RtcDayBlock : Block
+	{
+		public const string type_name = "rtc_day";
+
+		public RtcDayBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField(new FieldNumber("1", 1, 31, 1), "VALUE");
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("日(1-31)");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class RtcHourBlock : Block
+	{
+		public const string type_name = "rtc_hour";
+
+		public RtcHourBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField(new FieldNumber("0", 0, 23, 1), "VALUE");
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("時(0-23)");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class RtcMinuteBlock : Block
+	{
+		public const string type_name = "rtc_minute";
+
+		public RtcMinuteBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField(new FieldNumber("0", 0, 59, 1), "VALUE");
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("分(0-59)");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class RtcSecondBlock : Block
+	{
+		public const string type_name = "rtc_second";
+
+		public RtcSecondBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField(new FieldNumber("0", 0, 59, 1), "VALUE");
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("秒(0-59)");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class RtcWeekDayBlock : Block
+	{
+		public const string type_name = "rtc_weekday";
+
+		public RtcWeekDayBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField(new FieldDropdown(new[] {
+					new[] { "日曜", "0" },
+					new[] { "月曜", "1" },
+					new[] { "火曜", "2" },
+					new[] { "水曜", "3" },
+					new[] { "木曜", "4" },
+					new[] { "金曜", "5" },
+					new[] { "土曜", "6" }
+				}), "VALUE");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class RtcDateTimeBlock : Block
+	{
+		public const string type_name = "rtc_datetime";
+
+		public RtcDateTimeBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendValueInput("YEAR")
+				.setCheck("Number")
+				.appendField("年");
+			this.appendValueInput("MONTH")
+				.setCheck("Number")
+				.appendField("月");
+			this.appendValueInput("DAY")
+				.setCheck("Number")
+				.appendField("日");
+			this.appendValueInput("HOUR")
+				.setCheck("Number")
+				.appendField("時");
+			this.appendValueInput("MINUTE")
+				.setCheck("Number")
+				.appendField("分");
+			this.appendValueInput("SECOND")
+				.setCheck("Number")
+				.appendField("秒");
+			this.setInputsInline(true);
+			this.setOutput(true, "Array");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class RtcDateTimeItemBlock : Block
+	{
+		public const string type_name = "rtc_get_datetime_item";
+
+		public RtcDateTimeItemBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField(new FieldVariable("item"), "ARRAY")
+				.appendField(new FieldDropdown(new[] {
+					new[] {"年", "0" },
+					new[] {"月", "1" },
+					new[] {"日", "2" },
+					new[] {"時", "3" },
+					new[] {"分", "4" },
+					new[] {"秒", "5" },
+					new[] {"週", "6" }
+				}), "ITEM");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class RtcSetDateTimeItemBlock : Block
+	{
+		public const string type_name = "rtc_set_datetime_item";
+
+		public RtcSetDateTimeItemBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField(new FieldVariable("item"), "ARRAY")
+				.appendField("の")
+				.appendField(new FieldDropdown(new[] {
+					new[] {"年", "0" },
+					new[] {"月", "1" },
+					new[] {"日", "2" },
+					new[] {"時", "3" },
+					new[] {"分", "4" },
+					new[] {"秒", "5" },
+					new[] {"週", "6" }
+				}), "ITEM")
+				.appendField("に");
+			this.appendValueInput("VALUE")
+				.setCheck("Number");
+			this.appendDummyInput()
+				.appendField("を設定");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class RtcGetTimeBlock : Block
+	{
+		public const string type_name = "rtc_gettime";
+
+		public RtcGetTimeBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("RTCの時計を取得します");
+			this.setInputsInline(true);
+			this.setOutput(true, "Array");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class RtcSettimeBlock : Block
+	{
+		public const string type_name = "rtc_settime";
+
+		public RtcSettimeBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("RTCの時計をセットします");
+			this.appendValueInput("DATE")
+				.setCheck("Array");
+			this.setInputsInline(true);
+			this.setOutput(true, "Boolean");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class RtcDeinitBlock : Block
+	{
+		public const string type_name = "rtc_deinit";
+
+		public RtcDeinitBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("RTCを停止します");
+			this.setInputsInline(true);
+			this.setOutput(true, "Boolean");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class RtcInitBlock : Block
+	{
+		public const string type_name = "rtc_init";
+
+		public RtcInitBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("RTCを起動します");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	partial class Ruby
+	{
+		public node rtc_year(RtcYearBlock block)
+		{
+			var value = block.getFieldValue("VALUE");
+			return new int_node(this, value == null ? 0 : Bridge.Script.ParseInt(value, 10));
+		}
+
+		public node rtc_month(RtcMonthBlock block)
+		{
+			var value = block.getFieldValue("VALUE");
+			return new int_node(this, value == null ? 0 : Bridge.Script.ParseInt(value, 10));
+		}
+
+		public node rtc_day(RtcDayBlock block)
+		{
+			var value = block.getFieldValue("VALUE");
+			return new int_node(this, value == null ? 0 : Bridge.Script.ParseInt(value, 10));
+		}
+
+		public node rtc_hour(RtcHourBlock block)
+		{
+			var value = block.getFieldValue("VALUE");
+			return new int_node(this, value == null ? 0 : Bridge.Script.ParseInt(value, 10));
+		}
+
+		public node rtc_minute(RtcMinuteBlock block)
+		{
+			var value = block.getFieldValue("VALUE");
+			return new int_node(this, value == null ? 0 : Bridge.Script.ParseInt(value, 10));
+		}
+
+		public node rtc_second(RtcSecondBlock block)
+		{
+			var value = block.getFieldValue("VALUE");
+			return new int_node(this, value == null ? 0 : Bridge.Script.ParseInt(value, 10));
+		}
+
+		public node rtc_weekday(RtcWeekDayBlock block)
+		{
+			var value = block.getFieldValue("VALUE");
+			return new int_node(this, value == null ? 0 : Bridge.Script.ParseInt(value, 10));
+		}
+
+		public node rtc_datetime(RtcDateTimeBlock block)
+		{
+			var array = new node[] {
+				valueToCode(block, "YEAR"),
+				valueToCode(block, "MONTH"),
+				valueToCode(block, "DAY"),
+				valueToCode(block, "HOUR"),
+				valueToCode(block, "MINUTE"),
+				valueToCode(block, "SECOND"),
+			};
+			return new array_node(this, array);
+		}
+
+		public node rtc_get_datetime_item(RtcDateTimeItemBlock block)
+		{
+			var value_array = block.getFieldValue("ARRAY");
+			var value_item = block.getFieldValue("ITEM");
+			var a = new_var_node(get_var_name(value_array));
+			var p = new node[] {
+				new int_node(this, value_item == null ? 0 : Bridge.Script.ParseInt(value_item, 10))
+			};
+			return new call_node(this, a, intern("[]"), p, null);
+		}
+
+		public node rtc_set_datetime_item(RtcSetDateTimeItemBlock block)
+		{
+			var value_array = block.getFieldValue("ARRAY");
+			var value_item = block.getFieldValue("ITEM");
+			var a = new_var_node(get_var_name(value_array));
+			var p = new node[] {
+				new int_node(this, value_item == null ? 0 : Bridge.Script.ParseInt(value_item, 10))
+			};
+			var b = valueToCode(block, "VALUE");
+			return new asgn_node(this, new call_node(this, a, intern("[]"), p, null), b);
+		}
+
+		public node rtc_gettime(RtcGetTimeBlock block)
+		{
+			var c = new const_node(this, intern("Rtc"));
+			var p = new node[0];
+			return new call_node(this, c, intern("getTime"), p, null);
+		}
+
+		public node rtc_settime(RtcSettimeBlock block)
+		{
+			var value_date = valueToCode(block, "DATE");
+			var c = new const_node(this, intern("Rtc"));
+			var p = new node[] {
+				value_date
+			};
+			return new call_node(this, c, intern("setTime"), p, null);
+		}
+
+		public node rtc_deinit(RtcDeinitBlock block)
+		{
+			var c = new const_node(this, intern("Rtc"));
+			var p = new node[0];
+			return new call_node(this, c, intern("deinit"), p, null);
+		}
+
+		public node rtc_init(RtcInitBlock block)
+		{
+			var c = new const_node(this, intern("Rtc"));
+			var p = new node[0];
+			return new call_node(this, c, intern("init"), p, null);
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Arduino/SdBlock.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Arduino/SdBlock.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Arduino/SdBlock.cs	(revision 270)
@@ -0,0 +1,462 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace WebMrbc
+{
+	public class SdExistsBlock : Block
+	{
+		public const string type_name = "sd_exists";
+
+		public SdExistsBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルが存在するかどうか調べる");
+			this.appendValueInput("FILENAME")
+				.setCheck("String");
+			this.setInputsInline(true);
+			this.setOutput(true, "Boolean");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SdMkdirBlock : Block
+	{
+		public const string type_name = "sd_mkdir";
+
+		public SdMkdirBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ディレクトリを作成する");
+			this.appendValueInput("DIRNAME")
+				.setCheck("String");
+			this.setInputsInline(true);
+			this.setOutput(true, "Boolean");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SdRemoveBlock : Block
+	{
+		public const string type_name = "sd_remove";
+
+		public SdRemoveBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルを削除する");
+			this.appendValueInput("FILENAME")
+				.setCheck("String");
+			this.setInputsInline(true);
+			this.setOutput(true, "Boolean");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SdCopyBlock : Block
+	{
+		public const string type_name = "sd_copy";
+
+		public SdCopyBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルをコピーする");
+			this.appendValueInput("SRC_FILENAME")
+				.setCheck("String")
+				.appendField("コピー元ファイル名");
+			this.appendValueInput("DST_FILENAME")
+				.setCheck("String")
+				.appendField("コピー先ファイル名");
+			this.setInputsInline(true);
+			this.setOutput(true, "Boolean");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SdRmdirBlock : Block
+	{
+		public const string type_name = "sd_rmdir";
+
+		public SdRmdirBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ディレクトリを削除する");
+			this.appendValueInput("DIRNAME")
+				.setCheck("String");
+			this.setInputsInline(true);
+			this.setOutput(true, "Boolean");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SdOpenBlock : Block
+	{
+		public const string type_name = "sd_open";
+
+		public SdOpenBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルをオープンします")
+				.appendField(GrPeach.SdFileHandles(), "SD_FILE_NO");
+			this.appendValueInput("FILENAME")
+				.setCheck("String")
+				.appendField("ファイル名");
+			this.appendDummyInput()
+				.appendField("モード")
+				.appendField(new FieldDropdown(new[] {
+					new[] { "Read", "READ" },
+					new[] { "Append", "APPEND" },
+					new[] { "New Create", "NEW_CREATE" }
+				}), "SD_OPEN_MODE");
+			this.setInputsInline(true);
+			this.setOutput(true, "Boolean");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SdCloseBlock : Block
+	{
+		public const string type_name = "sd_close";
+
+		public SdCloseBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルをクローズします")
+				.appendField(GrPeach.SdFileHandles(), "SD_FILE_NO");
+			this.setInputsInline(true);
+			this.setOutput(true, "Boolean");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SdReadBlock : Block
+	{
+		public const string type_name = "sd_read";
+
+		public SdReadBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルから1バイト読み込みます")
+				.appendField(GrPeach.SdFileHandles(), "SD_FILE_NO");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SdSeekBlock : Block
+	{
+		public const string type_name = "sd_seek";
+
+		public SdSeekBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルの読み出し位置を移動する")
+				.appendField(GrPeach.SdFileHandles(), "SD_FILE_NO");
+			this.appendValueInput("POSITION")
+				.setCheck("Number")
+				.appendField("バイト数");
+			this.setInputsInline(true);
+			this.setOutput(true, "Boolean");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SdWriteBlock : Block
+	{
+		public const string type_name = "sd_write";
+
+		public SdWriteBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルにバイナリデータを書き込む")
+				.appendField(GrPeach.SdFileHandles(), "SD_FILE_NO");
+			this.appendValueInput("DATA")
+				.setCheck("String")
+				.appendField("データ");
+			this.appendValueInput("LENGTH")
+				.setCheck("Number")
+				.appendField("データサイズ");
+			this.setInputsInline(true);
+			this.setOutput(true, "Boolean");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SdFlushBlock : Block
+	{
+		public const string type_name = "sd_flush";
+
+		public SdFlushBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルの書き込みをフラッシュします")
+				.appendField(GrPeach.SdFileHandles(), "SD_FILE_NO");
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SdSizeBlock : Block
+	{
+		public const string type_name = "sd_size";
+
+		public SdSizeBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルのサイズを取得します")
+				.appendField(GrPeach.SdFileHandles(), "SD_FILE_NO");
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SdPositionBlock : Block
+	{
+		public const string type_name = "sd_position";
+
+		public SdPositionBlock()
+			: base(type_name)
+		{
+		}
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルのseek位置を取得します")
+				.appendField(GrPeach.SdFileHandles(), "SD_FILE_NO");
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	partial class Ruby
+	{
+		public node sd_exists(SdExistsBlock block)
+		{
+			var value_filename = valueToCode(block, "FILENAME");
+			var c = new const_node(this, intern("SD"));
+			var p = new node[] {
+				value_filename,
+			};
+			return new call_node(this, c, intern("exists"), p, null);
+		}
+
+		public node sd_mkdir(SdMkdirBlock block)
+		{
+			var value_filename = valueToCode(block, "DIRNAME");
+			var c = new const_node(this, intern("SD"));
+			var p = new node[] {
+				value_filename,
+			};
+			return new call_node(this, c, intern("mkdir"), p, null);
+		}
+
+		public node sd_remove(SdRemoveBlock block)
+		{
+			var value_filename = valueToCode(block, "FILENAME");
+			var c = new const_node(this, intern("SD"));
+			var p = new node[] {
+				value_filename,
+			};
+			return new call_node(this, c, intern("remove"), p, null);
+		}
+
+		public node sd_copy(SdCopyBlock block)
+		{
+			var value_src_filename = valueToCode(block, "SRC_FILENAME");
+			var value_dst_filename = valueToCode(block, "DST_FILENAME");
+			var c = new const_node(this, intern("SD"));
+			var p = new node[] {
+				value_src_filename,
+				value_dst_filename,
+			};
+			return new call_node(this, c, intern("copy"), p, null);
+		}
+
+		public node sd_rmdir(SdRmdirBlock block)
+		{
+			var value_filename = valueToCode(block, "DIRNAME");
+			var c = new const_node(this, intern("SD"));
+			var p = new node[] {
+				value_filename,
+			};
+			return new call_node(this, c, intern("rmdir"), p, null);
+		}
+
+		public node sd_open(SdOpenBlock block)
+		{
+			var dropdown_sd_file_no = block.getFieldValue("SD_FILE_NO");
+			var value_filename = valueToCode(block, "FILENAME");
+			var dropdown_sd_open_mode = block.getFieldValue("SD_OPEN_MODE");
+			var c = new const_node(this, intern("SD"));
+			var p = new node[] {
+				new int_node(this, GrPeach.SdFileHandlerNameToNum(dropdown_sd_file_no)),
+				value_filename,
+				new int_node(this, GrPeach.SdOpenModeNameToNum(dropdown_sd_open_mode)),
+			};
+			return new call_node(this, c, intern("open"), p, null);
+		}
+
+		public node sd_close(SdCloseBlock block)
+		{
+			var dropdown_sd_file_no = block.getFieldValue("SD_FILE_NO");
+			var c = new const_node(this, intern("SD"));
+			var p = new node[] {
+				new int_node(this, GrPeach.SdFileHandlerNameToNum(dropdown_sd_file_no)),
+			};
+			return new call_node(this, c, intern("close"), p, null);
+		}
+
+		public node sd_read(SdReadBlock block)
+		{
+			var dropdown_sd_file_no = block.getFieldValue("SD_FILE_NO");
+			var c = new const_node(this, intern("SD"));
+			var p = new node[] {
+				new int_node(this, GrPeach.SdFileHandlerNameToNum(dropdown_sd_file_no)),
+			};
+			return new call_node(this, c, intern("read"), p, null);
+		}
+
+		public node sd_seek(SdSeekBlock block)
+		{
+			var dropdown_sd_file_no = block.getFieldValue("SD_FILE_NO");
+			var value_position = valueToCode(block, "POSITION");
+			var c = new const_node(this, intern("SD"));
+			var p = new node[] {
+				new int_node(this, GrPeach.SdFileHandlerNameToNum(dropdown_sd_file_no)),
+				value_position,
+			};
+			return new call_node(this, c, intern("seek"), p, null);
+		}
+
+		public node sd_write(SdWriteBlock block)
+		{
+			var dropdown_sd_file_no = block.getFieldValue("SD_FILE_NO");
+			var value_data = valueToCode(block, "DATA");
+			var value_length = valueToCode(block, "LENGTH");
+			var c = new const_node(this, intern("SD"));
+			var p = new node[] {
+				new int_node(this, GrPeach.SdFileHandlerNameToNum(dropdown_sd_file_no)),
+				value_data,
+				value_length,
+			};
+			return new call_node(this, c, intern("write"), p, null);
+		}
+
+		public node sd_flush(SdFlushBlock block)
+		{
+			var dropdown_sd_file_no = block.getFieldValue("SD_FILE_NO");
+			var c = new const_node(this, intern("SD"));
+			var p = new node[] {
+				new int_node(this, GrPeach.SdFileHandlerNameToNum(dropdown_sd_file_no)),
+			};
+			return new call_node(this, c, intern("flush"), p, null);
+		}
+
+		public node sd_size(SdSizeBlock block)
+		{
+			var dropdown_sd_file_no = block.getFieldValue("SD_FILE_NO");
+			var c = new const_node(this, intern("SD"));
+			var p = new node[] {
+				new int_node(this, GrPeach.SdFileHandlerNameToNum(dropdown_sd_file_no)),
+			};
+			return new call_node(this, c, intern("size"), p, null);
+		}
+
+		public node sd_position(SdPositionBlock block)
+		{
+			var dropdown_sd_file_no = block.getFieldValue("SD_FILE_NO");
+			var c = new const_node(this, intern("SD"));
+			var p = new node[] {
+				new int_node(this, GrPeach.SdFileHandlerNameToNum(dropdown_sd_file_no)),
+			};
+			return new call_node(this, c, intern("position"), p, null);
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Arduino/SerialBlock.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Arduino/SerialBlock.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Arduino/SerialBlock.cs	(revision 270)
@@ -0,0 +1,330 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace WebMrbc
+{
+	public class BpsValueBlock : Block
+	{
+		public const string type_name = "bps_value";
+
+		public BpsValueBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField(new FieldDropdown(new[] {
+					new[] { "115.2kbps", "115200" },
+					new[] { "57.6kbps", "57600" },
+					new[] { "38.4kbps", "38400" },
+					new[] { "31.25kbps", "31250" },
+					new[] { "28.8kbps", "28800" },
+					new[] { "19.2kbps", "19200" },
+					new[] { "14.4kbps", "14400" },
+					new[] { "9.6kbps", "9600" },
+					new[] { "4.8kbps", "4800" },
+					new[] { "2.4kbps", "2400" },
+					new[] { "1.2kbps", "1200" },
+					new[] { "600bps", "600" },
+					new[] { "300bps", "300" }
+				}), "VALUE");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SerialNewBlock : Block
+	{
+		public const string type_name = "serial_new";
+
+		public SerialNewBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("シリアル通信を初期化します")
+				.appendField(GrPeach.SerialPorts(), "SERIAL_PORT_NO");
+			this.appendValueInput("BPS")
+				.setCheck("Number")
+				.appendField("ボーレート");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SerialBpsBlock : Block
+	{
+		public const string type_name = "serial_bps";
+
+		public SerialBpsBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ボーレートを設定します")
+				.appendField(GrPeach.SerialPorts(), "SERIAL_PORT_NO");
+			this.appendValueInput("BPS")
+				.setCheck("Number")
+				.appendField("ボーレート");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SerialPrintBlock : Block
+	{
+		public const string type_name = "serial_print";
+
+		public SerialPrintBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("シリアルに出力します")
+				.appendField(GrPeach.SerialPorts(), "SERIAL_PORT_NO");
+			this.appendValueInput("STR")
+				.setCheck("String")
+				.appendField("文字列");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SerialPrintlnBlock : Block
+	{
+		public const string type_name = "serial_println";
+
+		public SerialPrintlnBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("シリアルに\\r\\n付きで出力します")
+				.appendField(GrPeach.SerialPorts(), "SERIAL_PORT_NO");
+			this.appendValueInput("STR")
+				.setCheck("String")
+				.appendField("文字列");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SerialAvailableBlock : Block
+	{
+		public const string type_name = "serial_available";
+
+		public SerialAvailableBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("シリアルデータがあるかどうか調べます")
+				.appendField(GrPeach.SerialPorts(), "SERIAL_PORT_NO");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SerialReadBlock : Block
+	{
+		public const string type_name = "serial_read";
+
+		public SerialReadBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+			.appendField("シリアルからデータを取得します")
+			.appendField(GrPeach.SerialPorts(), "SERIAL_PORT_NO");
+			this.setInputsInline(true);
+			this.setOutput(true, "Array");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SerialWriteBlock : Block
+	{
+		public const string type_name = "serial_write";
+
+		public SerialWriteBlock()
+			: base(type_name)
+		{
+		}
+		public void init()
+		{
+			this.appendDummyInput()
+			.appendField("シリアルにデータを出力します")
+			.appendField(GrPeach.SerialPorts(), "SERIAL_PORT_NO");
+			this.appendValueInput("DATA")
+				.setCheck("String")
+				.appendField("データ");
+			this.appendValueInput("LENGTH")
+				.setCheck("Number")
+				.appendField("データサイズ");
+			this.setInputsInline(true);
+			this.setOutput(true, "Array");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SerialFlashBlock : Block
+	{
+		public const string type_name = "serial_flash";
+
+		public SerialFlashBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("シリアルデータをフラッシュします")
+				.appendField(GrPeach.SerialPorts(), "SERIAL_PORT_NO");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	partial class Ruby
+	{
+		public node bps_value(BpsValueBlock block)
+		{
+			var value = block.getFieldValue("VALUE");
+			return new int_node(this, value == null ? 0 : Bridge.Script.ParseInt(value, 10));
+		}
+
+		public node serial_new(SerialNewBlock block)
+		{
+			var dropdown_serial_port_no = block.getFieldValue("SERIAL_PORT_NO");
+			var value_bps = valueToCode(block, "BPS");
+			var a = new gvar_node(this, intern(GrPeach.SerialPortNameToVariable(dropdown_serial_port_no)));
+			var c = new const_node(this, intern("Serial"));
+			var p = new node[] {
+				new int_node(this, GrPeach.SerialPortNameToNum(dropdown_serial_port_no)),
+				value_bps
+			};
+			return new asgn_node(this, a, new call_node(this, c, intern("new"), p, null));
+		}
+
+		public node serial_bps(SerialBpsBlock block)
+		{
+			var dropdown_serial_port_no = block.getFieldValue("SERIAL_PORT_NO");
+			var value_bps = valueToCode(block, "BPS");
+			var a = new gvar_node(this, intern(GrPeach.SerialPortNameToVariable(dropdown_serial_port_no)));
+			var p = new node[] {
+				value_bps
+			};
+			return new call_node(this, a, intern("bps"), p, null);
+		}
+
+		public node serial_print(SerialPrintBlock block)
+		{
+			var dropdown_serial_port_no = block.getFieldValue("SERIAL_PORT_NO");
+			var value_str = valueToCode(block, "STR");
+			var a = new gvar_node(this, intern(GrPeach.SerialPortNameToVariable(dropdown_serial_port_no)));
+			var p = new node[] {
+				value_str
+			};
+			return new call_node(this, a, intern("print"), p, null);
+		}
+
+		public node serial_println(SerialPrintlnBlock block)
+		{
+			var dropdown_serial_port_no = block.getFieldValue("SERIAL_PORT_NO");
+			var value_str = valueToCode(block, "STR");
+			var a = new gvar_node(this, intern(GrPeach.SerialPortNameToVariable(dropdown_serial_port_no)));
+			var p = new node[] {
+				value_str
+			};
+			return new call_node(this, a, intern("println"), p, null);
+		}
+
+		public node serial_available(SerialAvailableBlock block)
+		{
+			var dropdown_serial_port_no = block.getFieldValue("SERIAL_PORT_NO");
+			var a = new gvar_node(this, intern(GrPeach.SerialPortNameToVariable(dropdown_serial_port_no)));
+			var p = new node[0];
+			return new call_node(this, a, intern("available"), p, null);
+		}
+
+		public node serial_read(SerialReadBlock block)
+		{
+			var dropdown_serial_port_no = block.getFieldValue("SERIAL_PORT_NO");
+			var a = new gvar_node(this, intern(GrPeach.SerialPortNameToVariable(dropdown_serial_port_no)));
+			var p = new node[0];
+			return new call_node(this, a, intern("read"), p, null);
+		}
+
+		public node serial_write(SerialWriteBlock block)
+		{
+			var dropdown_serial_port_no = block.getFieldValue("SERIAL_PORT_NO");
+			var value_data = valueToCode(block, "DATA");
+			var value_length = valueToCode(block, "LENGTH");
+			var a = new gvar_node(this, intern(GrPeach.SerialPortNameToVariable(dropdown_serial_port_no)));
+			var p = new node[] {
+				value_data,
+				value_length
+			};
+			return new call_node(this, a, intern("write"), p, null);
+		}
+
+		public node serial_flash(SerialFlashBlock block)
+		{
+			var dropdown_serial_port_no = block.getFieldValue("SERIAL_PORT_NO");
+			var a = new gvar_node(this, intern(GrPeach.SerialPortNameToVariable(dropdown_serial_port_no)));
+			var p = new node[0];
+			return new call_node(this, a, intern("flash"), p, null);
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Arduino/ServoBlock.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Arduino/ServoBlock.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Arduino/ServoBlock.cs	(revision 270)
@@ -0,0 +1,287 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using Bridge;
+
+namespace WebMrbc
+{
+	public class ServoAttachBlock : Block
+	{
+		public const string type_name = "servo_attach";
+
+		public ServoAttachBlock()
+			: base(type_name)
+		{
+		}
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("サーボ出力を任意のピンに割り当てます")
+				.appendField(new FieldNumber("0", 0, 11, 1), "CH");
+			this.appendDummyInput()
+				.appendField("割り当てるピン番号")
+				.appendField(GrPeach.PwmPins(), "PIN_NO")
+				.appendField("Min")
+				.appendField(new FieldTextInput("default"), "MIN")
+				.appendField("Max")
+				.appendField(new FieldTextInput("default"), "MAX");
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class ServoAngleBlock : Block
+	{
+		public const string type_name = "servo_angle";
+
+		public ServoAngleBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField(new FieldAngle("180", validator), "VALUE");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+
+		public string validator(string text)
+		{
+			if (text == null) return null;
+			var a = Script.ParseFloat(text);
+			if (Script.IsNaN(a)) return null;
+			a %= 180;
+			if (a < 0) a += 180;
+			return a.ToString();
+		}
+	}
+
+
+	public class ServoWriteBlock : Block
+	{
+		public const string type_name = "servo_write";
+
+		public ServoWriteBlock()
+			: base(type_name)
+		{
+		}
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("サーボの角度をセットします")
+				.appendField(new FieldNumber("0", 0, 11, 1), "CH");
+			this.appendValueInput("ANGLE")
+				.setCheck("Number")
+				.appendField("角度");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class ServoUsValueBlock : Block
+	{
+		public const string type_name = "servo_us_value";
+
+		public ServoUsValueBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField(new FieldNumber("0", 0, 19999, 1), "VALUE");
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("パルスの幅 1～19999, 0で出力 OFF");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+
+	public class ServoUsBlock : Block
+	{
+		public const string type_name = "servo_us";
+
+		public ServoUsBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("サーボモータにus単位で角度を指定する")
+				.appendField(new FieldNumber("0", 0, 11, 1), "CH");
+			this.appendValueInput("US")
+				.setCheck("Number")
+				.appendField("出力したいパルスの幅");
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class ServoReadBlock : Block
+	{
+		public const string type_name = "servo_read";
+
+		public ServoReadBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("最後に設定された角度を読み出す")
+				.appendField(new FieldNumber("0", 0, 11, 1), "CH");
+			this.setOutput(true, "Number");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class ServoAttachedBlock : Block
+	{
+		public const string type_name = "servo_attached";
+
+		public ServoAttachedBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ピンにサーボが割り当てられているかを確認する")
+				.appendField(new FieldNumber("0", 0, 11, 1), "CH");
+			this.setOutput(true, "Boolean");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class ServoDetachBlock : Block
+	{
+		public const string type_name = "servo_detach";
+
+		public ServoDetachBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("サーボの動作を止め、割り込みを禁止する")
+				.appendField(new FieldNumber("0", 0, 11, 1), "CH");
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	partial class Ruby
+	{
+		public node servo_angle(ServoAngleBlock block)
+		{
+			var value = block.getFieldValue("VALUE");
+			return new int_node(this, value == null ? 0 : Script.ParseInt(value, 10));
+		}
+
+		public node servo_us_value(ServoUsValueBlock block)
+		{
+			var value = block.getFieldValue("VALUE");
+			return new int_node(this, value == null ? 0 : Script.ParseInt(value, 10));
+		}
+
+		public node servo_attach(ServoAttachBlock block)
+		{
+			var number_ch = block.getFieldValue("CH");
+			var dropdown_pin_no = block.getFieldValue("PIN_NO");
+			var text_min = block.getFieldValue("MIN");
+			var text_max = block.getFieldValue("MAX");
+			var c = new const_node(this, intern("Servo"));
+			var p = new node[] {
+				new int_node(this, number_ch == null ? 0 : Script.ParseInt(number_ch, 10)),
+				new int_node(this, GrPeach.PinNameToNum(dropdown_pin_no)),
+				new int_node(this, text_min == null ? 0 : Script.ParseInt(text_min, 10)),
+				new int_node(this, text_max == null ? 0 : Script.ParseInt(text_max, 10)),
+			};
+			return new call_node(this, c, intern("attach"), p, null);
+		}
+
+		public node servo_write(ServoWriteBlock block)
+		{
+			var number_ch = block.getFieldValue("CH");
+			var value_angle = valueToCode(block, "ANGLE");
+			var c = new const_node(this, intern("Servo"));
+			var p = new node[] {
+				new int_node(this, number_ch == null ? 0 : Script.ParseInt(number_ch, 10)),
+				value_angle,
+			};
+			return new call_node(this, c, intern("write"), p, null);
+		}
+
+		public node servo_us(ServoUsBlock block)
+		{
+			var number_ch = block.getFieldValue("CH");
+			var value_us = valueToCode(block, "US");
+			var c = new const_node(this, intern("Servo"));
+			var p = new node[] {
+				new int_node(this, number_ch == null ? 0 : Script.ParseInt(number_ch, 10)),
+				value_us,
+			};
+			return new call_node(this, c, intern("us"), p, null);
+		}
+
+		public node servo_read(ServoReadBlock block)
+		{
+			var number_ch = block.getFieldValue("CH");
+			var c = new const_node(this, intern("Servo"));
+			var p = new node[] {
+				new int_node(this, number_ch == null ? 0 : Script.ParseInt(number_ch, 10)),
+			};
+			return new call_node(this, c, intern("read"), p, null);
+		}
+
+		public node servo_attached(ServoAttachedBlock block)
+		{
+			var number_ch = block.getFieldValue("CH");
+			var c = new const_node(this, intern("Servo"));
+			var p = new node[] {
+				new int_node(this, number_ch == null ? 0 : Script.ParseInt(number_ch, 10)),
+			};
+			return new call_node(this, c, intern("attached"), p, null);
+		}
+
+		public node servo_detach(ServoDetachBlock block)
+		{
+			var number_ch = block.getFieldValue("CH");
+			var c = new const_node(this, intern("Servo"));
+			var p = new node[] {
+				new int_node(this, number_ch == null ? 0 : Script.ParseInt(number_ch, 10)),
+			};
+			return new call_node(this, c, intern("detach"), p, null);
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Arduino/SystemBlock.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Arduino/SystemBlock.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Arduino/SystemBlock.cs	(revision 270)
@@ -0,0 +1,322 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace WebMrbc
+{
+	public class SystemExitBlock : Block
+	{
+		public const string type_name = "system_exit";
+
+		public SystemExitBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+			.appendField("終了させます");
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SystemSetRunBlock : Block
+	{
+		public const string type_name = "system_setrun";
+
+		public SystemSetRunBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("次に実行するスクリプトファイルをセットします");
+			this.appendValueInput("FILENAME")
+				.setCheck("String");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SystemVersionBlock : Block
+	{
+		public const string type_name = "system_version";
+
+		public SystemVersionBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("システムのバージョンを取得します");
+			this.setOutput(true, "String");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SystemPushBlock : Block
+	{
+		public const string type_name = "system_push";
+
+		public SystemPushBlock()
+			: base(type_name)
+		{
+		}
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("フラッシュメモリに書き込みます");
+			this.appendValueInput("ADDRESS")
+				.setCheck("Number")
+				.appendField("開始アドレス");
+			this.appendValueInput("DATA")
+				.setCheck("String")
+				.appendField("データ");
+			this.appendValueInput("LENGTH")
+				.setCheck("Number")
+				.appendField("サイズ");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SystemPopBlock : Block
+	{
+		public const string type_name = "system_pop";
+
+		public SystemPopBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("フラッシュメモリから読み出します");
+			this.appendValueInput("ADDRESS")
+				.setCheck("Number")
+				.appendField("開始アドレス");
+			this.appendValueInput("LENGTH")
+				.setCheck("Number")
+				.appendField("サイズ");
+			this.setInputsInline(true);
+			this.setOutput(true, "String");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SystemFileLoadBlock : Block
+	{
+		public const string type_name = "system_fileload";
+
+		public SystemFileLoadBlock()
+			: base(type_name)
+		{
+		}
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ファイルローダーを呼び出します");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SystemResetBlock : Block
+	{
+		public const string type_name = "system_reset";
+
+		public SystemResetBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("リセットします");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SystemUseSdBlock : Block
+	{
+		public const string type_name = "system_use_sd";
+
+		public SystemUseSdBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("SDカードを使えるようにします");
+			this.setInputsInline(true);
+			this.setOutput(true, "Boolean");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SystemUseWifiBlock : Block
+	{
+		public const string type_name = "system_use_wifi";
+
+		public SystemUseWifiBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("WiFiモジュールESP8266ボードを使えるようにします");
+			this.setInputsInline(true);
+			this.setOutput(true, "Boolean");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class SystemGetMrbPathBlock : Block
+	{
+		public const string type_name = "system_get_mrb_path";
+
+		public SystemGetMrbPathBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("実行しているmrbファイルパスを取得します");
+			this.setInputsInline(true);
+			this.setOutput(true, "String");
+			this.setColour(160);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	partial class Ruby
+	{
+		public node system_exit(SystemExitBlock block)
+		{
+			var c = new const_node(this, intern("System"));
+			var p = new node[0];
+			return new call_node(this, c, intern("exit"), p, null);
+		}
+
+		public node system_setrun(SystemSetRunBlock block)
+		{
+			var value_filename = valueToCode(block, "FILENAME");
+			var c = new const_node(this, intern("System"));
+			var p = new node[] {
+				value_filename
+			};
+			return new call_node(this, c, intern("setRun"), p, null);
+		}
+
+		public node system_version(SystemVersionBlock block)
+		{
+			var c = new const_node(this, intern("System"));
+			var p = new node[0];
+			return new call_node(this, c, intern("version"), p, null);
+		}
+
+		public node system_push(SystemPushBlock block)
+		{
+			var value_address = valueToCode(block, "ADDRESS");
+			var value_data = valueToCode(block, "DATA");
+			var value_length = valueToCode(block, "LENGTH");
+			var c = new const_node(this, intern("System"));
+			var p = new node[] {
+				value_address,
+				value_data,
+				value_length
+			};
+			return new call_node(this, c, intern("push"), p, null);
+		}
+
+		public node system_pop(SystemPopBlock block)
+		{
+			var value_address = valueToCode(block, "ADDRESS");
+			var value_length = valueToCode(block, "LENGTH");
+			var c = new const_node(this, intern("System"));
+			var p = new node[] {
+				value_address,
+				value_length
+			};
+			return new call_node(this, c, intern("pop"), p, null);
+		}
+
+		public node system_fileload(SystemFileLoadBlock block)
+		{
+			var c = new const_node(this, intern("System"));
+			var p = new node[0];
+			return new call_node(this, c, intern("fileload"), p, null);
+		}
+
+		public node system_reset(SystemResetBlock block)
+		{
+			var c = new const_node(this, intern("System"));
+			var p = new node[0];
+			return new call_node(this, c, intern("reset"), p, null);
+		}
+
+		public node system_use_sd(SystemUseSdBlock block)
+		{
+			var c = new const_node(this, intern("System"));
+			var p = new node[0];
+			return new call_node(this, c, intern("useSD"), p, null);
+		}
+
+		public node system_use_wifi(SystemUseWifiBlock block)
+		{
+			var c = new const_node(this, intern("System"));
+			var p = new node[0];
+			return new call_node(this, c, intern("useWiFi"), p, null);
+		}
+
+		public node system_get_mrb_path(SystemGetMrbPathBlock block)
+		{
+			var c = new const_node(this, intern("System"));
+			var p = new node[0];
+			return new call_node(this, c, intern("getMrbPath"), p, null);
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Block.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Block.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Block.cs	(revision 270)
@@ -0,0 +1,1258 @@
+﻿using System;
+using Bridge;
+using Bridge.Html5;
+
+namespace WebMrbc
+{
+	[IgnoreCast]
+	public class Block
+	{
+		public string type;
+
+		[External, FieldProperty]
+		public string id { get; set; }
+		[External, FieldProperty]
+		public Connection outputConnection { get; set; }
+		[External, FieldProperty]
+		public Connection nextConnection { get; set; }
+		[External, FieldProperty]
+		public Connection previousConnection { get; set; }
+		[External, FieldProperty]
+		public Input[] inputList { get; set; }
+		[External, FieldProperty]
+		public bool inputsInline { get; set; }
+		[External, FieldProperty]
+		public bool disabled { get; set; }
+		[External, FieldProperty]
+		public string tooltip { get; set; }
+		[External, FieldProperty]
+		public bool contextMenu { get; set; }
+		[External, FieldProperty]
+		public string contextMenuMsg_ { get; set; }
+		[External, FieldProperty]
+		public Union<string, Comment> comment { get; set; }
+		[External, FieldProperty]
+		public bool RTL { get; set; }
+		[External, FieldProperty]
+		public Block[] prevBlocks_ { get; set; }
+		[External, FieldProperty]
+		public Workspace workspace { get; set; }
+		[External, FieldProperty]
+		public Mutator mutator { get; set; }
+		[External, FieldProperty]
+		public bool isInFlyout { get; }
+
+		public Block(string type)
+		{
+			this.type = type;
+		}
+
+		[External]
+		internal void bumpNeighbours_()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Dispose of this block.
+		/// </summary>
+		/// <param name="healStack">healStack If true, then try to heal any gap by connecting
+		/// the next statement with the previous statement.  Otherwise, dispose of
+		/// all children of this block.</param>
+		[External]
+		public virtual void dispose(bool healStack)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Unplug this block from its superior block.  If this block is a statement,
+		/// optionally reconnect the block underneath with the block on top.
+		/// </summary>
+		/// <param name="opt_healStack">opt_healStack Disconnect child statement and reconnect
+		/// stack.  Defaults to false.</param>
+		[External]
+		public void unplug(bool opt_healStack = false)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Return the parent block or null if this block is at the top level.
+		/// </summary>
+		/// <returns>The block that holds the current block.</returns>
+		[External]
+		public Block getParent()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Return the input that connects to the specified block.
+		/// </summary>
+		/// <param name="block">A block connected to an input on this block.</param>
+		/// <returns>The input that connects to the specified block.</returns>
+		[External]
+		public Input getInputWithBlock(Block block)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Return the parent block that surrounds the current block, or null if this
+		/// block has no surrounding block.  A parent block might just be the previous
+		/// statement, whereas the surrounding block is an if statement, while loop, etc.
+		/// </summary>
+		/// <returns>The block that surrounds the current block.</returns>
+		[External]
+		public Block getSurroundParent()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Return the next statement block directly connected to this block.
+		/// </summary>
+		/// <returns>The next statement block or null.</returns>
+		[External]
+		public Block getNextBlock()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Return the top-most block in this block's tree.
+		/// This will return itself if this block is at the top level.
+		/// </summary>
+		/// <returns>The root block.</returns>
+		[External]
+		public Block getRootBlock()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Find all the blocks that are directly nested inside this one.
+		/// Includes value and block inputs, as well as any following statement.
+		/// Excludes any connection on an output tab or any preceding statement.
+		/// </summary>
+		/// <returns>Array of blocks.</returns>
+		[External]
+		public Block[] getChildren()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Set parent of this block to be a new block or null.
+		/// </summary>
+		/// <param name="block">newParent New parent block.</param>
+		[External]
+		public void setParent(Block block)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Find all the blocks that are directly or indirectly nested inside this one.
+		/// Includes this block in the list.
+		/// Includes value and block inputs, as well as any following statements.
+		/// Excludes any connection on an output tab or any preceding statements.
+		/// </summary>
+		/// <returns>Flattened array of blocks.</returns>
+		[External]
+		public Block[] getDescendants()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Get whether this block is deletable or not.
+		/// </summary>
+		/// <returns>True if deletable.</returns>
+		[External]
+		public bool isDeletable()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Set whether this block is deletable or not.
+		/// </summary>
+		/// <param name="deletable">True if deletable.</param>
+		[External]
+		public void setDeletable(bool deletable)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Get whether this block is movable or not.
+		/// </summary>
+		/// <returns>True if movable.</returns>
+		[External]
+		public bool isMovable()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Set whether this block is movable or not.
+		/// </summary>
+		/// <param name="movable">True if movable.</param>
+		[External]
+		public void setMovable(bool movable)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Get whether this block is a shadow block or not.
+		/// </summary>
+		/// <returns>True if a shadow.</returns>
+		[External]
+		public bool isShadow()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Set whether this block is a shadow block or not.
+		/// </summary>
+		/// <param name="shadow">True if a shadow.</param>
+		[External]
+		public void setShadow(bool shadow)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Get whether this block is editable or not.
+		/// </summary>
+		/// <returns>True if editable.</returns>
+		[External]
+		public bool isEditable()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Set whether this block is editable or not.
+		/// </summary>
+		/// <param name="editable">True if editable.</param>
+		[External]
+		public void setEditable(bool editable)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Set whether the connections are hidden (not tracked in a database) or not.
+		/// Recursively walk down all child blocks (except collapsed blocks).
+		/// </summary>
+		/// <param name="hidden">True if connections are hidden.</param>
+		[External]
+		public void setConnectionsHidden(bool hidden)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Set the URL of this block's help page.
+		/// </summary>
+		/// <param name="url">URL string for block help, or function that
+		/// returns a URL.  Null for no help.</param>
+		[External]
+		public void setHelpUrl(Union<string, Func<string>> url)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Change the tooltip text for a block.
+		/// </summary>
+		/// <param name="newTip">newTip Text for tooltip or a parent element to
+		/// link to for its tooltip.  May be a function that returns a string.</param>
+		[External]
+		public void setTooltip(Union<string, Func<string>> newTip)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Get the colour of a block.
+		/// </summary>
+		/// <returns>#RRGGBB string.</returns>
+		[External]
+		public string getColour()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Change the colour of a block.
+		/// </summary>
+		/// <param name="colour">HSV hue value, or #RRGGBB string.</param>
+		[External]
+		public void setColour(Union<int, string> colour)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Returns the named field from a block.
+		/// </summary>
+		/// <param name="name">The name of the field.</param>
+		/// <returns>Named field, or null if field does not exist.</returns>
+		[External]
+		public Field getField(string name)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Return all variables referenced by this block.
+		/// </summary>
+		/// <returns>List of variable names.</returns>
+		[External]
+		public virtual string[] getVars()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Notification that a variable is renaming.
+		/// If the name matches one of this block's variables, rename it.
+		/// </summary>
+		/// <param name="oldName">Previous name of variable.</param>
+		/// <param name="newName">Renamed variable.</param>
+		[External]
+		public virtual void renameVar(string oldName, string newName)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Returns the language-neutral value from the field of a block.
+		/// </summary>
+		/// <param name="name">The name of the field.</param>
+		/// <returns>Value from the field or null if field does not exist.</returns>
+		[External]
+		public string getFieldValue(string name)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Returns the language-neutral value from the field of a block.
+		/// </summary>
+		/// <param name="name">The name of the field.</param>
+		/// <returns>Value from the field or null if field does not exist.</returns>
+		[External]
+		public string getTitleValue(string name)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Change the field value for a block (e.g. 'CHOOSE' or 'REMOVE').
+		/// </summary>
+		/// <param name="newValue">Value to be the new field.</param>
+		/// <param name="name">The name of the field.</param>
+		[External]
+		public void setFieldValue(string newValue, string name)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Change the field value for a block (e.g. 'CHOOSE' or 'REMOVE').
+		/// </summary>
+		/// <param name="newValue">Value to be the new field.</param>
+		/// <param name="name">The name of the field.</param>
+		[External]
+		public void setTitleValue(string newValue, string name)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Set whether this block can chain onto the bottom of another block.
+		/// </summary>
+		/// <param name="newBoolean">True if there can be a previous statement.</param>
+		/// <param name="opt_check">Statement type or
+		/// list of statement types.  Null/undefined if any type could be connected.</param>
+		[External]
+		public void setPreviousStatement(bool newBoolean, Union<string, string[]> opt_check = null)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Set whether another block can chain onto the bottom of this block.
+		/// </summary>
+		/// <param name="newBoolean">True if there can be a next statement.</param>
+		/// <param name="opt_check">Statement type or
+		/// list of statement types.  Null/undefined if any type could be connected.</param>
+		[External]
+		public void setNextStatement(bool newBoolean, Union<string, string[]> opt_check = null)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Set whether this block returns a value.
+		/// </summary>
+		/// <param name="newBoolean">True if there is an output.</param>
+		/// <param name="opt_check">Returned type or list
+		/// of returned types.  Null or undefined if any type could be returned
+		/// (e.g. variable get).</param>
+		[External]
+		public void setOutput(bool newBoolean, Union<string, string[]> opt_check = null)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Set whether value inputs are arranged horizontally or vertically.
+		/// </summary>
+		/// <param name="newBoolean">True if inputs are horizontal.</param>
+		[External]
+		public void setInputsInline(bool newBoolean)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Get whether value inputs are arranged horizontally or vertically.
+		/// </summary>
+		/// <returns>True if inputs are horizontal.</returns>
+		[External]
+		public bool getInputsInline()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Set whether the block is disabled or not.
+		/// </summary>
+		/// <param name="disabled">True if disabled.</param>
+		[External]
+		public void setDisabled(bool disabled)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Get whether the block is disabled or not due to parents.
+		/// The block's own disabled property is not considered.
+		/// </summary>
+		/// <returns>True if disabled.</returns>
+		[External]
+		public bool getInheritedDisabled()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Get whether the block is collapsed or not.
+		/// </summary>
+		/// <returns>True if collapsed.</returns>
+		[External]
+		public bool isCollapsed()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Set whether the block is collapsed or not.
+		/// </summary>
+		/// <param name="collapsed">True if collapsed.</param>
+		[External]
+		public void setCollapsed(bool collapsed)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Create a human-readable text representation of this block and any children.
+		/// </summary>
+		/// <param name="opt_maxLength">Truncate the string to this length.</param>
+		/// <returns>Text of block.</returns>
+		[External]
+		public string toString(int opt_maxLength = 0)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Shortcut for appending a value input row.
+		/// </summary>
+		/// <param name="name">Language-neutral identifier which may used to find this
+		/// input again.  Should be unique to this block.</param>
+		/// <returns>The input object created.</returns>
+		[External]
+		public Input appendValueInput(string name)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Shortcut for appending a statement input row.
+		/// </summary>
+		/// <param name="name">Language-neutral identifier which may used to find this
+		/// input again.  Should be unique to this block.</param>
+		/// <returns>The input object created.</returns>
+		[External]
+		public Input appendStatementInput(string name)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Shortcut for appending a dummy input row.
+		/// </summary>
+		/// <param name="opt_name">Language-neutral identifier which may used to find
+		/// this input again.  Should be unique to this block.</param>
+		/// <returns>The input object created.</returns>
+		[External]
+		public Input appendDummyInput(string opt_name = null)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Initialize this block using a cross-platform, internationalization-friendly
+		/// JSON description.
+		/// </summary>
+		/// <param name="json">Structured data describing the block.</param>
+		[External]
+		public void jsonInit(object json)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Move a named input to a different location on this block.
+		/// </summary>
+		/// <param name="name">The name of the input to move.</param>
+		/// <param name="refName">Name of input that should be after the moved input,
+		/// or null to be the input at the end.</param>
+		[External]
+		public void moveInputBefore(string name, string refName)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Move a numbered input to a different location on this block.
+		/// </summary>
+		/// <param name="inputIndex">Index of the input to move.</param>
+		/// <param name="refIndex">Index of input that should be after the moved input.</param>
+		[External]
+		public void moveNumberedInputBefore(int inputIndex, int refIndex)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Remove an input from this block.
+		/// </summary>
+		/// <param name="name">The name of the input.</param>
+		/// <param name="opt_quiet">True to prevent error if input is not present.</param>
+		[External]
+		public void removeInput(string name, bool opt_quiet = false)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Fetches the named input object.
+		/// </summary>
+		/// <param name="name">The name of the input.</param>
+		/// <returns>The input object, or null if input does not exist.</returns>
+		[External]
+		public Input getInput(string name)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Fetches the block attached to the named input.
+		/// </summary>
+		/// <param name="name">The name of the input.</param>
+		/// <returns>The attached value block, or null if the input is
+		/// either disconnected or if the input does not exist.</returns>
+		[External]
+		public Block getInputTargetBlock(string name)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Returns the comment on this block (or '' if none).
+		/// </summary>
+		/// <returns>Block's comment.</returns>
+		[External]
+		public string getCommentText()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Set this block's comment text.
+		/// </summary>
+		/// <param name="text">text The text, or null to delete.</param>
+		[External]
+		public void setCommentText(string text)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Set this block's warning text.
+		/// </summary>
+		/// <param name="text">The text, or null to delete.</param>
+		[External]
+		public void setWarningText(string text)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Give this block a mutator dialog.
+		/// </summary>
+		/// <param name="mutator">A mutator dialog instance or null to remove.</param>
+		[External]
+		public void setMutator(Mutator mutator)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Return the coordinates of the top-left corner of this block relative to the
+		/// drawing surface's origin (0,0).
+		/// </summary>
+		/// <returns>Object with .x and .y properties.</returns>
+		[External]
+		public goog.math.Coordinate getRelativeToSurfaceXY()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Move a block by a relative offset.
+		/// </summary>
+		/// <param name="dx">Horizontal offset.</param>
+		/// <param name="dy">Vertical offset.</param>
+		[External]
+		public void moveBy(double dx, double dy)
+		{
+			throw new NotImplementedException();
+		}
+
+		// BlockSvg
+
+		/// <summary>
+		/// Create and initialize the SVG representation of the block.
+		/// May be called more than once.
+		/// </summary>
+		[External]
+		public void initSvg()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Select this block.  Highlight it visually.
+		/// </summary>
+		[External]
+		public void select()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Unselect this block.  Remove its highlighting.
+		/// </summary>
+		[External]
+		public void unselect()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Returns a list of mutator, comment, and warning icons.
+		/// </summary>
+		/// <returns>List of icons.</returns>
+		[External]
+		public object[] getIcons()
+		{
+			throw new NotImplementedException();
+		}
+
+
+		/// <summary>
+		/// Snap this block to the nearest grid point.
+		/// </summary>
+		[External]
+		public void snapToGrid()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Returns a bounding box describing the dimensions of this block
+		/// and any blocks stacked below it.
+		/// </summary>
+		/// <returns>Object with height and width properties.</returns>
+		[External]
+		public goog.math.Size getHeightWidth()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Returns the coordinates of a bounding box describing the dimensions of this
+		/// block and any blocks stacked below it.
+		/// </summary>
+		/// <returns>Object with top left and bottom right coordinates of the bounding box.</returns>
+		[External]
+		public Rectangle getBoundingRectangle()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Open the next (or previous) FieldTextInput.
+		/// </summary>
+		/// <param name="start">Current location.</param>
+		/// <param name="forward">If true go forward, otherwise backward.</param>
+		[External]
+		public void tab(Union<Field, Block> start, bool forward)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Add or remove the UI indicating if this block is movable or not.
+		/// </summary>
+		[External]
+		public void updateMovable()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Return the root node of the SVG or null if none exists.
+		/// </summary>
+		/// <returns>The root SVG node (probably a group).</returns>
+		[External]
+		public Element getSvgRoot()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Play some UI effects (sound, animation) when disposing of a block.
+		/// </summary>
+		[External]
+		public void disposeUiEffect()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Play some UI effects (sound, ripple) after a connection has been established.
+		/// </summary>
+		[External]
+		public void connectionUiEffect()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Play some UI effects (sound, animation) when disconnecting a block.
+		/// </summary>
+		[External]
+		public void disconnectUiEffect()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Change the colour of a block.
+		/// </summary>
+		[External]
+		public void updateColour()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Enable or disable a block.
+		/// </summary>
+		[External]
+		public void updateDisabled()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Select this block.  Highlight it visually.
+		/// </summary>
+		[External]
+		public void addSelect()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Unselect this block.  Remove its highlighting.
+		/// </summary>
+		[External]
+		public void removeSelect()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Adds the dragging class to this block.
+		/// Also disables the highlights/shadows to improve performance.
+		/// </summary>
+		[External]
+		public void addDragging()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Removes the dragging class from this block.
+		/// </summary>
+		[External]
+		public void removeDragging()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Render the block.
+		/// Lays out and reflows a block based on its contents and settings.
+		/// </summary>
+		/// <param name="opt_bubble">If false, just render this block.
+		/// If true, also render block's parent, grandparent, etc.  Defaults to true.</param>
+		[External]
+		public void render(bool opt_bubble = false)
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	public class ContextMenuOption
+	{
+		public bool enabled;
+		public string text;
+		public Action callback;
+	}
+}
+
+[Name("Blockly.Msg")]
+public class Msg
+{
+	/*"@metadata": {
+		"authors": [
+			"Shirayuki",
+			"Oda",
+			"아라",
+			"Otokoume",
+			"Sujiniku",
+			"Sgk",
+			"TAKAHASHI Shuuji"
+		]
+	},*/
+	public const string ADD_COMMENT = "コメントを追加";
+	public const string CHANGE_VALUE_TITLE = "値を変更します。";
+	public const string CLEAN_UP = "ブロックの整理";
+	public const string COLLAPSE_ALL = "全てのブロックを折りたたむ";
+	public const string COLLAPSE_BLOCK = "ブロックを折りたたむ";
+	public const string COLOUR_BLEND_COLOUR1 = "色 1";
+	public const string COLOUR_BLEND_COLOUR2 = "色 2";
+	public const string COLOUR_BLEND_HELPURL = "http://meyerweb.com/eric/tools/color-blend/";
+	public const string COLOUR_BLEND_RATIO = "割合";
+	public const string COLOUR_BLEND_TITLE = "ブレンド";
+	public const string COLOUR_BLEND_TOOLTIP = "ブレンド2 つの色を指定された比率に混ぜる(0.0 ～ 1.0)。";
+	public const string COLOUR_PICKER_HELPURL = "https://ja.wikipedia.org/wiki/色";
+	public const string COLOUR_PICKER_TOOLTIP = "パレットから色を選んでください。";
+	public const string COLOUR_RANDOM_HELPURL = "http://randomcolour.com";  // untranslated
+	public const string COLOUR_RANDOM_TITLE = "ランダムな色";
+	public const string COLOUR_RANDOM_TOOLTIP = "ランダムな色を選択します。";
+	public const string COLOUR_RGB_BLUE = "青";
+	public const string COLOUR_RGB_GREEN = "緑";
+	public const string COLOUR_RGB_HELPURL = "http://www.december.com/html/spec/colorper.html";
+	public const string COLOUR_RGB_RED = "赤";
+	public const string COLOUR_RGB_TITLE = "カラーと";
+	public const string COLOUR_RGB_TOOLTIP = "赤、緑、および青の指定された量で色を作成します。すべての値は 0 ～ 100 の間でなければなりません。";
+	public const string CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks";  // untranslated
+	public const string CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "ループから抜け出す";
+	public const string CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "ループの次の反復処理を続行します。";
+	public const string CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "含むループから抜け出します。";
+	public const string CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "このループの残りの部分をスキップし、次のイテレーションに進みます。";
+	public const string CONTROLS_FLOW_STATEMENTS_WARNING = "注意: このブロックは、ループ内でのみ使用します。";
+	public const string CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each";  // untranslated
+	public const string CONTROLS_FOREACH_INPUT_DO = CONTROLS_REPEAT_INPUT_DO;
+	public const string CONTROLS_FOREACH_TITLE = "各項目の %1 リストで %2";
+	public const string CONTROLS_FOREACH_TOOLTIP = "リストの各項目に対して変数 '%1' のアイテムに設定し、いくつかのステートメントをしてください。";
+	public const string CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with";  // untranslated
+	public const string CONTROLS_FOR_INPUT_DO = CONTROLS_REPEAT_INPUT_DO;
+	public const string CONTROLS_FOR_TITLE = "で、カウントします。 %1 %2 から%3、 %4 で";
+	public const string CONTROLS_FOR_TOOLTIP = "変数 \"%1\"は、指定した間隔ごとのカウントを開始番号から 終了番号まで、値をとり、指定したブロックを行う必要があります。";
+	public const string CONTROLS_IF_ELSEIF_TITLE_ELSEIF = CONTROLS_IF_MSG_ELSEIF;
+	public const string CONTROLS_IF_ELSEIF_TOOLTIP = "場合に条件にブロック追加。";
+	public const string CONTROLS_IF_ELSE_TITLE_ELSE = CONTROLS_IF_MSG_ELSE;
+	public const string CONTROLS_IF_ELSE_TOOLTIP = "Ifブロックに、すべてをキャッチする条件を追加。";
+	public const string CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse";  // untranslated
+	public const string CONTROLS_IF_IF_TITLE_IF = CONTROLS_IF_MSG_IF;
+	public const string CONTROLS_IF_IF_TOOLTIP = "追加、削除、またはセクションを順序変更して、ブロックをこれを再構成します。";
+	public const string CONTROLS_IF_MSG_ELSE = "他";
+	public const string CONTROLS_IF_MSG_ELSEIF = "他でもし";
+	public const string CONTROLS_IF_MSG_IF = "もし";
+	public const string CONTROLS_IF_MSG_THEN = CONTROLS_REPEAT_INPUT_DO;
+	public const string CONTROLS_IF_TOOLTIP_1 = "値が true の場合はその後ステートメントを行をいくつかします。";
+	public const string CONTROLS_IF_TOOLTIP_2 = "値が true 場合は、ステートメントの最初のブロックを行います。それ以外の場合は、ステートメントの 2 番目のブロックを行います。";
+	public const string CONTROLS_IF_TOOLTIP_3 = "最初の値が true 場合は、ステートメントの最初のブロックを行います。それ以外の場合は、2 番目の値が true の場合、ステートメントの 2 番目のブロックをします。";
+	public const string CONTROLS_IF_TOOLTIP_4 = "最初の値が true 場合は、ステートメントの最初のブロックを行います。2 番目の値が true の場合は、ステートメントの 2 番目のブロックを行います。それ以外の場合は最後のブロックのステートメントを行います。";
+	public const string CONTROLS_REPEAT_HELPURL = "https://ja.wikipedia.org/wiki/for文";
+	public const string CONTROLS_REPEAT_INPUT_DO = "してください";
+	public const string CONTROLS_REPEAT_TITLE = "%1 回、繰り返します";
+	public const string CONTROLS_REPEAT_TOOLTIP = "いくつかのステートメントを数回行います。";
+	public const string CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat";  // untranslated
+	public const string CONTROLS_WHILEUNTIL_INPUT_DO = CONTROLS_REPEAT_INPUT_DO;
+	public const string CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "までを繰り返します";
+	public const string CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "つつその間、繰り返す4";
+	public const string CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "値は false の間、いくつかのステートメントを行います。";
+	public const string CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "値は true の間、いくつかのステートメントを行います。";
+	public const string DELETE_ALL_BLOCKS = "%1件のすべてのブロックを消しますか？";
+	public const string DELETE_BLOCK = "ブロックを消す";
+	public const string DELETE_VARIABLE = "変数 %1 を消す";
+	public const string DELETE_VARIABLE_CONFIRMATION = "%1 ヶ所で使われている変数 '%2' を削除しますか？";
+	public const string DELETE_X_BLOCKS = "%1 個のブロックを消す";
+	public const string DISABLE_BLOCK = "ブロックを無効にします。";
+	public const string DUPLICATE_BLOCK = "複製";
+	public const string ENABLE_BLOCK = "ブロックを有効にします。";
+	public const string EXPAND_ALL = "ブロックを展開します。";
+	public const string EXPAND_BLOCK = "ブロックを展開します。";
+	public const string EXTERNAL_INPUTS = "外部入力";
+	public const string HELP = "ヘルプ";
+	public const string INLINE_INPUTS = "インライン入力";
+	public const string LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
+	public const string LISTS_CREATE_EMPTY_TITLE = "空のリストを作成します。";
+	public const string LISTS_CREATE_EMPTY_TOOLTIP = "長さゼロ、データ レコード空のリストを返します";
+	public const string LISTS_CREATE_WITH_CONTAINER_TITLE_ADD = "リスト";
+	public const string LISTS_CREATE_WITH_CONTAINER_TOOLTIP = "追加、削除、またはセクションを順序変更して、ブロックを再構成します。";
+	public const string LISTS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with";  // untranslated
+	public const string LISTS_CREATE_WITH_INPUT_WITH = "これを使ってリストを作成します。";
+	public const string LISTS_CREATE_WITH_ITEM_TITLE = VARIABLES_DEFAULT_NAME;
+	public const string LISTS_CREATE_WITH_ITEM_TOOLTIP = "リストにアイテムを追加します。";
+	public const string LISTS_CREATE_WITH_TOOLTIP = "アイテム数かぎりないのリストを作成します。";
+	public const string LISTS_GET_INDEX_FIRST = "最初";
+	public const string LISTS_GET_INDEX_FROM_END = "終しまいから #";
+	public const string LISTS_GET_INDEX_FROM_START = "#";
+	public const string LISTS_GET_INDEX_GET = "取得";
+	public const string LISTS_GET_INDEX_GET_REMOVE = "取得と削除";
+	public const string LISTS_GET_INDEX_HELPURL = LISTS_INDEX_OF_HELPURL;
+	public const string LISTS_GET_INDEX_INPUT_IN_LIST = LISTS_INLIST;
+	public const string LISTS_GET_INDEX_LAST = "最後";
+	public const string LISTS_GET_INDEX_RANDOM = "ランダム";
+	public const string LISTS_GET_INDEX_REMOVE = "削除";
+	public const string LISTS_GET_INDEX_TAIL = "";
+	public const string LISTS_GET_INDEX_TOOLTIP_GET_FIRST = "リストの最初の項目を返信します。";
+	public const string LISTS_GET_INDEX_TOOLTIP_GET_FROM = "リスト内の指定位置にある項目を返します。";
+	public const string LISTS_GET_INDEX_TOOLTIP_GET_LAST = "リストの最後の項目を返します。";
+	public const string LISTS_GET_INDEX_TOOLTIP_GET_RANDOM = "ランダム アイテム リストを返します。";
+	public const string LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST = "リスト内の最初の項目を削除したあと返します。";
+	public const string LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM = "リスト内の指定位置にある項目を削除し、返します。";
+	public const string LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST = "リスト内の最後の項目を削除したあと返します。";
+	public const string LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM = "リストのランダムなアイテムを削除し、返します。";
+	public const string LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST = "リスト内の最初の項目を削除します。";
+	public const string LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM = "リスト内の指定位置にある項目を返します。";
+	public const string LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST = "リスト内の最後の項目を削除します。";
+	public const string LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM = "リスト内にある任意のアイテムを削除します。";
+	public const string LISTS_GET_SUBLIST_END_FROM_END = "最後から＃へ";
+	public const string LISTS_GET_SUBLIST_END_FROM_START = "＃へ";
+	public const string LISTS_GET_SUBLIST_END_LAST = "最後へ";
+	public const string LISTS_GET_SUBLIST_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-a-sublist";  // untranslated
+	public const string LISTS_GET_SUBLIST_INPUT_IN_LIST = LISTS_INLIST;
+	public const string LISTS_GET_SUBLIST_START_FIRST = "最初からサブリストを取得する。";
+	public const string LISTS_GET_SUBLIST_START_FROM_END = "端から #のサブリストを取得します。";
+	public const string LISTS_GET_SUBLIST_START_FROM_START = "# からサブディレクトリのリストを取得します。";
+	public const string LISTS_GET_SUBLIST_TAIL = "";
+	public const string LISTS_GET_SUBLIST_TOOLTIP = "リストの指定された部分のコピーを作成してくださ。";
+	public const string LISTS_INDEX_FROM_END_TOOLTIP = "%1 は、最後の項目です。";
+	public const string LISTS_INDEX_FROM_START_TOOLTIP = "%1 は、最初の項目です。";
+	public const string LISTS_INDEX_OF_FIRST = "最初に見つかった項目を検索します。";
+	public const string LISTS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list";  // untranslated
+	public const string LISTS_INDEX_OF_INPUT_IN_LIST = LISTS_INLIST;
+	public const string LISTS_INDEX_OF_LAST = "最後に見つかったアイテムを見つける";
+	public const string LISTS_INDEX_OF_TOOLTIP = "リスト項目の最初/最後に出現するインデックス位置を返します。項目が見つからない場合は %1 を返します。";
+	public const string LISTS_INLIST = "リストで";
+	public const string LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty";  // untranslated
+	public const string LISTS_ISEMPTY_TITLE = "%1 が空";
+	public const string LISTS_ISEMPTY_TOOLTIP = "リストが空の場合は、true を返します。";
+	public const string LISTS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Lists#length-of";  // untranslated
+	public const string LISTS_LENGTH_TITLE = " %1の長さ";
+	public const string LISTS_LENGTH_TOOLTIP = "リストの長さを返します。";
+	public const string LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with";  // untranslated
+	public const string LISTS_REPEAT_TITLE = "アイテム %1 と一緒にリストを作成し %2 回繰り";
+	public const string LISTS_REPEAT_TOOLTIP = "指定された値をなんどか繰り返してリストを作ります。";
+	public const string LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set";  // untranslated
+	public const string LISTS_SET_INDEX_INPUT_IN_LIST = LISTS_INLIST;
+	public const string LISTS_SET_INDEX_INPUT_TO = "として";
+	public const string LISTS_SET_INDEX_INSERT = "挿入します。";
+	public const string LISTS_SET_INDEX_SET = "セット";
+	public const string LISTS_SET_INDEX_TOOLTIP = "";
+	public const string LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST = "リストの先頭に項目を挿入します。";
+	public const string LISTS_SET_INDEX_TOOLTIP_INSERT_FROM = "リスト内の指定位置に項目を挿入します。";
+	public const string LISTS_SET_INDEX_TOOLTIP_INSERT_LAST = "リストの末尾に項目を追加します。";
+	public const string LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM = "リストに項目をランダムに挿入します。";
+	public const string LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "リスト内に最初の項目を設定します。";
+	public const string LISTS_SET_INDEX_TOOLTIP_SET_FROM = "リスト内の指定された位置に項目を設定します。";
+	public const string LISTS_SET_INDEX_TOOLTIP_SET_LAST = "リスト内の最後の項目を設定します。";
+	public const string LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "リスト内にランダムなアイテムを設定します。";
+	public const string LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";  // untranslated
+	public const string LISTS_SORT_ORDER_ASCENDING = "昇順";
+	public const string LISTS_SORT_ORDER_DESCENDING = "降順";
+	public const string LISTS_SORT_TITLE = "sort %1 %2 %3";  // untranslated
+	public const string LISTS_SORT_TOOLTIP = "Sort a copy of a list.";  // untranslated
+	public const string LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case";  // untranslated
+	public const string LISTS_SORT_TYPE_NUMERIC = "numeric";  // untranslated
+	public const string LISTS_SORT_TYPE_TEXT = "alphabetic";  // untranslated
+	public const string LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";  // untranslated
+	public const string LISTS_SPLIT_LIST_FROM_TEXT = "テキストからリストを作る";
+	public const string LISTS_SPLIT_TEXT_FROM_LIST = "リストからテキストを作る";
+	public const string LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, separated by a delimiter.";  // untranslated
+	public const string LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter.";  // untranslated
+	public const string LISTS_SPLIT_WITH_DELIMITER = "with delimiter";  // untranslated
+	public const string LOGIC_BOOLEAN_FALSE = "false";
+	public const string LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values";  // untranslated
+	public const string LOGIC_BOOLEAN_TOOLTIP = "True または false を返します。";
+	public const string LOGIC_BOOLEAN_TRUE = "true";
+	public const string LOGIC_COMPARE_HELPURL = "https://ja.wikipedia.org/wiki/不等式";
+	public const string LOGIC_COMPARE_TOOLTIP_EQ = "もし両方がお互いに等しく入力した場合は true を返します。";
+	public const string LOGIC_COMPARE_TOOLTIP_GT = "最初の入力が 2 番目の入力よりも大きい場合は true を返します。";
+	public const string LOGIC_COMPARE_TOOLTIP_GTE = "もし入力がふたつめの入よりも大きかったらtrueをり返します。";
+	public const string LOGIC_COMPARE_TOOLTIP_LT = "最初の入力が 2 番目の入力よりも小さいい場合は true を返します。";
+	public const string LOGIC_COMPARE_TOOLTIP_LTE = "もし、最初の入力が二つ目入力より少ないか、おなじであったらTRUEをかえしてください";
+	public const string LOGIC_COMPARE_TOOLTIP_NEQ = "両方の入力が互いに等しくない場合に true を返します。";
+	public const string LOGIC_NEGATE_HELPURL = "https://ja.wikipedia.org/wiki/否定";
+	public const string LOGIC_NEGATE_TITLE = "%1 ではないです。";
+	public const string LOGIC_NEGATE_TOOLTIP = "入力が false の場合は、true を返します。入力が true の場合は false を返します。";
+	public const string LOGIC_NULL = "null";
+	public const string LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type";
+	public const string LOGIC_NULL_TOOLTIP = "Null を返します。";
+	public const string LOGIC_OPERATION_AND = "そして";
+	public const string LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations";  // untranslated
+	public const string LOGIC_OPERATION_OR = "または";
+	public const string LOGIC_OPERATION_TOOLTIP_AND = "両方の入力が同じ場合は true を返します。";
+	public const string LOGIC_OPERATION_TOOLTIP_OR = "最低少なくとも 1 つの入力が true の場合は true を返します。";
+	public const string LOGIC_TERNARY_CONDITION = "テスト";
+	public const string LOGIC_TERNARY_HELPURL = "https://ja.wikipedia.org/wiki/%3F:";
+	public const string LOGIC_TERNARY_IF_FALSE = "false の場合";
+	public const string LOGIC_TERNARY_IF_TRUE = "true の場合";
+	public const string LOGIC_TERNARY_TOOLTIP = "'テスト' の条件をチェックします。条件が true の場合、'true' の値を返します。それ以外の場合 'false' のを返します。";
+	public const string MATH_ADDITION_SYMBOL = "+";
+	public const string MATH_ARITHMETIC_HELPURL = "https://ja.wikipedia.org/wiki/算術";
+	public const string MATH_ARITHMETIC_TOOLTIP_ADD = "2 つの数の合計を返します。";
+	public const string MATH_ARITHMETIC_TOOLTIP_DIVIDE = "2 つの数の商を返します。";
+	public const string MATH_ARITHMETIC_TOOLTIP_MINUS = "2 つの数の差を返します。";
+	public const string MATH_ARITHMETIC_TOOLTIP_MULTIPLY = "2 つの数の積を返します。";
+	public const string MATH_ARITHMETIC_TOOLTIP_POWER = "最初の数を2 番目の値で累乗した結果を返します。";
+	public const string MATH_CHANGE_HELPURL = "https://ja.wikipedia.org/wiki/加法";
+	public const string MATH_CHANGE_TITLE = "変更 %1 に %2";
+	public const string MATH_CHANGE_TITLE_ITEM = VARIABLES_DEFAULT_NAME;
+	public const string MATH_CHANGE_TOOLTIP = "'%1' をたします。";
+	public const string MATH_CONSTANT_HELPURL = "https://ja.wikipedia.org/wiki/数学定数";
+	public const string MATH_CONSTANT_TOOLTIP = "いずれかの共通の定数のを返す: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (無限).";
+	public const string MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29";  // untranslated
+	public const string MATH_CONSTRAIN_TITLE = "制限%1下リミット%2上限リミット%3";
+	public const string MATH_CONSTRAIN_TOOLTIP = "値を、上限 x と下限 y の間に制限する（上限と下限が、x と  y　とに同じ場合は、上限の値は　x, 下限の値はy）。";
+	public const string MATH_DIVISION_SYMBOL = "÷";
+	public const string MATH_IS_DIVISIBLE_BY = "割り切れる";
+	public const string MATH_IS_EVEN = "わ偶数";
+	public const string MATH_IS_NEGATIVE = "負の値";
+	public const string MATH_IS_ODD = "奇数です。";
+	public const string MATH_IS_POSITIVE = "正の値";
+	public const string MATH_IS_PRIME = "素数です";
+	public const string MATH_IS_TOOLTIP = "数字が、偶数、奇数、素数、整数、正数、負数、またはそれが特定の数で割り切れる場合かどうかを確認してください。どの制限が一つでも本当でしたら true をかえしてください、そうでない場合わ falseを返してください。";
+	public const string MATH_IS_WHOLE = "は整数";
+	public const string MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation";
+	public const string MATH_MODULO_TITLE = "残りの %1 ÷ %2";
+	public const string MATH_MODULO_TOOLTIP = "2つの数値を除算した余りを返します。";
+	public const string MATH_MULTIPLICATION_SYMBOL = "×";
+	public const string MATH_NUMBER_HELPURL = "https://ja.wikipedia.org/wiki/数";
+	public const string MATH_NUMBER_TOOLTIP = "数です。";
+	public const string MATH_ONLIST_HELPURL = "";
+	public const string MATH_ONLIST_OPERATOR_AVERAGE = "リストの平均";
+	public const string MATH_ONLIST_OPERATOR_MAX = "リストの最大値";
+	public const string MATH_ONLIST_OPERATOR_MEDIAN = "リストの中央値";
+	public const string MATH_ONLIST_OPERATOR_MIN = "リストの最小の数";
+	public const string MATH_ONLIST_OPERATOR_MODE = "一覧モード";
+	public const string MATH_ONLIST_OPERATOR_RANDOM = "リストのランダム アイテム";
+	public const string MATH_ONLIST_OPERATOR_STD_DEV = "リストの標準偏差";
+	public const string MATH_ONLIST_OPERATOR_SUM = "リストの合計";
+	public const string MATH_ONLIST_TOOLTIP_AVERAGE = "リストの数値の平均 (算術平均) を返します。";
+	public const string MATH_ONLIST_TOOLTIP_MAX = "リストの最大数を返します。";
+	public const string MATH_ONLIST_TOOLTIP_MEDIAN = "リストの中央値の数を返します。";
+	public const string MATH_ONLIST_TOOLTIP_MIN = "リストの最小数を返します。";
+	public const string MATH_ONLIST_TOOLTIP_MODE = "リストで最も一般的な項目のリストを返します。";
+	public const string MATH_ONLIST_TOOLTIP_RANDOM = "リストからランダムに要素を返します。";
+	public const string MATH_ONLIST_TOOLTIP_STD_DEV = "リウトの標準偏差をかえす";
+	public const string MATH_ONLIST_TOOLTIP_SUM = "全部リストの数をたして返す";
+	public const string MATH_POWER_SYMBOL = "^";
+	public const string MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation";
+	public const string MATH_RANDOM_FLOAT_TITLE_RANDOM = "ランダムな分数";
+	public const string MATH_RANDOM_FLOAT_TOOLTIP = "ランダムな分数を返すー0.0 (包括) の間のと 1.0 (排他的な)。";
+	public const string MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation";
+	public const string MATH_RANDOM_INT_TITLE = "%1 から %2 への無作為の整数";
+	public const string MATH_RANDOM_INT_TOOLTIP = "指定した下限の間、無作為なランダムな整数を返します。";
+	public const string MATH_ROUND_HELPURL = "https://ja.wikipedia.org/wiki/端数処理";
+	public const string MATH_ROUND_OPERATOR_ROUND = "概数";
+	public const string MATH_ROUND_OPERATOR_ROUNDDOWN = "端数を切り捨てる";
+	public const string MATH_ROUND_OPERATOR_ROUNDUP = "数値を切り上げ";
+	public const string MATH_ROUND_TOOLTIP = "数値を切り上げるか切り捨てる";
+	public const string MATH_SINGLE_HELPURL = "https://ja.wikipedia.org/wiki/平方根";
+	public const string MATH_SINGLE_OP_ABSOLUTE = "絶対値";
+	public const string MATH_SINGLE_OP_ROOT = "平方根";
+	public const string MATH_SINGLE_TOOLTIP_ABS = "絶対値を返す";
+	public const string MATH_SINGLE_TOOLTIP_EXP = "数値の e 粂を返す";
+	public const string MATH_SINGLE_TOOLTIP_LN = "数値の自然対数をかえしてください";
+	public const string MATH_SINGLE_TOOLTIP_LOG10 = "log 10 を返す。";
+	public const string MATH_SINGLE_TOOLTIP_NEG = "負の数を返す";
+	public const string MATH_SINGLE_TOOLTIP_POW10 = "１０の　x　乗";
+	public const string MATH_SINGLE_TOOLTIP_ROOT = "平方根を返す";
+	public const string MATH_SUBTRACTION_SYMBOL = "-";
+	public const string MATH_TRIG_ACOS = "acos";
+	public const string MATH_TRIG_ASIN = "asin";
+	public const string MATH_TRIG_ATAN = "atan";
+	public const string MATH_TRIG_COS = "cos";
+	public const string MATH_TRIG_HELPURL = "https://ja.wikipedia.org/wiki/三角関数";
+	public const string MATH_TRIG_SIN = "sin";
+	public const string MATH_TRIG_TAN = "tan";
+	public const string MATH_TRIG_TOOLTIP_ACOS = "arccosine の値を返す";
+	public const string MATH_TRIG_TOOLTIP_ASIN = "番号のarcsine を返すます";
+	public const string MATH_TRIG_TOOLTIP_ATAN = "番号のarctangent を返すます";
+	public const string MATH_TRIG_TOOLTIP_COS = "番号のcosineの次数を返す";
+	public const string MATH_TRIG_TOOLTIP_SIN = "番号のsineの次数を返す";
+	public const string MATH_TRIG_TOOLTIP_TAN = "番号のtangentの次数を返す";
+	public const string NEW_VARIABLE = "新しい変数";
+	public const string NEW_VARIABLE_TITLE = "新しい変数の、名前";
+	public const string ORDINAL_NUMBER_SUFFIX = "";
+	public const string PROCEDURES_ALLOW_STATEMENTS = "allow statements";  // untranslated
+	public const string PROCEDURES_BEFORE_PARAMS = "で。";
+	public const string PROCEDURES_CALLNORETURN_HELPURL = "https://ja.wikipedia.org/wiki/サブルーチン";
+	public const string PROCEDURES_CALLNORETURN_TOOLTIP = "ユーザー定義関数 '%1' を実行します。";
+	public const string PROCEDURES_CALLRETURN_HELPURL = "https://ja.wikipedia.org/wiki/サブルーチン";
+	public const string PROCEDURES_CALLRETURN_TOOLTIP = "ユーザー定義関数 '%1' を実行し、その出力を使用します。";
+	public const string PROCEDURES_CALL_BEFORE_PARAMS = "で。";
+	public const string PROCEDURES_CREATE_DO = "%1をつくる";
+	public const string PROCEDURES_DEFNORETURN_COMMENT = "Describe this function...";  // untranslated
+	public const string PROCEDURES_DEFNORETURN_DO = "";
+	public const string PROCEDURES_DEFNORETURN_HELPURL = "https://ja.wikipedia.org/wiki/サブルーチン";
+	public const string PROCEDURES_DEFNORETURN_PROCEDURE = "何かしてください";
+	public const string PROCEDURES_DEFNORETURN_TITLE = "宛先";
+	public const string PROCEDURES_DEFNORETURN_TOOLTIP = "出力なしで関数を作成します。";
+	public const string PROCEDURES_DEFRETURN_COMMENT = PROCEDURES_DEFNORETURN_COMMENT;
+	public const string PROCEDURES_DEFRETURN_HELPURL = "https://ja.wikipedia.org/wiki/サブルーチン";
+	public const string PROCEDURES_DEFRETURN_PROCEDURE = PROCEDURES_DEFNORETURN_PROCEDURE;
+	public const string PROCEDURES_DEFRETURN_RETURN = "返す";
+	public const string PROCEDURES_DEFRETURN_TITLE = PROCEDURES_DEFNORETURN_TITLE;
+	public const string PROCEDURES_DEFRETURN_TOOLTIP = "出力を持つ関数を作成します。";
+	public const string PROCEDURES_DEF_DUPLICATE_WARNING = "警告: この関数は、重複するパラメーターがあります。";
+	public const string PROCEDURES_HIGHLIGHT_DEF = "関数の内容を強調表示します。";
+	public const string PROCEDURES_IFRETURN_HELPURL = "http://c2.com/cgi/wiki?GuardClause";  // untranslated
+	public const string PROCEDURES_IFRETURN_TOOLTIP = "1番目値が true の場合、2 番目の値を返します。";
+	public const string PROCEDURES_IFRETURN_WARNING = "警告: このブロックは、関数定義内でのみ使用できます。";
+	public const string PROCEDURES_MUTATORARG_TITLE = "入力名:";
+	public const string PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function.";  // untranslated
+	public const string PROCEDURES_MUTATORCONTAINER_TITLE = "入力";
+	public const string PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function.";  // untranslated
+	public const string REDO = "やり直し";
+	public const string REMOVE_COMMENT = "コメントを削除";
+	public const string RENAME_VARIABLE = "変数の名前を変更.";
+	public const string RENAME_VARIABLE_TITLE = "%1の変数すべてを名前変更します。";
+	public const string TEXT_APPEND_APPENDTEXT = "テキストを追加します。";
+	public const string TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification";  // untranslated
+	public const string TEXT_APPEND_TO = "宛先";
+	public const string TEXT_APPEND_TOOLTIP = "変数 '%1' にいくつかのテキストを追加します。";
+	public const string TEXT_APPEND_VARIABLE = VARIABLES_DEFAULT_NAME;
+	public const string TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case";  // untranslated
+	public const string TEXT_CHANGECASE_OPERATOR_LOWERCASE = "小文字に";
+	public const string TEXT_CHANGECASE_OPERATOR_TITLECASE = "タイトル ケースに";
+	public const string TEXT_CHANGECASE_OPERATOR_UPPERCASE = "大文字に変換する";
+	public const string TEXT_CHANGECASE_TOOLTIP = "別のケースに、テキストのコピーを返します。";
+	public const string TEXT_CHARAT_FIRST = "最初の文字を得る";
+	public const string TEXT_CHARAT_FROM_END = "一番最後の言葉、キャラクターを所得";
+	public const string TEXT_CHARAT_FROM_START = "文字# を取得";
+	public const string TEXT_CHARAT_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-text";  // untranslated
+	public const string TEXT_CHARAT_INPUT_INTEXT = "テキストで";
+	public const string TEXT_CHARAT_LAST = "最後の文字を得る";
+	public const string TEXT_CHARAT_RANDOM = "ランダムな文字を得る";
+	public const string TEXT_CHARAT_TAIL = "";
+	public const string TEXT_CHARAT_TOOLTIP = "指定された位置に文字を返します。";
+	public const string TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = VARIABLES_DEFAULT_NAME;
+	public const string TEXT_CREATE_JOIN_ITEM_TOOLTIP = "テキスト をアイテム追加します。";
+	public const string TEXT_CREATE_JOIN_TITLE_JOIN = "結合";
+	public const string TEXT_CREATE_JOIN_TOOLTIP = "追加、削除、またはセクションを順序変更して、ブロックを再構成します。";
+	public const string TEXT_GET_SUBSTRING_END_FROM_END = "文字列の＃ 終わりからの＃";
+	public const string TEXT_GET_SUBSTRING_END_FROM_START = "# の文字";
+	public const string TEXT_GET_SUBSTRING_END_LAST = "最後のの文字";
+	public const string TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text";  // untranslated
+	public const string TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "テキストで";
+	public const string TEXT_GET_SUBSTRING_START_FIRST = "部分文字列を取得する。";
+	public const string TEXT_GET_SUBSTRING_START_FROM_END = "部分文字列を取得する #端から得る";
+	public const string TEXT_GET_SUBSTRING_START_FROM_START = "文字列からの部分文字列を取得 ＃";
+	public const string TEXT_GET_SUBSTRING_TAIL = "";
+	public const string TEXT_GET_SUBSTRING_TOOLTIP = "テキストの指定部分を返します。";
+	public const string TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text";  // untranslated
+	public const string TEXT_INDEXOF_INPUT_INTEXT = "テキストで";
+	public const string TEXT_INDEXOF_OPERATOR_FIRST = "テキストの最初の出現箇所を検索します。";
+	public const string TEXT_INDEXOF_OPERATOR_LAST = "テキストの最後に見つかったを検索します。";
+	public const string TEXT_INDEXOF_TAIL = "";
+	public const string TEXT_INDEXOF_TOOLTIP = "最初のテキストの二番目のてきすとの、最初と最後の、出現したインデックスをかえします。テキストが見つからない場合は %1 を返します。";
+	public const string TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text";  // untranslated
+	public const string TEXT_ISEMPTY_TITLE = "%1 が空";
+	public const string TEXT_ISEMPTY_TOOLTIP = "指定されたテキストが空の場合は、true を返します。";
+	public const string TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation";  // untranslated
+	public const string TEXT_JOIN_TITLE_CREATEWITH = "テキストを作成します。";
+	public const string TEXT_JOIN_TOOLTIP = "任意の数の項目一部を一緒に接合してテキストの作成します。";
+	public const string TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification";  // untranslated
+	public const string TEXT_LENGTH_TITLE = "%1 の長さ";
+	public const string TEXT_LENGTH_TOOLTIP = "指定されたテキストの文字 (スペースを含む) の数を返します。";
+	public const string TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text";  // untranslated
+	public const string TEXT_PRINT_TITLE = "%1 を印刷します。";
+	public const string TEXT_PRINT_TOOLTIP = "指定したテキスト、番号または他の値を印刷します。";
+	public const string TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user";  // untranslated
+	public const string TEXT_PROMPT_TOOLTIP_NUMBER = "ユーザーにプロンプトで数字のインプットを求めます";
+	public const string TEXT_PROMPT_TOOLTIP_TEXT = "ユーザーにプロンプトでテキストのインプットを求めます";
+	public const string TEXT_PROMPT_TYPE_NUMBER = "プロンプトで数字の入力を求める";
+	public const string TEXT_PROMPT_TYPE_TEXT = "プロンプトでテキストの入力を求める";
+	public const string TEXT_TEXT_HELPURL = "https://ja.wikipedia.org/wiki/文字列";
+	public const string TEXT_TEXT_TOOLTIP = "文字、単語、または行のテキスト。";
+	public const string TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces";  // untranslated
+	public const string TEXT_TRIM_OPERATOR_BOTH = "両端のスペースを取り除く";
+	public const string TEXT_TRIM_OPERATOR_LEFT = "左端のスペースを取り除く";
+	public const string TEXT_TRIM_OPERATOR_RIGHT = "右端のスペースを取り除く";
+	public const string TEXT_TRIM_TOOLTIP = "スペースを 1 つまたは両方の端から削除したのち、テキストのコピーを返します。";
+	public const string TODAY = "今日";
+	public const string UNDO = "取り消し";
+	public const string VARIABLES_DEFAULT_NAME = "項目";
+	public const string VARIABLES_GET_CREATE_SET = "'セット%1を作成します。";
+	public const string VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get";  // untranslated
+	public const string VARIABLES_GET_TOOLTIP = "この変数の値を返します。";
+	public const string VARIABLES_SET = "セット %1 宛先 %2";
+	public const string VARIABLES_SET_CREATE_GET = "'%1 を取得' を作成します。";
+	public const string VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set";  // untranslated
+	public const string VARIABLES_SET_TOOLTIP = "この入力を変数と等しくなるように設定します。";
+	public const string VARIABLE_ALREADY_EXISTS = "変数名 '%1' は既に存在しています。";
+	public const string VIEWS_MAIN_MENU_VIEW_LOAD_ERROR = "{$filename}{$error}";
+	public const string VIEWS_MAIN_MENU_VIEW_LOAD_SUCCEEDED = "ロードしました";
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Blockly.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Blockly.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Blockly.cs	(revision 270)
@@ -0,0 +1,2726 @@
+﻿/**
+ * @license
+ * Visual Blocks Editor
+ *
+ * Copyright 2012 Google Inc.
+ * https://developers.google.com/blockly/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+using System.Collections.Generic;
+using Bridge;
+using Bridge.Html5;
+
+namespace WebMrbc
+{
+	/**
+	 * @fileoverview Core JavaScript library for Blockly.
+	 * @author fraser@google.com (Neil Fraser)
+	 */
+	[External, Name("Blockly")]
+	public partial class Blockly
+	{
+		[Name(false)]
+		public static Xml Xml;
+		[Name(false)]
+		public static Events Events;
+		[Name(false)]
+		public static Procedures Procedures;
+		[Name(false)]
+		public static Variables Variables;
+		[Name(false)]
+		public static Names Names;
+
+		/// <summary>
+		/// Number of pixels the mouse must move before a drag starts.
+		/// </summary>
+		[Name(false)]
+		public static int DRAG_RADIUS = 5;
+
+		/// <summary>
+		/// Maximum misalignment between connections for them to snap together.
+		/// </summary>
+		[Name(false)]
+		public static int SNAP_RADIUS = 20;
+
+		/// <summary>
+		/// Delay in ms between trigger and bumping unconnected block out of alignment.
+		/// </summary>
+		[Name(false)]
+		public static int BUMP_DELAY = 250;
+
+		/// <summary>
+		/// Number of characters to truncate a collapsed block to.
+		/// </summary>
+		[Name(false)]
+		public static int COLLAPSE_CHARS = 30;
+
+		/// <summary>
+		/// Length in ms for a touch to become a long press.
+		/// </summary>
+		[Name(false)]
+		public static int LONGPRESS = 750;
+
+		/// <summary>
+		/// Prevent a sound from playing if another sound preceded it within this many
+		/// miliseconds.
+		/// </summary>
+		[Name(false)]
+		public static int SOUND_LIMIT = 100;
+
+		/// <summary>
+		/// The richness of block colours, regardless of the hue.
+		/// Must be in the range of 0 (inclusive) to 1 (exclusive).
+		/// </summary>
+		[Name(false)]
+		public static double HSV_SATURATION = 0.45;
+
+		/// <summary>
+		/// The intensity of block colours, regardless of the hue.
+		/// Must be in the range of 0 (inclusive) to 1 (exclusive).
+		/// </summary>
+		[Name(false)]
+		public static double HSV_VALUE = 0.65;
+
+		/// <summary>
+		/// Sprited icons and images.
+		/// </summary>
+		[Name(false)]
+		public static object SPRITE = new {
+			width = 96,
+			height = 124,
+			url = "sprites.png"
+		};
+
+		/// <summary>
+		/// Required name space for SVG elements.
+		/// </summary>
+		[Name(false)]
+		public static readonly string SVG_NS = "http://www.w3.org/2000/svg";
+
+		/// <summary>
+		/// Required name space for HTML elements.
+		/// </summary>
+		[Name(false)]
+		public static readonly string HTML_NS = "http://www.w3.org/1999/xhtml";
+
+		/// <summary>
+		/// ENUM for a right-facing value input.  E.g. 'set item to' or 'return'.
+		/// </summary>
+		[Name(false)]
+		public static int INPUT_VALUE = 1;
+
+		/// <summary>
+		/// ENUM for a left-facing value output.  E.g. 'random fraction'.
+		/// </summary>
+		[Name(false)]
+		public static int OUTPUT_VALUE = 2;
+
+		/// <summary>
+		/// ENUM for a down-facing block stack.  E.g. 'if-do' or 'else'.
+		/// </summary>
+		[Name(false)]
+		public static int NEXT_STATEMENT = 3;
+
+		/// <summary>
+		/// ENUM for an up-facing block stack.  E.g. 'break out of loop'.
+		/// </summary>
+		[Name(false)]
+		public static int PREVIOUS_STATEMENT = 4;
+
+		/// <summary>
+		/// ENUM for an dummy input.  Used to add field(s) with no input.
+		/// </summary>
+		[Name(false)]
+		public static int DUMMY_INPUT = 5;
+
+		/// <summary>
+		/// ENUM for left alignment.
+		/// </summary>
+		[Name(false)]
+		public static int ALIGN_LEFT = -1;
+
+		/// <summary>
+		/// ENUM for centre alignment.
+		/// </summary>
+		[Name(false)]
+		public static int ALIGN_CENTRE = 0;
+
+		/// <summary>
+		/// ENUM for right alignment.
+		/// </summary>
+		[Name(false)]
+		public static int ALIGN_RIGHT = 1;
+
+		/// <summary>
+		/// ENUM for no drag operation.
+		/// </summary>
+		[Name(false)]
+		public static int DRAG_NONE = 0;
+
+		/// <summary>
+		/// ENUM for inside the sticky DRAG_RADIUS.
+		/// </summary>
+		[Name(false)]
+		public static int DRAG_STICKY = 1;
+
+		/// <summary>
+		/// ENUM for inside the non-sticky DRAG_RADIUS, for differentiating between
+		/// clicks and drags.
+		/// </summary>
+		[Name(false)]
+		public static int DRAG_BEGIN = 1;
+
+		/// <summary>
+		/// ENUM for freely draggable (outside the DRAG_RADIUS, if one applies).
+		/// </summary>
+		[Name(false)]
+		public static int DRAG_FREE = 2;
+
+		/// <summary>
+		/// Lookup table for determining the opposite type of a connection.
+		/// </summary>
+		[Name(false)]
+		public static int[] OPPOSITE_TYPE = {
+			0,
+			OUTPUT_VALUE,
+			INPUT_VALUE,
+			PREVIOUS_STATEMENT,
+			NEXT_STATEMENT
+		};
+
+		/// <summary>
+		/// ENUM for toolbox and flyout at top of screen.
+		/// </summary>
+		[Name(false)]
+		public static int TOOLBOX_AT_TOP = 0;
+
+		/// <summary>
+		/// ENUM for toolbox and flyout at bottom of screen.
+		/// </summary>
+		[Name(false)]
+		public static int TOOLBOX_AT_BOTTOM = 1;
+
+		/// <summary>
+		/// ENUM for toolbox and flyout at left of screen.
+		/// </summary>
+		[Name(false)]
+		public static int TOOLBOX_AT_LEFT = 2;
+
+		/// <summary>
+		/// ENUM for toolbox and flyout at right of screen.
+		/// </summary>
+		[Name(false)]
+		public static int TOOLBOX_AT_RIGHT = 3;
+
+		/// <summary>
+		/// The main workspace most recently used.
+		/// Set by Blockly.WorkspaceSvg.prototype.markFocused
+		/// </summary>
+		public static WorkspaceSvg mainWorkspace;
+
+		/// <summary>
+		/// Currently selected block.
+		/// </summary>
+		public static Block selected;
+
+		[Name(false)]
+		public static Blocks Blocks;
+
+		/// <summary>
+		/// Register a callback function associated with a given key, for clicks on
+		/// buttons and labels in the flyout.
+		/// For instance, a button specified by the XML
+		/// <button text="create variable" callbackKey="CREATE_VARIABLE"></button>
+		/// should be matched by a call to
+		/// registerButtonCallback("CREATE_VARIABLE", yourCallbackFunction).
+		/// </summary>
+		/// <param name="key">The name to use to look up this function.</param>
+		/// <param name="func">The function to call when the
+		/// given button is clicked.</param>
+		internal static void registerButtonCallback(string key, Action<FlyoutButton> func)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Convert a hue (HSV model) into an RGB hex triplet.
+		/// </summary>
+		/// <param name="hue">Hue on a colour wheel (0-360).</param>
+		/// <returns>RGB code, e.g. '#5ba65b'.</returns>
+		public static string hueToRgb(int hue)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Returns the dimensions of the specified SVG image.
+		/// </summary>
+		/// <param name="svg">SVG image.</param>
+		/// <returns>Contains width and height properties.</returns>
+		public static goog.math.Size svgSize(Element svg)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Size the workspace when the contents change.  This also updates
+		/// scrollbars accordingly.
+		/// </summary>
+		/// <param name="workspace"></param>
+		public static void resizeSvgContents(WorkspaceSvg workspace)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Size the SVG image to completely fill its container. Call this when the view
+		/// actually changes sizes (e.g. on a window resize/device orientation change).
+		/// See Blockly.resizeSvgContents to resize the workspace when the contents
+		/// change (e.g. when a block is added or removed).
+		/// Record the height/width of the SVG image.
+		/// </summary>
+		/// <param name="workspace">Any workspace in the SVG.</param>
+		public static void svgResize(WorkspaceSvg workspace)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Close tooltips, context menus, dropdown selections, etc.
+		/// </summary>
+		/// <param name="opt_allowToolbox">If true, don't close the toolbox.</param>
+		public static void hideChaff(bool opt_allowToolbox = false)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// When something in Blockly's workspace changes, call a function.
+		/// </summary>
+		/// <param name="func">Function to call.</param>
+		/// <returns>Opaque data that can be passed to removeChangeListener.</returns>
+		public static Action<Abstract> addChangeListener(Action<Abstract> func)
+		{
+			// Backwards compatability from before there could be multiple workspaces.
+			App.WriteLine("Deprecated call to Blockly.addChangeListener, " +
+						 "use workspace.addChangeListener instead.");
+			return getMainWorkspace().addChangeListener(func);
+		}
+
+		/// <summary>
+		/// Returns the main workspace.  Returns the last used main workspace (based on
+		/// focus).  Try not to use this function, particularly if there are multiple
+		/// Blockly instances on a page.
+		/// </summary>
+		/// <returns>The main workspace.</returns>
+		public static WorkspaceSvg getMainWorkspace()
+		{
+			return mainWorkspace;
+		}
+
+		/// <summary>
+		/// Wrapper to window.alert() that app developers may override to
+		/// provide alternatives to the modal browser window.
+		/// </summary>
+		/// <param name="message">The message to display to the user.</param>
+		/// <param name="opt_callback">The callback when the alert is dismissed.</param>
+		internal static void alert(string message, Action opt_callback = null)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Wrapper to window.prompt() that app developers may override to provide
+		/// alternatives to the modal browser window. Built-in browser prompts are
+		/// often used for better text input experience on mobile device. We strongly
+		/// recommend testing mobile when overriding this.
+		/// </summary>
+		/// <param name="message">The message to display to the user.</param>
+		/// <param name="defaultValue">The value to initialize the prompt with.</param>
+		/// <param name="callback">The callback for handling user reponse.</param>
+		internal static void prompt(string message, string defaultValue, Action<string> callback)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Inject a Blockly editor into the specified container element (usually a div).
+		/// </summary>
+		/// <param name="container">Containing element, or its ID, or a CSS selector.</param>
+		/// <param name="opt_options">opt_options Optional dictionary of options.</param>
+		/// <returns>Newly created main workspace.</returns>
+		public static WorkspaceSvg inject(Union<string, Element> container, object opt_options = null)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Modify the block tree on the existing toolbox.
+		/// </summary>
+		/// <param name="tree">DOM tree of blocks, or text representation of same.</param>
+		public static void updateToolbox(Union<Node, string> tree)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Don't do anything for this event, just halt propagation.
+		/// </summary>
+		/// <param name="e">An event.</param>
+		public static void noEvent(Event e)
+		{
+			// This event has been handled.  No need to bubble up to the document.
+			e.PreventDefault();
+			e.StopPropagation();
+		}
+
+		/// <summary>
+		/// Helper method for creating SVG elements.
+		/// </summary>
+		/// <param name="name">Element's tag name.</param>
+		/// <param name="attrs">Dictionary of attribute names and values.</param>
+		/// <param name="parent">Optional parent on which to append the element.</param>
+		/// <param name="opt_workspace">Optional workspace for access to context (scale...).</param>
+		/// <returns>Newly created SVG element.</returns>
+		public static Element createSvgElement(string name, object attrs, Element parent, Workspace opt_workspace)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Is this event a right-click?
+		/// </summary>
+		/// <param name="e">Mouse event.</param>
+		/// <returns>True if right-click.</returns>
+		public static bool isRightButton(Event e)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Return the converted coordinates of the given mouse event.
+		/// The origin (0,0) is the top-left corner of the Blockly svg.
+		/// </summary>
+		/// <param name="e">Mouse event.</param>
+		/// <param name="svg">SVG element.</param>
+		/// <param name="matrix">Inverted screen CTM to use.</param>
+		/// <returns>Object with .x and .y properties.</returns>
+		public static goog.math.Coordinate mouseToSvg(Event e, Element svg, SVGMatrix matrix)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Given an array of strings, return the length of the shortest one.
+		/// </summary>
+		/// <param name="array">Array of strings.</param>
+		/// <returns>Length of shortest string.</returns>
+		public static int shortestStringLength(string[] array)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Given an array of strings, return the length of the common prefix.
+		/// Words may not be split.  Any space after a word is included in the length.
+		/// </summary>
+		/// <param name="array">Array of strings.</param>
+		/// <param name="opt_shortest">Length of shortest string.</param>
+		/// <returns>Length of common prefix.</returns>
+		public static int commonWordPrefix(string[] array, int opt_shortest = 0)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Given an array of strings, return the length of the common suffix.
+		/// Words may not be split.  Any space after a word is included in the length.
+		/// </summary>
+		/// <param name="array">Array of strings.</param>
+		/// <param name="opt_shortest">Length of shortest string.</param>
+		/// <returns>Length of common suffix.</returns>
+		public static int commonWordSuffix(string[] array, int opt_shortest = 0)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Is the given string a number (includes negative and decimals).
+		/// </summary>
+		/// <param name="str">Input string.</param>
+		/// <returns>True if number, false otherwise.</returns>
+		public static bool isNumber(string str)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Parse a string with any number of interpolation tokens (%1, %2, ...).
+		/// '%' characters may be self-escaped (%%).
+		/// </summary>
+		/// <param name="message">Text containing interpolation tokens.</param>
+		/// <returns>Array of strings and numbers.</returns>
+		public static Union<string, int> tokenizeInterpolation(string message)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Generate a unique ID.  This should be globally unique.
+		/// 87 characters ^ 20 length > 128 bits (better than a UUID).
+		/// </summary>
+		/// <returns>A globally unique ID string.</returns>
+		public static string genUid()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Wrap text to the specified width.
+		/// </summary>
+		/// <param name="text">Text to wrap.</param>
+		/// <param name="wrap">Width to wrap each line.</param>
+		/// <returns></returns>
+		public static string wrap(string text, int wrap)
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	[External, Name("Blockly.Xml")]
+	public class Xml
+	{
+		/// <summary>
+		/// Encode a block tree as XML.
+		/// </summary>
+		/// <param name="workspace">workspace The workspace containing blocks.</param>
+		/// <returns>XML document.</returns>
+		public Element workspaceToDom(Workspace workspace)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Encode a block subtree as XML with XY coordinates.
+		/// </summary>
+		/// <param name="block">The root block to encode.</param>
+		/// <returns>Tree of XML elements.</returns>
+		public Element blockToDomWithXY(Block block)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Encode a block subtree as XML.
+		/// </summary>
+		/// <param name="block">The root block to encode.</param>
+		/// <returns>Tree of XML elements.</returns>
+		public Element blockToDom(Block block)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Converts a DOM structure into plain text.
+		/// Currently the text format is fairly ugly: all one line with no whitespace.
+		/// </summary>
+		/// <param name="dom">A tree of XML elements.</param>
+		/// <returns>Text representation.</returns>
+		public string domToText(Element dom)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Converts a DOM structure into properly indented text.
+		/// </summary>
+		/// <param name="dom">A tree of XML elements.</param>
+		/// <returns>Text representation.</returns>
+		public string domToPrettyText(Element dom)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Converts plain text into a DOM structure.
+		/// Throws an error if XML doesn't parse.
+		/// </summary>
+		/// <param name="text">Text representation.</param>
+		/// <returns>A tree of XML elements.</returns>
+		public Element textToDom(string text)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Decode an XML DOM and create blocks on the workspace.
+		/// </summary>
+		/// <param name="xml">XML DOM.</param>
+		/// <param name="workspace">The workspace.</param>
+		public void domToWorkspace(Element xml, Workspace workspace)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Decode an XML block tag and create a block (and possibly sub blocks) on the
+		/// workspace.
+		/// </summary>
+		/// <param name="xmlBlock">XML block element.</param>
+		/// <param name="workspace">The workspace.</param>
+		/// <returns>The root block created.</returns>
+		public Block domToBlock(Element xmlBlock, Workspace workspace)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Remove any 'next' block (statements in a stack).
+		/// </summary>
+		/// <param name="xmlBlock">XML block element.</param>
+		public void deleteNext(Element xmlBlock)
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	/**
+	 * @fileoverview Object representing a workspace.
+	 * @author fraser@google.com (Neil Fraser)
+	 */
+	[External, Name("Blockly.Workspace")]
+	public class Workspace
+	{
+		public string id;
+		public Options options;
+		public bool RTL;
+		public bool horizontalLayout;
+		public int toolboxPosition;
+		public bool isFlyout;
+
+		/// <summary>
+		/// A list of all of the named variables in the workspace, including variables
+		/// that are not currently in use.
+		/// </summary>
+		public string[] variableList;
+
+		/// <summary>
+		/// Workspaces may be headless.
+		/// True if visible.  False if headless.
+		/// </summary>
+		public bool rendered;
+
+		/// <summary>
+		/// Maximum number of undo events in stack.
+		/// 0 to turn off undo, Infinity for unlimited.
+		/// </summary>
+		public int MAX_UNDO = 1024;
+
+		/// <summary>
+		/// Class for a workspace.  This is a data structure that contains blocks.
+		/// There is no UI, and can be created headlessly.
+		/// </summary>
+		/// <param name="opt_options">Dictionary of options.</param>
+		public Workspace(Options opt_options = null)
+		{
+			options = opt_options;
+		}
+
+		/// <summary>
+		/// Dispose of this workspace.
+		/// Unlink from all DOM elements to prevent memory leaks.
+		/// </summary>
+		public void dispose()
+		{
+
+		}
+
+		/// <summary>
+		/// Angle away from the horizontal to sweep for blocks.  Order of execution is
+		/// generally top to bottom, but a small angle changes the scan to give a bit of
+		/// a left to right bias (reversed in RTL).  Units are in degrees.
+		/// See: http://tvtropes.org/pmwiki/pmwiki.php/Main/DiagonalBilling.
+		/// </summary>
+		public int SCAN_ANGLE = 3;
+
+		/// <summary>
+		/// Add a block to the list of top blocks.
+		/// </summary>
+		/// <param name="block">Block to remove.</param>
+		public void addTopBlock(Block block)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Remove a block from the list of top blocks.
+		/// </summary>
+		/// <param name="block">Block to remove.</param>
+		public void removeTopBlock(Block block)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Finds the top-level blocks and returns them.  Blocks are optionally sorted
+		/// by position; top to bottom (with slight LTR or RTL bias).
+		/// </summary>
+		/// <param name="ordered">Sort the list if true.</param>
+		/// <returns>The top-level block objects.</returns>
+		public Block[] getTopBlocks(bool ordered)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Find all blocks in workspace.  No particular order.
+		/// </summary>
+		/// <returns></returns>
+		public Block[] getAllBlocks()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Dispose of all blocks in workspace.
+		/// </summary>
+		public void clear()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Returns the horizontal offset of the workspace.
+		/// Intended for LTR/RTL compatibility in XML.
+		/// Not relevant for a headless workspace.
+		/// </summary>
+		/// <returns>Width.</returns>
+		public int getWidth()
+		{
+			throw new NotImplementedException();
+		}
+
+
+		/// <summary>
+		/// Obtain a newly created block.
+		/// </summary>
+		/// <param name="prototypeName">Name of the language object containing
+		/// type-specific functions for this block.</param>
+		/// <param name="opt_id">Optional ID.  Use this ID if provided, otherwise
+		/// create a new id.</param>
+		/// <returns>The created block.</returns>
+		public Block newBlock(string prototypeName, string opt_id = null)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// The number of blocks that may be added to the workspace before reaching
+		/// the maxBlocks.
+		/// </summary>
+		/// <returns></returns>
+		public int remainingCapacity()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Undo or redo the previous action.
+		/// </summary>
+		/// <param name="redo">False if undo, true if redo.</param>
+		public void undo(bool redo)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Clear the undo/redo stacks.
+		/// </summary>
+		public void clearUndo()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// When something in this workspace changes, call a function.
+		/// </summary>
+		/// <param name="func">Function to call.</param>
+		/// <returns>Function that can be passed to
+		/// removeChangeListener.</returns>
+		public Action<Abstract> addChangeListener(Action<Abstract> func)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Stop listening for this workspace's changes.
+		/// </summary>
+		/// <param name="func">Function to stop calling.</param>
+		public void removeChangeListener(Action<Abstract> func)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Fire a change event.
+		/// </summary>
+		/// <param name="event">Event to fire.</param>
+		public void fireChangeListener(Abstract @event)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Find the block on this workspace with the specified ID.
+		/// </summary>
+		/// <param name="id">ID of block to find.</param>
+		/// <returns>The sought after block or null if not found.</returns>
+		public Block getBlockById(string id)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Find the workspace with the specified ID.
+		/// </summary>
+		/// <param name="id">ID of workspace to find.</param>
+		/// <returns>The sought after workspace or null if not found.</returns>
+		public Workspace getById(string id)
+		{
+			throw new NotImplementedException();
+		}
+
+		/**
+		 * Create a variable with the given name.
+		 * TODO: #468
+		 * @param {string} name The new variable's name.
+		 */
+		public void createVariable(string newText)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Check whether a variable exists with the given name.  The check is
+		/// case-insensitive.
+		/// </summary>
+		/// <param name="name">The name to check for.</param>
+		/// <returns>The index of the name in the variable list, or -1 if it is
+		/// not present.</returns>
+		internal int variableIndexOf(string name)
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	[External, Name("Blockly.WorkspaceSvg")]
+	public class WorkspaceSvg : Workspace
+	{
+		public WorkspaceSvg(Options options)
+			: base(options)
+		{
+		}
+
+		public Metrics getMetrics()
+		{
+			throw new NotImplementedException();
+		}
+
+		public void setMetrics(Metrics metrics)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Getter for the inverted screen CTM.
+		/// </summary>
+		/// <returns>The matrix to use in mouseToSvg</returns>
+		public SVGMatrix getInverseScreenCTM()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Update the inverted screen CTM.
+		/// </summary>
+		public void updateInverseScreenCTM()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Save resize handler data so we can delete it later in dispose.
+		/// </summary>
+		/// <param name="handler">Data that can be passed to unbindEvent_.</param>
+		public void setResizeHandlerWrapper(Action handler)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Create the workspace DOM elements.
+		/// </summary>
+		/// <param name="opt_backgroundClass">opt_backgroundClass Either 'blocklyMainBackground' or
+		/// 'blocklyMutatorBackground'.</param>
+		/// <returns>The workspace's SVG group.</returns>
+		public Element createDom(string opt_backgroundClass = null)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Dispose of this workspace.
+		/// Unlink from all DOM elements to prevent memory leaks.
+		/// </summary>
+		public new void dispose()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Obtain a newly created block.
+		/// </summary>
+		/// <param name="prototypeName">Name of the language object containing
+		/// type-specific functions for this block.</param>
+		/// <param name="opt_id">Optional ID.  Use this ID if provided, otherwise
+		/// create a new id.</param>
+		/// <returns>The created block.</returns>
+		public new BlockSvg newBlock(string prototypeName, string opt_id = null)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Resize the parts of the workspace that change when the workspace
+		/// contents (e.g. block positions) change.  This will also scroll the
+		/// workspace contents if needed.
+		/// </summary>
+		public void resizeContents()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Resize and reposition all of the workspace chrome (toolbox,
+		/// trash, scrollbars etc.)
+		/// This should be called when something changes that
+		/// requires recalculating dimensions and positions of the
+		/// trash, zoom, toolbox, etc. (e.g.window resize).
+		/// </summary>
+		public void resize()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Get the SVG element that forms the drawing surface.
+		/// </summary>
+		/// <returns>SVG element.</returns>
+		public Element getCanvas()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Get the SVG element that forms the bubble surface.
+		/// </summary>
+		/// <returns>SVG element.</returns>
+		public Element getBubbleCanvas()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Get the SVG element that contains this workspace.
+		/// </summary>
+		/// <returns>SVG element.</returns>
+		public Element getParentSvg()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Translate this workspace to new coordinates.
+		/// </summary>
+		/// <param name="x">Horizontal translation.</param>
+		/// <param name="y">Vertical translation.</param>
+		public void translate(int x, int y)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Returns the horizontal offset of the workspace.
+		/// Intended for LTR/RTL compatibility in XML.
+		/// </summary>
+		/// <returns>Width.</returns>
+		public new int getWidth()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Toggles the visibility of the workspace.
+		/// Currently only intended for main workspace.
+		/// </summary>
+		/// <param name="isVisible">True if workspace should be visible.</param>
+		public void setVisible(bool isVisible)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Render all blocks in workspace.
+		/// </summary>
+		public void render()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Turn the visual trace functionality on or off.
+		/// </summary>
+		/// <param name="armed">True if the trace should be on.</param>
+		public void traceOn(bool armed)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Highlight a block in the workspace.
+		/// </summary>
+		/// <param name="id">ID of block to find.</param>
+		public void highlightBlock(string id)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Paste the provided block onto the workspace.
+		/// </summary>
+		/// <param name="xmlBlock">XML block element.</param>
+		public void paste(Element xmlBlock)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Make a list of all the delete areas for this workspace.
+		/// </summary>
+		public void recordDeleteAreas()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Is the mouse event over a delete area (toolbox or non-closing flyout)?
+		/// Opens or closes the trashcan and sets the cursor as a side effect.
+		/// </summary>
+		/// <param name="e">Mouse move event.</param>
+		/// <returns></returns>
+		public bool isDeleteArea(Event e)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Start tracking a drag of an object on this workspace.
+		/// </summary>
+		/// <param name="e">Mouse down event.</param>
+		/// <param name="xy">Starting location of object.</param>
+		public void startDrag(Event e, goog.math.Coordinate xy)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Track a drag of an object on this workspace.
+		/// </summary>
+		/// <param name="e">Mouse move event.</param>
+		/// <returns>New location of object.</returns>
+		public goog.math.Coordinate moveDrag(Event e)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Is the user currently dragging a block or scrolling the flyout/workspace?
+		/// </summary>
+		/// <returns>True if currently dragging or scrolling.</returns>
+		public bool isDragging()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Calculate the bounding box for the blocks on the workspace.
+		/// </summary>
+		/// <returns>Contains the position and size of the bounding box
+		/// containing the blocks on the workspace.
+		/// {x: 0, y: 0, width: 0, height: 0}</returns>
+		public object getBlocksBoundingBox()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Play a named sound at specified volume.  If volume is not specified,
+		/// use full volume (1).
+		/// </summary>
+		/// <param name="name">Name of sound.</param>
+		/// <param name="opt_volume">Volume of sound (0-1).</param>
+		public void playAudio(string name, double opt_volume = 1)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Modify the block tree on the existing toolbox.
+		/// </summary>
+		/// <param name="tree">DOM tree of blocks, or text representation of same.</param>
+		public void updateToolbox(Union<Node, string> tree)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Mark this workspace as the currently focused main workspace.
+		/// </summary>
+		public void markFocused()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Zooming the blocks centered in (x, y) coordinate with zooming in or out.
+		/// </summary>
+		/// <param name="x">X coordinate of center.</param>
+		/// <param name="y">Y coordinate of center.</param>
+		/// <param name="type">Type of zooming (-1 zooming out and 1 zooming in).</param>
+		public void zoom(double x, double y, double type)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Zooming the blocks centered in the center of view with zooming in or out.
+		/// </summary>
+		/// <param name="type"></param>
+		public void zoomCenter(double type)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Zoom the blocks to fit in the workspace if possible.
+		/// </summary>
+		public void zoomToFit()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Center the workspace.
+		/// </summary>
+		public void scrollCenter()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Set the workspace's zoom factor.
+		/// </summary>
+		/// <param name="newScale">Zoom factor.</param>
+		public void setScale(double newScale)
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	[External, Name("Blockly.Metrics")]
+	public class Metrics
+	{
+		///<summary>Height of the visible rectangle</summary>
+		public double viewHeight;
+		///<summary>Width of the visible rectangle</summary>
+		public double viewWidth;
+		///<summary>Height of the contents</summary>
+		public double contentHeight;
+		///<summary>Width of the contents</summary>
+		public double contentWidth;
+		///<summary>Offset of top edge of visible rectangle from parent</summary>
+		public double viewTop;
+		///<summary>Offset of the top-most content from the y=0 coordinate</summary>
+		public double contentTop;
+		///<summary>Top-edge of view</summary>
+		public double absoluteTop;
+		///<summary>Offset of the left edge of visible rectangle from parent</summary>
+		public double viewLeft;
+		///<summary>Offset of the left-most content from the x=0 coordinate</summary>
+		public double contentLeft;
+		///<summary>Left-edge of view</summary>
+		public double absoluteLeft;
+	}
+
+	[External, Name("Blockly.Events")]
+	public class Events
+	{
+		public const string CREATE = "create";
+		public const string DELETE = "delete";
+		public const string CHANGE = "change";
+		public const string MOVE = "move";
+		public const string UI = "ui";
+
+		internal string group_ = "";
+		public bool recordUndo = false;
+
+		internal string[] getDescendantIds_(Block block)
+		{
+			throw new NotImplementedException();
+		}
+
+		internal void enable()
+		{
+			throw new NotImplementedException();
+		}
+
+		internal void disable()
+		{
+			throw new NotImplementedException();
+		}
+
+		internal void setGroup(string group)
+		{
+			throw new NotImplementedException();
+		}
+
+		internal void fire(Abstract ev)
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	[External, Name("Blockly.Events.Abstract")]
+	public class Abstract
+	{
+		/// <summary>
+		/// One of Blockly.Events.CREATE, Blockly.Events.DELETE, Blockly.Events.CHANGE, Blockly.Events.MOVE, Blockly.Events.UI.
+		/// </summary>
+		internal string type;
+
+		/// <summary>
+		/// UUID of workspace. The workspace can be found with Workspace.getById(event.workspaceId)
+		/// </summary>
+		internal string workspaceId;
+
+		/// <summary>
+		/// UUID of block. The block can be found with workspace.getBlockById(event.blockId)
+		/// </summary>
+		internal string blockId;
+
+		/// <summary>
+		/// UUID of group. Some events are part of an indivisible group, such as inserting a statement in a stack.
+		/// </summary>
+		internal string group;
+
+		internal bool recordUndo;
+
+		public Abstract(Block block, string type)
+		{
+			this.type = type;
+			if (block != null) {
+				blockId = block.id;
+				workspaceId = block.workspace.id;
+			}
+			group = Blockly.Events.group_;
+			recordUndo = Blockly.Events.recordUndo;
+		}
+	}
+
+	[External, Name("Blockly.Events.Create")]
+	public class Create : Abstract
+	{
+		/// <summary>
+		/// An XML tree defining the new block and any connected child blocks.
+		/// </summary>
+		internal Element xml;
+
+		/// <summary>
+		/// An array containing the UUIDs of the new block and any connected child blocks.
+		/// </summary>
+		internal string[] ids;
+
+		/// <summary>
+		/// Class for a block creation event.
+		/// </summary>
+		/// <param name="block">The created block.  Null for a blank event.</param>
+		public Create(Block block)
+			 : base(block, Events.CHANGE)
+		{
+			if (block == null) {
+				return;  // Blank event to be populated by fromJson.
+			}
+			xml = Blockly.Xml.blockToDomWithXY(block);
+			ids = Blockly.Events.getDescendantIds_(block);
+		}
+	}
+
+	[External, Name("Blockly.Events.Delete")]
+	public class Delete : Abstract
+	{
+		/// <summary>
+		/// An XML tree defining the deleted block and any connected child blocks.
+		/// </summary>
+		internal object oldXml;
+
+		/// <summary>
+		/// An array containing the UUIDs of the deleted block and any connected child blocks.
+		/// </summary>
+		internal string[] ids;
+
+		/// <summary>
+		/// Class for a block deletion event.
+		/// </summary>
+		/// <param name="block">The deleted block.  Null for a blank event.</param>
+		public Delete(Block block)
+			: base(block, Events.DELETE)
+		{
+			if (block == null) {
+				return;  // Blank event to be populated by fromJson.
+			}
+			if (block.getParent() != null) {
+				throw new Exception("Connected blocks cannot be deleted.");
+			}
+			oldXml = Blockly.Xml.blockToDomWithXY(block);
+			ids = Blockly.Events.getDescendantIds_(block);
+		}
+	}
+
+	[External, Name("Blockly.Events.Change")]
+	public class Change : Abstract
+	{
+		/// <summary>
+		/// One of 'field', 'comment', 'collapsed', 'disabled', 'inline', 'mutate'
+		/// </summary>
+		internal string element;
+
+		/// <summary>
+		/// Name of the field if this is a change to a field.
+		/// </summary>
+		internal string name;
+
+		/// <summary>
+		/// Original value.
+		/// </summary>
+		internal object oldValue;
+
+		/// <summary>
+		/// Changed value.
+		/// </summary>
+		internal object newValue;
+
+		/// <summary>
+		/// Class for a block change event.
+		/// </summary>
+		/// <param name="block">The changed block.  Null for a blank event.</param>
+		/// <param name="element">One of 'field', 'comment', 'disabled', etc.</param>
+		/// <param name="name">Name of input or field affected, or null.</param>
+		/// <param name="oldValue">Previous value of element.</param>
+		/// <param name="newValue">New value of element.</param>
+		public Change(Block block, string element, string name, string oldValue, string newValue)
+			: base(block, Events.CHANGE)
+		{
+			if (block == null) {
+				return;  // Blank event to be populated by fromJson.
+			}
+			this.element = element;
+			this.name = name;
+			this.oldValue = oldValue;
+			this.newValue = newValue;
+		}
+	}
+
+	[External, Name("Blockly.Events.Move")]
+	public class Move : Abstract
+	{
+		/// <summary>
+		/// UUID of old parent block. Undefined if it was a top level block.
+		/// </summary>
+		internal string oldParentId;
+
+		/// <summary>
+		/// Name of input on old parent. Undefined if it was a top level block or parent's next block.
+		/// </summary>
+		internal string oldInputName;
+
+		/// <summary>
+		/// X and Y coordinates if it was a top level block. Undefined if it had a parent.
+		/// </summary>
+		internal object oldCoordinate;
+
+		/// <summary>
+		/// UUID of new parent block. Undefined if it is a top level block.
+		/// </summary>
+		internal string newParentId;
+
+		/// <summary>
+		/// Name of input on new parent. Undefined if it is a top level block or parent's next block.
+		/// </summary>
+		internal string newInputName;
+
+		/// <summary>
+		/// X and Y coordinates if it is a top level block. Undefined if it has a parent.
+		/// </summary>
+		internal object newCoordinate;
+
+		/// <summary>
+		/// Class for a block move event.  Created before the move.
+		/// </summary>
+		/// <param name="block">The moved block.  Null for a blank event.</param>
+		public Move(Block block)
+			: base(block, Events.MOVE)
+		{
+			if (block == null) {
+				return;  // Blank event to be populated by fromJson.
+			}
+			var location = this.currentLocation_();
+			this.oldParentId = location.parentId;
+			this.oldInputName = location.inputName;
+			this.oldCoordinate = location.coordinate;
+		}
+
+		/**
+		 * Record the block's new location.  Called after the move.
+		 */
+		public void recordNew()
+		{
+			var location = this.currentLocation_();
+			this.newParentId = location.parentId;
+			this.newInputName = location.inputName;
+			this.newCoordinate = location.coordinate;
+		}
+
+		class Location
+		{
+			public string parentId;
+			public string inputName;
+			public object coordinate;
+
+			public Location(string parentId, string inputName, object coordinate)
+			{
+				this.parentId = parentId;
+				this.inputName = inputName;
+				this.coordinate = coordinate;
+			}
+		}
+
+		/**
+		 * Returns the parentId and input if the block is connected,
+		 *   or the XY location if disconnected.
+		 * @return {!Object} Collection of location info.
+		 * @private
+		 */
+		private Location currentLocation_()
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	[External, Name("Blockly.Events.Ui")]
+	public class Ui : Abstract
+	{
+		/// <summary>
+		/// One of 'selected', 'category', 'click', 'commentOpen', 'mutatorOpen', 'warningOpen'
+		/// </summary>
+		internal string element;
+
+		/// <summary>
+		/// Original value.
+		/// </summary>
+		internal object oldValue;
+
+		/// <summary>
+		/// Changed value.
+		/// </summary>
+		internal object newValue;
+
+		/// <summary>
+		/// Class for a UI event.
+		/// </summary>
+		/// <param name="block">The affected block.</param>
+		/// <param name="element">One of 'selected', 'comment', 'mutator', etc.</param>
+		/// <param name="oldValue">Previous value of element.</param>
+		/// <param name="newValue">New value of element.</param>
+		public Ui(Block block, string element, string oldValue, string newValue)
+			: base(block, Events.UI)
+		{
+			this.element = element;
+			this.oldValue = oldValue;
+			this.newValue = newValue;
+		}
+	}
+
+	[External, Name("Blockly.Options")]
+	public class Options
+	{
+		public Node languageTree;
+		public bool oneBasedIndex;
+		public Workspace parentWorkspace;
+		public bool comments;
+	}
+
+	[External, Name("Blockly.BlockSvg")]
+	public class BlockSvg : Block
+	{
+		[Name(false)]
+		public int TAB_HEIGHT = 20;
+
+		public BlockSvg(string type) : base(type)
+		{
+		}
+	}
+
+	[External, Name("Blockly.Comment")]
+	public class Comment : Block
+	{
+		public Comment(string type) : base(type)
+		{
+		}
+	}
+
+	[External, Name("Blockly.Input")]
+	public class Input
+	{
+		public int type;
+		public string name;
+		public Block block;
+		public Connection connection;
+		public Field[] fieldRow;
+
+		/// <summary>
+		/// Class for an input with an optional field.
+		/// </summary>
+		/// <param name="type">The type of the input.</param>
+		/// <param name="name">Language-neutral identifier which may used to find this
+		/// input again.</param>
+		/// <param name="block">The block containing this input.</param>
+		/// <param name="connection">Optional connection for this input.</param>
+		public Input(int type, string name, Block block, Connection connection)
+		{
+			this.type = type;
+			this.name = name;
+			this.block = block;
+			this.connection = connection;
+		}
+
+		/// <summary>
+		/// Add an item to the end of the input's field row.
+		/// </summary>
+		/// <param name="field">Something to add as a field.</param>
+		/// <param name="opt_name">Language-neutral identifier which may used to find
+		/// this field again.Should be unique to the host block.</param>
+		/// <returns>The input being append to (to allow chaining).</returns>
+		public Input appendField(Union<string, Field> field, string opt_name = null)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Add an item to the end of the input's field row.
+		/// </summary>
+		/// <param name="field">Something to add as a field.</param>
+		/// <param name="opt_name">Language-neutral identifier which may used to find
+		/// this field again.Should be unique to the host block.</param>
+		/// <returns>The input being append to (to allow chaining).</returns>
+		public Input appendTitle(Union<string, Field> field, string opt_name = null)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Remove a field from this input.
+		/// </summary>
+		/// <param name="name">The name of the field.</param>
+		public void removeField(string name)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Gets whether this input is visible or not.
+		/// </summary>
+		/// <returns>True if visible.</returns>
+		public bool isVisible()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Sets whether this input is visible or not.
+		/// Used to collapse/uncollapse a block.
+		/// </summary>
+		/// <param name="visible">True if visible.</param>
+		/// <returns>List of blocks to render.</returns>
+		public Block[] setVisible(bool visible)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Change a connection's compatibility.
+		/// </summary>
+		/// <param name="check">Compatible value type or
+		/// list of value types.Null if all types are compatible.</param>
+		/// <returns>The input being modified (to allow chaining).</returns>
+		public Input setCheck(Union<string, string[]> check)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Change the alignment of the connection's field(s).
+		/// </summary>
+		/// <param name="align">align One of Blockly.ALIGN_LEFT, ALIGN_CENTRE, ALIGN_RIGHT.
+		/// In RTL mode directions are reversed, and ALIGN_RIGHT aligns to the left.</param>
+		/// <returns>The input being modified (to allow chaining).</returns>
+		public Input setAlign(double align)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Initialize the fields on this input.
+		/// </summary>
+		public void init()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Sever all links to this input.
+		/// </summary>
+		public void dispose()
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	[External, Name("Blockly.Icon")]
+	public class Icon
+	{
+		public Icon(Block block)
+		{
+		}
+	}
+
+	[External, Name("Blockly.Mutator")]
+	public class Mutator : Icon
+	{
+		public Workspace workspace_;
+
+		public Mutator(string[] quarkNames)
+			: base(null)
+		{
+		}
+
+		/// <summary>
+		/// Reconnect an block to a mutated input.
+		/// </summary>
+		/// <param name="connectionChild">Connection on child block.</param>
+		/// <param name="block">Parent block.</param>
+		/// <param name="inputName">Name of input on parent block.</param>
+		/// <returns>True iff a reconnection was made, false otherwise.</returns>
+		internal static bool reconnect(Connection connectionChild, Block block, string inputName)
+		{
+			throw new NotImplementedException();
+		}
+
+		internal bool isVisible()
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	[External, Name("Blockly.Connection")]
+	public class Connection
+	{
+		public Connection targetConnection;
+
+		public Connection(Block source, int type)
+		{
+		}
+
+		public void connect(Connection previousConnection)
+		{
+			throw new NotImplementedException();
+		}
+
+		public void disconnect()
+		{
+			throw new NotImplementedException();
+		}
+
+		public Block targetBlock()
+		{
+			throw new NotImplementedException();
+		}
+
+		public bool checkType_(Connection connection)
+		{
+			throw new NotImplementedException();
+		}
+
+		public Connection setCheck(object check)
+		{
+			throw new NotImplementedException();
+		}
+
+		internal Block getSourceBlock()
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	[External, Name("Blockly.RenderedConnection")]
+	public class RenderedConnection : Connection
+	{
+		public RenderedConnection(Block source, int type)
+			: base(source, type)
+		{
+		}
+	}
+
+	[External, Name("Blockly.Field")]
+	public class Field
+	{
+		public goog.math.Size size_;
+		public string text_;
+		public Block sourceBlock_;
+
+		/// <summary>
+		/// Abstract class for an editable field.
+		/// </summary>
+		/// <param name="text">The initial content of the field.</param>
+		/// <param name="opt_validator">An optional function that is called
+		/// to validate any constraints on what the user entered.  Takes the new
+		/// text as an argument and returns either the accepted text, a replacement
+		/// text, or null to abort the change.</param>
+		public Field(string text, Func<string, object> opt_validator = null)
+		{
+			size_ = new goog.math.Size(0, 25);
+			setValue(text);
+			setValidator(opt_validator);
+		}
+
+		/// <summary>
+		/// Name of field.  Unique within each block.
+		/// Static labels are usually unnamed.
+		/// </summary>
+		public string name;
+
+		/// <summary>
+		/// Maximum characters of text to display before adding an ellipsis.
+		/// </summary>
+		public int maxDisplayLength;
+
+		/// <summary>
+		/// Non-breaking space.
+		/// </summary>
+		[Name(false)]
+		public const string NBSP = "\u00A0";
+
+		/// <summary>
+		/// Editable fields are saved by the XML renderer, non-editable fields are not.
+		/// </summary>
+		[Name(false)]
+		public bool EDITABLE = true;
+
+		/// <summary>
+		/// Attach this field to a block.
+		/// </summary>
+		/// <param name="block">The block containing this field.</param>
+		public void setSourceBlock(Block block)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Install this field on a block.
+		/// </summary>
+		public virtual void init()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Dispose of all DOM objects belonging to this editable field.
+		/// </summary>
+		public virtual void dispose()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Add or remove the UI indicating if this field is editable or not.
+		/// </summary>
+		public void updateEditable()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Gets whether this editable field is visible or not.
+		/// </summary>
+		/// <returns>True if visible.</returns>
+		public bool isVisible()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Sets whether this editable field is visible or not.
+		/// </summary>
+		/// <param name="visible">True if visible.</param>
+		public void setVisible(bool visible)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Sets a new validation function for editable fields.
+		/// </summary>
+		/// <param name="handler">New validation function, or null.</param>
+		public virtual void setValidator(Func<string, object> handler)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Gets the validation function for editable fields.
+		/// </summary>
+		/// <returns>Validation function, or null.</returns>
+		public Func<string, string> getValidator()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Gets the group element for this editable field.
+		/// Used for measuring the size and for positioning.
+		/// </summary>
+		/// <returns>The group element.</returns>
+		public virtual Element getSvgRoot()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Start caching field widths.  Every call to this function MUST also call
+		/// stopCache.  Caches must not survive between execution threads.
+		/// </summary>
+		public void startCache()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Stop caching field widths.  Unless caching was already on when the
+		/// corresponding call to startCache was made.
+		/// </summary>
+		public void stopCache()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Returns the height and width of the field.
+		/// </summary>
+		/// <returns>Height and width.</returns>
+		public goog.math.Size getSize()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Get the text from this field.
+		/// </summary>
+		/// <returns>Current text.</returns>
+		public virtual string getText()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Set the text in this field.  Trigger a rerender of the source block.
+		/// </summary>
+		/// <param name="text">New text.</param>
+		public virtual void setText(string text)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// By default there is no difference between the human-readable text and
+		/// the language-neutral values.  Subclasses (such as dropdown) may define this.
+		/// </summary>
+		/// <returns>Current text.</returns>
+		public virtual string getValue()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// By default there is no difference between the human-readable text and
+		/// the language-neutral values.  Subclasses (such as dropdown) may define this.
+		/// </summary>
+		/// <param name="newText">New text.</param>
+		public virtual void setValue(string newText)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Change the tooltip text for this field.
+		/// </summary>
+		/// <param name="newTip">newTip Text for tooltip or a parent element to
+		/// link to for its tooltip.</param>
+		public virtual void setTooltip(Union<string, Element> newTip)
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	[External, Name("Blockly.FieldLabel")]
+	public class FieldLabel : Field
+	{
+		/// <summary>
+		/// Class for a non-editable field.
+		/// </summary>
+		/// <param name="text">The initial content of the field.</param>
+		/// <param name="opt_class">Optional CSS class for the field's text.</param>
+		public FieldLabel(string text, string opt_class = null)
+			: base(text)
+		{
+		}
+
+		/// <summary>
+		/// Install this text on a block.
+		/// </summary>
+		public override void init()
+		{
+			base.init();
+		}
+
+		/// <summary>
+		/// Dispose of all DOM objects belonging to this text.
+		/// </summary>
+		public override void dispose()
+		{
+			base.dispose();
+		}
+
+		/// <summary>
+		/// Gets the group element for this field.
+		/// Used for measuring the size and for positioning.
+		/// </summary>
+		/// <returns></returns>
+		public override Element getSvgRoot()
+		{
+			return base.getSvgRoot();
+		}
+
+		/// <summary>
+		/// Change the tooltip text for this field.
+		/// </summary>
+		/// <param name="newTip">Text for tooltip or a parent element to
+		/// link to for its tooltip.</param>
+		public override void setTooltip(Union<string, Element> newTip)
+		{
+			base.setTooltip(newTip);
+		}
+	}
+
+	[External, Name("Blockly.FieldCheckbox")]
+	public class FieldCheckbox : Field
+	{
+		/// <summary>
+		/// Class for a checkbox field.
+		/// </summary>
+		/// <param name="state">The initial state of the field ('TRUE' or 'FALSE').</param>
+		/// <param name="opt_validator">A function that is executed when a new
+		/// option is selected.  Its sole argument is the new checkbox state.  If
+		/// it returns a value, this becomes the new checkbox state, unless the
+		/// value is null, in which case the change is aborted.</param>
+		public FieldCheckbox(string state, Func<string, object> opt_validator = null)
+			: base("", opt_validator)
+		{
+		}
+
+		/// <summary>
+		/// Character for the checkmark.
+		/// </summary>
+		public string CHECK_CHAR = "\u2713";
+
+		/// <summary>
+		/// Mouse cursor style when over the hotspot that initiates editability.
+		/// </summary>
+		public string CURSOR = "default";
+
+		/// <summary>
+		/// Install this checkbox on a block.
+		/// </summary>
+		public override void init()
+		{
+			base.init();
+		}
+
+		/// <summary>
+		/// Return 'TRUE' if the checkbox is checked, 'FALSE' otherwise.
+		/// </summary>
+		/// <returns>Current state.</returns>
+		public override string getValue()
+		{
+			return base.getValue();
+		}
+
+		/// <summary>
+		/// Set the checkbox to be checked if strBool is 'TRUE', unchecks otherwise.
+		/// </summary>
+		/// <param name="strBool">New state.</param>
+		public override void setValue(string strBool)
+		{
+			base.setValue(strBool);
+		}
+	}
+
+	[External, Name("Blockly.FieldDropdown")]
+	public class FieldDropdown : Field
+	{
+		/// <summary>
+		/// Class for an editable dropdown field.
+		/// </summary>
+		/// <param name="menuGenerator">An array of
+		/// options for a dropdown list, or a function which generates these options.</param>
+		/// <param name="opt_validator">A function that is executed when a new
+		/// option is selected, with the newly selected value as its sole argument.
+		/// If it returns a value, that value (which must be one of the options) will
+		/// become selected in place of the newly selected option, unless the return
+		/// value is null, in which case the change is aborted.
+		/// </param>
+		public FieldDropdown(Union<string[][], Func<string[][]>> menuGenerator, Func<string, object> opt_validator = null)
+			: base(menuGenerator.As<string[][]>()[0][1], opt_validator)
+		{
+		}
+
+		/// <summary>
+		/// Horizontal distance that a checkmark ovehangs the dropdown.
+		/// </summary>
+		public int CHECKMARK_OVERHANG = 25;
+
+		/// <summary>
+		/// Android can't (in 2014) display "▾", so use "▼" instead.
+		/// </summary>
+		public string ARROW_CHAR = "\u25BE";
+
+		/// <summary>
+		/// Mouse cursor style when over the hotspot that initiates the editor.
+		/// </summary>
+		public string CURSOR = "default";
+
+		/// <summary>
+		/// Install this dropdown on a block.
+		/// </summary>
+		public override void init()
+		{
+			base.init();
+		}
+
+		/// <summary>
+		/// Get the language-neutral value from this dropdown menu.
+		/// </summary>
+		/// <returns>Current text.</returns>
+		public override string getValue()
+		{
+			return base.getValue();
+		}
+
+		/// <summary>
+		/// Set the language-neutral value for this dropdown menu.
+		/// </summary>
+		/// <param name="newText">New value to set.</param>
+		public override void setValue(string newText)
+		{
+			base.setValue(newText);
+		}
+
+		/// <summary>
+		/// Set the text in this field.  Trigger a rerender of the source block.
+		/// </summary>
+		/// <param name="text">New text.</param>
+		public override void setText(string text)
+		{
+			base.setText(text);
+		}
+
+		/// <summary>
+		/// Close the dropdown menu if this input is being deleted.
+		/// </summary>
+		public override void dispose()
+		{
+			base.dispose();
+		}
+	}
+
+	[External, Name("Blockly.FieldTextInput")]
+	public class FieldTextInput : Field
+	{
+		public Action<string> onFinishEditing_;
+
+		/// <summary>
+		/// Class for an editable text field.
+		/// </summary>
+		/// <param name="text">The initial content of the field.</param>
+		/// <param name="opt_validator">An optional function that is called
+		/// to validate any constraints on what the user entered.  Takes the new
+		/// text as an argument and returns either the accepted text, a replacement
+		/// text, or null to abort the change.</param>
+		public FieldTextInput(string text, Func<string, object> opt_validator = null)
+			: base(text, opt_validator)
+		{
+		}
+
+		/// <summary>
+		/// Point size of text.  Should match blocklyText's font-size in CSS.
+		/// </summary>
+		public int FONTSIZE = 11;
+
+		/// <summary>
+		/// Mouse cursor style when over the hotspot that initiates the editor.
+		/// </summary>
+		public string CURSOR = "text";
+
+		/// <summary>
+		/// Close the input widget if this input is being deleted.
+		/// </summary>
+		public override void dispose()
+		{
+			base.dispose();
+		}
+
+		/// <summary>
+		/// Set the text in this field.
+		/// </summary>
+		/// <param name="text">New text.</param>
+		public override void setValue(string text)
+		{
+			base.setValue(text);
+		}
+
+		/// <summary>
+		/// Set whether this field is spellchecked by the browser.
+		/// </summary>
+		/// <param name="check">True if checked.</param>
+		public void setSpellcheck(bool check)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Ensure that only a number may be entered.
+		/// </summary>
+		/// <param name="text">The user's text.</param>
+		/// <returns>A string representing a valid number, or null if invalid.</returns>
+		public virtual string numberValidator(string text)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Ensure that only a nonnegative integer may be entered.
+		/// </summary>
+		/// <param name="test">The user's text.</param>
+		/// <returns>A string representing a valid int, or null if invalid.</returns>
+		public string nonnegativeIntegerValidator(string test)
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	[External, Name("Blockly.FieldDate")]
+	public class FieldDate : Field
+	{
+		/// <summary>
+		/// Class for a date input field.
+		/// </summary>
+		/// <param name="date">The initial date.</param>
+		/// <param name="opt_validator">A function that is executed when a new
+		/// date is selected.  Its sole argument is the new date value.  Its
+		/// return value becomes the selected date, unless it is undefined, in
+		/// which case the new date stands, or it is null, in which case the change
+		/// is aborted.</param>
+		public FieldDate(string date, Func<string, object> opt_validator = null)
+			: base(date, opt_validator)
+		{
+		}
+
+		/// <summary>
+		/// Mouse cursor style when over the hotspot that initiates the editor.
+		/// </summary>
+		public string CURSOR = "text";
+
+		/// <summary>
+		/// Close the colour picker if this input is being deleted.
+		/// </summary>
+		public override void dispose()
+		{
+			base.dispose();
+		}
+
+		/// <summary>
+		/// Return the current date.
+		/// </summary>
+		/// <returns>Current date.</returns>
+		public override string getValue()
+		{
+			return base.getValue();
+		}
+
+		/// <summary>
+		/// Set the date.
+		/// </summary>
+		/// <param name="newText">The new date.</param>
+		public override void setValue(string newText)
+		{
+			base.setValue(newText);
+		}
+
+		/// <summary>
+		/// CSS for date picker.  See css.js for use.
+		/// </summary>
+		public string[] CSS = new string[0];
+	}
+
+	[External, Name("Blockly.FieldColour")]
+	public class FieldColour : Field
+	{
+		/// <summary>
+		/// Class for a colour input field.
+		/// </summary>
+		/// <param name="colour">The initial colour in '#rrggbb' format.</param>
+		/// <param name="opt_validator">A function that is executed when a new
+		/// colour is selected.  Its sole argument is the new colour value.  Its
+		/// return value becomes the selected colour, unless it is undefined, in
+		/// which case the new colour stands, or it is null, in which case the change
+		/// is aborted.</param>
+		public FieldColour(string colour, Func<string, object> opt_validator = null)
+			: base(colour, opt_validator)
+		{
+		}
+
+		/// <summary>
+		/// Install this field on a block.
+		/// </summary>
+		public override void init()
+		{
+			base.init();
+		}
+
+		/// <summary>
+		/// Mouse cursor style when over the hotspot that initiates the editor.
+		/// </summary>
+		public string CURSOR = "default";
+
+		/// <summary>
+		/// Close the colour picker if this input is being deleted.
+		/// </summary>
+		public override void dispose()
+		{
+			base.dispose();
+		}
+
+		/// <summary>
+		/// Return the current colour.
+		/// </summary>
+		/// <returns>Current colour in '#rrggbb' format.</returns>
+		public override string getValue()
+		{
+			return base.getValue();
+		}
+
+		/// <summary>
+		/// Set the colour.
+		/// </summary>
+		/// <param name="colour">The new colour in '#rrggbb' format.</param>
+		public override void setValue(string colour)
+		{
+			base.setValue(colour);
+		}
+
+		/// <summary>
+		/// Get the text from this field.  Used when the block is collapsed.
+		/// </summary>
+		/// <returns>Current text.</returns>
+		public override string getText()
+		{
+			return base.getText();
+		}
+
+		/// <summary>
+		/// An array of colour strings for the palette.
+		/// See bottom of this page for the default:
+		/// http://docs.closure-library.googlecode.com/git/closure_goog_ui_colorpicker.js.source.html
+		/// </summary>
+		public string[] COLOURS = new string[0];
+
+		/// <summary>
+		/// Set a custom colour grid for this field.
+		/// </summary>
+		/// <param name="colours">Array of colours for this block,
+		/// or null to use default (FieldColour.COLOURS).</param>
+		/// <returns>Returns itself (for method chaining).</returns>
+		public FieldColour setColours(string[] colours)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Set a custom grid size for this field.
+		/// </summary>
+		/// <param name="columns">Number of columns for this block,
+		/// or 0 to use default (FieldColour.COLUMNS).</param>
+		/// <returns>Returns itself (for method chaining).</returns>
+		public FieldColour setColumns(int columns)
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	[External, Name("Blockly.FieldNumber")]
+	public class FieldNumber : FieldTextInput
+	{
+		/// <summary>
+		/// Class for an editable number field.
+		/// </summary>
+		/// <param name="value">The initial content of the field.</param>
+		/// <param name="opt_min">Minimum value.</param>
+		/// <param name="opt_max">Maximum value.</param>
+		/// <param name="opt_precision">Precision for value.</param>
+		/// <param name="opt_validator">An optional function that is called
+		/// to validate any constraints on what the user entered.  Takes the new
+		/// text as an argument and returns either the accepted text, a replacement
+		/// text, or null to abort the change.</param>
+		public FieldNumber(string value, Union<string, int> opt_min,
+			Union<string, int> opt_max, Union<string, int> opt_precision,
+			Func<string, object> opt_validator = null)
+			: base(value, opt_validator)
+		{
+		}
+
+		/// <summary>
+		/// Set the maximum, minimum and precision constraints on this field.
+		/// Any of these properties may be undefiend or NaN to be disabled.
+		/// Setting precision (usually a power of 10) enforces a minimum step between
+		/// values. That is, the user's value will rounded to the closest multiple of
+		/// precision. The least significant digit place is inferred from the precision.
+		/// Integers values can be enforces by choosing an integer precision.
+		/// </summary>
+		/// <param name="min">Minimum value.</param>
+		/// <param name="max">Maximum value.</param>
+		/// <param name="precision">Precision for value.</param>
+		public void setConstraints(Union<string, int> min, Union<string, int> max,
+			Union<string, int> precision)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Sets a new change handler for number field.
+		/// </summary>
+		/// <param name="handler">New change handler, or null.</param>
+		public override void setValidator(Func<string, object> handler)
+		{
+			base.setValidator(handler);
+		}
+
+		/// <summary>
+		/// Ensure that only a number in the correct range may be entered.
+		/// </summary>
+		/// <param name="text">The user's text.</param>
+		/// <returns>A string representing a valid number, or null if invalid.</returns>
+		public override string numberValidator(string text)
+		{
+			return base.numberValidator(text);
+		}
+	}
+
+	[External, Name("Blockly.FieldAngle")]
+	public class FieldAngle : FieldTextInput
+	{
+		/// <summary>
+		/// Class for an editable angle field.
+		/// </summary>
+		/// <param name="text">The initial content of the field.</param>
+		/// <param name="opt_validator">An optional function that is called
+		/// to validate any constraints on what the user entered.  Takes the new
+		/// text as an argument and returns the accepted text or null to abort
+		/// the change.</param>
+		public FieldAngle(string text, Func<string, object> opt_validator = null)
+			: base(text, opt_validator)
+		{
+		}
+
+		/// <summary>
+		/// Sets a new change handler for angle field.
+		/// </summary>
+		/// <param name="handler">New change handler, or null.</param>
+		public override void setValidator(Func<string, object> handler)
+		{
+			base.setValidator(handler);
+		}
+
+		/// <summary>
+		/// Round angles to the nearest 15 degrees when using mouse.
+		/// Set to 0 to disable rounding.
+		/// </summary>
+		public int ROUND = 15;
+
+		/// <summary>
+		/// Half the width of protractor image.
+		/// </summary>
+		public static int HALF = 100 / 2;
+
+		/// <summary>
+		/// Angle increases clockwise (true) or counterclockwise (false).
+		/// </summary>
+		public bool CLOCKWISE = false;
+
+		/// <summary>
+		/// Offset the location of 0 degrees (and all angles) by a constant.
+		/// Usually either 0 (0 = right) or 90 (0 = up).
+		/// </summary>
+		public int OFFSET = 0;
+
+		/// <summary>
+		/// Maximum allowed angle before wrapping.
+		/// Usually either 360 (for 0 to 359.9) or 180 (for -179.9 to 180).
+		/// </summary>
+		public int WRAP = 360;
+
+		/// <summary>
+		/// Radius of protractor circle.  Slightly smaller than protractor size since
+		/// otherwise SVG crops off half the border at the edges.
+		/// </summary>
+		public int RADIUS = HALF - 1;
+
+		/// <summary>
+		/// Set the angle to match the mouse's position.
+		/// </summary>
+		/// <param name="e">Mouse move event.</param>
+		public void onMouseMove(Event e)
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Insert a degree symbol.
+		/// </summary>
+		/// <param name="text">New text.</param>
+		public override void setText(string text)
+		{
+			base.setText(text);
+		}
+
+		/// <summary>
+		/// Ensure that only an angle may be entered.
+		/// </summary>
+		/// <param name="text">The user's text.</param>
+		/// <returns>A string representing a valid angle, or null if invalid.</returns>
+		public string angleValidator(string text)
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	[External, Name("Blockly.FieldImage")]
+	public class FieldImage : Field
+	{
+		/// <summary>
+		/// Class for an image.
+		/// </summary>
+		/// <param name="src">The URL of the image.</param>
+		/// <param name="width">Width of the image.</param>
+		/// <param name="height">Height of the image.</param>
+		/// <param name="opt_alt">Optional alt text for when block is collapsed.</param>
+		public FieldImage(string src, int width, int height, string opt_alt = "")
+			: base(src)
+		{
+		}
+
+		/// <summary>
+		/// Install this image on a block.
+		/// </summary>
+		public override void init()
+		{
+			base.init();
+		}
+
+		/// <summary>
+		/// Dispose of all DOM objects belonging to this text.
+		/// </summary>
+		public override void dispose()
+		{
+			base.dispose();
+		}
+
+		/// <summary>
+		/// Change the tooltip text for this field.
+		/// </summary>
+		/// <param name="newTip">Text for tooltip or a parent element to
+		/// link to for its tooltip.</param>
+		public override void setTooltip(Union<string, Element> newTip)
+		{
+			base.setTooltip(newTip);
+		}
+
+		/// <summary>
+		/// Get the source URL of this image.
+		/// </summary>
+		/// <returns>Current text.</returns>
+		public override string getValue()
+		{
+			return base.getValue();
+		}
+
+		/// <summary>
+		/// Set the source URL of this image.
+		/// </summary>
+		/// <param name="newText">New source.</param>
+		public override void setValue(string newText)
+		{
+			base.setValue(newText);
+		}
+
+		/// <summary>
+		/// Set the alt text of this image.
+		/// </summary>
+		/// <param name="alt">New alt text.</param>
+		public override void setText(string alt)
+		{
+			base.setText(alt);
+		}
+	}
+
+	[External, Name("Blockly.FieldVariable")]
+	public class FieldVariable : Field
+	{
+		/// <summary>
+		/// Class for a variable's dropdown field.
+		/// </summary>
+		/// <param name="varname">The default name for the variable.  If null,
+		/// a unique variable name will be generated.</param>
+		/// <param name="opt_validator">A function that is executed when a new
+		/// option is selected.  Its sole argument is the new option value.</param>
+		public FieldVariable(string varname, Func<string, object> opt_validator = null)
+			: base(varname, opt_validator)
+		{
+		}
+
+		/// <summary>
+		/// Sets a new change handler for angle field.
+		/// </summary>
+		/// <param name="handler">New change handler, or null.</param>
+		public override void setValidator(Func<string, object> handler)
+		{
+			base.setValidator(handler);
+		}
+
+		/// <summary>
+		/// Install this dropdown on a block.
+		/// </summary>
+		public override void init()
+		{
+			base.init();
+		}
+
+		/// <summary>
+		/// Get the variable's name (use a variableDB to convert into a real name).
+		/// Unline a regular dropdown, variables are literal and have no neutral value.
+		/// </summary>
+		/// <returns>Current text.</returns>
+		public override string getValue()
+		{
+			return base.getValue();
+		}
+
+		/// <summary>
+		/// Set the variable name.
+		/// </summary>
+		/// <param name="newValue">New text.</param>
+		public override void setValue(string newValue)
+		{
+			base.setValue(newValue);
+		}
+
+		/// <summary>
+		/// Return a sorted list of variable names for variable dropdown menus.
+		/// Include a special option at the end for creating a new variable name.
+		/// </summary>
+		/// <returns>Array of variable names.</returns>
+		public string[] dropdownCreate()
+		{
+			throw new NotImplementedException();
+		}
+
+		/// <summary>
+		/// Event handler for a change in variable name.
+		/// Special case the 'New variable...' and 'Rename variable...' options.
+		/// In both of these special cases, prompt the user for a new name.
+		/// </summary>
+		/// <param name="text">The selected dropdown menu option.</param>
+		/// <returns>An acceptable new variable name, or null if
+		/// change is to be either aborted (cancel button) or has been already
+		/// handled (rename), or undefined if an existing variable was chosen.</returns>
+		public string dropdownChange(string text)
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	[External, Name("Blockly.Rectangle")]
+	public class Rectangle
+	{
+		public goog.math.Coordinate topLeft;
+		public goog.math.Coordinate bottomRight;
+	}
+
+	[External, Name("Blockly.ContextMenu")]
+	public class ContextMenu
+	{
+		public static Action callbackFactory(Block block, Element xml)
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	[External, Name("Blockly.FlyoutButton")]
+	public class FlyoutButton
+	{
+		internal Workspace getTargetWorkspace()
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	/// <summary>
+	/// Allow for switching between one and zero based indexing for lists and text,
+	/// one based by default.
+	/// </summary>
+	[External, Name("Blockly.Blocks")]
+	public class Blocks
+	{
+		public bool ONE_BASED_INDEXING = true;
+	}
+}
+
+/// <summary>
+/// Google's common JavaScript library
+/// https://developers.google.com/closure/library/
+/// </summary>
+[External]
+public static class goog
+{
+	public static string getMsg(string str, object opt_values)
+	{
+		throw new NotImplementedException();
+	}
+
+	public static class dom
+	{
+		public static Element createDom(string v, object o = null, Union<string, Element> t = null)
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	public static class math
+	{
+		public class Size
+		{
+			public double width;
+			public double height;
+
+			public Size(double width, double hieght)
+			{
+				this.width = width;
+				this.height = hieght;
+			}
+		}
+
+		public class Coordinate
+		{
+			public double x;
+			public double y;
+		}
+	}
+
+	public static class @string
+	{
+		public class CaseInsensitiveCompare : IComparer<string>
+		{
+			public int Compare(string x, string y)
+			{
+				return x.ToLower().CompareTo(y.ToLower());
+			}
+		}
+
+		public static CaseInsensitiveCompare caseInsensitiveCompare = new CaseInsensitiveCompare();
+	}
+
+	public static class array
+	{
+		internal static bool equals(Array a, Array b)
+		{
+			throw new NotImplementedException();
+		}
+	}
+
+	public static class asserts
+	{
+		internal static void assert(bool cond, string format, params string[] args)
+		{
+			if (!cond) throw new NotImplementedException();
+		}
+
+		internal static void assertArray(object array, string format, params string[] args)
+		{
+			assert(array is Array, format, args);
+		}
+
+		internal static void assertFunction(object func, string format, params string[] args)
+		{
+			assert(func is System.Reflection.MethodInfo, format, args);
+		}
+
+		internal static void assertString(object str, string format, params string[] args)
+		{
+			assert(str is String, format, args);
+		}
+
+		internal static void fail(string format, params string[] args)
+		{
+			throw new NotImplementedException();
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/BlocklyView.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/BlocklyView.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/BlocklyView.cs	(revision 270)
@@ -0,0 +1,395 @@
+﻿using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Bridge;
+using Bridge.Html5;
+using Bridge.jQuery2;
+
+namespace WebMrbc
+{
+	public class BlocklyView
+	{
+		string identifier;
+		public string Identifier {
+			get { return identifier; }
+			set {
+				if (identifier != value) {
+					identifier = value;
+					IdentifierChanged?.Invoke(this, EventArgs.Empty);
+				}
+			}
+		}
+		public Dictionary<string, FlyoutCategoryHandler> FlyoutCategoryHandlers = new Dictionary<string, FlyoutCategoryHandler>();
+		public event EventHandler<Create> BlockCreated;
+		public event EventHandler<Delete> BlockDeleted;
+		public event EventHandler<Change> BlockChanged;
+		public event EventHandler<Move> BlockMoveed;
+		public event EventHandler<Ui> UiEvent;
+		public event EventHandler<EventArgs> IdentifierChanged;
+		public bool Changed = true;
+
+		private static int No = 1;
+		private WorkspaceSvg _Workspace;
+		private string _WorkspaceElementId;
+		private int _IdNo;
+
+		static BlocklyView()
+		{
+			Script.Set(Blockly.Blocks, ColourPickerBlock.type_name, new ColourPickerBlock());
+			Script.Set(Blockly.Blocks, ColourRandomBlock.type_name, new ColourRandomBlock());
+			Script.Set(Blockly.Blocks, ColourRGBBlock.type_name, new ColourRGBBlock());
+			Script.Set(Blockly.Blocks, ColourBlendBlock.type_name, new ColourBlendBlock());
+			Script.Set(Blockly.Blocks, ListsCreateEmptyBlock.type_name, new ListsCreateEmptyBlock());
+			Script.Set(Blockly.Blocks, ListsCreateWithBlock.type_name, new ListsCreateWithBlock());
+			Script.Set(Blockly.Blocks, ListsCreateWithContainerBlock.type_name, new ListsCreateWithContainerBlock());
+			Script.Set(Blockly.Blocks, ListsCreateWithItemBlock.type_name, new ListsCreateWithItemBlock());
+			Script.Set(Blockly.Blocks, ListsRepeatBlock.type_name, new ListsRepeatBlock());
+			Script.Set(Blockly.Blocks, ListsLengthBlock.type_name, new ListsLengthBlock());
+			Script.Set(Blockly.Blocks, ListsIsEmptyBlock.type_name, new ListsIsEmptyBlock());
+			Script.Set(Blockly.Blocks, ListsIndexOfBlock.type_name, new ListsIndexOfBlock());
+			Script.Set(Blockly.Blocks, ListsGetIndexBlock.type_name, new ListsGetIndexBlock());
+			Script.Set(Blockly.Blocks, ListsSetIndexBlock.type_name, new ListsSetIndexBlock());
+			Script.Set(Blockly.Blocks, ListsGetSublistBlock.type_name, new ListsGetSublistBlock());
+			Script.Set(Blockly.Blocks, ListsSortBlock.type_name, new ListsSortBlock());
+			Script.Set(Blockly.Blocks, ListsSplitBlock.type_name, new ListsSplitBlock());
+			Script.Set(Blockly.Blocks, ControlsIfBlock.type_name, new ControlsIfBlock());
+			Script.Set(Blockly.Blocks, ControlsIfIfBlock.type_name, new ControlsIfIfBlock());
+			Script.Set(Blockly.Blocks, ControlsIfElseIfBlock.type_name, new ControlsIfElseIfBlock());
+			Script.Set(Blockly.Blocks, ControlsIfElseBlock.type_name, new ControlsIfElseBlock());
+			Script.Set(Blockly.Blocks, SwitchCaseNumberBlock.type_name, new SwitchCaseNumberBlock());
+			Script.Set(Blockly.Blocks, SwitchCaseNumberContainerBlock.type_name, new SwitchCaseNumberContainerBlock());
+			Script.Set(Blockly.Blocks, SwitchCaseNumberConstBlock.type_name, new SwitchCaseNumberConstBlock());
+			Script.Set(Blockly.Blocks, SwitchCaseNumberRangeBlock.type_name, new SwitchCaseNumberRangeBlock());
+			Script.Set(Blockly.Blocks, SwitchCaseNumberDefaultBlock.type_name, new SwitchCaseNumberDefaultBlock());
+			Script.Set(Blockly.Blocks, SwitchCaseTextBlock.type_name, new SwitchCaseTextBlock());
+			Script.Set(Blockly.Blocks, SwitchCaseTextContainerBlock.type_name, new SwitchCaseTextContainerBlock());
+			Script.Set(Blockly.Blocks, SwitchCaseTextConstBlock.type_name, new SwitchCaseTextConstBlock());
+			Script.Set(Blockly.Blocks, SwitchCaseTextRangeBlock.type_name, new SwitchCaseTextRangeBlock());
+			Script.Set(Blockly.Blocks, SwitchCaseTextDefaultBlock.type_name, new SwitchCaseTextDefaultBlock());
+			Script.Set(Blockly.Blocks, LogicCompareBlock.type_name, new LogicCompareBlock());
+			Script.Set(Blockly.Blocks, LogicOperationBlock.type_name, new LogicOperationBlock());
+			Script.Set(Blockly.Blocks, LogicNegateBlock.type_name, new LogicNegateBlock());
+			Script.Set(Blockly.Blocks, LogicBooleanBlock.type_name, new LogicBooleanBlock());
+			Script.Set(Blockly.Blocks, LogicNullBlock.type_name, new LogicNullBlock());
+			Script.Set(Blockly.Blocks, LogicTernaryBlock.type_name, new LogicTernaryBlock());
+			Script.Set(Blockly.Blocks, ControlsRepeatExtBlock.type_name, new ControlsRepeatExtBlock());
+			Script.Set(Blockly.Blocks, ControlsRepeatBlock.type_name, new ControlsRepeatBlock());
+			Script.Set(Blockly.Blocks, ControlsWhileUntilBlock.type_name, new ControlsWhileUntilBlock());
+			Script.Set(Blockly.Blocks, ControlsForBlock.type_name, new ControlsForBlock());
+			Script.Set(Blockly.Blocks, ControlsForEachBlock.type_name, new ControlsForEachBlock());
+			Script.Set(Blockly.Blocks, ControlsFlowStatementsBlock.type_name, new ControlsFlowStatementsBlock());
+			Script.Set(Blockly.Blocks, MathNumberBlock.type_name, new MathNumberBlock());
+			Script.Set(Blockly.Blocks, MathArithmeticBlock.type_name, new MathArithmeticBlock());
+			Script.Set(Blockly.Blocks, MathSingleBlock.type_name, new MathSingleBlock());
+			Script.Set(Blockly.Blocks, MathTrigBlock.type_name, new MathTrigBlock());
+			Script.Set(Blockly.Blocks, MathConstantBlock.type_name, new MathConstantBlock());
+			Script.Set(Blockly.Blocks, MathNumberPropertyBlock.type_name, new MathNumberPropertyBlock());
+			Script.Set(Blockly.Blocks, MathChangeBlock.type_name, new MathChangeBlock());
+			Script.Set(Blockly.Blocks, MathRoundBlock.type_name, new MathRoundBlock());
+			Script.Set(Blockly.Blocks, MathOnListBlock.type_name, new MathOnListBlock());
+			Script.Set(Blockly.Blocks, MathModuloBlock.type_name, new MathModuloBlock());
+			Script.Set(Blockly.Blocks, MathConstrainBlock.type_name, new MathConstrainBlock());
+			Script.Set(Blockly.Blocks, MathRandomIntBlock.type_name, new MathRandomIntBlock());
+			Script.Set(Blockly.Blocks, MathRandomFloatBlock.type_name, new MathRandomFloatBlock());
+			Script.Set(Blockly.Blocks, ProceduresDefnoreturnBlock.type_name, new ProceduresDefnoreturnBlock());
+			Script.Set(Blockly.Blocks, ProceduresDefreturnBlock.type_name, new ProceduresDefreturnBlock());
+			Script.Set(Blockly.Blocks, ProceduresMutatorcontainerBlock.type_name, new ProceduresMutatorcontainerBlock());
+			Script.Set(Blockly.Blocks, ProceduresMutatorargBlock.type_name, new ProceduresMutatorargBlock());
+			Script.Set(Blockly.Blocks, ProceduresCallnoreturnBlock.type_name, new ProceduresCallnoreturnBlock());
+			Script.Set(Blockly.Blocks, ProceduresCallreturnBlock.type_name, new ProceduresCallreturnBlock());
+			Script.Set(Blockly.Blocks, ProceduresIfreturnBlock.type_name, new ProceduresIfreturnBlock());
+			Script.Set(Blockly.Blocks, TextBlock.type_name, new TextBlock());
+			Script.Set(Blockly.Blocks, TextJoinBlock.type_name, new TextJoinBlock());
+			Script.Set(Blockly.Blocks, TextCreateJoinContainerBlock.type_name, new TextCreateJoinContainerBlock());
+			Script.Set(Blockly.Blocks, TextCreateJoinItemBlock.type_name, new TextCreateJoinItemBlock());
+			Script.Set(Blockly.Blocks, TextAppendBlock.type_name, new TextAppendBlock());
+			Script.Set(Blockly.Blocks, TextLengthBlock.type_name, new TextLengthBlock());
+			Script.Set(Blockly.Blocks, TextIsEmptyBlock.type_name, new TextIsEmptyBlock());
+			Script.Set(Blockly.Blocks, TextIndexOfBlock.type_name, new TextIndexOfBlock());
+			Script.Set(Blockly.Blocks, TextCharAtBlock.type_name, new TextCharAtBlock());
+			Script.Set(Blockly.Blocks, TextGetSubstringBlock.type_name, new TextGetSubstringBlock());
+			Script.Set(Blockly.Blocks, TextChangeCaseBlock.type_name, new TextChangeCaseBlock());
+			Script.Set(Blockly.Blocks, TextTrimBlock.type_name, new TextTrimBlock());
+			Script.Set(Blockly.Blocks, TextPrintBlock.type_name, new TextPrintBlock());
+			Script.Set(Blockly.Blocks, TextPromptExtBlock.type_name, new TextPromptExtBlock());
+			Script.Set(Blockly.Blocks, TextPromptBlock.type_name, new TextPromptBlock());
+			Script.Set(Blockly.Blocks, VariablesGetBlock.type_name, new VariablesGetBlock());
+			Script.Set(Blockly.Blocks, VariablesSetBlock.type_name, new VariablesSetBlock());
+			Script.Set(Blockly.Blocks, ENodeInitializeBlock.type_name, new ENodeInitializeBlock());
+			Script.Set(Blockly.Blocks, EObjectInitializeBlock.type_name, new EObjectInitializeBlock());
+			Script.Set(Blockly.Blocks, EPropertyFixLenBlock.type_name, new EPropertyFixLenBlock());
+			Script.Set(Blockly.Blocks, EPropertyFixLenContainerBlock.type_name, new EPropertyFixLenContainerBlock());
+			Script.Set(Blockly.Blocks, EPropertyFixLenConstBlock.type_name, new EPropertyFixLenConstBlock());
+			Script.Set(Blockly.Blocks, EPropertyFixLenRangeBlock.type_name, new EPropertyFixLenRangeBlock());
+			Script.Set(Blockly.Blocks, EPropertyFixLenDefaultBlock.type_name, new EPropertyFixLenDefaultBlock());
+			Script.Set(Blockly.Blocks, EPropertyVarLenBlock.type_name, new EPropertyVarLenBlock());
+			Script.Set(Blockly.Blocks, EcnlPropertyAttributeBlock.type_name, new EcnlPropertyAttributeBlock());
+			Script.Set(Blockly.Blocks, EcnlServiceCodeBlock.type_name, new EcnlServiceCodeBlock());
+			Script.Set(Blockly.Blocks, EcnlNodeIDBlock.type_name, new EcnlNodeIDBlock());
+			Script.Set(Blockly.Blocks, EcnlSaveReceivedPropertyBlock.type_name, new EcnlSaveReceivedPropertyBlock());
+			Script.Set(Blockly.Blocks, EcnlGetSavedPropertyBlock.type_name, new EcnlGetSavedPropertyBlock());
+			Script.Set(Blockly.Blocks, EcnlGetPropertyInfoBlock.type_name, new EcnlGetPropertyInfoBlock());
+			Script.Set(Blockly.Blocks, EcnlSetAnnounceRequestBlock.type_name, new EcnlSetAnnounceRequestBlock());
+			Script.Set(Blockly.Blocks, EcnlDataToNumberBlock.type_name, new EcnlDataToNumberBlock());
+			Script.Set(Blockly.Blocks, EcnlNumberToDataBlock.type_name, new EcnlNumberToDataBlock());
+			Script.Set(Blockly.Blocks, EcnlNoOpBlock.type_name, new EcnlNoOpBlock());
+			Script.Set(Blockly.Blocks, EcnlReceivedDataBlock.type_name, new EcnlReceivedDataBlock());
+			Script.Set(Blockly.Blocks, EcnlReceivedDataSizeBlock.type_name, new EcnlReceivedDataSizeBlock());
+			Script.Set(Blockly.Blocks, DataJoinBlock.type_name, new DataJoinBlock());
+			Script.Set(Blockly.Blocks, DataCreateJoinContainerBlock.type_name, new DataCreateJoinContainerBlock());
+			Script.Set(Blockly.Blocks, DataCreateJoinItemBlock.type_name, new DataCreateJoinItemBlock());
+			Script.Set(Blockly.Blocks, CreateEsvGetBlock.type_name, new CreateEsvGetBlock());
+			Script.Set(Blockly.Blocks, CreateEsvSetBlock.type_name, new CreateEsvSetBlock());
+			Script.Set(Blockly.Blocks, EsvAddEdtBlock.type_name, new EsvAddEdtBlock());
+			Script.Set(Blockly.Blocks, EsvAddEpcBlock.type_name, new EsvAddEpcBlock());
+			Script.Set(Blockly.Blocks, SendEsvBlock.type_name, new SendEsvBlock());
+			Script.Set(Blockly.Blocks, ReleaseEsvBlock.type_name, new ReleaseEsvBlock());
+			Script.Set(Blockly.Blocks, NotifyInitialEsvBlock.type_name, new NotifyInitialEsvBlock());
+			Script.Set(Blockly.Blocks, EsvGetEsvBlock.type_name, new EsvGetEsvBlock());
+			Script.Set(Blockly.Blocks, EsvIterateBlock.type_name, new EsvIterateBlock());
+			Script.Set(Blockly.Blocks, EsvIteratorBlock.type_name, new EsvIteratorBlock());
+			Script.Set(Blockly.Blocks, SvctaskSetTimerBlock.type_name, new SvctaskSetTimerBlock());
+			Script.Set(Blockly.Blocks, SvctaskTimerBlock.type_name, new SvctaskTimerBlock());
+			Script.Set(Blockly.Blocks, SvctaskProgressBlock.type_name, new SvctaskProgressBlock());
+			Script.Set(Blockly.Blocks, SvctaskRecvMsgBlock.type_name, new SvctaskRecvMsgBlock());
+			Script.Set(Blockly.Blocks, SvctaskCallTimeoutBlock.type_name, new SvctaskCallTimeoutBlock());
+			Script.Set(Blockly.Blocks, SvctaskIsMatchBlock.type_name, new SvctaskIsMatchBlock());
+			Script.Set(Blockly.Blocks, CallBlock.type_name, new CallBlock());
+			Script.Set(Blockly.Blocks, PinModeBlock.type_name, new PinModeBlock());
+			Script.Set(Blockly.Blocks, DigitalWriteBlock.type_name, new DigitalWriteBlock());
+			Script.Set(Blockly.Blocks, DigitalReadBlock.type_name, new DigitalReadBlock());
+			Script.Set(Blockly.Blocks, AnalogReadBlock.type_name, new AnalogReadBlock());
+			Script.Set(Blockly.Blocks, PwmBlock.type_name, new PwmBlock());
+			Script.Set(Blockly.Blocks, PwmValueBlock.type_name, new PwmValueBlock());
+			Script.Set(Blockly.Blocks, AnalogReferenceBlock.type_name, new AnalogReferenceBlock());
+			Script.Set(Blockly.Blocks, InitDacBlock.type_name, new InitDacBlock());
+			Script.Set(Blockly.Blocks, AnalogDacBlock.type_name, new AnalogDacBlock());
+			Script.Set(Blockly.Blocks, DacValueBlock.type_name, new DacValueBlock());
+			Script.Set(Blockly.Blocks, DelayBlock.type_name, new DelayBlock());
+			Script.Set(Blockly.Blocks, MillisBlock.type_name, new MillisBlock());
+			Script.Set(Blockly.Blocks, MicrosBlock.type_name, new MicrosBlock());
+			Script.Set(Blockly.Blocks, LedBlock.type_name, new LedBlock());
+			Script.Set(Blockly.Blocks, BitBlock.type_name, new BitBlock());
+			Script.Set(Blockly.Blocks, ToneBlock.type_name, new ToneBlock());
+			Script.Set(Blockly.Blocks, ToneValueBlock.type_name, new ToneValueBlock());
+			Script.Set(Blockly.Blocks, NoToneBlock.type_name, new NoToneBlock());
+			Script.Set(Blockly.Blocks, RandomSeedBlock.type_name, new RandomSeedBlock());
+			Script.Set(Blockly.Blocks, RandomBlock.type_name, new RandomBlock());
+			Script.Set(Blockly.Blocks, I2cNewBlock.type_name, new I2cNewBlock());
+			Script.Set(Blockly.Blocks, I2cWriteBlock.type_name, new I2cWriteBlock());
+			Script.Set(Blockly.Blocks, I2cReadBlock.type_name, new I2cReadBlock());
+			Script.Set(Blockly.Blocks, I2cBeginBlock.type_name, new I2cBeginBlock());
+			Script.Set(Blockly.Blocks, I2cLwriteBlock.type_name, new I2cLwriteBlock());
+			Script.Set(Blockly.Blocks, I2cEndBlock.type_name, new I2cEndBlock());
+			Script.Set(Blockly.Blocks, I2cRequestBlock.type_name, new I2cRequestBlock());
+			Script.Set(Blockly.Blocks, I2cLreadBlock.type_name, new I2cLreadBlock());
+			Script.Set(Blockly.Blocks, I2cAvailableBlock.type_name, new I2cAvailableBlock());
+			Script.Set(Blockly.Blocks, I2cFrequencyBlock.type_name, new I2cFrequencyBlock());
+			Script.Set(Blockly.Blocks, MemFileOpenBlock.type_name, new MemFileOpenBlock());
+			Script.Set(Blockly.Blocks, MemFileCloseBlock.type_name, new MemFileCloseBlock());
+			Script.Set(Blockly.Blocks, MemFileReadBlock.type_name, new MemFileReadBlock());
+			Script.Set(Blockly.Blocks, MemFileWriteBlock.type_name, new MemFileWriteBlock());
+			Script.Set(Blockly.Blocks, MemFileSeekBlock.type_name, new MemFileSeekBlock());
+			Script.Set(Blockly.Blocks, MemFileCpBlock.type_name, new MemFileCpBlock());
+			Script.Set(Blockly.Blocks, MemFileRmBlock.type_name, new MemFileRmBlock());
+			Script.Set(Blockly.Blocks, RtcYearBlock.type_name, new RtcYearBlock());
+			Script.Set(Blockly.Blocks, RtcMonthBlock.type_name, new RtcMonthBlock());
+			Script.Set(Blockly.Blocks, RtcDayBlock.type_name, new RtcDayBlock());
+			Script.Set(Blockly.Blocks, RtcHourBlock.type_name, new RtcHourBlock());
+			Script.Set(Blockly.Blocks, RtcMinuteBlock.type_name, new RtcMinuteBlock());
+			Script.Set(Blockly.Blocks, RtcSecondBlock.type_name, new RtcSecondBlock());
+			Script.Set(Blockly.Blocks, RtcWeekDayBlock.type_name, new RtcWeekDayBlock());
+			Script.Set(Blockly.Blocks, RtcDateTimeBlock.type_name, new RtcDateTimeBlock());
+			Script.Set(Blockly.Blocks, RtcDateTimeItemBlock.type_name, new RtcDateTimeItemBlock());
+			Script.Set(Blockly.Blocks, RtcSetDateTimeItemBlock.type_name, new RtcSetDateTimeItemBlock());
+			Script.Set(Blockly.Blocks, RtcGetTimeBlock.type_name, new RtcGetTimeBlock());
+			Script.Set(Blockly.Blocks, RtcSettimeBlock.type_name, new RtcSettimeBlock());
+			Script.Set(Blockly.Blocks, RtcDeinitBlock.type_name, new RtcDeinitBlock());
+			Script.Set(Blockly.Blocks, RtcInitBlock.type_name, new RtcInitBlock());
+			Script.Set(Blockly.Blocks, SdExistsBlock.type_name, new SdExistsBlock());
+			Script.Set(Blockly.Blocks, SdMkdirBlock.type_name, new SdMkdirBlock());
+			Script.Set(Blockly.Blocks, SdRemoveBlock.type_name, new SdRemoveBlock());
+			Script.Set(Blockly.Blocks, SdCopyBlock.type_name, new SdCopyBlock());
+			Script.Set(Blockly.Blocks, SdRmdirBlock.type_name, new SdRmdirBlock());
+			Script.Set(Blockly.Blocks, SdOpenBlock.type_name, new SdOpenBlock());
+			Script.Set(Blockly.Blocks, SdCloseBlock.type_name, new SdCloseBlock());
+			Script.Set(Blockly.Blocks, SdReadBlock.type_name, new SdReadBlock());
+			Script.Set(Blockly.Blocks, SdSeekBlock.type_name, new SdSeekBlock());
+			Script.Set(Blockly.Blocks, SdWriteBlock.type_name, new SdWriteBlock());
+			Script.Set(Blockly.Blocks, SdFlushBlock.type_name, new SdFlushBlock());
+			Script.Set(Blockly.Blocks, SdSizeBlock.type_name, new SdSizeBlock());
+			Script.Set(Blockly.Blocks, SdPositionBlock.type_name, new SdPositionBlock());
+			Script.Set(Blockly.Blocks, BpsValueBlock.type_name, new BpsValueBlock());
+			Script.Set(Blockly.Blocks, SerialNewBlock.type_name, new SerialNewBlock());
+			Script.Set(Blockly.Blocks, SerialBpsBlock.type_name, new SerialBpsBlock());
+			Script.Set(Blockly.Blocks, SerialPrintBlock.type_name, new SerialPrintBlock());
+			Script.Set(Blockly.Blocks, SerialPrintlnBlock.type_name, new SerialPrintlnBlock());
+			Script.Set(Blockly.Blocks, SerialAvailableBlock.type_name, new SerialAvailableBlock());
+			Script.Set(Blockly.Blocks, SerialReadBlock.type_name, new SerialReadBlock());
+			Script.Set(Blockly.Blocks, SerialWriteBlock.type_name, new SerialWriteBlock());
+			Script.Set(Blockly.Blocks, SerialFlashBlock.type_name, new SerialFlashBlock());
+			Script.Set(Blockly.Blocks, ServoAttachBlock.type_name, new ServoAttachBlock());
+			Script.Set(Blockly.Blocks, ServoWriteBlock.type_name, new ServoWriteBlock());
+			Script.Set(Blockly.Blocks, ServoAngleBlock.type_name, new ServoAngleBlock());
+			Script.Set(Blockly.Blocks, ServoUsBlock.type_name, new ServoUsBlock());
+			Script.Set(Blockly.Blocks, ServoUsValueBlock.type_name, new ServoUsValueBlock());
+			Script.Set(Blockly.Blocks, ServoReadBlock.type_name, new ServoReadBlock());
+			Script.Set(Blockly.Blocks, ServoAttachedBlock.type_name, new ServoAttachedBlock());
+			Script.Set(Blockly.Blocks, ServoDetachBlock.type_name, new ServoDetachBlock());
+			Script.Set(Blockly.Blocks, SystemExitBlock.type_name, new SystemExitBlock());
+			Script.Set(Blockly.Blocks, SystemSetRunBlock.type_name, new SystemSetRunBlock());
+			Script.Set(Blockly.Blocks, SystemVersionBlock.type_name, new SystemVersionBlock());
+			Script.Set(Blockly.Blocks, SystemPushBlock.type_name, new SystemPushBlock());
+			Script.Set(Blockly.Blocks, SystemPopBlock.type_name, new SystemPopBlock());
+			Script.Set(Blockly.Blocks, SystemFileLoadBlock.type_name, new SystemFileLoadBlock());
+			Script.Set(Blockly.Blocks, SystemResetBlock.type_name, new SystemResetBlock());
+			Script.Set(Blockly.Blocks, SystemUseSdBlock.type_name, new SystemUseSdBlock());
+			Script.Set(Blockly.Blocks, SystemUseWifiBlock.type_name, new SystemUseWifiBlock());
+			Script.Set(Blockly.Blocks, SystemGetMrbPathBlock.type_name, new SystemGetMrbPathBlock());
+			Script.Set(Blockly.Blocks, HexadecimalBlock.type_name, new HexadecimalBlock());
+			Blockly.Procedures = new Procedures();
+			Blockly.Variables = new Variables();
+			Blockly.Names = new Names("");
+		}
+
+		public BlocklyView(string identifier)
+		{
+			Identifier = identifier;
+
+			FlyoutCategoryHandlers.Add(Blockly.Procedures.NAME_TYPE, Blockly.Procedures.flyoutCategory);
+			FlyoutCategoryHandlers.Add(Blockly.Variables.NAME_TYPE, Blockly.Variables.flyoutCategory);
+		}
+
+		public Workspace Init()
+		{
+			var tab = jQuery.Select("#block-tab-right-pane");
+			// <div dir="LTR" id="blockly-div"></div>
+			var div = new jQuery("<div>");
+			div.Attr("dir", "LTR");
+			div.Attr("class", "blockly-div");
+			_IdNo = No++;
+			_WorkspaceElementId = "blockly-div" + _IdNo;
+			div.Attr("id", _WorkspaceElementId);
+			div.Attr("style", "z-index: " + _IdNo);
+			tab.Append(div);
+
+			Blockly.HSV_SATURATION = 1.0;
+			Blockly.HSV_VALUE = 0.8;
+			_Workspace = Blockly.inject(_WorkspaceElementId, new {
+				toolbox = Document.GetElementById("toolbox"),
+				collapse = true,
+				comments = true,
+				disable = true,
+				maxBlocks = Script.Infinity,
+				trashcan = true,
+				horizontalLayout = false,
+				toolboxPosition = "start",
+				css = true,
+				rtl = false,
+				scrollbars = true,
+				sounds = false,
+				oneBasedIndex = false,
+				zoom = new {
+					controls = true,
+					wheel = true,
+					startScale = 0.8,
+					maxcale = 3,
+					minScale = 0.3
+				}
+			});
+
+			if (No != 2)
+				Hide();
+			else
+				Show();
+
+			Script.Set(Script.Get(Script.Get(_Workspace, "toolbox_"), "flyout_"),
+				"flyoutCategory",
+				new Func<Union<string, Element[]>, Workspace, Element[]>(FlyoutCategory));
+
+			_Workspace.addChangeListener(Workspace_Changed);
+
+			return _Workspace;
+		}
+
+		internal void Dispose()
+		{
+			jQuery.Select("#" + _WorkspaceElementId).Remove();
+			_Workspace.clear();
+			_Workspace.dispose();
+		}
+
+		internal void Show()
+		{
+			var div = jQuery.Select("#" + _WorkspaceElementId);
+			div.Attr("style", "z-index: " + (_IdNo + 100));
+
+			Blockly.mainWorkspace = _Workspace;
+		}
+
+		internal void Hide()
+		{
+			var div = jQuery.Select("#" + _WorkspaceElementId);
+			div.Attr("style", "z-index: " + _IdNo);
+		}
+
+		private void Workspace_Changed(Abstract e)
+		{
+			Changed = true;
+
+			switch (e.type) {
+			case WebMrbc.Events.CREATE:
+				Create cre = (Create)e;
+				BlockCreated?.Invoke(this, cre);
+				break;
+			case WebMrbc.Events.DELETE:
+				Delete del = (Delete)e;
+				BlockDeleted?.Invoke(this, del);
+				break;
+			case WebMrbc.Events.CHANGE:
+				Change chg = (Change)e;
+				BlockChanged?.Invoke(this, chg);
+				break;
+			case WebMrbc.Events.MOVE:
+				Move mov = (Move)e;
+				BlockMoveed?.Invoke(this, mov);
+				break;
+			case WebMrbc.Events.UI:
+				Ui ui = (Ui)e;
+				UiEvent?.Invoke(this, ui);
+				break;
+			}
+		}
+
+		internal void ReloadToolbox(IClassWorkspace workspace)
+		{
+			if (_Workspace != workspace.Workspace)
+				throw new Exception();
+
+			Blockly.mainWorkspace = _Workspace;
+			Blockly.hideChaff();
+
+			var toolbox = Document.CreateElement<HTMLElement>("xml");
+			toolbox.InnerHTML = Document.GetElementById("toolbox").InnerHTML;
+			workspace.ReloadToolbox(toolbox);
+
+			_Workspace.updateToolbox(toolbox);
+		}
+
+		public virtual Element[] FlyoutCategory(Union<string, Element[]> name, Workspace workspace)
+		{
+			if (!name.Is<string>())
+				return name.Cast<Element[]>();
+
+			FlyoutCategoryHandler handler;
+			if (FlyoutCategoryHandlers.TryGetValue(name.Cast<string>(), out handler)) {
+				return handler(workspace);
+			}
+			return new Element[0];
+		}
+	}
+
+	public delegate Element[] FlyoutCategoryHandler(Workspace workspace);
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Colour.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Colour.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Colour.cs	(revision 270)
@@ -0,0 +1,175 @@
+/**
+ * @license
+ * Visual Blocks Editor
+ *
+ * Copyright 2012 Google Inc.
+ * https://developers.google.com/blockly/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview Colour blocks for Blockly.
+ * @author fraser@google.com (Neil Fraser)
+ */
+using System;
+using System.Linq;
+using System.Text;
+using Bridge;
+using Bridge.Html5;
+using Bridge.jQuery2;
+
+namespace WebMrbc
+{
+	public class Colour
+	{
+		/**
+		 * Common HSV hue for all blocks in this category.
+		 */
+		public static int HUE = 20;
+	}
+
+	public class ColourPickerBlock : Block
+	{
+		public const string type_name = "colour_picker";
+
+		public ColourPickerBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for colour picker.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1",
+				args0 = new object[] {
+					new {
+						type = "field_colour",
+						name = "COLOUR",
+						colour = "#ff0000"
+					}
+				},
+				output = "Colour",
+				colour = Colour.HUE,
+				helpUrl = Msg.COLOUR_PICKER_HELPURL
+			});
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			// Colour block is trivial.  Use tooltip of parent block if it exists.
+			this.setTooltip(new Func<string>(() => {
+				var parent = thisBlock.getParent();
+				return (parent != null && parent.getInputsInline() && !String.IsNullOrEmpty(parent.tooltip)) ? parent.tooltip :
+					Msg.COLOUR_PICKER_TOOLTIP;
+			}));
+		}
+	}
+
+	public class ColourRandomBlock : Block
+	{
+		public const string type_name = "colour_random";
+
+		public ColourRandomBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for random colour.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.COLOUR_RANDOM_TITLE,
+				output = "Colour",
+				colour = Colour.HUE,
+				tooltip = Msg.COLOUR_RANDOM_TOOLTIP,
+				helpUrl = Msg.COLOUR_RANDOM_HELPURL
+			});
+		}
+	}
+
+	public class ColourRGBBlock : Block
+	{
+		public const string type_name = "colour_rgb";
+
+		public ColourRGBBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for composing a colour from RGB components.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.setHelpUrl(Msg.COLOUR_RGB_HELPURL);
+			this.setColour(Colour.HUE);
+			this.appendValueInput("RED")
+				.setCheck("Number")
+				.setAlign(Blockly.ALIGN_RIGHT)
+				.appendField(Msg.COLOUR_RGB_TITLE)
+				.appendField(Msg.COLOUR_RGB_RED);
+			this.appendValueInput("GREEN")
+				.setCheck("Number")
+				.setAlign(Blockly.ALIGN_RIGHT)
+				.appendField(Msg.COLOUR_RGB_GREEN);
+			this.appendValueInput("BLUE")
+				.setCheck("Number")
+				.setAlign(Blockly.ALIGN_RIGHT)
+				.appendField(Msg.COLOUR_RGB_BLUE);
+			this.setOutput(true, "Colour");
+			this.setTooltip(Msg.COLOUR_RGB_TOOLTIP);
+		}
+	}
+
+	public class ColourBlendBlock : Block
+	{
+		public const string type_name = "colour_blend";
+
+		public ColourBlendBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for blending two colours together.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.setHelpUrl(Msg.COLOUR_BLEND_HELPURL);
+			this.setColour(Colour.HUE);
+			this.appendValueInput("COLOUR1")
+				.setCheck("Colour")
+				.setAlign(Blockly.ALIGN_RIGHT)
+				.appendField(Msg.COLOUR_BLEND_TITLE)
+				.appendField(Msg.COLOUR_BLEND_COLOUR1);
+			this.appendValueInput("COLOUR2")
+				.setCheck("Colour")
+				.setAlign(Blockly.ALIGN_RIGHT)
+				.appendField(Msg.COLOUR_BLEND_COLOUR2);
+			this.appendValueInput("RATIO")
+				.setCheck("Number")
+				.setAlign(Blockly.ALIGN_RIGHT)
+				.appendField(Msg.COLOUR_BLEND_RATIO);
+			this.setOutput(true, "Colour");
+			this.setTooltip(Msg.COLOUR_BLEND_TOOLTIP);
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Lists.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Lists.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Lists.cs	(revision 270)
@@ -0,0 +1,1028 @@
+/**
+ * @license
+ * Visual Blocks Editor
+ *
+ * Copyright 2012 Google Inc.
+ * https://developers.google.com/blockly/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview List blocks for Blockly.
+ * @author fraser@google.com (Neil Fraser)
+ */
+using System;
+using System.Linq;
+using System.Text;
+using Bridge;
+using Bridge.Html5;
+using Bridge.jQuery2;
+
+namespace WebMrbc
+{
+	public class Lists
+	{
+		/**
+		 * Common HSV hue for all blocks in this category.
+		 */
+		public static int HUE = 260;
+	}
+
+	public class ListsCreateEmptyBlock : Block
+	{
+		public const string type_name = "lists_create_empty";
+
+		public ListsCreateEmptyBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for creating an empty list.
+		 * The "list_create_with" block is preferred as it is more flexible.
+		 * <block type="lists_create_with">
+		 *   <mutation items="0"></mutation>
+		 * </block>
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.LISTS_CREATE_EMPTY_TITLE,
+				output = "Array",
+				colour = Lists.HUE,
+				tooltip = Msg.LISTS_CREATE_EMPTY_TOOLTIP,
+				helpUrl = Msg.LISTS_CREATE_EMPTY_HELPURL
+			});
+		}
+	}
+
+	public class ListsCreateWithBlock : Block
+	{
+		public const string type_name = "lists_create_with";
+		internal int itemCount_;
+
+		public ListsCreateWithBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for creating a list with any number of elements of any type.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.setHelpUrl(Msg.LISTS_CREATE_WITH_HELPURL);
+			this.setColour(Lists.HUE);
+			this.itemCount_ = 3;
+			this.updateShape_();
+			this.setOutput(true, "Array");
+			this.setMutator(new Mutator(new[] { ListsCreateWithItemBlock.type_name }));
+			this.setTooltip(Msg.LISTS_CREATE_WITH_TOOLTIP);
+		}
+
+		/**
+		 * Create XML to represent list inputs.
+		 * @return {!Element} XML storage element.
+		 * @this Blockly.Block
+		 */
+		public Element mutationToDom()
+		{
+			var container = Document.CreateElement("mutation");
+			container.SetAttribute("items", this.itemCount_.ToString());
+			return container;
+		}
+
+		/**
+		 * Parse XML to restore the list inputs.
+		 * @param {!Element} xmlElement XML storage element.
+		 * @this Blockly.Block
+		 */
+		public void domToMutation(Element xmlElement)
+		{
+			var times = xmlElement.GetAttribute("items");
+			this.itemCount_ = times == null ? 0 : Script.ParseInt(times, 10);
+			this.updateShape_();
+		}
+
+		/**
+		 * Populate the mutator's dialog with this block's components.
+		 * @param {!Workspace} workspace Mutator's workspace.
+		 * @return {!Blockly.Block} Root block in mutator.
+		 * @this Blockly.Block
+		 */
+		public Block decompose(Workspace workspace)
+		{
+			var containerBlock = workspace.newBlock(ListsCreateWithContainerBlock.type_name);
+			containerBlock.initSvg();
+			var connection = containerBlock.getInput("STACK").connection;
+			for (var i = 0; i < this.itemCount_; i++) {
+				var itemBlock = workspace.newBlock(ListsCreateWithItemBlock.type_name);
+				itemBlock.initSvg();
+				connection.connect(itemBlock.previousConnection);
+				connection = itemBlock.nextConnection;
+			}
+			return containerBlock;
+		}
+
+		/**
+		 * Reconfigure this block based on the mutator dialog's components.
+		 * @param {!Blockly.Block} containerBlock Root block in mutator.
+		 * @this Blockly.Block
+		 */
+		public void compose(Block containerBlock)
+		{
+			var itemBlock = (ListsCreateWithItemBlock)containerBlock.getInputTargetBlock("STACK");
+			// Count number of inputs.
+			var connections = new Connection[0];
+			while (itemBlock != null) {
+				connections.Push(itemBlock.valueConnection_);
+				itemBlock = (itemBlock.nextConnection != null) ?
+					(ListsCreateWithItemBlock)itemBlock.nextConnection.targetBlock() : null;
+			}
+			// Disconnect any children that don"t belong.
+			for (var i = 0; i < this.itemCount_; i++) {
+				var connection = this.getInput("ADD" + i).connection.targetConnection;
+				if (connection != null && Array.IndexOf(connections, connection) == -1) {
+					connection.disconnect();
+				}
+			}
+			this.itemCount_ = connections.Length;
+			this.updateShape_();
+			// Reconnect any child blocks.
+			for (var i = 0; i < this.itemCount_; i++) {
+				Mutator.reconnect(connections[i], this, "ADD" + i);
+			}
+		}
+
+		/**
+		 * Store pointers to any connected child blocks.
+		 * @param {!Blockly.Block} containerBlock Root block in mutator.
+		 * @this Blockly.Block
+		 */
+		public void saveConnections(Block containerBlock)
+		{
+			var itemBlock = (ListsCreateWithItemBlock)containerBlock.getInputTargetBlock("STACK");
+			var i = 0;
+			while (itemBlock != null) {
+				var input = this.getInput("ADD" + i);
+				itemBlock.valueConnection_ = (input != null) ? input.connection.targetConnection : null;
+				i++;
+				itemBlock = (itemBlock.nextConnection != null) ?
+					(ListsCreateWithItemBlock)itemBlock.nextConnection.targetBlock() : null;
+			}
+		}
+
+		/**
+		 * Modify this block to have the correct number of inputs.
+		 * @private
+		 * @this Blockly.Block
+		 */
+		private void updateShape_()
+		{
+			if (this.itemCount_ != 0 && this.getInput("EMPTY") != null) {
+				this.removeInput("EMPTY");
+			}
+			else if (this.itemCount_ == 0 && this.getInput("EMPTY") == null) {
+				this.appendDummyInput("EMPTY")
+					.appendField(Msg.LISTS_CREATE_EMPTY_TITLE);
+			}
+			// Add new inputs.
+			int i;
+			for (i = 0; i < this.itemCount_; i++) {
+				if (this.getInput("ADD" + i) == null) {
+					var input = this.appendValueInput("ADD" + i);
+					if (i == 0) {
+						input.appendField(Msg.LISTS_CREATE_WITH_INPUT_WITH);
+					}
+				}
+			}
+			// Remove deleted inputs.
+			while (this.getInput("ADD" + i) != null) {
+				this.removeInput("ADD" + i);
+				i++;
+			}
+		}
+	}
+
+	public class ListsCreateWithContainerBlock : Block
+	{
+		public const string type_name = "lists_create_with_container";
+
+		public ListsCreateWithContainerBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Mutator block for list container.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.setColour(Lists.HUE);
+			this.appendDummyInput()
+				.appendField(Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD);
+			this.appendStatementInput("STACK");
+			this.setTooltip(Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP);
+			this.contextMenu = false;
+		}
+	}
+
+	[IgnoreCast]
+	public class ListsCreateWithItemBlock : Block
+	{
+		public const string type_name = "lists_create_with_item";
+		public Connection valueConnection_;
+
+		public ListsCreateWithItemBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Mutator bolck for adding items.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.setColour(Lists.HUE);
+			this.appendDummyInput()
+				.appendField(Msg.LISTS_CREATE_WITH_ITEM_TITLE);
+			this.setPreviousStatement(true);
+			this.setNextStatement(true);
+			this.setTooltip(Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP);
+			this.contextMenu = false;
+		}
+	}
+
+	public class ListsRepeatBlock : Block
+	{
+		public const string type_name = "lists_repeat";
+
+		public ListsRepeatBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for creating a list with one element repeated.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.LISTS_REPEAT_TITLE,
+				args0 = new object[] {
+					new {
+						type = "input_value",
+						name = "ITEM"
+					},
+					new {
+						type = "input_value",
+						name = "NUM",
+						check = "Number"
+					}
+				},
+				output = "Array",
+				colour = Lists.HUE,
+				tooltip = Msg.LISTS_REPEAT_TOOLTIP,
+				helpUrl = Msg.LISTS_REPEAT_HELPURL
+			});
+		}
+	}
+
+	public class ListsLengthBlock : Block
+	{
+		public const string type_name = "lists_length";
+
+		public ListsLengthBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for list length.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.LISTS_LENGTH_TITLE,
+				args0 = new object[] {
+					new {
+						type = "input_value",
+						name = "VALUE",
+						check = new [] { "String", "Array" }
+					}
+				},
+				output = "Number",
+				colour = Lists.HUE,
+				tooltip = Msg.LISTS_LENGTH_TOOLTIP,
+				helpUrl = Msg.LISTS_LENGTH_HELPURL
+			});
+		}
+	}
+
+	public class ListsIsEmptyBlock : Block
+	{
+		public const string type_name = "lists_isEmpty";
+
+		public ListsIsEmptyBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for is the list empty?
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.LISTS_ISEMPTY_TITLE,
+				args0 = new object[] {
+					new {
+						type = "input_value",
+						name = "VALUE",
+						check = new [] { "String", "Array" }
+					}
+				},
+				output = "Boolean",
+				colour = Lists.HUE,
+				tooltip = Msg.LISTS_ISEMPTY_TOOLTIP,
+				helpUrl = Msg.LISTS_ISEMPTY_HELPURL
+			});
+		}
+	}
+
+	public class ListsIndexOfBlock : Block
+	{
+		public const string type_name = "lists_indexOf";
+
+		public ListsIndexOfBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for finding an item in the list.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			var OPERATORS = new [] {
+				new [] {Msg.LISTS_INDEX_OF_FIRST, "FIRST"},
+				new [] {Msg.LISTS_INDEX_OF_LAST, "LAST"}
+			};
+			this.setHelpUrl(Msg.LISTS_INDEX_OF_HELPURL);
+			this.setColour(Lists.HUE);
+			this.setOutput(true, "Number");
+			this.appendValueInput("VALUE")
+				.setCheck("Array")
+				.appendField(Msg.LISTS_INDEX_OF_INPUT_IN_LIST);
+			this.appendValueInput("FIND")
+				.appendField(new FieldDropdown(OPERATORS), "END");
+			this.setInputsInline(true);
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			this.setTooltip(new Func<string>(() => {
+				return Msg.LISTS_INDEX_OF_TOOLTIP.Replace("%1",
+					this.workspace.options.oneBasedIndex ? "0" : "-1");
+			}));
+		}
+	}
+
+	public class ListsGetIndexBlock : Block
+	{
+		public const string type_name = "lists_getIndex";
+		string[][] WHERE_OPTIONS;
+
+		public ListsGetIndexBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for getting element at index.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			var MODE = new[] {
+				new [] {Msg.LISTS_GET_INDEX_GET, "GET"},
+				new [] {Msg.LISTS_GET_INDEX_GET_REMOVE, "GET_REMOVE"},
+				new [] {Msg.LISTS_GET_INDEX_REMOVE, "REMOVE"}
+			};
+			this.WHERE_OPTIONS = new string[][] {
+				new [] {Msg.LISTS_GET_INDEX_FROM_START, "FROM_START"},
+				new [] {Msg.LISTS_GET_INDEX_FROM_END, "FROM_END"},
+				new [] {Msg.LISTS_GET_INDEX_FIRST, "FIRST"},
+				new [] {Msg.LISTS_GET_INDEX_LAST, "LAST"},
+				new [] {Msg.LISTS_GET_INDEX_RANDOM, "RANDOM"}
+			};
+			this.setHelpUrl(Msg.LISTS_GET_INDEX_HELPURL);
+			this.setColour(Lists.HUE);
+			var modeMenu = new FieldDropdown(MODE, (value) => {
+				var isStatement = (value == "REMOVE");
+				this.updateStatement_(isStatement);
+				return Script.Undefined;
+			});
+			this.appendValueInput("VALUE")
+				.setCheck("Array")
+				.appendField(Msg.LISTS_GET_INDEX_INPUT_IN_LIST);
+			this.appendDummyInput()
+				.appendField(modeMenu, "MODE")
+				.appendField("", "SPACE");
+			this.appendDummyInput("AT");
+			if (!String.IsNullOrEmpty(Msg.LISTS_GET_INDEX_TAIL)) {
+				this.appendDummyInput("TAIL")
+					.appendField(Msg.LISTS_GET_INDEX_TAIL);
+			}
+			this.setInputsInline(true);
+			this.setOutput(true);
+			this.updateAt_(true);
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			this.setTooltip(new Func<string>(() => {
+				var mode = thisBlock.getFieldValue("MODE");
+				var where = thisBlock.getFieldValue("WHERE");
+				var tooltip = "";
+				switch (mode + " " + where) {
+				case "GET FROM_START":
+				case "GET FROM_END":
+					tooltip = Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;
+					break;
+				case "GET FIRST":
+					tooltip = Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST;
+					break;
+				case "GET LAST":
+					tooltip = Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST;
+					break;
+				case "GET RANDOM":
+					tooltip = Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;
+					break;
+				case "GET_REMOVE FROM_START":
+				case "GET_REMOVE FROM_END":
+					tooltip = Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;
+					break;
+				case "GET_REMOVE FIRST":
+					tooltip = Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST;
+					break;
+				case "GET_REMOVE LAST":
+					tooltip = Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST;
+					break;
+				case "GET_REMOVE RANDOM":
+					tooltip = Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM;
+					break;
+				case "REMOVE FROM_START":
+				case "REMOVE FROM_END":
+					tooltip = Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM;
+					break;
+				case "REMOVE FIRST":
+					tooltip = Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST;
+					break;
+				case "REMOVE LAST":
+					tooltip = Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST;
+					break;
+				case "REMOVE RANDOM":
+					tooltip = Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM;
+					break;
+				}
+				if (where == "FROM_START" || where == "FROM_END") {
+					var msg = (where == "FROM_START") ?
+						Msg.LISTS_INDEX_FROM_START_TOOLTIP :
+						Msg.LISTS_INDEX_FROM_END_TOOLTIP;
+					tooltip += "  " + msg.Replace("%1",
+							thisBlock.workspace.options.oneBasedIndex ? "#1" : "#0");
+				}
+				return tooltip;
+			}));
+		}
+
+		/**
+		 * Create XML to represent whether the block is a statement or a value.
+		 * Also represent whether there is an "AT" input.
+		 * @return {Element} XML storage element.
+		 * @this Blockly.Block
+		 */
+		public Element mutationToDom()
+		{
+			var container = Document.CreateElement("mutation");
+			var isStatement = this.outputConnection == null;
+			container.SetAttribute("statement", isStatement.ToString());
+			var isAt = this.getInput("AT").type == Blockly.INPUT_VALUE;
+			container.SetAttribute("at", isAt.ToString());
+			return container;
+		}
+
+		/**
+		 * Parse XML to restore the "AT" input.
+		 * @param {!Element} xmlElement XML storage element.
+		 * @this Blockly.Block
+		 */
+		public void domToMutation(Element xmlElement)
+		{
+			// Note: Until January 2013 this block did not have mutations,
+			// so "statement" defaults to false and "at" defaults to true.
+			var isStatement = (xmlElement.GetAttribute("statement") == "true");
+			this.updateStatement_(isStatement);
+			var isAt = (xmlElement.GetAttribute("at") != "false");
+			this.updateAt_(isAt);
+		}
+
+		/**
+		 * Switch between a value block and a statement block.
+		 * @param {boolean} newStatement True if the block should be a statement.
+		 *     False if the block should be a value.
+		 * @private
+		 * @this Blockly.Block
+		 */
+		public void updateStatement_(bool newStatement)
+		{
+			var oldStatement = this.outputConnection == null;
+			if (newStatement != oldStatement) {
+				this.unplug(true);
+				if (newStatement) {
+					this.setOutput(false);
+					this.setPreviousStatement(true);
+					this.setNextStatement(true);
+				}
+				else {
+					this.setPreviousStatement(false);
+					this.setNextStatement(false);
+					this.setOutput(true);
+				}
+			}
+		}
+
+		/**
+		 * Create or delete an input for the numeric index.
+		 * @param {boolean} isAt True if the input should exist.
+		 * @private
+		 * @this Blockly.Block
+		 */
+		public void updateAt_(bool isAt)
+		{
+			// Destroy old "AT" and "ORDINAL" inputs.
+			this.removeInput("AT");
+			this.removeInput("ORDINAL", true);
+			// Create either a value "AT" input or a dummy input.
+			if (isAt) {
+				this.appendValueInput("AT").setCheck("Number");
+				if (!String.IsNullOrEmpty(Msg.ORDINAL_NUMBER_SUFFIX)) {
+					this.appendDummyInput("ORDINAL")
+						.appendField(Msg.ORDINAL_NUMBER_SUFFIX);
+				}
+			}
+			else {
+				this.appendDummyInput("AT");
+			}
+			var menu = new FieldDropdown(this.WHERE_OPTIONS, (value) => {
+				var newAt = (value == "FROM_START") || (value == "FROM_END");
+				// The "isAt" variable is available due to this function being a closure.
+				if (newAt != isAt) {
+					this.updateAt_(newAt);
+					// This menu has been destroyed and replaced.  Update the replacement.
+					this.setFieldValue(value, "WHERE");
+					return null;
+				}
+				return Script.Undefined;
+			});
+			this.getInput("AT").appendField(menu, "WHERE");
+			if (!String.IsNullOrEmpty(Msg.LISTS_GET_INDEX_TAIL)) {
+				this.moveInputBefore("TAIL", null);
+			}
+		}
+	}
+
+	public class ListsSetIndexBlock : Block
+	{
+		public const string type_name = "lists_setIndex";
+		string[][] WHERE_OPTIONS;
+
+		public ListsSetIndexBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for setting the element at index.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			var MODE = new[] {
+				new [] {Msg.LISTS_SET_INDEX_SET, "SET"},
+				new [] {Msg.LISTS_SET_INDEX_INSERT, "INSERT"}
+			};
+			this.WHERE_OPTIONS = new string[][]{
+				new [] {Msg.LISTS_GET_INDEX_FROM_START, "FROM_START"},
+				new [] {Msg.LISTS_GET_INDEX_FROM_END, "FROM_END"},
+				new [] {Msg.LISTS_GET_INDEX_FIRST, "FIRST"},
+				new [] {Msg.LISTS_GET_INDEX_LAST, "LAST"},
+				new [] {Msg.LISTS_GET_INDEX_RANDOM, "RANDOM"}
+			};
+			this.setHelpUrl(Msg.LISTS_SET_INDEX_HELPURL);
+			this.setColour(Lists.HUE);
+			this.appendValueInput("LIST")
+				.setCheck("Array")
+				.appendField(Msg.LISTS_SET_INDEX_INPUT_IN_LIST);
+			this.appendDummyInput()
+				.appendField(new FieldDropdown(MODE), "MODE")
+				.appendField("", "SPACE");
+			this.appendDummyInput("AT");
+			this.appendValueInput("TO")
+				.appendField(Msg.LISTS_SET_INDEX_INPUT_TO);
+			this.setInputsInline(true);
+			this.setPreviousStatement(true);
+			this.setNextStatement(true);
+			this.setTooltip(Msg.LISTS_SET_INDEX_TOOLTIP);
+			this.updateAt_(true);
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			this.setTooltip(new Func<string>(() => {
+				var mode = thisBlock.getFieldValue("MODE");
+				var where = thisBlock.getFieldValue("WHERE");
+				var tooltip = "";
+				switch (mode + " " + where) {
+				case "SET FROM_START":
+				case "SET FROM_END":
+					tooltip = Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM;
+					break;
+				case "SET FIRST":
+					tooltip = Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST;
+					break;
+				case "SET LAST":
+					tooltip = Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST;
+					break;
+				case "SET RANDOM":
+					tooltip = Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM;
+					break;
+				case "INSERT FROM_START":
+				case "INSERT FROM_END":
+					tooltip = Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM;
+					break;
+				case "INSERT FIRST":
+					tooltip = Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST;
+					break;
+				case "INSERT LAST":
+					tooltip = Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST;
+					break;
+				case "INSERT RANDOM":
+					tooltip = Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM;
+					break;
+				}
+				if (where == "FROM_START" || where == "FROM_END") {
+					tooltip += "  " + Msg.LISTS_INDEX_FROM_START_TOOLTIP
+						.Replace("%1",
+							thisBlock.workspace.options.oneBasedIndex ? "#1" : "#0");
+				}
+				return tooltip;
+			}));
+		}
+
+		/**
+		 * Create XML to represent whether there is an "AT" input.
+		 * @return {Element} XML storage element.
+		 * @this Blockly.Block
+		 */
+		public Element mutationToDom()
+		{
+			var container = Document.CreateElement("mutation");
+			var isAt = this.getInput("AT").type == Blockly.INPUT_VALUE;
+			container.SetAttribute("at", isAt.ToString());
+			return container;
+		}
+
+		/**
+		 * Parse XML to restore the "AT" input.
+		 * @param {!Element} xmlElement XML storage element.
+		 * @this Blockly.Block
+		 */
+		public void domToMutation(Element xmlElement)
+		{
+			// Note: Until January 2013 this block did not have mutations,
+			// so "at" defaults to true.
+			var isAt = (xmlElement.GetAttribute("at") != "false");
+			this.updateAt_(isAt);
+		}
+
+		/**
+		 * Create or delete an input for the numeric index.
+		 * @param {boolean} isAt True if the input should exist.
+		 * @private
+		 * @this Blockly.Block
+		 */
+		public void updateAt_(bool isAt)
+		{
+			// Destroy old "AT" and "ORDINAL" input.
+			this.removeInput("AT");
+			this.removeInput("ORDINAL", true);
+			// Create either a value "AT" input or a dummy input.
+			if (isAt) {
+				this.appendValueInput("AT").setCheck("Number");
+				if (!String.IsNullOrEmpty(Msg.ORDINAL_NUMBER_SUFFIX)) {
+					this.appendDummyInput("ORDINAL")
+						.appendField(Msg.ORDINAL_NUMBER_SUFFIX);
+				}
+			}
+			else {
+				this.appendDummyInput("AT");
+			}
+			var menu = new FieldDropdown(this.WHERE_OPTIONS, (value) => {
+				var newAt = (value == "FROM_START") || (value == "FROM_END");
+				// The "isAt" variable is available due to this function being a closure.
+				if (newAt != isAt) {
+					this.updateAt_(newAt);
+					// This menu has been destroyed and replaced.  Update the replacement.
+					this.setFieldValue(value, "WHERE");
+					return null;
+				}
+				return Script.Undefined;
+			});
+			this.moveInputBefore("AT", "TO");
+			if (this.getInput("ORDINAL") != null) {
+				this.moveInputBefore("ORDINAL", "TO");
+			}
+
+			this.getInput("AT").appendField(menu, "WHERE");
+		}
+	}
+
+	public class ListsGetSublistBlock : Block
+	{
+		public const string type_name = "lists_getSublist";
+
+		public string[][][] WHERE_OPTIONS;
+
+		public ListsGetSublistBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for getting sublist.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			WHERE_OPTIONS = new[] {
+				new[] {
+					new [] {Msg.LISTS_GET_SUBLIST_START_FROM_START, "FROM_START"},
+					new [] {Msg.LISTS_GET_SUBLIST_START_FROM_END, "FROM_END"},
+					new [] {Msg.LISTS_GET_SUBLIST_START_FIRST, "FIRST"}
+				},
+				new[] {
+					new [] {Msg.LISTS_GET_SUBLIST_END_FROM_START, "FROM_START"},
+					new [] {Msg.LISTS_GET_SUBLIST_END_FROM_END, "FROM_END"},
+					new [] {Msg.LISTS_GET_SUBLIST_END_LAST, "LAST"}
+				}
+			};
+			this.setHelpUrl(Msg.LISTS_GET_SUBLIST_HELPURL);
+			this.setColour(Lists.HUE);
+			this.appendValueInput("LIST")
+				.setCheck("Array")
+				.appendField(Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST);
+			this.appendDummyInput("AT1");
+			this.appendDummyInput("AT2");
+			if (!String.IsNullOrEmpty(Msg.LISTS_GET_SUBLIST_TAIL)) {
+				this.appendDummyInput("TAIL")
+					.appendField(Msg.LISTS_GET_SUBLIST_TAIL);
+			}
+			this.setInputsInline(true);
+			this.setOutput(true, "Array");
+			this.updateAt_(1, true);
+			this.updateAt_(2, true);
+			this.setTooltip(Msg.LISTS_GET_SUBLIST_TOOLTIP);
+		}
+
+		/**
+		 * Create XML to represent whether there are "AT" inputs.
+		 * @return {Element} XML storage element.
+		 * @this Blockly.Block
+		 */
+		public Element mutationToDom()
+		{
+			var container = Document.CreateElement("mutation");
+			var isAt1 = this.getInput("AT1").type == Blockly.INPUT_VALUE;
+			container.SetAttribute("at1", isAt1.ToString());
+			var isAt2 = this.getInput("AT2").type == Blockly.INPUT_VALUE;
+			container.SetAttribute("at2", isAt2.ToString());
+			return container;
+		}
+
+		/**
+		 * Parse XML to restore the "AT" inputs.
+		 * @param {!Element} xmlElement XML storage element.
+		 * @this Blockly.Block
+		 */
+		public void domToMutation(Element xmlElement)
+		{
+			var isAt1 = (xmlElement.GetAttribute("at1") == "true");
+			var isAt2 = (xmlElement.GetAttribute("at2") == "true");
+			this.updateAt_(1, isAt1);
+			this.updateAt_(2, isAt2);
+		}
+
+		/**
+		 * Create or delete an input for a numeric index.
+		 * This block has two such inputs, independant of each other.
+		 * @param {number} n Specify first or second input (1 or 2).
+		 * @param {boolean} isAt True if the input should exist.
+		 * @private
+		 * @this Blockly.Block
+		 */
+		public void updateAt_(int n, bool isAt)
+		{
+			// Create or delete an input for the numeric index.
+			// Destroy old "AT" and "ORDINAL" inputs.
+			this.removeInput("AT" + n);
+			this.removeInput("ORDINAL" + n, true);
+			// Create either a value "AT" input or a dummy input.
+			if (isAt) {
+				this.appendValueInput("AT" + n).setCheck("Number");
+				if (!String.IsNullOrEmpty(Msg.ORDINAL_NUMBER_SUFFIX)) {
+					this.appendDummyInput("ORDINAL" + n)
+						.appendField(Msg.ORDINAL_NUMBER_SUFFIX);
+				}
+			}
+			else {
+				this.appendDummyInput("AT" + n);
+			}
+			var menu = new FieldDropdown(WHERE_OPTIONS[n - 1], (value) => {
+				var newAt = (value == "FROM_START") || (value == "FROM_END");
+				// The "isAt" variable is available due to this function being a
+				// closure.
+				if (newAt != isAt) {
+					this.updateAt_(n, newAt);
+					// This menu has been destroyed and replaced.
+					// Update the replacement.
+					this.setFieldValue(value, "WHERE" + n);
+					return null;
+				}
+				return Script.Undefined;
+			});
+			this.getInput("AT" + n)
+				.appendField(menu, "WHERE" + n);
+			if (n == 1) {
+				this.moveInputBefore("AT1", "AT2");
+				if (this.getInput("ORDINAL1") != null) {
+					this.moveInputBefore("ORDINAL1", "AT2");
+				}
+			}
+			if (!String.IsNullOrEmpty(Msg.LISTS_GET_SUBLIST_TAIL)) {
+				this.moveInputBefore("TAIL", null);
+			}
+		}
+	}
+
+	public class ListsSortBlock : Block
+	{
+		public const string type_name = "lists_sort";
+
+		public ListsSortBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for sorting a list.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.LISTS_SORT_TITLE,
+				args0 = new object[] {
+					new {
+						type = "field_dropdown",
+						name = "TYPE",
+						options = new [] {
+							new [] {Msg.LISTS_SORT_TYPE_NUMERIC, "NUMERIC"},
+							new [] {Msg.LISTS_SORT_TYPE_TEXT, "TEXT"},
+							new [] {Msg.LISTS_SORT_TYPE_IGNORECASE, "IGNORE_CASE"}
+						}
+					},
+					new {
+						type = "field_dropdown",
+						name = "DIRECTION",
+						options = new [] {
+							new [] {Msg.LISTS_SORT_ORDER_ASCENDING, "1"},
+							new [] {Msg.LISTS_SORT_ORDER_DESCENDING, "-1"}
+						}
+					},
+					new {
+						type = "input_value",
+						name = "LIST",
+						check = "Array"
+					}
+				},
+				output = "Array",
+				colour = Lists.HUE,
+				tooltip = Msg.LISTS_SORT_TOOLTIP,
+				helpUrl = Msg.LISTS_SORT_HELPURL
+			});
+		}
+	}
+
+	public class ListsSplitBlock : Block
+	{
+		public const string type_name = "lists_split";
+
+		public ListsSplitBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for splitting text into a list, or joining a list into text.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			// Assign "this" to a variable for use in the closures below.
+			var thisBlock = this;
+			var dropdown = new FieldDropdown(new[] {
+					new [] {Msg.LISTS_SPLIT_LIST_FROM_TEXT, "SPLIT"},
+					new [] {Msg.LISTS_SPLIT_TEXT_FROM_LIST, "JOIN"}
+				},
+				(newMode) => {
+					thisBlock.updateType_(newMode);
+					return Script.Undefined;
+				});
+			this.setHelpUrl(Msg.LISTS_SPLIT_HELPURL);
+			this.setColour(Lists.HUE);
+			this.appendValueInput("INPUT")
+				.setCheck("String")
+				.appendField(dropdown, "MODE");
+			this.appendValueInput("DELIM")
+				.setCheck("String")
+				.appendField(Msg.LISTS_SPLIT_WITH_DELIMITER);
+			this.setInputsInline(true);
+			this.setOutput(true, "Array");
+			this.setTooltip(new Func<string>(() => {
+				var mode = thisBlock.getFieldValue("MODE");
+				if (mode == "SPLIT") {
+					return Msg.LISTS_SPLIT_TOOLTIP_SPLIT;
+				}
+				else if (mode == "JOIN") {
+					return Msg.LISTS_SPLIT_TOOLTIP_JOIN;
+				}
+				throw new Exception("Unknown mode: " + mode);
+			}));
+		}
+
+		/**
+		 * Modify this block to have the correct input and output types.
+		 * @param {string} newMode Either "SPLIT" or "JOIN".
+		 * @private
+		 * @this Blockly.Block
+		 */
+		public void updateType_(string newMode)
+		{
+			if (newMode == "SPLIT") {
+				this.outputConnection.setCheck("Array");
+				this.getInput("INPUT").setCheck("String");
+			}
+			else {
+				this.outputConnection.setCheck("String");
+				this.getInput("INPUT").setCheck("Array");
+			}
+		}
+
+		/**
+		 * Create XML to represent the input and output types.
+		 * @return {!Element} XML storage element.
+		 * @this Blockly.Block
+		 */
+		public Element mutationToDom()
+		{
+			var container = Document.CreateElement("mutation");
+			container.SetAttribute("mode", this.getFieldValue("MODE"));
+			return container;
+		}
+
+		/**
+		 * Parse XML to restore the input and output types.
+		 * @param {!Element} xmlElement XML storage element.
+		 * @this Blockly.Block
+		 */
+		public void domToMutation(Element xmlElement)
+		{
+			this.updateType_(xmlElement.GetAttribute("mode"));
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Logic.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Logic.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Logic.cs	(revision 270)
@@ -0,0 +1,614 @@
+/**
+ * @license
+ * Visual Blocks Editor
+ *
+ * Copyright 2012 Google Inc.
+ * https://developers.google.com/blockly/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview Logic blocks for Blockly.
+ * @author q.neutron@gmail.com (Quynh Neutron)
+ */
+using System;
+using System.Linq;
+using System.Text;
+using Bridge;
+using Bridge.Html5;
+using Bridge.jQuery2;
+
+namespace WebMrbc
+{
+	public class Logic
+	{
+		/**
+		 * Common HSV hue for all blocks in this category.
+		 */
+		public static int HUE = 210;
+	}
+
+	public class ControlsIfBlock : Block
+	{
+		public const string type_name = "controls_if";
+		internal int elseifCount_;
+		internal int elseCount_;
+
+		public ControlsIfBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for if/elseif/else condition.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.setHelpUrl(Msg.CONTROLS_IF_HELPURL);
+			this.setColour(Logic.HUE);
+			this.appendValueInput("IF0")
+				.setCheck("Boolean")
+				.appendField(Msg.CONTROLS_IF_MSG_IF);
+			this.appendStatementInput("DO0")
+				.appendField(Msg.CONTROLS_IF_MSG_THEN);
+			this.setPreviousStatement(true);
+			this.setNextStatement(true);
+			this.setMutator(new Mutator(new[] { ControlsIfElseIfBlock.type_name, ControlsIfElseBlock.type_name }));
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			this.setTooltip(new Func<string>(() => {
+				if (thisBlock.elseifCount_ == 0 && thisBlock.elseCount_ == 0) {
+					return Msg.CONTROLS_IF_TOOLTIP_1;
+				}
+				else if (thisBlock.elseifCount_ == 0 && thisBlock.elseCount_ != 0) {
+					return Msg.CONTROLS_IF_TOOLTIP_2;
+				}
+				else if (thisBlock.elseifCount_ != 0 && thisBlock.elseCount_ == 0) {
+					return Msg.CONTROLS_IF_TOOLTIP_3;
+				}
+				else if (thisBlock.elseifCount_ != 0 && thisBlock.elseCount_ != 0) {
+					return Msg.CONTROLS_IF_TOOLTIP_4;
+				}
+				return "";
+			}));
+			this.elseifCount_ = 0;
+			this.elseCount_ = 0;
+		}
+
+		/**
+		 * Create XML to represent the number of else-if and else inputs.
+		 * @return {Element} XML storage element.
+		 * @this Blockly.Block
+		 */
+		public Element mutationToDom()
+		{
+			if (this.elseifCount_ == 0 && this.elseCount_ == 0) {
+				return null;
+			}
+			var container = Document.CreateElement("mutation");
+			if (this.elseifCount_ != 0) {
+				container.SetAttribute("elseif", this.elseifCount_.ToString());
+			}
+			if (this.elseCount_ != 0) {
+				container.SetAttribute("else", "1");
+			}
+			return container;
+		}
+
+		/**
+		 * Parse XML to restore the else-if and else inputs.
+		 * @param {!Element} xmlElement XML storage element.
+		 * @this Blockly.Block
+		 */
+		public void domToMutation(Element xmlElement)
+		{
+			var count = xmlElement.GetAttribute("elseif");
+			this.elseifCount_ = count == null ? 0 : Script.ParseInt(count, 10);
+			count = xmlElement.GetAttribute("else");
+			this.elseCount_ = count == null ? 0 : Script.ParseInt(count, 10);
+			this.updateShape_();
+		}
+
+		/**
+		 * Populate the mutator's dialog with this block's components.
+		 * @param {!Workspace} workspace Mutator's workspace.
+		 * @return {!Blockly.Block} Root block in mutator.
+		 * @this Blockly.Block
+		 */
+		public Block decompose(Workspace workspace)
+		{
+			var containerBlock = workspace.newBlock(ControlsIfIfBlock.type_name);
+			containerBlock.initSvg();
+			var connection = containerBlock.nextConnection;
+			for (var i = 1; i <= this.elseifCount_; i++) {
+				var elseifBlock = workspace.newBlock(ControlsIfElseIfBlock.type_name);
+				elseifBlock.initSvg();
+				connection.connect(elseifBlock.previousConnection);
+				connection = elseifBlock.nextConnection;
+			}
+			if (this.elseCount_ != 0) {
+				var elseBlock = workspace.newBlock(ControlsIfElseBlock.type_name);
+				elseBlock.initSvg();
+				connection.connect(elseBlock.previousConnection);
+			}
+			return containerBlock;
+		}
+
+		/**
+		 * Reconfigure this block based on the mutator dialog's components.
+		 * @param {!Blockly.Block} containerBlock Root block in mutator.
+		 * @this Blockly.Block
+		 */
+		public void compose(Block containerBlock)
+		{
+			var clauseBlock = containerBlock.nextConnection.targetBlock();
+			// Count number of inputs.
+			this.elseifCount_ = 0;
+			this.elseCount_ = 0;
+			var valueConnections = new Connection[] { null };
+			var statementConnections = new Connection[] { null };
+			var elseStatementConnection = (Connection)null;
+			while (clauseBlock != null) {
+				switch (clauseBlock.type) {
+				case ControlsIfElseIfBlock.type_name:
+					this.elseifCount_++;
+					valueConnections.Push(((ControlsIfElseIfBlock)clauseBlock).valueConnection_);
+					statementConnections.Push(((ControlsIfElseIfBlock)clauseBlock).statementConnection_);
+					break;
+				case ControlsIfElseBlock.type_name:
+					this.elseCount_++;
+					elseStatementConnection = ((ControlsIfElseBlock)clauseBlock).statementConnection_;
+					break;
+				default:
+					throw new Exception("Unknown block type.");
+				}
+				clauseBlock = (clauseBlock.nextConnection != null) ?
+					clauseBlock.nextConnection.targetBlock() : null;
+			}
+			this.updateShape_();
+			// Reconnect any child blocks.
+			for (var i = 1; i <= this.elseifCount_; i++) {
+				Mutator.reconnect(valueConnections[i], this, "IF" + i);
+				Mutator.reconnect(statementConnections[i], this, "DO" + i);
+			}
+			Mutator.reconnect(elseStatementConnection, this, "ELSE");
+		}
+
+		/**
+		 * Store pointers to any connected child blocks.
+		 * @param {!Blockly.Block} containerBlock Root block in mutator.
+		 * @this Blockly.Block
+		 */
+		public void saveConnections(Block containerBlock)
+		{
+			var clauseBlock = containerBlock.nextConnection.targetBlock();
+			var i = 1;
+			while (clauseBlock != null) {
+				switch (clauseBlock.type) {
+				case ControlsIfElseIfBlock.type_name: {
+						var inputIf = this.getInput("IF" + i);
+						var inputDo = this.getInput("DO" + i);
+						((ControlsIfElseIfBlock)clauseBlock).valueConnection_ =
+							(inputIf != null) ? inputIf.connection.targetConnection : null;
+						((ControlsIfElseIfBlock)clauseBlock).statementConnection_ =
+							(inputDo != null) ? inputDo.connection.targetConnection : null;
+						i++;
+					}
+					break;
+				case ControlsIfElseBlock.type_name: {
+						var inputDo = this.getInput("ELSE");
+						((ControlsIfElseBlock)clauseBlock).statementConnection_ =
+							(inputDo != null) ? inputDo.connection.targetConnection : null;
+					}
+					break;
+				default:
+					throw new Exception("Unknown block type.");
+				}
+				clauseBlock = (clauseBlock.nextConnection != null) ?
+					clauseBlock.nextConnection.targetBlock() : null;
+			}
+		}
+
+		/**
+		 * Modify this block to have the correct number of inputs.
+		 * @private
+		 * @this Blockly.Block
+		 */
+		private void updateShape_()
+		{
+			// Delete everything.
+			if (this.getInput("ELSE") != null) {
+				this.removeInput("ELSE");
+			}
+			var i = 1;
+			while (this.getInput("IF" + i) != null) {
+				this.removeInput("IF" + i);
+				this.removeInput("DO" + i);
+				i++;
+			}
+			// Rebuild block.
+			for (i = 1; i <= this.elseifCount_; i++) {
+				this.appendValueInput("IF" + i)
+					.setCheck("Boolean")
+					.appendField(Msg.CONTROLS_IF_MSG_ELSEIF);
+				this.appendStatementInput("DO" + i)
+					.appendField(Msg.CONTROLS_IF_MSG_THEN);
+			}
+			if (this.elseCount_ != 0) {
+				this.appendStatementInput("ELSE")
+					.appendField(Msg.CONTROLS_IF_MSG_ELSE);
+			}
+		}
+	}
+
+	public class ControlsIfIfBlock : Block
+	{
+		public const string type_name = "controls_if_if";
+
+		public ControlsIfIfBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Mutator block for if container.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.setColour(Logic.HUE);
+			this.appendDummyInput()
+				.appendField(Msg.CONTROLS_IF_IF_TITLE_IF);
+			this.setNextStatement(true);
+			this.setTooltip(Msg.CONTROLS_IF_IF_TOOLTIP);
+			this.contextMenu = false;
+		}
+	}
+
+	[IgnoreCast]
+	public class ControlsIfElseIfBlock : Block
+	{
+		public const string type_name = "controls_if_elseif";
+		public Connection valueConnection_;
+		public Connection statementConnection_;
+
+		public ControlsIfElseIfBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Mutator bolck for else-if condition.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.setColour(Logic.HUE);
+			this.appendDummyInput()
+				.appendField(Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF);
+			this.setPreviousStatement(true);
+			this.setNextStatement(true);
+			this.setTooltip(Msg.CONTROLS_IF_ELSEIF_TOOLTIP);
+			this.contextMenu = false;
+		}
+	}
+
+	[IgnoreCast]
+	public class ControlsIfElseBlock : Block
+	{
+		public const string type_name = "controls_if_else";
+		public Connection statementConnection_;
+
+		public ControlsIfElseBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Mutator block for else condition.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.setColour(Logic.HUE);
+			this.appendDummyInput()
+				.appendField(Msg.CONTROLS_IF_ELSE_TITLE_ELSE);
+			this.setPreviousStatement(true);
+			this.setTooltip(Msg.CONTROLS_IF_ELSE_TOOLTIP);
+			this.contextMenu = false;
+		}
+	}
+
+	public class LogicCompareBlock : Block
+	{
+		public const string type_name = "logic_compare";
+
+		public LogicCompareBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for comparison operator.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			var rtlOperators = new[] {
+				new [] {"=", "EQ"},
+				new [] {"\u2260", "NEQ"},
+				new [] {"\u200F<\u200F", "LT"},
+				new [] {"\u200F\u2264\u200F", "LTE"},
+				new [] {"\u200F>\u200F", "GT"},
+				new [] {"\u200F\u2265\u200F", "GTE"}
+			};
+			var ltrOperators = new[] {
+				new [] {"=", "EQ"},
+				new [] {"\u2260", "NEQ"},
+				new [] {"<", "LT"},
+				new [] {"\u2264", "LTE"},
+				new [] {">", "GT"},
+				new [] {"\u2265", "GTE"}
+			};
+			var OPERATORS = this.RTL ? rtlOperators : ltrOperators;
+			this.setHelpUrl(Msg.LOGIC_COMPARE_HELPURL);
+			this.setColour(Logic.HUE);
+			this.setOutput(true, "Boolean");
+			this.appendValueInput("A");
+			this.appendValueInput("B")
+				.appendField(new FieldDropdown(OPERATORS), "OP");
+			this.setInputsInline(true);
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			this.setTooltip(new Func<string>(() => {
+				switch (thisBlock.getFieldValue("OP")) {
+				case "EQ": return Msg.LOGIC_COMPARE_TOOLTIP_EQ;
+				case "NEQ": return Msg.LOGIC_COMPARE_TOOLTIP_NEQ;
+				case "LT": return Msg.LOGIC_COMPARE_TOOLTIP_LT;
+				case "LTE": return Msg.LOGIC_COMPARE_TOOLTIP_LTE;
+				case "GT": return Msg.LOGIC_COMPARE_TOOLTIP_GT;
+				case "GTE": return Msg.LOGIC_COMPARE_TOOLTIP_GTE;
+				}
+				return "";
+			}));
+			this.prevBlocks_ = new Block[] { null, null };
+		}
+
+		/**
+		 * Called whenever anything on the workspace changes.
+		 * Prevent mismatched types from being compared.
+		 * @param {!Abstract} e Change event.
+		 * @this Blockly.Block
+		 */
+		public void onchange(Abstract e)
+		{
+			var blockA = this.getInputTargetBlock("A");
+			var blockB = this.getInputTargetBlock("B");
+			// Disconnect blocks that existed prior to this change if they don"t match.
+			if (blockA != null && blockB != null &&
+				!blockA.outputConnection.checkType_(blockB.outputConnection)) {
+				// Mismatch between two inputs.  Disconnect previous and bump it away.
+				// Ensure that any disconnections are grouped with the causing event.
+				Blockly.Events.setGroup(e.group);
+				for (var i = 0; i < this.prevBlocks_.Length; i++) {
+					var block = this.prevBlocks_[i];
+					if (block == blockA || block == blockB) {
+						block.unplug();
+						block.bumpNeighbours_();
+					}
+				}
+				Blockly.Events.setGroup(false.ToString());
+			}
+			this.prevBlocks_[0] = blockA;
+			this.prevBlocks_[1] = blockB;
+		}
+	}
+
+	public class LogicOperationBlock : Block
+	{
+		public const string type_name = "logic_operation";
+
+		public LogicOperationBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for logical operations: "and", "or".
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			var OPERATORS = new[] {
+				new [] {Msg.LOGIC_OPERATION_AND, "AND"},
+				new [] {Msg.LOGIC_OPERATION_OR, "OR"}
+			};
+			this.setHelpUrl(Msg.LOGIC_OPERATION_HELPURL);
+			this.setColour(Logic.HUE);
+			this.setOutput(true, "Boolean");
+			this.appendValueInput("A")
+				.setCheck("Boolean");
+			this.appendValueInput("B")
+				.setCheck("Boolean")
+				.appendField(new FieldDropdown(OPERATORS), "OP");
+			this.setInputsInline(true);
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			this.setTooltip(new Func<string>(() => {
+				switch (thisBlock.getFieldValue("OP")) {
+				case "AND": return Msg.LOGIC_OPERATION_TOOLTIP_AND;
+				case "OR": return Msg.LOGIC_OPERATION_TOOLTIP_OR;
+				}
+				return "";
+			}));
+		}
+	}
+
+	public class LogicNegateBlock : Block
+	{
+		public const string type_name = "logic_negate";
+
+		public LogicNegateBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for negation.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.LOGIC_NEGATE_TITLE,
+				args0 = new object[] {
+					new {
+						type = "input_value",
+						name = "BOOL",
+						check = "Boolean"
+					}
+				},
+				output = "Boolean",
+				colour = Logic.HUE,
+				tooltip = Msg.LOGIC_NEGATE_TOOLTIP,
+				helpUrl = Msg.LOGIC_NEGATE_HELPURL
+			});
+		}
+	}
+
+	public class LogicBooleanBlock : Block
+	{
+		public const string type_name = "logic_boolean";
+
+		public LogicBooleanBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for boolean data type: true and false.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1",
+				args0 = new object[] {
+					new {
+						type = "field_dropdown",
+						name = "BOOL",
+						options = new [] {
+							new [] {Msg.LOGIC_BOOLEAN_TRUE, "TRUE"},
+							new [] {Msg.LOGIC_BOOLEAN_FALSE, "FALSE"}
+						}
+					}
+				},
+				output = "Boolean",
+				colour = Logic.HUE,
+				tooltip = Msg.LOGIC_BOOLEAN_TOOLTIP,
+				helpUrl = Msg.LOGIC_BOOLEAN_HELPURL
+			});
+		}
+	}
+
+	public class LogicNullBlock : Block
+	{
+		public const string type_name = "logic_null";
+
+		public LogicNullBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for null data type.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.LOGIC_NULL,
+				output = (string[])null,
+				colour = Logic.HUE,
+				tooltip = Msg.LOGIC_NULL_TOOLTIP,
+				helpUrl = Msg.LOGIC_NULL_HELPURL
+			});
+		}
+	}
+
+	public class LogicTernaryBlock : Block
+	{
+		public const string type_name = "logic_ternary";
+		Connection prevParentConnection_;
+
+		public LogicTernaryBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for ternary operator.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.setHelpUrl(Msg.LOGIC_TERNARY_HELPURL);
+			this.setColour(Logic.HUE);
+			this.appendValueInput("IF")
+				.setCheck("Boolean")
+				.appendField(Msg.LOGIC_TERNARY_CONDITION);
+			this.appendValueInput("THEN")
+				.appendField(Msg.LOGIC_TERNARY_IF_TRUE);
+			this.appendValueInput("ELSE")
+				.appendField(Msg.LOGIC_TERNARY_IF_FALSE);
+			this.setOutput(true);
+			this.setTooltip(Msg.LOGIC_TERNARY_TOOLTIP);
+			this.prevParentConnection_ = null;
+		}
+
+		/**
+		 * Called whenever anything on the workspace changes.
+		 * Prevent mismatched types.
+		 * @param {!Abstract} e Change event.
+		 * @this Blockly.Block
+		 */
+		public void onchange(Abstract e)
+		{
+			var blockA = this.getInputTargetBlock("THEN");
+			var blockB = this.getInputTargetBlock("ELSE");
+			var parentConnection = this.outputConnection.targetConnection;
+			// Disconnect blocks that existed prior to this change if they don"t match.
+			if ((blockA != null || blockB != null) && parentConnection != null) {
+				for (var i = 0; i < 2; i++) {
+					var block = (i == 1) ? blockA : blockB;
+					if (block != null && !block.outputConnection.checkType_(parentConnection)) {
+						// Ensure that any disconnections are grouped with the causing event.
+						Blockly.Events.setGroup(e.group);
+						if (parentConnection == this.prevParentConnection_) {
+							this.unplug();
+							parentConnection.getSourceBlock().bumpNeighbours_();
+						}
+						else {
+							block.unplug();
+							block.bumpNeighbours_();
+						}
+						Blockly.Events.setGroup(false.ToString());
+					}
+				}
+			}
+			this.prevParentConnection_ = parentConnection;
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Loops.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Loops.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Loops.cs	(revision 270)
@@ -0,0 +1,379 @@
+/**
+ * @license
+ * Visual Blocks Editor
+ *
+ * Copyright 2012 Google Inc.
+ * https://developers.google.com/blockly/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview Loop blocks for Blockly.
+ * @author fraser@google.com (Neil Fraser)
+ */
+using System;
+using System.Linq;
+using System.Text;
+using Bridge;
+using Bridge.Html5;
+using Bridge.jQuery2;
+
+namespace WebMrbc
+{
+	public class Loops
+	{
+		/**
+		 * Common HSV hue for all blocks in this category.
+		 */
+		public static int HUE = 120;
+	}
+
+	public class ControlsRepeatExtBlock : Block
+	{
+		public const string type_name = "controls_repeat_ext";
+
+		public ControlsRepeatExtBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for repeat n times (external number).
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.CONTROLS_REPEAT_TITLE,
+				args0 = new object[] {
+					new {
+						type = "input_value",
+						name = "TIMES",
+						check = "Number"
+					}
+				},
+				previousStatement = (Union<string, string[]>)null,
+				nextStatement = (Union<string, string[]>)null,
+				colour = Loops.HUE,
+				tooltip = Msg.CONTROLS_REPEAT_TOOLTIP,
+				helpUrl = Msg.CONTROLS_REPEAT_HELPURL
+			});
+			this.appendStatementInput("DO")
+				.appendField(Msg.CONTROLS_REPEAT_INPUT_DO);
+		}
+	}
+
+	public class ControlsRepeatBlock : Block
+	{
+		public const string type_name = "controls_repeat";
+
+		public ControlsRepeatBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for repeat n times (internal number).
+		 * The "controls_repeat_ext" block is preferred as it is more flexible.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.CONTROLS_REPEAT_TITLE,
+				args0 = new object[] {
+					new {
+						type = "field_number",
+						name = "TIMES",
+						value = 10,
+						min = 0,
+						precision = 1
+					}
+				},
+				previousStatement = (Union<string, string[]>)null,
+				nextStatement = (Union<string, string[]>)null,
+				colour = Loops.HUE,
+				tooltip = Msg.CONTROLS_REPEAT_TOOLTIP,
+				helpUrl = Msg.CONTROLS_REPEAT_HELPURL
+			});
+			this.appendStatementInput("DO")
+				.appendField(Msg.CONTROLS_REPEAT_INPUT_DO);
+		}
+	}
+
+	public class ControlsWhileUntilBlock : Block
+	{
+		public const string type_name = "controls_whileUntil";
+
+		public ControlsWhileUntilBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for "do while/until" loop.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			var OPERATORS = new[] {
+				new [] {Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE, "WHILE"},
+				new [] {Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL, "UNTIL"}
+			};
+			this.setHelpUrl(Msg.CONTROLS_WHILEUNTIL_HELPURL);
+			this.setColour(Loops.HUE);
+			this.appendValueInput("BOOL")
+				.setCheck("Boolean")
+				.appendField(new FieldDropdown(OPERATORS), "MODE");
+			this.appendStatementInput("DO")
+				.appendField(Msg.CONTROLS_WHILEUNTIL_INPUT_DO);
+			this.setPreviousStatement(true);
+			this.setNextStatement(true);
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			this.setTooltip(new Func<string>(() => {
+				switch (thisBlock.getFieldValue("MODE")) {
+				case "WHILE": return Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE;
+				case "UNTIL": return Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL;
+				}
+				return "";
+			}));
+		}
+	}
+
+	public class ControlsForBlock : Block
+	{
+		public const string type_name = "controls_for";
+
+		public ControlsForBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for "for" loop.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.CONTROLS_FOR_TITLE,
+				args0 = new object[] {
+					new {
+						type = "field_variable",
+						name = "VAR",
+						variable = (string)null
+					},
+					new {
+						type = "input_value",
+						name = "FROM",
+						check = "Number",
+						align = "RIGHT"
+					},
+					new {
+						type = "input_value",
+						name = "TO",
+						check = "Number",
+						align = "RIGHT"
+					},
+					new {
+						type = "input_value",
+						name = "BY",
+						check = "Number",
+						align = "RIGHT"
+					}
+				},
+				inputsInline = true,
+				previousStatement = (Union<string, string[]>)null,
+				nextStatement = (Union<string, string[]>)null,
+				colour = Loops.HUE,
+				helpUrl = Msg.CONTROLS_FOR_HELPURL
+			});
+			this.appendStatementInput("DO")
+				.appendField(Msg.CONTROLS_FOR_INPUT_DO);
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			this.setTooltip(new Func<string>(() => {
+				return Msg.CONTROLS_FOR_TOOLTIP.Replace("%1", thisBlock.getFieldValue("VAR"));
+			}));
+		}
+
+		/**
+		 * Add menu option to create getter block for loop variable.
+		 * @param {!Array} options List of menu options to add to.
+		 * @this Blockly.Block
+		 */
+		public void customContextMenu(object[] options)
+		{
+			if (!this.isCollapsed()) {
+				var option = new ContextMenuOption() { enabled = true };
+				var name = this.getFieldValue("VAR");
+				option.text = Msg.VARIABLES_SET_CREATE_GET.Replace("%1", name);
+				var xmlField = goog.dom.createDom("field", null, name);
+				xmlField.SetAttribute("name", "VAR");
+				var xmlBlock = goog.dom.createDom("block", null, xmlField);
+				xmlBlock.SetAttribute("type", VariablesGetBlock.type_name);
+				option.callback = ContextMenu.callbackFactory(this, xmlBlock);
+				options.Push(option);
+			}
+		}
+	}
+
+	public class ControlsForEachBlock : Block
+	{
+		public const string type_name = "controls_forEach";
+
+		public ControlsForEachBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for "for each" loop.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.CONTROLS_FOREACH_TITLE,
+				args0 = new object[] {
+					new {
+						type = "field_variable",
+						name = "VAR",
+						variable = (string)null
+					},
+					new {
+						type = "input_value",
+						name = "LIST",
+						check = "Array"
+					}
+				},
+				previousStatement = (Union<string, string[]>)null,
+				nextStatement = (Union<string, string[]>)null,
+				colour = Loops.HUE,
+				helpUrl = Msg.CONTROLS_FOREACH_HELPURL
+			});
+			this.appendStatementInput("DO")
+				.appendField(Msg.CONTROLS_FOREACH_INPUT_DO);
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			this.setTooltip(new Func<string>(() => {
+				return Msg.CONTROLS_FOREACH_TOOLTIP.Replace("%1", thisBlock.getFieldValue("VAR"));
+			}));
+		}
+
+		/**
+		 * Add menu option to create getter block for loop variable.
+		 * @param {!Array} options List of menu options to add to.
+		 * @this Blockly.Block
+		 */
+		public void customContextMenu(object[] options)
+		{
+			if (!this.isCollapsed()) {
+				var option = new ContextMenuOption() { enabled = true };
+				var name = this.getFieldValue("VAR");
+				option.text = Msg.VARIABLES_SET_CREATE_GET.Replace("%1", name);
+				var xmlField = goog.dom.createDom("field", null, name);
+				xmlField.SetAttribute("name", "VAR");
+				var xmlBlock = goog.dom.createDom("block", null, xmlField);
+				xmlBlock.SetAttribute("type", VariablesGetBlock.type_name);
+				option.callback = ContextMenu.callbackFactory(this, xmlBlock);
+				options.Push(option);
+			}
+		}
+	}
+
+	public class ControlsFlowStatementsBlock : Block
+	{
+		public const string type_name = "controls_flow_statements";
+
+		public ControlsFlowStatementsBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for flow statements: continue, break.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			var OPERATORS = new[] {
+				new [] {Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK, "BREAK"},
+				new [] {Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE, "CONTINUE"}
+			};
+			this.setHelpUrl(Msg.CONTROLS_FLOW_STATEMENTS_HELPURL);
+			this.setColour(Loops.HUE);
+			this.appendDummyInput()
+				.appendField(new FieldDropdown(OPERATORS), "FLOW");
+			this.setPreviousStatement(true);
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			this.setTooltip(new Func<string>(() => {
+				switch (thisBlock.getFieldValue("FLOW")) {
+				case "BREAK": return Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK;
+				case "CONTINUE": return Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE;
+				}
+				return "";
+			}));
+		}
+
+		/**
+		 * Called whenever anything on the workspace changes.
+		 * Add warning if this flow block is not nested inside a loop.
+		 * @param {!Abstract} e Change event.
+		 * @this Blockly.Block
+		 */
+		public void onchange(Abstract e)
+		{
+			if (((WorkspaceSvg)this.workspace).isDragging()) {
+				return;  // Don't change state at the start of a drag.
+			}
+			var legal = false;
+			// Is the block nested in a loop?
+			var block = (Block)this;
+			do {
+				if (this.LOOP_TYPES.IndexOf(block.type) != -1) {
+					legal = true;
+					break;
+				}
+				block = block.getSurroundParent();
+			} while (block != null);
+			if (legal) {
+				this.setWarningText(null);
+				if (!this.isInFlyout) {
+					this.setDisabled(false);
+				}
+			}
+			else {
+				this.setWarningText(Msg.CONTROLS_FLOW_STATEMENTS_WARNING);
+				if (!this.isInFlyout && !this.getInheritedDisabled()) {
+					this.setDisabled(true);
+				}
+			}
+		}
+		/**
+		 * List of block types that are loops and thus do not need warnings.
+		 * To add a new loop type add this to your code:
+		 * Blockly.Blocks["controls_flow_statements"].LOOP_TYPES.push("custom_loop");
+		 */
+		string[] LOOP_TYPES = new[] {
+			ControlsRepeatBlock .type_name,
+			ControlsRepeatExtBlock.type_name,
+			ControlsForEachBlock.type_name,
+			ControlsForBlock.type_name,
+			ControlsWhileUntilBlock.type_name
+		};
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Math.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Math.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Math.cs	(revision 270)
@@ -0,0 +1,690 @@
+/**
+ * @license
+ * Visual Blocks Editor
+ *
+ * Copyright 2012 Google Inc.
+ * https://developers.google.com/blockly/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview Math blocks for Blockly.
+ * @author q.neutron@gmail.com (Quynh Neutron)
+ */
+using System;
+using System.Linq;
+using System.Text;
+using Bridge;
+using Bridge.Html5;
+using Bridge.jQuery2;
+
+namespace WebMrbc
+{
+	public class Math
+	{
+		/**
+		 * Common HSV hue for all blocks in this category.
+		 */
+		public static int HUE = 230;
+	}
+
+	public class MathNumberBlock : Block
+	{
+		public const string type_name = "math_number";
+
+		public MathNumberBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for numeric value.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.setHelpUrl(Msg.MATH_NUMBER_HELPURL);
+			this.setColour(Math.HUE);
+			this.appendDummyInput()
+				.appendField(new FieldNumber("0", "-Infinity", "Infinity", 0), "NUM");
+			this.setOutput(true, "Number");
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			// Number block is trivial.  Use tooltip of parent block if it exists.
+			this.setTooltip(new Func<string>(() => {
+				var parent = thisBlock.getParent();
+				return (parent != null && parent.getInputsInline() && !String.IsNullOrEmpty(parent.tooltip)) ? parent.tooltip :
+					Msg.MATH_NUMBER_TOOLTIP;
+			}));
+		}
+	}
+
+	public class MathArithmeticBlock : Block
+	{
+		public const string type_name = "math_arithmetic";
+
+		public MathArithmeticBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for basic arithmetic operator.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1 %2 %3",
+				args0 = new object[] {
+					new {
+						type = "input_value",
+						name = "A",
+						check = "Number"
+					},
+					new {
+						type = "field_dropdown",
+						name = "OP",
+						options = new [] {
+							new [] {Msg.MATH_ADDITION_SYMBOL, "ADD"},
+							new [] {Msg.MATH_SUBTRACTION_SYMBOL, "MINUS"},
+							new [] {Msg.MATH_MULTIPLICATION_SYMBOL, "MULTIPLY"},
+							new [] {Msg.MATH_DIVISION_SYMBOL, "DIVIDE"},
+							new [] {Msg.MATH_POWER_SYMBOL, "POWER"}
+						}
+					},
+					new {
+						type = "input_value",
+						name = "B",
+						check = "Number"
+					}
+				},
+				inputsInline = true,
+				output = "Number",
+				colour = Math.HUE,
+				helpUrl = Msg.MATH_ARITHMETIC_HELPURL
+			});
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			this.setTooltip(new Func<string>(() => {
+				switch (thisBlock.getFieldValue("OP")) {
+				case "ADD": return Msg.MATH_ARITHMETIC_TOOLTIP_ADD;
+				case "MINUS": return Msg.MATH_ARITHMETIC_TOOLTIP_MINUS;
+				case "MULTIPLY": return Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY;
+				case "DIVIDE": return Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE;
+				case "POWER": return Msg.MATH_ARITHMETIC_TOOLTIP_POWER;
+				};
+				return "";
+			}));
+		}
+	}
+
+	public class MathSingleBlock : Block
+	{
+		public const string type_name = "math_single";
+
+		public MathSingleBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for advanced math operators with single operand.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1 %2",
+				args0 = new object[] {
+					new {
+						type = "field_dropdown",
+						name = "OP",
+						options = new [] {
+							new [] {Msg.MATH_SINGLE_OP_ROOT, "ROOT"},
+							new [] {Msg.MATH_SINGLE_OP_ABSOLUTE, "ABS"},
+							new [] {"-", "NEG"},
+							new [] {"ln", "LN"},
+							new [] {"log10", "LOG10"},
+							new [] {"e^", "EXP"},
+							new [] {"10^", "POW10"}
+						}
+					},
+					new {
+						type = "input_value",
+						name = "NUM",
+						check = "Number"
+					}
+				},
+				output = "Number",
+				colour = Math.HUE,
+				helpUrl = Msg.MATH_SINGLE_HELPURL
+			});
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			this.setTooltip(new Func<string>(() => {
+				switch (thisBlock.getFieldValue("OP")) {
+				case "ROOT": return Msg.MATH_SINGLE_TOOLTIP_ROOT;
+				case "ABS": return Msg.MATH_SINGLE_TOOLTIP_ABS;
+				case "NEG": return Msg.MATH_SINGLE_TOOLTIP_NEG;
+				case "LN": return Msg.MATH_SINGLE_TOOLTIP_LN;
+				case "LOG10": return Msg.MATH_SINGLE_TOOLTIP_LOG10;
+				case "EXP": return Msg.MATH_SINGLE_TOOLTIP_EXP;
+				case "POW10": return Msg.MATH_SINGLE_TOOLTIP_POW10;
+				}
+				return "";
+			}));
+		}
+	}
+
+	public class MathTrigBlock : Block
+	{
+		public const string type_name = "math_trig";
+
+		public MathTrigBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for trigonometry operators.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1 %2",
+				args0 = new object[] {
+					new {
+						type = "field_dropdown",
+						name = "OP",
+						options = new [] {
+							new [] { Msg.MATH_TRIG_SIN, "SIN" },
+							new [] { Msg.MATH_TRIG_COS, "COS" },
+							new [] { Msg.MATH_TRIG_TAN, "TAN" },
+							new [] { Msg.MATH_TRIG_ASIN, "ASIN" },
+							new [] { Msg.MATH_TRIG_ACOS, "ACOS" },
+							new [] { Msg.MATH_TRIG_ATAN, "ATAN" }
+						}
+					},
+					new {
+						type = "input_value",
+						name = "NUM",
+						check = "Number"
+					}
+				},
+				output = "Number",
+				colour = Math.HUE,
+				helpUrl = Msg.MATH_TRIG_HELPURL
+			});
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			this.setTooltip(new Func<string>(() => {
+				switch (thisBlock.getFieldValue("OP")) {
+				case "SIN": return Msg.MATH_TRIG_TOOLTIP_SIN;
+				case "COS": return Msg.MATH_TRIG_TOOLTIP_COS;
+				case "TAN": return Msg.MATH_TRIG_TOOLTIP_TAN;
+				case "ASIN": return Msg.MATH_TRIG_TOOLTIP_ASIN;
+				case "ACOS": return Msg.MATH_TRIG_TOOLTIP_ACOS;
+				case "ATAN": return Msg.MATH_TRIG_TOOLTIP_ATAN;
+				}
+				return "";
+			}));
+		}
+	}
+
+	public class MathConstantBlock : Block
+	{
+		public const string type_name = "math_constant";
+
+		public MathConstantBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for constants: PI, E, the Golden Ratio, sqrt(2), 1/sqrt(2), INFINITY.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1",
+				args0 = new object[] {
+					new {
+						type = "field_dropdown",
+						name = "CONSTANT",
+						options = new [] {
+							new [] {"\u03c0", "PI"},
+							new [] {"e", "E"},
+							new [] {"\u03c6", "GOLDEN_RATIO"},
+							new [] {"sqrt(2)", "SQRT2"},
+							new [] {"sqrt(\u00bd)", "SQRT1_2"},
+							new [] {"\u221e", "INFINITY"}
+						}
+					}
+				},
+				output = "Number",
+				colour = Math.HUE,
+				tooltip = Msg.MATH_CONSTANT_TOOLTIP,
+				helpUrl = Msg.MATH_CONSTANT_HELPURL
+			});
+		}
+	}
+
+	public class MathNumberPropertyBlock : Block
+	{
+		public const string type_name = "math_number_property";
+
+		public MathNumberPropertyBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for checking if a number is even, odd, prime, whole, positive,
+		 * negative or if it is divisible by certain number.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			var PROPERTIES = new[] {
+				new [] {Msg.MATH_IS_EVEN, "EVEN"},
+				new [] {Msg.MATH_IS_ODD, "ODD"},
+				new [] {Msg.MATH_IS_PRIME, "PRIME"},
+				new [] {Msg.MATH_IS_WHOLE, "WHOLE"},
+				new [] {Msg.MATH_IS_POSITIVE, "POSITIVE"},
+				new [] {Msg.MATH_IS_NEGATIVE, "NEGATIVE"},
+				new [] {Msg.MATH_IS_DIVISIBLE_BY, "DIVISIBLE_BY"}
+			};
+			this.setColour(Math.HUE);
+			this.appendValueInput("NUMBER_TO_CHECK")
+				.setCheck("Number");
+			var dropdown = new FieldDropdown(PROPERTIES, (option) => {
+				var divisorInput = (option == "DIVISIBLE_BY");
+				this.updateShape_(divisorInput);
+				return Script.Undefined;
+			});
+			this.appendDummyInput()
+				.appendField(dropdown, "PROPERTY");
+			this.setInputsInline(true);
+			this.setOutput(true, "Boolean");
+			this.setTooltip(Msg.MATH_IS_TOOLTIP);
+		}
+
+		/**
+		 * Create XML to represent whether the "divisorInput" should be present.
+		 * @return {Element} XML storage element.
+		 * @this Blockly.Block
+		 */
+		public Element mutationToDom()
+		{
+			var container = Document.CreateElement("mutation");
+			var divisorInput = (this.getFieldValue("PROPERTY") == "DIVISIBLE_BY");
+			container.SetAttribute("divisor_input", divisorInput.ToString());
+			return container;
+		}
+
+		/**
+		 * Parse XML to restore the "divisorInput".
+		 * @param {!Element} xmlElement XML storage element.
+		 * @this Blockly.Block
+		 */
+		public void domToMutation(Element xmlElement)
+		{
+			var divisorInput = (xmlElement.GetAttribute("divisor_input") == "true");
+			this.updateShape_(divisorInput);
+		}
+
+		/**
+		 * Modify this block to have (or not have) an input for "is divisible by".
+		 * @param {boolean} divisorInput True if this block has a divisor input.
+		 * @private
+		 * @this Blockly.Block
+		 */
+		public void updateShape_(bool divisorInput)
+		{
+			// Add or remove a Value Input.
+			var inputExists = this.getInput("DIVISOR");
+			if (divisorInput) {
+				if (inputExists == null) {
+					this.appendValueInput("DIVISOR")
+						.setCheck("Number");
+				}
+			}
+			else if (inputExists != null) {
+				this.removeInput("DIVISOR");
+			}
+		}
+	}
+
+	public class MathChangeBlock : Block
+	{
+		public const string type_name = "math_change";
+
+		public MathChangeBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for adding to a variable in place.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.MATH_CHANGE_TITLE,
+				args0 = new object[] {
+					new {
+						type = "field_variable",
+						name = "VAR",
+						variable = Msg.MATH_CHANGE_TITLE_ITEM
+					},
+					new {
+						type = "input_value",
+						name = "DELTA",
+						check = "Number"
+					}
+				},
+				previousStatement = (Union<string, string[]>)null,
+				nextStatement = (Union<string, string[]>)null,
+				colour = Blockly.Variables.HUE,
+				helpUrl = Msg.MATH_CHANGE_HELPURL
+			});
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			this.setTooltip(new Func<string>(() => {
+				return Msg.MATH_CHANGE_TOOLTIP.Replace("%1", thisBlock.getFieldValue("VAR"));
+			}));
+		}
+	}
+
+	public class MathRoundBlock : Block
+	{
+		public const string type_name = "math_round";
+
+		public MathRoundBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for rounding functions.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1 %2",
+				args0 = new object[] {
+					new {
+						type = "field_dropdown",
+						name = "OP",
+						options = new [] {
+							new [] {Msg.MATH_ROUND_OPERATOR_ROUND, "ROUND"},
+							new [] {Msg.MATH_ROUND_OPERATOR_ROUNDUP, "ROUNDUP"},
+							new [] {Msg.MATH_ROUND_OPERATOR_ROUNDDOWN, "ROUNDDOWN"}
+						}
+					},
+					new {
+						type = "input_value",
+						name = "NUM",
+						check = "Number"
+					}
+				},
+				output = "Number",
+				colour = Math.HUE,
+				tooltip = Msg.MATH_ROUND_TOOLTIP,
+				helpUrl = Msg.MATH_ROUND_HELPURL
+			});
+		}
+	}
+
+	public class MathOnListBlock : Block
+	{
+		public const string type_name = "math_on_list";
+
+		public MathOnListBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for evaluating a list of numbers to return sum, average, min, max,
+		 * etc.  Some functions also work on text (min, max, mode, median).
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			var OPERATORS = new[] {
+				new [] {Msg.MATH_ONLIST_OPERATOR_SUM, "SUM"},
+				new [] {Msg.MATH_ONLIST_OPERATOR_MIN, "MIN"},
+				new [] {Msg.MATH_ONLIST_OPERATOR_MAX, "MAX"},
+				new [] {Msg.MATH_ONLIST_OPERATOR_AVERAGE, "AVERAGE"},
+				new [] {Msg.MATH_ONLIST_OPERATOR_MEDIAN, "MEDIAN"},
+				new [] {Msg.MATH_ONLIST_OPERATOR_MODE, "MODE"},
+				new [] {Msg.MATH_ONLIST_OPERATOR_STD_DEV, "STD_DEV"},
+				new [] {Msg.MATH_ONLIST_OPERATOR_RANDOM, "RANDOM"}
+			};
+			// Assign "this" to a variable for use in the closures below.
+			var thisBlock = this;
+			this.setHelpUrl(Msg.MATH_ONLIST_HELPURL);
+			this.setColour(Math.HUE);
+			this.setOutput(true, "Number");
+			var dropdown = new FieldDropdown(OPERATORS, (newOp) => {
+				thisBlock.updateType_(newOp);
+				return Script.Undefined;
+			});
+			this.appendValueInput("LIST")
+				.setCheck("Array")
+				.appendField(dropdown, "OP");
+			this.setTooltip(new Func<string>(() => {
+				switch (thisBlock.getFieldValue("OP")) {
+				case "SUM": return Msg.MATH_ONLIST_TOOLTIP_SUM;
+				case "MIN": return Msg.MATH_ONLIST_TOOLTIP_MIN;
+				case "MAX": return Msg.MATH_ONLIST_TOOLTIP_MAX;
+				case "AVERAGE": return Msg.MATH_ONLIST_TOOLTIP_AVERAGE;
+				case "MEDIAN": return Msg.MATH_ONLIST_TOOLTIP_MEDIAN;
+				case "MODE": return Msg.MATH_ONLIST_TOOLTIP_MODE;
+				case "STD_DEV": return Msg.MATH_ONLIST_TOOLTIP_STD_DEV;
+				case "RANDOM": return Msg.MATH_ONLIST_TOOLTIP_RANDOM;
+				}
+				return "";
+			}));
+		}
+
+		/**
+		 * Modify this block to have the correct output type.
+		 * @param {string} newOp Either "MODE" or some op than returns a number.
+		 * @private
+		 * @this Blockly.Block
+		 */
+		public void updateType_(string newOp)
+		{
+			if (newOp == "MODE") {
+				this.outputConnection.setCheck("Array");
+			}
+			else {
+				this.outputConnection.setCheck("Number");
+			}
+		}
+
+		/**
+		 * Create XML to represent the output type.
+		 * @return {Element} XML storage element.
+		 * @this Blockly.Block
+		 */
+		public Element mutationToDom()
+		{
+			var container = Document.CreateElement("mutation");
+			container.SetAttribute("op", this.getFieldValue("OP"));
+			return container;
+		}
+
+		/**
+		 * Parse XML to restore the output type.
+		 * @param {!Element} xmlElement XML storage element.
+		 * @this Blockly.Block
+		 */
+		public void domToMutation(Element xmlElement)
+		{
+			this.updateType_(xmlElement.GetAttribute("op"));
+		}
+	}
+
+	public class MathModuloBlock : Block
+	{
+		public const string type_name = "math_modulo";
+
+		public MathModuloBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for remainder of a division.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.MATH_MODULO_TITLE,
+				args0 = new object[] {
+					new {
+						type = "input_value",
+						name = "DIVIDEND",
+						check = "Number"
+					},
+					new {
+						type = "input_value",
+						name = "DIVISOR",
+						check = "Number"
+					}
+				},
+				inputsInline = true,
+				output = "Number",
+				colour = Math.HUE,
+				tooltip = Msg.MATH_MODULO_TOOLTIP,
+				helpUrl = Msg.MATH_MODULO_HELPURL
+			});
+		}
+	}
+
+	public class MathConstrainBlock : Block
+	{
+		public const string type_name = "math_constrain";
+
+		public MathConstrainBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for constraining a number between two limits.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.MATH_CONSTRAIN_TITLE,
+				args0 = new object[] {
+					new {
+						type = "input_value",
+						name = "VALUE",
+						check = "Number"
+					},
+					new {
+						type = "input_value",
+						name = "LOW",
+						check = "Number"
+					},
+					new {
+						type = "input_value",
+						name = "HIGH",
+						check = "Number"
+					}
+				},
+				inputsInline = true,
+				output = "Number",
+				colour = Math.HUE,
+				tooltip = Msg.MATH_CONSTRAIN_TOOLTIP,
+				helpUrl = Msg.MATH_CONSTRAIN_HELPURL
+			});
+		}
+	}
+
+	public class MathRandomIntBlock : Block
+	{
+		public const string type_name = "math_random_int";
+
+		public MathRandomIntBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for random integer between [X] and [Y].
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.MATH_RANDOM_INT_TITLE,
+				args0 = new object[] {
+					new {
+						type = "input_value",
+						name = "FROM",
+						check = "Number"
+					},
+					new {
+						type = "input_value",
+						name = "TO",
+						check = "Number"
+					}
+				},
+				inputsInline = true,
+				output = "Number",
+				colour = Math.HUE,
+				tooltip = Msg.MATH_RANDOM_INT_TOOLTIP,
+				helpUrl = Msg.MATH_RANDOM_INT_HELPURL
+			});
+		}
+	}
+
+	public class MathRandomFloatBlock : Block
+	{
+		public const string type_name = "math_random_float";
+
+		public MathRandomFloatBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for random fraction between 0 and 1.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM,
+				output = "Number",
+				colour = Math.HUE,
+				tooltip = Msg.MATH_RANDOM_FLOAT_TOOLTIP,
+				helpUrl = Msg.MATH_RANDOM_FLOAT_HELPURL
+			});
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Procedures.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Procedures.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Procedures.cs	(revision 270)
@@ -0,0 +1,1030 @@
+/**
+ * @license
+ * Visual Blocks Editor
+ *
+ * Copyright 2012 Google Inc.
+ * https://developers.google.com/blockly/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview Procedure blocks for Blockly.
+ * @author fraser@google.com (Neil Fraser)
+ */
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using Bridge;
+using Bridge.Html5;
+using Bridge.Text.RegularExpressions;
+
+namespace WebMrbc
+{
+	public abstract class ProceduresDefBlock : Block
+	{
+		protected string callType_;
+		string[] paramIds_;
+		bool hasStatements_;
+		internal string[] arguments_;
+		public Connection statementConnection_;
+
+		public ProceduresDefBlock(string type)
+			: base(type)
+		{
+		}
+
+		/**
+		 * Add or remove the statement block from this function definition.
+		 * @param {boolean} hasStatements True if a statement block is needed.
+		 * @this Blockly.Block
+		 */
+		public void setStatements_(bool hasStatements)
+		{
+			if (this.hasStatements_ == hasStatements) {
+				return;
+			}
+			if (hasStatements) {
+				this.appendStatementInput("STACK")
+					.appendField(Msg.PROCEDURES_DEFNORETURN_DO);
+				if (this.getInput("RETURN") != null) {
+					this.moveInputBefore("STACK", "RETURN");
+				}
+			}
+			else {
+				this.removeInput("STACK", true);
+			}
+			this.hasStatements_ = hasStatements;
+		}
+
+		/**
+		 * Update the display of parameters for this procedure definition block.
+		 * Display a warning if there are duplicately named parameters.
+		 * @private
+		 * @this Blockly.Block
+		 */
+		public void updateParams_()
+		{
+			// Check for duplicated arguments.
+			var badArg = false;
+			var hash = new { };
+			for (var i = 0; i < this.arguments_.Length; i++) {
+				if (Script.Get<bool>(hash, "arg_" + this.arguments_[i].ToLower())) {
+					badArg = true;
+					break;
+				}
+				hash["arg_" + this.arguments_[i].ToLower()] = true;
+			}
+			if (badArg) {
+				this.setWarningText(Msg.PROCEDURES_DEF_DUPLICATE_WARNING);
+			}
+			else {
+				this.setWarningText(null);
+			}
+			// Merge the arguments into a human-readable list.
+			var paramString = "";
+			if (this.arguments_.Length != 0) {
+				paramString = Msg.PROCEDURES_BEFORE_PARAMS +
+					" " + this.arguments_.Join(", ");
+			}
+			// The params field is deterministic based on the mutation,
+			// no need to fire a change event.
+			Blockly.Events.disable();
+			try {
+				this.setFieldValue(paramString, "PARAMS");
+			}
+			finally {
+				Blockly.Events.enable();
+			}
+		}
+
+		/**
+		 * Create XML to represent the argument inputs.
+		 * @param {=boolean} opt_paramIds If true include the IDs of the parameter
+		 *     quarks.  Used by Blockly.Procedures.mutateCallers for reconnection.
+		 * @return {!Element} XML storage element.
+		 * @this Blockly.Block
+		 */
+		public Element mutationToDom(bool opt_paramIds)
+		{
+			var container = Document.CreateElement("mutation");
+			if (opt_paramIds) {
+				container.SetAttribute("name", this.getFieldValue("NAME"));
+			}
+			for (var i = 0; i < this.arguments_.Length; i++) {
+				var parameter = Document.CreateElement("arg");
+				parameter.SetAttribute("name", this.arguments_[i]);
+				if (opt_paramIds && this.paramIds_ != null) {
+					parameter.SetAttribute("paramId", this.paramIds_[i]);
+				}
+				container.AppendChild(parameter);
+			}
+
+			// Save whether the statement input is visible.
+			if (!this.hasStatements_) {
+				container.SetAttribute("statements", "false");
+			}
+			return container;
+		}
+
+		/**
+		 * Parse XML to restore the argument inputs.
+		 * @param {!Element} xmlElement XML storage element.
+		 * @this Blockly.Block
+		 */
+		public void domToMutation(Element xmlElement)
+		{
+			this.arguments_ = new string[0];
+			Element childNode;
+			for (var i = 0; (childNode = (dynamic)xmlElement.ChildNodes[i]) != null; i++) {
+				if (childNode.NodeName.ToLower() == "arg") {
+					this.arguments_.Push(childNode.GetAttribute("name"));
+				}
+			}
+			this.updateParams_();
+			Blockly.Procedures.mutateCallers(this);
+
+			// Show or hide the statement input.
+			this.setStatements_(xmlElement.GetAttribute("statements") != "false");
+		}
+
+		/**
+		 * Populate the mutator's dialog with this block's components.
+		 * @param {!Workspace} workspace Mutator's workspace.
+		 * @return {!Blockly.Block} Root block in mutator.
+		 * @this Blockly.Block
+		 */
+		public Block decompose(Workspace workspace)
+		{
+			var containerBlock = workspace.newBlock(ProceduresMutatorcontainerBlock.type_name);
+			containerBlock.initSvg();
+
+			// Check/uncheck the allow statement box.
+			if (this.getInput("RETURN") != null) {
+				containerBlock.setFieldValue(this.hasStatements_ ? "TRUE" : "FALSE", "STATEMENTS");
+			}
+			else {
+				containerBlock.getInput("STATEMENT_INPUT").setVisible(false);
+			}
+
+			// Parameter list.
+			var connection = containerBlock.getInput("STACK").connection;
+			for (var i = 0; i < this.arguments_.Length; i++) {
+				var paramBlock = (ProceduresMutatorargBlock)workspace.newBlock(ProceduresMutatorargBlock.type_name);
+				paramBlock.initSvg();
+				paramBlock.setFieldValue(this.arguments_[i], "NAME");
+				// Store the old location.
+				paramBlock.oldLocation = i;
+				connection.connect(paramBlock.previousConnection);
+				connection = paramBlock.nextConnection;
+			}
+			// Initialize procedure's callers with blank IDs.
+			Blockly.Procedures.mutateCallers(this);
+			return containerBlock;
+		}
+
+		/**
+		 * Reconfigure this block based on the mutator dialog's components.
+		 * @param {!Blockly.Block} containerBlock Root block in mutator.
+		 * @this Blockly.Block
+		 */
+		public void compose(Block containerBlock)
+		{
+			// Parameter list.
+			this.arguments_ = new string[0];
+			this.paramIds_ = new string[0];
+			var paramBlock = containerBlock.getInputTargetBlock("STACK");
+			while (paramBlock != null) {
+				this.arguments_.Push(paramBlock.getFieldValue("NAME"));
+				this.paramIds_.Push(paramBlock.id);
+				paramBlock = (paramBlock.nextConnection != null) ?
+					paramBlock.nextConnection.targetBlock() : null;
+			}
+			this.updateParams_();
+			Blockly.Procedures.mutateCallers(this);
+
+			// Show/hide the statement input.
+			var hasStatements_ = containerBlock.getFieldValue("STATEMENTS");
+			if (hasStatements_ != null) {
+				var hasStatements = hasStatements_ == "TRUE";
+				if (this.hasStatements_ != hasStatements) {
+					if (hasStatements) {
+						this.setStatements_(true);
+						// Restore the stack, if one was saved.
+						Mutator.reconnect(this.statementConnection_, this, "STACK");
+						this.statementConnection_ = null;
+					}
+					else {
+						// Save the stack, then disconnect it.
+						var stackConnection = this.getInput("STACK").connection;
+						this.statementConnection_ = stackConnection.targetConnection;
+						if (this.statementConnection_ != null) {
+							var stackBlock = stackConnection.targetBlock();
+							stackBlock.unplug();
+							stackBlock.bumpNeighbours_();
+						}
+						this.setStatements_(false);
+					}
+				}
+			}
+		}
+
+		/**
+		 * Return all variables referenced by this block.
+		 * @return {!Array.<string>} List of variable names.
+		 * @this Blockly.Block
+		 */
+		public override string[] getVars()
+		{
+			return this.arguments_;
+		}
+
+		/**
+		 * Notification that a variable is renaming.
+		 * If the name matches one of this block's variables, rename it.
+		 * @param {string} oldName Previous name of variable.
+		 * @param {string} newName Renamed variable.
+		 * @this Blockly.Block
+		 */
+		public override void renameVar(string oldName, string newName)
+		{
+			var change = false;
+			for (var i = 0; i < this.arguments_.Length; i++) {
+				if (Blockly.Names.equals(oldName, this.arguments_[i])) {
+					this.arguments_[i] = newName;
+					change = true;
+				}
+			}
+			if (change) {
+				this.updateParams_();
+				// Update the mutator's variables if the mutator is open.
+				if (this.mutator.isVisible()) {
+					var blocks = this.mutator.workspace_.getAllBlocks();
+					Block block;
+					for (var i = 0; (block = blocks[i]) != null; i++) {
+						if (block.type == ProceduresMutatorargBlock.type_name &&
+							Blockly.Names.equals(oldName, block.getFieldValue("NAME"))) {
+							block.setFieldValue(newName, "NAME");
+						}
+					}
+				}
+			}
+		}
+
+		/**
+		 * Add custom menu options to this block's context menu.
+		 * @param {!Array} options List of menu options to add to.
+		 * @this Blockly.Block
+		 */
+		public void customContextMenu(object[] options)
+		{
+			// Add option to create caller.
+			var option = new ContextMenuOption() { enabled = true };
+			var name = this.getFieldValue("NAME");
+			option.text = Msg.PROCEDURES_CREATE_DO.Replace("%1", name);
+			var xmlMutation = goog.dom.createDom("mutation");
+			xmlMutation.SetAttribute("name", name);
+			for (var i = 0; i < this.arguments_.Length; i++) {
+				var xmlArg = goog.dom.createDom("arg");
+				xmlArg.SetAttribute("name", this.arguments_[i]);
+				xmlMutation.AppendChild(xmlArg);
+			}
+			var xmlBlock = goog.dom.createDom("block", null, xmlMutation);
+			xmlBlock.SetAttribute("type", this.callType_);
+			option.callback = ContextMenu.callbackFactory(this, xmlBlock);
+			options.Push(option);
+
+			// Add options to create getters for each parameter.
+			if (!this.isCollapsed()) {
+				for (var i = 0; i < this.arguments_.Length; i++) {
+					option = new ContextMenuOption() { enabled = true };
+					name = this.arguments_[i];
+					option.text = Msg.VARIABLES_SET_CREATE_GET.Replace("%1", name);
+					var xmlField = goog.dom.createDom("field", null, name);
+					xmlField.SetAttribute("name", "VAR");
+					xmlBlock = goog.dom.createDom("block", null, xmlField);
+					xmlBlock.SetAttribute("type", VariablesGetBlock.type_name);
+					option.callback = ContextMenu.callbackFactory(this, xmlBlock);
+					options.Push(option);
+				}
+			}
+		}
+
+		public abstract Tuple<string, string[], bool> getProcedureDef();
+	}
+
+	public class ProceduresDefnoreturnBlock : ProceduresDefBlock
+	{
+		public const string type_name = "procedures_defnoreturn";
+
+		public ProceduresDefnoreturnBlock()
+			: base(type_name)
+		{
+			callType_ = ProceduresCallnoreturnBlock.type_name;
+		}
+
+		/**
+		 * Block for defining a procedure with no return value.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			var nameField = new FieldTextInput(
+				Msg.PROCEDURES_DEFNORETURN_PROCEDURE);
+			nameField.setValidator((str) => { return Blockly.Procedures.rename(nameField, str); });
+			nameField.setSpellcheck(false);
+			this.appendDummyInput()
+				.appendField(Msg.PROCEDURES_DEFNORETURN_TITLE)
+				.appendField(nameField, "NAME")
+				.appendField("", "PARAMS");
+			this.setMutator(new Mutator(new[] { ProceduresMutatorargBlock.type_name }));
+			if ((this.workspace.options.comments ||
+				 (this.workspace.options.parentWorkspace != null &&
+				  this.workspace.options.parentWorkspace.options.comments)) &&
+				!String.IsNullOrEmpty(Msg.PROCEDURES_DEFNORETURN_COMMENT)) {
+				this.setCommentText(Msg.PROCEDURES_DEFNORETURN_COMMENT);
+			}
+			this.setColour(Blockly.Procedures.HUE);
+			this.setTooltip(Msg.PROCEDURES_DEFNORETURN_TOOLTIP);
+			this.setHelpUrl(Msg.PROCEDURES_DEFNORETURN_HELPURL);
+			this.arguments_ = new string[0];
+			this.setStatements_(true);
+			this.statementConnection_ = null;
+		}
+
+		/**
+		 * Return the signature of this procedure definition.
+		 * @return {!Array} Tuple containing three elements:
+		 *     - the name of the defined procedure,
+		 *     - a list of all its arguments,
+		 *     - that it DOES NOT have a return value.
+		 * @this Blockly.Block
+		 */
+		public override Tuple<string, string[], bool> getProcedureDef()
+		{
+			return new Tuple<string, string[], bool>(this.getFieldValue("NAME"), this.arguments_, false);
+		}
+	}
+
+	public class ProceduresDefreturnBlock : ProceduresDefBlock
+	{
+		public const string type_name = "procedures_defreturn";
+
+		public ProceduresDefreturnBlock()
+			: base(type_name)
+		{
+			callType_ = ProceduresCallreturnBlock.type_name;
+		}
+
+		/**
+		 * Block for defining a procedure with a return value.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			var nameField = new FieldTextInput(
+				Msg.PROCEDURES_DEFRETURN_PROCEDURE);
+			nameField.setValidator((str) => { return Blockly.Procedures.rename(nameField, str); });
+			nameField.setSpellcheck(false);
+			this.appendDummyInput()
+				.appendField(Msg.PROCEDURES_DEFRETURN_TITLE)
+				.appendField(nameField, "NAME")
+				.appendField("", "PARAMS");
+			this.appendValueInput("RETURN")
+				.setAlign(Blockly.ALIGN_RIGHT)
+				.appendField(Msg.PROCEDURES_DEFRETURN_RETURN);
+			this.setMutator(new Mutator(new[] { ProceduresMutatorargBlock.type_name }));
+			if ((this.workspace.options.comments ||
+				 (this.workspace.options.parentWorkspace != null &&
+				  this.workspace.options.parentWorkspace.options.comments)) &&
+				!String.IsNullOrEmpty(Msg.PROCEDURES_DEFRETURN_COMMENT)) {
+				this.setCommentText(Msg.PROCEDURES_DEFRETURN_COMMENT);
+			}
+			this.setColour(Blockly.Procedures.HUE);
+			this.setTooltip(Msg.PROCEDURES_DEFRETURN_TOOLTIP);
+			this.setHelpUrl(Msg.PROCEDURES_DEFRETURN_HELPURL);
+			this.arguments_ = new string[0];
+			this.setStatements_(true);
+			this.statementConnection_ = null;
+		}
+
+		/**
+		 * Return the signature of this procedure definition.
+		 * @return {!Array} Tuple containing three elements:
+		 *     - the name of the defined procedure,
+		 *     - a list of all its arguments,
+		 *     - that it DOES have a return value.
+		 * @this Blockly.Block
+		 */
+		public override Tuple<string, string[], bool> getProcedureDef()
+		{
+			return new Tuple<string, string[], bool>(this.getFieldValue("NAME"), this.arguments_, true);
+		}
+	}
+
+	public class ProceduresMutatorcontainerBlock : Block
+	{
+		public const string type_name = "procedures_mutatorcontainer";
+
+		public ProceduresMutatorcontainerBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Mutator block for procedure container.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField(Msg.PROCEDURES_MUTATORCONTAINER_TITLE);
+			this.appendStatementInput("STACK");
+			this.appendDummyInput("STATEMENT_INPUT")
+				.appendField(Msg.PROCEDURES_ALLOW_STATEMENTS)
+				.appendField(new FieldCheckbox("TRUE"), "STATEMENTS");
+			this.setColour(Blockly.Procedures.HUE);
+			this.setTooltip(Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP);
+			this.contextMenu = false;
+		}
+	}
+
+	[IgnoreCast]
+	public class ProceduresMutatorargBlock : Block
+	{
+		public const string type_name = "procedures_mutatorarg";
+		public int oldLocation;
+
+		public ProceduresMutatorargBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Mutator block for procedure argument.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			var field = new FieldTextInput("x", this.validator_);
+			this.appendDummyInput()
+				.appendField(Msg.PROCEDURES_MUTATORARG_TITLE)
+				.appendField(field, "NAME");
+			this.setPreviousStatement(true);
+			this.setNextStatement(true);
+			this.setColour(Blockly.Procedures.HUE);
+			this.setTooltip(Msg.PROCEDURES_MUTATORARG_TOOLTIP);
+			this.contextMenu = false;
+
+			// Create the default variable when we drag the block in from the flyout.
+			// Have to do this after installing the field on the block.
+			field.onFinishEditing_ = this.createNewVar_;
+			field.onFinishEditing_("x");
+		}
+
+		/**
+		 * Obtain a valid name for the procedure.
+		 * Merge runs of whitespace.  Strip leading and trailing whitespace.
+		 * Beyond this, all names are legal.
+		 * @param {string} newVar User-supplied name.
+		 * @return {?string} Valid name, or null if a name was not specified.
+		 * @private
+		 * @this Blockly.Block
+		 */
+		public string validator_(string newVar)
+		{
+			newVar = newVar.Replace(new Regex("[\\s\\xa0]+", "g"), " ").Replace(new Regex("^ | $", "g"), "");
+			return newVar;
+		}
+
+		/**
+		 * Called when focusing away from the text field.
+		 * Creates a new variable with this name.
+		 * @param {string} newText The new variable name.
+		 * @private
+		 * @this FieldTextInput
+		 */
+		public void createNewVar_(string newText)
+		{
+			var source = this/*((FieldTextInput)this).sourceBlock_*/;
+			if (source != null && source.workspace != null && source.workspace.options != null
+				&& source.workspace.options.parentWorkspace != null) {
+				source.workspace.options.parentWorkspace.createVariable(newText);
+			}
+		}
+	}
+
+	public class ProceduresCallBlock : Block
+	{
+		internal string[] arguments_;
+		protected Dictionary<string, Connection> quarkConnections_;
+		protected string[] quarkIds_;
+		protected bool rendered;
+		protected string defType_;
+
+		public ProceduresCallBlock(string type)
+			: base(type)
+		{
+		}
+
+		/**
+		 * Returns the name of the procedure this block calls.
+		 * @return {string} Procedure name.
+		 * @this Blockly.Block
+		 */
+		public string getProcedureCall()
+		{
+			// The NAME field is guaranteed to exist, null will never be returned.
+			return /** @type {string} */ (this.getFieldValue("NAME"));
+		}
+
+		/**
+		 * Notification that a procedure is renaming.
+		 * If the name matches this block's procedure, rename it.
+		 * @param {string} oldName Previous name of procedure.
+		 * @param {string} newName Renamed procedure.
+		 * @this Blockly.Block
+		 */
+		public void renameProcedure(string oldName, string newName)
+		{
+			if (Blockly.Names.equals(oldName, this.getProcedureCall())) {
+				this.setFieldValue(newName, "NAME");
+				this.setTooltip(
+					(this.outputConnection != null ? Msg.PROCEDURES_CALLRETURN_TOOLTIP :
+					 Msg.PROCEDURES_CALLNORETURN_TOOLTIP)
+					.Replace("%1", newName));
+			}
+		}
+
+		/**
+		 * Notification that the procedure's parameters have changed.
+		 * @param {!Array.<string>} paramNames New param names, e.g. ["x", "y", "z"].
+		 * @param {!Array.<string>} paramIds IDs of params (consistent for each
+		 *     parameter through the life of a mutator, regardless of param renaming),
+		 *     e.g. ["piua", "f8b_", "oi.o"].
+		 * @private
+		 * @this Blockly.Block
+		 */
+		public void setProcedureParameters_(string[] paramNames, string[] paramIds)
+		{
+			// Data structures:
+			// this.arguments = ["x", "y"]
+			//     Existing param names.
+			// this.quarkConnections_ {piua: null, f8b_: Blockly.Connection}
+			//     Look-up of paramIds to connections plugged into the call block.
+			// this.quarkIds_ = ["piua", "f8b_"]
+			//     Existing param IDs.
+			// Note that quarkConnections_ may include IDs that no longer exist, but
+			// which might reappear if a param is reattached in the mutator.
+			var defBlock = Blockly.Procedures.getDefinition(this.getProcedureCall(),
+				this.workspace);
+			var mutatorOpen = defBlock != null && defBlock.mutator != null &&
+				defBlock.mutator.isVisible();
+			if (!mutatorOpen) {
+				this.quarkConnections_ = new Dictionary<string, Connection>();
+				this.quarkIds_ = null;
+			}
+			if (paramIds == null) {
+				// Reset the quarks (a mutator is about to open).
+				return;
+			}
+			if (goog.array.equals(this.arguments_, paramNames)) {
+				// No change.
+				this.quarkIds_ = paramIds;
+				return;
+			}
+			if (paramIds.Length != paramNames.Length) {
+				throw new Exception("Error: paramNames and paramIds must be the same length.");
+			}
+			this.setCollapsed(false);
+			if (this.quarkIds_ == null) {
+				// Initialize tracking for this block.
+				this.quarkConnections_ = new Dictionary<string, Connection>();
+				if (paramNames.Join("\n") == this.arguments_.Join("\n")) {
+					// No change to the parameters, allow quarkConnections_ to be
+					// populated with the existing connections.
+					this.quarkIds_ = paramIds;
+				}
+				else {
+					this.quarkIds_ = new string[0];
+				}
+			}
+			// Switch off rendering while the block is rebuilt.
+			var savedRendered = this.rendered;
+			this.rendered = false;
+			// Update the quarkConnections_ with existing connections.
+			for (var i = 0; i < this.arguments_.Length; i++) {
+				var input = this.getInput("ARG" + i);
+				if (input != null) {
+					var connection = input.connection.targetConnection;
+					this.quarkConnections_[this.quarkIds_[i]] = connection;
+					if (mutatorOpen && connection != null &&
+						paramIds.IndexOf(this.quarkIds_[i]) == -1) {
+						// This connection should no longer be attached to this block.
+						connection.disconnect();
+						connection.getSourceBlock().bumpNeighbours_();
+					}
+				}
+			}
+			// Rebuild the block's arguments.
+			this.arguments_ = (string[])(new string[0]).Concat(paramNames);
+			this.updateShape_();
+			this.quarkIds_ = paramIds;
+			// Reconnect any child blocks.
+			if (this.quarkIds_ != null) {
+				for (var i = 0; i < this.arguments_.Length; i++) {
+					var quarkId = this.quarkIds_[i];
+					Connection connection;
+					if (this.quarkConnections_.TryGetValue(quarkId, out connection)) {
+						if (!Mutator.reconnect(connection, this, "ARG" + i)) {
+							// Block no longer exists or has been attached elsewhere.
+							Script.Delete(this.quarkConnections_[quarkId]);
+						}
+					}
+				}
+			}
+			// Restore rendering and show the changes.
+			this.rendered = savedRendered;
+			if (this.rendered) {
+				this.render();
+			}
+		}
+
+		/**
+		 * Modify this block to have the correct number of arguments.
+		 * @private
+		 * @this Blockly.Block
+		 */
+		private void updateShape_()
+		{
+			int i;
+			for (i = 0; i < this.arguments_.Length; i++) {
+				var field = this.getField("ARGNAME" + i);
+				if (field != null) {
+					// Ensure argument name is up to date.
+					// The argument name field is deterministic based on the mutation,
+					// no need to fire a change event.
+					Blockly.Events.disable();
+					try {
+						field.setValue(this.arguments_[i]);
+					}
+					finally {
+						Blockly.Events.enable();
+					}
+				}
+				else {
+					// Add new input.
+					field = new FieldLabel(this.arguments_[i]);
+					var input = this.appendValueInput("ARG" + i)
+						.setAlign(Blockly.ALIGN_RIGHT)
+						.appendField(field, "ARGNAME" + i);
+					input.init();
+				}
+			}
+			// Remove deleted inputs.
+			while (this.getInput("ARG" + i) != null) {
+				this.removeInput("ARG" + i);
+				i++;
+			}
+			// Add "with:" if there are parameters, remove otherwise.
+			var topRow = this.getInput("TOPROW");
+			if (topRow != null) {
+				if (this.arguments_.Length != 0) {
+					if (this.getField("WITH") == null) {
+						topRow.appendField(Msg.PROCEDURES_CALL_BEFORE_PARAMS, "WITH");
+						topRow.init();
+					}
+				}
+				else {
+					if (this.getField("WITH") != null) {
+						topRow.removeField("WITH");
+					}
+				}
+			}
+		}
+
+		/**
+		 * Create XML to represent the (non-editable) name and arguments.
+		 * @return {!Element} XML storage element.
+		 * @this Blockly.Block
+		 */
+		public Element mutationToDom()
+		{
+			var container = Document.CreateElement("mutation");
+			container.SetAttribute("name", this.getProcedureCall());
+			for (var i = 0; i < this.arguments_.Length; i++) {
+				var parameter = Document.CreateElement("arg");
+				parameter.SetAttribute("name", this.arguments_[i]);
+				container.AppendChild(parameter);
+			}
+			return container;
+		}
+
+		/**
+		 * Parse XML to restore the (non-editable) name and parameters.
+		 * @param {!Element} xmlElement XML storage element.
+		 * @this Blockly.Block
+		 */
+		public void domToMutation(Element xmlElement)
+		{
+			var name = xmlElement.GetAttribute("name");
+			this.renameProcedure(this.getProcedureCall(), name);
+			var args = new string[0];
+			var paramIds = new string[0];
+			Element childNode;
+			for (var i = 0; (childNode = (dynamic)xmlElement.ChildNodes[i]) != null; i++) {
+				if (childNode.NodeName.ToLower() == "arg") {
+					args.Push(childNode.GetAttribute("name"));
+					paramIds.Push(childNode.GetAttribute("paramId"));
+				}
+			}
+			this.setProcedureParameters_(args, paramIds);
+		}
+
+		/**
+		 * Notification that a variable is renaming.
+		 * If the name matches one of this block's variables, rename it.
+		 * @param {string} oldName Previous name of variable.
+		 * @param {string} newName Renamed variable.
+		 * @this Blockly.Block
+		 */
+		public override void renameVar(string oldName, string newName)
+		{
+			for (var i = 0; i < this.arguments_.Length; i++) {
+				if (Blockly.Names.equals(oldName, this.arguments_[i])) {
+					this.arguments_[i] = newName;
+					this.getField("ARGNAME" + i).setValue(newName);
+				}
+			}
+		}
+
+		/**
+		 * Procedure calls cannot exist without the corresponding procedure
+		 * definition.  Enforce this link whenever an event is fired.
+		 * @this Blockly.Block
+		 */
+		public void onchange(Abstract e)
+		{
+			if (this.workspace == null || this.workspace.isFlyout) {
+				// Block is deleted or is in a flyout.
+				return;
+			}
+			if (e.type == Events.CREATE &&
+				((Create)e).ids.IndexOf(this.id) != -1) {
+				// Look for the case where a procedure call was created (usually through
+				// paste) and there is no matching definition.  In this case, create
+				// an empty definition block with the correct signature.
+				var name = this.getProcedureCall();
+				var def = Blockly.Procedures.getDefinition(name, this.workspace);
+				if (def != null && (def.type != this.defType_ ||
+					JSON.Stringify(((dynamic)def).arguments_) != JSON.Stringify(this.arguments_))) {
+					// The signatures don"t match.
+					def = null;
+				}
+				if (def == null) {
+					Blockly.Events.setGroup(e.group);
+					/**
+					 * Create matching definition block.
+					 * <xml>
+					 *   <block type="procedures_defreturn" x="10" y="20">
+					 *     <mutation name="test">
+					 *       <arg name="x"></arg>
+					 *     </mutation>
+					 *     <field name="NAME">test</field>
+					 *   </block>
+					 * </xml>
+					 */
+					var xml = goog.dom.createDom("xml");
+					var block = goog.dom.createDom("block");
+					block.SetAttribute("type", this.defType_);
+					var xy = this.getRelativeToSurfaceXY();
+					var x = xy.x + Blockly.SNAP_RADIUS * (this.RTL ? -1 : 1);
+					var y = xy.y + Blockly.SNAP_RADIUS * 2;
+					block.SetAttribute("x", x.ToString());
+					block.SetAttribute("y", y.ToString());
+					var mutation = this.mutationToDom();
+					block.AppendChild(mutation);
+					var field = goog.dom.createDom("field");
+					field.SetAttribute("name", "NAME");
+					field.AppendChild(Document.CreateTextNode(this.getProcedureCall()));
+					block.AppendChild(field);
+					xml.AppendChild(block);
+					Blockly.Xml.domToWorkspace(xml, this.workspace);
+					Blockly.Events.setGroup(false.ToString());
+				}
+			}
+			else if (e.type == Events.DELETE) {
+				// Look for the case where a procedure definition has been deleted,
+				// leaving this block (a procedure call) orphaned.  In this case, delete
+				// the orphan.
+				var name = this.getProcedureCall();
+				var def = Blockly.Procedures.getDefinition(name, this.workspace);
+				if (def == null) {
+					Blockly.Events.setGroup(e.group);
+					this.dispose(true/*, false*/);
+					Blockly.Events.setGroup(false.ToString());
+				}
+			}
+		}
+	}
+
+	public class ProceduresCallnoreturnBlock : ProceduresCallBlock
+	{
+		public const string type_name = "procedures_callnoreturn";
+
+		public ProceduresCallnoreturnBlock()
+			: base(type_name)
+		{
+			defType_ = ProceduresDefnoreturnBlock.type_name;
+		}
+
+		/**
+		 * Block for calling a procedure with no return value.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.appendDummyInput("TOPROW")
+				.appendField(this.id, "NAME");
+			this.setPreviousStatement(true);
+			this.setNextStatement(true);
+			this.setColour(Blockly.Procedures.HUE);
+			// Tooltip is set in renameProcedure.
+			this.setHelpUrl(Msg.PROCEDURES_CALLNORETURN_HELPURL);
+			this.arguments_ = new string[0];
+			this.quarkConnections_ = new Dictionary<string, Connection>();
+			this.quarkIds_ = null;
+		}
+
+		/**
+		 * Add menu option to find the definition block for this call.
+		 * @param {!Array} options List of menu options to add to.
+		 * @this Blockly.Block
+		 */
+		public void customContextMenu(object[] options)
+		{
+			var option = new ContextMenuOption() { enabled = true };
+			option.text = Msg.PROCEDURES_HIGHLIGHT_DEF;
+			var name = this.getProcedureCall();
+			var workspace = this.workspace;
+			option.callback = () => {
+				var def = Blockly.Procedures.getDefinition(name, workspace);
+				if (def != null)
+					def.select();
+			};
+			options.Push(option);
+		}
+	}
+
+	public class ProceduresCallreturnBlock : ProceduresCallBlock
+	{
+		public const string type_name = "procedures_callreturn";
+
+		public ProceduresCallreturnBlock()
+			: base(type_name)
+		{
+			defType_ = ProceduresDefreturnBlock.type_name;
+		}
+
+		/**
+		 * Block for calling a procedure with a return value.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.appendDummyInput("TOPROW")
+				.appendField("", "NAME");
+			this.setOutput(true);
+			this.setColour(Blockly.Procedures.HUE);
+			// Tooltip is set in domToMutation.
+			this.setHelpUrl(Msg.PROCEDURES_CALLRETURN_HELPURL);
+			this.arguments_ = new string[0];
+			this.quarkConnections_ = new Dictionary<string, Connection>();
+			this.quarkIds_ = null;
+		}
+	}
+
+	public class ProceduresIfreturnBlock : Block
+	{
+		public const string type_name = "procedures_ifreturn";
+		internal bool hasReturnValue_;
+
+		public ProceduresIfreturnBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for conditionally returning a value from a procedure.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.appendValueInput("CONDITION")
+				.setCheck("Boolean")
+				.appendField(Msg.CONTROLS_IF_MSG_IF);
+			this.appendValueInput("VALUE")
+				.appendField(Msg.PROCEDURES_DEFRETURN_RETURN);
+			this.setInputsInline(true);
+			this.setPreviousStatement(true);
+			this.setNextStatement(true);
+			this.setColour(Blockly.Procedures.HUE);
+			this.setTooltip(Msg.PROCEDURES_IFRETURN_TOOLTIP);
+			this.setHelpUrl(Msg.PROCEDURES_IFRETURN_HELPURL);
+			this.hasReturnValue_ = true;
+		}
+
+		/**
+		 * Create XML to represent whether this block has a return value.
+		 * @return {!Element} XML storage element.
+		 * @this Blockly.Block
+		 */
+		public Element mutationToDom()
+		{
+			var container = Document.CreateElement("mutation");
+			container.SetAttribute("value", this.hasReturnValue_ ? "1" : "0");
+			return container;
+		}
+
+		/**
+		 * Parse XML to restore whether this block has a return value.
+		 * @param {!Element} xmlElement XML storage element.
+		 * @this Blockly.Block
+		 */
+		public void domToMutation(Element xmlElement)
+		{
+			var value = xmlElement.GetAttribute("value");
+			this.hasReturnValue_ = (value == "1");
+			if (!this.hasReturnValue_) {
+				this.removeInput("VALUE");
+				this.appendDummyInput("VALUE")
+				  .appendField(Msg.PROCEDURES_DEFRETURN_RETURN);
+			}
+		}
+
+		/**
+		 * Called whenever anything on the workspace changes.
+		 * Add warning if this flow block is not nested inside a loop.
+		 * @param {!Abstract} e Change event.
+		 * @this Blockly.Block
+		 */
+		public void onchange(Abstract e)
+		{
+			if (((WorkspaceSvg)this.workspace).isDragging()) {
+				return;  // Don't change state at the start of a drag.
+			}
+			var legal = false;
+			// Is the block nested in a procedure?
+			var block = (Block)this;
+			do {
+				if (this.FUNCTION_TYPES.IndexOf(block.type) != -1) {
+					legal = true;
+					break;
+				}
+				block = block.getSurroundParent();
+			} while (block != null);
+			if (legal) {
+				// If needed, toggle whether this block has a return value.
+				if (block.type == ProceduresDefnoreturnBlock.type_name && this.hasReturnValue_) {
+					this.removeInput("VALUE");
+					this.appendDummyInput("VALUE")
+					  .appendField(Msg.PROCEDURES_DEFRETURN_RETURN);
+					this.hasReturnValue_ = false;
+				}
+				else if (block.type == ProceduresDefreturnBlock.type_name && !this.hasReturnValue_) {
+					this.removeInput("VALUE");
+					this.appendValueInput("VALUE")
+					  .appendField(Msg.PROCEDURES_DEFRETURN_RETURN);
+					this.hasReturnValue_ = true;
+				}
+				this.setWarningText(null);
+				if (!this.isInFlyout) {
+					this.setDisabled(false);
+				}
+			}
+			else {
+				this.setWarningText(Msg.PROCEDURES_IFRETURN_WARNING);
+				if (!this.isInFlyout && !this.getInheritedDisabled()) {
+					this.setDisabled(true);
+				}
+			}
+		}
+
+		/**
+		 * List of block types that are functions and thus do not need warnings.
+		 * To add a new function type add this to your code:
+		 * Blockly.Blocks["procedures_ifreturn"].FUNCTION_TYPES.push("custom_func");
+		 */
+		string[] FUNCTION_TYPES = new[] { ProceduresDefnoreturnBlock.type_name, ProceduresDefreturnBlock.type_name };
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Text.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Text.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Text.cs	(revision 270)
@@ -0,0 +1,928 @@
+/**
+ * @license
+ * Visual Blocks Editor
+ *
+ * Copyright 2012 Google Inc.
+ * https://developers.google.com/blockly/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview Text blocks for Blockly.
+ * @author fraser@google.com (Neil Fraser)
+ */
+using System;
+using System.Linq;
+using System.Text;
+using Bridge;
+using Bridge.Html5;
+using Bridge.jQuery2;
+
+namespace WebMrbc
+{
+	public class Texts
+	{
+		/**
+		 * Common HSV hue for all blocks in this category.
+		 */
+		public static int HUE = 160;
+	}
+
+	public class TextBlock : Block
+	{
+		public const string type_name = "text";
+
+		public TextBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for text value.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.setHelpUrl(Msg.TEXT_TEXT_HELPURL);
+			this.setColour(Texts.HUE);
+			this.appendDummyInput()
+				.appendField(this.newQuote_(true))
+				.appendField(new FieldTextInput(""), "TEXT")
+				.appendField(this.newQuote_(false));
+			this.setOutput(true, "String");
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			// Text block is trivial.  Use tooltip of parent block if it exists.
+			this.setTooltip(new Func<string>(() => {
+				var parent = thisBlock.getParent();
+				return (parent != null && parent.getInputsInline() && !String.IsNullOrEmpty(parent.tooltip)) ? parent.tooltip :
+					Msg.TEXT_TEXT_TOOLTIP;
+			}));
+		}
+
+		/**
+		 * Create an image of an open or closed quote.
+		 * @param {boolean} open True if open quote, false if closed.
+		 * @return {!FieldImage} The field image of the quote.
+		 * @this Blockly.Block
+		 * @private
+		 */
+		public Field newQuote_(bool open)
+		{
+			return TextBlock.newQuote_(open, this.RTL);
+		}
+
+		public static Field newQuote_(bool open, bool RTL)
+		{
+			string file;
+			if (open == RTL) {
+				file = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAqUlEQVQI1z3KvUpCcRiA8ef9E4JNHhI0aFEacm1o0BsI0Slx8wa8gLauoDnoBhq7DcfWhggONDmJJgqCPA7neJ7p934EOOKOnM8Q7PDElo/4x4lFb2DmuUjcUzS3URnGib9qaPNbuXvBO3sGPHJDRG6fGVdMSeWDP2q99FQdFrz26Gu5Tq7dFMzUvbXy8KXeAj57cOklgA+u1B5AoslLtGIHQMaCVnwDnADZIFIrXsoXrgAAAABJRU5ErkJggg==";
+			}
+			else {
+				file = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAn0lEQVQI1z3OMa5BURSF4f/cQhAKjUQhuQmFNwGJEUi0RKN5rU7FHKhpjEH3TEMtkdBSCY1EIv8r7nFX9e29V7EBAOvu7RPjwmWGH/VuF8CyN9/OAdvqIXYLvtRaNjx9mMTDyo+NjAN1HNcl9ZQ5oQMM3dgDUqDo1l8DzvwmtZN7mnD+PkmLa+4mhrxVA9fRowBWmVBhFy5gYEjKMfz9AylsaRRgGzvZAAAAAElFTkSuQmCC";
+			}
+			return new FieldImage(file, 12, 12, "\"");
+		}
+	}
+
+	public class TextJoinBlock : Block
+	{
+		public const string type_name = "text_join";
+		internal int itemCount_;
+
+		public TextJoinBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for creating a string made up of any number of elements of any type.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.setHelpUrl(Msg.TEXT_JOIN_HELPURL);
+			this.setColour(Texts.HUE);
+			this.itemCount_ = 2;
+			this.updateShape_();
+			this.setOutput(true, "String");
+			this.setMutator(new Mutator(new[] { TextCreateJoinItemBlock.type_name }));
+			this.setTooltip(Msg.TEXT_JOIN_TOOLTIP);
+		}
+
+		/**
+		 * Create XML to represent number of text inputs.
+		 * @return {!Element} XML storage element.
+		 * @this Blockly.Block
+		 */
+		public Element mutationToDom()
+		{
+			var container = Document.CreateElement("mutation");
+			container.SetAttribute("items", this.itemCount_.ToString());
+			return container;
+		}
+
+		/**
+		 * Parse XML to restore the text inputs.
+		 * @param {!Element} xmlElement XML storage element.
+		 * @this Blockly.Block
+		 */
+		public void domToMutation(Element xmlElement)
+		{
+			var count = xmlElement.GetAttribute("items");
+			this.itemCount_ = count == null ? 0 : Script.ParseInt(count, 10);
+			this.updateShape_();
+		}
+
+		/**
+		 * Populate the mutator's dialog with this block's components.
+		 * @param {!Workspace} workspace Mutator's workspace.
+		 * @return {!Blockly.Block} Root block in mutator.
+		 * @this Blockly.Block
+		 */
+		public Block decompose(Workspace workspace)
+		{
+			var containerBlock = workspace.newBlock(TextCreateJoinContainerBlock.type_name);
+			containerBlock.initSvg();
+			var connection = containerBlock.getInput("STACK").connection;
+			for (var i = 0; i < this.itemCount_; i++) {
+				var itemBlock = workspace.newBlock(TextCreateJoinItemBlock.type_name);
+				itemBlock.initSvg();
+				connection.connect(itemBlock.previousConnection);
+				connection = itemBlock.nextConnection;
+			}
+			return containerBlock;
+		}
+
+		/**
+		 * Reconfigure this block based on the mutator dialog's components.
+		 * @param {!Blockly.Block} containerBlock Root block in mutator.
+		 * @this Blockly.Block
+		 */
+		public void compose(Block containerBlock)
+		{
+			var itemBlock = (TextCreateJoinItemBlock)containerBlock.getInputTargetBlock("STACK");
+			// Count number of inputs.
+			var connections = new Connection[0];
+			while (itemBlock != null) {
+				connections.Push(itemBlock.valueConnection_);
+				itemBlock = (itemBlock.nextConnection != null) ?
+					(TextCreateJoinItemBlock)itemBlock.nextConnection.targetBlock() : null;
+			}
+			// Disconnect any children that don"t belong.
+			for (var i = 0; i < this.itemCount_; i++) {
+				var connection = this.getInput("ADD" + i).connection.targetConnection;
+				if (connection != null && Array.IndexOf(connections, connection) == -1) {
+					connection.disconnect();
+				}
+			}
+			this.itemCount_ = connections.Length;
+			this.updateShape_();
+			// Reconnect any child blocks.
+			for (var i = 0; i < this.itemCount_; i++) {
+				Mutator.reconnect(connections[i], this, "ADD" + i);
+			}
+		}
+
+		/**
+		 * Store pointers to any connected child blocks.
+		 * @param {!Blockly.Block} containerBlock Root block in mutator.
+		 * @this Blockly.Block
+		 */
+		public void saveConnections(Block containerBlock)
+		{
+			var itemBlock = (TextCreateJoinItemBlock)containerBlock.getInputTargetBlock("STACK");
+			var i = 0;
+			while (itemBlock != null) {
+				var input = this.getInput("ADD" + i);
+				itemBlock.valueConnection_ = (input != null) ? input.connection.targetConnection : null;
+				i++;
+				itemBlock = (itemBlock.nextConnection != null) ?
+					(TextCreateJoinItemBlock)itemBlock.nextConnection.targetBlock() : null;
+			}
+		}
+
+		/**
+		 * Modify this block to have the correct number of inputs.
+		 * @private
+		 * @this Blockly.Block
+		 */
+		private void updateShape_()
+		{
+			if (this.itemCount_ != 0 && this.getInput("EMPTY") != null) {
+				this.removeInput("EMPTY");
+			}
+			else if (this.itemCount_ == 0 && this.getInput("EMPTY") == null) {
+				this.appendDummyInput("EMPTY")
+					.appendField(this.newQuote_(true))
+					.appendField(this.newQuote_(false));
+			}
+			// Add new inputs.
+			int i;
+			for (i = 0; i < this.itemCount_; i++) {
+				if (this.getInput("ADD" + i) == null) {
+					var input = this.appendValueInput("ADD" + i);
+					if (i == 0) {
+						input.appendField(Msg.TEXT_JOIN_TITLE_CREATEWITH);
+					}
+				}
+			}
+			// Remove deleted inputs.
+			while (this.getInput("ADD" + i) != null) {
+				this.removeInput("ADD" + i);
+				i++;
+			}
+		}
+
+		public Field newQuote_(bool open)
+		{
+			return TextBlock.newQuote_(open, this.RTL);
+		}
+	}
+
+	public class TextCreateJoinContainerBlock : Block
+	{
+		public const string type_name = "text_create_join_container";
+
+		public TextCreateJoinContainerBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Mutator block for container.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.setColour(Texts.HUE);
+			this.appendDummyInput()
+				.appendField(Msg.TEXT_CREATE_JOIN_TITLE_JOIN);
+			this.appendStatementInput("STACK");
+			this.setTooltip(Msg.TEXT_CREATE_JOIN_TOOLTIP);
+			this.contextMenu = false;
+		}
+	}
+
+	[IgnoreCast]
+	public class TextCreateJoinItemBlock : Block
+	{
+		public const string type_name = "text_create_join_item";
+		public Connection valueConnection_;
+
+		public TextCreateJoinItemBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Mutator block for add items.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.setColour(Texts.HUE);
+			this.appendDummyInput()
+				.appendField(Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM);
+			this.setPreviousStatement(true);
+			this.setNextStatement(true);
+			this.setTooltip(Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP);
+			this.contextMenu = false;
+		}
+	}
+
+	public class TextAppendBlock : Block
+	{
+		public const string type_name = "text_append";
+
+		public TextAppendBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for appending to a variable in place.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.setHelpUrl(Msg.TEXT_APPEND_HELPURL);
+			this.setColour(Texts.HUE);
+			this.appendValueInput("TEXT")
+				.appendField(Msg.TEXT_APPEND_TO)
+				.appendField(new FieldVariable(
+				Msg.TEXT_APPEND_VARIABLE), "VAR")
+				.appendField(Msg.TEXT_APPEND_APPENDTEXT);
+			this.setPreviousStatement(true);
+			this.setNextStatement(true);
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			this.setTooltip(new Func<string>(() => {
+				return Msg.TEXT_APPEND_TOOLTIP.Replace("%1", thisBlock.getFieldValue("VAR"));
+			}));
+		}
+	}
+
+	public class TextLengthBlock : Block
+	{
+		public const string type_name = "text_length";
+
+		public TextLengthBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for string length.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.TEXT_LENGTH_TITLE,
+				args0 = new object[] {
+					new {
+						type = "input_value",
+						name = "VALUE",
+						check = new [] { "String", "Array" }
+					}
+				},
+				output = "Number",
+				colour = Texts.HUE,
+				tooltip = Msg.TEXT_LENGTH_TOOLTIP,
+				helpUrl = Msg.TEXT_LENGTH_HELPURL
+			});
+		}
+	}
+
+	public class TextIsEmptyBlock : Block
+	{
+		public const string type_name = "text_isEmpty";
+
+		public TextIsEmptyBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for is the string null?
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.TEXT_ISEMPTY_TITLE,
+				args0 = new object[] {
+					new {
+						type = "input_value",
+						name = "VALUE",
+						check = new [] { "String", "Array" }
+					}
+				},
+				output = "Boolean",
+				colour = Texts.HUE,
+				tooltip = Msg.TEXT_ISEMPTY_TOOLTIP,
+				helpUrl = Msg.TEXT_ISEMPTY_HELPURL
+			});
+		}
+	}
+
+	public class TextIndexOfBlock : Block
+	{
+		public const string type_name = "text_indexOf";
+
+		public TextIndexOfBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for finding a substring in the text.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			var OPERATORS = new[] {
+			new [] {Msg.TEXT_INDEXOF_OPERATOR_FIRST, "FIRST"},
+			new [] {Msg.TEXT_INDEXOF_OPERATOR_LAST, "LAST"}
+		};
+			this.setHelpUrl(Msg.TEXT_INDEXOF_HELPURL);
+			this.setColour(Texts.HUE);
+			this.setOutput(true, "Number");
+			this.appendValueInput("VALUE")
+				.setCheck("String")
+				.appendField(Msg.TEXT_INDEXOF_INPUT_INTEXT);
+			this.appendValueInput("FIND")
+				.setCheck("String")
+				.appendField(new FieldDropdown(OPERATORS), "END");
+			if (!String.IsNullOrEmpty(Msg.TEXT_INDEXOF_TAIL)) {
+				this.appendDummyInput().appendField(Msg.TEXT_INDEXOF_TAIL);
+			}
+			this.setInputsInline(true);
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			this.setTooltip(new Func<string>(() => {
+				return Msg.TEXT_INDEXOF_TOOLTIP.Replace("%1",
+					thisBlock.workspace.options.oneBasedIndex ? "0" : "-1");
+			}));
+		}
+	}
+
+	public class TextCharAtBlock : Block
+	{
+		public const string type_name = "text_charAt";
+		string[][] WHERE_OPTIONS;
+
+		public TextCharAtBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for getting a character from the string.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.WHERE_OPTIONS = new[] {
+				new [] {Msg.TEXT_CHARAT_FROM_START, "FROM_START"},
+				new [] {Msg.TEXT_CHARAT_FROM_END, "FROM_END"},
+				new [] {Msg.TEXT_CHARAT_FIRST, "FIRST"},
+				new [] {Msg.TEXT_CHARAT_LAST, "LAST"},
+				new [] {Msg.TEXT_CHARAT_RANDOM, "RANDOM"}
+			};
+			this.setHelpUrl(Msg.TEXT_CHARAT_HELPURL);
+			this.setColour(Texts.HUE);
+			this.setOutput(true, "String");
+			this.appendValueInput("VALUE")
+				.setCheck("String")
+				.appendField(Msg.TEXT_CHARAT_INPUT_INTEXT);
+			this.appendDummyInput("AT");
+			this.setInputsInline(true);
+			this.updateAt_(true);
+			// Assign "this" to a variable for use in the tooltip closure below.
+			var thisBlock = this;
+			this.setTooltip(new Func<string>(() => {
+				var where = thisBlock.getFieldValue("WHERE");
+				var tooltip = Msg.TEXT_CHARAT_TOOLTIP;
+				if (where == "FROM_START" || where == "FROM_END") {
+					var msg = (where == "FROM_START") ?
+						Msg.LISTS_INDEX_FROM_START_TOOLTIP :
+						Msg.LISTS_INDEX_FROM_END_TOOLTIP;
+					tooltip += "  " + msg.Replace("%1",
+						thisBlock.workspace.options.oneBasedIndex ? "#1" : "#0");
+				}
+				return tooltip;
+			}));
+		}
+
+		/**
+		 * Create XML to represent whether there is an "AT" input.
+		 * @return {!Element} XML storage element.
+		 * @this Blockly.Block
+		 */
+		public Element mutationToDom()
+		{
+			var container = Document.CreateElement("mutation");
+			var isAt = this.getInput("AT").type == Blockly.INPUT_VALUE;
+			container.SetAttribute("at", isAt.ToString());
+			return container;
+		}
+
+		/**
+		 * Parse XML to restore the "AT" input.
+		 * @param {!Element} xmlElement XML storage element.
+		 * @this Blockly.Block
+		 */
+		public void domToMutation(Element xmlElement)
+		{
+			// Note: Until January 2013 this block did not have mutations,
+			// so "at" defaults to true.
+			var isAt = (xmlElement.GetAttribute("at") != "false");
+			this.updateAt_(isAt);
+		}
+
+		/**
+		 * Create or delete an input for the numeric index.
+		 * @param {boolean} isAt True if the input should exist.
+		 * @private
+		 * @this Blockly.Block
+		 */
+		public void updateAt_(bool isAt)
+		{
+			// Destroy old "AT" and "ORDINAL" inputs.
+			this.removeInput("AT");
+			this.removeInput("ORDINAL", true);
+			// Create either a value "AT" input or a dummy input.
+			if (isAt) {
+				this.appendValueInput("AT").setCheck("Number");
+				if (!String.IsNullOrEmpty(Msg.ORDINAL_NUMBER_SUFFIX)) {
+					this.appendDummyInput("ORDINAL")
+						.appendField(Msg.ORDINAL_NUMBER_SUFFIX);
+				}
+			}
+			else {
+				this.appendDummyInput("AT");
+			}
+			if (!String.IsNullOrEmpty(Msg.TEXT_CHARAT_TAIL)) {
+				this.removeInput("TAIL", true);
+				this.appendDummyInput("TAIL")
+					.appendField(Msg.TEXT_CHARAT_TAIL);
+			}
+			var menu = new FieldDropdown(this.WHERE_OPTIONS, (value) => {
+				var newAt = (value == "FROM_START") || (value == "FROM_END");
+				// The "isAt" variable is available due to this function being a closure.
+				if (newAt != isAt) {
+					this.updateAt_(newAt);
+					// This menu has been destroyed and replaced.  Update the replacement.
+					this.setFieldValue(value, "WHERE");
+					return null;
+				}
+				return Script.Undefined;
+			});
+			this.getInput("AT").appendField(menu, "WHERE");
+		}
+	}
+
+	public class TextGetSubstringBlock : Block
+	{
+		public const string type_name = "text_getSubstring";
+
+		private string[][][] WHERE_OPTIONS;
+
+		public TextGetSubstringBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for getting substring.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			WHERE_OPTIONS = new[] {
+				new[] {
+					new [] {Msg.TEXT_GET_SUBSTRING_START_FROM_START, "FROM_START"},
+					new [] {Msg.TEXT_GET_SUBSTRING_START_FROM_END, "FROM_END"},
+					new [] {Msg.TEXT_GET_SUBSTRING_START_FIRST, "FIRST"}
+				},
+				new[] {
+					new [] {Msg.TEXT_GET_SUBSTRING_END_FROM_START, "FROM_START"},
+					new [] {Msg.TEXT_GET_SUBSTRING_END_FROM_END, "FROM_END"},
+					new [] {Msg.TEXT_GET_SUBSTRING_END_LAST, "LAST"}
+				}
+			};
+			this.setHelpUrl(Msg.TEXT_GET_SUBSTRING_HELPURL);
+			this.setColour(Texts.HUE);
+			this.appendValueInput("STRING")
+				.setCheck("String")
+				.appendField(Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT);
+			this.appendDummyInput("AT1");
+			this.appendDummyInput("AT2");
+			if (!String.IsNullOrEmpty(Msg.TEXT_GET_SUBSTRING_TAIL)) {
+				this.appendDummyInput("TAIL")
+					.appendField(Msg.TEXT_GET_SUBSTRING_TAIL);
+			}
+			this.setInputsInline(true);
+			this.setOutput(true, "String");
+			this.updateAt_(1, true);
+			this.updateAt_(2, true);
+			this.setTooltip(Msg.TEXT_GET_SUBSTRING_TOOLTIP);
+		}
+
+		/**
+		 * Create XML to represent whether there are "AT" inputs.
+		 * @return {!Element} XML storage element.
+		 * @this Blockly.Block
+		 */
+		public Element mutationToDom()
+		{
+			var container = Document.CreateElement("mutation");
+			var isAt1 = this.getInput("AT1").type == Blockly.INPUT_VALUE;
+			container.SetAttribute("at1", isAt1.ToString());
+			var isAt2 = this.getInput("AT2").type == Blockly.INPUT_VALUE;
+			container.SetAttribute("at2", isAt2.ToString());
+			return container;
+		}
+
+		/**
+		 * Parse XML to restore the "AT" inputs.
+		 * @param {!Element} xmlElement XML storage element.
+		 * @this Blockly.Block
+		 */
+		public void domToMutation(Element xmlElement)
+		{
+			var isAt1 = (xmlElement.GetAttribute("at1") == "true");
+			var isAt2 = (xmlElement.GetAttribute("at2") == "true");
+			this.updateAt_(1, isAt1);
+			this.updateAt_(2, isAt2);
+		}
+
+		/**
+		 * Create or delete an input for a numeric index.
+		 * This block has two such inputs, independant of each other.
+		 * @param {number} n Specify first or second input (1 or 2).
+		 * @param {boolean} isAt True if the input should exist.
+		 * @private
+		 * @this Blockly.Block
+		 */
+		public void updateAt_(int n, bool isAt)
+		{
+			// Create or delete an input for the numeric index.
+			// Destroy old "AT" and "ORDINAL" inputs.
+			this.removeInput("AT" + n);
+			this.removeInput("ORDINAL" + n, true);
+			// Create either a value "AT" input or a dummy input.
+			if (isAt) {
+				this.appendValueInput("AT" + n).setCheck("Number");
+				if (!String.IsNullOrEmpty(Msg.ORDINAL_NUMBER_SUFFIX)) {
+					this.appendDummyInput("ORDINAL" + n)
+						.appendField(Msg.ORDINAL_NUMBER_SUFFIX);
+				}
+			}
+			else {
+				this.appendDummyInput("AT" + n);
+			}
+			// Move tail, if present, to end of block.
+			if (n == 2 && !String.IsNullOrEmpty(Msg.TEXT_GET_SUBSTRING_TAIL)) {
+				this.removeInput("TAIL", true);
+				this.appendDummyInput("TAIL")
+					.appendField(Msg.TEXT_GET_SUBSTRING_TAIL);
+			}
+			var menu = new FieldDropdown(WHERE_OPTIONS[n - 1], (value) => {
+				var newAt = (value == "FROM_START") || (value == "FROM_END");
+				// The "isAt" variable is available due to this function being a
+				// closure.
+				if (newAt != isAt) {
+					this.updateAt_(n, newAt);
+					// This menu has been destroyed and replaced.
+					// Update the replacement.
+					this.setFieldValue(value, "WHERE" + n);
+					return null;
+				}
+				return Script.Undefined;
+			});
+
+			this.getInput("AT" + n)
+				.appendField(menu, "WHERE" + n);
+			if (n == 1) {
+				this.moveInputBefore("AT1", "AT2");
+			}
+		}
+	}
+
+	public class TextChangeCaseBlock : Block
+	{
+		public const string type_name = "text_changeCase";
+
+		public TextChangeCaseBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for changing capitalization.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			var OPERATORS = new[] {
+				new [] {Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE, "UPPERCASE"},
+				new [] {Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE, "LOWERCASE"},
+				new [] {Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE, "TITLECASE"}
+			};
+			this.setHelpUrl(Msg.TEXT_CHANGECASE_HELPURL);
+			this.setColour(Texts.HUE);
+			this.appendValueInput("TEXT")
+				.setCheck("String")
+				.appendField(new FieldDropdown(OPERATORS), "CASE");
+			this.setOutput(true, "String");
+			this.setTooltip(Msg.TEXT_CHANGECASE_TOOLTIP);
+		}
+	}
+
+	public class TextTrimBlock : Block
+	{
+		public const string type_name = "text_trim";
+
+		public TextTrimBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for trimming spaces.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			var OPERATORS = new[] {
+				new [] {Msg.TEXT_TRIM_OPERATOR_BOTH, "BOTH"},
+				new [] {Msg.TEXT_TRIM_OPERATOR_LEFT, "LEFT"},
+				new [] {Msg.TEXT_TRIM_OPERATOR_RIGHT, "RIGHT"}
+			};
+			this.setHelpUrl(Msg.TEXT_TRIM_HELPURL);
+			this.setColour(Texts.HUE);
+			this.appendValueInput("TEXT")
+				.setCheck("String")
+				.appendField(new FieldDropdown(OPERATORS), "MODE");
+			this.setOutput(true, "String");
+			this.setTooltip(Msg.TEXT_TRIM_TOOLTIP);
+		}
+	}
+
+	public class TextPrintBlock : Block
+	{
+		public const string type_name = "text_print";
+
+		public TextPrintBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for print statement.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.TEXT_PRINT_TITLE,
+				args0 = new object[] {
+					new {
+						type = "input_value",
+						name = "TEXT"
+					}
+				},
+				previousStatement = (Union<string, string[]>)null,
+				nextStatement = (Union<string, string[]>)null,
+				colour = Texts.HUE,
+				tooltip = Msg.TEXT_PRINT_TOOLTIP,
+				helpUrl = Msg.TEXT_PRINT_HELPURL
+			});
+		}
+	}
+
+	public class TextPromptExtBlock : Block
+	{
+		public const string type_name = "text_prompt_ext";
+
+		public TextPromptExtBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for prompt function (external message).
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			var TYPES = new[] {
+				new [] {Msg.TEXT_PROMPT_TYPE_TEXT, "TEXT"},
+				new [] {Msg.TEXT_PROMPT_TYPE_NUMBER, "NUMBER"}
+			};
+			this.setHelpUrl(Msg.TEXT_PROMPT_HELPURL);
+			this.setColour(Texts.HUE);
+			// Assign "this" to a variable for use in the closures below.
+			var thisBlock = this;
+			var dropdown = new FieldDropdown(TYPES, (newOp) => {
+				thisBlock.updateType_(newOp);
+				return Script.Undefined;
+			});
+			this.appendValueInput("TEXT")
+				.appendField(dropdown, "TYPE");
+			this.setOutput(true, "String");
+			this.setTooltip(new Func<string>(() => {
+				return (thisBlock.getFieldValue("TYPE") == "TEXT") ?
+					Msg.TEXT_PROMPT_TOOLTIP_TEXT :
+					Msg.TEXT_PROMPT_TOOLTIP_NUMBER;
+			}));
+		}
+
+		/**
+		 * Modify this block to have the correct output type.
+		 * @param {string} newOp Either "TEXT" or "NUMBER".
+		 * @private
+		 * @this Blockly.Block
+		 */
+		public void updateType_(string newOp)
+		{
+			this.outputConnection.setCheck(newOp == "NUMBER" ? "Number" : "String");
+		}
+
+		/**
+		 * Create XML to represent the output type.
+		 * @return {!Element} XML storage element.
+		 * @this Blockly.Block
+		 */
+		public Element mutationToDom()
+		{
+			var container = Document.CreateElement("mutation");
+			container.SetAttribute("type", this.getFieldValue("TYPE"));
+			return container;
+		}
+
+		/**
+		 * Parse XML to restore the output type.
+		 * @param {!Element} xmlElement XML storage element.
+		 * @this Blockly.Block
+		 */
+		public void domToMutation(Element xmlElement)
+		{
+			this.updateType_(xmlElement.GetAttribute("type"));
+		}
+	}
+
+	public class TextPromptBlock : Block
+	{
+		public const string type_name = "text_prompt";
+
+		public TextPromptBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for prompt function (internal message).
+		 * The "text_prompt_ext" block is preferred as it is more flexible.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			var TYPES = new[] {
+				new [] {Msg.TEXT_PROMPT_TYPE_TEXT, "TEXT"},
+				new [] {Msg.TEXT_PROMPT_TYPE_NUMBER, "NUMBER"}
+			};
+			// Assign "this" to a variable for use in the closures below.
+			var thisBlock = this;
+			this.setHelpUrl(Msg.TEXT_PROMPT_HELPURL);
+			this.setColour(Texts.HUE);
+			var dropdown = new FieldDropdown(TYPES, (newOp) => {
+				thisBlock.updateType_(newOp);
+				return Script.Undefined;
+			});
+			this.appendDummyInput()
+				.appendField(dropdown, "TYPE")
+				.appendField(this.newQuote_(true))
+				.appendField(new FieldTextInput(""), "TEXT")
+				.appendField(this.newQuote_(false));
+			this.setOutput(true, "String");
+			this.setTooltip(new Func<string>(() => {
+				return (thisBlock.getFieldValue("TYPE") == "TEXT") ?
+					Msg.TEXT_PROMPT_TOOLTIP_TEXT :
+					Msg.TEXT_PROMPT_TOOLTIP_NUMBER;
+			}));
+		}
+
+		public Field newQuote_(bool open)
+		{
+			return TextBlock.newQuote_(open, this.RTL);
+		}
+
+		/**
+		 * Modify this block to have the correct output type.
+		 * @param {string} newOp Either "TEXT" or "NUMBER".
+		 * @private
+		 * @this Blockly.Block
+		 */
+		public void updateType_(string newOp)
+		{
+			this.outputConnection.setCheck(newOp == "NUMBER" ? "Number" : "String");
+		}
+
+		/**
+		 * Create XML to represent the output type.
+		 * @return {!Element} XML storage element.
+		 * @this Blockly.Block
+		 */
+		public Element mutationToDom()
+		{
+			var container = Document.CreateElement("mutation");
+			container.SetAttribute("type", this.getFieldValue("TYPE"));
+			return container;
+		}
+
+		/**
+		 * Parse XML to restore the output type.
+		 * @param {!Element} xmlElement XML storage element.
+		 * @this Blockly.Block
+		 */
+		public void domToMutation(Element xmlElement)
+		{
+			this.updateType_(xmlElement.GetAttribute("type"));
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Variables.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Variables.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Variables.cs	(revision 270)
@@ -0,0 +1,136 @@
+/**
+ * @license
+ * Visual Blocks Editor
+ *
+ * Copyright 2012 Google Inc.
+ * https://developers.google.com/blockly/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview Variable blocks for Blockly.
+ * @author fraser@google.com (Neil Fraser)
+ */
+using System;
+using System.Linq;
+using System.Text;
+using Bridge;
+using Bridge.Html5;
+using Bridge.jQuery2;
+
+namespace WebMrbc
+{
+	public class VariablesGetBlock : Block
+	{
+		public const string type_name = "variables_get";
+		string contextMenuType_ = VariablesSetBlock.type_name;
+
+		public VariablesGetBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for variable getter.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.setHelpUrl(Msg.VARIABLES_GET_HELPURL);
+			this.setColour(Blockly.Variables.HUE);
+			this.appendDummyInput()
+				.appendField(new FieldVariable(
+				Msg.VARIABLES_DEFAULT_NAME), "VAR");
+			this.setOutput(true);
+			this.setTooltip(Msg.VARIABLES_GET_TOOLTIP);
+			this.contextMenuMsg_ = Msg.VARIABLES_GET_CREATE_SET;
+		}
+
+		/**
+		 * Add menu option to create getter/setter block for this setter/getter.
+		 * @param {!Array} options List of menu options to add to.
+		 * @this Blockly.Block
+		 */
+		public void customContextMenu(object[] options)
+		{
+			var option = new ContextMenuOption() { enabled = true };
+			var name = this.getFieldValue("VAR");
+			option.text = this.contextMenuMsg_.Replace("%1", name);
+			var xmlField = goog.dom.createDom("field", null, name);
+			xmlField.SetAttribute("name", "VAR");
+			var xmlBlock = goog.dom.createDom("block", null, xmlField);
+			xmlBlock.SetAttribute("type", this.contextMenuType_);
+			option.callback = ContextMenu.callbackFactory(this, xmlBlock);
+			options.Push(option);
+		}
+	}
+
+	public class VariablesSetBlock : Block
+	{
+		public const string type_name = "variables_set";
+		string contextMenuType_ = VariablesGetBlock.type_name;
+
+		public VariablesSetBlock()
+			: base(type_name)
+		{
+		}
+
+		/**
+		 * Block for variable setter.
+		 * @this Blockly.Block
+		 */
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = Msg.VARIABLES_SET,
+				args0 = new object[] {
+					new {
+						type = "field_variable",
+						name = "VAR",
+						variable = Msg.VARIABLES_DEFAULT_NAME
+					},
+					new {
+						type = "input_value",
+						name = "VALUE"
+					}
+				},
+				previousStatement = (Union<string, string[]>)null,
+				nextStatement = (Union<string, string[]>)null,
+				colour = Blockly.Variables.HUE,
+				tooltip = Msg.VARIABLES_SET_TOOLTIP,
+				helpUrl = Msg.VARIABLES_SET_HELPURL
+
+			});
+			this.contextMenuMsg_ = Msg.VARIABLES_SET_CREATE_GET;
+		}
+
+		/**
+		 * Add menu option to create getter/setter block for this setter/getter.
+		 * @param {!Array} options List of menu options to add to.
+		 * @this Blockly.Block
+		 */
+		public void customContextMenu(object[] options)
+		{
+			var option = new ContextMenuOption() { enabled = true };
+			var name = this.getFieldValue("VAR");
+			option.text = this.contextMenuMsg_.Replace("%1", name);
+			var xmlField = goog.dom.createDom("field", null, name);
+			xmlField.SetAttribute("name", "VAR");
+			var xmlBlock = goog.dom.createDom("block", null, xmlField);
+			xmlBlock.SetAttribute("type", this.contextMenuType_);
+			option.callback = ContextMenu.callbackFactory(this, xmlBlock);
+			options.Push(option);
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Bridge/bridge.json
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Bridge/bridge.json	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Bridge/bridge.json	(revision 270)
@@ -0,0 +1,10 @@
+{
+    "output": "js",
+    "fileNameCasing": "Lowercase"
+
+    // Uncomment to add TypeScript Definition file (.d.ts) generation to your project.
+    // , "generateTypeScript": true
+
+    // More options available at: 
+    // http://bridge.net/docs/global-configuration
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/ClassSelectorView.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/ClassSelectorView.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/ClassSelectorView.cs	(revision 270)
@@ -0,0 +1,171 @@
+﻿using System;
+using System.Collections.Generic;
+using Bridge;
+using Bridge.Html5;
+using Bridge.jQuery2;
+
+namespace WebMrbc
+{
+	public class ClassSelectorView
+	{
+		Collection<IClassWorkspace> m_Collection;
+		jQuery el;
+		string templateText;
+		IClassWorkspace m_ClassWorkspace;
+
+		internal IClassWorkspace Current { get { return m_ClassWorkspace; } }
+
+		internal event EventHandler<EventArgs> Selected;
+		internal event EventHandler<ItemRemovedEventArgs> Removed;
+		internal event EventHandler<EventArgs> MarkClicked;
+
+		internal void SetCollection(Collection<IClassWorkspace> collection)
+		{
+			el = jQuery.Select("#class-selector-tab");
+
+			m_Collection = collection;
+			collection.OnAdd += OnChange;
+			collection.OnRemove += OnChange;
+			collection.OnReset += OnChange;
+			collection.OnChange += OnChange;
+
+			if (collection.Length > 0)
+				m_ClassWorkspace = collection.At(0);
+
+			templateText = jQuery.Select("#class-selector-template").Text();
+			jQuery.Select("#add-celltype-button").Click(null, new Action<jQueryMouseEvent>(OnAddBtnClick));
+			Render();
+		}
+
+		void Render()
+		{
+			var charsEl = jQuery.Select("#class-selector-celltype-set");
+			charsEl.Children().Remove();
+			foreach (var item in m_Collection) {
+				var html = new jQuery(item.Template(templateText));
+				charsEl.Append(html);
+				var selectedMark = html.Find("a.selected-mark");
+				if (m_ClassWorkspace == item)
+					selectedMark.Show();
+				else
+					selectedMark.Hide();
+				selectedMark.Click(item, new Action<jQueryMouseEvent>(OnSelectedMarkClick));
+				html.Find("a.celltype").Click(item, new Action<jQueryMouseEvent>(OnSelectBtnClick));
+				html.Find("a.modify-button").Click(item, new Action<jQueryMouseEvent>(OnModifyBtnClick));
+				var removeButton = html.Find("a.remove-button");
+				removeButton.Click(item, new Action<jQueryMouseEvent>(OnRemoveBtnClick));
+				if (item.IsPreset())
+					removeButton.Hide();
+				var img = html.Find("img");
+				img.On("dragstart", new Action<jQueryMouseEvent>((e) => {
+					e.PreventDefault();
+				}));
+			}
+		}
+
+		private void OnSelectedMarkClick(jQueryMouseEvent obj)
+		{
+			MarkClicked?.Invoke(this, EventArgs.Empty);
+		}
+
+		internal void SelectClassWorkspace(IClassWorkspace model)
+		{
+			jQuery html, selectedMark;
+			var charsEl = jQuery.Select("#class-selector-celltype-set");
+
+			if (m_ClassWorkspace != null) {
+				html = charsEl.Find("#" + m_ClassWorkspace.Identifier);
+				selectedMark = html.Find("a.selected-mark");
+				selectedMark.Hide();
+				m_ClassWorkspace.Inactivate();
+			}
+
+			m_ClassWorkspace = model;
+			if ((m_ClassWorkspace == null) && (m_Collection.Length > 0)) {
+				m_ClassWorkspace = m_Collection.At(0);
+			}
+
+			if (m_ClassWorkspace != null) {
+				m_ClassWorkspace.Activate();
+
+				html = charsEl.Find("#" + m_ClassWorkspace.Identifier);
+				selectedMark = html.Find("a.selected-mark");
+				selectedMark.Show();
+			}
+
+			Selected?.Invoke(this, EventArgs.Empty);
+		}
+
+		void RemoveClassWorkspace(IClassWorkspace item)
+		{
+			if (item.IsPreset())
+				return;
+
+			if (m_ClassWorkspace == item)
+				m_ClassWorkspace = null;
+
+			m_Collection.Remove(item);
+
+			Removed?.Invoke(this, new ItemRemovedEventArgs(item));
+		}
+
+		private void OnSelectBtnClick(jQueryMouseEvent e)
+		{
+			var item = (IClassWorkspace)e.Data;
+			e.PreventDefault();
+			if (m_ClassWorkspace != item) {
+				this.SelectClassWorkspace(item);
+			}
+		}
+
+		private void OnModifyBtnClick(jQueryMouseEvent e)
+		{
+			var item = (IClassWorkspace)e.Data;
+			e.PreventDefault();
+			m_ClassWorkspace = item;
+			m_ClassWorkspace.OpenModifyView((ok) => {
+				Render();
+			});
+		}
+
+		private void OnAddBtnClick(jQueryMouseEvent e)
+		{
+			e.PreventDefault();
+
+			App.NewItem((item) => {
+				item.OpenModifyView((ok) => {
+					if (ok) {
+						m_Collection.Add(item);
+						SelectClassWorkspace(item);
+					}
+					else {
+						App.RemoveItem(item);
+					}
+				});
+			});
+		}
+
+		private void OnRemoveBtnClick(jQueryMouseEvent e)
+		{
+			var item = (IClassWorkspace)e.Data;
+			e.PreventDefault();
+			m_ClassWorkspace = null;
+			RemoveClassWorkspace(item);
+		}
+
+		void OnChange(object sender, EventArgs e)
+		{
+			Render();
+		}
+	}
+
+	class ItemRemovedEventArgs : EventArgs
+	{
+		public IClassWorkspace Item { get; private set; }
+
+		public ItemRemovedEventArgs(IClassWorkspace item)
+		{
+			Item = item;
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Collection.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Collection.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Collection.cs	(revision 270)
@@ -0,0 +1,113 @@
+﻿using System;
+using System.Linq;
+using System.Collections.Generic;
+using Bridge;
+using Bridge.Linq;
+using Bridge.Text.RegularExpressions;
+using System.Collections;
+
+namespace WebMrbc
+{
+	public interface IModel
+	{
+		string Identifier { get; }
+	}
+
+	public class Collection<T> : IEnumerable<T> where T : IModel
+	{
+		T[] List = new T[0];
+
+		public Collection()
+		{
+		}
+
+		public T LastModel { get { int i = List.Length; if (i == 0) return default(T); return List[i - 1]; } }
+		public int Length { get { return List.Length; } }
+
+		public EventHandler OnAdd;
+		public EventHandler OnRemove;
+		public EventHandler OnReset;
+		public EventHandler OnChange;
+
+		internal void Add(T item)
+		{
+			List.Push(item);
+
+			if (OnAdd != null)
+				OnAdd(this, EventArgs.Empty);
+		}
+
+		internal void Remove(T item)
+		{
+			var i = List.IndexOf(item);
+			if (i >= 0)
+				List.Splice(i, 1);
+
+			if (OnRemove != null)
+				OnRemove(this, EventArgs.Empty);
+		}
+
+		internal void Reset()
+		{
+			List.Splice(0, List.Length);
+
+			if (OnReset != null)
+				OnReset(this, EventArgs.Empty);
+		}
+
+		internal void Reset(IEnumerable<T> n)
+		{
+			List.Splice(0, List.Length);
+			List = (T[])List.Concat(n);
+
+			if (OnReset != null)
+				OnReset(this, EventArgs.Empty);
+		}
+
+		internal T At(int index)
+		{
+			return List[index];
+		}
+
+		internal string UniqueName(string identifier)
+		{
+			var prefix = "";
+			if ((identifier[0] >= 'a') && (identifier[0] <= 'z'))
+				prefix = identifier[0].ToString().ToUpper();
+			else if ((identifier[0] < 'A') || (identifier[0] > 'Z'))
+				prefix = "C";
+
+			var max = 0;
+			var n = new Regex("^" + identifier + "([0-9]+)$");
+			foreach (var c in List) {
+				var m = c.Identifier.Match(n);
+				if (m != null)
+					max = System.Math.Max(max, Script.ParseInt(m[0]));
+				break;
+			}
+			if (max == 0)
+				return prefix + identifier;
+			else
+				return prefix + identifier + max;
+		}
+
+		internal T FindWhere(object p)
+		{
+			foreach (var c in List) {
+				if (Script.Write<bool>("(function(c) { for (var i in p) if (p[i] !== c[i]) return false; return true; })(c)"))
+					return c;
+			}
+			return default(T);
+		}
+
+		public IEnumerator<T> GetEnumerator()
+		{
+			return (dynamic)List.GetEnumerator();
+		}
+
+		IEnumerator IEnumerable.GetEnumerator()
+		{
+			return List.GetEnumerator();
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/EObjectModalView.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/EObjectModalView.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/EObjectModalView.cs	(revision 270)
@@ -0,0 +1,358 @@
+﻿using System;
+using Bridge;
+using Bridge.Bootstrap3;
+using Bridge.Html5;
+using Bridge.jQuery2;
+
+namespace WebMrbc
+{
+	public class EObjectModalView
+	{
+		jQuery el;
+		JsonObjectInfo model;
+		JsonObjectInfo target;
+		JsonClassGroupInfo currentClassGroup;
+
+		public event Action<EObjectModalView, bool> Closed;
+
+		public EObjectModalView()
+		{
+			el = jQuery.Select("#eobject-modal");
+		}
+
+		internal void SetEObject(JsonObjectInfo eobject, string imgUrl)
+		{
+			target = eobject;
+			model = eobject.Clone();
+
+			var cg = model.type.classGroup;
+			if ((model.attribute == "device") && (model.type == App.NodeProfileClass)) {
+				cg = App.ClassGroups[0];
+			}
+
+			var img = (new jQuery("<img>"));
+			img.Attr("src", imgUrl);
+			img.Attr("alt", model.identifier);
+			jQuery.Select("#eobject-modal-eobject img").ReplaceWith(img);
+
+			jQuery.Select("#eobject_identifier").Val(model.identifier);
+			jQuery.Select("#eobject_instanceCode").Val(model.instanceCode.ToString());
+			SetAttribute(model.attribute);
+
+			SetClassGroup(cg, () => {
+				var c = model.type;
+				if ((model.attribute == "device") && (model.type == App.NodeProfileClass)) {
+					c = App.ClassGroups[0].classes[0];
+				}
+				SetClass(c, UpdateProperties);
+			});
+		}
+
+		internal void Render()
+		{
+			el.Modal(new ModalOptions() {
+				Backdrop = "static",
+				Show = true
+			});
+		}
+
+		private void SetAttribute(string attribute)
+		{
+			var dropdown = jQuery.Select("#eobject_attribute").Parent();
+			var button = jQuery.Select("button[type='button']", dropdown);
+			button.Attr("disabled", "disabled");
+
+			var menuitem = jQuery.Select("a[role='menuitem']", dropdown);
+
+			string text;
+			switch (attribute) {
+			case "local":
+				text = menuitem.Get(0).TextContent;
+				break;
+			case "sync":
+				text = menuitem.Get(1).TextContent;
+				break;
+			case "async":
+				text = menuitem.Get(2).TextContent;
+				break;
+			case "device":
+				text = menuitem.Get(3).TextContent;
+				break;
+			default:
+				text = attribute;
+				break;
+			}
+
+			SetAttribute(attribute, text);
+		}
+
+		private void SetAttribute(string attribute, string text)
+		{
+			model.attribute = attribute;
+
+			var button = jQuery.Select("#eobject_attribute");
+			button.Text(text);
+
+			var caret = jQuery.Select("span.caret", button);
+			if (caret.Length == 0) {
+				caret = new jQuery(ElementType.Span);
+				caret.Attr("class", "caret");
+				button.Append(caret);
+			}
+		}
+
+		private void SetClassGroup(JsonClassGroupInfo cg, Action success = null)
+		{
+			currentClassGroup = cg;
+
+			var button = jQuery.Select("#eobject_classGroupCode");
+			button.Text(cg.description);
+
+			if (model.attribute == "device") {
+				button.RemoveAttr("disabled");
+			}
+			else {
+				button.Attr("disabled", "disabled");
+			}
+
+			var caret = jQuery.Select("span.caret", button);
+			if (caret.Length == 0) {
+				caret = new jQuery(ElementType.Span);
+				caret.Attr("class", "caret");
+				button.Append(caret);
+			}
+
+			InitClasss(cg);
+			if (success != null) success();
+		}
+
+		private void SetClass(JsonClassInfo c, Action success = null)
+		{
+			model.type = c;
+
+			var button = jQuery.Select("#eobject_classCode");
+			button.Text(c.description);
+
+			if (model.attribute == "device") {
+				button.RemoveAttr("disabled");
+			}
+			else {
+				button.Attr("disabled", "disabled");
+			}
+
+			var caret = jQuery.Select("span.caret", button);
+			if (caret.Length == 0) {
+				caret = new jQuery(ElementType.Span);
+				caret.Attr("class", "caret");
+				button.Append(caret);
+			}
+
+			string identifier = jQuery.Select("#eobject_identifier").Val();
+			if (model.identifier == identifier) {
+				model.identifier = CodeGenerator.GetClassIdentifier(c);
+				jQuery.Select("#eobject_identifier").Val(model.identifier);
+			}
+
+			InitProperties(c);
+			if (success != null) success();
+		}
+
+		internal void InitClassGroups()
+		{
+			var ul = jQuery.Select("#eobject_classGroups");
+
+			ul.Html("");
+
+			foreach (var cg in App.ClassGroups) {
+				var li = new jQuery(ElementType.LI);
+				li.Attr("role", "presentation");
+
+				var a = new jQuery(ElementType.Anchor);
+				a.Attr("role", "menuitem");
+				a.Append(cg.description);
+				a.Click(cg, new Action<jQueryMouseEvent>(OnSelectClassGroupCode));
+
+				li.Append(a);
+				ul.Append(li);
+			}
+		}
+
+		internal void InitClasss(JsonClassGroupInfo cg)
+		{
+			var ul = jQuery.Select("#eobject_classs");
+
+			ul.Html("");
+
+			foreach (var c in cg.classes) {
+				var li = new jQuery(ElementType.LI);
+				li.Attr("role", "presentation");
+
+				var a = new jQuery(ElementType.Anchor);
+				a.Attr("role", "menuitem");
+				a.Append(c.description);
+				a.Click(c, new Action<jQueryMouseEvent>(OnSelectClassCode));
+
+				li.Append(a);
+				ul.Append(li);
+			}
+		}
+
+		internal void InitProperties(JsonClassInfo c)
+		{
+			var div = jQuery.Select("#eobject_properties");
+
+			div.Html("");
+
+			if (c.classGroup.classGroupCode != 0x0E || c.classCode != 0xF0) {
+				foreach (var p in App.BaseObjectPropertyList) {
+					InitProperty(div, p);
+				}
+			}
+
+			foreach (var p in c.properties) {
+				InitProperty(div, p);
+			}
+		}
+
+		private void InitProperty(jQuery div, JsonPropertyInfo p)
+		{
+			var label = new jQuery(ElementType.Label);
+			label.Attr("class", "btn btn-default");
+
+			var input = new jQuery(ElementType.Input);
+			input.Attr("type", "checkbox");
+			input.Attr("autocomplete", "off");
+
+			label.Append(input);
+			label.Append(p.description);
+			label.Attr("data-ecnl-epc", p.propertyCode.ToString());
+
+			div.Append(label);
+
+			if ((p.required.Length > 0) && (p.required[0] != "NONE")) {
+				label.ButtonToggle();
+			}
+		}
+
+		private void UpdateProperties()
+		{
+			var labels = jQuery.Select("#eobject_properties > .btn.btn-default");
+
+			foreach (Element l in labels.Get()) {
+				var label = new jQuery(l);
+				if (label.Is(".active"))
+					label.ButtonToggle();
+
+				var sepc = label.Attr("data-ecnl-epc");
+				if (sepc == null)
+					continue;
+
+				var epc = Script.ParseInt(sepc);
+				JsonPropertyInfo prop = null;
+				foreach (var p in model.properties) {
+					if (p.propertyCode != epc)
+						continue;
+					prop = p;
+					break;
+				}
+				if (prop != null) {
+					label.ButtonToggle();
+				}
+			}
+		}
+
+		public void OnChangeIdentifier(Element ele)
+		{
+			var identifier = jQuery.Select("#eobject_identifier").Val();
+			model.identifier = identifier;
+		}
+
+		public void OnSelectAttribute(Element sender, string attribute)
+		{
+			var text = sender.TextContent;
+			SetAttribute(attribute, text);
+		}
+
+		public void OnSelectClassGroupCode(jQueryMouseEvent e)
+		{
+			var cg = (JsonClassGroupInfo)e.Data;
+			SetClassGroup(cg, () => {
+				SetClass(cg.classes[0], UpdateProperties);
+			});
+		}
+
+		public void OnSelectClassCode(jQueryMouseEvent e)
+		{
+			SetClass((JsonClassInfo)e.Data, UpdateProperties);
+		}
+
+		public void OnChangeInstanceCode(Element sender)
+		{
+			model.instanceCode = (byte)Script.ParseInt((new jQuery(sender)).Val());
+		}
+
+		public void OnOk(Element ele)
+		{
+			if ((model.attribute == "device") && (model.type == App.NodeProfileClass)) {
+				return;
+			}
+
+			el.Modal(ModalOperation.Hide);
+
+			target.type = model.type;
+			target.identifier = model.identifier;
+			target.parent = model.parent;
+			target.instanceCode = model.instanceCode;
+			target.attribute = model.attribute;
+			target.properties = new JsonPropertyInfo[0];
+
+			var labels = jQuery.Select("#eobject_properties > .btn.btn-default");
+
+			foreach (Element l in labels.Get()) {
+				var label = new jQuery(l);
+				if (!label.Is(".active"))
+					continue;
+
+				var sepc = label.Attr("data-ecnl-epc");
+				if (sepc == null)
+					continue;
+
+				var epc = Script.ParseInt(sepc);
+				JsonPropertyInfo prop = null;
+				if (model.type.classGroup.classGroupCode != 0x0E || model.type.classCode != 0xF0) {
+					foreach (var p in App.BaseObjectPropertyList) {
+						if (p.propertyCode != epc)
+							continue;
+						prop = p;
+						break;
+					}
+				}
+				if (prop != null) {
+					target.properties.Push(prop);
+				}
+				else {
+					foreach (var p in model.type.properties) {
+						if (p.propertyCode != epc)
+							continue;
+						prop = p;
+						break;
+					}
+					if (prop != null) {
+						target.properties.Push(prop);
+					}
+				}
+			}
+
+			if (Closed != null)
+				Closed(this, true);
+		}
+
+		public void OnCancel(Element ele)
+		{
+			el.Modal(ModalOperation.Hide);
+
+			if (Closed != null)
+				Closed(this, false);
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/CodeGenerator.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/CodeGenerator.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/CodeGenerator.cs	(revision 270)
@@ -0,0 +1,151 @@
+﻿/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2015-2017 Cores Co., Ltd. Japan
+ * 
+ *  上記著作権者は，以下の(1)～(4)の条件を満たす場合に限り，本ソフトウェ
+ *  ア（本ソフトウェアを改変したものを含む．以下同じ）を使用・複製・改
+ *  変・再配布（以下，利用と呼ぶ）することを無償で許諾する．
+ *  (1) 本ソフトウェアをソースコードの形で利用する場合には，上記の著作
+ *      権表示，この利用条件および下記の無保証規定が，そのままの形でソー
+ *      スコード中に含まれていること．
+ *  (2) 本ソフトウェアを，ライブラリ形式など，他のソフトウェア開発に使
+ *      用できる形で再配布する場合には，再配布に伴うドキュメント（利用
+ *      者マニュアルなど）に，上記の著作権表示，この利用条件および下記
+ *      の無保証規定を掲載すること．
+ *  (3) 本ソフトウェアを，機器に組み込むなど，他のソフトウェア開発に使
+ *      用できない形で再配布する場合には，次のいずれかの条件を満たすこ
+ *      と．
+ *    (a) 再配布に伴うドキュメント（利用者マニュアルなど）に，上記の著
+ *        作権表示，この利用条件および下記の無保証規定を掲載すること．
+ *    (b) 再配布の形態を，別に定める方法によって，TOPPERSプロジェクトに
+ *        報告すること．
+ *  (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
+ *      害からも，上記著作権者およびTOPPERSプロジェクトを免責すること．
+ *      また，本ソフトウェアのユーザまたはエンドユーザからのいかなる理
+ *      由に基づく請求からも，上記著作権者およびTOPPERSプロジェクトを
+ *      免責すること．
+ * 
+ *  本ソフトウェアは，無保証で提供されているものである．上記著作権者お
+ *  よびTOPPERSプロジェクトは，本ソフトウェアに関して，特定の使用目的
+ *  に対する適合性も含めて，いかなる保証も行わない．また，本ソフトウェ
+ *  アの利用により直接的または間接的に生じたいかなる損害に関しても，そ
+ *  の責任を負わない．
+ * 
+ *  @(#) $Id$
+ */
+
+using System;
+using System.Linq;
+using System.Text;
+using Bridge;
+using Bridge.Text.RegularExpressions;
+
+namespace WebMrbc
+{
+	public static class CodeGenerator
+	{
+		public static string GetClassIdentifier(JsonClassInfo cls)
+		{
+			string result = "";
+			bool up = true;
+			foreach (var c in cls.name.ToLower()) {
+				if (c == '_') {
+					up = true;
+					continue;
+				}
+				result += up ? c.ToString().ToUpper() : c.ToString();
+				up = false;
+			}
+			if (result.EndsWith("Eobj"))
+				result = result.Substring(0, result.Length - 4);
+
+			if (!new Regex("^[A-Z][A-Za-z0-9_]+$").Test(result)) {
+				result = String.Format("Cls{0:X2}{1:X2}", cls.classGroup.classGroupCode, cls.classCode);
+			}
+
+			return result;
+		}
+
+		public static string GetPropertyIdentifier(JsonPropertyInfo pi)
+		{
+			JsonObjectInfo cls = pi.classInfo;
+			JsonFieldInfo fi = pi;
+			string result = fi.identifier;
+
+			if (!new Regex("^[A-Za-z_][A-Za-z0-9_]+$").Test(result)) {
+				result = String.Format("property{0:X2}", pi.propertyCode);
+			}
+			else {
+				var reg = new Regex("[A-Z][a-z]+", "g");
+				string[] m;
+				if ((m = reg.Exec(result)) != null) {
+					var blocks = new string[0];
+					int pos = 0;
+					do {
+						int len = Script.Write<int>("m.index") + m[0].Length - pos;
+						blocks.Push(result.Substring(pos, len).ToLower());
+						pos += len;
+					} while ((m = reg.Exec(result)) != null);
+					result = blocks.Join("_");
+				}
+			}
+
+			return result;
+		}
+
+		internal static bool HasPropSetter(JsonPropertyInfo epi, out ValueRange valueRange)
+		{
+			valueRange = null;
+
+			if (!epi.primitive || (epi.arrayCount != 0))
+				return false;
+
+			valueRange = ValueRange.Parse(epi.valueDescription, epi);
+			if ((valueRange.Values.Length > 0) || (valueRange.Ranges.Length > 0)) {
+				return true;
+			}
+
+			valueRange = null;
+			return false;
+		}
+
+		internal static string GetInitialValue(string valRng, JsonFieldInfo pi)
+		{
+			ValueRange valueRange = ValueRange.Parse(valRng, pi);
+			string init = "0000000000000000" + valueRange.InitailValue;
+
+			char[] temp = new char[4 * pi.size];
+			for (int i = 0, j = init.Length - 2 * pi.size; i < temp.Length; i++, j++) {
+				if ((i % 4) == 0) {
+					temp[i++] = '\\';
+					temp[i++] = 'x';
+				}
+				temp[i] = init[j];
+			}
+			return new String(temp);
+		}
+
+		internal static bool IsExtractProperty(JsonPropertyInfo prp)
+		{
+			switch (prp.propertyCode) {
+			case 0x9B:  // ＳｅｔＭプロパティマップ
+			case 0x9C:  // ＧｅｔＭプロパティマップ
+						// はECHONET Liteにはないので作らない
+				return true;
+			case 0x9D:  // 状変アナウンスプロパティマップ
+			case 0x9E:  // Ｓｅｔプロパティマップ
+			case 0x9F:  // Ｇｅｔプロパティマップ
+			case 0xD3:  // 自ノードインスタンス数
+			case 0xD4:  // 自ノードクラス数
+			case 0xD5:  // インスタンスリスト通知
+			case 0xD6:  // 自ノードインスタンスリストＳ
+			case 0xD7:  // 自ノードクラスリストＳ
+						// はコンフィグレーターで生成するので作らない
+				return true;
+			}
+
+			return false;
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/EObjectBlock.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/EObjectBlock.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/EObjectBlock.cs	(revision 270)
@@ -0,0 +1,1073 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Bridge;
+using Bridge.Linq;
+using Bridge.Html5;
+
+namespace WebMrbc
+{
+	[IgnoreCast]
+	public class ENodeInitializeBlock : Block
+	{
+		public const string type_name = "enode_initialize";
+		internal EObjectWorkspace workspace_;
+
+		public ENodeInitializeBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("初期化処理");
+			this.appendStatementInput("DO")
+				.setCheck(null);
+			this.setColour(230);
+			this.setTooltip("");
+			this.setHelpUrl("");
+		}
+
+		internal void OnCreate(EObjectWorkspace workspace, Create cre)
+		{
+			workspace_ = workspace;
+		}
+
+		internal void OnChange(EObjectWorkspace workspace, Change chg)
+		{
+		}
+
+		internal void OnDelete(EObjectWorkspace workspace, Delete del)
+		{
+		}
+
+		internal void OnMove(EObjectWorkspace workspace, Move mov)
+		{
+		}
+	}
+
+	[IgnoreCast]
+	public class EObjectInitializeBlock : Block
+	{
+		public const string type_name = "eobject_initialize";
+		internal EObjectWorkspace workspace_;
+
+		public EObjectInitializeBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("初期化処理");
+			this.appendStatementInput("DO")
+				.setCheck(null);
+			this.setColour(230);
+			this.setTooltip("");
+			this.setHelpUrl("");
+		}
+
+		internal void OnCreate(EObjectWorkspace workspace, Create cre)
+		{
+			workspace_ = workspace;
+		}
+
+		internal void OnChange(EObjectWorkspace workspace, Change chg)
+		{
+		}
+
+		internal void OnDelete(EObjectWorkspace workspace, Delete del)
+		{
+		}
+
+		internal void OnMove(EObjectWorkspace workspace, Move mov)
+		{
+		}
+	}
+
+	public class EPropertyBlock : Block
+	{
+		internal JsonPropertyInfo PropertyInfo { get; private set; }
+		internal EObjectWorkspace Workspace { get; private set; }
+		public string Identifier { get; protected set; }
+		public string Description { get; protected set; }
+		public int PropertyCode { get; protected set; }
+		public int PropertySize { get; protected set; }
+
+		public EPropertyBlock(string type)
+			: base(type)
+		{
+		}
+
+		internal bool InitPropertyInfo(EObjectWorkspace workspace, bool initial = false)
+		{
+			var c = workspace.eobject;
+			PropertyInfo = null;
+			foreach (var pi in c.properties) {
+				if (pi.propertyCode != PropertyCode)
+					continue;
+
+				if (!initial && !App.BaseObjectPropertyList.Contains(pi))
+					continue;
+
+				PropertyInfo = pi;
+				Identifier = CodeGenerator.GetPropertyIdentifier(pi);
+				Description = pi.description;
+				PropertySize = ((pi.arrayCount == 0) ? 1 : pi.arrayCount) * pi.size;
+				break;
+			}
+
+			if (PropertyInfo == null) {
+				dispose(true);
+				return false;
+			}
+
+			return true;
+		}
+
+		internal void OnCreate(EObjectWorkspace workspace, Create cre)
+		{
+			Workspace = workspace;
+
+			if (PropertyInfo == null) {
+				if (!InitPropertyInfo(workspace, true))
+					return;
+			}
+
+			setFieldValue(PropertyCode.ToString("X2"), "PROPERTY_CODE");
+			setFieldValue(Identifier, "IDENTIFIER");
+			setFieldValue(Description, "DESCRIPTION");
+			setFieldValue(PropertySize.ToString(), "PROPERTY_SIZE");
+		}
+
+		internal void OnChange(EObjectWorkspace workspace, Change chg)
+		{
+		}
+
+		internal void OnDelete(EObjectWorkspace workspace, Delete del)
+		{
+		}
+
+		internal void OnMove(EObjectWorkspace workspace, Move mov)
+		{
+		}
+	}
+
+	public class EPropertyFixLenBlock : EPropertyBlock
+	{
+		public const string type_name = "eproperty_fixlen";
+		internal Tuple<string, string, string>[] cases_;
+		internal int defaultCount_;
+		internal bool userGetter_;
+		public Connection statementConnection_;
+		public Connection retvalConnection_;
+
+		public EPropertyFixLenBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			setHelpUrl("http://www.example.com/");
+			setColour(230);
+			appendDummyInput("PROPERTY")
+				.appendField("EPC:")
+				.appendField("__", "PROPERTY_CODE")
+				.appendField("__", "DESCRIPTION")
+				.appendField("__", "IDENTIFIER")
+				.appendField("Size:")
+				.appendField("__", "PROPERTY_SIZE")
+				.appendField("byte");
+			setMutator(new Mutator(new[] {
+				EPropertyFixLenConstBlock.type_name,
+				EPropertyFixLenRangeBlock.type_name,
+				EPropertyFixLenDefaultBlock.type_name }));
+			setTooltip(new Func<string>(() => {
+				if ((cases_.Length == 0) && (defaultCount_ == 0)) {
+					return "条件に合うブロックを実行";
+				}
+				else if ((cases_.Length == 0) && (defaultCount_ != 0)) {
+					return "条件に合うブロックを実行、合うものがなければ最後のブロックを実行";
+				}
+				else if ((cases_.Length != 0) && (defaultCount_ == 0)) {
+					return "条件に合うブロックを実行";
+				}
+				else if ((cases_.Length != 0) && (defaultCount_ != 0)) {
+					return "条件に合うブロックを実行、合うものがなければ最後のブロックを実行";
+				}
+				return "";
+			}));
+			cases_ = new Tuple<string, string, string>[0];
+			defaultCount_ = 0;
+			userGetter_ = true;
+			updateSetter_();
+			updateGetter_(userGetter_);
+		}
+
+		/// <summary>
+		/// Create XML to represent the number of else-if and else inputs.
+		/// </summary>
+		/// <returns>XML storage element.</returns>
+		public Element mutationToDom(bool opt_caseIds)
+		{
+			if ((cases_.Length == 0) && (defaultCount_ == 0)) {
+				return null;
+			}
+			var container = Document.CreateElement("mutation");
+			for (var i = 0; i < cases_.Length; i++) {
+				var caseInfo = Document.CreateElement("case");
+				caseInfo.AppendChild(Document.CreateTextNode(cases_[i].Item1));
+				if (cases_[i].Item3 == null)
+					caseInfo.SetAttribute("value", cases_[i].Item2);
+				else {
+					caseInfo.SetAttribute("minimum", cases_[i].Item2);
+					caseInfo.SetAttribute("maximum", cases_[i].Item3);
+				}
+				container.AppendChild(caseInfo);
+			}
+			container.SetAttribute("default", defaultCount_.ToString());
+			container.SetAttribute("user_getter", userGetter_ ? "1" : "0");
+			container.SetAttribute("property_code", PropertyCode.ToString("X2"));
+			container.SetAttribute("identifier", Identifier);
+			container.SetAttribute("description", Description);
+			container.SetAttribute("property_size", PropertySize.ToString());
+			return container;
+		}
+
+		/// <summary>
+		/// Parse XML to restore the else-if and else inputs.
+		/// </summary>
+		/// <param name="xmlElement">XML storage element.</param>
+		public void domToMutation(Element xmlElement)
+		{
+			cases_ = new Tuple<string, string, string>[0];
+			Element childNode;
+			for (var i = 0; (childNode = (dynamic)xmlElement.ChildNodes[i]) != null; i++) {
+				if (childNode.NodeName.ToLower() == "case") {
+					var description = (childNode.ChildNodes.Length != 0) ? childNode.ChildNodes[0].NodeValue : "";
+					var value = childNode.GetAttribute("value");
+					if (value != null)
+						cases_.Push(new Tuple<string, string, string>(description, value, null));
+					else {
+						var min = childNode.GetAttribute("minimum");
+						var max = childNode.GetAttribute("maximum");
+						if ((min != null) && (max != null))
+							cases_.Push(new Tuple<string, string, string>(description, min, max));
+					}
+				}
+			}
+			var count = xmlElement.GetAttribute("default");
+			defaultCount_ = count == null ? 0 : Script.ParseInt(count, 10);
+			count = xmlElement.GetAttribute("user_getter");
+			userGetter_ = count == null ? false : (Script.ParseInt(count, 10) != 0);
+			count = xmlElement.GetAttribute("property_code");
+			PropertyCode = Script.ParseInt(count, 16);
+			if (Workspace != null)
+				InitPropertyInfo(Workspace, true);
+			Identifier = xmlElement.GetAttribute("identifier");
+			Description = xmlElement.GetAttribute("description");
+			count = xmlElement.GetAttribute("property_size");
+			PropertySize = count == null ? 0 : Script.ParseInt(count, 10);
+			updateSetter_();
+			updateGetter_(userGetter_);
+		}
+
+		/// <summary>
+		/// Populate the mutator's dialog with this block's components.
+		/// </summary>
+		/// <param name="workspace">Mutator's workspace.</param>
+		/// <returns>Root block in mutator.</returns>
+		public Block decompose(Workspace workspace)
+		{
+			var containerBlock = workspace.newBlock(EPropertyFixLenContainerBlock.type_name);
+			containerBlock.initSvg();
+			var connection = containerBlock.getInput("STACK").connection;
+			for (var i = 0; i < cases_.Length; i++) {
+				Block caseBlock;
+				var description = getFieldValue("CASE_DESCRIPTION" + i);
+				var value = getFieldValue("CASE_VALUE" + i);
+				if (value != null) {
+					caseBlock = workspace.newBlock(EPropertyFixLenConstBlock.type_name);
+					caseBlock.setFieldValue(description, "DESCRIPTION");
+					caseBlock.setFieldValue(value, "CONST");
+				}
+				else {
+					var min = getFieldValue("CASE_MIN" + i);
+					var max = getFieldValue("CASE_MAX" + i);
+					if ((min != null) && (max != null)) {
+						caseBlock = workspace.newBlock(EPropertyFixLenRangeBlock.type_name);
+						caseBlock.setFieldValue(description, "DESCRIPTION");
+						caseBlock.setFieldValue(min, "RANGE_MIN");
+						caseBlock.setFieldValue(max, "RANGE_MAX");
+					}
+					else
+						continue;
+				}
+				caseBlock.initSvg();
+				connection.connect(caseBlock.previousConnection);
+				connection = caseBlock.nextConnection;
+			}
+			if (defaultCount_ != 0) {
+				var defaultBlock = workspace.newBlock(EPropertyFixLenDefaultBlock.type_name);
+				defaultBlock.initSvg();
+				connection.connect(defaultBlock.previousConnection);
+			}
+			containerBlock.setFieldValue(this.userGetter_ ? "TRUE" : "FALSE", "USER_GETTER");
+			return containerBlock;
+		}
+
+		/// <summary>
+		/// Reconfigure this block based on the mutator dialog's components.
+		/// </summary>
+		/// <param name="containerBlock">Root block in mutator.</param>
+		public void compose(Block containerBlock)
+		{
+			var clauseBlock = containerBlock.getInputTargetBlock("STACK");
+			// Count number of inputs.
+			cases_ = new Tuple<string, string, string>[0];
+			defaultCount_ = 0;
+			var statementConnections = new Connection[0];
+			Connection defaultStatementConnection = null;
+			while (clauseBlock != null) {
+				switch (clauseBlock.type) {
+				case EPropertyFixLenConstBlock.type_name: {
+						var description = clauseBlock.getFieldValue("DESCRIPTION");
+						var value = clauseBlock.getFieldValue("CONST");
+						cases_.Push(new Tuple<string, string, string>(description, value, null));
+						statementConnections.Push(((EPropertyFixLenConstBlock)clauseBlock).statementConnection_);
+					}
+					break;
+				case EPropertyFixLenRangeBlock.type_name: {
+						var description = clauseBlock.getFieldValue("DESCRIPTION");
+						var range_min = clauseBlock.getFieldValue("RANGE_MIN");
+						var range_max = clauseBlock.getFieldValue("RANGE_MAX");
+						cases_.Push(new Tuple<string, string, string>(description, range_min, range_max));
+						statementConnections.Push(((EPropertyFixLenRangeBlock)clauseBlock).statementConnection_);
+					}
+					break;
+				case EPropertyFixLenDefaultBlock.type_name: {
+						defaultCount_++;
+						defaultStatementConnection = ((EPropertyFixLenDefaultBlock)clauseBlock).statementConnection_;
+					}
+					break;
+				default:
+					throw new Exception("Unknown block type.");
+				}
+				clauseBlock = (clauseBlock.nextConnection != null) ?
+					clauseBlock.nextConnection.targetBlock() : null;
+			}
+			updateSetter_();
+			// Reconnect any child blocks.
+			for (var i = 0; i <= cases_.Length; i++) {
+				Mutator.reconnect(statementConnections[i], this, "SET" + i);
+			}
+			Mutator.reconnect(defaultStatementConnection, this, "DEFAULT_SET");
+			var userGetter_ = containerBlock.getFieldValue("USER_GETTER");
+			if (userGetter_ != null) {
+				var userGetter = userGetter_ == "TRUE";
+				if (this.userGetter_ != userGetter) {
+					if (userGetter) {
+						updateGetter_(true);
+						// Restore the stack, if one was saved.
+						Mutator.reconnect(this.statementConnection_, this, "GET");
+						this.statementConnection_ = null;
+						Mutator.reconnect(this.retvalConnection_, this, "GET_RET");
+						this.retvalConnection_ = null;
+					}
+					else {
+						// Save the stack, then disconnect it.
+						var getterConnection = this.getInput("GET").connection;
+						this.statementConnection_ = getterConnection.targetConnection;
+						var getretConnection = this.getInput("GET_RET").connection;
+						this.retvalConnection_ = getretConnection.targetConnection;
+						if (this.statementConnection_ != null) {
+							var doBlock = getterConnection.targetBlock();
+							doBlock.unplug();
+							doBlock.bumpNeighbours_();
+						}
+						if (this.retvalConnection_ != null) {
+							var doBlock = getretConnection.targetBlock();
+							doBlock.unplug();
+							doBlock.bumpNeighbours_();
+						}
+						updateGetter_(false);
+					}
+				}
+			}
+		}
+
+		/// <summary>
+		/// Store pointers to any connected child blocks.
+		/// </summary>
+		/// <param name="containerBlock">Root block in mutator.</param>
+		public void saveConnections(Block containerBlock)
+		{
+			var clauseBlock = containerBlock.getInputTargetBlock("STACK");
+			var i = 0;
+			while (clauseBlock != null) {
+				switch (clauseBlock.type) {
+				case EPropertyFixLenConstBlock.type_name: {
+						var inputSet = getInput("SET" + i);
+						((EPropertyFixLenConstBlock)clauseBlock).statementConnection_ =
+							(inputSet != null) ? inputSet.connection.targetConnection : null;
+						i++;
+					}
+					break;
+				case EPropertyFixLenRangeBlock.type_name: {
+						var inputSet = getInput("SET" + i);
+						((EPropertyFixLenRangeBlock)clauseBlock).statementConnection_ =
+							(inputSet != null) ? inputSet.connection.targetConnection : null;
+						i++;
+					}
+					break;
+				case EPropertyFixLenDefaultBlock.type_name: {
+						var inputDo = getInput("DEFAULT_SET");
+						((EPropertyFixLenDefaultBlock)clauseBlock).statementConnection_ =
+							(inputDo != null) ? inputDo.connection.targetConnection : null;
+					}
+					break;
+				default:
+					throw new Exception("Unknown block type.");
+				}
+
+				clauseBlock = (clauseBlock.nextConnection != null) ?
+					clauseBlock.nextConnection.targetBlock() : null;
+			}
+			var inputGet = getInput("GET");
+			statementConnection_ =
+				(inputGet != null) ? inputGet.connection.targetConnection : null;
+			var inputGetRet = getInput("GET_RET");
+			retvalConnection_ =
+				(inputGetRet != null) ? inputGetRet.connection.targetConnection : null;
+		}
+
+		/// <summary>
+		/// Modify this block to have the correct number of inputs.
+		/// </summary>
+		private void updateSetter_()
+		{
+			// Delete everything.
+			if (getInput("DEFAULT") != null) {
+				removeInput("DEFAULT");
+				removeInput("DEFAULT_SET");
+			}
+			var i = 0;
+			while (getInput("CASE" + i) != null) {
+				removeInput("CASE" + i);
+				removeInput("SET" + i);
+				i++;
+			}
+			// Rebuild block.
+			var getLabel = this.getInput("GET_LABEL");
+			i = 0;
+			foreach (var c in cases_) {
+				if (c.Item3 == null) {
+					appendDummyInput("CASE" + i)
+						.appendField("設定値が")
+						.appendField(c.Item1, "CASE_DESCRIPTION" + i)
+						.appendField(c.Item2, "CASE_VALUE" + i)
+						.appendField("の");
+				}
+				else {
+					appendDummyInput("CASE" + i)
+						.appendField("設定値が")
+						.appendField(c.Item1, "CASE_DESCRIPTION" + i)
+						.appendField(c.Item2, "CASE_MIN" + i)
+						.appendField("から")
+						.appendField(c.Item3, "CASE_MAX" + i)
+						.appendField("の");
+				}
+				if (getLabel != null) {
+					this.moveInputBefore("CASE" + i, "GET_LABEL");
+				}
+				appendStatementInput("SET" + i)
+					.appendField("とき");
+				if (getLabel != null) {
+					this.moveInputBefore("SET" + i, "GET_LABEL");
+				}
+				i++;
+			}
+			if (defaultCount_ != 0) {
+				if (cases_.Length == 0) {
+					appendDummyInput("DEFAULT")
+						.appendField("値が設定される");
+				}
+				else {
+					appendDummyInput("DEFAULT")
+						.appendField("設定値が不明の");
+				}
+				if (getLabel != null) {
+					this.moveInputBefore("DEFAULT", "GET_LABEL");
+				}
+				appendStatementInput("DEFAULT_SET")
+					.appendField("とき");
+				if (getLabel != null) {
+					this.moveInputBefore("DEFAULT_SET", "GET_LABEL");
+				}
+			}
+		}
+
+		private void updateGetter_(bool userGetter)
+		{
+			userGetter_ = userGetter;
+
+			if (getInput("GET") != null) {
+				removeInput("GET_LABEL");
+				removeInput("GET");
+				removeInput("GET_RET");
+			}
+			// Rebuild block.
+			if (userGetter_) {
+				appendDummyInput("GET_LABEL")
+					.appendField("値が取得される");
+				appendStatementInput("GET")
+					.appendField("とき");
+				appendValueInput("GET_RET")
+					.setCheck("String")
+					.setAlign(Blockly.ALIGN_RIGHT)
+					.appendField("返す値は");
+			}
+		}
+	}
+
+	public class EPropertyFixLenContainerBlock : Block
+	{
+		public const string type_name = "eproperty_fixlen_container";
+
+		public EPropertyFixLenContainerBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			appendDummyInput()
+				.appendField("条件");
+			appendStatementInput("STACK");
+			// TODO:実行時に変更できない･･･（Dropdownでも×）
+			appendDummyInput("USER_GETTER_INPUT")
+				.appendField("取得時に保存してあるプロパティ値を返す。")
+				.appendField(new FieldCheckbox("TRUE"), "USER_GETTER");
+			setColour(230);
+			setTooltip("");
+			contextMenu = false;
+		}
+	}
+
+	[IgnoreCast]
+	public class EPropertyFixLenConstBlock : Block
+	{
+		public const string type_name = "eproperty_fixlen_const";
+		public Connection statementConnection_;
+
+		public EPropertyFixLenConstBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			setColour(230);
+			appendDummyInput()
+				.appendField(new FieldTextInput("定数"), "DESCRIPTION")
+				.appendField(new FieldNumber("0", "-Infinity", "Infinity", 1), "CONST");
+			setPreviousStatement(true);
+			setNextStatement(true);
+			setTooltip("プロパティ値");
+			contextMenu = false;
+		}
+	}
+
+	public class EPropertyFixLenRangeBlock : Block
+	{
+		public const string type_name = "eproperty_fixlen_range";
+		public Connection statementConnection_;
+
+		public EPropertyFixLenRangeBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			setColour(230);
+			appendDummyInput()
+				.appendField(new FieldTextInput("範囲"), "DESCRIPTION")
+				.appendField(new FieldNumber("0", "-Infinity", "Infinity", 1), "RANGE_MIN")
+				.appendField("から")
+				.appendField(new FieldNumber("255", "-Infinity", "Infinity", 1), "RANGE_MAX");
+			setPreviousStatement(true);
+			setNextStatement(true);
+			setTooltip("プロパティ値");
+			contextMenu = false;
+		}
+	}
+
+	public class EPropertyFixLenDefaultBlock : Block
+	{
+		public const string type_name = "eproperty_fixlen_default";
+		public Connection statementConnection_;
+
+		public EPropertyFixLenDefaultBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			setColour(230);
+			appendDummyInput()
+				.appendField("その他");
+			setPreviousStatement(true);
+			setTooltip("不明なプロパティ値");
+			contextMenu = false;
+		}
+	}
+
+	public class EPropertyVarLenBlock : EPropertyBlock
+	{
+		public const string type_name = "eproperty_varlen";
+
+		public EPropertyVarLenBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput("PROPERTY")
+				.appendField("EPC:")
+				.appendField("__", "PROPERTY_CODE")
+				.appendField("__", "DESCRIPTION")
+				.appendField("__", "IDENTIFIER")
+				.appendField("Size:")
+				.appendField("__", "PROPERTY_SIZE")
+				.appendField("byte");
+			this.appendStatementInput("SET")
+				.setCheck("EPropertySetHandler")
+				.appendField("設定");
+			this.appendValueInput("SET_RET")
+				.setCheck("Number")
+				.setAlign(Blockly.ALIGN_RIGHT)
+				.appendField("設定に使用したバイト数");
+			this.appendStatementInput("GET")
+				.setCheck("EPropertyGetHandler")
+				.appendField("取得");
+			this.appendValueInput("GET_RET")
+				.setCheck("String")
+				.setAlign(Blockly.ALIGN_RIGHT)
+				.appendField("返すデータ");
+			this.setColour(230);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+
+			getField("PROPERTY_CODE").EDITABLE = true;
+		}
+	}
+
+	partial class Ruby
+	{
+		internal string defineENode(JsonNodeInfo enode, Workspace workspace)
+		{
+			var identifier = enode.identifier;
+
+			var nodes = new node[0];
+			var super = new colon2_node(this, new const_node(this, intern("ECNL")), intern("ENode"));
+			global = false;
+			var lv = local_switch();
+			{
+				var body = new begin_node(this, workspaceToNodes(workspace));
+				var cls = new class_node(this, intern(identifier), super, body);
+				nodes.Push(cls);
+			}
+			local_resume(lv);
+			global = true;
+
+			return finish(nodes);
+		}
+
+		internal string defineEObject(JsonObjectInfo eobject, Workspace workspace)
+		{
+			var identifier = eobject.identifier;
+
+			var nodes = new node[0];
+			var super = new colon2_node(this, new const_node(this, intern("ECNL")), intern("EObject"));
+			global = false;
+			var lv = local_switch();
+			{
+				var body = new begin_node(this, workspaceToNodes(workspace));
+				var cls = new class_node(this, intern(identifier), super, body);
+				nodes.Push(cls);
+			}
+			local_resume(lv);
+			global = true;
+
+			return finish(nodes);
+		}
+
+		public node enode_initialize(ENodeInitializeBlock block)
+		{
+			var workspace = block.workspace_;
+			var enode = workspace.eobject;
+			var properties = workspace.allEProperties(workspace.Workspace);
+
+			def_node def;
+			var lv = local_switch();
+			{
+				var fparams = new arg_node[] { new arg_node(this, local_add_f("eojx3")) };
+				var statements_do = statementToCode(block, "DO");
+
+				{
+					var eprpinib_table = new lvar_node(this, intern("eprpinib_table"));
+					var propinis = new node[0];
+					foreach (var pi in enode.properties) {
+						if (CodeGenerator.IsExtractProperty(pi))
+							continue;
+
+						var pb = properties.FirstOrDefault((i) => { return i.PropertyCode == pi.propertyCode; });
+
+						var ecnl_eproperty = new colon2_node(this, new const_node(this, intern("ECNL")), intern("EProperty"));
+						var args = new node[] {
+							new int_node(this, pi.propertyCode, 16),
+							getAccess(pi, pb),
+							getSize(pi, pb),
+							getExinf(pi, pb),
+							getSetter(pb),
+							getGetter(pb)
+						};
+						var propini = new call_node(this, ecnl_eproperty, intern("new"), args);
+
+						propinis.Push(propini);
+					}
+
+					var asgn = new asgn_node(this, eprpinib_table, new array_node(this, propinis, true));
+					statements_do.progs.Push(asgn);
+				}
+
+				{
+					var args = new node[] {
+						new lvar_node(this, intern("eojx3")),
+						new lvar_node(this, intern("eprpinib_table"))
+					};
+					var super = new super_node(this, args);
+					statements_do.progs.Push(super);
+				}
+
+				def = new def_node(this, intern("initialize"), fparams, statements_do);
+			}
+			local_resume(lv);
+			return def;
+		}
+
+		public node eobject_initialize(EObjectInitializeBlock block)
+		{
+			var workspace = block.workspace_;
+			var eobject = workspace.eobject;
+			var properties = workspace.allEProperties(workspace.Workspace);
+
+			def_node def;
+			var lv = local_switch();
+			{
+				var fparams = new arg_node[] {
+					new arg_node(this, local_add_f("eojx3")),
+					new arg_node(this, local_add_f("enod"))
+				};
+				var statements_do = statementToCode(block, "DO");
+
+				{
+					var eprpinib_table = new lvar_node(this, intern("eprpinib_table"));
+					var propinis = new node[0];
+					foreach (var pi in eobject.properties) {
+						if (CodeGenerator.IsExtractProperty(pi))
+							continue;
+
+						var pb = properties.FirstOrDefault((i) => { return i.PropertyCode == pi.propertyCode; });
+
+						var ecnl_eproperty = new colon2_node(this, new const_node(this, intern("ECNL")), intern("EProperty"));
+						var args = new node[] {
+							new int_node(this, pi.propertyCode, 16),
+							getAccess(pi, pb),
+							getSize(pi, pb),
+							getExinf(pi, pb),
+							getSetter(pb),
+							getGetter(pb)
+						};
+						var propini = new call_node(this, ecnl_eproperty, intern("new"), args);
+
+						propinis.Push(propini);
+					}
+
+					var asgn = new asgn_node(this, eprpinib_table, new array_node(this, propinis, true));
+					statements_do.progs.Push(asgn);
+				}
+
+				{
+					var args = new node[] {
+						new int_node(this, eobject.type.classGroup.classGroupCode, 16),
+						new int_node(this, eobject.type.classCode, 16),
+						new lvar_node(this, intern("eojx3")),
+						new lvar_node(this, intern("enod")),
+						new lvar_node(this, intern("eprpinib_table"))
+					};
+					var super = new super_node(this, args);
+					statements_do.progs.Push(super);
+				}
+
+				def = new def_node(this, intern("initialize"), fparams, statements_do);
+			}
+			local_resume(lv);
+			return def;
+		}
+
+		private node getSize(JsonPropertyInfo pi, EPropertyBlock pb)
+		{
+			if (pb != null)
+				pi = pb.PropertyInfo;
+			return new int_node(this, ((pi.arrayCount == 0) ? 1 : pi.arrayCount) * pi.size, 10);
+		}
+
+		private node getAccess(JsonPropertyInfo pi, EPropertyBlock pb)
+		{
+			if (pb != null)
+				pi = pb.PropertyInfo;
+			var list = new node[0];
+
+			if (pi.access.Contains("RULE_ANNO"))
+				list.Push(new colon2_node(this, new const_node(this, intern("ECNL")), intern("EPC_RULE_ANNO")));
+
+			if (pi.access.Contains("RULE_SET"))
+				list.Push(new colon2_node(this, new const_node(this, intern("ECNL")), intern("EPC_RULE_SET")));
+
+			if (pi.access.Contains("RULE_GET"))
+				list.Push(new colon2_node(this, new const_node(this, intern("ECNL")), intern("EPC_RULE_GET")));
+
+			if (pi.access.Contains("ANNOUNCE"))
+				list.Push(new colon2_node(this, new const_node(this, intern("ECNL")), intern("EPC_ANNOUNCE")));
+
+			if (pi.access.Contains("VARIABLE"))
+				list.Push(new colon2_node(this, new const_node(this, intern("ECNL")), intern("EPC_VARIABLE")));
+
+			switch (list.Length) {
+			case 0: return new colon2_node(this, new const_node(this, intern("ECNL")), intern("EPC_NONE"));
+			case 1: return list[0];
+			}
+
+			var or = intern("|");
+			call_node result = new call_node(this, list[0], or, list[1]);
+			for (int i = 2; i < list.Length; i++) {
+				result = new call_node(this, result, or, list[i]);
+			}
+			return result;
+		}
+
+		private node getExinf(JsonPropertyInfo pi, EPropertyBlock pb)
+		{
+			switch (pi.propertyCode) {
+			// 現在時刻設定
+			case 0x97:
+			// 現在年月日設定
+			case 0x98:
+				return new nil_node(this);
+			// その他
+			default:
+				if (pb == null)
+					return new sym_node(this, get_var_name(CodeGenerator.GetPropertyIdentifier(pi)));
+				return new sym_node(this, get_var_name(pb.Identifier));
+			}
+		}
+
+		private node getSetter(EPropertyBlock pb)
+		{
+			if (pb == null)
+				return new sym_node(this, intern("ecn_data_prop_set"));
+			return new sym_node(this, intern(pb.Identifier + "_set"));
+		}
+
+		private node getGetter(EPropertyBlock pb)
+		{
+			if (pb == null)
+				return new sym_node(this, intern("ecn_data_prop_get"));
+			return new sym_node(this, intern(pb.Identifier + "_get"));
+		}
+
+		public node eproperty_fixlen(EPropertyFixLenBlock block)
+		{
+			var text_identifier = block.Identifier;
+			var value_description = block.Description;
+			var value_property_code = block.PropertyCode.ToString("X2");
+			var value_property_size = block.PropertySize.ToString();
+
+			// 設定関数定義
+			def_node def_set;
+			var lv = local_switch();
+			{
+				var prop = local_add_f("prop");
+				var src = local_add_f("src");
+				var args = new arg_node[0];
+				args.Push(new arg_node(this, prop));
+				args.Push(new arg_node(this, src));
+
+				var statements_set = new begin_node(this, new node[0]);
+				{
+					var src_bytesize = new call_node(this, new lvar_node(this, src), intern("bytesize"));
+					var size = new int_node(this, Script.ParseInt(value_property_size));
+					var size_check_cond = new call_node(this, src_bytesize, intern("!="), size);
+					var size_check = new if_node(this, size_check_cond, new return_node(this, new int_node(this, 0)), null, false);
+					statements_set.progs.Push(size_check);
+				}
+
+				{
+					var anno_check_cond = new call_node(this, new lvar_node(this, prop), intern("anno"));
+					var prop_exinf = new call_node(this, new lvar_node(this, prop), intern("exinf"));
+					var set_anno_arg = new call_node(this, prop_exinf, intern("!="), new lvar_node(this, src));
+					var anno_check_then = new call_node(this, new lvar_node(this, prop), intern("set_anno"), new node[] { set_anno_arg });
+					var anno_check = new if_node(this, anno_check_cond, anno_check_then, null, false);
+					statements_set.progs.Push(anno_check);
+				}
+
+				var val = local_add_f("val");
+				{
+					node code;
+					var lsrc = new lvar_node(this, src);
+					var pos = new int_node(this, 0);
+					switch (value_property_size) {
+					case "1":
+						code = new call_node(this, lsrc, intern("getbyte"), new node[] { pos });
+						break;
+					case "2":
+						code = new fcall_node(this, intern("ecnl_getshort"), new node[] { lsrc, pos });
+						break;
+					case "4":
+						code = new fcall_node(this, intern("ecnl_getint"), new node[] { lsrc, pos });
+						break;
+					default:
+						code = new int_node(this, -1);
+						break;
+					}
+					code = new asgn_node(this, new lvar_node(this, val), code);
+					statements_set.progs.Push(code);
+				}
+
+				if (block.cases_.Length > 0) {
+					node argument0 = new lvar_node(this, val);
+					if (argument0 == null) argument0 = new int_node(this, -1);
+					var branches = new case_node.when_t[0];
+					for (var i = 0; i < block.cases_.Length; i++) {
+						var branch = statementToCode(block, "SET" + i);
+						var argument1 = block.getFieldValue("CASE_VALUE" + i);
+						if (argument1 != null) {
+							var when = new case_node.when_t() { body = branch };
+							when.value.Push(new int_node(this, argument1 == null ? 0 : Script.ParseInt(argument1, 10)));
+							branches.Push(when);
+						}
+						else {
+							var min = block.getFieldValue("CASE_MIN" + i);
+							var max = block.getFieldValue("CASE_MAX" + i);
+							if ((min != null) && (max != null)) {
+								var when = new case_node.when_t() { body = branch };
+								when.value.Push(new dot2_node(this,
+									new int_node(this, min == null ? 0 : Script.ParseInt(min, 10)),
+									new int_node(this, max == null ? 0 : Script.ParseInt(max, 10))));
+								branches.Push(when);
+							}
+						}
+					}
+					{
+						var branch = statementToCode(block, "DEFAULT_SET");
+						if (branch.progs.Length == 0) {
+							branch = new begin_node(this, new node[] { new return_node(this, new int_node(this, 0)) });
+						}
+						var when = new case_node.when_t() { body = branch };
+						branches.Push(when);
+					}
+
+					var code = new case_node(this, new lvar_node(this, val), branches);
+					statements_set.progs.Push(code);
+				}
+
+				var value_set_ret = new return_node(this, new int_node(this, Script.ParseInt(value_property_size)));
+				statements_set.progs.Push(value_set_ret);
+				def_set = new def_node(this, intern(text_identifier + "_set"), args, statements_set);
+			}
+			local_resume(lv);
+
+			// 取得関数定義
+			def_node def_get;
+			lv = local_switch();
+			{
+				var prop = local_add_f("prop");
+				var src = local_add_f("src");
+				var args = new arg_node[0];
+				args.Push(new arg_node(this, prop));
+				args.Push(new arg_node(this, src));
+
+				var statements_get = statementToCode(block, "GET");
+				var value_get_ret = valueToCode(block, "GET_RET");
+				if (value_get_ret == null) {
+					value_get_ret = new return_node(this, new str_node(this, ""));
+				}
+				statements_get.progs.Push(value_get_ret);
+				def_get = new def_node(this, intern(text_identifier + "_get"), args, statements_get);
+			}
+			local_resume(lv);
+
+			// 設定関数定義と取得関数定義のリスト
+			return node.cons(this, def_set, node.cons(this, def_get, null));
+		}
+
+		public node eproperty_varlen(EPropertyVarLenBlock block)
+		{
+			var text_identifier = block.getFieldValue("IDENTIFIER");
+			var value_description = block.getFieldValue("DESCRIPTION");
+			var value_property_code = block.getFieldValue("PROPERTY_CODE");
+			var value_property_size = block.getFieldValue("PROPERTY_SIZE");
+
+			// 設定関数定義
+			def_node def_set;
+			var lv = local_switch();
+			{
+				var prop = local_add_f("prop");
+				var src = local_add_f("src");
+				var args = new arg_node[0];
+				args.Push(new arg_node(this, prop));
+				args.Push(new arg_node(this, src));
+
+				var statements_set = statementToCode(block, "SET");
+				var value_set_ret = valueToCode(block, "SET_RET");
+				if (value_set_ret == null) {
+					value_set_ret = new return_node(this, new int_node(this, 0));
+				}
+				statements_set.progs.Push(value_set_ret);
+				def_set = new def_node(this, intern(text_identifier + "_set"), args, statements_set);
+			}
+			local_resume(lv);
+
+			// 取得関数定義
+			def_node def_get;
+			lv = local_switch();
+			{
+				var prop = local_add_f("prop");
+				var src = local_add_f("src");
+				var args = new arg_node[0];
+				args.Push(new arg_node(this, prop));
+				args.Push(new arg_node(this, src));
+
+				var statements_get = statementToCode(block, "GET");
+				var value_get_ret = valueToCode(block, "GET_RET");
+				if (value_get_ret == null) {
+					value_get_ret = new return_node(this, new str_node(this, ""));
+				}
+				statements_get.progs.Push(value_get_ret);
+				def_get = new def_node(this, intern(text_identifier + "_get"), args, statements_get);
+			}
+			local_resume(lv);
+
+			// 設定関数定義と取得関数定義のリスト
+			return node.cons(this, def_set, node.cons(this, def_get, null));
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/EObjectWorkspace.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/EObjectWorkspace.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/EObjectWorkspace.cs	(revision 270)
@@ -0,0 +1,1089 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Bridge;
+using Bridge.Html5;
+using Bridge.jQuery2;
+
+namespace WebMrbc
+{
+	internal class EObjectWorkspace : IClassWorkspace
+	{
+		public JsonObjectInfo eobject;
+		private Workspace workspace;
+		BlocklyView view;
+		Action<bool> callback;
+		protected Ruby _RubyCode;
+
+		public string Identifier { get { return view.Identifier; } }
+		public Workspace Workspace { get { return workspace; } }
+		public BlocklyView View { get { return view; } }
+		public Ruby RubyCode { get { return _RubyCode; } }
+
+		public EObjectWorkspace(BlocklyView view, JsonObjectInfo eobject)
+		{
+			this.view = view;
+			this.eobject = eobject;
+			workspace = view.Init();
+
+			view.FlyoutCategoryHandlers.Add("ECHONET_LITE_PROPERTY", FlyoutCategory);
+
+			UpdateInitialBlock();
+		}
+
+		protected void UpdateInitialBlock()
+		{
+			var blocks = Workspace.getTopBlocks(false);
+			foreach (var b in blocks) {
+				if ((b.type == ENodeInitializeBlock.type_name)
+					|| (b.type == EObjectInitializeBlock.type_name)) {
+					b.dispose(false);
+					continue;
+				}
+
+				if ((b.type == EPropertyFixLenBlock.type_name)
+					|| (b.type == EPropertyVarLenBlock.type_name)) {
+					((dynamic)b).InitPropertyInfo(this);
+					continue;
+				}
+			}
+
+			var xml = Document.CreateElement("xml");
+			var block = Document.CreateElement("block");
+			xml.AppendChild(block);
+
+			if ((eobject.type.classGroup.classGroupCode == 0x0E)
+				 && (eobject.type.classCode == 0xF0))
+				block.SetAttribute("type", ENodeInitializeBlock.type_name);
+			else
+				block.SetAttribute("type", EObjectInitializeBlock.type_name);
+
+			var statement = Document.CreateElement("statement");
+			statement.SetAttribute("name", "DO");
+			block.AppendChild(statement);
+
+			var prev = (Element)null;
+			foreach (var pi in eobject.properties) {
+				if (CodeGenerator.IsExtractProperty(pi))
+					continue;
+
+				var vset = Document.CreateElement("block");
+				vset.SetAttribute("type", "variables_set");
+
+				var field = Document.CreateElement("field");
+				field.SetAttribute("name", "VAR");
+				field.AppendChild(Document.CreateTextNode(CodeGenerator.GetPropertyIdentifier(pi)));
+				vset.AppendChild(field);
+
+				var value = Document.CreateElement("value");
+				value.SetAttribute("name", "VALUE");
+				vset.AppendChild(value);
+
+				var text = Document.CreateElement("shadow");
+				text.SetAttribute("type", "text");
+				value.AppendChild(text);
+
+				field = Document.CreateElement("field");
+				field.SetAttribute("name", "TEXT");
+				var body = new StringBuilder();
+				GetInitialValue(body, pi, pi.valueDescription, false);
+				field.AppendChild(Document.CreateTextNode(body.ToString()));
+				text.AppendChild(field);
+
+				if (prev != null) {
+					var next = Document.CreateElement("next");
+					next.AppendChild(vset);
+					prev.AppendChild(next);
+				}
+				else {
+					statement.AppendChild(vset);
+				}
+				prev = vset;
+			}
+
+			Blockly.Xml.domToWorkspace(xml, Workspace);
+		}
+
+		private void GetInitialValue(StringBuilder body, JsonFieldInfo emi, string valRng, bool recursive)
+		{
+			if (emi.type == "manufacturer_code_t") {
+				body.Append("#{$MAKER_CODE}");
+				return;
+			}
+
+			if (emi.type == "version_information_t") {
+				body.Append("\\x01\\x0A\\x01\\x00");
+				return;
+			}
+
+			if (emi.type == "standard_version_information_t") {
+				body.Append("\\x00\\x00C\\x00");
+				return;
+			}
+
+			if (emi.primitive) {
+				int count = emi.arrayCount;
+				if (count == 0) {
+					body.Append(CodeGenerator.GetInitialValue(valRng, emi));
+				}
+				else {
+					body.Append("");
+					for (int i = 0; i < count; i++) {
+						body.Append(CodeGenerator.GetInitialValue(valRng, emi));
+					}
+					body.Append("");
+				}
+			}
+			else if (emi.fields != null && emi.fields.Length > 0) {
+				foreach (var efi in emi.fields) {
+					GetInitialValue(body, efi, efi.valueDescription, true);
+				}
+			}
+		}
+
+		public virtual string GetImageUrl()
+		{
+			return "img/no_image.png";
+		}
+
+		public virtual bool IsPreset()
+		{
+			return false;
+		}
+
+		public virtual string ToCode(string filename)
+		{
+			if (eobject == null)
+				return "";
+
+			_RubyCode = new Ruby(filename);
+			_RubyCode.init(Workspace);
+			var result = _RubyCode.defineEObject(eobject, workspace);
+			view.Changed = false;
+			return result;
+		}
+
+		//Element ele;
+
+		public virtual void Activate()
+		{
+			//ele = Blockly.Xml.workspaceToDom(workspace);
+		}
+
+		public virtual void Inactivate()
+		{
+			//workspace.clear();
+			//Blockly.Xml.domToWorkspace(ele, workspace);
+		}
+
+		public void ReloadToolbox(HTMLElement toolbox)
+		{
+			toolbox.AppendChild(Document.CreateElement("sep"));
+			var xml = jQuery.ParseXML(App.ArduinoToolbox);
+			var categories = xml.ChildNodes[0];
+			foreach (var item in categories.ChildNodes) {
+				if (item.NodeName != "category")
+					continue;
+				toolbox.AppendChild(item);
+			}
+
+			toolbox.AppendChild(Document.CreateElement("sep"));
+			xml = jQuery.ParseXML(App.EcnlToolbox);
+			categories = xml.ChildNodes[0];
+			foreach (var item in categories.ChildNodes) {
+				if (item.NodeName != "category")
+					continue;
+				toolbox.AppendChild(item);
+			}
+
+			var category = Document.CreateElement("category");
+			category.SetAttribute("name", "ECHONET Lite Property");
+			category.SetAttribute("custom", "ECHONET_LITE_PROPERTY");
+			category.SetAttribute("colour", "230");
+			toolbox.AppendChild(category);
+		}
+
+		public EPropertyBlock[] allEProperties(Workspace root)
+		{
+			var blocks = root.getAllBlocks();
+			var eproperties = new EPropertyBlock[0];
+			for (var i = 0; i < blocks.Length; i++) {
+				var b = blocks[i];
+				if ((b.type == EPropertyFixLenBlock.type_name)
+					|| (b.type == EPropertyVarLenBlock.type_name)) {
+					eproperties.Push(b);
+				}
+			}
+			return eproperties;
+		}
+
+		private int procTupleComparator_(Tuple<string, byte, bool> ta, Tuple<string, byte, bool> tb)
+		{
+			return ta.Item2 - tb.Item2;
+		}
+
+		private Element[] FlyoutCategory(Workspace workspace)
+		{
+			var xmlList = new Element[0];
+			var properties = allEProperties(workspace);
+
+			foreach (var pi in eobject.properties) {
+				if (CodeGenerator.IsExtractProperty(pi))
+					continue;
+
+				bool exist = false;
+				foreach (var p in from p in properties where p.PropertyCode == pi.propertyCode select p) {
+					exist = true;
+					break;
+				}
+				if (exist)
+					continue;
+
+				bool varlen = pi.access.Contains("VARIABLE");
+				string identifier = CodeGenerator.GetPropertyIdentifier(pi);
+				ValueRange valueRange;
+				if (!CodeGenerator.HasPropSetter(pi, out valueRange))
+					valueRange = null;
+
+				var block = Document.CreateElement("block");
+				if (varlen)
+					block.SetAttribute("type", EPropertyVarLenBlock.type_name);
+				else
+					block.SetAttribute("type", EPropertyFixLenBlock.type_name);
+
+				var field = Document.CreateElement("field");
+				field.SetAttribute("name", "IDENTIFIER");
+				field.AppendChild(Document.CreateTextNode(identifier));
+				block.AppendChild(field);
+
+				field = Document.CreateElement("field");
+				field.SetAttribute("name", "DESCRIPTION");
+				field.AppendChild(Document.CreateTextNode(pi.description));
+				block.AppendChild(field);
+
+				field = Document.CreateElement("field");
+				field.SetAttribute("name", "PROPERTY_CODE");
+				field.AppendChild(Document.CreateTextNode(pi.propertyCode.ToString("X2")));
+				block.AppendChild(field);
+
+				field = Document.CreateElement("field");
+				field.SetAttribute("name", "PROPERTY_SIZE");
+				field.AppendChild(Document.CreateTextNode(pi.size.ToString()));
+				block.AppendChild(field);
+
+				xmlList.Push(block);
+
+				// プロパティが可変長の場合
+				if (varlen) {
+					{
+						var statement = Document.CreateElement("statement");
+						statement.SetAttribute("name", "SET");
+						block.AppendChild(statement);
+
+						var ifBlock = CreateSizeCheckBlocks();
+						statement.AppendChild(ifBlock);
+
+						var next = Document.CreateElement("next");
+						ifBlock.AppendChild(next);
+
+						if (pi.access.Contains("ANNOUNCE")) {
+							Element annoBlock = CreateAnnoCheck();
+							next.AppendChild(annoBlock);
+
+							next = Document.CreateElement("next");
+							annoBlock.AppendChild(next);
+						}
+
+						Element setBlock = null;
+						if (valueRange != null) {
+							setBlock = CreateSetStatement(valueRange);
+						}
+						else {
+							setBlock = Document.CreateElement("block");
+							setBlock.SetAttribute("type", EcnlSaveReceivedPropertyBlock.type_name);
+						}
+
+						if (setBlock != null) {
+							next.AppendChild(setBlock);
+						}
+					}
+
+					{
+						var value = Document.CreateElement("value");
+						value.SetAttribute("name", "SET_RET");
+						block.AppendChild(value);
+
+						var subblock = Document.CreateElement("block");
+						subblock.SetAttribute("type", EcnlGetPropertyInfoBlock.type_name);
+						value.AppendChild(subblock);
+
+						field = Document.CreateElement("field");
+						field.SetAttribute("name", "MEMBER");
+						field.AppendChild(Document.CreateTextNode("sz"));
+						subblock.AppendChild(field);
+					}
+				}
+				// プロパティが固定長の場合
+				else if ((valueRange == null) || ((valueRange.Values.Length == 0) && (valueRange.Ranges.Length == 0))) {
+					var mutation = Document.CreateElement("mutation");
+					mutation.SetAttribute("property_code", pi.propertyCode.ToString("X2"));
+					mutation.SetAttribute("identifier", identifier);
+					mutation.SetAttribute("description", pi.description);
+					mutation.SetAttribute("property_size", pi.size.ToString());
+					mutation.SetAttribute("default", "1");
+					mutation.SetAttribute("user_getter", "1");
+					block.AppendChild(mutation);
+
+					Element setBlock = null;
+					switch (pi.propertyCode) {
+					// 現在時刻
+					case 0x97:
+						setBlock = CreateSetTime();
+						break;
+					// 現在日付
+					case 0x98:
+						setBlock = CreateSetDate();
+						break;
+					default:
+						setBlock = Document.CreateElement("block");
+						setBlock.SetAttribute("type", EcnlSaveReceivedPropertyBlock.type_name);
+						break;
+					}
+
+					if (setBlock != null) {
+						var statement = Document.CreateElement("statement");
+						statement.SetAttribute("name", "DEFAULT_SET");
+						block.AppendChild(statement);
+
+						statement.AppendChild(setBlock);
+					}
+				}
+				else {
+					var mutation = Document.CreateElement("mutation");
+					mutation.SetAttribute("property_code", pi.propertyCode.ToString("X2"));
+					mutation.SetAttribute("identifier", identifier);
+					mutation.SetAttribute("description", pi.description);
+					mutation.SetAttribute("property_size", pi.size.ToString());
+					mutation.SetAttribute("default", "0");
+					mutation.SetAttribute("user_getter", "1");
+					block.AppendChild(mutation);
+
+					int i = 0;
+					foreach (var v in valueRange.Values) {
+						var branch = Document.CreateElement("case");
+						branch.SetAttribute("value", v.Val.ToString());
+						branch.AppendChild(Document.CreateTextNode(v.Disp.ToString()));
+						mutation.AppendChild(branch);
+
+						field = Document.CreateElement("field");
+						field.SetAttribute("name", "CASE_DESCRIPTION" + i);
+						field.AppendChild(Document.CreateTextNode(v.Disp.ToString()));
+						block.AppendChild(field);
+
+						field = Document.CreateElement("field");
+						field.SetAttribute("name", "CASE_VALUE" + i);
+						field.AppendChild(Document.CreateTextNode(v.Val.ToString()));
+						block.AppendChild(field);
+
+						var statement = Document.CreateElement("statement");
+						statement.SetAttribute("name", "SET" + i);
+						block.AppendChild(statement);
+
+						var setBlock = Document.CreateElement("shadow");
+						setBlock.SetAttribute("type", EcnlSaveReceivedPropertyBlock.type_name);
+						statement.AppendChild(setBlock);
+
+						i++;
+					}
+
+					foreach (var v in valueRange.Ranges) {
+						var branch = Document.CreateElement("case");
+						branch.SetAttribute("minimum", v.Min.ToString());
+						branch.SetAttribute("maximum", v.Max.ToString());
+						branch.AppendChild(Document.CreateTextNode(v.Disp.ToString()));
+						mutation.AppendChild(branch);
+
+						field = Document.CreateElement("field");
+						field.SetAttribute("name", "CASE_DESCRIPTION" + i);
+						field.AppendChild(Document.CreateTextNode(v.Disp.ToString()));
+						block.AppendChild(field);
+
+						field = Document.CreateElement("field");
+						field.SetAttribute("name", "CASE_MIN" + i);
+						field.AppendChild(Document.CreateTextNode(v.Min.ToString()));
+						block.AppendChild(field);
+
+						field = Document.CreateElement("field");
+						field.SetAttribute("name", "CASE_MAX" + i);
+						field.AppendChild(Document.CreateTextNode(v.Max.ToString()));
+						block.AppendChild(field);
+
+						var statement = Document.CreateElement("statement");
+						statement.SetAttribute("name", "SET" + i);
+						block.AppendChild(statement);
+
+						var setBlock = Document.CreateElement("shadow");
+						setBlock.SetAttribute("type", EcnlSaveReceivedPropertyBlock.type_name);
+						statement.AppendChild(setBlock);
+
+						i++;
+					}
+				}
+
+				{
+					var statement = Document.CreateElement("statement");
+					statement.SetAttribute("name", "GET");
+					block.AppendChild(statement);
+
+					Element ifBlock = null;
+					if (varlen) {
+						ifBlock = CreateSizeCheckBlocks();
+						statement.AppendChild(ifBlock);
+					}
+
+					Element getBlock = null;
+					switch (pi.propertyCode) {
+					// 現在時刻
+					case 0x97:
+						getBlock = CreateGetTime(identifier);
+						break;
+					// 現在日付
+					case 0x98:
+						getBlock = CreateGetDate(identifier);
+						break;
+					default:
+						break;
+					}
+
+					if (getBlock != null) {
+						if (ifBlock != null) {
+							var next = Document.CreateElement("next");
+							next.AppendChild(getBlock);
+
+							ifBlock.AppendChild(next);
+						}
+						else {
+							statement.AppendChild(getBlock);
+						}
+					}
+				}
+
+				{
+					var value = Document.CreateElement("value");
+					value.SetAttribute("name", "GET_RET");
+					block.AppendChild(value);
+
+					Element subblock = null;
+					switch (pi.propertyCode) {
+					// 現在時刻
+					case 0x97:
+						subblock = CreateGetRetTime(identifier);
+						break;
+					// 現在日付
+					case 0x98:
+						subblock = CreateGetRetDate(identifier);
+						break;
+					default:
+						subblock = Document.CreateElement("block");
+						subblock.SetAttribute("type", EcnlGetSavedPropertyBlock.type_name);
+						break;
+					}
+
+					if (subblock != null) {
+						value.AppendChild(subblock);
+					}
+				}
+			}
+
+			return xmlList;
+		}
+
+		private Element CreateSetDate()
+		{
+			var localvar = "date";
+			var setBlock = CreateGetDateTimeBlock(localvar);
+
+			var next = Document.CreateElement("next");
+			setBlock.AppendChild(next);
+
+			var rtcBlock = CreateSetDateTimeItemBlock(localvar, "0", "SHORT", 0);
+			next.AppendChild(rtcBlock);
+
+			next = Document.CreateElement("next");
+			rtcBlock.AppendChild(next);
+
+			rtcBlock = CreateSetDateTimeItemBlock(localvar, "1", "BYTE", 2);
+			next.AppendChild(rtcBlock);
+
+			next = Document.CreateElement("next");
+			rtcBlock.AppendChild(next);
+
+			rtcBlock = CreateSetDateTimeItemBlock(localvar, "2", "BYTE", 3);
+			next.AppendChild(rtcBlock);
+
+			next = Document.CreateElement("next");
+			rtcBlock.AppendChild(next);
+
+			var callBlock = CreateSetDateTimeBlock(localvar);
+			next.AppendChild(callBlock);
+
+			return setBlock;
+		}
+
+		private Element CreateGetDate(string name)
+		{
+			return CreateGetDateTimeBlock(name);
+		}
+
+		private Element CreateGetRetDate(string name)
+		{
+			var subBlock = Document.CreateElement("block");
+			subBlock.SetAttribute("type", DataJoinBlock.type_name);
+
+			var mutation = Document.CreateElement("mutation");
+			mutation.SetAttribute("items", "3");
+			subBlock.AppendChild(mutation);
+
+			var value = Document.CreateElement("value");
+			value.SetAttribute("name", "ADD0");
+			subBlock.AppendChild(value);
+
+			var rtcBlock = CreateGetDateTimeBlock(name, "0");
+			value.AppendChild(rtcBlock);
+
+			value = Document.CreateElement("value");
+			value.SetAttribute("name", "ADD1");
+			subBlock.AppendChild(value);
+
+			rtcBlock = CreateGetDateTimeBlock(name, "1");
+			value.AppendChild(rtcBlock);
+
+			value = Document.CreateElement("value");
+			value.SetAttribute("name", "ADD2");
+			subBlock.AppendChild(value);
+
+			rtcBlock = CreateGetDateTimeBlock(name, "2");
+			value.AppendChild(rtcBlock);
+
+			return subBlock;
+		}
+
+		private Element CreateSetTime()
+		{
+			var localvar = "time";
+			var setBlock = CreateGetDateTimeBlock(localvar);
+
+			var next = Document.CreateElement("next");
+			setBlock.AppendChild(next);
+
+			var rtcBlock = CreateSetDateTimeItemBlock(localvar, "3", "BYTE", 0);
+			next.AppendChild(rtcBlock);
+
+			next = Document.CreateElement("next");
+			rtcBlock.AppendChild(next);
+
+			rtcBlock = CreateSetDateTimeItemBlock(localvar, "4", "BYTE", 1);
+			next.AppendChild(rtcBlock);
+
+			next = Document.CreateElement("next");
+			rtcBlock.AppendChild(next);
+
+			var callBlock = CreateSetDateTimeBlock(localvar);
+			next.AppendChild(callBlock);
+
+			return setBlock;
+		}
+
+		private Element CreateGetTime(string name)
+		{
+			return CreateGetDateTimeBlock(name);
+		}
+
+		private Element CreateGetRetTime(string name)
+		{
+			var subBlock = Document.CreateElement("block");
+			subBlock.SetAttribute("type", DataJoinBlock.type_name);
+
+			var mutation = Document.CreateElement("mutation");
+			mutation.SetAttribute("items", "2");
+			subBlock.AppendChild(mutation);
+
+			var value = Document.CreateElement("value");
+			value.SetAttribute("name", "ADD0");
+			subBlock.AppendChild(value);
+
+			var rtcBlock = CreateGetDateTimeBlock(name, "3");
+			value.AppendChild(rtcBlock);
+
+			value = Document.CreateElement("value");
+			value.SetAttribute("name", "ADD1");
+			subBlock.AppendChild(value);
+
+			rtcBlock = CreateGetDateTimeBlock(name, "4");
+			value.AppendChild(rtcBlock);
+
+			return subBlock;
+		}
+
+		private Element CreateGetDateTimeBlock(string name, string item)
+		{
+			var rtcBlock = Document.CreateElement("block");
+			rtcBlock.SetAttribute("type", RtcDateTimeItemBlock.type_name);
+
+			var field = Document.CreateElement("field");
+			field.SetAttribute("name", "ARRAY");
+			field.AppendChild(Document.CreateTextNode(name));
+			rtcBlock.AppendChild(field);
+
+			field = Document.CreateElement("field");
+			field.SetAttribute("name", "ITEM");
+			field.AppendChild(Document.CreateTextNode(item));
+			rtcBlock.AppendChild(field);
+
+			return rtcBlock;
+		}
+
+		private Element CreateGetDateTimeBlock(string name)
+		{
+			var block = Document.CreateElement("block");
+			block.SetAttribute("type", VariablesSetBlock.type_name);
+
+			var field = Document.CreateElement("field");
+			field.SetAttribute("name", "VAR");
+			field.AppendChild(Document.CreateTextNode(name));
+			block.AppendChild(field);
+
+			var value = Document.CreateElement("value");
+			value.SetAttribute("name", "VALUE");
+			block.AppendChild(value);
+
+			var rtcBlock = Document.CreateElement("block");
+			rtcBlock.SetAttribute("type", RtcGetTimeBlock.type_name);
+			value.AppendChild(rtcBlock);
+
+			return block;
+		}
+
+		private Element CreateSetDateTimeBlock(string localvar)
+		{
+			var callBlock = Document.CreateElement("block");
+			callBlock.SetAttribute("type", CallBlock.type_name);
+
+			var value = Document.CreateElement("value");
+			value.SetAttribute("name", "RET");
+			callBlock.AppendChild(value);
+
+			var rtcBlock = Document.CreateElement("block");
+			rtcBlock.SetAttribute("type", RtcSettimeBlock.type_name);
+			value.AppendChild(rtcBlock);
+
+			value = Document.CreateElement("value");
+			value.SetAttribute("name", "DATE");
+			rtcBlock.AppendChild(value);
+
+			var vgetBlock = Document.CreateElement("block");
+			vgetBlock.SetAttribute("type", VariablesGetBlock.type_name);
+			value.AppendChild(vgetBlock);
+
+			var field = Document.CreateElement("field");
+			field.SetAttribute("name", "VAR");
+			field.AppendChild(Document.CreateTextNode(localvar));
+			vgetBlock.AppendChild(field);
+
+			return callBlock;
+		}
+
+		private Element CreateSetDateTimeItemBlock(string localvar, string item, string width, int pos)
+		{
+			var rtcBlock = Document.CreateElement("block");
+			rtcBlock.SetAttribute("type", RtcSetDateTimeItemBlock.type_name);
+
+			var field = Document.CreateElement("field");
+			field.SetAttribute("name", "ARRAY");
+			field.AppendChild(Document.CreateTextNode(localvar));
+			rtcBlock.AppendChild(field);
+
+			field = Document.CreateElement("field");
+			field.SetAttribute("name", "ITEM");
+			field.AppendChild(Document.CreateTextNode(item));
+			rtcBlock.AppendChild(field);
+
+			var value = Document.CreateElement("value");
+			value.SetAttribute("name", "VALUE");
+			rtcBlock.AppendChild(value);
+
+			var dataBlock = CreateReceivedData(width, pos);
+			value.AppendChild(dataBlock);
+
+			return rtcBlock;
+		}
+
+		private Element CreateAnnoCheck()
+		{
+			var annoBlock = Document.CreateElement("block");
+			annoBlock.SetAttribute("type", EcnlSetAnnounceRequestBlock.type_name);
+
+			var value = Document.CreateElement("value");
+			value.SetAttribute("name", "DATA");
+			annoBlock.AppendChild(value);
+
+			var subblock = Document.CreateElement("block");
+			subblock.SetAttribute("type", EcnlGetSavedPropertyBlock.type_name);
+			value.AppendChild(subblock);
+			return annoBlock;
+		}
+
+		private Element CreateSizeCheckBlocks()
+		{
+			Element field;
+			var ifBlock = Document.CreateElement("block");
+			ifBlock.SetAttribute("type", ControlsIfBlock.type_name);
+
+			var value = Document.CreateElement("value");
+			value.SetAttribute("name", "IF0");
+			ifBlock.AppendChild(value);
+
+			var compBlock = Document.CreateElement("block");
+			compBlock.SetAttribute("type", LogicCompareBlock.type_name);
+			value.AppendChild(compBlock);
+
+			field = Document.CreateElement("field");
+			field.SetAttribute("name", "OP");
+			field.AppendChild(Document.CreateTextNode("NEQ"));
+			compBlock.AppendChild(field);
+
+			value = Document.CreateElement("value");
+			value.SetAttribute("name", "A");
+			compBlock.AppendChild(value);
+
+			var subblock = Document.CreateElement("block");
+			subblock.SetAttribute("type", EcnlReceivedDataSizeBlock.type_name);
+			value.AppendChild(subblock);
+
+			value = Document.CreateElement("value");
+			value.SetAttribute("name", "B");
+			compBlock.AppendChild(value);
+
+			subblock = Document.CreateElement("block");
+			subblock.SetAttribute("type", EcnlGetPropertyInfoBlock.type_name);
+			value.AppendChild(subblock);
+
+			field = Document.CreateElement("field");
+			field.SetAttribute("name", "MEMBER");
+			field.AppendChild(Document.CreateTextNode("sz"));
+			subblock.AppendChild(field);
+
+			var doStatement = Document.CreateElement("statement");
+			doStatement.SetAttribute("name", "DO0");
+			ifBlock.AppendChild(doStatement);
+
+			subblock = Document.CreateElement("block");
+			subblock.SetAttribute("type", EcnlNoOpBlock.type_name);
+			doStatement.AppendChild(subblock);
+
+			return ifBlock;
+		}
+
+		private Element CreateSetStatement(ValueRange valueRange)
+		{
+			Element field;
+
+			var block = Document.CreateElement("block");
+			block.SetAttribute("type", SwitchCaseNumberBlock.type_name);
+
+			var mutation = Document.CreateElement("mutation");
+			mutation.SetAttribute("default", "1");
+			block.AppendChild(mutation);
+
+			int i = 0;
+			foreach (var v in valueRange.Values) {
+				var branch = Document.CreateElement("case");
+				branch.SetAttribute("value", v.Val.ToString());
+				branch.AppendChild(Document.CreateTextNode(v.Disp.ToString()));
+				mutation.AppendChild(branch);
+
+				field = Document.CreateElement("field");
+				field.SetAttribute("name", "DESCRIPTION" + i);
+				field.AppendChild(Document.CreateTextNode(v.Disp.ToString()));
+				block.AppendChild(field);
+
+				field = Document.CreateElement("field");
+				field.SetAttribute("name", "CONST" + i);
+				field.AppendChild(Document.CreateTextNode(v.Val.ToString()));
+				block.AppendChild(field);
+				i++;
+			}
+
+			foreach (var v in valueRange.Ranges) {
+				var branch = Document.CreateElement("case");
+				branch.SetAttribute("minimum", v.Min.ToString());
+				branch.SetAttribute("maximum", v.Max.ToString());
+				branch.AppendChild(Document.CreateTextNode(v.Disp.ToString()));
+				mutation.AppendChild(branch);
+
+				field = Document.CreateElement("field");
+				field.SetAttribute("name", "DESCRIPTION" + i);
+				field.AppendChild(Document.CreateTextNode(v.Disp.ToString()));
+				block.AppendChild(field);
+
+				field = Document.CreateElement("field");
+				field.SetAttribute("name", "RANGE_MIN" + i);
+				field.AppendChild(Document.CreateTextNode(v.Min.ToString()));
+				block.AppendChild(field);
+
+				field = Document.CreateElement("field");
+				field.SetAttribute("name", "RANGE_MAX" + i);
+				field.AppendChild(Document.CreateTextNode(v.Max.ToString()));
+				block.AppendChild(field);
+				i++;
+			}
+
+			return block;
+		}
+
+		private Element CreateReceivedData(string width, int pos)
+		{
+			var block = Document.CreateElement("block");
+			block.SetAttribute("type", EcnlDataToNumberBlock.type_name);
+
+			var field = Document.CreateElement("field");
+			field.SetAttribute("name", "WIDTH");
+			field.AppendChild(Document.CreateTextNode(width));
+			block.AppendChild(field);
+
+			var value = Document.CreateElement("value");
+			value.SetAttribute("name", "POSITION");
+			block.AppendChild(value);
+
+			var subBlock = Document.CreateElement("shadow");
+			subBlock.SetAttribute("type", MathNumberBlock.type_name);
+			value.AppendChild(subBlock);
+
+			field = Document.CreateElement("field");
+			field.SetAttribute("name", "NUM");
+			field.AppendChild(Document.CreateTextNode(pos.ToString()));
+			subBlock.AppendChild(field);
+
+			return block;
+		}
+
+		private Element RengeCheack(string width, int pos, long min, long max)
+		{
+			var block2 = Document.CreateElement("block");
+			block2.SetAttribute("type", LogicOperationBlock.type_name);
+
+			var field = Document.CreateElement("field");
+			field.SetAttribute("name", "OP");
+			field.AppendChild(Document.CreateTextNode("AND"));
+			block2.AppendChild(field);
+
+			var value = Document.CreateElement("value");
+			value.SetAttribute("name", "A");
+			block2.AppendChild(value);
+
+			var a = CompareNum(width, pos, "GTE", min);
+			value.AppendChild(a);
+
+			value = Document.CreateElement("value");
+			value.SetAttribute("name", "B");
+			block2.AppendChild(value);
+
+			var b = CompareNum(width, pos, "LTE", max);
+			value.AppendChild(b);
+
+			return block2;
+		}
+
+		private Element CompareNum(string width, int pos, string OP, long num)
+		{
+			var block3 = Document.CreateElement("block");
+			block3.SetAttribute("type", LogicCompareBlock.type_name);
+
+			var field = Document.CreateElement("field");
+			field.SetAttribute("name", "OP");
+			field.AppendChild(Document.CreateTextNode(OP));
+			block3.AppendChild(field);
+
+			var value = Document.CreateElement("value");
+			value.SetAttribute("name", "A");
+			block3.AppendChild(value);
+
+			var block4 = CreateReceivedData(width, pos);
+			value.AppendChild(block4);
+
+			value = Document.CreateElement("value");
+			value.SetAttribute("name", "B");
+			block3.AppendChild(value);
+
+			block4 = Document.CreateElement("block");
+			block4.SetAttribute("type", MathNumberBlock.type_name);
+			value.AppendChild(block4);
+
+			field = Document.CreateElement("field");
+			field.SetAttribute("name", "NUM");
+			field.AppendChild(Document.CreateTextNode(num.ToString()));
+			block4.AppendChild(field);
+
+			return block3;
+		}
+
+		public void OpenModifyView(Action<bool> callback)
+		{
+			if (this.callback != null)
+				return;
+			this.callback = callback;
+
+			Views.EObjectModalView.SetEObject(eobject, GetImageUrl());
+			Views.EObjectModalView.Closed += EObjectModalView_Closed;
+			Views.EObjectModalView.Render();
+		}
+
+		private void EObjectModalView_Closed(EObjectModalView view, bool ok)
+		{
+			view.Closed -= EObjectModalView_Closed;
+
+			if (ok) {
+				View.Identifier = eobject.identifier;
+				View.ReloadToolbox(this);
+				UpdateInitialBlock();
+			}
+
+			callback?.Invoke(ok);
+			callback = null;
+		}
+
+		public string Template(string template)
+		{
+			template = template.Replace("%identifier%", eobject.identifier);
+			template = template.Replace("%attribute%", "EOBJ: " + eobject.type.classGroup.classGroupCode.ToString("X2") + eobject.type.classCode.ToString("X2") + eobject.instanceCode.ToString("X2")
+				+ "<br>区分: " + eobject.attribute);
+			template = template.Replace("%img%", GetImageUrl());
+			return template;
+		}
+
+		internal void OnBlockCreated(object sender, Create cre)
+		{
+			var block = workspace.getBlockById(cre.blockId);
+
+			if (block.type == ENodeInitializeBlock.type_name) {
+				var nodeBlock = (ENodeInitializeBlock)block;
+				nodeBlock.OnCreate(this, cre);
+			}
+			else if (block.type == EObjectInitializeBlock.type_name) {
+				var objectBlock = (EObjectInitializeBlock)block;
+				objectBlock.OnCreate(this, cre);
+			}
+			else if (block.type == EPropertyVarLenBlock.type_name) {
+				var propertyBlock = (EPropertyVarLenBlock)block;
+				propertyBlock.OnCreate(this, cre);
+			}
+			else if (block.type == EPropertyFixLenBlock.type_name) {
+				var propertyBlock = (EPropertyFixLenBlock)block;
+				propertyBlock.OnCreate(this, cre);
+			}
+		}
+
+		internal void OnBlockDeleted(object sender, Delete del)
+		{
+			var block = workspace.getBlockById(del.blockId);
+
+			if (block != null) {
+				if (block.type == ENodeInitializeBlock.type_name) {
+					var nodeBlock = (ENodeInitializeBlock)block;
+					nodeBlock.OnDelete(this, del);
+				}
+				else if (block.type == EObjectInitializeBlock.type_name) {
+					var objectBlock = (EObjectInitializeBlock)block;
+					objectBlock.OnDelete(this, del);
+				}
+				else if (block.type == EPropertyVarLenBlock.type_name) {
+					var propertyBlock = (EPropertyVarLenBlock)block;
+					propertyBlock.OnDelete(this, del);
+				}
+				else if (block.type == EPropertyFixLenBlock.type_name) {
+					var propertyBlock = (EPropertyFixLenBlock)block;
+					propertyBlock.OnDelete(this, del);
+				}
+			}
+		}
+
+		internal void OnBlockChanged(object sender, Change chg)
+		{
+			var block = workspace.getBlockById(chg.blockId);
+
+			if (block.type == ENodeInitializeBlock.type_name) {
+				var nodeBlock = (ENodeInitializeBlock)block;
+				nodeBlock.OnChange(this, chg);
+			}
+			else if (block.type == EObjectInitializeBlock.type_name) {
+				var objectBlock = (EObjectInitializeBlock)block;
+				objectBlock.OnChange(this, chg);
+			}
+			else if (block.type == EPropertyVarLenBlock.type_name) {
+				var propertyBlock = (EPropertyVarLenBlock)block;
+				propertyBlock.OnChange(this, chg);
+			}
+			else if (block.type == EPropertyFixLenBlock.type_name) {
+				var propertyBlock = (EPropertyFixLenBlock)block;
+				propertyBlock.OnChange(this, chg);
+			}
+		}
+
+		internal void OnBlockMoveed(object sender, Move mov)
+		{
+			var block = workspace.getBlockById(mov.blockId);
+
+			if (block != null) {
+				if (block.type == ENodeInitializeBlock.type_name) {
+					var nodeBlock = (ENodeInitializeBlock)block;
+					nodeBlock.OnMove(this, mov);
+				}
+				else if (block.type == EObjectInitializeBlock.type_name) {
+					var objectBlock = (EObjectInitializeBlock)block;
+					objectBlock.OnMove(this, mov);
+				}
+				else if (block.type == EPropertyVarLenBlock.type_name) {
+					var propertyBlock = (EPropertyVarLenBlock)block;
+					propertyBlock.OnMove(this, mov);
+				}
+				else if (block.type == EPropertyFixLenBlock.type_name) {
+					var propertyBlock = (EPropertyFixLenBlock)block;
+					propertyBlock.OnMove(this, mov);
+				}
+			}
+		}
+	}
+
+	internal class ENodeWorkspace : EObjectWorkspace
+	{
+		public JsonNodeInfo enode { get { return (JsonNodeInfo)eobject; } }
+
+		public ENodeWorkspace(BlocklyView view, JsonNodeInfo enode)
+			: base(view, enode)
+		{
+		}
+
+		public override string GetImageUrl()
+		{
+			return "img/no_image.png";
+		}
+
+		public override bool IsPreset()
+		{
+			return true;
+		}
+
+		public override string ToCode(string filename)
+		{
+			if (eobject == null)
+				return "";
+
+			_RubyCode = new Ruby(filename);
+			_RubyCode.init(Workspace);
+			var result = _RubyCode.defineENode((JsonNodeInfo)eobject, Workspace);
+			View.Changed = false;
+			return result;
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/EcnlAPIBlock.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/EcnlAPIBlock.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/EcnlAPIBlock.cs	(revision 270)
@@ -0,0 +1,1457 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Bridge;
+using Bridge.Html5;
+
+namespace WebMrbc
+{
+	public class EcnlPropertyAttributeBlock : Block
+	{
+		public const string type_name = "property_attribute";
+
+		public EcnlPropertyAttributeBlock()
+			: base(type_name)
+		{
+
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("プロパティ属性")
+				.appendField(new FieldDropdown(new [] {
+					new [] {"未設定", "EPC_NONE"},
+					new [] {"設定可", "EPC_RULE_SET"},
+					new [] {"取得可", "EPC_RULE_GET"},
+					new [] {"通知有り", "EPC_RULE_ANNO"},
+					new [] {"状態変化時通知", "EPC_ANNOUNCE"},
+					new [] {"可変長データ", "EPC_VARIABLE"}
+				}), "VALUE");
+			this.setOutput(true, "Number");
+			this.setColour(230);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class EcnlServiceCodeBlock : Block
+	{
+		public const string type_name = "service_code";
+
+		public EcnlServiceCodeBlock()
+			: base(type_name)
+		{
+
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("サービスコード")
+				.appendField(new FieldDropdown(new [] {
+					new [] {"プロパティ値書き込み要求（応答不要）", "ESV_SET_I"},
+					new [] {"プロパティ値書き込み要求（応答要）", "ESV_SET_C"},
+					new [] {"プロパティ値読み出し要求", "ESV_GET"},
+					new [] {"プロパティ値通知要求", "ESV_INF_REQ"},
+					new [] {"プロパティ値書き込み・読み出し要求", "ESV_SET_GET"},
+					new [] {"プロパティ値書き込み応答", "ESV_SET_RES"},
+					new [] {"プロパティ値読み出し応答", "ESV_GET_RES"},
+					new [] {"プロパティ値通知", "ESV_INF"},
+					new [] {"プロパティ値通知（応答要）", "ESV_INFC"},
+					new [] {"プロパティ値通知応答", "ESV_INFC_RES"},
+					new [] {"プロパティ値書き込み・読み出し応答", "ESV_SET_GET_RES"},
+					new [] {"プロパティ値書き込み要求不可応答", "ESV_SET_I_SNA"},
+					new [] {"プロパティ値書き込み要求不可応答", "ESV_SET_C_SNA"},
+					new [] {"プロパティ値読み出し不可応答", "ESV_GET_SNA"},
+					new [] {"プロパティ値通知不可応答", "ESV_INF_SNA"},
+					new [] {"プロパティ値書き込み・読み出し不可応答", "ESV_SET_GET_SNA"}
+				}), "VALUE");
+			this.setOutput(true, "Number");
+			this.setColour(230);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class EcnlNodeIDBlock : Block
+	{
+		public const string type_name = "node_id";
+
+		public EcnlNodeIDBlock()
+			: base(type_name)
+		{
+
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("ノードID")
+				.appendField(new FieldDropdown(new [] {
+					new [] {"アドレスID登録なし", "ENOD_NOT_MATCH_ID"},
+					new [] {"マルチキャストアドレスID", "ENOD_MULTICAST_ID"},
+					new [] {"自ノードアドレスID", "ENOD_LOCAL_ID"},
+					new [] {"APIアドレスID", "ENOD_API_ID"},
+					new [] {"他ノードID", "ENOD_REMOTE_ID"},
+				}), "VALUE");
+			this.setOutput(true, "Number");
+			this.setColour(230);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+	}
+
+	public class EcnlPropertyLocalBlock : Block
+	{
+		public EcnlPropertyLocalBlock(string type)
+			: base(type)
+		{
+		}
+
+		public string GetInputName()
+		{
+			var match = false;
+			Block prev, block = this;
+			for (;;) {
+				prev = block;
+				block = prev.getParent();
+				if (block == null)
+					break;
+
+				if ((block.type == EPropertyVarLenBlock.type_name)
+					|| (block.type == EPropertyFixLenBlock.type_name)) {
+					match = true;
+					break;
+				}
+			}
+
+			if (!match)
+				return "";
+
+			for (var i = 0; i < block.inputList.Length; i++) {
+				var input = block.inputList[i];
+				if (input.connection == null)
+					continue;
+
+				var childBlock = input.connection.targetBlock();
+				if (childBlock != null && childBlock.id == prev.id) {
+					return input.name;
+				}
+			}
+
+			return "";
+		}
+	}
+
+	public class EcnlGetPropertyInfoBlock : EcnlPropertyLocalBlock
+	{
+		public const string type_name = "get_property_info";
+
+		public EcnlGetPropertyInfoBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("プロパティ")
+				.appendField(new FieldDropdown(new [] {
+					new [] {"コード", "pcd"},
+					new [] {"属性", "atr"},
+					new [] {"サイズ", "sz"}
+				}), "MEMBER");
+			this.setOutput(true, "Number");
+			this.setColour(230);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+
+		public void onchange(object ev)
+		{
+			if (!String.IsNullOrEmpty(GetInputName())) {
+				setWarningText(null);
+			}
+			else {
+				setWarningText("プロパティアクセスブロックのみで使用します");
+			}
+		}
+	}
+
+	public class EcnlSaveReceivedPropertyBlock : EcnlPropertyLocalBlock
+	{
+		public const string type_name = "save_received_property";
+
+		public EcnlSaveReceivedPropertyBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("受信プロパティを保存")
+				.appendField("", "ITEM");
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(230);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+
+		public void onchange(object ev)
+		{
+			if (!String.IsNullOrEmpty(GetInputName())) {
+				setWarningText(null);
+			}
+			else {
+				setWarningText("プロパティアクセスブロックのみで使用します");
+			}
+		}
+	}
+
+	public class EcnlGetSavedPropertyBlock : EcnlPropertyLocalBlock
+	{
+		public const string type_name = "get_saved_property";
+
+		public EcnlGetSavedPropertyBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("保存してあるプロパティ値")
+				.appendField("", "ITEM");
+			this.setOutput(true, "String");
+			this.setColour(230);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+
+		public void onchange(object ev)
+		{
+			if (!String.IsNullOrEmpty(GetInputName())) {
+				setWarningText(null);
+			}
+			else {
+				setWarningText("プロパティアクセスブロックのみで使用します");
+			}
+		}
+	}
+
+	public class EcnlSetAnnounceRequestBlock : EcnlPropertyLocalBlock
+	{
+		public const string type_name = "set_announce_request";
+
+		public EcnlSetAnnounceRequestBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendValueInput("DATA")
+				.setCheck("String")
+				.appendField("受信データと");
+			this.appendDummyInput()
+				.appendField("を比較し変化がある場合は通知要求");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(230);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+
+		public void onchange(object ev)
+		{
+			if (GetInputName() == "SET") {
+				setWarningText(null);
+			}
+			else {
+				setWarningText("プロパティ設定ブロックのみで使用します");
+			}
+		}
+	}
+
+	public class EcnlDataToNumberBlock : EcnlPropertyLocalBlock
+	{
+		public const string type_name = "data_to_number";
+
+		public EcnlDataToNumberBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendValueInput("POSITION")
+				.setCheck("Number")
+				.appendField("受信データの");
+			this.appendDummyInput()
+				.appendField("Byte目から")
+				.appendField(new FieldDropdown(new[] {
+					new [] { "1", "BYTE" },
+					new [] { "2", "SHORT" },
+					new [] { "4", "INT" }
+				}), "WIDTH")
+				.appendField("Byte分の数値");
+			this.setInputsInline(true);
+			this.setOutput(true, "Number");
+			this.setColour(230);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+
+		public void onchange(object ev)
+		{
+			if (GetInputName() == "SET") {
+				setWarningText(null);
+			}
+			else {
+				setWarningText("プロパティ設定ブロックのみで使用します");
+			}
+		}
+	}
+
+	public class EcnlNumberToDataBlock : EcnlPropertyLocalBlock
+	{
+		public const string type_name = "number_to_data";
+
+		public EcnlNumberToDataBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendValueInput("POSITION")
+				.setCheck("Number")
+				.appendField("送信データの");
+			this.appendDummyInput()
+				.appendField("Byte目から")
+				.appendField(new FieldDropdown(new[] {
+					new [] { "1", "BYTE" },
+					new [] { "2", "SHORT" },
+					new [] { "4", "INT" }
+				}), "WIDTH")
+				.appendField("Byte分に");
+			this.appendValueInput("VALUE")
+				.setCheck("Number");
+			this.appendDummyInput()
+				.appendField("を書き込み");
+			this.setInputsInline(true);
+			this.setPreviousStatement(true, null);
+			this.setNextStatement(true, null);
+			this.setColour(230);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+
+		public void onchange(object ev)
+		{
+			if (GetInputName() == "GET") {
+				setWarningText(null);
+			}
+			else {
+				setWarningText("プロパティ取得アクセスブロックのみで使用します");
+			}
+		}
+	}
+
+	public class EcnlNoOpBlock : EcnlPropertyLocalBlock
+	{
+		public const string type_name = "no_op";
+
+		public EcnlNoOpBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("処理無し");
+			this.setPreviousStatement(true, null);
+			this.setColour(230);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+
+		public void onchange(object ev)
+		{
+			if (!String.IsNullOrEmpty(GetInputName())) {
+				setWarningText(null);
+			}
+			else {
+				setWarningText("プロパティアクセスブロックのみで使用します");
+			}
+		}
+	}
+
+	public class EcnlReceivedDataBlock : EcnlPropertyLocalBlock
+	{
+		public const string type_name = "received_data";
+
+		public EcnlReceivedDataBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("受信データ");
+			this.setOutput(true, "String");
+			this.setColour(230);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+
+		public void onchange(object ev)
+		{
+			if (GetInputName() == "SET") {
+				setWarningText(null);
+			}
+			else {
+				setWarningText("プロパティ設定ブロックのみで使用します");
+			}
+		}
+	}
+
+	public class EcnlReceivedDataSizeBlock : EcnlPropertyLocalBlock
+	{
+		public const string type_name = "received_data_size";
+
+		public EcnlReceivedDataSizeBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("受信データサイズ");
+			this.setOutput(true, "Number");
+			this.setColour(230);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+
+		public void onchange(object ev)
+		{
+			if (!String.IsNullOrEmpty(GetInputName())) {
+				setWarningText(null);
+			}
+			else {
+				setWarningText("プロパティアクセスブロックのみで使用します");
+			}
+		}
+	}
+
+	public class DataJoinBlock : Block
+	{
+		public const string type_name = "data_join";
+		internal int itemCount_;
+
+		public DataJoinBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.itemCount_ = 2;
+			this.updateShape_();
+			this.setOutput(true, "String");
+			this.setMutator(new Mutator(new[] { DataCreateJoinItemBlock.type_name }));
+			this.setColour(230);
+			this.setTooltip("");
+			this.setHelpUrl("http://www.example.com/");
+		}
+
+		public Element mutationToDom()
+		{
+			var container = Document.CreateElement("mutation");
+			container.SetAttribute("items", this.itemCount_.ToString());
+			return container;
+		}
+
+		public void domToMutation(Element xmlElement)
+		{
+			var count = xmlElement.GetAttribute("items");
+			this.itemCount_ = count == null ? 0 : Script.ParseInt(count, 10);
+			this.updateShape_();
+		}
+
+		public Block decompose(Workspace workspace)
+		{
+			var containerBlock = workspace.newBlock(DataCreateJoinContainerBlock.type_name);
+			containerBlock.initSvg();
+			var connection = containerBlock.getInput("STACK").connection;
+			for (var i = 0; i < this.itemCount_; i++) {
+				var itemBlock = workspace.newBlock(DataCreateJoinItemBlock.type_name);
+				itemBlock.initSvg();
+				connection.connect(itemBlock.previousConnection);
+				connection = itemBlock.nextConnection;
+			}
+			return containerBlock;
+		}
+
+		public void compose(Block containerBlock)
+		{
+			var itemBlock = (DataCreateJoinItemBlock)containerBlock.getInputTargetBlock("STACK");
+			var connections = new Connection[0];
+			while (itemBlock != null) {
+				connections.Push(itemBlock.valueConnection_);
+				itemBlock = (itemBlock.nextConnection != null) ?
+					(DataCreateJoinItemBlock)itemBlock.nextConnection.targetBlock() : null;
+			}
+			for (var i = 0; i < this.itemCount_; i++) {
+				var connection = this.getInput("ADD" + i).connection.targetConnection;
+				if (connection != null && Array.IndexOf(connections, connection) == -1) {
+					connection.disconnect();
+				}
+			}
+			this.itemCount_ = connections.Length;
+			this.updateShape_();
+			for (var i = 0; i < this.itemCount_; i++) {
+				Mutator.reconnect(connections[i], this, "ADD" + i);
+			}
+		}
+
+		public void saveConnections(Block containerBlock)
+		{
+			var itemBlock = (DataCreateJoinItemBlock)containerBlock.getInputTargetBlock("STACK");
+			var i = 0;
+			while (itemBlock != null) {
+				var input = this.getInput("ADD" + i);
+				itemBlock.valueConnection_ = (input != null) ?
+					input.connection.targetConnection : null;
+				i++;
+				itemBlock = (itemBlock.nextConnection != null) ?
+					(DataCreateJoinItemBlock)itemBlock.nextConnection.targetBlock() : null;
+			}
+		}
+
+		private void updateShape_()
+		{
+			if (this.itemCount_ != 0 && this.getInput("EMPTY") != null) {
+				this.removeInput("EMPTY");
+			}
+			else if (this.itemCount_ == 0 && this.getInput("EMPTY") == null) {
+				this.appendDummyInput("EMPTY")
+					.appendField("空のデータを作ります");
+			}
+			int i;
+			for (i = 0; i < this.itemCount_; i++) {
+				if (this.getInput("ADD" + i) == null) {
+					var input = this.appendValueInput("ADD" + i);
+					if (i == 0) {
+						input.appendField("データを作ります");
+					}
+				}
+			}
+			while (this.getInput("ADD" + i) != null) {
+				this.removeInput("ADD" + i);
+				i++;
+			}
+		}
+	}
+
+	public class DataCreateJoinContainerBlock : Block
+	{
+		public const string type_name = "data_create_join_container";
+
+		public DataCreateJoinContainerBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("結合");
+			this.appendStatementInput("STACK");
+			this.setColour(230);
+			this.setTooltip("");
+			this.contextMenu = false;
+		}
+	}
+
+	[IgnoreCast]
+	public class DataCreateJoinItemBlock : Block
+	{
+		public const string type_name = "data_create_join_item";
+		public Connection valueConnection_;
+
+		public DataCreateJoinItemBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.appendDummyInput()
+				.appendField("項目");
+			this.setPreviousStatement(true);
+			this.setNextStatement(true);
+			this.setColour(230);
+			this.setTooltip("");
+			this.contextMenu = false;
+		}
+	}
+
+
+	public class CreateEsvGetBlock : Block
+	{
+		public const string type_name = "create_esv_get";
+
+		public CreateEsvGetBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1 電文の作成 %2 プロパティコード %3",
+				args0 = new object[] {
+					new {
+						type = "field_dropdown",
+						name = "TYPE",
+						options = new [] {
+							new [] { "読み出し要求", "esv_get" },
+							new [] { "通知要求", "esv_inf_req" }
+						}
+					},
+					new {
+						type = "input_dummy"
+					},
+					new {
+						type = "input_value",
+						name = "EPC",
+						check = "Number",
+						align = "RIGHT"
+					}
+				},
+				output = "EData",
+				colour = 230,
+				tooltip = "",
+				helpUrl = "http://www.example.com/"
+			});
+		}
+	}
+
+	public class CreateEsvSetBlock : Block
+	{
+		public const string type_name = "create_esv_set";
+
+		public CreateEsvSetBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1 電文の作成 %2 プロパティコード %3 プロパティ値 %4",
+				args0 = new object[] {
+					new {
+						type = "field_dropdown",
+						name = "TYPE",
+						options = new [] {
+							new [] { "書き込み要求（応答不要）", "esv_set_i" },
+							new [] { "書き込み要求（応答要）", "esv_set_c" },
+							new [] { "書き込み・読み出し要求", "esv_set_get" },
+							new [] { "通知（応答要）", "esv_infc" }
+						}
+					},
+					new {
+						type = "input_dummy"
+					},
+					new {
+						type = "input_value",
+						name = "EPC",
+						check = "Number",
+						align = "RIGHT"
+					},
+					new {
+						type = "input_value",
+						name = "EDT",
+						check = "String",
+						align = "RIGHT"
+					}
+				},
+				output = "EData",
+				colour = 230,
+				tooltip = "",
+				helpUrl = "http://www.example.com/"
+			});
+		}
+	}
+
+	public class EsvAddEdtBlock : Block
+	{
+		public const string type_name = "esv_add_edt";
+
+		public EsvAddEdtBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1 に %2 %3 として %4 %5 を追加",
+				args0 = new object[] {
+					new {
+						type = "field_variable",
+						name = "ESV",
+						variable = "item"
+					},
+					new {
+						type = "input_dummy"
+					},
+					new {
+						type = "input_value",
+						name = "EPC",
+						check = "Number"
+					},
+					new {
+						type = "input_dummy"
+					},
+					new {
+						type = "input_value",
+						name = "EDT",
+						check = "String"
+					}
+				},
+				previousStatement = (Union<string, string[]>)null,
+				nextStatement = (Union<string, string[]>)null,
+				colour = 230,
+				tooltip = "",
+				helpUrl = "http://www.example.com/"
+			});
+		}
+	}
+
+	public class EsvAddEpcBlock : Block
+	{
+		public const string type_name = "esv_add_epc";
+
+		public EsvAddEpcBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1 に %2 %3 を追加",
+				args0 = new object[] {
+					new {
+						type = "field_variable",
+						name = "ESV",
+						variable = "item"
+					},
+					new {
+						type = "input_dummy"
+					},
+					new {
+						type = "input_value",
+						name = "EPC",
+						check = "Number"
+					}
+				},
+				previousStatement = (Union<string, string[]>)null,
+				nextStatement = (Union<string, string[]>)null,
+				colour = 230,
+				tooltip = "",
+				helpUrl = "http://www.example.com/"
+			});
+		}
+	}
+
+	public class SendEsvBlock : Block
+	{
+		public const string type_name = "send_esv";
+
+		public SendEsvBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1 を送信",
+				args0 = new object[] {
+					new {
+						type = "field_variable",
+						name = "ESV",
+						variable = "item"
+					}
+				},
+				previousStatement = (Union<string, string[]>)null,
+				nextStatement = (Union<string, string[]>)null,
+				colour = 230,
+				tooltip = "",
+				helpUrl = "http://www.example.com/"
+			});
+		}
+	}
+
+	public class ReleaseEsvBlock : Block
+	{
+		public const string type_name = "release_esv";
+
+		public ReleaseEsvBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1 を破棄",
+				args0 = new object[] {
+					new {
+						type = "field_variable",
+						name = "ESV",
+						variable = "item"
+					}
+				},
+				previousStatement = (Union<string, string[]>)null,
+				nextStatement = (Union<string, string[]>)null,
+				colour = 230,
+				tooltip = "",
+				helpUrl = "http://www.example.com/"
+			});
+		}
+	}
+
+	public class NotifyInitialEsvBlock : Block
+	{
+		public const string type_name = "notify_initial_esv";
+
+		public NotifyInitialEsvBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "インスタンスリスト通知の送信",
+				previousStatement = (Union<string, string[]>)null,
+				nextStatement = (Union<string, string[]>)null,
+				colour = 230,
+				tooltip = "",
+				helpUrl = "http://www.example.com/"
+			});
+		}
+	}
+
+	public class EsvGetEsvBlock : Block
+	{
+		public const string type_name = "esv_get_esv";
+
+		public EsvGetEsvBlock()
+			: base(type_name)
+		{
+		}
+
+
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1 のサービスコード",
+				args0 = new object[] {
+					new {
+						type = "field_variable",
+						name = "ESV",
+						variable = "item"
+					}
+				},
+				output = "Number",
+				colour = 230,
+				tooltip = "",
+				helpUrl = "http://www.example.com/"
+			});
+		}
+	}
+
+	public class EsvIterateBlock : Block
+	{
+		public const string type_name = "esv_iterate";
+
+		public EsvIterateBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1 にある要素で繰り返し %2 %3",
+				args0 = new object[] {
+					new {
+						type = "field_variable",
+						name = "ESV",
+						variable = "item"
+					},
+					new {
+						type = "input_dummy"
+					},
+					new {
+						type = "input_statement",
+						name = "DO"
+					}
+				},
+				previousStatement = (Union<string, string[]>)null,
+				nextStatement = (Union<string, string[]>)null,
+				colour = 230,
+				tooltip = "",
+				helpUrl = "http://www.example.com/"
+			});
+		}
+	}
+
+	public class EsvIteratorBlock : Block
+	{
+		public const string type_name = "esv_iterator";
+
+		public EsvIteratorBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1",
+				args0 = new object[] {
+					new {
+						type = "field_dropdown",
+						name = "ITEM",
+						options = new [] {
+							new [] { "プロパティコード", "epc" },
+							new [] { "プロパティ値", "edt" },
+							new [] { "要素の番号", "state" }
+						}
+					}
+				},
+				output = "Number",
+				colour = 230,
+				tooltip = "",
+				helpUrl = "http://www.example.com/"
+			});
+		}
+	}
+
+	public class SvctaskSetTimerBlock : Block
+	{
+		public const string type_name = "svctask_set_timer";
+
+		public SvctaskSetTimerBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1 %2 のタイマーを %3 [ms]に設定",
+				args0 = new object[] {
+					new {
+						type = "field_variable",
+						name = "SVC",
+						variable = "item"
+					},
+					new {
+						type = "input_dummy"
+					},
+					new {
+						type = "input_value",
+						name = "TIMER",
+						check = "Number"
+					}
+				},
+				colour = 230,
+				tooltip = "",
+				helpUrl = "http://www.example.com/"
+			});
+		}
+	}
+
+	public class SvctaskTimerBlock : Block
+	{
+		public const string type_name = "svctask_timer";
+
+		public SvctaskTimerBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1 のタイマー値",
+				args0 = new object[] {
+					new {
+						type = "field_variable",
+						name = "SVC",
+						variable = "item"
+					}
+				},
+				output = "Number",
+				colour = 230,
+				tooltip = "",
+				helpUrl = "http://www.example.com/"
+			});
+		}
+	}
+
+	public class SvctaskProgressBlock : Block
+	{
+		public const string type_name = "svctask_progress";
+
+		public SvctaskProgressBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1 %2 の時間を %3 [ms]経過させる",
+				args0 = new object[] {
+					new {
+						type = "field_variable",
+						name = "SVC",
+						variable = "item"
+					},
+					new {
+						type = "input_dummy"
+					},
+					new {
+						type = "input_value",
+						name = "ELAPSE",
+						check = "Number"
+					}
+				},
+				previousStatement = (Union<string, string[]>)null,
+				nextStatement = (Union<string, string[]>)null,
+				colour = 230,
+				tooltip = "",
+				helpUrl = "http://www.example.com/"
+			});
+		}
+	}
+
+	public class SvctaskRecvMsgBlock : Block
+	{
+		public const string type_name = "svctask_recv_msg";
+
+		public SvctaskRecvMsgBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1 に %2 通信端点 %3 からの %4 データ %5 を渡す",
+				args0 = new object[] {
+					new {
+						type = "field_variable",
+						name = "SVC",
+						variable = "item"
+					},
+					new {
+						type = "input_dummy"
+					},
+					new {
+						type = "input_value",
+						name = "ENDPOINT",
+						check = "String"
+					},
+					new {
+						type = "input_dummy"
+					},
+					new {
+						type = "input_value",
+						name = "DATA",
+						check = "String"
+					}
+				},
+				previousStatement = (Union<string, string[]>)null,
+				nextStatement = (Union<string, string[]>)null,
+				colour = 230,
+				tooltip = "",
+				helpUrl = "http://www.example.com/"
+			});
+		}
+	}
+
+	public class SvctaskCallTimeoutBlock : Block
+	{
+		public const string type_name = "svctask_call_timeout";
+
+		public SvctaskCallTimeoutBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1 のタイムアウト処理を行う",
+				args0 = new object[] {
+					new {
+						type = "field_variable",
+						name = "SVC",
+						variable = "item"
+					}
+				},
+				previousStatement = (Union<string, string[]>)null,
+				nextStatement = (Union<string, string[]>)null,
+				colour = 230,
+				tooltip = "",
+				helpUrl = "http://www.example.com/"
+			});
+		}
+	}
+
+	public class SvctaskIsMatchBlock : Block
+	{
+		public const string type_name = "svctask_is_match";
+
+		public SvctaskIsMatchBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			this.jsonInit(new {
+				message0 = "%1 で %2 ノード %3 は %4 通信端点 %5 と %6 電文 %7 に対応している",
+				args0 = new object[] {
+					new {
+						type = "field_variable",
+						name = "SVC",
+						variable = "item"
+					},
+					new {
+						type = "input_dummy"
+					},
+					new {
+						type = "input_value",
+						name = "NODE",
+						check = "EObject"
+					},
+					new {
+						type = "input_dummy"
+					},
+					new {
+						type = "input_value",
+						name = "ENDPOINT",
+						check = "String"
+					},
+					new {
+						type = "input_dummy"
+					},
+					new {
+						type = "input_value",
+						name = "EDTAT",
+						check = "String"
+					}
+				},
+				output = "Boolean",
+				colour = 230,
+				tooltip = "",
+				helpUrl = "http://www.example.com/"
+			});
+		}
+	}
+
+	partial class Ruby
+	{
+		public node property_attribute(EcnlPropertyAttributeBlock block)
+		{
+			var value = block.getFieldValue("VALUE");
+			var ecnl = new const_node(this, intern("ECNL"));
+			return new colon2_node(this, ecnl, intern(value));
+		}
+
+		public node service_code(EcnlServiceCodeBlock block)
+		{
+			var value = block.getFieldValue("VALUE");
+			var ecnl = new const_node(this, intern("ECNL"));
+			return new colon2_node(this, ecnl, intern(value));
+		}
+
+		public node node_id(EcnlNodeIDBlock block)
+		{
+			var value = block.getFieldValue("VALUE");
+			var ecnl = new const_node(this, intern("ECNL"));
+			return new colon2_node(this, ecnl, intern(value));
+		}
+
+		public node get_property_info(EcnlGetPropertyInfoBlock block)
+		{
+			var member = block.getFieldValue("MEMBER");
+			var prop = new lvar_node(this, local_add_f("prop"));
+			return new call_node(this, prop, intern(member));
+		}
+
+		public node save_received_property(EcnlSaveReceivedPropertyBlock block)
+		{
+			var src = new lvar_node(this, local_add_f("src"));
+			var prop = new lvar_node(this, local_add_f("prop"));
+			return new call_node(this, prop, intern("set_exinf"), new node[] { src });
+		}
+
+		public node get_saved_property(EcnlGetSavedPropertyBlock block)
+		{
+			var prop = new lvar_node(this, local_add_f("prop"));
+			return new call_node(this, prop, intern("exinf"));
+		}
+
+		public node set_announce_request(EcnlSetAnnounceRequestBlock block)
+		{
+			// if (prop.anno)
+			//   prop.set_anno(data != src)
+			// end
+			var prop = new lvar_node(this, local_add_f("prop"));
+			var cond = new call_node(this, prop, intern("anno"));
+			var data = valueToCode(block, "DATA");
+			var src = new lvar_node(this, local_add_f("src"));
+			var arg = new call_node(this, data, intern("!="), src);
+			var then = new call_node(this, prop, intern("set_exinf"), new node[] { arg });
+			return new if_node(this, cond, then, null, false);
+		}
+
+		public node data_to_number(EcnlDataToNumberBlock block)
+		{
+			var value_position = valueToCode(block, "POSITION");
+			var dropdown_width = block.getFieldValue("WIDTH");
+			var src = new lvar_node(this, local_add_f("src"));
+
+			switch (dropdown_width) {
+			case "BYTE":
+				return new call_node(this, src, intern("getbyte"), new node[] { value_position });
+			case "SHORT":
+				return new fcall_node(this, intern("ecnl_getshort"), new node[] { src, value_position });
+			case "INT":
+				return new fcall_node(this, intern("ecnl_getint"), new node[] { src, value_position });
+			}
+
+			throw new NotImplementedException();
+		}
+
+		public node number_to_data(EcnlNumberToDataBlock block)
+		{
+			var value_position = valueToCode(block, "POSITION");
+			var dropdown_width = block.getFieldValue("WIDTH");
+			var value_value = valueToCode(block, "VALUE");
+			var src = new lvar_node(this, local_add_f("src"));
+
+			switch (dropdown_width) {
+			case "BYTE":
+				return new call_node(this, src, intern("setbyte"), new node[] { value_position, value_value });
+			case "SHORT":
+				return new fcall_node(this, intern("ecnl_setshort"), new node[] { src, value_position, value_value });
+			case "INT":
+				return new fcall_node(this, intern("ecnl_setint"), new node[] { src, value_position, value_value });
+			}
+
+			throw new NotImplementedException();
+		}
+
+		public node no_op(EcnlNoOpBlock block)
+		{
+			switch (block.GetInputName()) {
+			case "SET":
+				return new return_node(this, new int_node(this, 0));
+			case "GET":
+				return new return_node(this, new str_node(this, ""));
+			}
+			return new return_node(this, null);
+		}
+
+		public node received_data(EcnlReceivedDataBlock block)
+		{
+			return new lvar_node(this, local_add_f("src"));
+		}
+
+		public node received_data_size(EcnlReceivedDataSizeBlock block)
+		{
+			switch (block.GetInputName()) {
+			case "SET":
+			case "SET_RET":
+				var src = new lvar_node(this, local_add_f("src"));
+				return new call_node(this, src, intern("bytesize"));
+			case "GET":
+				return new lvar_node(this, local_add_f("size"));
+			}
+			return new int_node(this, 0);
+		}
+
+		public node data_join(DataJoinBlock block)
+		{
+			if (block.itemCount_ == 0) {
+				return new str_node(this, "");
+			}
+			else if (block.itemCount_ == 1) {
+				var argument0 = valueToCode(block, "ADD0");
+				if (argument0 == null) argument0 = new str_node(this, "");
+				return new call_node(this, argument0, intern("chr"));
+			}
+			else if (block.itemCount_ == 2) {
+				var argument0 = valueToCode(block, "ADD0");
+				if (argument0 == null) argument0 = new str_node(this, "");
+				argument0 = new call_node(this, argument0, intern("chr"));
+				var argument1 = valueToCode(block, "ADD1");
+				if (argument1 == null) argument1 = new str_node(this, "");
+				argument1 = new call_node(this, argument1, intern("chr"));
+				return new call_node(this, argument0, intern("+"), new node[] { argument1 });
+			}
+			else {
+				var codes = valueToCode(block, "ADD0");
+				var argument0 = codes;
+				if (argument0 == null) argument0 = new str_node(this, "");
+				argument0 = new call_node(this, argument0, intern("chr"));
+				for (var n = 1; n < block.itemCount_; n++) {
+					var argument1 = valueToCode(block, "ADD" + n);
+					if (argument1 == null) argument1 = new str_node(this, "");
+					argument1 = new call_node(this, argument1, intern("chr"));
+					argument0 = new call_node(this, argument0, intern("+"), new node[] { argument1 });
+				}
+				return codes;
+			}
+		}
+
+		public node create_esv_get(CreateEsvGetBlock block)
+		{
+			var dropdown_type = block.getFieldValue("TYPE");
+			var value_epc = valueToCode(block, "EPC");
+			var nil = new nil_node(this);
+			// nilにはリモートノードを指定できる
+			return new fcall_node(this, intern(dropdown_type), new node[] { nil, value_epc });
+		}
+
+		public node create_esv_set(CreateEsvSetBlock block)
+		{
+			var dropdown_type = block.getFieldValue("TYPE");
+			var value_epc = valueToCode(block, "EPC");
+			var value_edt = valueToCode(block, "EDT");
+			var nil = new nil_node(this);
+			// nilにはリモートノードを指定できる
+			return new fcall_node(this, intern(dropdown_type), new node[] { nil, value_epc, value_edt });
+		}
+
+		public node esv_add_edt(EsvAddEdtBlock block)
+		{
+			var variable_esv = new_var_node(get_var_name(block.getFieldValue("ESV")));
+			var value_epc = valueToCode(block, "EPC");
+			var value_edt = valueToCode(block, "EDT");
+			return new call_node(this, variable_esv, intern("add_edt"), new node[] { value_epc, value_edt });
+		}
+
+		public node esv_add_epc(EsvAddEpcBlock block)
+		{
+			var variable_esv = new_var_node(get_var_name(block.getFieldValue("ESV")));
+			var value_epc = valueToCode(block, "EPC");
+			return new call_node(this, variable_esv, intern("add_epc"), new node[] { value_epc });
+		}
+
+		public node send_esv(SendEsvBlock block)
+		{
+			var variable_esv = new_var_node(get_var_name(block.getFieldValue("ESV")));
+			return new fcall_node(this, intern("snd_esv"), new node[] { variable_esv });
+		}
+
+		public node release_esv(ReleaseEsvBlock block)
+		{
+			var variable_esv = new_var_node(get_var_name(block.getFieldValue("ESV")));
+			return new fcall_node(this, intern("rel_esv"), new node[] { variable_esv });
+		}
+
+		public node notify_initial_esv(NotifyInitialEsvBlock block)
+		{
+			return new fcall_node(this, intern("ntf_inl"));
+		}
+
+		public node esv_get_esv(EsvGetEsvBlock block)
+		{
+			var variable_esv = new_var_node(get_var_name(block.getFieldValue("ESV")));
+			return new call_node(this, variable_esv, intern("esv"));
+		}
+
+		public node esv_iterate(EsvIterateBlock block)
+		{
+			var variable_esv = new_var_node(get_var_name(block.getFieldValue("ESV")));
+			local_nest();
+			var statements_do = statementToCode(block, "DO");
+			var itr = new arg_node(this, local_add_f("itr"));
+			var proc = new block_node(this, new node[] { itr }, statements_do, false);
+			local_unnest();
+			return new fcall_node(this, intern("ecnl_esv_iterate"), new node[] { variable_esv }, proc);
+		}
+
+		public node esv_iterator(EsvIteratorBlock block)
+		{
+			var dropdown_item = block.getFieldValue("ITEM");
+			var itr = new lvar_node(this, local_add_f("itr"));
+			return new call_node(this, itr, intern(dropdown_item));
+		}
+
+		public node svctask_set_timer(SvctaskSetTimerBlock block)
+		{
+			var variable_svc = new_var_node(get_var_name(block.getFieldValue("SVC")));
+			var value_timer = valueToCode(block, "TIMER");
+			return new call_node(this, variable_svc, intern("set_timer"), new node[] { value_timer });
+		}
+
+		public node svctask_timer(SvctaskTimerBlock block)
+		{
+			var variable_svc = new_var_node(get_var_name(block.getFieldValue("SVC")));
+			return new call_node(this, variable_svc, intern("timer"));
+		}
+
+		public node svctask_progress(SvctaskProgressBlock block)
+		{
+			var variable_svc = new_var_node(get_var_name(block.getFieldValue("SVC")));
+			var value_elapse = valueToCode(block, "ELAPSE");
+			return new call_node(this, variable_svc, intern("progress"), new node[] { value_elapse });
+		}
+
+		public node svctask_recv_msg(SvctaskRecvMsgBlock block)
+		{
+			var variable_svc = new_var_node(get_var_name(block.getFieldValue("SVC")));
+			var value_endpoint = valueToCode(block, "ENDPOINT");
+			var value_data = valueToCode(block, "DATA");
+			return new call_node(this, variable_svc, intern("recv_msg"), new node[] { value_endpoint, value_data });
+		}
+
+		public node svctask_call_timeout(SvctaskCallTimeoutBlock block)
+		{
+			var variable_svc = new_var_node(get_var_name(block.getFieldValue("SVC")));
+			return new call_node(this, variable_svc, intern("call_timeout"));
+		}
+
+		public node svctask_is_match(SvctaskIsMatchBlock block)
+		{
+			var value_node = valueToCode(block, "NODE");
+			var value_edtat = valueToCode(block, "EDTAT");
+			var value_endpoint = valueToCode(block, "ENDPOINT");
+			return new fcall_node(this, intern("is_match"), new node[] { value_node, value_edtat, value_endpoint });
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/EcnlTaskBlock.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/EcnlTaskBlock.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/EcnlTaskBlock.cs	(revision 270)
@@ -0,0 +1,376 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Bridge;
+using Bridge.Html5;
+using Bridge.jQuery2;
+
+namespace WebMrbc
+{
+	internal class EcnlTaskWorkspace : IClassWorkspace
+	{
+		BlocklyView view;
+		internal Workspace workspace;
+		private Ruby _RubyCode;
+
+		public string Identifier { get { return view.Identifier; } }
+		public Workspace Workspace { get { return workspace; } }
+		public BlocklyView View { get { return view; } }
+		public Ruby RubyCode { get { return _RubyCode; } }
+
+		public EcnlTaskWorkspace(BlocklyView view)
+		{
+			this.view = view;
+			workspace = view.Init();
+		}
+
+		public string GetImageUrl()
+		{
+			return "img/no_image.png";
+		}
+
+		public bool IsPreset()
+		{
+			return true;
+		}
+
+		public string ToCode(string filename)
+		{
+			if (Collections.LocalNode == null)
+				return "";
+
+			_RubyCode = new Ruby(filename);
+			var enode = Collections.LocalNode.enode;
+			var objects = new JsonObjectInfo[0];
+			foreach (var item in Collections.ClassWorkspaces) {
+				var obj = item as EObjectWorkspace;
+				if ((obj == null) || (obj == Collections.LocalNode))
+					continue;
+
+				objects.Push(obj.eobject);
+			}
+			enode.objects = objects;
+			var result = _RubyCode.defineEcnlTask(this, enode);
+			view.Changed = false;
+			return result;
+		}
+
+		//Element ele;
+
+		public void Activate()
+		{
+			//ele = Blockly.Xml.workspaceToDom(workspace);
+		}
+
+		public void Inactivate()
+		{
+			//workspace.clear();
+			//Blockly.Xml.domToWorkspace(ele, workspace);
+		}
+
+		public void ReloadToolbox(HTMLElement toolbox)
+		{
+			toolbox.AppendChild(Document.CreateElement("sep"));
+			var xml = jQuery.ParseXML(App.ArduinoToolbox);
+			var categories = xml.ChildNodes[0];
+			foreach (var item in categories.ChildNodes) {
+				if (item.NodeName != "category")
+					continue;
+				toolbox.AppendChild(item);
+			}
+
+			toolbox.AppendChild(Document.CreateElement("sep"));
+			xml = jQuery.ParseXML(App.EcnlToolbox);
+			categories = xml.ChildNodes[0];
+			foreach (var item in categories.ChildNodes) {
+				if (item.NodeName != "category")
+					continue;
+				toolbox.AppendChild(item);
+			}
+
+			var category = Document.CreateElement("category");
+			category.SetAttribute("name", "ECNL SvcTask");
+			category.SetAttribute("colour", "230");
+			toolbox.AppendChild(category);
+
+			var funcs = new[] { "setup", "recv_esv", "break_wait", "timeout", "snd_msg" };
+			var procs = new[] { "is_local_addr", "is_multicast_addr", "is_valid_addrid", "get_local_addr", "get_multicast_addr", "get_remote_addr", "get_remote_id", "set_remote_addr", "add_remote_addr" };
+			foreach (var name in funcs) {
+				var block = Document.CreateElement("block");
+				block.SetAttribute("type", ProceduresDefnoreturnBlock.type_name);
+
+				var field = Document.CreateElement("field");
+				field.SetAttribute("name", "NAME");
+				field.AppendChild(Document.CreateTextNode(name));
+				block.AppendChild(field);
+
+				category.AppendChild(block);
+			}
+
+			foreach (var name in procs) {
+				var block = Document.CreateElement("block");
+				block.SetAttribute("type", ProceduresDefreturnBlock.type_name);
+
+				var field = Document.CreateElement("field");
+				field.SetAttribute("name", "NAME");
+				field.AppendChild(Document.CreateTextNode(name));
+				block.AppendChild(field);
+
+				category.AppendChild(block);
+			}
+		}
+
+		public void OpenModifyView(Action<bool> callback)
+		{
+			view.ReloadToolbox(this);
+			callback(true);
+		}
+
+		public string Template(string template)
+		{
+			template = template.Replace("%identifier%", Identifier);
+			template = template.Replace("%attribute%", "SvcTask");
+			template = template.Replace("%img%", GetImageUrl());
+			return template;
+		}
+	}
+
+	partial class Ruby
+	{
+		internal string defineEcnlTask(EcnlTaskWorkspace workspace, JsonNodeInfo localNode)
+		{
+			global = false;
+			string code = workspaceToCode(workspace.Workspace);
+			global = true;
+
+			var identifier = workspace.Identifier;
+			var funcs = new string[0];
+
+			var blocks = workspace.Workspace.getTopBlocks(true);
+			for (var i = 0; i < blocks.Length; i++) {
+				var block = blocks[i];
+				string name;
+
+				switch (block.type) {
+				case ProceduresDefnoreturnBlock.type_name:
+					name = block.getFieldValue("NAME");
+					switch (name) {
+					case "setup":
+					case "recv_esv":
+					case "break_wait":
+					case "timeout":
+					case "snd_msg":
+						funcs.Push(name);
+						break;
+					}
+					break;
+				case ProceduresDefreturnBlock.type_name:
+					name = block.getFieldValue("NAME");
+					switch (name) {
+					case "is_local_addr":
+					case "is_multicast_addr":
+					case "is_valid_addrid":
+					case "get_local_addr":
+					case "get_multicast_addr":
+					case "get_remote_addr":
+					case "get_remote_id":
+					case "set_remote_addr":
+					case "add_remote_addr":
+						funcs.Push(name);
+						break;
+					}
+					break;
+				}
+			}
+
+			var sb = new StringBuilder();
+
+			sb.AppendLine("class " + identifier + " < ECNL::SvcTask");
+			sb.AppendLine("	def initialize()");
+			sb.AppendLine("		@profile = " + localNode.identifier + ".new(" + localNode.instanceCode + ")");
+			switch (localNode.objects.Length) {
+			case 0:
+				sb.AppendLine("		@devices = []");
+				break;
+			case 1: {
+					var o = localNode.objects[0];
+					sb.AppendLine("		@devices = [ " + o.identifier + ".new(" + o.instanceCode + ", @profile) ]");
+				}
+				break;
+			default:
+				sb.AppendLine("		@devices = [");
+				foreach (var o in localNode.objects) {
+					sb.AppendLine("			" + o.identifier + ".new(" + o.instanceCode + ", @profile)");
+				}
+				sb.AppendLine("		]");
+				break;
+			}
+			sb.AppendLine("		@enodadrb_table = []");
+			sb.AppendLine();
+			sb.AppendLine("		super()");
+			if (funcs.Contains("setup")) {
+				sb.AppendLine();
+				sb.AppendLine("		setup()");
+			}
+			sb.AppendLine("	end");
+			sb.AppendLine();
+			foreach (var line in code.Split("\n")) {
+				sb.AppendLine("\t" + line);
+			}
+			sb.AppendLine();
+			if (!funcs.Contains("recv_esv")) {
+				sb.AppendLine("	def recv_esv(esv)");
+				sb.AppendLine("	end");
+			}
+			sb.AppendLine();
+			if (!funcs.Contains("break_wait")) {
+				sb.AppendLine("	def break_wait(data)");
+				sb.AppendLine("	end");
+			}
+			sb.AppendLine();
+			if (!funcs.Contains("timeout")) {
+				sb.AppendLine("	def timeout()");
+				sb.AppendLine("	end");
+			}
+			sb.AppendLine();
+			if (!funcs.Contains("snd_msg")) {
+				sb.AppendLine("	def snd_msg(ep, data)");
+				sb.AppendLine("		# 通信レイヤーへ送信");
+				sb.AppendLine("		TargetBoard::snd_msg(ep, data)");
+				sb.AppendLine("	end");
+			}
+			sb.AppendLine();
+			if (!funcs.Contains("is_local_addr")) {
+				sb.AppendLine("	def is_local_addr(ep)");
+				sb.AppendLine("		TargetBoard::is_local_addr(ep)");
+				sb.AppendLine("	end");
+			}
+			sb.AppendLine();
+			if (!funcs.Contains("is_multicast_addr")) {
+				sb.AppendLine("	def is_multicast_addr(ep)");
+				sb.AppendLine("		TargetBoard::is_multicast_addr(ep)");
+				sb.AppendLine("	end");
+			}
+			sb.AppendLine();
+			if (!funcs.Contains("is_valid_addrid")) {
+				sb.AppendLine("	def is_valid_addrid(id)");
+				sb.AppendLine("		(id >= 0) && ((id - ECNL::ENOD_REMOTE_ID) < @enodadrb_table.length)");
+				sb.AppendLine("	end");
+			}
+			sb.AppendLine();
+			if (!funcs.Contains("get_local_addr")) {
+				sb.AppendLine("	def get_local_addr()");
+				sb.AppendLine("		TargetBoard::get_local_addr()");
+				sb.AppendLine("	end");
+			}
+			sb.AppendLine();
+			if (!funcs.Contains("get_multicast_addr")) {
+				sb.AppendLine("	def get_multicast_addr()");
+				sb.AppendLine("		TargetBoard::get_multicast_addr()");
+				sb.AppendLine("	end");
+			}
+			sb.AppendLine();
+			if (!funcs.Contains("get_remote_addr")) {
+				sb.AppendLine("	def get_remote_addr(id)");
+				sb.AppendLine("		index = id - ECNL::ENOD_REMOTE_ID");
+				sb.AppendLine("		if (index < 0) || (index >= @enodadrb_table.length)");
+				sb.AppendLine("			nil");
+				sb.AppendLine("		else");
+				sb.AppendLine("			@enodadrb_table[index]");
+				sb.AppendLine("		end");
+				sb.AppendLine("	end");
+			}
+			sb.AppendLine();
+			if (!funcs.Contains("get_remote_id")) {
+				sb.AppendLine("	# 通信レイヤーアドレスの同じものを検索");
+				sb.AppendLine("	def get_remote_id(ep)");
+				sb.AppendLine("		id = ECNL::ENOD_REMOTE_ID - 1");
+				sb.AppendLine("		for ea in @enodadrb_table do");
+				sb.AppendLine("			id += 1");
+				sb.AppendLine("			if !ea then");
+				sb.AppendLine("				next");
+				sb.AppendLine("			end");
+				sb.AppendLine("			if !TargetBoard::equals_addr(ea, ep) then");
+				sb.AppendLine("				next");
+				sb.AppendLine("			end");
+				sb.AppendLine();
+				sb.AppendLine("			return id");
+				sb.AppendLine("		end");
+				sb.AppendLine();
+				sb.AppendLine("		return ECNL::ENOD_NOT_MATCH_ID");
+				sb.AppendLine("	end");
+			}
+			sb.AppendLine();
+			if (!funcs.Contains("set_remote_addr")) {
+				sb.AppendLine("	# 対応するリモートノードを検索");
+				sb.AppendLine("	def set_remote_addr(edata, ep)");
+				sb.AppendLine("		id = ECNL::ENOD_REMOTE_ID - 1");
+				sb.AppendLine("		for ea in @enodadrb_table do");
+				sb.AppendLine("			id += 1");
+				sb.AppendLine("			if !ea then");
+				sb.AppendLine("				next");
+				sb.AppendLine("			end");
+				sb.AppendLine("			if !is_match(svc, edata, ep) then");
+				sb.AppendLine("				next");
+				sb.AppendLine("			end");
+				sb.AppendLine();
+				sb.AppendLine("			# 対応するリモートノードがあれば通信レイヤーアドレスを設定");
+				sb.AppendLine("			@enodadrb_table[id - ECNL::ENOD_REMOTE_ID] = ep");
+				sb.AppendLine();
+				sb.AppendLine("			return id");
+				sb.AppendLine("		end");
+				sb.AppendLine();
+				sb.AppendLine("		return ECNL::ENOD_NOT_MATCH_ID");
+				sb.AppendLine("	end");
+			}
+			sb.AppendLine();
+			if (!funcs.Contains("add_remote_addr")) {
+				sb.AppendLine("	# 空き領域を探して自動登録");
+				sb.AppendLine("	def add_remote_addr(edata, ep)");
+				sb.AppendLine("		id = ECNL::ENOD_REMOTE_ID - 1");
+				sb.AppendLine("		for ea in @enodadrb_table do");
+				sb.AppendLine("			id += 1");
+				sb.AppendLine("			if ea then");
+				sb.AppendLine("				next");
+				sb.AppendLine("			end");
+				sb.AppendLine();
+				sb.AppendLine("			@enodadrb_table[id - ECNL::ENOD_REMOTE_ID] = ep");
+				sb.AppendLine();
+				sb.AppendLine("			return id");
+				sb.AppendLine("		end");
+				sb.AppendLine();
+				sb.AppendLine("		if @enodadrb_table.length >= 100 then");
+				sb.AppendLine("			return ECNL::ENOD_NOT_MATCH_ID");
+				sb.AppendLine("		end");
+				sb.AppendLine();
+				sb.AppendLine("		id = @enodadrb_table.length;");
+				sb.AppendLine("		@enodadrb_table[id] = ep");
+				sb.AppendLine();
+				sb.AppendLine("		return id + ECNL::ENOD_REMOTE_ID");
+				sb.AppendLine("	end");
+				sb.AppendLine("end");
+
+				code = sb.ToString();
+			}
+			return code;
+		}
+
+		string itr_code()
+		{
+			var sb = new StringBuilder();
+
+			sb.AppendLine("itr = esv.itr_ini()");
+			sb.AppendLine("itr.itr_nxt()");
+			sb.AppendLine("until itr.is_eof do");
+			sb.AppendLine("	if itr.epc == 0xD6 then");
+			sb.AppendLine("		# LEDをON");
+			sb.AppendLine("		digitalWrite(2, 1)");
+			sb.AppendLine("	end");
+			sb.AppendLine("	itr.itr_nxt()");
+			sb.AppendLine("end");
+
+			return sb.ToString();
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/JsonData.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/JsonData.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/JsonData.cs	(revision 270)
@@ -0,0 +1,208 @@
+﻿/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2015 Cores Co., Ltd. Japan
+ * 
+ *  上記著作権者は，以下の(1)～(4)の条件を満たす場合に限り，本ソフトウェ
+ *  ア（本ソフトウェアを改変したものを含む．以下同じ）を使用・複製・改
+ *  変・再配布（以下，利用と呼ぶ）することを無償で許諾する．
+ *  (1) 本ソフトウェアをソースコードの形で利用する場合には，上記の著作
+ *      権表示，この利用条件および下記の無保証規定が，そのままの形でソー
+ *      スコード中に含まれていること．
+ *  (2) 本ソフトウェアを，ライブラリ形式など，他のソフトウェア開発に使
+ *      用できる形で再配布する場合には，再配布に伴うドキュメント（利用
+ *      者マニュアルなど）に，上記の著作権表示，この利用条件および下記
+ *      の無保証規定を掲載すること．
+ *  (3) 本ソフトウェアを，機器に組み込むなど，他のソフトウェア開発に使
+ *      用できない形で再配布する場合には，次のいずれかの条件を満たすこ
+ *      と．
+ *    (a) 再配布に伴うドキュメント（利用者マニュアルなど）に，上記の著
+ *        作権表示，この利用条件および下記の無保証規定を掲載すること．
+ *    (b) 再配布の形態を，別に定める方法によって，TOPPERSプロジェクトに
+ *        報告すること．
+ *  (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
+ *      害からも，上記著作権者およびTOPPERSプロジェクトを免責すること．
+ *      また，本ソフトウェアのユーザまたはエンドユーザからのいかなる理
+ *      由に基づく請求からも，上記著作権者およびTOPPERSプロジェクトを
+ *      免責すること．
+ * 
+ *  本ソフトウェアは，無保証で提供されているものである．上記著作権者お
+ *  よびTOPPERSプロジェクトは，本ソフトウェアに関して，特定の使用目的
+ *  に対する適合性も含めて，いかなる保証も行わない．また，本ソフトウェ
+ *  アの利用により直接的または間接的に生じたいかなる損害に関しても，そ
+ *  の責任を負わない．
+ * 
+ *  @(#) $Id$
+ */
+using System;
+
+namespace WebMrbc
+{
+	public class JsonClassGroupInfo
+	{
+		public byte classGroupCode;
+		public string description;
+		public string define;
+		public JsonClassInfo[] classes;
+
+		public JsonClassGroupInfo(dynamic p)
+		{
+			classGroupCode = p.classGroupCode;
+			description = p.description;
+			define = p.define;
+		}
+	}
+
+	public class JsonClassInfo
+	{
+		public byte classCode;
+		public string description;
+		public string name;
+		public JsonClassGroupInfo classGroup;
+		public JsonPropertyInfo[] properties;
+
+		public JsonClassInfo(dynamic p)
+		{
+			classCode = p.classCode;
+			description = p.description;
+			name = p.name;
+			classGroup = p.classGroup;
+			properties = p.properties;
+		}
+	}
+
+	public class JsonNodeInfo : JsonObjectInfo
+	{
+		public JsonObjectInfo[] objects;
+
+		public JsonNodeInfo(JsonClassInfo type, string identifier, string attribute)
+			: base(type, identifier)
+		{
+			this.attribute = attribute;
+			this.objects = new JsonObjectInfo[0];
+		}
+	}
+
+	public class JsonObjectInfo
+	{
+		public JsonClassInfo type;
+		public JsonNodeInfo parent;
+		public string identifier;
+		public byte instanceCode;
+		public string attribute;
+		public JsonPropertyInfo[] properties;
+
+		public JsonObjectInfo(JsonClassInfo type, string identifier)
+		{
+			this.type = type;
+			this.identifier = identifier;
+			this.instanceCode = 1;
+			this.attribute = "device";
+			this.properties = new JsonPropertyInfo[0];
+		}
+
+		public JsonPropertyInfo FindProperty(byte epc)
+		{
+			foreach (var item in this.properties) {
+				if (item.propertyCode == epc)
+					return item;
+			}
+			return null;
+		}
+	}
+
+	public static class JsonObjectInfoExtention
+	{
+		public static JsonObjectInfo Clone(this JsonObjectInfo obj)
+		{
+			return new JsonObjectInfo(obj.type, obj.identifier) {
+				parent = obj.parent,
+				instanceCode = obj.instanceCode,
+				attribute = obj.attribute,
+				properties = (JsonPropertyInfo[])obj.properties.Clone()
+			};
+		}
+
+		public static void Copy(this JsonObjectInfo dst, JsonObjectInfo src)
+		{
+			dst.type = src.type;
+			dst.identifier = src.identifier;
+			dst.parent = src.parent;
+			dst.instanceCode = src.instanceCode;
+			dst.attribute = src.attribute;
+			dst.properties = (JsonPropertyInfo[])src.properties.Clone();
+		}
+	}
+
+	public class JsonFieldInfo
+	{
+		public string description;
+		public string valueDescription;
+		public string unitDescription;
+		public string initialValue;
+		public string type;
+		public string identifier;
+		public bool primitive;
+		public bool isArray;
+		public int arrayCount;
+		public int size;
+		public JsonFieldInfo[] fields;
+
+		public JsonFieldInfo()
+		{
+
+		}
+
+		public JsonFieldInfo(dynamic f)
+		{
+			description = f.description;
+			valueDescription = f.valueDescription;
+			unitDescription = f.unitDescription;
+			initialValue = f.initialValue;
+			type = f.type;
+			identifier = f.identifier;
+			primitive = f.primitive;
+			isArray = f.isArray;
+			arrayCount = (int)f.arrayCount;
+			size = (int)f.size;
+			var list = new JsonFieldInfo[0];
+			foreach (var field in f.fields) {
+				list.Push(new JsonFieldInfo(field));
+			}
+			fields = list;
+		}
+	}
+
+	public class JsonPropertyInfo : JsonFieldInfo
+	{
+		public JsonObjectInfo classInfo;
+		public byte propertyCode;
+		public string[] access;
+		public string[] required;
+
+		public JsonPropertyInfo()
+		{
+		}
+
+		public JsonPropertyInfo(dynamic p)
+			: base((object)p)
+		{
+			classInfo = p.classInfo;
+			propertyCode = p.propertyCode;
+			access = p.access;
+			required = p.required;
+		}
+	}
+
+	public class JsonSkeltonResult
+	{
+		public string macro;
+		public string declare;
+		public string predefine;
+		public string types;
+		public string funcs;
+		public string instance;
+		public string define;
+		public string config;
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/ValueRange.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/ValueRange.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/ValueRange.cs	(revision 270)
@@ -0,0 +1,793 @@
+﻿/*
+ *  TOPPERS ECHONET Lite Communication Middleware
+ * 
+ *  Copyright (C) 2015 Cores Co., Ltd. Japan
+ * 
+ *  上記著作権者は，以下の(1)～(4)の条件を満たす場合に限り，本ソフトウェ
+ *  ア（本ソフトウェアを改変したものを含む．以下同じ）を使用・複製・改
+ *  変・再配布（以下，利用と呼ぶ）することを無償で許諾する．
+ *  (1) 本ソフトウェアをソースコードの形で利用する場合には，上記の著作
+ *      権表示，この利用条件および下記の無保証規定が，そのままの形でソー
+ *      スコード中に含まれていること．
+ *  (2) 本ソフトウェアを，ライブラリ形式など，他のソフトウェア開発に使
+ *      用できる形で再配布する場合には，再配布に伴うドキュメント（利用
+ *      者マニュアルなど）に，上記の著作権表示，この利用条件および下記
+ *      の無保証規定を掲載すること．
+ *  (3) 本ソフトウェアを，機器に組み込むなど，他のソフトウェア開発に使
+ *      用できない形で再配布する場合には，次のいずれかの条件を満たすこ
+ *      と．
+ *    (a) 再配布に伴うドキュメント（利用者マニュアルなど）に，上記の著
+ *        作権表示，この利用条件および下記の無保証規定を掲載すること．
+ *    (b) 再配布の形態を，別に定める方法によって，TOPPERSプロジェクトに
+ *        報告すること．
+ *  (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
+ *      害からも，上記著作権者およびTOPPERSプロジェクトを免責すること．
+ *      また，本ソフトウェアのユーザまたはエンドユーザからのいかなる理
+ *      由に基づく請求からも，上記著作権者およびTOPPERSプロジェクトを
+ *      免責すること．
+ * 
+ *  本ソフトウェアは，無保証で提供されているものである．上記著作権者お
+ *  よびTOPPERSプロジェクトは，本ソフトウェアに関して，特定の使用目的
+ *  に対する適合性も含めて，いかなる保証も行わない．また，本ソフトウェ
+ *  アの利用により直接的または間接的に生じたいかなる損害に関しても，そ
+ *  の責任を負わない．
+ * 
+ *  @(#) $Id$
+ */
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using Bridge;
+using Bridge.Text.RegularExpressions;
+
+namespace WebMrbc
+{
+	enum TokenType
+	{
+		Separetor,
+		HexValue,
+		Numeric,
+		String,
+		End,
+	};
+
+	class TokenInfo
+	{
+		public string Token;
+		public TokenType Type;
+		public static string Separetor = @"[=,:\(\)\[\]～]";
+		public static string HexValue = "^0x[0-9A-Fa-f]+";
+		public static string Numeric = @"^[\-\+]?[\.]?[0-9]+[0-9,\.]*";
+
+		public TokenInfo(string token, TokenType type)
+		{
+			Token = token;
+			Type = type;
+		}
+
+		public override string ToString()
+		{
+			return Token;
+		}
+
+		public int ToInt32()
+		{
+			switch (Type) {
+			case TokenType.HexValue:
+				return Script.ParseInt(Token.Substring(2)/*0xの削除*/, 16);
+			case TokenType.Numeric:
+				return Script.ParseInt(Token);
+			default:
+				return 0;
+			}
+		}
+
+		public long ToInt64(string typeName)
+		{
+			string temp;
+
+			switch (Type) {
+			case TokenType.HexValue:
+				temp = Token.Substring(2)/*0xの削除*/;
+				return Script.ParseInt(temp, 16);
+			case TokenType.Numeric:
+				return Script.ParseInt(Token);
+			default:
+				return 0;
+			}
+		}
+	}
+
+	enum State
+	{
+		Value,
+		EqualOrRange,
+		Description,
+		UnitOrCommaOrEnd,
+		RengeMax,
+		StartParenthesis,
+		RangeDescription,
+		MinDescription,
+		RangeSeparetor,
+		MaxDescription,
+		EndParenthesis,
+		CommaOrEnd,
+		BitFieldLSB,
+		BitRange,
+		BitFieldMSB,
+		BitFieldDescription,
+		BitRangeEnd,
+		Colon,
+	}
+
+	public abstract class Value
+	{
+		public abstract string Disp { get; }
+		public abstract string GetInitialValue();
+	}
+
+	public class Option : Value
+	{
+		private long _Val;
+		private string _Disp;
+
+		public Option(long val, string disp)
+		{
+			_Val = val;
+			_Disp = disp;
+		}
+
+		public long Val { get { return _Val; } }
+		public override string Disp { get { return _Disp; } }
+
+		public override string GetInitialValue()
+		{
+			return _Val.ToString(16).ToUpper();
+		}
+	}
+
+	public class Range : Value
+	{
+		private long _Min;
+		private long _Max;
+		private string _Disp;
+		private string _MinDisp;
+		private string _MaxDisp;
+		private string _Unit;
+		private long _InitialValue;
+
+		public Range(long min, long max, string disp)
+		{
+			_Min = min;
+			_Max = max;
+			_Disp = disp;
+			_MinDisp = "";
+			_MaxDisp = "";
+			_Unit = "";
+			_InitialValue = min;
+		}
+
+		public Range(long min, long max, string disp, string minDisp, string maxDisp, string unit)
+		{
+			_Min = min;
+			_Max = max;
+			_Disp = disp;
+			_MinDisp = minDisp;
+			_MaxDisp = maxDisp;
+			_Unit = unit;
+			_InitialValue = min;
+		}
+
+		public long Min { get { return _Min; } }
+		public long Max { get { return _Max; } }
+		public override string Disp { get { return _Disp; } }
+		public string MinDisp { get { return _MinDisp; } }
+		public string MaxDisp { get { return _MaxDisp; } }
+		public string Unit { get { return _Unit; } }
+		public long InitialValue {
+			get { return _InitialValue; }
+			set { _InitialValue = value; }
+		}
+
+		public override string GetInitialValue()
+		{
+			return _InitialValue.ToString(16).ToUpper();
+		}
+
+		public string GetDisp(long value)
+		{
+			return _Disp + value.ToString() + _Unit;
+		}
+	}
+
+	public class InRangeValue : Value
+	{
+		private Range _Range;
+		private long _Value;
+
+		public InRangeValue(Range range, long value)
+		{
+			_Range = range;
+			_Value = value;
+		}
+
+		public Range Range { get { return _Range; } }
+		public long Value { get { return _Value; } }
+		public override string Disp { get { return _Range.GetDisp(_Value); } }
+
+		public override string GetInitialValue()
+		{
+			return _Value.ToString(16).ToUpper();
+		}
+	}
+
+	public class BitField : Value
+	{
+		private int _Least;
+		private int _Most;
+		private string _Disp;
+		private Option[] _Values = new Option[0];
+		private Range[] _Ranges = new Range[0];
+		private Value _InitailValue;
+
+		public BitField(int least, int most, string disp)
+		{
+			_Least = least;
+			_Most = most;
+			_Disp = disp;
+		}
+
+		public int Least { get { return _Least; } }
+		public int Most { get { return _Most; } }
+		public override string Disp { get { return _Disp; } }
+		public Option[] Values { get { return _Values; } }
+		public Range[] Ranges { get { return _Ranges; } }
+		public Value InitailValue { get { return _InitailValue; } }
+
+		public override string GetInitialValue()
+		{
+			if (_InitailValue == null)
+				return "";
+			return _InitailValue.GetInitialValue();
+		}
+
+		internal void AddValue(Option option)
+		{
+			if (_InitailValue == null)
+				_InitailValue = option;
+			_Values.Push(option);
+		}
+
+		internal void AddRange(Range range)
+		{
+			if (_InitailValue == null)
+				_InitailValue = range;
+			_Ranges.Push(range);
+		}
+
+		internal bool IsInRange(long val64)
+		{
+			foreach (var val in _Values) {
+				if (val.Val != val64)
+					continue;
+
+				return true;
+			}
+
+			foreach (var rng in _Ranges) {
+				if ((rng.Min > val64) || (rng.Max < val64))
+					continue;
+
+				return true;
+			}
+
+			return false;
+		}
+
+		internal Value GetInRangeValue(long val64)
+		{
+			foreach (var val in _Values) {
+				if (val.Val != val64)
+					continue;
+
+				return val;
+			}
+
+			foreach (var rng in _Ranges) {
+				if ((rng.Min > val64) || (rng.Max < val64))
+					continue;
+
+				return new InRangeValue(rng, val64);
+			}
+
+			return null;
+		}
+	}
+
+	public class BitFiledsValue : Value
+	{
+		private BitField[] _BitFields;
+		private Value[] _BitFieldValues;
+		private long _Value;
+
+		public BitFiledsValue(BitField[] bitFlds, Value[] bitFldVals, long value)
+		{
+			_BitFields = bitFlds;
+			_BitFieldValues = bitFldVals;
+			_Value = value;
+		}
+
+		public override string Disp {
+			get { return ""; }
+		}
+
+		public override string GetInitialValue()
+		{
+			return _Value.ToString(16).ToUpper();
+		}
+	}
+
+	class ValueSet
+	{
+		public Option[] values;
+		public Range[] ranges;
+		public BitField bitField;
+		public Value initialValue;
+
+		public ValueSet(Option[] values, Range[] ranges, BitField bitField, Value initialValue)
+		{
+			this.values = values;
+			this.ranges = ranges;
+			this.bitField = bitField;
+			this.initialValue = initialValue;
+		}
+	}
+
+	public class ValueRange
+	{
+		private Option[] _Values = new Option[0];
+		private Range[] _Ranges = new Range[0];
+		private BitField[] _BitFields = new BitField[0];
+		private ValueRange[] _MemberFields = new ValueRange[0];
+		private Value _InitailValue;
+		static Dictionary<string, ValueSet> _ParsedText = new Dictionary<string, ValueSet>();
+
+		public Option[] Values { get { return _Values; } }
+		public Range[] Ranges { get { return _Ranges; } }
+		public BitField[] BitFields { get { return _BitFields; } }
+		public ValueRange[] MemberFields { get { return _MemberFields; } }
+
+		public string InitailValue {
+			get {
+				if (_InitailValue == null)
+					return "";
+				return _InitailValue.GetInitialValue();
+			}
+			set {
+				int val64 = Script.ParseInt(value);
+				foreach (var val in _Values) {
+					if (val.Val != val64)
+						continue;
+
+					_InitailValue = val;
+					return;
+				}
+
+				foreach (var rng in _Ranges) {
+					if ((rng.Min > val64) || (rng.Max < val64))
+						continue;
+
+					_InitailValue = new InRangeValue(rng, val64);
+					return;
+				}
+
+				if (_BitFields.Length > 0) {
+					bool ok = true;
+					var bitFlds = new Value[0];
+					foreach (var bit in _BitFields) {
+						if (!bit.IsInRange(val64)) {
+							ok = false;
+							break;
+						}
+
+						bitFlds.Push(bit.GetInRangeValue(val64));
+					}
+
+					if (ok) {
+						_InitailValue = new BitFiledsValue(_BitFields, bitFlds, val64);
+						return;
+					}
+				}
+			}
+		}
+
+		private static bool ParseValueRange(string input, string type, Option[] values, Range[] ranges,
+			out BitField bitFeild, out Value initialValue)
+		{
+			bitFeild = null;
+			initialValue = null;
+
+			var tokens = new TokenInfo[0];
+			int pos = 0;
+			while (pos < input.Length) {
+				Regex ms;
+				string[] m;
+				if ((m = (ms = new Regex(TokenInfo.HexValue)).Exec(input.Substring(pos))) != null) {
+					tokens.Push(new TokenInfo(m[0], TokenType.HexValue));
+					pos += m[0].Length;
+				}
+				else if ((m = (ms = new Regex(TokenInfo.Numeric)).Exec(input.Substring(pos))) != null) {
+					tokens.Push(new TokenInfo(m[0], TokenType.Numeric));
+					pos += m[0].Length;
+				}
+				else {
+					if ((m = (ms = new Regex(TokenInfo.Separetor)).Exec(input.Substring(pos))) == null) {
+						tokens.Push(new TokenInfo(input.Substring(pos), TokenType.String));
+						break;
+					}
+					int index = pos + Script.Write<int>("m.index");
+					if (index == pos) {
+						tokens.Push(new TokenInfo(m[0], TokenType.Separetor));
+						pos += m.Length;
+					}
+					else {
+						tokens.Push(new TokenInfo(input.Substring(pos, index - pos), TokenType.String));
+						tokens.Push(new TokenInfo(m[0], TokenType.Separetor));
+						pos = index + 1;
+					}
+				}
+			}
+			tokens.Push(new TokenInfo("", TokenType.End));
+
+			bool OK = false;
+			var sentence = new TokenInfo[0];
+			State state = State.Value;
+			foreach (TokenInfo token in tokens) {
+				switch (state) {
+				case State.Value:
+					if ((token.Type == TokenType.HexValue)
+						|| (token.Type == TokenType.Numeric)) {
+						sentence.Push(token);
+						state = State.EqualOrRange;
+						continue;
+					}
+					else if ((token.Type == TokenType.Separetor)
+						&& (token.Token == "[")) {
+						if (bitFeild != null)
+							break;
+						state = State.BitFieldLSB;
+						continue;
+					}
+					break;
+				case State.EqualOrRange:
+					if (token.Type == TokenType.Separetor) {
+						switch (token.Token) {
+						case "=":
+							state = State.Description;
+							continue;
+						case "～":
+							state = State.RengeMax;
+							continue;
+						}
+					}
+					else if (token.Type == TokenType.End) {
+						Option option = new Option(sentence[0].ToInt64(type), "固定");
+						if (bitFeild != null)
+							bitFeild.AddValue(option);
+						else {
+							if (initialValue == null)
+								initialValue = option;
+							values.Push(option);
+						}
+						sentence.Splice(0, sentence.Length);
+						state = State.CommaOrEnd;
+						continue;
+					}
+					break;
+				case State.Description:
+					if (token.Type == TokenType.String) {
+						Option option = new Option(sentence[0].ToInt64(type), token.Token);
+						if (bitFeild != null)
+							bitFeild.AddValue(option);
+						else {
+							if (initialValue == null)
+								initialValue = option;
+							values.Push(option);
+						}
+						sentence.Splice(0, sentence.Length);
+						state = State.CommaOrEnd;
+						continue;
+					}
+					else if (token.Type == TokenType.Numeric) {
+						sentence.Push(token);
+						state = State.UnitOrCommaOrEnd;
+						continue;
+					}
+					break;
+				case State.UnitOrCommaOrEnd:
+					if (token.Type == TokenType.String) {
+						Option option = new Option(sentence[0].ToInt64(type), sentence[1].Token + token.Token);
+						if (bitFeild != null)
+							bitFeild.AddValue(option);
+						else {
+							if (initialValue == null)
+								initialValue = option;
+							values.Push(option);
+						}
+						sentence.Splice(0, sentence.Length);
+						state = State.CommaOrEnd;
+						continue;
+					}
+					else if ((token.Type == TokenType.Separetor)
+						&& (token.Token == ",")) {
+						Option option = new Option(sentence[0].ToInt64(type), sentence[1].Token);
+						if (bitFeild != null)
+							bitFeild.AddValue(option);
+						else {
+							if (initialValue == null)
+								initialValue = option;
+							values.Push(option);
+						}
+						sentence.Splice(0, sentence.Length);
+						state = State.Value;
+						continue;
+					}
+					else if (token.Type == TokenType.End) {
+						Option option = new Option(sentence[0].ToInt64(type), sentence[1].Token);
+						if (bitFeild != null)
+							bitFeild.AddValue(option);
+						else {
+							if (initialValue == null)
+								initialValue = option;
+							values.Push(option);
+						}
+						sentence.Splice(0, sentence.Length);
+						OK = true;
+					}
+					break;
+				case State.RengeMax:
+					if ((token.Type == TokenType.HexValue)
+						|| (token.Type == TokenType.Numeric)) {
+						sentence.Push(token);
+						state = State.StartParenthesis;
+						continue;
+					}
+					else if ((token.Type == TokenType.Separetor)
+						&& (token.Token == "=")) {
+						string max = "0x";
+						for (int i = sentence[0].Token.Length - 2; i > 0; i--) {
+							max += "F";
+						}
+						sentence.Push(new TokenInfo(max, TokenType.HexValue));
+						state = State.RangeDescription;
+						continue;
+					}
+					break;
+				case State.StartParenthesis:
+					if (token.Type == TokenType.Separetor) {
+						switch (token.Token) {
+						case "=":
+							if (sentence.Length == 2) {
+								state = State.RangeDescription;
+								continue;
+							}
+							break;
+						case "(":
+							sentence.Push(new TokenInfo("", TokenType.String));
+							state = State.MinDescription;
+							continue;
+						case ",":
+							Range range = new Range(sentence[0].ToInt64(type), sentence[1].ToInt64(type), (sentence.Length > 2) ? sentence[2].Token : "");
+							if (bitFeild != null) {
+								bitFeild.AddRange(range);
+							}
+							else {
+								if (initialValue == null)
+									initialValue = range;
+								ranges.Push(range);
+							}
+							sentence.Splice(0, sentence.Length);
+							state = State.Value;
+							continue;
+						}
+					}
+					else if (token.Type == TokenType.End) {
+						Range range = new Range(sentence[0].ToInt64(type), sentence[1].ToInt64(type), (sentence.Length > 2) ? sentence[2].Token : "");
+						if (bitFeild != null) {
+							bitFeild.AddRange(range);
+						}
+						else {
+							if (initialValue == null)
+								initialValue = range;
+							ranges.Push(range);
+						}
+						sentence.Splice(0, sentence.Length);
+						OK = true;
+					}
+					break;
+				case State.RangeDescription:
+					if (token.Type == TokenType.String) {
+						sentence.Push(token);
+						state = State.StartParenthesis;
+						continue;
+					}
+					break;
+				case State.MinDescription:
+					if ((token.Type == TokenType.Numeric)
+						|| (token.Type == TokenType.String)) {
+						sentence.Push(token);
+						state = State.RangeSeparetor;
+						continue;
+					}
+					break;
+				case State.RangeSeparetor:
+					if ((token.Type == TokenType.Separetor)
+						&& (token.Token == "～")) {
+						state = State.MaxDescription;
+						continue;
+					}
+					break;
+				case State.MaxDescription:
+					if ((token.Type == TokenType.Numeric)
+						|| (token.Type == TokenType.String)) {
+						sentence.Push(token);
+						state = State.EndParenthesis;
+						continue;
+					}
+					break;
+				case State.EndParenthesis:
+					if ((token.Type == TokenType.Separetor)
+						&& (token.Token == ")")) {
+						Range range = new Range(
+							sentence[0].ToInt64(type),
+							sentence[1].ToInt64(type),
+							sentence[2].Token,
+							sentence[3].Token,
+							sentence[4].Token,
+							(sentence.Length > 5) ? sentence[5].Token : "");
+						if (bitFeild != null) {
+							bitFeild.AddRange(range);
+						}
+						else {
+							if (initialValue == null)
+								initialValue = range;
+							ranges.Push(range);
+						}
+						sentence.Splice(0, sentence.Length);
+						state = State.CommaOrEnd;
+						continue;
+					}
+					else if (token.Type == TokenType.String) {
+						sentence.Push(token);
+						state = State.EndParenthesis;
+						continue;
+					}
+					break;
+				case State.BitFieldLSB:
+					if (token.Type == TokenType.Numeric) {
+						sentence.Push(token);
+						state = State.BitRange;
+						continue;
+					}
+					break;
+				case State.BitRange:
+					if (token.Type == TokenType.Separetor) {
+						switch (token.Token) {
+						case "～":
+							state = State.BitFieldMSB;
+							continue;
+						case "]":
+							sentence.Push(sentence[0]);
+							state = State.BitFieldDescription;
+							continue;
+						}
+					}
+					break;
+				case State.BitFieldMSB:
+					if (token.Type == TokenType.Numeric) {
+						sentence.Push(token);
+						state = State.BitRangeEnd;
+						continue;
+					}
+					break;
+				case State.BitRangeEnd:
+					if ((token.Type == TokenType.Separetor)
+						&& (token.Token == "]")) {
+						state = State.BitFieldDescription;
+						continue;
+					}
+					break;
+				case State.BitFieldDescription:
+					if (token.Type == TokenType.String) {
+						sentence.Push(token);
+						state = State.Colon;
+						continue;
+					}
+					break;
+				case State.Colon:
+					if ((token.Type == TokenType.Separetor)
+						&& (token.Token == ":")) {
+						bitFeild = new BitField(sentence[0].ToInt32(), sentence[1].ToInt32(), sentence[2].Token);
+						if (initialValue == null)
+							initialValue = bitFeild;
+						sentence.Splice(0, sentence.Length);
+						state = State.Value;
+						continue;
+					}
+					else if (token.Type == TokenType.End) {
+						bitFeild = new BitField(sentence[0].ToInt32(), sentence[1].ToInt32(), sentence[2].Token);
+						if (initialValue == null)
+							initialValue = bitFeild;
+						sentence.Splice(0, sentence.Length);
+						OK = true;
+						break;
+					}
+					break;
+				case State.CommaOrEnd:
+					if (token.Type == TokenType.End) {
+						OK = true;
+					}
+					else if ((token.Type == TokenType.Separetor)
+						&& (token.Token == ",")) {
+						state = State.Value;
+						continue;
+					}
+					break;
+				}
+				break;
+			}
+
+			return OK;
+		}
+
+		public static ValueRange Parse(string valrng, JsonFieldInfo emti)
+		{
+			ValueRange valueRange = new ValueRange();
+
+			if (emti.primitive) {
+				string[] lines = valrng.Split(new Regex("\r\n"));
+				foreach (string line in lines) {
+					if (new Regex("^<(.+)>$").Test(line))
+						continue;
+
+					Option[] values;
+					Range[] ranges;
+					BitField bitField;
+					Value initialValue;
+
+					ValueSet pair;
+					if (_ParsedText.TryGetValue(line, out pair)) {
+						values = pair.values;
+						ranges = pair.ranges;
+						bitField = pair.bitField;
+						initialValue = pair.initialValue;
+					}
+					else {
+						values = new Option[0];
+						ranges = new Range[0];
+
+						ParseValueRange(line, emti.type, values, ranges, out bitField, out initialValue);
+
+						_ParsedText.Add(line, new ValueSet(values, ranges, bitField, initialValue));
+					}
+
+					valueRange._Values = (Option[])valueRange._Values.Concat(values);
+					valueRange._Ranges = (Range[])valueRange._Ranges.Concat(ranges);
+					if (bitField != null)
+						valueRange._BitFields.Push(bitField);
+					if (valueRange._InitailValue == null)
+						valueRange._InitailValue = initialValue;
+				}
+			}
+			else {
+				foreach (JsonFieldInfo efi in emti.fields) {
+					ValueRange member = Parse(efi.valueDescription, efi);
+					valueRange._MemberFields.Push(member);
+				}
+			}
+
+			return valueRange;
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Emscripten.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Emscripten.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Emscripten.cs	(revision 270)
@@ -0,0 +1,201 @@
+﻿using System;
+using Bridge;
+using Bridge.Html5;
+
+[External]
+public class FileSystem
+{
+	/// <summary>
+	/// Converts a major and minor number into a single unique integer.
+	/// This is used as an id to represent the device.
+	/// </summary>
+	/// <param name="ma">Major number.</param>
+	/// <param name="mi">Minor number.</param>
+	internal int makedev(int ma, int mi)
+	{
+		throw new NotImplementedException();
+	}
+
+	/// <summary>
+	/// Registers the specified device driver with a set of callbacks.
+	/// </summary>
+	/// <param name="dev">The specific device driver id, created using makedev().</param>
+	/// <param name="ops">The set of callbacks required by the device.
+	/// For an example, see the NODEFS default callbacks
+	/// https://github.com/kripken/emscripten/blob/1.29.12/src/library_nodefs.js#L213</param>
+	internal void registerDevice(int dev, object ops)
+	{
+		throw new NotImplementedException();
+	}
+
+	/// <summary>
+	/// Sets up standard I/O devices for stdin, stdout, and stderr.
+	/// The devices are set up using the following (optional) callbacks.
+	/// If any of the callbacks throw an exception,
+	/// it will be caught and handled as if the device malfunctioned.
+	/// </summary>
+	/// <param name="input">Input callback. This will be called with
+	/// no parameters whenever the program attempts to read from stdin.
+	/// It should return an ASCII character code when data is available,
+	/// or null when it isn’t.</param>
+	/// <param name="output">Output callback. This will be called with
+	/// an ASCII character code whenever the program writes to stdout.
+	/// It may also be called with null to flush the output.</param>
+	/// <param name="error">Error callback. This is similar to output,
+	/// except it is called when data is written to stderr.</param>
+	/// <returns></returns>
+	internal object init(Delegate input, Delegate output, Delegate error)
+	{
+		throw new NotImplementedException();
+	}
+
+	/// <summary>
+	/// Mounts the FS object specified by type to the directory 
+	/// specified by mountpoint. The opts object is specific
+	/// to each file system type.
+	/// </summary>
+	/// <param name="type">The file system type: MEMFS, NODEFS, IDBFS or WORKERFS.</param>
+	/// <param name="opts">A generic settings object used by the underlying file system.</param>
+	/// <param name="mountpoint">A path to an existing local Emscripten directory
+	/// where the file system is to be mounted. It can be either an absolute path,
+	/// or something relative to the current directory.</param>
+	internal void mount(object type, object opts, string mountpoint)
+	{
+		throw new NotImplementedException();
+	}
+
+	/// <summary>
+	/// Unmounts the specified mountpoint.
+	/// </summary>
+	/// <param name="mountpoint">The directory to unmount.</param>
+	internal void unmount(string mountpoint)
+	{
+		throw new NotImplementedException();
+	}
+
+	/// <summary>
+	/// Responsible for iterating and synchronizing all mounted file systems
+	/// in an asynchronous fashion.
+	/// </summary>
+	/// <param name="populate">true to initialize Emscripten’s file system data
+	/// with the data from the file system’s persistent source,
+	/// and false to save Emscripten`s file system data
+	/// to the file system’s persistent source.</param>
+	/// <param name="callback">A notification callback function
+	/// that is invoked on completion of the synchronization.
+	/// If an error occurred, it will be provided as a parameter to this function.</param>
+	internal void syncfs(bool populate, Delegate callback)
+	{
+
+	}
+
+	/// <summary>
+	/// Creates a new directory node in the file system.
+	/// </summary>
+	/// <param name="path">The path name for the new directory node.</param>
+	/// <param name="mode">File permissions for the new node.
+	/// The default setting (in octal numeric notation) is 0777.</param>
+	internal void mkdir(string path, int mode)
+	{
+		throw new NotImplementedException();
+	}
+
+	/// <summary>
+	/// Creates a new device node in the file system referencing
+	/// the registered device driver (FS.registerDevice()) for dev.
+	/// </summary>
+	/// <param name="path">The path name for the new device node.</param>
+	/// <param name="mode">File permissions for the new node.
+	/// The default setting (in octal numeric notation) is 0777.</param>
+	/// <param name="dev">The registered device driver.</param>
+	internal void mkdev(string path, int mode, int dev)
+	{
+		throw new NotImplementedException();
+	}
+
+	/// <summary>
+	/// Creates a symlink node at newpath linking to oldpath.
+	/// </summary>
+	/// <param name="oldpath">The path name of the file to link to.</param>
+	/// <param name="newpath">The path to the new symlink node, that points to oldpath.</param>
+	internal void symlink(string oldpath, string newpath)
+	{
+		throw new NotImplementedException();
+	}
+
+	internal Stat stat(string path)
+	{
+		return new Stat();
+	}
+
+	internal File open(string path, string flag)
+	{
+		return new File();
+	}
+
+	internal void close(File stream)
+	{
+	}
+
+	internal void read(File stream, Uint8Array buffer, int offset, int length, int position)
+	{
+	}
+
+	/// <summary>
+	/// Writes the entire contents of data to the file at path.
+	/// The value of opts determines whether data is treated
+	/// either as a string (encoding = utf8), or as an ArrayBufferView(encoding = binary).
+	/// </summary>
+	/// <param name="path">The file to which to write data.</param>
+	/// <param name="data">The data to write.</param>
+	/// <param name="opts">
+	/// encoding(string)
+	/// 	binary | utf8.The default is utf8
+	/// flags(string)
+	/// 	Write flags, as defined in FS.open(). The default is ‘w’.
+	/// </param>
+	internal void writeFile(string path, object data, object opts = null)
+	{
+		throw new NotImplementedException();
+	}
+
+	/// <summary>
+	/// Preloads a file asynchronously, and uses preload plugins to prepare its content.
+	/// You should call this in preRun, run() will be delayed until all preloaded files are ready.
+	/// This is how the preload-file option works in emcc
+	/// when --use-preload-plugins has been specified (if you use this method by itself,
+	/// you will need to build the program with that option).
+	/// </summary>
+	/// <param name="parent">The parent folder, either as a path (e.g. ‘/usr/lib’) or
+	/// an object previously returned from a FS.createFolder() or FS.createPath() call.</param>
+	/// <param name="name">The name of the new file.</param>
+	/// <param name="url">In the browser, this is the URL whose contents will be returned
+	/// when the file is accessed. In a command line engine,
+	/// this will be the local (real) file system path the contents
+	/// will be loaded from. Note that writes to this file are virtual.</param>
+	/// <param name="canRead">Whether the file should have read permissions set
+	/// from the program’s point of view.</param>
+	/// <param name="canWrite">Whether the file should have write permissions set
+	/// from the program’s point of view.</param>
+	internal void createPreloadedFile(string parent, string name, string url, bool canRead, bool canWrite)
+	{
+		throw new NotImplementedException();
+	}
+
+	internal void createFolder(string parent, string name, bool canRead, bool canWrite)
+	{
+		throw new NotImplementedException();
+	}
+}
+
+[External]
+class Stat
+{
+	internal int size = 0;
+}
+
+[External]
+class File
+{
+
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Generator.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Generator.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Generator.cs	(revision 270)
@@ -0,0 +1,275 @@
+﻿/**
+ * @license
+ * Visual Blocks Editor
+ *
+ * Copyright 2012 Google Inc.
+ * https://developers.google.com/blockly/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview Utility functions for generating executable code from
+ * Blockly code.
+ * @author fraser@google.com (Neil Fraser)
+ */
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using Bridge;
+using Bridge.Text.RegularExpressions;
+
+namespace WebMrbc
+{
+	[ComVisible(true)]
+	public abstract class Generator
+	{
+		public string name_;
+
+		/// <summary>
+		/// Class for a code generator that translates the blocks into a language.
+		/// </summary>
+		/// <param name="name">Language name of this generator.</param>
+		public Generator(string name)
+		{
+			this.name_ = name;
+			this.FUNCTION_NAME_PLACEHOLDER_REGEXP_ =
+				new Regex(this.FUNCTION_NAME_PLACEHOLDER_, "g");
+		}
+
+		/// <summary>
+		// Category to separate generated function names from variables and procedures.
+		/// </summary>
+		public static string NAME_TYPE = "generated_function";
+
+		/// <summary>
+		/// Arbitrary code to inject into locations that risk causing infinite loops.
+		/// Any instances of '%1' will be replaced by the block ID that failed.
+		/// E.g. '  checkTimeout(%1);\n'
+		/// </summary>
+		public string INFINITE_LOOP_TRAP = null;
+
+		/// <summary>
+		/// Arbitrary code to inject before every statement.
+		/// Any instances of '%1' will be replaced by the block ID of the statement.
+		/// E.g. 'highlight(%1);\n'
+		/// </summary>
+		public string STATEMENT_PREFIX = null;
+
+		/// <summary>
+		/// The method of indenting.  Defaults to two spaces, but language generators
+		/// may override this to increase indent or change to tabs.
+		/// </summary>
+		public string INDENT = "  ";
+
+		/// <summary>
+		/// Maximum length for a comment before wrapping.  Does not account for
+		/// indenting level.
+		/// </summary>
+		public int COMMENT_WRAP = 60;
+
+		/// <summary>
+		/// List of outer-inner pairings that do NOT require parentheses.
+		/// </summary>
+		public int[][] ORDER_OVERRIDES = new int[0][];
+
+		public abstract void init(Workspace workspace);
+		public abstract string finish(node[] code);
+		public abstract node[] scrubNakedValue(node[] line);
+		public abstract node[] scrub_(Block block, node[] code);
+
+		/// <summary>
+		/// Generate code for all blocks in the workspace to the specified language.
+		/// </summary>
+		/// <param name="workspace">workspace Workspace to generate code from.</param>
+		/// <returns>Generated code.</returns>
+		public string workspaceToCode(Workspace workspace)
+		{
+			if (workspace == null) {
+				// Backwards compatibility from before there could be multiple workspaces.
+				App.WriteLine("No workspace specified in workspaceToCode call.  Guessing.");
+				workspace = Blockly.getMainWorkspace();
+			}
+			this.init(workspace);
+			var codes = workspaceToNodes(workspace);
+			return this.finish(codes);
+		}
+
+		public node[] workspaceToNodes(Workspace workspace)
+		{
+			var nodes = new node[0];
+			var blocks = workspace.getTopBlocks(true);
+			foreach (var block in blocks) {
+				var line = this.blockToCode(block);
+				if (line != null) {
+					if (block.outputConnection != null/*&& this.scrubNakedValue*/) {
+						// This block is a naked value.  Ask the language's code generator if
+						// it wants to append a semicolon, or something.
+						line = this.scrubNakedValue(line);
+					}
+					nodes = (node[])nodes.Concat(line);
+				}
+			}
+			return nodes;
+		}
+
+		// The following are some helpful functions which can be used by multiple
+		// languages.
+
+		/// <summary>
+		/// Prepend a common prefix onto each line of code.
+		/// </summary>
+		/// <param name="text">The lines of code.</param>
+		/// <param name="prefix">The common prefix.</param>
+		/// <returns>The prefixed lines of code.</returns>
+		public string prefixLines(string text, string prefix)
+		{
+			return prefix + text.Replace(new Regex("(?!\n$)\n"), "\n" + prefix);
+		}
+
+		/// <summary>
+		/// Recursively spider a tree of blocks, returning all their comments.
+		/// </summary>
+		/// <param name="block">The block from which to start spidering.</param>
+		/// <returns>Concatenated list of comments.</returns>
+		public string allNestedComments(Block block)
+		{
+			var comments = new string[0];
+			var blocks = block.getDescendants();
+			for (var i = 0; i < blocks.Length; i++) {
+				var comment = blocks[i].getCommentText();
+				if (comment != null) {
+					comments.Push(comment);
+				}
+			}
+			// Append an empty string to create a trailing line break when joined.
+			if (comments.Length != 0) {
+				comments.Push("");
+			}
+			return String.Join("\n", comments);
+		}
+
+		/// <summary>
+		/// Generate code for the specified block (and attached blocks).
+		/// </summary>
+		/// <param name="block">The block to generate code for.</param>
+		/// <returns>For statement blocks, the generated code.
+		/// For value blocks, an array containing the generated code and an
+		/// operator order value.  Returns '' if block is null.
+		/// </returns>
+		public node[] blockToCode(Block block)
+		{
+			if (block == null) {
+				return null;
+			}
+			if (block.disabled) {
+				// Skip past this block if it is disabled.
+				return this.blockToCode(block.getNextBlock());
+			}
+
+			var func = (dynamic)this[block.type];
+			if (func == null)
+				return null;
+
+			var code = (node)func.call(this, block);
+			if (code == null) {
+				// Block has handled code generation itself.
+				return null;
+			}
+			var result = new node[0];
+			if (code.GetType() == typeof(node)) {
+				do {
+					var c = (node)code.car;
+					c.block_id = block.id;
+					result.Push(c);
+				} while ((code = code.cdr as node) != null);
+			}
+			else {
+				code.block_id = block.id;
+				result.Push(code);
+			}
+			return this.scrub_(block, result);
+		}
+
+		/// <summary>
+		/// Generate code representing the specified value input.
+		/// </summary>
+		/// <param name="block">The block containing the input.</param>
+		/// <param name="name">The name of the input.</param>
+		/// 
+		/// <returns>Generated code or '' if no blocks are connected or the
+		/// specified input does not exist.</returns>
+		public node valueToCode(Block block, string name)
+		{
+			var targetBlock = block.getInputTargetBlock(name);
+			if (targetBlock == null) {
+				return null;
+			}
+			var code = this.blockToCode(targetBlock);
+			if(code == null) {
+				return null;
+			}
+			else if (code.Length == 1) {
+				return code[0];
+			}
+			else {
+				throw new Exception();
+			}
+		}
+
+		/// <summary>
+		/// Generate code representing the statement.  Indent the code.
+		/// </summary>
+		/// <param name="block">The block containing the input.</param>
+		/// <param name="name">The name of the input.</param>
+		/// <returns>Generated code or '' if no blocks are connected.</returns>
+		public begin_node statementToCode(Block block, string name)
+		{
+			var targetBlock = block.getInputTargetBlock(name);
+			var code = this.blockToCode(targetBlock);
+			// Value blocks must return code and order of operations info.
+			// Statement blocks must only return code.
+			//goog.asserts.assertString(code, "Expecting code from statement block \"%s\".",
+			//	targetBlock != null ? targetBlock.type : "");
+			if (code == null)
+				code = new node[0];
+			return new begin_node((IMrbParser)this, code);
+		}
+
+		/// <summary>
+		/// Comma-separated list of reserved words.
+		/// </summary>
+		public static string RESERVED_WORDS_ = "";
+
+		/// <summary>
+		/// Add one or more words to the list of reserved words for this language.
+		/// </summary>
+		/// <param name="words">Comma-separated list of words to add to the list.
+		/// No spaces.  Duplicates are ok.</param>
+		public static void addReservedWords(string words)
+		{
+			RESERVED_WORDS_ += words + ",";
+		}
+
+		/// <summary>
+		/// This is used as a placeholder in functions defined using
+		/// Blockly.Generator.provideFunction_.  It must not be legal code that could
+		/// legitimately appear in a function definition (or comment), and it must
+		/// not confuse the regular expression parser.
+		/// </summary>
+		public string FUNCTION_NAME_PLACEHOLDER_ = "{leCUI8hutHZI4480Dc}";
+		public Regex FUNCTION_NAME_PLACEHOLDER_REGEXP_;
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/MainLoopBlock.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/MainLoopBlock.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/MainLoopBlock.cs	(revision 270)
@@ -0,0 +1,163 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Bridge.Html5;
+using Bridge.jQuery2;
+
+namespace WebMrbc
+{
+	internal class MainLoopWorkspace : IClassWorkspace
+	{
+		internal Workspace workspace;
+		BlocklyView view;
+		protected Ruby _RubyCode;
+
+		public string Identifier { get { return view.Identifier; } }
+		public Workspace Workspace { get { return workspace; } }
+		public BlocklyView View { get { return view; } }
+		public Ruby RubyCode { get { return _RubyCode; } }
+
+		public MainLoopWorkspace(BlocklyView view)
+		{
+			this.view = view;
+			workspace = view.Init();
+
+			UpdateInitialBlock();
+		}
+
+		private void UpdateInitialBlock()
+		{
+			var xml = Document.CreateElement("xml");
+			var vset = Document.CreateElement("block");
+			vset.SetAttribute("type", "variables_set");
+			xml.AppendChild(vset);
+
+			var field = Document.CreateElement("field");
+			field.SetAttribute("name", "VAR");
+			field.AppendChild(Document.CreateTextNode("MAKER_CODE"));
+			vset.AppendChild(field);
+
+			var value = Document.CreateElement("value");
+			value.SetAttribute("name", "VALUE");
+			vset.AppendChild(value);
+
+			var text = Document.CreateElement("shadow");
+			text.SetAttribute("type", "text");
+			value.AppendChild(text);
+
+			field = Document.CreateElement("field");
+			field.SetAttribute("name", "TEXT");
+			field.AppendChild(Document.CreateTextNode("\\x00\\x00\\xB3"));/* TOPPERSプロジェクト */
+			text.AppendChild(field);
+
+			Blockly.Xml.domToWorkspace(xml, Workspace);
+		}
+
+		public string GetImageUrl()
+		{
+			return "img/no_image.png";
+		}
+
+		public bool IsPreset()
+		{
+			return true;
+		}
+
+		public string ToCode(string filename)
+		{
+			if (Collections.EcnlTaskWorkspace == null)
+				return "";
+
+			_RubyCode = new Ruby(filename);
+			var result = _RubyCode.defineMainLoop(this, Collections.EcnlTaskWorkspace.Identifier);
+			view.Changed = false;
+			return result;
+		}
+
+		//Element ele;
+
+		public void Activate()
+		{
+			//ele = Blockly.Xml.workspaceToDom(workspace);
+		}
+
+		public void Inactivate()
+		{
+			//workspace.clear();
+			//Blockly.Xml.domToWorkspace(ele, workspace);
+		}
+
+		public void ReloadToolbox(HTMLElement toolbox)
+		{
+			toolbox.AppendChild(Document.CreateElement("sep"));
+			var xml = jQuery.ParseXML(App.ArduinoToolbox);
+			var categories = xml.ChildNodes[0];
+			foreach (var item in categories.ChildNodes) {
+				if (item.NodeName != "category")
+					continue;
+				toolbox.AppendChild(item);
+			}
+		}
+
+		public void OpenModifyView(Action<bool> callback)
+		{
+			view.ReloadToolbox(this);
+			callback(true);
+		}
+
+		public string Template(string template)
+		{
+			template = template.Replace("%identifier%", Identifier);
+			template = template.Replace("%attribute%", "MainLoop");
+			template = template.Replace("%img%", GetImageUrl());
+			return template;
+		}
+	}
+
+	partial class Ruby
+	{
+		internal string defineMainLoop(MainLoopWorkspace workspace, string identifier)
+		{
+			string code = workspaceToCode(workspace.Workspace);
+			var sb = new StringBuilder();
+
+			sb.Append(code);
+			sb.AppendLine();
+
+			sb.AppendLine($"ctrl = {identifier}.new()");
+			sb.AppendLine();
+			sb.AppendLine("# メインループ");
+			sb.AppendLine("while (true) do");
+			sb.AppendLine("	# メッセージ待ち");
+			sb.AppendLine("	ret = TargetBoard::wait_msg(ctrl.timer)");
+			sb.AppendLine("	if !ret then");
+			sb.AppendLine("		break;");
+			sb.AppendLine("	end");
+			sb.AppendLine();
+			sb.AppendLine("	# 経過時間の計算");
+			sb.AppendLine("	ctrl.progress ret[0]");
+			sb.AppendLine();
+			sb.AppendLine("	# 戻り値が２つなら");
+			sb.AppendLine("	if ret.length == 2 then");
+			sb.AppendLine("		# 内部イベント");
+			sb.AppendLine("		case (ret[1])");
+			sb.AppendLine("		when 1 then");
+			sb.AppendLine("			TargetBoard::restart");
+			sb.AppendLine("		when 2 then");
+			sb.AppendLine("			ctrl.ntf_inl");
+			sb.AppendLine("		end");
+			sb.AppendLine("	# 戻り値が３つなら");
+			sb.AppendLine("	elsif ret.length == 3 then");
+			sb.AppendLine("		# 通信レイヤーからのメッセージ（通信端点と電文）");
+			sb.AppendLine("		ctrl.recv_msg(ret[1], ret[2])");
+			sb.AppendLine("	end");
+			sb.AppendLine();
+			sb.AppendLine("	# タイムアウトの処理があれば行う");
+			sb.AppendLine("	ctrl.call_timeout");
+			sb.AppendLine("end");
+
+			return sb.ToString();
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/MainMenuView.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/MainMenuView.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/MainMenuView.cs	(revision 270)
@@ -0,0 +1,412 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Bridge;
+using Bridge.Bootstrap3;
+using Bridge.Html5;
+using Bridge.jQuery2;
+using Bridge.Text.RegularExpressions;
+
+namespace WebMrbc
+{
+	public class MainMenuView
+	{
+		private Tuple<string, string>[] _BlockIds;
+		private Dictionary<string, string> _Files = new Dictionary<string, string>();
+		private Uint8Array _CFile;
+		private Uint8Array _MrbFile;
+		private string filename;
+		jQuery el;
+		IClassWorkspace current;
+
+		public MainMenuView()
+		{
+			el = new jQuery("#main-menu");
+
+			var filedialog = (HTMLInputElement)Document.GetElementById("load-file");
+			filedialog.OnChange += (ele) => {
+				if (filedialog.Value == null)
+					return;
+
+				onUpload(filedialog);
+			};
+
+			// HACK: if don't do below, can't open submenu on Chromium on Raspberry Pi
+			jQuery.Select(".dropdown-toggle").Dropdown();
+
+			Views.ClassSelectorView.Selected += ClassSelectorView1_Selected;
+			Views.ClassSelectorView.Removed += ClassSelectorView1_Removed;
+			Views.ClassSelectorView.MarkClicked += ClassSelectorView1_MarkClicked;
+
+			current = Views.ClassSelectorView.Current;
+		}
+
+		private void ToRubyAll()
+		{
+			foreach (var item in Collections.ClassWorkspaces) {
+				var view = item.View;
+				if (view.Changed || item.RubyCode == null) {
+					var rubyfile = item.Identifier + ".rb";
+					var workspace = item.Workspace;
+					var code = item.ToCode(rubyfile);
+
+					_Files[rubyfile] = code;
+				}
+			}
+		}
+
+		private void GetCompileArgs(string[] rubyfiles, string path, string ext, ref string outfile)
+		{
+			var i = rubyfiles.Length;
+			rubyfiles.Push("placeholder.out");
+
+			if (!path.EndsWith("/"))
+				path = path + "/";
+
+			ToRubyAll();
+
+			var list = new IClassWorkspace[0];
+			list.Push(Collections.LocalNode);
+			foreach (var item in Collections.ClassWorkspaces) {
+				if ((item == Collections.LocalNode)
+					|| (item == Collections.EcnlTaskWorkspace)
+					|| (item == Collections.MainLoopWorkspace))
+					continue;
+				list.Push(item);
+			}
+			list.Push(Collections.EcnlTaskWorkspace);
+			list.Push(Collections.MainLoopWorkspace);
+
+			foreach (var file in list) {
+				rubyfiles.Push(path + file.Identifier + ".rb");
+			}
+
+			if (String.IsNullOrEmpty(outfile) && (i + 1 < rubyfiles.Length))
+				outfile = rubyfiles[i + 1].Replace(new Regex(".rb$", "g"), ext.StartsWith(".") ? ext : ("." + ext));
+			rubyfiles[i] = outfile;
+		}
+
+		public void onHelp()
+		{
+			App.Module = new Mruby();
+
+			var args = new[] { "mrbc", "--help" };
+			App.Module.run(args);
+			onOutputMode();
+		}
+
+		public void onVersion()
+		{
+			App.Module = new Mruby();
+
+			var args = new[] { "mrbc", "--version" };
+			App.Module.run(args);
+			onOutputMode();
+		}
+
+		void Mruby_PreRun()
+		{
+			var FS = App.Module.GetFileSystem();
+
+			FS.createFolder("/", "src", true, false);
+			FS.createFolder("/", "build", true, true);
+
+			foreach (var f in _Files) {
+				FS.writeFile("/src/" + f.Key, f.Value);
+			}
+		}
+
+		void Mruby_ToCPostRun()
+		{
+			var FS = App.Module.GetFileSystem();
+
+			var filename = "/build/main_rb.c";
+			var stt = FS.stat(filename);
+			var stream = FS.open(filename, "r");
+			var buf = new Uint8Array(stt.size);
+			FS.read(stream, buf, 0, stt.size, 0);
+			FS.close(stream);
+
+			_CFile = buf;
+		}
+
+		void Mruby_ToMrbPostRun()
+		{
+			var FS = App.Module.GetFileSystem();
+
+			var filename = "/build/main_rb.mrb";
+			var stt = FS.stat(filename);
+			var stream = FS.open(filename, "r");
+			var buf = new Uint8Array(stt.size);
+			FS.read(stream, buf, 0, stt.size, 0);
+			FS.close(stream);
+
+			_MrbFile = buf;
+		}
+
+		public void onCompileToC()
+		{
+			var args = new[] { "mrbc", "-Bmain_rb_code", "-e", "-o" };
+			string mrbfile = "/build/main_rb.c";
+			GetCompileArgs(args, "/src/", "c", ref mrbfile);
+
+			_CFile = null;
+			App.Module = new Mruby();
+			App.Module.preRun.Push(new Action(Mruby_PreRun));
+			App.Module.postRun.Push(new Action(() => {
+				Mruby_ToCPostRun();
+
+				if (_CFile != null) {
+					App.WriteLine(App.Module.UTF8ArrayToString(_CFile, 0));
+
+					var blob = new Blob(new BlobDataObject[] { _CFile.Buffer },
+						new BlobPropertyBag() { Type = "text/plain;charset=utf-8" });
+					Script.Call("saveAs", blob, "main_rb.c");
+				}
+			}));
+			App.Module.run(args);
+			onOutputMode();
+		}
+
+		public void onCompileToMrb()
+		{
+			var args = new[] { "mrbc", "-e", "-o" };
+			string mrbfile = "/build/main_rb.mrb";
+			GetCompileArgs(args, "/src/", "mrb", ref mrbfile);
+
+			_MrbFile = null;
+			App.Module = new Mruby();
+			App.Module.preRun.Push(new Action(Mruby_PreRun));
+			App.Module.postRun.Push(new Action(() => {
+				Mruby_ToMrbPostRun();
+
+				if (_MrbFile != null) {
+					App.WriteLine((new HexDump(_MrbFile, 16)).ToString());
+
+					var blob = new Blob(new BlobDataObject[] { _MrbFile.Buffer },
+						new BlobPropertyBag() { Type = "application/octet-stream" });
+					Script.Call("saveAs", blob, "main_rb.mrb");
+				}
+			}));
+			App.Module.run(args);
+			onOutputMode();
+		}
+
+		public void onBlockMode()
+		{
+			SelectBlockTab();
+		}
+
+		public void onRubyMode()
+		{
+			UpdateCode();
+
+			SelectRubyTab();
+		}
+
+		public void onOutputMode()
+		{
+			SelectOutputTab();
+			App.Term.fit();
+		}
+
+		public void onLoad()
+		{
+			var filedialog = (HTMLInputElement)Document.GetElementById("load-file");
+			filedialog.Value = null;
+			filedialog.Click();
+		}
+
+		private void onUpload(HTMLInputElement filedialog)
+		{
+			var view = Views.ClassSelectorView.Current;
+			if (view == null)
+				return;
+
+			var file = filedialog.Files[0];
+			try {
+				var reader = Script.Write<dynamic>("new FileReader()");
+				reader.onload = new Action<object>((e) => {
+					var xml = Blockly.Xml.textToDom(reader.result);
+					Blockly.Xml.domToWorkspace(xml, view.Workspace);
+				});
+				reader.readAsText(file);
+			}
+			catch (Exception e) {
+				App.WriteLine(e.ToString());
+			}
+		}
+
+		public void onSaveWorkspace()
+		{
+			var zip = Script.Write<dynamic>("new JSZip()");
+			foreach (var e in Collections.ClassWorkspaces) {
+				var xml = Blockly.Xml.workspaceToDom(e.Workspace);
+				zip.file(e.Identifier + ".xml", xml.OuterHTML);
+			}
+			var blob = Script.Write<object>("zip.generate({ type: \"blob\" })");
+			Script.Call("saveAs", blob, "Workspace.zip");
+		}
+
+		public void onSaveRuby()
+		{
+			ToRubyAll();
+
+			var zip = Script.Write<dynamic>("new JSZip()");
+			foreach (var f in _Files) {
+				zip.file(f.Key, f.Value);
+			}
+			var blob = Script.Write<object>("zip.generate({ type: \"blob\" })");
+			Script.Call("saveAs", blob, "Workspace.zip");
+		}
+
+		public void onReset()
+		{
+		}
+
+		public void onRun()
+		{
+			var args = new[] { "mrbc", "-e", "-o" };
+			string mrbfile = "/build/main_rb.mrb";
+			GetCompileArgs(args, "/src/", "mrb", ref mrbfile);
+
+			_MrbFile = null;
+			App.Module = new Mruby();
+			App.Module.preRun.Push(new Action(Mruby_PreRun));
+			App.Module.postRun.Push(new Action(() => {
+				Mruby_ToMrbPostRun();
+
+				if (_MrbFile == null)
+					return;
+
+				App.WriteLine((new HexDump(_MrbFile, 16)).ToString());
+
+				var btn = jQuery.Select("#message-button");
+				btn.Hide();
+				var el = jQuery.Select("#message-modal");
+				el.Modal(new ModalOptions() {
+					Backdrop = "static",
+					Show = true
+				});
+				var textel = jQuery.Select("#message-text");
+				textel.Text("実行ファイルを転送しています。");
+
+				jQuery.Ajax(new AjaxOptions() {
+					Url = "/upload/main.mrb",
+					Type = "POST",
+					DataType = "*",
+					Data = _MrbFile.Buffer,
+					ProcessData = false,
+					ContentType = false,
+					Success = (data, textStatus, request) => {
+						btn.Show();
+						App.WriteLine(textStatus);
+						textel.Text("実行を開始しました。");
+					},
+					Error = (request, textStatus, error) => {
+						btn.Show();
+						App.WriteLine(textStatus);
+						textel.Text("実行に失敗しました。");
+					}
+				});
+			}));
+			App.Module.run(args);
+		}
+
+		public void onMessageClose()
+		{
+			var el = jQuery.Select("#message-modal");
+			el.Modal(ModalOperation.Hide);
+		}
+
+		private static void SelectBlockTab()
+		{
+			jQuery.Select("#tabs a[href='#block-tab']").Tab(TabOperation.Show);
+			//jQuery.Select(".blocklyToolboxDiv").Show();
+		}
+
+		private static void SelectRubyTab()
+		{
+			jQuery.Select("#tabs a[href='#ruby-tab']").Tab(TabOperation.Show);
+			//jQuery.Select(".blocklyToolboxDiv").Hide();
+		}
+
+		private static void SelectOutputTab()
+		{
+			jQuery.Select("#tabs a[href='#output-tab']").Tab(TabOperation.Show);
+			//jQuery.Select(".blocklyToolboxDiv").Hide();
+		}
+
+		private void ClassSelectorView1_Selected(object sender, EventArgs e)
+		{
+			var item = Views.ClassSelectorView.Current;
+			if (item == null) {
+				UpdateCode();
+
+				SelectRubyTab();
+			}
+			else {
+				var view = item.View;
+				view.Show();
+
+				SelectBlockTab();
+
+				foreach (var i in Collections.ClassWorkspaces) {
+					if (i != item) {
+						i.View.Hide();
+					}
+				}
+			}
+
+			if (current != item) {
+				current?.View.Hide();
+			}
+			current = item;
+		}
+
+		private void ClassSelectorView1_Removed(object sender, ItemRemovedEventArgs e)
+		{
+			var view = e.Item.View;
+			view.Dispose();
+		}
+
+		private void ClassSelectorView1_MarkClicked(object sender, EventArgs e)
+		{
+		}
+
+		private void UpdateCode()
+		{
+			string code = "";
+			var item = Views.ClassSelectorView.Current;
+			if (item != null) {
+				var view = item.View;
+				if (view.Changed || item.RubyCode == null) {
+					var rubyfile = item.Identifier + ".rb";
+					var workspace = item.Workspace;
+					code = item.ToCode(rubyfile);
+
+					_Files[rubyfile] = code;
+					this.filename = rubyfile;
+				}
+				else {
+					code = _Files[item.RubyCode.filename];
+					this.filename = item.RubyCode.filename;
+				}
+			}
+			App.CodeEditor.setValue(code);
+			App.CodeEditor.gotoLine(0, 0);
+		}
+
+		internal BlocklyView NewBlocklyView(string identifier)
+		{
+			return new BlocklyView(identifier);
+		}
+
+		internal void RemoveEObjectWorkspace(IClassWorkspace item)
+		{
+			var view = item.View;
+			view.Dispose();
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/MrbAstNodes.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/MrbAstNodes.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/MrbAstNodes.cs	(revision 270)
@@ -0,0 +1,5072 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Bridge;
+using Bridge.Html5;
+
+namespace WebMrbc
+{
+	public interface IMrbParser
+	{
+		int lineno { get; set; }
+		int column { get; set; }
+		string filename { get; }
+		string sym2name(mrb_sym sym);
+		mrb_sym[] locals_node();
+		void yyError(string message, params object[] expected);
+	}
+
+	public enum node_type
+	{
+		NODE_METHOD = 1,
+		NODE_FBODY,
+		NODE_CFUNC,
+		NODE_SCOPE,
+		NODE_BLOCK,
+		NODE_IF,
+		NODE_CASE,
+		NODE_WHEN,
+		NODE_OPT_N,
+		NODE_WHILE,
+		NODE_UNTIL,
+		NODE_ITER,
+		NODE_FOR,
+		NODE_BREAK,
+		NODE_NEXT,
+		NODE_REDO,
+		NODE_RETRY,
+		NODE_BEGIN,
+		NODE_RESCUE,
+		NODE_ENSURE,
+		NODE_AND,
+		NODE_OR,
+		NODE_NOT,
+		NODE_MASGN,
+		NODE_ASGN,
+		NODE_CDECL,
+		NODE_CVASGN,
+		NODE_CVDECL,
+		NODE_OP_ASGN,
+		NODE_CALL,
+		NODE_SCALL,
+		NODE_FCALL,
+		NODE_VCALL,
+		NODE_SUPER,
+		NODE_ZSUPER,
+		NODE_ARRAY,
+		NODE_ZARRAY,
+		NODE_HASH,
+		NODE_RETURN,
+		NODE_YIELD,
+		NODE_LVAR,
+		NODE_DVAR,
+		NODE_GVAR,
+		NODE_IVAR,
+		NODE_CONST,
+		NODE_CVAR,
+		NODE_NTH_REF,
+		NODE_BACK_REF,
+		NODE_MATCH,
+		NODE_MATCH2,
+		NODE_MATCH3,
+		NODE_INT,
+		NODE_FLOAT,
+		NODE_NEGATE,
+		NODE_LAMBDA,
+		NODE_SYM,
+		NODE_STR,
+		NODE_DSTR,
+		NODE_XSTR,
+		NODE_DXSTR,
+		NODE_REGX,
+		NODE_DREGX,
+		NODE_DREGX_ONCE,
+		NODE_LIST,
+		NODE_ARG,
+		NODE_ARGSCAT,
+		NODE_ARGSPUSH,
+		NODE_SPLAT,
+		NODE_TO_ARY,
+		NODE_SVALUE,
+		NODE_BLOCK_ARG,
+		NODE_DEF,
+		NODE_SDEF,
+		NODE_ALIAS,
+		NODE_UNDEF,
+		NODE_CLASS,
+		NODE_MODULE,
+		NODE_SCLASS,
+		NODE_COLON2,
+		NODE_COLON3,
+		NODE_CREF,
+		NODE_DOT2,
+		NODE_DOT3,
+		NODE_FLIP2,
+		NODE_FLIP3,
+		NODE_ATTRSET,
+		NODE_SELF,
+		NODE_NIL,
+		NODE_TRUE,
+		NODE_FALSE,
+		NODE_DEFINED,
+		NODE_NEWLINE,
+		NODE_POSTEXE,
+		NODE_ALLOCA,
+		NODE_DMETHOD,
+		NODE_BMETHOD,
+		NODE_MEMO,
+		NODE_IFUNC,
+		NODE_DSYM,
+		NODE_ATTRASGN,
+		NODE_HEREDOC,
+		NODE_LITERAL_DELIM,
+		NODE_WORDS,
+		NODE_SYMBOLS,
+		NODE_LAST
+	}
+
+	/* lexer states */
+	public enum mrb_lex_state_enum
+	{
+		EXPR_BEG,                   /* ignore newline, +/- is a sign. */
+		EXPR_END,                   /* newline significant, +/- is an operator. */
+		EXPR_ENDARG,                /* ditto, and unbound braces. */
+		EXPR_ENDFN,                 /* ditto, and unbound braces. */
+		EXPR_ARG,                   /* newline significant, +/- is an operator. */
+		EXPR_CMDARG,                /* newline significant, +/- is an operator. */
+		EXPR_MID,                   /* newline significant, +/- is an operator. */
+		EXPR_FNAME,                 /* ignore newline, no reserved words. */
+		EXPR_DOT,                   /* right after '.' or '::', no reserved words. */
+		EXPR_CLASS,                 /* immediate after 'class', no here document. */
+		EXPR_VALUE,                 /* alike EXPR_BEG but label is disallowed. */
+		EXPR_MAX_STATE
+	}
+
+	public enum mrb_sym { }
+
+	public enum stack_type { }
+
+	[Flags]
+	enum mrb_string_type
+	{
+		STR_FUNC_PARSING = 0x01,
+		STR_FUNC_EXPAND = 0x02,
+		STR_FUNC_REGEXP = 0x04,
+		STR_FUNC_WORD = 0x08,
+		STR_FUNC_SYMBOL = 0x10,
+		STR_FUNC_ARRAY = 0x20,
+		STR_FUNC_HEREDOC = 0x40,
+		STR_FUNC_XQUOTE = 0x80,
+
+		str_not_parsing = (0),
+		str_squote = (STR_FUNC_PARSING),
+		str_dquote = (STR_FUNC_PARSING | STR_FUNC_EXPAND),
+		str_regexp = (STR_FUNC_PARSING | STR_FUNC_REGEXP | STR_FUNC_EXPAND),
+		str_sword = (STR_FUNC_PARSING | STR_FUNC_WORD | STR_FUNC_ARRAY),
+		str_dword = (STR_FUNC_PARSING | STR_FUNC_WORD | STR_FUNC_ARRAY | STR_FUNC_EXPAND),
+		str_ssym = (STR_FUNC_PARSING | STR_FUNC_SYMBOL),
+		str_ssymbols = (STR_FUNC_PARSING | STR_FUNC_SYMBOL | STR_FUNC_ARRAY),
+		str_dsymbols = (STR_FUNC_PARSING | STR_FUNC_SYMBOL | STR_FUNC_ARRAY | STR_FUNC_EXPAND),
+		str_heredoc = (STR_FUNC_PARSING | STR_FUNC_HEREDOC),
+		str_xquote = (STR_FUNC_PARSING | STR_FUNC_XQUOTE | STR_FUNC_EXPAND),
+	}
+
+	class parser_heredoc_info
+	{
+		public bool allow_indent;
+		public bool line_head;
+		public mrb_string_type type;
+		public Uint8Array term;
+		public int term_len;
+		public node[] doc = new node[0];
+
+		public string GetString()
+		{
+			var sb = new StringBuilder();
+
+			foreach (var str in doc) {
+				if (str is str_node) {
+					sb.Append(MrbParser.UTF8ArrayToString(((str_node)str).str, 0));
+				}
+				else if (str is begin_node) {
+					foreach (var p in ((begin_node)str).progs) {
+						if (p is str_node) {
+							sb.Append(MrbParser.UTF8ArrayToString(((str_node)p).str, 0));
+						}
+						else if (p is heredoc_node) {
+							sb.Append(((heredoc_node)p).info.GetString());
+						}
+						else if (p is call_node) {
+
+						}
+						else {
+							throw new NotImplementedException();
+						}
+					}
+				}
+				else {
+					throw new NotImplementedException();
+				}
+			}
+
+			return sb.ToString();
+		}
+
+		public override string ToString()
+		{
+			return $"{term} {GetString()}";
+		}
+
+		internal void push_doc(node str)
+		{
+			doc.Push(str);
+		}
+
+		internal void claer_doc()
+		{
+			doc.Splice(0, doc.Length);
+		}
+
+		internal void to_ruby(ruby_code_cond cond)
+		{
+			cond.write_line("<<" + MrbParser.UTF8ArrayToString(term, 0));
+			foreach (var d in doc) {
+				if (d is begin_node) {
+					cond.write("#{");
+					d.to_ruby(cond);
+					cond.write("}");
+				}
+				else {
+					d.to_ruby(cond);
+				}
+			}
+			cond.write_line();
+			cond.write_line(MrbParser.UTF8ArrayToString(term, 0));
+		}
+	}
+
+	public class xml_code_cond
+	{
+		public xml_code_cond()
+		{
+		}
+
+		internal Element CreateElement(string tagname)
+		{
+			return Document.CreateElement(tagname);
+		}
+
+		internal Node CreateTextNode(string text)
+		{
+			return Document.CreateTextNode(text);
+		}
+	}
+
+	public class ruby_code_cond
+	{
+		public string newline_str { get; private set; }
+		public string indent_str { get; set; }
+		public string indent { get; private set; }
+		public int nest { get; private set; }
+
+		bool first;
+		bool space;
+		StringBuilder _code = new StringBuilder();
+		public string filename { get; private set; }
+		public int lineno { get; private set; }
+		public int column { get; private set; }
+
+		public ruby_code_cond(string filename, string indent_str = "  ")
+		{
+			this.filename = filename;
+			lineno = 1;
+			column = 0;
+			this.indent_str = indent_str;
+			indent = "";
+			newline_str = "\r\n";
+			first = true;
+			space = false;
+		}
+
+		public void increment_indent()
+		{
+			indent += indent_str;
+			if (!first) {
+				new_line();
+				first = true;
+				space = false;
+			}
+		}
+
+		private void new_line()
+		{
+			_code.Append(newline_str);
+			lineno++;
+			column = 0;
+		}
+
+		private void write_code(string code)
+		{
+			_code.Append(code);
+			column += code.Length;
+		}
+
+		public void decrement_indent()
+		{
+			indent = indent.Substring(0, indent.Length - indent_str.Length);
+			if (!first) {
+				new_line();
+				first = true;
+				space = false;
+			}
+		}
+
+		public void increment_nest()
+		{
+			nest++;
+		}
+
+		public void decrement_nest()
+		{
+			nest--;
+			System.Diagnostics.Debug.Assert(nest >= 0);
+		}
+
+		public void write(string code)
+		{
+			if (first) {
+				first = false;
+				write_code(indent);
+			}
+			write_code(code);
+			space = code.EndsWith(" ");
+		}
+
+		public void write_line(string code = null)
+		{
+			if (nest != 0 && !first && !space) {
+				write_code(" ");
+				space = true;
+			}
+			if (code != null) {
+				if (first) {
+					first = false;
+					write_code(indent);
+				}
+				write_code(code);
+				space = code.EndsWith(" ");
+			}
+			if (nest == 0) {
+				new_line();
+				space = false;
+				first = true;
+			}
+		}
+
+		internal void separate_line()
+		{
+			if (!first) {
+				new_line();
+				first = true;
+			}
+		}
+
+		public node[] nodes = new node[0];
+
+		public void add_node(node node)
+		{
+			nodes.Push(node);
+		}
+
+		public override string ToString()
+		{
+			return _code.ToString();
+		}
+	}
+
+	public class node
+	{
+		object _car;
+		object _cdr;
+
+		public IMrbParser p { get; private set; }
+		public object car {
+			get { return _car; }
+			set {
+				System.Diagnostics.Debug.Assert(GetType() == typeof(node));
+				_car = value;
+			}
+		}
+		public object cdr {
+			get { return _cdr; }
+			set {
+				System.Diagnostics.Debug.Assert(GetType() == typeof(node));
+				_cdr = value;
+			}
+		}
+		public int lineno { get; private set; }
+		public int column { get; private set; }
+		public string filename { get; private set; }
+		public string block_id;
+
+		protected node(IMrbParser p, node_type car)
+		{
+			this.p = p;
+			_car = car;
+			lineno = p.lineno;
+			column = p.column;
+			filename = p.filename;
+		}
+
+		public override string ToString()
+		{
+			if (cdr == null)
+				return $"({car})";
+			return $"({car}, {cdr})";
+		}
+
+		public void SET_LINENO(int n) { lineno = n; }
+
+		public void NODE_LINENO(node n)
+		{
+			if (n != null) {
+				filename = n.filename;
+				lineno = n.lineno;
+				column = n.column;
+			}
+		}
+
+		public static node cons(IMrbParser p, object car, object cdr)
+		{
+			var result = new node(p, 0);
+			result.car = car;
+			result.cdr = cdr;
+			return result;
+		}
+
+		public virtual void append(node b)
+		{
+			node c = this;
+			while (c.cdr != null) {
+				c = (node)c.cdr;
+			}
+			if (b != null) {
+				c.cdr = b;
+			}
+		}
+
+		public static void dump_recur<T>(T[] list, node tree)
+		{
+			while (tree != null) {
+				list.Push((T)tree.car);
+				tree = (node)tree.cdr;
+			}
+		}
+
+		public virtual Element to_xml(xml_code_cond cond)
+		{
+			var a = car as node;
+			if (a != null && cdr == null) {
+				return a.to_xml(cond);
+			}
+
+			throw new NotImplementedException();
+		}
+
+		public int start_lineno { get; private set; }
+		public int start_column { get; private set; }
+
+		public void to_ruby(ruby_code_cond cond)
+		{
+			filename = cond.filename;
+			start_lineno = cond.lineno;
+			start_column = cond.column;
+
+			to_rb(cond);
+
+			lineno = cond.lineno;
+			column = cond.column;
+
+			cond.add_node(this);
+		}
+
+		protected virtual void to_rb(ruby_code_cond cond)
+		{
+			var a = car as node;
+			while (a != null) {
+				a.to_ruby(cond);
+				a = a.cdr as node;
+			}
+		}
+	}
+
+	public class locals_node
+	{
+		public mrb_sym[] symList = new mrb_sym[0];
+		public locals_node cdr;
+
+		public locals_node(locals_node cdr)
+		{
+			this.cdr = cdr;
+		}
+
+		internal void push(mrb_sym sym)
+		{
+			symList.Push(sym);
+		}
+	}
+
+	/* (:scope (vars..) (prog...)) */
+	class scope_node : node
+	{
+		private mrb_sym[] _local_variables = new mrb_sym[0];
+		private node _body;
+
+		public scope_node(IMrbParser p, node body)
+			: base(p, node_type.NODE_SCOPE)
+		{
+			_local_variables = (mrb_sym[])_local_variables.Concat(p.locals_node());
+			_body = body;
+		}
+
+		public mrb_sym[] local_variables { get { return _local_variables; } }
+		public node body { get { return _body; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			// TODO:？？？
+			var s = cond.CreateElement("scope");
+			var b = _body.to_xml(cond);
+			if (b != null) {
+				s.AppendChild(b);
+			}
+			return s;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			_body.to_ruby(cond);
+		}
+
+		public override string ToString()
+		{
+			var str = "(:scope (";
+			foreach (var v in local_variables) {
+				str += $"{v}, ";
+			}
+			return str + $") {body})";
+		}
+	}
+
+	/* (:begin prog...) */
+	public class begin_node : node
+	{
+		private node[] _progs = new node[0];
+		bool _parentheses;
+
+		public begin_node(IMrbParser p, node body, bool parentheses = false)
+			: base(p, node_type.NODE_BEGIN)
+		{
+			while (body != null) {
+				_progs.Push(body);
+				body = (node)body.cdr;
+			}
+			_parentheses = parentheses;
+		}
+
+		public begin_node(IMrbParser p, node[] progs)
+			: base(p, node_type.NODE_BEGIN)
+		{
+			_progs = (node[])_progs.Concat(progs);
+		}
+
+		public node[] progs { get { return _progs; } }
+
+		public override void append(node b)
+		{
+			_progs.Push((node)b.car);
+		}
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			switch (_progs.Length) {
+			case 0:
+				return null;
+			case 1:
+				return _progs[0].to_xml(cond);
+			}
+			var b = _progs[0].to_xml(cond);
+			var p = b;
+			for (int i = 1; i < _progs.Length; i++) {
+				var n = cond.CreateElement("next");
+				var q = _progs[i].to_xml(cond);
+				n.AppendChild(q);
+				p.AppendChild(n);
+				p = q;
+			}
+
+			return b;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			var i = progs.Length;
+			foreach (var v in progs) {
+				var prn = _parentheses || (v is dot2_node);
+				if (prn) {
+					cond.increment_nest();
+					cond.write("(");
+				}
+				v.to_ruby(cond);
+				if (prn) {
+					cond.write(")");
+					cond.decrement_nest();
+				}
+				i--; if (i > 0) cond.separate_line();
+			}
+		}
+
+		public override string ToString()
+		{
+			var str = "(:begin ";
+			foreach (var v in progs) {
+				str += $"{v}, ";
+			}
+			return str + ")";
+		}
+	}
+
+	/* (:rescue body rescue else) */
+	class rescue_node : node
+	{
+		public class rescue_t
+		{
+			public node[] handle_classes = new node[0];
+			public node exc_var;
+			public node body;
+
+			public override string ToString()
+			{
+				var str = "(";
+				foreach (var c in handle_classes) {
+					str += $"{c}, ";
+				}
+				return $"{exc_var} {body})";
+			}
+
+			internal void to_ruby(ruby_code_cond cond)
+			{
+				cond.increment_nest();
+				cond.write("rescue");
+				int i = handle_classes.Length;
+				if (i > 0)
+					cond.write(" ");
+				foreach (var c in handle_classes) {
+					c.to_ruby(cond);
+					i--; if (i > 0) cond.write(", ");
+				}
+				if (exc_var != null) {
+					cond.write(" => ");
+					exc_var.to_ruby(cond);
+				}
+				cond.decrement_nest();
+				cond.write_line();
+				cond.increment_indent();
+				body.to_ruby(cond);
+				cond.decrement_indent();
+			}
+		}
+
+		private node _body;
+		private rescue_t[] _rescue = new rescue_t[0];
+		private node _else;
+		public bool ensure;
+
+		public rescue_node(IMrbParser p, node body, node resq, node els)
+			: base(p, node_type.NODE_RESCUE)
+		{
+			_body = body;
+			if (resq != null) {
+				var n2 = (node)resq;
+
+				while (n2 != null) {
+					rescue_t r = new rescue_t();
+					var n3 = (node)n2.car;
+					if (n3.car != null) {
+						dump_recur(r.handle_classes, (node)n3.car);
+					}
+					r.exc_var = (node)((node)n3.cdr).car;
+					r.body = (node)((node)((node)n3.cdr).cdr).car;
+					_rescue.Push(r);
+					n2 = (node)n2.cdr;
+				}
+			}
+			_else = els;
+		}
+
+		public node body { get { return _body; } }
+		public rescue_t[] rescue { get { return _rescue; } }
+		public node @else { get { return _else; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			// TODO:？？？
+			return body.to_xml(cond);
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			if (!ensure) {
+				cond.write_line("begin");
+				cond.increment_indent();
+			}
+			_body.to_ruby(cond);
+			cond.decrement_indent();
+			foreach (var r in _rescue) {
+				r.to_ruby(cond);
+			}
+			if (_else != null) {
+				cond.write_line("else");
+				cond.increment_indent();
+				_else.to_ruby(cond);
+				cond.decrement_indent();
+			}
+			if (!ensure) {
+				cond.write_line("end");
+			}
+			else {
+				cond.increment_indent();
+			}
+		}
+
+		public override string ToString()
+		{
+			var str = $"(:rescue {body} ";
+			foreach (var r in rescue) {
+				str += $"{r}, ";
+			}
+			return str + $" {@else})";
+		}
+	}
+
+	/* (:ensure body ensure) */
+	class ensure_node : node
+	{
+		private node _body;
+		private node _ensure;
+		public bool def;
+
+		public ensure_node(IMrbParser p, node a, node b)
+			: base(p, node_type.NODE_ENSURE)
+		{
+			_body = a;
+			_ensure = b;
+			if (_body is rescue_node) {
+				((rescue_node)_body).ensure = true;
+			}
+		}
+
+		public node body { get { return _body; } }
+		public node ensure { get { return _ensure; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			if (!def) {
+				cond.write_line("begin");
+				cond.increment_indent();
+			}
+			_body.to_ruby(cond);
+			cond.decrement_indent();
+			cond.write_line("ensure");
+			cond.increment_indent();
+			_ensure.to_ruby(cond);
+			if (!def) {
+				cond.decrement_indent();
+				cond.write_line("end");
+			}
+		}
+
+		public override string ToString()
+		{
+			return $"(:ensure {body} {ensure})";
+		}
+	}
+
+	/* (:nil) */
+	class nil_node : node, IEvaluatable
+	{
+		public nil_node(IMrbParser p)
+			: base(p, node_type.NODE_NIL)
+		{
+		}
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "logic_null");
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write("nil");
+		}
+
+		public override string ToString()
+		{
+			return $"(:nil)";
+		}
+
+		public node evaluate(string method, node[] args)
+		{
+			switch (method) {
+			case "!":
+				if (args.Length != 0)
+					break;
+				return new true_node(p);
+			}
+			return null;
+		}
+	}
+
+	/* (:true) */
+	class true_node : node, IEvaluatable
+	{
+		public true_node(IMrbParser p)
+			: base(p, node_type.NODE_TRUE)
+		{
+		}
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "logic_boolean");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "BOOL");
+			field.AppendChild(cond.CreateTextNode("TRUE"));
+			block.AppendChild(field);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write("true");
+		}
+
+		public override string ToString()
+		{
+			return $"(:true)";
+		}
+
+		public node evaluate(string method, node[] args)
+		{
+			switch (method) {
+			case "!":
+				if (args.Length != 0)
+					break;
+				return new false_node(p);
+			}
+			return null;
+		}
+	}
+
+	/* (:false) */
+	class false_node : node, IEvaluatable
+	{
+		public false_node(IMrbParser p)
+			: base(p, node_type.NODE_FALSE)
+		{
+		}
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "logic_boolean");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "BOOL");
+			field.AppendChild(cond.CreateTextNode("FALSE"));
+			block.AppendChild(field);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write("false");
+		}
+
+		public override string ToString()
+		{
+			return $"(:false)";
+		}
+
+		public node evaluate(string method, node[] args)
+		{
+			switch (method) {
+			case "!":
+				if (args.Length != 0)
+					break;
+				return new true_node(p);
+			}
+			return null;
+		}
+	}
+
+	/* (:alias new old) */
+	class alias_node : node
+	{
+		private mrb_sym _new;
+		private mrb_sym _old;
+
+		public alias_node(IMrbParser p, mrb_sym a, mrb_sym b)
+			: base(p, node_type.NODE_ALIAS)
+		{
+			_new = a;
+			_old = b;
+		}
+
+		public mrb_sym @new { get { return _new; } }
+		public mrb_sym old { get { return _old; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write_line($"alias {p.sym2name(_new)} {p.sym2name(_old)}");
+		}
+
+		public override string ToString()
+		{
+			return $"(:alias {p.sym2name(@new)} {p.sym2name(old)})";
+		}
+	}
+
+	/* (:if cond then else) */
+	class if_node : node
+	{
+		private node _cond;
+		private node _then;
+		private node _else;
+		bool _inline;
+
+		public if_node(IMrbParser p, node cond, node then, node @else, bool inline)
+			: base(p, node_type.NODE_IF)
+		{
+			_cond = cond;
+			_then = then;
+			_else = @else;
+			_inline = inline;
+		}
+
+		public node cond { get { return _cond; } }
+		public node then { get { return _then; } }
+		public node @else { get { return _else; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var _elsif = new Tuple<node, node>[0];
+			node _else = this._else;
+
+			_elsif.Push(new Tuple<node, node>(_cond, _then));
+			for (var c = _else as if_node; c != null; _else = c._else, c = _else as if_node) {
+				_elsif.Push(new Tuple<node, node>(c._cond, c._then));
+			}
+
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "controls_if");
+
+			var mutation = cond.CreateElement("mutation");
+			mutation.SetAttribute("elseif", _elsif.Length.ToString());
+			mutation.SetAttribute("else", _else != null ? "1" : "0");
+			block.AppendChild(mutation);
+
+			int i = 0;
+			foreach (var e in _elsif) {
+				var value = cond.CreateElement("value");
+				value.SetAttribute("name", $"IF{i}");
+				value.AppendChild(e.Item1.to_xml(cond));
+				block.AppendChild(value);
+
+				var statement = cond.CreateElement("statement");
+				statement.SetAttribute("name", $"DO{i}");
+				statement.AppendChild(e.Item2.to_xml(cond));
+				block.AppendChild(statement);
+				i++;
+			}
+
+			if (_else != null) {
+				var statement = cond.CreateElement("statement");
+				statement.SetAttribute("name", "ELSE");
+				statement.AppendChild(_else.to_xml(cond));
+				block.AppendChild(statement);
+			}
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			if (_inline) {
+				cond.increment_nest();
+				cond.write("(");
+				_cond.to_ruby(cond);
+				cond.write(" ? ");
+				_then.to_ruby(cond);
+				cond.write(" : ");
+				_else.to_ruby(cond);
+				cond.decrement_nest();
+			}
+			else {
+				var _elsif = new Tuple<node, node>[0];
+				node _else = this._else;
+
+				for (var c = _else as if_node; c != null; _else = c._else, c = _else as if_node) {
+					_elsif.Push(new Tuple<node, node>(c._cond, c._then));
+				}
+
+				cond.increment_nest();
+				cond.write("if ");
+				_cond.to_ruby(cond);
+				cond.decrement_nest();
+				cond.increment_indent();
+				_then.to_ruby(cond);
+				cond.decrement_indent();
+				foreach (var e in _elsif) {
+					cond.increment_nest();
+					cond.write("elsif ");
+					e.Item1.to_ruby(cond);
+					cond.decrement_nest();
+					cond.write_line();
+					cond.increment_indent();
+					e.Item2.to_ruby(cond);
+					cond.decrement_indent();
+				}
+
+				if (_else != null) {
+					cond.write_line("else");
+					cond.increment_indent();
+					_else.to_ruby(cond);
+					cond.decrement_indent();
+				}
+				cond.write_line("end");
+			}
+		}
+
+		public override string ToString()
+		{
+			return $"(:if {cond} {then} {@else})";
+		}
+	}
+
+	/* (:unless cond then else) */
+	class unless_node : node
+	{
+		private node _cond;
+		private node _then;
+		private node _else;
+
+		public unless_node(IMrbParser p, node a, node b, node c)
+			: base(p, node_type.NODE_IF)
+		{
+			_cond = a;
+			_then = c;
+			_else = b;
+		}
+
+		public node cond { get { return _cond; } }
+		public node then { get { return _then; } }
+		public node @else { get { return _else; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "controls_if");
+
+			var value = cond.CreateElement("value");
+			value.SetAttribute("name", "IF0");
+			value.AppendChild(_cond.to_xml(cond));
+			block.AppendChild(value);
+
+			if (_then != null) {
+				var statement = cond.CreateElement("statement");
+				statement.SetAttribute("name", "DO0");
+				block.AppendChild(statement);
+
+				statement.AppendChild(_then.to_xml(cond));
+			}
+
+			if (_else != null) {
+				var statement = cond.CreateElement("statement");
+				statement.SetAttribute("name", "ELSE");
+				block.AppendChild(statement);
+
+				statement.AppendChild(_else.to_xml(cond));
+			}
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			cond.write("unless ");
+			_cond.to_ruby(cond);
+			cond.decrement_nest();
+			cond.increment_indent();
+			_else.to_ruby(cond);
+			cond.decrement_indent();
+
+			if (_then != null) {
+				cond.write_line("else");
+				cond.increment_indent();
+				_then.to_ruby(cond);
+				cond.decrement_indent();
+			}
+			cond.write_line("end");
+		}
+
+		public override string ToString()
+		{
+			return $"(:unless {cond} {then} {@else})";
+		}
+	}
+
+	/* (:while cond body) */
+	class while_node : node
+	{
+		private node _cond;
+		private node _body;
+
+		public while_node(IMrbParser p, node a, node b)
+			: base(p, node_type.NODE_WHILE)
+		{
+			_cond = a;
+			_body = b;
+		}
+
+		public node cond { get { return _cond; } }
+		public node body { get { return _body; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "controls_whileUntil");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "MODE");
+			field.AppendChild(cond.CreateTextNode("WHILE"));
+			block.AppendChild(field);
+
+			var value = cond.CreateElement("value");
+			value.SetAttribute("name", "BOOL");
+			value.AppendChild(_cond.to_xml(cond));
+			block.AppendChild(value);
+
+			var statement = cond.CreateElement("statement");
+			statement.SetAttribute("name", "DO");
+			statement.AppendChild(_body.to_xml(cond));
+			block.AppendChild(statement);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			cond.write("while ");
+			_cond.to_ruby(cond);
+			cond.decrement_nest();
+			cond.increment_indent();
+			_body.to_ruby(cond);
+			cond.decrement_indent();
+			cond.write_line("end");
+		}
+
+		public override string ToString()
+		{
+			return $"(:while {cond} {body})";
+		}
+	}
+
+	/* (:until cond body) */
+	class until_node : node
+	{
+		private node _cond;
+		private node _body;
+
+		public until_node(IMrbParser p, node a, node b)
+			: base(p, node_type.NODE_UNTIL)
+		{
+			_cond = a;
+			_body = b;
+		}
+
+		public node cond { get { return _cond; } }
+		public node body { get { return _body; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "controls_whileUntil");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "MODE");
+			field.AppendChild(cond.CreateTextNode("UNTIL"));
+			block.AppendChild(field);
+
+			var value = cond.CreateElement("value");
+			value.SetAttribute("name", "BOOL");
+			value.AppendChild(_cond.to_xml(cond));
+			block.AppendChild(value);
+
+			var statement = cond.CreateElement("statement");
+			statement.SetAttribute("name", "DO");
+			statement.AppendChild(_body.to_xml(cond));
+			block.AppendChild(statement);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			cond.write("until ");
+			_cond.to_ruby(cond);
+			cond.decrement_nest();
+			cond.increment_indent();
+			_body.to_ruby(cond);
+			cond.decrement_indent();
+			cond.write_line("end");
+		}
+
+		public override string ToString()
+		{
+			return $"(:until {cond} {body})";
+		}
+	}
+
+	/* (:for var obj body) */
+	class for_node : node
+	{
+		public class var_t
+		{
+			public node[] pre = new node[0];
+			public node rest;
+			public node[] post = new node[0];
+
+			public override string ToString()
+			{
+				var str = "(";
+				foreach (var p in pre) {
+					str += $"{p} ";
+				}
+				str += $"{rest} ";
+				foreach (var p in post) {
+					str += $"{p} ";
+				}
+				return str + ")";
+			}
+
+			internal void to_ruby(ruby_code_cond cond)
+			{
+				int i = pre.Length + (rest != null ? 1 : 0) + post.Length;
+				foreach (var p in pre) {
+					p.to_ruby(cond);
+					i--; if (i > 0) cond.write(", ");
+				}
+				if (rest != null) {
+					rest.to_ruby(cond);
+					i--; if (i > 0) cond.write(", ");
+				}
+				foreach (var p in post) {
+					p.to_ruby(cond);
+					i--; if (i > 0) cond.write(", ");
+				}
+			}
+		}
+		private var_t _var;
+		private node _in;
+		private node _do;
+
+		public for_node(IMrbParser p, node v, node o, node b)
+			: base(p, node_type.NODE_FOR)
+		{
+			_var = new var_t();
+			node n2 = v;
+
+			if (n2.car != null) {
+				dump_recur(_var.pre, (node)n2.car);
+			}
+			n2 = (node)n2.cdr;
+			if (n2 != null) {
+				if (n2.car != null) {
+					_var.rest = (node)n2.car;
+				}
+				n2 = (node)n2.cdr;
+				if (n2 != null) {
+					if (n2.car != null) {
+						dump_recur(_var.post, (node)n2.car);
+					}
+				}
+			}
+			_in = o;
+			_do = b;
+		}
+
+		public var_t var { get { return _var; } }
+		public node @in { get { return _in; } }
+		public node @do { get { return _do; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "controls_forEach");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "VAR");
+			// TODO:var？
+			var pre = var.pre[0];
+			switch ((node_type)pre.car) {
+			case node_type.NODE_GVAR:
+				field.AppendChild(cond.CreateTextNode(p.sym2name(((gvar_node)pre).name)));
+				break;
+			case node_type.NODE_CVAR:
+				field.AppendChild(cond.CreateTextNode(p.sym2name(((cvar_node)pre).name)));
+				break;
+			case node_type.NODE_IVAR:
+				field.AppendChild(cond.CreateTextNode(p.sym2name(((ivar_node)pre).name)));
+				break;
+			case node_type.NODE_LVAR:
+				field.AppendChild(cond.CreateTextNode(p.sym2name(((lvar_node)pre).name)));
+				break;
+			default:
+				// TODO: ？
+				throw new NotImplementedException();
+			}
+			block.AppendChild(field);
+
+			var value = cond.CreateElement("value");
+			value.SetAttribute("name", "LIST");
+			value.AppendChild(_in.to_xml(cond));
+			block.AppendChild(value);
+
+			var statement = cond.CreateElement("statement");
+			statement.SetAttribute("name", "DO");
+			statement.AppendChild(_do.to_xml(cond));
+			block.AppendChild(statement);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			cond.write("for ");
+			_var.to_ruby(cond);
+			cond.write(" in ");
+			_in.to_ruby(cond);
+			cond.write(" do");
+			cond.decrement_nest();
+			cond.increment_indent();
+			_do.to_ruby(cond);
+			cond.decrement_indent();
+			cond.write_line("end");
+		}
+
+		public override string ToString()
+		{
+			return $"(:for {var} {@in} {@do})";
+		}
+	}
+
+	/* (:case a ((when ...) body) ((when...) body)) */
+	class case_node : node
+	{
+		public class when_t
+		{
+			public node[] value = new node[0];
+			public node body;
+
+			public override string ToString()
+			{
+				var str = $"(when ";
+				foreach (var c in value) {
+					str += $"{c} ";
+				}
+				return str + $"{body})";
+			}
+		}
+		private node _arg;
+		private when_t[] _when = new when_t[0];
+
+		public case_node(IMrbParser p, node a, node b)
+			: base(p, node_type.NODE_CASE)
+		{
+			_arg = a;
+			while (b != null) {
+				var w = new when_t();
+				dump_recur(w.value, (node)((node)b.car).car);
+				w.body = (node)((node)b.car).cdr;
+				_when.Push(w);
+				b = (node)b.cdr;
+			}
+		}
+
+		public case_node(IMrbParser p, node a, when_t[] b)
+			: base(p, node_type.NODE_CASE)
+		{
+			_arg = a;
+			_when = (when_t[])_when.Concat(b);
+		}
+
+		public node arg { get { return _arg; } }
+		public when_t[] when { get { return _when; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "switch_case_number");
+
+			int c = 0, d = 0;
+			when_t default_node = null;
+			foreach (var w in _when) {
+				if (w.value.Length == 0) {
+					default_node = w;
+					d = 1;
+				}
+				else
+					c++;
+			}
+
+			var mutation = cond.CreateElement("mutation");
+			mutation.SetAttribute("case", c.ToString());
+			mutation.SetAttribute("default", d.ToString());
+			block.AppendChild(mutation);
+
+			int i = 0;
+			foreach (var w in _when) {
+				if (w.value.Length == 0)
+					continue;
+
+				var field = cond.CreateElement("field");
+				field.SetAttribute("name", "CONST" + i);
+				// TODO:whenの値が複数の場合
+				field.AppendChild(cond.CreateTextNode(MrbParser.UTF8ArrayToString(((int_node)w.value[0]).num, 0)));
+				block.AppendChild(field);
+				i++;
+			}
+
+			var value = cond.CreateElement("value");
+			value.SetAttribute("name", "SWITCH");
+			block.AppendChild(value);
+
+			value.AppendChild(_arg.to_xml(cond));
+
+			foreach (var w in _when) {
+				if (w.value.Length == 0)
+					continue;
+
+				var statement = cond.CreateElement("statement");
+				statement.SetAttribute("name", "DO" + i);
+				statement.AppendChild(w.body.to_xml(cond));
+				block.AppendChild(statement);
+			}
+
+			if (default_node != null) {
+				var statement = cond.CreateElement("statement");
+				statement.SetAttribute("name", "DEFAULT");
+				statement.AppendChild(default_node.body.to_xml(cond));
+				block.AppendChild(statement);
+			}
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			cond.write("case ");
+			if (_arg != null)
+				_arg.to_ruby(cond);
+			cond.decrement_nest();
+			cond.separate_line();
+			foreach (var w in _when) {
+				cond.increment_nest();
+				var count = w.value.Length;
+				if (count != 0) {
+					cond.write("when ");
+					foreach (var v in w.value) {
+						v.to_ruby(cond);
+						count--;
+						if (count > 0)
+							cond.write(", ");
+					}
+				}
+				else
+					cond.write("else");
+				cond.decrement_nest();
+
+				cond.increment_indent();
+				w.body.to_ruby(cond);
+				cond.decrement_indent();
+			}
+			cond.write_line("end");
+		}
+
+		public override string ToString()
+		{
+			var str = $"(:case {arg} ";
+			foreach (var w in when) {
+				str += $"{w} ";
+			}
+			return str + ")";
+		}
+	}
+
+	/* (:postexe a) */
+	class postexe_node : node
+	{
+		private node _postexe;
+
+		public postexe_node(IMrbParser p, node a)
+			: base(p, node_type.NODE_POSTEXE)
+		{
+			_postexe = a;
+		}
+
+		public node postexe { get { return _postexe; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write_line("END {");
+			_postexe.to_ruby(cond);
+			cond.write_line("}");
+		}
+
+		public override string ToString()
+		{
+			return $"(:postexe {postexe})";
+		}
+	}
+
+	/* (:self) */
+	class self_node : node
+	{
+		public self_node(IMrbParser p)
+			: base(p, node_type.NODE_SELF)
+		{
+		}
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write("self");
+		}
+
+		public override string ToString()
+		{
+			return $"(:self)";
+		}
+	}
+
+	/* (:call a b c) */
+	class call_node : node
+	{
+		private node _obj;
+		private mrb_sym _method;
+		private node[] _args = new node[0];
+		private node _block;
+		private MrbTokens _pass;
+
+		public call_node(IMrbParser p, node a, mrb_sym b, node c, MrbTokens pass)
+			: base(p, pass != 0 ? node_type.NODE_CALL : node_type.NODE_SCALL)
+		{
+			_pass = pass;
+			NODE_LINENO(a);
+
+			_obj = a;
+			_method = b;
+			if (c != null) {
+				dump_recur(_args, (node)c.car);
+				if (c.cdr != null) {
+					_block = (node)c.cdr;
+				}
+			}
+		}
+
+		public call_node(IMrbParser p, node a, mrb_sym b, node[] args = null, node block = null)
+			: base(p, node_type.NODE_CALL)
+		{
+			_obj = a;
+			_method = b;
+			if (args != null)
+				_args = (node[])_args.Concat(args);
+			_block = block;
+		}
+
+		public call_node(IMrbParser p, node a, mrb_sym b, node arg)
+			: base(p, node_type.NODE_CALL)
+		{
+			_obj = a;
+			_method = b;
+			if (arg != null)
+				_args.Push(arg);
+			_pass = (MrbTokens)1;
+		}
+
+		public node obj { get { return _obj; } }
+		public mrb_sym method { get { return _method; } }
+		public node[] args { get { return _args; } }
+		public node block { get { return _block; } }
+
+		internal void add_block(node b)
+		{
+			if (b != null) {
+				if (_block != null) {
+					p.yyError("both block arg and actual block given");
+				}
+				_block = b;
+			}
+		}
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var method = p.sym2name(_method);
+			switch (method) {
+			case "==": return logic_compare(cond, "EQ");
+			case "!=": return logic_compare(cond, "NEQ");
+			case "<": return logic_compare(cond, "LT");
+			case "<=": return logic_compare(cond, "LTE");
+			case ">": return logic_compare(cond, "GT");
+			case ">=": return logic_compare(cond, "GTE");
+			}
+
+			return procedures_callreturn(cond, method);
+		}
+
+		private Element procedures_callreturn(xml_code_cond cond, string method)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "procedures_callreturn");
+
+			var mutation = cond.CreateElement("mutation");
+			mutation.SetAttribute("name", method);
+			block.AppendChild(mutation);
+
+			int i = 0;
+			foreach (var a in args) {
+				var arg = cond.CreateElement("arg");
+				// TODO: 引数名を持ってくkる
+				arg.SetAttribute("name", i.ToString());
+				arg.AppendChild(a.to_xml(cond));
+				block.AppendChild(arg);
+				i++;
+			}
+
+			return block;
+		}
+
+		private Element logic_compare(xml_code_cond cond, string op)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "logic_compare");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "OP");
+			field.AppendChild(cond.CreateTextNode(op));
+			block.AppendChild(field);
+
+			var value = cond.CreateElement("value");
+			value.SetAttribute("name", "A");
+			value.AppendChild(_obj.to_xml(cond));
+			block.AppendChild(value);
+
+			// argsは１つ
+			value = cond.CreateElement("value");
+			value.SetAttribute("name", "B");
+			value.AppendChild(args[0].to_xml(cond));
+			block.AppendChild(value);
+
+			return block;
+		}
+
+		public bool isArray(node _obj)
+		{
+			var cnst = _obj as const_node;
+			return (cnst != null) && (p.sym2name(cnst.name) == "Array");
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			var blk_arg = _block as block_arg_node;
+			var blk = _block;
+			if (blk_arg != null)
+				blk = null;
+			var m = p.sym2name(_method);
+			int i = _args.Length + (blk_arg != null ? 1 : 0);
+			if (_pass == (MrbTokens)1) {
+				cond.increment_nest();
+				switch (m) {
+				case "!":
+				case "~":
+					cond.write(m);
+					_obj.to_ruby(cond);
+					foreach (var a in _args) {
+						a.to_ruby(cond);
+						i--; if (i > 0) cond.write(", ");
+					}
+					if (blk_arg != null) {
+						blk_arg.to_ruby(cond);
+					}
+					break;
+				case "+@":
+				case "-@":
+					cond.write(m.Substring(0, 1));
+					_obj.to_ruby(cond);
+					foreach (var a in _args) {
+						a.to_ruby(cond);
+						i--; if (i > 0) cond.write(", ");
+					}
+					if (blk_arg != null) {
+						blk_arg.to_ruby(cond);
+					}
+					break;
+				default:
+					_obj.to_ruby(cond);
+					cond.write(" " + m + " ");
+					foreach (var a in _args) {
+						a.to_ruby(cond);
+						i--; if (i > 0) cond.write(", ");
+					}
+					if (blk_arg != null) {
+						blk_arg.to_ruby(cond);
+					}
+					break;
+				}
+				cond.decrement_nest();
+			}
+			else {
+				string call_op = _pass == MrbTokens.tCOLON2 ? "::" : ".";
+				switch (m) {
+				case "[]":
+					cond.increment_nest();
+					_obj.to_ruby(cond);
+					if (isArray(_obj)) {
+						cond.write(call_op + "[]");
+						cond.write("(");
+						foreach (var a in _args) {
+							a.to_ruby(cond);
+							i--; if (i > 0) cond.write(", ");
+						}
+						cond.write(")");
+					}
+					else if (i == 0)
+						cond.write("[]");
+					else {
+						cond.write("[");
+						foreach (var a in _args) {
+							a.to_ruby(cond);
+							i--; if (i > 0) cond.write(", ");
+						}
+						cond.write("]");
+					}
+					cond.decrement_nest();
+					break;
+				case "[]=":
+					cond.increment_nest();
+					_obj.to_ruby(cond);
+					cond.write(".[]=");
+					cond.write("(");
+					foreach (var a in _args) {
+						a.to_ruby(cond);
+						i--; if (i > 0) cond.write(", ");
+					}
+					if (blk_arg != null) {
+						blk_arg.to_ruby(cond);
+					}
+					cond.write(")");
+					cond.decrement_nest();
+					break;
+				default:
+					cond.increment_nest();
+					_obj.to_ruby(cond);
+					if (i == 0)
+						cond.write(call_op + m);
+					else {
+						cond.write(call_op + m + "(");
+						foreach (var a in _args) {
+							a.to_ruby(cond);
+							i--; if (i > 0) cond.write(", ");
+						}
+						if (blk_arg != null) {
+							blk_arg.to_ruby(cond);
+						}
+						cond.write(")");
+					}
+					cond.decrement_nest();
+					break;
+				}
+			}
+			if (blk != null) {
+				blk.to_ruby(cond);
+			}
+			else if (cond.nest == 0)
+				cond.write_line();
+		}
+
+		public override string ToString()
+		{
+			var str = $"(:call {obj} {p.sym2name(method)} ";
+			foreach (var v in args) {
+				str += v.ToString() + " ";
+			}
+			return str + $"{block})";
+		}
+	}
+
+	/* (:fcall self mid args) */
+	class fcall_node : node
+	{
+		private node _self;
+		private mrb_sym _method;
+		private node[] _args = new node[0];
+		private node _block;
+
+		public fcall_node(IMrbParser p, mrb_sym b, node c)
+			: base(p, node_type.NODE_FCALL)
+		{
+			node n = new self_node(p);
+			n.NODE_LINENO(c);
+			NODE_LINENO(c);
+
+			_self = n;
+			_method = b;
+			if (c != null) {
+				dump_recur(_args, (node)c.car);
+				if (c.cdr != null) {
+					_block = (node)c.cdr;
+				}
+			}
+		}
+
+		public fcall_node(IMrbParser p, mrb_sym b, node[] args = null, node block = null)
+			: base(p, node_type.NODE_FCALL)
+		{
+			_self = new self_node(p);
+			_method = b;
+			if (args != null)
+				_args = (node[])_args.Concat(args);
+			_block = block;
+		}
+
+		public node self { get { return _self; } }
+		public mrb_sym method { get { return _method; } }
+		public node[] args { get { return _args; } }
+		public node block { get { return _block; } }
+
+		internal void add_block(node b)
+		{
+			if (b != null) {
+				if (_block != null) {
+					p.yyError("both block arg and actual block given");
+				}
+				_block = b;
+			}
+		}
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "procedures_callreturn");
+
+			var mutation = cond.CreateElement("mutation");
+			mutation.SetAttribute("name", p.sym2name(_method));
+			block.AppendChild(mutation);
+
+			int i = 0;
+			foreach (var a in args) {
+				var arg = cond.CreateElement("arg");
+				// TODO: 引数名を持ってくkる
+				arg.SetAttribute("name", i.ToString());
+				arg.AppendChild(a.to_xml(cond));
+				block.AppendChild(arg);
+				i++;
+			}
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			var blk_arg = _block as block_arg_node;
+			var blk = _block;
+			if (blk_arg != null)
+				blk = null;
+			var m = p.sym2name(_method);
+			int i = _args.Length + (blk_arg != null ? 1 : 0);
+			switch (m) {
+			case "include":
+			case "raise":
+				cond.write(m + " ");
+				foreach (var a in _args) {
+					a.to_ruby(cond);
+					i--; if (i > 0) cond.write(", ");
+				}
+				if (blk_arg != null) {
+					blk_arg.to_ruby(cond);
+				}
+				break;
+			default:
+				if (i == 0)
+					cond.write(m);
+				else {
+					cond.write(m + "(");
+					foreach (var a in _args) {
+						a.to_ruby(cond);
+						i--; if (i > 0) cond.write(", ");
+					}
+					if (blk_arg != null) {
+						blk_arg.to_ruby(cond);
+					}
+					cond.write(")");
+				}
+				break;
+			}
+			cond.decrement_nest();
+			if (blk != null) {
+				blk.to_ruby(cond);
+			}
+			else if (cond.nest == 0)
+				cond.write_line();
+		}
+
+		public override string ToString()
+		{
+			var str = $"(:fcall {self} {p.sym2name(method)} ";
+			foreach (var v in args) {
+				str += v.ToString() + " ";
+			}
+			return str + $"{block})";
+		}
+	}
+
+	/* (:super . c) */
+	class super_node : node
+	{
+		private node[] _args = new node[0];
+		private node _block;
+
+		public super_node(IMrbParser p, node c)
+			: base(p, node_type.NODE_SUPER)
+		{
+			if (c != null) {
+				dump_recur(_args, (node)c.car);
+				if (c.cdr != null) {
+					_block = (node)c.cdr;
+				}
+			}
+		}
+
+		public super_node(IMrbParser p, node[] args)
+			: base(p, node_type.NODE_SUPER)
+		{
+			_args = (node[])_args.Concat(args);
+		}
+
+		public node[] args { get { return _args; } }
+		public node block { get { return _block; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "procedures_callreturn");
+
+			var mutation = cond.CreateElement("mutation");
+			mutation.SetAttribute("name", "super");
+			block.AppendChild(mutation);
+
+			int i = 0;
+			foreach (var a in args) {
+				var arg = cond.CreateElement("arg");
+				// TODO: 引数名を持ってくkる
+				arg.SetAttribute("name", i.ToString());
+				arg.AppendChild(a.to_xml(cond));
+				block.AppendChild(arg);
+				i++;
+			}
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			var blk_arg = _block as block_arg_node;
+			var blk = _block;
+			if (blk_arg != null)
+				blk = null;
+			int i = _args.Length + (blk_arg != null ? 1 : 0);
+			if (i == 0)
+				cond.write("super");
+			else {
+				cond.write("super(");
+				foreach (var a in _args) {
+					a.to_ruby(cond);
+					i--; if (i > 0) cond.write(", ");
+				}
+				if (blk_arg != null) {
+					blk_arg.to_ruby(cond);
+				}
+				cond.write(")");
+			}
+			cond.decrement_nest();
+			if (blk != null) {
+				blk.to_ruby(cond);
+			}
+			else if (cond.nest == 0)
+				cond.write_line();
+		}
+
+		public override string ToString()
+		{
+			var str = "(:super ";
+			foreach (var v in args) {
+				str += v.ToString() + " ";
+			}
+			return str + block + ")";
+		}
+
+		internal void add_block(node b)
+		{
+			if (b != null) {
+				if (_block != null) {
+					p.yyError("both block arg and actual block given");
+				}
+				_block = b;
+			}
+		}
+	}
+
+	/* (:zsuper) */
+	class zsuper_node : node
+	{
+		private node _block; // 必要?
+
+		public zsuper_node(IMrbParser p)
+			: base(p, node_type.NODE_ZSUPER)
+		{
+		}
+
+		internal void add_block(node b)
+		{
+			if (b != null) {
+				if (_block != null) {
+					p.yyError("both block arg and actual block given");
+				}
+				_block = b;
+			}
+		}
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			var blk_arg = _block as block_arg_node;
+			var blk = _block;
+			if (blk_arg != null)
+				blk = null;
+			if (blk_arg == null)
+				cond.write("super");
+			else {
+				cond.write("super(");
+				if (blk_arg != null) {
+					blk_arg.to_ruby(cond);
+				}
+				cond.write(")");
+			}
+			cond.decrement_nest();
+			if (blk != null) {
+				blk.to_ruby(cond);
+			}
+			else if (cond.nest == 0)
+				cond.write_line();
+		}
+
+		public override string ToString()
+		{
+			return $"(:zsuper)";
+		}
+	}
+
+	/* (:yield . c) */
+	class yield_node : node
+	{
+		private node[] _args = new node[0];
+
+		public yield_node(IMrbParser p, node c)
+			: base(p, node_type.NODE_YIELD)
+		{
+			if (c != null) {
+				if (c.cdr != null) {
+					p.yyError("both block arg and actual block given");
+				}
+				c = (node)c.car;
+			}
+
+			dump_recur(_args, (node)c);
+		}
+
+		public node[] args { get { return _args; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			int i = _args.Length;
+			if (i == 0)
+				cond.write("yield");
+			else {
+				cond.write("yield ");
+				foreach (var a in _args) {
+					a.to_ruby(cond);
+					i--; if (i > 0) cond.write(", ");
+				}
+			}
+			cond.decrement_nest();
+			if (cond.nest == 0)
+				cond.write_line();
+		}
+
+		public override string ToString()
+		{
+			var str = "(:yield ";
+			foreach (var v in args) {
+				str += v.ToString() + " ";
+			}
+			return str + ")";
+		}
+	}
+
+	/* (:return . c) */
+	class return_node : node
+	{
+		private node _retval;
+
+		public return_node(IMrbParser p, node c)
+			: base(p, node_type.NODE_RETURN)
+		{
+			_retval = c;
+		}
+
+		public node retval { get { return _retval; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "procedures_return");
+
+			var mutation = cond.CreateElement("mutation");
+			mutation.SetAttribute("value", (_retval != null) ? "0" : "1");
+			block.AppendChild(mutation);
+
+			if (_retval != null) {
+				var value = cond.CreateElement("value");
+				value.SetAttribute("name", "VALUE");
+				value.AppendChild(_retval.to_xml(cond));
+				block.AppendChild(value);
+			}
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			if (_retval != null) {
+				cond.write("return ");
+				_retval.to_ruby(cond);
+				cond.write_line();
+			}
+			else {
+				cond.write_line("return");
+			}
+			cond.decrement_nest();
+		}
+
+		public override string ToString()
+		{
+			return $"(:return . {retval})";
+		}
+	}
+
+	/* (:break . c) */
+	class break_node : node
+	{
+		private node _retval;
+
+		public break_node(IMrbParser p, node c)
+			: base(p, node_type.NODE_BREAK)
+		{
+			_retval = c;
+		}
+
+		public node retval { get { return _retval; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "controls_flow_statements");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "FLOW");
+			field.AppendChild(cond.CreateTextNode("BREAK"));
+			block.AppendChild(field);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			if (_retval != null) {
+				cond.write("break ");
+				_retval.to_ruby(cond);
+				cond.write_line();
+			}
+			else {
+				cond.write_line("break");
+			}
+			cond.decrement_nest();
+		}
+
+		public override string ToString()
+		{
+			return $"(:break . {retval})";
+		}
+	}
+
+	/* (:next . c) */
+	class next_node : node
+	{
+		private node _retval;
+
+		public next_node(IMrbParser p, node c)
+			: base(p, node_type.NODE_NEXT)
+		{
+			_retval = c;
+		}
+
+		public node retval { get { return _retval; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "controls_flow_statements");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "FLOW");
+			field.AppendChild(cond.CreateTextNode("CONTINUE"));
+			block.AppendChild(field);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			if (_retval != null) {
+				cond.write("next ");
+				_retval.to_ruby(cond);
+				cond.write_line();
+			}
+			else {
+				cond.write_line("next");
+			}
+			cond.decrement_nest();
+		}
+
+		public override string ToString()
+		{
+			return $"(:next . {retval})";
+		}
+	}
+
+	/* (:redo) */
+	class redo_node : node
+	{
+		public redo_node(IMrbParser p)
+			: base(p, node_type.NODE_REDO)
+		{
+		}
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write_line("redo");
+		}
+
+		public override string ToString()
+		{
+			return $"(:redo)";
+		}
+	}
+
+	/* (:retry) */
+	class retry_node : node
+	{
+		public retry_node(IMrbParser p)
+			: base(p, node_type.NODE_RETRY)
+		{
+		}
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write_line("retry");
+		}
+
+		public override string ToString()
+		{
+			return $"(:retry)";
+		}
+	}
+
+	/* (:dot2 a b) */
+	class dot2_node : node
+	{
+		private node _a;
+		private node _b;
+
+		public dot2_node(IMrbParser p, node a, node b)
+			: base(p, node_type.NODE_DOT2)
+		{
+			_a = a;
+			_b = b;
+		}
+
+		public node a { get { return _a; } }
+
+		public node b { get { return _b; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			_a.to_ruby(cond);
+			cond.write("..");
+			_b.to_ruby(cond);
+		}
+
+		public override string ToString()
+		{
+			return $"(:dot2 {a} {b})";
+		}
+	}
+
+	/* (:dot3 a b) */
+	class dot3_node : node
+	{
+		private node _a;
+		private node _b;
+
+		public dot3_node(IMrbParser p, node a, node b)
+			: base(p, node_type.NODE_DOT3)
+		{
+			_a = a;
+			_b = b;
+		}
+
+		public node a { get { return _a; } }
+
+		public node b { get { return _b; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			_a.to_ruby(cond);
+			cond.write("...");
+			_b.to_ruby(cond);
+		}
+
+		public override string ToString()
+		{
+			return $"(:dot3 {a} {b})";
+		}
+	}
+
+	/* (:colon2 b c) */
+	class colon2_node : node
+	{
+		private node _b;
+		private mrb_sym _c;
+
+		public colon2_node(IMrbParser p, node b, mrb_sym c)
+			: base(p, node_type.NODE_COLON2)
+		{
+			_b = b;
+			_c = c;
+		}
+
+		public node b { get { return _b; } }
+		public mrb_sym c { get { return _c; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			// TODO:？？？
+			var block = cond.CreateElement("class");
+			block.SetAttribute("const", p.sym2name(((const_node)_b).name));
+			block.SetAttribute("name", p.sym2name(_c));
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			_b.to_ruby(cond);
+			cond.write("::" + p.sym2name(_c));
+		}
+
+		public override string ToString()
+		{
+			return $"(:colon2 {b} {p.sym2name(c)})";
+		}
+	}
+
+	/* (:colon3 . c) */
+	class colon3_node : node
+	{
+		private mrb_sym _c;
+
+		public colon3_node(IMrbParser p, mrb_sym c)
+			: base(p, node_type.NODE_COLON3)
+		{
+			_c = c;
+		}
+
+		public mrb_sym c { get { return _c; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write("::" + p.sym2name(_c));
+		}
+
+		public override string ToString()
+		{
+			return $"(:colon3 . {p.sym2name(c)})";
+		}
+	}
+
+	/* (:and a b) */
+	class and_node : node
+	{
+		private node _a;
+		private node _b;
+
+		public and_node(IMrbParser p, node a, node b)
+			: base(p, node_type.NODE_AND)
+		{
+			_a = a;
+			_b = b;
+		}
+
+		public node a { get { return _a; } }
+
+		public node b { get { return _b; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "logic_operation");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "OP");
+			field.AppendChild(cond.CreateTextNode("AND"));
+			block.AppendChild(field);
+
+			var value = cond.CreateElement("value");
+			value.SetAttribute("name", "A");
+			value.AppendChild(_a.to_xml(cond));
+			block.AppendChild(value);
+
+			value = cond.CreateElement("value");
+			value.SetAttribute("name", "B");
+			value.AppendChild(_b.to_xml(cond));
+			block.AppendChild(value);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			_a.to_ruby(cond);
+			cond.write(" && ");
+			_b.to_ruby(cond);
+		}
+
+		public override string ToString()
+		{
+			return $"(:and {a} {b})";
+		}
+	}
+
+	/* (:or a b) */
+	class or_node : node
+	{
+		private node _a;
+		private node _b;
+
+		public or_node(IMrbParser p, node a, node b)
+			: base(p, node_type.NODE_OR)
+		{
+			_a = a;
+			_b = b;
+		}
+
+		public node a { get { return _a; } }
+		public node b { get { return _b; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "logic_operation");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "OP");
+			field.AppendChild(cond.CreateTextNode("OR"));
+			block.AppendChild(field);
+
+			var value = cond.CreateElement("value");
+			value.SetAttribute("name", "A");
+			value.AppendChild(_a.to_xml(cond));
+			block.AppendChild(value);
+
+			value = cond.CreateElement("value");
+			value.SetAttribute("name", "B");
+			value.AppendChild(_b.to_xml(cond));
+			block.AppendChild(value);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			_a.to_ruby(cond);
+			cond.write(" || ");
+			_b.to_ruby(cond);
+		}
+
+		public override string ToString()
+		{
+			return $"(:or {a} {b})";
+		}
+	}
+
+	/* (:array a...) */
+	class array_node : node
+	{
+		private node[] _array = new node[0];
+		private bool _item_per_line;
+
+		public array_node(IMrbParser p, node a)
+			: base(p, node_type.NODE_ARRAY)
+		{
+			dump_recur(_array, a);
+		}
+
+		public array_node(IMrbParser p, node[] a, bool item_per_line = false)
+			: base(p, node_type.NODE_ARRAY)
+		{
+			_array = (node[])_array.Concat(a);
+			_item_per_line = item_per_line;
+		}
+
+
+		public node[] array { get { return _array; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "lists_create_with");
+
+			var mutation = cond.CreateElement("mutation");
+			mutation.SetAttribute("items", _array.Length.ToString());
+			block.AppendChild(mutation);
+
+			int i = 0;
+			foreach (var item in _array) {
+				var value = cond.CreateElement("value");
+				value.SetAttribute("name", $"ADD{i}");
+				value.AppendChild(_array[i].to_xml(cond));
+				block.AppendChild(value);
+				i++;
+			}
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			cond.write("[");
+			if (_item_per_line) {
+				cond.separate_line();
+				cond.increment_indent();
+			}
+			int i = _array.Length;
+			foreach (var item in _array) {
+				item.to_ruby(cond);
+				i--;
+				if (i > 0) {
+					if (_item_per_line) {
+						cond.write(",");
+						cond.separate_line();
+					}
+					else
+						cond.write(", ");
+				}
+				else if (_item_per_line) {
+					cond.decrement_indent();
+					cond.separate_line();
+				}
+			}
+			cond.write("]");
+			cond.decrement_nest();
+		}
+
+		public override string ToString()
+		{
+			var str = $"(:array ";
+			foreach (var n in array) {
+				str += $"{n} ";
+			}
+			return str + ")";
+		}
+	}
+
+	/* (:splat . a) */
+	class splat_node : node
+	{
+		private node _a;
+
+		public splat_node(IMrbParser p, node a)
+			: base(p, node_type.NODE_SPLAT)
+		{
+			_a = a;
+		}
+
+		public node a { get { return _a; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write("*");
+			_a.to_ruby(cond);
+		}
+
+		public override string ToString()
+		{
+			return $"(:splat . {a})";
+		}
+	}
+
+	/* (:hash (k . v) (k . v)...) */
+	class hash_node : node
+	{
+		public class kv_t
+		{
+			public node key;
+			public node value;
+
+			public kv_t(node key, node value)
+			{
+				this.key = key;
+				this.value = value;
+			}
+
+			public override string ToString()
+			{
+				return $"({key} . {value})";
+			}
+		}
+		kv_t[] _kvs = new kv_t[0];
+
+		public hash_node(IMrbParser p, node a)
+			: base(p, node_type.NODE_HASH)
+		{
+			while (a != null) {
+				var kv = new kv_t((node)((node)a.car).car, (node)((node)a.car).cdr);
+				_kvs.Push(kv);
+				a = (node)a.cdr;
+			}
+		}
+
+		public hash_node(IMrbParser p, kv_t[] items)
+			: base(p, node_type.NODE_HASH)
+		{
+			_kvs = (kv_t[])_kvs.Concat(items);
+		}
+
+		public kv_t[] kvs { get { return _kvs; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			if (cond.nest != 0)
+				cond.write("{");
+			else
+				cond.write_line("{");
+			int i = _kvs.Length;
+			foreach (var kv in _kvs) {
+				kv.key.to_ruby(cond);
+				cond.write(" => ");
+				kv.value.to_ruby(cond);
+				i--; if (i > 0) cond.write(", ");
+			}
+			if (cond.nest != 0)
+				cond.write("}");
+			else
+				cond.write_line("}");
+		}
+
+		public override string ToString()
+		{
+			var str = $"(:hash ";
+			foreach (var n in kvs) {
+				str += $"{n} ";
+			}
+			return str + ")";
+		}
+	}
+
+	/* (:sym . a) */
+	class sym_node : node
+	{
+		private mrb_sym _name;
+
+		public sym_node(IMrbParser p, mrb_sym sym)
+			: base(p, node_type.NODE_SYM)
+		{
+			_name = sym;
+		}
+
+		public mrb_sym name { get { return _name; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "variables_get");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "VAR");
+			field.AppendChild(cond.CreateTextNode(":" + p.sym2name(_name)));
+			block.AppendChild(field);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write(":" + p.sym2name(_name));
+		}
+
+		public override string ToString()
+		{
+			return $"(:sym . {p.sym2name(name)})";
+		}
+	}
+
+	/* (:lvar . a) */
+	class lvar_node : node
+	{
+		private mrb_sym _name;
+
+		public lvar_node(IMrbParser p, mrb_sym sym)
+			: base(p, node_type.NODE_LVAR)
+		{
+			_name = sym;
+		}
+
+		public mrb_sym name { get { return _name; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "variables_get");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "VAR");
+			field.AppendChild(cond.CreateTextNode(p.sym2name(_name)));
+			block.AppendChild(field);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write(p.sym2name(_name));
+		}
+
+		public override string ToString()
+		{
+			return $"(:lvar . {p.sym2name(name)})";
+		}
+	}
+
+	/* (:gvar . a) */
+	class gvar_node : node
+	{
+		private mrb_sym _name;
+
+		public gvar_node(IMrbParser p, mrb_sym sym)
+			: base(p, node_type.NODE_GVAR)
+		{
+			_name = sym;
+		}
+
+		public mrb_sym name { get { return _name; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "variables_get");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "VAR");
+			field.AppendChild(cond.CreateTextNode(p.sym2name(_name)));
+			block.AppendChild(field);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write(p.sym2name(_name));
+		}
+
+		public override string ToString()
+		{
+			return $"(:gvar . {p.sym2name(name)})";
+		}
+	}
+
+	/* (:ivar . a) */
+	class ivar_node : node
+	{
+		private mrb_sym _name;
+
+		public ivar_node(IMrbParser p, mrb_sym sym)
+			: base(p, node_type.NODE_IVAR)
+		{
+			_name = sym;
+		}
+
+		public mrb_sym name { get { return _name; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "variables_get");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "VAR");
+			field.AppendChild(cond.CreateTextNode(p.sym2name(_name)));
+			block.AppendChild(field);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write(p.sym2name(_name));
+		}
+
+		public override string ToString()
+		{
+			return $"(:ivar . {p.sym2name(name)})";
+		}
+	}
+
+	/* (:cvar . a) */
+	class cvar_node : node
+	{
+		private mrb_sym _name;
+
+		public cvar_node(IMrbParser p, mrb_sym sym)
+			: base(p, node_type.NODE_CVAR)
+		{
+			_name = sym;
+		}
+
+		public mrb_sym name { get { return _name; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "variables_get");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "VAR");
+			field.AppendChild(cond.CreateTextNode(p.sym2name(_name)));
+			block.AppendChild(field);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write(p.sym2name(_name));
+		}
+
+		public override string ToString()
+		{
+			return $"(:cvar . {p.sym2name(name)})";
+		}
+	}
+
+	/* (:const . a) */
+	class const_node : node
+	{
+		private mrb_sym _name;
+
+		public const_node(IMrbParser p, mrb_sym sym)
+			: base(p, node_type.NODE_CONST)
+		{
+			_name = sym;
+		}
+
+		public mrb_sym name { get { return _name; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "variables_get");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "VAR");
+			field.AppendChild(cond.CreateTextNode(p.sym2name(_name)));
+			block.AppendChild(field);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write(p.sym2name(_name));
+		}
+
+		public override string ToString()
+		{
+			return $"(:const . {p.sym2name(name)})";
+		}
+	}
+
+	/* (:undef a...) */
+	class undef_node : node
+	{
+		private mrb_sym[] _syms = new mrb_sym[0];
+
+		public undef_node(IMrbParser p, mrb_sym sym)
+			: base(p, node_type.NODE_UNDEF)
+		{
+			_syms.Push(sym);
+		}
+
+		public mrb_sym[] syms { get { return _syms; } }
+
+		public override void append(node b)
+		{
+			_syms.Push((mrb_sym)b.car);
+		}
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write("undef");
+			int i = _syms.Length;
+			if (i > 0)
+				cond.write(" ");
+			foreach (var sym in _syms) {
+				cond.write(p.sym2name(sym));
+				i--;
+				if (i > 0)
+					cond.write(", ");
+			}
+		}
+
+		public override string ToString()
+		{
+			var str = "(:undef ";
+			foreach (var n in syms) {
+				str += $"{p.sym2name(n)}, ";
+			}
+			return str + ")";
+		}
+	}
+
+	/* (:class class super body) */
+	class class_node : node
+	{
+		private string _prefix;
+		private node _type;
+		private mrb_sym _name;
+		private node _super;
+		private mrb_sym _arg;
+		private node _body;
+
+		public class_node(IMrbParser p, node c, node s, node b)
+			: base(p, node_type.NODE_CLASS)
+		{
+			if (c.car is int) {
+				var type = (int)c.car;
+				if (type == 0) {
+					_prefix = ""/*":"*/;
+					_name = (mrb_sym)c.cdr;
+				}
+				else if (type == 1) {
+					_prefix = "::";
+					_name = (mrb_sym)c.cdr;
+				}
+			}
+			else {
+				_prefix = "::";
+				_type = (node)c.car;
+				_name = (mrb_sym)c.cdr;
+			}
+			_super = s;
+			var a = p.locals_node();
+			_arg = (a.Length == 0) ? 0 : a[0];
+			_body = b;
+		}
+
+		public class_node(IMrbParser p, mrb_sym name, node s, node b)
+			: base(p, node_type.NODE_CLASS)
+		{
+			_prefix = "";
+			_name = name;
+			_super = s;
+			_body = b;
+		}
+
+		public string prefix { get { return _prefix; } }
+		public mrb_sym name { get { return _name; } }
+		public node super { get { return _super; } }
+		public node body { get { return _body; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			// TODO:クラス？
+			var block = cond.CreateElement("class");
+			block.SetAttribute("name", p.sym2name(_name));
+
+			if (_super != null) {
+				var field = cond.CreateElement("field");
+				field.SetAttribute("name", "SUPER");
+				field.AppendChild(_super.to_xml(cond));
+				block.AppendChild(field);
+			}
+
+			var statement = cond.CreateElement("statement");
+			statement.SetAttribute("name", "BODY");
+			statement.AppendChild(_body.to_xml(cond));
+			block.AppendChild(statement);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write("class ");
+			if (_type != null)
+				_type.to_ruby(cond);
+			if (_prefix != null)
+				cond.write(_prefix);
+			cond.write(p.sym2name(_name) + " ");
+			if (_super != null) {
+				cond.write("< ");
+				if (_super != null)
+					_super.to_ruby(cond);
+			}
+			cond.increment_indent();
+			_body.to_ruby(cond);
+			cond.decrement_indent();
+			cond.write_line("end");
+		}
+
+		public override string ToString()
+		{
+			return $"(:class {prefix}{p.sym2name(name)} {super} {body})";
+		}
+	}
+
+	/* (:sclass obj body) */
+	class sclass_node : node
+	{
+		private node _obj;
+		private mrb_sym[] _super;
+		private node _body;
+
+		public sclass_node(IMrbParser p, node o, node b)
+			: base(p, node_type.NODE_SCLASS)
+		{
+			_obj = o;
+			_super = p.locals_node();
+			_body = b;
+		}
+
+		public node obj { get { return _obj; } }
+		public node body { get { return _body; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write("class << ");
+			_obj.to_ruby(cond);
+			/*if (_super != null) {
+				cond.write(">");
+				_super.to_ruby(cond);
+			}*/
+			cond.increment_indent();
+			_body.to_ruby(cond);
+			cond.decrement_indent();
+			cond.write_line("end");
+		}
+
+		public override string ToString()
+		{
+			return $"(:sclass {obj} {body})";
+		}
+	}
+
+	/* (:module module body) */
+	class module_node : node
+	{
+		private string _prefix;
+		private mrb_sym _name;
+		private node _type;
+		private mrb_sym[] _super;
+		private node _body;
+
+		public module_node(IMrbParser p, node m, node b)
+			: base(p, node_type.NODE_MODULE)
+		{
+			if (m.car is int) {
+				if ((int)m.car == 0) {
+					_prefix = ""/*":"*/;
+					_name = (mrb_sym)m.cdr;
+				}
+				else if ((int)m.car == 1) {
+					_prefix = "::";
+					_name = (mrb_sym)m.cdr;
+				}
+			}
+			else {
+				_prefix = "::";
+				_type = (node)m.car;
+				_name = (mrb_sym)m.cdr;
+			}
+			_super = p.locals_node();
+			_body = b;
+		}
+
+		public string prefix { get { return _prefix; } }
+		public mrb_sym name { get { return _name; } }
+		public object type { get { return _type; } }
+		public node body { get { return _body; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write("module " + p.sym2name(_name) + " ");
+			if (_super != null) {
+				if (_type != null)
+					_type.to_ruby(cond);
+				foreach (var s in _super) {
+					if (_prefix != null)
+						cond.write(_prefix + "::");
+					cond.write(p.sym2name(s));
+				}
+			}
+			cond.increment_indent();
+			_body.to_ruby(cond);
+			cond.decrement_indent();
+			cond.write_line("end");
+		}
+
+		public override string ToString()
+		{
+			return $"(:module {prefix}{p.sym2name(name)} {body})";
+		}
+	}
+
+	public class args_t
+	{
+		IMrbParser p;
+		public mrb_sym name;
+		public node arg;
+
+		public args_t(IMrbParser p)
+		{
+			this.p = p;
+		}
+
+		public override string ToString()
+		{
+			return $"({p.sym2name(name)} {arg})";
+		}
+
+		internal void to_ruby(ruby_code_cond cond)
+		{
+			cond.write(p.sym2name(name));
+			if (arg != null) {
+				cond.write(" = ");
+				arg.to_ruby(cond);
+			}
+		}
+	}
+
+	/* (:def m lv (arg . body)) */
+	class def_node : node
+	{
+		private mrb_sym _name;
+		private mrb_sym[] _local_variables = new mrb_sym[0];
+		private arg_node[] _mandatory_args = new arg_node[0];
+		private args_t[] _optional_args = new args_t[0];
+		private mrb_sym _rest;
+		private arg_node[] _post_mandatory_args = new arg_node[0];
+		private mrb_sym _blk;
+		private node _body;
+
+		public def_node(IMrbParser p, mrb_sym m, node a, node b)
+			: base(p, node_type.NODE_DEF)
+		{
+			_name = m;
+			_local_variables = (mrb_sym[])_local_variables.Concat(p.locals_node());
+			if (a != null) {
+				node n = a;
+
+				if (n.car != null) {
+					dump_recur(_mandatory_args, (node)n.car);
+				}
+				n = (node)n.cdr;
+				if (n.car != null) {
+					var n2 = (node)n.car;
+
+					while (n2 != null) {
+						var arg = new args_t(p);
+						arg.name = (mrb_sym)((node)n2.car).car;
+						arg.arg = (node)((node)n2.car).cdr;
+						_optional_args.Push(arg);
+						n2 = (node)n2.cdr;
+					}
+				}
+				n = (node)n.cdr;
+				if (n.car != null) {
+					_rest = (mrb_sym)n.car;
+				}
+				n = (node)n.cdr;
+				if (n.car != null) {
+					dump_recur(_post_mandatory_args, (node)n.car);
+				}
+				if (n.cdr != null) {
+					_blk = (mrb_sym)n.cdr;
+				}
+			}
+			_body = b;
+			if (_body is ensure_node) {
+				((ensure_node)_body).def = true;
+			}
+		}
+
+		public def_node(IMrbParser p, mrb_sym m, arg_node[] a, node b)
+			: base(p, node_type.NODE_DEF)
+		{
+			_name = m;
+			_mandatory_args = (arg_node[])_mandatory_args.Concat(a);
+			_body = b;
+		}
+
+		public mrb_sym name { get { return _name; } }
+		public mrb_sym[] local_variables { get { return _local_variables; } }
+		public arg_node[] mandatory_args { get { return _mandatory_args; } }
+		internal args_t[] optional_args { get { return _optional_args; } }
+		public mrb_sym rest { get { return _rest; } }
+		public arg_node[] post_mandatory_args { get { return _post_mandatory_args; } }
+		public mrb_sym blk { get { return _blk; } }
+		public node body { get { return _body; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "procedures_defreturn");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "NAME");
+			field.AppendChild(cond.CreateTextNode(p.sym2name(_name)));
+			block.AppendChild(field);
+
+			Element bxml;
+			if (_body != null && (bxml = _body.to_xml(cond)) != null) {
+				var statement = cond.CreateElement("statement");
+				statement.SetAttribute("name", "STACK");
+				statement.AppendChild(bxml);
+				block.AppendChild(statement);
+			}
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			cond.write("def " + p.sym2name(_name) + "(");
+			int i = _mandatory_args.Length + _optional_args.Length
+				+ (_rest != 0 ? 1 : 0) + _post_mandatory_args.Length
+				+ (_blk != 0 ? 1 : 0);
+			if (i > 0) {
+				foreach (var a in _mandatory_args) {
+					a.to_ruby(cond);
+					i--; if (i > 0) cond.write(", ");
+				}
+				foreach (var a in _optional_args) {
+					a.to_ruby(cond);
+					i--; if (i > 0) cond.write(", ");
+				}
+				if (_rest != 0) {
+					cond.write("*");
+					if (_rest != (mrb_sym)(-1))
+						cond.write(p.sym2name(_rest));
+					i--; if (i > 0) cond.write(", ");
+					foreach (var a in _post_mandatory_args) {
+						a.to_ruby(cond);
+						i--; if (i > 0) cond.write(", ");
+					}
+				}
+				if (_blk != 0) {
+					cond.write("&" + p.sym2name(_blk));
+				}
+			}
+			cond.write(")");
+			cond.decrement_nest();
+			cond.increment_indent();
+			_body.to_ruby(cond);
+			cond.decrement_indent();
+			cond.write_line("end");
+		}
+
+		public override string ToString()
+		{
+			var str = $"(:def {p.sym2name(name)} ";
+			foreach (var n in local_variables) {
+				str += $"{p.sym2name(n)}, ";
+			}
+			str += $" (";
+			foreach (var n in mandatory_args) {
+				str += $"{n}, ";
+			}
+			foreach (var n in optional_args) {
+				str += $"{n}, ";
+			}
+			str += $"{p.sym2name(rest)}, ";
+			foreach (var n in post_mandatory_args) {
+				str += $"{n}, ";
+			}
+			str += $"{p.sym2name(blk)}, ";
+			return str + $" . {body}))";
+		}
+	}
+
+	/* (:sdef obj m lv (arg . body)) */
+	class sdef_node : node
+	{
+		private node _obj;
+		private mrb_sym _name;
+		private mrb_sym[] _lv;
+		private arg_node[] _mandatory_args = new arg_node[0];
+		private args_t[] _optional_args = new args_t[0];
+		private mrb_sym _rest;
+		private arg_node[] _post_mandatory_args = new arg_node[0];
+		private mrb_sym _blk;
+		private node _body;
+
+		public sdef_node(IMrbParser p, node o, mrb_sym m, node a, node b)
+			: base(p, node_type.NODE_SDEF)
+		{
+			_obj = o;
+			_name = m;
+			_lv = p.locals_node();
+			if (a != null) {
+				node n = a;
+
+				if (n.car != null) {
+					dump_recur(_mandatory_args, (node)n.car);
+				}
+				n = (node)n.cdr;
+				if (n.car != null) {
+					var n2 = (node)n.car;
+
+					while (n2 != null) {
+						var arg = new args_t(p);
+						arg.name = (mrb_sym)((node)n2.car).car;
+						arg.arg = (node)((node)n2.car).cdr;
+						_optional_args.Push(arg);
+						n2 = (node)n2.cdr;
+					}
+				}
+				n = (node)n.cdr;
+				if (n.car != null) {
+					_rest = (mrb_sym)n.car;
+				}
+				n = (node)n.cdr;
+				if (n.car != null) {
+					dump_recur(_post_mandatory_args, (node)n.car);
+				}
+				_blk = (mrb_sym)n.cdr;
+			}
+			_body = b;
+		}
+
+		public node obj { get { return _obj; } }
+		public mrb_sym name { get { return _name; } }
+		public arg_node[] mandatory_args { get { return _mandatory_args; } }
+		internal args_t[] optional_args { get { return _optional_args; } }
+		public mrb_sym rest { get { return _rest; } }
+		public arg_node[] post_mandatory_args { get { return _post_mandatory_args; } }
+		public mrb_sym blk { get { return _blk; } }
+		public node body { get { return _body; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			cond.write("def self." + p.sym2name(_name) + "(");
+			int i = _mandatory_args.Length + _optional_args.Length
+				+ (_rest != 0 ? 1 : 0) + _post_mandatory_args.Length
+				+ (_blk != 0 ? 1 : 0);
+			if (i > 0) {
+				foreach (var a in _mandatory_args) {
+					a.to_ruby(cond);
+					i--; if (i > 0) cond.write(", ");
+				}
+				foreach (var a in _optional_args) {
+					a.to_ruby(cond);
+					i--; if (i > 0) cond.write(", ");
+				}
+				if (_rest != 0) {
+					if (_rest == (mrb_sym)(-1))
+						cond.write("*");
+					else
+						cond.write(p.sym2name(_rest));
+					i--; if (i > 0) cond.write(", ");
+					foreach (var a in _post_mandatory_args) {
+						a.to_ruby(cond);
+						i--; if (i > 0) cond.write(", ");
+					}
+				}
+				if (_blk != 0) {
+					cond.write("&" + p.sym2name(_blk));
+				}
+			}
+			cond.write(")");
+			cond.decrement_nest();
+			cond.increment_indent();
+			_body.to_ruby(cond);
+			cond.decrement_indent();
+			cond.write_line("end");
+		}
+
+		public override string ToString()
+		{
+			var str = $"(:sdef {obj} {p.sym2name(name)} (";
+			foreach (var n in mandatory_args) {
+				str += $"{n}, ";
+			}
+			foreach (var n in optional_args) {
+				str += $"{n}, ";
+			}
+			str += $"{p.sym2name(rest)}, ";
+			foreach (var n in post_mandatory_args) {
+				str += $"{n}, ";
+			}
+			str += $"{p.sym2name(blk)}, ";
+			return str + $" . {body}))";
+		}
+	}
+
+	/* (:arg . sym) */
+	class arg_node : node
+	{
+		private mrb_sym _name;
+
+		public arg_node(IMrbParser p, mrb_sym sym)
+			: base(p, node_type.NODE_ARG)
+		{
+			_name = sym;
+		}
+
+		public mrb_sym name { get { return _name; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write(p.sym2name(_name));
+		}
+
+		public override string ToString()
+		{
+			return $"(:arg . {p.sym2name(name)})";
+		}
+	}
+
+	/* (:block_arg . a) */
+	class block_arg_node : node
+	{
+		private node _a;
+
+		public block_arg_node(IMrbParser p, node a)
+			: base(p, node_type.NODE_BLOCK_ARG)
+		{
+			_a = a;
+		}
+
+		public node a { get { return _a; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write("&");
+			_a.to_ruby(cond);
+		}
+
+		public override string ToString()
+		{
+			return $"(:block_arg . {a})";
+		}
+	}
+
+	/* (:block arg body) */
+	class block_node : node
+	{
+		private mrb_sym[] _local_variables = new mrb_sym[0];
+		private node[] _mandatory_args = new node[0];
+		private args_t[] _optional_args = new args_t[0];
+		private mrb_sym _rest;
+		private node[] _post_mandatory_args = new node[0];
+		private mrb_sym _blk;
+		private node _body;
+		private bool _brace;
+
+		public block_node(IMrbParser p, node args, node body, bool brace)
+			: base(p, node_type.NODE_BLOCK)
+		{
+			_local_variables = (mrb_sym[])_local_variables.Concat(p.locals_node());
+			if (args != null) {
+				node n = args;
+
+				if (n.car != null) {
+					dump_recur(_mandatory_args, (node)n.car);
+				}
+				n = (node)n.cdr;
+				if (n.car != null) {
+					var n2 = (node)n.car;
+
+					while (n2 != null) {
+						var arg = new args_t(p);
+						arg.name = (mrb_sym)((node)n2.car).car;
+						arg.arg = (node)((node)n2.car).cdr;
+						_optional_args.Push(arg);
+						n2 = (node)n2.cdr;
+					}
+				}
+				n = (node)n.cdr;
+				if (n.car != null) {
+					_rest = (mrb_sym)n.car;
+				}
+				n = (node)n.cdr;
+				if (n.car != null) {
+					dump_recur(_post_mandatory_args, (node)n.car);
+				}
+				if (n.cdr != null) {
+					_blk = (mrb_sym)n.cdr;
+				}
+			}
+			_body = body;
+			if (_body is ensure_node) {
+				((ensure_node)_body).def = true;
+			}
+			_brace = brace;
+		}
+
+		public block_node(IMrbParser p, node[] args, node body, bool brace)
+			: base(p, node_type.NODE_BLOCK)
+		{
+			_mandatory_args = (node[])_mandatory_args.Concat(args);
+			_body = body;
+			if (_body is ensure_node) {
+				((ensure_node)_body).def = true;
+			}
+			_brace = brace;
+		}
+
+		public mrb_sym[] local_variables { get { return _local_variables; } }
+		public node[] mandatory_args { get { return _mandatory_args; } }
+		internal args_t[] optional_args { get { return _optional_args; } }
+		public mrb_sym rest { get { return _rest; } }
+		public node[] post_mandatory_args { get { return _post_mandatory_args; } }
+		public mrb_sym blk { get { return _blk; } }
+		public node body { get { return _body; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			string beg, end;
+			if (_brace) {
+				beg = " {";
+				end = "}";
+			}
+			else {
+				beg = " do";
+				end = "end";
+			}
+
+			cond.increment_nest();
+			cond.write(beg);
+			int i = _mandatory_args.Length + _optional_args.Length
+				+ (_rest != 0 ? 1 : 0) + _post_mandatory_args.Length
+				+ (_blk != 0 ? 1 : 0);
+			if (i > 0) {
+				cond.write(" |");
+				foreach (var a in _mandatory_args) {
+					a.to_ruby(cond);
+					i--; if (i > 0) cond.write(", ");
+				}
+				foreach (var a in _optional_args) {
+					a.to_ruby(cond);
+					i--; if (i > 0) cond.write(", ");
+				}
+				if (_rest != 0) {
+					cond.write("*");
+					if (_rest != (mrb_sym)(-1))
+						cond.write(p.sym2name(_rest));
+					i--; if (i > 0) cond.write(", ");
+					foreach (var a in _post_mandatory_args) {
+						a.to_ruby(cond);
+						i--; if (i > 0) cond.write(", ");
+					}
+				}
+				if (_blk != 0) {
+					cond.write("&" + p.sym2name(_blk));
+				}
+				cond.write("|");
+			}
+			cond.decrement_nest();
+			cond.increment_indent();
+			_body.to_ruby(cond);
+			cond.decrement_indent();
+			cond.write_line(end);
+		}
+
+		public override string ToString()
+		{
+			var str = $"(:block ";
+			foreach (var n in mandatory_args) {
+				str += $"{n}, ";
+			}
+			foreach (var n in optional_args) {
+				str += $"{n}, ";
+			}
+			return str + $" . {body}))";
+		}
+	}
+
+	/* (:lambda arg body) */
+	class lambda_node : node
+	{
+		private mrb_sym[] _local_variables = new mrb_sym[0];
+		private node[] _mandatory_args = new node[0];
+		private args_t[] _optional_args = new args_t[0];
+		private mrb_sym _rest;
+		private node[] _post_mandatory_args = new node[0];
+		private mrb_sym _blk;
+		private node _body;
+
+		public lambda_node(IMrbParser p, node a, node b)
+			: base(p, node_type.NODE_LAMBDA)
+		{
+			_local_variables = (mrb_sym[])_local_variables.Concat(p.locals_node());
+			if (a != null) {
+				node n = a;
+
+				if (n.car != null) {
+					dump_recur(_mandatory_args, (node)n.car);
+				}
+				n = (node)n.cdr;
+				if (n.car != null) {
+					var n2 = (node)n.car;
+
+					while (n2 != null) {
+						var arg = new args_t(p);
+						arg.name = (mrb_sym)((node)n2.car).car;
+						arg.arg = (node)((node)n2.car).cdr;
+						_optional_args.Push(arg);
+						n2 = (node)n2.cdr;
+					}
+				}
+				n = (node)n.cdr;
+				if (n.car != null) {
+					_rest = (mrb_sym)n.car;
+				}
+				n = (node)n.cdr;
+				if (n.car != null) {
+					dump_recur(_post_mandatory_args, (node)n.car);
+				}
+				if (n.cdr != null) {
+					_blk = (mrb_sym)n.cdr;
+				}
+			}
+			_body = b;
+			if (_body is ensure_node) {
+				((ensure_node)_body).def = true;
+			}
+		}
+
+		public mrb_sym[] local_variables { get { return _local_variables; } }
+		public node[] mandatory_args { get { return _mandatory_args; } }
+		internal args_t[] optional_args { get { return _optional_args; } }
+		public mrb_sym rest { get { return _rest; } }
+		public node[] post_mandatory_args { get { return _post_mandatory_args; } }
+		public mrb_sym blk { get { return _blk; } }
+		public node body { get { return _body; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			cond.write("{");
+			int i = _mandatory_args.Length + _optional_args.Length
+				+ (_rest != 0 ? 1 : 0) + _post_mandatory_args.Length
+				+ (_blk != 0 ? 1 : 0);
+			if (i > 0) {
+				cond.write(" |");
+				foreach (var a in _mandatory_args) {
+					a.to_ruby(cond);
+					i--; if (i > 0) cond.write(", ");
+				}
+				foreach (var a in _optional_args) {
+					a.to_ruby(cond);
+					i--; if (i > 0) cond.write(", ");
+				}
+				if (_rest != 0) {
+					cond.write("*");
+					if (_rest != (mrb_sym)(-1))
+						cond.write(p.sym2name(_rest));
+					i--; if (i > 0) cond.write(", ");
+					foreach (var a in _post_mandatory_args) {
+						a.to_ruby(cond);
+						i--; if (i > 0) cond.write(", ");
+					}
+				}
+				if (_blk != 0) {
+					cond.write("&" + p.sym2name(_blk));
+				}
+				cond.write("|");
+			}
+			cond.decrement_nest();
+			cond.increment_indent();
+			_body.to_ruby(cond);
+			cond.decrement_indent();
+			cond.write_line("}");
+		}
+
+		public override string ToString()
+		{
+			var str = $"(:lambda ";
+			foreach (var n in mandatory_args) {
+				str += $"{n}, ";
+			}
+			foreach (var n in optional_args) {
+				str += $"{n}, ";
+			}
+			return str + $" . {body}))";
+		}
+	}
+
+	/* (:asgn lhs rhs) */
+	class asgn_node : node
+	{
+		private node _lhs;
+		private node _rhs;
+
+		public asgn_node(IMrbParser p, node a, node b)
+			: base(p, node_type.NODE_ASGN)
+		{
+			_lhs = a;
+			_rhs = b;
+		}
+
+		public node lhs { get { return _lhs; } }
+		public node rhs { get { return _rhs; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "variables_set");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "VAR");
+			switch ((node_type)_lhs.car) {
+			case node_type.NODE_GVAR:
+				field.AppendChild(cond.CreateTextNode(p.sym2name(((gvar_node)_lhs).name)));
+				break;
+			case node_type.NODE_CVAR:
+				field.AppendChild(cond.CreateTextNode(p.sym2name(((cvar_node)_lhs).name)));
+				break;
+			case node_type.NODE_IVAR:
+				field.AppendChild(cond.CreateTextNode(p.sym2name(((ivar_node)_lhs).name)));
+				break;
+			case node_type.NODE_LVAR:
+				field.AppendChild(cond.CreateTextNode(p.sym2name(((lvar_node)_lhs).name)));
+				break;
+			default:
+				// TODO: list[0] = ...？
+				field.AppendChild(_lhs.to_xml(cond));
+				break;
+			}
+			block.AppendChild(field);
+
+			var value = cond.CreateElement("value");
+			value.SetAttribute("name", "VALUE");
+			block.AppendChild(value);
+
+			value.AppendChild(_rhs.to_xml(cond));
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			_lhs.to_ruby(cond);
+			cond.write(" = ");
+			_rhs.to_ruby(cond);
+			cond.decrement_nest();
+			cond.write_line();
+		}
+
+		public override string ToString()
+		{
+			return $"(:asgn {lhs} {rhs})";
+		}
+	}
+
+	/* (:masgn mlhs=(pre rest post)  mrhs) */
+	class masgn_node : node
+	{
+		public class mlhs_t
+		{
+			public node[] pre = new node[0];
+			public node rest;
+			public bool rest_empty;
+			public node[] post = new node[0];
+
+			public override string ToString()
+			{
+				var str = "(";
+				foreach (var p in pre) {
+					str += $"{p} ";
+				}
+				str += $"{rest} ";
+				foreach (var p in post) {
+					str += $"{p} ";
+				}
+				return str + ")";
+			}
+
+			internal void to_ruby(ruby_code_cond cond)
+			{
+				int i = pre.Length + (rest != null ? 1 : 0) + post.Length;
+				foreach (var p in pre) {
+					p.to_ruby(cond);
+					i--; if (i > 0) cond.write(", ");
+				}
+				if (rest != null) {
+					rest.to_ruby(cond);
+					i--; if (i > 0) cond.write(", ");
+				}
+				foreach (var p in post) {
+					p.to_ruby(cond);
+					i--; if (i > 0) cond.write(", ");
+				}
+			}
+		}
+		private mlhs_t _mlhs;
+		private node _mrhs;
+
+		public masgn_node(IMrbParser p, node a, node b)
+			: base(p, node_type.NODE_MASGN)
+		{
+			_mlhs = new mlhs_t();
+			{
+				node n2 = a;
+
+				if (n2.car != null) {
+					dump_recur(_mlhs.pre, (node)n2.car);
+				}
+				n2 = (node)n2.cdr;
+				if (n2 != null) {
+					if (n2.car != null) {
+						if (n2.car is int && (int)n2.car == -1) {
+							_mlhs.rest = null; //(empty)?
+							_mlhs.rest_empty = true;
+						}
+						else {
+							_mlhs.rest = (node)n2.car;
+						}
+					}
+					n2 = (node)n2.cdr;
+					if (n2 != null) {
+						if (n2.car != null) {
+							dump_recur(_mlhs.post, (node)n2.car);
+						}
+					}
+				}
+			}
+			_mrhs = b;
+		}
+
+		public mlhs_t mlhs { get { return _mlhs; } }
+		public node mrhs { get { return _mrhs; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			_mlhs.to_ruby(cond);
+			cond.write(" = ");
+			if (_mrhs != null)
+				_mrhs.to_ruby(cond);
+		}
+
+		public override string ToString()
+		{
+			return $"(:masgn {mlhs} {mrhs})";
+		}
+
+		internal bool remove(mrb_sym[] args)
+		{
+			bool m = false;
+			foreach (var a in _mlhs.pre) {
+				var arg = a as arg_node;
+				if (arg != null) {
+					var i = Array.IndexOf(args, arg.name);
+					m = i >= 0;
+					if (m)
+						args.Splice(i, 1);
+				}
+				else {
+					var masgn = a as masgn_node;
+					m = masgn.remove(args);
+				}
+				if (m)
+					return true;
+			}
+			if (_mlhs.rest != null) {
+				var rest = _mlhs.rest as arg_node;
+				if (rest != null) {
+					var i = Array.IndexOf(args, rest.name);
+					m = i >= 0;
+					if (m) {
+						args.Splice(i, 1);
+						return true;
+					}
+				}
+			}
+			foreach (var a in _mlhs.post) {
+				var arg = a as arg_node;
+				if (arg != null) {
+					var i = Array.IndexOf(args, arg.name);
+					m = i >= 0;
+					if (m)
+						args.Splice(i, 1);
+				}
+				else {
+					var masgn = a as masgn_node;
+					m = masgn.remove(args);
+				}
+				if (m)
+					return true;
+			}
+			return m;
+		}
+	}
+
+	/* (:asgn lhs rhs) */
+	class op_asgn_node : node
+	{
+		private node _lhs;
+		private mrb_sym _op;
+		private node _rhs;
+
+		public op_asgn_node(IMrbParser p, node lhs, mrb_sym op, node rhs)
+			: base(p, node_type.NODE_OP_ASGN)
+		{
+			_lhs = lhs;
+			_op = op;
+			_rhs = rhs;
+		}
+
+		public node lhs { get { return _lhs; } }
+		public mrb_sym op { get { return _op; } }
+		public node rhs { get { return _rhs; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			// TODO:Rubyの演算は数値だけとは限らない
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "math_arithmetic");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "OP");
+			switch (p.sym2name(op)) {
+			case "+": field.AppendChild(cond.CreateTextNode("ADD")); break;
+			case "-": field.AppendChild(cond.CreateTextNode("MINUS")); break;
+			case "*": field.AppendChild(cond.CreateTextNode("MULTIPLY")); break;
+			case "/": field.AppendChild(cond.CreateTextNode("DIVIDE")); break;
+			case "**": field.AppendChild(cond.CreateTextNode("POWER")); break;
+			}
+			block.AppendChild(field);
+
+			var value = cond.CreateElement("value");
+			value.SetAttribute("name", "A");
+			value.AppendChild(lhs.to_xml(cond));
+			block.AppendChild(value);
+
+			value = cond.CreateElement("value");
+			value.SetAttribute("name", "B");
+			value.AppendChild(rhs.to_xml(cond));
+			block.AppendChild(value);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			_lhs.to_ruby(cond);
+			cond.write(" " + p.sym2name(_op) + "= ");
+			_rhs.to_ruby(cond);
+			cond.decrement_nest();
+			cond.write_line();
+		}
+
+		public override string ToString()
+		{
+			return $"(:asgn {lhs} {p.sym2name(op)} {rhs})";
+		}
+	}
+
+	class negate_node : node
+	{
+		node _n;
+
+		public negate_node(IMrbParser p, node n)
+			: base(p, node_type.NODE_NEGATE)
+		{
+			this._n = n;
+		}
+
+		public node n { get { return _n; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "math_single");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "OP");
+			field.AppendChild(cond.CreateTextNode("NEG"));
+			block.AppendChild(field);
+
+			var value = cond.CreateElement("value");
+			value.SetAttribute("name", "NUM");
+			value.AppendChild(_n.to_xml(cond));
+			block.AppendChild(value);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write("-");
+			_n.to_ruby(cond);
+		}
+
+		public override string ToString()
+		{
+			return $"(:nagete {n})";
+		}
+	}
+
+	/* (:int . i) */
+	class int_node : node, IEvaluatable
+	{
+		private Uint8Array _s;
+		private int _base;
+
+		public int_node(IMrbParser p, Uint8Array s, int @base)
+			: base(p, node_type.NODE_INT)
+		{
+			_s = MrbParser.strdup(s, 0);
+			_base = @base;
+		}
+
+		public int_node(IMrbParser p, int i, int @base = 10)
+			: base(p, node_type.NODE_INT)
+		{
+			string str = "";
+			switch (@base) {
+			case 2:
+				for (uint b = 0x80000000u; b != 0; b >>= 1) {
+					str += (b & i) != 0 ? "1" : "0";
+				}
+				break;
+			case 8:
+				for (int s = 30; s > 0; s -= 3) {
+					str = ((i << s) & 0xE).ToString() + str;
+				}
+				break;
+			case 16:
+				str = i.ToString("X");
+				break;
+			default:
+				@base = 10;
+				str = i.ToString();
+				break;
+			}
+			_s = MrbParser.UTF8StringToArray(str);
+			_base = @base;
+		}
+
+		public Uint8Array num { get { return _s; } }
+		public int @base { get { return _base; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "math_number");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "NUM");
+			field.AppendChild(cond.CreateTextNode(GetString()));
+			block.AppendChild(field);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			switch (_base) {
+			case 2:
+				cond.write("0b" + MrbParser.UTF8ArrayToString(_s, 0));
+				break;
+			case 8:
+				cond.write("0o" + MrbParser.UTF8ArrayToString(_s, 0));
+				break;
+			case 16:
+				cond.write("0x" + MrbParser.UTF8ArrayToString(_s, 0));
+				break;
+			default:
+				cond.write(MrbParser.UTF8ArrayToString(_s, 0));
+				break;
+			}
+		}
+
+		public override string ToString()
+		{
+			string num = GetString();
+			return $"(:int . {num})";
+		}
+
+		private string GetString()
+		{
+			string num;
+
+			switch (_base) {
+			case 2:
+				num = "0b" + MrbParser.UTF8ArrayToString(_s, 0);
+				break;
+			case 8:
+				num = "0o" + MrbParser.UTF8ArrayToString(_s, 0);
+				break;
+			case 16:
+				num = "0x" + MrbParser.UTF8ArrayToString(_s, 0);
+				break;
+			default:
+				num = MrbParser.UTF8ArrayToString(_s, 0);
+				break;
+			}
+
+			return num;
+		}
+
+		internal long to_i()
+		{
+			var str = MrbParser.UTF8ArrayToString(_s, 0);
+			return Convert.ToInt64(str, _base);
+		}
+
+		public node evaluate(string method, node[] args)
+		{
+			if (args.Length != 1)
+				return null;
+
+			var arg = args[0];
+			var a = to_i();
+
+			if (arg is int_node) {
+				var b = ((int_node)arg).to_i();
+
+				switch (method) {
+				case "+": {
+						var c = MrbParser.UTF8StringToArray((a + b).ToString());
+						return new int_node(p, c, 10);
+					}
+				case "-": {
+						var c = MrbParser.UTF8StringToArray((a - b).ToString());
+						return new int_node(p, c, 10);
+					}
+				case "*": {
+						var c = MrbParser.UTF8StringToArray((a * b).ToString());
+						return new int_node(p, c, 10);
+					}
+				case "/": {
+						var c = MrbParser.UTF8StringToArray((a / b).ToString());
+						return new int_node(p, c, 10);
+					}
+				case "%": {
+						var c = MrbParser.UTF8StringToArray((a % b).ToString());
+						return new int_node(p, c, 10);
+					}
+				case "==": {
+						if (a == b)
+							return new true_node(p);
+						else
+							return new false_node(p);
+					}
+				case "&": {
+						var c = MrbParser.UTF8StringToArray((a & b).ToString());
+						return new int_node(p, c, 10);
+					}
+				case "|": {
+						var c = MrbParser.UTF8StringToArray((a | b).ToString());
+						return new int_node(p, c, 10);
+					}
+				case "^": {
+						var c = MrbParser.UTF8StringToArray((a ^ b).ToString());
+						return new int_node(p, c, 10);
+					}
+				case "<<": {
+						var c = MrbParser.UTF8StringToArray((a << (int)b).ToString());
+						return new int_node(p, c, 10);
+					}
+				case ">>": {
+						var c = MrbParser.UTF8StringToArray((a >> (int)b).ToString());
+						return new int_node(p, c, 10);
+					}
+				}
+			}
+			else if (arg is float_node) {
+				var b = ((float_node)arg).to_f();
+
+				switch (method) {
+				case "+": {
+						var c = MrbParser.UTF8StringToArray((a + b).ToString());
+						return new float_node(p, c);
+					}
+				case "-": {
+						var c = MrbParser.UTF8StringToArray((a - b).ToString());
+						return new float_node(p, c);
+					}
+				case "*": {
+						var c = MrbParser.UTF8StringToArray((a * b).ToString());
+						return new float_node(p, c);
+					}
+				case "/": {
+						var c = MrbParser.UTF8StringToArray((a / b).ToString());
+						return new float_node(p, c);
+					}
+				case "%": {
+						var c = MrbParser.UTF8StringToArray((a % b).ToString());
+						return new float_node(p, c);
+					}
+				case "==": {
+						if (a == b)
+							return new true_node(p);
+						else
+							return new false_node(p);
+					}
+				}
+			}
+
+			return null;
+		}
+	}
+
+	/* (:float . i) */
+	class float_node : node, IEvaluatable
+	{
+		private Uint8Array _s;
+
+		public float_node(IMrbParser p, Uint8Array s)
+			: base(p, node_type.NODE_FLOAT)
+		{
+			_s = MrbParser.strdup(s, 0);
+		}
+
+		public float_node(IMrbParser p, double f)
+			: base(p, node_type.NODE_FLOAT)
+		{
+			_s = MrbParser.UTF8StringToArray(f.ToString());
+		}
+
+		public Uint8Array num { get { return _s; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "math_number");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "NUM");
+			field.AppendChild(cond.CreateTextNode(MrbParser.UTF8ArrayToString(_s, 0)));
+			block.AppendChild(field);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write(MrbParser.UTF8ArrayToString(_s, 0));
+		}
+
+		public override string ToString()
+		{
+			return $"(:float . {num})";
+		}
+
+		internal double to_f()
+		{
+			var str = MrbParser.UTF8ArrayToString(_s, 0);
+			return Convert.ToDouble(str);
+		}
+
+		public node evaluate(string method, node[] args)
+		{
+			if (args.Length != 1)
+				return null;
+
+			var arg = args[0];
+			var a = to_f();
+
+			if (arg is int_node) {
+				var b = ((int_node)arg).to_i();
+
+				switch (method) {
+				case "+": {
+						var c = MrbParser.UTF8StringToArray((a + b).ToString());
+						return new float_node(p, c);
+					}
+				case "-": {
+						var c = MrbParser.UTF8StringToArray((a - b).ToString());
+						return new float_node(p, c);
+					}
+				case "*": {
+						var c = MrbParser.UTF8StringToArray((a * b).ToString());
+						return new float_node(p, c);
+					}
+				case "/": {
+						var c = MrbParser.UTF8StringToArray((a / b).ToString());
+						return new float_node(p, c);
+					}
+				case "%": {
+						var c = MrbParser.UTF8StringToArray((a % b).ToString());
+						return new float_node(p, c);
+					}
+				case "==": {
+						if (a == b)
+							return new true_node(p);
+						else
+							return new false_node(p);
+					}
+				}
+			}
+			else if (arg is float_node) {
+				var b = ((float_node)arg).to_f();
+
+				switch (method) {
+				case "+": {
+						var c = MrbParser.UTF8StringToArray((a + b).ToString());
+						return new float_node(p, c);
+					}
+				case "-": {
+						var c = MrbParser.UTF8StringToArray((a - b).ToString());
+						return new float_node(p, c);
+					}
+				case "*": {
+						var c = MrbParser.UTF8StringToArray((a * b).ToString());
+						return new float_node(p, c);
+					}
+				case "/": {
+						var c = MrbParser.UTF8StringToArray((a / b).ToString());
+						return new float_node(p, c);
+					}
+				case "%": {
+						var c = MrbParser.UTF8StringToArray((a % b).ToString());
+						return new float_node(p, c);
+					}
+				case "==": {
+						if (a == b)
+							return new true_node(p);
+						else
+							return new false_node(p);
+					}
+				}
+			}
+
+			return null;
+		}
+	}
+
+	/* (:str . (s . len)) */
+	class str_node : node, IEvaluatable
+	{
+		private Uint8Array _str;
+		private int _len;
+
+		public str_node(IMrbParser p, Uint8Array s, int len)
+			: base(p, node_type.NODE_STR)
+		{
+			_str = MrbParser.strndup(s, 0, len);
+			_len = len;
+		}
+
+		public str_node(IMrbParser p, string s)
+			: base(p, node_type.NODE_STR)
+		{
+			_str = MrbParser.UTF8StringToArray(s);
+			_len = _str.Length;
+		}
+
+		public Uint8Array str { get { return _str; } }
+		public int len { get { return _len; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "text");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "TEXT");
+			field.AppendChild(cond.CreateTextNode(MrbParser.UTF8ArrayToString(_str, 0)));
+			block.AppendChild(field);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			bool esc;
+			var str = MrbParser.UTF8ArrayToStringEsc(_str, 0, out esc);
+			if (esc)
+				cond.write("\"" + str.Replace("\"", "\\\"") + "\"");
+			else
+				cond.write("'" + str.Replace("'", "\\'") + "'");
+		}
+
+		public override string ToString()
+		{
+			return $"(:str . ('{str}' . {len}))";
+		}
+
+		public string to_s()
+		{
+			return MrbParser.UTF8ArrayToString(_str, 0);
+		}
+
+		public node evaluate(string method, node[] args)
+		{
+			var s = to_s();
+
+			switch (method) {
+			case "<=>": {
+					if ((args.Length != 1) || !(args[0] is str_node))
+						break;
+					var c = MrbParser.UTF8StringToArray(String.Compare(s, ((str_node)args[0]).to_s()).ToString());
+					return new int_node(p, c, 10);
+				}
+			case "==": {
+					if ((args.Length != 1) || !(args[0] is str_node))
+						break;
+					if (String.Compare(s, ((str_node)args[0]).to_s()) == 0)
+						return new true_node(p);
+					else
+						return new true_node(p);
+				}
+			case "+": {
+					if ((args.Length != 1) || !(args[0] is str_node))
+						break;
+					var t = MrbParser.UTF8StringToArray(s + ((str_node)args[0]).to_s());
+					return new str_node(p, t, t.Length - 1);
+				}
+			case "*": {
+					int a;
+					if (args.Length != 1)
+						break;
+					if (args[0] is int_node)
+						a = (int)((int_node)args[0]).to_i();
+					else if (args[0] is float_node)
+						a = (int)((float_node)args[0]).to_f();
+					else
+						break;
+					var sb = new StringBuilder();
+					for (var i = 0; i < a; i++) {
+						sb.Append(a);
+					}
+					var t = MrbParser.UTF8StringToArray(sb.ToString());
+					return new str_node(p, t, t.Length - 1);
+				}
+			}
+
+			return null;
+		}
+	}
+
+	/* (:dstr . a) */
+	class dstr_node : node
+	{
+		private node[] _a = new node[0];
+
+		public dstr_node(IMrbParser p, node a)
+			: base(p, node_type.NODE_DSTR)
+		{
+			dump_recur(_a, a);
+		}
+
+		public node[] a { get { return _a; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.increment_nest();
+			cond.write("\"");
+			foreach (var i in _a) {
+				var s = i as str_node;
+				if (s != null) {
+					var str = MrbParser.UTF8ArrayToString(s.str, 0);
+					cond.write(str.Replace("\"", "\\\""));
+				}
+				else {
+					cond.write("#{");
+					i.to_ruby(cond);
+					cond.write("}");
+				}
+			}
+			cond.write("\"");
+			cond.decrement_nest();
+		}
+
+		public override string ToString()
+		{
+			var str = $"(:dstr . ";
+			foreach (var n in a) {
+				str += $"{n} ";
+			}
+			return str + ")";
+		}
+	}
+
+	/* (:str . (s . len)) */
+	class xstr_node : node
+	{
+		private Uint8Array _str;
+		private int _len;
+
+		public xstr_node(IMrbParser p, Uint8Array s, int len)
+			: base(p, node_type.NODE_XSTR)
+		{
+			_str = MrbParser.strndup(s, 0, len);
+			_len = len;
+		}
+
+		public Uint8Array str { get { return _str; } }
+		public int len { get { return _len; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write("%x(");
+			cond.write(MrbParser.UTF8ArrayToString(_str, 0));
+			cond.write(")");
+		}
+
+		public override string ToString()
+		{
+			return $"(:str . ({str} . {len}))";
+		}
+	}
+
+	/* (:xstr . a) */
+	class dxstr_node : node
+	{
+		private node[] _a = new node[0];
+
+		public dxstr_node(IMrbParser p, node a)
+			: base(p, node_type.NODE_DXSTR)
+		{
+			dump_recur(_a, a);
+		}
+
+		public node[] a { get { return _a; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			foreach (var i in _a) {
+				i.to_ruby(cond);
+			}
+		}
+
+		public override string ToString()
+		{
+			var str = $"(:xstr . ";
+			foreach (var n in a) {
+				str += $"{n} ";
+			}
+			return str + ")";
+		}
+	}
+
+	/* (:dsym . a) */
+	class dsym_node : node
+	{
+		private dstr_node _a;
+
+		public dsym_node(IMrbParser p, node a)
+			: base(p, node_type.NODE_DSYM)
+		{
+			_a = new dstr_node(p, a);
+		}
+
+		public node[] a { get { return _a.a; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write(":");
+			_a.to_ruby(cond);
+		}
+
+		public override string ToString()
+		{
+			return $"(:dsym . {a})";
+		}
+	}
+
+	/* (:regx . (a . a)) */
+	class regx_node : node
+	{
+		Uint8Array _pattern;
+		Uint8Array _flags;
+		Uint8Array _encp;
+
+		public regx_node(IMrbParser p, Uint8Array pattern, Uint8Array flags, Uint8Array encp)
+			: base(p, node_type.NODE_REGX)
+		{
+			_pattern = pattern;
+			_flags = flags;
+			_encp = encp;
+		}
+
+		public Uint8Array pattern { get { return _pattern; } }
+		public Uint8Array flags { get { return _flags; } }
+		public Uint8Array encp { get { return _encp; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write("/" + MrbParser.UTF8ArrayToString(_pattern, 0));
+			cond.write("/" + MrbParser.UTF8ArrayToString(_flags, 0));
+			cond.write("/" + MrbParser.UTF8ArrayToString(_encp, 0));
+			cond.write("/");
+		}
+
+		public override string ToString()
+		{
+			return $"(:regx . ({pattern} . {flags} . {encp}))";
+		}
+	}
+
+	/* (:dregx . a) */
+	class dregx_node : node
+	{
+		private node[] _a = new node[0];
+		private Uint8Array _opt;
+		private Uint8Array _tail;
+
+		public dregx_node(IMrbParser p, node a, node b)
+			: base(p, node_type.NODE_DREGX)
+		{
+			dump_recur(_a, a);
+			_tail = (Uint8Array)((node)b.cdr).car;
+			_opt = (Uint8Array)((node)b.cdr).cdr;
+		}
+
+		public node[] a { get { return _a; } }
+		public Uint8Array opt { get { return _opt; } }
+		public Uint8Array tail { get { return _tail; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			foreach (var i in _a) {
+				i.to_ruby(cond);
+			}
+			cond.write(MrbParser.UTF8ArrayToString(_opt, 0));
+			cond.write(MrbParser.UTF8ArrayToString(_tail, 0));
+		}
+
+		public override string ToString()
+		{
+			var str = $"(:dregx . ";
+			foreach (var n in a) {
+				str += $"{n} ";
+			}
+			return str + $"{opt} {tail})";
+		}
+	}
+
+	/* (:backref . n) */
+	class back_ref_node : node
+	{
+		private int _n;
+
+		public back_ref_node(IMrbParser p, int n)
+			: base(p, node_type.NODE_BACK_REF)
+		{
+			_n = n;
+		}
+
+		public int n { get { return _n; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write(n.ToString());
+		}
+
+		public override string ToString()
+		{
+			return $"(:backref . {n})";
+		}
+	}
+
+	/* (:nthref . n) */
+	class nth_ref_node : node
+	{
+		private int _n;
+
+		public nth_ref_node(IMrbParser p, int n)
+			: base(p, node_type.NODE_NTH_REF)
+		{
+			_n = n;
+		}
+
+		public int n { get { return _n; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write(n.ToString());
+		}
+
+		public override string ToString()
+		{
+			return $"(:nthref . {n})";
+		}
+	}
+
+	/* (:heredoc . a) */
+	class heredoc_node : node
+	{
+		private parser_heredoc_info _info;
+
+		public heredoc_node(IMrbParser p)
+			: base(p, node_type.NODE_HEREDOC)
+		{
+			_info = new parser_heredoc_info();
+		}
+
+		public parser_heredoc_info info { get { return _info; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			var block = cond.CreateElement("block");
+			block.SetAttribute("type", "text");
+
+			var field = cond.CreateElement("field");
+			field.SetAttribute("name", "TEXT");
+			field.AppendChild(cond.CreateTextNode(info.GetString()));
+			block.AppendChild(field);
+
+			return block;
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			_info.to_ruby(cond);
+		}
+
+		public override string ToString()
+		{
+			return $"(:heredoc . {info})";
+		}
+	}
+
+	class literal_delim_node : node
+	{
+		public literal_delim_node(IMrbParser p)
+			: base(p, node_type.NODE_LITERAL_DELIM)
+		{
+		}
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+		}
+
+		public override string ToString()
+		{
+			return $"(:literal_delim)";
+		}
+	}
+
+	/* (:words . a) */
+	class words_node : node
+	{
+		private node[] _a = new node[0];
+
+		public words_node(IMrbParser p, node a)
+			: base(p, node_type.NODE_WORDS)
+		{
+			dump_recur(_a, a);
+		}
+
+		public node[] a { get { return _a; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write("%w(");
+			foreach (var i in _a) {
+				i.to_ruby(cond);
+			}
+			cond.write(")");
+		}
+
+		public override string ToString()
+		{
+			return $"(:words . {a})";
+		}
+	}
+
+	/* (:symbols . a) */
+	class symbols_node : node
+	{
+		private node[] _a = new node[0];
+
+		public symbols_node(IMrbParser p, node a)
+			: base(p, node_type.NODE_SYMBOLS)
+		{
+			dump_recur(_a, a);
+		}
+
+		public node[] a { get { return _a; } }
+
+		public override Element to_xml(xml_code_cond cond)
+		{
+			throw new NotImplementedException();
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write("%i{");
+			foreach (var i in _a) {
+				i.to_ruby(cond);
+			}
+			cond.write("}");
+		}
+
+		public override string ToString()
+		{
+			return $"(:symbols . {a})";
+		}
+	}
+
+	class filename_node : str_node
+	{
+		public filename_node(IMrbParser p, Uint8Array s, int len)
+			: base(p, s, len)
+		{
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write("__FILE__");
+		}
+	}
+
+	class lineno_node : int_node
+	{
+		public lineno_node(IMrbParser p, int lineno)
+			: base(p, MrbParser.UTF8StringToArray(lineno.ToString()), 10)
+		{
+		}
+
+		protected override void to_rb(ruby_code_cond cond)
+		{
+			cond.write("__LINE__");
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/MrbParser.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/MrbParser.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/MrbParser.cs	(revision 270)
@@ -0,0 +1,9196 @@
+// created by jay 1.1.0 (c) 2002-2006 ats@cs.rit.edu
+// skeleton c# 1.1.0 (c) 2002-2006 ats@cs.rit.edu
+
+#line 8 "mrb_parse.jay"
+// can first specify namespace
+// could specify using directives
+// [this has not been done here to stress-test the skeleton]
+using System;
+using Bridge;
+using Bridge.Html5;
+
+namespace WebMrbc
+{
+	public enum MrbTokens
+	{
+#line default
+
+		// %token constants
+		keyword_class = 257,
+		keyword_module = 258,
+		keyword_def = 259,
+		keyword_begin = 260,
+		keyword_if = 261,
+		keyword_unless = 262,
+		keyword_while = 263,
+		keyword_until = 264,
+		keyword_for = 265,
+		keyword_undef = 266,
+		keyword_rescue = 267,
+		keyword_ensure = 268,
+		keyword_end = 269,
+		keyword_then = 270,
+		keyword_elsif = 271,
+		keyword_else = 272,
+		keyword_case = 273,
+		keyword_when = 274,
+		keyword_break = 275,
+		keyword_next = 276,
+		keyword_redo = 277,
+		keyword_retry = 278,
+		keyword_in = 279,
+		keyword_do = 280,
+		keyword_do_cond = 281,
+		keyword_do_block = 282,
+		keyword_do_LAMBDA = 283,
+		keyword_return = 284,
+		keyword_yield = 285,
+		keyword_super = 286,
+		keyword_self = 287,
+		keyword_nil = 288,
+		keyword_true = 289,
+		keyword_false = 290,
+		keyword_and = 291,
+		keyword_or = 292,
+		keyword_not = 293,
+		modifier_if = 294,
+		modifier_unless = 295,
+		modifier_while = 296,
+		modifier_until = 297,
+		modifier_rescue = 298,
+		keyword_alias = 299,
+		keyword_BEGIN = 300,
+		keyword_END = 301,
+		keyword__LINE__ = 302,
+		keyword__FILE__ = 303,
+		keyword__ENCODING__ = 304,
+		tIDENTIFIER = 305,
+		tFID = 306,
+		tGVAR = 307,
+		tIVAR = 308,
+		tCONSTANT = 309,
+		tCVAR = 310,
+		tLABEL = 311,
+		tINTEGER = 312,
+		tFLOAT = 313,
+		tCHAR = 314,
+		tXSTRING = 315,
+		tREGEXP = 316,
+		tSTRING = 317,
+		tSTRING_PART = 318,
+		tSTRING_MID = 319,
+		tLABEL_END = 320,
+		tNTH_REF = 321,
+		tBACK_REF = 322,
+		tREGEXP_END = 323,
+		tUPLUS = 324,
+		tUMINUS = 325,
+		tPOW = 326,
+		tCMP = 327,
+		tEQ = 328,
+		tEQQ = 329,
+		tNEQ = 330,
+		tGEQ = 331,
+		tLEQ = 332,
+		tANDOP = 333,
+		tOROP = 334,
+		tMATCH = 335,
+		tNMATCH = 336,
+		tDOT2 = 337,
+		tDOT3 = 338,
+		tAREF = 339,
+		tASET = 340,
+		tLSHFT = 341,
+		tRSHFT = 342,
+		tCOLON2 = 343,
+		tCOLON3 = 344,
+		tOP_ASGN = 345,
+		tASSOC = 346,
+		tLPAREN = 347,
+		tLPAREN_ARG = 348,
+		tRPAREN = 349,
+		tLBRACK = 350,
+		tLBRACE = 351,
+		tLBRACE_ARG = 352,
+		tSTAR = 353,
+		tAMPER = 354,
+		tLAMBDA = 355,
+		tANDDOT = 356,
+		tSYMBEG = 357,
+		tREGEXP_BEG = 358,
+		tWORDS_BEG = 359,
+		tSYMBOLS_BEG = 360,
+		tSTRING_BEG = 361,
+		tXSTRING_BEG = 362,
+		tSTRING_DVAR = 363,
+		tLAMBEG = 364,
+		tHEREDOC_BEG = 365,
+		tHEREDOC_END = 366,
+		tLITERAL_DELIM = 367,
+		tHD_LITERAL_DELIM = 368,
+		tHD_STRING_PART = 369,
+		tHD_STRING_MID = 370,
+		tLOWEST = 371,
+		tUMINUS_NUM = 372,
+		tLAST_TOKEN = 373,
+		yyErrorCode = 256
+#line 167 "mrb_parse.jay"
+	}
+
+	/// <summary>
+	///   start with an argument to trace
+	/// </summary>
+	public partial class MrbParser
+	{
+		// must specify class header
+		// must not use yy[A-Z].* as identifiers
+		// could overwrite some methods named yy[A-Z].* in subclass
+
+		const int yyErrorCode = (int)MrbTokens.yyErrorCode;
+#line default
+
+		/// <summary>
+		///   final state of parser.
+		/// </summary>
+		protected const int yyFinal = 1;
+
+		/// <summary>
+		///   parser tables.
+		///   Order is mandated by jay.
+		/// </summary>
+		protected static readonly short[] yyLhs = new short[] {
+			//yyLhs 559
+				-1,   110,     0,    11,    12,    12,    12,    12,    13,   113,
+				13,    14,    15,    16,    16,    16,    16,   114,    17,    17,
+				17,    17,    17,    17,    17,    17,    17,    17,    17,    17,
+				17,    17,    47,    47,    47,    47,    47,    47,    47,    47,
+				48,    48,    48,    18,    18,    18,    18,    18,    18,    24,
+				22,    22,    52,    52,   117,    79,    21,    21,    21,    21,
+				21,    21,    21,    21,    21,    21,    21,    84,    84,    90,
+				90,    87,    87,    87,    87,    87,    87,    87,    87,    87,
+				87,    88,    88,    85,    85,    86,    86,    89,    89,    89,
+				89,    89,    89,    89,    89,    81,    81,    81,    81,    81,
+				81,    81,    81,    97,    97,     9,     9,     9,    98,    98,
+				98,    98,    98,    91,    91,    66,   120,    66,    99,    99,
+				99,    99,    99,    99,    99,    99,    99,    99,    99,    99,
+				99,    99,    99,    99,    99,    99,    99,    99,    99,    99,
+				99,    99,    99,    99,    99,    99,    99,   119,   119,   119,
+			   119,   119,   119,   119,   119,   119,   119,   119,   119,   119,
+			   119,   119,   119,   119,   119,   119,   119,   119,   119,   119,
+			   119,   119,   119,   119,   119,   119,   119,   119,   119,   119,
+			   119,   119,   119,   119,   119,   119,   119,    19,    19,    19,
+				19,    19,    19,    19,    19,    19,    19,    19,    19,    19,
+				19,    19,    19,    19,    19,    19,    19,    19,    19,    19,
+				19,    19,    19,    19,    19,    19,    19,    19,    19,    19,
+				19,    19,    19,    19,    19,    19,    19,    19,    19,    42,
+				42,    42,    42,    25,    25,    38,    39,    39,    37,    37,
+				37,    37,    37,    36,    36,    36,    36,    36,   123,    41,
+				44,    43,    43,   122,   122,    35,    35,    35,    35,    49,
+				49,    49,    20,    20,    20,    20,    20,    20,    20,    20,
+			   125,    20,   126,   127,    20,   128,    20,    20,    20,    20,
+				20,    20,    20,    20,    20,    20,    20,    20,    20,   129,
+			   130,    20,    20,    20,   132,   134,    20,   135,   136,    20,
+				20,    20,   137,   138,    20,   139,    20,   141,   142,    20,
+			   143,    20,   144,   145,    20,   147,   148,    20,    20,    20,
+				20,    20,    26,   131,   131,   131,   133,   133,    27,    27,
+				28,    28,    68,    68,    60,    60,    61,    61,    62,    62,
+				62,    62,    62,    62,    62,    62,    62,    69,    69,    69,
+				69,    69,    69,    69,    69,    69,    69,    69,    69,    69,
+				69,    69,    70,    70,    71,    71,    71,    74,    74,    73,
+				73,    75,    75,    76,    76,    77,    77,   149,    80,    51,
+				51,    51,    51,    23,    23,    23,    23,    23,    23,    23,
+				23,    23,   150,    78,   151,    78,    29,    30,    30,    31,
+				31,    32,    32,    32,    33,    33,    34,    34,     7,     7,
+				 7,     7,     2,     2,     2,     2,     3,     3,     4,   152,
+				 4,     4,     4,     5,     5,     6,     6,   105,   124,   124,
+			   153,   153,   154,   154,   155,   156,   155,   106,   106,    10,
+				10,    93,    92,    92,    92,    92,    92,    92,   107,   107,
+				 8,     8,     8,     8,    40,    40,    40,    40,    40,    46,
+				45,    45,    45,    45,    45,    45,    45,    67,    67,    50,
+			   157,    50,    55,    55,    56,    56,    56,    56,    56,    56,
+				56,    56,    56,    56,    56,    56,    56,    56,    56,    83,
+				83,    83,    83,   103,   103,    58,    58,    57,    57,   104,
+				72,    54,    53,    53,    59,    59,   158,   158,   100,   100,
+			   159,   159,   101,   102,   102,     1,   160,     1,    63,    63,
+				64,    64,    65,    65,    65,    65,    65,    94,    94,    94,
+				95,    95,    95,    95,    96,    96,    96,   146,   146,   108,
+			   108,   109,   109,   111,   111,   116,   116,   118,   115,   121,
+			   121,   121,   140,   140,   140,   161,   112,   112,    82,
+					}, yyLen = new short[] {
+			//yyLen 559
+				 2,     0,     2,     2,     1,     1,     3,     2,     1,     0,
+				 5,     4,     2,     1,     1,     3,     2,     0,     4,     2,
+				 3,     3,     3,     3,     3,     4,     1,     3,     3,     3,
+				 3,     1,     3,     3,     6,     5,     5,     5,     5,     3,
+				 1,     3,     1,     1,     3,     3,     3,     2,     1,     1,
+				 1,     1,     1,     4,     0,     5,     2,     3,     4,     5,
+				 4,     5,     2,     2,     2,     2,     2,     1,     3,     1,
+				 3,     1,     2,     3,     5,     2,     4,     2,     4,     1,
+				 3,     1,     3,     2,     3,     1,     2,     1,     4,     3,
+				 3,     3,     3,     2,     1,     1,     4,     3,     3,     3,
+				 3,     2,     1,     1,     1,     2,     1,     3,     1,     1,
+				 1,     1,     1,     1,     1,     1,     0,     4,     1,     1,
+				 1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+				 1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+				 1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+				 1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+				 1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+				 1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+				 1,     1,     1,     1,     1,     1,     1,     3,     3,     6,
+				 5,     5,     5,     5,     4,     3,     3,     3,     3,     3,
+				 3,     3,     3,     3,     4,     4,     2,     2,     3,     3,
+				 3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
+				 3,     2,     2,     3,     3,     3,     3,     6,     1,     1,
+				 2,     4,     2,     1,     3,     3,     1,     1,     1,     1,
+				 2,     4,     2,     1,     2,     2,     4,     1,     0,     2,
+				 2,     2,     1,     1,     2,     1,     2,     3,     4,     3,
+				 4,     2,     1,     1,     1,     1,     1,     1,     1,     1,
+				 0,     4,     0,     0,     5,     0,     3,     3,     3,     2,
+				 3,     3,     1,     2,     4,     3,     2,     1,     2,     0,
+				 0,     5,     6,     6,     0,     0,     7,     0,     0,     7,
+				 5,     4,     0,     0,     9,     0,     6,     0,     0,     8,
+				 0,     5,     0,     0,     7,     0,     0,     9,     1,     1,
+				 1,     1,     1,     1,     1,     2,     1,     1,     1,     5,
+				 1,     2,     1,     1,     1,     3,     1,     3,     1,     4,
+				 6,     3,     5,     2,     4,     1,     3,     6,     8,     4,
+				 6,     4,     2,     6,     2,     4,     6,     2,     4,     2,
+				 4,     1,     1,     1,     3,     1,     4,     1,     4,     1,
+				 3,     1,     1,     4,     1,     3,     3,     0,     5,     2,
+				 4,     5,     5,     2,     4,     4,     3,     3,     3,     2,
+				 1,     4,     0,     5,     0,     5,     5,     1,     1,     6,
+				 1,     1,     1,     1,     2,     1,     2,     1,     1,     1,
+				 1,     1,     1,     1,     2,     3,     1,     2,     1,     0,
+				 4,     1,     2,     2,     3,     2,     3,     1,     1,     2,
+				 1,     2,     1,     2,     1,     0,     4,     2,     3,     1,
+				 4,     2,     1,     1,     1,     1,     1,     2,     2,     3,
+				 1,     1,     2,     2,     1,     1,     1,     1,     1,     1,
+				 1,     1,     1,     1,     1,     1,     1,     1,     1,     0,
+				 0,     4,     3,     2,     6,     8,     4,     6,     4,     6,
+				 2,     4,     6,     2,     4,     2,     4,     1,     0,     1,
+				 1,     1,     1,     1,     1,     1,     3,     1,     3,     2,
+				 2,     2,     1,     3,     1,     3,     1,     1,     2,     1,
+				 1,     1,     2,     2,     1,     1,     0,     4,     1,     2,
+				 1,     3,     3,     2,     2,     3,     4,     1,     1,     1,
+				 1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+				 1,     1,     1,     0,     1,     0,     1,     2,     2,     0,
+				 1,     1,     1,     1,     1,     1,     1,     2,     0,
+					}, yyDefRed = new short[] {
+			//yyDefRed 986
+				 1,     0,     0,     0,     0,     0,     0,   270,     0,     0,
+			   294,   297,     0,     0,     0,     0,     0,   320,   321,     0,
+				 0,     0,   462,   461,   463,   464,     0,     0,     9,     0,
+			   466,   465,     0,     0,   456,   455,     0,   457,   450,   451,
+			   412,   413,   467,   468,     0,     0,     0,     0,     0,     0,
+				 0,     0,   289,     0,     0,     0,     0,     0,     0,   427,
+				 0,     0,     0,   263,   264,   265,   262,   408,   409,     2,
+				 0,     5,     0,     0,     0,     0,     0,    43,     0,     0,
+				 0,   267,     0,    26,     0,    51,     0,     0,     4,     0,
+				 0,    67,     0,    81,   439,     0,   266,   410,   411,     7,
+			   318,   319,   282,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   322,     0,   460,   268,     0,   106,   310,
+			   157,   167,   158,   154,   183,   184,   185,   186,   165,   180,
+			   173,   163,   162,   178,   161,   160,   156,   181,   155,   168,
+			   172,   174,   166,   159,   175,   182,   177,     0,     0,     0,
+				 0,   153,   171,   170,   152,   150,   151,     0,     0,   149,
+				 0,   110,     0,   142,   143,   139,   121,   122,   123,   130,
+			   127,   129,   124,   125,   144,   145,   131,   132,   136,   126,
+			   128,   118,   119,   120,   133,   134,   135,   137,   138,   140,
+			   141,   146,   516,     0,   515,   312,   111,   112,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   332,   333,   176,   169,   179,
+			   164,   147,   148,   108,   109,     0,     0,   115,   114,   113,
+			   430,   435,   434,   552,   555,     0,     0,     0,   556,   554,
+				 0,   432,   553,     0,     0,     0,     0,     0,     0,     0,
+			   243,     0,    65,   247,     0,   520,    66,    64,     0,   237,
+			   283,    63,   236,     0,   389,    62,     0,     0,   546,    17,
+				 0,     0,   206,     0,     0,     0,     0,     0,     0,     0,
+				 0,    13,     0,     0,     0,     0,     0,     0,     0,   229,
+				 0,     0,     0,   518,     0,     0,     0,     0,     0,     0,
+				 0,   444,   443,   445,   446,     0,   441,   442,   425,   419,
+			   418,   421,     0,     0,   416,   437,     0,   448,     0,   414,
+				 0,   423,     0,     0,     0,   221,    47,   222,     3,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   377,   379,   394,   392,   288,     0,   540,
+				 0,   539,     0,     0,   542,   541,     0,     0,     0,     0,
+				 0,     0,     0,    83,   383,     0,   286,     0,   103,     0,
+			   105,   452,   453,   470,   305,     0,     0,     0,     0,     0,
+			   538,   537,   315,   313,     0,     0,     0,   324,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   302,     0,   116,     0,     0,     0,     0,
+			   557,   431,   433,     0,     0,     0,     0,     0,     0,     0,
+				 0,   244,   252,     0,     0,   245,     0,     0,   239,     0,
+				 0,   238,   249,     0,     0,   285,    46,     0,     0,     0,
+				 0,     0,     0,     0,     0,   277,    12,     0,     0,     0,
+			   276,   230,     0,   550,   280,   232,   551,   281,   519,     0,
+				 0,    80,     0,     0,     0,     0,     0,     0,   491,   490,
+			   489,   492,     0,   507,   511,   510,   506,     0,   374,     0,
+			   497,     0,   504,   290,   493,     0,   487,   495,     0,     0,
+				 0,   447,     0,     0,     0,   428,   426,   417,   438,   449,
+			   415,   424,     0,     0,     6,    20,    21,    22,    23,    24,
+				44,    45,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   388,     0,   386,     0,     0,     0,
+			   532,     0,   387,     0,   533,     0,     0,   188,     0,    42,
+				33,     0,     0,   530,   531,     0,   195,    39,     0,     0,
+			   187,     0,    32,    28,     0,    27,    30,     0,     0,     0,
+				84,    54,    57,     0,     0,     0,     0,     0,     0,   107,
+				 0,     0,     0,     0,     0,     0,   271,     0,     0,   400,
+				 0,   325,     0,     0,     0,     0,     0,     0,   327,   295,
+			   326,   298,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   301,     0,     0,     0,     0,     0,     0,
+			   251,     0,   521,     0,     0,   235,     0,   284,   547,    18,
+				 0,    25,   194,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,    78,   499,   494,     0,     0,   336,     0,
+				 0,   334,     0,     0,   514,   480,     0,   483,     0,     0,
+			   485,     0,   508,   512,   440,     0,   429,     0,     0,     0,
+			   365,     0,     0,   363,   362,     0,     0,     0,     0,   385,
+				 0,     0,     0,     0,     0,   384,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,    82,    76,     0,
+				 0,   308,     0,     0,   391,   311,   517,   316,     0,     0,
+				 0,     0,     0,   402,   403,     0,     0,   330,     0,     0,
+			   328,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   117,   436,   300,     0,     0,     0,     0,   246,     0,
+				10,   274,   231,     0,     0,     0,     0,     0,   496,     0,
+				 0,   498,     0,     0,   513,     0,   505,     0,     0,     0,
+			   291,     0,   420,     0,     0,   502,     0,     0,     0,     0,
+			   361,     0,     0,     0,     0,   192,    38,    37,   193,    61,
+				 0,   548,   190,    35,   191,    36,    59,     0,    41,     0,
+				 0,     0,     0,     0,   381,   382,     0,     0,    74,     0,
+				 0,   471,   306,     0,     0,     0,   473,     0,     0,   405,
+			   331,     0,    11,   407,     0,   292,     0,   293,     0,     0,
+			   303,     0,     0,     0,   335,     0,     0,     0,   337,   373,
+				 0,     0,   476,     0,   478,     0,   484,     0,   481,     0,
+				 0,   486,     0,     0,   357,     0,   354,     0,   364,     0,
+			   359,     0,     0,   378,   395,   393,   189,    34,     0,     0,
+				 0,     0,     0,   472,   314,     0,     0,     0,     0,   404,
+				 0,   406,     0,   296,   299,     0,   397,   398,   396,     0,
+				 0,     0,     0,   371,     0,   369,   372,     0,     0,     0,
+				 0,   376,   375,   503,     0,     0,     0,     0,   366,     0,
+			   279,     0,    55,   309,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   368,   477,     0,   474,   479,
+			   482,   358,     0,   355,     0,   349,     0,   351,   360,     0,
+				 0,   317,     0,     0,     0,     0,     0,   399,   329,   304,
+				 0,   370,     0,     0,     0,     0,     0,     0,   475,   356,
+			   350,     0,   347,   353,     0,   348,
+					}, yyDgoto = new short[] {
+			//yyDgoto 162
+				 1,   193,    63,   313,   314,    64,    65,    66,    67,   112,
+				68,    69,    70,    71,   404,   405,   279,   280,    73,    74,
+				75,    76,    77,    78,   201,   590,   273,   749,   750,   429,
+			   908,   618,   742,   838,   842,   447,   448,   449,   564,   260,
+			   203,   261,   287,   441,   253,    81,   204,    83,   592,   593,
+			   394,    84,    85,   794,   795,   739,   740,   499,   500,   501,
+			   678,   679,   680,   291,   450,   255,   226,   205,   214,   797,
+			   702,   703,   502,   914,   779,   915,   503,   790,   386,   602,
+			   364,   206,   281,   504,    89,    90,   481,    91,    92,    93,
+			   283,   227,   306,    94,    95,   608,   566,   118,   229,   567,
+			   505,   784,   685,   507,   508,    96,    97,    98,   397,   376,
+				 2,   236,   237,   270,   457,   711,   454,   730,   455,   197,
+			   638,   471,   446,   263,   647,   198,   284,   665,   285,   300,
+			   688,   408,   208,   629,   757,   209,   758,   637,   905,   605,
+			   409,   603,   830,   398,   403,   615,   402,   614,   833,   558,
+			   560,   559,   513,   239,   240,   241,   426,   604,   509,   510,
+			   399,   268,
+					}, yySindex = new short[] {
+			//yySindex 986
+				 0,     0, 18871, 19108, 23947, 24440, 22368,     0, 21122, 21122,
+				 0,     0, 24208, 22267, 18634, 19700, 19700,     0,     0, 19700,
+			   118,   118,     0,     0,     0,     0,   254, 22267,     0,    55,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0, 21241, 21241,   -67, 19226,     0, 20174,
+			 20411, 21859,     0, 21653,   852,   997,  1248,  1641,   408,     0,
+			  -112, 21359, 21241,     0,     0,     0,     0,     0,     0,     0,
+			   671,     0,   846,   -34, 14293,     0,   -17,     0,   -20,    35,
+				 0,     0,   -36,     0,   161,     0,    10,   296,     0,   298,
+			 24324,     0,   349,     0,     0,    19,     0,     0,     0,     0,
+				 0,     0,     0,   118,   118,   341,     0,     0, 21122,   -92,
+			 19345,   386,   344,     0,   127,     0,     0,    19,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     4,     0,     0,     0,     0, 19345,    92,
+			   -34,   581,   175,     0,    66,    76,   345,   581, 21122, 21122,
+			   113,   209,     0,     0,   162,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0, 21772,   416,     0,     0,     0,
+				 0,     0,     0,     0,     0,   671,   197,   671,     0,     0,
+			   639,     0,     0, 21241, 21241, 21241, 21241,  1589, 21241, 13862,
+				 0,   456,     0,     0,   478,     0,     0,     0, 19700,     0,
+				 0,     0,     0, 19700,     0,     0, 18751, 21122,     0,     0,
+			   354, 19345,     0,   216,   202,   224, 19819, 19226,   501,   671,
+			   846,     0,     0,   565, 19819,   565,   249,   510,   269,     0,
+			 13862,   488,   269,     0,   308, 24556,   337,     0,     0,   575,
+			  1625,     0,     0,     0,     0,  1693,     0,     0,     0,     0,
+				 0,     0,   738,  1183,     0,     0,  1738,     0,  1840,     0,
+			  1866,     0,   562,   311,   324,     0,     0,     0,     0, 17327,
+			 21122, 21122, 21122, 21122, 19819, 21122, 21122, 21241, 21241, 21241,
+			 21241, 21241, 21241, 21241, 21241, 21241, 21241, 21241, 21241, 21241,
+			 21241, 21241, 21241, 21241, 21241, 21241, 21241, 21241, 21241, 21241,
+			 21241, 21241, 21241,     0,     0,     0,     0,     0, 22718,     0,
+			 19700,     0, 22756, 21359,     0,     0, 24122, 21359, 20530, 20530,
+			 19226, 21975,   580,     0,     0,   278,     0,   -34,     0,     0,
+				 0,     0,     0,     0,     0, 22794, 19700, 22867, 19345, 21122,
+				 0,     0,     0,     0,   374,   393,   224,     0, 19345,   383,
+			 23117, 19700, 23184, 21241, 21241, 21241, 19345,   618,   618,     0,
+			 23222, 19700, 23260,     0,   348,     0, 19345,   197, 20648,   398,
+				 0,     0,     0, 14293, 14293, 14293, 14293, 21241,  1608, 21241,
+			   738,     0,     0, 19937, 19463,     0,   315,   629,     0,   565,
+			   631,     0,     0,    61,   621,     0,     0, 22267, 18871,   554,
+			 23117, 23184, 21241,   846,   565,     0,     0, 18252,     0,   846,
+				 0,     0, 20293,     0,     0,     0,     0,     0,     0,     0,
+			 24556,     0,   349, 23336, 19700, 23586, 24556,   626,     0,     0,
+				 0,     0,  2276,     0,     0,     0,     0,  1771,     0,   638,
+				 0,   648,     0,     0,     0,   659,     0,     0, 21241,   401,
+			   406,     0,  1871, 19345,   738,     0,     0,     0,     0,     0,
+				 0,     0, 21241, 21241,     0,     0,     0,     0,     0,     0,
+				 0,     0,   202,  8856,  8856,  8856,  8856,  3423,  3423, 10863,
+			 10250,  8856,  8856,  8138,  8138,   112,   112, 10185,  3423,  3423,
+			  1811,  1811,  1477,    25,    25,   202,   202,   202,   -71,   -71,
+			   -71,   372,     0,   376,     0,   118,     0,     0,   565,   391,
+				 0,   403,     0,   118,     0, 14738,   421,     0,   509,     0,
+				 0,    10,   677,     0,     0,   118,     0,     0, 21241, 14738,
+				 0,   456,     0,     0, 14293,     0,     0,   565, 24556,   715,
+				 0,     0,     0,   671, 21122, 19345,     0,     0,   118,     0,
+			   565,   118,   493,    61, 22680,  2255,     0, 20767,   492,     0,
+			   485,     0,   425,   439,   565,   458,   475,   492,     0,     0,
+				 0,     0,     0,     0,   565,     0,     0, 21122, 22267,   641,
+			   532, 14293,   238,     0, 14293, 21241, 14293,   738, 21241, 13862,
+				 0,   478,     0,   738, 19937,     0, 19463,     0,     0,     0,
+			   697,     0,     0,     0,   846,   565,   269,   580,     0,     0,
+			   565,     0,     0,     0,     0,     0,  2276,   601,     0,   734,
+			   565,     0,   565,  1771,     0,     0,  1771,     0,  -229,  1229,
+				 0, 14293,     0,     0,     0,   699,     0,   202,   202,   768,
+				 0,  1341, 19345,     0,     0, 19345, 19345, 21359, 21359,     0,
+			   278,   484,   739, 21359, 21359,     0,   278, 21241, 19819, 23653,
+			 19700, 23691, 21359,   -20,   -17, 14293, 20885,     0,     0, 24556,
+			   -71,     0,   671,   567,     0,     0,     0,     0,  1771, 19345,
+			   671, 14293,   497,     0,     0, 19345,   566,     0, 21122,   589,
+				 0, 21241, 21241,   514, 21241, 21241,   591, 19345, 19345,     0,
+			   618,     0,     0,     0, 21004, 19345, 14293, 14293,     0,   817,
+				 0,     0,     0,     0,   565,  1084,   824,  2325,     0,   832,
+			   819,     0,   842,   851,     0,   854,     0,   856, 19345, 19345,
+				 0,   854,     0, 21241,   859,     0,   863,   565,   772,   868,
+				 0, 24672,   662,   664,   803,     0,     0,     0,     0,     0,
+			 21359,     0,     0,     0,     0,     0,     0, 14293,     0,   372,
+			   376,   565,   391,   403,     0,     0, 21241, 14293,     0, 19345,
+			 19345,     0,     0,  2255,   565,   675,     0, 24788,   581,     0,
+				 0, 19345,     0,     0,   581,     0, 21241,     0,   676,   684,
+				 0, 14293,    30, 19463,     0,   919,  1084,   974,     0,     0,
+			   857,  1771,     0,  1229,     0,  1229,     0,  1229,     0,   700,
+			   843,     0, 14293,  1771,     0,  1771,     0,   855,     0,  1229,
+				 0,   667,   727,     0,     0,     0,     0,     0,   484, 14293,
+			   860,   712, 19345,     0,     0,   687,   830,     0,     0,     0,
+			 19345,     0, 19345,     0,     0, 19345,     0,     0,     0,  1084,
+			   919,  1084,   954,     0,   275,     0,     0,   854,   958,   854,
+			   854,     0,     0,     0,   854,   960,   966,   970,     0,   854,
+				 0, 23729,     0,     0,   747,     0, 23805, 19700, 24055,   393,
+			   485,   753,   919,  1084,   857,     0,     0,  1229,     0,     0,
+				 0,     0,  1229,     0,  1771,     0,  1229,     0,     0,     0,
+				 0,     0,     0,     0,   565,     0,     0,     0,     0,     0,
+			   919,     0,   854,   854,   854,   982,   854,     0,     0,     0,
+				 0,  1229,     0,     0,   854,     0,
+					}, yyRindex = new short[] {
+			//yyRindex 986
+				 0,     0,   166,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   749, 10406, 10496,     0,     0, 10600,
+			  5486,  5006,     0,     0,     0,     0, 21478,     0,     0,     0,
+				 0,     0,  2969,  4046,     0,     0,  3086,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   228, 18490,   943,
+			   918,   109,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   116,     0,   143,  8564,  1261,  9204,  9010,     0,  9543,     0,
+			 12452,     0,     0,     0,  9453,     0, 12542,     0,     0,     0,
+			   120,     0,     0,     0,     0, 20056,     0,     0,     0,     0,
+				 0,     0,     0,  9647,  8214,     0, 16758, 17089,     0,     0,
+			   228,     0, 17846,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,  2158,  5080,  5560,
+			  6040,     0,     0,     0,     0,     0,     0,  6520,  7000,     0,
+			  7476,     0,  7496,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   570,     0,
+			  2787,     0,     0,  8318,     0,  8761,     0,     0,     0,     0,
+				 0,     0,    11,  1403,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0, 11282,     0,     0,     0,
+				 0,     0,     0,     0,     0,   749,     0,   775,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,  1699,
+				 0, 16309,     0,     0, 16309,     0,     0,     0,   304,     0,
+				 0,     0,     0,     0,     0,     0,  1016,     0,     0,     0,
+				 0,   178,     0,     0, 10939, 12646,     0,   228,     0,  1022,
+			   595,     0,   136,  1016,     0,  1016,   971,     0,   971,     0,
+				 0,     0,   940,     0,     0,     0,     0,  1598,  2439,   153,
+			  -196,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,  9986, 10090,     0,     0,     0,     0,   148,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   157,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   228,   165,   210,     0,     0, 16598,     0,   692,     0, 17609,
+				 0,     0,     0,     0,     0,     0,   157,     0,   570,     0,
+				 0,     0,     0,     0,     0,   436,  9100,     0,   706, 17729,
+				 0,   157,     0,     0,     0,     0,   686,     0,     0,  1426,
+				 0,   157,     0,     0,     0,     0,   178,     0,     0,     0,
+				 0,     0,     0,  2053, 15958, 16062, 16415,     0,     0,     0,
+			 19582,     0,     0,     0,   -28,     0,     0,   150,     0,  1016,
+			   150,     0,     0,  1016,     0,     0,     0,     0,   178,     0,
+				 0,     0,     0,  1001,  1016,     0,     0,  1135,   108,   317,
+				 0,     0,   976,     0,     0,     0,     0,     0,     0,  2512,
+				 0,     0,   270,     0,   157,     0,     0,  1578,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   195,     0,   736,
+				 0,   736,     0,     0,     0,   736,     0,     0,     0,  1722,
+				 0,     0,     0,   178,  1406,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0, 11030, 14657, 14748, 14839, 15088, 13977, 14226, 15179,
+			 15610, 15270, 15519,  2474, 15643, 13364, 13455,  1013, 14317, 14408,
+			 13795, 13886, 13546, 12960, 13051, 11121, 11434, 11525, 17966, 17966,
+			 18132,  5849,  4409,  7289,     0, 20056,     0,  4526,   980,  5966,
+				 0,  6329,     0,  5369,     0, 15923, 11373,     0,     0,     0,
+				 0, 13142,     0,     0,     0,  7769,     0,     0,     0,  1989,
+				 0,     0,     0,     0,   519,     0,     0,  1016,     0,   295,
+				 0,     0,     0,     0,     0,   570, 17206, 17492,     0,     0,
+			   980,  8657,     0,  1016,     0,   834,     0,   745,   572,     0,
+			   808,     0,  3449,  4889,   980,  3566,  3929,   808,     0,     0,
+				 0,     0,  2397,   756,   980,  2682,  2762,     0,     0,     0,
+				 0,   320,     0,     0, 16109,     0, 16172, 18989,     0, 16223,
+				 0, 16309,     0, 18370,     0,     0,    58,     0,     0,     0,
+				 0,     0,     0,   257,  1244,  1016,   971,   653,  1108,  1374,
+			   980,  2089,  2130,     0,     0,     0,     0,   332,     0,   433,
+			  1016,     0,   307,     0,     0,     0,     0,     0,     0,     0,
+				 0,   331,     0,     0,     0,     0,     0, 11616, 11929,     0,
+				 0,   106,   762,     0,     0,   762,   178,     0,     0,     0,
+			 16635, 12020,     0,     0,     0,     0, 16715,     0,     0,     0,
+			   157,     0,     0, 15456,  9896,   942,     0,     0,     0,     0,
+			 18132,     0,     0,     0,     0,     0,     0,     0,   505,   570,
+				 0,   678,   769,     0,     0,   651,   808,     0,     0,     0,
+				 0,     0,     0,  7875,     0,     0,     0,   762,   762,  2708,
+				 0,     0,     0,     0,     0,   723, 16262, 16352,     0,   150,
+				 0,     0,     0,  2269,  1016,     0,   529,     0,     0,     0,
+			   100,     0,   736,   736,     0,   736,     0,   736,   762,   178,
+				 0,   736,     0,     0,    85,     0,    85,   106,     0,    85,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,  2626,     0,  6446,
+			  7406,   980,  6809,  6926,     0,     0,     0,  2607,     0,   178,
+			   570,     0,     0,   834,  1016,     0,     0,     0,     0,     0,
+				 0,   762,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   789,   808,    63,     0,   540,     0,   544,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0, 15762,     0,     0,   103,     0,     0,     0,     0,
+				 0,     0,   583,     0,     0,     0,     0,     0, 12113,  8518,
+				 0,     0,   570,     0,     0,     0,     0,  1115,  1391,     0,
+			   570,     0,   706,     0,     0,   762,     0,     0,     0,     0,
+			   569,     0,   579,     0,   182,     0,     0,   736,   736,   736,
+			   736,     0,     0,     0,    85,    85,    85,    85,     0,    85,
+				 0,     0,     0,     0,     0,  2086,     0,   157,     0,   436,
+			   808,     0,   585,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,  2272,
+			  1533,     0,  1386,   624,   980,  1535,  1595,     0,     0,     0,
+			   592,     0,   736,    85,    85,    85,    85,  1398,     0,     0,
+				 0,     0,     0,     0,    85,     0,
+					}, yyGindex = new short[] {
+			//yyGindex 162
+				 0,     0,     0,   129,   979,     0,     0,     0,     0,  1073,
+				 0,   630,     0,    42,  -376,   125,     0,    40,   131,   984,
+				34,    12,   -56,     0,     2,   299,   476,   139,  -346,  -401,
+				 0,   151,     0,     0,     0,    74,   174,  -355,   -12,   -47,
+			  1436,     3,     0,  -235,  -334,  1076,  1833,  -267,  -289,  -305,
+				 0,     0,     0,   220,  -746,   263,  -263,  7473,  -589,   414,
+			  -697,  -628,   422,     0,    14,  -395,     0,  1082,     0,     0,
+			  -483,     0,  -616,     0,  -593,   159,     0,     0,   -68,  -518,
+			   377,  1669,    -2,  -745,  1104,  -270,  -434,    -3,   -73,   -19,
+			  -177,   -15,     0,    -7,  2349,  -290,     0,   -51,     7,     8,
+			  -565,  -266,  1099,    48,  -584,     0,     0,     0,   -77,     0,
+				 0,     5,    -1,     0,     0,  -496,   -23,     0,  -103,     0,
+				 0,  -252,  -155,     0,   809,     0,     0,     0,     0,     0,
+				 0,  -203,     0,  -417,     0,     0,     0,     0,     0,     0,
+				 9,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,  -261,     0,   880,     0,     0,     0,     0,
+				 0,   831,
+					}, yyTable = new short[] {
+			//yyTable 25161
+				88,   631,   372,   267,   416,   326,   228,   375,   259,   264,
+			   367,   207,   269,   195,   196,   568,   235,   382,   262,   445,
+			   228,   196,   612,   238,   265,   480,   640,   250,   250,   254,
+			   254,   250,   299,   254,   506,   196,   475,   498,   113,   113,
+			   478,   610,    72,    72,   282,    99,   113,   289,   293,   652,
+			   401,   515,   673,   701,   788,    87,   624,   460,   390,   258,
+			   307,   196,   362,   288,   292,   253,   634,   360,   242,   329,
+			   786,   234,   361,   241,   596,   328,   705,   706,   565,   238,
+			   858,   371,   573,   384,   580,   113,   585,   488,   587,   251,
+			   251,   259,   264,   251,   781,   558,   443,   253,   385,   242,
+			   464,   262,   460,   366,   241,   384,   579,   611,   798,   650,
+			   579,   579,   650,   352,   734,   916,   543,   801,   783,    79,
+			   565,   787,   573,   286,   113,   412,   370,   923,   753,   670,
+				71,   472,   611,   476,   422,   789,   799,   476,   759,   200,
+			   200,   367,   366,     8,   558,   200,    69,   855,   544,   362,
+				79,   242,    82,     8,   360,   358,   241,   359,   258,   361,
+			   558,    71,   352,    77,   728,   545,   558,   558,   488,    68,
+				79,   611,   278,   371,   773,    75,   558,    69,   271,   515,
+			   468,    71,   470,   515,   316,   318,   320,   322,   558,   252,
+			   256,   558,   809,   257,    77,   611,   461,    67,   816,   916,
+			   323,   324,     8,   597,   877,   488,    75,   371,   923,   558,
+			   417,   418,   858,   388,    77,   445,   480,   389,   396,   485,
+				72,   371,   482,   545,   367,   558,    75,   352,   910,   733,
+			   545,   506,   307,   196,   682,   278,   488,   558,   558,   387,
+			   427,   543,   275,   558,   238,   786,   430,   829,   234,   442,
+			   558,    72,   442,   696,   488,   371,   451,   335,   336,   234,
+			   365,   652,   371,   700,   234,   363,   411,    70,     8,   558,
+			   250,    72,   746,   544,   282,   250,   781,   254,   467,   234,
+				85,   756,   440,   942,   466,   234,   781,   558,   238,   801,
+				95,   801,   654,   440,   266,   828,   918,   233,    70,   365,
+			   421,    82,   745,   558,   428,    73,   545,   411,   925,   373,
+			   927,    85,   743,   444,   558,   970,   463,   576,    68,   944,
+			   650,   576,   576,   595,   469,   888,   253,   273,   480,   113,
+			   255,    85,   525,   526,   527,   528,    73,   251,   430,   200,
+			   200,   500,   345,   850,   609,   558,   655,   400,   545,   506,
+			   657,   337,   335,   336,   460,   377,    73,   378,   273,   379,
+			   572,   663,   599,   835,   255,   821,   545,   460,   451,    72,
+			   801,   524,   500,   345,   529,   500,   438,   282,   368,   255,
+			   574,   266,   250,   371,   574,   572,   696,    68,    79,   975,
+			   500,   369,   515,   383,   451,   515,   459,   453,   456,    71,
+			   572,   406,   278,   619,   393,   574,   415,   667,   250,   451,
+			   572,   413,   253,   482,   772,   113,   768,   253,   806,   451,
+			   574,   414,   419,   250,   813,   815,   630,   630,   484,   565,
+			   574,   573,    77,   250,   512,   800,   726,   452,   337,   765,
+			   579,   423,   659,   338,    75,   442,   579,   579,   442,   572,
+			   228,   907,   591,   591,   891,   579,    88,   651,   652,   480,
+			   425,   200,   200,   200,   200,   196,   530,   531,   977,   574,
+			   395,   428,   506,   572,   338,   834,   430,   458,    79,    79,
+			   114,   114,   451,   369,   202,   202,   666,   764,   211,    72,
+			   202,   202,   202,   574,   727,   202,   250,   684,    72,   684,
+			   440,   721,   642,   684,   374,   278,   906,   664,   407,     8,
+			   736,   476,     8,     8,   113,   488,   934,   369,   410,    29,
+			   113,   887,   444,    79,   699,   482,   715,   296,   337,    29,
+			   613,   369,   558,   620,   768,   558,   558,   202,   723,   343,
+			   681,   627,   465,   579,   558,   712,   488,   558,   558,    85,
+			   346,   639,   420,   709,   341,   371,   704,   704,   704,   460,
+				29,   259,   771,   255,   715,   369,   296,   506,   710,   462,
+			   343,   262,   369,   259,    73,   234,   716,   778,    29,   344,
+			   558,   346,   964,   262,   202,   341,    79,   712,   724,   339,
+			   255,   234,   515,   501,   558,   342,   709,   558,   558,   259,
+			   720,   712,   340,   474,   230,    14,   732,   231,   232,   262,
+			   344,   712,   731,   477,   500,   744,   747,   479,   747,   486,
+			   339,   737,   196,   761,   600,   747,   342,   501,   234,   558,
+			   601,   228,   113,   340,   100,   900,    14,   522,   695,   760,
+			   233,   902,   501,   616,    29,   775,   196,   712,   611,   442,
+			   523,   576,   807,   621,    14,   824,   482,   576,   576,   780,
+			   617,   558,   658,    86,   531,   511,   576,   643,   769,   246,
+			   278,   854,   577,   653,    79,   656,   586,   233,   780,   661,
+			   483,   234,   683,   100,   202,   202,   255,   674,   401,   255,
+			   255,   591,   686,   369,    86,   500,   558,   500,   391,   392,
+			   500,   500,   307,   689,   558,   558,   692,   501,   558,   572,
+			   558,   693,   577,   586,    86,   278,   558,   707,   451,   718,
+				14,   708,   255,   321,   681,   776,   309,   310,   704,   574,
+			   233,   893,   250,   558,   202,   200,   713,   401,   722,   202,
+			   839,   831,   202,   202,   843,   558,   558,    79,   714,   836,
+			   844,   307,    79,    79,   576,   558,   748,   745,   818,   729,
+				79,   662,   735,   113,   745,   558,   762,   442,   200,   630,
+			   751,   296,   558,   371,   780,   311,   312,   558,   777,   558,
+			   684,   684,   558,   684,   752,   684,    29,    29,    29,   684,
+				29,    29,   684,    29,   684,   558,   531,   684,   712,   257,
+				92,   763,   278,   754,   558,    79,   202,   202,   202,   202,
+				79,   202,   202,    29,    29,    29,    29,    29,   396,   938,
+			   755,   558,   770,   681,   792,   681,   793,   802,   558,   810,
+			   803,   804,   811,   257,   841,   113,   832,   558,   558,   558,
+			   558,   558,   558,   837,   488,   242,   202,   278,   257,   578,
+			   747,   407,   719,   578,   578,   202,    79,   296,   845,   846,
+			   847,   853,    14,    14,    14,   369,    14,    14,   856,    14,
+			   840,   113,   202,   859,    79,   202,   371,   521,   860,   200,
+			   309,   310,   848,   849,    79,    29,   861,   202,    29,    29,
+			   852,   945,    79,   488,   100,   863,   878,   202,   865,   628,
+			   867,   242,    79,   873,   681,   912,   675,   875,   488,   489,
+			   490,   491,   879,   869,   870,   684,   684,   684,   684,   558,
+			   558,   937,   684,   684,   684,   684,   572,   684,   885,   311,
+			   312,   883,    86,   884,    79,   451,   558,   619,   747,   558,
+			   558,   712,   261,    79,   894,   903,   574,   230,   401,   250,
+			   231,   232,   261,   904,   890,   558,   296,   681,   558,   681,
+			   202,    14,   296,   909,    14,    14,   901,   278,   922,   921,
+			   684,   684,   684,   684,   684,   558,   930,   558,   558,   928,
+			   278,   933,   684,   261,   230,   932,   256,   231,   232,    79,
+			   100,   681,   558,   100,   100,   558,   935,   558,   943,   249,
+			   249,   261,   947,   249,   952,   431,   805,   808,   231,   232,
+			   954,    16,   812,   814,   956,   558,   961,   558,   911,   558,
+			   558,   558,   969,   543,   401,   939,   981,   940,   272,   274,
+			   941,   558,   242,   249,   290,   100,   558,   230,   242,   558,
+			   231,   232,    16,   558,   401,   325,   327,   401,   401,   544,
+			   805,   808,   558,   812,   814,   558,   558,   545,   307,   257,
+				16,   307,   307,   543,   549,   549,   242,   261,   242,   551,
+			   931,   545,   558,   545,   296,   558,   558,   558,   119,   968,
+			   202,    79,   194,   369,    86,    86,   116,   116,   660,   558,
+			   967,   558,   558,   558,   213,   926,   892,   782,   774,   278,
+			   558,   825,   558,   971,   230,   558,   558,   231,   232,   886,
+			   242,   558,   278,   202,   558,   558,   216,   473,    90,   473,
+			   432,   514,     0,   473,     0,    95,    16,     0,   558,    86,
+				 0,   558,   558,   298,     0,   558,     0,     0,   558,   558,
+			   330,   331,   332,   333,   334,   886,     0,   543,   530,    90,
+				 0,     0,    90,     0,   534,   257,     0,     0,   257,   257,
+			   242,   460,   913,     0,   488,   489,   490,   491,   308,    90,
+			   309,   310,   298,   936,    95,     0,   544,     0,    79,     0,
+				 0,    79,    79,   578,   202,     0,   369,     0,     0,   578,
+			   578,     0,    86,     0,    79,     0,   202,     0,   578,   534,
+			   488,     0,     0,   488,   488,   296,   460,     0,     0,   261,
+			   261,   261,   261,   261,   261,    79,   261,     0,     0,   311,
+			   312,    79,     0,     0,   202,     0,     0,   433,   434,   435,
+			   436,   534,   325,    79,    79,     0,   261,   261,   261,   261,
+			   261,    79,   249,     0,     0,     0,     0,   249,   242,   242,
+				 0,     0,     0,     0,    15,     0,     0,     0,     0,     0,
+			   544,    48,     0,     0,    79,    79,     0,   495,    16,    16,
+				16,    48,    16,    16,     0,    16,     0,   882,     0,   675,
+				86,   488,   489,   490,   491,    15,   578,     0,   261,   543,
+			   543,   543,   517,   543,   543,   517,   543,   517,   242,   517,
+				 0,   517,    48,    15,     0,    79,    79,     0,   261,     0,
+				 0,   261,   261,   896,   315,   309,   310,    79,     0,     0,
+				48,   532,   533,   534,   535,   536,   537,   538,   539,   540,
+			   541,   542,   543,   544,   545,   546,   547,   548,   549,   550,
+			   551,   552,   553,   554,   555,   556,   557,     0,     0,     0,
+				 0,   234,     0,    86,   249,     0,     0,   575,    86,    86,
+				 0,   575,   589,   594,   311,   312,    86,    16,    79,    15,
+				16,    16,     0,     0,     0,     0,    79,   298,    79,   495,
+			   249,    79,     0,   496,    92,    95,    48,    90,   534,   675,
+				 0,   488,   489,   490,   491,   249,    98,   575,   575,   575,
+				 0,   102,   544,   544,   544,   249,   544,   544,    96,   544,
+				 0,    86,   641,   202,   531,    92,    86,   517,    92,     0,
+			   278,   644,     0,   646,     0,     0,   530,   649,   290,     0,
+				 0,   676,   534,     0,   242,    92,     0,   268,    80,    80,
+			   115,   115,   115,     0,   391,    98,   575,    94,   212,   268,
+			   102,   534,     0,     0,     0,   581,   649,    96,   460,   581,
+			   581,     0,    86,   298,   534,   278,     0,     0,   249,     0,
+				93,   460,   279,   242,     0,     0,     0,   534,     0,     0,
+				86,    95,   268,    80,    95,    95,     0,   297,     0,   391,
+				86,   517,   691,     0,   268,     0,     0,   473,    86,   516,
+				 0,   309,   310,     0,     0,     0,   697,   698,    86,   534,
+				 0,    15,    15,    15,   362,    15,    15,   279,    15,   360,
+			   358,   391,   359,     0,   361,     0,   297,     0,    48,    48,
+				48,    48,    48,    48,   675,    48,   488,   489,   490,   491,
+				86,     0,    48,   278,     0,    97,    80,     0,     0,    86,
+			   311,   312,    48,    48,     0,    48,    48,    48,    48,    48,
+				 0,     0,   298,   242,     0,   317,   309,   310,   298,     0,
+				 0,   242,   725,   531,     0,   530,   492,   278,     0,   278,
+				 0,   530,     0,   494,     0,     0,     0,     0,   494,     0,
+				 0,   242,   278,     0,    97,    86,     0,     0,     0,     0,
+			   687,   741,     0,     0,   690,    99,     0,     0,    87,     0,
+				15,     0,     0,    15,    15,   311,   312,     0,     0,   494,
+				 0,     0,   494,     0,   278,     0,   530,    48,     0,   766,
+				48,    48,   767,     0,    80,   531,     0,   494,   649,    87,
+			   290,   531,    87,     0,   460,     0,   487,     0,   488,   489,
+			   490,   491,     0,    92,    99,     0,    98,   278,   530,    87,
+				 0,   102,     0,   495,     0,   497,   534,   496,    96,   242,
+				 0,    87,    87,     0,     0,   242,     0,     0,   391,     0,
+			   298,   215,   102,     0,     0,     0,   531,    86,   492,   460,
+				 0,   575,   575,     0,   493,   494,     0,   575,   575,   255,
+				 0,   817,   494,     0,   249,   101,   575,    80,     0,   255,
+			   827,     0,    80,    80,     0,     0,    87,   278,   531,     0,
+				80,   422,   422,   422,   422,   422,   422,     0,     0,   534,
+			   278,   297,   509,     0,   268,   575,   575,     0,   575,   575,
+			   255,   391,   534,   255,     0,     0,   268,   268,   851,     0,
+				 0,     0,    98,     0,   391,    98,    98,   102,   255,   268,
+			   102,   102,     0,   509,    96,    80,   509,    96,    96,   279,
+				80,     0,     0,   422,   422,     0,     0,   872,     0,    87,
+				 0,   509,   279,     0,    86,     0,     0,    86,    86,   581,
+				 0,     0,   255,     0,   575,   581,   581,     0,     0,     0,
+				86,     0,     0,   337,   581,    97,     0,     0,     0,   495,
+			   889,   298,     0,   496,     0,   530,    80,   297,   350,   351,
+				 0,    86,     0,     0,   255,     0,     0,    86,     0,     0,
+			   575,     0,     0,     0,    80,    82,    82,   290,     0,    86,
+				86,     0,     0,     0,    80,     0,   509,    86,   362,   357,
+				 0,     0,    80,   360,   358,     0,   359,     0,   361,     0,
+				 0,   494,    80,     0,     0,    99,     0,    87,     0,     0,
+				86,    86,     0,     0,     0,   531,   278,    87,   530,     0,
+				82,   862,   864,   116,   866,     0,   868,     0,     0,   278,
+			   871,   530,   581,   874,    80,   876,     0,     0,   880,     0,
+				 0,    97,     0,    80,    97,    97,   319,   309,   310,   437,
+				 0,    86,    86,     0,     0,     0,   297,     0,     0,   898,
+				 0,   249,   297,    86,     0,   520,   309,   310,   645,     0,
+			   487,     0,   488,   489,   490,   491,     0,     0,   531,     0,
+				87,   460,   494,    82,   494,    87,    87,   494,   494,    80,
+				 0,   531,     0,    87,   460,     0,   311,   312,   319,   309,
+			   310,    99,     0,     0,    99,    99,   255,   255,   255,   255,
+			   255,   255,   492,   255,    86,   311,   312,     0,   493,   494,
+			   255,   255,    86,     0,    86,     0,     0,    86,     0,   233,
+			   255,   255,     0,   255,   255,   255,   255,   255,    87,   233,
+				 0,     0,     0,    87,     0,   509,     0,     0,   311,   312,
+			   511,   309,   310,     0,     0,     0,   946,   948,   949,   950,
+				 0,     0,     0,   951,   953,   955,   957,     0,   958,     0,
+			   233,    82,     0,   255,   297,     0,     0,     0,     0,     0,
+				 0,    80,   582,     0,     0,     0,   582,   582,   233,    87,
+				 0,   255,     0,   523,     0,   518,   309,   310,     0,     0,
+			   311,   312,     0,   523,     0,   255,     0,    87,   255,   255,
+				 0,   978,   979,   980,   982,   983,   487,    87,   488,   489,
+			   490,   491,     0,   985,     0,    87,   509,     0,   509,     0,
+				 0,   509,   509,     0,   523,    87,   101,   523,     0,    89,
+				 0,     0,     0,     0,    82,   311,   312,     0,     0,    82,
+				82,     0,   523,     0,   233,     0,     0,    82,   492,     0,
+				 0,     0,     0,     0,   493,   494,     0,    87,     0,   530,
+				89,     0,   279,    89,     0,   530,    87,   337,    80,     0,
+				91,    80,    80,     0,     0,   101,   523,     0,     0,     0,
+				89,     0,   350,   351,    80,     0,     0,   519,   309,   310,
+				 0,     0,    82,     0,     0,   297,     0,    82,   176,     0,
+			   531,    91,     0,     0,    91,    80,   531,   279,   523,     0,
+			   530,    80,    87,   520,   309,   310,     0,     0,   694,   309,
+			   310,    91,     0,    80,    80,     0,   176,     0,   176,     0,
+			   176,    80,     0,     0,   462,     0,    82,   311,   312,     0,
+				82,    82,   530,    82,     0,     0,     0,   176,     0,     0,
+				 0,   531,     0,     0,    80,    80,     0,     0,     0,     0,
+				 0,    82,     0,   311,   312,     0,     0,   115,   311,   312,
+				 0,    82,     0,     0,     0,     0,     0,     0,     0,    82,
+				 0,     0,     0,   531,     0,     0,   233,   233,   233,    82,
+			   233,   233,     0,   233,     0,    80,    80,     0,     0,     0,
+				 0,     0,     0,   897,    87,     0,     0,    80,     0,    88,
+			   233,   233,   534,   233,   233,   233,   233,     0,     0,     0,
+				 0,    82,     0,   495,     0,   738,     0,   496,     0,     0,
+				82,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				88,     0,   530,    88,     0,   391,   534,     0,   534,     0,
+			   523,   523,   523,   523,   523,   523,     0,   523,    80,     0,
+				88,   534,     0,     0,   523,   523,    80,     0,    80,     0,
+				 0,    80,     0,     0,   523,   523,    82,   523,   523,   523,
+			   523,   523,     0,   117,   117,   233,   101,     0,   233,   233,
+			   391,   117,     0,   534,     0,     0,     0,     0,    89,   530,
+				 0,    87,     0,     0,    87,    87,   582,     0,     0,     0,
+				 0,     0,   582,   582,     0,     0,     0,    87,     0,     0,
+				 0,   582,   391,   117,   117,   534,   534,     0,   117,   117,
+			   117,     0,     0,     0,     0,   523,     0,     0,    87,    91,
+			   531,   117,     0,     0,    87,     0,     0,     0,     0,   523,
+				 0,     0,   523,   523,     0,     0,    87,    87,     0,   279,
+				 0,     0,   530,     0,    87,     0,     0,   530,    82,   117,
+				 0,    90,   279,   534,     0,   530,     0,     0,     0,    94,
+				 0,     0,   101,     0,     0,   101,   101,    87,    87,     0,
+				 0,     0,     0,   176,     0,   176,   176,   176,   176,     0,
+				 0,     0,     0,   531,   196,     0,     0,     0,     0,   582,
+				94,     0,     0,    94,   196,   268,   531,     0,   534,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,    87,    87,
+				94,   462,     0,     0,     0,   176,   899,     0,     0,     0,
+				87,   176,   176,     0,     0,   196,     0,     0,   196,     0,
+			   534,     0,    93,     0,   176,     0,     0,   176,   176,     0,
+			   268,     0,   196,   196,     0,    82,     0,   196,    82,    82,
+				82,     0,     0,     0,     0,     0,    82,    82,    88,   391,
+				 0,    82,   534,    93,     0,    82,    93,     0,   279,     0,
+			   487,    87,   488,   489,   490,   491,     0,   196,     0,    87,
+				 0,    87,    82,    93,    87,     0,     0,     0,    82,     0,
+				 0,   675,     0,   488,   489,   490,   491,     0,     0,     0,
+				82,    82,   117,   117,   117,   117,     0,   117,    82,   196,
+				 0,     0,   492,   279,     0,     0,     0,   259,   493,   494,
+				 0,     0,   391,     0,     0,   534,     0,   259,     0,     0,
+				 0,    82,    82,   676,     0,   391,   234,     0,   534,   677,
+			   675,     0,   488,   489,   490,   491,   234,     0,     0,     0,
+				 0,     0,     0,    82,   117,     0,     0,     0,   259,     0,
+				 0,   257,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,    82,    82,     0,     0,   259,   234,     0,     0,
+			   234,     0,   676,     0,    82,     0,    98,   534,   857,     0,
+				 0,     0,     0,     0,   234,   234,   117,   117,   117,   117,
+			   117,   117,   117,   117,   117,   117,   117,   117,   117,   117,
+			   117,   117,   117,   117,   117,   117,   117,   117,   117,   117,
+			   117,   117,     0,     0,     0,     0,     0,     0,    94,   234,
+				 0,     0,   530,     0,     0,    82,    89,     0,   530,     0,
+			   117,     0,   259,    82,     0,    82,     0,     0,    82,     0,
+			   534,   196,   196,   196,   196,   196,   196,     0,   196,     0,
+				 0,   234,    88,   534,   391,   196,   196,   196,     0,     0,
+				 0,     0,   117,   117,   117,   196,   196,     0,   196,   196,
+			   196,   196,   196,   530,     0,     0,     0,   117,     0,     0,
+				 0,     0,   268,     0,     0,     0,   117,    49,   117,     0,
+				 0,    93,   117,   117,     0,   268,     0,    49,     0,   391,
+				 0,     0,   531,     0,     0,   530,    91,     0,   531,     0,
+				 0,   117,     0,     0,     0,     0,     0,     0,     0,     0,
+			   196,   117,     0,     0,     0,     0,   196,     0,    49,   117,
+				 0,   391,     0,     0,     0,   117,     0,     0,   196,     0,
+			   196,     0,     0,   196,   196,     0,    49,     0,     0,     0,
+				 0,     0,     0,   531,     0,   279,     0,   117,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   279,     0,
+				 0,   117,   117,     0,   259,   259,   259,   259,   259,   259,
+				 0,   259,     0,     0,     0,   531,     0,     0,     0,     0,
+				 0,     0,     0,   234,   234,   234,   234,   234,   234,     0,
+			   234,   259,   259,   259,   259,   259,     0,   234,   234,   234,
+				 0,     0,    49,     0,     0,     0,     0,   234,   234,     0,
+			   234,   234,   234,   234,   234,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   117,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   117,     0,     0,
+				 0,     0,     0,   259,     0,     0,     0,     0,     0,     0,
+				 0,    97,   530,     0,     0,     0,   117,     0,     0,   454,
+				 0,     0,   234,   259,     0,     0,   259,   259,   234,   454,
+				 0,     0,     0,     0,     0,     0,     0,    96,   391,     0,
+			   234,     0,   234,     0,   117,   234,   234,   117,     0,     0,
+				 0,     0,   527,   117,     0,   117,   454,   454,     0,   527,
+			   454,   454,   454,   454,   454,   454,   454,     0,     0,     0,
+				 0,     0,     0,     0,     0,   530,     0,   454,   454,   454,
+			   454,   454,   454,     0,     0,     0,     0,     0,   530,     0,
+				 0,    99,   531,     0,     0,     0,     0,     0,     0,     0,
+				 0,   391,     0,     0,    49,    49,    49,    49,    49,    49,
+			   454,    49,   454,   454,   391,     0,   117,     0,    49,     0,
+				 0,     0,     0,     0,     0,   117,     0,     0,   117,     0,
+				 0,    49,    49,    49,    49,    49,   458,     0,     0,     0,
+				 0,     0,   527,   454,   454,   527,   458,     0,     0,     0,
+			   117,   117,     0,   117,   117,   531,     0,     0,     0,     0,
+				 0,     0,     0,   117,     0,     0,     0,     0,   531,   528,
+				 0,     0,     0,   458,   458,     0,   528,   458,   458,   458,
+			   458,   458,   458,   458,     0,     0,     0,     0,     0,     0,
+				 0,     0,   117,     0,   458,   458,   458,   458,   458,   458,
+			   117,     0,     0,    49,     0,     0,    49,    49,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   117,     0,   458,     0,   458,
+			   458,     0,     0,     0,     0,     0,   117,     0,     0,     0,
+				 0,     0,     0,     0,     0,   117,     0,     0,     0,     0,
+				 0,     0,   117,     0,     0,     0,     0,     0,     0,   528,
+			   458,   458,   528,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   527,   527,   527,   527,
+			   527,   527,   527,   527,   527,     0,   454,   454,   454,   454,
+			   454,   454,   527,   454,   527,   527,   527,   527,   454,   527,
+			   454,   454,   454,   527,   527,   527,   527,   527,   527,   527,
+			   454,   454,   527,   454,   454,   454,   454,   454,     0,     0,
+				 0,   527,   527,     0,   527,   527,   527,   527,   527,   527,
+			   527,   527,   527,   527,     0,     0,   527,     0,     0,   527,
+			   527,   527,     0,   527,   527,   454,   454,   454,   454,   454,
+			   454,   454,   454,   454,   454,   454,   454,   454,     0,     0,
+			   454,   454,   454,   527,   454,   454,   527,   527,     0,   527,
+			   527,   454,   527,   527,   527,   454,   527,   527,   527,   527,
+			   527,   527,     0,   454,   527,   454,     0,     0,   454,   454,
+				 0,   527,     0,   528,   528,   528,   528,   528,   528,   528,
+			   528,   528,     0,   458,   458,   458,   458,   458,   458,   528,
+			   458,   528,   528,   528,   528,   458,   528,   458,   458,   458,
+			   528,   528,   528,   528,   528,   528,   528,   458,   458,   528,
+			   458,   458,   458,   458,   458,     0,     0,     0,   528,   528,
+				 0,   528,   528,   528,   528,   528,   528,   528,   528,   528,
+			   528,     0,     0,   528,     0,     0,   528,   528,   528,     0,
+			   528,   528,   458,   458,   458,   458,   458,   458,   458,   458,
+			   458,   458,   458,   458,   458,     0,     0,   458,   458,   458,
+			   528,   458,   458,   528,   528,     0,   528,   528,   458,   528,
+			   528,   528,   458,   528,   528,   528,   528,   528,   528,   534,
+			   458,   528,   458,     0,     0,   458,   458,     0,   528,   534,
+			   362,   357,     0,     0,     0,   360,   358,     0,   359,     0,
+			   361,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   530,     0,     0,     0,   534,   534,     0,   530,
+			   534,   534,   534,   534,   534,   534,   534,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   534,   534,   534,
+				98,   534,   534,     0,     0,     0,     0,   356,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   534,     0,   534,   534,     0,     0,     0,   355,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   530,     0,     0,     0,
+				 0,     0,   534,   534,   534,   530,   530,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   530,
+				 0,     0,     0,   530,   530,     0,   530,   530,   530,   530,
+			   530,   530,   530,   530,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   530,   530,   530,    97,   530,   530,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   530,     0,   530,
+			   530,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   530,
+			   530,   530,   530,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   530,   530,   530,   530,
+			   530,   530,   530,   530,   530,     0,   534,   534,   534,   534,
+			   534,   534,   530,   534,   530,   530,   530,   530,     0,   534,
+			   534,   534,   534,   530,   530,   530,   530,   530,   530,   530,
+			   534,   534,   530,   534,   534,   534,   534,   534,     0,   337,
+				 0,   530,   530,     0,   530,   530,   530,   530,   530,   530,
+			   530,   530,   530,   530,   350,   351,   530,     0,     0,   530,
+			   530,   530,     0,   530,   530,   534,   534,   534,   534,   534,
+			   534,   534,   534,   534,   534,   534,   534,   534,     0,     0,
+			   534,   534,   534,   530,     0,   534,   530,   530,     0,   530,
+			   530,   534,   530,   530,   530,   534,   530,   530,   530,   530,
+			   530,   530,     0,   534,   530,   534,     0,     0,   534,   534,
+				 0,   530,     0,   530,   530,   530,   530,   530,   530,   530,
+			   530,   530,     0,   530,   530,   530,   530,   530,   530,   530,
+			   530,   530,   530,   530,   530,     0,   530,   530,   530,   530,
+			   530,   530,   530,   530,   530,   530,   530,   530,   530,   530,
+			   530,   530,   530,   530,   530,     0,     0,     0,   530,   530,
+				 0,   530,   530,   530,   530,   530,   530,   530,   530,   530,
+			   530,     0,     0,   530,     0,     0,   530,   530,   530,     0,
+			   530,   530,   530,   530,   530,   530,   530,   530,   530,   530,
+			   530,   530,   530,   530,   530,     0,     0,   530,   530,   530,
+			   530,     0,   530,   530,   530,     0,   530,   530,   530,   530,
+			   530,   530,   530,   530,   530,   530,   530,   530,   530,   531,
+			   530,   530,   530,     0,     0,   530,   530,     0,   530,   531,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   531,     0,     0,     0,   531,   531,     0,   531,
+			   531,   531,   531,   531,   531,   531,   531,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   531,   531,   531,
+				99,   531,   531,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   531,     0,   531,   531,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   269,     0,     0,     0,
+				 0,     0,   531,   531,   531,   531,   269,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   529,
+				 0,     0,     0,   269,   269,     0,   529,   269,   269,   269,
+			   269,   269,   269,   269,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   269,   269,   269,     0,   269,   269,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   269,     0,   269,
+			   269,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   529,
+			   269,   269,   529,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   531,   531,   531,   531,
+			   531,   531,   531,   531,   531,     0,   531,   531,   531,   531,
+			   531,   531,   531,   531,   531,   531,   531,   531,     0,   531,
+			   531,   531,   531,   531,   531,   531,   531,   531,   531,   531,
+			   531,   531,   531,   531,   531,   531,   531,   531,     0,     0,
+				 0,   531,   531,     0,   531,   531,   531,   531,   531,   531,
+			   531,   531,   531,   531,     0,     0,   531,     0,     0,   531,
+			   531,   531,     0,   531,   531,   531,   531,   531,   531,   531,
+			   531,   531,   531,   531,   531,   531,   531,   531,     0,     0,
+			   531,   531,   531,   531,     0,   531,   531,   531,     0,   531,
+			   531,   531,   531,   531,   531,   531,   531,   531,   531,   531,
+			   531,   531,     0,   531,   531,   531,     0,     0,   531,   531,
+				 0,   531,     0,   529,   529,   529,   529,   529,   529,   529,
+			   529,   529,     0,   269,   269,   269,   269,   269,   269,   529,
+			   269,   529,   529,   529,   529,     0,   529,   269,   269,   269,
+			   529,   529,   529,   529,   529,   529,   529,   269,   269,   529,
+			   269,   269,   269,   269,   269,     0,     0,     0,   529,   529,
+				 0,   529,   529,   529,   529,   529,   529,   529,   529,   529,
+			   529,     0,     0,   529,     0,     0,   529,   529,   529,     0,
+			   529,   529,   269,   269,   269,   269,   269,   269,   269,   269,
+			   269,   269,   269,   269,   269,     0,     0,   269,   269,   269,
+			   529,     0,   269,   529,   529,     0,   529,   529,   269,   529,
+			   529,   529,   269,   529,   529,   529,   529,   529,   529,   535,
+			   269,   529,   269,     0,     0,   269,   269,     0,   529,   535,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   532,     0,     0,     0,   535,   535,     0,   532,
+			   535,   535,   535,   535,   535,   535,   535,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   535,   535,   535,
+				 0,   535,   535,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   535,     0,   535,   535,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   536,     0,     0,     0,
+				 0,     0,   535,   535,   535,   532,   536,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   533,
+				 0,     0,     0,   536,   536,     0,   533,   536,   536,   536,
+			   536,   536,   536,   536,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   536,   536,   536,     0,   536,   536,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   536,     0,   536,
+			   536,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   536,
+			   536,   536,   533,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   532,   532,   532,   532,
+			   532,   532,   532,   532,   532,     0,   535,   535,   535,   535,
+			   535,   535,   532,   535,   532,   532,   532,   532,     0,   535,
+			   535,   535,   535,   532,   532,   532,   532,   532,   532,   532,
+			   535,   535,   532,   535,   535,   535,   535,   535,     0,     0,
+				 0,   532,   532,     0,   532,   532,   532,   532,   532,   532,
+			   532,   532,   532,   532,     0,     0,   532,     0,     0,   532,
+			   532,   532,     0,   532,   532,   535,   535,   535,   535,   535,
+			   535,   535,   535,   535,   535,   535,   535,   535,     0,     0,
+			   535,   535,   535,   532,     0,   535,   532,   532,     0,   532,
+			   532,   535,   532,   532,   532,   535,   532,   532,   532,   532,
+			   532,   532,     0,   535,   532,   535,     0,     0,   535,   535,
+				 0,   532,     0,   533,   533,   533,   533,   533,   533,   533,
+			   533,   533,     0,   536,   536,   536,   536,   536,   536,   533,
+			   536,   533,   533,   533,   533,     0,   536,   536,   536,   536,
+			   533,   533,   533,   533,   533,   533,   533,   536,   536,   533,
+			   536,   536,   536,   536,   536,     0,     0,     0,   533,   533,
+				 0,   533,   533,   533,   533,   533,   533,   533,   533,   533,
+			   533,     0,     0,   533,     0,     0,   533,   533,   533,     0,
+			   533,   533,   536,   536,   536,   536,   536,   536,   536,   536,
+			   536,   536,   536,   536,   536,     0,     0,   536,   536,   536,
+			   533,     0,   536,   533,   533,     0,   533,   533,   536,   533,
+			   533,   533,   536,   533,   533,   533,   533,   533,   533,   278,
+			   536,   533,   536,     0,     0,   536,   536,     0,   533,   278,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   531,     0,     0,     0,   278,   278,     0,   531,
+			   278,   278,   278,   278,   278,   278,   278,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   278,   278,   278,
+			   100,   278,   278,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   278,     0,   278,   278,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   390,     0,     0,     0,
+				 0,     0,     0,   278,   278,   531,   390,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   248,
+				 0,     0,     0,   390,   390,     0,     0,   390,   390,   390,
+			   390,   390,   390,   390,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   390,   390,     0,   390,   390,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   169,     0,     0,     0,     0,     0,     0,   390,     0,   390,
+			   390,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   169,     0,
+			   169,     0,   169,     0,     0,     0,   461,     0,     0,   390,
+			   390,   390,   248,     0,     0,     0,     0,     0,     0,   169,
+				 0,     0,     0,     0,     0,     0,   531,   531,   531,   531,
+			   531,   531,   531,   531,   531,     0,   278,   278,   278,   278,
+			   278,   278,   531,   278,   531,   531,   531,   531,     0,     0,
+			   278,   278,   278,   531,   531,   531,   531,   531,   531,   531,
+			   278,   278,   531,   278,   278,   278,   278,   278,     0,     0,
+				 0,   531,   531,     0,   531,   531,   531,   531,   531,   531,
+			   531,   531,   531,   531,     0,     0,   531,     0,     0,   531,
+			   531,   531,     0,   531,   531,   278,   278,   278,   278,   278,
+			   278,   278,   278,   278,   278,   278,   278,   278,     0,     0,
+			   278,   278,   278,   531,     0,   278,   531,   531,     0,   531,
+			   531,   278,   531,   531,   531,   278,   531,   531,   531,   531,
+			   531,   531,     0,   278,   531,   278,     0,     0,   278,   278,
+				 0,   531,     0,   248,   248,   248,   248,   248,   248,   248,
+			   248,   248,     0,   390,   390,   390,   390,   390,   390,   248,
+			   390,   248,   248,   248,   248,     0,   390,   390,   390,     0,
+			   248,   248,   248,   248,   248,   248,   248,   390,   390,   248,
+			   390,   390,   390,   390,   390,     0,     0,     0,   248,   248,
+				 0,   248,   248,   248,   248,   248,   248,   248,   248,   248,
+			   248,     0,     0,   248,     0,     0,   248,   248,   248,     0,
+			   248,   248,   390,   390,   390,   390,   390,   390,   390,   390,
+			   390,   390,   390,   390,   390,     0,     0,   390,   390,   390,
+			   248,     0,   390,   248,   248,     0,   248,   248,   390,   248,
+			   248,   248,   390,   248,   248,   248,   248,   248,   248,   558,
+				 0,   248,   390,     0,     0,   390,   390,     0,   248,   558,
+				 0,     0,     0,     0,     0,   169,     0,   169,   169,   169,
+			   169,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   248,     0,     0,     0,   558,   558,     0,     0,
+			   558,   558,   558,   558,   558,   558,   558,     0,     0,     0,
+				 0,     0,     0,   461,     0,     0,     0,   169,   558,   558,
+				 0,   558,   558,   169,   169,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   169,     0,     0,   169,
+			   169,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   558,     0,   558,   558,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   558,     0,     0,     0,
+				 0,     0,   558,   558,   558,   248,   558,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   248,
+				 0,     0,     0,   558,   558,     0,     0,   558,   558,   558,
+			   558,   558,   558,   558,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   558,   558,     0,   558,   558,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   179,     0,     0,     0,     0,     0,     0,   558,     0,   558,
+			   558,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   179,     0,
+			   179,     0,   179,     0,     0,     0,   463,     0,     0,     0,
+			   558,   558,   248,     0,     0,     0,     0,     0,     0,   179,
+				 0,     0,     0,     0,     0,     0,   248,   248,   248,   248,
+			   248,   248,   248,   248,   248,     0,   558,   558,   558,   558,
+			   558,   558,   248,   558,   248,   248,   248,   248,     0,   558,
+			   558,   558,     0,   248,   248,   248,   248,   248,   248,   248,
+			   558,   558,   248,   558,   558,   558,   558,   558,     0,     0,
+				 0,   248,   248,     0,   248,   248,   248,   248,   248,   248,
+			   248,   248,   248,   248,     0,     0,   248,     0,     0,   248,
+			   248,   248,     0,   248,   248,   558,   558,   558,   558,   558,
+			   558,   558,   558,   558,   558,   558,   558,   558,     0,     0,
+			   558,   558,   558,   248,     0,   558,   248,   248,     0,   248,
+			   248,   558,   248,   248,   248,   558,   248,   248,   248,   248,
+			   248,   248,     0,     0,   248,   558,     0,     0,   558,   558,
+				 0,   248,     0,   248,   248,   248,   248,   248,   248,   248,
+			   248,   248,     0,   558,   558,   558,   558,   558,   558,   248,
+			   558,   248,   248,   248,   248,     0,     0,   558,   558,     0,
+			   248,   248,   248,   248,   248,   248,   248,   558,   558,   248,
+			   558,   558,   558,   558,   558,     0,     0,     0,   248,   248,
+				 0,   248,   248,   248,   248,   248,   248,   248,   248,   248,
+			   248,     0,     0,   248,     0,     0,   248,   248,   248,     0,
+			   248,   248,   558,   558,   558,   558,   558,   558,   558,   558,
+			   558,   558,   558,   558,   558,     0,     0,   558,   558,   558,
+			   248,     0,   558,   248,   248,     0,   248,   248,   558,   248,
+			   248,   248,   558,   248,   248,   248,   248,   248,   248,   534,
+				 0,   248,   558,     0,     0,   558,   558,     0,   248,   534,
+				 0,     0,     0,     0,     0,   179,     0,   179,   179,   179,
+			   179,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   530,     0,     0,     0,   534,   534,     0,   530,
+			   534,   534,   534,    90,   534,   534,   534,     0,     0,     0,
+				 0,     0,     0,   463,     0,     0,     0,   179,   534,   534,
+				98,   534,   534,   179,   179,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   179,     0,     0,   179,
+			   179,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   534,     0,     0,   534,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   530,     0,     0,     0,
+				 0,     0,   534,   534,   534,   530,   530,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   530,
+				 0,     0,     0,   530,   530,     0,   530,   530,   530,   530,
+				89,   530,   530,   530,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   530,   530,    97,   530,   530,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   164,     0,     0,     0,     0,     0,     0,   530,     0,     0,
+			   530,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   164,     0,
+			   164,     0,   164,     0,     0,     0,   464,     0,     0,   530,
+			   530,   530,   530,     0,     0,     0,     0,     0,     0,   164,
+				 0,     0,     0,     0,     0,     0,   530,   530,   530,   530,
+			   530,   530,   530,   530,   530,     0,   534,   534,   534,     0,
+			   534,   534,   530,   534,   530,   530,   530,   530,     0,   534,
+				 0,     0,     0,   530,   530,   530,   530,   530,   530,   530,
+			   534,   534,   530,   534,   534,   534,   534,   534,     0,     0,
+				 0,   530,   530,     0,   530,   530,   530,   530,   530,   530,
+			   530,   530,   530,   530,     0,     0,   530,     0,     0,   530,
+			   530,   530,     0,   530,   530,   534,   534,   534,   534,   534,
+			   534,   534,   534,   534,   534,   534,   534,   534,     0,     0,
+			   534,   534,   534,   530,     0,     0,   530,   530,     0,   530,
+			   530,     0,   530,   530,   530,   534,   530,   530,   530,   530,
+			   530,   530,     0,     0,   530,   534,     0,     0,   534,   534,
+				 0,   530,     0,   530,   530,   530,   530,   530,   530,   530,
+			   530,   530,     0,   530,   530,   530,     0,   530,   530,   530,
+			   530,   530,   530,   530,   530,     0,   530,     0,     0,     0,
+			   530,   530,   530,   530,   530,   530,   530,   530,   530,   530,
+			   530,   530,   530,   530,   530,     0,     0,     0,   530,   530,
+				 0,   530,   530,   530,   530,   530,   530,   530,   530,   530,
+			   530,     0,     0,   530,     0,     0,   530,   530,   530,     0,
+			   530,   530,   530,   530,   530,   530,   530,   530,   530,   530,
+			   530,   530,   530,   530,   530,     0,     0,   530,   530,   530,
+			   530,     0,     0,   530,   530,     0,   530,   530,     0,   530,
+			   530,   530,   530,   530,   530,   530,   530,   530,   530,   531,
+				 0,   530,   530,     0,     0,   530,   530,     0,   530,   531,
+				 0,     0,     0,     0,     0,   164,     0,   164,   164,   164,
+			   164,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   531,     0,     0,     0,   531,   531,     0,   531,
+			   531,   531,   531,    91,   531,   531,   531,     0,     0,     0,
+				 0,     0,     0,   464,     0,     0,     0,   164,   531,   531,
+				99,   531,   531,   164,   164,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   164,     0,     0,   164,
+			   164,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   531,     0,     0,   531,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   534,     0,     0,     0,
+				 0,     0,   531,   531,   531,   531,   534,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   530,
+				 0,     0,     0,   534,   534,     0,   530,   534,   534,   534,
+			   534,   534,   534,   534,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   534,   534,    98,   534,   534,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   147,     0,     0,     0,     0,     0,     0,   534,     0,     0,
+			   534,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   147,     0,
+			   147,     0,   147,     0,     0,     0,   466,     0,     0,   534,
+			   534,   534,   530,     0,     0,     0,     0,     0,     0,   147,
+				 0,     0,     0,     0,     0,     0,   531,   531,   531,   531,
+			   531,   531,   531,   531,   531,     0,   531,   531,   531,     0,
+			   531,   531,   531,   531,   531,   531,   531,   531,     0,   531,
+				 0,     0,     0,   531,   531,   531,   531,   531,   531,   531,
+			   531,   531,   531,   531,   531,   531,   531,   531,     0,     0,
+				 0,   531,   531,     0,   531,   531,   531,   531,   531,   531,
+			   531,   531,   531,   531,     0,     0,   531,     0,     0,   531,
+			   531,   531,     0,   531,   531,   531,   531,   531,   531,   531,
+			   531,   531,   531,   531,   531,   531,   531,   531,     0,     0,
+			   531,   531,   531,   531,     0,     0,   531,   531,     0,   531,
+			   531,     0,   531,   531,   531,   531,   531,   531,   531,   531,
+			   531,   531,     0,     0,   531,   531,     0,     0,   531,   531,
+				 0,   531,     0,   530,   530,   530,   530,   530,   530,   530,
+			   530,   530,     0,   534,   534,   534,     0,   534,   534,   530,
+			   534,   530,   530,   530,   530,     0,   534,     0,     0,     0,
+			   530,   530,   530,   530,   530,   530,   530,   534,   534,   530,
+			   534,   534,   534,   534,   534,     0,     0,     0,   530,   530,
+				 0,   530,   530,   530,   530,   530,   530,   530,   530,   530,
+			   530,     0,     0,   530,     0,     0,   530,   530,   530,     0,
+			   530,   530,   534,   534,   534,   534,   534,   534,   534,   534,
+			   534,   534,   534,   534,   534,     0,     0,   534,   534,   534,
+			   530,     0,     0,   530,   530,     0,   530,   530,     0,   530,
+			   530,   530,   534,   530,   530,   530,   530,   530,   530,   530,
+				 0,   530,   534,     0,     0,   534,   534,     0,   530,   530,
+				 0,     0,     0,     0,     0,   147,     0,   147,   147,   147,
+			   147,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   530,     0,     0,     0,   530,   530,     0,   530,
+			   530,   530,   530,   530,   530,   530,   530,     0,     0,     0,
+				 0,     0,     0,   466,     0,     0,     0,   147,   530,   530,
+				97,   530,   530,   147,   147,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   147,     0,     0,   147,
+			   147,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   530,     0,     0,   530,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   531,     0,     0,     0,
+				 0,     0,   530,   530,   530,   530,   531,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   531,
+				 0,     0,     0,   531,   531,     0,   531,   531,   531,   531,
+			   531,   531,   531,   531,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   531,   531,    99,   531,   531,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   148,     0,     0,     0,     0,     0,     0,   531,     0,     0,
+			   531,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   148,     0,
+			   148,     0,   148,     0,     0,     0,   465,     0,     0,   531,
+			   531,   531,   531,     0,     0,     0,     0,     0,     0,   148,
+				 0,     0,     0,     0,     0,     0,   530,   530,   530,   530,
+			   530,   530,   530,   530,   530,     0,   530,   530,   530,     0,
+			   530,   530,   530,   530,   530,   530,   530,   530,     0,   530,
+				 0,     0,     0,   530,   530,   530,   530,   530,   530,   530,
+			   530,   530,   530,   530,   530,   530,   530,   530,     0,     0,
+				 0,   530,   530,     0,   530,   530,   530,   530,   530,   530,
+			   530,   530,   530,   530,     0,     0,   530,     0,     0,   530,
+			   530,   530,     0,   530,   530,   530,   530,   530,   530,   530,
+			   530,   530,   530,   530,   530,   530,   530,   530,     0,     0,
+			   530,   530,   530,   530,     0,     0,   530,   530,     0,   530,
+			   530,     0,   530,   530,   530,   530,   530,   530,   530,   530,
+			   530,   530,     0,     0,   530,   530,     0,     0,   530,   530,
+				 0,   530,     0,   531,   531,   531,   531,   531,   531,   531,
+			   531,   531,     0,   531,   531,   531,     0,   531,   531,   531,
+			   531,   531,   531,   531,   531,     0,   531,     0,     0,     0,
+			   531,   531,   531,   531,   531,   531,   531,   531,   531,   531,
+			   531,   531,   531,   531,   531,     0,     0,     0,   531,   531,
+				 0,   531,   531,   531,   531,   531,   531,   531,   531,   531,
+			   531,     0,     0,   531,     0,     0,   531,   531,   531,     0,
+			   531,   531,   531,   531,   531,   531,   531,   531,   531,   531,
+			   531,   531,   531,   531,   531,     0,     0,   531,   531,   531,
+			   531,     0,     0,   531,   531,     0,   531,   531,     0,   531,
+			   531,   531,   531,   531,   531,   531,   531,   531,   531,   278,
+				 0,   531,   531,     0,     0,   531,   531,     0,   531,   278,
+				 0,     0,     0,     0,     0,   148,     0,   148,   148,   148,
+			   148,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   531,     0,     0,     0,   278,   278,     0,   531,
+			   278,   278,   278,    92,   278,   278,   278,     0,     0,     0,
+				 0,     0,     0,   465,     0,     0,     0,   148,   278,   278,
+			   100,   278,   278,   148,   148,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   148,     0,     0,   148,
+			   148,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   278,     0,     0,   278,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   278,     0,     0,     0,
+				 0,     0,     0,   278,   278,   531,   278,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   531,
+				 0,     0,     0,   278,   278,     0,   531,   278,   278,   278,
+			   278,   278,   278,   278,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   278,   278,   100,   278,   278,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   108,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   278,     0,     0,
+			   278,     0,     0,     0,     0,     0,   109,     0,     0,     0,
+				 0,     0,     0,     0,   108,     0,   108,     0,   108,     0,
+				 0,     0,   454,     0,     0,     0,     0,     0,     0,     0,
+			   278,   278,   531,     0,   109,   108,   109,     0,   109,     0,
+				 0,     0,   458,     0,     0,     0,   531,   531,   531,   531,
+			   531,   531,   531,   531,   531,   109,   278,   278,   278,     0,
+			   278,   278,   531,   278,   531,   531,   531,   531,     0,     0,
+				 0,     0,     0,   531,   531,   531,   531,   531,   531,   531,
+			   278,   278,   531,   278,   278,   278,   278,   278,     0,     0,
+				 0,   531,   531,     0,   531,   531,   531,   531,   531,   531,
+			   531,   531,   531,   531,     0,     0,   531,     0,     0,   531,
+			   531,   531,     0,   531,   531,   278,   278,   278,   278,   278,
+			   278,   278,   278,   278,   278,   278,   278,   278,     0,     0,
+			   278,   278,   278,   531,     0,     0,   531,   531,     0,   531,
+			   531,     0,   531,   531,   531,   278,   531,   531,   531,   531,
+			   531,   531,     0,     0,   531,   278,     0,     0,   278,   278,
+				 0,   531,     0,   531,   531,   531,   531,   531,   531,   531,
+			   531,   531,     0,   278,   278,   278,     0,   278,   278,   531,
+			   278,   531,   531,   531,   531,     0,     0,     0,     0,     0,
+			   531,   531,   531,   531,   531,   531,   531,   278,   278,   531,
+			   278,   278,   278,   278,   278,     0,     0,     0,   531,   531,
+				 0,   531,   531,   531,   531,   531,   531,   531,   531,   531,
+			   531,     0,     0,   531,     0,     0,   531,   531,   531,     0,
+			   531,   531,   278,   278,   278,   278,   278,   278,   278,   278,
+			   278,   278,   278,   278,   278,     0,     0,   278,   278,   278,
+			   531,     0,     0,   531,   531,     0,   531,   531,     0,   531,
+			   531,   531,   278,   531,   531,   531,   531,   531,   531,   558,
+				 0,   531,   278,     0,     0,   278,   278,     0,   531,   558,
+				 0,   108,     0,   108,   108,   108,   108,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   109,   248,   109,   109,   109,   109,     0,     0,     0,
+			   558,     0,     0,     0,     0,   558,     0,     0,     0,   454,
+				 0,     0,     0,   108,     0,     0,     0,     0,   558,   108,
+			   108,     0,     0,     0,     0,     0,     0,     0,     0,   458,
+				 0,     0,   108,   109,     0,   108,   108,     0,     0,   109,
+			   109,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   109,     0,     0,   109,   109,     0,     0,     0,
+				 0,     0,     0,     0,     0,   391,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   391,     0,     0,     0,     0,
+				 0,     0,   558,     0,   558,   248,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   391,   391,     0,     0,   391,   391,   391,   391,
+			   391,   391,   391,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   391,   391,   391,    96,   391,   391,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   391,     0,   391,   391,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   391,   391,
+			   391,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   248,   248,   248,   248,
+			   248,   248,   248,   248,   248,     0,   558,   558,   558,   558,
+			   558,   558,   248,   558,   248,   248,   248,   248,     0,   558,
+			   558,     0,     0,   248,   248,   248,   248,   248,   248,   248,
+			   558,   558,   248,   558,   558,   558,   558,   558,     0,     0,
+				 0,   248,   248,     0,   248,   248,   248,   248,   248,   248,
+			   248,   248,   248,   248,     0,     0,   248,     0,     0,   248,
+			   248,   248,     0,   248,   248,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   558,   248,     0,     0,   248,   248,     0,   248,
+			   248,     0,   248,   248,   248,   558,   248,   248,   248,   248,
+			   248,   248,     0,     0,   248,   558,     0,     0,   558,   558,
+				 0,   248,   391,   391,   391,   391,   391,   391,     0,   391,
+				 0,     0,     0,     0,     0,   391,   391,   391,   391,   785,
+				 0,     0,   791,     0,     0,     0,   391,   391,     0,   391,
+			   391,   391,   391,   391,   796,   362,   357,     0,     0,     0,
+			   360,   358,     0,   359,     0,   361,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   354,     0,
+			   353,   391,   391,   391,   391,   391,   391,   391,   391,   391,
+			   391,   391,   391,   391,   390,     0,   391,   391,   391,     0,
+				 0,   391,     0,     0,   390,     0,     0,   391,     0,     0,
+				 0,   391,   356,     0,     0,     0,     0,     0,     0,   391,
+				 0,   391,     0,     0,   391,   391,     0,     0,     0,     0,
+				 0,   390,   390,     0,     0,   390,   390,   390,   390,   390,
+			   390,   390,   355,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   390,   390,   390,     0,   390,   390,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   390,     0,   390,   390,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   460,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   460,     0,
+				 0,     0,     0,     0,   917,     0,   919,   390,   390,   390,
+			   920,     0,     0,     0,     0,     0,   924,     0,     0,     0,
+				 0,     0,   929,     0,     0,   460,   460,     0,     0,   460,
+			   460,   460,   460,   460,   460,   460,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   460,   460,   460,    95,
+			   460,   460,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   460,
+				 0,   460,   460,     0,     0,     0,     0,     0,     0,     0,
+			   972,     0,     0,     0,     0,   973,     0,   974,     0,   976,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   460,   460,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   984,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   337,   338,   339,   340,   341,   342,
+			   343,   344,   345,   346,   347,     0,     0,     0,     0,   350,
+			   351,   390,   390,   390,   390,   390,   390,     0,   390,     0,
+				 0,     0,     0,     0,   390,   390,   390,   390,     0,     0,
+				 0,     0,     0,     0,     0,   390,   390,     0,   390,   390,
+			   390,   390,   390,     0,     0,     0,     0,     0,   260,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   260,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   390,   390,   390,   390,   390,   390,   390,   390,   390,   390,
+			   390,   390,   390,     0,     0,   390,   390,   390,     0,   260,
+			   390,     0,   258,     0,    31,     0,   390,     0,     0,     0,
+			   390,     0,     0,     0,    31,     0,     0,   260,   390,     0,
+			   390,     0,     0,   390,   390,   460,   460,   460,   460,   460,
+			   460,     0,   460,     0,     0,     0,     0,     0,     0,   460,
+			   460,   460,     0,     0,     0,    31,     0,     0,     0,   460,
+			   460,     0,   460,   460,   460,   460,   460,     0,     0,     0,
+				 0,     0,     0,    31,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   260,   460,   460,   460,   460,   460,   460,
+			   460,   460,   460,   460,   460,   460,   460,   558,     0,   460,
+			   460,   460,     0,   459,   460,     0,     0,   558,     0,     0,
+			   460,     0,     0,     0,   460,     0,     0,     0,     0,     0,
+				 0,     0,   460,     0,   460,     0,     0,   460,   460,    31,
+				 0,     0,     0,     0,   558,   558,     0,     0,   558,   558,
+			   558,   558,   558,   558,   558,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   558,   558,   558,     0,   558,
+			   558,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   558,     0,
+			   558,   558,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   268,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   268,     0,     0,     0,     0,     0,     0,     0,     0,
+			   558,   558,   558,     0,     0,   260,   260,   260,   260,   260,
+			   260,     0,   260,     0,     0,     0,     0,     0,   268,   268,
+				 0,     0,   268,   268,   268,   268,   268,   268,   268,     0,
+				 0,     0,   260,   260,   260,   260,   260,     0,     0,   268,
+			   268,   268,   102,   268,   268,     0,     0,     0,     0,     0,
+				 0,    31,    31,    31,     0,    31,    31,     0,    31,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   268,     0,   268,   268,     0,     0,    31,    31,
+				31,    31,    31,     0,   260,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   260,   268,   268,   260,   260,     0,
+				 0,     0,     0,   362,   357,     0,     0,     0,   360,   358,
+				 0,   359,     0,   361,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   354,     0,   353,     0,
+				 0,     0,     0,     0,   558,   558,   558,   558,   558,   558,
+				31,   558,     0,    31,    31,     0,     0,   558,   558,   558,
+			   558,     0,     0,     0,     0,     0,     0,     0,   558,   558,
+			   356,   558,   558,   558,   558,   558,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   355,     0,     0,   558,   558,   558,   558,   558,   558,   558,
+			   558,   558,   558,   558,   558,   558,     0,     0,   558,   558,
+			   558,     0,     0,   558,     0,     0,     0,     0,     0,   558,
+				50,     0,     0,   558,     0,     0,     0,     0,     0,     0,
+				50,   558,     0,   558,     0,     0,   558,   558,   268,   268,
+			   268,   268,   268,   268,     0,   268,     0,     0,     0,     0,
+				 0,     0,   268,   268,   268,     0,     0,     0,     0,     0,
+				 0,    50,   268,   268,     0,   268,   268,   268,   268,   268,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,    50,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   268,   268,   268,
+			   268,   268,   268,   268,   268,   268,   268,   268,   268,   268,
+			   279,     0,   268,   268,   268,     0,     0,   268,     0,     0,
+			   279,     0,     0,   268,     0,     0,     0,   268,     0,     0,
+				 0,     0,     0,     0,     0,   268,     0,   268,     0,     0,
+			   268,   268,     0,     0,     0,    50,     0,   279,   279,     0,
+				 0,   279,   279,   279,   279,   279,   279,   279,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   279,   279,
+			   279,   101,   279,   279,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   337,     0,     0,     0,     0,   342,   343,     0,
+				 0,   279,     0,   279,   279,     0,     0,   350,   351,     0,
+				 0,     0,     0,     0,   228,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   228,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   279,   279,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   228,   228,     0,     0,   228,   228,   228,   228,   228,
+			   322,   228,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   228,   228,   228,     0,   228,   228,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,    50,    50,    50,
+				50,    50,    50,     0,    50,     0,     0,     0,     0,     0,
+				 0,    50,     0,     0,     0,   322,     0,   228,   228,     0,
+				 0,    50,    50,     0,    50,    50,    50,    50,    50,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   228,   228,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   279,   279,   279,
+			   279,   279,   279,     0,   279,     0,    50,     0,     0,    50,
+				50,   279,   279,   279,     0,     0,     0,     0,     0,     0,
+				 0,   279,   279,     0,   279,   279,   279,   279,   279,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   279,   279,   279,   279,
+			   279,   279,   279,   279,   279,   279,   279,   279,   279,     0,
+				 0,   279,   279,   279,     0,     0,   279,     0,     0,     0,
+				 0,     0,   279,    52,     0,     0,   279,     0,     0,     0,
+				 0,     0,     0,    52,   279,     0,   279,     0,     0,   279,
+			   279,   228,   228,   228,   228,   228,   228,     0,   228,     0,
+				 0,     0,     0,     0,     0,   228,   228,   228,     0,     0,
+				 0,     0,     0,     0,    52,   228,   228,     0,   228,   228,
+			   228,   228,   228,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,    52,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   228,   228,   228,   228,   228,   228,   228,   228,   228,   228,
+			   228,   228,   228,   287,     0,   228,   228,   322,     0,     0,
+			   228,     0,     0,   287,     0,     0,   228,     0,     0,     0,
+			   322,     0,     0,     0,     0,     0,     0,     0,   228,     0,
+			   228,     0,     0,   228,   228,     0,     0,     0,    52,     0,
+			   287,   287,     0,     0,   287,   287,   287,   287,   287,   287,
+			   287,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   287,   287,   287,     0,   287,   287,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   287,     0,   287,   287,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   558,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   558,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   287,   287,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   558,   558,     0,     0,   558,   558,
+			   558,   558,   558,   558,   558,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   558,   558,   558,     0,   558,
+			   558,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				52,    52,    52,    52,    52,    52,     0,    52,     0,     0,
+				 0,     0,     0,     0,    52,     0,     0,     0,   558,     0,
+			   558,   558,     0,     0,    52,    52,     0,    52,    52,    52,
+				52,    52,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   558,   558,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   287,   287,   287,   287,   287,   287,     0,   287,     0,    52,
+				 0,     0,    52,    52,   287,   287,   287,     0,     0,     0,
+				 0,     0,     0,     0,   287,   287,     0,   287,   287,   287,
+			   287,   287,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   287,
+			   287,   287,   287,   287,   287,   287,   287,   287,   287,   287,
+			   287,   287,     0,     0,   287,   287,   287,     0,     0,   287,
+				 0,     0,     0,     0,     0,   287,    53,     0,     0,   287,
+				 0,     0,     0,     0,     0,     0,    53,   287,     0,   287,
+				 0,     0,   287,   287,   558,   558,   558,   558,   558,   558,
+				 0,   558,     0,     0,     0,     0,     0,     0,   558,   558,
+			   558,     0,     0,     0,     0,     0,     0,    53,   558,   558,
+				 0,   558,   558,   558,   558,   558,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,    53,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   558,   558,   558,   558,   558,   558,   558,
+			   558,   558,   558,   558,   558,   558,   452,     0,   558,   558,
+			   558,     0,     0,   558,     0,     0,   452,     0,     0,   558,
+				 0,     0,     0,   558,     0,     0,     0,     0,     0,     0,
+				 0,   558,     0,   558,     0,     0,   558,   558,     0,     0,
+				 0,    53,     0,   452,   452,     0,     0,   452,   452,   452,
+			   452,   452,   452,   452,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   452,   452,   452,     0,   452,   452,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   452,     0,   452,
+			   452,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   453,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   453,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   452,   452,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   453,   453,     0,
+				 0,   453,   453,   453,   453,   453,   453,   453,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   453,   453,
+			   453,     0,   453,   453,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,    53,    53,    53,    53,    53,    53,     0,
+				53,     0,     0,     0,     0,     0,     0,    53,     0,     0,
+				 0,   453,     0,   453,   453,     0,     0,    53,    53,     0,
+				53,    53,    53,    53,    53,   234,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   453,   453,     0,     0,     0,     0,
+				 0,     0,   362,   357,     0,     0,     0,   360,   358,     0,
+			   359,     0,   361,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   354,     0,   353,   352,     0,
+				 0,     0,     0,   452,   452,   452,   452,   452,   452,     0,
+			   452,     0,    53,     0,     0,    53,    53,   452,   452,   452,
+				 0,     0,     0,     0,     0,     0,     0,   452,   452,   356,
+			   452,   452,   452,   452,   452,     0,     0,   362,   357,     0,
+				 0,     0,   360,   358,     0,   359,     0,   361,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   355,
+			   354,     0,   353,   452,   452,   452,   452,   452,   452,   452,
+			   452,   452,   452,   452,   452,     0,     0,   452,   452,   452,
+				 0,     0,   452,     0,     0,     0,     0,     0,   452,     0,
+				 0,     0,   452,     0,   356,     0,     0,     0,     0,     0,
+			   452,     0,   452,     0,     0,   452,   452,   453,   453,   453,
+			   453,   453,   453,     0,   453,     0,     0,     0,     0,     0,
+				 0,   453,   453,   453,   355,     0,     0,     0,     0,     0,
+				 0,   453,   453,     0,   453,   453,   453,   453,   453,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   318,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   318,   453,   453,   453,
+			   453,   453,   453,   453,   453,   453,   453,   453,   453,     0,
+				 0,   453,   453,   453,     0,     0,   453,     0,     0,     0,
+				 0,     0,   453,   318,   318,     0,   453,   318,   318,   318,
+			   318,   318,   318,   318,   453,     0,   453,     0,     0,   453,
+			   453,     0,     0,     0,     0,   318,   318,     0,   318,   318,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   319,   318,     0,   318,
+			   318,     0,     0,     0,     0,     0,   319,     0,     0,     0,
+				 0,   337,   338,   339,   340,   341,   342,   343,   344,   345,
+			   346,   347,   348,   349,     0,     0,   350,   351,     0,     0,
+			   318,   318,     0,   319,   319,     0,     0,   319,   319,   319,
+			   319,   319,   319,   319,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   319,   319,     0,   319,   319,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   337,   338,   339,   340,
+			   341,   342,   343,   344,     0,   346,   347,   319,     0,   319,
+			   319,   350,   351,     0,     0,     0,     0,     0,     0,     0,
+			   282,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   282,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   319,   319,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   282,   282,     0,
+				 0,   282,   282,   282,   282,   282,   282,   282,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   282,
+			   282,     0,   282,   282,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   318,   318,   318,   318,   318,   318,     0,
+			   318,     0,     0,     0,     0,     0,     0,   318,   318,     0,
+				 0,   282,     0,   282,   282,     0,     0,   318,   318,     0,
+			   318,   318,   318,   318,   318,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   282,   282,     0,     0,     0,     0,
+				 0,     0,   318,   318,   318,   318,   318,   318,   318,   318,
+			   318,   318,   318,   318,   318,     0,     0,   318,   318,   318,
+				 0,     0,   318,     0,     0,     0,     0,     0,   318,     0,
+				 0,     0,   318,   319,   319,   319,   319,   319,   319,     0,
+			   319,     0,   318,     0,     0,   318,   318,   319,   319,     0,
+				 0,     0,     0,     0,     0,     0,     0,   319,   319,     0,
+			   319,   319,   319,   319,   319,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   319,   319,   319,   319,   319,   319,   319,   319,
+			   319,   319,   319,   319,   319,     0,     0,   319,   319,   319,
+				 0,     0,   319,     0,     0,     0,     0,     0,   319,     0,
+				 0,     0,   319,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   319,     0,     0,   319,   319,   282,   282,   282,
+			   282,   282,   282,     0,   282,     0,     0,     0,     0,     0,
+				 0,   282,   282,     0,     0,     0,     0,     0,     0,     0,
+				 0,   282,   282,     0,   282,   282,   282,   282,   282,     0,
+			   362,   357,     0,     0,     0,   360,   358,     0,   359,     0,
+			   361,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   354,     0,   353,   282,   282,   282,   282,
+			   282,   282,   282,   282,   282,   282,   282,   282,   282,   207,
+				 0,   282,   282,   282,     0,     0,   282,     0,     0,   207,
+				 0,     0,   282,     0,     0,     0,   282,   356,     0,     0,
+				 0,     0,     0,     0,     0,     0,   282,     0,     0,   282,
+			   282,     0,     0,     0,     0,     0,   207,   207,     0,     0,
+			   207,   207,   207,   207,   207,     0,   207,   355,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   207,   207,   207,
+				 0,   207,   207,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   203,     0,   207,   207,     0,     0,     0,     0,     0,     0,
+			   203,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   207,   207,     0,     0,   203,   203,     0,
+				 0,   203,   203,   203,   203,   203,     0,   203,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   203,   203,
+			   203,     0,   203,   203,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   200,     0,   203,   203,     0,     0,     0,     0,     0,
+				 0,   200,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   203,   203,     0,     0,   200,   200,
+				 0,     0,   200,   200,   200,   200,   200,     0,   200,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   200,
+			   200,   200,     0,   200,   200,     0,     0,     0,     0,   337,
+			   338,   339,   340,   341,   342,   343,     0,     0,   346,   347,
+				 0,     0,     0,     0,   350,   351,   207,   207,   207,   207,
+			   207,   207,     0,   207,   200,   200,     0,     0,     0,     0,
+			   207,   207,   207,     0,     0,     0,     0,     0,     0,     0,
+			   207,   207,     0,   207,   207,   207,   207,   207,     0,     0,
+				 0,     0,     0,     0,     0,   200,   200,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   207,   207,   207,   207,
+			   207,   207,   207,   207,   207,   207,   207,   207,     0,     0,
+			   207,   207,    19,     0,     0,   207,     0,     0,     0,     0,
+				 0,   207,    19,     0,     0,     0,     0,   203,   203,   203,
+			   203,   203,   203,   207,   203,   207,     0,     0,   207,   207,
+				 0,   203,   203,   203,     0,     0,     0,     0,     0,     0,
+				 0,   203,   203,    19,   203,   203,   203,   203,   203,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,    19,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   203,   203,   203,
+			   203,   203,   203,   203,   203,   203,   203,   203,   203,     0,
+				 0,   203,   203,    40,     0,     0,   203,     0,     0,     0,
+				 0,     0,   203,    40,     0,     0,     0,     0,   200,   200,
+			   200,   200,   200,   200,   203,   200,   203,     0,     0,   203,
+			   203,     0,   200,   200,   200,     0,     0,    19,     0,     0,
+				 0,     0,   200,   200,    40,   200,   200,   200,   200,   200,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,    40,     0,   201,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   201,     0,     0,     0,   200,   200,
+			   200,   200,   200,   200,   200,   200,   200,   200,   200,   200,
+				 0,     0,   200,   200,     0,     0,     0,   200,     0,     0,
+				 0,   201,   201,   200,     0,   201,   201,   201,   201,   201,
+				 0,   201,     0,     0,     0,   200,     0,   200,     0,     0,
+			   200,   200,   201,   201,   201,     0,   201,   201,    40,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   202,     0,   201,   201,     0,
+				 0,     0,     0,     0,     0,   202,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,    19,
+				19,    19,     0,    19,    19,     0,    19,     0,   201,   201,
+				 0,     0,   202,   202,     0,     0,   202,   202,   202,   202,
+			   202,     0,   202,     0,     0,     0,    19,    19,    19,    19,
+				19,     0,     0,   202,   202,   202,     0,   202,   202,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   204,     0,   202,   202,
+				 0,     0,     0,     0,     0,     0,   204,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				40,    40,    40,     0,    40,    40,     0,    40,    19,   202,
+			   202,    19,    19,   204,   204,     0,     0,   204,   204,   204,
+			   204,   204,     0,   204,     0,     0,     0,    40,    40,    40,
+				40,     0,     0,     0,   204,   204,   204,     0,   204,   204,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   201,   201,   201,   201,   201,   201,     0,   201,   204,
+			   204,     0,     0,     0,     0,   201,   201,   201,     0,     0,
+				 0,     0,     0,     0,     0,   201,   201,     0,   201,   201,
+			   201,   201,   201,     0,     0,     0,     0,     0,     0,    40,
+			   204,   204,    40,    40,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   201,   201,   201,   201,   201,   201,   201,   201,   201,
+			   201,   201,   201,     0,     0,   201,   201,     0,     0,     0,
+			   201,     0,     0,     0,     0,     0,   201,     0,     0,     0,
+				 0,     0,   202,   202,   202,   202,   202,   202,   201,   202,
+			   201,     0,     0,   201,   201,     0,   202,   202,   202,     0,
+				 0,     0,     0,     0,     0,     0,   202,   202,     0,   202,
+			   202,   202,   202,   202,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   202,   202,   202,   202,   202,   202,   202,   202,
+			   202,   202,   202,   202,     0,     0,   202,   202,     0,     0,
+				 0,   202,     0,     0,     0,     0,     0,   202,     0,     0,
+				 0,     0,     0,   204,   204,   204,   204,   204,   204,   202,
+			   204,   202,     0,     0,   202,   202,     0,   204,   204,   204,
+				 0,     0,     0,     0,     0,     0,     0,   204,   204,     0,
+			   204,   204,   204,   204,   204,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   205,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   205,
+				 0,     0,     0,   204,   204,   204,   204,   204,   204,   204,
+			   204,   204,   204,   204,   204,     0,     0,   204,   204,     0,
+				 0,     0,   204,     0,     0,     0,   205,   205,   204,     0,
+			   205,   205,   205,   205,   205,     0,   205,     0,     0,     0,
+			   204,     0,   204,     0,     0,   204,   204,   205,   205,   205,
+				 0,   205,   205,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   391,     0,   205,   205,     0,     0,     0,     0,     0,     0,
+			   391,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   205,   205,     0,     0,   391,   391,     0,
+				 0,   391,   391,   391,    88,   391,   391,   391,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   391,
+			   391,    96,   391,   391,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   391,     0,   391,   391,     0,     0,     0,     0,     0,
+				 0,     0,     0,   391,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   391,   391,   391,     0,     0,     0,     0,
+			   391,   391,     0,     0,   391,   391,   391,   391,   391,   391,
+			   391,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   391,   391,    96,   391,   391,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   205,   205,   205,   205,
+			   205,   205,     0,   205,   391,     0,     0,   391,     0,     0,
+			   205,   205,   205,     0,     0,     0,     0,     0,     0,     0,
+			   205,   205,     0,   205,   205,   205,   205,   205,     0,     0,
+				 0,     0,     0,     0,     0,     0,   391,   391,   391,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   205,   205,   205,   205,
+			   205,   205,   205,   205,   205,   205,   205,   205,     0,     0,
+			   205,   205,     0,     0,     0,   205,     0,     0,     0,     0,
+				 0,   205,     0,     0,     0,     0,     0,   391,   391,   391,
+				 0,   391,   391,   205,   391,   205,     0,     0,   205,   205,
+			   391,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   391,   391,     0,   391,   391,   391,   391,   391,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   391,   391,   391,   391,
+			   391,   391,   391,   391,   391,   391,   391,   391,   391,     0,
+				 0,   391,   391,   391,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   391,     0,     0,     0,
+			   391,   391,   391,     0,   391,   391,   391,   391,     0,   391,
+			   391,     0,     0,   391,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   391,   391,     0,   391,   391,   391,
+			   391,   391,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   391,
+			   391,   391,   391,   391,   391,   391,   391,   391,   391,   391,
+			   391,   391,   460,     0,   391,   391,   391,     0,     0,     0,
+				 0,     0,   460,     0,     0,     0,     0,     0,     0,   391,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   391,
+				 0,     0,   391,   391,     0,     0,     0,     0,     0,   460,
+			   460,     0,     0,   460,   460,   460,    87,   460,   460,   460,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   460,   460,    95,   460,   460,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   268,   460,     0,     0,   460,     0,     0,     0,
+				 0,     0,   268,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   460,   460,     0,   268,
+			   268,     0,     0,   268,   268,   268,    94,   268,   268,   268,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   268,   268,   102,   268,   268,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   268,     0,     0,   268,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   279,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   279,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   268,   268,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   279,   279,     0,     0,   279,   279,   279,
+				93,   279,   279,   279,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   279,   279,   101,   279,   279,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   460,
+			   460,   460,     0,   460,   460,     0,   460,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   279,     0,     0,
+			   279,     0,     0,   460,   460,     0,   460,   460,   460,   460,
+			   460,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   279,   279,     0,     0,     0,     0,     0,     0,   460,   460,
+			   460,   460,   460,   460,   460,   460,   460,   460,   460,   460,
+			   460,     0,     0,   460,   460,   460,     0,   459,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   460,   268,
+			   268,   268,     0,   268,   268,     0,   268,     0,   460,     0,
+				 0,   460,   460,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   268,   268,     0,   268,   268,   268,   268,
+			   268,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   268,   268,
+			   268,   268,   268,   268,   268,   268,   268,   268,   268,   268,
+			   268,     0,     0,   268,   268,   268,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   268,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   268,     0,
+				 0,   268,   268,   279,   279,   279,     0,   279,   279,     0,
+			   279,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   279,   279,     0,
+			   279,   279,   279,   279,   279,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   198,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   198,     0,   279,   279,   279,   279,   279,   279,   279,   279,
+			   279,   279,   279,   279,   279,     0,     0,   279,   279,   279,
+				 0,     0,     0,     0,     0,     0,     0,     0,   198,     0,
+				 0,   198,   279,   198,   198,   198,     0,     0,     0,     0,
+				 0,     0,   279,     0,     0,   279,   279,     0,   198,   198,
+			   198,     0,   198,   198,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   199,     0,   198,   198,     0,     0,     0,     0,     0,
+				 0,   199,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   198,   198,     0,     0,     0,   199,
+				 0,     0,   199,     0,   199,   199,   199,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   199,
+			   199,   199,     0,   199,   199,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   268,     0,   199,   199,     0,     0,     0,     0,
+				 0,     0,   268,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   199,   199,     0,     0,   268,
+			   268,     0,     0,   268,   268,   268,   268,   268,   268,   268,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   268,   268,   102,   268,   268,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   198,   198,   198,
+			   198,   198,   198,   268,   198,     0,   268,     0,     0,     0,
+				 0,   198,   198,   198,     0,     0,     0,     0,     0,     0,
+				 0,   198,   198,     0,   198,   198,   198,   198,   198,     0,
+				 0,     0,     0,     0,     0,     0,   268,   268,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   198,   198,   198,
+			   198,   198,   198,   198,   198,   198,   198,   198,   198,     0,
+				 0,   198,   198,     0,     0,     0,   198,     0,     0,     0,
+				 0,     0,   198,     0,     0,     0,     0,     0,   199,   199,
+			   199,   199,   199,   199,   198,   199,   198,     0,     0,   198,
+			   198,     0,   199,   199,   199,     0,     0,     0,     0,     0,
+				 0,     0,   199,   199,     0,   199,   199,   199,   199,   199,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   223,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   223,     0,     0,     0,   199,   199,
+			   199,   199,   199,   199,   199,   199,   199,   199,   199,   199,
+				 0,     0,   199,   199,     0,     0,     0,   199,     0,     0,
+				 0,     0,   223,   199,     0,   223,     0,     0,   223,   268,
+			   268,   268,     0,   268,   268,   199,   268,   199,     0,     0,
+			   199,   199,   223,   223,   223,     0,   223,   223,     0,     0,
+				 0,     0,     0,   268,   268,     0,   268,   268,   268,   268,
+			   268,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   224,     0,   223,   223,     0,
+				 0,     0,     0,     0,     0,   224,     0,     0,   268,   268,
+			   268,   268,   268,   268,   268,   268,   268,   268,   268,   268,
+			   268,     0,     0,   268,   268,   268,     0,     0,   223,   223,
+				 0,     0,     0,   224,     0,     0,   224,     0,   268,   224,
+				 0,     0,     0,     0,     0,     0,     0,     0,   268,     0,
+				 0,   268,   268,   224,   224,   224,     0,   224,   224,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   210,     0,   224,   224,
+				 0,     0,     0,     0,     0,     0,   210,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   224,
+			   224,     0,     0,     0,   210,     0,     0,   210,     0,     0,
+			   210,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   210,   210,   210,     0,   210,   210,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   223,   223,   223,   223,   223,   223,     0,   223,   210,
+			   210,     0,     0,     0,     0,   223,   223,   223,     0,     0,
+				 0,     0,     0,     0,     0,   223,   223,     0,   223,   223,
+			   223,   223,   223,     0,     0,     0,     0,     0,     0,     0,
+			   210,   210,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   223,   223,   223,   223,   223,   223,   223,   223,   223,
+			   223,   223,   223,     0,     0,   223,   223,     0,     0,     0,
+			   223,     0,     0,     0,     0,     0,   223,     0,     0,     0,
+				 0,     0,   224,   224,   224,   224,   224,   224,   223,   224,
+			   223,     0,     0,   223,   223,     0,   224,   224,   224,     0,
+				 0,     0,     0,     0,     0,     0,   224,   224,     0,   224,
+			   224,   224,   224,   224,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   224,   224,   224,   224,   224,   224,   224,   224,
+			   224,   224,   224,   224,     0,   208,   224,   224,     0,     0,
+				 0,   224,     0,     0,     0,   208,     0,   224,     0,     0,
+				 0,     0,     0,   210,   210,   210,   210,   210,   210,   224,
+			   210,   224,     0,     0,   224,   224,     0,   210,   210,   210,
+				 0,     0,     0,     0,     0,     0,   208,   210,   210,   208,
+			   210,   210,   210,   210,   210,     0,     0,     0,     0,     0,
+				 0,     0,     0,   208,   208,   208,     0,   208,   208,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   210,   210,   210,   210,   210,   210,   210,
+			   210,   210,   210,   210,   210,     0,   209,     0,   208,   208,
+				 0,     0,   210,     0,     0,     0,   209,     0,   210,   362,
+			   357,     0,     0,     0,   360,   358,     0,   359,     0,   361,
+			   210,     0,   210,     0,     0,   210,   210,     0,     0,   208,
+			   208,     0,   354,     0,   353,   352,     0,   209,     0,     0,
+			   209,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   209,   209,   209,     0,   209,   209,
+				 0,     0,     0,     0,     0,     0,   356,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   213,     0,   209,
+			   209,     0,     0,     0,     0,     0,   355,   213,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   209,   209,     0,     0,     0,     0,     0,     0,   213,     0,
+				 0,   213,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   213,   213,   213,     0,   213,
+			   213,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   208,   208,   208,   208,   208,   208,     0,   208,
+			   213,     0,     0,     0,     0,     0,   208,   208,   208,     0,
+				 0,     0,     0,     0,     0,     0,   208,   208,     0,   208,
+			   208,   208,   208,   208,     0,     0,     0,     0,     0,     0,
+				 0,     0,   213,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   208,   208,   208,   208,   208,   208,   208,   208,
+			   208,   208,   208,   208,     0,     0,     0,     0,     0,     0,
+				 0,   208,     0,     0,     0,     0,     0,   208,     0,     0,
+				 0,     0,     0,   209,   209,   209,   209,   209,   209,   208,
+			   209,   208,     0,     0,   208,   208,     0,   209,   209,   209,
+				 0,     0,     0,     0,     0,     0,     0,   209,   209,     0,
+			   209,   209,   209,   209,   209,     0,     0,     0,   337,   338,
+			   339,   340,   341,   342,   343,   344,   345,   346,   347,   348,
+			   349,     0,     0,   350,   351,     0,     0,     0,   439,     0,
+				 0,     0,     0,   209,   209,   209,   209,   209,   209,   209,
+			   209,   209,   209,   209,   209,     0,   215,     0,     0,     0,
+				 0,     0,   209,     0,     0,     0,   215,     0,   209,     0,
+				 0,     0,     0,     0,   213,   213,   213,   213,   213,   213,
+			   209,   213,   209,     0,     0,   209,   209,     0,   213,   213,
+			   213,     0,     0,     0,     0,     0,     0,   215,   213,   213,
+			   215,   213,   213,   213,   213,   213,     0,     0,     0,     0,
+				 0,     0,     0,     0,   215,   215,   215,     0,   215,   215,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   213,   213,   213,   213,   213,   213,
+			   213,   213,   213,   213,   213,   213,     0,   212,     0,   215,
+				 0,     0,     0,   213,     0,     0,     0,   212,     0,   213,
+			   362,   357,     0,     0,     0,   360,   358,     0,   359,     0,
+			   361,   213,     0,   213,     0,     0,   213,   213,     0,     0,
+				 0,   215,     0,   354,     0,   353,   352,     0,   212,     0,
+				 0,   212,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   212,   212,   212,     0,   212,
+			   212,     0,     0,     0,     0,     0,     0,   356,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   214,     0,
+			   212,     0,     0,     0,     0,     0,     0,   355,   214,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   212,     0,     0,     0,     0,     0,     0,   214,
+				 0,     0,   214,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   214,   214,   214,     0,
+			   214,   214,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   215,   215,   215,   215,   215,   215,     0,
+			   215,   214,     0,     0,     0,     0,     0,   215,   215,   215,
+				 0,     0,     0,     0,     0,     0,     0,   215,   215,     0,
+			   215,   215,   215,   215,   215,     0,     0,     0,     0,     0,
+				 0,     0,     0,   214,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   215,   215,   215,   215,   215,   215,   215,
+			   215,   215,   215,   215,   215,     0,     0,     0,     0,     0,
+				 0,     0,   215,     0,     0,     0,     0,     0,   215,     0,
+				 0,     0,     0,     0,   212,   212,   212,   212,   212,   212,
+			   215,   212,   215,     0,     0,   215,   215,     0,   212,   212,
+			   212,     0,     0,     0,     0,     0,     0,     0,   212,   212,
+				 0,   212,   212,   212,   212,   212,     0,     0,     0,   337,
+			   338,   339,   340,   341,   342,   343,   344,   345,   346,   347,
+			   348,   349,     0,     0,   350,   351,     0,     0,     0,     0,
+				 0,     0,     0,     0,   212,   212,   212,   212,   212,   212,
+			   212,   212,   212,   212,   212,   212,     0,   211,     0,     0,
+				 0,     0,     0,   212,     0,     0,     0,   211,     0,   212,
+				 0,     0,     0,     0,     0,   214,   214,   214,   214,   214,
+			   214,   212,   214,   212,     0,     0,   212,   212,     0,   214,
+			   214,   214,     0,     0,     0,     0,     0,     0,   211,   214,
+			   214,   211,   214,   214,   214,   214,   214,     0,     0,     0,
+				 0,     0,     0,     0,     0,   211,   211,     0,     0,     0,
+			   211,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   214,   214,   214,   214,   214,
+			   214,   214,   214,   214,   214,   214,   214,     0,   216,     0,
+			   211,     0,     0,     0,   214,     0,     0,     0,   216,     0,
+			   214,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   214,     0,   214,   362,   357,   214,   214,     0,
+			   360,   358,   211,   359,     0,   361,     0,     0,     0,   216,
+				 0,     0,   216,     0,     0,     0,     0,     0,   354,     0,
+			   353,   352,     0,     0,     0,     0,   216,   216,     0,     0,
+				 0,   216,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   356,     0,     0,     0,     0,     0,     0,   217,
+				 0,   216,     0,     0,     0,     0,     0,     0,     0,   217,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   355,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   216,     0,     0,     0,     0,     0,     0,
+			   217,     0,     0,   217,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   217,   217,     0,
+				 0,     0,   217,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   211,   211,   211,   211,   211,   211,
+				 0,   211,   217,     0,     0,     0,     0,     0,   211,   211,
+			   211,     0,     0,     0,     0,     0,     0,     0,   211,   211,
+				 0,   211,   211,   211,   211,   211,     0,     0,     0,     0,
+				 0,     0,     0,     0,   217,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   211,   211,     0,     0,   211,   211,     0,     0,     0,     0,
+				 0,     0,     0,   211,     0,     0,     0,     0,     0,   211,
+				 0,     0,     0,     0,     0,   216,   216,   216,   216,   216,
+			   216,   211,   216,   211,     0,     0,   211,   211,     0,   216,
+			   216,   216,     0,     0,     0,     0,   717,     0,     0,   216,
+			   216,     0,   216,   216,   216,   216,   216,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   337,   338,   339,   340,   341,   342,
+			   343,   344,   345,   346,   347,   348,   349,     0,     0,   350,
+			   351,   216,   216,     0,     0,   216,   216,     0,   218,     0,
+				 0,     0,     0,     0,   216,     0,     0,     0,   218,     0,
+			   216,     0,     0,     0,     0,     0,   217,   217,   217,   217,
+			   217,   217,   216,   217,   216,     0,     0,   216,   216,     0,
+			   217,   217,   217,     0,     0,     0,     0,     0,     0,   218,
+			   217,   217,   218,   217,   217,   217,   217,   217,     0,     0,
+				 0,     0,     0,     0,     0,     0,   218,   218,     0,     0,
+				 0,   218,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   217,   217,     0,     0,   217,   217,     0,   225,
+				 0,   218,     0,     0,     0,   217,     0,     0,     0,   225,
+				 0,   217,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   217,     0,   217,     0,     0,   217,   217,
+				 0,     0,     0,   218,     0,     0,     0,     0,     0,     0,
+			   225,     0,     0,   225,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   225,   225,     0,
+				 0,     0,   225,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   219,     0,   225,     0,     0,     0,     0,     0,     0,     0,
+			   219,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   225,     0,     0,     0,     0,     0,
+				 0,   219,     0,     0,   219,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   219,   219,
+				 0,     0,     0,   219,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   218,   218,   218,   218,   218,
+			   218,     0,   218,   219,     0,     0,     0,     0,     0,   218,
+			   218,   218,     0,     0,     0,     0,     0,     0,     0,   218,
+			   218,     0,   218,   218,   218,   218,   218,     0,     0,     0,
+				 0,     0,     0,     0,     0,   219,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   218,   218,     0,     0,   218,   218,     0,     0,     0,
+				 0,     0,     0,     0,   218,     0,     0,     0,     0,     0,
+			   218,     0,     0,     0,     0,     0,   225,   225,   225,   225,
+			   225,   225,   218,   225,   218,     0,   380,   218,   218,     0,
+			   225,   225,   225,     0,     0,     0,   380,     0,     0,     0,
+			   225,   225,     0,   225,   225,   225,   225,   225,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   380,     0,     0,
+				 0,     0,   380,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   225,   225,     0,   380,   225,   225,     0,   220,
+				 0,     0,     0,     0,     0,   225,     0,     0,     0,   220,
+				 0,   225,     0,     0,     0,     0,     0,   219,   219,   219,
+			   219,   219,   219,   225,   219,   225,     0,     0,   225,   225,
+				 0,   219,   219,   219,     0,     0,     0,     0,     0,     0,
+			   220,   219,   219,   220,   219,   219,   219,   219,   219,     0,
+				 0,     0,     0,     0,     0,     0,     0,   220,   220,     0,
+				 0,   380,   220,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   219,   219,     0,     0,   219,   219,     0,
+			   226,     0,   220,     0,     0,     0,   219,     0,     0,     0,
+			   226,     0,   219,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   219,     0,   219,     0,     0,   219,
+			   219,     0,     0,   197,   220,     0,     0,     0,     0,     0,
+				 0,   226,     0,   197,   226,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   226,   226,
+				 0,     0,     0,   226,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   197,     0,     0,   197,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   197,   197,   226,     0,     0,   197,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   380,   380,   380,   380,   380,   380,     0,
+			   380,     0,     0,     0,     0,   226,   197,   380,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   380,   380,     0,
+			   380,   380,   380,   380,   380,     0,     0,     0,     0,     0,
+				 0,     0,   227,     0,     0,     0,     0,     0,   197,     0,
+				 0,     0,   227,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   220,   220,   220,   220,
+			   220,   220,     0,   220,     0,     0,     0,     0,     0,   380,
+			   220,   220,   220,   227,     0,     0,   227,     0,     0,     0,
+			   220,   220,   380,   220,   220,   220,   220,   220,     0,     0,
+			   227,   227,   380,     0,     0,   380,   380,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   220,   220,     0,   227,   220,   220,     0,     0,
+				 0,     0,     0,     0,     0,   220,     0,     0,     0,     0,
+				 0,   220,     0,     0,     0,     0,     0,   226,   226,   226,
+			   226,   226,   226,   220,   226,   220,     0,   227,   220,   220,
+				 0,   226,   226,   226,     0,     0,     0,     0,     0,     0,
+				 0,   226,   226,     0,   226,   226,   226,   226,   226,     0,
+			   197,   197,   197,   197,   197,   197,     0,   197,     0,     0,
+				 0,     0,     0,   233,   197,   197,   197,     0,     0,     0,
+				 0,     0,     0,   233,   197,   197,     0,   197,   197,   197,
+			   197,   197,     0,     0,   226,     0,     0,   226,   226,     0,
+				 0,     0,     0,     0,     0,     0,   226,     0,   524,     0,
+				 0,     0,   226,     0,   233,     0,     0,   233,   524,     0,
+				 0,     0,     0,     0,   226,     0,   226,     0,     0,   226,
+			   226,   233,   233,     0,     0,     0,     0,     0,     0,   197,
+				 0,     0,     0,     0,     0,   197,     0,     0,     0,   524,
+				 0,     0,   524,     0,     0,     0,     0,   197,     0,   197,
+				 0,     0,   197,   197,     0,     0,   233,   524,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   227,
+			   227,   227,   227,   227,   227,     0,   227,     0,     0,     0,
+				 0,     0,     0,   227,   227,   227,     0,     0,   233,     0,
+				 0,   524,     0,   227,   227,     0,   227,   227,   227,   227,
+			   227,     0,   256,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   256,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   524,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   256,     0,     0,   256,     0,   227,   525,
+				 0,     0,     0,     0,   227,     0,     0,     0,     0,   525,
+				 0,   256,     0,     0,     0,     0,   227,     0,   227,     0,
+				 0,   227,   227,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   525,     0,     0,   525,     0,   256,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   525,     0,
+				 0,     0,   522,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   522,     0,     0,     0,     0,   256,     0,     0,
+			   233,   233,   233,   233,   233,   233,     0,   233,     0,     0,
+				 0,     0,   525,     0,   233,   233,   233,     0,     0,     0,
+				 0,     0,     0,   522,   233,   233,   522,   233,   233,   233,
+			   233,     0,     0,   257,     0,   524,   524,   524,   524,   524,
+			   524,   522,   524,   257,   525,     0,     0,     0,     0,   524,
+			   524,     0,     0,     0,     0,     0,     0,     0,     0,   524,
+			   524,     0,   524,   524,   524,   524,   524,     0,     0,     0,
+				 0,     0,   526,     0,   257,   522,     0,   257,     0,   233,
+				 0,     0,   526,     0,     0,   233,     0,     0,     0,     0,
+				 0,     0,   257,     0,     0,     0,     0,   233,     0,   233,
+				 0,     0,   233,   233,     0,     0,     0,   522,     0,     0,
+				 0,     0,     0,   526,     0,     0,   526,     0,     0,   558,
+			   524,     0,     0,     0,     0,     0,   257,     0,     0,   558,
+				 0,   526,     0,     0,   524,     0,     0,   524,   524,   256,
+			   256,   256,   256,   256,   256,     0,   256,     0,     0,     0,
+				 0,     0,     0,   256,   256,     0,     0,     0,   257,     0,
+			   558,     0,   258,   256,   256,   526,   256,   256,   256,   256,
+			   256,     0,   258,     0,     0,     0,     0,     0,   558,     0,
+				 0,     0,     0,     0,     0,     0,   525,   525,   525,   525,
+			   525,   525,     0,   525,     0,     0,     0,   526,     0,     0,
+			   525,   525,     0,   258,     0,     0,   258,     0,     0,     0,
+			   525,   525,   558,   525,   525,   525,   525,   525,     0,     0,
+				 0,   258,     0,     0,   256,   250,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   250,     0,     0,   256,     0,
+				 0,   256,   256,     0,   558,     0,     0,     0,     0,   522,
+			   522,   522,   522,   522,   522,   258,   522,     0,     0,     0,
+				 0,     0,     0,   522,   522,     0,   250,     0,     0,     0,
+				 0,   525,     0,   522,   522,     0,   522,   522,   522,   522,
+			   522,     0,     0,     0,   250,   525,     0,   258,   525,   525,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   257,   257,   257,   257,   257,   257,     0,   257,     0,     0,
+				 0,     0,     0,     0,   257,   257,     0,     0,   250,     0,
+				 0,     0,     0,     0,   257,   257,     0,   257,   257,   257,
+			   257,   257,     0,     0,   522,     0,     0,     0,     0,   526,
+			   526,   526,   526,   526,   526,     0,   526,     0,   522,     0,
+			   250,   522,   522,   526,   526,     0,     0,     0,     0,     0,
+				 0,     0,     0,   526,   526,     0,   526,   526,   526,   526,
+			   526,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   257,   558,   558,   558,   558,
+			   558,   558,     0,   558,     0,     0,     0,     0,     0,   257,
+			   558,   558,   257,   257,     0,     0,     0,     0,    56,     0,
+			   558,   558,     0,   558,   558,   558,   558,   558,    56,     0,
+				 0,     0,     0,     0,   526,     0,     0,     0,     0,   258,
+			   258,   258,   258,   258,   258,     0,   258,     0,   526,     0,
+				 0,   526,   526,   258,   258,    60,     0,     0,     0,    56,
+				 0,     0,     0,   258,   258,    60,   258,   258,   258,   258,
+			   258,     0,     0,     0,     0,     0,     0,    56,     0,     0,
+				 0,   558,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   558,    60,     0,   558,   558,
+				 0,     0,   250,   250,   250,   250,   250,   250,     0,   250,
+				 0,    56,     0,     0,    60,     0,   250,   250,     0,     0,
+				 0,     0,     0,     0,   258,     0,   250,   250,     0,   250,
+			   250,   250,   250,   250,     0,    58,     0,     0,   258,     0,
+				 0,   258,   258,    56,     0,    58,     0,     0,    60,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,    58,     0,     0,     0,
+				60,     0,     0,     0,     0,     0,     0,   250,   103,     0,
+				 0,     0,     0,     0,    58,     0,     0,     0,     0,     0,
+				 0,   250,     0,     0,   250,   250,     0,     0,     0,     0,
+				 0,   103,     0,     0,     0,     0,     0,     0,   527,     0,
+				 0,     0,     0,     0,   454,     0,     0,     0,    58,     0,
+				 0,     0,     0,     0,     0,     0,     0,   103,   103,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				58,     0,     0,     0,     0,     0,     0,     0,     0,   454,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,    56,    56,    56,    56,    56,
+				56,     0,    56,     0,     0,     0,     0,     0,     0,    56,
+				56,   527,     0,     0,   103,     0,     0,     0,     0,    56,
+				56,     0,    56,    56,    56,    56,    56,     0,     0,     0,
+				 0,     0,    60,    60,    60,    60,    60,    60,     0,    60,
+				 0,     0,     0,     0,     0,     0,    60,    60,     0,     0,
+				 0,     0,     0,     0,     0,     0,    60,    60,     0,    60,
+				60,    60,    60,    60,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,    56,     0,     0,    56,    56,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,    58,    58,    58,    58,    58,    58,     0,    58,
+				 0,     0,     0,     0,     0,     0,    58,    58,     0,     0,
+				 0,    60,     0,     0,    60,    60,    58,    58,     0,    58,
+				58,    58,    58,    58,   103,   103,   103,   103,   103,   103,
+			   103,   103,   103,   103,   103,   103,   103,   103,     0,     0,
+			   103,   103,     0,   103,   103,   103,   103,     0,   527,     0,
+				 0,     0,   103,   103,   103,   103,   103,   103,   103,     0,
+				 0,   103,     0,     0,     0,     0,     0,   103,     0,   103,
+			   103,   103,     0,   103,   103,   103,   103,   103,   103,     0,
+			   103,   103,   103,     0,     0,   103,     0,     0,     0,   103,
+			   103,    58,   103,   103,    58,    58,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   104,
+				 0,   454,   103,     0,     0,   103,   103,     0,   103,   103,
+				 0,   103,     0,   103,   454,   103,   103,   103,   103,   103,
+			   103,     0,   104,   103,   103,     0,     0,   103,   103,   528,
+			   103,     0,     0,     0,     0,   458,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   104,   104,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   458,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   528,     0,     0,   104,   103,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   103,
+				 0,     0,     0,     0,     0,     0,   530,     0,     0,     0,
+				 0,     0,   534,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   103,   103,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   534,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   534,
+				 0,     0,   103,     0,     0,     0,     0,   234,     0,     0,
+				 0,     0,     0,     0,     0,   104,   104,   104,   104,   104,
+			   104,   104,   104,   104,   104,   104,   104,   104,   104,     0,
+				61,   104,   104,     0,   104,   104,   104,   104,     0,   528,
+				 0,     0,     0,   104,   104,   104,   104,   104,   104,   104,
+				 0,     0,   104,     0,     0,     0,   233,     0,   104,     0,
+			   104,   104,   104,     0,   104,   104,   104,   104,   104,   104,
+				 0,   104,   104,   104,     0,     0,   104,     0,     0,     0,
+			   104,   104,     0,   104,   104,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   458,   104,     0,     0,   104,   104,     0,   104,
+			   104,     0,   104,     0,   104,   458,   104,   104,   104,   104,
+			   104,   104,     0,    62,   104,   104,     0,     0,   104,   104,
+				 0,   104,   103,   103,   103,   103,   103,   103,   103,   103,
+			   103,   103,   103,   103,   103,   103,     0,     0,   103,   103,
+				 0,   103,   103,   103,   103,     0,   534,     0,     0,     0,
+			   103,   103,   103,   103,   103,   103,   103,     0,     0,   103,
+				 0,     0,   104,     0,     0,   103,     0,   103,   103,   103,
+				 0,   103,   103,   103,   103,   103,   103,     0,   103,   103,
+			   103,     0,     0,   103,     0,   104,     0,   103,   103,     0,
+			   103,   103,   531,     0,     0,     0,     0,     0,   278,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   534,
+			   103,   104,   104,   103,   103,     0,   103,   103,     0,   103,
+				 0,   103,   534,   103,   103,   103,   103,   103,   103,     0,
+				 0,   103,   103,     0,     0,   103,   103,     0,   103,     0,
+				 0,     0,     0,   278,     4,     5,     6,     7,     8,     9,
+				10,    11,    12,    13,     0,     0,     0,     0,     0,     0,
+				14,     0,    15,    16,    17,    18,     0,     0,     0,     0,
+				 0,    19,    20,    21,    22,    23,    24,    25,   104,   104,
+				26,     0,     0,     0,     0,     0,    27,    28,    29,    30,
+				31,     0,    32,    33,    34,    35,    36,    37,     0,    38,
+				39,    40,   104,     0,    41,     0,     0,     0,    42,    43,
+				 0,    44,    45,     0,     0,   279,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   104,   104,
+				 0,    46,     0,     0,    47,    48,     0,    49,    50,     0,
+				51,     0,    52,     0,    53,    54,    55,    56,    57,    58,
+				 0,     0,    59,   230,     0,     0,   231,   232,     0,    60,
+			   279,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   104,     0,     0,     0,   323,
+				 0,     0,     0,     0,     0,     0,     0,     0,   104,   104,
+			   104,   104,   104,   104,   104,   104,   104,   104,   104,   104,
+			   104,   104,   323,     0,   104,   104,     0,   104,   104,   104,
+			   104,     0,     0,     0,     0,     0,   104,   104,   104,   104,
+			   104,   104,   104,     0,     0,   104,     0,     0,   323,     0,
+				 0,   104,     0,   104,   104,   104,     0,   104,   104,   104,
+			   104,   104,   104,     0,   104,   104,   104,     0,     0,   104,
+				 0,     0,     0,   104,   104,     0,   104,   104,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   278,   104,     0,     0,   104,
+			   104,     0,   104,   104,     0,   104,     0,   104,   278,   104,
+			   104,   104,   104,   104,   104,   323,   469,   104,   104,     0,
+				 0,   104,   104,     0,   104,   104,   104,   104,   104,   104,
+			   104,   104,   104,   104,   104,   104,   104,   104,   104,   469,
+				 0,   104,   104,     0,   104,   104,   104,   104,     0,     0,
+				 0,     0,     0,   104,   104,   104,   104,   104,   104,   104,
+				 0,     0,   104,     0,     0,   469,     0,     0,   104,     0,
+			   104,   104,   104,     0,   104,   104,   104,   104,   104,   104,
+				 0,   104,   104,   104,     0,     0,   104,     0,     0,     0,
+			   104,   104,     0,   104,   104,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   279,   104,     0,     0,   104,   104,     0,   104,
+			   104,     0,   104,     0,   104,   279,   104,   104,   104,   104,
+			   104,   104,   469,     0,   104,   104,   558,     0,   104,   104,
+				 0,   104,     0,     0,     0,   323,   323,   323,   323,   323,
+			   323,   323,   323,   323,   323,   323,   323,   323,   323,   558,
+			   323,   323,   323,   323,   323,   323,   323,   323,     0,     0,
+				 0,     0,     0,   323,   323,   323,   323,   323,   323,   323,
+				 0,     0,   323,     0,     0,   558,     0,     0,   323,     0,
+			   323,   323,   323,     0,   323,   323,   323,   323,   323,   323,
+				 0,   323,   323,   323,     0,     0,   323,     0,     0,     0,
+			   323,   323,     0,   323,   323,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   323,     0,     0,   323,   323,     0,   323,
+			   323,     0,   323,     0,   323,     0,   323,   323,   323,   323,
+			   323,   323,   558,     0,   323,   323,     0,     0,   323,   323,
+				 0,   323,   469,   469,   469,   469,   469,   469,   469,   469,
+			   469,   469,   469,   469,   469,   469,     0,     0,   469,   469,
+				 0,   469,   469,   469,   469,     0,     0,     0,     0,     0,
+			   469,   469,   469,   469,   469,   469,   469,     0,     0,   469,
+				 0,     0,   558,     0,     0,   469,     0,   469,   469,   469,
+				 0,   469,   469,   469,   469,   469,   469,     0,   469,   469,
+			   469,     0,     0,   469,     0,   558,     0,   469,   469,     0,
+			   469,   469,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   469,   558,     0,   469,   469,     0,   469,   469,     0,   469,
+				 0,   469,     0,   469,   469,   469,   469,   469,   469,     0,
+				 0,   469,   469,     0,     0,   469,   469,     0,   469,     0,
+				 0,     0,   558,   558,   558,   558,   558,   558,   558,   558,
+			   558,   558,   558,     0,     0,   558,     0,     0,     0,   558,
+				 0,   558,   558,   558,   558,     0,     0,     0,     0,     0,
+			   558,   558,   558,   558,   558,   558,   558,   558,   558,   558,
+				 0,     0,   234,     0,     0,   558,     0,   558,   558,   558,
+				 0,   558,   558,   558,   558,   558,   558,     0,   558,   558,
+			   558,     0,     0,   558,     0,    61,     0,   558,   558,     0,
+			   558,   558,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   558,   233,     0,   558,   558,     0,   558,   558,     0,   558,
+				 0,   558,     0,   558,   558,   558,   558,   558,   558,     0,
+				 0,   558,   558,     0,     0,   558,   558,     0,   558,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,    62,     0,
+			   240,     0,     0,     0,     0,     0,     0,     0,   558,   558,
+			   558,   558,   558,   558,   558,   558,   558,   558,   558,     0,
+				 0,     0,     0,   253,     0,   558,     0,   558,   558,   558,
+			   558,   240,     0,     0,     0,     0,   558,   558,   558,   558,
+			   558,   558,   558,     0,     0,   558,     0,     0,     0,     0,
+				 0,   558,     0,   558,   558,   558,     0,   558,   558,   558,
+			   558,   558,   558,     0,   558,   558,   558,     0,     0,   558,
+				 0,     0,     0,   558,   558,     0,   558,   558,     0,     0,
+				 0,     0,     0,   240,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   558,     0,     0,   558,
+			   558,     0,   558,   558,     0,   558,     0,   558,     0,   558,
+			   558,   558,   558,   558,   558,     0,   253,   558,   558,     0,
+			   275,   558,   558,     0,   558,     0,     0,     0,     0,     4,
+				 5,     6,     7,     8,     9,    10,    11,    12,    13,     0,
+				 0,     0,     0,   272,     0,    14,     0,    15,    16,    17,
+				18,   275,     0,     0,     0,     0,    19,    20,    21,    22,
+				23,    24,    25,     0,     0,    26,     0,     0,     0,     0,
+				 0,    27,     0,    29,    30,    31,     0,    32,    33,    34,
+				35,    36,    37,     0,    38,    39,    40,     0,     0,    41,
+				 0,     0,     0,    42,    43,     0,    44,    45,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,    46,     0,     0,    47,
+				48,     0,    49,    50,     0,    51,     0,    52,     0,    53,
+				54,    55,    56,    57,    58,     0,   272,    59,   230,     0,
+				 0,   231,   232,     0,    60,     0,     0,   253,   253,   253,
+			   253,   253,   253,   253,   253,   253,     0,     0,     0,     0,
+				 0,     0,     0,   253,   234,   253,   253,   253,   253,     0,
+				 0,     0,     0,     0,   253,   253,   253,   253,   253,   253,
+			   253,     0,     0,   253,     0,     0,     0,    61,     0,     0,
+				 0,     0,   253,   253,     0,   253,   253,   253,   253,   253,
+			   253,   253,   253,   253,   253,     0,     0,   253,     0,     0,
+			   253,   253,   253,   233,   253,   253,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   253,     0,     0,   253,   253,     0,
+			   253,   253,     0,   253,   253,   253,     0,   253,   253,   253,
+			   253,   253,   253,     0,     0,   253,     0,     0,     0,     0,
+				 0,     0,   253,     0,     0,     0,     0,   272,   272,   272,
+			   272,   272,   272,   272,   272,   272,   272,     0,     0,     0,
+				62,   234,     0,   272,     0,   272,   272,   272,   272,     0,
+				 0,     0,     0,     0,   272,   272,   272,   272,   272,   272,
+			   272,     0,     0,   272,    61,     0,     0,     0,     0,   272,
+				 0,   272,   272,   272,     0,   272,   272,   272,   272,   272,
+			   272,     0,   272,   272,   272,     0,     0,   272,     0,     0,
+				 0,   272,   272,     0,   272,   272,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   272,     0,     0,   272,   272,     0,
+			   272,   272,     0,   272,     0,   272,     0,   272,   272,   272,
+			   272,   272,   272,     0,     0,   272,     0,     0,     0,     0,
+				 0,     0,   272,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,    62,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     4,     5,     6,     7,     8,     9,    10,    11,    12,
+				 0,     0,     0,     0,    61,     0,     0,    14,     0,    15,
+				16,    17,    18,     0,     0,     0,     0,     0,    19,    20,
+				21,    22,    23,    24,    25,     0,     0,    26,     0,     0,
+				 0,     0,     0,     0,     0,     0,    30,    31,     0,    32,
+				33,    34,    35,    36,    37,     0,    38,    39,    40,     0,
+				 0,    41,     0,     0,     0,    42,    43,     0,    44,    45,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   199,     0,
+				 0,   110,    48,     0,    49,    50,     0,     0,     0,    52,
+				 0,    53,    54,    55,    56,    57,    58,    62,     0,    59,
+			   230,     0,     0,   231,   232,     0,    60,     0,     4,     5,
+				 6,     7,     8,     9,    10,    11,    12,     0,     0,     0,
+				 0,     0,   254,     0,    14,     0,    15,    16,    17,    18,
+				 0,     0,     0,     0,     0,    19,    20,    21,    22,    23,
+				24,    25,     0,     0,    26,     0,     0,     0,     0,     0,
+				 0,     0,     0,    30,    31,     0,    32,    33,    34,    35,
+				36,    37,     0,    38,    39,    40,     0,     0,    41,     0,
+				 0,     0,    42,    43,     0,    44,    45,     0,     0,     0,
+				 0,     0,   254,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   199,     0,     0,   110,    48,
+				 0,    49,    50,     0,     0,     0,    52,     0,    53,    54,
+				55,    56,    57,    58,   254,   254,    59,     0,     0,     0,
+				 0,     0,     0,    60,     0,     0,     0,     3,     4,     5,
+				 6,     7,     8,     9,    10,    11,    12,    13,     0,     0,
+				 0,    61,     0,     0,    14,     0,    15,    16,    17,    18,
+				 0,     0,     0,     0,     0,    19,    20,    21,    22,    23,
+				24,    25,     0,     0,    26,     0,     0,     0,     0,     0,
+				27,    28,    29,    30,    31,     0,    32,    33,    34,    35,
+				36,    37,     0,    38,    39,    40,     0,     0,    41,     0,
+				 0,     0,    42,    43,     0,    44,    45,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,    46,     0,     0,    47,    48,
+				 0,    49,    50,     0,    51,     0,    52,     0,    53,    54,
+				55,    56,    57,    58,    62,     0,    59,     0,     0,     0,
+				 0,     0,     0,    60,     0,     0,   254,   254,   254,   254,
+			   254,   254,   254,   254,   254,     0,     0,     0,     0,    61,
+				 0,     0,   254,     0,   254,   254,   254,   254,     0,     0,
+				 0,     0,     0,   254,   254,   254,   254,   254,   254,   254,
+				 0,     0,   254,     0,     0,     0,     0,     0,     0,     0,
+				 0,   254,   254,     0,   254,   254,   254,   254,   254,   254,
+			   254,   254,   254,   254,     0,     0,   254,     0,     0,   254,
+			   254,   254,     0,   254,   254,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   254,     0,     0,   254,   254,     0,   254,
+			   254,     0,   254,   254,   254,     0,   254,   254,   254,   254,
+			   254,   254,    62,     0,   254,     0,     0,     0,     0,     0,
+				 0,   254,     0,     0,     0,     4,     5,     6,     7,     8,
+				 9,    10,    11,    12,    13,     0,     0,     0,    61,     0,
+				 0,    14,     0,    15,    16,    17,    18,     0,     0,     0,
+				 0,     0,    19,    20,    21,    22,    23,    24,    25,     0,
+				 0,    26,     0,     0,     0,     0,     0,    27,    28,    29,
+				30,    31,     0,    32,    33,    34,    35,    36,    37,     0,
+				38,    39,    40,     0,     0,    41,     0,     0,     0,    42,
+				43,     0,    44,    45,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,    46,     0,     0,    47,    48,     0,    49,    50,
+				 0,    51,     0,    52,     0,    53,    54,    55,    56,    57,
+				58,    62,     0,    59,     0,     0,     0,     0,     0,     0,
+				60,     0,   276,     4,     5,     6,     7,     8,     9,    10,
+				11,    12,    13,     0,     0,     0,   248,     0,     0,    14,
+				 0,    15,    16,    17,    18,     0,     0,     0,     0,     0,
+				19,    20,    21,    22,    23,    24,    25,     0,     0,    26,
+				 0,     0,     0,     0,     0,    27,     0,    29,    30,    31,
+				 0,    32,    33,    34,    35,    36,    37,     0,    38,    39,
+				40,     0,     0,    41,     0,     0,     0,    42,    43,     0,
+				44,    45,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				46,     0,     0,   277,    48,     0,    49,    50,     0,    51,
+				 0,    52,     0,    53,    54,    55,    56,    57,    58,    62,
+				 0,    59,     0,     0,     0,     0,     0,     0,    60,     0,
+				 0,   276,     4,     5,     6,     7,     8,     9,    10,    11,
+				12,    13,     0,     0,     0,   253,     0,     0,    14,     0,
+				15,    16,    17,    18,     0,     0,     0,     0,     0,    19,
+				20,    21,    22,    23,    24,    25,     0,     0,    26,     0,
+				 0,     0,     0,     0,    27,     0,    29,    30,    31,     0,
+				32,    33,    34,    35,    36,    37,     0,    38,    39,    40,
+				 0,     0,    41,     0,     0,     0,    42,    43,     0,    44,
+				45,     0,     0,     0,     0,   253,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,    46,
+				 0,     0,    47,    48,     0,    49,    50,     0,    51,     0,
+				52,     0,    53,    54,    55,    56,    57,    58,   253,     0,
+				59,     0,     0,     0,     0,     0,     0,    60,     0,     0,
+				 4,     5,     6,     7,     8,     9,    10,    11,    12,     0,
+				 0,     0,     0,   248,     0,     0,    14,     0,   100,   101,
+				17,    18,     0,     0,     0,     0,     0,   102,   103,   104,
+				22,    23,    24,    25,     0,     0,   105,     0,     0,     0,
+				 0,     0,     0,     0,     0,    30,    31,     0,    32,    33,
+				34,    35,    36,    37,   243,    38,    39,    40,     0,     0,
+				41,     0,     0,   244,    42,    43,     0,    44,    45,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   199,     0,     0,
+			   110,    48,     0,    49,    50,     0,     0,     0,    52,     0,
+				53,    54,    55,    56,   247,    58,    62,     0,    59,   230,
+				 0,     0,   231,   232,     0,    60,     0,     0,     0,   253,
+			   253,   253,   253,   253,   253,   253,   253,   253,     0,     0,
+				 0,     0,    61,     0,     0,   253,     0,   253,   253,   253,
+			   253,     0,     0,     0,     0,     0,   253,   253,   253,   253,
+			   253,   253,   253,     0,     0,   253,     0,     0,     0,     0,
+				 0,     0,     0,     0,   253,   253,     0,   253,   253,   253,
+			   253,   253,   253,   253,   253,   253,   253,     0,     0,   253,
+				 0,     0,   253,   253,   253,     0,   253,   253,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   253,     0,     0,   253,
+			   253,     0,   253,   253,     0,   253,   253,   253,     0,   253,
+			   253,   253,   253,   253,   253,    62,     0,   253,     0,     0,
+				 0,     0,     0,     0,   253,     0,     0,     4,     5,     6,
+				 7,     8,     9,    10,    11,    12,     0,     0,     0,     0,
+			   248,     0,     0,    14,     0,    15,    16,    17,    18,     0,
+				 0,     0,     0,     0,    19,    20,    21,    22,    23,    24,
+				25,     0,     0,   105,     0,     0,     0,     0,     0,     0,
+				 0,     0,    30,    31,     0,    32,    33,    34,    35,    36,
+				37,   243,    38,    39,    40,     0,     0,    41,     0,     0,
+			   244,    42,    43,     0,    44,    45,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   199,     0,     0,   110,    48,     0,
+				49,    50,     0,   245,   246,    52,     0,    53,    54,    55,
+				56,   247,    58,    62,     0,    59,     0,     0,     0,     0,
+				 0,     0,    60,     0,     0,     0,     4,     5,     6,     7,
+				 8,     9,    10,    11,    12,    13,     0,     0,     0,   248,
+				 0,     0,    14,     0,    15,    16,    17,    18,     0,     0,
+				 0,     0,     0,    19,    20,    21,    22,    23,    24,    25,
+				 0,     0,    26,     0,     0,     0,     0,     0,    27,     0,
+				29,    30,    31,     0,    32,    33,    34,    35,    36,    37,
+				 0,    38,    39,    40,     0,     0,    41,     0,     0,     0,
+				42,    43,     0,    44,    45,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,    46,     0,     0,    47,    48,     0,    49,
+				50,     0,    51,     0,    52,     0,    53,    54,    55,    56,
+				57,    58,   248,     0,    59,     0,     0,     0,     0,     0,
+				 0,    60,     0,     0,     4,     5,     6,     7,     8,     9,
+				10,    11,    12,     0,     0,     0,     0,   248,     0,     0,
+				14,     0,   100,   101,    17,    18,     0,     0,     0,     0,
+				 0,   102,   103,   104,    22,    23,    24,    25,     0,     0,
+			   105,     0,     0,     0,     0,     0,     0,     0,     0,    30,
+				31,     0,    32,    33,    34,    35,    36,    37,   243,    38,
+				39,    40,     0,     0,    41,     0,     0,   244,    42,    43,
+				 0,    44,    45,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   199,     0,     0,   110,    48,     0,    49,    50,     0,
+			   648,   246,    52,     0,    53,    54,    55,    56,   247,    58,
+				62,     0,    59,     0,     0,     0,     0,     0,     0,    60,
+				 0,     0,     0,   248,   248,   248,   248,   248,   248,   248,
+			   248,   248,     0,     0,     0,     0,   248,     0,     0,   248,
+				 0,   248,   248,   248,   248,     0,     0,     0,     0,     0,
+			   248,   248,   248,   248,   248,   248,   248,     0,     0,   248,
+				 0,     0,     0,     0,     0,     0,     0,     0,   248,   248,
+				 0,   248,   248,   248,   248,   248,   248,   248,   248,   248,
+			   248,     0,     0,   248,     0,     0,   248,   248,   248,     0,
+			   248,   248,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   248,     0,     0,   248,   248,     0,   248,   248,     0,   248,
+			   248,   248,     0,   248,   248,   248,   248,   248,   248,    62,
+				 0,   248,     0,     0,     0,     0,     0,     0,   248,     0,
+				 0,     4,     5,     6,     7,     8,     9,    10,    11,    12,
+				 0,     0,     0,     0,   248,     0,     0,    14,     0,   100,
+			   101,    17,    18,     0,     0,     0,     0,     0,   102,   103,
+			   104,    22,    23,    24,    25,     0,     0,   105,     0,     0,
+				 0,     0,     0,     0,     0,     0,    30,    31,     0,    32,
+				33,    34,    35,    36,    37,   243,    38,    39,    40,     0,
+				 0,    41,     0,     0,   244,    42,    43,     0,    44,    45,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   199,     0,
+				 0,   110,    48,     0,    49,    50,     0,   245,     0,    52,
+				 0,    53,    54,    55,    56,   247,    58,    62,     0,    59,
+				 0,     0,     0,     0,     0,     0,    60,     0,     0,     0,
+				 4,     5,     6,     7,     8,     9,    10,    11,    12,     0,
+				 0,     0,     0,   248,     0,     0,    14,     0,   100,   101,
+				17,    18,     0,     0,     0,     0,     0,   102,   103,   104,
+				22,    23,    24,    25,     0,     0,   105,     0,     0,     0,
+				 0,     0,     0,     0,     0,    30,    31,     0,    32,    33,
+				34,    35,    36,    37,   243,    38,    39,    40,     0,     0,
+				41,     0,     0,   244,    42,    43,     0,    44,    45,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   199,     0,     0,
+			   110,    48,     0,    49,    50,     0,   648,     0,    52,     0,
+				53,    54,    55,    56,   247,    58,    62,     0,    59,     0,
+				 0,     0,     0,     0,     0,    60,     0,     0,     4,     5,
+				 6,     7,     8,     9,    10,    11,    12,     0,     0,     0,
+				 0,   248,     0,     0,    14,     0,   100,   101,    17,    18,
+				 0,     0,     0,     0,     0,   102,   103,   104,    22,    23,
+				24,    25,     0,     0,   105,     0,     0,     0,     0,     0,
+				 0,     0,     0,    30,    31,     0,    32,    33,    34,    35,
+				36,    37,   243,    38,    39,    40,     0,     0,    41,     0,
+				 0,   244,    42,    43,     0,    44,    45,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   199,     0,     0,   110,    48,
+				 0,    49,    50,     0,     0,     0,    52,     0,    53,    54,
+				55,    56,   247,    58,    62,     0,    59,     0,     0,     0,
+				 0,     0,     0,    60,     0,     0,     0,     4,     5,     6,
+				 7,     8,     9,    10,    11,    12,     0,     0,     0,     0,
+			   248,     0,     0,    14,     0,    15,    16,    17,    18,     0,
+				 0,     0,     0,     0,    19,    20,    21,    22,    23,    24,
+				25,     0,     0,   105,     0,     0,     0,     0,     0,     0,
+				 0,     0,    30,    31,     0,    32,    33,    34,    35,    36,
+				37,     0,    38,    39,    40,     0,     0,    41,     0,     0,
+				 0,    42,    43,     0,    44,    45,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   199,     0,     0,   110,    48,     0,
+				49,    50,     0,   588,     0,    52,     0,    53,    54,    55,
+				56,    57,    58,    62,     0,    59,     0,     0,     0,     0,
+				 0,     0,    60,     0,     0,     4,     5,     6,     7,     8,
+				 9,    10,    11,    12,     0,     0,     0,     0,   248,     0,
+				 0,    14,     0,   100,   101,    17,    18,     0,     0,     0,
+				 0,     0,   102,   103,   104,    22,    23,    24,    25,     0,
+				 0,   105,     0,     0,     0,     0,     0,     0,     0,     0,
+				30,    31,     0,    32,    33,    34,    35,    36,    37,     0,
+				38,    39,    40,     0,     0,    41,     0,     0,     0,    42,
+				43,     0,    44,    45,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   199,     0,     0,   110,    48,     0,    49,    50,
+				 0,   245,     0,    52,     0,    53,    54,    55,    56,    57,
+				58,    62,     0,    59,     0,     0,     0,     0,     0,     0,
+				60,     0,     0,     0,     4,     5,     6,     7,     8,     9,
+				10,    11,    12,     0,     0,     0,     0,   248,     0,     0,
+				14,     0,   100,   101,    17,    18,     0,     0,     0,     0,
+				 0,   102,   103,   104,    22,    23,    24,    25,     0,     0,
+			   105,     0,     0,     0,     0,     0,     0,     0,     0,    30,
+				31,     0,    32,    33,    34,    35,    36,    37,     0,    38,
+				39,    40,     0,     0,    41,     0,     0,     0,    42,    43,
+				 0,    44,    45,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   199,     0,     0,   110,    48,     0,    49,    50,     0,
+			   588,     0,    52,     0,    53,    54,    55,    56,    57,    58,
+				62,     0,    59,     0,     0,     0,     0,     0,     0,    60,
+				 0,     0,     4,     5,     6,     7,     8,     9,    10,    11,
+				12,     0,     0,     0,     0,    61,     0,     0,    14,     0,
+			   100,   101,    17,    18,     0,     0,     0,     0,     0,   102,
+			   103,   104,    22,    23,    24,    25,     0,     0,   105,     0,
+				 0,     0,     0,     0,     0,     0,     0,    30,    31,     0,
+				32,    33,    34,    35,    36,    37,     0,    38,    39,    40,
+				 0,     0,    41,     0,     0,     0,    42,    43,     0,    44,
+				45,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   199,
+				 0,     0,   110,    48,     0,    49,    50,     0,   826,     0,
+				52,     0,    53,    54,    55,    56,    57,    58,    62,     0,
+				59,     0,     0,     0,     0,     0,     0,    60,     0,     0,
+				 0,     4,     5,     6,     7,     8,     9,    10,    11,    12,
+				 0,     0,     0,     0,   248,     0,     0,    14,     0,   100,
+			   101,    17,    18,     0,     0,     0,     0,     0,   102,   103,
+			   104,    22,    23,    24,    25,     0,     0,   105,     0,     0,
+				 0,     0,     0,     0,     0,     0,    30,    31,     0,    32,
+				33,    34,    35,    36,    37,     0,    38,    39,    40,     0,
+				 0,    41,     0,     0,     0,    42,    43,     0,    44,    45,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   199,     0,
+				 0,   110,    48,     0,    49,    50,     0,   648,     0,    52,
+				 0,    53,    54,    55,    56,    57,    58,    62,     0,    59,
+				 0,     0,     0,     0,     0,     0,    60,     0,     0,     4,
+				 5,     6,     7,     8,     9,    10,    11,    12,     0,     0,
+				 0,     0,   248,     0,     0,    14,     0,    15,    16,    17,
+				18,     0,     0,     0,     0,     0,    19,    20,    21,    22,
+				23,    24,    25,     0,     0,    26,     0,     0,     0,     0,
+				 0,     0,     0,     0,    30,    31,     0,    32,    33,    34,
+				35,    36,    37,     0,    38,    39,    40,     0,     0,    41,
+				 0,     0,     0,    42,    43,     0,    44,    45,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   199,     0,     0,   110,
+				48,     0,    49,    50,     0,     0,     0,    52,     0,    53,
+				54,    55,    56,    57,    58,    62,     0,    59,     0,     0,
+				 0,     0,     0,     0,    60,     0,     0,     0,     4,     5,
+				 6,     7,     8,     9,    10,    11,    12,     0,     0,     0,
+				 0,   545,     0,     0,    14,     0,   100,   101,    17,    18,
+				 0,     0,     0,     0,     0,   102,   103,   104,    22,    23,
+				24,    25,     0,     0,   105,     0,     0,     0,     0,     0,
+				 0,     0,     0,    30,    31,     0,    32,    33,    34,    35,
+				36,    37,     0,    38,    39,    40,     0,     0,    41,     0,
+				 0,     0,    42,    43,     0,    44,    45,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   199,     0,     0,   110,    48,
+				 0,    49,    50,     0,     0,     0,    52,     0,    53,    54,
+				55,    56,    57,    58,   545,     0,    59,     0,     0,     0,
+				 0,     0,     0,    60,     0,     0,     4,     5,     6,     7,
+				 8,     9,    10,    11,    12,     0,     0,     0,     0,     0,
+				 0,     0,    14,     0,    15,    16,    17,    18,     0,     0,
+				 0,     0,     0,    19,    20,    21,    22,    23,    24,    25,
+				 0,     0,   105,     0,     0,     0,     0,     0,     0,     0,
+				 0,    30,    31,     0,    32,    33,    34,    35,    36,    37,
+				 0,    38,    39,    40,     0,     0,    41,     0,     0,     0,
+				42,    43,     0,    44,    45,     0,   189,     0,     0,     0,
+			   188,   183,     0,     0,     0,   186,   184,     0,   185,     0,
+			   187,     0,     0,   199,     0,     0,   110,    48,     0,    49,
+				50,     0,     0,   180,    52,   179,    53,    54,    55,    56,
+				57,    58,     0,     0,    59,     0,     0,     0,     0,     0,
+				 0,    60,     0,     0,     0,   545,   545,   545,   545,   545,
+			   545,   545,   545,   545,     0,     0,     0,   182,     0,   191,
+				 0,   545,     0,   545,   545,   545,   545,     0,     0,     0,
+				 0,     0,   545,   545,   545,   545,   545,   545,   545,     0,
+				 0,   545,     0,     0,     0,     0,     0,   181,     0,   190,
+			   545,   545,     0,   545,   545,   545,   545,   545,   545,     0,
+			   545,   545,   545,     0,     0,   545,     0,     0,     0,   545,
+			   545,     0,   545,   545,     0,   189,     0,     0,     0,   188,
+			   183,     0,     0,     0,   186,   184,     0,   185,     0,   187,
+				 0,     0,   545,     0,     0,   545,   545,     0,   545,   545,
+				 0,     0,   180,   545,   179,   545,   545,   545,   545,   545,
+			   545,     0,     0,   545,     0,     0,     0,     0,     0,     0,
+			   545,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   182,     0,   191,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   181,     0,   190,     0,
+				 0,     0,     0,   295,     0,     0,     0,     0,     0,     0,
+			   120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
+			   130,   131,   132,   133,   134,   135,   136,   137,   138,   139,
+			   140,   141,   142,   143,     0,     0,     0,   144,   145,   146,
+			   217,   218,   219,   220,   151,   152,   153,     0,     0,     0,
+				 0,     0,   154,   155,   156,   221,   222,   159,   223,   161,
+			   301,   302,   224,   303,     0,     0,     0,     0,     0,     0,
+			   304,     0,     0,     0,     0,     0,     0,   163,   164,   165,
+			   166,   167,   168,   169,   170,   171,     0,     0,   172,   173,
+				 0,     0,   174,   175,   176,   177,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   178,     0,     0,     0,
+				 0,     0,     0,     0,   305,     0,     0,     0,     0,   598,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   120,
+			   121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
+			   131,   132,   133,   134,   135,   136,   137,   138,   139,   140,
+			   141,   142,   143,     0,     0,     0,   144,   145,   146,   217,
+			   218,   219,   220,   151,   152,   153,     0,     0,     0,     0,
+				 0,   154,   155,   156,   221,   222,   159,   223,   161,   301,
+			   302,   224,   303,     0,     0,     0,     0,     0,     0,   304,
+				 0,     0,     0,     0,     0,     0,   163,   164,   165,   166,
+			   167,   168,   169,   170,   171,     0,     0,   172,   173,     0,
+				 0,   174,   175,   176,   177,     0,     4,     5,     6,     7,
+				 8,     9,    10,    11,    12,   178,     0,     0,     0,     0,
+				 0,     0,    14,   424,   100,   101,    17,    18,     0,     0,
+				 0,     0,     0,   102,   103,   104,    22,    23,    24,    25,
+				 0,     0,   105,     0,     0,     0,     0,     0,     0,     0,
+				 0,    30,    31,     0,    32,    33,    34,    35,    36,    37,
+				 0,    38,    39,    40,     0,     0,    41,     0,     0,     0,
+				42,    43,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   294,     0,     0,   110,    48,     0,    49,
+				50,     0,     0,     0,    52,     0,    53,    54,    55,    56,
+				57,    58,     0,     0,    59,     0,     0,     0,     0,     0,
+				 0,   111,     4,     5,     6,     7,     8,     9,    10,    11,
+				12,     0,     0,     0,     0,     0,     0,     0,    14,     0,
+			   100,   101,    17,    18,     0,     0,     0,     0,     0,   102,
+			   103,   104,    22,    23,    24,    25,     0,     0,   105,     0,
+				 0,     0,     0,     0,     0,     0,     0,    30,    31,     0,
+				32,    33,    34,    35,    36,    37,     0,    38,    39,    40,
+				 0,     0,    41,     0,     0,     0,    42,    43,     0,     0,
+			   189,     0,     0,     0,   188,   183,     0,     0,     0,   186,
+			   184,     0,   185,     0,   187,     0,     0,     0,     0,   294,
+				 0,     0,   110,    48,     0,    49,    50,   180,     0,   179,
+				52,     0,    53,    54,    55,    56,    57,    58,     0,     0,
+				59,     0,     0,     0,     0,     0,     0,   111,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   182,     0,   191,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   181,     0,   190,     0,     0,     0,     0,     0,     0,
+				 0,   189,     0,     0,     0,   188,   183,     0,   192,     0,
+			   186,   184,     0,   185,     0,   187,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   180,     0,
+			   179,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   182,     0,   191,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   181,     0,   190,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   120,   121,   122,   123,   124,   125,
+			   126,   127,   128,   129,   130,   131,   132,   133,   134,   135,
+			   136,   137,   138,   139,   140,   141,   142,   143,     0,     0,
+				 0,   144,   145,   146,   217,   218,   219,   220,   151,   152,
+			   153,     0,     0,     0,     0,     0,   154,   155,   156,   221,
+			   222,   159,   223,   161,     0,     0,   224,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   163,   164,   165,   166,   167,   168,   169,   170,   171,
+				 0,     0,   172,   173,     0,     0,   174,   175,   176,   177,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   178,     0,     0,     0,   225,   120,   121,   122,   123,   124,
+			   125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
+			   135,   136,   137,   138,   139,   140,   141,   142,   143,     0,
+				 0,     0,   144,   145,   146,   147,   148,   149,   150,   151,
+			   152,   153,     0,     0,     0,     0,     0,   154,   155,   156,
+			   157,   158,   159,   160,   161,    34,    35,   162,    37,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   163,   164,   165,   166,   167,   168,   169,   170,
+			   171,     0,     0,   172,   173,     0,     0,   174,   175,   176,
+			   177,     0,     0,   189,     0,     0,     0,   188,   183,     0,
+				 0,   178,   186,   184,     0,   185,     0,   187,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   180,     0,   179,     0,     0,     0,     0,     0,     0,     0,
+				 0,   189,     0,     0,     0,   188,   183,     0,   258,     0,
+			   186,   184,     0,   185,     0,   187,     0,     0,     0,     0,
+				 0,     0,     0,     0,   182,     0,   191,     0,   180,     0,
+			   179,     0,     0,     0,     0,     0,     0,     0,     0,   189,
+				 0,     0,     0,   188,   183,     0,   258,     0,   186,   184,
+				 0,   185,     0,   187,   181,     0,   190,     0,     0,     0,
+				 0,     0,   182,     0,   191,     0,   180,     0,   179,     0,
+				 0,     0,     0,     0,     0,     0,     0,   189,     0,     0,
+				 0,   188,   183,     0,   258,     0,   186,   184,     0,   185,
+				 0,   187,   181,     0,   190,     0,     0,     0,     0,     0,
+			   182,     0,   191,     0,   180,     0,   179,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   181,     0,   190,     0,     0,     0,     0,     0,   182,     0,
+			   191,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   189,     0,     0,     0,   188,   183,     0,   258,     0,   186,
+			   184,     0,   185,     0,   187,     0,     0,     0,   181,     0,
+			   190,     0,     0,     0,     0,     0,     0,   180,     0,   179,
+				 0,     0,     0,     0,     0,     0,     0,   120,   121,   122,
+			   123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
+			   133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
+			   143,   182,     0,   191,   144,   145,   146,   217,   218,   219,
+			   220,   151,   152,   153,     0,     0,     0,     0,     0,   154,
+			   155,   156,   221,   222,   159,   223,   161,     0,     0,   224,
+				 0,   181,     0,   190,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   163,   164,   165,   166,   167,   168,
+			   169,   170,   171,     0,     0,   172,   173,     0,     0,   174,
+			   175,   176,   177,   561,   562,     0,     0,   563,     0,     0,
+				 0,     0,     0,   178,     0,     0,     0,     0,     0,     0,
+				 0,     0,   163,   164,   165,   166,   167,   168,   169,   170,
+			   171,     0,     0,   172,   173,     0,     0,   174,   175,   176,
+			   177,   569,   570,     0,     0,   571,     0,     0,     0,     0,
+				 0,   178,     0,     0,     0,     0,     0,     0,     0,     0,
+			   163,   164,   165,   166,   167,   168,   169,   170,   171,     0,
+				 0,   172,   173,     0,     0,   174,   175,   176,   177,   606,
+			   562,     0,     0,   607,     0,     0,     0,     0,     0,   178,
+				 0,     0,     0,     0,     0,     0,     0,     0,   163,   164,
+			   165,   166,   167,   168,   169,   170,   171,     0,     0,   172,
+			   173,     0,     0,   174,   175,   176,   177,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   178,     0,     0,
+			   189,     0,     0,     0,   188,   183,     0,   258,     0,   186,
+			   184,     0,   185,     0,   187,     0,     0,     0,     0,     0,
+				 0,     0,   583,   570,     0,     0,   584,   180,     0,   179,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   163,   164,   165,   166,   167,   168,   169,   170,   171,
+				 0,     0,   172,   173,     0,     0,   174,   175,   176,   177,
+				 0,   182,     0,   191,     0,     0,     0,   189,     0,     0,
+			   178,   188,   183,     0,   258,     0,   186,   184,     0,   185,
+				 0,   187,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   181,     0,   190,   180,     0,   179,     0,     0,     0,
+				 0,     0,     0,     0,     0,   189,     0,     0,     0,   188,
+			   183,     0,   258,     0,   186,   184,     0,   185,     0,   187,
+				 0,     0,     0,     0,     0,     0,     0,     0,   182,     0,
+			   191,     0,   180,     0,   179,     0,     0,     0,     0,     0,
+				 0,     0,     0,   189,     0,     0,     0,   188,   183,     0,
+			   258,     0,   186,   184,     0,   185,     0,   187,   181,     0,
+			   190,     0,     0,     0,     0,     0,   182,     0,   191,     0,
+			   180,     0,   179,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   181,     0,   190,     0,
+				 0,     0,     0,     0,   182,     0,   191,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   189,
+				 0,     0,     0,   188,   183,     0,   258,     0,   186,   184,
+				 0,   185,     0,   187,   181,     0,   190,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   180,     0,   179,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   622,   562,     0,     0,   623,     0,     0,     0,
+			   182,     0,   191,     0,     0,     0,     0,     0,     0,     0,
+				 0,   163,   164,   165,   166,   167,   168,   169,   170,   171,
+				 0,     0,   172,   173,     0,     0,   174,   175,   176,   177,
+			   181,     0,   190,     0,     0,     0,     0,     0,     0,     0,
+			   178,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   625,
+			   570,     0,     0,   626,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   163,   164,
+			   165,   166,   167,   168,   169,   170,   171,     0,     0,   172,
+			   173,     0,     0,   174,   175,   176,   177,   632,   562,     0,
+				 0,   633,     0,     0,     0,     0,     0,   178,     0,     0,
+				 0,     0,     0,     0,     0,     0,   163,   164,   165,   166,
+			   167,   168,   169,   170,   171,     0,     0,   172,   173,     0,
+				 0,   174,   175,   176,   177,   635,   570,     0,     0,   636,
+				 0,     0,     0,     0,     0,   178,     0,     0,     0,     0,
+				 0,     0,     0,     0,   163,   164,   165,   166,   167,   168,
+			   169,   170,   171,     0,     0,   172,   173,     0,     0,   174,
+			   175,   176,   177,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,   178,     0,     0,     0,     0,     0,   189,
+				 0,     0,     0,   188,   183,     0,   258,     0,   186,   184,
+				 0,   185,     0,   187,     0,     0,     0,     0,     0,     0,
+				 0,   668,   562,     0,     0,   669,   180,     0,   179,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   163,   164,   165,   166,   167,   168,   169,   170,   171,     0,
+				 0,   172,   173,     0,     0,   174,   175,   176,   177,     0,
+			   182,     0,   191,     0,     0,     0,   189,     0,     0,   178,
+			   188,   183,     0,   258,     0,   186,   184,     0,   185,     0,
+			   187,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   181,     0,   190,   180,     0,   179,     0,     0,     0,     0,
+				 0,     0,     0,     0,   189,     0,     0,     0,   188,   183,
+				 0,   258,     0,   186,   184,     0,   185,     0,   187,     0,
+				 0,     0,     0,     0,     0,     0,     0,   182,     0,   191,
+				 0,   180,     0,   179,     0,     0,     0,     0,     0,     0,
+				 0,     0,   189,     0,     0,     0,   188,   183,     0,   258,
+				 0,   186,   184,     0,   185,     0,   187,   181,     0,   190,
+				 0,     0,     0,     0,     0,   182,     0,   191,     0,   180,
+				 0,   179,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   181,     0,   190,     0,     0,
+				 0,     0,     0,   182,     0,   191,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   189,     0,
+				 0,     0,   188,   183,     0,   258,     0,   186,   184,     0,
+			   185,     0,   187,   181,     0,   190,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,   180,     0,   179,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,   671,   570,     0,     0,   672,     0,     0,     0,   182,
+				 0,   191,     0,     0,     0,     0,     0,     0,     0,     0,
+			   163,   164,   165,   166,   167,   168,   169,   170,   171,     0,
+				 0,   172,   173,     0,     0,   174,   175,   176,   177,   181,
+				 0,   190,     0,     0,     0,     0,     0,     0,     0,   178,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   819,   562,
+				 0,     0,   820,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   163,   164,   165,
+			   166,   167,   168,   169,   170,   171,     0,     0,   172,   173,
+				 0,     0,   174,   175,   176,   177,   822,   570,     0,     0,
+			   823,     0,     0,     0,     0,     0,   178,     0,     0,     0,
+				 0,     0,     0,     0,     0,   163,   164,   165,   166,   167,
+			   168,   169,   170,   171,     0,     0,   172,   173,     0,     0,
+			   174,   175,   176,   177,   959,   562,     0,     0,   960,     0,
+				 0,     0,     0,     0,   178,     0,     0,     0,     0,     0,
+				 0,     0,     0,   163,   164,   165,   166,   167,   168,   169,
+			   170,   171,     0,     0,   172,   173,     0,     0,   174,   175,
+			   176,   177,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   178,     0,     0,     0,     0,     0,   189,     0,
+				 0,     0,   188,   183,     0,   258,     0,   186,   184,     0,
+			   185,     0,   187,     0,     0,     0,     0,     0,     0,     0,
+			   962,   562,     0,     0,   963,   180,     0,   179,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   163,
+			   164,   165,   166,   167,   168,   169,   170,   171,     0,     0,
+			   172,   173,     0,     0,   174,   175,   176,   177,     0,   182,
+				 0,   191,     0,     0,     0,   189,     0,     0,   178,   188,
+			   183,     0,     0,     0,   186,   184,     0,   185,     0,   187,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   181,
+				 0,   190,   180,     0,   179,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     4,     5,     6,     7,     8,     9,
+				10,    11,    12,     0,     0,     0,   182,     0,   191,     0,
+				14,     0,   100,   101,    17,    18,     0,     0,     0,     0,
+				 0,   102,   103,   104,    22,    23,    24,    25,     0,     0,
+			   105,     0,     0,     0,     0,     0,   181,     0,   190,    30,
+				31,     0,   106,    33,    34,    35,   107,    37,     0,    38,
+				39,    40,     0,     0,    41,     0,     0,     0,    42,    43,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   108,     0,
+				 0,   109,     0,     0,   110,    48,     0,    49,    50,     0,
+				 0,     0,    52,     0,    53,    54,    55,    56,    57,    58,
+				 0,     0,    59,     0,     0,     0,     0,     0,     0,   111,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   965,   570,     0,     0,   966,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,   163,
+			   164,   165,   166,   167,   168,   169,   170,   171,     0,     0,
+			   172,   173,     0,     0,   174,   175,   176,   177,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   178,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,   583,   570,     0,
+				 0,   584,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   163,   164,   165,   166,
+			   167,   168,   169,   170,   171,     0,     0,   172,   173,     0,
+				 0,   174,   175,   176,   177,     4,     5,     6,     7,     8,
+				 9,    10,    11,    12,     0,   178,     0,     0,     0,     0,
+				 0,    14,     0,   100,   101,    17,    18,     0,     0,     0,
+				 0,     0,   102,   103,   104,    22,    23,    24,    25,     0,
+				 0,   105,     0,     0,     0,     0,     0,     0,     0,     0,
+				30,    31,     0,    32,    33,    34,    35,    36,    37,     0,
+				38,    39,    40,     0,     0,    41,     0,     0,     0,    42,
+				43,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   210,     0,     0,    47,    48,     0,    49,    50,
+				 0,    51,     0,    52,     0,    53,    54,    55,    56,    57,
+				58,     0,     0,    59,     0,     0,     0,     0,     0,     0,
+			   111,     4,     5,     6,     7,     8,     9,    10,    11,    12,
+				 0,     0,     0,     0,     0,     0,     0,    14,     0,   100,
+			   101,    17,    18,     0,     0,     0,     0,     0,   102,   103,
+			   104,    22,    23,    24,    25,     0,     0,   105,     0,     0,
+				 0,     0,     0,     0,     0,     0,    30,    31,     0,    32,
+				33,    34,    35,    36,    37,     0,    38,    39,    40,     0,
+				 0,    41,     0,     0,     0,    42,    43,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,   294,     0,
+				 0,   380,    48,     0,    49,    50,     0,   381,     0,    52,
+				 0,    53,    54,    55,    56,    57,    58,     0,     0,    59,
+				 0,     0,     0,     0,     0,     0,   111,     4,     5,     6,
+				 7,     8,     9,    10,    11,    12,     0,     0,     0,     0,
+				 0,     0,     0,    14,     0,   100,   101,    17,    18,     0,
+				 0,     0,     0,     0,   102,   103,   104,    22,    23,    24,
+				25,     0,     0,   105,     0,     0,     0,     0,     0,     0,
+				 0,     0,    30,    31,     0,   106,    33,    34,    35,   107,
+				37,     0,    38,    39,    40,     0,     0,    41,     0,     0,
+				 0,    42,    43,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,   109,     0,     0,   110,    48,     0,
+				49,    50,     0,     0,     0,    52,     0,    53,    54,    55,
+				56,    57,    58,     0,     0,    59,     0,     0,     0,     0,
+				 0,     0,   111,     4,     5,     6,     7,     8,     9,    10,
+				11,    12,     0,     0,     0,     0,     0,     0,     0,    14,
+				 0,   100,   101,    17,    18,     0,     0,     0,     0,     0,
+			   102,   103,   104,    22,    23,    24,    25,     0,     0,   105,
+				 0,     0,     0,     0,     0,     0,     0,     0,    30,    31,
+				 0,    32,    33,    34,    35,    36,    37,     0,    38,    39,
+				40,     0,     0,    41,     0,     0,     0,    42,    43,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+			   294,     0,     0,   380,    48,     0,    49,    50,     0,     0,
+				 0,    52,     0,    53,    54,    55,    56,    57,    58,     0,
+				 0,    59,     0,     0,     0,     0,     0,     0,   111,     4,
+				 5,     6,     7,     8,     9,    10,    11,    12,     0,     0,
+				 0,     0,     0,     0,     0,    14,     0,   100,   101,    17,
+				18,     0,     0,     0,     0,     0,   102,   103,   104,    22,
+				23,    24,    25,     0,     0,   105,     0,     0,     0,     0,
+				 0,     0,     0,     0,    30,    31,     0,    32,    33,    34,
+				35,    36,    37,     0,    38,    39,    40,     0,     0,    41,
+				 0,     0,     0,    42,    43,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,   881,     0,     0,   110,
+				48,     0,    49,    50,     0,     0,     0,    52,     0,    53,
+				54,    55,    56,    57,    58,     0,     0,    59,     0,     0,
+				 0,     0,     0,     0,   111,     4,     5,     6,     7,     8,
+				 9,    10,    11,    12,     0,     0,     0,     0,     0,     0,
+				 0,    14,     0,   100,   101,    17,    18,     0,     0,     0,
+				 0,     0,   102,   103,   104,    22,    23,    24,    25,     0,
+				 0,   105,     0,     0,     0,     0,     0,     0,     0,     0,
+				30,    31,     0,    32,    33,    34,    35,    36,    37,     0,
+				38,    39,    40,     0,     0,    41,     0,     0,     0,    42,
+				43,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+				 0,     0,   895,     0,     0,   110,    48,     0,    49,    50,
+				 0,     0,     0,    52,     0,    53,    54,    55,    56,    57,
+				58,     0,     0,    59,     0,     0,     0,     0,     0,     0,
+			   111,
+					}, yyCheck = new short[] {
+			//yyCheck 25161
+				 2,   418,    79,    26,   207,    61,    13,    84,    20,    21,
+				78,     9,    27,     6,     6,   370,    14,    90,    20,   254,
+				27,    13,   398,    14,    21,   295,   427,    15,    16,    15,
+				16,    19,    51,    19,   300,    27,   288,   300,     4,     5,
+			   292,   396,     2,     3,    47,     3,    12,    49,    50,   444,
+				46,   312,   486,   124,   283,    44,   411,    46,   109,    40,
+				53,    53,    37,    49,    50,    93,   421,    42,    10,    70,
+			   686,    10,    47,    10,   379,    70,   559,   560,   368,    70,
+			   777,    46,   372,    95,   373,    51,   376,   283,   377,    15,
+				16,   103,   104,    19,   683,    10,   251,   125,    95,    41,
+			   277,   103,    91,   123,    41,   117,   373,   397,   701,   443,
+			   377,   378,   446,    10,   610,   860,     0,   701,   683,    10,
+			   410,   686,   412,    49,    90,   202,    91,   873,   624,   484,
+				10,   286,   422,   288,   211,   364,   701,   292,   634,     8,
+				 9,    41,   123,     0,    59,    14,    10,   775,     0,    37,
+				41,    93,    44,    10,    42,    43,    93,    45,    40,    47,
+				10,    41,    59,    10,   598,    59,     0,    10,   364,    61,
+				61,   461,    47,    46,   670,    10,    10,    41,   123,   440,
+			   283,    61,   285,   444,    55,    56,    57,    58,    10,    15,
+				16,    41,   710,    19,    41,   485,   273,    61,   716,   944,
+			   312,   313,    59,   380,   797,    10,    41,    46,   954,   124,
+			   208,   209,   909,   305,    61,   450,   486,   309,    91,   296,
+				10,    46,   295,    41,   124,    59,    61,   124,   856,   605,
+			   124,   497,   225,   225,   497,   110,    41,    59,    10,   108,
+			   235,   125,   309,    93,   235,   861,   237,   730,    10,   251,
+				93,    41,   254,   514,    59,    46,   258,   291,   292,    10,
+			   280,   656,    46,   334,    10,   282,    91,    10,   125,    41,
+			   258,    61,   618,   125,   277,   263,   865,   263,   279,    10,
+				10,   627,    44,   911,   279,    10,   875,    59,   279,   873,
+			   279,   875,   447,    44,    40,   729,   861,    59,    41,   280,
+				91,    44,   272,   125,   274,    10,   124,    91,   873,   345,
+			   875,    41,   617,    44,    10,   943,   276,   373,    61,    44,
+			   654,   377,   378,   379,   284,   821,   354,    10,   598,   295,
+				10,    61,   330,   331,   332,   333,    41,   263,   329,   208,
+			   209,    10,    10,   760,   395,    41,   449,   343,    41,   615,
+			   453,   326,   291,   292,   343,   345,    61,    61,    41,    61,
+			   372,   464,   381,   739,    44,   720,    59,   356,   370,   329,
+			   954,   329,    41,    41,   334,    44,   247,   380,   343,    59,
+			   372,    40,   370,    46,   376,   397,   647,   279,   279,   954,
+				59,   356,   653,    44,   396,   656,   271,   266,   267,   279,
+			   412,   309,   277,   405,    60,   397,    61,   480,   396,   411,
+			   422,   345,   354,   486,   666,   381,   651,   354,   707,   421,
+			   412,   345,   309,   411,   713,   714,   417,   418,    91,   719,
+			   422,   721,   279,   421,   305,   701,   591,   263,   326,   642,
+			   707,   279,   457,    10,   279,   447,   713,   714,   450,   461,
+			   457,   852,   378,   379,   830,   722,   458,   443,   853,   729,
+				44,   330,   331,   332,   333,   457,   335,   336,   964,   461,
+			   343,   274,   738,   485,    41,   738,   467,   123,     2,     3,
+				 4,     5,   484,   356,     8,     9,   472,   642,    12,   279,
+				14,    15,    16,   485,   597,    19,   484,   499,   458,   501,
+				44,   578,   428,   505,   343,   380,   852,   467,   270,   366,
+			   613,   666,   369,   370,   480,    10,   892,   356,   343,     0,
+			   486,   810,    44,    47,   547,   598,   573,    51,   326,    10,
+			   399,   356,   366,   408,   769,   369,   370,    61,   585,    10,
+			   492,   416,    41,   810,   366,   568,    41,   369,   370,   279,
+				10,   426,   343,   565,    10,    46,   558,   559,   560,   343,
+				41,   573,   665,    44,   611,   356,    90,   833,   565,   345,
+				41,   573,   356,   585,   279,    10,   573,   680,    59,    10,
+				10,    41,   937,   585,   108,    41,   110,   610,   585,    10,
+			   270,    10,   853,    10,   366,    10,   608,   369,   370,   611,
+				91,   624,    10,    93,   366,    10,   604,   369,   370,   611,
+				41,   634,   603,   125,   283,   617,   618,   309,   620,    44,
+				41,   614,   614,   638,    44,   627,    41,    44,    10,    59,
+			   352,   638,   598,    41,    10,   838,    41,   326,   513,   637,
+				59,   844,    59,   269,   125,    44,   638,   670,   938,   651,
+			   326,   707,   708,   270,    59,   723,   729,   713,   714,   682,
+			   267,    10,    41,    10,    40,   317,   722,   269,   654,   354,
+				46,   774,   373,    44,   198,    44,   377,    59,   701,   125,
+			   343,    10,    44,    59,   208,   209,   366,    61,    10,   369,
+			   370,   617,    44,   356,    41,   364,    10,   366,   312,   313,
+			   369,   370,    10,    44,   268,   269,   305,   124,   272,   721,
+				59,   305,   413,   414,    61,    91,    10,   345,   720,   298,
+			   125,   345,    44,   315,   676,   677,   318,   319,   730,   721,
+				59,   834,   720,    10,   258,   604,   345,    59,    61,   263,
+			   742,   732,   266,   267,   746,    59,    10,   271,   345,   740,
+			   748,    59,   276,   277,   810,    10,   271,   272,   718,    44,
+			   284,   462,   269,   729,   272,    59,   125,   769,   637,   760,
+			   345,   295,    10,    46,   797,   367,   368,    41,    44,    10,
+			   782,   783,    59,   785,   345,   787,   267,   268,   269,   791,
+			   271,   272,   794,   274,   796,    59,    40,   799,   821,    10,
+				44,   269,    46,   345,    59,   329,   330,   331,   332,   333,
+			   334,   335,   336,   294,   295,   296,   297,   298,    91,   896,
+			   345,    59,   125,   775,   125,   777,    58,   702,    59,   345,
+			   705,   706,    93,    44,   268,   801,   269,   267,   268,   269,
+			   268,   269,   272,   346,    10,    14,   370,    91,    59,   373,
+			   852,   270,   343,   377,   378,   379,   380,   381,   269,   345,
+			   269,    44,   267,   268,   269,   356,   271,   272,    44,   274,
+			   745,   837,   396,    41,   398,   399,    46,   315,    59,   748,
+			   318,   319,   757,   758,   408,   366,    44,   411,   369,   370,
+			   765,   914,   416,    59,   270,    44,   124,   421,    44,   281,
+				44,    70,   426,    44,   856,   857,   305,    44,   307,   308,
+			   309,   310,    44,   788,   789,   917,   918,   919,   920,   268,
+			   269,    91,   924,   925,   926,   927,   938,   929,   125,   367,
+			   368,   269,   279,   269,   458,   937,   366,   939,   940,   369,
+			   370,   964,     0,   467,   269,   269,   938,   366,   270,   937,
+			   369,   370,    10,   269,   829,   269,   480,   909,   272,   911,
+			   484,   366,   486,    44,   369,   370,   841,   343,   125,   269,
+			   972,   973,   974,   975,   976,   269,   309,   271,   272,   124,
+			   356,   269,   984,    41,   366,   125,    44,   369,   370,   513,
+			   366,   943,   269,   369,   370,   272,   309,   274,    44,    15,
+				16,    59,    44,    19,    44,   366,   707,   708,   369,   370,
+				44,    10,   713,   714,    44,   270,   269,   366,    44,   283,
+			   369,   370,   269,   274,   346,   900,    44,   902,    44,    45,
+			   905,   269,   201,    49,    50,   279,    93,   366,   207,   270,
+			   369,   370,    41,   125,   366,    61,    62,   369,   370,   274,
+			   751,   752,   366,   754,   755,   369,   370,    41,   366,   270,
+				59,   369,   370,    41,    93,   125,   235,   125,   237,    93,
+			   343,    58,   366,    93,   598,   369,   370,   269,     5,   940,
+			   604,   605,     6,   356,     2,     3,     4,     5,   458,   366,
+			   939,   346,   369,   370,    12,   875,   833,   683,   676,   343,
+			   364,   724,   366,   944,   366,   369,   370,   369,   370,   810,
+			   279,   366,   356,   637,   369,   370,    12,   286,    10,   288,
+			   240,   312,    -1,   292,    -1,    10,   125,    -1,   366,    47,
+				-1,   369,   370,    51,    -1,   366,    -1,    -1,   369,   370,
+			   294,   295,   296,   297,   298,   846,    -1,   125,    40,    41,
+				-1,    -1,    44,    -1,    46,   366,    -1,    -1,   369,   370,
+			   329,    46,   305,    -1,   307,   308,   309,   310,   316,    61,
+			   318,   319,    90,   343,    59,    -1,    41,    -1,   702,    -1,
+				-1,   705,   706,   707,   708,    -1,   356,    -1,    -1,   713,
+			   714,    -1,   110,    -1,   718,    -1,   720,    -1,   722,    91,
+			   366,    -1,    -1,   369,   370,   729,    91,    -1,    -1,   267,
+			   268,   269,   270,   271,   272,   739,   274,    -1,    -1,   367,
+			   368,   745,    -1,    -1,   748,    -1,    -1,   243,   244,   245,
+			   246,   123,   248,   757,   758,    -1,   294,   295,   296,   297,
+			   298,   765,   258,    -1,    -1,    -1,    -1,   263,   417,   418,
+				-1,    -1,    -1,    -1,    10,    -1,    -1,    -1,    -1,    -1,
+			   125,     0,    -1,    -1,   788,   789,    -1,    38,   267,   268,
+			   269,    10,   271,   272,    -1,   274,    -1,   801,    -1,   305,
+			   198,   307,   308,   309,   310,    41,   810,    -1,   346,   267,
+			   268,   269,   313,   271,   272,   316,   274,   318,   467,   320,
+				-1,   322,    41,    59,    -1,   829,   830,    -1,   366,    -1,
+				-1,   369,   370,   837,   317,   318,   319,   841,    -1,    -1,
+				59,   337,   338,   339,   340,   341,   342,   343,   344,   345,
+			   346,   347,   348,   349,   350,   351,   352,   353,   354,   355,
+			   356,   357,   358,   359,   360,   361,   362,    -1,    -1,    -1,
+				-1,    10,    -1,   271,   370,    -1,    -1,   373,   276,   277,
+				-1,   377,   378,   379,   367,   368,   284,   366,   892,   125,
+			   369,   370,    -1,    -1,    -1,    -1,   900,   295,   902,    38,
+			   396,   905,    -1,    42,    10,   270,   125,   279,   280,   305,
+				-1,   307,   308,   309,   310,   411,    10,   413,   414,   415,
+				-1,    10,   267,   268,   269,   421,   271,   272,    10,   274,
+				-1,   329,   428,   937,    40,    41,   334,   438,    44,    -1,
+				46,   437,    -1,   439,    -1,    -1,    40,   443,   444,    -1,
+				-1,   347,    46,    -1,   603,    61,    -1,    46,     2,     3,
+				 4,     5,     6,    -1,    46,    59,   462,    44,    12,    46,
+				59,   343,    -1,    -1,    -1,   373,   472,    59,   343,   377,
+			   378,    -1,   380,   381,   356,    91,    -1,    -1,   484,    -1,
+				44,   356,    46,   642,    -1,    -1,    -1,    91,    -1,    -1,
+			   398,   366,    91,    47,   369,   370,    -1,    51,    -1,    91,
+			   408,   512,   508,    -1,    91,    -1,    -1,   666,   416,   316,
+				-1,   318,   319,    -1,    -1,    -1,   522,   523,   426,   123,
+				-1,   267,   268,   269,    37,   271,   272,    91,   274,    42,
+				43,   123,    45,    -1,    47,    -1,    90,    -1,   267,   268,
+			   269,   270,   271,   272,   305,   274,   307,   308,   309,   310,
+			   458,    -1,   281,    10,    -1,    10,   110,    -1,    -1,   467,
+			   367,   368,   291,   292,    -1,   294,   295,   296,   297,   298,
+				-1,    -1,   480,   732,    -1,   317,   318,   319,   486,    -1,
+				-1,   740,   588,    40,    -1,    40,   347,    44,    -1,    46,
+				-1,    46,    -1,   354,    -1,    -1,    -1,    -1,    10,    -1,
+				-1,   760,    59,    -1,    59,   513,    -1,    -1,    -1,    -1,
+			   501,   617,    -1,    -1,   505,    10,    -1,    -1,    10,    -1,
+			   366,    -1,    -1,   369,   370,   367,   368,    -1,    -1,    41,
+				-1,    -1,    44,    -1,    91,    -1,    91,   366,    -1,   645,
+			   369,   370,   648,    -1,   198,    40,    -1,    59,   654,    41,
+			   656,    46,    44,    -1,    46,    -1,   305,    -1,   307,   308,
+			   309,   310,    -1,   279,    59,    -1,   270,   124,   123,    61,
+				-1,   270,    -1,    38,    -1,    40,   280,    42,   270,   838,
+				-1,     2,     3,    -1,    -1,   844,    -1,    -1,   280,    -1,
+			   598,    12,   279,    -1,    -1,    -1,    91,   605,   347,    91,
+				-1,   707,   708,    -1,   353,   354,    -1,   713,   714,     0,
+				-1,   717,   124,    -1,   720,   279,   722,   271,    -1,    10,
+			   726,    -1,   276,   277,    -1,    -1,    47,   343,   123,    -1,
+			   284,   315,   316,   317,   318,   319,   320,    -1,    -1,   343,
+			   356,   295,    10,    -1,   343,   751,   752,    -1,   754,   755,
+				41,   343,   356,    44,    -1,    -1,   343,   356,   764,    -1,
+				-1,    -1,   366,    -1,   356,   369,   370,   366,    59,   356,
+			   369,   370,    -1,    41,   366,   329,    44,   369,   370,   343,
+			   334,    -1,    -1,   367,   368,    -1,    -1,   793,    -1,   110,
+				-1,    59,   356,    -1,   702,    -1,    -1,   705,   706,   707,
+				-1,    -1,    93,    -1,   810,   713,   714,    -1,    -1,    -1,
+			   718,    -1,    -1,   326,   722,   270,    -1,    -1,    -1,    38,
+			   826,   729,    -1,    42,    -1,   280,   380,   381,   341,   342,
+				-1,   739,    -1,    -1,   125,    -1,    -1,   745,    -1,    -1,
+			   846,    -1,    -1,    -1,   398,     2,     3,   853,    -1,   757,
+			   758,    -1,    -1,    -1,   408,    -1,   124,   765,    37,    38,
+				-1,    -1,   416,    42,    43,    -1,    45,    -1,    47,    -1,
+				-1,   283,   426,    -1,    -1,   270,    -1,   198,    -1,    -1,
+			   788,   789,    -1,    -1,    -1,   280,   343,   279,   343,    -1,
+				47,   782,   783,   801,   785,    -1,   787,    -1,    -1,   356,
+			   791,   356,   810,   794,   458,   796,    -1,    -1,   799,    -1,
+				-1,   366,    -1,   467,   369,   370,   317,   318,   319,   320,
+				-1,   829,   830,    -1,    -1,    -1,   480,    -1,    -1,   837,
+				-1,   937,   486,   841,    -1,   317,   318,   319,   320,    -1,
+			   305,    -1,   307,   308,   309,   310,    -1,    -1,   343,    -1,
+			   271,   343,   364,   110,   366,   276,   277,   369,   370,   513,
+				-1,   356,    -1,   284,   356,    -1,   367,   368,   317,   318,
+			   319,   366,    -1,    -1,   369,   370,   267,   268,   269,   270,
+			   271,   272,   347,   274,   892,   367,   368,    -1,   353,   354,
+			   281,   282,   900,    -1,   902,    -1,    -1,   905,    -1,     0,
+			   291,   292,    -1,   294,   295,   296,   297,   298,   329,    10,
+				-1,    -1,    -1,   334,    -1,   283,    -1,    -1,   367,   368,
+			   317,   318,   319,    -1,    -1,    -1,   917,   918,   919,   920,
+				-1,    -1,    -1,   924,   925,   926,   927,    -1,   929,    -1,
+				41,   198,    -1,    44,   598,    -1,    -1,    -1,    -1,    -1,
+				-1,   605,   373,    -1,    -1,    -1,   377,   378,    59,   380,
+				-1,   352,    -1,     0,    -1,   317,   318,   319,    -1,    -1,
+			   367,   368,    -1,    10,    -1,   366,    -1,   398,   369,   370,
+				-1,   972,   973,   974,   975,   976,   305,   408,   307,   308,
+			   309,   310,    -1,   984,    -1,   416,   364,    -1,   366,    -1,
+				-1,   369,   370,    -1,    41,   426,    10,    44,    -1,    10,
+				-1,    -1,    -1,    -1,   271,   367,   368,    -1,    -1,   276,
+			   277,    -1,    59,    -1,   125,    -1,    -1,   284,   347,    -1,
+				-1,    -1,    -1,    -1,   353,   354,    -1,   458,    -1,    40,
+				41,    -1,    46,    44,    -1,    46,   467,   326,   702,    -1,
+				10,   705,   706,    -1,    -1,    59,    93,    -1,    -1,    -1,
+				61,    -1,   341,   342,   718,    -1,    -1,   317,   318,   319,
+				-1,    -1,   329,    -1,    -1,   729,    -1,   334,    10,    -1,
+				40,    41,    -1,    -1,    44,   739,    46,    91,   125,    -1,
+				91,   745,   513,   317,   318,   319,    -1,    -1,   317,   318,
+			   319,    61,    -1,   757,   758,    -1,    38,    -1,    40,    -1,
+				42,   765,    -1,    -1,    46,    -1,   373,   367,   368,    -1,
+			   377,   378,   123,   380,    -1,    -1,    -1,    59,    -1,    -1,
+				-1,    91,    -1,    -1,   788,   789,    -1,    -1,    -1,    -1,
+				-1,   398,    -1,   367,   368,    -1,    -1,   801,   367,   368,
+				-1,   408,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   416,
+				-1,    -1,    -1,   123,    -1,    -1,   267,   268,   269,   426,
+			   271,   272,    -1,   274,    -1,   829,   830,    -1,    -1,    -1,
+				-1,    -1,    -1,   837,   605,    -1,    -1,   841,    -1,    10,
+			   291,   292,    10,   294,   295,   296,   297,    -1,    -1,    -1,
+				-1,   458,    -1,    38,    -1,    40,    -1,    42,    -1,    -1,
+			   467,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				41,    -1,    40,    44,    -1,    46,    44,    -1,    46,    -1,
+			   267,   268,   269,   270,   271,   272,    -1,   274,   892,    -1,
+				61,    59,    -1,    -1,   281,   282,   900,    -1,   902,    -1,
+				-1,   905,    -1,    -1,   291,   292,   513,   294,   295,   296,
+			   297,   298,    -1,     4,     5,   366,   270,    -1,   369,   370,
+				91,    12,    -1,    91,    -1,    -1,    -1,    -1,   279,   280,
+				-1,   702,    -1,    -1,   705,   706,   707,    -1,    -1,    -1,
+				-1,    -1,   713,   714,    -1,    -1,    -1,   718,    -1,    -1,
+				-1,   722,   123,    44,    45,   123,   124,    -1,    49,    50,
+				51,    -1,    -1,    -1,    -1,   352,    -1,    -1,   739,   279,
+			   280,    62,    -1,    -1,   745,    -1,    -1,    -1,    -1,   366,
+				-1,    -1,   369,   370,    -1,    -1,   757,   758,    -1,   343,
+				-1,    -1,   343,    -1,   765,    -1,    -1,    40,   605,    90,
+				-1,    44,   356,    46,    -1,   356,    -1,    -1,    -1,    10,
+				-1,    -1,   366,    -1,    -1,   369,   370,   788,   789,    -1,
+				-1,    -1,    -1,   305,    -1,   307,   308,   309,   310,    -1,
+				-1,    -1,    -1,   343,     0,    -1,    -1,    -1,    -1,   810,
+				41,    -1,    -1,    44,    10,    46,   356,    -1,    91,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   829,   830,
+				61,   343,    -1,    -1,    -1,   347,   837,    -1,    -1,    -1,
+			   841,   353,   354,    -1,    -1,    41,    -1,    -1,    44,    -1,
+			   123,    -1,    10,    -1,   366,    -1,    -1,   369,   370,    -1,
+				91,    -1,    58,    59,    -1,   702,    -1,    63,   705,   706,
+			   707,    -1,    -1,    -1,    -1,    -1,   713,   714,   279,   280,
+				-1,   718,   280,    41,    -1,   722,    44,    -1,    46,    -1,
+			   305,   892,   307,   308,   309,   310,    -1,    93,    -1,   900,
+				-1,   902,   739,    61,   905,    -1,    -1,    -1,   745,    -1,
+				-1,   305,    -1,   307,   308,   309,   310,    -1,    -1,    -1,
+			   757,   758,   243,   244,   245,   246,    -1,   248,   765,   125,
+				-1,    -1,   347,    91,    -1,    -1,    -1,     0,   353,   354,
+				-1,    -1,   343,    -1,    -1,   343,    -1,    10,    -1,    -1,
+				-1,   788,   789,   347,    -1,   356,     0,    -1,   356,   353,
+			   305,    -1,   307,   308,   309,   310,    10,    -1,    -1,    -1,
+				-1,    -1,    -1,   810,   295,    -1,    -1,    -1,    41,    -1,
+				-1,    44,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   829,   830,    -1,    -1,    59,    41,    -1,    -1,
+				44,    -1,   347,    -1,   841,    -1,   279,   280,   353,    -1,
+				-1,    -1,    -1,    -1,    58,    59,   337,   338,   339,   340,
+			   341,   342,   343,   344,   345,   346,   347,   348,   349,   350,
+			   351,   352,   353,   354,   355,   356,   357,   358,   359,   360,
+			   361,   362,    -1,    -1,    -1,    -1,    -1,    -1,   279,    93,
+				-1,    -1,    40,    -1,    -1,   892,    44,    -1,    46,    -1,
+			   381,    -1,   125,   900,    -1,   902,    -1,    -1,   905,    -1,
+			   343,   267,   268,   269,   270,   271,   272,    -1,   274,    -1,
+				-1,   125,    44,   356,    46,   281,   282,   283,    -1,    -1,
+				-1,    -1,   413,   414,   415,   291,   292,    -1,   294,   295,
+			   296,   297,   298,    91,    -1,    -1,    -1,   428,    -1,    -1,
+				-1,    -1,   343,    -1,    -1,    -1,   437,     0,   439,    -1,
+				-1,   279,   443,   444,    -1,   356,    -1,    10,    -1,    91,
+				-1,    -1,    40,    -1,    -1,   123,    44,    -1,    46,    -1,
+				-1,   462,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   346,   472,    -1,    -1,    -1,    -1,   352,    -1,    41,   480,
+				-1,   123,    -1,    -1,    -1,   486,    -1,    -1,   364,    -1,
+			   366,    -1,    -1,   369,   370,    -1,    59,    -1,    -1,    -1,
+				-1,    -1,    -1,    91,    -1,   343,    -1,   508,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   356,    -1,
+				-1,   522,   523,    -1,   267,   268,   269,   270,   271,   272,
+				-1,   274,    -1,    -1,    -1,   123,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   267,   268,   269,   270,   271,   272,    -1,
+			   274,   294,   295,   296,   297,   298,    -1,   281,   282,   283,
+				-1,    -1,   125,    -1,    -1,    -1,    -1,   291,   292,    -1,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   588,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   598,    -1,    -1,
+				-1,    -1,    -1,   346,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   279,   280,    -1,    -1,    -1,   617,    -1,    -1,     0,
+				-1,    -1,   346,   366,    -1,    -1,   369,   370,   352,    10,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   279,   280,    -1,
+			   364,    -1,   366,    -1,   645,   369,   370,   648,    -1,    -1,
+				-1,    -1,    33,   654,    -1,   656,    37,    38,    -1,    40,
+				41,    42,    43,    44,    45,    46,    47,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   343,    -1,    58,    59,    60,
+				61,    62,    63,    -1,    -1,    -1,    -1,    -1,   356,    -1,
+				-1,   279,   280,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   343,    -1,    -1,   267,   268,   269,   270,   271,   272,
+				91,   274,    93,    94,   356,    -1,   717,    -1,   281,    -1,
+				-1,    -1,    -1,    -1,    -1,   726,    -1,    -1,   729,    -1,
+				-1,   294,   295,   296,   297,   298,     0,    -1,    -1,    -1,
+				-1,    -1,   123,   124,   125,   126,    10,    -1,    -1,    -1,
+			   751,   752,    -1,   754,   755,   343,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   764,    -1,    -1,    -1,    -1,   356,    33,
+				-1,    -1,    -1,    37,    38,    -1,    40,    41,    42,    43,
+				44,    45,    46,    47,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   793,    -1,    58,    59,    60,    61,    62,    63,
+			   801,    -1,    -1,   366,    -1,    -1,   369,   370,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   826,    -1,    91,    -1,    93,
+				94,    -1,    -1,    -1,    -1,    -1,   837,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   846,    -1,    -1,    -1,    -1,
+				-1,    -1,   853,    -1,    -1,    -1,    -1,    -1,    -1,   123,
+			   124,   125,   126,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   257,   258,   259,   260,
+			   261,   262,   263,   264,   265,    -1,   267,   268,   269,   270,
+			   271,   272,   273,   274,   275,   276,   277,   278,   279,   280,
+			   281,   282,   283,   284,   285,   286,   287,   288,   289,   290,
+			   291,   292,   293,   294,   295,   296,   297,   298,    -1,    -1,
+				-1,   302,   303,    -1,   305,   306,   307,   308,   309,   310,
+			   311,   312,   313,   314,    -1,    -1,   317,    -1,    -1,   320,
+			   321,   322,    -1,   324,   325,   326,   327,   328,   329,   330,
+			   331,   332,   333,   334,   335,   336,   337,   338,    -1,    -1,
+			   341,   342,   343,   344,   345,   346,   347,   348,    -1,   350,
+			   351,   352,   353,   354,   355,   356,   357,   358,   359,   360,
+			   361,   362,    -1,   364,   365,   366,    -1,    -1,   369,   370,
+				-1,   372,    -1,   257,   258,   259,   260,   261,   262,   263,
+			   264,   265,    -1,   267,   268,   269,   270,   271,   272,   273,
+			   274,   275,   276,   277,   278,   279,   280,   281,   282,   283,
+			   284,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,   302,   303,
+				-1,   305,   306,   307,   308,   309,   310,   311,   312,   313,
+			   314,    -1,    -1,   317,    -1,    -1,   320,   321,   322,    -1,
+			   324,   325,   326,   327,   328,   329,   330,   331,   332,   333,
+			   334,   335,   336,   337,   338,    -1,    -1,   341,   342,   343,
+			   344,   345,   346,   347,   348,    -1,   350,   351,   352,   353,
+			   354,   355,   356,   357,   358,   359,   360,   361,   362,     0,
+			   364,   365,   366,    -1,    -1,   369,   370,    -1,   372,    10,
+				37,    38,    -1,    -1,    -1,    42,    43,    -1,    45,    -1,
+				47,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    33,    -1,    -1,    -1,    37,    38,    -1,    40,
+				41,    42,    43,    44,    45,    46,    47,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    59,    60,
+				61,    62,    63,    -1,    -1,    -1,    -1,    94,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				91,    -1,    93,    94,    -1,    -1,    -1,   124,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,     0,    -1,    -1,    -1,
+				-1,    -1,   123,   124,   125,   126,    10,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    33,
+				-1,    -1,    -1,    37,    38,    -1,    40,    41,    42,    43,
+				44,    45,    46,    47,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    58,    59,    60,    61,    62,    63,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    93,
+				94,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   123,
+			   124,   125,   126,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   257,   258,   259,   260,
+			   261,   262,   263,   264,   265,    -1,   267,   268,   269,   270,
+			   271,   272,   273,   274,   275,   276,   277,   278,    -1,   280,
+			   281,   282,   283,   284,   285,   286,   287,   288,   289,   290,
+			   291,   292,   293,   294,   295,   296,   297,   298,    -1,   326,
+				-1,   302,   303,    -1,   305,   306,   307,   308,   309,   310,
+			   311,   312,   313,   314,   341,   342,   317,    -1,    -1,   320,
+			   321,   322,    -1,   324,   325,   326,   327,   328,   329,   330,
+			   331,   332,   333,   334,   335,   336,   337,   338,    -1,    -1,
+			   341,   342,   343,   344,    -1,   346,   347,   348,    -1,   350,
+			   351,   352,   353,   354,   355,   356,   357,   358,   359,   360,
+			   361,   362,    -1,   364,   365,   366,    -1,    -1,   369,   370,
+				-1,   372,    -1,   257,   258,   259,   260,   261,   262,   263,
+			   264,   265,    -1,   267,   268,   269,   270,   271,   272,   273,
+			   274,   275,   276,   277,   278,    -1,   280,   281,   282,   283,
+			   284,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,   302,   303,
+				-1,   305,   306,   307,   308,   309,   310,   311,   312,   313,
+			   314,    -1,    -1,   317,    -1,    -1,   320,   321,   322,    -1,
+			   324,   325,   326,   327,   328,   329,   330,   331,   332,   333,
+			   334,   335,   336,   337,   338,    -1,    -1,   341,   342,   343,
+			   344,    -1,   346,   347,   348,    -1,   350,   351,   352,   353,
+			   354,   355,   356,   357,   358,   359,   360,   361,   362,     0,
+			   364,   365,   366,    -1,    -1,   369,   370,    -1,   372,    10,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    33,    -1,    -1,    -1,    37,    38,    -1,    40,
+				41,    42,    43,    44,    45,    46,    47,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    59,    60,
+				61,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				91,    -1,    93,    94,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,     0,    -1,    -1,    -1,
+				-1,    -1,   123,   124,   125,   126,    10,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    33,
+				-1,    -1,    -1,    37,    38,    -1,    40,    41,    42,    43,
+				44,    45,    46,    47,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    58,    59,    60,    -1,    62,    63,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    93,
+				94,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   123,
+			   124,   125,   126,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   257,   258,   259,   260,
+			   261,   262,   263,   264,   265,    -1,   267,   268,   269,   270,
+			   271,   272,   273,   274,   275,   276,   277,   278,    -1,   280,
+			   281,   282,   283,   284,   285,   286,   287,   288,   289,   290,
+			   291,   292,   293,   294,   295,   296,   297,   298,    -1,    -1,
+				-1,   302,   303,    -1,   305,   306,   307,   308,   309,   310,
+			   311,   312,   313,   314,    -1,    -1,   317,    -1,    -1,   320,
+			   321,   322,    -1,   324,   325,   326,   327,   328,   329,   330,
+			   331,   332,   333,   334,   335,   336,   337,   338,    -1,    -1,
+			   341,   342,   343,   344,    -1,   346,   347,   348,    -1,   350,
+			   351,   352,   353,   354,   355,   356,   357,   358,   359,   360,
+			   361,   362,    -1,   364,   365,   366,    -1,    -1,   369,   370,
+				-1,   372,    -1,   257,   258,   259,   260,   261,   262,   263,
+			   264,   265,    -1,   267,   268,   269,   270,   271,   272,   273,
+			   274,   275,   276,   277,   278,    -1,   280,   281,   282,   283,
+			   284,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,   302,   303,
+				-1,   305,   306,   307,   308,   309,   310,   311,   312,   313,
+			   314,    -1,    -1,   317,    -1,    -1,   320,   321,   322,    -1,
+			   324,   325,   326,   327,   328,   329,   330,   331,   332,   333,
+			   334,   335,   336,   337,   338,    -1,    -1,   341,   342,   343,
+			   344,    -1,   346,   347,   348,    -1,   350,   351,   352,   353,
+			   354,   355,   356,   357,   358,   359,   360,   361,   362,     0,
+			   364,   365,   366,    -1,    -1,   369,   370,    -1,   372,    10,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    33,    -1,    -1,    -1,    37,    38,    -1,    40,
+				41,    42,    43,    44,    45,    46,    47,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    59,    60,
+				-1,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				91,    -1,    93,    94,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,     0,    -1,    -1,    -1,
+				-1,    -1,   123,   124,   125,   126,    10,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    33,
+				-1,    -1,    -1,    37,    38,    -1,    40,    41,    42,    43,
+				44,    45,    46,    47,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    58,    59,    60,    -1,    62,    63,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    93,
+				94,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   123,
+			   124,   125,   126,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   257,   258,   259,   260,
+			   261,   262,   263,   264,   265,    -1,   267,   268,   269,   270,
+			   271,   272,   273,   274,   275,   276,   277,   278,    -1,   280,
+			   281,   282,   283,   284,   285,   286,   287,   288,   289,   290,
+			   291,   292,   293,   294,   295,   296,   297,   298,    -1,    -1,
+				-1,   302,   303,    -1,   305,   306,   307,   308,   309,   310,
+			   311,   312,   313,   314,    -1,    -1,   317,    -1,    -1,   320,
+			   321,   322,    -1,   324,   325,   326,   327,   328,   329,   330,
+			   331,   332,   333,   334,   335,   336,   337,   338,    -1,    -1,
+			   341,   342,   343,   344,    -1,   346,   347,   348,    -1,   350,
+			   351,   352,   353,   354,   355,   356,   357,   358,   359,   360,
+			   361,   362,    -1,   364,   365,   366,    -1,    -1,   369,   370,
+				-1,   372,    -1,   257,   258,   259,   260,   261,   262,   263,
+			   264,   265,    -1,   267,   268,   269,   270,   271,   272,   273,
+			   274,   275,   276,   277,   278,    -1,   280,   281,   282,   283,
+			   284,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,   302,   303,
+				-1,   305,   306,   307,   308,   309,   310,   311,   312,   313,
+			   314,    -1,    -1,   317,    -1,    -1,   320,   321,   322,    -1,
+			   324,   325,   326,   327,   328,   329,   330,   331,   332,   333,
+			   334,   335,   336,   337,   338,    -1,    -1,   341,   342,   343,
+			   344,    -1,   346,   347,   348,    -1,   350,   351,   352,   353,
+			   354,   355,   356,   357,   358,   359,   360,   361,   362,     0,
+			   364,   365,   366,    -1,    -1,   369,   370,    -1,   372,    10,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    33,    -1,    -1,    -1,    37,    38,    -1,    40,
+				41,    42,    43,    44,    45,    46,    47,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    59,    60,
+				61,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				91,    -1,    93,    94,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,     0,    -1,    -1,    -1,
+				-1,    -1,    -1,   124,   125,   126,    10,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    33,
+				-1,    -1,    -1,    37,    38,    -1,    -1,    41,    42,    43,
+				44,    45,    46,    47,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    59,    60,    -1,    62,    63,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				10,    -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    93,
+				94,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    38,    -1,
+				40,    -1,    42,    -1,    -1,    -1,    46,    -1,    -1,   123,
+			   124,   125,   126,    -1,    -1,    -1,    -1,    -1,    -1,    59,
+				-1,    -1,    -1,    -1,    -1,    -1,   257,   258,   259,   260,
+			   261,   262,   263,   264,   265,    -1,   267,   268,   269,   270,
+			   271,   272,   273,   274,   275,   276,   277,   278,    -1,    -1,
+			   281,   282,   283,   284,   285,   286,   287,   288,   289,   290,
+			   291,   292,   293,   294,   295,   296,   297,   298,    -1,    -1,
+				-1,   302,   303,    -1,   305,   306,   307,   308,   309,   310,
+			   311,   312,   313,   314,    -1,    -1,   317,    -1,    -1,   320,
+			   321,   322,    -1,   324,   325,   326,   327,   328,   329,   330,
+			   331,   332,   333,   334,   335,   336,   337,   338,    -1,    -1,
+			   341,   342,   343,   344,    -1,   346,   347,   348,    -1,   350,
+			   351,   352,   353,   354,   355,   356,   357,   358,   359,   360,
+			   361,   362,    -1,   364,   365,   366,    -1,    -1,   369,   370,
+				-1,   372,    -1,   257,   258,   259,   260,   261,   262,   263,
+			   264,   265,    -1,   267,   268,   269,   270,   271,   272,   273,
+			   274,   275,   276,   277,   278,    -1,   280,   281,   282,    -1,
+			   284,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,   302,   303,
+				-1,   305,   306,   307,   308,   309,   310,   311,   312,   313,
+			   314,    -1,    -1,   317,    -1,    -1,   320,   321,   322,    -1,
+			   324,   325,   326,   327,   328,   329,   330,   331,   332,   333,
+			   334,   335,   336,   337,   338,    -1,    -1,   341,   342,   343,
+			   344,    -1,   346,   347,   348,    -1,   350,   351,   352,   353,
+			   354,   355,   356,   357,   358,   359,   360,   361,   362,     0,
+				-1,   365,   366,    -1,    -1,   369,   370,    -1,   372,    10,
+				-1,    -1,    -1,    -1,    -1,   305,    -1,   307,   308,   309,
+			   310,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    33,    -1,    -1,    -1,    37,    38,    -1,    -1,
+				41,    42,    43,    44,    45,    46,    47,    -1,    -1,    -1,
+				-1,    -1,    -1,   343,    -1,    -1,    -1,   347,    59,    60,
+				-1,    62,    63,   353,   354,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   366,    -1,    -1,   369,
+			   370,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				91,    -1,    93,    94,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,     0,    -1,    -1,    -1,
+				-1,    -1,   123,   124,   125,   126,    10,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    33,
+				-1,    -1,    -1,    37,    38,    -1,    -1,    41,    42,    43,
+				44,    45,    46,    47,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    59,    60,    -1,    62,    63,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				10,    -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    93,
+				94,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    38,    -1,
+				40,    -1,    42,    -1,    -1,    -1,    46,    -1,    -1,    -1,
+			   124,   125,   126,    -1,    -1,    -1,    -1,    -1,    -1,    59,
+				-1,    -1,    -1,    -1,    -1,    -1,   257,   258,   259,   260,
+			   261,   262,   263,   264,   265,    -1,   267,   268,   269,   270,
+			   271,   272,   273,   274,   275,   276,   277,   278,    -1,   280,
+			   281,   282,    -1,   284,   285,   286,   287,   288,   289,   290,
+			   291,   292,   293,   294,   295,   296,   297,   298,    -1,    -1,
+				-1,   302,   303,    -1,   305,   306,   307,   308,   309,   310,
+			   311,   312,   313,   314,    -1,    -1,   317,    -1,    -1,   320,
+			   321,   322,    -1,   324,   325,   326,   327,   328,   329,   330,
+			   331,   332,   333,   334,   335,   336,   337,   338,    -1,    -1,
+			   341,   342,   343,   344,    -1,   346,   347,   348,    -1,   350,
+			   351,   352,   353,   354,   355,   356,   357,   358,   359,   360,
+			   361,   362,    -1,    -1,   365,   366,    -1,    -1,   369,   370,
+				-1,   372,    -1,   257,   258,   259,   260,   261,   262,   263,
+			   264,   265,    -1,   267,   268,   269,   270,   271,   272,   273,
+			   274,   275,   276,   277,   278,    -1,    -1,   281,   282,    -1,
+			   284,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,   302,   303,
+				-1,   305,   306,   307,   308,   309,   310,   311,   312,   313,
+			   314,    -1,    -1,   317,    -1,    -1,   320,   321,   322,    -1,
+			   324,   325,   326,   327,   328,   329,   330,   331,   332,   333,
+			   334,   335,   336,   337,   338,    -1,    -1,   341,   342,   343,
+			   344,    -1,   346,   347,   348,    -1,   350,   351,   352,   353,
+			   354,   355,   356,   357,   358,   359,   360,   361,   362,     0,
+				-1,   365,   366,    -1,    -1,   369,   370,    -1,   372,    10,
+				-1,    -1,    -1,    -1,    -1,   305,    -1,   307,   308,   309,
+			   310,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    33,    -1,    -1,    -1,    37,    38,    -1,    40,
+				41,    42,    43,    44,    45,    46,    47,    -1,    -1,    -1,
+				-1,    -1,    -1,   343,    -1,    -1,    -1,   347,    59,    60,
+				61,    62,    63,   353,   354,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   366,    -1,    -1,   369,
+			   370,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				91,    -1,    -1,    94,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,     0,    -1,    -1,    -1,
+				-1,    -1,   123,   124,   125,   126,    10,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    33,
+				-1,    -1,    -1,    37,    38,    -1,    40,    41,    42,    43,
+				44,    45,    46,    47,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    59,    60,    61,    62,    63,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				10,    -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    -1,
+				94,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    38,    -1,
+				40,    -1,    42,    -1,    -1,    -1,    46,    -1,    -1,   123,
+			   124,   125,   126,    -1,    -1,    -1,    -1,    -1,    -1,    59,
+				-1,    -1,    -1,    -1,    -1,    -1,   257,   258,   259,   260,
+			   261,   262,   263,   264,   265,    -1,   267,   268,   269,    -1,
+			   271,   272,   273,   274,   275,   276,   277,   278,    -1,   280,
+				-1,    -1,    -1,   284,   285,   286,   287,   288,   289,   290,
+			   291,   292,   293,   294,   295,   296,   297,   298,    -1,    -1,
+				-1,   302,   303,    -1,   305,   306,   307,   308,   309,   310,
+			   311,   312,   313,   314,    -1,    -1,   317,    -1,    -1,   320,
+			   321,   322,    -1,   324,   325,   326,   327,   328,   329,   330,
+			   331,   332,   333,   334,   335,   336,   337,   338,    -1,    -1,
+			   341,   342,   343,   344,    -1,    -1,   347,   348,    -1,   350,
+			   351,    -1,   353,   354,   355,   356,   357,   358,   359,   360,
+			   361,   362,    -1,    -1,   365,   366,    -1,    -1,   369,   370,
+				-1,   372,    -1,   257,   258,   259,   260,   261,   262,   263,
+			   264,   265,    -1,   267,   268,   269,    -1,   271,   272,   273,
+			   274,   275,   276,   277,   278,    -1,   280,    -1,    -1,    -1,
+			   284,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,   302,   303,
+				-1,   305,   306,   307,   308,   309,   310,   311,   312,   313,
+			   314,    -1,    -1,   317,    -1,    -1,   320,   321,   322,    -1,
+			   324,   325,   326,   327,   328,   329,   330,   331,   332,   333,
+			   334,   335,   336,   337,   338,    -1,    -1,   341,   342,   343,
+			   344,    -1,    -1,   347,   348,    -1,   350,   351,    -1,   353,
+			   354,   355,   356,   357,   358,   359,   360,   361,   362,     0,
+				-1,   365,   366,    -1,    -1,   369,   370,    -1,   372,    10,
+				-1,    -1,    -1,    -1,    -1,   305,    -1,   307,   308,   309,
+			   310,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    33,    -1,    -1,    -1,    37,    38,    -1,    40,
+				41,    42,    43,    44,    45,    46,    47,    -1,    -1,    -1,
+				-1,    -1,    -1,   343,    -1,    -1,    -1,   347,    59,    60,
+				61,    62,    63,   353,   354,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   366,    -1,    -1,   369,
+			   370,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				91,    -1,    -1,    94,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,     0,    -1,    -1,    -1,
+				-1,    -1,   123,   124,   125,   126,    10,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    33,
+				-1,    -1,    -1,    37,    38,    -1,    40,    41,    42,    43,
+				44,    45,    46,    47,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    59,    60,    61,    62,    63,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				10,    -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    -1,
+				94,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    38,    -1,
+				40,    -1,    42,    -1,    -1,    -1,    46,    -1,    -1,   123,
+			   124,   125,   126,    -1,    -1,    -1,    -1,    -1,    -1,    59,
+				-1,    -1,    -1,    -1,    -1,    -1,   257,   258,   259,   260,
+			   261,   262,   263,   264,   265,    -1,   267,   268,   269,    -1,
+			   271,   272,   273,   274,   275,   276,   277,   278,    -1,   280,
+				-1,    -1,    -1,   284,   285,   286,   287,   288,   289,   290,
+			   291,   292,   293,   294,   295,   296,   297,   298,    -1,    -1,
+				-1,   302,   303,    -1,   305,   306,   307,   308,   309,   310,
+			   311,   312,   313,   314,    -1,    -1,   317,    -1,    -1,   320,
+			   321,   322,    -1,   324,   325,   326,   327,   328,   329,   330,
+			   331,   332,   333,   334,   335,   336,   337,   338,    -1,    -1,
+			   341,   342,   343,   344,    -1,    -1,   347,   348,    -1,   350,
+			   351,    -1,   353,   354,   355,   356,   357,   358,   359,   360,
+			   361,   362,    -1,    -1,   365,   366,    -1,    -1,   369,   370,
+				-1,   372,    -1,   257,   258,   259,   260,   261,   262,   263,
+			   264,   265,    -1,   267,   268,   269,    -1,   271,   272,   273,
+			   274,   275,   276,   277,   278,    -1,   280,    -1,    -1,    -1,
+			   284,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,   302,   303,
+				-1,   305,   306,   307,   308,   309,   310,   311,   312,   313,
+			   314,    -1,    -1,   317,    -1,    -1,   320,   321,   322,    -1,
+			   324,   325,   326,   327,   328,   329,   330,   331,   332,   333,
+			   334,   335,   336,   337,   338,    -1,    -1,   341,   342,   343,
+			   344,    -1,    -1,   347,   348,    -1,   350,   351,    -1,   353,
+			   354,   355,   356,   357,   358,   359,   360,   361,   362,     0,
+				-1,   365,   366,    -1,    -1,   369,   370,    -1,   372,    10,
+				-1,    -1,    -1,    -1,    -1,   305,    -1,   307,   308,   309,
+			   310,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    33,    -1,    -1,    -1,    37,    38,    -1,    40,
+				41,    42,    43,    44,    45,    46,    47,    -1,    -1,    -1,
+				-1,    -1,    -1,   343,    -1,    -1,    -1,   347,    59,    60,
+				61,    62,    63,   353,   354,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   366,    -1,    -1,   369,
+			   370,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				91,    -1,    -1,    94,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,     0,    -1,    -1,    -1,
+				-1,    -1,   123,   124,   125,   126,    10,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    33,
+				-1,    -1,    -1,    37,    38,    -1,    40,    41,    42,    43,
+				44,    45,    46,    47,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    59,    60,    61,    62,    63,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				10,    -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    -1,
+				94,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    38,    -1,
+				40,    -1,    42,    -1,    -1,    -1,    46,    -1,    -1,   123,
+			   124,   125,   126,    -1,    -1,    -1,    -1,    -1,    -1,    59,
+				-1,    -1,    -1,    -1,    -1,    -1,   257,   258,   259,   260,
+			   261,   262,   263,   264,   265,    -1,   267,   268,   269,    -1,
+			   271,   272,   273,   274,   275,   276,   277,   278,    -1,   280,
+				-1,    -1,    -1,   284,   285,   286,   287,   288,   289,   290,
+			   291,   292,   293,   294,   295,   296,   297,   298,    -1,    -1,
+				-1,   302,   303,    -1,   305,   306,   307,   308,   309,   310,
+			   311,   312,   313,   314,    -1,    -1,   317,    -1,    -1,   320,
+			   321,   322,    -1,   324,   325,   326,   327,   328,   329,   330,
+			   331,   332,   333,   334,   335,   336,   337,   338,    -1,    -1,
+			   341,   342,   343,   344,    -1,    -1,   347,   348,    -1,   350,
+			   351,    -1,   353,   354,   355,   356,   357,   358,   359,   360,
+			   361,   362,    -1,    -1,   365,   366,    -1,    -1,   369,   370,
+				-1,   372,    -1,   257,   258,   259,   260,   261,   262,   263,
+			   264,   265,    -1,   267,   268,   269,    -1,   271,   272,   273,
+			   274,   275,   276,   277,   278,    -1,   280,    -1,    -1,    -1,
+			   284,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,   302,   303,
+				-1,   305,   306,   307,   308,   309,   310,   311,   312,   313,
+			   314,    -1,    -1,   317,    -1,    -1,   320,   321,   322,    -1,
+			   324,   325,   326,   327,   328,   329,   330,   331,   332,   333,
+			   334,   335,   336,   337,   338,    -1,    -1,   341,   342,   343,
+			   344,    -1,    -1,   347,   348,    -1,   350,   351,    -1,   353,
+			   354,   355,   356,   357,   358,   359,   360,   361,   362,     0,
+				-1,   365,   366,    -1,    -1,   369,   370,    -1,   372,    10,
+				-1,    -1,    -1,    -1,    -1,   305,    -1,   307,   308,   309,
+			   310,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    33,    -1,    -1,    -1,    37,    38,    -1,    40,
+				41,    42,    43,    44,    45,    46,    47,    -1,    -1,    -1,
+				-1,    -1,    -1,   343,    -1,    -1,    -1,   347,    59,    60,
+				61,    62,    63,   353,   354,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   366,    -1,    -1,   369,
+			   370,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				91,    -1,    -1,    94,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,     0,    -1,    -1,    -1,
+				-1,    -1,    -1,   124,   125,   126,    10,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    33,
+				-1,    -1,    -1,    37,    38,    -1,    40,    41,    42,    43,
+				44,    45,    46,    47,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    59,    60,    61,    62,    63,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    10,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    -1,
+				94,    -1,    -1,    -1,    -1,    -1,    10,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    38,    -1,    40,    -1,    42,    -1,
+				-1,    -1,    46,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   124,   125,   126,    -1,    38,    59,    40,    -1,    42,    -1,
+				-1,    -1,    46,    -1,    -1,    -1,   257,   258,   259,   260,
+			   261,   262,   263,   264,   265,    59,   267,   268,   269,    -1,
+			   271,   272,   273,   274,   275,   276,   277,   278,    -1,    -1,
+				-1,    -1,    -1,   284,   285,   286,   287,   288,   289,   290,
+			   291,   292,   293,   294,   295,   296,   297,   298,    -1,    -1,
+				-1,   302,   303,    -1,   305,   306,   307,   308,   309,   310,
+			   311,   312,   313,   314,    -1,    -1,   317,    -1,    -1,   320,
+			   321,   322,    -1,   324,   325,   326,   327,   328,   329,   330,
+			   331,   332,   333,   334,   335,   336,   337,   338,    -1,    -1,
+			   341,   342,   343,   344,    -1,    -1,   347,   348,    -1,   350,
+			   351,    -1,   353,   354,   355,   356,   357,   358,   359,   360,
+			   361,   362,    -1,    -1,   365,   366,    -1,    -1,   369,   370,
+				-1,   372,    -1,   257,   258,   259,   260,   261,   262,   263,
+			   264,   265,    -1,   267,   268,   269,    -1,   271,   272,   273,
+			   274,   275,   276,   277,   278,    -1,    -1,    -1,    -1,    -1,
+			   284,   285,   286,   287,   288,   289,   290,   291,   292,   293,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,   302,   303,
+				-1,   305,   306,   307,   308,   309,   310,   311,   312,   313,
+			   314,    -1,    -1,   317,    -1,    -1,   320,   321,   322,    -1,
+			   324,   325,   326,   327,   328,   329,   330,   331,   332,   333,
+			   334,   335,   336,   337,   338,    -1,    -1,   341,   342,   343,
+			   344,    -1,    -1,   347,   348,    -1,   350,   351,    -1,   353,
+			   354,   355,   356,   357,   358,   359,   360,   361,   362,     0,
+				-1,   365,   366,    -1,    -1,   369,   370,    -1,   372,    10,
+				-1,   305,    -1,   307,   308,   309,   310,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   305,    33,   307,   308,   309,   310,    -1,    -1,    -1,
+				41,    -1,    -1,    -1,    -1,    46,    -1,    -1,    -1,   343,
+				-1,    -1,    -1,   347,    -1,    -1,    -1,    -1,    59,   353,
+			   354,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   343,
+				-1,    -1,   366,   347,    -1,   369,   370,    -1,    -1,   353,
+			   354,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   366,    -1,    -1,   369,   370,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,     0,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    10,    -1,    -1,    -1,    -1,
+				-1,    -1,   123,    -1,   125,   126,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    37,    38,    -1,    -1,    41,    42,    43,    44,
+				45,    46,    47,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    58,    59,    60,    61,    62,    63,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    93,    94,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   123,   124,
+			   125,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   257,   258,   259,   260,
+			   261,   262,   263,   264,   265,    -1,   267,   268,   269,   270,
+			   271,   272,   273,   274,   275,   276,   277,   278,    -1,   280,
+			   281,    -1,    -1,   284,   285,   286,   287,   288,   289,   290,
+			   291,   292,   293,   294,   295,   296,   297,   298,    -1,    -1,
+				-1,   302,   303,    -1,   305,   306,   307,   308,   309,   310,
+			   311,   312,   313,   314,    -1,    -1,   317,    -1,    -1,   320,
+			   321,   322,    -1,   324,   325,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   343,   344,    -1,    -1,   347,   348,    -1,   350,
+			   351,    -1,   353,   354,   355,   356,   357,   358,   359,   360,
+			   361,   362,    -1,    -1,   365,   366,    -1,    -1,   369,   370,
+				-1,   372,   267,   268,   269,   270,   271,   272,    -1,   274,
+				-1,    -1,    -1,    -1,    -1,   280,   281,   282,   283,   686,
+				-1,    -1,   689,    -1,    -1,    -1,   291,   292,    -1,   294,
+			   295,   296,   297,   298,   701,    37,    38,    -1,    -1,    -1,
+				42,    43,    -1,    45,    -1,    47,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    60,    -1,
+				62,   326,   327,   328,   329,   330,   331,   332,   333,   334,
+			   335,   336,   337,   338,     0,    -1,   341,   342,   343,    -1,
+				-1,   346,    -1,    -1,    10,    -1,    -1,   352,    -1,    -1,
+				-1,   356,    94,    -1,    -1,    -1,    -1,    -1,    -1,   364,
+				-1,   366,    -1,    -1,   369,   370,    -1,    -1,    -1,    -1,
+				-1,    37,    38,    -1,    -1,    41,    42,    43,    44,    45,
+				46,    47,   124,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    58,    59,    60,    -1,    62,    63,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    91,    -1,    93,    94,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     0,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    10,    -1,
+				-1,    -1,    -1,    -1,   861,    -1,   863,   123,   124,   125,
+			   867,    -1,    -1,    -1,    -1,    -1,   873,    -1,    -1,    -1,
+				-1,    -1,   879,    -1,    -1,    37,    38,    -1,    -1,    41,
+				42,    43,    44,    45,    46,    47,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    58,    59,    60,    61,
+				62,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    91,
+				-1,    93,    94,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   947,    -1,    -1,    -1,    -1,   952,    -1,   954,    -1,   956,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   124,   125,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   981,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   326,   327,   328,   329,   330,   331,
+			   332,   333,   334,   335,   336,    -1,    -1,    -1,    -1,   341,
+			   342,   267,   268,   269,   270,   271,   272,    -1,   274,    -1,
+				-1,    -1,    -1,    -1,   280,   281,   282,   283,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   291,   292,    -1,   294,   295,
+			   296,   297,   298,    -1,    -1,    -1,    -1,    -1,     0,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    10,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   326,   327,   328,   329,   330,   331,   332,   333,   334,   335,
+			   336,   337,   338,    -1,    -1,   341,   342,   343,    -1,    41,
+			   346,    -1,    44,    -1,     0,    -1,   352,    -1,    -1,    -1,
+			   356,    -1,    -1,    -1,    10,    -1,    -1,    59,   364,    -1,
+			   366,    -1,    -1,   369,   370,   267,   268,   269,   270,   271,
+			   272,    -1,   274,    -1,    -1,    -1,    -1,    -1,    -1,   281,
+			   282,   283,    -1,    -1,    -1,    41,    -1,    -1,    -1,   291,
+			   292,    -1,   294,   295,   296,   297,   298,    -1,    -1,    -1,
+				-1,    -1,    -1,    59,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   125,   326,   327,   328,   329,   330,   331,
+			   332,   333,   334,   335,   336,   337,   338,     0,    -1,   341,
+			   342,   343,    -1,   345,   346,    -1,    -1,    10,    -1,    -1,
+			   352,    -1,    -1,    -1,   356,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   364,    -1,   366,    -1,    -1,   369,   370,   125,
+				-1,    -1,    -1,    -1,    37,    38,    -1,    -1,    41,    42,
+				43,    44,    45,    46,    47,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    58,    59,    60,    -1,    62,
+				63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,
+				93,    94,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,     0,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   123,   124,   125,    -1,    -1,   267,   268,   269,   270,   271,
+			   272,    -1,   274,    -1,    -1,    -1,    -1,    -1,    37,    38,
+				-1,    -1,    41,    42,    43,    44,    45,    46,    47,    -1,
+				-1,    -1,   294,   295,   296,   297,   298,    -1,    -1,    58,
+				59,    60,    61,    62,    63,    -1,    -1,    -1,    -1,    -1,
+				-1,   267,   268,   269,    -1,   271,   272,    -1,   274,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    91,    -1,    93,    94,    -1,    -1,   294,   295,
+			   296,   297,   298,    -1,   346,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   366,   124,   125,   369,   370,    -1,
+				-1,    -1,    -1,    37,    38,    -1,    -1,    -1,    42,    43,
+				-1,    45,    -1,    47,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    60,    -1,    62,    -1,
+				-1,    -1,    -1,    -1,   267,   268,   269,   270,   271,   272,
+			   366,   274,    -1,   369,   370,    -1,    -1,   280,   281,   282,
+			   283,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   291,   292,
+				94,   294,   295,   296,   297,   298,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   124,    -1,    -1,   326,   327,   328,   329,   330,   331,   332,
+			   333,   334,   335,   336,   337,   338,    -1,    -1,   341,   342,
+			   343,    -1,    -1,   346,    -1,    -1,    -1,    -1,    -1,   352,
+				 0,    -1,    -1,   356,    -1,    -1,    -1,    -1,    -1,    -1,
+				10,   364,    -1,   366,    -1,    -1,   369,   370,   267,   268,
+			   269,   270,   271,   272,    -1,   274,    -1,    -1,    -1,    -1,
+				-1,    -1,   281,   282,   283,    -1,    -1,    -1,    -1,    -1,
+				-1,    41,   291,   292,    -1,   294,   295,   296,   297,   298,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    59,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   326,   327,   328,
+			   329,   330,   331,   332,   333,   334,   335,   336,   337,   338,
+				 0,    -1,   341,   342,   343,    -1,    -1,   346,    -1,    -1,
+				10,    -1,    -1,   352,    -1,    -1,    -1,   356,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   364,    -1,   366,    -1,    -1,
+			   369,   370,    -1,    -1,    -1,   125,    -1,    37,    38,    -1,
+				-1,    41,    42,    43,    44,    45,    46,    47,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    59,
+				60,    61,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   326,    -1,    -1,    -1,    -1,   331,   332,    -1,
+				-1,    91,    -1,    93,    94,    -1,    -1,   341,   342,    -1,
+				-1,    -1,    -1,    -1,     0,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    10,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   124,   125,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    37,    38,    -1,    -1,    41,    42,    43,    44,    45,
+				46,    47,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    58,    59,    60,    -1,    62,    63,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   267,   268,   269,
+			   270,   271,   272,    -1,   274,    -1,    -1,    -1,    -1,    -1,
+				-1,   281,    -1,    -1,    -1,    91,    -1,    93,    94,    -1,
+				-1,   291,   292,    -1,   294,   295,   296,   297,   298,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   124,   125,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   267,   268,   269,
+			   270,   271,   272,    -1,   274,    -1,   366,    -1,    -1,   369,
+			   370,   281,   282,   283,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   291,   292,    -1,   294,   295,   296,   297,   298,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   326,   327,   328,   329,
+			   330,   331,   332,   333,   334,   335,   336,   337,   338,    -1,
+				-1,   341,   342,   343,    -1,    -1,   346,    -1,    -1,    -1,
+				-1,    -1,   352,     0,    -1,    -1,   356,    -1,    -1,    -1,
+				-1,    -1,    -1,    10,   364,    -1,   366,    -1,    -1,   369,
+			   370,   267,   268,   269,   270,   271,   272,    -1,   274,    -1,
+				-1,    -1,    -1,    -1,    -1,   281,   282,   283,    -1,    -1,
+				-1,    -1,    -1,    -1,    41,   291,   292,    -1,   294,   295,
+			   296,   297,   298,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    59,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   326,   327,   328,   329,   330,   331,   332,   333,   334,   335,
+			   336,   337,   338,     0,    -1,   341,   342,   343,    -1,    -1,
+			   346,    -1,    -1,    10,    -1,    -1,   352,    -1,    -1,    -1,
+			   356,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   364,    -1,
+			   366,    -1,    -1,   369,   370,    -1,    -1,    -1,   125,    -1,
+				37,    38,    -1,    -1,    41,    42,    43,    44,    45,    46,
+				47,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    58,    59,    60,    -1,    62,    63,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    91,    -1,    93,    94,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,     0,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    10,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   124,   125,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    37,    38,    -1,    -1,    41,    42,
+				43,    44,    45,    46,    47,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    58,    59,    60,    -1,    62,
+				63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   267,   268,   269,   270,   271,   272,    -1,   274,    -1,    -1,
+				-1,    -1,    -1,    -1,   281,    -1,    -1,    -1,    91,    -1,
+				93,    94,    -1,    -1,   291,   292,    -1,   294,   295,   296,
+			   297,   298,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   124,   125,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   267,   268,   269,   270,   271,   272,    -1,   274,    -1,   366,
+				-1,    -1,   369,   370,   281,   282,   283,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   291,   292,    -1,   294,   295,   296,
+			   297,   298,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   326,
+			   327,   328,   329,   330,   331,   332,   333,   334,   335,   336,
+			   337,   338,    -1,    -1,   341,   342,   343,    -1,    -1,   346,
+				-1,    -1,    -1,    -1,    -1,   352,     0,    -1,    -1,   356,
+				-1,    -1,    -1,    -1,    -1,    -1,    10,   364,    -1,   366,
+				-1,    -1,   369,   370,   267,   268,   269,   270,   271,   272,
+				-1,   274,    -1,    -1,    -1,    -1,    -1,    -1,   281,   282,
+			   283,    -1,    -1,    -1,    -1,    -1,    -1,    41,   291,   292,
+				-1,   294,   295,   296,   297,   298,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    59,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   326,   327,   328,   329,   330,   331,   332,
+			   333,   334,   335,   336,   337,   338,     0,    -1,   341,   342,
+			   343,    -1,    -1,   346,    -1,    -1,    10,    -1,    -1,   352,
+				-1,    -1,    -1,   356,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   364,    -1,   366,    -1,    -1,   369,   370,    -1,    -1,
+				-1,   125,    -1,    37,    38,    -1,    -1,    41,    42,    43,
+				44,    45,    46,    47,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    58,    59,    60,    -1,    62,    63,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    93,
+				94,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				 0,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   124,   125,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    37,    38,    -1,
+				-1,    41,    42,    43,    44,    45,    46,    47,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    59,
+				60,    -1,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   267,   268,   269,   270,   271,   272,    -1,
+			   274,    -1,    -1,    -1,    -1,    -1,    -1,   281,    -1,    -1,
+				-1,    91,    -1,    93,    94,    -1,    -1,   291,   292,    -1,
+			   294,   295,   296,   297,   298,    10,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   124,   125,    -1,    -1,    -1,    -1,
+				-1,    -1,    37,    38,    -1,    -1,    -1,    42,    43,    -1,
+				45,    -1,    47,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    60,    -1,    62,    63,    -1,
+				-1,    -1,    -1,   267,   268,   269,   270,   271,   272,    -1,
+			   274,    -1,   366,    -1,    -1,   369,   370,   281,   282,   283,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   291,   292,    94,
+			   294,   295,   296,   297,   298,    -1,    -1,    37,    38,    -1,
+				-1,    -1,    42,    43,    -1,    45,    -1,    47,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   124,
+				60,    -1,    62,   327,   328,   329,   330,   331,   332,   333,
+			   334,   335,   336,   337,   338,    -1,    -1,   341,   342,   343,
+				-1,    -1,   346,    -1,    -1,    -1,    -1,    -1,   352,    -1,
+				-1,    -1,   356,    -1,    94,    -1,    -1,    -1,    -1,    -1,
+			   364,    -1,   366,    -1,    -1,   369,   370,   267,   268,   269,
+			   270,   271,   272,    -1,   274,    -1,    -1,    -1,    -1,    -1,
+				-1,   281,   282,   283,   124,    -1,    -1,    -1,    -1,    -1,
+				-1,   291,   292,    -1,   294,   295,   296,   297,   298,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,     0,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    10,   327,   328,   329,
+			   330,   331,   332,   333,   334,   335,   336,   337,   338,    -1,
+				-1,   341,   342,   343,    -1,    -1,   346,    -1,    -1,    -1,
+				-1,    -1,   352,    37,    38,    -1,   356,    41,    42,    43,
+				44,    45,    46,    47,   364,    -1,   366,    -1,    -1,   369,
+			   370,    -1,    -1,    -1,    -1,    59,    60,    -1,    62,    63,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,     0,    91,    -1,    93,
+				94,    -1,    -1,    -1,    -1,    -1,    10,    -1,    -1,    -1,
+				-1,   326,   327,   328,   329,   330,   331,   332,   333,   334,
+			   335,   336,   337,   338,    -1,    -1,   341,   342,    -1,    -1,
+			   124,   125,    -1,    37,    38,    -1,    -1,    41,    42,    43,
+				44,    45,    46,    47,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    59,    60,    -1,    62,    63,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   326,   327,   328,   329,
+			   330,   331,   332,   333,    -1,   335,   336,    91,    -1,    93,
+				94,   341,   342,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				 0,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   124,   125,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    37,    38,    -1,
+				-1,    41,    42,    43,    44,    45,    46,    47,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    59,
+				60,    -1,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   267,   268,   269,   270,   271,   272,    -1,
+			   274,    -1,    -1,    -1,    -1,    -1,    -1,   281,   282,    -1,
+				-1,    91,    -1,    93,    94,    -1,    -1,   291,   292,    -1,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   124,   125,    -1,    -1,    -1,    -1,
+				-1,    -1,   326,   327,   328,   329,   330,   331,   332,   333,
+			   334,   335,   336,   337,   338,    -1,    -1,   341,   342,   343,
+				-1,    -1,   346,    -1,    -1,    -1,    -1,    -1,   352,    -1,
+				-1,    -1,   356,   267,   268,   269,   270,   271,   272,    -1,
+			   274,    -1,   366,    -1,    -1,   369,   370,   281,   282,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   291,   292,    -1,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   326,   327,   328,   329,   330,   331,   332,   333,
+			   334,   335,   336,   337,   338,    -1,    -1,   341,   342,   343,
+				-1,    -1,   346,    -1,    -1,    -1,    -1,    -1,   352,    -1,
+				-1,    -1,   356,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   366,    -1,    -1,   369,   370,   267,   268,   269,
+			   270,   271,   272,    -1,   274,    -1,    -1,    -1,    -1,    -1,
+				-1,   281,   282,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   291,   292,    -1,   294,   295,   296,   297,   298,    -1,
+				37,    38,    -1,    -1,    -1,    42,    43,    -1,    45,    -1,
+				47,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    60,    -1,    62,   326,   327,   328,   329,
+			   330,   331,   332,   333,   334,   335,   336,   337,   338,     0,
+				-1,   341,   342,   343,    -1,    -1,   346,    -1,    -1,    10,
+				-1,    -1,   352,    -1,    -1,    -1,   356,    94,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   366,    -1,    -1,   369,
+			   370,    -1,    -1,    -1,    -1,    -1,    37,    38,    -1,    -1,
+				41,    42,    43,    44,    45,    -1,    47,   124,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    59,    60,
+				-1,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				 0,    -1,    93,    94,    -1,    -1,    -1,    -1,    -1,    -1,
+				10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   124,   125,    -1,    -1,    37,    38,    -1,
+				-1,    41,    42,    43,    44,    45,    -1,    47,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    59,
+				60,    -1,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,     0,    -1,    93,    94,    -1,    -1,    -1,    -1,    -1,
+				-1,    10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   124,   125,    -1,    -1,    37,    38,
+				-1,    -1,    41,    42,    43,    44,    45,    -1,    47,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,
+				59,    60,    -1,    62,    63,    -1,    -1,    -1,    -1,   326,
+			   327,   328,   329,   330,   331,   332,    -1,    -1,   335,   336,
+				-1,    -1,    -1,    -1,   341,   342,   267,   268,   269,   270,
+			   271,   272,    -1,   274,    93,    94,    -1,    -1,    -1,    -1,
+			   281,   282,   283,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   291,   292,    -1,   294,   295,   296,   297,   298,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   124,   125,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   327,   328,   329,   330,
+			   331,   332,   333,   334,   335,   336,   337,   338,    -1,    -1,
+			   341,   342,     0,    -1,    -1,   346,    -1,    -1,    -1,    -1,
+				-1,   352,    10,    -1,    -1,    -1,    -1,   267,   268,   269,
+			   270,   271,   272,   364,   274,   366,    -1,    -1,   369,   370,
+				-1,   281,   282,   283,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   291,   292,    41,   294,   295,   296,   297,   298,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    59,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   327,   328,   329,
+			   330,   331,   332,   333,   334,   335,   336,   337,   338,    -1,
+				-1,   341,   342,     0,    -1,    -1,   346,    -1,    -1,    -1,
+				-1,    -1,   352,    10,    -1,    -1,    -1,    -1,   267,   268,
+			   269,   270,   271,   272,   364,   274,   366,    -1,    -1,   369,
+			   370,    -1,   281,   282,   283,    -1,    -1,   125,    -1,    -1,
+				-1,    -1,   291,   292,    41,   294,   295,   296,   297,   298,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    59,    -1,     0,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    10,    -1,    -1,    -1,   327,   328,
+			   329,   330,   331,   332,   333,   334,   335,   336,   337,   338,
+				-1,    -1,   341,   342,    -1,    -1,    -1,   346,    -1,    -1,
+				-1,    37,    38,   352,    -1,    41,    42,    43,    44,    45,
+				-1,    47,    -1,    -1,    -1,   364,    -1,   366,    -1,    -1,
+			   369,   370,    58,    59,    60,    -1,    62,    63,   125,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,     0,    -1,    93,    94,    -1,
+				-1,    -1,    -1,    -1,    -1,    10,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   267,
+			   268,   269,    -1,   271,   272,    -1,   274,    -1,   124,   125,
+				-1,    -1,    37,    38,    -1,    -1,    41,    42,    43,    44,
+				45,    -1,    47,    -1,    -1,    -1,   294,   295,   296,   297,
+			   298,    -1,    -1,    58,    59,    60,    -1,    62,    63,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,     0,    -1,    93,    94,
+				-1,    -1,    -1,    -1,    -1,    -1,    10,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   267,   268,   269,    -1,   271,   272,    -1,   274,   366,   124,
+			   125,   369,   370,    37,    38,    -1,    -1,    41,    42,    43,
+				44,    45,    -1,    47,    -1,    -1,    -1,   294,   295,   296,
+			   297,    -1,    -1,    -1,    58,    59,    60,    -1,    62,    63,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   267,   268,   269,   270,   271,   272,    -1,   274,    93,
+				94,    -1,    -1,    -1,    -1,   281,   282,   283,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   291,   292,    -1,   294,   295,
+			   296,   297,   298,    -1,    -1,    -1,    -1,    -1,    -1,   366,
+			   124,   125,   369,   370,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   327,   328,   329,   330,   331,   332,   333,   334,   335,
+			   336,   337,   338,    -1,    -1,   341,   342,    -1,    -1,    -1,
+			   346,    -1,    -1,    -1,    -1,    -1,   352,    -1,    -1,    -1,
+				-1,    -1,   267,   268,   269,   270,   271,   272,   364,   274,
+			   366,    -1,    -1,   369,   370,    -1,   281,   282,   283,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   291,   292,    -1,   294,
+			   295,   296,   297,   298,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   327,   328,   329,   330,   331,   332,   333,   334,
+			   335,   336,   337,   338,    -1,    -1,   341,   342,    -1,    -1,
+				-1,   346,    -1,    -1,    -1,    -1,    -1,   352,    -1,    -1,
+				-1,    -1,    -1,   267,   268,   269,   270,   271,   272,   364,
+			   274,   366,    -1,    -1,   369,   370,    -1,   281,   282,   283,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   291,   292,    -1,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     0,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    10,
+				-1,    -1,    -1,   327,   328,   329,   330,   331,   332,   333,
+			   334,   335,   336,   337,   338,    -1,    -1,   341,   342,    -1,
+				-1,    -1,   346,    -1,    -1,    -1,    37,    38,   352,    -1,
+				41,    42,    43,    44,    45,    -1,    47,    -1,    -1,    -1,
+			   364,    -1,   366,    -1,    -1,   369,   370,    58,    59,    60,
+				-1,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				 0,    -1,    93,    94,    -1,    -1,    -1,    -1,    -1,    -1,
+				10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   124,   125,    -1,    -1,    37,    38,    -1,
+				-1,    41,    42,    43,    44,    45,    46,    47,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    59,
+				60,    61,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    91,    -1,     0,    94,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    10,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   123,   124,   125,    -1,    -1,    -1,    -1,
+				37,    38,    -1,    -1,    41,    42,    43,    44,    45,    46,
+				47,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    59,    60,    61,    62,    63,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   267,   268,   269,   270,
+			   271,   272,    -1,   274,    91,    -1,    -1,    94,    -1,    -1,
+			   281,   282,   283,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   291,   292,    -1,   294,   295,   296,   297,   298,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   123,   124,   125,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   327,   328,   329,   330,
+			   331,   332,   333,   334,   335,   336,   337,   338,    -1,    -1,
+			   341,   342,    -1,    -1,    -1,   346,    -1,    -1,    -1,    -1,
+				-1,   352,    -1,    -1,    -1,    -1,    -1,   267,   268,   269,
+				-1,   271,   272,   364,   274,   366,    -1,    -1,   369,   370,
+			   280,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   291,   292,    -1,   294,   295,   296,   297,   298,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   326,   327,   328,   329,
+			   330,   331,   332,   333,   334,   335,   336,   337,   338,    -1,
+				-1,   341,   342,   343,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   356,    -1,    -1,    -1,
+			   267,   268,   269,    -1,   271,   272,   366,   274,    -1,   369,
+			   370,    -1,    -1,   280,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   291,   292,    -1,   294,   295,   296,
+			   297,   298,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   326,
+			   327,   328,   329,   330,   331,   332,   333,   334,   335,   336,
+			   337,   338,     0,    -1,   341,   342,   343,    -1,    -1,    -1,
+				-1,    -1,    10,    -1,    -1,    -1,    -1,    -1,    -1,   356,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   366,
+				-1,    -1,   369,   370,    -1,    -1,    -1,    -1,    -1,    37,
+				38,    -1,    -1,    41,    42,    43,    44,    45,    46,    47,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    59,    60,    61,    62,    63,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,     0,    91,    -1,    -1,    94,    -1,    -1,    -1,
+				-1,    -1,    10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   124,   125,    -1,    37,
+				38,    -1,    -1,    41,    42,    43,    44,    45,    46,    47,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    59,    60,    61,    62,    63,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    91,    -1,    -1,    94,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,     0,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    10,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   124,   125,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    37,    38,    -1,    -1,    41,    42,    43,
+				44,    45,    46,    47,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    59,    60,    61,    62,    63,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   267,
+			   268,   269,    -1,   271,   272,    -1,   274,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    -1,
+				94,    -1,    -1,   291,   292,    -1,   294,   295,   296,   297,
+			   298,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   124,   125,    -1,    -1,    -1,    -1,    -1,    -1,   326,   327,
+			   328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
+			   338,    -1,    -1,   341,   342,   343,    -1,   345,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   356,   267,
+			   268,   269,    -1,   271,   272,    -1,   274,    -1,   366,    -1,
+				-1,   369,   370,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   291,   292,    -1,   294,   295,   296,   297,
+			   298,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   326,   327,
+			   328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
+			   338,    -1,    -1,   341,   342,   343,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   356,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   366,    -1,
+				-1,   369,   370,   267,   268,   269,    -1,   271,   272,    -1,
+			   274,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   291,   292,    -1,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				 0,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				10,    -1,   326,   327,   328,   329,   330,   331,   332,   333,
+			   334,   335,   336,   337,   338,    -1,    -1,   341,   342,   343,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    38,    -1,
+				-1,    41,   356,    43,    44,    45,    -1,    -1,    -1,    -1,
+				-1,    -1,   366,    -1,    -1,   369,   370,    -1,    58,    59,
+				60,    -1,    62,    63,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,     0,    -1,    93,    94,    -1,    -1,    -1,    -1,    -1,
+				-1,    10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   124,   125,    -1,    -1,    -1,    38,
+				-1,    -1,    41,    -1,    43,    44,    45,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,
+				59,    60,    -1,    62,    63,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,     0,    -1,    93,    94,    -1,    -1,    -1,    -1,
+				-1,    -1,    10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   124,   125,    -1,    -1,    37,
+				38,    -1,    -1,    41,    42,    43,    44,    45,    46,    47,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    59,    60,    61,    62,    63,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   267,   268,   269,
+			   270,   271,   272,    91,   274,    -1,    94,    -1,    -1,    -1,
+				-1,   281,   282,   283,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   291,   292,    -1,   294,   295,   296,   297,   298,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   124,   125,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   327,   328,   329,
+			   330,   331,   332,   333,   334,   335,   336,   337,   338,    -1,
+				-1,   341,   342,    -1,    -1,    -1,   346,    -1,    -1,    -1,
+				-1,    -1,   352,    -1,    -1,    -1,    -1,    -1,   267,   268,
+			   269,   270,   271,   272,   364,   274,   366,    -1,    -1,   369,
+			   370,    -1,   281,   282,   283,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   291,   292,    -1,   294,   295,   296,   297,   298,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,     0,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    10,    -1,    -1,    -1,   327,   328,
+			   329,   330,   331,   332,   333,   334,   335,   336,   337,   338,
+				-1,    -1,   341,   342,    -1,    -1,    -1,   346,    -1,    -1,
+				-1,    -1,    38,   352,    -1,    41,    -1,    -1,    44,   267,
+			   268,   269,    -1,   271,   272,   364,   274,   366,    -1,    -1,
+			   369,   370,    58,    59,    60,    -1,    62,    63,    -1,    -1,
+				-1,    -1,    -1,   291,   292,    -1,   294,   295,   296,   297,
+			   298,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,     0,    -1,    93,    94,    -1,
+				-1,    -1,    -1,    -1,    -1,    10,    -1,    -1,   326,   327,
+			   328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
+			   338,    -1,    -1,   341,   342,   343,    -1,    -1,   124,   125,
+				-1,    -1,    -1,    38,    -1,    -1,    41,    -1,   356,    44,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   366,    -1,
+				-1,   369,   370,    58,    59,    60,    -1,    62,    63,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,     0,    -1,    93,    94,
+				-1,    -1,    -1,    -1,    -1,    -1,    10,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   124,
+			   125,    -1,    -1,    -1,    38,    -1,    -1,    41,    -1,    -1,
+				44,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    58,    59,    60,    -1,    62,    63,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   267,   268,   269,   270,   271,   272,    -1,   274,    93,
+				94,    -1,    -1,    -1,    -1,   281,   282,   283,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   291,   292,    -1,   294,   295,
+			   296,   297,   298,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   124,   125,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   327,   328,   329,   330,   331,   332,   333,   334,   335,
+			   336,   337,   338,    -1,    -1,   341,   342,    -1,    -1,    -1,
+			   346,    -1,    -1,    -1,    -1,    -1,   352,    -1,    -1,    -1,
+				-1,    -1,   267,   268,   269,   270,   271,   272,   364,   274,
+			   366,    -1,    -1,   369,   370,    -1,   281,   282,   283,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   291,   292,    -1,   294,
+			   295,   296,   297,   298,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   327,   328,   329,   330,   331,   332,   333,   334,
+			   335,   336,   337,   338,    -1,     0,   341,   342,    -1,    -1,
+				-1,   346,    -1,    -1,    -1,    10,    -1,   352,    -1,    -1,
+				-1,    -1,    -1,   267,   268,   269,   270,   271,   272,   364,
+			   274,   366,    -1,    -1,   369,   370,    -1,   281,   282,   283,
+				-1,    -1,    -1,    -1,    -1,    -1,    41,   291,   292,    44,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    58,    59,    60,    -1,    62,    63,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   327,   328,   329,   330,   331,   332,   333,
+			   334,   335,   336,   337,   338,    -1,     0,    -1,    93,    94,
+				-1,    -1,   346,    -1,    -1,    -1,    10,    -1,   352,    37,
+				38,    -1,    -1,    -1,    42,    43,    -1,    45,    -1,    47,
+			   364,    -1,   366,    -1,    -1,   369,   370,    -1,    -1,   124,
+			   125,    -1,    60,    -1,    62,    63,    -1,    41,    -1,    -1,
+				44,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    58,    59,    60,    -1,    62,    63,
+				-1,    -1,    -1,    -1,    -1,    -1,    94,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,     0,    -1,    93,
+				94,    -1,    -1,    -1,    -1,    -1,   124,    10,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   124,   125,    -1,    -1,    -1,    -1,    -1,    -1,    41,    -1,
+				-1,    44,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    58,    59,    60,    -1,    62,
+				63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   267,   268,   269,   270,   271,   272,    -1,   274,
+				93,    -1,    -1,    -1,    -1,    -1,   281,   282,   283,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   291,   292,    -1,   294,
+			   295,   296,   297,   298,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   125,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   327,   328,   329,   330,   331,   332,   333,   334,
+			   335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   346,    -1,    -1,    -1,    -1,    -1,   352,    -1,    -1,
+				-1,    -1,    -1,   267,   268,   269,   270,   271,   272,   364,
+			   274,   366,    -1,    -1,   369,   370,    -1,   281,   282,   283,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   291,   292,    -1,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,   326,   327,
+			   328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
+			   338,    -1,    -1,   341,   342,    -1,    -1,    -1,   346,    -1,
+				-1,    -1,    -1,   327,   328,   329,   330,   331,   332,   333,
+			   334,   335,   336,   337,   338,    -1,     0,    -1,    -1,    -1,
+				-1,    -1,   346,    -1,    -1,    -1,    10,    -1,   352,    -1,
+				-1,    -1,    -1,    -1,   267,   268,   269,   270,   271,   272,
+			   364,   274,   366,    -1,    -1,   369,   370,    -1,   281,   282,
+			   283,    -1,    -1,    -1,    -1,    -1,    -1,    41,   291,   292,
+				44,   294,   295,   296,   297,   298,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    58,    59,    60,    -1,    62,    63,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   327,   328,   329,   330,   331,   332,
+			   333,   334,   335,   336,   337,   338,    -1,     0,    -1,    93,
+				-1,    -1,    -1,   346,    -1,    -1,    -1,    10,    -1,   352,
+				37,    38,    -1,    -1,    -1,    42,    43,    -1,    45,    -1,
+				47,   364,    -1,   366,    -1,    -1,   369,   370,    -1,    -1,
+				-1,   125,    -1,    60,    -1,    62,    63,    -1,    41,    -1,
+				-1,    44,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    58,    59,    60,    -1,    62,
+				63,    -1,    -1,    -1,    -1,    -1,    -1,    94,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     0,    -1,
+				93,    -1,    -1,    -1,    -1,    -1,    -1,   124,    10,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   125,    -1,    -1,    -1,    -1,    -1,    -1,    41,
+				-1,    -1,    44,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    58,    59,    60,    -1,
+				62,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   267,   268,   269,   270,   271,   272,    -1,
+			   274,    93,    -1,    -1,    -1,    -1,    -1,   281,   282,   283,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   291,   292,    -1,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   125,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   327,   328,   329,   330,   331,   332,   333,
+			   334,   335,   336,   337,   338,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   346,    -1,    -1,    -1,    -1,    -1,   352,    -1,
+				-1,    -1,    -1,    -1,   267,   268,   269,   270,   271,   272,
+			   364,   274,   366,    -1,    -1,   369,   370,    -1,   281,   282,
+			   283,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   291,   292,
+				-1,   294,   295,   296,   297,   298,    -1,    -1,    -1,   326,
+			   327,   328,   329,   330,   331,   332,   333,   334,   335,   336,
+			   337,   338,    -1,    -1,   341,   342,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   327,   328,   329,   330,   331,   332,
+			   333,   334,   335,   336,   337,   338,    -1,     0,    -1,    -1,
+				-1,    -1,    -1,   346,    -1,    -1,    -1,    10,    -1,   352,
+				-1,    -1,    -1,    -1,    -1,   267,   268,   269,   270,   271,
+			   272,   364,   274,   366,    -1,    -1,   369,   370,    -1,   281,
+			   282,   283,    -1,    -1,    -1,    -1,    -1,    -1,    41,   291,
+			   292,    44,   294,   295,   296,   297,   298,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    58,    59,    -1,    -1,    -1,
+				63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   327,   328,   329,   330,   331,
+			   332,   333,   334,   335,   336,   337,   338,    -1,     0,    -1,
+				93,    -1,    -1,    -1,   346,    -1,    -1,    -1,    10,    -1,
+			   352,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   364,    -1,   366,    37,    38,   369,   370,    -1,
+				42,    43,   125,    45,    -1,    47,    -1,    -1,    -1,    41,
+				-1,    -1,    44,    -1,    -1,    -1,    -1,    -1,    60,    -1,
+				62,    63,    -1,    -1,    -1,    -1,    58,    59,    -1,    -1,
+				-1,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    94,    -1,    -1,    -1,    -1,    -1,    -1,     0,
+				-1,    93,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    10,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   124,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   125,    -1,    -1,    -1,    -1,    -1,    -1,
+				41,    -1,    -1,    44,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    59,    -1,
+				-1,    -1,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   267,   268,   269,   270,   271,   272,
+				-1,   274,    93,    -1,    -1,    -1,    -1,    -1,   281,   282,
+			   283,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   291,   292,
+				-1,   294,   295,   296,   297,   298,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   125,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   333,   334,    -1,    -1,   337,   338,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   346,    -1,    -1,    -1,    -1,    -1,   352,
+				-1,    -1,    -1,    -1,    -1,   267,   268,   269,   270,   271,
+			   272,   364,   274,   366,    -1,    -1,   369,   370,    -1,   281,
+			   282,   283,    -1,    -1,    -1,    -1,   298,    -1,    -1,   291,
+			   292,    -1,   294,   295,   296,   297,   298,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   326,   327,   328,   329,   330,   331,
+			   332,   333,   334,   335,   336,   337,   338,    -1,    -1,   341,
+			   342,   333,   334,    -1,    -1,   337,   338,    -1,     0,    -1,
+				-1,    -1,    -1,    -1,   346,    -1,    -1,    -1,    10,    -1,
+			   352,    -1,    -1,    -1,    -1,    -1,   267,   268,   269,   270,
+			   271,   272,   364,   274,   366,    -1,    -1,   369,   370,    -1,
+			   281,   282,   283,    -1,    -1,    -1,    -1,    -1,    -1,    41,
+			   291,   292,    44,   294,   295,   296,   297,   298,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    58,    59,    -1,    -1,
+				-1,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   333,   334,    -1,    -1,   337,   338,    -1,     0,
+				-1,    93,    -1,    -1,    -1,   346,    -1,    -1,    -1,    10,
+				-1,   352,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   364,    -1,   366,    -1,    -1,   369,   370,
+				-1,    -1,    -1,   125,    -1,    -1,    -1,    -1,    -1,    -1,
+				41,    -1,    -1,    44,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    59,    -1,
+				-1,    -1,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				 0,    -1,    93,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   125,    -1,    -1,    -1,    -1,    -1,
+				-1,    41,    -1,    -1,    44,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    59,
+				-1,    -1,    -1,    63,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   267,   268,   269,   270,   271,
+			   272,    -1,   274,    93,    -1,    -1,    -1,    -1,    -1,   281,
+			   282,   283,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   291,
+			   292,    -1,   294,   295,   296,   297,   298,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   125,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   333,   334,    -1,    -1,   337,   338,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   346,    -1,    -1,    -1,    -1,    -1,
+			   352,    -1,    -1,    -1,    -1,    -1,   267,   268,   269,   270,
+			   271,   272,   364,   274,   366,    -1,     0,   369,   370,    -1,
+			   281,   282,   283,    -1,    -1,    -1,    10,    -1,    -1,    -1,
+			   291,   292,    -1,   294,   295,   296,   297,   298,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    41,    -1,    -1,
+				-1,    -1,    46,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   333,   334,    -1,    59,   337,   338,    -1,     0,
+				-1,    -1,    -1,    -1,    -1,   346,    -1,    -1,    -1,    10,
+				-1,   352,    -1,    -1,    -1,    -1,    -1,   267,   268,   269,
+			   270,   271,   272,   364,   274,   366,    -1,    -1,   369,   370,
+				-1,   281,   282,   283,    -1,    -1,    -1,    -1,    -1,    -1,
+				41,   291,   292,    44,   294,   295,   296,   297,   298,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    59,    -1,
+				-1,   125,    63,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   333,   334,    -1,    -1,   337,   338,    -1,
+				 0,    -1,    93,    -1,    -1,    -1,   346,    -1,    -1,    -1,
+				10,    -1,   352,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   364,    -1,   366,    -1,    -1,   369,
+			   370,    -1,    -1,     0,   125,    -1,    -1,    -1,    -1,    -1,
+				-1,    41,    -1,    10,    44,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    59,
+				-1,    -1,    -1,    63,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    41,    -1,    -1,    44,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    58,    59,    93,    -1,    -1,    63,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   267,   268,   269,   270,   271,   272,    -1,
+			   274,    -1,    -1,    -1,    -1,   125,    93,   281,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   291,   292,    -1,
+			   294,   295,   296,   297,   298,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,     0,    -1,    -1,    -1,    -1,    -1,   125,    -1,
+				-1,    -1,    10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   267,   268,   269,   270,
+			   271,   272,    -1,   274,    -1,    -1,    -1,    -1,    -1,   343,
+			   281,   282,   283,    41,    -1,    -1,    44,    -1,    -1,    -1,
+			   291,   292,   356,   294,   295,   296,   297,   298,    -1,    -1,
+				58,    59,   366,    -1,    -1,   369,   370,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   333,   334,    -1,    93,   337,   338,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   346,    -1,    -1,    -1,    -1,
+				-1,   352,    -1,    -1,    -1,    -1,    -1,   267,   268,   269,
+			   270,   271,   272,   364,   274,   366,    -1,   125,   369,   370,
+				-1,   281,   282,   283,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   291,   292,    -1,   294,   295,   296,   297,   298,    -1,
+			   267,   268,   269,   270,   271,   272,    -1,   274,    -1,    -1,
+				-1,    -1,    -1,     0,   281,   282,   283,    -1,    -1,    -1,
+				-1,    -1,    -1,    10,   291,   292,    -1,   294,   295,   296,
+			   297,   298,    -1,    -1,   334,    -1,    -1,   337,   338,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   346,    -1,     0,    -1,
+				-1,    -1,   352,    -1,    41,    -1,    -1,    44,    10,    -1,
+				-1,    -1,    -1,    -1,   364,    -1,   366,    -1,    -1,   369,
+			   370,    58,    59,    -1,    -1,    -1,    -1,    -1,    -1,   346,
+				-1,    -1,    -1,    -1,    -1,   352,    -1,    -1,    -1,    41,
+				-1,    -1,    44,    -1,    -1,    -1,    -1,   364,    -1,   366,
+				-1,    -1,   369,   370,    -1,    -1,    93,    59,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   267,
+			   268,   269,   270,   271,   272,    -1,   274,    -1,    -1,    -1,
+				-1,    -1,    -1,   281,   282,   283,    -1,    -1,   125,    -1,
+				-1,    93,    -1,   291,   292,    -1,   294,   295,   296,   297,
+			   298,    -1,     0,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   125,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    41,    -1,    -1,    44,    -1,   346,     0,
+				-1,    -1,    -1,    -1,   352,    -1,    -1,    -1,    -1,    10,
+				-1,    59,    -1,    -1,    -1,    -1,   364,    -1,   366,    -1,
+				-1,   369,   370,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				41,    -1,    -1,    44,    -1,    93,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    59,    -1,
+				-1,    -1,     0,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    10,    -1,    -1,    -1,    -1,   125,    -1,    -1,
+			   267,   268,   269,   270,   271,   272,    -1,   274,    -1,    -1,
+				-1,    -1,    93,    -1,   281,   282,   283,    -1,    -1,    -1,
+				-1,    -1,    -1,    41,   291,   292,    44,   294,   295,   296,
+			   297,    -1,    -1,     0,    -1,   267,   268,   269,   270,   271,
+			   272,    59,   274,    10,   125,    -1,    -1,    -1,    -1,   281,
+			   282,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   291,
+			   292,    -1,   294,   295,   296,   297,   298,    -1,    -1,    -1,
+				-1,    -1,     0,    -1,    41,    93,    -1,    44,    -1,   346,
+				-1,    -1,    10,    -1,    -1,   352,    -1,    -1,    -1,    -1,
+				-1,    -1,    59,    -1,    -1,    -1,    -1,   364,    -1,   366,
+				-1,    -1,   369,   370,    -1,    -1,    -1,   125,    -1,    -1,
+				-1,    -1,    -1,    41,    -1,    -1,    44,    -1,    -1,     0,
+			   352,    -1,    -1,    -1,    -1,    -1,    93,    -1,    -1,    10,
+				-1,    59,    -1,    -1,   366,    -1,    -1,   369,   370,   267,
+			   268,   269,   270,   271,   272,    -1,   274,    -1,    -1,    -1,
+				-1,    -1,    -1,   281,   282,    -1,    -1,    -1,   125,    -1,
+				41,    -1,     0,   291,   292,    93,   294,   295,   296,   297,
+			   298,    -1,    10,    -1,    -1,    -1,    -1,    -1,    59,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   267,   268,   269,   270,
+			   271,   272,    -1,   274,    -1,    -1,    -1,   125,    -1,    -1,
+			   281,   282,    -1,    41,    -1,    -1,    44,    -1,    -1,    -1,
+			   291,   292,    93,   294,   295,   296,   297,   298,    -1,    -1,
+				-1,    59,    -1,    -1,   352,     0,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    10,    -1,    -1,   366,    -1,
+				-1,   369,   370,    -1,   125,    -1,    -1,    -1,    -1,   267,
+			   268,   269,   270,   271,   272,    93,   274,    -1,    -1,    -1,
+				-1,    -1,    -1,   281,   282,    -1,    41,    -1,    -1,    -1,
+				-1,   352,    -1,   291,   292,    -1,   294,   295,   296,   297,
+			   298,    -1,    -1,    -1,    59,   366,    -1,   125,   369,   370,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   267,   268,   269,   270,   271,   272,    -1,   274,    -1,    -1,
+				-1,    -1,    -1,    -1,   281,   282,    -1,    -1,    93,    -1,
+				-1,    -1,    -1,    -1,   291,   292,    -1,   294,   295,   296,
+			   297,   298,    -1,    -1,   352,    -1,    -1,    -1,    -1,   267,
+			   268,   269,   270,   271,   272,    -1,   274,    -1,   366,    -1,
+			   125,   369,   370,   281,   282,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   291,   292,    -1,   294,   295,   296,   297,
+			   298,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   352,   267,   268,   269,   270,
+			   271,   272,    -1,   274,    -1,    -1,    -1,    -1,    -1,   366,
+			   281,   282,   369,   370,    -1,    -1,    -1,    -1,     0,    -1,
+			   291,   292,    -1,   294,   295,   296,   297,   298,    10,    -1,
+				-1,    -1,    -1,    -1,   352,    -1,    -1,    -1,    -1,   267,
+			   268,   269,   270,   271,   272,    -1,   274,    -1,   366,    -1,
+				-1,   369,   370,   281,   282,     0,    -1,    -1,    -1,    41,
+				-1,    -1,    -1,   291,   292,    10,   294,   295,   296,   297,
+			   298,    -1,    -1,    -1,    -1,    -1,    -1,    59,    -1,    -1,
+				-1,   352,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   366,    41,    -1,   369,   370,
+				-1,    -1,   267,   268,   269,   270,   271,   272,    -1,   274,
+				-1,    93,    -1,    -1,    59,    -1,   281,   282,    -1,    -1,
+				-1,    -1,    -1,    -1,   352,    -1,   291,   292,    -1,   294,
+			   295,   296,   297,   298,    -1,     0,    -1,    -1,   366,    -1,
+				-1,   369,   370,   125,    -1,    10,    -1,    -1,    93,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    41,    -1,    -1,    -1,
+			   125,    -1,    -1,    -1,    -1,    -1,    -1,   352,    10,    -1,
+				-1,    -1,    -1,    -1,    59,    -1,    -1,    -1,    -1,    -1,
+				-1,   366,    -1,    -1,   369,   370,    -1,    -1,    -1,    -1,
+				-1,    33,    -1,    -1,    -1,    -1,    -1,    -1,    40,    -1,
+				-1,    -1,    -1,    -1,    46,    -1,    -1,    -1,    93,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    59,    60,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   125,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    91,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   267,   268,   269,   270,   271,
+			   272,    -1,   274,    -1,    -1,    -1,    -1,    -1,    -1,   281,
+			   282,   123,    -1,    -1,   126,    -1,    -1,    -1,    -1,   291,
+			   292,    -1,   294,   295,   296,   297,   298,    -1,    -1,    -1,
+				-1,    -1,   267,   268,   269,   270,   271,   272,    -1,   274,
+				-1,    -1,    -1,    -1,    -1,    -1,   281,   282,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   291,   292,    -1,   294,
+			   295,   296,   297,   298,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   366,    -1,    -1,   369,   370,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   267,   268,   269,   270,   271,   272,    -1,   274,
+				-1,    -1,    -1,    -1,    -1,    -1,   281,   282,    -1,    -1,
+				-1,   366,    -1,    -1,   369,   370,   291,   292,    -1,   294,
+			   295,   296,   297,   298,   256,   257,   258,   259,   260,   261,
+			   262,   263,   264,   265,   266,   267,   268,   269,    -1,    -1,
+			   272,   273,    -1,   275,   276,   277,   278,    -1,   280,    -1,
+				-1,    -1,   284,   285,   286,   287,   288,   289,   290,    -1,
+				-1,   293,    -1,    -1,    -1,    -1,    -1,   299,    -1,   301,
+			   302,   303,    -1,   305,   306,   307,   308,   309,   310,    -1,
+			   312,   313,   314,    -1,    -1,   317,    -1,    -1,    -1,   321,
+			   322,   366,   324,   325,   369,   370,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    10,
+				-1,   343,   344,    -1,    -1,   347,   348,    -1,   350,   351,
+				-1,   353,    -1,   355,   356,   357,   358,   359,   360,   361,
+			   362,    -1,    33,   365,   366,    -1,    -1,   369,   370,    40,
+			   372,    -1,    -1,    -1,    -1,    46,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    59,    60,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				91,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   123,    -1,    -1,   126,    10,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    33,
+				-1,    -1,    -1,    -1,    -1,    -1,    40,    -1,    -1,    -1,
+				-1,    -1,    46,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    59,    60,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   123,
+				-1,    -1,   126,    -1,    -1,    -1,    -1,    10,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   256,   257,   258,   259,   260,
+			   261,   262,   263,   264,   265,   266,   267,   268,   269,    -1,
+				33,   272,   273,    -1,   275,   276,   277,   278,    -1,   280,
+				-1,    -1,    -1,   284,   285,   286,   287,   288,   289,   290,
+				-1,    -1,   293,    -1,    -1,    -1,    59,    -1,   299,    -1,
+			   301,   302,   303,    -1,   305,   306,   307,   308,   309,   310,
+				-1,   312,   313,   314,    -1,    -1,   317,    -1,    -1,    -1,
+			   321,   322,    -1,   324,   325,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   343,   344,    -1,    -1,   347,   348,    -1,   350,
+			   351,    -1,   353,    -1,   355,   356,   357,   358,   359,   360,
+			   361,   362,    -1,   126,   365,   366,    -1,    -1,   369,   370,
+				-1,   372,   256,   257,   258,   259,   260,   261,   262,   263,
+			   264,   265,   266,   267,   268,   269,    -1,    -1,   272,   273,
+				-1,   275,   276,   277,   278,    -1,   280,    -1,    -1,    -1,
+			   284,   285,   286,   287,   288,   289,   290,    -1,    -1,   293,
+				-1,    -1,    10,    -1,    -1,   299,    -1,   301,   302,   303,
+				-1,   305,   306,   307,   308,   309,   310,    -1,   312,   313,
+			   314,    -1,    -1,   317,    -1,    33,    -1,   321,   322,    -1,
+			   324,   325,    40,    -1,    -1,    -1,    -1,    -1,    46,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   343,
+			   344,    59,    60,   347,   348,    -1,   350,   351,    -1,   353,
+				-1,   355,   356,   357,   358,   359,   360,   361,   362,    -1,
+				-1,   365,   366,    -1,    -1,   369,   370,    -1,   372,    -1,
+				-1,    -1,    -1,    91,   257,   258,   259,   260,   261,   262,
+			   263,   264,   265,   266,    -1,    -1,    -1,    -1,    -1,    -1,
+			   273,    -1,   275,   276,   277,   278,    -1,    -1,    -1,    -1,
+				-1,   284,   285,   286,   287,   288,   289,   290,   126,    10,
+			   293,    -1,    -1,    -1,    -1,    -1,   299,   300,   301,   302,
+			   303,    -1,   305,   306,   307,   308,   309,   310,    -1,   312,
+			   313,   314,    33,    -1,   317,    -1,    -1,    -1,   321,   322,
+				-1,   324,   325,    -1,    -1,    46,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    59,    60,
+				-1,   344,    -1,    -1,   347,   348,    -1,   350,   351,    -1,
+			   353,    -1,   355,    -1,   357,   358,   359,   360,   361,   362,
+				-1,    -1,   365,   366,    -1,    -1,   369,   370,    -1,   372,
+				91,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   126,    -1,    -1,    -1,    10,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   256,   257,
+			   258,   259,   260,   261,   262,   263,   264,   265,   266,   267,
+			   268,   269,    33,    -1,   272,   273,    -1,   275,   276,   277,
+			   278,    -1,    -1,    -1,    -1,    -1,   284,   285,   286,   287,
+			   288,   289,   290,    -1,    -1,   293,    -1,    -1,    59,    -1,
+				-1,   299,    -1,   301,   302,   303,    -1,   305,   306,   307,
+			   308,   309,   310,    -1,   312,   313,   314,    -1,    -1,   317,
+				-1,    -1,    -1,   321,   322,    -1,   324,   325,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   343,   344,    -1,    -1,   347,
+			   348,    -1,   350,   351,    -1,   353,    -1,   355,   356,   357,
+			   358,   359,   360,   361,   362,   126,    10,   365,   366,    -1,
+				-1,   369,   370,    -1,   372,   256,   257,   258,   259,   260,
+			   261,   262,   263,   264,   265,   266,   267,   268,   269,    33,
+				-1,   272,   273,    -1,   275,   276,   277,   278,    -1,    -1,
+				-1,    -1,    -1,   284,   285,   286,   287,   288,   289,   290,
+				-1,    -1,   293,    -1,    -1,    59,    -1,    -1,   299,    -1,
+			   301,   302,   303,    -1,   305,   306,   307,   308,   309,   310,
+				-1,   312,   313,   314,    -1,    -1,   317,    -1,    -1,    -1,
+			   321,   322,    -1,   324,   325,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   343,   344,    -1,    -1,   347,   348,    -1,   350,
+			   351,    -1,   353,    -1,   355,   356,   357,   358,   359,   360,
+			   361,   362,   126,    -1,   365,   366,    10,    -1,   369,   370,
+				-1,   372,    -1,    -1,    -1,   256,   257,   258,   259,   260,
+			   261,   262,   263,   264,   265,   266,   267,   268,   269,    33,
+			   271,   272,   273,   274,   275,   276,   277,   278,    -1,    -1,
+				-1,    -1,    -1,   284,   285,   286,   287,   288,   289,   290,
+				-1,    -1,   293,    -1,    -1,    59,    -1,    -1,   299,    -1,
+			   301,   302,   303,    -1,   305,   306,   307,   308,   309,   310,
+				-1,   312,   313,   314,    -1,    -1,   317,    -1,    -1,    -1,
+			   321,   322,    -1,   324,   325,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   344,    -1,    -1,   347,   348,    -1,   350,
+			   351,    -1,   353,    -1,   355,    -1,   357,   358,   359,   360,
+			   361,   362,   126,    -1,   365,   366,    -1,    -1,   369,   370,
+				-1,   372,   256,   257,   258,   259,   260,   261,   262,   263,
+			   264,   265,   266,   267,   268,   269,    -1,    -1,   272,   273,
+				-1,   275,   276,   277,   278,    -1,    -1,    -1,    -1,    -1,
+			   284,   285,   286,   287,   288,   289,   290,    -1,    -1,   293,
+				-1,    -1,    10,    -1,    -1,   299,    -1,   301,   302,   303,
+				-1,   305,   306,   307,   308,   309,   310,    -1,   312,   313,
+			   314,    -1,    -1,   317,    -1,    33,    -1,   321,   322,    -1,
+			   324,   325,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   344,    59,    -1,   347,   348,    -1,   350,   351,    -1,   353,
+				-1,   355,    -1,   357,   358,   359,   360,   361,   362,    -1,
+				-1,   365,   366,    -1,    -1,   369,   370,    -1,   372,    -1,
+				-1,    -1,   256,   257,   258,   259,   260,   261,   262,   263,
+			   264,   265,   266,    -1,    -1,   269,    -1,    -1,    -1,   273,
+				-1,   275,   276,   277,   278,    -1,    -1,    -1,    -1,    -1,
+			   284,   285,   286,   287,   288,   289,   290,   125,   126,   293,
+				-1,    -1,    10,    -1,    -1,   299,    -1,   301,   302,   303,
+				-1,   305,   306,   307,   308,   309,   310,    -1,   312,   313,
+			   314,    -1,    -1,   317,    -1,    33,    -1,   321,   322,    -1,
+			   324,   325,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   344,    59,    -1,   347,   348,    -1,   350,   351,    -1,   353,
+				-1,   355,    -1,   357,   358,   359,   360,   361,   362,    -1,
+				-1,   365,   366,    -1,    -1,   369,   370,    -1,   372,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   126,    -1,
+				10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   256,   257,
+			   258,   259,   260,   261,   262,   263,   264,   265,   266,    -1,
+				-1,    -1,    -1,    33,    -1,   273,    -1,   275,   276,   277,
+			   278,    41,    -1,    -1,    -1,    -1,   284,   285,   286,   287,
+			   288,   289,   290,    -1,    -1,   293,    -1,    -1,    -1,    -1,
+				-1,   299,    -1,   301,   302,   303,    -1,   305,   306,   307,
+			   308,   309,   310,    -1,   312,   313,   314,    -1,    -1,   317,
+				-1,    -1,    -1,   321,   322,    -1,   324,   325,    -1,    -1,
+				-1,    -1,    -1,    93,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   344,    -1,    -1,   347,
+			   348,    -1,   350,   351,    -1,   353,    -1,   355,    -1,   357,
+			   358,   359,   360,   361,   362,    -1,   126,   365,   366,    -1,
+				10,   369,   370,    -1,   372,    -1,    -1,    -1,    -1,   257,
+			   258,   259,   260,   261,   262,   263,   264,   265,   266,    -1,
+				-1,    -1,    -1,    33,    -1,   273,    -1,   275,   276,   277,
+			   278,    41,    -1,    -1,    -1,    -1,   284,   285,   286,   287,
+			   288,   289,   290,    -1,    -1,   293,    -1,    -1,    -1,    -1,
+				-1,   299,    -1,   301,   302,   303,    -1,   305,   306,   307,
+			   308,   309,   310,    -1,   312,   313,   314,    -1,    -1,   317,
+				-1,    -1,    -1,   321,   322,    -1,   324,   325,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   344,    -1,    -1,   347,
+			   348,    -1,   350,   351,    -1,   353,    -1,   355,    -1,   357,
+			   358,   359,   360,   361,   362,    -1,   126,   365,   366,    -1,
+				-1,   369,   370,    -1,   372,    -1,    -1,   257,   258,   259,
+			   260,   261,   262,   263,   264,   265,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   273,    10,   275,   276,   277,   278,    -1,
+				-1,    -1,    -1,    -1,   284,   285,   286,   287,   288,   289,
+			   290,    -1,    -1,   293,    -1,    -1,    -1,    33,    -1,    -1,
+				-1,    -1,   302,   303,    -1,   305,   306,   307,   308,   309,
+			   310,   311,   312,   313,   314,    -1,    -1,   317,    -1,    -1,
+			   320,   321,   322,    59,   324,   325,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   344,    -1,    -1,   347,   348,    -1,
+			   350,   351,    -1,   353,   354,   355,    -1,   357,   358,   359,
+			   360,   361,   362,    -1,    -1,   365,    -1,    -1,    -1,    -1,
+				-1,    -1,   372,    -1,    -1,    -1,    -1,   257,   258,   259,
+			   260,   261,   262,   263,   264,   265,   266,    -1,    -1,    -1,
+			   126,    10,    -1,   273,    -1,   275,   276,   277,   278,    -1,
+				-1,    -1,    -1,    -1,   284,   285,   286,   287,   288,   289,
+			   290,    -1,    -1,   293,    33,    -1,    -1,    -1,    -1,   299,
+				-1,   301,   302,   303,    -1,   305,   306,   307,   308,   309,
+			   310,    -1,   312,   313,   314,    -1,    -1,   317,    -1,    -1,
+				-1,   321,   322,    -1,   324,   325,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   344,    -1,    -1,   347,   348,    -1,
+			   350,   351,    -1,   353,    -1,   355,    -1,   357,   358,   359,
+			   360,   361,   362,    -1,    -1,   365,    -1,    -1,    -1,    -1,
+				-1,    -1,   372,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   126,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   257,   258,   259,   260,   261,   262,   263,   264,   265,
+				-1,    -1,    -1,    -1,    33,    -1,    -1,   273,    -1,   275,
+			   276,   277,   278,    -1,    -1,    -1,    -1,    -1,   284,   285,
+			   286,   287,   288,   289,   290,    -1,    -1,   293,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   302,   303,    -1,   305,
+			   306,   307,   308,   309,   310,    -1,   312,   313,   314,    -1,
+				-1,   317,    -1,    -1,    -1,   321,   322,    -1,   324,   325,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   344,    -1,
+				-1,   347,   348,    -1,   350,   351,    -1,    -1,    -1,   355,
+				-1,   357,   358,   359,   360,   361,   362,   126,    -1,   365,
+			   366,    -1,    -1,   369,   370,    -1,   372,    -1,   257,   258,
+			   259,   260,   261,   262,   263,   264,   265,    -1,    -1,    -1,
+				-1,    -1,    33,    -1,   273,    -1,   275,   276,   277,   278,
+				-1,    -1,    -1,    -1,    -1,   284,   285,   286,   287,   288,
+			   289,   290,    -1,    -1,   293,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   302,   303,    -1,   305,   306,   307,   308,
+			   309,   310,    -1,   312,   313,   314,    -1,    -1,   317,    -1,
+				-1,    -1,   321,   322,    -1,   324,   325,    -1,    -1,    -1,
+				-1,    -1,    93,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   344,    -1,    -1,   347,   348,
+				-1,   350,   351,    -1,    -1,    -1,   355,    -1,   357,   358,
+			   359,   360,   361,   362,   125,   126,   365,    -1,    -1,    -1,
+				-1,    -1,    -1,   372,    -1,    -1,    -1,   256,   257,   258,
+			   259,   260,   261,   262,   263,   264,   265,   266,    -1,    -1,
+				-1,    33,    -1,    -1,   273,    -1,   275,   276,   277,   278,
+				-1,    -1,    -1,    -1,    -1,   284,   285,   286,   287,   288,
+			   289,   290,    -1,    -1,   293,    -1,    -1,    -1,    -1,    -1,
+			   299,   300,   301,   302,   303,    -1,   305,   306,   307,   308,
+			   309,   310,    -1,   312,   313,   314,    -1,    -1,   317,    -1,
+				-1,    -1,   321,   322,    -1,   324,   325,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   344,    -1,    -1,   347,   348,
+				-1,   350,   351,    -1,   353,    -1,   355,    -1,   357,   358,
+			   359,   360,   361,   362,   126,    -1,   365,    -1,    -1,    -1,
+				-1,    -1,    -1,   372,    -1,    -1,   257,   258,   259,   260,
+			   261,   262,   263,   264,   265,    -1,    -1,    -1,    -1,    33,
+				-1,    -1,   273,    -1,   275,   276,   277,   278,    -1,    -1,
+				-1,    -1,    -1,   284,   285,   286,   287,   288,   289,   290,
+				-1,    -1,   293,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   302,   303,    -1,   305,   306,   307,   308,   309,   310,
+			   311,   312,   313,   314,    -1,    -1,   317,    -1,    -1,   320,
+			   321,   322,    -1,   324,   325,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   344,    -1,    -1,   347,   348,    -1,   350,
+			   351,    -1,   353,   354,   355,    -1,   357,   358,   359,   360,
+			   361,   362,   126,    -1,   365,    -1,    -1,    -1,    -1,    -1,
+				-1,   372,    -1,    -1,    -1,   257,   258,   259,   260,   261,
+			   262,   263,   264,   265,   266,    -1,    -1,    -1,    33,    -1,
+				-1,   273,    -1,   275,   276,   277,   278,    -1,    -1,    -1,
+				-1,    -1,   284,   285,   286,   287,   288,   289,   290,    -1,
+				-1,   293,    -1,    -1,    -1,    -1,    -1,   299,   300,   301,
+			   302,   303,    -1,   305,   306,   307,   308,   309,   310,    -1,
+			   312,   313,   314,    -1,    -1,   317,    -1,    -1,    -1,   321,
+			   322,    -1,   324,   325,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   344,    -1,    -1,   347,   348,    -1,   350,   351,
+				-1,   353,    -1,   355,    -1,   357,   358,   359,   360,   361,
+			   362,   126,    -1,   365,    -1,    -1,    -1,    -1,    -1,    -1,
+			   372,    -1,   256,   257,   258,   259,   260,   261,   262,   263,
+			   264,   265,   266,    -1,    -1,    -1,    33,    -1,    -1,   273,
+				-1,   275,   276,   277,   278,    -1,    -1,    -1,    -1,    -1,
+			   284,   285,   286,   287,   288,   289,   290,    -1,    -1,   293,
+				-1,    -1,    -1,    -1,    -1,   299,    -1,   301,   302,   303,
+				-1,   305,   306,   307,   308,   309,   310,    -1,   312,   313,
+			   314,    -1,    -1,   317,    -1,    -1,    -1,   321,   322,    -1,
+			   324,   325,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   344,    -1,    -1,   347,   348,    -1,   350,   351,    -1,   353,
+				-1,   355,    -1,   357,   358,   359,   360,   361,   362,   126,
+				-1,   365,    -1,    -1,    -1,    -1,    -1,    -1,   372,    -1,
+				-1,   256,   257,   258,   259,   260,   261,   262,   263,   264,
+			   265,   266,    -1,    -1,    -1,    33,    -1,    -1,   273,    -1,
+			   275,   276,   277,   278,    -1,    -1,    -1,    -1,    -1,   284,
+			   285,   286,   287,   288,   289,   290,    -1,    -1,   293,    -1,
+				-1,    -1,    -1,    -1,   299,    -1,   301,   302,   303,    -1,
+			   305,   306,   307,   308,   309,   310,    -1,   312,   313,   314,
+				-1,    -1,   317,    -1,    -1,    -1,   321,   322,    -1,   324,
+			   325,    -1,    -1,    -1,    -1,    93,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   344,
+				-1,    -1,   347,   348,    -1,   350,   351,    -1,   353,    -1,
+			   355,    -1,   357,   358,   359,   360,   361,   362,   126,    -1,
+			   365,    -1,    -1,    -1,    -1,    -1,    -1,   372,    -1,    -1,
+			   257,   258,   259,   260,   261,   262,   263,   264,   265,    -1,
+				-1,    -1,    -1,    33,    -1,    -1,   273,    -1,   275,   276,
+			   277,   278,    -1,    -1,    -1,    -1,    -1,   284,   285,   286,
+			   287,   288,   289,   290,    -1,    -1,   293,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   302,   303,    -1,   305,   306,
+			   307,   308,   309,   310,   311,   312,   313,   314,    -1,    -1,
+			   317,    -1,    -1,   320,   321,   322,    -1,   324,   325,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   344,    -1,    -1,
+			   347,   348,    -1,   350,   351,    -1,    -1,    -1,   355,    -1,
+			   357,   358,   359,   360,   361,   362,   126,    -1,   365,   366,
+				-1,    -1,   369,   370,    -1,   372,    -1,    -1,    -1,   257,
+			   258,   259,   260,   261,   262,   263,   264,   265,    -1,    -1,
+				-1,    -1,    33,    -1,    -1,   273,    -1,   275,   276,   277,
+			   278,    -1,    -1,    -1,    -1,    -1,   284,   285,   286,   287,
+			   288,   289,   290,    -1,    -1,   293,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   302,   303,    -1,   305,   306,   307,
+			   308,   309,   310,   311,   312,   313,   314,    -1,    -1,   317,
+				-1,    -1,   320,   321,   322,    -1,   324,   325,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   344,    -1,    -1,   347,
+			   348,    -1,   350,   351,    -1,   353,   354,   355,    -1,   357,
+			   358,   359,   360,   361,   362,   126,    -1,   365,    -1,    -1,
+				-1,    -1,    -1,    -1,   372,    -1,    -1,   257,   258,   259,
+			   260,   261,   262,   263,   264,   265,    -1,    -1,    -1,    -1,
+				33,    -1,    -1,   273,    -1,   275,   276,   277,   278,    -1,
+				-1,    -1,    -1,    -1,   284,   285,   286,   287,   288,   289,
+			   290,    -1,    -1,   293,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   302,   303,    -1,   305,   306,   307,   308,   309,
+			   310,   311,   312,   313,   314,    -1,    -1,   317,    -1,    -1,
+			   320,   321,   322,    -1,   324,   325,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   344,    -1,    -1,   347,   348,    -1,
+			   350,   351,    -1,   353,   354,   355,    -1,   357,   358,   359,
+			   360,   361,   362,   126,    -1,   365,    -1,    -1,    -1,    -1,
+				-1,    -1,   372,    -1,    -1,    -1,   257,   258,   259,   260,
+			   261,   262,   263,   264,   265,   266,    -1,    -1,    -1,    33,
+				-1,    -1,   273,    -1,   275,   276,   277,   278,    -1,    -1,
+				-1,    -1,    -1,   284,   285,   286,   287,   288,   289,   290,
+				-1,    -1,   293,    -1,    -1,    -1,    -1,    -1,   299,    -1,
+			   301,   302,   303,    -1,   305,   306,   307,   308,   309,   310,
+				-1,   312,   313,   314,    -1,    -1,   317,    -1,    -1,    -1,
+			   321,   322,    -1,   324,   325,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   344,    -1,    -1,   347,   348,    -1,   350,
+			   351,    -1,   353,    -1,   355,    -1,   357,   358,   359,   360,
+			   361,   362,   126,    -1,   365,    -1,    -1,    -1,    -1,    -1,
+				-1,   372,    -1,    -1,   257,   258,   259,   260,   261,   262,
+			   263,   264,   265,    -1,    -1,    -1,    -1,    33,    -1,    -1,
+			   273,    -1,   275,   276,   277,   278,    -1,    -1,    -1,    -1,
+				-1,   284,   285,   286,   287,   288,   289,   290,    -1,    -1,
+			   293,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   302,
+			   303,    -1,   305,   306,   307,   308,   309,   310,   311,   312,
+			   313,   314,    -1,    -1,   317,    -1,    -1,   320,   321,   322,
+				-1,   324,   325,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   344,    -1,    -1,   347,   348,    -1,   350,   351,    -1,
+			   353,   354,   355,    -1,   357,   358,   359,   360,   361,   362,
+			   126,    -1,   365,    -1,    -1,    -1,    -1,    -1,    -1,   372,
+				-1,    -1,    -1,   257,   258,   259,   260,   261,   262,   263,
+			   264,   265,    -1,    -1,    -1,    -1,    33,    -1,    -1,   273,
+				-1,   275,   276,   277,   278,    -1,    -1,    -1,    -1,    -1,
+			   284,   285,   286,   287,   288,   289,   290,    -1,    -1,   293,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   302,   303,
+				-1,   305,   306,   307,   308,   309,   310,   311,   312,   313,
+			   314,    -1,    -1,   317,    -1,    -1,   320,   321,   322,    -1,
+			   324,   325,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   344,    -1,    -1,   347,   348,    -1,   350,   351,    -1,   353,
+			   354,   355,    -1,   357,   358,   359,   360,   361,   362,   126,
+				-1,   365,    -1,    -1,    -1,    -1,    -1,    -1,   372,    -1,
+				-1,   257,   258,   259,   260,   261,   262,   263,   264,   265,
+				-1,    -1,    -1,    -1,    33,    -1,    -1,   273,    -1,   275,
+			   276,   277,   278,    -1,    -1,    -1,    -1,    -1,   284,   285,
+			   286,   287,   288,   289,   290,    -1,    -1,   293,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   302,   303,    -1,   305,
+			   306,   307,   308,   309,   310,   311,   312,   313,   314,    -1,
+				-1,   317,    -1,    -1,   320,   321,   322,    -1,   324,   325,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   344,    -1,
+				-1,   347,   348,    -1,   350,   351,    -1,   353,    -1,   355,
+				-1,   357,   358,   359,   360,   361,   362,   126,    -1,   365,
+				-1,    -1,    -1,    -1,    -1,    -1,   372,    -1,    -1,    -1,
+			   257,   258,   259,   260,   261,   262,   263,   264,   265,    -1,
+				-1,    -1,    -1,    33,    -1,    -1,   273,    -1,   275,   276,
+			   277,   278,    -1,    -1,    -1,    -1,    -1,   284,   285,   286,
+			   287,   288,   289,   290,    -1,    -1,   293,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   302,   303,    -1,   305,   306,
+			   307,   308,   309,   310,   311,   312,   313,   314,    -1,    -1,
+			   317,    -1,    -1,   320,   321,   322,    -1,   324,   325,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   344,    -1,    -1,
+			   347,   348,    -1,   350,   351,    -1,   353,    -1,   355,    -1,
+			   357,   358,   359,   360,   361,   362,   126,    -1,   365,    -1,
+				-1,    -1,    -1,    -1,    -1,   372,    -1,    -1,   257,   258,
+			   259,   260,   261,   262,   263,   264,   265,    -1,    -1,    -1,
+				-1,    33,    -1,    -1,   273,    -1,   275,   276,   277,   278,
+				-1,    -1,    -1,    -1,    -1,   284,   285,   286,   287,   288,
+			   289,   290,    -1,    -1,   293,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   302,   303,    -1,   305,   306,   307,   308,
+			   309,   310,   311,   312,   313,   314,    -1,    -1,   317,    -1,
+				-1,   320,   321,   322,    -1,   324,   325,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   344,    -1,    -1,   347,   348,
+				-1,   350,   351,    -1,    -1,    -1,   355,    -1,   357,   358,
+			   359,   360,   361,   362,   126,    -1,   365,    -1,    -1,    -1,
+				-1,    -1,    -1,   372,    -1,    -1,    -1,   257,   258,   259,
+			   260,   261,   262,   263,   264,   265,    -1,    -1,    -1,    -1,
+				33,    -1,    -1,   273,    -1,   275,   276,   277,   278,    -1,
+				-1,    -1,    -1,    -1,   284,   285,   286,   287,   288,   289,
+			   290,    -1,    -1,   293,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   302,   303,    -1,   305,   306,   307,   308,   309,
+			   310,    -1,   312,   313,   314,    -1,    -1,   317,    -1,    -1,
+				-1,   321,   322,    -1,   324,   325,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   344,    -1,    -1,   347,   348,    -1,
+			   350,   351,    -1,   353,    -1,   355,    -1,   357,   358,   359,
+			   360,   361,   362,   126,    -1,   365,    -1,    -1,    -1,    -1,
+				-1,    -1,   372,    -1,    -1,   257,   258,   259,   260,   261,
+			   262,   263,   264,   265,    -1,    -1,    -1,    -1,    33,    -1,
+				-1,   273,    -1,   275,   276,   277,   278,    -1,    -1,    -1,
+				-1,    -1,   284,   285,   286,   287,   288,   289,   290,    -1,
+				-1,   293,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   302,   303,    -1,   305,   306,   307,   308,   309,   310,    -1,
+			   312,   313,   314,    -1,    -1,   317,    -1,    -1,    -1,   321,
+			   322,    -1,   324,   325,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   344,    -1,    -1,   347,   348,    -1,   350,   351,
+				-1,   353,    -1,   355,    -1,   357,   358,   359,   360,   361,
+			   362,   126,    -1,   365,    -1,    -1,    -1,    -1,    -1,    -1,
+			   372,    -1,    -1,    -1,   257,   258,   259,   260,   261,   262,
+			   263,   264,   265,    -1,    -1,    -1,    -1,    33,    -1,    -1,
+			   273,    -1,   275,   276,   277,   278,    -1,    -1,    -1,    -1,
+				-1,   284,   285,   286,   287,   288,   289,   290,    -1,    -1,
+			   293,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   302,
+			   303,    -1,   305,   306,   307,   308,   309,   310,    -1,   312,
+			   313,   314,    -1,    -1,   317,    -1,    -1,    -1,   321,   322,
+				-1,   324,   325,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   344,    -1,    -1,   347,   348,    -1,   350,   351,    -1,
+			   353,    -1,   355,    -1,   357,   358,   359,   360,   361,   362,
+			   126,    -1,   365,    -1,    -1,    -1,    -1,    -1,    -1,   372,
+				-1,    -1,   257,   258,   259,   260,   261,   262,   263,   264,
+			   265,    -1,    -1,    -1,    -1,    33,    -1,    -1,   273,    -1,
+			   275,   276,   277,   278,    -1,    -1,    -1,    -1,    -1,   284,
+			   285,   286,   287,   288,   289,   290,    -1,    -1,   293,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   302,   303,    -1,
+			   305,   306,   307,   308,   309,   310,    -1,   312,   313,   314,
+				-1,    -1,   317,    -1,    -1,    -1,   321,   322,    -1,   324,
+			   325,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   344,
+				-1,    -1,   347,   348,    -1,   350,   351,    -1,   353,    -1,
+			   355,    -1,   357,   358,   359,   360,   361,   362,   126,    -1,
+			   365,    -1,    -1,    -1,    -1,    -1,    -1,   372,    -1,    -1,
+				-1,   257,   258,   259,   260,   261,   262,   263,   264,   265,
+				-1,    -1,    -1,    -1,    33,    -1,    -1,   273,    -1,   275,
+			   276,   277,   278,    -1,    -1,    -1,    -1,    -1,   284,   285,
+			   286,   287,   288,   289,   290,    -1,    -1,   293,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   302,   303,    -1,   305,
+			   306,   307,   308,   309,   310,    -1,   312,   313,   314,    -1,
+				-1,   317,    -1,    -1,    -1,   321,   322,    -1,   324,   325,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   344,    -1,
+				-1,   347,   348,    -1,   350,   351,    -1,   353,    -1,   355,
+				-1,   357,   358,   359,   360,   361,   362,   126,    -1,   365,
+				-1,    -1,    -1,    -1,    -1,    -1,   372,    -1,    -1,   257,
+			   258,   259,   260,   261,   262,   263,   264,   265,    -1,    -1,
+				-1,    -1,    33,    -1,    -1,   273,    -1,   275,   276,   277,
+			   278,    -1,    -1,    -1,    -1,    -1,   284,   285,   286,   287,
+			   288,   289,   290,    -1,    -1,   293,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   302,   303,    -1,   305,   306,   307,
+			   308,   309,   310,    -1,   312,   313,   314,    -1,    -1,   317,
+				-1,    -1,    -1,   321,   322,    -1,   324,   325,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   344,    -1,    -1,   347,
+			   348,    -1,   350,   351,    -1,    -1,    -1,   355,    -1,   357,
+			   358,   359,   360,   361,   362,   126,    -1,   365,    -1,    -1,
+				-1,    -1,    -1,    -1,   372,    -1,    -1,    -1,   257,   258,
+			   259,   260,   261,   262,   263,   264,   265,    -1,    -1,    -1,
+				-1,    33,    -1,    -1,   273,    -1,   275,   276,   277,   278,
+				-1,    -1,    -1,    -1,    -1,   284,   285,   286,   287,   288,
+			   289,   290,    -1,    -1,   293,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   302,   303,    -1,   305,   306,   307,   308,
+			   309,   310,    -1,   312,   313,   314,    -1,    -1,   317,    -1,
+				-1,    -1,   321,   322,    -1,   324,   325,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   344,    -1,    -1,   347,   348,
+				-1,   350,   351,    -1,    -1,    -1,   355,    -1,   357,   358,
+			   359,   360,   361,   362,   126,    -1,   365,    -1,    -1,    -1,
+				-1,    -1,    -1,   372,    -1,    -1,   257,   258,   259,   260,
+			   261,   262,   263,   264,   265,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   273,    -1,   275,   276,   277,   278,    -1,    -1,
+				-1,    -1,    -1,   284,   285,   286,   287,   288,   289,   290,
+				-1,    -1,   293,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   302,   303,    -1,   305,   306,   307,   308,   309,   310,
+				-1,   312,   313,   314,    -1,    -1,   317,    -1,    -1,    -1,
+			   321,   322,    -1,   324,   325,    -1,    33,    -1,    -1,    -1,
+				37,    38,    -1,    -1,    -1,    42,    43,    -1,    45,    -1,
+				47,    -1,    -1,   344,    -1,    -1,   347,   348,    -1,   350,
+			   351,    -1,    -1,    60,   355,    62,   357,   358,   359,   360,
+			   361,   362,    -1,    -1,   365,    -1,    -1,    -1,    -1,    -1,
+				-1,   372,    -1,    -1,    -1,   257,   258,   259,   260,   261,
+			   262,   263,   264,   265,    -1,    -1,    -1,    94,    -1,    96,
+				-1,   273,    -1,   275,   276,   277,   278,    -1,    -1,    -1,
+				-1,    -1,   284,   285,   286,   287,   288,   289,   290,    -1,
+				-1,   293,    -1,    -1,    -1,    -1,    -1,   124,    -1,   126,
+			   302,   303,    -1,   305,   306,   307,   308,   309,   310,    -1,
+			   312,   313,   314,    -1,    -1,   317,    -1,    -1,    -1,   321,
+			   322,    -1,   324,   325,    -1,    33,    -1,    -1,    -1,    37,
+				38,    -1,    -1,    -1,    42,    43,    -1,    45,    -1,    47,
+				-1,    -1,   344,    -1,    -1,   347,   348,    -1,   350,   351,
+				-1,    -1,    60,   355,    62,   357,   358,   359,   360,   361,
+			   362,    -1,    -1,   365,    -1,    -1,    -1,    -1,    -1,    -1,
+			   372,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    94,    -1,    96,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   124,    -1,   126,    -1,
+				-1,    -1,    -1,    44,    -1,    -1,    -1,    -1,    -1,    -1,
+			   257,   258,   259,   260,   261,   262,   263,   264,   265,   266,
+			   267,   268,   269,   270,   271,   272,   273,   274,   275,   276,
+			   277,   278,   279,   280,    -1,    -1,    -1,   284,   285,   286,
+			   287,   288,   289,   290,   291,   292,   293,    -1,    -1,    -1,
+				-1,    -1,   299,   300,   301,   302,   303,   304,   305,   306,
+			   307,   308,   309,   310,    -1,    -1,    -1,    -1,    -1,    -1,
+			   317,    -1,    -1,    -1,    -1,    -1,    -1,   324,   325,   326,
+			   327,   328,   329,   330,   331,   332,    -1,    -1,   335,   336,
+				-1,    -1,   339,   340,   341,   342,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   353,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   361,    -1,    -1,    -1,    -1,    44,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   257,
+			   258,   259,   260,   261,   262,   263,   264,   265,   266,   267,
+			   268,   269,   270,   271,   272,   273,   274,   275,   276,   277,
+			   278,   279,   280,    -1,    -1,    -1,   284,   285,   286,   287,
+			   288,   289,   290,   291,   292,   293,    -1,    -1,    -1,    -1,
+				-1,   299,   300,   301,   302,   303,   304,   305,   306,   307,
+			   308,   309,   310,    -1,    -1,    -1,    -1,    -1,    -1,   317,
+				-1,    -1,    -1,    -1,    -1,    -1,   324,   325,   326,   327,
+			   328,   329,   330,   331,   332,    -1,    -1,   335,   336,    -1,
+				-1,   339,   340,   341,   342,    -1,   257,   258,   259,   260,
+			   261,   262,   263,   264,   265,   353,    -1,    -1,    -1,    -1,
+				-1,    -1,   273,   361,   275,   276,   277,   278,    -1,    -1,
+				-1,    -1,    -1,   284,   285,   286,   287,   288,   289,   290,
+				-1,    -1,   293,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   302,   303,    -1,   305,   306,   307,   308,   309,   310,
+				-1,   312,   313,   314,    -1,    -1,   317,    -1,    -1,    -1,
+			   321,   322,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   344,    -1,    -1,   347,   348,    -1,   350,
+			   351,    -1,    -1,    -1,   355,    -1,   357,   358,   359,   360,
+			   361,   362,    -1,    -1,   365,    -1,    -1,    -1,    -1,    -1,
+				-1,   372,   257,   258,   259,   260,   261,   262,   263,   264,
+			   265,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   273,    -1,
+			   275,   276,   277,   278,    -1,    -1,    -1,    -1,    -1,   284,
+			   285,   286,   287,   288,   289,   290,    -1,    -1,   293,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   302,   303,    -1,
+			   305,   306,   307,   308,   309,   310,    -1,   312,   313,   314,
+				-1,    -1,   317,    -1,    -1,    -1,   321,   322,    -1,    -1,
+				33,    -1,    -1,    -1,    37,    38,    -1,    -1,    -1,    42,
+				43,    -1,    45,    -1,    47,    -1,    -1,    -1,    -1,   344,
+				-1,    -1,   347,   348,    -1,   350,   351,    60,    -1,    62,
+			   355,    -1,   357,   358,   359,   360,   361,   362,    -1,    -1,
+			   365,    -1,    -1,    -1,    -1,    -1,    -1,   372,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    94,    -1,    96,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   124,    -1,   126,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    33,    -1,    -1,    -1,    37,    38,    -1,    40,    -1,
+				42,    43,    -1,    45,    -1,    47,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    60,    -1,
+				62,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    94,    -1,    96,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   124,    -1,   126,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   257,   258,   259,   260,   261,   262,
+			   263,   264,   265,   266,   267,   268,   269,   270,   271,   272,
+			   273,   274,   275,   276,   277,   278,   279,   280,    -1,    -1,
+				-1,   284,   285,   286,   287,   288,   289,   290,   291,   292,
+			   293,    -1,    -1,    -1,    -1,    -1,   299,   300,   301,   302,
+			   303,   304,   305,   306,    -1,    -1,   309,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   324,   325,   326,   327,   328,   329,   330,   331,   332,
+				-1,    -1,   335,   336,    -1,    -1,   339,   340,   341,   342,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   353,    -1,    -1,    -1,   357,   257,   258,   259,   260,   261,
+			   262,   263,   264,   265,   266,   267,   268,   269,   270,   271,
+			   272,   273,   274,   275,   276,   277,   278,   279,   280,    -1,
+				-1,    -1,   284,   285,   286,   287,   288,   289,   290,   291,
+			   292,   293,    -1,    -1,    -1,    -1,    -1,   299,   300,   301,
+			   302,   303,   304,   305,   306,   307,   308,   309,   310,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   324,   325,   326,   327,   328,   329,   330,   331,
+			   332,    -1,    -1,   335,   336,    -1,    -1,   339,   340,   341,
+			   342,    -1,    -1,    33,    -1,    -1,    -1,    37,    38,    -1,
+				-1,   353,    42,    43,    -1,    45,    -1,    47,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				60,    -1,    62,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    33,    -1,    -1,    -1,    37,    38,    -1,    40,    -1,
+				42,    43,    -1,    45,    -1,    47,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    94,    -1,    96,    -1,    60,    -1,
+				62,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    33,
+				-1,    -1,    -1,    37,    38,    -1,    40,    -1,    42,    43,
+				-1,    45,    -1,    47,   124,    -1,   126,    -1,    -1,    -1,
+				-1,    -1,    94,    -1,    96,    -1,    60,    -1,    62,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    33,    -1,    -1,
+				-1,    37,    38,    -1,    40,    -1,    42,    43,    -1,    45,
+				-1,    47,   124,    -1,   126,    -1,    -1,    -1,    -1,    -1,
+				94,    -1,    96,    -1,    60,    -1,    62,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   124,    -1,   126,    -1,    -1,    -1,    -1,    -1,    94,    -1,
+				96,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				33,    -1,    -1,    -1,    37,    38,    -1,    40,    -1,    42,
+				43,    -1,    45,    -1,    47,    -1,    -1,    -1,   124,    -1,
+			   126,    -1,    -1,    -1,    -1,    -1,    -1,    60,    -1,    62,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   257,   258,   259,
+			   260,   261,   262,   263,   264,   265,   266,   267,   268,   269,
+			   270,   271,   272,   273,   274,   275,   276,   277,   278,   279,
+			   280,    94,    -1,    96,   284,   285,   286,   287,   288,   289,
+			   290,   291,   292,   293,    -1,    -1,    -1,    -1,    -1,   299,
+			   300,   301,   302,   303,   304,   305,   306,    -1,    -1,   309,
+				-1,   124,    -1,   126,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   324,   325,   326,   327,   328,   329,
+			   330,   331,   332,    -1,    -1,   335,   336,    -1,    -1,   339,
+			   340,   341,   342,   305,   306,    -1,    -1,   309,    -1,    -1,
+				-1,    -1,    -1,   353,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   324,   325,   326,   327,   328,   329,   330,   331,
+			   332,    -1,    -1,   335,   336,    -1,    -1,   339,   340,   341,
+			   342,   305,   306,    -1,    -1,   309,    -1,    -1,    -1,    -1,
+				-1,   353,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   324,   325,   326,   327,   328,   329,   330,   331,   332,    -1,
+				-1,   335,   336,    -1,    -1,   339,   340,   341,   342,   305,
+			   306,    -1,    -1,   309,    -1,    -1,    -1,    -1,    -1,   353,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   324,   325,
+			   326,   327,   328,   329,   330,   331,   332,    -1,    -1,   335,
+			   336,    -1,    -1,   339,   340,   341,   342,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   353,    -1,    -1,
+				33,    -1,    -1,    -1,    37,    38,    -1,    40,    -1,    42,
+				43,    -1,    45,    -1,    47,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   305,   306,    -1,    -1,   309,    60,    -1,    62,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   324,   325,   326,   327,   328,   329,   330,   331,   332,
+				-1,    -1,   335,   336,    -1,    -1,   339,   340,   341,   342,
+				-1,    94,    -1,    96,    -1,    -1,    -1,    33,    -1,    -1,
+			   353,    37,    38,    -1,    40,    -1,    42,    43,    -1,    45,
+				-1,    47,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   124,    -1,   126,    60,    -1,    62,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    33,    -1,    -1,    -1,    37,
+				38,    -1,    40,    -1,    42,    43,    -1,    45,    -1,    47,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    94,    -1,
+				96,    -1,    60,    -1,    62,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    33,    -1,    -1,    -1,    37,    38,    -1,
+				40,    -1,    42,    43,    -1,    45,    -1,    47,   124,    -1,
+			   126,    -1,    -1,    -1,    -1,    -1,    94,    -1,    96,    -1,
+				60,    -1,    62,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   124,    -1,   126,    -1,
+				-1,    -1,    -1,    -1,    94,    -1,    96,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    33,
+				-1,    -1,    -1,    37,    38,    -1,    40,    -1,    42,    43,
+				-1,    45,    -1,    47,   124,    -1,   126,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    60,    -1,    62,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   305,   306,    -1,    -1,   309,    -1,    -1,    -1,
+				94,    -1,    96,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   324,   325,   326,   327,   328,   329,   330,   331,   332,
+				-1,    -1,   335,   336,    -1,    -1,   339,   340,   341,   342,
+			   124,    -1,   126,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   353,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,
+			   306,    -1,    -1,   309,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   324,   325,
+			   326,   327,   328,   329,   330,   331,   332,    -1,    -1,   335,
+			   336,    -1,    -1,   339,   340,   341,   342,   305,   306,    -1,
+				-1,   309,    -1,    -1,    -1,    -1,    -1,   353,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   324,   325,   326,   327,
+			   328,   329,   330,   331,   332,    -1,    -1,   335,   336,    -1,
+				-1,   339,   340,   341,   342,   305,   306,    -1,    -1,   309,
+				-1,    -1,    -1,    -1,    -1,   353,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   324,   325,   326,   327,   328,   329,
+			   330,   331,   332,    -1,    -1,   335,   336,    -1,    -1,   339,
+			   340,   341,   342,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   353,    -1,    -1,    -1,    -1,    -1,    33,
+				-1,    -1,    -1,    37,    38,    -1,    40,    -1,    42,    43,
+				-1,    45,    -1,    47,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   305,   306,    -1,    -1,   309,    60,    -1,    62,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   324,   325,   326,   327,   328,   329,   330,   331,   332,    -1,
+				-1,   335,   336,    -1,    -1,   339,   340,   341,   342,    -1,
+				94,    -1,    96,    -1,    -1,    -1,    33,    -1,    -1,   353,
+				37,    38,    -1,    40,    -1,    42,    43,    -1,    45,    -1,
+				47,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   124,    -1,   126,    60,    -1,    62,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    33,    -1,    -1,    -1,    37,    38,
+				-1,    40,    -1,    42,    43,    -1,    45,    -1,    47,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    94,    -1,    96,
+				-1,    60,    -1,    62,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    33,    -1,    -1,    -1,    37,    38,    -1,    40,
+				-1,    42,    43,    -1,    45,    -1,    47,   124,    -1,   126,
+				-1,    -1,    -1,    -1,    -1,    94,    -1,    96,    -1,    60,
+				-1,    62,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   124,    -1,   126,    -1,    -1,
+				-1,    -1,    -1,    94,    -1,    96,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    33,    -1,
+				-1,    -1,    37,    38,    -1,    40,    -1,    42,    43,    -1,
+				45,    -1,    47,   124,    -1,   126,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    60,    -1,    62,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   305,   306,    -1,    -1,   309,    -1,    -1,    -1,    94,
+				-1,    96,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   324,   325,   326,   327,   328,   329,   330,   331,   332,    -1,
+				-1,   335,   336,    -1,    -1,   339,   340,   341,   342,   124,
+				-1,   126,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   353,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   305,   306,
+				-1,    -1,   309,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   324,   325,   326,
+			   327,   328,   329,   330,   331,   332,    -1,    -1,   335,   336,
+				-1,    -1,   339,   340,   341,   342,   305,   306,    -1,    -1,
+			   309,    -1,    -1,    -1,    -1,    -1,   353,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   324,   325,   326,   327,   328,
+			   329,   330,   331,   332,    -1,    -1,   335,   336,    -1,    -1,
+			   339,   340,   341,   342,   305,   306,    -1,    -1,   309,    -1,
+				-1,    -1,    -1,    -1,   353,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   324,   325,   326,   327,   328,   329,   330,
+			   331,   332,    -1,    -1,   335,   336,    -1,    -1,   339,   340,
+			   341,   342,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   353,    -1,    -1,    -1,    -1,    -1,    33,    -1,
+				-1,    -1,    37,    38,    -1,    40,    -1,    42,    43,    -1,
+				45,    -1,    47,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   305,   306,    -1,    -1,   309,    60,    -1,    62,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   324,
+			   325,   326,   327,   328,   329,   330,   331,   332,    -1,    -1,
+			   335,   336,    -1,    -1,   339,   340,   341,   342,    -1,    94,
+				-1,    96,    -1,    -1,    -1,    33,    -1,    -1,   353,    37,
+				38,    -1,    -1,    -1,    42,    43,    -1,    45,    -1,    47,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   124,
+				-1,   126,    60,    -1,    62,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   257,   258,   259,   260,   261,   262,
+			   263,   264,   265,    -1,    -1,    -1,    94,    -1,    96,    -1,
+			   273,    -1,   275,   276,   277,   278,    -1,    -1,    -1,    -1,
+				-1,   284,   285,   286,   287,   288,   289,   290,    -1,    -1,
+			   293,    -1,    -1,    -1,    -1,    -1,   124,    -1,   126,   302,
+			   303,    -1,   305,   306,   307,   308,   309,   310,    -1,   312,
+			   313,   314,    -1,    -1,   317,    -1,    -1,    -1,   321,   322,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   341,    -1,
+				-1,   344,    -1,    -1,   347,   348,    -1,   350,   351,    -1,
+				-1,    -1,   355,    -1,   357,   358,   359,   360,   361,   362,
+				-1,    -1,   365,    -1,    -1,    -1,    -1,    -1,    -1,   372,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   305,   306,    -1,    -1,   309,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   324,
+			   325,   326,   327,   328,   329,   330,   331,   332,    -1,    -1,
+			   335,   336,    -1,    -1,   339,   340,   341,   342,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   353,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   305,   306,    -1,
+				-1,   309,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   324,   325,   326,   327,
+			   328,   329,   330,   331,   332,    -1,    -1,   335,   336,    -1,
+				-1,   339,   340,   341,   342,   257,   258,   259,   260,   261,
+			   262,   263,   264,   265,    -1,   353,    -1,    -1,    -1,    -1,
+				-1,   273,    -1,   275,   276,   277,   278,    -1,    -1,    -1,
+				-1,    -1,   284,   285,   286,   287,   288,   289,   290,    -1,
+				-1,   293,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   302,   303,    -1,   305,   306,   307,   308,   309,   310,    -1,
+			   312,   313,   314,    -1,    -1,   317,    -1,    -1,    -1,   321,
+			   322,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   344,    -1,    -1,   347,   348,    -1,   350,   351,
+				-1,   353,    -1,   355,    -1,   357,   358,   359,   360,   361,
+			   362,    -1,    -1,   365,    -1,    -1,    -1,    -1,    -1,    -1,
+			   372,   257,   258,   259,   260,   261,   262,   263,   264,   265,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,   273,    -1,   275,
+			   276,   277,   278,    -1,    -1,    -1,    -1,    -1,   284,   285,
+			   286,   287,   288,   289,   290,    -1,    -1,   293,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   302,   303,    -1,   305,
+			   306,   307,   308,   309,   310,    -1,   312,   313,   314,    -1,
+				-1,   317,    -1,    -1,    -1,   321,   322,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   344,    -1,
+				-1,   347,   348,    -1,   350,   351,    -1,   353,    -1,   355,
+				-1,   357,   358,   359,   360,   361,   362,    -1,    -1,   365,
+				-1,    -1,    -1,    -1,    -1,    -1,   372,   257,   258,   259,
+			   260,   261,   262,   263,   264,   265,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,   273,    -1,   275,   276,   277,   278,    -1,
+				-1,    -1,    -1,    -1,   284,   285,   286,   287,   288,   289,
+			   290,    -1,    -1,   293,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   302,   303,    -1,   305,   306,   307,   308,   309,
+			   310,    -1,   312,   313,   314,    -1,    -1,   317,    -1,    -1,
+				-1,   321,   322,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   344,    -1,    -1,   347,   348,    -1,
+			   350,   351,    -1,    -1,    -1,   355,    -1,   357,   358,   359,
+			   360,   361,   362,    -1,    -1,   365,    -1,    -1,    -1,    -1,
+				-1,    -1,   372,   257,   258,   259,   260,   261,   262,   263,
+			   264,   265,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   273,
+				-1,   275,   276,   277,   278,    -1,    -1,    -1,    -1,    -1,
+			   284,   285,   286,   287,   288,   289,   290,    -1,    -1,   293,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   302,   303,
+				-1,   305,   306,   307,   308,   309,   310,    -1,   312,   313,
+			   314,    -1,    -1,   317,    -1,    -1,    -1,   321,   322,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   344,    -1,    -1,   347,   348,    -1,   350,   351,    -1,    -1,
+				-1,   355,    -1,   357,   358,   359,   360,   361,   362,    -1,
+				-1,   365,    -1,    -1,    -1,    -1,    -1,    -1,   372,   257,
+			   258,   259,   260,   261,   262,   263,   264,   265,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,   273,    -1,   275,   276,   277,
+			   278,    -1,    -1,    -1,    -1,    -1,   284,   285,   286,   287,
+			   288,   289,   290,    -1,    -1,   293,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,   302,   303,    -1,   305,   306,   307,
+			   308,   309,   310,    -1,   312,   313,   314,    -1,    -1,   317,
+				-1,    -1,    -1,   321,   322,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,   344,    -1,    -1,   347,
+			   348,    -1,   350,   351,    -1,    -1,    -1,   355,    -1,   357,
+			   358,   359,   360,   361,   362,    -1,    -1,   365,    -1,    -1,
+				-1,    -1,    -1,    -1,   372,   257,   258,   259,   260,   261,
+			   262,   263,   264,   265,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,   273,    -1,   275,   276,   277,   278,    -1,    -1,    -1,
+				-1,    -1,   284,   285,   286,   287,   288,   289,   290,    -1,
+				-1,   293,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+			   302,   303,    -1,   305,   306,   307,   308,   309,   310,    -1,
+			   312,   313,   314,    -1,    -1,   317,    -1,    -1,    -1,   321,
+			   322,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+				-1,    -1,   344,    -1,    -1,   347,   348,    -1,   350,   351,
+				-1,    -1,    -1,   355,    -1,   357,   358,   359,   360,   361,
+			   362,    -1,    -1,   365,    -1,    -1,    -1,    -1,    -1,    -1,
+			   372,
+					};
+
+		/// <summary>
+		///   maps symbol value to printable name.
+		///   see <c>yyExpecting</c>
+		/// </summary>
+		protected static readonly string[] yyNames = {
+				"end-of-file",null,null,null,null,null,null,null,null,null,"'\\n'",
+				null,null,null,null,null,null,null,null,null,null,null,null,null,null,
+				null,null,null,null,null,null,null,null,"'!'",null,null,null,"'%'",
+				"'&'",null,"'('","')'","'*'","'+'","','","'-'","'.'","'/'",null,null,
+				null,null,null,null,null,null,null,null,"':'","';'","'<'","'='","'>'",
+				"'?'",null,null,null,null,null,null,null,null,null,null,null,null,
+				null,null,null,null,null,null,null,null,null,null,null,null,null,null,
+				null,"'['",null,"']'","'^'",null,"'`'",null,null,null,null,null,null,
+				null,null,null,null,null,null,null,null,null,null,null,null,null,null,
+				null,null,null,null,null,null,"'{'","'|'","'}'","'~'",null,null,null,
+				null,null,null,null,null,null,null,null,null,null,null,null,null,null,
+				null,null,null,null,null,null,null,null,null,null,null,null,null,null,
+				null,null,null,null,null,null,null,null,null,null,null,null,null,null,
+				null,null,null,null,null,null,null,null,null,null,null,null,null,null,
+				null,null,null,null,null,null,null,null,null,null,null,null,null,null,
+				null,null,null,null,null,null,null,null,null,null,null,null,null,null,
+				null,null,null,null,null,null,null,null,null,null,null,null,null,null,
+				null,null,null,null,null,null,null,null,null,null,null,null,null,null,
+				null,null,null,null,null,null,null,null,null,null,null,null,null,null,
+				null,"keyword_class","keyword_module","keyword_def","keyword_begin",
+				"keyword_if","keyword_unless","keyword_while","keyword_until",
+				"keyword_for","keyword_undef","keyword_rescue","keyword_ensure",
+				"keyword_end","keyword_then","keyword_elsif","keyword_else",
+				"keyword_case","keyword_when","keyword_break","keyword_next",
+				"keyword_redo","keyword_retry","keyword_in","keyword_do",
+				"keyword_do_cond","keyword_do_block","keyword_do_LAMBDA",
+				"keyword_return","keyword_yield","keyword_super","keyword_self",
+				"keyword_nil","keyword_true","keyword_false","keyword_and",
+				"keyword_or","keyword_not","modifier_if","modifier_unless",
+				"modifier_while","modifier_until","modifier_rescue","keyword_alias",
+				"keyword_BEGIN","keyword_END","keyword__LINE__","keyword__FILE__",
+				"keyword__ENCODING__","tIDENTIFIER","tFID","tGVAR","tIVAR",
+				"tCONSTANT","tCVAR","tLABEL","tINTEGER","tFLOAT","tCHAR","tXSTRING",
+				"tREGEXP","tSTRING","tSTRING_PART","tSTRING_MID","tLABEL_END",
+				"tNTH_REF","tBACK_REF","tREGEXP_END","tUPLUS","tUMINUS","tPOW","tCMP",
+				"tEQ","tEQQ","tNEQ","tGEQ","tLEQ","tANDOP","tOROP","tMATCH","tNMATCH",
+				"tDOT2","tDOT3","tAREF","tASET","tLSHFT","tRSHFT","tCOLON2","tCOLON3",
+				"tOP_ASGN","tASSOC","tLPAREN","tLPAREN_ARG","tRPAREN","tLBRACK",
+				"tLBRACE","tLBRACE_ARG","tSTAR","tAMPER","tLAMBDA","tANDDOT",
+				"tSYMBEG","tREGEXP_BEG","tWORDS_BEG","tSYMBOLS_BEG","tSTRING_BEG",
+				"tXSTRING_BEG","tSTRING_DVAR","tLAMBEG","tHEREDOC_BEG","tHEREDOC_END",
+				"tLITERAL_DELIM","tHD_LITERAL_DELIM","tHD_STRING_PART",
+				"tHD_STRING_MID","tLOWEST","tUMINUS_NUM","tLAST_TOKEN",
+					};
+
+		/// <summary>
+		///   printable rules for debugging.
+		/// </summary>
+		protected static readonly string[] yyRule = {
+				"$accept : program",
+				"$$1 :",
+				"program : $$1 top_compstmt",
+				"top_compstmt : top_stmts opt_terms",
+				"top_stmts : none",
+				"top_stmts : top_stmt",
+				"top_stmts : top_stmts terms top_stmt",
+				"top_stmts : error top_stmt",
+				"top_stmt : stmt",
+				"$$2 :",
+				"top_stmt : keyword_BEGIN $$2 '{' top_compstmt '}'",
+				"bodystmt : compstmt opt_rescue opt_else opt_ensure",
+				"compstmt : stmts opt_terms",
+				"stmts : none",
+				"stmts : stmt",
+				"stmts : stmts terms stmt",
+				"stmts : error stmt",
+				"$$3 :",
+				"stmt : keyword_alias fsym $$3 fsym",
+				"stmt : keyword_undef undef_list",
+				"stmt : stmt modifier_if expr_value",
+				"stmt : stmt modifier_unless expr_value",
+				"stmt : stmt modifier_while expr_value",
+				"stmt : stmt modifier_until expr_value",
+				"stmt : stmt modifier_rescue stmt",
+				"stmt : keyword_END '{' compstmt '}'",
+				"stmt : command_asgn",
+				"stmt : mlhs '=' command_call",
+				"stmt : lhs '=' mrhs",
+				"stmt : mlhs '=' arg",
+				"stmt : mlhs '=' mrhs",
+				"stmt : expr",
+				"command_asgn : lhs '=' command_rhs",
+				"command_asgn : var_lhs tOP_ASGN command_rhs",
+				"command_asgn : primary_value '[' opt_call_args rbracket tOP_ASGN command_rhs",
+				"command_asgn : primary_value call_op tIDENTIFIER tOP_ASGN command_rhs",
+				"command_asgn : primary_value call_op tCONSTANT tOP_ASGN command_rhs",
+				"command_asgn : primary_value tCOLON2 tCONSTANT tOP_ASGN command_call",
+				"command_asgn : primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_rhs",
+				"command_asgn : backref tOP_ASGN command_rhs",
+				"command_rhs : command_call",
+				"command_rhs : command_call modifier_rescue stmt",
+				"command_rhs : command_asgn",
+				"expr : command_call",
+				"expr : expr keyword_and expr",
+				"expr : expr keyword_or expr",
+				"expr : keyword_not opt_nl expr",
+				"expr : '!' command_call",
+				"expr : arg",
+				"expr_value : expr",
+				"command_call : command",
+				"command_call : block_command",
+				"block_command : block_call",
+				"block_command : block_call call_op2 operation2 command_args",
+				"$$4 :",
+				"cmd_brace_block : tLBRACE_ARG $$4 opt_block_param compstmt '}'",
+				"command : operation command_args",
+				"command : operation command_args cmd_brace_block",
+				"command : primary_value call_op operation2 command_args",
+				"command : primary_value call_op operation2 command_args cmd_brace_block",
+				"command : primary_value tCOLON2 operation2 command_args",
+				"command : primary_value tCOLON2 operation2 command_args cmd_brace_block",
+				"command : keyword_super command_args",
+				"command : keyword_yield command_args",
+				"command : keyword_return call_args",
+				"command : keyword_break call_args",
+				"command : keyword_next call_args",
+				"mlhs : mlhs_basic",
+				"mlhs : tLPAREN mlhs_inner rparen",
+				"mlhs_inner : mlhs_basic",
+				"mlhs_inner : tLPAREN mlhs_inner rparen",
+				"mlhs_basic : mlhs_list",
+				"mlhs_basic : mlhs_list mlhs_item",
+				"mlhs_basic : mlhs_list tSTAR mlhs_node",
+				"mlhs_basic : mlhs_list tSTAR mlhs_node ',' mlhs_post",
+				"mlhs_basic : mlhs_list tSTAR",
+				"mlhs_basic : mlhs_list tSTAR ',' mlhs_post",
+				"mlhs_basic : tSTAR mlhs_node",
+				"mlhs_basic : tSTAR mlhs_node ',' mlhs_post",
+				"mlhs_basic : tSTAR",
+				"mlhs_basic : tSTAR ',' mlhs_post",
+				"mlhs_item : mlhs_node",
+				"mlhs_item : tLPAREN mlhs_inner rparen",
+				"mlhs_list : mlhs_item ','",
+				"mlhs_list : mlhs_list mlhs_item ','",
+				"mlhs_post : mlhs_item",
+				"mlhs_post : mlhs_list mlhs_item",
+				"mlhs_node : variable",
+				"mlhs_node : primary_value '[' opt_call_args rbracket",
+				"mlhs_node : primary_value call_op tIDENTIFIER",
+				"mlhs_node : primary_value tCOLON2 tIDENTIFIER",
+				"mlhs_node : primary_value call_op tCONSTANT",
+				"mlhs_node : primary_value tCOLON2 tCONSTANT",
+				"mlhs_node : tCOLON3 tCONSTANT",
+				"mlhs_node : backref",
+				"lhs : variable",
+				"lhs : primary_value '[' opt_call_args rbracket",
+				"lhs : primary_value call_op tIDENTIFIER",
+				"lhs : primary_value tCOLON2 tIDENTIFIER",
+				"lhs : primary_value call_op tCONSTANT",
+				"lhs : primary_value tCOLON2 tCONSTANT",
+				"lhs : tCOLON3 tCONSTANT",
+				"lhs : backref",
+				"cname : tIDENTIFIER",
+				"cname : tCONSTANT",
+				"cpath : tCOLON3 cname",
+				"cpath : cname",
+				"cpath : primary_value tCOLON2 cname",
+				"fname : tIDENTIFIER",
+				"fname : tCONSTANT",
+				"fname : tFID",
+				"fname : op",
+				"fname : reswords",
+				"fsym : fname",
+				"fsym : basic_symbol",
+				"undef_list : fsym",
+				"$$5 :",
+				"undef_list : undef_list ',' $$5 fsym",
+				"op : '|'",
+				"op : '^'",
+				"op : '&'",
+				"op : tCMP",
+				"op : tEQ",
+				"op : tEQQ",
+				"op : tMATCH",
+				"op : tNMATCH",
+				"op : '>'",
+				"op : tGEQ",
+				"op : '<'",
+				"op : tLEQ",
+				"op : tNEQ",
+				"op : tLSHFT",
+				"op : tRSHFT",
+				"op : '+'",
+				"op : '-'",
+				"op : '*'",
+				"op : tSTAR",
+				"op : '/'",
+				"op : '%'",
+				"op : tPOW",
+				"op : '!'",
+				"op : '~'",
+				"op : tUPLUS",
+				"op : tUMINUS",
+				"op : tAREF",
+				"op : tASET",
+				"op : '`'",
+				"reswords : keyword__LINE__",
+				"reswords : keyword__FILE__",
+				"reswords : keyword__ENCODING__",
+				"reswords : keyword_BEGIN",
+				"reswords : keyword_END",
+				"reswords : keyword_alias",
+				"reswords : keyword_and",
+				"reswords : keyword_begin",
+				"reswords : keyword_break",
+				"reswords : keyword_case",
+				"reswords : keyword_class",
+				"reswords : keyword_def",
+				"reswords : keyword_do",
+				"reswords : keyword_else",
+				"reswords : keyword_elsif",
+				"reswords : keyword_end",
+				"reswords : keyword_ensure",
+				"reswords : keyword_false",
+				"reswords : keyword_for",
+				"reswords : keyword_in",
+				"reswords : keyword_module",
+				"reswords : keyword_next",
+				"reswords : keyword_nil",
+				"reswords : keyword_not",
+				"reswords : keyword_or",
+				"reswords : keyword_redo",
+				"reswords : keyword_rescue",
+				"reswords : keyword_retry",
+				"reswords : keyword_return",
+				"reswords : keyword_self",
+				"reswords : keyword_super",
+				"reswords : keyword_then",
+				"reswords : keyword_true",
+				"reswords : keyword_undef",
+				"reswords : keyword_when",
+				"reswords : keyword_yield",
+				"reswords : keyword_if",
+				"reswords : keyword_unless",
+				"reswords : keyword_while",
+				"reswords : keyword_until",
+				"arg : lhs '=' arg_rhs",
+				"arg : var_lhs tOP_ASGN arg_rhs",
+				"arg : primary_value '[' opt_call_args rbracket tOP_ASGN arg_rhs",
+				"arg : primary_value call_op tIDENTIFIER tOP_ASGN arg_rhs",
+				"arg : primary_value call_op tCONSTANT tOP_ASGN arg_rhs",
+				"arg : primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg_rhs",
+				"arg : primary_value tCOLON2 tCONSTANT tOP_ASGN arg_rhs",
+				"arg : tCOLON3 tCONSTANT tOP_ASGN arg_rhs",
+				"arg : backref tOP_ASGN arg_rhs",
+				"arg : arg tDOT2 arg",
+				"arg : arg tDOT3 arg",
+				"arg : arg '+' arg",
+				"arg : arg '-' arg",
+				"arg : arg '*' arg",
+				"arg : arg '/' arg",
+				"arg : arg '%' arg",
+				"arg : arg tPOW arg",
+				"arg : tUMINUS_NUM tINTEGER tPOW arg",
+				"arg : tUMINUS_NUM tFLOAT tPOW arg",
+				"arg : tUPLUS arg",
+				"arg : tUMINUS arg",
+				"arg : arg '|' arg",
+				"arg : arg '^' arg",
+				"arg : arg '&' arg",
+				"arg : arg tCMP arg",
+				"arg : arg '>' arg",
+				"arg : arg tGEQ arg",
+				"arg : arg '<' arg",
+				"arg : arg tLEQ arg",
+				"arg : arg tEQ arg",
+				"arg : arg tEQQ arg",
+				"arg : arg tNEQ arg",
+				"arg : arg tMATCH arg",
+				"arg : arg tNMATCH arg",
+				"arg : '!' arg",
+				"arg : '~' arg",
+				"arg : arg tLSHFT arg",
+				"arg : arg tRSHFT arg",
+				"arg : arg tANDOP arg",
+				"arg : arg tOROP arg",
+				"arg : arg '?' arg opt_nl ':' arg",
+				"arg : primary",
+				"aref_args : none",
+				"aref_args : args trailer",
+				"aref_args : args comma assocs trailer",
+				"aref_args : assocs trailer",
+				"arg_rhs : arg",
+				"arg_rhs : arg modifier_rescue arg",
+				"paren_args : '(' opt_call_args rparen",
+				"opt_paren_args : none",
+				"opt_paren_args : paren_args",
+				"opt_call_args : none",
+				"opt_call_args : call_args",
+				"opt_call_args : args ','",
+				"opt_call_args : args comma assocs ','",
+				"opt_call_args : assocs ','",
+				"call_args : command",
+				"call_args : args opt_block_arg",
+				"call_args : assocs opt_block_arg",
+				"call_args : args comma assocs opt_block_arg",
+				"call_args : block_arg",
+				"$$6 :",
+				"command_args : $$6 call_args",
+				"block_arg : tAMPER arg",
+				"opt_block_arg : comma block_arg",
+				"opt_block_arg : none",
+				"comma : ','",
+				"comma : ',' heredoc_bodies",
+				"args : arg",
+				"args : tSTAR arg",
+				"args : args comma arg",
+				"args : args comma tSTAR arg",
+				"mrhs : args comma arg",
+				"mrhs : args comma tSTAR arg",
+				"mrhs : tSTAR arg",
+				"primary : literal",
+				"primary : string",
+				"primary : xstring",
+				"primary : regexp",
+				"primary : heredoc",
+				"primary : var_ref",
+				"primary : backref",
+				"primary : tFID",
+				"$$7 :",
+				"primary : keyword_begin $$7 bodystmt keyword_end",
+				"$$8 :",
+				"$$9 :",
+				"primary : tLPAREN_ARG $$8 stmt $$9 rparen",
+				"$$10 :",
+				"primary : tLPAREN_ARG $$10 rparen",
+				"primary : tLPAREN compstmt ')'",
+				"primary : primary_value tCOLON2 tCONSTANT",
+				"primary : tCOLON3 tCONSTANT",
+				"primary : tLBRACK aref_args ']'",
+				"primary : tLBRACE assoc_list '}'",
+				"primary : keyword_return",
+				"primary : keyword_yield opt_paren_args",
+				"primary : keyword_not '(' expr rparen",
+				"primary : keyword_not '(' rparen",
+				"primary : operation brace_block",
+				"primary : method_call",
+				"primary : method_call brace_block",
+				"$$11 :",
+				"$$12 :",
+				"primary : tLAMBDA $$11 f_larglist $$12 lambda_body",
+				"primary : keyword_if expr_value then compstmt if_tail keyword_end",
+				"primary : keyword_unless expr_value then compstmt opt_else keyword_end",
+				"$$13 :",
+				"$$14 :",
+				"primary : keyword_while $$13 expr_value do $$14 compstmt keyword_end",
+				"$$15 :",
+				"$$16 :",
+				"primary : keyword_until $$15 expr_value do $$16 compstmt keyword_end",
+				"primary : keyword_case expr_value opt_terms case_body keyword_end",
+				"primary : keyword_case opt_terms case_body keyword_end",
+				"$$17 :",
+				"$$18 :",
+				"primary : keyword_for for_var keyword_in $$17 expr_value do $$18 compstmt keyword_end",
+				"$$19 :",
+				"primary : keyword_class cpath superclass $$19 bodystmt keyword_end",
+				"$$20 :",
+				"$$21 :",
+				"primary : keyword_class tLSHFT expr $$20 term $$21 bodystmt keyword_end",
+				"$$22 :",
+				"primary : keyword_module cpath $$22 bodystmt keyword_end",
+				"$$23 :",
+				"$$24 :",
+				"primary : keyword_def fname $$23 $$24 f_arglist bodystmt keyword_end",
+				"$$25 :",
+				"$$26 :",
+				"primary : keyword_def singleton dot_or_colon $$25 fname $$26 f_arglist bodystmt keyword_end",
+				"primary : keyword_break",
+				"primary : keyword_next",
+				"primary : keyword_redo",
+				"primary : keyword_retry",
+				"primary_value : primary",
+				"then : term",
+				"then : keyword_then",
+				"then : term keyword_then",
+				"do : term",
+				"do : keyword_do_cond",
+				"if_tail : opt_else",
+				"if_tail : keyword_elsif expr_value then compstmt if_tail",
+				"opt_else : none",
+				"opt_else : keyword_else compstmt",
+				"for_var : lhs",
+				"for_var : mlhs",
+				"f_marg : f_norm_arg",
+				"f_marg : tLPAREN f_margs rparen",
+				"f_marg_list : f_marg",
+				"f_marg_list : f_marg_list ',' f_marg",
+				"f_margs : f_marg_list",
+				"f_margs : f_marg_list ',' tSTAR f_norm_arg",
+				"f_margs : f_marg_list ',' tSTAR f_norm_arg ',' f_marg_list",
+				"f_margs : f_marg_list ',' tSTAR",
+				"f_margs : f_marg_list ',' tSTAR ',' f_marg_list",
+				"f_margs : tSTAR f_norm_arg",
+				"f_margs : tSTAR f_norm_arg ',' f_marg_list",
+				"f_margs : tSTAR",
+				"f_margs : tSTAR ',' f_marg_list",
+				"block_param : f_arg ',' f_block_optarg ',' f_rest_arg opt_f_block_arg",
+				"block_param : f_arg ',' f_block_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg",
+				"block_param : f_arg ',' f_block_optarg opt_f_block_arg",
+				"block_param : f_arg ',' f_block_optarg ',' f_arg opt_f_block_arg",
+				"block_param : f_arg ',' f_rest_arg opt_f_block_arg",
+				"block_param : f_arg ','",
+				"block_param : f_arg ',' f_rest_arg ',' f_arg opt_f_block_arg",
+				"block_param : f_arg opt_f_block_arg",
+				"block_param : f_block_optarg ',' f_rest_arg opt_f_block_arg",
+				"block_param : f_block_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg",
+				"block_param : f_block_optarg opt_f_block_arg",
+				"block_param : f_block_optarg ',' f_arg opt_f_block_arg",
+				"block_param : f_rest_arg opt_f_block_arg",
+				"block_param : f_rest_arg ',' f_arg opt_f_block_arg",
+				"block_param : f_block_arg",
+				"opt_block_param : none",
+				"opt_block_param : block_param_def",
+				"block_param_def : '|' opt_bv_decl '|'",
+				"block_param_def : tOROP",
+				"block_param_def : '|' block_param opt_bv_decl '|'",
+				"opt_bv_decl : opt_nl",
+				"opt_bv_decl : opt_nl ';' bv_decls opt_nl",
+				"bv_decls : bvar",
+				"bv_decls : bv_decls ',' bvar",
+				"bvar : tIDENTIFIER",
+				"bvar : f_bad_arg",
+				"f_larglist : '(' f_args opt_bv_decl ')'",
+				"f_larglist : f_args",
+				"lambda_body : tLAMBEG compstmt '}'",
+				"lambda_body : keyword_do_LAMBDA compstmt keyword_end",
+				"$$27 :",
+				"do_block : keyword_do_block $$27 opt_block_param compstmt keyword_end",
+				"block_call : command do_block",
+				"block_call : block_call call_op2 operation2 opt_paren_args",
+				"block_call : block_call call_op2 operation2 opt_paren_args brace_block",
+				"block_call : block_call call_op2 operation2 command_args do_block",
+				"method_call : operation paren_args",
+				"method_call : primary_value call_op operation2 opt_paren_args",
+				"method_call : primary_value tCOLON2 operation2 paren_args",
+				"method_call : primary_value tCOLON2 operation3",
+				"method_call : primary_value call_op paren_args",
+				"method_call : primary_value tCOLON2 paren_args",
+				"method_call : keyword_super paren_args",
+				"method_call : keyword_super",
+				"method_call : primary_value '[' opt_call_args rbracket",
+				"$$28 :",
+				"brace_block : '{' $$28 opt_block_param compstmt '}'",
+				"$$29 :",
+				"brace_block : keyword_do $$29 opt_block_param compstmt keyword_end",
+				"case_body : keyword_when args then compstmt cases",
+				"cases : opt_else",
+				"cases : case_body",
+				"opt_rescue : keyword_rescue exc_list exc_var then compstmt opt_rescue",
+				"opt_rescue : none",
+				"exc_list : arg",
+				"exc_list : mrhs",
+				"exc_list : none",
+				"exc_var : tASSOC lhs",
+				"exc_var : none",
+				"opt_ensure : keyword_ensure compstmt",
+				"opt_ensure : none",
+				"literal : numeric",
+				"literal : symbol",
+				"literal : words",
+				"literal : symbols",
+				"string : tCHAR",
+				"string : tSTRING",
+				"string : tSTRING_BEG tSTRING",
+				"string : tSTRING_BEG string_rep tSTRING",
+				"string_rep : string_interp",
+				"string_rep : string_rep string_interp",
+				"string_interp : tSTRING_MID",
+				"$$30 :",
+				"string_interp : tSTRING_PART $$30 compstmt '}'",
+				"string_interp : tLITERAL_DELIM",
+				"string_interp : tHD_LITERAL_DELIM heredoc_bodies",
+				"xstring : tXSTRING_BEG tXSTRING",
+				"xstring : tXSTRING_BEG string_rep tXSTRING",
+				"regexp : tREGEXP_BEG tREGEXP",
+				"regexp : tREGEXP_BEG string_rep tREGEXP",
+				"heredoc : tHEREDOC_BEG",
+				"heredoc_bodies : heredoc_body",
+				"heredoc_bodies : heredoc_bodies heredoc_body",
+				"heredoc_body : tHEREDOC_END",
+				"heredoc_body : heredoc_string_rep tHEREDOC_END",
+				"heredoc_string_rep : heredoc_string_interp",
+				"heredoc_string_rep : heredoc_string_rep heredoc_string_interp",
+				"heredoc_string_interp : tHD_STRING_MID",
+				"$$31 :",
+				"heredoc_string_interp : tHD_STRING_PART $$31 compstmt '}'",
+				"words : tWORDS_BEG tSTRING",
+				"words : tWORDS_BEG string_rep tSTRING",
+				"symbol : basic_symbol",
+				"symbol : tSYMBEG tSTRING_BEG string_rep tSTRING",
+				"basic_symbol : tSYMBEG sym",
+				"sym : fname",
+				"sym : tIVAR",
+				"sym : tGVAR",
+				"sym : tCVAR",
+				"sym : tSTRING",
+				"sym : tSTRING_BEG tSTRING",
+				"symbols : tSYMBOLS_BEG tSTRING",
+				"symbols : tSYMBOLS_BEG string_rep tSTRING",
+				"numeric : tINTEGER",
+				"numeric : tFLOAT",
+				"numeric : tUMINUS_NUM tINTEGER",
+				"numeric : tUMINUS_NUM tFLOAT",
+				"variable : tIDENTIFIER",
+				"variable : tIVAR",
+				"variable : tGVAR",
+				"variable : tCVAR",
+				"variable : tCONSTANT",
+				"var_lhs : variable",
+				"var_ref : variable",
+				"var_ref : keyword_nil",
+				"var_ref : keyword_self",
+				"var_ref : keyword_true",
+				"var_ref : keyword_false",
+				"var_ref : keyword__FILE__",
+				"var_ref : keyword__LINE__",
+				"backref : tNTH_REF",
+				"backref : tBACK_REF",
+				"superclass :",
+				"$$32 :",
+				"superclass : '<' $$32 expr_value term",
+				"f_arglist : '(' f_args rparen",
+				"f_arglist : f_args term",
+				"f_args : f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg",
+				"f_args : f_arg ',' f_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg",
+				"f_args : f_arg ',' f_optarg opt_f_block_arg",
+				"f_args : f_arg ',' f_optarg ',' f_arg opt_f_block_arg",
+				"f_args : f_arg ',' f_rest_arg opt_f_block_arg",
+				"f_args : f_arg ',' f_rest_arg ',' f_arg opt_f_block_arg",
+				"f_args : f_arg opt_f_block_arg",
+				"f_args : f_optarg ',' f_rest_arg opt_f_block_arg",
+				"f_args : f_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg",
+				"f_args : f_optarg opt_f_block_arg",
+				"f_args : f_optarg ',' f_arg opt_f_block_arg",
+				"f_args : f_rest_arg opt_f_block_arg",
+				"f_args : f_rest_arg ',' f_arg opt_f_block_arg",
+				"f_args : f_block_arg",
+				"f_args :",
+				"f_bad_arg : tCONSTANT",
+				"f_bad_arg : tIVAR",
+				"f_bad_arg : tGVAR",
+				"f_bad_arg : tCVAR",
+				"f_norm_arg : f_bad_arg",
+				"f_norm_arg : tIDENTIFIER",
+				"f_arg_item : f_norm_arg",
+				"f_arg_item : tLPAREN f_margs rparen",
+				"f_arg : f_arg_item",
+				"f_arg : f_arg ',' f_arg_item",
+				"f_opt_asgn : tIDENTIFIER '='",
+				"f_opt : f_opt_asgn arg",
+				"f_block_opt : f_opt_asgn primary_value",
+				"f_block_optarg : f_block_opt",
+				"f_block_optarg : f_block_optarg ',' f_block_opt",
+				"f_optarg : f_opt",
+				"f_optarg : f_optarg ',' f_opt",
+				"restarg_mark : '*'",
+				"restarg_mark : tSTAR",
+				"f_rest_arg : restarg_mark tIDENTIFIER",
+				"f_rest_arg : restarg_mark",
+				"blkarg_mark : '&'",
+				"blkarg_mark : tAMPER",
+				"f_block_arg : blkarg_mark tIDENTIFIER",
+				"opt_f_block_arg : ',' f_block_arg",
+				"opt_f_block_arg : none",
+				"singleton : var_ref",
+				"$$33 :",
+				"singleton : '(' $$33 expr rparen",
+				"assoc_list : none",
+				"assoc_list : assocs trailer",
+				"assocs : assoc",
+				"assocs : assocs ',' assoc",
+				"assoc : arg tASSOC arg",
+				"assoc : tLABEL arg",
+				"assoc : tLABEL_END arg",
+				"assoc : tSTRING_BEG tLABEL_END arg",
+				"assoc : tSTRING_BEG string_rep tLABEL_END arg",
+				"operation : tIDENTIFIER",
+				"operation : tCONSTANT",
+				"operation : tFID",
+				"operation2 : tIDENTIFIER",
+				"operation2 : tCONSTANT",
+				"operation2 : tFID",
+				"operation2 : op",
+				"operation3 : tIDENTIFIER",
+				"operation3 : tFID",
+				"operation3 : op",
+				"dot_or_colon : '.'",
+				"dot_or_colon : tCOLON2",
+				"call_op : '.'",
+				"call_op : tANDDOT",
+				"call_op2 : call_op",
+				"call_op2 : tCOLON2",
+				"opt_terms :",
+				"opt_terms : terms",
+				"opt_nl :",
+				"opt_nl : nl",
+				"rparen : opt_nl ')'",
+				"rbracket : opt_nl ']'",
+				"trailer :",
+				"trailer : nl",
+				"trailer : comma",
+				"term : ';'",
+				"term : nl",
+				"term : heredoc_body",
+				"nl : '\\n'",
+				"terms : term",
+				"terms : terms term",
+				"none :",
+					};
+
+		/// <summary>
+		///   debugging support, requires <c>yyDebug</c>.
+		///   Set to <c>null</c> to suppress debugging messages.
+		/// </summary>
+		protected yyDebugOut yyDebug;
+
+		/// <summary>
+		///   index-checked interface to <c>yyNames[]</c>.
+		/// </summary>
+		/// <param name='token'>single character or <c>%token</c> value</param>
+		/// <returns>token name or <c>[illegal]</c> or <c>[unknown]</c></returns>
+		public static string yyName(int token)
+		{
+			if ((token < 0) || (token > yyNames.Length)) return "[illegal]";
+			string name;
+			if ((name = yyNames[token]) != null) return name;
+			return "[unknown]";
+		}
+
+		public static int yyToken(string name)
+		{
+			int token = 0;
+			foreach (var n in yyNames) {
+				if (n == name)
+					return token;
+				token++;
+			}
+			return yyErrorCode;
+		}
+
+		/// <summary>
+		///   thrown for irrecoverable syntax errors and stack overflow.
+		/// </summary>
+		/// <remarks>
+		///   Nested for convenience, does not depend on parser class.
+		/// </remarks>
+		public class yyException : System.Exception
+		{
+			public yyException(string message) : base(message)
+			{
+			}
+		}
+
+		/// <summary>
+		///   must be implemented by a scanner object to supply input to the parser.
+		/// </summary>
+		/// <remarks>
+		///   Nested for convenience, does not depend on parser class.
+		/// </remarks>
+		public interface yyInput
+		{
+			/// <summary>
+			///   move on to next token.
+			/// </summary>
+			/// <returns><c>false</c> if positioned beyond tokens</returns>
+			/// <exception><c>IOException</c> on input error</exception>
+			bool Advance();
+
+			/// <summary>
+			///   classifies current token by <c>%token</c> value or single character.
+			/// </summary>
+			/// <remarks>
+			///   Should not be called if <c>Advance()</c> returned false.
+			/// </remarks>
+			int Token { get; }
+
+			/// <summary>
+			///   value associated with current token.
+			/// </summary>
+			/// <remarks>
+			///   Should not be called if <c>Advance()</c> returned false.
+			/// </remarks>
+			object Value { get; }
+		}
+
+		public interface yyDebugOut
+		{
+			void push(int state, object value);
+			void lex(int state, int token, string name, object value);
+			void shift(int from, int to, int errorFlag);
+			void pop(int state);
+			void discard(int state, int token, string name, object value);
+			void reduce(int from, int to, int rule, string text, int len);
+			void shift(int from, int to);
+			void accept(object value);
+			void error(string message);
+			void reject();
+		}
+
+		public interface yyConsoleOut
+		{
+			void yyWarning(string message, object[] expected);
+			void yyError(string message, object[] expected);
+		}
+
+		public yyConsoleOut yyConsole;
+
+		/// <summary>
+		///   (syntax) warning message.
+		///   Can be overwritten to control message format.
+		/// </summary>
+		/// <param name='message'>text to be displayed</param>
+		/// <param name='expected'>list of acceptable tokens, if available</param>
+		public void yyWarning(string message, params object[] expected)
+		{
+			if (yyConsole == null)
+				return;
+			yyConsole.yyWarning(message, expected);
+		}
+
+		/// <summary>
+		///   (syntax) error message.
+		///   Can be overwritten to control message format.
+		/// </summary>
+		/// <param name='message'>text to be displayed</param>
+		/// <param name='expected'>list of acceptable tokens, if available</param>
+		public void yyError(string message, params object[] expected)
+		{
+			if (yyConsole == null)
+				return;
+			yyConsole.yyError(message, expected);
+		}
+
+		/// <summary>
+		///   computes list of expected tokens on error by tracing the tables.
+		/// </summary>
+		/// <param name='state'>for which to compute the list</param>
+		/// <returns>list of token names</returns>
+		protected string[] yyExpecting(int state)
+		{
+			int token, n, len = 0;
+			bool[] ok = new bool[yyNames.Length];
+
+			if ((n = yySindex[state]) != 0)
+				for (token = n < 0 ? -n : 0;
+					 (token < yyNames.Length) && (n + token < yyTable.Length); ++token)
+					if (yyCheck[n + token] == token && !ok[token] && yyNames[token] != null) {
+						++len;
+						ok[token] = true;
+					}
+			if ((n = yyRindex[state]) != 0)
+				for (token = n < 0 ? -n : 0;
+					 (token < yyNames.Length) && (n + token < yyTable.Length); ++token)
+					if (yyCheck[n + token] == token && !ok[token] && yyNames[token] != null) {
+						++len;
+						ok[token] = true;
+					}
+
+			string[] result = new string[len];
+			for (n = token = 0; n < len; ++token)
+				if (ok[token]) result[n++] = yyNames[token];
+			return result;
+		}
+
+		/// <summary>
+		///   the generated parser, with debugging messages.
+		///   Maintains a dynamic state and value stack.
+		/// </summary>
+		/// <param name='yyLex'>scanner</param>
+		/// <param name='yyDebug'>debug message writer implementing <c>yyDebug</c>,
+		///   or <c>null</c></param>
+		/// <returns>result of the last reduction, if any</returns>
+		/// <exceptions><c>yyException</c> on irrecoverable parse error</exceptions>
+		public object yyParse(yyInput yyLex, yyDebugOut yyDebug)
+		{
+			this.yyDebug = yyDebug;
+			return yyParse(yyLex);
+		}
+
+		/// <summary>
+		///   initial size and increment of the state/value stack [default 256].
+		///    This is not final so that it can be overwritten outside of invocations
+		///    of <c>yyParse()</c>.
+		/// </summary>
+		protected int yyMax;
+
+		protected int yyNest;
+
+		/// <summary>
+		///   executed at the beginning of a reduce action.
+		///   Used as <c>$$ = yyDefault($1)</c>, prior to the user-specified action, if any.
+		///   Can be overwritten to provide deep copy, etc.
+		/// </summary>
+		/// <param first value for $1, or null.
+		/// <return first.
+		protected object yyDefault(object first)
+		{
+			return first;
+		}
+
+		/// <summary>
+		///   the generated parser, with debugging messages.
+		///   Maintains a dynamic state and value stack.
+		/// </summary>
+		/// <param name='yyLex'>scanner</param>
+		/// <returns>result of the last reduction, if any</returns>
+		/// <exceptions><c>yyException</c> on irrecoverable parse error</exceptions>
+		public object yyParse(yyInput yyLex)
+		{
+			yyNest++;
+			if (yyMax <= 0) yyMax = 256;                // initial size
+			int yyState = 0;                            // state stack ptr
+			int[] yyStates = new int[0];                // state stack 
+			object yyVal = null;
+			object[] yyVals = new object[0];            // value stack
+			int yyToken = -1;                           // current input
+			int yyErrorFlag = 0;                        // #tokens to shift
+
+			for (int yyTop = 0; ; ++yyTop) {
+				while (yyTop >= yyStates.Length) {         // dynamically increase
+					yyStates.Push(0);
+					yyVals.Push(null);
+				}
+				yyStates[yyTop] = yyState;
+				yyVals[yyTop] = yyVal;
+				if (yyDebug != null) yyDebug.push(yyState, yyVal);
+
+				for (bool yyLoop = true; yyLoop;) { // discarding a token does not change stack
+					int yyN;
+					if ((yyN = yyDefRed[yyState]) == 0) {   // else [default] reduce (yyN)
+						if (yyToken < 0) {
+							yyToken = yyLex.Advance() ? yyLex.Token : 0;
+							if (yyDebug != null)
+								yyDebug.lex(yyState, yyToken, yyName(yyToken), yyLex.Value);
+						}
+						if ((yyN = yySindex[yyState]) != 0 && ((yyN += yyToken) >= 0)
+							&& (yyN < yyTable.Length) && (yyCheck[yyN] == yyToken)) {
+							if (yyDebug != null)
+								yyDebug.shift(yyState, yyTable[yyN], yyErrorFlag > 0 ? yyErrorFlag - 1 : 0);
+							yyState = yyTable[yyN];     // shift to yyN
+							yyVal = yyLex.Value;
+							yyToken = -1;
+							if (yyErrorFlag > 0) --yyErrorFlag;
+							break;
+						}
+						if ((yyN = yyRindex[yyState]) != 0 && (yyN += yyToken) >= 0
+							&& yyN < yyTable.Length && yyCheck[yyN] == yyToken)
+							yyN = yyTable[yyN];         // reduce (yyN)
+						else
+							switch (yyErrorFlag) {
+							case 0:
+							case 1:
+							case 2:
+								if (yyErrorFlag == 0) {
+									yyError("syntax error, expecting {0}", String.Join(",", yyExpecting(yyState)));
+									if (yyDebug != null) yyDebug.error("syntax error");
+								}
+								yyErrorFlag = 3;
+								do {
+									if ((yyN = yySindex[yyStates[yyTop]]) != 0
+										&& (yyN += yyErrorCode) >= 0 && yyN < yyTable.Length
+										&& yyCheck[yyN] == yyErrorCode) {
+										if (yyDebug != null)
+											yyDebug.shift(yyStates[yyTop], yyTable[yyN], 3);
+										yyState = yyTable[yyN];
+										yyVal = yyLex.Value;
+										yyLoop = false;
+										break;
+									}
+									if (yyDebug != null) yyDebug.pop(yyStates[yyTop]);
+								} while (--yyTop >= 0);
+								if (!yyLoop)
+									continue;
+								if (yyDebug != null) yyDebug.reject();
+								throw new yyException("irrecoverable syntax error");
+							case 3:
+								if (yyToken == 0) {
+									yyNest--;
+									if (yyNest <= 0)
+										return yyVal;
+									if (yyDebug != null) yyDebug.reject();
+									throw new yyException("irrecoverable syntax error at end-of-file");
+								}
+								if (yyDebug != null)
+									yyDebug.discard(yyState, yyToken, yyName(yyToken),
+									  yyLex.Value);
+								yyToken = -1;
+								continue;           // leave stack alone
+							}
+					}
+					int yyV = yyTop + 1 - yyLen[yyN];
+					if (yyDebug != null)
+						yyDebug.reduce(yyState, yyStates[yyV - 1], yyN, yyRule[yyN], yyLen[yyN]);
+					yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
+					switch (yyN) {
+					case 1:
+#line 181 "mrb_parse.jay"
+						{
+							this.lstate = mrb_lex_state_enum.EXPR_BEG;
+							if (this.locals == null) this.locals = new locals_node(null);
+						}
+						break;
+					case 2:
+#line 186 "mrb_parse.jay"
+						{
+							this.tree = new_scope(((node)yyVals[0 + yyTop]));
+							this.tree.NODE_LINENO(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 3:
+#line 193 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[-1 + yyTop]);
+						}
+						break;
+					case 4:
+#line 199 "mrb_parse.jay"
+						{
+							yyVal = new_begin(null);
+						}
+						break;
+					case 5:
+#line 203 "mrb_parse.jay"
+						{
+							yyVal = new_begin(((node)yyVals[0 + yyTop]));
+							((node)yyVal).NODE_LINENO(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 6:
+#line 208 "mrb_parse.jay"
+						{
+							yyVal = push(((node)yyVals[-2 + yyTop]), newline_node(((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 7:
+#line 212 "mrb_parse.jay"
+						{
+							yyVal = new_begin(null);
+						}
+						break;
+					case 9:
+#line 219 "mrb_parse.jay"
+						{
+							yyVal = local_switch();
+						}
+						break;
+					case 10:
+#line 223 "mrb_parse.jay"
+						{
+							yyError("BEGIN not supported");
+							local_resume(((locals_node)yyVals[-3 + yyTop]));
+							yyVal = null;
+						}
+						break;
+					case 11:
+#line 234 "mrb_parse.jay"
+						{
+							if (((node)yyVals[-2 + yyTop]) != null) {
+								yyVal = new_rescue(((node)yyVals[-3 + yyTop]), ((node)yyVals[-2 + yyTop]), ((node)yyVals[-1 + yyTop]));
+								((node)yyVal).NODE_LINENO(((node)yyVals[-3 + yyTop]));
+							}
+							else if (((node)yyVals[-1 + yyTop]) != null) {
+								yyWarning("else without rescue is useless");
+								yyVal = push(((node)yyVals[-3 + yyTop]), ((node)yyVals[-1 + yyTop]));
+							}
+							else {
+								yyVal = ((node)yyVals[-3 + yyTop]);
+							}
+							if (((node)yyVals[0 + yyTop]) != null) {
+								if (yyVal != null) {
+									yyVal = new_ensure(((node)yyVal), ((node)yyVals[0 + yyTop]));
+								}
+								else {
+									yyVal = push(((node)yyVals[0 + yyTop]), new_nil());
+								}
+							}
+						}
+						break;
+					case 12:
+#line 258 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[-1 + yyTop]);
+						}
+						break;
+					case 13:
+#line 264 "mrb_parse.jay"
+						{
+							yyVal = new_begin(null);
+						}
+						break;
+					case 14:
+#line 268 "mrb_parse.jay"
+						{
+							yyVal = new_begin(((node)yyVals[0 + yyTop]));
+							((node)yyVal).NODE_LINENO(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 15:
+#line 273 "mrb_parse.jay"
+						{
+							yyVal = push(((node)yyVals[-2 + yyTop]), newline_node(((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 16:
+#line 277 "mrb_parse.jay"
+						{
+							yyVal = new_begin(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 17:
+#line 282 "mrb_parse.jay"
+						{ this.lstate = mrb_lex_state_enum.EXPR_FNAME; }
+						break;
+					case 18:
+#line 283 "mrb_parse.jay"
+						{
+							yyVal = new_alias(((mrb_sym)yyVals[-2 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 19:
+#line 287 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[0 + yyTop]);
+						}
+						break;
+					case 20:
+#line 291 "mrb_parse.jay"
+						{
+							yyVal = new_if(cond(((node)yyVals[0 + yyTop])), ((node)yyVals[-2 + yyTop]), null);
+						}
+						break;
+					case 21:
+#line 295 "mrb_parse.jay"
+						{
+							yyVal = new_unless(cond(((node)yyVals[0 + yyTop])), ((node)yyVals[-2 + yyTop]), null);
+						}
+						break;
+					case 22:
+#line 299 "mrb_parse.jay"
+						{
+							yyVal = new_while(cond(((node)yyVals[0 + yyTop])), ((node)yyVals[-2 + yyTop]));
+						}
+						break;
+					case 23:
+#line 303 "mrb_parse.jay"
+						{
+							yyVal = new_until(cond(((node)yyVals[0 + yyTop])), ((node)yyVals[-2 + yyTop]));
+						}
+						break;
+					case 24:
+#line 307 "mrb_parse.jay"
+						{
+							yyVal = new_mod_rescue(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 25:
+#line 311 "mrb_parse.jay"
+						{
+							yyError("END not supported");
+							yyVal = new_postexe(((node)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 27:
+#line 317 "mrb_parse.jay"
+						{
+							yyVal = new_masgn(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 28:
+#line 321 "mrb_parse.jay"
+						{
+							yyVal = new_asgn(((node)yyVals[-2 + yyTop]), new_array(((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 29:
+#line 325 "mrb_parse.jay"
+						{
+							yyVal = new_masgn(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 30:
+#line 329 "mrb_parse.jay"
+						{
+							yyVal = new_masgn(((node)yyVals[-2 + yyTop]), new_array(((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 32:
+#line 336 "mrb_parse.jay"
+						{
+							yyVal = new_asgn(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 33:
+#line 340 "mrb_parse.jay"
+						{
+							yyVal = new_op_asgn(((node)yyVals[-2 + yyTop]), ((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 34:
+#line 344 "mrb_parse.jay"
+						{
+							yyVal = new_op_asgn(new_call(((node)yyVals[-5 + yyTop]), intern("[]", 2), ((node)yyVals[-3 + yyTop]), (MrbTokens)'.'), ((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 35:
+#line 348 "mrb_parse.jay"
+						{
+							yyVal = new_op_asgn(new_call(((node)yyVals[-4 + yyTop]), ((mrb_sym)yyVals[-2 + yyTop]), null, ((MrbTokens)yyVals[-3 + yyTop])), ((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 36:
+#line 352 "mrb_parse.jay"
+						{
+							yyVal = new_op_asgn(new_call(((node)yyVals[-4 + yyTop]), ((mrb_sym)yyVals[-2 + yyTop]), null, ((MrbTokens)yyVals[-3 + yyTop])), ((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 37:
+#line 356 "mrb_parse.jay"
+						{
+							yyError("constant re-assignment");
+							yyVal = null;
+						}
+						break;
+					case 38:
+#line 361 "mrb_parse.jay"
+						{
+							yyVal = new_op_asgn(new_call(((node)yyVals[-4 + yyTop]), ((mrb_sym)yyVals[-2 + yyTop]), null, MrbTokens.tCOLON2), ((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 39:
+#line 365 "mrb_parse.jay"
+						{
+							backref_error(((node)yyVals[-2 + yyTop]));
+							yyVal = new_begin(null);
+						}
+						break;
+					case 41:
+#line 373 "mrb_parse.jay"
+						{
+							yyVal = new_mod_rescue(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 44:
+#line 382 "mrb_parse.jay"
+						{
+							yyVal = new_and(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 45:
+#line 386 "mrb_parse.jay"
+						{
+							yyVal = new_or(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 46:
+#line 390 "mrb_parse.jay"
+						{
+							yyVal = call_uni_op(cond(((node)yyVals[0 + yyTop])), "!");
+						}
+						break;
+					case 47:
+#line 394 "mrb_parse.jay"
+						{
+							yyVal = call_uni_op(cond(((node)yyVals[0 + yyTop])), "!");
+						}
+						break;
+					case 49:
+#line 401 "mrb_parse.jay"
+						{
+							if (((node)yyVals[0 + yyTop]) == null) yyVal = new_nil();
+							else {
+								void_expr_error(((node)yyVals[0 + yyTop]));
+								yyVal = ((node)yyVals[0 + yyTop]);
+							}
+						}
+						break;
+					case 54:
+#line 419 "mrb_parse.jay"
+						{
+							local_nest();
+						}
+						break;
+					case 55:
+#line 425 "mrb_parse.jay"
+						{
+							yyVal = new_block(((node)yyVals[-2 + yyTop]), ((node)yyVals[-1 + yyTop]), true);
+							local_unnest();
+						}
+						break;
+					case 56:
+#line 432 "mrb_parse.jay"
+						{
+							yyVal = new_fcall(((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 57:
+#line 436 "mrb_parse.jay"
+						{
+							args_with_block(((node)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+							yyVal = new_fcall(((mrb_sym)yyVals[-2 + yyTop]), ((node)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 58:
+#line 441 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-3 + yyTop]), ((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]), ((MrbTokens)yyVals[-2 + yyTop]));
+						}
+						break;
+					case 59:
+#line 445 "mrb_parse.jay"
+						{
+							args_with_block(((node)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+							yyVal = new_call(((node)yyVals[-4 + yyTop]), ((mrb_sym)yyVals[-2 + yyTop]), ((node)yyVals[-1 + yyTop]), ((MrbTokens)yyVals[-3 + yyTop]));
+						}
+						break;
+					case 60:
+#line 450 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-3 + yyTop]), ((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]), MrbTokens.tCOLON2);
+						}
+						break;
+					case 61:
+#line 454 "mrb_parse.jay"
+						{
+							args_with_block(((node)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+							yyVal = new_call(((node)yyVals[-4 + yyTop]), ((mrb_sym)yyVals[-2 + yyTop]), ((node)yyVals[-1 + yyTop]), MrbTokens.tCOLON2);
+						}
+						break;
+					case 62:
+#line 459 "mrb_parse.jay"
+						{
+							yyVal = new_super(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 63:
+#line 463 "mrb_parse.jay"
+						{
+							yyVal = new_yield(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 64:
+#line 467 "mrb_parse.jay"
+						{
+							yyVal = new_return(ret_args(((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 65:
+#line 471 "mrb_parse.jay"
+						{
+							yyVal = new_break(ret_args(((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 66:
+#line 475 "mrb_parse.jay"
+						{
+							yyVal = new_next(ret_args(((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 67:
+#line 481 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[0 + yyTop]);
+						}
+						break;
+					case 68:
+#line 485 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[-1 + yyTop]);
+						}
+						break;
+					case 70:
+#line 492 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[-1 + yyTop]);
+						}
+						break;
+					case 71:
+#line 498 "mrb_parse.jay"
+						{
+							yyVal = list1(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 72:
+#line 502 "mrb_parse.jay"
+						{
+							yyVal = list1(push(((node)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 73:
+#line 506 "mrb_parse.jay"
+						{
+							yyVal = list2(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 74:
+#line 510 "mrb_parse.jay"
+						{
+							yyVal = list3(((node)yyVals[-4 + yyTop]), ((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 75:
+#line 514 "mrb_parse.jay"
+						{
+							yyVal = list2(((node)yyVals[-1 + yyTop]), new_nil());
+						}
+						break;
+					case 76:
+#line 518 "mrb_parse.jay"
+						{
+							yyVal = list3(((node)yyVals[-3 + yyTop]), new_nil(), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 77:
+#line 522 "mrb_parse.jay"
+						{
+							yyVal = list2(null, ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 78:
+#line 526 "mrb_parse.jay"
+						{
+							yyVal = list3(null, ((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 79:
+#line 530 "mrb_parse.jay"
+						{
+							yyVal = list2(null, new_nil());
+						}
+						break;
+					case 80:
+#line 534 "mrb_parse.jay"
+						{
+							yyVal = list3(null, new_nil(), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 82:
+#line 541 "mrb_parse.jay"
+						{
+							yyVal = new_masgn(((node)yyVals[-1 + yyTop]), null);
+						}
+						break;
+					case 83:
+#line 547 "mrb_parse.jay"
+						{
+							yyVal = list1(((node)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 84:
+#line 551 "mrb_parse.jay"
+						{
+							yyVal = push(((node)yyVals[-2 + yyTop]), ((node)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 85:
+#line 557 "mrb_parse.jay"
+						{
+							yyVal = list1(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 86:
+#line 561 "mrb_parse.jay"
+						{
+							yyVal = push(((node)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 87:
+#line 567 "mrb_parse.jay"
+						{
+							assignable(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 88:
+#line 571 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-3 + yyTop]), intern("[]", 2), ((node)yyVals[-1 + yyTop]), (MrbTokens)'.');
+						}
+						break;
+					case 89:
+#line 575 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-2 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]), null, ((MrbTokens)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 90:
+#line 579 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-2 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]), null, MrbTokens.tCOLON2);
+						}
+						break;
+					case 91:
+#line 583 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-2 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]), null, ((MrbTokens)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 92:
+#line 587 "mrb_parse.jay"
+						{
+							if (this.in_def != 0 || this.in_single != 0)
+								yyError("dynamic constant assignment");
+							yyVal = new_colon2(((node)yyVals[-2 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 93:
+#line 593 "mrb_parse.jay"
+						{
+							if (this.in_def != 0 || this.in_single != 0)
+								yyError("dynamic constant assignment");
+							yyVal = new_colon3(((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 94:
+#line 599 "mrb_parse.jay"
+						{
+							backref_error(((node)yyVals[0 + yyTop]));
+							yyVal = null;
+						}
+						break;
+					case 95:
+#line 606 "mrb_parse.jay"
+						{
+							assignable(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 96:
+#line 610 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-3 + yyTop]), intern("[]", 2), ((node)yyVals[-1 + yyTop]), (MrbTokens)'.');
+						}
+						break;
+					case 97:
+#line 614 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-2 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]), null, ((MrbTokens)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 98:
+#line 618 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-2 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]), null, MrbTokens.tCOLON2);
+						}
+						break;
+					case 99:
+#line 622 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-2 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]), null, ((MrbTokens)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 100:
+#line 626 "mrb_parse.jay"
+						{
+							if (this.in_def != 0 || this.in_single != 0)
+								yyError("dynamic constant assignment");
+							yyVal = new_colon2(((node)yyVals[-2 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 101:
+#line 632 "mrb_parse.jay"
+						{
+							if (this.in_def != 0 || this.in_single != 0)
+								yyError("dynamic constant assignment");
+							yyVal = new_colon3(((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 102:
+#line 638 "mrb_parse.jay"
+						{
+							backref_error(((node)yyVals[0 + yyTop]));
+							yyVal = null;
+						}
+						break;
+					case 103:
+#line 645 "mrb_parse.jay"
+						{
+							yyError("class/module name must be CONSTANT");
+						}
+						break;
+					case 105:
+#line 652 "mrb_parse.jay"
+						{
+							yyVal = cons(1, ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 106:
+#line 656 "mrb_parse.jay"
+						{
+							yyVal = cons(0, ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 107:
+#line 660 "mrb_parse.jay"
+						{
+							yyVal = cons(((node)yyVals[-2 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 111:
+#line 669 "mrb_parse.jay"
+						{
+							this.lstate = mrb_lex_state_enum.EXPR_ENDFN;
+							yyVal = ((mrb_sym)yyVals[0 + yyTop]);
+						}
+						break;
+					case 112:
+#line 674 "mrb_parse.jay"
+						{
+							this.lstate = mrb_lex_state_enum.EXPR_ENDFN;
+							yyVal = ((mrb_sym)yyVals[0 + yyTop]);
+						}
+						break;
+					case 115:
+#line 685 "mrb_parse.jay"
+						{
+							yyVal = new_undef(((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 116:
+#line 688 "mrb_parse.jay"
+						{ this.lstate = mrb_lex_state_enum.EXPR_FNAME; }
+						break;
+					case 117:
+#line 689 "mrb_parse.jay"
+						{
+							yyVal = push(((node)yyVals[-3 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 118:
+#line 694 "mrb_parse.jay"
+						{ yyVal = intern_c('|'); }
+						break;
+					case 119:
+#line 695 "mrb_parse.jay"
+						{ yyVal = intern_c('^'); }
+						break;
+					case 120:
+#line 696 "mrb_parse.jay"
+						{ yyVal = intern_c('&'); }
+						break;
+					case 121:
+#line 697 "mrb_parse.jay"
+						{ yyVal = intern("<=>", 3); }
+						break;
+					case 122:
+#line 698 "mrb_parse.jay"
+						{ yyVal = intern("==", 2); }
+						break;
+					case 123:
+#line 699 "mrb_parse.jay"
+						{ yyVal = intern("===", 3); }
+						break;
+					case 124:
+#line 700 "mrb_parse.jay"
+						{ yyVal = intern("=~", 2); }
+						break;
+					case 125:
+#line 701 "mrb_parse.jay"
+						{ yyVal = intern("!~", 2); }
+						break;
+					case 126:
+#line 702 "mrb_parse.jay"
+						{ yyVal = intern_c('>'); }
+						break;
+					case 127:
+#line 703 "mrb_parse.jay"
+						{ yyVal = intern(">=", 2); }
+						break;
+					case 128:
+#line 704 "mrb_parse.jay"
+						{ yyVal = intern_c('<'); }
+						break;
+					case 129:
+#line 705 "mrb_parse.jay"
+						{ yyVal = intern("<=", 2); }
+						break;
+					case 130:
+#line 706 "mrb_parse.jay"
+						{ yyVal = intern("!=", 2); }
+						break;
+					case 131:
+#line 707 "mrb_parse.jay"
+						{ yyVal = intern("<<", 2); }
+						break;
+					case 132:
+#line 708 "mrb_parse.jay"
+						{ yyVal = intern(">>", 2); }
+						break;
+					case 133:
+#line 709 "mrb_parse.jay"
+						{ yyVal = intern_c('+'); }
+						break;
+					case 134:
+#line 710 "mrb_parse.jay"
+						{ yyVal = intern_c('-'); }
+						break;
+					case 135:
+#line 711 "mrb_parse.jay"
+						{ yyVal = intern_c('*'); }
+						break;
+					case 136:
+#line 712 "mrb_parse.jay"
+						{ yyVal = intern_c('*'); }
+						break;
+					case 137:
+#line 713 "mrb_parse.jay"
+						{ yyVal = intern_c('/'); }
+						break;
+					case 138:
+#line 714 "mrb_parse.jay"
+						{ yyVal = intern_c('%'); }
+						break;
+					case 139:
+#line 715 "mrb_parse.jay"
+						{ yyVal = intern("**", 2); }
+						break;
+					case 140:
+#line 716 "mrb_parse.jay"
+						{ yyVal = intern_c('!'); }
+						break;
+					case 141:
+#line 717 "mrb_parse.jay"
+						{ yyVal = intern_c('~'); }
+						break;
+					case 142:
+#line 718 "mrb_parse.jay"
+						{ yyVal = intern("+@", 2); }
+						break;
+					case 143:
+#line 719 "mrb_parse.jay"
+						{ yyVal = intern("-@", 2); }
+						break;
+					case 144:
+#line 720 "mrb_parse.jay"
+						{ yyVal = intern("[]", 2); }
+						break;
+					case 145:
+#line 721 "mrb_parse.jay"
+						{ yyVal = intern("[]=", 3); }
+						break;
+					case 146:
+#line 722 "mrb_parse.jay"
+						{ yyVal = intern_c('`'); }
+						break;
+					case 187:
+#line 740 "mrb_parse.jay"
+						{
+							yyVal = new_asgn(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 188:
+#line 744 "mrb_parse.jay"
+						{
+							yyVal = new_op_asgn(((node)yyVals[-2 + yyTop]), ((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 189:
+#line 748 "mrb_parse.jay"
+						{
+							yyVal = new_op_asgn(new_call(((node)yyVals[-5 + yyTop]), intern("[]", 2), ((node)yyVals[-3 + yyTop]), (MrbTokens)'.'), ((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 190:
+#line 752 "mrb_parse.jay"
+						{
+							yyVal = new_op_asgn(new_call(((node)yyVals[-4 + yyTop]), ((mrb_sym)yyVals[-2 + yyTop]), null, ((MrbTokens)yyVals[-3 + yyTop])), ((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 191:
+#line 756 "mrb_parse.jay"
+						{
+							yyVal = new_op_asgn(new_call(((node)yyVals[-4 + yyTop]), ((mrb_sym)yyVals[-2 + yyTop]), null, ((MrbTokens)yyVals[-3 + yyTop])), ((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 192:
+#line 760 "mrb_parse.jay"
+						{
+							yyVal = new_op_asgn(new_call(((node)yyVals[-4 + yyTop]), ((mrb_sym)yyVals[-2 + yyTop]), null, MrbTokens.tCOLON2), ((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 193:
+#line 764 "mrb_parse.jay"
+						{
+							yyError("constant re-assignment");
+							yyVal = new_begin(null);
+						}
+						break;
+					case 194:
+#line 769 "mrb_parse.jay"
+						{
+							yyError("constant re-assignment");
+							yyVal = new_begin(null);
+						}
+						break;
+					case 195:
+#line 774 "mrb_parse.jay"
+						{
+							backref_error(((node)yyVals[-2 + yyTop]));
+							yyVal = new_begin(null);
+						}
+						break;
+					case 196:
+#line 779 "mrb_parse.jay"
+						{
+							yyVal = new_dot2(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 197:
+#line 783 "mrb_parse.jay"
+						{
+							yyVal = new_dot3(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 198:
+#line 787 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), "+", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 199:
+#line 791 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), "-", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 200:
+#line 795 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), "*", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 201:
+#line 799 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), "/", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 202:
+#line 803 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), "%", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 203:
+#line 807 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), "**", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 204:
+#line 811 "mrb_parse.jay"
+						{
+							yyVal = call_uni_op(call_bin_op(((node)yyVals[-2 + yyTop]), "**", ((node)yyVals[0 + yyTop])), "-@");
+						}
+						break;
+					case 205:
+#line 815 "mrb_parse.jay"
+						{
+							yyVal = call_uni_op(call_bin_op(((node)yyVals[-2 + yyTop]), "**", ((node)yyVals[0 + yyTop])), "-@");
+						}
+						break;
+					case 206:
+#line 819 "mrb_parse.jay"
+						{
+							yyVal = call_uni_op(((node)yyVals[0 + yyTop]), "+@");
+						}
+						break;
+					case 207:
+#line 823 "mrb_parse.jay"
+						{
+							yyVal = call_uni_op(((node)yyVals[0 + yyTop]), "-@");
+						}
+						break;
+					case 208:
+#line 827 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), "|", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 209:
+#line 831 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), "^", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 210:
+#line 835 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), "&", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 211:
+#line 839 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), "<=>", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 212:
+#line 843 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), ">", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 213:
+#line 847 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), ">=", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 214:
+#line 851 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), "<", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 215:
+#line 855 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), "<=", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 216:
+#line 859 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), "==", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 217:
+#line 863 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), "===", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 218:
+#line 867 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), "!=", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 219:
+#line 871 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), "=~", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 220:
+#line 875 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), "!~", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 221:
+#line 879 "mrb_parse.jay"
+						{
+							yyVal = call_uni_op(cond(((node)yyVals[0 + yyTop])), "!");
+						}
+						break;
+					case 222:
+#line 883 "mrb_parse.jay"
+						{
+							yyVal = call_uni_op(cond(((node)yyVals[0 + yyTop])), "~");
+						}
+						break;
+					case 223:
+#line 887 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), "<<", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 224:
+#line 891 "mrb_parse.jay"
+						{
+							yyVal = call_bin_op(((node)yyVals[-2 + yyTop]), ">>", ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 225:
+#line 895 "mrb_parse.jay"
+						{
+							yyVal = new_and(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 226:
+#line 899 "mrb_parse.jay"
+						{
+							yyVal = new_or(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 227:
+#line 903 "mrb_parse.jay"
+						{
+							yyVal = new_if(cond(((node)yyVals[-5 + yyTop])), ((node)yyVals[-3 + yyTop]), ((node)yyVals[0 + yyTop]), true);
+						}
+						break;
+					case 228:
+#line 907 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[0 + yyTop]);
+						}
+						break;
+					case 230:
+#line 914 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[-1 + yyTop]);
+							((node)yyVal).NODE_LINENO(((node)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 231:
+#line 919 "mrb_parse.jay"
+						{
+							yyVal = push(((node)yyVals[-3 + yyTop]), new_hash(((node)yyVals[-1 + yyTop])));
+						}
+						break;
+					case 232:
+#line 923 "mrb_parse.jay"
+						{
+							yyVal = cons(new_hash(((node)yyVals[-1 + yyTop])), null);
+							((node)yyVal).NODE_LINENO(((node)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 233:
+#line 930 "mrb_parse.jay"
+						{
+							void_expr_error(((node)yyVals[0 + yyTop]));
+							yyVal = ((node)yyVals[0 + yyTop]);
+						}
+						break;
+					case 234:
+#line 935 "mrb_parse.jay"
+						{
+							void_expr_error(((node)yyVals[-2 + yyTop]));
+							yyVal = new_mod_rescue(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 235:
+#line 942 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[-1 + yyTop]);
+						}
+						break;
+					case 240:
+#line 954 "mrb_parse.jay"
+						{
+							yyVal = cons(((node)yyVals[-1 + yyTop]), null);
+							((node)yyVal).NODE_LINENO(((node)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 241:
+#line 959 "mrb_parse.jay"
+						{
+							yyVal = cons(push(((node)yyVals[-3 + yyTop]), new_hash(((node)yyVals[-1 + yyTop]))), null);
+							((node)yyVal).NODE_LINENO(((node)yyVals[-3 + yyTop]));
+						}
+						break;
+					case 242:
+#line 964 "mrb_parse.jay"
+						{
+							yyVal = cons(list1(new_hash(((node)yyVals[-1 + yyTop]))), null);
+							((node)yyVal).NODE_LINENO(((node)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 243:
+#line 971 "mrb_parse.jay"
+						{
+							yyVal = cons(list1(((node)yyVals[0 + yyTop])), null);
+							((node)yyVal).NODE_LINENO(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 244:
+#line 976 "mrb_parse.jay"
+						{
+							yyVal = cons(((node)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+							((node)yyVal).NODE_LINENO(((node)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 245:
+#line 981 "mrb_parse.jay"
+						{
+							yyVal = cons(list1(new_hash(((node)yyVals[-1 + yyTop]))), ((node)yyVals[0 + yyTop]));
+							((node)yyVal).NODE_LINENO(((node)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 246:
+#line 986 "mrb_parse.jay"
+						{
+							yyVal = cons(push(((node)yyVals[-3 + yyTop]), new_hash(((node)yyVals[-1 + yyTop]))), ((node)yyVals[0 + yyTop]));
+							((node)yyVal).NODE_LINENO(((node)yyVals[-3 + yyTop]));
+						}
+						break;
+					case 247:
+#line 991 "mrb_parse.jay"
+						{
+							yyVal = cons(null, ((node)yyVals[0 + yyTop]));
+							((node)yyVal).NODE_LINENO(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 248:
+#line 997 "mrb_parse.jay"
+						{
+							yyVal = (stack_type)this.cmdarg_stack;
+							CMDARG_PUSH(1);
+						}
+						break;
+					case 249:
+#line 1002 "mrb_parse.jay"
+						{
+							this.cmdarg_stack = ((stack_type)yyVals[-1 + yyTop]);
+							yyVal = ((node)yyVals[0 + yyTop]);
+						}
+						break;
+					case 250:
+#line 1009 "mrb_parse.jay"
+						{
+							yyVal = new_block_arg((node)((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 251:
+#line 1015 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[0 + yyTop]);
+						}
+						break;
+					case 252:
+#line 1019 "mrb_parse.jay"
+						{
+							yyVal = null;
+						}
+						break;
+					case 255:
+#line 1029 "mrb_parse.jay"
+						{
+							void_expr_error(((node)yyVals[0 + yyTop]));
+							yyVal = cons(((node)yyVals[0 + yyTop]), null);
+							((node)yyVal).NODE_LINENO(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 256:
+#line 1035 "mrb_parse.jay"
+						{
+							void_expr_error(((node)yyVals[0 + yyTop]));
+							yyVal = cons(new_splat(((node)yyVals[0 + yyTop])), null);
+							((node)yyVal).NODE_LINENO(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 257:
+#line 1041 "mrb_parse.jay"
+						{
+							void_expr_error(((node)yyVals[0 + yyTop]));
+							yyVal = push(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 258:
+#line 1046 "mrb_parse.jay"
+						{
+							void_expr_error(((node)yyVals[0 + yyTop]));
+							yyVal = push(((node)yyVals[-3 + yyTop]), new_splat(((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 259:
+#line 1053 "mrb_parse.jay"
+						{
+							void_expr_error(((node)yyVals[0 + yyTop]));
+							yyVal = push(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 260:
+#line 1058 "mrb_parse.jay"
+						{
+							void_expr_error(((node)yyVals[0 + yyTop]));
+							yyVal = push(((node)yyVals[-3 + yyTop]), new_splat(((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 261:
+#line 1063 "mrb_parse.jay"
+						{
+							void_expr_error(((node)yyVals[0 + yyTop]));
+							yyVal = list1(new_splat(((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 269:
+#line 1077 "mrb_parse.jay"
+						{
+							yyVal = new_fcall(((mrb_sym)yyVals[0 + yyTop]), null);
+						}
+						break;
+					case 270:
+#line 1081 "mrb_parse.jay"
+						{
+							yyVal = (stack_type)this.cmdarg_stack;
+							this.cmdarg_stack = 0;
+						}
+						break;
+					case 271:
+#line 1087 "mrb_parse.jay"
+						{
+							this.cmdarg_stack = ((stack_type)yyVals[-2 + yyTop]);
+							yyVal = ((node)yyVals[-1 + yyTop]);
+						}
+						break;
+					case 272:
+#line 1092 "mrb_parse.jay"
+						{
+							yyVal = (stack_type)this.cmdarg_stack;
+							this.cmdarg_stack = 0;
+						}
+						break;
+					case 273:
+#line 1096 "mrb_parse.jay"
+						{ this.lstate = mrb_lex_state_enum.EXPR_ENDARG; }
+						break;
+					case 274:
+#line 1097 "mrb_parse.jay"
+						{
+							this.cmdarg_stack = ((stack_type)yyVals[-3 + yyTop]);
+							yyVal = ((node)yyVals[-2 + yyTop]);
+						}
+						break;
+					case 275:
+#line 1101 "mrb_parse.jay"
+						{ this.lstate = mrb_lex_state_enum.EXPR_ENDARG; }
+						break;
+					case 276:
+#line 1102 "mrb_parse.jay"
+						{
+							yyVal = new_nil();
+						}
+						break;
+					case 277:
+#line 1106 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[-1 + yyTop]);
+						}
+						break;
+					case 278:
+#line 1110 "mrb_parse.jay"
+						{
+							yyVal = new_colon2(((node)yyVals[-2 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 279:
+#line 1114 "mrb_parse.jay"
+						{
+							yyVal = new_colon3(((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 280:
+#line 1118 "mrb_parse.jay"
+						{
+							yyVal = new_array(((node)yyVals[-1 + yyTop]));
+							((node)yyVal).NODE_LINENO(((node)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 281:
+#line 1123 "mrb_parse.jay"
+						{
+							yyVal = new_hash(((node)yyVals[-1 + yyTop]));
+							((node)yyVal).NODE_LINENO(((node)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 282:
+#line 1128 "mrb_parse.jay"
+						{
+							yyVal = new_return(null);
+						}
+						break;
+					case 283:
+#line 1132 "mrb_parse.jay"
+						{
+							yyVal = new_yield(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 284:
+#line 1136 "mrb_parse.jay"
+						{
+							yyVal = call_uni_op(cond(((node)yyVals[-1 + yyTop])), "!");
+						}
+						break;
+					case 285:
+#line 1140 "mrb_parse.jay"
+						{
+							yyVal = call_uni_op(new_nil(), "!");
+						}
+						break;
+					case 286:
+#line 1144 "mrb_parse.jay"
+						{
+							yyVal = new_fcall(((mrb_sym)yyVals[-1 + yyTop]), cons(null, ((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 288:
+#line 1149 "mrb_parse.jay"
+						{
+							call_with_block(((node)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+							yyVal = ((node)yyVals[-1 + yyTop]);
+						}
+						break;
+					case 289:
+#line 1154 "mrb_parse.jay"
+						{
+							local_nest();
+							yyVal = (int)this.lpar_beg;
+							this.lpar_beg = ++this.paren_nest;
+						}
+						break;
+					case 290:
+#line 1160 "mrb_parse.jay"
+						{
+							yyVal = (stack_type)this.cmdarg_stack;
+							this.cmdarg_stack = 0;
+						}
+						break;
+					case 291:
+#line 1165 "mrb_parse.jay"
+						{
+							this.lpar_beg = ((int)yyVals[-3 + yyTop]);
+							yyVal = new_lambda(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+							local_unnest();
+							this.cmdarg_stack = ((stack_type)yyVals[-1 + yyTop]);
+							CMDARG_LEXPOP();
+						}
+						break;
+					case 292:
+#line 1176 "mrb_parse.jay"
+						{
+							yyVal = new_if(cond(((node)yyVals[-4 + yyTop])), ((node)yyVals[-2 + yyTop]), ((node)yyVals[-1 + yyTop]));
+							((node)yyVal).SET_LINENO(((int)yyVals[-5 + yyTop]));
+						}
+						break;
+					case 293:
+#line 1184 "mrb_parse.jay"
+						{
+							yyVal = new_unless(cond(((node)yyVals[-4 + yyTop])), ((node)yyVals[-2 + yyTop]), ((node)yyVals[-1 + yyTop]));
+							((node)yyVal).SET_LINENO(((int)yyVals[-5 + yyTop]));
+						}
+						break;
+					case 294:
+#line 1188 "mrb_parse.jay"
+						{ COND_PUSH(1); }
+						break;
+					case 295:
+#line 1188 "mrb_parse.jay"
+						{ COND_POP(); }
+						break;
+					case 296:
+#line 1191 "mrb_parse.jay"
+						{
+							yyVal = new_while(cond(((node)yyVals[-4 + yyTop])), ((node)yyVals[-1 + yyTop]));
+							((node)yyVal).SET_LINENO(((int)yyVals[-6 + yyTop]));
+						}
+						break;
+					case 297:
+#line 1195 "mrb_parse.jay"
+						{ COND_PUSH(1); }
+						break;
+					case 298:
+#line 1195 "mrb_parse.jay"
+						{ COND_POP(); }
+						break;
+					case 299:
+#line 1198 "mrb_parse.jay"
+						{
+							yyVal = new_until(cond(((node)yyVals[-4 + yyTop])), ((node)yyVals[-1 + yyTop]));
+							((node)yyVal).SET_LINENO(((int)yyVals[-6 + yyTop]));
+						}
+						break;
+					case 300:
+#line 1205 "mrb_parse.jay"
+						{
+							yyVal = new_case(((node)yyVals[-3 + yyTop]), ((node)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 301:
+#line 1209 "mrb_parse.jay"
+						{
+							yyVal = new_case(null, ((node)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 302:
+#line 1213 "mrb_parse.jay"
+						{ COND_PUSH(1); }
+						break;
+					case 303:
+#line 1215 "mrb_parse.jay"
+						{ COND_POP(); }
+						break;
+					case 304:
+#line 1218 "mrb_parse.jay"
+						{
+							yyVal = new_for(((node)yyVals[-7 + yyTop]), ((node)yyVals[-4 + yyTop]), ((node)yyVals[-1 + yyTop]));
+							((node)yyVal).SET_LINENO(((int)yyVals[-8 + yyTop]));
+						}
+						break;
+					case 305:
+#line 1224 "mrb_parse.jay"
+						{
+							if (this.in_def != 0 || this.in_single != 0)
+								yyError("class definition in method body");
+							yyVal = local_switch();
+						}
+						break;
+					case 306:
+#line 1231 "mrb_parse.jay"
+						{
+							yyVal = new_class(((node)yyVals[-4 + yyTop]), ((node)yyVals[-3 + yyTop]), ((node)yyVals[-1 + yyTop]));
+							((node)yyVal).SET_LINENO(((int)yyVals[-5 + yyTop]));
+							local_resume(((locals_node)yyVals[-2 + yyTop]));
+						}
+						break;
+					case 307:
+#line 1238 "mrb_parse.jay"
+						{
+							yyVal = (int)this.in_def;
+							this.in_def = 0;
+						}
+						break;
+					case 308:
+#line 1243 "mrb_parse.jay"
+						{
+							yyVal = cons(local_switch(), this.in_single);
+							this.in_single = 0;
+						}
+						break;
+					case 309:
+#line 1249 "mrb_parse.jay"
+						{
+							yyVal = new_sclass(((node)yyVals[-5 + yyTop]), ((node)yyVals[-1 + yyTop]));
+							((node)yyVal).SET_LINENO(((int)yyVals[-7 + yyTop]));
+							local_resume((locals_node)((node)yyVals[-2 + yyTop]).car);
+							this.in_def = ((int)yyVals[-4 + yyTop]);
+							this.in_single = (int)(((node)yyVals[-2 + yyTop]).cdr);
+						}
+						break;
+					case 310:
+#line 1258 "mrb_parse.jay"
+						{
+							if (this.in_def != 0 || this.in_single != 0)
+								yyError("module definition in method body");
+							yyVal = local_switch();
+						}
+						break;
+					case 311:
+#line 1265 "mrb_parse.jay"
+						{
+							yyVal = new_module(((node)yyVals[-3 + yyTop]), ((node)yyVals[-1 + yyTop]));
+							((node)yyVal).SET_LINENO(((int)yyVals[-4 + yyTop]));
+							local_resume(((locals_node)yyVals[-2 + yyTop]));
+						}
+						break;
+					case 312:
+#line 1271 "mrb_parse.jay"
+						{
+							yyVal = (stack_type)this.cmdarg_stack;
+							this.cmdarg_stack = 0;
+						}
+						break;
+					case 313:
+#line 1275 "mrb_parse.jay"
+						{
+							this.in_def++;
+							yyVal = local_switch();
+						}
+						break;
+					case 314:
+#line 1282 "mrb_parse.jay"
+						{
+							yyVal = new_def(((mrb_sym)yyVals[-5 + yyTop]), ((node)yyVals[-2 + yyTop]), ((node)yyVals[-1 + yyTop]));
+							((node)yyVal).SET_LINENO(((int)yyVals[-6 + yyTop]));
+							local_resume(((locals_node)yyVals[-3 + yyTop]));
+							this.in_def--;
+							this.cmdarg_stack = ((stack_type)yyVals[-4 + yyTop]);
+						}
+						break;
+					case 315:
+#line 1290 "mrb_parse.jay"
+						{
+							this.lstate = mrb_lex_state_enum.EXPR_FNAME;
+							yyVal = (stack_type)this.cmdarg_stack;
+							this.cmdarg_stack = 0;
+						}
+						break;
+					case 316:
+#line 1296 "mrb_parse.jay"
+						{
+							this.in_single++;
+							this.lstate = mrb_lex_state_enum.EXPR_ENDFN; /* force for args */
+							yyVal = local_switch();
+						}
+						break;
+					case 317:
+#line 1304 "mrb_parse.jay"
+						{
+							yyVal = new_sdef(((node)yyVals[-7 + yyTop]), ((mrb_sym)yyVals[-4 + yyTop]), ((node)yyVals[-2 + yyTop]), ((node)yyVals[-1 + yyTop]));
+							((node)yyVal).SET_LINENO(((int)yyVals[-8 + yyTop]));
+							local_resume(((locals_node)yyVals[-3 + yyTop]));
+							this.in_single--;
+							this.cmdarg_stack = ((stack_type)yyVals[-5 + yyTop]);
+						}
+						break;
+					case 318:
+#line 1312 "mrb_parse.jay"
+						{
+							yyVal = new_break(null);
+						}
+						break;
+					case 319:
+#line 1316 "mrb_parse.jay"
+						{
+							yyVal = new_next(null);
+						}
+						break;
+					case 320:
+#line 1320 "mrb_parse.jay"
+						{
+							yyVal = new_redo();
+						}
+						break;
+					case 321:
+#line 1324 "mrb_parse.jay"
+						{
+							yyVal = new_retry();
+						}
+						break;
+					case 322:
+#line 1330 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[0 + yyTop]);
+							if (yyVal == null) yyVal = new_nil();
+						}
+						break;
+					case 329:
+#line 1349 "mrb_parse.jay"
+						{
+							yyVal = new_if(cond(((node)yyVals[-3 + yyTop])), ((node)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 331:
+#line 1356 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[0 + yyTop]);
+						}
+						break;
+					case 332:
+#line 1362 "mrb_parse.jay"
+						{
+							yyVal = list1(list1(((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 334:
+#line 1369 "mrb_parse.jay"
+						{
+							yyVal = new_arg(((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 335:
+#line 1373 "mrb_parse.jay"
+						{
+							yyVal = new_masgn(((node)yyVals[-1 + yyTop]), null);
+						}
+						break;
+					case 336:
+#line 1379 "mrb_parse.jay"
+						{
+							yyVal = list1(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 337:
+#line 1383 "mrb_parse.jay"
+						{
+							yyVal = push(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 338:
+#line 1389 "mrb_parse.jay"
+						{
+							yyVal = list3(((node)yyVals[0 + yyTop]), null, null);
+						}
+						break;
+					case 339:
+#line 1393 "mrb_parse.jay"
+						{
+							yyVal = list3(((node)yyVals[-3 + yyTop]), new_arg(((mrb_sym)yyVals[0 + yyTop])), null);
+						}
+						break;
+					case 340:
+#line 1397 "mrb_parse.jay"
+						{
+							yyVal = list3(((node)yyVals[-5 + yyTop]), new_arg(((mrb_sym)yyVals[-2 + yyTop])), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 341:
+#line 1401 "mrb_parse.jay"
+						{
+							yyVal = list3(((node)yyVals[-2 + yyTop]), -1, null);
+						}
+						break;
+					case 342:
+#line 1405 "mrb_parse.jay"
+						{
+							yyVal = list3(((node)yyVals[-4 + yyTop]), -1, ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 343:
+#line 1409 "mrb_parse.jay"
+						{
+							yyVal = list3(null, new_arg(((mrb_sym)yyVals[0 + yyTop])), null);
+						}
+						break;
+					case 344:
+#line 1413 "mrb_parse.jay"
+						{
+							yyVal = list3(null, new_arg(((mrb_sym)yyVals[-2 + yyTop])), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 345:
+#line 1417 "mrb_parse.jay"
+						{
+							yyVal = list3(null, -1, null);
+						}
+						break;
+					case 346:
+#line 1421 "mrb_parse.jay"
+						{
+							yyVal = list3(null, -1, ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 347:
+#line 1427 "mrb_parse.jay"
+						{
+							yyVal = new_args(((node)yyVals[-5 + yyTop]), ((node)yyVals[-3 + yyTop]), ((mrb_sym)yyVals[-1 + yyTop]), null, ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 348:
+#line 1431 "mrb_parse.jay"
+						{
+							yyVal = new_args(((node)yyVals[-7 + yyTop]), ((node)yyVals[-5 + yyTop]), ((mrb_sym)yyVals[-3 + yyTop]), ((node)yyVals[-1 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 349:
+#line 1435 "mrb_parse.jay"
+						{
+							yyVal = new_args(((node)yyVals[-3 + yyTop]), ((node)yyVals[-1 + yyTop]), 0, null, ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 350:
+#line 1439 "mrb_parse.jay"
+						{
+							yyVal = new_args(((node)yyVals[-5 + yyTop]), ((node)yyVals[-3 + yyTop]), 0, ((node)yyVals[-1 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 351:
+#line 1443 "mrb_parse.jay"
+						{
+							yyVal = new_args(((node)yyVals[-3 + yyTop]), null, ((mrb_sym)yyVals[-1 + yyTop]), null, ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 352:
+#line 1447 "mrb_parse.jay"
+						{
+							yyVal = new_args(((node)yyVals[-1 + yyTop]), null, (mrb_sym)0, null, 0);
+						}
+						break;
+					case 353:
+#line 1451 "mrb_parse.jay"
+						{
+							yyVal = new_args(((node)yyVals[-5 + yyTop]), null, ((mrb_sym)yyVals[-3 + yyTop]), ((node)yyVals[-1 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 354:
+#line 1455 "mrb_parse.jay"
+						{
+							yyVal = new_args(((node)yyVals[-1 + yyTop]), null, 0, null, ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 355:
+#line 1459 "mrb_parse.jay"
+						{
+							yyVal = new_args(null, ((node)yyVals[-3 + yyTop]), ((mrb_sym)yyVals[-1 + yyTop]), null, ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 356:
+#line 1463 "mrb_parse.jay"
+						{
+							yyVal = new_args(null, ((node)yyVals[-5 + yyTop]), ((mrb_sym)yyVals[-3 + yyTop]), ((node)yyVals[-1 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 357:
+#line 1467 "mrb_parse.jay"
+						{
+							yyVal = new_args(null, ((node)yyVals[-1 + yyTop]), 0, null, ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 358:
+#line 1471 "mrb_parse.jay"
+						{
+							yyVal = new_args(null, ((node)yyVals[-3 + yyTop]), 0, ((node)yyVals[-1 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 359:
+#line 1475 "mrb_parse.jay"
+						{
+							yyVal = new_args(null, null, ((mrb_sym)yyVals[-1 + yyTop]), null, ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 360:
+#line 1479 "mrb_parse.jay"
+						{
+							yyVal = new_args(null, null, ((mrb_sym)yyVals[-3 + yyTop]), ((node)yyVals[-1 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 361:
+#line 1483 "mrb_parse.jay"
+						{
+							yyVal = new_args(null, null, 0, null, ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 363:
+#line 1490 "mrb_parse.jay"
+						{
+							this.cmd_start = true;
+							yyVal = ((node)yyVals[0 + yyTop]);
+						}
+						break;
+					case 364:
+#line 1497 "mrb_parse.jay"
+						{
+							yyVal = null;
+						}
+						break;
+					case 365:
+#line 1501 "mrb_parse.jay"
+						{
+							yyVal = null;
+						}
+						break;
+					case 366:
+#line 1505 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[-2 + yyTop]);
+						}
+						break;
+					case 367:
+#line 1512 "mrb_parse.jay"
+						{
+							yyVal = null;
+						}
+						break;
+					case 368:
+#line 1516 "mrb_parse.jay"
+						{
+							yyVal = null;
+						}
+						break;
+					case 371:
+#line 1526 "mrb_parse.jay"
+						{
+							local_add_f(((mrb_sym)yyVals[0 + yyTop]));
+							new_bv(((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 373:
+#line 1534 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[-2 + yyTop]);
+						}
+						break;
+					case 374:
+#line 1538 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[0 + yyTop]);
+						}
+						break;
+					case 375:
+#line 1544 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[-1 + yyTop]);
+						}
+						break;
+					case 376:
+#line 1548 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[-1 + yyTop]);
+						}
+						break;
+					case 377:
+#line 1554 "mrb_parse.jay"
+						{
+							local_nest();
+						}
+						break;
+					case 378:
+#line 1560 "mrb_parse.jay"
+						{
+							yyVal = new_block(((node)yyVals[-2 + yyTop]), ((node)yyVals[-1 + yyTop]), false);
+							local_unnest();
+						}
+						break;
+					case 379:
+#line 1567 "mrb_parse.jay"
+						{
+							if ((node_type)((node)yyVals[-1 + yyTop]).car == node_type.NODE_YIELD) {
+								yyError("block given to yield");
+							}
+							else {
+								call_with_block(((node)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+							}
+							yyVal = ((node)yyVals[-1 + yyTop]);
+						}
+						break;
+					case 380:
+#line 1577 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-3 + yyTop]), ((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]), ((MrbTokens)yyVals[-2 + yyTop]));
+						}
+						break;
+					case 381:
+#line 1581 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-4 + yyTop]), ((mrb_sym)yyVals[-2 + yyTop]), ((node)yyVals[-1 + yyTop]), ((MrbTokens)yyVals[-3 + yyTop]));
+							call_with_block((node)yyVal, ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 382:
+#line 1586 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-4 + yyTop]), ((mrb_sym)yyVals[-2 + yyTop]), ((node)yyVals[-1 + yyTop]), ((MrbTokens)yyVals[-3 + yyTop]));
+							call_with_block((node)yyVal, ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 383:
+#line 1593 "mrb_parse.jay"
+						{
+							yyVal = new_fcall(((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 384:
+#line 1597 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-3 + yyTop]), ((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]), ((MrbTokens)yyVals[-2 + yyTop]));
+						}
+						break;
+					case 385:
+#line 1601 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-3 + yyTop]), ((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]), MrbTokens.tCOLON2);
+						}
+						break;
+					case 386:
+#line 1605 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-2 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]), null, MrbTokens.tCOLON2);
+						}
+						break;
+					case 387:
+#line 1609 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-2 + yyTop]), intern("call", 4), ((node)yyVals[0 + yyTop]), ((MrbTokens)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 388:
+#line 1613 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-2 + yyTop]), intern("call", 4), ((node)yyVals[0 + yyTop]), MrbTokens.tCOLON2);
+						}
+						break;
+					case 389:
+#line 1617 "mrb_parse.jay"
+						{
+							yyVal = new_super(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 390:
+#line 1621 "mrb_parse.jay"
+						{
+							yyVal = new_zsuper();
+						}
+						break;
+					case 391:
+#line 1625 "mrb_parse.jay"
+						{
+							yyVal = new_call(((node)yyVals[-3 + yyTop]), intern("[]", 2), ((node)yyVals[-1 + yyTop]), (MrbTokens)'.');
+						}
+						break;
+					case 392:
+#line 1631 "mrb_parse.jay"
+						{
+							local_nest();
+							yyVal = (int)this.lineno;
+						}
+						break;
+					case 393:
+#line 1637 "mrb_parse.jay"
+						{
+							yyVal = new_block(((node)yyVals[-2 + yyTop]), ((node)yyVals[-1 + yyTop]), true);
+							((node)yyVal).SET_LINENO(((int)yyVals[-3 + yyTop]));
+							local_unnest();
+						}
+						break;
+					case 394:
+#line 1643 "mrb_parse.jay"
+						{
+							local_nest();
+							yyVal = (int)this.lineno;
+						}
+						break;
+					case 395:
+#line 1649 "mrb_parse.jay"
+						{
+							yyVal = new_block(((node)yyVals[-2 + yyTop]), ((node)yyVals[-1 + yyTop]), false);
+							((node)yyVal).SET_LINENO(((int)yyVals[-3 + yyTop]));
+							local_unnest();
+						}
+						break;
+					case 396:
+#line 1659 "mrb_parse.jay"
+						{
+							yyVal = cons(cons(((node)yyVals[-3 + yyTop]), ((node)yyVals[-1 + yyTop])), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 397:
+#line 1665 "mrb_parse.jay"
+						{
+							if (((node)yyVals[0 + yyTop]) != null) {
+								yyVal = cons(cons(null, ((node)yyVals[0 + yyTop])), null);
+							}
+							else {
+								yyVal = null;
+							}
+						}
+						break;
+					case 399:
+#line 1679 "mrb_parse.jay"
+						{
+							yyVal = list1(list3(((node)yyVals[-4 + yyTop]), ((node)yyVals[-3 + yyTop]), ((node)yyVals[-1 + yyTop])));
+							if (((node)yyVals[0 + yyTop]) != null) yyVal = append(((node)yyVal), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 401:
+#line 1687 "mrb_parse.jay"
+						{
+							yyVal = list1(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 404:
+#line 1695 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[0 + yyTop]);
+						}
+						break;
+					case 406:
+#line 1702 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[0 + yyTop]);
+						}
+						break;
+					case 414:
+#line 1717 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[0 + yyTop]);
+						}
+						break;
+					case 415:
+#line 1721 "mrb_parse.jay"
+						{
+							yyVal = new_dstr(push(((node)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 417:
+#line 1728 "mrb_parse.jay"
+						{
+							yyVal = append(((node)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 418:
+#line 1734 "mrb_parse.jay"
+						{
+							yyVal = list1(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 419:
+#line 1738 "mrb_parse.jay"
+						{
+							yyVal = (node)this.lex_strterm;
+							this.lex_strterm = null;
+						}
+						break;
+					case 420:
+#line 1744 "mrb_parse.jay"
+						{
+							this.lex_strterm = ((node)yyVals[-2 + yyTop]);
+							yyVal = list2(((node)yyVals[-3 + yyTop]), ((node)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 421:
+#line 1749 "mrb_parse.jay"
+						{
+							yyVal = list1(new_literal_delim());
+						}
+						break;
+					case 422:
+#line 1753 "mrb_parse.jay"
+						{
+							yyVal = list1(new_literal_delim());
+						}
+						break;
+					case 423:
+#line 1759 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[0 + yyTop]);
+						}
+						break;
+					case 424:
+#line 1763 "mrb_parse.jay"
+						{
+							yyVal = new_dxstr(push(((node)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 425:
+#line 1769 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[0 + yyTop]);
+						}
+						break;
+					case 426:
+#line 1773 "mrb_parse.jay"
+						{
+							yyVal = new_dregx(((node)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 430:
+#line 1786 "mrb_parse.jay"
+						{
+							parser_heredoc_info inf = parsing_heredoc_inf();
+							inf.push_doc(new_str(new Uint8Array(0), 0));
+							heredoc_end();
+						}
+						break;
+					case 431:
+#line 1792 "mrb_parse.jay"
+						{
+							heredoc_end();
+						}
+						break;
+					case 434:
+#line 1802 "mrb_parse.jay"
+						{
+							parser_heredoc_info inf = parsing_heredoc_inf();
+							inf.push_doc(((node)yyVals[0 + yyTop]));
+							heredoc_treat_nextline();
+						}
+						break;
+					case 435:
+#line 1808 "mrb_parse.jay"
+						{
+							yyVal = (node)this.lex_strterm;
+							this.lex_strterm = null;
+						}
+						break;
+					case 436:
+#line 1814 "mrb_parse.jay"
+						{
+							parser_heredoc_info inf = parsing_heredoc_inf();
+							this.lex_strterm = ((node)yyVals[-2 + yyTop]);
+							inf.push_doc(((node)yyVals[-3 + yyTop]));
+							inf.push_doc(((node)yyVals[-1 + yyTop]));
+						}
+						break;
+					case 437:
+#line 1823 "mrb_parse.jay"
+						{
+							yyVal = new_words(list1(((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 438:
+#line 1827 "mrb_parse.jay"
+						{
+							yyVal = new_words(push(((node)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 439:
+#line 1834 "mrb_parse.jay"
+						{
+							yyVal = new_sym(((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 440:
+#line 1838 "mrb_parse.jay"
+						{
+							this.lstate = mrb_lex_state_enum.EXPR_END;
+							yyVal = new_dsym(push(((node)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 441:
+#line 1845 "mrb_parse.jay"
+						{
+							this.lstate = mrb_lex_state_enum.EXPR_END;
+							yyVal = ((mrb_sym)yyVals[0 + yyTop]);
+						}
+						break;
+					case 446:
+#line 1856 "mrb_parse.jay"
+						{
+							yyVal = new_strsym(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 447:
+#line 1860 "mrb_parse.jay"
+						{
+							yyVal = new_strsym(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 448:
+#line 1866 "mrb_parse.jay"
+						{
+							yyVal = new_symbols(list1(((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 449:
+#line 1870 "mrb_parse.jay"
+						{
+							yyVal = new_symbols(push(((node)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop])));
+						}
+						break;
+					case 452:
+#line 1878 "mrb_parse.jay"
+						{
+							yyVal = negate_lit(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 453:
+#line 1882 "mrb_parse.jay"
+						{
+							yyVal = negate_lit(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 454:
+#line 1888 "mrb_parse.jay"
+						{
+							yyVal = new_lvar(((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 455:
+#line 1892 "mrb_parse.jay"
+						{
+							yyVal = new_ivar(((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 456:
+#line 1896 "mrb_parse.jay"
+						{
+							yyVal = new_gvar(((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 457:
+#line 1900 "mrb_parse.jay"
+						{
+							yyVal = new_cvar(((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 458:
+#line 1904 "mrb_parse.jay"
+						{
+							yyVal = new_const(((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 459:
+#line 1910 "mrb_parse.jay"
+						{
+							assignable(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 460:
+#line 1916 "mrb_parse.jay"
+						{
+							yyVal = var_reference(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 461:
+#line 1920 "mrb_parse.jay"
+						{
+							yyVal = new_nil();
+						}
+						break;
+					case 462:
+#line 1924 "mrb_parse.jay"
+						{
+							yyVal = new_self();
+						}
+						break;
+					case 463:
+#line 1928 "mrb_parse.jay"
+						{
+							yyVal = new_true();
+						}
+						break;
+					case 464:
+#line 1932 "mrb_parse.jay"
+						{
+							yyVal = new_false();
+						}
+						break;
+					case 465:
+#line 1936 "mrb_parse.jay"
+						{
+							if (this.filename == null) {
+								this.mrb_parser_set_filename("(null)");
+							}
+							yyVal = new_filename(this.filename);
+						}
+						break;
+					case 466:
+#line 1943 "mrb_parse.jay"
+						{
+							yyVal = new_lineno(this.lineno);
+						}
+						break;
+					case 469:
+#line 1953 "mrb_parse.jay"
+						{
+							yyVal = null;
+						}
+						break;
+					case 470:
+#line 1957 "mrb_parse.jay"
+						{
+							this.lstate = mrb_lex_state_enum.EXPR_BEG;
+							this.cmd_start = true;
+						}
+						break;
+					case 471:
+#line 1962 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[-1 + yyTop]);
+						}
+						break;
+					case 472:
+#line 1973 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[-1 + yyTop]);
+							this.lstate = mrb_lex_state_enum.EXPR_BEG;
+							this.cmd_start = true;
+						}
+						break;
+					case 473:
+#line 1979 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[-1 + yyTop]);
+						}
+						break;
+					case 474:
+#line 1985 "mrb_parse.jay"
+						{
+							yyVal = new_args(((node)yyVals[-5 + yyTop]), ((node)yyVals[-3 + yyTop]), ((mrb_sym)yyVals[-1 + yyTop]), null, ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 475:
+#line 1989 "mrb_parse.jay"
+						{
+							yyVal = new_args(((node)yyVals[-7 + yyTop]), ((node)yyVals[-5 + yyTop]), ((mrb_sym)yyVals[-3 + yyTop]), ((node)yyVals[-1 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 476:
+#line 1993 "mrb_parse.jay"
+						{
+							yyVal = new_args(((node)yyVals[-3 + yyTop]), ((node)yyVals[-1 + yyTop]), 0, null, ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 477:
+#line 1997 "mrb_parse.jay"
+						{
+							yyVal = new_args(((node)yyVals[-5 + yyTop]), ((node)yyVals[-3 + yyTop]), 0, ((node)yyVals[-1 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 478:
+#line 2001 "mrb_parse.jay"
+						{
+							yyVal = new_args(((node)yyVals[-3 + yyTop]), null, ((mrb_sym)yyVals[-1 + yyTop]), null, ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 479:
+#line 2005 "mrb_parse.jay"
+						{
+							yyVal = new_args(((node)yyVals[-5 + yyTop]), null, ((mrb_sym)yyVals[-3 + yyTop]), ((node)yyVals[-1 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 480:
+#line 2009 "mrb_parse.jay"
+						{
+							yyVal = new_args(((node)yyVals[-1 + yyTop]), null, 0, null, ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 481:
+#line 2013 "mrb_parse.jay"
+						{
+							yyVal = new_args(null, ((node)yyVals[-3 + yyTop]), ((mrb_sym)yyVals[-1 + yyTop]), null, ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 482:
+#line 2017 "mrb_parse.jay"
+						{
+							yyVal = new_args(null, ((node)yyVals[-5 + yyTop]), ((mrb_sym)yyVals[-3 + yyTop]), ((node)yyVals[-1 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 483:
+#line 2021 "mrb_parse.jay"
+						{
+							yyVal = new_args(null, ((node)yyVals[-1 + yyTop]), 0, null, ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 484:
+#line 2025 "mrb_parse.jay"
+						{
+							yyVal = new_args(null, ((node)yyVals[-3 + yyTop]), 0, ((node)yyVals[-1 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 485:
+#line 2029 "mrb_parse.jay"
+						{
+							yyVal = new_args(null, null, ((mrb_sym)yyVals[-1 + yyTop]), null, ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 486:
+#line 2033 "mrb_parse.jay"
+						{
+							yyVal = new_args(null, null, ((mrb_sym)yyVals[-3 + yyTop]), ((node)yyVals[-1 + yyTop]), ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 487:
+#line 2037 "mrb_parse.jay"
+						{
+							yyVal = new_args(null, null, 0, null, ((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 488:
+#line 2041 "mrb_parse.jay"
+						{
+							local_add_f(0);
+							yyVal = new_args(null, null, 0, null, 0);
+						}
+						break;
+					case 489:
+#line 2048 "mrb_parse.jay"
+						{
+							yyError("formal argument cannot be a constant");
+							yyVal = null;
+						}
+						break;
+					case 490:
+#line 2053 "mrb_parse.jay"
+						{
+							yyError("formal argument cannot be an instance variable");
+							yyVal = null;
+						}
+						break;
+					case 491:
+#line 2058 "mrb_parse.jay"
+						{
+							yyError("formal argument cannot be a global variable");
+							yyVal = null;
+						}
+						break;
+					case 492:
+#line 2063 "mrb_parse.jay"
+						{
+							yyError("formal argument cannot be a class variable");
+							yyVal = null;
+						}
+						break;
+					case 493:
+#line 2070 "mrb_parse.jay"
+						{
+							yyVal = null;
+						}
+						break;
+					case 494:
+#line 2074 "mrb_parse.jay"
+						{
+							local_add_f(((mrb_sym)yyVals[0 + yyTop]));
+							yyVal = ((mrb_sym)yyVals[0 + yyTop]);
+						}
+						break;
+					case 495:
+#line 2081 "mrb_parse.jay"
+						{
+							yyVal = new_arg(((mrb_sym)yyVals[0 + yyTop]));
+						}
+						break;
+					case 496:
+#line 2085 "mrb_parse.jay"
+						{
+							yyVal = new_masgn(((node)yyVals[-1 + yyTop]), null);
+						}
+						break;
+					case 497:
+#line 2091 "mrb_parse.jay"
+						{
+							yyVal = list1(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 498:
+#line 2095 "mrb_parse.jay"
+						{
+							yyVal = push(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 499:
+#line 2101 "mrb_parse.jay"
+						{
+							local_add_f(((mrb_sym)yyVals[-1 + yyTop]));
+							yyVal = ((mrb_sym)yyVals[-1 + yyTop]);
+						}
+						break;
+					case 500:
+#line 2108 "mrb_parse.jay"
+						{
+							yyVal = cons(((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 501:
+#line 2114 "mrb_parse.jay"
+						{
+							yyVal = cons(((mrb_sym)yyVals[-1 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 502:
+#line 2120 "mrb_parse.jay"
+						{
+							yyVal = list1(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 503:
+#line 2124 "mrb_parse.jay"
+						{
+							yyVal = push(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 504:
+#line 2130 "mrb_parse.jay"
+						{
+							yyVal = list1(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 505:
+#line 2134 "mrb_parse.jay"
+						{
+							yyVal = push(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 508:
+#line 2144 "mrb_parse.jay"
+						{
+							local_add_f(((mrb_sym)yyVals[0 + yyTop]));
+							yyVal = ((mrb_sym)yyVals[0 + yyTop]);
+						}
+						break;
+					case 509:
+#line 2149 "mrb_parse.jay"
+						{
+							local_add_f(0);
+							yyVal = -1;
+						}
+						break;
+					case 512:
+#line 2160 "mrb_parse.jay"
+						{
+							local_add_f(((mrb_sym)yyVals[0 + yyTop]));
+							yyVal = ((mrb_sym)yyVals[0 + yyTop]);
+						}
+						break;
+					case 513:
+#line 2167 "mrb_parse.jay"
+						{
+							yyVal = ((mrb_sym)yyVals[0 + yyTop]);
+						}
+						break;
+					case 514:
+#line 2171 "mrb_parse.jay"
+						{
+							local_add_f(0);
+							yyVal = 0;
+						}
+						break;
+					case 515:
+#line 2178 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[0 + yyTop]);
+							if (yyVal == null) yyVal = new_nil();
+						}
+						break;
+					case 516:
+#line 2182 "mrb_parse.jay"
+						{ this.lstate = mrb_lex_state_enum.EXPR_BEG; }
+						break;
+					case 517:
+#line 2183 "mrb_parse.jay"
+						{
+							if (((int)yyVals[-1 + yyTop]) == 0) {
+								yyError("can't define singleton method for ().");
+							}
+							else {
+								switch ((node_type)(((node)yyVals[-1 + yyTop]).car)) {
+								case node_type.NODE_STR:
+								case node_type.NODE_DSTR:
+								case node_type.NODE_XSTR:
+								case node_type.NODE_DXSTR:
+								case node_type.NODE_DREGX:
+								case node_type.NODE_MATCH:
+								case node_type.NODE_FLOAT:
+								case node_type.NODE_ARRAY:
+								case node_type.NODE_HEREDOC:
+									yyError("can't define singleton method for literals");
+									break;
+								default:
+									break;
+								}
+							}
+							yyVal = ((node)yyVals[-1 + yyTop]);
+						}
+						break;
+					case 519:
+#line 2210 "mrb_parse.jay"
+						{
+							yyVal = ((node)yyVals[-1 + yyTop]);
+						}
+						break;
+					case 520:
+#line 2216 "mrb_parse.jay"
+						{
+							yyVal = list1(((node)yyVals[0 + yyTop]));
+							((node)yyVal).NODE_LINENO(((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 521:
+#line 2221 "mrb_parse.jay"
+						{
+							yyVal = push(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 522:
+#line 2227 "mrb_parse.jay"
+						{
+							yyVal = cons(((node)yyVals[-2 + yyTop]), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 523:
+#line 2231 "mrb_parse.jay"
+						{
+							yyVal = cons(new_sym(((mrb_sym)yyVals[-1 + yyTop])), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 524:
+#line 2235 "mrb_parse.jay"
+						{
+							yyVal = cons(new_sym(new_strsym(((node)yyVals[-1 + yyTop]))), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 525:
+#line 2239 "mrb_parse.jay"
+						{
+							yyVal = cons(new_sym(new_strsym(((node)yyVals[-1 + yyTop]))), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 526:
+#line 2243 "mrb_parse.jay"
+						{
+							yyVal = cons(new_dsym(push(((node)yyVals[-2 + yyTop]), ((node)yyVals[-1 + yyTop]))), ((node)yyVals[0 + yyTop]));
+						}
+						break;
+					case 539:
+#line 2269 "mrb_parse.jay"
+						{
+							yyVal = (MrbTokens)'.';
+						}
+						break;
+					case 540:
+#line 2273 "mrb_parse.jay"
+						{
+							yyVal = (MrbTokens)0;
+						}
+						break;
+					case 542:
+#line 2280 "mrb_parse.jay"
+						{
+							yyVal = MrbTokens.tCOLON2;
+						}
+						break;
+					case 552:
+#line 2304 "mrb_parse.jay"
+						{ yyErrorFlag = 0; }
+						break;
+					case 555:
+#line 2310 "mrb_parse.jay"
+						{
+							this.lineno++;
+							this.column = 0;
+						}
+						break;
+					case 558:
+#line 2321 "mrb_parse.jay"
+						{
+							yyVal = null;
+						}
+						break;
+#line default
+					}
+					yyTop -= yyLen[yyN];
+					yyState = yyStates[yyTop];
+					int yyM = yyLhs[yyN];
+					if (yyState == 0 && yyM == 0) {
+						if (yyDebug != null) yyDebug.shift(0, yyFinal);
+						yyState = yyFinal;
+						if (yyToken < 0) {
+							yyToken = yyLex.Advance() ? yyLex.Token : 0;
+							if (yyDebug != null)
+								yyDebug.lex(yyState, yyToken, yyName(yyToken), yyLex.Value);
+						}
+						if (yyToken == 0) {
+							if (yyDebug != null) yyDebug.accept(yyVal);
+							yyNest--;
+							return yyVal;
+						}
+						break;
+					}
+					if (((yyN = yyGindex[yyM]) != 0) && ((yyN += yyState) >= 0)
+						&& (yyN < yyTable.Length) && (yyCheck[yyN] == yyState))
+						yyState = yyTable[yyN];
+					else
+						yyState = yyDgoto[yyM];
+					if (yyDebug != null) yyDebug.shift(yyStates[yyTop], yyState);
+					break;
+				}
+			}
+		}
+#line 2326 "mrb_parse.jay"
+
+	} // must specify trailing } for parser class
+} // must specify trailing } for namespace, if any
+#line default
Index: EcnlProtoTool/trunk/webapp/webmrbc/MrbScanner.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/MrbScanner.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/MrbScanner.cs	(revision 270)
@@ -0,0 +1,3634 @@
+﻿/*
+** parse.y - mruby parser
+**
+** See Copyright Notice in mruby.h
+*/
+using System;
+using System.Collections.Generic;
+using Bridge.Html5;
+
+namespace WebMrbc
+{
+	interface IEvaluatable
+	{
+		node evaluate(string method, node[] args);
+	}
+
+	class kwtable
+	{
+		public Uint8Array name;
+		public MrbTokens id0;
+		public MrbTokens id1;
+		public mrb_lex_state_enum state;
+
+		public kwtable(string name, MrbTokens id0, MrbTokens id1, mrb_lex_state_enum state)
+		{
+			this.name = MrbParser.UTF8StringToArray(name);
+			this.id0 = id0;
+			this.id1 = id1;
+			this.state = state;
+		}
+
+		public kwtable(string name)
+		{
+			this.name = MrbParser.UTF8StringToArray(name);
+		}
+	}
+
+	delegate int partial_hook_t(MrbParser p);
+
+	public class MrbToken
+	{
+		private string m_Filename;
+		private MrbTokens m_Kind;
+		private string m_Token;
+		private object m_Value;
+
+		public string Filename { get { return m_Filename; } }
+		public MrbTokens Kind { get { return m_Kind; } }
+		public object Value { get { return m_Value; } }
+
+		public node nd { get { return (node)m_Value; } set { this.m_Value = value; } }
+		public mrb_sym id { get { return (mrb_sym)m_Value; } set { this.m_Value = value; } }
+		public int num { get { return (int)m_Value; } set { this.m_Value = value; } }
+		public stack_type stack { get { return (stack_type)m_Value; } set { this.m_Value = value; } }
+		//public vtable vars { get { return (vtable)value; } set { this.value = value; } }
+
+		public MrbToken(string filename)
+		{
+			m_Filename = filename;
+		}
+
+		internal void SetToken(MrbTokens kind, string token)
+		{
+			m_Kind = kind;
+			m_Token = token;
+		}
+	}
+
+	public partial class MrbParser : IMrbParser, MrbParser.yyInput, MrbParser.yyConsoleOut
+	{
+		const int MRB_PARSER_TOKBUF_MAX = 65536;
+		const int MRB_PARSER_TOKBUF_SIZE = 256;
+
+		Uint8Array s;
+		int sp;
+		public string filename {
+			get {
+				if (current_filename_index < filename_table.Length)
+					return filename_table[current_filename_index];
+				else
+					return "(null)";
+			}
+		}
+		public int lineno { get; set; }
+		public int column { get; set; }
+
+		mrb_lex_state_enum lstate;
+		node lex_strterm;
+
+		stack_type cond_stack;
+		stack_type cmdarg_stack;
+		int paren_nest;
+		int lpar_beg;
+		int in_def, in_single;
+		bool cmd_start;
+		locals_node locals;
+
+		node pb;
+		Uint8Array buf = new Uint8Array(MRB_PARSER_TOKBUF_SIZE);
+		Uint8Array tokbuf;
+		int tidx;
+		int tsiz;
+
+		node all_heredocs;
+		node heredocs_from_nextline;
+		node parsing_heredoc;
+		node lex_strterm_before_heredoc;
+
+		internal node tree;
+
+		string[] filename_table = new string[0];
+		int filename_table_length { get { return filename_table.Length; } }
+		public int current_filename_index;
+
+		internal partial_hook_t partial_hook;
+		internal object partial_data;
+
+		MrbToken yylval;
+
+		public MrbParser()
+		{
+			yyConsole = this;
+		}
+
+		void mrb_assert(bool cond)
+		{
+			if (!cond) throw new Exception();
+		}
+
+		const int ERANGE = 1;
+		int errno;
+		static int memcmp(Uint8Array a, int aofs, Uint8Array b, int bofs, int len)
+		{
+			int result;
+			for (int i = 0; i < len; i++) {
+				result = a[i] - b[i];
+				if (result != 0)
+					return result;
+			}
+			return 0;
+		}
+
+		static bool isdigit(int c)
+		{
+			return (c >= '0' && c <= '9');
+		}
+
+		static bool isalnum(int c)
+		{
+			return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z');
+		}
+
+		static int tolower(int c)
+		{
+			if (c >= 'A' && c <= 'Z')
+				return c - 'A' + 'a';
+			return c;
+		}
+
+		static int strlen(Uint8Array a, int ofs)
+		{
+			int i = ofs;
+			for (; i < a.Length; i++) {
+				if (a[i] == 0)
+					break;
+			}
+			return i - ofs;
+		}
+
+		static int strncmp(Uint8Array a, int aofs, Uint8Array b, int bofs, int len)
+		{
+			int result;
+			for (int i = 0; i < len; i++) {
+				if (a[i + aofs] == 0) {
+					if (b[i + bofs] == 0) {
+						return 0;
+					}
+					return byte.MaxValue;
+				}
+				if (b[i + bofs] == 0) {
+					return -byte.MaxValue;
+				}
+
+				result = a[i + aofs] - b[i + bofs];
+				if (result != 0)
+					return result;
+			}
+			return 0;
+		}
+
+		static int strchr(Uint8Array s, int ofs, int c)
+		{
+			int i = ofs;
+			for (; i < s.Length; i++) {
+				if (s[i] == c)
+					break;
+			}
+			return i;
+		}
+
+		public static Uint8Array strndup(Uint8Array s, int ofs, int len)
+		{
+			return s.SubArray(ofs, len + 1);
+		}
+
+		public static Uint8Array strdup(Uint8Array s, int ofs)
+		{
+			return s.SubArray(ofs, strlen(s, ofs) + 1);
+		}
+
+		private static string escape(byte c)
+		{
+			switch ((char)c) {
+			case '\\': return "\\";
+			case '\n': return "\\n";
+			case '\t': return "\\t";
+			case '\r': return "\\r";
+			case '\f': return "\\f";
+			case '\v': return "\\v";
+			case '\a': return "\\a";
+			case '\x27': return "\\e";
+			case '\b': return "\\b";
+			case ' ': return "\\s";
+			case '\0': return "\\0";
+			default: return $"\\x{c:X}";
+			}
+		}
+
+		internal static string UTF8ArrayToString(Uint8Array data, int idx)
+		{
+			bool esc;
+			return UTF8ArrayToStringEsc(data, idx, out esc);
+		}
+
+		internal static string UTF8ArrayToStringEsc(Uint8Array data, int idx, out bool esc)
+		{
+			var str = "";
+			int c = 0, t = 0, end = data.Length;
+			var temp = new byte[6];
+
+			esc = false;
+			if (end > 0 && data[end - 1] == '\x0')
+				end--;
+
+			for (int i = idx; i < end; i++) {
+				var d = data[i];
+				temp[c] = d;
+				if (t == 0) {
+					// 1Byteコード
+					if ((d & 0x80) == 0) {
+						// 表示可能なコード
+						if (d >= 0x20 && d < 0x7F)
+							str += (char)d;
+						// 表示不可ならエスケープ
+						else {
+							esc = true;
+							str += escape(d);
+						}
+						continue;
+					}
+					// 2Byteコード
+					else if ((d & 0xE0) == 0xC0) {
+						t = 2;
+					}
+					// 3Byteコード
+					else if ((d & 0xF0) == 0xE0) {
+						t = 3;
+					}
+					// 4Byteコード
+					else if ((d & 0xF8) == 0xF0) {
+						t = 4;
+					}
+					// 5Byteコード
+					else if ((d & 0xFC) == 0xF8) {
+						t = 5;
+					}
+					// 6Byteコード
+					else if ((d & 0xFE) == 0xFC) {
+						t = 6;
+					}
+					// 表示不可ならエスケープ
+					else {
+						esc = true;
+						str += escape(d);
+						continue;
+					}
+					c = 1;
+				}
+				else {
+					// 表示不可ならエスケープ
+					if ((d & 0xC0) != 0x80) {
+						for (int j = 0; j < c; j++) {
+							esc = true;
+							str += escape(temp[j]);
+						}
+						t = 0;
+						c = 0;
+						continue;
+					}
+					c++;
+					// 表示可能なコード
+					if (c == t) {
+						switch (t) {
+						case 2:
+							str += ConvertFromUtf32(((temp[0] & 0x1F) << 6) | (temp[1] & 0x3F));
+							break;
+						case 3:
+							str += ConvertFromUtf32(((temp[0] & 0x0F) << 12) | ((temp[1] & 0x3F) << 6) | (temp[2] & 0x3F));
+							break;
+						case 4:
+							str += ConvertFromUtf32(((temp[0] & 0x07) << 18) | ((temp[1] & 0x3F) << 12) | ((temp[2] & 0x3F) << 6) | (temp[3] & 0x3F));
+							break;
+						case 5:
+							str += ConvertFromUtf32(((temp[0] & 0x03) << 24) | ((temp[1] & 0x3F) << 18) | ((temp[2] & 0x3F) << 12) | ((temp[3] & 0x3F) << 6) | (temp[4] & 0x3F));
+							break;
+						case 6:
+							str += ConvertFromUtf32(((temp[0] & 0x01) << 30) | ((temp[1] & 0x3F) << 24) | ((temp[2] & 0x3F) << 18) | ((temp[3] & 0x3F) << 12) | ((temp[4] & 0x3F) << 6) | (temp[5] & 0x3F));
+							break;
+						}
+						t = 0;
+						c = 0;
+						continue;
+					}
+				}
+			}
+
+			if (c > 0)
+				esc = true;
+			for (int i = 0; i < c; i++) {
+				str += escape(temp[i]);
+			}
+
+			return str;
+		}
+
+		// from Emscripten (http://kripken.github.io/emscripten-site/)
+		// Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing.
+		// See http://unicode.org/faq/utf_bom.html#utf16-3
+		public static string ConvertFromUtf32(int utf32)
+		{
+			var str = "";
+			if (utf32 >= 0x10000) {
+				var ch = utf32 - 0x10000;
+				str += String.FromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));
+			}
+			else {
+				str += String.FromCharCode(utf32);
+			}
+			return str;
+		}
+
+		// from Emscripten (http://kripken.github.io/emscripten-site/)
+		// Copies the given Javascript String object 'str' to the given byte array at address 'outIdx',
+		// encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP.
+		// Use the function lengthBytesUTF8() to compute the exact number of bytes (excluding null terminator) that this function will write.
+		// Parameters:
+		//   str: the Javascript string to copy.
+		//   outU8Array: the array to copy to. Each index in this array is assumed to be one 8-byte element.
+		//   outIdx: The starting offset in the array to begin the copying.
+		//   maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null
+		//                    terminator, i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else.
+		//                    maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator.
+		// Returns the number of bytes written, EXCLUDING the null terminator.
+		internal static int stringToUTF8Array(string str, Uint8Array outU8Array, int outIdx, int maxBytesToWrite)
+		{
+			if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes.
+				return 0;
+
+			var startIdx = outIdx;
+			var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator.
+			for (var i = 0; i < str.Length; ++i) {
+				// Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8.
+				// See http://unicode.org/faq/utf_bom.html#utf16-3
+				// For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629
+				var u = str[i]; // possibly a lead surrogate
+				if (u >= 0xD800 && u <= 0xDFFF) u = (char)(0x10000 + ((u & 0x3FF) << 10) | (str[++i] & 0x3FF));
+				if (u <= 0x7F) {
+					if (outIdx >= endIdx) break;
+					outU8Array[outIdx++] = (byte)u;
+				}
+				else if (u <= 0x7FF) {
+					if (outIdx + 1 >= endIdx) break;
+					outU8Array[outIdx++] = (byte)(0xC0 | (u >> 6));
+					outU8Array[outIdx++] = (byte)(0x80 | (u & 63));
+				}
+				else if (u <= 0xFFFF) {
+					if (outIdx + 2 >= endIdx) break;
+					outU8Array[outIdx++] = (byte)(0xE0 | (u >> 12));
+					outU8Array[outIdx++] = (byte)(0x80 | ((u >> 6) & 63));
+					outU8Array[outIdx++] = (byte)(0x80 | (u & 63));
+				}
+				else if (u <= 0x1FFFFF) {
+					if (outIdx + 3 >= endIdx) break;
+					outU8Array[outIdx++] = (byte)(0xF0 | (u >> 18));
+					outU8Array[outIdx++] = (byte)(0x80 | ((u >> 12) & 63));
+					outU8Array[outIdx++] = (byte)(0x80 | ((u >> 6) & 63));
+					outU8Array[outIdx++] = (byte)(0x80 | (u & 63));
+				}
+				else if (u <= 0x3FFFFFF) {
+					if (outIdx + 4 >= endIdx) break;
+					outU8Array[outIdx++] = (byte)(0xF8 | (u >> 24));
+					outU8Array[outIdx++] = (byte)(0x80 | ((u >> 18) & 63));
+					outU8Array[outIdx++] = (byte)(0x80 | ((u >> 12) & 63));
+					outU8Array[outIdx++] = (byte)(0x80 | ((u >> 6) & 63));
+					outU8Array[outIdx++] = (byte)(0x80 | (u & 63));
+				}
+				else {
+					if (outIdx + 5 >= endIdx) break;
+					outU8Array[outIdx++] = (byte)(0xFC | (u >> 30));
+					outU8Array[outIdx++] = (byte)(0x80 | ((u >> 24) & 63));
+					outU8Array[outIdx++] = (byte)(0x80 | ((u >> 18) & 63));
+					outU8Array[outIdx++] = (byte)(0x80 | ((u >> 12) & 63));
+					outU8Array[outIdx++] = (byte)(0x80 | ((u >> 6) & 63));
+					outU8Array[outIdx++] = (byte)(0x80 | (u & 63));
+				}
+			}
+			// Null-terminate the pointer to the buffer.
+			outU8Array[outIdx] = 0;
+			return outIdx - startIdx;
+		}
+
+		// from Emscripten (http://kripken.github.io/emscripten-site/)
+		// Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte.
+		internal static int lengthBytesUTF8(string str)
+		{
+			var len = 0;
+			for (var i = 0; i < str.Length; ++i) {
+				// Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8.
+				// See http://unicode.org/faq/utf_bom.html#utf16-3
+				var u = str[i]; // possibly a lead surrogate
+				if (u >= 0xD800 && u <= 0xDFFF) u = (char)(0x10000 + ((u & 0x3FF) << 10) | (str[++i] & 0x3FF));
+				if (u <= 0x7F) {
+					++len;
+				}
+				else if (u <= 0x7FF) {
+					len += 2;
+				}
+				else if (u <= 0xFFFF) {
+					len += 3;
+				}
+				else if (u <= 0x1FFFFF) {
+					len += 4;
+				}
+				else if (u <= 0x3FFFFFF) {
+					len += 5;
+				}
+				else {
+					len += 6;
+				}
+			}
+			return len;
+		}
+
+		internal static Uint8Array UTF8StringToArray(string str)
+		{
+			var len = lengthBytesUTF8(str) + 1;
+			var result = new Uint8Array(len);
+			stringToUTF8Array(str, result, 0, len);
+			return result;
+		}
+
+		static ulong strtoul(Uint8Array s, int ofs, out Uint8Array endptr, int _base_)
+		{
+			if (_base_ != 10) throw new AggregateException();
+			ulong result;
+			if (UInt64.TryParse(UTF8ArrayToString(s.SubArray(ofs, s.Length - ofs + 1), 0), out result)) {
+				endptr = null;
+			}
+			else {
+				endptr = s;
+			}
+			return result;
+		}
+
+		static double mrb_float_read(Uint8Array s, int ofs, out Uint8Array endptr)
+		{
+			double result;
+			if (Double.TryParse(UTF8ArrayToString(s.SubArray(ofs, s.Length - ofs + 1), 0), out result)) {
+				endptr = null;
+			}
+			else {
+				endptr = s;
+			}
+			return result;
+		}
+
+		bool identchar(int c) { return (ISALNUM(c) || (c) == '_' || !ISASCII(c)); }
+
+		void BITSTACK_PUSH(ref stack_type stack, uint n) { stack = (stack_type)(((uint)stack << 1) | (n & 1)); }
+		void BITSTACK_POP(ref stack_type stack) { stack = (stack_type)((uint)stack >> 1); }
+		void BITSTACK_LEXPOP(ref stack_type stack) { stack = (stack_type)(((uint)stack >> 1) | ((uint)stack & 1)); }
+		stack_type BITSTACK_SET_P(ref stack_type stack) { return (stack_type)((uint)stack & 1); }
+
+		void COND_PUSH(uint n) { BITSTACK_PUSH(ref cond_stack, (n)); }
+		void COND_POP() { BITSTACK_POP(ref cond_stack); }
+		void COND_LEXPOP() { BITSTACK_LEXPOP(ref cond_stack); }
+		stack_type COND_P() { return BITSTACK_SET_P(ref cond_stack); }
+
+		void CMDARG_PUSH(uint n) { BITSTACK_PUSH(ref cmdarg_stack, (n)); }
+		void CMDARG_POP() { BITSTACK_POP(ref cmdarg_stack); }
+		void CMDARG_LEXPOP() { BITSTACK_LEXPOP(ref cmdarg_stack); }
+		stack_type CMDARG_P() { return BITSTACK_SET_P(ref cmdarg_stack); }
+
+		string[] syms = new string[0];
+
+		private mrb_sym get_sym(string str)
+		{
+			int i = syms.IndexOf(str);
+			if (i < 0) {
+				i = syms.Length;
+				syms.Push(str);
+			}
+			return (mrb_sym)(i + 1);
+		}
+
+		public string sym2name(mrb_sym sym)
+		{
+			int i = (int)sym - 1;
+			if ((i < 0) || (i >= syms.Length))
+				return ((int)sym).ToString();
+			return syms[i];
+		}
+
+		mrb_sym mrb_intern(Uint8Array s, int len)
+		{
+			string str = UTF8ArrayToString(s.SubArray(0, len + 1), 0);
+			return get_sym(str);
+		}
+
+		mrb_sym intern_cstr(Uint8Array s)
+		{
+			string str = UTF8ArrayToString(s.SubArray(0, strlen(s, 0) + 1), 0);
+			return get_sym(str);
+		}
+
+		mrb_sym intern(string s, int len)
+		{
+			string str = s.Substring(0, len);
+			return get_sym(str);
+		}
+
+		mrb_sym intern_c(char c)
+		{
+			string str = c.ToString();
+			return get_sym(str);
+		}
+
+		public node cons(object car, object cdr)
+		{
+			return node.cons(this, car, cdr);
+		}
+
+		public node list1(object a)
+		{
+			return cons(a, null);
+		}
+
+		public node list2(object a, object b)
+		{
+			return cons(a, cons(b, null));
+		}
+
+		public node list3(object a, object b, object c)
+		{
+			return cons(a, cons(b, cons(c, null)));
+		}
+
+		public node list4(object a, object b, object c, object d)
+		{
+			return cons(a, cons(b, cons(c, cons(d, null))));
+		}
+
+		public node list5(object a, object b, object c, object d, object e)
+		{
+			return cons(a, cons(b, cons(c, cons(d, cons(e, null)))));
+		}
+
+		node append(node a, node b)
+		{
+			if (a == null) return b;
+			a.append(b);
+			return a;
+		}
+
+		node push(node a, object b)
+		{
+			return append(a, list1(b));
+		}
+
+		/* xxx ----------------------------- */
+
+		locals_node local_switch()
+		{
+			var prev = this.locals;
+			this.locals = new locals_node(null);
+			return prev;
+		}
+
+		void local_resume(locals_node prev)
+		{
+			this.locals = prev;
+		}
+
+		void local_nest()
+		{
+			this.locals = new locals_node(this.locals);
+		}
+
+		void local_unnest()
+		{
+			if (this.locals != null) {
+				this.locals = this.locals.cdr;
+			}
+		}
+
+		bool local_var_p(mrb_sym sym)
+		{
+			locals_node l = this.locals;
+
+			while (l != null) {
+				if (l.symList.Contains(sym))
+					return true;
+				l = l.cdr;
+			}
+			return false;
+		}
+
+		void local_add_f(mrb_sym sym)
+		{
+			if (this.locals != null) {
+				this.locals.push(sym);
+			}
+		}
+
+		void local_add(mrb_sym sym)
+		{
+			if (!local_var_p(sym)) {
+				local_add_f(sym);
+			}
+		}
+
+		public mrb_sym[] locals_node()
+		{
+			return this.locals != null ? this.locals.symList : null;
+		}
+
+		/* (:scope (vars..) (prog...)) */
+		scope_node new_scope(node body)
+		{
+			return new scope_node(this, body);
+		}
+
+		/* (:begin prog...) */
+		begin_node new_begin(node body)
+		{
+			return new begin_node(this, body);
+		}
+
+		node newline_node(node n)
+		{
+			return n;
+		}
+
+		/* (:rescue body rescue else) */
+		rescue_node new_rescue(node body, node resq, node els)
+		{
+			return new rescue_node(this, body, resq, els);
+		}
+
+		rescue_node new_mod_rescue(node body, node resq)
+		{
+			return new_rescue(body, list1(list3(null, null, resq)), null);
+		}
+
+		/* (:ensure body ensure) */
+		ensure_node new_ensure(node a, node b)
+		{
+			return new ensure_node(this, a, b);
+		}
+
+		/* (:nil) */
+		nil_node new_nil()
+		{
+			return new nil_node(this);
+		}
+
+		/* (:true) */
+		true_node new_true()
+		{
+			return new true_node(this);
+		}
+
+		/* (:false) */
+		false_node new_false()
+		{
+			return new false_node(this);
+		}
+
+		/* (:alias new old) */
+		alias_node new_alias(mrb_sym a, mrb_sym b)
+		{
+			return new alias_node(this, a, b);
+		}
+
+		/* (:if cond then else) */
+		if_node new_if(node a, node b, node c, bool inline = false)
+		{
+			return new if_node(this, a, b, c, inline);
+		}
+
+		/* (:unless cond then else) */
+		unless_node new_unless(node a, node b, node c)
+		{
+			return new unless_node(this, a, b, c);
+		}
+
+		/* (:while cond body) */
+		while_node new_while(node a, node b)
+		{
+			return new while_node(this, a, b);
+		}
+
+		/* (:until cond body) */
+		until_node new_until(node a, node b)
+		{
+			return new until_node(this, a, b);
+		}
+
+		/* (:for var obj body) */
+		for_node new_for(node v, node o, node b)
+		{
+			return new for_node(this, v, o, b);
+		}
+
+		/* (:case a ((when ...) body) ((when...) body)) */
+		case_node new_case(node a, node b)
+		{
+			return new case_node(this, a, b);
+		}
+
+		/* (:postexe a) */
+		postexe_node new_postexe(node a)
+		{
+			return new postexe_node(this, a);
+		}
+
+		/* (:self) */
+		internal self_node new_self()
+		{
+			return new self_node(this);
+		}
+
+		/* (:call a b c) */
+		call_node new_call(node a, mrb_sym b, node c, MrbTokens pass)
+		{
+			return new call_node(this, a, b, c, pass);
+		}
+
+		/* (:fcall self mid args) */
+		fcall_node new_fcall(mrb_sym b, node c)
+		{
+			return new fcall_node(this, b, c);
+		}
+
+		/* (:super . c) */
+		super_node new_super(node c)
+		{
+			return new super_node(this, c);
+		}
+
+		/* (:zsuper) */
+		zsuper_node new_zsuper()
+		{
+			return new zsuper_node(this);
+		}
+
+		/* (:yield . c) */
+		yield_node new_yield(node c)
+		{
+			return new yield_node(this, c);
+		}
+
+		/* (:return . c) */
+		return_node new_return(node c)
+		{
+			return new return_node(this, c);
+		}
+
+		/* (:break . c) */
+		break_node new_break(node c)
+		{
+			return new break_node(this, c);
+		}
+
+		/* (:next . c) */
+		next_node new_next(node c)
+		{
+			return new next_node(this, c);
+		}
+
+		/* (:redo) */
+		redo_node new_redo()
+		{
+			return new redo_node(this);
+		}
+
+		/* (:retry) */
+		retry_node new_retry()
+		{
+			return new retry_node(this);
+		}
+
+		/* (:dot2 a b) */
+		dot2_node new_dot2(node a, node b)
+		{
+			return new dot2_node(this, a, b);
+		}
+
+		/* (:dot3 a b) */
+		dot3_node new_dot3(node a, node b)
+		{
+			return new dot3_node(this, a, b);
+		}
+
+		/* (:colon2 b c) */
+		colon2_node new_colon2(node b, mrb_sym c)
+		{
+			return new colon2_node(this, b, c);
+		}
+
+		/* (:colon3 . c) */
+		colon3_node new_colon3(mrb_sym c)
+		{
+			return new colon3_node(this, c);
+		}
+
+		/* (:and a b) */
+		and_node new_and(node a, node b)
+		{
+			return new and_node(this, a, b);
+		}
+
+		/* (:or a b) */
+		or_node new_or(node a, node b)
+		{
+			return new or_node(this, a, b);
+		}
+
+		/* (:array a...) */
+		array_node new_array(node a)
+		{
+			return new array_node(this, a);
+		}
+
+		/* (:splat . a) */
+		splat_node new_splat(node a)
+		{
+			return new splat_node(this, a);
+		}
+
+		/* (:hash (k . v) (k . v)...) */
+		hash_node new_hash(node a)
+		{
+			return new hash_node(this, a);
+		}
+
+		/* (:sym . a) */
+		sym_node new_sym(mrb_sym sym)
+		{
+			return new sym_node(this, sym);
+		}
+
+		mrb_sym new_strsym(node str)
+		{
+			Uint8Array s;
+			int len;
+
+			if (str is str_node) {
+				s = ((str_node)str).str;
+				len = ((str_node)str).len;
+			}
+			else {
+				s = (Uint8Array)((node)str.cdr).car;
+				len = (int)((node)str.cdr).cdr;
+			}
+
+			return mrb_intern(s, len);
+		}
+
+		/* (:lvar . a) */
+		lvar_node new_lvar(mrb_sym sym)
+		{
+			return new lvar_node(this, sym);
+		}
+
+		/* (:gvar . a) */
+		gvar_node new_gvar(mrb_sym sym)
+		{
+			return new gvar_node(this, sym);
+		}
+
+		/* (:ivar . a) */
+		ivar_node new_ivar(mrb_sym sym)
+		{
+			return new ivar_node(this, sym);
+		}
+
+		/* (:cvar . a) */
+		cvar_node new_cvar(mrb_sym sym)
+		{
+			return new cvar_node(this, sym);
+		}
+
+		/* (:const . a) */
+		const_node new_const(mrb_sym sym)
+		{
+			return new const_node(this, sym);
+		}
+
+		/* (:undef a...) */
+		undef_node new_undef(mrb_sym sym)
+		{
+			return new undef_node(this, sym);
+		}
+
+		/* (:class class super body) */
+		class_node new_class(node c, node s, node b)
+		{
+			return new class_node(this, c, s, b);
+		}
+
+		/* (:sclass obj body) */
+		sclass_node new_sclass(node o, node b)
+		{
+			return new sclass_node(this, o, b);
+		}
+
+		/* (:module module body) */
+		module_node new_module(node m, node b)
+		{
+			return new module_node(this, m, b);
+		}
+
+		/* (:def m lv (arg . body)) */
+		def_node new_def(mrb_sym m, node a, node b)
+		{
+			return new def_node(this, m, a, b);
+		}
+
+		/* (:sdef obj m lv (arg . body)) */
+		sdef_node new_sdef(node o, mrb_sym m, node a, node b)
+		{
+			return new sdef_node(this, o, m, a, b);
+		}
+
+		/* (:arg . sym) */
+		arg_node new_arg(mrb_sym sym)
+		{
+			return new arg_node(this, sym);
+		}
+
+		/* (m o r m2 b) */
+		/* m: (a b c) */
+		/* o: ((a . e1) (b . e2)) */
+		/* r: a */
+		/* m2: (a b c) */
+		/* b: a */
+		node new_args(node m, node opt, mrb_sym rest, node m2, mrb_sym blk)
+		{
+			node n;
+
+			n = cons(m2, blk);
+			n = cons(rest, n);
+			n = cons(opt, n);
+			return cons(m, n);
+		}
+
+		/* (:block_arg . a) */
+		block_arg_node new_block_arg(node a)
+		{
+			return new block_arg_node(this, a);
+		}
+
+		/* (:block arg body) */
+		block_node new_block(node a, node b, bool brace)
+		{
+			return new block_node(this, a, b, brace);
+		}
+
+		/* (:lambda arg body) */
+		lambda_node new_lambda(node a, node b)
+		{
+			return new lambda_node(this, a, b);
+		}
+
+		/* (:asgn lhs rhs) */
+		asgn_node new_asgn(node a, node b)
+		{
+			return new asgn_node(this, a, b);
+		}
+
+		/* (:masgn mlhs=(pre rest post)  mrhs) */
+		masgn_node new_masgn(node a, node b)
+		{
+			return new masgn_node(this, a, b);
+		}
+
+		/* (:asgn lhs rhs) */
+		op_asgn_node new_op_asgn(node a, mrb_sym op, node b)
+		{
+			return new op_asgn_node(this, a, op, b);
+		}
+
+		/* (:int . i) */
+		int_node new_int(Uint8Array s, int _base)
+		{
+			return new int_node(this, s, _base);
+		}
+
+		int_node new_int(string s, int _base) { return new_int(MrbParser.UTF8StringToArray(s), _base); }
+
+		/* (:float . i) */
+		float_node new_float(Uint8Array s)
+		{
+			return new float_node(this, s);
+		}
+
+		/* (:str . (s . len)) */
+		str_node new_str(Uint8Array s, int len)
+		{
+			return new str_node(this, s, len);
+		}
+
+		str_node new_str(string s, int len) { return new_str(MrbParser.UTF8StringToArray(s), len); }
+
+		/* (:dstr . a) */
+		internal dstr_node new_dstr(node a)
+		{
+			return new dstr_node(this, a);
+		}
+
+		/* (:str . (s . len)) */
+		xstr_node new_xstr(Uint8Array s, int len)
+		{
+			return new xstr_node(this, s, len);
+		}
+
+		/* (:xstr . a) */
+		dxstr_node new_dxstr(node a)
+		{
+			return new dxstr_node(this, a);
+		}
+
+		/* (:dsym . a) */
+		dsym_node new_dsym(node a)
+		{
+			return new dsym_node(this, a);
+		}
+
+		/* (:str . (a . a)) */
+		regx_node new_regx(Uint8Array p1, Uint8Array p2, Uint8Array p3)
+		{
+			return new regx_node(this, p1, p2, p3);
+		}
+
+		/* (:dregx . a) */
+		dregx_node new_dregx(node a, node b)
+		{
+			return new dregx_node(this, a, b);
+		}
+
+		/* (:backref . n) */
+		back_ref_node new_back_ref(int n)
+		{
+			return new back_ref_node(this, n);
+		}
+
+		/* (:nthref . n) */
+		nth_ref_node new_nth_ref(int n)
+		{
+			return new nth_ref_node(this, n);
+		}
+
+		/* (:heredoc . a) */
+		heredoc_node new_heredoc()
+		{
+			return new heredoc_node(this);
+		}
+
+		void new_bv(mrb_sym id)
+		{
+		}
+
+		literal_delim_node new_literal_delim()
+		{
+			return new literal_delim_node(this);
+		}
+
+		/* (:words . a) */
+		words_node new_words(node a)
+		{
+			return new words_node(this, a);
+		}
+
+		/* (:symbols . a) */
+		symbols_node new_symbols(node a)
+		{
+			return new symbols_node(this, a);
+		}
+
+		filename_node new_filename(string s)
+		{
+			var str = MrbParser.UTF8StringToArray(s);
+			return new filename_node(this, str, str.Length);
+		}
+
+		lineno_node new_lineno(int lineno)
+		{
+			return new lineno_node(this, lineno);
+		}
+
+		/* xxx ----------------------------- */
+
+		/* (:call a op) */
+		node call_uni_op(node recv, string m)
+		{
+			return new_call(recv, intern_cstr(MrbParser.UTF8StringToArray(m)), null, (MrbTokens)1);
+		}
+
+		/* (:call a op b) */
+		node call_bin_op(node recv, string m, node arg1)
+		{
+			return new_call(recv, intern_cstr(MrbParser.UTF8StringToArray(m)), list1(list1(arg1)), (MrbTokens)1);
+		}
+
+		void args_with_block(node a, node b)
+		{
+			if (b != null) {
+				if (a.cdr != null) {
+					yyError("both block arg and actual block given");
+				}
+				a.cdr = b;
+			}
+		}
+
+		void call_with_block(node a, node b)
+		{
+			switch ((node_type)a.car) {
+			case node_type.NODE_SUPER:
+				((super_node)a).add_block(b);
+				break;
+			case node_type.NODE_ZSUPER:
+				((zsuper_node)a).add_block(b);
+				break;
+			case node_type.NODE_CALL:
+				((call_node)a).add_block(b);
+				break;
+			case node_type.NODE_FCALL:
+				((fcall_node)a).add_block(b);
+				break;
+			default:
+				break;
+			}
+		}
+
+		node negate_lit(node n)
+		{
+			return new negate_node(this, n);
+		}
+
+		static node cond(node n)
+		{
+			return n;
+		}
+
+		node ret_args(node n)
+		{
+			if (n.cdr != null) {
+				yyError("block argument should not be given");
+				return null;
+			}
+			if (((node)n.car).cdr == null) return (node)((node)n.car).car;
+			return new_array((node)n.car);
+		}
+
+		void assignable(node lhs)
+		{
+			var lvar = lhs as lvar_node;
+			if (lvar != null) {
+				local_add(lvar.name);
+			}
+		}
+
+		node var_reference(node lhs)
+		{
+			node n;
+
+			var lvar = lhs as lvar_node;
+			if (lvar != null) {
+				if (!local_var_p(lvar.name)) {
+					n = new_fcall(lvar.name, null);
+					return n;
+				}
+			}
+
+			return lhs;
+		}
+
+		node new_strterm(mrb_string_type type, int term, int paren)
+		{
+			return cons(type, cons(0, cons(paren, term)));
+		}
+
+		void end_strterm()
+		{
+			this.lex_strterm = null;
+		}
+
+		parser_heredoc_info parsing_heredoc_inf()
+		{
+			node nd = this.parsing_heredoc;
+			if (nd == null)
+				return null;
+			/* mrb_assert(nd.car.car == node_type.NODE_HEREDOC); */
+			return ((heredoc_node)nd.car).info;
+		}
+
+		void heredoc_treat_nextline()
+		{
+			if (this.heredocs_from_nextline == null)
+				return;
+			if (this.parsing_heredoc == null) {
+				node n;
+				this.parsing_heredoc = this.heredocs_from_nextline;
+				this.lex_strterm_before_heredoc = this.lex_strterm;
+				this.lex_strterm = new_strterm(parsing_heredoc_inf().type, 0, 0);
+				n = this.all_heredocs;
+				if (n != null) {
+					while (n.cdr != null)
+						n = (node)n.cdr;
+					n.cdr = this.parsing_heredoc;
+				}
+				else {
+					this.all_heredocs = this.parsing_heredoc;
+				}
+			}
+			else {
+				node n, m;
+				m = this.heredocs_from_nextline;
+				while (m.cdr != null)
+					m = (node)m.cdr;
+				n = this.all_heredocs;
+				mrb_assert(n != null);
+				if (n == this.parsing_heredoc) {
+					m.cdr = n;
+					this.all_heredocs = this.heredocs_from_nextline;
+					this.parsing_heredoc = this.heredocs_from_nextline;
+				}
+				else {
+					while (n.cdr != this.parsing_heredoc) {
+						n = (node)n.cdr;
+						mrb_assert(n != null);
+					}
+					m.cdr = n.cdr;
+					n.cdr = this.heredocs_from_nextline;
+					this.parsing_heredoc = this.heredocs_from_nextline;
+				}
+			}
+			this.heredocs_from_nextline = null;
+		}
+
+		void heredoc_end()
+		{
+			this.parsing_heredoc = (node)this.parsing_heredoc.cdr;
+			if (this.parsing_heredoc == null) {
+				this.lstate = mrb_lex_state_enum.EXPR_BEG;
+				this.cmd_start = true;
+				end_strterm();
+				this.lex_strterm = (node)this.lex_strterm_before_heredoc;
+				this.lex_strterm_before_heredoc = null;
+			}
+			else {
+				/* next heredoc */
+				this.lex_strterm.car = parsing_heredoc_inf().type;
+			}
+		}
+
+		bool is_strterm_type(mrb_string_type str_func)
+		{
+			return (((int)lex_strterm.car) & (int)str_func) != 0;
+		}
+
+		static Uint8Array begin = MrbParser.UTF8StringToArray("begin");
+		static Uint8Array end = MrbParser.UTF8StringToArray("\n=end");
+
+		void pushback(int c)
+		{
+			if (c >= 0) {
+				column--;
+			}
+			this.pb = cons(c, this.pb);
+		}
+
+		void backref_error(node n)
+		{
+			var c = (node_type)n.car;
+
+			if (c == node_type.NODE_NTH_REF) {
+				yyError("can't set variable ${0}", ((int)n.cdr).ToString());
+			}
+			else if (c == node_type.NODE_BACK_REF) {
+				yyError("can't set variable ${0}", ((char)n.cdr).ToString());
+			}
+			else {
+				//mrb_bug(mrb, "Internal error in backref_error() : n=>car == %S", mrb_fixnum_value(c));
+			}
+		}
+
+		void void_expr_error(node n)
+		{
+			if (n == null) return;
+			switch ((node_type)n.car) {
+			case node_type.NODE_BREAK:
+			case node_type.NODE_RETURN:
+			case node_type.NODE_NEXT:
+			case node_type.NODE_REDO:
+			case node_type.NODE_RETRY:
+				yyError("void value expression");
+				break;
+			default:
+				break;
+			}
+		}
+
+		int nextc()
+		{
+			for (;;) {
+				int c;
+
+				if (this.pb != null) {
+					node tmp;
+
+					c = (int)this.pb.car;
+					tmp = this.pb;
+					this.pb = (node)this.pb.cdr;
+				}
+				else {
+#if false
+					if (this.f != null) {
+						if (!this.f.CanRead)
+							break;
+						c = this.f.ReadByte();
+						if (c == -1) break;
+					}
+					else
+#endif
+					if (this.s == null || this.sp >= this.s.Length) {
+						break;
+					}
+					else {
+						c = (byte)this.s[sp++];
+					}
+				}
+				if (c >= 0) {
+					this.column++;
+				}
+				if (c == '\r') {
+					c = nextc();
+					if (c != '\n') {
+						pushback(c);
+						return '\r';
+					}
+					return c;
+				}
+				return c;
+			}
+
+			if (this.partial_hook == null) return -1;
+			else {
+				if (this.partial_hook(this) < 0)
+					return -1;                /* end of program(s) */
+				return -2;                  /* end of a file in the program files */
+			}
+		}
+
+		void skip(char term)
+		{
+			int c;
+
+			for (;;) {
+				c = nextc();
+				if (c < 0) break;
+				if (c == term) break;
+			}
+		}
+
+		int peekc_n(int n)
+		{
+			node list = null;
+			int c0;
+
+			do {
+				c0 = nextc();
+				if (c0 == -1) return c0;    /* do not skip partial EOF */
+				if (c0 >= 0) --column;
+				list = push(list, c0);
+			} while (n-- != 0);
+			if (this.pb != null) {
+				this.pb = append(list, this.pb);
+			}
+			else {
+				this.pb = list;
+			}
+			return c0;
+		}
+
+		bool peek_n(int c, int n)
+		{
+			return peekc_n(n) == c && c >= 0;
+		}
+
+		bool peek(int c)
+		{
+			return peek_n(c, 0);
+		}
+
+		bool peeks(Uint8Array s, int p)
+		{
+			int len = strlen(s, p);
+#if false
+			if (this.f != null) {
+				int n = 0;
+				while (s[p] != 0) {
+					if (!peek_n(s[p++], n++)) return false;
+				}
+				return true;
+			}
+			else
+#endif
+			if (this.s != null && this.sp + len <= this.s.Length) {
+				if (memcmp(this.s, this.sp, s, p, len) == 0) return true;
+			}
+			return false;
+		}
+
+		bool skips(Uint8Array s, int p)
+		{
+			int c;
+
+			for (;;) {
+				/* skip until first char */
+				for (;;) {
+					c = nextc();
+					if (c < 0) return c != 0;
+					if (c == '\n') {
+						this.lineno++;
+						this.column = 0;
+					}
+					if (c == s[p]) break;
+				}
+				p++;
+				if (peeks(s, p)) {
+					int len = strlen(s, p);
+
+					while (len-- != 0) {
+						if (nextc() == '\n') {
+							this.lineno++;
+							this.column = 0;
+						}
+					}
+					return true;
+				}
+				else {
+					p--;
+				}
+			}
+		}
+
+		int newtok()
+		{
+			if (this.tokbuf != this.buf) {
+				//delete this.tokbuf;
+				this.tokbuf = this.buf;
+				this.tsiz = MRB_PARSER_TOKBUF_SIZE;
+			}
+			this.tidx = 0;
+			return this.column - 1;
+		}
+
+		void tokadd(int c)
+		{
+			Uint8Array utf8 = new Uint8Array(4);
+			int len;
+
+			/* mrb_assert(-0x10FFFF <= c && c <= 0xFF); */
+			if (c >= 0) {
+				/* Single byte from source or non-Unicode escape */
+				utf8[0] = (byte)c;
+				len = 1;
+			}
+			else {
+				/* Unicode character */
+				c = -c;
+				if (c < 0x80) {
+					utf8[0] = (byte)c;
+					len = 1;
+				}
+				else if (c < 0x800) {
+					utf8[0] = (byte)(0xC0 | (c >> 6));
+					utf8[1] = (byte)(0x80 | (c & 0x3F));
+					len = 2;
+				}
+				else if (c < 0x10000) {
+					utf8[0] = (byte)(0xE0 | (c >> 12));
+					utf8[1] = (byte)(0x80 | ((c >> 6) & 0x3F));
+					utf8[2] = (byte)(0x80 | (c & 0x3F));
+					len = 3;
+				}
+				else {
+					utf8[0] = (byte)(0xF0 | (c >> 18));
+					utf8[1] = (byte)(0x80 | ((c >> 12) & 0x3F));
+					utf8[2] = (byte)(0x80 | ((c >> 6) & 0x3F));
+					utf8[3] = (byte)(0x80 | (c & 0x3F));
+					len = 4;
+				}
+			}
+			if (this.tidx + len >= this.tsiz) {
+				if (this.tsiz >= MRB_PARSER_TOKBUF_MAX) {
+					this.tidx += len;
+					return;
+				}
+				this.tsiz *= 2;
+				if (this.tokbuf == this.buf) {
+					this.tokbuf = new Uint8Array(this.tsiz);
+					//for(int i = 0; i < MRB_PARSER_TOKBUF_SIZE; i++) this.tokbuf[i] = this.buf[i];
+					this.tokbuf.Set(this.buf, 0);
+				}
+				else {
+					var buf = new Uint8Array(this.tsiz);
+					buf.Set(this.tokbuf, 0);
+					this.tokbuf = buf;
+				}
+			}
+			for (int i = 0; i < len; i++) {
+				this.tokbuf[this.tidx++] = utf8[i];
+			}
+		}
+
+		int toklast()
+		{
+			return this.tokbuf[this.tidx - 1];
+		}
+
+		void tokfix()
+		{
+			if (this.tidx >= MRB_PARSER_TOKBUF_MAX) {
+				this.tidx = MRB_PARSER_TOKBUF_MAX - 1;
+				yyError("string too long (truncated)");
+			}
+			this.tokbuf[this.tidx] = (byte)'\0';
+		}
+
+		Uint8Array tok()
+		{
+			return this.tokbuf;
+		}
+
+		int toklen()
+		{
+			return this.tidx;
+		}
+
+		bool ISASCII(int c) { return ((uint)c <= 0x7f); }
+		bool ISPRINT(int c) { return ((uint)(c - 0x20) < 0x5f); }
+		bool ISSPACE(int c) { return (c == ' ' || (uint)(c - '\t') < 5); }
+		bool ISUPPER(int c) { return ((uint)(c - 'A') < 26); }
+		bool ISLOWER(int c) { return ((uint)(c - 'a') < 26); }
+		bool ISALPHA(int c) { return ((uint)((c | 0x20) - 'a') < 26); }
+		bool ISDIGIT(int c) { return ((uint)(c - '0') < 10); }
+		bool ISXDIGIT(int c) { return (ISDIGIT(c) || (uint)((c | 0x20) - 'a') < 6); }
+		bool ISALNUM(int c) { return (ISALPHA(c) || ISDIGIT(c)); }
+		bool ISBLANK(int c) { return (c == ' ' || c == '\t'); }
+		bool ISCNTRL(int c) { return ((uint)c < 0x20 || c == 0x7f); }
+		int TOUPPER(int c) { return (ISLOWER(c) ? (c & 0x5f) : (c)); }
+		int TOLOWER(int c) { return (ISUPPER(c) ? (c | 0x20) : (c)); }
+
+		bool IS_ARG() { return (this.lstate == mrb_lex_state_enum.EXPR_ARG || this.lstate == mrb_lex_state_enum.EXPR_CMDARG); }
+		bool IS_END() { return (this.lstate == mrb_lex_state_enum.EXPR_END || this.lstate == mrb_lex_state_enum.EXPR_ENDARG || this.lstate == mrb_lex_state_enum.EXPR_ENDFN); }
+		bool IS_BEG() { return (this.lstate == mrb_lex_state_enum.EXPR_BEG || this.lstate == mrb_lex_state_enum.EXPR_MID || this.lstate == mrb_lex_state_enum.EXPR_VALUE || this.lstate == mrb_lex_state_enum.EXPR_CLASS); }
+		bool IS_SPCARG(int c, bool space_seen) { return (IS_ARG() && space_seen && !ISSPACE(c)); }
+		bool IS_LABEL_POSSIBLE(bool cmd_state) { return ((this.lstate == mrb_lex_state_enum.EXPR_BEG && !cmd_state) || IS_ARG()); }
+		bool IS_LABEL_SUFFIX(int n) { return (peek_n(':', (n)) && !peek_n(':', (n) + 1)); }
+
+		static int scan_oct(int[] start, int len, ref int retlen)
+		{
+			int s = 0;
+			int retval = 0;
+
+			/* mrb_assert(len <= 3) */
+			while (len-- != 0 && start[s] >= '0' && start[s] <= '7') {
+				retval <<= 3;
+				retval |= start[s++] - '0';
+			}
+			retlen = s;
+
+			return retval;
+		}
+
+		static int scan_hex(int[] start, int len, ref int retlen)
+		{
+			Uint8Array hexdigit = MrbParser.UTF8StringToArray("0123456789abcdef0123456789ABCDEF");
+			int s = 0;
+			int retval = 0;
+			int tmp;
+
+			/* mrb_assert(len <= 8) */
+			while (len-- != 0 && start[s] != 0 && (tmp = strchr(hexdigit, 0, start[s])) >= 0) {
+				retval <<= 4;
+				retval |= tmp & 15;
+				s++;
+			}
+			retlen = s;
+
+			return retval;
+		}
+
+		int read_escape_unicode(int limit)
+		{
+			for (;;) {
+				int c;
+				int[] buf = new int[9];
+				int i;
+
+				/* Look for opening brace */
+				i = 0;
+				buf[0] = nextc();
+				if (buf[0] < 0) break;
+				if (ISXDIGIT(buf[0])) {
+					/* \uxxxx form */
+					for (i = 1; i < limit; i++) {
+						buf[i] = nextc();
+						if (buf[i] < 0) break;
+						if (!ISXDIGIT(buf[i])) {
+							pushback(buf[i]);
+							break;
+						}
+					}
+				}
+				else {
+					pushback(buf[0]);
+				}
+				c = scan_hex(buf, i, ref i);
+				if (i == 0) {
+					break;
+				}
+				if (c < 0 || c > 0x10FFFF || (c & 0xFFFFF800) == 0xD800) {
+					yyError("Invalid Unicode code point");
+					return -1;
+				}
+				return c;
+			}
+
+			yyError("Invalid escape character syntax");
+			return -1;
+		}
+
+		/* Return negative to indicate Unicode code point */
+		int read_escape()
+		{
+			int c;
+
+			switch (c = nextc()) {
+			case '\\':/* Backslash */
+				return c;
+
+			case 'n':/* newline */
+				return '\n';
+
+			case 't':/* horizontal tab */
+				return '\t';
+
+			case 'r':/* carriage-return */
+				return '\r';
+
+			case 'f':/* form-feed */
+				return '\f';
+
+			case 'v':/* vertical tab */
+				return '\v';
+
+			case 'a':/* alarm(bell) */
+				return '\x07';
+
+			case 'e':/* escape */
+				return 033;
+			case '0':
+			case '1':
+			case '2':
+			case '3': /* octal constant */
+			case '4':
+			case '5':
+			case '6':
+			case '7': {
+					int[] buf = new int[3];
+					int i;
+
+					bool error = false;
+					buf[0] = c;
+					for (i = 1; i < 3; i++) {
+						buf[i] = nextc();
+						if (buf[i] < 0) {
+							error = true;
+							break;
+						}
+						if (buf[i] < '0' || '7' < buf[i]) {
+							pushback(buf[i]);
+							break;
+						}
+					}
+					if (error)
+						break;
+					c = scan_oct(buf, i, ref i);
+				}
+				return c;
+
+			case 'x':     /* hex constant */
+				{
+					int[] buf = new int[2];
+					int i;
+
+					bool error = false;
+					for (i = 0; i < 2; i++) {
+						buf[i] = nextc();
+						if (buf[i] < 0) {
+							error = true;
+							break;
+						}
+						if (!ISXDIGIT(buf[i])) {
+							pushback(buf[i]);
+							break;
+						}
+					}
+					if (error)
+						break;
+					c = scan_hex(buf, i, ref i);
+					if (i == 0) {
+						yyError("Invalid escape character syntax");
+						return 0;
+					}
+				}
+				return c;
+
+			case 'u':     /* Unicode */
+				if (peek('{')) {
+					/* \u{xxxxxxxx} form */
+					nextc();
+					c = read_escape_unicode(8);
+					if (c < 0) return 0;
+					if (nextc() != '}') break;
+				}
+				else {
+					c = read_escape_unicode(4);
+					if (c < 0) return 0;
+				}
+				return -c;
+
+			case 'b':/* backspace */
+				return '\b';
+
+			case 's':/* space */
+				return ' ';
+
+			case 'M':
+				if ((c = nextc()) != '-') {
+					yyError("Invalid escape character syntax");
+					pushback(c);
+					return '\0';
+				}
+				if ((c = nextc()) == '\\') {
+					return read_escape() | 0x80;
+				}
+				else if (c < 0) break;
+				else {
+					return ((c & 0xff) | 0x80);
+				}
+
+			case 'C':
+			case 'c':
+				if (c == 'C') {
+					if ((c = nextc()) != '-') {
+						yyError("Invalid escape character syntax");
+						pushback(c);
+						return '\0';
+					}
+				}
+				if ((c = nextc()) == '\\') {
+					c = read_escape();
+				}
+				else if (c == '?')
+					return 0177;
+				else if (c < 0) break;
+				return c & 0x9f;
+
+			case -1:
+			case -2:                      /* end of a file */
+				break;
+
+			default:
+				return c;
+			}
+
+			yyError("Invalid escape character syntax");
+			return '\0';
+		}
+
+		MrbTokens parse_string()
+		{
+			int c;
+			var type = (mrb_string_type)this.lex_strterm.car;
+			var nest_level = (int)((node)this.lex_strterm.cdr).car;
+			var beg = (int)((node)((node)this.lex_strterm.cdr).cdr).car;
+			var end = (int)((node)((node)this.lex_strterm.cdr).cdr).cdr;
+			var hinf = (type & mrb_string_type.STR_FUNC_HEREDOC) != 0 ? parsing_heredoc_inf() : null;
+			var cmd_state = this.cmd_start;
+
+			if (beg == 0) beg = -3;       /* should never happen */
+			if (end == 0) end = -3;
+			newtok();
+			while ((c = nextc()) != end || nest_level != 0) {
+				if (hinf != null && (c == '\n' || c < 0)) {
+					bool line_head;
+					tokadd('\n');
+					tokfix();
+					this.lineno++;
+					this.column = 0;
+					line_head = hinf.line_head;
+					hinf.line_head = true;
+					if (line_head) {
+						/* check whether end of heredoc */
+						Uint8Array s = tok();
+						int p = 0;
+						int len = toklen();
+						if (hinf.allow_indent) {
+							while (ISSPACE(s[p]) && len > 0) {
+								++p;
+								--len;
+							}
+						}
+						if ((len - 1 == hinf.term_len) && (strncmp(s, p, hinf.term, 0, len - 1) == 0)) {
+							if (c < 0) {
+								parsing_heredoc = null;
+							}
+							else {
+								return MrbTokens.tHEREDOC_END;
+							}
+						}
+					}
+					if (c < 0) {
+						yyError("can't find heredoc delimiter \"{0}\" anywhere before EOF", MrbParser.UTF8ArrayToString(hinf.term, 0));
+						return 0;
+					}
+					yylval.nd = new_str(tok(), toklen());
+					return MrbTokens.tHD_STRING_MID;
+				}
+				if (c < 0) {
+					yyError("unterminated Uint8Array meets end of file");
+					return 0;
+				}
+				else if (c == beg) {
+					nest_level++;
+					((node)this.lex_strterm.cdr).car = nest_level;
+				}
+				else if (c == end) {
+					nest_level--;
+					((node)this.lex_strterm.cdr).car = nest_level;
+				}
+				else if (c == '\\') {
+					c = nextc();
+					if ((type & mrb_string_type.STR_FUNC_EXPAND) != 0) {
+						if (c == end || c == beg) {
+							tokadd(c);
+						}
+						else if (c == '\n') {
+							this.lineno++;
+							this.column = 0;
+							if ((type & mrb_string_type.STR_FUNC_ARRAY) != 0) {
+								tokadd('\n');
+							}
+						}
+						else if ((type & mrb_string_type.STR_FUNC_REGEXP) != 0) {
+							tokadd('\\');
+							tokadd(c);
+						}
+						else if (c == 'u' && peek('{')) {
+							/* \u{xxxx xxxx xxxx} form */
+							nextc();
+							while (true) {
+								do c = nextc(); while (ISSPACE(c));
+								if (c == '}') break;
+								pushback(c);
+								c = read_escape_unicode(8);
+								if (c < 0) break;
+								tokadd(-c);
+							}
+							if (hinf != null)
+								hinf.line_head = false;
+						}
+						else {
+							pushback(c);
+							tokadd(read_escape());
+							if (hinf != null)
+								hinf.line_head = false;
+						}
+					}
+					else {
+						if (c != beg && c != end) {
+							if (c == '\n') {
+								this.lineno++;
+								this.column = 0;
+							}
+							if (!(c == '\\' || ((type & mrb_string_type.STR_FUNC_ARRAY) != 0 && ISSPACE(c)))) {
+								tokadd('\\');
+							}
+						}
+						tokadd(c);
+					}
+					continue;
+				}
+				else if ((c == '#') && (type & mrb_string_type.STR_FUNC_EXPAND) != 0) {
+					c = nextc();
+					if (c == '{') {
+						tokfix();
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+						this.cmd_start = true;
+						yylval.nd = new_str(tok(), toklen());
+						if (hinf != null) {
+							hinf.line_head = false;
+							return MrbTokens.tHD_STRING_PART;
+						}
+						return MrbTokens.tSTRING_PART;
+					}
+					tokadd('#');
+					pushback(c);
+					continue;
+				}
+				if ((type & mrb_string_type.STR_FUNC_ARRAY) != 0 && ISSPACE(c)) {
+					if (toklen() == 0) {
+						do {
+							if (c == '\n') {
+								this.lineno++;
+								this.column = 0;
+								heredoc_treat_nextline();
+								if (this.parsing_heredoc != null) {
+									return MrbTokens.tHD_LITERAL_DELIM;
+								}
+							}
+							c = nextc();
+						} while (ISSPACE(c));
+						pushback(c);
+						return MrbTokens.tLITERAL_DELIM;
+					}
+					else {
+						pushback(c);
+						tokfix();
+						yylval.nd = new_str(tok(), toklen());
+						return MrbTokens.tSTRING_MID;
+					}
+				}
+				tokadd(c);
+			}
+
+			tokfix();
+			this.lstate = mrb_lex_state_enum.EXPR_END;
+			end_strterm();
+
+			if ((type & mrb_string_type.STR_FUNC_XQUOTE) != 0) {
+				yylval.nd = new_xstr(tok(), toklen());
+				return MrbTokens.tXSTRING;
+			}
+
+			if ((type & mrb_string_type.STR_FUNC_REGEXP) != 0) {
+				int f = 0;
+				int re_opt;
+				Uint8Array s = strndup(tok(), 0, toklen());
+				Uint8Array flags = new Uint8Array(3);
+				int flag = 0;
+				var enc = (byte)'\0';
+				Uint8Array encp;
+				Uint8Array dup;
+
+				newtok();
+				while ((re_opt = nextc()) >= 0 && ISALPHA(re_opt)) {
+					switch (re_opt) {
+					case 'i': f |= 1; break;
+					case 'x': f |= 2; break;
+					case 'm': f |= 4; break;
+					case 'u': f |= 16; break;
+					case 'n': f |= 32; break;
+					default: tokadd(re_opt); break;
+					}
+				}
+				pushback(re_opt);
+				if (toklen() != 0) {
+					tokfix();
+					yyError("unknown regexp option%s - %s", toklen() > 1 ? "s" : "", MrbParser.UTF8ArrayToString(tok().SubArray(0, toklen() + 1), 0));
+				}
+				if (f != 0) {
+					if ((f & 1) != 0) flags[flag++] = (byte)'i';
+					if ((f & 2) != 0) flags[flag++] = (byte)'x';
+					if ((f & 4) != 0) flags[flag++] = (byte)'m';
+					if ((f & 16) != 0) enc = (byte)'u';
+					if ((f & 32) != 0) enc = (byte)'n';
+				}
+				if (flag > 0) {
+					dup = strndup(flags, 0, flag);
+				}
+				else {
+					dup = null;
+				}
+				if (enc != 0) {
+					encp = strndup(new Uint8Array(new byte[] { enc }), 0, 1);
+				}
+				else {
+					encp = null;
+				}
+				yylval.nd = new_regx(s, dup, encp);
+
+				return MrbTokens.tREGEXP;
+			}
+			yylval.nd = new_str(tok(), toklen());
+			if (IS_LABEL_POSSIBLE(cmd_state)) {
+				if (IS_LABEL_SUFFIX(0)) {
+					this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					nextc();
+					return MrbTokens.tLABEL_END;
+				}
+			}
+			return MrbTokens.tSTRING;
+		}
+
+		MrbTokens heredoc_identifier()
+		{
+			int c;
+			mrb_string_type type = mrb_string_type.str_heredoc;
+			bool indent = false;
+			bool quote = false;
+			heredoc_node newnode;
+			parser_heredoc_info info;
+
+			c = nextc();
+			if (ISSPACE(c) || c == '=') {
+				pushback(c);
+				return 0;
+			}
+			if (c == '-') {
+				indent = true;
+				c = nextc();
+			}
+			if (c == '\'' || c == '"') {
+				int term = c;
+				if (c == '\'')
+					quote = true;
+				newtok();
+				while ((c = nextc()) >= 0 && c != term) {
+					if (c == '\n') {
+						c = -1;
+						break;
+					}
+					tokadd(c);
+				}
+				if (c < 0) {
+					yyError("unterminated here document identifier");
+					return 0;
+				}
+			}
+			else {
+				if (c < 0) {
+					return 0;                 /* missing here document identifier */
+				}
+				if (!identchar(c)) {
+					pushback(c);
+					if (indent) pushback('-');
+					return 0;
+				}
+				newtok();
+				do {
+					tokadd(c);
+				} while ((c = nextc()) >= 0 && identchar(c));
+				pushback(c);
+			}
+			tokfix();
+			newnode = new_heredoc();
+			info = newnode.info;
+			info.term = strndup(tok(), 0, toklen());
+			info.term_len = toklen();
+			if (!quote)
+				type |= mrb_string_type.STR_FUNC_EXPAND;
+			info.type = type;
+			info.allow_indent = indent;
+			info.line_head = true;
+			info.claer_doc();
+			this.heredocs_from_nextline = push(this.heredocs_from_nextline, newnode);
+			this.lstate = mrb_lex_state_enum.EXPR_END;
+
+			yylval.nd = newnode;
+			return MrbTokens.tHEREDOC_BEG;
+		}
+
+		MrbTokens start_num(int c)
+		{
+			int nondigit;
+
+			nondigit = 0;
+			this.lstate = mrb_lex_state_enum.EXPR_END;
+			newtok();
+			if (c == '-' || c == '+') {
+				tokadd(c);
+				c = nextc();
+			}
+			if (c == '0') {
+				int start = toklen();
+				c = nextc();
+				if (c == 'x' || c == 'X') {
+					/* hexadecimal */
+					c = nextc();
+					if (c >= 0 && ISXDIGIT(c)) {
+						do {
+							if (c == '_') {
+								if (nondigit != 0) break;
+								nondigit = c;
+								continue;
+							}
+							if (!ISXDIGIT(c)) break;
+							nondigit = 0;
+							tokadd(tolower(c));
+						} while ((c = nextc()) >= 0);
+					}
+					pushback(c);
+					tokfix();
+					if (toklen() == start) {
+						yyError("numeric literal without digits");
+						return 0;
+					}
+					else if (nondigit != 0) return trailing_uc(nondigit, 0);
+					yylval.nd = new_int(tok(), 16);
+					return MrbTokens.tINTEGER;
+				}
+				if (c == 'b' || c == 'B') {
+					/* binary */
+					c = nextc();
+					if (c == '0' || c == '1') {
+						do {
+							if (c == '_') {
+								if (nondigit != 0) break;
+								nondigit = c;
+								continue;
+							}
+							if (c != '0' && c != '1') break;
+							nondigit = 0;
+							tokadd(c);
+						} while ((c = nextc()) >= 0);
+					}
+					pushback(c);
+					tokfix();
+					if (toklen() == start) {
+						yyError("numeric literal without digits");
+						return 0;
+					}
+					else if (nondigit != 0) return trailing_uc(nondigit, 0);
+					yylval.nd = new_int(tok(), 2);
+					return MrbTokens.tINTEGER;
+				}
+				if (c == 'd' || c == 'D') {
+					/* decimal */
+					c = nextc();
+					if (c >= 0 && ISDIGIT(c)) {
+						do {
+							if (c == '_') {
+								if (nondigit != 0) break;
+								nondigit = c;
+								continue;
+							}
+							if (!ISDIGIT(c)) break;
+							nondigit = 0;
+							tokadd(c);
+						} while ((c = nextc()) >= 0);
+					}
+					pushback(c);
+					tokfix();
+					if (toklen() == start) {
+						yyError("numeric literal without digits");
+						return 0;
+					}
+					else if (nondigit != 0) return trailing_uc(nondigit, 0);
+					yylval.nd = new_int(tok(), 10);
+					return MrbTokens.tINTEGER;
+				}
+				if (c == 'o' || c == 'O') {
+					/* prefixed octal */
+					c = nextc();
+					if (c < 0 || c == '_' || !ISDIGIT(c)) {
+						yyError("numeric literal without digits");
+						return 0;
+					}
+				}
+				if ((c == '_')/* 0_0 */ ||
+					(c >= '0' && c <= '7')/* octal */) {
+					do {
+						if (c == '_') {
+							if (nondigit != 0) break;
+							nondigit = c;
+							continue;
+						}
+						if (c < '0' || c > '9') break;
+						if (c > '7') {
+							yyError("Invalid octal digit");
+							return invalid_octal(c, nondigit);
+						}
+						nondigit = 0;
+						tokadd(c);
+					} while ((c = nextc()) >= 0);
+
+					if (toklen() > start) {
+						pushback(c);
+						tokfix();
+						if (nondigit != 0) return trailing_uc(nondigit, 0);
+						yylval.nd = new_int(tok(), 8);
+						return MrbTokens.tINTEGER;
+					}
+					if (nondigit != 0) {
+						pushback(c);
+						return trailing_uc(nondigit, 0);
+					}
+				}
+
+				if (c > '7' && c <= '9') {
+					yyError("Invalid octal digit");
+					return invalid_octal(c, nondigit);
+				}
+				else if (c == '.' || c == 'e' || c == 'E') {
+					tokadd('0');
+					return invalid_octal(c, nondigit);
+				}
+				else {
+					pushback(c);
+					yylval.nd = new_int("0", 10);
+					return MrbTokens.tINTEGER;
+				}
+			}
+
+			return invalid_octal(c, nondigit);
+		}
+
+		MrbTokens invalid_octal(int c, int nondigit)
+		{
+			int is_float, seen_point, seen_e;
+
+			is_float = seen_point = seen_e = 0;
+
+			for (;;) {
+				switch (c) {
+				case '0':
+				case '1':
+				case '2':
+				case '3':
+				case '4':
+				case '5':
+				case '6':
+				case '7':
+				case '8':
+				case '9':
+					nondigit = 0;
+					tokadd(c);
+					break;
+
+				case '.':
+					if (nondigit != 0) return trailing_uc(nondigit, is_float);
+					if (seen_point != 0 || seen_e != 0) {
+						pushback(c);
+						return trailing_uc(nondigit, is_float);
+					}
+					else {
+						int c0 = nextc();
+						if (c0 < 0 || !ISDIGIT(c0)) {
+							pushback(c0);
+							pushback(c);
+							return trailing_uc(nondigit, is_float);
+						}
+						c = c0;
+					}
+					tokadd('.');
+					tokadd(c);
+					is_float++;
+					seen_point++;
+					nondigit = 0;
+					break;
+
+				case 'e':
+				case 'E':
+					if (nondigit != 0) {
+						pushback(c);
+						c = nondigit;
+						pushback(c);
+						return trailing_uc(nondigit, is_float);
+					}
+					if (seen_e != 0) {
+						pushback(c);
+						return trailing_uc(nondigit, is_float);
+					}
+					tokadd(c);
+					seen_e++;
+					is_float++;
+					nondigit = c;
+					c = nextc();
+					if (c != '-' && c != '+') continue;
+					tokadd(c);
+					nondigit = c;
+					break;
+
+				case '_':       /* '_' in number just ignored */
+					if (nondigit != 0) {
+						pushback(c);
+						return trailing_uc(nondigit, is_float);
+					}
+					nondigit = c;
+					break;
+
+				default: {
+						pushback(c);
+						return trailing_uc(nondigit, is_float);
+					}
+				}
+				c = nextc();
+			}
+		}
+
+		MrbTokens trailing_uc(int nondigit, int is_float)
+		{
+			if (nondigit != 0) {
+				yyError("trailing '{0}' in number", nondigit.ToString());
+			}
+
+			tokfix();
+			if (is_float != 0) {
+				double d;
+				Uint8Array endp;
+
+				errno = 0;
+				d = mrb_float_read(tok(), 0, out endp);
+				if (d == 0 && endp == tok()) {
+					yyWarning("corrupted float value {0}", MrbParser.UTF8ArrayToString(tok().SubArray(0, toklen() + 1), 0));
+				}
+				else if (errno == ERANGE) {
+					yyWarning("float {0} out of range", MrbParser.UTF8ArrayToString(tok().SubArray(0, toklen() + 1), 0));
+					errno = 0;
+				}
+				yylval.nd = new_float(tok());
+				return MrbTokens.tFLOAT;
+			}
+			yylval.nd = new_int(tok(), 10);
+			return MrbTokens.tINTEGER;
+		}
+
+		bool arg_ambiguous()
+		{
+			yyWarning("ambiguous first argument; put parentheses or even spaces");
+			return true;
+		}
+
+		MrbTokens quotation(int c)
+		{
+			int term;
+			int paren;
+
+			if (c < 0 || !ISALNUM(c)) {
+				term = c;
+				c = 'Q';
+			}
+			else {
+				term = nextc();
+				if (isalnum(term)) {
+					yyError("unknown type of %string");
+					return 0;
+				}
+			}
+			if (c < 0 || term < 0) {
+				yyError("unterminated quoted string meets end of file");
+				return 0;
+			}
+			paren = term;
+			if (term == '(') term = ')';
+			else if (term == '[') term = ']';
+			else if (term == '{') term = '}';
+			else if (term == '<') term = '>';
+			else paren = 0;
+
+			switch (c) {
+			case 'Q':
+				this.lex_strterm = new_strterm(mrb_string_type.str_dquote, term, paren);
+				return MrbTokens.tSTRING_BEG;
+
+			case 'q':
+				this.lex_strterm = new_strterm(mrb_string_type.str_squote, term, paren);
+				return parse_string();
+
+			case 'W':
+				this.lex_strterm = new_strterm(mrb_string_type.str_dword, term, paren);
+				return MrbTokens.tWORDS_BEG;
+
+			case 'w':
+				this.lex_strterm = new_strterm(mrb_string_type.str_sword, term, paren);
+				return MrbTokens.tWORDS_BEG;
+
+			case 'x':
+				this.lex_strterm = new_strterm(mrb_string_type.str_xquote, term, paren);
+				return MrbTokens.tXSTRING_BEG;
+
+			case 'r':
+				this.lex_strterm = new_strterm(mrb_string_type.str_regexp, term, paren);
+				return MrbTokens.tREGEXP_BEG;
+
+			case 's':
+				this.lex_strterm = new_strterm(mrb_string_type.str_ssym, term, paren);
+				return MrbTokens.tSYMBEG;
+
+			case 'I':
+				this.lex_strterm = new_strterm(mrb_string_type.str_dsymbols, term, paren);
+				return MrbTokens.tSYMBOLS_BEG;
+
+			case 'i':
+				this.lex_strterm = new_strterm(mrb_string_type.str_ssymbols, term, paren);
+				return MrbTokens.tSYMBOLS_BEG;
+
+			default:
+				yyError("unknown type of %string");
+				return 0;
+			}
+		}
+
+		static readonly Dictionary<string, kwtable> wordlist = new Dictionary<string, kwtable>()
+		{
+			{"break",           new kwtable("break",        MrbTokens.keyword_break,       MrbTokens.keyword_break,       mrb_lex_state_enum.EXPR_MID) },
+			{"else",            new kwtable("else",         MrbTokens.keyword_else,        MrbTokens.keyword_else,        mrb_lex_state_enum.EXPR_BEG) },
+			{"nil",             new kwtable("nil",          MrbTokens.keyword_nil,         MrbTokens.keyword_nil,         mrb_lex_state_enum.EXPR_END) },
+			{"ensure",          new kwtable("ensure",       MrbTokens.keyword_ensure,      MrbTokens.keyword_ensure,      mrb_lex_state_enum.EXPR_BEG) },
+			{"end",             new kwtable("end",          MrbTokens.keyword_end,         MrbTokens.keyword_end,         mrb_lex_state_enum.EXPR_END) },
+			{"then",            new kwtable("then",         MrbTokens.keyword_then,        MrbTokens.keyword_then,        mrb_lex_state_enum.EXPR_BEG) },
+			{"not",             new kwtable("not",          MrbTokens.keyword_not,         MrbTokens.keyword_not,         mrb_lex_state_enum.EXPR_ARG) },
+			{"false",           new kwtable("false",        MrbTokens.keyword_false,       MrbTokens.keyword_false,       mrb_lex_state_enum.EXPR_END) },
+			{"self",            new kwtable("self",         MrbTokens.keyword_self,        MrbTokens.keyword_self,        mrb_lex_state_enum.EXPR_END) },
+			{"elsif",           new kwtable("elsif",        MrbTokens.keyword_elsif,       MrbTokens.keyword_elsif,       mrb_lex_state_enum.EXPR_VALUE) },
+			{"rescue",          new kwtable("rescue",       MrbTokens.keyword_rescue,      MrbTokens.modifier_rescue,     mrb_lex_state_enum.EXPR_MID) },
+			{"true",            new kwtable("true",         MrbTokens.keyword_true,        MrbTokens.keyword_true,        mrb_lex_state_enum.EXPR_END) },
+			{"until",           new kwtable("until",        MrbTokens.keyword_until,       MrbTokens.modifier_until,      mrb_lex_state_enum.EXPR_VALUE) },
+			{"unless",          new kwtable("unless",       MrbTokens.keyword_unless,      MrbTokens.modifier_unless,     mrb_lex_state_enum.EXPR_VALUE) },
+			{"return",          new kwtable("return",       MrbTokens.keyword_return,      MrbTokens.keyword_return,      mrb_lex_state_enum.EXPR_MID) },
+			{"def",             new kwtable("def",          MrbTokens.keyword_def,         MrbTokens.keyword_def,         mrb_lex_state_enum.EXPR_FNAME) },
+			{"and",             new kwtable("and",          MrbTokens.keyword_and,         MrbTokens.keyword_and,         mrb_lex_state_enum.EXPR_VALUE) },
+			{"do",              new kwtable("do",           MrbTokens.keyword_do,          MrbTokens.keyword_do,          mrb_lex_state_enum.EXPR_BEG) },
+			{"yield",           new kwtable("yield",        MrbTokens.keyword_yield,       MrbTokens.keyword_yield,       mrb_lex_state_enum.EXPR_ARG) },
+			{"for",             new kwtable("for",          MrbTokens.keyword_for,         MrbTokens.keyword_for,         mrb_lex_state_enum.EXPR_VALUE) },
+			{"undef",           new kwtable("undef",        MrbTokens.keyword_undef,       MrbTokens.keyword_undef,       mrb_lex_state_enum.EXPR_FNAME) },
+			{"or",              new kwtable("or",           MrbTokens.keyword_or,          MrbTokens.keyword_or,          mrb_lex_state_enum.EXPR_VALUE) },
+			{"in",              new kwtable("in",           MrbTokens.keyword_in,          MrbTokens.keyword_in,          mrb_lex_state_enum.EXPR_VALUE) },
+			{"when",            new kwtable("when",         MrbTokens.keyword_when,        MrbTokens.keyword_when,        mrb_lex_state_enum.EXPR_VALUE) },
+			{"retry",           new kwtable("retry",        MrbTokens.keyword_retry,       MrbTokens.keyword_retry,       mrb_lex_state_enum.EXPR_END) },
+			{"if",              new kwtable("if",           MrbTokens.keyword_if,          MrbTokens.modifier_if,         mrb_lex_state_enum.EXPR_VALUE) },
+			{"case",            new kwtable("case",         MrbTokens.keyword_case,        MrbTokens.keyword_case,        mrb_lex_state_enum.EXPR_VALUE) },
+			{"redo",            new kwtable("redo",         MrbTokens.keyword_redo,        MrbTokens.keyword_redo,        mrb_lex_state_enum.EXPR_END) },
+			{"next",            new kwtable("next",         MrbTokens.keyword_next,        MrbTokens.keyword_next,        mrb_lex_state_enum.EXPR_MID) },
+			{"super",           new kwtable("super",        MrbTokens.keyword_super,       MrbTokens.keyword_super,       mrb_lex_state_enum.EXPR_ARG) },
+			{"module",          new kwtable("module",       MrbTokens.keyword_module,      MrbTokens.keyword_module,      mrb_lex_state_enum.EXPR_VALUE) },
+			{"begin",           new kwtable("begin",        MrbTokens.keyword_begin,       MrbTokens.keyword_begin,       mrb_lex_state_enum.EXPR_BEG) },
+			{"__LINE__",        new kwtable("__LINE__",     MrbTokens.keyword__LINE__,     MrbTokens.keyword__LINE__,     mrb_lex_state_enum.EXPR_END) },
+			{"__FILE__",        new kwtable("__FILE__",     MrbTokens.keyword__FILE__,     MrbTokens.keyword__FILE__,     mrb_lex_state_enum.EXPR_END) },
+			{"__ENCODING__",    new kwtable("__ENCODING__", MrbTokens.keyword__ENCODING__, MrbTokens.keyword__ENCODING__, mrb_lex_state_enum.EXPR_END) },
+			{"END",             new kwtable("END",          MrbTokens.keyword_END,         MrbTokens.keyword_END,         mrb_lex_state_enum.EXPR_END) },
+			{"alias",           new kwtable("alias",        MrbTokens.keyword_alias,       MrbTokens.keyword_alias,       mrb_lex_state_enum.EXPR_FNAME) },
+			{"BEGIN",           new kwtable("BEGIN",        MrbTokens.keyword_BEGIN,       MrbTokens.keyword_BEGIN,       mrb_lex_state_enum.EXPR_END) },
+			{"class",           new kwtable("class",        MrbTokens.keyword_class,       MrbTokens.keyword_class,       mrb_lex_state_enum.EXPR_CLASS) },
+			{"while",           new kwtable("while",        MrbTokens.keyword_while,       MrbTokens.modifier_while,      mrb_lex_state_enum.EXPR_VALUE) },
+		};
+
+		kwtable mrb_reserved_word(Uint8Array str, int len)
+		{
+			var key = MrbParser.UTF8ArrayToString(str.SubArray(0, len + 1), 0);
+			kwtable result;
+
+			if (wordlist.TryGetValue(key, out result)) {
+				return result;
+			}
+
+			return null;
+		}
+
+		MrbTokens parser_yylex()
+		{
+			int c;
+			bool space_seen = false;
+			bool cmd_state;
+			mrb_lex_state_enum last_state;
+			int token_column = 0;
+
+			if (this.lex_strterm != null) {
+				if (is_strterm_type(mrb_string_type.STR_FUNC_HEREDOC)) {
+					if (this.parsing_heredoc != null)
+						return parse_string();
+				}
+				else
+					return parse_string();
+			}
+			cmd_state = this.cmd_start;
+			this.cmd_start = false;
+			for (;;) {
+				last_state = this.lstate;
+				switch (c = nextc()) {
+				/* white spaces */
+				case ' ':
+				case '\t':
+				case '\f':
+				case '\r':
+				case '\v':
+					space_seen = true;
+					continue;
+
+				case '\x04':  /* ^D */
+				case '\x1a':  /* ^Z */
+				case '\0':    /* NUL */
+				case -1:      /* end of script. */
+				case '#':     /* it's a comment */
+				case -2:      /* end of a file */
+				case '\n':
+					if (c == '#') {
+						skip('\n');
+					}
+					else if ((c != -2) && (c != '\n')) {
+						if (this.heredocs_from_nextline == null)
+							return 0;
+					}
+					heredoc_treat_nextline();
+					switch (this.lstate) {
+					case mrb_lex_state_enum.EXPR_BEG:
+					case mrb_lex_state_enum.EXPR_FNAME:
+					case mrb_lex_state_enum.EXPR_DOT:
+					case mrb_lex_state_enum.EXPR_CLASS:
+					case mrb_lex_state_enum.EXPR_VALUE:
+						this.lineno++;
+						this.column = 0;
+						if (this.parsing_heredoc != null) {
+							if (this.lex_strterm != null) {
+								return parse_string();
+							}
+						}
+						continue;
+					default:
+						break;
+					}
+					if (this.parsing_heredoc != null) {
+						return (MrbTokens)'\n';
+					}
+					bool retry = false;
+					while ((c = nextc()) != 0) {
+						switch (c) {
+						case ' ':
+						case '\t':
+						case '\f':
+						case '\r':
+						case '\v':
+							space_seen = true;
+							continue;
+						case '.':
+							if ((c = nextc()) != '.') {
+								pushback(c);
+								pushback('.');
+								retry = true;
+							}
+							break;
+						case -1:                  /* EOF */
+						case -2:                  /* end of a file */
+							break;
+						default:
+							pushback(c);
+							break;
+						}
+						break;
+					}
+					if (retry)
+						continue;
+					this.cmd_start = true;
+					this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					return (MrbTokens)'\n';
+
+				case '*':
+					if ((c = nextc()) == '*') {
+						if ((c = nextc()) == '=') {
+							yylval.id = intern("**", 2);
+							this.lstate = mrb_lex_state_enum.EXPR_BEG;
+							return MrbTokens.tOP_ASGN;
+						}
+						pushback(c);
+						c = (int)MrbTokens.tPOW;
+					}
+					else {
+						if (c == '=') {
+							yylval.id = intern_c('*');
+							this.lstate = mrb_lex_state_enum.EXPR_BEG;
+							return MrbTokens.tOP_ASGN;
+						}
+						pushback(c);
+						if (IS_SPCARG(c, space_seen)) {
+							yyWarning("'*' interpreted as argument prefix");
+							c = (int)MrbTokens.tSTAR;
+						}
+						else if (IS_BEG()) {
+							c = (int)MrbTokens.tSTAR;
+						}
+						else {
+							c = '*';
+						}
+					}
+					if (this.lstate == mrb_lex_state_enum.EXPR_FNAME || this.lstate == mrb_lex_state_enum.EXPR_DOT) {
+						this.lstate = mrb_lex_state_enum.EXPR_ARG;
+					}
+					else {
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					}
+					return (MrbTokens)c;
+
+				case '!':
+					c = nextc();
+					if (this.lstate == mrb_lex_state_enum.EXPR_FNAME || this.lstate == mrb_lex_state_enum.EXPR_DOT) {
+						this.lstate = mrb_lex_state_enum.EXPR_ARG;
+						if (c == '@') {
+							return (MrbTokens)'!';
+						}
+					}
+					else {
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					}
+					if (c == '=') {
+						return MrbTokens.tNEQ;
+					}
+					if (c == '~') {
+						return MrbTokens.tNMATCH;
+					}
+					pushback(c);
+					return (MrbTokens)'!';
+
+				case '=':
+					if (this.column == 1) {
+						if (peeks(begin, 0)) {
+							c = peekc_n(begin.Length - 1);
+							if (c < 0 || ISSPACE(c)) {
+								do {
+									if (!skips(end, 0)) {
+										yyError("embedded document meets end of file");
+										return 0;
+									}
+									c = nextc();
+								} while (!(c < 0 || ISSPACE(c)));
+								if (c != '\n') skip('\n');
+								this.lineno++;
+								this.column = 0;
+								continue;
+							}
+						}
+					}
+					if (this.lstate == mrb_lex_state_enum.EXPR_FNAME || this.lstate == mrb_lex_state_enum.EXPR_DOT) {
+						this.lstate = mrb_lex_state_enum.EXPR_ARG;
+					}
+					else {
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					}
+					if ((c = nextc()) == '=') {
+						if ((c = nextc()) == '=') {
+							return MrbTokens.tEQQ;
+						}
+						pushback(c);
+						return MrbTokens.tEQ;
+					}
+					if (c == '~') {
+						return MrbTokens.tMATCH;
+					}
+					else if (c == '>') {
+						return MrbTokens.tASSOC;
+					}
+					pushback(c);
+					return (MrbTokens)'=';
+
+				case '<':
+					c = nextc();
+					if (c == '<' &&
+						this.lstate != mrb_lex_state_enum.EXPR_DOT &&
+						this.lstate != mrb_lex_state_enum.EXPR_CLASS &&
+						!IS_END() &&
+						(!IS_ARG() || space_seen)) {
+						MrbTokens token = heredoc_identifier();
+						if (token != 0)
+							return token;
+					}
+					if (this.lstate == mrb_lex_state_enum.EXPR_FNAME || this.lstate == mrb_lex_state_enum.EXPR_DOT) {
+						this.lstate = mrb_lex_state_enum.EXPR_ARG;
+					}
+					else {
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+						if (this.lstate == mrb_lex_state_enum.EXPR_CLASS) {
+							this.cmd_start = true;
+						}
+					}
+					if (c == '=') {
+						if ((c = nextc()) == '>') {
+							return MrbTokens.tCMP;
+						}
+						pushback(c);
+						return MrbTokens.tLEQ;
+					}
+					if (c == '<') {
+						if ((c = nextc()) == '=') {
+							yylval.id = intern("<<", 2);
+							this.lstate = mrb_lex_state_enum.EXPR_BEG;
+							return MrbTokens.tOP_ASGN;
+						}
+						pushback(c);
+						return MrbTokens.tLSHFT;
+					}
+					pushback(c);
+					return (MrbTokens)'<';
+
+				case '>':
+					if (this.lstate == mrb_lex_state_enum.EXPR_FNAME || this.lstate == mrb_lex_state_enum.EXPR_DOT) {
+						this.lstate = mrb_lex_state_enum.EXPR_ARG;
+					}
+					else {
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					}
+					if ((c = nextc()) == '=') {
+						return MrbTokens.tGEQ;
+					}
+					if (c == '>') {
+						if ((c = nextc()) == '=') {
+							yylval.id = intern(">>", 2);
+							this.lstate = mrb_lex_state_enum.EXPR_BEG;
+							return MrbTokens.tOP_ASGN;
+						}
+						pushback(c);
+						return MrbTokens.tRSHFT;
+					}
+					pushback(c);
+					return (MrbTokens)'>';
+
+				case '"':
+					this.lex_strterm = new_strterm(mrb_string_type.str_dquote, '"', 0);
+					return MrbTokens.tSTRING_BEG;
+
+				case '\'':
+					this.lex_strterm = new_strterm(mrb_string_type.str_squote, '\'', 0);
+					return parse_string();
+
+				case '`':
+					if (this.lstate == mrb_lex_state_enum.EXPR_FNAME) {
+						this.lstate = mrb_lex_state_enum.EXPR_ENDFN;
+						return (MrbTokens)'`';
+					}
+					if (this.lstate == mrb_lex_state_enum.EXPR_DOT) {
+						if (cmd_state)
+							this.lstate = mrb_lex_state_enum.EXPR_CMDARG;
+						else
+							this.lstate = mrb_lex_state_enum.EXPR_ARG;
+						return (MrbTokens)'`';
+					}
+					this.lex_strterm = new_strterm(mrb_string_type.str_xquote, '`', 0);
+					return MrbTokens.tXSTRING_BEG;
+
+				case '?':
+					if (IS_END()) {
+						this.lstate = mrb_lex_state_enum.EXPR_VALUE;
+						return (MrbTokens)'?';
+					}
+					c = nextc();
+					if (c < 0) {
+						yyError("incomplete character syntax");
+						return 0;
+					}
+					if (ISSPACE(c)) {
+						if (!IS_ARG()) {
+							int c2;
+							switch (c) {
+							case ' ':
+								c2 = 's';
+								break;
+							case '\n':
+								c2 = 'n';
+								break;
+							case '\t':
+								c2 = 't';
+								break;
+							case '\v':
+								c2 = 'v';
+								break;
+							case '\r':
+								c2 = 'r';
+								break;
+							case '\f':
+								c2 = 'f';
+								break;
+							default:
+								c2 = 0;
+								break;
+							}
+							if (c2 != 0) {
+								yyError(String.Format("invalid character syntax; use ?\\{0}", c2));
+							}
+						}
+
+						pushback(c);
+						this.lstate = mrb_lex_state_enum.EXPR_VALUE;
+						return (MrbTokens)'?';
+					}
+					newtok();
+					/* need support UTF-8 if configured */
+					if ((isalnum(c) || c == '_')) {
+						int c2 = nextc();
+						pushback(c2);
+						if ((isalnum(c2) || c2 == '_')) {
+							pushback(c);
+							this.lstate = mrb_lex_state_enum.EXPR_VALUE;
+							return (MrbTokens)'?';
+						}
+					}
+					if (c == '\\') {
+						c = read_escape();
+						tokadd(c);
+					}
+					else {
+						tokadd(c);
+					}
+					tokfix();
+					yylval.nd = new_str(tok(), toklen());
+					this.lstate = mrb_lex_state_enum.EXPR_END;
+					return MrbTokens.tCHAR;
+
+				case '&':
+					if ((c = nextc()) == '&') {
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+						if ((c = nextc()) == '=') {
+							yylval.id = intern("&&", 2);
+							this.lstate = mrb_lex_state_enum.EXPR_BEG;
+							return MrbTokens.tOP_ASGN;
+						}
+						pushback(c);
+						return MrbTokens.tANDOP;
+					}
+					else if (c == '.') {
+						this.lstate = mrb_lex_state_enum.EXPR_DOT;
+						return MrbTokens.tANDDOT;
+					}
+					else if (c == '=') {
+						yylval.id = intern_c('&');
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+						return MrbTokens.tOP_ASGN;
+					}
+					pushback(c);
+					if (IS_SPCARG(c, space_seen)) {
+						yyWarning("'&' interpreted as argument prefix");
+						c = (int)MrbTokens.tAMPER;
+					}
+					else if (IS_BEG()) {
+						c = (int)MrbTokens.tAMPER;
+					}
+					else {
+						c = '&';
+					}
+					if (this.lstate == mrb_lex_state_enum.EXPR_FNAME || this.lstate == mrb_lex_state_enum.EXPR_DOT) {
+						this.lstate = mrb_lex_state_enum.EXPR_ARG;
+					}
+					else {
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					}
+					return (MrbTokens)c;
+
+				case '|':
+					if ((c = nextc()) == '|') {
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+						if ((c = nextc()) == '=') {
+							yylval.id = intern("||", 2);
+							this.lstate = mrb_lex_state_enum.EXPR_BEG;
+							return MrbTokens.tOP_ASGN;
+						}
+						pushback(c);
+						return MrbTokens.tOROP;
+					}
+					if (c == '=') {
+						yylval.id = intern_c('|');
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+						return MrbTokens.tOP_ASGN;
+					}
+					if (this.lstate == mrb_lex_state_enum.EXPR_FNAME || this.lstate == mrb_lex_state_enum.EXPR_DOT) {
+						this.lstate = mrb_lex_state_enum.EXPR_ARG;
+					}
+					else {
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					}
+					pushback(c);
+					return (MrbTokens)'|';
+
+				case '+':
+					c = nextc();
+					if (this.lstate == mrb_lex_state_enum.EXPR_FNAME || this.lstate == mrb_lex_state_enum.EXPR_DOT) {
+						this.lstate = mrb_lex_state_enum.EXPR_ARG;
+						if (c == '@') {
+							return MrbTokens.tUPLUS;
+						}
+						pushback(c);
+						return (MrbTokens)'+';
+					}
+					if (c == '=') {
+						yylval.id = intern_c('+');
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+						return MrbTokens.tOP_ASGN;
+					}
+					if (IS_BEG() || (IS_SPCARG(c, space_seen) && arg_ambiguous())) {
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+						pushback(c);
+						if (c >= 0 && ISDIGIT(c)) {
+							c = '+';
+							return start_num(c);
+						}
+						return MrbTokens.tUPLUS;
+					}
+					this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					pushback(c);
+					return (MrbTokens)'+';
+
+				case '-':
+					c = nextc();
+					if (this.lstate == mrb_lex_state_enum.EXPR_FNAME || this.lstate == mrb_lex_state_enum.EXPR_DOT) {
+						this.lstate = mrb_lex_state_enum.EXPR_ARG;
+						if (c == '@') {
+							return MrbTokens.tUMINUS;
+						}
+						pushback(c);
+						return (MrbTokens)'-';
+					}
+					if (c == '=') {
+						yylval.id = intern_c('-');
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+						return MrbTokens.tOP_ASGN;
+					}
+					if (c == '>') {
+						this.lstate = mrb_lex_state_enum.EXPR_ENDFN;
+						return MrbTokens.tLAMBDA;
+					}
+					if (IS_BEG() || (IS_SPCARG(c, space_seen) && arg_ambiguous())) {
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+						pushback(c);
+						if (c >= 0 && ISDIGIT(c)) {
+							return MrbTokens.tUMINUS_NUM;
+						}
+						return MrbTokens.tUMINUS;
+					}
+					this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					pushback(c);
+					return (MrbTokens)'-';
+
+				case '.':
+					this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					if ((c = nextc()) == '.') {
+						if ((c = nextc()) == '.') {
+							return MrbTokens.tDOT3;
+						}
+						pushback(c);
+						return MrbTokens.tDOT2;
+					}
+					pushback(c);
+					if (c >= 0 && ISDIGIT(c)) {
+						yyError("no .<digit> floating literal anymore; put 0 before dot");
+					}
+					this.lstate = mrb_lex_state_enum.EXPR_DOT;
+					return (MrbTokens)'.';
+
+				case '0':
+				case '1':
+				case '2':
+				case '3':
+				case '4':
+				case '5':
+				case '6':
+				case '7':
+				case '8':
+				case '9':
+					return start_num(c);
+
+				case ')':
+				case ']':
+				case '}':
+					if (c != '}') {
+						this.paren_nest--;
+					}
+					COND_LEXPOP();
+					CMDARG_LEXPOP();
+					if (c == ')')
+						this.lstate = mrb_lex_state_enum.EXPR_ENDFN;
+					else
+						this.lstate = mrb_lex_state_enum.EXPR_ENDARG;
+					return (MrbTokens)c;
+
+				case ':':
+					c = nextc();
+					if (c == ':') {
+						if (IS_BEG() || this.lstate == mrb_lex_state_enum.EXPR_CLASS || IS_SPCARG(-1, space_seen)) {
+							this.lstate = mrb_lex_state_enum.EXPR_BEG;
+							return MrbTokens.tCOLON3;
+						}
+						this.lstate = mrb_lex_state_enum.EXPR_DOT;
+						return MrbTokens.tCOLON2;
+					}
+					if (IS_END() || ISSPACE(c)) {
+						pushback(c);
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+						return (MrbTokens)':';
+					}
+					pushback(c);
+					this.lstate = mrb_lex_state_enum.EXPR_FNAME;
+					return MrbTokens.tSYMBEG;
+
+				case '/':
+					if (IS_BEG()) {
+						this.lex_strterm = new_strterm(mrb_string_type.str_regexp, '/', 0);
+						return MrbTokens.tREGEXP_BEG;
+					}
+					if ((c = nextc()) == '=') {
+						yylval.id = intern_c('/');
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+						return MrbTokens.tOP_ASGN;
+					}
+					pushback(c);
+					if (IS_SPCARG(c, space_seen)) {
+						this.lex_strterm = new_strterm(mrb_string_type.str_regexp, '/', 0);
+						return MrbTokens.tREGEXP_BEG;
+					}
+					if (this.lstate == mrb_lex_state_enum.EXPR_FNAME || this.lstate == mrb_lex_state_enum.EXPR_DOT) {
+						this.lstate = mrb_lex_state_enum.EXPR_ARG;
+					}
+					else {
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					}
+					return (MrbTokens)'/';
+
+				case '^':
+					if ((c = nextc()) == '=') {
+						yylval.id = intern_c('^');
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+						return MrbTokens.tOP_ASGN;
+					}
+					if (this.lstate == mrb_lex_state_enum.EXPR_FNAME || this.lstate == mrb_lex_state_enum.EXPR_DOT) {
+						this.lstate = mrb_lex_state_enum.EXPR_ARG;
+					}
+					else {
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					}
+					pushback(c);
+					return (MrbTokens)'^';
+
+				case ';':
+					this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					return (MrbTokens)';';
+
+				case ',':
+					this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					return (MrbTokens)',';
+
+				case '~':
+					if (this.lstate == mrb_lex_state_enum.EXPR_FNAME || this.lstate == mrb_lex_state_enum.EXPR_DOT) {
+						if ((c = nextc()) != '@') {
+							pushback(c);
+						}
+						this.lstate = mrb_lex_state_enum.EXPR_ARG;
+					}
+					else {
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					}
+					return (MrbTokens)'~';
+
+				case '(':
+					if (IS_BEG()) {
+						c = (int)MrbTokens.tLPAREN;
+					}
+					else if (IS_SPCARG(-1, space_seen)) {
+						c = (int)MrbTokens.tLPAREN_ARG;
+					}
+					this.paren_nest++;
+					COND_PUSH(0);
+					CMDARG_PUSH(0);
+					this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					return (MrbTokens)c;
+
+				case '[':
+					this.paren_nest++;
+					if (this.lstate == mrb_lex_state_enum.EXPR_FNAME || this.lstate == mrb_lex_state_enum.EXPR_DOT) {
+						this.lstate = mrb_lex_state_enum.EXPR_ARG;
+						if ((c = nextc()) == ']') {
+							if ((c = nextc()) == '=') {
+								return MrbTokens.tASET;
+							}
+							pushback(c);
+							return MrbTokens.tAREF;
+						}
+						pushback(c);
+						return (MrbTokens)'[';
+					}
+					else if (IS_BEG()) {
+						c = (int)MrbTokens.tLBRACK;
+					}
+					else if (IS_ARG() && space_seen) {
+						c = (int)MrbTokens.tLBRACK;
+					}
+					this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					COND_PUSH(0);
+					CMDARG_PUSH(0);
+					return (MrbTokens)c;
+
+				case '{':
+					if (this.lpar_beg != 0 && this.lpar_beg == this.paren_nest) {
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+						this.lpar_beg = 0;
+						this.paren_nest--;
+						COND_PUSH(0);
+						CMDARG_PUSH(0);
+						return MrbTokens.tLAMBEG;
+					}
+					if (IS_ARG() || this.lstate == mrb_lex_state_enum.EXPR_END || this.lstate == mrb_lex_state_enum.EXPR_ENDFN)
+						c = '{';          /* block (primary) */
+					else if (this.lstate == mrb_lex_state_enum.EXPR_ENDARG)
+						c = (int)MrbTokens.tLBRACE_ARG;  /* block (expr) */
+					else
+						c = (int)MrbTokens.tLBRACE;      /* hash */
+					COND_PUSH(0);
+					CMDARG_PUSH(0);
+					this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					return (MrbTokens)c;
+
+				case '\\':
+					c = nextc();
+					if (c == '\n') {
+						this.lineno++;
+						this.column = 0;
+						space_seen = true;
+						continue; /* skip \\n */
+					}
+					pushback(c);
+					return (MrbTokens)'\\';
+
+				case '%':
+					if (IS_BEG()) {
+						c = nextc();
+						return quotation(c);
+					}
+					for (;;) {
+						if ((c = nextc()) == '=') {
+							yylval.id = intern_c('%');
+							this.lstate = mrb_lex_state_enum.EXPR_BEG;
+							return MrbTokens.tOP_ASGN;
+						}
+						if (IS_SPCARG(c, space_seen)) {
+							return quotation(c);
+						}
+						break;
+					}
+					if (this.lstate == mrb_lex_state_enum.EXPR_FNAME || this.lstate == mrb_lex_state_enum.EXPR_DOT) {
+						this.lstate = mrb_lex_state_enum.EXPR_ARG;
+					}
+					else {
+						this.lstate = mrb_lex_state_enum.EXPR_BEG;
+					}
+					pushback(c);
+					return (MrbTokens)'%';
+
+				case '$':
+					this.lstate = mrb_lex_state_enum.EXPR_END;
+					token_column = newtok();
+					c = nextc();
+					if (c < 0) {
+						yyError("incomplete global variable syntax");
+						return 0;
+					}
+					switch (c) {
+					case '_':     /* $_: last read line string */
+					case '~':     /* $~: match-data */
+					case '*':     /* $*: argv */
+					case '$':     /* $$: pid */
+					case '?':     /* $?: last status */
+					case '!':     /* $!: error string */
+					case '@':     /* $@: error position */
+					case '/':     /* $/: input record separator */
+					case '\\':    /* $\: output record separator */
+					case ';':     /* $;: field separator */
+					case ',':     /* $,: output field separator */
+					case '.':     /* $.: last read line number */
+					case '=':     /* $=: ignorecase */
+					case ':':     /* $:: load path */
+					case '<':     /* $<: reading filename */
+					case '>':     /* $>: default output handle */
+					case '\"':    /* $": already loaded files */
+						if (c == '_') {
+							c = nextc();
+							if (c >= 0 && identchar(c)) { /* if there is more after _ it is a variable */
+								tokadd('$');
+								tokadd(c);
+								break;
+							}
+							pushback(c);
+							c = '_';
+						}
+						tokadd('$');
+						tokadd(c);
+						tokfix();
+						yylval.id = intern_cstr(tok());
+						return MrbTokens.tGVAR;
+
+					case '-':
+						tokadd('$');
+						tokadd(c);
+						c = nextc();
+						pushback(c);
+						tokfix();
+						yylval.id = intern_cstr(tok());
+						return MrbTokens.tGVAR;
+
+					case '&':     /* $&: last match */
+					case '`':     /* $`: string before last match */
+					case '\'':    /* $': string after last match */
+					case '+':     /* $+: string matches last pattern */
+						if (last_state == mrb_lex_state_enum.EXPR_FNAME) {
+							tokadd('$');
+							tokadd(c);
+							tokfix();
+							yylval.id = intern_cstr(tok());
+							return MrbTokens.tGVAR;
+						}
+						yylval.nd = new_back_ref(c);
+						return MrbTokens.tBACK_REF;
+
+					case '1':
+					case '2':
+					case '3':
+					case '4':
+					case '5':
+					case '6':
+					case '7':
+					case '8':
+					case '9':
+						do {
+							tokadd(c);
+							c = nextc();
+						} while (c >= 0 && isdigit(c));
+						pushback(c);
+						if (last_state == mrb_lex_state_enum.EXPR_FNAME) {
+							tokfix();
+							yylval.id = intern_cstr(tok());
+							return MrbTokens.tGVAR;
+						}
+						tokfix(); {
+							Uint8Array t;
+							ulong n = strtoul(tok(), 0, out t, 10);
+							if (n > int.MaxValue) {
+								yyError("capture group index must be <= {0}", int.MaxValue.ToString());
+								return 0;
+							}
+							yylval.nd = new_nth_ref((int)n);
+						}
+						return MrbTokens.tNTH_REF;
+
+					default:
+						if (!identchar(c)) {
+							pushback(c);
+							return (MrbTokens)'$';
+						}
+						tokadd('$');
+						break;
+
+					case '0':
+						tokadd('$');
+						break;
+					}
+					break;
+
+				case '@':
+					c = nextc();
+					token_column = newtok();
+					tokadd('@');
+					if (c == '@') {
+						tokadd('@');
+						c = nextc();
+					}
+					if (c < 0) {
+						if (this.tidx == 1) {
+							yyError("incomplete instance variable syntax");
+						}
+						else {
+							yyError("incomplete class variable syntax");
+						}
+						return 0;
+					}
+					else if (isdigit(c)) {
+						if (this.tidx == 1) {
+							yyError("'@{0}' is not allowed as an instance variable name", ((char)c).ToString());
+						}
+						else {
+							yyError("'@@{0}' is not allowed as a class variable name", ((char)c).ToString());
+						}
+						return 0;
+					}
+					if (!identchar(c)) {
+						pushback(c);
+						return (MrbTokens)'@';
+					}
+					break;
+
+				case '_':
+					token_column = newtok();
+					break;
+
+				default:
+					if (!identchar(c)) {
+						yyError("Invalid char '\\x{0}' in expression", c.ToString("X2"));
+						continue;
+					}
+
+					token_column = newtok();
+					break;
+				}
+				break;
+			}
+
+			do {
+				tokadd(c);
+				c = nextc();
+				if (c < 0) break;
+			} while (identchar(c));
+			if (token_column == 0 && toklen() == 7 && (c < 0 || c == '\n') &&
+				strncmp(tok(), 0, MrbParser.UTF8StringToArray("__END__"), 0, toklen()) == 0)
+				return (MrbTokens)(-1);
+
+			switch ((char)tok()[0]) {
+			case '@':
+			case '$':
+				pushback(c);
+				break;
+			default:
+				if ((c == '!' || c == '?') && !peek('=')) {
+					tokadd(c);
+				}
+				else {
+					pushback(c);
+				}
+				break;
+			}
+			tokfix();
+			{
+				MrbTokens result = 0;
+
+				switch ((char)tok()[0]) {
+				case '$':
+					this.lstate = mrb_lex_state_enum.EXPR_END;
+					result = MrbTokens.tGVAR;
+					break;
+				case '@':
+					this.lstate = mrb_lex_state_enum.EXPR_END;
+					if (tok()[1] == '@')
+						result = MrbTokens.tCVAR;
+					else
+						result = MrbTokens.tIVAR;
+					break;
+
+				default:
+					if (toklast() == '!' || toklast() == '?') {
+						result = MrbTokens.tFID;
+					}
+					else {
+						if (this.lstate == mrb_lex_state_enum.EXPR_FNAME) {
+							if ((c = nextc()) == '=' && !peek('~') && !peek('>') &&
+								(!peek('=') || (peek_n('>', 1)))) {
+								result = MrbTokens.tIDENTIFIER;
+								tokadd(c);
+								tokfix();
+							}
+							else {
+								pushback(c);
+							}
+						}
+						if (result == 0 && ISUPPER(tok()[0])) {
+							result = MrbTokens.tCONSTANT;
+						}
+						else {
+							result = MrbTokens.tIDENTIFIER;
+						}
+					}
+
+					if (IS_LABEL_POSSIBLE(cmd_state)) {
+						if (IS_LABEL_SUFFIX(0)) {
+							this.lstate = mrb_lex_state_enum.EXPR_BEG;
+							nextc();
+							tokfix();
+							yylval.id = intern_cstr(tok());
+							return MrbTokens.tLABEL;
+						}
+					}
+					if (this.lstate != mrb_lex_state_enum.EXPR_DOT) {
+						kwtable kw;
+						/* See if it is a reserved word.  */
+						kw = mrb_reserved_word(tok(), toklen());
+						if (kw != null) {
+							mrb_lex_state_enum state = this.lstate;
+							yylval.num = this.lineno;
+							this.lstate = kw.state;
+							if (state == mrb_lex_state_enum.EXPR_FNAME) {
+								yylval.id = intern_cstr(kw.name);
+								return kw.id0;
+							}
+							if (this.lstate == mrb_lex_state_enum.EXPR_BEG) {
+								this.cmd_start = true;
+							}
+							if (kw.id0 == MrbTokens.keyword_do) {
+								if (this.lpar_beg != 0 && this.lpar_beg == this.paren_nest) {
+									this.lpar_beg = 0;
+									this.paren_nest--;
+									return MrbTokens.keyword_do_LAMBDA;
+								}
+								if (COND_P() != 0) return MrbTokens.keyword_do_cond;
+								if (CMDARG_P() != 0 && state != mrb_lex_state_enum.EXPR_CMDARG)
+									return MrbTokens.keyword_do_block;
+								if (state == mrb_lex_state_enum.EXPR_ENDARG || state == mrb_lex_state_enum.EXPR_BEG)
+									return MrbTokens.keyword_do_block;
+								return MrbTokens.keyword_do;
+							}
+							if (state == mrb_lex_state_enum.EXPR_BEG || state == mrb_lex_state_enum.EXPR_VALUE)
+								return kw.id0;
+							else {
+								if (kw.id0 != kw.id1)
+									this.lstate = mrb_lex_state_enum.EXPR_BEG;
+								return kw.id1;
+							}
+						}
+					}
+
+					if (IS_BEG() || this.lstate == mrb_lex_state_enum.EXPR_DOT || IS_ARG()) {
+						if (cmd_state) {
+							this.lstate = mrb_lex_state_enum.EXPR_CMDARG;
+						}
+						else {
+							this.lstate = mrb_lex_state_enum.EXPR_ARG;
+						}
+					}
+					else if (this.lstate == mrb_lex_state_enum.EXPR_FNAME) {
+						this.lstate = mrb_lex_state_enum.EXPR_ENDFN;
+					}
+					else {
+						this.lstate = mrb_lex_state_enum.EXPR_END;
+					}
+					break;
+				}
+				{
+					mrb_sym ident = intern_cstr(tok());
+
+					yylval.id = ident;
+#if false
+					if (last_state != mrb_lex_state_enum.EXPR_DOT && islower(tok()[0]) && lvar_defined(ident)) {
+						this.lstate = mrb_lex_state_enum.EXPR_END;
+					}
+#endif
+				}
+				return result;
+			}
+		}
+
+		private void mrb_parser_parse()
+		{
+			yylval = new MrbToken(filename);
+
+			try {
+				this.cmd_start = true;
+				this.in_def = this.in_single = 0;
+				this.lex_strterm = null;
+				this.tokbuf = this.buf;
+				this.tsiz = MRB_PARSER_TOKBUF_SIZE;
+
+				yyParse(this, null);
+			}
+			catch (Exception) {
+				yyError("memory allocation error");
+				this.tree = null;
+			}
+		}
+
+		public void mrb_parser_set_filename(string f)
+		{
+			int i;
+
+			this.lineno = (this.filename_table_length > 0) ? 0 : 1;
+
+			for (i = 0; i < this.filename_table_length; ++i) {
+				if (this.filename_table[i] == f) {
+					this.current_filename_index = i;
+					return;
+				}
+			}
+
+			this.current_filename_index = this.filename_table_length + 1;
+			this.filename_table.Push(f);
+		}
+
+		public void mrb_parse_nstring(string filename, Uint8Array s)
+		{
+			mrb_parser_set_filename(filename);
+			this.s = s;
+			this.sp = 0;
+
+			mrb_parser_parse();
+		}
+
+		public static node parse(string text, string filename = "temporary.rb")
+		{
+			var generator = new MrbParser();
+			generator.mrb_parse_nstring(filename, UTF8StringToArray(text));
+			var scope = generator.tree as scope_node;
+			if (scope == null)
+				return null;
+			return scope.body;
+		}
+
+		public static node evaluate(node tree)
+		{
+			var p = tree.p;
+
+			var node = tree as IEvaluatable;
+			if (node != null)
+				return tree;
+
+			var begin = tree as begin_node;
+			if (begin != null) {
+				node[] progs = new node[0];
+				foreach (var r in begin.progs) {
+					progs.Push(evaluate(r));
+				}
+				if (progs.Length != 1)
+					return new begin_node(p, progs);
+				return progs[0];
+			}
+
+			var negate = tree as negate_node;
+			if (negate != null) {
+				var n = evaluate(negate.n);
+				if (n is int_node) {
+					var a = ((int_node)n).to_i();
+					var c = UTF8StringToArray((-a).ToString());
+					return new int_node(p, c, 10);
+				}
+				if (n is float_node) {
+					var a = ((float_node)n).to_f();
+					var c = UTF8StringToArray((-a).ToString());
+					return new float_node(p, c);
+				}
+				return n;
+			}
+
+			var dot2 = tree as dot2_node;
+			if (dot2 != null) {
+				var a = evaluate(dot2.a);
+				var b = evaluate(dot2.b);
+				return new dot2_node(p, a, b);
+			}
+
+			var dot3 = tree as dot3_node;
+			if (dot3 != null) {
+				var a = evaluate(dot3.a);
+				var b = evaluate(dot3.b);
+				return new dot3_node(p, a, b);
+			}
+
+			var call = tree as call_node;
+			if (call != null) {
+				var obj = evaluate(call.obj);
+				var args = new node[0];
+				foreach (var a in call.args) {
+					args.Push(evaluate(a));
+				}
+
+				var eva = obj as IEvaluatable;
+				if (eva != null) {
+					node ret;
+					if ((ret = eva.evaluate(p.sym2name(call.method), args)) != null)
+						return ret;
+				}
+				return new call_node(p, obj, call.method, args, call.block);
+			}
+
+			return tree;
+		}
+
+		public string to_ruby()
+		{
+			if (tree != null) {
+				var cond = new ruby_code_cond(filename);
+				tree.to_ruby(cond);
+				return cond.ToString();
+			}
+			if (s != null)
+				return UTF8ArrayToString(s, 0);
+			else
+				return "";
+		}
+		int MrbParser.yyInput.Token { get { return (int)yylval.Kind; } }
+
+		object MrbParser.yyInput.Value { get { return yylval.Value; } }
+
+		bool MrbParser.yyInput.Advance()
+		{
+			var token = parser_yylex();
+			yylval.SetToken(token, MrbParser.UTF8ArrayToString(tok().SubArray(0, toklen() + 1), 0));
+
+			return token > 0;
+		}
+
+		void yyConsoleOut.yyWarning(string message, object[] expected)
+		{
+			App.WriteLine($"{filename}({lineno},{column}): warning {String.Format(message, expected)}");
+		}
+
+		void yyConsoleOut.yyError(string message, object[] expected)
+		{
+			App.WriteLine($"{filename}({lineno},{column}): error {String.Format(message, expected)}");
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Mruby.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Mruby.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Mruby.cs	(revision 270)
@@ -0,0 +1,181 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using Bridge;
+using Bridge.Html5;
+using Bridge.Text.RegularExpressions;
+
+namespace WebMrbc
+{
+	public class Mruby
+	{
+		public object[] preRun = new object[0];
+		public object[] postRun = new object[0];
+
+		public Mruby()
+		{
+			/*canvas = Document.GetElementById("canvas");
+
+			// As a default initial behavior, pop up an alert when webgl context is lost. To make your
+			// application robust, you may want to override this behavior before shipping!
+			// See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2
+			canvas.AddEventListener("webglcontextlost", new Action<Event>((Event e) => {
+				Window.Alert("WebGL context lost. You will need to reload the page."); e.PreventDefault();
+			}), false);*/
+			setStatus = new Action<string>(_setStatus);
+		}
+
+		public void print(object arg)
+		{
+			string text;
+			Array args;
+			if (arg.GetType() == typeof(string))
+				text = (string)arg;
+			else if (arg.GetType().Is<Array>() && (args = (Array)arg).Length > 1) {
+				var texts = new string[0];
+				foreach (var ele in args) {
+					texts.Push(ele.ToString());
+				}
+				text = texts.Join(" ");
+			}
+			else
+				text = arg.ToString();
+
+			App.WriteLine(text);
+		}
+
+		public void printErr(object arg)
+		{
+			string text;
+			Array args;
+			if (arg.GetType() == typeof(string))
+				text = (string)arg;
+			else if (arg.GetType().Is<Array>() && (args = (Array)arg).Length > 1) {
+				var texts = new string[0];
+				foreach (var ele in args) {
+					texts.Push(ele.ToString());
+				}
+				text = texts.Join(" ");
+			}
+			else
+				text = arg.ToString();
+
+			App.WriteLine(text);
+		}
+
+		internal void run(string[] args)
+		{
+			App.Write("$ " + args.Join(" ") + "\r\n");
+
+			var exe = (string)args.Shift();
+			this["arguments"] = args;
+
+			var onerror = Window.OnError;
+			Window.OnError = new ErrorEventHandler((string message, string url, int lineNumber, int columnNumber, object error) => {
+				var spinnerElement = Document.GetElementById("spinner");
+				// TODO: do not warn on ok events like simulating an infinite loop or exitStatus
+				setStatus("Exception thrown, see JavaScript console");
+				spinnerElement.Style.Display = Display.None;
+				setStatus = new Action<string>((text) => {
+					if (!string.IsNullOrEmpty(text))
+						printErr(new[] { "[post-exception status] " + text });
+				});
+				onerror(message, url, lineNumber, columnNumber, error);
+				return false;
+			});
+			try {
+				Script.Eval(exe + "(this)");
+			}
+			finally {
+				Window.OnError = onerror;
+			}
+		}
+
+		public HTMLElement canvas;
+		public Action<string> setStatus;
+
+		object _last;
+		string _text;
+
+		private void _setStatus(string text)
+		{
+			if (_last == null) _last = new { time = DateTime.Now.Ticks, text = "" };
+			if (text == _text) return;
+			_text = text;
+			var progressElement = (HTMLProgressElement)Document.GetElementById("progress");
+			var spinnerElement = (HTMLDivElement)Document.GetElementById("spinner");
+			var m = text.Match(new Regex(@"([^(]+)\((\d+(\.\d+)?)\/(\d+)\)"));
+			var now = DateTime.Now.Ticks;
+			if (m != null && now - DateTime.Now.Ticks < 30) return; // if this is a progress update, skip it if too soon
+			if (m != null) {
+				text = m[1];
+				progressElement.Value = Script.ParseInt(m[2]) * 100;
+				progressElement.Max = Script.ParseInt(m[4]) * 100;
+				progressElement.SetAttribute("hidden", "false");
+				spinnerElement.SetAttribute("hidden", "false");
+			}
+			else {
+				progressElement.Value = 0.0;
+				progressElement.Max = 0.0;
+				progressElement.SetAttribute("hidden", "true");
+				if (!string.IsNullOrEmpty(text))
+					spinnerElement.Style.Display = Display.None;
+			}
+			var statusElement = (HTMLDivElement)Document.GetElementById("status");
+			statusElement.InnerHTML = text;
+		}
+
+		public int totalDependencies = 0;
+
+		public void monitorRunDependencies(int left)
+		{
+			totalDependencies = System.Math.Max(totalDependencies, left);
+			setStatus((left != 0) ? "Preparing... (" + (totalDependencies - left) + "/" + totalDependencies + ")" : "All downloads complete.");
+		}
+
+		[External, Name(false)]
+		internal string UTF8ArrayToString(Uint8Array buf, int index)
+		{
+			throw new NotImplementedException();
+		}
+
+		[External]
+		internal string intArrayToString(Uint8Array buf)
+		{
+			throw new NotImplementedException();
+		}
+
+		[External]
+		internal int stringToUTF8Array(string str, Uint8Array outU8Array, int outIdx, int maxBytesToWrite)
+		{
+			throw new NotImplementedException();
+		}
+
+		[External]
+		internal int lengthBytesUTF8(string str)
+		{
+			throw new NotImplementedException();
+		}
+
+		[Name(false)]
+		internal Uint8Array UTF8StringToArray(string str)
+		{
+			var len = lengthBytesUTF8(str);
+			var result = new Uint8Array(len);
+			stringToUTF8Array(str, result, 0, len);
+			return result;
+		}
+
+		[Script("return this.FS;")]
+		internal FileSystem GetFileSystem()
+		{
+			return (FileSystem)this["FS"];
+		}
+
+		[External]
+		internal void stdin(object data)
+		{
+			throw new NotImplementedException();
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Names.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Names.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Names.cs	(revision 270)
@@ -0,0 +1,160 @@
+/**
+* @license
+* Visual Blocks Editor
+*
+* Copyright 2012 Google Inc.
+* https://developers.google.com/blockly/
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*//**
+* @fileoverview Utility functions for handling variables and procedure names.
+* @author fraser@google.com (Neil Fraser)
+*/
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+using Bridge;
+using Bridge.Text.RegularExpressions;
+
+namespace WebMrbc
+{
+	[ComVisible(true)]
+	public class Names
+	{
+		string variablePrefix_;
+		Dictionary<string, bool> reservedDict_;
+		Dictionary<string, string> db_;
+		Dictionary<string, bool> dbReverse_;
+
+		/// <summary>
+		/// Class for a database of entity names (variables, functions, etc).
+		/// </summary>
+		/// <param name="reservedWords">A comma-separated string of words that are
+		/// illegal for use as names in a language (e.g. 'new,if,this,...').</param>
+		/// <param name="opt_variablePrefix">Some languages need a '$' or a namespace
+		/// before all variable names.</param>
+		public Names(string reservedWords, string opt_variablePrefix = null)
+		{
+			this.variablePrefix_ = opt_variablePrefix == null ? "" : opt_variablePrefix;
+			this.reservedDict_ = new Dictionary<string, bool>();
+			if (reservedWords != null) {
+				var splitWords = reservedWords.Split(',');
+				for (var i = 0; i < splitWords.Length; i++) {
+					this.reservedDict_[splitWords[i]] = true;
+				}
+			}
+			this.reset();
+		}
+
+		/**
+		 * When JavaScript (or most other languages) is generated, variable 'foo' and
+		 * procedure 'foo' would collide.  However, Blockly has no such problems since
+		 * variable get 'foo' and procedure call 'foo' are unambiguous.
+		 * Therefore, Blockly keeps a separate type name to disambiguate.
+		 * getName('foo', 'variable') -> 'foo'
+		 * getName('foo', 'procedure') -> 'foo2'
+		 */
+
+		/// <summary>
+		/// Empty the database and start from scratch.  The reserved words are kept.
+		/// </summary>
+		public void reset()
+		{
+			this.db_ = new Dictionary<string, string>();
+			this.dbReverse_ = new Dictionary<string, bool>();
+		}
+
+		/// <summary>
+		/// Convert a Blockly entity name to a legal exportable entity name.
+		/// </summary>
+		/// <param name="name">The Blockly entity name (no constraints).</param>
+		/// <param name="type">The type of entity in Blockly
+		/// ('VARIABLE', 'PROCEDURE', 'BUILTIN', etc...).</param>
+		/// <returns>An entity name legal for the exported language.</returns>
+		public string getName(string name, string type)
+		{
+			var normalized = name.ToLower() + '_' + type;
+			var prefix = (type == Blockly.Variables.NAME_TYPE) ?
+				this.variablePrefix_ : "";
+			if (this.db_.ContainsKey(normalized)) {
+				return prefix + this.db_[normalized];
+			}
+			var safeName = this.getDistinctName(name, type);
+			this.db_[normalized] = safeName.Substr(prefix.Length);
+			return safeName;
+		}
+
+		/// <summary>
+		/// Convert a Blockly entity name to a legal exportable entity name.
+		/// Ensure that this is a new name not overlapping any previously defined name.
+		/// Also check against list of reserved words for the current language and
+		/// ensure name doesn't collide.
+		/// </summary>
+		/// <param name="name">The Blockly entity name (no constraints).</param>
+		/// <param name="type">The type of entity in Blockly
+		/// ('VARIABLE', 'PROCEDURE', 'BUILTIN', etc...).</param>
+		/// <returns>An entity name legal for the exported language.</returns>
+		public string getDistinctName(string name, string type)
+		{
+			var safeName = this.safeName_(name);
+			var i = 0;
+			while (this.dbReverse_.ContainsKey(safeName + ((i == 0) ? "" : i.ToString())) ||
+				   this.reservedDict_.ContainsKey(safeName + i.ToString())) {
+				// Collision with existing name.  Create a unique name.
+				i++;
+			}
+			if (i > 0)
+				safeName += i;
+			this.dbReverse_[safeName] = true;
+			var prefix = (type == Blockly.Variables.NAME_TYPE) ?
+				this.variablePrefix_ : "";
+			return prefix + safeName;
+		}
+
+		/// <summary>
+		/// Given a proposed entity name, generate a name that conforms to the
+		/// [_A-Za-z][_A-Za-z0-9]* format that most languages consider legal for
+		/// variables.
+		/// </summary>
+		/// <param name="name">Potentially illegal entity name.</param>
+		/// <returns>Safe entity name.</returns>
+		public string safeName_(string name)
+		{
+			if (name == null) {
+				name = "unnamed";
+			}
+			else {
+				// Unfortunately names in non-latin characters will look like
+				// _E9_9F_B3_E4_B9_90 which is pretty meaningless.
+				name = Script.EncodeURI(name.Replace(new Regex(" "), "_").Replace(new Regex(@"[^\w]"), "_"));
+				// Most languages don't allow names with leading numbers.
+				if ("0123456789".IndexOf(name[0]) != -1) {
+					name = "my_" + name;
+				}
+			}
+			return name;
+		}
+
+		/// <summary>
+		/// Do the given two entity names refer to the same entity?
+		/// Blockly names are case-insensitive.
+		/// </summary>
+		/// <param name="name1">First name.</param>
+		/// <param name="name2">Second name.</param>
+		/// <returns>True if names are the same.</returns>
+		public bool equals(string name1, string name2)
+		{
+			return name1.ToLower() == name2.ToLower();
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Procedures.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Procedures.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Procedures.cs	(revision 270)
@@ -0,0 +1,314 @@
+/**
+ * @license
+ * Visual Blocks Editor
+ *
+ * Copyright 2012 Google Inc.
+ * https://developers.google.com/blockly/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview Utility functions for handling procedures.
+ * @author fraser@google.com (Neil Fraser)
+ */
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+using Bridge;
+using Bridge.Html5;
+using Bridge.Text.RegularExpressions;
+using WebMrbc;
+
+namespace WebMrbc
+{
+	public class Procedures
+	{
+		/// <summary>
+		/// Category to separate procedure names from variables and generated functions.
+		/// </summary>
+		public string NAME_TYPE = "PROCEDURE";
+
+		/**
+		 * Common HSV hue for all blocks in this category.
+		 */
+		public int HUE = 290;
+
+		/// <summary>
+		/// Find all user-created procedure definitions in a workspace.
+		/// </summary>
+		/// <param name="root">Root workspace.</param>
+		/// <returns>Pair of arrays, the first contains procedures without return variables, the
+		/// second with. Each procedure is defined by a three-element list of name, parameter
+		/// list, and return value boolean.</returns>
+		public Tuple<string, string[], bool>[][] allProcedures(Workspace root)
+		{
+			var blocks = root.getAllBlocks();
+			var proceduresReturn = new Tuple<string, string[], bool>[0];
+			var proceduresNoReturn = new Tuple<string, string[], bool>[0];
+			for (var i = 0; i < blocks.Length; i++) {
+				ProceduresDefBlock block = (dynamic)blocks[i];
+				if ((block.type == ProceduresDefnoreturnBlock.type_name)
+					|| (block.type == ProceduresDefreturnBlock.type_name)) {
+					var tuple = block.getProcedureDef();
+					if (tuple != null) {
+						if (tuple.Item3) {
+							proceduresReturn.Push(tuple);
+						}
+						else {
+							proceduresNoReturn.Push(tuple);
+						}
+					}
+				}
+			}
+			proceduresNoReturn.Sort(procTupleComparator_);
+			proceduresReturn.Sort(procTupleComparator_);
+			return new Tuple<string, string[], bool>[][] { proceduresNoReturn, proceduresReturn };
+		}
+
+		/// <summary>
+		/// Comparison function for case-insensitive sorting of the first element of
+		/// a tuple.
+		/// </summary>
+		/// <param name="ta">First tuple.</param>
+		/// <param name="tb">Second tuple.</param>
+		/// <returns>-1, 0, or 1 to signify greater than, equality, or less than.</returns>
+		public int procTupleComparator_(Tuple<string, string[], bool> ta, Tuple<string, string[], bool> tb)
+		{
+			return ta.Item1.ToLower().LocaleCompare(tb.Item1.ToLower());
+		}
+
+		/// <summary>
+		/// Ensure two identically-named procedures don't exist.
+		/// </summary>
+		/// <param name="name">Proposed procedure name.</param>
+		/// <param name="block">Block to disambiguate.</param>
+		/// <returns>Non-colliding name.</returns>
+		public static string findLegalName(string name, Block block)
+		{
+			if (block.isInFlyout) {
+				// Flyouts can have multiple procedures called 'do something'.
+				return name;
+			}
+			while (!isLegalName_(name, block.workspace, block)) {
+				// Collision with another procedure.
+				var r = new Regex(@"^(.*?)(\d+)$").Exec(name);
+				if (r == null) {
+					name += "2";
+				}
+				else {
+					name = r[1] + (Bridge.Script.ParseInt(r[2], 10) + 1);
+				}
+			}
+			return name;
+		}
+
+		/// <summary>
+		/// Does this procedure have a legal name?  Illegal names include names of
+		/// procedures already defined.
+		/// </summary>
+		/// <param name="name">The questionable name.</param>
+		/// <param name="workspace">The workspace to scan for collisions.</param>
+		/// <param name="opt_exclude">Optional block to exclude from
+		/// comparisons (one doesn't want to collide with oneself).</param>
+		/// <returns>True if the name is legal.</returns>
+		public static bool isLegalName_(string name, Workspace workspace, Block opt_exclude = null)
+		{
+			var blocks = workspace.getAllBlocks();
+			// Iterate through every block and check the name.
+			for (var i = 0; i < blocks.Length; i++) {
+				if (blocks[i] == opt_exclude) {
+					continue;
+				}
+				ProceduresDefBlock block = (dynamic)blocks[i];
+				if ((block.type == ProceduresDefnoreturnBlock.type_name)
+					|| (block.type == ProceduresDefreturnBlock.type_name)) {
+					var procName = block.getProcedureDef();
+					if (Blockly.Names.equals(procName.Item1, name)) {
+						return false;
+					}
+				}
+			}
+			return true;
+		}
+
+		/// <summary>
+		/// Rename a procedure.  Called by the editable field.
+		/// </summary>
+		/// <param name="field"></param>
+		/// <param name="name">The proposed new name.</param>
+		/// <returns>The accepted name.</returns>
+		public string rename(Field field, string name)
+		{
+			// Strip leading and trailing whitespace.  Beyond this, all names are legal.
+			name = name.Replace(new Regex(@"^[\s\xa0] +|[\s\xa0] +$"), "");
+
+			// Ensure two identically-named procedures don't exist.
+			var legalName = findLegalName(name, field.sourceBlock_);
+			var oldName = field.text_;
+			if (oldName != name && oldName != legalName) {
+				// Rename any callers.
+				var blocks = field.sourceBlock_.workspace.getAllBlocks();
+				for (var i = 0; i < blocks.Length; i++) {
+					ProceduresCallBlock block = (dynamic)blocks[i];
+					if ((block.type == ProceduresCallnoreturnBlock.type_name)
+						|| (block.type == ProceduresCallreturnBlock.type_name)) {
+						block.renameProcedure(oldName, legalName);
+					}
+				}
+			}
+			return legalName;
+		}
+
+		/// <summary>
+		/// Construct the blocks required by the flyout for the procedure category.
+		/// </summary>
+		/// <param name="workspace">The workspace contianing procedures.</param>
+		/// <returns>Array of XML block elements.</returns>
+		public Element[] flyoutCategory(Workspace workspace)
+		{
+			var xmlList = new Element[0];
+			if (Script.Get(Blockly.Blocks, ProceduresDefnoreturnBlock.type_name) != null) {
+				// <block type="procedures_defnoreturn" gap="16"></block>
+				var block = goog.dom.createDom("block");
+				block.SetAttribute("type", ProceduresDefnoreturnBlock.type_name);
+				block.SetAttribute("gap", "16");
+				xmlList.Push(block);
+			}
+			if (Script.Get(Blockly.Blocks, ProceduresDefreturnBlock.type_name) != null) {
+				// <block type="procedures_defreturn" gap="16"></block>
+				var block = goog.dom.createDom("block");
+				block.SetAttribute("type", ProceduresDefreturnBlock.type_name);
+				block.SetAttribute("gap", "16");
+				xmlList.Push(block);
+			}
+			if (Script.Get(Blockly.Blocks, ProceduresIfreturnBlock.type_name) != null) {
+				// <block type="procedures_ifreturn" gap="16"></block>
+				var block = goog.dom.createDom("block");
+				block.SetAttribute("type", ProceduresIfreturnBlock.type_name);
+				block.SetAttribute("gap", "16");
+				xmlList.Push(block);
+			}
+			if (xmlList.Length != 0) {
+				// Add slightly larger gap between system blocks and user calls.
+				xmlList[xmlList.Length - 1].SetAttribute("gap", "24");
+			}
+
+			var populateProcedures = new Action<Tuple<string, string[], bool>[], string>((procedureList, templateName) => {
+				for (var i = 0; i < procedureList.Length; i++) {
+					var name = procedureList[i].Item1;
+					var args = procedureList[i].Item2;
+					// <block type="procedures_callnoreturn" gap="16">
+					//   <mutation name="do something">
+					//     <arg name="x"></arg>
+					//   </mutation>
+					// </block>
+					var block = goog.dom.createDom("block");
+					block.SetAttribute("type", templateName);
+					block.SetAttribute("gap", "16");
+					var mutation = goog.dom.createDom("mutation");
+					mutation.SetAttribute("name", name);
+					block.AppendChild(mutation);
+					for (var j = 0; j < args.Length; j++) {
+						var arg = goog.dom.createDom("arg");
+						arg.SetAttribute("name", args[j]);
+						mutation.AppendChild(arg);
+					}
+					xmlList.Push(block);
+				}
+			});
+
+			var tuple = allProcedures(workspace);
+			populateProcedures(tuple[0], ProceduresCallnoreturnBlock.type_name);
+			populateProcedures(tuple[1], ProceduresCallreturnBlock.type_name);
+			return xmlList;
+		}
+
+		/// <summary>
+		/// Find all the callers of a named procedure.
+		/// </summary>
+		/// <param name="name">Name of procedure.</param>
+		/// <param name="workspace">The workspace to find callers in.</param>
+		/// <returns>Array of caller blocks.</returns>
+		public ProceduresCallBlock[] getCallers(string name, Workspace workspace)
+		{
+			var callers = new ProceduresCallBlock[0];
+			var blocks = workspace.getAllBlocks();
+			// Iterate through every block and check the name.
+			for (var i = 0; i < blocks.Length; i++) {
+				ProceduresCallBlock block = (dynamic)blocks[i];
+				if ((block.type == ProceduresCallnoreturnBlock.type_name)
+					|| (block.type == ProceduresCallreturnBlock.type_name)) {
+					var procName = block.getProcedureCall();
+					// Procedure name may be null if the block is only half-built.
+					if (procName != null && Blockly.Names.equals(procName, name)) {
+						callers.Push(block);
+					}
+				}
+			}
+			return callers;
+		}
+
+		/// <summary>
+		/// When a procedure definition changes its parameters, find and edit all its
+		/// callers.
+		/// </summary>
+		/// <param name="defBlock">Procedure definition block.</param>
+		public void mutateCallers(ProceduresDefBlock defBlock)
+		{
+			var oldRecordUndo = Blockly.Events.recordUndo;
+			var name = defBlock.getProcedureDef().Item1;
+			var xmlElement = defBlock.mutationToDom(true);
+			var callers = getCallers(name, defBlock.workspace);
+			foreach (var caller in callers) {
+				var oldMutationDom = caller.mutationToDom();
+				var oldMutation = oldMutationDom != null ? Blockly.Xml.domToText(oldMutationDom) : null;
+				caller.domToMutation(xmlElement);
+				var newMutationDom = caller.mutationToDom();
+				var newMutation = newMutationDom != null ? Blockly.Xml.domToText(newMutationDom) : null;
+				if (oldMutation != newMutation) {
+					// Fire a mutation on every caller block.  But don't record this as an
+					// undo action since it is deterministically tied to the procedure's
+					// definition mutation.
+					Blockly.Events.recordUndo = false;
+					Blockly.Events.fire(new Change(
+						caller, "mutation", null, oldMutation, newMutation));
+					Blockly.Events.recordUndo = oldRecordUndo;
+				}
+			}
+		}
+
+		/// <summary>
+		/// Find the definition block for the named procedure.
+		/// </summary>
+		/// <param name="name">Name of procedure.</param>
+		/// <param name="workspace">The workspace to search.</param>
+		/// <returns>The procedure definition block, or null not found.</returns>
+		public Block getDefinition(string name, Workspace workspace)
+		{
+			// Assume that a procedure definition is a top block.
+			var blocks = workspace.getTopBlocks(false);
+			for (var i = 0; i < blocks.Length; i++) {
+				ProceduresDefBlock block = (dynamic)blocks[i];
+				if ((block.type == ProceduresDefnoreturnBlock.type_name)
+					|| (block.type == ProceduresDefreturnBlock.type_name)) {
+					var tuple = block.getProcedureDef();
+					if (tuple != null && Blockly.Names.equals(tuple.Item1, name)) {
+						return block;
+					}
+				}
+			}
+			return null;
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Properties/AssemblyInfo.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Properties/AssemblyInfo.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Properties/AssemblyInfo.cs	(revision 270)
@@ -0,0 +1,35 @@
+﻿using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// アセンブリに関する一般情報は、以下の属性セットによって 
+// 制御されます。アセンブリに関連付けられている情報を変更するには、
+// これらの属性値を変更します。
+[assembly: AssemblyTitle("WebMrbc")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("コアーズ株式会社")]
+[assembly: AssemblyProduct("WebMrbc")]
+[assembly: AssemblyCopyright("Copyright ©  2017 by Cores Co., Ltd. Japan")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// ComVisible を false に設定すると、 
+// COM コンポーネントがこのアセンブリ内のその型を認識できなくなります。
+// COM からこのアセンブリ内の型にアクセスする必要がある場合は、その型の ComVisible 属性を true に設定してください。
+[assembly: ComVisible(false)]
+
+// このプロジェクトが COM に公開される場合、次の GUID がタイプ ライブラリの ID になります。
+[assembly: Guid("45b0173a-217a-4147-9e8e-0f81cfaad659")]
+
+// アセンブリのバージョン情報は、以下の 4 つの値で構成されています:
+//
+//      メジャー バージョン
+//      マイナー バージョン 
+//      ビルド番号
+//      リビジョン
+//
+// すべての値を指定するか、下のように "*" を使ってリビジョンおよびビルド番号を 
+// 既定値にすることができます:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Index: EcnlProtoTool/trunk/webapp/webmrbc/Ruby.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Ruby.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Ruby.cs	(revision 270)
@@ -0,0 +1,347 @@
+﻿// Porting from 
+// https://github.com/jeanlazarou/blockly2ruby
+// Copyright (c) 2014 Jean Lazarou
+// MIT Lisence
+using System;
+using System.Linq;
+using Bridge;
+using Bridge.Text.RegularExpressions;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+
+namespace WebMrbc
+{
+	[ComVisible(true)]
+	public partial class Ruby : Generator, IMrbParser
+	{
+		static Ruby()
+		{
+			/**
+			 * List of illegal variable names.
+			 * This is not intended to be a security feature.  Blockly is 100% client-side,
+			 * so bypassing this list is trivial.  This is intended to prevent users from
+			 * accidentally clobbering a built-in object or function.
+			 * @private
+			 */
+			addReservedWords(
+				"Class,Object,BEGIN,END,__ENCODING__,__END__,__FILE__,__LINE__" +
+				"alias,and,begin,break,case,class,def,defined?,do,else,elsif,end,ensure,false,for,if,in,module,next" +
+				"nil,not,or,redo,rescue,retry,return,self,super,then,true,undef,unless,until,when,while,yield");
+		}
+
+		node tree;
+		node[] allNodes;
+		locals_node locals;
+		bool global = true;
+
+		public Ruby(string filename)
+			: base("Ruby")
+		{
+			this.filename = filename;
+		}
+
+		/**
+		 * Initialise the database of variable names.
+		 */
+		public override void init(Workspace workspace)
+		{
+			locals = new locals_node(null);
+		}
+
+		/**
+		 * Prepend the generated code with the variable definitions.
+		 * @param {string} code Generated code.
+		 * @return {string} Completed code.
+		 */
+		public override string finish(node[] codes)
+		{
+			tree = new scope_node(this, new begin_node(this, codes));
+			var cond = new ruby_code_cond(filename, INDENT);
+			tree.to_ruby(cond);
+			allNodes = cond.nodes;
+			return cond.ToString();
+		}
+
+		/**
+		 * Naked values are top-level blocks with outputs that aren't plugged into
+		 * anything.
+		 * @param {string} line Line of generated code.
+		 * @return {string} Legal line of code.
+		 */
+		public override node[] scrubNakedValue(node[] line)
+		{
+			return line;
+		}
+
+		/**
+		 * Common tasks for generating Ruby from blocks.
+		 * Handles comments for the specified block and any connected value blocks.
+		 * Calls any statements following this block.
+		 * @param {!Blockly.Block} block The current block.
+		 * @param {string} code The Ruby code created for this block.
+		 * @return {string} Ruby code with comments and subsequent blocks added.
+		 * @this {Blockly.CodeGenerator}
+		 * @private
+		 */
+		public override node[] scrub_(Block block, node[] code)
+		{
+			var commentCode = "";
+			// Only collect comments for blocks that aren't inline.
+			if (block.outputConnection == null || block.outputConnection.targetConnection == null) {
+				// Collect comment for this block.
+				var comment = block.getCommentText();
+				if (!String.IsNullOrEmpty(comment)) {
+					commentCode += this.prefixLines(comment, "# ") + "\n";
+				}
+				// Collect comments for all value arguments.
+				// Don't collect comments for nested statements.
+				var inputList = block.inputList;
+				for (var x = 0; x < inputList.Length; x++) {
+					if (inputList[x].type == Blockly.INPUT_VALUE) {
+						var childBlock = inputList[x].connection.targetBlock();
+						if (childBlock != null) {
+							comment = allNestedComments(childBlock);
+							if (!String.IsNullOrEmpty(comment)) {
+								commentCode += this.prefixLines(comment, "# ");
+							}
+						}
+					}
+				}
+			}
+			Block nextBlock = null;
+			if (block.nextConnection != null)
+				nextBlock = block.nextConnection.targetBlock();
+			var nextCode = blockToCode(nextBlock);
+			if (nextCode == null)
+				return code;
+			return (node[])code.Concat(nextCode);
+		}
+
+		public int lineno { get; set; }
+		public int column { get; set; }
+		public string filename { get; }
+
+		string[] syms = new string[0];
+
+		private mrb_sym get_sym(string str)
+		{
+			int i = syms.IndexOf(str);
+			if (i < 0) {
+				i = syms.Length;
+				syms.Push(str);
+			}
+			return (mrb_sym)(i + 1);
+		}
+
+		public string sym2name(mrb_sym sym)
+		{
+			int i = (int)sym - 1;
+			if ((i < 0) || (i >= syms.Length))
+				return ((int)sym).ToString();
+			return syms[i];
+		}
+
+		mrb_sym intern(string str)
+		{
+			return get_sym(str);
+		}
+
+		mrb_sym get_var_name(string str)
+		{
+			int i = syms.IndexOf(str);
+
+			// ローカル変数なら登録されているはずなので、
+			if (i < 0)
+				// グローバル変数とする
+				return get_sym((global ? "$" : "@") + str);
+
+			var sym = (mrb_sym)(i + 1);
+
+			// ローカル変数でなければ、
+			if (!local_var_p(sym))
+				// グローバル変数とする
+				return get_sym((global ? "$" : "@") + str);
+
+			return sym;
+		}
+
+		node new_var_node(mrb_sym sym)
+		{
+			var name = sym2name(sym);
+			if (name.StartsWith("$")) {
+				return new gvar_node(this, sym);
+			}
+			else if (name.StartsWith("@@")) {
+				return new cvar_node(this, sym);
+			}
+			else if (name.StartsWith("@")) {
+				return new ivar_node(this, sym);
+			}
+			else {
+				return new lvar_node(this, sym);
+			}
+		}
+
+		node new_num_node(string num)
+		{
+			var result = MrbParser.parse(num);
+			var begin = result as begin_node;
+			if ((begin != null) && (begin.progs.Length == 1))
+				return begin.progs[0];
+			return result;
+		}
+
+		node new_str_node(string text)
+		{
+			var result = MrbParser.parse("\"" + text + "\"");
+			var begin = result as begin_node;
+			if ((begin != null) && (begin.progs.Length == 1))
+				return begin.progs[0];
+			return result;
+		}
+
+		locals_node local_switch()
+		{
+			var prev = this.locals;
+			this.locals = new locals_node(null);
+			return prev;
+		}
+
+		void local_resume(locals_node prev)
+		{
+			this.locals = prev;
+		}
+
+		void local_nest()
+		{
+			this.locals = new locals_node(this.locals);
+		}
+
+		void local_unnest()
+		{
+			if (this.locals != null) {
+				this.locals = this.locals.cdr;
+			}
+		}
+
+		bool local_var_p(mrb_sym sym)
+		{
+			locals_node l = this.locals;
+
+			while (l != null) {
+				if (l.symList.Contains(sym))
+					return true;
+				l = l.cdr;
+			}
+			return false;
+		}
+
+		void local_add_f(mrb_sym sym)
+		{
+			if (this.locals != null) {
+				this.locals.push(sym);
+			}
+		}
+
+		mrb_sym local_add_f(string name)
+		{
+			var sym = intern(name);
+			local_add_f(sym);
+			return sym;
+		}
+
+		void local_add(mrb_sym sym)
+		{
+			if (!local_var_p(sym)) {
+				local_add_f(sym);
+			}
+		}
+
+		public mrb_sym[] locals_node()
+		{
+			return this.locals != null ? this.locals.symList : null;
+		}
+
+		void assignable(node lhs)
+		{
+			var lvar = lhs as lvar_node;
+			if (lvar != null) {
+				local_add(lvar.name);
+			}
+		}
+
+		node var_reference(node lhs)
+		{
+			node n;
+
+			var lvar = lhs as lvar_node;
+			if (lvar != null) {
+				if (!local_var_p(lvar.name)) {
+					n = new fcall_node(this, lvar.name, null);
+					return n;
+				}
+			}
+
+			return lhs;
+		}
+
+		public string[] GetBlockId(string filename, int lineno)
+		{
+			var nodes = allNodes;
+			var result = new string[0];
+			foreach (var node in nodes) {
+				if (node.filename != filename)
+					continue;
+				if (lineno < node.start_lineno)
+					continue;
+				if (node.column == 0) {
+					if (lineno >= node.lineno)
+						continue;
+				}
+				else {
+					if (lineno > node.lineno)
+						continue;
+				}
+				if (String.IsNullOrEmpty(node.block_id))
+					continue;
+
+				result.Push(node.block_id);
+			}
+			return result;
+		}
+
+		public string[] GetBlockId(string filename, int lineno, int column)
+		{
+			var nodes = allNodes;
+			var result = new string[0];
+			foreach (var node in nodes) {
+				if (node.filename != filename)
+					continue;
+				if ((lineno < node.start_lineno))
+					continue;
+				if ((lineno == node.start_lineno) && (column < node.column))
+					continue;
+				if (node.column == 0) {
+					if (lineno >= node.lineno)
+						continue;
+				}
+				else {
+					if ((lineno == node.lineno) && (column > node.column))
+						continue;
+					if (lineno > node.lineno)
+						continue;
+				}
+				if (String.IsNullOrEmpty(node.block_id))
+					continue;
+
+				result.Push(node.block_id);
+			}
+			return result;
+		}
+
+		public void yyError(string message, params object[] expected)
+		{
+			App.WriteLine($"{filename}({lineno},{column}): error {String.Format(message, expected)}");
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Colour.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Colour.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Colour.cs	(revision 270)
@@ -0,0 +1,53 @@
+// Porting from 
+// https://github.com/jeanlazarou/blockly2ruby
+// Copyright (c) 2014 Jean Lazarou
+// MIT Lisence
+using System;
+using Bridge;
+using System.Collections.Generic;
+
+namespace WebMrbc
+{
+	partial class Ruby
+	{
+		public node colour_picker(ColourPickerBlock block)
+		{
+			// Colour picker.
+			var value_colour = block.getFieldValue("COLOUR");
+			return new str_node(this, value_colour);
+		}
+
+		public node colour_random(ColourRandomBlock block)
+		{
+			// Generate a random colour.
+			var p = new node[0];
+			return new fcall_node(this, intern("colour_random"), p, null);
+		}
+
+		public node colour_rgb(ColourRGBBlock block)
+		{
+			// Compose a colour from RGB components expressed as percentages.
+			var r = valueToCode(block, "RED");
+			if (r == null) r = new int_node(this, 0);
+			var g = valueToCode(block, "GREEN");
+			if (g == null) g = new int_node(this, 0);
+			var b = valueToCode(block, "BLUE");
+			if (b == null) b = new int_node(this, 0);
+			var p = new node[] { r, g, b };
+			return new fcall_node(this, intern("colour_rgb"), p, null);
+		}
+
+		public node colour_blend(ColourBlendBlock block)
+		{
+			// Blend two colours together.
+			var colour1 = valueToCode(block, "COLOUR1");
+			if (colour1 == null) colour1 = new str_node(this, "#000000");
+			var colour2 = valueToCode(block, "COLOUR2");
+			if (colour2 == null) colour2 = new str_node(this, "#000000");
+			var ratio = valueToCode(block, "RATIO");
+			if (ratio == null) ratio = new int_node(this, 0);
+			var p = new node[] { colour1, colour2, ratio };
+			return new fcall_node(this, intern("colour_blend"), p, null);
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Lists.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Lists.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Lists.cs	(revision 270)
@@ -0,0 +1,306 @@
+// Porting from 
+// https://github.com/jeanlazarou/blockly2ruby
+// Copyright (c) 2014 Jean Lazarou
+// MIT Lisence
+using System;
+using Bridge;
+using System.Collections.Generic;
+
+namespace WebMrbc
+{
+	partial class Ruby
+	{
+		public node lists_create_empty(ListsCreateEmptyBlock block)
+		{
+			// Create an empty list.
+			var p = new node[0];
+			return new array_node(this, p);
+		}
+
+		public node lists_create_with(ListsCreateWithBlock block)
+		{
+			// Create a list with any number of elements of any type.
+			var p = new node[block.itemCount_];
+			for (var n = 0; n < block.itemCount_; n++) {
+				var i = valueToCode(block, "ADD" + n);
+				if (i == null)
+					i = new nil_node(this);
+				p.Push(i);
+			}
+			return new array_node(this, p);
+		}
+
+		public node lists_repeat(ListsRepeatBlock block)
+		{
+			// Create a list with one element repeated.
+			var argument0 = valueToCode(block, "ITEM");
+			if (argument0 == null) argument0 = new nil_node(this);
+			var argument1 = valueToCode(block, "NUM");
+			if (argument1 == null) argument1 = new int_node(this, 0);
+			var a = new array_node(this, new node[] { argument0 });
+			return new call_node(this, a, intern("*"), argument1);
+		}
+
+		public node lists_length(ListsLengthBlock block)
+		{
+			// List length.
+			var argument0 = valueToCode(block, "VALUE");
+			if (argument0 == null) argument0 = new array_node(this, new node[0]);
+			return new call_node(this, argument0, intern("length"));
+		}
+
+		public node lists_isEmpty(ListsIsEmptyBlock block)
+		{
+			// Is the list empty?
+			var argument0 = valueToCode(block, "VALUE");
+			if (argument0 == null) argument0 = new array_node(this, new node[0]);
+			return new call_node(this, argument0, intern("empty?"));
+		}
+
+		public node lists_indexOf(ListsIndexOfBlock block)
+		{
+			// Find an item in the list.
+			var search = valueToCode(block, "FIND");
+			if (search == null) search = new str_node(this, "");
+			var list = valueToCode(block, "VALUE");
+			if (list == null) list = new array_node(this, new node[0]);
+			var finder = block.getFieldValue("END") == "FIRST" ? "find_first" : "find_last";
+			var p = new node[] {
+				search
+			};
+			return new call_node(this, list, intern("finder"), p, null);
+		}
+
+		public node lists_getIndex(ListsGetIndexBlock block)
+		{
+			// Get element at index.
+			var mode = block.getFieldValue("MODE");
+			if (String.IsNullOrEmpty(mode)) mode = "GET";
+			var where = block.getFieldValue("WHERE");
+			if (String.IsNullOrEmpty(where)) where = "FROM_START";
+			var at = valueToCode(block, "AT");
+			if (at == null) at = new int_node(this, 1);
+			var list = valueToCode(block, "VALUE");
+			if (list == null) list = new array_node(this, new node[0]);
+
+			if (where == "FIRST") {
+				if (mode == "GET") {
+					return new call_node(this, list, intern("first"));
+				}
+				else {
+					if (mode == "GET_REMOVE") {
+						return new call_node(this, list, intern("shift"));
+					}
+					else if (mode == "REMOVE") {
+						return new call_node(this, list, intern("shift"));
+					}
+				}
+			}
+			else if (where == "LAST") {
+				if (mode == "GET") {
+					return new call_node(this, list, intern("last"));
+				}
+				else {
+					var code = list + ".pop";
+					if (mode == "GET_REMOVE") {
+						return new call_node(this, list, intern("pop"));
+					}
+					else if (mode == "REMOVE") {
+						return new call_node(this, list, intern("pop"));
+					}
+				}
+			}
+			else if (where == "FROM_START") {
+				// Blockly uses one-based indicies.
+				if (at is int_node) {
+					// If the index is a naked number, decrement it right now.
+					at = new int_node(this, (int)(((int_node)at).to_i() - 1));
+				}
+				else {
+					// If the index is dynamic, decrement it in code.
+					at = new begin_node(this, new call_node(this, at, intern("-"), new int_node(this, 1)), true);
+					at = new call_node(this, at, intern("to_i"));
+				}
+				if (mode == "GET") {
+					return new call_node(this, list, intern("[]"), new node[] { at }, null);
+				}
+				else if (mode == "GET_REMOVE") {
+					return new call_node(this, list, intern("delete_at"), new node[] { at }, null);
+				}
+				else if (mode == "REMOVE") {
+					return new call_node(this, list, intern("delete_at"), new node[] { at }, null);
+				}
+			}
+			else if (where == "FROM_END") {
+				at = new call_node(this, at, intern("-@"), (node)null);
+				if (mode == "GET") {
+					return new call_node(this, list, intern("[]"), new node[] { at }, null);
+				}
+				else if (mode == "GET_REMOVE") {
+					return new call_node(this, list, intern("delete_at"), new node[] { at }, null);
+				}
+				else if (mode == "REMOVE") {
+					return new call_node(this, list, intern("delete_at"), new node[] { at }, null);
+				}
+			}
+			else if (where == "RANDOM") {
+				if (mode == "GET") {
+					return new fcall_node(this, intern("lists_random_item"), new node[] { list }, null);
+				}
+				else {
+					if (mode == "GET_REMOVE") {
+						return new fcall_node(this, intern("lists_remove_random_item"), new node[] { list }, null);
+					}
+					else if (mode == "REMOVE") {
+						return new fcall_node(this, intern("lists_remove_random_item"), new node[] { list }, null);
+					}
+				}
+			}
+			throw new Exception("Unhandled combination (lists_getIndex).");
+		}
+
+		public node lists_setIndex(ListsSetIndexBlock block)
+		{
+			// Set element at index.
+			var list = valueToCode(block, "LIST");
+			if (list == null) list = new array_node(this, new node[0]);
+			var mode = block.getFieldValue("MODE");
+			if (String.IsNullOrEmpty(mode)) mode = "GET";
+			var where = block.getFieldValue("WHERE");
+			if (String.IsNullOrEmpty(where)) where = "FROM_START";
+			var at = valueToCode(block, "AT");
+			if (at == null) at = new int_node(this, 1);
+			var value = valueToCode(block, "TO");
+			if (value == null) value = new nil_node(this);
+
+			if (where == "FIRST") {
+				if (mode == "SET") {
+					return new asgn_node(this, new call_node(this, list, intern("[]"), new node[] { new int_node(this, 0) }, null), value);
+				}
+				else if (mode == "INSERT") {
+					return new call_node(this, list, intern("unshift"), new node[] { value }, null);
+				}
+			}
+			else if (where == "LAST") {
+				if (mode == "SET") {
+					return new asgn_node(this, new call_node(this, list, intern("[]"), new node[] { new int_node(this, -1) }, null), value);
+				}
+				else if (mode == "INSERT") {
+					return new call_node(this, list, intern("push"), new node[] { value }, null);
+				}
+			}
+			else if (where == "FROM_START") {
+				// Blockly uses one-based indicies.
+				if (at is int_node) {
+					// If the index is a naked number, decrement it right now.
+					at = new int_node(this, (int)(((int_node)at).to_i() - 1));
+				}
+				else {
+					// If the index is dynamic, decrement it in code.
+					at = new begin_node(this, new call_node(this, at, intern("-"), new int_node(this, 1)), true);
+					at = new call_node(this, at, intern("to_i"));
+				}
+				if (mode == "SET") {
+					return new asgn_node(this, new call_node(this, list, intern("[]"), new node[] { at }, null), value);
+				}
+				else if (mode == "INSERT") {
+					return new call_node(this, list, intern("insert"), new node[] { at, value }, null);
+				}
+			}
+			else if (where == "FROM_END") {
+				if (mode == "SET") {
+					// Blockly uses one-based indicies.
+					if (at is int_node) {
+						// If the index is a naked number, decrement it right now.
+					}
+					else {
+						// If the index is dynamic, decrement it in code.
+						at = new call_node(this, at, intern("to_i"));
+					}
+					return new asgn_node(this, new call_node(this, list, intern("[]"), new node[] { at }, null), value);
+				}
+				else if (mode == "INSERT") {
+					// Blockly uses one-based indicies.
+					if (at is int_node) {
+						// If the index is a naked number, decrement it right now.
+						at = new int_node(this, (int)(((int_node)at).to_i() + 1));
+					}
+					else {
+						// If the index is dynamic, decrement it in code.
+						at = new begin_node(this, new call_node(this, at, intern("+"), new int_node(this, 1)), true);
+						at = new call_node(this, at, intern("to_i"));
+					}
+
+					at = new call_node(this, at, intern("-@"), (node)null);
+					return new call_node(this, list, intern("insert"), new node[] { at, value }, null);
+				}
+			}
+			else if (where == "RANDOM") {
+				if (mode == "SET") {
+					return new fcall_node(this, intern("lists_set_random_item"), new node[] { list, value }, null);
+				}
+				else if (mode == "INSERT") {
+					return new fcall_node(this, intern("lists_insert_random_item"), new node[] { list, value }, null);
+				}
+			}
+			throw new Exception("Unhandled combination (lists_setIndex).");
+		}
+
+		public node lists_getSublist(ListsGetSublistBlock block)
+		{
+			// Get sublist.
+			var list = valueToCode(block, "LIST");
+			if (list == null) list = new array_node(this, new node[0]);
+			var where1 = block.getFieldValue("WHERE1");
+			var where2 = block.getFieldValue("WHERE2");
+			var at1 = valueToCode(block, "AT1");
+			if (at1 == null) at1 = new int_node(this, 1);
+			var at2 = valueToCode(block, "AT2");
+			if (at2 == null) at2 = new int_node(this, 1);
+			if (where1 == "FIRST" || (where1 == "FROM_START" && at1 is int_node && ((int_node)at1).to_i() == 1)) {
+				at1 = new int_node(this, 0);
+			}
+			else if (where1 == "FROM_START") {
+				// Blockly uses one-based indicies.
+				if (at1 is int_node) {
+					at1 = new int_node(this, (int)(((int_node)at1).to_i() - 1));
+				}
+				else {
+					at1 = new call_node(this, at1, intern("to_i"));
+					at1 = new call_node(this, at1, intern("-"), new int_node(this, 1));
+				}
+			}
+			else if (where1 == "FROM_END") {
+				if (at1 is int_node) {
+					at1 = new int_node(this, (int)(-((int_node)at1).to_i()));
+				}
+				else {
+					at1 = new call_node(this, at1, intern("-@"), (node)null);
+					at1 = new call_node(this, at1, intern("to_i"));
+				}
+			}
+			if (where2 == "LAST" || (where2 == "FROM_END" && at2 is int_node && ((int_node)at2).to_i() == 1)) {
+				at2 = new int_node(this, -1);
+			}
+			else if (where2 == "FROM_START") {
+				if (at2 is int_node) {
+					at2 = new int_node(this, (int)(((int_node)at2).to_i() - 1));
+				}
+				else {
+					at2 = new call_node(this, at2, intern("to_i"));
+					at2 = new call_node(this, at2, intern("-"), new int_node(this, 1));
+				}
+			}
+			else if (where2 == "FROM_END") {
+				if (at2 is int_node) {
+					at2 = new int_node(this, (int)(-((int_node)at2).to_i()));
+				}
+				else {
+					at2 = new call_node(this, at2, intern("-@"), (node)null);
+					at2 = new call_node(this, at2, intern("to_i"));
+				}
+			}
+			return new fcall_node(this, intern("lists_sublist"), new node[] { list, at1, at2 }, null);
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Logic.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Logic.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Logic.cs	(revision 270)
@@ -0,0 +1,108 @@
+// Porting from 
+// https://github.com/jeanlazarou/blockly2ruby
+// Copyright (c) 2014 Jean Lazarou
+// MIT Lisence
+using System;
+using Bridge;
+using System.Collections.Generic;
+
+namespace WebMrbc
+{
+	partial class Ruby
+	{
+		public node controls_if(ControlsIfBlock block)
+		{
+			// If/elseif/else condition.
+			node code = null;
+			if (block.elseCount_ != 0) {
+				code = statementToCode(block, "ELSE");
+				if (code == null) code = new nil_node(this);
+			}
+			for (var n = block.elseifCount_; n >= 0; n--) {
+				var argument = valueToCode(block, "IF" + n);
+				if (argument == null) argument = new false_node(this);
+				var branch = statementToCode(block, "DO" + n);
+				code = new if_node(this, argument, branch, code, false);
+			}
+			return code;
+		}
+
+		public node logic_compare(LogicCompareBlock block)
+		{
+			// Comparison operator.
+			var OPERATORS = new Dictionary<string, string>() {
+				{ "EQ", "==" },
+				{ "NEQ", "!=" },
+				{ "LT", "<" },
+				{ "LTE", "<=" },
+				{ "GT", ">" },
+				{ "GTE", ">=" },
+			};
+			var @operator = OPERATORS[block.getFieldValue("OP")];
+			var argument0 = valueToCode(block, "A");
+			if (argument0 == null) argument0 = new int_node(this, 0);
+			var argument1 = valueToCode(block, "B");
+			if (argument1 == null) argument1 = new int_node(this, 0);
+			return new call_node(this, argument0, intern(@operator), argument1);
+		}
+
+		public node logic_operation(LogicOperationBlock block)
+		{
+			// Operations 'and', 'or'.
+			var @operator = (block.getFieldValue("OP") == "AND") ? "&&" : "||";
+			var argument0 = valueToCode(block, "A");
+			var argument1 = valueToCode(block, "B");
+			if (argument0 == null && argument1 == null) {
+				// If there are no arguments, then the return value is false.
+				argument0 = new false_node(this);
+				argument1 = new false_node(this);
+			}
+			else {
+				// Single missing arguments have no effect on the return value.
+				var defaultArgument = (@operator == "&&") ? (node)new true_node(this) : (node)new false_node(this);
+				if (argument0 == null) {
+					argument0 = defaultArgument;
+				}
+				if (argument1 == null) {
+					argument1 = defaultArgument;
+				}
+			}
+			if (@operator == "&&")
+				return new and_node(this, argument0, argument1);
+			else
+				return new or_node(this, argument0, argument1);
+		}
+
+		public node logic_negate(LogicNegateBlock block)
+		{
+			// Negation.
+			var argument0 = valueToCode(block, "BOOL");
+			if (argument0 == null) argument0 = new true_node(this);
+			return new call_node(this, argument0, intern("!"), (node)null);
+		}
+
+		public node logic_boolean(LogicBooleanBlock block)
+		{
+			// Boolean values true and false.
+			return (block.getFieldValue("BOOL") == "TRUE") ? (node)new true_node(this) : (node)new false_node(this);
+		}
+
+		public node logic_null(LogicNullBlock block)
+		{
+			// Null data type.
+			return new nil_node(this);
+		}
+
+		public node logic_ternary(LogicTernaryBlock block)
+		{
+			// Ternary operator.
+			var value_if = valueToCode(block, "IF");
+			if (value_if == null) value_if = new false_node(this);
+			var value_then = valueToCode(block, "THEN");
+			if (value_then == null) value_then = new nil_node(this);
+			var value_else = valueToCode(block, "ELSE");
+			if (value_else == null) value_else = new nil_node(this);
+			return new if_node(this, value_if, value_then, value_else, true);
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Loops.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Loops.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Loops.cs	(revision 270)
@@ -0,0 +1,117 @@
+// Porting from 
+// https://github.com/jeanlazarou/blockly2ruby
+// Copyright (c) 2014 Jean Lazarou
+// MIT Lisence
+using System;
+using Bridge;
+using System.Collections.Generic;
+
+namespace WebMrbc
+{
+	partial class Ruby
+	{
+		public node controls_repeat(ControlsRepeatBlock block)
+		{
+			// Repeat n times (internal number).
+			var times = block.getFieldValue("TIMES");
+			var repeats = new int_node(this, times == null ? 0 : Script.ParseInt(times, 10));
+			var branch = statementToCode(block, "DO");
+			return new call_node(this, repeats, intern("times"), new node[0], new block_node(this, new node[0], branch, false));
+		}
+
+		public node controls_repeat_ext(ControlsRepeatExtBlock block)
+		{
+			// Repeat n times (external number).
+			var repeats = valueToCode(block, "TIMES");
+			if (repeats == null) repeats = new int_node(this, 0);
+			if (repeats is int_node) {
+			}
+			else {
+				repeats = new call_node(this, repeats, intern("to_i"));
+			}
+			var branch = statementToCode(block, "DO");
+			return new call_node(this, repeats, intern("times"), new node[0], new block_node(this, new node[0], branch, false));
+		}
+
+		public node controls_whileUntil(ControlsWhileUntilBlock block)
+		{
+			// Do while/until loop.
+			var until = block.getFieldValue("MODE") == "UNTIL";
+			var argument0 = valueToCode(block, "BOOL");
+			if (argument0 == null) argument0 = new false_node(this);
+			var branch = statementToCode(block, "DO");
+			if (until)
+				return new until_node(this, argument0, branch);
+			else
+				return new while_node(this, argument0, branch);
+		}
+
+		public node controls_for(ControlsForBlock block)
+		{
+			// For loop.
+			var lv = local_switch();
+
+			var loopVar = local_add_f(block.getFieldValue("VAR"));
+			var fromVal = valueToCode(block, "FROM");
+			if (fromVal == null) fromVal = new int_node(this, 0);
+			var toVal = valueToCode(block, "TO");
+			if (toVal == null) toVal = new int_node(this, 0);
+			var increment = valueToCode(block, "BY");
+			var branch = statementToCode(block, "DO");
+
+			if (fromVal is int_node && toVal is int_node &&
+				(increment == null || increment is int_node)) {
+
+				if (increment == null) increment = new int_node(this, 1);
+
+				// All parameters are simple numbers.
+			}
+			else {
+				fromVal = new call_node(this, fromVal, intern("to_f"));
+				toVal = new call_node(this, toVal, intern("to_f"));
+				if (increment == null)
+					increment = new float_node(this, 1);
+				else
+					increment = new call_node(this, increment, intern("to_f"));
+			}
+
+			local_resume(lv);
+
+			var arg = new hash_node(this, new hash_node.kv_t[] {
+				new hash_node.kv_t(new sym_node(this, intern("from")), fromVal),
+				new hash_node.kv_t(new sym_node(this, intern("to")), toVal),
+				new hash_node.kv_t(new sym_node(this, intern("by")), increment),
+			});
+			var exec = new block_node(this, new node[] { new arg_node(this, loopVar) }, branch, false);
+			return new fcall_node(this, intern("for_loop"), new node[] { arg }, exec);
+		}
+
+		public node controls_forEach(ControlsForEachBlock block)
+		{
+			// For each loop.
+			var lv = local_switch();
+
+			var loopVar = local_add_f(block.getFieldValue("VAR"));
+			var argument0 = valueToCode(block, "LIST");
+			if (argument0 == null) argument0 = new array_node(this, new node[0]);
+			var branch = statementToCode(block, "DO");
+
+			local_resume(lv);
+
+			var exec = new block_node(this, new node[] { new arg_node(this, loopVar) }, branch, false);
+			return new call_node(this, argument0, intern("each"), new node[0], exec);
+		}
+
+		public node controls_flow_statements(ControlsFlowStatementsBlock block)
+		{
+			// Flow statements: continue, break.
+			switch (block.getFieldValue("FLOW")) {
+			case "BREAK":
+				return new break_node(this, null);
+			case "CONTINUE":
+				return new next_node(this, null);
+			}
+			throw new Exception("Unknown flow statement.");
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Math.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Math.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Math.cs	(revision 270)
@@ -0,0 +1,298 @@
+// Porting from 
+// https://github.com/jeanlazarou/blockly2ruby
+// Copyright (c) 2014 Jean Lazarou
+// MIT Lisence
+using System;
+using Bridge;
+using System.Collections.Generic;
+
+namespace WebMrbc
+{
+	partial class Ruby
+	{
+		public node math_number(MathNumberBlock block)
+		{
+			// Numeric value.
+			var num = block.getFieldValue("NUM");
+			return new_num_node(num);
+		}
+
+		static Dictionary<string, string> ARITHMETIC_OPERATORS = new Dictionary<string, string>() {
+			{ "ADD", "+" },
+			{ "MINUS", "-" },
+			{ "MULTIPLY", "*" },
+			{ "DIVIDE", "/" },
+			{ "POWER", "**" }
+		};
+
+		public node math_arithmetic(MathArithmeticBlock block)
+		{
+			// Basic arithmetic operators, and power.
+			var @operator = ARITHMETIC_OPERATORS[block.getFieldValue("OP")];
+			var argument0 = valueToCode(block, "A");
+			if (argument0 == null) argument0 = new int_node(this, 0);
+			var argument1 = valueToCode(block, "B");
+			if (argument1 == null) argument1 = new int_node(this, 0);
+			var code = argument0 + @operator + argument1;
+			return new call_node(this, argument0, intern(@operator), argument1);
+		}
+
+		public node math_single(Block block)
+		{
+			// Math operators with single operand.
+			var @operator = block.getFieldValue("OP");
+			node code = null;
+			node arg;
+			if (@operator == "NEG") {
+				// Negation is a special case given its different operator precedence.
+				code = valueToCode(block, "NUM");
+				if (code == null) code = new int_node(this, 0);
+				return new call_node(this, code, intern("-@"), (node)null);
+			}
+			if (@operator == "SIN" || @operator == "COS" || @operator == "TAN") {
+				arg = valueToCode(block, "NUM");
+				if (arg == null) arg = new int_node(this, 0);
+			}
+			else {
+				arg = valueToCode(block, "NUM");
+				if (arg == null) arg = new int_node(this, 0);
+			}
+			// First, handle cases which generate values that don't need parentheses
+			// wrapping the code.
+			var math = new const_node(this, intern("Math"));
+			switch (@operator) {
+			case "ABS":
+				code = new call_node(this, arg, intern("abs"));
+				break;
+			case "ROOT":
+				code = new call_node(this, math, intern("sqrt"), new node[] { arg }, null);
+				break;
+			case "LN":
+				code = new call_node(this, math, intern("log"), new node[] { arg }, null);
+				break;
+			case "LOG10":
+				code = new call_node(this, math, intern("log10"), new node[] { arg }, null);
+				break;
+			case "EXP":
+				code = new call_node(this, math, intern("exp"), new node[] { arg }, null);
+				break;
+			case "POW10":
+				code = new call_node(this, new int_node(this, 10), intern("exp"), new node[] { arg }, null);
+				break;
+			case "ROUND":
+				code = new call_node(this, arg, intern("round"));
+				break;
+			case "ROUNDUP":
+				code = new call_node(this, arg, intern("ceil"));
+				break;
+			case "ROUNDDOWN":
+				code = new call_node(this, arg, intern("floor"));
+				break;
+			case "SIN":
+				arg = new call_node(this, arg, intern("/"), new float_node(this, 180.0));
+				arg = new call_node(this, arg, intern("*"), new colon2_node(this, math, intern("PI")));
+				code = new call_node(this, math, intern("sin"), new node[] { arg }, null);
+				break;
+			case "COS":
+				arg = new call_node(this, arg, intern("/"), new float_node(this, 180.0));
+				arg = new call_node(this, arg, intern("*"), new colon2_node(this, math, intern("PI")));
+				code = new call_node(this, math, intern("cos"), new node[] { arg }, null);
+				break;
+			case "TAN":
+				arg = new call_node(this, arg, intern("/"), new float_node(this, 180.0));
+				arg = new call_node(this, arg, intern("*"), new colon2_node(this, math, intern("PI")));
+				code = new call_node(this, math, intern("tan"), new node[] { arg }, null);
+				break;
+			}
+			if (code != null) {
+				return code;
+			}
+			// Second, handle cases which generate values that may need parentheses
+			// wrapping the code.
+			switch (@operator) {
+			case "ASIN":
+				code = new call_node(this, math, intern("asin"), new node[] { arg }, null);
+				code = new call_node(this, code, intern("/"), new colon2_node(this, math, intern("PI")));
+				code = new call_node(this, code, intern("*"), new float_node(this, 180.0));
+				break;
+			case "ACOS":
+				code = new call_node(this, math, intern("acos"), new node[] { arg }, null);
+				code = new call_node(this, code, intern("/"), new colon2_node(this, math, intern("PI")));
+				code = new call_node(this, code, intern("*"), new float_node(this, 180.0));
+				break;
+			case "ATAN":
+				code = new call_node(this, math, intern("atan"), new node[] { arg }, null);
+				code = new call_node(this, code, intern("/"), new colon2_node(this, math, intern("PI")));
+				code = new call_node(this, code, intern("*"), new float_node(this, 180.0));
+				break;
+			default:
+				throw new Exception("Unknown math operator: " + @operator);
+			}
+			return new begin_node(this, code, true);
+		}
+
+		public node math_constant(MathConstantBlock block)
+		{
+			// Constants: PI, E, the Golden Ratio, sqrt(2), 1/sqrt(2), INFINITY.
+			var constant = block.getFieldValue("CONSTANT");
+			var math = new const_node(this, intern("Math"));
+			node code;
+			switch (constant) {
+			case "PI":
+				return new colon2_node(this, math, intern("PI"));
+			case "E":
+				return new colon2_node(this, math, intern("E"));
+			case "GOLDEN_RATIO":
+				code = new call_node(this, math, intern("sqrt"), new node[] { new float_node(this, 5) }, null);
+				code = new call_node(this, new float_node(this, 1), intern("+"), code);
+				code = new call_node(this, new begin_node(this, code, true), intern("/"), new float_node(this, 2));
+				return code;
+			case "SQRT2":
+				return new call_node(this, math, intern("sqrt"), new node[] { new float_node(this, 2) }, null);
+			case "SQRT1_2":
+				code = new call_node(this, new float_node(this, 1), intern("/"), new float_node(this, 2));
+				return new call_node(this, math, intern("sqrt"), new node[] { code }, null);
+			case "INFINITY":
+				return new call_node(this, new float_node(this, 1), intern("/"), new float_node(this, 0));
+			}
+			return null;
+		}
+
+		public node math_number_property(MathNumberPropertyBlock block)
+		{
+			// Check if a number is even, odd, prime, whole, positive, or negative
+			// or if it is divisible by certain number. Returns true or false.
+			var number_to_check = valueToCode(block, "NUMBER_TO_CHECK");
+			if (number_to_check == null) number_to_check = new int_node(this, 0);
+			var dropdown_property = block.getFieldValue("PROPERTY");
+			node code = null;
+			if (dropdown_property == "PRIME") {
+				return new fcall_node(this, intern("is_prime"), new node[] { number_to_check }, null);
+			}
+			switch (dropdown_property) {
+			case "EVEN":
+				return new call_node(this, number_to_check, intern("even?"));
+			case "ODD":
+				return new call_node(this, number_to_check, intern("odd?"));
+			case "WHOLE":
+				code = new call_node(this, number_to_check, intern("%"), new int_node(this, 1));
+				return new call_node(this, code, intern("=="), new int_node(this, 0));
+			case "POSITIVE":
+				return new call_node(this, number_to_check, intern(">"), new node[] { new int_node(this, 0) }, null);
+			case "NEGATIVE":
+				return new call_node(this, number_to_check, intern("<"), new node[] { new int_node(this, 0) }, null);
+			case "DIVISIBLE_BY":
+				var divisor = valueToCode(block, "DIVISOR");
+				// If "divisor" is some code that evals to 0, Ruby will raise an error.
+				if (divisor == null || (divisor is int_node && ((int_node)divisor).to_i() == 0)
+					 || (divisor is float_node && ((float_node)divisor).to_f() == 0.0)) {
+					return new false_node(this);
+				}
+				code = new call_node(this, number_to_check, intern("%"), divisor);
+				return new call_node(this, code, intern("=="), new int_node(this, 0));
+			}
+			return null;
+		}
+
+		public node math_change(MathChangeBlock block)
+		{
+			// Add to a variable in place.
+			var argument0 = valueToCode(block, "DELTA");
+			if (argument0 == null) argument0 = new int_node(this, 0);
+			var varName = get_var_name(block.getFieldValue("VAR"));
+			return new op_asgn_node(this, new_var_node(varName), intern("+"), argument0);
+		}
+
+		// Rounding functions have a single operand.
+		public node math_round(MathRoundBlock block) { return math_single(block); }
+		// Trigonometry functions have a single operand.
+		public node math_trig(MathTrigBlock block) { return math_single(block); }
+
+		public node math_on_list(MathOnListBlock block)
+		{
+			// Math functions for lists.
+			var func = block.getFieldValue("OP");
+			var list = valueToCode(block, "LIST");
+			if (list == null) list = new array_node(this, new node[0]);
+			node code;
+			switch (func) {
+			case "SUM":
+				code = new call_node(this, list, intern("sum"));
+				break;
+			case "MIN":
+				code = new call_node(this, list, intern("numbers"));
+				code = new call_node(this, code, intern("min"));
+				break;
+			case "MAX":
+				code = new call_node(this, list, intern("numbers"));
+				code = new call_node(this, code, intern("max"));
+				break;
+			case "AVERAGE":
+				code = new call_node(this, list, intern("average"));
+				break;
+			case "MEDIAN":
+				code = new call_node(this, list, intern("median"));
+				break;
+			case "MODE":
+				// As a list of numbers can contain more than one mode,
+				// the returned result is provided as an array.
+				// Mode of [3, "x", "x", 1, 1, 2, "3"] -> ["x", 1].
+				code = new fcall_node(this, intern("math_modes"), new node[] { list }, null);
+				break;
+			case "STD_DEV":
+				code = new call_node(this, list, intern("standard_deviation"));
+				break;
+			case "RANDOM":
+				code = new call_node(this, list, intern("size"));
+				code = new fcall_node(this, intern("rand"), new node[] { code }, null);
+				code = new call_node(this, list, intern("[]"), new node[] { code }, null);
+				break;
+			default:
+				throw new Exception("Unknown operator: " + func);
+			}
+			return code;
+		}
+
+		public node math_modulo(MathModuloBlock block)
+		{
+			// Remainder computation.
+			var argument0 = valueToCode(block, "DIVIDEND");
+			if (argument0 == null) argument0 = new int_node(this, 0);
+			var argument1 = valueToCode(block, "DIVISOR");
+			if (argument1 == null) argument1 = new int_node(this, 0);
+			return new call_node(this, argument0, intern("%"), argument1);
+		}
+
+		public node math_constrain(MathConstrainBlock block)
+		{
+			// Constrain a number between two limits.
+			var argument0 = valueToCode(block, "VALUE");
+			if (argument0 == null) argument0 = new int_node(this, 0);
+			var argument1 = valueToCode(block, "LOW");
+			if (argument1 == null) argument1 = new int_node(this, 0);
+			var argument2 = valueToCode(block, "HIGH");
+			if (argument2 == null) argument2 = new fcall_node(this, intern("Float"), new node[] { new str_node(this, "inf") }, null);
+			node code = new array_node(this, new node[] { argument0, argument1 });
+			code = new call_node(this, code, intern("max"));
+			code = new array_node(this, new node[] { code, argument2 });
+			return new call_node(this, code, intern("min"));
+		}
+
+		public node math_random_int(MathRandomIntBlock block)
+		{
+			// Random integer between [X] and [Y].
+			var argument0 = valueToCode(block, "FROM");
+			if (argument0 == null) argument0 = new int_node(this, 0);
+			var argument1 = valueToCode(block, "TO");
+			if (argument1 == null) argument1 = new int_node(this, 0);
+			var code = new dot2_node(this, argument0, argument1);
+			return new fcall_node(this, intern("rand"), new node[] { code }, null);
+		}
+
+		public node math_random_float(MathRandomFloatBlock block)
+		{
+			// Random fraction between 0 and 1.
+			return new fcall_node(this, intern("rand"));
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Procedures.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Procedures.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Procedures.cs	(revision 270)
@@ -0,0 +1,85 @@
+// Porting from 
+// https://github.com/jeanlazarou/blockly2ruby
+// Copyright (c) 2014 Jean Lazarou
+// MIT Lisence
+using System;
+using Bridge;
+using System.Collections.Generic;
+
+namespace WebMrbc
+{
+	partial class Ruby
+	{
+		public node procedures_defreturn(ProceduresDefBlock block)
+		{
+			var lv = local_switch();
+
+			var args = new arg_node[0];
+			for (var x = 0; x < block.arguments_.Length; x++) {
+				args.Push(new arg_node(this, local_add_f(block.arguments_[x])));
+			}
+			var funcName = intern(block.getFieldValue("NAME"));
+			var branch = statementToCode(block, "STACK");
+			var returnValue = valueToCode(block, "RETURN");
+			if (returnValue == null) {
+				returnValue = new return_node(this, returnValue);
+			}
+			((begin_node)branch).progs.Push(returnValue);
+			var code = new def_node(this, funcName, args, branch);
+
+			local_resume(lv);
+
+			return code;
+		}
+
+		// Defining a procedure without a return value uses the same generator as
+		// a procedure with a return value.
+		public node procedures_defnoreturn(ProceduresDefnoreturnBlock block)
+		{
+			return procedures_defreturn(block);
+		}
+
+		public node procedures_callreturn(ProceduresCallreturnBlock block)
+		{
+			// Call a procedure with a return value.
+			var funcName = intern(block.getFieldValue("NAME"));
+			var args = new node[0];
+			for (var x = 0; x < block.arguments_.Length; x++) {
+				args.Push(valueToCode(block, "ARG" + x));
+				if (args[x] == null)
+					args[x] = new nil_node(this);
+			}
+			return new fcall_node(this, funcName, args, null);
+		}
+
+		public node procedures_callnoreturn(ProceduresCallnoreturnBlock block)
+		{
+			// Call a procedure with no return value.
+			var funcName = intern(block.getFieldValue("NAME"));
+			var args = new node[0];
+			for (var x = 0; x < block.arguments_.Length; x++) {
+				args.Push(valueToCode(block, "ARG" + x));
+				if (args[x] == null)
+					args[x] = new nil_node(this);
+			}
+			return new fcall_node(this, funcName, args, null);
+		}
+
+		public node procedures_ifreturn(ProceduresIfreturnBlock block)
+		{
+			// Conditionally return value from a procedure.
+			var condition = valueToCode(block, "CONDITION");
+			if (condition == null) condition = new false_node(this);
+			node code = null;
+			if (block.hasReturnValue_) {
+				var value = valueToCode(block, "VALUE");
+				if (value == null) value = new nil_node(this);
+				code = new return_node(this, value);
+			}
+			else {
+				code = new return_node(this, null);
+			}
+			return new if_node(this, condition, code, null, false);
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Text.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Text.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Text.cs	(revision 270)
@@ -0,0 +1,246 @@
+// Porting from 
+// https://github.com/jeanlazarou/blockly2ruby
+// Copyright (c) 2014 Jean Lazarou
+// MIT Lisence
+using System;
+using Bridge;
+using System.Collections.Generic;
+
+namespace WebMrbc
+{
+	partial class Ruby
+	{
+		public node text(TextBlock block)
+		{
+			// Text value.
+			return new_str_node(block.getFieldValue("TEXT"));
+		}
+
+		public node text_join(TextJoinBlock block)
+		{
+			// Create a string made up of any number of elements of any type.
+			if (block.itemCount_ == 0) {
+				return new str_node(this, "");
+			}
+			else if (block.itemCount_ == 1) {
+				var argument0 = valueToCode(block, "ADD0");
+				if (argument0 == null) argument0 = new str_node(this, "");
+				return new call_node(this, argument0, intern("to_s"));
+			}
+			else {
+				var argument0 = valueToCode(block, "ADD0");
+				if (argument0 == null)
+					argument0 = new str_node(this, "");
+				else
+					argument0 = new call_node(this, argument0, intern("to_s"));
+				for (var n = 1; n < block.itemCount_; n++) {
+					var argument1 = valueToCode(block, "ADD" + n);
+					if (argument1 == null)
+						argument1 = new str_node(this, "");
+					else
+						argument1 = new call_node(this, argument1, intern("to_s"));
+					argument0 = new call_node(this, argument0, intern("+"), argument1);
+				}
+				return argument0;
+			}
+		}
+
+		public node text_append(TextAppendBlock block)
+		{
+			// Append to a variable in place.
+			var varName = get_var_name(block.getFieldValue("VAR"));
+			var argument0 = valueToCode(block, "TEXT");
+			if (argument0 == null)
+				argument0 = new str_node(this, "");
+			else
+				argument0 = new call_node(this, argument0, intern("to_s"));
+			var code = new call_node(this, new_var_node(varName), intern("to_s"));
+			code = new call_node(this, code, intern("+"), argument0);
+			return new asgn_node(this, new_var_node(varName), code);
+		}
+
+		public node text_length(TextLengthBlock block)
+		{
+			// String length.
+			var argument0 = valueToCode(block, "VALUE");
+			if (argument0 == null) argument0 = new str_node(this, "");
+			return new call_node(this, argument0, intern("size"));
+		}
+
+		public node text_isEmpty(TextIsEmptyBlock block)
+		{
+			// Is the string null?
+			var argument0 = valueToCode(block, "VALUE");
+			if (argument0 == null) argument0 = new str_node(this, "");
+			return new call_node(this, argument0, intern("empty?"));
+		}
+
+		public node text_indexOf(TextIndexOfBlock block)
+		{
+			// Search the text for a substring.
+			// Should we allow for non-case sensitive???
+			var finder = block.getFieldValue("END") == "FIRST" ? "find_first" : "find_last";
+			var search = valueToCode(block, "FIND");
+			if (search == null) search = new str_node(this, "");
+			var text = valueToCode(block, "VALUE");
+			if (text == null) text = new str_node(this, "");
+			return new call_node(this, text, intern(finder), new node[] { search }, null);
+		}
+
+		public node text_charAt(TextCharAtBlock block)
+		{
+			// Get letter at index.
+			// Note: Until January 2013 this block did not have the WHERE input.
+			var where = block.getFieldValue("WHERE");
+			if (String.IsNullOrEmpty(where)) where = "FROM_START";
+			var at = valueToCode(block, "AT");
+			if (at == null) at = new int_node(this, 1);
+			var text = valueToCode(block, "VALUE");
+			if (text == null) text = new str_node(this, "");
+
+			// Blockly uses one-based indicies.
+			if (at is int_node) {
+				// If the index is a naked number, decrement it right now.
+				at = new int_node(this, (int)(((int_node)at).to_i() - 1));
+			}
+			else {
+				// If the index is dynamic, decrement it in code.
+				at = new call_node(this, at, intern("to_i"));
+				at = new call_node(this, at, intern("-"), new int_node(this, 1));
+			}
+
+			switch (where) {
+			case "FIRST":
+				return new call_node(this, text, intern("[]"), new node[] { new int_node(this, 0) }, null);
+			case "LAST":
+				return new call_node(this, text, intern("[]"), new node[] { new int_node(this, -1) }, null);
+			case "FROM_START":
+				return new fcall_node(this, intern("text_get_from_start"), new node[] { text, at }, null);
+			case "FROM_END":
+				return new fcall_node(this, intern("text_get_from_end"), new node[] { text, at }, null);
+			case "RANDOM":
+				return new fcall_node(this, intern("text_random_letter"), new node[] { text }, null);
+			}
+			throw new Exception("Unhandled option (text_charAt).");
+		}
+
+		public node text_getSubstring(TextGetSubstringBlock block)
+		{
+			// Get substring.
+			var text = valueToCode(block, "STRING");
+			if (text == null) text = new str_node(this, "");
+			var where1 = block.getFieldValue("WHERE1");
+			var where2 = block.getFieldValue("WHERE2");
+			var at1 = valueToCode(block, "AT1");
+			if (at1 == null) at1 = new int_node(this, 1);
+			var at2 = valueToCode(block, "AT2");
+			if (at2 == null) at2 = new int_node(this, 1);
+			if (where1 == "FIRST" || (where1 == "FROM_START" && at1 is int_node && ((int_node)at1).to_i() == 1)) {
+				at1 = new int_node(this, 0);
+			}
+			else if (where1 == "FROM_START") {
+				// Blockly uses one-based indicies.
+				if (at1 is int_node) {
+					// If the index is a naked number, decrement it right now.
+					at1 = new int_node(this, (int)(((int_node)at1).to_i() - 1));
+				}
+				else {
+					// If the index is dynamic, decrement it in code.
+					at1 = new call_node(this, at1, intern("to_i"));
+					at1 = new call_node(this, at1, intern("-"), new int_node(this, 1));
+				}
+			}
+			else if (where1 == "FROM_END") {
+				if (at1 is int_node) {
+					at1 = new int_node(this, (int)(-((int_node)at1).to_i()));
+				}
+				else {
+					at1 = new call_node(this, at1, intern("-@"), (node)null);
+					at1 = new call_node(this, at1, intern("to_i"));
+				}
+			}
+			if (where2 == "LAST" || (where2 == "FROM_END" && at2 is int_node && ((int_node)at2).to_i() == 1)) {
+				at2 = new int_node(this, -1);
+			}
+			else if (where2 == "FROM_START") {
+				if (at2 is int_node) {
+					at2 = new int_node(this, (int)(((int_node)at2).to_i() - 1));
+				}
+				else {
+					at2 = new call_node(this, at2, intern("to_i"));
+					at2 = new call_node(this, at2, intern("-"), new int_node(this, 1));
+				}
+			}
+			else if (where2 == "FROM_END") {
+				if (at2 is int_node) {
+					at2 = new int_node(this, (int)(-((int_node)at2).to_i()));
+				}
+				else {
+					at2 = new call_node(this, at2, intern("-@"), (node)null);
+					at2 = new call_node(this, at2, intern("to_i"));
+				}
+			}
+			var code = new dot2_node(this, at1, at2);
+			return new call_node(this, text, intern("[]"), new node[] { code }, null);
+		}
+
+		public node text_changeCase(TextChangeCaseBlock block)
+		{
+			// Change capitalization.
+			var OPERATORS = new Dictionary<string, string>() {
+				{ "UPPERCASE", "upcase" },
+				{ "LOWERCASE", "downcase"},
+				{ "TITLECASE", null }
+			};
+			node code;
+			var @operator = OPERATORS[block.getFieldValue("CASE")];
+			if (!String.IsNullOrEmpty(@operator)) {
+				@operator = OPERATORS[block.getFieldValue("CASE")];
+				var argument0 = valueToCode(block, "TEXT");
+				if (argument0 == null) argument0 = new str_node(this, "");
+				code = new call_node(this, argument0, intern(@operator));
+			}
+			else {
+				// Title case is not a native Ruby function. Define one.
+				var argument0 = valueToCode(block, "TEXT");
+				if (argument0 == null) argument0 = new str_node(this, "");
+				code = new fcall_node(this, intern("text_to_title_case"), new node[] { argument0 }, null);
+			}
+			return code;
+		}
+
+		public node text_trim(TextTrimBlock block)
+		{
+			// Trim spaces.
+			var OPERATORS = new Dictionary<string, string>() {
+				{ "LEFT", ".lstrip" },
+				{ "RIGHT", ".rstrip"},
+				{ "BOTH", ".strip" }
+			};
+			var @operator = OPERATORS[block.getFieldValue("MODE")];
+			var argument0 = valueToCode(block, "TEXT");
+			if (argument0 == null) argument0 = new str_node(this, "");
+			return new call_node(this, argument0, intern(@operator));
+		}
+
+		public node text_print(TextPrintBlock block)
+		{
+			// Print statement.
+			var argument0 = valueToCode(block, "TEXT");
+			if (argument0 == null) argument0 = new str_node(this, "");
+			return new fcall_node(this, intern("blockly_puts"), new node[] { argument0 }, null);
+		}
+
+		public node text_prompt(TextPromptBlock block)
+		{
+			// Prompt function.
+			var msg = new str_node(this, block.getFieldValue("TEXT"));
+			node code = new fcall_node(this, intern("text_prompt"), new node[] { msg }, null);
+			var toNumber = block.getFieldValue("TYPE") == "NUMBER";
+			if (toNumber) {
+				code = new call_node(this, code, intern("to_f"));
+			}
+			return code;
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Variables.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Variables.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Ruby/Variables.cs	(revision 270)
@@ -0,0 +1,29 @@
+// Porting from 
+// https://github.com/jeanlazarou/blockly2ruby
+// Copyright (c) 2014 Jean Lazarou
+// MIT Lisence
+using System;
+using Bridge;
+using System.Collections.Generic;
+
+namespace WebMrbc
+{
+	partial class Ruby
+	{
+		public node variables_get(VariablesGetBlock block)
+		{
+			// Variable getter.
+			var code = get_var_name(block.getFieldValue("VAR"));
+			return new_var_node(code);
+		}
+
+		public node variables_set(VariablesSetBlock block)
+		{
+			// Variable setter.
+			var argument0 = valueToCode(block, "VALUE");
+			if (argument0 == null) argument0 = new int_node(this, 0);
+			var varName = get_var_name(block.getFieldValue("VAR"));
+			return new asgn_node(this, new_var_node(varName), argument0);
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/SwitchCaseBlock.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/SwitchCaseBlock.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/SwitchCaseBlock.cs	(revision 270)
@@ -0,0 +1,826 @@
+﻿using System;
+using Bridge;
+using Bridge.Html5;
+
+namespace WebMrbc
+{
+	public class SwitchCaseNumberBlock : Block
+	{
+		public const string type_name = "switch_case_number";
+
+		internal Tuple<string, string>[] cases_;
+		internal int defaultCount_;
+
+		public SwitchCaseNumberBlock()
+			: base(type_name)
+		{
+		}
+
+		/// <summary>
+		/// Block for swicth/case/default condition.
+		/// </summary>
+		public void init()
+		{
+			setHelpUrl("http://www.example.com/");
+			setColour(210);
+			appendValueInput("SWITCH")
+				.appendField("右の値が");
+			setPreviousStatement(true);
+			setNextStatement(true);
+			setMutator(new Mutator(new[] {
+				SwitchCaseNumberConstBlock.type_name,
+				SwitchCaseNumberRangeBlock.type_name,
+				SwitchCaseNumberDefaultBlock.type_name }));
+			setTooltip(new Func<string>(() => {
+				if ((cases_.Length == 0) && (defaultCount_ == 0)) {
+					return "条件に合うブロックを実行";
+				}
+				else if ((cases_.Length == 0) && (defaultCount_ != 0)) {
+					return "条件に合うブロックを実行、合うものがなければ最後のブロックを実行";
+				}
+				else if ((cases_.Length != 0) && (defaultCount_ == 0)) {
+					return "条件に合うブロックを実行";
+				}
+				else if ((cases_.Length != 0) && (defaultCount_ != 0)) {
+					return "条件に合うブロックを実行、合うものがなければ最後のブロックを実行";
+				}
+				return "";
+			}));
+			cases_ = new Tuple<string, string>[] { new Tuple<string, string>("0", null) };
+			defaultCount_ = 0;
+			updateShape_();
+		}
+
+		/// <summary>
+		/// Create XML to represent the number of else-if and else inputs.
+		/// </summary>
+		/// <returns>XML storage element.</returns>
+		public Element mutationToDom(bool opt_caseIds)
+		{
+			if ((cases_.Length == 0) && (defaultCount_ == 0)) {
+				return null;
+			}
+			var container = Document.CreateElement("mutation");
+			for (var i = 0; i < cases_.Length; i++) {
+				Element caseInfo;
+				var value = getFieldValue("CONST" + i);
+				if (value != null) {
+					caseInfo = Document.CreateElement("case");
+					caseInfo.SetAttribute("value", value);
+				}
+				else {
+					var min = getFieldValue("RANGE_MIN" + i);
+					var max = getFieldValue("RANGE_MAX" + i);
+					if (min != null && max != null) {
+						caseInfo = Document.CreateElement("case");
+						caseInfo.SetAttribute("value", min + ".." + max);
+					}
+					else
+						continue;
+				}
+				container.AppendChild(caseInfo);
+			}
+			container.SetAttribute("default", defaultCount_.ToString());
+			return container;
+		}
+
+		/// <summary>
+		/// Parse XML to restore the else-if and else inputs.
+		/// </summary>
+		/// <param name="xmlElement">XML storage element.</param>
+		public void domToMutation(Element xmlElement)
+		{
+			cases_ = new Tuple<string, string>[0];
+			Element childNode;
+			for (var i = 0; (childNode = (dynamic)xmlElement.ChildNodes[i]) != null; i++) {
+				if (childNode.NodeName.ToLower() == "case") {
+					var value = childNode.GetAttribute("value");
+					if (value != null)
+						cases_.Push(new Tuple<string, string>(value, null));
+					else {
+						var min = childNode.GetAttribute("minimum");
+						var max = childNode.GetAttribute("maximum");
+						if ((min != null) && (max != null)) {
+							cases_.Push(new Tuple<string, string>(min, max));
+						}
+					}
+				}
+			}
+			var count = xmlElement.GetAttribute("default");
+			defaultCount_ = count == null ? 0 : Bridge.Script.ParseInt(count, 10);
+			updateShape_();
+		}
+
+		/// <summary>
+		/// Populate the mutator's dialog with this block's components.
+		/// </summary>
+		/// <param name="workspace">Mutator's workspace.</param>
+		/// <returns>Root block in mutator.</returns>
+		public Block decompose(Workspace workspace)
+		{
+			var containerBlock = workspace.newBlock(SwitchCaseNumberContainerBlock.type_name);
+			containerBlock.initSvg();
+			var connection = containerBlock.getInput("STACK").connection;
+			for (var i = 0; i < cases_.Length; i++) {
+				Block caseBlock;
+				var value = getFieldValue("CONST" + i);
+				if (value != null) {
+					caseBlock = workspace.newBlock(SwitchCaseNumberConstBlock.type_name);
+					caseBlock.setFieldValue(value, "CONST");
+				}
+				else {
+					var min = getFieldValue("RANGE_MIN" + i);
+					var max = getFieldValue("RANGE_MAX" + i);
+					if ((min != null) && (max != null)) {
+						caseBlock = workspace.newBlock(SwitchCaseNumberRangeBlock.type_name);
+						caseBlock.setFieldValue(min, "RANGE_MIN");
+						caseBlock.setFieldValue(max, "RANGE_MAX");
+					}
+					else
+						continue;
+				}
+				caseBlock.initSvg();
+				connection.connect(caseBlock.previousConnection);
+				connection = caseBlock.nextConnection;
+			}
+			if (defaultCount_ != 0) {
+				var defaultBlock = workspace.newBlock(SwitchCaseNumberDefaultBlock.type_name);
+				defaultBlock.initSvg();
+				connection.connect(defaultBlock.previousConnection);
+			}
+			return containerBlock;
+		}
+
+		/// <summary>
+		/// Reconfigure this block based on the mutator dialog's components.
+		/// </summary>
+		/// <param name="containerBlock">Root block in mutator.</param>
+		public void compose(Block containerBlock)
+		{
+			var clauseBlock = containerBlock.getInputTargetBlock("STACK");
+			// Count number of inputs.
+			cases_ = new Tuple<string, string>[0];
+			defaultCount_ = 0;
+			var statementConnections = new Connection[0];
+			Connection defaultStatementConnection = null;
+			while (clauseBlock != null) {
+				switch (clauseBlock.type) {
+				case SwitchCaseNumberConstBlock.type_name: {
+						var value = clauseBlock.getFieldValue("CONST");
+						cases_.Push(new Tuple<string, string>(value, null));
+						statementConnections.Push(((SwitchCaseNumberConstBlock)clauseBlock).statementConnection_);
+					}
+					break;
+				case SwitchCaseNumberRangeBlock.type_name: {
+						var range_min = clauseBlock.getFieldValue("RANGE_MIN");
+						var range_max = clauseBlock.getFieldValue("RANGE_MAX");
+						cases_.Push(new Tuple<string, string>(range_min, range_max));
+						statementConnections.Push(((SwitchCaseNumberRangeBlock)clauseBlock).statementConnection_);
+					}
+					break;
+				case SwitchCaseNumberDefaultBlock.type_name: {
+						defaultCount_++;
+						defaultStatementConnection = ((SwitchCaseNumberDefaultBlock)clauseBlock).statementConnection_;
+					}
+					break;
+				default:
+					throw new Exception("Unknown block type.");
+				}
+				clauseBlock = (clauseBlock.nextConnection != null) ?
+					clauseBlock.nextConnection.targetBlock() : null;
+			}
+			updateShape_();
+			// Reconnect any child blocks.
+			for (var i = 0; i < cases_.Length; i++) {
+				Mutator.reconnect(statementConnections[i], this, "DO" + i);
+			}
+			Mutator.reconnect(defaultStatementConnection, this, "DEFAULT_DO");
+		}
+
+		/// <summary>
+		/// Store pointers to any connected child blocks.
+		/// </summary>
+		/// <param name="containerBlock">Root block in mutator.</param>
+		public void saveConnections(Block containerBlock)
+		{
+			var clauseBlock = containerBlock.getInputTargetBlock("STACK");
+			var i = 0;
+			while (clauseBlock != null) {
+				switch (clauseBlock.type) {
+				case SwitchCaseNumberConstBlock.type_name: {
+						var inputDo = getInput("DO" + i);
+						((SwitchCaseNumberConstBlock)clauseBlock).statementConnection_ =
+							(inputDo != null) ? inputDo.connection.targetConnection : null;
+						i++;
+					}
+					break;
+				case SwitchCaseNumberRangeBlock.type_name: {
+						var inputDo = getInput("DO" + i);
+						((SwitchCaseNumberRangeBlock)clauseBlock).statementConnection_ =
+							(inputDo != null) ? inputDo.connection.targetConnection : null;
+						i++;
+					}
+					break;
+				case SwitchCaseNumberDefaultBlock.type_name: {
+						var inputDo = getInput("DEFAULT_DO");
+						((SwitchCaseNumberDefaultBlock)clauseBlock).statementConnection_ =
+							(inputDo != null) ? inputDo.connection.targetConnection : null;
+					}
+					break;
+				default:
+					throw new Exception("Unknown block type.");
+				}
+
+				clauseBlock = (clauseBlock.nextConnection != null) ?
+					clauseBlock.nextConnection.targetBlock() : null;
+			}
+		}
+
+		/// <summary>
+		/// Modify this block to have the correct number of inputs.
+		/// </summary>
+		private void updateShape_()
+		{
+			// Delete everything.
+			if (getInput("DEFAULT") != null) {
+				removeInput("DEFAULT");
+				removeInput("DEFAULT_DO");
+			}
+			var i = 0;
+			while (getInput("CASE" + i) != null) {
+				removeInput("CASE" + i);
+				removeInput("DO" + i);
+				i++;
+			}
+			// Rebuild block.
+			i = 0;
+			foreach (var c in cases_) {
+				if (c.Item2 == null) {
+					appendDummyInput("CASE" + i)
+						.appendField(new FieldNumber(c.Item1, "-Infinity", "Infinity", 0), "CONST" + i)
+						.appendField("の");
+				}
+				else {
+					appendDummyInput("CASE" + i)
+						.appendField(new FieldNumber(c.Item1, "-Infinity", "Infinity", 0), "RANGE_MIN" + i)
+						.appendField("から")
+						.appendField(new FieldNumber(c.Item2, "-Infinity", "Infinity", 0), "RANGE_MAX" + i)
+						.appendField("の");
+				}
+				appendStatementInput("DO" + i)
+					.appendField("とき");
+				i++;
+			}
+			if (defaultCount_ != 0) {
+				appendDummyInput("DEFAULT")
+					.appendField("その他の");
+				appendStatementInput("DEFAULT_DO")
+					.appendField("とき");
+			}
+		}
+	}
+
+	public class SwitchCaseNumberContainerBlock : Block
+	{
+		public const string type_name = "switch_case_number_container";
+
+		public SwitchCaseNumberContainerBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			appendDummyInput()
+				.appendField("条件");
+			appendStatementInput("STACK");
+			setColour(210);
+			setTooltip("");
+			contextMenu = false;
+		}
+	}
+
+	public class SwitchCaseNumberConstBlock : Block
+	{
+		public const string type_name = "switch_case_number_const";
+		public Connection statementConnection_;
+
+		public SwitchCaseNumberConstBlock()
+			: base(type_name)
+		{
+		}
+
+		/// <summary>
+		/// Block for swicth/case/default condition.
+		/// </summary>
+		public void init()
+		{
+			setColour(210);
+			appendDummyInput()
+				.appendField("固定値")
+				.appendField("0", "CONST");
+			setPreviousStatement(true);
+			setNextStatement(true);
+			setTooltip("固定値の条件");
+			contextMenu = false;
+		}
+	}
+
+	public class SwitchCaseNumberRangeBlock : Block
+	{
+		public const string type_name = "switch_case_number_range";
+		public Connection statementConnection_;
+
+		public SwitchCaseNumberRangeBlock()
+			: base(type_name)
+		{
+		}
+
+		/// <summary>
+		/// Block for swicth/case/default condition.
+		/// </summary>
+		public void init()
+		{
+			setColour(210);
+			appendDummyInput()
+				.appendField("範囲")
+				.appendField("1", "RANGE_MIN")
+				.appendField("から")
+				.appendField("2", "RANGE_MAX");
+			setPreviousStatement(true);
+			setNextStatement(true);
+			setTooltip("範囲の条件");
+			contextMenu = false;
+		}
+	}
+
+	public class SwitchCaseNumberDefaultBlock : Block
+	{
+		public const string type_name = "switch_case_number_default";
+		public Connection statementConnection_;
+
+		public SwitchCaseNumberDefaultBlock()
+			: base(type_name)
+		{
+		}
+
+		/// <summary>
+		/// Block for swicth/case/default condition.
+		/// </summary>
+		public void init()
+		{
+			setColour(210);
+			appendDummyInput()
+				.appendField("その他");
+			setPreviousStatement(true);
+			setTooltip("条件に当てはまらなかった場合");
+			contextMenu = false;
+		}
+	}
+
+	public class SwitchCaseTextBlock : Block
+	{
+		public const string type_name = "switch_case_text";
+
+		internal Tuple<string, string>[] cases_;
+		internal int defaultCount_;
+
+		public SwitchCaseTextBlock()
+			: base(type_name)
+		{
+		}
+
+		/// <summary>
+		/// Block for swicth/case/default condition.
+		/// </summary>
+		public void init()
+		{
+			setHelpUrl("http://www.example.com/");
+			setColour(210);
+			appendValueInput("SWITCH")
+				.appendField("右の値が");
+			setPreviousStatement(true);
+			setNextStatement(true);
+			setMutator(new Mutator(new[] {
+				SwitchCaseTextConstBlock.type_name,
+				SwitchCaseTextRangeBlock.type_name,
+				SwitchCaseTextDefaultBlock.type_name }));
+			setTooltip(new Func<string>(() => {
+				if ((cases_.Length == 0) && (defaultCount_ == 0)) {
+					return "条件に合うブロックを実行";
+				}
+				else if ((cases_.Length == 0) && (defaultCount_ != 0)) {
+					return "条件に合うブロックを実行、合うものがなければ最後のブロックを実行";
+				}
+				else if ((cases_.Length != 0) && (defaultCount_ == 0)) {
+					return "条件に合うブロックを実行";
+				}
+				else if ((cases_.Length != 0) && (defaultCount_ != 0)) {
+					return "条件に合うブロックを実行、合うものがなければ最後のブロックを実行";
+				}
+				return "";
+			}));
+			cases_ = new Tuple<string, string>[] { new Tuple<string, string>("0", null) };
+			defaultCount_ = 0;
+			updateShape_();
+		}
+
+		/// <summary>
+		/// Create XML to represent the text of else-if and else inputs.
+		/// </summary>
+		/// <returns>XML storage element.</returns>
+		public Element mutationToDom(bool opt_caseIds)
+		{
+			if ((cases_.Length == 0) && (defaultCount_ == 0)) {
+				return null;
+			}
+			var container = Document.CreateElement("mutation");
+			for (var i = 0; i < cases_.Length; i++) {
+				Element caseInfo;
+				var value = getFieldValue("CONST" + i);
+				if (value != null) {
+					caseInfo = Document.CreateElement("case");
+					caseInfo.SetAttribute("value", value);
+				}
+				else {
+					var min = getFieldValue("RANGE_MIN" + i);
+					var max = getFieldValue("RANGE_MAX" + i);
+					if (min != null && max != null) {
+						caseInfo = Document.CreateElement("case");
+						caseInfo.SetAttribute("value", min + ".." + max);
+					}
+					else
+						continue;
+				}
+				container.AppendChild(caseInfo);
+			}
+			container.SetAttribute("default", defaultCount_.ToString());
+			return container;
+		}
+
+		/// <summary>
+		/// Parse XML to restore the else-if and else inputs.
+		/// </summary>
+		/// <param name="xmlElement">XML storage element.</param>
+		public void domToMutation(Element xmlElement)
+		{
+			cases_ = new Tuple<string, string>[0];
+			Element childNode;
+			for (var i = 0; (childNode = (dynamic)xmlElement.ChildNodes[i]) != null; i++) {
+				if (childNode.NodeName.ToLower() == "case") {
+					var value = childNode.GetAttribute("value");
+					if (value != null)
+						cases_.Push(new Tuple<string, string>(value, null));
+					else {
+						var min = childNode.GetAttribute("minimum");
+						var max = childNode.GetAttribute("maximum");
+						if ((min != null) && (max != null))
+							cases_.Push(new Tuple<string, string>(min, max));
+					}
+				}
+			}
+			var count = xmlElement.GetAttribute("default");
+			defaultCount_ = count == null ? 0 : Bridge.Script.ParseInt(count, 10);
+			updateShape_();
+		}
+
+		/// <summary>
+		/// Populate the mutator's dialog with this block's components.
+		/// </summary>
+		/// <param name="workspace">Mutator's workspace.</param>
+		/// <returns>Root block in mutator.</returns>
+		public Block decompose(Workspace workspace)
+		{
+			var containerBlock = workspace.newBlock(SwitchCaseTextContainerBlock.type_name);
+			containerBlock.initSvg();
+			var connection = containerBlock.getInput("STACK").connection;
+			for (var i = 0; i < cases_.Length; i++) {
+				Block caseBlock;
+				var value = getFieldValue("CONST" + i);
+				if (value != null) {
+					caseBlock = workspace.newBlock(SwitchCaseTextConstBlock.type_name);
+					caseBlock.setFieldValue(value, "CONST");
+				}
+				else {
+					var min = getFieldValue("RANGE_MIN" + i);
+					var max = getFieldValue("RANGE_MAX" + i);
+					if ((min != null) && (max != null)) {
+						caseBlock = workspace.newBlock(SwitchCaseTextRangeBlock.type_name);
+						caseBlock.setFieldValue(min, "RANGE_MIN");
+						caseBlock.setFieldValue(max, "RANGE_MAX");
+					}
+					else
+						continue;
+				}
+				caseBlock.initSvg();
+				connection.connect(caseBlock.previousConnection);
+				connection = caseBlock.nextConnection;
+			}
+			if (defaultCount_ != 0) {
+				var defaultBlock = workspace.newBlock(SwitchCaseTextDefaultBlock.type_name);
+				defaultBlock.initSvg();
+				connection.connect(defaultBlock.previousConnection);
+			}
+			return containerBlock;
+		}
+
+		/// <summary>
+		/// Reconfigure this block based on the mutator dialog's components.
+		/// </summary>
+		/// <param name="containerBlock">Root block in mutator.</param>
+		public void compose(Block containerBlock)
+		{
+			var clauseBlock = containerBlock.getInputTargetBlock("STACK");
+			// Count text of inputs.
+			cases_ = new Tuple<string, string>[0];
+			defaultCount_ = 0;
+			var statementConnections = new Connection[0];
+			Connection defaultStatementConnection = null;
+			while (clauseBlock != null) {
+				switch (clauseBlock.type) {
+				case SwitchCaseTextConstBlock.type_name: {
+						var value = clauseBlock.getFieldValue("CONST");
+						cases_.Push(new Tuple<string, string>(value, null));
+						statementConnections.Push(((SwitchCaseTextConstBlock)clauseBlock).statementConnection_);
+					}
+					break;
+				case SwitchCaseTextRangeBlock.type_name: {
+						var range_min = clauseBlock.getFieldValue("RANGE_MIN");
+						var range_max = clauseBlock.getFieldValue("RANGE_MAX");
+						cases_.Push(new Tuple<string, string>(range_min, range_max));
+						statementConnections.Push(((SwitchCaseTextRangeBlock)clauseBlock).statementConnection_);
+					}
+					break;
+				case SwitchCaseTextDefaultBlock.type_name: {
+						defaultCount_++;
+						defaultStatementConnection = ((SwitchCaseTextDefaultBlock)clauseBlock).statementConnection_;
+					}
+					break;
+				default:
+					throw new Exception("Unknown block type.");
+				}
+				clauseBlock = (clauseBlock.nextConnection != null) ?
+					clauseBlock.nextConnection.targetBlock() : null;
+			}
+			updateShape_();
+			// Reconnect any child blocks.
+			for (var i = 0; i <= cases_.Length; i++) {
+				Mutator.reconnect(statementConnections[i], this, "DO" + i);
+			}
+			Mutator.reconnect(defaultStatementConnection, this, "DEFAULT_DO");
+		}
+
+		/// <summary>
+		/// Store pointers to any connected child blocks.
+		/// </summary>
+		/// <param name="containerBlock">Root block in mutator.</param>
+		public void saveConnections(Block containerBlock)
+		{
+			var clauseBlock = containerBlock.getInputTargetBlock("STACK");
+			var i = 0;
+			while (clauseBlock != null) {
+				switch (clauseBlock.type) {
+				case SwitchCaseTextConstBlock.type_name: {
+						var inputDo = getInput("DO" + i);
+						((SwitchCaseTextConstBlock)clauseBlock).statementConnection_ =
+							(inputDo != null) ? inputDo.connection.targetConnection : null;
+						i++;
+					}
+					break;
+				case SwitchCaseTextRangeBlock.type_name: {
+						var inputDo = getInput("DO" + i);
+						((SwitchCaseTextRangeBlock)clauseBlock).statementConnection_ =
+							(inputDo != null) ? inputDo.connection.targetConnection : null;
+						i++;
+					}
+					break;
+				case SwitchCaseTextDefaultBlock.type_name: {
+						var inputDo = getInput("DEFAULT_DO");
+						((SwitchCaseTextDefaultBlock)clauseBlock).statementConnection_ =
+							(inputDo != null) ? inputDo.connection.targetConnection : null;
+					}
+					break;
+				default:
+					throw new Exception("Unknown block type.");
+				}
+
+				clauseBlock = (clauseBlock.nextConnection != null) ?
+					clauseBlock.nextConnection.targetBlock() : null;
+			}
+		}
+
+		/// <summary>
+		/// Modify this block to have the correct text of inputs.
+		/// </summary>
+		private void updateShape_()
+		{
+			// Delete everything.
+			if (getInput("DEFAULT") != null) {
+				removeInput("DEFAULT");
+				removeInput("DEFAULT_DO");
+			}
+			var i = 0;
+			while (getInput("CASE" + i) != null) {
+				removeInput("CASE" + i);
+				removeInput("DO" + i);
+				i++;
+			}
+			// Rebuild block.
+			i = 0;
+			foreach (var c in cases_) {
+				if (c.Item2 == null) {
+					appendDummyInput("CASE" + i)
+						.appendField(new FieldTextInput(c.Item1), "CONST" + i)
+						.appendField("の");
+				}
+				else {
+					appendDummyInput("CASE" + i)
+						.appendField(new FieldTextInput(c.Item1), "RANGE_MIN" + i)
+						.appendField("から")
+						.appendField(new FieldTextInput(c.Item2), "RANGE_MAX" + i)
+						.appendField("の");
+				}
+				appendStatementInput("DO" + i)
+					.appendField("とき");
+				i++;
+			}
+			if (defaultCount_ != 0) {
+				appendDummyInput("DEFAULT")
+					.appendField("その他の");
+				appendStatementInput("DEFAULT_DO")
+					.appendField("とき");
+			}
+		}
+	}
+
+	public class SwitchCaseTextContainerBlock : Block
+	{
+		public const string type_name = "switch_case_text_container";
+
+		public SwitchCaseTextContainerBlock()
+			: base(type_name)
+		{
+		}
+
+		public void init()
+		{
+			appendDummyInput()
+				.appendField("条件");
+			appendStatementInput("STACK");
+			setColour(210);
+			setTooltip("");
+			contextMenu = false;
+		}
+	}
+
+	public class SwitchCaseTextConstBlock : Block
+	{
+		public const string type_name = "switch_case_text_const";
+		public Connection statementConnection_;
+
+		public SwitchCaseTextConstBlock()
+			: base(type_name)
+		{
+		}
+
+		/// <summary>
+		/// Block for swicth/case/default condition.
+		/// </summary>
+		public void init()
+		{
+			setColour(210);
+			appendDummyInput()
+				.appendField("固定値")
+				.appendField("0", "CONST");
+			setPreviousStatement(true);
+			setNextStatement(true);
+			setTooltip("固定値の条件");
+			contextMenu = false;
+		}
+	}
+
+	public class SwitchCaseTextRangeBlock : Block
+	{
+		public const string type_name = "switch_case_text_range";
+		public Connection statementConnection_;
+
+		public SwitchCaseTextRangeBlock()
+			: base(type_name)
+		{
+		}
+
+		/// <summary>
+		/// Block for swicth/case/default condition.
+		/// </summary>
+		public void init()
+		{
+			setColour(210);
+			appendDummyInput()
+				.appendField("範囲")
+				.appendField("a", "RANGE_MIN")
+				.appendField("から")
+				.appendField("b", "RANGE_MAX");
+			setPreviousStatement(true);
+			setNextStatement(true);
+			setTooltip("範囲の条件");
+			contextMenu = false;
+		}
+	}
+
+	public class SwitchCaseTextDefaultBlock : Block
+	{
+		public const string type_name = "switch_case_text_default";
+		public Connection statementConnection_;
+
+		public SwitchCaseTextDefaultBlock()
+			: base(type_name)
+		{
+		}
+
+		/// <summary>
+		/// Block for swicth/case/default condition.
+		/// </summary>
+		public void init()
+		{
+			setColour(210);
+			appendDummyInput()
+				.appendField("その他");
+			setPreviousStatement(true);
+			setTooltip("条件に当てはまらなかった場合");
+			contextMenu = false;
+		}
+	}
+
+	partial class Ruby
+	{
+		public node switch_case_number(SwitchCaseNumberBlock block)
+		{
+			// case/when/else condition.
+			var argument0 = valueToCode(block, "SWITCH");
+			if (argument0 == null) argument0 = new int_node(this, -1);
+			case_node.when_t[] code = new case_node.when_t[0];
+			for (int n = 0; n <= block.cases_.Length; n++) {
+				var branch = statementToCode(block, "DO" + n);
+				var argument1 = block.getFieldValue("CONST" + n);
+				if (argument1 != null) {
+					var when = new case_node.when_t() { body = branch };
+					when.value.Push(new int_node(this, argument1 == null ? 0 : Bridge.Script.ParseInt(argument1, 10)));
+					code.Push(when);
+				}
+				else {
+					var min = block.getFieldValue("RANGE_MIN" + n);
+					var max = block.getFieldValue("RANGE_MAX" + n);
+					if ((min != null) && (max != null)) {
+						var when = new case_node.when_t() { body = branch };
+						when.value.Push(new dot2_node(this,
+							new int_node(this, min == null ? 0 : Bridge.Script.ParseInt(min, 10)),
+							new int_node(this, max == null ? 0 : Bridge.Script.ParseInt(max, 10))));
+						code.Push(when);
+					}
+				}
+			}
+			if (block.defaultCount_ != 0) {
+				var branch = statementToCode(block, "DEFAULT_DO");
+				if (branch != null) {
+					var when = new case_node.when_t() { body = branch };
+					code.Push(when);
+				}
+			}
+			return new case_node(this, argument0, code);
+		}
+
+		public node switch_case_text(SwitchCaseTextBlock block)
+		{
+			// case/when/else condition.
+			var argument0 = valueToCode(block, "SWITCH");
+			if (argument0 == null) argument0 = new str_node(this, "");
+			case_node.when_t[] code = new case_node.when_t[0];
+			for (int n = 0; n <= block.cases_.Length; n++) {
+				var branch = statementToCode(block, "DO" + n);
+				var argument1 = block.getFieldValue("CONST" + n);
+				if (argument1 != null) {
+					var when = new case_node.when_t() { body = branch };
+					when.value.Push(new str_node(this, argument1));
+					code.Push(when);
+				}
+				else {
+					var min = block.getFieldValue("RANGE_MIN" + n);
+					var max = block.getFieldValue("RANGE_MAX" + n);
+					if ((min != null) && (max != null)) {
+						var when = new case_node.when_t() { body = branch };
+						when.value.Push(new dot2_node(this, new str_node(this, min), new str_node(this, max)));
+						code.Push(when);
+					}
+				}
+			}
+			if (block.defaultCount_ != 0) {
+				var branch = statementToCode(block, "DEFAULT_DO");
+				if (branch != null) {
+					var when = new case_node.when_t() { body = branch };
+					code.Push(when);
+				}
+			}
+			return new case_node(this, argument0, code);
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Variables.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Variables.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Variables.cs	(revision 270)
@@ -0,0 +1,312 @@
+/**
+ * @license
+ * Visual Blocks Editor
+ *
+ * Copyright 2012 Google Inc.
+ * https://developers.google.com/blockly/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview Utility functions for handling variables.
+ * @author fraser@google.com (Neil Fraser)
+ */
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+using Bridge;
+using Bridge.Html5;
+using Bridge.Text.RegularExpressions;
+using WebMrbc;
+
+namespace WebMrbc
+{
+	public class Variables
+	{
+		/// <summary>
+		/// Category to separate variable names from procedures and generated functions.
+		/// </summary>
+		public string NAME_TYPE = "VARIABLE";
+
+		/// <summary>
+		/// Common HSV hue for all blocks in this category.
+		/// </summary>
+		public int HUE = 330;
+
+		/// <summary>
+		/// Find all user-created variables that are in use in the workspace.
+		/// For use by generators.
+		/// </summary>
+		/// <param name="root">Root block or workspace.</param>
+		/// <returns>Array of variable names.</returns>
+		public string[] allUsedVariables(Union<Block, Workspace> root)
+		{
+			Block[] blocks;
+			if (Script.Write<bool>("root instanceof Blockly.Block")) {
+				// Root is Block.
+				blocks = ((Block)root).getDescendants();
+			}
+			else if (Script.Write<bool>("root instanceof Blockly.Workspace")) {
+				// Root is Workspace.
+				blocks = ((Workspace)root).getAllBlocks();
+			}
+			else {
+				throw new Exception("Not Block or Workspace: " + root);
+			}
+			var variableHash = new Dictionary<string, string>();
+			// Iterate through every block and add each variable to the hash.
+			for (var x = 0; x < blocks.Length; x++) {
+				var blockVariables = blocks[x].getVars();
+				if (blockVariables != null) {
+					for (var y = 0; y < blockVariables.Length; y++) {
+						var varName = blockVariables[y];
+						// Variable name may be null if the block is only half-built.
+						if (varName != null) {
+							variableHash[varName.ToLower()] = varName;
+						}
+					}
+				}
+			}
+			// Flatten the hash into a list.
+			var variableList = new string[0];
+			foreach (var name in variableHash.Keys) {
+				variableList.Push(variableHash[name]);
+			}
+			return variableList;
+		}
+
+		/// <summary>
+		/// Find all variables that the user has created through the workspace or
+		/// toolbox.  For use by generators.
+		/// </summary>
+		/// <param name="root">The workspace to inspect.</param>
+		/// <returns>Array of variable names.</returns>
+		public string[] allVariables(Workspace root)
+		{
+			if (Script.Write<bool>("root instanceof Blockly.Block")) {
+				// Root is Block.
+				App.WriteLine("Deprecated call to Variables.allVariables " +
+							 "with a block instead of a workspace.  You may want " +
+							 "Variables.allUsedVariables");
+			}
+			return root.variableList;
+		}
+
+		/// <summary>
+		/// Construct the blocks required by the flyout for the variable category.
+		/// </summary>
+		/// <param name="workspace">The workspace contianing variables.</param>
+		/// <returns>Array of XML block elements.</returns>
+		public Element[] flyoutCategory(Workspace workspace)
+		{
+			var variableList = workspace.variableList;
+			Array.Sort(variableList, goog.@string.caseInsensitiveCompare);
+
+			var xmlList = new Element[0];
+			var button = goog.dom.createDom("button");
+			button.SetAttribute("text", Msg.NEW_VARIABLE);
+			button.SetAttribute("callbackKey", "CREATE_VARIABLE");
+
+			Blockly.registerButtonCallback("CREATE_VARIABLE", (btn) => {
+				createVariable(btn.getTargetWorkspace());
+			});
+
+			xmlList.Push(button);
+
+			if (variableList.Length > 0) {
+				if (Script.Get(Blockly.Blocks, "variables_set") != null) {
+					// <block type="variables_set" gap="20">
+					//   <field name="VAR">item</field>
+					// </block>
+					var block = goog.dom.createDom("block");
+					block.SetAttribute("type", "variables_set");
+					if (Script.Get(Blockly.Blocks, "math_change") != null) {
+						block.SetAttribute("gap", "8");
+					}
+					else {
+						block.SetAttribute("gap", "24");
+					}
+					var field = goog.dom.createDom("field", null, variableList[0]);
+					field.SetAttribute("name", "VAR");
+					block.AppendChild(field);
+					xmlList.Push(block);
+				}
+				if (Script.Get(Blockly.Blocks, "math_change") != null) {
+					// <block type="math_change">
+					//   <value name="DELTA">
+					//     <shadow type="math_number">
+					//       <field name="NUM">1</field>
+					//     </shadow>
+					//   </value>
+					// </block>
+					var block = goog.dom.createDom("block");
+					block.SetAttribute("type", "math_change");
+					if (Script.Get(Blockly.Blocks, "variables_get") != null) {
+						block.SetAttribute("gap", "20");
+					}
+					var value = goog.dom.createDom("value");
+					value.SetAttribute("name", "DELTA");
+					block.AppendChild(value);
+
+					var field = goog.dom.createDom("field", null, variableList[0]);
+					field.SetAttribute("name", "VAR");
+					block.AppendChild(field);
+
+					var shadowBlock = goog.dom.createDom("shadow");
+					shadowBlock.SetAttribute("type", "math_number");
+					value.AppendChild(shadowBlock);
+
+					var numberField = goog.dom.createDom("field", null, "1");
+					numberField.SetAttribute("name", "NUM");
+					shadowBlock.AppendChild(numberField);
+
+					xmlList.Push(block);
+				}
+
+				for (var i = 0; i < variableList.Length; i++) {
+					if (Script.Get(Blockly.Blocks, "variables_get") != null) {
+						// <block type="variables_get" gap="8">
+						//   <field name="VAR">item</field>
+						// </block>
+						var block = goog.dom.createDom("block");
+						block.SetAttribute("type", "variables_get");
+						if (Script.Get(Blockly.Blocks, "variables_set") != null) {
+							block.SetAttribute("gap", "8");
+						}
+						var field = goog.dom.createDom("field", null, variableList[i]);
+						field.SetAttribute("name", "VAR");
+						block.AppendChild(field);
+						xmlList.Push(block);
+					}
+				}
+			}
+			return xmlList;
+		}
+
+		/// <summary>
+		/// Return a new variable name that is not yet being used. This will try to
+		/// generate single letter variable names in the range 'i' to 'z' to start with.
+		/// If no unique name is located it will try 'i' to 'z', 'a' to 'h',
+		/// then 'i2' to 'z2' etc.  Skip 'l'.
+		/// </summary>
+		/// <param name="workspace">The workspace to be unique in.</param>
+		/// <returns>New variable name.</returns>
+		public string generateUniqueName(Workspace workspace)
+		{
+			var variableList = workspace.variableList;
+			var newName = "";
+			if (variableList.Length != 0) {
+				var nameSuffix = 1;
+				var letters = "ijkmnopqrstuvwxyzabcdefgh";  // No 'l'.
+				var letterIndex = 0;
+				var potName = letters.CharAt(letterIndex);
+				while (String.IsNullOrEmpty(newName)) {
+					var inUse = false;
+					for (var i = 0; i < variableList.Length; i++) {
+						if (variableList[i].ToLower() == potName) {
+							// This potential name is already used.
+							inUse = true;
+							break;
+						}
+					}
+					if (inUse) {
+						// Try the next potential name.
+						letterIndex++;
+						if (letterIndex == letters.Length) {
+							// Reached the end of the character sequence so back to 'i'.
+							// a new suffix.
+							letterIndex = 0;
+							nameSuffix++;
+						}
+						potName = letters.CharAt(letterIndex);
+						if (nameSuffix > 1) {
+							potName += nameSuffix;
+						}
+					}
+					else {
+						// We can use the current potential name.
+						newName = potName;
+					}
+				}
+			}
+			else {
+				newName = "i";
+			}
+			return newName;
+		}
+
+		/// <summary>
+		/// Create a new variable on the given workspace.
+		/// </summary>
+		/// <param name="workspace">The workspace on which to create the variable.</param>
+		/// <param name="opt_callback">A callback. It will
+		/// return an acceptable new variable name, or null if change is to be
+		/// aborted (cancel button), or undefined if an existing variable was chosen.</param>
+		public void createVariable(Workspace workspace, Func<string, object> opt_callback = null)
+		{
+			Action<string> promptAndCheckWithAlert = null;
+			promptAndCheckWithAlert = new Action<string>((defaultName) => {
+				promptName(Msg.NEW_VARIABLE_TITLE, defaultName,
+					(text) => {
+						if (text != null) {
+							if (workspace.variableIndexOf(text) != -1) {
+								Blockly.alert(Msg.VARIABLE_ALREADY_EXISTS.Replace("%1",
+									text.ToLower()),
+									() => {
+										promptAndCheckWithAlert(text);  // Recurse
+									});
+							}
+							else {
+								workspace.createVariable(text);
+								if (opt_callback != null) {
+									opt_callback(text);
+								}
+							}
+						}
+						else {
+							// User canceled prompt without a value.
+							if (opt_callback != null) {
+								opt_callback(null);
+							}
+						}
+					});
+			});
+			promptAndCheckWithAlert("");
+		}
+
+		/// <summary>
+		/// Prompt the user for a new variable name.
+		/// </summary>
+		/// <param name="promptText">The string of the prompt.</param>
+		/// <param name="defaultText">The default value to show in the prompt's field.</param>
+		/// <param name="callback">A callback. It will return the new
+		/// variable name, or null if the user picked something illegal.</param>
+		public void promptName(string promptText, string defaultText, Action<string> callback)
+		{
+			Blockly.prompt(promptText, defaultText, new Action<string>((newVar) => {
+				// Merge runs of whitespace.  Strip leading and trailing whitespace.
+				// Beyond this, all names are legal.
+				if (newVar != null) {
+					newVar = newVar.Replace(new Regex(@"[\s\xa0] +"), " ").Replace(new Regex("^ | $"), "");
+					if (newVar == Msg.RENAME_VARIABLE ||
+						newVar == Msg.NEW_VARIABLE) {
+						// Ok, not ALL names are legal...
+						newVar = null;
+					}
+				}
+				callback(newVar);
+			}));
+		}
+	}
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/Web.Debug.config
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Web.Debug.config	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Web.Debug.config	(revision 270)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- web.config å¤æã®è©³ç´°ã«ã¤ãã¦ã¯ãhttp://go.microsoft.com/fwlink/?LinkId=125889 ãåç
+§ãã¦ãã ããã -->
+
+<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
+  <!--
+    æ¬¡ã®ä¾ã§ã¯ã"MyDB" ã¨ããå¤ãæã¤ "name" å±æ§ã "Match" ã­ã±ã¼ã¿ã¼ã§
+    è¦ã¤ãã£ãå ´åã«ã®ã¿ã"SetAttributes" å¤æã«ãã£ã¦ "connectionString" ã®
+    å¤ã "ReleaseSQLServer" ãä½¿ç¨ããããã«å¤æ´ããã¾ãã
+    
+    <connectionStrings>
+      <add name="MyDB" 
+        connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" 
+        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
+    </connectionStrings>
+  -->
+  <system.web>
+    <!--
+      
+      æ¬¡ã®ä¾ã§ã¯ãweb.config ãã¡ã¤ã«ã® <customErrors> ã»ã¯ã·ã§ã³å
+¨ä½ã 
+      "Replace" å¤æã«ãã£ã¦ç½®ãæãããã¾ãã
+      <system.web> ãã¼ãã«ã¯ customErrors ã»ã¯ã·ã§ã³ã 1 ã¤ãããªãããã
+      "xdt:Locator" å±æ§ãä½¿ç¨ããå¿
+è¦ã¯ããã¾ããã
+      
+      <customErrors defaultRedirect="GenericError.htm"
+        mode="RemoteOnly" xdt:Transform="Replace">
+        <error statusCode="500" redirect="InternalError.htm"/>
+      </customErrors>
+    -->
+  </system.web>
+</configuration>
Index: EcnlProtoTool/trunk/webapp/webmrbc/Web.Release.config
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Web.Release.config	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Web.Release.config	(revision 270)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- web.config å¤æã®è©³ç´°ã«ã¤ãã¦ã¯ãhttp://go.microsoft.com/fwlink/?LinkId=125889 ãåç
+§ãã¦ãã ããã -->
+
+<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
+  <!--
+    æ¬¡ã®ä¾ã§ã¯ã"MyDB" ã¨ããå¤ãæã¤ "name" å±æ§ã "Match" ã­ã±ã¼ã¿ã¼ã§
+    è¦ã¤ãã£ãå ´åã«ã®ã¿ã"SetAttributes" å¤æã«ãã£ã¦ "connectionString" ã®
+    å¤ã "ReleaseSQLServer" ãä½¿ç¨ããããã«å¤æ´ããã¾ãã
+    
+    <connectionStrings>
+      <add name="MyDB" 
+        connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" 
+        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
+    </connectionStrings>
+  -->
+  <system.web>
+    <compilation xdt:Transform="RemoveAttributes(debug)" />
+    <!--
+      
+      æ¬¡ã®ä¾ã§ã¯ãweb.config ãã¡ã¤ã«ã® <customErrors> ã»ã¯ã·ã§ã³å
+¨ä½ã 
+      "Replace" å¤æã«ãã£ã¦ç½®ãæãããã¾ãã
+      <system.web> ãã¼ãã«ã¯ customErrors ã»ã¯ã·ã§ã³ã 1 ã¤ãããªãããã
+      "xdt:Locator" å±æ§ãä½¿ç¨ããå¿
+è¦ã¯ããã¾ããã
+      
+      <customErrors defaultRedirect="GenericError.htm"
+        mode="RemoteOnly" xdt:Transform="Replace">
+        <error statusCode="500" redirect="InternalError.htm"/>
+      </customErrors>
+    -->
+  </system.web>
+</configuration>
Index: EcnlProtoTool/trunk/webapp/webmrbc/Web.config
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/Web.config	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/Web.config	(revision 270)
@@ -0,0 +1,16 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ASP.NET アプリケーションの構成方法の詳細については、
+  http://go.microsoft.com/fwlink/?LinkId=169433 を参照してください
+  -->
+<configuration>
+  <system.web>
+    <compilation debug="true" targetFramework="4.5" />
+    <httpRuntime targetFramework="4.5" />
+  </system.web>
+  <system.webServer>
+    <staticContent>
+      <mimeMap fileExtension=".rb" mimeType="text/plain"/>
+    </staticContent>
+  </system.webServer>
+</configuration>
Index: EcnlProtoTool/trunk/webapp/webmrbc/XTerm.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/XTerm.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/XTerm.cs	(revision 270)
@@ -0,0 +1,46 @@
+﻿using System;
+using Bridge;
+using Bridge.Html5;
+
+[External]
+public class Terminal
+{
+	public Terminal(object setting)
+	{
+		throw new NotImplementedException();
+	}
+
+	internal void on(string v, Action<object> action)
+	{
+		throw new NotImplementedException();
+	}
+
+	internal void on(string v, Action<string> action)
+	{
+		throw new NotImplementedException();
+	}
+
+	internal void open(HTMLElement termElement)
+	{
+		throw new NotImplementedException();
+	}
+
+	internal void write(string v)
+	{
+		throw new NotImplementedException();
+	}
+
+	internal void fit()
+	{
+		throw new NotImplementedException();
+	}
+}
+
+public class TerminalOption
+{
+	internal int cols;
+	internal bool cursorBlink;
+	internal int rows;
+	internal bool screenKeys;
+	internal bool useStyle;
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/ace/ace.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/ace/ace.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/ace/ace.js	(revision 270)
@@ -0,0 +1,18687 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *     * Neither the name of Ajax.org B.V. nor the
+ *       names of its contributors may be used to endorse or promote products
+ *       derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/**
+ * Define a module along with a payload
+ * @param module a name for the payload
+ * @param payload a function to call with (require, exports, module) params
+ */
+
+(function() {
+
+var ACE_NAMESPACE = "";
+
+var global = (function() { return this; })();
+if (!global && typeof window != "undefined") global = window; // strict mode
+
+
+if (!ACE_NAMESPACE && typeof requirejs !== "undefined")
+    return;
+
+
+var define = function(module, deps, payload) {
+    if (typeof module !== "string") {
+        if (define.original)
+            define.original.apply(this, arguments);
+        else {
+            console.error("dropping module because define wasn\'t a string.");
+            console.trace();
+        }
+        return;
+    }
+    if (arguments.length == 2)
+        payload = deps;
+    if (!define.modules[module]) {
+        define.payloads[module] = payload;
+        define.modules[module] = null;
+    }
+};
+
+define.modules = {};
+define.payloads = {};
+
+/**
+ * Get at functionality define()ed using the function above
+ */
+var _require = function(parentId, module, callback) {
+    if (typeof module === "string") {
+        var payload = lookup(parentId, module);
+        if (payload != undefined) {
+            callback && callback();
+            return payload;
+        }
+    } else if (Object.prototype.toString.call(module) === "[object Array]") {
+        var params = [];
+        for (var i = 0, l = module.length; i < l; ++i) {
+            var dep = lookup(parentId, module[i]);
+            if (dep == undefined && require.original)
+                return;
+            params.push(dep);
+        }
+        return callback && callback.apply(null, params) || true;
+    }
+};
+
+var require = function(module, callback) {
+    var packagedModule = _require("", module, callback);
+    if (packagedModule == undefined && require.original)
+        return require.original.apply(this, arguments);
+    return packagedModule;
+};
+
+var normalizeModule = function(parentId, moduleName) {
+    // normalize plugin requires
+    if (moduleName.indexOf("!") !== -1) {
+        var chunks = moduleName.split("!");
+        return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]);
+    }
+    // normalize relative requires
+    if (moduleName.charAt(0) == ".") {
+        var base = parentId.split("/").slice(0, -1).join("/");
+        moduleName = base + "/" + moduleName;
+
+        while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
+            var previous = moduleName;
+            moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+        }
+    }
+    return moduleName;
+};
+
+/**
+ * Internal function to lookup moduleNames and resolve them by calling the
+ * definition function if needed.
+ */
+var lookup = function(parentId, moduleName) {
+    moduleName = normalizeModule(parentId, moduleName);
+
+    var module = define.modules[moduleName];
+    if (!module) {
+        module = define.payloads[moduleName];
+        if (typeof module === 'function') {
+            var exports = {};
+            var mod = {
+                id: moduleName,
+                uri: '',
+                exports: exports,
+                packaged: true
+            };
+
+            var req = function(module, callback) {
+                return _require(moduleName, module, callback);
+            };
+
+            var returnValue = module(req, exports, mod);
+            exports = returnValue || mod.exports;
+            define.modules[moduleName] = exports;
+            delete define.payloads[moduleName];
+        }
+        module = define.modules[moduleName] = exports || module;
+    }
+    return module;
+};
+
+function exportAce(ns) {
+    var root = global;
+    if (ns) {
+        if (!global[ns])
+            global[ns] = {};
+        root = global[ns];
+    }
+
+    if (!root.define || !root.define.packaged) {
+        define.original = root.define;
+        root.define = define;
+        root.define.packaged = true;
+    }
+
+    if (!root.require || !root.require.packaged) {
+        require.original = root.require;
+        root.require = require;
+        root.require.packaged = true;
+    }
+}
+
+exportAce(ACE_NAMESPACE);
+
+})();
+
+define("ace/lib/regexp",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+    var real = {
+            exec: RegExp.prototype.exec,
+            test: RegExp.prototype.test,
+            match: String.prototype.match,
+            replace: String.prototype.replace,
+            split: String.prototype.split
+        },
+        compliantExecNpcg = real.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups
+        compliantLastIndexIncrement = function () {
+            var x = /^/g;
+            real.test.call(x, "");
+            return !x.lastIndex;
+        }();
+
+    if (compliantLastIndexIncrement && compliantExecNpcg)
+        return;
+    RegExp.prototype.exec = function (str) {
+        var match = real.exec.apply(this, arguments),
+            name, r2;
+        if ( typeof(str) == 'string' && match) {
+            if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) {
+                r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), "g", ""));
+                real.replace.call(str.slice(match.index), r2, function () {
+                    for (var i = 1; i < arguments.length - 2; i++) {
+                        if (arguments[i] === undefined)
+                            match[i] = undefined;
+                    }
+                });
+            }
+            if (this._xregexp && this._xregexp.captureNames) {
+                for (var i = 1; i < match.length; i++) {
+                    name = this._xregexp.captureNames[i - 1];
+                    if (name)
+                       match[name] = match[i];
+                }
+            }
+            if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index))
+                this.lastIndex--;
+        }
+        return match;
+    };
+    if (!compliantLastIndexIncrement) {
+        RegExp.prototype.test = function (str) {
+            var match = real.exec.call(this, str);
+            if (match && this.global && !match[0].length && (this.lastIndex > match.index))
+                this.lastIndex--;
+            return !!match;
+        };
+    }
+
+    function getNativeFlags (regex) {
+        return (regex.global     ? "g" : "") +
+               (regex.ignoreCase ? "i" : "") +
+               (regex.multiline  ? "m" : "") +
+               (regex.extended   ? "x" : "") + // Proposed for ES4; included in AS3
+               (regex.sticky     ? "y" : "");
+    }
+
+    function indexOf (array, item, from) {
+        if (Array.prototype.indexOf) // Use the native array method if available
+            return array.indexOf(item, from);
+        for (var i = from || 0; i < array.length; i++) {
+            if (array[i] === item)
+                return i;
+        }
+        return -1;
+    }
+
+});
+
+define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+    Function.prototype.bind = function bind(that) { // .length is 1
+        var target = this;
+        if (typeof target != "function") {
+            throw new TypeError("Function.prototype.bind called on incompatible " + target);
+        }
+        var args = slice.call(arguments, 1); // for normal call
+        var bound = function () {
+
+            if (this instanceof bound) {
+
+                var result = target.apply(
+                    this,
+                    args.concat(slice.call(arguments))
+                );
+                if (Object(result) === result) {
+                    return result;
+                }
+                return this;
+
+            } else {
+                return target.apply(
+                    that,
+                    args.concat(slice.call(arguments))
+                );
+
+            }
+
+        };
+        if(target.prototype) {
+            Empty.prototype = target.prototype;
+            bound.prototype = new Empty();
+            Empty.prototype = null;
+        }
+        return bound;
+    };
+}
+var call = Function.prototype.call;
+var prototypeOfArray = Array.prototype;
+var prototypeOfObject = Object.prototype;
+var slice = prototypeOfArray.slice;
+var _toString = call.bind(prototypeOfObject.toString);
+var owns = call.bind(prototypeOfObject.hasOwnProperty);
+var defineGetter;
+var defineSetter;
+var lookupGetter;
+var lookupSetter;
+var supportsAccessors;
+if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
+    defineGetter = call.bind(prototypeOfObject.__defineGetter__);
+    defineSetter = call.bind(prototypeOfObject.__defineSetter__);
+    lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
+    lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
+}
+if ([1,2].splice(0).length != 2) {
+    if(function() { // test IE < 9 to splice bug - see issue #138
+        function makeArray(l) {
+            var a = new Array(l+2);
+            a[0] = a[1] = 0;
+            return a;
+        }
+        var array = [], lengthBefore;
+        
+        array.splice.apply(array, makeArray(20));
+        array.splice.apply(array, makeArray(26));
+
+        lengthBefore = array.length; //46
+        array.splice(5, 0, "XXX"); // add one element
+
+        lengthBefore + 1 == array.length
+
+        if (lengthBefore + 1 == array.length) {
+            return true;// has right splice implementation without bugs
+        }
+    }()) {//IE 6/7
+        var array_splice = Array.prototype.splice;
+        Array.prototype.splice = function(start, deleteCount) {
+            if (!arguments.length) {
+                return [];
+            } else {
+                return array_splice.apply(this, [
+                    start === void 0 ? 0 : start,
+                    deleteCount === void 0 ? (this.length - start) : deleteCount
+                ].concat(slice.call(arguments, 2)))
+            }
+        };
+    } else {//IE8
+        Array.prototype.splice = function(pos, removeCount){
+            var length = this.length;
+            if (pos > 0) {
+                if (pos > length)
+                    pos = length;
+            } else if (pos == void 0) {
+                pos = 0;
+            } else if (pos < 0) {
+                pos = Math.max(length + pos, 0);
+            }
+
+            if (!(pos+removeCount < length))
+                removeCount = length - pos;
+
+            var removed = this.slice(pos, pos+removeCount);
+            var insert = slice.call(arguments, 2);
+            var add = insert.length;            
+            if (pos === length) {
+                if (add) {
+                    this.push.apply(this, insert);
+                }
+            } else {
+                var remove = Math.min(removeCount, length - pos);
+                var tailOldPos = pos + remove;
+                var tailNewPos = tailOldPos + add - remove;
+                var tailCount = length - tailOldPos;
+                var lengthAfterRemove = length - remove;
+
+                if (tailNewPos < tailOldPos) { // case A
+                    for (var i = 0; i < tailCount; ++i) {
+                        this[tailNewPos+i] = this[tailOldPos+i];
+                    }
+                } else if (tailNewPos > tailOldPos) { // case B
+                    for (i = tailCount; i--; ) {
+                        this[tailNewPos+i] = this[tailOldPos+i];
+                    }
+                } // else, add == remove (nothing to do)
+
+                if (add && pos === lengthAfterRemove) {
+                    this.length = lengthAfterRemove; // truncate array
+                    this.push.apply(this, insert);
+                } else {
+                    this.length = lengthAfterRemove + add; // reserves space
+                    for (i = 0; i < add; ++i) {
+                        this[pos+i] = insert[i];
+                    }
+                }
+            }
+            return removed;
+        };
+    }
+}
+if (!Array.isArray) {
+    Array.isArray = function isArray(obj) {
+        return _toString(obj) == "[object Array]";
+    };
+}
+var boxedString = Object("a"),
+    splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+    Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                object,
+            thisp = arguments[1],
+            i = -1,
+            length = self.length >>> 0;
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(); // TODO message
+        }
+
+        while (++i < length) {
+            if (i in self) {
+                fun.call(thisp, self[i], i, object);
+            }
+        }
+    };
+}
+if (!Array.prototype.map) {
+    Array.prototype.map = function map(fun /*, thisp*/) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                object,
+            length = self.length >>> 0,
+            result = Array(length),
+            thisp = arguments[1];
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(fun + " is not a function");
+        }
+
+        for (var i = 0; i < length; i++) {
+            if (i in self)
+                result[i] = fun.call(thisp, self[i], i, object);
+        }
+        return result;
+    };
+}
+if (!Array.prototype.filter) {
+    Array.prototype.filter = function filter(fun /*, thisp */) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                    object,
+            length = self.length >>> 0,
+            result = [],
+            value,
+            thisp = arguments[1];
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(fun + " is not a function");
+        }
+
+        for (var i = 0; i < length; i++) {
+            if (i in self) {
+                value = self[i];
+                if (fun.call(thisp, value, i, object)) {
+                    result.push(value);
+                }
+            }
+        }
+        return result;
+    };
+}
+if (!Array.prototype.every) {
+    Array.prototype.every = function every(fun /*, thisp */) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                object,
+            length = self.length >>> 0,
+            thisp = arguments[1];
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(fun + " is not a function");
+        }
+
+        for (var i = 0; i < length; i++) {
+            if (i in self && !fun.call(thisp, self[i], i, object)) {
+                return false;
+            }
+        }
+        return true;
+    };
+}
+if (!Array.prototype.some) {
+    Array.prototype.some = function some(fun /*, thisp */) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                object,
+            length = self.length >>> 0,
+            thisp = arguments[1];
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(fun + " is not a function");
+        }
+
+        for (var i = 0; i < length; i++) {
+            if (i in self && fun.call(thisp, self[i], i, object)) {
+                return true;
+            }
+        }
+        return false;
+    };
+}
+if (!Array.prototype.reduce) {
+    Array.prototype.reduce = function reduce(fun /*, initial*/) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                object,
+            length = self.length >>> 0;
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(fun + " is not a function");
+        }
+        if (!length && arguments.length == 1) {
+            throw new TypeError("reduce of empty array with no initial value");
+        }
+
+        var i = 0;
+        var result;
+        if (arguments.length >= 2) {
+            result = arguments[1];
+        } else {
+            do {
+                if (i in self) {
+                    result = self[i++];
+                    break;
+                }
+                if (++i >= length) {
+                    throw new TypeError("reduce of empty array with no initial value");
+                }
+            } while (true);
+        }
+
+        for (; i < length; i++) {
+            if (i in self) {
+                result = fun.call(void 0, result, self[i], i, object);
+            }
+        }
+
+        return result;
+    };
+}
+if (!Array.prototype.reduceRight) {
+    Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+        var object = toObject(this),
+            self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                object,
+            length = self.length >>> 0;
+        if (_toString(fun) != "[object Function]") {
+            throw new TypeError(fun + " is not a function");
+        }
+        if (!length && arguments.length == 1) {
+            throw new TypeError("reduceRight of empty array with no initial value");
+        }
+
+        var result, i = length - 1;
+        if (arguments.length >= 2) {
+            result = arguments[1];
+        } else {
+            do {
+                if (i in self) {
+                    result = self[i--];
+                    break;
+                }
+                if (--i < 0) {
+                    throw new TypeError("reduceRight of empty array with no initial value");
+                }
+            } while (true);
+        }
+
+        do {
+            if (i in this) {
+                result = fun.call(void 0, result, self[i], i, object);
+            }
+        } while (i--);
+
+        return result;
+    };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+    Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+        var self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                toObject(this),
+            length = self.length >>> 0;
+
+        if (!length) {
+            return -1;
+        }
+
+        var i = 0;
+        if (arguments.length > 1) {
+            i = toInteger(arguments[1]);
+        }
+        i = i >= 0 ? i : Math.max(0, length + i);
+        for (; i < length; i++) {
+            if (i in self && self[i] === sought) {
+                return i;
+            }
+        }
+        return -1;
+    };
+}
+if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
+    Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+        var self = splitString && _toString(this) == "[object String]" ?
+                this.split("") :
+                toObject(this),
+            length = self.length >>> 0;
+
+        if (!length) {
+            return -1;
+        }
+        var i = length - 1;
+        if (arguments.length > 1) {
+            i = Math.min(i, toInteger(arguments[1]));
+        }
+        i = i >= 0 ? i : length - Math.abs(i);
+        for (; i >= 0; i--) {
+            if (i in self && sought === self[i]) {
+                return i;
+            }
+        }
+        return -1;
+    };
+}
+if (!Object.getPrototypeOf) {
+    Object.getPrototypeOf = function getPrototypeOf(object) {
+        return object.__proto__ || (
+            object.constructor ?
+            object.constructor.prototype :
+            prototypeOfObject
+        );
+    };
+}
+if (!Object.getOwnPropertyDescriptor) {
+    var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
+                         "non-object: ";
+    Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
+        if ((typeof object != "object" && typeof object != "function") || object === null)
+            throw new TypeError(ERR_NON_OBJECT + object);
+        if (!owns(object, property))
+            return;
+
+        var descriptor, getter, setter;
+        descriptor =  { enumerable: true, configurable: true };
+        if (supportsAccessors) {
+            var prototype = object.__proto__;
+            object.__proto__ = prototypeOfObject;
+
+            var getter = lookupGetter(object, property);
+            var setter = lookupSetter(object, property);
+            object.__proto__ = prototype;
+
+            if (getter || setter) {
+                if (getter) descriptor.get = getter;
+                if (setter) descriptor.set = setter;
+                return descriptor;
+            }
+        }
+        descriptor.value = object[property];
+        return descriptor;
+    };
+}
+if (!Object.getOwnPropertyNames) {
+    Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
+        return Object.keys(object);
+    };
+}
+if (!Object.create) {
+    var createEmpty;
+    if (Object.prototype.__proto__ === null) {
+        createEmpty = function () {
+            return { "__proto__": null };
+        };
+    } else {
+        createEmpty = function () {
+            var empty = {};
+            for (var i in empty)
+                empty[i] = null;
+            empty.constructor =
+            empty.hasOwnProperty =
+            empty.propertyIsEnumerable =
+            empty.isPrototypeOf =
+            empty.toLocaleString =
+            empty.toString =
+            empty.valueOf =
+            empty.__proto__ = null;
+            return empty;
+        }
+    }
+
+    Object.create = function create(prototype, properties) {
+        var object;
+        if (prototype === null) {
+            object = createEmpty();
+        } else {
+            if (typeof prototype != "object")
+                throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
+            var Type = function () {};
+            Type.prototype = prototype;
+            object = new Type();
+            object.__proto__ = prototype;
+        }
+        if (properties !== void 0)
+            Object.defineProperties(object, properties);
+        return object;
+    };
+}
+
+function doesDefinePropertyWork(object) {
+    try {
+        Object.defineProperty(object, "sentinel", {});
+        return "sentinel" in object;
+    } catch (exception) {
+    }
+}
+if (Object.defineProperty) {
+    var definePropertyWorksOnObject = doesDefinePropertyWork({});
+    var definePropertyWorksOnDom = typeof document == "undefined" ||
+        doesDefinePropertyWork(document.createElement("div"));
+    if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
+        var definePropertyFallback = Object.defineProperty;
+    }
+}
+
+if (!Object.defineProperty || definePropertyFallback) {
+    var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
+    var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
+    var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
+                                      "on this javascript engine";
+
+    Object.defineProperty = function defineProperty(object, property, descriptor) {
+        if ((typeof object != "object" && typeof object != "function") || object === null)
+            throw new TypeError(ERR_NON_OBJECT_TARGET + object);
+        if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
+            throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
+        if (definePropertyFallback) {
+            try {
+                return definePropertyFallback.call(Object, object, property, descriptor);
+            } catch (exception) {
+            }
+        }
+        if (owns(descriptor, "value")) {
+
+            if (supportsAccessors && (lookupGetter(object, property) ||
+                                      lookupSetter(object, property)))
+            {
+                var prototype = object.__proto__;
+                object.__proto__ = prototypeOfObject;
+                delete object[property];
+                object[property] = descriptor.value;
+                object.__proto__ = prototype;
+            } else {
+                object[property] = descriptor.value;
+            }
+        } else {
+            if (!supportsAccessors)
+                throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
+            if (owns(descriptor, "get"))
+                defineGetter(object, property, descriptor.get);
+            if (owns(descriptor, "set"))
+                defineSetter(object, property, descriptor.set);
+        }
+
+        return object;
+    };
+}
+if (!Object.defineProperties) {
+    Object.defineProperties = function defineProperties(object, properties) {
+        for (var property in properties) {
+            if (owns(properties, property))
+                Object.defineProperty(object, property, properties[property]);
+        }
+        return object;
+    };
+}
+if (!Object.seal) {
+    Object.seal = function seal(object) {
+        return object;
+    };
+}
+if (!Object.freeze) {
+    Object.freeze = function freeze(object) {
+        return object;
+    };
+}
+try {
+    Object.freeze(function () {});
+} catch (exception) {
+    Object.freeze = (function freeze(freezeObject) {
+        return function freeze(object) {
+            if (typeof object == "function") {
+                return object;
+            } else {
+                return freezeObject(object);
+            }
+        };
+    })(Object.freeze);
+}
+if (!Object.preventExtensions) {
+    Object.preventExtensions = function preventExtensions(object) {
+        return object;
+    };
+}
+if (!Object.isSealed) {
+    Object.isSealed = function isSealed(object) {
+        return false;
+    };
+}
+if (!Object.isFrozen) {
+    Object.isFrozen = function isFrozen(object) {
+        return false;
+    };
+}
+if (!Object.isExtensible) {
+    Object.isExtensible = function isExtensible(object) {
+        if (Object(object) === object) {
+            throw new TypeError(); // TODO message
+        }
+        var name = '';
+        while (owns(object, name)) {
+            name += '?';
+        }
+        object[name] = true;
+        var returnValue = owns(object, name);
+        delete object[name];
+        return returnValue;
+    };
+}
+if (!Object.keys) {
+    var hasDontEnumBug = true,
+        dontEnums = [
+            "toString",
+            "toLocaleString",
+            "valueOf",
+            "hasOwnProperty",
+            "isPrototypeOf",
+            "propertyIsEnumerable",
+            "constructor"
+        ],
+        dontEnumsLength = dontEnums.length;
+
+    for (var key in {"toString": null}) {
+        hasDontEnumBug = false;
+    }
+
+    Object.keys = function keys(object) {
+
+        if (
+            (typeof object != "object" && typeof object != "function") ||
+            object === null
+        ) {
+            throw new TypeError("Object.keys called on a non-object");
+        }
+
+        var keys = [];
+        for (var name in object) {
+            if (owns(object, name)) {
+                keys.push(name);
+            }
+        }
+
+        if (hasDontEnumBug) {
+            for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
+                var dontEnum = dontEnums[i];
+                if (owns(object, dontEnum)) {
+                    keys.push(dontEnum);
+                }
+            }
+        }
+        return keys;
+    };
+
+}
+if (!Date.now) {
+    Date.now = function now() {
+        return new Date().getTime();
+    };
+}
+var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
+    "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
+    "\u2029\uFEFF";
+if (!String.prototype.trim || ws.trim()) {
+    ws = "[" + ws + "]";
+    var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
+        trimEndRegexp = new RegExp(ws + ws + "*$");
+    String.prototype.trim = function trim() {
+        return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+    };
+}
+
+function toInteger(n) {
+    n = +n;
+    if (n !== n) { // isNaN
+        n = 0;
+    } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
+        n = (n > 0 || -1) * Math.floor(Math.abs(n));
+    }
+    return n;
+}
+
+function isPrimitive(input) {
+    var type = typeof input;
+    return (
+        input === null ||
+        type === "undefined" ||
+        type === "boolean" ||
+        type === "number" ||
+        type === "string"
+    );
+}
+
+function toPrimitive(input) {
+    var val, valueOf, toString;
+    if (isPrimitive(input)) {
+        return input;
+    }
+    valueOf = input.valueOf;
+    if (typeof valueOf === "function") {
+        val = valueOf.call(input);
+        if (isPrimitive(val)) {
+            return val;
+        }
+    }
+    toString = input.toString;
+    if (typeof toString === "function") {
+        val = toString.call(input);
+        if (isPrimitive(val)) {
+            return val;
+        }
+    }
+    throw new TypeError();
+}
+var toObject = function (o) {
+    if (o == null) { // this matches both null and undefined
+        throw new TypeError("can't convert "+o+" to object");
+    }
+    return Object(o);
+};
+
+});
+
+define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"], function(require, exports, module) {
+"use strict";
+
+require("./regexp");
+require("./es5-shim");
+
+});
+
+define("ace/lib/dom",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var XHTML_NS = "http://www.w3.org/1999/xhtml";
+
+exports.getDocumentHead = function(doc) {
+    if (!doc)
+        doc = document;
+    return doc.head || doc.getElementsByTagName("head")[0] || doc.documentElement;
+};
+
+exports.createElement = function(tag, ns) {
+    return document.createElementNS ?
+           document.createElementNS(ns || XHTML_NS, tag) :
+           document.createElement(tag);
+};
+
+exports.hasCssClass = function(el, name) {
+    var classes = (el.className || "").split(/\s+/g);
+    return classes.indexOf(name) !== -1;
+};
+exports.addCssClass = function(el, name) {
+    if (!exports.hasCssClass(el, name)) {
+        el.className += " " + name;
+    }
+};
+exports.removeCssClass = function(el, name) {
+    var classes = el.className.split(/\s+/g);
+    while (true) {
+        var index = classes.indexOf(name);
+        if (index == -1) {
+            break;
+        }
+        classes.splice(index, 1);
+    }
+    el.className = classes.join(" ");
+};
+
+exports.toggleCssClass = function(el, name) {
+    var classes = el.className.split(/\s+/g), add = true;
+    while (true) {
+        var index = classes.indexOf(name);
+        if (index == -1) {
+            break;
+        }
+        add = false;
+        classes.splice(index, 1);
+    }
+    if (add)
+        classes.push(name);
+
+    el.className = classes.join(" ");
+    return add;
+};
+exports.setCssClass = function(node, className, include) {
+    if (include) {
+        exports.addCssClass(node, className);
+    } else {
+        exports.removeCssClass(node, className);
+    }
+};
+
+exports.hasCssString = function(id, doc) {
+    var index = 0, sheets;
+    doc = doc || document;
+
+    if (doc.createStyleSheet && (sheets = doc.styleSheets)) {
+        while (index < sheets.length)
+            if (sheets[index++].owningElement.id === id) return true;
+    } else if ((sheets = doc.getElementsByTagName("style"))) {
+        while (index < sheets.length)
+            if (sheets[index++].id === id) return true;
+    }
+
+    return false;
+};
+
+exports.importCssString = function importCssString(cssText, id, doc) {
+    doc = doc || document;
+    if (id && exports.hasCssString(id, doc))
+        return null;
+    
+    var style;
+    
+    if (id)
+        cssText += "\n/*# sourceURL=ace/css/" + id + " */";
+    
+    if (doc.createStyleSheet) {
+        style = doc.createStyleSheet();
+        style.cssText = cssText;
+        if (id)
+            style.owningElement.id = id;
+    } else {
+        style = exports.createElement("style");
+        style.appendChild(doc.createTextNode(cssText));
+        if (id)
+            style.id = id;
+
+        exports.getDocumentHead(doc).appendChild(style);
+    }
+};
+
+exports.importCssStylsheet = function(uri, doc) {
+    if (doc.createStyleSheet) {
+        doc.createStyleSheet(uri);
+    } else {
+        var link = exports.createElement('link');
+        link.rel = 'stylesheet';
+        link.href = uri;
+
+        exports.getDocumentHead(doc).appendChild(link);
+    }
+};
+
+exports.getInnerWidth = function(element) {
+    return (
+        parseInt(exports.computedStyle(element, "paddingLeft"), 10) +
+        parseInt(exports.computedStyle(element, "paddingRight"), 10) + 
+        element.clientWidth
+    );
+};
+
+exports.getInnerHeight = function(element) {
+    return (
+        parseInt(exports.computedStyle(element, "paddingTop"), 10) +
+        parseInt(exports.computedStyle(element, "paddingBottom"), 10) +
+        element.clientHeight
+    );
+};
+
+exports.scrollbarWidth = function(document) {
+    var inner = exports.createElement("ace_inner");
+    inner.style.width = "100%";
+    inner.style.minWidth = "0px";
+    inner.style.height = "200px";
+    inner.style.display = "block";
+
+    var outer = exports.createElement("ace_outer");
+    var style = outer.style;
+
+    style.position = "absolute";
+    style.left = "-10000px";
+    style.overflow = "hidden";
+    style.width = "200px";
+    style.minWidth = "0px";
+    style.height = "150px";
+    style.display = "block";
+
+    outer.appendChild(inner);
+
+    var body = document.documentElement;
+    body.appendChild(outer);
+
+    var noScrollbar = inner.offsetWidth;
+
+    style.overflow = "scroll";
+    var withScrollbar = inner.offsetWidth;
+
+    if (noScrollbar == withScrollbar) {
+        withScrollbar = outer.clientWidth;
+    }
+
+    body.removeChild(outer);
+
+    return noScrollbar-withScrollbar;
+};
+
+if (typeof document == "undefined") {
+    exports.importCssString = function() {};
+    return;
+}
+
+if (window.pageYOffset !== undefined) {
+    exports.getPageScrollTop = function() {
+        return window.pageYOffset;
+    };
+
+    exports.getPageScrollLeft = function() {
+        return window.pageXOffset;
+    };
+}
+else {
+    exports.getPageScrollTop = function() {
+        return document.body.scrollTop;
+    };
+
+    exports.getPageScrollLeft = function() {
+        return document.body.scrollLeft;
+    };
+}
+
+if (window.getComputedStyle)
+    exports.computedStyle = function(element, style) {
+        if (style)
+            return (window.getComputedStyle(element, "") || {})[style] || "";
+        return window.getComputedStyle(element, "") || {};
+    };
+else
+    exports.computedStyle = function(element, style) {
+        if (style)
+            return element.currentStyle[style];
+        return element.currentStyle;
+    };
+exports.setInnerHtml = function(el, innerHtml) {
+    var element = el.cloneNode(false);//document.createElement("div");
+    element.innerHTML = innerHtml;
+    el.parentNode.replaceChild(element, el);
+    return element;
+};
+
+if ("textContent" in document.documentElement) {
+    exports.setInnerText = function(el, innerText) {
+        el.textContent = innerText;
+    };
+
+    exports.getInnerText = function(el) {
+        return el.textContent;
+    };
+}
+else {
+    exports.setInnerText = function(el, innerText) {
+        el.innerText = innerText;
+    };
+
+    exports.getInnerText = function(el) {
+        return el.innerText;
+    };
+}
+
+exports.getParentWindow = function(document) {
+    return document.defaultView || document.parentWindow;
+};
+
+});
+
+define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.inherits = function(ctor, superCtor) {
+    ctor.super_ = superCtor;
+    ctor.prototype = Object.create(superCtor.prototype, {
+        constructor: {
+            value: ctor,
+            enumerable: false,
+            writable: true,
+            configurable: true
+        }
+    });
+};
+
+exports.mixin = function(obj, mixin) {
+    for (var key in mixin) {
+        obj[key] = mixin[key];
+    }
+    return obj;
+};
+
+exports.implement = function(proto, mixin) {
+    exports.mixin(proto, mixin);
+};
+
+});
+
+define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"], function(require, exports, module) {
+"use strict";
+
+require("./fixoldbrowsers");
+
+var oop = require("./oop");
+var Keys = (function() {
+    var ret = {
+        MODIFIER_KEYS: {
+            16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta'
+        },
+
+        KEY_MODS: {
+            "ctrl": 1, "alt": 2, "option" : 2, "shift": 4,
+            "super": 8, "meta": 8, "command": 8, "cmd": 8
+        },
+
+        FUNCTION_KEYS : {
+            8  : "Backspace",
+            9  : "Tab",
+            13 : "Return",
+            19 : "Pause",
+            27 : "Esc",
+            32 : "Space",
+            33 : "PageUp",
+            34 : "PageDown",
+            35 : "End",
+            36 : "Home",
+            37 : "Left",
+            38 : "Up",
+            39 : "Right",
+            40 : "Down",
+            44 : "Print",
+            45 : "Insert",
+            46 : "Delete",
+            96 : "Numpad0",
+            97 : "Numpad1",
+            98 : "Numpad2",
+            99 : "Numpad3",
+            100: "Numpad4",
+            101: "Numpad5",
+            102: "Numpad6",
+            103: "Numpad7",
+            104: "Numpad8",
+            105: "Numpad9",
+            '-13': "NumpadEnter",
+            112: "F1",
+            113: "F2",
+            114: "F3",
+            115: "F4",
+            116: "F5",
+            117: "F6",
+            118: "F7",
+            119: "F8",
+            120: "F9",
+            121: "F10",
+            122: "F11",
+            123: "F12",
+            144: "Numlock",
+            145: "Scrolllock"
+        },
+
+        PRINTABLE_KEYS: {
+           32: ' ',  48: '0',  49: '1',  50: '2',  51: '3',  52: '4', 53:  '5',
+           54: '6',  55: '7',  56: '8',  57: '9',  59: ';',  61: '=', 65:  'a',
+           66: 'b',  67: 'c',  68: 'd',  69: 'e',  70: 'f',  71: 'g', 72:  'h',
+           73: 'i',  74: 'j',  75: 'k',  76: 'l',  77: 'm',  78: 'n', 79:  'o',
+           80: 'p',  81: 'q',  82: 'r',  83: 's',  84: 't',  85: 'u', 86:  'v',
+           87: 'w',  88: 'x',  89: 'y',  90: 'z', 107: '+', 109: '-', 110: '.',
+          186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`',
+          219: '[', 220: '\\',221: ']', 222: "'", 111: '/', 106: '*'
+        }
+    };
+    var name, i;
+    for (i in ret.FUNCTION_KEYS) {
+        name = ret.FUNCTION_KEYS[i].toLowerCase();
+        ret[name] = parseInt(i, 10);
+    }
+    for (i in ret.PRINTABLE_KEYS) {
+        name = ret.PRINTABLE_KEYS[i].toLowerCase();
+        ret[name] = parseInt(i, 10);
+    }
+    oop.mixin(ret, ret.MODIFIER_KEYS);
+    oop.mixin(ret, ret.PRINTABLE_KEYS);
+    oop.mixin(ret, ret.FUNCTION_KEYS);
+    ret.enter = ret["return"];
+    ret.escape = ret.esc;
+    ret.del = ret["delete"];
+    ret[173] = '-';
+    
+    (function() {
+        var mods = ["cmd", "ctrl", "alt", "shift"];
+        for (var i = Math.pow(2, mods.length); i--;) {            
+            ret.KEY_MODS[i] = mods.filter(function(x) {
+                return i & ret.KEY_MODS[x];
+            }).join("-") + "-";
+        }
+    })();
+
+    ret.KEY_MODS[0] = "";
+    ret.KEY_MODS[-1] = "input-";
+
+    return ret;
+})();
+oop.mixin(exports, Keys);
+
+exports.keyCodeToString = function(keyCode) {
+    var keyString = Keys[keyCode];
+    if (typeof keyString != "string")
+        keyString = String.fromCharCode(keyCode);
+    return keyString.toLowerCase();
+};
+
+});
+
+define("ace/lib/useragent",["require","exports","module"], function(require, exports, module) {
+"use strict";
+exports.OS = {
+    LINUX: "LINUX",
+    MAC: "MAC",
+    WINDOWS: "WINDOWS"
+};
+exports.getOS = function() {
+    if (exports.isMac) {
+        return exports.OS.MAC;
+    } else if (exports.isLinux) {
+        return exports.OS.LINUX;
+    } else {
+        return exports.OS.WINDOWS;
+    }
+};
+if (typeof navigator != "object")
+    return;
+
+var os = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase();
+var ua = navigator.userAgent;
+exports.isWin = (os == "win");
+exports.isMac = (os == "mac");
+exports.isLinux = (os == "linux");
+exports.isIE = 
+    (navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0)
+    ? parseFloat((ua.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1])
+    : parseFloat((ua.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]); // for ie
+    
+exports.isOldIE = exports.isIE && exports.isIE < 9;
+exports.isGecko = exports.isMozilla = (window.Controllers || window.controllers) && window.navigator.product === "Gecko";
+exports.isOldGecko = exports.isGecko && parseInt((ua.match(/rv\:(\d+)/)||[])[1], 10) < 4;
+exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]";
+exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined;
+
+exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined;
+
+exports.isAIR = ua.indexOf("AdobeAIR") >= 0;
+
+exports.isIPad = ua.indexOf("iPad") >= 0;
+
+exports.isTouchPad = ua.indexOf("TouchPad") >= 0;
+
+exports.isChromeOS = ua.indexOf(" CrOS ") >= 0;
+
+});
+
+define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module) {
+"use strict";
+
+var keys = require("./keys");
+var useragent = require("./useragent");
+
+var pressedKeys = null;
+var ts = 0;
+
+exports.addListener = function(elem, type, callback) {
+    if (elem.addEventListener) {
+        return elem.addEventListener(type, callback, false);
+    }
+    if (elem.attachEvent) {
+        var wrapper = function() {
+            callback.call(elem, window.event);
+        };
+        callback._wrapper = wrapper;
+        elem.attachEvent("on" + type, wrapper);
+    }
+};
+
+exports.removeListener = function(elem, type, callback) {
+    if (elem.removeEventListener) {
+        return elem.removeEventListener(type, callback, false);
+    }
+    if (elem.detachEvent) {
+        elem.detachEvent("on" + type, callback._wrapper || callback);
+    }
+};
+exports.stopEvent = function(e) {
+    exports.stopPropagation(e);
+    exports.preventDefault(e);
+    return false;
+};
+
+exports.stopPropagation = function(e) {
+    if (e.stopPropagation)
+        e.stopPropagation();
+    else
+        e.cancelBubble = true;
+};
+
+exports.preventDefault = function(e) {
+    if (e.preventDefault)
+        e.preventDefault();
+    else
+        e.returnValue = false;
+};
+exports.getButton = function(e) {
+    if (e.type == "dblclick")
+        return 0;
+    if (e.type == "contextmenu" || (useragent.isMac && (e.ctrlKey && !e.altKey && !e.shiftKey)))
+        return 2;
+    if (e.preventDefault) {
+        return e.button;
+    }
+    else {
+        return {1:0, 2:2, 4:1}[e.button];
+    }
+};
+
+exports.capture = function(el, eventHandler, releaseCaptureHandler) {
+    function onMouseUp(e) {
+        eventHandler && eventHandler(e);
+        releaseCaptureHandler && releaseCaptureHandler(e);
+
+        exports.removeListener(document, "mousemove", eventHandler, true);
+        exports.removeListener(document, "mouseup", onMouseUp, true);
+        exports.removeListener(document, "dragstart", onMouseUp, true);
+    }
+
+    exports.addListener(document, "mousemove", eventHandler, true);
+    exports.addListener(document, "mouseup", onMouseUp, true);
+    exports.addListener(document, "dragstart", onMouseUp, true);
+    
+    return onMouseUp;
+};
+
+exports.addTouchMoveListener = function (el, callback) {
+    if ("ontouchmove" in el) {
+        var startx, starty;
+        exports.addListener(el, "touchstart", function (e) {
+            var touchObj = e.changedTouches[0];
+            startx = touchObj.clientX;
+            starty = touchObj.clientY;
+        });
+        exports.addListener(el, "touchmove", function (e) {
+            var factor = 1,
+            touchObj = e.changedTouches[0];
+
+            e.wheelX = -(touchObj.clientX - startx) / factor;
+            e.wheelY = -(touchObj.clientY - starty) / factor;
+
+            startx = touchObj.clientX;
+            starty = touchObj.clientY;
+
+            callback(e);
+        });
+    } 
+};
+
+exports.addMouseWheelListener = function(el, callback) {
+    if ("onmousewheel" in el) {
+        exports.addListener(el, "mousewheel", function(e) {
+            var factor = 8;
+            if (e.wheelDeltaX !== undefined) {
+                e.wheelX = -e.wheelDeltaX / factor;
+                e.wheelY = -e.wheelDeltaY / factor;
+            } else {
+                e.wheelX = 0;
+                e.wheelY = -e.wheelDelta / factor;
+            }
+            callback(e);
+        });
+    } else if ("onwheel" in el) {
+        exports.addListener(el, "wheel",  function(e) {
+            var factor = 0.35;
+            switch (e.deltaMode) {
+                case e.DOM_DELTA_PIXEL:
+                    e.wheelX = e.deltaX * factor || 0;
+                    e.wheelY = e.deltaY * factor || 0;
+                    break;
+                case e.DOM_DELTA_LINE:
+                case e.DOM_DELTA_PAGE:
+                    e.wheelX = (e.deltaX || 0) * 5;
+                    e.wheelY = (e.deltaY || 0) * 5;
+                    break;
+            }
+            
+            callback(e);
+        });
+    } else {
+        exports.addListener(el, "DOMMouseScroll", function(e) {
+            if (e.axis && e.axis == e.HORIZONTAL_AXIS) {
+                e.wheelX = (e.detail || 0) * 5;
+                e.wheelY = 0;
+            } else {
+                e.wheelX = 0;
+                e.wheelY = (e.detail || 0) * 5;
+            }
+            callback(e);
+        });
+    }
+};
+
+exports.addMultiMouseDownListener = function(elements, timeouts, eventHandler, callbackName) {
+    var clicks = 0;
+    var startX, startY, timer; 
+    var eventNames = {
+        2: "dblclick",
+        3: "tripleclick",
+        4: "quadclick"
+    };
+
+    function onMousedown(e) {
+        if (exports.getButton(e) !== 0) {
+            clicks = 0;
+        } else if (e.detail > 1) {
+            clicks++;
+            if (clicks > 4)
+                clicks = 1;
+        } else {
+            clicks = 1;
+        }
+        if (useragent.isIE) {
+            var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5;
+            if (!timer || isNewClick)
+                clicks = 1;
+            if (timer)
+                clearTimeout(timer);
+            timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600);
+
+            if (clicks == 1) {
+                startX = e.clientX;
+                startY = e.clientY;
+            }
+        }
+        
+        e._clicks = clicks;
+
+        eventHandler[callbackName]("mousedown", e);
+
+        if (clicks > 4)
+            clicks = 0;
+        else if (clicks > 1)
+            return eventHandler[callbackName](eventNames[clicks], e);
+    }
+    function onDblclick(e) {
+        clicks = 2;
+        if (timer)
+            clearTimeout(timer);
+        timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600);
+        eventHandler[callbackName]("mousedown", e);
+        eventHandler[callbackName](eventNames[clicks], e);
+    }
+    if (!Array.isArray(elements))
+        elements = [elements];
+    elements.forEach(function(el) {
+        exports.addListener(el, "mousedown", onMousedown);
+        if (useragent.isOldIE)
+            exports.addListener(el, "dblclick", onDblclick);
+    });
+};
+
+var getModifierHash = useragent.isMac && useragent.isOpera && !("KeyboardEvent" in window)
+    ? function(e) {
+        return 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0);
+    }
+    : function(e) {
+        return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);
+    };
+
+exports.getModifierString = function(e) {
+    return keys.KEY_MODS[getModifierHash(e)];
+};
+
+function normalizeCommandKeys(callback, e, keyCode) {
+    var hashId = getModifierHash(e);
+
+    if (!useragent.isMac && pressedKeys) {
+        if (pressedKeys.OSKey)
+            hashId |= 8;
+        if (pressedKeys.altGr) {
+            if ((3 & hashId) != 3)
+                pressedKeys.altGr = 0;
+            else
+                return;
+        }
+        if (keyCode === 18 || keyCode === 17) {
+            var location = "location" in e ? e.location : e.keyLocation;
+            if (keyCode === 17 && location === 1) {
+                if (pressedKeys[keyCode] == 1)
+                    ts = e.timeStamp;
+            } else if (keyCode === 18 && hashId === 3 && location === 2) {
+                var dt = e.timeStamp - ts;
+                if (dt < 50)
+                    pressedKeys.altGr = true;
+            }
+        }
+    }
+    
+    if (keyCode in keys.MODIFIER_KEYS) {
+        keyCode = -1;
+    }
+    if (hashId & 8 && (keyCode >= 91 && keyCode <= 93)) {
+        keyCode = -1;
+    }
+    
+    if (!hashId && keyCode === 13) {
+        var location = "location" in e ? e.location : e.keyLocation;
+        if (location === 3) {
+            callback(e, hashId, -keyCode);
+            if (e.defaultPrevented)
+                return;
+        }
+    }
+    
+    if (useragent.isChromeOS && hashId & 8) {
+        callback(e, hashId, keyCode);
+        if (e.defaultPrevented)
+            return;
+        else
+            hashId &= ~8;
+    }
+    if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) {
+        return false;
+    }
+    
+    return callback(e, hashId, keyCode);
+}
+
+
+exports.addCommandKeyListener = function(el, callback) {
+    var addListener = exports.addListener;
+    if (useragent.isOldGecko || (useragent.isOpera && !("KeyboardEvent" in window))) {
+        var lastKeyDownKeyCode = null;
+        addListener(el, "keydown", function(e) {
+            lastKeyDownKeyCode = e.keyCode;
+        });
+        addListener(el, "keypress", function(e) {
+            return normalizeCommandKeys(callback, e, lastKeyDownKeyCode);
+        });
+    } else {
+        var lastDefaultPrevented = null;
+
+        addListener(el, "keydown", function(e) {
+            var keyCode = e.keyCode;
+            pressedKeys[keyCode] = (pressedKeys[keyCode] || 0) + 1;
+            if (keyCode == 91 || keyCode == 92) {
+                pressedKeys.OSKey = true;
+            } else if (pressedKeys.OSKey) {
+                if (e.timeStamp - pressedKeys.lastT > 200 && pressedKeys.count == 1)
+                    resetPressedKeys();
+            }
+            if (pressedKeys[keyCode] == 1)
+                pressedKeys.count++;
+            pressedKeys.lastT = e.timeStamp;
+            var result = normalizeCommandKeys(callback, e, keyCode);
+            lastDefaultPrevented = e.defaultPrevented;
+            return result;
+        });
+
+        addListener(el, "keypress", function(e) {
+            if (lastDefaultPrevented && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey)) {
+                exports.stopEvent(e);
+                lastDefaultPrevented = null;
+            }
+        });
+
+        addListener(el, "keyup", function(e) {
+            var keyCode = e.keyCode;
+            if (!pressedKeys[keyCode]) {
+                resetPressedKeys();
+            } else {
+                pressedKeys.count = Math.max(pressedKeys.count - 1, 0);
+            }
+            if (keyCode == 91 || keyCode == 92) {
+                pressedKeys.OSKey = false;
+            }
+            pressedKeys[keyCode] = null;
+        });
+
+        if (!pressedKeys) {
+            resetPressedKeys();
+            addListener(window, "focus", resetPressedKeys);
+        }
+    }
+};
+function resetPressedKeys() {
+    pressedKeys = Object.create(null);
+    pressedKeys.count = 0;
+    pressedKeys.lastT = 0;
+}
+
+if (typeof window == "object" && window.postMessage && !useragent.isOldIE) {
+    var postMessageId = 1;
+    exports.nextTick = function(callback, win) {
+        win = win || window;
+        var messageName = "zero-timeout-message-" + postMessageId;
+        exports.addListener(win, "message", function listener(e) {
+            if (e.data == messageName) {
+                exports.stopPropagation(e);
+                exports.removeListener(win, "message", listener);
+                callback();
+            }
+        });
+        win.postMessage(messageName, "*");
+    };
+}
+
+
+exports.nextFrame = typeof window == "object" && (window.requestAnimationFrame
+    || window.mozRequestAnimationFrame
+    || window.webkitRequestAnimationFrame
+    || window.msRequestAnimationFrame
+    || window.oRequestAnimationFrame);
+
+if (exports.nextFrame)
+    exports.nextFrame = exports.nextFrame.bind(window);
+else
+    exports.nextFrame = function(callback) {
+        setTimeout(callback, 17);
+    };
+});
+
+define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.last = function(a) {
+    return a[a.length - 1];
+};
+
+exports.stringReverse = function(string) {
+    return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+    var result = '';
+    while (count > 0) {
+        if (count & 1)
+            result += string;
+
+        if (count >>= 1)
+            string += string;
+    }
+    return result;
+};
+
+var trimBeginRegexp = /^\s\s*/;
+var trimEndRegexp = /\s\s*$/;
+
+exports.stringTrimLeft = function (string) {
+    return string.replace(trimBeginRegexp, '');
+};
+
+exports.stringTrimRight = function (string) {
+    return string.replace(trimEndRegexp, '');
+};
+
+exports.copyObject = function(obj) {
+    var copy = {};
+    for (var key in obj) {
+        copy[key] = obj[key];
+    }
+    return copy;
+};
+
+exports.copyArray = function(array){
+    var copy = [];
+    for (var i=0, l=array.length; i<l; i++) {
+        if (array[i] && typeof array[i] == "object")
+            copy[i] = this.copyObject( array[i] );
+        else 
+            copy[i] = array[i];
+    }
+    return copy;
+};
+
+exports.deepCopy = function deepCopy(obj) {
+    if (typeof obj !== "object" || !obj)
+        return obj;
+    var copy;
+    if (Array.isArray(obj)) {
+        copy = [];
+        for (var key = 0; key < obj.length; key++) {
+            copy[key] = deepCopy(obj[key]);
+        }
+        return copy;
+    }
+    var cons = obj.constructor;
+    if (cons === RegExp)
+        return obj;
+    
+    copy = cons();
+    for (var key in obj) {
+        copy[key] = deepCopy(obj[key]);
+    }
+    return copy;
+};
+
+exports.arrayToMap = function(arr) {
+    var map = {};
+    for (var i=0; i<arr.length; i++) {
+        map[arr[i]] = 1;
+    }
+    return map;
+
+};
+
+exports.createMap = function(props) {
+    var map = Object.create(null);
+    for (var i in props) {
+        map[i] = props[i];
+    }
+    return map;
+};
+exports.arrayRemove = function(array, value) {
+  for (var i = 0; i <= array.length; i++) {
+    if (value === array[i]) {
+      array.splice(i, 1);
+    }
+  }
+};
+
+exports.escapeRegExp = function(str) {
+    return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
+};
+
+exports.escapeHTML = function(str) {
+    return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
+};
+
+exports.getMatchOffsets = function(string, regExp) {
+    var matches = [];
+
+    string.replace(regExp, function(str) {
+        matches.push({
+            offset: arguments[arguments.length-2],
+            length: str.length
+        });
+    });
+
+    return matches;
+};
+exports.deferredCall = function(fcn) {
+    var timer = null;
+    var callback = function() {
+        timer = null;
+        fcn();
+    };
+
+    var deferred = function(timeout) {
+        deferred.cancel();
+        timer = setTimeout(callback, timeout || 0);
+        return deferred;
+    };
+
+    deferred.schedule = deferred;
+
+    deferred.call = function() {
+        this.cancel();
+        fcn();
+        return deferred;
+    };
+
+    deferred.cancel = function() {
+        clearTimeout(timer);
+        timer = null;
+        return deferred;
+    };
+    
+    deferred.isPending = function() {
+        return timer;
+    };
+
+    return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+    var timer = null;
+    var callback = function() {
+        timer = null;
+        fcn();
+    };
+
+    var _self = function(timeout) {
+        if (timer == null)
+            timer = setTimeout(callback, timeout || defaultTimeout);
+    };
+
+    _self.delay = function(timeout) {
+        timer && clearTimeout(timer);
+        timer = setTimeout(callback, timeout || defaultTimeout);
+    };
+    _self.schedule = _self;
+
+    _self.call = function() {
+        this.cancel();
+        fcn();
+    };
+
+    _self.cancel = function() {
+        timer && clearTimeout(timer);
+        timer = null;
+    };
+
+    _self.isPending = function() {
+        return timer;
+    };
+
+    return _self;
+};
+});
+
+define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+var dom = require("../lib/dom");
+var lang = require("../lib/lang");
+var BROKEN_SETDATA = useragent.isChrome < 18;
+var USE_IE_MIME_TYPE =  useragent.isIE;
+
+var TextInput = function(parentNode, host) {
+    var text = dom.createElement("textarea");
+    text.className = "ace_text-input";
+
+    if (useragent.isTouchPad)
+        text.setAttribute("x-palm-disable-auto-cap", true);
+
+    text.setAttribute("wrap", "off");
+    text.setAttribute("autocorrect", "off");
+    text.setAttribute("autocapitalize", "off");
+    text.setAttribute("spellcheck", false);
+
+    text.style.opacity = "0";
+    if (useragent.isOldIE) text.style.top = "-1000px";
+    parentNode.insertBefore(text, parentNode.firstChild);
+
+    var PLACEHOLDER = "\x01\x01";
+
+    var copied = false;
+    var pasted = false;
+    var inComposition = false;
+    var tempStyle = '';
+    var isSelectionEmpty = true;
+    try { var isFocused = document.activeElement === text; } catch(e) {}
+    
+    event.addListener(text, "blur", function(e) {
+        host.onBlur(e);
+        isFocused = false;
+    });
+    event.addListener(text, "focus", function(e) {
+        isFocused = true;
+        host.onFocus(e);
+        resetSelection();
+    });
+    this.focus = function() {
+        if (tempStyle) return text.focus();
+        var top = text.style.top;
+        text.style.position = "fixed";
+        text.style.top = "0px";
+        text.focus();
+        setTimeout(function() {
+            text.style.position = "";
+            if (text.style.top == "0px")
+                text.style.top = top;
+        }, 0);
+    };
+    this.blur = function() {
+        text.blur();
+    };
+    this.isFocused = function() {
+        return isFocused;
+    };
+    var syncSelection = lang.delayedCall(function() {
+        isFocused && resetSelection(isSelectionEmpty);
+    });
+    var syncValue = lang.delayedCall(function() {
+         if (!inComposition) {
+            text.value = PLACEHOLDER;
+            isFocused && resetSelection();
+         }
+    });
+
+    function resetSelection(isEmpty) {
+        if (inComposition)
+            return;
+        inComposition = true;
+        
+        if (inputHandler) {
+            selectionStart = 0;
+            selectionEnd = isEmpty ? 0 : text.value.length - 1;
+        } else {
+            var selectionStart = isEmpty ? 2 : 1;
+            var selectionEnd = 2;
+        }
+        try {
+            text.setSelectionRange(selectionStart, selectionEnd);
+        } catch(e){}
+        
+        inComposition = false;
+    }
+
+    function resetValue() {
+        if (inComposition)
+            return;
+        text.value = PLACEHOLDER;
+        if (useragent.isWebKit)
+            syncValue.schedule();
+    }
+
+    useragent.isWebKit || host.addEventListener('changeSelection', function() {
+        if (host.selection.isEmpty() != isSelectionEmpty) {
+            isSelectionEmpty = !isSelectionEmpty;
+            syncSelection.schedule();
+        }
+    });
+
+    resetValue();
+    if (isFocused)
+        host.onFocus();
+
+
+    var isAllSelected = function(text) {
+        return text.selectionStart === 0 && text.selectionEnd === text.value.length;
+    };
+    if (!text.setSelectionRange && text.createTextRange) {
+        text.setSelectionRange = function(selectionStart, selectionEnd) {
+            var range = this.createTextRange();
+            range.collapse(true);
+            range.moveStart('character', selectionStart);
+            range.moveEnd('character', selectionEnd);
+            range.select();
+        };
+        isAllSelected = function(text) {
+            try {
+                var range = text.ownerDocument.selection.createRange();
+            }catch(e) {}
+            if (!range || range.parentElement() != text) return false;
+                return range.text == text.value;
+        }
+    }
+    if (useragent.isOldIE) {
+        var inPropertyChange = false;
+        var onPropertyChange = function(e){
+            if (inPropertyChange)
+                return;
+            var data = text.value;
+            if (inComposition || !data || data == PLACEHOLDER)
+                return;
+            if (e && data == PLACEHOLDER[0])
+                return syncProperty.schedule();
+
+            sendText(data);
+            inPropertyChange = true;
+            resetValue();
+            inPropertyChange = false;
+        };
+        var syncProperty = lang.delayedCall(onPropertyChange);
+        event.addListener(text, "propertychange", onPropertyChange);
+
+        var keytable = { 13:1, 27:1 };
+        event.addListener(text, "keyup", function (e) {
+            if (inComposition && (!text.value || keytable[e.keyCode]))
+                setTimeout(onCompositionEnd, 0);
+            if ((text.value.charCodeAt(0)||0) < 129) {
+                return syncProperty.call();
+            }
+            inComposition ? onCompositionUpdate() : onCompositionStart();
+        });
+        event.addListener(text, "keydown", function (e) {
+            syncProperty.schedule(50);
+        });
+    }
+
+    var onSelect = function(e) {
+        if (copied) {
+            copied = false;
+        } else if (isAllSelected(text)) {
+            host.selectAll();
+            resetSelection();
+        } else if (inputHandler) {
+            resetSelection(host.selection.isEmpty());
+        }
+    };
+
+    var inputHandler = null;
+    this.setInputHandler = function(cb) {inputHandler = cb};
+    this.getInputHandler = function() {return inputHandler};
+    var afterContextMenu = false;
+    
+    var sendText = function(data) {
+        if (inputHandler) {
+            data = inputHandler(data);
+            inputHandler = null;
+        }
+        if (pasted) {
+            resetSelection();
+            if (data)
+                host.onPaste(data);
+            pasted = false;
+        } else if (data == PLACEHOLDER.charAt(0)) {
+            if (afterContextMenu)
+                host.execCommand("del", {source: "ace"});
+            else // some versions of android do not fire keydown when pressing backspace
+                host.execCommand("backspace", {source: "ace"});
+        } else {
+            if (data.substring(0, 2) == PLACEHOLDER)
+                data = data.substr(2);
+            else if (data.charAt(0) == PLACEHOLDER.charAt(0))
+                data = data.substr(1);
+            else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))
+                data = data.slice(0, -1);
+            if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))
+                data = data.slice(0, -1);
+            
+            if (data)
+                host.onTextInput(data);
+        }
+        if (afterContextMenu)
+            afterContextMenu = false;
+    };
+    var onInput = function(e) {
+        if (inComposition)
+            return;
+        var data = text.value;
+        sendText(data);
+        resetValue();
+    };
+    
+    var handleClipboardData = function(e, data) {
+        var clipboardData = e.clipboardData || window.clipboardData;
+        if (!clipboardData || BROKEN_SETDATA)
+            return;
+        var mime = USE_IE_MIME_TYPE ? "Text" : "text/plain";
+        if (data) {
+            return clipboardData.setData(mime, data) !== false;
+        } else {
+            return clipboardData.getData(mime);
+        }
+    };
+
+    var doCopy = function(e, isCut) {
+        var data = host.getCopyText();
+        if (!data)
+            return event.preventDefault(e);
+
+        if (handleClipboardData(e, data)) {
+            isCut ? host.onCut() : host.onCopy();
+            event.preventDefault(e);
+        } else {
+            copied = true;
+            text.value = data;
+            text.select();
+            setTimeout(function(){
+                copied = false;
+                resetValue();
+                resetSelection();
+                isCut ? host.onCut() : host.onCopy();
+            });
+        }
+    };
+    
+    var onCut = function(e) {
+        doCopy(e, true);
+    };
+    
+    var onCopy = function(e) {
+        doCopy(e, false);
+    };
+    
+    var onPaste = function(e) {
+        var data = handleClipboardData(e);
+        if (typeof data == "string") {
+            if (data)
+                host.onPaste(data, e);
+            if (useragent.isIE)
+                setTimeout(resetSelection);
+            event.preventDefault(e);
+        }
+        else {
+            text.value = "";
+            pasted = true;
+        }
+    };
+
+    event.addCommandKeyListener(text, host.onCommandKey.bind(host));
+
+    event.addListener(text, "select", onSelect);
+
+    event.addListener(text, "input", onInput);
+
+    event.addListener(text, "cut", onCut);
+    event.addListener(text, "copy", onCopy);
+    event.addListener(text, "paste", onPaste);
+    if (!('oncut' in text) || !('oncopy' in text) || !('onpaste' in text)){
+        event.addListener(parentNode, "keydown", function(e) {
+            if ((useragent.isMac && !e.metaKey) || !e.ctrlKey)
+                return;
+
+            switch (e.keyCode) {
+                case 67:
+                    onCopy(e);
+                    break;
+                case 86:
+                    onPaste(e);
+                    break;
+                case 88:
+                    onCut(e);
+                    break;
+            }
+        });
+    }
+    var onCompositionStart = function(e) {
+        if (inComposition || !host.onCompositionStart || host.$readOnly) 
+            return;
+        inComposition = {};
+        host.onCompositionStart();
+        setTimeout(onCompositionUpdate, 0);
+        host.on("mousedown", onCompositionEnd);
+        if (!host.selection.isEmpty()) {
+            host.insert("");
+            host.session.markUndoGroup();
+            host.selection.clearSelection();
+        }
+        host.session.markUndoGroup();
+    };
+
+    var onCompositionUpdate = function() {
+        if (!inComposition || !host.onCompositionUpdate || host.$readOnly)
+            return;
+        var val = text.value.replace(/\x01/g, "");
+        if (inComposition.lastValue === val) return;
+        
+        host.onCompositionUpdate(val);
+        if (inComposition.lastValue)
+            host.undo();
+        inComposition.lastValue = val;
+        if (inComposition.lastValue) {
+            var r = host.selection.getRange();
+            host.insert(inComposition.lastValue);
+            host.session.markUndoGroup();
+            inComposition.range = host.selection.getRange();
+            host.selection.setRange(r);
+            host.selection.clearSelection();
+        }
+    };
+
+    var onCompositionEnd = function(e) {
+        if (!host.onCompositionEnd || host.$readOnly) return;
+        var c = inComposition;
+        inComposition = false;
+        var timer = setTimeout(function() {
+            timer = null;
+            var str = text.value.replace(/\x01/g, "");
+            if (inComposition)
+                return;
+            else if (str == c.lastValue)
+                resetValue();
+            else if (!c.lastValue && str) {
+                resetValue();
+                sendText(str);
+            }
+        });
+        inputHandler = function compositionInputHandler(str) {
+            if (timer)
+                clearTimeout(timer);
+            str = str.replace(/\x01/g, "");
+            if (str == c.lastValue)
+                return "";
+            if (c.lastValue && timer)
+                host.undo();
+            return str;
+        };
+        host.onCompositionEnd();
+        host.removeListener("mousedown", onCompositionEnd);
+        if (e.type == "compositionend" && c.range) {
+            host.selection.setRange(c.range);
+        }
+    };
+    
+    
+
+    var syncComposition = lang.delayedCall(onCompositionUpdate, 50);
+
+    event.addListener(text, "compositionstart", onCompositionStart);
+    if (useragent.isGecko) {
+        event.addListener(text, "text", function(){syncComposition.schedule()});
+    } else {
+        event.addListener(text, "keyup", function(){syncComposition.schedule()});
+        event.addListener(text, "keydown", function(){syncComposition.schedule()});
+    }
+    event.addListener(text, "compositionend", onCompositionEnd);
+
+    this.getElement = function() {
+        return text;
+    };
+
+    this.setReadOnly = function(readOnly) {
+       text.readOnly = readOnly;
+    };
+
+    this.onContextMenu = function(e) {
+        afterContextMenu = true;
+        resetSelection(host.selection.isEmpty());
+        host._emit("nativecontextmenu", {target: host, domEvent: e});
+        this.moveToMouse(e, true);
+    };
+    
+    this.moveToMouse = function(e, bringToFront) {
+        if (!bringToFront && useragent.isOldIE)
+            return;
+        if (!tempStyle)
+            tempStyle = text.style.cssText;
+        text.style.cssText = (bringToFront ? "z-index:100000;" : "")
+            + "height:" + text.style.height + ";"
+            + (useragent.isIE ? "opacity:0.1;" : "");
+
+        var rect = host.container.getBoundingClientRect();
+        var style = dom.computedStyle(host.container);
+        var top = rect.top + (parseInt(style.borderTopWidth) || 0);
+        var left = rect.left + (parseInt(rect.borderLeftWidth) || 0);
+        var maxTop = rect.bottom - top - text.clientHeight -2;
+        var move = function(e) {
+            text.style.left = e.clientX - left - 2 + "px";
+            text.style.top = Math.min(e.clientY - top - 2, maxTop) + "px";
+        }; 
+        move(e);
+
+        if (e.type != "mousedown")
+            return;
+
+        if (host.renderer.$keepTextAreaAtCursor)
+            host.renderer.$keepTextAreaAtCursor = null;
+
+        clearTimeout(closeTimeout);
+        if (useragent.isWin && !useragent.isOldIE)
+            event.capture(host.container, move, onContextMenuClose);
+    };
+
+    this.onContextMenuClose = onContextMenuClose;
+    var closeTimeout;
+    function onContextMenuClose() {
+        clearTimeout(closeTimeout);
+        closeTimeout = setTimeout(function () {
+            if (tempStyle) {
+                text.style.cssText = tempStyle;
+                tempStyle = '';
+            }
+            if (host.renderer.$keepTextAreaAtCursor == null) {
+                host.renderer.$keepTextAreaAtCursor = true;
+                host.renderer.$moveTextAreaToCursor();
+            }
+        }, useragent.isOldIE ? 200 : 0);
+    }
+
+    var onContextMenu = function(e) {
+        host.textInput.onContextMenu(e);
+        onContextMenuClose();
+    };
+    event.addListener(text, "mouseup", onContextMenu);
+    event.addListener(text, "mousedown", function(e) {
+        e.preventDefault();
+        onContextMenuClose();
+    });
+    event.addListener(host.renderer.scroller, "contextmenu", onContextMenu);
+    event.addListener(text, "contextmenu", onContextMenu);
+};
+
+exports.TextInput = TextInput;
+});
+
+define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"], function(require, exports, module) {
+"use strict";
+
+var dom = require("../lib/dom");
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+
+var DRAG_OFFSET = 0; // pixels
+
+function DefaultHandlers(mouseHandler) {
+    mouseHandler.$clickSelection = null;
+
+    var editor = mouseHandler.editor;
+    editor.setDefaultHandler("mousedown", this.onMouseDown.bind(mouseHandler));
+    editor.setDefaultHandler("dblclick", this.onDoubleClick.bind(mouseHandler));
+    editor.setDefaultHandler("tripleclick", this.onTripleClick.bind(mouseHandler));
+    editor.setDefaultHandler("quadclick", this.onQuadClick.bind(mouseHandler));
+    editor.setDefaultHandler("mousewheel", this.onMouseWheel.bind(mouseHandler));
+    editor.setDefaultHandler("touchmove", this.onTouchMove.bind(mouseHandler));
+
+    var exports = ["select", "startSelect", "selectEnd", "selectAllEnd", "selectByWordsEnd",
+        "selectByLinesEnd", "dragWait", "dragWaitEnd", "focusWait"];
+
+    exports.forEach(function(x) {
+        mouseHandler[x] = this[x];
+    }, this);
+
+    mouseHandler.selectByLines = this.extendSelectionBy.bind(mouseHandler, "getLineRange");
+    mouseHandler.selectByWords = this.extendSelectionBy.bind(mouseHandler, "getWordRange");
+}
+
+(function() {
+
+    this.onMouseDown = function(ev) {
+        var inSelection = ev.inSelection();
+        var pos = ev.getDocumentPosition();
+        this.mousedownEvent = ev;
+        var editor = this.editor;
+
+        var button = ev.getButton();
+        if (button !== 0) {
+            var selectionRange = editor.getSelectionRange();
+            var selectionEmpty = selectionRange.isEmpty();
+            editor.$blockScrolling++;
+            if (selectionEmpty || button == 1)
+                editor.selection.moveToPosition(pos);
+            editor.$blockScrolling--;
+            if (button == 2)
+                editor.textInput.onContextMenu(ev.domEvent);
+            return; // stopping event here breaks contextmenu on ff mac
+        }
+
+        this.mousedownEvent.time = Date.now();
+        if (inSelection && !editor.isFocused()) {
+            editor.focus();
+            if (this.$focusTimout && !this.$clickSelection && !editor.inMultiSelectMode) {
+                this.setState("focusWait");
+                this.captureMouse(ev);
+                return;
+            }
+        }
+
+        this.captureMouse(ev);
+        this.startSelect(pos, ev.domEvent._clicks > 1);
+        return ev.preventDefault();
+    };
+
+    this.startSelect = function(pos, waitForClickSelection) {
+        pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y);
+        var editor = this.editor;
+        editor.$blockScrolling++;
+        if (this.mousedownEvent.getShiftKey())
+            editor.selection.selectToPosition(pos);
+        else if (!waitForClickSelection)
+            editor.selection.moveToPosition(pos);
+        if (!waitForClickSelection)
+            this.select();
+        if (editor.renderer.scroller.setCapture) {
+            editor.renderer.scroller.setCapture();
+        }
+        editor.setStyle("ace_selecting");
+        this.setState("select");
+        editor.$blockScrolling--;
+    };
+
+    this.select = function() {
+        var anchor, editor = this.editor;
+        var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);
+        editor.$blockScrolling++;
+        if (this.$clickSelection) {
+            var cmp = this.$clickSelection.comparePoint(cursor);
+
+            if (cmp == -1) {
+                anchor = this.$clickSelection.end;
+            } else if (cmp == 1) {
+                anchor = this.$clickSelection.start;
+            } else {
+                var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);
+                cursor = orientedRange.cursor;
+                anchor = orientedRange.anchor;
+            }
+            editor.selection.setSelectionAnchor(anchor.row, anchor.column);
+        }
+        editor.selection.selectToPosition(cursor);
+        editor.$blockScrolling--;
+        editor.renderer.scrollCursorIntoView();
+    };
+
+    this.extendSelectionBy = function(unitName) {
+        var anchor, editor = this.editor;
+        var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);
+        var range = editor.selection[unitName](cursor.row, cursor.column);
+        editor.$blockScrolling++;
+        if (this.$clickSelection) {
+            var cmpStart = this.$clickSelection.comparePoint(range.start);
+            var cmpEnd = this.$clickSelection.comparePoint(range.end);
+
+            if (cmpStart == -1 && cmpEnd <= 0) {
+                anchor = this.$clickSelection.end;
+                if (range.end.row != cursor.row || range.end.column != cursor.column)
+                    cursor = range.start;
+            } else if (cmpEnd == 1 && cmpStart >= 0) {
+                anchor = this.$clickSelection.start;
+                if (range.start.row != cursor.row || range.start.column != cursor.column)
+                    cursor = range.end;
+            } else if (cmpStart == -1 && cmpEnd == 1) {
+                cursor = range.end;
+                anchor = range.start;
+            } else {
+                var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);
+                cursor = orientedRange.cursor;
+                anchor = orientedRange.anchor;
+            }
+            editor.selection.setSelectionAnchor(anchor.row, anchor.column);
+        }
+        editor.selection.selectToPosition(cursor);
+        editor.$blockScrolling--;
+        editor.renderer.scrollCursorIntoView();
+    };
+
+    this.selectEnd =
+    this.selectAllEnd =
+    this.selectByWordsEnd =
+    this.selectByLinesEnd = function() {
+        this.$clickSelection = null;
+        this.editor.unsetStyle("ace_selecting");
+        if (this.editor.renderer.scroller.releaseCapture) {
+            this.editor.renderer.scroller.releaseCapture();
+        }
+    };
+
+    this.focusWait = function() {
+        var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);
+        var time = Date.now();
+
+        if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimout)
+            this.startSelect(this.mousedownEvent.getDocumentPosition());
+    };
+
+    this.onDoubleClick = function(ev) {
+        var pos = ev.getDocumentPosition();
+        var editor = this.editor;
+        var session = editor.session;
+
+        var range = session.getBracketRange(pos);
+        if (range) {
+            if (range.isEmpty()) {
+                range.start.column--;
+                range.end.column++;
+            }
+            this.setState("select");
+        } else {
+            range = editor.selection.getWordRange(pos.row, pos.column);
+            this.setState("selectByWords");
+        }
+        this.$clickSelection = range;
+        this.select();
+    };
+
+    this.onTripleClick = function(ev) {
+        var pos = ev.getDocumentPosition();
+        var editor = this.editor;
+
+        this.setState("selectByLines");
+        var range = editor.getSelectionRange();
+        if (range.isMultiLine() && range.contains(pos.row, pos.column)) {
+            this.$clickSelection = editor.selection.getLineRange(range.start.row);
+            this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end;
+        } else {
+            this.$clickSelection = editor.selection.getLineRange(pos.row);
+        }
+        this.select();
+    };
+
+    this.onQuadClick = function(ev) {
+        var editor = this.editor;
+
+        editor.selectAll();
+        this.$clickSelection = editor.getSelectionRange();
+        this.setState("selectAll");
+    };
+
+    this.onMouseWheel = function(ev) {
+        if (ev.getAccelKey())
+            return;
+        if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) {
+            ev.wheelX = ev.wheelY;
+            ev.wheelY = 0;
+        }
+
+        var t = ev.domEvent.timeStamp;
+        var dt = t - (this.$lastScrollTime||0);
+        
+        var editor = this.editor;
+        var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);
+        if (isScrolable || dt < 200) {
+            this.$lastScrollTime = t;
+            editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);
+            return ev.stop();
+        }
+    };
+    
+    this.onTouchMove = function (ev) {
+        var t = ev.domEvent.timeStamp;
+        var dt = t - (this.$lastScrollTime || 0);
+
+        var editor = this.editor;
+        var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);
+        if (isScrolable || dt < 200) {
+            this.$lastScrollTime = t;
+            editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);
+            return ev.stop();
+        }
+    };
+
+}).call(DefaultHandlers.prototype);
+
+exports.DefaultHandlers = DefaultHandlers;
+
+function calcDistance(ax, ay, bx, by) {
+    return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));
+}
+
+function calcRangeOrientation(range, cursor) {
+    if (range.start.row == range.end.row)
+        var cmp = 2 * cursor.column - range.start.column - range.end.column;
+    else if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column)
+        var cmp = cursor.column - 4;
+    else
+        var cmp = 2 * cursor.row - range.start.row - range.end.row;
+
+    if (cmp < 0)
+        return {cursor: range.start, anchor: range.end};
+    else
+        return {cursor: range.end, anchor: range.start};
+}
+
+});
+
+define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var dom = require("./lib/dom");
+function Tooltip (parentNode) {
+    this.isOpen = false;
+    this.$element = null;
+    this.$parentNode = parentNode;
+}
+
+(function() {
+    this.$init = function() {
+        this.$element = dom.createElement("div");
+        this.$element.className = "ace_tooltip";
+        this.$element.style.display = "none";
+        this.$parentNode.appendChild(this.$element);
+        return this.$element;
+    };
+    this.getElement = function() {
+        return this.$element || this.$init();
+    };
+    this.setText = function(text) {
+        dom.setInnerText(this.getElement(), text);
+    };
+    this.setHtml = function(html) {
+        this.getElement().innerHTML = html;
+    };
+    this.setPosition = function(x, y) {
+        this.getElement().style.left = x + "px";
+        this.getElement().style.top = y + "px";
+    };
+    this.setClassName = function(className) {
+        dom.addCssClass(this.getElement(), className);
+    };
+    this.show = function(text, x, y) {
+        if (text != null)
+            this.setText(text);
+        if (x != null && y != null)
+            this.setPosition(x, y);
+        if (!this.isOpen) {
+            this.getElement().style.display = "block";
+            this.isOpen = true;
+        }
+    };
+
+    this.hide = function() {
+        if (this.isOpen) {
+            this.getElement().style.display = "none";
+            this.isOpen = false;
+        }
+    };
+    this.getHeight = function() {
+        return this.getElement().offsetHeight;
+    };
+    this.getWidth = function() {
+        return this.getElement().offsetWidth;
+    };
+
+}).call(Tooltip.prototype);
+
+exports.Tooltip = Tooltip;
+});
+
+define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"], function(require, exports, module) {
+"use strict";
+var dom = require("../lib/dom");
+var oop = require("../lib/oop");
+var event = require("../lib/event");
+var Tooltip = require("../tooltip").Tooltip;
+
+function GutterHandler(mouseHandler) {
+    var editor = mouseHandler.editor;
+    var gutter = editor.renderer.$gutterLayer;
+    var tooltip = new GutterTooltip(editor.container);
+
+    mouseHandler.editor.setDefaultHandler("guttermousedown", function(e) {
+        if (!editor.isFocused() || e.getButton() != 0)
+            return;
+        var gutterRegion = gutter.getRegion(e);
+
+        if (gutterRegion == "foldWidgets")
+            return;
+
+        var row = e.getDocumentPosition().row;
+        var selection = editor.session.selection;
+
+        if (e.getShiftKey())
+            selection.selectTo(row, 0);
+        else {
+            if (e.domEvent.detail == 2) {
+                editor.selectAll();
+                return e.preventDefault();
+            }
+            mouseHandler.$clickSelection = editor.selection.getLineRange(row);
+        }
+        mouseHandler.setState("selectByLines");
+        mouseHandler.captureMouse(e);
+        return e.preventDefault();
+    });
+
+
+    var tooltipTimeout, mouseEvent, tooltipAnnotation;
+
+    function showTooltip() {
+        var row = mouseEvent.getDocumentPosition().row;
+        var annotation = gutter.$annotations[row];
+        if (!annotation)
+            return hideTooltip();
+
+        var maxRow = editor.session.getLength();
+        if (row == maxRow) {
+            var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row;
+            var pos = mouseEvent.$pos;
+            if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column))
+                return hideTooltip();
+        }
+
+        if (tooltipAnnotation == annotation)
+            return;
+        tooltipAnnotation = annotation.text.join("<br/>");
+
+        tooltip.setHtml(tooltipAnnotation);
+        tooltip.show();
+        editor.on("mousewheel", hideTooltip);
+
+        if (mouseHandler.$tooltipFollowsMouse) {
+            moveTooltip(mouseEvent);
+        } else {
+            var gutterElement = mouseEvent.domEvent.target;
+            var rect = gutterElement.getBoundingClientRect();
+            var style = tooltip.getElement().style;
+            style.left = rect.right + "px";
+            style.top = rect.bottom + "px";
+        }
+    }
+
+    function hideTooltip() {
+        if (tooltipTimeout)
+            tooltipTimeout = clearTimeout(tooltipTimeout);
+        if (tooltipAnnotation) {
+            tooltip.hide();
+            tooltipAnnotation = null;
+            editor.removeEventListener("mousewheel", hideTooltip);
+        }
+    }
+
+    function moveTooltip(e) {
+        tooltip.setPosition(e.x, e.y);
+    }
+
+    mouseHandler.editor.setDefaultHandler("guttermousemove", function(e) {
+        var target = e.domEvent.target || e.domEvent.srcElement;
+        if (dom.hasCssClass(target, "ace_fold-widget"))
+            return hideTooltip();
+
+        if (tooltipAnnotation && mouseHandler.$tooltipFollowsMouse)
+            moveTooltip(e);
+
+        mouseEvent = e;
+        if (tooltipTimeout)
+            return;
+        tooltipTimeout = setTimeout(function() {
+            tooltipTimeout = null;
+            if (mouseEvent && !mouseHandler.isMousePressed)
+                showTooltip();
+            else
+                hideTooltip();
+        }, 50);
+    });
+
+    event.addListener(editor.renderer.$gutter, "mouseout", function(e) {
+        mouseEvent = null;
+        if (!tooltipAnnotation || tooltipTimeout)
+            return;
+
+        tooltipTimeout = setTimeout(function() {
+            tooltipTimeout = null;
+            hideTooltip();
+        }, 50);
+    });
+    
+    editor.on("changeSession", hideTooltip);
+}
+
+function GutterTooltip(parentNode) {
+    Tooltip.call(this, parentNode);
+}
+
+oop.inherits(GutterTooltip, Tooltip);
+
+(function(){
+    this.setPosition = function(x, y) {
+        var windowWidth = window.innerWidth || document.documentElement.clientWidth;
+        var windowHeight = window.innerHeight || document.documentElement.clientHeight;
+        var width = this.getWidth();
+        var height = this.getHeight();
+        x += 15;
+        y += 15;
+        if (x + width > windowWidth) {
+            x -= (x + width) - windowWidth;
+        }
+        if (y + height > windowHeight) {
+            y -= 20 + height;
+        }
+        Tooltip.prototype.setPosition.call(this, x, y);
+    };
+
+}).call(GutterTooltip.prototype);
+
+
+
+exports.GutterHandler = GutterHandler;
+
+});
+
+define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module) {
+"use strict";
+
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+var MouseEvent = exports.MouseEvent = function(domEvent, editor) {
+    this.domEvent = domEvent;
+    this.editor = editor;
+    
+    this.x = this.clientX = domEvent.clientX;
+    this.y = this.clientY = domEvent.clientY;
+
+    this.$pos = null;
+    this.$inSelection = null;
+    
+    this.propagationStopped = false;
+    this.defaultPrevented = false;
+};
+
+(function() {  
+    
+    this.stopPropagation = function() {
+        event.stopPropagation(this.domEvent);
+        this.propagationStopped = true;
+    };
+    
+    this.preventDefault = function() {
+        event.preventDefault(this.domEvent);
+        this.defaultPrevented = true;
+    };
+    
+    this.stop = function() {
+        this.stopPropagation();
+        this.preventDefault();
+    };
+    this.getDocumentPosition = function() {
+        if (this.$pos)
+            return this.$pos;
+        
+        this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY);
+        return this.$pos;
+    };
+    this.inSelection = function() {
+        if (this.$inSelection !== null)
+            return this.$inSelection;
+            
+        var editor = this.editor;
+        
+
+        var selectionRange = editor.getSelectionRange();
+        if (selectionRange.isEmpty())
+            this.$inSelection = false;
+        else {
+            var pos = this.getDocumentPosition();
+            this.$inSelection = selectionRange.contains(pos.row, pos.column);
+        }
+
+        return this.$inSelection;
+    };
+    this.getButton = function() {
+        return event.getButton(this.domEvent);
+    };
+    this.getShiftKey = function() {
+        return this.domEvent.shiftKey;
+    };
+    
+    this.getAccelKey = useragent.isMac
+        ? function() { return this.domEvent.metaKey; }
+        : function() { return this.domEvent.ctrlKey; };
+    
+}).call(MouseEvent.prototype);
+
+});
+
+define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"], function(require, exports, module) {
+"use strict";
+
+var dom = require("../lib/dom");
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+
+var AUTOSCROLL_DELAY = 200;
+var SCROLL_CURSOR_DELAY = 200;
+var SCROLL_CURSOR_HYSTERESIS = 5;
+
+function DragdropHandler(mouseHandler) {
+
+    var editor = mouseHandler.editor;
+
+    var blankImage = dom.createElement("img");
+    blankImage.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
+    if (useragent.isOpera)
+        blankImage.style.cssText = "width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;";
+
+    var exports = ["dragWait", "dragWaitEnd", "startDrag", "dragReadyEnd", "onMouseDrag"];
+
+     exports.forEach(function(x) {
+         mouseHandler[x] = this[x];
+    }, this);
+    editor.addEventListener("mousedown", this.onMouseDown.bind(mouseHandler));
+
+
+    var mouseTarget = editor.container;
+    var dragSelectionMarker, x, y;
+    var timerId, range;
+    var dragCursor, counter = 0;
+    var dragOperation;
+    var isInternal;
+    var autoScrollStartTime;
+    var cursorMovedTime;
+    var cursorPointOnCaretMoved;
+
+    this.onDragStart = function(e) {
+        if (this.cancelDrag || !mouseTarget.draggable) {
+            var self = this;
+            setTimeout(function(){
+                self.startSelect();
+                self.captureMouse(e);
+            }, 0);
+            return e.preventDefault();
+        }
+        range = editor.getSelectionRange();
+
+        var dataTransfer = e.dataTransfer;
+        dataTransfer.effectAllowed = editor.getReadOnly() ? "copy" : "copyMove";
+        if (useragent.isOpera) {
+            editor.container.appendChild(blankImage);
+            blankImage.scrollTop = 0;
+        }
+        dataTransfer.setDragImage && dataTransfer.setDragImage(blankImage, 0, 0);
+        if (useragent.isOpera) {
+            editor.container.removeChild(blankImage);
+        }
+        dataTransfer.clearData();
+        dataTransfer.setData("Text", editor.session.getTextRange());
+
+        isInternal = true;
+        this.setState("drag");
+    };
+
+    this.onDragEnd = function(e) {
+        mouseTarget.draggable = false;
+        isInternal = false;
+        this.setState(null);
+        if (!editor.getReadOnly()) {
+            var dropEffect = e.dataTransfer.dropEffect;
+            if (!dragOperation && dropEffect == "move")
+                editor.session.remove(editor.getSelectionRange());
+            editor.renderer.$cursorLayer.setBlinking(true);
+        }
+        this.editor.unsetStyle("ace_dragging");
+        this.editor.renderer.setCursorStyle("");
+    };
+
+    this.onDragEnter = function(e) {
+        if (editor.getReadOnly() || !canAccept(e.dataTransfer))
+            return;
+        x = e.clientX;
+        y = e.clientY;
+        if (!dragSelectionMarker)
+            addDragMarker();
+        counter++;
+        e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);
+        return event.preventDefault(e);
+    };
+
+    this.onDragOver = function(e) {
+        if (editor.getReadOnly() || !canAccept(e.dataTransfer))
+            return;
+        x = e.clientX;
+        y = e.clientY;
+        if (!dragSelectionMarker) {
+            addDragMarker();
+            counter++;
+        }
+        if (onMouseMoveTimer !== null)
+            onMouseMoveTimer = null;
+
+        e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);
+        return event.preventDefault(e);
+    };
+
+    this.onDragLeave = function(e) {
+        counter--;
+        if (counter <= 0 && dragSelectionMarker) {
+            clearDragMarker();
+            dragOperation = null;
+            return event.preventDefault(e);
+        }
+    };
+
+    this.onDrop = function(e) {
+        if (!dragCursor)
+            return;
+        var dataTransfer = e.dataTransfer;
+        if (isInternal) {
+            switch (dragOperation) {
+                case "move":
+                    if (range.contains(dragCursor.row, dragCursor.column)) {
+                        range = {
+                            start: dragCursor,
+                            end: dragCursor
+                        };
+                    } else {
+                        range = editor.moveText(range, dragCursor);
+                    }
+                    break;
+                case "copy":
+                    range = editor.moveText(range, dragCursor, true);
+                    break;
+            }
+        } else {
+            var dropData = dataTransfer.getData('Text');
+            range = {
+                start: dragCursor,
+                end: editor.session.insert(dragCursor, dropData)
+            };
+            editor.focus();
+            dragOperation = null;
+        }
+        clearDragMarker();
+        return event.preventDefault(e);
+    };
+
+    event.addListener(mouseTarget, "dragstart", this.onDragStart.bind(mouseHandler));
+    event.addListener(mouseTarget, "dragend", this.onDragEnd.bind(mouseHandler));
+    event.addListener(mouseTarget, "dragenter", this.onDragEnter.bind(mouseHandler));
+    event.addListener(mouseTarget, "dragover", this.onDragOver.bind(mouseHandler));
+    event.addListener(mouseTarget, "dragleave", this.onDragLeave.bind(mouseHandler));
+    event.addListener(mouseTarget, "drop", this.onDrop.bind(mouseHandler));
+
+    function scrollCursorIntoView(cursor, prevCursor) {
+        var now = Date.now();
+        var vMovement = !prevCursor || cursor.row != prevCursor.row;
+        var hMovement = !prevCursor || cursor.column != prevCursor.column;
+        if (!cursorMovedTime || vMovement || hMovement) {
+            editor.$blockScrolling += 1;
+            editor.moveCursorToPosition(cursor);
+            editor.$blockScrolling -= 1;
+            cursorMovedTime = now;
+            cursorPointOnCaretMoved = {x: x, y: y};
+        } else {
+            var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y);
+            if (distance > SCROLL_CURSOR_HYSTERESIS) {
+                cursorMovedTime = null;
+            } else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) {
+                editor.renderer.scrollCursorIntoView();
+                cursorMovedTime = null;
+            }
+        }
+    }
+
+    function autoScroll(cursor, prevCursor) {
+        var now = Date.now();
+        var lineHeight = editor.renderer.layerConfig.lineHeight;
+        var characterWidth = editor.renderer.layerConfig.characterWidth;
+        var editorRect = editor.renderer.scroller.getBoundingClientRect();
+        var offsets = {
+           x: {
+               left: x - editorRect.left,
+               right: editorRect.right - x
+           },
+           y: {
+               top: y - editorRect.top,
+               bottom: editorRect.bottom - y
+           }
+        };
+        var nearestXOffset = Math.min(offsets.x.left, offsets.x.right);
+        var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom);
+        var scrollCursor = {row: cursor.row, column: cursor.column};
+        if (nearestXOffset / characterWidth <= 2) {
+            scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2);
+        }
+        if (nearestYOffset / lineHeight <= 1) {
+            scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1);
+        }
+        var vScroll = cursor.row != scrollCursor.row;
+        var hScroll = cursor.column != scrollCursor.column;
+        var vMovement = !prevCursor || cursor.row != prevCursor.row;
+        if (vScroll || (hScroll && !vMovement)) {
+            if (!autoScrollStartTime)
+                autoScrollStartTime = now;
+            else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY)
+                editor.renderer.scrollCursorIntoView(scrollCursor);
+        } else {
+            autoScrollStartTime = null;
+        }
+    }
+
+    function onDragInterval() {
+        var prevCursor = dragCursor;
+        dragCursor = editor.renderer.screenToTextCoordinates(x, y);
+        scrollCursorIntoView(dragCursor, prevCursor);
+        autoScroll(dragCursor, prevCursor);
+    }
+
+    function addDragMarker() {
+        range = editor.selection.toOrientedRange();
+        dragSelectionMarker = editor.session.addMarker(range, "ace_selection", editor.getSelectionStyle());
+        editor.clearSelection();
+        if (editor.isFocused())
+            editor.renderer.$cursorLayer.setBlinking(false);
+        clearInterval(timerId);
+        onDragInterval();
+        timerId = setInterval(onDragInterval, 20);
+        counter = 0;
+        event.addListener(document, "mousemove", onMouseMove);
+    }
+
+    function clearDragMarker() {
+        clearInterval(timerId);
+        editor.session.removeMarker(dragSelectionMarker);
+        dragSelectionMarker = null;
+        editor.$blockScrolling += 1;
+        editor.selection.fromOrientedRange(range);
+        editor.$blockScrolling -= 1;
+        if (editor.isFocused() && !isInternal)
+            editor.renderer.$cursorLayer.setBlinking(!editor.getReadOnly());
+        range = null;
+        dragCursor = null;
+        counter = 0;
+        autoScrollStartTime = null;
+        cursorMovedTime = null;
+        event.removeListener(document, "mousemove", onMouseMove);
+    }
+    var onMouseMoveTimer = null;
+    function onMouseMove() {
+        if (onMouseMoveTimer == null) {
+            onMouseMoveTimer = setTimeout(function() {
+                if (onMouseMoveTimer != null && dragSelectionMarker)
+                    clearDragMarker();
+            }, 20);
+        }
+    }
+
+    function canAccept(dataTransfer) {
+        var types = dataTransfer.types;
+        return !types || Array.prototype.some.call(types, function(type) {
+            return type == 'text/plain' || type == 'Text';
+        });
+    }
+
+    function getDropEffect(e) {
+        var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized'];
+        var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized'];
+
+        var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey;
+        var effectAllowed = "uninitialized";
+        try {
+            effectAllowed = e.dataTransfer.effectAllowed.toLowerCase();
+        } catch (e) {}
+        var dropEffect = "none";
+
+        if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0)
+            dropEffect = "copy";
+        else if (moveAllowed.indexOf(effectAllowed) >= 0)
+            dropEffect = "move";
+        else if (copyAllowed.indexOf(effectAllowed) >= 0)
+            dropEffect = "copy";
+
+        return dropEffect;
+    }
+}
+
+(function() {
+
+    this.dragWait = function() {
+        var interval = Date.now() - this.mousedownEvent.time;
+        if (interval > this.editor.getDragDelay())
+            this.startDrag();
+    };
+
+    this.dragWaitEnd = function() {
+        var target = this.editor.container;
+        target.draggable = false;
+        this.startSelect(this.mousedownEvent.getDocumentPosition());
+        this.selectEnd();
+    };
+
+    this.dragReadyEnd = function(e) {
+        this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly());
+        this.editor.unsetStyle("ace_dragging");
+        this.editor.renderer.setCursorStyle("");
+        this.dragWaitEnd();
+    };
+
+    this.startDrag = function(){
+        this.cancelDrag = false;
+        var editor = this.editor;
+        var target = editor.container;
+        target.draggable = true;
+        editor.renderer.$cursorLayer.setBlinking(false);
+        editor.setStyle("ace_dragging");
+        var cursorStyle = useragent.isWin ? "default" : "move";
+        editor.renderer.setCursorStyle(cursorStyle);
+        this.setState("dragReady");
+    };
+
+    this.onMouseDrag = function(e) {
+        var target = this.editor.container;
+        if (useragent.isIE && this.state == "dragReady") {
+            var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);
+            if (distance > 3)
+                target.dragDrop();
+        }
+        if (this.state === "dragWait") {
+            var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);
+            if (distance > 0) {
+                target.draggable = false;
+                this.startSelect(this.mousedownEvent.getDocumentPosition());
+            }
+        }
+    };
+
+    this.onMouseDown = function(e) {
+        if (!this.$dragEnabled)
+            return;
+        this.mousedownEvent = e;
+        var editor = this.editor;
+
+        var inSelection = e.inSelection();
+        var button = e.getButton();
+        var clickCount = e.domEvent.detail || 1;
+        if (clickCount === 1 && button === 0 && inSelection) {
+            if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey()))
+                return;
+            this.mousedownEvent.time = Date.now();
+            var eventTarget = e.domEvent.target || e.domEvent.srcElement;
+            if ("unselectable" in eventTarget)
+                eventTarget.unselectable = "on";
+            if (editor.getDragDelay()) {
+                if (useragent.isWebKit) {
+                    this.cancelDrag = true;
+                    var mouseTarget = editor.container;
+                    mouseTarget.draggable = true;
+                }
+                this.setState("dragWait");
+            } else {
+                this.startDrag();
+            }
+            this.captureMouse(e, this.onMouseDrag.bind(this));
+            e.defaultPrevented = true;
+        }
+    };
+
+}).call(DragdropHandler.prototype);
+
+
+function calcDistance(ax, ay, bx, by) {
+    return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));
+}
+
+exports.DragdropHandler = DragdropHandler;
+
+});
+
+define("ace/lib/net",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+"use strict";
+var dom = require("./dom");
+
+exports.get = function (url, callback) {
+    var xhr = new XMLHttpRequest();
+    xhr.open('GET', url, true);
+    xhr.onreadystatechange = function () {
+        if (xhr.readyState === 4) {
+            callback(xhr.responseText);
+        }
+    };
+    xhr.send(null);
+};
+
+exports.loadScript = function(path, callback) {
+    var head = dom.getDocumentHead();
+    var s = document.createElement('script');
+
+    s.src = path;
+    head.appendChild(s);
+
+    s.onload = s.onreadystatechange = function(_, isAbort) {
+        if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") {
+            s = s.onload = s.onreadystatechange = null;
+            if (!isAbort)
+                callback();
+        }
+    };
+};
+exports.qualifyURL = function(url) {
+    var a = document.createElement('a');
+    a.href = url;
+    return a.href;
+}
+
+});
+
+define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var EventEmitter = {};
+var stopPropagation = function() { this.propagationStopped = true; };
+var preventDefault = function() { this.defaultPrevented = true; };
+
+EventEmitter._emit =
+EventEmitter._dispatchEvent = function(eventName, e) {
+    this._eventRegistry || (this._eventRegistry = {});
+    this._defaultHandlers || (this._defaultHandlers = {});
+
+    var listeners = this._eventRegistry[eventName] || [];
+    var defaultHandler = this._defaultHandlers[eventName];
+    if (!listeners.length && !defaultHandler)
+        return;
+
+    if (typeof e != "object" || !e)
+        e = {};
+
+    if (!e.type)
+        e.type = eventName;
+    if (!e.stopPropagation)
+        e.stopPropagation = stopPropagation;
+    if (!e.preventDefault)
+        e.preventDefault = preventDefault;
+
+    listeners = listeners.slice();
+    for (var i=0; i<listeners.length; i++) {
+        listeners[i](e, this);
+        if (e.propagationStopped)
+            break;
+    }
+    
+    if (defaultHandler && !e.defaultPrevented)
+        return defaultHandler(e, this);
+};
+
+
+EventEmitter._signal = function(eventName, e) {
+    var listeners = (this._eventRegistry || {})[eventName];
+    if (!listeners)
+        return;
+    listeners = listeners.slice();
+    for (var i=0; i<listeners.length; i++)
+        listeners[i](e, this);
+};
+
+EventEmitter.once = function(eventName, callback) {
+    var _self = this;
+    callback && this.addEventListener(eventName, function newCallback() {
+        _self.removeEventListener(eventName, newCallback);
+        callback.apply(null, arguments);
+    });
+};
+
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+    var handlers = this._defaultHandlers
+    if (!handlers)
+        handlers = this._defaultHandlers = {_disabled_: {}};
+    
+    if (handlers[eventName]) {
+        var old = handlers[eventName];
+        var disabled = handlers._disabled_[eventName];
+        if (!disabled)
+            handlers._disabled_[eventName] = disabled = [];
+        disabled.push(old);
+        var i = disabled.indexOf(callback);
+        if (i != -1) 
+            disabled.splice(i, 1);
+    }
+    handlers[eventName] = callback;
+};
+EventEmitter.removeDefaultHandler = function(eventName, callback) {
+    var handlers = this._defaultHandlers
+    if (!handlers)
+        return;
+    var disabled = handlers._disabled_[eventName];
+    
+    if (handlers[eventName] == callback) {
+        var old = handlers[eventName];
+        if (disabled)
+            this.setDefaultHandler(eventName, disabled.pop());
+    } else if (disabled) {
+        var i = disabled.indexOf(callback);
+        if (i != -1)
+            disabled.splice(i, 1);
+    }
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback, capturing) {
+    this._eventRegistry = this._eventRegistry || {};
+
+    var listeners = this._eventRegistry[eventName];
+    if (!listeners)
+        listeners = this._eventRegistry[eventName] = [];
+
+    if (listeners.indexOf(callback) == -1)
+        listeners[capturing ? "unshift" : "push"](callback);
+    return callback;
+};
+
+EventEmitter.off =
+EventEmitter.removeListener =
+EventEmitter.removeEventListener = function(eventName, callback) {
+    this._eventRegistry = this._eventRegistry || {};
+
+    var listeners = this._eventRegistry[eventName];
+    if (!listeners)
+        return;
+
+    var index = listeners.indexOf(callback);
+    if (index !== -1)
+        listeners.splice(index, 1);
+};
+
+EventEmitter.removeAllListeners = function(eventName) {
+    if (this._eventRegistry) this._eventRegistry[eventName] = [];
+};
+
+exports.EventEmitter = EventEmitter;
+
+});
+
+define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
+"no use strict";
+
+var oop = require("./oop");
+var EventEmitter = require("./event_emitter").EventEmitter;
+
+var optionsProvider = {
+    setOptions: function(optList) {
+        Object.keys(optList).forEach(function(key) {
+            this.setOption(key, optList[key]);
+        }, this);
+    },
+    getOptions: function(optionNames) {
+        var result = {};
+        if (!optionNames) {
+            optionNames = Object.keys(this.$options);
+        } else if (!Array.isArray(optionNames)) {
+            result = optionNames;
+            optionNames = Object.keys(result);
+        }
+        optionNames.forEach(function(key) {
+            result[key] = this.getOption(key);
+        }, this);
+        return result;
+    },
+    setOption: function(name, value) {
+        if (this["$" + name] === value)
+            return;
+        var opt = this.$options[name];
+        if (!opt) {
+            return warn('misspelled option "' + name + '"');
+        }
+        if (opt.forwardTo)
+            return this[opt.forwardTo] && this[opt.forwardTo].setOption(name, value);
+
+        if (!opt.handlesSet)
+            this["$" + name] = value;
+        if (opt && opt.set)
+            opt.set.call(this, value);
+    },
+    getOption: function(name) {
+        var opt = this.$options[name];
+        if (!opt) {
+            return warn('misspelled option "' + name + '"');
+        }
+        if (opt.forwardTo)
+            return this[opt.forwardTo] && this[opt.forwardTo].getOption(name);
+        return opt && opt.get ? opt.get.call(this) : this["$" + name];
+    }
+};
+
+function warn(message) {
+    if (typeof console != "undefined" && console.warn)
+        console.warn.apply(console, arguments);
+}
+
+function reportError(msg, data) {
+    var e = new Error(msg);
+    e.data = data;
+    if (typeof console == "object" && console.error)
+        console.error(e);
+    setTimeout(function() { throw e; });
+}
+
+var AppConfig = function() {
+    this.$defaultOptions = {};
+};
+
+(function() {
+    oop.implement(this, EventEmitter);
+    this.defineOptions = function(obj, path, options) {
+        if (!obj.$options)
+            this.$defaultOptions[path] = obj.$options = {};
+
+        Object.keys(options).forEach(function(key) {
+            var opt = options[key];
+            if (typeof opt == "string")
+                opt = {forwardTo: opt};
+
+            opt.name || (opt.name = key);
+            obj.$options[opt.name] = opt;
+            if ("initialValue" in opt)
+                obj["$" + opt.name] = opt.initialValue;
+        });
+        oop.implement(obj, optionsProvider);
+
+        return this;
+    };
+
+    this.resetOptions = function(obj) {
+        Object.keys(obj.$options).forEach(function(key) {
+            var opt = obj.$options[key];
+            if ("value" in opt)
+                obj.setOption(key, opt.value);
+        });
+    };
+
+    this.setDefaultValue = function(path, name, value) {
+        var opts = this.$defaultOptions[path] || (this.$defaultOptions[path] = {});
+        if (opts[name]) {
+            if (opts.forwardTo)
+                this.setDefaultValue(opts.forwardTo, name, value);
+            else
+                opts[name].value = value;
+        }
+    };
+
+    this.setDefaultValues = function(path, optionHash) {
+        Object.keys(optionHash).forEach(function(key) {
+            this.setDefaultValue(path, key, optionHash[key]);
+        }, this);
+    };
+    
+    this.warn = warn;
+    this.reportError = reportError;
+    
+}).call(AppConfig.prototype);
+
+exports.AppConfig = AppConfig;
+
+});
+
+define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"], function(require, exports, module) {
+"no use strict";
+
+var lang = require("./lib/lang");
+var oop = require("./lib/oop");
+var net = require("./lib/net");
+var AppConfig = require("./lib/app_config").AppConfig;
+
+module.exports = exports = new AppConfig();
+
+var global = (function() {
+    return this || typeof window != "undefined" && window;
+})();
+
+var options = {
+    packaged: false,
+    workerPath: null,
+    modePath: null,
+    themePath: null,
+    basePath: "",
+    suffix: ".js",
+    $moduleUrls: {}
+};
+
+exports.get = function(key) {
+    if (!options.hasOwnProperty(key))
+        throw new Error("Unknown config key: " + key);
+
+    return options[key];
+};
+
+exports.set = function(key, value) {
+    if (!options.hasOwnProperty(key))
+        throw new Error("Unknown config key: " + key);
+
+    options[key] = value;
+};
+
+exports.all = function() {
+    return lang.copyObject(options);
+};
+exports.moduleUrl = function(name, component) {
+    if (options.$moduleUrls[name])
+        return options.$moduleUrls[name];
+
+    var parts = name.split("/");
+    component = component || parts[parts.length - 2] || "";
+    var sep = component == "snippets" ? "/" : "-";
+    var base = parts[parts.length - 1];
+    if (component == "worker" && sep == "-") {
+        var re = new RegExp("^" + component + "[\\-_]|[\\-_]" + component + "$", "g");
+        base = base.replace(re, "");
+    }
+
+    if ((!base || base == component) && parts.length > 1)
+        base = parts[parts.length - 2];
+    var path = options[component + "Path"];
+    if (path == null) {
+        path = options.basePath;
+    } else if (sep == "/") {
+        component = sep = "";
+    }
+    if (path && path.slice(-1) != "/")
+        path += "/";
+    return path + component + sep + base + this.get("suffix");
+};
+
+exports.setModuleUrl = function(name, subst) {
+    return options.$moduleUrls[name] = subst;
+};
+
+exports.$loading = {};
+exports.loadModule = function(moduleName, onLoad) {
+    var module, moduleType;
+    if (Array.isArray(moduleName)) {
+        moduleType = moduleName[0];
+        moduleName = moduleName[1];
+    }
+
+    try {
+        module = require(moduleName);
+    } catch (e) {}
+    if (module && !exports.$loading[moduleName])
+        return onLoad && onLoad(module);
+
+    if (!exports.$loading[moduleName])
+        exports.$loading[moduleName] = [];
+
+    exports.$loading[moduleName].push(onLoad);
+
+    if (exports.$loading[moduleName].length > 1)
+        return;
+
+    var afterLoad = function() {
+        require([moduleName], function(module) {
+            exports._emit("load.module", {name: moduleName, module: module});
+            var listeners = exports.$loading[moduleName];
+            exports.$loading[moduleName] = null;
+            listeners.forEach(function(onLoad) {
+                onLoad && onLoad(module);
+            });
+        });
+    };
+
+    if (!exports.get("packaged"))
+        return afterLoad();
+    net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad);
+};
+init(true);function init(packaged) {
+
+    if (!global || !global.document)
+        return;
+    
+    options.packaged = packaged || require.packaged || module.packaged || (global.define && define.packaged);
+
+    var scriptOptions = {};
+    var scriptUrl = "";
+    var currentScript = (document.currentScript || document._currentScript ); // native or polyfill
+    var currentDocument = currentScript && currentScript.ownerDocument || document;
+    
+    var scripts = currentDocument.getElementsByTagName("script");
+    for (var i=0; i<scripts.length; i++) {
+        var script = scripts[i];
+
+        var src = script.src || script.getAttribute("src");
+        if (!src)
+            continue;
+
+        var attributes = script.attributes;
+        for (var j=0, l=attributes.length; j < l; j++) {
+            var attr = attributes[j];
+            if (attr.name.indexOf("data-ace-") === 0) {
+                scriptOptions[deHyphenate(attr.name.replace(/^data-ace-/, ""))] = attr.value;
+            }
+        }
+
+        var m = src.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);
+        if (m)
+            scriptUrl = m[1];
+    }
+
+    if (scriptUrl) {
+        scriptOptions.base = scriptOptions.base || scriptUrl;
+        scriptOptions.packaged = true;
+    }
+
+    scriptOptions.basePath = scriptOptions.base;
+    scriptOptions.workerPath = scriptOptions.workerPath || scriptOptions.base;
+    scriptOptions.modePath = scriptOptions.modePath || scriptOptions.base;
+    scriptOptions.themePath = scriptOptions.themePath || scriptOptions.base;
+    delete scriptOptions.base;
+
+    for (var key in scriptOptions)
+        if (typeof scriptOptions[key] !== "undefined")
+            exports.set(key, scriptOptions[key]);
+}
+
+exports.init = init;
+
+function deHyphenate(str) {
+    return str.replace(/-(.)/g, function(m, m1) { return m1.toUpperCase(); });
+}
+
+});
+
+define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"], function(require, exports, module) {
+"use strict";
+
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+var DefaultHandlers = require("./default_handlers").DefaultHandlers;
+var DefaultGutterHandler = require("./default_gutter_handler").GutterHandler;
+var MouseEvent = require("./mouse_event").MouseEvent;
+var DragdropHandler = require("./dragdrop_handler").DragdropHandler;
+var config = require("../config");
+
+var MouseHandler = function(editor) {
+    var _self = this;
+    this.editor = editor;
+
+    new DefaultHandlers(this);
+    new DefaultGutterHandler(this);
+    new DragdropHandler(this);
+
+    var focusEditor = function(e) {
+        var windowBlurred = !document.hasFocus || !document.hasFocus()
+            || !editor.isFocused() && document.activeElement == (editor.textInput && editor.textInput.getElement())
+        if (windowBlurred)
+            window.focus();
+        editor.focus();
+    };
+
+    var mouseTarget = editor.renderer.getMouseEventTarget();
+    event.addListener(mouseTarget, "click", this.onMouseEvent.bind(this, "click"));
+    event.addListener(mouseTarget, "mousemove", this.onMouseMove.bind(this, "mousemove"));
+    event.addMultiMouseDownListener([
+        mouseTarget,
+        editor.renderer.scrollBarV && editor.renderer.scrollBarV.inner,
+        editor.renderer.scrollBarH && editor.renderer.scrollBarH.inner,
+        editor.textInput && editor.textInput.getElement()
+    ].filter(Boolean), [400, 300, 250], this, "onMouseEvent");
+    event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, "mousewheel"));
+    event.addTouchMoveListener(editor.container, this.onTouchMove.bind(this, "touchmove"));
+
+    var gutterEl = editor.renderer.$gutter;
+    event.addListener(gutterEl, "mousedown", this.onMouseEvent.bind(this, "guttermousedown"));
+    event.addListener(gutterEl, "click", this.onMouseEvent.bind(this, "gutterclick"));
+    event.addListener(gutterEl, "dblclick", this.onMouseEvent.bind(this, "gutterdblclick"));
+    event.addListener(gutterEl, "mousemove", this.onMouseEvent.bind(this, "guttermousemove"));
+
+    event.addListener(mouseTarget, "mousedown", focusEditor);
+    event.addListener(gutterEl, "mousedown", focusEditor);
+    if (useragent.isIE && editor.renderer.scrollBarV) {
+        event.addListener(editor.renderer.scrollBarV.element, "mousedown", focusEditor);
+        event.addListener(editor.renderer.scrollBarH.element, "mousedown", focusEditor);
+    }
+
+    editor.on("mousemove", function(e){
+        if (_self.state || _self.$dragDelay || !_self.$dragEnabled)
+            return;
+
+        var character = editor.renderer.screenToTextCoordinates(e.x, e.y);
+        var range = editor.session.selection.getRange();
+        var renderer = editor.renderer;
+
+        if (!range.isEmpty() && range.insideStart(character.row, character.column)) {
+            renderer.setCursorStyle("default");
+        } else {
+            renderer.setCursorStyle("");
+        }
+    });
+};
+
+(function() {
+    this.onMouseEvent = function(name, e) {
+        this.editor._emit(name, new MouseEvent(e, this.editor));
+    };
+
+    this.onMouseMove = function(name, e) {
+        var listeners = this.editor._eventRegistry && this.editor._eventRegistry.mousemove;
+        if (!listeners || !listeners.length)
+            return;
+
+        this.editor._emit(name, new MouseEvent(e, this.editor));
+    };
+
+    this.onMouseWheel = function(name, e) {
+        var mouseEvent = new MouseEvent(e, this.editor);
+        mouseEvent.speed = this.$scrollSpeed * 2;
+        mouseEvent.wheelX = e.wheelX;
+        mouseEvent.wheelY = e.wheelY;
+
+        this.editor._emit(name, mouseEvent);
+    };
+    
+    this.onTouchMove = function (name, e) {
+        var mouseEvent = new MouseEvent(e, this.editor);
+        mouseEvent.speed = 1;//this.$scrollSpeed * 2;
+        mouseEvent.wheelX = e.wheelX;
+        mouseEvent.wheelY = e.wheelY;
+        this.editor._emit(name, mouseEvent);
+    };
+
+    this.setState = function(state) {
+        this.state = state;
+    };
+
+    this.captureMouse = function(ev, mouseMoveHandler) {
+        this.x = ev.x;
+        this.y = ev.y;
+
+        this.isMousePressed = true;
+        var renderer = this.editor.renderer;
+        if (renderer.$keepTextAreaAtCursor)
+            renderer.$keepTextAreaAtCursor = null;
+
+        var self = this;
+        var onMouseMove = function(e) {
+            if (!e) return;
+            if (useragent.isWebKit && !e.which && self.releaseMouse)
+                return self.releaseMouse();
+
+            self.x = e.clientX;
+            self.y = e.clientY;
+            mouseMoveHandler && mouseMoveHandler(e);
+            self.mouseEvent = new MouseEvent(e, self.editor);
+            self.$mouseMoved = true;
+        };
+
+        var onCaptureEnd = function(e) {
+            clearInterval(timerId);
+            onCaptureInterval();
+            self[self.state + "End"] && self[self.state + "End"](e);
+            self.state = "";
+            if (renderer.$keepTextAreaAtCursor == null) {
+                renderer.$keepTextAreaAtCursor = true;
+                renderer.$moveTextAreaToCursor();
+            }
+            self.isMousePressed = false;
+            self.$onCaptureMouseMove = self.releaseMouse = null;
+            e && self.onMouseEvent("mouseup", e);
+        };
+
+        var onCaptureInterval = function() {
+            self[self.state] && self[self.state]();
+            self.$mouseMoved = false;
+        };
+
+        if (useragent.isOldIE && ev.domEvent.type == "dblclick") {
+            return setTimeout(function() {onCaptureEnd(ev);});
+        }
+
+        self.$onCaptureMouseMove = onMouseMove;
+        self.releaseMouse = event.capture(this.editor.container, onMouseMove, onCaptureEnd);
+        var timerId = setInterval(onCaptureInterval, 20);
+    };
+    this.releaseMouse = null;
+    this.cancelContextMenu = function() {
+        var stop = function(e) {
+            if (e && e.domEvent && e.domEvent.type != "contextmenu")
+                return;
+            this.editor.off("nativecontextmenu", stop);
+            if (e && e.domEvent)
+                event.stopEvent(e.domEvent);
+        }.bind(this);
+        setTimeout(stop, 10);
+        this.editor.on("nativecontextmenu", stop);
+    };
+}).call(MouseHandler.prototype);
+
+config.defineOptions(MouseHandler.prototype, "mouseHandler", {
+    scrollSpeed: {initialValue: 2},
+    dragDelay: {initialValue: (useragent.isMac ? 150 : 0)},
+    dragEnabled: {initialValue: true},
+    focusTimout: {initialValue: 0},
+    tooltipFollowsMouse: {initialValue: true}
+});
+
+
+exports.MouseHandler = MouseHandler;
+});
+
+define("ace/mouse/fold_handler",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+function FoldHandler(editor) {
+
+    editor.on("click", function(e) {
+        var position = e.getDocumentPosition();
+        var session = editor.session;
+        var fold = session.getFoldAt(position.row, position.column, 1);
+        if (fold) {
+            if (e.getAccelKey())
+                session.removeFold(fold);
+            else
+                session.expandFold(fold);
+
+            e.stop();
+        }
+    });
+
+    editor.on("gutterclick", function(e) {
+        var gutterRegion = editor.renderer.$gutterLayer.getRegion(e);
+
+        if (gutterRegion == "foldWidgets") {
+            var row = e.getDocumentPosition().row;
+            var session = editor.session;
+            if (session.foldWidgets && session.foldWidgets[row])
+                editor.session.onFoldWidgetClick(row, e);
+            if (!editor.isFocused())
+                editor.focus();
+            e.stop();
+        }
+    });
+
+    editor.on("gutterdblclick", function(e) {
+        var gutterRegion = editor.renderer.$gutterLayer.getRegion(e);
+
+        if (gutterRegion == "foldWidgets") {
+            var row = e.getDocumentPosition().row;
+            var session = editor.session;
+            var data = session.getParentFoldRangeData(row, true);
+            var range = data.range || data.firstRange;
+
+            if (range) {
+                row = range.start.row;
+                var fold = session.getFoldAt(row, session.getLine(row).length, 1);
+
+                if (fold) {
+                    session.removeFold(fold);
+                } else {
+                    session.addFold("...", range);
+                    editor.renderer.scrollCursorIntoView({row: range.start.row, column: 0});
+                }
+            }
+            e.stop();
+        }
+    });
+}
+
+exports.FoldHandler = FoldHandler;
+
+});
+
+define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"], function(require, exports, module) {
+"use strict";
+
+var keyUtil  = require("../lib/keys");
+var event = require("../lib/event");
+
+var KeyBinding = function(editor) {
+    this.$editor = editor;
+    this.$data = {editor: editor};
+    this.$handlers = [];
+    this.setDefaultHandler(editor.commands);
+};
+
+(function() {
+    this.setDefaultHandler = function(kb) {
+        this.removeKeyboardHandler(this.$defaultHandler);
+        this.$defaultHandler = kb;
+        this.addKeyboardHandler(kb, 0);
+    };
+
+    this.setKeyboardHandler = function(kb) {
+        var h = this.$handlers;
+        if (h[h.length - 1] == kb)
+            return;
+
+        while (h[h.length - 1] && h[h.length - 1] != this.$defaultHandler)
+            this.removeKeyboardHandler(h[h.length - 1]);
+
+        this.addKeyboardHandler(kb, 1);
+    };
+
+    this.addKeyboardHandler = function(kb, pos) {
+        if (!kb)
+            return;
+        if (typeof kb == "function" && !kb.handleKeyboard)
+            kb.handleKeyboard = kb;
+        var i = this.$handlers.indexOf(kb);
+        if (i != -1)
+            this.$handlers.splice(i, 1);
+
+        if (pos == undefined)
+            this.$handlers.push(kb);
+        else
+            this.$handlers.splice(pos, 0, kb);
+
+        if (i == -1 && kb.attach)
+            kb.attach(this.$editor);
+    };
+
+    this.removeKeyboardHandler = function(kb) {
+        var i = this.$handlers.indexOf(kb);
+        if (i == -1)
+            return false;
+        this.$handlers.splice(i, 1);
+        kb.detach && kb.detach(this.$editor);
+        return true;
+    };
+
+    this.getKeyboardHandler = function() {
+        return this.$handlers[this.$handlers.length - 1];
+    };
+    
+    this.getStatusText = function() {
+        var data = this.$data;
+        var editor = data.editor;
+        return this.$handlers.map(function(h) {
+            return h.getStatusText && h.getStatusText(editor, data) || "";
+        }).filter(Boolean).join(" ");
+    };
+
+    this.$callKeyboardHandlers = function(hashId, keyString, keyCode, e) {
+        var toExecute;
+        var success = false;
+        var commands = this.$editor.commands;
+
+        for (var i = this.$handlers.length; i--;) {
+            toExecute = this.$handlers[i].handleKeyboard(
+                this.$data, hashId, keyString, keyCode, e
+            );
+            if (!toExecute || !toExecute.command)
+                continue;
+            if (toExecute.command == "null") {
+                success = true;
+            } else {
+                success = commands.exec(toExecute.command, this.$editor, toExecute.args, e);
+            }
+            if (success && e && hashId != -1 && 
+                toExecute.passEvent != true && toExecute.command.passEvent != true
+            ) {
+                event.stopEvent(e);
+            }
+            if (success)
+                break;
+        }
+        
+        if (!success && hashId == -1) {
+            toExecute = {command: "insertstring"};
+            success = commands.exec("insertstring", this.$editor, keyString);
+        }
+        
+        if (success)
+            this.$editor._signal("keyboardActivity", toExecute);
+        
+        return success;
+    };
+
+    this.onCommandKey = function(e, hashId, keyCode) {
+        var keyString = keyUtil.keyCodeToString(keyCode);
+        this.$callKeyboardHandlers(hashId, keyString, keyCode, e);
+    };
+
+    this.onTextInput = function(text) {
+        this.$callKeyboardHandlers(-1, text);
+    };
+
+}).call(KeyBinding.prototype);
+
+exports.KeyBinding = KeyBinding;
+});
+
+define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+    return p1.row - p2.row || p1.column - p2.column;
+};
+var Range = function(startRow, startColumn, endRow, endColumn) {
+    this.start = {
+        row: startRow,
+        column: startColumn
+    };
+
+    this.end = {
+        row: endRow,
+        column: endColumn
+    };
+};
+
+(function() {
+    this.isEqual = function(range) {
+        return this.start.row === range.start.row &&
+            this.end.row === range.end.row &&
+            this.start.column === range.start.column &&
+            this.end.column === range.end.column;
+    };
+    this.toString = function() {
+        return ("Range: [" + this.start.row + "/" + this.start.column +
+            "] -> [" + this.end.row + "/" + this.end.column + "]");
+    };
+
+    this.contains = function(row, column) {
+        return this.compare(row, column) == 0;
+    };
+    this.compareRange = function(range) {
+        var cmp,
+            end = range.end,
+            start = range.start;
+
+        cmp = this.compare(end.row, end.column);
+        if (cmp == 1) {
+            cmp = this.compare(start.row, start.column);
+            if (cmp == 1) {
+                return 2;
+            } else if (cmp == 0) {
+                return 1;
+            } else {
+                return 0;
+            }
+        } else if (cmp == -1) {
+            return -2;
+        } else {
+            cmp = this.compare(start.row, start.column);
+            if (cmp == -1) {
+                return -1;
+            } else if (cmp == 1) {
+                return 42;
+            } else {
+                return 0;
+            }
+        }
+    };
+    this.comparePoint = function(p) {
+        return this.compare(p.row, p.column);
+    };
+    this.containsRange = function(range) {
+        return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
+    };
+    this.intersects = function(range) {
+        var cmp = this.compareRange(range);
+        return (cmp == -1 || cmp == 0 || cmp == 1);
+    };
+    this.isEnd = function(row, column) {
+        return this.end.row == row && this.end.column == column;
+    };
+    this.isStart = function(row, column) {
+        return this.start.row == row && this.start.column == column;
+    };
+    this.setStart = function(row, column) {
+        if (typeof row == "object") {
+            this.start.column = row.column;
+            this.start.row = row.row;
+        } else {
+            this.start.row = row;
+            this.start.column = column;
+        }
+    };
+    this.setEnd = function(row, column) {
+        if (typeof row == "object") {
+            this.end.column = row.column;
+            this.end.row = row.row;
+        } else {
+            this.end.row = row;
+            this.end.column = column;
+        }
+    };
+    this.inside = function(row, column) {
+        if (this.compare(row, column) == 0) {
+            if (this.isEnd(row, column) || this.isStart(row, column)) {
+                return false;
+            } else {
+                return true;
+            }
+        }
+        return false;
+    };
+    this.insideStart = function(row, column) {
+        if (this.compare(row, column) == 0) {
+            if (this.isEnd(row, column)) {
+                return false;
+            } else {
+                return true;
+            }
+        }
+        return false;
+    };
+    this.insideEnd = function(row, column) {
+        if (this.compare(row, column) == 0) {
+            if (this.isStart(row, column)) {
+                return false;
+            } else {
+                return true;
+            }
+        }
+        return false;
+    };
+    this.compare = function(row, column) {
+        if (!this.isMultiLine()) {
+            if (row === this.start.row) {
+                return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
+            }
+        }
+
+        if (row < this.start.row)
+            return -1;
+
+        if (row > this.end.row)
+            return 1;
+
+        if (this.start.row === row)
+            return column >= this.start.column ? 0 : -1;
+
+        if (this.end.row === row)
+            return column <= this.end.column ? 0 : 1;
+
+        return 0;
+    };
+    this.compareStart = function(row, column) {
+        if (this.start.row == row && this.start.column == column) {
+            return -1;
+        } else {
+            return this.compare(row, column);
+        }
+    };
+    this.compareEnd = function(row, column) {
+        if (this.end.row == row && this.end.column == column) {
+            return 1;
+        } else {
+            return this.compare(row, column);
+        }
+    };
+    this.compareInside = function(row, column) {
+        if (this.end.row == row && this.end.column == column) {
+            return 1;
+        } else if (this.start.row == row && this.start.column == column) {
+            return -1;
+        } else {
+            return this.compare(row, column);
+        }
+    };
+    this.clipRows = function(firstRow, lastRow) {
+        if (this.end.row > lastRow)
+            var end = {row: lastRow + 1, column: 0};
+        else if (this.end.row < firstRow)
+            var end = {row: firstRow, column: 0};
+
+        if (this.start.row > lastRow)
+            var start = {row: lastRow + 1, column: 0};
+        else if (this.start.row < firstRow)
+            var start = {row: firstRow, column: 0};
+
+        return Range.fromPoints(start || this.start, end || this.end);
+    };
+    this.extend = function(row, column) {
+        var cmp = this.compare(row, column);
+
+        if (cmp == 0)
+            return this;
+        else if (cmp == -1)
+            var start = {row: row, column: column};
+        else
+            var end = {row: row, column: column};
+
+        return Range.fromPoints(start || this.start, end || this.end);
+    };
+
+    this.isEmpty = function() {
+        return (this.start.row === this.end.row && this.start.column === this.end.column);
+    };
+    this.isMultiLine = function() {
+        return (this.start.row !== this.end.row);
+    };
+    this.clone = function() {
+        return Range.fromPoints(this.start, this.end);
+    };
+    this.collapseRows = function() {
+        if (this.end.column == 0)
+            return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
+        else
+            return new Range(this.start.row, 0, this.end.row, 0)
+    };
+    this.toScreenRange = function(session) {
+        var screenPosStart = session.documentToScreenPosition(this.start);
+        var screenPosEnd = session.documentToScreenPosition(this.end);
+
+        return new Range(
+            screenPosStart.row, screenPosStart.column,
+            screenPosEnd.row, screenPosEnd.column
+        );
+    };
+    this.moveBy = function(row, column) {
+        this.start.row += row;
+        this.start.column += column;
+        this.end.row += row;
+        this.end.column += column;
+    };
+
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+    return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
+
+Range.comparePoints = function(p1, p2) {
+    return p1.row - p2.row || p1.column - p2.column;
+};
+
+
+exports.Range = Range;
+});
+
+define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var lang = require("./lib/lang");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Selection = function(session) {
+    this.session = session;
+    this.doc = session.getDocument();
+
+    this.clearSelection();
+    this.lead = this.selectionLead = this.doc.createAnchor(0, 0);
+    this.anchor = this.selectionAnchor = this.doc.createAnchor(0, 0);
+
+    var self = this;
+    this.lead.on("change", function(e) {
+        self._emit("changeCursor");
+        if (!self.$isEmpty)
+            self._emit("changeSelection");
+        if (!self.$keepDesiredColumnOnChange && e.old.column != e.value.column)
+            self.$desiredColumn = null;
+    });
+
+    this.selectionAnchor.on("change", function() {
+        if (!self.$isEmpty)
+            self._emit("changeSelection");
+    });
+};
+
+(function() {
+
+    oop.implement(this, EventEmitter);
+    this.isEmpty = function() {
+        return (this.$isEmpty || (
+            this.anchor.row == this.lead.row &&
+            this.anchor.column == this.lead.column
+        ));
+    };
+    this.isMultiLine = function() {
+        if (this.isEmpty()) {
+            return false;
+        }
+
+        return this.getRange().isMultiLine();
+    };
+    this.getCursor = function() {
+        return this.lead.getPosition();
+    };
+    this.setSelectionAnchor = function(row, column) {
+        this.anchor.setPosition(row, column);
+
+        if (this.$isEmpty) {
+            this.$isEmpty = false;
+            this._emit("changeSelection");
+        }
+    };
+    this.getSelectionAnchor = function() {
+        if (this.$isEmpty)
+            return this.getSelectionLead();
+        else
+            return this.anchor.getPosition();
+    };
+    this.getSelectionLead = function() {
+        return this.lead.getPosition();
+    };
+    this.shiftSelection = function(columns) {
+        if (this.$isEmpty) {
+            this.moveCursorTo(this.lead.row, this.lead.column + columns);
+            return;
+        }
+
+        var anchor = this.getSelectionAnchor();
+        var lead = this.getSelectionLead();
+
+        var isBackwards = this.isBackwards();
+
+        if (!isBackwards || anchor.column !== 0)
+            this.setSelectionAnchor(anchor.row, anchor.column + columns);
+
+        if (isBackwards || lead.column !== 0) {
+            this.$moveSelection(function() {
+                this.moveCursorTo(lead.row, lead.column + columns);
+            });
+        }
+    };
+    this.isBackwards = function() {
+        var anchor = this.anchor;
+        var lead = this.lead;
+        return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column));
+    };
+    this.getRange = function() {
+        var anchor = this.anchor;
+        var lead = this.lead;
+
+        if (this.isEmpty())
+            return Range.fromPoints(lead, lead);
+
+        if (this.isBackwards()) {
+            return Range.fromPoints(lead, anchor);
+        }
+        else {
+            return Range.fromPoints(anchor, lead);
+        }
+    };
+    this.clearSelection = function() {
+        if (!this.$isEmpty) {
+            this.$isEmpty = true;
+            this._emit("changeSelection");
+        }
+    };
+    this.selectAll = function() {
+        var lastRow = this.doc.getLength() - 1;
+        this.setSelectionAnchor(0, 0);
+        this.moveCursorTo(lastRow, this.doc.getLine(lastRow).length);
+    };
+    this.setRange =
+    this.setSelectionRange = function(range, reverse) {
+        if (reverse) {
+            this.setSelectionAnchor(range.end.row, range.end.column);
+            this.selectTo(range.start.row, range.start.column);
+        } else {
+            this.setSelectionAnchor(range.start.row, range.start.column);
+            this.selectTo(range.end.row, range.end.column);
+        }
+        if (this.getRange().isEmpty())
+            this.$isEmpty = true;
+        this.$desiredColumn = null;
+    };
+
+    this.$moveSelection = function(mover) {
+        var lead = this.lead;
+        if (this.$isEmpty)
+            this.setSelectionAnchor(lead.row, lead.column);
+
+        mover.call(this);
+    };
+    this.selectTo = function(row, column) {
+        this.$moveSelection(function() {
+            this.moveCursorTo(row, column);
+        });
+    };
+    this.selectToPosition = function(pos) {
+        this.$moveSelection(function() {
+            this.moveCursorToPosition(pos);
+        });
+    };
+    this.moveTo = function(row, column) {
+        this.clearSelection();
+        this.moveCursorTo(row, column);
+    };
+    this.moveToPosition = function(pos) {
+        this.clearSelection();
+        this.moveCursorToPosition(pos);
+    };
+    this.selectUp = function() {
+        this.$moveSelection(this.moveCursorUp);
+    };
+    this.selectDown = function() {
+        this.$moveSelection(this.moveCursorDown);
+    };
+    this.selectRight = function() {
+        this.$moveSelection(this.moveCursorRight);
+    };
+    this.selectLeft = function() {
+        this.$moveSelection(this.moveCursorLeft);
+    };
+    this.selectLineStart = function() {
+        this.$moveSelection(this.moveCursorLineStart);
+    };
+    this.selectLineEnd = function() {
+        this.$moveSelection(this.moveCursorLineEnd);
+    };
+    this.selectFileEnd = function() {
+        this.$moveSelection(this.moveCursorFileEnd);
+    };
+    this.selectFileStart = function() {
+        this.$moveSelection(this.moveCursorFileStart);
+    };
+    this.selectWordRight = function() {
+        this.$moveSelection(this.moveCursorWordRight);
+    };
+    this.selectWordLeft = function() {
+        this.$moveSelection(this.moveCursorWordLeft);
+    };
+    this.getWordRange = function(row, column) {
+        if (typeof column == "undefined") {
+            var cursor = row || this.lead;
+            row = cursor.row;
+            column = cursor.column;
+        }
+        return this.session.getWordRange(row, column);
+    };
+    this.selectWord = function() {
+        this.setSelectionRange(this.getWordRange());
+    };
+    this.selectAWord = function() {
+        var cursor = this.getCursor();
+        var range = this.session.getAWordRange(cursor.row, cursor.column);
+        this.setSelectionRange(range);
+    };
+
+    this.getLineRange = function(row, excludeLastChar) {
+        var rowStart = typeof row == "number" ? row : this.lead.row;
+        var rowEnd;
+
+        var foldLine = this.session.getFoldLine(rowStart);
+        if (foldLine) {
+            rowStart = foldLine.start.row;
+            rowEnd = foldLine.end.row;
+        } else {
+            rowEnd = rowStart;
+        }
+        if (excludeLastChar === true)
+            return new Range(rowStart, 0, rowEnd, this.session.getLine(rowEnd).length);
+        else
+            return new Range(rowStart, 0, rowEnd + 1, 0);
+    };
+    this.selectLine = function() {
+        this.setSelectionRange(this.getLineRange());
+    };
+    this.moveCursorUp = function() {
+        this.moveCursorBy(-1, 0);
+    };
+    this.moveCursorDown = function() {
+        this.moveCursorBy(1, 0);
+    };
+    this.moveCursorLeft = function() {
+        var cursor = this.lead.getPosition(),
+            fold;
+
+        if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) {
+            this.moveCursorTo(fold.start.row, fold.start.column);
+        } else if (cursor.column === 0) {
+            if (cursor.row > 0) {
+                this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length);
+            }
+        }
+        else {
+            var tabSize = this.session.getTabSize();
+            if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column-tabSize, cursor.column).split(" ").length-1 == tabSize)
+                this.moveCursorBy(0, -tabSize);
+            else
+                this.moveCursorBy(0, -1);
+        }
+    };
+    this.moveCursorRight = function() {
+        var cursor = this.lead.getPosition(),
+            fold;
+        if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) {
+            this.moveCursorTo(fold.end.row, fold.end.column);
+        }
+        else if (this.lead.column == this.doc.getLine(this.lead.row).length) {
+            if (this.lead.row < this.doc.getLength() - 1) {
+                this.moveCursorTo(this.lead.row + 1, 0);
+            }
+        }
+        else {
+            var tabSize = this.session.getTabSize();
+            var cursor = this.lead;
+            if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column, cursor.column+tabSize).split(" ").length-1 == tabSize)
+                this.moveCursorBy(0, tabSize);
+            else
+                this.moveCursorBy(0, 1);
+        }
+    };
+    this.moveCursorLineStart = function() {
+        var row = this.lead.row;
+        var column = this.lead.column;
+        var screenRow = this.session.documentToScreenRow(row, column);
+        var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0);
+        var beforeCursor = this.session.getDisplayLine(
+            row, null, firstColumnPosition.row,
+            firstColumnPosition.column
+        );
+
+        var leadingSpace = beforeCursor.match(/^\s*/);
+        if (leadingSpace[0].length != column && !this.session.$useEmacsStyleLineStart)
+            firstColumnPosition.column += leadingSpace[0].length;
+        this.moveCursorToPosition(firstColumnPosition);
+    };
+    this.moveCursorLineEnd = function() {
+        var lead = this.lead;
+        var lineEnd = this.session.getDocumentLastRowColumnPosition(lead.row, lead.column);
+        if (this.lead.column == lineEnd.column) {
+            var line = this.session.getLine(lineEnd.row);
+            if (lineEnd.column == line.length) {
+                var textEnd = line.search(/\s+$/);
+                if (textEnd > 0)
+                    lineEnd.column = textEnd;
+            }
+        }
+
+        this.moveCursorTo(lineEnd.row, lineEnd.column);
+    };
+    this.moveCursorFileEnd = function() {
+        var row = this.doc.getLength() - 1;
+        var column = this.doc.getLine(row).length;
+        this.moveCursorTo(row, column);
+    };
+    this.moveCursorFileStart = function() {
+        this.moveCursorTo(0, 0);
+    };
+    this.moveCursorLongWordRight = function() {
+        var row = this.lead.row;
+        var column = this.lead.column;
+        var line = this.doc.getLine(row);
+        var rightOfCursor = line.substring(column);
+
+        var match;
+        this.session.nonTokenRe.lastIndex = 0;
+        this.session.tokenRe.lastIndex = 0;
+        var fold = this.session.getFoldAt(row, column, 1);
+        if (fold) {
+            this.moveCursorTo(fold.end.row, fold.end.column);
+            return;
+        }
+        if (match = this.session.nonTokenRe.exec(rightOfCursor)) {
+            column += this.session.nonTokenRe.lastIndex;
+            this.session.nonTokenRe.lastIndex = 0;
+            rightOfCursor = line.substring(column);
+        }
+        if (column >= line.length) {
+            this.moveCursorTo(row, line.length);
+            this.moveCursorRight();
+            if (row < this.doc.getLength() - 1)
+                this.moveCursorWordRight();
+            return;
+        }
+        if (match = this.session.tokenRe.exec(rightOfCursor)) {
+            column += this.session.tokenRe.lastIndex;
+            this.session.tokenRe.lastIndex = 0;
+        }
+
+        this.moveCursorTo(row, column);
+    };
+    this.moveCursorLongWordLeft = function() {
+        var row = this.lead.row;
+        var column = this.lead.column;
+        var fold;
+        if (fold = this.session.getFoldAt(row, column, -1)) {
+            this.moveCursorTo(fold.start.row, fold.start.column);
+            return;
+        }
+
+        var str = this.session.getFoldStringAt(row, column, -1);
+        if (str == null) {
+            str = this.doc.getLine(row).substring(0, column);
+        }
+
+        var leftOfCursor = lang.stringReverse(str);
+        var match;
+        this.session.nonTokenRe.lastIndex = 0;
+        this.session.tokenRe.lastIndex = 0;
+        if (match = this.session.nonTokenRe.exec(leftOfCursor)) {
+            column -= this.session.nonTokenRe.lastIndex;
+            leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex);
+            this.session.nonTokenRe.lastIndex = 0;
+        }
+        if (column <= 0) {
+            this.moveCursorTo(row, 0);
+            this.moveCursorLeft();
+            if (row > 0)
+                this.moveCursorWordLeft();
+            return;
+        }
+        if (match = this.session.tokenRe.exec(leftOfCursor)) {
+            column -= this.session.tokenRe.lastIndex;
+            this.session.tokenRe.lastIndex = 0;
+        }
+
+        this.moveCursorTo(row, column);
+    };
+
+    this.$shortWordEndIndex = function(rightOfCursor) {
+        var match, index = 0, ch;
+        var whitespaceRe = /\s/;
+        var tokenRe = this.session.tokenRe;
+
+        tokenRe.lastIndex = 0;
+        if (match = this.session.tokenRe.exec(rightOfCursor)) {
+            index = this.session.tokenRe.lastIndex;
+        } else {
+            while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))
+                index ++;
+
+            if (index < 1) {
+                tokenRe.lastIndex = 0;
+                 while ((ch = rightOfCursor[index]) && !tokenRe.test(ch)) {
+                    tokenRe.lastIndex = 0;
+                    index ++;
+                    if (whitespaceRe.test(ch)) {
+                        if (index > 2) {
+                            index--;
+                            break;
+                        } else {
+                            while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))
+                                index ++;
+                            if (index > 2)
+                                break;
+                        }
+                    }
+                }
+            }
+        }
+        tokenRe.lastIndex = 0;
+
+        return index;
+    };
+
+    this.moveCursorShortWordRight = function() {
+        var row = this.lead.row;
+        var column = this.lead.column;
+        var line = this.doc.getLine(row);
+        var rightOfCursor = line.substring(column);
+
+        var fold = this.session.getFoldAt(row, column, 1);
+        if (fold)
+            return this.moveCursorTo(fold.end.row, fold.end.column);
+
+        if (column == line.length) {
+            var l = this.doc.getLength();
+            do {
+                row++;
+                rightOfCursor = this.doc.getLine(row);
+            } while (row < l && /^\s*$/.test(rightOfCursor));
+
+            if (!/^\s+/.test(rightOfCursor))
+                rightOfCursor = "";
+            column = 0;
+        }
+
+        var index = this.$shortWordEndIndex(rightOfCursor);
+
+        this.moveCursorTo(row, column + index);
+    };
+
+    this.moveCursorShortWordLeft = function() {
+        var row = this.lead.row;
+        var column = this.lead.column;
+
+        var fold;
+        if (fold = this.session.getFoldAt(row, column, -1))
+            return this.moveCursorTo(fold.start.row, fold.start.column);
+
+        var line = this.session.getLine(row).substring(0, column);
+        if (column === 0) {
+            do {
+                row--;
+                line = this.doc.getLine(row);
+            } while (row > 0 && /^\s*$/.test(line));
+
+            column = line.length;
+            if (!/\s+$/.test(line))
+                line = "";
+        }
+
+        var leftOfCursor = lang.stringReverse(line);
+        var index = this.$shortWordEndIndex(leftOfCursor);
+
+        return this.moveCursorTo(row, column - index);
+    };
+
+    this.moveCursorWordRight = function() {
+        if (this.session.$selectLongWords)
+            this.moveCursorLongWordRight();
+        else
+            this.moveCursorShortWordRight();
+    };
+
+    this.moveCursorWordLeft = function() {
+        if (this.session.$selectLongWords)
+            this.moveCursorLongWordLeft();
+        else
+            this.moveCursorShortWordLeft();
+    };
+    this.moveCursorBy = function(rows, chars) {
+        var screenPos = this.session.documentToScreenPosition(
+            this.lead.row,
+            this.lead.column
+        );
+
+        if (chars === 0) {
+            if (this.$desiredColumn)
+                screenPos.column = this.$desiredColumn;
+            else
+                this.$desiredColumn = screenPos.column;
+        }
+
+        var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column);
+        
+        if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) {
+            if (this.session.lineWidgets && this.session.lineWidgets[docPos.row]) {
+                if (docPos.row > 0 || rows > 0)
+                    docPos.row++;
+            }
+        }
+        this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0);
+    };
+    this.moveCursorToPosition = function(position) {
+        this.moveCursorTo(position.row, position.column);
+    };
+    this.moveCursorTo = function(row, column, keepDesiredColumn) {
+        var fold = this.session.getFoldAt(row, column, 1);
+        if (fold) {
+            row = fold.start.row;
+            column = fold.start.column;
+        }
+
+        this.$keepDesiredColumnOnChange = true;
+        this.lead.setPosition(row, column);
+        this.$keepDesiredColumnOnChange = false;
+
+        if (!keepDesiredColumn)
+            this.$desiredColumn = null;
+    };
+    this.moveCursorToScreen = function(row, column, keepDesiredColumn) {
+        var pos = this.session.screenToDocumentPosition(row, column);
+        this.moveCursorTo(pos.row, pos.column, keepDesiredColumn);
+    };
+    this.detach = function() {
+        this.lead.detach();
+        this.anchor.detach();
+        this.session = this.doc = null;
+    };
+
+    this.fromOrientedRange = function(range) {
+        this.setSelectionRange(range, range.cursor == range.start);
+        this.$desiredColumn = range.desiredColumn || this.$desiredColumn;
+    };
+
+    this.toOrientedRange = function(range) {
+        var r = this.getRange();
+        if (range) {
+            range.start.column = r.start.column;
+            range.start.row = r.start.row;
+            range.end.column = r.end.column;
+            range.end.row = r.end.row;
+        } else {
+            range = r;
+        }
+
+        range.cursor = this.isBackwards() ? range.start : range.end;
+        range.desiredColumn = this.$desiredColumn;
+        return range;
+    };
+    this.getRangeOfMovements = function(func) {
+        var start = this.getCursor();
+        try {
+            func(this);
+            var end = this.getCursor();
+            return Range.fromPoints(start,end);
+        } catch(e) {
+            return Range.fromPoints(start,start);
+        } finally {
+            this.moveCursorToPosition(start);
+        }
+    };
+
+    this.toJSON = function() {
+        if (this.rangeCount) {
+            var data = this.ranges.map(function(r) {
+                var r1 = r.clone();
+                r1.isBackwards = r.cursor == r.start;
+                return r1;
+            });
+        } else {
+            var data = this.getRange();
+            data.isBackwards = this.isBackwards();
+        }
+        return data;
+    };
+
+    this.fromJSON = function(data) {
+        if (data.start == undefined) {
+            if (this.rangeList) {
+                this.toSingleRange(data[0]);
+                for (var i = data.length; i--; ) {
+                    var r = Range.fromPoints(data[i].start, data[i].end);
+                    if (data[i].isBackwards)
+                        r.cursor = r.start;
+                    this.addRange(r, true);
+                }
+                return;
+            } else
+                data = data[0];
+        }
+        if (this.rangeList)
+            this.toSingleRange(data);
+        this.setSelectionRange(data, data.isBackwards);
+    };
+
+    this.isEqual = function(data) {
+        if ((data.length || this.rangeCount) && data.length != this.rangeCount)
+            return false;
+        if (!data.length || !this.ranges)
+            return this.getRange().isEqual(data);
+
+        for (var i = this.ranges.length; i--; ) {
+            if (!this.ranges[i].isEqual(data[i]))
+                return false;
+        }
+        return true;
+    };
+
+}).call(Selection.prototype);
+
+exports.Selection = Selection;
+});
+
+define("ace/tokenizer",["require","exports","module","ace/config"], function(require, exports, module) {
+"use strict";
+
+var config = require("./config");
+var MAX_TOKEN_COUNT = 2000;
+var Tokenizer = function(rules) {
+    this.states = rules;
+
+    this.regExps = {};
+    this.matchMappings = {};
+    for (var key in this.states) {
+        var state = this.states[key];
+        var ruleRegExps = [];
+        var matchTotal = 0;
+        var mapping = this.matchMappings[key] = {defaultToken: "text"};
+        var flag = "g";
+
+        var splitterRurles = [];
+        for (var i = 0; i < state.length; i++) {
+            var rule = state[i];
+            if (rule.defaultToken)
+                mapping.defaultToken = rule.defaultToken;
+            if (rule.caseInsensitive)
+                flag = "gi";
+            if (rule.regex == null)
+                continue;
+
+            if (rule.regex instanceof RegExp)
+                rule.regex = rule.regex.toString().slice(1, -1);
+            var adjustedregex = rule.regex;
+            var matchcount = new RegExp("(?:(" + adjustedregex + ")|(.))").exec("a").length - 2;
+            if (Array.isArray(rule.token)) {
+                if (rule.token.length == 1 || matchcount == 1) {
+                    rule.token = rule.token[0];
+                } else if (matchcount - 1 != rule.token.length) {
+                    this.reportError("number of classes and regexp groups doesn't match", { 
+                        rule: rule,
+                        groupCount: matchcount - 1
+                    });
+                    rule.token = rule.token[0];
+                } else {
+                    rule.tokenArray = rule.token;
+                    rule.token = null;
+                    rule.onMatch = this.$arrayTokens;
+                }
+            } else if (typeof rule.token == "function" && !rule.onMatch) {
+                if (matchcount > 1)
+                    rule.onMatch = this.$applyToken;
+                else
+                    rule.onMatch = rule.token;
+            }
+
+            if (matchcount > 1) {
+                if (/\\\d/.test(rule.regex)) {
+                    adjustedregex = rule.regex.replace(/\\([0-9]+)/g, function(match, digit) {
+                        return "\\" + (parseInt(digit, 10) + matchTotal + 1);
+                    });
+                } else {
+                    matchcount = 1;
+                    adjustedregex = this.removeCapturingGroups(rule.regex);
+                }
+                if (!rule.splitRegex && typeof rule.token != "string")
+                    splitterRurles.push(rule); // flag will be known only at the very end
+            }
+
+            mapping[matchTotal] = i;
+            matchTotal += matchcount;
+
+            ruleRegExps.push(adjustedregex);
+            if (!rule.onMatch)
+                rule.onMatch = null;
+        }
+        
+        if (!ruleRegExps.length) {
+            mapping[0] = 0;
+            ruleRegExps.push("$");
+        }
+        
+        splitterRurles.forEach(function(rule) {
+            rule.splitRegex = this.createSplitterRegexp(rule.regex, flag);
+        }, this);
+
+        this.regExps[key] = new RegExp("(" + ruleRegExps.join(")|(") + ")|($)", flag);
+    }
+};
+
+(function() {
+    this.$setMaxTokenCount = function(m) {
+        MAX_TOKEN_COUNT = m | 0;
+    };
+    
+    this.$applyToken = function(str) {
+        var values = this.splitRegex.exec(str).slice(1);
+        var types = this.token.apply(this, values);
+        if (typeof types === "string")
+            return [{type: types, value: str}];
+
+        var tokens = [];
+        for (var i = 0, l = types.length; i < l; i++) {
+            if (values[i])
+                tokens[tokens.length] = {
+                    type: types[i],
+                    value: values[i]
+                };
+        }
+        return tokens;
+    };
+
+    this.$arrayTokens = function(str) {
+        if (!str)
+            return [];
+        var values = this.splitRegex.exec(str);
+        if (!values)
+            return "text";
+        var tokens = [];
+        var types = this.tokenArray;
+        for (var i = 0, l = types.length; i < l; i++) {
+            if (values[i + 1])
+                tokens[tokens.length] = {
+                    type: types[i],
+                    value: values[i + 1]
+                };
+        }
+        return tokens;
+    };
+
+    this.removeCapturingGroups = function(src) {
+        var r = src.replace(
+            /\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,
+            function(x, y) {return y ? "(?:" : x;}
+        );
+        return r;
+    };
+
+    this.createSplitterRegexp = function(src, flag) {
+        if (src.indexOf("(?=") != -1) {
+            var stack = 0;
+            var inChClass = false;
+            var lastCapture = {};
+            src.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g, function(
+                m, esc, parenOpen, parenClose, square, index
+            ) {
+                if (inChClass) {
+                    inChClass = square != "]";
+                } else if (square) {
+                    inChClass = true;
+                } else if (parenClose) {
+                    if (stack == lastCapture.stack) {
+                        lastCapture.end = index+1;
+                        lastCapture.stack = -1;
+                    }
+                    stack--;
+                } else if (parenOpen) {
+                    stack++;
+                    if (parenOpen.length != 1) {
+                        lastCapture.stack = stack
+                        lastCapture.start = index;
+                    }
+                }
+                return m;
+            });
+
+            if (lastCapture.end != null && /^\)*$/.test(src.substr(lastCapture.end)))
+                src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end);
+        }
+        if (src.charAt(0) != "^") src = "^" + src;
+        if (src.charAt(src.length - 1) != "$") src += "$";
+        
+        return new RegExp(src, (flag||"").replace("g", ""));
+    };
+    this.getLineTokens = function(line, startState) {
+        if (startState && typeof startState != "string") {
+            var stack = startState.slice(0);
+            startState = stack[0];
+            if (startState === "#tmp") {
+                stack.shift()
+                startState = stack.shift()
+            }
+        } else
+            var stack = [];
+
+        var currentState = startState || "start";
+        var state = this.states[currentState];
+        if (!state) {
+            currentState = "start";
+            state = this.states[currentState];
+        }
+        var mapping = this.matchMappings[currentState];
+        var re = this.regExps[currentState];
+        re.lastIndex = 0;
+
+        var match, tokens = [];
+        var lastIndex = 0;
+        var matchAttempts = 0;
+
+        var token = {type: null, value: ""};
+
+        while (match = re.exec(line)) {
+            var type = mapping.defaultToken;
+            var rule = null;
+            var value = match[0];
+            var index = re.lastIndex;
+
+            if (index - value.length > lastIndex) {
+                var skipped = line.substring(lastIndex, index - value.length);
+                if (token.type == type) {
+                    token.value += skipped;
+                } else {
+                    if (token.type)
+                        tokens.push(token);
+                    token = {type: type, value: skipped};
+                }
+            }
+
+            for (var i = 0; i < match.length-2; i++) {
+                if (match[i + 1] === undefined)
+                    continue;
+
+                rule = state[mapping[i]];
+
+                if (rule.onMatch)
+                    type = rule.onMatch(value, currentState, stack);
+                else
+                    type = rule.token;
+
+                if (rule.next) {
+                    if (typeof rule.next == "string") {
+                        currentState = rule.next;
+                    } else {
+                        currentState = rule.next(currentState, stack);
+                    }
+                    
+                    state = this.states[currentState];
+                    if (!state) {
+                        this.reportError("state doesn't exist", currentState);
+                        currentState = "start";
+                        state = this.states[currentState];
+                    }
+                    mapping = this.matchMappings[currentState];
+                    lastIndex = index;
+                    re = this.regExps[currentState];
+                    re.lastIndex = index;
+                }
+                break;
+            }
+
+            if (value) {
+                if (typeof type === "string") {
+                    if ((!rule || rule.merge !== false) && token.type === type) {
+                        token.value += value;
+                    } else {
+                        if (token.type)
+                            tokens.push(token);
+                        token = {type: type, value: value};
+                    }
+                } else if (type) {
+                    if (token.type)
+                        tokens.push(token);
+                    token = {type: null, value: ""};
+                    for (var i = 0; i < type.length; i++)
+                        tokens.push(type[i]);
+                }
+            }
+
+            if (lastIndex == line.length)
+                break;
+
+            lastIndex = index;
+
+            if (matchAttempts++ > MAX_TOKEN_COUNT) {
+                if (matchAttempts > 2 * line.length) {
+                    this.reportError("infinite loop with in ace tokenizer", {
+                        startState: startState,
+                        line: line
+                    });
+                }
+                while (lastIndex < line.length) {
+                    if (token.type)
+                        tokens.push(token);
+                    token = {
+                        value: line.substring(lastIndex, lastIndex += 2000),
+                        type: "overflow"
+                    };
+                }
+                currentState = "start";
+                stack = [];
+                break;
+            }
+        }
+
+        if (token.type)
+            tokens.push(token);
+        
+        if (stack.length > 1) {
+            if (stack[0] !== currentState)
+                stack.unshift("#tmp", currentState);
+        }
+        return {
+            tokens : tokens,
+            state : stack.length ? stack : currentState
+        };
+    };
+    
+    this.reportError = config.reportError;
+    
+}).call(Tokenizer.prototype);
+
+exports.Tokenizer = Tokenizer;
+});
+
+define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var lang = require("../lib/lang");
+
+var TextHighlightRules = function() {
+
+    this.$rules = {
+        "start" : [{
+            token : "empty_line",
+            regex : '^$'
+        }, {
+            defaultToken : "text"
+        }]
+    };
+};
+
+(function() {
+
+    this.addRules = function(rules, prefix) {
+        if (!prefix) {
+            for (var key in rules)
+                this.$rules[key] = rules[key];
+            return;
+        }
+        for (var key in rules) {
+            var state = rules[key];
+            for (var i = 0; i < state.length; i++) {
+                var rule = state[i];
+                if (rule.next || rule.onMatch) {
+                    if (typeof rule.next == "string") {
+                        if (rule.next.indexOf(prefix) !== 0)
+                            rule.next = prefix + rule.next;
+                    }
+                    if (rule.nextState && rule.nextState.indexOf(prefix) !== 0)
+                        rule.nextState = prefix + rule.nextState;
+                }
+            }
+            this.$rules[prefix + key] = state;
+        }
+    };
+
+    this.getRules = function() {
+        return this.$rules;
+    };
+
+    this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) {
+        var embedRules = typeof HighlightRules == "function"
+            ? new HighlightRules().getRules()
+            : HighlightRules;
+        if (states) {
+            for (var i = 0; i < states.length; i++)
+                states[i] = prefix + states[i];
+        } else {
+            states = [];
+            for (var key in embedRules)
+                states.push(prefix + key);
+        }
+
+        this.addRules(embedRules, prefix);
+
+        if (escapeRules) {
+            var addRules = Array.prototype[append ? "push" : "unshift"];
+            for (var i = 0; i < states.length; i++)
+                addRules.apply(this.$rules[states[i]], lang.deepCopy(escapeRules));
+        }
+
+        if (!this.$embeds)
+            this.$embeds = [];
+        this.$embeds.push(prefix);
+    };
+
+    this.getEmbeds = function() {
+        return this.$embeds;
+    };
+
+    var pushState = function(currentState, stack) {
+        if (currentState != "start" || stack.length)
+            stack.unshift(this.nextState, currentState);
+        return this.nextState;
+    };
+    var popState = function(currentState, stack) {
+        stack.shift();
+        return stack.shift() || "start";
+    };
+
+    this.normalizeRules = function() {
+        var id = 0;
+        var rules = this.$rules;
+        function processState(key) {
+            var state = rules[key];
+            state.processed = true;
+            for (var i = 0; i < state.length; i++) {
+                var rule = state[i];
+                var toInsert = null;
+                if (Array.isArray(rule)) {
+                    toInsert = rule;
+                    rule = {};
+                }
+                if (!rule.regex && rule.start) {
+                    rule.regex = rule.start;
+                    if (!rule.next)
+                        rule.next = [];
+                    rule.next.push({
+                        defaultToken: rule.token
+                    }, {
+                        token: rule.token + ".end",
+                        regex: rule.end || rule.start,
+                        next: "pop"
+                    });
+                    rule.token = rule.token + ".start";
+                    rule.push = true;
+                }
+                var next = rule.next || rule.push;
+                if (next && Array.isArray(next)) {
+                    var stateName = rule.stateName;
+                    if (!stateName)  {
+                        stateName = rule.token;
+                        if (typeof stateName != "string")
+                            stateName = stateName[0] || "";
+                        if (rules[stateName])
+                            stateName += id++;
+                    }
+                    rules[stateName] = next;
+                    rule.next = stateName;
+                    processState(stateName);
+                } else if (next == "pop") {
+                    rule.next = popState;
+                }
+
+                if (rule.push) {
+                    rule.nextState = rule.next || rule.push;
+                    rule.next = pushState;
+                    delete rule.push;
+                }
+
+                if (rule.rules) {
+                    for (var r in rule.rules) {
+                        if (rules[r]) {
+                            if (rules[r].push)
+                                rules[r].push.apply(rules[r], rule.rules[r]);
+                        } else {
+                            rules[r] = rule.rules[r];
+                        }
+                    }
+                }
+                var includeName = typeof rule == "string"
+                    ? rule
+                    : typeof rule.include == "string"
+                    ? rule.include
+                    : "";
+                if (includeName) {
+                    toInsert = rules[includeName];
+                }
+
+                if (toInsert) {
+                    var args = [i, 1].concat(toInsert);
+                    if (rule.noEscape)
+                        args = args.filter(function(x) {return !x.next;});
+                    state.splice.apply(state, args);
+                    i--;
+                }
+                
+                if (rule.keywordMap) {
+                    rule.token = this.createKeywordMapper(
+                        rule.keywordMap, rule.defaultToken || "text", rule.caseInsensitive
+                    );
+                    delete rule.defaultToken;
+                }
+            }
+        }
+        Object.keys(rules).forEach(processState, this);
+    };
+
+    this.createKeywordMapper = function(map, defaultToken, ignoreCase, splitChar) {
+        var keywords = Object.create(null);
+        Object.keys(map).forEach(function(className) {
+            var a = map[className];
+            if (ignoreCase)
+                a = a.toLowerCase();
+            var list = a.split(splitChar || "|");
+            for (var i = list.length; i--; )
+                keywords[list[i]] = className;
+        });
+        if (Object.getPrototypeOf(keywords)) {
+            keywords.__proto__ = null;
+        }
+        this.$keywordList = Object.keys(keywords);
+        map = null;
+        return ignoreCase
+            ? function(value) {return keywords[value.toLowerCase()] || defaultToken }
+            : function(value) {return keywords[value] || defaultToken };
+    };
+
+    this.getKeywords = function() {
+        return this.$keywords;
+    };
+
+}).call(TextHighlightRules.prototype);
+
+exports.TextHighlightRules = TextHighlightRules;
+});
+
+define("ace/mode/behaviour",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var Behaviour = function() {
+   this.$behaviours = {};
+};
+
+(function () {
+
+    this.add = function (name, action, callback) {
+        switch (undefined) {
+          case this.$behaviours:
+              this.$behaviours = {};
+          case this.$behaviours[name]:
+              this.$behaviours[name] = {};
+        }
+        this.$behaviours[name][action] = callback;
+    }
+    
+    this.addBehaviours = function (behaviours) {
+        for (var key in behaviours) {
+            for (var action in behaviours[key]) {
+                this.add(key, action, behaviours[key][action]);
+            }
+        }
+    }
+    
+    this.remove = function (name) {
+        if (this.$behaviours && this.$behaviours[name]) {
+            delete this.$behaviours[name];
+        }
+    }
+    
+    this.inherit = function (mode, filter) {
+        if (typeof mode === "function") {
+            var behaviours = new mode().getBehaviours(filter);
+        } else {
+            var behaviours = mode.getBehaviours(filter);
+        }
+        this.addBehaviours(behaviours);
+    }
+    
+    this.getBehaviours = function (filter) {
+        if (!filter) {
+            return this.$behaviours;
+        } else {
+            var ret = {}
+            for (var i = 0; i < filter.length; i++) {
+                if (this.$behaviours[filter[i]]) {
+                    ret[filter[i]] = this.$behaviours[filter[i]];
+                }
+            }
+            return ret;
+        }
+    }
+
+}).call(Behaviour.prototype);
+
+exports.Behaviour = Behaviour;
+});
+
+define("ace/unicode",["require","exports","module"], function(require, exports, module) {
+"use strict";
+exports.packages = {};
+
+addUnicodePackage({
+    L:  "0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",
+    Ll: "0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",
+    Lu: "0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",
+    Lt: "01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",
+    Lm: "02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",
+    Lo: "01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",
+    M:  "0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",
+    Mn: "0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",
+    Mc: "0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",
+    Me: "0488048906DE20DD-20E020E2-20E4A670-A672",
+    N:  "0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",
+    Nd: "0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",
+    Nl: "16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",
+    No: "00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",
+    P:  "0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",
+    Pd: "002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",
+    Ps: "0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",
+    Pe: "0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",
+    Pi: "00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",
+    Pf: "00BB2019201D203A2E032E052E0A2E0D2E1D2E21",
+    Pc: "005F203F20402054FE33FE34FE4D-FE4FFF3F",
+    Po: "0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",
+    S:  "0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",
+    Sm: "002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",
+    Sc: "002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",
+    Sk: "005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",
+    So: "00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",
+    Z:  "002000A01680180E2000-200A20282029202F205F3000",
+    Zs: "002000A01680180E2000-200A202F205F3000",
+    Zl: "2028",
+    Zp: "2029",
+    C:  "0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",
+    Cc: "0000-001F007F-009F",
+    Cf: "00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",
+    Co: "E000-F8FF",
+    Cs: "D800-DFFF",
+    Cn: "03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"
+});
+
+function addUnicodePackage (pack) {
+    var codePoint = /\w{4}/g;
+    for (var name in pack)
+        exports.packages[name] = pack[name].replace(codePoint, "\\u$&");
+}
+
+});
+
+define("ace/token_iterator",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var TokenIterator = function(session, initialRow, initialColumn) {
+    this.$session = session;
+    this.$row = initialRow;
+    this.$rowTokens = session.getTokens(initialRow);
+
+    var token = session.getTokenAt(initialRow, initialColumn);
+    this.$tokenIndex = token ? token.index : -1;
+};
+
+(function() { 
+    this.stepBackward = function() {
+        this.$tokenIndex -= 1;
+        
+        while (this.$tokenIndex < 0) {
+            this.$row -= 1;
+            if (this.$row < 0) {
+                this.$row = 0;
+                return null;
+            }
+                
+            this.$rowTokens = this.$session.getTokens(this.$row);
+            this.$tokenIndex = this.$rowTokens.length - 1;
+        }
+            
+        return this.$rowTokens[this.$tokenIndex];
+    };   
+    this.stepForward = function() {
+        this.$tokenIndex += 1;
+        var rowCount;
+        while (this.$tokenIndex >= this.$rowTokens.length) {
+            this.$row += 1;
+            if (!rowCount)
+                rowCount = this.$session.getLength();
+            if (this.$row >= rowCount) {
+                this.$row = rowCount - 1;
+                return null;
+            }
+
+            this.$rowTokens = this.$session.getTokens(this.$row);
+            this.$tokenIndex = 0;
+        }
+            
+        return this.$rowTokens[this.$tokenIndex];
+    };      
+    this.getCurrentToken = function () {
+        return this.$rowTokens[this.$tokenIndex];
+    };      
+    this.getCurrentTokenRow = function () {
+        return this.$row;
+    };     
+    this.getCurrentTokenColumn = function() {
+        var rowTokens = this.$rowTokens;
+        var tokenIndex = this.$tokenIndex;
+        var column = rowTokens[tokenIndex].start;
+        if (column !== undefined)
+            return column;
+            
+        column = 0;
+        while (tokenIndex > 0) {
+            tokenIndex -= 1;
+            column += rowTokens[tokenIndex].value.length;
+        }
+        
+        return column;  
+    };
+    this.getCurrentTokenPosition = function() {
+        return {row: this.$row, column: this.getCurrentTokenColumn()};
+    };
+            
+}).call(TokenIterator.prototype);
+
+exports.TokenIterator = TokenIterator;
+});
+
+define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Tokenizer = require("../tokenizer").Tokenizer;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var Behaviour = require("./behaviour").Behaviour;
+var unicode = require("../unicode");
+var lang = require("../lib/lang");
+var TokenIterator = require("../token_iterator").TokenIterator;
+var Range = require("../range").Range;
+
+var Mode = function() {
+    this.HighlightRules = TextHighlightRules;
+    this.$behaviour = new Behaviour();
+};
+
+(function() {
+
+    this.tokenRe = new RegExp("^["
+        + unicode.packages.L
+        + unicode.packages.Mn + unicode.packages.Mc
+        + unicode.packages.Nd
+        + unicode.packages.Pc + "\\$_]+", "g"
+    );
+
+    this.nonTokenRe = new RegExp("^(?:[^"
+        + unicode.packages.L
+        + unicode.packages.Mn + unicode.packages.Mc
+        + unicode.packages.Nd
+        + unicode.packages.Pc + "\\$_]|\\s])+", "g"
+    );
+
+    this.getTokenizer = function() {
+        if (!this.$tokenizer) {
+            this.$highlightRules = this.$highlightRules || new this.HighlightRules();
+            this.$tokenizer = new Tokenizer(this.$highlightRules.getRules());
+        }
+        return this.$tokenizer;
+    };
+
+    this.lineCommentStart = "";
+    this.blockComment = "";
+
+    this.toggleCommentLines = function(state, session, startRow, endRow) {
+        var doc = session.doc;
+
+        var ignoreBlankLines = true;
+        var shouldRemove = true;
+        var minIndent = Infinity;
+        var tabSize = session.getTabSize();
+        var insertAtTabStop = false;
+
+        if (!this.lineCommentStart) {
+            if (!this.blockComment)
+                return false;
+            var lineCommentStart = this.blockComment.start;
+            var lineCommentEnd = this.blockComment.end;
+            var regexpStart = new RegExp("^(\\s*)(?:" + lang.escapeRegExp(lineCommentStart) + ")");
+            var regexpEnd = new RegExp("(?:" + lang.escapeRegExp(lineCommentEnd) + ")\\s*$");
+
+            var comment = function(line, i) {
+                if (testRemove(line, i))
+                    return;
+                if (!ignoreBlankLines || /\S/.test(line)) {
+                    doc.insertInLine({row: i, column: line.length}, lineCommentEnd);
+                    doc.insertInLine({row: i, column: minIndent}, lineCommentStart);
+                }
+            };
+
+            var uncomment = function(line, i) {
+                var m;
+                if (m = line.match(regexpEnd))
+                    doc.removeInLine(i, line.length - m[0].length, line.length);
+                if (m = line.match(regexpStart))
+                    doc.removeInLine(i, m[1].length, m[0].length);
+            };
+
+            var testRemove = function(line, row) {
+                if (regexpStart.test(line))
+                    return true;
+                var tokens = session.getTokens(row);
+                for (var i = 0; i < tokens.length; i++) {
+                    if (tokens[i].type === "comment")
+                        return true;
+                }
+            };
+        } else {
+            if (Array.isArray(this.lineCommentStart)) {
+                var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join("|");
+                var lineCommentStart = this.lineCommentStart[0];
+            } else {
+                var regexpStart = lang.escapeRegExp(this.lineCommentStart);
+                var lineCommentStart = this.lineCommentStart;
+            }
+            regexpStart = new RegExp("^(\\s*)(?:" + regexpStart + ") ?");
+            
+            insertAtTabStop = session.getUseSoftTabs();
+
+            var uncomment = function(line, i) {
+                var m = line.match(regexpStart);
+                if (!m) return;
+                var start = m[1].length, end = m[0].length;
+                if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == " ")
+                    end--;
+                doc.removeInLine(i, start, end);
+            };
+            var commentWithSpace = lineCommentStart + " ";
+            var comment = function(line, i) {
+                if (!ignoreBlankLines || /\S/.test(line)) {
+                    if (shouldInsertSpace(line, minIndent, minIndent))
+                        doc.insertInLine({row: i, column: minIndent}, commentWithSpace);
+                    else
+                        doc.insertInLine({row: i, column: minIndent}, lineCommentStart);
+                }
+            };
+            var testRemove = function(line, i) {
+                return regexpStart.test(line);
+            };
+            
+            var shouldInsertSpace = function(line, before, after) {
+                var spaces = 0;
+                while (before-- && line.charAt(before) == " ")
+                    spaces++;
+                if (spaces % tabSize != 0)
+                    return false;
+                var spaces = 0;
+                while (line.charAt(after++) == " ")
+                    spaces++;
+                if (tabSize > 2)
+                    return spaces % tabSize != tabSize - 1;
+                else
+                    return spaces % tabSize == 0;
+                return true;
+            };
+        }
+
+        function iter(fun) {
+            for (var i = startRow; i <= endRow; i++)
+                fun(doc.getLine(i), i);
+        }
+
+
+        var minEmptyLength = Infinity;
+        iter(function(line, i) {
+            var indent = line.search(/\S/);
+            if (indent !== -1) {
+                if (indent < minIndent)
+                    minIndent = indent;
+                if (shouldRemove && !testRemove(line, i))
+                    shouldRemove = false;
+            } else if (minEmptyLength > line.length) {
+                minEmptyLength = line.length;
+            }
+        });
+
+        if (minIndent == Infinity) {
+            minIndent = minEmptyLength;
+            ignoreBlankLines = false;
+            shouldRemove = false;
+        }
+
+        if (insertAtTabStop && minIndent % tabSize != 0)
+            minIndent = Math.floor(minIndent / tabSize) * tabSize;
+
+        iter(shouldRemove ? uncomment : comment);
+    };
+
+    this.toggleBlockComment = function(state, session, range, cursor) {
+        var comment = this.blockComment;
+        if (!comment)
+            return;
+        if (!comment.start && comment[0])
+            comment = comment[0];
+
+        var iterator = new TokenIterator(session, cursor.row, cursor.column);
+        var token = iterator.getCurrentToken();
+
+        var sel = session.selection;
+        var initialRange = session.selection.toOrientedRange();
+        var startRow, colDiff;
+
+        if (token && /comment/.test(token.type)) {
+            var startRange, endRange;
+            while (token && /comment/.test(token.type)) {
+                var i = token.value.indexOf(comment.start);
+                if (i != -1) {
+                    var row = iterator.getCurrentTokenRow();
+                    var column = iterator.getCurrentTokenColumn() + i;
+                    startRange = new Range(row, column, row, column + comment.start.length);
+                    break;
+                }
+                token = iterator.stepBackward();
+            }
+
+            var iterator = new TokenIterator(session, cursor.row, cursor.column);
+            var token = iterator.getCurrentToken();
+            while (token && /comment/.test(token.type)) {
+                var i = token.value.indexOf(comment.end);
+                if (i != -1) {
+                    var row = iterator.getCurrentTokenRow();
+                    var column = iterator.getCurrentTokenColumn() + i;
+                    endRange = new Range(row, column, row, column + comment.end.length);
+                    break;
+                }
+                token = iterator.stepForward();
+            }
+            if (endRange)
+                session.remove(endRange);
+            if (startRange) {
+                session.remove(startRange);
+                startRow = startRange.start.row;
+                colDiff = -comment.start.length;
+            }
+        } else {
+            colDiff = comment.start.length;
+            startRow = range.start.row;
+            session.insert(range.end, comment.end);
+            session.insert(range.start, comment.start);
+        }
+        if (initialRange.start.row == startRow)
+            initialRange.start.column += colDiff;
+        if (initialRange.end.row == startRow)
+            initialRange.end.column += colDiff;
+        session.selection.fromOrientedRange(initialRange);
+    };
+
+    this.getNextLineIndent = function(state, line, tab) {
+        return this.$getIndent(line);
+    };
+
+    this.checkOutdent = function(state, line, input) {
+        return false;
+    };
+
+    this.autoOutdent = function(state, doc, row) {
+    };
+
+    this.$getIndent = function(line) {
+        return line.match(/^\s*/)[0];
+    };
+
+    this.createWorker = function(session) {
+        return null;
+    };
+
+    this.createModeDelegates = function (mapping) {
+        this.$embeds = [];
+        this.$modes = {};
+        for (var i in mapping) {
+            if (mapping[i]) {
+                this.$embeds.push(i);
+                this.$modes[i] = new mapping[i]();
+            }
+        }
+
+        var delegations = ["toggleBlockComment", "toggleCommentLines", "getNextLineIndent", 
+            "checkOutdent", "autoOutdent", "transformAction", "getCompletions"];
+
+        for (var i = 0; i < delegations.length; i++) {
+            (function(scope) {
+              var functionName = delegations[i];
+              var defaultHandler = scope[functionName];
+              scope[delegations[i]] = function() {
+                  return this.$delegator(functionName, arguments, defaultHandler);
+              };
+            }(this));
+        }
+    };
+
+    this.$delegator = function(method, args, defaultHandler) {
+        var state = args[0];
+        if (typeof state != "string")
+            state = state[0];
+        for (var i = 0; i < this.$embeds.length; i++) {
+            if (!this.$modes[this.$embeds[i]]) continue;
+
+            var split = state.split(this.$embeds[i]);
+            if (!split[0] && split[1]) {
+                args[0] = split[1];
+                var mode = this.$modes[this.$embeds[i]];
+                return mode[method].apply(mode, args);
+            }
+        }
+        var ret = defaultHandler.apply(this, args);
+        return defaultHandler ? ret : undefined;
+    };
+
+    this.transformAction = function(state, action, editor, session, param) {
+        if (this.$behaviour) {
+            var behaviours = this.$behaviour.getBehaviours();
+            for (var key in behaviours) {
+                if (behaviours[key][action]) {
+                    var ret = behaviours[key][action].apply(this, arguments);
+                    if (ret) {
+                        return ret;
+                    }
+                }
+            }
+        }
+    };
+    
+    this.getKeywords = function(append) {
+        if (!this.completionKeywords) {
+            var rules = this.$tokenizer.rules;
+            var completionKeywords = [];
+            for (var rule in rules) {
+                var ruleItr = rules[rule];
+                for (var r = 0, l = ruleItr.length; r < l; r++) {
+                    if (typeof ruleItr[r].token === "string") {
+                        if (/keyword|support|storage/.test(ruleItr[r].token))
+                            completionKeywords.push(ruleItr[r].regex);
+                    }
+                    else if (typeof ruleItr[r].token === "object") {
+                        for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) {    
+                            if (/keyword|support|storage/.test(ruleItr[r].token[a])) {
+                                var rule = ruleItr[r].regex.match(/\(.+?\)/g)[a];
+                                completionKeywords.push(rule.substr(1, rule.length - 2));
+                            }
+                        }
+                    }
+                }
+            }
+            this.completionKeywords = completionKeywords;
+        }
+        if (!append)
+            return this.$keywordList;
+        return completionKeywords.concat(this.$keywordList || []);
+    };
+    
+    this.$createKeywordList = function() {
+        if (!this.$highlightRules)
+            this.getTokenizer();
+        return this.$keywordList = this.$highlightRules.$keywordList || [];
+    };
+
+    this.getCompletions = function(state, session, pos, prefix) {
+        var keywords = this.$keywordList || this.$createKeywordList();
+        return keywords.map(function(word) {
+            return {
+                name: word,
+                value: word,
+                score: 0,
+                meta: "keyword"
+            };
+        });
+    };
+
+    this.$id = "ace/mode/text";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+define("ace/apply_delta",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+function throwDeltaError(delta, errorText){
+    console.log("Invalid Delta:", delta);
+    throw "Invalid Delta: " + errorText;
+}
+
+function positionInDocument(docLines, position) {
+    return position.row    >= 0 && position.row    <  docLines.length &&
+           position.column >= 0 && position.column <= docLines[position.row].length;
+}
+
+function validateDelta(docLines, delta) {
+    if (delta.action != "insert" && delta.action != "remove")
+        throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
+    if (!(delta.lines instanceof Array))
+        throwDeltaError(delta, "delta.lines must be an Array");
+    if (!delta.start || !delta.end)
+       throwDeltaError(delta, "delta.start/end must be an present");
+    var start = delta.start;
+    if (!positionInDocument(docLines, delta.start))
+        throwDeltaError(delta, "delta.start must be contained in document");
+    var end = delta.end;
+    if (delta.action == "remove" && !positionInDocument(docLines, end))
+        throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
+    var numRangeRows = end.row - start.row;
+    var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
+    if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
+        throwDeltaError(delta, "delta.range must match delta lines");
+}
+
+exports.applyDelta = function(docLines, delta, doNotValidate) {
+    
+    var row = delta.start.row;
+    var startColumn = delta.start.column;
+    var line = docLines[row] || "";
+    switch (delta.action) {
+        case "insert":
+            var lines = delta.lines;
+            if (lines.length === 1) {
+                docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
+            } else {
+                var args = [row, 1].concat(delta.lines);
+                docLines.splice.apply(docLines, args);
+                docLines[row] = line.substring(0, startColumn) + docLines[row];
+                docLines[row + delta.lines.length - 1] += line.substring(startColumn);
+            }
+            break;
+        case "remove":
+            var endColumn = delta.end.column;
+            var endRow = delta.end.row;
+            if (row === endRow) {
+                docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
+            } else {
+                docLines.splice(
+                    row, endRow - row + 1,
+                    line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
+                );
+            }
+            break;
+    }
+}
+});
+
+define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+    this.$onChange = this.onChange.bind(this);
+    this.attach(doc);
+    
+    if (typeof column == "undefined")
+        this.setPosition(row.row, row.column);
+    else
+        this.setPosition(row, column);
+};
+
+(function() {
+
+    oop.implement(this, EventEmitter);
+    this.getPosition = function() {
+        return this.$clipPositionToDocument(this.row, this.column);
+    };
+    this.getDocument = function() {
+        return this.document;
+    };
+    this.$insertRight = false;
+    this.onChange = function(delta) {
+        if (delta.start.row == delta.end.row && delta.start.row != this.row)
+            return;
+
+        if (delta.start.row > this.row)
+            return;
+            
+        var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
+        this.setPosition(point.row, point.column, true);
+    };
+    
+    function $pointsInOrder(point1, point2, equalPointsInOrder) {
+        var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
+        return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
+    }
+            
+    function $getTransformedPoint(delta, point, moveIfEqual) {
+        var deltaIsInsert = delta.action == "insert";
+        var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row    - delta.start.row);
+        var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
+        var deltaStart = delta.start;
+        var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
+        if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
+            return {
+                row: point.row,
+                column: point.column
+            };
+        }
+        if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
+            return {
+                row: point.row + deltaRowShift,
+                column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
+            };
+        }
+        
+        return {
+            row: deltaStart.row,
+            column: deltaStart.column
+        };
+    }
+    this.setPosition = function(row, column, noClip) {
+        var pos;
+        if (noClip) {
+            pos = {
+                row: row,
+                column: column
+            };
+        } else {
+            pos = this.$clipPositionToDocument(row, column);
+        }
+
+        if (this.row == pos.row && this.column == pos.column)
+            return;
+
+        var old = {
+            row: this.row,
+            column: this.column
+        };
+
+        this.row = pos.row;
+        this.column = pos.column;
+        this._signal("change", {
+            old: old,
+            value: pos
+        });
+    };
+    this.detach = function() {
+        this.document.removeEventListener("change", this.$onChange);
+    };
+    this.attach = function(doc) {
+        this.document = doc || this.document;
+        this.document.on("change", this.$onChange);
+    };
+    this.$clipPositionToDocument = function(row, column) {
+        var pos = {};
+
+        if (row >= this.document.getLength()) {
+            pos.row = Math.max(0, this.document.getLength() - 1);
+            pos.column = this.document.getLine(pos.row).length;
+        }
+        else if (row < 0) {
+            pos.row = 0;
+            pos.column = 0;
+        }
+        else {
+            pos.row = row;
+            pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
+        }
+
+        if (column < 0)
+            pos.column = 0;
+
+        return pos;
+    };
+
+}).call(Anchor.prototype);
+
+});
+
+define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var applyDelta = require("./apply_delta").applyDelta;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(textOrLines) {
+    this.$lines = [""];
+    if (textOrLines.length === 0) {
+        this.$lines = [""];
+    } else if (Array.isArray(textOrLines)) {
+        this.insertMergedLines({row: 0, column: 0}, textOrLines);
+    } else {
+        this.insert({row: 0, column:0}, textOrLines);
+    }
+};
+
+(function() {
+
+    oop.implement(this, EventEmitter);
+    this.setValue = function(text) {
+        var len = this.getLength() - 1;
+        this.remove(new Range(0, 0, len, this.getLine(len).length));
+        this.insert({row: 0, column: 0}, text);
+    };
+    this.getValue = function() {
+        return this.getAllLines().join(this.getNewLineCharacter());
+    };
+    this.createAnchor = function(row, column) {
+        return new Anchor(this, row, column);
+    };
+    if ("aaa".split(/a/).length === 0) {
+        this.$split = function(text) {
+            return text.replace(/\r\n|\r/g, "\n").split("\n");
+        };
+    } else {
+        this.$split = function(text) {
+            return text.split(/\r\n|\r|\n/);
+        };
+    }
+
+
+    this.$detectNewLine = function(text) {
+        var match = text.match(/^.*?(\r\n|\r|\n)/m);
+        this.$autoNewLine = match ? match[1] : "\n";
+        this._signal("changeNewLineMode");
+    };
+    this.getNewLineCharacter = function() {
+        switch (this.$newLineMode) {
+          case "windows":
+            return "\r\n";
+          case "unix":
+            return "\n";
+          default:
+            return this.$autoNewLine || "\n";
+        }
+    };
+
+    this.$autoNewLine = "";
+    this.$newLineMode = "auto";
+    this.setNewLineMode = function(newLineMode) {
+        if (this.$newLineMode === newLineMode)
+            return;
+
+        this.$newLineMode = newLineMode;
+        this._signal("changeNewLineMode");
+    };
+    this.getNewLineMode = function() {
+        return this.$newLineMode;
+    };
+    this.isNewLine = function(text) {
+        return (text == "\r\n" || text == "\r" || text == "\n");
+    };
+    this.getLine = function(row) {
+        return this.$lines[row] || "";
+    };
+    this.getLines = function(firstRow, lastRow) {
+        return this.$lines.slice(firstRow, lastRow + 1);
+    };
+    this.getAllLines = function() {
+        return this.getLines(0, this.getLength());
+    };
+    this.getLength = function() {
+        return this.$lines.length;
+    };
+    this.getTextRange = function(range) {
+        return this.getLinesForRange(range).join(this.getNewLineCharacter());
+    };
+    this.getLinesForRange = function(range) {
+        var lines;
+        if (range.start.row === range.end.row) {
+            lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
+        } else {
+            lines = this.getLines(range.start.row, range.end.row);
+            lines[0] = (lines[0] || "").substring(range.start.column);
+            var l = lines.length - 1;
+            if (range.end.row - range.start.row == l)
+                lines[l] = lines[l].substring(0, range.end.column);
+        }
+        return lines;
+    };
+    this.insertLines = function(row, lines) {
+        console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
+        return this.insertFullLines(row, lines);
+    };
+    this.removeLines = function(firstRow, lastRow) {
+        console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
+        return this.removeFullLines(firstRow, lastRow);
+    };
+    this.insertNewLine = function(position) {
+        console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead.");
+        return this.insertMergedLines(position, ["", ""]);
+    };
+    this.insert = function(position, text) {
+        if (this.getLength() <= 1)
+            this.$detectNewLine(text);
+        
+        return this.insertMergedLines(position, this.$split(text));
+    };
+    this.insertInLine = function(position, text) {
+        var start = this.clippedPos(position.row, position.column);
+        var end = this.pos(position.row, position.column + text.length);
+        
+        this.applyDelta({
+            start: start,
+            end: end,
+            action: "insert",
+            lines: [text]
+        }, true);
+        
+        return this.clonePos(end);
+    };
+    
+    this.clippedPos = function(row, column) {
+        var length = this.getLength();
+        if (row === undefined) {
+            row = length;
+        } else if (row < 0) {
+            row = 0;
+        } else if (row >= length) {
+            row = length - 1;
+            column = undefined;
+        }
+        var line = this.getLine(row);
+        if (column == undefined)
+            column = line.length;
+        column = Math.min(Math.max(column, 0), line.length);
+        return {row: row, column: column};
+    };
+    
+    this.clonePos = function(pos) {
+        return {row: pos.row, column: pos.column};
+    };
+    
+    this.pos = function(row, column) {
+        return {row: row, column: column};
+    };
+    
+    this.$clipPosition = function(position) {
+        var length = this.getLength();
+        if (position.row >= length) {
+            position.row = Math.max(0, length - 1);
+            position.column = this.getLine(length - 1).length;
+        } else {
+            position.row = Math.max(0, position.row);
+            position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
+        }
+        return position;
+    };
+    this.insertFullLines = function(row, lines) {
+        row = Math.min(Math.max(row, 0), this.getLength());
+        var column = 0;
+        if (row < this.getLength()) {
+            lines = lines.concat([""]);
+            column = 0;
+        } else {
+            lines = [""].concat(lines);
+            row--;
+            column = this.$lines[row].length;
+        }
+        this.insertMergedLines({row: row, column: column}, lines);
+    };    
+    this.insertMergedLines = function(position, lines) {
+        var start = this.clippedPos(position.row, position.column);
+        var end = {
+            row: start.row + lines.length - 1,
+            column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
+        };
+        
+        this.applyDelta({
+            start: start,
+            end: end,
+            action: "insert",
+            lines: lines
+        });
+        
+        return this.clonePos(end);
+    };
+    this.remove = function(range) {
+        var start = this.clippedPos(range.start.row, range.start.column);
+        var end = this.clippedPos(range.end.row, range.end.column);
+        this.applyDelta({
+            start: start,
+            end: end,
+            action: "remove",
+            lines: this.getLinesForRange({start: start, end: end})
+        });
+        return this.clonePos(start);
+    };
+    this.removeInLine = function(row, startColumn, endColumn) {
+        var start = this.clippedPos(row, startColumn);
+        var end = this.clippedPos(row, endColumn);
+        
+        this.applyDelta({
+            start: start,
+            end: end,
+            action: "remove",
+            lines: this.getLinesForRange({start: start, end: end})
+        }, true);
+        
+        return this.clonePos(start);
+    };
+    this.removeFullLines = function(firstRow, lastRow) {
+        firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
+        lastRow  = Math.min(Math.max(0, lastRow ), this.getLength() - 1);
+        var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
+        var deleteLastNewLine  = lastRow  < this.getLength() - 1;
+        var startRow = ( deleteFirstNewLine ? firstRow - 1                  : firstRow                    );
+        var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0                           );
+        var endRow   = ( deleteLastNewLine  ? lastRow + 1                   : lastRow                     );
+        var endCol   = ( deleteLastNewLine  ? 0                             : this.getLine(endRow).length ); 
+        var range = new Range(startRow, startCol, endRow, endCol);
+        var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
+        
+        this.applyDelta({
+            start: range.start,
+            end: range.end,
+            action: "remove",
+            lines: this.getLinesForRange(range)
+        });
+        return deletedLines;
+    };
+    this.removeNewLine = function(row) {
+        if (row < this.getLength() - 1 && row >= 0) {
+            this.applyDelta({
+                start: this.pos(row, this.getLine(row).length),
+                end: this.pos(row + 1, 0),
+                action: "remove",
+                lines: ["", ""]
+            });
+        }
+    };
+    this.replace = function(range, text) {
+        if (!(range instanceof Range))
+            range = Range.fromPoints(range.start, range.end);
+        if (text.length === 0 && range.isEmpty())
+            return range.start;
+        if (text == this.getTextRange(range))
+            return range.end;
+
+        this.remove(range);
+        var end;
+        if (text) {
+            end = this.insert(range.start, text);
+        }
+        else {
+            end = range.start;
+        }
+        
+        return end;
+    };
+    this.applyDeltas = function(deltas) {
+        for (var i=0; i<deltas.length; i++) {
+            this.applyDelta(deltas[i]);
+        }
+    };
+    this.revertDeltas = function(deltas) {
+        for (var i=deltas.length-1; i>=0; i--) {
+            this.revertDelta(deltas[i]);
+        }
+    };
+    this.applyDelta = function(delta, doNotValidate) {
+        var isInsert = delta.action == "insert";
+        if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
+            : !Range.comparePoints(delta.start, delta.end)) {
+            return;
+        }
+        
+        if (isInsert && delta.lines.length > 20000)
+            this.$splitAndapplyLargeDelta(delta, 20000);
+        applyDelta(this.$lines, delta, doNotValidate);
+        this._signal("change", delta);
+    };
+    
+    this.$splitAndapplyLargeDelta = function(delta, MAX) {
+        var lines = delta.lines;
+        var l = lines.length;
+        var row = delta.start.row; 
+        var column = delta.start.column;
+        var from = 0, to = 0;
+        do {
+            from = to;
+            to += MAX - 1;
+            var chunk = lines.slice(from, to);
+            if (to > l) {
+                delta.lines = chunk;
+                delta.start.row = row + from;
+                delta.start.column = column;
+                break;
+            }
+            chunk.push("");
+            this.applyDelta({
+                start: this.pos(row + from, column),
+                end: this.pos(row + to, column = 0),
+                action: delta.action,
+                lines: chunk
+            }, true);
+        } while(true);
+    };
+    this.revertDelta = function(delta) {
+        this.applyDelta({
+            start: this.clonePos(delta.start),
+            end: this.clonePos(delta.end),
+            action: (delta.action == "insert" ? "remove" : "insert"),
+            lines: delta.lines.slice()
+        });
+    };
+    this.indexToPosition = function(index, startRow) {
+        var lines = this.$lines || this.getAllLines();
+        var newlineLength = this.getNewLineCharacter().length;
+        for (var i = startRow || 0, l = lines.length; i < l; i++) {
+            index -= lines[i].length + newlineLength;
+            if (index < 0)
+                return {row: i, column: index + lines[i].length + newlineLength};
+        }
+        return {row: l-1, column: lines[l-1].length};
+    };
+    this.positionToIndex = function(pos, startRow) {
+        var lines = this.$lines || this.getAllLines();
+        var newlineLength = this.getNewLineCharacter().length;
+        var index = 0;
+        var row = Math.min(pos.row, lines.length);
+        for (var i = startRow || 0; i < row; ++i)
+            index += lines[i].length + newlineLength;
+
+        return index + pos.column;
+    };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+
+var BackgroundTokenizer = function(tokenizer, editor) {
+    this.running = false;
+    this.lines = [];
+    this.states = [];
+    this.currentLine = 0;
+    this.tokenizer = tokenizer;
+
+    var self = this;
+
+    this.$worker = function() {
+        if (!self.running) { return; }
+
+        var workerStart = new Date();
+        var currentLine = self.currentLine;
+        var endLine = -1;
+        var doc = self.doc;
+
+        var startLine = currentLine;
+        while (self.lines[currentLine])
+            currentLine++;
+        
+        var len = doc.getLength();
+        var processedLines = 0;
+        self.running = false;
+        while (currentLine < len) {
+            self.$tokenizeRow(currentLine);
+            endLine = currentLine;
+            do {
+                currentLine++;
+            } while (self.lines[currentLine]);
+            processedLines ++;
+            if ((processedLines % 5 === 0) && (new Date() - workerStart) > 20) {                
+                self.running = setTimeout(self.$worker, 20);
+                break;
+            }
+        }
+        self.currentLine = currentLine;
+        
+        if (startLine <= endLine)
+            self.fireUpdateEvent(startLine, endLine);
+    };
+};
+
+(function(){
+
+    oop.implement(this, EventEmitter);
+    this.setTokenizer = function(tokenizer) {
+        this.tokenizer = tokenizer;
+        this.lines = [];
+        this.states = [];
+
+        this.start(0);
+    };
+    this.setDocument = function(doc) {
+        this.doc = doc;
+        this.lines = [];
+        this.states = [];
+
+        this.stop();
+    };
+    this.fireUpdateEvent = function(firstRow, lastRow) {
+        var data = {
+            first: firstRow,
+            last: lastRow
+        };
+        this._signal("update", {data: data});
+    };
+    this.start = function(startRow) {
+        this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength());
+        this.lines.splice(this.currentLine, this.lines.length);
+        this.states.splice(this.currentLine, this.states.length);
+
+        this.stop();
+        this.running = setTimeout(this.$worker, 700);
+    };
+    
+    this.scheduleStart = function() {
+        if (!this.running)
+            this.running = setTimeout(this.$worker, 700);
+    }
+
+    this.$updateOnChange = function(delta) {
+        var startRow = delta.start.row;
+        var len = delta.end.row - startRow;
+
+        if (len === 0) {
+            this.lines[startRow] = null;
+        } else if (delta.action == "remove") {
+            this.lines.splice(startRow, len + 1, null);
+            this.states.splice(startRow, len + 1, null);
+        } else {
+            var args = Array(len + 1);
+            args.unshift(startRow, 1);
+            this.lines.splice.apply(this.lines, args);
+            this.states.splice.apply(this.states, args);
+        }
+
+        this.currentLine = Math.min(startRow, this.currentLine, this.doc.getLength());
+
+        this.stop();
+    };
+    this.stop = function() {
+        if (this.running)
+            clearTimeout(this.running);
+        this.running = false;
+    };
+    this.getTokens = function(row) {
+        return this.lines[row] || this.$tokenizeRow(row);
+    };
+    this.getState = function(row) {
+        if (this.currentLine == row)
+            this.$tokenizeRow(row);
+        return this.states[row] || "start";
+    };
+
+    this.$tokenizeRow = function(row) {
+        var line = this.doc.getLine(row);
+        var state = this.states[row - 1];
+
+        var data = this.tokenizer.getLineTokens(line, state, row);
+
+        if (this.states[row] + "" !== data.state + "") {
+            this.states[row] = data.state;
+            this.lines[row + 1] = null;
+            if (this.currentLine > row + 1)
+                this.currentLine = row + 1;
+        } else if (this.currentLine == row) {
+            this.currentLine = row + 1;
+        }
+
+        return this.lines[row] = data.tokens;
+    };
+
+}).call(BackgroundTokenizer.prototype);
+
+exports.BackgroundTokenizer = BackgroundTokenizer;
+});
+
+define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(require, exports, module) {
+"use strict";
+
+var lang = require("./lib/lang");
+var oop = require("./lib/oop");
+var Range = require("./range").Range;
+
+var SearchHighlight = function(regExp, clazz, type) {
+    this.setRegexp(regExp);
+    this.clazz = clazz;
+    this.type = type || "text";
+};
+
+(function() {
+    this.MAX_RANGES = 500;
+    
+    this.setRegexp = function(regExp) {
+        if (this.regExp+"" == regExp+"")
+            return;
+        this.regExp = regExp;
+        this.cache = [];
+    };
+
+    this.update = function(html, markerLayer, session, config) {
+        if (!this.regExp)
+            return;
+        var start = config.firstRow, end = config.lastRow;
+
+        for (var i = start; i <= end; i++) {
+            var ranges = this.cache[i];
+            if (ranges == null) {
+                ranges = lang.getMatchOffsets(session.getLine(i), this.regExp);
+                if (ranges.length > this.MAX_RANGES)
+                    ranges = ranges.slice(0, this.MAX_RANGES);
+                ranges = ranges.map(function(match) {
+                    return new Range(i, match.offset, i, match.offset + match.length);
+                });
+                this.cache[i] = ranges.length ? ranges : "";
+            }
+
+            for (var j = ranges.length; j --; ) {
+                markerLayer.drawSingleLineMarker(
+                    html, ranges[j].toScreenRange(session), this.clazz, config);
+            }
+        }
+    };
+
+}).call(SearchHighlight.prototype);
+
+exports.SearchHighlight = SearchHighlight;
+});
+
+define("ace/edit_session/fold_line",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+function FoldLine(foldData, folds) {
+    this.foldData = foldData;
+    if (Array.isArray(folds)) {
+        this.folds = folds;
+    } else {
+        folds = this.folds = [ folds ];
+    }
+
+    var last = folds[folds.length - 1];
+    this.range = new Range(folds[0].start.row, folds[0].start.column,
+                           last.end.row, last.end.column);
+    this.start = this.range.start;
+    this.end   = this.range.end;
+
+    this.folds.forEach(function(fold) {
+        fold.setFoldLine(this);
+    }, this);
+}
+
+(function() {
+    this.shiftRow = function(shift) {
+        this.start.row += shift;
+        this.end.row += shift;
+        this.folds.forEach(function(fold) {
+            fold.start.row += shift;
+            fold.end.row += shift;
+        });
+    };
+
+    this.addFold = function(fold) {
+        if (fold.sameRow) {
+            if (fold.start.row < this.startRow || fold.endRow > this.endRow) {
+                throw new Error("Can't add a fold to this FoldLine as it has no connection");
+            }
+            this.folds.push(fold);
+            this.folds.sort(function(a, b) {
+                return -a.range.compareEnd(b.start.row, b.start.column);
+            });
+            if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) {
+                this.end.row = fold.end.row;
+                this.end.column =  fold.end.column;
+            } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) {
+                this.start.row = fold.start.row;
+                this.start.column = fold.start.column;
+            }
+        } else if (fold.start.row == this.end.row) {
+            this.folds.push(fold);
+            this.end.row = fold.end.row;
+            this.end.column = fold.end.column;
+        } else if (fold.end.row == this.start.row) {
+            this.folds.unshift(fold);
+            this.start.row = fold.start.row;
+            this.start.column = fold.start.column;
+        } else {
+            throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");
+        }
+        fold.foldLine = this;
+    };
+
+    this.containsRow = function(row) {
+        return row >= this.start.row && row <= this.end.row;
+    };
+
+    this.walk = function(callback, endRow, endColumn) {
+        var lastEnd = 0,
+            folds = this.folds,
+            fold,
+            cmp, stop, isNewRow = true;
+
+        if (endRow == null) {
+            endRow = this.end.row;
+            endColumn = this.end.column;
+        }
+
+        for (var i = 0; i < folds.length; i++) {
+            fold = folds[i];
+
+            cmp = fold.range.compareStart(endRow, endColumn);
+            if (cmp == -1) {
+                callback(null, endRow, endColumn, lastEnd, isNewRow);
+                return;
+            }
+
+            stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow);
+            stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd);
+            if (stop || cmp === 0) {
+                return;
+            }
+            isNewRow = !fold.sameRow;
+            lastEnd = fold.end.column;
+        }
+        callback(null, endRow, endColumn, lastEnd, isNewRow);
+    };
+
+    this.getNextFoldTo = function(row, column) {
+        var fold, cmp;
+        for (var i = 0; i < this.folds.length; i++) {
+            fold = this.folds[i];
+            cmp = fold.range.compareEnd(row, column);
+            if (cmp == -1) {
+                return {
+                    fold: fold,
+                    kind: "after"
+                };
+            } else if (cmp === 0) {
+                return {
+                    fold: fold,
+                    kind: "inside"
+                };
+            }
+        }
+        return null;
+    };
+
+    this.addRemoveChars = function(row, column, len) {
+        var ret = this.getNextFoldTo(row, column),
+            fold, folds;
+        if (ret) {
+            fold = ret.fold;
+            if (ret.kind == "inside"
+                && fold.start.column != column
+                && fold.start.row != row)
+            {
+                window.console && window.console.log(row, column, fold);
+            } else if (fold.start.row == row) {
+                folds = this.folds;
+                var i = folds.indexOf(fold);
+                if (i === 0) {
+                    this.start.column += len;
+                }
+                for (i; i < folds.length; i++) {
+                    fold = folds[i];
+                    fold.start.column += len;
+                    if (!fold.sameRow) {
+                        return;
+                    }
+                    fold.end.column += len;
+                }
+                this.end.column += len;
+            }
+        }
+    };
+
+    this.split = function(row, column) {
+        var pos = this.getNextFoldTo(row, column);
+        
+        if (!pos || pos.kind == "inside")
+            return null;
+            
+        var fold = pos.fold;
+        var folds = this.folds;
+        var foldData = this.foldData;
+        
+        var i = folds.indexOf(fold);
+        var foldBefore = folds[i - 1];
+        this.end.row = foldBefore.end.row;
+        this.end.column = foldBefore.end.column;
+        folds = folds.splice(i, folds.length - i);
+
+        var newFoldLine = new FoldLine(foldData, folds);
+        foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine);
+        return newFoldLine;
+    };
+
+    this.merge = function(foldLineNext) {
+        var folds = foldLineNext.folds;
+        for (var i = 0; i < folds.length; i++) {
+            this.addFold(folds[i]);
+        }
+        var foldData = this.foldData;
+        foldData.splice(foldData.indexOf(foldLineNext), 1);
+    };
+
+    this.toString = function() {
+        var ret = [this.range.toString() + ": [" ];
+
+        this.folds.forEach(function(fold) {
+            ret.push("  " + fold.toString());
+        });
+        ret.push("]");
+        return ret.join("\n");
+    };
+
+    this.idxToPosition = function(idx) {
+        var lastFoldEndColumn = 0;
+
+        for (var i = 0; i < this.folds.length; i++) {
+            var fold = this.folds[i];
+
+            idx -= fold.start.column - lastFoldEndColumn;
+            if (idx < 0) {
+                return {
+                    row: fold.start.row,
+                    column: fold.start.column + idx
+                };
+            }
+
+            idx -= fold.placeholder.length;
+            if (idx < 0) {
+                return fold.start;
+            }
+
+            lastFoldEndColumn = fold.end.column;
+        }
+
+        return {
+            row: this.end.row,
+            column: this.end.column + idx
+        };
+    };
+}).call(FoldLine.prototype);
+
+exports.FoldLine = FoldLine;
+});
+
+define("ace/range_list",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+var Range = require("./range").Range;
+var comparePoints = Range.comparePoints;
+
+var RangeList = function() {
+    this.ranges = [];
+};
+
+(function() {
+    this.comparePoints = comparePoints;
+
+    this.pointIndex = function(pos, excludeEdges, startIndex) {
+        var list = this.ranges;
+
+        for (var i = startIndex || 0; i < list.length; i++) {
+            var range = list[i];
+            var cmpEnd = comparePoints(pos, range.end);
+            if (cmpEnd > 0)
+                continue;
+            var cmpStart = comparePoints(pos, range.start);
+            if (cmpEnd === 0)
+                return excludeEdges && cmpStart !== 0 ? -i-2 : i;
+            if (cmpStart > 0 || (cmpStart === 0 && !excludeEdges))
+                return i;
+
+            return -i-1;
+        }
+        return -i - 1;
+    };
+
+    this.add = function(range) {
+        var excludeEdges = !range.isEmpty();
+        var startIndex = this.pointIndex(range.start, excludeEdges);
+        if (startIndex < 0)
+            startIndex = -startIndex - 1;
+
+        var endIndex = this.pointIndex(range.end, excludeEdges, startIndex);
+
+        if (endIndex < 0)
+            endIndex = -endIndex - 1;
+        else
+            endIndex++;
+        return this.ranges.splice(startIndex, endIndex - startIndex, range);
+    };
+
+    this.addList = function(list) {
+        var removed = [];
+        for (var i = list.length; i--; ) {
+            removed.push.apply(removed, this.add(list[i]));
+        }
+        return removed;
+    };
+
+    this.substractPoint = function(pos) {
+        var i = this.pointIndex(pos);
+
+        if (i >= 0)
+            return this.ranges.splice(i, 1);
+    };
+    this.merge = function() {
+        var removed = [];
+        var list = this.ranges;
+        
+        list = list.sort(function(a, b) {
+            return comparePoints(a.start, b.start);
+        });
+        
+        var next = list[0], range;
+        for (var i = 1; i < list.length; i++) {
+            range = next;
+            next = list[i];
+            var cmp = comparePoints(range.end, next.start);
+            if (cmp < 0)
+                continue;
+
+            if (cmp == 0 && !range.isEmpty() && !next.isEmpty())
+                continue;
+
+            if (comparePoints(range.end, next.end) < 0) {
+                range.end.row = next.end.row;
+                range.end.column = next.end.column;
+            }
+
+            list.splice(i, 1);
+            removed.push(next);
+            next = range;
+            i--;
+        }
+        
+        this.ranges = list;
+
+        return removed;
+    };
+
+    this.contains = function(row, column) {
+        return this.pointIndex({row: row, column: column}) >= 0;
+    };
+
+    this.containsPoint = function(pos) {
+        return this.pointIndex(pos) >= 0;
+    };
+
+    this.rangeAtPoint = function(pos) {
+        var i = this.pointIndex(pos);
+        if (i >= 0)
+            return this.ranges[i];
+    };
+
+
+    this.clipRows = function(startRow, endRow) {
+        var list = this.ranges;
+        if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow)
+            return [];
+
+        var startIndex = this.pointIndex({row: startRow, column: 0});
+        if (startIndex < 0)
+            startIndex = -startIndex - 1;
+        var endIndex = this.pointIndex({row: endRow, column: 0}, startIndex);
+        if (endIndex < 0)
+            endIndex = -endIndex - 1;
+
+        var clipped = [];
+        for (var i = startIndex; i < endIndex; i++) {
+            clipped.push(list[i]);
+        }
+        return clipped;
+    };
+
+    this.removeAll = function() {
+        return this.ranges.splice(0, this.ranges.length);
+    };
+
+    this.attach = function(session) {
+        if (this.session)
+            this.detach();
+
+        this.session = session;
+        this.onChange = this.$onChange.bind(this);
+
+        this.session.on('change', this.onChange);
+    };
+
+    this.detach = function() {
+        if (!this.session)
+            return;
+        this.session.removeListener('change', this.onChange);
+        this.session = null;
+    };
+
+    this.$onChange = function(delta) {
+        if (delta.action == "insert"){
+            var start = delta.start;
+            var end = delta.end;
+        } else {
+            var end = delta.start;
+            var start = delta.end;
+        }
+        var startRow = start.row;
+        var endRow = end.row;
+        var lineDif = endRow - startRow;
+
+        var colDiff = -start.column + end.column;
+        var ranges = this.ranges;
+
+        for (var i = 0, n = ranges.length; i < n; i++) {
+            var r = ranges[i];
+            if (r.end.row < startRow)
+                continue;
+            if (r.start.row > startRow)
+                break;
+
+            if (r.start.row == startRow && r.start.column >= start.column ) {
+                if (r.start.column == start.column && this.$insertRight) {
+                } else {
+                    r.start.column += colDiff;
+                    r.start.row += lineDif;
+                }
+            }
+            if (r.end.row == startRow && r.end.column >= start.column) {
+                if (r.end.column == start.column && this.$insertRight) {
+                    continue;
+                }
+                if (r.end.column == start.column && colDiff > 0 && i < n - 1) {                
+                    if (r.end.column > r.start.column && r.end.column == ranges[i+1].start.column)
+                        r.end.column -= colDiff;
+                }
+                r.end.column += colDiff;
+                r.end.row += lineDif;
+            }
+        }
+
+        if (lineDif != 0 && i < n) {
+            for (; i < n; i++) {
+                var r = ranges[i];
+                r.start.row += lineDif;
+                r.end.row += lineDif;
+            }
+        }
+    };
+
+}).call(RangeList.prototype);
+
+exports.RangeList = RangeList;
+});
+
+define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+var RangeList = require("../range_list").RangeList;
+var oop = require("../lib/oop")
+var Fold = exports.Fold = function(range, placeholder) {
+    this.foldLine = null;
+    this.placeholder = placeholder;
+    this.range = range;
+    this.start = range.start;
+    this.end = range.end;
+
+    this.sameRow = range.start.row == range.end.row;
+    this.subFolds = this.ranges = [];
+};
+
+oop.inherits(Fold, RangeList);
+
+(function() {
+
+    this.toString = function() {
+        return '"' + this.placeholder + '" ' + this.range.toString();
+    };
+
+    this.setFoldLine = function(foldLine) {
+        this.foldLine = foldLine;
+        this.subFolds.forEach(function(fold) {
+            fold.setFoldLine(foldLine);
+        });
+    };
+
+    this.clone = function() {
+        var range = this.range.clone();
+        var fold = new Fold(range, this.placeholder);
+        this.subFolds.forEach(function(subFold) {
+            fold.subFolds.push(subFold.clone());
+        });
+        fold.collapseChildren = this.collapseChildren;
+        return fold;
+    };
+
+    this.addSubFold = function(fold) {
+        if (this.range.isEqual(fold))
+            return;
+
+        if (!this.range.containsRange(fold))
+            throw new Error("A fold can't intersect already existing fold" + fold.range + this.range);
+        consumeRange(fold, this.start);
+
+        var row = fold.start.row, column = fold.start.column;
+        for (var i = 0, cmp = -1; i < this.subFolds.length; i++) {
+            cmp = this.subFolds[i].range.compare(row, column);
+            if (cmp != 1)
+                break;
+        }
+        var afterStart = this.subFolds[i];
+
+        if (cmp == 0)
+            return afterStart.addSubFold(fold);
+        var row = fold.range.end.row, column = fold.range.end.column;
+        for (var j = i, cmp = -1; j < this.subFolds.length; j++) {
+            cmp = this.subFolds[j].range.compare(row, column);
+            if (cmp != 1)
+                break;
+        }
+        var afterEnd = this.subFolds[j];
+
+        if (cmp == 0)
+            throw new Error("A fold can't intersect already existing fold" + fold.range + this.range);
+
+        var consumedFolds = this.subFolds.splice(i, j - i, fold);
+        fold.setFoldLine(this.foldLine);
+
+        return fold;
+    };
+    
+    this.restoreRange = function(range) {
+        return restoreRange(range, this.start);
+    };
+
+}).call(Fold.prototype);
+
+function consumePoint(point, anchor) {
+    point.row -= anchor.row;
+    if (point.row == 0)
+        point.column -= anchor.column;
+}
+function consumeRange(range, anchor) {
+    consumePoint(range.start, anchor);
+    consumePoint(range.end, anchor);
+}
+function restorePoint(point, anchor) {
+    if (point.row == 0)
+        point.column += anchor.column;
+    point.row += anchor.row;
+}
+function restoreRange(range, anchor) {
+    restorePoint(range.start, anchor);
+    restorePoint(range.end, anchor);
+}
+
+});
+
+define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+var FoldLine = require("./fold_line").FoldLine;
+var Fold = require("./fold").Fold;
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+function Folding() {
+    this.getFoldAt = function(row, column, side) {
+        var foldLine = this.getFoldLine(row);
+        if (!foldLine)
+            return null;
+
+        var folds = foldLine.folds;
+        for (var i = 0; i < folds.length; i++) {
+            var fold = folds[i];
+            if (fold.range.contains(row, column)) {
+                if (side == 1 && fold.range.isEnd(row, column)) {
+                    continue;
+                } else if (side == -1 && fold.range.isStart(row, column)) {
+                    continue;
+                }
+                return fold;
+            }
+        }
+    };
+    this.getFoldsInRange = function(range) {
+        var start = range.start;
+        var end = range.end;
+        var foldLines = this.$foldData;
+        var foundFolds = [];
+
+        start.column += 1;
+        end.column -= 1;
+
+        for (var i = 0; i < foldLines.length; i++) {
+            var cmp = foldLines[i].range.compareRange(range);
+            if (cmp == 2) {
+                continue;
+            }
+            else if (cmp == -2) {
+                break;
+            }
+
+            var folds = foldLines[i].folds;
+            for (var j = 0; j < folds.length; j++) {
+                var fold = folds[j];
+                cmp = fold.range.compareRange(range);
+                if (cmp == -2) {
+                    break;
+                } else if (cmp == 2) {
+                    continue;
+                } else
+                if (cmp == 42) {
+                    break;
+                }
+                foundFolds.push(fold);
+            }
+        }
+        start.column -= 1;
+        end.column += 1;
+
+        return foundFolds;
+    };
+
+    this.getFoldsInRangeList = function(ranges) {
+        if (Array.isArray(ranges)) {
+            var folds = [];
+            ranges.forEach(function(range) {
+                folds = folds.concat(this.getFoldsInRange(range));
+            }, this);
+        } else {
+            var folds = this.getFoldsInRange(ranges);
+        }
+        return folds;
+    };
+    this.getAllFolds = function() {
+        var folds = [];
+        var foldLines = this.$foldData;
+        
+        for (var i = 0; i < foldLines.length; i++)
+            for (var j = 0; j < foldLines[i].folds.length; j++)
+                folds.push(foldLines[i].folds[j]);
+
+        return folds;
+    };
+    this.getFoldStringAt = function(row, column, trim, foldLine) {
+        foldLine = foldLine || this.getFoldLine(row);
+        if (!foldLine)
+            return null;
+
+        var lastFold = {
+            end: { column: 0 }
+        };
+        var str, fold;
+        for (var i = 0; i < foldLine.folds.length; i++) {
+            fold = foldLine.folds[i];
+            var cmp = fold.range.compareEnd(row, column);
+            if (cmp == -1) {
+                str = this
+                    .getLine(fold.start.row)
+                    .substring(lastFold.end.column, fold.start.column);
+                break;
+            }
+            else if (cmp === 0) {
+                return null;
+            }
+            lastFold = fold;
+        }
+        if (!str)
+            str = this.getLine(fold.start.row).substring(lastFold.end.column);
+
+        if (trim == -1)
+            return str.substring(0, column - lastFold.end.column);
+        else if (trim == 1)
+            return str.substring(column - lastFold.end.column);
+        else
+            return str;
+    };
+
+    this.getFoldLine = function(docRow, startFoldLine) {
+        var foldData = this.$foldData;
+        var i = 0;
+        if (startFoldLine)
+            i = foldData.indexOf(startFoldLine);
+        if (i == -1)
+            i = 0;
+        for (i; i < foldData.length; i++) {
+            var foldLine = foldData[i];
+            if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) {
+                return foldLine;
+            } else if (foldLine.end.row > docRow) {
+                return null;
+            }
+        }
+        return null;
+    };
+    this.getNextFoldLine = function(docRow, startFoldLine) {
+        var foldData = this.$foldData;
+        var i = 0;
+        if (startFoldLine)
+            i = foldData.indexOf(startFoldLine);
+        if (i == -1)
+            i = 0;
+        for (i; i < foldData.length; i++) {
+            var foldLine = foldData[i];
+            if (foldLine.end.row >= docRow) {
+                return foldLine;
+            }
+        }
+        return null;
+    };
+
+    this.getFoldedRowCount = function(first, last) {
+        var foldData = this.$foldData, rowCount = last-first+1;
+        for (var i = 0; i < foldData.length; i++) {
+            var foldLine = foldData[i],
+                end = foldLine.end.row,
+                start = foldLine.start.row;
+            if (end >= last) {
+                if (start < last) {
+                    if (start >= first)
+                        rowCount -= last-start;
+                    else
+                        rowCount = 0; // in one fold
+                }
+                break;
+            } else if (end >= first){
+                if (start >= first) // fold inside range
+                    rowCount -=  end-start;
+                else
+                    rowCount -=  end-first+1;
+            }
+        }
+        return rowCount;
+    };
+
+    this.$addFoldLine = function(foldLine) {
+        this.$foldData.push(foldLine);
+        this.$foldData.sort(function(a, b) {
+            return a.start.row - b.start.row;
+        });
+        return foldLine;
+    };
+    this.addFold = function(placeholder, range) {
+        var foldData = this.$foldData;
+        var added = false;
+        var fold;
+        
+        if (placeholder instanceof Fold)
+            fold = placeholder;
+        else {
+            fold = new Fold(range, placeholder);
+            fold.collapseChildren = range.collapseChildren;
+        }
+        this.$clipRangeToDocument(fold.range);
+
+        var startRow = fold.start.row;
+        var startColumn = fold.start.column;
+        var endRow = fold.end.row;
+        var endColumn = fold.end.column;
+        if (!(startRow < endRow || 
+            startRow == endRow && startColumn <= endColumn - 2))
+            throw new Error("The range has to be at least 2 characters width");
+
+        var startFold = this.getFoldAt(startRow, startColumn, 1);
+        var endFold = this.getFoldAt(endRow, endColumn, -1);
+        if (startFold && endFold == startFold)
+            return startFold.addSubFold(fold);
+
+        if (startFold && !startFold.range.isStart(startRow, startColumn))
+            this.removeFold(startFold);
+        
+        if (endFold && !endFold.range.isEnd(endRow, endColumn))
+            this.removeFold(endFold);
+        var folds = this.getFoldsInRange(fold.range);
+        if (folds.length > 0) {
+            this.removeFolds(folds);
+            folds.forEach(function(subFold) {
+                fold.addSubFold(subFold);
+            });
+        }
+
+        for (var i = 0; i < foldData.length; i++) {
+            var foldLine = foldData[i];
+            if (endRow == foldLine.start.row) {
+                foldLine.addFold(fold);
+                added = true;
+                break;
+            } else if (startRow == foldLine.end.row) {
+                foldLine.addFold(fold);
+                added = true;
+                if (!fold.sameRow) {
+                    var foldLineNext = foldData[i + 1];
+                    if (foldLineNext && foldLineNext.start.row == endRow) {
+                        foldLine.merge(foldLineNext);
+                        break;
+                    }
+                }
+                break;
+            } else if (endRow <= foldLine.start.row) {
+                break;
+            }
+        }
+
+        if (!added)
+            foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold));
+
+        if (this.$useWrapMode)
+            this.$updateWrapData(foldLine.start.row, foldLine.start.row);
+        else
+            this.$updateRowLengthCache(foldLine.start.row, foldLine.start.row);
+        this.$modified = true;
+        this._signal("changeFold", { data: fold, action: "add" });
+
+        return fold;
+    };
+
+    this.addFolds = function(folds) {
+        folds.forEach(function(fold) {
+            this.addFold(fold);
+        }, this);
+    };
+
+    this.removeFold = function(fold) {
+        var foldLine = fold.foldLine;
+        var startRow = foldLine.start.row;
+        var endRow = foldLine.end.row;
+
+        var foldLines = this.$foldData;
+        var folds = foldLine.folds;
+        if (folds.length == 1) {
+            foldLines.splice(foldLines.indexOf(foldLine), 1);
+        } else
+        if (foldLine.range.isEnd(fold.end.row, fold.end.column)) {
+            folds.pop();
+            foldLine.end.row = folds[folds.length - 1].end.row;
+            foldLine.end.column = folds[folds.length - 1].end.column;
+        } else
+        if (foldLine.range.isStart(fold.start.row, fold.start.column)) {
+            folds.shift();
+            foldLine.start.row = folds[0].start.row;
+            foldLine.start.column = folds[0].start.column;
+        } else
+        if (fold.sameRow) {
+            folds.splice(folds.indexOf(fold), 1);
+        } else
+        {
+            var newFoldLine = foldLine.split(fold.start.row, fold.start.column);
+            folds = newFoldLine.folds;
+            folds.shift();
+            newFoldLine.start.row = folds[0].start.row;
+            newFoldLine.start.column = folds[0].start.column;
+        }
+
+        if (!this.$updating) {
+            if (this.$useWrapMode)
+                this.$updateWrapData(startRow, endRow);
+            else
+                this.$updateRowLengthCache(startRow, endRow);
+        }
+        this.$modified = true;
+        this._signal("changeFold", { data: fold, action: "remove" });
+    };
+
+    this.removeFolds = function(folds) {
+        var cloneFolds = [];
+        for (var i = 0; i < folds.length; i++) {
+            cloneFolds.push(folds[i]);
+        }
+
+        cloneFolds.forEach(function(fold) {
+            this.removeFold(fold);
+        }, this);
+        this.$modified = true;
+    };
+
+    this.expandFold = function(fold) {
+        this.removeFold(fold);
+        fold.subFolds.forEach(function(subFold) {
+            fold.restoreRange(subFold);
+            this.addFold(subFold);
+        }, this);
+        if (fold.collapseChildren > 0) {
+            this.foldAll(fold.start.row+1, fold.end.row, fold.collapseChildren-1);
+        }
+        fold.subFolds = [];
+    };
+
+    this.expandFolds = function(folds) {
+        folds.forEach(function(fold) {
+            this.expandFold(fold);
+        }, this);
+    };
+
+    this.unfold = function(location, expandInner) {
+        var range, folds;
+        if (location == null) {
+            range = new Range(0, 0, this.getLength(), 0);
+            expandInner = true;
+        } else if (typeof location == "number")
+            range = new Range(location, 0, location, this.getLine(location).length);
+        else if ("row" in location)
+            range = Range.fromPoints(location, location);
+        else
+            range = location;
+        
+        folds = this.getFoldsInRangeList(range);
+        if (expandInner) {
+            this.removeFolds(folds);
+        } else {
+            var subFolds = folds;
+            while (subFolds.length) {
+                this.expandFolds(subFolds);
+                subFolds = this.getFoldsInRangeList(range);
+            }
+        }
+        if (folds.length)
+            return folds;
+    };
+    this.isRowFolded = function(docRow, startFoldRow) {
+        return !!this.getFoldLine(docRow, startFoldRow);
+    };
+
+    this.getRowFoldEnd = function(docRow, startFoldRow) {
+        var foldLine = this.getFoldLine(docRow, startFoldRow);
+        return foldLine ? foldLine.end.row : docRow;
+    };
+
+    this.getRowFoldStart = function(docRow, startFoldRow) {
+        var foldLine = this.getFoldLine(docRow, startFoldRow);
+        return foldLine ? foldLine.start.row : docRow;
+    };
+
+    this.getFoldDisplayLine = function(foldLine, endRow, endColumn, startRow, startColumn) {
+        if (startRow == null)
+            startRow = foldLine.start.row;
+        if (startColumn == null)
+            startColumn = 0;
+        if (endRow == null)
+            endRow = foldLine.end.row;
+        if (endColumn == null)
+            endColumn = this.getLine(endRow).length;
+        var doc = this.doc;
+        var textLine = "";
+
+        foldLine.walk(function(placeholder, row, column, lastColumn) {
+            if (row < startRow)
+                return;
+            if (row == startRow) {
+                if (column < startColumn)
+                    return;
+                lastColumn = Math.max(startColumn, lastColumn);
+            }
+
+            if (placeholder != null) {
+                textLine += placeholder;
+            } else {
+                textLine += doc.getLine(row).substring(lastColumn, column);
+            }
+        }, endRow, endColumn);
+        return textLine;
+    };
+
+    this.getDisplayLine = function(row, endColumn, startRow, startColumn) {
+        var foldLine = this.getFoldLine(row);
+
+        if (!foldLine) {
+            var line;
+            line = this.doc.getLine(row);
+            return line.substring(startColumn || 0, endColumn || line.length);
+        } else {
+            return this.getFoldDisplayLine(
+                foldLine, row, endColumn, startRow, startColumn);
+        }
+    };
+
+    this.$cloneFoldData = function() {
+        var fd = [];
+        fd = this.$foldData.map(function(foldLine) {
+            var folds = foldLine.folds.map(function(fold) {
+                return fold.clone();
+            });
+            return new FoldLine(fd, folds);
+        });
+
+        return fd;
+    };
+
+    this.toggleFold = function(tryToUnfold) {
+        var selection = this.selection;
+        var range = selection.getRange();
+        var fold;
+        var bracketPos;
+
+        if (range.isEmpty()) {
+            var cursor = range.start;
+            fold = this.getFoldAt(cursor.row, cursor.column);
+
+            if (fold) {
+                this.expandFold(fold);
+                return;
+            } else if (bracketPos = this.findMatchingBracket(cursor)) {
+                if (range.comparePoint(bracketPos) == 1) {
+                    range.end = bracketPos;
+                } else {
+                    range.start = bracketPos;
+                    range.start.column++;
+                    range.end.column--;
+                }
+            } else if (bracketPos = this.findMatchingBracket({row: cursor.row, column: cursor.column + 1})) {
+                if (range.comparePoint(bracketPos) == 1)
+                    range.end = bracketPos;
+                else
+                    range.start = bracketPos;
+
+                range.start.column++;
+            } else {
+                range = this.getCommentFoldRange(cursor.row, cursor.column) || range;
+            }
+        } else {
+            var folds = this.getFoldsInRange(range);
+            if (tryToUnfold && folds.length) {
+                this.expandFolds(folds);
+                return;
+            } else if (folds.length == 1 ) {
+                fold = folds[0];
+            }
+        }
+
+        if (!fold)
+            fold = this.getFoldAt(range.start.row, range.start.column);
+
+        if (fold && fold.range.toString() == range.toString()) {
+            this.expandFold(fold);
+            return;
+        }
+
+        var placeholder = "...";
+        if (!range.isMultiLine()) {
+            placeholder = this.getTextRange(range);
+            if (placeholder.length < 4)
+                return;
+            placeholder = placeholder.trim().substring(0, 2) + "..";
+        }
+
+        this.addFold(placeholder, range);
+    };
+
+    this.getCommentFoldRange = function(row, column, dir) {
+        var iterator = new TokenIterator(this, row, column);
+        var token = iterator.getCurrentToken();
+        if (token && /^comment|string/.test(token.type)) {
+            var range = new Range();
+            var re = new RegExp(token.type.replace(/\..*/, "\\."));
+            if (dir != 1) {
+                do {
+                    token = iterator.stepBackward();
+                } while (token && re.test(token.type));
+                iterator.stepForward();
+            }
+            
+            range.start.row = iterator.getCurrentTokenRow();
+            range.start.column = iterator.getCurrentTokenColumn() + 2;
+
+            iterator = new TokenIterator(this, row, column);
+            
+            if (dir != -1) {
+                do {
+                    token = iterator.stepForward();
+                } while (token && re.test(token.type));
+                token = iterator.stepBackward();
+            } else
+                token = iterator.getCurrentToken();
+
+            range.end.row = iterator.getCurrentTokenRow();
+            range.end.column = iterator.getCurrentTokenColumn() + token.value.length - 2;
+            return range;
+        }
+    };
+
+    this.foldAll = function(startRow, endRow, depth) {
+        if (depth == undefined)
+            depth = 100000; // JSON.stringify doesn't hanle Infinity
+        var foldWidgets = this.foldWidgets;
+        if (!foldWidgets)
+            return; // mode doesn't support folding
+        endRow = endRow || this.getLength();
+        startRow = startRow || 0;
+        for (var row = startRow; row < endRow; row++) {
+            if (foldWidgets[row] == null)
+                foldWidgets[row] = this.getFoldWidget(row);
+            if (foldWidgets[row] != "start")
+                continue;
+
+            var range = this.getFoldWidgetRange(row);
+            if (range && range.isMultiLine()
+                && range.end.row <= endRow
+                && range.start.row >= startRow
+            ) {
+                row = range.end.row;
+                try {
+                    var fold = this.addFold("...", range);
+                    if (fold)
+                        fold.collapseChildren = depth;
+                } catch(e) {}
+            }
+        }
+    };
+    this.$foldStyles = {
+        "manual": 1,
+        "markbegin": 1,
+        "markbeginend": 1
+    };
+    this.$foldStyle = "markbegin";
+    this.setFoldStyle = function(style) {
+        if (!this.$foldStyles[style])
+            throw new Error("invalid fold style: " + style + "[" + Object.keys(this.$foldStyles).join(", ") + "]");
+        
+        if (this.$foldStyle == style)
+            return;
+
+        this.$foldStyle = style;
+        
+        if (style == "manual")
+            this.unfold();
+        var mode = this.$foldMode;
+        this.$setFolding(null);
+        this.$setFolding(mode);
+    };
+
+    this.$setFolding = function(foldMode) {
+        if (this.$foldMode == foldMode)
+            return;
+            
+        this.$foldMode = foldMode;
+        
+        this.off('change', this.$updateFoldWidgets);
+        this.off('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);
+        this._signal("changeAnnotation");
+        
+        if (!foldMode || this.$foldStyle == "manual") {
+            this.foldWidgets = null;
+            return;
+        }
+        
+        this.foldWidgets = [];
+        this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle);
+        this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle);
+        
+        this.$updateFoldWidgets = this.updateFoldWidgets.bind(this);
+        this.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(this);
+        this.on('change', this.$updateFoldWidgets);
+        this.on('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);
+    };
+
+    this.getParentFoldRangeData = function (row, ignoreCurrent) {
+        var fw = this.foldWidgets;
+        if (!fw || (ignoreCurrent && fw[row]))
+            return {};
+
+        var i = row - 1, firstRange;
+        while (i >= 0) {
+            var c = fw[i];
+            if (c == null)
+                c = fw[i] = this.getFoldWidget(i);
+
+            if (c == "start") {
+                var range = this.getFoldWidgetRange(i);
+                if (!firstRange)
+                    firstRange = range;
+                if (range && range.end.row >= row)
+                    break;
+            }
+            i--;
+        }
+
+        return {
+            range: i !== -1 && range,
+            firstRange: firstRange
+        };
+    };
+
+    this.onFoldWidgetClick = function(row, e) {
+        e = e.domEvent;
+        var options = {
+            children: e.shiftKey,
+            all: e.ctrlKey || e.metaKey,
+            siblings: e.altKey
+        };
+        
+        var range = this.$toggleFoldWidget(row, options);
+        if (!range) {
+            var el = (e.target || e.srcElement);
+            if (el && /ace_fold-widget/.test(el.className))
+                el.className += " ace_invalid";
+        }
+    };
+    
+    this.$toggleFoldWidget = function(row, options) {
+        if (!this.getFoldWidget)
+            return;
+        var type = this.getFoldWidget(row);
+        var line = this.getLine(row);
+
+        var dir = type === "end" ? -1 : 1;
+        var fold = this.getFoldAt(row, dir === -1 ? 0 : line.length, dir);
+
+        if (fold) {
+            if (options.children || options.all)
+                this.removeFold(fold);
+            else
+                this.expandFold(fold);
+            return;
+        }
+
+        var range = this.getFoldWidgetRange(row, true);
+        if (range && !range.isMultiLine()) {
+            fold = this.getFoldAt(range.start.row, range.start.column, 1);
+            if (fold && range.isEqual(fold.range)) {
+                this.removeFold(fold);
+                return;
+            }
+        }
+        
+        if (options.siblings) {
+            var data = this.getParentFoldRangeData(row);
+            if (data.range) {
+                var startRow = data.range.start.row + 1;
+                var endRow = data.range.end.row;
+            }
+            this.foldAll(startRow, endRow, options.all ? 10000 : 0);
+        } else if (options.children) {
+            endRow = range ? range.end.row : this.getLength();
+            this.foldAll(row + 1, endRow, options.all ? 10000 : 0);
+        } else if (range) {
+            if (options.all) 
+                range.collapseChildren = 10000;
+            this.addFold("...", range);
+        }
+        
+        return range;
+    };
+    
+    
+    
+    this.toggleFoldWidget = function(toggleParent) {
+        var row = this.selection.getCursor().row;
+        row = this.getRowFoldStart(row);
+        var range = this.$toggleFoldWidget(row, {});
+        
+        if (range)
+            return;
+        var data = this.getParentFoldRangeData(row, true);
+        range = data.range || data.firstRange;
+        
+        if (range) {
+            row = range.start.row;
+            var fold = this.getFoldAt(row, this.getLine(row).length, 1);
+
+            if (fold) {
+                this.removeFold(fold);
+            } else {
+                this.addFold("...", range);
+            }
+        }
+    };
+
+    this.updateFoldWidgets = function(delta) {
+        var firstRow = delta.start.row;
+        var len = delta.end.row - firstRow;
+
+        if (len === 0) {
+            this.foldWidgets[firstRow] = null;
+        } else if (delta.action == 'remove') {
+            this.foldWidgets.splice(firstRow, len + 1, null);
+        } else {
+            var args = Array(len + 1);
+            args.unshift(firstRow, 1);
+            this.foldWidgets.splice.apply(this.foldWidgets, args);
+        }
+    };
+    this.tokenizerUpdateFoldWidgets = function(e) {
+        var rows = e.data;
+        if (rows.first != rows.last) {
+            if (this.foldWidgets.length > rows.first)
+                this.foldWidgets.splice(rows.first, this.foldWidgets.length);
+        }
+    };
+}
+
+exports.Folding = Folding;
+
+});
+
+define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+var Range = require("../range").Range;
+
+
+function BracketMatch() {
+
+    this.findMatchingBracket = function(position, chr) {
+        if (position.column == 0) return null;
+
+        var charBeforeCursor = chr || this.getLine(position.row).charAt(position.column-1);
+        if (charBeforeCursor == "") return null;
+
+        var match = charBeforeCursor.match(/([\(\[\{])|([\)\]\}])/);
+        if (!match)
+            return null;
+
+        if (match[1])
+            return this.$findClosingBracket(match[1], position);
+        else
+            return this.$findOpeningBracket(match[2], position);
+    };
+    
+    this.getBracketRange = function(pos) {
+        var line = this.getLine(pos.row);
+        var before = true, range;
+
+        var chr = line.charAt(pos.column-1);
+        var match = chr && chr.match(/([\(\[\{])|([\)\]\}])/);
+        if (!match) {
+            chr = line.charAt(pos.column);
+            pos = {row: pos.row, column: pos.column + 1};
+            match = chr && chr.match(/([\(\[\{])|([\)\]\}])/);
+            before = false;
+        }
+        if (!match)
+            return null;
+
+        if (match[1]) {
+            var bracketPos = this.$findClosingBracket(match[1], pos);
+            if (!bracketPos)
+                return null;
+            range = Range.fromPoints(pos, bracketPos);
+            if (!before) {
+                range.end.column++;
+                range.start.column--;
+            }
+            range.cursor = range.end;
+        } else {
+            var bracketPos = this.$findOpeningBracket(match[2], pos);
+            if (!bracketPos)
+                return null;
+            range = Range.fromPoints(bracketPos, pos);
+            if (!before) {
+                range.start.column++;
+                range.end.column--;
+            }
+            range.cursor = range.start;
+        }
+        
+        return range;
+    };
+
+    this.$brackets = {
+        ")": "(",
+        "(": ")",
+        "]": "[",
+        "[": "]",
+        "{": "}",
+        "}": "{"
+    };
+
+    this.$findOpeningBracket = function(bracket, position, typeRe) {
+        var openBracket = this.$brackets[bracket];
+        var depth = 1;
+
+        var iterator = new TokenIterator(this, position.row, position.column);
+        var token = iterator.getCurrentToken();
+        if (!token)
+            token = iterator.stepForward();
+        if (!token)
+            return;
+        
+         if (!typeRe){
+            typeRe = new RegExp(
+                "(\\.?" +
+                token.type.replace(".", "\\.").replace("rparen", ".paren")
+                    .replace(/\b(?:end)\b/, "(?:start|begin|end)")
+                + ")+"
+            );
+        }
+        var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2;
+        var value = token.value;
+        
+        while (true) {
+        
+            while (valueIndex >= 0) {
+                var chr = value.charAt(valueIndex);
+                if (chr == openBracket) {
+                    depth -= 1;
+                    if (depth == 0) {
+                        return {row: iterator.getCurrentTokenRow(),
+                            column: valueIndex + iterator.getCurrentTokenColumn()};
+                    }
+                }
+                else if (chr == bracket) {
+                    depth += 1;
+                }
+                valueIndex -= 1;
+            }
+            do {
+                token = iterator.stepBackward();
+            } while (token && !typeRe.test(token.type));
+
+            if (token == null)
+                break;
+                
+            value = token.value;
+            valueIndex = value.length - 1;
+        }
+        
+        return null;
+    };
+
+    this.$findClosingBracket = function(bracket, position, typeRe) {
+        var closingBracket = this.$brackets[bracket];
+        var depth = 1;
+
+        var iterator = new TokenIterator(this, position.row, position.column);
+        var token = iterator.getCurrentToken();
+        if (!token)
+            token = iterator.stepForward();
+        if (!token)
+            return;
+
+        if (!typeRe){
+            typeRe = new RegExp(
+                "(\\.?" +
+                token.type.replace(".", "\\.").replace("lparen", ".paren")
+                    .replace(/\b(?:start|begin)\b/, "(?:start|begin|end)")
+                + ")+"
+            );
+        }
+        var valueIndex = position.column - iterator.getCurrentTokenColumn();
+
+        while (true) {
+
+            var value = token.value;
+            var valueLength = value.length;
+            while (valueIndex < valueLength) {
+                var chr = value.charAt(valueIndex);
+                if (chr == closingBracket) {
+                    depth -= 1;
+                    if (depth == 0) {
+                        return {row: iterator.getCurrentTokenRow(),
+                            column: valueIndex + iterator.getCurrentTokenColumn()};
+                    }
+                }
+                else if (chr == bracket) {
+                    depth += 1;
+                }
+                valueIndex += 1;
+            }
+            do {
+                token = iterator.stepForward();
+            } while (token && !typeRe.test(token.type));
+
+            if (token == null)
+                break;
+
+            valueIndex = 0;
+        }
+        
+        return null;
+    };
+}
+exports.BracketMatch = BracketMatch;
+
+});
+
+define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var lang = require("./lib/lang");
+var config = require("./config");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Selection = require("./selection").Selection;
+var TextMode = require("./mode/text").Mode;
+var Range = require("./range").Range;
+var Document = require("./document").Document;
+var BackgroundTokenizer = require("./background_tokenizer").BackgroundTokenizer;
+var SearchHighlight = require("./search_highlight").SearchHighlight;
+
+var EditSession = function(text, mode) {
+    this.$breakpoints = [];
+    this.$decorations = [];
+    this.$frontMarkers = {};
+    this.$backMarkers = {};
+    this.$markerId = 1;
+    this.$undoSelect = true;
+
+    this.$foldData = [];
+    this.$foldData.toString = function() {
+        return this.join("\n");
+    };
+    this.on("changeFold", this.onChangeFold.bind(this));
+    this.$onChange = this.onChange.bind(this);
+
+    if (typeof text != "object" || !text.getLine)
+        text = new Document(text);
+
+    this.setDocument(text);
+    this.selection = new Selection(this);
+
+    config.resetOptions(this);
+    this.setMode(mode);
+    config._signal("session", this);
+};
+
+
+(function() {
+
+    oop.implement(this, EventEmitter);
+    this.setDocument = function(doc) {
+        if (this.doc)
+            this.doc.removeListener("change", this.$onChange);
+
+        this.doc = doc;
+        doc.on("change", this.$onChange);
+
+        if (this.bgTokenizer)
+            this.bgTokenizer.setDocument(this.getDocument());
+
+        this.resetCaches();
+    };
+    this.getDocument = function() {
+        return this.doc;
+    };
+    this.$resetRowCache = function(docRow) {
+        if (!docRow) {
+            this.$docRowCache = [];
+            this.$screenRowCache = [];
+            return;
+        }
+        var l = this.$docRowCache.length;
+        var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1;
+        if (l > i) {
+            this.$docRowCache.splice(i, l);
+            this.$screenRowCache.splice(i, l);
+        }
+    };
+
+    this.$getRowCacheIndex = function(cacheArray, val) {
+        var low = 0;
+        var hi = cacheArray.length - 1;
+
+        while (low <= hi) {
+            var mid = (low + hi) >> 1;
+            var c = cacheArray[mid];
+
+            if (val > c)
+                low = mid + 1;
+            else if (val < c)
+                hi = mid - 1;
+            else
+                return mid;
+        }
+
+        return low -1;
+    };
+
+    this.resetCaches = function() {
+        this.$modified = true;
+        this.$wrapData = [];
+        this.$rowLengthCache = [];
+        this.$resetRowCache(0);
+        if (this.bgTokenizer)
+            this.bgTokenizer.start(0);
+    };
+
+    this.onChangeFold = function(e) {
+        var fold = e.data;
+        this.$resetRowCache(fold.start.row);
+    };
+
+    this.onChange = function(delta) {
+        this.$modified = true;
+
+        this.$resetRowCache(delta.start.row);
+
+        var removedFolds = this.$updateInternalDataOnChange(delta);
+        if (!this.$fromUndo && this.$undoManager && !delta.ignore) {
+            this.$deltasDoc.push(delta);
+            if (removedFolds && removedFolds.length != 0) {
+                this.$deltasFold.push({
+                    action: "removeFolds",
+                    folds:  removedFolds
+                });
+            }
+
+            this.$informUndoManager.schedule();
+        }
+
+        this.bgTokenizer && this.bgTokenizer.$updateOnChange(delta);
+        this._signal("change", delta);
+    };
+    this.setValue = function(text) {
+        this.doc.setValue(text);
+        this.selection.moveTo(0, 0);
+
+        this.$resetRowCache(0);
+        this.$deltas = [];
+        this.$deltasDoc = [];
+        this.$deltasFold = [];
+        this.setUndoManager(this.$undoManager);
+        this.getUndoManager().reset();
+    };
+    this.getValue =
+    this.toString = function() {
+        return this.doc.getValue();
+    };
+    this.getSelection = function() {
+        return this.selection;
+    };
+    this.getState = function(row) {
+        return this.bgTokenizer.getState(row);
+    };
+    this.getTokens = function(row) {
+        return this.bgTokenizer.getTokens(row);
+    };
+    this.getTokenAt = function(row, column) {
+        var tokens = this.bgTokenizer.getTokens(row);
+        var token, c = 0;
+        if (column == null) {
+            i = tokens.length - 1;
+            c = this.getLine(row).length;
+        } else {
+            for (var i = 0; i < tokens.length; i++) {
+                c += tokens[i].value.length;
+                if (c >= column)
+                    break;
+            }
+        }
+        token = tokens[i];
+        if (!token)
+            return null;
+        token.index = i;
+        token.start = c - token.value.length;
+        return token;
+    };
+    this.setUndoManager = function(undoManager) {
+        this.$undoManager = undoManager;
+        this.$deltas = [];
+        this.$deltasDoc = [];
+        this.$deltasFold = [];
+
+        if (this.$informUndoManager)
+            this.$informUndoManager.cancel();
+
+        if (undoManager) {
+            var self = this;
+
+            this.$syncInformUndoManager = function() {
+                self.$informUndoManager.cancel();
+
+                if (self.$deltasFold.length) {
+                    self.$deltas.push({
+                        group: "fold",
+                        deltas: self.$deltasFold
+                    });
+                    self.$deltasFold = [];
+                }
+
+                if (self.$deltasDoc.length) {
+                    self.$deltas.push({
+                        group: "doc",
+                        deltas: self.$deltasDoc
+                    });
+                    self.$deltasDoc = [];
+                }
+
+                if (self.$deltas.length > 0) {
+                    undoManager.execute({
+                        action: "aceupdate",
+                        args: [self.$deltas, self],
+                        merge: self.mergeUndoDeltas
+                    });
+                }
+                self.mergeUndoDeltas = false;
+                self.$deltas = [];
+            };
+            this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager);
+        }
+    };
+    this.markUndoGroup = function() {
+        if (this.$syncInformUndoManager)
+            this.$syncInformUndoManager();
+    };
+    
+    this.$defaultUndoManager = {
+        undo: function() {},
+        redo: function() {},
+        reset: function() {}
+    };
+    this.getUndoManager = function() {
+        return this.$undoManager || this.$defaultUndoManager;
+    };
+    this.getTabString = function() {
+        if (this.getUseSoftTabs()) {
+            return lang.stringRepeat(" ", this.getTabSize());
+        } else {
+            return "\t";
+        }
+    };
+    this.setUseSoftTabs = function(val) {
+        this.setOption("useSoftTabs", val);
+    };
+    this.getUseSoftTabs = function() {
+        return this.$useSoftTabs && !this.$mode.$indentWithTabs;
+    };
+    this.setTabSize = function(tabSize) {
+        this.setOption("tabSize", tabSize);
+    };
+    this.getTabSize = function() {
+        return this.$tabSize;
+    };
+    this.isTabStop = function(position) {
+        return this.$useSoftTabs && (position.column % this.$tabSize === 0);
+    };
+
+    this.$overwrite = false;
+    this.setOverwrite = function(overwrite) {
+        this.setOption("overwrite", overwrite);
+    };
+    this.getOverwrite = function() {
+        return this.$overwrite;
+    };
+    this.toggleOverwrite = function() {
+        this.setOverwrite(!this.$overwrite);
+    };
+    this.addGutterDecoration = function(row, className) {
+        if (!this.$decorations[row])
+            this.$decorations[row] = "";
+        this.$decorations[row] += " " + className;
+        this._signal("changeBreakpoint", {});
+    };
+    this.removeGutterDecoration = function(row, className) {
+        this.$decorations[row] = (this.$decorations[row] || "").replace(" " + className, "");
+        this._signal("changeBreakpoint", {});
+    };
+    this.getBreakpoints = function() {
+        return this.$breakpoints;
+    };
+    this.setBreakpoints = function(rows) {
+        this.$breakpoints = [];
+        for (var i=0; i<rows.length; i++) {
+            this.$breakpoints[rows[i]] = "ace_breakpoint";
+        }
+        this._signal("changeBreakpoint", {});
+    };
+    this.clearBreakpoints = function() {
+        this.$breakpoints = [];
+        this._signal("changeBreakpoint", {});
+    };
+    this.setBreakpoint = function(row, className) {
+        if (className === undefined)
+            className = "ace_breakpoint";
+        if (className)
+            this.$breakpoints[row] = className;
+        else
+            delete this.$breakpoints[row];
+        this._signal("changeBreakpoint", {});
+    };
+    this.clearBreakpoint = function(row) {
+        delete this.$breakpoints[row];
+        this._signal("changeBreakpoint", {});
+    };
+    this.addMarker = function(range, clazz, type, inFront) {
+        var id = this.$markerId++;
+
+        var marker = {
+            range : range,
+            type : type || "line",
+            renderer: typeof type == "function" ? type : null,
+            clazz : clazz,
+            inFront: !!inFront,
+            id: id
+        };
+
+        if (inFront) {
+            this.$frontMarkers[id] = marker;
+            this._signal("changeFrontMarker");
+        } else {
+            this.$backMarkers[id] = marker;
+            this._signal("changeBackMarker");
+        }
+
+        return id;
+    };
+    this.addDynamicMarker = function(marker, inFront) {
+        if (!marker.update)
+            return;
+        var id = this.$markerId++;
+        marker.id = id;
+        marker.inFront = !!inFront;
+
+        if (inFront) {
+            this.$frontMarkers[id] = marker;
+            this._signal("changeFrontMarker");
+        } else {
+            this.$backMarkers[id] = marker;
+            this._signal("changeBackMarker");
+        }
+
+        return marker;
+    };
+    this.removeMarker = function(markerId) {
+        var marker = this.$frontMarkers[markerId] || this.$backMarkers[markerId];
+        if (!marker)
+            return;
+
+        var markers = marker.inFront ? this.$frontMarkers : this.$backMarkers;
+        if (marker) {
+            delete (markers[markerId]);
+            this._signal(marker.inFront ? "changeFrontMarker" : "changeBackMarker");
+        }
+    };
+    this.getMarkers = function(inFront) {
+        return inFront ? this.$frontMarkers : this.$backMarkers;
+    };
+
+    this.highlight = function(re) {
+        if (!this.$searchHighlight) {
+            var highlight = new SearchHighlight(null, "ace_selected-word", "text");
+            this.$searchHighlight = this.addDynamicMarker(highlight);
+        }
+        this.$searchHighlight.setRegexp(re);
+    };
+    this.highlightLines = function(startRow, endRow, clazz, inFront) {
+        if (typeof endRow != "number") {
+            clazz = endRow;
+            endRow = startRow;
+        }
+        if (!clazz)
+            clazz = "ace_step";
+
+        var range = new Range(startRow, 0, endRow, Infinity);
+        range.id = this.addMarker(range, clazz, "fullLine", inFront);
+        return range;
+    };
+    this.setAnnotations = function(annotations) {
+        this.$annotations = annotations;
+        this._signal("changeAnnotation", {});
+    };
+    this.getAnnotations = function() {
+        return this.$annotations || [];
+    };
+    this.clearAnnotations = function() {
+        this.setAnnotations([]);
+    };
+    this.$detectNewLine = function(text) {
+        var match = text.match(/^.*?(\r?\n)/m);
+        if (match) {
+            this.$autoNewLine = match[1];
+        } else {
+            this.$autoNewLine = "\n";
+        }
+    };
+    this.getWordRange = function(row, column) {
+        var line = this.getLine(row);
+
+        var inToken = false;
+        if (column > 0)
+            inToken = !!line.charAt(column - 1).match(this.tokenRe);
+
+        if (!inToken)
+            inToken = !!line.charAt(column).match(this.tokenRe);
+
+        if (inToken)
+            var re = this.tokenRe;
+        else if (/^\s+$/.test(line.slice(column-1, column+1)))
+            var re = /\s/;
+        else
+            var re = this.nonTokenRe;
+
+        var start = column;
+        if (start > 0) {
+            do {
+                start--;
+            }
+            while (start >= 0 && line.charAt(start).match(re));
+            start++;
+        }
+
+        var end = column;
+        while (end < line.length && line.charAt(end).match(re)) {
+            end++;
+        }
+
+        return new Range(row, start, row, end);
+    };
+    this.getAWordRange = function(row, column) {
+        var wordRange = this.getWordRange(row, column);
+        var line = this.getLine(wordRange.end.row);
+
+        while (line.charAt(wordRange.end.column).match(/[ \t]/)) {
+            wordRange.end.column += 1;
+        }
+        return wordRange;
+    };
+    this.setNewLineMode = function(newLineMode) {
+        this.doc.setNewLineMode(newLineMode);
+    };
+    this.getNewLineMode = function() {
+        return this.doc.getNewLineMode();
+    };
+    this.setUseWorker = function(useWorker) { this.setOption("useWorker", useWorker); };
+    this.getUseWorker = function() { return this.$useWorker; };
+    this.onReloadTokenizer = function(e) {
+        var rows = e.data;
+        this.bgTokenizer.start(rows.first);
+        this._signal("tokenizerUpdate", e);
+    };
+
+    this.$modes = {};
+    this.$mode = null;
+    this.$modeId = null;
+    this.setMode = function(mode, cb) {
+        if (mode && typeof mode === "object") {
+            if (mode.getTokenizer)
+                return this.$onChangeMode(mode);
+            var options = mode;
+            var path = options.path;
+        } else {
+            path = mode || "ace/mode/text";
+        }
+        if (!this.$modes["ace/mode/text"])
+            this.$modes["ace/mode/text"] = new TextMode();
+
+        if (this.$modes[path] && !options) {
+            this.$onChangeMode(this.$modes[path]);
+            cb && cb();
+            return;
+        }
+        this.$modeId = path;
+        config.loadModule(["mode", path], function(m) {
+            if (this.$modeId !== path)
+                return cb && cb();
+            if (this.$modes[path] && !options) {
+                this.$onChangeMode(this.$modes[path]);
+            } else if (m && m.Mode) {
+                m = new m.Mode(options);
+                if (!options) {
+                    this.$modes[path] = m;
+                    m.$id = path;
+                }
+                this.$onChangeMode(m);
+            }
+            cb && cb();
+        }.bind(this));
+        if (!this.$mode)
+            this.$onChangeMode(this.$modes["ace/mode/text"], true);
+    };
+
+    this.$onChangeMode = function(mode, $isPlaceholder) {
+        if (!$isPlaceholder)
+            this.$modeId = mode.$id;
+        if (this.$mode === mode) 
+            return;
+
+        this.$mode = mode;
+
+        this.$stopWorker();
+
+        if (this.$useWorker)
+            this.$startWorker();
+
+        var tokenizer = mode.getTokenizer();
+
+        if(tokenizer.addEventListener !== undefined) {
+            var onReloadTokenizer = this.onReloadTokenizer.bind(this);
+            tokenizer.addEventListener("update", onReloadTokenizer);
+        }
+
+        if (!this.bgTokenizer) {
+            this.bgTokenizer = new BackgroundTokenizer(tokenizer);
+            var _self = this;
+            this.bgTokenizer.addEventListener("update", function(e) {
+                _self._signal("tokenizerUpdate", e);
+            });
+        } else {
+            this.bgTokenizer.setTokenizer(tokenizer);
+        }
+
+        this.bgTokenizer.setDocument(this.getDocument());
+
+        this.tokenRe = mode.tokenRe;
+        this.nonTokenRe = mode.nonTokenRe;
+
+        
+        if (!$isPlaceholder) {
+            if (mode.attachToSession)
+                mode.attachToSession(this);
+            this.$options.wrapMethod.set.call(this, this.$wrapMethod);
+            this.$setFolding(mode.foldingRules);
+            this.bgTokenizer.start(0);
+            this._emit("changeMode");
+        }
+    };
+
+    this.$stopWorker = function() {
+        if (this.$worker) {
+            this.$worker.terminate();
+            this.$worker = null;
+        }
+    };
+
+    this.$startWorker = function() {
+        try {
+            this.$worker = this.$mode.createWorker(this);
+        } catch (e) {
+            config.warn("Could not load worker", e);
+            this.$worker = null;
+        }
+    };
+    this.getMode = function() {
+        return this.$mode;
+    };
+
+    this.$scrollTop = 0;
+    this.setScrollTop = function(scrollTop) {
+        if (this.$scrollTop === scrollTop || isNaN(scrollTop))
+            return;
+
+        this.$scrollTop = scrollTop;
+        this._signal("changeScrollTop", scrollTop);
+    };
+    this.getScrollTop = function() {
+        return this.$scrollTop;
+    };
+
+    this.$scrollLeft = 0;
+    this.setScrollLeft = function(scrollLeft) {
+        if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft))
+            return;
+
+        this.$scrollLeft = scrollLeft;
+        this._signal("changeScrollLeft", scrollLeft);
+    };
+    this.getScrollLeft = function() {
+        return this.$scrollLeft;
+    };
+    this.getScreenWidth = function() {
+        this.$computeWidth();
+        if (this.lineWidgets) 
+            return Math.max(this.getLineWidgetMaxWidth(), this.screenWidth);
+        return this.screenWidth;
+    };
+    
+    this.getLineWidgetMaxWidth = function() {
+        if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth;
+        var width = 0;
+        this.lineWidgets.forEach(function(w) {
+            if (w && w.screenWidth > width)
+                width = w.screenWidth;
+        });
+        return this.lineWidgetWidth = width;
+    };
+
+    this.$computeWidth = function(force) {
+        if (this.$modified || force) {
+            this.$modified = false;
+
+            if (this.$useWrapMode)
+                return this.screenWidth = this.$wrapLimit;
+
+            var lines = this.doc.getAllLines();
+            var cache = this.$rowLengthCache;
+            var longestScreenLine = 0;
+            var foldIndex = 0;
+            var foldLine = this.$foldData[foldIndex];
+            var foldStart = foldLine ? foldLine.start.row : Infinity;
+            var len = lines.length;
+
+            for (var i = 0; i < len; i++) {
+                if (i > foldStart) {
+                    i = foldLine.end.row + 1;
+                    if (i >= len)
+                        break;
+                    foldLine = this.$foldData[foldIndex++];
+                    foldStart = foldLine ? foldLine.start.row : Infinity;
+                }
+
+                if (cache[i] == null)
+                    cache[i] = this.$getStringScreenWidth(lines[i])[0];
+
+                if (cache[i] > longestScreenLine)
+                    longestScreenLine = cache[i];
+            }
+            this.screenWidth = longestScreenLine;
+        }
+    };
+    this.getLine = function(row) {
+        return this.doc.getLine(row);
+    };
+    this.getLines = function(firstRow, lastRow) {
+        return this.doc.getLines(firstRow, lastRow);
+    };
+    this.getLength = function() {
+        return this.doc.getLength();
+    };
+    this.getTextRange = function(range) {
+        return this.doc.getTextRange(range || this.selection.getRange());
+    };
+    this.insert = function(position, text) {
+        return this.doc.insert(position, text);
+    };
+    this.remove = function(range) {
+        return this.doc.remove(range);
+    };
+    this.removeFullLines = function(firstRow, lastRow){
+        return this.doc.removeFullLines(firstRow, lastRow);
+    };
+    this.undoChanges = function(deltas, dontSelect) {
+        if (!deltas.length)
+            return;
+
+        this.$fromUndo = true;
+        var lastUndoRange = null;
+        for (var i = deltas.length - 1; i != -1; i--) {
+            var delta = deltas[i];
+            if (delta.group == "doc") {
+                this.doc.revertDeltas(delta.deltas);
+                lastUndoRange =
+                    this.$getUndoSelection(delta.deltas, true, lastUndoRange);
+            } else {
+                delta.deltas.forEach(function(foldDelta) {
+                    this.addFolds(foldDelta.folds);
+                }, this);
+            }
+        }
+        this.$fromUndo = false;
+        lastUndoRange &&
+            this.$undoSelect &&
+            !dontSelect &&
+            this.selection.setSelectionRange(lastUndoRange);
+        return lastUndoRange;
+    };
+    this.redoChanges = function(deltas, dontSelect) {
+        if (!deltas.length)
+            return;
+
+        this.$fromUndo = true;
+        var lastUndoRange = null;
+        for (var i = 0; i < deltas.length; i++) {
+            var delta = deltas[i];
+            if (delta.group == "doc") {
+                this.doc.applyDeltas(delta.deltas);
+                lastUndoRange =
+                    this.$getUndoSelection(delta.deltas, false, lastUndoRange);
+            }
+        }
+        this.$fromUndo = false;
+        lastUndoRange &&
+            this.$undoSelect &&
+            !dontSelect &&
+            this.selection.setSelectionRange(lastUndoRange);
+        return lastUndoRange;
+    };
+    this.setUndoSelect = function(enable) {
+        this.$undoSelect = enable;
+    };
+
+    this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) {
+        function isInsert(delta) {
+            return isUndo ? delta.action !== "insert" : delta.action === "insert";
+        }
+
+        var delta = deltas[0];
+        var range, point;
+        var lastDeltaIsInsert = false;
+        if (isInsert(delta)) {
+            range = Range.fromPoints(delta.start, delta.end);
+            lastDeltaIsInsert = true;
+        } else {
+            range = Range.fromPoints(delta.start, delta.start);
+            lastDeltaIsInsert = false;
+        }
+
+        for (var i = 1; i < deltas.length; i++) {
+            delta = deltas[i];
+            if (isInsert(delta)) {
+                point = delta.start;
+                if (range.compare(point.row, point.column) == -1) {
+                    range.setStart(point);
+                }
+                point = delta.end;
+                if (range.compare(point.row, point.column) == 1) {
+                    range.setEnd(point);
+                }
+                lastDeltaIsInsert = true;
+            } else {
+                point = delta.start;
+                if (range.compare(point.row, point.column) == -1) {
+                    range = Range.fromPoints(delta.start, delta.start);
+                }
+                lastDeltaIsInsert = false;
+            }
+        }
+        if (lastUndoRange != null) {
+            if (Range.comparePoints(lastUndoRange.start, range.start) === 0) {
+                lastUndoRange.start.column += range.end.column - range.start.column;
+                lastUndoRange.end.column += range.end.column - range.start.column;
+            }
+
+            var cmp = lastUndoRange.compareRange(range);
+            if (cmp == 1) {
+                range.setStart(lastUndoRange.start);
+            } else if (cmp == -1) {
+                range.setEnd(lastUndoRange.end);
+            }
+        }
+
+        return range;
+    };
+    this.replace = function(range, text) {
+        return this.doc.replace(range, text);
+    };
+    this.moveText = function(fromRange, toPosition, copy) {
+        var text = this.getTextRange(fromRange);
+        var folds = this.getFoldsInRange(fromRange);
+
+        var toRange = Range.fromPoints(toPosition, toPosition);
+        if (!copy) {
+            this.remove(fromRange);
+            var rowDiff = fromRange.start.row - fromRange.end.row;
+            var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column;
+            if (collDiff) {
+                if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column)
+                    toRange.start.column += collDiff;
+                if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column)
+                    toRange.end.column += collDiff;
+            }
+            if (rowDiff && toRange.start.row >= fromRange.end.row) {
+                toRange.start.row += rowDiff;
+                toRange.end.row += rowDiff;
+            }
+        }
+
+        toRange.end = this.insert(toRange.start, text);
+        if (folds.length) {
+            var oldStart = fromRange.start;
+            var newStart = toRange.start;
+            var rowDiff = newStart.row - oldStart.row;
+            var collDiff = newStart.column - oldStart.column;
+            this.addFolds(folds.map(function(x) {
+                x = x.clone();
+                if (x.start.row == oldStart.row)
+                    x.start.column += collDiff;
+                if (x.end.row == oldStart.row)
+                    x.end.column += collDiff;
+                x.start.row += rowDiff;
+                x.end.row += rowDiff;
+                return x;
+            }));
+        }
+
+        return toRange;
+    };
+    this.indentRows = function(startRow, endRow, indentString) {
+        indentString = indentString.replace(/\t/g, this.getTabString());
+        for (var row=startRow; row<=endRow; row++)
+            this.doc.insertInLine({row: row, column: 0}, indentString);
+    };
+    this.outdentRows = function (range) {
+        var rowRange = range.collapseRows();
+        var deleteRange = new Range(0, 0, 0, 0);
+        var size = this.getTabSize();
+
+        for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) {
+            var line = this.getLine(i);
+
+            deleteRange.start.row = i;
+            deleteRange.end.row = i;
+            for (var j = 0; j < size; ++j)
+                if (line.charAt(j) != ' ')
+                    break;
+            if (j < size && line.charAt(j) == '\t') {
+                deleteRange.start.column = j;
+                deleteRange.end.column = j + 1;
+            } else {
+                deleteRange.start.column = 0;
+                deleteRange.end.column = j;
+            }
+            this.remove(deleteRange);
+        }
+    };
+
+    this.$moveLines = function(firstRow, lastRow, dir) {
+        firstRow = this.getRowFoldStart(firstRow);
+        lastRow = this.getRowFoldEnd(lastRow);
+        if (dir < 0) {
+            var row = this.getRowFoldStart(firstRow + dir);
+            if (row < 0) return 0;
+            var diff = row-firstRow;
+        } else if (dir > 0) {
+            var row = this.getRowFoldEnd(lastRow + dir);
+            if (row > this.doc.getLength()-1) return 0;
+            var diff = row-lastRow;
+        } else {
+            firstRow = this.$clipRowToDocument(firstRow);
+            lastRow = this.$clipRowToDocument(lastRow);
+            var diff = lastRow - firstRow + 1;
+        }
+
+        var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE);
+        var folds = this.getFoldsInRange(range).map(function(x){
+            x = x.clone();
+            x.start.row += diff;
+            x.end.row += diff;
+            return x;
+        });
+        
+        var lines = dir == 0
+            ? this.doc.getLines(firstRow, lastRow)
+            : this.doc.removeFullLines(firstRow, lastRow);
+        this.doc.insertFullLines(firstRow+diff, lines);
+        folds.length && this.addFolds(folds);
+        return diff;
+    };
+    this.moveLinesUp = function(firstRow, lastRow) {
+        return this.$moveLines(firstRow, lastRow, -1);
+    };
+    this.moveLinesDown = function(firstRow, lastRow) {
+        return this.$moveLines(firstRow, lastRow, 1);
+    };
+    this.duplicateLines = function(firstRow, lastRow) {
+        return this.$moveLines(firstRow, lastRow, 0);
+    };
+
+
+    this.$clipRowToDocument = function(row) {
+        return Math.max(0, Math.min(row, this.doc.getLength()-1));
+    };
+
+    this.$clipColumnToRow = function(row, column) {
+        if (column < 0)
+            return 0;
+        return Math.min(this.doc.getLine(row).length, column);
+    };
+
+
+    this.$clipPositionToDocument = function(row, column) {
+        column = Math.max(0, column);
+
+        if (row < 0) {
+            row = 0;
+            column = 0;
+        } else {
+            var len = this.doc.getLength();
+            if (row >= len) {
+                row = len - 1;
+                column = this.doc.getLine(len-1).length;
+            } else {
+                column = Math.min(this.doc.getLine(row).length, column);
+            }
+        }
+
+        return {
+            row: row,
+            column: column
+        };
+    };
+
+    this.$clipRangeToDocument = function(range) {
+        if (range.start.row < 0) {
+            range.start.row = 0;
+            range.start.column = 0;
+        } else {
+            range.start.column = this.$clipColumnToRow(
+                range.start.row,
+                range.start.column
+            );
+        }
+
+        var len = this.doc.getLength() - 1;
+        if (range.end.row > len) {
+            range.end.row = len;
+            range.end.column = this.doc.getLine(len).length;
+        } else {
+            range.end.column = this.$clipColumnToRow(
+                range.end.row,
+                range.end.column
+            );
+        }
+        return range;
+    };
+    this.$wrapLimit = 80;
+    this.$useWrapMode = false;
+    this.$wrapLimitRange = {
+        min : null,
+        max : null
+    };
+    this.setUseWrapMode = function(useWrapMode) {
+        if (useWrapMode != this.$useWrapMode) {
+            this.$useWrapMode = useWrapMode;
+            this.$modified = true;
+            this.$resetRowCache(0);
+            if (useWrapMode) {
+                var len = this.getLength();
+                this.$wrapData = Array(len);
+                this.$updateWrapData(0, len - 1);
+            }
+
+            this._signal("changeWrapMode");
+        }
+    };
+    this.getUseWrapMode = function() {
+        return this.$useWrapMode;
+    };
+    this.setWrapLimitRange = function(min, max) {
+        if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) {
+            this.$wrapLimitRange = { min: min, max: max };
+            this.$modified = true;
+            if (this.$useWrapMode)
+                this._signal("changeWrapMode");
+        }
+    };
+    this.adjustWrapLimit = function(desiredLimit, $printMargin) {
+        var limits = this.$wrapLimitRange;
+        if (limits.max < 0)
+            limits = {min: $printMargin, max: $printMargin};
+        var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max);
+        if (wrapLimit != this.$wrapLimit && wrapLimit > 1) {
+            this.$wrapLimit = wrapLimit;
+            this.$modified = true;
+            if (this.$useWrapMode) {
+                this.$updateWrapData(0, this.getLength() - 1);
+                this.$resetRowCache(0);
+                this._signal("changeWrapLimit");
+            }
+            return true;
+        }
+        return false;
+    };
+
+    this.$constrainWrapLimit = function(wrapLimit, min, max) {
+        if (min)
+            wrapLimit = Math.max(min, wrapLimit);
+
+        if (max)
+            wrapLimit = Math.min(max, wrapLimit);
+
+        return wrapLimit;
+    };
+    this.getWrapLimit = function() {
+        return this.$wrapLimit;
+    };
+    this.setWrapLimit = function (limit) {
+        this.setWrapLimitRange(limit, limit);
+    };
+    this.getWrapLimitRange = function() {
+        return {
+            min : this.$wrapLimitRange.min,
+            max : this.$wrapLimitRange.max
+        };
+    };
+
+    this.$updateInternalDataOnChange = function(delta) {
+        var useWrapMode = this.$useWrapMode;
+        var action = delta.action;
+        var start = delta.start;
+        var end = delta.end;
+        var firstRow = start.row;
+        var lastRow = end.row;
+        var len = lastRow - firstRow;
+        var removedFolds = null;
+        
+        this.$updating = true;
+        if (len != 0) {
+            if (action === "remove") {
+                this[useWrapMode ? "$wrapData" : "$rowLengthCache"].splice(firstRow, len);
+
+                var foldLines = this.$foldData;
+                removedFolds = this.getFoldsInRange(delta);
+                this.removeFolds(removedFolds);
+
+                var foldLine = this.getFoldLine(end.row);
+                var idx = 0;
+                if (foldLine) {
+                    foldLine.addRemoveChars(end.row, end.column, start.column - end.column);
+                    foldLine.shiftRow(-len);
+
+                    var foldLineBefore = this.getFoldLine(firstRow);
+                    if (foldLineBefore && foldLineBefore !== foldLine) {
+                        foldLineBefore.merge(foldLine);
+                        foldLine = foldLineBefore;
+                    }
+                    idx = foldLines.indexOf(foldLine) + 1;
+                }
+
+                for (idx; idx < foldLines.length; idx++) {
+                    var foldLine = foldLines[idx];
+                    if (foldLine.start.row >= end.row) {
+                        foldLine.shiftRow(-len);
+                    }
+                }
+
+                lastRow = firstRow;
+            } else {
+                var args = Array(len);
+                args.unshift(firstRow, 0);
+                var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache
+                arr.splice.apply(arr, args);
+                var foldLines = this.$foldData;
+                var foldLine = this.getFoldLine(firstRow);
+                var idx = 0;
+                if (foldLine) {
+                    var cmp = foldLine.range.compareInside(start.row, start.column);
+                    if (cmp == 0) {
+                        foldLine = foldLine.split(start.row, start.column);
+                        if (foldLine) {
+                            foldLine.shiftRow(len);
+                            foldLine.addRemoveChars(lastRow, 0, end.column - start.column);
+                        }
+                    } else
+                    if (cmp == -1) {
+                        foldLine.addRemoveChars(firstRow, 0, end.column - start.column);
+                        foldLine.shiftRow(len);
+                    }
+                    idx = foldLines.indexOf(foldLine) + 1;
+                }
+
+                for (idx; idx < foldLines.length; idx++) {
+                    var foldLine = foldLines[idx];
+                    if (foldLine.start.row >= firstRow) {
+                        foldLine.shiftRow(len);
+                    }
+                }
+            }
+        } else {
+            len = Math.abs(delta.start.column - delta.end.column);
+            if (action === "remove") {
+                removedFolds = this.getFoldsInRange(delta);
+                this.removeFolds(removedFolds);
+
+                len = -len;
+            }
+            var foldLine = this.getFoldLine(firstRow);
+            if (foldLine) {
+                foldLine.addRemoveChars(firstRow, start.column, len);
+            }
+        }
+
+        if (useWrapMode && this.$wrapData.length != this.doc.getLength()) {
+            console.error("doc.getLength() and $wrapData.length have to be the same!");
+        }
+        this.$updating = false;
+
+        if (useWrapMode)
+            this.$updateWrapData(firstRow, lastRow);
+        else
+            this.$updateRowLengthCache(firstRow, lastRow);
+
+        return removedFolds;
+    };
+
+    this.$updateRowLengthCache = function(firstRow, lastRow, b) {
+        this.$rowLengthCache[firstRow] = null;
+        this.$rowLengthCache[lastRow] = null;
+    };
+
+    this.$updateWrapData = function(firstRow, lastRow) {
+        var lines = this.doc.getAllLines();
+        var tabSize = this.getTabSize();
+        var wrapData = this.$wrapData;
+        var wrapLimit = this.$wrapLimit;
+        var tokens;
+        var foldLine;
+
+        var row = firstRow;
+        lastRow = Math.min(lastRow, lines.length - 1);
+        while (row <= lastRow) {
+            foldLine = this.getFoldLine(row, foldLine);
+            if (!foldLine) {
+                tokens = this.$getDisplayTokens(lines[row]);
+                wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);
+                row ++;
+            } else {
+                tokens = [];
+                foldLine.walk(function(placeholder, row, column, lastColumn) {
+                        var walkTokens;
+                        if (placeholder != null) {
+                            walkTokens = this.$getDisplayTokens(
+                                            placeholder, tokens.length);
+                            walkTokens[0] = PLACEHOLDER_START;
+                            for (var i = 1; i < walkTokens.length; i++) {
+                                walkTokens[i] = PLACEHOLDER_BODY;
+                            }
+                        } else {
+                            walkTokens = this.$getDisplayTokens(
+                                lines[row].substring(lastColumn, column),
+                                tokens.length);
+                        }
+                        tokens = tokens.concat(walkTokens);
+                    }.bind(this),
+                    foldLine.end.row,
+                    lines[foldLine.end.row].length + 1
+                );
+
+                wrapData[foldLine.start.row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);
+                row = foldLine.end.row + 1;
+            }
+        }
+    };
+    var CHAR = 1,
+        CHAR_EXT = 2,
+        PLACEHOLDER_START = 3,
+        PLACEHOLDER_BODY =  4,
+        PUNCTUATION = 9,
+        SPACE = 10,
+        TAB = 11,
+        TAB_SPACE = 12;
+
+
+    this.$computeWrapSplits = function(tokens, wrapLimit, tabSize) {
+        if (tokens.length == 0) {
+            return [];
+        }
+
+        var splits = [];
+        var displayLength = tokens.length;
+        var lastSplit = 0, lastDocSplit = 0;
+
+        var isCode = this.$wrapAsCode;
+
+        var indentedSoftWrap = this.$indentedSoftWrap;
+        var maxIndent = wrapLimit <= Math.max(2 * tabSize, 8)
+            || indentedSoftWrap === false ? 0 : Math.floor(wrapLimit / 2);
+
+        function getWrapIndent() {
+            var indentation = 0;
+            if (maxIndent === 0)
+                return indentation;
+            if (indentedSoftWrap) {
+                for (var i = 0; i < tokens.length; i++) {
+                    var token = tokens[i];
+                    if (token == SPACE)
+                        indentation += 1;
+                    else if (token == TAB)
+                        indentation += tabSize;
+                    else if (token == TAB_SPACE)
+                        continue;
+                    else
+                        break;
+                }
+            }
+            if (isCode && indentedSoftWrap !== false)
+                indentation += tabSize;
+            return Math.min(indentation, maxIndent);
+        }
+        function addSplit(screenPos) {
+            var displayed = tokens.slice(lastSplit, screenPos);
+            var len = displayed.length;
+            displayed.join("")
+                .replace(/12/g, function() {
+                    len -= 1;
+                })
+                .replace(/2/g, function() {
+                    len -= 1;
+                });
+
+            if (!splits.length) {
+                indent = getWrapIndent();
+                splits.indent = indent;
+            }
+            lastDocSplit += len;
+            splits.push(lastDocSplit);
+            lastSplit = screenPos;
+        }
+        var indent = 0;
+        while (displayLength - lastSplit > wrapLimit - indent) {
+            var split = lastSplit + wrapLimit - indent;
+            if (tokens[split - 1] >= SPACE && tokens[split] >= SPACE) {
+                addSplit(split);
+                continue;
+            }
+            if (tokens[split] == PLACEHOLDER_START || tokens[split] == PLACEHOLDER_BODY) {
+                for (split; split != lastSplit - 1; split--) {
+                    if (tokens[split] == PLACEHOLDER_START) {
+                        break;
+                    }
+                }
+                if (split > lastSplit) {
+                    addSplit(split);
+                    continue;
+                }
+                split = lastSplit + wrapLimit;
+                for (split; split < tokens.length; split++) {
+                    if (tokens[split] != PLACEHOLDER_BODY) {
+                        break;
+                    }
+                }
+                if (split == tokens.length) {
+                    break;  // Breaks the while-loop.
+                }
+                addSplit(split);
+                continue;
+            }
+            var minSplit = Math.max(split - (wrapLimit -(wrapLimit>>2)), lastSplit - 1);
+            while (split > minSplit && tokens[split] < PLACEHOLDER_START) {
+                split --;
+            }
+            if (isCode) {
+                while (split > minSplit && tokens[split] < PLACEHOLDER_START) {
+                    split --;
+                }
+                while (split > minSplit && tokens[split] == PUNCTUATION) {
+                    split --;
+                }
+            } else {
+                while (split > minSplit && tokens[split] < SPACE) {
+                    split --;
+                }
+            }
+            if (split > minSplit) {
+                addSplit(++split);
+                continue;
+            }
+            split = lastSplit + wrapLimit;
+            if (tokens[split] == CHAR_EXT)
+                split--;
+            addSplit(split - indent);
+        }
+        return splits;
+    };
+    this.$getDisplayTokens = function(str, offset) {
+        var arr = [];
+        var tabSize;
+        offset = offset || 0;
+
+        for (var i = 0; i < str.length; i++) {
+            var c = str.charCodeAt(i);
+            if (c == 9) {
+                tabSize = this.getScreenTabSize(arr.length + offset);
+                arr.push(TAB);
+                for (var n = 1; n < tabSize; n++) {
+                    arr.push(TAB_SPACE);
+                }
+            }
+            else if (c == 32) {
+                arr.push(SPACE);
+            } else if((c > 39 && c < 48) || (c > 57 && c < 64)) {
+                arr.push(PUNCTUATION);
+            }
+            else if (c >= 0x1100 && isFullWidth(c)) {
+                arr.push(CHAR, CHAR_EXT);
+            } else {
+                arr.push(CHAR);
+            }
+        }
+        return arr;
+    };
+    this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {
+        if (maxScreenColumn == 0)
+            return [0, 0];
+        if (maxScreenColumn == null)
+            maxScreenColumn = Infinity;
+        screenColumn = screenColumn || 0;
+
+        var c, column;
+        for (column = 0; column < str.length; column++) {
+            c = str.charCodeAt(column);
+            if (c == 9) {
+                screenColumn += this.getScreenTabSize(screenColumn);
+            }
+            else if (c >= 0x1100 && isFullWidth(c)) {
+                screenColumn += 2;
+            } else {
+                screenColumn += 1;
+            }
+            if (screenColumn > maxScreenColumn) {
+                break;
+            }
+        }
+
+        return [screenColumn, column];
+    };
+
+    this.lineWidgets = null;
+    this.getRowLength = function(row) {
+        if (this.lineWidgets)
+            var h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;
+        else 
+            h = 0
+        if (!this.$useWrapMode || !this.$wrapData[row]) {
+            return 1 + h;
+        } else {
+            return this.$wrapData[row].length + 1 + h;
+        }
+    };
+    this.getRowLineCount = function(row) {
+        if (!this.$useWrapMode || !this.$wrapData[row]) {
+            return 1;
+        } else {
+            return this.$wrapData[row].length + 1;
+        }
+    };
+
+    this.getRowWrapIndent = function(screenRow) {
+        if (this.$useWrapMode) {
+            var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);
+            var splits = this.$wrapData[pos.row];
+            return splits.length && splits[0] < pos.column ? splits.indent : 0;
+        } else {
+            return 0;
+        }
+    }
+    this.getScreenLastRowColumn = function(screenRow) {
+        var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);
+        return this.documentToScreenColumn(pos.row, pos.column);
+    };
+    this.getDocumentLastRowColumn = function(docRow, docColumn) {
+        var screenRow = this.documentToScreenRow(docRow, docColumn);
+        return this.getScreenLastRowColumn(screenRow);
+    };
+    this.getDocumentLastRowColumnPosition = function(docRow, docColumn) {
+        var screenRow = this.documentToScreenRow(docRow, docColumn);
+        return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10);
+    };
+    this.getRowSplitData = function(row) {
+        if (!this.$useWrapMode) {
+            return undefined;
+        } else {
+            return this.$wrapData[row];
+        }
+    };
+    this.getScreenTabSize = function(screenColumn) {
+        return this.$tabSize - screenColumn % this.$tabSize;
+    };
+
+
+    this.screenToDocumentRow = function(screenRow, screenColumn) {
+        return this.screenToDocumentPosition(screenRow, screenColumn).row;
+    };
+
+
+    this.screenToDocumentColumn = function(screenRow, screenColumn) {
+        return this.screenToDocumentPosition(screenRow, screenColumn).column;
+    };
+    this.screenToDocumentPosition = function(screenRow, screenColumn) {
+        if (screenRow < 0)
+            return {row: 0, column: 0};
+
+        var line;
+        var docRow = 0;
+        var docColumn = 0;
+        var column;
+        var row = 0;
+        var rowLength = 0;
+
+        var rowCache = this.$screenRowCache;
+        var i = this.$getRowCacheIndex(rowCache, screenRow);
+        var l = rowCache.length;
+        if (l && i >= 0) {
+            var row = rowCache[i];
+            var docRow = this.$docRowCache[i];
+            var doCache = screenRow > rowCache[l - 1];
+        } else {
+            var doCache = !l;
+        }
+
+        var maxRow = this.getLength() - 1;
+        var foldLine = this.getNextFoldLine(docRow);
+        var foldStart = foldLine ? foldLine.start.row : Infinity;
+
+        while (row <= screenRow) {
+            rowLength = this.getRowLength(docRow);
+            if (row + rowLength > screenRow || docRow >= maxRow) {
+                break;
+            } else {
+                row += rowLength;
+                docRow++;
+                if (docRow > foldStart) {
+                    docRow = foldLine.end.row+1;
+                    foldLine = this.getNextFoldLine(docRow, foldLine);
+                    foldStart = foldLine ? foldLine.start.row : Infinity;
+                }
+            }
+
+            if (doCache) {
+                this.$docRowCache.push(docRow);
+                this.$screenRowCache.push(row);
+            }
+        }
+
+        if (foldLine && foldLine.start.row <= docRow) {
+            line = this.getFoldDisplayLine(foldLine);
+            docRow = foldLine.start.row;
+        } else if (row + rowLength <= screenRow || docRow > maxRow) {
+            return {
+                row: maxRow,
+                column: this.getLine(maxRow).length
+            };
+        } else {
+            line = this.getLine(docRow);
+            foldLine = null;
+        }
+        var wrapIndent = 0;
+        if (this.$useWrapMode) {
+            var splits = this.$wrapData[docRow];
+            if (splits) {
+                var splitIndex = Math.floor(screenRow - row);
+                column = splits[splitIndex];
+                if(splitIndex > 0 && splits.length) {
+                    wrapIndent = splits.indent;
+                    docColumn = splits[splitIndex - 1] || splits[splits.length - 1];
+                    line = line.substring(docColumn);
+                }
+            }
+        }
+
+        docColumn += this.$getStringScreenWidth(line, screenColumn - wrapIndent)[1];
+        if (this.$useWrapMode && docColumn >= column)
+            docColumn = column - 1;
+
+        if (foldLine)
+            return foldLine.idxToPosition(docColumn);
+
+        return {row: docRow, column: docColumn};
+    };
+    this.documentToScreenPosition = function(docRow, docColumn) {
+        if (typeof docColumn === "undefined")
+            var pos = this.$clipPositionToDocument(docRow.row, docRow.column);
+        else
+            pos = this.$clipPositionToDocument(docRow, docColumn);
+
+        docRow = pos.row;
+        docColumn = pos.column;
+
+        var screenRow = 0;
+        var foldStartRow = null;
+        var fold = null;
+        fold = this.getFoldAt(docRow, docColumn, 1);
+        if (fold) {
+            docRow = fold.start.row;
+            docColumn = fold.start.column;
+        }
+
+        var rowEnd, row = 0;
+
+
+        var rowCache = this.$docRowCache;
+        var i = this.$getRowCacheIndex(rowCache, docRow);
+        var l = rowCache.length;
+        if (l && i >= 0) {
+            var row = rowCache[i];
+            var screenRow = this.$screenRowCache[i];
+            var doCache = docRow > rowCache[l - 1];
+        } else {
+            var doCache = !l;
+        }
+
+        var foldLine = this.getNextFoldLine(row);
+        var foldStart = foldLine ?foldLine.start.row :Infinity;
+
+        while (row < docRow) {
+            if (row >= foldStart) {
+                rowEnd = foldLine.end.row + 1;
+                if (rowEnd > docRow)
+                    break;
+                foldLine = this.getNextFoldLine(rowEnd, foldLine);
+                foldStart = foldLine ?foldLine.start.row :Infinity;
+            }
+            else {
+                rowEnd = row + 1;
+            }
+
+            screenRow += this.getRowLength(row);
+            row = rowEnd;
+
+            if (doCache) {
+                this.$docRowCache.push(row);
+                this.$screenRowCache.push(screenRow);
+            }
+        }
+        var textLine = "";
+        if (foldLine && row >= foldStart) {
+            textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn);
+            foldStartRow = foldLine.start.row;
+        } else {
+            textLine = this.getLine(docRow).substring(0, docColumn);
+            foldStartRow = docRow;
+        }
+        var wrapIndent = 0;
+        if (this.$useWrapMode) {
+            var wrapRow = this.$wrapData[foldStartRow];
+            if (wrapRow) {
+                var screenRowOffset = 0;
+                while (textLine.length >= wrapRow[screenRowOffset]) {
+                    screenRow ++;
+                    screenRowOffset++;
+                }
+                textLine = textLine.substring(
+                    wrapRow[screenRowOffset - 1] || 0, textLine.length
+                );
+                wrapIndent = screenRowOffset > 0 ? wrapRow.indent : 0;
+            }
+        }
+
+        return {
+            row: screenRow,
+            column: wrapIndent + this.$getStringScreenWidth(textLine)[0]
+        };
+    };
+    this.documentToScreenColumn = function(row, docColumn) {
+        return this.documentToScreenPosition(row, docColumn).column;
+    };
+    this.documentToScreenRow = function(docRow, docColumn) {
+        return this.documentToScreenPosition(docRow, docColumn).row;
+    };
+    this.getScreenLength = function() {
+        var screenRows = 0;
+        var fold = null;
+        if (!this.$useWrapMode) {
+            screenRows = this.getLength();
+            var foldData = this.$foldData;
+            for (var i = 0; i < foldData.length; i++) {
+                fold = foldData[i];
+                screenRows -= fold.end.row - fold.start.row;
+            }
+        } else {
+            var lastRow = this.$wrapData.length;
+            var row = 0, i = 0;
+            var fold = this.$foldData[i++];
+            var foldStart = fold ? fold.start.row :Infinity;
+
+            while (row < lastRow) {
+                var splits = this.$wrapData[row];
+                screenRows += splits ? splits.length + 1 : 1;
+                row ++;
+                if (row > foldStart) {
+                    row = fold.end.row+1;
+                    fold = this.$foldData[i++];
+                    foldStart = fold ?fold.start.row :Infinity;
+                }
+            }
+        }
+        if (this.lineWidgets)
+            screenRows += this.$getWidgetScreenLength();
+
+        return screenRows;
+    };
+    this.$setFontMetrics = function(fm) {
+        if (!this.$enableVarChar) return;
+        this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {
+            if (maxScreenColumn === 0)
+                return [0, 0];
+            if (!maxScreenColumn)
+                maxScreenColumn = Infinity;
+            screenColumn = screenColumn || 0;
+            
+            var c, column;
+            for (column = 0; column < str.length; column++) {
+                c = str.charAt(column);
+                if (c === "\t") {
+                    screenColumn += this.getScreenTabSize(screenColumn);
+                } else {
+                    screenColumn += fm.getCharacterWidth(c);
+                }
+                if (screenColumn > maxScreenColumn) {
+                    break;
+                }
+            }
+            
+            return [screenColumn, column];
+        };
+    };
+    
+    this.destroy = function() {
+        if (this.bgTokenizer) {
+            this.bgTokenizer.setDocument(null);
+            this.bgTokenizer = null;
+        }
+        this.$stopWorker();
+    };
+    function isFullWidth(c) {
+        if (c < 0x1100)
+            return false;
+        return c >= 0x1100 && c <= 0x115F ||
+               c >= 0x11A3 && c <= 0x11A7 ||
+               c >= 0x11FA && c <= 0x11FF ||
+               c >= 0x2329 && c <= 0x232A ||
+               c >= 0x2E80 && c <= 0x2E99 ||
+               c >= 0x2E9B && c <= 0x2EF3 ||
+               c >= 0x2F00 && c <= 0x2FD5 ||
+               c >= 0x2FF0 && c <= 0x2FFB ||
+               c >= 0x3000 && c <= 0x303E ||
+               c >= 0x3041 && c <= 0x3096 ||
+               c >= 0x3099 && c <= 0x30FF ||
+               c >= 0x3105 && c <= 0x312D ||
+               c >= 0x3131 && c <= 0x318E ||
+               c >= 0x3190 && c <= 0x31BA ||
+               c >= 0x31C0 && c <= 0x31E3 ||
+               c >= 0x31F0 && c <= 0x321E ||
+               c >= 0x3220 && c <= 0x3247 ||
+               c >= 0x3250 && c <= 0x32FE ||
+               c >= 0x3300 && c <= 0x4DBF ||
+               c >= 0x4E00 && c <= 0xA48C ||
+               c >= 0xA490 && c <= 0xA4C6 ||
+               c >= 0xA960 && c <= 0xA97C ||
+               c >= 0xAC00 && c <= 0xD7A3 ||
+               c >= 0xD7B0 && c <= 0xD7C6 ||
+               c >= 0xD7CB && c <= 0xD7FB ||
+               c >= 0xF900 && c <= 0xFAFF ||
+               c >= 0xFE10 && c <= 0xFE19 ||
+               c >= 0xFE30 && c <= 0xFE52 ||
+               c >= 0xFE54 && c <= 0xFE66 ||
+               c >= 0xFE68 && c <= 0xFE6B ||
+               c >= 0xFF01 && c <= 0xFF60 ||
+               c >= 0xFFE0 && c <= 0xFFE6;
+    }
+
+}).call(EditSession.prototype);
+
+require("./edit_session/folding").Folding.call(EditSession.prototype);
+require("./edit_session/bracket_match").BracketMatch.call(EditSession.prototype);
+
+
+config.defineOptions(EditSession.prototype, "session", {
+    wrap: {
+        set: function(value) {
+            if (!value || value == "off")
+                value = false;
+            else if (value == "free")
+                value = true;
+            else if (value == "printMargin")
+                value = -1;
+            else if (typeof value == "string")
+                value = parseInt(value, 10) || false;
+
+            if (this.$wrap == value)
+                return;
+            this.$wrap = value;
+            if (!value) {
+                this.setUseWrapMode(false);
+            } else {
+                var col = typeof value == "number" ? value : null;
+                this.setWrapLimitRange(col, col);
+                this.setUseWrapMode(true);
+            }
+        },
+        get: function() {
+            if (this.getUseWrapMode()) {
+                if (this.$wrap == -1)
+                    return "printMargin";
+                if (!this.getWrapLimitRange().min)
+                    return "free";
+                return this.$wrap;
+            }
+            return "off";
+        },
+        handlesSet: true
+    },    
+    wrapMethod: {
+        set: function(val) {
+            val = val == "auto"
+                ? this.$mode.type != "text"
+                : val != "text";
+            if (val != this.$wrapAsCode) {
+                this.$wrapAsCode = val;
+                if (this.$useWrapMode) {
+                    this.$modified = true;
+                    this.$resetRowCache(0);
+                    this.$updateWrapData(0, this.getLength() - 1);
+                }
+            }
+        },
+        initialValue: "auto"
+    },
+    indentedSoftWrap: { initialValue: true },
+    firstLineNumber: {
+        set: function() {this._signal("changeBreakpoint");},
+        initialValue: 1
+    },
+    useWorker: {
+        set: function(useWorker) {
+            this.$useWorker = useWorker;
+
+            this.$stopWorker();
+            if (useWorker)
+                this.$startWorker();
+        },
+        initialValue: true
+    },
+    useSoftTabs: {initialValue: true},
+    tabSize: {
+        set: function(tabSize) {
+            if (isNaN(tabSize) || this.$tabSize === tabSize) return;
+
+            this.$modified = true;
+            this.$rowLengthCache = [];
+            this.$tabSize = tabSize;
+            this._signal("changeTabSize");
+        },
+        initialValue: 4,
+        handlesSet: true
+    },
+    overwrite: {
+        set: function(val) {this._signal("changeOverwrite");},
+        initialValue: false
+    },
+    newLineMode: {
+        set: function(val) {this.doc.setNewLineMode(val)},
+        get: function() {return this.doc.getNewLineMode()},
+        handlesSet: true
+    },
+    mode: {
+        set: function(val) { this.setMode(val) },
+        get: function() { return this.$modeId }
+    }
+});
+
+exports.EditSession = EditSession;
+});
+
+define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(require, exports, module) {
+"use strict";
+
+var lang = require("./lib/lang");
+var oop = require("./lib/oop");
+var Range = require("./range").Range;
+
+var Search = function() {
+    this.$options = {};
+};
+
+(function() {
+    this.set = function(options) {
+        oop.mixin(this.$options, options);
+        return this;
+    };
+    this.getOptions = function() {
+        return lang.copyObject(this.$options);
+    };
+    this.setOptions = function(options) {
+        this.$options = options;
+    };
+    this.find = function(session) {
+        var options = this.$options;
+        var iterator = this.$matchIterator(session, options);
+        if (!iterator)
+            return false;
+
+        var firstRange = null;
+        iterator.forEach(function(range, row, offset) {
+            if (!range.start) {
+                var column = range.offset + (offset || 0);
+                firstRange = new Range(row, column, row, column + range.length);
+                if (!range.length && options.start && options.start.start
+                    && options.skipCurrent != false && firstRange.isEqual(options.start)
+                ) {
+                    firstRange = null;
+                    return false;
+                }
+            } else
+                firstRange = range;
+            return true;
+        });
+
+        return firstRange;
+    };
+    this.findAll = function(session) {
+        var options = this.$options;
+        if (!options.needle)
+            return [];
+        this.$assembleRegExp(options);
+
+        var range = options.range;
+        var lines = range
+            ? session.getLines(range.start.row, range.end.row)
+            : session.doc.getAllLines();
+
+        var ranges = [];
+        var re = options.re;
+        if (options.$isMultiLine) {
+            var len = re.length;
+            var maxRow = lines.length - len;
+            var prevRange;
+            outer: for (var row = re.offset || 0; row <= maxRow; row++) {
+                for (var j = 0; j < len; j++)
+                    if (lines[row + j].search(re[j]) == -1)
+                        continue outer;
+                
+                var startLine = lines[row];
+                var line = lines[row + len - 1];
+                var startIndex = startLine.length - startLine.match(re[0])[0].length;
+                var endIndex = line.match(re[len - 1])[0].length;
+                
+                if (prevRange && prevRange.end.row === row &&
+                    prevRange.end.column > startIndex
+                ) {
+                    continue;
+                }
+                ranges.push(prevRange = new Range(
+                    row, startIndex, row + len - 1, endIndex
+                ));
+                if (len > 2)
+                    row = row + len - 2;
+            }
+        } else {
+            for (var i = 0; i < lines.length; i++) {
+                var matches = lang.getMatchOffsets(lines[i], re);
+                for (var j = 0; j < matches.length; j++) {
+                    var match = matches[j];
+                    ranges.push(new Range(i, match.offset, i, match.offset + match.length));
+                }
+            }
+        }
+
+        if (range) {
+            var startColumn = range.start.column;
+            var endColumn = range.start.column;
+            var i = 0, j = ranges.length - 1;
+            while (i < j && ranges[i].start.column < startColumn && ranges[i].start.row == range.start.row)
+                i++;
+
+            while (i < j && ranges[j].end.column > endColumn && ranges[j].end.row == range.end.row)
+                j--;
+            
+            ranges = ranges.slice(i, j + 1);
+            for (i = 0, j = ranges.length; i < j; i++) {
+                ranges[i].start.row += range.start.row;
+                ranges[i].end.row += range.start.row;
+            }
+        }
+
+        return ranges;
+    };
+    this.replace = function(input, replacement) {
+        var options = this.$options;
+
+        var re = this.$assembleRegExp(options);
+        if (options.$isMultiLine)
+            return replacement;
+
+        if (!re)
+            return;
+
+        var match = re.exec(input);
+        if (!match || match[0].length != input.length)
+            return null;
+        
+        replacement = input.replace(re, replacement);
+        if (options.preserveCase) {
+            replacement = replacement.split("");
+            for (var i = Math.min(input.length, input.length); i--; ) {
+                var ch = input[i];
+                if (ch && ch.toLowerCase() != ch)
+                    replacement[i] = replacement[i].toUpperCase();
+                else
+                    replacement[i] = replacement[i].toLowerCase();
+            }
+            replacement = replacement.join("");
+        }
+        
+        return replacement;
+    };
+
+    this.$matchIterator = function(session, options) {
+        var re = this.$assembleRegExp(options);
+        if (!re)
+            return false;
+
+        var callback;
+        if (options.$isMultiLine) {
+            var len = re.length;
+            var matchIterator = function(line, row, offset) {
+                var startIndex = line.search(re[0]);
+                if (startIndex == -1)
+                    return;
+                for (var i = 1; i < len; i++) {
+                    line = session.getLine(row + i);
+                    if (line.search(re[i]) == -1)
+                        return;
+                }
+
+                var endIndex = line.match(re[len - 1])[0].length;
+
+                var range = new Range(row, startIndex, row + len - 1, endIndex);
+                if (re.offset == 1) {
+                    range.start.row--;
+                    range.start.column = Number.MAX_VALUE;
+                } else if (offset)
+                    range.start.column += offset;
+
+                if (callback(range))
+                    return true;
+            };
+        } else if (options.backwards) {
+            var matchIterator = function(line, row, startIndex) {
+                var matches = lang.getMatchOffsets(line, re);
+                for (var i = matches.length-1; i >= 0; i--)
+                    if (callback(matches[i], row, startIndex))
+                        return true;
+            };
+        } else {
+            var matchIterator = function(line, row, startIndex) {
+                var matches = lang.getMatchOffsets(line, re);
+                for (var i = 0; i < matches.length; i++)
+                    if (callback(matches[i], row, startIndex))
+                        return true;
+            };
+        }
+        
+        var lineIterator = this.$lineIterator(session, options);
+
+        return {
+            forEach: function(_callback) {
+                callback = _callback;
+                lineIterator.forEach(matchIterator);
+            }
+        };
+    };
+
+    this.$assembleRegExp = function(options, $disableFakeMultiline) {
+        if (options.needle instanceof RegExp)
+            return options.re = options.needle;
+
+        var needle = options.needle;
+
+        if (!options.needle)
+            return options.re = false;
+
+        if (!options.regExp)
+            needle = lang.escapeRegExp(needle);
+
+        if (options.wholeWord)
+            needle = "\\b" + needle + "\\b";
+
+        var modifier = options.caseSensitive ? "gm" : "gmi";
+
+        options.$isMultiLine = !$disableFakeMultiline && /[\n\r]/.test(needle);
+        if (options.$isMultiLine)
+            return options.re = this.$assembleMultilineRegExp(needle, modifier);
+
+        try {
+            var re = new RegExp(needle, modifier);
+        } catch(e) {
+            re = false;
+        }
+        return options.re = re;
+    };
+
+    this.$assembleMultilineRegExp = function(needle, modifier) {
+        var parts = needle.replace(/\r\n|\r|\n/g, "$\n^").split("\n");
+        var re = [];
+        for (var i = 0; i < parts.length; i++) try {
+            re.push(new RegExp(parts[i], modifier));
+        } catch(e) {
+            return false;
+        }
+        if (parts[0] == "") {
+            re.shift();
+            re.offset = 1;
+        } else {
+            re.offset = 0;
+        }
+        return re;
+    };
+
+    this.$lineIterator = function(session, options) {
+        var backwards = options.backwards == true;
+        var skipCurrent = options.skipCurrent != false;
+
+        var range = options.range;
+        var start = options.start;
+        if (!start)
+            start = range ? range[backwards ? "end" : "start"] : session.selection.getRange();
+         
+        if (start.start)
+            start = start[skipCurrent != backwards ? "end" : "start"];
+
+        var firstRow = range ? range.start.row : 0;
+        var lastRow = range ? range.end.row : session.getLength() - 1;
+
+        var forEach = backwards ? function(callback) {
+                var row = start.row;
+
+                var line = session.getLine(row).substring(0, start.column);
+                if (callback(line, row))
+                    return;
+
+                for (row--; row >= firstRow; row--)
+                    if (callback(session.getLine(row), row))
+                        return;
+
+                if (options.wrap == false)
+                    return;
+
+                for (row = lastRow, firstRow = start.row; row >= firstRow; row--)
+                    if (callback(session.getLine(row), row))
+                        return;
+            } : function(callback) {
+                var row = start.row;
+
+                var line = session.getLine(row).substr(start.column);
+                if (callback(line, row, start.column))
+                    return;
+
+                for (row = row+1; row <= lastRow; row++)
+                    if (callback(session.getLine(row), row))
+                        return;
+
+                if (options.wrap == false)
+                    return;
+
+                for (row = firstRow, lastRow = start.row; row <= lastRow; row++)
+                    if (callback(session.getLine(row), row))
+                        return;
+            };
+        
+        return {forEach: forEach};
+    };
+
+}).call(Search.prototype);
+
+exports.Search = Search;
+});
+
+define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module) {
+"use strict";
+
+var keyUtil = require("../lib/keys");
+var useragent = require("../lib/useragent");
+var KEY_MODS = keyUtil.KEY_MODS;
+
+function HashHandler(config, platform) {
+    this.platform = platform || (useragent.isMac ? "mac" : "win");
+    this.commands = {};
+    this.commandKeyBinding = {};
+    this.addCommands(config);
+    this.$singleCommand = true;
+}
+
+function MultiHashHandler(config, platform) {
+    HashHandler.call(this, config, platform);
+    this.$singleCommand = false;
+}
+
+MultiHashHandler.prototype = HashHandler.prototype;
+
+(function() {
+    
+
+    this.addCommand = function(command) {
+        if (this.commands[command.name])
+            this.removeCommand(command);
+
+        this.commands[command.name] = command;
+
+        if (command.bindKey)
+            this._buildKeyHash(command);
+    };
+
+    this.removeCommand = function(command, keepCommand) {
+        var name = command && (typeof command === 'string' ? command : command.name);
+        command = this.commands[name];
+        if (!keepCommand)
+            delete this.commands[name];
+        var ckb = this.commandKeyBinding;
+        for (var keyId in ckb) {
+            var cmdGroup = ckb[keyId];
+            if (cmdGroup == command) {
+                delete ckb[keyId];
+            } else if (Array.isArray(cmdGroup)) {
+                var i = cmdGroup.indexOf(command);
+                if (i != -1) {
+                    cmdGroup.splice(i, 1);
+                    if (cmdGroup.length == 1)
+                        ckb[keyId] = cmdGroup[0];
+                }
+            }
+        }
+    };
+
+    this.bindKey = function(key, command, position) {
+        if (typeof key == "object" && key) {
+            if (position == undefined)
+                position = key.position;
+            key = key[this.platform];
+        }
+        if (!key)
+            return;
+        if (typeof command == "function")
+            return this.addCommand({exec: command, bindKey: key, name: command.name || key});
+        
+        key.split("|").forEach(function(keyPart) {
+            var chain = "";
+            if (keyPart.indexOf(" ") != -1) {
+                var parts = keyPart.split(/\s+/);
+                keyPart = parts.pop();
+                parts.forEach(function(keyPart) {
+                    var binding = this.parseKeys(keyPart);
+                    var id = KEY_MODS[binding.hashId] + binding.key;
+                    chain += (chain ? " " : "") + id;
+                    this._addCommandToBinding(chain, "chainKeys");
+                }, this);
+                chain += " ";
+            }
+            var binding = this.parseKeys(keyPart);
+            var id = KEY_MODS[binding.hashId] + binding.key;
+            this._addCommandToBinding(chain + id, command, position);
+        }, this);
+    };
+    
+    function getPosition(command) {
+        return typeof command == "object" && command.bindKey
+            && command.bindKey.position || 0;
+    }
+    this._addCommandToBinding = function(keyId, command, position) {
+        var ckb = this.commandKeyBinding, i;
+        if (!command) {
+            delete ckb[keyId];
+        } else if (!ckb[keyId] || this.$singleCommand) {
+            ckb[keyId] = command;
+        } else {
+            if (!Array.isArray(ckb[keyId])) {
+                ckb[keyId] = [ckb[keyId]];
+            } else if ((i = ckb[keyId].indexOf(command)) != -1) {
+                ckb[keyId].splice(i, 1);
+            }
+
+            if (typeof position != "number") {
+                if (position || command.isDefault)
+                    position = -100;
+                else
+                   position = getPosition(command);
+            }
+            var commands = ckb[keyId];
+            for (i = 0; i < commands.length; i++) {
+                var other = commands[i];
+                var otherPos = getPosition(other);
+                if (otherPos > position)
+                    break;
+            }
+            commands.splice(i, 0, command);
+        }
+    };
+
+    this.addCommands = function(commands) {
+        commands && Object.keys(commands).forEach(function(name) {
+            var command = commands[name];
+            if (!command)
+                return;
+            
+            if (typeof command === "string")
+                return this.bindKey(command, name);
+
+            if (typeof command === "function")
+                command = { exec: command };
+
+            if (typeof command !== "object")
+                return;
+
+            if (!command.name)
+                command.name = name;
+
+            this.addCommand(command);
+        }, this);
+    };
+
+    this.removeCommands = function(commands) {
+        Object.keys(commands).forEach(function(name) {
+            this.removeCommand(commands[name]);
+        }, this);
+    };
+
+    this.bindKeys = function(keyList) {
+        Object.keys(keyList).forEach(function(key) {
+            this.bindKey(key, keyList[key]);
+        }, this);
+    };
+
+    this._buildKeyHash = function(command) {
+        this.bindKey(command.bindKey, command);
+    };
+    this.parseKeys = function(keys) {
+        var parts = keys.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(x){return x});
+        var key = parts.pop();
+
+        var keyCode = keyUtil[key];
+        if (keyUtil.FUNCTION_KEYS[keyCode])
+            key = keyUtil.FUNCTION_KEYS[keyCode].toLowerCase();
+        else if (!parts.length)
+            return {key: key, hashId: -1};
+        else if (parts.length == 1 && parts[0] == "shift")
+            return {key: key.toUpperCase(), hashId: -1};
+
+        var hashId = 0;
+        for (var i = parts.length; i--;) {
+            var modifier = keyUtil.KEY_MODS[parts[i]];
+            if (modifier == null) {
+                if (typeof console != "undefined")
+                    console.error("invalid modifier " + parts[i] + " in " + keys);
+                return false;
+            }
+            hashId |= modifier;
+        }
+        return {key: key, hashId: hashId};
+    };
+
+    this.findKeyCommand = function findKeyCommand(hashId, keyString) {
+        var key = KEY_MODS[hashId] + keyString;
+        return this.commandKeyBinding[key];
+    };
+
+    this.handleKeyboard = function(data, hashId, keyString, keyCode) {
+        if (keyCode < 0) return;
+        var key = KEY_MODS[hashId] + keyString;
+        var command = this.commandKeyBinding[key];
+        if (data.$keyChain) {
+            data.$keyChain += " " + key;
+            command = this.commandKeyBinding[data.$keyChain] || command;
+        }
+        
+        if (command) {
+            if (command == "chainKeys" || command[command.length - 1] == "chainKeys") {
+                data.$keyChain = data.$keyChain || key;
+                return {command: "null"};
+            }
+        }
+        
+        if (data.$keyChain) {
+            if ((!hashId || hashId == 4) && keyString.length == 1)
+                data.$keyChain = data.$keyChain.slice(0, -key.length - 1); // wait for input
+            else if (hashId == -1 || keyCode > 0)
+                data.$keyChain = ""; // reset keyChain
+        }
+        return {command: command};
+    };
+    
+    this.getStatusText = function(editor, data) {
+        return data.$keyChain || "";
+    };
+
+}).call(HashHandler.prototype);
+
+exports.HashHandler = HashHandler;
+exports.MultiHashHandler = MultiHashHandler;
+});
+
+define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var MultiHashHandler = require("../keyboard/hash_handler").MultiHashHandler;
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+
+var CommandManager = function(platform, commands) {
+    MultiHashHandler.call(this, commands, platform);
+    this.byName = this.commands;
+    this.setDefaultHandler("exec", function(e) {
+        return e.command.exec(e.editor, e.args || {});
+    });
+};
+
+oop.inherits(CommandManager, MultiHashHandler);
+
+(function() {
+
+    oop.implement(this, EventEmitter);
+
+    this.exec = function(command, editor, args) {
+        if (Array.isArray(command)) {
+            for (var i = command.length; i--; ) {
+                if (this.exec(command[i], editor, args)) return true;
+            }
+            return false;
+        }
+        
+        if (typeof command === "string")
+            command = this.commands[command];
+
+        if (!command)
+            return false;
+
+        if (editor && editor.$readOnly && !command.readOnly)
+            return false;
+
+        var e = {editor: editor, command: command, args: args};
+        e.returnValue = this._emit("exec", e);
+        this._signal("afterExec", e);
+
+        return e.returnValue === false ? false : true;
+    };
+
+    this.toggleRecording = function(editor) {
+        if (this.$inReplay)
+            return;
+
+        editor && editor._emit("changeStatus");
+        if (this.recording) {
+            this.macro.pop();
+            this.removeEventListener("exec", this.$addCommandToMacro);
+
+            if (!this.macro.length)
+                this.macro = this.oldMacro;
+
+            return this.recording = false;
+        }
+        if (!this.$addCommandToMacro) {
+            this.$addCommandToMacro = function(e) {
+                this.macro.push([e.command, e.args]);
+            }.bind(this);
+        }
+
+        this.oldMacro = this.macro;
+        this.macro = [];
+        this.on("exec", this.$addCommandToMacro);
+        return this.recording = true;
+    };
+
+    this.replay = function(editor) {
+        if (this.$inReplay || !this.macro)
+            return;
+
+        if (this.recording)
+            return this.toggleRecording(editor);
+
+        try {
+            this.$inReplay = true;
+            this.macro.forEach(function(x) {
+                if (typeof x == "string")
+                    this.exec(x, editor);
+                else
+                    this.exec(x[0], editor, x[1]);
+            }, this);
+        } finally {
+            this.$inReplay = false;
+        }
+    };
+
+    this.trimMacro = function(m) {
+        return m.map(function(x){
+            if (typeof x[0] != "string")
+                x[0] = x[0].name;
+            if (!x[1])
+                x = x[0];
+            return x;
+        });
+    };
+
+}).call(CommandManager.prototype);
+
+exports.CommandManager = CommandManager;
+
+});
+
+define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"], function(require, exports, module) {
+"use strict";
+
+var lang = require("../lib/lang");
+var config = require("../config");
+var Range = require("../range").Range;
+
+function bindKey(win, mac) {
+    return {win: win, mac: mac};
+}
+exports.commands = [{
+    name: "showSettingsMenu",
+    bindKey: bindKey("Ctrl-,", "Command-,"),
+    exec: function(editor) {
+        config.loadModule("ace/ext/settings_menu", function(module) {
+            module.init(editor);
+            editor.showSettingsMenu();
+        });
+    },
+    readOnly: true
+}, {
+    name: "goToNextError",
+    bindKey: bindKey("Alt-E", "Ctrl-E"),
+    exec: function(editor) {
+        config.loadModule("ace/ext/error_marker", function(module) {
+            module.showErrorMarker(editor, 1);
+        });
+    },
+    scrollIntoView: "animate",
+    readOnly: true
+}, {
+    name: "goToPreviousError",
+    bindKey: bindKey("Alt-Shift-E", "Ctrl-Shift-E"),
+    exec: function(editor) {
+        config.loadModule("ace/ext/error_marker", function(module) {
+            module.showErrorMarker(editor, -1);
+        });
+    },
+    scrollIntoView: "animate",
+    readOnly: true
+}, {
+    name: "selectall",
+    bindKey: bindKey("Ctrl-A", "Command-A"),
+    exec: function(editor) { editor.selectAll(); },
+    readOnly: true
+}, {
+    name: "centerselection",
+    bindKey: bindKey(null, "Ctrl-L"),
+    exec: function(editor) { editor.centerSelection(); },
+    readOnly: true
+}, {
+    name: "gotoline",
+    bindKey: bindKey("Ctrl-L", "Command-L"),
+    exec: function(editor) {
+        var line = parseInt(prompt("Enter line number:"), 10);
+        if (!isNaN(line)) {
+            editor.gotoLine(line);
+        }
+    },
+    readOnly: true
+}, {
+    name: "fold",
+    bindKey: bindKey("Alt-L|Ctrl-F1", "Command-Alt-L|Command-F1"),
+    exec: function(editor) { editor.session.toggleFold(false); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "center",
+    readOnly: true
+}, {
+    name: "unfold",
+    bindKey: bindKey("Alt-Shift-L|Ctrl-Shift-F1", "Command-Alt-Shift-L|Command-Shift-F1"),
+    exec: function(editor) { editor.session.toggleFold(true); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "center",
+    readOnly: true
+}, {
+    name: "toggleFoldWidget",
+    bindKey: bindKey("F2", "F2"),
+    exec: function(editor) { editor.session.toggleFoldWidget(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "center",
+    readOnly: true
+}, {
+    name: "toggleParentFoldWidget",
+    bindKey: bindKey("Alt-F2", "Alt-F2"),
+    exec: function(editor) { editor.session.toggleFoldWidget(true); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "center",
+    readOnly: true
+}, {
+    name: "foldall",
+    bindKey: bindKey(null, "Ctrl-Command-Option-0"),
+    exec: function(editor) { editor.session.foldAll(); },
+    scrollIntoView: "center",
+    readOnly: true
+}, {
+    name: "foldOther",
+    bindKey: bindKey("Alt-0", "Command-Option-0"),
+    exec: function(editor) { 
+        editor.session.foldAll();
+        editor.session.unfold(editor.selection.getAllRanges());
+    },
+    scrollIntoView: "center",
+    readOnly: true
+}, {
+    name: "unfoldall",
+    bindKey: bindKey("Alt-Shift-0", "Command-Option-Shift-0"),
+    exec: function(editor) { editor.session.unfold(); },
+    scrollIntoView: "center",
+    readOnly: true
+}, {
+    name: "findnext",
+    bindKey: bindKey("Ctrl-K", "Command-G"),
+    exec: function(editor) { editor.findNext(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "center",
+    readOnly: true
+}, {
+    name: "findprevious",
+    bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"),
+    exec: function(editor) { editor.findPrevious(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "center",
+    readOnly: true
+}, {
+    name: "selectOrFindNext",
+    bindKey: bindKey("Alt-K", "Ctrl-G"),
+    exec: function(editor) {
+        if (editor.selection.isEmpty())
+            editor.selection.selectWord();
+        else
+            editor.findNext(); 
+    },
+    readOnly: true
+}, {
+    name: "selectOrFindPrevious",
+    bindKey: bindKey("Alt-Shift-K", "Ctrl-Shift-G"),
+    exec: function(editor) { 
+        if (editor.selection.isEmpty())
+            editor.selection.selectWord();
+        else
+            editor.findPrevious();
+    },
+    readOnly: true
+}, {
+    name: "find",
+    bindKey: bindKey("Ctrl-F", "Command-F"),
+    exec: function(editor) {
+        config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor)});
+    },
+    readOnly: true
+}, {
+    name: "overwrite",
+    bindKey: "Insert",
+    exec: function(editor) { editor.toggleOverwrite(); },
+    readOnly: true
+}, {
+    name: "selecttostart",
+    bindKey: bindKey("Ctrl-Shift-Home", "Command-Shift-Up"),
+    exec: function(editor) { editor.getSelection().selectFileStart(); },
+    multiSelectAction: "forEach",
+    readOnly: true,
+    scrollIntoView: "animate",
+    aceCommandGroup: "fileJump"
+}, {
+    name: "gotostart",
+    bindKey: bindKey("Ctrl-Home", "Command-Home|Command-Up"),
+    exec: function(editor) { editor.navigateFileStart(); },
+    multiSelectAction: "forEach",
+    readOnly: true,
+    scrollIntoView: "animate",
+    aceCommandGroup: "fileJump"
+}, {
+    name: "selectup",
+    bindKey: bindKey("Shift-Up", "Shift-Up"),
+    exec: function(editor) { editor.getSelection().selectUp(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "golineup",
+    bindKey: bindKey("Up", "Up|Ctrl-P"),
+    exec: function(editor, args) { editor.navigateUp(args.times); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "selecttoend",
+    bindKey: bindKey("Ctrl-Shift-End", "Command-Shift-Down"),
+    exec: function(editor) { editor.getSelection().selectFileEnd(); },
+    multiSelectAction: "forEach",
+    readOnly: true,
+    scrollIntoView: "animate",
+    aceCommandGroup: "fileJump"
+}, {
+    name: "gotoend",
+    bindKey: bindKey("Ctrl-End", "Command-End|Command-Down"),
+    exec: function(editor) { editor.navigateFileEnd(); },
+    multiSelectAction: "forEach",
+    readOnly: true,
+    scrollIntoView: "animate",
+    aceCommandGroup: "fileJump"
+}, {
+    name: "selectdown",
+    bindKey: bindKey("Shift-Down", "Shift-Down"),
+    exec: function(editor) { editor.getSelection().selectDown(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "golinedown",
+    bindKey: bindKey("Down", "Down|Ctrl-N"),
+    exec: function(editor, args) { editor.navigateDown(args.times); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "selectwordleft",
+    bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"),
+    exec: function(editor) { editor.getSelection().selectWordLeft(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "gotowordleft",
+    bindKey: bindKey("Ctrl-Left", "Option-Left"),
+    exec: function(editor) { editor.navigateWordLeft(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "selecttolinestart",
+    bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left"),
+    exec: function(editor) { editor.getSelection().selectLineStart(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "gotolinestart",
+    bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"),
+    exec: function(editor) { editor.navigateLineStart(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "selectleft",
+    bindKey: bindKey("Shift-Left", "Shift-Left"),
+    exec: function(editor) { editor.getSelection().selectLeft(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "gotoleft",
+    bindKey: bindKey("Left", "Left|Ctrl-B"),
+    exec: function(editor, args) { editor.navigateLeft(args.times); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "selectwordright",
+    bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"),
+    exec: function(editor) { editor.getSelection().selectWordRight(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "gotowordright",
+    bindKey: bindKey("Ctrl-Right", "Option-Right"),
+    exec: function(editor) { editor.navigateWordRight(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "selecttolineend",
+    bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right"),
+    exec: function(editor) { editor.getSelection().selectLineEnd(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "gotolineend",
+    bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"),
+    exec: function(editor) { editor.navigateLineEnd(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "selectright",
+    bindKey: bindKey("Shift-Right", "Shift-Right"),
+    exec: function(editor) { editor.getSelection().selectRight(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "gotoright",
+    bindKey: bindKey("Right", "Right|Ctrl-F"),
+    exec: function(editor, args) { editor.navigateRight(args.times); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "selectpagedown",
+    bindKey: "Shift-PageDown",
+    exec: function(editor) { editor.selectPageDown(); },
+    readOnly: true
+}, {
+    name: "pagedown",
+    bindKey: bindKey(null, "Option-PageDown"),
+    exec: function(editor) { editor.scrollPageDown(); },
+    readOnly: true
+}, {
+    name: "gotopagedown",
+    bindKey: bindKey("PageDown", "PageDown|Ctrl-V"),
+    exec: function(editor) { editor.gotoPageDown(); },
+    readOnly: true
+}, {
+    name: "selectpageup",
+    bindKey: "Shift-PageUp",
+    exec: function(editor) { editor.selectPageUp(); },
+    readOnly: true
+}, {
+    name: "pageup",
+    bindKey: bindKey(null, "Option-PageUp"),
+    exec: function(editor) { editor.scrollPageUp(); },
+    readOnly: true
+}, {
+    name: "gotopageup",
+    bindKey: "PageUp",
+    exec: function(editor) { editor.gotoPageUp(); },
+    readOnly: true
+}, {
+    name: "scrollup",
+    bindKey: bindKey("Ctrl-Up", null),
+    exec: function(e) { e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); },
+    readOnly: true
+}, {
+    name: "scrolldown",
+    bindKey: bindKey("Ctrl-Down", null),
+    exec: function(e) { e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); },
+    readOnly: true
+}, {
+    name: "selectlinestart",
+    bindKey: "Shift-Home",
+    exec: function(editor) { editor.getSelection().selectLineStart(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "selectlineend",
+    bindKey: "Shift-End",
+    exec: function(editor) { editor.getSelection().selectLineEnd(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "togglerecording",
+    bindKey: bindKey("Ctrl-Alt-E", "Command-Option-E"),
+    exec: function(editor) { editor.commands.toggleRecording(editor); },
+    readOnly: true
+}, {
+    name: "replaymacro",
+    bindKey: bindKey("Ctrl-Shift-E", "Command-Shift-E"),
+    exec: function(editor) { editor.commands.replay(editor); },
+    readOnly: true
+}, {
+    name: "jumptomatching",
+    bindKey: bindKey("Ctrl-P", "Ctrl-P"),
+    exec: function(editor) { editor.jumpToMatching(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "animate",
+    readOnly: true
+}, {
+    name: "selecttomatching",
+    bindKey: bindKey("Ctrl-Shift-P", "Ctrl-Shift-P"),
+    exec: function(editor) { editor.jumpToMatching(true); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "animate",
+    readOnly: true
+}, {
+    name: "expandToMatching",
+    bindKey: bindKey("Ctrl-Shift-M", "Ctrl-Shift-M"),
+    exec: function(editor) { editor.jumpToMatching(true, true); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "animate",
+    readOnly: true
+}, {
+    name: "passKeysToBrowser",
+    bindKey: bindKey(null, null),
+    exec: function() {},
+    passEvent: true,
+    readOnly: true
+}, {
+    name: "copy",
+    exec: function(editor) {
+    },
+    readOnly: true
+},
+{
+    name: "cut",
+    exec: function(editor) {
+        var range = editor.getSelectionRange();
+        editor._emit("cut", range);
+
+        if (!editor.selection.isEmpty()) {
+            editor.session.remove(range);
+            editor.clearSelection();
+        }
+    },
+    scrollIntoView: "cursor",
+    multiSelectAction: "forEach"
+}, {
+    name: "paste",
+    exec: function(editor, args) {
+        editor.$handlePaste(args);
+    },
+    scrollIntoView: "cursor"
+}, {
+    name: "removeline",
+    bindKey: bindKey("Ctrl-D", "Command-D"),
+    exec: function(editor) { editor.removeLines(); },
+    scrollIntoView: "cursor",
+    multiSelectAction: "forEachLine"
+}, {
+    name: "duplicateSelection",
+    bindKey: bindKey("Ctrl-Shift-D", "Command-Shift-D"),
+    exec: function(editor) { editor.duplicateSelection(); },
+    scrollIntoView: "cursor",
+    multiSelectAction: "forEach"
+}, {
+    name: "sortlines",
+    bindKey: bindKey("Ctrl-Alt-S", "Command-Alt-S"),
+    exec: function(editor) { editor.sortLines(); },
+    scrollIntoView: "selection",
+    multiSelectAction: "forEachLine"
+}, {
+    name: "togglecomment",
+    bindKey: bindKey("Ctrl-/", "Command-/"),
+    exec: function(editor) { editor.toggleCommentLines(); },
+    multiSelectAction: "forEachLine",
+    scrollIntoView: "selectionPart"
+}, {
+    name: "toggleBlockComment",
+    bindKey: bindKey("Ctrl-Shift-/", "Command-Shift-/"),
+    exec: function(editor) { editor.toggleBlockComment(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "selectionPart"
+}, {
+    name: "modifyNumberUp",
+    bindKey: bindKey("Ctrl-Shift-Up", "Alt-Shift-Up"),
+    exec: function(editor) { editor.modifyNumber(1); },
+    scrollIntoView: "cursor",
+    multiSelectAction: "forEach"
+}, {
+    name: "modifyNumberDown",
+    bindKey: bindKey("Ctrl-Shift-Down", "Alt-Shift-Down"),
+    exec: function(editor) { editor.modifyNumber(-1); },
+    scrollIntoView: "cursor",
+    multiSelectAction: "forEach"
+}, {
+    name: "replace",
+    bindKey: bindKey("Ctrl-H", "Command-Option-F"),
+    exec: function(editor) {
+        config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor, true)});
+    }
+}, {
+    name: "undo",
+    bindKey: bindKey("Ctrl-Z", "Command-Z"),
+    exec: function(editor) { editor.undo(); }
+}, {
+    name: "redo",
+    bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"),
+    exec: function(editor) { editor.redo(); }
+}, {
+    name: "copylinesup",
+    bindKey: bindKey("Alt-Shift-Up", "Command-Option-Up"),
+    exec: function(editor) { editor.copyLinesUp(); },
+    scrollIntoView: "cursor"
+}, {
+    name: "movelinesup",
+    bindKey: bindKey("Alt-Up", "Option-Up"),
+    exec: function(editor) { editor.moveLinesUp(); },
+    scrollIntoView: "cursor"
+}, {
+    name: "copylinesdown",
+    bindKey: bindKey("Alt-Shift-Down", "Command-Option-Down"),
+    exec: function(editor) { editor.copyLinesDown(); },
+    scrollIntoView: "cursor"
+}, {
+    name: "movelinesdown",
+    bindKey: bindKey("Alt-Down", "Option-Down"),
+    exec: function(editor) { editor.moveLinesDown(); },
+    scrollIntoView: "cursor"
+}, {
+    name: "del",
+    bindKey: bindKey("Delete", "Delete|Ctrl-D|Shift-Delete"),
+    exec: function(editor) { editor.remove("right"); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor"
+}, {
+    name: "backspace",
+    bindKey: bindKey(
+        "Shift-Backspace|Backspace",
+        "Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"
+    ),
+    exec: function(editor) { editor.remove("left"); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor"
+}, {
+    name: "cut_or_delete",
+    bindKey: bindKey("Shift-Delete", null),
+    exec: function(editor) { 
+        if (editor.selection.isEmpty()) {
+            editor.remove("left");
+        } else {
+            return false;
+        }
+    },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor"
+}, {
+    name: "removetolinestart",
+    bindKey: bindKey("Alt-Backspace", "Command-Backspace"),
+    exec: function(editor) { editor.removeToLineStart(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor"
+}, {
+    name: "removetolineend",
+    bindKey: bindKey("Alt-Delete", "Ctrl-K"),
+    exec: function(editor) { editor.removeToLineEnd(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor"
+}, {
+    name: "removewordleft",
+    bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"),
+    exec: function(editor) { editor.removeWordLeft(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor"
+}, {
+    name: "removewordright",
+    bindKey: bindKey("Ctrl-Delete", "Alt-Delete"),
+    exec: function(editor) { editor.removeWordRight(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor"
+}, {
+    name: "outdent",
+    bindKey: bindKey("Shift-Tab", "Shift-Tab"),
+    exec: function(editor) { editor.blockOutdent(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "selectionPart"
+}, {
+    name: "indent",
+    bindKey: bindKey("Tab", "Tab"),
+    exec: function(editor) { editor.indent(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "selectionPart"
+}, {
+    name: "blockoutdent",
+    bindKey: bindKey("Ctrl-[", "Ctrl-["),
+    exec: function(editor) { editor.blockOutdent(); },
+    multiSelectAction: "forEachLine",
+    scrollIntoView: "selectionPart"
+}, {
+    name: "blockindent",
+    bindKey: bindKey("Ctrl-]", "Ctrl-]"),
+    exec: function(editor) { editor.blockIndent(); },
+    multiSelectAction: "forEachLine",
+    scrollIntoView: "selectionPart"
+}, {
+    name: "insertstring",
+    exec: function(editor, str) { editor.insert(str); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor"
+}, {
+    name: "inserttext",
+    exec: function(editor, args) {
+        editor.insert(lang.stringRepeat(args.text  || "", args.times || 1));
+    },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor"
+}, {
+    name: "splitline",
+    bindKey: bindKey(null, "Ctrl-O"),
+    exec: function(editor) { editor.splitLine(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor"
+}, {
+    name: "transposeletters",
+    bindKey: bindKey("Ctrl-T", "Ctrl-T"),
+    exec: function(editor) { editor.transposeLetters(); },
+    multiSelectAction: function(editor) {editor.transposeSelections(1); },
+    scrollIntoView: "cursor"
+}, {
+    name: "touppercase",
+    bindKey: bindKey("Ctrl-U", "Ctrl-U"),
+    exec: function(editor) { editor.toUpperCase(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor"
+}, {
+    name: "tolowercase",
+    bindKey: bindKey("Ctrl-Shift-U", "Ctrl-Shift-U"),
+    exec: function(editor) { editor.toLowerCase(); },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor"
+}, {
+    name: "expandtoline",
+    bindKey: bindKey("Ctrl-Shift-L", "Command-Shift-L"),
+    exec: function(editor) {
+        var range = editor.selection.getRange();
+
+        range.start.column = range.end.column = 0;
+        range.end.row++;
+        editor.selection.setRange(range, false);
+    },
+    multiSelectAction: "forEach",
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "joinlines",
+    bindKey: bindKey(null, null),
+    exec: function(editor) {
+        var isBackwards = editor.selection.isBackwards();
+        var selectionStart = isBackwards ? editor.selection.getSelectionLead() : editor.selection.getSelectionAnchor();
+        var selectionEnd = isBackwards ? editor.selection.getSelectionAnchor() : editor.selection.getSelectionLead();
+        var firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length;
+        var selectedText = editor.session.doc.getTextRange(editor.selection.getRange());
+        var selectedCount = selectedText.replace(/\n\s*/, " ").length;
+        var insertLine = editor.session.doc.getLine(selectionStart.row);
+
+        for (var i = selectionStart.row + 1; i <= selectionEnd.row + 1; i++) {
+            var curLine = lang.stringTrimLeft(lang.stringTrimRight(editor.session.doc.getLine(i)));
+            if (curLine.length !== 0) {
+                curLine = " " + curLine;
+            }
+            insertLine += curLine;
+        }
+
+        if (selectionEnd.row + 1 < (editor.session.doc.getLength() - 1)) {
+            insertLine += editor.session.doc.getNewLineCharacter();
+        }
+
+        editor.clearSelection();
+        editor.session.doc.replace(new Range(selectionStart.row, 0, selectionEnd.row + 2, 0), insertLine);
+
+        if (selectedCount > 0) {
+            editor.selection.moveCursorTo(selectionStart.row, selectionStart.column);
+            editor.selection.selectTo(selectionStart.row, selectionStart.column + selectedCount);
+        } else {
+            firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length > firstLineEndCol ? (firstLineEndCol + 1) : firstLineEndCol;
+            editor.selection.moveCursorTo(selectionStart.row, firstLineEndCol);
+        }
+    },
+    multiSelectAction: "forEach",
+    readOnly: true
+}, {
+    name: "invertSelection",
+    bindKey: bindKey(null, null),
+    exec: function(editor) {
+        var endRow = editor.session.doc.getLength() - 1;
+        var endCol = editor.session.doc.getLine(endRow).length;
+        var ranges = editor.selection.rangeList.ranges;
+        var newRanges = [];
+        if (ranges.length < 1) {
+            ranges = [editor.selection.getRange()];
+        }
+
+        for (var i = 0; i < ranges.length; i++) {
+            if (i == (ranges.length - 1)) {
+                if (!(ranges[i].end.row === endRow && ranges[i].end.column === endCol)) {
+                    newRanges.push(new Range(ranges[i].end.row, ranges[i].end.column, endRow, endCol));
+                }
+            }
+
+            if (i === 0) {
+                if (!(ranges[i].start.row === 0 && ranges[i].start.column === 0)) {
+                    newRanges.push(new Range(0, 0, ranges[i].start.row, ranges[i].start.column));
+                }
+            } else {
+                newRanges.push(new Range(ranges[i-1].end.row, ranges[i-1].end.column, ranges[i].start.row, ranges[i].start.column));
+            }
+        }
+
+        editor.exitMultiSelectMode();
+        editor.clearSelection();
+
+        for(var i = 0; i < newRanges.length; i++) {
+            editor.selection.addRange(newRanges[i], false);
+        }
+    },
+    readOnly: true,
+    scrollIntoView: "none"
+}];
+
+});
+
+define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+require("./lib/fixoldbrowsers");
+
+var oop = require("./lib/oop");
+var dom = require("./lib/dom");
+var lang = require("./lib/lang");
+var useragent = require("./lib/useragent");
+var TextInput = require("./keyboard/textinput").TextInput;
+var MouseHandler = require("./mouse/mouse_handler").MouseHandler;
+var FoldHandler = require("./mouse/fold_handler").FoldHandler;
+var KeyBinding = require("./keyboard/keybinding").KeyBinding;
+var EditSession = require("./edit_session").EditSession;
+var Search = require("./search").Search;
+var Range = require("./range").Range;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var CommandManager = require("./commands/command_manager").CommandManager;
+var defaultCommands = require("./commands/default_commands").commands;
+var config = require("./config");
+var TokenIterator = require("./token_iterator").TokenIterator;
+var Editor = function(renderer, session) {
+    var container = renderer.getContainerElement();
+    this.container = container;
+    this.renderer = renderer;
+
+    this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands);
+    this.textInput  = new TextInput(renderer.getTextAreaContainer(), this);
+    this.renderer.textarea = this.textInput.getElement();
+    this.keyBinding = new KeyBinding(this);
+    this.$mouseHandler = new MouseHandler(this);
+    new FoldHandler(this);
+
+    this.$blockScrolling = 0;
+    this.$search = new Search().set({
+        wrap: true
+    });
+
+    this.$historyTracker = this.$historyTracker.bind(this);
+    this.commands.on("exec", this.$historyTracker);
+
+    this.$initOperationListeners();
+    
+    this._$emitInputEvent = lang.delayedCall(function() {
+        this._signal("input", {});
+        if (this.session && this.session.bgTokenizer)
+            this.session.bgTokenizer.scheduleStart();
+    }.bind(this));
+    
+    this.on("change", function(_, _self) {
+        _self._$emitInputEvent.schedule(31);
+    });
+
+    this.setSession(session || new EditSession(""));
+    config.resetOptions(this);
+    config._signal("editor", this);
+};
+
+(function(){
+
+    oop.implement(this, EventEmitter);
+
+    this.$initOperationListeners = function() {
+        function last(a) {return a[a.length - 1]}
+
+        this.selections = [];
+        this.commands.on("exec", this.startOperation.bind(this), true);
+        this.commands.on("afterExec", this.endOperation.bind(this), true);
+
+        this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this));
+
+        this.on("change", function() {
+            this.curOp || this.startOperation();
+            this.curOp.docChanged = true;
+        }.bind(this), true);
+
+        this.on("changeSelection", function() {
+            this.curOp || this.startOperation();
+            this.curOp.selectionChanged = true;
+        }.bind(this), true);
+    };
+
+    this.curOp = null;
+    this.prevOp = {};
+    this.startOperation = function(commadEvent) {
+        if (this.curOp) {
+            if (!commadEvent || this.curOp.command)
+                return;
+            this.prevOp = this.curOp;
+        }
+        if (!commadEvent) {
+            this.previousCommand = null;
+            commadEvent = {};
+        }
+
+        this.$opResetTimer.schedule();
+        this.curOp = {
+            command: commadEvent.command || {},
+            args: commadEvent.args,
+            scrollTop: this.renderer.scrollTop
+        };
+        if (this.curOp.command.name && this.curOp.command.scrollIntoView !== undefined)
+            this.$blockScrolling++;
+    };
+
+    this.endOperation = function(e) {
+        if (this.curOp) {
+            if (e && e.returnValue === false)
+                return this.curOp = null;
+            this._signal("beforeEndOperation");
+            var command = this.curOp.command;
+            if (command.name && this.$blockScrolling > 0)
+                this.$blockScrolling--;
+            var scrollIntoView = command && command.scrollIntoView;
+            if (scrollIntoView) {
+                switch (scrollIntoView) {
+                    case "center-animate":
+                        scrollIntoView = "animate";
+                    case "center":
+                        this.renderer.scrollCursorIntoView(null, 0.5);
+                        break;
+                    case "animate":
+                    case "cursor":
+                        this.renderer.scrollCursorIntoView();
+                        break;
+                    case "selectionPart":
+                        var range = this.selection.getRange();
+                        var config = this.renderer.layerConfig;
+                        if (range.start.row >= config.lastRow || range.end.row <= config.firstRow) {
+                            this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead);
+                        }
+                        break;
+                    default:
+                        break;
+                }
+                if (scrollIntoView == "animate")
+                    this.renderer.animateScrolling(this.curOp.scrollTop);
+            }
+            
+            this.prevOp = this.curOp;
+            this.curOp = null;
+        }
+    };
+    this.$mergeableCommands = ["backspace", "del", "insertstring"];
+    this.$historyTracker = function(e) {
+        if (!this.$mergeUndoDeltas)
+            return;
+
+        var prev = this.prevOp;
+        var mergeableCommands = this.$mergeableCommands;
+        var shouldMerge = prev.command && (e.command.name == prev.command.name);
+        if (e.command.name == "insertstring") {
+            var text = e.args;
+            if (this.mergeNextCommand === undefined)
+                this.mergeNextCommand = true;
+
+            shouldMerge = shouldMerge
+                && this.mergeNextCommand // previous command allows to coalesce with
+                && (!/\s/.test(text) || /\s/.test(prev.args)); // previous insertion was of same type
+
+            this.mergeNextCommand = true;
+        } else {
+            shouldMerge = shouldMerge
+                && mergeableCommands.indexOf(e.command.name) !== -1; // the command is mergeable
+        }
+
+        if (
+            this.$mergeUndoDeltas != "always"
+            && Date.now() - this.sequenceStartTime > 2000
+        ) {
+            shouldMerge = false; // the sequence is too long
+        }
+
+        if (shouldMerge)
+            this.session.mergeUndoDeltas = true;
+        else if (mergeableCommands.indexOf(e.command.name) !== -1)
+            this.sequenceStartTime = Date.now();
+    };
+    this.setKeyboardHandler = function(keyboardHandler, cb) {
+        if (keyboardHandler && typeof keyboardHandler === "string") {
+            this.$keybindingId = keyboardHandler;
+            var _self = this;
+            config.loadModule(["keybinding", keyboardHandler], function(module) {
+                if (_self.$keybindingId == keyboardHandler)
+                    _self.keyBinding.setKeyboardHandler(module && module.handler);
+                cb && cb();
+            });
+        } else {
+            this.$keybindingId = null;
+            this.keyBinding.setKeyboardHandler(keyboardHandler);
+            cb && cb();
+        }
+    };
+    this.getKeyboardHandler = function() {
+        return this.keyBinding.getKeyboardHandler();
+    };
+    this.setSession = function(session) {
+        if (this.session == session)
+            return;
+        if (this.curOp) this.endOperation();
+        this.curOp = {};
+
+        var oldSession = this.session;
+        if (oldSession) {
+            this.session.off("change", this.$onDocumentChange);
+            this.session.off("changeMode", this.$onChangeMode);
+            this.session.off("tokenizerUpdate", this.$onTokenizerUpdate);
+            this.session.off("changeTabSize", this.$onChangeTabSize);
+            this.session.off("changeWrapLimit", this.$onChangeWrapLimit);
+            this.session.off("changeWrapMode", this.$onChangeWrapMode);
+            this.session.off("changeFold", this.$onChangeFold);
+            this.session.off("changeFrontMarker", this.$onChangeFrontMarker);
+            this.session.off("changeBackMarker", this.$onChangeBackMarker);
+            this.session.off("changeBreakpoint", this.$onChangeBreakpoint);
+            this.session.off("changeAnnotation", this.$onChangeAnnotation);
+            this.session.off("changeOverwrite", this.$onCursorChange);
+            this.session.off("changeScrollTop", this.$onScrollTopChange);
+            this.session.off("changeScrollLeft", this.$onScrollLeftChange);
+
+            var selection = this.session.getSelection();
+            selection.off("changeCursor", this.$onCursorChange);
+            selection.off("changeSelection", this.$onSelectionChange);
+        }
+
+        this.session = session;
+        if (session) {
+            this.$onDocumentChange = this.onDocumentChange.bind(this);
+            session.on("change", this.$onDocumentChange);
+            this.renderer.setSession(session);
+    
+            this.$onChangeMode = this.onChangeMode.bind(this);
+            session.on("changeMode", this.$onChangeMode);
+    
+            this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);
+            session.on("tokenizerUpdate", this.$onTokenizerUpdate);
+    
+            this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);
+            session.on("changeTabSize", this.$onChangeTabSize);
+    
+            this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);
+            session.on("changeWrapLimit", this.$onChangeWrapLimit);
+    
+            this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);
+            session.on("changeWrapMode", this.$onChangeWrapMode);
+    
+            this.$onChangeFold = this.onChangeFold.bind(this);
+            session.on("changeFold", this.$onChangeFold);
+    
+            this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);
+            this.session.on("changeFrontMarker", this.$onChangeFrontMarker);
+    
+            this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);
+            this.session.on("changeBackMarker", this.$onChangeBackMarker);
+    
+            this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);
+            this.session.on("changeBreakpoint", this.$onChangeBreakpoint);
+    
+            this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);
+            this.session.on("changeAnnotation", this.$onChangeAnnotation);
+    
+            this.$onCursorChange = this.onCursorChange.bind(this);
+            this.session.on("changeOverwrite", this.$onCursorChange);
+    
+            this.$onScrollTopChange = this.onScrollTopChange.bind(this);
+            this.session.on("changeScrollTop", this.$onScrollTopChange);
+    
+            this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);
+            this.session.on("changeScrollLeft", this.$onScrollLeftChange);
+    
+            this.selection = session.getSelection();
+            this.selection.on("changeCursor", this.$onCursorChange);
+    
+            this.$onSelectionChange = this.onSelectionChange.bind(this);
+            this.selection.on("changeSelection", this.$onSelectionChange);
+    
+            this.onChangeMode();
+    
+            this.$blockScrolling += 1;
+            this.onCursorChange();
+            this.$blockScrolling -= 1;
+    
+            this.onScrollTopChange();
+            this.onScrollLeftChange();
+            this.onSelectionChange();
+            this.onChangeFrontMarker();
+            this.onChangeBackMarker();
+            this.onChangeBreakpoint();
+            this.onChangeAnnotation();
+            this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();
+            this.renderer.updateFull();
+        } else {
+            this.selection = null;
+            this.renderer.setSession(session);
+        }
+
+        this._signal("changeSession", {
+            session: session,
+            oldSession: oldSession
+        });
+        
+        this.curOp = null;
+        
+        oldSession && oldSession._signal("changeEditor", {oldEditor: this});
+        session && session._signal("changeEditor", {editor: this});
+    };
+    this.getSession = function() {
+        return this.session;
+    };
+    this.setValue = function(val, cursorPos) {
+        this.session.doc.setValue(val);
+
+        if (!cursorPos)
+            this.selectAll();
+        else if (cursorPos == 1)
+            this.navigateFileEnd();
+        else if (cursorPos == -1)
+            this.navigateFileStart();
+
+        return val;
+    };
+    this.getValue = function() {
+        return this.session.getValue();
+    };
+    this.getSelection = function() {
+        return this.selection;
+    };
+    this.resize = function(force) {
+        this.renderer.onResize(force);
+    };
+    this.setTheme = function(theme, cb) {
+        this.renderer.setTheme(theme, cb);
+    };
+    this.getTheme = function() {
+        return this.renderer.getTheme();
+    };
+    this.setStyle = function(style) {
+        this.renderer.setStyle(style);
+    };
+    this.unsetStyle = function(style) {
+        this.renderer.unsetStyle(style);
+    };
+    this.getFontSize = function () {
+        return this.getOption("fontSize") ||
+           dom.computedStyle(this.container, "fontSize");
+    };
+    this.setFontSize = function(size) {
+        this.setOption("fontSize", size);
+    };
+
+    this.$highlightBrackets = function() {
+        if (this.session.$bracketHighlight) {
+            this.session.removeMarker(this.session.$bracketHighlight);
+            this.session.$bracketHighlight = null;
+        }
+
+        if (this.$highlightPending) {
+            return;
+        }
+        var self = this;
+        this.$highlightPending = true;
+        setTimeout(function() {
+            self.$highlightPending = false;
+            var session = self.session;
+            if (!session || !session.bgTokenizer) return;
+            var pos = session.findMatchingBracket(self.getCursorPosition());
+            if (pos) {
+                var range = new Range(pos.row, pos.column, pos.row, pos.column + 1);
+            } else if (session.$mode.getMatching) {
+                var range = session.$mode.getMatching(self.session);
+            }
+            if (range)
+                session.$bracketHighlight = session.addMarker(range, "ace_bracket", "text");
+        }, 50);
+    };
+    this.$highlightTags = function() {
+        if (this.$highlightTagPending)
+            return;
+        var self = this;
+        this.$highlightTagPending = true;
+        setTimeout(function() {
+            self.$highlightTagPending = false;
+            
+            var session = self.session;
+            if (!session || !session.bgTokenizer) return;
+            
+            var pos = self.getCursorPosition();
+            var iterator = new TokenIterator(self.session, pos.row, pos.column);
+            var token = iterator.getCurrentToken();
+            
+            if (!token || !/\b(?:tag-open|tag-name)/.test(token.type)) {
+                session.removeMarker(session.$tagHighlight);
+                session.$tagHighlight = null;
+                return;
+            }
+            
+            if (token.type.indexOf("tag-open") != -1) {
+                token = iterator.stepForward();
+                if (!token)
+                    return;
+            }
+            
+            var tag = token.value;
+            var depth = 0;
+            var prevToken = iterator.stepBackward();
+            
+            if (prevToken.value == '<'){
+                do {
+                    prevToken = token;
+                    token = iterator.stepForward();
+                    
+                    if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) {
+                        if (prevToken.value === '<'){
+                            depth++;
+                        } else if (prevToken.value === '</'){
+                            depth--;
+                        }
+                    }
+                    
+                } while (token && depth >= 0);
+            } else {
+                do {
+                    token = prevToken;
+                    prevToken = iterator.stepBackward();
+                    
+                    if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) {
+                        if (prevToken.value === '<') {
+                            depth++;
+                        } else if (prevToken.value === '</') {
+                            depth--;
+                        }
+                    }
+                } while (prevToken && depth <= 0);
+                iterator.stepForward();
+            }
+            
+            if (!token) {
+                session.removeMarker(session.$tagHighlight);
+                session.$tagHighlight = null;
+                return;
+            }
+            
+            var row = iterator.getCurrentTokenRow();
+            var column = iterator.getCurrentTokenColumn();
+            var range = new Range(row, column, row, column+token.value.length);
+            if (session.$tagHighlight && range.compareRange(session.$backMarkers[session.$tagHighlight].range)!==0) {
+                session.removeMarker(session.$tagHighlight);
+                session.$tagHighlight = null;
+            }
+            
+            if (range && !session.$tagHighlight)
+                session.$tagHighlight = session.addMarker(range, "ace_bracket", "text");
+        }, 50);
+    };
+    this.focus = function() {
+        var _self = this;
+        setTimeout(function() {
+            _self.textInput.focus();
+        });
+        this.textInput.focus();
+    };
+    this.isFocused = function() {
+        return this.textInput.isFocused();
+    };
+    this.blur = function() {
+        this.textInput.blur();
+    };
+    this.onFocus = function(e) {
+        if (this.$isFocused)
+            return;
+        this.$isFocused = true;
+        this.renderer.showCursor();
+        this.renderer.visualizeFocus();
+        this._emit("focus", e);
+    };
+    this.onBlur = function(e) {
+        if (!this.$isFocused)
+            return;
+        this.$isFocused = false;
+        this.renderer.hideCursor();
+        this.renderer.visualizeBlur();
+        this._emit("blur", e);
+    };
+
+    this.$cursorChange = function() {
+        this.renderer.updateCursor();
+    };
+    this.onDocumentChange = function(delta) {
+        var wrap = this.session.$useWrapMode;
+        var lastRow = (delta.start.row == delta.end.row ? delta.end.row : Infinity);
+        this.renderer.updateLines(delta.start.row, lastRow, wrap);
+
+        this._signal("change", delta);
+        this.$cursorChange();
+        this.$updateHighlightActiveLine();
+    };
+
+    this.onTokenizerUpdate = function(e) {
+        var rows = e.data;
+        this.renderer.updateLines(rows.first, rows.last);
+    };
+
+
+    this.onScrollTopChange = function() {
+        this.renderer.scrollToY(this.session.getScrollTop());
+    };
+
+    this.onScrollLeftChange = function() {
+        this.renderer.scrollToX(this.session.getScrollLeft());
+    };
+    this.onCursorChange = function() {
+        this.$cursorChange();
+
+        if (!this.$blockScrolling) {
+            config.warn("Automatically scrolling cursor into view after selection change",
+                "this will be disabled in the next version",
+                "set editor.$blockScrolling = Infinity to disable this message"
+            );
+            this.renderer.scrollCursorIntoView();
+        }
+
+        this.$highlightBrackets();
+        this.$highlightTags();
+        this.$updateHighlightActiveLine();
+        this._signal("changeSelection");
+    };
+
+    this.$updateHighlightActiveLine = function() {
+        var session = this.getSession();
+
+        var highlight;
+        if (this.$highlightActiveLine) {
+            if ((this.$selectionStyle != "line" || !this.selection.isMultiLine()))
+                highlight = this.getCursorPosition();
+            if (this.renderer.$maxLines && this.session.getLength() === 1 && !(this.renderer.$minLines > 1))
+                highlight = false;
+        }
+
+        if (session.$highlightLineMarker && !highlight) {
+            session.removeMarker(session.$highlightLineMarker.id);
+            session.$highlightLineMarker = null;
+        } else if (!session.$highlightLineMarker && highlight) {
+            var range = new Range(highlight.row, highlight.column, highlight.row, Infinity);
+            range.id = session.addMarker(range, "ace_active-line", "screenLine");
+            session.$highlightLineMarker = range;
+        } else if (highlight) {
+            session.$highlightLineMarker.start.row = highlight.row;
+            session.$highlightLineMarker.end.row = highlight.row;
+            session.$highlightLineMarker.start.column = highlight.column;
+            session._signal("changeBackMarker");
+        }
+    };
+
+    this.onSelectionChange = function(e) {
+        var session = this.session;
+
+        if (session.$selectionMarker) {
+            session.removeMarker(session.$selectionMarker);
+        }
+        session.$selectionMarker = null;
+
+        if (!this.selection.isEmpty()) {
+            var range = this.selection.getRange();
+            var style = this.getSelectionStyle();
+            session.$selectionMarker = session.addMarker(range, "ace_selection", style);
+        } else {
+            this.$updateHighlightActiveLine();
+        }
+
+        var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp();
+        this.session.highlight(re);
+
+        this._signal("changeSelection");
+    };
+
+    this.$getSelectionHighLightRegexp = function() {
+        var session = this.session;
+
+        var selection = this.getSelectionRange();
+        if (selection.isEmpty() || selection.isMultiLine())
+            return;
+
+        var startOuter = selection.start.column - 1;
+        var endOuter = selection.end.column + 1;
+        var line = session.getLine(selection.start.row);
+        var lineCols = line.length;
+        var needle = line.substring(Math.max(startOuter, 0),
+                                    Math.min(endOuter, lineCols));
+        if ((startOuter >= 0 && /^[\w\d]/.test(needle)) ||
+            (endOuter <= lineCols && /[\w\d]$/.test(needle)))
+            return;
+
+        needle = line.substring(selection.start.column, selection.end.column);
+        if (!/^[\w\d]+$/.test(needle))
+            return;
+
+        var re = this.$search.$assembleRegExp({
+            wholeWord: true,
+            caseSensitive: true,
+            needle: needle
+        });
+
+        return re;
+    };
+
+
+    this.onChangeFrontMarker = function() {
+        this.renderer.updateFrontMarkers();
+    };
+
+    this.onChangeBackMarker = function() {
+        this.renderer.updateBackMarkers();
+    };
+
+
+    this.onChangeBreakpoint = function() {
+        this.renderer.updateBreakpoints();
+    };
+
+    this.onChangeAnnotation = function() {
+        this.renderer.setAnnotations(this.session.getAnnotations());
+    };
+
+
+    this.onChangeMode = function(e) {
+        this.renderer.updateText();
+        this._emit("changeMode", e);
+    };
+
+
+    this.onChangeWrapLimit = function() {
+        this.renderer.updateFull();
+    };
+
+    this.onChangeWrapMode = function() {
+        this.renderer.onResize(true);
+    };
+
+
+    this.onChangeFold = function() {
+        this.$updateHighlightActiveLine();
+        this.renderer.updateFull();
+    };
+    this.getSelectedText = function() {
+        return this.session.getTextRange(this.getSelectionRange());
+    };
+    this.getCopyText = function() {
+        var text = this.getSelectedText();
+        this._signal("copy", text);
+        return text;
+    };
+    this.onCopy = function() {
+        this.commands.exec("copy", this);
+    };
+    this.onCut = function() {
+        this.commands.exec("cut", this);
+    };
+    this.onPaste = function(text, event) {
+        var e = {text: text, event: event};
+        this.commands.exec("paste", this, e);
+    };
+    
+    this.$handlePaste = function(e) {
+        if (typeof e == "string") 
+            e = {text: e};
+        this._signal("paste", e);
+        var text = e.text;
+        if (!this.inMultiSelectMode || this.inVirtualSelectionMode) {
+            this.insert(text);
+        } else {
+            var lines = text.split(/\r\n|\r|\n/);
+            var ranges = this.selection.rangeList.ranges;
+    
+            if (lines.length > ranges.length || lines.length < 2 || !lines[1])
+                return this.commands.exec("insertstring", this, text);
+    
+            for (var i = ranges.length; i--;) {
+                var range = ranges[i];
+                if (!range.isEmpty())
+                    this.session.remove(range);
+    
+                this.session.insert(range.start, lines[i]);
+            }
+        }
+    };
+
+    this.execCommand = function(command, args) {
+        return this.commands.exec(command, this, args);
+    };
+    this.insert = function(text, pasted) {
+        var session = this.session;
+        var mode = session.getMode();
+        var cursor = this.getCursorPosition();
+
+        if (this.getBehavioursEnabled() && !pasted) {
+            var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text);
+            if (transform) {
+                if (text !== transform.text) {
+                    this.session.mergeUndoDeltas = false;
+                    this.$mergeNextCommand = false;
+                }
+                text = transform.text;
+
+            }
+        }
+        
+        if (text == "\t")
+            text = this.session.getTabString();
+        if (!this.selection.isEmpty()) {
+            var range = this.getSelectionRange();
+            cursor = this.session.remove(range);
+            this.clearSelection();
+        }
+        else if (this.session.getOverwrite()) {
+            var range = new Range.fromPoints(cursor, cursor);
+            range.end.column += text.length;
+            this.session.remove(range);
+        }
+
+        if (text == "\n" || text == "\r\n") {
+            var line = session.getLine(cursor.row);
+            if (cursor.column > line.search(/\S|$/)) {
+                var d = line.substr(cursor.column).search(/\S|$/);
+                session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d);
+            }
+        }
+        this.clearSelection();
+
+        var start = cursor.column;
+        var lineState = session.getState(cursor.row);
+        var line = session.getLine(cursor.row);
+        var shouldOutdent = mode.checkOutdent(lineState, line, text);
+        var end = session.insert(cursor, text);
+
+        if (transform && transform.selection) {
+            if (transform.selection.length == 2) { // Transform relative to the current column
+                this.selection.setSelectionRange(
+                    new Range(cursor.row, start + transform.selection[0],
+                              cursor.row, start + transform.selection[1]));
+            } else { // Transform relative to the current row.
+                this.selection.setSelectionRange(
+                    new Range(cursor.row + transform.selection[0],
+                              transform.selection[1],
+                              cursor.row + transform.selection[2],
+                              transform.selection[3]));
+            }
+        }
+
+        if (session.getDocument().isNewLine(text)) {
+            var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString());
+
+            session.insert({row: cursor.row+1, column: 0}, lineIndent);
+        }
+        if (shouldOutdent)
+            mode.autoOutdent(lineState, session, cursor.row);
+    };
+
+    this.onTextInput = function(text) {
+        this.keyBinding.onTextInput(text);
+    };
+
+    this.onCommandKey = function(e, hashId, keyCode) {
+        this.keyBinding.onCommandKey(e, hashId, keyCode);
+    };
+    this.setOverwrite = function(overwrite) {
+        this.session.setOverwrite(overwrite);
+    };
+    this.getOverwrite = function() {
+        return this.session.getOverwrite();
+    };
+    this.toggleOverwrite = function() {
+        this.session.toggleOverwrite();
+    };
+    this.setScrollSpeed = function(speed) {
+        this.setOption("scrollSpeed", speed);
+    };
+    this.getScrollSpeed = function() {
+        return this.getOption("scrollSpeed");
+    };
+    this.setDragDelay = function(dragDelay) {
+        this.setOption("dragDelay", dragDelay);
+    };
+    this.getDragDelay = function() {
+        return this.getOption("dragDelay");
+    };
+    this.setSelectionStyle = function(val) {
+        this.setOption("selectionStyle", val);
+    };
+    this.getSelectionStyle = function() {
+        return this.getOption("selectionStyle");
+    };
+    this.setHighlightActiveLine = function(shouldHighlight) {
+        this.setOption("highlightActiveLine", shouldHighlight);
+    };
+    this.getHighlightActiveLine = function() {
+        return this.getOption("highlightActiveLine");
+    };
+    this.setHighlightGutterLine = function(shouldHighlight) {
+        this.setOption("highlightGutterLine", shouldHighlight);
+    };
+
+    this.getHighlightGutterLine = function() {
+        return this.getOption("highlightGutterLine");
+    };
+    this.setHighlightSelectedWord = function(shouldHighlight) {
+        this.setOption("highlightSelectedWord", shouldHighlight);
+    };
+    this.getHighlightSelectedWord = function() {
+        return this.$highlightSelectedWord;
+    };
+
+    this.setAnimatedScroll = function(shouldAnimate){
+        this.renderer.setAnimatedScroll(shouldAnimate);
+    };
+
+    this.getAnimatedScroll = function(){
+        return this.renderer.getAnimatedScroll();
+    };
+    this.setShowInvisibles = function(showInvisibles) {
+        this.renderer.setShowInvisibles(showInvisibles);
+    };
+    this.getShowInvisibles = function() {
+        return this.renderer.getShowInvisibles();
+    };
+
+    this.setDisplayIndentGuides = function(display) {
+        this.renderer.setDisplayIndentGuides(display);
+    };
+
+    this.getDisplayIndentGuides = function() {
+        return this.renderer.getDisplayIndentGuides();
+    };
+    this.setShowPrintMargin = function(showPrintMargin) {
+        this.renderer.setShowPrintMargin(showPrintMargin);
+    };
+    this.getShowPrintMargin = function() {
+        return this.renderer.getShowPrintMargin();
+    };
+    this.setPrintMarginColumn = function(showPrintMargin) {
+        this.renderer.setPrintMarginColumn(showPrintMargin);
+    };
+    this.getPrintMarginColumn = function() {
+        return this.renderer.getPrintMarginColumn();
+    };
+    this.setReadOnly = function(readOnly) {
+        this.setOption("readOnly", readOnly);
+    };
+    this.getReadOnly = function() {
+        return this.getOption("readOnly");
+    };
+    this.setBehavioursEnabled = function (enabled) {
+        this.setOption("behavioursEnabled", enabled);
+    };
+    this.getBehavioursEnabled = function () {
+        return this.getOption("behavioursEnabled");
+    };
+    this.setWrapBehavioursEnabled = function (enabled) {
+        this.setOption("wrapBehavioursEnabled", enabled);
+    };
+    this.getWrapBehavioursEnabled = function () {
+        return this.getOption("wrapBehavioursEnabled");
+    };
+    this.setShowFoldWidgets = function(show) {
+        this.setOption("showFoldWidgets", show);
+
+    };
+    this.getShowFoldWidgets = function() {
+        return this.getOption("showFoldWidgets");
+    };
+
+    this.setFadeFoldWidgets = function(fade) {
+        this.setOption("fadeFoldWidgets", fade);
+    };
+
+    this.getFadeFoldWidgets = function() {
+        return this.getOption("fadeFoldWidgets");
+    };
+    this.remove = function(dir) {
+        if (this.selection.isEmpty()){
+            if (dir == "left")
+                this.selection.selectLeft();
+            else
+                this.selection.selectRight();
+        }
+
+        var range = this.getSelectionRange();
+        if (this.getBehavioursEnabled()) {
+            var session = this.session;
+            var state = session.getState(range.start.row);
+            var new_range = session.getMode().transformAction(state, 'deletion', this, session, range);
+
+            if (range.end.column === 0) {
+                var text = session.getTextRange(range);
+                if (text[text.length - 1] == "\n") {
+                    var line = session.getLine(range.end.row);
+                    if (/^\s+$/.test(line)) {
+                        range.end.column = line.length;
+                    }
+                }
+            }
+            if (new_range)
+                range = new_range;
+        }
+
+        this.session.remove(range);
+        this.clearSelection();
+    };
+    this.removeWordRight = function() {
+        if (this.selection.isEmpty())
+            this.selection.selectWordRight();
+
+        this.session.remove(this.getSelectionRange());
+        this.clearSelection();
+    };
+    this.removeWordLeft = function() {
+        if (this.selection.isEmpty())
+            this.selection.selectWordLeft();
+
+        this.session.remove(this.getSelectionRange());
+        this.clearSelection();
+    };
+    this.removeToLineStart = function() {
+        if (this.selection.isEmpty())
+            this.selection.selectLineStart();
+
+        this.session.remove(this.getSelectionRange());
+        this.clearSelection();
+    };
+    this.removeToLineEnd = function() {
+        if (this.selection.isEmpty())
+            this.selection.selectLineEnd();
+
+        var range = this.getSelectionRange();
+        if (range.start.column == range.end.column && range.start.row == range.end.row) {
+            range.end.column = 0;
+            range.end.row++;
+        }
+
+        this.session.remove(range);
+        this.clearSelection();
+    };
+    this.splitLine = function() {
+        if (!this.selection.isEmpty()) {
+            this.session.remove(this.getSelectionRange());
+            this.clearSelection();
+        }
+
+        var cursor = this.getCursorPosition();
+        this.insert("\n");
+        this.moveCursorToPosition(cursor);
+    };
+    this.transposeLetters = function() {
+        if (!this.selection.isEmpty()) {
+            return;
+        }
+
+        var cursor = this.getCursorPosition();
+        var column = cursor.column;
+        if (column === 0)
+            return;
+
+        var line = this.session.getLine(cursor.row);
+        var swap, range;
+        if (column < line.length) {
+            swap = line.charAt(column) + line.charAt(column-1);
+            range = new Range(cursor.row, column-1, cursor.row, column+1);
+        }
+        else {
+            swap = line.charAt(column-1) + line.charAt(column-2);
+            range = new Range(cursor.row, column-2, cursor.row, column);
+        }
+        this.session.replace(range, swap);
+    };
+    this.toLowerCase = function() {
+        var originalRange = this.getSelectionRange();
+        if (this.selection.isEmpty()) {
+            this.selection.selectWord();
+        }
+
+        var range = this.getSelectionRange();
+        var text = this.session.getTextRange(range);
+        this.session.replace(range, text.toLowerCase());
+        this.selection.setSelectionRange(originalRange);
+    };
+    this.toUpperCase = function() {
+        var originalRange = this.getSelectionRange();
+        if (this.selection.isEmpty()) {
+            this.selection.selectWord();
+        }
+
+        var range = this.getSelectionRange();
+        var text = this.session.getTextRange(range);
+        this.session.replace(range, text.toUpperCase());
+        this.selection.setSelectionRange(originalRange);
+    };
+    this.indent = function() {
+        var session = this.session;
+        var range = this.getSelectionRange();
+
+        if (range.start.row < range.end.row) {
+            var rows = this.$getSelectedRows();
+            session.indentRows(rows.first, rows.last, "\t");
+            return;
+        } else if (range.start.column < range.end.column) {
+            var text = session.getTextRange(range);
+            if (!/^\s+$/.test(text)) {
+                var rows = this.$getSelectedRows();
+                session.indentRows(rows.first, rows.last, "\t");
+                return;
+            }
+        }
+        
+        var line = session.getLine(range.start.row);
+        var position = range.start;
+        var size = session.getTabSize();
+        var column = session.documentToScreenColumn(position.row, position.column);
+
+        if (this.session.getUseSoftTabs()) {
+            var count = (size - column % size);
+            var indentString = lang.stringRepeat(" ", count);
+        } else {
+            var count = column % size;
+            while (line[range.start.column] == " " && count) {
+                range.start.column--;
+                count--;
+            }
+            this.selection.setSelectionRange(range);
+            indentString = "\t";
+        }
+        return this.insert(indentString);
+    };
+    this.blockIndent = function() {
+        var rows = this.$getSelectedRows();
+        this.session.indentRows(rows.first, rows.last, "\t");
+    };
+    this.blockOutdent = function() {
+        var selection = this.session.getSelection();
+        this.session.outdentRows(selection.getRange());
+    };
+    this.sortLines = function() {
+        var rows = this.$getSelectedRows();
+        var session = this.session;
+
+        var lines = [];
+        for (i = rows.first; i <= rows.last; i++)
+            lines.push(session.getLine(i));
+
+        lines.sort(function(a, b) {
+            if (a.toLowerCase() < b.toLowerCase()) return -1;
+            if (a.toLowerCase() > b.toLowerCase()) return 1;
+            return 0;
+        });
+
+        var deleteRange = new Range(0, 0, 0, 0);
+        for (var i = rows.first; i <= rows.last; i++) {
+            var line = session.getLine(i);
+            deleteRange.start.row = i;
+            deleteRange.end.row = i;
+            deleteRange.end.column = line.length;
+            session.replace(deleteRange, lines[i-rows.first]);
+        }
+    };
+    this.toggleCommentLines = function() {
+        var state = this.session.getState(this.getCursorPosition().row);
+        var rows = this.$getSelectedRows();
+        this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last);
+    };
+
+    this.toggleBlockComment = function() {
+        var cursor = this.getCursorPosition();
+        var state = this.session.getState(cursor.row);
+        var range = this.getSelectionRange();
+        this.session.getMode().toggleBlockComment(state, this.session, range, cursor);
+    };
+    this.getNumberAt = function(row, column) {
+        var _numberRx = /[\-]?[0-9]+(?:\.[0-9]+)?/g;
+        _numberRx.lastIndex = 0;
+
+        var s = this.session.getLine(row);
+        while (_numberRx.lastIndex < column) {
+            var m = _numberRx.exec(s);
+            if(m.index <= column && m.index+m[0].length >= column){
+                var number = {
+                    value: m[0],
+                    start: m.index,
+                    end: m.index+m[0].length
+                };
+                return number;
+            }
+        }
+        return null;
+    };
+    this.modifyNumber = function(amount) {
+        var row = this.selection.getCursor().row;
+        var column = this.selection.getCursor().column;
+        var charRange = new Range(row, column-1, row, column);
+
+        var c = this.session.getTextRange(charRange);
+        if (!isNaN(parseFloat(c)) && isFinite(c)) {
+            var nr = this.getNumberAt(row, column);
+            if (nr) {
+                var fp = nr.value.indexOf(".") >= 0 ? nr.start + nr.value.indexOf(".") + 1 : nr.end;
+                var decimals = nr.start + nr.value.length - fp;
+
+                var t = parseFloat(nr.value);
+                t *= Math.pow(10, decimals);
+
+
+                if(fp !== nr.end && column < fp){
+                    amount *= Math.pow(10, nr.end - column - 1);
+                } else {
+                    amount *= Math.pow(10, nr.end - column);
+                }
+
+                t += amount;
+                t /= Math.pow(10, decimals);
+                var nnr = t.toFixed(decimals);
+                var replaceRange = new Range(row, nr.start, row, nr.end);
+                this.session.replace(replaceRange, nnr);
+                this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length));
+
+            }
+        }
+    };
+    this.removeLines = function() {
+        var rows = this.$getSelectedRows();
+        this.session.removeFullLines(rows.first, rows.last);
+        this.clearSelection();
+    };
+
+    this.duplicateSelection = function() {
+        var sel = this.selection;
+        var doc = this.session;
+        var range = sel.getRange();
+        var reverse = sel.isBackwards();
+        if (range.isEmpty()) {
+            var row = range.start.row;
+            doc.duplicateLines(row, row);
+        } else {
+            var point = reverse ? range.start : range.end;
+            var endPoint = doc.insert(point, doc.getTextRange(range), false);
+            range.start = point;
+            range.end = endPoint;
+
+            sel.setSelectionRange(range, reverse);
+        }
+    };
+    this.moveLinesDown = function() {
+        this.$moveLines(1, false);
+    };
+    this.moveLinesUp = function() {
+        this.$moveLines(-1, false);
+    };
+    this.moveText = function(range, toPosition, copy) {
+        return this.session.moveText(range, toPosition, copy);
+    };
+    this.copyLinesUp = function() {
+        this.$moveLines(-1, true);
+    };
+    this.copyLinesDown = function() {
+        this.$moveLines(1, true);
+    };
+    this.$moveLines = function(dir, copy) {
+        var rows, moved;
+        var selection = this.selection;
+        if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) {
+            var range = selection.toOrientedRange();
+            rows = this.$getSelectedRows(range);
+            moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir);
+            if (copy && dir == -1) moved = 0;
+            range.moveBy(moved, 0);
+            selection.fromOrientedRange(range);
+        } else {
+            var ranges = selection.rangeList.ranges;
+            selection.rangeList.detach(this.session);
+            this.inVirtualSelectionMode = true;
+            
+            var diff = 0;
+            var totalDiff = 0;
+            var l = ranges.length;
+            for (var i = 0; i < l; i++) {
+                var rangeIndex = i;
+                ranges[i].moveBy(diff, 0);
+                rows = this.$getSelectedRows(ranges[i]);
+                var first = rows.first;
+                var last = rows.last;
+                while (++i < l) {
+                    if (totalDiff) ranges[i].moveBy(totalDiff, 0);
+                    var subRows = this.$getSelectedRows(ranges[i]);
+                    if (copy && subRows.first != last)
+                        break;
+                    else if (!copy && subRows.first > last + 1)
+                        break;
+                    last = subRows.last;
+                }
+                i--;
+                diff = this.session.$moveLines(first, last, copy ? 0 : dir);
+                if (copy && dir == -1) rangeIndex = i + 1;
+                while (rangeIndex <= i) {
+                    ranges[rangeIndex].moveBy(diff, 0);
+                    rangeIndex++;
+                }
+                if (!copy) diff = 0;
+                totalDiff += diff;
+            }
+            
+            selection.fromOrientedRange(selection.ranges[0]);
+            selection.rangeList.attach(this.session);
+            this.inVirtualSelectionMode = false;
+        }
+    };
+    this.$getSelectedRows = function(range) {
+        range = (range || this.getSelectionRange()).collapseRows();
+
+        return {
+            first: this.session.getRowFoldStart(range.start.row),
+            last: this.session.getRowFoldEnd(range.end.row)
+        };
+    };
+
+    this.onCompositionStart = function(text) {
+        this.renderer.showComposition(this.getCursorPosition());
+    };
+
+    this.onCompositionUpdate = function(text) {
+        this.renderer.setCompositionText(text);
+    };
+
+    this.onCompositionEnd = function() {
+        this.renderer.hideComposition();
+    };
+    this.getFirstVisibleRow = function() {
+        return this.renderer.getFirstVisibleRow();
+    };
+    this.getLastVisibleRow = function() {
+        return this.renderer.getLastVisibleRow();
+    };
+    this.isRowVisible = function(row) {
+        return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow());
+    };
+    this.isRowFullyVisible = function(row) {
+        return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow());
+    };
+    this.$getVisibleRowCount = function() {
+        return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1;
+    };
+
+    this.$moveByPage = function(dir, select) {
+        var renderer = this.renderer;
+        var config = this.renderer.layerConfig;
+        var rows = dir * Math.floor(config.height / config.lineHeight);
+
+        this.$blockScrolling++;
+        if (select === true) {
+            this.selection.$moveSelection(function(){
+                this.moveCursorBy(rows, 0);
+            });
+        } else if (select === false) {
+            this.selection.moveCursorBy(rows, 0);
+            this.selection.clearSelection();
+        }
+        this.$blockScrolling--;
+
+        var scrollTop = renderer.scrollTop;
+
+        renderer.scrollBy(0, rows * config.lineHeight);
+        if (select != null)
+            renderer.scrollCursorIntoView(null, 0.5);
+
+        renderer.animateScrolling(scrollTop);
+    };
+    this.selectPageDown = function() {
+        this.$moveByPage(1, true);
+    };
+    this.selectPageUp = function() {
+        this.$moveByPage(-1, true);
+    };
+    this.gotoPageDown = function() {
+       this.$moveByPage(1, false);
+    };
+    this.gotoPageUp = function() {
+        this.$moveByPage(-1, false);
+    };
+    this.scrollPageDown = function() {
+        this.$moveByPage(1);
+    };
+    this.scrollPageUp = function() {
+        this.$moveByPage(-1);
+    };
+    this.scrollToRow = function(row) {
+        this.renderer.scrollToRow(row);
+    };
+    this.scrollToLine = function(line, center, animate, callback) {
+        this.renderer.scrollToLine(line, center, animate, callback);
+    };
+    this.centerSelection = function() {
+        var range = this.getSelectionRange();
+        var pos = {
+            row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2),
+            column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2)
+        };
+        this.renderer.alignCursor(pos, 0.5);
+    };
+    this.getCursorPosition = function() {
+        return this.selection.getCursor();
+    };
+    this.getCursorPositionScreen = function() {
+        return this.session.documentToScreenPosition(this.getCursorPosition());
+    };
+    this.getSelectionRange = function() {
+        return this.selection.getRange();
+    };
+    this.selectAll = function() {
+        this.$blockScrolling += 1;
+        this.selection.selectAll();
+        this.$blockScrolling -= 1;
+    };
+    this.clearSelection = function() {
+        this.selection.clearSelection();
+    };
+    this.moveCursorTo = function(row, column) {
+        this.selection.moveCursorTo(row, column);
+    };
+    this.moveCursorToPosition = function(pos) {
+        this.selection.moveCursorToPosition(pos);
+    };
+    this.jumpToMatching = function(select, expand) {
+        var cursor = this.getCursorPosition();
+        var iterator = new TokenIterator(this.session, cursor.row, cursor.column);
+        var prevToken = iterator.getCurrentToken();
+        var token = prevToken || iterator.stepForward();
+
+        if (!token) return;
+        var matchType;
+        var found = false;
+        var depth = {};
+        var i = cursor.column - token.start;
+        var bracketType;
+        var brackets = {
+            ")": "(",
+            "(": "(",
+            "]": "[",
+            "[": "[",
+            "{": "{",
+            "}": "{"
+        };
+        
+        do {
+            if (token.value.match(/[{}()\[\]]/g)) {
+                for (; i < token.value.length && !found; i++) {
+                    if (!brackets[token.value[i]]) {
+                        continue;
+                    }
+
+                    bracketType = brackets[token.value[i]] + '.' + token.type.replace("rparen", "lparen");
+
+                    if (isNaN(depth[bracketType])) {
+                        depth[bracketType] = 0;
+                    }
+
+                    switch (token.value[i]) {
+                        case '(':
+                        case '[':
+                        case '{':
+                            depth[bracketType]++;
+                            break;
+                        case ')':
+                        case ']':
+                        case '}':
+                            depth[bracketType]--;
+
+                            if (depth[bracketType] === -1) {
+                                matchType = 'bracket';
+                                found = true;
+                            }
+                        break;
+                    }
+                }
+            }
+            else if (token && token.type.indexOf('tag-name') !== -1) {
+                if (isNaN(depth[token.value])) {
+                    depth[token.value] = 0;
+                }
+                
+                if (prevToken.value === '<') {
+                    depth[token.value]++;
+                }
+                else if (prevToken.value === '</') {
+                    depth[token.value]--;
+                }
+                
+                if (depth[token.value] === -1) {
+                    matchType = 'tag';
+                    found = true;
+                }
+            }
+
+            if (!found) {
+                prevToken = token;
+                token = iterator.stepForward();
+                i = 0;
+            }
+        } while (token && !found);
+        if (!matchType)
+            return;
+
+        var range, pos;
+        if (matchType === 'bracket') {
+            range = this.session.getBracketRange(cursor);
+            if (!range) {
+                range = new Range(
+                    iterator.getCurrentTokenRow(),
+                    iterator.getCurrentTokenColumn() + i - 1,
+                    iterator.getCurrentTokenRow(),
+                    iterator.getCurrentTokenColumn() + i - 1
+                );
+                pos = range.start;
+                if (expand || pos.row === cursor.row && Math.abs(pos.column - cursor.column) < 2)
+                    range = this.session.getBracketRange(pos);
+            }
+        }
+        else if (matchType === 'tag') {
+            if (token && token.type.indexOf('tag-name') !== -1) 
+                var tag = token.value;
+            else
+                return;
+
+            range = new Range(
+                iterator.getCurrentTokenRow(),
+                iterator.getCurrentTokenColumn() - 2,
+                iterator.getCurrentTokenRow(),
+                iterator.getCurrentTokenColumn() - 2
+            );
+            if (range.compare(cursor.row, cursor.column) === 0) {
+                found = false;
+                do {
+                    token = prevToken;
+                    prevToken = iterator.stepBackward();
+                    
+                    if (prevToken) {
+                        if (prevToken.type.indexOf('tag-close') !== -1) {
+                            range.setEnd(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1);
+                        }
+
+                        if (token.value === tag && token.type.indexOf('tag-name') !== -1) {
+                            if (prevToken.value === '<') {
+                                depth[tag]++;
+                            }
+                            else if (prevToken.value === '</') {
+                                depth[tag]--;
+                            }
+                            
+                            if (depth[tag] === 0)
+                                found = true;
+                        }
+                    }
+                } while (prevToken && !found);
+            }
+            if (token && token.type.indexOf('tag-name')) {
+                pos = range.start;
+                if (pos.row == cursor.row && Math.abs(pos.column - cursor.column) < 2)
+                    pos = range.end;
+            }
+        }
+
+        pos = range && range.cursor || pos;
+        if (pos) {
+            if (select) {
+                if (range && expand) {
+                    this.selection.setRange(range);
+                } else if (range && range.isEqual(this.getSelectionRange())) {
+                    this.clearSelection();
+                } else {
+                    this.selection.selectTo(pos.row, pos.column);
+                }
+            } else {
+                this.selection.moveTo(pos.row, pos.column);
+            }
+        }
+    };
+    this.gotoLine = function(lineNumber, column, animate) {
+        this.selection.clearSelection();
+        this.session.unfold({row: lineNumber - 1, column: column || 0});
+
+        this.$blockScrolling += 1;
+        this.exitMultiSelectMode && this.exitMultiSelectMode();
+        this.moveCursorTo(lineNumber - 1, column || 0);
+        this.$blockScrolling -= 1;
+
+        if (!this.isRowFullyVisible(lineNumber - 1))
+            this.scrollToLine(lineNumber - 1, true, animate);
+    };
+    this.navigateTo = function(row, column) {
+        this.selection.moveTo(row, column);
+    };
+    this.navigateUp = function(times) {
+        if (this.selection.isMultiLine() && !this.selection.isBackwards()) {
+            var selectionStart = this.selection.anchor.getPosition();
+            return this.moveCursorToPosition(selectionStart);
+        }
+        this.selection.clearSelection();
+        this.selection.moveCursorBy(-times || -1, 0);
+    };
+    this.navigateDown = function(times) {
+        if (this.selection.isMultiLine() && this.selection.isBackwards()) {
+            var selectionEnd = this.selection.anchor.getPosition();
+            return this.moveCursorToPosition(selectionEnd);
+        }
+        this.selection.clearSelection();
+        this.selection.moveCursorBy(times || 1, 0);
+    };
+    this.navigateLeft = function(times) {
+        if (!this.selection.isEmpty()) {
+            var selectionStart = this.getSelectionRange().start;
+            this.moveCursorToPosition(selectionStart);
+        }
+        else {
+            times = times || 1;
+            while (times--) {
+                this.selection.moveCursorLeft();
+            }
+        }
+        this.clearSelection();
+    };
+    this.navigateRight = function(times) {
+        if (!this.selection.isEmpty()) {
+            var selectionEnd = this.getSelectionRange().end;
+            this.moveCursorToPosition(selectionEnd);
+        }
+        else {
+            times = times || 1;
+            while (times--) {
+                this.selection.moveCursorRight();
+            }
+        }
+        this.clearSelection();
+    };
+    this.navigateLineStart = function() {
+        this.selection.moveCursorLineStart();
+        this.clearSelection();
+    };
+    this.navigateLineEnd = function() {
+        this.selection.moveCursorLineEnd();
+        this.clearSelection();
+    };
+    this.navigateFileEnd = function() {
+        this.selection.moveCursorFileEnd();
+        this.clearSelection();
+    };
+    this.navigateFileStart = function() {
+        this.selection.moveCursorFileStart();
+        this.clearSelection();
+    };
+    this.navigateWordRight = function() {
+        this.selection.moveCursorWordRight();
+        this.clearSelection();
+    };
+    this.navigateWordLeft = function() {
+        this.selection.moveCursorWordLeft();
+        this.clearSelection();
+    };
+    this.replace = function(replacement, options) {
+        if (options)
+            this.$search.set(options);
+
+        var range = this.$search.find(this.session);
+        var replaced = 0;
+        if (!range)
+            return replaced;
+
+        if (this.$tryReplace(range, replacement)) {
+            replaced = 1;
+        }
+        if (range !== null) {
+            this.selection.setSelectionRange(range);
+            this.renderer.scrollSelectionIntoView(range.start, range.end);
+        }
+
+        return replaced;
+    };
+    this.replaceAll = function(replacement, options) {
+        if (options) {
+            this.$search.set(options);
+        }
+
+        var ranges = this.$search.findAll(this.session);
+        var replaced = 0;
+        if (!ranges.length)
+            return replaced;
+
+        this.$blockScrolling += 1;
+
+        var selection = this.getSelectionRange();
+        this.selection.moveTo(0, 0);
+
+        for (var i = ranges.length - 1; i >= 0; --i) {
+            if(this.$tryReplace(ranges[i], replacement)) {
+                replaced++;
+            }
+        }
+
+        this.selection.setSelectionRange(selection);
+        this.$blockScrolling -= 1;
+
+        return replaced;
+    };
+
+    this.$tryReplace = function(range, replacement) {
+        var input = this.session.getTextRange(range);
+        replacement = this.$search.replace(input, replacement);
+        if (replacement !== null) {
+            range.end = this.session.replace(range, replacement);
+            return range;
+        } else {
+            return null;
+        }
+    };
+    this.getLastSearchOptions = function() {
+        return this.$search.getOptions();
+    };
+    this.find = function(needle, options, animate) {
+        if (!options)
+            options = {};
+
+        if (typeof needle == "string" || needle instanceof RegExp)
+            options.needle = needle;
+        else if (typeof needle == "object")
+            oop.mixin(options, needle);
+
+        var range = this.selection.getRange();
+        if (options.needle == null) {
+            needle = this.session.getTextRange(range)
+                || this.$search.$options.needle;
+            if (!needle) {
+                range = this.session.getWordRange(range.start.row, range.start.column);
+                needle = this.session.getTextRange(range);
+            }
+            this.$search.set({needle: needle});
+        }
+
+        this.$search.set(options);
+        if (!options.start)
+            this.$search.set({start: range});
+
+        var newRange = this.$search.find(this.session);
+        if (options.preventScroll)
+            return newRange;
+        if (newRange) {
+            this.revealRange(newRange, animate);
+            return newRange;
+        }
+        if (options.backwards)
+            range.start = range.end;
+        else
+            range.end = range.start;
+        this.selection.setRange(range);
+    };
+    this.findNext = function(options, animate) {
+        this.find({skipCurrent: true, backwards: false}, options, animate);
+    };
+    this.findPrevious = function(options, animate) {
+        this.find(options, {skipCurrent: true, backwards: true}, animate);
+    };
+
+    this.revealRange = function(range, animate) {
+        this.$blockScrolling += 1;
+        this.session.unfold(range);
+        this.selection.setSelectionRange(range);
+        this.$blockScrolling -= 1;
+
+        var scrollTop = this.renderer.scrollTop;
+        this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5);
+        if (animate !== false)
+            this.renderer.animateScrolling(scrollTop);
+    };
+    this.undo = function() {
+        this.$blockScrolling++;
+        this.session.getUndoManager().undo();
+        this.$blockScrolling--;
+        this.renderer.scrollCursorIntoView(null, 0.5);
+    };
+    this.redo = function() {
+        this.$blockScrolling++;
+        this.session.getUndoManager().redo();
+        this.$blockScrolling--;
+        this.renderer.scrollCursorIntoView(null, 0.5);
+    };
+    this.destroy = function() {
+        this.renderer.destroy();
+        this._signal("destroy", this);
+        if (this.session) {
+            this.session.destroy();
+        }
+    };
+    this.setAutoScrollEditorIntoView = function(enable) {
+        if (!enable)
+            return;
+        var rect;
+        var self = this;
+        var shouldScroll = false;
+        if (!this.$scrollAnchor)
+            this.$scrollAnchor = document.createElement("div");
+        var scrollAnchor = this.$scrollAnchor;
+        scrollAnchor.style.cssText = "position:absolute";
+        this.container.insertBefore(scrollAnchor, this.container.firstChild);
+        var onChangeSelection = this.on("changeSelection", function() {
+            shouldScroll = true;
+        });
+        var onBeforeRender = this.renderer.on("beforeRender", function() {
+            if (shouldScroll)
+                rect = self.renderer.container.getBoundingClientRect();
+        });
+        var onAfterRender = this.renderer.on("afterRender", function() {
+            if (shouldScroll && rect && (self.isFocused()
+                || self.searchBox && self.searchBox.isFocused())
+            ) {
+                var renderer = self.renderer;
+                var pos = renderer.$cursorLayer.$pixelPos;
+                var config = renderer.layerConfig;
+                var top = pos.top - config.offset;
+                if (pos.top >= 0 && top + rect.top < 0) {
+                    shouldScroll = true;
+                } else if (pos.top < config.height &&
+                    pos.top + rect.top + config.lineHeight > window.innerHeight) {
+                    shouldScroll = false;
+                } else {
+                    shouldScroll = null;
+                }
+                if (shouldScroll != null) {
+                    scrollAnchor.style.top = top + "px";
+                    scrollAnchor.style.left = pos.left + "px";
+                    scrollAnchor.style.height = config.lineHeight + "px";
+                    scrollAnchor.scrollIntoView(shouldScroll);
+                }
+                shouldScroll = rect = null;
+            }
+        });
+        this.setAutoScrollEditorIntoView = function(enable) {
+            if (enable)
+                return;
+            delete this.setAutoScrollEditorIntoView;
+            this.off("changeSelection", onChangeSelection);
+            this.renderer.off("afterRender", onAfterRender);
+            this.renderer.off("beforeRender", onBeforeRender);
+        };
+    };
+
+
+    this.$resetCursorStyle = function() {
+        var style = this.$cursorStyle || "ace";
+        var cursorLayer = this.renderer.$cursorLayer;
+        if (!cursorLayer)
+            return;
+        cursorLayer.setSmoothBlinking(/smooth/.test(style));
+        cursorLayer.isBlinking = !this.$readOnly && style != "wide";
+        dom.setCssClass(cursorLayer.element, "ace_slim-cursors", /slim/.test(style));
+    };
+
+}).call(Editor.prototype);
+
+
+
+config.defineOptions(Editor.prototype, "editor", {
+    selectionStyle: {
+        set: function(style) {
+            this.onSelectionChange();
+            this._signal("changeSelectionStyle", {data: style});
+        },
+        initialValue: "line"
+    },
+    highlightActiveLine: {
+        set: function() {this.$updateHighlightActiveLine();},
+        initialValue: true
+    },
+    highlightSelectedWord: {
+        set: function(shouldHighlight) {this.$onSelectionChange();},
+        initialValue: true
+    },
+    readOnly: {
+        set: function(readOnly) {
+            this.$resetCursorStyle(); 
+        },
+        initialValue: false
+    },
+    cursorStyle: {
+        set: function(val) { this.$resetCursorStyle(); },
+        values: ["ace", "slim", "smooth", "wide"],
+        initialValue: "ace"
+    },
+    mergeUndoDeltas: {
+        values: [false, true, "always"],
+        initialValue: true
+    },
+    behavioursEnabled: {initialValue: true},
+    wrapBehavioursEnabled: {initialValue: true},
+    autoScrollEditorIntoView: {
+        set: function(val) {this.setAutoScrollEditorIntoView(val)}
+    },
+    keyboardHandler: {
+        set: function(val) { this.setKeyboardHandler(val); },
+        get: function() { return this.keybindingId; },
+        handlesSet: true
+    },
+
+    hScrollBarAlwaysVisible: "renderer",
+    vScrollBarAlwaysVisible: "renderer",
+    highlightGutterLine: "renderer",
+    animatedScroll: "renderer",
+    showInvisibles: "renderer",
+    showPrintMargin: "renderer",
+    printMarginColumn: "renderer",
+    printMargin: "renderer",
+    fadeFoldWidgets: "renderer",
+    showFoldWidgets: "renderer",
+    showLineNumbers: "renderer",
+    showGutter: "renderer",
+    displayIndentGuides: "renderer",
+    fontSize: "renderer",
+    fontFamily: "renderer",
+    maxLines: "renderer",
+    minLines: "renderer",
+    scrollPastEnd: "renderer",
+    fixedWidthGutter: "renderer",
+    theme: "renderer",
+
+    scrollSpeed: "$mouseHandler",
+    dragDelay: "$mouseHandler",
+    dragEnabled: "$mouseHandler",
+    focusTimout: "$mouseHandler",
+    tooltipFollowsMouse: "$mouseHandler",
+
+    firstLineNumber: "session",
+    overwrite: "session",
+    newLineMode: "session",
+    useWorker: "session",
+    useSoftTabs: "session",
+    tabSize: "session",
+    wrap: "session",
+    indentedSoftWrap: "session",
+    foldStyle: "session",
+    mode: "session"
+});
+
+exports.Editor = Editor;
+});
+
+define("ace/undomanager",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var UndoManager = function() {
+    this.reset();
+};
+
+(function() {
+    this.execute = function(options) {
+        var deltaSets = options.args[0];
+        this.$doc  = options.args[1];
+        if (options.merge && this.hasUndo()){
+            this.dirtyCounter--;
+            deltaSets = this.$undoStack.pop().concat(deltaSets);
+        }
+        this.$undoStack.push(deltaSets);
+        this.$redoStack = [];
+        if (this.dirtyCounter < 0) {
+            this.dirtyCounter = NaN;
+        }
+        this.dirtyCounter++;
+    };
+    this.undo = function(dontSelect) {
+        var deltaSets = this.$undoStack.pop();
+        var undoSelectionRange = null;
+        if (deltaSets) {
+            undoSelectionRange = this.$doc.undoChanges(deltaSets, dontSelect);
+            this.$redoStack.push(deltaSets);
+            this.dirtyCounter--;
+        }
+
+        return undoSelectionRange;
+    };
+    this.redo = function(dontSelect) {
+        var deltaSets = this.$redoStack.pop();
+        var redoSelectionRange = null;
+        if (deltaSets) {
+            redoSelectionRange =
+                this.$doc.redoChanges(this.$deserializeDeltas(deltaSets), dontSelect);
+            this.$undoStack.push(deltaSets);
+            this.dirtyCounter++;
+        }
+        return redoSelectionRange;
+    };
+    this.reset = function() {
+        this.$undoStack = [];
+        this.$redoStack = [];
+        this.dirtyCounter = 0;
+    };
+    this.hasUndo = function() {
+        return this.$undoStack.length > 0;
+    };
+    this.hasRedo = function() {
+        return this.$redoStack.length > 0;
+    };
+    this.markClean = function() {
+        this.dirtyCounter = 0;
+    };
+    this.isClean = function() {
+        return this.dirtyCounter === 0;
+    };
+    this.$serializeDeltas = function(deltaSets) {
+        return cloneDeltaSetsObj(deltaSets, $serializeDelta);
+    };
+    this.$deserializeDeltas = function(deltaSets) {
+        return cloneDeltaSetsObj(deltaSets, $deserializeDelta);
+    };
+    
+    function $serializeDelta(delta){
+        return {
+            action: delta.action,
+            start: delta.start,
+            end: delta.end,
+            lines: delta.lines.length == 1 ? null : delta.lines,
+            text: delta.lines.length == 1 ? delta.lines[0] : null
+        };
+    }
+        
+    function $deserializeDelta(delta) {
+        return {
+            action: delta.action,
+            start: delta.start,
+            end: delta.end,
+            lines: delta.lines || [delta.text]
+        };
+    }
+    
+    function cloneDeltaSetsObj(deltaSets_old, fnGetModifiedDelta) {
+        var deltaSets_new = new Array(deltaSets_old.length);
+        for (var i = 0; i < deltaSets_old.length; i++) {
+            var deltaSet_old = deltaSets_old[i];
+            var deltaSet_new = { group: deltaSet_old.group, deltas: new Array(deltaSet_old.length)};
+            
+            for (var j = 0; j < deltaSet_old.deltas.length; j++) {
+                var delta_old = deltaSet_old.deltas[j];
+                deltaSet_new.deltas[j] = fnGetModifiedDelta(delta_old);
+            }
+            
+            deltaSets_new[i] = deltaSet_new;
+        }
+        return deltaSets_new;
+    }
+    
+}).call(UndoManager.prototype);
+
+exports.UndoManager = UndoManager;
+});
+
+define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
+
+var dom = require("../lib/dom");
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+
+var Gutter = function(parentEl) {
+    this.element = dom.createElement("div");
+    this.element.className = "ace_layer ace_gutter-layer";
+    parentEl.appendChild(this.element);
+    this.setShowFoldWidgets(this.$showFoldWidgets);
+    
+    this.gutterWidth = 0;
+
+    this.$annotations = [];
+    this.$updateAnnotations = this.$updateAnnotations.bind(this);
+
+    this.$cells = [];
+};
+
+(function() {
+
+    oop.implement(this, EventEmitter);
+
+    this.setSession = function(session) {
+        if (this.session)
+            this.session.removeEventListener("change", this.$updateAnnotations);
+        this.session = session;
+        if (session)
+            session.on("change", this.$updateAnnotations);
+    };
+
+    this.addGutterDecoration = function(row, className){
+        if (window.console)
+            console.warn && console.warn("deprecated use session.addGutterDecoration");
+        this.session.addGutterDecoration(row, className);
+    };
+
+    this.removeGutterDecoration = function(row, className){
+        if (window.console)
+            console.warn && console.warn("deprecated use session.removeGutterDecoration");
+        this.session.removeGutterDecoration(row, className);
+    };
+
+    this.setAnnotations = function(annotations) {
+        this.$annotations = [];
+        for (var i = 0; i < annotations.length; i++) {
+            var annotation = annotations[i];
+            var row = annotation.row;
+            var rowInfo = this.$annotations[row];
+            if (!rowInfo)
+                rowInfo = this.$annotations[row] = {text: []};
+           
+            var annoText = annotation.text;
+            annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || "";
+
+            if (rowInfo.text.indexOf(annoText) === -1)
+                rowInfo.text.push(annoText);
+
+            var type = annotation.type;
+            if (type == "error")
+                rowInfo.className = " ace_error";
+            else if (type == "warning" && rowInfo.className != " ace_error")
+                rowInfo.className = " ace_warning";
+            else if (type == "info" && (!rowInfo.className))
+                rowInfo.className = " ace_info";
+        }
+    };
+
+    this.$updateAnnotations = function (delta) {
+        if (!this.$annotations.length)
+            return;
+        var firstRow = delta.start.row;
+        var len = delta.end.row - firstRow;
+        if (len === 0) {
+        } else if (delta.action == 'remove') {
+            this.$annotations.splice(firstRow, len + 1, null);
+        } else {
+            var args = new Array(len + 1);
+            args.unshift(firstRow, 1);
+            this.$annotations.splice.apply(this.$annotations, args);
+        }
+    };
+
+    this.update = function(config) {
+        var session = this.session;
+        var firstRow = config.firstRow;
+        var lastRow = Math.min(config.lastRow + config.gutterOffset,  // needed to compensate for hor scollbar
+            session.getLength() - 1);
+        var fold = session.getNextFoldLine(firstRow);
+        var foldStart = fold ? fold.start.row : Infinity;
+        var foldWidgets = this.$showFoldWidgets && session.foldWidgets;
+        var breakpoints = session.$breakpoints;
+        var decorations = session.$decorations;
+        var firstLineNumber = session.$firstLineNumber;
+        var lastLineNumber = 0;
+        
+        var gutterRenderer = session.gutterRenderer || this.$renderer;
+
+        var cell = null;
+        var index = -1;
+        var row = firstRow;
+        while (true) {
+            if (row > foldStart) {
+                row = fold.end.row + 1;
+                fold = session.getNextFoldLine(row, fold);
+                foldStart = fold ? fold.start.row : Infinity;
+            }
+            if (row > lastRow) {
+                while (this.$cells.length > index + 1) {
+                    cell = this.$cells.pop();
+                    this.element.removeChild(cell.element);
+                }
+                break;
+            }
+
+            cell = this.$cells[++index];
+            if (!cell) {
+                cell = {element: null, textNode: null, foldWidget: null};
+                cell.element = dom.createElement("div");
+                cell.textNode = document.createTextNode('');
+                cell.element.appendChild(cell.textNode);
+                this.element.appendChild(cell.element);
+                this.$cells[index] = cell;
+            }
+
+            var className = "ace_gutter-cell ";
+            if (breakpoints[row])
+                className += breakpoints[row];
+            if (decorations[row])
+                className += decorations[row];
+            if (this.$annotations[row])
+                className += this.$annotations[row].className;
+            if (cell.element.className != className)
+                cell.element.className = className;
+
+            var height = session.getRowLength(row) * config.lineHeight + "px";
+            if (height != cell.element.style.height)
+                cell.element.style.height = height;
+
+            if (foldWidgets) {
+                var c = foldWidgets[row];
+                if (c == null)
+                    c = foldWidgets[row] = session.getFoldWidget(row);
+            }
+
+            if (c) {
+                if (!cell.foldWidget) {
+                    cell.foldWidget = dom.createElement("span");
+                    cell.element.appendChild(cell.foldWidget);
+                }
+                var className = "ace_fold-widget ace_" + c;
+                if (c == "start" && row == foldStart && row < fold.end.row)
+                    className += " ace_closed";
+                else
+                    className += " ace_open";
+                if (cell.foldWidget.className != className)
+                    cell.foldWidget.className = className;
+
+                var height = config.lineHeight + "px";
+                if (cell.foldWidget.style.height != height)
+                    cell.foldWidget.style.height = height;
+            } else {
+                if (cell.foldWidget) {
+                    cell.element.removeChild(cell.foldWidget);
+                    cell.foldWidget = null;
+                }
+            }
+            
+            var text = lastLineNumber = gutterRenderer
+                ? gutterRenderer.getText(session, row)
+                : row + firstLineNumber;
+            if (text != cell.textNode.data)
+                cell.textNode.data = text;
+
+            row++;
+        }
+
+        this.element.style.height = config.minHeight + "px";
+
+        if (this.$fixedWidth || session.$useWrapMode)
+            lastLineNumber = session.getLength() + firstLineNumber;
+
+        var gutterWidth = gutterRenderer 
+            ? gutterRenderer.getWidth(session, lastLineNumber, config)
+            : lastLineNumber.toString().length * config.characterWidth;
+        
+        var padding = this.$padding || this.$computePadding();
+        gutterWidth += padding.left + padding.right;
+        if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) {
+            this.gutterWidth = gutterWidth;
+            this.element.style.width = Math.ceil(this.gutterWidth) + "px";
+            this._emit("changeGutterWidth", gutterWidth);
+        }
+    };
+
+    this.$fixedWidth = false;
+    
+    this.$showLineNumbers = true;
+    this.$renderer = "";
+    this.setShowLineNumbers = function(show) {
+        this.$renderer = !show && {
+            getWidth: function() {return ""},
+            getText: function() {return ""}
+        };
+    };
+    
+    this.getShowLineNumbers = function() {
+        return this.$showLineNumbers;
+    };
+    
+    this.$showFoldWidgets = true;
+    this.setShowFoldWidgets = function(show) {
+        if (show)
+            dom.addCssClass(this.element, "ace_folding-enabled");
+        else
+            dom.removeCssClass(this.element, "ace_folding-enabled");
+
+        this.$showFoldWidgets = show;
+        this.$padding = null;
+    };
+    
+    this.getShowFoldWidgets = function() {
+        return this.$showFoldWidgets;
+    };
+
+    this.$computePadding = function() {
+        if (!this.element.firstChild)
+            return {left: 0, right: 0};
+        var style = dom.computedStyle(this.element.firstChild);
+        this.$padding = {};
+        this.$padding.left = parseInt(style.paddingLeft) + 1 || 0;
+        this.$padding.right = parseInt(style.paddingRight) || 0;
+        return this.$padding;
+    };
+
+    this.getRegion = function(point) {
+        var padding = this.$padding || this.$computePadding();
+        var rect = this.element.getBoundingClientRect();
+        if (point.x < padding.left + rect.left)
+            return "markers";
+        if (this.$showFoldWidgets && point.x > rect.right - padding.right)
+            return "foldWidgets";
+    };
+
+}).call(Gutter.prototype);
+
+exports.Gutter = Gutter;
+
+});
+
+define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+var dom = require("../lib/dom");
+
+var Marker = function(parentEl) {
+    this.element = dom.createElement("div");
+    this.element.className = "ace_layer ace_marker-layer";
+    parentEl.appendChild(this.element);
+};
+
+(function() {
+
+    this.$padding = 0;
+
+    this.setPadding = function(padding) {
+        this.$padding = padding;
+    };
+    this.setSession = function(session) {
+        this.session = session;
+    };
+    
+    this.setMarkers = function(markers) {
+        this.markers = markers;
+    };
+
+    this.update = function(config) {
+        var config = config || this.config;
+        if (!config)
+            return;
+
+        this.config = config;
+
+
+        var html = [];
+        for (var key in this.markers) {
+            var marker = this.markers[key];
+
+            if (!marker.range) {
+                marker.update(html, this, this.session, config);
+                continue;
+            }
+
+            var range = marker.range.clipRows(config.firstRow, config.lastRow);
+            if (range.isEmpty()) continue;
+
+            range = range.toScreenRange(this.session);
+            if (marker.renderer) {
+                var top = this.$getTop(range.start.row, config);
+                var left = this.$padding + range.start.column * config.characterWidth;
+                marker.renderer(html, range, left, top, config);
+            } else if (marker.type == "fullLine") {
+                this.drawFullLineMarker(html, range, marker.clazz, config);
+            } else if (marker.type == "screenLine") {
+                this.drawScreenLineMarker(html, range, marker.clazz, config);
+            } else if (range.isMultiLine()) {
+                if (marker.type == "text")
+                    this.drawTextMarker(html, range, marker.clazz, config);
+                else
+                    this.drawMultiLineMarker(html, range, marker.clazz, config);
+            } else {
+                this.drawSingleLineMarker(html, range, marker.clazz + " ace_start" + " ace_br15", config);
+            }
+        }
+        this.element.innerHTML = html.join("");
+    };
+
+    this.$getTop = function(row, layerConfig) {
+        return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight;
+    };
+
+    function getBorderClass(tl, tr, br, bl) {
+        return (tl ? 1 : 0) | (tr ? 2 : 0) | (br ? 4 : 0) | (bl ? 8 : 0);
+    }
+    this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig, extraStyle) {
+        var session = this.session;
+        var start = range.start.row;
+        var end = range.end.row;
+        var row = start;
+        var prev = 0; 
+        var curr = 0;
+        var next = session.getScreenLastRowColumn(row);
+        var lineRange = new Range(row, range.start.column, row, curr);
+        for (; row <= end; row++) {
+            lineRange.start.row = lineRange.end.row = row;
+            lineRange.start.column = row == start ? range.start.column : session.getRowWrapIndent(row);
+            lineRange.end.column = next;
+            prev = curr;
+            curr = next;
+            next = row + 1 < end ? session.getScreenLastRowColumn(row + 1) : row == end ? 0 : range.end.column;
+            this.drawSingleLineMarker(stringBuilder, lineRange, 
+                clazz + (row == start  ? " ace_start" : "") + " ace_br"
+                    + getBorderClass(row == start || row == start + 1 && range.start.column, prev < curr, curr > next, row == end),
+                layerConfig, row == end ? 0 : 1, extraStyle);
+        }
+    };
+    this.drawMultiLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {
+        var padding = this.$padding;
+        var height = config.lineHeight;
+        var top = this.$getTop(range.start.row, config);
+        var left = padding + range.start.column * config.characterWidth;
+        extraStyle = extraStyle || "";
+
+        stringBuilder.push(
+            "<div class='", clazz, " ace_br1 ace_start' style='",
+            "height:", height, "px;",
+            "right:0;",
+            "top:", top, "px;",
+            "left:", left, "px;", extraStyle, "'></div>"
+        );
+        top = this.$getTop(range.end.row, config);
+        var width = range.end.column * config.characterWidth;
+
+        stringBuilder.push(
+            "<div class='", clazz, " ace_br12' style='",
+            "height:", height, "px;",
+            "width:", width, "px;",
+            "top:", top, "px;",
+            "left:", padding, "px;", extraStyle, "'></div>"
+        );
+        height = (range.end.row - range.start.row - 1) * config.lineHeight;
+        if (height <= 0)
+            return;
+        top = this.$getTop(range.start.row + 1, config);
+        
+        var radiusClass = (range.start.column ? 1 : 0) | (range.end.column ? 0 : 8);
+
+        stringBuilder.push(
+            "<div class='", clazz, (radiusClass ? " ace_br" + radiusClass : ""), "' style='",
+            "height:", height, "px;",
+            "right:0;",
+            "top:", top, "px;",
+            "left:", padding, "px;", extraStyle, "'></div>"
+        );
+    };
+    this.drawSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) {
+        var height = config.lineHeight;
+        var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth;
+
+        var top = this.$getTop(range.start.row, config);
+        var left = this.$padding + range.start.column * config.characterWidth;
+
+        stringBuilder.push(
+            "<div class='", clazz, "' style='",
+            "height:", height, "px;",
+            "width:", width, "px;",
+            "top:", top, "px;",
+            "left:", left, "px;", extraStyle || "", "'></div>"
+        );
+    };
+
+    this.drawFullLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {
+        var top = this.$getTop(range.start.row, config);
+        var height = config.lineHeight;
+        if (range.start.row != range.end.row)
+            height += this.$getTop(range.end.row, config) - top;
+
+        stringBuilder.push(
+            "<div class='", clazz, "' style='",
+            "height:", height, "px;",
+            "top:", top, "px;",
+            "left:0;right:0;", extraStyle || "", "'></div>"
+        );
+    };
+    
+    this.drawScreenLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {
+        var top = this.$getTop(range.start.row, config);
+        var height = config.lineHeight;
+
+        stringBuilder.push(
+            "<div class='", clazz, "' style='",
+            "height:", height, "px;",
+            "top:", top, "px;",
+            "left:0;right:0;", extraStyle || "", "'></div>"
+        );
+    };
+
+}).call(Marker.prototype);
+
+exports.Marker = Marker;
+
+});
+
+define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var dom = require("../lib/dom");
+var lang = require("../lib/lang");
+var useragent = require("../lib/useragent");
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+
+var Text = function(parentEl) {
+    this.element = dom.createElement("div");
+    this.element.className = "ace_layer ace_text-layer";
+    parentEl.appendChild(this.element);
+    this.$updateEolChar = this.$updateEolChar.bind(this);
+};
+
+(function() {
+
+    oop.implement(this, EventEmitter);
+
+    this.EOF_CHAR = "\xB6";
+    this.EOL_CHAR_LF = "\xAC";
+    this.EOL_CHAR_CRLF = "\xa4";
+    this.EOL_CHAR = this.EOL_CHAR_LF;
+    this.TAB_CHAR = "\u2014"; //"\u21E5";
+    this.SPACE_CHAR = "\xB7";
+    this.$padding = 0;
+
+    this.$updateEolChar = function() {
+        var EOL_CHAR = this.session.doc.getNewLineCharacter() == "\n"
+           ? this.EOL_CHAR_LF
+           : this.EOL_CHAR_CRLF;
+        if (this.EOL_CHAR != EOL_CHAR) {
+            this.EOL_CHAR = EOL_CHAR;
+            return true;
+        }
+    }
+
+    this.setPadding = function(padding) {
+        this.$padding = padding;
+        this.element.style.padding = "0 " + padding + "px";
+    };
+
+    this.getLineHeight = function() {
+        return this.$fontMetrics.$characterSize.height || 0;
+    };
+
+    this.getCharacterWidth = function() {
+        return this.$fontMetrics.$characterSize.width || 0;
+    };
+    
+    this.$setFontMetrics = function(measure) {
+        this.$fontMetrics = measure;
+        this.$fontMetrics.on("changeCharacterSize", function(e) {
+            this._signal("changeCharacterSize", e);
+        }.bind(this));
+        this.$pollSizeChanges();
+    }
+
+    this.checkForSizeChanges = function() {
+        this.$fontMetrics.checkForSizeChanges();
+    };
+    this.$pollSizeChanges = function() {
+        return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges();
+    };
+    this.setSession = function(session) {
+        this.session = session;
+        if (session)
+            this.$computeTabString();
+    };
+
+    this.showInvisibles = false;
+    this.setShowInvisibles = function(showInvisibles) {
+        if (this.showInvisibles == showInvisibles)
+            return false;
+
+        this.showInvisibles = showInvisibles;
+        this.$computeTabString();
+        return true;
+    };
+
+    this.displayIndentGuides = true;
+    this.setDisplayIndentGuides = function(display) {
+        if (this.displayIndentGuides == display)
+            return false;
+
+        this.displayIndentGuides = display;
+        this.$computeTabString();
+        return true;
+    };
+
+    this.$tabStrings = [];
+    this.onChangeTabSize =
+    this.$computeTabString = function() {
+        var tabSize = this.session.getTabSize();
+        this.tabSize = tabSize;
+        var tabStr = this.$tabStrings = [0];
+        for (var i = 1; i < tabSize + 1; i++) {
+            if (this.showInvisibles) {
+                tabStr.push("<span class='ace_invisible ace_invisible_tab'>"
+                    + lang.stringRepeat(this.TAB_CHAR, i)
+                    + "</span>");
+            } else {
+                tabStr.push(lang.stringRepeat(" ", i));
+            }
+        }
+        if (this.displayIndentGuides) {
+            this.$indentGuideRe =  /\s\S| \t|\t |\s$/;
+            var className = "ace_indent-guide";
+            var spaceClass = "";
+            var tabClass = "";
+            if (this.showInvisibles) {
+                className += " ace_invisible";
+                spaceClass = " ace_invisible_space";
+                tabClass = " ace_invisible_tab";
+                var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize);
+                var tabContent = lang.stringRepeat(this.TAB_CHAR, this.tabSize);
+            } else{
+                var spaceContent = lang.stringRepeat(" ", this.tabSize);
+                var tabContent = spaceContent;
+            }
+
+            this.$tabStrings[" "] = "<span class='" + className + spaceClass + "'>" + spaceContent + "</span>";
+            this.$tabStrings["\t"] = "<span class='" + className + tabClass + "'>" + tabContent + "</span>";
+        }
+    };
+
+    this.updateLines = function(config, firstRow, lastRow) {
+        if (this.config.lastRow != config.lastRow ||
+            this.config.firstRow != config.firstRow) {
+            this.scrollLines(config);
+        }
+        this.config = config;
+
+        var first = Math.max(firstRow, config.firstRow);
+        var last = Math.min(lastRow, config.lastRow);
+
+        var lineElements = this.element.childNodes;
+        var lineElementsIdx = 0;
+
+        for (var row = config.firstRow; row < first; row++) {
+            var foldLine = this.session.getFoldLine(row);
+            if (foldLine) {
+                if (foldLine.containsRow(first)) {
+                    first = foldLine.start.row;
+                    break;
+                } else {
+                    row = foldLine.end.row;
+                }
+            }
+            lineElementsIdx ++;
+        }
+
+        var row = first;
+        var foldLine = this.session.getNextFoldLine(row);
+        var foldStart = foldLine ? foldLine.start.row : Infinity;
+
+        while (true) {
+            if (row > foldStart) {
+                row = foldLine.end.row+1;
+                foldLine = this.session.getNextFoldLine(row, foldLine);
+                foldStart = foldLine ? foldLine.start.row :Infinity;
+            }
+            if (row > last)
+                break;
+
+            var lineElement = lineElements[lineElementsIdx++];
+            if (lineElement) {
+                var html = [];
+                this.$renderLine(
+                    html, row, !this.$useLineGroups(), row == foldStart ? foldLine : false
+                );
+                lineElement.style.height = config.lineHeight * this.session.getRowLength(row) + "px";
+                lineElement.innerHTML = html.join("");
+            }
+            row++;
+        }
+    };
+
+    this.scrollLines = function(config) {
+        var oldConfig = this.config;
+        this.config = config;
+
+        if (!oldConfig || oldConfig.lastRow < config.firstRow)
+            return this.update(config);
+
+        if (config.lastRow < oldConfig.firstRow)
+            return this.update(config);
+
+        var el = this.element;
+        if (oldConfig.firstRow < config.firstRow)
+            for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--)
+                el.removeChild(el.firstChild);
+
+        if (oldConfig.lastRow > config.lastRow)
+            for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--)
+                el.removeChild(el.lastChild);
+
+        if (config.firstRow < oldConfig.firstRow) {
+            var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1);
+            if (el.firstChild)
+                el.insertBefore(fragment, el.firstChild);
+            else
+                el.appendChild(fragment);
+        }
+
+        if (config.lastRow > oldConfig.lastRow) {
+            var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow);
+            el.appendChild(fragment);
+        }
+    };
+
+    this.$renderLinesFragment = function(config, firstRow, lastRow) {
+        var fragment = this.element.ownerDocument.createDocumentFragment();
+        var row = firstRow;
+        var foldLine = this.session.getNextFoldLine(row);
+        var foldStart = foldLine ? foldLine.start.row : Infinity;
+
+        while (true) {
+            if (row > foldStart) {
+                row = foldLine.end.row+1;
+                foldLine = this.session.getNextFoldLine(row, foldLine);
+                foldStart = foldLine ? foldLine.start.row : Infinity;
+            }
+            if (row > lastRow)
+                break;
+
+            var container = dom.createElement("div");
+
+            var html = [];
+            this.$renderLine(html, row, false, row == foldStart ? foldLine : false);
+            container.innerHTML = html.join("");
+            if (this.$useLineGroups()) {
+                container.className = 'ace_line_group';
+                fragment.appendChild(container);
+                container.style.height = config.lineHeight * this.session.getRowLength(row) + "px";
+
+            } else {
+                while(container.firstChild)
+                    fragment.appendChild(container.firstChild);
+            }
+
+            row++;
+        }
+        return fragment;
+    };
+
+    this.update = function(config) {
+        this.config = config;
+
+        var html = [];
+        var firstRow = config.firstRow, lastRow = config.lastRow;
+
+        var row = firstRow;
+        var foldLine = this.session.getNextFoldLine(row);
+        var foldStart = foldLine ? foldLine.start.row : Infinity;
+
+        while (true) {
+            if (row > foldStart) {
+                row = foldLine.end.row+1;
+                foldLine = this.session.getNextFoldLine(row, foldLine);
+                foldStart = foldLine ? foldLine.start.row :Infinity;
+            }
+            if (row > lastRow)
+                break;
+
+            if (this.$useLineGroups())
+                html.push("<div class='ace_line_group' style='height:", config.lineHeight*this.session.getRowLength(row), "px'>")
+
+            this.$renderLine(html, row, false, row == foldStart ? foldLine : false);
+
+            if (this.$useLineGroups())
+                html.push("</div>"); // end the line group
+
+            row++;
+        }
+        this.element.innerHTML = html.join("");
+    };
+
+    this.$textToken = {
+        "text": true,
+        "rparen": true,
+        "lparen": true
+    };
+
+    this.$renderToken = function(stringBuilder, screenColumn, token, value) {
+        var self = this;
+        var replaceReg = /\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g;
+        var replaceFunc = function(c, a, b, tabIdx, idx4) {
+            if (a) {
+                return self.showInvisibles
+                    ? "<span class='ace_invisible ace_invisible_space'>" + lang.stringRepeat(self.SPACE_CHAR, c.length) + "</span>"
+                    : c;
+            } else if (c == "&") {
+                return "&#38;";
+            } else if (c == "<") {
+                return "&#60;";
+            } else if (c == ">") {
+                return "&#62;";
+            } else if (c == "\t") {
+                var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx);
+                screenColumn += tabSize - 1;
+                return self.$tabStrings[tabSize];
+            } else if (c == "\u3000") {
+                var classToUse = self.showInvisibles ? "ace_cjk ace_invisible ace_invisible_space" : "ace_cjk";
+                var space = self.showInvisibles ? self.SPACE_CHAR : "";
+                screenColumn += 1;
+                return "<span class='" + classToUse + "' style='width:" +
+                    (self.config.characterWidth * 2) +
+                    "px'>" + space + "</span>";
+            } else if (b) {
+                return "<span class='ace_invisible ace_invisible_space ace_invalid'>" + self.SPACE_CHAR + "</span>";
+            } else {
+                screenColumn += 1;
+                return "<span class='ace_cjk' style='width:" +
+                    (self.config.characterWidth * 2) +
+                    "px'>" + c + "</span>";
+            }
+        };
+
+        var output = value.replace(replaceReg, replaceFunc);
+
+        if (!this.$textToken[token.type]) {
+            var classes = "ace_" + token.type.replace(/\./g, " ace_");
+            var style = "";
+            if (token.type == "fold")
+                style = " style='width:" + (token.value.length * this.config.characterWidth) + "px;' ";
+            stringBuilder.push("<span class='", classes, "'", style, ">", output, "</span>");
+        }
+        else {
+            stringBuilder.push(output);
+        }
+        return screenColumn + value.length;
+    };
+
+    this.renderIndentGuide = function(stringBuilder, value, max) {
+        var cols = value.search(this.$indentGuideRe);
+        if (cols <= 0 || cols >= max)
+            return value;
+        if (value[0] == " ") {
+            cols -= cols % this.tabSize;
+            stringBuilder.push(lang.stringRepeat(this.$tabStrings[" "], cols/this.tabSize));
+            return value.substr(cols);
+        } else if (value[0] == "\t") {
+            stringBuilder.push(lang.stringRepeat(this.$tabStrings["\t"], cols));
+            return value.substr(cols);
+        }
+        return value;
+    };
+
+    this.$renderWrappedLine = function(stringBuilder, tokens, splits, onlyContents) {
+        var chars = 0;
+        var split = 0;
+        var splitChars = splits[0];
+        var screenColumn = 0;
+
+        for (var i = 0; i < tokens.length; i++) {
+            var token = tokens[i];
+            var value = token.value;
+            if (i == 0 && this.displayIndentGuides) {
+                chars = value.length;
+                value = this.renderIndentGuide(stringBuilder, value, splitChars);
+                if (!value)
+                    continue;
+                chars -= value.length;
+            }
+
+            if (chars + value.length < splitChars) {
+                screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);
+                chars += value.length;
+            } else {
+                while (chars + value.length >= splitChars) {
+                    screenColumn = this.$renderToken(
+                        stringBuilder, screenColumn,
+                        token, value.substring(0, splitChars - chars)
+                    );
+                    value = value.substring(splitChars - chars);
+                    chars = splitChars;
+
+                    if (!onlyContents) {
+                        stringBuilder.push("</div>",
+                            "<div class='ace_line' style='height:",
+                            this.config.lineHeight, "px'>"
+                        );
+                    }
+
+                    stringBuilder.push(lang.stringRepeat("\xa0", splits.indent));
+
+                    split ++;
+                    screenColumn = 0;
+                    splitChars = splits[split] || Number.MAX_VALUE;
+                }
+                if (value.length != 0) {
+                    chars += value.length;
+                    screenColumn = this.$renderToken(
+                        stringBuilder, screenColumn, token, value
+                    );
+                }
+            }
+        }
+    };
+
+    this.$renderSimpleLine = function(stringBuilder, tokens) {
+        var screenColumn = 0;
+        var token = tokens[0];
+        var value = token.value;
+        if (this.displayIndentGuides)
+            value = this.renderIndentGuide(stringBuilder, value);
+        if (value)
+            screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);
+        for (var i = 1; i < tokens.length; i++) {
+            token = tokens[i];
+            value = token.value;
+            screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);
+        }
+    };
+    this.$renderLine = function(stringBuilder, row, onlyContents, foldLine) {
+        if (!foldLine && foldLine != false)
+            foldLine = this.session.getFoldLine(row);
+
+        if (foldLine)
+            var tokens = this.$getFoldLineTokens(row, foldLine);
+        else
+            var tokens = this.session.getTokens(row);
+
+
+        if (!onlyContents) {
+            stringBuilder.push(
+                "<div class='ace_line' style='height:", 
+                    this.config.lineHeight * (
+                        this.$useLineGroups() ? 1 :this.session.getRowLength(row)
+                    ), "px'>"
+            );
+        }
+
+        if (tokens.length) {
+            var splits = this.session.getRowSplitData(row);
+            if (splits && splits.length)
+                this.$renderWrappedLine(stringBuilder, tokens, splits, onlyContents);
+            else
+                this.$renderSimpleLine(stringBuilder, tokens);
+        }
+
+        if (this.showInvisibles) {
+            if (foldLine)
+                row = foldLine.end.row
+
+            stringBuilder.push(
+                "<span class='ace_invisible ace_invisible_eol'>",
+                row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR,
+                "</span>"
+            );
+        }
+        if (!onlyContents)
+            stringBuilder.push("</div>");
+    };
+
+    this.$getFoldLineTokens = function(row, foldLine) {
+        var session = this.session;
+        var renderTokens = [];
+
+        function addTokens(tokens, from, to) {
+            var idx = 0, col = 0;
+            while ((col + tokens[idx].value.length) < from) {
+                col += tokens[idx].value.length;
+                idx++;
+
+                if (idx == tokens.length)
+                    return;
+            }
+            if (col != from) {
+                var value = tokens[idx].value.substring(from - col);
+                if (value.length > (to - from))
+                    value = value.substring(0, to - from);
+
+                renderTokens.push({
+                    type: tokens[idx].type,
+                    value: value
+                });
+
+                col = from + value.length;
+                idx += 1;
+            }
+
+            while (col < to && idx < tokens.length) {
+                var value = tokens[idx].value;
+                if (value.length + col > to) {
+                    renderTokens.push({
+                        type: tokens[idx].type,
+                        value: value.substring(0, to - col)
+                    });
+                } else
+                    renderTokens.push(tokens[idx]);
+                col += value.length;
+                idx += 1;
+            }
+        }
+
+        var tokens = session.getTokens(row);
+        foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) {
+            if (placeholder != null) {
+                renderTokens.push({
+                    type: "fold",
+                    value: placeholder
+                });
+            } else {
+                if (isNewRow)
+                    tokens = session.getTokens(row);
+
+                if (tokens.length)
+                    addTokens(tokens, lastColumn, column);
+            }
+        }, foldLine.end.row, this.session.getLine(foldLine.end.row).length);
+
+        return renderTokens;
+    };
+
+    this.$useLineGroups = function() {
+        return this.session.getUseWrapMode();
+    };
+
+    this.destroy = function() {
+        clearInterval(this.$pollSizeChangesTimer);
+        if (this.$measureNode)
+            this.$measureNode.parentNode.removeChild(this.$measureNode);
+        delete this.$measureNode;
+    };
+
+}).call(Text.prototype);
+
+exports.Text = Text;
+
+});
+
+define("ace/layer/cursor",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+"use strict";
+
+var dom = require("../lib/dom");
+var isIE8;
+
+var Cursor = function(parentEl) {
+    this.element = dom.createElement("div");
+    this.element.className = "ace_layer ace_cursor-layer";
+    parentEl.appendChild(this.element);
+    
+    if (isIE8 === undefined)
+        isIE8 = !("opacity" in this.element.style);
+
+    this.isVisible = false;
+    this.isBlinking = true;
+    this.blinkInterval = 1000;
+    this.smoothBlinking = false;
+
+    this.cursors = [];
+    this.cursor = this.addCursor();
+    dom.addCssClass(this.element, "ace_hidden-cursors");
+    this.$updateCursors = (isIE8
+        ? this.$updateVisibility
+        : this.$updateOpacity).bind(this);
+};
+
+(function() {
+    
+    this.$updateVisibility = function(val) {
+        var cursors = this.cursors;
+        for (var i = cursors.length; i--; )
+            cursors[i].style.visibility = val ? "" : "hidden";
+    };
+    this.$updateOpacity = function(val) {
+        var cursors = this.cursors;
+        for (var i = cursors.length; i--; )
+            cursors[i].style.opacity = val ? "" : "0";
+    };
+    
+
+    this.$padding = 0;
+    this.setPadding = function(padding) {
+        this.$padding = padding;
+    };
+
+    this.setSession = function(session) {
+        this.session = session;
+    };
+
+    this.setBlinking = function(blinking) {
+        if (blinking != this.isBlinking){
+            this.isBlinking = blinking;
+            this.restartTimer();
+        }
+    };
+
+    this.setBlinkInterval = function(blinkInterval) {
+        if (blinkInterval != this.blinkInterval){
+            this.blinkInterval = blinkInterval;
+            this.restartTimer();
+        }
+    };
+
+    this.setSmoothBlinking = function(smoothBlinking) {
+        if (smoothBlinking != this.smoothBlinking && !isIE8) {
+            this.smoothBlinking = smoothBlinking;
+            dom.setCssClass(this.element, "ace_smooth-blinking", smoothBlinking);
+            this.$updateCursors(true);
+            this.$updateCursors = (this.$updateOpacity).bind(this);
+            this.restartTimer();
+        }
+    };
+
+    this.addCursor = function() {
+        var el = dom.createElement("div");
+        el.className = "ace_cursor";
+        this.element.appendChild(el);
+        this.cursors.push(el);
+        return el;
+    };
+
+    this.removeCursor = function() {
+        if (this.cursors.length > 1) {
+            var el = this.cursors.pop();
+            el.parentNode.removeChild(el);
+            return el;
+        }
+    };
+
+    this.hideCursor = function() {
+        this.isVisible = false;
+        dom.addCssClass(this.element, "ace_hidden-cursors");
+        this.restartTimer();
+    };
+
+    this.showCursor = function() {
+        this.isVisible = true;
+        dom.removeCssClass(this.element, "ace_hidden-cursors");
+        this.restartTimer();
+    };
+
+    this.restartTimer = function() {
+        var update = this.$updateCursors;
+        clearInterval(this.intervalId);
+        clearTimeout(this.timeoutId);
+        if (this.smoothBlinking) {
+            dom.removeCssClass(this.element, "ace_smooth-blinking");
+        }
+        
+        update(true);
+
+        if (!this.isBlinking || !this.blinkInterval || !this.isVisible)
+            return;
+
+        if (this.smoothBlinking) {
+            setTimeout(function(){
+                dom.addCssClass(this.element, "ace_smooth-blinking");
+            }.bind(this));
+        }
+        
+        var blink = function(){
+            this.timeoutId = setTimeout(function() {
+                update(false);
+            }, 0.6 * this.blinkInterval);
+        }.bind(this);
+
+        this.intervalId = setInterval(function() {
+            update(true);
+            blink();
+        }, this.blinkInterval);
+
+        blink();
+    };
+
+    this.getPixelPosition = function(position, onScreen) {
+        if (!this.config || !this.session)
+            return {left : 0, top : 0};
+
+        if (!position)
+            position = this.session.selection.getCursor();
+        var pos = this.session.documentToScreenPosition(position);
+        var cursorLeft = this.$padding + pos.column * this.config.characterWidth;
+        var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) *
+            this.config.lineHeight;
+
+        return {left : cursorLeft, top : cursorTop};
+    };
+
+    this.update = function(config) {
+        this.config = config;
+
+        var selections = this.session.$selectionMarkers;
+        var i = 0, cursorIndex = 0;
+
+        if (selections === undefined || selections.length === 0){
+            selections = [{cursor: null}];
+        }
+
+        for (var i = 0, n = selections.length; i < n; i++) {
+            var pixelPos = this.getPixelPosition(selections[i].cursor, true);
+            if ((pixelPos.top > config.height + config.offset ||
+                 pixelPos.top < 0) && i > 1) {
+                continue;
+            }
+
+            var style = (this.cursors[cursorIndex++] || this.addCursor()).style;
+            
+            if (!this.drawCursor) {
+                style.left = pixelPos.left + "px";
+                style.top = pixelPos.top + "px";
+                style.width = config.characterWidth + "px";
+                style.height = config.lineHeight + "px";
+            } else {
+                this.drawCursor(style, pixelPos, config, selections[i], this.session);
+            }
+        }
+        while (this.cursors.length > cursorIndex)
+            this.removeCursor();
+
+        var overwrite = this.session.getOverwrite();
+        this.$setOverwrite(overwrite);
+        this.$pixelPos = pixelPos;
+        this.restartTimer();
+    };
+    
+    this.drawCursor = null;
+
+    this.$setOverwrite = function(overwrite) {
+        if (overwrite != this.overwrite) {
+            this.overwrite = overwrite;
+            if (overwrite)
+                dom.addCssClass(this.element, "ace_overwrite-cursors");
+            else
+                dom.removeCssClass(this.element, "ace_overwrite-cursors");
+        }
+    };
+
+    this.destroy = function() {
+        clearInterval(this.intervalId);
+        clearTimeout(this.timeoutId);
+    };
+
+}).call(Cursor.prototype);
+
+exports.Cursor = Cursor;
+
+});
+
+define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var dom = require("./lib/dom");
+var event = require("./lib/event");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var ScrollBar = function(parent) {
+    this.element = dom.createElement("div");
+    this.element.className = "ace_scrollbar ace_scrollbar" + this.classSuffix;
+
+    this.inner = dom.createElement("div");
+    this.inner.className = "ace_scrollbar-inner";
+    this.element.appendChild(this.inner);
+
+    parent.appendChild(this.element);
+
+    this.setVisible(false);
+    this.skipEvent = false;
+
+    event.addListener(this.element, "scroll", this.onScroll.bind(this));
+    event.addListener(this.element, "mousedown", event.preventDefault);
+};
+
+(function() {
+    oop.implement(this, EventEmitter);
+
+    this.setVisible = function(isVisible) {
+        this.element.style.display = isVisible ? "" : "none";
+        this.isVisible = isVisible;
+    };
+}).call(ScrollBar.prototype);
+var VScrollBar = function(parent, renderer) {
+    ScrollBar.call(this, parent);
+    this.scrollTop = 0;
+    renderer.$scrollbarWidth = 
+    this.width = dom.scrollbarWidth(parent.ownerDocument);
+    this.inner.style.width =
+    this.element.style.width = (this.width || 15) + 5 + "px";
+};
+
+oop.inherits(VScrollBar, ScrollBar);
+
+(function() {
+
+    this.classSuffix = '-v';
+    this.onScroll = function() {
+        if (!this.skipEvent) {
+            this.scrollTop = this.element.scrollTop;
+            this._emit("scroll", {data: this.scrollTop});
+        }
+        this.skipEvent = false;
+    };
+    this.getWidth = function() {
+        return this.isVisible ? this.width : 0;
+    };
+    this.setHeight = function(height) {
+        this.element.style.height = height + "px";
+    };
+    this.setInnerHeight = function(height) {
+        this.inner.style.height = height + "px";
+    };
+    this.setScrollHeight = function(height) {
+        this.inner.style.height = height + "px";
+    };
+    this.setScrollTop = function(scrollTop) {
+        if (this.scrollTop != scrollTop) {
+            this.skipEvent = true;
+            this.scrollTop = this.element.scrollTop = scrollTop;
+        }
+    };
+
+}).call(VScrollBar.prototype);
+var HScrollBar = function(parent, renderer) {
+    ScrollBar.call(this, parent);
+    this.scrollLeft = 0;
+    this.height = renderer.$scrollbarWidth;
+    this.inner.style.height =
+    this.element.style.height = (this.height || 15) + 5 + "px";
+};
+
+oop.inherits(HScrollBar, ScrollBar);
+
+(function() {
+
+    this.classSuffix = '-h';
+    this.onScroll = function() {
+        if (!this.skipEvent) {
+            this.scrollLeft = this.element.scrollLeft;
+            this._emit("scroll", {data: this.scrollLeft});
+        }
+        this.skipEvent = false;
+    };
+    this.getHeight = function() {
+        return this.isVisible ? this.height : 0;
+    };
+    this.setWidth = function(width) {
+        this.element.style.width = width + "px";
+    };
+    this.setInnerWidth = function(width) {
+        this.inner.style.width = width + "px";
+    };
+    this.setScrollWidth = function(width) {
+        this.inner.style.width = width + "px";
+    };
+    this.setScrollLeft = function(scrollLeft) {
+        if (this.scrollLeft != scrollLeft) {
+            this.skipEvent = true;
+            this.scrollLeft = this.element.scrollLeft = scrollLeft;
+        }
+    };
+
+}).call(HScrollBar.prototype);
+
+
+exports.ScrollBar = VScrollBar; // backward compatibility
+exports.ScrollBarV = VScrollBar; // backward compatibility
+exports.ScrollBarH = HScrollBar; // backward compatibility
+
+exports.VScrollBar = VScrollBar;
+exports.HScrollBar = HScrollBar;
+});
+
+define("ace/renderloop",["require","exports","module","ace/lib/event"], function(require, exports, module) {
+"use strict";
+
+var event = require("./lib/event");
+
+
+var RenderLoop = function(onRender, win) {
+    this.onRender = onRender;
+    this.pending = false;
+    this.changes = 0;
+    this.window = win || window;
+};
+
+(function() {
+
+
+    this.schedule = function(change) {
+        this.changes = this.changes | change;
+        if (!this.pending && this.changes) {
+            this.pending = true;
+            var _self = this;
+            event.nextFrame(function() {
+                _self.pending = false;
+                var changes;
+                while (changes = _self.changes) {
+                    _self.changes = 0;
+                    _self.onRender(changes);
+                }
+            }, this.window);
+        }
+    };
+
+}).call(RenderLoop.prototype);
+
+exports.RenderLoop = RenderLoop;
+});
+
+define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"], function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var dom = require("../lib/dom");
+var lang = require("../lib/lang");
+var useragent = require("../lib/useragent");
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+
+var CHAR_COUNT = 0;
+
+var FontMetrics = exports.FontMetrics = function(parentEl) {
+    this.el = dom.createElement("div");
+    this.$setMeasureNodeStyles(this.el.style, true);
+    
+    this.$main = dom.createElement("div");
+    this.$setMeasureNodeStyles(this.$main.style);
+    
+    this.$measureNode = dom.createElement("div");
+    this.$setMeasureNodeStyles(this.$measureNode.style);
+    
+    
+    this.el.appendChild(this.$main);
+    this.el.appendChild(this.$measureNode);
+    parentEl.appendChild(this.el);
+    
+    if (!CHAR_COUNT)
+        this.$testFractionalRect();
+    this.$measureNode.innerHTML = lang.stringRepeat("X", CHAR_COUNT);
+    
+    this.$characterSize = {width: 0, height: 0};
+    this.checkForSizeChanges();
+};
+
+(function() {
+
+    oop.implement(this, EventEmitter);
+        
+    this.$characterSize = {width: 0, height: 0};
+    
+    this.$testFractionalRect = function() {
+        var el = dom.createElement("div");
+        this.$setMeasureNodeStyles(el.style);
+        el.style.width = "0.2px";
+        document.documentElement.appendChild(el);
+        var w = el.getBoundingClientRect().width;
+        if (w > 0 && w < 1)
+            CHAR_COUNT = 50;
+        else
+            CHAR_COUNT = 100;
+        el.parentNode.removeChild(el);
+    };
+    
+    this.$setMeasureNodeStyles = function(style, isRoot) {
+        style.width = style.height = "auto";
+        style.left = style.top = "0px";
+        style.visibility = "hidden";
+        style.position = "absolute";
+        style.whiteSpace = "pre";
+
+        if (useragent.isIE < 8) {
+            style["font-family"] = "inherit";
+        } else {
+            style.font = "inherit";
+        }
+        style.overflow = isRoot ? "hidden" : "visible";
+    };
+
+    this.checkForSizeChanges = function() {
+        var size = this.$measureSizes();
+        if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) {
+            this.$measureNode.style.fontWeight = "bold";
+            var boldSize = this.$measureSizes();
+            this.$measureNode.style.fontWeight = "";
+            this.$characterSize = size;
+            this.charSizes = Object.create(null);
+            this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height;
+            this._emit("changeCharacterSize", {data: size});
+        }
+    };
+
+    this.$pollSizeChanges = function() {
+        if (this.$pollSizeChangesTimer)
+            return this.$pollSizeChangesTimer;
+        var self = this;
+        return this.$pollSizeChangesTimer = setInterval(function() {
+            self.checkForSizeChanges();
+        }, 500);
+    };
+    
+    this.setPolling = function(val) {
+        if (val) {
+            this.$pollSizeChanges();
+        } else if (this.$pollSizeChangesTimer) {
+            clearInterval(this.$pollSizeChangesTimer);
+            this.$pollSizeChangesTimer = 0;
+        }
+    };
+
+    this.$measureSizes = function() {
+        if (CHAR_COUNT === 50) {
+            var rect = null;
+            try { 
+               rect = this.$measureNode.getBoundingClientRect();
+            } catch(e) {
+               rect = {width: 0, height:0 };
+            }
+            var size = {
+                height: rect.height,
+                width: rect.width / CHAR_COUNT
+            };
+        } else {
+            var size = {
+                height: this.$measureNode.clientHeight,
+                width: this.$measureNode.clientWidth / CHAR_COUNT
+            };
+        }
+        if (size.width === 0 || size.height === 0)
+            return null;
+        return size;
+    };
+
+    this.$measureCharWidth = function(ch) {
+        this.$main.innerHTML = lang.stringRepeat(ch, CHAR_COUNT);
+        var rect = this.$main.getBoundingClientRect();
+        return rect.width / CHAR_COUNT;
+    };
+    
+    this.getCharacterWidth = function(ch) {
+        var w = this.charSizes[ch];
+        if (w === undefined) {
+            w = this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width;
+        }
+        return w;
+    };
+
+    this.destroy = function() {
+        clearInterval(this.$pollSizeChangesTimer);
+        if (this.el && this.el.parentNode)
+            this.el.parentNode.removeChild(this.el);
+    };
+
+}).call(FontMetrics.prototype);
+
+});
+
+define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var dom = require("./lib/dom");
+var config = require("./config");
+var useragent = require("./lib/useragent");
+var GutterLayer = require("./layer/gutter").Gutter;
+var MarkerLayer = require("./layer/marker").Marker;
+var TextLayer = require("./layer/text").Text;
+var CursorLayer = require("./layer/cursor").Cursor;
+var HScrollBar = require("./scrollbar").HScrollBar;
+var VScrollBar = require("./scrollbar").VScrollBar;
+var RenderLoop = require("./renderloop").RenderLoop;
+var FontMetrics = require("./layer/font_metrics").FontMetrics;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var editorCss = ".ace_editor {\
+position: relative;\
+overflow: hidden;\
+font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;\
+direction: ltr;\
+}\
+.ace_scroller {\
+position: absolute;\
+overflow: hidden;\
+top: 0;\
+bottom: 0;\
+background-color: inherit;\
+-ms-user-select: none;\
+-moz-user-select: none;\
+-webkit-user-select: none;\
+user-select: none;\
+cursor: text;\
+}\
+.ace_content {\
+position: absolute;\
+-moz-box-sizing: border-box;\
+-webkit-box-sizing: border-box;\
+box-sizing: border-box;\
+min-width: 100%;\
+}\
+.ace_dragging .ace_scroller:before{\
+position: absolute;\
+top: 0;\
+left: 0;\
+right: 0;\
+bottom: 0;\
+content: '';\
+background: rgba(250, 250, 250, 0.01);\
+z-index: 1000;\
+}\
+.ace_dragging.ace_dark .ace_scroller:before{\
+background: rgba(0, 0, 0, 0.01);\
+}\
+.ace_selecting, .ace_selecting * {\
+cursor: text !important;\
+}\
+.ace_gutter {\
+position: absolute;\
+overflow : hidden;\
+width: auto;\
+top: 0;\
+bottom: 0;\
+left: 0;\
+cursor: default;\
+z-index: 4;\
+-ms-user-select: none;\
+-moz-user-select: none;\
+-webkit-user-select: none;\
+user-select: none;\
+}\
+.ace_gutter-active-line {\
+position: absolute;\
+left: 0;\
+right: 0;\
+}\
+.ace_scroller.ace_scroll-left {\
+box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\
+}\
+.ace_gutter-cell {\
+padding-left: 19px;\
+padding-right: 6px;\
+background-repeat: no-repeat;\
+}\
+.ace_gutter-cell.ace_error {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==\");\
+background-repeat: no-repeat;\
+background-position: 2px center;\
+}\
+.ace_gutter-cell.ace_warning {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==\");\
+background-position: 2px center;\
+}\
+.ace_gutter-cell.ace_info {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=\");\
+background-position: 2px center;\
+}\
+.ace_dark .ace_gutter-cell.ace_info {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC\");\
+}\
+.ace_scrollbar {\
+position: absolute;\
+right: 0;\
+bottom: 0;\
+z-index: 6;\
+}\
+.ace_scrollbar-inner {\
+position: absolute;\
+cursor: text;\
+left: 0;\
+top: 0;\
+}\
+.ace_scrollbar-v{\
+overflow-x: hidden;\
+overflow-y: scroll;\
+top: 0;\
+}\
+.ace_scrollbar-h {\
+overflow-x: scroll;\
+overflow-y: hidden;\
+left: 0;\
+}\
+.ace_print-margin {\
+position: absolute;\
+height: 100%;\
+}\
+.ace_text-input {\
+position: absolute;\
+z-index: 0;\
+width: 0.5em;\
+height: 1em;\
+opacity: 0;\
+background: transparent;\
+-moz-appearance: none;\
+appearance: none;\
+border: none;\
+resize: none;\
+outline: none;\
+overflow: hidden;\
+font: inherit;\
+padding: 0 1px;\
+margin: 0 -1px;\
+text-indent: -1em;\
+-ms-user-select: text;\
+-moz-user-select: text;\
+-webkit-user-select: text;\
+user-select: text;\
+white-space: pre!important;\
+}\
+.ace_text-input.ace_composition {\
+background: inherit;\
+color: inherit;\
+z-index: 1000;\
+opacity: 1;\
+text-indent: 0;\
+}\
+.ace_layer {\
+z-index: 1;\
+position: absolute;\
+overflow: hidden;\
+word-wrap: normal;\
+white-space: pre;\
+height: 100%;\
+width: 100%;\
+-moz-box-sizing: border-box;\
+-webkit-box-sizing: border-box;\
+box-sizing: border-box;\
+pointer-events: none;\
+}\
+.ace_gutter-layer {\
+position: relative;\
+width: auto;\
+text-align: right;\
+pointer-events: auto;\
+}\
+.ace_text-layer {\
+font: inherit !important;\
+}\
+.ace_cjk {\
+display: inline-block;\
+text-align: center;\
+}\
+.ace_cursor-layer {\
+z-index: 4;\
+}\
+.ace_cursor {\
+z-index: 4;\
+position: absolute;\
+-moz-box-sizing: border-box;\
+-webkit-box-sizing: border-box;\
+box-sizing: border-box;\
+border-left: 2px solid;\
+transform: translatez(0);\
+}\
+.ace_slim-cursors .ace_cursor {\
+border-left-width: 1px;\
+}\
+.ace_overwrite-cursors .ace_cursor {\
+border-left-width: 0;\
+border-bottom: 1px solid;\
+}\
+.ace_hidden-cursors .ace_cursor {\
+opacity: 0.2;\
+}\
+.ace_smooth-blinking .ace_cursor {\
+-webkit-transition: opacity 0.18s;\
+transition: opacity 0.18s;\
+}\
+.ace_editor.ace_multiselect .ace_cursor {\
+border-left-width: 1px;\
+}\
+.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\
+position: absolute;\
+z-index: 3;\
+}\
+.ace_marker-layer .ace_selection {\
+position: absolute;\
+z-index: 5;\
+}\
+.ace_marker-layer .ace_bracket {\
+position: absolute;\
+z-index: 6;\
+}\
+.ace_marker-layer .ace_active-line {\
+position: absolute;\
+z-index: 2;\
+}\
+.ace_marker-layer .ace_selected-word {\
+position: absolute;\
+z-index: 4;\
+-moz-box-sizing: border-box;\
+-webkit-box-sizing: border-box;\
+box-sizing: border-box;\
+}\
+.ace_line .ace_fold {\
+-moz-box-sizing: border-box;\
+-webkit-box-sizing: border-box;\
+box-sizing: border-box;\
+display: inline-block;\
+height: 11px;\
+margin-top: -2px;\
+vertical-align: middle;\
+background-image:\
+url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\
+url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=\");\
+background-repeat: no-repeat, repeat-x;\
+background-position: center center, top left;\
+color: transparent;\
+border: 1px solid black;\
+border-radius: 2px;\
+cursor: pointer;\
+pointer-events: auto;\
+}\
+.ace_dark .ace_fold {\
+}\
+.ace_fold:hover{\
+background-image:\
+url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\
+url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC\");\
+}\
+.ace_tooltip {\
+background-color: #FFF;\
+background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));\
+background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\
+border: 1px solid gray;\
+border-radius: 1px;\
+box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\
+color: black;\
+max-width: 100%;\
+padding: 3px 4px;\
+position: fixed;\
+z-index: 999999;\
+-moz-box-sizing: border-box;\
+-webkit-box-sizing: border-box;\
+box-sizing: border-box;\
+cursor: default;\
+white-space: pre;\
+word-wrap: break-word;\
+line-height: normal;\
+font-style: normal;\
+font-weight: normal;\
+letter-spacing: normal;\
+pointer-events: none;\
+}\
+.ace_folding-enabled > .ace_gutter-cell {\
+padding-right: 13px;\
+}\
+.ace_fold-widget {\
+-moz-box-sizing: border-box;\
+-webkit-box-sizing: border-box;\
+box-sizing: border-box;\
+margin: 0 -12px 0 1px;\
+display: none;\
+width: 11px;\
+vertical-align: top;\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==\");\
+background-repeat: no-repeat;\
+background-position: center;\
+border-radius: 3px;\
+border: 1px solid transparent;\
+cursor: pointer;\
+}\
+.ace_folding-enabled .ace_fold-widget {\
+display: inline-block;   \
+}\
+.ace_fold-widget.ace_end {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==\");\
+}\
+.ace_fold-widget.ace_closed {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==\");\
+}\
+.ace_fold-widget:hover {\
+border: 1px solid rgba(0, 0, 0, 0.3);\
+background-color: rgba(255, 255, 255, 0.2);\
+box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\
+}\
+.ace_fold-widget:active {\
+border: 1px solid rgba(0, 0, 0, 0.4);\
+background-color: rgba(0, 0, 0, 0.05);\
+box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\
+}\
+.ace_dark .ace_fold-widget {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\");\
+}\
+.ace_dark .ace_fold-widget.ace_end {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\");\
+}\
+.ace_dark .ace_fold-widget.ace_closed {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\");\
+}\
+.ace_dark .ace_fold-widget:hover {\
+box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\
+background-color: rgba(255, 255, 255, 0.1);\
+}\
+.ace_dark .ace_fold-widget:active {\
+box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\
+}\
+.ace_fold-widget.ace_invalid {\
+background-color: #FFB4B4;\
+border-color: #DE5555;\
+}\
+.ace_fade-fold-widgets .ace_fold-widget {\
+-webkit-transition: opacity 0.4s ease 0.05s;\
+transition: opacity 0.4s ease 0.05s;\
+opacity: 0;\
+}\
+.ace_fade-fold-widgets:hover .ace_fold-widget {\
+-webkit-transition: opacity 0.05s ease 0.05s;\
+transition: opacity 0.05s ease 0.05s;\
+opacity:1;\
+}\
+.ace_underline {\
+text-decoration: underline;\
+}\
+.ace_bold {\
+font-weight: bold;\
+}\
+.ace_nobold .ace_bold {\
+font-weight: normal;\
+}\
+.ace_italic {\
+font-style: italic;\
+}\
+.ace_error-marker {\
+background-color: rgba(255, 0, 0,0.2);\
+position: absolute;\
+z-index: 9;\
+}\
+.ace_highlight-marker {\
+background-color: rgba(255, 255, 0,0.2);\
+position: absolute;\
+z-index: 8;\
+}\
+.ace_br1 {border-top-left-radius    : 3px;}\
+.ace_br2 {border-top-right-radius   : 3px;}\
+.ace_br3 {border-top-left-radius    : 3px; border-top-right-radius:    3px;}\
+.ace_br4 {border-bottom-right-radius: 3px;}\
+.ace_br5 {border-top-left-radius    : 3px; border-bottom-right-radius: 3px;}\
+.ace_br6 {border-top-right-radius   : 3px; border-bottom-right-radius: 3px;}\
+.ace_br7 {border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px;}\
+.ace_br8 {border-bottom-left-radius : 3px;}\
+.ace_br9 {border-top-left-radius    : 3px; border-bottom-left-radius:  3px;}\
+.ace_br10{border-top-right-radius   : 3px; border-bottom-left-radius:  3px;}\
+.ace_br11{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-left-radius:  3px;}\
+.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}\
+.ace_br13{border-top-left-radius    : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}\
+.ace_br14{border-top-right-radius   : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}\
+.ace_br15{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\
+";
+
+dom.importCssString(editorCss, "ace_editor.css");
+
+var VirtualRenderer = function(container, theme) {
+    var _self = this;
+
+    this.container = container || dom.createElement("div");
+    this.$keepTextAreaAtCursor = !useragent.isOldIE;
+
+    dom.addCssClass(this.container, "ace_editor");
+
+    this.setTheme(theme);
+
+    this.$gutter = dom.createElement("div");
+    this.$gutter.className = "ace_gutter";
+    this.container.appendChild(this.$gutter);
+
+    this.scroller = dom.createElement("div");
+    this.scroller.className = "ace_scroller";
+    this.container.appendChild(this.scroller);
+
+    this.content = dom.createElement("div");
+    this.content.className = "ace_content";
+    this.scroller.appendChild(this.content);
+
+    this.$gutterLayer = new GutterLayer(this.$gutter);
+    this.$gutterLayer.on("changeGutterWidth", this.onGutterResize.bind(this));
+
+    this.$markerBack = new MarkerLayer(this.content);
+
+    var textLayer = this.$textLayer = new TextLayer(this.content);
+    this.canvas = textLayer.element;
+
+    this.$markerFront = new MarkerLayer(this.content);
+
+    this.$cursorLayer = new CursorLayer(this.content);
+    this.$horizScroll = false;
+    this.$vScroll = false;
+
+    this.scrollBar = 
+    this.scrollBarV = new VScrollBar(this.container, this);
+    this.scrollBarH = new HScrollBar(this.container, this);
+    this.scrollBarV.addEventListener("scroll", function(e) {
+        if (!_self.$scrollAnimation)
+            _self.session.setScrollTop(e.data - _self.scrollMargin.top);
+    });
+    this.scrollBarH.addEventListener("scroll", function(e) {
+        if (!_self.$scrollAnimation)
+            _self.session.setScrollLeft(e.data - _self.scrollMargin.left);
+    });
+
+    this.scrollTop = 0;
+    this.scrollLeft = 0;
+
+    this.cursorPos = {
+        row : 0,
+        column : 0
+    };
+
+    this.$fontMetrics = new FontMetrics(this.container);
+    this.$textLayer.$setFontMetrics(this.$fontMetrics);
+    this.$textLayer.addEventListener("changeCharacterSize", function(e) {
+        _self.updateCharacterSize();
+        _self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height);
+        _self._signal("changeCharacterSize", e);
+    });
+
+    this.$size = {
+        width: 0,
+        height: 0,
+        scrollerHeight: 0,
+        scrollerWidth: 0,
+        $dirty: true
+    };
+
+    this.layerConfig = {
+        width : 1,
+        padding : 0,
+        firstRow : 0,
+        firstRowScreen: 0,
+        lastRow : 0,
+        lineHeight : 0,
+        characterWidth : 0,
+        minHeight : 1,
+        maxHeight : 1,
+        offset : 0,
+        height : 1,
+        gutterOffset: 1
+    };
+    
+    this.scrollMargin = {
+        left: 0,
+        right: 0,
+        top: 0,
+        bottom: 0,
+        v: 0,
+        h: 0
+    };
+
+    this.$loop = new RenderLoop(
+        this.$renderChanges.bind(this),
+        this.container.ownerDocument.defaultView
+    );
+    this.$loop.schedule(this.CHANGE_FULL);
+
+    this.updateCharacterSize();
+    this.setPadding(4);
+    config.resetOptions(this);
+    config._emit("renderer", this);
+};
+
+(function() {
+
+    this.CHANGE_CURSOR = 1;
+    this.CHANGE_MARKER = 2;
+    this.CHANGE_GUTTER = 4;
+    this.CHANGE_SCROLL = 8;
+    this.CHANGE_LINES = 16;
+    this.CHANGE_TEXT = 32;
+    this.CHANGE_SIZE = 64;
+    this.CHANGE_MARKER_BACK = 128;
+    this.CHANGE_MARKER_FRONT = 256;
+    this.CHANGE_FULL = 512;
+    this.CHANGE_H_SCROLL = 1024;
+
+    oop.implement(this, EventEmitter);
+
+    this.updateCharacterSize = function() {
+        if (this.$textLayer.allowBoldFonts != this.$allowBoldFonts) {
+            this.$allowBoldFonts = this.$textLayer.allowBoldFonts;
+            this.setStyle("ace_nobold", !this.$allowBoldFonts);
+        }
+
+        this.layerConfig.characterWidth =
+        this.characterWidth = this.$textLayer.getCharacterWidth();
+        this.layerConfig.lineHeight =
+        this.lineHeight = this.$textLayer.getLineHeight();
+        this.$updatePrintMargin();
+    };
+    this.setSession = function(session) {
+        if (this.session)
+            this.session.doc.off("changeNewLineMode", this.onChangeNewLineMode);
+            
+        this.session = session;
+        if (session && this.scrollMargin.top && session.getScrollTop() <= 0)
+            session.setScrollTop(-this.scrollMargin.top);
+
+        this.$cursorLayer.setSession(session);
+        this.$markerBack.setSession(session);
+        this.$markerFront.setSession(session);
+        this.$gutterLayer.setSession(session);
+        this.$textLayer.setSession(session);
+        if (!session)
+            return;
+        
+        this.$loop.schedule(this.CHANGE_FULL);
+        this.session.$setFontMetrics(this.$fontMetrics);
+        
+        this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this);
+        this.onChangeNewLineMode()
+        this.session.doc.on("changeNewLineMode", this.onChangeNewLineMode);
+    };
+    this.updateLines = function(firstRow, lastRow, force) {
+        if (lastRow === undefined)
+            lastRow = Infinity;
+
+        if (!this.$changedLines) {
+            this.$changedLines = {
+                firstRow: firstRow,
+                lastRow: lastRow
+            };
+        }
+        else {
+            if (this.$changedLines.firstRow > firstRow)
+                this.$changedLines.firstRow = firstRow;
+
+            if (this.$changedLines.lastRow < lastRow)
+                this.$changedLines.lastRow = lastRow;
+        }
+        if (this.$changedLines.lastRow < this.layerConfig.firstRow) {
+            if (force)
+                this.$changedLines.lastRow = this.layerConfig.lastRow;
+            else
+                return;
+        }
+        if (this.$changedLines.firstRow > this.layerConfig.lastRow)
+            return;
+        this.$loop.schedule(this.CHANGE_LINES);
+    };
+
+    this.onChangeNewLineMode = function() {
+        this.$loop.schedule(this.CHANGE_TEXT);
+        this.$textLayer.$updateEolChar();
+    };
+    
+    this.onChangeTabSize = function() {
+        this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER);
+        this.$textLayer.onChangeTabSize();
+    };
+    this.updateText = function() {
+        this.$loop.schedule(this.CHANGE_TEXT);
+    };
+    this.updateFull = function(force) {
+        if (force)
+            this.$renderChanges(this.CHANGE_FULL, true);
+        else
+            this.$loop.schedule(this.CHANGE_FULL);
+    };
+    this.updateFontSize = function() {
+        this.$textLayer.checkForSizeChanges();
+    };
+
+    this.$changes = 0;
+    this.$updateSizeAsync = function() {
+        if (this.$loop.pending)
+            this.$size.$dirty = true;
+        else
+            this.onResize();
+    };
+    this.onResize = function(force, gutterWidth, width, height) {
+        if (this.resizing > 2)
+            return;
+        else if (this.resizing > 0)
+            this.resizing++;
+        else
+            this.resizing = force ? 1 : 0;
+        var el = this.container;
+        if (!height)
+            height = el.clientHeight || el.scrollHeight;
+        if (!width)
+            width = el.clientWidth || el.scrollWidth;
+        var changes = this.$updateCachedSize(force, gutterWidth, width, height);
+
+        
+        if (!this.$size.scrollerHeight || (!width && !height))
+            return this.resizing = 0;
+
+        if (force)
+            this.$gutterLayer.$padding = null;
+
+        if (force)
+            this.$renderChanges(changes | this.$changes, true);
+        else
+            this.$loop.schedule(changes | this.$changes);
+
+        if (this.resizing)
+            this.resizing = 0;
+        this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null;
+    };
+    
+    this.$updateCachedSize = function(force, gutterWidth, width, height) {
+        height -= (this.$extraHeight || 0);
+        var changes = 0;
+        var size = this.$size;
+        var oldSize = {
+            width: size.width,
+            height: size.height,
+            scrollerHeight: size.scrollerHeight,
+            scrollerWidth: size.scrollerWidth
+        };
+        if (height && (force || size.height != height)) {
+            size.height = height;
+            changes |= this.CHANGE_SIZE;
+
+            size.scrollerHeight = size.height;
+            if (this.$horizScroll)
+                size.scrollerHeight -= this.scrollBarH.getHeight();
+            this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + "px";
+
+            changes = changes | this.CHANGE_SCROLL;
+        }
+
+        if (width && (force || size.width != width)) {
+            changes |= this.CHANGE_SIZE;
+            size.width = width;
+            
+            if (gutterWidth == null)
+                gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;
+            
+            this.gutterWidth = gutterWidth;
+            
+            this.scrollBarH.element.style.left = 
+            this.scroller.style.left = gutterWidth + "px";
+            size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth());           
+            
+            this.scrollBarH.element.style.right = 
+            this.scroller.style.right = this.scrollBarV.getWidth() + "px";
+            this.scroller.style.bottom = this.scrollBarH.getHeight() + "px";
+
+            if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force)
+                changes |= this.CHANGE_FULL;
+        }
+        
+        size.$dirty = !width || !height;
+
+        if (changes)
+            this._signal("resize", oldSize);
+
+        return changes;
+    };
+
+    this.onGutterResize = function() {
+        var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;
+        if (gutterWidth != this.gutterWidth)
+            this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height);
+
+        if (this.session.getUseWrapMode() && this.adjustWrapLimit()) {
+            this.$loop.schedule(this.CHANGE_FULL);
+        } else if (this.$size.$dirty) {
+            this.$loop.schedule(this.CHANGE_FULL);
+        } else {
+            this.$computeLayerConfig();
+            this.$loop.schedule(this.CHANGE_MARKER);
+        }
+    };
+    this.adjustWrapLimit = function() {
+        var availableWidth = this.$size.scrollerWidth - this.$padding * 2;
+        var limit = Math.floor(availableWidth / this.characterWidth);
+        return this.session.adjustWrapLimit(limit, this.$showPrintMargin && this.$printMarginColumn);
+    };
+    this.setAnimatedScroll = function(shouldAnimate){
+        this.setOption("animatedScroll", shouldAnimate);
+    };
+    this.getAnimatedScroll = function() {
+        return this.$animatedScroll;
+    };
+    this.setShowInvisibles = function(showInvisibles) {
+        this.setOption("showInvisibles", showInvisibles);
+    };
+    this.getShowInvisibles = function() {
+        return this.getOption("showInvisibles");
+    };
+    this.getDisplayIndentGuides = function() {
+        return this.getOption("displayIndentGuides");
+    };
+
+    this.setDisplayIndentGuides = function(display) {
+        this.setOption("displayIndentGuides", display);
+    };
+    this.setShowPrintMargin = function(showPrintMargin) {
+        this.setOption("showPrintMargin", showPrintMargin);
+    };
+    this.getShowPrintMargin = function() {
+        return this.getOption("showPrintMargin");
+    };
+    this.setPrintMarginColumn = function(showPrintMargin) {
+        this.setOption("printMarginColumn", showPrintMargin);
+    };
+    this.getPrintMarginColumn = function() {
+        return this.getOption("printMarginColumn");
+    };
+    this.getShowGutter = function(){
+        return this.getOption("showGutter");
+    };
+    this.setShowGutter = function(show){
+        return this.setOption("showGutter", show);
+    };
+
+    this.getFadeFoldWidgets = function(){
+        return this.getOption("fadeFoldWidgets")
+    };
+
+    this.setFadeFoldWidgets = function(show) {
+        this.setOption("fadeFoldWidgets", show);
+    };
+
+    this.setHighlightGutterLine = function(shouldHighlight) {
+        this.setOption("highlightGutterLine", shouldHighlight);
+    };
+
+    this.getHighlightGutterLine = function() {
+        return this.getOption("highlightGutterLine");
+    };
+
+    this.$updateGutterLineHighlight = function() {
+        var pos = this.$cursorLayer.$pixelPos;
+        var height = this.layerConfig.lineHeight;
+        if (this.session.getUseWrapMode()) {
+            var cursor = this.session.selection.getCursor();
+            cursor.column = 0;
+            pos = this.$cursorLayer.getPixelPosition(cursor, true);
+            height *= this.session.getRowLength(cursor.row);
+        }
+        this.$gutterLineHighlight.style.top = pos.top - this.layerConfig.offset + "px";
+        this.$gutterLineHighlight.style.height = height + "px";
+    };
+
+    this.$updatePrintMargin = function() {
+        if (!this.$showPrintMargin && !this.$printMarginEl)
+            return;
+
+        if (!this.$printMarginEl) {
+            var containerEl = dom.createElement("div");
+            containerEl.className = "ace_layer ace_print-margin-layer";
+            this.$printMarginEl = dom.createElement("div");
+            this.$printMarginEl.className = "ace_print-margin";
+            containerEl.appendChild(this.$printMarginEl);
+            this.content.insertBefore(containerEl, this.content.firstChild);
+        }
+
+        var style = this.$printMarginEl.style;
+        style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding) + "px";
+        style.visibility = this.$showPrintMargin ? "visible" : "hidden";
+        
+        if (this.session && this.session.$wrap == -1)
+            this.adjustWrapLimit();
+    };
+    this.getContainerElement = function() {
+        return this.container;
+    };
+    this.getMouseEventTarget = function() {
+        return this.scroller;
+    };
+    this.getTextAreaContainer = function() {
+        return this.container;
+    };
+    this.$moveTextAreaToCursor = function() {
+        if (!this.$keepTextAreaAtCursor)
+            return;
+        var config = this.layerConfig;
+        var posTop = this.$cursorLayer.$pixelPos.top;
+        var posLeft = this.$cursorLayer.$pixelPos.left;
+        posTop -= config.offset;
+
+        var style = this.textarea.style;
+        var h = this.lineHeight;
+        if (posTop < 0 || posTop > config.height - h) {
+            style.top = style.left = "0";
+            return;
+        }
+
+        var w = this.characterWidth;
+        if (this.$composition) {
+            var val = this.textarea.value.replace(/^\x01+/, "");
+            w *= (this.session.$getStringScreenWidth(val)[0]+2);
+            h += 2;
+        }
+        posLeft -= this.scrollLeft;
+        if (posLeft > this.$size.scrollerWidth - w)
+            posLeft = this.$size.scrollerWidth - w;
+
+        posLeft += this.gutterWidth;
+        style.height = h + "px";
+        style.width = w + "px";
+        style.left = Math.min(posLeft, this.$size.scrollerWidth - w) + "px";
+        style.top = Math.min(posTop, this.$size.height - h) + "px";
+    };
+    this.getFirstVisibleRow = function() {
+        return this.layerConfig.firstRow;
+    };
+    this.getFirstFullyVisibleRow = function() {
+        return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1);
+    };
+    this.getLastFullyVisibleRow = function() {
+        var config = this.layerConfig;
+        var lastRow = config.lastRow
+        var top = this.session.documentToScreenRow(lastRow, 0) * config.lineHeight;
+        if (top - this.session.getScrollTop() > config.height - config.lineHeight)
+            return lastRow - 1;
+        return lastRow;
+    };
+    this.getLastVisibleRow = function() {
+        return this.layerConfig.lastRow;
+    };
+
+    this.$padding = null;
+    this.setPadding = function(padding) {
+        this.$padding = padding;
+        this.$textLayer.setPadding(padding);
+        this.$cursorLayer.setPadding(padding);
+        this.$markerFront.setPadding(padding);
+        this.$markerBack.setPadding(padding);
+        this.$loop.schedule(this.CHANGE_FULL);
+        this.$updatePrintMargin();
+    };
+    
+    this.setScrollMargin = function(top, bottom, left, right) {
+        var sm = this.scrollMargin;
+        sm.top = top|0;
+        sm.bottom = bottom|0;
+        sm.right = right|0;
+        sm.left = left|0;
+        sm.v = sm.top + sm.bottom;
+        sm.h = sm.left + sm.right;
+        if (sm.top && this.scrollTop <= 0 && this.session)
+            this.session.setScrollTop(-sm.top);
+        this.updateFull();
+    };
+    this.getHScrollBarAlwaysVisible = function() {
+        return this.$hScrollBarAlwaysVisible;
+    };
+    this.setHScrollBarAlwaysVisible = function(alwaysVisible) {
+        this.setOption("hScrollBarAlwaysVisible", alwaysVisible);
+    };
+    this.getVScrollBarAlwaysVisible = function() {
+        return this.$vScrollBarAlwaysVisible;
+    };
+    this.setVScrollBarAlwaysVisible = function(alwaysVisible) {
+        this.setOption("vScrollBarAlwaysVisible", alwaysVisible);
+    };
+
+    this.$updateScrollBarV = function() {
+        var scrollHeight = this.layerConfig.maxHeight;
+        var scrollerHeight = this.$size.scrollerHeight;
+        if (!this.$maxLines && this.$scrollPastEnd) {
+            scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd;
+            if (this.scrollTop > scrollHeight - scrollerHeight) {
+                scrollHeight = this.scrollTop + scrollerHeight;
+                this.scrollBarV.scrollTop = null;
+            }
+        }
+        this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v);
+        this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top);
+    };
+    this.$updateScrollBarH = function() {
+        this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h);
+        this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left);
+    };
+    
+    this.$frozen = false;
+    this.freeze = function() {
+        this.$frozen = true;
+    };
+    
+    this.unfreeze = function() {
+        this.$frozen = false;
+    };
+
+    this.$renderChanges = function(changes, force) {
+        if (this.$changes) {
+            changes |= this.$changes;
+            this.$changes = 0;
+        }
+        if ((!this.session || !this.container.offsetWidth || this.$frozen) || (!changes && !force)) {
+            this.$changes |= changes;
+            return; 
+        } 
+        if (this.$size.$dirty) {
+            this.$changes |= changes;
+            return this.onResize(true);
+        }
+        if (!this.lineHeight) {
+            this.$textLayer.checkForSizeChanges();
+        }
+        
+        this._signal("beforeRender");
+        var config = this.layerConfig;
+        if (changes & this.CHANGE_FULL ||
+            changes & this.CHANGE_SIZE ||
+            changes & this.CHANGE_TEXT ||
+            changes & this.CHANGE_LINES ||
+            changes & this.CHANGE_SCROLL ||
+            changes & this.CHANGE_H_SCROLL
+        ) {
+            changes |= this.$computeLayerConfig();
+            if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) {
+                var st = this.scrollTop + (config.firstRow - this.layerConfig.firstRow) * this.lineHeight;
+                if (st > 0) {
+                    this.scrollTop = st;
+                    changes = changes | this.CHANGE_SCROLL;
+                    changes |= this.$computeLayerConfig();
+                }
+            }
+            config = this.layerConfig;
+            this.$updateScrollBarV();
+            if (changes & this.CHANGE_H_SCROLL)
+                this.$updateScrollBarH();
+            this.$gutterLayer.element.style.marginTop = (-config.offset) + "px";
+            this.content.style.marginTop = (-config.offset) + "px";
+            this.content.style.width = config.width + 2 * this.$padding + "px";
+            this.content.style.height = config.minHeight + "px";
+        }
+        if (changes & this.CHANGE_H_SCROLL) {
+            this.content.style.marginLeft = -this.scrollLeft + "px";
+            this.scroller.className = this.scrollLeft <= 0 ? "ace_scroller" : "ace_scroller ace_scroll-left";
+        }
+        if (changes & this.CHANGE_FULL) {
+            this.$textLayer.update(config);
+            if (this.$showGutter)
+                this.$gutterLayer.update(config);
+            this.$markerBack.update(config);
+            this.$markerFront.update(config);
+            this.$cursorLayer.update(config);
+            this.$moveTextAreaToCursor();
+            this.$highlightGutterLine && this.$updateGutterLineHighlight();
+            this._signal("afterRender");
+            return;
+        }
+        if (changes & this.CHANGE_SCROLL) {
+            if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
+                this.$textLayer.update(config);
+            else
+                this.$textLayer.scrollLines(config);
+
+            if (this.$showGutter)
+                this.$gutterLayer.update(config);
+            this.$markerBack.update(config);
+            this.$markerFront.update(config);
+            this.$cursorLayer.update(config);
+            this.$highlightGutterLine && this.$updateGutterLineHighlight();
+            this.$moveTextAreaToCursor();
+            this._signal("afterRender");
+            return;
+        }
+
+        if (changes & this.CHANGE_TEXT) {
+            this.$textLayer.update(config);
+            if (this.$showGutter)
+                this.$gutterLayer.update(config);
+        }
+        else if (changes & this.CHANGE_LINES) {
+            if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter)
+                this.$gutterLayer.update(config);
+        }
+        else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) {
+            if (this.$showGutter)
+                this.$gutterLayer.update(config);
+        }
+
+        if (changes & this.CHANGE_CURSOR) {
+            this.$cursorLayer.update(config);
+            this.$moveTextAreaToCursor();
+            this.$highlightGutterLine && this.$updateGutterLineHighlight();
+        }
+
+        if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) {
+            this.$markerFront.update(config);
+        }
+
+        if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) {
+            this.$markerBack.update(config);
+        }
+
+        this._signal("afterRender");
+    };
+
+    
+    this.$autosize = function() {
+        var height = this.session.getScreenLength() * this.lineHeight;
+        var maxHeight = this.$maxLines * this.lineHeight;
+        var desiredHeight = Math.min(maxHeight, 
+            Math.max((this.$minLines || 1) * this.lineHeight, height)
+        ) + this.scrollMargin.v + (this.$extraHeight || 0);
+        if (this.$horizScroll)
+            desiredHeight += this.scrollBarH.getHeight();
+        if (this.$maxPixelHeight && desiredHeight > this.$maxPixelHeight)
+            desiredHeight = this.$maxPixelHeight;
+        var vScroll = height > maxHeight;
+        
+        if (desiredHeight != this.desiredHeight ||
+            this.$size.height != this.desiredHeight || vScroll != this.$vScroll) {
+            if (vScroll != this.$vScroll) {
+                this.$vScroll = vScroll;
+                this.scrollBarV.setVisible(vScroll);
+            }
+            
+            var w = this.container.clientWidth;
+            this.container.style.height = desiredHeight + "px";
+            this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight);
+            this.desiredHeight = desiredHeight;
+            
+            this._signal("autosize");
+        }
+    };
+    
+    this.$computeLayerConfig = function() {
+        var session = this.session;
+        var size = this.$size;
+        
+        var hideScrollbars = size.height <= 2 * this.lineHeight;
+        var screenLines = this.session.getScreenLength();
+        var maxHeight = screenLines * this.lineHeight;
+
+        var longestLine = this.$getLongestLine();
+        
+        var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible ||
+            size.scrollerWidth - longestLine - 2 * this.$padding < 0);
+
+        var hScrollChanged = this.$horizScroll !== horizScroll;
+        if (hScrollChanged) {
+            this.$horizScroll = horizScroll;
+            this.scrollBarH.setVisible(horizScroll);
+        }
+        var vScrollBefore = this.$vScroll; // autosize can change vscroll value in which case we need to update longestLine
+        if (this.$maxLines && this.lineHeight > 1)
+            this.$autosize();
+
+        var offset = this.scrollTop % this.lineHeight;
+        var minHeight = size.scrollerHeight + this.lineHeight;
+        
+        var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd
+            ? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd
+            : 0;
+        maxHeight += scrollPastEnd;
+        
+        var sm = this.scrollMargin;
+        this.session.setScrollTop(Math.max(-sm.top,
+            Math.min(this.scrollTop, maxHeight - size.scrollerHeight + sm.bottom)));
+
+        this.session.setScrollLeft(Math.max(-sm.left, Math.min(this.scrollLeft, 
+            longestLine + 2 * this.$padding - size.scrollerWidth + sm.right)));
+        
+        var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible ||
+            size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop > sm.top);
+        var vScrollChanged = vScrollBefore !== vScroll;
+        if (vScrollChanged) {
+            this.$vScroll = vScroll;
+            this.scrollBarV.setVisible(vScroll);
+        }
+
+        var lineCount = Math.ceil(minHeight / this.lineHeight) - 1;
+        var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));
+        var lastRow = firstRow + lineCount;
+        var firstRowScreen, firstRowHeight;
+        var lineHeight = this.lineHeight;
+        firstRow = session.screenToDocumentRow(firstRow, 0);
+        var foldLine = session.getFoldLine(firstRow);
+        if (foldLine) {
+            firstRow = foldLine.start.row;
+        }
+
+        firstRowScreen = session.documentToScreenRow(firstRow, 0);
+        firstRowHeight = session.getRowLength(firstRow) * lineHeight;
+
+        lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1);
+        minHeight = size.scrollerHeight + session.getRowLength(lastRow) * lineHeight +
+                                                firstRowHeight;
+
+        offset = this.scrollTop - firstRowScreen * lineHeight;
+
+        var changes = 0;
+        if (this.layerConfig.width != longestLine) 
+            changes = this.CHANGE_H_SCROLL;
+        if (hScrollChanged || vScrollChanged) {
+            changes = this.$updateCachedSize(true, this.gutterWidth, size.width, size.height);
+            this._signal("scrollbarVisibilityChanged");
+            if (vScrollChanged)
+                longestLine = this.$getLongestLine();
+        }
+        
+        this.layerConfig = {
+            width : longestLine,
+            padding : this.$padding,
+            firstRow : firstRow,
+            firstRowScreen: firstRowScreen,
+            lastRow : lastRow,
+            lineHeight : lineHeight,
+            characterWidth : this.characterWidth,
+            minHeight : minHeight,
+            maxHeight : maxHeight,
+            offset : offset,
+            gutterOffset : Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)),
+            height : this.$size.scrollerHeight
+        };
+
+        return changes;
+    };
+
+    this.$updateLines = function() {
+        var firstRow = this.$changedLines.firstRow;
+        var lastRow = this.$changedLines.lastRow;
+        this.$changedLines = null;
+
+        var layerConfig = this.layerConfig;
+
+        if (firstRow > layerConfig.lastRow + 1) { return; }
+        if (lastRow < layerConfig.firstRow) { return; }
+        if (lastRow === Infinity) {
+            if (this.$showGutter)
+                this.$gutterLayer.update(layerConfig);
+            this.$textLayer.update(layerConfig);
+            return;
+        }
+        this.$textLayer.updateLines(layerConfig, firstRow, lastRow);
+        return true;
+    };
+
+    this.$getLongestLine = function() {
+        var charCount = this.session.getScreenWidth();
+        if (this.showInvisibles && !this.session.$useWrapMode)
+            charCount += 1;
+
+        return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth));
+    };
+    this.updateFrontMarkers = function() {
+        this.$markerFront.setMarkers(this.session.getMarkers(true));
+        this.$loop.schedule(this.CHANGE_MARKER_FRONT);
+    };
+    this.updateBackMarkers = function() {
+        this.$markerBack.setMarkers(this.session.getMarkers());
+        this.$loop.schedule(this.CHANGE_MARKER_BACK);
+    };
+    this.addGutterDecoration = function(row, className){
+        this.$gutterLayer.addGutterDecoration(row, className);
+    };
+    this.removeGutterDecoration = function(row, className){
+        this.$gutterLayer.removeGutterDecoration(row, className);
+    };
+    this.updateBreakpoints = function(rows) {
+        this.$loop.schedule(this.CHANGE_GUTTER);
+    };
+    this.setAnnotations = function(annotations) {
+        this.$gutterLayer.setAnnotations(annotations);
+        this.$loop.schedule(this.CHANGE_GUTTER);
+    };
+    this.updateCursor = function() {
+        this.$loop.schedule(this.CHANGE_CURSOR);
+    };
+    this.hideCursor = function() {
+        this.$cursorLayer.hideCursor();
+    };
+    this.showCursor = function() {
+        this.$cursorLayer.showCursor();
+    };
+
+    this.scrollSelectionIntoView = function(anchor, lead, offset) {
+        this.scrollCursorIntoView(anchor, offset);
+        this.scrollCursorIntoView(lead, offset);
+    };
+    this.scrollCursorIntoView = function(cursor, offset, $viewMargin) {
+        if (this.$size.scrollerHeight === 0)
+            return;
+
+        var pos = this.$cursorLayer.getPixelPosition(cursor);
+
+        var left = pos.left;
+        var top = pos.top;
+        
+        var topMargin = $viewMargin && $viewMargin.top || 0;
+        var bottomMargin = $viewMargin && $viewMargin.bottom || 0;
+        
+        var scrollTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop;
+        
+        if (scrollTop + topMargin > top) {
+            if (offset && scrollTop + topMargin > top + this.lineHeight)
+                top -= offset * this.$size.scrollerHeight;
+            if (top === 0)
+                top = -this.scrollMargin.top;
+            this.session.setScrollTop(top);
+        } else if (scrollTop + this.$size.scrollerHeight - bottomMargin < top + this.lineHeight) {
+            if (offset && scrollTop + this.$size.scrollerHeight - bottomMargin < top -  this.lineHeight)
+                top += offset * this.$size.scrollerHeight;
+            this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight);
+        }
+
+        var scrollLeft = this.scrollLeft;
+
+        if (scrollLeft > left) {
+            if (left < this.$padding + 2 * this.layerConfig.characterWidth)
+                left = -this.scrollMargin.left;
+            this.session.setScrollLeft(left);
+        } else if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) {
+            this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth));
+        } else if (scrollLeft <= this.$padding && left - scrollLeft < this.characterWidth) {
+            this.session.setScrollLeft(0);
+        }
+    };
+    this.getScrollTop = function() {
+        return this.session.getScrollTop();
+    };
+    this.getScrollLeft = function() {
+        return this.session.getScrollLeft();
+    };
+    this.getScrollTopRow = function() {
+        return this.scrollTop / this.lineHeight;
+    };
+    this.getScrollBottomRow = function() {
+        return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1);
+    };
+    this.scrollToRow = function(row) {
+        this.session.setScrollTop(row * this.lineHeight);
+    };
+
+    this.alignCursor = function(cursor, alignment) {
+        if (typeof cursor == "number")
+            cursor = {row: cursor, column: 0};
+
+        var pos = this.$cursorLayer.getPixelPosition(cursor);
+        var h = this.$size.scrollerHeight - this.lineHeight;
+        var offset = pos.top - h * (alignment || 0);
+
+        this.session.setScrollTop(offset);
+        return offset;
+    };
+
+    this.STEPS = 8;
+    this.$calcSteps = function(fromValue, toValue){
+        var i = 0;
+        var l = this.STEPS;
+        var steps = [];
+
+        var func  = function(t, x_min, dx) {
+            return dx * (Math.pow(t - 1, 3) + 1) + x_min;
+        };
+
+        for (i = 0; i < l; ++i)
+            steps.push(func(i / this.STEPS, fromValue, toValue - fromValue));
+
+        return steps;
+    };
+    this.scrollToLine = function(line, center, animate, callback) {
+        var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0});
+        var offset = pos.top;
+        if (center)
+            offset -= this.$size.scrollerHeight / 2;
+
+        var initialScroll = this.scrollTop;
+        this.session.setScrollTop(offset);
+        if (animate !== false)
+            this.animateScrolling(initialScroll, callback);
+    };
+
+    this.animateScrolling = function(fromValue, callback) {
+        var toValue = this.scrollTop;
+        if (!this.$animatedScroll)
+            return;
+        var _self = this;
+        
+        if (fromValue == toValue)
+            return;
+        
+        if (this.$scrollAnimation) {
+            var oldSteps = this.$scrollAnimation.steps;
+            if (oldSteps.length) {
+                fromValue = oldSteps[0];
+                if (fromValue == toValue)
+                    return;
+            }
+        }
+        
+        var steps = _self.$calcSteps(fromValue, toValue);
+        this.$scrollAnimation = {from: fromValue, to: toValue, steps: steps};
+
+        clearInterval(this.$timer);
+
+        _self.session.setScrollTop(steps.shift());
+        _self.session.$scrollTop = toValue;
+        this.$timer = setInterval(function() {
+            if (steps.length) {
+                _self.session.setScrollTop(steps.shift());
+                _self.session.$scrollTop = toValue;
+            } else if (toValue != null) {
+                _self.session.$scrollTop = -1;
+                _self.session.setScrollTop(toValue);
+                toValue = null;
+            } else {
+                _self.$timer = clearInterval(_self.$timer);
+                _self.$scrollAnimation = null;
+                callback && callback();
+            }
+        }, 10);
+    };
+    this.scrollToY = function(scrollTop) {
+        if (this.scrollTop !== scrollTop) {
+            this.$loop.schedule(this.CHANGE_SCROLL);
+            this.scrollTop = scrollTop;
+        }
+    };
+    this.scrollToX = function(scrollLeft) {
+        if (this.scrollLeft !== scrollLeft)
+            this.scrollLeft = scrollLeft;
+        this.$loop.schedule(this.CHANGE_H_SCROLL);
+    };
+    this.scrollTo = function(x, y) {
+        this.session.setScrollTop(y);
+        this.session.setScrollLeft(y);
+    };
+    this.scrollBy = function(deltaX, deltaY) {
+        deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY);
+        deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX);
+    };
+    this.isScrollableBy = function(deltaX, deltaY) {
+        if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top)
+           return true;
+        if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight
+            - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom)
+           return true;
+        if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left)
+            return true;
+        if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth
+            - this.layerConfig.width < -1 + this.scrollMargin.right)
+           return true;
+    };
+
+    this.pixelToScreenCoordinates = function(x, y) {
+        var canvasPos = this.scroller.getBoundingClientRect();
+
+        var offset = (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth;
+        var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight);
+        var col = Math.round(offset);
+
+        return {row: row, column: col, side: offset - col > 0 ? 1 : -1};
+    };
+
+    this.screenToTextCoordinates = function(x, y) {
+        var canvasPos = this.scroller.getBoundingClientRect();
+
+        var col = Math.round(
+            (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth
+        );
+
+        var row = (y + this.scrollTop - canvasPos.top) / this.lineHeight;
+
+        return this.session.screenToDocumentPosition(row, Math.max(col, 0));
+    };
+    this.textToScreenCoordinates = function(row, column) {
+        var canvasPos = this.scroller.getBoundingClientRect();
+        var pos = this.session.documentToScreenPosition(row, column);
+
+        var x = this.$padding + Math.round(pos.column * this.characterWidth);
+        var y = pos.row * this.lineHeight;
+
+        return {
+            pageX: canvasPos.left + x - this.scrollLeft,
+            pageY: canvasPos.top + y - this.scrollTop
+        };
+    };
+    this.visualizeFocus = function() {
+        dom.addCssClass(this.container, "ace_focus");
+    };
+    this.visualizeBlur = function() {
+        dom.removeCssClass(this.container, "ace_focus");
+    };
+    this.showComposition = function(position) {
+        if (!this.$composition)
+            this.$composition = {
+                keepTextAreaAtCursor: this.$keepTextAreaAtCursor,
+                cssText: this.textarea.style.cssText
+            };
+
+        this.$keepTextAreaAtCursor = true;
+        dom.addCssClass(this.textarea, "ace_composition");
+        this.textarea.style.cssText = "";
+        this.$moveTextAreaToCursor();
+    };
+    this.setCompositionText = function(text) {
+        this.$moveTextAreaToCursor();
+    };
+    this.hideComposition = function() {
+        if (!this.$composition)
+            return;
+
+        dom.removeCssClass(this.textarea, "ace_composition");
+        this.$keepTextAreaAtCursor = this.$composition.keepTextAreaAtCursor;
+        this.textarea.style.cssText = this.$composition.cssText;
+        this.$composition = null;
+    };
+    this.setTheme = function(theme, cb) {
+        var _self = this;
+        this.$themeId = theme;
+        _self._dispatchEvent('themeChange',{theme:theme});
+
+        if (!theme || typeof theme == "string") {
+            var moduleName = theme || this.$options.theme.initialValue;
+            config.loadModule(["theme", moduleName], afterLoad);
+        } else {
+            afterLoad(theme);
+        }
+
+        function afterLoad(module) {
+            if (_self.$themeId != theme)
+                return cb && cb();
+            if (!module.cssClass)
+                return;
+            dom.importCssString(
+                module.cssText,
+                module.cssClass,
+                _self.container.ownerDocument
+            );
+
+            if (_self.theme)
+                dom.removeCssClass(_self.container, _self.theme.cssClass);
+
+            var padding = "padding" in module ? module.padding 
+                : "padding" in (_self.theme || {}) ? 4 : _self.$padding;
+            if (_self.$padding && padding != _self.$padding)
+                _self.setPadding(padding);
+            _self.$theme = module.cssClass;
+
+            _self.theme = module;
+            dom.addCssClass(_self.container, module.cssClass);
+            dom.setCssClass(_self.container, "ace_dark", module.isDark);
+            if (_self.$size) {
+                _self.$size.width = 0;
+                _self.$updateSizeAsync();
+            }
+
+            _self._dispatchEvent('themeLoaded', {theme:module});
+            cb && cb();
+        }
+    };
+    this.getTheme = function() {
+        return this.$themeId;
+    };
+    this.setStyle = function(style, include) {
+        dom.setCssClass(this.container, style, include !== false);
+    };
+    this.unsetStyle = function(style) {
+        dom.removeCssClass(this.container, style);
+    };
+    
+    this.setCursorStyle = function(style) {
+        if (this.scroller.style.cursor != style)
+            this.scroller.style.cursor = style;
+    };
+    this.setMouseCursor = function(cursorStyle) {
+        this.scroller.style.cursor = cursorStyle;
+    };
+    this.destroy = function() {
+        this.$textLayer.destroy();
+        this.$cursorLayer.destroy();
+    };
+
+}).call(VirtualRenderer.prototype);
+
+
+config.defineOptions(VirtualRenderer.prototype, "renderer", {
+    animatedScroll: {initialValue: false},
+    showInvisibles: {
+        set: function(value) {
+            if (this.$textLayer.setShowInvisibles(value))
+                this.$loop.schedule(this.CHANGE_TEXT);
+        },
+        initialValue: false
+    },
+    showPrintMargin: {
+        set: function() { this.$updatePrintMargin(); },
+        initialValue: true
+    },
+    printMarginColumn: {
+        set: function() { this.$updatePrintMargin(); },
+        initialValue: 80
+    },
+    printMargin: {
+        set: function(val) {
+            if (typeof val == "number")
+                this.$printMarginColumn = val;
+            this.$showPrintMargin = !!val;
+            this.$updatePrintMargin();
+        },
+        get: function() {
+            return this.$showPrintMargin && this.$printMarginColumn; 
+        }
+    },
+    showGutter: {
+        set: function(show){
+            this.$gutter.style.display = show ? "block" : "none";
+            this.$loop.schedule(this.CHANGE_FULL);
+            this.onGutterResize();
+        },
+        initialValue: true
+    },
+    fadeFoldWidgets: {
+        set: function(show) {
+            dom.setCssClass(this.$gutter, "ace_fade-fold-widgets", show);
+        },
+        initialValue: false
+    },
+    showFoldWidgets: {
+        set: function(show) {this.$gutterLayer.setShowFoldWidgets(show)},
+        initialValue: true
+    },
+    showLineNumbers: {
+        set: function(show) {
+            this.$gutterLayer.setShowLineNumbers(show);
+            this.$loop.schedule(this.CHANGE_GUTTER);
+        },
+        initialValue: true
+    },
+    displayIndentGuides: {
+        set: function(show) {
+            if (this.$textLayer.setDisplayIndentGuides(show))
+                this.$loop.schedule(this.CHANGE_TEXT);
+        },
+        initialValue: true
+    },
+    highlightGutterLine: {
+        set: function(shouldHighlight) {
+            if (!this.$gutterLineHighlight) {
+                this.$gutterLineHighlight = dom.createElement("div");
+                this.$gutterLineHighlight.className = "ace_gutter-active-line";
+                this.$gutter.appendChild(this.$gutterLineHighlight);
+                return;
+            }
+
+            this.$gutterLineHighlight.style.display = shouldHighlight ? "" : "none";
+            if (this.$cursorLayer.$pixelPos)
+                this.$updateGutterLineHighlight();
+        },
+        initialValue: false,
+        value: true
+    },
+    hScrollBarAlwaysVisible: {
+        set: function(val) {
+            if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll)
+                this.$loop.schedule(this.CHANGE_SCROLL);
+        },
+        initialValue: false
+    },
+    vScrollBarAlwaysVisible: {
+        set: function(val) {
+            if (!this.$vScrollBarAlwaysVisible || !this.$vScroll)
+                this.$loop.schedule(this.CHANGE_SCROLL);
+        },
+        initialValue: false
+    },
+    fontSize:  {
+        set: function(size) {
+            if (typeof size == "number")
+                size = size + "px";
+            this.container.style.fontSize = size;
+            this.updateFontSize();
+        },
+        initialValue: 12
+    },
+    fontFamily: {
+        set: function(name) {
+            this.container.style.fontFamily = name;
+            this.updateFontSize();
+        }
+    },
+    maxLines: {
+        set: function(val) {
+            this.updateFull();
+        }
+    },
+    minLines: {
+        set: function(val) {
+            this.updateFull();
+        }
+    },
+    maxPixelHeight: {
+        set: function(val) {
+            this.updateFull();
+        },
+        initialValue: 0
+    },
+    scrollPastEnd: {
+        set: function(val) {
+            val = +val || 0;
+            if (this.$scrollPastEnd == val)
+                return;
+            this.$scrollPastEnd = val;
+            this.$loop.schedule(this.CHANGE_SCROLL);
+        },
+        initialValue: 0,
+        handlesSet: true
+    },
+    fixedWidthGutter: {
+        set: function(val) {
+            this.$gutterLayer.$fixedWidth = !!val;
+            this.$loop.schedule(this.CHANGE_GUTTER);
+        }
+    },
+    theme: {
+        set: function(val) { this.setTheme(val) },
+        get: function() { return this.$themeId || this.theme; },
+        initialValue: "./theme/textmate",
+        handlesSet: true
+    }
+});
+
+exports.VirtualRenderer = VirtualRenderer;
+});
+
+define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var net = require("../lib/net");
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+var config = require("../config");
+
+var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl) {
+    this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);
+    this.changeListener = this.changeListener.bind(this);
+    this.onMessage = this.onMessage.bind(this);
+    if (require.nameToUrl && !require.toUrl)
+        require.toUrl = require.nameToUrl;
+    
+    if (config.get("packaged") || !require.toUrl) {
+        workerUrl = workerUrl || config.moduleUrl(mod, "worker");
+    } else {
+        var normalizePath = this.$normalizePath;
+        workerUrl = workerUrl || normalizePath(require.toUrl("ace/worker/worker.js", null, "_"));
+
+        var tlns = {};
+        topLevelNamespaces.forEach(function(ns) {
+            tlns[ns] = normalizePath(require.toUrl(ns, null, "_").replace(/(\.js)?(\?.*)?$/, ""));
+        });
+    }
+
+    try {
+        this.$worker = new Worker(workerUrl);
+    } catch(e) {
+        if (e instanceof window.DOMException) {
+            var blob = this.$workerBlob(workerUrl);
+            var URL = window.URL || window.webkitURL;
+            var blobURL = URL.createObjectURL(blob);
+
+            this.$worker = new Worker(blobURL);
+            URL.revokeObjectURL(blobURL);
+        } else {
+            throw e;
+        }
+    }
+    this.$worker.postMessage({
+        init : true,
+        tlns : tlns,
+        module : mod,
+        classname : classname
+    });
+
+    this.callbackId = 1;
+    this.callbacks = {};
+
+    this.$worker.onmessage = this.onMessage;
+};
+
+(function(){
+
+    oop.implement(this, EventEmitter);
+
+    this.onMessage = function(e) {
+        var msg = e.data;
+        switch(msg.type) {
+            case "event":
+                this._signal(msg.name, {data: msg.data});
+                break;
+            case "call":
+                var callback = this.callbacks[msg.id];
+                if (callback) {
+                    callback(msg.data);
+                    delete this.callbacks[msg.id];
+                }
+                break;
+            case "error":
+                this.reportError(msg.data);
+                break;
+            case "log":
+                window.console && console.log && console.log.apply(console, msg.data);
+                break;
+        }
+    };
+    
+    this.reportError = function(err) {
+        window.console && console.error && console.error(err);
+    };
+
+    this.$normalizePath = function(path) {
+        return net.qualifyURL(path);
+    };
+
+    this.terminate = function() {
+        this._signal("terminate", {});
+        this.deltaQueue = null;
+        this.$worker.terminate();
+        this.$worker = null;
+        if (this.$doc)
+            this.$doc.off("change", this.changeListener);
+        this.$doc = null;
+    };
+
+    this.send = function(cmd, args) {
+        this.$worker.postMessage({command: cmd, args: args});
+    };
+
+    this.call = function(cmd, args, callback) {
+        if (callback) {
+            var id = this.callbackId++;
+            this.callbacks[id] = callback;
+            args.push(id);
+        }
+        this.send(cmd, args);
+    };
+
+    this.emit = function(event, data) {
+        try {
+            this.$worker.postMessage({event: event, data: {data: data.data}});
+        }
+        catch(ex) {
+            console.error(ex.stack);
+        }
+    };
+
+    this.attachToDocument = function(doc) {
+        if(this.$doc)
+            this.terminate();
+
+        this.$doc = doc;
+        this.call("setValue", [doc.getValue()]);
+        doc.on("change", this.changeListener);
+    };
+
+    this.changeListener = function(delta) {
+        if (!this.deltaQueue) {
+            this.deltaQueue = [];
+            setTimeout(this.$sendDeltaQueue, 0);
+        }
+        if (delta.action == "insert")
+            this.deltaQueue.push(delta.start, delta.lines);
+        else
+            this.deltaQueue.push(delta.start, delta.end);
+    };
+
+    this.$sendDeltaQueue = function() {
+        var q = this.deltaQueue;
+        if (!q) return;
+        this.deltaQueue = null;
+        if (q.length > 50 && q.length > this.$doc.getLength() >> 1) {
+            this.call("setValue", [this.$doc.getValue()]);
+        } else
+            this.emit("change", {data: q});
+    };
+
+    this.$workerBlob = function(workerUrl) {
+        var script = "importScripts('" + net.qualifyURL(workerUrl) + "');";
+        try {
+            return new Blob([script], {"type": "application/javascript"});
+        } catch (e) { // Backwards-compatibility
+            var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;
+            var blobBuilder = new BlobBuilder();
+            blobBuilder.append(script);
+            return blobBuilder.getBlob("application/javascript");
+        }
+    };
+
+}).call(WorkerClient.prototype);
+
+
+var UIWorkerClient = function(topLevelNamespaces, mod, classname) {
+    this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);
+    this.changeListener = this.changeListener.bind(this);
+    this.callbackId = 1;
+    this.callbacks = {};
+    this.messageBuffer = [];
+
+    var main = null;
+    var emitSync = false;
+    var sender = Object.create(EventEmitter);
+    var _self = this;
+
+    this.$worker = {};
+    this.$worker.terminate = function() {};
+    this.$worker.postMessage = function(e) {
+        _self.messageBuffer.push(e);
+        if (main) {
+            if (emitSync)
+                setTimeout(processNext);
+            else
+                processNext();
+        }
+    };
+    this.setEmitSync = function(val) { emitSync = val };
+
+    var processNext = function() {
+        var msg = _self.messageBuffer.shift();
+        if (msg.command)
+            main[msg.command].apply(main, msg.args);
+        else if (msg.event)
+            sender._signal(msg.event, msg.data);
+    };
+
+    sender.postMessage = function(msg) {
+        _self.onMessage({data: msg});
+    };
+    sender.callback = function(data, callbackId) {
+        this.postMessage({type: "call", id: callbackId, data: data});
+    };
+    sender.emit = function(name, data) {
+        this.postMessage({type: "event", name: name, data: data});
+    };
+
+    config.loadModule(["worker", mod], function(Main) {
+        main = new Main[classname](sender);
+        while (_self.messageBuffer.length)
+            processNext();
+    });
+};
+
+UIWorkerClient.prototype = WorkerClient.prototype;
+
+exports.UIWorkerClient = UIWorkerClient;
+exports.WorkerClient = WorkerClient;
+
+});
+
+define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"], function(require, exports, module) {
+"use strict";
+
+var Range = require("./range").Range;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var oop = require("./lib/oop");
+
+var PlaceHolder = function(session, length, pos, others, mainClass, othersClass) {
+    var _self = this;
+    this.length = length;
+    this.session = session;
+    this.doc = session.getDocument();
+    this.mainClass = mainClass;
+    this.othersClass = othersClass;
+    this.$onUpdate = this.onUpdate.bind(this);
+    this.doc.on("change", this.$onUpdate);
+    this.$others = others;
+    
+    this.$onCursorChange = function() {
+        setTimeout(function() {
+            _self.onCursorChange();
+        });
+    };
+    
+    this.$pos = pos;
+    var undoStack = session.getUndoManager().$undoStack || session.getUndoManager().$undostack || {length: -1};
+    this.$undoStackDepth = undoStack.length;
+    this.setup();
+
+    session.selection.on("changeCursor", this.$onCursorChange);
+};
+
+(function() {
+
+    oop.implement(this, EventEmitter);
+    this.setup = function() {
+        var _self = this;
+        var doc = this.doc;
+        var session = this.session;
+        
+        this.selectionBefore = session.selection.toJSON();
+        if (session.selection.inMultiSelectMode)
+            session.selection.toSingleRange();
+
+        this.pos = doc.createAnchor(this.$pos.row, this.$pos.column);
+        var pos = this.pos;
+        pos.$insertRight = true;
+        pos.detach();
+        pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false);
+        this.others = [];
+        this.$others.forEach(function(other) {
+            var anchor = doc.createAnchor(other.row, other.column);
+            anchor.$insertRight = true;
+            anchor.detach();
+            _self.others.push(anchor);
+        });
+        session.setUndoSelect(false);
+    };
+    this.showOtherMarkers = function() {
+        if (this.othersActive) return;
+        var session = this.session;
+        var _self = this;
+        this.othersActive = true;
+        this.others.forEach(function(anchor) {
+            anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column+_self.length), _self.othersClass, null, false);
+        });
+    };
+    this.hideOtherMarkers = function() {
+        if (!this.othersActive) return;
+        this.othersActive = false;
+        for (var i = 0; i < this.others.length; i++) {
+            this.session.removeMarker(this.others[i].markerId);
+        }
+    };
+    this.onUpdate = function(delta) {
+        if (this.$updating)
+            return this.updateAnchors(delta);
+            
+        var range = delta;
+        if (range.start.row !== range.end.row) return;
+        if (range.start.row !== this.pos.row) return;
+        this.$updating = true;
+        var lengthDiff = delta.action === "insert" ? range.end.column - range.start.column : range.start.column - range.end.column;
+        var inMainRange = range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1;
+        var distanceFromStart = range.start.column - this.pos.column;
+        
+        this.updateAnchors(delta);
+        
+        if (inMainRange)
+            this.length += lengthDiff;
+
+        if (inMainRange && !this.session.$fromUndo) {
+            if (delta.action === 'insert') {
+                for (var i = this.others.length - 1; i >= 0; i--) {
+                    var otherPos = this.others[i];
+                    var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};
+                    this.doc.insertMergedLines(newPos, delta.lines);
+                }
+            } else if (delta.action === 'remove') {
+                for (var i = this.others.length - 1; i >= 0; i--) {
+                    var otherPos = this.others[i];
+                    var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};
+                    this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff));
+                }
+            }
+        }
+        
+        this.$updating = false;
+        this.updateMarkers();
+    };
+    
+    this.updateAnchors = function(delta) {
+        this.pos.onChange(delta);
+        for (var i = this.others.length; i--;)
+            this.others[i].onChange(delta);
+        this.updateMarkers();
+    };
+    
+    this.updateMarkers = function() {
+        if (this.$updating)
+            return;
+        var _self = this;
+        var session = this.session;
+        var updateMarker = function(pos, className) {
+            session.removeMarker(pos.markerId);
+            pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column+_self.length), className, null, false);
+        };
+        updateMarker(this.pos, this.mainClass);
+        for (var i = this.others.length; i--;)
+            updateMarker(this.others[i], this.othersClass);
+    };
+
+    this.onCursorChange = function(event) {
+        if (this.$updating || !this.session) return;
+        var pos = this.session.selection.getCursor();
+        if (pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) {
+            this.showOtherMarkers();
+            this._emit("cursorEnter", event);
+        } else {
+            this.hideOtherMarkers();
+            this._emit("cursorLeave", event);
+        }
+    };    
+    this.detach = function() {
+        this.session.removeMarker(this.pos && this.pos.markerId);
+        this.hideOtherMarkers();
+        this.doc.removeEventListener("change", this.$onUpdate);
+        this.session.selection.removeEventListener("changeCursor", this.$onCursorChange);
+        this.session.setUndoSelect(true);
+        this.session = null;
+    };
+    this.cancel = function() {
+        if (this.$undoStackDepth === -1)
+            return;
+        var undoManager = this.session.getUndoManager();
+        var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth;
+        for (var i = 0; i < undosRequired; i++) {
+            undoManager.undo(true);
+        }
+        if (this.selectionBefore)
+            this.session.selection.fromJSON(this.selectionBefore);
+    };
+}).call(PlaceHolder.prototype);
+
+
+exports.PlaceHolder = PlaceHolder;
+});
+
+define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module) {
+
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+function isSamePoint(p1, p2) {
+    return p1.row == p2.row && p1.column == p2.column;
+}
+
+function onMouseDown(e) {
+    var ev = e.domEvent;
+    var alt = ev.altKey;
+    var shift = ev.shiftKey;
+    var ctrl = ev.ctrlKey;
+    var accel = e.getAccelKey();
+    var button = e.getButton();
+    
+    if (ctrl && useragent.isMac)
+        button = ev.button;
+
+    if (e.editor.inMultiSelectMode && button == 2) {
+        e.editor.textInput.onContextMenu(e.domEvent);
+        return;
+    }
+    
+    if (!ctrl && !alt && !accel) {
+        if (button === 0 && e.editor.inMultiSelectMode)
+            e.editor.exitMultiSelectMode();
+        return;
+    }
+    
+    if (button !== 0)
+        return;
+
+    var editor = e.editor;
+    var selection = editor.selection;
+    var isMultiSelect = editor.inMultiSelectMode;
+    var pos = e.getDocumentPosition();
+    var cursor = selection.getCursor();
+    var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor));
+
+    var mouseX = e.x, mouseY = e.y;
+    var onMouseSelection = function(e) {
+        mouseX = e.clientX;
+        mouseY = e.clientY;
+    };
+    
+    var session = editor.session;
+    var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);
+    var screenCursor = screenAnchor;
+    
+    var selectionMode;
+    if (editor.$mouseHandler.$enableJumpToDef) {
+        if (ctrl && alt || accel && alt)
+            selectionMode = shift ? "block" : "add";
+        else if (alt && editor.$blockSelectEnabled)
+            selectionMode = "block";
+    } else {
+        if (accel && !alt) {
+            selectionMode = "add";
+            if (!isMultiSelect && shift)
+                return;
+        } else if (alt && editor.$blockSelectEnabled) {
+            selectionMode = "block";
+        }
+    }
+    
+    if (selectionMode && useragent.isMac && ev.ctrlKey) {
+        editor.$mouseHandler.cancelContextMenu();
+    }
+
+    if (selectionMode == "add") {
+        if (!isMultiSelect && inSelection)
+            return; // dragging
+
+        if (!isMultiSelect) {
+            var range = selection.toOrientedRange();
+            editor.addSelectionMarker(range);
+        }
+
+        var oldRange = selection.rangeList.rangeAtPoint(pos);
+        
+        
+        editor.$blockScrolling++;
+        editor.inVirtualSelectionMode = true;
+        
+        if (shift) {
+            oldRange = null;
+            range = selection.ranges[0] || range;
+            editor.removeSelectionMarker(range);
+        }
+        editor.once("mouseup", function() {
+            var tmpSel = selection.toOrientedRange();
+
+            if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor))
+                selection.substractPoint(tmpSel.cursor);
+            else {
+                if (shift) {
+                    selection.substractPoint(range.cursor);
+                } else if (range) {
+                    editor.removeSelectionMarker(range);
+                    selection.addRange(range);
+                }
+                selection.addRange(tmpSel);
+            }
+            editor.$blockScrolling--;
+            editor.inVirtualSelectionMode = false;
+        });
+
+    } else if (selectionMode == "block") {
+        e.stop();
+        editor.inVirtualSelectionMode = true;        
+        var initialRange;
+        var rectSel = [];
+        var blockSelect = function() {
+            var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);
+            var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column);
+
+            if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead))
+                return;
+            screenCursor = newCursor;
+            
+            editor.$blockScrolling++;
+            editor.selection.moveToPosition(cursor);
+            editor.renderer.scrollCursorIntoView();
+
+            editor.removeSelectionMarkers(rectSel);
+            rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor);
+            if (editor.$mouseHandler.$clickSelection && rectSel.length == 1 && rectSel[0].isEmpty())
+                rectSel[0] = editor.$mouseHandler.$clickSelection.clone();
+            rectSel.forEach(editor.addSelectionMarker, editor);
+            editor.updateSelectionMarkers();
+            editor.$blockScrolling--;
+        };
+        editor.$blockScrolling++;
+        if (isMultiSelect && !accel) {
+            selection.toSingleRange();
+        } else if (!isMultiSelect && accel) {
+            initialRange = selection.toOrientedRange();
+            editor.addSelectionMarker(initialRange);
+        }
+        
+        if (shift)
+            screenAnchor = session.documentToScreenPosition(selection.lead);            
+        else
+            selection.moveToPosition(pos);
+        editor.$blockScrolling--;
+        
+        screenCursor = {row: -1, column: -1};
+
+        var onMouseSelectionEnd = function(e) {
+            clearInterval(timerId);
+            editor.removeSelectionMarkers(rectSel);
+            if (!rectSel.length)
+                rectSel = [selection.toOrientedRange()];
+            editor.$blockScrolling++;
+            if (initialRange) {
+                editor.removeSelectionMarker(initialRange);
+                selection.toSingleRange(initialRange);
+            }
+            for (var i = 0; i < rectSel.length; i++)
+                selection.addRange(rectSel[i]);
+            editor.inVirtualSelectionMode = false;
+            editor.$mouseHandler.$clickSelection = null;
+            editor.$blockScrolling--;
+        };
+
+        var onSelectionInterval = blockSelect;
+
+        event.capture(editor.container, onMouseSelection, onMouseSelectionEnd);
+        var timerId = setInterval(function() {onSelectionInterval();}, 20);
+
+        return e.preventDefault();
+    }
+}
+
+
+exports.onMouseDown = onMouseDown;
+
+});
+
+define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"], function(require, exports, module) {
+exports.defaultCommands = [{
+    name: "addCursorAbove",
+    exec: function(editor) { editor.selectMoreLines(-1); },
+    bindKey: {win: "Ctrl-Alt-Up", mac: "Ctrl-Alt-Up"},
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "addCursorBelow",
+    exec: function(editor) { editor.selectMoreLines(1); },
+    bindKey: {win: "Ctrl-Alt-Down", mac: "Ctrl-Alt-Down"},
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "addCursorAboveSkipCurrent",
+    exec: function(editor) { editor.selectMoreLines(-1, true); },
+    bindKey: {win: "Ctrl-Alt-Shift-Up", mac: "Ctrl-Alt-Shift-Up"},
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "addCursorBelowSkipCurrent",
+    exec: function(editor) { editor.selectMoreLines(1, true); },
+    bindKey: {win: "Ctrl-Alt-Shift-Down", mac: "Ctrl-Alt-Shift-Down"},
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "selectMoreBefore",
+    exec: function(editor) { editor.selectMore(-1); },
+    bindKey: {win: "Ctrl-Alt-Left", mac: "Ctrl-Alt-Left"},
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "selectMoreAfter",
+    exec: function(editor) { editor.selectMore(1); },
+    bindKey: {win: "Ctrl-Alt-Right", mac: "Ctrl-Alt-Right"},
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "selectNextBefore",
+    exec: function(editor) { editor.selectMore(-1, true); },
+    bindKey: {win: "Ctrl-Alt-Shift-Left", mac: "Ctrl-Alt-Shift-Left"},
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "selectNextAfter",
+    exec: function(editor) { editor.selectMore(1, true); },
+    bindKey: {win: "Ctrl-Alt-Shift-Right", mac: "Ctrl-Alt-Shift-Right"},
+    scrollIntoView: "cursor",
+    readOnly: true
+}, {
+    name: "splitIntoLines",
+    exec: function(editor) { editor.multiSelect.splitIntoLines(); },
+    bindKey: {win: "Ctrl-Alt-L", mac: "Ctrl-Alt-L"},
+    readOnly: true
+}, {
+    name: "alignCursors",
+    exec: function(editor) { editor.alignCursors(); },
+    bindKey: {win: "Ctrl-Alt-A", mac: "Ctrl-Alt-A"},
+    scrollIntoView: "cursor"
+}, {
+    name: "findAll",
+    exec: function(editor) { editor.findAll(); },
+    bindKey: {win: "Ctrl-Alt-K", mac: "Ctrl-Alt-G"},
+    scrollIntoView: "cursor",
+    readOnly: true
+}];
+exports.multiSelectCommands = [{
+    name: "singleSelection",
+    bindKey: "esc",
+    exec: function(editor) { editor.exitMultiSelectMode(); },
+    scrollIntoView: "cursor",
+    readOnly: true,
+    isAvailable: function(editor) {return editor && editor.inMultiSelectMode}
+}];
+
+var HashHandler = require("../keyboard/hash_handler").HashHandler;
+exports.keyboardHandler = new HashHandler(exports.multiSelectCommands);
+
+});
+
+define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"], function(require, exports, module) {
+
+var RangeList = require("./range_list").RangeList;
+var Range = require("./range").Range;
+var Selection = require("./selection").Selection;
+var onMouseDown = require("./mouse/multi_select_handler").onMouseDown;
+var event = require("./lib/event");
+var lang = require("./lib/lang");
+var commands = require("./commands/multi_select_commands");
+exports.commands = commands.defaultCommands.concat(commands.multiSelectCommands);
+var Search = require("./search").Search;
+var search = new Search();
+
+function find(session, needle, dir) {
+    search.$options.wrap = true;
+    search.$options.needle = needle;
+    search.$options.backwards = dir == -1;
+    return search.find(session);
+}
+var EditSession = require("./edit_session").EditSession;
+(function() {
+    this.getSelectionMarkers = function() {
+        return this.$selectionMarkers;
+    };
+}).call(EditSession.prototype);
+(function() {
+    this.ranges = null;
+    this.rangeList = null;
+    this.addRange = function(range, $blockChangeEvents) {
+        if (!range)
+            return;
+
+        if (!this.inMultiSelectMode && this.rangeCount === 0) {
+            var oldRange = this.toOrientedRange();
+            this.rangeList.add(oldRange);
+            this.rangeList.add(range);
+            if (this.rangeList.ranges.length != 2) {
+                this.rangeList.removeAll();
+                return $blockChangeEvents || this.fromOrientedRange(range);
+            }
+            this.rangeList.removeAll();
+            this.rangeList.add(oldRange);
+            this.$onAddRange(oldRange);
+        }
+
+        if (!range.cursor)
+            range.cursor = range.end;
+
+        var removed = this.rangeList.add(range);
+
+        this.$onAddRange(range);
+
+        if (removed.length)
+            this.$onRemoveRange(removed);
+
+        if (this.rangeCount > 1 && !this.inMultiSelectMode) {
+            this._signal("multiSelect");
+            this.inMultiSelectMode = true;
+            this.session.$undoSelect = false;
+            this.rangeList.attach(this.session);
+        }
+
+        return $blockChangeEvents || this.fromOrientedRange(range);
+    };
+
+    this.toSingleRange = function(range) {
+        range = range || this.ranges[0];
+        var removed = this.rangeList.removeAll();
+        if (removed.length)
+            this.$onRemoveRange(removed);
+
+        range && this.fromOrientedRange(range);
+    };
+    this.substractPoint = function(pos) {
+        var removed = this.rangeList.substractPoint(pos);
+        if (removed) {
+            this.$onRemoveRange(removed);
+            return removed[0];
+        }
+    };
+    this.mergeOverlappingRanges = function() {
+        var removed = this.rangeList.merge();
+        if (removed.length)
+            this.$onRemoveRange(removed);
+        else if(this.ranges[0])
+            this.fromOrientedRange(this.ranges[0]);
+    };
+
+    this.$onAddRange = function(range) {
+        this.rangeCount = this.rangeList.ranges.length;
+        this.ranges.unshift(range);
+        this._signal("addRange", {range: range});
+    };
+
+    this.$onRemoveRange = function(removed) {
+        this.rangeCount = this.rangeList.ranges.length;
+        if (this.rangeCount == 1 && this.inMultiSelectMode) {
+            var lastRange = this.rangeList.ranges.pop();
+            removed.push(lastRange);
+            this.rangeCount = 0;
+        }
+
+        for (var i = removed.length; i--; ) {
+            var index = this.ranges.indexOf(removed[i]);
+            this.ranges.splice(index, 1);
+        }
+
+        this._signal("removeRange", {ranges: removed});
+
+        if (this.rangeCount === 0 && this.inMultiSelectMode) {
+            this.inMultiSelectMode = false;
+            this._signal("singleSelect");
+            this.session.$undoSelect = true;
+            this.rangeList.detach(this.session);
+        }
+
+        lastRange = lastRange || this.ranges[0];
+        if (lastRange && !lastRange.isEqual(this.getRange()))
+            this.fromOrientedRange(lastRange);
+    };
+    this.$initRangeList = function() {
+        if (this.rangeList)
+            return;
+
+        this.rangeList = new RangeList();
+        this.ranges = [];
+        this.rangeCount = 0;
+    };
+    this.getAllRanges = function() {
+        return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()];
+    };
+
+    this.splitIntoLines = function () {
+        if (this.rangeCount > 1) {
+            var ranges = this.rangeList.ranges;
+            var lastRange = ranges[ranges.length - 1];
+            var range = Range.fromPoints(ranges[0].start, lastRange.end);
+
+            this.toSingleRange();
+            this.setSelectionRange(range, lastRange.cursor == lastRange.start);
+        } else {
+            var range = this.getRange();
+            var isBackwards = this.isBackwards();
+            var startRow = range.start.row;
+            var endRow = range.end.row;
+            if (startRow == endRow) {
+                if (isBackwards)
+                    var start = range.end, end = range.start;
+                else
+                    var start = range.start, end = range.end;
+                
+                this.addRange(Range.fromPoints(end, end));
+                this.addRange(Range.fromPoints(start, start));
+                return;
+            }
+
+            var rectSel = [];
+            var r = this.getLineRange(startRow, true);
+            r.start.column = range.start.column;
+            rectSel.push(r);
+
+            for (var i = startRow + 1; i < endRow; i++)
+                rectSel.push(this.getLineRange(i, true));
+
+            r = this.getLineRange(endRow, true);
+            r.end.column = range.end.column;
+            rectSel.push(r);
+
+            rectSel.forEach(this.addRange, this);
+        }
+    };
+    this.toggleBlockSelection = function () {
+        if (this.rangeCount > 1) {
+            var ranges = this.rangeList.ranges;
+            var lastRange = ranges[ranges.length - 1];
+            var range = Range.fromPoints(ranges[0].start, lastRange.end);
+
+            this.toSingleRange();
+            this.setSelectionRange(range, lastRange.cursor == lastRange.start);
+        } else {
+            var cursor = this.session.documentToScreenPosition(this.selectionLead);
+            var anchor = this.session.documentToScreenPosition(this.selectionAnchor);
+
+            var rectSel = this.rectangularRangeBlock(cursor, anchor);
+            rectSel.forEach(this.addRange, this);
+        }
+    };
+    this.rectangularRangeBlock = function(screenCursor, screenAnchor, includeEmptyLines) {
+        var rectSel = [];
+
+        var xBackwards = screenCursor.column < screenAnchor.column;
+        if (xBackwards) {
+            var startColumn = screenCursor.column;
+            var endColumn = screenAnchor.column;
+        } else {
+            var startColumn = screenAnchor.column;
+            var endColumn = screenCursor.column;
+        }
+
+        var yBackwards = screenCursor.row < screenAnchor.row;
+        if (yBackwards) {
+            var startRow = screenCursor.row;
+            var endRow = screenAnchor.row;
+        } else {
+            var startRow = screenAnchor.row;
+            var endRow = screenCursor.row;
+        }
+
+        if (startColumn < 0)
+            startColumn = 0;
+        if (startRow < 0)
+            startRow = 0;
+
+        if (startRow == endRow)
+            includeEmptyLines = true;
+
+        for (var row = startRow; row <= endRow; row++) {
+            var range = Range.fromPoints(
+                this.session.screenToDocumentPosition(row, startColumn),
+                this.session.screenToDocumentPosition(row, endColumn)
+            );
+            if (range.isEmpty()) {
+                if (docEnd && isSamePoint(range.end, docEnd))
+                    break;
+                var docEnd = range.end;
+            }
+            range.cursor = xBackwards ? range.start : range.end;
+            rectSel.push(range);
+        }
+
+        if (yBackwards)
+            rectSel.reverse();
+
+        if (!includeEmptyLines) {
+            var end = rectSel.length - 1;
+            while (rectSel[end].isEmpty() && end > 0)
+                end--;
+            if (end > 0) {
+                var start = 0;
+                while (rectSel[start].isEmpty())
+                    start++;
+            }
+            for (var i = end; i >= start; i--) {
+                if (rectSel[i].isEmpty())
+                    rectSel.splice(i, 1);
+            }
+        }
+
+        return rectSel;
+    };
+}).call(Selection.prototype);
+var Editor = require("./editor").Editor;
+(function() {
+    this.updateSelectionMarkers = function() {
+        this.renderer.updateCursor();
+        this.renderer.updateBackMarkers();
+    };
+    this.addSelectionMarker = function(orientedRange) {
+        if (!orientedRange.cursor)
+            orientedRange.cursor = orientedRange.end;
+
+        var style = this.getSelectionStyle();
+        orientedRange.marker = this.session.addMarker(orientedRange, "ace_selection", style);
+
+        this.session.$selectionMarkers.push(orientedRange);
+        this.session.selectionMarkerCount = this.session.$selectionMarkers.length;
+        return orientedRange;
+    };
+    this.removeSelectionMarker = function(range) {
+        if (!range.marker)
+            return;
+        this.session.removeMarker(range.marker);
+        var index = this.session.$selectionMarkers.indexOf(range);
+        if (index != -1)
+            this.session.$selectionMarkers.splice(index, 1);
+        this.session.selectionMarkerCount = this.session.$selectionMarkers.length;
+    };
+
+    this.removeSelectionMarkers = function(ranges) {
+        var markerList = this.session.$selectionMarkers;
+        for (var i = ranges.length; i--; ) {
+            var range = ranges[i];
+            if (!range.marker)
+                continue;
+            this.session.removeMarker(range.marker);
+            var index = markerList.indexOf(range);
+            if (index != -1)
+                markerList.splice(index, 1);
+        }
+        this.session.selectionMarkerCount = markerList.length;
+    };
+
+    this.$onAddRange = function(e) {
+        this.addSelectionMarker(e.range);
+        this.renderer.updateCursor();
+        this.renderer.updateBackMarkers();
+    };
+
+    this.$onRemoveRange = function(e) {
+        this.removeSelectionMarkers(e.ranges);
+        this.renderer.updateCursor();
+        this.renderer.updateBackMarkers();
+    };
+
+    this.$onMultiSelect = function(e) {
+        if (this.inMultiSelectMode)
+            return;
+        this.inMultiSelectMode = true;
+
+        this.setStyle("ace_multiselect");
+        this.keyBinding.addKeyboardHandler(commands.keyboardHandler);
+        this.commands.setDefaultHandler("exec", this.$onMultiSelectExec);
+
+        this.renderer.updateCursor();
+        this.renderer.updateBackMarkers();
+    };
+
+    this.$onSingleSelect = function(e) {
+        if (this.session.multiSelect.inVirtualMode)
+            return;
+        this.inMultiSelectMode = false;
+
+        this.unsetStyle("ace_multiselect");
+        this.keyBinding.removeKeyboardHandler(commands.keyboardHandler);
+
+        this.commands.removeDefaultHandler("exec", this.$onMultiSelectExec);
+        this.renderer.updateCursor();
+        this.renderer.updateBackMarkers();
+        this._emit("changeSelection");
+    };
+
+    this.$onMultiSelectExec = function(e) {
+        var command = e.command;
+        var editor = e.editor;
+        if (!editor.multiSelect)
+            return;
+        if (!command.multiSelectAction) {
+            var result = command.exec(editor, e.args || {});
+            editor.multiSelect.addRange(editor.multiSelect.toOrientedRange());
+            editor.multiSelect.mergeOverlappingRanges();
+        } else if (command.multiSelectAction == "forEach") {
+            result = editor.forEachSelection(command, e.args);
+        } else if (command.multiSelectAction == "forEachLine") {
+            result = editor.forEachSelection(command, e.args, true);
+        } else if (command.multiSelectAction == "single") {
+            editor.exitMultiSelectMode();
+            result = command.exec(editor, e.args || {});
+        } else {
+            result = command.multiSelectAction(editor, e.args || {});
+        }
+        return result;
+    }; 
+    this.forEachSelection = function(cmd, args, options) {
+        if (this.inVirtualSelectionMode)
+            return;
+        var keepOrder = options && options.keepOrder;
+        var $byLines = options == true || options && options.$byLines
+        var session = this.session;
+        var selection = this.selection;
+        var rangeList = selection.rangeList;
+        var ranges = (keepOrder ? selection : rangeList).ranges;
+        var result;
+        
+        if (!ranges.length)
+            return cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});
+        
+        var reg = selection._eventRegistry;
+        selection._eventRegistry = {};
+
+        var tmpSel = new Selection(session);
+        this.inVirtualSelectionMode = true;
+        for (var i = ranges.length; i--;) {
+            if ($byLines) {
+                while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row)
+                    i--;
+            }
+            tmpSel.fromOrientedRange(ranges[i]);
+            tmpSel.index = i;
+            this.selection = session.selection = tmpSel;
+            var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});
+            if (!result && cmdResult !== undefined)
+                result = cmdResult;
+            tmpSel.toOrientedRange(ranges[i]);
+        }
+        tmpSel.detach();
+
+        this.selection = session.selection = selection;
+        this.inVirtualSelectionMode = false;
+        selection._eventRegistry = reg;
+        selection.mergeOverlappingRanges();
+        
+        var anim = this.renderer.$scrollAnimation;
+        this.onCursorChange();
+        this.onSelectionChange();
+        if (anim && anim.from == anim.to)
+            this.renderer.animateScrolling(anim.from);
+        
+        return result;
+    };
+    this.exitMultiSelectMode = function() {
+        if (!this.inMultiSelectMode || this.inVirtualSelectionMode)
+            return;
+        this.multiSelect.toSingleRange();
+    };
+
+    this.getSelectedText = function() {
+        var text = "";
+        if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {
+            var ranges = this.multiSelect.rangeList.ranges;
+            var buf = [];
+            for (var i = 0; i < ranges.length; i++) {
+                buf.push(this.session.getTextRange(ranges[i]));
+            }
+            var nl = this.session.getDocument().getNewLineCharacter();
+            text = buf.join(nl);
+            if (text.length == (buf.length - 1) * nl.length)
+                text = "";
+        } else if (!this.selection.isEmpty()) {
+            text = this.session.getTextRange(this.getSelectionRange());
+        }
+        return text;
+    };
+    
+    this.$checkMultiselectChange = function(e, anchor) {
+        if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {
+            var range = this.multiSelect.ranges[0];
+            if (this.multiSelect.isEmpty() && anchor == this.multiSelect.anchor)
+                return;
+            var pos = anchor == this.multiSelect.anchor
+                ? range.cursor == range.start ? range.end : range.start
+                : range.cursor;
+            if (pos.row != anchor.row 
+                || this.session.$clipPositionToDocument(pos.row, pos.column).column != anchor.column)
+                this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange());
+        }
+    };
+    this.findAll = function(needle, options, additive) {
+        options = options || {};
+        options.needle = needle || options.needle;
+        if (options.needle == undefined) {
+            var range = this.selection.isEmpty()
+                ? this.selection.getWordRange()
+                : this.selection.getRange();
+            options.needle = this.session.getTextRange(range);
+        }    
+        this.$search.set(options);
+        
+        var ranges = this.$search.findAll(this.session);
+        if (!ranges.length)
+            return 0;
+
+        this.$blockScrolling += 1;
+        var selection = this.multiSelect;
+
+        if (!additive)
+            selection.toSingleRange(ranges[0]);
+
+        for (var i = ranges.length; i--; )
+            selection.addRange(ranges[i], true);
+        if (range && selection.rangeList.rangeAtPoint(range.start))
+            selection.addRange(range, true);
+        
+        this.$blockScrolling -= 1;
+
+        return ranges.length;
+    };
+    this.selectMoreLines = function(dir, skip) {
+        var range = this.selection.toOrientedRange();
+        var isBackwards = range.cursor == range.end;
+
+        var screenLead = this.session.documentToScreenPosition(range.cursor);
+        if (this.selection.$desiredColumn)
+            screenLead.column = this.selection.$desiredColumn;
+
+        var lead = this.session.screenToDocumentPosition(screenLead.row + dir, screenLead.column);
+
+        if (!range.isEmpty()) {
+            var screenAnchor = this.session.documentToScreenPosition(isBackwards ? range.end : range.start);
+            var anchor = this.session.screenToDocumentPosition(screenAnchor.row + dir, screenAnchor.column);
+        } else {
+            var anchor = lead;
+        }
+
+        if (isBackwards) {
+            var newRange = Range.fromPoints(lead, anchor);
+            newRange.cursor = newRange.start;
+        } else {
+            var newRange = Range.fromPoints(anchor, lead);
+            newRange.cursor = newRange.end;
+        }
+
+        newRange.desiredColumn = screenLead.column;
+        if (!this.selection.inMultiSelectMode) {
+            this.selection.addRange(range);
+        } else {
+            if (skip)
+                var toRemove = range.cursor;
+        }
+
+        this.selection.addRange(newRange);
+        if (toRemove)
+            this.selection.substractPoint(toRemove);
+    };
+    this.transposeSelections = function(dir) {
+        var session = this.session;
+        var sel = session.multiSelect;
+        var all = sel.ranges;
+
+        for (var i = all.length; i--; ) {
+            var range = all[i];
+            if (range.isEmpty()) {
+                var tmp = session.getWordRange(range.start.row, range.start.column);
+                range.start.row = tmp.start.row;
+                range.start.column = tmp.start.column;
+                range.end.row = tmp.end.row;
+                range.end.column = tmp.end.column;
+            }
+        }
+        sel.mergeOverlappingRanges();
+
+        var words = [];
+        for (var i = all.length; i--; ) {
+            var range = all[i];
+            words.unshift(session.getTextRange(range));
+        }
+
+        if (dir < 0)
+            words.unshift(words.pop());
+        else
+            words.push(words.shift());
+
+        for (var i = all.length; i--; ) {
+            var range = all[i];
+            var tmp = range.clone();
+            session.replace(range, words[i]);
+            range.start.row = tmp.start.row;
+            range.start.column = tmp.start.column;
+        }
+    };
+    this.selectMore = function(dir, skip, stopAtFirst) {
+        var session = this.session;
+        var sel = session.multiSelect;
+
+        var range = sel.toOrientedRange();
+        if (range.isEmpty()) {
+            range = session.getWordRange(range.start.row, range.start.column);
+            range.cursor = dir == -1 ? range.start : range.end;
+            this.multiSelect.addRange(range);
+            if (stopAtFirst)
+                return;
+        }
+        var needle = session.getTextRange(range);
+
+        var newRange = find(session, needle, dir);
+        if (newRange) {
+            newRange.cursor = dir == -1 ? newRange.start : newRange.end;
+            this.$blockScrolling += 1;
+            this.session.unfold(newRange);
+            this.multiSelect.addRange(newRange);
+            this.$blockScrolling -= 1;
+            this.renderer.scrollCursorIntoView(null, 0.5);
+        }
+        if (skip)
+            this.multiSelect.substractPoint(range.cursor);
+    };
+    this.alignCursors = function() {
+        var session = this.session;
+        var sel = session.multiSelect;
+        var ranges = sel.ranges;
+        var row = -1;
+        var sameRowRanges = ranges.filter(function(r) {
+            if (r.cursor.row == row)
+                return true;
+            row = r.cursor.row;
+        });
+        
+        if (!ranges.length || sameRowRanges.length == ranges.length - 1) {
+            var range = this.selection.getRange();
+            var fr = range.start.row, lr = range.end.row;
+            var guessRange = fr == lr;
+            if (guessRange) {
+                var max = this.session.getLength();
+                var line;
+                do {
+                    line = this.session.getLine(lr);
+                } while (/[=:]/.test(line) && ++lr < max);
+                do {
+                    line = this.session.getLine(fr);
+                } while (/[=:]/.test(line) && --fr > 0);
+                
+                if (fr < 0) fr = 0;
+                if (lr >= max) lr = max - 1;
+            }
+            var lines = this.session.removeFullLines(fr, lr);
+            lines = this.$reAlignText(lines, guessRange);
+            this.session.insert({row: fr, column: 0}, lines.join("\n") + "\n");
+            if (!guessRange) {
+                range.start.column = 0;
+                range.end.column = lines[lines.length - 1].length;
+            }
+            this.selection.setRange(range);
+        } else {
+            sameRowRanges.forEach(function(r) {
+                sel.substractPoint(r.cursor);
+            });
+
+            var maxCol = 0;
+            var minSpace = Infinity;
+            var spaceOffsets = ranges.map(function(r) {
+                var p = r.cursor;
+                var line = session.getLine(p.row);
+                var spaceOffset = line.substr(p.column).search(/\S/g);
+                if (spaceOffset == -1)
+                    spaceOffset = 0;
+
+                if (p.column > maxCol)
+                    maxCol = p.column;
+                if (spaceOffset < minSpace)
+                    minSpace = spaceOffset;
+                return spaceOffset;
+            });
+            ranges.forEach(function(r, i) {
+                var p = r.cursor;
+                var l = maxCol - p.column;
+                var d = spaceOffsets[i] - minSpace;
+                if (l > d)
+                    session.insert(p, lang.stringRepeat(" ", l - d));
+                else
+                    session.remove(new Range(p.row, p.column, p.row, p.column - l + d));
+
+                r.start.column = r.end.column = maxCol;
+                r.start.row = r.end.row = p.row;
+                r.cursor = r.end;
+            });
+            sel.fromOrientedRange(ranges[0]);
+            this.renderer.updateCursor();
+            this.renderer.updateBackMarkers();
+        }
+    };
+
+    this.$reAlignText = function(lines, forceLeft) {
+        var isLeftAligned = true, isRightAligned = true;
+        var startW, textW, endW;
+
+        return lines.map(function(line) {
+            var m = line.match(/(\s*)(.*?)(\s*)([=:].*)/);
+            if (!m)
+                return [line];
+
+            if (startW == null) {
+                startW = m[1].length;
+                textW = m[2].length;
+                endW = m[3].length;
+                return m;
+            }
+
+            if (startW + textW + endW != m[1].length + m[2].length + m[3].length)
+                isRightAligned = false;
+            if (startW != m[1].length)
+                isLeftAligned = false;
+
+            if (startW > m[1].length)
+                startW = m[1].length;
+            if (textW < m[2].length)
+                textW = m[2].length;
+            if (endW > m[3].length)
+                endW = m[3].length;
+
+            return m;
+        }).map(forceLeft ? alignLeft :
+            isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign);
+
+        function spaces(n) {
+            return lang.stringRepeat(" ", n);
+        }
+
+        function alignLeft(m) {
+            return !m[2] ? m[0] : spaces(startW) + m[2]
+                + spaces(textW - m[2].length + endW)
+                + m[4].replace(/^([=:])\s+/, "$1 ");
+        }
+        function alignRight(m) {
+            return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2]
+                + spaces(endW, " ")
+                + m[4].replace(/^([=:])\s+/, "$1 ");
+        }
+        function unAlign(m) {
+            return !m[2] ? m[0] : spaces(startW) + m[2]
+                + spaces(endW)
+                + m[4].replace(/^([=:])\s+/, "$1 ");
+        }
+    };
+}).call(Editor.prototype);
+
+
+function isSamePoint(p1, p2) {
+    return p1.row == p2.row && p1.column == p2.column;
+}
+exports.onSessionChange = function(e) {
+    var session = e.session;
+    if (session && !session.multiSelect) {
+        session.$selectionMarkers = [];
+        session.selection.$initRangeList();
+        session.multiSelect = session.selection;
+    }
+    this.multiSelect = session && session.multiSelect;
+
+    var oldSession = e.oldSession;
+    if (oldSession) {
+        oldSession.multiSelect.off("addRange", this.$onAddRange);
+        oldSession.multiSelect.off("removeRange", this.$onRemoveRange);
+        oldSession.multiSelect.off("multiSelect", this.$onMultiSelect);
+        oldSession.multiSelect.off("singleSelect", this.$onSingleSelect);
+        oldSession.multiSelect.lead.off("change", this.$checkMultiselectChange);
+        oldSession.multiSelect.anchor.off("change", this.$checkMultiselectChange);
+    }
+
+    if (session) {
+        session.multiSelect.on("addRange", this.$onAddRange);
+        session.multiSelect.on("removeRange", this.$onRemoveRange);
+        session.multiSelect.on("multiSelect", this.$onMultiSelect);
+        session.multiSelect.on("singleSelect", this.$onSingleSelect);
+        session.multiSelect.lead.on("change", this.$checkMultiselectChange);
+        session.multiSelect.anchor.on("change", this.$checkMultiselectChange);
+    }
+
+    if (session && this.inMultiSelectMode != session.selection.inMultiSelectMode) {
+        if (session.selection.inMultiSelectMode)
+            this.$onMultiSelect();
+        else
+            this.$onSingleSelect();
+    }
+};
+function MultiSelect(editor) {
+    if (editor.$multiselectOnSessionChange)
+        return;
+    editor.$onAddRange = editor.$onAddRange.bind(editor);
+    editor.$onRemoveRange = editor.$onRemoveRange.bind(editor);
+    editor.$onMultiSelect = editor.$onMultiSelect.bind(editor);
+    editor.$onSingleSelect = editor.$onSingleSelect.bind(editor);
+    editor.$multiselectOnSessionChange = exports.onSessionChange.bind(editor);
+    editor.$checkMultiselectChange = editor.$checkMultiselectChange.bind(editor);
+
+    editor.$multiselectOnSessionChange(editor);
+    editor.on("changeSession", editor.$multiselectOnSessionChange);
+
+    editor.on("mousedown", onMouseDown);
+    editor.commands.addCommands(commands.defaultCommands);
+
+    addAltCursorListeners(editor);
+}
+
+function addAltCursorListeners(editor){
+    var el = editor.textInput.getElement();
+    var altCursor = false;
+    event.addListener(el, "keydown", function(e) {
+        var altDown = e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey);
+        if (editor.$blockSelectEnabled && altDown) {
+            if (!altCursor) {
+                editor.renderer.setMouseCursor("crosshair");
+                altCursor = true;
+            }
+        } else if (altCursor) {
+            reset();
+        }
+    });
+
+    event.addListener(el, "keyup", reset);
+    event.addListener(el, "blur", reset);
+    function reset(e) {
+        if (altCursor) {
+            editor.renderer.setMouseCursor("");
+            altCursor = false;
+        }
+    }
+}
+
+exports.MultiSelect = MultiSelect;
+
+
+require("./config").defineOptions(Editor.prototype, "editor", {
+    enableMultiselect: {
+        set: function(val) {
+            MultiSelect(this);
+            if (val) {
+                this.on("changeSession", this.$multiselectOnSessionChange);
+                this.on("mousedown", onMouseDown);
+            } else {
+                this.off("changeSession", this.$multiselectOnSessionChange);
+                this.off("mousedown", onMouseDown);
+            }
+        },
+        value: true
+    },
+    enableBlockSelect: {
+        set: function(val) {
+            this.$blockSelectEnabled = val;
+        },
+        value: true
+    }
+});
+
+
+
+});
+
+define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+
+(function() {
+
+    this.foldingStartMarker = null;
+    this.foldingStopMarker = null;
+    this.getFoldWidget = function(session, foldStyle, row) {
+        var line = session.getLine(row);
+        if (this.foldingStartMarker.test(line))
+            return "start";
+        if (foldStyle == "markbeginend"
+                && this.foldingStopMarker
+                && this.foldingStopMarker.test(line))
+            return "end";
+        return "";
+    };
+
+    this.getFoldWidgetRange = function(session, foldStyle, row) {
+        return null;
+    };
+
+    this.indentationBlock = function(session, row, column) {
+        var re = /\S/;
+        var line = session.getLine(row);
+        var startLevel = line.search(re);
+        if (startLevel == -1)
+            return;
+
+        var startColumn = column || line.length;
+        var maxRow = session.getLength();
+        var startRow = row;
+        var endRow = row;
+
+        while (++row < maxRow) {
+            var level = session.getLine(row).search(re);
+
+            if (level == -1)
+                continue;
+
+            if (level <= startLevel)
+                break;
+
+            endRow = row;
+        }
+
+        if (endRow > startRow) {
+            var endColumn = session.getLine(endRow).length;
+            return new Range(startRow, startColumn, endRow, endColumn);
+        }
+    };
+
+    this.openingBracketBlock = function(session, bracket, row, column, typeRe) {
+        var start = {row: row, column: column + 1};
+        var end = session.$findClosingBracket(bracket, start, typeRe);
+        if (!end)
+            return;
+
+        var fw = session.foldWidgets[end.row];
+        if (fw == null)
+            fw = session.getFoldWidget(end.row);
+
+        if (fw == "start" && end.row > start.row) {
+            end.row --;
+            end.column = session.getLine(end.row).length;
+        }
+        return Range.fromPoints(start, end);
+    };
+
+    this.closingBracketBlock = function(session, bracket, row, column, typeRe) {
+        var end = {row: row, column: column};
+        var start = session.$findOpeningBracket(bracket, end);
+
+        if (!start)
+            return;
+
+        start.column++;
+        end.column--;
+
+        return  Range.fromPoints(start, end);
+    };
+}).call(FoldMode.prototype);
+
+});
+
+define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+"use strict";
+
+exports.isDark = false;
+exports.cssClass = "ace-tm";
+exports.cssText = ".ace-tm .ace_gutter {\
+background: #f0f0f0;\
+color: #333;\
+}\
+.ace-tm .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8;\
+}\
+.ace-tm .ace_fold {\
+background-color: #6B72E6;\
+}\
+.ace-tm {\
+background-color: #FFFFFF;\
+color: black;\
+}\
+.ace-tm .ace_cursor {\
+color: black;\
+}\
+.ace-tm .ace_invisible {\
+color: rgb(191, 191, 191);\
+}\
+.ace-tm .ace_storage,\
+.ace-tm .ace_keyword {\
+color: blue;\
+}\
+.ace-tm .ace_constant {\
+color: rgb(197, 6, 11);\
+}\
+.ace-tm .ace_constant.ace_buildin {\
+color: rgb(88, 72, 246);\
+}\
+.ace-tm .ace_constant.ace_language {\
+color: rgb(88, 92, 246);\
+}\
+.ace-tm .ace_constant.ace_library {\
+color: rgb(6, 150, 14);\
+}\
+.ace-tm .ace_invalid {\
+background-color: rgba(255, 0, 0, 0.1);\
+color: red;\
+}\
+.ace-tm .ace_support.ace_function {\
+color: rgb(60, 76, 114);\
+}\
+.ace-tm .ace_support.ace_constant {\
+color: rgb(6, 150, 14);\
+}\
+.ace-tm .ace_support.ace_type,\
+.ace-tm .ace_support.ace_class {\
+color: rgb(109, 121, 222);\
+}\
+.ace-tm .ace_keyword.ace_operator {\
+color: rgb(104, 118, 135);\
+}\
+.ace-tm .ace_string {\
+color: rgb(3, 106, 7);\
+}\
+.ace-tm .ace_comment {\
+color: rgb(76, 136, 107);\
+}\
+.ace-tm .ace_comment.ace_doc {\
+color: rgb(0, 102, 255);\
+}\
+.ace-tm .ace_comment.ace_doc.ace_tag {\
+color: rgb(128, 159, 191);\
+}\
+.ace-tm .ace_constant.ace_numeric {\
+color: rgb(0, 0, 205);\
+}\
+.ace-tm .ace_variable {\
+color: rgb(49, 132, 149);\
+}\
+.ace-tm .ace_xml-pe {\
+color: rgb(104, 104, 91);\
+}\
+.ace-tm .ace_entity.ace_name.ace_function {\
+color: #0000A2;\
+}\
+.ace-tm .ace_heading {\
+color: rgb(12, 7, 255);\
+}\
+.ace-tm .ace_list {\
+color:rgb(185, 6, 144);\
+}\
+.ace-tm .ace_meta.ace_tag {\
+color:rgb(0, 22, 142);\
+}\
+.ace-tm .ace_string.ace_regex {\
+color: rgb(255, 0, 0)\
+}\
+.ace-tm .ace_marker-layer .ace_selection {\
+background: rgb(181, 213, 255);\
+}\
+.ace-tm.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px white;\
+}\
+.ace-tm .ace_marker-layer .ace_step {\
+background: rgb(252, 255, 0);\
+}\
+.ace-tm .ace_marker-layer .ace_stack {\
+background: rgb(164, 229, 101);\
+}\
+.ace-tm .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgb(192, 192, 192);\
+}\
+.ace-tm .ace_marker-layer .ace_active-line {\
+background: rgba(0, 0, 0, 0.07);\
+}\
+.ace-tm .ace_gutter-active-line {\
+background-color : #dcdcdc;\
+}\
+.ace-tm .ace_marker-layer .ace_selected-word {\
+background: rgb(250, 250, 255);\
+border: 1px solid rgb(200, 200, 250);\
+}\
+.ace-tm .ace_indent-guide {\
+background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
+}\
+";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
+
+define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var dom = require("./lib/dom");
+var Range = require("./range").Range;
+
+
+function LineWidgets(session) {
+    this.session = session;
+    this.session.widgetManager = this;
+    this.session.getRowLength = this.getRowLength;
+    this.session.$getWidgetScreenLength = this.$getWidgetScreenLength;
+    this.updateOnChange = this.updateOnChange.bind(this);
+    this.renderWidgets = this.renderWidgets.bind(this);
+    this.measureWidgets = this.measureWidgets.bind(this);
+    this.session._changedWidgets = [];
+    this.$onChangeEditor = this.$onChangeEditor.bind(this);
+    
+    this.session.on("change", this.updateOnChange);
+    this.session.on("changeFold", this.updateOnFold);
+    this.session.on("changeEditor", this.$onChangeEditor);
+}
+
+(function() {
+    this.getRowLength = function(row) {
+        var h;
+        if (this.lineWidgets)
+            h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;
+        else 
+            h = 0;
+        if (!this.$useWrapMode || !this.$wrapData[row]) {
+            return 1 + h;
+        } else {
+            return this.$wrapData[row].length + 1 + h;
+        }
+    };
+
+    this.$getWidgetScreenLength = function() {
+        var screenRows = 0;
+        this.lineWidgets.forEach(function(w){
+            if (w && w.rowCount && !w.hidden)
+                screenRows += w.rowCount;
+        });
+        return screenRows;
+    };    
+    
+    this.$onChangeEditor = function(e) {
+        this.attach(e.editor);
+    };
+    
+    this.attach = function(editor) {
+        if (editor  && editor.widgetManager && editor.widgetManager != this)
+            editor.widgetManager.detach();
+
+        if (this.editor == editor)
+            return;
+
+        this.detach();
+        this.editor = editor;
+        
+        if (editor) {
+            editor.widgetManager = this;
+            editor.renderer.on("beforeRender", this.measureWidgets);
+            editor.renderer.on("afterRender", this.renderWidgets);
+        }
+    };
+    this.detach = function(e) {
+        var editor = this.editor;
+        if (!editor)
+            return;
+        
+        this.editor = null;
+        editor.widgetManager = null;
+        
+        editor.renderer.off("beforeRender", this.measureWidgets);
+        editor.renderer.off("afterRender", this.renderWidgets);
+        var lineWidgets = this.session.lineWidgets;
+        lineWidgets && lineWidgets.forEach(function(w) {
+            if (w && w.el && w.el.parentNode) {
+                w._inDocument = false;
+                w.el.parentNode.removeChild(w.el);
+            }
+        });
+    };
+
+    this.updateOnFold = function(e, session) {
+        var lineWidgets = session.lineWidgets;
+        if (!lineWidgets || !e.action)
+            return;
+        var fold = e.data;
+        var start = fold.start.row;
+        var end = fold.end.row;
+        var hide = e.action == "add";
+        for (var i = start + 1; i < end; i++) {
+            if (lineWidgets[i])
+                lineWidgets[i].hidden = hide;
+        }
+        if (lineWidgets[end]) {
+            if (hide) {
+                if (!lineWidgets[start])
+                    lineWidgets[start] = lineWidgets[end];
+                else
+                    lineWidgets[end].hidden = hide;
+            } else {
+                if (lineWidgets[start] == lineWidgets[end])
+                    lineWidgets[start] = undefined;
+                lineWidgets[end].hidden = hide;
+            }
+        }
+    };
+    
+    this.updateOnChange = function(delta) {
+        var lineWidgets = this.session.lineWidgets;
+        if (!lineWidgets) return;
+        
+        var startRow = delta.start.row;
+        var len = delta.end.row - startRow;
+
+        if (len === 0) {
+        } else if (delta.action == 'remove') {
+            var removed = lineWidgets.splice(startRow + 1, len);
+            removed.forEach(function(w) {
+                w && this.removeLineWidget(w);
+            }, this);
+            this.$updateRows();
+        } else {
+            var args = new Array(len);
+            args.unshift(startRow, 0);
+            lineWidgets.splice.apply(lineWidgets, args);
+            this.$updateRows();
+        }
+    };
+    
+    this.$updateRows = function() {
+        var lineWidgets = this.session.lineWidgets;
+        if (!lineWidgets) return;
+        var noWidgets = true;
+        lineWidgets.forEach(function(w, i) {
+            if (w) {
+                noWidgets = false;
+                w.row = i;
+                while (w.$oldWidget) {
+                    w.$oldWidget.row = i;
+                    w = w.$oldWidget;
+                }
+            }
+        });
+        if (noWidgets)
+            this.session.lineWidgets = null;
+    };
+
+    this.addLineWidget = function(w) {
+        if (!this.session.lineWidgets)
+            this.session.lineWidgets = new Array(this.session.getLength());
+        
+        var old = this.session.lineWidgets[w.row];
+        if (old) {
+            w.$oldWidget = old;
+            if (old.el && old.el.parentNode) {
+                old.el.parentNode.removeChild(old.el);
+                old._inDocument = false;
+            }
+        }
+            
+        this.session.lineWidgets[w.row] = w;
+        
+        w.session = this.session;
+        
+        var renderer = this.editor.renderer;
+        if (w.html && !w.el) {
+            w.el = dom.createElement("div");
+            w.el.innerHTML = w.html;
+        }
+        if (w.el) {
+            dom.addCssClass(w.el, "ace_lineWidgetContainer");
+            w.el.style.position = "absolute";
+            w.el.style.zIndex = 5;
+            renderer.container.appendChild(w.el);
+            w._inDocument = true;
+        }
+        
+        if (!w.coverGutter) {
+            w.el.style.zIndex = 3;
+        }
+        if (!w.pixelHeight) {
+            w.pixelHeight = w.el.offsetHeight;
+        }
+        if (w.rowCount == null) {
+            w.rowCount = w.pixelHeight / renderer.layerConfig.lineHeight;
+        }
+        
+        var fold = this.session.getFoldAt(w.row, 0);
+        w.$fold = fold;
+        if (fold) {
+            var lineWidgets = this.session.lineWidgets;
+            if (w.row == fold.end.row && !lineWidgets[fold.start.row])
+                lineWidgets[fold.start.row] = w;
+            else
+                w.hidden = true;
+        }
+            
+        this.session._emit("changeFold", {data:{start:{row: w.row}}});
+        
+        this.$updateRows();
+        this.renderWidgets(null, renderer);
+        this.onWidgetChanged(w);
+        return w;
+    };
+    
+    this.removeLineWidget = function(w) {
+        w._inDocument = false;
+        w.session = null;
+        if (w.el && w.el.parentNode)
+            w.el.parentNode.removeChild(w.el);
+        if (w.editor && w.editor.destroy) try {
+            w.editor.destroy();
+        } catch(e){}
+        if (this.session.lineWidgets) {
+            var w1 = this.session.lineWidgets[w.row]
+            if (w1 == w) {
+                this.session.lineWidgets[w.row] = w.$oldWidget;
+                if (w.$oldWidget)
+                    this.onWidgetChanged(w.$oldWidget);
+            } else {
+                while (w1) {
+                    if (w1.$oldWidget == w) {
+                        w1.$oldWidget = w.$oldWidget;
+                        break;
+                    }
+                    w1 = w1.$oldWidget;
+                }
+            }
+        }
+        this.session._emit("changeFold", {data:{start:{row: w.row}}});
+        this.$updateRows();
+    };
+    
+    this.getWidgetsAtRow = function(row) {
+        var lineWidgets = this.session.lineWidgets;
+        var w = lineWidgets && lineWidgets[row];
+        var list = [];
+        while (w) {
+            list.push(w);
+            w = w.$oldWidget;
+        }
+        return list;
+    };
+    
+    this.onWidgetChanged = function(w) {
+        this.session._changedWidgets.push(w);
+        this.editor && this.editor.renderer.updateFull();
+    };
+    
+    this.measureWidgets = function(e, renderer) {
+        var changedWidgets = this.session._changedWidgets;
+        var config = renderer.layerConfig;
+        
+        if (!changedWidgets || !changedWidgets.length) return;
+        var min = Infinity;
+        for (var i = 0; i < changedWidgets.length; i++) {
+            var w = changedWidgets[i];
+            if (!w || !w.el) continue;
+            if (w.session != this.session) continue;
+            if (!w._inDocument) {
+                if (this.session.lineWidgets[w.row] != w)
+                    continue;
+                w._inDocument = true;
+                renderer.container.appendChild(w.el);
+            }
+            
+            w.h = w.el.offsetHeight;
+            
+            if (!w.fixedWidth) {
+                w.w = w.el.offsetWidth;
+                w.screenWidth = Math.ceil(w.w / config.characterWidth);
+            }
+            
+            var rowCount = w.h / config.lineHeight;
+            if (w.coverLine) {
+                rowCount -= this.session.getRowLineCount(w.row);
+                if (rowCount < 0)
+                    rowCount = 0;
+            }
+            if (w.rowCount != rowCount) {
+                w.rowCount = rowCount;
+                if (w.row < min)
+                    min = w.row;
+            }
+        }
+        if (min != Infinity) {
+            this.session._emit("changeFold", {data:{start:{row: min}}});
+            this.session.lineWidgetWidth = null;
+        }
+        this.session._changedWidgets = [];
+    };
+    
+    this.renderWidgets = function(e, renderer) {
+        var config = renderer.layerConfig;
+        var lineWidgets = this.session.lineWidgets;
+        if (!lineWidgets)
+            return;
+        var first = Math.min(this.firstRow, config.firstRow);
+        var last = Math.max(this.lastRow, config.lastRow, lineWidgets.length);
+        
+        while (first > 0 && !lineWidgets[first])
+            first--;
+        
+        this.firstRow = config.firstRow;
+        this.lastRow = config.lastRow;
+
+        renderer.$cursorLayer.config = config;
+        for (var i = first; i <= last; i++) {
+            var w = lineWidgets[i];
+            if (!w || !w.el) continue;
+            if (w.hidden) {
+                w.el.style.top = -100 - (w.pixelHeight || 0) + "px";
+                continue;
+            }
+            if (!w._inDocument) {
+                w._inDocument = true;
+                renderer.container.appendChild(w.el);
+            }
+            var top = renderer.$cursorLayer.getPixelPosition({row: i, column:0}, true).top;
+            if (!w.coverLine)
+                top += config.lineHeight * this.session.getRowLineCount(w.row);
+            w.el.style.top = top - config.offset + "px";
+            
+            var left = w.coverGutter ? 0 : renderer.gutterWidth;
+            if (!w.fixedWidth)
+                left -= renderer.scrollLeft;
+            w.el.style.left = left + "px";
+            
+            if (w.fullWidth && w.screenWidth) {
+                w.el.style.minWidth = config.width + 2 * config.padding + "px";
+            }
+            
+            if (w.fixedWidth) {
+                w.el.style.right = renderer.scrollBar.getWidth() + "px";
+            } else {
+                w.el.style.right = "";
+            }
+        }
+    };
+    
+}).call(LineWidgets.prototype);
+
+
+exports.LineWidgets = LineWidgets;
+
+});
+
+define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"], function(require, exports, module) {
+"use strict";
+var LineWidgets = require("../line_widgets").LineWidgets;
+var dom = require("../lib/dom");
+var Range = require("../range").Range;
+
+function binarySearch(array, needle, comparator) {
+    var first = 0;
+    var last = array.length - 1;
+
+    while (first <= last) {
+        var mid = (first + last) >> 1;
+        var c = comparator(needle, array[mid]);
+        if (c > 0)
+            first = mid + 1;
+        else if (c < 0)
+            last = mid - 1;
+        else
+            return mid;
+    }
+    return -(first + 1);
+}
+
+function findAnnotations(session, row, dir) {
+    var annotations = session.getAnnotations().sort(Range.comparePoints);
+    if (!annotations.length)
+        return;
+    
+    var i = binarySearch(annotations, {row: row, column: -1}, Range.comparePoints);
+    if (i < 0)
+        i = -i - 1;
+    
+    if (i >= annotations.length)
+        i = dir > 0 ? 0 : annotations.length - 1;
+    else if (i === 0 && dir < 0)
+        i = annotations.length - 1;
+    
+    var annotation = annotations[i];
+    if (!annotation || !dir)
+        return;
+
+    if (annotation.row === row) {
+        do {
+            annotation = annotations[i += dir];
+        } while (annotation && annotation.row === row);
+        if (!annotation)
+            return annotations.slice();
+    }
+    
+    
+    var matched = [];
+    row = annotation.row;
+    do {
+        matched[dir < 0 ? "unshift" : "push"](annotation);
+        annotation = annotations[i += dir];
+    } while (annotation && annotation.row == row);
+    return matched.length && matched;
+}
+
+exports.showErrorMarker = function(editor, dir) {
+    var session = editor.session;
+    if (!session.widgetManager) {
+        session.widgetManager = new LineWidgets(session);
+        session.widgetManager.attach(editor);
+    }
+    
+    var pos = editor.getCursorPosition();
+    var row = pos.row;
+    var oldWidget = session.widgetManager.getWidgetsAtRow(row).filter(function(w) {
+        return w.type == "errorMarker";
+    })[0];
+    if (oldWidget) {
+        oldWidget.destroy();
+    } else {
+        row -= dir;
+    }
+    var annotations = findAnnotations(session, row, dir);
+    var gutterAnno;
+    if (annotations) {
+        var annotation = annotations[0];
+        pos.column = (annotation.pos && typeof annotation.column != "number"
+            ? annotation.pos.sc
+            : annotation.column) || 0;
+        pos.row = annotation.row;
+        gutterAnno = editor.renderer.$gutterLayer.$annotations[pos.row];
+    } else if (oldWidget) {
+        return;
+    } else {
+        gutterAnno = {
+            text: ["Looks good!"],
+            className: "ace_ok"
+        };
+    }
+    editor.session.unfold(pos.row);
+    editor.selection.moveToPosition(pos);
+    
+    var w = {
+        row: pos.row, 
+        fixedWidth: true,
+        coverGutter: true,
+        el: dom.createElement("div"),
+        type: "errorMarker"
+    };
+    var el = w.el.appendChild(dom.createElement("div"));
+    var arrow = w.el.appendChild(dom.createElement("div"));
+    arrow.className = "error_widget_arrow " + gutterAnno.className;
+    
+    var left = editor.renderer.$cursorLayer
+        .getPixelPosition(pos).left;
+    arrow.style.left = left + editor.renderer.gutterWidth - 5 + "px";
+    
+    w.el.className = "error_widget_wrapper";
+    el.className = "error_widget " + gutterAnno.className;
+    el.innerHTML = gutterAnno.text.join("<br>");
+    
+    el.appendChild(dom.createElement("div"));
+    
+    var kb = function(_, hashId, keyString) {
+        if (hashId === 0 && (keyString === "esc" || keyString === "return")) {
+            w.destroy();
+            return {command: "null"};
+        }
+    };
+    
+    w.destroy = function() {
+        if (editor.$mouseHandler.isMousePressed)
+            return;
+        editor.keyBinding.removeKeyboardHandler(kb);
+        session.widgetManager.removeLineWidget(w);
+        editor.off("changeSelection", w.destroy);
+        editor.off("changeSession", w.destroy);
+        editor.off("mouseup", w.destroy);
+        editor.off("change", w.destroy);
+    };
+    
+    editor.keyBinding.addKeyboardHandler(kb);
+    editor.on("changeSelection", w.destroy);
+    editor.on("changeSession", w.destroy);
+    editor.on("mouseup", w.destroy);
+    editor.on("change", w.destroy);
+    
+    editor.session.widgetManager.addLineWidget(w);
+    
+    w.el.onmousedown = editor.focus.bind(editor);
+    
+    editor.renderer.scrollCursorIntoView(null, 0.5, {bottom: w.el.offsetHeight});
+};
+
+
+dom.importCssString("\
+    .error_widget_wrapper {\
+        background: inherit;\
+        color: inherit;\
+        border:none\
+    }\
+    .error_widget {\
+        border-top: solid 2px;\
+        border-bottom: solid 2px;\
+        margin: 5px 0;\
+        padding: 10px 40px;\
+        white-space: pre-wrap;\
+    }\
+    .error_widget.ace_error, .error_widget_arrow.ace_error{\
+        border-color: #ff5a5a\
+    }\
+    .error_widget.ace_warning, .error_widget_arrow.ace_warning{\
+        border-color: #F1D817\
+    }\
+    .error_widget.ace_info, .error_widget_arrow.ace_info{\
+        border-color: #5a5a5a\
+    }\
+    .error_widget.ace_ok, .error_widget_arrow.ace_ok{\
+        border-color: #5aaa5a\
+    }\
+    .error_widget_arrow {\
+        position: absolute;\
+        border: solid 5px;\
+        border-top-color: transparent!important;\
+        border-right-color: transparent!important;\
+        border-left-color: transparent!important;\
+        top: -5px;\
+    }\
+", "");
+
+});
+
+define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"], function(require, exports, module) {
+"use strict";
+
+require("./lib/fixoldbrowsers");
+
+var dom = require("./lib/dom");
+var event = require("./lib/event");
+
+var Editor = require("./editor").Editor;
+var EditSession = require("./edit_session").EditSession;
+var UndoManager = require("./undomanager").UndoManager;
+var Renderer = require("./virtual_renderer").VirtualRenderer;
+require("./worker/worker_client");
+require("./keyboard/hash_handler");
+require("./placeholder");
+require("./multi_select");
+require("./mode/folding/fold_mode");
+require("./theme/textmate");
+require("./ext/error_marker");
+
+exports.config = require("./config");
+exports.require = require;
+exports.edit = function(el) {
+    if (typeof el == "string") {
+        var _id = el;
+        el = document.getElementById(_id);
+        if (!el)
+            throw new Error("ace.edit can't find div #" + _id);
+    }
+
+    if (el && el.env && el.env.editor instanceof Editor)
+        return el.env.editor;
+
+    var value = "";
+    if (el && /input|textarea/i.test(el.tagName)) {
+        var oldNode = el;
+        value = oldNode.value;
+        el = dom.createElement("pre");
+        oldNode.parentNode.replaceChild(el, oldNode);
+    } else if (el) {
+        value = dom.getInnerText(el);
+        el.innerHTML = "";
+    }
+
+    var doc = exports.createEditSession(value);
+
+    var editor = new Editor(new Renderer(el));
+    editor.setSession(doc);
+
+    var env = {
+        document: doc,
+        editor: editor,
+        onResize: editor.resize.bind(editor, null)
+    };
+    if (oldNode) env.textarea = oldNode;
+    event.addListener(window, "resize", env.onResize);
+    editor.on("destroy", function() {
+        event.removeListener(window, "resize", env.onResize);
+        env.editor.container.env = null; // prevent memory leak on old ie
+    });
+    editor.container.env = editor.env = env;
+    return editor;
+};
+exports.createEditSession = function(text, mode) {
+    var doc = new EditSession(text, mode);
+    doc.setUndoManager(new UndoManager());
+    return doc;
+}
+exports.EditSession = EditSession;
+exports.UndoManager = UndoManager;
+exports.version = "1.2.3";
+});
+            (function() {
+                window.require(["ace/ace"], function(a) {
+                    a && a.config.init(true);
+                    if (!window.ace)
+                        window.ace = a;
+                    for (var key in a) if (a.hasOwnProperty(key))
+                        window.ace[key] = a[key];
+                });
+            })();
+        
Index: EcnlProtoTool/trunk/webapp/webmrbc/ace/mode-ruby.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/ace/mode-ruby.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/ace/mode-ruby.js	(revision 270)
@@ -0,0 +1,843 @@
+define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var constantOtherSymbol = exports.constantOtherSymbol = {
+    token : "constant.other.symbol.ruby", // symbol
+    regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
+};
+
+var qString = exports.qString = {
+    token : "string", // single line
+    regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+};
+
+var qqString = exports.qqString = {
+    token : "string", // single line
+    regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+};
+
+var tString = exports.tString = {
+    token : "string", // backtick string
+    regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"
+};
+
+var constantNumericHex = exports.constantNumericHex = {
+    token : "constant.numeric", // hex
+    regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"
+};
+
+var constantNumericFloat = exports.constantNumericFloat = {
+    token : "constant.numeric", // float
+    regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"
+};
+
+var RubyHighlightRules = function() {
+
+    var builtinFunctions = (
+        "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" +
+        "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" +
+        "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" +
+        "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" +
+        "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" +
+        "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" +
+        "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" +
+        "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" +
+        "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" +
+        "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" +
+        "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" +
+        "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" +
+        "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" +
+        "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" +
+        "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" +
+        "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" +
+        "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" +
+        "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" +
+        "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" +
+        "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" +
+        "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" +
+        "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" +
+        "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" +
+        "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" +
+        "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" +
+        "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" +
+        "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" +
+        "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" +
+        "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" +
+        "has_many|has_one|belongs_to|has_and_belongs_to_many"
+    );
+
+    var keywords = (
+        "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" +
+        "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" +
+        "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield"
+    );
+
+    var buildinConstants = (
+        "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" +
+        "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING"
+    );
+
+    var builtinVariables = (
+        "\$DEBUG|\$defout|\$FILENAME|\$LOAD_PATH|\$SAFE|\$stdin|\$stdout|\$stderr|\$VERBOSE|" +
+        "$!|root_url|flash|session|cookies|params|request|response|logger|self"
+    );
+
+    var keywordMapper = this.$keywords = this.createKeywordMapper({
+        "keyword": keywords,
+        "constant.language": buildinConstants,
+        "variable.language": builtinVariables,
+        "support.function": builtinFunctions,
+        "invalid.deprecated": "debugger" // TODO is this a remnant from js mode?
+    }, "identifier");
+
+    this.$rules = {
+        "start" : [
+            {
+                token : "comment",
+                regex : "#.*$"
+            }, {
+                token : "comment", // multi line comment
+                regex : "^=begin(?:$|\\s.*$)",
+                next : "comment"
+            }, {
+                token : "string.regexp",
+                regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+            },
+
+            [{
+                regex: "[{}]", onMatch: function(val, state, stack) {
+                    this.next = val == "{" ? this.nextState : "";
+                    if (val == "{" && stack.length) {
+                        stack.unshift("start", state);
+                        return "paren.lparen";
+                    }
+                    if (val == "}" && stack.length) {
+                        stack.shift();
+                        this.next = stack.shift();
+                        if (this.next.indexOf("string") != -1)
+                            return "paren.end";
+                    }
+                    return val == "{" ? "paren.lparen" : "paren.rparen";
+                },
+                nextState: "start"
+            }, {
+                token : "string.start",
+                regex : /"/,
+                push  : [{
+                    token : "constant.language.escape",
+                    regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
+                }, {
+                    token : "paren.start",
+                    regex : /\#{/,
+                    push  : "start"
+                }, {
+                    token : "string.end",
+                    regex : /"/,
+                    next  : "pop"
+                }, {
+                    defaultToken: "string"
+                }]
+            }, {
+                token : "string.start",
+                regex : /`/,
+                push  : [{
+                    token : "constant.language.escape",
+                    regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
+                }, {
+                    token : "paren.start",
+                    regex : /\#{/,
+                    push  : "start"
+                }, {
+                    token : "string.end",
+                    regex : /`/,
+                    next  : "pop"
+                }, {
+                    defaultToken: "string"
+                }]
+            }, {
+                token : "string.start",
+                regex : /'/,
+                push  : [{
+                    token : "constant.language.escape",
+                    regex : /\\['\\]/
+                },  {
+                    token : "string.end",
+                    regex : /'/,
+                    next  : "pop"
+                }, {
+                    defaultToken: "string"
+                }]
+            }],
+
+            {
+                token : "text", // namespaces aren't symbols
+                regex : "::"
+            }, {
+                token : "variable.instance", // instance variable
+                regex : "@{1,2}[a-zA-Z_\\d]+"
+            }, {
+                token : "support.class", // class name
+                regex : "[A-Z][a-zA-Z_\\d]+"
+            },
+
+            constantOtherSymbol,
+            constantNumericHex,
+            constantNumericFloat,
+
+            {
+                token : "constant.language.boolean",
+                regex : "(?:true|false)\\b"
+            }, {
+                token : keywordMapper,
+                regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+            }, {
+                token : "punctuation.separator.key-value",
+                regex : "=>"
+            }, {
+                stateName: "heredoc",
+                onMatch : function(value, currentState, stack) {
+                    var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
+                    var tokens = value.split(this.splitRegex);
+                    stack.push(next, tokens[3]);
+                    return [
+                        {type:"constant", value: tokens[1]},
+                        {type:"string", value: tokens[2]},
+                        {type:"support.class", value: tokens[3]},
+                        {type:"string", value: tokens[4]}
+                    ];
+                },
+                regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)",
+                rules: {
+                    heredoc: [{
+                        onMatch:  function(value, currentState, stack) {
+                            if (value === stack[1]) {
+                                stack.shift();
+                                stack.shift();
+                                this.next = stack[0] || "start";
+                                return "support.class";
+                            }
+                            this.next = "";
+                            return "string";
+                        },
+                        regex: ".*$",
+                        next: "start"
+                    }],
+                    indentedHeredoc: [{
+                        token: "string",
+                        regex: "^ +"
+                    }, {
+                        onMatch:  function(value, currentState, stack) {
+                            if (value === stack[1]) {
+                                stack.shift();
+                                stack.shift();
+                                this.next = stack[0] || "start";
+                                return "support.class";
+                            }
+                            this.next = "";
+                            return "string";
+                        },
+                        regex: ".*$",
+                        next: "start"
+                    }]
+                }
+            }, {
+                regex : "$",
+                token : "empty",
+                next : function(currentState, stack) {
+                    if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
+                        return stack[0];
+                    return currentState;
+                }
+            }, {
+               token : "string.character",
+               regex : "\\B\\?."
+            }, {
+                token : "keyword.operator",
+                regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+            }, {
+                token : "paren.lparen",
+                regex : "[[({]"
+            }, {
+                token : "paren.rparen",
+                regex : "[\\])}]"
+            }, {
+                token : "text",
+                regex : "\\s+"
+            }
+        ],
+        "comment" : [
+            {
+                token : "comment", // closing comment
+                regex : "^=end(?:$|\\s.*$)",
+                next : "start"
+            }, {
+                token : "comment", // comment spanning whole line
+                regex : ".+"
+            }
+        ]
+    };
+
+    this.normalizeRules();
+};
+
+oop.inherits(RubyHighlightRules, TextHighlightRules);
+
+exports.RubyHighlightRules = RubyHighlightRules;
+});
+
+define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+    this.checkOutdent = function(line, input) {
+        if (! /^\s+$/.test(line))
+            return false;
+
+        return /^\s*\}/.test(input);
+    };
+
+    this.autoOutdent = function(doc, row) {
+        var line = doc.getLine(row);
+        var match = line.match(/^(\s*\})/);
+
+        if (!match) return 0;
+
+        var column = match[1].length;
+        var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+        if (!openBracePos || openBracePos.row == row) return 0;
+
+        var indent = this.$getIndent(doc.getLine(openBracePos.row));
+        doc.replace(new Range(row, 0, row, column-1), indent);
+    };
+
+    this.$getIndent = function(line) {
+        return line.match(/^\s*/)[0];
+    };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+    ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+    ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+var context;
+var contextCache = {};
+var initContext = function(editor) {
+    var id = -1;
+    if (editor.multiSelect) {
+        id = editor.selection.index;
+        if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+            contextCache = {rangeCount: editor.multiSelect.rangeCount};
+    }
+    if (contextCache[id])
+        return context = contextCache[id];
+    context = contextCache[id] = {
+        autoInsertedBrackets: 0,
+        autoInsertedRow: -1,
+        autoInsertedLineEnd: "",
+        maybeInsertedBrackets: 0,
+        maybeInsertedRow: -1,
+        maybeInsertedLineStart: "",
+        maybeInsertedLineEnd: ""
+    };
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+    var rowDiff = selection.end.row - selection.start.row;
+    return {
+        text: opening + selected + closing,
+        selection: [
+                0,
+                selection.start.column + 1,
+                rowDiff,
+                selection.end.column + (rowDiff ? 0 : 1)
+            ]
+    };
+};
+
+var CstyleBehaviour = function() {
+    this.add("braces", "insertion", function(state, action, editor, session, text) {
+        var cursor = editor.getCursorPosition();
+        var line = session.doc.getLine(cursor.row);
+        if (text == '{') {
+            initContext(editor);
+            var selection = editor.getSelectionRange();
+            var selected = session.doc.getTextRange(selection);
+            if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+                return getWrapped(selection, selected, '{', '}');
+            } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+                if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
+                    CstyleBehaviour.recordAutoInsert(editor, session, "}");
+                    return {
+                        text: '{}',
+                        selection: [1, 1]
+                    };
+                } else {
+                    CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+                    return {
+                        text: '{',
+                        selection: [1, 1]
+                    };
+                }
+            }
+        } else if (text == '}') {
+            initContext(editor);
+            var rightChar = line.substring(cursor.column, cursor.column + 1);
+            if (rightChar == '}') {
+                var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+                if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+                    CstyleBehaviour.popAutoInsertedClosing();
+                    return {
+                        text: '',
+                        selection: [1, 1]
+                    };
+                }
+            }
+        } else if (text == "\n" || text == "\r\n") {
+            initContext(editor);
+            var closing = "";
+            if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+                closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
+                CstyleBehaviour.clearMaybeInsertedClosing();
+            }
+            var rightChar = line.substring(cursor.column, cursor.column + 1);
+            if (rightChar === '}') {
+                var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
+                if (!openBracePos)
+                     return null;
+                var next_indent = this.$getIndent(session.getLine(openBracePos.row));
+            } else if (closing) {
+                var next_indent = this.$getIndent(line);
+            } else {
+                CstyleBehaviour.clearMaybeInsertedClosing();
+                return;
+            }
+            var indent = next_indent + session.getTabString();
+
+            return {
+                text: '\n' + indent + '\n' + next_indent + closing,
+                selection: [1, indent.length, 1, indent.length]
+            };
+        } else {
+            CstyleBehaviour.clearMaybeInsertedClosing();
+        }
+    });
+
+    this.add("braces", "deletion", function(state, action, editor, session, range) {
+        var selected = session.doc.getTextRange(range);
+        if (!range.isMultiLine() && selected == '{') {
+            initContext(editor);
+            var line = session.doc.getLine(range.start.row);
+            var rightChar = line.substring(range.end.column, range.end.column + 1);
+            if (rightChar == '}') {
+                range.end.column++;
+                return range;
+            } else {
+                context.maybeInsertedBrackets--;
+            }
+        }
+    });
+
+    this.add("parens", "insertion", function(state, action, editor, session, text) {
+        if (text == '(') {
+            initContext(editor);
+            var selection = editor.getSelectionRange();
+            var selected = session.doc.getTextRange(selection);
+            if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+                return getWrapped(selection, selected, '(', ')');
+            } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+                CstyleBehaviour.recordAutoInsert(editor, session, ")");
+                return {
+                    text: '()',
+                    selection: [1, 1]
+                };
+            }
+        } else if (text == ')') {
+            initContext(editor);
+            var cursor = editor.getCursorPosition();
+            var line = session.doc.getLine(cursor.row);
+            var rightChar = line.substring(cursor.column, cursor.column + 1);
+            if (rightChar == ')') {
+                var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+                if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+                    CstyleBehaviour.popAutoInsertedClosing();
+                    return {
+                        text: '',
+                        selection: [1, 1]
+                    };
+                }
+            }
+        }
+    });
+
+    this.add("parens", "deletion", function(state, action, editor, session, range) {
+        var selected = session.doc.getTextRange(range);
+        if (!range.isMultiLine() && selected == '(') {
+            initContext(editor);
+            var line = session.doc.getLine(range.start.row);
+            var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+            if (rightChar == ')') {
+                range.end.column++;
+                return range;
+            }
+        }
+    });
+
+    this.add("brackets", "insertion", function(state, action, editor, session, text) {
+        if (text == '[') {
+            initContext(editor);
+            var selection = editor.getSelectionRange();
+            var selected = session.doc.getTextRange(selection);
+            if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+                return getWrapped(selection, selected, '[', ']');
+            } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+                CstyleBehaviour.recordAutoInsert(editor, session, "]");
+                return {
+                    text: '[]',
+                    selection: [1, 1]
+                };
+            }
+        } else if (text == ']') {
+            initContext(editor);
+            var cursor = editor.getCursorPosition();
+            var line = session.doc.getLine(cursor.row);
+            var rightChar = line.substring(cursor.column, cursor.column + 1);
+            if (rightChar == ']') {
+                var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+                if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+                    CstyleBehaviour.popAutoInsertedClosing();
+                    return {
+                        text: '',
+                        selection: [1, 1]
+                    };
+                }
+            }
+        }
+    });
+
+    this.add("brackets", "deletion", function(state, action, editor, session, range) {
+        var selected = session.doc.getTextRange(range);
+        if (!range.isMultiLine() && selected == '[') {
+            initContext(editor);
+            var line = session.doc.getLine(range.start.row);
+            var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+            if (rightChar == ']') {
+                range.end.column++;
+                return range;
+            }
+        }
+    });
+
+    this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
+        if (text == '"' || text == "'") {
+            initContext(editor);
+            var quote = text;
+            var selection = editor.getSelectionRange();
+            var selected = session.doc.getTextRange(selection);
+            if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+                return getWrapped(selection, selected, quote, quote);
+            } else if (!selected) {
+                var cursor = editor.getCursorPosition();
+                var line = session.doc.getLine(cursor.row);
+                var leftChar = line.substring(cursor.column-1, cursor.column);
+                var rightChar = line.substring(cursor.column, cursor.column + 1);
+                
+                var token = session.getTokenAt(cursor.row, cursor.column);
+                var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+                if (leftChar == "\\" && token && /escape/.test(token.type))
+                    return null;
+                
+                var stringBefore = token && /string|escape/.test(token.type);
+                var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
+                
+                var pair;
+                if (rightChar == quote) {
+                    pair = stringBefore !== stringAfter;
+                } else {
+                    if (stringBefore && !stringAfter)
+                        return null; // wrap string with different quote
+                    if (stringBefore && stringAfter)
+                        return null; // do not pair quotes inside strings
+                    var wordRe = session.$mode.tokenRe;
+                    wordRe.lastIndex = 0;
+                    var isWordBefore = wordRe.test(leftChar);
+                    wordRe.lastIndex = 0;
+                    var isWordAfter = wordRe.test(leftChar);
+                    if (isWordBefore || isWordAfter)
+                        return null; // before or after alphanumeric
+                    if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+                        return null; // there is rightChar and it isn't closing
+                    pair = true;
+                }
+                return {
+                    text: pair ? quote + quote : "",
+                    selection: [1,1]
+                };
+            }
+        }
+    });
+
+    this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
+        var selected = session.doc.getTextRange(range);
+        if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+            initContext(editor);
+            var line = session.doc.getLine(range.start.row);
+            var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+            if (rightChar == selected) {
+                range.end.column++;
+                return range;
+            }
+        }
+    });
+
+};
+
+    
+CstyleBehaviour.isSaneInsertion = function(editor, session) {
+    var cursor = editor.getCursorPosition();
+    var iterator = new TokenIterator(session, cursor.row, cursor.column);
+    if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+        var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+        if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+            return false;
+    }
+    iterator.stepForward();
+    return iterator.getCurrentTokenRow() !== cursor.row ||
+        this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+};
+
+CstyleBehaviour.$matchTokenType = function(token, types) {
+    return types.indexOf(token.type || token) > -1;
+};
+
+CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+    var cursor = editor.getCursorPosition();
+    var line = session.doc.getLine(cursor.row);
+    if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
+        context.autoInsertedBrackets = 0;
+    context.autoInsertedRow = cursor.row;
+    context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+    context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+    var cursor = editor.getCursorPosition();
+    var line = session.doc.getLine(cursor.row);
+    if (!this.isMaybeInsertedClosing(cursor, line))
+        context.maybeInsertedBrackets = 0;
+    context.maybeInsertedRow = cursor.row;
+    context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+    context.maybeInsertedLineEnd = line.substr(cursor.column);
+    context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+    return context.autoInsertedBrackets > 0 &&
+        cursor.row === context.autoInsertedRow &&
+        bracket === context.autoInsertedLineEnd[0] &&
+        line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+    return context.maybeInsertedBrackets > 0 &&
+        cursor.row === context.maybeInsertedRow &&
+        line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+        line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+    context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+    context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+    if (context) {
+        context.maybeInsertedBrackets = 0;
+        context.maybeInsertedRow = -1;
+    }
+};
+
+
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+    this.getFoldWidgetRange = function(session, foldStyle, row) {
+        var range = this.indentationBlock(session, row);
+        if (range)
+            return range;
+
+        var re = /\S/;
+        var line = session.getLine(row);
+        var startLevel = line.search(re);
+        if (startLevel == -1 || line[startLevel] != "#")
+            return;
+
+        var startColumn = line.length;
+        var maxRow = session.getLength();
+        var startRow = row;
+        var endRow = row;
+
+        while (++row < maxRow) {
+            line = session.getLine(row);
+            var level = line.search(re);
+
+            if (level == -1)
+                continue;
+
+            if (line[level] != "#")
+                break;
+
+            endRow = row;
+        }
+
+        if (endRow > startRow) {
+            var endColumn = session.getLine(endRow).length;
+            return new Range(startRow, startColumn, endRow, endColumn);
+        }
+    };
+    this.getFoldWidget = function(session, foldStyle, row) {
+        var line = session.getLine(row);
+        var indent = line.search(/\S/);
+        var next = session.getLine(row + 1);
+        var prev = session.getLine(row - 1);
+        var prevIndent = prev.search(/\S/);
+        var nextIndent = next.search(/\S/);
+
+        if (indent == -1) {
+            session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
+            return "";
+        }
+        if (prevIndent == -1) {
+            if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
+                session.foldWidgets[row - 1] = "";
+                session.foldWidgets[row + 1] = "";
+                return "start";
+            }
+        } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
+            if (session.getLine(row - 2).search(/\S/) == -1) {
+                session.foldWidgets[row - 1] = "start";
+                session.foldWidgets[row + 1] = "";
+                return "";
+            }
+        }
+
+        if (prevIndent!= -1 && prevIndent < indent)
+            session.foldWidgets[row - 1] = "start";
+        else
+            session.foldWidgets[row - 1] = "";
+
+        if (indent < nextIndent)
+            return "start";
+        else
+            return "";
+    };
+
+}).call(FoldMode.prototype);
+
+});
+
+define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+    this.HighlightRules = RubyHighlightRules;
+    this.$outdent = new MatchingBraceOutdent();
+    this.$behaviour = new CstyleBehaviour();
+    this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+    this.lineCommentStart = "#";
+
+    this.getNextLineIndent = function(state, line, tab) {
+        var indent = this.$getIndent(line);
+
+        var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+        var tokens = tokenizedLine.tokens;
+
+        if (tokens.length && tokens[tokens.length-1].type == "comment") {
+            return indent;
+        }
+
+        if (state == "start") {
+            var match = line.match(/^.*[\{\(\[]\s*$/);
+            var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/);
+            var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/);
+            var startingConditional = line.match(/^\s*(if|else|when)\s*/)
+            if (match || startingClassOrMethod || startingDoBlock || startingConditional) {
+                indent += tab;
+            }
+        }
+
+        return indent;
+    };
+
+    this.checkOutdent = function(state, line, input) {
+        return /^\s+(end|else)$/.test(line + input) || this.$outdent.checkOutdent(line, input);
+    };
+
+    this.autoOutdent = function(state, session, row) {
+        var line = session.getLine(row);
+        if (/}/.test(line))
+            return this.$outdent.autoOutdent(session, row);
+        var indent = this.$getIndent(line);
+        var prevLine = session.getLine(row - 1);
+        var prevIndent = this.$getIndent(prevLine);
+        var tab = session.getTabString();
+        if (prevIndent.length <= indent.length) {
+            if (indent.slice(-tab.length) == tab)
+                session.remove(new Range(row, indent.length-tab.length, row, indent.length));
+        }
+    };
+
+    this.$id = "ace/mode/ruby";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
Index: EcnlProtoTool/trunk/webapp/webmrbc/ace/theme-twilight.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/ace/theme-twilight.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/ace/theme-twilight.js	(revision 270)
@@ -0,0 +1,109 @@
+define("ace/theme/twilight",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-twilight";
+exports.cssText = ".ace-twilight .ace_gutter {\
+background: #232323;\
+color: #E2E2E2\
+}\
+.ace-twilight .ace_print-margin {\
+width: 1px;\
+background: #232323\
+}\
+.ace-twilight {\
+background-color: #141414;\
+color: #F8F8F8\
+}\
+.ace-twilight .ace_cursor {\
+color: #A7A7A7\
+}\
+.ace-twilight .ace_marker-layer .ace_selection {\
+background: rgba(221, 240, 255, 0.20)\
+}\
+.ace-twilight.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #141414;\
+}\
+.ace-twilight .ace_marker-layer .ace_step {\
+background: rgb(102, 82, 0)\
+}\
+.ace-twilight .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgba(255, 255, 255, 0.25)\
+}\
+.ace-twilight .ace_marker-layer .ace_active-line {\
+background: rgba(255, 255, 255, 0.031)\
+}\
+.ace-twilight .ace_gutter-active-line {\
+background-color: rgba(255, 255, 255, 0.031)\
+}\
+.ace-twilight .ace_marker-layer .ace_selected-word {\
+border: 1px solid rgba(221, 240, 255, 0.20)\
+}\
+.ace-twilight .ace_invisible {\
+color: rgba(255, 255, 255, 0.25)\
+}\
+.ace-twilight .ace_keyword,\
+.ace-twilight .ace_meta {\
+color: #CDA869\
+}\
+.ace-twilight .ace_constant,\
+.ace-twilight .ace_constant.ace_character,\
+.ace-twilight .ace_constant.ace_character.ace_escape,\
+.ace-twilight .ace_constant.ace_other,\
+.ace-twilight .ace_heading,\
+.ace-twilight .ace_markup.ace_heading,\
+.ace-twilight .ace_support.ace_constant {\
+color: #CF6A4C\
+}\
+.ace-twilight .ace_invalid.ace_illegal {\
+color: #F8F8F8;\
+background-color: rgba(86, 45, 86, 0.75)\
+}\
+.ace-twilight .ace_invalid.ace_deprecated {\
+text-decoration: underline;\
+font-style: italic;\
+color: #D2A8A1\
+}\
+.ace-twilight .ace_support {\
+color: #9B859D\
+}\
+.ace-twilight .ace_fold {\
+background-color: #AC885B;\
+border-color: #F8F8F8\
+}\
+.ace-twilight .ace_support.ace_function {\
+color: #DAD085\
+}\
+.ace-twilight .ace_list,\
+.ace-twilight .ace_markup.ace_list,\
+.ace-twilight .ace_storage {\
+color: #F9EE98\
+}\
+.ace-twilight .ace_entity.ace_name.ace_function,\
+.ace-twilight .ace_meta.ace_tag,\
+.ace-twilight .ace_variable {\
+color: #AC885B\
+}\
+.ace-twilight .ace_string {\
+color: #8F9D6A\
+}\
+.ace-twilight .ace_string.ace_regexp {\
+color: #E9C062\
+}\
+.ace-twilight .ace_comment {\
+font-style: italic;\
+color: #5F5A60\
+}\
+.ace-twilight .ace_variable {\
+color: #7587A6\
+}\
+.ace-twilight .ace_xml-pe {\
+color: #494949\
+}\
+.ace-twilight .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
Index: EcnlProtoTool/trunk/webapp/webmrbc/arduino_toolbox.xml
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/arduino_toolbox.xml	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/arduino_toolbox.xml	(revision 270)
@@ -0,0 +1,386 @@
+<xml id="toolbox" style="display: none">
+	<category name="Kernel" colour="160">
+		<block type="call"></block>
+		<block type="pin_mode"></block>
+		<block type="digital_write"></block>
+		<block type="digital_read"></block>
+		<block type="analog_read"></block>
+		<block type="pwm">
+			<value name="PWM_OUT">
+				<shadow type="pwm_value"></shadow>
+			</value>
+		</block>
+		<block type="pwm_value"></block>
+		<block type="analog_reference"></block>
+		<block type="init_dac"></block>
+		<block type="analog_dac">
+			<value name="VALUE">
+				<shadow type="dac_value"></shadow>
+			</value>
+		</block>
+		<block type="dac_value"></block>
+		<block type="delay">
+			<value name="VALUE">
+				<shadow type="math_number">
+					<field name="NUM">1</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="millis"></block>
+		<block type="micros"></block>
+		<block type="led">
+			<value name="SW">
+				<shadow type="bit"></shadow>
+			</value>
+		</block>
+		<block type="bit"></block>
+		<block type="hexadecimal"></block>
+		<block type="tone">
+			<value name="FREQUENCY">
+				<shadow type="tone_value"></shadow>
+			</value>
+			<value name="DURATION">
+				<shadow type="math_number">
+					<field name="NUM">0</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="tone_value"></block>
+		<block type="no_tone"></block>
+		<block type="random_seed">
+			<value name="VALUE">
+				<shadow type="math_number">
+					<field name="NUM">0</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="random">
+			<value name="MIN">
+				<shadow type="math_number">
+					<field name="NUM">0</field>
+				</shadow>
+			</value>
+			<value name="MAX">
+				<shadow type="math_number">
+					<field name="NUM">100</field>
+				</shadow>
+			</value>
+		</block>
+	</category>
+	<category name="System" colour="160">
+		<block type="system_exit"></block>
+		<block type="system_setrun">
+			<value name="FILENAME">
+				<shadow type="text">
+					<field name="TEXT">filename.ext</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="system_version"></block>
+		<block type="system_push">
+			<value name="ADDRESS">
+				<shadow type="hexadecimal"></shadow>
+			</value>
+			<value name="DATA">
+				<shadow type="text"></shadow>
+			</value>
+			<value name="LENGTH">
+				<shadow type="math_number">
+					<field name="NUM">1</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="system_pop">
+			<value name="ADDRESS">
+				<shadow type="hexadecimal"></shadow>
+			</value>
+			<value name="LENGTH">
+				<shadow type="math_number">
+					<field name="NUM">1</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="system_fileload"></block>
+		<block type="system_reset"></block>
+		<block type="system_use_sd"></block>
+		<block type="system_use_wifi"></block>
+		<block type="system_get_mrb_path"></block>
+	</category>
+	<category name="MemFile" colour="160">
+		<block type="memfile_open">
+			<value name="FILENAME">
+				<shadow type="text">
+					<field name="TEXT">filename.ext</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="memfile_close"></block>
+		<block type="memfile_read"></block>
+		<block type="memfile_write">
+			<value name="DATA">
+				<shadow type="text"></shadow>
+			</value>
+			<value name="LENGTH">
+				<shadow type="math_number">
+					<field name="NUM">1</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="memfile_seek">
+			<value name="POSITION">
+				<shadow type="math_number"></shadow>
+			</value>
+		</block>
+		<block type="memfile_cp">
+			<value name="SRC_FILENAME">
+				<shadow type="text">
+					<field name="TEXT">src.ext</field>
+				</shadow>
+			</value>
+			<value name="DST_FILENAME">
+				<shadow type="text">
+					<field name="TEXT">dst.ext</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="memfile_rm">
+			<value name="FILENAME">
+				<shadow type="text">
+					<field name="TEXT">filename.ext</field>
+				</shadow>
+			</value>
+		</block>
+	</category>
+	<category name="Serial" colour="160">
+		<block type="serial_new">
+			<value name="BPS">
+				<shadow type="bps_value">
+					<field name="VALUE">9.6kbps</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="serial_bps">
+			<value name="BPS">
+				<shadow type="bps_value">
+					<field name="VALUE">9.6kbps</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="serial_print">
+			<value name="STR">
+				<shadow type="text"></shadow>
+			</value>
+		</block>
+		<block type="serial_println">
+			<value name="STR">
+				<shadow type="text"></shadow>
+			</value>
+		</block>
+		<block type="serial_available"></block>
+		<block type="serial_read"></block>
+		<block type="serial_write">
+			<value name="DATA">
+				<shadow type="text"></shadow>
+			</value>
+			<value name="LENGTH">
+				<shadow type="math_number">
+					<field name="NUM">1</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="serial_flash"></block>
+		<block type="bps_value">
+			<field name="VALUE">9.6kbps</field>
+		</block>
+	</category>
+	<category name="I2C" colour="160">
+		<block type="i2c_new"></block>
+		<block type="i2c_write">
+			<value name="ADDRESS">
+				<shadow type="hexadecimal"></shadow>
+			</value>
+			<value name="DATA">
+				<shadow type="math_number"></shadow>
+			</value>
+		</block>
+		<block type="i2c_read">
+			<value name="ADDRESS_L">
+				<shadow type="hexadecimal"></shadow>
+			</value>
+			<value name="ADDRESS_H">
+				<shadow type="hexadecimal"></shadow>
+			</value>
+		</block>
+		<block type="i2c_begin"></block>
+		<block type="i2c_lwrite">
+			<value name="DATA">
+				<shadow type="math_number"></shadow>
+			</value>
+		</block>
+		<block type="i2c_end"></block>
+		<block type="i2c_request">
+			<value name="ADDRESS">
+				<shadow type="hexadecimal"></shadow>
+			</value>
+			<value name="COUNT">
+				<shadow type="math_number">
+					<field name="NUM">1</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="i2c_lread"></block>
+		<block type="i2c_available"></block>
+		<block type="i2c_frequency">
+			<value name="FREQUENCY">
+				<shadow type="math_number">
+					<field name="NUM">1</field>
+				</shadow>
+			</value>
+		</block>
+	</category>
+	<category name="Servo" colour="160">
+		<block type="servo_attach"></block>
+		<block type="servo_write">
+			<value name="ANGLE">
+				<shadow type="servo_angle"></shadow>
+			</value>
+		</block>
+		<block type="servo_us">
+			<value name="US">
+				<shadow type="servo_us_value"></shadow>
+			</value>
+		</block>
+		<block type="servo_read"></block>
+		<block type="servo_attached"></block>
+		<block type="servo_detach"></block>
+		<block type="servo_angle"></block>
+		<block type="servo_us_value"></block>
+	</category>
+	<category name="RTC" colour="160">
+		<block type="rtc_gettime"></block>
+		<block type="rtc_settime">
+			<value name="DATE">
+				<block type="rtc_datetime">
+					<value name="YEAR">
+						<shadow type="rtc_year"></shadow>
+					</value>
+					<value name="MONTH">
+						<shadow type="rtc_month"></shadow>
+					</value>
+					<value name="DAY">
+						<shadow type="rtc_day"></shadow>
+					</value>
+					<value name="HOUR">
+						<shadow type="rtc_hour"></shadow>
+					</value>
+					<value name="MINUTE">
+						<shadow type="rtc_minute"></shadow>
+					</value>
+					<value name="SECOND">
+						<shadow type="rtc_second"></shadow>
+					</value>
+				</block>
+			</value>
+		</block>
+		<block type="rtc_deinit"></block>
+		<block type="rtc_init"></block>
+		<block type="rtc_datetime">
+			<value name="YEAR">
+				<shadow type="rtc_year"></shadow>
+			</value>
+			<value name="MONTH">
+				<shadow type="rtc_month"></shadow>
+			</value>
+			<value name="DAY">
+				<shadow type="rtc_day"></shadow>
+			</value>
+			<value name="HOUR">
+				<shadow type="rtc_hour"></shadow>
+			</value>
+			<value name="MINUTE">
+				<shadow type="rtc_minute"></shadow>
+			</value>
+			<value name="SECOND">
+				<shadow type="rtc_second"></shadow>
+			</value>
+		</block>
+		<block type="rtc_get_datetime_item"></block>
+		<block type="rtc_set_datetime_item"></block>
+		<block type="rtc_year"></block>
+		<block type="rtc_month"></block>
+		<block type="rtc_day"></block>
+		<block type="rtc_hour"></block>
+		<block type="rtc_minute"></block>
+		<block type="rtc_second"></block>
+		<block type="rtc_weekday"></block>
+	</category>
+	<category name="SD" colour="160">
+		<block type="sd_exists">
+			<value name="FILENAME">
+				<shadow type="text">
+					<field name="TEXT">filename.ext</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="sd_mkdir">
+			<value name="DIRNAME">
+				<shadow type="text">
+					<field name="TEXT">dirname</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="sd_remove">
+			<value name="FILENAME">
+				<shadow type="text">
+					<field name="TEXT">filename.ext</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="sd_copy">
+			<value name="SRC_FILENAME">
+				<shadow type="text">
+					<field name="TEXT">src.ext</field>
+				</shadow>
+			</value>
+			<value name="DST_FILENAME">
+				<shadow type="text">
+					<field name="TEXT">dst.ext</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="sd_rmdir">
+			<value name="DIRNAME">
+				<shadow type="text">
+					<field name="TEXT">dirname</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="sd_open">
+			<value name="FILENAME">
+				<shadow type="text">
+					<field name="TEXT">filename.ext</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="sd_close"></block>
+		<block type="sd_read"></block>
+		<block type="sd_seek">
+			<value name="POSITION">
+				<shadow type="math_number"></shadow>
+			</value>
+		</block>
+		<block type="sd_write">
+			<value name="DATA">
+				<shadow type="text"></shadow>
+			</value>
+			<value name="LENGTH">
+				<shadow type="math_number">
+					<field name="NUM">1</field>
+				</shadow>
+			</value>
+		</block>
+		<block type="sd_flush"></block>
+		<block type="sd_size"></block>
+		<block type="sd_position"></block>
+	</category>
+</xml>
Index: EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap-theme.css
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap-theme.css	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap-theme.css	(revision 270)
@@ -0,0 +1,587 @@
+/*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+.btn-default,
+.btn-primary,
+.btn-success,
+.btn-info,
+.btn-warning,
+.btn-danger {
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
+          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
+}
+.btn-default:active,
+.btn-primary:active,
+.btn-success:active,
+.btn-info:active,
+.btn-warning:active,
+.btn-danger:active,
+.btn-default.active,
+.btn-primary.active,
+.btn-success.active,
+.btn-info.active,
+.btn-warning.active,
+.btn-danger.active {
+  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+}
+.btn-default.disabled,
+.btn-primary.disabled,
+.btn-success.disabled,
+.btn-info.disabled,
+.btn-warning.disabled,
+.btn-danger.disabled,
+.btn-default[disabled],
+.btn-primary[disabled],
+.btn-success[disabled],
+.btn-info[disabled],
+.btn-warning[disabled],
+.btn-danger[disabled],
+fieldset[disabled] .btn-default,
+fieldset[disabled] .btn-primary,
+fieldset[disabled] .btn-success,
+fieldset[disabled] .btn-info,
+fieldset[disabled] .btn-warning,
+fieldset[disabled] .btn-danger {
+  -webkit-box-shadow: none;
+          box-shadow: none;
+}
+.btn-default .badge,
+.btn-primary .badge,
+.btn-success .badge,
+.btn-info .badge,
+.btn-warning .badge,
+.btn-danger .badge {
+  text-shadow: none;
+}
+.btn:active,
+.btn.active {
+  background-image: none;
+}
+.btn-default {
+  text-shadow: 0 1px 0 #fff;
+  background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
+  background-image:      -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
+  background-image:         linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-color: #dbdbdb;
+  border-color: #ccc;
+}
+.btn-default:hover,
+.btn-default:focus {
+  background-color: #e0e0e0;
+  background-position: 0 -15px;
+}
+.btn-default:active,
+.btn-default.active {
+  background-color: #e0e0e0;
+  border-color: #dbdbdb;
+}
+.btn-default.disabled,
+.btn-default[disabled],
+fieldset[disabled] .btn-default,
+.btn-default.disabled:hover,
+.btn-default[disabled]:hover,
+fieldset[disabled] .btn-default:hover,
+.btn-default.disabled:focus,
+.btn-default[disabled]:focus,
+fieldset[disabled] .btn-default:focus,
+.btn-default.disabled.focus,
+.btn-default[disabled].focus,
+fieldset[disabled] .btn-default.focus,
+.btn-default.disabled:active,
+.btn-default[disabled]:active,
+fieldset[disabled] .btn-default:active,
+.btn-default.disabled.active,
+.btn-default[disabled].active,
+fieldset[disabled] .btn-default.active {
+  background-color: #e0e0e0;
+  background-image: none;
+}
+.btn-primary {
+  background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
+  background-image:      -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
+  background-image:         linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-color: #245580;
+}
+.btn-primary:hover,
+.btn-primary:focus {
+  background-color: #265a88;
+  background-position: 0 -15px;
+}
+.btn-primary:active,
+.btn-primary.active {
+  background-color: #265a88;
+  border-color: #245580;
+}
+.btn-primary.disabled,
+.btn-primary[disabled],
+fieldset[disabled] .btn-primary,
+.btn-primary.disabled:hover,
+.btn-primary[disabled]:hover,
+fieldset[disabled] .btn-primary:hover,
+.btn-primary.disabled:focus,
+.btn-primary[disabled]:focus,
+fieldset[disabled] .btn-primary:focus,
+.btn-primary.disabled.focus,
+.btn-primary[disabled].focus,
+fieldset[disabled] .btn-primary.focus,
+.btn-primary.disabled:active,
+.btn-primary[disabled]:active,
+fieldset[disabled] .btn-primary:active,
+.btn-primary.disabled.active,
+.btn-primary[disabled].active,
+fieldset[disabled] .btn-primary.active {
+  background-color: #265a88;
+  background-image: none;
+}
+.btn-success {
+  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
+  background-image:      -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
+  background-image:         linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-color: #3e8f3e;
+}
+.btn-success:hover,
+.btn-success:focus {
+  background-color: #419641;
+  background-position: 0 -15px;
+}
+.btn-success:active,
+.btn-success.active {
+  background-color: #419641;
+  border-color: #3e8f3e;
+}
+.btn-success.disabled,
+.btn-success[disabled],
+fieldset[disabled] .btn-success,
+.btn-success.disabled:hover,
+.btn-success[disabled]:hover,
+fieldset[disabled] .btn-success:hover,
+.btn-success.disabled:focus,
+.btn-success[disabled]:focus,
+fieldset[disabled] .btn-success:focus,
+.btn-success.disabled.focus,
+.btn-success[disabled].focus,
+fieldset[disabled] .btn-success.focus,
+.btn-success.disabled:active,
+.btn-success[disabled]:active,
+fieldset[disabled] .btn-success:active,
+.btn-success.disabled.active,
+.btn-success[disabled].active,
+fieldset[disabled] .btn-success.active {
+  background-color: #419641;
+  background-image: none;
+}
+.btn-info {
+  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
+  background-image:      -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
+  background-image:         linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-color: #28a4c9;
+}
+.btn-info:hover,
+.btn-info:focus {
+  background-color: #2aabd2;
+  background-position: 0 -15px;
+}
+.btn-info:active,
+.btn-info.active {
+  background-color: #2aabd2;
+  border-color: #28a4c9;
+}
+.btn-info.disabled,
+.btn-info[disabled],
+fieldset[disabled] .btn-info,
+.btn-info.disabled:hover,
+.btn-info[disabled]:hover,
+fieldset[disabled] .btn-info:hover,
+.btn-info.disabled:focus,
+.btn-info[disabled]:focus,
+fieldset[disabled] .btn-info:focus,
+.btn-info.disabled.focus,
+.btn-info[disabled].focus,
+fieldset[disabled] .btn-info.focus,
+.btn-info.disabled:active,
+.btn-info[disabled]:active,
+fieldset[disabled] .btn-info:active,
+.btn-info.disabled.active,
+.btn-info[disabled].active,
+fieldset[disabled] .btn-info.active {
+  background-color: #2aabd2;
+  background-image: none;
+}
+.btn-warning {
+  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
+  background-image:      -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
+  background-image:         linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-color: #e38d13;
+}
+.btn-warning:hover,
+.btn-warning:focus {
+  background-color: #eb9316;
+  background-position: 0 -15px;
+}
+.btn-warning:active,
+.btn-warning.active {
+  background-color: #eb9316;
+  border-color: #e38d13;
+}
+.btn-warning.disabled,
+.btn-warning[disabled],
+fieldset[disabled] .btn-warning,
+.btn-warning.disabled:hover,
+.btn-warning[disabled]:hover,
+fieldset[disabled] .btn-warning:hover,
+.btn-warning.disabled:focus,
+.btn-warning[disabled]:focus,
+fieldset[disabled] .btn-warning:focus,
+.btn-warning.disabled.focus,
+.btn-warning[disabled].focus,
+fieldset[disabled] .btn-warning.focus,
+.btn-warning.disabled:active,
+.btn-warning[disabled]:active,
+fieldset[disabled] .btn-warning:active,
+.btn-warning.disabled.active,
+.btn-warning[disabled].active,
+fieldset[disabled] .btn-warning.active {
+  background-color: #eb9316;
+  background-image: none;
+}
+.btn-danger {
+  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
+  background-image:      -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
+  background-image:         linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-color: #b92c28;
+}
+.btn-danger:hover,
+.btn-danger:focus {
+  background-color: #c12e2a;
+  background-position: 0 -15px;
+}
+.btn-danger:active,
+.btn-danger.active {
+  background-color: #c12e2a;
+  border-color: #b92c28;
+}
+.btn-danger.disabled,
+.btn-danger[disabled],
+fieldset[disabled] .btn-danger,
+.btn-danger.disabled:hover,
+.btn-danger[disabled]:hover,
+fieldset[disabled] .btn-danger:hover,
+.btn-danger.disabled:focus,
+.btn-danger[disabled]:focus,
+fieldset[disabled] .btn-danger:focus,
+.btn-danger.disabled.focus,
+.btn-danger[disabled].focus,
+fieldset[disabled] .btn-danger.focus,
+.btn-danger.disabled:active,
+.btn-danger[disabled]:active,
+fieldset[disabled] .btn-danger:active,
+.btn-danger.disabled.active,
+.btn-danger[disabled].active,
+fieldset[disabled] .btn-danger.active {
+  background-color: #c12e2a;
+  background-image: none;
+}
+.thumbnail,
+.img-thumbnail {
+  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
+          box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
+}
+.dropdown-menu > li > a:hover,
+.dropdown-menu > li > a:focus {
+  background-color: #e8e8e8;
+  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
+  background-image:      -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
+  background-image:         linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
+  background-repeat: repeat-x;
+}
+.dropdown-menu > .active > a,
+.dropdown-menu > .active > a:hover,
+.dropdown-menu > .active > a:focus {
+  background-color: #2e6da4;
+  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
+  background-image:      -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
+  background-image:         linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
+  background-repeat: repeat-x;
+}
+.navbar-default {
+  background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
+  background-image:      -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
+  background-image:         linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
+          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
+}
+.navbar-default .navbar-nav > .open > a,
+.navbar-default .navbar-nav > .active > a {
+  background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
+  background-image:      -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
+  background-image:         linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
+  background-repeat: repeat-x;
+  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
+          box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
+}
+.navbar-brand,
+.navbar-nav > li > a {
+  text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
+}
+.navbar-inverse {
+  background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
+  background-image:      -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
+  background-image:         linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  background-repeat: repeat-x;
+  border-radius: 4px;
+}
+.navbar-inverse .navbar-nav > .open > a,
+.navbar-inverse .navbar-nav > .active > a {
+  background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
+  background-image:      -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
+  background-image:         linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
+  background-repeat: repeat-x;
+  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
+          box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
+}
+.navbar-inverse .navbar-brand,
+.navbar-inverse .navbar-nav > li > a {
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
+}
+.navbar-static-top,
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+  border-radius: 0;
+}
+@media (max-width: 767px) {
+  .navbar .navbar-nav .open .dropdown-menu > .active > a,
+  .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
+  .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
+    color: #fff;
+    background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
+    background-image:      -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
+    background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
+    background-image:         linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
+    background-repeat: repeat-x;
+  }
+}
+.alert {
+  text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
+          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
+}
+.alert-success {
+  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
+  background-image:      -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
+  background-image:         linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
+  background-repeat: repeat-x;
+  border-color: #b2dba1;
+}
+.alert-info {
+  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
+  background-image:      -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
+  background-image:         linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
+  background-repeat: repeat-x;
+  border-color: #9acfea;
+}
+.alert-warning {
+  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
+  background-image:      -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
+  background-image:         linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
+  background-repeat: repeat-x;
+  border-color: #f5e79e;
+}
+.alert-danger {
+  background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
+  background-image:      -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
+  background-image:         linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
+  background-repeat: repeat-x;
+  border-color: #dca7a7;
+}
+.progress {
+  background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
+  background-image:      -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
+  background-image:         linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
+  background-repeat: repeat-x;
+}
+.progress-bar {
+  background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);
+  background-image:      -o-linear-gradient(top, #337ab7 0%, #286090 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));
+  background-image:         linear-gradient(to bottom, #337ab7 0%, #286090 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
+  background-repeat: repeat-x;
+}
+.progress-bar-success {
+  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
+  background-image:      -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
+  background-image:         linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
+  background-repeat: repeat-x;
+}
+.progress-bar-info {
+  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
+  background-image:      -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
+  background-image:         linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
+  background-repeat: repeat-x;
+}
+.progress-bar-warning {
+  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
+  background-image:      -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
+  background-image:         linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
+  background-repeat: repeat-x;
+}
+.progress-bar-danger {
+  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
+  background-image:      -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
+  background-image:         linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
+  background-repeat: repeat-x;
+}
+.progress-bar-striped {
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+}
+.list-group {
+  border-radius: 4px;
+  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
+          box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
+}
+.list-group-item.active,
+.list-group-item.active:hover,
+.list-group-item.active:focus {
+  text-shadow: 0 -1px 0 #286090;
+  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);
+  background-image:      -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));
+  background-image:         linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
+  background-repeat: repeat-x;
+  border-color: #2b669a;
+}
+.list-group-item.active .badge,
+.list-group-item.active:hover .badge,
+.list-group-item.active:focus .badge {
+  text-shadow: none;
+}
+.panel {
+  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
+          box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
+}
+.panel-default > .panel-heading {
+  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
+  background-image:      -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
+  background-image:         linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
+  background-repeat: repeat-x;
+}
+.panel-primary > .panel-heading {
+  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
+  background-image:      -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
+  background-image:         linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
+  background-repeat: repeat-x;
+}
+.panel-success > .panel-heading {
+  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
+  background-image:      -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
+  background-image:         linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
+  background-repeat: repeat-x;
+}
+.panel-info > .panel-heading {
+  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
+  background-image:      -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
+  background-image:         linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
+  background-repeat: repeat-x;
+}
+.panel-warning > .panel-heading {
+  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
+  background-image:      -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
+  background-image:         linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
+  background-repeat: repeat-x;
+}
+.panel-danger > .panel-heading {
+  background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
+  background-image:      -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
+  background-image:         linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
+  background-repeat: repeat-x;
+}
+.well {
+  background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
+  background-image:      -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
+  background-image:         linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
+  background-repeat: repeat-x;
+  border-color: #dcdcdc;
+  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
+          box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
+}
+/*# sourceMappingURL=bootstrap-theme.css.map */
Index: EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap-theme.css.map
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap-theme.css.map	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap-theme.css.map	(revision 270)
@@ -0,0 +1,1 @@
+{"version":3,"sources":["bootstrap-theme.css","less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":"AAAA;;;;GAIG;ACeH;;;;;;EAME,yCAAA;EC2CA,4FAAA;EACQ,oFAAA;CFvDT;ACgBC;;;;;;;;;;;;ECsCA,yDAAA;EACQ,iDAAA;CFxCT;ACMC;;;;;;;;;;;;;;;;;;ECiCA,yBAAA;EACQ,iBAAA;CFnBT;AC/BD;;;;;;EAuBI,kBAAA;CDgBH;ACyBC;;EAEE,uBAAA;CDvBH;AC4BD;EErEI,sEAAA;EACA,iEAAA;EACA,2FAAA;EAAA,oEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;EAuC2C,0BAAA;EAA2B,mBAAA;CDjBvE;ACpBC;;EAEE,0BAAA;EACA,6BAAA;CDsBH;ACnBC;;EAEE,0BAAA;EACA,sBAAA;CDqBH;ACfG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CD6BL;ACbD;EEtEI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CD8DD;AC5DC;;EAEE,0BAAA;EACA,6BAAA;CD8DH;AC3DC;;EAEE,0BAAA;EACA,sBAAA;CD6DH;ACvDG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CDqEL;ACpDD;EEvEI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CDsGD;ACpGC;;EAEE,0BAAA;EACA,6BAAA;CDsGH;ACnGC;;EAEE,0BAAA;EACA,sBAAA;CDqGH;AC/FG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CD6GL;AC3FD;EExEI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CD8ID;AC5IC;;EAEE,0BAAA;EACA,6BAAA;CD8IH;AC3IC;;EAEE,0BAAA;EACA,sBAAA;CD6IH;ACvIG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CDqJL;AClID;EEzEI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CDsLD;ACpLC;;EAEE,0BAAA;EACA,6BAAA;CDsLH;ACnLC;;EAEE,0BAAA;EACA,sBAAA;CDqLH;AC/KG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CD6LL;ACzKD;EE1EI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EAEA,uHAAA;ECnBF,oEAAA;EH4CA,4BAAA;EACA,sBAAA;CD8ND;AC5NC;;EAEE,0BAAA;EACA,6BAAA;CD8NH;AC3NC;;EAEE,0BAAA;EACA,sBAAA;CD6NH;ACvNG;;;;;;;;;;;;;;;;;;EAME,0BAAA;EACA,uBAAA;CDqOL;AC1MD;;EClCE,mDAAA;EACQ,2CAAA;CFgPT;ACrMD;;EE3FI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF0FF,0BAAA;CD2MD;ACzMD;;;EEhGI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EFgGF,0BAAA;CD+MD;ACtMD;EE7GI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;ECnBF,oEAAA;EH+HA,mBAAA;ECjEA,4FAAA;EACQ,oFAAA;CF8QT;ACjND;;EE7GI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;ED2CF,yDAAA;EACQ,iDAAA;CFwRT;AC9MD;;EAEE,+CAAA;CDgND;AC5MD;EEhII,sEAAA;EACA,iEAAA;EACA,2FAAA;EAAA,oEAAA;EACA,4BAAA;EACA,uHAAA;ECnBF,oEAAA;EHkJA,mBAAA;CDkND;ACrND;;EEhII,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;ED2CF,wDAAA;EACQ,gDAAA;CF+ST;AC/ND;;EAYI,0CAAA;CDuNH;AClND;;;EAGE,iBAAA;CDoND;AC/LD;EAfI;;;IAGE,YAAA;IE7JF,yEAAA;IACA,oEAAA;IACA,8FAAA;IAAA,uEAAA;IACA,4BAAA;IACA,uHAAA;GH+WD;CACF;AC3MD;EACE,8CAAA;EC3HA,2FAAA;EACQ,mFAAA;CFyUT;ACnMD;EEtLI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF8KF,sBAAA;CD+MD;AC1MD;EEvLI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF8KF,sBAAA;CDuND;ACjND;EExLI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF8KF,sBAAA;CD+ND;ACxND;EEzLI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EF8KF,sBAAA;CDuOD;ACxND;EEjMI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CH4ZH;ACrND;EE3MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHmaH;AC3ND;EE5MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CH0aH;ACjOD;EE7MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHibH;ACvOD;EE9MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHwbH;AC7OD;EE/MI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CH+bH;AChPD;EElLI,8MAAA;EACA,yMAAA;EACA,sMAAA;CHqaH;AC5OD;EACE,mBAAA;EC9KA,mDAAA;EACQ,2CAAA;CF6ZT;AC7OD;;;EAGE,8BAAA;EEnOE,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EFiOF,sBAAA;CDmPD;ACxPD;;;EAQI,kBAAA;CDqPH;AC3OD;ECnME,kDAAA;EACQ,0CAAA;CFibT;ACrOD;EE5PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHoeH;AC3OD;EE7PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CH2eH;ACjPD;EE9PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHkfH;ACvPD;EE/PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHyfH;AC7PD;EEhQI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHggBH;ACnQD;EEjQI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHugBH;ACnQD;EExQI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EFsQF,sBAAA;EC3NA,0FAAA;EACQ,kFAAA;CFqeT","file":"bootstrap-theme.css","sourcesContent":["/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.btn-default:active,\n.btn-primary:active,\n.btn-success:active,\n.btn-info:active,\n.btn-warning:active,\n.btn-danger:active,\n.btn-default.active,\n.btn-primary.active,\n.btn-success.active,\n.btn-info.active,\n.btn-warning.active,\n.btn-danger.active {\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-default.disabled,\n.btn-primary.disabled,\n.btn-success.disabled,\n.btn-info.disabled,\n.btn-warning.disabled,\n.btn-danger.disabled,\n.btn-default[disabled],\n.btn-primary[disabled],\n.btn-success[disabled],\n.btn-info[disabled],\n.btn-warning[disabled],\n.btn-danger[disabled],\nfieldset[disabled] .btn-default,\nfieldset[disabled] .btn-primary,\nfieldset[disabled] .btn-success,\nfieldset[disabled] .btn-info,\nfieldset[disabled] .btn-warning,\nfieldset[disabled] .btn-danger {\n  -webkit-box-shadow: none;\n  box-shadow: none;\n}\n.btn-default .badge,\n.btn-primary .badge,\n.btn-success .badge,\n.btn-info .badge,\n.btn-warning .badge,\n.btn-danger .badge {\n  text-shadow: none;\n}\n.btn:active,\n.btn.active {\n  background-image: none;\n}\n.btn-default {\n  background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);\n  background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);\n  background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #dbdbdb;\n  text-shadow: 0 1px 0 #fff;\n  border-color: #ccc;\n}\n.btn-default:hover,\n.btn-default:focus {\n  background-color: #e0e0e0;\n  background-position: 0 -15px;\n}\n.btn-default:active,\n.btn-default.active {\n  background-color: #e0e0e0;\n  border-color: #dbdbdb;\n}\n.btn-default.disabled,\n.btn-default[disabled],\nfieldset[disabled] .btn-default,\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus,\n.btn-default.disabled:active,\n.btn-default[disabled]:active,\nfieldset[disabled] .btn-default:active,\n.btn-default.disabled.active,\n.btn-default[disabled].active,\nfieldset[disabled] .btn-default.active {\n  background-color: #e0e0e0;\n  background-image: none;\n}\n.btn-primary {\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);\n  background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);\n  background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #245580;\n}\n.btn-primary:hover,\n.btn-primary:focus {\n  background-color: #265a88;\n  background-position: 0 -15px;\n}\n.btn-primary:active,\n.btn-primary.active {\n  background-color: #265a88;\n  border-color: #245580;\n}\n.btn-primary.disabled,\n.btn-primary[disabled],\nfieldset[disabled] .btn-primary,\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus,\n.btn-primary.disabled:active,\n.btn-primary[disabled]:active,\nfieldset[disabled] .btn-primary:active,\n.btn-primary.disabled.active,\n.btn-primary[disabled].active,\nfieldset[disabled] .btn-primary.active {\n  background-color: #265a88;\n  background-image: none;\n}\n.btn-success {\n  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);\n  background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);\n  background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #3e8f3e;\n}\n.btn-success:hover,\n.btn-success:focus {\n  background-color: #419641;\n  background-position: 0 -15px;\n}\n.btn-success:active,\n.btn-success.active {\n  background-color: #419641;\n  border-color: #3e8f3e;\n}\n.btn-success.disabled,\n.btn-success[disabled],\nfieldset[disabled] .btn-success,\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus,\n.btn-success.disabled:active,\n.btn-success[disabled]:active,\nfieldset[disabled] .btn-success:active,\n.btn-success.disabled.active,\n.btn-success[disabled].active,\nfieldset[disabled] .btn-success.active {\n  background-color: #419641;\n  background-image: none;\n}\n.btn-info {\n  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n  background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n  background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #28a4c9;\n}\n.btn-info:hover,\n.btn-info:focus {\n  background-color: #2aabd2;\n  background-position: 0 -15px;\n}\n.btn-info:active,\n.btn-info.active {\n  background-color: #2aabd2;\n  border-color: #28a4c9;\n}\n.btn-info.disabled,\n.btn-info[disabled],\nfieldset[disabled] .btn-info,\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus,\n.btn-info.disabled:active,\n.btn-info[disabled]:active,\nfieldset[disabled] .btn-info:active,\n.btn-info.disabled.active,\n.btn-info[disabled].active,\nfieldset[disabled] .btn-info.active {\n  background-color: #2aabd2;\n  background-image: none;\n}\n.btn-warning {\n  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n  background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n  background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #e38d13;\n}\n.btn-warning:hover,\n.btn-warning:focus {\n  background-color: #eb9316;\n  background-position: 0 -15px;\n}\n.btn-warning:active,\n.btn-warning.active {\n  background-color: #eb9316;\n  border-color: #e38d13;\n}\n.btn-warning.disabled,\n.btn-warning[disabled],\nfieldset[disabled] .btn-warning,\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus,\n.btn-warning.disabled:active,\n.btn-warning[disabled]:active,\nfieldset[disabled] .btn-warning:active,\n.btn-warning.disabled.active,\n.btn-warning[disabled].active,\nfieldset[disabled] .btn-warning.active {\n  background-color: #eb9316;\n  background-image: none;\n}\n.btn-danger {\n  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n  background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n  background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  background-repeat: repeat-x;\n  border-color: #b92c28;\n}\n.btn-danger:hover,\n.btn-danger:focus {\n  background-color: #c12e2a;\n  background-position: 0 -15px;\n}\n.btn-danger:active,\n.btn-danger.active {\n  background-color: #c12e2a;\n  border-color: #b92c28;\n}\n.btn-danger.disabled,\n.btn-danger[disabled],\nfieldset[disabled] .btn-danger,\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus,\n.btn-danger.disabled:active,\n.btn-danger[disabled]:active,\nfieldset[disabled] .btn-danger:active,\n.btn-danger.disabled.active,\n.btn-danger[disabled].active,\nfieldset[disabled] .btn-danger.active {\n  background-color: #c12e2a;\n  background-image: none;\n}\n.thumbnail,\n.img-thumbnail {\n  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n  background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n  background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n  background-color: #e8e8e8;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n  background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n  background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n  background-color: #2e6da4;\n}\n.navbar-default {\n  background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n  background-image: -o-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n  background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .active > a {\n  background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n  background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n  background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);\n  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n}\n.navbar-brand,\n.navbar-nav > li > a {\n  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);\n}\n.navbar-inverse {\n  background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);\n  background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);\n  background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  border-radius: 4px;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .active > a {\n  background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n  background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n  background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);\n  -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n  box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n}\n.navbar-inverse .navbar-brand,\n.navbar-inverse .navbar-nav > li > a {\n  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  border-radius: 0;\n}\n@media (max-width: 767px) {\n  .navbar .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #fff;\n    background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n    background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n    background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n    background-repeat: repeat-x;\n    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n  }\n}\n.alert {\n  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.alert-success {\n  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n  background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n  background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);\n  border-color: #b2dba1;\n}\n.alert-info {\n  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n  background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n  background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);\n  border-color: #9acfea;\n}\n.alert-warning {\n  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n  background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n  background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);\n  border-color: #f5e79e;\n}\n.alert-danger {\n  background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n  background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n  background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);\n  border-color: #dca7a7;\n}\n.progress {\n  background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n  background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n  background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);\n}\n.progress-bar {\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);\n  background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);\n  background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);\n}\n.progress-bar-success {\n  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n  background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n  background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);\n}\n.progress-bar-info {\n  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n  background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n  background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);\n}\n.progress-bar-warning {\n  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n  background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n  background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);\n}\n.progress-bar-danger {\n  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n  background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n  background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);\n}\n.progress-bar-striped {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.list-group {\n  border-radius: 4px;\n  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n  text-shadow: 0 -1px 0 #286090;\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n  background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n  background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);\n  border-color: #2b669a;\n}\n.list-group-item.active .badge,\n.list-group-item.active:hover .badge,\n.list-group-item.active:focus .badge {\n  text-shadow: none;\n}\n.panel {\n  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.panel-default > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n  background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n  background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n}\n.panel-primary > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n  background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n  background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n}\n.panel-success > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n  background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n  background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);\n}\n.panel-info > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n  background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n  background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);\n}\n.panel-warning > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n  background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n  background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);\n}\n.panel-danger > .panel-heading {\n  background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n  background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n  background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);\n}\n.well {\n  background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n  background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n  background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);\n  border-color: #dcdcdc;\n  -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n}\n/*# sourceMappingURL=bootstrap-theme.css.map */","/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n  text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n  @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n  .box-shadow(@shadow);\n\n  // Reset the shadow\n  &:active,\n  &.active {\n    .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n  }\n\n  &.disabled,\n  &[disabled],\n  fieldset[disabled] & {\n    .box-shadow(none);\n  }\n\n  .badge {\n    text-shadow: none;\n  }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n  #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n  .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620\n  background-repeat: repeat-x;\n  border-color: darken(@btn-color, 14%);\n\n  &:hover,\n  &:focus  {\n    background-color: darken(@btn-color, 12%);\n    background-position: 0 -15px;\n  }\n\n  &:active,\n  &.active {\n    background-color: darken(@btn-color, 12%);\n    border-color: darken(@btn-color, 14%);\n  }\n\n  &.disabled,\n  &[disabled],\n  fieldset[disabled] & {\n    &,\n    &:hover,\n    &:focus,\n    &.focus,\n    &:active,\n    &.active {\n      background-color: darken(@btn-color, 12%);\n      background-image: none;\n    }\n  }\n}\n\n// Common styles\n.btn {\n  // Remove the gradient for the pressed/active state\n  &:active,\n  &.active {\n    background-image: none;\n  }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info    { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger  { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n  .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n  #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n  background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n  #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n  background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n  #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n  .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n  border-radius: @navbar-border-radius;\n  @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n  .box-shadow(@shadow);\n\n  .navbar-nav > .open > a,\n  .navbar-nav > .active > a {\n    #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n    .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n  }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n  text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n  #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n  .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257\n  border-radius: @navbar-border-radius;\n  .navbar-nav > .open > a,\n  .navbar-nav > .active > a {\n    #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n    .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n  }\n\n  .navbar-brand,\n  .navbar-nav > li > a {\n    text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n  }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n  .navbar .navbar-nav .open .dropdown-menu > .active > a {\n    &,\n    &:hover,\n    &:focus {\n      color: #fff;\n      #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n    }\n  }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n  text-shadow: 0 1px 0 rgba(255,255,255,.2);\n  @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n  .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n  #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n  border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success    { .alert-styles(@alert-success-bg); }\n.alert-info       { .alert-styles(@alert-info-bg); }\n.alert-warning    { .alert-styles(@alert-warning-bg); }\n.alert-danger     { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n  #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n  #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar            { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success    { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info       { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning    { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger     { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n  #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n  border-radius: @border-radius-base;\n  .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n  text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n  #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n  border-color: darken(@list-group-active-border, 7.5%);\n\n  .badge {\n    text-shadow: none;\n  }\n}\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n  .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n  #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading   { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading   { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading   { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading      { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading   { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading    { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n  #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n  border-color: darken(@well-bg, 10%);\n  @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n  .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n  -webkit-animation: @animation;\n       -o-animation: @animation;\n          animation: @animation;\n}\n.animation-name(@name) {\n  -webkit-animation-name: @name;\n          animation-name: @name;\n}\n.animation-duration(@duration) {\n  -webkit-animation-duration: @duration;\n          animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n  -webkit-animation-timing-function: @timing-function;\n          animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n  -webkit-animation-delay: @delay;\n          animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n  -webkit-animation-iteration-count: @iteration-count;\n          animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n  -webkit-animation-direction: @direction;\n          animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n  -webkit-animation-fill-mode: @fill-mode;\n          animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n  -webkit-backface-visibility: @visibility;\n     -moz-backface-visibility: @visibility;\n          backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n  -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n          box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n  -webkit-box-sizing: @boxmodel;\n     -moz-box-sizing: @boxmodel;\n          box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n  -webkit-column-count: @column-count;\n     -moz-column-count: @column-count;\n          column-count: @column-count;\n  -webkit-column-gap: @column-gap;\n     -moz-column-gap: @column-gap;\n          column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n  word-wrap: break-word;\n  -webkit-hyphens: @mode;\n     -moz-hyphens: @mode;\n      -ms-hyphens: @mode; // IE10+\n       -o-hyphens: @mode;\n          hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n  // Firefox\n  &::-moz-placeholder {\n    color: @color;\n    opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n  }\n  &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n  &::-webkit-input-placeholder  { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n  -webkit-transform: scale(@ratio);\n      -ms-transform: scale(@ratio); // IE9 only\n       -o-transform: scale(@ratio);\n          transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n  -webkit-transform: scale(@ratioX, @ratioY);\n      -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n       -o-transform: scale(@ratioX, @ratioY);\n          transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n  -webkit-transform: scaleX(@ratio);\n      -ms-transform: scaleX(@ratio); // IE9 only\n       -o-transform: scaleX(@ratio);\n          transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n  -webkit-transform: scaleY(@ratio);\n      -ms-transform: scaleY(@ratio); // IE9 only\n       -o-transform: scaleY(@ratio);\n          transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n  -webkit-transform: skewX(@x) skewY(@y);\n      -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n       -o-transform: skewX(@x) skewY(@y);\n          transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n  -webkit-transform: translate(@x, @y);\n      -ms-transform: translate(@x, @y); // IE9 only\n       -o-transform: translate(@x, @y);\n          transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n  -webkit-transform: translate3d(@x, @y, @z);\n          transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n  -webkit-transform: rotate(@degrees);\n      -ms-transform: rotate(@degrees); // IE9 only\n       -o-transform: rotate(@degrees);\n          transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n  -webkit-transform: rotateX(@degrees);\n      -ms-transform: rotateX(@degrees); // IE9 only\n       -o-transform: rotateX(@degrees);\n          transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n  -webkit-transform: rotateY(@degrees);\n      -ms-transform: rotateY(@degrees); // IE9 only\n       -o-transform: rotateY(@degrees);\n          transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n  -webkit-perspective: @perspective;\n     -moz-perspective: @perspective;\n          perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n  -webkit-perspective-origin: @perspective;\n     -moz-perspective-origin: @perspective;\n          perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n  -webkit-transform-origin: @origin;\n     -moz-transform-origin: @origin;\n      -ms-transform-origin: @origin; // IE9 only\n          transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n  -webkit-transition: @transition;\n       -o-transition: @transition;\n          transition: @transition;\n}\n.transition-property(@transition-property) {\n  -webkit-transition-property: @transition-property;\n          transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n  -webkit-transition-delay: @transition-delay;\n          transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n  -webkit-transition-duration: @transition-duration;\n          transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n  -webkit-transition-timing-function: @timing-function;\n          transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n  -webkit-transition: -webkit-transform @transition;\n     -moz-transition: -moz-transform @transition;\n       -o-transition: -o-transform @transition;\n          transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n  -webkit-user-select: @select;\n     -moz-user-select: @select;\n      -ms-user-select: @select; // IE10+\n          user-select: @select;\n}\n","// Gradients\n\n#gradient {\n\n  // Horizontal gradient, from left to right\n  //\n  // Creates two color stops, start and end, by specifying a color and position for each color stop.\n  // Color stops are not available in IE9 and below.\n  .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n    background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n    background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n    background-repeat: repeat-x;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n  }\n\n  // Vertical gradient, from top to bottom\n  //\n  // Creates two color stops, start and end, by specifying a color and position for each color stop.\n  // Color stops are not available in IE9 and below.\n  .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n    background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Opera 12\n    background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n    background-repeat: repeat-x;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n  }\n\n  .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n    background-repeat: repeat-x;\n    background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n    background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n  }\n  .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n    background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n    background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n    background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n    background-repeat: no-repeat;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n  }\n  .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n    background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-repeat: no-repeat;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n  }\n  .radial(@inner-color: #555; @outer-color: #333) {\n    background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n    background-image: radial-gradient(circle, @inner-color, @outer-color);\n    background-repeat: no-repeat;\n  }\n  .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n    background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n    background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n    background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n  }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n  filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]}
Index: EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap-theme.min.css
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap-theme.min.css	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap-theme.min.css	(revision 270)
@@ -0,0 +1,6 @@
+/*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger.disabled,.btn-danger[disabled],.btn-default.disabled,.btn-default[disabled],.btn-info.disabled,.btn-info[disabled],.btn-primary.disabled,.btn-primary[disabled],.btn-success.disabled,.btn-success[disabled],.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-danger,fieldset[disabled] .btn-default,fieldset[disabled] .btn-info,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-warning{-webkit-box-shadow:none;box-shadow:none}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)}
+/*# sourceMappingURL=bootstrap-theme.min.css.map */
Index: EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap-theme.min.css.map
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap-theme.min.css.map	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap-theme.min.css.map	(revision 270)
@@ -0,0 +1,1 @@
+{"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":";;;;AAmBA,YAAA,aAAA,UAAA,aAAA,aAAA,aAME,YAAA,EAAA,KAAA,EAAA,eC2CA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBDvCR,mBAAA,mBAAA,oBAAA,oBAAA,iBAAA,iBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBCsCA,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBDlCR,qBAAA,sBAAA,sBAAA,uBAAA,mBAAA,oBAAA,sBAAA,uBAAA,sBAAA,uBAAA,sBAAA,uBAAA,+BAAA,gCAAA,6BAAA,gCAAA,gCAAA,gCCiCA,mBAAA,KACQ,WAAA,KDlDV,mBAAA,oBAAA,iBAAA,oBAAA,oBAAA,oBAuBI,YAAA,KAyCF,YAAA,YAEE,iBAAA,KAKJ,aErEI,YAAA,EAAA,IAAA,EAAA,KACA,iBAAA,iDACA,iBAAA,4CAAA,iBAAA,qEAEA,iBAAA,+CCnBF,OAAA,+GH4CA,OAAA,0DACA,kBAAA,SAuC2C,aAAA,QAA2B,aAAA,KArCtE,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAgBN,aEtEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAiBN,aEvEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAkBN,UExEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,gBAAA,gBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,iBAAA,iBAEE,iBAAA,QACA,aAAA,QAMA,mBAAA,0BAAA,yBAAA,0BAAA,yBAAA,yBAAA,oBAAA,2BAAA,0BAAA,2BAAA,0BAAA,0BAAA,6BAAA,oCAAA,mCAAA,oCAAA,mCAAA,mCAME,iBAAA,QACA,iBAAA,KAmBN,aEzEI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,uBAAA,8BAAA,6BAAA,8BAAA,6BAAA,6BAAA,gCAAA,uCAAA,sCAAA,uCAAA,sCAAA,sCAME,iBAAA,QACA,iBAAA,KAoBN,YE1EI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDAEA,OAAA,+GCnBF,OAAA,0DH4CA,kBAAA,SACA,aAAA,QAEA,kBAAA,kBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,mBAAA,mBAEE,iBAAA,QACA,aAAA,QAMA,qBAAA,4BAAA,2BAAA,4BAAA,2BAAA,2BAAA,sBAAA,6BAAA,4BAAA,6BAAA,4BAAA,4BAAA,+BAAA,sCAAA,qCAAA,sCAAA,qCAAA,qCAME,iBAAA,QACA,iBAAA,KA2BN,eAAA,WClCE,mBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,EAAA,IAAA,IAAA,iBD2CV,0BAAA,0BE3FI,iBAAA,QACA,iBAAA,oDACA,iBAAA,+CAAA,iBAAA,wEACA,iBAAA,kDACA,OAAA,+GF0FF,kBAAA,SAEF,yBAAA,+BAAA,+BEhGI,iBAAA,QACA,iBAAA,oDACA,iBAAA,+CAAA,iBAAA,wEACA,iBAAA,kDACA,OAAA,+GFgGF,kBAAA,SASF,gBE7GI,iBAAA,iDACA,iBAAA,4CACA,iBAAA,qEAAA,iBAAA,+CACA,OAAA,+GACA,OAAA,0DCnBF,kBAAA,SH+HA,cAAA,ICjEA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBD6DV,sCAAA,oCE7GI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SD2CF,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBD0EV,cAAA,iBAEE,YAAA,EAAA,IAAA,EAAA,sBAIF,gBEhII,iBAAA,iDACA,iBAAA,4CACA,iBAAA,qEAAA,iBAAA,+CACA,OAAA,+GACA,OAAA,0DCnBF,kBAAA,SHkJA,cAAA,IAHF,sCAAA,oCEhII,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SD2CF,mBAAA,MAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBDgFV,8BAAA,iCAYI,YAAA,EAAA,KAAA,EAAA,gBAKJ,qBAAA,kBAAA,mBAGE,cAAA,EAqBF,yBAfI,mDAAA,yDAAA,yDAGE,MAAA,KE7JF,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,UFqKJ,OACE,YAAA,EAAA,IAAA,EAAA,qBC3HA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,gBDsIV,eEtLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAKF,YEvLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAMF,eExLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAOF,cEzLI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF8KF,aAAA,QAeF,UEjMI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFuMJ,cE3MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFwMJ,sBE5MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFyMJ,mBE7MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF0MJ,sBE9MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2MJ,qBE/MI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF+MJ,sBElLI,iBAAA,yKACA,iBAAA,oKACA,iBAAA,iKFyLJ,YACE,cAAA,IC9KA,mBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,EAAA,IAAA,IAAA,iBDgLV,wBAAA,8BAAA,8BAGE,YAAA,EAAA,KAAA,EAAA,QEnOE,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFiOF,aAAA,QALF,+BAAA,qCAAA,qCAQI,YAAA,KAUJ,OCnME,mBAAA,EAAA,IAAA,IAAA,gBACQ,WAAA,EAAA,IAAA,IAAA,gBD4MV,8BE5PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFyPJ,8BE7PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF0PJ,8BE9PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2PJ,2BE/PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF4PJ,8BEhQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF6PJ,6BEjQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFoQJ,MExQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFsQF,aAAA,QC3NA,mBAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA,qBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA","sourcesContent":["/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n  text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n  @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n  .box-shadow(@shadow);\n\n  // Reset the shadow\n  &:active,\n  &.active {\n    .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n  }\n\n  &.disabled,\n  &[disabled],\n  fieldset[disabled] & {\n    .box-shadow(none);\n  }\n\n  .badge {\n    text-shadow: none;\n  }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n  #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n  .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620\n  background-repeat: repeat-x;\n  border-color: darken(@btn-color, 14%);\n\n  &:hover,\n  &:focus  {\n    background-color: darken(@btn-color, 12%);\n    background-position: 0 -15px;\n  }\n\n  &:active,\n  &.active {\n    background-color: darken(@btn-color, 12%);\n    border-color: darken(@btn-color, 14%);\n  }\n\n  &.disabled,\n  &[disabled],\n  fieldset[disabled] & {\n    &,\n    &:hover,\n    &:focus,\n    &.focus,\n    &:active,\n    &.active {\n      background-color: darken(@btn-color, 12%);\n      background-image: none;\n    }\n  }\n}\n\n// Common styles\n.btn {\n  // Remove the gradient for the pressed/active state\n  &:active,\n  &.active {\n    background-image: none;\n  }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info    { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger  { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n  .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n  #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n  background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n  #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n  background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n  #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n  .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n  border-radius: @navbar-border-radius;\n  @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n  .box-shadow(@shadow);\n\n  .navbar-nav > .open > a,\n  .navbar-nav > .active > a {\n    #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n    .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n  }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n  text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n  #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n  .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257\n  border-radius: @navbar-border-radius;\n  .navbar-nav > .open > a,\n  .navbar-nav > .active > a {\n    #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n    .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n  }\n\n  .navbar-brand,\n  .navbar-nav > li > a {\n    text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n  }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n  .navbar .navbar-nav .open .dropdown-menu > .active > a {\n    &,\n    &:hover,\n    &:focus {\n      color: #fff;\n      #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n    }\n  }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n  text-shadow: 0 1px 0 rgba(255,255,255,.2);\n  @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n  .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n  #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n  border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success    { .alert-styles(@alert-success-bg); }\n.alert-info       { .alert-styles(@alert-info-bg); }\n.alert-warning    { .alert-styles(@alert-warning-bg); }\n.alert-danger     { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n  #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n  #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar            { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success    { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info       { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning    { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger     { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n  #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n  border-radius: @border-radius-base;\n  .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n  text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n  #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n  border-color: darken(@list-group-active-border, 7.5%);\n\n  .badge {\n    text-shadow: none;\n  }\n}\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n  .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n  #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading   { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading   { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading   { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading      { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading   { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading    { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n  #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n  border-color: darken(@well-bg, 10%);\n  @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n  .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n  -webkit-animation: @animation;\n       -o-animation: @animation;\n          animation: @animation;\n}\n.animation-name(@name) {\n  -webkit-animation-name: @name;\n          animation-name: @name;\n}\n.animation-duration(@duration) {\n  -webkit-animation-duration: @duration;\n          animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n  -webkit-animation-timing-function: @timing-function;\n          animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n  -webkit-animation-delay: @delay;\n          animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n  -webkit-animation-iteration-count: @iteration-count;\n          animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n  -webkit-animation-direction: @direction;\n          animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n  -webkit-animation-fill-mode: @fill-mode;\n          animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n  -webkit-backface-visibility: @visibility;\n     -moz-backface-visibility: @visibility;\n          backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n  -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n          box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n  -webkit-box-sizing: @boxmodel;\n     -moz-box-sizing: @boxmodel;\n          box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n  -webkit-column-count: @column-count;\n     -moz-column-count: @column-count;\n          column-count: @column-count;\n  -webkit-column-gap: @column-gap;\n     -moz-column-gap: @column-gap;\n          column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n  word-wrap: break-word;\n  -webkit-hyphens: @mode;\n     -moz-hyphens: @mode;\n      -ms-hyphens: @mode; // IE10+\n       -o-hyphens: @mode;\n          hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n  // Firefox\n  &::-moz-placeholder {\n    color: @color;\n    opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n  }\n  &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n  &::-webkit-input-placeholder  { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n  -webkit-transform: scale(@ratio);\n      -ms-transform: scale(@ratio); // IE9 only\n       -o-transform: scale(@ratio);\n          transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n  -webkit-transform: scale(@ratioX, @ratioY);\n      -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n       -o-transform: scale(@ratioX, @ratioY);\n          transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n  -webkit-transform: scaleX(@ratio);\n      -ms-transform: scaleX(@ratio); // IE9 only\n       -o-transform: scaleX(@ratio);\n          transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n  -webkit-transform: scaleY(@ratio);\n      -ms-transform: scaleY(@ratio); // IE9 only\n       -o-transform: scaleY(@ratio);\n          transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n  -webkit-transform: skewX(@x) skewY(@y);\n      -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n       -o-transform: skewX(@x) skewY(@y);\n          transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n  -webkit-transform: translate(@x, @y);\n      -ms-transform: translate(@x, @y); // IE9 only\n       -o-transform: translate(@x, @y);\n          transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n  -webkit-transform: translate3d(@x, @y, @z);\n          transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n  -webkit-transform: rotate(@degrees);\n      -ms-transform: rotate(@degrees); // IE9 only\n       -o-transform: rotate(@degrees);\n          transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n  -webkit-transform: rotateX(@degrees);\n      -ms-transform: rotateX(@degrees); // IE9 only\n       -o-transform: rotateX(@degrees);\n          transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n  -webkit-transform: rotateY(@degrees);\n      -ms-transform: rotateY(@degrees); // IE9 only\n       -o-transform: rotateY(@degrees);\n          transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n  -webkit-perspective: @perspective;\n     -moz-perspective: @perspective;\n          perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n  -webkit-perspective-origin: @perspective;\n     -moz-perspective-origin: @perspective;\n          perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n  -webkit-transform-origin: @origin;\n     -moz-transform-origin: @origin;\n      -ms-transform-origin: @origin; // IE9 only\n          transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n  -webkit-transition: @transition;\n       -o-transition: @transition;\n          transition: @transition;\n}\n.transition-property(@transition-property) {\n  -webkit-transition-property: @transition-property;\n          transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n  -webkit-transition-delay: @transition-delay;\n          transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n  -webkit-transition-duration: @transition-duration;\n          transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n  -webkit-transition-timing-function: @timing-function;\n          transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n  -webkit-transition: -webkit-transform @transition;\n     -moz-transition: -moz-transform @transition;\n       -o-transition: -o-transform @transition;\n          transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n  -webkit-user-select: @select;\n     -moz-user-select: @select;\n      -ms-user-select: @select; // IE10+\n          user-select: @select;\n}\n","// Gradients\n\n#gradient {\n\n  // Horizontal gradient, from left to right\n  //\n  // Creates two color stops, start and end, by specifying a color and position for each color stop.\n  // Color stops are not available in IE9 and below.\n  .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n    background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n    background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n    background-repeat: repeat-x;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n  }\n\n  // Vertical gradient, from top to bottom\n  //\n  // Creates two color stops, start and end, by specifying a color and position for each color stop.\n  // Color stops are not available in IE9 and below.\n  .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n    background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Opera 12\n    background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n    background-repeat: repeat-x;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n  }\n\n  .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n    background-repeat: repeat-x;\n    background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n    background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n  }\n  .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n    background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n    background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n    background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n    background-repeat: no-repeat;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n  }\n  .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n    background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-repeat: no-repeat;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n  }\n  .radial(@inner-color: #555; @outer-color: #333) {\n    background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n    background-image: radial-gradient(circle, @inner-color, @outer-color);\n    background-repeat: no-repeat;\n  }\n  .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n    background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n    background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n    background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n  }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n  filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]}
Index: EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap.css
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap.css	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap.css	(revision 270)
@@ -0,0 +1,6757 @@
+/*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
+html {
+  font-family: sans-serif;
+  -webkit-text-size-adjust: 100%;
+      -ms-text-size-adjust: 100%;
+}
+body {
+  margin: 0;
+}
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+menu,
+nav,
+section,
+summary {
+  display: block;
+}
+audio,
+canvas,
+progress,
+video {
+  display: inline-block;
+  vertical-align: baseline;
+}
+audio:not([controls]) {
+  display: none;
+  height: 0;
+}
+[hidden],
+template {
+  display: none;
+}
+a {
+  background-color: transparent;
+}
+a:active,
+a:hover {
+  outline: 0;
+}
+abbr[title] {
+  border-bottom: 1px dotted;
+}
+b,
+strong {
+  font-weight: bold;
+}
+dfn {
+  font-style: italic;
+}
+h1 {
+  margin: .67em 0;
+  font-size: 2em;
+}
+mark {
+  color: #000;
+  background: #ff0;
+}
+small {
+  font-size: 80%;
+}
+sub,
+sup {
+  position: relative;
+  font-size: 75%;
+  line-height: 0;
+  vertical-align: baseline;
+}
+sup {
+  top: -.5em;
+}
+sub {
+  bottom: -.25em;
+}
+img {
+  border: 0;
+}
+svg:not(:root) {
+  overflow: hidden;
+}
+figure {
+  margin: 1em 40px;
+}
+hr {
+  height: 0;
+  -webkit-box-sizing: content-box;
+     -moz-box-sizing: content-box;
+          box-sizing: content-box;
+}
+pre {
+  overflow: auto;
+}
+code,
+kbd,
+pre,
+samp {
+  font-family: monospace, monospace;
+  font-size: 1em;
+}
+button,
+input,
+optgroup,
+select,
+textarea {
+  margin: 0;
+  font: inherit;
+  color: inherit;
+}
+button {
+  overflow: visible;
+}
+button,
+select {
+  text-transform: none;
+}
+button,
+html input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+  -webkit-appearance: button;
+  cursor: pointer;
+}
+button[disabled],
+html input[disabled] {
+  cursor: default;
+}
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+  padding: 0;
+  border: 0;
+}
+input {
+  line-height: normal;
+}
+input[type="checkbox"],
+input[type="radio"] {
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+  padding: 0;
+}
+input[type="number"]::-webkit-inner-spin-button,
+input[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+input[type="search"] {
+  -webkit-box-sizing: content-box;
+     -moz-box-sizing: content-box;
+          box-sizing: content-box;
+  -webkit-appearance: textfield;
+}
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+fieldset {
+  padding: .35em .625em .75em;
+  margin: 0 2px;
+  border: 1px solid #c0c0c0;
+}
+legend {
+  padding: 0;
+  border: 0;
+}
+textarea {
+  overflow: auto;
+}
+optgroup {
+  font-weight: bold;
+}
+table {
+  border-spacing: 0;
+  border-collapse: collapse;
+}
+td,
+th {
+  padding: 0;
+}
+/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
+@media print {
+  *,
+  *:before,
+  *:after {
+    color: #000 !important;
+    text-shadow: none !important;
+    background: transparent !important;
+    -webkit-box-shadow: none !important;
+            box-shadow: none !important;
+  }
+  a,
+  a:visited {
+    text-decoration: underline;
+  }
+  a[href]:after {
+    content: " (" attr(href) ")";
+  }
+  abbr[title]:after {
+    content: " (" attr(title) ")";
+  }
+  a[href^="#"]:after,
+  a[href^="javascript:"]:after {
+    content: "";
+  }
+  pre,
+  blockquote {
+    border: 1px solid #999;
+
+    page-break-inside: avoid;
+  }
+  thead {
+    display: table-header-group;
+  }
+  tr,
+  img {
+    page-break-inside: avoid;
+  }
+  img {
+    max-width: 100% !important;
+  }
+  p,
+  h2,
+  h3 {
+    orphans: 3;
+    widows: 3;
+  }
+  h2,
+  h3 {
+    page-break-after: avoid;
+  }
+  .navbar {
+    display: none;
+  }
+  .btn > .caret,
+  .dropup > .btn > .caret {
+    border-top-color: #000 !important;
+  }
+  .label {
+    border: 1px solid #000;
+  }
+  .table {
+    border-collapse: collapse !important;
+  }
+  .table td,
+  .table th {
+    background-color: #fff !important;
+  }
+  .table-bordered th,
+  .table-bordered td {
+    border: 1px solid #ddd !important;
+  }
+}
+@font-face {
+  font-family: 'Glyphicons Halflings';
+
+  src: url('../fonts/glyphicons-halflings-regular.eot');
+  src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
+}
+.glyphicon {
+  position: relative;
+  top: 1px;
+  display: inline-block;
+  font-family: 'Glyphicons Halflings';
+  font-style: normal;
+  font-weight: normal;
+  line-height: 1;
+
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+.glyphicon-asterisk:before {
+  content: "\002a";
+}
+.glyphicon-plus:before {
+  content: "\002b";
+}
+.glyphicon-euro:before,
+.glyphicon-eur:before {
+  content: "\20ac";
+}
+.glyphicon-minus:before {
+  content: "\2212";
+}
+.glyphicon-cloud:before {
+  content: "\2601";
+}
+.glyphicon-envelope:before {
+  content: "\2709";
+}
+.glyphicon-pencil:before {
+  content: "\270f";
+}
+.glyphicon-glass:before {
+  content: "\e001";
+}
+.glyphicon-music:before {
+  content: "\e002";
+}
+.glyphicon-search:before {
+  content: "\e003";
+}
+.glyphicon-heart:before {
+  content: "\e005";
+}
+.glyphicon-star:before {
+  content: "\e006";
+}
+.glyphicon-star-empty:before {
+  content: "\e007";
+}
+.glyphicon-user:before {
+  content: "\e008";
+}
+.glyphicon-film:before {
+  content: "\e009";
+}
+.glyphicon-th-large:before {
+  content: "\e010";
+}
+.glyphicon-th:before {
+  content: "\e011";
+}
+.glyphicon-th-list:before {
+  content: "\e012";
+}
+.glyphicon-ok:before {
+  content: "\e013";
+}
+.glyphicon-remove:before {
+  content: "\e014";
+}
+.glyphicon-zoom-in:before {
+  content: "\e015";
+}
+.glyphicon-zoom-out:before {
+  content: "\e016";
+}
+.glyphicon-off:before {
+  content: "\e017";
+}
+.glyphicon-signal:before {
+  content: "\e018";
+}
+.glyphicon-cog:before {
+  content: "\e019";
+}
+.glyphicon-trash:before {
+  content: "\e020";
+}
+.glyphicon-home:before {
+  content: "\e021";
+}
+.glyphicon-file:before {
+  content: "\e022";
+}
+.glyphicon-time:before {
+  content: "\e023";
+}
+.glyphicon-road:before {
+  content: "\e024";
+}
+.glyphicon-download-alt:before {
+  content: "\e025";
+}
+.glyphicon-download:before {
+  content: "\e026";
+}
+.glyphicon-upload:before {
+  content: "\e027";
+}
+.glyphicon-inbox:before {
+  content: "\e028";
+}
+.glyphicon-play-circle:before {
+  content: "\e029";
+}
+.glyphicon-repeat:before {
+  content: "\e030";
+}
+.glyphicon-refresh:before {
+  content: "\e031";
+}
+.glyphicon-list-alt:before {
+  content: "\e032";
+}
+.glyphicon-lock:before {
+  content: "\e033";
+}
+.glyphicon-flag:before {
+  content: "\e034";
+}
+.glyphicon-headphones:before {
+  content: "\e035";
+}
+.glyphicon-volume-off:before {
+  content: "\e036";
+}
+.glyphicon-volume-down:before {
+  content: "\e037";
+}
+.glyphicon-volume-up:before {
+  content: "\e038";
+}
+.glyphicon-qrcode:before {
+  content: "\e039";
+}
+.glyphicon-barcode:before {
+  content: "\e040";
+}
+.glyphicon-tag:before {
+  content: "\e041";
+}
+.glyphicon-tags:before {
+  content: "\e042";
+}
+.glyphicon-book:before {
+  content: "\e043";
+}
+.glyphicon-bookmark:before {
+  content: "\e044";
+}
+.glyphicon-print:before {
+  content: "\e045";
+}
+.glyphicon-camera:before {
+  content: "\e046";
+}
+.glyphicon-font:before {
+  content: "\e047";
+}
+.glyphicon-bold:before {
+  content: "\e048";
+}
+.glyphicon-italic:before {
+  content: "\e049";
+}
+.glyphicon-text-height:before {
+  content: "\e050";
+}
+.glyphicon-text-width:before {
+  content: "\e051";
+}
+.glyphicon-align-left:before {
+  content: "\e052";
+}
+.glyphicon-align-center:before {
+  content: "\e053";
+}
+.glyphicon-align-right:before {
+  content: "\e054";
+}
+.glyphicon-align-justify:before {
+  content: "\e055";
+}
+.glyphicon-list:before {
+  content: "\e056";
+}
+.glyphicon-indent-left:before {
+  content: "\e057";
+}
+.glyphicon-indent-right:before {
+  content: "\e058";
+}
+.glyphicon-facetime-video:before {
+  content: "\e059";
+}
+.glyphicon-picture:before {
+  content: "\e060";
+}
+.glyphicon-map-marker:before {
+  content: "\e062";
+}
+.glyphicon-adjust:before {
+  content: "\e063";
+}
+.glyphicon-tint:before {
+  content: "\e064";
+}
+.glyphicon-edit:before {
+  content: "\e065";
+}
+.glyphicon-share:before {
+  content: "\e066";
+}
+.glyphicon-check:before {
+  content: "\e067";
+}
+.glyphicon-move:before {
+  content: "\e068";
+}
+.glyphicon-step-backward:before {
+  content: "\e069";
+}
+.glyphicon-fast-backward:before {
+  content: "\e070";
+}
+.glyphicon-backward:before {
+  content: "\e071";
+}
+.glyphicon-play:before {
+  content: "\e072";
+}
+.glyphicon-pause:before {
+  content: "\e073";
+}
+.glyphicon-stop:before {
+  content: "\e074";
+}
+.glyphicon-forward:before {
+  content: "\e075";
+}
+.glyphicon-fast-forward:before {
+  content: "\e076";
+}
+.glyphicon-step-forward:before {
+  content: "\e077";
+}
+.glyphicon-eject:before {
+  content: "\e078";
+}
+.glyphicon-chevron-left:before {
+  content: "\e079";
+}
+.glyphicon-chevron-right:before {
+  content: "\e080";
+}
+.glyphicon-plus-sign:before {
+  content: "\e081";
+}
+.glyphicon-minus-sign:before {
+  content: "\e082";
+}
+.glyphicon-remove-sign:before {
+  content: "\e083";
+}
+.glyphicon-ok-sign:before {
+  content: "\e084";
+}
+.glyphicon-question-sign:before {
+  content: "\e085";
+}
+.glyphicon-info-sign:before {
+  content: "\e086";
+}
+.glyphicon-screenshot:before {
+  content: "\e087";
+}
+.glyphicon-remove-circle:before {
+  content: "\e088";
+}
+.glyphicon-ok-circle:before {
+  content: "\e089";
+}
+.glyphicon-ban-circle:before {
+  content: "\e090";
+}
+.glyphicon-arrow-left:before {
+  content: "\e091";
+}
+.glyphicon-arrow-right:before {
+  content: "\e092";
+}
+.glyphicon-arrow-up:before {
+  content: "\e093";
+}
+.glyphicon-arrow-down:before {
+  content: "\e094";
+}
+.glyphicon-share-alt:before {
+  content: "\e095";
+}
+.glyphicon-resize-full:before {
+  content: "\e096";
+}
+.glyphicon-resize-small:before {
+  content: "\e097";
+}
+.glyphicon-exclamation-sign:before {
+  content: "\e101";
+}
+.glyphicon-gift:before {
+  content: "\e102";
+}
+.glyphicon-leaf:before {
+  content: "\e103";
+}
+.glyphicon-fire:before {
+  content: "\e104";
+}
+.glyphicon-eye-open:before {
+  content: "\e105";
+}
+.glyphicon-eye-close:before {
+  content: "\e106";
+}
+.glyphicon-warning-sign:before {
+  content: "\e107";
+}
+.glyphicon-plane:before {
+  content: "\e108";
+}
+.glyphicon-calendar:before {
+  content: "\e109";
+}
+.glyphicon-random:before {
+  content: "\e110";
+}
+.glyphicon-comment:before {
+  content: "\e111";
+}
+.glyphicon-magnet:before {
+  content: "\e112";
+}
+.glyphicon-chevron-up:before {
+  content: "\e113";
+}
+.glyphicon-chevron-down:before {
+  content: "\e114";
+}
+.glyphicon-retweet:before {
+  content: "\e115";
+}
+.glyphicon-shopping-cart:before {
+  content: "\e116";
+}
+.glyphicon-folder-close:before {
+  content: "\e117";
+}
+.glyphicon-folder-open:before {
+  content: "\e118";
+}
+.glyphicon-resize-vertical:before {
+  content: "\e119";
+}
+.glyphicon-resize-horizontal:before {
+  content: "\e120";
+}
+.glyphicon-hdd:before {
+  content: "\e121";
+}
+.glyphicon-bullhorn:before {
+  content: "\e122";
+}
+.glyphicon-bell:before {
+  content: "\e123";
+}
+.glyphicon-certificate:before {
+  content: "\e124";
+}
+.glyphicon-thumbs-up:before {
+  content: "\e125";
+}
+.glyphicon-thumbs-down:before {
+  content: "\e126";
+}
+.glyphicon-hand-right:before {
+  content: "\e127";
+}
+.glyphicon-hand-left:before {
+  content: "\e128";
+}
+.glyphicon-hand-up:before {
+  content: "\e129";
+}
+.glyphicon-hand-down:before {
+  content: "\e130";
+}
+.glyphicon-circle-arrow-right:before {
+  content: "\e131";
+}
+.glyphicon-circle-arrow-left:before {
+  content: "\e132";
+}
+.glyphicon-circle-arrow-up:before {
+  content: "\e133";
+}
+.glyphicon-circle-arrow-down:before {
+  content: "\e134";
+}
+.glyphicon-globe:before {
+  content: "\e135";
+}
+.glyphicon-wrench:before {
+  content: "\e136";
+}
+.glyphicon-tasks:before {
+  content: "\e137";
+}
+.glyphicon-filter:before {
+  content: "\e138";
+}
+.glyphicon-briefcase:before {
+  content: "\e139";
+}
+.glyphicon-fullscreen:before {
+  content: "\e140";
+}
+.glyphicon-dashboard:before {
+  content: "\e141";
+}
+.glyphicon-paperclip:before {
+  content: "\e142";
+}
+.glyphicon-heart-empty:before {
+  content: "\e143";
+}
+.glyphicon-link:before {
+  content: "\e144";
+}
+.glyphicon-phone:before {
+  content: "\e145";
+}
+.glyphicon-pushpin:before {
+  content: "\e146";
+}
+.glyphicon-usd:before {
+  content: "\e148";
+}
+.glyphicon-gbp:before {
+  content: "\e149";
+}
+.glyphicon-sort:before {
+  content: "\e150";
+}
+.glyphicon-sort-by-alphabet:before {
+  content: "\e151";
+}
+.glyphicon-sort-by-alphabet-alt:before {
+  content: "\e152";
+}
+.glyphicon-sort-by-order:before {
+  content: "\e153";
+}
+.glyphicon-sort-by-order-alt:before {
+  content: "\e154";
+}
+.glyphicon-sort-by-attributes:before {
+  content: "\e155";
+}
+.glyphicon-sort-by-attributes-alt:before {
+  content: "\e156";
+}
+.glyphicon-unchecked:before {
+  content: "\e157";
+}
+.glyphicon-expand:before {
+  content: "\e158";
+}
+.glyphicon-collapse-down:before {
+  content: "\e159";
+}
+.glyphicon-collapse-up:before {
+  content: "\e160";
+}
+.glyphicon-log-in:before {
+  content: "\e161";
+}
+.glyphicon-flash:before {
+  content: "\e162";
+}
+.glyphicon-log-out:before {
+  content: "\e163";
+}
+.glyphicon-new-window:before {
+  content: "\e164";
+}
+.glyphicon-record:before {
+  content: "\e165";
+}
+.glyphicon-save:before {
+  content: "\e166";
+}
+.glyphicon-open:before {
+  content: "\e167";
+}
+.glyphicon-saved:before {
+  content: "\e168";
+}
+.glyphicon-import:before {
+  content: "\e169";
+}
+.glyphicon-export:before {
+  content: "\e170";
+}
+.glyphicon-send:before {
+  content: "\e171";
+}
+.glyphicon-floppy-disk:before {
+  content: "\e172";
+}
+.glyphicon-floppy-saved:before {
+  content: "\e173";
+}
+.glyphicon-floppy-remove:before {
+  content: "\e174";
+}
+.glyphicon-floppy-save:before {
+  content: "\e175";
+}
+.glyphicon-floppy-open:before {
+  content: "\e176";
+}
+.glyphicon-credit-card:before {
+  content: "\e177";
+}
+.glyphicon-transfer:before {
+  content: "\e178";
+}
+.glyphicon-cutlery:before {
+  content: "\e179";
+}
+.glyphicon-header:before {
+  content: "\e180";
+}
+.glyphicon-compressed:before {
+  content: "\e181";
+}
+.glyphicon-earphone:before {
+  content: "\e182";
+}
+.glyphicon-phone-alt:before {
+  content: "\e183";
+}
+.glyphicon-tower:before {
+  content: "\e184";
+}
+.glyphicon-stats:before {
+  content: "\e185";
+}
+.glyphicon-sd-video:before {
+  content: "\e186";
+}
+.glyphicon-hd-video:before {
+  content: "\e187";
+}
+.glyphicon-subtitles:before {
+  content: "\e188";
+}
+.glyphicon-sound-stereo:before {
+  content: "\e189";
+}
+.glyphicon-sound-dolby:before {
+  content: "\e190";
+}
+.glyphicon-sound-5-1:before {
+  content: "\e191";
+}
+.glyphicon-sound-6-1:before {
+  content: "\e192";
+}
+.glyphicon-sound-7-1:before {
+  content: "\e193";
+}
+.glyphicon-copyright-mark:before {
+  content: "\e194";
+}
+.glyphicon-registration-mark:before {
+  content: "\e195";
+}
+.glyphicon-cloud-download:before {
+  content: "\e197";
+}
+.glyphicon-cloud-upload:before {
+  content: "\e198";
+}
+.glyphicon-tree-conifer:before {
+  content: "\e199";
+}
+.glyphicon-tree-deciduous:before {
+  content: "\e200";
+}
+.glyphicon-cd:before {
+  content: "\e201";
+}
+.glyphicon-save-file:before {
+  content: "\e202";
+}
+.glyphicon-open-file:before {
+  content: "\e203";
+}
+.glyphicon-level-up:before {
+  content: "\e204";
+}
+.glyphicon-copy:before {
+  content: "\e205";
+}
+.glyphicon-paste:before {
+  content: "\e206";
+}
+.glyphicon-alert:before {
+  content: "\e209";
+}
+.glyphicon-equalizer:before {
+  content: "\e210";
+}
+.glyphicon-king:before {
+  content: "\e211";
+}
+.glyphicon-queen:before {
+  content: "\e212";
+}
+.glyphicon-pawn:before {
+  content: "\e213";
+}
+.glyphicon-bishop:before {
+  content: "\e214";
+}
+.glyphicon-knight:before {
+  content: "\e215";
+}
+.glyphicon-baby-formula:before {
+  content: "\e216";
+}
+.glyphicon-tent:before {
+  content: "\26fa";
+}
+.glyphicon-blackboard:before {
+  content: "\e218";
+}
+.glyphicon-bed:before {
+  content: "\e219";
+}
+.glyphicon-apple:before {
+  content: "\f8ff";
+}
+.glyphicon-erase:before {
+  content: "\e221";
+}
+.glyphicon-hourglass:before {
+  content: "\231b";
+}
+.glyphicon-lamp:before {
+  content: "\e223";
+}
+.glyphicon-duplicate:before {
+  content: "\e224";
+}
+.glyphicon-piggy-bank:before {
+  content: "\e225";
+}
+.glyphicon-scissors:before {
+  content: "\e226";
+}
+.glyphicon-bitcoin:before {
+  content: "\e227";
+}
+.glyphicon-btc:before {
+  content: "\e227";
+}
+.glyphicon-xbt:before {
+  content: "\e227";
+}
+.glyphicon-yen:before {
+  content: "\00a5";
+}
+.glyphicon-jpy:before {
+  content: "\00a5";
+}
+.glyphicon-ruble:before {
+  content: "\20bd";
+}
+.glyphicon-rub:before {
+  content: "\20bd";
+}
+.glyphicon-scale:before {
+  content: "\e230";
+}
+.glyphicon-ice-lolly:before {
+  content: "\e231";
+}
+.glyphicon-ice-lolly-tasted:before {
+  content: "\e232";
+}
+.glyphicon-education:before {
+  content: "\e233";
+}
+.glyphicon-option-horizontal:before {
+  content: "\e234";
+}
+.glyphicon-option-vertical:before {
+  content: "\e235";
+}
+.glyphicon-menu-hamburger:before {
+  content: "\e236";
+}
+.glyphicon-modal-window:before {
+  content: "\e237";
+}
+.glyphicon-oil:before {
+  content: "\e238";
+}
+.glyphicon-grain:before {
+  content: "\e239";
+}
+.glyphicon-sunglasses:before {
+  content: "\e240";
+}
+.glyphicon-text-size:before {
+  content: "\e241";
+}
+.glyphicon-text-color:before {
+  content: "\e242";
+}
+.glyphicon-text-background:before {
+  content: "\e243";
+}
+.glyphicon-object-align-top:before {
+  content: "\e244";
+}
+.glyphicon-object-align-bottom:before {
+  content: "\e245";
+}
+.glyphicon-object-align-horizontal:before {
+  content: "\e246";
+}
+.glyphicon-object-align-left:before {
+  content: "\e247";
+}
+.glyphicon-object-align-vertical:before {
+  content: "\e248";
+}
+.glyphicon-object-align-right:before {
+  content: "\e249";
+}
+.glyphicon-triangle-right:before {
+  content: "\e250";
+}
+.glyphicon-triangle-left:before {
+  content: "\e251";
+}
+.glyphicon-triangle-bottom:before {
+  content: "\e252";
+}
+.glyphicon-triangle-top:before {
+  content: "\e253";
+}
+.glyphicon-console:before {
+  content: "\e254";
+}
+.glyphicon-superscript:before {
+  content: "\e255";
+}
+.glyphicon-subscript:before {
+  content: "\e256";
+}
+.glyphicon-menu-left:before {
+  content: "\e257";
+}
+.glyphicon-menu-right:before {
+  content: "\e258";
+}
+.glyphicon-menu-down:before {
+  content: "\e259";
+}
+.glyphicon-menu-up:before {
+  content: "\e260";
+}
+* {
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+}
+*:before,
+*:after {
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+}
+html {
+  font-size: 10px;
+
+  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+body {
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+  font-size: 14px;
+  line-height: 1.42857143;
+  color: #333;
+  background-color: #fff;
+}
+input,
+button,
+select,
+textarea {
+  font-family: inherit;
+  font-size: inherit;
+  line-height: inherit;
+}
+a {
+  color: #337ab7;
+  text-decoration: none;
+}
+a:hover,
+a:focus {
+  color: #23527c;
+  text-decoration: underline;
+}
+a:focus {
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+figure {
+  margin: 0;
+}
+img {
+  vertical-align: middle;
+}
+.img-responsive,
+.thumbnail > img,
+.thumbnail a > img,
+.carousel-inner > .item > img,
+.carousel-inner > .item > a > img {
+  display: block;
+  max-width: 100%;
+  height: auto;
+}
+.img-rounded {
+  border-radius: 6px;
+}
+.img-thumbnail {
+  display: inline-block;
+  max-width: 100%;
+  height: auto;
+  padding: 4px;
+  line-height: 1.42857143;
+  background-color: #fff;
+  border: 1px solid #ddd;
+  border-radius: 4px;
+  -webkit-transition: all .2s ease-in-out;
+       -o-transition: all .2s ease-in-out;
+          transition: all .2s ease-in-out;
+}
+.img-circle {
+  border-radius: 50%;
+}
+hr {
+  margin-top: 20px;
+  margin-bottom: 20px;
+  border: 0;
+  border-top: 1px solid #eee;
+}
+.sr-only {
+  position: absolute;
+  width: 1px;
+  height: 1px;
+  padding: 0;
+  margin: -1px;
+  overflow: hidden;
+  clip: rect(0, 0, 0, 0);
+  border: 0;
+}
+.sr-only-focusable:active,
+.sr-only-focusable:focus {
+  position: static;
+  width: auto;
+  height: auto;
+  margin: 0;
+  overflow: visible;
+  clip: auto;
+}
+[role="button"] {
+  cursor: pointer;
+}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+.h1,
+.h2,
+.h3,
+.h4,
+.h5,
+.h6 {
+  font-family: inherit;
+  font-weight: 500;
+  line-height: 1.1;
+  color: inherit;
+}
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small,
+.h1 small,
+.h2 small,
+.h3 small,
+.h4 small,
+.h5 small,
+.h6 small,
+h1 .small,
+h2 .small,
+h3 .small,
+h4 .small,
+h5 .small,
+h6 .small,
+.h1 .small,
+.h2 .small,
+.h3 .small,
+.h4 .small,
+.h5 .small,
+.h6 .small {
+  font-weight: normal;
+  line-height: 1;
+  color: #777;
+}
+h1,
+.h1,
+h2,
+.h2,
+h3,
+.h3 {
+  margin-top: 20px;
+  margin-bottom: 10px;
+}
+h1 small,
+.h1 small,
+h2 small,
+.h2 small,
+h3 small,
+.h3 small,
+h1 .small,
+.h1 .small,
+h2 .small,
+.h2 .small,
+h3 .small,
+.h3 .small {
+  font-size: 65%;
+}
+h4,
+.h4,
+h5,
+.h5,
+h6,
+.h6 {
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+h4 small,
+.h4 small,
+h5 small,
+.h5 small,
+h6 small,
+.h6 small,
+h4 .small,
+.h4 .small,
+h5 .small,
+.h5 .small,
+h6 .small,
+.h6 .small {
+  font-size: 75%;
+}
+h1,
+.h1 {
+  font-size: 36px;
+}
+h2,
+.h2 {
+  font-size: 30px;
+}
+h3,
+.h3 {
+  font-size: 24px;
+}
+h4,
+.h4 {
+  font-size: 18px;
+}
+h5,
+.h5 {
+  font-size: 14px;
+}
+h6,
+.h6 {
+  font-size: 12px;
+}
+p {
+  margin: 0 0 10px;
+}
+.lead {
+  margin-bottom: 20px;
+  font-size: 16px;
+  font-weight: 300;
+  line-height: 1.4;
+}
+@media (min-width: 768px) {
+  .lead {
+    font-size: 21px;
+  }
+}
+small,
+.small {
+  font-size: 85%;
+}
+mark,
+.mark {
+  padding: .2em;
+  background-color: #fcf8e3;
+}
+.text-left {
+  text-align: left;
+}
+.text-right {
+  text-align: right;
+}
+.text-center {
+  text-align: center;
+}
+.text-justify {
+  text-align: justify;
+}
+.text-nowrap {
+  white-space: nowrap;
+}
+.text-lowercase {
+  text-transform: lowercase;
+}
+.text-uppercase {
+  text-transform: uppercase;
+}
+.text-capitalize {
+  text-transform: capitalize;
+}
+.text-muted {
+  color: #777;
+}
+.text-primary {
+  color: #337ab7;
+}
+a.text-primary:hover,
+a.text-primary:focus {
+  color: #286090;
+}
+.text-success {
+  color: #3c763d;
+}
+a.text-success:hover,
+a.text-success:focus {
+  color: #2b542c;
+}
+.text-info {
+  color: #31708f;
+}
+a.text-info:hover,
+a.text-info:focus {
+  color: #245269;
+}
+.text-warning {
+  color: #8a6d3b;
+}
+a.text-warning:hover,
+a.text-warning:focus {
+  color: #66512c;
+}
+.text-danger {
+  color: #a94442;
+}
+a.text-danger:hover,
+a.text-danger:focus {
+  color: #843534;
+}
+.bg-primary {
+  color: #fff;
+  background-color: #337ab7;
+}
+a.bg-primary:hover,
+a.bg-primary:focus {
+  background-color: #286090;
+}
+.bg-success {
+  background-color: #dff0d8;
+}
+a.bg-success:hover,
+a.bg-success:focus {
+  background-color: #c1e2b3;
+}
+.bg-info {
+  background-color: #d9edf7;
+}
+a.bg-info:hover,
+a.bg-info:focus {
+  background-color: #afd9ee;
+}
+.bg-warning {
+  background-color: #fcf8e3;
+}
+a.bg-warning:hover,
+a.bg-warning:focus {
+  background-color: #f7ecb5;
+}
+.bg-danger {
+  background-color: #f2dede;
+}
+a.bg-danger:hover,
+a.bg-danger:focus {
+  background-color: #e4b9b9;
+}
+.page-header {
+  padding-bottom: 9px;
+  margin: 40px 0 20px;
+  border-bottom: 1px solid #eee;
+}
+ul,
+ol {
+  margin-top: 0;
+  margin-bottom: 10px;
+}
+ul ul,
+ol ul,
+ul ol,
+ol ol {
+  margin-bottom: 0;
+}
+.list-unstyled {
+  padding-left: 0;
+  list-style: none;
+}
+.list-inline {
+  padding-left: 0;
+  margin-left: -5px;
+  list-style: none;
+}
+.list-inline > li {
+  display: inline-block;
+  padding-right: 5px;
+  padding-left: 5px;
+}
+dl {
+  margin-top: 0;
+  margin-bottom: 20px;
+}
+dt,
+dd {
+  line-height: 1.42857143;
+}
+dt {
+  font-weight: bold;
+}
+dd {
+  margin-left: 0;
+}
+@media (min-width: 768px) {
+  .dl-horizontal dt {
+    float: left;
+    width: 160px;
+    overflow: hidden;
+    clear: left;
+    text-align: right;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  .dl-horizontal dd {
+    margin-left: 180px;
+  }
+}
+abbr[title],
+abbr[data-original-title] {
+  cursor: help;
+  border-bottom: 1px dotted #777;
+}
+.initialism {
+  font-size: 90%;
+  text-transform: uppercase;
+}
+blockquote {
+  padding: 10px 20px;
+  margin: 0 0 20px;
+  font-size: 17.5px;
+  border-left: 5px solid #eee;
+}
+blockquote p:last-child,
+blockquote ul:last-child,
+blockquote ol:last-child {
+  margin-bottom: 0;
+}
+blockquote footer,
+blockquote small,
+blockquote .small {
+  display: block;
+  font-size: 80%;
+  line-height: 1.42857143;
+  color: #777;
+}
+blockquote footer:before,
+blockquote small:before,
+blockquote .small:before {
+  content: '\2014 \00A0';
+}
+.blockquote-reverse,
+blockquote.pull-right {
+  padding-right: 15px;
+  padding-left: 0;
+  text-align: right;
+  border-right: 5px solid #eee;
+  border-left: 0;
+}
+.blockquote-reverse footer:before,
+blockquote.pull-right footer:before,
+.blockquote-reverse small:before,
+blockquote.pull-right small:before,
+.blockquote-reverse .small:before,
+blockquote.pull-right .small:before {
+  content: '';
+}
+.blockquote-reverse footer:after,
+blockquote.pull-right footer:after,
+.blockquote-reverse small:after,
+blockquote.pull-right small:after,
+.blockquote-reverse .small:after,
+blockquote.pull-right .small:after {
+  content: '\00A0 \2014';
+}
+address {
+  margin-bottom: 20px;
+  font-style: normal;
+  line-height: 1.42857143;
+}
+code,
+kbd,
+pre,
+samp {
+  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
+}
+code {
+  padding: 2px 4px;
+  font-size: 90%;
+  color: #c7254e;
+  background-color: #f9f2f4;
+  border-radius: 4px;
+}
+kbd {
+  padding: 2px 4px;
+  font-size: 90%;
+  color: #fff;
+  background-color: #333;
+  border-radius: 3px;
+  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
+          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
+}
+kbd kbd {
+  padding: 0;
+  font-size: 100%;
+  font-weight: bold;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+}
+pre {
+  display: block;
+  padding: 9.5px;
+  margin: 0 0 10px;
+  font-size: 13px;
+  line-height: 1.42857143;
+  color: #333;
+  word-break: break-all;
+  word-wrap: break-word;
+  background-color: #f5f5f5;
+  border: 1px solid #ccc;
+  border-radius: 4px;
+}
+pre code {
+  padding: 0;
+  font-size: inherit;
+  color: inherit;
+  white-space: pre-wrap;
+  background-color: transparent;
+  border-radius: 0;
+}
+.pre-scrollable {
+  max-height: 340px;
+  overflow-y: scroll;
+}
+.container {
+  padding-right: 15px;
+  padding-left: 15px;
+  margin-right: auto;
+  margin-left: auto;
+}
+@media (min-width: 768px) {
+  .container {
+    width: 750px;
+  }
+}
+@media (min-width: 992px) {
+  .container {
+    width: 970px;
+  }
+}
+@media (min-width: 1200px) {
+  .container {
+    width: 1170px;
+  }
+}
+.container-fluid {
+  padding-right: 15px;
+  padding-left: 15px;
+  margin-right: auto;
+  margin-left: auto;
+}
+.row {
+  margin-right: -15px;
+  margin-left: -15px;
+}
+.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
+  position: relative;
+  min-height: 1px;
+  padding-right: 15px;
+  padding-left: 15px;
+}
+.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
+  float: left;
+}
+.col-xs-12 {
+  width: 100%;
+}
+.col-xs-11 {
+  width: 91.66666667%;
+}
+.col-xs-10 {
+  width: 83.33333333%;
+}
+.col-xs-9 {
+  width: 75%;
+}
+.col-xs-8 {
+  width: 66.66666667%;
+}
+.col-xs-7 {
+  width: 58.33333333%;
+}
+.col-xs-6 {
+  width: 50%;
+}
+.col-xs-5 {
+  width: 41.66666667%;
+}
+.col-xs-4 {
+  width: 33.33333333%;
+}
+.col-xs-3 {
+  width: 25%;
+}
+.col-xs-2 {
+  width: 16.66666667%;
+}
+.col-xs-1 {
+  width: 8.33333333%;
+}
+.col-xs-pull-12 {
+  right: 100%;
+}
+.col-xs-pull-11 {
+  right: 91.66666667%;
+}
+.col-xs-pull-10 {
+  right: 83.33333333%;
+}
+.col-xs-pull-9 {
+  right: 75%;
+}
+.col-xs-pull-8 {
+  right: 66.66666667%;
+}
+.col-xs-pull-7 {
+  right: 58.33333333%;
+}
+.col-xs-pull-6 {
+  right: 50%;
+}
+.col-xs-pull-5 {
+  right: 41.66666667%;
+}
+.col-xs-pull-4 {
+  right: 33.33333333%;
+}
+.col-xs-pull-3 {
+  right: 25%;
+}
+.col-xs-pull-2 {
+  right: 16.66666667%;
+}
+.col-xs-pull-1 {
+  right: 8.33333333%;
+}
+.col-xs-pull-0 {
+  right: auto;
+}
+.col-xs-push-12 {
+  left: 100%;
+}
+.col-xs-push-11 {
+  left: 91.66666667%;
+}
+.col-xs-push-10 {
+  left: 83.33333333%;
+}
+.col-xs-push-9 {
+  left: 75%;
+}
+.col-xs-push-8 {
+  left: 66.66666667%;
+}
+.col-xs-push-7 {
+  left: 58.33333333%;
+}
+.col-xs-push-6 {
+  left: 50%;
+}
+.col-xs-push-5 {
+  left: 41.66666667%;
+}
+.col-xs-push-4 {
+  left: 33.33333333%;
+}
+.col-xs-push-3 {
+  left: 25%;
+}
+.col-xs-push-2 {
+  left: 16.66666667%;
+}
+.col-xs-push-1 {
+  left: 8.33333333%;
+}
+.col-xs-push-0 {
+  left: auto;
+}
+.col-xs-offset-12 {
+  margin-left: 100%;
+}
+.col-xs-offset-11 {
+  margin-left: 91.66666667%;
+}
+.col-xs-offset-10 {
+  margin-left: 83.33333333%;
+}
+.col-xs-offset-9 {
+  margin-left: 75%;
+}
+.col-xs-offset-8 {
+  margin-left: 66.66666667%;
+}
+.col-xs-offset-7 {
+  margin-left: 58.33333333%;
+}
+.col-xs-offset-6 {
+  margin-left: 50%;
+}
+.col-xs-offset-5 {
+  margin-left: 41.66666667%;
+}
+.col-xs-offset-4 {
+  margin-left: 33.33333333%;
+}
+.col-xs-offset-3 {
+  margin-left: 25%;
+}
+.col-xs-offset-2 {
+  margin-left: 16.66666667%;
+}
+.col-xs-offset-1 {
+  margin-left: 8.33333333%;
+}
+.col-xs-offset-0 {
+  margin-left: 0;
+}
+@media (min-width: 768px) {
+  .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
+    float: left;
+  }
+  .col-sm-12 {
+    width: 100%;
+  }
+  .col-sm-11 {
+    width: 91.66666667%;
+  }
+  .col-sm-10 {
+    width: 83.33333333%;
+  }
+  .col-sm-9 {
+    width: 75%;
+  }
+  .col-sm-8 {
+    width: 66.66666667%;
+  }
+  .col-sm-7 {
+    width: 58.33333333%;
+  }
+  .col-sm-6 {
+    width: 50%;
+  }
+  .col-sm-5 {
+    width: 41.66666667%;
+  }
+  .col-sm-4 {
+    width: 33.33333333%;
+  }
+  .col-sm-3 {
+    width: 25%;
+  }
+  .col-sm-2 {
+    width: 16.66666667%;
+  }
+  .col-sm-1 {
+    width: 8.33333333%;
+  }
+  .col-sm-pull-12 {
+    right: 100%;
+  }
+  .col-sm-pull-11 {
+    right: 91.66666667%;
+  }
+  .col-sm-pull-10 {
+    right: 83.33333333%;
+  }
+  .col-sm-pull-9 {
+    right: 75%;
+  }
+  .col-sm-pull-8 {
+    right: 66.66666667%;
+  }
+  .col-sm-pull-7 {
+    right: 58.33333333%;
+  }
+  .col-sm-pull-6 {
+    right: 50%;
+  }
+  .col-sm-pull-5 {
+    right: 41.66666667%;
+  }
+  .col-sm-pull-4 {
+    right: 33.33333333%;
+  }
+  .col-sm-pull-3 {
+    right: 25%;
+  }
+  .col-sm-pull-2 {
+    right: 16.66666667%;
+  }
+  .col-sm-pull-1 {
+    right: 8.33333333%;
+  }
+  .col-sm-pull-0 {
+    right: auto;
+  }
+  .col-sm-push-12 {
+    left: 100%;
+  }
+  .col-sm-push-11 {
+    left: 91.66666667%;
+  }
+  .col-sm-push-10 {
+    left: 83.33333333%;
+  }
+  .col-sm-push-9 {
+    left: 75%;
+  }
+  .col-sm-push-8 {
+    left: 66.66666667%;
+  }
+  .col-sm-push-7 {
+    left: 58.33333333%;
+  }
+  .col-sm-push-6 {
+    left: 50%;
+  }
+  .col-sm-push-5 {
+    left: 41.66666667%;
+  }
+  .col-sm-push-4 {
+    left: 33.33333333%;
+  }
+  .col-sm-push-3 {
+    left: 25%;
+  }
+  .col-sm-push-2 {
+    left: 16.66666667%;
+  }
+  .col-sm-push-1 {
+    left: 8.33333333%;
+  }
+  .col-sm-push-0 {
+    left: auto;
+  }
+  .col-sm-offset-12 {
+    margin-left: 100%;
+  }
+  .col-sm-offset-11 {
+    margin-left: 91.66666667%;
+  }
+  .col-sm-offset-10 {
+    margin-left: 83.33333333%;
+  }
+  .col-sm-offset-9 {
+    margin-left: 75%;
+  }
+  .col-sm-offset-8 {
+    margin-left: 66.66666667%;
+  }
+  .col-sm-offset-7 {
+    margin-left: 58.33333333%;
+  }
+  .col-sm-offset-6 {
+    margin-left: 50%;
+  }
+  .col-sm-offset-5 {
+    margin-left: 41.66666667%;
+  }
+  .col-sm-offset-4 {
+    margin-left: 33.33333333%;
+  }
+  .col-sm-offset-3 {
+    margin-left: 25%;
+  }
+  .col-sm-offset-2 {
+    margin-left: 16.66666667%;
+  }
+  .col-sm-offset-1 {
+    margin-left: 8.33333333%;
+  }
+  .col-sm-offset-0 {
+    margin-left: 0;
+  }
+}
+@media (min-width: 992px) {
+  .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
+    float: left;
+  }
+  .col-md-12 {
+    width: 100%;
+  }
+  .col-md-11 {
+    width: 91.66666667%;
+  }
+  .col-md-10 {
+    width: 83.33333333%;
+  }
+  .col-md-9 {
+    width: 75%;
+  }
+  .col-md-8 {
+    width: 66.66666667%;
+  }
+  .col-md-7 {
+    width: 58.33333333%;
+  }
+  .col-md-6 {
+    width: 50%;
+  }
+  .col-md-5 {
+    width: 41.66666667%;
+  }
+  .col-md-4 {
+    width: 33.33333333%;
+  }
+  .col-md-3 {
+    width: 25%;
+  }
+  .col-md-2 {
+    width: 16.66666667%;
+  }
+  .col-md-1 {
+    width: 8.33333333%;
+  }
+  .col-md-pull-12 {
+    right: 100%;
+  }
+  .col-md-pull-11 {
+    right: 91.66666667%;
+  }
+  .col-md-pull-10 {
+    right: 83.33333333%;
+  }
+  .col-md-pull-9 {
+    right: 75%;
+  }
+  .col-md-pull-8 {
+    right: 66.66666667%;
+  }
+  .col-md-pull-7 {
+    right: 58.33333333%;
+  }
+  .col-md-pull-6 {
+    right: 50%;
+  }
+  .col-md-pull-5 {
+    right: 41.66666667%;
+  }
+  .col-md-pull-4 {
+    right: 33.33333333%;
+  }
+  .col-md-pull-3 {
+    right: 25%;
+  }
+  .col-md-pull-2 {
+    right: 16.66666667%;
+  }
+  .col-md-pull-1 {
+    right: 8.33333333%;
+  }
+  .col-md-pull-0 {
+    right: auto;
+  }
+  .col-md-push-12 {
+    left: 100%;
+  }
+  .col-md-push-11 {
+    left: 91.66666667%;
+  }
+  .col-md-push-10 {
+    left: 83.33333333%;
+  }
+  .col-md-push-9 {
+    left: 75%;
+  }
+  .col-md-push-8 {
+    left: 66.66666667%;
+  }
+  .col-md-push-7 {
+    left: 58.33333333%;
+  }
+  .col-md-push-6 {
+    left: 50%;
+  }
+  .col-md-push-5 {
+    left: 41.66666667%;
+  }
+  .col-md-push-4 {
+    left: 33.33333333%;
+  }
+  .col-md-push-3 {
+    left: 25%;
+  }
+  .col-md-push-2 {
+    left: 16.66666667%;
+  }
+  .col-md-push-1 {
+    left: 8.33333333%;
+  }
+  .col-md-push-0 {
+    left: auto;
+  }
+  .col-md-offset-12 {
+    margin-left: 100%;
+  }
+  .col-md-offset-11 {
+    margin-left: 91.66666667%;
+  }
+  .col-md-offset-10 {
+    margin-left: 83.33333333%;
+  }
+  .col-md-offset-9 {
+    margin-left: 75%;
+  }
+  .col-md-offset-8 {
+    margin-left: 66.66666667%;
+  }
+  .col-md-offset-7 {
+    margin-left: 58.33333333%;
+  }
+  .col-md-offset-6 {
+    margin-left: 50%;
+  }
+  .col-md-offset-5 {
+    margin-left: 41.66666667%;
+  }
+  .col-md-offset-4 {
+    margin-left: 33.33333333%;
+  }
+  .col-md-offset-3 {
+    margin-left: 25%;
+  }
+  .col-md-offset-2 {
+    margin-left: 16.66666667%;
+  }
+  .col-md-offset-1 {
+    margin-left: 8.33333333%;
+  }
+  .col-md-offset-0 {
+    margin-left: 0;
+  }
+}
+@media (min-width: 1200px) {
+  .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
+    float: left;
+  }
+  .col-lg-12 {
+    width: 100%;
+  }
+  .col-lg-11 {
+    width: 91.66666667%;
+  }
+  .col-lg-10 {
+    width: 83.33333333%;
+  }
+  .col-lg-9 {
+    width: 75%;
+  }
+  .col-lg-8 {
+    width: 66.66666667%;
+  }
+  .col-lg-7 {
+    width: 58.33333333%;
+  }
+  .col-lg-6 {
+    width: 50%;
+  }
+  .col-lg-5 {
+    width: 41.66666667%;
+  }
+  .col-lg-4 {
+    width: 33.33333333%;
+  }
+  .col-lg-3 {
+    width: 25%;
+  }
+  .col-lg-2 {
+    width: 16.66666667%;
+  }
+  .col-lg-1 {
+    width: 8.33333333%;
+  }
+  .col-lg-pull-12 {
+    right: 100%;
+  }
+  .col-lg-pull-11 {
+    right: 91.66666667%;
+  }
+  .col-lg-pull-10 {
+    right: 83.33333333%;
+  }
+  .col-lg-pull-9 {
+    right: 75%;
+  }
+  .col-lg-pull-8 {
+    right: 66.66666667%;
+  }
+  .col-lg-pull-7 {
+    right: 58.33333333%;
+  }
+  .col-lg-pull-6 {
+    right: 50%;
+  }
+  .col-lg-pull-5 {
+    right: 41.66666667%;
+  }
+  .col-lg-pull-4 {
+    right: 33.33333333%;
+  }
+  .col-lg-pull-3 {
+    right: 25%;
+  }
+  .col-lg-pull-2 {
+    right: 16.66666667%;
+  }
+  .col-lg-pull-1 {
+    right: 8.33333333%;
+  }
+  .col-lg-pull-0 {
+    right: auto;
+  }
+  .col-lg-push-12 {
+    left: 100%;
+  }
+  .col-lg-push-11 {
+    left: 91.66666667%;
+  }
+  .col-lg-push-10 {
+    left: 83.33333333%;
+  }
+  .col-lg-push-9 {
+    left: 75%;
+  }
+  .col-lg-push-8 {
+    left: 66.66666667%;
+  }
+  .col-lg-push-7 {
+    left: 58.33333333%;
+  }
+  .col-lg-push-6 {
+    left: 50%;
+  }
+  .col-lg-push-5 {
+    left: 41.66666667%;
+  }
+  .col-lg-push-4 {
+    left: 33.33333333%;
+  }
+  .col-lg-push-3 {
+    left: 25%;
+  }
+  .col-lg-push-2 {
+    left: 16.66666667%;
+  }
+  .col-lg-push-1 {
+    left: 8.33333333%;
+  }
+  .col-lg-push-0 {
+    left: auto;
+  }
+  .col-lg-offset-12 {
+    margin-left: 100%;
+  }
+  .col-lg-offset-11 {
+    margin-left: 91.66666667%;
+  }
+  .col-lg-offset-10 {
+    margin-left: 83.33333333%;
+  }
+  .col-lg-offset-9 {
+    margin-left: 75%;
+  }
+  .col-lg-offset-8 {
+    margin-left: 66.66666667%;
+  }
+  .col-lg-offset-7 {
+    margin-left: 58.33333333%;
+  }
+  .col-lg-offset-6 {
+    margin-left: 50%;
+  }
+  .col-lg-offset-5 {
+    margin-left: 41.66666667%;
+  }
+  .col-lg-offset-4 {
+    margin-left: 33.33333333%;
+  }
+  .col-lg-offset-3 {
+    margin-left: 25%;
+  }
+  .col-lg-offset-2 {
+    margin-left: 16.66666667%;
+  }
+  .col-lg-offset-1 {
+    margin-left: 8.33333333%;
+  }
+  .col-lg-offset-0 {
+    margin-left: 0;
+  }
+}
+table {
+  background-color: transparent;
+}
+caption {
+  padding-top: 8px;
+  padding-bottom: 8px;
+  color: #777;
+  text-align: left;
+}
+th {
+  text-align: left;
+}
+.table {
+  width: 100%;
+  max-width: 100%;
+  margin-bottom: 20px;
+}
+.table > thead > tr > th,
+.table > tbody > tr > th,
+.table > tfoot > tr > th,
+.table > thead > tr > td,
+.table > tbody > tr > td,
+.table > tfoot > tr > td {
+  padding: 8px;
+  line-height: 1.42857143;
+  vertical-align: top;
+  border-top: 1px solid #ddd;
+}
+.table > thead > tr > th {
+  vertical-align: bottom;
+  border-bottom: 2px solid #ddd;
+}
+.table > caption + thead > tr:first-child > th,
+.table > colgroup + thead > tr:first-child > th,
+.table > thead:first-child > tr:first-child > th,
+.table > caption + thead > tr:first-child > td,
+.table > colgroup + thead > tr:first-child > td,
+.table > thead:first-child > tr:first-child > td {
+  border-top: 0;
+}
+.table > tbody + tbody {
+  border-top: 2px solid #ddd;
+}
+.table .table {
+  background-color: #fff;
+}
+.table-condensed > thead > tr > th,
+.table-condensed > tbody > tr > th,
+.table-condensed > tfoot > tr > th,
+.table-condensed > thead > tr > td,
+.table-condensed > tbody > tr > td,
+.table-condensed > tfoot > tr > td {
+  padding: 5px;
+}
+.table-bordered {
+  border: 1px solid #ddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > tbody > tr > th,
+.table-bordered > tfoot > tr > th,
+.table-bordered > thead > tr > td,
+.table-bordered > tbody > tr > td,
+.table-bordered > tfoot > tr > td {
+  border: 1px solid #ddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > thead > tr > td {
+  border-bottom-width: 2px;
+}
+.table-striped > tbody > tr:nth-of-type(odd) {
+  background-color: #f9f9f9;
+}
+.table-hover > tbody > tr:hover {
+  background-color: #f5f5f5;
+}
+table col[class*="col-"] {
+  position: static;
+  display: table-column;
+  float: none;
+}
+table td[class*="col-"],
+table th[class*="col-"] {
+  position: static;
+  display: table-cell;
+  float: none;
+}
+.table > thead > tr > td.active,
+.table > tbody > tr > td.active,
+.table > tfoot > tr > td.active,
+.table > thead > tr > th.active,
+.table > tbody > tr > th.active,
+.table > tfoot > tr > th.active,
+.table > thead > tr.active > td,
+.table > tbody > tr.active > td,
+.table > tfoot > tr.active > td,
+.table > thead > tr.active > th,
+.table > tbody > tr.active > th,
+.table > tfoot > tr.active > th {
+  background-color: #f5f5f5;
+}
+.table-hover > tbody > tr > td.active:hover,
+.table-hover > tbody > tr > th.active:hover,
+.table-hover > tbody > tr.active:hover > td,
+.table-hover > tbody > tr:hover > .active,
+.table-hover > tbody > tr.active:hover > th {
+  background-color: #e8e8e8;
+}
+.table > thead > tr > td.success,
+.table > tbody > tr > td.success,
+.table > tfoot > tr > td.success,
+.table > thead > tr > th.success,
+.table > tbody > tr > th.success,
+.table > tfoot > tr > th.success,
+.table > thead > tr.success > td,
+.table > tbody > tr.success > td,
+.table > tfoot > tr.success > td,
+.table > thead > tr.success > th,
+.table > tbody > tr.success > th,
+.table > tfoot > tr.success > th {
+  background-color: #dff0d8;
+}
+.table-hover > tbody > tr > td.success:hover,
+.table-hover > tbody > tr > th.success:hover,
+.table-hover > tbody > tr.success:hover > td,
+.table-hover > tbody > tr:hover > .success,
+.table-hover > tbody > tr.success:hover > th {
+  background-color: #d0e9c6;
+}
+.table > thead > tr > td.info,
+.table > tbody > tr > td.info,
+.table > tfoot > tr > td.info,
+.table > thead > tr > th.info,
+.table > tbody > tr > th.info,
+.table > tfoot > tr > th.info,
+.table > thead > tr.info > td,
+.table > tbody > tr.info > td,
+.table > tfoot > tr.info > td,
+.table > thead > tr.info > th,
+.table > tbody > tr.info > th,
+.table > tfoot > tr.info > th {
+  background-color: #d9edf7;
+}
+.table-hover > tbody > tr > td.info:hover,
+.table-hover > tbody > tr > th.info:hover,
+.table-hover > tbody > tr.info:hover > td,
+.table-hover > tbody > tr:hover > .info,
+.table-hover > tbody > tr.info:hover > th {
+  background-color: #c4e3f3;
+}
+.table > thead > tr > td.warning,
+.table > tbody > tr > td.warning,
+.table > tfoot > tr > td.warning,
+.table > thead > tr > th.warning,
+.table > tbody > tr > th.warning,
+.table > tfoot > tr > th.warning,
+.table > thead > tr.warning > td,
+.table > tbody > tr.warning > td,
+.table > tfoot > tr.warning > td,
+.table > thead > tr.warning > th,
+.table > tbody > tr.warning > th,
+.table > tfoot > tr.warning > th {
+  background-color: #fcf8e3;
+}
+.table-hover > tbody > tr > td.warning:hover,
+.table-hover > tbody > tr > th.warning:hover,
+.table-hover > tbody > tr.warning:hover > td,
+.table-hover > tbody > tr:hover > .warning,
+.table-hover > tbody > tr.warning:hover > th {
+  background-color: #faf2cc;
+}
+.table > thead > tr > td.danger,
+.table > tbody > tr > td.danger,
+.table > tfoot > tr > td.danger,
+.table > thead > tr > th.danger,
+.table > tbody > tr > th.danger,
+.table > tfoot > tr > th.danger,
+.table > thead > tr.danger > td,
+.table > tbody > tr.danger > td,
+.table > tfoot > tr.danger > td,
+.table > thead > tr.danger > th,
+.table > tbody > tr.danger > th,
+.table > tfoot > tr.danger > th {
+  background-color: #f2dede;
+}
+.table-hover > tbody > tr > td.danger:hover,
+.table-hover > tbody > tr > th.danger:hover,
+.table-hover > tbody > tr.danger:hover > td,
+.table-hover > tbody > tr:hover > .danger,
+.table-hover > tbody > tr.danger:hover > th {
+  background-color: #ebcccc;
+}
+.table-responsive {
+  min-height: .01%;
+  overflow-x: auto;
+}
+@media screen and (max-width: 767px) {
+  .table-responsive {
+    width: 100%;
+    margin-bottom: 15px;
+    overflow-y: hidden;
+    -ms-overflow-style: -ms-autohiding-scrollbar;
+    border: 1px solid #ddd;
+  }
+  .table-responsive > .table {
+    margin-bottom: 0;
+  }
+  .table-responsive > .table > thead > tr > th,
+  .table-responsive > .table > tbody > tr > th,
+  .table-responsive > .table > tfoot > tr > th,
+  .table-responsive > .table > thead > tr > td,
+  .table-responsive > .table > tbody > tr > td,
+  .table-responsive > .table > tfoot > tr > td {
+    white-space: nowrap;
+  }
+  .table-responsive > .table-bordered {
+    border: 0;
+  }
+  .table-responsive > .table-bordered > thead > tr > th:first-child,
+  .table-responsive > .table-bordered > tbody > tr > th:first-child,
+  .table-responsive > .table-bordered > tfoot > tr > th:first-child,
+  .table-responsive > .table-bordered > thead > tr > td:first-child,
+  .table-responsive > .table-bordered > tbody > tr > td:first-child,
+  .table-responsive > .table-bordered > tfoot > tr > td:first-child {
+    border-left: 0;
+  }
+  .table-responsive > .table-bordered > thead > tr > th:last-child,
+  .table-responsive > .table-bordered > tbody > tr > th:last-child,
+  .table-responsive > .table-bordered > tfoot > tr > th:last-child,
+  .table-responsive > .table-bordered > thead > tr > td:last-child,
+  .table-responsive > .table-bordered > tbody > tr > td:last-child,
+  .table-responsive > .table-bordered > tfoot > tr > td:last-child {
+    border-right: 0;
+  }
+  .table-responsive > .table-bordered > tbody > tr:last-child > th,
+  .table-responsive > .table-bordered > tfoot > tr:last-child > th,
+  .table-responsive > .table-bordered > tbody > tr:last-child > td,
+  .table-responsive > .table-bordered > tfoot > tr:last-child > td {
+    border-bottom: 0;
+  }
+}
+fieldset {
+  min-width: 0;
+  padding: 0;
+  margin: 0;
+  border: 0;
+}
+legend {
+  display: block;
+  width: 100%;
+  padding: 0;
+  margin-bottom: 20px;
+  font-size: 21px;
+  line-height: inherit;
+  color: #333;
+  border: 0;
+  border-bottom: 1px solid #e5e5e5;
+}
+label {
+  display: inline-block;
+  max-width: 100%;
+  margin-bottom: 5px;
+  font-weight: bold;
+}
+input[type="search"] {
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+}
+input[type="radio"],
+input[type="checkbox"] {
+  margin: 4px 0 0;
+  margin-top: 1px \9;
+  line-height: normal;
+}
+input[type="file"] {
+  display: block;
+}
+input[type="range"] {
+  display: block;
+  width: 100%;
+}
+select[multiple],
+select[size] {
+  height: auto;
+}
+input[type="file"]:focus,
+input[type="radio"]:focus,
+input[type="checkbox"]:focus {
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+output {
+  display: block;
+  padding-top: 7px;
+  font-size: 14px;
+  line-height: 1.42857143;
+  color: #555;
+}
+.form-control {
+  display: block;
+  width: 100%;
+  height: 34px;
+  padding: 6px 12px;
+  font-size: 14px;
+  line-height: 1.42857143;
+  color: #555;
+  background-color: #fff;
+  background-image: none;
+  border: 1px solid #ccc;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+  -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
+       -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+          transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+}
+.form-control:focus {
+  border-color: #66afe9;
+  outline: 0;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
+          box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
+}
+.form-control::-moz-placeholder {
+  color: #999;
+  opacity: 1;
+}
+.form-control:-ms-input-placeholder {
+  color: #999;
+}
+.form-control::-webkit-input-placeholder {
+  color: #999;
+}
+.form-control::-ms-expand {
+  background-color: transparent;
+  border: 0;
+}
+.form-control[disabled],
+.form-control[readonly],
+fieldset[disabled] .form-control {
+  background-color: #eee;
+  opacity: 1;
+}
+.form-control[disabled],
+fieldset[disabled] .form-control {
+  cursor: not-allowed;
+}
+textarea.form-control {
+  height: auto;
+}
+input[type="search"] {
+  -webkit-appearance: none;
+}
+@media screen and (-webkit-min-device-pixel-ratio: 0) {
+  input[type="date"].form-control,
+  input[type="time"].form-control,
+  input[type="datetime-local"].form-control,
+  input[type="month"].form-control {
+    line-height: 34px;
+  }
+  input[type="date"].input-sm,
+  input[type="time"].input-sm,
+  input[type="datetime-local"].input-sm,
+  input[type="month"].input-sm,
+  .input-group-sm input[type="date"],
+  .input-group-sm input[type="time"],
+  .input-group-sm input[type="datetime-local"],
+  .input-group-sm input[type="month"] {
+    line-height: 30px;
+  }
+  input[type="date"].input-lg,
+  input[type="time"].input-lg,
+  input[type="datetime-local"].input-lg,
+  input[type="month"].input-lg,
+  .input-group-lg input[type="date"],
+  .input-group-lg input[type="time"],
+  .input-group-lg input[type="datetime-local"],
+  .input-group-lg input[type="month"] {
+    line-height: 46px;
+  }
+}
+.form-group {
+  margin-bottom: 15px;
+}
+.radio,
+.checkbox {
+  position: relative;
+  display: block;
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+.radio label,
+.checkbox label {
+  min-height: 20px;
+  padding-left: 20px;
+  margin-bottom: 0;
+  font-weight: normal;
+  cursor: pointer;
+}
+.radio input[type="radio"],
+.radio-inline input[type="radio"],
+.checkbox input[type="checkbox"],
+.checkbox-inline input[type="checkbox"] {
+  position: absolute;
+  margin-top: 4px \9;
+  margin-left: -20px;
+}
+.radio + .radio,
+.checkbox + .checkbox {
+  margin-top: -5px;
+}
+.radio-inline,
+.checkbox-inline {
+  position: relative;
+  display: inline-block;
+  padding-left: 20px;
+  margin-bottom: 0;
+  font-weight: normal;
+  vertical-align: middle;
+  cursor: pointer;
+}
+.radio-inline + .radio-inline,
+.checkbox-inline + .checkbox-inline {
+  margin-top: 0;
+  margin-left: 10px;
+}
+input[type="radio"][disabled],
+input[type="checkbox"][disabled],
+input[type="radio"].disabled,
+input[type="checkbox"].disabled,
+fieldset[disabled] input[type="radio"],
+fieldset[disabled] input[type="checkbox"] {
+  cursor: not-allowed;
+}
+.radio-inline.disabled,
+.checkbox-inline.disabled,
+fieldset[disabled] .radio-inline,
+fieldset[disabled] .checkbox-inline {
+  cursor: not-allowed;
+}
+.radio.disabled label,
+.checkbox.disabled label,
+fieldset[disabled] .radio label,
+fieldset[disabled] .checkbox label {
+  cursor: not-allowed;
+}
+.form-control-static {
+  min-height: 34px;
+  padding-top: 7px;
+  padding-bottom: 7px;
+  margin-bottom: 0;
+}
+.form-control-static.input-lg,
+.form-control-static.input-sm {
+  padding-right: 0;
+  padding-left: 0;
+}
+.input-sm {
+  height: 30px;
+  padding: 5px 10px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 3px;
+}
+select.input-sm {
+  height: 30px;
+  line-height: 30px;
+}
+textarea.input-sm,
+select[multiple].input-sm {
+  height: auto;
+}
+.form-group-sm .form-control {
+  height: 30px;
+  padding: 5px 10px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 3px;
+}
+.form-group-sm select.form-control {
+  height: 30px;
+  line-height: 30px;
+}
+.form-group-sm textarea.form-control,
+.form-group-sm select[multiple].form-control {
+  height: auto;
+}
+.form-group-sm .form-control-static {
+  height: 30px;
+  min-height: 32px;
+  padding: 6px 10px;
+  font-size: 12px;
+  line-height: 1.5;
+}
+.input-lg {
+  height: 46px;
+  padding: 10px 16px;
+  font-size: 18px;
+  line-height: 1.3333333;
+  border-radius: 6px;
+}
+select.input-lg {
+  height: 46px;
+  line-height: 46px;
+}
+textarea.input-lg,
+select[multiple].input-lg {
+  height: auto;
+}
+.form-group-lg .form-control {
+  height: 46px;
+  padding: 10px 16px;
+  font-size: 18px;
+  line-height: 1.3333333;
+  border-radius: 6px;
+}
+.form-group-lg select.form-control {
+  height: 46px;
+  line-height: 46px;
+}
+.form-group-lg textarea.form-control,
+.form-group-lg select[multiple].form-control {
+  height: auto;
+}
+.form-group-lg .form-control-static {
+  height: 46px;
+  min-height: 38px;
+  padding: 11px 16px;
+  font-size: 18px;
+  line-height: 1.3333333;
+}
+.has-feedback {
+  position: relative;
+}
+.has-feedback .form-control {
+  padding-right: 42.5px;
+}
+.form-control-feedback {
+  position: absolute;
+  top: 0;
+  right: 0;
+  z-index: 2;
+  display: block;
+  width: 34px;
+  height: 34px;
+  line-height: 34px;
+  text-align: center;
+  pointer-events: none;
+}
+.input-lg + .form-control-feedback,
+.input-group-lg + .form-control-feedback,
+.form-group-lg .form-control + .form-control-feedback {
+  width: 46px;
+  height: 46px;
+  line-height: 46px;
+}
+.input-sm + .form-control-feedback,
+.input-group-sm + .form-control-feedback,
+.form-group-sm .form-control + .form-control-feedback {
+  width: 30px;
+  height: 30px;
+  line-height: 30px;
+}
+.has-success .help-block,
+.has-success .control-label,
+.has-success .radio,
+.has-success .checkbox,
+.has-success .radio-inline,
+.has-success .checkbox-inline,
+.has-success.radio label,
+.has-success.checkbox label,
+.has-success.radio-inline label,
+.has-success.checkbox-inline label {
+  color: #3c763d;
+}
+.has-success .form-control {
+  border-color: #3c763d;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+}
+.has-success .form-control:focus {
+  border-color: #2b542c;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
+}
+.has-success .input-group-addon {
+  color: #3c763d;
+  background-color: #dff0d8;
+  border-color: #3c763d;
+}
+.has-success .form-control-feedback {
+  color: #3c763d;
+}
+.has-warning .help-block,
+.has-warning .control-label,
+.has-warning .radio,
+.has-warning .checkbox,
+.has-warning .radio-inline,
+.has-warning .checkbox-inline,
+.has-warning.radio label,
+.has-warning.checkbox label,
+.has-warning.radio-inline label,
+.has-warning.checkbox-inline label {
+  color: #8a6d3b;
+}
+.has-warning .form-control {
+  border-color: #8a6d3b;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+}
+.has-warning .form-control:focus {
+  border-color: #66512c;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
+}
+.has-warning .input-group-addon {
+  color: #8a6d3b;
+  background-color: #fcf8e3;
+  border-color: #8a6d3b;
+}
+.has-warning .form-control-feedback {
+  color: #8a6d3b;
+}
+.has-error .help-block,
+.has-error .control-label,
+.has-error .radio,
+.has-error .checkbox,
+.has-error .radio-inline,
+.has-error .checkbox-inline,
+.has-error.radio label,
+.has-error.checkbox label,
+.has-error.radio-inline label,
+.has-error.checkbox-inline label {
+  color: #a94442;
+}
+.has-error .form-control {
+  border-color: #a94442;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+}
+.has-error .form-control:focus {
+  border-color: #843534;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
+}
+.has-error .input-group-addon {
+  color: #a94442;
+  background-color: #f2dede;
+  border-color: #a94442;
+}
+.has-error .form-control-feedback {
+  color: #a94442;
+}
+.has-feedback label ~ .form-control-feedback {
+  top: 25px;
+}
+.has-feedback label.sr-only ~ .form-control-feedback {
+  top: 0;
+}
+.help-block {
+  display: block;
+  margin-top: 5px;
+  margin-bottom: 10px;
+  color: #737373;
+}
+@media (min-width: 768px) {
+  .form-inline .form-group {
+    display: inline-block;
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .form-inline .form-control {
+    display: inline-block;
+    width: auto;
+    vertical-align: middle;
+  }
+  .form-inline .form-control-static {
+    display: inline-block;
+  }
+  .form-inline .input-group {
+    display: inline-table;
+    vertical-align: middle;
+  }
+  .form-inline .input-group .input-group-addon,
+  .form-inline .input-group .input-group-btn,
+  .form-inline .input-group .form-control {
+    width: auto;
+  }
+  .form-inline .input-group > .form-control {
+    width: 100%;
+  }
+  .form-inline .control-label {
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .form-inline .radio,
+  .form-inline .checkbox {
+    display: inline-block;
+    margin-top: 0;
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .form-inline .radio label,
+  .form-inline .checkbox label {
+    padding-left: 0;
+  }
+  .form-inline .radio input[type="radio"],
+  .form-inline .checkbox input[type="checkbox"] {
+    position: relative;
+    margin-left: 0;
+  }
+  .form-inline .has-feedback .form-control-feedback {
+    top: 0;
+  }
+}
+.form-horizontal .radio,
+.form-horizontal .checkbox,
+.form-horizontal .radio-inline,
+.form-horizontal .checkbox-inline {
+  padding-top: 7px;
+  margin-top: 0;
+  margin-bottom: 0;
+}
+.form-horizontal .radio,
+.form-horizontal .checkbox {
+  min-height: 27px;
+}
+.form-horizontal .form-group {
+  margin-right: -15px;
+  margin-left: -15px;
+}
+@media (min-width: 768px) {
+  .form-horizontal .control-label {
+    padding-top: 7px;
+    margin-bottom: 0;
+    text-align: right;
+  }
+}
+.form-horizontal .has-feedback .form-control-feedback {
+  right: 15px;
+}
+@media (min-width: 768px) {
+  .form-horizontal .form-group-lg .control-label {
+    padding-top: 11px;
+    font-size: 18px;
+  }
+}
+@media (min-width: 768px) {
+  .form-horizontal .form-group-sm .control-label {
+    padding-top: 6px;
+    font-size: 12px;
+  }
+}
+.btn {
+  display: inline-block;
+  padding: 6px 12px;
+  margin-bottom: 0;
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 1.42857143;
+  text-align: center;
+  white-space: nowrap;
+  vertical-align: middle;
+  -ms-touch-action: manipulation;
+      touch-action: manipulation;
+  cursor: pointer;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none;
+  background-image: none;
+  border: 1px solid transparent;
+  border-radius: 4px;
+}
+.btn:focus,
+.btn:active:focus,
+.btn.active:focus,
+.btn.focus,
+.btn:active.focus,
+.btn.active.focus {
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+.btn:hover,
+.btn:focus,
+.btn.focus {
+  color: #333;
+  text-decoration: none;
+}
+.btn:active,
+.btn.active {
+  background-image: none;
+  outline: 0;
+  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+}
+.btn.disabled,
+.btn[disabled],
+fieldset[disabled] .btn {
+  cursor: not-allowed;
+  filter: alpha(opacity=65);
+  -webkit-box-shadow: none;
+          box-shadow: none;
+  opacity: .65;
+}
+a.btn.disabled,
+fieldset[disabled] a.btn {
+  pointer-events: none;
+}
+.btn-default {
+  color: #333;
+  background-color: #fff;
+  border-color: #ccc;
+}
+.btn-default:focus,
+.btn-default.focus {
+  color: #333;
+  background-color: #e6e6e6;
+  border-color: #8c8c8c;
+}
+.btn-default:hover {
+  color: #333;
+  background-color: #e6e6e6;
+  border-color: #adadad;
+}
+.btn-default:active,
+.btn-default.active,
+.open > .dropdown-toggle.btn-default {
+  color: #333;
+  background-color: #e6e6e6;
+  border-color: #adadad;
+}
+.btn-default:active:hover,
+.btn-default.active:hover,
+.open > .dropdown-toggle.btn-default:hover,
+.btn-default:active:focus,
+.btn-default.active:focus,
+.open > .dropdown-toggle.btn-default:focus,
+.btn-default:active.focus,
+.btn-default.active.focus,
+.open > .dropdown-toggle.btn-default.focus {
+  color: #333;
+  background-color: #d4d4d4;
+  border-color: #8c8c8c;
+}
+.btn-default:active,
+.btn-default.active,
+.open > .dropdown-toggle.btn-default {
+  background-image: none;
+}
+.btn-default.disabled:hover,
+.btn-default[disabled]:hover,
+fieldset[disabled] .btn-default:hover,
+.btn-default.disabled:focus,
+.btn-default[disabled]:focus,
+fieldset[disabled] .btn-default:focus,
+.btn-default.disabled.focus,
+.btn-default[disabled].focus,
+fieldset[disabled] .btn-default.focus {
+  background-color: #fff;
+  border-color: #ccc;
+}
+.btn-default .badge {
+  color: #fff;
+  background-color: #333;
+}
+.btn-primary {
+  color: #fff;
+  background-color: #337ab7;
+  border-color: #2e6da4;
+}
+.btn-primary:focus,
+.btn-primary.focus {
+  color: #fff;
+  background-color: #286090;
+  border-color: #122b40;
+}
+.btn-primary:hover {
+  color: #fff;
+  background-color: #286090;
+  border-color: #204d74;
+}
+.btn-primary:active,
+.btn-primary.active,
+.open > .dropdown-toggle.btn-primary {
+  color: #fff;
+  background-color: #286090;
+  border-color: #204d74;
+}
+.btn-primary:active:hover,
+.btn-primary.active:hover,
+.open > .dropdown-toggle.btn-primary:hover,
+.btn-primary:active:focus,
+.btn-primary.active:focus,
+.open > .dropdown-toggle.btn-primary:focus,
+.btn-primary:active.focus,
+.btn-primary.active.focus,
+.open > .dropdown-toggle.btn-primary.focus {
+  color: #fff;
+  background-color: #204d74;
+  border-color: #122b40;
+}
+.btn-primary:active,
+.btn-primary.active,
+.open > .dropdown-toggle.btn-primary {
+  background-image: none;
+}
+.btn-primary.disabled:hover,
+.btn-primary[disabled]:hover,
+fieldset[disabled] .btn-primary:hover,
+.btn-primary.disabled:focus,
+.btn-primary[disabled]:focus,
+fieldset[disabled] .btn-primary:focus,
+.btn-primary.disabled.focus,
+.btn-primary[disabled].focus,
+fieldset[disabled] .btn-primary.focus {
+  background-color: #337ab7;
+  border-color: #2e6da4;
+}
+.btn-primary .badge {
+  color: #337ab7;
+  background-color: #fff;
+}
+.btn-success {
+  color: #fff;
+  background-color: #5cb85c;
+  border-color: #4cae4c;
+}
+.btn-success:focus,
+.btn-success.focus {
+  color: #fff;
+  background-color: #449d44;
+  border-color: #255625;
+}
+.btn-success:hover {
+  color: #fff;
+  background-color: #449d44;
+  border-color: #398439;
+}
+.btn-success:active,
+.btn-success.active,
+.open > .dropdown-toggle.btn-success {
+  color: #fff;
+  background-color: #449d44;
+  border-color: #398439;
+}
+.btn-success:active:hover,
+.btn-success.active:hover,
+.open > .dropdown-toggle.btn-success:hover,
+.btn-success:active:focus,
+.btn-success.active:focus,
+.open > .dropdown-toggle.btn-success:focus,
+.btn-success:active.focus,
+.btn-success.active.focus,
+.open > .dropdown-toggle.btn-success.focus {
+  color: #fff;
+  background-color: #398439;
+  border-color: #255625;
+}
+.btn-success:active,
+.btn-success.active,
+.open > .dropdown-toggle.btn-success {
+  background-image: none;
+}
+.btn-success.disabled:hover,
+.btn-success[disabled]:hover,
+fieldset[disabled] .btn-success:hover,
+.btn-success.disabled:focus,
+.btn-success[disabled]:focus,
+fieldset[disabled] .btn-success:focus,
+.btn-success.disabled.focus,
+.btn-success[disabled].focus,
+fieldset[disabled] .btn-success.focus {
+  background-color: #5cb85c;
+  border-color: #4cae4c;
+}
+.btn-success .badge {
+  color: #5cb85c;
+  background-color: #fff;
+}
+.btn-info {
+  color: #fff;
+  background-color: #5bc0de;
+  border-color: #46b8da;
+}
+.btn-info:focus,
+.btn-info.focus {
+  color: #fff;
+  background-color: #31b0d5;
+  border-color: #1b6d85;
+}
+.btn-info:hover {
+  color: #fff;
+  background-color: #31b0d5;
+  border-color: #269abc;
+}
+.btn-info:active,
+.btn-info.active,
+.open > .dropdown-toggle.btn-info {
+  color: #fff;
+  background-color: #31b0d5;
+  border-color: #269abc;
+}
+.btn-info:active:hover,
+.btn-info.active:hover,
+.open > .dropdown-toggle.btn-info:hover,
+.btn-info:active:focus,
+.btn-info.active:focus,
+.open > .dropdown-toggle.btn-info:focus,
+.btn-info:active.focus,
+.btn-info.active.focus,
+.open > .dropdown-toggle.btn-info.focus {
+  color: #fff;
+  background-color: #269abc;
+  border-color: #1b6d85;
+}
+.btn-info:active,
+.btn-info.active,
+.open > .dropdown-toggle.btn-info {
+  background-image: none;
+}
+.btn-info.disabled:hover,
+.btn-info[disabled]:hover,
+fieldset[disabled] .btn-info:hover,
+.btn-info.disabled:focus,
+.btn-info[disabled]:focus,
+fieldset[disabled] .btn-info:focus,
+.btn-info.disabled.focus,
+.btn-info[disabled].focus,
+fieldset[disabled] .btn-info.focus {
+  background-color: #5bc0de;
+  border-color: #46b8da;
+}
+.btn-info .badge {
+  color: #5bc0de;
+  background-color: #fff;
+}
+.btn-warning {
+  color: #fff;
+  background-color: #f0ad4e;
+  border-color: #eea236;
+}
+.btn-warning:focus,
+.btn-warning.focus {
+  color: #fff;
+  background-color: #ec971f;
+  border-color: #985f0d;
+}
+.btn-warning:hover {
+  color: #fff;
+  background-color: #ec971f;
+  border-color: #d58512;
+}
+.btn-warning:active,
+.btn-warning.active,
+.open > .dropdown-toggle.btn-warning {
+  color: #fff;
+  background-color: #ec971f;
+  border-color: #d58512;
+}
+.btn-warning:active:hover,
+.btn-warning.active:hover,
+.open > .dropdown-toggle.btn-warning:hover,
+.btn-warning:active:focus,
+.btn-warning.active:focus,
+.open > .dropdown-toggle.btn-warning:focus,
+.btn-warning:active.focus,
+.btn-warning.active.focus,
+.open > .dropdown-toggle.btn-warning.focus {
+  color: #fff;
+  background-color: #d58512;
+  border-color: #985f0d;
+}
+.btn-warning:active,
+.btn-warning.active,
+.open > .dropdown-toggle.btn-warning {
+  background-image: none;
+}
+.btn-warning.disabled:hover,
+.btn-warning[disabled]:hover,
+fieldset[disabled] .btn-warning:hover,
+.btn-warning.disabled:focus,
+.btn-warning[disabled]:focus,
+fieldset[disabled] .btn-warning:focus,
+.btn-warning.disabled.focus,
+.btn-warning[disabled].focus,
+fieldset[disabled] .btn-warning.focus {
+  background-color: #f0ad4e;
+  border-color: #eea236;
+}
+.btn-warning .badge {
+  color: #f0ad4e;
+  background-color: #fff;
+}
+.btn-danger {
+  color: #fff;
+  background-color: #d9534f;
+  border-color: #d43f3a;
+}
+.btn-danger:focus,
+.btn-danger.focus {
+  color: #fff;
+  background-color: #c9302c;
+  border-color: #761c19;
+}
+.btn-danger:hover {
+  color: #fff;
+  background-color: #c9302c;
+  border-color: #ac2925;
+}
+.btn-danger:active,
+.btn-danger.active,
+.open > .dropdown-toggle.btn-danger {
+  color: #fff;
+  background-color: #c9302c;
+  border-color: #ac2925;
+}
+.btn-danger:active:hover,
+.btn-danger.active:hover,
+.open > .dropdown-toggle.btn-danger:hover,
+.btn-danger:active:focus,
+.btn-danger.active:focus,
+.open > .dropdown-toggle.btn-danger:focus,
+.btn-danger:active.focus,
+.btn-danger.active.focus,
+.open > .dropdown-toggle.btn-danger.focus {
+  color: #fff;
+  background-color: #ac2925;
+  border-color: #761c19;
+}
+.btn-danger:active,
+.btn-danger.active,
+.open > .dropdown-toggle.btn-danger {
+  background-image: none;
+}
+.btn-danger.disabled:hover,
+.btn-danger[disabled]:hover,
+fieldset[disabled] .btn-danger:hover,
+.btn-danger.disabled:focus,
+.btn-danger[disabled]:focus,
+fieldset[disabled] .btn-danger:focus,
+.btn-danger.disabled.focus,
+.btn-danger[disabled].focus,
+fieldset[disabled] .btn-danger.focus {
+  background-color: #d9534f;
+  border-color: #d43f3a;
+}
+.btn-danger .badge {
+  color: #d9534f;
+  background-color: #fff;
+}
+.btn-link {
+  font-weight: normal;
+  color: #337ab7;
+  border-radius: 0;
+}
+.btn-link,
+.btn-link:active,
+.btn-link.active,
+.btn-link[disabled],
+fieldset[disabled] .btn-link {
+  background-color: transparent;
+  -webkit-box-shadow: none;
+          box-shadow: none;
+}
+.btn-link,
+.btn-link:hover,
+.btn-link:focus,
+.btn-link:active {
+  border-color: transparent;
+}
+.btn-link:hover,
+.btn-link:focus {
+  color: #23527c;
+  text-decoration: underline;
+  background-color: transparent;
+}
+.btn-link[disabled]:hover,
+fieldset[disabled] .btn-link:hover,
+.btn-link[disabled]:focus,
+fieldset[disabled] .btn-link:focus {
+  color: #777;
+  text-decoration: none;
+}
+.btn-lg,
+.btn-group-lg > .btn {
+  padding: 10px 16px;
+  font-size: 18px;
+  line-height: 1.3333333;
+  border-radius: 6px;
+}
+.btn-sm,
+.btn-group-sm > .btn {
+  padding: 5px 10px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 3px;
+}
+.btn-xs,
+.btn-group-xs > .btn {
+  padding: 1px 5px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 3px;
+}
+.btn-block {
+  display: block;
+  width: 100%;
+}
+.btn-block + .btn-block {
+  margin-top: 5px;
+}
+input[type="submit"].btn-block,
+input[type="reset"].btn-block,
+input[type="button"].btn-block {
+  width: 100%;
+}
+.fade {
+  opacity: 0;
+  -webkit-transition: opacity .15s linear;
+       -o-transition: opacity .15s linear;
+          transition: opacity .15s linear;
+}
+.fade.in {
+  opacity: 1;
+}
+.collapse {
+  display: none;
+}
+.collapse.in {
+  display: block;
+}
+tr.collapse.in {
+  display: table-row;
+}
+tbody.collapse.in {
+  display: table-row-group;
+}
+.collapsing {
+  position: relative;
+  height: 0;
+  overflow: hidden;
+  -webkit-transition-timing-function: ease;
+       -o-transition-timing-function: ease;
+          transition-timing-function: ease;
+  -webkit-transition-duration: .35s;
+       -o-transition-duration: .35s;
+          transition-duration: .35s;
+  -webkit-transition-property: height, visibility;
+       -o-transition-property: height, visibility;
+          transition-property: height, visibility;
+}
+.caret {
+  display: inline-block;
+  width: 0;
+  height: 0;
+  margin-left: 2px;
+  vertical-align: middle;
+  border-top: 4px dashed;
+  border-top: 4px solid \9;
+  border-right: 4px solid transparent;
+  border-left: 4px solid transparent;
+}
+.dropup,
+.dropdown {
+  position: relative;
+}
+.dropdown-toggle:focus {
+  outline: 0;
+}
+.dropdown-menu {
+  position: absolute;
+  top: 100%;
+  left: 0;
+  z-index: 1000;
+  display: none;
+  float: left;
+  min-width: 160px;
+  padding: 5px 0;
+  margin: 2px 0 0;
+  font-size: 14px;
+  text-align: left;
+  list-style: none;
+  background-color: #fff;
+  -webkit-background-clip: padding-box;
+          background-clip: padding-box;
+  border: 1px solid #ccc;
+  border: 1px solid rgba(0, 0, 0, .15);
+  border-radius: 4px;
+  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
+          box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
+}
+.dropdown-menu.pull-right {
+  right: 0;
+  left: auto;
+}
+.dropdown-menu .divider {
+  height: 1px;
+  margin: 9px 0;
+  overflow: hidden;
+  background-color: #e5e5e5;
+}
+.dropdown-menu > li > a {
+  display: block;
+  padding: 3px 20px;
+  clear: both;
+  font-weight: normal;
+  line-height: 1.42857143;
+  color: #333;
+  white-space: nowrap;
+}
+.dropdown-menu > li > a:hover,
+.dropdown-menu > li > a:focus {
+  color: #262626;
+  text-decoration: none;
+  background-color: #f5f5f5;
+}
+.dropdown-menu > .active > a,
+.dropdown-menu > .active > a:hover,
+.dropdown-menu > .active > a:focus {
+  color: #fff;
+  text-decoration: none;
+  background-color: #337ab7;
+  outline: 0;
+}
+.dropdown-menu > .disabled > a,
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+  color: #777;
+}
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+  text-decoration: none;
+  cursor: not-allowed;
+  background-color: transparent;
+  background-image: none;
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.open > .dropdown-menu {
+  display: block;
+}
+.open > a {
+  outline: 0;
+}
+.dropdown-menu-right {
+  right: 0;
+  left: auto;
+}
+.dropdown-menu-left {
+  right: auto;
+  left: 0;
+}
+.dropdown-header {
+  display: block;
+  padding: 3px 20px;
+  font-size: 12px;
+  line-height: 1.42857143;
+  color: #777;
+  white-space: nowrap;
+}
+.dropdown-backdrop {
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  z-index: 990;
+}
+.pull-right > .dropdown-menu {
+  right: 0;
+  left: auto;
+}
+.dropup .caret,
+.navbar-fixed-bottom .dropdown .caret {
+  content: "";
+  border-top: 0;
+  border-bottom: 4px dashed;
+  border-bottom: 4px solid \9;
+}
+.dropup .dropdown-menu,
+.navbar-fixed-bottom .dropdown .dropdown-menu {
+  top: auto;
+  bottom: 100%;
+  margin-bottom: 2px;
+}
+@media (min-width: 768px) {
+  .navbar-right .dropdown-menu {
+    right: 0;
+    left: auto;
+  }
+  .navbar-right .dropdown-menu-left {
+    right: auto;
+    left: 0;
+  }
+}
+.btn-group,
+.btn-group-vertical {
+  position: relative;
+  display: inline-block;
+  vertical-align: middle;
+}
+.btn-group > .btn,
+.btn-group-vertical > .btn {
+  position: relative;
+  float: left;
+}
+.btn-group > .btn:hover,
+.btn-group-vertical > .btn:hover,
+.btn-group > .btn:focus,
+.btn-group-vertical > .btn:focus,
+.btn-group > .btn:active,
+.btn-group-vertical > .btn:active,
+.btn-group > .btn.active,
+.btn-group-vertical > .btn.active {
+  z-index: 2;
+}
+.btn-group .btn + .btn,
+.btn-group .btn + .btn-group,
+.btn-group .btn-group + .btn,
+.btn-group .btn-group + .btn-group {
+  margin-left: -1px;
+}
+.btn-toolbar {
+  margin-left: -5px;
+}
+.btn-toolbar .btn,
+.btn-toolbar .btn-group,
+.btn-toolbar .input-group {
+  float: left;
+}
+.btn-toolbar > .btn,
+.btn-toolbar > .btn-group,
+.btn-toolbar > .input-group {
+  margin-left: 5px;
+}
+.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
+  border-radius: 0;
+}
+.btn-group > .btn:first-child {
+  margin-left: 0;
+}
+.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
+  border-top-right-radius: 0;
+  border-bottom-right-radius: 0;
+}
+.btn-group > .btn:last-child:not(:first-child),
+.btn-group > .dropdown-toggle:not(:first-child) {
+  border-top-left-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.btn-group > .btn-group {
+  float: left;
+}
+.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
+  border-radius: 0;
+}
+.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,
+.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
+  border-top-right-radius: 0;
+  border-bottom-right-radius: 0;
+}
+.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
+  border-top-left-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.btn-group .dropdown-toggle:active,
+.btn-group.open .dropdown-toggle {
+  outline: 0;
+}
+.btn-group > .btn + .dropdown-toggle {
+  padding-right: 8px;
+  padding-left: 8px;
+}
+.btn-group > .btn-lg + .dropdown-toggle {
+  padding-right: 12px;
+  padding-left: 12px;
+}
+.btn-group.open .dropdown-toggle {
+  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+}
+.btn-group.open .dropdown-toggle.btn-link {
+  -webkit-box-shadow: none;
+          box-shadow: none;
+}
+.btn .caret {
+  margin-left: 0;
+}
+.btn-lg .caret {
+  border-width: 5px 5px 0;
+  border-bottom-width: 0;
+}
+.dropup .btn-lg .caret {
+  border-width: 0 5px 5px;
+}
+.btn-group-vertical > .btn,
+.btn-group-vertical > .btn-group,
+.btn-group-vertical > .btn-group > .btn {
+  display: block;
+  float: none;
+  width: 100%;
+  max-width: 100%;
+}
+.btn-group-vertical > .btn-group > .btn {
+  float: none;
+}
+.btn-group-vertical > .btn + .btn,
+.btn-group-vertical > .btn + .btn-group,
+.btn-group-vertical > .btn-group + .btn,
+.btn-group-vertical > .btn-group + .btn-group {
+  margin-top: -1px;
+  margin-left: 0;
+}
+.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
+  border-radius: 0;
+}
+.btn-group-vertical > .btn:first-child:not(:last-child) {
+  border-top-left-radius: 4px;
+  border-top-right-radius: 4px;
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.btn-group-vertical > .btn:last-child:not(:first-child) {
+  border-top-left-radius: 0;
+  border-top-right-radius: 0;
+  border-bottom-right-radius: 4px;
+  border-bottom-left-radius: 4px;
+}
+.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
+  border-radius: 0;
+}
+.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
+.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
+  border-top-left-radius: 0;
+  border-top-right-radius: 0;
+}
+.btn-group-justified {
+  display: table;
+  width: 100%;
+  table-layout: fixed;
+  border-collapse: separate;
+}
+.btn-group-justified > .btn,
+.btn-group-justified > .btn-group {
+  display: table-cell;
+  float: none;
+  width: 1%;
+}
+.btn-group-justified > .btn-group .btn {
+  width: 100%;
+}
+.btn-group-justified > .btn-group .dropdown-menu {
+  left: auto;
+}
+[data-toggle="buttons"] > .btn input[type="radio"],
+[data-toggle="buttons"] > .btn-group > .btn input[type="radio"],
+[data-toggle="buttons"] > .btn input[type="checkbox"],
+[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {
+  position: absolute;
+  clip: rect(0, 0, 0, 0);
+  pointer-events: none;
+}
+.input-group {
+  position: relative;
+  display: table;
+  border-collapse: separate;
+}
+.input-group[class*="col-"] {
+  float: none;
+  padding-right: 0;
+  padding-left: 0;
+}
+.input-group .form-control {
+  position: relative;
+  z-index: 2;
+  float: left;
+  width: 100%;
+  margin-bottom: 0;
+}
+.input-group .form-control:focus {
+  z-index: 3;
+}
+.input-group-lg > .form-control,
+.input-group-lg > .input-group-addon,
+.input-group-lg > .input-group-btn > .btn {
+  height: 46px;
+  padding: 10px 16px;
+  font-size: 18px;
+  line-height: 1.3333333;
+  border-radius: 6px;
+}
+select.input-group-lg > .form-control,
+select.input-group-lg > .input-group-addon,
+select.input-group-lg > .input-group-btn > .btn {
+  height: 46px;
+  line-height: 46px;
+}
+textarea.input-group-lg > .form-control,
+textarea.input-group-lg > .input-group-addon,
+textarea.input-group-lg > .input-group-btn > .btn,
+select[multiple].input-group-lg > .form-control,
+select[multiple].input-group-lg > .input-group-addon,
+select[multiple].input-group-lg > .input-group-btn > .btn {
+  height: auto;
+}
+.input-group-sm > .form-control,
+.input-group-sm > .input-group-addon,
+.input-group-sm > .input-group-btn > .btn {
+  height: 30px;
+  padding: 5px 10px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 3px;
+}
+select.input-group-sm > .form-control,
+select.input-group-sm > .input-group-addon,
+select.input-group-sm > .input-group-btn > .btn {
+  height: 30px;
+  line-height: 30px;
+}
+textarea.input-group-sm > .form-control,
+textarea.input-group-sm > .input-group-addon,
+textarea.input-group-sm > .input-group-btn > .btn,
+select[multiple].input-group-sm > .form-control,
+select[multiple].input-group-sm > .input-group-addon,
+select[multiple].input-group-sm > .input-group-btn > .btn {
+  height: auto;
+}
+.input-group-addon,
+.input-group-btn,
+.input-group .form-control {
+  display: table-cell;
+}
+.input-group-addon:not(:first-child):not(:last-child),
+.input-group-btn:not(:first-child):not(:last-child),
+.input-group .form-control:not(:first-child):not(:last-child) {
+  border-radius: 0;
+}
+.input-group-addon,
+.input-group-btn {
+  width: 1%;
+  white-space: nowrap;
+  vertical-align: middle;
+}
+.input-group-addon {
+  padding: 6px 12px;
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 1;
+  color: #555;
+  text-align: center;
+  background-color: #eee;
+  border: 1px solid #ccc;
+  border-radius: 4px;
+}
+.input-group-addon.input-sm {
+  padding: 5px 10px;
+  font-size: 12px;
+  border-radius: 3px;
+}
+.input-group-addon.input-lg {
+  padding: 10px 16px;
+  font-size: 18px;
+  border-radius: 6px;
+}
+.input-group-addon input[type="radio"],
+.input-group-addon input[type="checkbox"] {
+  margin-top: 0;
+}
+.input-group .form-control:first-child,
+.input-group-addon:first-child,
+.input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .btn-group > .btn,
+.input-group-btn:first-child > .dropdown-toggle,
+.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
+.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
+  border-top-right-radius: 0;
+  border-bottom-right-radius: 0;
+}
+.input-group-addon:first-child {
+  border-right: 0;
+}
+.input-group .form-control:last-child,
+.input-group-addon:last-child,
+.input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .btn-group > .btn,
+.input-group-btn:last-child > .dropdown-toggle,
+.input-group-btn:first-child > .btn:not(:first-child),
+.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
+  border-top-left-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.input-group-addon:last-child {
+  border-left: 0;
+}
+.input-group-btn {
+  position: relative;
+  font-size: 0;
+  white-space: nowrap;
+}
+.input-group-btn > .btn {
+  position: relative;
+}
+.input-group-btn > .btn + .btn {
+  margin-left: -1px;
+}
+.input-group-btn > .btn:hover,
+.input-group-btn > .btn:focus,
+.input-group-btn > .btn:active {
+  z-index: 2;
+}
+.input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .btn-group {
+  margin-right: -1px;
+}
+.input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .btn-group {
+  z-index: 2;
+  margin-left: -1px;
+}
+.nav {
+  padding-left: 0;
+  margin-bottom: 0;
+  list-style: none;
+}
+.nav > li {
+  position: relative;
+  display: block;
+}
+.nav > li > a {
+  position: relative;
+  display: block;
+  padding: 10px 15px;
+}
+.nav > li > a:hover,
+.nav > li > a:focus {
+  text-decoration: none;
+  background-color: #eee;
+}
+.nav > li.disabled > a {
+  color: #777;
+}
+.nav > li.disabled > a:hover,
+.nav > li.disabled > a:focus {
+  color: #777;
+  text-decoration: none;
+  cursor: not-allowed;
+  background-color: transparent;
+}
+.nav .open > a,
+.nav .open > a:hover,
+.nav .open > a:focus {
+  background-color: #eee;
+  border-color: #337ab7;
+}
+.nav .nav-divider {
+  height: 1px;
+  margin: 9px 0;
+  overflow: hidden;
+  background-color: #e5e5e5;
+}
+.nav > li > a > img {
+  max-width: none;
+}
+.nav-tabs {
+  border-bottom: 1px solid #ddd;
+}
+.nav-tabs > li {
+  float: left;
+  margin-bottom: -1px;
+}
+.nav-tabs > li > a {
+  margin-right: 2px;
+  line-height: 1.42857143;
+  border: 1px solid transparent;
+  border-radius: 4px 4px 0 0;
+}
+.nav-tabs > li > a:hover {
+  border-color: #eee #eee #ddd;
+}
+.nav-tabs > li.active > a,
+.nav-tabs > li.active > a:hover,
+.nav-tabs > li.active > a:focus {
+  color: #555;
+  cursor: default;
+  background-color: #fff;
+  border: 1px solid #ddd;
+  border-bottom-color: transparent;
+}
+.nav-tabs.nav-justified {
+  width: 100%;
+  border-bottom: 0;
+}
+.nav-tabs.nav-justified > li {
+  float: none;
+}
+.nav-tabs.nav-justified > li > a {
+  margin-bottom: 5px;
+  text-align: center;
+}
+.nav-tabs.nav-justified > .dropdown .dropdown-menu {
+  top: auto;
+  left: auto;
+}
+@media (min-width: 768px) {
+  .nav-tabs.nav-justified > li {
+    display: table-cell;
+    width: 1%;
+  }
+  .nav-tabs.nav-justified > li > a {
+    margin-bottom: 0;
+  }
+}
+.nav-tabs.nav-justified > li > a {
+  margin-right: 0;
+  border-radius: 4px;
+}
+.nav-tabs.nav-justified > .active > a,
+.nav-tabs.nav-justified > .active > a:hover,
+.nav-tabs.nav-justified > .active > a:focus {
+  border: 1px solid #ddd;
+}
+@media (min-width: 768px) {
+  .nav-tabs.nav-justified > li > a {
+    border-bottom: 1px solid #ddd;
+    border-radius: 4px 4px 0 0;
+  }
+  .nav-tabs.nav-justified > .active > a,
+  .nav-tabs.nav-justified > .active > a:hover,
+  .nav-tabs.nav-justified > .active > a:focus {
+    border-bottom-color: #fff;
+  }
+}
+.nav-pills > li {
+  float: left;
+}
+.nav-pills > li > a {
+  border-radius: 4px;
+}
+.nav-pills > li + li {
+  margin-left: 2px;
+}
+.nav-pills > li.active > a,
+.nav-pills > li.active > a:hover,
+.nav-pills > li.active > a:focus {
+  color: #fff;
+  background-color: #337ab7;
+}
+.nav-stacked > li {
+  float: none;
+}
+.nav-stacked > li + li {
+  margin-top: 2px;
+  margin-left: 0;
+}
+.nav-justified {
+  width: 100%;
+}
+.nav-justified > li {
+  float: none;
+}
+.nav-justified > li > a {
+  margin-bottom: 5px;
+  text-align: center;
+}
+.nav-justified > .dropdown .dropdown-menu {
+  top: auto;
+  left: auto;
+}
+@media (min-width: 768px) {
+  .nav-justified > li {
+    display: table-cell;
+    width: 1%;
+  }
+  .nav-justified > li > a {
+    margin-bottom: 0;
+  }
+}
+.nav-tabs-justified {
+  border-bottom: 0;
+}
+.nav-tabs-justified > li > a {
+  margin-right: 0;
+  border-radius: 4px;
+}
+.nav-tabs-justified > .active > a,
+.nav-tabs-justified > .active > a:hover,
+.nav-tabs-justified > .active > a:focus {
+  border: 1px solid #ddd;
+}
+@media (min-width: 768px) {
+  .nav-tabs-justified > li > a {
+    border-bottom: 1px solid #ddd;
+    border-radius: 4px 4px 0 0;
+  }
+  .nav-tabs-justified > .active > a,
+  .nav-tabs-justified > .active > a:hover,
+  .nav-tabs-justified > .active > a:focus {
+    border-bottom-color: #fff;
+  }
+}
+.tab-content > .tab-pane {
+  display: none;
+}
+.tab-content > .active {
+  display: block;
+}
+.nav-tabs .dropdown-menu {
+  margin-top: -1px;
+  border-top-left-radius: 0;
+  border-top-right-radius: 0;
+}
+.navbar {
+  position: relative;
+  min-height: 50px;
+  margin-bottom: 20px;
+  border: 1px solid transparent;
+}
+@media (min-width: 768px) {
+  .navbar {
+    border-radius: 4px;
+  }
+}
+@media (min-width: 768px) {
+  .navbar-header {
+    float: left;
+  }
+}
+.navbar-collapse {
+  padding-right: 15px;
+  padding-left: 15px;
+  overflow-x: visible;
+  -webkit-overflow-scrolling: touch;
+  border-top: 1px solid transparent;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
+          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
+}
+.navbar-collapse.in {
+  overflow-y: auto;
+}
+@media (min-width: 768px) {
+  .navbar-collapse {
+    width: auto;
+    border-top: 0;
+    -webkit-box-shadow: none;
+            box-shadow: none;
+  }
+  .navbar-collapse.collapse {
+    display: block !important;
+    height: auto !important;
+    padding-bottom: 0;
+    overflow: visible !important;
+  }
+  .navbar-collapse.in {
+    overflow-y: visible;
+  }
+  .navbar-fixed-top .navbar-collapse,
+  .navbar-static-top .navbar-collapse,
+  .navbar-fixed-bottom .navbar-collapse {
+    padding-right: 0;
+    padding-left: 0;
+  }
+}
+.navbar-fixed-top .navbar-collapse,
+.navbar-fixed-bottom .navbar-collapse {
+  max-height: 340px;
+}
+@media (max-device-width: 480px) and (orientation: landscape) {
+  .navbar-fixed-top .navbar-collapse,
+  .navbar-fixed-bottom .navbar-collapse {
+    max-height: 200px;
+  }
+}
+.container > .navbar-header,
+.container-fluid > .navbar-header,
+.container > .navbar-collapse,
+.container-fluid > .navbar-collapse {
+  margin-right: -15px;
+  margin-left: -15px;
+}
+@media (min-width: 768px) {
+  .container > .navbar-header,
+  .container-fluid > .navbar-header,
+  .container > .navbar-collapse,
+  .container-fluid > .navbar-collapse {
+    margin-right: 0;
+    margin-left: 0;
+  }
+}
+.navbar-static-top {
+  z-index: 1000;
+  border-width: 0 0 1px;
+}
+@media (min-width: 768px) {
+  .navbar-static-top {
+    border-radius: 0;
+  }
+}
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+  position: fixed;
+  right: 0;
+  left: 0;
+  z-index: 1030;
+}
+@media (min-width: 768px) {
+  .navbar-fixed-top,
+  .navbar-fixed-bottom {
+    border-radius: 0;
+  }
+}
+.navbar-fixed-top {
+  top: 0;
+  border-width: 0 0 1px;
+}
+.navbar-fixed-bottom {
+  bottom: 0;
+  margin-bottom: 0;
+  border-width: 1px 0 0;
+}
+.navbar-brand {
+  float: left;
+  height: 50px;
+  padding: 15px 15px;
+  font-size: 18px;
+  line-height: 20px;
+}
+.navbar-brand:hover,
+.navbar-brand:focus {
+  text-decoration: none;
+}
+.navbar-brand > img {
+  display: block;
+}
+@media (min-width: 768px) {
+  .navbar > .container .navbar-brand,
+  .navbar > .container-fluid .navbar-brand {
+    margin-left: -15px;
+  }
+}
+.navbar-toggle {
+  position: relative;
+  float: right;
+  padding: 9px 10px;
+  margin-top: 8px;
+  margin-right: 15px;
+  margin-bottom: 8px;
+  background-color: transparent;
+  background-image: none;
+  border: 1px solid transparent;
+  border-radius: 4px;
+}
+.navbar-toggle:focus {
+  outline: 0;
+}
+.navbar-toggle .icon-bar {
+  display: block;
+  width: 22px;
+  height: 2px;
+  border-radius: 1px;
+}
+.navbar-toggle .icon-bar + .icon-bar {
+  margin-top: 4px;
+}
+@media (min-width: 768px) {
+  .navbar-toggle {
+    display: none;
+  }
+}
+.navbar-nav {
+  margin: 7.5px -15px;
+}
+.navbar-nav > li > a {
+  padding-top: 10px;
+  padding-bottom: 10px;
+  line-height: 20px;
+}
+@media (max-width: 767px) {
+  .navbar-nav .open .dropdown-menu {
+    position: static;
+    float: none;
+    width: auto;
+    margin-top: 0;
+    background-color: transparent;
+    border: 0;
+    -webkit-box-shadow: none;
+            box-shadow: none;
+  }
+  .navbar-nav .open .dropdown-menu > li > a,
+  .navbar-nav .open .dropdown-menu .dropdown-header {
+    padding: 5px 15px 5px 25px;
+  }
+  .navbar-nav .open .dropdown-menu > li > a {
+    line-height: 20px;
+  }
+  .navbar-nav .open .dropdown-menu > li > a:hover,
+  .navbar-nav .open .dropdown-menu > li > a:focus {
+    background-image: none;
+  }
+}
+@media (min-width: 768px) {
+  .navbar-nav {
+    float: left;
+    margin: 0;
+  }
+  .navbar-nav > li {
+    float: left;
+  }
+  .navbar-nav > li > a {
+    padding-top: 15px;
+    padding-bottom: 15px;
+  }
+}
+.navbar-form {
+  padding: 10px 15px;
+  margin-top: 8px;
+  margin-right: -15px;
+  margin-bottom: 8px;
+  margin-left: -15px;
+  border-top: 1px solid transparent;
+  border-bottom: 1px solid transparent;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
+          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
+}
+@media (min-width: 768px) {
+  .navbar-form .form-group {
+    display: inline-block;
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .navbar-form .form-control {
+    display: inline-block;
+    width: auto;
+    vertical-align: middle;
+  }
+  .navbar-form .form-control-static {
+    display: inline-block;
+  }
+  .navbar-form .input-group {
+    display: inline-table;
+    vertical-align: middle;
+  }
+  .navbar-form .input-group .input-group-addon,
+  .navbar-form .input-group .input-group-btn,
+  .navbar-form .input-group .form-control {
+    width: auto;
+  }
+  .navbar-form .input-group > .form-control {
+    width: 100%;
+  }
+  .navbar-form .control-label {
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .navbar-form .radio,
+  .navbar-form .checkbox {
+    display: inline-block;
+    margin-top: 0;
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .navbar-form .radio label,
+  .navbar-form .checkbox label {
+    padding-left: 0;
+  }
+  .navbar-form .radio input[type="radio"],
+  .navbar-form .checkbox input[type="checkbox"] {
+    position: relative;
+    margin-left: 0;
+  }
+  .navbar-form .has-feedback .form-control-feedback {
+    top: 0;
+  }
+}
+@media (max-width: 767px) {
+  .navbar-form .form-group {
+    margin-bottom: 5px;
+  }
+  .navbar-form .form-group:last-child {
+    margin-bottom: 0;
+  }
+}
+@media (min-width: 768px) {
+  .navbar-form {
+    width: auto;
+    padding-top: 0;
+    padding-bottom: 0;
+    margin-right: 0;
+    margin-left: 0;
+    border: 0;
+    -webkit-box-shadow: none;
+            box-shadow: none;
+  }
+}
+.navbar-nav > li > .dropdown-menu {
+  margin-top: 0;
+  border-top-left-radius: 0;
+  border-top-right-radius: 0;
+}
+.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
+  margin-bottom: 0;
+  border-top-left-radius: 4px;
+  border-top-right-radius: 4px;
+  border-bottom-right-radius: 0;
+  border-bottom-left-radius: 0;
+}
+.navbar-btn {
+  margin-top: 8px;
+  margin-bottom: 8px;
+}
+.navbar-btn.btn-sm {
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+.navbar-btn.btn-xs {
+  margin-top: 14px;
+  margin-bottom: 14px;
+}
+.navbar-text {
+  margin-top: 15px;
+  margin-bottom: 15px;
+}
+@media (min-width: 768px) {
+  .navbar-text {
+    float: left;
+    margin-right: 15px;
+    margin-left: 15px;
+  }
+}
+@media (min-width: 768px) {
+  .navbar-left {
+    float: left !important;
+  }
+  .navbar-right {
+    float: right !important;
+    margin-right: -15px;
+  }
+  .navbar-right ~ .navbar-right {
+    margin-right: 0;
+  }
+}
+.navbar-default {
+  background-color: #f8f8f8;
+  border-color: #e7e7e7;
+}
+.navbar-default .navbar-brand {
+  color: #777;
+}
+.navbar-default .navbar-brand:hover,
+.navbar-default .navbar-brand:focus {
+  color: #5e5e5e;
+  background-color: transparent;
+}
+.navbar-default .navbar-text {
+  color: #777;
+}
+.navbar-default .navbar-nav > li > a {
+  color: #777;
+}
+.navbar-default .navbar-nav > li > a:hover,
+.navbar-default .navbar-nav > li > a:focus {
+  color: #333;
+  background-color: transparent;
+}
+.navbar-default .navbar-nav > .active > a,
+.navbar-default .navbar-nav > .active > a:hover,
+.navbar-default .navbar-nav > .active > a:focus {
+  color: #555;
+  background-color: #e7e7e7;
+}
+.navbar-default .navbar-nav > .disabled > a,
+.navbar-default .navbar-nav > .disabled > a:hover,
+.navbar-default .navbar-nav > .disabled > a:focus {
+  color: #ccc;
+  background-color: transparent;
+}
+.navbar-default .navbar-toggle {
+  border-color: #ddd;
+}
+.navbar-default .navbar-toggle:hover,
+.navbar-default .navbar-toggle:focus {
+  background-color: #ddd;
+}
+.navbar-default .navbar-toggle .icon-bar {
+  background-color: #888;
+}
+.navbar-default .navbar-collapse,
+.navbar-default .navbar-form {
+  border-color: #e7e7e7;
+}
+.navbar-default .navbar-nav > .open > a,
+.navbar-default .navbar-nav > .open > a:hover,
+.navbar-default .navbar-nav > .open > a:focus {
+  color: #555;
+  background-color: #e7e7e7;
+}
+@media (max-width: 767px) {
+  .navbar-default .navbar-nav .open .dropdown-menu > li > a {
+    color: #777;
+  }
+  .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
+  .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
+    color: #333;
+    background-color: transparent;
+  }
+  .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
+  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
+  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
+    color: #555;
+    background-color: #e7e7e7;
+  }
+  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
+  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+    color: #ccc;
+    background-color: transparent;
+  }
+}
+.navbar-default .navbar-link {
+  color: #777;
+}
+.navbar-default .navbar-link:hover {
+  color: #333;
+}
+.navbar-default .btn-link {
+  color: #777;
+}
+.navbar-default .btn-link:hover,
+.navbar-default .btn-link:focus {
+  color: #333;
+}
+.navbar-default .btn-link[disabled]:hover,
+fieldset[disabled] .navbar-default .btn-link:hover,
+.navbar-default .btn-link[disabled]:focus,
+fieldset[disabled] .navbar-default .btn-link:focus {
+  color: #ccc;
+}
+.navbar-inverse {
+  background-color: #222;
+  border-color: #080808;
+}
+.navbar-inverse .navbar-brand {
+  color: #9d9d9d;
+}
+.navbar-inverse .navbar-brand:hover,
+.navbar-inverse .navbar-brand:focus {
+  color: #fff;
+  background-color: transparent;
+}
+.navbar-inverse .navbar-text {
+  color: #9d9d9d;
+}
+.navbar-inverse .navbar-nav > li > a {
+  color: #9d9d9d;
+}
+.navbar-inverse .navbar-nav > li > a:hover,
+.navbar-inverse .navbar-nav > li > a:focus {
+  color: #fff;
+  background-color: transparent;
+}
+.navbar-inverse .navbar-nav > .active > a,
+.navbar-inverse .navbar-nav > .active > a:hover,
+.navbar-inverse .navbar-nav > .active > a:focus {
+  color: #fff;
+  background-color: #080808;
+}
+.navbar-inverse .navbar-nav > .disabled > a,
+.navbar-inverse .navbar-nav > .disabled > a:hover,
+.navbar-inverse .navbar-nav > .disabled > a:focus {
+  color: #444;
+  background-color: transparent;
+}
+.navbar-inverse .navbar-toggle {
+  border-color: #333;
+}
+.navbar-inverse .navbar-toggle:hover,
+.navbar-inverse .navbar-toggle:focus {
+  background-color: #333;
+}
+.navbar-inverse .navbar-toggle .icon-bar {
+  background-color: #fff;
+}
+.navbar-inverse .navbar-collapse,
+.navbar-inverse .navbar-form {
+  border-color: #101010;
+}
+.navbar-inverse .navbar-nav > .open > a,
+.navbar-inverse .navbar-nav > .open > a:hover,
+.navbar-inverse .navbar-nav > .open > a:focus {
+  color: #fff;
+  background-color: #080808;
+}
+@media (max-width: 767px) {
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
+    border-color: #080808;
+  }
+  .navbar-inverse .navbar-nav .open .dropdown-menu .divider {
+    background-color: #080808;
+  }
+  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
+    color: #9d9d9d;
+  }
+  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
+  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
+    color: #fff;
+    background-color: transparent;
+  }
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
+    color: #fff;
+    background-color: #080808;
+  }
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+    color: #444;
+    background-color: transparent;
+  }
+}
+.navbar-inverse .navbar-link {
+  color: #9d9d9d;
+}
+.navbar-inverse .navbar-link:hover {
+  color: #fff;
+}
+.navbar-inverse .btn-link {
+  color: #9d9d9d;
+}
+.navbar-inverse .btn-link:hover,
+.navbar-inverse .btn-link:focus {
+  color: #fff;
+}
+.navbar-inverse .btn-link[disabled]:hover,
+fieldset[disabled] .navbar-inverse .btn-link:hover,
+.navbar-inverse .btn-link[disabled]:focus,
+fieldset[disabled] .navbar-inverse .btn-link:focus {
+  color: #444;
+}
+.breadcrumb {
+  padding: 8px 15px;
+  margin-bottom: 20px;
+  list-style: none;
+  background-color: #f5f5f5;
+  border-radius: 4px;
+}
+.breadcrumb > li {
+  display: inline-block;
+}
+.breadcrumb > li + li:before {
+  padding: 0 5px;
+  color: #ccc;
+  content: "/\00a0";
+}
+.breadcrumb > .active {
+  color: #777;
+}
+.pagination {
+  display: inline-block;
+  padding-left: 0;
+  margin: 20px 0;
+  border-radius: 4px;
+}
+.pagination > li {
+  display: inline;
+}
+.pagination > li > a,
+.pagination > li > span {
+  position: relative;
+  float: left;
+  padding: 6px 12px;
+  margin-left: -1px;
+  line-height: 1.42857143;
+  color: #337ab7;
+  text-decoration: none;
+  background-color: #fff;
+  border: 1px solid #ddd;
+}
+.pagination > li:first-child > a,
+.pagination > li:first-child > span {
+  margin-left: 0;
+  border-top-left-radius: 4px;
+  border-bottom-left-radius: 4px;
+}
+.pagination > li:last-child > a,
+.pagination > li:last-child > span {
+  border-top-right-radius: 4px;
+  border-bottom-right-radius: 4px;
+}
+.pagination > li > a:hover,
+.pagination > li > span:hover,
+.pagination > li > a:focus,
+.pagination > li > span:focus {
+  z-index: 2;
+  color: #23527c;
+  background-color: #eee;
+  border-color: #ddd;
+}
+.pagination > .active > a,
+.pagination > .active > span,
+.pagination > .active > a:hover,
+.pagination > .active > span:hover,
+.pagination > .active > a:focus,
+.pagination > .active > span:focus {
+  z-index: 3;
+  color: #fff;
+  cursor: default;
+  background-color: #337ab7;
+  border-color: #337ab7;
+}
+.pagination > .disabled > span,
+.pagination > .disabled > span:hover,
+.pagination > .disabled > span:focus,
+.pagination > .disabled > a,
+.pagination > .disabled > a:hover,
+.pagination > .disabled > a:focus {
+  color: #777;
+  cursor: not-allowed;
+  background-color: #fff;
+  border-color: #ddd;
+}
+.pagination-lg > li > a,
+.pagination-lg > li > span {
+  padding: 10px 16px;
+  font-size: 18px;
+  line-height: 1.3333333;
+}
+.pagination-lg > li:first-child > a,
+.pagination-lg > li:first-child > span {
+  border-top-left-radius: 6px;
+  border-bottom-left-radius: 6px;
+}
+.pagination-lg > li:last-child > a,
+.pagination-lg > li:last-child > span {
+  border-top-right-radius: 6px;
+  border-bottom-right-radius: 6px;
+}
+.pagination-sm > li > a,
+.pagination-sm > li > span {
+  padding: 5px 10px;
+  font-size: 12px;
+  line-height: 1.5;
+}
+.pagination-sm > li:first-child > a,
+.pagination-sm > li:first-child > span {
+  border-top-left-radius: 3px;
+  border-bottom-left-radius: 3px;
+}
+.pagination-sm > li:last-child > a,
+.pagination-sm > li:last-child > span {
+  border-top-right-radius: 3px;
+  border-bottom-right-radius: 3px;
+}
+.pager {
+  padding-left: 0;
+  margin: 20px 0;
+  text-align: center;
+  list-style: none;
+}
+.pager li {
+  display: inline;
+}
+.pager li > a,
+.pager li > span {
+  display: inline-block;
+  padding: 5px 14px;
+  background-color: #fff;
+  border: 1px solid #ddd;
+  border-radius: 15px;
+}
+.pager li > a:hover,
+.pager li > a:focus {
+  text-decoration: none;
+  background-color: #eee;
+}
+.pager .next > a,
+.pager .next > span {
+  float: right;
+}
+.pager .previous > a,
+.pager .previous > span {
+  float: left;
+}
+.pager .disabled > a,
+.pager .disabled > a:hover,
+.pager .disabled > a:focus,
+.pager .disabled > span {
+  color: #777;
+  cursor: not-allowed;
+  background-color: #fff;
+}
+.label {
+  display: inline;
+  padding: .2em .6em .3em;
+  font-size: 75%;
+  font-weight: bold;
+  line-height: 1;
+  color: #fff;
+  text-align: center;
+  white-space: nowrap;
+  vertical-align: baseline;
+  border-radius: .25em;
+}
+a.label:hover,
+a.label:focus {
+  color: #fff;
+  text-decoration: none;
+  cursor: pointer;
+}
+.label:empty {
+  display: none;
+}
+.btn .label {
+  position: relative;
+  top: -1px;
+}
+.label-default {
+  background-color: #777;
+}
+.label-default[href]:hover,
+.label-default[href]:focus {
+  background-color: #5e5e5e;
+}
+.label-primary {
+  background-color: #337ab7;
+}
+.label-primary[href]:hover,
+.label-primary[href]:focus {
+  background-color: #286090;
+}
+.label-success {
+  background-color: #5cb85c;
+}
+.label-success[href]:hover,
+.label-success[href]:focus {
+  background-color: #449d44;
+}
+.label-info {
+  background-color: #5bc0de;
+}
+.label-info[href]:hover,
+.label-info[href]:focus {
+  background-color: #31b0d5;
+}
+.label-warning {
+  background-color: #f0ad4e;
+}
+.label-warning[href]:hover,
+.label-warning[href]:focus {
+  background-color: #ec971f;
+}
+.label-danger {
+  background-color: #d9534f;
+}
+.label-danger[href]:hover,
+.label-danger[href]:focus {
+  background-color: #c9302c;
+}
+.badge {
+  display: inline-block;
+  min-width: 10px;
+  padding: 3px 7px;
+  font-size: 12px;
+  font-weight: bold;
+  line-height: 1;
+  color: #fff;
+  text-align: center;
+  white-space: nowrap;
+  vertical-align: middle;
+  background-color: #777;
+  border-radius: 10px;
+}
+.badge:empty {
+  display: none;
+}
+.btn .badge {
+  position: relative;
+  top: -1px;
+}
+.btn-xs .badge,
+.btn-group-xs > .btn .badge {
+  top: 0;
+  padding: 1px 5px;
+}
+a.badge:hover,
+a.badge:focus {
+  color: #fff;
+  text-decoration: none;
+  cursor: pointer;
+}
+.list-group-item.active > .badge,
+.nav-pills > .active > a > .badge {
+  color: #337ab7;
+  background-color: #fff;
+}
+.list-group-item > .badge {
+  float: right;
+}
+.list-group-item > .badge + .badge {
+  margin-right: 5px;
+}
+.nav-pills > li > a > .badge {
+  margin-left: 3px;
+}
+.jumbotron {
+  padding-top: 30px;
+  padding-bottom: 30px;
+  margin-bottom: 30px;
+  color: inherit;
+  background-color: #eee;
+}
+.jumbotron h1,
+.jumbotron .h1 {
+  color: inherit;
+}
+.jumbotron p {
+  margin-bottom: 15px;
+  font-size: 21px;
+  font-weight: 200;
+}
+.jumbotron > hr {
+  border-top-color: #d5d5d5;
+}
+.container .jumbotron,
+.container-fluid .jumbotron {
+  padding-right: 15px;
+  padding-left: 15px;
+  border-radius: 6px;
+}
+.jumbotron .container {
+  max-width: 100%;
+}
+@media screen and (min-width: 768px) {
+  .jumbotron {
+    padding-top: 48px;
+    padding-bottom: 48px;
+  }
+  .container .jumbotron,
+  .container-fluid .jumbotron {
+    padding-right: 60px;
+    padding-left: 60px;
+  }
+  .jumbotron h1,
+  .jumbotron .h1 {
+    font-size: 63px;
+  }
+}
+.thumbnail {
+  display: block;
+  padding: 4px;
+  margin-bottom: 20px;
+  line-height: 1.42857143;
+  background-color: #fff;
+  border: 1px solid #ddd;
+  border-radius: 4px;
+  -webkit-transition: border .2s ease-in-out;
+       -o-transition: border .2s ease-in-out;
+          transition: border .2s ease-in-out;
+}
+.thumbnail > img,
+.thumbnail a > img {
+  margin-right: auto;
+  margin-left: auto;
+}
+a.thumbnail:hover,
+a.thumbnail:focus,
+a.thumbnail.active {
+  border-color: #337ab7;
+}
+.thumbnail .caption {
+  padding: 9px;
+  color: #333;
+}
+.alert {
+  padding: 15px;
+  margin-bottom: 20px;
+  border: 1px solid transparent;
+  border-radius: 4px;
+}
+.alert h4 {
+  margin-top: 0;
+  color: inherit;
+}
+.alert .alert-link {
+  font-weight: bold;
+}
+.alert > p,
+.alert > ul {
+  margin-bottom: 0;
+}
+.alert > p + p {
+  margin-top: 5px;
+}
+.alert-dismissable,
+.alert-dismissible {
+  padding-right: 35px;
+}
+.alert-dismissable .close,
+.alert-dismissible .close {
+  position: relative;
+  top: -2px;
+  right: -21px;
+  color: inherit;
+}
+.alert-success {
+  color: #3c763d;
+  background-color: #dff0d8;
+  border-color: #d6e9c6;
+}
+.alert-success hr {
+  border-top-color: #c9e2b3;
+}
+.alert-success .alert-link {
+  color: #2b542c;
+}
+.alert-info {
+  color: #31708f;
+  background-color: #d9edf7;
+  border-color: #bce8f1;
+}
+.alert-info hr {
+  border-top-color: #a6e1ec;
+}
+.alert-info .alert-link {
+  color: #245269;
+}
+.alert-warning {
+  color: #8a6d3b;
+  background-color: #fcf8e3;
+  border-color: #faebcc;
+}
+.alert-warning hr {
+  border-top-color: #f7e1b5;
+}
+.alert-warning .alert-link {
+  color: #66512c;
+}
+.alert-danger {
+  color: #a94442;
+  background-color: #f2dede;
+  border-color: #ebccd1;
+}
+.alert-danger hr {
+  border-top-color: #e4b9c0;
+}
+.alert-danger .alert-link {
+  color: #843534;
+}
+@-webkit-keyframes progress-bar-stripes {
+  from {
+    background-position: 40px 0;
+  }
+  to {
+    background-position: 0 0;
+  }
+}
+@-o-keyframes progress-bar-stripes {
+  from {
+    background-position: 40px 0;
+  }
+  to {
+    background-position: 0 0;
+  }
+}
+@keyframes progress-bar-stripes {
+  from {
+    background-position: 40px 0;
+  }
+  to {
+    background-position: 0 0;
+  }
+}
+.progress {
+  height: 20px;
+  margin-bottom: 20px;
+  overflow: hidden;
+  background-color: #f5f5f5;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
+          box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
+}
+.progress-bar {
+  float: left;
+  width: 0;
+  height: 100%;
+  font-size: 12px;
+  line-height: 20px;
+  color: #fff;
+  text-align: center;
+  background-color: #337ab7;
+  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
+          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
+  -webkit-transition: width .6s ease;
+       -o-transition: width .6s ease;
+          transition: width .6s ease;
+}
+.progress-striped .progress-bar,
+.progress-bar-striped {
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+  -webkit-background-size: 40px 40px;
+          background-size: 40px 40px;
+}
+.progress.active .progress-bar,
+.progress-bar.active {
+  -webkit-animation: progress-bar-stripes 2s linear infinite;
+       -o-animation: progress-bar-stripes 2s linear infinite;
+          animation: progress-bar-stripes 2s linear infinite;
+}
+.progress-bar-success {
+  background-color: #5cb85c;
+}
+.progress-striped .progress-bar-success {
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+}
+.progress-bar-info {
+  background-color: #5bc0de;
+}
+.progress-striped .progress-bar-info {
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+}
+.progress-bar-warning {
+  background-color: #f0ad4e;
+}
+.progress-striped .progress-bar-warning {
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+}
+.progress-bar-danger {
+  background-color: #d9534f;
+}
+.progress-striped .progress-bar-danger {
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+}
+.media {
+  margin-top: 15px;
+}
+.media:first-child {
+  margin-top: 0;
+}
+.media,
+.media-body {
+  overflow: hidden;
+  zoom: 1;
+}
+.media-body {
+  width: 10000px;
+}
+.media-object {
+  display: block;
+}
+.media-object.img-thumbnail {
+  max-width: none;
+}
+.media-right,
+.media > .pull-right {
+  padding-left: 10px;
+}
+.media-left,
+.media > .pull-left {
+  padding-right: 10px;
+}
+.media-left,
+.media-right,
+.media-body {
+  display: table-cell;
+  vertical-align: top;
+}
+.media-middle {
+  vertical-align: middle;
+}
+.media-bottom {
+  vertical-align: bottom;
+}
+.media-heading {
+  margin-top: 0;
+  margin-bottom: 5px;
+}
+.media-list {
+  padding-left: 0;
+  list-style: none;
+}
+.list-group {
+  padding-left: 0;
+  margin-bottom: 20px;
+}
+.list-group-item {
+  position: relative;
+  display: block;
+  padding: 10px 15px;
+  margin-bottom: -1px;
+  background-color: #fff;
+  border: 1px solid #ddd;
+}
+.list-group-item:first-child {
+  border-top-left-radius: 4px;
+  border-top-right-radius: 4px;
+}
+.list-group-item:last-child {
+  margin-bottom: 0;
+  border-bottom-right-radius: 4px;
+  border-bottom-left-radius: 4px;
+}
+a.list-group-item,
+button.list-group-item {
+  color: #555;
+}
+a.list-group-item .list-group-item-heading,
+button.list-group-item .list-group-item-heading {
+  color: #333;
+}
+a.list-group-item:hover,
+button.list-group-item:hover,
+a.list-group-item:focus,
+button.list-group-item:focus {
+  color: #555;
+  text-decoration: none;
+  background-color: #f5f5f5;
+}
+button.list-group-item {
+  width: 100%;
+  text-align: left;
+}
+.list-group-item.disabled,
+.list-group-item.disabled:hover,
+.list-group-item.disabled:focus {
+  color: #777;
+  cursor: not-allowed;
+  background-color: #eee;
+}
+.list-group-item.disabled .list-group-item-heading,
+.list-group-item.disabled:hover .list-group-item-heading,
+.list-group-item.disabled:focus .list-group-item-heading {
+  color: inherit;
+}
+.list-group-item.disabled .list-group-item-text,
+.list-group-item.disabled:hover .list-group-item-text,
+.list-group-item.disabled:focus .list-group-item-text {
+  color: #777;
+}
+.list-group-item.active,
+.list-group-item.active:hover,
+.list-group-item.active:focus {
+  z-index: 2;
+  color: #fff;
+  background-color: #337ab7;
+  border-color: #337ab7;
+}
+.list-group-item.active .list-group-item-heading,
+.list-group-item.active:hover .list-group-item-heading,
+.list-group-item.active:focus .list-group-item-heading,
+.list-group-item.active .list-group-item-heading > small,
+.list-group-item.active:hover .list-group-item-heading > small,
+.list-group-item.active:focus .list-group-item-heading > small,
+.list-group-item.active .list-group-item-heading > .small,
+.list-group-item.active:hover .list-group-item-heading > .small,
+.list-group-item.active:focus .list-group-item-heading > .small {
+  color: inherit;
+}
+.list-group-item.active .list-group-item-text,
+.list-group-item.active:hover .list-group-item-text,
+.list-group-item.active:focus .list-group-item-text {
+  color: #c7ddef;
+}
+.list-group-item-success {
+  color: #3c763d;
+  background-color: #dff0d8;
+}
+a.list-group-item-success,
+button.list-group-item-success {
+  color: #3c763d;
+}
+a.list-group-item-success .list-group-item-heading,
+button.list-group-item-success .list-group-item-heading {
+  color: inherit;
+}
+a.list-group-item-success:hover,
+button.list-group-item-success:hover,
+a.list-group-item-success:focus,
+button.list-group-item-success:focus {
+  color: #3c763d;
+  background-color: #d0e9c6;
+}
+a.list-group-item-success.active,
+button.list-group-item-success.active,
+a.list-group-item-success.active:hover,
+button.list-group-item-success.active:hover,
+a.list-group-item-success.active:focus,
+button.list-group-item-success.active:focus {
+  color: #fff;
+  background-color: #3c763d;
+  border-color: #3c763d;
+}
+.list-group-item-info {
+  color: #31708f;
+  background-color: #d9edf7;
+}
+a.list-group-item-info,
+button.list-group-item-info {
+  color: #31708f;
+}
+a.list-group-item-info .list-group-item-heading,
+button.list-group-item-info .list-group-item-heading {
+  color: inherit;
+}
+a.list-group-item-info:hover,
+button.list-group-item-info:hover,
+a.list-group-item-info:focus,
+button.list-group-item-info:focus {
+  color: #31708f;
+  background-color: #c4e3f3;
+}
+a.list-group-item-info.active,
+button.list-group-item-info.active,
+a.list-group-item-info.active:hover,
+button.list-group-item-info.active:hover,
+a.list-group-item-info.active:focus,
+button.list-group-item-info.active:focus {
+  color: #fff;
+  background-color: #31708f;
+  border-color: #31708f;
+}
+.list-group-item-warning {
+  color: #8a6d3b;
+  background-color: #fcf8e3;
+}
+a.list-group-item-warning,
+button.list-group-item-warning {
+  color: #8a6d3b;
+}
+a.list-group-item-warning .list-group-item-heading,
+button.list-group-item-warning .list-group-item-heading {
+  color: inherit;
+}
+a.list-group-item-warning:hover,
+button.list-group-item-warning:hover,
+a.list-group-item-warning:focus,
+button.list-group-item-warning:focus {
+  color: #8a6d3b;
+  background-color: #faf2cc;
+}
+a.list-group-item-warning.active,
+button.list-group-item-warning.active,
+a.list-group-item-warning.active:hover,
+button.list-group-item-warning.active:hover,
+a.list-group-item-warning.active:focus,
+button.list-group-item-warning.active:focus {
+  color: #fff;
+  background-color: #8a6d3b;
+  border-color: #8a6d3b;
+}
+.list-group-item-danger {
+  color: #a94442;
+  background-color: #f2dede;
+}
+a.list-group-item-danger,
+button.list-group-item-danger {
+  color: #a94442;
+}
+a.list-group-item-danger .list-group-item-heading,
+button.list-group-item-danger .list-group-item-heading {
+  color: inherit;
+}
+a.list-group-item-danger:hover,
+button.list-group-item-danger:hover,
+a.list-group-item-danger:focus,
+button.list-group-item-danger:focus {
+  color: #a94442;
+  background-color: #ebcccc;
+}
+a.list-group-item-danger.active,
+button.list-group-item-danger.active,
+a.list-group-item-danger.active:hover,
+button.list-group-item-danger.active:hover,
+a.list-group-item-danger.active:focus,
+button.list-group-item-danger.active:focus {
+  color: #fff;
+  background-color: #a94442;
+  border-color: #a94442;
+}
+.list-group-item-heading {
+  margin-top: 0;
+  margin-bottom: 5px;
+}
+.list-group-item-text {
+  margin-bottom: 0;
+  line-height: 1.3;
+}
+.panel {
+  margin-bottom: 20px;
+  background-color: #fff;
+  border: 1px solid transparent;
+  border-radius: 4px;
+  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
+          box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
+}
+.panel-body {
+  padding: 15px;
+}
+.panel-heading {
+  padding: 10px 15px;
+  border-bottom: 1px solid transparent;
+  border-top-left-radius: 3px;
+  border-top-right-radius: 3px;
+}
+.panel-heading > .dropdown .dropdown-toggle {
+  color: inherit;
+}
+.panel-title {
+  margin-top: 0;
+  margin-bottom: 0;
+  font-size: 16px;
+  color: inherit;
+}
+.panel-title > a,
+.panel-title > small,
+.panel-title > .small,
+.panel-title > small > a,
+.panel-title > .small > a {
+  color: inherit;
+}
+.panel-footer {
+  padding: 10px 15px;
+  background-color: #f5f5f5;
+  border-top: 1px solid #ddd;
+  border-bottom-right-radius: 3px;
+  border-bottom-left-radius: 3px;
+}
+.panel > .list-group,
+.panel > .panel-collapse > .list-group {
+  margin-bottom: 0;
+}
+.panel > .list-group .list-group-item,
+.panel > .panel-collapse > .list-group .list-group-item {
+  border-width: 1px 0;
+  border-radius: 0;
+}
+.panel > .list-group:first-child .list-group-item:first-child,
+.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {
+  border-top: 0;
+  border-top-left-radius: 3px;
+  border-top-right-radius: 3px;
+}
+.panel > .list-group:last-child .list-group-item:last-child,
+.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {
+  border-bottom: 0;
+  border-bottom-right-radius: 3px;
+  border-bottom-left-radius: 3px;
+}
+.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {
+  border-top-left-radius: 0;
+  border-top-right-radius: 0;
+}
+.panel-heading + .list-group .list-group-item:first-child {
+  border-top-width: 0;
+}
+.list-group + .panel-footer {
+  border-top-width: 0;
+}
+.panel > .table,
+.panel > .table-responsive > .table,
+.panel > .panel-collapse > .table {
+  margin-bottom: 0;
+}
+.panel > .table caption,
+.panel > .table-responsive > .table caption,
+.panel > .panel-collapse > .table caption {
+  padding-right: 15px;
+  padding-left: 15px;
+}
+.panel > .table:first-child,
+.panel > .table-responsive:first-child > .table:first-child {
+  border-top-left-radius: 3px;
+  border-top-right-radius: 3px;
+}
+.panel > .table:first-child > thead:first-child > tr:first-child,
+.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,
+.panel > .table:first-child > tbody:first-child > tr:first-child,
+.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {
+  border-top-left-radius: 3px;
+  border-top-right-radius: 3px;
+}
+.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,
+.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,
+.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,
+.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,
+.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,
+.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,
+.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,
+.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {
+  border-top-left-radius: 3px;
+}
+.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,
+.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,
+.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,
+.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,
+.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,
+.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,
+.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,
+.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {
+  border-top-right-radius: 3px;
+}
+.panel > .table:last-child,
+.panel > .table-responsive:last-child > .table:last-child {
+  border-bottom-right-radius: 3px;
+  border-bottom-left-radius: 3px;
+}
+.panel > .table:last-child > tbody:last-child > tr:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,
+.panel > .table:last-child > tfoot:last-child > tr:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {
+  border-bottom-right-radius: 3px;
+  border-bottom-left-radius: 3px;
+}
+.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,
+.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,
+.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
+.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
+.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,
+.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,
+.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,
+.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {
+  border-bottom-left-radius: 3px;
+}
+.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,
+.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
+.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,
+.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {
+  border-bottom-right-radius: 3px;
+}
+.panel > .panel-body + .table,
+.panel > .panel-body + .table-responsive,
+.panel > .table + .panel-body,
+.panel > .table-responsive + .panel-body {
+  border-top: 1px solid #ddd;
+}
+.panel > .table > tbody:first-child > tr:first-child th,
+.panel > .table > tbody:first-child > tr:first-child td {
+  border-top: 0;
+}
+.panel > .table-bordered,
+.panel > .table-responsive > .table-bordered {
+  border: 0;
+}
+.panel > .table-bordered > thead > tr > th:first-child,
+.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,
+.panel > .table-bordered > tbody > tr > th:first-child,
+.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,
+.panel > .table-bordered > tfoot > tr > th:first-child,
+.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,
+.panel > .table-bordered > thead > tr > td:first-child,
+.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,
+.panel > .table-bordered > tbody > tr > td:first-child,
+.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,
+.panel > .table-bordered > tfoot > tr > td:first-child,
+.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {
+  border-left: 0;
+}
+.panel > .table-bordered > thead > tr > th:last-child,
+.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,
+.panel > .table-bordered > tbody > tr > th:last-child,
+.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,
+.panel > .table-bordered > tfoot > tr > th:last-child,
+.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,
+.panel > .table-bordered > thead > tr > td:last-child,
+.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,
+.panel > .table-bordered > tbody > tr > td:last-child,
+.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,
+.panel > .table-bordered > tfoot > tr > td:last-child,
+.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {
+  border-right: 0;
+}
+.panel > .table-bordered > thead > tr:first-child > td,
+.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,
+.panel > .table-bordered > tbody > tr:first-child > td,
+.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,
+.panel > .table-bordered > thead > tr:first-child > th,
+.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,
+.panel > .table-bordered > tbody > tr:first-child > th,
+.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {
+  border-bottom: 0;
+}
+.panel > .table-bordered > tbody > tr:last-child > td,
+.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,
+.panel > .table-bordered > tfoot > tr:last-child > td,
+.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,
+.panel > .table-bordered > tbody > tr:last-child > th,
+.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,
+.panel > .table-bordered > tfoot > tr:last-child > th,
+.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {
+  border-bottom: 0;
+}
+.panel > .table-responsive {
+  margin-bottom: 0;
+  border: 0;
+}
+.panel-group {
+  margin-bottom: 20px;
+}
+.panel-group .panel {
+  margin-bottom: 0;
+  border-radius: 4px;
+}
+.panel-group .panel + .panel {
+  margin-top: 5px;
+}
+.panel-group .panel-heading {
+  border-bottom: 0;
+}
+.panel-group .panel-heading + .panel-collapse > .panel-body,
+.panel-group .panel-heading + .panel-collapse > .list-group {
+  border-top: 1px solid #ddd;
+}
+.panel-group .panel-footer {
+  border-top: 0;
+}
+.panel-group .panel-footer + .panel-collapse .panel-body {
+  border-bottom: 1px solid #ddd;
+}
+.panel-default {
+  border-color: #ddd;
+}
+.panel-default > .panel-heading {
+  color: #333;
+  background-color: #f5f5f5;
+  border-color: #ddd;
+}
+.panel-default > .panel-heading + .panel-collapse > .panel-body {
+  border-top-color: #ddd;
+}
+.panel-default > .panel-heading .badge {
+  color: #f5f5f5;
+  background-color: #333;
+}
+.panel-default > .panel-footer + .panel-collapse > .panel-body {
+  border-bottom-color: #ddd;
+}
+.panel-primary {
+  border-color: #337ab7;
+}
+.panel-primary > .panel-heading {
+  color: #fff;
+  background-color: #337ab7;
+  border-color: #337ab7;
+}
+.panel-primary > .panel-heading + .panel-collapse > .panel-body {
+  border-top-color: #337ab7;
+}
+.panel-primary > .panel-heading .badge {
+  color: #337ab7;
+  background-color: #fff;
+}
+.panel-primary > .panel-footer + .panel-collapse > .panel-body {
+  border-bottom-color: #337ab7;
+}
+.panel-success {
+  border-color: #d6e9c6;
+}
+.panel-success > .panel-heading {
+  color: #3c763d;
+  background-color: #dff0d8;
+  border-color: #d6e9c6;
+}
+.panel-success > .panel-heading + .panel-collapse > .panel-body {
+  border-top-color: #d6e9c6;
+}
+.panel-success > .panel-heading .badge {
+  color: #dff0d8;
+  background-color: #3c763d;
+}
+.panel-success > .panel-footer + .panel-collapse > .panel-body {
+  border-bottom-color: #d6e9c6;
+}
+.panel-info {
+  border-color: #bce8f1;
+}
+.panel-info > .panel-heading {
+  color: #31708f;
+  background-color: #d9edf7;
+  border-color: #bce8f1;
+}
+.panel-info > .panel-heading + .panel-collapse > .panel-body {
+  border-top-color: #bce8f1;
+}
+.panel-info > .panel-heading .badge {
+  color: #d9edf7;
+  background-color: #31708f;
+}
+.panel-info > .panel-footer + .panel-collapse > .panel-body {
+  border-bottom-color: #bce8f1;
+}
+.panel-warning {
+  border-color: #faebcc;
+}
+.panel-warning > .panel-heading {
+  color: #8a6d3b;
+  background-color: #fcf8e3;
+  border-color: #faebcc;
+}
+.panel-warning > .panel-heading + .panel-collapse > .panel-body {
+  border-top-color: #faebcc;
+}
+.panel-warning > .panel-heading .badge {
+  color: #fcf8e3;
+  background-color: #8a6d3b;
+}
+.panel-warning > .panel-footer + .panel-collapse > .panel-body {
+  border-bottom-color: #faebcc;
+}
+.panel-danger {
+  border-color: #ebccd1;
+}
+.panel-danger > .panel-heading {
+  color: #a94442;
+  background-color: #f2dede;
+  border-color: #ebccd1;
+}
+.panel-danger > .panel-heading + .panel-collapse > .panel-body {
+  border-top-color: #ebccd1;
+}
+.panel-danger > .panel-heading .badge {
+  color: #f2dede;
+  background-color: #a94442;
+}
+.panel-danger > .panel-footer + .panel-collapse > .panel-body {
+  border-bottom-color: #ebccd1;
+}
+.embed-responsive {
+  position: relative;
+  display: block;
+  height: 0;
+  padding: 0;
+  overflow: hidden;
+}
+.embed-responsive .embed-responsive-item,
+.embed-responsive iframe,
+.embed-responsive embed,
+.embed-responsive object,
+.embed-responsive video {
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  border: 0;
+}
+.embed-responsive-16by9 {
+  padding-bottom: 56.25%;
+}
+.embed-responsive-4by3 {
+  padding-bottom: 75%;
+}
+.well {
+  min-height: 20px;
+  padding: 19px;
+  margin-bottom: 20px;
+  background-color: #f5f5f5;
+  border: 1px solid #e3e3e3;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
+}
+.well blockquote {
+  border-color: #ddd;
+  border-color: rgba(0, 0, 0, .15);
+}
+.well-lg {
+  padding: 24px;
+  border-radius: 6px;
+}
+.well-sm {
+  padding: 9px;
+  border-radius: 3px;
+}
+.close {
+  float: right;
+  font-size: 21px;
+  font-weight: bold;
+  line-height: 1;
+  color: #000;
+  text-shadow: 0 1px 0 #fff;
+  filter: alpha(opacity=20);
+  opacity: .2;
+}
+.close:hover,
+.close:focus {
+  color: #000;
+  text-decoration: none;
+  cursor: pointer;
+  filter: alpha(opacity=50);
+  opacity: .5;
+}
+button.close {
+  -webkit-appearance: none;
+  padding: 0;
+  cursor: pointer;
+  background: transparent;
+  border: 0;
+}
+.modal-open {
+  overflow: hidden;
+}
+.modal {
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  z-index: 1050;
+  display: none;
+  overflow: hidden;
+  -webkit-overflow-scrolling: touch;
+  outline: 0;
+}
+.modal.fade .modal-dialog {
+  -webkit-transition: -webkit-transform .3s ease-out;
+       -o-transition:      -o-transform .3s ease-out;
+          transition:         transform .3s ease-out;
+  -webkit-transform: translate(0, -25%);
+      -ms-transform: translate(0, -25%);
+       -o-transform: translate(0, -25%);
+          transform: translate(0, -25%);
+}
+.modal.in .modal-dialog {
+  -webkit-transform: translate(0, 0);
+      -ms-transform: translate(0, 0);
+       -o-transform: translate(0, 0);
+          transform: translate(0, 0);
+}
+.modal-open .modal {
+  overflow-x: hidden;
+  overflow-y: auto;
+}
+.modal-dialog {
+  position: relative;
+  width: auto;
+  margin: 10px;
+}
+.modal-content {
+  position: relative;
+  background-color: #fff;
+  -webkit-background-clip: padding-box;
+          background-clip: padding-box;
+  border: 1px solid #999;
+  border: 1px solid rgba(0, 0, 0, .2);
+  border-radius: 6px;
+  outline: 0;
+  -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
+          box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
+}
+.modal-backdrop {
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  z-index: 1040;
+  background-color: #000;
+}
+.modal-backdrop.fade {
+  filter: alpha(opacity=0);
+  opacity: 0;
+}
+.modal-backdrop.in {
+  filter: alpha(opacity=50);
+  opacity: .5;
+}
+.modal-header {
+  padding: 15px;
+  border-bottom: 1px solid #e5e5e5;
+}
+.modal-header .close {
+  margin-top: -2px;
+}
+.modal-title {
+  margin: 0;
+  line-height: 1.42857143;
+}
+.modal-body {
+  position: relative;
+  padding: 15px;
+}
+.modal-footer {
+  padding: 15px;
+  text-align: right;
+  border-top: 1px solid #e5e5e5;
+}
+.modal-footer .btn + .btn {
+  margin-bottom: 0;
+  margin-left: 5px;
+}
+.modal-footer .btn-group .btn + .btn {
+  margin-left: -1px;
+}
+.modal-footer .btn-block + .btn-block {
+  margin-left: 0;
+}
+.modal-scrollbar-measure {
+  position: absolute;
+  top: -9999px;
+  width: 50px;
+  height: 50px;
+  overflow: scroll;
+}
+@media (min-width: 768px) {
+  .modal-dialog {
+    width: 600px;
+    margin: 30px auto;
+  }
+  .modal-content {
+    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
+            box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
+  }
+  .modal-sm {
+    width: 300px;
+  }
+}
+@media (min-width: 992px) {
+  .modal-lg {
+    width: 900px;
+  }
+}
+.tooltip {
+  position: absolute;
+  z-index: 1070;
+  display: block;
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+  font-size: 12px;
+  font-style: normal;
+  font-weight: normal;
+  line-height: 1.42857143;
+  text-align: left;
+  text-align: start;
+  text-decoration: none;
+  text-shadow: none;
+  text-transform: none;
+  letter-spacing: normal;
+  word-break: normal;
+  word-spacing: normal;
+  word-wrap: normal;
+  white-space: normal;
+  filter: alpha(opacity=0);
+  opacity: 0;
+
+  line-break: auto;
+}
+.tooltip.in {
+  filter: alpha(opacity=90);
+  opacity: .9;
+}
+.tooltip.top {
+  padding: 5px 0;
+  margin-top: -3px;
+}
+.tooltip.right {
+  padding: 0 5px;
+  margin-left: 3px;
+}
+.tooltip.bottom {
+  padding: 5px 0;
+  margin-top: 3px;
+}
+.tooltip.left {
+  padding: 0 5px;
+  margin-left: -3px;
+}
+.tooltip-inner {
+  max-width: 200px;
+  padding: 3px 8px;
+  color: #fff;
+  text-align: center;
+  background-color: #000;
+  border-radius: 4px;
+}
+.tooltip-arrow {
+  position: absolute;
+  width: 0;
+  height: 0;
+  border-color: transparent;
+  border-style: solid;
+}
+.tooltip.top .tooltip-arrow {
+  bottom: 0;
+  left: 50%;
+  margin-left: -5px;
+  border-width: 5px 5px 0;
+  border-top-color: #000;
+}
+.tooltip.top-left .tooltip-arrow {
+  right: 5px;
+  bottom: 0;
+  margin-bottom: -5px;
+  border-width: 5px 5px 0;
+  border-top-color: #000;
+}
+.tooltip.top-right .tooltip-arrow {
+  bottom: 0;
+  left: 5px;
+  margin-bottom: -5px;
+  border-width: 5px 5px 0;
+  border-top-color: #000;
+}
+.tooltip.right .tooltip-arrow {
+  top: 50%;
+  left: 0;
+  margin-top: -5px;
+  border-width: 5px 5px 5px 0;
+  border-right-color: #000;
+}
+.tooltip.left .tooltip-arrow {
+  top: 50%;
+  right: 0;
+  margin-top: -5px;
+  border-width: 5px 0 5px 5px;
+  border-left-color: #000;
+}
+.tooltip.bottom .tooltip-arrow {
+  top: 0;
+  left: 50%;
+  margin-left: -5px;
+  border-width: 0 5px 5px;
+  border-bottom-color: #000;
+}
+.tooltip.bottom-left .tooltip-arrow {
+  top: 0;
+  right: 5px;
+  margin-top: -5px;
+  border-width: 0 5px 5px;
+  border-bottom-color: #000;
+}
+.tooltip.bottom-right .tooltip-arrow {
+  top: 0;
+  left: 5px;
+  margin-top: -5px;
+  border-width: 0 5px 5px;
+  border-bottom-color: #000;
+}
+.popover {
+  position: absolute;
+  top: 0;
+  left: 0;
+  z-index: 1060;
+  display: none;
+  max-width: 276px;
+  padding: 1px;
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+  font-size: 14px;
+  font-style: normal;
+  font-weight: normal;
+  line-height: 1.42857143;
+  text-align: left;
+  text-align: start;
+  text-decoration: none;
+  text-shadow: none;
+  text-transform: none;
+  letter-spacing: normal;
+  word-break: normal;
+  word-spacing: normal;
+  word-wrap: normal;
+  white-space: normal;
+  background-color: #fff;
+  -webkit-background-clip: padding-box;
+          background-clip: padding-box;
+  border: 1px solid #ccc;
+  border: 1px solid rgba(0, 0, 0, .2);
+  border-radius: 6px;
+  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
+          box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
+
+  line-break: auto;
+}
+.popover.top {
+  margin-top: -10px;
+}
+.popover.right {
+  margin-left: 10px;
+}
+.popover.bottom {
+  margin-top: 10px;
+}
+.popover.left {
+  margin-left: -10px;
+}
+.popover-title {
+  padding: 8px 14px;
+  margin: 0;
+  font-size: 14px;
+  background-color: #f7f7f7;
+  border-bottom: 1px solid #ebebeb;
+  border-radius: 5px 5px 0 0;
+}
+.popover-content {
+  padding: 9px 14px;
+}
+.popover > .arrow,
+.popover > .arrow:after {
+  position: absolute;
+  display: block;
+  width: 0;
+  height: 0;
+  border-color: transparent;
+  border-style: solid;
+}
+.popover > .arrow {
+  border-width: 11px;
+}
+.popover > .arrow:after {
+  content: "";
+  border-width: 10px;
+}
+.popover.top > .arrow {
+  bottom: -11px;
+  left: 50%;
+  margin-left: -11px;
+  border-top-color: #999;
+  border-top-color: rgba(0, 0, 0, .25);
+  border-bottom-width: 0;
+}
+.popover.top > .arrow:after {
+  bottom: 1px;
+  margin-left: -10px;
+  content: " ";
+  border-top-color: #fff;
+  border-bottom-width: 0;
+}
+.popover.right > .arrow {
+  top: 50%;
+  left: -11px;
+  margin-top: -11px;
+  border-right-color: #999;
+  border-right-color: rgba(0, 0, 0, .25);
+  border-left-width: 0;
+}
+.popover.right > .arrow:after {
+  bottom: -10px;
+  left: 1px;
+  content: " ";
+  border-right-color: #fff;
+  border-left-width: 0;
+}
+.popover.bottom > .arrow {
+  top: -11px;
+  left: 50%;
+  margin-left: -11px;
+  border-top-width: 0;
+  border-bottom-color: #999;
+  border-bottom-color: rgba(0, 0, 0, .25);
+}
+.popover.bottom > .arrow:after {
+  top: 1px;
+  margin-left: -10px;
+  content: " ";
+  border-top-width: 0;
+  border-bottom-color: #fff;
+}
+.popover.left > .arrow {
+  top: 50%;
+  right: -11px;
+  margin-top: -11px;
+  border-right-width: 0;
+  border-left-color: #999;
+  border-left-color: rgba(0, 0, 0, .25);
+}
+.popover.left > .arrow:after {
+  right: 1px;
+  bottom: -10px;
+  content: " ";
+  border-right-width: 0;
+  border-left-color: #fff;
+}
+.carousel {
+  position: relative;
+}
+.carousel-inner {
+  position: relative;
+  width: 100%;
+  overflow: hidden;
+}
+.carousel-inner > .item {
+  position: relative;
+  display: none;
+  -webkit-transition: .6s ease-in-out left;
+       -o-transition: .6s ease-in-out left;
+          transition: .6s ease-in-out left;
+}
+.carousel-inner > .item > img,
+.carousel-inner > .item > a > img {
+  line-height: 1;
+}
+@media all and (transform-3d), (-webkit-transform-3d) {
+  .carousel-inner > .item {
+    -webkit-transition: -webkit-transform .6s ease-in-out;
+         -o-transition:      -o-transform .6s ease-in-out;
+            transition:         transform .6s ease-in-out;
+
+    -webkit-backface-visibility: hidden;
+            backface-visibility: hidden;
+    -webkit-perspective: 1000px;
+            perspective: 1000px;
+  }
+  .carousel-inner > .item.next,
+  .carousel-inner > .item.active.right {
+    left: 0;
+    -webkit-transform: translate3d(100%, 0, 0);
+            transform: translate3d(100%, 0, 0);
+  }
+  .carousel-inner > .item.prev,
+  .carousel-inner > .item.active.left {
+    left: 0;
+    -webkit-transform: translate3d(-100%, 0, 0);
+            transform: translate3d(-100%, 0, 0);
+  }
+  .carousel-inner > .item.next.left,
+  .carousel-inner > .item.prev.right,
+  .carousel-inner > .item.active {
+    left: 0;
+    -webkit-transform: translate3d(0, 0, 0);
+            transform: translate3d(0, 0, 0);
+  }
+}
+.carousel-inner > .active,
+.carousel-inner > .next,
+.carousel-inner > .prev {
+  display: block;
+}
+.carousel-inner > .active {
+  left: 0;
+}
+.carousel-inner > .next,
+.carousel-inner > .prev {
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+.carousel-inner > .next {
+  left: 100%;
+}
+.carousel-inner > .prev {
+  left: -100%;
+}
+.carousel-inner > .next.left,
+.carousel-inner > .prev.right {
+  left: 0;
+}
+.carousel-inner > .active.left {
+  left: -100%;
+}
+.carousel-inner > .active.right {
+  left: 100%;
+}
+.carousel-control {
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  left: 0;
+  width: 15%;
+  font-size: 20px;
+  color: #fff;
+  text-align: center;
+  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
+  background-color: rgba(0, 0, 0, 0);
+  filter: alpha(opacity=50);
+  opacity: .5;
+}
+.carousel-control.left {
+  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
+  background-image:      -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
+  background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001)));
+  background-image:         linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
+  background-repeat: repeat-x;
+}
+.carousel-control.right {
+  right: 0;
+  left: auto;
+  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
+  background-image:      -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
+  background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5)));
+  background-image:         linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
+  background-repeat: repeat-x;
+}
+.carousel-control:hover,
+.carousel-control:focus {
+  color: #fff;
+  text-decoration: none;
+  filter: alpha(opacity=90);
+  outline: 0;
+  opacity: .9;
+}
+.carousel-control .icon-prev,
+.carousel-control .icon-next,
+.carousel-control .glyphicon-chevron-left,
+.carousel-control .glyphicon-chevron-right {
+  position: absolute;
+  top: 50%;
+  z-index: 5;
+  display: inline-block;
+  margin-top: -10px;
+}
+.carousel-control .icon-prev,
+.carousel-control .glyphicon-chevron-left {
+  left: 50%;
+  margin-left: -10px;
+}
+.carousel-control .icon-next,
+.carousel-control .glyphicon-chevron-right {
+  right: 50%;
+  margin-right: -10px;
+}
+.carousel-control .icon-prev,
+.carousel-control .icon-next {
+  width: 20px;
+  height: 20px;
+  font-family: serif;
+  line-height: 1;
+}
+.carousel-control .icon-prev:before {
+  content: '\2039';
+}
+.carousel-control .icon-next:before {
+  content: '\203a';
+}
+.carousel-indicators {
+  position: absolute;
+  bottom: 10px;
+  left: 50%;
+  z-index: 15;
+  width: 60%;
+  padding-left: 0;
+  margin-left: -30%;
+  text-align: center;
+  list-style: none;
+}
+.carousel-indicators li {
+  display: inline-block;
+  width: 10px;
+  height: 10px;
+  margin: 1px;
+  text-indent: -999px;
+  cursor: pointer;
+  background-color: #000 \9;
+  background-color: rgba(0, 0, 0, 0);
+  border: 1px solid #fff;
+  border-radius: 10px;
+}
+.carousel-indicators .active {
+  width: 12px;
+  height: 12px;
+  margin: 0;
+  background-color: #fff;
+}
+.carousel-caption {
+  position: absolute;
+  right: 15%;
+  bottom: 20px;
+  left: 15%;
+  z-index: 10;
+  padding-top: 20px;
+  padding-bottom: 20px;
+  color: #fff;
+  text-align: center;
+  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
+}
+.carousel-caption .btn {
+  text-shadow: none;
+}
+@media screen and (min-width: 768px) {
+  .carousel-control .glyphicon-chevron-left,
+  .carousel-control .glyphicon-chevron-right,
+  .carousel-control .icon-prev,
+  .carousel-control .icon-next {
+    width: 30px;
+    height: 30px;
+    margin-top: -10px;
+    font-size: 30px;
+  }
+  .carousel-control .glyphicon-chevron-left,
+  .carousel-control .icon-prev {
+    margin-left: -10px;
+  }
+  .carousel-control .glyphicon-chevron-right,
+  .carousel-control .icon-next {
+    margin-right: -10px;
+  }
+  .carousel-caption {
+    right: 20%;
+    left: 20%;
+    padding-bottom: 30px;
+  }
+  .carousel-indicators {
+    bottom: 20px;
+  }
+}
+.clearfix:before,
+.clearfix:after,
+.dl-horizontal dd:before,
+.dl-horizontal dd:after,
+.container:before,
+.container:after,
+.container-fluid:before,
+.container-fluid:after,
+.row:before,
+.row:after,
+.form-horizontal .form-group:before,
+.form-horizontal .form-group:after,
+.btn-toolbar:before,
+.btn-toolbar:after,
+.btn-group-vertical > .btn-group:before,
+.btn-group-vertical > .btn-group:after,
+.nav:before,
+.nav:after,
+.navbar:before,
+.navbar:after,
+.navbar-header:before,
+.navbar-header:after,
+.navbar-collapse:before,
+.navbar-collapse:after,
+.pager:before,
+.pager:after,
+.panel-body:before,
+.panel-body:after,
+.modal-header:before,
+.modal-header:after,
+.modal-footer:before,
+.modal-footer:after {
+  display: table;
+  content: " ";
+}
+.clearfix:after,
+.dl-horizontal dd:after,
+.container:after,
+.container-fluid:after,
+.row:after,
+.form-horizontal .form-group:after,
+.btn-toolbar:after,
+.btn-group-vertical > .btn-group:after,
+.nav:after,
+.navbar:after,
+.navbar-header:after,
+.navbar-collapse:after,
+.pager:after,
+.panel-body:after,
+.modal-header:after,
+.modal-footer:after {
+  clear: both;
+}
+.center-block {
+  display: block;
+  margin-right: auto;
+  margin-left: auto;
+}
+.pull-right {
+  float: right !important;
+}
+.pull-left {
+  float: left !important;
+}
+.hide {
+  display: none !important;
+}
+.show {
+  display: block !important;
+}
+.invisible {
+  visibility: hidden;
+}
+.text-hide {
+  font: 0/0 a;
+  color: transparent;
+  text-shadow: none;
+  background-color: transparent;
+  border: 0;
+}
+.hidden {
+  display: none !important;
+}
+.affix {
+  position: fixed;
+}
+@-ms-viewport {
+  width: device-width;
+}
+.visible-xs,
+.visible-sm,
+.visible-md,
+.visible-lg {
+  display: none !important;
+}
+.visible-xs-block,
+.visible-xs-inline,
+.visible-xs-inline-block,
+.visible-sm-block,
+.visible-sm-inline,
+.visible-sm-inline-block,
+.visible-md-block,
+.visible-md-inline,
+.visible-md-inline-block,
+.visible-lg-block,
+.visible-lg-inline,
+.visible-lg-inline-block {
+  display: none !important;
+}
+@media (max-width: 767px) {
+  .visible-xs {
+    display: block !important;
+  }
+  table.visible-xs {
+    display: table !important;
+  }
+  tr.visible-xs {
+    display: table-row !important;
+  }
+  th.visible-xs,
+  td.visible-xs {
+    display: table-cell !important;
+  }
+}
+@media (max-width: 767px) {
+  .visible-xs-block {
+    display: block !important;
+  }
+}
+@media (max-width: 767px) {
+  .visible-xs-inline {
+    display: inline !important;
+  }
+}
+@media (max-width: 767px) {
+  .visible-xs-inline-block {
+    display: inline-block !important;
+  }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+  .visible-sm {
+    display: block !important;
+  }
+  table.visible-sm {
+    display: table !important;
+  }
+  tr.visible-sm {
+    display: table-row !important;
+  }
+  th.visible-sm,
+  td.visible-sm {
+    display: table-cell !important;
+  }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+  .visible-sm-block {
+    display: block !important;
+  }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+  .visible-sm-inline {
+    display: inline !important;
+  }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+  .visible-sm-inline-block {
+    display: inline-block !important;
+  }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+  .visible-md {
+    display: block !important;
+  }
+  table.visible-md {
+    display: table !important;
+  }
+  tr.visible-md {
+    display: table-row !important;
+  }
+  th.visible-md,
+  td.visible-md {
+    display: table-cell !important;
+  }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+  .visible-md-block {
+    display: block !important;
+  }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+  .visible-md-inline {
+    display: inline !important;
+  }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+  .visible-md-inline-block {
+    display: inline-block !important;
+  }
+}
+@media (min-width: 1200px) {
+  .visible-lg {
+    display: block !important;
+  }
+  table.visible-lg {
+    display: table !important;
+  }
+  tr.visible-lg {
+    display: table-row !important;
+  }
+  th.visible-lg,
+  td.visible-lg {
+    display: table-cell !important;
+  }
+}
+@media (min-width: 1200px) {
+  .visible-lg-block {
+    display: block !important;
+  }
+}
+@media (min-width: 1200px) {
+  .visible-lg-inline {
+    display: inline !important;
+  }
+}
+@media (min-width: 1200px) {
+  .visible-lg-inline-block {
+    display: inline-block !important;
+  }
+}
+@media (max-width: 767px) {
+  .hidden-xs {
+    display: none !important;
+  }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+  .hidden-sm {
+    display: none !important;
+  }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+  .hidden-md {
+    display: none !important;
+  }
+}
+@media (min-width: 1200px) {
+  .hidden-lg {
+    display: none !important;
+  }
+}
+.visible-print {
+  display: none !important;
+}
+@media print {
+  .visible-print {
+    display: block !important;
+  }
+  table.visible-print {
+    display: table !important;
+  }
+  tr.visible-print {
+    display: table-row !important;
+  }
+  th.visible-print,
+  td.visible-print {
+    display: table-cell !important;
+  }
+}
+.visible-print-block {
+  display: none !important;
+}
+@media print {
+  .visible-print-block {
+    display: block !important;
+  }
+}
+.visible-print-inline {
+  display: none !important;
+}
+@media print {
+  .visible-print-inline {
+    display: inline !important;
+  }
+}
+.visible-print-inline-block {
+  display: none !important;
+}
+@media print {
+  .visible-print-inline-block {
+    display: inline-block !important;
+  }
+}
+@media print {
+  .hidden-print {
+    display: none !important;
+  }
+}
+/*# sourceMappingURL=bootstrap.css.map */
Index: EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap.css.map
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap.css.map	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap.css.map	(revision 270)
@@ -0,0 +1,1 @@
+{"version":3,"sources":["bootstrap.css","less/normalize.less","less/print.less","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text-emphasis.less","less/mixins/background-variant.less","less/mixins/text-overflow.less","less/code.less","less/grid.less","less/mixins/grid.less","less/mixins/grid-framework.less","less/tables.less","less/mixins/table-row.less","less/forms.less","less/mixins/forms.less","less/buttons.less","less/mixins/buttons.less","less/mixins/opacity.less","less/component-animations.less","less/dropdowns.less","less/mixins/nav-divider.less","less/mixins/reset-filter.less","less/button-groups.less","less/mixins/border-radius.less","less/input-groups.less","less/navs.less","less/navbar.less","less/mixins/nav-vertical-align.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/mixins/pagination.less","less/pager.less","less/labels.less","less/mixins/labels.less","less/badges.less","less/jumbotron.less","less/thumbnails.less","less/alerts.less","less/mixins/alerts.less","less/progress-bars.less","less/mixins/gradients.less","less/mixins/progress-bar.less","less/media.less","less/list-group.less","less/mixins/list-group.less","less/panels.less","less/mixins/panels.less","less/responsive-embed.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/mixins/reset-text.less","less/popovers.less","less/carousel.less","less/mixins/clearfix.less","less/mixins/center-block.less","less/mixins/hide-text.less","less/responsive-utilities.less","less/mixins/responsive-visibility.less"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,4EAA4E;ACG5E;EACE,wBAAA;EACA,2BAAA;EACA,+BAAA;CDDD;ACQD;EACE,UAAA;CDND;ACmBD;;;;;;;;;;;;;EAaE,eAAA;CDjBD;ACyBD;;;;EAIE,sBAAA;EACA,yBAAA;CDvBD;AC+BD;EACE,cAAA;EACA,UAAA;CD7BD;ACqCD;;EAEE,cAAA;CDnCD;AC6CD;EACE,8BAAA;CD3CD;ACmDD;;EAEE,WAAA;CDjDD;AC2DD;EACE,0BAAA;CDzDD;ACgED;;EAEE,kBAAA;CD9DD;ACqED;EACE,mBAAA;CDnED;AC2ED;EACE,eAAA;EACA,iBAAA;CDzED;ACgFD;EACE,iBAAA;EACA,YAAA;CD9ED;ACqFD;EACE,eAAA;CDnFD;AC0FD;;EAEE,eAAA;EACA,eAAA;EACA,mBAAA;EACA,yBAAA;CDxFD;AC2FD;EACE,YAAA;CDzFD;AC4FD;EACE,gBAAA;CD1FD;ACoGD;EACE,UAAA;CDlGD;ACyGD;EACE,iBAAA;CDvGD;ACiHD;EACE,iBAAA;CD/GD;ACsHD;EACE,gCAAA;KAAA,6BAAA;UAAA,wBAAA;EACA,UAAA;CDpHD;AC2HD;EACE,eAAA;CDzHD;ACgID;;;;EAIE,kCAAA;EACA,eAAA;CD9HD;ACgJD;;;;;EAKE,eAAA;EACA,cAAA;EACA,UAAA;CD9ID;ACqJD;EACE,kBAAA;CDnJD;AC6JD;;EAEE,qBAAA;CD3JD;ACsKD;;;;EAIE,2BAAA;EACA,gBAAA;CDpKD;AC2KD;;EAEE,gBAAA;CDzKD;ACgLD;;EAEE,UAAA;EACA,WAAA;CD9KD;ACsLD;EACE,oBAAA;CDpLD;AC+LD;;EAEE,+BAAA;KAAA,4BAAA;UAAA,uBAAA;EACA,WAAA;CD7LD;ACsMD;;EAEE,aAAA;CDpMD;AC4MD;EACE,8BAAA;EACA,gCAAA;KAAA,6BAAA;UAAA,wBAAA;CD1MD;ACmND;;EAEE,yBAAA;CDjND;ACwND;EACE,0BAAA;EACA,cAAA;EACA,+BAAA;CDtND;AC8ND;EACE,UAAA;EACA,WAAA;CD5ND;ACmOD;EACE,eAAA;CDjOD;ACyOD;EACE,kBAAA;CDvOD;ACiPD;EACE,0BAAA;EACA,kBAAA;CD/OD;ACkPD;;EAEE,WAAA;CDhPD;AACD,qFAAqF;AElFrF;EA7FI;;;IAGI,mCAAA;IACA,uBAAA;IACA,oCAAA;YAAA,4BAAA;IACA,6BAAA;GFkLL;EE/KC;;IAEI,2BAAA;GFiLL;EE9KC;IACI,6BAAA;GFgLL;EE7KC;IACI,8BAAA;GF+KL;EE1KC;;IAEI,YAAA;GF4KL;EEzKC;;IAEI,uBAAA;IACA,yBAAA;GF2KL;EExKC;IACI,4BAAA;GF0KL;EEvKC;;IAEI,yBAAA;GFyKL;EEtKC;IACI,2BAAA;GFwKL;EErKC;;;IAGI,WAAA;IACA,UAAA;GFuKL;EEpKC;;IAEI,wBAAA;GFsKL;EEhKC;IACI,cAAA;GFkKL;EEhKC;;IAGQ,kCAAA;GFiKT;EE9JC;IACI,uBAAA;GFgKL;EE7JC;IACI,qCAAA;GF+JL;EEhKC;;IAKQ,kCAAA;GF+JT;EE5JC;;IAGQ,kCAAA;GF6JT;CACF;AGnPD;EACE,oCAAA;EACA,sDAAA;EACA,gYAAA;CHqPD;AG7OD;EACE,mBAAA;EACA,SAAA;EACA,sBAAA;EACA,oCAAA;EACA,mBAAA;EACA,oBAAA;EACA,eAAA;EACA,oCAAA;EACA,mCAAA;CH+OD;AG3OmC;EAAW,iBAAA;CH8O9C;AG7OmC;EAAW,iBAAA;CHgP9C;AG9OmC;;EAAW,iBAAA;CHkP9C;AGjPmC;EAAW,iBAAA;CHoP9C;AGnPmC;EAAW,iBAAA;CHsP9C;AGrPmC;EAAW,iBAAA;CHwP9C;AGvPmC;EAAW,iBAAA;CH0P9C;AGzPmC;EAAW,iBAAA;CH4P9C;AG3PmC;EAAW,iBAAA;CH8P9C;AG7PmC;EAAW,iBAAA;CHgQ9C;AG/PmC;EAAW,iBAAA;CHkQ9C;AGjQmC;EAAW,iBAAA;CHoQ9C;AGnQmC;EAAW,iBAAA;CHsQ9C;AGrQmC;EAAW,iBAAA;CHwQ9C;AGvQmC;EAAW,iBAAA;CH0Q9C;AGzQmC;EAAW,iBAAA;CH4Q9C;AG3QmC;EAAW,iBAAA;CH8Q9C;AG7QmC;EAAW,iBAAA;CHgR9C;AG/QmC;EAAW,iBAAA;CHkR9C;AGjRmC;EAAW,iBAAA;CHoR9C;AGnRmC;EAAW,iBAAA;CHsR9C;AGrRmC;EAAW,iBAAA;CHwR9C;AGvRmC;EAAW,iBAAA;CH0R9C;AGzRmC;EAAW,iBAAA;CH4R9C;AG3RmC;EAAW,iBAAA;CH8R9C;AG7RmC;EAAW,iBAAA;CHgS9C;AG/RmC;EAAW,iBAAA;CHkS9C;AGjSmC;EAAW,iBAAA;CHoS9C;AGnSmC;EAAW,iBAAA;CHsS9C;AGrSmC;EAAW,iBAAA;CHwS9C;AGvSmC;EAAW,iBAAA;CH0S9C;AGzSmC;EAAW,iBAAA;CH4S9C;AG3SmC;EAAW,iBAAA;CH8S9C;AG7SmC;EAAW,iBAAA;CHgT9C;AG/SmC;EAAW,iBAAA;CHkT9C;AGjTmC;EAAW,iBAAA;CHoT9C;AGnTmC;EAAW,iBAAA;CHsT9C;AGrTmC;EAAW,iBAAA;CHwT9C;AGvTmC;EAAW,iBAAA;CH0T9C;AGzTmC;EAAW,iBAAA;CH4T9C;AG3TmC;EAAW,iBAAA;CH8T9C;AG7TmC;EAAW,iBAAA;CHgU9C;AG/TmC;EAAW,iBAAA;CHkU9C;AGjUmC;EAAW,iBAAA;CHoU9C;AGnUmC;EAAW,iBAAA;CHsU9C;AGrUmC;EAAW,iBAAA;CHwU9C;AGvUmC;EAAW,iBAAA;CH0U9C;AGzUmC;EAAW,iBAAA;CH4U9C;AG3UmC;EAAW,iBAAA;CH8U9C;AG7UmC;EAAW,iBAAA;CHgV9C;AG/UmC;EAAW,iBAAA;CHkV9C;AGjVmC;EAAW,iBAAA;CHoV9C;AGnVmC;EAAW,iBAAA;CHsV9C;AGrVmC;EAAW,iBAAA;CHwV9C;AGvVmC;EAAW,iBAAA;CH0V9C;AGzVmC;EAAW,iBAAA;CH4V9C;AG3VmC;EAAW,iBAAA;CH8V9C;AG7VmC;EAAW,iBAAA;CHgW9C;AG/VmC;EAAW,iBAAA;CHkW9C;AGjWmC;EAAW,iBAAA;CHoW9C;AGnWmC;EAAW,iBAAA;CHsW9C;AGrWmC;EAAW,iBAAA;CHwW9C;AGvWmC;EAAW,iBAAA;CH0W9C;AGzWmC;EAAW,iBAAA;CH4W9C;AG3WmC;EAAW,iBAAA;CH8W9C;AG7WmC;EAAW,iBAAA;CHgX9C;AG/WmC;EAAW,iBAAA;CHkX9C;AGjXmC;EAAW,iBAAA;CHoX9C;AGnXmC;EAAW,iBAAA;CHsX9C;AGrXmC;EAAW,iBAAA;CHwX9C;AGvXmC;EAAW,iBAAA;CH0X9C;AGzXmC;EAAW,iBAAA;CH4X9C;AG3XmC;EAAW,iBAAA;CH8X9C;AG7XmC;EAAW,iBAAA;CHgY9C;AG/XmC;EAAW,iBAAA;CHkY9C;AGjYmC;EAAW,iBAAA;CHoY9C;AGnYmC;EAAW,iBAAA;CHsY9C;AGrYmC;EAAW,iBAAA;CHwY9C;AGvYmC;EAAW,iBAAA;CH0Y9C;AGzYmC;EAAW,iBAAA;CH4Y9C;AG3YmC;EAAW,iBAAA;CH8Y9C;AG7YmC;EAAW,iBAAA;CHgZ9C;AG/YmC;EAAW,iBAAA;CHkZ9C;AGjZmC;EAAW,iBAAA;CHoZ9C;AGnZmC;EAAW,iBAAA;CHsZ9C;AGrZmC;EAAW,iBAAA;CHwZ9C;AGvZmC;EAAW,iBAAA;CH0Z9C;AGzZmC;EAAW,iBAAA;CH4Z9C;AG3ZmC;EAAW,iBAAA;CH8Z9C;AG7ZmC;EAAW,iBAAA;CHga9C;AG/ZmC;EAAW,iBAAA;CHka9C;AGjamC;EAAW,iBAAA;CHoa9C;AGnamC;EAAW,iBAAA;CHsa9C;AGramC;EAAW,iBAAA;CHwa9C;AGvamC;EAAW,iBAAA;CH0a9C;AGzamC;EAAW,iBAAA;CH4a9C;AG3amC;EAAW,iBAAA;CH8a9C;AG7amC;EAAW,iBAAA;CHgb9C;AG/amC;EAAW,iBAAA;CHkb9C;AGjbmC;EAAW,iBAAA;CHob9C;AGnbmC;EAAW,iBAAA;CHsb9C;AGrbmC;EAAW,iBAAA;CHwb9C;AGvbmC;EAAW,iBAAA;CH0b9C;AGzbmC;EAAW,iBAAA;CH4b9C;AG3bmC;EAAW,iBAAA;CH8b9C;AG7bmC;EAAW,iBAAA;CHgc9C;AG/bmC;EAAW,iBAAA;CHkc9C;AGjcmC;EAAW,iBAAA;CHoc9C;AGncmC;EAAW,iBAAA;CHsc9C;AGrcmC;EAAW,iBAAA;CHwc9C;AGvcmC;EAAW,iBAAA;CH0c9C;AGzcmC;EAAW,iBAAA;CH4c9C;AG3cmC;EAAW,iBAAA;CH8c9C;AG7cmC;EAAW,iBAAA;CHgd9C;AG/cmC;EAAW,iBAAA;CHkd9C;AGjdmC;EAAW,iBAAA;CHod9C;AGndmC;EAAW,iBAAA;CHsd9C;AGrdmC;EAAW,iBAAA;CHwd9C;AGvdmC;EAAW,iBAAA;CH0d9C;AGzdmC;EAAW,iBAAA;CH4d9C;AG3dmC;EAAW,iBAAA;CH8d9C;AG7dmC;EAAW,iBAAA;CHge9C;AG/dmC;EAAW,iBAAA;CHke9C;AGjemC;EAAW,iBAAA;CHoe9C;AGnemC;EAAW,iBAAA;CHse9C;AGremC;EAAW,iBAAA;CHwe9C;AGvemC;EAAW,iBAAA;CH0e9C;AGzemC;EAAW,iBAAA;CH4e9C;AG3emC;EAAW,iBAAA;CH8e9C;AG7emC;EAAW,iBAAA;CHgf9C;AG/emC;EAAW,iBAAA;CHkf9C;AGjfmC;EAAW,iBAAA;CHof9C;AGnfmC;EAAW,iBAAA;CHsf9C;AGrfmC;EAAW,iBAAA;CHwf9C;AGvfmC;EAAW,iBAAA;CH0f9C;AGzfmC;EAAW,iBAAA;CH4f9C;AG3fmC;EAAW,iBAAA;CH8f9C;AG7fmC;EAAW,iBAAA;CHggB9C;AG/fmC;EAAW,iBAAA;CHkgB9C;AGjgBmC;EAAW,iBAAA;CHogB9C;AGngBmC;EAAW,iBAAA;CHsgB9C;AGrgBmC;EAAW,iBAAA;CHwgB9C;AGvgBmC;EAAW,iBAAA;CH0gB9C;AGzgBmC;EAAW,iBAAA;CH4gB9C;AG3gBmC;EAAW,iBAAA;CH8gB9C;AG7gBmC;EAAW,iBAAA;CHghB9C;AG/gBmC;EAAW,iBAAA;CHkhB9C;AGjhBmC;EAAW,iBAAA;CHohB9C;AGnhBmC;EAAW,iBAAA;CHshB9C;AGrhBmC;EAAW,iBAAA;CHwhB9C;AGvhBmC;EAAW,iBAAA;CH0hB9C;AGzhBmC;EAAW,iBAAA;CH4hB9C;AG3hBmC;EAAW,iBAAA;CH8hB9C;AG7hBmC;EAAW,iBAAA;CHgiB9C;AG/hBmC;EAAW,iBAAA;CHkiB9C;AGjiBmC;EAAW,iBAAA;CHoiB9C;AGniBmC;EAAW,iBAAA;CHsiB9C;AGriBmC;EAAW,iBAAA;CHwiB9C;AGviBmC;EAAW,iBAAA;CH0iB9C;AGziBmC;EAAW,iBAAA;CH4iB9C;AG3iBmC;EAAW,iBAAA;CH8iB9C;AG7iBmC;EAAW,iBAAA;CHgjB9C;AG/iBmC;EAAW,iBAAA;CHkjB9C;AGjjBmC;EAAW,iBAAA;CHojB9C;AGnjBmC;EAAW,iBAAA;CHsjB9C;AGrjBmC;EAAW,iBAAA;CHwjB9C;AGvjBmC;EAAW,iBAAA;CH0jB9C;AGzjBmC;EAAW,iBAAA;CH4jB9C;AG3jBmC;EAAW,iBAAA;CH8jB9C;AG7jBmC;EAAW,iBAAA;CHgkB9C;AG/jBmC;EAAW,iBAAA;CHkkB9C;AGjkBmC;EAAW,iBAAA;CHokB9C;AGnkBmC;EAAW,iBAAA;CHskB9C;AGrkBmC;EAAW,iBAAA;CHwkB9C;AGvkBmC;EAAW,iBAAA;CH0kB9C;AGzkBmC;EAAW,iBAAA;CH4kB9C;AG3kBmC;EAAW,iBAAA;CH8kB9C;AG7kBmC;EAAW,iBAAA;CHglB9C;AG/kBmC;EAAW,iBAAA;CHklB9C;AGjlBmC;EAAW,iBAAA;CHolB9C;AGnlBmC;EAAW,iBAAA;CHslB9C;AGrlBmC;EAAW,iBAAA;CHwlB9C;AGvlBmC;EAAW,iBAAA;CH0lB9C;AGzlBmC;EAAW,iBAAA;CH4lB9C;AG3lBmC;EAAW,iBAAA;CH8lB9C;AG7lBmC;EAAW,iBAAA;CHgmB9C;AG/lBmC;EAAW,iBAAA;CHkmB9C;AGjmBmC;EAAW,iBAAA;CHomB9C;AGnmBmC;EAAW,iBAAA;CHsmB9C;AGrmBmC;EAAW,iBAAA;CHwmB9C;AGvmBmC;EAAW,iBAAA;CH0mB9C;AGzmBmC;EAAW,iBAAA;CH4mB9C;AG3mBmC;EAAW,iBAAA;CH8mB9C;AG7mBmC;EAAW,iBAAA;CHgnB9C;AG/mBmC;EAAW,iBAAA;CHknB9C;AGjnBmC;EAAW,iBAAA;CHonB9C;AGnnBmC;EAAW,iBAAA;CHsnB9C;AGrnBmC;EAAW,iBAAA;CHwnB9C;AGvnBmC;EAAW,iBAAA;CH0nB9C;AGznBmC;EAAW,iBAAA;CH4nB9C;AG3nBmC;EAAW,iBAAA;CH8nB9C;AG7nBmC;EAAW,iBAAA;CHgoB9C;AG/nBmC;EAAW,iBAAA;CHkoB9C;AGjoBmC;EAAW,iBAAA;CHooB9C;AGnoBmC;EAAW,iBAAA;CHsoB9C;AGroBmC;EAAW,iBAAA;CHwoB9C;AG/nBmC;EAAW,iBAAA;CHkoB9C;AGjoBmC;EAAW,iBAAA;CHooB9C;AGnoBmC;EAAW,iBAAA;CHsoB9C;AGroBmC;EAAW,iBAAA;CHwoB9C;AGvoBmC;EAAW,iBAAA;CH0oB9C;AGzoBmC;EAAW,iBAAA;CH4oB9C;AG3oBmC;EAAW,iBAAA;CH8oB9C;AG7oBmC;EAAW,iBAAA;CHgpB9C;AG/oBmC;EAAW,iBAAA;CHkpB9C;AGjpBmC;EAAW,iBAAA;CHopB9C;AGnpBmC;EAAW,iBAAA;CHspB9C;AGrpBmC;EAAW,iBAAA;CHwpB9C;AGvpBmC;EAAW,iBAAA;CH0pB9C;AGzpBmC;EAAW,iBAAA;CH4pB9C;AG3pBmC;EAAW,iBAAA;CH8pB9C;AG7pBmC;EAAW,iBAAA;CHgqB9C;AG/pBmC;EAAW,iBAAA;CHkqB9C;AGjqBmC;EAAW,iBAAA;CHoqB9C;AGnqBmC;EAAW,iBAAA;CHsqB9C;AGrqBmC;EAAW,iBAAA;CHwqB9C;AGvqBmC;EAAW,iBAAA;CH0qB9C;AGzqBmC;EAAW,iBAAA;CH4qB9C;AG3qBmC;EAAW,iBAAA;CH8qB9C;AG7qBmC;EAAW,iBAAA;CHgrB9C;AG/qBmC;EAAW,iBAAA;CHkrB9C;AGjrBmC;EAAW,iBAAA;CHorB9C;AGnrBmC;EAAW,iBAAA;CHsrB9C;AGrrBmC;EAAW,iBAAA;CHwrB9C;AGvrBmC;EAAW,iBAAA;CH0rB9C;AGzrBmC;EAAW,iBAAA;CH4rB9C;AG3rBmC;EAAW,iBAAA;CH8rB9C;AG7rBmC;EAAW,iBAAA;CHgsB9C;AG/rBmC;EAAW,iBAAA;CHksB9C;AGjsBmC;EAAW,iBAAA;CHosB9C;AGnsBmC;EAAW,iBAAA;CHssB9C;AGrsBmC;EAAW,iBAAA;CHwsB9C;AGvsBmC;EAAW,iBAAA;CH0sB9C;AGzsBmC;EAAW,iBAAA;CH4sB9C;AG3sBmC;EAAW,iBAAA;CH8sB9C;AG7sBmC;EAAW,iBAAA;CHgtB9C;AG/sBmC;EAAW,iBAAA;CHktB9C;AGjtBmC;EAAW,iBAAA;CHotB9C;AGntBmC;EAAW,iBAAA;CHstB9C;AGrtBmC;EAAW,iBAAA;CHwtB9C;AGvtBmC;EAAW,iBAAA;CH0tB9C;AGztBmC;EAAW,iBAAA;CH4tB9C;AG3tBmC;EAAW,iBAAA;CH8tB9C;AG7tBmC;EAAW,iBAAA;CHguB9C;AG/tBmC;EAAW,iBAAA;CHkuB9C;AGjuBmC;EAAW,iBAAA;CHouB9C;AGnuBmC;EAAW,iBAAA;CHsuB9C;AGruBmC;EAAW,iBAAA;CHwuB9C;AGvuBmC;EAAW,iBAAA;CH0uB9C;AGzuBmC;EAAW,iBAAA;CH4uB9C;AG3uBmC;EAAW,iBAAA;CH8uB9C;AG7uBmC;EAAW,iBAAA;CHgvB9C;AIthCD;ECgEE,+BAAA;EACG,4BAAA;EACK,uBAAA;CLy9BT;AIxhCD;;EC6DE,+BAAA;EACG,4BAAA;EACK,uBAAA;CL+9BT;AIthCD;EACE,gBAAA;EACA,8CAAA;CJwhCD;AIrhCD;EACE,4DAAA;EACA,gBAAA;EACA,wBAAA;EACA,eAAA;EACA,uBAAA;CJuhCD;AInhCD;;;;EAIE,qBAAA;EACA,mBAAA;EACA,qBAAA;CJqhCD;AI/gCD;EACE,eAAA;EACA,sBAAA;CJihCD;AI/gCC;;EAEE,eAAA;EACA,2BAAA;CJihCH;AI9gCC;EEnDA,2CAAA;EACA,qBAAA;CNokCD;AIvgCD;EACE,UAAA;CJygCD;AIngCD;EACE,uBAAA;CJqgCD;AIjgCD;;;;;EGvEE,eAAA;EACA,gBAAA;EACA,aAAA;CP+kCD;AIrgCD;EACE,mBAAA;CJugCD;AIjgCD;EACE,aAAA;EACA,wBAAA;EACA,uBAAA;EACA,uBAAA;EACA,mBAAA;EC6FA,yCAAA;EACK,oCAAA;EACG,iCAAA;EEvLR,sBAAA;EACA,gBAAA;EACA,aAAA;CP+lCD;AIjgCD;EACE,mBAAA;CJmgCD;AI7/BD;EACE,iBAAA;EACA,oBAAA;EACA,UAAA;EACA,8BAAA;CJ+/BD;AIv/BD;EACE,mBAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,WAAA;EACA,iBAAA;EACA,uBAAA;EACA,UAAA;CJy/BD;AIj/BC;;EAEE,iBAAA;EACA,YAAA;EACA,aAAA;EACA,UAAA;EACA,kBAAA;EACA,WAAA;CJm/BH;AIx+BD;EACE,gBAAA;CJ0+BD;AQjoCD;;;;;;;;;;;;EAEE,qBAAA;EACA,iBAAA;EACA,iBAAA;EACA,eAAA;CR6oCD;AQlpCD;;;;;;;;;;;;;;;;;;;;;;;;EASI,oBAAA;EACA,eAAA;EACA,eAAA;CRmqCH;AQ/pCD;;;;;;EAGE,iBAAA;EACA,oBAAA;CRoqCD;AQxqCD;;;;;;;;;;;;EAQI,eAAA;CR8qCH;AQ3qCD;;;;;;EAGE,iBAAA;EACA,oBAAA;CRgrCD;AQprCD;;;;;;;;;;;;EAQI,eAAA;CR0rCH;AQtrCD;;EAAU,gBAAA;CR0rCT;AQzrCD;;EAAU,gBAAA;CR6rCT;AQ5rCD;;EAAU,gBAAA;CRgsCT;AQ/rCD;;EAAU,gBAAA;CRmsCT;AQlsCD;;EAAU,gBAAA;CRssCT;AQrsCD;;EAAU,gBAAA;CRysCT;AQnsCD;EACE,iBAAA;CRqsCD;AQlsCD;EACE,oBAAA;EACA,gBAAA;EACA,iBAAA;EACA,iBAAA;CRosCD;AQ/rCD;EAwOA;IA1OI,gBAAA;GRqsCD;CACF;AQ7rCD;;EAEE,eAAA;CR+rCD;AQ5rCD;;EAEE,0BAAA;EACA,cAAA;CR8rCD;AQ1rCD;EAAuB,iBAAA;CR6rCtB;AQ5rCD;EAAuB,kBAAA;CR+rCtB;AQ9rCD;EAAuB,mBAAA;CRisCtB;AQhsCD;EAAuB,oBAAA;CRmsCtB;AQlsCD;EAAuB,oBAAA;CRqsCtB;AQlsCD;EAAuB,0BAAA;CRqsCtB;AQpsCD;EAAuB,0BAAA;CRusCtB;AQtsCD;EAAuB,2BAAA;CRysCtB;AQtsCD;EACE,eAAA;CRwsCD;AQtsCD;ECrGE,eAAA;CT8yCD;AS7yCC;;EAEE,eAAA;CT+yCH;AQ1sCD;ECxGE,eAAA;CTqzCD;ASpzCC;;EAEE,eAAA;CTszCH;AQ9sCD;EC3GE,eAAA;CT4zCD;AS3zCC;;EAEE,eAAA;CT6zCH;AQltCD;EC9GE,eAAA;CTm0CD;ASl0CC;;EAEE,eAAA;CTo0CH;AQttCD;ECjHE,eAAA;CT00CD;ASz0CC;;EAEE,eAAA;CT20CH;AQttCD;EAGE,YAAA;EE3HA,0BAAA;CVk1CD;AUj1CC;;EAEE,0BAAA;CVm1CH;AQxtCD;EE9HE,0BAAA;CVy1CD;AUx1CC;;EAEE,0BAAA;CV01CH;AQ5tCD;EEjIE,0BAAA;CVg2CD;AU/1CC;;EAEE,0BAAA;CVi2CH;AQhuCD;EEpIE,0BAAA;CVu2CD;AUt2CC;;EAEE,0BAAA;CVw2CH;AQpuCD;EEvIE,0BAAA;CV82CD;AU72CC;;EAEE,0BAAA;CV+2CH;AQnuCD;EACE,oBAAA;EACA,oBAAA;EACA,iCAAA;CRquCD;AQ7tCD;;EAEE,cAAA;EACA,oBAAA;CR+tCD;AQluCD;;;;EAMI,iBAAA;CRkuCH;AQ3tCD;EACE,gBAAA;EACA,iBAAA;CR6tCD;AQztCD;EALE,gBAAA;EACA,iBAAA;EAMA,kBAAA;CR4tCD;AQ9tCD;EAKI,sBAAA;EACA,kBAAA;EACA,mBAAA;CR4tCH;AQvtCD;EACE,cAAA;EACA,oBAAA;CRytCD;AQvtCD;;EAEE,wBAAA;CRytCD;AQvtCD;EACE,kBAAA;CRytCD;AQvtCD;EACE,eAAA;CRytCD;AQhsCD;EA6EA;IAvFM,YAAA;IACA,aAAA;IACA,YAAA;IACA,kBAAA;IGtNJ,iBAAA;IACA,wBAAA;IACA,oBAAA;GXq6CC;EQ7nCH;IAhFM,mBAAA;GRgtCH;CACF;AQvsCD;;EAGE,aAAA;EACA,kCAAA;CRwsCD;AQtsCD;EACE,eAAA;EA9IqB,0BAAA;CRu1CtB;AQpsCD;EACE,mBAAA;EACA,iBAAA;EACA,kBAAA;EACA,+BAAA;CRssCD;AQjsCG;;;EACE,iBAAA;CRqsCL;AQ/sCD;;;EAmBI,eAAA;EACA,eAAA;EACA,wBAAA;EACA,eAAA;CRisCH;AQ/rCG;;;EACE,uBAAA;CRmsCL;AQ3rCD;;EAEE,oBAAA;EACA,gBAAA;EACA,gCAAA;EACA,eAAA;EACA,kBAAA;CR6rCD;AQvrCG;;;;;;EAAW,YAAA;CR+rCd;AQ9rCG;;;;;;EACE,uBAAA;CRqsCL;AQ/rCD;EACE,oBAAA;EACA,mBAAA;EACA,wBAAA;CRisCD;AYv+CD;;;;EAIE,+DAAA;CZy+CD;AYr+CD;EACE,iBAAA;EACA,eAAA;EACA,eAAA;EACA,0BAAA;EACA,mBAAA;CZu+CD;AYn+CD;EACE,iBAAA;EACA,eAAA;EACA,YAAA;EACA,uBAAA;EACA,mBAAA;EACA,uDAAA;UAAA,+CAAA;CZq+CD;AY3+CD;EASI,WAAA;EACA,gBAAA;EACA,kBAAA;EACA,yBAAA;UAAA,iBAAA;CZq+CH;AYh+CD;EACE,eAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,wBAAA;EACA,sBAAA;EACA,sBAAA;EACA,eAAA;EACA,0BAAA;EACA,uBAAA;EACA,mBAAA;CZk+CD;AY7+CD;EAeI,WAAA;EACA,mBAAA;EACA,eAAA;EACA,sBAAA;EACA,8BAAA;EACA,iBAAA;CZi+CH;AY59CD;EACE,kBAAA;EACA,mBAAA;CZ89CD;AaxhDD;ECHE,mBAAA;EACA,kBAAA;EACA,mBAAA;EACA,oBAAA;Cd8hDD;AaxhDC;EAqEF;IAvEI,aAAA;Gb8hDD;CACF;Aa1hDC;EAkEF;IApEI,aAAA;GbgiDD;CACF;Aa5hDD;EA+DA;IAjEI,cAAA;GbkiDD;CACF;AazhDD;ECvBE,mBAAA;EACA,kBAAA;EACA,mBAAA;EACA,oBAAA;CdmjDD;AathDD;ECvBE,mBAAA;EACA,oBAAA;CdgjDD;AehjDG;EACE,mBAAA;EAEA,gBAAA;EAEA,mBAAA;EACA,oBAAA;CfgjDL;AehiDG;EACE,YAAA;CfkiDL;Ae3hDC;EACE,YAAA;Cf6hDH;Ae9hDC;EACE,oBAAA;CfgiDH;AejiDC;EACE,oBAAA;CfmiDH;AepiDC;EACE,WAAA;CfsiDH;AeviDC;EACE,oBAAA;CfyiDH;Ae1iDC;EACE,oBAAA;Cf4iDH;Ae7iDC;EACE,WAAA;Cf+iDH;AehjDC;EACE,oBAAA;CfkjDH;AenjDC;EACE,oBAAA;CfqjDH;AetjDC;EACE,WAAA;CfwjDH;AezjDC;EACE,oBAAA;Cf2jDH;Ae5jDC;EACE,mBAAA;Cf8jDH;AehjDC;EACE,YAAA;CfkjDH;AenjDC;EACE,oBAAA;CfqjDH;AetjDC;EACE,oBAAA;CfwjDH;AezjDC;EACE,WAAA;Cf2jDH;Ae5jDC;EACE,oBAAA;Cf8jDH;Ae/jDC;EACE,oBAAA;CfikDH;AelkDC;EACE,WAAA;CfokDH;AerkDC;EACE,oBAAA;CfukDH;AexkDC;EACE,oBAAA;Cf0kDH;Ae3kDC;EACE,WAAA;Cf6kDH;Ae9kDC;EACE,oBAAA;CfglDH;AejlDC;EACE,mBAAA;CfmlDH;Ae/kDC;EACE,YAAA;CfilDH;AejmDC;EACE,WAAA;CfmmDH;AepmDC;EACE,mBAAA;CfsmDH;AevmDC;EACE,mBAAA;CfymDH;Ae1mDC;EACE,UAAA;Cf4mDH;Ae7mDC;EACE,mBAAA;Cf+mDH;AehnDC;EACE,mBAAA;CfknDH;AennDC;EACE,UAAA;CfqnDH;AetnDC;EACE,mBAAA;CfwnDH;AeznDC;EACE,mBAAA;Cf2nDH;Ae5nDC;EACE,UAAA;Cf8nDH;Ae/nDC;EACE,mBAAA;CfioDH;AeloDC;EACE,kBAAA;CfooDH;AehoDC;EACE,WAAA;CfkoDH;AepnDC;EACE,kBAAA;CfsnDH;AevnDC;EACE,0BAAA;CfynDH;Ae1nDC;EACE,0BAAA;Cf4nDH;Ae7nDC;EACE,iBAAA;Cf+nDH;AehoDC;EACE,0BAAA;CfkoDH;AenoDC;EACE,0BAAA;CfqoDH;AetoDC;EACE,iBAAA;CfwoDH;AezoDC;EACE,0BAAA;Cf2oDH;Ae5oDC;EACE,0BAAA;Cf8oDH;Ae/oDC;EACE,iBAAA;CfipDH;AelpDC;EACE,0BAAA;CfopDH;AerpDC;EACE,yBAAA;CfupDH;AexpDC;EACE,gBAAA;Cf0pDH;Aa1pDD;EElCI;IACE,YAAA;Gf+rDH;EexrDD;IACE,YAAA;Gf0rDD;Ee3rDD;IACE,oBAAA;Gf6rDD;Ee9rDD;IACE,oBAAA;GfgsDD;EejsDD;IACE,WAAA;GfmsDD;EepsDD;IACE,oBAAA;GfssDD;EevsDD;IACE,oBAAA;GfysDD;Ee1sDD;IACE,WAAA;Gf4sDD;Ee7sDD;IACE,oBAAA;Gf+sDD;EehtDD;IACE,oBAAA;GfktDD;EentDD;IACE,WAAA;GfqtDD;EettDD;IACE,oBAAA;GfwtDD;EeztDD;IACE,mBAAA;Gf2tDD;Ee7sDD;IACE,YAAA;Gf+sDD;EehtDD;IACE,oBAAA;GfktDD;EentDD;IACE,oBAAA;GfqtDD;EettDD;IACE,WAAA;GfwtDD;EeztDD;IACE,oBAAA;Gf2tDD;Ee5tDD;IACE,oBAAA;Gf8tDD;Ee/tDD;IACE,WAAA;GfiuDD;EeluDD;IACE,oBAAA;GfouDD;EeruDD;IACE,oBAAA;GfuuDD;EexuDD;IACE,WAAA;Gf0uDD;Ee3uDD;IACE,oBAAA;Gf6uDD;Ee9uDD;IACE,mBAAA;GfgvDD;Ee5uDD;IACE,YAAA;Gf8uDD;Ee9vDD;IACE,WAAA;GfgwDD;EejwDD;IACE,mBAAA;GfmwDD;EepwDD;IACE,mBAAA;GfswDD;EevwDD;IACE,UAAA;GfywDD;Ee1wDD;IACE,mBAAA;Gf4wDD;Ee7wDD;IACE,mBAAA;Gf+wDD;EehxDD;IACE,UAAA;GfkxDD;EenxDD;IACE,mBAAA;GfqxDD;EetxDD;IACE,mBAAA;GfwxDD;EezxDD;IACE,UAAA;Gf2xDD;Ee5xDD;IACE,mBAAA;Gf8xDD;Ee/xDD;IACE,kBAAA;GfiyDD;Ee7xDD;IACE,WAAA;Gf+xDD;EejxDD;IACE,kBAAA;GfmxDD;EepxDD;IACE,0BAAA;GfsxDD;EevxDD;IACE,0BAAA;GfyxDD;Ee1xDD;IACE,iBAAA;Gf4xDD;Ee7xDD;IACE,0BAAA;Gf+xDD;EehyDD;IACE,0BAAA;GfkyDD;EenyDD;IACE,iBAAA;GfqyDD;EetyDD;IACE,0BAAA;GfwyDD;EezyDD;IACE,0BAAA;Gf2yDD;Ee5yDD;IACE,iBAAA;Gf8yDD;Ee/yDD;IACE,0BAAA;GfizDD;EelzDD;IACE,yBAAA;GfozDD;EerzDD;IACE,gBAAA;GfuzDD;CACF;Aa/yDD;EE3CI;IACE,YAAA;Gf61DH;Eet1DD;IACE,YAAA;Gfw1DD;Eez1DD;IACE,oBAAA;Gf21DD;Ee51DD;IACE,oBAAA;Gf81DD;Ee/1DD;IACE,WAAA;Gfi2DD;Eel2DD;IACE,oBAAA;Gfo2DD;Eer2DD;IACE,oBAAA;Gfu2DD;Eex2DD;IACE,WAAA;Gf02DD;Ee32DD;IACE,oBAAA;Gf62DD;Ee92DD;IACE,oBAAA;Gfg3DD;Eej3DD;IACE,WAAA;Gfm3DD;Eep3DD;IACE,oBAAA;Gfs3DD;Eev3DD;IACE,mBAAA;Gfy3DD;Ee32DD;IACE,YAAA;Gf62DD;Ee92DD;IACE,oBAAA;Gfg3DD;Eej3DD;IACE,oBAAA;Gfm3DD;Eep3DD;IACE,WAAA;Gfs3DD;Eev3DD;IACE,oBAAA;Gfy3DD;Ee13DD;IACE,oBAAA;Gf43DD;Ee73DD;IACE,WAAA;Gf+3DD;Eeh4DD;IACE,oBAAA;Gfk4DD;Een4DD;IACE,oBAAA;Gfq4DD;Eet4DD;IACE,WAAA;Gfw4DD;Eez4DD;IACE,oBAAA;Gf24DD;Ee54DD;IACE,mBAAA;Gf84DD;Ee14DD;IACE,YAAA;Gf44DD;Ee55DD;IACE,WAAA;Gf85DD;Ee/5DD;IACE,mBAAA;Gfi6DD;Eel6DD;IACE,mBAAA;Gfo6DD;Eer6DD;IACE,UAAA;Gfu6DD;Eex6DD;IACE,mBAAA;Gf06DD;Ee36DD;IACE,mBAAA;Gf66DD;Ee96DD;IACE,UAAA;Gfg7DD;Eej7DD;IACE,mBAAA;Gfm7DD;Eep7DD;IACE,mBAAA;Gfs7DD;Eev7DD;IACE,UAAA;Gfy7DD;Ee17DD;IACE,mBAAA;Gf47DD;Ee77DD;IACE,kBAAA;Gf+7DD;Ee37DD;IACE,WAAA;Gf67DD;Ee/6DD;IACE,kBAAA;Gfi7DD;Eel7DD;IACE,0BAAA;Gfo7DD;Eer7DD;IACE,0BAAA;Gfu7DD;Eex7DD;IACE,iBAAA;Gf07DD;Ee37DD;IACE,0BAAA;Gf67DD;Ee97DD;IACE,0BAAA;Gfg8DD;Eej8DD;IACE,iBAAA;Gfm8DD;Eep8DD;IACE,0BAAA;Gfs8DD;Eev8DD;IACE,0BAAA;Gfy8DD;Ee18DD;IACE,iBAAA;Gf48DD;Ee78DD;IACE,0BAAA;Gf+8DD;Eeh9DD;IACE,yBAAA;Gfk9DD;Een9DD;IACE,gBAAA;Gfq9DD;CACF;Aa18DD;EE9CI;IACE,YAAA;Gf2/DH;Eep/DD;IACE,YAAA;Gfs/DD;Eev/DD;IACE,oBAAA;Gfy/DD;Ee1/DD;IACE,oBAAA;Gf4/DD;Ee7/DD;IACE,WAAA;Gf+/DD;EehgED;IACE,oBAAA;GfkgED;EengED;IACE,oBAAA;GfqgED;EetgED;IACE,WAAA;GfwgED;EezgED;IACE,oBAAA;Gf2gED;Ee5gED;IACE,oBAAA;Gf8gED;Ee/gED;IACE,WAAA;GfihED;EelhED;IACE,oBAAA;GfohED;EerhED;IACE,mBAAA;GfuhED;EezgED;IACE,YAAA;Gf2gED;Ee5gED;IACE,oBAAA;Gf8gED;Ee/gED;IACE,oBAAA;GfihED;EelhED;IACE,WAAA;GfohED;EerhED;IACE,oBAAA;GfuhED;EexhED;IACE,oBAAA;Gf0hED;Ee3hED;IACE,WAAA;Gf6hED;Ee9hED;IACE,oBAAA;GfgiED;EejiED;IACE,oBAAA;GfmiED;EepiED;IACE,WAAA;GfsiED;EeviED;IACE,oBAAA;GfyiED;Ee1iED;IACE,mBAAA;Gf4iED;EexiED;IACE,YAAA;Gf0iED;Ee1jED;IACE,WAAA;Gf4jED;Ee7jED;IACE,mBAAA;Gf+jED;EehkED;IACE,mBAAA;GfkkED;EenkED;IACE,UAAA;GfqkED;EetkED;IACE,mBAAA;GfwkED;EezkED;IACE,mBAAA;Gf2kED;Ee5kED;IACE,UAAA;Gf8kED;Ee/kED;IACE,mBAAA;GfilED;EellED;IACE,mBAAA;GfolED;EerlED;IACE,UAAA;GfulED;EexlED;IACE,mBAAA;Gf0lED;Ee3lED;IACE,kBAAA;Gf6lED;EezlED;IACE,WAAA;Gf2lED;Ee7kED;IACE,kBAAA;Gf+kED;EehlED;IACE,0BAAA;GfklED;EenlED;IACE,0BAAA;GfqlED;EetlED;IACE,iBAAA;GfwlED;EezlED;IACE,0BAAA;Gf2lED;Ee5lED;IACE,0BAAA;Gf8lED;Ee/lED;IACE,iBAAA;GfimED;EelmED;IACE,0BAAA;GfomED;EermED;IACE,0BAAA;GfumED;EexmED;IACE,iBAAA;Gf0mED;Ee3mED;IACE,0BAAA;Gf6mED;Ee9mED;IACE,yBAAA;GfgnED;EejnED;IACE,gBAAA;GfmnED;CACF;AgBvrED;EACE,8BAAA;ChByrED;AgBvrED;EACE,iBAAA;EACA,oBAAA;EACA,eAAA;EACA,iBAAA;ChByrED;AgBvrED;EACE,iBAAA;ChByrED;AgBnrED;EACE,YAAA;EACA,gBAAA;EACA,oBAAA;ChBqrED;AgBxrED;;;;;;EAWQ,aAAA;EACA,wBAAA;EACA,oBAAA;EACA,2BAAA;ChBqrEP;AgBnsED;EAoBI,uBAAA;EACA,8BAAA;ChBkrEH;AgBvsED;;;;;;EA8BQ,cAAA;ChBirEP;AgB/sED;EAoCI,2BAAA;ChB8qEH;AgBltED;EAyCI,uBAAA;ChB4qEH;AgBrqED;;;;;;EAOQ,aAAA;ChBsqEP;AgB3pED;EACE,uBAAA;ChB6pED;AgB9pED;;;;;;EAQQ,uBAAA;ChB8pEP;AgBtqED;;EAeM,yBAAA;ChB2pEL;AgBjpED;EAEI,0BAAA;ChBkpEH;AgBzoED;EAEI,0BAAA;ChB0oEH;AgBjoED;EACE,iBAAA;EACA,YAAA;EACA,sBAAA;ChBmoED;AgB9nEG;;EACE,iBAAA;EACA,YAAA;EACA,oBAAA;ChBioEL;AiB7wEC;;;;;;;;;;;;EAOI,0BAAA;CjBoxEL;AiB9wEC;;;;;EAMI,0BAAA;CjB+wEL;AiBlyEC;;;;;;;;;;;;EAOI,0BAAA;CjByyEL;AiBnyEC;;;;;EAMI,0BAAA;CjBoyEL;AiBvzEC;;;;;;;;;;;;EAOI,0BAAA;CjB8zEL;AiBxzEC;;;;;EAMI,0BAAA;CjByzEL;AiB50EC;;;;;;;;;;;;EAOI,0BAAA;CjBm1EL;AiB70EC;;;;;EAMI,0BAAA;CjB80EL;AiBj2EC;;;;;;;;;;;;EAOI,0BAAA;CjBw2EL;AiBl2EC;;;;;EAMI,0BAAA;CjBm2EL;AgBjtED;EACE,iBAAA;EACA,kBAAA;ChBmtED;AgBtpED;EACA;IA3DI,YAAA;IACA,oBAAA;IACA,mBAAA;IACA,6CAAA;IACA,uBAAA;GhBotED;EgB7pEH;IAnDM,iBAAA;GhBmtEH;EgBhqEH;;;;;;IA1CY,oBAAA;GhBktET;EgBxqEH;IAlCM,UAAA;GhB6sEH;EgB3qEH;;;;;;IAzBY,eAAA;GhB4sET;EgBnrEH;;;;;;IArBY,gBAAA;GhBgtET;EgB3rEH;;;;IARY,iBAAA;GhBysET;CACF;AkBn6ED;EACE,WAAA;EACA,UAAA;EACA,UAAA;EAIA,aAAA;ClBk6ED;AkB/5ED;EACE,eAAA;EACA,YAAA;EACA,WAAA;EACA,oBAAA;EACA,gBAAA;EACA,qBAAA;EACA,eAAA;EACA,UAAA;EACA,iCAAA;ClBi6ED;AkB95ED;EACE,sBAAA;EACA,gBAAA;EACA,mBAAA;EACA,kBAAA;ClBg6ED;AkBr5ED;Eb4BE,+BAAA;EACG,4BAAA;EACK,uBAAA;CL43ET;AkBr5ED;;EAEE,gBAAA;EACA,mBAAA;EACA,oBAAA;ClBu5ED;AkBp5ED;EACE,eAAA;ClBs5ED;AkBl5ED;EACE,eAAA;EACA,YAAA;ClBo5ED;AkBh5ED;;EAEE,aAAA;ClBk5ED;AkB94ED;;;EZrEE,2CAAA;EACA,qBAAA;CNw9ED;AkB74ED;EACE,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,wBAAA;EACA,eAAA;ClB+4ED;AkBr3ED;EACE,eAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,wBAAA;EACA,eAAA;EACA,uBAAA;EACA,uBAAA;EACA,uBAAA;EACA,mBAAA;EbxDA,yDAAA;EACQ,iDAAA;EAyHR,uFAAA;EACK,0EAAA;EACG,uEAAA;CLwzET;AmBh8EC;EACE,sBAAA;EACA,WAAA;EdUF,uFAAA;EACQ,+EAAA;CLy7ET;AKx5EC;EACE,YAAA;EACA,WAAA;CL05EH;AKx5EC;EAA0B,YAAA;CL25E3B;AK15EC;EAAgC,YAAA;CL65EjC;AkBj4EC;EACE,UAAA;EACA,8BAAA;ClBm4EH;AkB33EC;;;EAGE,0BAAA;EACA,WAAA;ClB63EH;AkB13EC;;EAEE,oBAAA;ClB43EH;AkBx3EC;EACE,aAAA;ClB03EH;AkB92ED;EACE,yBAAA;ClBg3ED;AkBx0ED;EAtBI;;;;IACE,kBAAA;GlBo2EH;EkBj2EC;;;;;;;;IAEE,kBAAA;GlBy2EH;EkBt2EC;;;;;;;;IAEE,kBAAA;GlB82EH;CACF;AkBp2ED;EACE,oBAAA;ClBs2ED;AkB91ED;;EAEE,mBAAA;EACA,eAAA;EACA,iBAAA;EACA,oBAAA;ClBg2ED;AkBr2ED;;EAQI,iBAAA;EACA,mBAAA;EACA,iBAAA;EACA,oBAAA;EACA,gBAAA;ClBi2EH;AkB91ED;;;;EAIE,mBAAA;EACA,mBAAA;EACA,mBAAA;ClBg2ED;AkB71ED;;EAEE,iBAAA;ClB+1ED;AkB31ED;;EAEE,mBAAA;EACA,sBAAA;EACA,mBAAA;EACA,iBAAA;EACA,uBAAA;EACA,oBAAA;EACA,gBAAA;ClB61ED;AkB31ED;;EAEE,cAAA;EACA,kBAAA;ClB61ED;AkBp1EC;;;;;;EAGE,oBAAA;ClBy1EH;AkBn1EC;;;;EAEE,oBAAA;ClBu1EH;AkBj1EC;;;;EAGI,oBAAA;ClBo1EL;AkBz0ED;EAEE,iBAAA;EACA,oBAAA;EAEA,iBAAA;EACA,iBAAA;ClBy0ED;AkBv0EC;;EAEE,gBAAA;EACA,iBAAA;ClBy0EH;AkB5zED;ECnQE,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;CnBkkFD;AmBhkFC;EACE,aAAA;EACA,kBAAA;CnBkkFH;AmB/jFC;;EAEE,aAAA;CnBikFH;AkBx0ED;EAEI,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;ClBy0EH;AkB/0ED;EASI,aAAA;EACA,kBAAA;ClBy0EH;AkBn1ED;;EAcI,aAAA;ClBy0EH;AkBv1ED;EAiBI,aAAA;EACA,iBAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;ClBy0EH;AkBr0ED;EC/RE,aAAA;EACA,mBAAA;EACA,gBAAA;EACA,uBAAA;EACA,mBAAA;CnBumFD;AmBrmFC;EACE,aAAA;EACA,kBAAA;CnBumFH;AmBpmFC;;EAEE,aAAA;CnBsmFH;AkBj1ED;EAEI,aAAA;EACA,mBAAA;EACA,gBAAA;EACA,uBAAA;EACA,mBAAA;ClBk1EH;AkBx1ED;EASI,aAAA;EACA,kBAAA;ClBk1EH;AkB51ED;;EAcI,aAAA;ClBk1EH;AkBh2ED;EAiBI,aAAA;EACA,iBAAA;EACA,mBAAA;EACA,gBAAA;EACA,uBAAA;ClBk1EH;AkBz0ED;EAEE,mBAAA;ClB00ED;AkB50ED;EAMI,sBAAA;ClBy0EH;AkBr0ED;EACE,mBAAA;EACA,OAAA;EACA,SAAA;EACA,WAAA;EACA,eAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,mBAAA;EACA,qBAAA;ClBu0ED;AkBr0ED;;;EAGE,YAAA;EACA,aAAA;EACA,kBAAA;ClBu0ED;AkBr0ED;;;EAGE,YAAA;EACA,aAAA;EACA,kBAAA;ClBu0ED;AkBn0ED;;;;;;;;;;EC1ZI,eAAA;CnByuFH;AkB/0ED;ECtZI,sBAAA;Ed+CF,yDAAA;EACQ,iDAAA;CL0rFT;AmBxuFG;EACE,sBAAA;Ed4CJ,0EAAA;EACQ,kEAAA;CL+rFT;AkBz1ED;EC5YI,eAAA;EACA,sBAAA;EACA,0BAAA;CnBwuFH;AkB91ED;ECtYI,eAAA;CnBuuFH;AkB91ED;;;;;;;;;;EC7ZI,eAAA;CnBuwFH;AkB12ED;ECzZI,sBAAA;Ed+CF,yDAAA;EACQ,iDAAA;CLwtFT;AmBtwFG;EACE,sBAAA;Ed4CJ,0EAAA;EACQ,kEAAA;CL6tFT;AkBp3ED;EC/YI,eAAA;EACA,sBAAA;EACA,0BAAA;CnBswFH;AkBz3ED;ECzYI,eAAA;CnBqwFH;AkBz3ED;;;;;;;;;;EChaI,eAAA;CnBqyFH;AkBr4ED;EC5ZI,sBAAA;Ed+CF,yDAAA;EACQ,iDAAA;CLsvFT;AmBpyFG;EACE,sBAAA;Ed4CJ,0EAAA;EACQ,kEAAA;CL2vFT;AkB/4ED;EClZI,eAAA;EACA,sBAAA;EACA,0BAAA;CnBoyFH;AkBp5ED;EC5YI,eAAA;CnBmyFH;AkBh5EC;EACE,UAAA;ClBk5EH;AkBh5EC;EACE,OAAA;ClBk5EH;AkBx4ED;EACE,eAAA;EACA,gBAAA;EACA,oBAAA;EACA,eAAA;ClB04ED;AkBvzED;EAwEA;IAtIM,sBAAA;IACA,iBAAA;IACA,uBAAA;GlBy3EH;EkBrvEH;IA/HM,sBAAA;IACA,YAAA;IACA,uBAAA;GlBu3EH;EkB1vEH;IAxHM,sBAAA;GlBq3EH;EkB7vEH;IApHM,sBAAA;IACA,uBAAA;GlBo3EH;EkBjwEH;;;IA9GQ,YAAA;GlBo3EL;EkBtwEH;IAxGM,YAAA;GlBi3EH;EkBzwEH;IApGM,iBAAA;IACA,uBAAA;GlBg3EH;EkB7wEH;;IA5FM,sBAAA;IACA,cAAA;IACA,iBAAA;IACA,uBAAA;GlB62EH;EkBpxEH;;IAtFQ,gBAAA;GlB82EL;EkBxxEH;;IAjFM,mBAAA;IACA,eAAA;GlB62EH;EkB7xEH;IA3EM,OAAA;GlB22EH;CACF;AkBj2ED;;;;EASI,cAAA;EACA,iBAAA;EACA,iBAAA;ClB81EH;AkBz2ED;;EAiBI,iBAAA;ClB41EH;AkB72ED;EJthBE,mBAAA;EACA,oBAAA;Cds4FD;AkB10EC;EAyBF;IAnCM,kBAAA;IACA,iBAAA;IACA,iBAAA;GlBw1EH;CACF;AkBx3ED;EAwCI,YAAA;ClBm1EH;AkBr0EC;EAUF;IAdQ,kBAAA;IACA,gBAAA;GlB60EL;CACF;AkBn0EC;EAEF;IANQ,iBAAA;IACA,gBAAA;GlB20EL;CACF;AoBp6FD;EACE,sBAAA;EACA,iBAAA;EACA,oBAAA;EACA,mBAAA;EACA,uBAAA;EACA,+BAAA;MAAA,2BAAA;EACA,gBAAA;EACA,uBAAA;EACA,8BAAA;EACA,oBAAA;EC0CA,kBAAA;EACA,gBAAA;EACA,wBAAA;EACA,mBAAA;EhB+JA,0BAAA;EACG,uBAAA;EACC,sBAAA;EACI,kBAAA;CL+tFT;AoBv6FG;;;;;;EdnBF,2CAAA;EACA,qBAAA;CNk8FD;AoB16FC;;;EAGE,YAAA;EACA,sBAAA;CpB46FH;AoBz6FC;;EAEE,WAAA;EACA,uBAAA;Ef2BF,yDAAA;EACQ,iDAAA;CLi5FT;AoBz6FC;;;EAGE,oBAAA;EE7CF,cAAA;EAGA,0BAAA;EjB8DA,yBAAA;EACQ,iBAAA;CL05FT;AoBz6FG;;EAEE,qBAAA;CpB26FL;AoBl6FD;EC3DE,YAAA;EACA,uBAAA;EACA,mBAAA;CrBg+FD;AqB99FC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBg+FP;AqB99FC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBg+FP;AqB99FC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBg+FP;AqB99FG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBs+FT;AqBn+FC;;;EAGE,uBAAA;CrBq+FH;AqBh+FG;;;;;;;;;EAGE,uBAAA;EACI,mBAAA;CrBw+FT;AoBv9FD;ECZI,YAAA;EACA,uBAAA;CrBs+FH;AoBx9FD;EC9DE,YAAA;EACA,0BAAA;EACA,sBAAA;CrByhGD;AqBvhGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrByhGP;AqBvhGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrByhGP;AqBvhGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrByhGP;AqBvhGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB+hGT;AqB5hGC;;;EAGE,uBAAA;CrB8hGH;AqBzhGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrBiiGT;AoB7gGD;ECfI,eAAA;EACA,uBAAA;CrB+hGH;AoB7gGD;EClEE,YAAA;EACA,0BAAA;EACA,sBAAA;CrBklGD;AqBhlGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBklGP;AqBhlGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBklGP;AqBhlGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBklGP;AqBhlGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBwlGT;AqBrlGC;;;EAGE,uBAAA;CrBulGH;AqBllGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrB0lGT;AoBlkGD;ECnBI,eAAA;EACA,uBAAA;CrBwlGH;AoBlkGD;ECtEE,YAAA;EACA,0BAAA;EACA,sBAAA;CrB2oGD;AqBzoGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB2oGP;AqBzoGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB2oGP;AqBzoGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB2oGP;AqBzoGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBipGT;AqB9oGC;;;EAGE,uBAAA;CrBgpGH;AqB3oGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrBmpGT;AoBvnGD;ECvBI,eAAA;EACA,uBAAA;CrBipGH;AoBvnGD;EC1EE,YAAA;EACA,0BAAA;EACA,sBAAA;CrBosGD;AqBlsGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBosGP;AqBlsGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBosGP;AqBlsGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBosGP;AqBlsGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB0sGT;AqBvsGC;;;EAGE,uBAAA;CrBysGH;AqBpsGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrB4sGT;AoB5qGD;EC3BI,eAAA;EACA,uBAAA;CrB0sGH;AoB5qGD;EC9EE,YAAA;EACA,0BAAA;EACA,sBAAA;CrB6vGD;AqB3vGC;;EAEE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB6vGP;AqB3vGC;EACE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB6vGP;AqB3vGC;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrB6vGP;AqB3vGG;;;;;;;;;EAGE,YAAA;EACA,0BAAA;EACI,sBAAA;CrBmwGT;AqBhwGC;;;EAGE,uBAAA;CrBkwGH;AqB7vGG;;;;;;;;;EAGE,0BAAA;EACI,sBAAA;CrBqwGT;AoBjuGD;EC/BI,eAAA;EACA,uBAAA;CrBmwGH;AoB5tGD;EACE,eAAA;EACA,oBAAA;EACA,iBAAA;CpB8tGD;AoB5tGC;;;;;EAKE,8BAAA;EfnCF,yBAAA;EACQ,iBAAA;CLkwGT;AoB7tGC;;;;EAIE,0BAAA;CpB+tGH;AoB7tGC;;EAEE,eAAA;EACA,2BAAA;EACA,8BAAA;CpB+tGH;AoB3tGG;;;;EAEE,eAAA;EACA,sBAAA;CpB+tGL;AoBttGD;;ECxEE,mBAAA;EACA,gBAAA;EACA,uBAAA;EACA,mBAAA;CrBkyGD;AoBztGD;;EC5EE,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;CrByyGD;AoB5tGD;;EChFE,iBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;CrBgzGD;AoB3tGD;EACE,eAAA;EACA,YAAA;CpB6tGD;AoBztGD;EACE,gBAAA;CpB2tGD;AoBptGC;;;EACE,YAAA;CpBwtGH;AuBl3GD;EACE,WAAA;ElBoLA,yCAAA;EACK,oCAAA;EACG,iCAAA;CLisGT;AuBr3GC;EACE,WAAA;CvBu3GH;AuBn3GD;EACE,cAAA;CvBq3GD;AuBn3GC;EAAY,eAAA;CvBs3Gb;AuBr3GC;EAAY,mBAAA;CvBw3Gb;AuBv3GC;EAAY,yBAAA;CvB03Gb;AuBv3GD;EACE,mBAAA;EACA,UAAA;EACA,iBAAA;ElBuKA,gDAAA;EACQ,2CAAA;KAAA,wCAAA;EAOR,mCAAA;EACQ,8BAAA;KAAA,2BAAA;EAGR,yCAAA;EACQ,oCAAA;KAAA,iCAAA;CL2sGT;AwBr5GD;EACE,sBAAA;EACA,SAAA;EACA,UAAA;EACA,iBAAA;EACA,uBAAA;EACA,uBAAA;EACA,yBAAA;EACA,oCAAA;EACA,mCAAA;CxBu5GD;AwBn5GD;;EAEE,mBAAA;CxBq5GD;AwBj5GD;EACE,WAAA;CxBm5GD;AwB/4GD;EACE,mBAAA;EACA,UAAA;EACA,QAAA;EACA,cAAA;EACA,cAAA;EACA,YAAA;EACA,iBAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,iBAAA;EACA,uBAAA;EACA,uBAAA;EACA,sCAAA;EACA,mBAAA;EnBsBA,oDAAA;EACQ,4CAAA;EmBrBR,qCAAA;UAAA,6BAAA;CxBk5GD;AwB74GC;EACE,SAAA;EACA,WAAA;CxB+4GH;AwBx6GD;ECzBE,YAAA;EACA,cAAA;EACA,iBAAA;EACA,0BAAA;CzBo8GD;AwB96GD;EAmCI,eAAA;EACA,kBAAA;EACA,YAAA;EACA,oBAAA;EACA,wBAAA;EACA,eAAA;EACA,oBAAA;CxB84GH;AwBx4GC;;EAEE,sBAAA;EACA,eAAA;EACA,0BAAA;CxB04GH;AwBp4GC;;;EAGE,YAAA;EACA,sBAAA;EACA,WAAA;EACA,0BAAA;CxBs4GH;AwB73GC;;;EAGE,eAAA;CxB+3GH;AwB33GC;;EAEE,sBAAA;EACA,8BAAA;EACA,uBAAA;EE3GF,oEAAA;EF6GE,oBAAA;CxB63GH;AwBx3GD;EAGI,eAAA;CxBw3GH;AwB33GD;EAQI,WAAA;CxBs3GH;AwB92GD;EACE,WAAA;EACA,SAAA;CxBg3GD;AwBx2GD;EACE,QAAA;EACA,YAAA;CxB02GD;AwBt2GD;EACE,eAAA;EACA,kBAAA;EACA,gBAAA;EACA,wBAAA;EACA,eAAA;EACA,oBAAA;CxBw2GD;AwBp2GD;EACE,gBAAA;EACA,QAAA;EACA,SAAA;EACA,UAAA;EACA,OAAA;EACA,aAAA;CxBs2GD;AwBl2GD;EACE,SAAA;EACA,WAAA;CxBo2GD;AwB51GD;;EAII,cAAA;EACA,0BAAA;EACA,4BAAA;EACA,YAAA;CxB41GH;AwBn2GD;;EAWI,UAAA;EACA,aAAA;EACA,mBAAA;CxB41GH;AwBv0GD;EAXE;IApEA,WAAA;IACA,SAAA;GxB05GC;EwBv1GD;IA1DA,QAAA;IACA,YAAA;GxBo5GC;CACF;A2BpiHD;;EAEE,mBAAA;EACA,sBAAA;EACA,uBAAA;C3BsiHD;A2B1iHD;;EAMI,mBAAA;EACA,YAAA;C3BwiHH;A2BtiHG;;;;;;;;EAIE,WAAA;C3B4iHL;A2BtiHD;;;;EAKI,kBAAA;C3BuiHH;A2BliHD;EACE,kBAAA;C3BoiHD;A2BriHD;;;EAOI,YAAA;C3BmiHH;A2B1iHD;;;EAYI,iBAAA;C3BmiHH;A2B/hHD;EACE,iBAAA;C3BiiHD;A2B7hHD;EACE,eAAA;C3B+hHD;A2B9hHC;EClDA,8BAAA;EACG,2BAAA;C5BmlHJ;A2B7hHD;;EC/CE,6BAAA;EACG,0BAAA;C5BglHJ;A2B5hHD;EACE,YAAA;C3B8hHD;A2B5hHD;EACE,iBAAA;C3B8hHD;A2B5hHD;;ECnEE,8BAAA;EACG,2BAAA;C5BmmHJ;A2B3hHD;ECjEE,6BAAA;EACG,0BAAA;C5B+lHJ;A2B1hHD;;EAEE,WAAA;C3B4hHD;A2B3gHD;EACE,kBAAA;EACA,mBAAA;C3B6gHD;A2B3gHD;EACE,mBAAA;EACA,oBAAA;C3B6gHD;A2BxgHD;EtB/CE,yDAAA;EACQ,iDAAA;CL0jHT;A2BxgHC;EtBnDA,yBAAA;EACQ,iBAAA;CL8jHT;A2BrgHD;EACE,eAAA;C3BugHD;A2BpgHD;EACE,wBAAA;EACA,uBAAA;C3BsgHD;A2BngHD;EACE,wBAAA;C3BqgHD;A2B9/GD;;;EAII,eAAA;EACA,YAAA;EACA,YAAA;EACA,gBAAA;C3B+/GH;A2BtgHD;EAcM,YAAA;C3B2/GL;A2BzgHD;;;;EAsBI,iBAAA;EACA,eAAA;C3By/GH;A2Bp/GC;EACE,iBAAA;C3Bs/GH;A2Bp/GC;EC3KA,6BAAA;EACC,4BAAA;EAOD,8BAAA;EACC,6BAAA;C5B4pHF;A2Bt/GC;EC/KA,2BAAA;EACC,0BAAA;EAOD,gCAAA;EACC,+BAAA;C5BkqHF;A2Bv/GD;EACE,iBAAA;C3By/GD;A2Bv/GD;;EC/KE,8BAAA;EACC,6BAAA;C5B0qHF;A2Bt/GD;EC7LE,2BAAA;EACC,0BAAA;C5BsrHF;A2Bl/GD;EACE,eAAA;EACA,YAAA;EACA,oBAAA;EACA,0BAAA;C3Bo/GD;A2Bx/GD;;EAOI,YAAA;EACA,oBAAA;EACA,UAAA;C3Bq/GH;A2B9/GD;EAYI,YAAA;C3Bq/GH;A2BjgHD;EAgBI,WAAA;C3Bo/GH;A2Bn+GD;;;;EAKM,mBAAA;EACA,uBAAA;EACA,qBAAA;C3Bo+GL;A6B9sHD;EACE,mBAAA;EACA,eAAA;EACA,0BAAA;C7BgtHD;A6B7sHC;EACE,YAAA;EACA,gBAAA;EACA,iBAAA;C7B+sHH;A6BxtHD;EAeI,mBAAA;EACA,WAAA;EAKA,YAAA;EAEA,YAAA;EACA,iBAAA;C7BusHH;A6BrsHG;EACE,WAAA;C7BusHL;A6B7rHD;;;EV0BE,aAAA;EACA,mBAAA;EACA,gBAAA;EACA,uBAAA;EACA,mBAAA;CnBwqHD;AmBtqHC;;;EACE,aAAA;EACA,kBAAA;CnB0qHH;AmBvqHC;;;;;;EAEE,aAAA;CnB6qHH;A6B/sHD;;;EVqBE,aAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;CnB+rHD;AmB7rHC;;;EACE,aAAA;EACA,kBAAA;CnBisHH;AmB9rHC;;;;;;EAEE,aAAA;CnBosHH;A6B7tHD;;;EAGE,oBAAA;C7B+tHD;A6B7tHC;;;EACE,iBAAA;C7BiuHH;A6B7tHD;;EAEE,UAAA;EACA,oBAAA;EACA,uBAAA;C7B+tHD;A6B1tHD;EACE,kBAAA;EACA,gBAAA;EACA,oBAAA;EACA,eAAA;EACA,eAAA;EACA,mBAAA;EACA,0BAAA;EACA,uBAAA;EACA,mBAAA;C7B4tHD;A6BztHC;EACE,kBAAA;EACA,gBAAA;EACA,mBAAA;C7B2tHH;A6BztHC;EACE,mBAAA;EACA,gBAAA;EACA,mBAAA;C7B2tHH;A6B/uHD;;EA0BI,cAAA;C7BytHH;A6BptHD;;;;;;;EDpGE,8BAAA;EACG,2BAAA;C5Bi0HJ;A6BrtHD;EACE,gBAAA;C7ButHD;A6BrtHD;;;;;;;EDxGE,6BAAA;EACG,0BAAA;C5Bs0HJ;A6BttHD;EACE,eAAA;C7BwtHD;A6BntHD;EACE,mBAAA;EAGA,aAAA;EACA,oBAAA;C7BmtHD;A6BxtHD;EAUI,mBAAA;C7BitHH;A6B3tHD;EAYM,kBAAA;C7BktHL;A6B/sHG;;;EAGE,WAAA;C7BitHL;A6B5sHC;;EAGI,mBAAA;C7B6sHL;A6B1sHC;;EAGI,WAAA;EACA,kBAAA;C7B2sHL;A8B12HD;EACE,iBAAA;EACA,gBAAA;EACA,iBAAA;C9B42HD;A8B/2HD;EAOI,mBAAA;EACA,eAAA;C9B22HH;A8Bn3HD;EAWM,mBAAA;EACA,eAAA;EACA,mBAAA;C9B22HL;A8B12HK;;EAEE,sBAAA;EACA,0BAAA;C9B42HP;A8Bv2HG;EACE,eAAA;C9By2HL;A8Bv2HK;;EAEE,eAAA;EACA,sBAAA;EACA,8BAAA;EACA,oBAAA;C9By2HP;A8Bl2HG;;;EAGE,0BAAA;EACA,sBAAA;C9Bo2HL;A8B74HD;ELHE,YAAA;EACA,cAAA;EACA,iBAAA;EACA,0BAAA;CzBm5HD;A8Bn5HD;EA0DI,gBAAA;C9B41HH;A8Bn1HD;EACE,8BAAA;C9Bq1HD;A8Bt1HD;EAGI,YAAA;EAEA,oBAAA;C9Bq1HH;A8B11HD;EASM,kBAAA;EACA,wBAAA;EACA,8BAAA;EACA,2BAAA;C9Bo1HL;A8Bn1HK;EACE,mCAAA;C9Bq1HP;A8B/0HK;;;EAGE,eAAA;EACA,uBAAA;EACA,uBAAA;EACA,iCAAA;EACA,gBAAA;C9Bi1HP;A8B50HC;EAqDA,YAAA;EA8BA,iBAAA;C9B6vHD;A8Bh1HC;EAwDE,YAAA;C9B2xHH;A8Bn1HC;EA0DI,mBAAA;EACA,mBAAA;C9B4xHL;A8Bv1HC;EAgEE,UAAA;EACA,WAAA;C9B0xHH;A8B9wHD;EA0DA;IAjEM,oBAAA;IACA,UAAA;G9ByxHH;E8BztHH;IA9DQ,iBAAA;G9B0xHL;CACF;A8Bp2HC;EAuFE,gBAAA;EACA,mBAAA;C9BgxHH;A8Bx2HC;;;EA8FE,uBAAA;C9B+wHH;A8BjwHD;EA2BA;IApCM,8BAAA;IACA,2BAAA;G9B8wHH;E8B3uHH;;;IA9BM,0BAAA;G9B8wHH;CACF;A8B/2HD;EAEI,YAAA;C9Bg3HH;A8Bl3HD;EAMM,mBAAA;C9B+2HL;A8Br3HD;EASM,iBAAA;C9B+2HL;A8B12HK;;;EAGE,YAAA;EACA,0BAAA;C9B42HP;A8Bp2HD;EAEI,YAAA;C9Bq2HH;A8Bv2HD;EAIM,gBAAA;EACA,eAAA;C9Bs2HL;A8B11HD;EACE,YAAA;C9B41HD;A8B71HD;EAII,YAAA;C9B41HH;A8Bh2HD;EAMM,mBAAA;EACA,mBAAA;C9B61HL;A8Bp2HD;EAYI,UAAA;EACA,WAAA;C9B21HH;A8B/0HD;EA0DA;IAjEM,oBAAA;IACA,UAAA;G9B01HH;E8B1xHH;IA9DQ,iBAAA;G9B21HL;CACF;A8Bn1HD;EACE,iBAAA;C9Bq1HD;A8Bt1HD;EAKI,gBAAA;EACA,mBAAA;C9Bo1HH;A8B11HD;;;EAYI,uBAAA;C9Bm1HH;A8Br0HD;EA2BA;IApCM,8BAAA;IACA,2BAAA;G9Bk1HH;E8B/yHH;;;IA9BM,0BAAA;G9Bk1HH;CACF;A8Bz0HD;EAEI,cAAA;C9B00HH;A8B50HD;EAKI,eAAA;C9B00HH;A8Bj0HD;EAEE,iBAAA;EF3OA,2BAAA;EACC,0BAAA;C5B8iIF;A+BxiID;EACE,mBAAA;EACA,iBAAA;EACA,oBAAA;EACA,8BAAA;C/B0iID;A+BliID;EA8nBA;IAhoBI,mBAAA;G/BwiID;CACF;A+BzhID;EAgnBA;IAlnBI,YAAA;G/B+hID;CACF;A+BjhID;EACE,oBAAA;EACA,oBAAA;EACA,mBAAA;EACA,kCAAA;EACA,2DAAA;UAAA,mDAAA;EAEA,kCAAA;C/BkhID;A+BhhIC;EACE,iBAAA;C/BkhIH;A+Bt/HD;EA6jBA;IArlBI,YAAA;IACA,cAAA;IACA,yBAAA;YAAA,iBAAA;G/BkhID;E+BhhIC;IACE,0BAAA;IACA,wBAAA;IACA,kBAAA;IACA,6BAAA;G/BkhIH;E+B/gIC;IACE,oBAAA;G/BihIH;E+B5gIC;;;IAGE,gBAAA;IACA,iBAAA;G/B8gIH;CACF;A+B1gID;;EAGI,kBAAA;C/B2gIH;A+BtgIC;EAmjBF;;IArjBM,kBAAA;G/B6gIH;CACF;A+BpgID;;;;EAII,oBAAA;EACA,mBAAA;C/BsgIH;A+BhgIC;EAgiBF;;;;IAniBM,gBAAA;IACA,eAAA;G/B0gIH;CACF;A+B9/HD;EACE,cAAA;EACA,sBAAA;C/BggID;A+B3/HD;EA8gBA;IAhhBI,iBAAA;G/BigID;CACF;A+B7/HD;;EAEE,gBAAA;EACA,SAAA;EACA,QAAA;EACA,cAAA;C/B+/HD;A+Bz/HD;EAggBA;;IAlgBI,iBAAA;G/BggID;CACF;A+B9/HD;EACE,OAAA;EACA,sBAAA;C/BggID;A+B9/HD;EACE,UAAA;EACA,iBAAA;EACA,sBAAA;C/BggID;A+B1/HD;EACE,YAAA;EACA,mBAAA;EACA,gBAAA;EACA,kBAAA;EACA,aAAA;C/B4/HD;A+B1/HC;;EAEE,sBAAA;C/B4/HH;A+BrgID;EAaI,eAAA;C/B2/HH;A+Bl/HD;EALI;;IAEE,mBAAA;G/B0/HH;CACF;A+Bh/HD;EACE,mBAAA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;EC9LA,gBAAA;EACA,mBAAA;ED+LA,8BAAA;EACA,uBAAA;EACA,8BAAA;EACA,mBAAA;C/Bm/HD;A+B/+HC;EACE,WAAA;C/Bi/HH;A+B//HD;EAmBI,eAAA;EACA,YAAA;EACA,YAAA;EACA,mBAAA;C/B++HH;A+BrgID;EAyBI,gBAAA;C/B++HH;A+Bz+HD;EAqbA;IAvbI,cAAA;G/B++HD;CACF;A+Bt+HD;EACE,oBAAA;C/Bw+HD;A+Bz+HD;EAII,kBAAA;EACA,qBAAA;EACA,kBAAA;C/Bw+HH;A+B58HC;EA2YF;IAjaM,iBAAA;IACA,YAAA;IACA,YAAA;IACA,cAAA;IACA,8BAAA;IACA,UAAA;IACA,yBAAA;YAAA,iBAAA;G/Bs+HH;E+B3kHH;;IAxZQ,2BAAA;G/Bu+HL;E+B/kHH;IArZQ,kBAAA;G/Bu+HL;E+Bt+HK;;IAEE,uBAAA;G/Bw+HP;CACF;A+Bt9HD;EA+XA;IA1YI,YAAA;IACA,UAAA;G/Bq+HD;E+B5lHH;IAtYM,YAAA;G/Bq+HH;E+B/lHH;IApYQ,kBAAA;IACA,qBAAA;G/Bs+HL;CACF;A+B39HD;EACE,mBAAA;EACA,oBAAA;EACA,mBAAA;EACA,kCAAA;EACA,qCAAA;E1B9NA,6FAAA;EACQ,qFAAA;E2B/DR,gBAAA;EACA,mBAAA;ChC4vID;AkBtuHD;EAwEA;IAtIM,sBAAA;IACA,iBAAA;IACA,uBAAA;GlBwyHH;EkBpqHH;IA/HM,sBAAA;IACA,YAAA;IACA,uBAAA;GlBsyHH;EkBzqHH;IAxHM,sBAAA;GlBoyHH;EkB5qHH;IApHM,sBAAA;IACA,uBAAA;GlBmyHH;EkBhrHH;;;IA9GQ,YAAA;GlBmyHL;EkBrrHH;IAxGM,YAAA;GlBgyHH;EkBxrHH;IApGM,iBAAA;IACA,uBAAA;GlB+xHH;EkB5rHH;;IA5FM,sBAAA;IACA,cAAA;IACA,iBAAA;IACA,uBAAA;GlB4xHH;EkBnsHH;;IAtFQ,gBAAA;GlB6xHL;EkBvsHH;;IAjFM,mBAAA;IACA,eAAA;GlB4xHH;EkB5sHH;IA3EM,OAAA;GlB0xHH;CACF;A+BpgIC;EAmWF;IAzWM,mBAAA;G/B8gIH;E+B5gIG;IACE,iBAAA;G/B8gIL;CACF;A+B7/HD;EAoVA;IA5VI,YAAA;IACA,UAAA;IACA,eAAA;IACA,gBAAA;IACA,eAAA;IACA,kBAAA;I1BzPF,yBAAA;IACQ,iBAAA;GLmwIP;CACF;A+BngID;EACE,cAAA;EHpUA,2BAAA;EACC,0BAAA;C5B00IF;A+BngID;EACE,iBAAA;EHzUA,6BAAA;EACC,4BAAA;EAOD,8BAAA;EACC,6BAAA;C5By0IF;A+B//HD;EChVE,gBAAA;EACA,mBAAA;ChCk1ID;A+BhgIC;ECnVA,iBAAA;EACA,oBAAA;ChCs1ID;A+BjgIC;ECtVA,iBAAA;EACA,oBAAA;ChC01ID;A+B3/HD;EChWE,iBAAA;EACA,oBAAA;ChC81ID;A+Bv/HD;EAsSA;IA1SI,YAAA;IACA,kBAAA;IACA,mBAAA;G/B+/HD;CACF;A+Bl+HD;EAhBE;IExWA,uBAAA;GjC81IC;E+Br/HD;IE5WA,wBAAA;IF8WE,oBAAA;G/Bu/HD;E+Bz/HD;IAKI,gBAAA;G/Bu/HH;CACF;A+B9+HD;EACE,0BAAA;EACA,sBAAA;C/Bg/HD;A+Bl/HD;EAKI,YAAA;C/Bg/HH;A+B/+HG;;EAEE,eAAA;EACA,8BAAA;C/Bi/HL;A+B1/HD;EAcI,YAAA;C/B++HH;A+B7/HD;EAmBM,YAAA;C/B6+HL;A+B3+HK;;EAEE,YAAA;EACA,8BAAA;C/B6+HP;A+Bz+HK;;;EAGE,YAAA;EACA,0BAAA;C/B2+HP;A+Bv+HK;;;EAGE,YAAA;EACA,8BAAA;C/By+HP;A+BjhID;EA8CI,mBAAA;C/Bs+HH;A+Br+HG;;EAEE,uBAAA;C/Bu+HL;A+BxhID;EAoDM,uBAAA;C/Bu+HL;A+B3hID;;EA0DI,sBAAA;C/Bq+HH;A+B99HK;;;EAGE,0BAAA;EACA,YAAA;C/Bg+HP;A+B/7HC;EAoKF;IA7LU,YAAA;G/B49HP;E+B39HO;;IAEE,YAAA;IACA,8BAAA;G/B69HT;E+Bz9HO;;;IAGE,YAAA;IACA,0BAAA;G/B29HT;E+Bv9HO;;;IAGE,YAAA;IACA,8BAAA;G/By9HT;CACF;A+B3jID;EA8GI,YAAA;C/Bg9HH;A+B/8HG;EACE,YAAA;C/Bi9HL;A+BjkID;EAqHI,YAAA;C/B+8HH;A+B98HG;;EAEE,YAAA;C/Bg9HL;A+B58HK;;;;EAEE,YAAA;C/Bg9HP;A+Bx8HD;EACE,uBAAA;EACA,sBAAA;C/B08HD;A+B58HD;EAKI,eAAA;C/B08HH;A+Bz8HG;;EAEE,YAAA;EACA,8BAAA;C/B28HL;A+Bp9HD;EAcI,eAAA;C/By8HH;A+Bv9HD;EAmBM,eAAA;C/Bu8HL;A+Br8HK;;EAEE,YAAA;EACA,8BAAA;C/Bu8HP;A+Bn8HK;;;EAGE,YAAA;EACA,0BAAA;C/Bq8HP;A+Bj8HK;;;EAGE,YAAA;EACA,8BAAA;C/Bm8HP;A+B3+HD;EA+CI,mBAAA;C/B+7HH;A+B97HG;;EAEE,uBAAA;C/Bg8HL;A+Bl/HD;EAqDM,uBAAA;C/Bg8HL;A+Br/HD;;EA2DI,sBAAA;C/B87HH;A+Bx7HK;;;EAGE,0BAAA;EACA,YAAA;C/B07HP;A+Bn5HC;EAwBF;IAvDU,sBAAA;G/Bs7HP;E+B/3HH;IApDU,0BAAA;G/Bs7HP;E+Bl4HH;IAjDU,eAAA;G/Bs7HP;E+Br7HO;;IAEE,YAAA;IACA,8BAAA;G/Bu7HT;E+Bn7HO;;;IAGE,YAAA;IACA,0BAAA;G/Bq7HT;E+Bj7HO;;;IAGE,YAAA;IACA,8BAAA;G/Bm7HT;CACF;A+B3hID;EA+GI,eAAA;C/B+6HH;A+B96HG;EACE,YAAA;C/Bg7HL;A+BjiID;EAsHI,eAAA;C/B86HH;A+B76HG;;EAEE,YAAA;C/B+6HL;A+B36HK;;;;EAEE,YAAA;C/B+6HP;AkCzjJD;EACE,kBAAA;EACA,oBAAA;EACA,iBAAA;EACA,0BAAA;EACA,mBAAA;ClC2jJD;AkChkJD;EAQI,sBAAA;ClC2jJH;AkCnkJD;EAWM,kBAAA;EACA,eAAA;EACA,YAAA;ClC2jJL;AkCxkJD;EAkBI,eAAA;ClCyjJH;AmC7kJD;EACE,sBAAA;EACA,gBAAA;EACA,eAAA;EACA,mBAAA;CnC+kJD;AmCnlJD;EAOI,gBAAA;CnC+kJH;AmCtlJD;;EAUM,mBAAA;EACA,YAAA;EACA,kBAAA;EACA,wBAAA;EACA,sBAAA;EACA,eAAA;EACA,uBAAA;EACA,uBAAA;EACA,kBAAA;CnCglJL;AmC9kJG;;EAGI,eAAA;EPXN,+BAAA;EACG,4BAAA;C5B2lJJ;AmC7kJG;;EPvBF,gCAAA;EACG,6BAAA;C5BwmJJ;AmCxkJG;;;;EAEE,WAAA;EACA,eAAA;EACA,0BAAA;EACA,mBAAA;CnC4kJL;AmCtkJG;;;;;;EAGE,WAAA;EACA,YAAA;EACA,0BAAA;EACA,sBAAA;EACA,gBAAA;CnC2kJL;AmCloJD;;;;;;EAkEM,eAAA;EACA,uBAAA;EACA,mBAAA;EACA,oBAAA;CnCwkJL;AmC/jJD;;EC3EM,mBAAA;EACA,gBAAA;EACA,uBAAA;CpC8oJL;AoC5oJG;;ERKF,+BAAA;EACG,4BAAA;C5B2oJJ;AoC3oJG;;ERTF,gCAAA;EACG,6BAAA;C5BwpJJ;AmC1kJD;;EChFM,kBAAA;EACA,gBAAA;EACA,iBAAA;CpC8pJL;AoC5pJG;;ERKF,+BAAA;EACG,4BAAA;C5B2pJJ;AoC3pJG;;ERTF,gCAAA;EACG,6BAAA;C5BwqJJ;AqC3qJD;EACE,gBAAA;EACA,eAAA;EACA,iBAAA;EACA,mBAAA;CrC6qJD;AqCjrJD;EAOI,gBAAA;CrC6qJH;AqCprJD;;EAUM,sBAAA;EACA,kBAAA;EACA,uBAAA;EACA,uBAAA;EACA,oBAAA;CrC8qJL;AqC5rJD;;EAmBM,sBAAA;EACA,0BAAA;CrC6qJL;AqCjsJD;;EA2BM,aAAA;CrC0qJL;AqCrsJD;;EAkCM,YAAA;CrCuqJL;AqCzsJD;;;;EA2CM,eAAA;EACA,uBAAA;EACA,oBAAA;CrCoqJL;AsCltJD;EACE,gBAAA;EACA,wBAAA;EACA,eAAA;EACA,kBAAA;EACA,eAAA;EACA,YAAA;EACA,mBAAA;EACA,oBAAA;EACA,yBAAA;EACA,qBAAA;CtCotJD;AsChtJG;;EAEE,YAAA;EACA,sBAAA;EACA,gBAAA;CtCktJL;AsC7sJC;EACE,cAAA;CtC+sJH;AsC3sJC;EACE,mBAAA;EACA,UAAA;CtC6sJH;AsCtsJD;ECtCE,0BAAA;CvC+uJD;AuC5uJG;;EAEE,0BAAA;CvC8uJL;AsCzsJD;EC1CE,0BAAA;CvCsvJD;AuCnvJG;;EAEE,0BAAA;CvCqvJL;AsC5sJD;EC9CE,0BAAA;CvC6vJD;AuC1vJG;;EAEE,0BAAA;CvC4vJL;AsC/sJD;EClDE,0BAAA;CvCowJD;AuCjwJG;;EAEE,0BAAA;CvCmwJL;AsCltJD;ECtDE,0BAAA;CvC2wJD;AuCxwJG;;EAEE,0BAAA;CvC0wJL;AsCrtJD;EC1DE,0BAAA;CvCkxJD;AuC/wJG;;EAEE,0BAAA;CvCixJL;AwCnxJD;EACE,sBAAA;EACA,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,kBAAA;EACA,YAAA;EACA,eAAA;EACA,uBAAA;EACA,oBAAA;EACA,mBAAA;EACA,0BAAA;EACA,oBAAA;CxCqxJD;AwClxJC;EACE,cAAA;CxCoxJH;AwChxJC;EACE,mBAAA;EACA,UAAA;CxCkxJH;AwC/wJC;;EAEE,OAAA;EACA,iBAAA;CxCixJH;AwC5wJG;;EAEE,YAAA;EACA,sBAAA;EACA,gBAAA;CxC8wJL;AwCzwJC;;EAEE,eAAA;EACA,uBAAA;CxC2wJH;AwCxwJC;EACE,aAAA;CxC0wJH;AwCvwJC;EACE,kBAAA;CxCywJH;AwCtwJC;EACE,iBAAA;CxCwwJH;AyCl0JD;EACE,kBAAA;EACA,qBAAA;EACA,oBAAA;EACA,eAAA;EACA,0BAAA;CzCo0JD;AyCz0JD;;EASI,eAAA;CzCo0JH;AyC70JD;EAaI,oBAAA;EACA,gBAAA;EACA,iBAAA;CzCm0JH;AyCl1JD;EAmBI,0BAAA;CzCk0JH;AyC/zJC;;EAEE,mBAAA;EACA,mBAAA;EACA,oBAAA;CzCi0JH;AyC31JD;EA8BI,gBAAA;CzCg0JH;AyC9yJD;EACA;IAfI,kBAAA;IACA,qBAAA;GzCg0JD;EyC9zJC;;IAEE,mBAAA;IACA,oBAAA;GzCg0JH;EyCvzJH;;IAJM,gBAAA;GzC+zJH;CACF;A0C52JD;EACE,eAAA;EACA,aAAA;EACA,oBAAA;EACA,wBAAA;EACA,uBAAA;EACA,uBAAA;EACA,mBAAA;ErCiLA,4CAAA;EACK,uCAAA;EACG,oCAAA;CL8rJT;A0Cx3JD;;EAaI,kBAAA;EACA,mBAAA;C1C+2JH;A0C32JC;;;EAGE,sBAAA;C1C62JH;A0Cl4JD;EA0BI,aAAA;EACA,eAAA;C1C22JH;A2Cp4JD;EACE,cAAA;EACA,oBAAA;EACA,8BAAA;EACA,mBAAA;C3Cs4JD;A2C14JD;EAQI,cAAA;EAEA,eAAA;C3Co4JH;A2C94JD;EAeI,kBAAA;C3Ck4JH;A2Cj5JD;;EAqBI,iBAAA;C3Cg4JH;A2Cr5JD;EAyBI,gBAAA;C3C+3JH;A2Cv3JD;;EAEE,oBAAA;C3Cy3JD;A2C33JD;;EAMI,mBAAA;EACA,UAAA;EACA,aAAA;EACA,eAAA;C3Cy3JH;A2Cj3JD;ECvDE,0BAAA;EACA,sBAAA;EACA,eAAA;C5C26JD;A2Ct3JD;EClDI,0BAAA;C5C26JH;A2Cz3JD;EC/CI,eAAA;C5C26JH;A2Cx3JD;EC3DE,0BAAA;EACA,sBAAA;EACA,eAAA;C5Cs7JD;A2C73JD;ECtDI,0BAAA;C5Cs7JH;A2Ch4JD;ECnDI,eAAA;C5Cs7JH;A2C/3JD;EC/DE,0BAAA;EACA,sBAAA;EACA,eAAA;C5Ci8JD;A2Cp4JD;EC1DI,0BAAA;C5Ci8JH;A2Cv4JD;ECvDI,eAAA;C5Ci8JH;A2Ct4JD;ECnEE,0BAAA;EACA,sBAAA;EACA,eAAA;C5C48JD;A2C34JD;EC9DI,0BAAA;C5C48JH;A2C94JD;EC3DI,eAAA;C5C48JH;A6C98JD;EACE;IAAQ,4BAAA;G7Ci9JP;E6Ch9JD;IAAQ,yBAAA;G7Cm9JP;CACF;A6Ch9JD;EACE;IAAQ,4BAAA;G7Cm9JP;E6Cl9JD;IAAQ,yBAAA;G7Cq9JP;CACF;A6Cx9JD;EACE;IAAQ,4BAAA;G7Cm9JP;E6Cl9JD;IAAQ,yBAAA;G7Cq9JP;CACF;A6C98JD;EACE,iBAAA;EACA,aAAA;EACA,oBAAA;EACA,0BAAA;EACA,mBAAA;ExCsCA,uDAAA;EACQ,+CAAA;CL26JT;A6C78JD;EACE,YAAA;EACA,UAAA;EACA,aAAA;EACA,gBAAA;EACA,kBAAA;EACA,YAAA;EACA,mBAAA;EACA,0BAAA;ExCyBA,uDAAA;EACQ,+CAAA;EAyHR,oCAAA;EACK,+BAAA;EACG,4BAAA;CL+zJT;A6C18JD;;ECCI,8MAAA;EACA,yMAAA;EACA,sMAAA;EDAF,mCAAA;UAAA,2BAAA;C7C88JD;A6Cv8JD;;ExC5CE,2DAAA;EACK,sDAAA;EACG,mDAAA;CLu/JT;A6Cp8JD;EErEE,0BAAA;C/C4gKD;A+CzgKC;EDgDE,8MAAA;EACA,yMAAA;EACA,sMAAA;C9C49JH;A6Cx8JD;EEzEE,0BAAA;C/CohKD;A+CjhKC;EDgDE,8MAAA;EACA,yMAAA;EACA,sMAAA;C9Co+JH;A6C58JD;EE7EE,0BAAA;C/C4hKD;A+CzhKC;EDgDE,8MAAA;EACA,yMAAA;EACA,sMAAA;C9C4+JH;A6Ch9JD;EEjFE,0BAAA;C/CoiKD;A+CjiKC;EDgDE,8MAAA;EACA,yMAAA;EACA,sMAAA;C9Co/JH;AgD5iKD;EAEE,iBAAA;ChD6iKD;AgD3iKC;EACE,cAAA;ChD6iKH;AgDziKD;;EAEE,QAAA;EACA,iBAAA;ChD2iKD;AgDxiKD;EACE,eAAA;ChD0iKD;AgDviKD;EACE,eAAA;ChDyiKD;AgDtiKC;EACE,gBAAA;ChDwiKH;AgDpiKD;;EAEE,mBAAA;ChDsiKD;AgDniKD;;EAEE,oBAAA;ChDqiKD;AgDliKD;;;EAGE,oBAAA;EACA,oBAAA;ChDoiKD;AgDjiKD;EACE,uBAAA;ChDmiKD;AgDhiKD;EACE,uBAAA;ChDkiKD;AgD9hKD;EACE,cAAA;EACA,mBAAA;ChDgiKD;AgD1hKD;EACE,gBAAA;EACA,iBAAA;ChD4hKD;AiDnlKD;EAEE,oBAAA;EACA,gBAAA;CjDolKD;AiD5kKD;EACE,mBAAA;EACA,eAAA;EACA,mBAAA;EAEA,oBAAA;EACA,uBAAA;EACA,uBAAA;CjD6kKD;AiD1kKC;ErB3BA,6BAAA;EACC,4BAAA;C5BwmKF;AiD3kKC;EACE,iBAAA;ErBvBF,gCAAA;EACC,+BAAA;C5BqmKF;AiDpkKD;;EAEE,YAAA;CjDskKD;AiDxkKD;;EAKI,YAAA;CjDukKH;AiDnkKC;;;;EAEE,sBAAA;EACA,YAAA;EACA,0BAAA;CjDukKH;AiDnkKD;EACE,YAAA;EACA,iBAAA;CjDqkKD;AiDhkKC;;;EAGE,0BAAA;EACA,eAAA;EACA,oBAAA;CjDkkKH;AiDvkKC;;;EASI,eAAA;CjDmkKL;AiD5kKC;;;EAYI,eAAA;CjDqkKL;AiDhkKC;;;EAGE,WAAA;EACA,YAAA;EACA,0BAAA;EACA,sBAAA;CjDkkKH;AiDxkKC;;;;;;;;;EAYI,eAAA;CjDukKL;AiDnlKC;;;EAeI,eAAA;CjDykKL;AkD3qKC;EACE,eAAA;EACA,0BAAA;ClD6qKH;AkD3qKG;;EAEE,eAAA;ClD6qKL;AkD/qKG;;EAKI,eAAA;ClD8qKP;AkD3qKK;;;;EAEE,eAAA;EACA,0BAAA;ClD+qKP;AkD7qKK;;;;;;EAGE,YAAA;EACA,0BAAA;EACA,sBAAA;ClDkrKP;AkDxsKC;EACE,eAAA;EACA,0BAAA;ClD0sKH;AkDxsKG;;EAEE,eAAA;ClD0sKL;AkD5sKG;;EAKI,eAAA;ClD2sKP;AkDxsKK;;;;EAEE,eAAA;EACA,0BAAA;ClD4sKP;AkD1sKK;;;;;;EAGE,YAAA;EACA,0BAAA;EACA,sBAAA;ClD+sKP;AkDruKC;EACE,eAAA;EACA,0BAAA;ClDuuKH;AkDruKG;;EAEE,eAAA;ClDuuKL;AkDzuKG;;EAKI,eAAA;ClDwuKP;AkDruKK;;;;EAEE,eAAA;EACA,0BAAA;ClDyuKP;AkDvuKK;;;;;;EAGE,YAAA;EACA,0BAAA;EACA,sBAAA;ClD4uKP;AkDlwKC;EACE,eAAA;EACA,0BAAA;ClDowKH;AkDlwKG;;EAEE,eAAA;ClDowKL;AkDtwKG;;EAKI,eAAA;ClDqwKP;AkDlwKK;;;;EAEE,eAAA;EACA,0BAAA;ClDswKP;AkDpwKK;;;;;;EAGE,YAAA;EACA,0BAAA;EACA,sBAAA;ClDywKP;AiDxqKD;EACE,cAAA;EACA,mBAAA;CjD0qKD;AiDxqKD;EACE,iBAAA;EACA,iBAAA;CjD0qKD;AmDpyKD;EACE,oBAAA;EACA,uBAAA;EACA,8BAAA;EACA,mBAAA;E9C0DA,kDAAA;EACQ,0CAAA;CL6uKT;AmDnyKD;EACE,cAAA;CnDqyKD;AmDhyKD;EACE,mBAAA;EACA,qCAAA;EvBpBA,6BAAA;EACC,4BAAA;C5BuzKF;AmDtyKD;EAMI,eAAA;CnDmyKH;AmD9xKD;EACE,cAAA;EACA,iBAAA;EACA,gBAAA;EACA,eAAA;CnDgyKD;AmDpyKD;;;;;EAWI,eAAA;CnDgyKH;AmD3xKD;EACE,mBAAA;EACA,0BAAA;EACA,2BAAA;EvBxCA,gCAAA;EACC,+BAAA;C5Bs0KF;AmDrxKD;;EAGI,iBAAA;CnDsxKH;AmDzxKD;;EAMM,oBAAA;EACA,iBAAA;CnDuxKL;AmDnxKG;;EAEI,cAAA;EvBvEN,6BAAA;EACC,4BAAA;C5B61KF;AmDjxKG;;EAEI,iBAAA;EvBvEN,gCAAA;EACC,+BAAA;C5B21KF;AmD1yKD;EvB1DE,2BAAA;EACC,0BAAA;C5Bu2KF;AmD7wKD;EAEI,oBAAA;CnD8wKH;AmD3wKD;EACE,oBAAA;CnD6wKD;AmDrwKD;;;EAII,iBAAA;CnDswKH;AmD1wKD;;;EAOM,mBAAA;EACA,oBAAA;CnDwwKL;AmDhxKD;;EvBzGE,6BAAA;EACC,4BAAA;C5B63KF;AmDrxKD;;;;EAmBQ,4BAAA;EACA,6BAAA;CnDwwKP;AmD5xKD;;;;;;;;EAwBU,4BAAA;CnD8wKT;AmDtyKD;;;;;;;;EA4BU,6BAAA;CnDoxKT;AmDhzKD;;EvBjGE,gCAAA;EACC,+BAAA;C5Bq5KF;AmDrzKD;;;;EAyCQ,+BAAA;EACA,gCAAA;CnDkxKP;AmD5zKD;;;;;;;;EA8CU,+BAAA;CnDwxKT;AmDt0KD;;;;;;;;EAkDU,gCAAA;CnD8xKT;AmDh1KD;;;;EA2DI,2BAAA;CnD2xKH;AmDt1KD;;EA+DI,cAAA;CnD2xKH;AmD11KD;;EAmEI,UAAA;CnD2xKH;AmD91KD;;;;;;;;;;;;EA0EU,eAAA;CnDkyKT;AmD52KD;;;;;;;;;;;;EA8EU,gBAAA;CnD4yKT;AmD13KD;;;;;;;;EAuFU,iBAAA;CnD6yKT;AmDp4KD;;;;;;;;EAgGU,iBAAA;CnD8yKT;AmD94KD;EAsGI,UAAA;EACA,iBAAA;CnD2yKH;AmDjyKD;EACE,oBAAA;CnDmyKD;AmDpyKD;EAKI,iBAAA;EACA,mBAAA;CnDkyKH;AmDxyKD;EASM,gBAAA;CnDkyKL;AmD3yKD;EAcI,iBAAA;CnDgyKH;AmD9yKD;;EAkBM,2BAAA;CnDgyKL;AmDlzKD;EAuBI,cAAA;CnD8xKH;AmDrzKD;EAyBM,8BAAA;CnD+xKL;AmDxxKD;EC1PE,mBAAA;CpDqhLD;AoDnhLC;EACE,eAAA;EACA,0BAAA;EACA,mBAAA;CpDqhLH;AoDxhLC;EAMI,uBAAA;CpDqhLL;AoD3hLC;EASI,eAAA;EACA,0BAAA;CpDqhLL;AoDlhLC;EAEI,0BAAA;CpDmhLL;AmDvyKD;EC7PE,sBAAA;CpDuiLD;AoDriLC;EACE,YAAA;EACA,0BAAA;EACA,sBAAA;CpDuiLH;AoD1iLC;EAMI,0BAAA;CpDuiLL;AoD7iLC;EASI,eAAA;EACA,uBAAA;CpDuiLL;AoDpiLC;EAEI,6BAAA;CpDqiLL;AmDtzKD;EChQE,sBAAA;CpDyjLD;AoDvjLC;EACE,eAAA;EACA,0BAAA;EACA,sBAAA;CpDyjLH;AoD5jLC;EAMI,0BAAA;CpDyjLL;AoD/jLC;EASI,eAAA;EACA,0BAAA;CpDyjLL;AoDtjLC;EAEI,6BAAA;CpDujLL;AmDr0KD;ECnQE,sBAAA;CpD2kLD;AoDzkLC;EACE,eAAA;EACA,0BAAA;EACA,sBAAA;CpD2kLH;AoD9kLC;EAMI,0BAAA;CpD2kLL;AoDjlLC;EASI,eAAA;EACA,0BAAA;CpD2kLL;AoDxkLC;EAEI,6BAAA;CpDykLL;AmDp1KD;ECtQE,sBAAA;CpD6lLD;AoD3lLC;EACE,eAAA;EACA,0BAAA;EACA,sBAAA;CpD6lLH;AoDhmLC;EAMI,0BAAA;CpD6lLL;AoDnmLC;EASI,eAAA;EACA,0BAAA;CpD6lLL;AoD1lLC;EAEI,6BAAA;CpD2lLL;AmDn2KD;ECzQE,sBAAA;CpD+mLD;AoD7mLC;EACE,eAAA;EACA,0BAAA;EACA,sBAAA;CpD+mLH;AoDlnLC;EAMI,0BAAA;CpD+mLL;AoDrnLC;EASI,eAAA;EACA,0BAAA;CpD+mLL;AoD5mLC;EAEI,6BAAA;CpD6mLL;AqD7nLD;EACE,mBAAA;EACA,eAAA;EACA,UAAA;EACA,WAAA;EACA,iBAAA;CrD+nLD;AqDpoLD;;;;;EAYI,mBAAA;EACA,OAAA;EACA,QAAA;EACA,UAAA;EACA,aAAA;EACA,YAAA;EACA,UAAA;CrD+nLH;AqD1nLD;EACE,uBAAA;CrD4nLD;AqDxnLD;EACE,oBAAA;CrD0nLD;AsDrpLD;EACE,iBAAA;EACA,cAAA;EACA,oBAAA;EACA,0BAAA;EACA,0BAAA;EACA,mBAAA;EjDwDA,wDAAA;EACQ,gDAAA;CLgmLT;AsD/pLD;EASI,mBAAA;EACA,kCAAA;CtDypLH;AsDppLD;EACE,cAAA;EACA,mBAAA;CtDspLD;AsDppLD;EACE,aAAA;EACA,mBAAA;CtDspLD;AuD5qLD;EACE,aAAA;EACA,gBAAA;EACA,kBAAA;EACA,eAAA;EACA,YAAA;EACA,0BAAA;EjCRA,aAAA;EAGA,0BAAA;CtBqrLD;AuD7qLC;;EAEE,YAAA;EACA,sBAAA;EACA,gBAAA;EjCfF,aAAA;EAGA,0BAAA;CtB6rLD;AuDzqLC;EACE,WAAA;EACA,gBAAA;EACA,wBAAA;EACA,UAAA;EACA,yBAAA;CvD2qLH;AwDhsLD;EACE,iBAAA;CxDksLD;AwD9rLD;EACE,cAAA;EACA,iBAAA;EACA,gBAAA;EACA,OAAA;EACA,SAAA;EACA,UAAA;EACA,QAAA;EACA,cAAA;EACA,kCAAA;EAIA,WAAA;CxD6rLD;AwD1rLC;EnD+GA,sCAAA;EACI,kCAAA;EACC,iCAAA;EACG,8BAAA;EAkER,oDAAA;EAEK,0CAAA;EACG,oCAAA;CL6gLT;AwDhsLC;EnD2GA,mCAAA;EACI,+BAAA;EACC,8BAAA;EACG,2BAAA;CLwlLT;AwDpsLD;EACE,mBAAA;EACA,iBAAA;CxDssLD;AwDlsLD;EACE,mBAAA;EACA,YAAA;EACA,aAAA;CxDosLD;AwDhsLD;EACE,mBAAA;EACA,uBAAA;EACA,uBAAA;EACA,qCAAA;EACA,mBAAA;EnDaA,iDAAA;EACQ,yCAAA;EmDZR,qCAAA;UAAA,6BAAA;EAEA,WAAA;CxDksLD;AwD9rLD;EACE,gBAAA;EACA,OAAA;EACA,SAAA;EACA,UAAA;EACA,QAAA;EACA,cAAA;EACA,uBAAA;CxDgsLD;AwD9rLC;ElCrEA,WAAA;EAGA,yBAAA;CtBowLD;AwDjsLC;ElCtEA,aAAA;EAGA,0BAAA;CtBwwLD;AwDhsLD;EACE,cAAA;EACA,iCAAA;CxDksLD;AwD9rLD;EACE,iBAAA;CxDgsLD;AwD5rLD;EACE,UAAA;EACA,wBAAA;CxD8rLD;AwDzrLD;EACE,mBAAA;EACA,cAAA;CxD2rLD;AwDvrLD;EACE,cAAA;EACA,kBAAA;EACA,8BAAA;CxDyrLD;AwD5rLD;EAQI,iBAAA;EACA,iBAAA;CxDurLH;AwDhsLD;EAaI,kBAAA;CxDsrLH;AwDnsLD;EAiBI,eAAA;CxDqrLH;AwDhrLD;EACE,mBAAA;EACA,aAAA;EACA,YAAA;EACA,aAAA;EACA,iBAAA;CxDkrLD;AwDhqLD;EAZE;IACE,aAAA;IACA,kBAAA;GxD+qLD;EwD7qLD;InDvEA,kDAAA;IACQ,0CAAA;GLuvLP;EwD5qLD;IAAY,aAAA;GxD+qLX;CACF;AwD1qLD;EAFE;IAAY,aAAA;GxDgrLX;CACF;AyD/zLD;EACE,mBAAA;EACA,cAAA;EACA,eAAA;ECRA,4DAAA;EAEA,mBAAA;EACA,oBAAA;EACA,uBAAA;EACA,iBAAA;EACA,wBAAA;EACA,iBAAA;EACA,kBAAA;EACA,sBAAA;EACA,kBAAA;EACA,qBAAA;EACA,oBAAA;EACA,mBAAA;EACA,qBAAA;EACA,kBAAA;EDHA,gBAAA;EnCVA,WAAA;EAGA,yBAAA;CtBs1LD;AyD30LC;EnCdA,aAAA;EAGA,0BAAA;CtB01LD;AyD90LC;EAAW,iBAAA;EAAmB,eAAA;CzDk1L/B;AyDj1LC;EAAW,iBAAA;EAAmB,eAAA;CzDq1L/B;AyDp1LC;EAAW,gBAAA;EAAmB,eAAA;CzDw1L/B;AyDv1LC;EAAW,kBAAA;EAAmB,eAAA;CzD21L/B;AyDv1LD;EACE,iBAAA;EACA,iBAAA;EACA,YAAA;EACA,mBAAA;EACA,uBAAA;EACA,mBAAA;CzDy1LD;AyDr1LD;EACE,mBAAA;EACA,SAAA;EACA,UAAA;EACA,0BAAA;EACA,oBAAA;CzDu1LD;AyDn1LC;EACE,UAAA;EACA,UAAA;EACA,kBAAA;EACA,wBAAA;EACA,uBAAA;CzDq1LH;AyDn1LC;EACE,UAAA;EACA,WAAA;EACA,oBAAA;EACA,wBAAA;EACA,uBAAA;CzDq1LH;AyDn1LC;EACE,UAAA;EACA,UAAA;EACA,oBAAA;EACA,wBAAA;EACA,uBAAA;CzDq1LH;AyDn1LC;EACE,SAAA;EACA,QAAA;EACA,iBAAA;EACA,4BAAA;EACA,yBAAA;CzDq1LH;AyDn1LC;EACE,SAAA;EACA,SAAA;EACA,iBAAA;EACA,4BAAA;EACA,wBAAA;CzDq1LH;AyDn1LC;EACE,OAAA;EACA,UAAA;EACA,kBAAA;EACA,wBAAA;EACA,0BAAA;CzDq1LH;AyDn1LC;EACE,OAAA;EACA,WAAA;EACA,iBAAA;EACA,wBAAA;EACA,0BAAA;CzDq1LH;AyDn1LC;EACE,OAAA;EACA,UAAA;EACA,iBAAA;EACA,wBAAA;EACA,0BAAA;CzDq1LH;A2Dl7LD;EACE,mBAAA;EACA,OAAA;EACA,QAAA;EACA,cAAA;EACA,cAAA;EACA,iBAAA;EACA,aAAA;EDXA,4DAAA;EAEA,mBAAA;EACA,oBAAA;EACA,uBAAA;EACA,iBAAA;EACA,wBAAA;EACA,iBAAA;EACA,kBAAA;EACA,sBAAA;EACA,kBAAA;EACA,qBAAA;EACA,oBAAA;EACA,mBAAA;EACA,qBAAA;EACA,kBAAA;ECAA,gBAAA;EAEA,uBAAA;EACA,qCAAA;UAAA,6BAAA;EACA,uBAAA;EACA,qCAAA;EACA,mBAAA;EtD8CA,kDAAA;EACQ,0CAAA;CLk5LT;A2D77LC;EAAY,kBAAA;C3Dg8Lb;A2D/7LC;EAAY,kBAAA;C3Dk8Lb;A2Dj8LC;EAAY,iBAAA;C3Do8Lb;A2Dn8LC;EAAY,mBAAA;C3Ds8Lb;A2Dn8LD;EACE,UAAA;EACA,kBAAA;EACA,gBAAA;EACA,0BAAA;EACA,iCAAA;EACA,2BAAA;C3Dq8LD;A2Dl8LD;EACE,kBAAA;C3Do8LD;A2D57LC;;EAEE,mBAAA;EACA,eAAA;EACA,SAAA;EACA,UAAA;EACA,0BAAA;EACA,oBAAA;C3D87LH;A2D37LD;EACE,mBAAA;C3D67LD;A2D37LD;EACE,mBAAA;EACA,YAAA;C3D67LD;A2Dz7LC;EACE,UAAA;EACA,mBAAA;EACA,uBAAA;EACA,0BAAA;EACA,sCAAA;EACA,cAAA;C3D27LH;A2D17LG;EACE,aAAA;EACA,YAAA;EACA,mBAAA;EACA,uBAAA;EACA,uBAAA;C3D47LL;A2Dz7LC;EACE,SAAA;EACA,YAAA;EACA,kBAAA;EACA,qBAAA;EACA,4BAAA;EACA,wCAAA;C3D27LH;A2D17LG;EACE,aAAA;EACA,UAAA;EACA,cAAA;EACA,qBAAA;EACA,yBAAA;C3D47LL;A2Dz7LC;EACE,UAAA;EACA,mBAAA;EACA,oBAAA;EACA,6BAAA;EACA,yCAAA;EACA,WAAA;C3D27LH;A2D17LG;EACE,aAAA;EACA,SAAA;EACA,mBAAA;EACA,oBAAA;EACA,0BAAA;C3D47LL;A2Dx7LC;EACE,SAAA;EACA,aAAA;EACA,kBAAA;EACA,sBAAA;EACA,2BAAA;EACA,uCAAA;C3D07LH;A2Dz7LG;EACE,aAAA;EACA,WAAA;EACA,sBAAA;EACA,wBAAA;EACA,cAAA;C3D27LL;A4DpjMD;EACE,mBAAA;C5DsjMD;A4DnjMD;EACE,mBAAA;EACA,iBAAA;EACA,YAAA;C5DqjMD;A4DxjMD;EAMI,cAAA;EACA,mBAAA;EvD6KF,0CAAA;EACK,qCAAA;EACG,kCAAA;CLy4LT;A4D/jMD;;EAcM,eAAA;C5DqjML;A4D3hMC;EA4NF;IvD3DE,uDAAA;IAEK,6CAAA;IACG,uCAAA;IA7JR,oCAAA;IAEQ,4BAAA;IA+GR,4BAAA;IAEQ,oBAAA;GL86LP;E4DzjMG;;IvDmHJ,2CAAA;IACQ,mCAAA;IuDjHF,QAAA;G5D4jML;E4D1jMG;;IvD8GJ,4CAAA;IACQ,oCAAA;IuD5GF,QAAA;G5D6jML;E4D3jMG;;;IvDyGJ,wCAAA;IACQ,gCAAA;IuDtGF,QAAA;G5D8jML;CACF;A4DpmMD;;;EA6CI,eAAA;C5D4jMH;A4DzmMD;EAiDI,QAAA;C5D2jMH;A4D5mMD;;EAsDI,mBAAA;EACA,OAAA;EACA,YAAA;C5D0jMH;A4DlnMD;EA4DI,WAAA;C5DyjMH;A4DrnMD;EA+DI,YAAA;C5DyjMH;A4DxnMD;;EAmEI,QAAA;C5DyjMH;A4D5nMD;EAuEI,YAAA;C5DwjMH;A4D/nMD;EA0EI,WAAA;C5DwjMH;A4DhjMD;EACE,mBAAA;EACA,OAAA;EACA,QAAA;EACA,UAAA;EACA,WAAA;EtC9FA,aAAA;EAGA,0BAAA;EsC6FA,gBAAA;EACA,YAAA;EACA,mBAAA;EACA,0CAAA;EACA,mCAAA;C5DmjMD;A4D9iMC;EdnGE,mGAAA;EACA,8FAAA;EACA,qHAAA;EAAA,+FAAA;EACA,4BAAA;EACA,uHAAA;C9CopMH;A4DljMC;EACE,WAAA;EACA,SAAA;EdxGA,mGAAA;EACA,8FAAA;EACA,qHAAA;EAAA,+FAAA;EACA,4BAAA;EACA,uHAAA;C9C6pMH;A4DpjMC;;EAEE,WAAA;EACA,YAAA;EACA,sBAAA;EtCvHF,aAAA;EAGA,0BAAA;CtB4qMD;A4DtlMD;;;;EAuCI,mBAAA;EACA,SAAA;EACA,kBAAA;EACA,WAAA;EACA,sBAAA;C5DqjMH;A4DhmMD;;EA+CI,UAAA;EACA,mBAAA;C5DqjMH;A4DrmMD;;EAoDI,WAAA;EACA,oBAAA;C5DqjMH;A4D1mMD;;EAyDI,YAAA;EACA,aAAA;EACA,eAAA;EACA,mBAAA;C5DqjMH;A4DhjMG;EACE,iBAAA;C5DkjML;A4D9iMG;EACE,iBAAA;C5DgjML;A4DtiMD;EACE,mBAAA;EACA,aAAA;EACA,UAAA;EACA,YAAA;EACA,WAAA;EACA,kBAAA;EACA,gBAAA;EACA,iBAAA;EACA,mBAAA;C5DwiMD;A4DjjMD;EAYI,sBAAA;EACA,YAAA;EACA,aAAA;EACA,YAAA;EACA,oBAAA;EACA,uBAAA;EACA,oBAAA;EACA,gBAAA;EAWA,0BAAA;EACA,mCAAA;C5D8hMH;A4D7jMD;EAkCI,UAAA;EACA,YAAA;EACA,aAAA;EACA,uBAAA;C5D8hMH;A4DvhMD;EACE,mBAAA;EACA,UAAA;EACA,WAAA;EACA,aAAA;EACA,YAAA;EACA,kBAAA;EACA,qBAAA;EACA,YAAA;EACA,mBAAA;EACA,0CAAA;C5DyhMD;A4DxhMC;EACE,kBAAA;C5D0hMH;A4Dj/LD;EAhCE;;;;IAKI,YAAA;IACA,aAAA;IACA,kBAAA;IACA,gBAAA;G5DmhMH;E4D3hMD;;IAYI,mBAAA;G5DmhMH;E4D/hMD;;IAgBI,oBAAA;G5DmhMH;E4D9gMD;IACE,UAAA;IACA,WAAA;IACA,qBAAA;G5DghMD;E4D5gMD;IACE,aAAA;G5D8gMD;CACF;A6D7wMC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEE,aAAA;EACA,eAAA;C7D6yMH;A6D3yMC;;;;;;;;;;;;;;;;EACE,YAAA;C7D4zMH;AiCp0MD;E6BRE,eAAA;EACA,kBAAA;EACA,mBAAA;C9D+0MD;AiCt0MD;EACE,wBAAA;CjCw0MD;AiCt0MD;EACE,uBAAA;CjCw0MD;AiCh0MD;EACE,yBAAA;CjCk0MD;AiCh0MD;EACE,0BAAA;CjCk0MD;AiCh0MD;EACE,mBAAA;CjCk0MD;AiCh0MD;E8BzBE,YAAA;EACA,mBAAA;EACA,kBAAA;EACA,8BAAA;EACA,UAAA;C/D41MD;AiC9zMD;EACE,yBAAA;CjCg0MD;AiCzzMD;EACE,gBAAA;CjC2zMD;AgE51MD;EACE,oBAAA;ChE81MD;AgEx1MD;;;;ECdE,yBAAA;CjE42MD;AgEv1MD;;;;;;;;;;;;EAYE,yBAAA;ChEy1MD;AgEl1MD;EA6IA;IC7LE,0BAAA;GjEs4MC;EiEr4MD;IAAU,0BAAA;GjEw4MT;EiEv4MD;IAAU,8BAAA;GjE04MT;EiEz4MD;;IACU,+BAAA;GjE44MT;CACF;AgE51MD;EAwIA;IA1II,0BAAA;GhEk2MD;CACF;AgE51MD;EAmIA;IArII,2BAAA;GhEk2MD;CACF;AgE51MD;EA8HA;IAhII,iCAAA;GhEk2MD;CACF;AgE31MD;EAwHA;IC7LE,0BAAA;GjEo6MC;EiEn6MD;IAAU,0BAAA;GjEs6MT;EiEr6MD;IAAU,8BAAA;GjEw6MT;EiEv6MD;;IACU,+BAAA;GjE06MT;CACF;AgEr2MD;EAmHA;IArHI,0BAAA;GhE22MD;CACF;AgEr2MD;EA8GA;IAhHI,2BAAA;GhE22MD;CACF;AgEr2MD;EAyGA;IA3GI,iCAAA;GhE22MD;CACF;AgEp2MD;EAmGA;IC7LE,0BAAA;GjEk8MC;EiEj8MD;IAAU,0BAAA;GjEo8MT;EiEn8MD;IAAU,8BAAA;GjEs8MT;EiEr8MD;;IACU,+BAAA;GjEw8MT;CACF;AgE92MD;EA8FA;IAhGI,0BAAA;GhEo3MD;CACF;AgE92MD;EAyFA;IA3FI,2BAAA;GhEo3MD;CACF;AgE92MD;EAoFA;IAtFI,iCAAA;GhEo3MD;CACF;AgE72MD;EA8EA;IC7LE,0BAAA;GjEg+MC;EiE/9MD;IAAU,0BAAA;GjEk+MT;EiEj+MD;IAAU,8BAAA;GjEo+MT;EiEn+MD;;IACU,+BAAA;GjEs+MT;CACF;AgEv3MD;EAyEA;IA3EI,0BAAA;GhE63MD;CACF;AgEv3MD;EAoEA;IAtEI,2BAAA;GhE63MD;CACF;AgEv3MD;EA+DA;IAjEI,iCAAA;GhE63MD;CACF;AgEt3MD;EAyDA;ICrLE,yBAAA;GjEs/MC;CACF;AgEt3MD;EAoDA;ICrLE,yBAAA;GjE2/MC;CACF;AgEt3MD;EA+CA;ICrLE,yBAAA;GjEggNC;CACF;AgEt3MD;EA0CA;ICrLE,yBAAA;GjEqgNC;CACF;AgEn3MD;ECnJE,yBAAA;CjEygND;AgEh3MD;EA4BA;IC7LE,0BAAA;GjEqhNC;EiEphND;IAAU,0BAAA;GjEuhNT;EiEthND;IAAU,8BAAA;GjEyhNT;EiExhND;;IACU,+BAAA;GjE2hNT;CACF;AgE93MD;EACE,yBAAA;ChEg4MD;AgE33MD;EAqBA;IAvBI,0BAAA;GhEi4MD;CACF;AgE/3MD;EACE,yBAAA;ChEi4MD;AgE53MD;EAcA;IAhBI,2BAAA;GhEk4MD;CACF;AgEh4MD;EACE,yBAAA;ChEk4MD;AgE73MD;EAOA;IATI,iCAAA;GhEm4MD;CACF;AgE53MD;EACA;ICrLE,yBAAA;GjEojNC;CACF","file":"bootstrap.css","sourcesContent":["/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\nhtml {\n  font-family: sans-serif;\n  -ms-text-size-adjust: 100%;\n  -webkit-text-size-adjust: 100%;\n}\nbody {\n  margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n  display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n  display: inline-block;\n  vertical-align: baseline;\n}\naudio:not([controls]) {\n  display: none;\n  height: 0;\n}\n[hidden],\ntemplate {\n  display: none;\n}\na {\n  background-color: transparent;\n}\na:active,\na:hover {\n  outline: 0;\n}\nabbr[title] {\n  border-bottom: 1px dotted;\n}\nb,\nstrong {\n  font-weight: bold;\n}\ndfn {\n  font-style: italic;\n}\nh1 {\n  font-size: 2em;\n  margin: 0.67em 0;\n}\nmark {\n  background: #ff0;\n  color: #000;\n}\nsmall {\n  font-size: 80%;\n}\nsub,\nsup {\n  font-size: 75%;\n  line-height: 0;\n  position: relative;\n  vertical-align: baseline;\n}\nsup {\n  top: -0.5em;\n}\nsub {\n  bottom: -0.25em;\n}\nimg {\n  border: 0;\n}\nsvg:not(:root) {\n  overflow: hidden;\n}\nfigure {\n  margin: 1em 40px;\n}\nhr {\n  box-sizing: content-box;\n  height: 0;\n}\npre {\n  overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n  font-family: monospace, monospace;\n  font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n  color: inherit;\n  font: inherit;\n  margin: 0;\n}\nbutton {\n  overflow: visible;\n}\nbutton,\nselect {\n  text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n  -webkit-appearance: button;\n  cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n  cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n  border: 0;\n  padding: 0;\n}\ninput {\n  line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n  box-sizing: border-box;\n  padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n  height: auto;\n}\ninput[type=\"search\"] {\n  -webkit-appearance: textfield;\n  box-sizing: content-box;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\nfieldset {\n  border: 1px solid #c0c0c0;\n  margin: 0 2px;\n  padding: 0.35em 0.625em 0.75em;\n}\nlegend {\n  border: 0;\n  padding: 0;\n}\ntextarea {\n  overflow: auto;\n}\noptgroup {\n  font-weight: bold;\n}\ntable {\n  border-collapse: collapse;\n  border-spacing: 0;\n}\ntd,\nth {\n  padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n  *,\n  *:before,\n  *:after {\n    background: transparent !important;\n    color: #000 !important;\n    box-shadow: none !important;\n    text-shadow: none !important;\n  }\n  a,\n  a:visited {\n    text-decoration: underline;\n  }\n  a[href]:after {\n    content: \" (\" attr(href) \")\";\n  }\n  abbr[title]:after {\n    content: \" (\" attr(title) \")\";\n  }\n  a[href^=\"#\"]:after,\n  a[href^=\"javascript:\"]:after {\n    content: \"\";\n  }\n  pre,\n  blockquote {\n    border: 1px solid #999;\n    page-break-inside: avoid;\n  }\n  thead {\n    display: table-header-group;\n  }\n  tr,\n  img {\n    page-break-inside: avoid;\n  }\n  img {\n    max-width: 100% !important;\n  }\n  p,\n  h2,\n  h3 {\n    orphans: 3;\n    widows: 3;\n  }\n  h2,\n  h3 {\n    page-break-after: avoid;\n  }\n  .navbar {\n    display: none;\n  }\n  .btn > .caret,\n  .dropup > .btn > .caret {\n    border-top-color: #000 !important;\n  }\n  .label {\n    border: 1px solid #000;\n  }\n  .table {\n    border-collapse: collapse !important;\n  }\n  .table td,\n  .table th {\n    background-color: #fff !important;\n  }\n  .table-bordered th,\n  .table-bordered td {\n    border: 1px solid #ddd !important;\n  }\n}\n@font-face {\n  font-family: 'Glyphicons Halflings';\n  src: url('../fonts/glyphicons-halflings-regular.eot');\n  src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n  position: relative;\n  top: 1px;\n  display: inline-block;\n  font-family: 'Glyphicons Halflings';\n  font-style: normal;\n  font-weight: normal;\n  line-height: 1;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n  content: \"\\002a\";\n}\n.glyphicon-plus:before {\n  content: \"\\002b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n  content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n  content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n  content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n  content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n  content: \"\\270f\";\n}\n.glyphicon-glass:before {\n  content: \"\\e001\";\n}\n.glyphicon-music:before {\n  content: \"\\e002\";\n}\n.glyphicon-search:before {\n  content: \"\\e003\";\n}\n.glyphicon-heart:before {\n  content: \"\\e005\";\n}\n.glyphicon-star:before {\n  content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n  content: \"\\e007\";\n}\n.glyphicon-user:before {\n  content: \"\\e008\";\n}\n.glyphicon-film:before {\n  content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n  content: \"\\e010\";\n}\n.glyphicon-th:before {\n  content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n  content: \"\\e012\";\n}\n.glyphicon-ok:before {\n  content: \"\\e013\";\n}\n.glyphicon-remove:before {\n  content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n  content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n  content: \"\\e016\";\n}\n.glyphicon-off:before {\n  content: \"\\e017\";\n}\n.glyphicon-signal:before {\n  content: \"\\e018\";\n}\n.glyphicon-cog:before {\n  content: \"\\e019\";\n}\n.glyphicon-trash:before {\n  content: \"\\e020\";\n}\n.glyphicon-home:before {\n  content: \"\\e021\";\n}\n.glyphicon-file:before {\n  content: \"\\e022\";\n}\n.glyphicon-time:before {\n  content: \"\\e023\";\n}\n.glyphicon-road:before {\n  content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n  content: \"\\e025\";\n}\n.glyphicon-download:before {\n  content: \"\\e026\";\n}\n.glyphicon-upload:before {\n  content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n  content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n  content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n  content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n  content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n  content: \"\\e032\";\n}\n.glyphicon-lock:before {\n  content: \"\\e033\";\n}\n.glyphicon-flag:before {\n  content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n  content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n  content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n  content: \"\\e037\";\n}\n.glyphicon-volume-up:before {\n  content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n  content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n  content: \"\\e040\";\n}\n.glyphicon-tag:before {\n  content: \"\\e041\";\n}\n.glyphicon-tags:before {\n  content: \"\\e042\";\n}\n.glyphicon-book:before {\n  content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n  content: \"\\e044\";\n}\n.glyphicon-print:before {\n  content: \"\\e045\";\n}\n.glyphicon-camera:before {\n  content: \"\\e046\";\n}\n.glyphicon-font:before {\n  content: \"\\e047\";\n}\n.glyphicon-bold:before {\n  content: \"\\e048\";\n}\n.glyphicon-italic:before {\n  content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n  content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n  content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n  content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n  content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n  content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n  content: \"\\e055\";\n}\n.glyphicon-list:before {\n  content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n  content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n  content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n  content: \"\\e059\";\n}\n.glyphicon-picture:before {\n  content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n  content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n  content: \"\\e063\";\n}\n.glyphicon-tint:before {\n  content: \"\\e064\";\n}\n.glyphicon-edit:before {\n  content: \"\\e065\";\n}\n.glyphicon-share:before {\n  content: \"\\e066\";\n}\n.glyphicon-check:before {\n  content: \"\\e067\";\n}\n.glyphicon-move:before {\n  content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n  content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n  content: \"\\e070\";\n}\n.glyphicon-backward:before {\n  content: \"\\e071\";\n}\n.glyphicon-play:before {\n  content: \"\\e072\";\n}\n.glyphicon-pause:before {\n  content: \"\\e073\";\n}\n.glyphicon-stop:before {\n  content: \"\\e074\";\n}\n.glyphicon-forward:before {\n  content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n  content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n  content: \"\\e077\";\n}\n.glyphicon-eject:before {\n  content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n  content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n  content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n  content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n  content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n  content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n  content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n  content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n  content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n  content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n  content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n  content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n  content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\n  content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n  content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n  content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n  content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n  content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n  content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n  content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n  content: \"\\e101\";\n}\n.glyphicon-gift:before {\n  content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n  content: \"\\e103\";\n}\n.glyphicon-fire:before {\n  content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n  content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n  content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n  content: \"\\e107\";\n}\n.glyphicon-plane:before {\n  content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n  content: \"\\e109\";\n}\n.glyphicon-random:before {\n  content: \"\\e110\";\n}\n.glyphicon-comment:before {\n  content: \"\\e111\";\n}\n.glyphicon-magnet:before {\n  content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n  content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n  content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n  content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n  content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n  content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n  content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n  content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n  content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n  content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n  content: \"\\e122\";\n}\n.glyphicon-bell:before {\n  content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n  content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n  content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n  content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n  content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n  content: \"\\e128\";\n}\n.glyphicon-hand-up:before {\n  content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n  content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n  content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n  content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n  content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n  content: \"\\e134\";\n}\n.glyphicon-globe:before {\n  content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n  content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n  content: \"\\e137\";\n}\n.glyphicon-filter:before {\n  content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n  content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n  content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n  content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n  content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n  content: \"\\e143\";\n}\n.glyphicon-link:before {\n  content: \"\\e144\";\n}\n.glyphicon-phone:before {\n  content: \"\\e145\";\n}\n.glyphicon-pushpin:before {\n  content: \"\\e146\";\n}\n.glyphicon-usd:before {\n  content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n  content: \"\\e149\";\n}\n.glyphicon-sort:before {\n  content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n  content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n  content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n  content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n  content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n  content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n  content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n  content: \"\\e157\";\n}\n.glyphicon-expand:before {\n  content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n  content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n  content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n  content: \"\\e161\";\n}\n.glyphicon-flash:before {\n  content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n  content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n  content: \"\\e164\";\n}\n.glyphicon-record:before {\n  content: \"\\e165\";\n}\n.glyphicon-save:before {\n  content: \"\\e166\";\n}\n.glyphicon-open:before {\n  content: \"\\e167\";\n}\n.glyphicon-saved:before {\n  content: \"\\e168\";\n}\n.glyphicon-import:before {\n  content: \"\\e169\";\n}\n.glyphicon-export:before {\n  content: \"\\e170\";\n}\n.glyphicon-send:before {\n  content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n  content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n  content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n  content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n  content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n  content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n  content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n  content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n  content: \"\\e179\";\n}\n.glyphicon-header:before {\n  content: \"\\e180\";\n}\n.glyphicon-compressed:before {\n  content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n  content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n  content: \"\\e183\";\n}\n.glyphicon-tower:before {\n  content: \"\\e184\";\n}\n.glyphicon-stats:before {\n  content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n  content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n  content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n  content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n  content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n  content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n  content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n  content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n  content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n  content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n  content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n  content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n  content: \"\\e198\";\n}\n.glyphicon-tree-conifer:before {\n  content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n  content: \"\\e200\";\n}\n.glyphicon-cd:before {\n  content: \"\\e201\";\n}\n.glyphicon-save-file:before {\n  content: \"\\e202\";\n}\n.glyphicon-open-file:before {\n  content: \"\\e203\";\n}\n.glyphicon-level-up:before {\n  content: \"\\e204\";\n}\n.glyphicon-copy:before {\n  content: \"\\e205\";\n}\n.glyphicon-paste:before {\n  content: \"\\e206\";\n}\n.glyphicon-alert:before {\n  content: \"\\e209\";\n}\n.glyphicon-equalizer:before {\n  content: \"\\e210\";\n}\n.glyphicon-king:before {\n  content: \"\\e211\";\n}\n.glyphicon-queen:before {\n  content: \"\\e212\";\n}\n.glyphicon-pawn:before {\n  content: \"\\e213\";\n}\n.glyphicon-bishop:before {\n  content: \"\\e214\";\n}\n.glyphicon-knight:before {\n  content: \"\\e215\";\n}\n.glyphicon-baby-formula:before {\n  content: \"\\e216\";\n}\n.glyphicon-tent:before {\n  content: \"\\26fa\";\n}\n.glyphicon-blackboard:before {\n  content: \"\\e218\";\n}\n.glyphicon-bed:before {\n  content: \"\\e219\";\n}\n.glyphicon-apple:before {\n  content: \"\\f8ff\";\n}\n.glyphicon-erase:before {\n  content: \"\\e221\";\n}\n.glyphicon-hourglass:before {\n  content: \"\\231b\";\n}\n.glyphicon-lamp:before {\n  content: \"\\e223\";\n}\n.glyphicon-duplicate:before {\n  content: \"\\e224\";\n}\n.glyphicon-piggy-bank:before {\n  content: \"\\e225\";\n}\n.glyphicon-scissors:before {\n  content: \"\\e226\";\n}\n.glyphicon-bitcoin:before {\n  content: \"\\e227\";\n}\n.glyphicon-btc:before {\n  content: \"\\e227\";\n}\n.glyphicon-xbt:before {\n  content: \"\\e227\";\n}\n.glyphicon-yen:before {\n  content: \"\\00a5\";\n}\n.glyphicon-jpy:before {\n  content: \"\\00a5\";\n}\n.glyphicon-ruble:before {\n  content: \"\\20bd\";\n}\n.glyphicon-rub:before {\n  content: \"\\20bd\";\n}\n.glyphicon-scale:before {\n  content: \"\\e230\";\n}\n.glyphicon-ice-lolly:before {\n  content: \"\\e231\";\n}\n.glyphicon-ice-lolly-tasted:before {\n  content: \"\\e232\";\n}\n.glyphicon-education:before {\n  content: \"\\e233\";\n}\n.glyphicon-option-horizontal:before {\n  content: \"\\e234\";\n}\n.glyphicon-option-vertical:before {\n  content: \"\\e235\";\n}\n.glyphicon-menu-hamburger:before {\n  content: \"\\e236\";\n}\n.glyphicon-modal-window:before {\n  content: \"\\e237\";\n}\n.glyphicon-oil:before {\n  content: \"\\e238\";\n}\n.glyphicon-grain:before {\n  content: \"\\e239\";\n}\n.glyphicon-sunglasses:before {\n  content: \"\\e240\";\n}\n.glyphicon-text-size:before {\n  content: \"\\e241\";\n}\n.glyphicon-text-color:before {\n  content: \"\\e242\";\n}\n.glyphicon-text-background:before {\n  content: \"\\e243\";\n}\n.glyphicon-object-align-top:before {\n  content: \"\\e244\";\n}\n.glyphicon-object-align-bottom:before {\n  content: \"\\e245\";\n}\n.glyphicon-object-align-horizontal:before {\n  content: \"\\e246\";\n}\n.glyphicon-object-align-left:before {\n  content: \"\\e247\";\n}\n.glyphicon-object-align-vertical:before {\n  content: \"\\e248\";\n}\n.glyphicon-object-align-right:before {\n  content: \"\\e249\";\n}\n.glyphicon-triangle-right:before {\n  content: \"\\e250\";\n}\n.glyphicon-triangle-left:before {\n  content: \"\\e251\";\n}\n.glyphicon-triangle-bottom:before {\n  content: \"\\e252\";\n}\n.glyphicon-triangle-top:before {\n  content: \"\\e253\";\n}\n.glyphicon-console:before {\n  content: \"\\e254\";\n}\n.glyphicon-superscript:before {\n  content: \"\\e255\";\n}\n.glyphicon-subscript:before {\n  content: \"\\e256\";\n}\n.glyphicon-menu-left:before {\n  content: \"\\e257\";\n}\n.glyphicon-menu-right:before {\n  content: \"\\e258\";\n}\n.glyphicon-menu-down:before {\n  content: \"\\e259\";\n}\n.glyphicon-menu-up:before {\n  content: \"\\e260\";\n}\n* {\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\n*:before,\n*:after {\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\nhtml {\n  font-size: 10px;\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #333333;\n  background-color: #fff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n  font-family: inherit;\n  font-size: inherit;\n  line-height: inherit;\n}\na {\n  color: #337ab7;\n  text-decoration: none;\n}\na:hover,\na:focus {\n  color: #23527c;\n  text-decoration: underline;\n}\na:focus {\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\nfigure {\n  margin: 0;\n}\nimg {\n  vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n  display: block;\n  max-width: 100%;\n  height: auto;\n}\n.img-rounded {\n  border-radius: 6px;\n}\n.img-thumbnail {\n  padding: 4px;\n  line-height: 1.42857143;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 4px;\n  -webkit-transition: all 0.2s ease-in-out;\n  -o-transition: all 0.2s ease-in-out;\n  transition: all 0.2s ease-in-out;\n  display: inline-block;\n  max-width: 100%;\n  height: auto;\n}\n.img-circle {\n  border-radius: 50%;\n}\nhr {\n  margin-top: 20px;\n  margin-bottom: 20px;\n  border: 0;\n  border-top: 1px solid #eeeeee;\n}\n.sr-only {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  padding: 0;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n  position: static;\n  width: auto;\n  height: auto;\n  margin: 0;\n  overflow: visible;\n  clip: auto;\n}\n[role=\"button\"] {\n  cursor: pointer;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n  font-family: inherit;\n  font-weight: 500;\n  line-height: 1.1;\n  color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n  font-weight: normal;\n  line-height: 1;\n  color: #777777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n  margin-top: 20px;\n  margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n  font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n  font-size: 75%;\n}\nh1,\n.h1 {\n  font-size: 36px;\n}\nh2,\n.h2 {\n  font-size: 30px;\n}\nh3,\n.h3 {\n  font-size: 24px;\n}\nh4,\n.h4 {\n  font-size: 18px;\n}\nh5,\n.h5 {\n  font-size: 14px;\n}\nh6,\n.h6 {\n  font-size: 12px;\n}\np {\n  margin: 0 0 10px;\n}\n.lead {\n  margin-bottom: 20px;\n  font-size: 16px;\n  font-weight: 300;\n  line-height: 1.4;\n}\n@media (min-width: 768px) {\n  .lead {\n    font-size: 21px;\n  }\n}\nsmall,\n.small {\n  font-size: 85%;\n}\nmark,\n.mark {\n  background-color: #fcf8e3;\n  padding: .2em;\n}\n.text-left {\n  text-align: left;\n}\n.text-right {\n  text-align: right;\n}\n.text-center {\n  text-align: center;\n}\n.text-justify {\n  text-align: justify;\n}\n.text-nowrap {\n  white-space: nowrap;\n}\n.text-lowercase {\n  text-transform: lowercase;\n}\n.text-uppercase {\n  text-transform: uppercase;\n}\n.text-capitalize {\n  text-transform: capitalize;\n}\n.text-muted {\n  color: #777777;\n}\n.text-primary {\n  color: #337ab7;\n}\na.text-primary:hover,\na.text-primary:focus {\n  color: #286090;\n}\n.text-success {\n  color: #3c763d;\n}\na.text-success:hover,\na.text-success:focus {\n  color: #2b542c;\n}\n.text-info {\n  color: #31708f;\n}\na.text-info:hover,\na.text-info:focus {\n  color: #245269;\n}\n.text-warning {\n  color: #8a6d3b;\n}\na.text-warning:hover,\na.text-warning:focus {\n  color: #66512c;\n}\n.text-danger {\n  color: #a94442;\n}\na.text-danger:hover,\na.text-danger:focus {\n  color: #843534;\n}\n.bg-primary {\n  color: #fff;\n  background-color: #337ab7;\n}\na.bg-primary:hover,\na.bg-primary:focus {\n  background-color: #286090;\n}\n.bg-success {\n  background-color: #dff0d8;\n}\na.bg-success:hover,\na.bg-success:focus {\n  background-color: #c1e2b3;\n}\n.bg-info {\n  background-color: #d9edf7;\n}\na.bg-info:hover,\na.bg-info:focus {\n  background-color: #afd9ee;\n}\n.bg-warning {\n  background-color: #fcf8e3;\n}\na.bg-warning:hover,\na.bg-warning:focus {\n  background-color: #f7ecb5;\n}\n.bg-danger {\n  background-color: #f2dede;\n}\na.bg-danger:hover,\na.bg-danger:focus {\n  background-color: #e4b9b9;\n}\n.page-header {\n  padding-bottom: 9px;\n  margin: 40px 0 20px;\n  border-bottom: 1px solid #eeeeee;\n}\nul,\nol {\n  margin-top: 0;\n  margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n  margin-bottom: 0;\n}\n.list-unstyled {\n  padding-left: 0;\n  list-style: none;\n}\n.list-inline {\n  padding-left: 0;\n  list-style: none;\n  margin-left: -5px;\n}\n.list-inline > li {\n  display: inline-block;\n  padding-left: 5px;\n  padding-right: 5px;\n}\ndl {\n  margin-top: 0;\n  margin-bottom: 20px;\n}\ndt,\ndd {\n  line-height: 1.42857143;\n}\ndt {\n  font-weight: bold;\n}\ndd {\n  margin-left: 0;\n}\n@media (min-width: 768px) {\n  .dl-horizontal dt {\n    float: left;\n    width: 160px;\n    clear: left;\n    text-align: right;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n  }\n  .dl-horizontal dd {\n    margin-left: 180px;\n  }\n}\nabbr[title],\nabbr[data-original-title] {\n  cursor: help;\n  border-bottom: 1px dotted #777777;\n}\n.initialism {\n  font-size: 90%;\n  text-transform: uppercase;\n}\nblockquote {\n  padding: 10px 20px;\n  margin: 0 0 20px;\n  font-size: 17.5px;\n  border-left: 5px solid #eeeeee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n  margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n  display: block;\n  font-size: 80%;\n  line-height: 1.42857143;\n  color: #777777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n  content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n  padding-right: 15px;\n  padding-left: 0;\n  border-right: 5px solid #eeeeee;\n  border-left: 0;\n  text-align: right;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n  content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n  content: '\\00A0 \\2014';\n}\naddress {\n  margin-bottom: 20px;\n  font-style: normal;\n  line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n  font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: #c7254e;\n  background-color: #f9f2f4;\n  border-radius: 4px;\n}\nkbd {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: #fff;\n  background-color: #333;\n  border-radius: 3px;\n  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\nkbd kbd {\n  padding: 0;\n  font-size: 100%;\n  font-weight: bold;\n  box-shadow: none;\n}\npre {\n  display: block;\n  padding: 9.5px;\n  margin: 0 0 10px;\n  font-size: 13px;\n  line-height: 1.42857143;\n  word-break: break-all;\n  word-wrap: break-word;\n  color: #333333;\n  background-color: #f5f5f5;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n}\npre code {\n  padding: 0;\n  font-size: inherit;\n  color: inherit;\n  white-space: pre-wrap;\n  background-color: transparent;\n  border-radius: 0;\n}\n.pre-scrollable {\n  max-height: 340px;\n  overflow-y: scroll;\n}\n.container {\n  margin-right: auto;\n  margin-left: auto;\n  padding-left: 15px;\n  padding-right: 15px;\n}\n@media (min-width: 768px) {\n  .container {\n    width: 750px;\n  }\n}\n@media (min-width: 992px) {\n  .container {\n    width: 970px;\n  }\n}\n@media (min-width: 1200px) {\n  .container {\n    width: 1170px;\n  }\n}\n.container-fluid {\n  margin-right: auto;\n  margin-left: auto;\n  padding-left: 15px;\n  padding-right: 15px;\n}\n.row {\n  margin-left: -15px;\n  margin-right: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n  position: relative;\n  min-height: 1px;\n  padding-left: 15px;\n  padding-right: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n  float: left;\n}\n.col-xs-12 {\n  width: 100%;\n}\n.col-xs-11 {\n  width: 91.66666667%;\n}\n.col-xs-10 {\n  width: 83.33333333%;\n}\n.col-xs-9 {\n  width: 75%;\n}\n.col-xs-8 {\n  width: 66.66666667%;\n}\n.col-xs-7 {\n  width: 58.33333333%;\n}\n.col-xs-6 {\n  width: 50%;\n}\n.col-xs-5 {\n  width: 41.66666667%;\n}\n.col-xs-4 {\n  width: 33.33333333%;\n}\n.col-xs-3 {\n  width: 25%;\n}\n.col-xs-2 {\n  width: 16.66666667%;\n}\n.col-xs-1 {\n  width: 8.33333333%;\n}\n.col-xs-pull-12 {\n  right: 100%;\n}\n.col-xs-pull-11 {\n  right: 91.66666667%;\n}\n.col-xs-pull-10 {\n  right: 83.33333333%;\n}\n.col-xs-pull-9 {\n  right: 75%;\n}\n.col-xs-pull-8 {\n  right: 66.66666667%;\n}\n.col-xs-pull-7 {\n  right: 58.33333333%;\n}\n.col-xs-pull-6 {\n  right: 50%;\n}\n.col-xs-pull-5 {\n  right: 41.66666667%;\n}\n.col-xs-pull-4 {\n  right: 33.33333333%;\n}\n.col-xs-pull-3 {\n  right: 25%;\n}\n.col-xs-pull-2 {\n  right: 16.66666667%;\n}\n.col-xs-pull-1 {\n  right: 8.33333333%;\n}\n.col-xs-pull-0 {\n  right: auto;\n}\n.col-xs-push-12 {\n  left: 100%;\n}\n.col-xs-push-11 {\n  left: 91.66666667%;\n}\n.col-xs-push-10 {\n  left: 83.33333333%;\n}\n.col-xs-push-9 {\n  left: 75%;\n}\n.col-xs-push-8 {\n  left: 66.66666667%;\n}\n.col-xs-push-7 {\n  left: 58.33333333%;\n}\n.col-xs-push-6 {\n  left: 50%;\n}\n.col-xs-push-5 {\n  left: 41.66666667%;\n}\n.col-xs-push-4 {\n  left: 33.33333333%;\n}\n.col-xs-push-3 {\n  left: 25%;\n}\n.col-xs-push-2 {\n  left: 16.66666667%;\n}\n.col-xs-push-1 {\n  left: 8.33333333%;\n}\n.col-xs-push-0 {\n  left: auto;\n}\n.col-xs-offset-12 {\n  margin-left: 100%;\n}\n.col-xs-offset-11 {\n  margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n  margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n  margin-left: 75%;\n}\n.col-xs-offset-8 {\n  margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n  margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n  margin-left: 50%;\n}\n.col-xs-offset-5 {\n  margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n  margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n  margin-left: 25%;\n}\n.col-xs-offset-2 {\n  margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n  margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n  margin-left: 0%;\n}\n@media (min-width: 768px) {\n  .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n    float: left;\n  }\n  .col-sm-12 {\n    width: 100%;\n  }\n  .col-sm-11 {\n    width: 91.66666667%;\n  }\n  .col-sm-10 {\n    width: 83.33333333%;\n  }\n  .col-sm-9 {\n    width: 75%;\n  }\n  .col-sm-8 {\n    width: 66.66666667%;\n  }\n  .col-sm-7 {\n    width: 58.33333333%;\n  }\n  .col-sm-6 {\n    width: 50%;\n  }\n  .col-sm-5 {\n    width: 41.66666667%;\n  }\n  .col-sm-4 {\n    width: 33.33333333%;\n  }\n  .col-sm-3 {\n    width: 25%;\n  }\n  .col-sm-2 {\n    width: 16.66666667%;\n  }\n  .col-sm-1 {\n    width: 8.33333333%;\n  }\n  .col-sm-pull-12 {\n    right: 100%;\n  }\n  .col-sm-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-sm-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-sm-pull-9 {\n    right: 75%;\n  }\n  .col-sm-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-sm-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-sm-pull-6 {\n    right: 50%;\n  }\n  .col-sm-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-sm-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-sm-pull-3 {\n    right: 25%;\n  }\n  .col-sm-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-sm-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-sm-pull-0 {\n    right: auto;\n  }\n  .col-sm-push-12 {\n    left: 100%;\n  }\n  .col-sm-push-11 {\n    left: 91.66666667%;\n  }\n  .col-sm-push-10 {\n    left: 83.33333333%;\n  }\n  .col-sm-push-9 {\n    left: 75%;\n  }\n  .col-sm-push-8 {\n    left: 66.66666667%;\n  }\n  .col-sm-push-7 {\n    left: 58.33333333%;\n  }\n  .col-sm-push-6 {\n    left: 50%;\n  }\n  .col-sm-push-5 {\n    left: 41.66666667%;\n  }\n  .col-sm-push-4 {\n    left: 33.33333333%;\n  }\n  .col-sm-push-3 {\n    left: 25%;\n  }\n  .col-sm-push-2 {\n    left: 16.66666667%;\n  }\n  .col-sm-push-1 {\n    left: 8.33333333%;\n  }\n  .col-sm-push-0 {\n    left: auto;\n  }\n  .col-sm-offset-12 {\n    margin-left: 100%;\n  }\n  .col-sm-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-sm-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-sm-offset-9 {\n    margin-left: 75%;\n  }\n  .col-sm-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-sm-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-sm-offset-6 {\n    margin-left: 50%;\n  }\n  .col-sm-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-sm-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-sm-offset-3 {\n    margin-left: 25%;\n  }\n  .col-sm-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-sm-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-sm-offset-0 {\n    margin-left: 0%;\n  }\n}\n@media (min-width: 992px) {\n  .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n    float: left;\n  }\n  .col-md-12 {\n    width: 100%;\n  }\n  .col-md-11 {\n    width: 91.66666667%;\n  }\n  .col-md-10 {\n    width: 83.33333333%;\n  }\n  .col-md-9 {\n    width: 75%;\n  }\n  .col-md-8 {\n    width: 66.66666667%;\n  }\n  .col-md-7 {\n    width: 58.33333333%;\n  }\n  .col-md-6 {\n    width: 50%;\n  }\n  .col-md-5 {\n    width: 41.66666667%;\n  }\n  .col-md-4 {\n    width: 33.33333333%;\n  }\n  .col-md-3 {\n    width: 25%;\n  }\n  .col-md-2 {\n    width: 16.66666667%;\n  }\n  .col-md-1 {\n    width: 8.33333333%;\n  }\n  .col-md-pull-12 {\n    right: 100%;\n  }\n  .col-md-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-md-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-md-pull-9 {\n    right: 75%;\n  }\n  .col-md-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-md-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-md-pull-6 {\n    right: 50%;\n  }\n  .col-md-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-md-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-md-pull-3 {\n    right: 25%;\n  }\n  .col-md-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-md-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-md-pull-0 {\n    right: auto;\n  }\n  .col-md-push-12 {\n    left: 100%;\n  }\n  .col-md-push-11 {\n    left: 91.66666667%;\n  }\n  .col-md-push-10 {\n    left: 83.33333333%;\n  }\n  .col-md-push-9 {\n    left: 75%;\n  }\n  .col-md-push-8 {\n    left: 66.66666667%;\n  }\n  .col-md-push-7 {\n    left: 58.33333333%;\n  }\n  .col-md-push-6 {\n    left: 50%;\n  }\n  .col-md-push-5 {\n    left: 41.66666667%;\n  }\n  .col-md-push-4 {\n    left: 33.33333333%;\n  }\n  .col-md-push-3 {\n    left: 25%;\n  }\n  .col-md-push-2 {\n    left: 16.66666667%;\n  }\n  .col-md-push-1 {\n    left: 8.33333333%;\n  }\n  .col-md-push-0 {\n    left: auto;\n  }\n  .col-md-offset-12 {\n    margin-left: 100%;\n  }\n  .col-md-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-md-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-md-offset-9 {\n    margin-left: 75%;\n  }\n  .col-md-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-md-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-md-offset-6 {\n    margin-left: 50%;\n  }\n  .col-md-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-md-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-md-offset-3 {\n    margin-left: 25%;\n  }\n  .col-md-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-md-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-md-offset-0 {\n    margin-left: 0%;\n  }\n}\n@media (min-width: 1200px) {\n  .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n    float: left;\n  }\n  .col-lg-12 {\n    width: 100%;\n  }\n  .col-lg-11 {\n    width: 91.66666667%;\n  }\n  .col-lg-10 {\n    width: 83.33333333%;\n  }\n  .col-lg-9 {\n    width: 75%;\n  }\n  .col-lg-8 {\n    width: 66.66666667%;\n  }\n  .col-lg-7 {\n    width: 58.33333333%;\n  }\n  .col-lg-6 {\n    width: 50%;\n  }\n  .col-lg-5 {\n    width: 41.66666667%;\n  }\n  .col-lg-4 {\n    width: 33.33333333%;\n  }\n  .col-lg-3 {\n    width: 25%;\n  }\n  .col-lg-2 {\n    width: 16.66666667%;\n  }\n  .col-lg-1 {\n    width: 8.33333333%;\n  }\n  .col-lg-pull-12 {\n    right: 100%;\n  }\n  .col-lg-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-lg-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-lg-pull-9 {\n    right: 75%;\n  }\n  .col-lg-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-lg-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-lg-pull-6 {\n    right: 50%;\n  }\n  .col-lg-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-lg-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-lg-pull-3 {\n    right: 25%;\n  }\n  .col-lg-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-lg-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-lg-pull-0 {\n    right: auto;\n  }\n  .col-lg-push-12 {\n    left: 100%;\n  }\n  .col-lg-push-11 {\n    left: 91.66666667%;\n  }\n  .col-lg-push-10 {\n    left: 83.33333333%;\n  }\n  .col-lg-push-9 {\n    left: 75%;\n  }\n  .col-lg-push-8 {\n    left: 66.66666667%;\n  }\n  .col-lg-push-7 {\n    left: 58.33333333%;\n  }\n  .col-lg-push-6 {\n    left: 50%;\n  }\n  .col-lg-push-5 {\n    left: 41.66666667%;\n  }\n  .col-lg-push-4 {\n    left: 33.33333333%;\n  }\n  .col-lg-push-3 {\n    left: 25%;\n  }\n  .col-lg-push-2 {\n    left: 16.66666667%;\n  }\n  .col-lg-push-1 {\n    left: 8.33333333%;\n  }\n  .col-lg-push-0 {\n    left: auto;\n  }\n  .col-lg-offset-12 {\n    margin-left: 100%;\n  }\n  .col-lg-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-lg-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-lg-offset-9 {\n    margin-left: 75%;\n  }\n  .col-lg-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-lg-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-lg-offset-6 {\n    margin-left: 50%;\n  }\n  .col-lg-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-lg-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-lg-offset-3 {\n    margin-left: 25%;\n  }\n  .col-lg-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-lg-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-lg-offset-0 {\n    margin-left: 0%;\n  }\n}\ntable {\n  background-color: transparent;\n}\ncaption {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  color: #777777;\n  text-align: left;\n}\nth {\n  text-align: left;\n}\n.table {\n  width: 100%;\n  max-width: 100%;\n  margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n  padding: 8px;\n  line-height: 1.42857143;\n  vertical-align: top;\n  border-top: 1px solid #ddd;\n}\n.table > thead > tr > th {\n  vertical-align: bottom;\n  border-bottom: 2px solid #ddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n  border-top: 0;\n}\n.table > tbody + tbody {\n  border-top: 2px solid #ddd;\n}\n.table .table {\n  background-color: #fff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n  padding: 5px;\n}\n.table-bordered {\n  border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n  border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n  border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-of-type(odd) {\n  background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n  background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n  position: static;\n  float: none;\n  display: table-column;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n  position: static;\n  float: none;\n  display: table-cell;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n  background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n  background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n  background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n  background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n  background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n  background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n  background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n  background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n  background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n  background-color: #ebcccc;\n}\n.table-responsive {\n  overflow-x: auto;\n  min-height: 0.01%;\n}\n@media screen and (max-width: 767px) {\n  .table-responsive {\n    width: 100%;\n    margin-bottom: 15px;\n    overflow-y: hidden;\n    -ms-overflow-style: -ms-autohiding-scrollbar;\n    border: 1px solid #ddd;\n  }\n  .table-responsive > .table {\n    margin-bottom: 0;\n  }\n  .table-responsive > .table > thead > tr > th,\n  .table-responsive > .table > tbody > tr > th,\n  .table-responsive > .table > tfoot > tr > th,\n  .table-responsive > .table > thead > tr > td,\n  .table-responsive > .table > tbody > tr > td,\n  .table-responsive > .table > tfoot > tr > td {\n    white-space: nowrap;\n  }\n  .table-responsive > .table-bordered {\n    border: 0;\n  }\n  .table-responsive > .table-bordered > thead > tr > th:first-child,\n  .table-responsive > .table-bordered > tbody > tr > th:first-child,\n  .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n  .table-responsive > .table-bordered > thead > tr > td:first-child,\n  .table-responsive > .table-bordered > tbody > tr > td:first-child,\n  .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n    border-left: 0;\n  }\n  .table-responsive > .table-bordered > thead > tr > th:last-child,\n  .table-responsive > .table-bordered > tbody > tr > th:last-child,\n  .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n  .table-responsive > .table-bordered > thead > tr > td:last-child,\n  .table-responsive > .table-bordered > tbody > tr > td:last-child,\n  .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n    border-right: 0;\n  }\n  .table-responsive > .table-bordered > tbody > tr:last-child > th,\n  .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n  .table-responsive > .table-bordered > tbody > tr:last-child > td,\n  .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n    border-bottom: 0;\n  }\n}\nfieldset {\n  padding: 0;\n  margin: 0;\n  border: 0;\n  min-width: 0;\n}\nlegend {\n  display: block;\n  width: 100%;\n  padding: 0;\n  margin-bottom: 20px;\n  font-size: 21px;\n  line-height: inherit;\n  color: #333333;\n  border: 0;\n  border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n  display: inline-block;\n  max-width: 100%;\n  margin-bottom: 5px;\n  font-weight: bold;\n}\ninput[type=\"search\"] {\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n  margin: 4px 0 0;\n  margin-top: 1px \\9;\n  line-height: normal;\n}\ninput[type=\"file\"] {\n  display: block;\n}\ninput[type=\"range\"] {\n  display: block;\n  width: 100%;\n}\nselect[multiple],\nselect[size] {\n  height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\noutput {\n  display: block;\n  padding-top: 7px;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #555555;\n}\n.form-control {\n  display: block;\n  width: 100%;\n  height: 34px;\n  padding: 6px 12px;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #555555;\n  background-color: #fff;\n  background-image: none;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n  -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n  border-color: #66afe9;\n  outline: 0;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n}\n.form-control::-moz-placeholder {\n  color: #999;\n  opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n  color: #999;\n}\n.form-control::-webkit-input-placeholder {\n  color: #999;\n}\n.form-control::-ms-expand {\n  border: 0;\n  background-color: transparent;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n  background-color: #eeeeee;\n  opacity: 1;\n}\n.form-control[disabled],\nfieldset[disabled] .form-control {\n  cursor: not-allowed;\n}\ntextarea.form-control {\n  height: auto;\n}\ninput[type=\"search\"] {\n  -webkit-appearance: none;\n}\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n  input[type=\"date\"].form-control,\n  input[type=\"time\"].form-control,\n  input[type=\"datetime-local\"].form-control,\n  input[type=\"month\"].form-control {\n    line-height: 34px;\n  }\n  input[type=\"date\"].input-sm,\n  input[type=\"time\"].input-sm,\n  input[type=\"datetime-local\"].input-sm,\n  input[type=\"month\"].input-sm,\n  .input-group-sm input[type=\"date\"],\n  .input-group-sm input[type=\"time\"],\n  .input-group-sm input[type=\"datetime-local\"],\n  .input-group-sm input[type=\"month\"] {\n    line-height: 30px;\n  }\n  input[type=\"date\"].input-lg,\n  input[type=\"time\"].input-lg,\n  input[type=\"datetime-local\"].input-lg,\n  input[type=\"month\"].input-lg,\n  .input-group-lg input[type=\"date\"],\n  .input-group-lg input[type=\"time\"],\n  .input-group-lg input[type=\"datetime-local\"],\n  .input-group-lg input[type=\"month\"] {\n    line-height: 46px;\n  }\n}\n.form-group {\n  margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n  position: relative;\n  display: block;\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n  min-height: 20px;\n  padding-left: 20px;\n  margin-bottom: 0;\n  font-weight: normal;\n  cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n  position: absolute;\n  margin-left: -20px;\n  margin-top: 4px \\9;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n  margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n  position: relative;\n  display: inline-block;\n  padding-left: 20px;\n  margin-bottom: 0;\n  vertical-align: middle;\n  font-weight: normal;\n  cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n  margin-top: 0;\n  margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n  cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n  cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n  cursor: not-allowed;\n}\n.form-control-static {\n  padding-top: 7px;\n  padding-bottom: 7px;\n  margin-bottom: 0;\n  min-height: 34px;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n  padding-left: 0;\n  padding-right: 0;\n}\n.input-sm {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\nselect.input-sm {\n  height: 30px;\n  line-height: 30px;\n}\ntextarea.input-sm,\nselect[multiple].input-sm {\n  height: auto;\n}\n.form-group-sm .form-control {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.form-group-sm select.form-control {\n  height: 30px;\n  line-height: 30px;\n}\n.form-group-sm textarea.form-control,\n.form-group-sm select[multiple].form-control {\n  height: auto;\n}\n.form-group-sm .form-control-static {\n  height: 30px;\n  min-height: 32px;\n  padding: 6px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n}\n.input-lg {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\nselect.input-lg {\n  height: 46px;\n  line-height: 46px;\n}\ntextarea.input-lg,\nselect[multiple].input-lg {\n  height: auto;\n}\n.form-group-lg .form-control {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\n.form-group-lg select.form-control {\n  height: 46px;\n  line-height: 46px;\n}\n.form-group-lg textarea.form-control,\n.form-group-lg select[multiple].form-control {\n  height: auto;\n}\n.form-group-lg .form-control-static {\n  height: 46px;\n  min-height: 38px;\n  padding: 11px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n}\n.has-feedback {\n  position: relative;\n}\n.has-feedback .form-control {\n  padding-right: 42.5px;\n}\n.form-control-feedback {\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: 2;\n  display: block;\n  width: 34px;\n  height: 34px;\n  line-height: 34px;\n  text-align: center;\n  pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n  width: 46px;\n  height: 46px;\n  line-height: 46px;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n  width: 30px;\n  height: 30px;\n  line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n  color: #3c763d;\n}\n.has-success .form-control {\n  border-color: #3c763d;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-success .form-control:focus {\n  border-color: #2b542c;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n  color: #3c763d;\n  border-color: #3c763d;\n  background-color: #dff0d8;\n}\n.has-success .form-control-feedback {\n  color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n  color: #8a6d3b;\n}\n.has-warning .form-control {\n  border-color: #8a6d3b;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-warning .form-control:focus {\n  border-color: #66512c;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n  color: #8a6d3b;\n  border-color: #8a6d3b;\n  background-color: #fcf8e3;\n}\n.has-warning .form-control-feedback {\n  color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n  color: #a94442;\n}\n.has-error .form-control {\n  border-color: #a94442;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-error .form-control:focus {\n  border-color: #843534;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n  color: #a94442;\n  border-color: #a94442;\n  background-color: #f2dede;\n}\n.has-error .form-control-feedback {\n  color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n  top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n  top: 0;\n}\n.help-block {\n  display: block;\n  margin-top: 5px;\n  margin-bottom: 10px;\n  color: #737373;\n}\n@media (min-width: 768px) {\n  .form-inline .form-group {\n    display: inline-block;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .form-control {\n    display: inline-block;\n    width: auto;\n    vertical-align: middle;\n  }\n  .form-inline .form-control-static {\n    display: inline-block;\n  }\n  .form-inline .input-group {\n    display: inline-table;\n    vertical-align: middle;\n  }\n  .form-inline .input-group .input-group-addon,\n  .form-inline .input-group .input-group-btn,\n  .form-inline .input-group .form-control {\n    width: auto;\n  }\n  .form-inline .input-group > .form-control {\n    width: 100%;\n  }\n  .form-inline .control-label {\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .radio,\n  .form-inline .checkbox {\n    display: inline-block;\n    margin-top: 0;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .radio label,\n  .form-inline .checkbox label {\n    padding-left: 0;\n  }\n  .form-inline .radio input[type=\"radio\"],\n  .form-inline .checkbox input[type=\"checkbox\"] {\n    position: relative;\n    margin-left: 0;\n  }\n  .form-inline .has-feedback .form-control-feedback {\n    top: 0;\n  }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n  margin-top: 0;\n  margin-bottom: 0;\n  padding-top: 7px;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n  min-height: 27px;\n}\n.form-horizontal .form-group {\n  margin-left: -15px;\n  margin-right: -15px;\n}\n@media (min-width: 768px) {\n  .form-horizontal .control-label {\n    text-align: right;\n    margin-bottom: 0;\n    padding-top: 7px;\n  }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n  right: 15px;\n}\n@media (min-width: 768px) {\n  .form-horizontal .form-group-lg .control-label {\n    padding-top: 11px;\n    font-size: 18px;\n  }\n}\n@media (min-width: 768px) {\n  .form-horizontal .form-group-sm .control-label {\n    padding-top: 6px;\n    font-size: 12px;\n  }\n}\n.btn {\n  display: inline-block;\n  margin-bottom: 0;\n  font-weight: normal;\n  text-align: center;\n  vertical-align: middle;\n  touch-action: manipulation;\n  cursor: pointer;\n  background-image: none;\n  border: 1px solid transparent;\n  white-space: nowrap;\n  padding: 6px 12px;\n  font-size: 14px;\n  line-height: 1.42857143;\n  border-radius: 4px;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n  color: #333;\n  text-decoration: none;\n}\n.btn:active,\n.btn.active {\n  outline: 0;\n  background-image: none;\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n  cursor: not-allowed;\n  opacity: 0.65;\n  filter: alpha(opacity=65);\n  -webkit-box-shadow: none;\n  box-shadow: none;\n}\na.btn.disabled,\nfieldset[disabled] a.btn {\n  pointer-events: none;\n}\n.btn-default {\n  color: #333;\n  background-color: #fff;\n  border-color: #ccc;\n}\n.btn-default:focus,\n.btn-default.focus {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #8c8c8c;\n}\n.btn-default:hover {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #adadad;\n}\n.btn-default:active:hover,\n.btn-default.active:hover,\n.open > .dropdown-toggle.btn-default:hover,\n.btn-default:active:focus,\n.btn-default.active:focus,\n.open > .dropdown-toggle.btn-default:focus,\n.btn-default:active.focus,\n.btn-default.active.focus,\n.open > .dropdown-toggle.btn-default.focus {\n  color: #333;\n  background-color: #d4d4d4;\n  border-color: #8c8c8c;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n  background-image: none;\n}\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus {\n  background-color: #fff;\n  border-color: #ccc;\n}\n.btn-default .badge {\n  color: #fff;\n  background-color: #333;\n}\n.btn-primary {\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #2e6da4;\n}\n.btn-primary:focus,\n.btn-primary.focus {\n  color: #fff;\n  background-color: #286090;\n  border-color: #122b40;\n}\n.btn-primary:hover {\n  color: #fff;\n  background-color: #286090;\n  border-color: #204d74;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n  color: #fff;\n  background-color: #286090;\n  border-color: #204d74;\n}\n.btn-primary:active:hover,\n.btn-primary.active:hover,\n.open > .dropdown-toggle.btn-primary:hover,\n.btn-primary:active:focus,\n.btn-primary.active:focus,\n.open > .dropdown-toggle.btn-primary:focus,\n.btn-primary:active.focus,\n.btn-primary.active.focus,\n.open > .dropdown-toggle.btn-primary.focus {\n  color: #fff;\n  background-color: #204d74;\n  border-color: #122b40;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n  background-image: none;\n}\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus {\n  background-color: #337ab7;\n  border-color: #2e6da4;\n}\n.btn-primary .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.btn-success {\n  color: #fff;\n  background-color: #5cb85c;\n  border-color: #4cae4c;\n}\n.btn-success:focus,\n.btn-success.focus {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #255625;\n}\n.btn-success:hover {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #398439;\n}\n.btn-success:active:hover,\n.btn-success.active:hover,\n.open > .dropdown-toggle.btn-success:hover,\n.btn-success:active:focus,\n.btn-success.active:focus,\n.open > .dropdown-toggle.btn-success:focus,\n.btn-success:active.focus,\n.btn-success.active.focus,\n.open > .dropdown-toggle.btn-success.focus {\n  color: #fff;\n  background-color: #398439;\n  border-color: #255625;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n  background-image: none;\n}\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus {\n  background-color: #5cb85c;\n  border-color: #4cae4c;\n}\n.btn-success .badge {\n  color: #5cb85c;\n  background-color: #fff;\n}\n.btn-info {\n  color: #fff;\n  background-color: #5bc0de;\n  border-color: #46b8da;\n}\n.btn-info:focus,\n.btn-info.focus {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #1b6d85;\n}\n.btn-info:hover {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #269abc;\n}\n.btn-info:active:hover,\n.btn-info.active:hover,\n.open > .dropdown-toggle.btn-info:hover,\n.btn-info:active:focus,\n.btn-info.active:focus,\n.open > .dropdown-toggle.btn-info:focus,\n.btn-info:active.focus,\n.btn-info.active.focus,\n.open > .dropdown-toggle.btn-info.focus {\n  color: #fff;\n  background-color: #269abc;\n  border-color: #1b6d85;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n  background-image: none;\n}\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus {\n  background-color: #5bc0de;\n  border-color: #46b8da;\n}\n.btn-info .badge {\n  color: #5bc0de;\n  background-color: #fff;\n}\n.btn-warning {\n  color: #fff;\n  background-color: #f0ad4e;\n  border-color: #eea236;\n}\n.btn-warning:focus,\n.btn-warning.focus {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #985f0d;\n}\n.btn-warning:hover {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #d58512;\n}\n.btn-warning:active:hover,\n.btn-warning.active:hover,\n.open > .dropdown-toggle.btn-warning:hover,\n.btn-warning:active:focus,\n.btn-warning.active:focus,\n.open > .dropdown-toggle.btn-warning:focus,\n.btn-warning:active.focus,\n.btn-warning.active.focus,\n.open > .dropdown-toggle.btn-warning.focus {\n  color: #fff;\n  background-color: #d58512;\n  border-color: #985f0d;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n  background-image: none;\n}\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus {\n  background-color: #f0ad4e;\n  border-color: #eea236;\n}\n.btn-warning .badge {\n  color: #f0ad4e;\n  background-color: #fff;\n}\n.btn-danger {\n  color: #fff;\n  background-color: #d9534f;\n  border-color: #d43f3a;\n}\n.btn-danger:focus,\n.btn-danger.focus {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #761c19;\n}\n.btn-danger:hover {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #ac2925;\n}\n.btn-danger:active:hover,\n.btn-danger.active:hover,\n.open > .dropdown-toggle.btn-danger:hover,\n.btn-danger:active:focus,\n.btn-danger.active:focus,\n.open > .dropdown-toggle.btn-danger:focus,\n.btn-danger:active.focus,\n.btn-danger.active.focus,\n.open > .dropdown-toggle.btn-danger.focus {\n  color: #fff;\n  background-color: #ac2925;\n  border-color: #761c19;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n  background-image: none;\n}\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus {\n  background-color: #d9534f;\n  border-color: #d43f3a;\n}\n.btn-danger .badge {\n  color: #d9534f;\n  background-color: #fff;\n}\n.btn-link {\n  color: #337ab7;\n  font-weight: normal;\n  border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n  background-color: transparent;\n  -webkit-box-shadow: none;\n  box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n  border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n  color: #23527c;\n  text-decoration: underline;\n  background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n  color: #777777;\n  text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n  padding: 1px 5px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.btn-block {\n  display: block;\n  width: 100%;\n}\n.btn-block + .btn-block {\n  margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n  width: 100%;\n}\n.fade {\n  opacity: 0;\n  -webkit-transition: opacity 0.15s linear;\n  -o-transition: opacity 0.15s linear;\n  transition: opacity 0.15s linear;\n}\n.fade.in {\n  opacity: 1;\n}\n.collapse {\n  display: none;\n}\n.collapse.in {\n  display: block;\n}\ntr.collapse.in {\n  display: table-row;\n}\ntbody.collapse.in {\n  display: table-row-group;\n}\n.collapsing {\n  position: relative;\n  height: 0;\n  overflow: hidden;\n  -webkit-transition-property: height, visibility;\n  transition-property: height, visibility;\n  -webkit-transition-duration: 0.35s;\n  transition-duration: 0.35s;\n  -webkit-transition-timing-function: ease;\n  transition-timing-function: ease;\n}\n.caret {\n  display: inline-block;\n  width: 0;\n  height: 0;\n  margin-left: 2px;\n  vertical-align: middle;\n  border-top: 4px dashed;\n  border-top: 4px solid \\9;\n  border-right: 4px solid transparent;\n  border-left: 4px solid transparent;\n}\n.dropup,\n.dropdown {\n  position: relative;\n}\n.dropdown-toggle:focus {\n  outline: 0;\n}\n.dropdown-menu {\n  position: absolute;\n  top: 100%;\n  left: 0;\n  z-index: 1000;\n  display: none;\n  float: left;\n  min-width: 160px;\n  padding: 5px 0;\n  margin: 2px 0 0;\n  list-style: none;\n  font-size: 14px;\n  text-align: left;\n  background-color: #fff;\n  border: 1px solid #ccc;\n  border: 1px solid rgba(0, 0, 0, 0.15);\n  border-radius: 4px;\n  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n  background-clip: padding-box;\n}\n.dropdown-menu.pull-right {\n  right: 0;\n  left: auto;\n}\n.dropdown-menu .divider {\n  height: 1px;\n  margin: 9px 0;\n  overflow: hidden;\n  background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n  display: block;\n  padding: 3px 20px;\n  clear: both;\n  font-weight: normal;\n  line-height: 1.42857143;\n  color: #333333;\n  white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n  text-decoration: none;\n  color: #262626;\n  background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n  color: #fff;\n  text-decoration: none;\n  outline: 0;\n  background-color: #337ab7;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n  color: #777777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n  text-decoration: none;\n  background-color: transparent;\n  background-image: none;\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  cursor: not-allowed;\n}\n.open > .dropdown-menu {\n  display: block;\n}\n.open > a {\n  outline: 0;\n}\n.dropdown-menu-right {\n  left: auto;\n  right: 0;\n}\n.dropdown-menu-left {\n  left: 0;\n  right: auto;\n}\n.dropdown-header {\n  display: block;\n  padding: 3px 20px;\n  font-size: 12px;\n  line-height: 1.42857143;\n  color: #777777;\n  white-space: nowrap;\n}\n.dropdown-backdrop {\n  position: fixed;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  top: 0;\n  z-index: 990;\n}\n.pull-right > .dropdown-menu {\n  right: 0;\n  left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n  border-top: 0;\n  border-bottom: 4px dashed;\n  border-bottom: 4px solid \\9;\n  content: \"\";\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n  top: auto;\n  bottom: 100%;\n  margin-bottom: 2px;\n}\n@media (min-width: 768px) {\n  .navbar-right .dropdown-menu {\n    left: auto;\n    right: 0;\n  }\n  .navbar-right .dropdown-menu-left {\n    left: 0;\n    right: auto;\n  }\n}\n.btn-group,\n.btn-group-vertical {\n  position: relative;\n  display: inline-block;\n  vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n  position: relative;\n  float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n  z-index: 2;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n  margin-left: -1px;\n}\n.btn-toolbar {\n  margin-left: -5px;\n}\n.btn-toolbar .btn,\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n  float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n  margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n  border-radius: 0;\n}\n.btn-group > .btn:first-child {\n  margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n  border-bottom-right-radius: 0;\n  border-top-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n  border-bottom-left-radius: 0;\n  border-top-left-radius: 0;\n}\n.btn-group > .btn-group {\n  float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n  border-bottom-right-radius: 0;\n  border-top-right-radius: 0;\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  border-bottom-left-radius: 0;\n  border-top-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n  outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n  padding-left: 8px;\n  padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n  padding-left: 12px;\n  padding-right: 12px;\n}\n.btn-group.open .dropdown-toggle {\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n  -webkit-box-shadow: none;\n  box-shadow: none;\n}\n.btn .caret {\n  margin-left: 0;\n}\n.btn-lg .caret {\n  border-width: 5px 5px 0;\n  border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n  border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n  display: block;\n  float: none;\n  width: 100%;\n  max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n  float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n  margin-top: -1px;\n  margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n  border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n  border-top-right-radius: 4px;\n  border-top-left-radius: 4px;\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n  border-bottom-right-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n}\n.btn-group-justified {\n  display: table;\n  width: 100%;\n  table-layout: fixed;\n  border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n  float: none;\n  display: table-cell;\n  width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n  width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n  left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n  position: absolute;\n  clip: rect(0, 0, 0, 0);\n  pointer-events: none;\n}\n.input-group {\n  position: relative;\n  display: table;\n  border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n  float: none;\n  padding-left: 0;\n  padding-right: 0;\n}\n.input-group .form-control {\n  position: relative;\n  z-index: 2;\n  float: left;\n  width: 100%;\n  margin-bottom: 0;\n}\n.input-group .form-control:focus {\n  z-index: 3;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n  height: 46px;\n  line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n  height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n  height: 30px;\n  line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n  height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n  display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n  border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n  width: 1%;\n  white-space: nowrap;\n  vertical-align: middle;\n}\n.input-group-addon {\n  padding: 6px 12px;\n  font-size: 14px;\n  font-weight: normal;\n  line-height: 1;\n  color: #555555;\n  text-align: center;\n  background-color: #eeeeee;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n}\n.input-group-addon.input-sm {\n  padding: 5px 10px;\n  font-size: 12px;\n  border-radius: 3px;\n}\n.input-group-addon.input-lg {\n  padding: 10px 16px;\n  font-size: 18px;\n  border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n  margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n  border-bottom-right-radius: 0;\n  border-top-right-radius: 0;\n}\n.input-group-addon:first-child {\n  border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n  border-bottom-left-radius: 0;\n  border-top-left-radius: 0;\n}\n.input-group-addon:last-child {\n  border-left: 0;\n}\n.input-group-btn {\n  position: relative;\n  font-size: 0;\n  white-space: nowrap;\n}\n.input-group-btn > .btn {\n  position: relative;\n}\n.input-group-btn > .btn + .btn {\n  margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n  z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n  margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n  z-index: 2;\n  margin-left: -1px;\n}\n.nav {\n  margin-bottom: 0;\n  padding-left: 0;\n  list-style: none;\n}\n.nav > li {\n  position: relative;\n  display: block;\n}\n.nav > li > a {\n  position: relative;\n  display: block;\n  padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n  text-decoration: none;\n  background-color: #eeeeee;\n}\n.nav > li.disabled > a {\n  color: #777777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n  color: #777777;\n  text-decoration: none;\n  background-color: transparent;\n  cursor: not-allowed;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n  background-color: #eeeeee;\n  border-color: #337ab7;\n}\n.nav .nav-divider {\n  height: 1px;\n  margin: 9px 0;\n  overflow: hidden;\n  background-color: #e5e5e5;\n}\n.nav > li > a > img {\n  max-width: none;\n}\n.nav-tabs {\n  border-bottom: 1px solid #ddd;\n}\n.nav-tabs > li {\n  float: left;\n  margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n  margin-right: 2px;\n  line-height: 1.42857143;\n  border: 1px solid transparent;\n  border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n  border-color: #eeeeee #eeeeee #ddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n  color: #555555;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-bottom-color: transparent;\n  cursor: default;\n}\n.nav-tabs.nav-justified {\n  width: 100%;\n  border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n  float: none;\n}\n.nav-tabs.nav-justified > li > a {\n  text-align: center;\n  margin-bottom: 5px;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n  top: auto;\n  left: auto;\n}\n@media (min-width: 768px) {\n  .nav-tabs.nav-justified > li {\n    display: table-cell;\n    width: 1%;\n  }\n  .nav-tabs.nav-justified > li > a {\n    margin-bottom: 0;\n  }\n}\n.nav-tabs.nav-justified > li > a {\n  margin-right: 0;\n  border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n  border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n  .nav-tabs.nav-justified > li > a {\n    border-bottom: 1px solid #ddd;\n    border-radius: 4px 4px 0 0;\n  }\n  .nav-tabs.nav-justified > .active > a,\n  .nav-tabs.nav-justified > .active > a:hover,\n  .nav-tabs.nav-justified > .active > a:focus {\n    border-bottom-color: #fff;\n  }\n}\n.nav-pills > li {\n  float: left;\n}\n.nav-pills > li > a {\n  border-radius: 4px;\n}\n.nav-pills > li + li {\n  margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n  color: #fff;\n  background-color: #337ab7;\n}\n.nav-stacked > li {\n  float: none;\n}\n.nav-stacked > li + li {\n  margin-top: 2px;\n  margin-left: 0;\n}\n.nav-justified {\n  width: 100%;\n}\n.nav-justified > li {\n  float: none;\n}\n.nav-justified > li > a {\n  text-align: center;\n  margin-bottom: 5px;\n}\n.nav-justified > .dropdown .dropdown-menu {\n  top: auto;\n  left: auto;\n}\n@media (min-width: 768px) {\n  .nav-justified > li {\n    display: table-cell;\n    width: 1%;\n  }\n  .nav-justified > li > a {\n    margin-bottom: 0;\n  }\n}\n.nav-tabs-justified {\n  border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n  margin-right: 0;\n  border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n  border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n  .nav-tabs-justified > li > a {\n    border-bottom: 1px solid #ddd;\n    border-radius: 4px 4px 0 0;\n  }\n  .nav-tabs-justified > .active > a,\n  .nav-tabs-justified > .active > a:hover,\n  .nav-tabs-justified > .active > a:focus {\n    border-bottom-color: #fff;\n  }\n}\n.tab-content > .tab-pane {\n  display: none;\n}\n.tab-content > .active {\n  display: block;\n}\n.nav-tabs .dropdown-menu {\n  margin-top: -1px;\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n}\n.navbar {\n  position: relative;\n  min-height: 50px;\n  margin-bottom: 20px;\n  border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n  .navbar {\n    border-radius: 4px;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-header {\n    float: left;\n  }\n}\n.navbar-collapse {\n  overflow-x: visible;\n  padding-right: 15px;\n  padding-left: 15px;\n  border-top: 1px solid transparent;\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);\n  -webkit-overflow-scrolling: touch;\n}\n.navbar-collapse.in {\n  overflow-y: auto;\n}\n@media (min-width: 768px) {\n  .navbar-collapse {\n    width: auto;\n    border-top: 0;\n    box-shadow: none;\n  }\n  .navbar-collapse.collapse {\n    display: block !important;\n    height: auto !important;\n    padding-bottom: 0;\n    overflow: visible !important;\n  }\n  .navbar-collapse.in {\n    overflow-y: visible;\n  }\n  .navbar-fixed-top .navbar-collapse,\n  .navbar-static-top .navbar-collapse,\n  .navbar-fixed-bottom .navbar-collapse {\n    padding-left: 0;\n    padding-right: 0;\n  }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n  max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n  .navbar-fixed-top .navbar-collapse,\n  .navbar-fixed-bottom .navbar-collapse {\n    max-height: 200px;\n  }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n  margin-right: -15px;\n  margin-left: -15px;\n}\n@media (min-width: 768px) {\n  .container > .navbar-header,\n  .container-fluid > .navbar-header,\n  .container > .navbar-collapse,\n  .container-fluid > .navbar-collapse {\n    margin-right: 0;\n    margin-left: 0;\n  }\n}\n.navbar-static-top {\n  z-index: 1000;\n  border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n  .navbar-static-top {\n    border-radius: 0;\n  }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  position: fixed;\n  right: 0;\n  left: 0;\n  z-index: 1030;\n}\n@media (min-width: 768px) {\n  .navbar-fixed-top,\n  .navbar-fixed-bottom {\n    border-radius: 0;\n  }\n}\n.navbar-fixed-top {\n  top: 0;\n  border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n  bottom: 0;\n  margin-bottom: 0;\n  border-width: 1px 0 0;\n}\n.navbar-brand {\n  float: left;\n  padding: 15px 15px;\n  font-size: 18px;\n  line-height: 20px;\n  height: 50px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n  text-decoration: none;\n}\n.navbar-brand > img {\n  display: block;\n}\n@media (min-width: 768px) {\n  .navbar > .container .navbar-brand,\n  .navbar > .container-fluid .navbar-brand {\n    margin-left: -15px;\n  }\n}\n.navbar-toggle {\n  position: relative;\n  float: right;\n  margin-right: 15px;\n  padding: 9px 10px;\n  margin-top: 8px;\n  margin-bottom: 8px;\n  background-color: transparent;\n  background-image: none;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n.navbar-toggle:focus {\n  outline: 0;\n}\n.navbar-toggle .icon-bar {\n  display: block;\n  width: 22px;\n  height: 2px;\n  border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n  margin-top: 4px;\n}\n@media (min-width: 768px) {\n  .navbar-toggle {\n    display: none;\n  }\n}\n.navbar-nav {\n  margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n  padding-top: 10px;\n  padding-bottom: 10px;\n  line-height: 20px;\n}\n@media (max-width: 767px) {\n  .navbar-nav .open .dropdown-menu {\n    position: static;\n    float: none;\n    width: auto;\n    margin-top: 0;\n    background-color: transparent;\n    border: 0;\n    box-shadow: none;\n  }\n  .navbar-nav .open .dropdown-menu > li > a,\n  .navbar-nav .open .dropdown-menu .dropdown-header {\n    padding: 5px 15px 5px 25px;\n  }\n  .navbar-nav .open .dropdown-menu > li > a {\n    line-height: 20px;\n  }\n  .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-nav .open .dropdown-menu > li > a:focus {\n    background-image: none;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-nav {\n    float: left;\n    margin: 0;\n  }\n  .navbar-nav > li {\n    float: left;\n  }\n  .navbar-nav > li > a {\n    padding-top: 15px;\n    padding-bottom: 15px;\n  }\n}\n.navbar-form {\n  margin-left: -15px;\n  margin-right: -15px;\n  padding: 10px 15px;\n  border-top: 1px solid transparent;\n  border-bottom: 1px solid transparent;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n  margin-top: 8px;\n  margin-bottom: 8px;\n}\n@media (min-width: 768px) {\n  .navbar-form .form-group {\n    display: inline-block;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .form-control {\n    display: inline-block;\n    width: auto;\n    vertical-align: middle;\n  }\n  .navbar-form .form-control-static {\n    display: inline-block;\n  }\n  .navbar-form .input-group {\n    display: inline-table;\n    vertical-align: middle;\n  }\n  .navbar-form .input-group .input-group-addon,\n  .navbar-form .input-group .input-group-btn,\n  .navbar-form .input-group .form-control {\n    width: auto;\n  }\n  .navbar-form .input-group > .form-control {\n    width: 100%;\n  }\n  .navbar-form .control-label {\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .radio,\n  .navbar-form .checkbox {\n    display: inline-block;\n    margin-top: 0;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .radio label,\n  .navbar-form .checkbox label {\n    padding-left: 0;\n  }\n  .navbar-form .radio input[type=\"radio\"],\n  .navbar-form .checkbox input[type=\"checkbox\"] {\n    position: relative;\n    margin-left: 0;\n  }\n  .navbar-form .has-feedback .form-control-feedback {\n    top: 0;\n  }\n}\n@media (max-width: 767px) {\n  .navbar-form .form-group {\n    margin-bottom: 5px;\n  }\n  .navbar-form .form-group:last-child {\n    margin-bottom: 0;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-form {\n    width: auto;\n    border: 0;\n    margin-left: 0;\n    margin-right: 0;\n    padding-top: 0;\n    padding-bottom: 0;\n    -webkit-box-shadow: none;\n    box-shadow: none;\n  }\n}\n.navbar-nav > li > .dropdown-menu {\n  margin-top: 0;\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n  margin-bottom: 0;\n  border-top-right-radius: 4px;\n  border-top-left-radius: 4px;\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.navbar-btn {\n  margin-top: 8px;\n  margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n  margin-top: 14px;\n  margin-bottom: 14px;\n}\n.navbar-text {\n  margin-top: 15px;\n  margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n  .navbar-text {\n    float: left;\n    margin-left: 15px;\n    margin-right: 15px;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-left {\n    float: left !important;\n  }\n  .navbar-right {\n    float: right !important;\n    margin-right: -15px;\n  }\n  .navbar-right ~ .navbar-right {\n    margin-right: 0;\n  }\n}\n.navbar-default {\n  background-color: #f8f8f8;\n  border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n  color: #777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n  color: #5e5e5e;\n  background-color: transparent;\n}\n.navbar-default .navbar-text {\n  color: #777;\n}\n.navbar-default .navbar-nav > li > a {\n  color: #777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n  color: #333;\n  background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n  color: #555;\n  background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n  color: #ccc;\n  background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n  border-color: #ddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n  background-color: #ddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n  background-color: #888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n  border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n  background-color: #e7e7e7;\n  color: #555;\n}\n@media (max-width: 767px) {\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n    color: #777;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n    color: #333;\n    background-color: transparent;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #555;\n    background-color: #e7e7e7;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n    color: #ccc;\n    background-color: transparent;\n  }\n}\n.navbar-default .navbar-link {\n  color: #777;\n}\n.navbar-default .navbar-link:hover {\n  color: #333;\n}\n.navbar-default .btn-link {\n  color: #777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n  color: #333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n  color: #ccc;\n}\n.navbar-inverse {\n  background-color: #222;\n  border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n  color: #fff;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n  color: #fff;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n  color: #fff;\n  background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n  color: #444;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n  border-color: #333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n  background-color: #333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n  background-color: #fff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n  border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n  background-color: #080808;\n  color: #fff;\n}\n@media (max-width: 767px) {\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n    border-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n    background-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n    color: #9d9d9d;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n    color: #fff;\n    background-color: transparent;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #fff;\n    background-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n    color: #444;\n    background-color: transparent;\n  }\n}\n.navbar-inverse .navbar-link {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n  color: #fff;\n}\n.navbar-inverse .btn-link {\n  color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n  color: #fff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n  color: #444;\n}\n.breadcrumb {\n  padding: 8px 15px;\n  margin-bottom: 20px;\n  list-style: none;\n  background-color: #f5f5f5;\n  border-radius: 4px;\n}\n.breadcrumb > li {\n  display: inline-block;\n}\n.breadcrumb > li + li:before {\n  content: \"/\\00a0\";\n  padding: 0 5px;\n  color: #ccc;\n}\n.breadcrumb > .active {\n  color: #777777;\n}\n.pagination {\n  display: inline-block;\n  padding-left: 0;\n  margin: 20px 0;\n  border-radius: 4px;\n}\n.pagination > li {\n  display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n  position: relative;\n  float: left;\n  padding: 6px 12px;\n  line-height: 1.42857143;\n  text-decoration: none;\n  color: #337ab7;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  margin-left: -1px;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n  margin-left: 0;\n  border-bottom-left-radius: 4px;\n  border-top-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n  border-bottom-right-radius: 4px;\n  border-top-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n  z-index: 2;\n  color: #23527c;\n  background-color: #eeeeee;\n  border-color: #ddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n  z-index: 3;\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #337ab7;\n  cursor: default;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n  color: #777777;\n  background-color: #fff;\n  border-color: #ddd;\n  cursor: not-allowed;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n  border-bottom-left-radius: 6px;\n  border-top-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n  border-bottom-right-radius: 6px;\n  border-top-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n  border-bottom-left-radius: 3px;\n  border-top-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n  border-bottom-right-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.pager {\n  padding-left: 0;\n  margin: 20px 0;\n  list-style: none;\n  text-align: center;\n}\n.pager li {\n  display: inline;\n}\n.pager li > a,\n.pager li > span {\n  display: inline-block;\n  padding: 5px 14px;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n  text-decoration: none;\n  background-color: #eeeeee;\n}\n.pager .next > a,\n.pager .next > span {\n  float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n  float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n  color: #777777;\n  background-color: #fff;\n  cursor: not-allowed;\n}\n.label {\n  display: inline;\n  padding: .2em .6em .3em;\n  font-size: 75%;\n  font-weight: bold;\n  line-height: 1;\n  color: #fff;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: baseline;\n  border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n  color: #fff;\n  text-decoration: none;\n  cursor: pointer;\n}\n.label:empty {\n  display: none;\n}\n.btn .label {\n  position: relative;\n  top: -1px;\n}\n.label-default {\n  background-color: #777777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n  background-color: #5e5e5e;\n}\n.label-primary {\n  background-color: #337ab7;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n  background-color: #286090;\n}\n.label-success {\n  background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n  background-color: #449d44;\n}\n.label-info {\n  background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n  background-color: #31b0d5;\n}\n.label-warning {\n  background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n  background-color: #ec971f;\n}\n.label-danger {\n  background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n  background-color: #c9302c;\n}\n.badge {\n  display: inline-block;\n  min-width: 10px;\n  padding: 3px 7px;\n  font-size: 12px;\n  font-weight: bold;\n  color: #fff;\n  line-height: 1;\n  vertical-align: middle;\n  white-space: nowrap;\n  text-align: center;\n  background-color: #777777;\n  border-radius: 10px;\n}\n.badge:empty {\n  display: none;\n}\n.btn .badge {\n  position: relative;\n  top: -1px;\n}\n.btn-xs .badge,\n.btn-group-xs > .btn .badge {\n  top: 0;\n  padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n  color: #fff;\n  text-decoration: none;\n  cursor: pointer;\n}\n.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.list-group-item > .badge {\n  float: right;\n}\n.list-group-item > .badge + .badge {\n  margin-right: 5px;\n}\n.nav-pills > li > a > .badge {\n  margin-left: 3px;\n}\n.jumbotron {\n  padding-top: 30px;\n  padding-bottom: 30px;\n  margin-bottom: 30px;\n  color: inherit;\n  background-color: #eeeeee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n  color: inherit;\n}\n.jumbotron p {\n  margin-bottom: 15px;\n  font-size: 21px;\n  font-weight: 200;\n}\n.jumbotron > hr {\n  border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n  border-radius: 6px;\n  padding-left: 15px;\n  padding-right: 15px;\n}\n.jumbotron .container {\n  max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n  .jumbotron {\n    padding-top: 48px;\n    padding-bottom: 48px;\n  }\n  .container .jumbotron,\n  .container-fluid .jumbotron {\n    padding-left: 60px;\n    padding-right: 60px;\n  }\n  .jumbotron h1,\n  .jumbotron .h1 {\n    font-size: 63px;\n  }\n}\n.thumbnail {\n  display: block;\n  padding: 4px;\n  margin-bottom: 20px;\n  line-height: 1.42857143;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 4px;\n  -webkit-transition: border 0.2s ease-in-out;\n  -o-transition: border 0.2s ease-in-out;\n  transition: border 0.2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n  margin-left: auto;\n  margin-right: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n  border-color: #337ab7;\n}\n.thumbnail .caption {\n  padding: 9px;\n  color: #333333;\n}\n.alert {\n  padding: 15px;\n  margin-bottom: 20px;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n.alert h4 {\n  margin-top: 0;\n  color: inherit;\n}\n.alert .alert-link {\n  font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n  margin-bottom: 0;\n}\n.alert > p + p {\n  margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n  padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n  position: relative;\n  top: -2px;\n  right: -21px;\n  color: inherit;\n}\n.alert-success {\n  background-color: #dff0d8;\n  border-color: #d6e9c6;\n  color: #3c763d;\n}\n.alert-success hr {\n  border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n  color: #2b542c;\n}\n.alert-info {\n  background-color: #d9edf7;\n  border-color: #bce8f1;\n  color: #31708f;\n}\n.alert-info hr {\n  border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n  color: #245269;\n}\n.alert-warning {\n  background-color: #fcf8e3;\n  border-color: #faebcc;\n  color: #8a6d3b;\n}\n.alert-warning hr {\n  border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n  color: #66512c;\n}\n.alert-danger {\n  background-color: #f2dede;\n  border-color: #ebccd1;\n  color: #a94442;\n}\n.alert-danger hr {\n  border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n  color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n@keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n.progress {\n  overflow: hidden;\n  height: 20px;\n  margin-bottom: 20px;\n  background-color: #f5f5f5;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.progress-bar {\n  float: left;\n  width: 0%;\n  height: 100%;\n  font-size: 12px;\n  line-height: 20px;\n  color: #fff;\n  text-align: center;\n  background-color: #337ab7;\n  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n  -webkit-transition: width 0.6s ease;\n  -o-transition: width 0.6s ease;\n  transition: width 0.6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n  -webkit-animation: progress-bar-stripes 2s linear infinite;\n  -o-animation: progress-bar-stripes 2s linear infinite;\n  animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n  background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n  background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n  background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n  background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.media {\n  margin-top: 15px;\n}\n.media:first-child {\n  margin-top: 0;\n}\n.media,\n.media-body {\n  zoom: 1;\n  overflow: hidden;\n}\n.media-body {\n  width: 10000px;\n}\n.media-object {\n  display: block;\n}\n.media-object.img-thumbnail {\n  max-width: none;\n}\n.media-right,\n.media > .pull-right {\n  padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n  padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n  display: table-cell;\n  vertical-align: top;\n}\n.media-middle {\n  vertical-align: middle;\n}\n.media-bottom {\n  vertical-align: bottom;\n}\n.media-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n.media-list {\n  padding-left: 0;\n  list-style: none;\n}\n.list-group {\n  margin-bottom: 20px;\n  padding-left: 0;\n}\n.list-group-item {\n  position: relative;\n  display: block;\n  padding: 10px 15px;\n  margin-bottom: -1px;\n  background-color: #fff;\n  border: 1px solid #ddd;\n}\n.list-group-item:first-child {\n  border-top-right-radius: 4px;\n  border-top-left-radius: 4px;\n}\n.list-group-item:last-child {\n  margin-bottom: 0;\n  border-bottom-right-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\na.list-group-item,\nbutton.list-group-item {\n  color: #555;\n}\na.list-group-item .list-group-item-heading,\nbutton.list-group-item .list-group-item-heading {\n  color: #333;\n}\na.list-group-item:hover,\nbutton.list-group-item:hover,\na.list-group-item:focus,\nbutton.list-group-item:focus {\n  text-decoration: none;\n  color: #555;\n  background-color: #f5f5f5;\n}\nbutton.list-group-item {\n  width: 100%;\n  text-align: left;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n  background-color: #eeeeee;\n  color: #777777;\n  cursor: not-allowed;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n  color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n  color: #777777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n  z-index: 2;\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #337ab7;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n  color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n  color: #c7ddef;\n}\n.list-group-item-success {\n  color: #3c763d;\n  background-color: #dff0d8;\n}\na.list-group-item-success,\nbutton.list-group-item-success {\n  color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading,\nbutton.list-group-item-success .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-success:hover,\nbutton.list-group-item-success:hover,\na.list-group-item-success:focus,\nbutton.list-group-item-success:focus {\n  color: #3c763d;\n  background-color: #d0e9c6;\n}\na.list-group-item-success.active,\nbutton.list-group-item-success.active,\na.list-group-item-success.active:hover,\nbutton.list-group-item-success.active:hover,\na.list-group-item-success.active:focus,\nbutton.list-group-item-success.active:focus {\n  color: #fff;\n  background-color: #3c763d;\n  border-color: #3c763d;\n}\n.list-group-item-info {\n  color: #31708f;\n  background-color: #d9edf7;\n}\na.list-group-item-info,\nbutton.list-group-item-info {\n  color: #31708f;\n}\na.list-group-item-info .list-group-item-heading,\nbutton.list-group-item-info .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-info:hover,\nbutton.list-group-item-info:hover,\na.list-group-item-info:focus,\nbutton.list-group-item-info:focus {\n  color: #31708f;\n  background-color: #c4e3f3;\n}\na.list-group-item-info.active,\nbutton.list-group-item-info.active,\na.list-group-item-info.active:hover,\nbutton.list-group-item-info.active:hover,\na.list-group-item-info.active:focus,\nbutton.list-group-item-info.active:focus {\n  color: #fff;\n  background-color: #31708f;\n  border-color: #31708f;\n}\n.list-group-item-warning {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n}\na.list-group-item-warning,\nbutton.list-group-item-warning {\n  color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading,\nbutton.list-group-item-warning .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-warning:hover,\nbutton.list-group-item-warning:hover,\na.list-group-item-warning:focus,\nbutton.list-group-item-warning:focus {\n  color: #8a6d3b;\n  background-color: #faf2cc;\n}\na.list-group-item-warning.active,\nbutton.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\nbutton.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus,\nbutton.list-group-item-warning.active:focus {\n  color: #fff;\n  background-color: #8a6d3b;\n  border-color: #8a6d3b;\n}\n.list-group-item-danger {\n  color: #a94442;\n  background-color: #f2dede;\n}\na.list-group-item-danger,\nbutton.list-group-item-danger {\n  color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading,\nbutton.list-group-item-danger .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-danger:hover,\nbutton.list-group-item-danger:hover,\na.list-group-item-danger:focus,\nbutton.list-group-item-danger:focus {\n  color: #a94442;\n  background-color: #ebcccc;\n}\na.list-group-item-danger.active,\nbutton.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\nbutton.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus,\nbutton.list-group-item-danger.active:focus {\n  color: #fff;\n  background-color: #a94442;\n  border-color: #a94442;\n}\n.list-group-item-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n.list-group-item-text {\n  margin-bottom: 0;\n  line-height: 1.3;\n}\n.panel {\n  margin-bottom: 20px;\n  background-color: #fff;\n  border: 1px solid transparent;\n  border-radius: 4px;\n  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.panel-body {\n  padding: 15px;\n}\n.panel-heading {\n  padding: 10px 15px;\n  border-bottom: 1px solid transparent;\n  border-top-right-radius: 3px;\n  border-top-left-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n  color: inherit;\n}\n.panel-title {\n  margin-top: 0;\n  margin-bottom: 0;\n  font-size: 16px;\n  color: inherit;\n}\n.panel-title > a,\n.panel-title > small,\n.panel-title > .small,\n.panel-title > small > a,\n.panel-title > .small > a {\n  color: inherit;\n}\n.panel-footer {\n  padding: 10px 15px;\n  background-color: #f5f5f5;\n  border-top: 1px solid #ddd;\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n  margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n  border-width: 1px 0;\n  border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n  border-top: 0;\n  border-top-right-radius: 3px;\n  border-top-left-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n  border-bottom: 0;\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n  border-top-width: 0;\n}\n.list-group + .panel-footer {\n  border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n  margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n  padding-left: 15px;\n  padding-right: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n  border-top-right-radius: 3px;\n  border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n  border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n  border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n  border-bottom-left-radius: 3px;\n  border-bottom-right-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n  border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n  border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n  border-top: 1px solid #ddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n  border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n  border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n  border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n  border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n  border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n  border-bottom: 0;\n}\n.panel > .table-responsive {\n  border: 0;\n  margin-bottom: 0;\n}\n.panel-group {\n  margin-bottom: 20px;\n}\n.panel-group .panel {\n  margin-bottom: 0;\n  border-radius: 4px;\n}\n.panel-group .panel + .panel {\n  margin-top: 5px;\n}\n.panel-group .panel-heading {\n  border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n  border-top: 1px solid #ddd;\n}\n.panel-group .panel-footer {\n  border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n  border-bottom: 1px solid #ddd;\n}\n.panel-default {\n  border-color: #ddd;\n}\n.panel-default > .panel-heading {\n  color: #333333;\n  background-color: #f5f5f5;\n  border-color: #ddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #ddd;\n}\n.panel-default > .panel-heading .badge {\n  color: #f5f5f5;\n  background-color: #333333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #ddd;\n}\n.panel-primary {\n  border-color: #337ab7;\n}\n.panel-primary > .panel-heading {\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #337ab7;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #337ab7;\n}\n.panel-primary > .panel-heading .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #337ab7;\n}\n.panel-success {\n  border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n  color: #3c763d;\n  background-color: #dff0d8;\n  border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n  color: #dff0d8;\n  background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #d6e9c6;\n}\n.panel-info {\n  border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n  color: #31708f;\n  background-color: #d9edf7;\n  border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n  color: #d9edf7;\n  background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #bce8f1;\n}\n.panel-warning {\n  border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n  border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n  color: #fcf8e3;\n  background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #faebcc;\n}\n.panel-danger {\n  border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n  color: #a94442;\n  background-color: #f2dede;\n  border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n  color: #f2dede;\n  background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #ebccd1;\n}\n.embed-responsive {\n  position: relative;\n  display: block;\n  height: 0;\n  padding: 0;\n  overflow: hidden;\n}\n.embed-responsive .embed-responsive-item,\n.embed-responsive iframe,\n.embed-responsive embed,\n.embed-responsive object,\n.embed-responsive video {\n  position: absolute;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  height: 100%;\n  width: 100%;\n  border: 0;\n}\n.embed-responsive-16by9 {\n  padding-bottom: 56.25%;\n}\n.embed-responsive-4by3 {\n  padding-bottom: 75%;\n}\n.well {\n  min-height: 20px;\n  padding: 19px;\n  margin-bottom: 20px;\n  background-color: #f5f5f5;\n  border: 1px solid #e3e3e3;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.well blockquote {\n  border-color: #ddd;\n  border-color: rgba(0, 0, 0, 0.15);\n}\n.well-lg {\n  padding: 24px;\n  border-radius: 6px;\n}\n.well-sm {\n  padding: 9px;\n  border-radius: 3px;\n}\n.close {\n  float: right;\n  font-size: 21px;\n  font-weight: bold;\n  line-height: 1;\n  color: #000;\n  text-shadow: 0 1px 0 #fff;\n  opacity: 0.2;\n  filter: alpha(opacity=20);\n}\n.close:hover,\n.close:focus {\n  color: #000;\n  text-decoration: none;\n  cursor: pointer;\n  opacity: 0.5;\n  filter: alpha(opacity=50);\n}\nbutton.close {\n  padding: 0;\n  cursor: pointer;\n  background: transparent;\n  border: 0;\n  -webkit-appearance: none;\n}\n.modal-open {\n  overflow: hidden;\n}\n.modal {\n  display: none;\n  overflow: hidden;\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 1050;\n  -webkit-overflow-scrolling: touch;\n  outline: 0;\n}\n.modal.fade .modal-dialog {\n  -webkit-transform: translate(0, -25%);\n  -ms-transform: translate(0, -25%);\n  -o-transform: translate(0, -25%);\n  transform: translate(0, -25%);\n  -webkit-transition: -webkit-transform 0.3s ease-out;\n  -moz-transition: -moz-transform 0.3s ease-out;\n  -o-transition: -o-transform 0.3s ease-out;\n  transition: transform 0.3s ease-out;\n}\n.modal.in .modal-dialog {\n  -webkit-transform: translate(0, 0);\n  -ms-transform: translate(0, 0);\n  -o-transform: translate(0, 0);\n  transform: translate(0, 0);\n}\n.modal-open .modal {\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n.modal-dialog {\n  position: relative;\n  width: auto;\n  margin: 10px;\n}\n.modal-content {\n  position: relative;\n  background-color: #fff;\n  border: 1px solid #999;\n  border: 1px solid rgba(0, 0, 0, 0.2);\n  border-radius: 6px;\n  -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n  background-clip: padding-box;\n  outline: 0;\n}\n.modal-backdrop {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 1040;\n  background-color: #000;\n}\n.modal-backdrop.fade {\n  opacity: 0;\n  filter: alpha(opacity=0);\n}\n.modal-backdrop.in {\n  opacity: 0.5;\n  filter: alpha(opacity=50);\n}\n.modal-header {\n  padding: 15px;\n  border-bottom: 1px solid #e5e5e5;\n}\n.modal-header .close {\n  margin-top: -2px;\n}\n.modal-title {\n  margin: 0;\n  line-height: 1.42857143;\n}\n.modal-body {\n  position: relative;\n  padding: 15px;\n}\n.modal-footer {\n  padding: 15px;\n  text-align: right;\n  border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n  margin-left: 5px;\n  margin-bottom: 0;\n}\n.modal-footer .btn-group .btn + .btn {\n  margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n  margin-left: 0;\n}\n.modal-scrollbar-measure {\n  position: absolute;\n  top: -9999px;\n  width: 50px;\n  height: 50px;\n  overflow: scroll;\n}\n@media (min-width: 768px) {\n  .modal-dialog {\n    width: 600px;\n    margin: 30px auto;\n  }\n  .modal-content {\n    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n  }\n  .modal-sm {\n    width: 300px;\n  }\n}\n@media (min-width: 992px) {\n  .modal-lg {\n    width: 900px;\n  }\n}\n.tooltip {\n  position: absolute;\n  z-index: 1070;\n  display: block;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-style: normal;\n  font-weight: normal;\n  letter-spacing: normal;\n  line-break: auto;\n  line-height: 1.42857143;\n  text-align: left;\n  text-align: start;\n  text-decoration: none;\n  text-shadow: none;\n  text-transform: none;\n  white-space: normal;\n  word-break: normal;\n  word-spacing: normal;\n  word-wrap: normal;\n  font-size: 12px;\n  opacity: 0;\n  filter: alpha(opacity=0);\n}\n.tooltip.in {\n  opacity: 0.9;\n  filter: alpha(opacity=90);\n}\n.tooltip.top {\n  margin-top: -3px;\n  padding: 5px 0;\n}\n.tooltip.right {\n  margin-left: 3px;\n  padding: 0 5px;\n}\n.tooltip.bottom {\n  margin-top: 3px;\n  padding: 5px 0;\n}\n.tooltip.left {\n  margin-left: -3px;\n  padding: 0 5px;\n}\n.tooltip-inner {\n  max-width: 200px;\n  padding: 3px 8px;\n  color: #fff;\n  text-align: center;\n  background-color: #000;\n  border-radius: 4px;\n}\n.tooltip-arrow {\n  position: absolute;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n  bottom: 0;\n  left: 50%;\n  margin-left: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.top-left .tooltip-arrow {\n  bottom: 0;\n  right: 5px;\n  margin-bottom: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.top-right .tooltip-arrow {\n  bottom: 0;\n  left: 5px;\n  margin-bottom: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.right .tooltip-arrow {\n  top: 50%;\n  left: 0;\n  margin-top: -5px;\n  border-width: 5px 5px 5px 0;\n  border-right-color: #000;\n}\n.tooltip.left .tooltip-arrow {\n  top: 50%;\n  right: 0;\n  margin-top: -5px;\n  border-width: 5px 0 5px 5px;\n  border-left-color: #000;\n}\n.tooltip.bottom .tooltip-arrow {\n  top: 0;\n  left: 50%;\n  margin-left: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n  top: 0;\n  right: 5px;\n  margin-top: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n  top: 0;\n  left: 5px;\n  margin-top: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.popover {\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: 1060;\n  display: none;\n  max-width: 276px;\n  padding: 1px;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-style: normal;\n  font-weight: normal;\n  letter-spacing: normal;\n  line-break: auto;\n  line-height: 1.42857143;\n  text-align: left;\n  text-align: start;\n  text-decoration: none;\n  text-shadow: none;\n  text-transform: none;\n  white-space: normal;\n  word-break: normal;\n  word-spacing: normal;\n  word-wrap: normal;\n  font-size: 14px;\n  background-color: #fff;\n  background-clip: padding-box;\n  border: 1px solid #ccc;\n  border: 1px solid rgba(0, 0, 0, 0.2);\n  border-radius: 6px;\n  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n}\n.popover.top {\n  margin-top: -10px;\n}\n.popover.right {\n  margin-left: 10px;\n}\n.popover.bottom {\n  margin-top: 10px;\n}\n.popover.left {\n  margin-left: -10px;\n}\n.popover-title {\n  margin: 0;\n  padding: 8px 14px;\n  font-size: 14px;\n  background-color: #f7f7f7;\n  border-bottom: 1px solid #ebebeb;\n  border-radius: 5px 5px 0 0;\n}\n.popover-content {\n  padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n  position: absolute;\n  display: block;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n.popover > .arrow {\n  border-width: 11px;\n}\n.popover > .arrow:after {\n  border-width: 10px;\n  content: \"\";\n}\n.popover.top > .arrow {\n  left: 50%;\n  margin-left: -11px;\n  border-bottom-width: 0;\n  border-top-color: #999999;\n  border-top-color: rgba(0, 0, 0, 0.25);\n  bottom: -11px;\n}\n.popover.top > .arrow:after {\n  content: \" \";\n  bottom: 1px;\n  margin-left: -10px;\n  border-bottom-width: 0;\n  border-top-color: #fff;\n}\n.popover.right > .arrow {\n  top: 50%;\n  left: -11px;\n  margin-top: -11px;\n  border-left-width: 0;\n  border-right-color: #999999;\n  border-right-color: rgba(0, 0, 0, 0.25);\n}\n.popover.right > .arrow:after {\n  content: \" \";\n  left: 1px;\n  bottom: -10px;\n  border-left-width: 0;\n  border-right-color: #fff;\n}\n.popover.bottom > .arrow {\n  left: 50%;\n  margin-left: -11px;\n  border-top-width: 0;\n  border-bottom-color: #999999;\n  border-bottom-color: rgba(0, 0, 0, 0.25);\n  top: -11px;\n}\n.popover.bottom > .arrow:after {\n  content: \" \";\n  top: 1px;\n  margin-left: -10px;\n  border-top-width: 0;\n  border-bottom-color: #fff;\n}\n.popover.left > .arrow {\n  top: 50%;\n  right: -11px;\n  margin-top: -11px;\n  border-right-width: 0;\n  border-left-color: #999999;\n  border-left-color: rgba(0, 0, 0, 0.25);\n}\n.popover.left > .arrow:after {\n  content: \" \";\n  right: 1px;\n  border-right-width: 0;\n  border-left-color: #fff;\n  bottom: -10px;\n}\n.carousel {\n  position: relative;\n}\n.carousel-inner {\n  position: relative;\n  overflow: hidden;\n  width: 100%;\n}\n.carousel-inner > .item {\n  display: none;\n  position: relative;\n  -webkit-transition: 0.6s ease-in-out left;\n  -o-transition: 0.6s ease-in-out left;\n  transition: 0.6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n  line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n  .carousel-inner > .item {\n    -webkit-transition: -webkit-transform 0.6s ease-in-out;\n    -moz-transition: -moz-transform 0.6s ease-in-out;\n    -o-transition: -o-transform 0.6s ease-in-out;\n    transition: transform 0.6s ease-in-out;\n    -webkit-backface-visibility: hidden;\n    -moz-backface-visibility: hidden;\n    backface-visibility: hidden;\n    -webkit-perspective: 1000px;\n    -moz-perspective: 1000px;\n    perspective: 1000px;\n  }\n  .carousel-inner > .item.next,\n  .carousel-inner > .item.active.right {\n    -webkit-transform: translate3d(100%, 0, 0);\n    transform: translate3d(100%, 0, 0);\n    left: 0;\n  }\n  .carousel-inner > .item.prev,\n  .carousel-inner > .item.active.left {\n    -webkit-transform: translate3d(-100%, 0, 0);\n    transform: translate3d(-100%, 0, 0);\n    left: 0;\n  }\n  .carousel-inner > .item.next.left,\n  .carousel-inner > .item.prev.right,\n  .carousel-inner > .item.active {\n    -webkit-transform: translate3d(0, 0, 0);\n    transform: translate3d(0, 0, 0);\n    left: 0;\n  }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n  display: block;\n}\n.carousel-inner > .active {\n  left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n  position: absolute;\n  top: 0;\n  width: 100%;\n}\n.carousel-inner > .next {\n  left: 100%;\n}\n.carousel-inner > .prev {\n  left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n  left: 0;\n}\n.carousel-inner > .active.left {\n  left: -100%;\n}\n.carousel-inner > .active.right {\n  left: 100%;\n}\n.carousel-control {\n  position: absolute;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  width: 15%;\n  opacity: 0.5;\n  filter: alpha(opacity=50);\n  font-size: 20px;\n  color: #fff;\n  text-align: center;\n  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n  background-color: rgba(0, 0, 0, 0);\n}\n.carousel-control.left {\n  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n  background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n}\n.carousel-control.right {\n  left: auto;\n  right: 0;\n  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n  background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n}\n.carousel-control:hover,\n.carousel-control:focus {\n  outline: 0;\n  color: #fff;\n  text-decoration: none;\n  opacity: 0.9;\n  filter: alpha(opacity=90);\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n  position: absolute;\n  top: 50%;\n  margin-top: -10px;\n  z-index: 5;\n  display: inline-block;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n  left: 50%;\n  margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n  right: 50%;\n  margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n  width: 20px;\n  height: 20px;\n  line-height: 1;\n  font-family: serif;\n}\n.carousel-control .icon-prev:before {\n  content: '\\2039';\n}\n.carousel-control .icon-next:before {\n  content: '\\203a';\n}\n.carousel-indicators {\n  position: absolute;\n  bottom: 10px;\n  left: 50%;\n  z-index: 15;\n  width: 60%;\n  margin-left: -30%;\n  padding-left: 0;\n  list-style: none;\n  text-align: center;\n}\n.carousel-indicators li {\n  display: inline-block;\n  width: 10px;\n  height: 10px;\n  margin: 1px;\n  text-indent: -999px;\n  border: 1px solid #fff;\n  border-radius: 10px;\n  cursor: pointer;\n  background-color: #000 \\9;\n  background-color: rgba(0, 0, 0, 0);\n}\n.carousel-indicators .active {\n  margin: 0;\n  width: 12px;\n  height: 12px;\n  background-color: #fff;\n}\n.carousel-caption {\n  position: absolute;\n  left: 15%;\n  right: 15%;\n  bottom: 20px;\n  z-index: 10;\n  padding-top: 20px;\n  padding-bottom: 20px;\n  color: #fff;\n  text-align: center;\n  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n}\n.carousel-caption .btn {\n  text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n  .carousel-control .glyphicon-chevron-left,\n  .carousel-control .glyphicon-chevron-right,\n  .carousel-control .icon-prev,\n  .carousel-control .icon-next {\n    width: 30px;\n    height: 30px;\n    margin-top: -10px;\n    font-size: 30px;\n  }\n  .carousel-control .glyphicon-chevron-left,\n  .carousel-control .icon-prev {\n    margin-left: -10px;\n  }\n  .carousel-control .glyphicon-chevron-right,\n  .carousel-control .icon-next {\n    margin-right: -10px;\n  }\n  .carousel-caption {\n    left: 20%;\n    right: 20%;\n    padding-bottom: 30px;\n  }\n  .carousel-indicators {\n    bottom: 20px;\n  }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-header:before,\n.modal-header:after,\n.modal-footer:before,\n.modal-footer:after {\n  content: \" \";\n  display: table;\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-header:after,\n.modal-footer:after {\n  clear: both;\n}\n.center-block {\n  display: block;\n  margin-left: auto;\n  margin-right: auto;\n}\n.pull-right {\n  float: right !important;\n}\n.pull-left {\n  float: left !important;\n}\n.hide {\n  display: none !important;\n}\n.show {\n  display: block !important;\n}\n.invisible {\n  visibility: hidden;\n}\n.text-hide {\n  font: 0/0 a;\n  color: transparent;\n  text-shadow: none;\n  background-color: transparent;\n  border: 0;\n}\n.hidden {\n  display: none !important;\n}\n.affix {\n  position: fixed;\n}\n@-ms-viewport {\n  width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n  display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n  display: none !important;\n}\n@media (max-width: 767px) {\n  .visible-xs {\n    display: block !important;\n  }\n  table.visible-xs {\n    display: table !important;\n  }\n  tr.visible-xs {\n    display: table-row !important;\n  }\n  th.visible-xs,\n  td.visible-xs {\n    display: table-cell !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-block {\n    display: block !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-inline {\n    display: inline !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm {\n    display: block !important;\n  }\n  table.visible-sm {\n    display: table !important;\n  }\n  tr.visible-sm {\n    display: table-row !important;\n  }\n  th.visible-sm,\n  td.visible-sm {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-block {\n    display: block !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md {\n    display: block !important;\n  }\n  table.visible-md {\n    display: table !important;\n  }\n  tr.visible-md {\n    display: table-row !important;\n  }\n  th.visible-md,\n  td.visible-md {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-block {\n    display: block !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg {\n    display: block !important;\n  }\n  table.visible-lg {\n    display: table !important;\n  }\n  tr.visible-lg {\n    display: table-row !important;\n  }\n  th.visible-lg,\n  td.visible-lg {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-block {\n    display: block !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (max-width: 767px) {\n  .hidden-xs {\n    display: none !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .hidden-sm {\n    display: none !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .hidden-md {\n    display: none !important;\n  }\n}\n@media (min-width: 1200px) {\n  .hidden-lg {\n    display: none !important;\n  }\n}\n.visible-print {\n  display: none !important;\n}\n@media print {\n  .visible-print {\n    display: block !important;\n  }\n  table.visible-print {\n    display: table !important;\n  }\n  tr.visible-print {\n    display: table-row !important;\n  }\n  th.visible-print,\n  td.visible-print {\n    display: table-cell !important;\n  }\n}\n.visible-print-block {\n  display: none !important;\n}\n@media print {\n  .visible-print-block {\n    display: block !important;\n  }\n}\n.visible-print-inline {\n  display: none !important;\n}\n@media print {\n  .visible-print-inline {\n    display: inline !important;\n  }\n}\n.visible-print-inline-block {\n  display: none !important;\n}\n@media print {\n  .visible-print-inline-block {\n    display: inline-block !important;\n  }\n}\n@media print {\n  .hidden-print {\n    display: none !important;\n  }\n}\n/*# sourceMappingURL=bootstrap.css.map */","/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\n\n//\n// 1. Set default font family to sans-serif.\n// 2. Prevent iOS and IE text size adjust after device orientation change,\n//    without disabling user zoom.\n//\n\nhtml {\n  font-family: sans-serif; // 1\n  -ms-text-size-adjust: 100%; // 2\n  -webkit-text-size-adjust: 100%; // 2\n}\n\n//\n// Remove default margin.\n//\n\nbody {\n  margin: 0;\n}\n\n// HTML5 display definitions\n// ==========================================================================\n\n//\n// Correct `block` display not defined for any HTML5 element in IE 8/9.\n// Correct `block` display not defined for `details` or `summary` in IE 10/11\n// and Firefox.\n// Correct `block` display not defined for `main` in IE 11.\n//\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n  display: block;\n}\n\n//\n// 1. Correct `inline-block` display not defined in IE 8/9.\n// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n//\n\naudio,\ncanvas,\nprogress,\nvideo {\n  display: inline-block; // 1\n  vertical-align: baseline; // 2\n}\n\n//\n// Prevent modern browsers from displaying `audio` without controls.\n// Remove excess height in iOS 5 devices.\n//\n\naudio:not([controls]) {\n  display: none;\n  height: 0;\n}\n\n//\n// Address `[hidden]` styling not present in IE 8/9/10.\n// Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.\n//\n\n[hidden],\ntemplate {\n  display: none;\n}\n\n// Links\n// ==========================================================================\n\n//\n// Remove the gray background color from active links in IE 10.\n//\n\na {\n  background-color: transparent;\n}\n\n//\n// Improve readability of focused elements when they are also in an\n// active/hover state.\n//\n\na:active,\na:hover {\n  outline: 0;\n}\n\n// Text-level semantics\n// ==========================================================================\n\n//\n// Address styling not present in IE 8/9/10/11, Safari, and Chrome.\n//\n\nabbr[title] {\n  border-bottom: 1px dotted;\n}\n\n//\n// Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\n//\n\nb,\nstrong {\n  font-weight: bold;\n}\n\n//\n// Address styling not present in Safari and Chrome.\n//\n\ndfn {\n  font-style: italic;\n}\n\n//\n// Address variable `h1` font-size and margin within `section` and `article`\n// contexts in Firefox 4+, Safari, and Chrome.\n//\n\nh1 {\n  font-size: 2em;\n  margin: 0.67em 0;\n}\n\n//\n// Address styling not present in IE 8/9.\n//\n\nmark {\n  background: #ff0;\n  color: #000;\n}\n\n//\n// Address inconsistent and variable font size in all browsers.\n//\n\nsmall {\n  font-size: 80%;\n}\n\n//\n// Prevent `sub` and `sup` affecting `line-height` in all browsers.\n//\n\nsub,\nsup {\n  font-size: 75%;\n  line-height: 0;\n  position: relative;\n  vertical-align: baseline;\n}\n\nsup {\n  top: -0.5em;\n}\n\nsub {\n  bottom: -0.25em;\n}\n\n// Embedded content\n// ==========================================================================\n\n//\n// Remove border when inside `a` element in IE 8/9/10.\n//\n\nimg {\n  border: 0;\n}\n\n//\n// Correct overflow not hidden in IE 9/10/11.\n//\n\nsvg:not(:root) {\n  overflow: hidden;\n}\n\n// Grouping content\n// ==========================================================================\n\n//\n// Address margin not present in IE 8/9 and Safari.\n//\n\nfigure {\n  margin: 1em 40px;\n}\n\n//\n// Address differences between Firefox and other browsers.\n//\n\nhr {\n  box-sizing: content-box;\n  height: 0;\n}\n\n//\n// Contain overflow in all browsers.\n//\n\npre {\n  overflow: auto;\n}\n\n//\n// Address odd `em`-unit font size rendering in all browsers.\n//\n\ncode,\nkbd,\npre,\nsamp {\n  font-family: monospace, monospace;\n  font-size: 1em;\n}\n\n// Forms\n// ==========================================================================\n\n//\n// Known limitation: by default, Chrome and Safari on OS X allow very limited\n// styling of `select`, unless a `border` property is set.\n//\n\n//\n// 1. Correct color not being inherited.\n//    Known issue: affects color of disabled elements.\n// 2. Correct font properties not being inherited.\n// 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\n//\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n  color: inherit; // 1\n  font: inherit; // 2\n  margin: 0; // 3\n}\n\n//\n// Address `overflow` set to `hidden` in IE 8/9/10/11.\n//\n\nbutton {\n  overflow: visible;\n}\n\n//\n// Address inconsistent `text-transform` inheritance for `button` and `select`.\n// All other form control elements do not inherit `text-transform` values.\n// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\n// Correct `select` style inheritance in Firefox.\n//\n\nbutton,\nselect {\n  text-transform: none;\n}\n\n//\n// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n//    and `video` controls.\n// 2. Correct inability to style clickable `input` types in iOS.\n// 3. Improve usability and consistency of cursor style between image-type\n//    `input` and others.\n//\n\nbutton,\nhtml input[type=\"button\"], // 1\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n  -webkit-appearance: button; // 2\n  cursor: pointer; // 3\n}\n\n//\n// Re-set default cursor for disabled elements.\n//\n\nbutton[disabled],\nhtml input[disabled] {\n  cursor: default;\n}\n\n//\n// Remove inner padding and border in Firefox 4+.\n//\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n  border: 0;\n  padding: 0;\n}\n\n//\n// Address Firefox 4+ setting `line-height` on `input` using `!important` in\n// the UA stylesheet.\n//\n\ninput {\n  line-height: normal;\n}\n\n//\n// It's recommended that you don't attempt to style these elements.\n// Firefox's implementation doesn't respect box-sizing, padding, or width.\n//\n// 1. Address box sizing set to `content-box` in IE 8/9/10.\n// 2. Remove excess padding in IE 8/9/10.\n//\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n  box-sizing: border-box; // 1\n  padding: 0; // 2\n}\n\n//\n// Fix the cursor style for Chrome's increment/decrement buttons. For certain\n// `font-size` values of the `input`, it causes the cursor style of the\n// decrement button to change from `default` to `text`.\n//\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n  height: auto;\n}\n\n//\n// 1. Address `appearance` set to `searchfield` in Safari and Chrome.\n// 2. Address `box-sizing` set to `border-box` in Safari and Chrome.\n//\n\ninput[type=\"search\"] {\n  -webkit-appearance: textfield; // 1\n  box-sizing: content-box; //2\n}\n\n//\n// Remove inner padding and search cancel button in Safari and Chrome on OS X.\n// Safari (but not Chrome) clips the cancel button when the search input has\n// padding (and `textfield` appearance).\n//\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\n\n//\n// Define consistent border, margin, and padding.\n//\n\nfieldset {\n  border: 1px solid #c0c0c0;\n  margin: 0 2px;\n  padding: 0.35em 0.625em 0.75em;\n}\n\n//\n// 1. Correct `color` not being inherited in IE 8/9/10/11.\n// 2. Remove padding so people aren't caught out if they zero out fieldsets.\n//\n\nlegend {\n  border: 0; // 1\n  padding: 0; // 2\n}\n\n//\n// Remove default vertical scrollbar in IE 8/9/10/11.\n//\n\ntextarea {\n  overflow: auto;\n}\n\n//\n// Don't inherit the `font-weight` (applied by a rule above).\n// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n//\n\noptgroup {\n  font-weight: bold;\n}\n\n// Tables\n// ==========================================================================\n\n//\n// Remove most spacing between table cells.\n//\n\ntable {\n  border-collapse: collapse;\n  border-spacing: 0;\n}\n\ntd,\nth {\n  padding: 0;\n}\n","/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n\n// ==========================================================================\n// Print styles.\n// Inlined to avoid the additional HTTP request: h5bp.com/r\n// ==========================================================================\n\n@media print {\n    *,\n    *:before,\n    *:after {\n        background: transparent !important;\n        color: #000 !important; // Black prints faster: h5bp.com/s\n        box-shadow: none !important;\n        text-shadow: none !important;\n    }\n\n    a,\n    a:visited {\n        text-decoration: underline;\n    }\n\n    a[href]:after {\n        content: \" (\" attr(href) \")\";\n    }\n\n    abbr[title]:after {\n        content: \" (\" attr(title) \")\";\n    }\n\n    // Don't show links that are fragment identifiers,\n    // or use the `javascript:` pseudo protocol\n    a[href^=\"#\"]:after,\n    a[href^=\"javascript:\"]:after {\n        content: \"\";\n    }\n\n    pre,\n    blockquote {\n        border: 1px solid #999;\n        page-break-inside: avoid;\n    }\n\n    thead {\n        display: table-header-group; // h5bp.com/t\n    }\n\n    tr,\n    img {\n        page-break-inside: avoid;\n    }\n\n    img {\n        max-width: 100% !important;\n    }\n\n    p,\n    h2,\n    h3 {\n        orphans: 3;\n        widows: 3;\n    }\n\n    h2,\n    h3 {\n        page-break-after: avoid;\n    }\n\n    // Bootstrap specific changes start\n\n    // Bootstrap components\n    .navbar {\n        display: none;\n    }\n    .btn,\n    .dropup > .btn {\n        > .caret {\n            border-top-color: #000 !important;\n        }\n    }\n    .label {\n        border: 1px solid #000;\n    }\n\n    .table {\n        border-collapse: collapse !important;\n\n        td,\n        th {\n            background-color: #fff !important;\n        }\n    }\n    .table-bordered {\n        th,\n        td {\n            border: 1px solid #ddd !important;\n        }\n    }\n\n    // Bootstrap specific changes end\n}\n","//\n// Glyphicons for Bootstrap\n//\n// Since icons are fonts, they can be placed anywhere text is placed and are\n// thus automatically sized to match the surrounding child. To use, create an\n// inline element with the appropriate classes, like so:\n//\n// <a href=\"#\"><span class=\"glyphicon glyphicon-star\"></span> Star</a>\n\n// Import the fonts\n@font-face {\n  font-family: 'Glyphicons Halflings';\n  src: url('@{icon-font-path}@{icon-font-name}.eot');\n  src: url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype'),\n       url('@{icon-font-path}@{icon-font-name}.woff2') format('woff2'),\n       url('@{icon-font-path}@{icon-font-name}.woff') format('woff'),\n       url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype'),\n       url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg');\n}\n\n// Catchall baseclass\n.glyphicon {\n  position: relative;\n  top: 1px;\n  display: inline-block;\n  font-family: 'Glyphicons Halflings';\n  font-style: normal;\n  font-weight: normal;\n  line-height: 1;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\n// Individual icons\n.glyphicon-asterisk               { &:before { content: \"\\002a\"; } }\n.glyphicon-plus                   { &:before { content: \"\\002b\"; } }\n.glyphicon-euro,\n.glyphicon-eur                    { &:before { content: \"\\20ac\"; } }\n.glyphicon-minus                  { &:before { content: \"\\2212\"; } }\n.glyphicon-cloud                  { &:before { content: \"\\2601\"; } }\n.glyphicon-envelope               { &:before { content: \"\\2709\"; } }\n.glyphicon-pencil                 { &:before { content: \"\\270f\"; } }\n.glyphicon-glass                  { &:before { content: \"\\e001\"; } }\n.glyphicon-music                  { &:before { content: \"\\e002\"; } }\n.glyphicon-search                 { &:before { content: \"\\e003\"; } }\n.glyphicon-heart                  { &:before { content: \"\\e005\"; } }\n.glyphicon-star                   { &:before { content: \"\\e006\"; } }\n.glyphicon-star-empty             { &:before { content: \"\\e007\"; } }\n.glyphicon-user                   { &:before { content: \"\\e008\"; } }\n.glyphicon-film                   { &:before { content: \"\\e009\"; } }\n.glyphicon-th-large               { &:before { content: \"\\e010\"; } }\n.glyphicon-th                     { &:before { content: \"\\e011\"; } }\n.glyphicon-th-list                { &:before { content: \"\\e012\"; } }\n.glyphicon-ok                     { &:before { content: \"\\e013\"; } }\n.glyphicon-remove                 { &:before { content: \"\\e014\"; } }\n.glyphicon-zoom-in                { &:before { content: \"\\e015\"; } }\n.glyphicon-zoom-out               { &:before { content: \"\\e016\"; } }\n.glyphicon-off                    { &:before { content: \"\\e017\"; } }\n.glyphicon-signal                 { &:before { content: \"\\e018\"; } }\n.glyphicon-cog                    { &:before { content: \"\\e019\"; } }\n.glyphicon-trash                  { &:before { content: \"\\e020\"; } }\n.glyphicon-home                   { &:before { content: \"\\e021\"; } }\n.glyphicon-file                   { &:before { content: \"\\e022\"; } }\n.glyphicon-time                   { &:before { content: \"\\e023\"; } }\n.glyphicon-road                   { &:before { content: \"\\e024\"; } }\n.glyphicon-download-alt           { &:before { content: \"\\e025\"; } }\n.glyphicon-download               { &:before { content: \"\\e026\"; } }\n.glyphicon-upload                 { &:before { content: \"\\e027\"; } }\n.glyphicon-inbox                  { &:before { content: \"\\e028\"; } }\n.glyphicon-play-circle            { &:before { content: \"\\e029\"; } }\n.glyphicon-repeat                 { &:before { content: \"\\e030\"; } }\n.glyphicon-refresh                { &:before { content: \"\\e031\"; } }\n.glyphicon-list-alt               { &:before { content: \"\\e032\"; } }\n.glyphicon-lock                   { &:before { content: \"\\e033\"; } }\n.glyphicon-flag                   { &:before { content: \"\\e034\"; } }\n.glyphicon-headphones             { &:before { content: \"\\e035\"; } }\n.glyphicon-volume-off             { &:before { content: \"\\e036\"; } }\n.glyphicon-volume-down            { &:before { content: \"\\e037\"; } }\n.glyphicon-volume-up              { &:before { content: \"\\e038\"; } }\n.glyphicon-qrcode                 { &:before { content: \"\\e039\"; } }\n.glyphicon-barcode                { &:before { content: \"\\e040\"; } }\n.glyphicon-tag                    { &:before { content: \"\\e041\"; } }\n.glyphicon-tags                   { &:before { content: \"\\e042\"; } }\n.glyphicon-book                   { &:before { content: \"\\e043\"; } }\n.glyphicon-bookmark               { &:before { content: \"\\e044\"; } }\n.glyphicon-print                  { &:before { content: \"\\e045\"; } }\n.glyphicon-camera                 { &:before { content: \"\\e046\"; } }\n.glyphicon-font                   { &:before { content: \"\\e047\"; } }\n.glyphicon-bold                   { &:before { content: \"\\e048\"; } }\n.glyphicon-italic                 { &:before { content: \"\\e049\"; } }\n.glyphicon-text-height            { &:before { content: \"\\e050\"; } }\n.glyphicon-text-width             { &:before { content: \"\\e051\"; } }\n.glyphicon-align-left             { &:before { content: \"\\e052\"; } }\n.glyphicon-align-center           { &:before { content: \"\\e053\"; } }\n.glyphicon-align-right            { &:before { content: \"\\e054\"; } }\n.glyphicon-align-justify          { &:before { content: \"\\e055\"; } }\n.glyphicon-list                   { &:before { content: \"\\e056\"; } }\n.glyphicon-indent-left            { &:before { content: \"\\e057\"; } }\n.glyphicon-indent-right           { &:before { content: \"\\e058\"; } }\n.glyphicon-facetime-video         { &:before { content: \"\\e059\"; } }\n.glyphicon-picture                { &:before { content: \"\\e060\"; } }\n.glyphicon-map-marker             { &:before { content: \"\\e062\"; } }\n.glyphicon-adjust                 { &:before { content: \"\\e063\"; } }\n.glyphicon-tint                   { &:before { content: \"\\e064\"; } }\n.glyphicon-edit                   { &:before { content: \"\\e065\"; } }\n.glyphicon-share                  { &:before { content: \"\\e066\"; } }\n.glyphicon-check                  { &:before { content: \"\\e067\"; } }\n.glyphicon-move                   { &:before { content: \"\\e068\"; } }\n.glyphicon-step-backward          { &:before { content: \"\\e069\"; } }\n.glyphicon-fast-backward          { &:before { content: \"\\e070\"; } }\n.glyphicon-backward               { &:before { content: \"\\e071\"; } }\n.glyphicon-play                   { &:before { content: \"\\e072\"; } }\n.glyphicon-pause                  { &:before { content: \"\\e073\"; } }\n.glyphicon-stop                   { &:before { content: \"\\e074\"; } }\n.glyphicon-forward                { &:before { content: \"\\e075\"; } }\n.glyphicon-fast-forward           { &:before { content: \"\\e076\"; } }\n.glyphicon-step-forward           { &:before { content: \"\\e077\"; } }\n.glyphicon-eject                  { &:before { content: \"\\e078\"; } }\n.glyphicon-chevron-left           { &:before { content: \"\\e079\"; } }\n.glyphicon-chevron-right          { &:before { content: \"\\e080\"; } }\n.glyphicon-plus-sign              { &:before { content: \"\\e081\"; } }\n.glyphicon-minus-sign             { &:before { content: \"\\e082\"; } }\n.glyphicon-remove-sign            { &:before { content: \"\\e083\"; } }\n.glyphicon-ok-sign                { &:before { content: \"\\e084\"; } }\n.glyphicon-question-sign          { &:before { content: \"\\e085\"; } }\n.glyphicon-info-sign              { &:before { content: \"\\e086\"; } }\n.glyphicon-screenshot             { &:before { content: \"\\e087\"; } }\n.glyphicon-remove-circle          { &:before { content: \"\\e088\"; } }\n.glyphicon-ok-circle              { &:before { content: \"\\e089\"; } }\n.glyphicon-ban-circle             { &:before { content: \"\\e090\"; } }\n.glyphicon-arrow-left             { &:before { content: \"\\e091\"; } }\n.glyphicon-arrow-right            { &:before { content: \"\\e092\"; } }\n.glyphicon-arrow-up               { &:before { content: \"\\e093\"; } }\n.glyphicon-arrow-down             { &:before { content: \"\\e094\"; } }\n.glyphicon-share-alt              { &:before { content: \"\\e095\"; } }\n.glyphicon-resize-full            { &:before { content: \"\\e096\"; } }\n.glyphicon-resize-small           { &:before { content: \"\\e097\"; } }\n.glyphicon-exclamation-sign       { &:before { content: \"\\e101\"; } }\n.glyphicon-gift                   { &:before { content: \"\\e102\"; } }\n.glyphicon-leaf                   { &:before { content: \"\\e103\"; } }\n.glyphicon-fire                   { &:before { content: \"\\e104\"; } }\n.glyphicon-eye-open               { &:before { content: \"\\e105\"; } }\n.glyphicon-eye-close              { &:before { content: \"\\e106\"; } }\n.glyphicon-warning-sign           { &:before { content: \"\\e107\"; } }\n.glyphicon-plane                  { &:before { content: \"\\e108\"; } }\n.glyphicon-calendar               { &:before { content: \"\\e109\"; } }\n.glyphicon-random                 { &:before { content: \"\\e110\"; } }\n.glyphicon-comment                { &:before { content: \"\\e111\"; } }\n.glyphicon-magnet                 { &:before { content: \"\\e112\"; } }\n.glyphicon-chevron-up             { &:before { content: \"\\e113\"; } }\n.glyphicon-chevron-down           { &:before { content: \"\\e114\"; } }\n.glyphicon-retweet                { &:before { content: \"\\e115\"; } }\n.glyphicon-shopping-cart          { &:before { content: \"\\e116\"; } }\n.glyphicon-folder-close           { &:before { content: \"\\e117\"; } }\n.glyphicon-folder-open            { &:before { content: \"\\e118\"; } }\n.glyphicon-resize-vertical        { &:before { content: \"\\e119\"; } }\n.glyphicon-resize-horizontal      { &:before { content: \"\\e120\"; } }\n.glyphicon-hdd                    { &:before { content: \"\\e121\"; } }\n.glyphicon-bullhorn               { &:before { content: \"\\e122\"; } }\n.glyphicon-bell                   { &:before { content: \"\\e123\"; } }\n.glyphicon-certificate            { &:before { content: \"\\e124\"; } }\n.glyphicon-thumbs-up              { &:before { content: \"\\e125\"; } }\n.glyphicon-thumbs-down            { &:before { content: \"\\e126\"; } }\n.glyphicon-hand-right             { &:before { content: \"\\e127\"; } }\n.glyphicon-hand-left              { &:before { content: \"\\e128\"; } }\n.glyphicon-hand-up                { &:before { content: \"\\e129\"; } }\n.glyphicon-hand-down              { &:before { content: \"\\e130\"; } }\n.glyphicon-circle-arrow-right     { &:before { content: \"\\e131\"; } }\n.glyphicon-circle-arrow-left      { &:before { content: \"\\e132\"; } }\n.glyphicon-circle-arrow-up        { &:before { content: \"\\e133\"; } }\n.glyphicon-circle-arrow-down      { &:before { content: \"\\e134\"; } }\n.glyphicon-globe                  { &:before { content: \"\\e135\"; } }\n.glyphicon-wrench                 { &:before { content: \"\\e136\"; } }\n.glyphicon-tasks                  { &:before { content: \"\\e137\"; } }\n.glyphicon-filter                 { &:before { content: \"\\e138\"; } }\n.glyphicon-briefcase              { &:before { content: \"\\e139\"; } }\n.glyphicon-fullscreen             { &:before { content: \"\\e140\"; } }\n.glyphicon-dashboard              { &:before { content: \"\\e141\"; } }\n.glyphicon-paperclip              { &:before { content: \"\\e142\"; } }\n.glyphicon-heart-empty            { &:before { content: \"\\e143\"; } }\n.glyphicon-link                   { &:before { content: \"\\e144\"; } }\n.glyphicon-phone                  { &:before { content: \"\\e145\"; } }\n.glyphicon-pushpin                { &:before { content: \"\\e146\"; } }\n.glyphicon-usd                    { &:before { content: \"\\e148\"; } }\n.glyphicon-gbp                    { &:before { content: \"\\e149\"; } }\n.glyphicon-sort                   { &:before { content: \"\\e150\"; } }\n.glyphicon-sort-by-alphabet       { &:before { content: \"\\e151\"; } }\n.glyphicon-sort-by-alphabet-alt   { &:before { content: \"\\e152\"; } }\n.glyphicon-sort-by-order          { &:before { content: \"\\e153\"; } }\n.glyphicon-sort-by-order-alt      { &:before { content: \"\\e154\"; } }\n.glyphicon-sort-by-attributes     { &:before { content: \"\\e155\"; } }\n.glyphicon-sort-by-attributes-alt { &:before { content: \"\\e156\"; } }\n.glyphicon-unchecked              { &:before { content: \"\\e157\"; } }\n.glyphicon-expand                 { &:before { content: \"\\e158\"; } }\n.glyphicon-collapse-down          { &:before { content: \"\\e159\"; } }\n.glyphicon-collapse-up            { &:before { content: \"\\e160\"; } }\n.glyphicon-log-in                 { &:before { content: \"\\e161\"; } }\n.glyphicon-flash                  { &:before { content: \"\\e162\"; } }\n.glyphicon-log-out                { &:before { content: \"\\e163\"; } }\n.glyphicon-new-window             { &:before { content: \"\\e164\"; } }\n.glyphicon-record                 { &:before { content: \"\\e165\"; } }\n.glyphicon-save                   { &:before { content: \"\\e166\"; } }\n.glyphicon-open                   { &:before { content: \"\\e167\"; } }\n.glyphicon-saved                  { &:before { content: \"\\e168\"; } }\n.glyphicon-import                 { &:before { content: \"\\e169\"; } }\n.glyphicon-export                 { &:before { content: \"\\e170\"; } }\n.glyphicon-send                   { &:before { content: \"\\e171\"; } }\n.glyphicon-floppy-disk            { &:before { content: \"\\e172\"; } }\n.glyphicon-floppy-saved           { &:before { content: \"\\e173\"; } }\n.glyphicon-floppy-remove          { &:before { content: \"\\e174\"; } }\n.glyphicon-floppy-save            { &:before { content: \"\\e175\"; } }\n.glyphicon-floppy-open            { &:before { content: \"\\e176\"; } }\n.glyphicon-credit-card            { &:before { content: \"\\e177\"; } }\n.glyphicon-transfer               { &:before { content: \"\\e178\"; } }\n.glyphicon-cutlery                { &:before { content: \"\\e179\"; } }\n.glyphicon-header                 { &:before { content: \"\\e180\"; } }\n.glyphicon-compressed             { &:before { content: \"\\e181\"; } }\n.glyphicon-earphone               { &:before { content: \"\\e182\"; } }\n.glyphicon-phone-alt              { &:before { content: \"\\e183\"; } }\n.glyphicon-tower                  { &:before { content: \"\\e184\"; } }\n.glyphicon-stats                  { &:before { content: \"\\e185\"; } }\n.glyphicon-sd-video               { &:before { content: \"\\e186\"; } }\n.glyphicon-hd-video               { &:before { content: \"\\e187\"; } }\n.glyphicon-subtitles              { &:before { content: \"\\e188\"; } }\n.glyphicon-sound-stereo           { &:before { content: \"\\e189\"; } }\n.glyphicon-sound-dolby            { &:before { content: \"\\e190\"; } }\n.glyphicon-sound-5-1              { &:before { content: \"\\e191\"; } }\n.glyphicon-sound-6-1              { &:before { content: \"\\e192\"; } }\n.glyphicon-sound-7-1              { &:before { content: \"\\e193\"; } }\n.glyphicon-copyright-mark         { &:before { content: \"\\e194\"; } }\n.glyphicon-registration-mark      { &:before { content: \"\\e195\"; } }\n.glyphicon-cloud-download         { &:before { content: \"\\e197\"; } }\n.glyphicon-cloud-upload           { &:before { content: \"\\e198\"; } }\n.glyphicon-tree-conifer           { &:before { content: \"\\e199\"; } }\n.glyphicon-tree-deciduous         { &:before { content: \"\\e200\"; } }\n.glyphicon-cd                     { &:before { content: \"\\e201\"; } }\n.glyphicon-save-file              { &:before { content: \"\\e202\"; } }\n.glyphicon-open-file              { &:before { content: \"\\e203\"; } }\n.glyphicon-level-up               { &:before { content: \"\\e204\"; } }\n.glyphicon-copy                   { &:before { content: \"\\e205\"; } }\n.glyphicon-paste                  { &:before { content: \"\\e206\"; } }\n// The following 2 Glyphicons are omitted for the time being because\n// they currently use Unicode codepoints that are outside the\n// Basic Multilingual Plane (BMP). Older buggy versions of WebKit can't handle\n// non-BMP codepoints in CSS string escapes, and thus can't display these two icons.\n// Notably, the bug affects some older versions of the Android Browser.\n// More info: https://github.com/twbs/bootstrap/issues/10106\n// .glyphicon-door                   { &:before { content: \"\\1f6aa\"; } }\n// .glyphicon-key                    { &:before { content: \"\\1f511\"; } }\n.glyphicon-alert                  { &:before { content: \"\\e209\"; } }\n.glyphicon-equalizer              { &:before { content: \"\\e210\"; } }\n.glyphicon-king                   { &:before { content: \"\\e211\"; } }\n.glyphicon-queen                  { &:before { content: \"\\e212\"; } }\n.glyphicon-pawn                   { &:before { content: \"\\e213\"; } }\n.glyphicon-bishop                 { &:before { content: \"\\e214\"; } }\n.glyphicon-knight                 { &:before { content: \"\\e215\"; } }\n.glyphicon-baby-formula           { &:before { content: \"\\e216\"; } }\n.glyphicon-tent                   { &:before { content: \"\\26fa\"; } }\n.glyphicon-blackboard             { &:before { content: \"\\e218\"; } }\n.glyphicon-bed                    { &:before { content: \"\\e219\"; } }\n.glyphicon-apple                  { &:before { content: \"\\f8ff\"; } }\n.glyphicon-erase                  { &:before { content: \"\\e221\"; } }\n.glyphicon-hourglass              { &:before { content: \"\\231b\"; } }\n.glyphicon-lamp                   { &:before { content: \"\\e223\"; } }\n.glyphicon-duplicate              { &:before { content: \"\\e224\"; } }\n.glyphicon-piggy-bank             { &:before { content: \"\\e225\"; } }\n.glyphicon-scissors               { &:before { content: \"\\e226\"; } }\n.glyphicon-bitcoin                { &:before { content: \"\\e227\"; } }\n.glyphicon-btc                    { &:before { content: \"\\e227\"; } }\n.glyphicon-xbt                    { &:before { content: \"\\e227\"; } }\n.glyphicon-yen                    { &:before { content: \"\\00a5\"; } }\n.glyphicon-jpy                    { &:before { content: \"\\00a5\"; } }\n.glyphicon-ruble                  { &:before { content: \"\\20bd\"; } }\n.glyphicon-rub                    { &:before { content: \"\\20bd\"; } }\n.glyphicon-scale                  { &:before { content: \"\\e230\"; } }\n.glyphicon-ice-lolly              { &:before { content: \"\\e231\"; } }\n.glyphicon-ice-lolly-tasted       { &:before { content: \"\\e232\"; } }\n.glyphicon-education              { &:before { content: \"\\e233\"; } }\n.glyphicon-option-horizontal      { &:before { content: \"\\e234\"; } }\n.glyphicon-option-vertical        { &:before { content: \"\\e235\"; } }\n.glyphicon-menu-hamburger         { &:before { content: \"\\e236\"; } }\n.glyphicon-modal-window           { &:before { content: \"\\e237\"; } }\n.glyphicon-oil                    { &:before { content: \"\\e238\"; } }\n.glyphicon-grain                  { &:before { content: \"\\e239\"; } }\n.glyphicon-sunglasses             { &:before { content: \"\\e240\"; } }\n.glyphicon-text-size              { &:before { content: \"\\e241\"; } }\n.glyphicon-text-color             { &:before { content: \"\\e242\"; } }\n.glyphicon-text-background        { &:before { content: \"\\e243\"; } }\n.glyphicon-object-align-top       { &:before { content: \"\\e244\"; } }\n.glyphicon-object-align-bottom    { &:before { content: \"\\e245\"; } }\n.glyphicon-object-align-horizontal{ &:before { content: \"\\e246\"; } }\n.glyphicon-object-align-left      { &:before { content: \"\\e247\"; } }\n.glyphicon-object-align-vertical  { &:before { content: \"\\e248\"; } }\n.glyphicon-object-align-right     { &:before { content: \"\\e249\"; } }\n.glyphicon-triangle-right         { &:before { content: \"\\e250\"; } }\n.glyphicon-triangle-left          { &:before { content: \"\\e251\"; } }\n.glyphicon-triangle-bottom        { &:before { content: \"\\e252\"; } }\n.glyphicon-triangle-top           { &:before { content: \"\\e253\"; } }\n.glyphicon-console                { &:before { content: \"\\e254\"; } }\n.glyphicon-superscript            { &:before { content: \"\\e255\"; } }\n.glyphicon-subscript              { &:before { content: \"\\e256\"; } }\n.glyphicon-menu-left              { &:before { content: \"\\e257\"; } }\n.glyphicon-menu-right             { &:before { content: \"\\e258\"; } }\n.glyphicon-menu-down              { &:before { content: \"\\e259\"; } }\n.glyphicon-menu-up                { &:before { content: \"\\e260\"; } }\n","//\n// Scaffolding\n// --------------------------------------------------\n\n\n// Reset the box-sizing\n//\n// Heads up! This reset may cause conflicts with some third-party widgets.\n// For recommendations on resolving such conflicts, see\n// http://getbootstrap.com/getting-started/#third-box-sizing\n* {\n  .box-sizing(border-box);\n}\n*:before,\n*:after {\n  .box-sizing(border-box);\n}\n\n\n// Body reset\n\nhtml {\n  font-size: 10px;\n  -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n\nbody {\n  font-family: @font-family-base;\n  font-size: @font-size-base;\n  line-height: @line-height-base;\n  color: @text-color;\n  background-color: @body-bg;\n}\n\n// Reset fonts for relevant elements\ninput,\nbutton,\nselect,\ntextarea {\n  font-family: inherit;\n  font-size: inherit;\n  line-height: inherit;\n}\n\n\n// Links\n\na {\n  color: @link-color;\n  text-decoration: none;\n\n  &:hover,\n  &:focus {\n    color: @link-hover-color;\n    text-decoration: @link-hover-decoration;\n  }\n\n  &:focus {\n    .tab-focus();\n  }\n}\n\n\n// Figures\n//\n// We reset this here because previously Normalize had no `figure` margins. This\n// ensures we don't break anyone's use of the element.\n\nfigure {\n  margin: 0;\n}\n\n\n// Images\n\nimg {\n  vertical-align: middle;\n}\n\n// Responsive images (ensure images don't scale beyond their parents)\n.img-responsive {\n  .img-responsive();\n}\n\n// Rounded corners\n.img-rounded {\n  border-radius: @border-radius-large;\n}\n\n// Image thumbnails\n//\n// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.\n.img-thumbnail {\n  padding: @thumbnail-padding;\n  line-height: @line-height-base;\n  background-color: @thumbnail-bg;\n  border: 1px solid @thumbnail-border;\n  border-radius: @thumbnail-border-radius;\n  .transition(all .2s ease-in-out);\n\n  // Keep them at most 100% wide\n  .img-responsive(inline-block);\n}\n\n// Perfect circle\n.img-circle {\n  border-radius: 50%; // set radius in percents\n}\n\n\n// Horizontal rules\n\nhr {\n  margin-top:    @line-height-computed;\n  margin-bottom: @line-height-computed;\n  border: 0;\n  border-top: 1px solid @hr-border;\n}\n\n\n// Only display content to screen readers\n//\n// See: http://a11yproject.com/posts/how-to-hide-content\n\n.sr-only {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  padding: 0;\n  overflow: hidden;\n  clip: rect(0,0,0,0);\n  border: 0;\n}\n\n// Use in conjunction with .sr-only to only display content when it's focused.\n// Useful for \"Skip to main content\" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1\n// Credit: HTML5 Boilerplate\n\n.sr-only-focusable {\n  &:active,\n  &:focus {\n    position: static;\n    width: auto;\n    height: auto;\n    margin: 0;\n    overflow: visible;\n    clip: auto;\n  }\n}\n\n\n// iOS \"clickable elements\" fix for role=\"button\"\n//\n// Fixes \"clickability\" issue (and more generally, the firing of events such as focus as well)\n// for traditionally non-focusable elements with role=\"button\"\n// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile\n\n[role=\"button\"] {\n  cursor: pointer;\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n  -webkit-animation: @animation;\n       -o-animation: @animation;\n          animation: @animation;\n}\n.animation-name(@name) {\n  -webkit-animation-name: @name;\n          animation-name: @name;\n}\n.animation-duration(@duration) {\n  -webkit-animation-duration: @duration;\n          animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n  -webkit-animation-timing-function: @timing-function;\n          animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n  -webkit-animation-delay: @delay;\n          animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n  -webkit-animation-iteration-count: @iteration-count;\n          animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n  -webkit-animation-direction: @direction;\n          animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n  -webkit-animation-fill-mode: @fill-mode;\n          animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n  -webkit-backface-visibility: @visibility;\n     -moz-backface-visibility: @visibility;\n          backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n  -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n          box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n  -webkit-box-sizing: @boxmodel;\n     -moz-box-sizing: @boxmodel;\n          box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n  -webkit-column-count: @column-count;\n     -moz-column-count: @column-count;\n          column-count: @column-count;\n  -webkit-column-gap: @column-gap;\n     -moz-column-gap: @column-gap;\n          column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n  word-wrap: break-word;\n  -webkit-hyphens: @mode;\n     -moz-hyphens: @mode;\n      -ms-hyphens: @mode; // IE10+\n       -o-hyphens: @mode;\n          hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n  // Firefox\n  &::-moz-placeholder {\n    color: @color;\n    opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n  }\n  &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n  &::-webkit-input-placeholder  { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n  -webkit-transform: scale(@ratio);\n      -ms-transform: scale(@ratio); // IE9 only\n       -o-transform: scale(@ratio);\n          transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n  -webkit-transform: scale(@ratioX, @ratioY);\n      -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n       -o-transform: scale(@ratioX, @ratioY);\n          transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n  -webkit-transform: scaleX(@ratio);\n      -ms-transform: scaleX(@ratio); // IE9 only\n       -o-transform: scaleX(@ratio);\n          transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n  -webkit-transform: scaleY(@ratio);\n      -ms-transform: scaleY(@ratio); // IE9 only\n       -o-transform: scaleY(@ratio);\n          transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n  -webkit-transform: skewX(@x) skewY(@y);\n      -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n       -o-transform: skewX(@x) skewY(@y);\n          transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n  -webkit-transform: translate(@x, @y);\n      -ms-transform: translate(@x, @y); // IE9 only\n       -o-transform: translate(@x, @y);\n          transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n  -webkit-transform: translate3d(@x, @y, @z);\n          transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n  -webkit-transform: rotate(@degrees);\n      -ms-transform: rotate(@degrees); // IE9 only\n       -o-transform: rotate(@degrees);\n          transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n  -webkit-transform: rotateX(@degrees);\n      -ms-transform: rotateX(@degrees); // IE9 only\n       -o-transform: rotateX(@degrees);\n          transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n  -webkit-transform: rotateY(@degrees);\n      -ms-transform: rotateY(@degrees); // IE9 only\n       -o-transform: rotateY(@degrees);\n          transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n  -webkit-perspective: @perspective;\n     -moz-perspective: @perspective;\n          perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n  -webkit-perspective-origin: @perspective;\n     -moz-perspective-origin: @perspective;\n          perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n  -webkit-transform-origin: @origin;\n     -moz-transform-origin: @origin;\n      -ms-transform-origin: @origin; // IE9 only\n          transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n  -webkit-transition: @transition;\n       -o-transition: @transition;\n          transition: @transition;\n}\n.transition-property(@transition-property) {\n  -webkit-transition-property: @transition-property;\n          transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n  -webkit-transition-delay: @transition-delay;\n          transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n  -webkit-transition-duration: @transition-duration;\n          transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n  -webkit-transition-timing-function: @timing-function;\n          transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n  -webkit-transition: -webkit-transform @transition;\n     -moz-transition: -moz-transform @transition;\n       -o-transition: -o-transform @transition;\n          transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n  -webkit-user-select: @select;\n     -moz-user-select: @select;\n      -ms-user-select: @select; // IE10+\n          user-select: @select;\n}\n","// WebKit-style focus\n\n.tab-focus() {\n  // WebKit-specific. Other browsers will keep their default outline style.\n  // (Initially tried to also force default via `outline: initial`,\n  // but that seems to erroneously remove the outline in Firefox altogether.)\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\n","// Image Mixins\n// - Responsive image\n// - Retina image\n\n\n// Responsive image\n//\n// Keep images from scaling beyond the width of their parents.\n.img-responsive(@display: block) {\n  display: @display;\n  max-width: 100%; // Part 1: Set a maximum relative to the parent\n  height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching\n}\n\n\n// Retina image\n//\n// Short retina mixin for setting background-image and -size. Note that the\n// spelling of `min--moz-device-pixel-ratio` is intentional.\n.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {\n  background-image: url(\"@{file-1x}\");\n\n  @media\n  only screen and (-webkit-min-device-pixel-ratio: 2),\n  only screen and (   min--moz-device-pixel-ratio: 2),\n  only screen and (     -o-min-device-pixel-ratio: 2/1),\n  only screen and (        min-device-pixel-ratio: 2),\n  only screen and (                min-resolution: 192dpi),\n  only screen and (                min-resolution: 2dppx) {\n    background-image: url(\"@{file-2x}\");\n    background-size: @width-1x @height-1x;\n  }\n}\n","//\n// Typography\n// --------------------------------------------------\n\n\n// Headings\n// -------------------------\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6 {\n  font-family: @headings-font-family;\n  font-weight: @headings-font-weight;\n  line-height: @headings-line-height;\n  color: @headings-color;\n\n  small,\n  .small {\n    font-weight: normal;\n    line-height: 1;\n    color: @headings-small-color;\n  }\n}\n\nh1, .h1,\nh2, .h2,\nh3, .h3 {\n  margin-top: @line-height-computed;\n  margin-bottom: (@line-height-computed / 2);\n\n  small,\n  .small {\n    font-size: 65%;\n  }\n}\nh4, .h4,\nh5, .h5,\nh6, .h6 {\n  margin-top: (@line-height-computed / 2);\n  margin-bottom: (@line-height-computed / 2);\n\n  small,\n  .small {\n    font-size: 75%;\n  }\n}\n\nh1, .h1 { font-size: @font-size-h1; }\nh2, .h2 { font-size: @font-size-h2; }\nh3, .h3 { font-size: @font-size-h3; }\nh4, .h4 { font-size: @font-size-h4; }\nh5, .h5 { font-size: @font-size-h5; }\nh6, .h6 { font-size: @font-size-h6; }\n\n\n// Body text\n// -------------------------\n\np {\n  margin: 0 0 (@line-height-computed / 2);\n}\n\n.lead {\n  margin-bottom: @line-height-computed;\n  font-size: floor((@font-size-base * 1.15));\n  font-weight: 300;\n  line-height: 1.4;\n\n  @media (min-width: @screen-sm-min) {\n    font-size: (@font-size-base * 1.5);\n  }\n}\n\n\n// Emphasis & misc\n// -------------------------\n\n// Ex: (12px small font / 14px base font) * 100% = about 85%\nsmall,\n.small {\n  font-size: floor((100% * @font-size-small / @font-size-base));\n}\n\nmark,\n.mark {\n  background-color: @state-warning-bg;\n  padding: .2em;\n}\n\n// Alignment\n.text-left           { text-align: left; }\n.text-right          { text-align: right; }\n.text-center         { text-align: center; }\n.text-justify        { text-align: justify; }\n.text-nowrap         { white-space: nowrap; }\n\n// Transformation\n.text-lowercase      { text-transform: lowercase; }\n.text-uppercase      { text-transform: uppercase; }\n.text-capitalize     { text-transform: capitalize; }\n\n// Contextual colors\n.text-muted {\n  color: @text-muted;\n}\n.text-primary {\n  .text-emphasis-variant(@brand-primary);\n}\n.text-success {\n  .text-emphasis-variant(@state-success-text);\n}\n.text-info {\n  .text-emphasis-variant(@state-info-text);\n}\n.text-warning {\n  .text-emphasis-variant(@state-warning-text);\n}\n.text-danger {\n  .text-emphasis-variant(@state-danger-text);\n}\n\n// Contextual backgrounds\n// For now we'll leave these alongside the text classes until v4 when we can\n// safely shift things around (per SemVer rules).\n.bg-primary {\n  // Given the contrast here, this is the only class to have its color inverted\n  // automatically.\n  color: #fff;\n  .bg-variant(@brand-primary);\n}\n.bg-success {\n  .bg-variant(@state-success-bg);\n}\n.bg-info {\n  .bg-variant(@state-info-bg);\n}\n.bg-warning {\n  .bg-variant(@state-warning-bg);\n}\n.bg-danger {\n  .bg-variant(@state-danger-bg);\n}\n\n\n// Page header\n// -------------------------\n\n.page-header {\n  padding-bottom: ((@line-height-computed / 2) - 1);\n  margin: (@line-height-computed * 2) 0 @line-height-computed;\n  border-bottom: 1px solid @page-header-border-color;\n}\n\n\n// Lists\n// -------------------------\n\n// Unordered and Ordered lists\nul,\nol {\n  margin-top: 0;\n  margin-bottom: (@line-height-computed / 2);\n  ul,\n  ol {\n    margin-bottom: 0;\n  }\n}\n\n// List options\n\n// Unstyled keeps list items block level, just removes default browser padding and list-style\n.list-unstyled {\n  padding-left: 0;\n  list-style: none;\n}\n\n// Inline turns list items into inline-block\n.list-inline {\n  .list-unstyled();\n  margin-left: -5px;\n\n  > li {\n    display: inline-block;\n    padding-left: 5px;\n    padding-right: 5px;\n  }\n}\n\n// Description Lists\ndl {\n  margin-top: 0; // Remove browser default\n  margin-bottom: @line-height-computed;\n}\ndt,\ndd {\n  line-height: @line-height-base;\n}\ndt {\n  font-weight: bold;\n}\ndd {\n  margin-left: 0; // Undo browser default\n}\n\n// Horizontal description lists\n//\n// Defaults to being stacked without any of the below styles applied, until the\n// grid breakpoint is reached (default of ~768px).\n\n.dl-horizontal {\n  dd {\n    &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present\n  }\n\n  @media (min-width: @dl-horizontal-breakpoint) {\n    dt {\n      float: left;\n      width: (@dl-horizontal-offset - 20);\n      clear: left;\n      text-align: right;\n      .text-overflow();\n    }\n    dd {\n      margin-left: @dl-horizontal-offset;\n    }\n  }\n}\n\n\n// Misc\n// -------------------------\n\n// Abbreviations and acronyms\nabbr[title],\n// Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257\nabbr[data-original-title] {\n  cursor: help;\n  border-bottom: 1px dotted @abbr-border-color;\n}\n.initialism {\n  font-size: 90%;\n  .text-uppercase();\n}\n\n// Blockquotes\nblockquote {\n  padding: (@line-height-computed / 2) @line-height-computed;\n  margin: 0 0 @line-height-computed;\n  font-size: @blockquote-font-size;\n  border-left: 5px solid @blockquote-border-color;\n\n  p,\n  ul,\n  ol {\n    &:last-child {\n      margin-bottom: 0;\n    }\n  }\n\n  // Note: Deprecated small and .small as of v3.1.0\n  // Context: https://github.com/twbs/bootstrap/issues/11660\n  footer,\n  small,\n  .small {\n    display: block;\n    font-size: 80%; // back to default font-size\n    line-height: @line-height-base;\n    color: @blockquote-small-color;\n\n    &:before {\n      content: '\\2014 \\00A0'; // em dash, nbsp\n    }\n  }\n}\n\n// Opposite alignment of blockquote\n//\n// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.\n.blockquote-reverse,\nblockquote.pull-right {\n  padding-right: 15px;\n  padding-left: 0;\n  border-right: 5px solid @blockquote-border-color;\n  border-left: 0;\n  text-align: right;\n\n  // Account for citation\n  footer,\n  small,\n  .small {\n    &:before { content: ''; }\n    &:after {\n      content: '\\00A0 \\2014'; // nbsp, em dash\n    }\n  }\n}\n\n// Addresses\naddress {\n  margin-bottom: @line-height-computed;\n  font-style: normal;\n  line-height: @line-height-base;\n}\n","// Typography\n\n.text-emphasis-variant(@color) {\n  color: @color;\n  a&:hover,\n  a&:focus {\n    color: darken(@color, 10%);\n  }\n}\n","// Contextual backgrounds\n\n.bg-variant(@color) {\n  background-color: @color;\n  a&:hover,\n  a&:focus {\n    background-color: darken(@color, 10%);\n  }\n}\n","// Text overflow\n// Requires inline-block or block for proper styling\n\n.text-overflow() {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n","//\n// Code (inline and block)\n// --------------------------------------------------\n\n\n// Inline and block code styles\ncode,\nkbd,\npre,\nsamp {\n  font-family: @font-family-monospace;\n}\n\n// Inline code\ncode {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: @code-color;\n  background-color: @code-bg;\n  border-radius: @border-radius-base;\n}\n\n// User input typically entered via keyboard\nkbd {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: @kbd-color;\n  background-color: @kbd-bg;\n  border-radius: @border-radius-small;\n  box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);\n\n  kbd {\n    padding: 0;\n    font-size: 100%;\n    font-weight: bold;\n    box-shadow: none;\n  }\n}\n\n// Blocks of code\npre {\n  display: block;\n  padding: ((@line-height-computed - 1) / 2);\n  margin: 0 0 (@line-height-computed / 2);\n  font-size: (@font-size-base - 1); // 14px to 13px\n  line-height: @line-height-base;\n  word-break: break-all;\n  word-wrap: break-word;\n  color: @pre-color;\n  background-color: @pre-bg;\n  border: 1px solid @pre-border-color;\n  border-radius: @border-radius-base;\n\n  // Account for some code outputs that place code tags in pre tags\n  code {\n    padding: 0;\n    font-size: inherit;\n    color: inherit;\n    white-space: pre-wrap;\n    background-color: transparent;\n    border-radius: 0;\n  }\n}\n\n// Enable scrollable blocks of code\n.pre-scrollable {\n  max-height: @pre-scrollable-max-height;\n  overflow-y: scroll;\n}\n","//\n// Grid system\n// --------------------------------------------------\n\n\n// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n.container {\n  .container-fixed();\n\n  @media (min-width: @screen-sm-min) {\n    width: @container-sm;\n  }\n  @media (min-width: @screen-md-min) {\n    width: @container-md;\n  }\n  @media (min-width: @screen-lg-min) {\n    width: @container-lg;\n  }\n}\n\n\n// Fluid container\n//\n// Utilizes the mixin meant for fixed width containers, but without any defined\n// width for fluid, full width layouts.\n\n.container-fluid {\n  .container-fixed();\n}\n\n\n// Row\n//\n// Rows contain and clear the floats of your columns.\n\n.row {\n  .make-row();\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n.make-grid-columns();\n\n\n// Extra small grid\n//\n// Columns, offsets, pushes, and pulls for extra small devices like\n// smartphones.\n\n.make-grid(xs);\n\n\n// Small grid\n//\n// Columns, offsets, pushes, and pulls for the small device range, from phones\n// to tablets.\n\n@media (min-width: @screen-sm-min) {\n  .make-grid(sm);\n}\n\n\n// Medium grid\n//\n// Columns, offsets, pushes, and pulls for the desktop device range.\n\n@media (min-width: @screen-md-min) {\n  .make-grid(md);\n}\n\n\n// Large grid\n//\n// Columns, offsets, pushes, and pulls for the large desktop device range.\n\n@media (min-width: @screen-lg-min) {\n  .make-grid(lg);\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n// Centered container element\n.container-fixed(@gutter: @grid-gutter-width) {\n  margin-right: auto;\n  margin-left: auto;\n  padding-left:  floor((@gutter / 2));\n  padding-right: ceil((@gutter / 2));\n  &:extend(.clearfix all);\n}\n\n// Creates a wrapper for a series of columns\n.make-row(@gutter: @grid-gutter-width) {\n  margin-left:  ceil((@gutter / -2));\n  margin-right: floor((@gutter / -2));\n  &:extend(.clearfix all);\n}\n\n// Generate the extra small columns\n.make-xs-column(@columns; @gutter: @grid-gutter-width) {\n  position: relative;\n  float: left;\n  width: percentage((@columns / @grid-columns));\n  min-height: 1px;\n  padding-left:  (@gutter / 2);\n  padding-right: (@gutter / 2);\n}\n.make-xs-column-offset(@columns) {\n  margin-left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-push(@columns) {\n  left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-pull(@columns) {\n  right: percentage((@columns / @grid-columns));\n}\n\n// Generate the small columns\n.make-sm-column(@columns; @gutter: @grid-gutter-width) {\n  position: relative;\n  min-height: 1px;\n  padding-left:  (@gutter / 2);\n  padding-right: (@gutter / 2);\n\n  @media (min-width: @screen-sm-min) {\n    float: left;\n    width: percentage((@columns / @grid-columns));\n  }\n}\n.make-sm-column-offset(@columns) {\n  @media (min-width: @screen-sm-min) {\n    margin-left: percentage((@columns / @grid-columns));\n  }\n}\n.make-sm-column-push(@columns) {\n  @media (min-width: @screen-sm-min) {\n    left: percentage((@columns / @grid-columns));\n  }\n}\n.make-sm-column-pull(@columns) {\n  @media (min-width: @screen-sm-min) {\n    right: percentage((@columns / @grid-columns));\n  }\n}\n\n// Generate the medium columns\n.make-md-column(@columns; @gutter: @grid-gutter-width) {\n  position: relative;\n  min-height: 1px;\n  padding-left:  (@gutter / 2);\n  padding-right: (@gutter / 2);\n\n  @media (min-width: @screen-md-min) {\n    float: left;\n    width: percentage((@columns / @grid-columns));\n  }\n}\n.make-md-column-offset(@columns) {\n  @media (min-width: @screen-md-min) {\n    margin-left: percentage((@columns / @grid-columns));\n  }\n}\n.make-md-column-push(@columns) {\n  @media (min-width: @screen-md-min) {\n    left: percentage((@columns / @grid-columns));\n  }\n}\n.make-md-column-pull(@columns) {\n  @media (min-width: @screen-md-min) {\n    right: percentage((@columns / @grid-columns));\n  }\n}\n\n// Generate the large columns\n.make-lg-column(@columns; @gutter: @grid-gutter-width) {\n  position: relative;\n  min-height: 1px;\n  padding-left:  (@gutter / 2);\n  padding-right: (@gutter / 2);\n\n  @media (min-width: @screen-lg-min) {\n    float: left;\n    width: percentage((@columns / @grid-columns));\n  }\n}\n.make-lg-column-offset(@columns) {\n  @media (min-width: @screen-lg-min) {\n    margin-left: percentage((@columns / @grid-columns));\n  }\n}\n.make-lg-column-push(@columns) {\n  @media (min-width: @screen-lg-min) {\n    left: percentage((@columns / @grid-columns));\n  }\n}\n.make-lg-column-pull(@columns) {\n  @media (min-width: @screen-lg-min) {\n    right: percentage((@columns / @grid-columns));\n  }\n}\n","// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `@grid-columns`.\n\n.make-grid-columns() {\n  // Common styles for all sizes of grid columns, widths 1-12\n  .col(@index) { // initial\n    @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n    .col((@index + 1), @item);\n  }\n  .col(@index, @list) when (@index =< @grid-columns) { // general; \"=<\" isn't a typo\n    @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n    .col((@index + 1), ~\"@{list}, @{item}\");\n  }\n  .col(@index, @list) when (@index > @grid-columns) { // terminal\n    @{list} {\n      position: relative;\n      // Prevent columns from collapsing when empty\n      min-height: 1px;\n      // Inner gutter via padding\n      padding-left:  ceil((@grid-gutter-width / 2));\n      padding-right: floor((@grid-gutter-width / 2));\n    }\n  }\n  .col(1); // kickstart it\n}\n\n.float-grid-columns(@class) {\n  .col(@index) { // initial\n    @item: ~\".col-@{class}-@{index}\";\n    .col((@index + 1), @item);\n  }\n  .col(@index, @list) when (@index =< @grid-columns) { // general\n    @item: ~\".col-@{class}-@{index}\";\n    .col((@index + 1), ~\"@{list}, @{item}\");\n  }\n  .col(@index, @list) when (@index > @grid-columns) { // terminal\n    @{list} {\n      float: left;\n    }\n  }\n  .col(1); // kickstart it\n}\n\n.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {\n  .col-@{class}-@{index} {\n    width: percentage((@index / @grid-columns));\n  }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {\n  .col-@{class}-push-@{index} {\n    left: percentage((@index / @grid-columns));\n  }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {\n  .col-@{class}-push-0 {\n    left: auto;\n  }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {\n  .col-@{class}-pull-@{index} {\n    right: percentage((@index / @grid-columns));\n  }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {\n  .col-@{class}-pull-0 {\n    right: auto;\n  }\n}\n.calc-grid-column(@index, @class, @type) when (@type = offset) {\n  .col-@{class}-offset-@{index} {\n    margin-left: percentage((@index / @grid-columns));\n  }\n}\n\n// Basic looping in LESS\n.loop-grid-columns(@index, @class, @type) when (@index >= 0) {\n  .calc-grid-column(@index, @class, @type);\n  // next iteration\n  .loop-grid-columns((@index - 1), @class, @type);\n}\n\n// Create grid for specific class\n.make-grid(@class) {\n  .float-grid-columns(@class);\n  .loop-grid-columns(@grid-columns, @class, width);\n  .loop-grid-columns(@grid-columns, @class, pull);\n  .loop-grid-columns(@grid-columns, @class, push);\n  .loop-grid-columns(@grid-columns, @class, offset);\n}\n","//\n// Tables\n// --------------------------------------------------\n\n\ntable {\n  background-color: @table-bg;\n}\ncaption {\n  padding-top: @table-cell-padding;\n  padding-bottom: @table-cell-padding;\n  color: @text-muted;\n  text-align: left;\n}\nth {\n  text-align: left;\n}\n\n\n// Baseline styles\n\n.table {\n  width: 100%;\n  max-width: 100%;\n  margin-bottom: @line-height-computed;\n  // Cells\n  > thead,\n  > tbody,\n  > tfoot {\n    > tr {\n      > th,\n      > td {\n        padding: @table-cell-padding;\n        line-height: @line-height-base;\n        vertical-align: top;\n        border-top: 1px solid @table-border-color;\n      }\n    }\n  }\n  // Bottom align for column headings\n  > thead > tr > th {\n    vertical-align: bottom;\n    border-bottom: 2px solid @table-border-color;\n  }\n  // Remove top border from thead by default\n  > caption + thead,\n  > colgroup + thead,\n  > thead:first-child {\n    > tr:first-child {\n      > th,\n      > td {\n        border-top: 0;\n      }\n    }\n  }\n  // Account for multiple tbody instances\n  > tbody + tbody {\n    border-top: 2px solid @table-border-color;\n  }\n\n  // Nesting\n  .table {\n    background-color: @body-bg;\n  }\n}\n\n\n// Condensed table w/ half padding\n\n.table-condensed {\n  > thead,\n  > tbody,\n  > tfoot {\n    > tr {\n      > th,\n      > td {\n        padding: @table-condensed-cell-padding;\n      }\n    }\n  }\n}\n\n\n// Bordered version\n//\n// Add borders all around the table and between all the columns.\n\n.table-bordered {\n  border: 1px solid @table-border-color;\n  > thead,\n  > tbody,\n  > tfoot {\n    > tr {\n      > th,\n      > td {\n        border: 1px solid @table-border-color;\n      }\n    }\n  }\n  > thead > tr {\n    > th,\n    > td {\n      border-bottom-width: 2px;\n    }\n  }\n}\n\n\n// Zebra-striping\n//\n// Default zebra-stripe styles (alternating gray and transparent backgrounds)\n\n.table-striped {\n  > tbody > tr:nth-of-type(odd) {\n    background-color: @table-bg-accent;\n  }\n}\n\n\n// Hover effect\n//\n// Placed here since it has to come after the potential zebra striping\n\n.table-hover {\n  > tbody > tr:hover {\n    background-color: @table-bg-hover;\n  }\n}\n\n\n// Table cell sizing\n//\n// Reset default table behavior\n\ntable col[class*=\"col-\"] {\n  position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n  float: none;\n  display: table-column;\n}\ntable {\n  td,\n  th {\n    &[class*=\"col-\"] {\n      position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n      float: none;\n      display: table-cell;\n    }\n  }\n}\n\n\n// Table backgrounds\n//\n// Exact selectors below required to override `.table-striped` and prevent\n// inheritance to nested tables.\n\n// Generate the contextual variants\n.table-row-variant(active; @table-bg-active);\n.table-row-variant(success; @state-success-bg);\n.table-row-variant(info; @state-info-bg);\n.table-row-variant(warning; @state-warning-bg);\n.table-row-variant(danger; @state-danger-bg);\n\n\n// Responsive tables\n//\n// Wrap your tables in `.table-responsive` and we'll make them mobile friendly\n// by enabling horizontal scrolling. Only applies <768px. Everything above that\n// will display normally.\n\n.table-responsive {\n  overflow-x: auto;\n  min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)\n\n  @media screen and (max-width: @screen-xs-max) {\n    width: 100%;\n    margin-bottom: (@line-height-computed * 0.75);\n    overflow-y: hidden;\n    -ms-overflow-style: -ms-autohiding-scrollbar;\n    border: 1px solid @table-border-color;\n\n    // Tighten up spacing\n    > .table {\n      margin-bottom: 0;\n\n      // Ensure the content doesn't wrap\n      > thead,\n      > tbody,\n      > tfoot {\n        > tr {\n          > th,\n          > td {\n            white-space: nowrap;\n          }\n        }\n      }\n    }\n\n    // Special overrides for the bordered tables\n    > .table-bordered {\n      border: 0;\n\n      // Nuke the appropriate borders so that the parent can handle them\n      > thead,\n      > tbody,\n      > tfoot {\n        > tr {\n          > th:first-child,\n          > td:first-child {\n            border-left: 0;\n          }\n          > th:last-child,\n          > td:last-child {\n            border-right: 0;\n          }\n        }\n      }\n\n      // Only nuke the last row's bottom-border in `tbody` and `tfoot` since\n      // chances are there will be only one `tr` in a `thead` and that would\n      // remove the border altogether.\n      > tbody,\n      > tfoot {\n        > tr:last-child {\n          > th,\n          > td {\n            border-bottom: 0;\n          }\n        }\n      }\n\n    }\n  }\n}\n","// Tables\n\n.table-row-variant(@state; @background) {\n  // Exact selectors below required to override `.table-striped` and prevent\n  // inheritance to nested tables.\n  .table > thead > tr,\n  .table > tbody > tr,\n  .table > tfoot > tr {\n    > td.@{state},\n    > th.@{state},\n    &.@{state} > td,\n    &.@{state} > th {\n      background-color: @background;\n    }\n  }\n\n  // Hover states for `.table-hover`\n  // Note: this is not available for cells or rows within `thead` or `tfoot`.\n  .table-hover > tbody > tr {\n    > td.@{state}:hover,\n    > th.@{state}:hover,\n    &.@{state}:hover > td,\n    &:hover > .@{state},\n    &.@{state}:hover > th {\n      background-color: darken(@background, 5%);\n    }\n  }\n}\n","//\n// Forms\n// --------------------------------------------------\n\n\n// Normalize non-controls\n//\n// Restyle and baseline non-control form elements.\n\nfieldset {\n  padding: 0;\n  margin: 0;\n  border: 0;\n  // Chrome and Firefox set a `min-width: min-content;` on fieldsets,\n  // so we reset that to ensure it behaves more like a standard block element.\n  // See https://github.com/twbs/bootstrap/issues/12359.\n  min-width: 0;\n}\n\nlegend {\n  display: block;\n  width: 100%;\n  padding: 0;\n  margin-bottom: @line-height-computed;\n  font-size: (@font-size-base * 1.5);\n  line-height: inherit;\n  color: @legend-color;\n  border: 0;\n  border-bottom: 1px solid @legend-border-color;\n}\n\nlabel {\n  display: inline-block;\n  max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)\n  margin-bottom: 5px;\n  font-weight: bold;\n}\n\n\n// Normalize form controls\n//\n// While most of our form styles require extra classes, some basic normalization\n// is required to ensure optimum display with or without those classes to better\n// address browser inconsistencies.\n\n// Override content-box in Normalize (* isn't specific enough)\ninput[type=\"search\"] {\n  .box-sizing(border-box);\n}\n\n// Position radios and checkboxes better\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n  margin: 4px 0 0;\n  margin-top: 1px \\9; // IE8-9\n  line-height: normal;\n}\n\ninput[type=\"file\"] {\n  display: block;\n}\n\n// Make range inputs behave like textual form controls\ninput[type=\"range\"] {\n  display: block;\n  width: 100%;\n}\n\n// Make multiple select elements height not fixed\nselect[multiple],\nselect[size] {\n  height: auto;\n}\n\n// Focus for file, radio, and checkbox\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n  .tab-focus();\n}\n\n// Adjust output element\noutput {\n  display: block;\n  padding-top: (@padding-base-vertical + 1);\n  font-size: @font-size-base;\n  line-height: @line-height-base;\n  color: @input-color;\n}\n\n\n// Common form controls\n//\n// Shared size and type resets for form controls. Apply `.form-control` to any\n// of the following form controls:\n//\n// select\n// textarea\n// input[type=\"text\"]\n// input[type=\"password\"]\n// input[type=\"datetime\"]\n// input[type=\"datetime-local\"]\n// input[type=\"date\"]\n// input[type=\"month\"]\n// input[type=\"time\"]\n// input[type=\"week\"]\n// input[type=\"number\"]\n// input[type=\"email\"]\n// input[type=\"url\"]\n// input[type=\"search\"]\n// input[type=\"tel\"]\n// input[type=\"color\"]\n\n.form-control {\n  display: block;\n  width: 100%;\n  height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)\n  padding: @padding-base-vertical @padding-base-horizontal;\n  font-size: @font-size-base;\n  line-height: @line-height-base;\n  color: @input-color;\n  background-color: @input-bg;\n  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n  border: 1px solid @input-border;\n  border-radius: @input-border-radius; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.\n  .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));\n  .transition(~\"border-color ease-in-out .15s, box-shadow ease-in-out .15s\");\n\n  // Customize the `:focus` state to imitate native WebKit styles.\n  .form-control-focus();\n\n  // Placeholder\n  .placeholder();\n\n  // Unstyle the caret on `<select>`s in IE10+.\n  &::-ms-expand {\n    border: 0;\n    background-color: transparent;\n  }\n\n  // Disabled and read-only inputs\n  //\n  // HTML5 says that controls under a fieldset > legend:first-child won't be\n  // disabled if the fieldset is disabled. Due to implementation difficulty, we\n  // don't honor that edge case; we style them as disabled anyway.\n  &[disabled],\n  &[readonly],\n  fieldset[disabled] & {\n    background-color: @input-bg-disabled;\n    opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655\n  }\n\n  &[disabled],\n  fieldset[disabled] & {\n    cursor: @cursor-disabled;\n  }\n\n  // Reset height for `textarea`s\n  textarea& {\n    height: auto;\n  }\n}\n\n\n// Search inputs in iOS\n//\n// This overrides the extra rounded corners on search inputs in iOS so that our\n// `.form-control` class can properly style them. Note that this cannot simply\n// be added to `.form-control` as it's not specific enough. For details, see\n// https://github.com/twbs/bootstrap/issues/11586.\n\ninput[type=\"search\"] {\n  -webkit-appearance: none;\n}\n\n\n// Special styles for iOS temporal inputs\n//\n// In Mobile Safari, setting `display: block` on temporal inputs causes the\n// text within the input to become vertically misaligned. As a workaround, we\n// set a pixel line-height that matches the given height of the input, but only\n// for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848\n//\n// Note that as of 9.3, iOS doesn't support `week`.\n\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n  input[type=\"date\"],\n  input[type=\"time\"],\n  input[type=\"datetime-local\"],\n  input[type=\"month\"] {\n    &.form-control {\n      line-height: @input-height-base;\n    }\n\n    &.input-sm,\n    .input-group-sm & {\n      line-height: @input-height-small;\n    }\n\n    &.input-lg,\n    .input-group-lg & {\n      line-height: @input-height-large;\n    }\n  }\n}\n\n\n// Form groups\n//\n// Designed to help with the organization and spacing of vertical forms. For\n// horizontal forms, use the predefined grid classes.\n\n.form-group {\n  margin-bottom: @form-group-margin-bottom;\n}\n\n\n// Checkboxes and radios\n//\n// Indent the labels to position radios/checkboxes as hanging controls.\n\n.radio,\n.checkbox {\n  position: relative;\n  display: block;\n  margin-top: 10px;\n  margin-bottom: 10px;\n\n  label {\n    min-height: @line-height-computed; // Ensure the input doesn't jump when there is no text\n    padding-left: 20px;\n    margin-bottom: 0;\n    font-weight: normal;\n    cursor: pointer;\n  }\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n  position: absolute;\n  margin-left: -20px;\n  margin-top: 4px \\9;\n}\n\n.radio + .radio,\n.checkbox + .checkbox {\n  margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing\n}\n\n// Radios and checkboxes on same line\n.radio-inline,\n.checkbox-inline {\n  position: relative;\n  display: inline-block;\n  padding-left: 20px;\n  margin-bottom: 0;\n  vertical-align: middle;\n  font-weight: normal;\n  cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n  margin-top: 0;\n  margin-left: 10px; // space out consecutive inline controls\n}\n\n// Apply same disabled cursor tweak as for inputs\n// Some special care is needed because <label>s don't inherit their parent's `cursor`.\n//\n// Note: Neither radios nor checkboxes can be readonly.\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n  &[disabled],\n  &.disabled,\n  fieldset[disabled] & {\n    cursor: @cursor-disabled;\n  }\n}\n// These classes are used directly on <label>s\n.radio-inline,\n.checkbox-inline {\n  &.disabled,\n  fieldset[disabled] & {\n    cursor: @cursor-disabled;\n  }\n}\n// These classes are used on elements with <label> descendants\n.radio,\n.checkbox {\n  &.disabled,\n  fieldset[disabled] & {\n    label {\n      cursor: @cursor-disabled;\n    }\n  }\n}\n\n\n// Static form control text\n//\n// Apply class to a `p` element to make any string of text align with labels in\n// a horizontal form layout.\n\n.form-control-static {\n  // Size it appropriately next to real form controls\n  padding-top: (@padding-base-vertical + 1);\n  padding-bottom: (@padding-base-vertical + 1);\n  // Remove default margin from `p`\n  margin-bottom: 0;\n  min-height: (@line-height-computed + @font-size-base);\n\n  &.input-lg,\n  &.input-sm {\n    padding-left: 0;\n    padding-right: 0;\n  }\n}\n\n\n// Form control sizing\n//\n// Build on `.form-control` with modifier classes to decrease or increase the\n// height and font-size of form controls.\n//\n// The `.form-group-* form-control` variations are sadly duplicated to avoid the\n// issue documented in https://github.com/twbs/bootstrap/issues/15074.\n\n.input-sm {\n  .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);\n}\n.form-group-sm {\n  .form-control {\n    height: @input-height-small;\n    padding: @padding-small-vertical @padding-small-horizontal;\n    font-size: @font-size-small;\n    line-height: @line-height-small;\n    border-radius: @input-border-radius-small;\n  }\n  select.form-control {\n    height: @input-height-small;\n    line-height: @input-height-small;\n  }\n  textarea.form-control,\n  select[multiple].form-control {\n    height: auto;\n  }\n  .form-control-static {\n    height: @input-height-small;\n    min-height: (@line-height-computed + @font-size-small);\n    padding: (@padding-small-vertical + 1) @padding-small-horizontal;\n    font-size: @font-size-small;\n    line-height: @line-height-small;\n  }\n}\n\n.input-lg {\n  .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);\n}\n.form-group-lg {\n  .form-control {\n    height: @input-height-large;\n    padding: @padding-large-vertical @padding-large-horizontal;\n    font-size: @font-size-large;\n    line-height: @line-height-large;\n    border-radius: @input-border-radius-large;\n  }\n  select.form-control {\n    height: @input-height-large;\n    line-height: @input-height-large;\n  }\n  textarea.form-control,\n  select[multiple].form-control {\n    height: auto;\n  }\n  .form-control-static {\n    height: @input-height-large;\n    min-height: (@line-height-computed + @font-size-large);\n    padding: (@padding-large-vertical + 1) @padding-large-horizontal;\n    font-size: @font-size-large;\n    line-height: @line-height-large;\n  }\n}\n\n\n// Form control feedback states\n//\n// Apply contextual and semantic states to individual form controls.\n\n.has-feedback {\n  // Enable absolute positioning\n  position: relative;\n\n  // Ensure icons don't overlap text\n  .form-control {\n    padding-right: (@input-height-base * 1.25);\n  }\n}\n// Feedback icon (requires .glyphicon classes)\n.form-control-feedback {\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: 2; // Ensure icon is above input groups\n  display: block;\n  width: @input-height-base;\n  height: @input-height-base;\n  line-height: @input-height-base;\n  text-align: center;\n  pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n  width: @input-height-large;\n  height: @input-height-large;\n  line-height: @input-height-large;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n  width: @input-height-small;\n  height: @input-height-small;\n  line-height: @input-height-small;\n}\n\n// Feedback states\n.has-success {\n  .form-control-validation(@state-success-text; @state-success-text; @state-success-bg);\n}\n.has-warning {\n  .form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg);\n}\n.has-error {\n  .form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg);\n}\n\n// Reposition feedback icon if input has visible label above\n.has-feedback label {\n\n  & ~ .form-control-feedback {\n    top: (@line-height-computed + 5); // Height of the `label` and its margin\n  }\n  &.sr-only ~ .form-control-feedback {\n    top: 0;\n  }\n}\n\n\n// Help text\n//\n// Apply to any element you wish to create light text for placement immediately\n// below a form control. Use for general help, formatting, or instructional text.\n\n.help-block {\n  display: block; // account for any element using help-block\n  margin-top: 5px;\n  margin-bottom: 10px;\n  color: lighten(@text-color, 25%); // lighten the text some for contrast\n}\n\n\n// Inline forms\n//\n// Make forms appear inline(-block) by adding the `.form-inline` class. Inline\n// forms begin stacked on extra small (mobile) devices and then go inline when\n// viewports reach <768px.\n//\n// Requires wrapping inputs and labels with `.form-group` for proper display of\n// default HTML form controls and our custom form controls (e.g., input groups).\n//\n// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.\n\n.form-inline {\n\n  // Kick in the inline\n  @media (min-width: @screen-sm-min) {\n    // Inline-block all the things for \"inline\"\n    .form-group {\n      display: inline-block;\n      margin-bottom: 0;\n      vertical-align: middle;\n    }\n\n    // In navbar-form, allow folks to *not* use `.form-group`\n    .form-control {\n      display: inline-block;\n      width: auto; // Prevent labels from stacking above inputs in `.form-group`\n      vertical-align: middle;\n    }\n\n    // Make static controls behave like regular ones\n    .form-control-static {\n      display: inline-block;\n    }\n\n    .input-group {\n      display: inline-table;\n      vertical-align: middle;\n\n      .input-group-addon,\n      .input-group-btn,\n      .form-control {\n        width: auto;\n      }\n    }\n\n    // Input groups need that 100% width though\n    .input-group > .form-control {\n      width: 100%;\n    }\n\n    .control-label {\n      margin-bottom: 0;\n      vertical-align: middle;\n    }\n\n    // Remove default margin on radios/checkboxes that were used for stacking, and\n    // then undo the floating of radios and checkboxes to match.\n    .radio,\n    .checkbox {\n      display: inline-block;\n      margin-top: 0;\n      margin-bottom: 0;\n      vertical-align: middle;\n\n      label {\n        padding-left: 0;\n      }\n    }\n    .radio input[type=\"radio\"],\n    .checkbox input[type=\"checkbox\"] {\n      position: relative;\n      margin-left: 0;\n    }\n\n    // Re-override the feedback icon.\n    .has-feedback .form-control-feedback {\n      top: 0;\n    }\n  }\n}\n\n\n// Horizontal forms\n//\n// Horizontal forms are built on grid classes and allow you to create forms with\n// labels on the left and inputs on the right.\n\n.form-horizontal {\n\n  // Consistent vertical alignment of radios and checkboxes\n  //\n  // Labels also get some reset styles, but that is scoped to a media query below.\n  .radio,\n  .checkbox,\n  .radio-inline,\n  .checkbox-inline {\n    margin-top: 0;\n    margin-bottom: 0;\n    padding-top: (@padding-base-vertical + 1); // Default padding plus a border\n  }\n  // Account for padding we're adding to ensure the alignment and of help text\n  // and other content below items\n  .radio,\n  .checkbox {\n    min-height: (@line-height-computed + (@padding-base-vertical + 1));\n  }\n\n  // Make form groups behave like rows\n  .form-group {\n    .make-row();\n  }\n\n  // Reset spacing and right align labels, but scope to media queries so that\n  // labels on narrow viewports stack the same as a default form example.\n  @media (min-width: @screen-sm-min) {\n    .control-label {\n      text-align: right;\n      margin-bottom: 0;\n      padding-top: (@padding-base-vertical + 1); // Default padding plus a border\n    }\n  }\n\n  // Validation states\n  //\n  // Reposition the icon because it's now within a grid column and columns have\n  // `position: relative;` on them. Also accounts for the grid gutter padding.\n  .has-feedback .form-control-feedback {\n    right: floor((@grid-gutter-width / 2));\n  }\n\n  // Form group sizes\n  //\n  // Quick utility class for applying `.input-lg` and `.input-sm` styles to the\n  // inputs and labels within a `.form-group`.\n  .form-group-lg {\n    @media (min-width: @screen-sm-min) {\n      .control-label {\n        padding-top: (@padding-large-vertical + 1);\n        font-size: @font-size-large;\n      }\n    }\n  }\n  .form-group-sm {\n    @media (min-width: @screen-sm-min) {\n      .control-label {\n        padding-top: (@padding-small-vertical + 1);\n        font-size: @font-size-small;\n      }\n    }\n  }\n}\n","// Form validation states\n//\n// Used in forms.less to generate the form validation CSS for warnings, errors,\n// and successes.\n\n.form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {\n  // Color the label and help text\n  .help-block,\n  .control-label,\n  .radio,\n  .checkbox,\n  .radio-inline,\n  .checkbox-inline,\n  &.radio label,\n  &.checkbox label,\n  &.radio-inline label,\n  &.checkbox-inline label  {\n    color: @text-color;\n  }\n  // Set the border and box shadow on specific inputs to match\n  .form-control {\n    border-color: @border-color;\n    .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work\n    &:focus {\n      border-color: darken(@border-color, 10%);\n      @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);\n      .box-shadow(@shadow);\n    }\n  }\n  // Set validation states also for addons\n  .input-group-addon {\n    color: @text-color;\n    border-color: @border-color;\n    background-color: @background-color;\n  }\n  // Optional feedback icon\n  .form-control-feedback {\n    color: @text-color;\n  }\n}\n\n\n// Form control focus state\n//\n// Generate a customized focus state and for any input with the specified color,\n// which defaults to the `@input-border-focus` variable.\n//\n// We highly encourage you to not customize the default value, but instead use\n// this to tweak colors on an as-needed basis. This aesthetic change is based on\n// WebKit's default styles, but applicable to a wider range of browsers. Its\n// usability and accessibility should be taken into account with any change.\n//\n// Example usage: change the default blue border and shadow to white for better\n// contrast against a dark gray background.\n.form-control-focus(@color: @input-border-focus) {\n  @color-rgba: rgba(red(@color), green(@color), blue(@color), .6);\n  &:focus {\n    border-color: @color;\n    outline: 0;\n    .box-shadow(~\"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}\");\n  }\n}\n\n// Form control sizing\n//\n// Relative text size, padding, and border-radii changes for form controls. For\n// horizontal sizing, wrap controls in the predefined grid classes. `<select>`\n// element gets special love because it's special, and that's a fact!\n.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n  height: @input-height;\n  padding: @padding-vertical @padding-horizontal;\n  font-size: @font-size;\n  line-height: @line-height;\n  border-radius: @border-radius;\n\n  select& {\n    height: @input-height;\n    line-height: @input-height;\n  }\n\n  textarea&,\n  select[multiple]& {\n    height: auto;\n  }\n}\n","//\n// Buttons\n// --------------------------------------------------\n\n\n// Base styles\n// --------------------------------------------------\n\n.btn {\n  display: inline-block;\n  margin-bottom: 0; // For input.btn\n  font-weight: @btn-font-weight;\n  text-align: center;\n  vertical-align: middle;\n  touch-action: manipulation;\n  cursor: pointer;\n  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n  border: 1px solid transparent;\n  white-space: nowrap;\n  .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @btn-border-radius-base);\n  .user-select(none);\n\n  &,\n  &:active,\n  &.active {\n    &:focus,\n    &.focus {\n      .tab-focus();\n    }\n  }\n\n  &:hover,\n  &:focus,\n  &.focus {\n    color: @btn-default-color;\n    text-decoration: none;\n  }\n\n  &:active,\n  &.active {\n    outline: 0;\n    background-image: none;\n    .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n  }\n\n  &.disabled,\n  &[disabled],\n  fieldset[disabled] & {\n    cursor: @cursor-disabled;\n    .opacity(.65);\n    .box-shadow(none);\n  }\n\n  a& {\n    &.disabled,\n    fieldset[disabled] & {\n      pointer-events: none; // Future-proof disabling of clicks on `<a>` elements\n    }\n  }\n}\n\n\n// Alternate buttons\n// --------------------------------------------------\n\n.btn-default {\n  .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);\n}\n.btn-primary {\n  .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);\n}\n// Success appears as green\n.btn-success {\n  .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);\n}\n// Info appears as blue-green\n.btn-info {\n  .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);\n}\n// Warning appears as orange\n.btn-warning {\n  .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);\n}\n// Danger and error appear as red\n.btn-danger {\n  .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);\n}\n\n\n// Link buttons\n// -------------------------\n\n// Make a button look and behave like a link\n.btn-link {\n  color: @link-color;\n  font-weight: normal;\n  border-radius: 0;\n\n  &,\n  &:active,\n  &.active,\n  &[disabled],\n  fieldset[disabled] & {\n    background-color: transparent;\n    .box-shadow(none);\n  }\n  &,\n  &:hover,\n  &:focus,\n  &:active {\n    border-color: transparent;\n  }\n  &:hover,\n  &:focus {\n    color: @link-hover-color;\n    text-decoration: @link-hover-decoration;\n    background-color: transparent;\n  }\n  &[disabled],\n  fieldset[disabled] & {\n    &:hover,\n    &:focus {\n      color: @btn-link-disabled-color;\n      text-decoration: none;\n    }\n  }\n}\n\n\n// Button Sizes\n// --------------------------------------------------\n\n.btn-lg {\n  // line-height: ensure even-numbered height of button next to large input\n  .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @btn-border-radius-large);\n}\n.btn-sm {\n  // line-height: ensure proper height of button next to small input\n  .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);\n}\n.btn-xs {\n  .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);\n}\n\n\n// Block button\n// --------------------------------------------------\n\n.btn-block {\n  display: block;\n  width: 100%;\n}\n\n// Vertically space out multiple block buttons\n.btn-block + .btn-block {\n  margin-top: 5px;\n}\n\n// Specificity overrides\ninput[type=\"submit\"],\ninput[type=\"reset\"],\ninput[type=\"button\"] {\n  &.btn-block {\n    width: 100%;\n  }\n}\n","// Button variants\n//\n// Easily pump out default styles, as well as :hover, :focus, :active,\n// and disabled options for all buttons\n\n.button-variant(@color; @background; @border) {\n  color: @color;\n  background-color: @background;\n  border-color: @border;\n\n  &:focus,\n  &.focus {\n    color: @color;\n    background-color: darken(@background, 10%);\n        border-color: darken(@border, 25%);\n  }\n  &:hover {\n    color: @color;\n    background-color: darken(@background, 10%);\n        border-color: darken(@border, 12%);\n  }\n  &:active,\n  &.active,\n  .open > .dropdown-toggle& {\n    color: @color;\n    background-color: darken(@background, 10%);\n        border-color: darken(@border, 12%);\n\n    &:hover,\n    &:focus,\n    &.focus {\n      color: @color;\n      background-color: darken(@background, 17%);\n          border-color: darken(@border, 25%);\n    }\n  }\n  &:active,\n  &.active,\n  .open > .dropdown-toggle& {\n    background-image: none;\n  }\n  &.disabled,\n  &[disabled],\n  fieldset[disabled] & {\n    &:hover,\n    &:focus,\n    &.focus {\n      background-color: @background;\n          border-color: @border;\n    }\n  }\n\n  .badge {\n    color: @background;\n    background-color: @color;\n  }\n}\n\n// Button sizes\n.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n  padding: @padding-vertical @padding-horizontal;\n  font-size: @font-size;\n  line-height: @line-height;\n  border-radius: @border-radius;\n}\n","// Opacity\n\n.opacity(@opacity) {\n  opacity: @opacity;\n  // IE8 filter\n  @opacity-ie: (@opacity * 100);\n  filter: ~\"alpha(opacity=@{opacity-ie})\";\n}\n","//\n// Component animations\n// --------------------------------------------------\n\n// Heads up!\n//\n// We don't use the `.opacity()` mixin here since it causes a bug with text\n// fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.\n\n.fade {\n  opacity: 0;\n  .transition(opacity .15s linear);\n  &.in {\n    opacity: 1;\n  }\n}\n\n.collapse {\n  display: none;\n\n  &.in      { display: block; }\n  tr&.in    { display: table-row; }\n  tbody&.in { display: table-row-group; }\n}\n\n.collapsing {\n  position: relative;\n  height: 0;\n  overflow: hidden;\n  .transition-property(~\"height, visibility\");\n  .transition-duration(.35s);\n  .transition-timing-function(ease);\n}\n","//\n// Dropdown menus\n// --------------------------------------------------\n\n\n// Dropdown arrow/caret\n.caret {\n  display: inline-block;\n  width: 0;\n  height: 0;\n  margin-left: 2px;\n  vertical-align: middle;\n  border-top:   @caret-width-base dashed;\n  border-top:   @caret-width-base solid ~\"\\9\"; // IE8\n  border-right: @caret-width-base solid transparent;\n  border-left:  @caret-width-base solid transparent;\n}\n\n// The dropdown wrapper (div)\n.dropup,\n.dropdown {\n  position: relative;\n}\n\n// Prevent the focus on the dropdown toggle when closing dropdowns\n.dropdown-toggle:focus {\n  outline: 0;\n}\n\n// The dropdown menu (ul)\n.dropdown-menu {\n  position: absolute;\n  top: 100%;\n  left: 0;\n  z-index: @zindex-dropdown;\n  display: none; // none by default, but block on \"open\" of the menu\n  float: left;\n  min-width: 160px;\n  padding: 5px 0;\n  margin: 2px 0 0; // override default ul\n  list-style: none;\n  font-size: @font-size-base;\n  text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)\n  background-color: @dropdown-bg;\n  border: 1px solid @dropdown-fallback-border; // IE8 fallback\n  border: 1px solid @dropdown-border;\n  border-radius: @border-radius-base;\n  .box-shadow(0 6px 12px rgba(0,0,0,.175));\n  background-clip: padding-box;\n\n  // Aligns the dropdown menu to right\n  //\n  // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`\n  &.pull-right {\n    right: 0;\n    left: auto;\n  }\n\n  // Dividers (basically an hr) within the dropdown\n  .divider {\n    .nav-divider(@dropdown-divider-bg);\n  }\n\n  // Links within the dropdown menu\n  > li > a {\n    display: block;\n    padding: 3px 20px;\n    clear: both;\n    font-weight: normal;\n    line-height: @line-height-base;\n    color: @dropdown-link-color;\n    white-space: nowrap; // prevent links from randomly breaking onto new lines\n  }\n}\n\n// Hover/Focus state\n.dropdown-menu > li > a {\n  &:hover,\n  &:focus {\n    text-decoration: none;\n    color: @dropdown-link-hover-color;\n    background-color: @dropdown-link-hover-bg;\n  }\n}\n\n// Active state\n.dropdown-menu > .active > a {\n  &,\n  &:hover,\n  &:focus {\n    color: @dropdown-link-active-color;\n    text-decoration: none;\n    outline: 0;\n    background-color: @dropdown-link-active-bg;\n  }\n}\n\n// Disabled state\n//\n// Gray out text and ensure the hover/focus state remains gray\n\n.dropdown-menu > .disabled > a {\n  &,\n  &:hover,\n  &:focus {\n    color: @dropdown-link-disabled-color;\n  }\n\n  // Nuke hover/focus effects\n  &:hover,\n  &:focus {\n    text-decoration: none;\n    background-color: transparent;\n    background-image: none; // Remove CSS gradient\n    .reset-filter();\n    cursor: @cursor-disabled;\n  }\n}\n\n// Open state for the dropdown\n.open {\n  // Show the menu\n  > .dropdown-menu {\n    display: block;\n  }\n\n  // Remove the outline when :focus is triggered\n  > a {\n    outline: 0;\n  }\n}\n\n// Menu positioning\n//\n// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown\n// menu with the parent.\n.dropdown-menu-right {\n  left: auto; // Reset the default from `.dropdown-menu`\n  right: 0;\n}\n// With v3, we enabled auto-flipping if you have a dropdown within a right\n// aligned nav component. To enable the undoing of that, we provide an override\n// to restore the default dropdown menu alignment.\n//\n// This is only for left-aligning a dropdown menu within a `.navbar-right` or\n// `.pull-right` nav component.\n.dropdown-menu-left {\n  left: 0;\n  right: auto;\n}\n\n// Dropdown section headers\n.dropdown-header {\n  display: block;\n  padding: 3px 20px;\n  font-size: @font-size-small;\n  line-height: @line-height-base;\n  color: @dropdown-header-color;\n  white-space: nowrap; // as with > li > a\n}\n\n// Backdrop to catch body clicks on mobile, etc.\n.dropdown-backdrop {\n  position: fixed;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  top: 0;\n  z-index: (@zindex-dropdown - 10);\n}\n\n// Right aligned dropdowns\n.pull-right > .dropdown-menu {\n  right: 0;\n  left: auto;\n}\n\n// Allow for dropdowns to go bottom up (aka, dropup-menu)\n//\n// Just add .dropup after the standard .dropdown class and you're set, bro.\n// TODO: abstract this so that the navbar fixed styles are not placed here?\n\n.dropup,\n.navbar-fixed-bottom .dropdown {\n  // Reverse the caret\n  .caret {\n    border-top: 0;\n    border-bottom: @caret-width-base dashed;\n    border-bottom: @caret-width-base solid ~\"\\9\"; // IE8\n    content: \"\";\n  }\n  // Different positioning for bottom up menu\n  .dropdown-menu {\n    top: auto;\n    bottom: 100%;\n    margin-bottom: 2px;\n  }\n}\n\n\n// Component alignment\n//\n// Reiterate per navbar.less and the modified component alignment there.\n\n@media (min-width: @grid-float-breakpoint) {\n  .navbar-right {\n    .dropdown-menu {\n      .dropdown-menu-right();\n    }\n    // Necessary for overrides of the default right aligned menu.\n    // Will remove come v4 in all likelihood.\n    .dropdown-menu-left {\n      .dropdown-menu-left();\n    }\n  }\n}\n","// Horizontal dividers\n//\n// Dividers (basically an hr) within dropdowns and nav lists\n\n.nav-divider(@color: #e5e5e5) {\n  height: 1px;\n  margin: ((@line-height-computed / 2) - 1) 0;\n  overflow: hidden;\n  background-color: @color;\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n  filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n","//\n// Button groups\n// --------------------------------------------------\n\n// Make the div behave like a button\n.btn-group,\n.btn-group-vertical {\n  position: relative;\n  display: inline-block;\n  vertical-align: middle; // match .btn alignment given font-size hack above\n  > .btn {\n    position: relative;\n    float: left;\n    // Bring the \"active\" button to the front\n    &:hover,\n    &:focus,\n    &:active,\n    &.active {\n      z-index: 2;\n    }\n  }\n}\n\n// Prevent double borders when buttons are next to each other\n.btn-group {\n  .btn + .btn,\n  .btn + .btn-group,\n  .btn-group + .btn,\n  .btn-group + .btn-group {\n    margin-left: -1px;\n  }\n}\n\n// Optional: Group multiple button groups together for a toolbar\n.btn-toolbar {\n  margin-left: -5px; // Offset the first child's margin\n  &:extend(.clearfix all);\n\n  .btn,\n  .btn-group,\n  .input-group {\n    float: left;\n  }\n  > .btn,\n  > .btn-group,\n  > .input-group {\n    margin-left: 5px;\n  }\n}\n\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n  border-radius: 0;\n}\n\n// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match\n.btn-group > .btn:first-child {\n  margin-left: 0;\n  &:not(:last-child):not(.dropdown-toggle) {\n    .border-right-radius(0);\n  }\n}\n// Need .dropdown-toggle since :last-child doesn't apply, given that a .dropdown-menu is used immediately after it\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n  .border-left-radius(0);\n}\n\n// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)\n.btn-group > .btn-group {\n  float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) {\n  > .btn:last-child,\n  > .dropdown-toggle {\n    .border-right-radius(0);\n  }\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  .border-left-radius(0);\n}\n\n// On active and open, don't show outline\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n  outline: 0;\n}\n\n\n// Sizing\n//\n// Remix the default button sizing classes into new ones for easier manipulation.\n\n.btn-group-xs > .btn { &:extend(.btn-xs); }\n.btn-group-sm > .btn { &:extend(.btn-sm); }\n.btn-group-lg > .btn { &:extend(.btn-lg); }\n\n\n// Split button dropdowns\n// ----------------------\n\n// Give the line between buttons some depth\n.btn-group > .btn + .dropdown-toggle {\n  padding-left: 8px;\n  padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n  padding-left: 12px;\n  padding-right: 12px;\n}\n\n// The clickable button for toggling the menu\n// Remove the gradient and set the same inset shadow as the :active state\n.btn-group.open .dropdown-toggle {\n  .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n\n  // Show no shadow for `.btn-link` since it has no other button styles.\n  &.btn-link {\n    .box-shadow(none);\n  }\n}\n\n\n// Reposition the caret\n.btn .caret {\n  margin-left: 0;\n}\n// Carets in other button sizes\n.btn-lg .caret {\n  border-width: @caret-width-large @caret-width-large 0;\n  border-bottom-width: 0;\n}\n// Upside down carets for .dropup\n.dropup .btn-lg .caret {\n  border-width: 0 @caret-width-large @caret-width-large;\n}\n\n\n// Vertical button groups\n// ----------------------\n\n.btn-group-vertical {\n  > .btn,\n  > .btn-group,\n  > .btn-group > .btn {\n    display: block;\n    float: none;\n    width: 100%;\n    max-width: 100%;\n  }\n\n  // Clear floats so dropdown menus can be properly placed\n  > .btn-group {\n    &:extend(.clearfix all);\n    > .btn {\n      float: none;\n    }\n  }\n\n  > .btn + .btn,\n  > .btn + .btn-group,\n  > .btn-group + .btn,\n  > .btn-group + .btn-group {\n    margin-top: -1px;\n    margin-left: 0;\n  }\n}\n\n.btn-group-vertical > .btn {\n  &:not(:first-child):not(:last-child) {\n    border-radius: 0;\n  }\n  &:first-child:not(:last-child) {\n    .border-top-radius(@btn-border-radius-base);\n    .border-bottom-radius(0);\n  }\n  &:last-child:not(:first-child) {\n    .border-top-radius(0);\n    .border-bottom-radius(@btn-border-radius-base);\n  }\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) {\n  > .btn:last-child,\n  > .dropdown-toggle {\n    .border-bottom-radius(0);\n  }\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  .border-top-radius(0);\n}\n\n\n// Justified button groups\n// ----------------------\n\n.btn-group-justified {\n  display: table;\n  width: 100%;\n  table-layout: fixed;\n  border-collapse: separate;\n  > .btn,\n  > .btn-group {\n    float: none;\n    display: table-cell;\n    width: 1%;\n  }\n  > .btn-group .btn {\n    width: 100%;\n  }\n\n  > .btn-group .dropdown-menu {\n    left: auto;\n  }\n}\n\n\n// Checkbox and radio options\n//\n// In order to support the browser's form validation feedback, powered by the\n// `required` attribute, we have to \"hide\" the inputs via `clip`. We cannot use\n// `display: none;` or `visibility: hidden;` as that also hides the popover.\n// Simply visually hiding the inputs via `opacity` would leave them clickable in\n// certain cases which is prevented by using `clip` and `pointer-events`.\n// This way, we ensure a DOM element is visible to position the popover from.\n//\n// See https://github.com/twbs/bootstrap/pull/12794 and\n// https://github.com/twbs/bootstrap/pull/14559 for more information.\n\n[data-toggle=\"buttons\"] {\n  > .btn,\n  > .btn-group > .btn {\n    input[type=\"radio\"],\n    input[type=\"checkbox\"] {\n      position: absolute;\n      clip: rect(0,0,0,0);\n      pointer-events: none;\n    }\n  }\n}\n","// Single side border-radius\n\n.border-top-radius(@radius) {\n  border-top-right-radius: @radius;\n   border-top-left-radius: @radius;\n}\n.border-right-radius(@radius) {\n  border-bottom-right-radius: @radius;\n     border-top-right-radius: @radius;\n}\n.border-bottom-radius(@radius) {\n  border-bottom-right-radius: @radius;\n   border-bottom-left-radius: @radius;\n}\n.border-left-radius(@radius) {\n  border-bottom-left-radius: @radius;\n     border-top-left-radius: @radius;\n}\n","//\n// Input groups\n// --------------------------------------------------\n\n// Base styles\n// -------------------------\n.input-group {\n  position: relative; // For dropdowns\n  display: table;\n  border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table\n\n  // Undo padding and float of grid classes\n  &[class*=\"col-\"] {\n    float: none;\n    padding-left: 0;\n    padding-right: 0;\n  }\n\n  .form-control {\n    // Ensure that the input is always above the *appended* addon button for\n    // proper border colors.\n    position: relative;\n    z-index: 2;\n\n    // IE9 fubars the placeholder attribute in text inputs and the arrows on\n    // select elements in input groups. To fix it, we float the input. Details:\n    // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855\n    float: left;\n\n    width: 100%;\n    margin-bottom: 0;\n\n    &:focus {\n      z-index: 3;\n    }\n  }\n}\n\n// Sizing options\n//\n// Remix the default form control sizing classes into new ones for easier\n// manipulation.\n\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n  .input-lg();\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n  .input-sm();\n}\n\n\n// Display as table-cell\n// -------------------------\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n  display: table-cell;\n\n  &:not(:first-child):not(:last-child) {\n    border-radius: 0;\n  }\n}\n// Addon and addon wrapper for buttons\n.input-group-addon,\n.input-group-btn {\n  width: 1%;\n  white-space: nowrap;\n  vertical-align: middle; // Match the inputs\n}\n\n// Text input groups\n// -------------------------\n.input-group-addon {\n  padding: @padding-base-vertical @padding-base-horizontal;\n  font-size: @font-size-base;\n  font-weight: normal;\n  line-height: 1;\n  color: @input-color;\n  text-align: center;\n  background-color: @input-group-addon-bg;\n  border: 1px solid @input-group-addon-border-color;\n  border-radius: @input-border-radius;\n\n  // Sizing\n  &.input-sm {\n    padding: @padding-small-vertical @padding-small-horizontal;\n    font-size: @font-size-small;\n    border-radius: @input-border-radius-small;\n  }\n  &.input-lg {\n    padding: @padding-large-vertical @padding-large-horizontal;\n    font-size: @font-size-large;\n    border-radius: @input-border-radius-large;\n  }\n\n  // Nuke default margins from checkboxes and radios to vertically center within.\n  input[type=\"radio\"],\n  input[type=\"checkbox\"] {\n    margin-top: 0;\n  }\n}\n\n// Reset rounded corners\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n  .border-right-radius(0);\n}\n.input-group-addon:first-child {\n  border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n  .border-left-radius(0);\n}\n.input-group-addon:last-child {\n  border-left: 0;\n}\n\n// Button input groups\n// -------------------------\n.input-group-btn {\n  position: relative;\n  // Jankily prevent input button groups from wrapping with `white-space` and\n  // `font-size` in combination with `inline-block` on buttons.\n  font-size: 0;\n  white-space: nowrap;\n\n  // Negative margin for spacing, position for bringing hovered/focused/actived\n  // element above the siblings.\n  > .btn {\n    position: relative;\n    + .btn {\n      margin-left: -1px;\n    }\n    // Bring the \"active\" button to the front\n    &:hover,\n    &:focus,\n    &:active {\n      z-index: 2;\n    }\n  }\n\n  // Negative margin to only have a 1px border between the two\n  &:first-child {\n    > .btn,\n    > .btn-group {\n      margin-right: -1px;\n    }\n  }\n  &:last-child {\n    > .btn,\n    > .btn-group {\n      z-index: 2;\n      margin-left: -1px;\n    }\n  }\n}\n","//\n// Navs\n// --------------------------------------------------\n\n\n// Base class\n// --------------------------------------------------\n\n.nav {\n  margin-bottom: 0;\n  padding-left: 0; // Override default ul/ol\n  list-style: none;\n  &:extend(.clearfix all);\n\n  > li {\n    position: relative;\n    display: block;\n\n    > a {\n      position: relative;\n      display: block;\n      padding: @nav-link-padding;\n      &:hover,\n      &:focus {\n        text-decoration: none;\n        background-color: @nav-link-hover-bg;\n      }\n    }\n\n    // Disabled state sets text to gray and nukes hover/tab effects\n    &.disabled > a {\n      color: @nav-disabled-link-color;\n\n      &:hover,\n      &:focus {\n        color: @nav-disabled-link-hover-color;\n        text-decoration: none;\n        background-color: transparent;\n        cursor: @cursor-disabled;\n      }\n    }\n  }\n\n  // Open dropdowns\n  .open > a {\n    &,\n    &:hover,\n    &:focus {\n      background-color: @nav-link-hover-bg;\n      border-color: @link-color;\n    }\n  }\n\n  // Nav dividers (deprecated with v3.0.1)\n  //\n  // This should have been removed in v3 with the dropping of `.nav-list`, but\n  // we missed it. We don't currently support this anywhere, but in the interest\n  // of maintaining backward compatibility in case you use it, it's deprecated.\n  .nav-divider {\n    .nav-divider();\n  }\n\n  // Prevent IE8 from misplacing imgs\n  //\n  // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989\n  > li > a > img {\n    max-width: none;\n  }\n}\n\n\n// Tabs\n// -------------------------\n\n// Give the tabs something to sit on\n.nav-tabs {\n  border-bottom: 1px solid @nav-tabs-border-color;\n  > li {\n    float: left;\n    // Make the list-items overlay the bottom border\n    margin-bottom: -1px;\n\n    // Actual tabs (as links)\n    > a {\n      margin-right: 2px;\n      line-height: @line-height-base;\n      border: 1px solid transparent;\n      border-radius: @border-radius-base @border-radius-base 0 0;\n      &:hover {\n        border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;\n      }\n    }\n\n    // Active state, and its :hover to override normal :hover\n    &.active > a {\n      &,\n      &:hover,\n      &:focus {\n        color: @nav-tabs-active-link-hover-color;\n        background-color: @nav-tabs-active-link-hover-bg;\n        border: 1px solid @nav-tabs-active-link-hover-border-color;\n        border-bottom-color: transparent;\n        cursor: default;\n      }\n    }\n  }\n  // pulling this in mainly for less shorthand\n  &.nav-justified {\n    .nav-justified();\n    .nav-tabs-justified();\n  }\n}\n\n\n// Pills\n// -------------------------\n.nav-pills {\n  > li {\n    float: left;\n\n    // Links rendered as pills\n    > a {\n      border-radius: @nav-pills-border-radius;\n    }\n    + li {\n      margin-left: 2px;\n    }\n\n    // Active state\n    &.active > a {\n      &,\n      &:hover,\n      &:focus {\n        color: @nav-pills-active-link-hover-color;\n        background-color: @nav-pills-active-link-hover-bg;\n      }\n    }\n  }\n}\n\n\n// Stacked pills\n.nav-stacked {\n  > li {\n    float: none;\n    + li {\n      margin-top: 2px;\n      margin-left: 0; // no need for this gap between nav items\n    }\n  }\n}\n\n\n// Nav variations\n// --------------------------------------------------\n\n// Justified nav links\n// -------------------------\n\n.nav-justified {\n  width: 100%;\n\n  > li {\n    float: none;\n    > a {\n      text-align: center;\n      margin-bottom: 5px;\n    }\n  }\n\n  > .dropdown .dropdown-menu {\n    top: auto;\n    left: auto;\n  }\n\n  @media (min-width: @screen-sm-min) {\n    > li {\n      display: table-cell;\n      width: 1%;\n      > a {\n        margin-bottom: 0;\n      }\n    }\n  }\n}\n\n// Move borders to anchors instead of bottom of list\n//\n// Mixin for adding on top the shared `.nav-justified` styles for our tabs\n.nav-tabs-justified {\n  border-bottom: 0;\n\n  > li > a {\n    // Override margin from .nav-tabs\n    margin-right: 0;\n    border-radius: @border-radius-base;\n  }\n\n  > .active > a,\n  > .active > a:hover,\n  > .active > a:focus {\n    border: 1px solid @nav-tabs-justified-link-border-color;\n  }\n\n  @media (min-width: @screen-sm-min) {\n    > li > a {\n      border-bottom: 1px solid @nav-tabs-justified-link-border-color;\n      border-radius: @border-radius-base @border-radius-base 0 0;\n    }\n    > .active > a,\n    > .active > a:hover,\n    > .active > a:focus {\n      border-bottom-color: @nav-tabs-justified-active-link-border-color;\n    }\n  }\n}\n\n\n// Tabbable tabs\n// -------------------------\n\n// Hide tabbable panes to start, show them when `.active`\n.tab-content {\n  > .tab-pane {\n    display: none;\n  }\n  > .active {\n    display: block;\n  }\n}\n\n\n// Dropdowns\n// -------------------------\n\n// Specific dropdowns\n.nav-tabs .dropdown-menu {\n  // make dropdown border overlap tab border\n  margin-top: -1px;\n  // Remove the top rounded corners here since there is a hard edge above the menu\n  .border-top-radius(0);\n}\n","//\n// Navbars\n// --------------------------------------------------\n\n\n// Wrapper and base class\n//\n// Provide a static navbar from which we expand to create full-width, fixed, and\n// other navbar variations.\n\n.navbar {\n  position: relative;\n  min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)\n  margin-bottom: @navbar-margin-bottom;\n  border: 1px solid transparent;\n\n  // Prevent floats from breaking the navbar\n  &:extend(.clearfix all);\n\n  @media (min-width: @grid-float-breakpoint) {\n    border-radius: @navbar-border-radius;\n  }\n}\n\n\n// Navbar heading\n//\n// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy\n// styling of responsive aspects.\n\n.navbar-header {\n  &:extend(.clearfix all);\n\n  @media (min-width: @grid-float-breakpoint) {\n    float: left;\n  }\n}\n\n\n// Navbar collapse (body)\n//\n// Group your navbar content into this for easy collapsing and expanding across\n// various device sizes. By default, this content is collapsed when <768px, but\n// will expand past that for a horizontal display.\n//\n// To start (on mobile devices) the navbar links, forms, and buttons are stacked\n// vertically and include a `max-height` to overflow in case you have too much\n// content for the user's viewport.\n\n.navbar-collapse {\n  overflow-x: visible;\n  padding-right: @navbar-padding-horizontal;\n  padding-left:  @navbar-padding-horizontal;\n  border-top: 1px solid transparent;\n  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);\n  &:extend(.clearfix all);\n  -webkit-overflow-scrolling: touch;\n\n  &.in {\n    overflow-y: auto;\n  }\n\n  @media (min-width: @grid-float-breakpoint) {\n    width: auto;\n    border-top: 0;\n    box-shadow: none;\n\n    &.collapse {\n      display: block !important;\n      height: auto !important;\n      padding-bottom: 0; // Override default setting\n      overflow: visible !important;\n    }\n\n    &.in {\n      overflow-y: visible;\n    }\n\n    // Undo the collapse side padding for navbars with containers to ensure\n    // alignment of right-aligned contents.\n    .navbar-fixed-top &,\n    .navbar-static-top &,\n    .navbar-fixed-bottom & {\n      padding-left: 0;\n      padding-right: 0;\n    }\n  }\n}\n\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  .navbar-collapse {\n    max-height: @navbar-collapse-max-height;\n\n    @media (max-device-width: @screen-xs-min) and (orientation: landscape) {\n      max-height: 200px;\n    }\n  }\n}\n\n\n// Both navbar header and collapse\n//\n// When a container is present, change the behavior of the header and collapse.\n\n.container,\n.container-fluid {\n  > .navbar-header,\n  > .navbar-collapse {\n    margin-right: -@navbar-padding-horizontal;\n    margin-left:  -@navbar-padding-horizontal;\n\n    @media (min-width: @grid-float-breakpoint) {\n      margin-right: 0;\n      margin-left:  0;\n    }\n  }\n}\n\n\n//\n// Navbar alignment options\n//\n// Display the navbar across the entirety of the page or fixed it to the top or\n// bottom of the page.\n\n// Static top (unfixed, but 100% wide) navbar\n.navbar-static-top {\n  z-index: @zindex-navbar;\n  border-width: 0 0 1px;\n\n  @media (min-width: @grid-float-breakpoint) {\n    border-radius: 0;\n  }\n}\n\n// Fix the top/bottom navbars when screen real estate supports it\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  position: fixed;\n  right: 0;\n  left: 0;\n  z-index: @zindex-navbar-fixed;\n\n  // Undo the rounded corners\n  @media (min-width: @grid-float-breakpoint) {\n    border-radius: 0;\n  }\n}\n.navbar-fixed-top {\n  top: 0;\n  border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n  bottom: 0;\n  margin-bottom: 0; // override .navbar defaults\n  border-width: 1px 0 0;\n}\n\n\n// Brand/project name\n\n.navbar-brand {\n  float: left;\n  padding: @navbar-padding-vertical @navbar-padding-horizontal;\n  font-size: @font-size-large;\n  line-height: @line-height-computed;\n  height: @navbar-height;\n\n  &:hover,\n  &:focus {\n    text-decoration: none;\n  }\n\n  > img {\n    display: block;\n  }\n\n  @media (min-width: @grid-float-breakpoint) {\n    .navbar > .container &,\n    .navbar > .container-fluid & {\n      margin-left: -@navbar-padding-horizontal;\n    }\n  }\n}\n\n\n// Navbar toggle\n//\n// Custom button for toggling the `.navbar-collapse`, powered by the collapse\n// JavaScript plugin.\n\n.navbar-toggle {\n  position: relative;\n  float: right;\n  margin-right: @navbar-padding-horizontal;\n  padding: 9px 10px;\n  .navbar-vertical-align(34px);\n  background-color: transparent;\n  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n  border: 1px solid transparent;\n  border-radius: @border-radius-base;\n\n  // We remove the `outline` here, but later compensate by attaching `:hover`\n  // styles to `:focus`.\n  &:focus {\n    outline: 0;\n  }\n\n  // Bars\n  .icon-bar {\n    display: block;\n    width: 22px;\n    height: 2px;\n    border-radius: 1px;\n  }\n  .icon-bar + .icon-bar {\n    margin-top: 4px;\n  }\n\n  @media (min-width: @grid-float-breakpoint) {\n    display: none;\n  }\n}\n\n\n// Navbar nav links\n//\n// Builds on top of the `.nav` components with its own modifier class to make\n// the nav the full height of the horizontal nav (above 768px).\n\n.navbar-nav {\n  margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;\n\n  > li > a {\n    padding-top:    10px;\n    padding-bottom: 10px;\n    line-height: @line-height-computed;\n  }\n\n  @media (max-width: @grid-float-breakpoint-max) {\n    // Dropdowns get custom display when collapsed\n    .open .dropdown-menu {\n      position: static;\n      float: none;\n      width: auto;\n      margin-top: 0;\n      background-color: transparent;\n      border: 0;\n      box-shadow: none;\n      > li > a,\n      .dropdown-header {\n        padding: 5px 15px 5px 25px;\n      }\n      > li > a {\n        line-height: @line-height-computed;\n        &:hover,\n        &:focus {\n          background-image: none;\n        }\n      }\n    }\n  }\n\n  // Uncollapse the nav\n  @media (min-width: @grid-float-breakpoint) {\n    float: left;\n    margin: 0;\n\n    > li {\n      float: left;\n      > a {\n        padding-top:    @navbar-padding-vertical;\n        padding-bottom: @navbar-padding-vertical;\n      }\n    }\n  }\n}\n\n\n// Navbar form\n//\n// Extension of the `.form-inline` with some extra flavor for optimum display in\n// our navbars.\n\n.navbar-form {\n  margin-left: -@navbar-padding-horizontal;\n  margin-right: -@navbar-padding-horizontal;\n  padding: 10px @navbar-padding-horizontal;\n  border-top: 1px solid transparent;\n  border-bottom: 1px solid transparent;\n  @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);\n  .box-shadow(@shadow);\n\n  // Mixin behavior for optimum display\n  .form-inline();\n\n  .form-group {\n    @media (max-width: @grid-float-breakpoint-max) {\n      margin-bottom: 5px;\n\n      &:last-child {\n        margin-bottom: 0;\n      }\n    }\n  }\n\n  // Vertically center in expanded, horizontal navbar\n  .navbar-vertical-align(@input-height-base);\n\n  // Undo 100% width for pull classes\n  @media (min-width: @grid-float-breakpoint) {\n    width: auto;\n    border: 0;\n    margin-left: 0;\n    margin-right: 0;\n    padding-top: 0;\n    padding-bottom: 0;\n    .box-shadow(none);\n  }\n}\n\n\n// Dropdown menus\n\n// Menu position and menu carets\n.navbar-nav > li > .dropdown-menu {\n  margin-top: 0;\n  .border-top-radius(0);\n}\n// Menu position and menu caret support for dropups via extra dropup class\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n  margin-bottom: 0;\n  .border-top-radius(@navbar-border-radius);\n  .border-bottom-radius(0);\n}\n\n\n// Buttons in navbars\n//\n// Vertically center a button within a navbar (when *not* in a form).\n\n.navbar-btn {\n  .navbar-vertical-align(@input-height-base);\n\n  &.btn-sm {\n    .navbar-vertical-align(@input-height-small);\n  }\n  &.btn-xs {\n    .navbar-vertical-align(22);\n  }\n}\n\n\n// Text in navbars\n//\n// Add a class to make any element properly align itself vertically within the navbars.\n\n.navbar-text {\n  .navbar-vertical-align(@line-height-computed);\n\n  @media (min-width: @grid-float-breakpoint) {\n    float: left;\n    margin-left: @navbar-padding-horizontal;\n    margin-right: @navbar-padding-horizontal;\n  }\n}\n\n\n// Component alignment\n//\n// Repurpose the pull utilities as their own navbar utilities to avoid specificity\n// issues with parents and chaining. Only do this when the navbar is uncollapsed\n// though so that navbar contents properly stack and align in mobile.\n//\n// Declared after the navbar components to ensure more specificity on the margins.\n\n@media (min-width: @grid-float-breakpoint) {\n  .navbar-left  { .pull-left(); }\n  .navbar-right {\n    .pull-right();\n    margin-right: -@navbar-padding-horizontal;\n\n    ~ .navbar-right {\n      margin-right: 0;\n    }\n  }\n}\n\n\n// Alternate navbars\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n  background-color: @navbar-default-bg;\n  border-color: @navbar-default-border;\n\n  .navbar-brand {\n    color: @navbar-default-brand-color;\n    &:hover,\n    &:focus {\n      color: @navbar-default-brand-hover-color;\n      background-color: @navbar-default-brand-hover-bg;\n    }\n  }\n\n  .navbar-text {\n    color: @navbar-default-color;\n  }\n\n  .navbar-nav {\n    > li > a {\n      color: @navbar-default-link-color;\n\n      &:hover,\n      &:focus {\n        color: @navbar-default-link-hover-color;\n        background-color: @navbar-default-link-hover-bg;\n      }\n    }\n    > .active > a {\n      &,\n      &:hover,\n      &:focus {\n        color: @navbar-default-link-active-color;\n        background-color: @navbar-default-link-active-bg;\n      }\n    }\n    > .disabled > a {\n      &,\n      &:hover,\n      &:focus {\n        color: @navbar-default-link-disabled-color;\n        background-color: @navbar-default-link-disabled-bg;\n      }\n    }\n  }\n\n  .navbar-toggle {\n    border-color: @navbar-default-toggle-border-color;\n    &:hover,\n    &:focus {\n      background-color: @navbar-default-toggle-hover-bg;\n    }\n    .icon-bar {\n      background-color: @navbar-default-toggle-icon-bar-bg;\n    }\n  }\n\n  .navbar-collapse,\n  .navbar-form {\n    border-color: @navbar-default-border;\n  }\n\n  // Dropdown menu items\n  .navbar-nav {\n    // Remove background color from open dropdown\n    > .open > a {\n      &,\n      &:hover,\n      &:focus {\n        background-color: @navbar-default-link-active-bg;\n        color: @navbar-default-link-active-color;\n      }\n    }\n\n    @media (max-width: @grid-float-breakpoint-max) {\n      // Dropdowns get custom display when collapsed\n      .open .dropdown-menu {\n        > li > a {\n          color: @navbar-default-link-color;\n          &:hover,\n          &:focus {\n            color: @navbar-default-link-hover-color;\n            background-color: @navbar-default-link-hover-bg;\n          }\n        }\n        > .active > a {\n          &,\n          &:hover,\n          &:focus {\n            color: @navbar-default-link-active-color;\n            background-color: @navbar-default-link-active-bg;\n          }\n        }\n        > .disabled > a {\n          &,\n          &:hover,\n          &:focus {\n            color: @navbar-default-link-disabled-color;\n            background-color: @navbar-default-link-disabled-bg;\n          }\n        }\n      }\n    }\n  }\n\n\n  // Links in navbars\n  //\n  // Add a class to ensure links outside the navbar nav are colored correctly.\n\n  .navbar-link {\n    color: @navbar-default-link-color;\n    &:hover {\n      color: @navbar-default-link-hover-color;\n    }\n  }\n\n  .btn-link {\n    color: @navbar-default-link-color;\n    &:hover,\n    &:focus {\n      color: @navbar-default-link-hover-color;\n    }\n    &[disabled],\n    fieldset[disabled] & {\n      &:hover,\n      &:focus {\n        color: @navbar-default-link-disabled-color;\n      }\n    }\n  }\n}\n\n// Inverse navbar\n\n.navbar-inverse {\n  background-color: @navbar-inverse-bg;\n  border-color: @navbar-inverse-border;\n\n  .navbar-brand {\n    color: @navbar-inverse-brand-color;\n    &:hover,\n    &:focus {\n      color: @navbar-inverse-brand-hover-color;\n      background-color: @navbar-inverse-brand-hover-bg;\n    }\n  }\n\n  .navbar-text {\n    color: @navbar-inverse-color;\n  }\n\n  .navbar-nav {\n    > li > a {\n      color: @navbar-inverse-link-color;\n\n      &:hover,\n      &:focus {\n        color: @navbar-inverse-link-hover-color;\n        background-color: @navbar-inverse-link-hover-bg;\n      }\n    }\n    > .active > a {\n      &,\n      &:hover,\n      &:focus {\n        color: @navbar-inverse-link-active-color;\n        background-color: @navbar-inverse-link-active-bg;\n      }\n    }\n    > .disabled > a {\n      &,\n      &:hover,\n      &:focus {\n        color: @navbar-inverse-link-disabled-color;\n        background-color: @navbar-inverse-link-disabled-bg;\n      }\n    }\n  }\n\n  // Darken the responsive nav toggle\n  .navbar-toggle {\n    border-color: @navbar-inverse-toggle-border-color;\n    &:hover,\n    &:focus {\n      background-color: @navbar-inverse-toggle-hover-bg;\n    }\n    .icon-bar {\n      background-color: @navbar-inverse-toggle-icon-bar-bg;\n    }\n  }\n\n  .navbar-collapse,\n  .navbar-form {\n    border-color: darken(@navbar-inverse-bg, 7%);\n  }\n\n  // Dropdowns\n  .navbar-nav {\n    > .open > a {\n      &,\n      &:hover,\n      &:focus {\n        background-color: @navbar-inverse-link-active-bg;\n        color: @navbar-inverse-link-active-color;\n      }\n    }\n\n    @media (max-width: @grid-float-breakpoint-max) {\n      // Dropdowns get custom display\n      .open .dropdown-menu {\n        > .dropdown-header {\n          border-color: @navbar-inverse-border;\n        }\n        .divider {\n          background-color: @navbar-inverse-border;\n        }\n        > li > a {\n          color: @navbar-inverse-link-color;\n          &:hover,\n          &:focus {\n            color: @navbar-inverse-link-hover-color;\n            background-color: @navbar-inverse-link-hover-bg;\n          }\n        }\n        > .active > a {\n          &,\n          &:hover,\n          &:focus {\n            color: @navbar-inverse-link-active-color;\n            background-color: @navbar-inverse-link-active-bg;\n          }\n        }\n        > .disabled > a {\n          &,\n          &:hover,\n          &:focus {\n            color: @navbar-inverse-link-disabled-color;\n            background-color: @navbar-inverse-link-disabled-bg;\n          }\n        }\n      }\n    }\n  }\n\n  .navbar-link {\n    color: @navbar-inverse-link-color;\n    &:hover {\n      color: @navbar-inverse-link-hover-color;\n    }\n  }\n\n  .btn-link {\n    color: @navbar-inverse-link-color;\n    &:hover,\n    &:focus {\n      color: @navbar-inverse-link-hover-color;\n    }\n    &[disabled],\n    fieldset[disabled] & {\n      &:hover,\n      &:focus {\n        color: @navbar-inverse-link-disabled-color;\n      }\n    }\n  }\n}\n","// Navbar vertical align\n//\n// Vertically center elements in the navbar.\n// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.\n\n.navbar-vertical-align(@element-height) {\n  margin-top: ((@navbar-height - @element-height) / 2);\n  margin-bottom: ((@navbar-height - @element-height) / 2);\n}\n","//\n// Utility classes\n// --------------------------------------------------\n\n\n// Floats\n// -------------------------\n\n.clearfix {\n  .clearfix();\n}\n.center-block {\n  .center-block();\n}\n.pull-right {\n  float: right !important;\n}\n.pull-left {\n  float: left !important;\n}\n\n\n// Toggling content\n// -------------------------\n\n// Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1\n.hide {\n  display: none !important;\n}\n.show {\n  display: block !important;\n}\n.invisible {\n  visibility: hidden;\n}\n.text-hide {\n  .text-hide();\n}\n\n\n// Hide from screenreaders and browsers\n//\n// Credit: HTML5 Boilerplate\n\n.hidden {\n  display: none !important;\n}\n\n\n// For Affix plugin\n// -------------------------\n\n.affix {\n  position: fixed;\n}\n","//\n// Breadcrumbs\n// --------------------------------------------------\n\n\n.breadcrumb {\n  padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;\n  margin-bottom: @line-height-computed;\n  list-style: none;\n  background-color: @breadcrumb-bg;\n  border-radius: @border-radius-base;\n\n  > li {\n    display: inline-block;\n\n    + li:before {\n      content: \"@{breadcrumb-separator}\\00a0\"; // Unicode space added since inline-block means non-collapsing white-space\n      padding: 0 5px;\n      color: @breadcrumb-color;\n    }\n  }\n\n  > .active {\n    color: @breadcrumb-active-color;\n  }\n}\n","//\n// Pagination (multiple pages)\n// --------------------------------------------------\n.pagination {\n  display: inline-block;\n  padding-left: 0;\n  margin: @line-height-computed 0;\n  border-radius: @border-radius-base;\n\n  > li {\n    display: inline; // Remove list-style and block-level defaults\n    > a,\n    > span {\n      position: relative;\n      float: left; // Collapse white-space\n      padding: @padding-base-vertical @padding-base-horizontal;\n      line-height: @line-height-base;\n      text-decoration: none;\n      color: @pagination-color;\n      background-color: @pagination-bg;\n      border: 1px solid @pagination-border;\n      margin-left: -1px;\n    }\n    &:first-child {\n      > a,\n      > span {\n        margin-left: 0;\n        .border-left-radius(@border-radius-base);\n      }\n    }\n    &:last-child {\n      > a,\n      > span {\n        .border-right-radius(@border-radius-base);\n      }\n    }\n  }\n\n  > li > a,\n  > li > span {\n    &:hover,\n    &:focus {\n      z-index: 2;\n      color: @pagination-hover-color;\n      background-color: @pagination-hover-bg;\n      border-color: @pagination-hover-border;\n    }\n  }\n\n  > .active > a,\n  > .active > span {\n    &,\n    &:hover,\n    &:focus {\n      z-index: 3;\n      color: @pagination-active-color;\n      background-color: @pagination-active-bg;\n      border-color: @pagination-active-border;\n      cursor: default;\n    }\n  }\n\n  > .disabled {\n    > span,\n    > span:hover,\n    > span:focus,\n    > a,\n    > a:hover,\n    > a:focus {\n      color: @pagination-disabled-color;\n      background-color: @pagination-disabled-bg;\n      border-color: @pagination-disabled-border;\n      cursor: @cursor-disabled;\n    }\n  }\n}\n\n// Sizing\n// --------------------------------------------------\n\n// Large\n.pagination-lg {\n  .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);\n}\n\n// Small\n.pagination-sm {\n  .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);\n}\n","// Pagination\n\n.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n  > li {\n    > a,\n    > span {\n      padding: @padding-vertical @padding-horizontal;\n      font-size: @font-size;\n      line-height: @line-height;\n    }\n    &:first-child {\n      > a,\n      > span {\n        .border-left-radius(@border-radius);\n      }\n    }\n    &:last-child {\n      > a,\n      > span {\n        .border-right-radius(@border-radius);\n      }\n    }\n  }\n}\n","//\n// Pager pagination\n// --------------------------------------------------\n\n\n.pager {\n  padding-left: 0;\n  margin: @line-height-computed 0;\n  list-style: none;\n  text-align: center;\n  &:extend(.clearfix all);\n  li {\n    display: inline;\n    > a,\n    > span {\n      display: inline-block;\n      padding: 5px 14px;\n      background-color: @pager-bg;\n      border: 1px solid @pager-border;\n      border-radius: @pager-border-radius;\n    }\n\n    > a:hover,\n    > a:focus {\n      text-decoration: none;\n      background-color: @pager-hover-bg;\n    }\n  }\n\n  .next {\n    > a,\n    > span {\n      float: right;\n    }\n  }\n\n  .previous {\n    > a,\n    > span {\n      float: left;\n    }\n  }\n\n  .disabled {\n    > a,\n    > a:hover,\n    > a:focus,\n    > span {\n      color: @pager-disabled-color;\n      background-color: @pager-bg;\n      cursor: @cursor-disabled;\n    }\n  }\n}\n","//\n// Labels\n// --------------------------------------------------\n\n.label {\n  display: inline;\n  padding: .2em .6em .3em;\n  font-size: 75%;\n  font-weight: bold;\n  line-height: 1;\n  color: @label-color;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: baseline;\n  border-radius: .25em;\n\n  // Add hover effects, but only for links\n  a& {\n    &:hover,\n    &:focus {\n      color: @label-link-hover-color;\n      text-decoration: none;\n      cursor: pointer;\n    }\n  }\n\n  // Empty labels collapse automatically (not available in IE8)\n  &:empty {\n    display: none;\n  }\n\n  // Quick fix for labels in buttons\n  .btn & {\n    position: relative;\n    top: -1px;\n  }\n}\n\n// Colors\n// Contextual variations (linked labels get darker on :hover)\n\n.label-default {\n  .label-variant(@label-default-bg);\n}\n\n.label-primary {\n  .label-variant(@label-primary-bg);\n}\n\n.label-success {\n  .label-variant(@label-success-bg);\n}\n\n.label-info {\n  .label-variant(@label-info-bg);\n}\n\n.label-warning {\n  .label-variant(@label-warning-bg);\n}\n\n.label-danger {\n  .label-variant(@label-danger-bg);\n}\n","// Labels\n\n.label-variant(@color) {\n  background-color: @color;\n\n  &[href] {\n    &:hover,\n    &:focus {\n      background-color: darken(@color, 10%);\n    }\n  }\n}\n","//\n// Badges\n// --------------------------------------------------\n\n\n// Base class\n.badge {\n  display: inline-block;\n  min-width: 10px;\n  padding: 3px 7px;\n  font-size: @font-size-small;\n  font-weight: @badge-font-weight;\n  color: @badge-color;\n  line-height: @badge-line-height;\n  vertical-align: middle;\n  white-space: nowrap;\n  text-align: center;\n  background-color: @badge-bg;\n  border-radius: @badge-border-radius;\n\n  // Empty badges collapse automatically (not available in IE8)\n  &:empty {\n    display: none;\n  }\n\n  // Quick fix for badges in buttons\n  .btn & {\n    position: relative;\n    top: -1px;\n  }\n\n  .btn-xs &,\n  .btn-group-xs > .btn & {\n    top: 0;\n    padding: 1px 5px;\n  }\n\n  // Hover state, but only for links\n  a& {\n    &:hover,\n    &:focus {\n      color: @badge-link-hover-color;\n      text-decoration: none;\n      cursor: pointer;\n    }\n  }\n\n  // Account for badges in navs\n  .list-group-item.active > &,\n  .nav-pills > .active > a > & {\n    color: @badge-active-color;\n    background-color: @badge-active-bg;\n  }\n\n  .list-group-item > & {\n    float: right;\n  }\n\n  .list-group-item > & + & {\n    margin-right: 5px;\n  }\n\n  .nav-pills > li > a > & {\n    margin-left: 3px;\n  }\n}\n","//\n// Jumbotron\n// --------------------------------------------------\n\n\n.jumbotron {\n  padding-top:    @jumbotron-padding;\n  padding-bottom: @jumbotron-padding;\n  margin-bottom: @jumbotron-padding;\n  color: @jumbotron-color;\n  background-color: @jumbotron-bg;\n\n  h1,\n  .h1 {\n    color: @jumbotron-heading-color;\n  }\n\n  p {\n    margin-bottom: (@jumbotron-padding / 2);\n    font-size: @jumbotron-font-size;\n    font-weight: 200;\n  }\n\n  > hr {\n    border-top-color: darken(@jumbotron-bg, 10%);\n  }\n\n  .container &,\n  .container-fluid & {\n    border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container\n    padding-left:  (@grid-gutter-width / 2);\n    padding-right: (@grid-gutter-width / 2);\n  }\n\n  .container {\n    max-width: 100%;\n  }\n\n  @media screen and (min-width: @screen-sm-min) {\n    padding-top:    (@jumbotron-padding * 1.6);\n    padding-bottom: (@jumbotron-padding * 1.6);\n\n    .container &,\n    .container-fluid & {\n      padding-left:  (@jumbotron-padding * 2);\n      padding-right: (@jumbotron-padding * 2);\n    }\n\n    h1,\n    .h1 {\n      font-size: @jumbotron-heading-font-size;\n    }\n  }\n}\n","//\n// Thumbnails\n// --------------------------------------------------\n\n\n// Mixin and adjust the regular image class\n.thumbnail {\n  display: block;\n  padding: @thumbnail-padding;\n  margin-bottom: @line-height-computed;\n  line-height: @line-height-base;\n  background-color: @thumbnail-bg;\n  border: 1px solid @thumbnail-border;\n  border-radius: @thumbnail-border-radius;\n  .transition(border .2s ease-in-out);\n\n  > img,\n  a > img {\n    &:extend(.img-responsive);\n    margin-left: auto;\n    margin-right: auto;\n  }\n\n  // Add a hover state for linked versions only\n  a&:hover,\n  a&:focus,\n  a&.active {\n    border-color: @link-color;\n  }\n\n  // Image captions\n  .caption {\n    padding: @thumbnail-caption-padding;\n    color: @thumbnail-caption-color;\n  }\n}\n","//\n// Alerts\n// --------------------------------------------------\n\n\n// Base styles\n// -------------------------\n\n.alert {\n  padding: @alert-padding;\n  margin-bottom: @line-height-computed;\n  border: 1px solid transparent;\n  border-radius: @alert-border-radius;\n\n  // Headings for larger alerts\n  h4 {\n    margin-top: 0;\n    // Specified for the h4 to prevent conflicts of changing @headings-color\n    color: inherit;\n  }\n\n  // Provide class for links that match alerts\n  .alert-link {\n    font-weight: @alert-link-font-weight;\n  }\n\n  // Improve alignment and spacing of inner content\n  > p,\n  > ul {\n    margin-bottom: 0;\n  }\n\n  > p + p {\n    margin-top: 5px;\n  }\n}\n\n// Dismissible alerts\n//\n// Expand the right padding and account for the close button's positioning.\n\n.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.\n.alert-dismissible {\n  padding-right: (@alert-padding + 20);\n\n  // Adjust close link position\n  .close {\n    position: relative;\n    top: -2px;\n    right: -21px;\n    color: inherit;\n  }\n}\n\n// Alternate styles\n//\n// Generate contextual modifier classes for colorizing the alert.\n\n.alert-success {\n  .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);\n}\n\n.alert-info {\n  .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);\n}\n\n.alert-warning {\n  .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);\n}\n\n.alert-danger {\n  .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);\n}\n","// Alerts\n\n.alert-variant(@background; @border; @text-color) {\n  background-color: @background;\n  border-color: @border;\n  color: @text-color;\n\n  hr {\n    border-top-color: darken(@border, 5%);\n  }\n  .alert-link {\n    color: darken(@text-color, 10%);\n  }\n}\n","//\n// Progress bars\n// --------------------------------------------------\n\n\n// Bar animations\n// -------------------------\n\n// WebKit\n@-webkit-keyframes progress-bar-stripes {\n  from  { background-position: 40px 0; }\n  to    { background-position: 0 0; }\n}\n\n// Spec and IE10+\n@keyframes progress-bar-stripes {\n  from  { background-position: 40px 0; }\n  to    { background-position: 0 0; }\n}\n\n\n// Bar itself\n// -------------------------\n\n// Outer container\n.progress {\n  overflow: hidden;\n  height: @line-height-computed;\n  margin-bottom: @line-height-computed;\n  background-color: @progress-bg;\n  border-radius: @progress-border-radius;\n  .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));\n}\n\n// Bar of progress\n.progress-bar {\n  float: left;\n  width: 0%;\n  height: 100%;\n  font-size: @font-size-small;\n  line-height: @line-height-computed;\n  color: @progress-bar-color;\n  text-align: center;\n  background-color: @progress-bar-bg;\n  .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));\n  .transition(width .6s ease);\n}\n\n// Striped bars\n//\n// `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar-striped` class, which you just add to an existing\n// `.progress-bar`.\n.progress-striped .progress-bar,\n.progress-bar-striped {\n  #gradient > .striped();\n  background-size: 40px 40px;\n}\n\n// Call animation for the active one\n//\n// `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar.active` approach.\n.progress.active .progress-bar,\n.progress-bar.active {\n  .animation(progress-bar-stripes 2s linear infinite);\n}\n\n\n// Variations\n// -------------------------\n\n.progress-bar-success {\n  .progress-bar-variant(@progress-bar-success-bg);\n}\n\n.progress-bar-info {\n  .progress-bar-variant(@progress-bar-info-bg);\n}\n\n.progress-bar-warning {\n  .progress-bar-variant(@progress-bar-warning-bg);\n}\n\n.progress-bar-danger {\n  .progress-bar-variant(@progress-bar-danger-bg);\n}\n","// Gradients\n\n#gradient {\n\n  // Horizontal gradient, from left to right\n  //\n  // Creates two color stops, start and end, by specifying a color and position for each color stop.\n  // Color stops are not available in IE9 and below.\n  .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n    background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n    background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n    background-repeat: repeat-x;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n  }\n\n  // Vertical gradient, from top to bottom\n  //\n  // Creates two color stops, start and end, by specifying a color and position for each color stop.\n  // Color stops are not available in IE9 and below.\n  .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n    background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Opera 12\n    background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n    background-repeat: repeat-x;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n  }\n\n  .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n    background-repeat: repeat-x;\n    background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n    background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n  }\n  .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n    background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n    background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n    background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n    background-repeat: no-repeat;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n  }\n  .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n    background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-repeat: no-repeat;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n  }\n  .radial(@inner-color: #555; @outer-color: #333) {\n    background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n    background-image: radial-gradient(circle, @inner-color, @outer-color);\n    background-repeat: no-repeat;\n  }\n  .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n    background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n    background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n    background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n  }\n}\n","// Progress bars\n\n.progress-bar-variant(@color) {\n  background-color: @color;\n\n  // Deprecated parent class requirement as of v3.2.0\n  .progress-striped & {\n    #gradient > .striped();\n  }\n}\n",".media {\n  // Proper spacing between instances of .media\n  margin-top: 15px;\n\n  &:first-child {\n    margin-top: 0;\n  }\n}\n\n.media,\n.media-body {\n  zoom: 1;\n  overflow: hidden;\n}\n\n.media-body {\n  width: 10000px;\n}\n\n.media-object {\n  display: block;\n\n  // Fix collapse in webkit from max-width: 100% and display: table-cell.\n  &.img-thumbnail {\n    max-width: none;\n  }\n}\n\n.media-right,\n.media > .pull-right {\n  padding-left: 10px;\n}\n\n.media-left,\n.media > .pull-left {\n  padding-right: 10px;\n}\n\n.media-left,\n.media-right,\n.media-body {\n  display: table-cell;\n  vertical-align: top;\n}\n\n.media-middle {\n  vertical-align: middle;\n}\n\n.media-bottom {\n  vertical-align: bottom;\n}\n\n// Reset margins on headings for tighter default spacing\n.media-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n\n// Media list variation\n//\n// Undo default ul/ol styles\n.media-list {\n  padding-left: 0;\n  list-style: none;\n}\n","//\n// List groups\n// --------------------------------------------------\n\n\n// Base class\n//\n// Easily usable on <ul>, <ol>, or <div>.\n\n.list-group {\n  // No need to set list-style: none; since .list-group-item is block level\n  margin-bottom: 20px;\n  padding-left: 0; // reset padding because ul and ol\n}\n\n\n// Individual list items\n//\n// Use on `li`s or `div`s within the `.list-group` parent.\n\n.list-group-item {\n  position: relative;\n  display: block;\n  padding: 10px 15px;\n  // Place the border on the list items and negative margin up for better styling\n  margin-bottom: -1px;\n  background-color: @list-group-bg;\n  border: 1px solid @list-group-border;\n\n  // Round the first and last items\n  &:first-child {\n    .border-top-radius(@list-group-border-radius);\n  }\n  &:last-child {\n    margin-bottom: 0;\n    .border-bottom-radius(@list-group-border-radius);\n  }\n}\n\n\n// Interactive list items\n//\n// Use anchor or button elements instead of `li`s or `div`s to create interactive items.\n// Includes an extra `.active` modifier class for showing selected items.\n\na.list-group-item,\nbutton.list-group-item {\n  color: @list-group-link-color;\n\n  .list-group-item-heading {\n    color: @list-group-link-heading-color;\n  }\n\n  // Hover state\n  &:hover,\n  &:focus {\n    text-decoration: none;\n    color: @list-group-link-hover-color;\n    background-color: @list-group-hover-bg;\n  }\n}\n\nbutton.list-group-item {\n  width: 100%;\n  text-align: left;\n}\n\n.list-group-item {\n  // Disabled state\n  &.disabled,\n  &.disabled:hover,\n  &.disabled:focus {\n    background-color: @list-group-disabled-bg;\n    color: @list-group-disabled-color;\n    cursor: @cursor-disabled;\n\n    // Force color to inherit for custom content\n    .list-group-item-heading {\n      color: inherit;\n    }\n    .list-group-item-text {\n      color: @list-group-disabled-text-color;\n    }\n  }\n\n  // Active class on item itself, not parent\n  &.active,\n  &.active:hover,\n  &.active:focus {\n    z-index: 2; // Place active items above their siblings for proper border styling\n    color: @list-group-active-color;\n    background-color: @list-group-active-bg;\n    border-color: @list-group-active-border;\n\n    // Force color to inherit for custom content\n    .list-group-item-heading,\n    .list-group-item-heading > small,\n    .list-group-item-heading > .small {\n      color: inherit;\n    }\n    .list-group-item-text {\n      color: @list-group-active-text-color;\n    }\n  }\n}\n\n\n// Contextual variants\n//\n// Add modifier classes to change text and background color on individual items.\n// Organizationally, this must come after the `:hover` states.\n\n.list-group-item-variant(success; @state-success-bg; @state-success-text);\n.list-group-item-variant(info; @state-info-bg; @state-info-text);\n.list-group-item-variant(warning; @state-warning-bg; @state-warning-text);\n.list-group-item-variant(danger; @state-danger-bg; @state-danger-text);\n\n\n// Custom content options\n//\n// Extra classes for creating well-formatted content within `.list-group-item`s.\n\n.list-group-item-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n.list-group-item-text {\n  margin-bottom: 0;\n  line-height: 1.3;\n}\n","// List Groups\n\n.list-group-item-variant(@state; @background; @color) {\n  .list-group-item-@{state} {\n    color: @color;\n    background-color: @background;\n\n    a&,\n    button& {\n      color: @color;\n\n      .list-group-item-heading {\n        color: inherit;\n      }\n\n      &:hover,\n      &:focus {\n        color: @color;\n        background-color: darken(@background, 5%);\n      }\n      &.active,\n      &.active:hover,\n      &.active:focus {\n        color: #fff;\n        background-color: @color;\n        border-color: @color;\n      }\n    }\n  }\n}\n","//\n// Panels\n// --------------------------------------------------\n\n\n// Base class\n.panel {\n  margin-bottom: @line-height-computed;\n  background-color: @panel-bg;\n  border: 1px solid transparent;\n  border-radius: @panel-border-radius;\n  .box-shadow(0 1px 1px rgba(0,0,0,.05));\n}\n\n// Panel contents\n.panel-body {\n  padding: @panel-body-padding;\n  &:extend(.clearfix all);\n}\n\n// Optional heading\n.panel-heading {\n  padding: @panel-heading-padding;\n  border-bottom: 1px solid transparent;\n  .border-top-radius((@panel-border-radius - 1));\n\n  > .dropdown .dropdown-toggle {\n    color: inherit;\n  }\n}\n\n// Within heading, strip any `h*` tag of its default margins for spacing.\n.panel-title {\n  margin-top: 0;\n  margin-bottom: 0;\n  font-size: ceil((@font-size-base * 1.125));\n  color: inherit;\n\n  > a,\n  > small,\n  > .small,\n  > small > a,\n  > .small > a {\n    color: inherit;\n  }\n}\n\n// Optional footer (stays gray in every modifier class)\n.panel-footer {\n  padding: @panel-footer-padding;\n  background-color: @panel-footer-bg;\n  border-top: 1px solid @panel-inner-border;\n  .border-bottom-radius((@panel-border-radius - 1));\n}\n\n\n// List groups in panels\n//\n// By default, space out list group content from panel headings to account for\n// any kind of custom content between the two.\n\n.panel {\n  > .list-group,\n  > .panel-collapse > .list-group {\n    margin-bottom: 0;\n\n    .list-group-item {\n      border-width: 1px 0;\n      border-radius: 0;\n    }\n\n    // Add border top radius for first one\n    &:first-child {\n      .list-group-item:first-child {\n        border-top: 0;\n        .border-top-radius((@panel-border-radius - 1));\n      }\n    }\n\n    // Add border bottom radius for last one\n    &:last-child {\n      .list-group-item:last-child {\n        border-bottom: 0;\n        .border-bottom-radius((@panel-border-radius - 1));\n      }\n    }\n  }\n  > .panel-heading + .panel-collapse > .list-group {\n    .list-group-item:first-child {\n      .border-top-radius(0);\n    }\n  }\n}\n// Collapse space between when there's no additional content.\n.panel-heading + .list-group {\n  .list-group-item:first-child {\n    border-top-width: 0;\n  }\n}\n.list-group + .panel-footer {\n  border-top-width: 0;\n}\n\n// Tables in panels\n//\n// Place a non-bordered `.table` within a panel (not within a `.panel-body`) and\n// watch it go full width.\n\n.panel {\n  > .table,\n  > .table-responsive > .table,\n  > .panel-collapse > .table {\n    margin-bottom: 0;\n\n    caption {\n      padding-left: @panel-body-padding;\n      padding-right: @panel-body-padding;\n    }\n  }\n  // Add border top radius for first one\n  > .table:first-child,\n  > .table-responsive:first-child > .table:first-child {\n    .border-top-radius((@panel-border-radius - 1));\n\n    > thead:first-child,\n    > tbody:first-child {\n      > tr:first-child {\n        border-top-left-radius: (@panel-border-radius - 1);\n        border-top-right-radius: (@panel-border-radius - 1);\n\n        td:first-child,\n        th:first-child {\n          border-top-left-radius: (@panel-border-radius - 1);\n        }\n        td:last-child,\n        th:last-child {\n          border-top-right-radius: (@panel-border-radius - 1);\n        }\n      }\n    }\n  }\n  // Add border bottom radius for last one\n  > .table:last-child,\n  > .table-responsive:last-child > .table:last-child {\n    .border-bottom-radius((@panel-border-radius - 1));\n\n    > tbody:last-child,\n    > tfoot:last-child {\n      > tr:last-child {\n        border-bottom-left-radius: (@panel-border-radius - 1);\n        border-bottom-right-radius: (@panel-border-radius - 1);\n\n        td:first-child,\n        th:first-child {\n          border-bottom-left-radius: (@panel-border-radius - 1);\n        }\n        td:last-child,\n        th:last-child {\n          border-bottom-right-radius: (@panel-border-radius - 1);\n        }\n      }\n    }\n  }\n  > .panel-body + .table,\n  > .panel-body + .table-responsive,\n  > .table + .panel-body,\n  > .table-responsive + .panel-body {\n    border-top: 1px solid @table-border-color;\n  }\n  > .table > tbody:first-child > tr:first-child th,\n  > .table > tbody:first-child > tr:first-child td {\n    border-top: 0;\n  }\n  > .table-bordered,\n  > .table-responsive > .table-bordered {\n    border: 0;\n    > thead,\n    > tbody,\n    > tfoot {\n      > tr {\n        > th:first-child,\n        > td:first-child {\n          border-left: 0;\n        }\n        > th:last-child,\n        > td:last-child {\n          border-right: 0;\n        }\n      }\n    }\n    > thead,\n    > tbody {\n      > tr:first-child {\n        > td,\n        > th {\n          border-bottom: 0;\n        }\n      }\n    }\n    > tbody,\n    > tfoot {\n      > tr:last-child {\n        > td,\n        > th {\n          border-bottom: 0;\n        }\n      }\n    }\n  }\n  > .table-responsive {\n    border: 0;\n    margin-bottom: 0;\n  }\n}\n\n\n// Collapsible panels (aka, accordion)\n//\n// Wrap a series of panels in `.panel-group` to turn them into an accordion with\n// the help of our collapse JavaScript plugin.\n\n.panel-group {\n  margin-bottom: @line-height-computed;\n\n  // Tighten up margin so it's only between panels\n  .panel {\n    margin-bottom: 0;\n    border-radius: @panel-border-radius;\n\n    + .panel {\n      margin-top: 5px;\n    }\n  }\n\n  .panel-heading {\n    border-bottom: 0;\n\n    + .panel-collapse > .panel-body,\n    + .panel-collapse > .list-group {\n      border-top: 1px solid @panel-inner-border;\n    }\n  }\n\n  .panel-footer {\n    border-top: 0;\n    + .panel-collapse .panel-body {\n      border-bottom: 1px solid @panel-inner-border;\n    }\n  }\n}\n\n\n// Contextual variations\n.panel-default {\n  .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border);\n}\n.panel-primary {\n  .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border);\n}\n.panel-success {\n  .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);\n}\n.panel-info {\n  .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);\n}\n.panel-warning {\n  .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);\n}\n.panel-danger {\n  .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);\n}\n","// Panels\n\n.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {\n  border-color: @border;\n\n  & > .panel-heading {\n    color: @heading-text-color;\n    background-color: @heading-bg-color;\n    border-color: @heading-border;\n\n    + .panel-collapse > .panel-body {\n      border-top-color: @border;\n    }\n    .badge {\n      color: @heading-bg-color;\n      background-color: @heading-text-color;\n    }\n  }\n  & > .panel-footer {\n    + .panel-collapse > .panel-body {\n      border-bottom-color: @border;\n    }\n  }\n}\n","// Embeds responsive\n//\n// Credit: Nicolas Gallagher and SUIT CSS.\n\n.embed-responsive {\n  position: relative;\n  display: block;\n  height: 0;\n  padding: 0;\n  overflow: hidden;\n\n  .embed-responsive-item,\n  iframe,\n  embed,\n  object,\n  video {\n    position: absolute;\n    top: 0;\n    left: 0;\n    bottom: 0;\n    height: 100%;\n    width: 100%;\n    border: 0;\n  }\n}\n\n// Modifier class for 16:9 aspect ratio\n.embed-responsive-16by9 {\n  padding-bottom: 56.25%;\n}\n\n// Modifier class for 4:3 aspect ratio\n.embed-responsive-4by3 {\n  padding-bottom: 75%;\n}\n","//\n// Wells\n// --------------------------------------------------\n\n\n// Base class\n.well {\n  min-height: 20px;\n  padding: 19px;\n  margin-bottom: 20px;\n  background-color: @well-bg;\n  border: 1px solid @well-border;\n  border-radius: @border-radius-base;\n  .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));\n  blockquote {\n    border-color: #ddd;\n    border-color: rgba(0,0,0,.15);\n  }\n}\n\n// Sizes\n.well-lg {\n  padding: 24px;\n  border-radius: @border-radius-large;\n}\n.well-sm {\n  padding: 9px;\n  border-radius: @border-radius-small;\n}\n","//\n// Close icons\n// --------------------------------------------------\n\n\n.close {\n  float: right;\n  font-size: (@font-size-base * 1.5);\n  font-weight: @close-font-weight;\n  line-height: 1;\n  color: @close-color;\n  text-shadow: @close-text-shadow;\n  .opacity(.2);\n\n  &:hover,\n  &:focus {\n    color: @close-color;\n    text-decoration: none;\n    cursor: pointer;\n    .opacity(.5);\n  }\n\n  // Additional properties for button version\n  // iOS requires the button element instead of an anchor tag.\n  // If you want the anchor version, it requires `href=\"#\"`.\n  // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile\n  button& {\n    padding: 0;\n    cursor: pointer;\n    background: transparent;\n    border: 0;\n    -webkit-appearance: none;\n  }\n}\n","//\n// Modals\n// --------------------------------------------------\n\n// .modal-open      - body class for killing the scroll\n// .modal           - container to scroll within\n// .modal-dialog    - positioning shell for the actual modal\n// .modal-content   - actual modal w/ bg and corners and shit\n\n// Kill the scroll on the body\n.modal-open {\n  overflow: hidden;\n}\n\n// Container that the modal scrolls within\n.modal {\n  display: none;\n  overflow: hidden;\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: @zindex-modal;\n  -webkit-overflow-scrolling: touch;\n\n  // Prevent Chrome on Windows from adding a focus outline. For details, see\n  // https://github.com/twbs/bootstrap/pull/10951.\n  outline: 0;\n\n  // When fading in the modal, animate it to slide down\n  &.fade .modal-dialog {\n    .translate(0, -25%);\n    .transition-transform(~\"0.3s ease-out\");\n  }\n  &.in .modal-dialog { .translate(0, 0) }\n}\n.modal-open .modal {\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n\n// Shell div to position the modal with bottom padding\n.modal-dialog {\n  position: relative;\n  width: auto;\n  margin: 10px;\n}\n\n// Actual modal\n.modal-content {\n  position: relative;\n  background-color: @modal-content-bg;\n  border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)\n  border: 1px solid @modal-content-border-color;\n  border-radius: @border-radius-large;\n  .box-shadow(0 3px 9px rgba(0,0,0,.5));\n  background-clip: padding-box;\n  // Remove focus outline from opened modal\n  outline: 0;\n}\n\n// Modal background\n.modal-backdrop {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: @zindex-modal-background;\n  background-color: @modal-backdrop-bg;\n  // Fade for backdrop\n  &.fade { .opacity(0); }\n  &.in { .opacity(@modal-backdrop-opacity); }\n}\n\n// Modal header\n// Top section of the modal w/ title and dismiss\n.modal-header {\n  padding: @modal-title-padding;\n  border-bottom: 1px solid @modal-header-border-color;\n  &:extend(.clearfix all);\n}\n// Close icon\n.modal-header .close {\n  margin-top: -2px;\n}\n\n// Title text within header\n.modal-title {\n  margin: 0;\n  line-height: @modal-title-line-height;\n}\n\n// Modal body\n// Where all modal content resides (sibling of .modal-header and .modal-footer)\n.modal-body {\n  position: relative;\n  padding: @modal-inner-padding;\n}\n\n// Footer (for actions)\n.modal-footer {\n  padding: @modal-inner-padding;\n  text-align: right; // right align buttons\n  border-top: 1px solid @modal-footer-border-color;\n  &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons\n\n  // Properly space out buttons\n  .btn + .btn {\n    margin-left: 5px;\n    margin-bottom: 0; // account for input[type=\"submit\"] which gets the bottom margin like all other inputs\n  }\n  // but override that for button groups\n  .btn-group .btn + .btn {\n    margin-left: -1px;\n  }\n  // and override it for block buttons as well\n  .btn-block + .btn-block {\n    margin-left: 0;\n  }\n}\n\n// Measure scrollbar width for padding body during modal show/hide\n.modal-scrollbar-measure {\n  position: absolute;\n  top: -9999px;\n  width: 50px;\n  height: 50px;\n  overflow: scroll;\n}\n\n// Scale up the modal\n@media (min-width: @screen-sm-min) {\n  // Automatically set modal's width for larger viewports\n  .modal-dialog {\n    width: @modal-md;\n    margin: 30px auto;\n  }\n  .modal-content {\n    .box-shadow(0 5px 15px rgba(0,0,0,.5));\n  }\n\n  // Modal sizes\n  .modal-sm { width: @modal-sm; }\n}\n\n@media (min-width: @screen-md-min) {\n  .modal-lg { width: @modal-lg; }\n}\n","//\n// Tooltips\n// --------------------------------------------------\n\n\n// Base class\n.tooltip {\n  position: absolute;\n  z-index: @zindex-tooltip;\n  display: block;\n  // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.\n  // So reset our font and text properties to avoid inheriting weird values.\n  .reset-text();\n  font-size: @font-size-small;\n\n  .opacity(0);\n\n  &.in     { .opacity(@tooltip-opacity); }\n  &.top    { margin-top:  -3px; padding: @tooltip-arrow-width 0; }\n  &.right  { margin-left:  3px; padding: 0 @tooltip-arrow-width; }\n  &.bottom { margin-top:   3px; padding: @tooltip-arrow-width 0; }\n  &.left   { margin-left: -3px; padding: 0 @tooltip-arrow-width; }\n}\n\n// Wrapper for the tooltip content\n.tooltip-inner {\n  max-width: @tooltip-max-width;\n  padding: 3px 8px;\n  color: @tooltip-color;\n  text-align: center;\n  background-color: @tooltip-bg;\n  border-radius: @border-radius-base;\n}\n\n// Arrows\n.tooltip-arrow {\n  position: absolute;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n// Note: Deprecated .top-left, .top-right, .bottom-left, and .bottom-right as of v3.3.1\n.tooltip {\n  &.top .tooltip-arrow {\n    bottom: 0;\n    left: 50%;\n    margin-left: -@tooltip-arrow-width;\n    border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n    border-top-color: @tooltip-arrow-color;\n  }\n  &.top-left .tooltip-arrow {\n    bottom: 0;\n    right: @tooltip-arrow-width;\n    margin-bottom: -@tooltip-arrow-width;\n    border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n    border-top-color: @tooltip-arrow-color;\n  }\n  &.top-right .tooltip-arrow {\n    bottom: 0;\n    left: @tooltip-arrow-width;\n    margin-bottom: -@tooltip-arrow-width;\n    border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n    border-top-color: @tooltip-arrow-color;\n  }\n  &.right .tooltip-arrow {\n    top: 50%;\n    left: 0;\n    margin-top: -@tooltip-arrow-width;\n    border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;\n    border-right-color: @tooltip-arrow-color;\n  }\n  &.left .tooltip-arrow {\n    top: 50%;\n    right: 0;\n    margin-top: -@tooltip-arrow-width;\n    border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;\n    border-left-color: @tooltip-arrow-color;\n  }\n  &.bottom .tooltip-arrow {\n    top: 0;\n    left: 50%;\n    margin-left: -@tooltip-arrow-width;\n    border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n    border-bottom-color: @tooltip-arrow-color;\n  }\n  &.bottom-left .tooltip-arrow {\n    top: 0;\n    right: @tooltip-arrow-width;\n    margin-top: -@tooltip-arrow-width;\n    border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n    border-bottom-color: @tooltip-arrow-color;\n  }\n  &.bottom-right .tooltip-arrow {\n    top: 0;\n    left: @tooltip-arrow-width;\n    margin-top: -@tooltip-arrow-width;\n    border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n    border-bottom-color: @tooltip-arrow-color;\n  }\n}\n",".reset-text() {\n  font-family: @font-family-base;\n  // We deliberately do NOT reset font-size.\n  font-style: normal;\n  font-weight: normal;\n  letter-spacing: normal;\n  line-break: auto;\n  line-height: @line-height-base;\n  text-align: left; // Fallback for where `start` is not supported\n  text-align: start;\n  text-decoration: none;\n  text-shadow: none;\n  text-transform: none;\n  white-space: normal;\n  word-break: normal;\n  word-spacing: normal;\n  word-wrap: normal;\n}\n","//\n// Popovers\n// --------------------------------------------------\n\n\n.popover {\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: @zindex-popover;\n  display: none;\n  max-width: @popover-max-width;\n  padding: 1px;\n  // Our parent element can be arbitrary since popovers are by default inserted as a sibling of their target element.\n  // So reset our font and text properties to avoid inheriting weird values.\n  .reset-text();\n  font-size: @font-size-base;\n\n  background-color: @popover-bg;\n  background-clip: padding-box;\n  border: 1px solid @popover-fallback-border-color;\n  border: 1px solid @popover-border-color;\n  border-radius: @border-radius-large;\n  .box-shadow(0 5px 10px rgba(0,0,0,.2));\n\n  // Offset the popover to account for the popover arrow\n  &.top     { margin-top: -@popover-arrow-width; }\n  &.right   { margin-left: @popover-arrow-width; }\n  &.bottom  { margin-top: @popover-arrow-width; }\n  &.left    { margin-left: -@popover-arrow-width; }\n}\n\n.popover-title {\n  margin: 0; // reset heading margin\n  padding: 8px 14px;\n  font-size: @font-size-base;\n  background-color: @popover-title-bg;\n  border-bottom: 1px solid darken(@popover-title-bg, 5%);\n  border-radius: (@border-radius-large - 1) (@border-radius-large - 1) 0 0;\n}\n\n.popover-content {\n  padding: 9px 14px;\n}\n\n// Arrows\n//\n// .arrow is outer, .arrow:after is inner\n\n.popover > .arrow {\n  &,\n  &:after {\n    position: absolute;\n    display: block;\n    width: 0;\n    height: 0;\n    border-color: transparent;\n    border-style: solid;\n  }\n}\n.popover > .arrow {\n  border-width: @popover-arrow-outer-width;\n}\n.popover > .arrow:after {\n  border-width: @popover-arrow-width;\n  content: \"\";\n}\n\n.popover {\n  &.top > .arrow {\n    left: 50%;\n    margin-left: -@popover-arrow-outer-width;\n    border-bottom-width: 0;\n    border-top-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n    border-top-color: @popover-arrow-outer-color;\n    bottom: -@popover-arrow-outer-width;\n    &:after {\n      content: \" \";\n      bottom: 1px;\n      margin-left: -@popover-arrow-width;\n      border-bottom-width: 0;\n      border-top-color: @popover-arrow-color;\n    }\n  }\n  &.right > .arrow {\n    top: 50%;\n    left: -@popover-arrow-outer-width;\n    margin-top: -@popover-arrow-outer-width;\n    border-left-width: 0;\n    border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n    border-right-color: @popover-arrow-outer-color;\n    &:after {\n      content: \" \";\n      left: 1px;\n      bottom: -@popover-arrow-width;\n      border-left-width: 0;\n      border-right-color: @popover-arrow-color;\n    }\n  }\n  &.bottom > .arrow {\n    left: 50%;\n    margin-left: -@popover-arrow-outer-width;\n    border-top-width: 0;\n    border-bottom-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n    border-bottom-color: @popover-arrow-outer-color;\n    top: -@popover-arrow-outer-width;\n    &:after {\n      content: \" \";\n      top: 1px;\n      margin-left: -@popover-arrow-width;\n      border-top-width: 0;\n      border-bottom-color: @popover-arrow-color;\n    }\n  }\n\n  &.left > .arrow {\n    top: 50%;\n    right: -@popover-arrow-outer-width;\n    margin-top: -@popover-arrow-outer-width;\n    border-right-width: 0;\n    border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n    border-left-color: @popover-arrow-outer-color;\n    &:after {\n      content: \" \";\n      right: 1px;\n      border-right-width: 0;\n      border-left-color: @popover-arrow-color;\n      bottom: -@popover-arrow-width;\n    }\n  }\n}\n","//\n// Carousel\n// --------------------------------------------------\n\n\n// Wrapper for the slide container and indicators\n.carousel {\n  position: relative;\n}\n\n.carousel-inner {\n  position: relative;\n  overflow: hidden;\n  width: 100%;\n\n  > .item {\n    display: none;\n    position: relative;\n    .transition(.6s ease-in-out left);\n\n    // Account for jankitude on images\n    > img,\n    > a > img {\n      &:extend(.img-responsive);\n      line-height: 1;\n    }\n\n    // WebKit CSS3 transforms for supported devices\n    @media all and (transform-3d), (-webkit-transform-3d) {\n      .transition-transform(~'0.6s ease-in-out');\n      .backface-visibility(~'hidden');\n      .perspective(1000px);\n\n      &.next,\n      &.active.right {\n        .translate3d(100%, 0, 0);\n        left: 0;\n      }\n      &.prev,\n      &.active.left {\n        .translate3d(-100%, 0, 0);\n        left: 0;\n      }\n      &.next.left,\n      &.prev.right,\n      &.active {\n        .translate3d(0, 0, 0);\n        left: 0;\n      }\n    }\n  }\n\n  > .active,\n  > .next,\n  > .prev {\n    display: block;\n  }\n\n  > .active {\n    left: 0;\n  }\n\n  > .next,\n  > .prev {\n    position: absolute;\n    top: 0;\n    width: 100%;\n  }\n\n  > .next {\n    left: 100%;\n  }\n  > .prev {\n    left: -100%;\n  }\n  > .next.left,\n  > .prev.right {\n    left: 0;\n  }\n\n  > .active.left {\n    left: -100%;\n  }\n  > .active.right {\n    left: 100%;\n  }\n\n}\n\n// Left/right controls for nav\n// ---------------------------\n\n.carousel-control {\n  position: absolute;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  width: @carousel-control-width;\n  .opacity(@carousel-control-opacity);\n  font-size: @carousel-control-font-size;\n  color: @carousel-control-color;\n  text-align: center;\n  text-shadow: @carousel-text-shadow;\n  background-color: rgba(0, 0, 0, 0); // Fix IE9 click-thru bug\n  // We can't have this transition here because WebKit cancels the carousel\n  // animation if you trip this while in the middle of another animation.\n\n  // Set gradients for backgrounds\n  &.left {\n    #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));\n  }\n  &.right {\n    left: auto;\n    right: 0;\n    #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));\n  }\n\n  // Hover/focus state\n  &:hover,\n  &:focus {\n    outline: 0;\n    color: @carousel-control-color;\n    text-decoration: none;\n    .opacity(.9);\n  }\n\n  // Toggles\n  .icon-prev,\n  .icon-next,\n  .glyphicon-chevron-left,\n  .glyphicon-chevron-right {\n    position: absolute;\n    top: 50%;\n    margin-top: -10px;\n    z-index: 5;\n    display: inline-block;\n  }\n  .icon-prev,\n  .glyphicon-chevron-left {\n    left: 50%;\n    margin-left: -10px;\n  }\n  .icon-next,\n  .glyphicon-chevron-right {\n    right: 50%;\n    margin-right: -10px;\n  }\n  .icon-prev,\n  .icon-next {\n    width:  20px;\n    height: 20px;\n    line-height: 1;\n    font-family: serif;\n  }\n\n\n  .icon-prev {\n    &:before {\n      content: '\\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)\n    }\n  }\n  .icon-next {\n    &:before {\n      content: '\\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)\n    }\n  }\n}\n\n// Optional indicator pips\n//\n// Add an unordered list with the following class and add a list item for each\n// slide your carousel holds.\n\n.carousel-indicators {\n  position: absolute;\n  bottom: 10px;\n  left: 50%;\n  z-index: 15;\n  width: 60%;\n  margin-left: -30%;\n  padding-left: 0;\n  list-style: none;\n  text-align: center;\n\n  li {\n    display: inline-block;\n    width:  10px;\n    height: 10px;\n    margin: 1px;\n    text-indent: -999px;\n    border: 1px solid @carousel-indicator-border-color;\n    border-radius: 10px;\n    cursor: pointer;\n\n    // IE8-9 hack for event handling\n    //\n    // Internet Explorer 8-9 does not support clicks on elements without a set\n    // `background-color`. We cannot use `filter` since that's not viewed as a\n    // background color by the browser. Thus, a hack is needed.\n    // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer\n    //\n    // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we\n    // set alpha transparency for the best results possible.\n    background-color: #000 \\9; // IE8\n    background-color: rgba(0,0,0,0); // IE9\n  }\n  .active {\n    margin: 0;\n    width:  12px;\n    height: 12px;\n    background-color: @carousel-indicator-active-bg;\n  }\n}\n\n// Optional captions\n// -----------------------------\n// Hidden by default for smaller viewports\n.carousel-caption {\n  position: absolute;\n  left: 15%;\n  right: 15%;\n  bottom: 20px;\n  z-index: 10;\n  padding-top: 20px;\n  padding-bottom: 20px;\n  color: @carousel-caption-color;\n  text-align: center;\n  text-shadow: @carousel-text-shadow;\n  & .btn {\n    text-shadow: none; // No shadow for button elements in carousel-caption\n  }\n}\n\n\n// Scale up controls for tablets and up\n@media screen and (min-width: @screen-sm-min) {\n\n  // Scale up the controls a smidge\n  .carousel-control {\n    .glyphicon-chevron-left,\n    .glyphicon-chevron-right,\n    .icon-prev,\n    .icon-next {\n      width: (@carousel-control-font-size * 1.5);\n      height: (@carousel-control-font-size * 1.5);\n      margin-top: (@carousel-control-font-size / -2);\n      font-size: (@carousel-control-font-size * 1.5);\n    }\n    .glyphicon-chevron-left,\n    .icon-prev {\n      margin-left: (@carousel-control-font-size / -2);\n    }\n    .glyphicon-chevron-right,\n    .icon-next {\n      margin-right: (@carousel-control-font-size / -2);\n    }\n  }\n\n  // Show and left align the captions\n  .carousel-caption {\n    left: 20%;\n    right: 20%;\n    padding-bottom: 30px;\n  }\n\n  // Move up the indicators\n  .carousel-indicators {\n    bottom: 20px;\n  }\n}\n","// Clearfix\n//\n// For modern browsers\n// 1. The space content is one way to avoid an Opera bug when the\n//    contenteditable attribute is included anywhere else in the document.\n//    Otherwise it causes space to appear at the top and bottom of elements\n//    that are clearfixed.\n// 2. The use of `table` rather than `block` is only necessary if using\n//    `:before` to contain the top-margins of child elements.\n//\n// Source: http://nicolasgallagher.com/micro-clearfix-hack/\n\n.clearfix() {\n  &:before,\n  &:after {\n    content: \" \"; // 1\n    display: table; // 2\n  }\n  &:after {\n    clear: both;\n  }\n}\n","// Center-align a block level element\n\n.center-block() {\n  display: block;\n  margin-left: auto;\n  margin-right: auto;\n}\n","// CSS image replacement\n//\n// Heads up! v3 launched with only `.hide-text()`, but per our pattern for\n// mixins being reused as classes with the same name, this doesn't hold up. As\n// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.\n//\n// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757\n\n// Deprecated as of v3.0.1 (has been removed in v4)\n.hide-text() {\n  font: ~\"0/0\" a;\n  color: transparent;\n  text-shadow: none;\n  background-color: transparent;\n  border: 0;\n}\n\n// New mixin to use as of v3.0.1\n.text-hide() {\n  .hide-text();\n}\n","//\n// Responsive: Utility classes\n// --------------------------------------------------\n\n\n// IE10 in Windows (Phone) 8\n//\n// Support for responsive views via media queries is kind of borked in IE10, for\n// Surface/desktop in split view and for Windows Phone 8. This particular fix\n// must be accompanied by a snippet of JavaScript to sniff the user agent and\n// apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at\n// our Getting Started page for more information on this bug.\n//\n// For more information, see the following:\n//\n// Issue: https://github.com/twbs/bootstrap/issues/10497\n// Docs: http://getbootstrap.com/getting-started/#support-ie10-width\n// Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/\n// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/\n\n@-ms-viewport {\n  width: device-width;\n}\n\n\n// Visibility utilities\n// Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n  .responsive-invisibility();\n}\n\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n  display: none !important;\n}\n\n.visible-xs {\n  @media (max-width: @screen-xs-max) {\n    .responsive-visibility();\n  }\n}\n.visible-xs-block {\n  @media (max-width: @screen-xs-max) {\n    display: block !important;\n  }\n}\n.visible-xs-inline {\n  @media (max-width: @screen-xs-max) {\n    display: inline !important;\n  }\n}\n.visible-xs-inline-block {\n  @media (max-width: @screen-xs-max) {\n    display: inline-block !important;\n  }\n}\n\n.visible-sm {\n  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n    .responsive-visibility();\n  }\n}\n.visible-sm-block {\n  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n    display: block !important;\n  }\n}\n.visible-sm-inline {\n  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n    display: inline !important;\n  }\n}\n.visible-sm-inline-block {\n  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n    display: inline-block !important;\n  }\n}\n\n.visible-md {\n  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n    .responsive-visibility();\n  }\n}\n.visible-md-block {\n  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n    display: block !important;\n  }\n}\n.visible-md-inline {\n  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n    display: inline !important;\n  }\n}\n.visible-md-inline-block {\n  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n    display: inline-block !important;\n  }\n}\n\n.visible-lg {\n  @media (min-width: @screen-lg-min) {\n    .responsive-visibility();\n  }\n}\n.visible-lg-block {\n  @media (min-width: @screen-lg-min) {\n    display: block !important;\n  }\n}\n.visible-lg-inline {\n  @media (min-width: @screen-lg-min) {\n    display: inline !important;\n  }\n}\n.visible-lg-inline-block {\n  @media (min-width: @screen-lg-min) {\n    display: inline-block !important;\n  }\n}\n\n.hidden-xs {\n  @media (max-width: @screen-xs-max) {\n    .responsive-invisibility();\n  }\n}\n.hidden-sm {\n  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n    .responsive-invisibility();\n  }\n}\n.hidden-md {\n  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n    .responsive-invisibility();\n  }\n}\n.hidden-lg {\n  @media (min-width: @screen-lg-min) {\n    .responsive-invisibility();\n  }\n}\n\n\n// Print utilities\n//\n// Media queries are placed on the inside to be mixin-friendly.\n\n// Note: Deprecated .visible-print as of v3.2.0\n.visible-print {\n  .responsive-invisibility();\n\n  @media print {\n    .responsive-visibility();\n  }\n}\n.visible-print-block {\n  display: none !important;\n\n  @media print {\n    display: block !important;\n  }\n}\n.visible-print-inline {\n  display: none !important;\n\n  @media print {\n    display: inline !important;\n  }\n}\n.visible-print-inline-block {\n  display: none !important;\n\n  @media print {\n    display: inline-block !important;\n  }\n}\n\n.hidden-print {\n  @media print {\n    .responsive-invisibility();\n  }\n}\n","// Responsive utilities\n\n//\n// More easily include all the states for responsive-utilities.less.\n.responsive-visibility() {\n  display: block !important;\n  table&  { display: table !important; }\n  tr&     { display: table-row !important; }\n  th&,\n  td&     { display: table-cell !important; }\n}\n\n.responsive-invisibility() {\n  display: none !important;\n}\n"]}
Index: EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap.min.css
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap.min.css	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap.min.css	(revision 270)
@@ -0,0 +1,6 @@
+/*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}
+/*# sourceMappingURL=bootstrap.min.css.map */
Index: EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap.min.css.map
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap.min.css.map	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/bootstrap.min.css.map	(revision 270)
@@ -0,0 +1,1 @@
+{"version":3,"sources":["less/normalize.less","less/print.less","bootstrap.css","dist/css/bootstrap.css","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text-emphasis.less","less/mixins/background-variant.less","less/mixins/text-overflow.less","less/code.less","less/grid.less","less/mixins/grid.less","less/mixins/grid-framework.less","less/tables.less","less/mixins/table-row.less","less/forms.less","less/mixins/forms.less","less/buttons.less","less/mixins/buttons.less","less/mixins/opacity.less","less/component-animations.less","less/dropdowns.less","less/mixins/nav-divider.less","less/mixins/reset-filter.less","less/button-groups.less","less/mixins/border-radius.less","less/input-groups.less","less/navs.less","less/navbar.less","less/mixins/nav-vertical-align.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/mixins/pagination.less","less/pager.less","less/labels.less","less/mixins/labels.less","less/badges.less","less/jumbotron.less","less/thumbnails.less","less/alerts.less","less/mixins/alerts.less","less/progress-bars.less","less/mixins/gradients.less","less/mixins/progress-bar.less","less/media.less","less/list-group.less","less/mixins/list-group.less","less/panels.less","less/mixins/panels.less","less/responsive-embed.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/mixins/reset-text.less","less/popovers.less","less/carousel.less","less/mixins/clearfix.less","less/mixins/center-block.less","less/mixins/hide-text.less","less/responsive-utilities.less","less/mixins/responsive-visibility.less"],"names":[],"mappings":";;;;4EAQA,KACE,YAAA,WACA,yBAAA,KACA,qBAAA,KAOF,KACE,OAAA,EAaF,QAAA,MAAA,QAAA,WAAA,OAAA,OAAA,OAAA,OAAA,KAAA,KAAA,IAAA,QAAA,QAaE,QAAA,MAQF,MAAA,OAAA,SAAA,MAIE,QAAA,aACA,eAAA,SAQF,sBACE,QAAA,KACA,OAAA,EAQF,SAAA,SAEE,QAAA,KAUF,EACE,iBAAA,YAQF,SAAA,QAEE,QAAA,EAUF,YACE,cAAA,IAAA,OAOF,EAAA,OAEE,YAAA,IAOF,IACE,WAAA,OAQF,GACE,OAAA,MAAA,EACA,UAAA,IAOF,KACE,MAAA,KACA,WAAA,KAOF,MACE,UAAA,IAOF,IAAA,IAEE,SAAA,SACA,UAAA,IACA,YAAA,EACA,eAAA,SAGF,IACE,IAAA,MAGF,IACE,OAAA,OAUF,IACE,OAAA,EAOF,eACE,SAAA,OAUF,OACE,OAAA,IAAA,KAOF,GACE,OAAA,EAAA,mBAAA,YAAA,gBAAA,YACA,WAAA,YAOF,IACE,SAAA,KAOF,KAAA,IAAA,IAAA,KAIE,YAAA,UAAA,UACA,UAAA,IAkBF,OAAA,MAAA,SAAA,OAAA,SAKE,OAAA,EACA,KAAA,QACA,MAAA,QAOF,OACE,SAAA,QAUF,OAAA,OAEE,eAAA,KAWF,OAAA,wBAAA,kBAAA,mBAIE,mBAAA,OACA,OAAA,QAOF,iBAAA,qBAEE,OAAA,QAOF,yBAAA,wBAEE,QAAA,EACA,OAAA,EAQF,MACE,YAAA,OAWF,qBAAA,kBAEE,mBAAA,WAAA,gBAAA,WAAA,WAAA,WACA,QAAA,EASF,8CAAA,8CAEE,OAAA,KAQF,mBACE,mBAAA,YACA,gBAAA,YAAA,WAAA,YAAA,mBAAA,UASF,iDAAA,8CAEE,mBAAA,KAOF,SACE,QAAA,MAAA,OAAA,MACA,OAAA,EAAA,IACA,OAAA,IAAA,MAAA,OAQF,OACE,QAAA,EACA,OAAA,EAOF,SACE,SAAA,KAQF,SACE,YAAA,IAUF,MACE,eAAA,EACA,gBAAA,SAGF,GAAA,GAEE,QAAA,uFCjUF,aA7FI,EAAA,OAAA,QAGI,MAAA,eACA,YAAA,eACA,WAAA,cAAA,mBAAA,eACA,WAAA,eAGJ,EAAA,UAEI,gBAAA,UAGJ,cACI,QAAA,KAAA,WAAA,IAGJ,kBACI,QAAA,KAAA,YAAA,IAKJ,6BAAA,mBAEI,QAAA,GAGJ,WAAA,IAEI,OAAA,IAAA,MAAA,KC4KL,kBAAA,MDvKK,MC0KL,QAAA,mBDrKK,IE8KN,GDLC,kBAAA,MDrKK,ICwKL,UAAA,eCUD,GF5KM,GE2KN,EF1KM,QAAA,ECuKL,OAAA,ECSD,GF3KM,GCsKL,iBAAA,MD/JK,QCkKL,QAAA,KCSD,YFtKU,oBCiKT,iBAAA,eD7JK,OCgKL,OAAA,IAAA,MAAA,KD5JK,OC+JL,gBAAA,mBCSD,UFpKU,UC+JT,iBAAA,eDzJS,mBEkKV,mBDLC,OAAA,IAAA,MAAA,gBEjPD,WACA,YAAA,uBFsPD,IAAA,+CE7OC,IAAK,sDAAuD,4BAA6B,iDAAkD,gBAAiB,gDAAiD,eAAgB,+CAAgD,mBAAoB,2EAA4E,cAE7W,WACA,SAAA,SACA,IAAA,IACA,QAAA,aACA,YAAA,uBACA,WAAA,OACA,YAAA,IACA,YAAA,EAIkC,uBAAA,YAAW,wBAAA,UACX,2BAAW,QAAA,QAEX,uBDuPlC,QAAS,QCtPyB,sBFiPnC,uBEjP8C,QAAA,QACX,wBAAW,QAAA,QACX,wBAAW,QAAA,QACX,2BAAW,QAAA,QACX,yBAAW,QAAA,QACX,wBAAW,QAAA,QACX,wBAAW,QAAA,QACX,yBAAW,QAAA,QACX,wBAAW,QAAA,QACX,uBAAW,QAAA,QACX,6BAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,2BAAW,QAAA,QACX,qBAAW,QAAA,QACX,0BAAW,QAAA,QACX,qBAAW,QAAA,QACX,yBAAW,QAAA,QACX,0BAAW,QAAA,QACX,2BAAW,QAAA,QACX,sBAAW,QAAA,QACX,yBAAW,QAAA,QACX,sBAAW,QAAA,QACX,wBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,+BAAW,QAAA,QACX,2BAAW,QAAA,QACX,yBAAW,QAAA,QACX,wBAAW,QAAA,QACX,8BAAW,QAAA,QACX,yBAAW,QAAA,QACX,0BAAW,QAAA,QACX,2BAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,6BAAW,QAAA,QACX,6BAAW,QAAA,QACX,8BAAW,QAAA,QACX,4BAAW,QAAA,QACX,yBAAW,QAAA,QACX,0BAAW,QAAA,QACX,sBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,2BAAW,QAAA,QACX,wBAAW,QAAA,QACX,yBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,yBAAW,QAAA,QACX,8BAAW,QAAA,QACX,6BAAW,QAAA,QACX,6BAAW,QAAA,QACX,+BAAW,QAAA,QACX,8BAAW,QAAA,QACX,gCAAW,QAAA,QACX,uBAAW,QAAA,QACX,8BAAW,QAAA,QACX,+BAAW,QAAA,QACX,iCAAW,QAAA,QACX,0BAAW,QAAA,QACX,6BAAW,QAAA,QACX,yBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,wBAAW,QAAA,QACX,wBAAW,QAAA,QACX,uBAAW,QAAA,QACX,gCAAW,QAAA,QACX,gCAAW,QAAA,QACX,2BAAW,QAAA,QACX,uBAAW,QAAA,QACX,wBAAW,QAAA,QACX,uBAAW,QAAA,QACX,0BAAW,QAAA,QACX,+BAAW,QAAA,QACX,+BAAW,QAAA,QACX,wBAAW,QAAA,QACX,+BAAW,QAAA,QACX,gCAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,8BAAW,QAAA,QACX,0BAAW,QAAA,QACX,gCAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,gCAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,6BAAW,QAAA,QACX,8BAAW,QAAA,QACX,2BAAW,QAAA,QACX,6BAAW,QAAA,QACX,4BAAW,QAAA,QACX,8BAAW,QAAA,QACX,+BAAW,QAAA,QACX,mCAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,2BAAW,QAAA,QACX,4BAAW,QAAA,QACX,+BAAW,QAAA,QACX,wBAAW,QAAA,QACX,2BAAW,QAAA,QACX,yBAAW,QAAA,QACX,0BAAW,QAAA,QACX,yBAAW,QAAA,QACX,6BAAW,QAAA,QACX,+BAAW,QAAA,QACX,0BAAW,QAAA,QACX,gCAAW,QAAA,QACX,+BAAW,QAAA,QACX,8BAAW,QAAA,QACX,kCAAW,QAAA,QACX,oCAAW,QAAA,QACX,sBAAW,QAAA,QACX,2BAAW,QAAA,QACX,uBAAW,QAAA,QACX,8BAAW,QAAA,QACX,4BAAW,QAAA,QACX,8BAAW,QAAA,QACX,6BAAW,QAAA,QACX,4BAAW,QAAA,QACX,0BAAW,QAAA,QACX,4BAAW,QAAA,QACX,qCAAW,QAAA,QACX,oCAAW,QAAA,QACX,kCAAW,QAAA,QACX,oCAAW,QAAA,QACX,wBAAW,QAAA,QACX,yBAAW,QAAA,QACX,wBAAW,QAAA,QACX,yBAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,4BAAW,QAAA,QACX,4BAAW,QAAA,QACX,8BAAW,QAAA,QACX,uBAAW,QAAA,QACX,wBAAW,QAAA,QACX,0BAAW,QAAA,QACX,sBAAW,QAAA,QACX,sBAAW,QAAA,QACX,uBAAW,QAAA,QACX,mCAAW,QAAA,QACX,uCAAW,QAAA,QACX,gCAAW,QAAA,QACX,oCAAW,QAAA,QACX,qCAAW,QAAA,QACX,yCAAW,QAAA,QACX,4BAAW,QAAA,QACX,yBAAW,QAAA,QACX,gCAAW,QAAA,QACX,8BAAW,QAAA,QACX,yBAAW,QAAA,QACX,wBAAW,QAAA,QACX,0BAAW,QAAA,QACX,6BAAW,QAAA,QACX,yBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,wBAAW,QAAA,QACX,yBAAW,QAAA,QACX,yBAAW,QAAA,QACX,uBAAW,QAAA,QACX,8BAAW,QAAA,QACX,+BAAW,QAAA,QACX,gCAAW,QAAA,QACX,8BAAW,QAAA,QACX,8BAAW,QAAA,QACX,8BAAW,QAAA,QACX,2BAAW,QAAA,QACX,0BAAW,QAAA,QACX,yBAAW,QAAA,QACX,6BAAW,QAAA,QACX,2BAAW,QAAA,QACX,4BAAW,QAAA,QACX,wBAAW,QAAA,QACX,wBAAW,QAAA,QACX,2BAAW,QAAA,QACX,2BAAW,QAAA,QACX,4BAAW,QAAA,QACX,+BAAW,QAAA,QACX,8BAAW,QAAA,QACX,4BAAW,QAAA,QACX,4BAAW,QAAA,QACX,4BAAW,QAAA,QACX,iCAAW,QAAA,QACX,oCAAW,QAAA,QACX,iCAAW,QAAA,QACX,+BAAW,QAAA,QACX,+BAAW,QAAA,QACX,iCAAW,QAAA,QACX,qBAAW,QAAA,QACX,4BAAW,QAAA,QACX,4BAAW,QAAA,QACX,2BAAW,QAAA,QACX,uBAAW,QAAA,QASX,wBAAW,QAAA,QACX,wBAAW,QAAA,QACX,4BAAW,QAAA,QACX,uBAAW,QAAA,QACX,wBAAW,QAAA,QACX,uBAAW,QAAA,QACX,yBAAW,QAAA,QACX,yBAAW,QAAA,QACX,+BAAW,QAAA,QACX,uBAAW,QAAA,QACX,6BAAW,QAAA,QACX,sBAAW,QAAA,QACX,wBAAW,QAAA,QACX,wBAAW,QAAA,QACX,4BAAW,QAAA,QACX,uBAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,2BAAW,QAAA,QACX,0BAAW,QAAA,QACX,sBAAW,QAAA,QACX,sBAAW,QAAA,QACX,sBAAW,QAAA,QACX,sBAAW,QAAA,QACX,wBAAW,QAAA,QACX,sBAAW,QAAA,QACX,wBAAW,QAAA,QACX,4BAAW,QAAA,QACX,mCAAW,QAAA,QACX,4BAAW,QAAA,QACX,oCAAW,QAAA,QACX,kCAAW,QAAA,QACX,iCAAW,QAAA,QACX,+BAAW,QAAA,QACX,sBAAW,QAAA,QACX,wBAAW,QAAA,QACX,6BAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,kCAAW,QAAA,QACX,mCAAW,QAAA,QACX,sCAAW,QAAA,QACX,0CAAW,QAAA,QACX,oCAAW,QAAA,QACX,wCAAW,QAAA,QACX,qCAAW,QAAA,QACX,iCAAW,QAAA,QACX,gCAAW,QAAA,QACX,kCAAW,QAAA,QACX,+BAAW,QAAA,QACX,0BAAW,QAAA,QACX,8BAAW,QAAA,QACX,4BAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,4BAAW,QAAA,QCtS/C,0BCgEE,QAAA,QHi+BF,EDNC,mBAAA,WGxhCI,gBAAiB,WFiiCZ,WAAY,WGl+BZ,OADL,QJg+BJ,mBAAA,WGthCI,gBAAiB,WACpB,WAAA,WHyhCD,KGrhCC,UAAW,KAEX,4BAAA,cAEA,KACA,YAAA,iBAAA,UAAA,MAAA,WHuhCD,UAAA,KGnhCC,YAAa,WF4hCb,MAAO,KACP,iBAAkB,KExhClB,OADA,MAEA,OHqhCD,SG/gCC,YAAa,QACb,UAAA,QACA,YAAA,QAEA,EFwhCA,MAAO,QEthCL,gBAAA,KAIF,QH8gCD,QKjkCC,MAAA,QACA,gBAAA,UF6DF,QACE,QAAA,IAAA,KAAA,yBHygCD,eAAA,KGlgCC,OHqgCD,OAAA,ECSD,IACE,eAAgB,ODDjB,4BM/kCC,0BLklCF,gBKnlCE,iBADA,eH4EA,QAAS,MACT,UAAA,KHugCD,OAAA,KGhgCC,aACA,cAAA,IAEA,eACA,QAAA,aC6FA,UAAA,KACK,OAAA,KACG,QAAA,IEvLR,YAAA,WACA,iBAAA,KACA,OAAA,IAAA,MAAA,KN+lCD,cAAA,IGjgCC,mBAAoB,IAAI,IAAI,YAC5B,cAAA,IAAA,IAAA,YHmgCD,WAAA,IAAA,IAAA,YG5/BC,YACA,cAAA,IAEA,GH+/BD,WAAA,KGv/BC,cAAe,KACf,OAAA,EACA,WAAA,IAAA,MAAA,KAEA,SACA,SAAA,SACA,MAAA,IACA,OAAA,IACA,QAAA,EHy/BD,OAAA,KGj/BC,SAAA,OF0/BA,KAAM,cEx/BJ,OAAA,EAEA,0BACA,yBACA,SAAA,OACA,MAAA,KHm/BH,OAAA,KGx+BC,OAAQ,EACR,SAAA,QH0+BD,KAAA,KCSD,cACE,OAAQ,QAQV,IACA,IMlpCE,IACA,IACA,IACA,INwoCF,GACA,GACA,GACA,GACA,GACA,GDAC,YAAA,QOlpCC,YAAa,IN2pCb,YAAa,IACb,MAAO,QAoBT,WAZA,UAaA,WAZA,UM5pCI,WN6pCJ,UM5pCI,WN6pCJ,UM5pCI,WN6pCJ,UDMC,WCLD,UACA,UAZA,SAaA,UAZA,SAaA,UAZA,SAaA,UAZA,SAaA,UAZA,SAaA,UAZA,SMppCE,YAAa,INwqCb,YAAa,EACb,MAAO,KAGT,IMxqCE,IAJF,IN2qCA,GAEA,GDLC,GCSC,WAAY,KACZ,cAAe,KASjB,WANA,UDCC,WCCD,UM5qCA,WN8qCA,UACA,UANA,SM5qCI,UN8qCJ,SM3qCA,UN6qCA,SAQE,UAAW,IAGb,IMprCE,IAJF,INurCA,GAEA,GDLC,GCSC,WAAY,KACZ,cAAe,KASjB,WANA,UDCC,WCCD,UMvrCA,WNyrCA,UACA,UANA,SMxrCI,UN0rCJ,SMtrCA,UNwrCA,SMxrCU,UAAA,IACV,IAAA,GAAU,UAAA,KACV,IAAA,GAAU,UAAA,KACV,IAAA,GAAU,UAAA,KACV,IAAA,GAAU,UAAA,KACV,IAAA,GAAU,UAAA,KAOR,IADF,GPssCC,UAAA,KCSD,EMzsCE,OAAA,EAAA,EAAA,KAEA,MPosCD,cAAA,KO/rCC,UAAW,KAwOX,YAAa,IA1OX,YAAA,IPssCH,yBO7rCC,MNssCE,UAAW,MMjsCf,OAAA,MAEE,UAAA,IAKF,MP0rCC,KO1rCsB,QAAA,KP6rCtB,iBAAA,QO5rCsB,WP+rCtB,WAAA,KO9rCsB,YPisCtB,WAAA,MOhsCsB,aPmsCtB,WAAA,OOlsCsB,cPqsCtB,WAAA,QOlsCsB,aPqsCtB,YAAA,OOpsCsB,gBPusCtB,eAAA,UOtsCsB,gBPysCtB,eAAA,UOrsCC,iBPwsCD,eAAA,WQ3yCC,YR8yCD,MAAA,KCSD,cOpzCI,MAAA,QAHF,qBDwGF,qBP6sCC,MAAA,QCSD,cO3zCI,MAAA,QAHF,qBD2GF,qBPitCC,MAAA,QCSD,WOl0CI,MAAA,QAHF,kBD8GF,kBPqtCC,MAAA,QCSD,cOz0CI,MAAA,QAHF,qBDiHF,qBPytCC,MAAA,QCSD,aOh1CI,MAAA,QDwHF,oBAHF,oBExHE,MAAA,QACA,YR01CA,MAAO,KQx1CL,iBAAA,QAHF,mBF8HF,mBP2tCC,iBAAA,QCSD,YQ/1CI,iBAAA,QAHF,mBFiIF,mBP+tCC,iBAAA,QCSD,SQt2CI,iBAAA,QAHF,gBFoIF,gBPmuCC,iBAAA,QCSD,YQ72CI,iBAAA,QAHF,mBFuIF,mBPuuCC,iBAAA,QCSD,WQp3CI,iBAAA,QF6IF,kBADF,kBAEE,iBAAA,QPsuCD,aO7tCC,eAAgB,INsuChB,OAAQ,KAAK,EAAE,KMpuCf,cAAA,IAAA,MAAA,KAFF,GPkuCC,GCSC,WAAY,EACZ,cAAe,KM9tCf,MP0tCD,MO3tCD,MAPI,MASF,cAAA,EAIF,eALE,aAAA,EACA,WAAA,KPkuCD,aO9tCC,aAAc,EAKZ,YAAA,KACA,WAAA,KP6tCH,gBOvtCC,QAAS,aACT,cAAA,IACA,aAAA,IAEF,GNguCE,WAAY,EM9tCZ,cAAA,KAGA,GADF,GP0tCC,YAAA,WOttCC,GPytCD,YAAA,IOnnCD,GAvFM,YAAA,EAEA,yBACA,kBGtNJ,MAAA,KACA,MAAA,MACA,SAAA,OVq6CC,MAAA,KO7nCC,WAAY,MAhFV,cAAA,SPgtCH,YAAA,OOtsCD,kBNgtCE,YAAa,OM1sCjB,0BPssCC,YOrsCC,OAAA,KA9IqB,cAAA,IAAA,OAAA,KAmJvB,YACE,UAAA,IACA,eAAA,UAEA,WPssCD,QAAA,KAAA,KOjsCG,OAAA,EAAA,EAAA,KN0sCF,UAAW,OACX,YAAa,IAAI,MAAM,KMptCzB,yBP+sCC,wBO/sCD,yBNytCE,cAAe,EMnsCb,kBAFA,kBACA,iBPksCH,QAAA,MO/rCG,UAAA,INwsCF,YAAa,WACb,MAAO,KMhsCT,yBP2rCC,yBO3rCD,wBAEE,QAAA,cAEA,oBACA,sBACA,cAAA,KP6rCD,aAAA,EOvrCG,WAAA,MNgsCF,aAAc,IAAI,MAAM,KACxB,YAAa,EMhsCX,kCNksCJ,kCMnsCe,iCACX,oCNmsCJ,oCDLC,mCCUC,QAAS,GMjsCX,iCNmsCA,iCMzsCM,gCAOJ,mCNmsCF,mCDLC,kCO7rCC,QAAA,cPksCD,QWv+CC,cAAe,KVg/Cf,WAAY,OACZ,YAAa,WU7+Cb,KXy+CD,IWr+CD,IACE,KACA,YAAA,MAAA,OAAA,SAAA,cAAA,UAEA,KACA,QAAA,IAAA,IXu+CD,UAAA,IWn+CC,MAAO,QACP,iBAAA,QACA,cAAA,IAEA,IACA,QAAA,IAAA,IACA,UAAA,IV4+CA,MU5+CA,KXq+CD,iBAAA,KW3+CC,cAAe,IASb,mBAAA,MAAA,EAAA,KAAA,EAAA,gBACA,WAAA,MAAA,EAAA,KAAA,EAAA,gBAEA,QV6+CF,QU7+CE,EXq+CH,UAAA,KWh+CC,YAAa,IACb,mBAAA,KACA,WAAA,KAEA,IACA,QAAA,MACA,QAAA,MACA,OAAA,EAAA,EAAA,KACA,UAAA,KACA,YAAA,WACA,MAAA,KACA,WAAA,UXk+CD,UAAA,WW7+CC,iBAAkB,QAehB,OAAA,IAAA,MAAA,KACA,cAAA,IAEA,SACA,QAAA,EACA,UAAA,QXi+CH,MAAA,QW59CC,YAAa,SACb,iBAAA,YACA,cAAA,EC1DF,gBCHE,WAAA,MACA,WAAA,OAEA,Wb8hDD,cAAA,KYxhDC,aAAA,KAqEA,aAAc,KAvEZ,YAAA,KZ+hDH,yBY1hDC,WAkEE,MAAO,OZ69CV,yBY5hDC,WA+DE,MAAO,OZk+CV,0BYzhDC,WCvBA,MAAA,QAGA,iBbmjDD,cAAA,KYthDC,aAAc,KCvBd,aAAA,KACA,YAAA,KCAE,KACE,aAAA,MAEA,YAAA,MAGA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UdgjDL,SAAA,SchiDG,WAAA,IACE,cAAA,KdkiDL,aAAA,Kc1hDG,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,Ud6hDH,MAAA,Kc7hDG,WdgiDH,MAAA,KchiDG,WdmiDH,MAAA,acniDG,WdsiDH,MAAA,actiDG,UdyiDH,MAAA,IcziDG,Ud4iDH,MAAA,ac5iDG,Ud+iDH,MAAA,ac/iDG,UdkjDH,MAAA,IcljDG,UdqjDH,MAAA,acrjDG,UdwjDH,MAAA,acxjDG,Ud2jDH,MAAA,Ic3jDG,Ud8jDH,MAAA,ac/iDG,UdkjDH,MAAA,YcljDG,gBdqjDH,MAAA,KcrjDG,gBdwjDH,MAAA,acxjDG,gBd2jDH,MAAA,ac3jDG,ed8jDH,MAAA,Ic9jDG,edikDH,MAAA,acjkDG,edokDH,MAAA,acpkDG,edukDH,MAAA,IcvkDG,ed0kDH,MAAA,ac1kDG,ed6kDH,MAAA,ac7kDG,edglDH,MAAA,IchlDG,edmlDH,MAAA,ac9kDG,edilDH,MAAA,YchmDG,edmmDH,MAAA,KcnmDG,gBdsmDH,KAAA,KctmDG,gBdymDH,KAAA,aczmDG,gBd4mDH,KAAA,ac5mDG,ed+mDH,KAAA,Ic/mDG,edknDH,KAAA,aclnDG,edqnDH,KAAA,acrnDG,edwnDH,KAAA,IcxnDG,ed2nDH,KAAA,ac3nDG,ed8nDH,KAAA,ac9nDG,edioDH,KAAA,IcjoDG,edooDH,KAAA,ac/nDG,edkoDH,KAAA,YcnnDG,edsnDH,KAAA,KctnDG,kBdynDH,YAAA,KcznDG,kBd4nDH,YAAA,ac5nDG,kBd+nDH,YAAA,ac/nDG,iBdkoDH,YAAA,IcloDG,iBdqoDH,YAAA,acroDG,iBdwoDH,YAAA,acxoDG,iBd2oDH,YAAA,Ic3oDG,iBd8oDH,YAAA,ac9oDG,iBdipDH,YAAA,acjpDG,iBdopDH,YAAA,IcppDG,iBdupDH,YAAA,acvpDG,iBd0pDH,YAAA,Yc5rDG,iBACE,YAAA,EAOJ,yBACE,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,Ud0rDD,MAAA,Kc1rDC,Wd6rDD,MAAA,Kc7rDC,WdgsDD,MAAA,achsDC,WdmsDD,MAAA,acnsDC,UdssDD,MAAA,IctsDC,UdysDD,MAAA,aczsDC,Ud4sDD,MAAA,ac5sDC,Ud+sDD,MAAA,Ic/sDC,UdktDD,MAAA,acltDC,UdqtDD,MAAA,acrtDC,UdwtDD,MAAA,IcxtDC,Ud2tDD,MAAA,ac5sDC,Ud+sDD,MAAA,Yc/sDC,gBdktDD,MAAA,KcltDC,gBdqtDD,MAAA,acrtDC,gBdwtDD,MAAA,acxtDC,ed2tDD,MAAA,Ic3tDC,ed8tDD,MAAA,ac9tDC,ediuDD,MAAA,acjuDC,edouDD,MAAA,IcpuDC,eduuDD,MAAA,acvuDC,ed0uDD,MAAA,ac1uDC,ed6uDD,MAAA,Ic7uDC,edgvDD,MAAA,ac3uDC,ed8uDD,MAAA,Yc7vDC,edgwDD,MAAA,KchwDC,gBdmwDD,KAAA,KcnwDC,gBdswDD,KAAA,actwDC,gBdywDD,KAAA,aczwDC,ed4wDD,KAAA,Ic5wDC,ed+wDD,KAAA,ac/wDC,edkxDD,KAAA,aclxDC,edqxDD,KAAA,IcrxDC,edwxDD,KAAA,acxxDC,ed2xDD,KAAA,ac3xDC,ed8xDD,KAAA,Ic9xDC,ediyDD,KAAA,ac5xDC,ed+xDD,KAAA,YchxDC,edmxDD,KAAA,KcnxDC,kBdsxDD,YAAA,KctxDC,kBdyxDD,YAAA,aczxDC,kBd4xDD,YAAA,ac5xDC,iBd+xDD,YAAA,Ic/xDC,iBdkyDD,YAAA,aclyDC,iBdqyDD,YAAA,acryDC,iBdwyDD,YAAA,IcxyDC,iBd2yDD,YAAA,ac3yDC,iBd8yDD,YAAA,ac9yDC,iBdizDD,YAAA,IcjzDC,iBdozDD,YAAA,acpzDC,iBduzDD,YAAA,YY9yDD,iBE3CE,YAAA,GAQF,yBACE,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,Udw1DD,MAAA,Kcx1DC,Wd21DD,MAAA,Kc31DC,Wd81DD,MAAA,ac91DC,Wdi2DD,MAAA,acj2DC,Udo2DD,MAAA,Icp2DC,Udu2DD,MAAA,acv2DC,Ud02DD,MAAA,ac12DC,Ud62DD,MAAA,Ic72DC,Udg3DD,MAAA,ach3DC,Udm3DD,MAAA,acn3DC,Uds3DD,MAAA,Ict3DC,Udy3DD,MAAA,ac12DC,Ud62DD,MAAA,Yc72DC,gBdg3DD,MAAA,Kch3DC,gBdm3DD,MAAA,acn3DC,gBds3DD,MAAA,act3DC,edy3DD,MAAA,Icz3DC,ed43DD,MAAA,ac53DC,ed+3DD,MAAA,ac/3DC,edk4DD,MAAA,Icl4DC,edq4DD,MAAA,acr4DC,edw4DD,MAAA,acx4DC,ed24DD,MAAA,Ic34DC,ed84DD,MAAA,acz4DC,ed44DD,MAAA,Yc35DC,ed85DD,MAAA,Kc95DC,gBdi6DD,KAAA,Kcj6DC,gBdo6DD,KAAA,acp6DC,gBdu6DD,KAAA,acv6DC,ed06DD,KAAA,Ic16DC,ed66DD,KAAA,ac76DC,edg7DD,KAAA,ach7DC,edm7DD,KAAA,Icn7DC,eds7DD,KAAA,act7DC,edy7DD,KAAA,acz7DC,ed47DD,KAAA,Ic57DC,ed+7DD,KAAA,ac17DC,ed67DD,KAAA,Yc96DC,edi7DD,KAAA,Kcj7DC,kBdo7DD,YAAA,Kcp7DC,kBdu7DD,YAAA,acv7DC,kBd07DD,YAAA,ac17DC,iBd67DD,YAAA,Ic77DC,iBdg8DD,YAAA,ach8DC,iBdm8DD,YAAA,acn8DC,iBds8DD,YAAA,Ict8DC,iBdy8DD,YAAA,acz8DC,iBd48DD,YAAA,ac58DC,iBd+8DD,YAAA,Ic/8DC,iBdk9DD,YAAA,acl9DC,iBdq9DD,YAAA,YYz8DD,iBE9CE,YAAA,GAQF,0BACE,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,Uds/DD,MAAA,Kct/DC,Wdy/DD,MAAA,Kcz/DC,Wd4/DD,MAAA,ac5/DC,Wd+/DD,MAAA,ac//DC,UdkgED,MAAA,IclgEC,UdqgED,MAAA,acrgEC,UdwgED,MAAA,acxgEC,Ud2gED,MAAA,Ic3gEC,Ud8gED,MAAA,ac9gEC,UdihED,MAAA,acjhEC,UdohED,MAAA,IcphEC,UduhED,MAAA,acxgEC,Ud2gED,MAAA,Yc3gEC,gBd8gED,MAAA,Kc9gEC,gBdihED,MAAA,acjhEC,gBdohED,MAAA,acphEC,eduhED,MAAA,IcvhEC,ed0hED,MAAA,ac1hEC,ed6hED,MAAA,ac7hEC,edgiED,MAAA,IchiEC,edmiED,MAAA,acniEC,edsiED,MAAA,actiEC,edyiED,MAAA,IcziEC,ed4iED,MAAA,acviEC,ed0iED,MAAA,YczjEC,ed4jED,MAAA,Kc5jEC,gBd+jED,KAAA,Kc/jEC,gBdkkED,KAAA,aclkEC,gBdqkED,KAAA,acrkEC,edwkED,KAAA,IcxkEC,ed2kED,KAAA,ac3kEC,ed8kED,KAAA,ac9kEC,edilED,KAAA,IcjlEC,edolED,KAAA,acplEC,edulED,KAAA,acvlEC,ed0lED,KAAA,Ic1lEC,ed6lED,KAAA,acxlEC,ed2lED,KAAA,Yc5kEC,ed+kED,KAAA,Kc/kEC,kBdklED,YAAA,KcllEC,kBdqlED,YAAA,acrlEC,kBdwlED,YAAA,acxlEC,iBd2lED,YAAA,Ic3lEC,iBd8lED,YAAA,ac9lEC,iBdimED,YAAA,acjmEC,iBdomED,YAAA,IcpmEC,iBdumED,YAAA,acvmEC,iBd0mED,YAAA,ac1mEC,iBd6mED,YAAA,Ic7mEC,iBdgnED,YAAA,achnEC,iBdmnED,YAAA,YetrED,iBACA,YAAA,GAGA,MACA,iBAAA,YAEA,QfyrED,YAAA,IevrEC,eAAgB,IAChB,MAAA,KfyrED,WAAA,KelrEC,GACA,WAAA,KfsrED,OexrEC,MAAO,KdmsEP,UAAW,KACX,cAAe,KcvrET,mBd0rER,mBczrEQ,mBAHA,mBACA,mBd0rER,mBDHC,QAAA,IensEC,YAAa,WAoBX,eAAA,IACA,WAAA,IAAA,MAAA,KArBJ,mBdktEE,eAAgB,OAChB,cAAe,IAAI,MAAM,KDJ1B,uCCMD,uCcrtEA,wCdstEA,wCclrEI,2CANI,2CforEP,WAAA,EezqEG,mBf4qEH,WAAA,IAAA,MAAA,KCWD,cACE,iBAAkB,Kc/pEpB,6BdkqEA,6BcjqEE,6BAZM,6BfsqEP,6BCMD,6BDHC,QAAA,ICWD,gBACE,OAAQ,IAAI,MAAM,Kc1qEpB,4Bd6qEA,4Bc7qEA,4BAQQ,4Bf8pEP,4BCMD,4Bc7pEM,OAAA,IAAA,MAAA,KAYF,4BAFJ,4BfopEC,oBAAA,IevoEG,yCf0oEH,iBAAA,QehoEC,4BACA,iBAAA,QfooED,uBe9nEG,SAAA,OdyoEF,QAAS,acxoEL,MAAA,KAEA,sBfioEL,sBgB7wEC,SAAA,OfwxEA,QAAS,WACT,MAAO,KAST,0BerxEE,0Bf+wEF,0BAGA,0BexxEM,0BAMJ,0BfgxEF,0BAGA,0BACA,0BDNC,0BCAD,0BAGA,0BASE,iBAAkB,QDLnB,sCgBlyEC,sCAAA,oCfyyEF,sCetxEM,sCf2xEJ,iBAAkB,QASpB,2Be1yEE,2BfoyEF,2BAGA,2Be7yEM,2BAMJ,2BfqyEF,2BAGA,2BACA,2BDNC,2BCAD,2BAGA,2BASE,iBAAkB,QDLnB,uCgBvzEC,uCAAA,qCf8zEF,uCe3yEM,uCfgzEJ,iBAAkB,QASpB,wBe/zEE,wBfyzEF,wBAGA,wBel0EM,wBAMJ,wBf0zEF,wBAGA,wBACA,wBDNC,wBCAD,wBAGA,wBASE,iBAAkB,QDLnB,oCgB50EC,oCAAA,kCfm1EF,oCeh0EM,oCfq0EJ,iBAAkB,QASpB,2Bep1EE,2Bf80EF,2BAGA,2Bev1EM,2BAMJ,2Bf+0EF,2BAGA,2BACA,2BDNC,2BCAD,2BAGA,2BASE,iBAAkB,QDLnB,uCgBj2EC,uCAAA,qCfw2EF,uCer1EM,uCf01EJ,iBAAkB,QASpB,0Bez2EE,0Bfm2EF,0BAGA,0Be52EM,0BAMJ,0Bfo2EF,0BAGA,0BACA,0BDNC,0BCAD,0BAGA,0BASE,iBAAkB,QDLnB,sCehtEC,sCADF,oCdwtEA,sCe12EM,sCDoJJ,iBAAA,QA6DF,kBACE,WAAY,KA3DV,WAAA,KAEA,oCACA,kBACA,MAAA,KfotED,cAAA,Ke7pEC,WAAY,OAnDV,mBAAA,yBfmtEH,OAAA,IAAA,MAAA,KCWD,yBACE,cAAe,Ec5qEjB,qCd+qEA,qCcjtEI,qCARM,qCfktET,qCCMD,qCDHC,YAAA,OCWD,kCACE,OAAQ,EcvrEV,0Dd0rEA,0Dc1rEA,0DAzBU,0Df4sET,0DCMD,0DAME,YAAa,Ec/rEf,yDdksEA,yDclsEA,yDArBU,yDfgtET,yDCMD,yDAME,aAAc,EDLjB,yDe1sEW,yDEzNV,yDjBk6EC,yDiBj6ED,cAAA,GAMA,SjBk6ED,UAAA,EiB/5EC,QAAS,EACT,OAAA,EACA,OAAA,EAEA,OACA,QAAA,MACA,MAAA,KACA,QAAA,EACA,cAAA,KACA,UAAA,KjBi6ED,YAAA,QiB95EC,MAAO,KACP,OAAA,EACA,cAAA,IAAA,MAAA,QAEA,MjBg6ED,QAAA,aiBr5EC,UAAW,Kb4BX,cAAA,IACG,YAAA,IJ63EJ,mBiBr5EC,mBAAoB,WhBg6EjB,gBAAiB,WgB95EpB,WAAA,WjBy5ED,qBiBv5EC,kBAGA,OAAQ,IAAI,EAAE,EACd,WAAA,MjBs5ED,YAAA,OiBj5EC,iBACA,QAAA,MAIF,kBhB25EE,QAAS,MgBz5ET,MAAA,KAIF,iBAAA,ahB05EE,OAAQ,KI99ER,uBY2EF,2BjB64EC,wBiB54EC,QAAA,IAAA,KAAA,yBACA,eAAA,KAEA,OACA,QAAA,MjB+4ED,YAAA,IiBr3EC,UAAW,KACX,YAAA,WACA,MAAA,KAEA,cACA,QAAA,MACA,MAAA,KACA,OAAA,KACA,QAAA,IAAA,KACA,UAAA,KACA,YAAA,WACA,MAAA,KbxDA,iBAAA,KACQ,iBAAA,KAyHR,OAAA,IAAA,MAAA,KACK,cAAA,IACG,mBAAA,MAAA,EAAA,IAAA,IAAA,iBJwzET,WAAA,MAAA,EAAA,IAAA,IAAA,iBkBh8EC,mBAAA,aAAA,YAAA,KAAA,mBAAA,YAAA,KACE,cAAA,aAAA,YAAA,KAAA,WAAA,YAAA,KACA,WAAA,aAAA,YAAA,KAAA,WAAA,YAAA,KdWM,oBJy7ET,aAAA,QIx5EC,QAAA,EACE,mBAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,qBACA,WAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,qBAEF,gCAA0B,MAAA,KJ25E3B,QAAA,EI15EiC,oCJ65EjC,MAAA,KiBh4EG,yCACA,MAAA,KAQF,0BhBs4EA,iBAAkB,YAClB,OAAQ,EgBn4EN,wBjB63EH,wBiB13EC,iChBq4EA,iBAAkB,KgBn4EhB,QAAA,EAIF,wBACE,iCjB03EH,OAAA,YiB72EC,sBjBg3ED,OAAA,KiB91EG,mBhB02EF,mBAAoB,KAEtB,qDgB32EM,8BjBo2EH,8BiBj2EC,wCAAA,+BhB62EA,YAAa,KgB32EX,iCjBy2EH,iCiBt2EC,2CAAA,kChB02EF,0BACA,0BACA,oCACA,2BAKE,YAAa,KgBh3EX,iCjB82EH,iCACF,2CiBp2EC,kChBu2EA,0BACA,0BACA,oCACA,2BgBz2EA,YAAA,MhBi3EF,YgBv2EE,cAAA,KAGA,UADA,OjBi2ED,SAAA,SiBr2EC,QAAS,MhBg3ET,WAAY,KgBx2EV,cAAA,KAGA,gBADA,aAEA,WAAA,KjBi2EH,aAAA,KiB91EC,cAAe,EhBy2Ef,YAAa,IACb,OAAQ,QgBp2ER,+BjBg2ED,sCiBl2EC,yBACA,gCAIA,SAAU,ShBw2EV,WAAY,MgBt2EZ,YAAA,MAIF,oBAAA,cAEE,WAAA,KAGA,iBADA,cAEA,SAAA,SACA,QAAA,aACA,aAAA,KjB61ED,cAAA,EiB31EC,YAAa,IhBs2Eb,eAAgB,OgBp2EhB,OAAA,QAUA,kCjBo1ED,4BCWC,WAAY,EACZ,YAAa,KgBv1Eb,wCAAA,qCjBm1ED,8BCOD,+BgBh2EI,2BhB+1EJ,4BAME,OAAQ,YDNT,0BiBv1EG,uBAMF,oCAAA,iChB61EA,OAAQ,YDNT,yBiBp1EK,sBAaJ,mCAFF,gCAGE,OAAA,YAGA,qBjBy0ED,WAAA,KiBv0EC,YAAA,IhBk1EA,eAAgB,IgBh1Ed,cAAA,EjB00EH,8BiB5zED,8BCnQE,cAAA,EACA,aAAA,EAEA,UACA,OAAA,KlBkkFD,QAAA,IAAA,KkBhkFC,UAAA,KACE,YAAA,IACA,cAAA,IAGF,gBjB0kFA,OAAQ,KiBxkFN,YAAA,KD2PA,0BAFJ,kBAGI,OAAA,KAEA,6BACA,OAAA,KjBy0EH,QAAA,IAAA,KiB/0EC,UAAW,KAST,YAAA,IACA,cAAA,IAVJ,mChB81EE,OAAQ,KgBh1EN,YAAA,KAGA,6CAjBJ,qCAkBI,OAAA,KAEA,oCACA,OAAA,KjBy0EH,WAAA,KiBr0EC,QAAS,IAAI,KC/Rb,UAAA,KACA,YAAA,IAEA,UACA,OAAA,KlBumFD,QAAA,KAAA,KkBrmFC,UAAA,KACE,YAAA,UACA,cAAA,IAGF,gBjB+mFA,OAAQ,KiB7mFN,YAAA,KDuRA,0BAFJ,kBAGI,OAAA,KAEA,6BACA,OAAA,KjBk1EH,QAAA,KAAA,KiBx1EC,UAAW,KAST,YAAA,UACA,cAAA,IAVJ,mChBu2EE,OAAQ,KgBz1EN,YAAA,KAGA,6CAjBJ,qCAkBI,OAAA,KAEA,oCACA,OAAA,KjBk1EH,WAAA,KiBz0EC,QAAS,KAAK,KAEd,UAAA,KjB00ED,YAAA,UiBt0EG,cjBy0EH,SAAA,SiBp0EC,4BACA,cAAA,OAEA,uBACA,SAAA,SACA,IAAA,EACA,MAAA,EACA,QAAA,EACA,QAAA,MACA,MAAA,KjBu0ED,OAAA,KiBr0EC,YAAa,KhBg1Eb,WAAY,OACZ,eAAgB,KDLjB,oDiBv0EC,uCADA,iCAGA,MAAO,KhBg1EP,OAAQ,KACR,YAAa,KDLd,oDiBv0EC,uCADA,iCAKA,MAAO,KhB80EP,OAAQ,KACR,YAAa,KAKf,uBAEA,8BAJA,4BADA,yBAEA,oBAEA,2BDNC,4BkBruFG,mCAJA,yBD0ZJ,gCbvWE,MAAA,QJ2rFD,2BkBxuFG,aAAA,QACE,mBAAA,MAAA,EAAA,IAAA,IAAA,iBd4CJ,WAAA,MAAA,EAAA,IAAA,IAAA,iBJgsFD,iCiBz1EC,aAAc,QC5YZ,mBAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,QACA,WAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,QlByuFH,gCiB91EC,MAAO,QCtYL,iBAAA,QlBuuFH,aAAA,QCWD,oCACE,MAAO,QAKT,uBAEA,8BAJA,4BADA,yBAEA,oBAEA,2BDNC,4BkBnwFG,mCAJA,yBD6ZJ,gCb1WE,MAAA,QJytFD,2BkBtwFG,aAAA,QACE,mBAAA,MAAA,EAAA,IAAA,IAAA,iBd4CJ,WAAA,MAAA,EAAA,IAAA,IAAA,iBJ8tFD,iCiBp3EC,aAAc,QC/YZ,mBAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,QACA,WAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,QlBuwFH,gCiBz3EC,MAAO,QCzYL,iBAAA,QlBqwFH,aAAA,QCWD,oCACE,MAAO,QAKT,qBAEA,4BAJA,0BADA,uBAEA,kBAEA,yBDNC,0BkBjyFG,iCAJA,uBDgaJ,8Bb7WE,MAAA,QJuvFD,yBkBpyFG,aAAA,QACE,mBAAA,MAAA,EAAA,IAAA,IAAA,iBd4CJ,WAAA,MAAA,EAAA,IAAA,IAAA,iBJ4vFD,+BiB/4EC,aAAc,QClZZ,mBAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,QACA,WAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,QlBqyFH,8BiBp5EC,MAAO,QC5YL,iBAAA,QlBmyFH,aAAA,QiB/4EG,kCjBk5EH,MAAA,QiB/4EG,2CjBk5EH,IAAA,KiBv4EC,mDACA,IAAA,EAEA,YjB04ED,QAAA,MiBvzEC,WAAY,IAwEZ,cAAe,KAtIX,MAAA,QAEA,yBjBy3EH,yBiBrvEC,QAAS,aA/HP,cAAA,EACA,eAAA,OjBw3EH,2BiB1vEC,QAAS,aAxHP,MAAA,KjBq3EH,eAAA,OiBj3EG,kCACA,QAAA,aAmHJ,0BhB4wEE,QAAS,aACT,eAAgB,OgBr3Ed,wCjB82EH,6CiBtwED,2CjBywEC,MAAA,KiB72EG,wCACA,MAAA,KAmGJ,4BhBwxEE,cAAe,EgBp3Eb,eAAA,OAGA,uBADA,oBjB82EH,QAAA,aiBpxEC,WAAY,EhB+xEZ,cAAe,EgBr3EX,eAAA,OAsFN,6BAAA,0BAjFI,aAAA,EAiFJ,4CjB6xEC,sCiBx2EG,SAAA,SjB22EH,YAAA,EiBh2ED,kDhB42EE,IAAK,GgBl2EL,2BjB+1EH,kCiBh2EG,wBAEA,+BAXF,YAAa,IhBo3Eb,WAAY,EgBn2EV,cAAA,EJviBF,2BIshBF,wBJrhBE,WAAA,KI4jBA,6BAyBA,aAAc,MAnCV,YAAA,MAEA,yBjBw1EH,gCACF,YAAA,IiBx3EG,cAAe,EAwCf,WAAA,OAwBJ,sDAdQ,MAAA,KjB80EL,yBACF,+CiBn0EC,YAAA,KAEE,UAAW,MjBs0EZ,yBACF,+CmBp6FG,YAAa,IACf,UAAA,MAGA,KACA,QAAA,aACA,QAAA,IAAA,KAAA,cAAA,EACA,UAAA,KACA,YAAA,IACA,YAAA,WACA,WAAA,OC0CA,YAAA,OACA,eAAA,OACA,iBAAA,aACA,aAAA,ahB+JA,OAAA,QACG,oBAAA,KACC,iBAAA,KACI,gBAAA,KJ+tFT,YAAA,KmBv6FG,iBAAA,KlBm7FF,OAAQ,IAAI,MAAM,YAClB,cAAe,IkB96Ff,kBdzBA,kBACA,WLk8FD,kBCOD,kBADA,WAME,QAAS,IAAI,KAAK,yBAClB,eAAgB,KkBh7FhB,WnBy6FD,WmB56FG,WlBw7FF,MAAO,KkBn7FL,gBAAA,Kf6BM,YADR,YJk5FD,iBAAA,KmBz6FC,QAAA,ElBq7FA,mBAAoB,MAAM,EAAE,IAAI,IAAI,iBAC5B,WAAY,MAAM,EAAE,IAAI,IAAI,iBoBh+FpC,cAGA,ejB8DA,wBACQ,OAAA,YJ05FT,OAAA,kBmBz6FG,mBAAA,KlBq7FM,WAAY,KkBn7FhB,QAAA,IASN,eC3DE,yBACA,eAAA,KpBi+FD,aoB99FC,MAAA,KnB0+FA,iBAAkB,KmBx+FhB,aAAA,KpBk+FH,mBoBh+FO,mBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpBi+FH,mBoB99FC,MAAA,KnB0+FA,iBAAkB,QAClB,aAAc,QmBt+FR,oBADJ,oBpBi+FH,mCoB99FG,MAAA,KnB0+FF,iBAAkB,QAClB,aAAc,QmBt+FN,0BnB4+FV,0BAHA,0BmB1+FM,0BnB4+FN,0BAHA,0BDFC,yCoBx+FK,yCnB4+FN,yCmBv+FE,MAAA,KnB++FA,iBAAkB,QAClB,aAAc,QmBx+FZ,oBpBg+FH,oBoBh+FG,mCnB6+FF,iBAAkB,KmBz+FV,4BnB8+FV,4BAHA,4BDHC,6BCOD,6BAHA,6BkB39FA,sCClBM,sCnB8+FN,sCmBx+FI,iBAAA,KACA,aAAA,KDcJ,oBC9DE,MAAA,KACA,iBAAA,KpB0hGD,aoBvhGC,MAAA,KnBmiGA,iBAAkB,QmBjiGhB,aAAA,QpB2hGH,mBoBzhGO,mBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpB0hGH,mBoBvhGC,MAAA,KnBmiGA,iBAAkB,QAClB,aAAc,QmB/hGR,oBADJ,oBpB0hGH,mCoBvhGG,MAAA,KnBmiGF,iBAAkB,QAClB,aAAc,QmB/hGN,0BnBqiGV,0BAHA,0BmBniGM,0BnBqiGN,0BAHA,0BDFC,yCoBjiGK,yCnBqiGN,yCmBhiGE,MAAA,KnBwiGA,iBAAkB,QAClB,aAAc,QmBjiGZ,oBpByhGH,oBoBzhGG,mCnBsiGF,iBAAkB,KmBliGV,4BnBuiGV,4BAHA,4BDHC,6BCOD,6BAHA,6BkBjhGA,sCCrBM,sCnBuiGN,sCmBjiGI,iBAAA,QACA,aAAA,QDkBJ,oBClEE,MAAA,QACA,iBAAA,KpBmlGD,aoBhlGC,MAAA,KnB4lGA,iBAAkB,QmB1lGhB,aAAA,QpBolGH,mBoBllGO,mBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpBmlGH,mBoBhlGC,MAAA,KnB4lGA,iBAAkB,QAClB,aAAc,QmBxlGR,oBADJ,oBpBmlGH,mCoBhlGG,MAAA,KnB4lGF,iBAAkB,QAClB,aAAc,QmBxlGN,0BnB8lGV,0BAHA,0BmB5lGM,0BnB8lGN,0BAHA,0BDFC,yCoB1lGK,yCnB8lGN,yCmBzlGE,MAAA,KnBimGA,iBAAkB,QAClB,aAAc,QmB1lGZ,oBpBklGH,oBoBllGG,mCnB+lGF,iBAAkB,KmB3lGV,4BnBgmGV,4BAHA,4BDHC,6BCOD,6BAHA,6BkBtkGA,sCCzBM,sCnBgmGN,sCmB1lGI,iBAAA,QACA,aAAA,QDsBJ,oBCtEE,MAAA,QACA,iBAAA,KpB4oGD,UoBzoGC,MAAA,KnBqpGA,iBAAkB,QmBnpGhB,aAAA,QpB6oGH,gBoB3oGO,gBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpB4oGH,gBoBzoGC,MAAA,KnBqpGA,iBAAkB,QAClB,aAAc,QmBjpGR,iBADJ,iBpB4oGH,gCoBzoGG,MAAA,KnBqpGF,iBAAkB,QAClB,aAAc,QmBjpGN,uBnBupGV,uBAHA,uBmBrpGM,uBnBupGN,uBAHA,uBDFC,sCoBnpGK,sCnBupGN,sCmBlpGE,MAAA,KnB0pGA,iBAAkB,QAClB,aAAc,QmBnpGZ,iBpB2oGH,iBoB3oGG,gCnBwpGF,iBAAkB,KmBppGV,yBnBypGV,yBAHA,yBDHC,0BCOD,0BAHA,0BkB3nGA,mCC7BM,mCnBypGN,mCmBnpGI,iBAAA,QACA,aAAA,QD0BJ,iBC1EE,MAAA,QACA,iBAAA,KpBqsGD,aoBlsGC,MAAA,KnB8sGA,iBAAkB,QmB5sGhB,aAAA,QpBssGH,mBoBpsGO,mBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpBqsGH,mBoBlsGC,MAAA,KnB8sGA,iBAAkB,QAClB,aAAc,QmB1sGR,oBADJ,oBpBqsGH,mCoBlsGG,MAAA,KnB8sGF,iBAAkB,QAClB,aAAc,QmB1sGN,0BnBgtGV,0BAHA,0BmB9sGM,0BnBgtGN,0BAHA,0BDFC,yCoB5sGK,yCnBgtGN,yCmB3sGE,MAAA,KnBmtGA,iBAAkB,QAClB,aAAc,QmB5sGZ,oBpBosGH,oBoBpsGG,mCnBitGF,iBAAkB,KmB7sGV,4BnBktGV,4BAHA,4BDHC,6BCOD,6BAHA,6BkBhrGA,sCCjCM,sCnBktGN,sCmB5sGI,iBAAA,QACA,aAAA,QD8BJ,oBC9EE,MAAA,QACA,iBAAA,KpB8vGD,YoB3vGC,MAAA,KnBuwGA,iBAAkB,QmBrwGhB,aAAA,QpB+vGH,kBoB7vGO,kBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpB8vGH,kBoB3vGC,MAAA,KnBuwGA,iBAAkB,QAClB,aAAc,QmBnwGR,mBADJ,mBpB8vGH,kCoB3vGG,MAAA,KnBuwGF,iBAAkB,QAClB,aAAc,QmBnwGN,yBnBywGV,yBAHA,yBmBvwGM,yBnBywGN,yBAHA,yBDFC,wCoBrwGK,wCnBywGN,wCmBpwGE,MAAA,KnB4wGA,iBAAkB,QAClB,aAAc,QmBrwGZ,mBpB6vGH,mBoB7vGG,kCnB0wGF,iBAAkB,KmBtwGV,2BnB2wGV,2BAHA,2BDHC,4BCOD,4BAHA,4BkBruGA,qCCrCM,qCnB2wGN,qCmBrwGI,iBAAA,QACA,aAAA,QDuCJ,mBACE,MAAA,QACA,iBAAA,KnB+tGD,UmB5tGC,YAAA,IlBwuGA,MAAO,QACP,cAAe,EAEjB,UGzwGE,iBemCE,iBflCM,oBJkwGT,6BmB7tGC,iBAAA,YlByuGA,mBAAoB,KACZ,WAAY,KkBtuGlB,UAEF,iBAAA,gBnB6tGD,gBmB3tGG,aAAA,YnBiuGH,gBmB/tGG,gBAIA,MAAA,QlBuuGF,gBAAiB,UACjB,iBAAkB,YDNnB,0BmBhuGK,0BAUN,mCATM,mClB2uGJ,MAAO,KmB1yGP,gBAAA,KAGA,mBADA,QpBmyGD,QAAA,KAAA,KmBztGC,UAAW,KlBquGX,YAAa,UmBjzGb,cAAA,IAGA,mBADA,QpB0yGD,QAAA,IAAA,KmB5tGC,UAAW,KlBwuGX,YAAa,ImBxzGb,cAAA,IAGA,mBADA,QpBizGD,QAAA,IAAA,ImB3tGC,UAAW,KACX,YAAA,IACA,cAAA,IAIF,WACE,QAAA,MnB2tGD,MAAA,KCYD,sBACE,WAAY,IqBz3GZ,6BADF,4BtBk3GC,6BI7rGC,MAAA,KAEQ,MJisGT,QAAA,EsBr3GC,mBAAA,QAAA,KAAA,OACE,cAAA,QAAA,KAAA,OtBu3GH,WAAA,QAAA,KAAA,OsBl3GC,StBq3GD,QAAA,EsBn3Ga,UtBs3Gb,QAAA,KsBr3Ga,atBw3Gb,QAAA,MsBv3Ga,etB03Gb,QAAA,UsBt3GC,kBACA,QAAA,gBlBwKA,YACQ,SAAA,SAAA,OAAA,EAOR,SAAA,OACQ,mCAAA,KAAA,8BAAA,KAGR,2BAAA,KACQ,4BAAA,KAAA,uBAAA,KJ2sGT,oBAAA,KuBr5GC,4BAA6B,OAAQ,WACrC,uBAAA,OAAA,WACA,oBAAA,OAAA,WAEA,OACA,QAAA,aACA,MAAA,EACA,OAAA,EACA,YAAA,IACA,eAAA,OvBu5GD,WAAA,IAAA,OuBn5GC,WAAY,IAAI,QtBk6GhB,aAAc,IAAI,MAAM,YsBh6GxB,YAAA,IAAA,MAAA,YAKA,UADF,QvBo5GC,SAAA,SuB94GC,uBACA,QAAA,EAEA,eACA,SAAA,SACA,IAAA,KACA,KAAA,EACA,QAAA,KACA,QAAA,KACA,MAAA,KACA,UAAA,MACA,QAAA,IAAA,EACA,OAAA,IAAA,EAAA,EACA,UAAA,KACA,WAAA,KACA,WAAA,KnBsBA,iBAAA,KACQ,wBAAA,YmBrBR,gBAAA,YtB+5GA,OsB/5GA,IAAA,MAAA,KvBk5GD,OAAA,IAAA,MAAA,gBuB74GC,cAAA,IACE,mBAAA,EAAA,IAAA,KAAA,iBACA,WAAA,EAAA,IAAA,KAAA,iBAzBJ,0BCzBE,MAAA,EACA,KAAA,KAEA,wBxBo8GD,OAAA,IuB96GC,OAAQ,IAAI,EAmCV,SAAA,OACA,iBAAA,QAEA,oBACA,QAAA,MACA,QAAA,IAAA,KACA,MAAA,KvB84GH,YAAA,IuBx4GC,YAAA,WtBw5GA,MAAO,KsBt5GL,YAAA,OvB44GH,0BuB14GG,0BAMF,MAAA,QtBo5GA,gBAAiB,KACjB,iBAAkB,QsBj5GhB,yBAEA,+BADA,+BvBu4GH,MAAA,KuB73GC,gBAAA,KtB64GA,iBAAkB,QAClB,QAAS,EDZV,2BuB33GC,iCAAA,iCAEE,MAAA,KEzGF,iCF2GE,iCAEA,gBAAA,KvB63GH,OAAA,YuBx3GC,iBAAkB,YAGhB,iBAAA,KvBw3GH,OAAA,0DuBn3GG,qBvBs3GH,QAAA,MuB72GC,QACA,QAAA,EAQF,qBACE,MAAA,EACA,KAAA,KAIF,oBACE,MAAA,KACA,KAAA,EAEA,iBACA,QAAA,MACA,QAAA,IAAA,KvBw2GD,UAAA,KuBp2GC,YAAa,WACb,MAAA,KACA,YAAA,OAEA,mBACA,SAAA,MACA,IAAA,EvBs2GD,MAAA,EuBl2GC,OAAQ,EACR,KAAA,EACA,QAAA,IAQF,2BtB42GE,MAAO,EsBx2GL,KAAA,KAEA,eACA,sCvB41GH,QAAA,GuBn2GC,WAAY,EtBm3GZ,cAAe,IAAI,OsBx2GjB,cAAA,IAAA,QAEA,uBvB41GH,8CuBv0GC,IAAK,KAXL,OAAA,KApEA,cAAA,IvB25GC,yBuBv1GD,6BA1DA,MAAA,EACA,KAAA,KvBq5GD,kC0BpiHG,MAAO,KzBojHP,KAAM,GyBhjHR,W1BsiHD,oB0B1iHC,SAAU,SzB0jHV,QAAS,ayBpjHP,eAAA,OAGA,yB1BsiHH,gBCgBC,SAAU,SACV,MAAO,KyB7iHT,gC1BsiHC,gCCYD,+BAFA,+ByBhjHA,uBANM,uBzBujHN,sBAFA,sBAQE,QAAS,EyBljHP,qB1BuiHH,2B0BliHD,2BACE,iC1BoiHD,YAAA,KCgBD,aACE,YAAa,KDZd,kB0B1iHD,wBAAA,0BzB2jHE,MAAO,KDZR,kB0B/hHD,wBACE,0B1BiiHD,YAAA,I0B5hHC,yE1B+hHD,cAAA,E2BhlHC,4BACG,YAAA,EDsDL,mEzB6iHE,wBAAyB,E0B5lHzB,2BAAA,E3BilHD,6C0B5hHD,8CACE,uBAAA,E1B8hHD,0BAAA,E0B3hHC,sB1B8hHD,MAAA,KCgBD,8D0B/mHE,cAAA,E3BomHD,mE0B3hHD,oECjEE,wBAAA,EACG,2BAAA,EDqEL,oEzB0iHE,uBAAwB,EyBxiHxB,0BAAA,EAiBF,mCACE,iCACA,QAAA,EAEF,iCACE,cAAA,IACA,aAAA,IAKF,oCtB/CE,cAAA,KACQ,aAAA,KsBkDR,iCtBnDA,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBsByDV,0CACE,mBAAA,K1BugHD,WAAA,K0BngHC,YACA,YAAA,EAGF,eACE,aAAA,IAAA,IAAA,E1BqgHD,oBAAA,ECgBD,uBACE,aAAc,EAAE,IAAI,IyB1gHlB,yBACA,+BACA,oC1B+/GH,QAAA,M0BtgHC,MAAO,KAcH,MAAA,K1B2/GL,UAAA,KCgBD,oCACE,MAAO,KyBpgHL,8BACA,oC1By/GH,oC0Bp/GC,0CACE,WAAA,K1Bs/GH,YAAA,E2B/pHC,4DACC,cAAA,EAQA,sD3B4pHF,uBAAA,I0Bt/GC,wBAAA,IC/KA,2BAAA,EACC,0BAAA,EAQA,sD3BkqHF,uBAAA,E0Bv/GC,wBAAyB,EACzB,2BAAA,I1By/GD,0BAAA,ICgBD,uE0BtrHE,cAAA,E3B2qHD,4E0Bt/GD,6EC7LE,2BAAA,EACC,0BAAA,EDoMH,6EACE,uBAAA,EACA,wBAAA,EAEA,qB1Bo/GD,QAAA,M0Bx/GC,MAAO,KzBwgHP,aAAc,MyBjgHZ,gBAAA,SAEA,0B1Bq/GH,gC0B9/GC,QAAS,WAYP,MAAA,K1Bq/GH,MAAA,G0Bj/GG,qC1Bo/GH,MAAA,KCgBD,+CACE,KAAM,KyB7+GF,gDAFA,6C1Bs+GL,2D0Br+GK,wDEzOJ,SAAU,SACV,KAAA,cACA,eAAA,K5BitHD,a4B7sHC,SAAA,SACE,QAAA,MACA,gBAAA,S5BgtHH,0B4BxtHC,MAAO,KAeL,cAAA,EACA,aAAA,EAOA,2BACA,SAAA,S5BusHH,QAAA,E4BrsHG,MAAA,KACE,MAAA,K5BusHL,cAAA,ECgBD,iCACE,QAAS,EiBnrHT,8BACA,mCACA,sCACA,OAAA,KlBwqHD,QAAA,KAAA,KkBtqHC,UAAA,KjBsrHA,YAAa,UACb,cAAe,IiBrrHb,oClB0qHH,yCkBvqHC,4CjBurHA,OAAQ,KACR,YAAa,KDTd,8C4B/sHD,mDAAA,sD3B0tHA,sCACA,2CiBzrHI,8CjB8rHF,OAAQ,KiB1sHR,8BACA,mCACA,sCACA,OAAA,KlB+rHD,QAAA,IAAA,KkB7rHC,UAAA,KjB6sHA,YAAa,IACb,cAAe,IiB5sHb,oClBisHH,yCkB9rHC,4CjB8sHA,OAAQ,KACR,YAAa,KDTd,8C4B7tHD,mDAAA,sD3BwuHA,sCACA,2CiBhtHI,8CjBqtHF,OAAQ,K2BzuHR,2B5B6tHD,mB4B7tHC,iB3B8uHA,QAAS,W2BzuHX,8D5B6tHC,sD4B7tHD,oDAEE,cAAA,EAEA,mB5B+tHD,iB4B1tHC,MAAO,GACP,YAAA,OACA,eAAA,OAEA,mBACA,QAAA,IAAA,KACA,UAAA,KACA,YAAA,IACA,YAAA,EACA,MAAA,K5B4tHD,WAAA,O4BztHC,iBAAA,KACE,OAAA,IAAA,MAAA,KACA,cAAA,I5B4tHH,4B4BztHC,QAAA,IAAA,KACE,UAAA,KACA,cAAA,I5B4tHH,4B4B/uHC,QAAS,KAAK,K3B+vHd,UAAW,K2BruHT,cAAA,IAKJ,wCAAA,qC3BquHE,WAAY,EAEd,uCACA,+BACA,kC0B70HE,6CACG,8CC4GL,6D5BqtHC,wE4BptHC,wBAAA,E5ButHD,2BAAA,ECgBD,+BACE,aAAc,EAEhB,sCACA,8B2BhuHA,+D5BstHC,oDCWD,iC0Bl1HE,4CACG,6CCiHH,uBAAA,E5BwtHD,0BAAA,E4BltHC,8BAGA,YAAA,E5BotHD,iB4BxtHC,SAAU,SAUR,UAAA,E5BitHH,YAAA,O4B/sHK,sB5BktHL,SAAA,SCgBD,2BACE,YAAa,K2BxtHb,6BAAA,4B5B4sHD,4B4BzsHK,QAAA,EAGJ,kCAAA,wCAGI,aAAA,K5B4sHL,iC6B12HD,uCACE,QAAA,EACA,YAAA,K7B62HD,K6B/2HC,aAAc,EAOZ,cAAA,EACA,WAAA,KARJ,QAWM,SAAA,SACA,QAAA,M7B42HL,U6B12HK,SAAA,S5B03HJ,QAAS,M4Bx3HH,QAAA,KAAA,KAMJ,gB7Bu2HH,gB6Bt2HK,gBAAA,K7By2HL,iBAAA,KCgBD,mB4Br3HQ,MAAA,KAGA,yBADA,yB7B02HP,MAAA,K6Bl2HG,gBAAA,K5Bk3HF,OAAQ,YACR,iBAAkB,Y4B/2Hd,aAzCN,mB7B64HC,mBwBh5HC,iBAAA,KACA,aAAA,QAEA,kBxBm5HD,OAAA,I6Bn5HC,OAAQ,IAAI,EA0DV,SAAA,O7B41HH,iBAAA,Q6Bl1HC,c7Bq1HD,UAAA,K6Bn1HG,UAEA,cAAA,IAAA,MAAA,KALJ,aASM,MAAA,KACA,cAAA,KAEA,e7Bo1HL,aAAA,I6Bn1HK,YAAA,WACE,OAAA,IAAA,MAAA,Y7Bq1HP,cAAA,IAAA,IAAA,EAAA,ECgBD,qBACE,aAAc,KAAK,KAAK,K4B51HlB,sBAEA,4BADA,4BAEA,MAAA,K7Bi1HP,OAAA,Q6B50HC,iBAAA,KAqDA,OAAA,IAAA,MAAA,KA8BA,oBAAA,YAnFA,wBAwDE,MAAA,K7B2xHH,cAAA,E6BzxHK,2BACA,MAAA,KA3DJ,6BAgEE,cAAA,IACA,WAAA,OAYJ,iDA0DE,IAAK,KAjED,KAAA,K7B0xHH,yB6BztHD,2BA9DM,QAAA,W7B0xHL,MAAA,G6Bn2HD,6BAuFE,cAAA,GAvFF,6B5Bw3HA,aAAc,EACd,cAAe,IDZhB,kC6BtuHD,wCA3BA,wCATM,OAAA,IAAA,MAAA,K7B+wHH,yB6B3uHD,6B5B2vHE,cAAe,IAAI,MAAM,KACzB,cAAe,IAAI,IAAI,EAAE,EDZ1B,kC6B92HD,wC7B+2HD,wC6B72HG,oBAAA,MAIE,c7B+2HL,MAAA,K6B52HK,gB7B+2HL,cAAA,ICgBD,iBACE,YAAa,I4Bv3HP,uBAQR,6B7Bo2HC,6B6Bl2HG,MAAA,K7Bq2HH,iBAAA,Q6Bn2HK,gBACA,MAAA,KAYN,mBACE,WAAA,I7B41HD,YAAA,E6Bz1HG,e7B41HH,MAAA,K6B11HK,kBACA,MAAA,KAPN,oBAYI,cAAA,IACA,WAAA,OAYJ,wCA0DE,IAAK,KAjED,KAAA,K7B21HH,yB6B1xHD,kBA9DM,QAAA,W7B21HL,MAAA,G6Bl1HD,oBACA,cAAA,GAIE,oBACA,cAAA,EANJ,yB5B02HE,aAAc,EACd,cAAe,IDZhB,8B6B1yHD,oCA3BA,oCATM,OAAA,IAAA,MAAA,K7Bm1HH,yB6B/yHD,yB5B+zHE,cAAe,IAAI,MAAM,KACzB,cAAe,IAAI,IAAI,EAAE,EDZ1B,8B6Bx0HD,oC7By0HD,oC6Bv0HG,oBAAA,MAGA,uB7B00HH,QAAA,K6B/zHC,qBF3OA,QAAA,M3B+iID,yB8BxiIC,WAAY,KACZ,uBAAA,EACA,wBAAA,EAEA,Q9B0iID,SAAA,S8BliIC,WAAY,KA8nBZ,cAAe,KAhoBb,OAAA,IAAA,MAAA,Y9ByiIH,yB8BzhIC,QAgnBE,cAAe,K9B86GlB,yB8BjhIC,eACA,MAAA,MAGA,iBACA,cAAA,KAAA,aAAA,KAEA,WAAA,Q9BkhID,2BAAA,M8BhhIC,WAAA,IAAA,MAAA,YACE,mBAAA,MAAA,EAAA,IAAA,EAAA,qB9BkhIH,WAAA,MAAA,EAAA,IAAA,EAAA,qB8Bz7GD,oBArlBI,WAAA,KAEA,yBAAA,iB9BkhID,MAAA,K8BhhIC,WAAA,EACE,mBAAA,KACA,WAAA,KAEA,0B9BkhIH,QAAA,gB8B/gIC,OAAA,eACE,eAAA,E9BihIH,SAAA,kBCkBD,oBACE,WAAY,QDZf,sC8B/gIK,mC9B8gIH,oC8BzgIC,cAAe,E7B4hIf,aAAc,G6Bj+GlB,sCAnjBE,mC7ByhIA,WAAY,MDdX,4D8BngID,sC9BogID,mCCkBG,WAAY,O6B3gId,kCANE,gC9BsgIH,4B8BvgIG,0BAuiBF,aAAc,M7Bm/Gd,YAAa,MAEf,yBDZC,kC8B3gIK,gC9B0gIH,4B8B3gIG,0BAcF,aAAc,EAChB,YAAA,GAMF,mBA8gBE,QAAS,KAhhBP,aAAA,EAAA,EAAA,I9BkgIH,yB8B7/HC,mB7B+gIE,cAAe,G6B1gIjB,qBADA,kB9BggID,SAAA,M8Bz/HC,MAAO,EAggBP,KAAM,E7B4gHN,QAAS,KDdR,yB8B7/HD,qB9B8/HD,kB8B7/HC,cAAA,GAGF,kBACE,IAAA,EACA,aAAA,EAAA,EAAA,I9BigID,qB8B1/HC,OAAQ,EACR,cAAA,EACA,aAAA,IAAA,EAAA,EAEA,cACA,MAAA,K9B4/HD,OAAA,K8B1/HC,QAAA,KAAA,K7B4gIA,UAAW,K6B1gIT,YAAA,KAIA,oBAbJ,oB9BwgIC,gBAAA,K8Bv/HG,kB7B0gIF,QAAS,MDdR,yBACF,iC8Bh/HC,uCACA,YAAA,OAGA,eC9LA,SAAA,SACA,MAAA,MD+LA,QAAA,IAAA,KACA,WAAA,IACA,aAAA,KACA,cAAA,I9Bm/HD,iBAAA,Y8B/+HC,iBAAA,KACE,OAAA,IAAA,MAAA,Y9Bi/HH,cAAA,I8B5+HG,qBACA,QAAA,EAEA,yB9B++HH,QAAA,M8BrgIC,MAAO,KAyBL,OAAA,I9B++HH,cAAA,I8BpjHD,mCAvbI,WAAA,I9Bg/HH,yB8Bt+HC,eACA,QAAA,MAGE,YACA,OAAA,MAAA,M9By+HH,iB8B58HC,YAAA,KA2YA,eAAgB,KAjaZ,YAAA,KAEA,yBACA,iCACA,SAAA,OACA,MAAA,KACA,MAAA,KAAA,WAAA,E9Bs+HH,iBAAA,Y8B3kHC,OAAQ,E7B8lHR,mBAAoB,K6Bt/HhB,WAAA,KAGA,kDAqZN,sC9BklHC,QAAA,IAAA,KAAA,IAAA,KCmBD,sC6Bv/HQ,YAAA,KAmBR,4C9Bs9HD,4C8BvlHG,iBAAkB,M9B4lHnB,yB8B5lHD,YAtYI,MAAA,K9Bq+HH,OAAA,E8Bn+HK,eACA,MAAA,K9Bu+HP,iB8B39HG,YAAa,KACf,eAAA,MAGA,aACA,QAAA,KAAA,K1B9NA,WAAA,IACQ,aAAA,M2B/DR,cAAA,IACA,YAAA,M/B4vID,WAAA,IAAA,MAAA,YiBtuHC,cAAe,IAAI,MAAM,YAwEzB,mBAAoB,MAAM,EAAE,IAAI,EAAE,qBAAyB,EAAE,IAAI,EAAE,qBAtI/D,WAAA,MAAA,EAAA,IAAA,EAAA,qBAAA,EAAA,IAAA,EAAA,qBAEA,yBjBwyHH,yBiBpqHC,QAAS,aA/HP,cAAA,EACA,eAAA,OjBuyHH,2BiBzqHC,QAAS,aAxHP,MAAA,KjBoyHH,eAAA,OiBhyHG,kCACA,QAAA,aAmHJ,0BhBmsHE,QAAS,aACT,eAAgB,OgB5yHd,wCjB6xHH,6CiBrrHD,2CjBwrHC,MAAA,KiB5xHG,wCACA,MAAA,KAmGJ,4BhB+sHE,cAAe,EgB3yHb,eAAA,OAGA,uBADA,oBjB6xHH,QAAA,aiBnsHC,WAAY,EhBstHZ,cAAe,EgB5yHX,eAAA,OAsFN,6BAAA,0BAjFI,aAAA,EAiFJ,4CjB4sHC,sCiBvxHG,SAAA,SjB0xHH,YAAA,E8BngID,kDAmWE,IAAK,GAvWH,yBACE,yB9B8gIL,cAAA,I8B5/HD,oCAoVE,cAAe,GA1Vf,yBACA,aACA,MAAA,KACA,YAAA,E1BzPF,eAAA,EACQ,aAAA,EJmwIP,YAAA,EACF,OAAA,E8BngIG,mBAAoB,KACtB,WAAA,M9BugID,8B8BngIC,WAAY,EACZ,uBAAA,EHzUA,wBAAA,EAQA,mDACC,cAAA,E3By0IF,uBAAA,I8B//HC,wBAAyB,IChVzB,2BAAA,EACA,0BAAA,EDkVA,YCnVA,WAAA,IACA,cAAA,IDqVA,mBCtVA,WAAA,KACA,cAAA,KD+VF,mBChWE,WAAA,KACA,cAAA,KDuWF,aAsSE,WAAY,KA1SV,cAAA,KAEA,yB9B+/HD,aACF,MAAA,K8Bl+HG,aAAc,KAhBhB,YAAA,MACA,yBE5WA,aF8WE,MAAA,eAFF,cAKI,MAAA,gB9Bu/HH,aAAA,M8B7+HD,4BACA,aAAA,GADF,gBAKI,iBAAA,Q9Bg/HH,aAAA,QCmBD,8B6BhgIM,MAAA,KARN,oC9B0/HC,oC8B5+HG,MAAA,Q9B++HH,iBAAA,Y8B1+HK,6B9B6+HL,MAAA,KCmBD,iC6B5/HQ,MAAA,KAKF,uC9By+HL,uCCmBC,MAAO,KACP,iBAAkB,Y6Bz/HZ,sCAIF,4C9Bu+HL,4CCmBC,MAAO,KACP,iBAAkB,Q6Bv/HZ,wCAxCR,8C9BihIC,8C8Bn+HG,MAAA,K9Bs+HH,iBAAA,YCmBD,+B6Bt/HM,aAAA,KAGA,qCApDN,qC9B2hIC,iBAAA,KCmBD,yC6Bp/HI,iBAAA,KAOE,iCAAA,6B7Bk/HJ,aAAc,Q6B9+HR,oCAiCN,0C9B+7HD,0C8B3xHC,MAAO,KA7LC,iBAAA,QACA,yB7B8+HR,sD6B5+HU,MAAA,KAKF,4D9By9HP,4DCmBC,MAAO,KACP,iBAAkB,Y6Bz+HV,2DAIF,iE9Bu9HP,iECmBC,MAAO,KACP,iBAAkB,Q6Bv+HV,6D9B09HX,mEADE,mE8B1jIC,MAAO,KA8GP,iBAAA,aAEE,6B9Bi9HL,MAAA,K8B58HG,mC9B+8HH,MAAA,KCmBD,0B6B/9HM,MAAA,KAIA,gCAAA,gC7Bg+HJ,MAAO,K6Bt9HT,0CARQ,0CASN,mD9Bu8HD,mD8Bt8HC,MAAA,KAFF,gBAKI,iBAAA,K9B08HH,aAAA,QCmBD,8B6B19HM,MAAA,QARN,oC9Bo9HC,oC8Bt8HG,MAAA,K9By8HH,iBAAA,Y8Bp8HK,6B9Bu8HL,MAAA,QCmBD,iC6Bt9HQ,MAAA,QAKF,uC9Bm8HL,uCCmBC,MAAO,KACP,iBAAkB,Y6Bn9HZ,sCAIF,4C9Bi8HL,4CCmBC,MAAO,KACP,iBAAkB,Q6Bj9HZ,wCAxCR,8C9B2+HC,8C8B57HG,MAAA,K9B+7HH,iBAAA,YCmBD,+B6B/8HM,aAAA,KAGA,qCArDN,qC9Bq/HC,iBAAA,KCmBD,yC6B78HI,iBAAA,KAME,iCAAA,6B7B48HJ,aAAc,Q6Bx8HR,oCAuCN,0C9Bm5HD,0C8B33HC,MAAO,KAvDC,iBAAA,QAuDV,yBApDU,kE9Bs7HP,aAAA,Q8Bn7HO,0D9Bs7HP,iBAAA,QCmBD,sD6Bt8HU,MAAA,QAKF,4D9Bm7HP,4DCmBC,MAAO,KACP,iBAAkB,Y6Bn8HV,2DAIF,iE9Bi7HP,iECmBC,MAAO,KACP,iBAAkB,Q6Bj8HV,6D9Bo7HX,mEADE,mE8B1hIC,MAAO,KA+GP,iBAAA,aAEE,6B9Bg7HL,MAAA,Q8B36HG,mC9B86HH,MAAA,KCmBD,0B6B97HM,MAAA,QAIA,gCAAA,gC7B+7HJ,MAAO,KgCvkJT,0CH0oBQ,0CGzoBN,mDjCwjJD,mDiCvjJC,MAAA,KAEA,YACA,QAAA,IAAA,KjC2jJD,cAAA,KiChkJC,WAAY,KAQV,iBAAA,QjC2jJH,cAAA,IiCxjJK,eACA,QAAA,ajC4jJL,yBiCxkJC,QAAS,EAAE,IAkBT,MAAA,KjCyjJH,QAAA,SkC5kJC,oBACA,MAAA,KAEA,YlC+kJD,QAAA,akCnlJC,aAAc,EAOZ,OAAA,KAAA,ElC+kJH,cAAA,ICmBD,eiC/lJM,QAAA,OAEA,iBACA,oBACA,SAAA,SACA,MAAA,KACA,QAAA,IAAA,KACA,YAAA,KACA,YAAA,WlCglJL,MAAA,QkC9kJG,gBAAA,KjCimJF,iBAAkB,KiC9lJZ,OAAA,IAAA,MAAA,KPVH,6B3B2lJJ,gCkC7kJG,YAAA,EjCgmJF,uBAAwB,I0BvnJxB,0BAAA,I3BymJD,4BkCxkJG,+BjC2lJF,wBAAyB,IACzB,2BAA4B,IiCxlJxB,uBAFA,uBAGA,0BAFA,0BlC8kJL,QAAA,EkCtkJG,MAAA,QjCylJF,iBAAkB,KAClB,aAAc,KAEhB,sBiCvlJM,4BAFA,4BjC0lJN,yBiCvlJM,+BAFA,+BAGA,QAAA,ElC2kJL,MAAA,KkCloJC,OAAQ,QjCqpJR,iBAAkB,QAClB,aAAc,QiCnlJV,wBAEA,8BADA,8BjColJN,2BiCtlJM,iCjCulJN,iCDZC,MAAA,KkC/jJC,OAAQ,YjCklJR,iBAAkB,KkC7pJd,aAAA,KAEA,oBnC8oJL,uBmC5oJG,QAAA,KAAA,KlC+pJF,UAAW,K0B1pJX,YAAA,U3B4oJD,gCmC3oJG,mClC8pJF,uBAAwB,I0BvqJxB,0BAAA,I3BypJD,+BkC1kJD,kCjC6lJE,wBAAyB,IkC7qJrB,2BAAA,IAEA,oBnC8pJL,uBmC5pJG,QAAA,IAAA,KlC+qJF,UAAW,K0B1qJX,YAAA,I3B4pJD,gCmC3pJG,mClC8qJF,uBAAwB,I0BvrJxB,0BAAA,I3ByqJD,+BoC3qJD,kCACE,wBAAA,IACA,2BAAA,IAEA,OpC6qJD,aAAA,EoCjrJC,OAAQ,KAAK,EAOX,WAAA,OpC6qJH,WAAA,KCmBD,UmC7rJM,QAAA,OAEA,YACA,eACA,QAAA,apC8qJL,QAAA,IAAA,KoC5rJC,iBAAkB,KnC+sJlB,OAAQ,IAAI,MAAM,KmC5rJd,cAAA,KAnBN,kBpCisJC,kBCmBC,gBAAiB,KmCzrJb,iBAAA,KA3BN,eAAA,kBAkCM,MAAA,MAlCN,mBAAA,sBnC6tJE,MAAO,KmClrJH,mBAEA,yBADA,yBpCqqJL,sBqCltJC,MAAO,KACP,OAAA,YACA,iBAAA,KAEA,OACA,QAAA,OACA,QAAA,KAAA,KAAA,KACA,UAAA,IACA,YAAA,IACA,YAAA,EACA,MAAA,KrCotJD,WAAA,OqChtJG,YAAA,OpCmuJF,eAAgB,SoCjuJZ,cAAA,MrCotJL,cqCltJK,cAKJ,MAAA,KACE,gBAAA,KrC+sJH,OAAA,QqC1sJG,aACA,QAAA,KAOJ,YCtCE,SAAA,StC+uJD,IAAA,KCmBD,eqC7vJM,iBAAA,KALJ,2BD0CF,2BrC4sJC,iBAAA,QCmBD,eqCpwJM,iBAAA,QALJ,2BD8CF,2BrC+sJC,iBAAA,QCmBD,eqC3wJM,iBAAA,QALJ,2BDkDF,2BrCktJC,iBAAA,QCmBD,YqClxJM,iBAAA,QALJ,wBDsDF,wBrCqtJC,iBAAA,QCmBD,eqCzxJM,iBAAA,QALJ,2BD0DF,2BrCwtJC,iBAAA,QCmBD,cqChyJM,iBAAA,QCDJ,0BADF,0BAEE,iBAAA,QAEA,OACA,QAAA,aACA,UAAA,KACA,QAAA,IAAA,IACA,UAAA,KACA,YAAA,IACA,YAAA,EACA,MAAA,KACA,WAAA,OvCqxJD,YAAA,OuClxJC,eAAA,OACE,iBAAA,KvCoxJH,cAAA,KuC/wJG,aACA,QAAA,KAGF,YtCkyJA,SAAU,SsChyJR,IAAA,KAMA,0BvC4wJH,eCmBC,IAAK,EsC7xJD,QAAA,IAAA,IvCgxJL,cuC9wJK,cAKJ,MAAA,KtC4xJA,gBAAiB,KsC1xJf,OAAA,QvC4wJH,+BuCxwJC,4BACE,MAAA,QvC0wJH,iBAAA,KuCtwJG,wBvCywJH,MAAA,MuCrwJG,+BvCwwJH,aAAA,IwCj0JC,uBACA,YAAA,IAEA,WACA,YAAA,KxCo0JD,eAAA,KwCz0JC,cAAe,KvC41Jf,MAAO,QuCn1JL,iBAAA,KAIA,eAbJ,cAcI,MAAA,QxCo0JH,awCl1JC,cAAe,KAmBb,UAAA,KxCk0JH,YAAA,ICmBD,cuCh1JI,iBAAA,QAEA,sBxCi0JH,4BwC31JC,cAAe,KA8Bb,aAAA,KxCg0JH,cAAA,IwC7yJD,sBAfI,UAAA,KxCi0JD,oCwC9zJC,WvCi1JA,YAAa,KuC/0JX,eAAA,KxCi0JH,sBwCvzJD,4BvC00JE,cAAe,KuC90Jb,aAAA,KC5CJ,ezC42JD,cyC32JC,UAAA,MAGA,WACA,QAAA,MACA,QAAA,IACA,cAAA,KrCiLA,YAAA,WACK,iBAAA,KACG,OAAA,IAAA,MAAA,KJ8rJT,cAAA,IyCx3JC,mBAAoB,OAAO,IAAI,YxC24J1B,cAAe,OAAO,IAAI,YwC93J7B,WAAA,OAAA,IAAA,YAKF,iBzC22JD,eCmBC,aAAc,KACd,YAAa,KwCv3JX,mBA1BJ,kBzCk4JC,kByCv2JG,aAAA,QCzBJ,oBACE,QAAA,IACA,MAAA,KAEA,O1Cs4JD,QAAA,K0C14JC,cAAe,KAQb,OAAA,IAAA,MAAA,YAEA,cAAA,IAVJ,UAeI,WAAA,E1Ck4JH,MAAA,QCmBD,mByC/4JI,YAAA,IArBJ,SAyBI,U1C+3JH,cAAA,ECmBD,WyCx4JE,WAAA,IAFF,mBAAA,mBAMI,cAAA,KAEA,0BACA,0B1Cy3JH,SAAA,S0Cj3JC,IAAK,KCvDL,MAAA,MACA,MAAA,Q3C46JD,e0Ct3JC,MAAO,QClDL,iBAAA,Q3C26JH,aAAA,Q2Cx6JG,kB3C26JH,iBAAA,Q2Cn7JC,2BACA,MAAA,Q3Cu7JD,Y0C73JC,MAAO,QCtDL,iBAAA,Q3Cs7JH,aAAA,Q2Cn7JG,e3Cs7JH,iBAAA,Q2C97JC,wBACA,MAAA,Q3Ck8JD,e0Cp4JC,MAAO,QC1DL,iBAAA,Q3Ci8JH,aAAA,Q2C97JG,kB3Ci8JH,iBAAA,Q2Cz8JC,2BACA,MAAA,Q3C68JD,c0C34JC,MAAO,QC9DL,iBAAA,Q3C48JH,aAAA,Q2Cz8JG,iB3C48JH,iBAAA,Q4C78JC,0BAAQ,MAAA,QACR,wCAAQ,K5Cm9JP,oBAAA,KAAA,E4C/8JD,GACA,oBAAA,EAAA,GACA,mCAAQ,K5Cq9JP,oBAAA,KAAA,E4Cv9JD,GACA,oBAAA,EAAA,GACA,gCAAQ,K5Cq9JP,oBAAA,KAAA,E4C78JD,GACA,oBAAA,EAAA,GAGA,UACA,OAAA,KxCsCA,cAAA,KACQ,SAAA,OJ26JT,iBAAA,Q4C78JC,cAAe,IACf,mBAAA,MAAA,EAAA,IAAA,IAAA,eACA,WAAA,MAAA,EAAA,IAAA,IAAA,eAEA,cACA,MAAA,KACA,MAAA,EACA,OAAA,KACA,UAAA,KxCyBA,YAAA,KACQ,MAAA,KAyHR,WAAA,OACK,iBAAA,QACG,mBAAA,MAAA,EAAA,KAAA,EAAA,gBJ+zJT,WAAA,MAAA,EAAA,KAAA,EAAA,gB4C18JC,mBAAoB,MAAM,IAAI,K3Cq+JzB,cAAe,MAAM,IAAI,K4Cp+J5B,WAAA,MAAA,IAAA,KDEF,sBCAE,gCDAF,iBAAA,yK5C88JD,iBAAA,oK4Cv8JC,iBAAiB,iK3Cm+JjB,wBAAyB,KAAK,KG/gK9B,gBAAA,KAAA,KJy/JD,qBIv/JS,+BwCmDR,kBAAmB,qBAAqB,GAAG,OAAO,SErElD,aAAA,qBAAA,GAAA,OAAA,S9C4gKD,UAAA,qBAAA,GAAA,OAAA,S6Cz9JG,sBACA,iBAAA,Q7C69JH,wC4Cx8JC,iBAAkB,yKEzElB,iBAAA,oK9CohKD,iBAAA,iK6Cj+JG,mBACA,iBAAA,Q7Cq+JH,qC4C58JC,iBAAkB,yKE7ElB,iBAAA,oK9C4hKD,iBAAA,iK6Cz+JG,sBACA,iBAAA,Q7C6+JH,wC4Ch9JC,iBAAkB,yKEjFlB,iBAAA,oK9CoiKD,iBAAA,iK6Cj/JG,qBACA,iBAAA,Q7Cq/JH,uC+C5iKC,iBAAkB,yKAElB,iBAAA,oK/C6iKD,iBAAA,iK+C1iKG,O/C6iKH,WAAA,KC4BD,mB8CnkKE,WAAA,E/C4iKD,O+CxiKD,YACE,SAAA,O/C0iKD,KAAA,E+CtiKC,Y/CyiKD,MAAA,Q+CriKG,c/CwiKH,QAAA,MC4BD,4B8C9jKE,UAAA,KAGF,aAAA,mBAEE,aAAA,KAGF,YAAA,kB9C+jKE,cAAe,K8CxjKjB,YAHE,Y/CoiKD,a+ChiKC,QAAA,W/CmiKD,eAAA,I+C/hKC,c/CkiKD,eAAA,O+C7hKC,cACA,eAAA,OAMF,eACE,WAAA,EACA,cAAA,ICvDF,YAEE,aAAA,EACA,WAAA,KAQF,YACE,aAAA,EACA,cAAA,KAGA,iBACA,SAAA,SACA,QAAA,MhD6kKD,QAAA,KAAA,KgD1kKC,cAAA,KrB3BA,iBAAA,KACC,OAAA,IAAA,MAAA,KqB6BD,6BACE,uBAAA,IrBvBF,wBAAA,I3BsmKD,4BgDpkKC,cAAe,E/CgmKf,2BAA4B,I+C9lK5B,0BAAA,IAFF,kBAAA,uBAKI,MAAA,KAIF,2CAAA,gD/CgmKA,MAAO,K+C5lKL,wBAFA,wBhDykKH,6BgDxkKG,6BAKF,MAAO,KACP,gBAAA,KACA,iBAAA,QAKA,uB/C4lKA,MAAO,KACP,WAAY,K+CzlKV,0BhDmkKH,gCgDlkKG,gCALF,MAAA,K/CmmKA,OAAQ,YACR,iBAAkB,KDxBnB,mDgD5kKC,yDAAA,yD/CymKA,MAAO,QDxBR,gDgDhkKC,sDAAA,sD/C6lKA,MAAO,K+CzlKL,wBAEA,8BADA,8BhDmkKH,QAAA,EgDxkKC,MAAA,K/ComKA,iBAAkB,QAClB,aAAc,QAEhB,iDDpBC,wDCuBD,uDADA,uD+CzmKE,8DAYI,6D/C4lKN,uD+CxmKE,8D/C2mKF,6DAKE,MAAO,QDxBR,8CiD1qKG,oDADF,oDAEE,MAAA,QAEA,yBhDusKF,MAAO,QgDrsKH,iBAAA,QAFF,0BAAA,+BAKI,MAAA,QAGF,mDAAA,wDhDwsKJ,MAAO,QDtBR,gCiDhrKO,gCAGF,qCAFE,qChD2sKN,MAAO,QACP,iBAAkB,QAEpB,iCgDvsKQ,uCAFA,uChD0sKR,sCDtBC,4CiDnrKO,4CArBN,MAAA,KACE,iBAAA,QACA,aAAA,QAEA,sBhDouKF,MAAO,QgDluKH,iBAAA,QAFF,uBAAA,4BAKI,MAAA,QAGF,gDAAA,qDhDquKJ,MAAO,QDtBR,6BiD7sKO,6BAGF,kCAFE,kChDwuKN,MAAO,QACP,iBAAkB,QAEpB,8BgDpuKQ,oCAFA,oChDuuKR,mCDtBC,yCiDhtKO,yCArBN,MAAA,KACE,iBAAA,QACA,aAAA,QAEA,yBhDiwKF,MAAO,QgD/vKH,iBAAA,QAFF,0BAAA,+BAKI,MAAA,QAGF,mDAAA,wDhDkwKJ,MAAO,QDtBR,gCiD1uKO,gCAGF,qCAFE,qChDqwKN,MAAO,QACP,iBAAkB,QAEpB,iCgDjwKQ,uCAFA,uChDowKR,sCDtBC,4CiD7uKO,4CArBN,MAAA,KACE,iBAAA,QACA,aAAA,QAEA,wBhD8xKF,MAAO,QgD5xKH,iBAAA,QAFF,yBAAA,8BAKI,MAAA,QAGF,kDAAA,uDhD+xKJ,MAAO,QDtBR,+BiDvwKO,+BAGF,oCAFE,oChDkyKN,MAAO,QACP,iBAAkB,QAEpB,gCgD9xKQ,sCAFA,sChDiyKR,qCDtBC,2CiD1wKO,2CDkGN,MAAO,KACP,iBAAA,QACA,aAAA,QAEF,yBACE,WAAA,EACA,cAAA,IE1HF,sBACE,cAAA,EACA,YAAA,IAEA,O9C0DA,cAAA,KACQ,iBAAA,KJ6uKT,OAAA,IAAA,MAAA,YkDnyKC,cAAe,IACf,mBAAA,EAAA,IAAA,IAAA,gBlDqyKD,WAAA,EAAA,IAAA,IAAA,gBkD/xKC,YACA,QAAA,KvBnBC,e3BuzKF,QAAA,KAAA,KkDtyKC,cAAe,IAAI,MAAM,YAMvB,uBAAA,IlDmyKH,wBAAA,IkD7xKC,0CACA,MAAA,QAEA,alDgyKD,WAAA,EkDpyKC,cAAe,EjDg0Kf,UAAW,KACX,MAAO,QDtBR,oBkD1xKC,sBjDkzKF,eiDxzKI,mBAKJ,qBAEE,MAAA,QvBvCA,cACC,QAAA,KAAA,K3Bs0KF,iBAAA,QkDrxKC,WAAY,IAAI,MAAM,KjDizKtB,2BAA4B,IiD9yK1B,0BAAA,IAHJ,mBAAA,mCAMM,cAAA,ElDwxKL,oCkDnxKG,oDjD+yKF,aAAc,IAAI,EiD7yKZ,cAAA,EvBtEL,4D3B61KF,4EkDjxKG,WAAA,EjD6yKF,uBAAwB,IiD3yKlB,wBAAA,IvBtEL,0D3B21KF,0EkD1yKC,cAAe,EvB1Df,2BAAA,IACC,0BAAA,IuB0FH,+EAEI,uBAAA,ElD8wKH,wBAAA,EkD1wKC,wDlD6wKD,iBAAA,EC4BD,0BACE,iBAAkB,EiDlyKpB,8BlD0wKC,ckD1wKD,gCjDuyKE,cAAe,EiDvyKjB,sCAQM,sBlDwwKL,wCC4BC,cAAe,K0Br5Kf,aAAA,KuByGF,wDlDqxKC,0BC4BC,uBAAwB,IACxB,wBAAyB,IiDlzK3B,yFAoBQ,yFlDwwKP,2DkDzwKO,2DjDqyKN,uBAAwB,IACxB,wBAAyB,IAK3B,wGiD9zKA,wGjD4zKA,wGDtBC,wGCuBD,0EiD7zKA,0EjD2zKA,0EiDnyKU,0EjD2yKR,uBAAwB,IAK1B,uGiDx0KA,uGjDs0KA,uGDtBC,uGCuBD,yEiDv0KA,yEjDq0KA,yEiDzyKU,yEvB7HR,wBAAA,IuBiGF,sDlDqzKC,yBC4BC,2BAA4B,IAC5B,0BAA2B,IiDxyKrB,qFA1CR,qFAyCQ,wDlDmxKP,wDC4BC,2BAA4B,IAC5B,0BAA2B,IAG7B,oGDtBC,oGCwBD,oGiD91KA,oGjD21KA,uEiD7yKU,uEjD+yKV,uEiD71KA,uEjDm2KE,0BAA2B,IAG7B,mGDtBC,mGCwBD,mGiDx2KA,mGjDq2KA,sEiDnzKU,sEjDqzKV,sEiDv2KA,sEjD62KE,2BAA4B,IiDlzK1B,0BlD2xKH,qCkDt1KD,0BAAA,qCA+DI,WAAA,IAAA,MAAA,KA/DJ,kDAAA,kDAmEI,WAAA,EAnEJ,uBAAA,yCjD23KE,OAAQ,EiDjzKA,+CjDqzKV,+CiD/3KA,+CjDi4KA,+CAEA,+CANA,+CDjBC,iECoBD,iEiDh4KA,iEjDk4KA,iEAEA,iEANA,iEAWE,YAAa,EiD3zKL,8CjD+zKV,8CiD74KA,8CjD+4KA,8CAEA,8CANA,8CDjBC,gECoBD,gEiD94KA,gEjDg5KA,gEAEA,gEANA,gEAWE,aAAc,EAIhB,+CiD35KA,+CjDy5KA,+CiDl0KU,+CjDq0KV,iEiD55KA,iEjD05KA,iEDtBC,iEC6BC,cAAe,EAEjB,8CiDn0KU,8CjDq0KV,8CiDr6KA,8CjDo6KA,gEDtBC,gECwBD,gEiDh0KI,gEACA,cAAA,EAUJ,yBACE,cAAA,ElDmyKD,OAAA,EkD/xKG,aACA,cAAA,KANJ,oBASM,cAAA,ElDkyKL,cAAA,IkD7xKG,2BlDgyKH,WAAA,IC4BD,4BiDxzKM,cAAA,EAKF,wDAvBJ,wDlDqzKC,WAAA,IAAA,MAAA,KkD5xKK,2BlD+xKL,WAAA,EmDlhLC,uDnDqhLD,cAAA,IAAA,MAAA,KmDlhLG,eACA,aAAA,KnDshLH,8BmDxhLC,MAAA,KAMI,iBAAA,QnDqhLL,aAAA,KmDlhLK,0DACA,iBAAA,KAGJ,qCAEI,MAAA,QnDmhLL,iBAAA,KmDpiLC,yDnDuiLD,oBAAA,KmDpiLG,eACA,aAAA,QnDwiLH,8BmD1iLC,MAAA,KAMI,iBAAA,QnDuiLL,aAAA,QmDpiLK,0DACA,iBAAA,QAGJ,qCAEI,MAAA,QnDqiLL,iBAAA,KmDtjLC,yDnDyjLD,oBAAA,QmDtjLG,eACA,aAAA,QnD0jLH,8BmD5jLC,MAAA,QAMI,iBAAA,QnDyjLL,aAAA,QmDtjLK,0DACA,iBAAA,QAGJ,qCAEI,MAAA,QnDujLL,iBAAA,QmDxkLC,yDnD2kLD,oBAAA,QmDxkLG,YACA,aAAA,QnD4kLH,2BmD9kLC,MAAA,QAMI,iBAAA,QnD2kLL,aAAA,QmDxkLK,uDACA,iBAAA,QAGJ,kCAEI,MAAA,QnDykLL,iBAAA,QmD1lLC,sDnD6lLD,oBAAA,QmD1lLG,eACA,aAAA,QnD8lLH,8BmDhmLC,MAAA,QAMI,iBAAA,QnD6lLL,aAAA,QmD1lLK,0DACA,iBAAA,QAGJ,qCAEI,MAAA,QnD2lLL,iBAAA,QmD5mLC,yDnD+mLD,oBAAA,QmD5mLG,cACA,aAAA,QnDgnLH,6BmDlnLC,MAAA,QAMI,iBAAA,QnD+mLL,aAAA,QmD5mLK,yDACA,iBAAA,QAGJ,oCAEI,MAAA,QnD6mLL,iBAAA,QoD5nLC,wDACA,oBAAA,QAEA,kBACA,SAAA,SpD+nLD,QAAA,MoDpoLC,OAAQ,EnDgqLR,QAAS,EACT,SAAU,OAEZ,yCmDtpLI,wBADA,yBAEA,yBACA,wBACA,SAAA,SACA,IAAA,EACA,OAAA,EpD+nLH,KAAA,EoD1nLC,MAAO,KACP,OAAA,KpD4nLD,OAAA,EoDvnLC,wBpD0nLD,eAAA,OqDppLC,uBACA,eAAA,IAEA,MACA,WAAA,KACA,QAAA,KjDwDA,cAAA,KACQ,iBAAA,QJgmLT,OAAA,IAAA,MAAA,QqD/pLC,cAAe,IASb,mBAAA,MAAA,EAAA,IAAA,IAAA,gBACA,WAAA,MAAA,EAAA,IAAA,IAAA,gBAKJ,iBACE,aAAA,KACA,aAAA,gBAEF,SACE,QAAA,KACA,cAAA,ICtBF,SACE,QAAA,IACA,cAAA,IAEA,OACA,MAAA,MACA,UAAA,KjCRA,YAAA,IAGA,YAAA,ErBqrLD,MAAA,KsD7qLC,YAAA,EAAA,IAAA,EAAA,KrDysLA,OAAQ,kBqDvsLN,QAAA,GjCbF,aiCeE,ajCZF,MAAA,KrB6rLD,gBAAA,KsDzqLC,OAAA,QACE,OAAA,kBACA,QAAA,GAEA,aACA,mBAAA,KtD2qLH,QAAA,EuDhsLC,OAAQ,QACR,WAAA,IvDksLD,OAAA,EuD7rLC,YACA,SAAA,OAEA,OACA,SAAA,MACA,IAAA,EACA,MAAA,EACA,OAAA,EACA,KAAA,EAIA,QAAA,KvD6rLD,QAAA,KuD1rLC,SAAA,OnD+GA,2BAAA,MACI,QAAA,EAEI,0BAkER,mBAAA,kBAAA,IAAA,SAEK,cAAA,aAAA,IAAA,SACG,WAAA,UAAA,IAAA,SJ6gLT,kBAAA,kBuDhsLC,cAAA,kBnD2GA,aAAA,kBACI,UAAA,kBAEI,wBJwlLT,kBAAA,euDpsLK,cAAe,eACnB,aAAA,eACA,UAAA,eAIF,mBACE,WAAA,OACA,WAAA,KvDqsLD,cuDhsLC,SAAU,SACV,MAAA,KACA,OAAA,KAEA,eACA,SAAA,SnDaA,iBAAA,KACQ,wBAAA,YmDZR,gBAAA,YtD4tLA,OsD5tLA,IAAA,MAAA,KAEA,OAAA,IAAA,MAAA,evDksLD,cAAA,IuD9rLC,QAAS,EACT,mBAAA,EAAA,IAAA,IAAA,eACA,WAAA,EAAA,IAAA,IAAA,eAEA,gBACA,SAAA,MACA,IAAA,EACA,MAAA,EvDgsLD,OAAA,EuD9rLC,KAAA,ElCrEA,QAAA,KAGA,iBAAA,KkCmEA,qBlCtEA,OAAA,iBAGA,QAAA,EkCwEF,mBACE,OAAA,kBACA,QAAA,GAIF,cACE,QAAA,KvDgsLD,cAAA,IAAA,MAAA,QuD3rLC,qBACA,WAAA,KAKF,aACE,OAAA,EACA,YAAA,WAIF,YACE,SAAA,SACA,QAAA,KvD0rLD,cuD5rLC,QAAS,KAQP,WAAA,MACA,WAAA,IAAA,MAAA,QATJ,wBAaI,cAAA,EvDsrLH,YAAA,IuDlrLG,mCvDqrLH,YAAA,KuD/qLC,oCACA,YAAA,EAEA,yBACA,SAAA,SvDkrLD,IAAA,QuDhqLC,MAAO,KAZP,OAAA,KACE,SAAA,OvDgrLD,yBuD7qLD,cnDvEA,MAAA,MACQ,OAAA,KAAA,KmD2ER,eAAY,mBAAA,EAAA,IAAA,KAAA,evD+qLX,WAAA,EAAA,IAAA,KAAA,euDzqLD,UAFA,MAAA,OvDirLD,yBwD/zLC,UACA,MAAA,OCNA,SAEA,SAAA,SACA,QAAA,KACA,QAAA,MACA,YAAA,iBAAA,UAAA,MAAA,WACA,UAAA,KACA,WAAA,OACA,YAAA,IACA,YAAA,WACA,WAAA,KACA,WAAA,MACA,gBAAA,KACA,YAAA,KACA,eAAA,KACA,eAAA,ODHA,WAAA,OnCVA,aAAA,OAGA,UAAA,OrBs1LD,YAAA,OwD30LC,OAAA,iBnCdA,QAAA,ErB61LD,WAAA,KwD90LY,YAAmB,OAAA,kBxDk1L/B,QAAA,GwDj1LY,aAAmB,QAAA,IAAA,ExDq1L/B,WAAA,KwDp1LY,eAAmB,QAAA,EAAA,IxDw1L/B,YAAA,IwDv1LY,gBAAmB,QAAA,IAAA,ExD21L/B,WAAA,IwDt1LC,cACA,QAAA,EAAA,IACA,YAAA,KAEA,eACA,UAAA,MxDy1LD,QAAA,IAAA,IwDr1LC,MAAO,KACP,WAAA,OACA,iBAAA,KACA,cAAA,IAEA,exDu1LD,SAAA,SwDn1LC,MAAA,EACE,OAAA,EACA,aAAA,YACA,aAAA,MAEA,4BxDq1LH,OAAA,EwDn1LC,KAAA,IACE,YAAA,KACA,aAAA,IAAA,IAAA,EACA,iBAAA,KAEA,iCxDq1LH,MAAA,IwDn1LC,OAAA,EACE,cAAA,KACA,aAAA,IAAA,IAAA,EACA,iBAAA,KAEA,kCxDq1LH,OAAA,EwDn1LC,KAAA,IACE,cAAA,KACA,aAAA,IAAA,IAAA,EACA,iBAAA,KAEA,8BxDq1LH,IAAA,IwDn1LC,KAAA,EACE,WAAA,KACA,aAAA,IAAA,IAAA,IAAA,EACA,mBAAA,KAEA,6BxDq1LH,IAAA,IwDn1LC,MAAA,EACE,WAAA,KACA,aAAA,IAAA,EAAA,IAAA,IACA,kBAAA,KAEA,+BxDq1LH,IAAA,EwDn1LC,KAAA,IACE,YAAA,KACA,aAAA,EAAA,IAAA,IACA,oBAAA,KAEA,oCxDq1LH,IAAA,EwDn1LC,MAAA,IACE,WAAA,KACA,aAAA,EAAA,IAAA,IACA,oBAAA,KAEA,qCxDq1LH,IAAA,E0Dl7LC,KAAM,IACN,WAAA,KACA,aAAA,EAAA,IAAA,IACA,oBAAA,KAEA,SACA,SAAA,SACA,IAAA,EDXA,KAAA,EAEA,QAAA,KACA,QAAA,KACA,UAAA,MACA,QAAA,IACA,YAAA,iBAAA,UAAA,MAAA,WACA,UAAA,KACA,WAAA,OACA,YAAA,IACA,YAAA,WACA,WAAA,KACA,WAAA,MACA,gBAAA,KACA,YAAA,KACA,eAAA,KCAA,eAAA,OAEA,WAAA,OACA,aAAA,OAAA,UAAA,OACA,YAAA,OACA,iBAAA,KACA,wBAAA,YtD8CA,gBAAA,YACQ,OAAA,IAAA,MAAA,KJk5LT,OAAA,IAAA,MAAA,e0D77LC,cAAA,IAAY,mBAAA,EAAA,IAAA,KAAA,e1Dg8Lb,WAAA,EAAA,IAAA,KAAA,e0D/7La,WAAA,KACZ,aAAY,WAAA,MACZ,eAAY,YAAA,KAGd,gBACE,WAAA,KAEA,cACA,YAAA,MAEA,e1Dq8LD,QAAA,IAAA,K0Dl8LC,OAAQ,EACR,UAAA,K1Do8LD,iBAAA,Q0D57LC,cAAA,IAAA,MAAA,QzDy9LA,cAAe,IAAI,IAAI,EAAE,EyDt9LvB,iBACA,QAAA,IAAA,KAEA,gBACA,sB1D87LH,SAAA,S0D37LC,QAAS,MACT,MAAA,E1D67LD,OAAA,E0D37LC,aAAc,YACd,aAAA,M1D87LD,gB0Dz7LC,aAAA,KAEE,sBACA,QAAA,GACA,aAAA,KAEA,oB1D27LH,OAAA,M0D17LG,KAAA,IACE,YAAA,MACA,iBAAA,KACA,iBAAA,gBACA,oBAAA,E1D67LL,0B0Dz7LC,OAAA,IACE,YAAA,MACA,QAAA,IACA,iBAAA,KACA,oBAAA,EAEA,sB1D27LH,IAAA,I0D17LG,KAAA,MACE,WAAA,MACA,mBAAA,KACA,mBAAA,gBACA,kBAAA,E1D67LL,4B0Dz7LC,OAAA,MACE,KAAA,IACA,QAAA,IACA,mBAAA,KACA,kBAAA,EAEA,uB1D27LH,IAAA,M0D17LG,KAAA,IACE,YAAA,MACA,iBAAA,EACA,oBAAA,KACA,oBAAA,gB1D67LL,6B0Dx7LC,IAAA,IACE,YAAA,MACA,QAAA,IACA,iBAAA,EACA,oBAAA,KAEA,qB1D07LH,IAAA,I0Dz7LG,MAAA,MACE,WAAA,MACA,mBAAA,EACA,kBAAA,KACA,kBAAA,gB1D47LL,2B2DpjMC,MAAO,IACP,OAAA,M3DsjMD,QAAA,I2DnjMC,mBAAoB,EACpB,kBAAA,KAEA,U3DqjMD,SAAA,S2DljMG,gBACA,SAAA,SvD6KF,MAAA,KACK,SAAA,OJ04LN,sB2D/jMC,SAAU,S1D4lMV,QAAS,K0D9kML,mBAAA,IAAA,YAAA,K3DqjML,cAAA,IAAA,YAAA,K2D3hMC,WAAA,IAAA,YAAA,KvDmKK,4BAFL,0BAGQ,YAAA,EA3JA,qDA+GR,sBAEQ,mBAAA,kBAAA,IAAA,YJ86LP,cAAA,aAAA,IAAA,Y2DzjMG,WAAA,UAAA,IAAA,YvDmHJ,4BAAA,OACQ,oBAAA,OuDjHF,oBAAA,O3D4jML,YAAA,OI58LD,mCHs+LA,2BGr+LQ,KAAA,EuD5GF,kBAAA,sB3D6jML,UAAA,sBC2BD,kCADA,2BG5+LA,KAAA,EACQ,kBAAA,uBuDtGF,UAAA,uBArCN,6B3DomMD,gC2DpmMC,iC1D+nME,KAAM,E0DllMN,kBAAA,mB3D4jMH,UAAA,oBAGA,wB2D5mMD,sBAAA,sBAsDI,QAAA,MAEA,wB3D0jMH,KAAA,E2DtjMG,sB3DyjMH,sB2DrnMC,SAAU,SA+DR,IAAA,E3DyjMH,MAAA,KC0BD,sB0D/kMI,KAAA,KAnEJ,sBAuEI,KAAA,MAvEJ,2BA0EI,4B3DwjMH,KAAA,E2D/iMC,6BACA,KAAA,MAEA,8BACA,KAAA,KtC3FA,kBsC6FA,SAAA,SACA,IAAA,EACA,OAAA,EACA,KAAA,EACA,MAAA,I3DmjMD,UAAA,K2D9iMC,MAAA,KdnGE,WAAA,OACA,YAAA,EAAA,IAAA,IAAA,eACA,iBAAA,cAAA,OAAA,kBACA,QAAA,G7CqpMH,uB2DljMC,iBAAA,sEACE,iBAAA,iEACA,iBAAA,uFdxGA,iBAAA,kEACA,OAAA,+GACA,kBAAA,SACA,wBACA,MAAA,E7C6pMH,KAAA,K2DpjMC,iBAAA,sE1DglMA,iBAAiB,iE0D9kMf,iBAAA,uFACA,iBAAA,kEACA,OAAA,+GtCvHF,kBAAA,SsCyFF,wB3DslMC,wBC4BC,MAAO,KACP,gBAAiB,KACjB,OAAQ,kB0D7kMN,QAAA,EACA,QAAA,G3DwjMH,0C2DhmMD,2CA2CI,6BADA,6B1DklMF,SAAU,S0D7kMR,IAAA,IACA,QAAA,E3DqjMH,QAAA,a2DrmMC,WAAY,MAqDV,0CADA,6B3DsjMH,KAAA,I2D1mMC,YAAa,MA0DX,2CADA,6BAEA,MAAA,IACA,aAAA,MAME,6BADF,6B3DmjMH,MAAA,K2D9iMG,OAAA,KACE,YAAA,M3DgjML,YAAA,E2DriMC,oCACA,QAAA,QAEA,oCACA,QAAA,QAEA,qBACA,SAAA,SACA,OAAA,K3DwiMD,KAAA,I2DjjMC,QAAS,GAYP,MAAA,IACA,aAAA,EACA,YAAA,KACA,WAAA,OACA,WAAA,KAEA,wBACA,QAAA,aAWA,MAAA,KACA,OAAA,K3D8hMH,OAAA,I2D7jMC,YAAa,OAkCX,OAAA,QACA,iBAAA,OACA,iBAAA,cACA,OAAA,IAAA,MAAA,K3D8hMH,cAAA,K2DthMC,6BACA,MAAA,KACA,OAAA,KACA,OAAA,EACA,iBAAA,KAEA,kBACA,SAAA,SACA,MAAA,IACA,OAAA,K3DyhMD,KAAA,I2DxhMC,QAAA,GACE,YAAA,K3D0hMH,eAAA,K2Dj/LC,MAAO,KAhCP,WAAA,O1D8iMA,YAAa,EAAE,IAAI,IAAI,eAEzB,uB0D3iMM,YAAA,KAEA,oCACA,0C3DmhMH,2C2D3hMD,6BAAA,6BAYI,MAAA,K3DmhMH,OAAA,K2D/hMD,WAAA,M1D2jME,UAAW,KDxBZ,0C2D9gMD,6BACE,YAAA,MAEA,2C3DghMD,6B2D5gMD,aAAA,M3D+gMC,kBACF,MAAA,I4D7wMC,KAAA,I3DyyME,eAAgB,KAElB,qBACE,OAAQ,MAkBZ,qCADA,sCADA,mBADA,oBAXA,gBADA,iBAOA,uBADA,wBADA,iBADA,kBADA,wBADA,yBASA,mCADA,oC2DpzME,oBAAA,qBAAA,oBAAA,qB3D2zMF,WADA,YAOA,uBADA,wBADA,qBADA,sBADA,cADA,e2D/zMI,a3Dq0MJ,cDvBC,kB4D7yMG,mB3DqzMJ,WADA,YAwBE,QAAS,MACT,QAAS,IASX,qCADA,mBANA,gBAGA,uBADA,iBADA,wBAIA,mCDhBC,oB6D/0MC,oB5Dk2MF,W+B51MA,uBhCo0MC,qB4D5zMG,cChBF,aACA,kB5D+1MF,W+Br1ME,MAAO,KhCy0MR,cgCt0MC,QAAS,MACT,aAAA,KhCw0MD,YAAA,KgC/zMC,YhCk0MD,MAAA,gBgC/zMC,WhCk0MD,MAAA,egC/zMC,MhCk0MD,QAAA,e8Dz1MC,MACA,QAAA,gBAEA,WACA,WAAA,O9B8BF,WACE,KAAA,EAAA,EAAA,EhCg0MD,MAAA,YgCzzMC,YAAa,KACb,iBAAA,YhC2zMD,OAAA,E+D31MC,Q/D81MD,QAAA,eC4BD,OACE,SAAU,M+Dn4MV,chE42MD,MAAA,aC+BD,YADA,YADA,YADA,YAIE,QAAS,e+Dp5MT,kBhEs4MC,mBgEr4MD,yBhEi4MD,kB+Dl1MD,mBA6IA,yB9D4tMA,kBACA,mB8Dj3ME,yB9D62MF,kBACA,mBACA,yB+Dv5MY,QAAA,eACV,yBAAU,YhE04MT,QAAA,gBC4BD,iB+Dp6MU,QAAA,gBhE64MX,c+D51MG,QAAS,oB/Dg2MV,c+Dl2MC,c/Dm2MH,QAAA,sB+D91MG,yB/Dk2MD,kBACF,QAAA,iB+D91MG,yB/Dk2MD,mBACF,QAAA,kBgEh6MC,yBhEo6MC,yBgEn6MD,QAAA,wBACA,+CAAU,YhEw6MT,QAAA,gBC4BD,iB+Dl8MU,QAAA,gBhE26MX,c+Dr2MG,QAAS,oB/Dy2MV,c+D32MC,c/D42MH,QAAA,sB+Dv2MG,+C/D22MD,kBACF,QAAA,iB+Dv2MG,+C/D22MD,mBACF,QAAA,kBgE97MC,+ChEk8MC,yBgEj8MD,QAAA,wBACA,gDAAU,YhEs8MT,QAAA,gBC4BD,iB+Dh+MU,QAAA,gBhEy8MX,c+D92MG,QAAS,oB/Dk3MV,c+Dp3MC,c/Dq3MH,QAAA,sB+Dh3MG,gD/Do3MD,kBACF,QAAA,iB+Dh3MG,gD/Do3MD,mBACF,QAAA,kBgE59MC,gDhEg+MC,yBgE/9MD,QAAA,wBACA,0BAAU,YhEo+MT,QAAA,gBC4BD,iB+D9/MU,QAAA,gBhEu+MX,c+Dv3MG,QAAS,oB/D23MV,c+D73MC,c/D83MH,QAAA,sB+Dz3MG,0B/D63MD,kBACF,QAAA,iB+Dz3MG,0B/D63MD,mBACF,QAAA,kBgEl/MC,0BhEs/MC,yBACF,QAAA,wBgEv/MC,yBhE2/MC,WACF,QAAA,gBgE5/MC,+ChEggNC,WACF,QAAA,gBgEjgNC,gDhEqgNC,WACF,QAAA,gBAGA,0B+Dh3MC,WA4BE,QAAS,gBC5LX,eAAU,QAAA,eACV,aAAU,ehEyhNT,QAAA,gBC4BD,oB+DnjNU,QAAA,gBhE4hNX,iB+D93MG,QAAS,oBAMX,iB/D23MD,iB+Dt2MG,QAAS,sB/D22MZ,qB+D/3MC,QAAS,e/Dk4MV,a+D53MC,qBAcE,QAAS,iB/Dm3MZ,sB+Dh4MC,QAAS,e/Dm4MV,a+D73MC,sBAOE,QAAS,kB/D23MZ,4B+D53MC,QAAS,eCpLT,ahEojNC,4BACF,QAAA,wBC6BD,aACE,cACE,QAAS","sourcesContent":["/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\n\n//\n// 1. Set default font family to sans-serif.\n// 2. Prevent iOS and IE text size adjust after device orientation change,\n//    without disabling user zoom.\n//\n\nhtml {\n  font-family: sans-serif; // 1\n  -ms-text-size-adjust: 100%; // 2\n  -webkit-text-size-adjust: 100%; // 2\n}\n\n//\n// Remove default margin.\n//\n\nbody {\n  margin: 0;\n}\n\n// HTML5 display definitions\n// ==========================================================================\n\n//\n// Correct `block` display not defined for any HTML5 element in IE 8/9.\n// Correct `block` display not defined for `details` or `summary` in IE 10/11\n// and Firefox.\n// Correct `block` display not defined for `main` in IE 11.\n//\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n  display: block;\n}\n\n//\n// 1. Correct `inline-block` display not defined in IE 8/9.\n// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n//\n\naudio,\ncanvas,\nprogress,\nvideo {\n  display: inline-block; // 1\n  vertical-align: baseline; // 2\n}\n\n//\n// Prevent modern browsers from displaying `audio` without controls.\n// Remove excess height in iOS 5 devices.\n//\n\naudio:not([controls]) {\n  display: none;\n  height: 0;\n}\n\n//\n// Address `[hidden]` styling not present in IE 8/9/10.\n// Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.\n//\n\n[hidden],\ntemplate {\n  display: none;\n}\n\n// Links\n// ==========================================================================\n\n//\n// Remove the gray background color from active links in IE 10.\n//\n\na {\n  background-color: transparent;\n}\n\n//\n// Improve readability of focused elements when they are also in an\n// active/hover state.\n//\n\na:active,\na:hover {\n  outline: 0;\n}\n\n// Text-level semantics\n// ==========================================================================\n\n//\n// Address styling not present in IE 8/9/10/11, Safari, and Chrome.\n//\n\nabbr[title] {\n  border-bottom: 1px dotted;\n}\n\n//\n// Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\n//\n\nb,\nstrong {\n  font-weight: bold;\n}\n\n//\n// Address styling not present in Safari and Chrome.\n//\n\ndfn {\n  font-style: italic;\n}\n\n//\n// Address variable `h1` font-size and margin within `section` and `article`\n// contexts in Firefox 4+, Safari, and Chrome.\n//\n\nh1 {\n  font-size: 2em;\n  margin: 0.67em 0;\n}\n\n//\n// Address styling not present in IE 8/9.\n//\n\nmark {\n  background: #ff0;\n  color: #000;\n}\n\n//\n// Address inconsistent and variable font size in all browsers.\n//\n\nsmall {\n  font-size: 80%;\n}\n\n//\n// Prevent `sub` and `sup` affecting `line-height` in all browsers.\n//\n\nsub,\nsup {\n  font-size: 75%;\n  line-height: 0;\n  position: relative;\n  vertical-align: baseline;\n}\n\nsup {\n  top: -0.5em;\n}\n\nsub {\n  bottom: -0.25em;\n}\n\n// Embedded content\n// ==========================================================================\n\n//\n// Remove border when inside `a` element in IE 8/9/10.\n//\n\nimg {\n  border: 0;\n}\n\n//\n// Correct overflow not hidden in IE 9/10/11.\n//\n\nsvg:not(:root) {\n  overflow: hidden;\n}\n\n// Grouping content\n// ==========================================================================\n\n//\n// Address margin not present in IE 8/9 and Safari.\n//\n\nfigure {\n  margin: 1em 40px;\n}\n\n//\n// Address differences between Firefox and other browsers.\n//\n\nhr {\n  box-sizing: content-box;\n  height: 0;\n}\n\n//\n// Contain overflow in all browsers.\n//\n\npre {\n  overflow: auto;\n}\n\n//\n// Address odd `em`-unit font size rendering in all browsers.\n//\n\ncode,\nkbd,\npre,\nsamp {\n  font-family: monospace, monospace;\n  font-size: 1em;\n}\n\n// Forms\n// ==========================================================================\n\n//\n// Known limitation: by default, Chrome and Safari on OS X allow very limited\n// styling of `select`, unless a `border` property is set.\n//\n\n//\n// 1. Correct color not being inherited.\n//    Known issue: affects color of disabled elements.\n// 2. Correct font properties not being inherited.\n// 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\n//\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n  color: inherit; // 1\n  font: inherit; // 2\n  margin: 0; // 3\n}\n\n//\n// Address `overflow` set to `hidden` in IE 8/9/10/11.\n//\n\nbutton {\n  overflow: visible;\n}\n\n//\n// Address inconsistent `text-transform` inheritance for `button` and `select`.\n// All other form control elements do not inherit `text-transform` values.\n// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\n// Correct `select` style inheritance in Firefox.\n//\n\nbutton,\nselect {\n  text-transform: none;\n}\n\n//\n// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n//    and `video` controls.\n// 2. Correct inability to style clickable `input` types in iOS.\n// 3. Improve usability and consistency of cursor style between image-type\n//    `input` and others.\n//\n\nbutton,\nhtml input[type=\"button\"], // 1\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n  -webkit-appearance: button; // 2\n  cursor: pointer; // 3\n}\n\n//\n// Re-set default cursor for disabled elements.\n//\n\nbutton[disabled],\nhtml input[disabled] {\n  cursor: default;\n}\n\n//\n// Remove inner padding and border in Firefox 4+.\n//\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n  border: 0;\n  padding: 0;\n}\n\n//\n// Address Firefox 4+ setting `line-height` on `input` using `!important` in\n// the UA stylesheet.\n//\n\ninput {\n  line-height: normal;\n}\n\n//\n// It's recommended that you don't attempt to style these elements.\n// Firefox's implementation doesn't respect box-sizing, padding, or width.\n//\n// 1. Address box sizing set to `content-box` in IE 8/9/10.\n// 2. Remove excess padding in IE 8/9/10.\n//\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n  box-sizing: border-box; // 1\n  padding: 0; // 2\n}\n\n//\n// Fix the cursor style for Chrome's increment/decrement buttons. For certain\n// `font-size` values of the `input`, it causes the cursor style of the\n// decrement button to change from `default` to `text`.\n//\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n  height: auto;\n}\n\n//\n// 1. Address `appearance` set to `searchfield` in Safari and Chrome.\n// 2. Address `box-sizing` set to `border-box` in Safari and Chrome.\n//\n\ninput[type=\"search\"] {\n  -webkit-appearance: textfield; // 1\n  box-sizing: content-box; //2\n}\n\n//\n// Remove inner padding and search cancel button in Safari and Chrome on OS X.\n// Safari (but not Chrome) clips the cancel button when the search input has\n// padding (and `textfield` appearance).\n//\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\n\n//\n// Define consistent border, margin, and padding.\n//\n\nfieldset {\n  border: 1px solid #c0c0c0;\n  margin: 0 2px;\n  padding: 0.35em 0.625em 0.75em;\n}\n\n//\n// 1. Correct `color` not being inherited in IE 8/9/10/11.\n// 2. Remove padding so people aren't caught out if they zero out fieldsets.\n//\n\nlegend {\n  border: 0; // 1\n  padding: 0; // 2\n}\n\n//\n// Remove default vertical scrollbar in IE 8/9/10/11.\n//\n\ntextarea {\n  overflow: auto;\n}\n\n//\n// Don't inherit the `font-weight` (applied by a rule above).\n// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n//\n\noptgroup {\n  font-weight: bold;\n}\n\n// Tables\n// ==========================================================================\n\n//\n// Remove most spacing between table cells.\n//\n\ntable {\n  border-collapse: collapse;\n  border-spacing: 0;\n}\n\ntd,\nth {\n  padding: 0;\n}\n","/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n\n// ==========================================================================\n// Print styles.\n// Inlined to avoid the additional HTTP request: h5bp.com/r\n// ==========================================================================\n\n@media print {\n    *,\n    *:before,\n    *:after {\n        background: transparent !important;\n        color: #000 !important; // Black prints faster: h5bp.com/s\n        box-shadow: none !important;\n        text-shadow: none !important;\n    }\n\n    a,\n    a:visited {\n        text-decoration: underline;\n    }\n\n    a[href]:after {\n        content: \" (\" attr(href) \")\";\n    }\n\n    abbr[title]:after {\n        content: \" (\" attr(title) \")\";\n    }\n\n    // Don't show links that are fragment identifiers,\n    // or use the `javascript:` pseudo protocol\n    a[href^=\"#\"]:after,\n    a[href^=\"javascript:\"]:after {\n        content: \"\";\n    }\n\n    pre,\n    blockquote {\n        border: 1px solid #999;\n        page-break-inside: avoid;\n    }\n\n    thead {\n        display: table-header-group; // h5bp.com/t\n    }\n\n    tr,\n    img {\n        page-break-inside: avoid;\n    }\n\n    img {\n        max-width: 100% !important;\n    }\n\n    p,\n    h2,\n    h3 {\n        orphans: 3;\n        widows: 3;\n    }\n\n    h2,\n    h3 {\n        page-break-after: avoid;\n    }\n\n    // Bootstrap specific changes start\n\n    // Bootstrap components\n    .navbar {\n        display: none;\n    }\n    .btn,\n    .dropup > .btn {\n        > .caret {\n            border-top-color: #000 !important;\n        }\n    }\n    .label {\n        border: 1px solid #000;\n    }\n\n    .table {\n        border-collapse: collapse !important;\n\n        td,\n        th {\n            background-color: #fff !important;\n        }\n    }\n    .table-bordered {\n        th,\n        td {\n            border: 1px solid #ddd !important;\n        }\n    }\n\n    // Bootstrap specific changes end\n}\n","/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\nhtml {\n  font-family: sans-serif;\n  -ms-text-size-adjust: 100%;\n  -webkit-text-size-adjust: 100%;\n}\nbody {\n  margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n  display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n  display: inline-block;\n  vertical-align: baseline;\n}\naudio:not([controls]) {\n  display: none;\n  height: 0;\n}\n[hidden],\ntemplate {\n  display: none;\n}\na {\n  background-color: transparent;\n}\na:active,\na:hover {\n  outline: 0;\n}\nabbr[title] {\n  border-bottom: 1px dotted;\n}\nb,\nstrong {\n  font-weight: bold;\n}\ndfn {\n  font-style: italic;\n}\nh1 {\n  font-size: 2em;\n  margin: 0.67em 0;\n}\nmark {\n  background: #ff0;\n  color: #000;\n}\nsmall {\n  font-size: 80%;\n}\nsub,\nsup {\n  font-size: 75%;\n  line-height: 0;\n  position: relative;\n  vertical-align: baseline;\n}\nsup {\n  top: -0.5em;\n}\nsub {\n  bottom: -0.25em;\n}\nimg {\n  border: 0;\n}\nsvg:not(:root) {\n  overflow: hidden;\n}\nfigure {\n  margin: 1em 40px;\n}\nhr {\n  box-sizing: content-box;\n  height: 0;\n}\npre {\n  overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n  font-family: monospace, monospace;\n  font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n  color: inherit;\n  font: inherit;\n  margin: 0;\n}\nbutton {\n  overflow: visible;\n}\nbutton,\nselect {\n  text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n  -webkit-appearance: button;\n  cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n  cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n  border: 0;\n  padding: 0;\n}\ninput {\n  line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n  box-sizing: border-box;\n  padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n  height: auto;\n}\ninput[type=\"search\"] {\n  -webkit-appearance: textfield;\n  box-sizing: content-box;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\nfieldset {\n  border: 1px solid #c0c0c0;\n  margin: 0 2px;\n  padding: 0.35em 0.625em 0.75em;\n}\nlegend {\n  border: 0;\n  padding: 0;\n}\ntextarea {\n  overflow: auto;\n}\noptgroup {\n  font-weight: bold;\n}\ntable {\n  border-collapse: collapse;\n  border-spacing: 0;\n}\ntd,\nth {\n  padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n  *,\n  *:before,\n  *:after {\n    background: transparent !important;\n    color: #000 !important;\n    box-shadow: none !important;\n    text-shadow: none !important;\n  }\n  a,\n  a:visited {\n    text-decoration: underline;\n  }\n  a[href]:after {\n    content: \" (\" attr(href) \")\";\n  }\n  abbr[title]:after {\n    content: \" (\" attr(title) \")\";\n  }\n  a[href^=\"#\"]:after,\n  a[href^=\"javascript:\"]:after {\n    content: \"\";\n  }\n  pre,\n  blockquote {\n    border: 1px solid #999;\n    page-break-inside: avoid;\n  }\n  thead {\n    display: table-header-group;\n  }\n  tr,\n  img {\n    page-break-inside: avoid;\n  }\n  img {\n    max-width: 100% !important;\n  }\n  p,\n  h2,\n  h3 {\n    orphans: 3;\n    widows: 3;\n  }\n  h2,\n  h3 {\n    page-break-after: avoid;\n  }\n  .navbar {\n    display: none;\n  }\n  .btn > .caret,\n  .dropup > .btn > .caret {\n    border-top-color: #000 !important;\n  }\n  .label {\n    border: 1px solid #000;\n  }\n  .table {\n    border-collapse: collapse !important;\n  }\n  .table td,\n  .table th {\n    background-color: #fff !important;\n  }\n  .table-bordered th,\n  .table-bordered td {\n    border: 1px solid #ddd !important;\n  }\n}\n@font-face {\n  font-family: 'Glyphicons Halflings';\n  src: url('../fonts/glyphicons-halflings-regular.eot');\n  src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n  position: relative;\n  top: 1px;\n  display: inline-block;\n  font-family: 'Glyphicons Halflings';\n  font-style: normal;\n  font-weight: normal;\n  line-height: 1;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n  content: \"\\002a\";\n}\n.glyphicon-plus:before {\n  content: \"\\002b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n  content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n  content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n  content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n  content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n  content: \"\\270f\";\n}\n.glyphicon-glass:before {\n  content: \"\\e001\";\n}\n.glyphicon-music:before {\n  content: \"\\e002\";\n}\n.glyphicon-search:before {\n  content: \"\\e003\";\n}\n.glyphicon-heart:before {\n  content: \"\\e005\";\n}\n.glyphicon-star:before {\n  content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n  content: \"\\e007\";\n}\n.glyphicon-user:before {\n  content: \"\\e008\";\n}\n.glyphicon-film:before {\n  content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n  content: \"\\e010\";\n}\n.glyphicon-th:before {\n  content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n  content: \"\\e012\";\n}\n.glyphicon-ok:before {\n  content: \"\\e013\";\n}\n.glyphicon-remove:before {\n  content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n  content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n  content: \"\\e016\";\n}\n.glyphicon-off:before {\n  content: \"\\e017\";\n}\n.glyphicon-signal:before {\n  content: \"\\e018\";\n}\n.glyphicon-cog:before {\n  content: \"\\e019\";\n}\n.glyphicon-trash:before {\n  content: \"\\e020\";\n}\n.glyphicon-home:before {\n  content: \"\\e021\";\n}\n.glyphicon-file:before {\n  content: \"\\e022\";\n}\n.glyphicon-time:before {\n  content: \"\\e023\";\n}\n.glyphicon-road:before {\n  content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n  content: \"\\e025\";\n}\n.glyphicon-download:before {\n  content: \"\\e026\";\n}\n.glyphicon-upload:before {\n  content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n  content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n  content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n  content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n  content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n  content: \"\\e032\";\n}\n.glyphicon-lock:before {\n  content: \"\\e033\";\n}\n.glyphicon-flag:before {\n  content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n  content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n  content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n  content: \"\\e037\";\n}\n.glyphicon-volume-up:before {\n  content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n  content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n  content: \"\\e040\";\n}\n.glyphicon-tag:before {\n  content: \"\\e041\";\n}\n.glyphicon-tags:before {\n  content: \"\\e042\";\n}\n.glyphicon-book:before {\n  content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n  content: \"\\e044\";\n}\n.glyphicon-print:before {\n  content: \"\\e045\";\n}\n.glyphicon-camera:before {\n  content: \"\\e046\";\n}\n.glyphicon-font:before {\n  content: \"\\e047\";\n}\n.glyphicon-bold:before {\n  content: \"\\e048\";\n}\n.glyphicon-italic:before {\n  content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n  content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n  content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n  content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n  content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n  content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n  content: \"\\e055\";\n}\n.glyphicon-list:before {\n  content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n  content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n  content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n  content: \"\\e059\";\n}\n.glyphicon-picture:before {\n  content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n  content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n  content: \"\\e063\";\n}\n.glyphicon-tint:before {\n  content: \"\\e064\";\n}\n.glyphicon-edit:before {\n  content: \"\\e065\";\n}\n.glyphicon-share:before {\n  content: \"\\e066\";\n}\n.glyphicon-check:before {\n  content: \"\\e067\";\n}\n.glyphicon-move:before {\n  content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n  content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n  content: \"\\e070\";\n}\n.glyphicon-backward:before {\n  content: \"\\e071\";\n}\n.glyphicon-play:before {\n  content: \"\\e072\";\n}\n.glyphicon-pause:before {\n  content: \"\\e073\";\n}\n.glyphicon-stop:before {\n  content: \"\\e074\";\n}\n.glyphicon-forward:before {\n  content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n  content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n  content: \"\\e077\";\n}\n.glyphicon-eject:before {\n  content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n  content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n  content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n  content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n  content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n  content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n  content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n  content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n  content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n  content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n  content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n  content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n  content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\n  content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n  content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n  content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n  content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n  content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n  content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n  content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n  content: \"\\e101\";\n}\n.glyphicon-gift:before {\n  content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n  content: \"\\e103\";\n}\n.glyphicon-fire:before {\n  content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n  content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n  content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n  content: \"\\e107\";\n}\n.glyphicon-plane:before {\n  content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n  content: \"\\e109\";\n}\n.glyphicon-random:before {\n  content: \"\\e110\";\n}\n.glyphicon-comment:before {\n  content: \"\\e111\";\n}\n.glyphicon-magnet:before {\n  content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n  content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n  content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n  content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n  content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n  content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n  content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n  content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n  content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n  content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n  content: \"\\e122\";\n}\n.glyphicon-bell:before {\n  content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n  content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n  content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n  content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n  content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n  content: \"\\e128\";\n}\n.glyphicon-hand-up:before {\n  content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n  content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n  content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n  content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n  content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n  content: \"\\e134\";\n}\n.glyphicon-globe:before {\n  content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n  content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n  content: \"\\e137\";\n}\n.glyphicon-filter:before {\n  content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n  content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n  content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n  content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n  content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n  content: \"\\e143\";\n}\n.glyphicon-link:before {\n  content: \"\\e144\";\n}\n.glyphicon-phone:before {\n  content: \"\\e145\";\n}\n.glyphicon-pushpin:before {\n  content: \"\\e146\";\n}\n.glyphicon-usd:before {\n  content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n  content: \"\\e149\";\n}\n.glyphicon-sort:before {\n  content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n  content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n  content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n  content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n  content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n  content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n  content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n  content: \"\\e157\";\n}\n.glyphicon-expand:before {\n  content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n  content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n  content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n  content: \"\\e161\";\n}\n.glyphicon-flash:before {\n  content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n  content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n  content: \"\\e164\";\n}\n.glyphicon-record:before {\n  content: \"\\e165\";\n}\n.glyphicon-save:before {\n  content: \"\\e166\";\n}\n.glyphicon-open:before {\n  content: \"\\e167\";\n}\n.glyphicon-saved:before {\n  content: \"\\e168\";\n}\n.glyphicon-import:before {\n  content: \"\\e169\";\n}\n.glyphicon-export:before {\n  content: \"\\e170\";\n}\n.glyphicon-send:before {\n  content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n  content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n  content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n  content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n  content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n  content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n  content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n  content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n  content: \"\\e179\";\n}\n.glyphicon-header:before {\n  content: \"\\e180\";\n}\n.glyphicon-compressed:before {\n  content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n  content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n  content: \"\\e183\";\n}\n.glyphicon-tower:before {\n  content: \"\\e184\";\n}\n.glyphicon-stats:before {\n  content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n  content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n  content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n  content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n  content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n  content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n  content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n  content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n  content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n  content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n  content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n  content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n  content: \"\\e198\";\n}\n.glyphicon-tree-conifer:before {\n  content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n  content: \"\\e200\";\n}\n.glyphicon-cd:before {\n  content: \"\\e201\";\n}\n.glyphicon-save-file:before {\n  content: \"\\e202\";\n}\n.glyphicon-open-file:before {\n  content: \"\\e203\";\n}\n.glyphicon-level-up:before {\n  content: \"\\e204\";\n}\n.glyphicon-copy:before {\n  content: \"\\e205\";\n}\n.glyphicon-paste:before {\n  content: \"\\e206\";\n}\n.glyphicon-alert:before {\n  content: \"\\e209\";\n}\n.glyphicon-equalizer:before {\n  content: \"\\e210\";\n}\n.glyphicon-king:before {\n  content: \"\\e211\";\n}\n.glyphicon-queen:before {\n  content: \"\\e212\";\n}\n.glyphicon-pawn:before {\n  content: \"\\e213\";\n}\n.glyphicon-bishop:before {\n  content: \"\\e214\";\n}\n.glyphicon-knight:before {\n  content: \"\\e215\";\n}\n.glyphicon-baby-formula:before {\n  content: \"\\e216\";\n}\n.glyphicon-tent:before {\n  content: \"\\26fa\";\n}\n.glyphicon-blackboard:before {\n  content: \"\\e218\";\n}\n.glyphicon-bed:before {\n  content: \"\\e219\";\n}\n.glyphicon-apple:before {\n  content: \"\\f8ff\";\n}\n.glyphicon-erase:before {\n  content: \"\\e221\";\n}\n.glyphicon-hourglass:before {\n  content: \"\\231b\";\n}\n.glyphicon-lamp:before {\n  content: \"\\e223\";\n}\n.glyphicon-duplicate:before {\n  content: \"\\e224\";\n}\n.glyphicon-piggy-bank:before {\n  content: \"\\e225\";\n}\n.glyphicon-scissors:before {\n  content: \"\\e226\";\n}\n.glyphicon-bitcoin:before {\n  content: \"\\e227\";\n}\n.glyphicon-btc:before {\n  content: \"\\e227\";\n}\n.glyphicon-xbt:before {\n  content: \"\\e227\";\n}\n.glyphicon-yen:before {\n  content: \"\\00a5\";\n}\n.glyphicon-jpy:before {\n  content: \"\\00a5\";\n}\n.glyphicon-ruble:before {\n  content: \"\\20bd\";\n}\n.glyphicon-rub:before {\n  content: \"\\20bd\";\n}\n.glyphicon-scale:before {\n  content: \"\\e230\";\n}\n.glyphicon-ice-lolly:before {\n  content: \"\\e231\";\n}\n.glyphicon-ice-lolly-tasted:before {\n  content: \"\\e232\";\n}\n.glyphicon-education:before {\n  content: \"\\e233\";\n}\n.glyphicon-option-horizontal:before {\n  content: \"\\e234\";\n}\n.glyphicon-option-vertical:before {\n  content: \"\\e235\";\n}\n.glyphicon-menu-hamburger:before {\n  content: \"\\e236\";\n}\n.glyphicon-modal-window:before {\n  content: \"\\e237\";\n}\n.glyphicon-oil:before {\n  content: \"\\e238\";\n}\n.glyphicon-grain:before {\n  content: \"\\e239\";\n}\n.glyphicon-sunglasses:before {\n  content: \"\\e240\";\n}\n.glyphicon-text-size:before {\n  content: \"\\e241\";\n}\n.glyphicon-text-color:before {\n  content: \"\\e242\";\n}\n.glyphicon-text-background:before {\n  content: \"\\e243\";\n}\n.glyphicon-object-align-top:before {\n  content: \"\\e244\";\n}\n.glyphicon-object-align-bottom:before {\n  content: \"\\e245\";\n}\n.glyphicon-object-align-horizontal:before {\n  content: \"\\e246\";\n}\n.glyphicon-object-align-left:before {\n  content: \"\\e247\";\n}\n.glyphicon-object-align-vertical:before {\n  content: \"\\e248\";\n}\n.glyphicon-object-align-right:before {\n  content: \"\\e249\";\n}\n.glyphicon-triangle-right:before {\n  content: \"\\e250\";\n}\n.glyphicon-triangle-left:before {\n  content: \"\\e251\";\n}\n.glyphicon-triangle-bottom:before {\n  content: \"\\e252\";\n}\n.glyphicon-triangle-top:before {\n  content: \"\\e253\";\n}\n.glyphicon-console:before {\n  content: \"\\e254\";\n}\n.glyphicon-superscript:before {\n  content: \"\\e255\";\n}\n.glyphicon-subscript:before {\n  content: \"\\e256\";\n}\n.glyphicon-menu-left:before {\n  content: \"\\e257\";\n}\n.glyphicon-menu-right:before {\n  content: \"\\e258\";\n}\n.glyphicon-menu-down:before {\n  content: \"\\e259\";\n}\n.glyphicon-menu-up:before {\n  content: \"\\e260\";\n}\n* {\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\n*:before,\n*:after {\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\nhtml {\n  font-size: 10px;\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #333333;\n  background-color: #fff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n  font-family: inherit;\n  font-size: inherit;\n  line-height: inherit;\n}\na {\n  color: #337ab7;\n  text-decoration: none;\n}\na:hover,\na:focus {\n  color: #23527c;\n  text-decoration: underline;\n}\na:focus {\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\nfigure {\n  margin: 0;\n}\nimg {\n  vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n  display: block;\n  max-width: 100%;\n  height: auto;\n}\n.img-rounded {\n  border-radius: 6px;\n}\n.img-thumbnail {\n  padding: 4px;\n  line-height: 1.42857143;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 4px;\n  -webkit-transition: all 0.2s ease-in-out;\n  -o-transition: all 0.2s ease-in-out;\n  transition: all 0.2s ease-in-out;\n  display: inline-block;\n  max-width: 100%;\n  height: auto;\n}\n.img-circle {\n  border-radius: 50%;\n}\nhr {\n  margin-top: 20px;\n  margin-bottom: 20px;\n  border: 0;\n  border-top: 1px solid #eeeeee;\n}\n.sr-only {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  padding: 0;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n  position: static;\n  width: auto;\n  height: auto;\n  margin: 0;\n  overflow: visible;\n  clip: auto;\n}\n[role=\"button\"] {\n  cursor: pointer;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n  font-family: inherit;\n  font-weight: 500;\n  line-height: 1.1;\n  color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n  font-weight: normal;\n  line-height: 1;\n  color: #777777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n  margin-top: 20px;\n  margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n  font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n  font-size: 75%;\n}\nh1,\n.h1 {\n  font-size: 36px;\n}\nh2,\n.h2 {\n  font-size: 30px;\n}\nh3,\n.h3 {\n  font-size: 24px;\n}\nh4,\n.h4 {\n  font-size: 18px;\n}\nh5,\n.h5 {\n  font-size: 14px;\n}\nh6,\n.h6 {\n  font-size: 12px;\n}\np {\n  margin: 0 0 10px;\n}\n.lead {\n  margin-bottom: 20px;\n  font-size: 16px;\n  font-weight: 300;\n  line-height: 1.4;\n}\n@media (min-width: 768px) {\n  .lead {\n    font-size: 21px;\n  }\n}\nsmall,\n.small {\n  font-size: 85%;\n}\nmark,\n.mark {\n  background-color: #fcf8e3;\n  padding: .2em;\n}\n.text-left {\n  text-align: left;\n}\n.text-right {\n  text-align: right;\n}\n.text-center {\n  text-align: center;\n}\n.text-justify {\n  text-align: justify;\n}\n.text-nowrap {\n  white-space: nowrap;\n}\n.text-lowercase {\n  text-transform: lowercase;\n}\n.text-uppercase {\n  text-transform: uppercase;\n}\n.text-capitalize {\n  text-transform: capitalize;\n}\n.text-muted {\n  color: #777777;\n}\n.text-primary {\n  color: #337ab7;\n}\na.text-primary:hover,\na.text-primary:focus {\n  color: #286090;\n}\n.text-success {\n  color: #3c763d;\n}\na.text-success:hover,\na.text-success:focus {\n  color: #2b542c;\n}\n.text-info {\n  color: #31708f;\n}\na.text-info:hover,\na.text-info:focus {\n  color: #245269;\n}\n.text-warning {\n  color: #8a6d3b;\n}\na.text-warning:hover,\na.text-warning:focus {\n  color: #66512c;\n}\n.text-danger {\n  color: #a94442;\n}\na.text-danger:hover,\na.text-danger:focus {\n  color: #843534;\n}\n.bg-primary {\n  color: #fff;\n  background-color: #337ab7;\n}\na.bg-primary:hover,\na.bg-primary:focus {\n  background-color: #286090;\n}\n.bg-success {\n  background-color: #dff0d8;\n}\na.bg-success:hover,\na.bg-success:focus {\n  background-color: #c1e2b3;\n}\n.bg-info {\n  background-color: #d9edf7;\n}\na.bg-info:hover,\na.bg-info:focus {\n  background-color: #afd9ee;\n}\n.bg-warning {\n  background-color: #fcf8e3;\n}\na.bg-warning:hover,\na.bg-warning:focus {\n  background-color: #f7ecb5;\n}\n.bg-danger {\n  background-color: #f2dede;\n}\na.bg-danger:hover,\na.bg-danger:focus {\n  background-color: #e4b9b9;\n}\n.page-header {\n  padding-bottom: 9px;\n  margin: 40px 0 20px;\n  border-bottom: 1px solid #eeeeee;\n}\nul,\nol {\n  margin-top: 0;\n  margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n  margin-bottom: 0;\n}\n.list-unstyled {\n  padding-left: 0;\n  list-style: none;\n}\n.list-inline {\n  padding-left: 0;\n  list-style: none;\n  margin-left: -5px;\n}\n.list-inline > li {\n  display: inline-block;\n  padding-left: 5px;\n  padding-right: 5px;\n}\ndl {\n  margin-top: 0;\n  margin-bottom: 20px;\n}\ndt,\ndd {\n  line-height: 1.42857143;\n}\ndt {\n  font-weight: bold;\n}\ndd {\n  margin-left: 0;\n}\n@media (min-width: 768px) {\n  .dl-horizontal dt {\n    float: left;\n    width: 160px;\n    clear: left;\n    text-align: right;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n  }\n  .dl-horizontal dd {\n    margin-left: 180px;\n  }\n}\nabbr[title],\nabbr[data-original-title] {\n  cursor: help;\n  border-bottom: 1px dotted #777777;\n}\n.initialism {\n  font-size: 90%;\n  text-transform: uppercase;\n}\nblockquote {\n  padding: 10px 20px;\n  margin: 0 0 20px;\n  font-size: 17.5px;\n  border-left: 5px solid #eeeeee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n  margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n  display: block;\n  font-size: 80%;\n  line-height: 1.42857143;\n  color: #777777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n  content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n  padding-right: 15px;\n  padding-left: 0;\n  border-right: 5px solid #eeeeee;\n  border-left: 0;\n  text-align: right;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n  content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n  content: '\\00A0 \\2014';\n}\naddress {\n  margin-bottom: 20px;\n  font-style: normal;\n  line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n  font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: #c7254e;\n  background-color: #f9f2f4;\n  border-radius: 4px;\n}\nkbd {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: #fff;\n  background-color: #333;\n  border-radius: 3px;\n  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\nkbd kbd {\n  padding: 0;\n  font-size: 100%;\n  font-weight: bold;\n  box-shadow: none;\n}\npre {\n  display: block;\n  padding: 9.5px;\n  margin: 0 0 10px;\n  font-size: 13px;\n  line-height: 1.42857143;\n  word-break: break-all;\n  word-wrap: break-word;\n  color: #333333;\n  background-color: #f5f5f5;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n}\npre code {\n  padding: 0;\n  font-size: inherit;\n  color: inherit;\n  white-space: pre-wrap;\n  background-color: transparent;\n  border-radius: 0;\n}\n.pre-scrollable {\n  max-height: 340px;\n  overflow-y: scroll;\n}\n.container {\n  margin-right: auto;\n  margin-left: auto;\n  padding-left: 15px;\n  padding-right: 15px;\n}\n@media (min-width: 768px) {\n  .container {\n    width: 750px;\n  }\n}\n@media (min-width: 992px) {\n  .container {\n    width: 970px;\n  }\n}\n@media (min-width: 1200px) {\n  .container {\n    width: 1170px;\n  }\n}\n.container-fluid {\n  margin-right: auto;\n  margin-left: auto;\n  padding-left: 15px;\n  padding-right: 15px;\n}\n.row {\n  margin-left: -15px;\n  margin-right: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n  position: relative;\n  min-height: 1px;\n  padding-left: 15px;\n  padding-right: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n  float: left;\n}\n.col-xs-12 {\n  width: 100%;\n}\n.col-xs-11 {\n  width: 91.66666667%;\n}\n.col-xs-10 {\n  width: 83.33333333%;\n}\n.col-xs-9 {\n  width: 75%;\n}\n.col-xs-8 {\n  width: 66.66666667%;\n}\n.col-xs-7 {\n  width: 58.33333333%;\n}\n.col-xs-6 {\n  width: 50%;\n}\n.col-xs-5 {\n  width: 41.66666667%;\n}\n.col-xs-4 {\n  width: 33.33333333%;\n}\n.col-xs-3 {\n  width: 25%;\n}\n.col-xs-2 {\n  width: 16.66666667%;\n}\n.col-xs-1 {\n  width: 8.33333333%;\n}\n.col-xs-pull-12 {\n  right: 100%;\n}\n.col-xs-pull-11 {\n  right: 91.66666667%;\n}\n.col-xs-pull-10 {\n  right: 83.33333333%;\n}\n.col-xs-pull-9 {\n  right: 75%;\n}\n.col-xs-pull-8 {\n  right: 66.66666667%;\n}\n.col-xs-pull-7 {\n  right: 58.33333333%;\n}\n.col-xs-pull-6 {\n  right: 50%;\n}\n.col-xs-pull-5 {\n  right: 41.66666667%;\n}\n.col-xs-pull-4 {\n  right: 33.33333333%;\n}\n.col-xs-pull-3 {\n  right: 25%;\n}\n.col-xs-pull-2 {\n  right: 16.66666667%;\n}\n.col-xs-pull-1 {\n  right: 8.33333333%;\n}\n.col-xs-pull-0 {\n  right: auto;\n}\n.col-xs-push-12 {\n  left: 100%;\n}\n.col-xs-push-11 {\n  left: 91.66666667%;\n}\n.col-xs-push-10 {\n  left: 83.33333333%;\n}\n.col-xs-push-9 {\n  left: 75%;\n}\n.col-xs-push-8 {\n  left: 66.66666667%;\n}\n.col-xs-push-7 {\n  left: 58.33333333%;\n}\n.col-xs-push-6 {\n  left: 50%;\n}\n.col-xs-push-5 {\n  left: 41.66666667%;\n}\n.col-xs-push-4 {\n  left: 33.33333333%;\n}\n.col-xs-push-3 {\n  left: 25%;\n}\n.col-xs-push-2 {\n  left: 16.66666667%;\n}\n.col-xs-push-1 {\n  left: 8.33333333%;\n}\n.col-xs-push-0 {\n  left: auto;\n}\n.col-xs-offset-12 {\n  margin-left: 100%;\n}\n.col-xs-offset-11 {\n  margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n  margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n  margin-left: 75%;\n}\n.col-xs-offset-8 {\n  margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n  margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n  margin-left: 50%;\n}\n.col-xs-offset-5 {\n  margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n  margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n  margin-left: 25%;\n}\n.col-xs-offset-2 {\n  margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n  margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n  margin-left: 0%;\n}\n@media (min-width: 768px) {\n  .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n    float: left;\n  }\n  .col-sm-12 {\n    width: 100%;\n  }\n  .col-sm-11 {\n    width: 91.66666667%;\n  }\n  .col-sm-10 {\n    width: 83.33333333%;\n  }\n  .col-sm-9 {\n    width: 75%;\n  }\n  .col-sm-8 {\n    width: 66.66666667%;\n  }\n  .col-sm-7 {\n    width: 58.33333333%;\n  }\n  .col-sm-6 {\n    width: 50%;\n  }\n  .col-sm-5 {\n    width: 41.66666667%;\n  }\n  .col-sm-4 {\n    width: 33.33333333%;\n  }\n  .col-sm-3 {\n    width: 25%;\n  }\n  .col-sm-2 {\n    width: 16.66666667%;\n  }\n  .col-sm-1 {\n    width: 8.33333333%;\n  }\n  .col-sm-pull-12 {\n    right: 100%;\n  }\n  .col-sm-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-sm-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-sm-pull-9 {\n    right: 75%;\n  }\n  .col-sm-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-sm-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-sm-pull-6 {\n    right: 50%;\n  }\n  .col-sm-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-sm-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-sm-pull-3 {\n    right: 25%;\n  }\n  .col-sm-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-sm-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-sm-pull-0 {\n    right: auto;\n  }\n  .col-sm-push-12 {\n    left: 100%;\n  }\n  .col-sm-push-11 {\n    left: 91.66666667%;\n  }\n  .col-sm-push-10 {\n    left: 83.33333333%;\n  }\n  .col-sm-push-9 {\n    left: 75%;\n  }\n  .col-sm-push-8 {\n    left: 66.66666667%;\n  }\n  .col-sm-push-7 {\n    left: 58.33333333%;\n  }\n  .col-sm-push-6 {\n    left: 50%;\n  }\n  .col-sm-push-5 {\n    left: 41.66666667%;\n  }\n  .col-sm-push-4 {\n    left: 33.33333333%;\n  }\n  .col-sm-push-3 {\n    left: 25%;\n  }\n  .col-sm-push-2 {\n    left: 16.66666667%;\n  }\n  .col-sm-push-1 {\n    left: 8.33333333%;\n  }\n  .col-sm-push-0 {\n    left: auto;\n  }\n  .col-sm-offset-12 {\n    margin-left: 100%;\n  }\n  .col-sm-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-sm-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-sm-offset-9 {\n    margin-left: 75%;\n  }\n  .col-sm-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-sm-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-sm-offset-6 {\n    margin-left: 50%;\n  }\n  .col-sm-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-sm-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-sm-offset-3 {\n    margin-left: 25%;\n  }\n  .col-sm-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-sm-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-sm-offset-0 {\n    margin-left: 0%;\n  }\n}\n@media (min-width: 992px) {\n  .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n    float: left;\n  }\n  .col-md-12 {\n    width: 100%;\n  }\n  .col-md-11 {\n    width: 91.66666667%;\n  }\n  .col-md-10 {\n    width: 83.33333333%;\n  }\n  .col-md-9 {\n    width: 75%;\n  }\n  .col-md-8 {\n    width: 66.66666667%;\n  }\n  .col-md-7 {\n    width: 58.33333333%;\n  }\n  .col-md-6 {\n    width: 50%;\n  }\n  .col-md-5 {\n    width: 41.66666667%;\n  }\n  .col-md-4 {\n    width: 33.33333333%;\n  }\n  .col-md-3 {\n    width: 25%;\n  }\n  .col-md-2 {\n    width: 16.66666667%;\n  }\n  .col-md-1 {\n    width: 8.33333333%;\n  }\n  .col-md-pull-12 {\n    right: 100%;\n  }\n  .col-md-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-md-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-md-pull-9 {\n    right: 75%;\n  }\n  .col-md-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-md-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-md-pull-6 {\n    right: 50%;\n  }\n  .col-md-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-md-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-md-pull-3 {\n    right: 25%;\n  }\n  .col-md-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-md-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-md-pull-0 {\n    right: auto;\n  }\n  .col-md-push-12 {\n    left: 100%;\n  }\n  .col-md-push-11 {\n    left: 91.66666667%;\n  }\n  .col-md-push-10 {\n    left: 83.33333333%;\n  }\n  .col-md-push-9 {\n    left: 75%;\n  }\n  .col-md-push-8 {\n    left: 66.66666667%;\n  }\n  .col-md-push-7 {\n    left: 58.33333333%;\n  }\n  .col-md-push-6 {\n    left: 50%;\n  }\n  .col-md-push-5 {\n    left: 41.66666667%;\n  }\n  .col-md-push-4 {\n    left: 33.33333333%;\n  }\n  .col-md-push-3 {\n    left: 25%;\n  }\n  .col-md-push-2 {\n    left: 16.66666667%;\n  }\n  .col-md-push-1 {\n    left: 8.33333333%;\n  }\n  .col-md-push-0 {\n    left: auto;\n  }\n  .col-md-offset-12 {\n    margin-left: 100%;\n  }\n  .col-md-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-md-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-md-offset-9 {\n    margin-left: 75%;\n  }\n  .col-md-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-md-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-md-offset-6 {\n    margin-left: 50%;\n  }\n  .col-md-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-md-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-md-offset-3 {\n    margin-left: 25%;\n  }\n  .col-md-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-md-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-md-offset-0 {\n    margin-left: 0%;\n  }\n}\n@media (min-width: 1200px) {\n  .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n    float: left;\n  }\n  .col-lg-12 {\n    width: 100%;\n  }\n  .col-lg-11 {\n    width: 91.66666667%;\n  }\n  .col-lg-10 {\n    width: 83.33333333%;\n  }\n  .col-lg-9 {\n    width: 75%;\n  }\n  .col-lg-8 {\n    width: 66.66666667%;\n  }\n  .col-lg-7 {\n    width: 58.33333333%;\n  }\n  .col-lg-6 {\n    width: 50%;\n  }\n  .col-lg-5 {\n    width: 41.66666667%;\n  }\n  .col-lg-4 {\n    width: 33.33333333%;\n  }\n  .col-lg-3 {\n    width: 25%;\n  }\n  .col-lg-2 {\n    width: 16.66666667%;\n  }\n  .col-lg-1 {\n    width: 8.33333333%;\n  }\n  .col-lg-pull-12 {\n    right: 100%;\n  }\n  .col-lg-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-lg-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-lg-pull-9 {\n    right: 75%;\n  }\n  .col-lg-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-lg-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-lg-pull-6 {\n    right: 50%;\n  }\n  .col-lg-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-lg-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-lg-pull-3 {\n    right: 25%;\n  }\n  .col-lg-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-lg-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-lg-pull-0 {\n    right: auto;\n  }\n  .col-lg-push-12 {\n    left: 100%;\n  }\n  .col-lg-push-11 {\n    left: 91.66666667%;\n  }\n  .col-lg-push-10 {\n    left: 83.33333333%;\n  }\n  .col-lg-push-9 {\n    left: 75%;\n  }\n  .col-lg-push-8 {\n    left: 66.66666667%;\n  }\n  .col-lg-push-7 {\n    left: 58.33333333%;\n  }\n  .col-lg-push-6 {\n    left: 50%;\n  }\n  .col-lg-push-5 {\n    left: 41.66666667%;\n  }\n  .col-lg-push-4 {\n    left: 33.33333333%;\n  }\n  .col-lg-push-3 {\n    left: 25%;\n  }\n  .col-lg-push-2 {\n    left: 16.66666667%;\n  }\n  .col-lg-push-1 {\n    left: 8.33333333%;\n  }\n  .col-lg-push-0 {\n    left: auto;\n  }\n  .col-lg-offset-12 {\n    margin-left: 100%;\n  }\n  .col-lg-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-lg-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-lg-offset-9 {\n    margin-left: 75%;\n  }\n  .col-lg-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-lg-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-lg-offset-6 {\n    margin-left: 50%;\n  }\n  .col-lg-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-lg-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-lg-offset-3 {\n    margin-left: 25%;\n  }\n  .col-lg-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-lg-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-lg-offset-0 {\n    margin-left: 0%;\n  }\n}\ntable {\n  background-color: transparent;\n}\ncaption {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  color: #777777;\n  text-align: left;\n}\nth {\n  text-align: left;\n}\n.table {\n  width: 100%;\n  max-width: 100%;\n  margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n  padding: 8px;\n  line-height: 1.42857143;\n  vertical-align: top;\n  border-top: 1px solid #ddd;\n}\n.table > thead > tr > th {\n  vertical-align: bottom;\n  border-bottom: 2px solid #ddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n  border-top: 0;\n}\n.table > tbody + tbody {\n  border-top: 2px solid #ddd;\n}\n.table .table {\n  background-color: #fff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n  padding: 5px;\n}\n.table-bordered {\n  border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n  border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n  border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-of-type(odd) {\n  background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n  background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n  position: static;\n  float: none;\n  display: table-column;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n  position: static;\n  float: none;\n  display: table-cell;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n  background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n  background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n  background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n  background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n  background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n  background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n  background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n  background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n  background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n  background-color: #ebcccc;\n}\n.table-responsive {\n  overflow-x: auto;\n  min-height: 0.01%;\n}\n@media screen and (max-width: 767px) {\n  .table-responsive {\n    width: 100%;\n    margin-bottom: 15px;\n    overflow-y: hidden;\n    -ms-overflow-style: -ms-autohiding-scrollbar;\n    border: 1px solid #ddd;\n  }\n  .table-responsive > .table {\n    margin-bottom: 0;\n  }\n  .table-responsive > .table > thead > tr > th,\n  .table-responsive > .table > tbody > tr > th,\n  .table-responsive > .table > tfoot > tr > th,\n  .table-responsive > .table > thead > tr > td,\n  .table-responsive > .table > tbody > tr > td,\n  .table-responsive > .table > tfoot > tr > td {\n    white-space: nowrap;\n  }\n  .table-responsive > .table-bordered {\n    border: 0;\n  }\n  .table-responsive > .table-bordered > thead > tr > th:first-child,\n  .table-responsive > .table-bordered > tbody > tr > th:first-child,\n  .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n  .table-responsive > .table-bordered > thead > tr > td:first-child,\n  .table-responsive > .table-bordered > tbody > tr > td:first-child,\n  .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n    border-left: 0;\n  }\n  .table-responsive > .table-bordered > thead > tr > th:last-child,\n  .table-responsive > .table-bordered > tbody > tr > th:last-child,\n  .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n  .table-responsive > .table-bordered > thead > tr > td:last-child,\n  .table-responsive > .table-bordered > tbody > tr > td:last-child,\n  .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n    border-right: 0;\n  }\n  .table-responsive > .table-bordered > tbody > tr:last-child > th,\n  .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n  .table-responsive > .table-bordered > tbody > tr:last-child > td,\n  .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n    border-bottom: 0;\n  }\n}\nfieldset {\n  padding: 0;\n  margin: 0;\n  border: 0;\n  min-width: 0;\n}\nlegend {\n  display: block;\n  width: 100%;\n  padding: 0;\n  margin-bottom: 20px;\n  font-size: 21px;\n  line-height: inherit;\n  color: #333333;\n  border: 0;\n  border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n  display: inline-block;\n  max-width: 100%;\n  margin-bottom: 5px;\n  font-weight: bold;\n}\ninput[type=\"search\"] {\n  -webkit-box-sizing: border-box;\n  -moz-box-sizing: border-box;\n  box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n  margin: 4px 0 0;\n  margin-top: 1px \\9;\n  line-height: normal;\n}\ninput[type=\"file\"] {\n  display: block;\n}\ninput[type=\"range\"] {\n  display: block;\n  width: 100%;\n}\nselect[multiple],\nselect[size] {\n  height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\noutput {\n  display: block;\n  padding-top: 7px;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #555555;\n}\n.form-control {\n  display: block;\n  width: 100%;\n  height: 34px;\n  padding: 6px 12px;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #555555;\n  background-color: #fff;\n  background-image: none;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n  -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n  border-color: #66afe9;\n  outline: 0;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n}\n.form-control::-moz-placeholder {\n  color: #999;\n  opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n  color: #999;\n}\n.form-control::-webkit-input-placeholder {\n  color: #999;\n}\n.form-control::-ms-expand {\n  border: 0;\n  background-color: transparent;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n  background-color: #eeeeee;\n  opacity: 1;\n}\n.form-control[disabled],\nfieldset[disabled] .form-control {\n  cursor: not-allowed;\n}\ntextarea.form-control {\n  height: auto;\n}\ninput[type=\"search\"] {\n  -webkit-appearance: none;\n}\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n  input[type=\"date\"].form-control,\n  input[type=\"time\"].form-control,\n  input[type=\"datetime-local\"].form-control,\n  input[type=\"month\"].form-control {\n    line-height: 34px;\n  }\n  input[type=\"date\"].input-sm,\n  input[type=\"time\"].input-sm,\n  input[type=\"datetime-local\"].input-sm,\n  input[type=\"month\"].input-sm,\n  .input-group-sm input[type=\"date\"],\n  .input-group-sm input[type=\"time\"],\n  .input-group-sm input[type=\"datetime-local\"],\n  .input-group-sm input[type=\"month\"] {\n    line-height: 30px;\n  }\n  input[type=\"date\"].input-lg,\n  input[type=\"time\"].input-lg,\n  input[type=\"datetime-local\"].input-lg,\n  input[type=\"month\"].input-lg,\n  .input-group-lg input[type=\"date\"],\n  .input-group-lg input[type=\"time\"],\n  .input-group-lg input[type=\"datetime-local\"],\n  .input-group-lg input[type=\"month\"] {\n    line-height: 46px;\n  }\n}\n.form-group {\n  margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n  position: relative;\n  display: block;\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n  min-height: 20px;\n  padding-left: 20px;\n  margin-bottom: 0;\n  font-weight: normal;\n  cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n  position: absolute;\n  margin-left: -20px;\n  margin-top: 4px \\9;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n  margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n  position: relative;\n  display: inline-block;\n  padding-left: 20px;\n  margin-bottom: 0;\n  vertical-align: middle;\n  font-weight: normal;\n  cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n  margin-top: 0;\n  margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n  cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n  cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n  cursor: not-allowed;\n}\n.form-control-static {\n  padding-top: 7px;\n  padding-bottom: 7px;\n  margin-bottom: 0;\n  min-height: 34px;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n  padding-left: 0;\n  padding-right: 0;\n}\n.input-sm {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\nselect.input-sm {\n  height: 30px;\n  line-height: 30px;\n}\ntextarea.input-sm,\nselect[multiple].input-sm {\n  height: auto;\n}\n.form-group-sm .form-control {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.form-group-sm select.form-control {\n  height: 30px;\n  line-height: 30px;\n}\n.form-group-sm textarea.form-control,\n.form-group-sm select[multiple].form-control {\n  height: auto;\n}\n.form-group-sm .form-control-static {\n  height: 30px;\n  min-height: 32px;\n  padding: 6px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n}\n.input-lg {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\nselect.input-lg {\n  height: 46px;\n  line-height: 46px;\n}\ntextarea.input-lg,\nselect[multiple].input-lg {\n  height: auto;\n}\n.form-group-lg .form-control {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\n.form-group-lg select.form-control {\n  height: 46px;\n  line-height: 46px;\n}\n.form-group-lg textarea.form-control,\n.form-group-lg select[multiple].form-control {\n  height: auto;\n}\n.form-group-lg .form-control-static {\n  height: 46px;\n  min-height: 38px;\n  padding: 11px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n}\n.has-feedback {\n  position: relative;\n}\n.has-feedback .form-control {\n  padding-right: 42.5px;\n}\n.form-control-feedback {\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: 2;\n  display: block;\n  width: 34px;\n  height: 34px;\n  line-height: 34px;\n  text-align: center;\n  pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n  width: 46px;\n  height: 46px;\n  line-height: 46px;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n  width: 30px;\n  height: 30px;\n  line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n  color: #3c763d;\n}\n.has-success .form-control {\n  border-color: #3c763d;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-success .form-control:focus {\n  border-color: #2b542c;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n  color: #3c763d;\n  border-color: #3c763d;\n  background-color: #dff0d8;\n}\n.has-success .form-control-feedback {\n  color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n  color: #8a6d3b;\n}\n.has-warning .form-control {\n  border-color: #8a6d3b;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-warning .form-control:focus {\n  border-color: #66512c;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n  color: #8a6d3b;\n  border-color: #8a6d3b;\n  background-color: #fcf8e3;\n}\n.has-warning .form-control-feedback {\n  color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n  color: #a94442;\n}\n.has-error .form-control {\n  border-color: #a94442;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-error .form-control:focus {\n  border-color: #843534;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n  color: #a94442;\n  border-color: #a94442;\n  background-color: #f2dede;\n}\n.has-error .form-control-feedback {\n  color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n  top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n  top: 0;\n}\n.help-block {\n  display: block;\n  margin-top: 5px;\n  margin-bottom: 10px;\n  color: #737373;\n}\n@media (min-width: 768px) {\n  .form-inline .form-group {\n    display: inline-block;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .form-control {\n    display: inline-block;\n    width: auto;\n    vertical-align: middle;\n  }\n  .form-inline .form-control-static {\n    display: inline-block;\n  }\n  .form-inline .input-group {\n    display: inline-table;\n    vertical-align: middle;\n  }\n  .form-inline .input-group .input-group-addon,\n  .form-inline .input-group .input-group-btn,\n  .form-inline .input-group .form-control {\n    width: auto;\n  }\n  .form-inline .input-group > .form-control {\n    width: 100%;\n  }\n  .form-inline .control-label {\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .radio,\n  .form-inline .checkbox {\n    display: inline-block;\n    margin-top: 0;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .radio label,\n  .form-inline .checkbox label {\n    padding-left: 0;\n  }\n  .form-inline .radio input[type=\"radio\"],\n  .form-inline .checkbox input[type=\"checkbox\"] {\n    position: relative;\n    margin-left: 0;\n  }\n  .form-inline .has-feedback .form-control-feedback {\n    top: 0;\n  }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n  margin-top: 0;\n  margin-bottom: 0;\n  padding-top: 7px;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n  min-height: 27px;\n}\n.form-horizontal .form-group {\n  margin-left: -15px;\n  margin-right: -15px;\n}\n@media (min-width: 768px) {\n  .form-horizontal .control-label {\n    text-align: right;\n    margin-bottom: 0;\n    padding-top: 7px;\n  }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n  right: 15px;\n}\n@media (min-width: 768px) {\n  .form-horizontal .form-group-lg .control-label {\n    padding-top: 11px;\n    font-size: 18px;\n  }\n}\n@media (min-width: 768px) {\n  .form-horizontal .form-group-sm .control-label {\n    padding-top: 6px;\n    font-size: 12px;\n  }\n}\n.btn {\n  display: inline-block;\n  margin-bottom: 0;\n  font-weight: normal;\n  text-align: center;\n  vertical-align: middle;\n  touch-action: manipulation;\n  cursor: pointer;\n  background-image: none;\n  border: 1px solid transparent;\n  white-space: nowrap;\n  padding: 6px 12px;\n  font-size: 14px;\n  line-height: 1.42857143;\n  border-radius: 4px;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n  color: #333;\n  text-decoration: none;\n}\n.btn:active,\n.btn.active {\n  outline: 0;\n  background-image: none;\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n  cursor: not-allowed;\n  opacity: 0.65;\n  filter: alpha(opacity=65);\n  -webkit-box-shadow: none;\n  box-shadow: none;\n}\na.btn.disabled,\nfieldset[disabled] a.btn {\n  pointer-events: none;\n}\n.btn-default {\n  color: #333;\n  background-color: #fff;\n  border-color: #ccc;\n}\n.btn-default:focus,\n.btn-default.focus {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #8c8c8c;\n}\n.btn-default:hover {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #adadad;\n}\n.btn-default:active:hover,\n.btn-default.active:hover,\n.open > .dropdown-toggle.btn-default:hover,\n.btn-default:active:focus,\n.btn-default.active:focus,\n.open > .dropdown-toggle.btn-default:focus,\n.btn-default:active.focus,\n.btn-default.active.focus,\n.open > .dropdown-toggle.btn-default.focus {\n  color: #333;\n  background-color: #d4d4d4;\n  border-color: #8c8c8c;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n  background-image: none;\n}\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus {\n  background-color: #fff;\n  border-color: #ccc;\n}\n.btn-default .badge {\n  color: #fff;\n  background-color: #333;\n}\n.btn-primary {\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #2e6da4;\n}\n.btn-primary:focus,\n.btn-primary.focus {\n  color: #fff;\n  background-color: #286090;\n  border-color: #122b40;\n}\n.btn-primary:hover {\n  color: #fff;\n  background-color: #286090;\n  border-color: #204d74;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n  color: #fff;\n  background-color: #286090;\n  border-color: #204d74;\n}\n.btn-primary:active:hover,\n.btn-primary.active:hover,\n.open > .dropdown-toggle.btn-primary:hover,\n.btn-primary:active:focus,\n.btn-primary.active:focus,\n.open > .dropdown-toggle.btn-primary:focus,\n.btn-primary:active.focus,\n.btn-primary.active.focus,\n.open > .dropdown-toggle.btn-primary.focus {\n  color: #fff;\n  background-color: #204d74;\n  border-color: #122b40;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n  background-image: none;\n}\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus {\n  background-color: #337ab7;\n  border-color: #2e6da4;\n}\n.btn-primary .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.btn-success {\n  color: #fff;\n  background-color: #5cb85c;\n  border-color: #4cae4c;\n}\n.btn-success:focus,\n.btn-success.focus {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #255625;\n}\n.btn-success:hover {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #398439;\n}\n.btn-success:active:hover,\n.btn-success.active:hover,\n.open > .dropdown-toggle.btn-success:hover,\n.btn-success:active:focus,\n.btn-success.active:focus,\n.open > .dropdown-toggle.btn-success:focus,\n.btn-success:active.focus,\n.btn-success.active.focus,\n.open > .dropdown-toggle.btn-success.focus {\n  color: #fff;\n  background-color: #398439;\n  border-color: #255625;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n  background-image: none;\n}\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus {\n  background-color: #5cb85c;\n  border-color: #4cae4c;\n}\n.btn-success .badge {\n  color: #5cb85c;\n  background-color: #fff;\n}\n.btn-info {\n  color: #fff;\n  background-color: #5bc0de;\n  border-color: #46b8da;\n}\n.btn-info:focus,\n.btn-info.focus {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #1b6d85;\n}\n.btn-info:hover {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #269abc;\n}\n.btn-info:active:hover,\n.btn-info.active:hover,\n.open > .dropdown-toggle.btn-info:hover,\n.btn-info:active:focus,\n.btn-info.active:focus,\n.open > .dropdown-toggle.btn-info:focus,\n.btn-info:active.focus,\n.btn-info.active.focus,\n.open > .dropdown-toggle.btn-info.focus {\n  color: #fff;\n  background-color: #269abc;\n  border-color: #1b6d85;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n  background-image: none;\n}\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus {\n  background-color: #5bc0de;\n  border-color: #46b8da;\n}\n.btn-info .badge {\n  color: #5bc0de;\n  background-color: #fff;\n}\n.btn-warning {\n  color: #fff;\n  background-color: #f0ad4e;\n  border-color: #eea236;\n}\n.btn-warning:focus,\n.btn-warning.focus {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #985f0d;\n}\n.btn-warning:hover {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #d58512;\n}\n.btn-warning:active:hover,\n.btn-warning.active:hover,\n.open > .dropdown-toggle.btn-warning:hover,\n.btn-warning:active:focus,\n.btn-warning.active:focus,\n.open > .dropdown-toggle.btn-warning:focus,\n.btn-warning:active.focus,\n.btn-warning.active.focus,\n.open > .dropdown-toggle.btn-warning.focus {\n  color: #fff;\n  background-color: #d58512;\n  border-color: #985f0d;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n  background-image: none;\n}\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus {\n  background-color: #f0ad4e;\n  border-color: #eea236;\n}\n.btn-warning .badge {\n  color: #f0ad4e;\n  background-color: #fff;\n}\n.btn-danger {\n  color: #fff;\n  background-color: #d9534f;\n  border-color: #d43f3a;\n}\n.btn-danger:focus,\n.btn-danger.focus {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #761c19;\n}\n.btn-danger:hover {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #ac2925;\n}\n.btn-danger:active:hover,\n.btn-danger.active:hover,\n.open > .dropdown-toggle.btn-danger:hover,\n.btn-danger:active:focus,\n.btn-danger.active:focus,\n.open > .dropdown-toggle.btn-danger:focus,\n.btn-danger:active.focus,\n.btn-danger.active.focus,\n.open > .dropdown-toggle.btn-danger.focus {\n  color: #fff;\n  background-color: #ac2925;\n  border-color: #761c19;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n  background-image: none;\n}\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus {\n  background-color: #d9534f;\n  border-color: #d43f3a;\n}\n.btn-danger .badge {\n  color: #d9534f;\n  background-color: #fff;\n}\n.btn-link {\n  color: #337ab7;\n  font-weight: normal;\n  border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n  background-color: transparent;\n  -webkit-box-shadow: none;\n  box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n  border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n  color: #23527c;\n  text-decoration: underline;\n  background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n  color: #777777;\n  text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n  padding: 1px 5px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.btn-block {\n  display: block;\n  width: 100%;\n}\n.btn-block + .btn-block {\n  margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n  width: 100%;\n}\n.fade {\n  opacity: 0;\n  -webkit-transition: opacity 0.15s linear;\n  -o-transition: opacity 0.15s linear;\n  transition: opacity 0.15s linear;\n}\n.fade.in {\n  opacity: 1;\n}\n.collapse {\n  display: none;\n}\n.collapse.in {\n  display: block;\n}\ntr.collapse.in {\n  display: table-row;\n}\ntbody.collapse.in {\n  display: table-row-group;\n}\n.collapsing {\n  position: relative;\n  height: 0;\n  overflow: hidden;\n  -webkit-transition-property: height, visibility;\n  transition-property: height, visibility;\n  -webkit-transition-duration: 0.35s;\n  transition-duration: 0.35s;\n  -webkit-transition-timing-function: ease;\n  transition-timing-function: ease;\n}\n.caret {\n  display: inline-block;\n  width: 0;\n  height: 0;\n  margin-left: 2px;\n  vertical-align: middle;\n  border-top: 4px dashed;\n  border-top: 4px solid \\9;\n  border-right: 4px solid transparent;\n  border-left: 4px solid transparent;\n}\n.dropup,\n.dropdown {\n  position: relative;\n}\n.dropdown-toggle:focus {\n  outline: 0;\n}\n.dropdown-menu {\n  position: absolute;\n  top: 100%;\n  left: 0;\n  z-index: 1000;\n  display: none;\n  float: left;\n  min-width: 160px;\n  padding: 5px 0;\n  margin: 2px 0 0;\n  list-style: none;\n  font-size: 14px;\n  text-align: left;\n  background-color: #fff;\n  border: 1px solid #ccc;\n  border: 1px solid rgba(0, 0, 0, 0.15);\n  border-radius: 4px;\n  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n  background-clip: padding-box;\n}\n.dropdown-menu.pull-right {\n  right: 0;\n  left: auto;\n}\n.dropdown-menu .divider {\n  height: 1px;\n  margin: 9px 0;\n  overflow: hidden;\n  background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n  display: block;\n  padding: 3px 20px;\n  clear: both;\n  font-weight: normal;\n  line-height: 1.42857143;\n  color: #333333;\n  white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n  text-decoration: none;\n  color: #262626;\n  background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n  color: #fff;\n  text-decoration: none;\n  outline: 0;\n  background-color: #337ab7;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n  color: #777777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n  text-decoration: none;\n  background-color: transparent;\n  background-image: none;\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n  cursor: not-allowed;\n}\n.open > .dropdown-menu {\n  display: block;\n}\n.open > a {\n  outline: 0;\n}\n.dropdown-menu-right {\n  left: auto;\n  right: 0;\n}\n.dropdown-menu-left {\n  left: 0;\n  right: auto;\n}\n.dropdown-header {\n  display: block;\n  padding: 3px 20px;\n  font-size: 12px;\n  line-height: 1.42857143;\n  color: #777777;\n  white-space: nowrap;\n}\n.dropdown-backdrop {\n  position: fixed;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  top: 0;\n  z-index: 990;\n}\n.pull-right > .dropdown-menu {\n  right: 0;\n  left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n  border-top: 0;\n  border-bottom: 4px dashed;\n  border-bottom: 4px solid \\9;\n  content: \"\";\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n  top: auto;\n  bottom: 100%;\n  margin-bottom: 2px;\n}\n@media (min-width: 768px) {\n  .navbar-right .dropdown-menu {\n    left: auto;\n    right: 0;\n  }\n  .navbar-right .dropdown-menu-left {\n    left: 0;\n    right: auto;\n  }\n}\n.btn-group,\n.btn-group-vertical {\n  position: relative;\n  display: inline-block;\n  vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n  position: relative;\n  float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n  z-index: 2;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n  margin-left: -1px;\n}\n.btn-toolbar {\n  margin-left: -5px;\n}\n.btn-toolbar .btn,\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n  float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n  margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n  border-radius: 0;\n}\n.btn-group > .btn:first-child {\n  margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n  border-bottom-right-radius: 0;\n  border-top-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n  border-bottom-left-radius: 0;\n  border-top-left-radius: 0;\n}\n.btn-group > .btn-group {\n  float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n  border-bottom-right-radius: 0;\n  border-top-right-radius: 0;\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  border-bottom-left-radius: 0;\n  border-top-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n  outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n  padding-left: 8px;\n  padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n  padding-left: 12px;\n  padding-right: 12px;\n}\n.btn-group.open .dropdown-toggle {\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n  -webkit-box-shadow: none;\n  box-shadow: none;\n}\n.btn .caret {\n  margin-left: 0;\n}\n.btn-lg .caret {\n  border-width: 5px 5px 0;\n  border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n  border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n  display: block;\n  float: none;\n  width: 100%;\n  max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n  float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n  margin-top: -1px;\n  margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n  border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n  border-top-right-radius: 4px;\n  border-top-left-radius: 4px;\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n  border-bottom-right-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n}\n.btn-group-justified {\n  display: table;\n  width: 100%;\n  table-layout: fixed;\n  border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n  float: none;\n  display: table-cell;\n  width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n  width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n  left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n  position: absolute;\n  clip: rect(0, 0, 0, 0);\n  pointer-events: none;\n}\n.input-group {\n  position: relative;\n  display: table;\n  border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n  float: none;\n  padding-left: 0;\n  padding-right: 0;\n}\n.input-group .form-control {\n  position: relative;\n  z-index: 2;\n  float: left;\n  width: 100%;\n  margin-bottom: 0;\n}\n.input-group .form-control:focus {\n  z-index: 3;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n  height: 46px;\n  line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n  height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n  height: 30px;\n  line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n  height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n  display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n  border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n  width: 1%;\n  white-space: nowrap;\n  vertical-align: middle;\n}\n.input-group-addon {\n  padding: 6px 12px;\n  font-size: 14px;\n  font-weight: normal;\n  line-height: 1;\n  color: #555555;\n  text-align: center;\n  background-color: #eeeeee;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n}\n.input-group-addon.input-sm {\n  padding: 5px 10px;\n  font-size: 12px;\n  border-radius: 3px;\n}\n.input-group-addon.input-lg {\n  padding: 10px 16px;\n  font-size: 18px;\n  border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n  margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n  border-bottom-right-radius: 0;\n  border-top-right-radius: 0;\n}\n.input-group-addon:first-child {\n  border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n  border-bottom-left-radius: 0;\n  border-top-left-radius: 0;\n}\n.input-group-addon:last-child {\n  border-left: 0;\n}\n.input-group-btn {\n  position: relative;\n  font-size: 0;\n  white-space: nowrap;\n}\n.input-group-btn > .btn {\n  position: relative;\n}\n.input-group-btn > .btn + .btn {\n  margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n  z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n  margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n  z-index: 2;\n  margin-left: -1px;\n}\n.nav {\n  margin-bottom: 0;\n  padding-left: 0;\n  list-style: none;\n}\n.nav > li {\n  position: relative;\n  display: block;\n}\n.nav > li > a {\n  position: relative;\n  display: block;\n  padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n  text-decoration: none;\n  background-color: #eeeeee;\n}\n.nav > li.disabled > a {\n  color: #777777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n  color: #777777;\n  text-decoration: none;\n  background-color: transparent;\n  cursor: not-allowed;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n  background-color: #eeeeee;\n  border-color: #337ab7;\n}\n.nav .nav-divider {\n  height: 1px;\n  margin: 9px 0;\n  overflow: hidden;\n  background-color: #e5e5e5;\n}\n.nav > li > a > img {\n  max-width: none;\n}\n.nav-tabs {\n  border-bottom: 1px solid #ddd;\n}\n.nav-tabs > li {\n  float: left;\n  margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n  margin-right: 2px;\n  line-height: 1.42857143;\n  border: 1px solid transparent;\n  border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n  border-color: #eeeeee #eeeeee #ddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n  color: #555555;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-bottom-color: transparent;\n  cursor: default;\n}\n.nav-tabs.nav-justified {\n  width: 100%;\n  border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n  float: none;\n}\n.nav-tabs.nav-justified > li > a {\n  text-align: center;\n  margin-bottom: 5px;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n  top: auto;\n  left: auto;\n}\n@media (min-width: 768px) {\n  .nav-tabs.nav-justified > li {\n    display: table-cell;\n    width: 1%;\n  }\n  .nav-tabs.nav-justified > li > a {\n    margin-bottom: 0;\n  }\n}\n.nav-tabs.nav-justified > li > a {\n  margin-right: 0;\n  border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n  border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n  .nav-tabs.nav-justified > li > a {\n    border-bottom: 1px solid #ddd;\n    border-radius: 4px 4px 0 0;\n  }\n  .nav-tabs.nav-justified > .active > a,\n  .nav-tabs.nav-justified > .active > a:hover,\n  .nav-tabs.nav-justified > .active > a:focus {\n    border-bottom-color: #fff;\n  }\n}\n.nav-pills > li {\n  float: left;\n}\n.nav-pills > li > a {\n  border-radius: 4px;\n}\n.nav-pills > li + li {\n  margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n  color: #fff;\n  background-color: #337ab7;\n}\n.nav-stacked > li {\n  float: none;\n}\n.nav-stacked > li + li {\n  margin-top: 2px;\n  margin-left: 0;\n}\n.nav-justified {\n  width: 100%;\n}\n.nav-justified > li {\n  float: none;\n}\n.nav-justified > li > a {\n  text-align: center;\n  margin-bottom: 5px;\n}\n.nav-justified > .dropdown .dropdown-menu {\n  top: auto;\n  left: auto;\n}\n@media (min-width: 768px) {\n  .nav-justified > li {\n    display: table-cell;\n    width: 1%;\n  }\n  .nav-justified > li > a {\n    margin-bottom: 0;\n  }\n}\n.nav-tabs-justified {\n  border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n  margin-right: 0;\n  border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n  border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n  .nav-tabs-justified > li > a {\n    border-bottom: 1px solid #ddd;\n    border-radius: 4px 4px 0 0;\n  }\n  .nav-tabs-justified > .active > a,\n  .nav-tabs-justified > .active > a:hover,\n  .nav-tabs-justified > .active > a:focus {\n    border-bottom-color: #fff;\n  }\n}\n.tab-content > .tab-pane {\n  display: none;\n}\n.tab-content > .active {\n  display: block;\n}\n.nav-tabs .dropdown-menu {\n  margin-top: -1px;\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n}\n.navbar {\n  position: relative;\n  min-height: 50px;\n  margin-bottom: 20px;\n  border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n  .navbar {\n    border-radius: 4px;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-header {\n    float: left;\n  }\n}\n.navbar-collapse {\n  overflow-x: visible;\n  padding-right: 15px;\n  padding-left: 15px;\n  border-top: 1px solid transparent;\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);\n  -webkit-overflow-scrolling: touch;\n}\n.navbar-collapse.in {\n  overflow-y: auto;\n}\n@media (min-width: 768px) {\n  .navbar-collapse {\n    width: auto;\n    border-top: 0;\n    box-shadow: none;\n  }\n  .navbar-collapse.collapse {\n    display: block !important;\n    height: auto !important;\n    padding-bottom: 0;\n    overflow: visible !important;\n  }\n  .navbar-collapse.in {\n    overflow-y: visible;\n  }\n  .navbar-fixed-top .navbar-collapse,\n  .navbar-static-top .navbar-collapse,\n  .navbar-fixed-bottom .navbar-collapse {\n    padding-left: 0;\n    padding-right: 0;\n  }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n  max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n  .navbar-fixed-top .navbar-collapse,\n  .navbar-fixed-bottom .navbar-collapse {\n    max-height: 200px;\n  }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n  margin-right: -15px;\n  margin-left: -15px;\n}\n@media (min-width: 768px) {\n  .container > .navbar-header,\n  .container-fluid > .navbar-header,\n  .container > .navbar-collapse,\n  .container-fluid > .navbar-collapse {\n    margin-right: 0;\n    margin-left: 0;\n  }\n}\n.navbar-static-top {\n  z-index: 1000;\n  border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n  .navbar-static-top {\n    border-radius: 0;\n  }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  position: fixed;\n  right: 0;\n  left: 0;\n  z-index: 1030;\n}\n@media (min-width: 768px) {\n  .navbar-fixed-top,\n  .navbar-fixed-bottom {\n    border-radius: 0;\n  }\n}\n.navbar-fixed-top {\n  top: 0;\n  border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n  bottom: 0;\n  margin-bottom: 0;\n  border-width: 1px 0 0;\n}\n.navbar-brand {\n  float: left;\n  padding: 15px 15px;\n  font-size: 18px;\n  line-height: 20px;\n  height: 50px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n  text-decoration: none;\n}\n.navbar-brand > img {\n  display: block;\n}\n@media (min-width: 768px) {\n  .navbar > .container .navbar-brand,\n  .navbar > .container-fluid .navbar-brand {\n    margin-left: -15px;\n  }\n}\n.navbar-toggle {\n  position: relative;\n  float: right;\n  margin-right: 15px;\n  padding: 9px 10px;\n  margin-top: 8px;\n  margin-bottom: 8px;\n  background-color: transparent;\n  background-image: none;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n.navbar-toggle:focus {\n  outline: 0;\n}\n.navbar-toggle .icon-bar {\n  display: block;\n  width: 22px;\n  height: 2px;\n  border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n  margin-top: 4px;\n}\n@media (min-width: 768px) {\n  .navbar-toggle {\n    display: none;\n  }\n}\n.navbar-nav {\n  margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n  padding-top: 10px;\n  padding-bottom: 10px;\n  line-height: 20px;\n}\n@media (max-width: 767px) {\n  .navbar-nav .open .dropdown-menu {\n    position: static;\n    float: none;\n    width: auto;\n    margin-top: 0;\n    background-color: transparent;\n    border: 0;\n    box-shadow: none;\n  }\n  .navbar-nav .open .dropdown-menu > li > a,\n  .navbar-nav .open .dropdown-menu .dropdown-header {\n    padding: 5px 15px 5px 25px;\n  }\n  .navbar-nav .open .dropdown-menu > li > a {\n    line-height: 20px;\n  }\n  .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-nav .open .dropdown-menu > li > a:focus {\n    background-image: none;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-nav {\n    float: left;\n    margin: 0;\n  }\n  .navbar-nav > li {\n    float: left;\n  }\n  .navbar-nav > li > a {\n    padding-top: 15px;\n    padding-bottom: 15px;\n  }\n}\n.navbar-form {\n  margin-left: -15px;\n  margin-right: -15px;\n  padding: 10px 15px;\n  border-top: 1px solid transparent;\n  border-bottom: 1px solid transparent;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n  margin-top: 8px;\n  margin-bottom: 8px;\n}\n@media (min-width: 768px) {\n  .navbar-form .form-group {\n    display: inline-block;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .form-control {\n    display: inline-block;\n    width: auto;\n    vertical-align: middle;\n  }\n  .navbar-form .form-control-static {\n    display: inline-block;\n  }\n  .navbar-form .input-group {\n    display: inline-table;\n    vertical-align: middle;\n  }\n  .navbar-form .input-group .input-group-addon,\n  .navbar-form .input-group .input-group-btn,\n  .navbar-form .input-group .form-control {\n    width: auto;\n  }\n  .navbar-form .input-group > .form-control {\n    width: 100%;\n  }\n  .navbar-form .control-label {\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .radio,\n  .navbar-form .checkbox {\n    display: inline-block;\n    margin-top: 0;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .radio label,\n  .navbar-form .checkbox label {\n    padding-left: 0;\n  }\n  .navbar-form .radio input[type=\"radio\"],\n  .navbar-form .checkbox input[type=\"checkbox\"] {\n    position: relative;\n    margin-left: 0;\n  }\n  .navbar-form .has-feedback .form-control-feedback {\n    top: 0;\n  }\n}\n@media (max-width: 767px) {\n  .navbar-form .form-group {\n    margin-bottom: 5px;\n  }\n  .navbar-form .form-group:last-child {\n    margin-bottom: 0;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-form {\n    width: auto;\n    border: 0;\n    margin-left: 0;\n    margin-right: 0;\n    padding-top: 0;\n    padding-bottom: 0;\n    -webkit-box-shadow: none;\n    box-shadow: none;\n  }\n}\n.navbar-nav > li > .dropdown-menu {\n  margin-top: 0;\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n  margin-bottom: 0;\n  border-top-right-radius: 4px;\n  border-top-left-radius: 4px;\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.navbar-btn {\n  margin-top: 8px;\n  margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n  margin-top: 14px;\n  margin-bottom: 14px;\n}\n.navbar-text {\n  margin-top: 15px;\n  margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n  .navbar-text {\n    float: left;\n    margin-left: 15px;\n    margin-right: 15px;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-left {\n    float: left !important;\n  }\n  .navbar-right {\n    float: right !important;\n    margin-right: -15px;\n  }\n  .navbar-right ~ .navbar-right {\n    margin-right: 0;\n  }\n}\n.navbar-default {\n  background-color: #f8f8f8;\n  border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n  color: #777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n  color: #5e5e5e;\n  background-color: transparent;\n}\n.navbar-default .navbar-text {\n  color: #777;\n}\n.navbar-default .navbar-nav > li > a {\n  color: #777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n  color: #333;\n  background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n  color: #555;\n  background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n  color: #ccc;\n  background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n  border-color: #ddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n  background-color: #ddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n  background-color: #888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n  border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n  background-color: #e7e7e7;\n  color: #555;\n}\n@media (max-width: 767px) {\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n    color: #777;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n    color: #333;\n    background-color: transparent;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #555;\n    background-color: #e7e7e7;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n    color: #ccc;\n    background-color: transparent;\n  }\n}\n.navbar-default .navbar-link {\n  color: #777;\n}\n.navbar-default .navbar-link:hover {\n  color: #333;\n}\n.navbar-default .btn-link {\n  color: #777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n  color: #333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n  color: #ccc;\n}\n.navbar-inverse {\n  background-color: #222;\n  border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n  color: #fff;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n  color: #fff;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n  color: #fff;\n  background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n  color: #444;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n  border-color: #333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n  background-color: #333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n  background-color: #fff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n  border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n  background-color: #080808;\n  color: #fff;\n}\n@media (max-width: 767px) {\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n    border-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n    background-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n    color: #9d9d9d;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n    color: #fff;\n    background-color: transparent;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #fff;\n    background-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n    color: #444;\n    background-color: transparent;\n  }\n}\n.navbar-inverse .navbar-link {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n  color: #fff;\n}\n.navbar-inverse .btn-link {\n  color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n  color: #fff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n  color: #444;\n}\n.breadcrumb {\n  padding: 8px 15px;\n  margin-bottom: 20px;\n  list-style: none;\n  background-color: #f5f5f5;\n  border-radius: 4px;\n}\n.breadcrumb > li {\n  display: inline-block;\n}\n.breadcrumb > li + li:before {\n  content: \"/\\00a0\";\n  padding: 0 5px;\n  color: #ccc;\n}\n.breadcrumb > .active {\n  color: #777777;\n}\n.pagination {\n  display: inline-block;\n  padding-left: 0;\n  margin: 20px 0;\n  border-radius: 4px;\n}\n.pagination > li {\n  display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n  position: relative;\n  float: left;\n  padding: 6px 12px;\n  line-height: 1.42857143;\n  text-decoration: none;\n  color: #337ab7;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  margin-left: -1px;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n  margin-left: 0;\n  border-bottom-left-radius: 4px;\n  border-top-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n  border-bottom-right-radius: 4px;\n  border-top-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n  z-index: 2;\n  color: #23527c;\n  background-color: #eeeeee;\n  border-color: #ddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n  z-index: 3;\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #337ab7;\n  cursor: default;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n  color: #777777;\n  background-color: #fff;\n  border-color: #ddd;\n  cursor: not-allowed;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n  border-bottom-left-radius: 6px;\n  border-top-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n  border-bottom-right-radius: 6px;\n  border-top-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n  border-bottom-left-radius: 3px;\n  border-top-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n  border-bottom-right-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.pager {\n  padding-left: 0;\n  margin: 20px 0;\n  list-style: none;\n  text-align: center;\n}\n.pager li {\n  display: inline;\n}\n.pager li > a,\n.pager li > span {\n  display: inline-block;\n  padding: 5px 14px;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n  text-decoration: none;\n  background-color: #eeeeee;\n}\n.pager .next > a,\n.pager .next > span {\n  float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n  float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n  color: #777777;\n  background-color: #fff;\n  cursor: not-allowed;\n}\n.label {\n  display: inline;\n  padding: .2em .6em .3em;\n  font-size: 75%;\n  font-weight: bold;\n  line-height: 1;\n  color: #fff;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: baseline;\n  border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n  color: #fff;\n  text-decoration: none;\n  cursor: pointer;\n}\n.label:empty {\n  display: none;\n}\n.btn .label {\n  position: relative;\n  top: -1px;\n}\n.label-default {\n  background-color: #777777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n  background-color: #5e5e5e;\n}\n.label-primary {\n  background-color: #337ab7;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n  background-color: #286090;\n}\n.label-success {\n  background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n  background-color: #449d44;\n}\n.label-info {\n  background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n  background-color: #31b0d5;\n}\n.label-warning {\n  background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n  background-color: #ec971f;\n}\n.label-danger {\n  background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n  background-color: #c9302c;\n}\n.badge {\n  display: inline-block;\n  min-width: 10px;\n  padding: 3px 7px;\n  font-size: 12px;\n  font-weight: bold;\n  color: #fff;\n  line-height: 1;\n  vertical-align: middle;\n  white-space: nowrap;\n  text-align: center;\n  background-color: #777777;\n  border-radius: 10px;\n}\n.badge:empty {\n  display: none;\n}\n.btn .badge {\n  position: relative;\n  top: -1px;\n}\n.btn-xs .badge,\n.btn-group-xs > .btn .badge {\n  top: 0;\n  padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n  color: #fff;\n  text-decoration: none;\n  cursor: pointer;\n}\n.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.list-group-item > .badge {\n  float: right;\n}\n.list-group-item > .badge + .badge {\n  margin-right: 5px;\n}\n.nav-pills > li > a > .badge {\n  margin-left: 3px;\n}\n.jumbotron {\n  padding-top: 30px;\n  padding-bottom: 30px;\n  margin-bottom: 30px;\n  color: inherit;\n  background-color: #eeeeee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n  color: inherit;\n}\n.jumbotron p {\n  margin-bottom: 15px;\n  font-size: 21px;\n  font-weight: 200;\n}\n.jumbotron > hr {\n  border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n  border-radius: 6px;\n  padding-left: 15px;\n  padding-right: 15px;\n}\n.jumbotron .container {\n  max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n  .jumbotron {\n    padding-top: 48px;\n    padding-bottom: 48px;\n  }\n  .container .jumbotron,\n  .container-fluid .jumbotron {\n    padding-left: 60px;\n    padding-right: 60px;\n  }\n  .jumbotron h1,\n  .jumbotron .h1 {\n    font-size: 63px;\n  }\n}\n.thumbnail {\n  display: block;\n  padding: 4px;\n  margin-bottom: 20px;\n  line-height: 1.42857143;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 4px;\n  -webkit-transition: border 0.2s ease-in-out;\n  -o-transition: border 0.2s ease-in-out;\n  transition: border 0.2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n  margin-left: auto;\n  margin-right: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n  border-color: #337ab7;\n}\n.thumbnail .caption {\n  padding: 9px;\n  color: #333333;\n}\n.alert {\n  padding: 15px;\n  margin-bottom: 20px;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n.alert h4 {\n  margin-top: 0;\n  color: inherit;\n}\n.alert .alert-link {\n  font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n  margin-bottom: 0;\n}\n.alert > p + p {\n  margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n  padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n  position: relative;\n  top: -2px;\n  right: -21px;\n  color: inherit;\n}\n.alert-success {\n  background-color: #dff0d8;\n  border-color: #d6e9c6;\n  color: #3c763d;\n}\n.alert-success hr {\n  border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n  color: #2b542c;\n}\n.alert-info {\n  background-color: #d9edf7;\n  border-color: #bce8f1;\n  color: #31708f;\n}\n.alert-info hr {\n  border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n  color: #245269;\n}\n.alert-warning {\n  background-color: #fcf8e3;\n  border-color: #faebcc;\n  color: #8a6d3b;\n}\n.alert-warning hr {\n  border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n  color: #66512c;\n}\n.alert-danger {\n  background-color: #f2dede;\n  border-color: #ebccd1;\n  color: #a94442;\n}\n.alert-danger hr {\n  border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n  color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n@keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n.progress {\n  overflow: hidden;\n  height: 20px;\n  margin-bottom: 20px;\n  background-color: #f5f5f5;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.progress-bar {\n  float: left;\n  width: 0%;\n  height: 100%;\n  font-size: 12px;\n  line-height: 20px;\n  color: #fff;\n  text-align: center;\n  background-color: #337ab7;\n  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n  -webkit-transition: width 0.6s ease;\n  -o-transition: width 0.6s ease;\n  transition: width 0.6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n  -webkit-animation: progress-bar-stripes 2s linear infinite;\n  -o-animation: progress-bar-stripes 2s linear infinite;\n  animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n  background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n  background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n  background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n  background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.media {\n  margin-top: 15px;\n}\n.media:first-child {\n  margin-top: 0;\n}\n.media,\n.media-body {\n  zoom: 1;\n  overflow: hidden;\n}\n.media-body {\n  width: 10000px;\n}\n.media-object {\n  display: block;\n}\n.media-object.img-thumbnail {\n  max-width: none;\n}\n.media-right,\n.media > .pull-right {\n  padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n  padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n  display: table-cell;\n  vertical-align: top;\n}\n.media-middle {\n  vertical-align: middle;\n}\n.media-bottom {\n  vertical-align: bottom;\n}\n.media-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n.media-list {\n  padding-left: 0;\n  list-style: none;\n}\n.list-group {\n  margin-bottom: 20px;\n  padding-left: 0;\n}\n.list-group-item {\n  position: relative;\n  display: block;\n  padding: 10px 15px;\n  margin-bottom: -1px;\n  background-color: #fff;\n  border: 1px solid #ddd;\n}\n.list-group-item:first-child {\n  border-top-right-radius: 4px;\n  border-top-left-radius: 4px;\n}\n.list-group-item:last-child {\n  margin-bottom: 0;\n  border-bottom-right-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\na.list-group-item,\nbutton.list-group-item {\n  color: #555;\n}\na.list-group-item .list-group-item-heading,\nbutton.list-group-item .list-group-item-heading {\n  color: #333;\n}\na.list-group-item:hover,\nbutton.list-group-item:hover,\na.list-group-item:focus,\nbutton.list-group-item:focus {\n  text-decoration: none;\n  color: #555;\n  background-color: #f5f5f5;\n}\nbutton.list-group-item {\n  width: 100%;\n  text-align: left;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n  background-color: #eeeeee;\n  color: #777777;\n  cursor: not-allowed;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n  color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n  color: #777777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n  z-index: 2;\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #337ab7;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n  color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n  color: #c7ddef;\n}\n.list-group-item-success {\n  color: #3c763d;\n  background-color: #dff0d8;\n}\na.list-group-item-success,\nbutton.list-group-item-success {\n  color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading,\nbutton.list-group-item-success .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-success:hover,\nbutton.list-group-item-success:hover,\na.list-group-item-success:focus,\nbutton.list-group-item-success:focus {\n  color: #3c763d;\n  background-color: #d0e9c6;\n}\na.list-group-item-success.active,\nbutton.list-group-item-success.active,\na.list-group-item-success.active:hover,\nbutton.list-group-item-success.active:hover,\na.list-group-item-success.active:focus,\nbutton.list-group-item-success.active:focus {\n  color: #fff;\n  background-color: #3c763d;\n  border-color: #3c763d;\n}\n.list-group-item-info {\n  color: #31708f;\n  background-color: #d9edf7;\n}\na.list-group-item-info,\nbutton.list-group-item-info {\n  color: #31708f;\n}\na.list-group-item-info .list-group-item-heading,\nbutton.list-group-item-info .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-info:hover,\nbutton.list-group-item-info:hover,\na.list-group-item-info:focus,\nbutton.list-group-item-info:focus {\n  color: #31708f;\n  background-color: #c4e3f3;\n}\na.list-group-item-info.active,\nbutton.list-group-item-info.active,\na.list-group-item-info.active:hover,\nbutton.list-group-item-info.active:hover,\na.list-group-item-info.active:focus,\nbutton.list-group-item-info.active:focus {\n  color: #fff;\n  background-color: #31708f;\n  border-color: #31708f;\n}\n.list-group-item-warning {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n}\na.list-group-item-warning,\nbutton.list-group-item-warning {\n  color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading,\nbutton.list-group-item-warning .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-warning:hover,\nbutton.list-group-item-warning:hover,\na.list-group-item-warning:focus,\nbutton.list-group-item-warning:focus {\n  color: #8a6d3b;\n  background-color: #faf2cc;\n}\na.list-group-item-warning.active,\nbutton.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\nbutton.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus,\nbutton.list-group-item-warning.active:focus {\n  color: #fff;\n  background-color: #8a6d3b;\n  border-color: #8a6d3b;\n}\n.list-group-item-danger {\n  color: #a94442;\n  background-color: #f2dede;\n}\na.list-group-item-danger,\nbutton.list-group-item-danger {\n  color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading,\nbutton.list-group-item-danger .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-danger:hover,\nbutton.list-group-item-danger:hover,\na.list-group-item-danger:focus,\nbutton.list-group-item-danger:focus {\n  color: #a94442;\n  background-color: #ebcccc;\n}\na.list-group-item-danger.active,\nbutton.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\nbutton.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus,\nbutton.list-group-item-danger.active:focus {\n  color: #fff;\n  background-color: #a94442;\n  border-color: #a94442;\n}\n.list-group-item-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n.list-group-item-text {\n  margin-bottom: 0;\n  line-height: 1.3;\n}\n.panel {\n  margin-bottom: 20px;\n  background-color: #fff;\n  border: 1px solid transparent;\n  border-radius: 4px;\n  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.panel-body {\n  padding: 15px;\n}\n.panel-heading {\n  padding: 10px 15px;\n  border-bottom: 1px solid transparent;\n  border-top-right-radius: 3px;\n  border-top-left-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n  color: inherit;\n}\n.panel-title {\n  margin-top: 0;\n  margin-bottom: 0;\n  font-size: 16px;\n  color: inherit;\n}\n.panel-title > a,\n.panel-title > small,\n.panel-title > .small,\n.panel-title > small > a,\n.panel-title > .small > a {\n  color: inherit;\n}\n.panel-footer {\n  padding: 10px 15px;\n  background-color: #f5f5f5;\n  border-top: 1px solid #ddd;\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n  margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n  border-width: 1px 0;\n  border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n  border-top: 0;\n  border-top-right-radius: 3px;\n  border-top-left-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n  border-bottom: 0;\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {\n  border-top-right-radius: 0;\n  border-top-left-radius: 0;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n  border-top-width: 0;\n}\n.list-group + .panel-footer {\n  border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n  margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n  padding-left: 15px;\n  padding-right: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n  border-top-right-radius: 3px;\n  border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n  border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n  border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n  border-bottom-left-radius: 3px;\n  border-bottom-right-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n  border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n  border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n  border-top: 1px solid #ddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n  border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n  border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n  border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n  border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n  border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n  border-bottom: 0;\n}\n.panel > .table-responsive {\n  border: 0;\n  margin-bottom: 0;\n}\n.panel-group {\n  margin-bottom: 20px;\n}\n.panel-group .panel {\n  margin-bottom: 0;\n  border-radius: 4px;\n}\n.panel-group .panel + .panel {\n  margin-top: 5px;\n}\n.panel-group .panel-heading {\n  border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n  border-top: 1px solid #ddd;\n}\n.panel-group .panel-footer {\n  border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n  border-bottom: 1px solid #ddd;\n}\n.panel-default {\n  border-color: #ddd;\n}\n.panel-default > .panel-heading {\n  color: #333333;\n  background-color: #f5f5f5;\n  border-color: #ddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #ddd;\n}\n.panel-default > .panel-heading .badge {\n  color: #f5f5f5;\n  background-color: #333333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #ddd;\n}\n.panel-primary {\n  border-color: #337ab7;\n}\n.panel-primary > .panel-heading {\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #337ab7;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #337ab7;\n}\n.panel-primary > .panel-heading .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #337ab7;\n}\n.panel-success {\n  border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n  color: #3c763d;\n  background-color: #dff0d8;\n  border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n  color: #dff0d8;\n  background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #d6e9c6;\n}\n.panel-info {\n  border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n  color: #31708f;\n  background-color: #d9edf7;\n  border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n  color: #d9edf7;\n  background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #bce8f1;\n}\n.panel-warning {\n  border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n  border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n  color: #fcf8e3;\n  background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #faebcc;\n}\n.panel-danger {\n  border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n  color: #a94442;\n  background-color: #f2dede;\n  border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n  color: #f2dede;\n  background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #ebccd1;\n}\n.embed-responsive {\n  position: relative;\n  display: block;\n  height: 0;\n  padding: 0;\n  overflow: hidden;\n}\n.embed-responsive .embed-responsive-item,\n.embed-responsive iframe,\n.embed-responsive embed,\n.embed-responsive object,\n.embed-responsive video {\n  position: absolute;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  height: 100%;\n  width: 100%;\n  border: 0;\n}\n.embed-responsive-16by9 {\n  padding-bottom: 56.25%;\n}\n.embed-responsive-4by3 {\n  padding-bottom: 75%;\n}\n.well {\n  min-height: 20px;\n  padding: 19px;\n  margin-bottom: 20px;\n  background-color: #f5f5f5;\n  border: 1px solid #e3e3e3;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.well blockquote {\n  border-color: #ddd;\n  border-color: rgba(0, 0, 0, 0.15);\n}\n.well-lg {\n  padding: 24px;\n  border-radius: 6px;\n}\n.well-sm {\n  padding: 9px;\n  border-radius: 3px;\n}\n.close {\n  float: right;\n  font-size: 21px;\n  font-weight: bold;\n  line-height: 1;\n  color: #000;\n  text-shadow: 0 1px 0 #fff;\n  opacity: 0.2;\n  filter: alpha(opacity=20);\n}\n.close:hover,\n.close:focus {\n  color: #000;\n  text-decoration: none;\n  cursor: pointer;\n  opacity: 0.5;\n  filter: alpha(opacity=50);\n}\nbutton.close {\n  padding: 0;\n  cursor: pointer;\n  background: transparent;\n  border: 0;\n  -webkit-appearance: none;\n}\n.modal-open {\n  overflow: hidden;\n}\n.modal {\n  display: none;\n  overflow: hidden;\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 1050;\n  -webkit-overflow-scrolling: touch;\n  outline: 0;\n}\n.modal.fade .modal-dialog {\n  -webkit-transform: translate(0, -25%);\n  -ms-transform: translate(0, -25%);\n  -o-transform: translate(0, -25%);\n  transform: translate(0, -25%);\n  -webkit-transition: -webkit-transform 0.3s ease-out;\n  -moz-transition: -moz-transform 0.3s ease-out;\n  -o-transition: -o-transform 0.3s ease-out;\n  transition: transform 0.3s ease-out;\n}\n.modal.in .modal-dialog {\n  -webkit-transform: translate(0, 0);\n  -ms-transform: translate(0, 0);\n  -o-transform: translate(0, 0);\n  transform: translate(0, 0);\n}\n.modal-open .modal {\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n.modal-dialog {\n  position: relative;\n  width: auto;\n  margin: 10px;\n}\n.modal-content {\n  position: relative;\n  background-color: #fff;\n  border: 1px solid #999;\n  border: 1px solid rgba(0, 0, 0, 0.2);\n  border-radius: 6px;\n  -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n  background-clip: padding-box;\n  outline: 0;\n}\n.modal-backdrop {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 1040;\n  background-color: #000;\n}\n.modal-backdrop.fade {\n  opacity: 0;\n  filter: alpha(opacity=0);\n}\n.modal-backdrop.in {\n  opacity: 0.5;\n  filter: alpha(opacity=50);\n}\n.modal-header {\n  padding: 15px;\n  border-bottom: 1px solid #e5e5e5;\n}\n.modal-header .close {\n  margin-top: -2px;\n}\n.modal-title {\n  margin: 0;\n  line-height: 1.42857143;\n}\n.modal-body {\n  position: relative;\n  padding: 15px;\n}\n.modal-footer {\n  padding: 15px;\n  text-align: right;\n  border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n  margin-left: 5px;\n  margin-bottom: 0;\n}\n.modal-footer .btn-group .btn + .btn {\n  margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n  margin-left: 0;\n}\n.modal-scrollbar-measure {\n  position: absolute;\n  top: -9999px;\n  width: 50px;\n  height: 50px;\n  overflow: scroll;\n}\n@media (min-width: 768px) {\n  .modal-dialog {\n    width: 600px;\n    margin: 30px auto;\n  }\n  .modal-content {\n    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n  }\n  .modal-sm {\n    width: 300px;\n  }\n}\n@media (min-width: 992px) {\n  .modal-lg {\n    width: 900px;\n  }\n}\n.tooltip {\n  position: absolute;\n  z-index: 1070;\n  display: block;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-style: normal;\n  font-weight: normal;\n  letter-spacing: normal;\n  line-break: auto;\n  line-height: 1.42857143;\n  text-align: left;\n  text-align: start;\n  text-decoration: none;\n  text-shadow: none;\n  text-transform: none;\n  white-space: normal;\n  word-break: normal;\n  word-spacing: normal;\n  word-wrap: normal;\n  font-size: 12px;\n  opacity: 0;\n  filter: alpha(opacity=0);\n}\n.tooltip.in {\n  opacity: 0.9;\n  filter: alpha(opacity=90);\n}\n.tooltip.top {\n  margin-top: -3px;\n  padding: 5px 0;\n}\n.tooltip.right {\n  margin-left: 3px;\n  padding: 0 5px;\n}\n.tooltip.bottom {\n  margin-top: 3px;\n  padding: 5px 0;\n}\n.tooltip.left {\n  margin-left: -3px;\n  padding: 0 5px;\n}\n.tooltip-inner {\n  max-width: 200px;\n  padding: 3px 8px;\n  color: #fff;\n  text-align: center;\n  background-color: #000;\n  border-radius: 4px;\n}\n.tooltip-arrow {\n  position: absolute;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n  bottom: 0;\n  left: 50%;\n  margin-left: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.top-left .tooltip-arrow {\n  bottom: 0;\n  right: 5px;\n  margin-bottom: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.top-right .tooltip-arrow {\n  bottom: 0;\n  left: 5px;\n  margin-bottom: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.right .tooltip-arrow {\n  top: 50%;\n  left: 0;\n  margin-top: -5px;\n  border-width: 5px 5px 5px 0;\n  border-right-color: #000;\n}\n.tooltip.left .tooltip-arrow {\n  top: 50%;\n  right: 0;\n  margin-top: -5px;\n  border-width: 5px 0 5px 5px;\n  border-left-color: #000;\n}\n.tooltip.bottom .tooltip-arrow {\n  top: 0;\n  left: 50%;\n  margin-left: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n  top: 0;\n  right: 5px;\n  margin-top: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n  top: 0;\n  left: 5px;\n  margin-top: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.popover {\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: 1060;\n  display: none;\n  max-width: 276px;\n  padding: 1px;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-style: normal;\n  font-weight: normal;\n  letter-spacing: normal;\n  line-break: auto;\n  line-height: 1.42857143;\n  text-align: left;\n  text-align: start;\n  text-decoration: none;\n  text-shadow: none;\n  text-transform: none;\n  white-space: normal;\n  word-break: normal;\n  word-spacing: normal;\n  word-wrap: normal;\n  font-size: 14px;\n  background-color: #fff;\n  background-clip: padding-box;\n  border: 1px solid #ccc;\n  border: 1px solid rgba(0, 0, 0, 0.2);\n  border-radius: 6px;\n  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n}\n.popover.top {\n  margin-top: -10px;\n}\n.popover.right {\n  margin-left: 10px;\n}\n.popover.bottom {\n  margin-top: 10px;\n}\n.popover.left {\n  margin-left: -10px;\n}\n.popover-title {\n  margin: 0;\n  padding: 8px 14px;\n  font-size: 14px;\n  background-color: #f7f7f7;\n  border-bottom: 1px solid #ebebeb;\n  border-radius: 5px 5px 0 0;\n}\n.popover-content {\n  padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n  position: absolute;\n  display: block;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n.popover > .arrow {\n  border-width: 11px;\n}\n.popover > .arrow:after {\n  border-width: 10px;\n  content: \"\";\n}\n.popover.top > .arrow {\n  left: 50%;\n  margin-left: -11px;\n  border-bottom-width: 0;\n  border-top-color: #999999;\n  border-top-color: rgba(0, 0, 0, 0.25);\n  bottom: -11px;\n}\n.popover.top > .arrow:after {\n  content: \" \";\n  bottom: 1px;\n  margin-left: -10px;\n  border-bottom-width: 0;\n  border-top-color: #fff;\n}\n.popover.right > .arrow {\n  top: 50%;\n  left: -11px;\n  margin-top: -11px;\n  border-left-width: 0;\n  border-right-color: #999999;\n  border-right-color: rgba(0, 0, 0, 0.25);\n}\n.popover.right > .arrow:after {\n  content: \" \";\n  left: 1px;\n  bottom: -10px;\n  border-left-width: 0;\n  border-right-color: #fff;\n}\n.popover.bottom > .arrow {\n  left: 50%;\n  margin-left: -11px;\n  border-top-width: 0;\n  border-bottom-color: #999999;\n  border-bottom-color: rgba(0, 0, 0, 0.25);\n  top: -11px;\n}\n.popover.bottom > .arrow:after {\n  content: \" \";\n  top: 1px;\n  margin-left: -10px;\n  border-top-width: 0;\n  border-bottom-color: #fff;\n}\n.popover.left > .arrow {\n  top: 50%;\n  right: -11px;\n  margin-top: -11px;\n  border-right-width: 0;\n  border-left-color: #999999;\n  border-left-color: rgba(0, 0, 0, 0.25);\n}\n.popover.left > .arrow:after {\n  content: \" \";\n  right: 1px;\n  border-right-width: 0;\n  border-left-color: #fff;\n  bottom: -10px;\n}\n.carousel {\n  position: relative;\n}\n.carousel-inner {\n  position: relative;\n  overflow: hidden;\n  width: 100%;\n}\n.carousel-inner > .item {\n  display: none;\n  position: relative;\n  -webkit-transition: 0.6s ease-in-out left;\n  -o-transition: 0.6s ease-in-out left;\n  transition: 0.6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n  line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n  .carousel-inner > .item {\n    -webkit-transition: -webkit-transform 0.6s ease-in-out;\n    -moz-transition: -moz-transform 0.6s ease-in-out;\n    -o-transition: -o-transform 0.6s ease-in-out;\n    transition: transform 0.6s ease-in-out;\n    -webkit-backface-visibility: hidden;\n    -moz-backface-visibility: hidden;\n    backface-visibility: hidden;\n    -webkit-perspective: 1000px;\n    -moz-perspective: 1000px;\n    perspective: 1000px;\n  }\n  .carousel-inner > .item.next,\n  .carousel-inner > .item.active.right {\n    -webkit-transform: translate3d(100%, 0, 0);\n    transform: translate3d(100%, 0, 0);\n    left: 0;\n  }\n  .carousel-inner > .item.prev,\n  .carousel-inner > .item.active.left {\n    -webkit-transform: translate3d(-100%, 0, 0);\n    transform: translate3d(-100%, 0, 0);\n    left: 0;\n  }\n  .carousel-inner > .item.next.left,\n  .carousel-inner > .item.prev.right,\n  .carousel-inner > .item.active {\n    -webkit-transform: translate3d(0, 0, 0);\n    transform: translate3d(0, 0, 0);\n    left: 0;\n  }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n  display: block;\n}\n.carousel-inner > .active {\n  left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n  position: absolute;\n  top: 0;\n  width: 100%;\n}\n.carousel-inner > .next {\n  left: 100%;\n}\n.carousel-inner > .prev {\n  left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n  left: 0;\n}\n.carousel-inner > .active.left {\n  left: -100%;\n}\n.carousel-inner > .active.right {\n  left: 100%;\n}\n.carousel-control {\n  position: absolute;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  width: 15%;\n  opacity: 0.5;\n  filter: alpha(opacity=50);\n  font-size: 20px;\n  color: #fff;\n  text-align: center;\n  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n  background-color: rgba(0, 0, 0, 0);\n}\n.carousel-control.left {\n  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n  background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n}\n.carousel-control.right {\n  left: auto;\n  right: 0;\n  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n  background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n  background-repeat: repeat-x;\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n}\n.carousel-control:hover,\n.carousel-control:focus {\n  outline: 0;\n  color: #fff;\n  text-decoration: none;\n  opacity: 0.9;\n  filter: alpha(opacity=90);\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n  position: absolute;\n  top: 50%;\n  margin-top: -10px;\n  z-index: 5;\n  display: inline-block;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n  left: 50%;\n  margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n  right: 50%;\n  margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n  width: 20px;\n  height: 20px;\n  line-height: 1;\n  font-family: serif;\n}\n.carousel-control .icon-prev:before {\n  content: '\\2039';\n}\n.carousel-control .icon-next:before {\n  content: '\\203a';\n}\n.carousel-indicators {\n  position: absolute;\n  bottom: 10px;\n  left: 50%;\n  z-index: 15;\n  width: 60%;\n  margin-left: -30%;\n  padding-left: 0;\n  list-style: none;\n  text-align: center;\n}\n.carousel-indicators li {\n  display: inline-block;\n  width: 10px;\n  height: 10px;\n  margin: 1px;\n  text-indent: -999px;\n  border: 1px solid #fff;\n  border-radius: 10px;\n  cursor: pointer;\n  background-color: #000 \\9;\n  background-color: rgba(0, 0, 0, 0);\n}\n.carousel-indicators .active {\n  margin: 0;\n  width: 12px;\n  height: 12px;\n  background-color: #fff;\n}\n.carousel-caption {\n  position: absolute;\n  left: 15%;\n  right: 15%;\n  bottom: 20px;\n  z-index: 10;\n  padding-top: 20px;\n  padding-bottom: 20px;\n  color: #fff;\n  text-align: center;\n  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n}\n.carousel-caption .btn {\n  text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n  .carousel-control .glyphicon-chevron-left,\n  .carousel-control .glyphicon-chevron-right,\n  .carousel-control .icon-prev,\n  .carousel-control .icon-next {\n    width: 30px;\n    height: 30px;\n    margin-top: -10px;\n    font-size: 30px;\n  }\n  .carousel-control .glyphicon-chevron-left,\n  .carousel-control .icon-prev {\n    margin-left: -10px;\n  }\n  .carousel-control .glyphicon-chevron-right,\n  .carousel-control .icon-next {\n    margin-right: -10px;\n  }\n  .carousel-caption {\n    left: 20%;\n    right: 20%;\n    padding-bottom: 30px;\n  }\n  .carousel-indicators {\n    bottom: 20px;\n  }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-header:before,\n.modal-header:after,\n.modal-footer:before,\n.modal-footer:after {\n  content: \" \";\n  display: table;\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-header:after,\n.modal-footer:after {\n  clear: both;\n}\n.center-block {\n  display: block;\n  margin-left: auto;\n  margin-right: auto;\n}\n.pull-right {\n  float: right !important;\n}\n.pull-left {\n  float: left !important;\n}\n.hide {\n  display: none !important;\n}\n.show {\n  display: block !important;\n}\n.invisible {\n  visibility: hidden;\n}\n.text-hide {\n  font: 0/0 a;\n  color: transparent;\n  text-shadow: none;\n  background-color: transparent;\n  border: 0;\n}\n.hidden {\n  display: none !important;\n}\n.affix {\n  position: fixed;\n}\n@-ms-viewport {\n  width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n  display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n  display: none !important;\n}\n@media (max-width: 767px) {\n  .visible-xs {\n    display: block !important;\n  }\n  table.visible-xs {\n    display: table !important;\n  }\n  tr.visible-xs {\n    display: table-row !important;\n  }\n  th.visible-xs,\n  td.visible-xs {\n    display: table-cell !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-block {\n    display: block !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-inline {\n    display: inline !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm {\n    display: block !important;\n  }\n  table.visible-sm {\n    display: table !important;\n  }\n  tr.visible-sm {\n    display: table-row !important;\n  }\n  th.visible-sm,\n  td.visible-sm {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-block {\n    display: block !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md {\n    display: block !important;\n  }\n  table.visible-md {\n    display: table !important;\n  }\n  tr.visible-md {\n    display: table-row !important;\n  }\n  th.visible-md,\n  td.visible-md {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-block {\n    display: block !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg {\n    display: block !important;\n  }\n  table.visible-lg {\n    display: table !important;\n  }\n  tr.visible-lg {\n    display: table-row !important;\n  }\n  th.visible-lg,\n  td.visible-lg {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-block {\n    display: block !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (max-width: 767px) {\n  .hidden-xs {\n    display: none !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .hidden-sm {\n    display: none !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .hidden-md {\n    display: none !important;\n  }\n}\n@media (min-width: 1200px) {\n  .hidden-lg {\n    display: none !important;\n  }\n}\n.visible-print {\n  display: none !important;\n}\n@media print {\n  .visible-print {\n    display: block !important;\n  }\n  table.visible-print {\n    display: table !important;\n  }\n  tr.visible-print {\n    display: table-row !important;\n  }\n  th.visible-print,\n  td.visible-print {\n    display: table-cell !important;\n  }\n}\n.visible-print-block {\n  display: none !important;\n}\n@media print {\n  .visible-print-block {\n    display: block !important;\n  }\n}\n.visible-print-inline {\n  display: none !important;\n}\n@media print {\n  .visible-print-inline {\n    display: inline !important;\n  }\n}\n.visible-print-inline-block {\n  display: none !important;\n}\n@media print {\n  .visible-print-inline-block {\n    display: inline-block !important;\n  }\n}\n@media print {\n  .hidden-print {\n    display: none !important;\n  }\n}\n/*# sourceMappingURL=bootstrap.css.map */","/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\nhtml {\n  font-family: sans-serif;\n  -webkit-text-size-adjust: 100%;\n      -ms-text-size-adjust: 100%;\n}\nbody {\n  margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n  display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n  display: inline-block;\n  vertical-align: baseline;\n}\naudio:not([controls]) {\n  display: none;\n  height: 0;\n}\n[hidden],\ntemplate {\n  display: none;\n}\na {\n  background-color: transparent;\n}\na:active,\na:hover {\n  outline: 0;\n}\nabbr[title] {\n  border-bottom: 1px dotted;\n}\nb,\nstrong {\n  font-weight: bold;\n}\ndfn {\n  font-style: italic;\n}\nh1 {\n  margin: .67em 0;\n  font-size: 2em;\n}\nmark {\n  color: #000;\n  background: #ff0;\n}\nsmall {\n  font-size: 80%;\n}\nsub,\nsup {\n  position: relative;\n  font-size: 75%;\n  line-height: 0;\n  vertical-align: baseline;\n}\nsup {\n  top: -.5em;\n}\nsub {\n  bottom: -.25em;\n}\nimg {\n  border: 0;\n}\nsvg:not(:root) {\n  overflow: hidden;\n}\nfigure {\n  margin: 1em 40px;\n}\nhr {\n  height: 0;\n  -webkit-box-sizing: content-box;\n     -moz-box-sizing: content-box;\n          box-sizing: content-box;\n}\npre {\n  overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n  font-family: monospace, monospace;\n  font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n  margin: 0;\n  font: inherit;\n  color: inherit;\n}\nbutton {\n  overflow: visible;\n}\nbutton,\nselect {\n  text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n  -webkit-appearance: button;\n  cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n  cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n  padding: 0;\n  border: 0;\n}\ninput {\n  line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n  padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n  height: auto;\n}\ninput[type=\"search\"] {\n  -webkit-box-sizing: content-box;\n     -moz-box-sizing: content-box;\n          box-sizing: content-box;\n  -webkit-appearance: textfield;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\nfieldset {\n  padding: .35em .625em .75em;\n  margin: 0 2px;\n  border: 1px solid #c0c0c0;\n}\nlegend {\n  padding: 0;\n  border: 0;\n}\ntextarea {\n  overflow: auto;\n}\noptgroup {\n  font-weight: bold;\n}\ntable {\n  border-spacing: 0;\n  border-collapse: collapse;\n}\ntd,\nth {\n  padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n  *,\n  *:before,\n  *:after {\n    color: #000 !important;\n    text-shadow: none !important;\n    background: transparent !important;\n    -webkit-box-shadow: none !important;\n            box-shadow: none !important;\n  }\n  a,\n  a:visited {\n    text-decoration: underline;\n  }\n  a[href]:after {\n    content: \" (\" attr(href) \")\";\n  }\n  abbr[title]:after {\n    content: \" (\" attr(title) \")\";\n  }\n  a[href^=\"#\"]:after,\n  a[href^=\"javascript:\"]:after {\n    content: \"\";\n  }\n  pre,\n  blockquote {\n    border: 1px solid #999;\n\n    page-break-inside: avoid;\n  }\n  thead {\n    display: table-header-group;\n  }\n  tr,\n  img {\n    page-break-inside: avoid;\n  }\n  img {\n    max-width: 100% !important;\n  }\n  p,\n  h2,\n  h3 {\n    orphans: 3;\n    widows: 3;\n  }\n  h2,\n  h3 {\n    page-break-after: avoid;\n  }\n  .navbar {\n    display: none;\n  }\n  .btn > .caret,\n  .dropup > .btn > .caret {\n    border-top-color: #000 !important;\n  }\n  .label {\n    border: 1px solid #000;\n  }\n  .table {\n    border-collapse: collapse !important;\n  }\n  .table td,\n  .table th {\n    background-color: #fff !important;\n  }\n  .table-bordered th,\n  .table-bordered td {\n    border: 1px solid #ddd !important;\n  }\n}\n@font-face {\n  font-family: 'Glyphicons Halflings';\n\n  src: url('../fonts/glyphicons-halflings-regular.eot');\n  src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n  position: relative;\n  top: 1px;\n  display: inline-block;\n  font-family: 'Glyphicons Halflings';\n  font-style: normal;\n  font-weight: normal;\n  line-height: 1;\n\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n  content: \"\\002a\";\n}\n.glyphicon-plus:before {\n  content: \"\\002b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n  content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n  content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n  content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n  content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n  content: \"\\270f\";\n}\n.glyphicon-glass:before {\n  content: \"\\e001\";\n}\n.glyphicon-music:before {\n  content: \"\\e002\";\n}\n.glyphicon-search:before {\n  content: \"\\e003\";\n}\n.glyphicon-heart:before {\n  content: \"\\e005\";\n}\n.glyphicon-star:before {\n  content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n  content: \"\\e007\";\n}\n.glyphicon-user:before {\n  content: \"\\e008\";\n}\n.glyphicon-film:before {\n  content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n  content: \"\\e010\";\n}\n.glyphicon-th:before {\n  content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n  content: \"\\e012\";\n}\n.glyphicon-ok:before {\n  content: \"\\e013\";\n}\n.glyphicon-remove:before {\n  content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n  content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n  content: \"\\e016\";\n}\n.glyphicon-off:before {\n  content: \"\\e017\";\n}\n.glyphicon-signal:before {\n  content: \"\\e018\";\n}\n.glyphicon-cog:before {\n  content: \"\\e019\";\n}\n.glyphicon-trash:before {\n  content: \"\\e020\";\n}\n.glyphicon-home:before {\n  content: \"\\e021\";\n}\n.glyphicon-file:before {\n  content: \"\\e022\";\n}\n.glyphicon-time:before {\n  content: \"\\e023\";\n}\n.glyphicon-road:before {\n  content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n  content: \"\\e025\";\n}\n.glyphicon-download:before {\n  content: \"\\e026\";\n}\n.glyphicon-upload:before {\n  content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n  content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n  content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n  content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n  content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n  content: \"\\e032\";\n}\n.glyphicon-lock:before {\n  content: \"\\e033\";\n}\n.glyphicon-flag:before {\n  content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n  content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n  content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n  content: \"\\e037\";\n}\n.glyphicon-volume-up:before {\n  content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n  content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n  content: \"\\e040\";\n}\n.glyphicon-tag:before {\n  content: \"\\e041\";\n}\n.glyphicon-tags:before {\n  content: \"\\e042\";\n}\n.glyphicon-book:before {\n  content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n  content: \"\\e044\";\n}\n.glyphicon-print:before {\n  content: \"\\e045\";\n}\n.glyphicon-camera:before {\n  content: \"\\e046\";\n}\n.glyphicon-font:before {\n  content: \"\\e047\";\n}\n.glyphicon-bold:before {\n  content: \"\\e048\";\n}\n.glyphicon-italic:before {\n  content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n  content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n  content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n  content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n  content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n  content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n  content: \"\\e055\";\n}\n.glyphicon-list:before {\n  content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n  content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n  content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n  content: \"\\e059\";\n}\n.glyphicon-picture:before {\n  content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n  content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n  content: \"\\e063\";\n}\n.glyphicon-tint:before {\n  content: \"\\e064\";\n}\n.glyphicon-edit:before {\n  content: \"\\e065\";\n}\n.glyphicon-share:before {\n  content: \"\\e066\";\n}\n.glyphicon-check:before {\n  content: \"\\e067\";\n}\n.glyphicon-move:before {\n  content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n  content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n  content: \"\\e070\";\n}\n.glyphicon-backward:before {\n  content: \"\\e071\";\n}\n.glyphicon-play:before {\n  content: \"\\e072\";\n}\n.glyphicon-pause:before {\n  content: \"\\e073\";\n}\n.glyphicon-stop:before {\n  content: \"\\e074\";\n}\n.glyphicon-forward:before {\n  content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n  content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n  content: \"\\e077\";\n}\n.glyphicon-eject:before {\n  content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n  content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n  content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n  content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n  content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n  content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n  content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n  content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n  content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n  content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n  content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n  content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n  content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\n  content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n  content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n  content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n  content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n  content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n  content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n  content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n  content: \"\\e101\";\n}\n.glyphicon-gift:before {\n  content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n  content: \"\\e103\";\n}\n.glyphicon-fire:before {\n  content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n  content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n  content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n  content: \"\\e107\";\n}\n.glyphicon-plane:before {\n  content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n  content: \"\\e109\";\n}\n.glyphicon-random:before {\n  content: \"\\e110\";\n}\n.glyphicon-comment:before {\n  content: \"\\e111\";\n}\n.glyphicon-magnet:before {\n  content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n  content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n  content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n  content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n  content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n  content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n  content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n  content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n  content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n  content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n  content: \"\\e122\";\n}\n.glyphicon-bell:before {\n  content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n  content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n  content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n  content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n  content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n  content: \"\\e128\";\n}\n.glyphicon-hand-up:before {\n  content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n  content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n  content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n  content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n  content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n  content: \"\\e134\";\n}\n.glyphicon-globe:before {\n  content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n  content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n  content: \"\\e137\";\n}\n.glyphicon-filter:before {\n  content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n  content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n  content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n  content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n  content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n  content: \"\\e143\";\n}\n.glyphicon-link:before {\n  content: \"\\e144\";\n}\n.glyphicon-phone:before {\n  content: \"\\e145\";\n}\n.glyphicon-pushpin:before {\n  content: \"\\e146\";\n}\n.glyphicon-usd:before {\n  content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n  content: \"\\e149\";\n}\n.glyphicon-sort:before {\n  content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n  content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n  content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n  content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n  content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n  content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n  content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n  content: \"\\e157\";\n}\n.glyphicon-expand:before {\n  content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n  content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n  content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n  content: \"\\e161\";\n}\n.glyphicon-flash:before {\n  content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n  content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n  content: \"\\e164\";\n}\n.glyphicon-record:before {\n  content: \"\\e165\";\n}\n.glyphicon-save:before {\n  content: \"\\e166\";\n}\n.glyphicon-open:before {\n  content: \"\\e167\";\n}\n.glyphicon-saved:before {\n  content: \"\\e168\";\n}\n.glyphicon-import:before {\n  content: \"\\e169\";\n}\n.glyphicon-export:before {\n  content: \"\\e170\";\n}\n.glyphicon-send:before {\n  content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n  content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n  content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n  content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n  content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n  content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n  content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n  content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n  content: \"\\e179\";\n}\n.glyphicon-header:before {\n  content: \"\\e180\";\n}\n.glyphicon-compressed:before {\n  content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n  content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n  content: \"\\e183\";\n}\n.glyphicon-tower:before {\n  content: \"\\e184\";\n}\n.glyphicon-stats:before {\n  content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n  content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n  content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n  content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n  content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n  content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n  content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n  content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n  content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n  content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n  content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n  content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n  content: \"\\e198\";\n}\n.glyphicon-tree-conifer:before {\n  content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n  content: \"\\e200\";\n}\n.glyphicon-cd:before {\n  content: \"\\e201\";\n}\n.glyphicon-save-file:before {\n  content: \"\\e202\";\n}\n.glyphicon-open-file:before {\n  content: \"\\e203\";\n}\n.glyphicon-level-up:before {\n  content: \"\\e204\";\n}\n.glyphicon-copy:before {\n  content: \"\\e205\";\n}\n.glyphicon-paste:before {\n  content: \"\\e206\";\n}\n.glyphicon-alert:before {\n  content: \"\\e209\";\n}\n.glyphicon-equalizer:before {\n  content: \"\\e210\";\n}\n.glyphicon-king:before {\n  content: \"\\e211\";\n}\n.glyphicon-queen:before {\n  content: \"\\e212\";\n}\n.glyphicon-pawn:before {\n  content: \"\\e213\";\n}\n.glyphicon-bishop:before {\n  content: \"\\e214\";\n}\n.glyphicon-knight:before {\n  content: \"\\e215\";\n}\n.glyphicon-baby-formula:before {\n  content: \"\\e216\";\n}\n.glyphicon-tent:before {\n  content: \"\\26fa\";\n}\n.glyphicon-blackboard:before {\n  content: \"\\e218\";\n}\n.glyphicon-bed:before {\n  content: \"\\e219\";\n}\n.glyphicon-apple:before {\n  content: \"\\f8ff\";\n}\n.glyphicon-erase:before {\n  content: \"\\e221\";\n}\n.glyphicon-hourglass:before {\n  content: \"\\231b\";\n}\n.glyphicon-lamp:before {\n  content: \"\\e223\";\n}\n.glyphicon-duplicate:before {\n  content: \"\\e224\";\n}\n.glyphicon-piggy-bank:before {\n  content: \"\\e225\";\n}\n.glyphicon-scissors:before {\n  content: \"\\e226\";\n}\n.glyphicon-bitcoin:before {\n  content: \"\\e227\";\n}\n.glyphicon-btc:before {\n  content: \"\\e227\";\n}\n.glyphicon-xbt:before {\n  content: \"\\e227\";\n}\n.glyphicon-yen:before {\n  content: \"\\00a5\";\n}\n.glyphicon-jpy:before {\n  content: \"\\00a5\";\n}\n.glyphicon-ruble:before {\n  content: \"\\20bd\";\n}\n.glyphicon-rub:before {\n  content: \"\\20bd\";\n}\n.glyphicon-scale:before {\n  content: \"\\e230\";\n}\n.glyphicon-ice-lolly:before {\n  content: \"\\e231\";\n}\n.glyphicon-ice-lolly-tasted:before {\n  content: \"\\e232\";\n}\n.glyphicon-education:before {\n  content: \"\\e233\";\n}\n.glyphicon-option-horizontal:before {\n  content: \"\\e234\";\n}\n.glyphicon-option-vertical:before {\n  content: \"\\e235\";\n}\n.glyphicon-menu-hamburger:before {\n  content: \"\\e236\";\n}\n.glyphicon-modal-window:before {\n  content: \"\\e237\";\n}\n.glyphicon-oil:before {\n  content: \"\\e238\";\n}\n.glyphicon-grain:before {\n  content: \"\\e239\";\n}\n.glyphicon-sunglasses:before {\n  content: \"\\e240\";\n}\n.glyphicon-text-size:before {\n  content: \"\\e241\";\n}\n.glyphicon-text-color:before {\n  content: \"\\e242\";\n}\n.glyphicon-text-background:before {\n  content: \"\\e243\";\n}\n.glyphicon-object-align-top:before {\n  content: \"\\e244\";\n}\n.glyphicon-object-align-bottom:before {\n  content: \"\\e245\";\n}\n.glyphicon-object-align-horizontal:before {\n  content: \"\\e246\";\n}\n.glyphicon-object-align-left:before {\n  content: \"\\e247\";\n}\n.glyphicon-object-align-vertical:before {\n  content: \"\\e248\";\n}\n.glyphicon-object-align-right:before {\n  content: \"\\e249\";\n}\n.glyphicon-triangle-right:before {\n  content: \"\\e250\";\n}\n.glyphicon-triangle-left:before {\n  content: \"\\e251\";\n}\n.glyphicon-triangle-bottom:before {\n  content: \"\\e252\";\n}\n.glyphicon-triangle-top:before {\n  content: \"\\e253\";\n}\n.glyphicon-console:before {\n  content: \"\\e254\";\n}\n.glyphicon-superscript:before {\n  content: \"\\e255\";\n}\n.glyphicon-subscript:before {\n  content: \"\\e256\";\n}\n.glyphicon-menu-left:before {\n  content: \"\\e257\";\n}\n.glyphicon-menu-right:before {\n  content: \"\\e258\";\n}\n.glyphicon-menu-down:before {\n  content: \"\\e259\";\n}\n.glyphicon-menu-up:before {\n  content: \"\\e260\";\n}\n* {\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n}\n*:before,\n*:after {\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n}\nhtml {\n  font-size: 10px;\n\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #333;\n  background-color: #fff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n  font-family: inherit;\n  font-size: inherit;\n  line-height: inherit;\n}\na {\n  color: #337ab7;\n  text-decoration: none;\n}\na:hover,\na:focus {\n  color: #23527c;\n  text-decoration: underline;\n}\na:focus {\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\nfigure {\n  margin: 0;\n}\nimg {\n  vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n  display: block;\n  max-width: 100%;\n  height: auto;\n}\n.img-rounded {\n  border-radius: 6px;\n}\n.img-thumbnail {\n  display: inline-block;\n  max-width: 100%;\n  height: auto;\n  padding: 4px;\n  line-height: 1.42857143;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 4px;\n  -webkit-transition: all .2s ease-in-out;\n       -o-transition: all .2s ease-in-out;\n          transition: all .2s ease-in-out;\n}\n.img-circle {\n  border-radius: 50%;\n}\nhr {\n  margin-top: 20px;\n  margin-bottom: 20px;\n  border: 0;\n  border-top: 1px solid #eee;\n}\n.sr-only {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  padding: 0;\n  margin: -1px;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n  position: static;\n  width: auto;\n  height: auto;\n  margin: 0;\n  overflow: visible;\n  clip: auto;\n}\n[role=\"button\"] {\n  cursor: pointer;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n  font-family: inherit;\n  font-weight: 500;\n  line-height: 1.1;\n  color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n  font-weight: normal;\n  line-height: 1;\n  color: #777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n  margin-top: 20px;\n  margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n  font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n  font-size: 75%;\n}\nh1,\n.h1 {\n  font-size: 36px;\n}\nh2,\n.h2 {\n  font-size: 30px;\n}\nh3,\n.h3 {\n  font-size: 24px;\n}\nh4,\n.h4 {\n  font-size: 18px;\n}\nh5,\n.h5 {\n  font-size: 14px;\n}\nh6,\n.h6 {\n  font-size: 12px;\n}\np {\n  margin: 0 0 10px;\n}\n.lead {\n  margin-bottom: 20px;\n  font-size: 16px;\n  font-weight: 300;\n  line-height: 1.4;\n}\n@media (min-width: 768px) {\n  .lead {\n    font-size: 21px;\n  }\n}\nsmall,\n.small {\n  font-size: 85%;\n}\nmark,\n.mark {\n  padding: .2em;\n  background-color: #fcf8e3;\n}\n.text-left {\n  text-align: left;\n}\n.text-right {\n  text-align: right;\n}\n.text-center {\n  text-align: center;\n}\n.text-justify {\n  text-align: justify;\n}\n.text-nowrap {\n  white-space: nowrap;\n}\n.text-lowercase {\n  text-transform: lowercase;\n}\n.text-uppercase {\n  text-transform: uppercase;\n}\n.text-capitalize {\n  text-transform: capitalize;\n}\n.text-muted {\n  color: #777;\n}\n.text-primary {\n  color: #337ab7;\n}\na.text-primary:hover,\na.text-primary:focus {\n  color: #286090;\n}\n.text-success {\n  color: #3c763d;\n}\na.text-success:hover,\na.text-success:focus {\n  color: #2b542c;\n}\n.text-info {\n  color: #31708f;\n}\na.text-info:hover,\na.text-info:focus {\n  color: #245269;\n}\n.text-warning {\n  color: #8a6d3b;\n}\na.text-warning:hover,\na.text-warning:focus {\n  color: #66512c;\n}\n.text-danger {\n  color: #a94442;\n}\na.text-danger:hover,\na.text-danger:focus {\n  color: #843534;\n}\n.bg-primary {\n  color: #fff;\n  background-color: #337ab7;\n}\na.bg-primary:hover,\na.bg-primary:focus {\n  background-color: #286090;\n}\n.bg-success {\n  background-color: #dff0d8;\n}\na.bg-success:hover,\na.bg-success:focus {\n  background-color: #c1e2b3;\n}\n.bg-info {\n  background-color: #d9edf7;\n}\na.bg-info:hover,\na.bg-info:focus {\n  background-color: #afd9ee;\n}\n.bg-warning {\n  background-color: #fcf8e3;\n}\na.bg-warning:hover,\na.bg-warning:focus {\n  background-color: #f7ecb5;\n}\n.bg-danger {\n  background-color: #f2dede;\n}\na.bg-danger:hover,\na.bg-danger:focus {\n  background-color: #e4b9b9;\n}\n.page-header {\n  padding-bottom: 9px;\n  margin: 40px 0 20px;\n  border-bottom: 1px solid #eee;\n}\nul,\nol {\n  margin-top: 0;\n  margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n  margin-bottom: 0;\n}\n.list-unstyled {\n  padding-left: 0;\n  list-style: none;\n}\n.list-inline {\n  padding-left: 0;\n  margin-left: -5px;\n  list-style: none;\n}\n.list-inline > li {\n  display: inline-block;\n  padding-right: 5px;\n  padding-left: 5px;\n}\ndl {\n  margin-top: 0;\n  margin-bottom: 20px;\n}\ndt,\ndd {\n  line-height: 1.42857143;\n}\ndt {\n  font-weight: bold;\n}\ndd {\n  margin-left: 0;\n}\n@media (min-width: 768px) {\n  .dl-horizontal dt {\n    float: left;\n    width: 160px;\n    overflow: hidden;\n    clear: left;\n    text-align: right;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n  }\n  .dl-horizontal dd {\n    margin-left: 180px;\n  }\n}\nabbr[title],\nabbr[data-original-title] {\n  cursor: help;\n  border-bottom: 1px dotted #777;\n}\n.initialism {\n  font-size: 90%;\n  text-transform: uppercase;\n}\nblockquote {\n  padding: 10px 20px;\n  margin: 0 0 20px;\n  font-size: 17.5px;\n  border-left: 5px solid #eee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n  margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n  display: block;\n  font-size: 80%;\n  line-height: 1.42857143;\n  color: #777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n  content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n  padding-right: 15px;\n  padding-left: 0;\n  text-align: right;\n  border-right: 5px solid #eee;\n  border-left: 0;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n  content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n  content: '\\00A0 \\2014';\n}\naddress {\n  margin-bottom: 20px;\n  font-style: normal;\n  line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n  font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: #c7254e;\n  background-color: #f9f2f4;\n  border-radius: 4px;\n}\nkbd {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: #fff;\n  background-color: #333;\n  border-radius: 3px;\n  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);\n          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);\n}\nkbd kbd {\n  padding: 0;\n  font-size: 100%;\n  font-weight: bold;\n  -webkit-box-shadow: none;\n          box-shadow: none;\n}\npre {\n  display: block;\n  padding: 9.5px;\n  margin: 0 0 10px;\n  font-size: 13px;\n  line-height: 1.42857143;\n  color: #333;\n  word-break: break-all;\n  word-wrap: break-word;\n  background-color: #f5f5f5;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n}\npre code {\n  padding: 0;\n  font-size: inherit;\n  color: inherit;\n  white-space: pre-wrap;\n  background-color: transparent;\n  border-radius: 0;\n}\n.pre-scrollable {\n  max-height: 340px;\n  overflow-y: scroll;\n}\n.container {\n  padding-right: 15px;\n  padding-left: 15px;\n  margin-right: auto;\n  margin-left: auto;\n}\n@media (min-width: 768px) {\n  .container {\n    width: 750px;\n  }\n}\n@media (min-width: 992px) {\n  .container {\n    width: 970px;\n  }\n}\n@media (min-width: 1200px) {\n  .container {\n    width: 1170px;\n  }\n}\n.container-fluid {\n  padding-right: 15px;\n  padding-left: 15px;\n  margin-right: auto;\n  margin-left: auto;\n}\n.row {\n  margin-right: -15px;\n  margin-left: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n  position: relative;\n  min-height: 1px;\n  padding-right: 15px;\n  padding-left: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n  float: left;\n}\n.col-xs-12 {\n  width: 100%;\n}\n.col-xs-11 {\n  width: 91.66666667%;\n}\n.col-xs-10 {\n  width: 83.33333333%;\n}\n.col-xs-9 {\n  width: 75%;\n}\n.col-xs-8 {\n  width: 66.66666667%;\n}\n.col-xs-7 {\n  width: 58.33333333%;\n}\n.col-xs-6 {\n  width: 50%;\n}\n.col-xs-5 {\n  width: 41.66666667%;\n}\n.col-xs-4 {\n  width: 33.33333333%;\n}\n.col-xs-3 {\n  width: 25%;\n}\n.col-xs-2 {\n  width: 16.66666667%;\n}\n.col-xs-1 {\n  width: 8.33333333%;\n}\n.col-xs-pull-12 {\n  right: 100%;\n}\n.col-xs-pull-11 {\n  right: 91.66666667%;\n}\n.col-xs-pull-10 {\n  right: 83.33333333%;\n}\n.col-xs-pull-9 {\n  right: 75%;\n}\n.col-xs-pull-8 {\n  right: 66.66666667%;\n}\n.col-xs-pull-7 {\n  right: 58.33333333%;\n}\n.col-xs-pull-6 {\n  right: 50%;\n}\n.col-xs-pull-5 {\n  right: 41.66666667%;\n}\n.col-xs-pull-4 {\n  right: 33.33333333%;\n}\n.col-xs-pull-3 {\n  right: 25%;\n}\n.col-xs-pull-2 {\n  right: 16.66666667%;\n}\n.col-xs-pull-1 {\n  right: 8.33333333%;\n}\n.col-xs-pull-0 {\n  right: auto;\n}\n.col-xs-push-12 {\n  left: 100%;\n}\n.col-xs-push-11 {\n  left: 91.66666667%;\n}\n.col-xs-push-10 {\n  left: 83.33333333%;\n}\n.col-xs-push-9 {\n  left: 75%;\n}\n.col-xs-push-8 {\n  left: 66.66666667%;\n}\n.col-xs-push-7 {\n  left: 58.33333333%;\n}\n.col-xs-push-6 {\n  left: 50%;\n}\n.col-xs-push-5 {\n  left: 41.66666667%;\n}\n.col-xs-push-4 {\n  left: 33.33333333%;\n}\n.col-xs-push-3 {\n  left: 25%;\n}\n.col-xs-push-2 {\n  left: 16.66666667%;\n}\n.col-xs-push-1 {\n  left: 8.33333333%;\n}\n.col-xs-push-0 {\n  left: auto;\n}\n.col-xs-offset-12 {\n  margin-left: 100%;\n}\n.col-xs-offset-11 {\n  margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n  margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n  margin-left: 75%;\n}\n.col-xs-offset-8 {\n  margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n  margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n  margin-left: 50%;\n}\n.col-xs-offset-5 {\n  margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n  margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n  margin-left: 25%;\n}\n.col-xs-offset-2 {\n  margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n  margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n  margin-left: 0;\n}\n@media (min-width: 768px) {\n  .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n    float: left;\n  }\n  .col-sm-12 {\n    width: 100%;\n  }\n  .col-sm-11 {\n    width: 91.66666667%;\n  }\n  .col-sm-10 {\n    width: 83.33333333%;\n  }\n  .col-sm-9 {\n    width: 75%;\n  }\n  .col-sm-8 {\n    width: 66.66666667%;\n  }\n  .col-sm-7 {\n    width: 58.33333333%;\n  }\n  .col-sm-6 {\n    width: 50%;\n  }\n  .col-sm-5 {\n    width: 41.66666667%;\n  }\n  .col-sm-4 {\n    width: 33.33333333%;\n  }\n  .col-sm-3 {\n    width: 25%;\n  }\n  .col-sm-2 {\n    width: 16.66666667%;\n  }\n  .col-sm-1 {\n    width: 8.33333333%;\n  }\n  .col-sm-pull-12 {\n    right: 100%;\n  }\n  .col-sm-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-sm-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-sm-pull-9 {\n    right: 75%;\n  }\n  .col-sm-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-sm-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-sm-pull-6 {\n    right: 50%;\n  }\n  .col-sm-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-sm-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-sm-pull-3 {\n    right: 25%;\n  }\n  .col-sm-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-sm-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-sm-pull-0 {\n    right: auto;\n  }\n  .col-sm-push-12 {\n    left: 100%;\n  }\n  .col-sm-push-11 {\n    left: 91.66666667%;\n  }\n  .col-sm-push-10 {\n    left: 83.33333333%;\n  }\n  .col-sm-push-9 {\n    left: 75%;\n  }\n  .col-sm-push-8 {\n    left: 66.66666667%;\n  }\n  .col-sm-push-7 {\n    left: 58.33333333%;\n  }\n  .col-sm-push-6 {\n    left: 50%;\n  }\n  .col-sm-push-5 {\n    left: 41.66666667%;\n  }\n  .col-sm-push-4 {\n    left: 33.33333333%;\n  }\n  .col-sm-push-3 {\n    left: 25%;\n  }\n  .col-sm-push-2 {\n    left: 16.66666667%;\n  }\n  .col-sm-push-1 {\n    left: 8.33333333%;\n  }\n  .col-sm-push-0 {\n    left: auto;\n  }\n  .col-sm-offset-12 {\n    margin-left: 100%;\n  }\n  .col-sm-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-sm-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-sm-offset-9 {\n    margin-left: 75%;\n  }\n  .col-sm-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-sm-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-sm-offset-6 {\n    margin-left: 50%;\n  }\n  .col-sm-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-sm-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-sm-offset-3 {\n    margin-left: 25%;\n  }\n  .col-sm-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-sm-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-sm-offset-0 {\n    margin-left: 0;\n  }\n}\n@media (min-width: 992px) {\n  .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n    float: left;\n  }\n  .col-md-12 {\n    width: 100%;\n  }\n  .col-md-11 {\n    width: 91.66666667%;\n  }\n  .col-md-10 {\n    width: 83.33333333%;\n  }\n  .col-md-9 {\n    width: 75%;\n  }\n  .col-md-8 {\n    width: 66.66666667%;\n  }\n  .col-md-7 {\n    width: 58.33333333%;\n  }\n  .col-md-6 {\n    width: 50%;\n  }\n  .col-md-5 {\n    width: 41.66666667%;\n  }\n  .col-md-4 {\n    width: 33.33333333%;\n  }\n  .col-md-3 {\n    width: 25%;\n  }\n  .col-md-2 {\n    width: 16.66666667%;\n  }\n  .col-md-1 {\n    width: 8.33333333%;\n  }\n  .col-md-pull-12 {\n    right: 100%;\n  }\n  .col-md-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-md-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-md-pull-9 {\n    right: 75%;\n  }\n  .col-md-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-md-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-md-pull-6 {\n    right: 50%;\n  }\n  .col-md-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-md-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-md-pull-3 {\n    right: 25%;\n  }\n  .col-md-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-md-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-md-pull-0 {\n    right: auto;\n  }\n  .col-md-push-12 {\n    left: 100%;\n  }\n  .col-md-push-11 {\n    left: 91.66666667%;\n  }\n  .col-md-push-10 {\n    left: 83.33333333%;\n  }\n  .col-md-push-9 {\n    left: 75%;\n  }\n  .col-md-push-8 {\n    left: 66.66666667%;\n  }\n  .col-md-push-7 {\n    left: 58.33333333%;\n  }\n  .col-md-push-6 {\n    left: 50%;\n  }\n  .col-md-push-5 {\n    left: 41.66666667%;\n  }\n  .col-md-push-4 {\n    left: 33.33333333%;\n  }\n  .col-md-push-3 {\n    left: 25%;\n  }\n  .col-md-push-2 {\n    left: 16.66666667%;\n  }\n  .col-md-push-1 {\n    left: 8.33333333%;\n  }\n  .col-md-push-0 {\n    left: auto;\n  }\n  .col-md-offset-12 {\n    margin-left: 100%;\n  }\n  .col-md-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-md-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-md-offset-9 {\n    margin-left: 75%;\n  }\n  .col-md-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-md-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-md-offset-6 {\n    margin-left: 50%;\n  }\n  .col-md-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-md-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-md-offset-3 {\n    margin-left: 25%;\n  }\n  .col-md-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-md-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-md-offset-0 {\n    margin-left: 0;\n  }\n}\n@media (min-width: 1200px) {\n  .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n    float: left;\n  }\n  .col-lg-12 {\n    width: 100%;\n  }\n  .col-lg-11 {\n    width: 91.66666667%;\n  }\n  .col-lg-10 {\n    width: 83.33333333%;\n  }\n  .col-lg-9 {\n    width: 75%;\n  }\n  .col-lg-8 {\n    width: 66.66666667%;\n  }\n  .col-lg-7 {\n    width: 58.33333333%;\n  }\n  .col-lg-6 {\n    width: 50%;\n  }\n  .col-lg-5 {\n    width: 41.66666667%;\n  }\n  .col-lg-4 {\n    width: 33.33333333%;\n  }\n  .col-lg-3 {\n    width: 25%;\n  }\n  .col-lg-2 {\n    width: 16.66666667%;\n  }\n  .col-lg-1 {\n    width: 8.33333333%;\n  }\n  .col-lg-pull-12 {\n    right: 100%;\n  }\n  .col-lg-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-lg-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-lg-pull-9 {\n    right: 75%;\n  }\n  .col-lg-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-lg-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-lg-pull-6 {\n    right: 50%;\n  }\n  .col-lg-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-lg-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-lg-pull-3 {\n    right: 25%;\n  }\n  .col-lg-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-lg-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-lg-pull-0 {\n    right: auto;\n  }\n  .col-lg-push-12 {\n    left: 100%;\n  }\n  .col-lg-push-11 {\n    left: 91.66666667%;\n  }\n  .col-lg-push-10 {\n    left: 83.33333333%;\n  }\n  .col-lg-push-9 {\n    left: 75%;\n  }\n  .col-lg-push-8 {\n    left: 66.66666667%;\n  }\n  .col-lg-push-7 {\n    left: 58.33333333%;\n  }\n  .col-lg-push-6 {\n    left: 50%;\n  }\n  .col-lg-push-5 {\n    left: 41.66666667%;\n  }\n  .col-lg-push-4 {\n    left: 33.33333333%;\n  }\n  .col-lg-push-3 {\n    left: 25%;\n  }\n  .col-lg-push-2 {\n    left: 16.66666667%;\n  }\n  .col-lg-push-1 {\n    left: 8.33333333%;\n  }\n  .col-lg-push-0 {\n    left: auto;\n  }\n  .col-lg-offset-12 {\n    margin-left: 100%;\n  }\n  .col-lg-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-lg-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-lg-offset-9 {\n    margin-left: 75%;\n  }\n  .col-lg-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-lg-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-lg-offset-6 {\n    margin-left: 50%;\n  }\n  .col-lg-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-lg-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-lg-offset-3 {\n    margin-left: 25%;\n  }\n  .col-lg-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-lg-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-lg-offset-0 {\n    margin-left: 0;\n  }\n}\ntable {\n  background-color: transparent;\n}\ncaption {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  color: #777;\n  text-align: left;\n}\nth {\n  text-align: left;\n}\n.table {\n  width: 100%;\n  max-width: 100%;\n  margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n  padding: 8px;\n  line-height: 1.42857143;\n  vertical-align: top;\n  border-top: 1px solid #ddd;\n}\n.table > thead > tr > th {\n  vertical-align: bottom;\n  border-bottom: 2px solid #ddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n  border-top: 0;\n}\n.table > tbody + tbody {\n  border-top: 2px solid #ddd;\n}\n.table .table {\n  background-color: #fff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n  padding: 5px;\n}\n.table-bordered {\n  border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n  border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n  border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-of-type(odd) {\n  background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n  background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n  position: static;\n  display: table-column;\n  float: none;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n  position: static;\n  display: table-cell;\n  float: none;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n  background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n  background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n  background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n  background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n  background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n  background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n  background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n  background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n  background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n  background-color: #ebcccc;\n}\n.table-responsive {\n  min-height: .01%;\n  overflow-x: auto;\n}\n@media screen and (max-width: 767px) {\n  .table-responsive {\n    width: 100%;\n    margin-bottom: 15px;\n    overflow-y: hidden;\n    -ms-overflow-style: -ms-autohiding-scrollbar;\n    border: 1px solid #ddd;\n  }\n  .table-responsive > .table {\n    margin-bottom: 0;\n  }\n  .table-responsive > .table > thead > tr > th,\n  .table-responsive > .table > tbody > tr > th,\n  .table-responsive > .table > tfoot > tr > th,\n  .table-responsive > .table > thead > tr > td,\n  .table-responsive > .table > tbody > tr > td,\n  .table-responsive > .table > tfoot > tr > td {\n    white-space: nowrap;\n  }\n  .table-responsive > .table-bordered {\n    border: 0;\n  }\n  .table-responsive > .table-bordered > thead > tr > th:first-child,\n  .table-responsive > .table-bordered > tbody > tr > th:first-child,\n  .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n  .table-responsive > .table-bordered > thead > tr > td:first-child,\n  .table-responsive > .table-bordered > tbody > tr > td:first-child,\n  .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n    border-left: 0;\n  }\n  .table-responsive > .table-bordered > thead > tr > th:last-child,\n  .table-responsive > .table-bordered > tbody > tr > th:last-child,\n  .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n  .table-responsive > .table-bordered > thead > tr > td:last-child,\n  .table-responsive > .table-bordered > tbody > tr > td:last-child,\n  .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n    border-right: 0;\n  }\n  .table-responsive > .table-bordered > tbody > tr:last-child > th,\n  .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n  .table-responsive > .table-bordered > tbody > tr:last-child > td,\n  .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n    border-bottom: 0;\n  }\n}\nfieldset {\n  min-width: 0;\n  padding: 0;\n  margin: 0;\n  border: 0;\n}\nlegend {\n  display: block;\n  width: 100%;\n  padding: 0;\n  margin-bottom: 20px;\n  font-size: 21px;\n  line-height: inherit;\n  color: #333;\n  border: 0;\n  border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n  display: inline-block;\n  max-width: 100%;\n  margin-bottom: 5px;\n  font-weight: bold;\n}\ninput[type=\"search\"] {\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n  margin: 4px 0 0;\n  margin-top: 1px \\9;\n  line-height: normal;\n}\ninput[type=\"file\"] {\n  display: block;\n}\ninput[type=\"range\"] {\n  display: block;\n  width: 100%;\n}\nselect[multiple],\nselect[size] {\n  height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\noutput {\n  display: block;\n  padding-top: 7px;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #555;\n}\n.form-control {\n  display: block;\n  width: 100%;\n  height: 34px;\n  padding: 6px 12px;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #555;\n  background-color: #fff;\n  background-image: none;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n  -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;\n       -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n          transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n  border-color: #66afe9;\n  outline: 0;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);\n          box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);\n}\n.form-control::-moz-placeholder {\n  color: #999;\n  opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n  color: #999;\n}\n.form-control::-webkit-input-placeholder {\n  color: #999;\n}\n.form-control::-ms-expand {\n  background-color: transparent;\n  border: 0;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n  background-color: #eee;\n  opacity: 1;\n}\n.form-control[disabled],\nfieldset[disabled] .form-control {\n  cursor: not-allowed;\n}\ntextarea.form-control {\n  height: auto;\n}\ninput[type=\"search\"] {\n  -webkit-appearance: none;\n}\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n  input[type=\"date\"].form-control,\n  input[type=\"time\"].form-control,\n  input[type=\"datetime-local\"].form-control,\n  input[type=\"month\"].form-control {\n    line-height: 34px;\n  }\n  input[type=\"date\"].input-sm,\n  input[type=\"time\"].input-sm,\n  input[type=\"datetime-local\"].input-sm,\n  input[type=\"month\"].input-sm,\n  .input-group-sm input[type=\"date\"],\n  .input-group-sm input[type=\"time\"],\n  .input-group-sm input[type=\"datetime-local\"],\n  .input-group-sm input[type=\"month\"] {\n    line-height: 30px;\n  }\n  input[type=\"date\"].input-lg,\n  input[type=\"time\"].input-lg,\n  input[type=\"datetime-local\"].input-lg,\n  input[type=\"month\"].input-lg,\n  .input-group-lg input[type=\"date\"],\n  .input-group-lg input[type=\"time\"],\n  .input-group-lg input[type=\"datetime-local\"],\n  .input-group-lg input[type=\"month\"] {\n    line-height: 46px;\n  }\n}\n.form-group {\n  margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n  position: relative;\n  display: block;\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n  min-height: 20px;\n  padding-left: 20px;\n  margin-bottom: 0;\n  font-weight: normal;\n  cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n  position: absolute;\n  margin-top: 4px \\9;\n  margin-left: -20px;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n  margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n  position: relative;\n  display: inline-block;\n  padding-left: 20px;\n  margin-bottom: 0;\n  font-weight: normal;\n  vertical-align: middle;\n  cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n  margin-top: 0;\n  margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n  cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n  cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n  cursor: not-allowed;\n}\n.form-control-static {\n  min-height: 34px;\n  padding-top: 7px;\n  padding-bottom: 7px;\n  margin-bottom: 0;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n  padding-right: 0;\n  padding-left: 0;\n}\n.input-sm {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\nselect.input-sm {\n  height: 30px;\n  line-height: 30px;\n}\ntextarea.input-sm,\nselect[multiple].input-sm {\n  height: auto;\n}\n.form-group-sm .form-control {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.form-group-sm select.form-control {\n  height: 30px;\n  line-height: 30px;\n}\n.form-group-sm textarea.form-control,\n.form-group-sm select[multiple].form-control {\n  height: auto;\n}\n.form-group-sm .form-control-static {\n  height: 30px;\n  min-height: 32px;\n  padding: 6px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n}\n.input-lg {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\nselect.input-lg {\n  height: 46px;\n  line-height: 46px;\n}\ntextarea.input-lg,\nselect[multiple].input-lg {\n  height: auto;\n}\n.form-group-lg .form-control {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\n.form-group-lg select.form-control {\n  height: 46px;\n  line-height: 46px;\n}\n.form-group-lg textarea.form-control,\n.form-group-lg select[multiple].form-control {\n  height: auto;\n}\n.form-group-lg .form-control-static {\n  height: 46px;\n  min-height: 38px;\n  padding: 11px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n}\n.has-feedback {\n  position: relative;\n}\n.has-feedback .form-control {\n  padding-right: 42.5px;\n}\n.form-control-feedback {\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: 2;\n  display: block;\n  width: 34px;\n  height: 34px;\n  line-height: 34px;\n  text-align: center;\n  pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n  width: 46px;\n  height: 46px;\n  line-height: 46px;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n  width: 30px;\n  height: 30px;\n  line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n  color: #3c763d;\n}\n.has-success .form-control {\n  border-color: #3c763d;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n}\n.has-success .form-control:focus {\n  border-color: #2b542c;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n  color: #3c763d;\n  background-color: #dff0d8;\n  border-color: #3c763d;\n}\n.has-success .form-control-feedback {\n  color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n  color: #8a6d3b;\n}\n.has-warning .form-control {\n  border-color: #8a6d3b;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n}\n.has-warning .form-control:focus {\n  border-color: #66512c;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n  border-color: #8a6d3b;\n}\n.has-warning .form-control-feedback {\n  color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n  color: #a94442;\n}\n.has-error .form-control {\n  border-color: #a94442;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n}\n.has-error .form-control:focus {\n  border-color: #843534;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n  color: #a94442;\n  background-color: #f2dede;\n  border-color: #a94442;\n}\n.has-error .form-control-feedback {\n  color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n  top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n  top: 0;\n}\n.help-block {\n  display: block;\n  margin-top: 5px;\n  margin-bottom: 10px;\n  color: #737373;\n}\n@media (min-width: 768px) {\n  .form-inline .form-group {\n    display: inline-block;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .form-control {\n    display: inline-block;\n    width: auto;\n    vertical-align: middle;\n  }\n  .form-inline .form-control-static {\n    display: inline-block;\n  }\n  .form-inline .input-group {\n    display: inline-table;\n    vertical-align: middle;\n  }\n  .form-inline .input-group .input-group-addon,\n  .form-inline .input-group .input-group-btn,\n  .form-inline .input-group .form-control {\n    width: auto;\n  }\n  .form-inline .input-group > .form-control {\n    width: 100%;\n  }\n  .form-inline .control-label {\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .radio,\n  .form-inline .checkbox {\n    display: inline-block;\n    margin-top: 0;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .radio label,\n  .form-inline .checkbox label {\n    padding-left: 0;\n  }\n  .form-inline .radio input[type=\"radio\"],\n  .form-inline .checkbox input[type=\"checkbox\"] {\n    position: relative;\n    margin-left: 0;\n  }\n  .form-inline .has-feedback .form-control-feedback {\n    top: 0;\n  }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n  padding-top: 7px;\n  margin-top: 0;\n  margin-bottom: 0;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n  min-height: 27px;\n}\n.form-horizontal .form-group {\n  margin-right: -15px;\n  margin-left: -15px;\n}\n@media (min-width: 768px) {\n  .form-horizontal .control-label {\n    padding-top: 7px;\n    margin-bottom: 0;\n    text-align: right;\n  }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n  right: 15px;\n}\n@media (min-width: 768px) {\n  .form-horizontal .form-group-lg .control-label {\n    padding-top: 11px;\n    font-size: 18px;\n  }\n}\n@media (min-width: 768px) {\n  .form-horizontal .form-group-sm .control-label {\n    padding-top: 6px;\n    font-size: 12px;\n  }\n}\n.btn {\n  display: inline-block;\n  padding: 6px 12px;\n  margin-bottom: 0;\n  font-size: 14px;\n  font-weight: normal;\n  line-height: 1.42857143;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: middle;\n  -ms-touch-action: manipulation;\n      touch-action: manipulation;\n  cursor: pointer;\n  -webkit-user-select: none;\n     -moz-user-select: none;\n      -ms-user-select: none;\n          user-select: none;\n  background-image: none;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n  color: #333;\n  text-decoration: none;\n}\n.btn:active,\n.btn.active {\n  background-image: none;\n  outline: 0;\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n  cursor: not-allowed;\n  filter: alpha(opacity=65);\n  -webkit-box-shadow: none;\n          box-shadow: none;\n  opacity: .65;\n}\na.btn.disabled,\nfieldset[disabled] a.btn {\n  pointer-events: none;\n}\n.btn-default {\n  color: #333;\n  background-color: #fff;\n  border-color: #ccc;\n}\n.btn-default:focus,\n.btn-default.focus {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #8c8c8c;\n}\n.btn-default:hover {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #adadad;\n}\n.btn-default:active:hover,\n.btn-default.active:hover,\n.open > .dropdown-toggle.btn-default:hover,\n.btn-default:active:focus,\n.btn-default.active:focus,\n.open > .dropdown-toggle.btn-default:focus,\n.btn-default:active.focus,\n.btn-default.active.focus,\n.open > .dropdown-toggle.btn-default.focus {\n  color: #333;\n  background-color: #d4d4d4;\n  border-color: #8c8c8c;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n  background-image: none;\n}\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus {\n  background-color: #fff;\n  border-color: #ccc;\n}\n.btn-default .badge {\n  color: #fff;\n  background-color: #333;\n}\n.btn-primary {\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #2e6da4;\n}\n.btn-primary:focus,\n.btn-primary.focus {\n  color: #fff;\n  background-color: #286090;\n  border-color: #122b40;\n}\n.btn-primary:hover {\n  color: #fff;\n  background-color: #286090;\n  border-color: #204d74;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n  color: #fff;\n  background-color: #286090;\n  border-color: #204d74;\n}\n.btn-primary:active:hover,\n.btn-primary.active:hover,\n.open > .dropdown-toggle.btn-primary:hover,\n.btn-primary:active:focus,\n.btn-primary.active:focus,\n.open > .dropdown-toggle.btn-primary:focus,\n.btn-primary:active.focus,\n.btn-primary.active.focus,\n.open > .dropdown-toggle.btn-primary.focus {\n  color: #fff;\n  background-color: #204d74;\n  border-color: #122b40;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n  background-image: none;\n}\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus {\n  background-color: #337ab7;\n  border-color: #2e6da4;\n}\n.btn-primary .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.btn-success {\n  color: #fff;\n  background-color: #5cb85c;\n  border-color: #4cae4c;\n}\n.btn-success:focus,\n.btn-success.focus {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #255625;\n}\n.btn-success:hover {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #398439;\n}\n.btn-success:active:hover,\n.btn-success.active:hover,\n.open > .dropdown-toggle.btn-success:hover,\n.btn-success:active:focus,\n.btn-success.active:focus,\n.open > .dropdown-toggle.btn-success:focus,\n.btn-success:active.focus,\n.btn-success.active.focus,\n.open > .dropdown-toggle.btn-success.focus {\n  color: #fff;\n  background-color: #398439;\n  border-color: #255625;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n  background-image: none;\n}\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus {\n  background-color: #5cb85c;\n  border-color: #4cae4c;\n}\n.btn-success .badge {\n  color: #5cb85c;\n  background-color: #fff;\n}\n.btn-info {\n  color: #fff;\n  background-color: #5bc0de;\n  border-color: #46b8da;\n}\n.btn-info:focus,\n.btn-info.focus {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #1b6d85;\n}\n.btn-info:hover {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #269abc;\n}\n.btn-info:active:hover,\n.btn-info.active:hover,\n.open > .dropdown-toggle.btn-info:hover,\n.btn-info:active:focus,\n.btn-info.active:focus,\n.open > .dropdown-toggle.btn-info:focus,\n.btn-info:active.focus,\n.btn-info.active.focus,\n.open > .dropdown-toggle.btn-info.focus {\n  color: #fff;\n  background-color: #269abc;\n  border-color: #1b6d85;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n  background-image: none;\n}\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus {\n  background-color: #5bc0de;\n  border-color: #46b8da;\n}\n.btn-info .badge {\n  color: #5bc0de;\n  background-color: #fff;\n}\n.btn-warning {\n  color: #fff;\n  background-color: #f0ad4e;\n  border-color: #eea236;\n}\n.btn-warning:focus,\n.btn-warning.focus {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #985f0d;\n}\n.btn-warning:hover {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #d58512;\n}\n.btn-warning:active:hover,\n.btn-warning.active:hover,\n.open > .dropdown-toggle.btn-warning:hover,\n.btn-warning:active:focus,\n.btn-warning.active:focus,\n.open > .dropdown-toggle.btn-warning:focus,\n.btn-warning:active.focus,\n.btn-warning.active.focus,\n.open > .dropdown-toggle.btn-warning.focus {\n  color: #fff;\n  background-color: #d58512;\n  border-color: #985f0d;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n  background-image: none;\n}\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus {\n  background-color: #f0ad4e;\n  border-color: #eea236;\n}\n.btn-warning .badge {\n  color: #f0ad4e;\n  background-color: #fff;\n}\n.btn-danger {\n  color: #fff;\n  background-color: #d9534f;\n  border-color: #d43f3a;\n}\n.btn-danger:focus,\n.btn-danger.focus {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #761c19;\n}\n.btn-danger:hover {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #ac2925;\n}\n.btn-danger:active:hover,\n.btn-danger.active:hover,\n.open > .dropdown-toggle.btn-danger:hover,\n.btn-danger:active:focus,\n.btn-danger.active:focus,\n.open > .dropdown-toggle.btn-danger:focus,\n.btn-danger:active.focus,\n.btn-danger.active.focus,\n.open > .dropdown-toggle.btn-danger.focus {\n  color: #fff;\n  background-color: #ac2925;\n  border-color: #761c19;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n  background-image: none;\n}\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus {\n  background-color: #d9534f;\n  border-color: #d43f3a;\n}\n.btn-danger .badge {\n  color: #d9534f;\n  background-color: #fff;\n}\n.btn-link {\n  font-weight: normal;\n  color: #337ab7;\n  border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n  background-color: transparent;\n  -webkit-box-shadow: none;\n          box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n  border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n  color: #23527c;\n  text-decoration: underline;\n  background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n  color: #777;\n  text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n  padding: 1px 5px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.btn-block {\n  display: block;\n  width: 100%;\n}\n.btn-block + .btn-block {\n  margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n  width: 100%;\n}\n.fade {\n  opacity: 0;\n  -webkit-transition: opacity .15s linear;\n       -o-transition: opacity .15s linear;\n          transition: opacity .15s linear;\n}\n.fade.in {\n  opacity: 1;\n}\n.collapse {\n  display: none;\n}\n.collapse.in {\n  display: block;\n}\ntr.collapse.in {\n  display: table-row;\n}\ntbody.collapse.in {\n  display: table-row-group;\n}\n.collapsing {\n  position: relative;\n  height: 0;\n  overflow: hidden;\n  -webkit-transition-timing-function: ease;\n       -o-transition-timing-function: ease;\n          transition-timing-function: ease;\n  -webkit-transition-duration: .35s;\n       -o-transition-duration: .35s;\n          transition-duration: .35s;\n  -webkit-transition-property: height, visibility;\n       -o-transition-property: height, visibility;\n          transition-property: height, visibility;\n}\n.caret {\n  display: inline-block;\n  width: 0;\n  height: 0;\n  margin-left: 2px;\n  vertical-align: middle;\n  border-top: 4px dashed;\n  border-top: 4px solid \\9;\n  border-right: 4px solid transparent;\n  border-left: 4px solid transparent;\n}\n.dropup,\n.dropdown {\n  position: relative;\n}\n.dropdown-toggle:focus {\n  outline: 0;\n}\n.dropdown-menu {\n  position: absolute;\n  top: 100%;\n  left: 0;\n  z-index: 1000;\n  display: none;\n  float: left;\n  min-width: 160px;\n  padding: 5px 0;\n  margin: 2px 0 0;\n  font-size: 14px;\n  text-align: left;\n  list-style: none;\n  background-color: #fff;\n  -webkit-background-clip: padding-box;\n          background-clip: padding-box;\n  border: 1px solid #ccc;\n  border: 1px solid rgba(0, 0, 0, .15);\n  border-radius: 4px;\n  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);\n          box-shadow: 0 6px 12px rgba(0, 0, 0, .175);\n}\n.dropdown-menu.pull-right {\n  right: 0;\n  left: auto;\n}\n.dropdown-menu .divider {\n  height: 1px;\n  margin: 9px 0;\n  overflow: hidden;\n  background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n  display: block;\n  padding: 3px 20px;\n  clear: both;\n  font-weight: normal;\n  line-height: 1.42857143;\n  color: #333;\n  white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n  color: #262626;\n  text-decoration: none;\n  background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n  color: #fff;\n  text-decoration: none;\n  background-color: #337ab7;\n  outline: 0;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n  color: #777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n  text-decoration: none;\n  cursor: not-allowed;\n  background-color: transparent;\n  background-image: none;\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.open > .dropdown-menu {\n  display: block;\n}\n.open > a {\n  outline: 0;\n}\n.dropdown-menu-right {\n  right: 0;\n  left: auto;\n}\n.dropdown-menu-left {\n  right: auto;\n  left: 0;\n}\n.dropdown-header {\n  display: block;\n  padding: 3px 20px;\n  font-size: 12px;\n  line-height: 1.42857143;\n  color: #777;\n  white-space: nowrap;\n}\n.dropdown-backdrop {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 990;\n}\n.pull-right > .dropdown-menu {\n  right: 0;\n  left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n  content: \"\";\n  border-top: 0;\n  border-bottom: 4px dashed;\n  border-bottom: 4px solid \\9;\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n  top: auto;\n  bottom: 100%;\n  margin-bottom: 2px;\n}\n@media (min-width: 768px) {\n  .navbar-right .dropdown-menu {\n    right: 0;\n    left: auto;\n  }\n  .navbar-right .dropdown-menu-left {\n    right: auto;\n    left: 0;\n  }\n}\n.btn-group,\n.btn-group-vertical {\n  position: relative;\n  display: inline-block;\n  vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n  position: relative;\n  float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n  z-index: 2;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n  margin-left: -1px;\n}\n.btn-toolbar {\n  margin-left: -5px;\n}\n.btn-toolbar .btn,\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n  float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n  margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n  border-radius: 0;\n}\n.btn-group > .btn:first-child {\n  margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group > .btn-group {\n  float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n  outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n  padding-right: 8px;\n  padding-left: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n  padding-right: 12px;\n  padding-left: 12px;\n}\n.btn-group.open .dropdown-toggle {\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n  -webkit-box-shadow: none;\n          box-shadow: none;\n}\n.btn .caret {\n  margin-left: 0;\n}\n.btn-lg .caret {\n  border-width: 5px 5px 0;\n  border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n  border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n  display: block;\n  float: none;\n  width: 100%;\n  max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n  float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n  margin-top: -1px;\n  margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n  border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n  border-top-left-radius: 4px;\n  border-top-right-radius: 4px;\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n}\n.btn-group-justified {\n  display: table;\n  width: 100%;\n  table-layout: fixed;\n  border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n  display: table-cell;\n  float: none;\n  width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n  width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n  left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n  position: absolute;\n  clip: rect(0, 0, 0, 0);\n  pointer-events: none;\n}\n.input-group {\n  position: relative;\n  display: table;\n  border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n  float: none;\n  padding-right: 0;\n  padding-left: 0;\n}\n.input-group .form-control {\n  position: relative;\n  z-index: 2;\n  float: left;\n  width: 100%;\n  margin-bottom: 0;\n}\n.input-group .form-control:focus {\n  z-index: 3;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n  height: 46px;\n  line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n  height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n  height: 30px;\n  line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n  height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n  display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n  border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n  width: 1%;\n  white-space: nowrap;\n  vertical-align: middle;\n}\n.input-group-addon {\n  padding: 6px 12px;\n  font-size: 14px;\n  font-weight: normal;\n  line-height: 1;\n  color: #555;\n  text-align: center;\n  background-color: #eee;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n}\n.input-group-addon.input-sm {\n  padding: 5px 10px;\n  font-size: 12px;\n  border-radius: 3px;\n}\n.input-group-addon.input-lg {\n  padding: 10px 16px;\n  font-size: 18px;\n  border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n  margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n}\n.input-group-addon:first-child {\n  border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.input-group-addon:last-child {\n  border-left: 0;\n}\n.input-group-btn {\n  position: relative;\n  font-size: 0;\n  white-space: nowrap;\n}\n.input-group-btn > .btn {\n  position: relative;\n}\n.input-group-btn > .btn + .btn {\n  margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n  z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n  margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n  z-index: 2;\n  margin-left: -1px;\n}\n.nav {\n  padding-left: 0;\n  margin-bottom: 0;\n  list-style: none;\n}\n.nav > li {\n  position: relative;\n  display: block;\n}\n.nav > li > a {\n  position: relative;\n  display: block;\n  padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n  text-decoration: none;\n  background-color: #eee;\n}\n.nav > li.disabled > a {\n  color: #777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n  color: #777;\n  text-decoration: none;\n  cursor: not-allowed;\n  background-color: transparent;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n  background-color: #eee;\n  border-color: #337ab7;\n}\n.nav .nav-divider {\n  height: 1px;\n  margin: 9px 0;\n  overflow: hidden;\n  background-color: #e5e5e5;\n}\n.nav > li > a > img {\n  max-width: none;\n}\n.nav-tabs {\n  border-bottom: 1px solid #ddd;\n}\n.nav-tabs > li {\n  float: left;\n  margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n  margin-right: 2px;\n  line-height: 1.42857143;\n  border: 1px solid transparent;\n  border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n  border-color: #eee #eee #ddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n  color: #555;\n  cursor: default;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-bottom-color: transparent;\n}\n.nav-tabs.nav-justified {\n  width: 100%;\n  border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n  float: none;\n}\n.nav-tabs.nav-justified > li > a {\n  margin-bottom: 5px;\n  text-align: center;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n  top: auto;\n  left: auto;\n}\n@media (min-width: 768px) {\n  .nav-tabs.nav-justified > li {\n    display: table-cell;\n    width: 1%;\n  }\n  .nav-tabs.nav-justified > li > a {\n    margin-bottom: 0;\n  }\n}\n.nav-tabs.nav-justified > li > a {\n  margin-right: 0;\n  border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n  border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n  .nav-tabs.nav-justified > li > a {\n    border-bottom: 1px solid #ddd;\n    border-radius: 4px 4px 0 0;\n  }\n  .nav-tabs.nav-justified > .active > a,\n  .nav-tabs.nav-justified > .active > a:hover,\n  .nav-tabs.nav-justified > .active > a:focus {\n    border-bottom-color: #fff;\n  }\n}\n.nav-pills > li {\n  float: left;\n}\n.nav-pills > li > a {\n  border-radius: 4px;\n}\n.nav-pills > li + li {\n  margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n  color: #fff;\n  background-color: #337ab7;\n}\n.nav-stacked > li {\n  float: none;\n}\n.nav-stacked > li + li {\n  margin-top: 2px;\n  margin-left: 0;\n}\n.nav-justified {\n  width: 100%;\n}\n.nav-justified > li {\n  float: none;\n}\n.nav-justified > li > a {\n  margin-bottom: 5px;\n  text-align: center;\n}\n.nav-justified > .dropdown .dropdown-menu {\n  top: auto;\n  left: auto;\n}\n@media (min-width: 768px) {\n  .nav-justified > li {\n    display: table-cell;\n    width: 1%;\n  }\n  .nav-justified > li > a {\n    margin-bottom: 0;\n  }\n}\n.nav-tabs-justified {\n  border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n  margin-right: 0;\n  border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n  border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n  .nav-tabs-justified > li > a {\n    border-bottom: 1px solid #ddd;\n    border-radius: 4px 4px 0 0;\n  }\n  .nav-tabs-justified > .active > a,\n  .nav-tabs-justified > .active > a:hover,\n  .nav-tabs-justified > .active > a:focus {\n    border-bottom-color: #fff;\n  }\n}\n.tab-content > .tab-pane {\n  display: none;\n}\n.tab-content > .active {\n  display: block;\n}\n.nav-tabs .dropdown-menu {\n  margin-top: -1px;\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n}\n.navbar {\n  position: relative;\n  min-height: 50px;\n  margin-bottom: 20px;\n  border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n  .navbar {\n    border-radius: 4px;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-header {\n    float: left;\n  }\n}\n.navbar-collapse {\n  padding-right: 15px;\n  padding-left: 15px;\n  overflow-x: visible;\n  -webkit-overflow-scrolling: touch;\n  border-top: 1px solid transparent;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);\n}\n.navbar-collapse.in {\n  overflow-y: auto;\n}\n@media (min-width: 768px) {\n  .navbar-collapse {\n    width: auto;\n    border-top: 0;\n    -webkit-box-shadow: none;\n            box-shadow: none;\n  }\n  .navbar-collapse.collapse {\n    display: block !important;\n    height: auto !important;\n    padding-bottom: 0;\n    overflow: visible !important;\n  }\n  .navbar-collapse.in {\n    overflow-y: visible;\n  }\n  .navbar-fixed-top .navbar-collapse,\n  .navbar-static-top .navbar-collapse,\n  .navbar-fixed-bottom .navbar-collapse {\n    padding-right: 0;\n    padding-left: 0;\n  }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n  max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n  .navbar-fixed-top .navbar-collapse,\n  .navbar-fixed-bottom .navbar-collapse {\n    max-height: 200px;\n  }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n  margin-right: -15px;\n  margin-left: -15px;\n}\n@media (min-width: 768px) {\n  .container > .navbar-header,\n  .container-fluid > .navbar-header,\n  .container > .navbar-collapse,\n  .container-fluid > .navbar-collapse {\n    margin-right: 0;\n    margin-left: 0;\n  }\n}\n.navbar-static-top {\n  z-index: 1000;\n  border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n  .navbar-static-top {\n    border-radius: 0;\n  }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  position: fixed;\n  right: 0;\n  left: 0;\n  z-index: 1030;\n}\n@media (min-width: 768px) {\n  .navbar-fixed-top,\n  .navbar-fixed-bottom {\n    border-radius: 0;\n  }\n}\n.navbar-fixed-top {\n  top: 0;\n  border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n  bottom: 0;\n  margin-bottom: 0;\n  border-width: 1px 0 0;\n}\n.navbar-brand {\n  float: left;\n  height: 50px;\n  padding: 15px 15px;\n  font-size: 18px;\n  line-height: 20px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n  text-decoration: none;\n}\n.navbar-brand > img {\n  display: block;\n}\n@media (min-width: 768px) {\n  .navbar > .container .navbar-brand,\n  .navbar > .container-fluid .navbar-brand {\n    margin-left: -15px;\n  }\n}\n.navbar-toggle {\n  position: relative;\n  float: right;\n  padding: 9px 10px;\n  margin-top: 8px;\n  margin-right: 15px;\n  margin-bottom: 8px;\n  background-color: transparent;\n  background-image: none;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n.navbar-toggle:focus {\n  outline: 0;\n}\n.navbar-toggle .icon-bar {\n  display: block;\n  width: 22px;\n  height: 2px;\n  border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n  margin-top: 4px;\n}\n@media (min-width: 768px) {\n  .navbar-toggle {\n    display: none;\n  }\n}\n.navbar-nav {\n  margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n  padding-top: 10px;\n  padding-bottom: 10px;\n  line-height: 20px;\n}\n@media (max-width: 767px) {\n  .navbar-nav .open .dropdown-menu {\n    position: static;\n    float: none;\n    width: auto;\n    margin-top: 0;\n    background-color: transparent;\n    border: 0;\n    -webkit-box-shadow: none;\n            box-shadow: none;\n  }\n  .navbar-nav .open .dropdown-menu > li > a,\n  .navbar-nav .open .dropdown-menu .dropdown-header {\n    padding: 5px 15px 5px 25px;\n  }\n  .navbar-nav .open .dropdown-menu > li > a {\n    line-height: 20px;\n  }\n  .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-nav .open .dropdown-menu > li > a:focus {\n    background-image: none;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-nav {\n    float: left;\n    margin: 0;\n  }\n  .navbar-nav > li {\n    float: left;\n  }\n  .navbar-nav > li > a {\n    padding-top: 15px;\n    padding-bottom: 15px;\n  }\n}\n.navbar-form {\n  padding: 10px 15px;\n  margin-top: 8px;\n  margin-right: -15px;\n  margin-bottom: 8px;\n  margin-left: -15px;\n  border-top: 1px solid transparent;\n  border-bottom: 1px solid transparent;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);\n}\n@media (min-width: 768px) {\n  .navbar-form .form-group {\n    display: inline-block;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .form-control {\n    display: inline-block;\n    width: auto;\n    vertical-align: middle;\n  }\n  .navbar-form .form-control-static {\n    display: inline-block;\n  }\n  .navbar-form .input-group {\n    display: inline-table;\n    vertical-align: middle;\n  }\n  .navbar-form .input-group .input-group-addon,\n  .navbar-form .input-group .input-group-btn,\n  .navbar-form .input-group .form-control {\n    width: auto;\n  }\n  .navbar-form .input-group > .form-control {\n    width: 100%;\n  }\n  .navbar-form .control-label {\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .radio,\n  .navbar-form .checkbox {\n    display: inline-block;\n    margin-top: 0;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .radio label,\n  .navbar-form .checkbox label {\n    padding-left: 0;\n  }\n  .navbar-form .radio input[type=\"radio\"],\n  .navbar-form .checkbox input[type=\"checkbox\"] {\n    position: relative;\n    margin-left: 0;\n  }\n  .navbar-form .has-feedback .form-control-feedback {\n    top: 0;\n  }\n}\n@media (max-width: 767px) {\n  .navbar-form .form-group {\n    margin-bottom: 5px;\n  }\n  .navbar-form .form-group:last-child {\n    margin-bottom: 0;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-form {\n    width: auto;\n    padding-top: 0;\n    padding-bottom: 0;\n    margin-right: 0;\n    margin-left: 0;\n    border: 0;\n    -webkit-box-shadow: none;\n            box-shadow: none;\n  }\n}\n.navbar-nav > li > .dropdown-menu {\n  margin-top: 0;\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n  margin-bottom: 0;\n  border-top-left-radius: 4px;\n  border-top-right-radius: 4px;\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.navbar-btn {\n  margin-top: 8px;\n  margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n  margin-top: 14px;\n  margin-bottom: 14px;\n}\n.navbar-text {\n  margin-top: 15px;\n  margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n  .navbar-text {\n    float: left;\n    margin-right: 15px;\n    margin-left: 15px;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-left {\n    float: left !important;\n  }\n  .navbar-right {\n    float: right !important;\n    margin-right: -15px;\n  }\n  .navbar-right ~ .navbar-right {\n    margin-right: 0;\n  }\n}\n.navbar-default {\n  background-color: #f8f8f8;\n  border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n  color: #777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n  color: #5e5e5e;\n  background-color: transparent;\n}\n.navbar-default .navbar-text {\n  color: #777;\n}\n.navbar-default .navbar-nav > li > a {\n  color: #777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n  color: #333;\n  background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n  color: #555;\n  background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n  color: #ccc;\n  background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n  border-color: #ddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n  background-color: #ddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n  background-color: #888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n  border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n  color: #555;\n  background-color: #e7e7e7;\n}\n@media (max-width: 767px) {\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n    color: #777;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n    color: #333;\n    background-color: transparent;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #555;\n    background-color: #e7e7e7;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n    color: #ccc;\n    background-color: transparent;\n  }\n}\n.navbar-default .navbar-link {\n  color: #777;\n}\n.navbar-default .navbar-link:hover {\n  color: #333;\n}\n.navbar-default .btn-link {\n  color: #777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n  color: #333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n  color: #ccc;\n}\n.navbar-inverse {\n  background-color: #222;\n  border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n  color: #fff;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n  color: #fff;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n  color: #fff;\n  background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n  color: #444;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n  border-color: #333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n  background-color: #333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n  background-color: #fff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n  border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n  color: #fff;\n  background-color: #080808;\n}\n@media (max-width: 767px) {\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n    border-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n    background-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n    color: #9d9d9d;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n    color: #fff;\n    background-color: transparent;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #fff;\n    background-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n    color: #444;\n    background-color: transparent;\n  }\n}\n.navbar-inverse .navbar-link {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n  color: #fff;\n}\n.navbar-inverse .btn-link {\n  color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n  color: #fff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n  color: #444;\n}\n.breadcrumb {\n  padding: 8px 15px;\n  margin-bottom: 20px;\n  list-style: none;\n  background-color: #f5f5f5;\n  border-radius: 4px;\n}\n.breadcrumb > li {\n  display: inline-block;\n}\n.breadcrumb > li + li:before {\n  padding: 0 5px;\n  color: #ccc;\n  content: \"/\\00a0\";\n}\n.breadcrumb > .active {\n  color: #777;\n}\n.pagination {\n  display: inline-block;\n  padding-left: 0;\n  margin: 20px 0;\n  border-radius: 4px;\n}\n.pagination > li {\n  display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n  position: relative;\n  float: left;\n  padding: 6px 12px;\n  margin-left: -1px;\n  line-height: 1.42857143;\n  color: #337ab7;\n  text-decoration: none;\n  background-color: #fff;\n  border: 1px solid #ddd;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n  margin-left: 0;\n  border-top-left-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n  border-top-right-radius: 4px;\n  border-bottom-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n  z-index: 2;\n  color: #23527c;\n  background-color: #eee;\n  border-color: #ddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n  z-index: 3;\n  color: #fff;\n  cursor: default;\n  background-color: #337ab7;\n  border-color: #337ab7;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n  color: #777;\n  cursor: not-allowed;\n  background-color: #fff;\n  border-color: #ddd;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n  border-top-left-radius: 6px;\n  border-bottom-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n  border-top-right-radius: 6px;\n  border-bottom-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n  border-top-left-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n  border-top-right-radius: 3px;\n  border-bottom-right-radius: 3px;\n}\n.pager {\n  padding-left: 0;\n  margin: 20px 0;\n  text-align: center;\n  list-style: none;\n}\n.pager li {\n  display: inline;\n}\n.pager li > a,\n.pager li > span {\n  display: inline-block;\n  padding: 5px 14px;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n  text-decoration: none;\n  background-color: #eee;\n}\n.pager .next > a,\n.pager .next > span {\n  float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n  float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n  color: #777;\n  cursor: not-allowed;\n  background-color: #fff;\n}\n.label {\n  display: inline;\n  padding: .2em .6em .3em;\n  font-size: 75%;\n  font-weight: bold;\n  line-height: 1;\n  color: #fff;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: baseline;\n  border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n  color: #fff;\n  text-decoration: none;\n  cursor: pointer;\n}\n.label:empty {\n  display: none;\n}\n.btn .label {\n  position: relative;\n  top: -1px;\n}\n.label-default {\n  background-color: #777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n  background-color: #5e5e5e;\n}\n.label-primary {\n  background-color: #337ab7;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n  background-color: #286090;\n}\n.label-success {\n  background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n  background-color: #449d44;\n}\n.label-info {\n  background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n  background-color: #31b0d5;\n}\n.label-warning {\n  background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n  background-color: #ec971f;\n}\n.label-danger {\n  background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n  background-color: #c9302c;\n}\n.badge {\n  display: inline-block;\n  min-width: 10px;\n  padding: 3px 7px;\n  font-size: 12px;\n  font-weight: bold;\n  line-height: 1;\n  color: #fff;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: middle;\n  background-color: #777;\n  border-radius: 10px;\n}\n.badge:empty {\n  display: none;\n}\n.btn .badge {\n  position: relative;\n  top: -1px;\n}\n.btn-xs .badge,\n.btn-group-xs > .btn .badge {\n  top: 0;\n  padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n  color: #fff;\n  text-decoration: none;\n  cursor: pointer;\n}\n.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.list-group-item > .badge {\n  float: right;\n}\n.list-group-item > .badge + .badge {\n  margin-right: 5px;\n}\n.nav-pills > li > a > .badge {\n  margin-left: 3px;\n}\n.jumbotron {\n  padding-top: 30px;\n  padding-bottom: 30px;\n  margin-bottom: 30px;\n  color: inherit;\n  background-color: #eee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n  color: inherit;\n}\n.jumbotron p {\n  margin-bottom: 15px;\n  font-size: 21px;\n  font-weight: 200;\n}\n.jumbotron > hr {\n  border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n  padding-right: 15px;\n  padding-left: 15px;\n  border-radius: 6px;\n}\n.jumbotron .container {\n  max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n  .jumbotron {\n    padding-top: 48px;\n    padding-bottom: 48px;\n  }\n  .container .jumbotron,\n  .container-fluid .jumbotron {\n    padding-right: 60px;\n    padding-left: 60px;\n  }\n  .jumbotron h1,\n  .jumbotron .h1 {\n    font-size: 63px;\n  }\n}\n.thumbnail {\n  display: block;\n  padding: 4px;\n  margin-bottom: 20px;\n  line-height: 1.42857143;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 4px;\n  -webkit-transition: border .2s ease-in-out;\n       -o-transition: border .2s ease-in-out;\n          transition: border .2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n  margin-right: auto;\n  margin-left: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n  border-color: #337ab7;\n}\n.thumbnail .caption {\n  padding: 9px;\n  color: #333;\n}\n.alert {\n  padding: 15px;\n  margin-bottom: 20px;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n.alert h4 {\n  margin-top: 0;\n  color: inherit;\n}\n.alert .alert-link {\n  font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n  margin-bottom: 0;\n}\n.alert > p + p {\n  margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n  padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n  position: relative;\n  top: -2px;\n  right: -21px;\n  color: inherit;\n}\n.alert-success {\n  color: #3c763d;\n  background-color: #dff0d8;\n  border-color: #d6e9c6;\n}\n.alert-success hr {\n  border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n  color: #2b542c;\n}\n.alert-info {\n  color: #31708f;\n  background-color: #d9edf7;\n  border-color: #bce8f1;\n}\n.alert-info hr {\n  border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n  color: #245269;\n}\n.alert-warning {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n  border-color: #faebcc;\n}\n.alert-warning hr {\n  border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n  color: #66512c;\n}\n.alert-danger {\n  color: #a94442;\n  background-color: #f2dede;\n  border-color: #ebccd1;\n}\n.alert-danger hr {\n  border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n  color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n@-o-keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n@keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n.progress {\n  height: 20px;\n  margin-bottom: 20px;\n  overflow: hidden;\n  background-color: #f5f5f5;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);\n          box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);\n}\n.progress-bar {\n  float: left;\n  width: 0;\n  height: 100%;\n  font-size: 12px;\n  line-height: 20px;\n  color: #fff;\n  text-align: center;\n  background-color: #337ab7;\n  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);\n          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);\n  -webkit-transition: width .6s ease;\n       -o-transition: width .6s ease;\n          transition: width .6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  -webkit-background-size: 40px 40px;\n          background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n  -webkit-animation: progress-bar-stripes 2s linear infinite;\n       -o-animation: progress-bar-stripes 2s linear infinite;\n          animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n  background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n  background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n  background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n  background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.media {\n  margin-top: 15px;\n}\n.media:first-child {\n  margin-top: 0;\n}\n.media,\n.media-body {\n  overflow: hidden;\n  zoom: 1;\n}\n.media-body {\n  width: 10000px;\n}\n.media-object {\n  display: block;\n}\n.media-object.img-thumbnail {\n  max-width: none;\n}\n.media-right,\n.media > .pull-right {\n  padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n  padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n  display: table-cell;\n  vertical-align: top;\n}\n.media-middle {\n  vertical-align: middle;\n}\n.media-bottom {\n  vertical-align: bottom;\n}\n.media-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n.media-list {\n  padding-left: 0;\n  list-style: none;\n}\n.list-group {\n  padding-left: 0;\n  margin-bottom: 20px;\n}\n.list-group-item {\n  position: relative;\n  display: block;\n  padding: 10px 15px;\n  margin-bottom: -1px;\n  background-color: #fff;\n  border: 1px solid #ddd;\n}\n.list-group-item:first-child {\n  border-top-left-radius: 4px;\n  border-top-right-radius: 4px;\n}\n.list-group-item:last-child {\n  margin-bottom: 0;\n  border-bottom-right-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\na.list-group-item,\nbutton.list-group-item {\n  color: #555;\n}\na.list-group-item .list-group-item-heading,\nbutton.list-group-item .list-group-item-heading {\n  color: #333;\n}\na.list-group-item:hover,\nbutton.list-group-item:hover,\na.list-group-item:focus,\nbutton.list-group-item:focus {\n  color: #555;\n  text-decoration: none;\n  background-color: #f5f5f5;\n}\nbutton.list-group-item {\n  width: 100%;\n  text-align: left;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n  color: #777;\n  cursor: not-allowed;\n  background-color: #eee;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n  color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n  color: #777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n  z-index: 2;\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #337ab7;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n  color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n  color: #c7ddef;\n}\n.list-group-item-success {\n  color: #3c763d;\n  background-color: #dff0d8;\n}\na.list-group-item-success,\nbutton.list-group-item-success {\n  color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading,\nbutton.list-group-item-success .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-success:hover,\nbutton.list-group-item-success:hover,\na.list-group-item-success:focus,\nbutton.list-group-item-success:focus {\n  color: #3c763d;\n  background-color: #d0e9c6;\n}\na.list-group-item-success.active,\nbutton.list-group-item-success.active,\na.list-group-item-success.active:hover,\nbutton.list-group-item-success.active:hover,\na.list-group-item-success.active:focus,\nbutton.list-group-item-success.active:focus {\n  color: #fff;\n  background-color: #3c763d;\n  border-color: #3c763d;\n}\n.list-group-item-info {\n  color: #31708f;\n  background-color: #d9edf7;\n}\na.list-group-item-info,\nbutton.list-group-item-info {\n  color: #31708f;\n}\na.list-group-item-info .list-group-item-heading,\nbutton.list-group-item-info .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-info:hover,\nbutton.list-group-item-info:hover,\na.list-group-item-info:focus,\nbutton.list-group-item-info:focus {\n  color: #31708f;\n  background-color: #c4e3f3;\n}\na.list-group-item-info.active,\nbutton.list-group-item-info.active,\na.list-group-item-info.active:hover,\nbutton.list-group-item-info.active:hover,\na.list-group-item-info.active:focus,\nbutton.list-group-item-info.active:focus {\n  color: #fff;\n  background-color: #31708f;\n  border-color: #31708f;\n}\n.list-group-item-warning {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n}\na.list-group-item-warning,\nbutton.list-group-item-warning {\n  color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading,\nbutton.list-group-item-warning .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-warning:hover,\nbutton.list-group-item-warning:hover,\na.list-group-item-warning:focus,\nbutton.list-group-item-warning:focus {\n  color: #8a6d3b;\n  background-color: #faf2cc;\n}\na.list-group-item-warning.active,\nbutton.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\nbutton.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus,\nbutton.list-group-item-warning.active:focus {\n  color: #fff;\n  background-color: #8a6d3b;\n  border-color: #8a6d3b;\n}\n.list-group-item-danger {\n  color: #a94442;\n  background-color: #f2dede;\n}\na.list-group-item-danger,\nbutton.list-group-item-danger {\n  color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading,\nbutton.list-group-item-danger .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-danger:hover,\nbutton.list-group-item-danger:hover,\na.list-group-item-danger:focus,\nbutton.list-group-item-danger:focus {\n  color: #a94442;\n  background-color: #ebcccc;\n}\na.list-group-item-danger.active,\nbutton.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\nbutton.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus,\nbutton.list-group-item-danger.active:focus {\n  color: #fff;\n  background-color: #a94442;\n  border-color: #a94442;\n}\n.list-group-item-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n.list-group-item-text {\n  margin-bottom: 0;\n  line-height: 1.3;\n}\n.panel {\n  margin-bottom: 20px;\n  background-color: #fff;\n  border: 1px solid transparent;\n  border-radius: 4px;\n  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);\n          box-shadow: 0 1px 1px rgba(0, 0, 0, .05);\n}\n.panel-body {\n  padding: 15px;\n}\n.panel-heading {\n  padding: 10px 15px;\n  border-bottom: 1px solid transparent;\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n  color: inherit;\n}\n.panel-title {\n  margin-top: 0;\n  margin-bottom: 0;\n  font-size: 16px;\n  color: inherit;\n}\n.panel-title > a,\n.panel-title > small,\n.panel-title > .small,\n.panel-title > small > a,\n.panel-title > .small > a {\n  color: inherit;\n}\n.panel-footer {\n  padding: 10px 15px;\n  background-color: #f5f5f5;\n  border-top: 1px solid #ddd;\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n  margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n  border-width: 1px 0;\n  border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n  border-top: 0;\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n  border-bottom: 0;\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n  border-top-width: 0;\n}\n.list-group + .panel-footer {\n  border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n  margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n  padding-right: 15px;\n  padding-left: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n  border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n  border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n  border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n  border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n  border-top: 1px solid #ddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n  border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n  border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n  border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n  border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n  border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n  border-bottom: 0;\n}\n.panel > .table-responsive {\n  margin-bottom: 0;\n  border: 0;\n}\n.panel-group {\n  margin-bottom: 20px;\n}\n.panel-group .panel {\n  margin-bottom: 0;\n  border-radius: 4px;\n}\n.panel-group .panel + .panel {\n  margin-top: 5px;\n}\n.panel-group .panel-heading {\n  border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n  border-top: 1px solid #ddd;\n}\n.panel-group .panel-footer {\n  border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n  border-bottom: 1px solid #ddd;\n}\n.panel-default {\n  border-color: #ddd;\n}\n.panel-default > .panel-heading {\n  color: #333;\n  background-color: #f5f5f5;\n  border-color: #ddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #ddd;\n}\n.panel-default > .panel-heading .badge {\n  color: #f5f5f5;\n  background-color: #333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #ddd;\n}\n.panel-primary {\n  border-color: #337ab7;\n}\n.panel-primary > .panel-heading {\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #337ab7;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #337ab7;\n}\n.panel-primary > .panel-heading .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #337ab7;\n}\n.panel-success {\n  border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n  color: #3c763d;\n  background-color: #dff0d8;\n  border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n  color: #dff0d8;\n  background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #d6e9c6;\n}\n.panel-info {\n  border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n  color: #31708f;\n  background-color: #d9edf7;\n  border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n  color: #d9edf7;\n  background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #bce8f1;\n}\n.panel-warning {\n  border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n  border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n  color: #fcf8e3;\n  background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #faebcc;\n}\n.panel-danger {\n  border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n  color: #a94442;\n  background-color: #f2dede;\n  border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n  color: #f2dede;\n  background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #ebccd1;\n}\n.embed-responsive {\n  position: relative;\n  display: block;\n  height: 0;\n  padding: 0;\n  overflow: hidden;\n}\n.embed-responsive .embed-responsive-item,\n.embed-responsive iframe,\n.embed-responsive embed,\n.embed-responsive object,\n.embed-responsive video {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  border: 0;\n}\n.embed-responsive-16by9 {\n  padding-bottom: 56.25%;\n}\n.embed-responsive-4by3 {\n  padding-bottom: 75%;\n}\n.well {\n  min-height: 20px;\n  padding: 19px;\n  margin-bottom: 20px;\n  background-color: #f5f5f5;\n  border: 1px solid #e3e3e3;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);\n}\n.well blockquote {\n  border-color: #ddd;\n  border-color: rgba(0, 0, 0, .15);\n}\n.well-lg {\n  padding: 24px;\n  border-radius: 6px;\n}\n.well-sm {\n  padding: 9px;\n  border-radius: 3px;\n}\n.close {\n  float: right;\n  font-size: 21px;\n  font-weight: bold;\n  line-height: 1;\n  color: #000;\n  text-shadow: 0 1px 0 #fff;\n  filter: alpha(opacity=20);\n  opacity: .2;\n}\n.close:hover,\n.close:focus {\n  color: #000;\n  text-decoration: none;\n  cursor: pointer;\n  filter: alpha(opacity=50);\n  opacity: .5;\n}\nbutton.close {\n  -webkit-appearance: none;\n  padding: 0;\n  cursor: pointer;\n  background: transparent;\n  border: 0;\n}\n.modal-open {\n  overflow: hidden;\n}\n.modal {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 1050;\n  display: none;\n  overflow: hidden;\n  -webkit-overflow-scrolling: touch;\n  outline: 0;\n}\n.modal.fade .modal-dialog {\n  -webkit-transition: -webkit-transform .3s ease-out;\n       -o-transition:      -o-transform .3s ease-out;\n          transition:         transform .3s ease-out;\n  -webkit-transform: translate(0, -25%);\n      -ms-transform: translate(0, -25%);\n       -o-transform: translate(0, -25%);\n          transform: translate(0, -25%);\n}\n.modal.in .modal-dialog {\n  -webkit-transform: translate(0, 0);\n      -ms-transform: translate(0, 0);\n       -o-transform: translate(0, 0);\n          transform: translate(0, 0);\n}\n.modal-open .modal {\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n.modal-dialog {\n  position: relative;\n  width: auto;\n  margin: 10px;\n}\n.modal-content {\n  position: relative;\n  background-color: #fff;\n  -webkit-background-clip: padding-box;\n          background-clip: padding-box;\n  border: 1px solid #999;\n  border: 1px solid rgba(0, 0, 0, .2);\n  border-radius: 6px;\n  outline: 0;\n  -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);\n          box-shadow: 0 3px 9px rgba(0, 0, 0, .5);\n}\n.modal-backdrop {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 1040;\n  background-color: #000;\n}\n.modal-backdrop.fade {\n  filter: alpha(opacity=0);\n  opacity: 0;\n}\n.modal-backdrop.in {\n  filter: alpha(opacity=50);\n  opacity: .5;\n}\n.modal-header {\n  padding: 15px;\n  border-bottom: 1px solid #e5e5e5;\n}\n.modal-header .close {\n  margin-top: -2px;\n}\n.modal-title {\n  margin: 0;\n  line-height: 1.42857143;\n}\n.modal-body {\n  position: relative;\n  padding: 15px;\n}\n.modal-footer {\n  padding: 15px;\n  text-align: right;\n  border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n  margin-bottom: 0;\n  margin-left: 5px;\n}\n.modal-footer .btn-group .btn + .btn {\n  margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n  margin-left: 0;\n}\n.modal-scrollbar-measure {\n  position: absolute;\n  top: -9999px;\n  width: 50px;\n  height: 50px;\n  overflow: scroll;\n}\n@media (min-width: 768px) {\n  .modal-dialog {\n    width: 600px;\n    margin: 30px auto;\n  }\n  .modal-content {\n    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);\n            box-shadow: 0 5px 15px rgba(0, 0, 0, .5);\n  }\n  .modal-sm {\n    width: 300px;\n  }\n}\n@media (min-width: 992px) {\n  .modal-lg {\n    width: 900px;\n  }\n}\n.tooltip {\n  position: absolute;\n  z-index: 1070;\n  display: block;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 12px;\n  font-style: normal;\n  font-weight: normal;\n  line-height: 1.42857143;\n  text-align: left;\n  text-align: start;\n  text-decoration: none;\n  text-shadow: none;\n  text-transform: none;\n  letter-spacing: normal;\n  word-break: normal;\n  word-spacing: normal;\n  word-wrap: normal;\n  white-space: normal;\n  filter: alpha(opacity=0);\n  opacity: 0;\n\n  line-break: auto;\n}\n.tooltip.in {\n  filter: alpha(opacity=90);\n  opacity: .9;\n}\n.tooltip.top {\n  padding: 5px 0;\n  margin-top: -3px;\n}\n.tooltip.right {\n  padding: 0 5px;\n  margin-left: 3px;\n}\n.tooltip.bottom {\n  padding: 5px 0;\n  margin-top: 3px;\n}\n.tooltip.left {\n  padding: 0 5px;\n  margin-left: -3px;\n}\n.tooltip-inner {\n  max-width: 200px;\n  padding: 3px 8px;\n  color: #fff;\n  text-align: center;\n  background-color: #000;\n  border-radius: 4px;\n}\n.tooltip-arrow {\n  position: absolute;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n  bottom: 0;\n  left: 50%;\n  margin-left: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.top-left .tooltip-arrow {\n  right: 5px;\n  bottom: 0;\n  margin-bottom: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.top-right .tooltip-arrow {\n  bottom: 0;\n  left: 5px;\n  margin-bottom: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.right .tooltip-arrow {\n  top: 50%;\n  left: 0;\n  margin-top: -5px;\n  border-width: 5px 5px 5px 0;\n  border-right-color: #000;\n}\n.tooltip.left .tooltip-arrow {\n  top: 50%;\n  right: 0;\n  margin-top: -5px;\n  border-width: 5px 0 5px 5px;\n  border-left-color: #000;\n}\n.tooltip.bottom .tooltip-arrow {\n  top: 0;\n  left: 50%;\n  margin-left: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n  top: 0;\n  right: 5px;\n  margin-top: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n  top: 0;\n  left: 5px;\n  margin-top: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.popover {\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: 1060;\n  display: none;\n  max-width: 276px;\n  padding: 1px;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 14px;\n  font-style: normal;\n  font-weight: normal;\n  line-height: 1.42857143;\n  text-align: left;\n  text-align: start;\n  text-decoration: none;\n  text-shadow: none;\n  text-transform: none;\n  letter-spacing: normal;\n  word-break: normal;\n  word-spacing: normal;\n  word-wrap: normal;\n  white-space: normal;\n  background-color: #fff;\n  -webkit-background-clip: padding-box;\n          background-clip: padding-box;\n  border: 1px solid #ccc;\n  border: 1px solid rgba(0, 0, 0, .2);\n  border-radius: 6px;\n  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);\n          box-shadow: 0 5px 10px rgba(0, 0, 0, .2);\n\n  line-break: auto;\n}\n.popover.top {\n  margin-top: -10px;\n}\n.popover.right {\n  margin-left: 10px;\n}\n.popover.bottom {\n  margin-top: 10px;\n}\n.popover.left {\n  margin-left: -10px;\n}\n.popover-title {\n  padding: 8px 14px;\n  margin: 0;\n  font-size: 14px;\n  background-color: #f7f7f7;\n  border-bottom: 1px solid #ebebeb;\n  border-radius: 5px 5px 0 0;\n}\n.popover-content {\n  padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n  position: absolute;\n  display: block;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n.popover > .arrow {\n  border-width: 11px;\n}\n.popover > .arrow:after {\n  content: \"\";\n  border-width: 10px;\n}\n.popover.top > .arrow {\n  bottom: -11px;\n  left: 50%;\n  margin-left: -11px;\n  border-top-color: #999;\n  border-top-color: rgba(0, 0, 0, .25);\n  border-bottom-width: 0;\n}\n.popover.top > .arrow:after {\n  bottom: 1px;\n  margin-left: -10px;\n  content: \" \";\n  border-top-color: #fff;\n  border-bottom-width: 0;\n}\n.popover.right > .arrow {\n  top: 50%;\n  left: -11px;\n  margin-top: -11px;\n  border-right-color: #999;\n  border-right-color: rgba(0, 0, 0, .25);\n  border-left-width: 0;\n}\n.popover.right > .arrow:after {\n  bottom: -10px;\n  left: 1px;\n  content: \" \";\n  border-right-color: #fff;\n  border-left-width: 0;\n}\n.popover.bottom > .arrow {\n  top: -11px;\n  left: 50%;\n  margin-left: -11px;\n  border-top-width: 0;\n  border-bottom-color: #999;\n  border-bottom-color: rgba(0, 0, 0, .25);\n}\n.popover.bottom > .arrow:after {\n  top: 1px;\n  margin-left: -10px;\n  content: \" \";\n  border-top-width: 0;\n  border-bottom-color: #fff;\n}\n.popover.left > .arrow {\n  top: 50%;\n  right: -11px;\n  margin-top: -11px;\n  border-right-width: 0;\n  border-left-color: #999;\n  border-left-color: rgba(0, 0, 0, .25);\n}\n.popover.left > .arrow:after {\n  right: 1px;\n  bottom: -10px;\n  content: \" \";\n  border-right-width: 0;\n  border-left-color: #fff;\n}\n.carousel {\n  position: relative;\n}\n.carousel-inner {\n  position: relative;\n  width: 100%;\n  overflow: hidden;\n}\n.carousel-inner > .item {\n  position: relative;\n  display: none;\n  -webkit-transition: .6s ease-in-out left;\n       -o-transition: .6s ease-in-out left;\n          transition: .6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n  line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n  .carousel-inner > .item {\n    -webkit-transition: -webkit-transform .6s ease-in-out;\n         -o-transition:      -o-transform .6s ease-in-out;\n            transition:         transform .6s ease-in-out;\n\n    -webkit-backface-visibility: hidden;\n            backface-visibility: hidden;\n    -webkit-perspective: 1000px;\n            perspective: 1000px;\n  }\n  .carousel-inner > .item.next,\n  .carousel-inner > .item.active.right {\n    left: 0;\n    -webkit-transform: translate3d(100%, 0, 0);\n            transform: translate3d(100%, 0, 0);\n  }\n  .carousel-inner > .item.prev,\n  .carousel-inner > .item.active.left {\n    left: 0;\n    -webkit-transform: translate3d(-100%, 0, 0);\n            transform: translate3d(-100%, 0, 0);\n  }\n  .carousel-inner > .item.next.left,\n  .carousel-inner > .item.prev.right,\n  .carousel-inner > .item.active {\n    left: 0;\n    -webkit-transform: translate3d(0, 0, 0);\n            transform: translate3d(0, 0, 0);\n  }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n  display: block;\n}\n.carousel-inner > .active {\n  left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n  position: absolute;\n  top: 0;\n  width: 100%;\n}\n.carousel-inner > .next {\n  left: 100%;\n}\n.carousel-inner > .prev {\n  left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n  left: 0;\n}\n.carousel-inner > .active.left {\n  left: -100%;\n}\n.carousel-inner > .active.right {\n  left: 100%;\n}\n.carousel-control {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  width: 15%;\n  font-size: 20px;\n  color: #fff;\n  text-align: center;\n  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);\n  background-color: rgba(0, 0, 0, 0);\n  filter: alpha(opacity=50);\n  opacity: .5;\n}\n.carousel-control.left {\n  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);\n  background-image:      -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);\n  background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001)));\n  background-image:         linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n  background-repeat: repeat-x;\n}\n.carousel-control.right {\n  right: 0;\n  left: auto;\n  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);\n  background-image:      -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);\n  background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5)));\n  background-image:         linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n  background-repeat: repeat-x;\n}\n.carousel-control:hover,\n.carousel-control:focus {\n  color: #fff;\n  text-decoration: none;\n  filter: alpha(opacity=90);\n  outline: 0;\n  opacity: .9;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n  position: absolute;\n  top: 50%;\n  z-index: 5;\n  display: inline-block;\n  margin-top: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n  left: 50%;\n  margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n  right: 50%;\n  margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n  width: 20px;\n  height: 20px;\n  font-family: serif;\n  line-height: 1;\n}\n.carousel-control .icon-prev:before {\n  content: '\\2039';\n}\n.carousel-control .icon-next:before {\n  content: '\\203a';\n}\n.carousel-indicators {\n  position: absolute;\n  bottom: 10px;\n  left: 50%;\n  z-index: 15;\n  width: 60%;\n  padding-left: 0;\n  margin-left: -30%;\n  text-align: center;\n  list-style: none;\n}\n.carousel-indicators li {\n  display: inline-block;\n  width: 10px;\n  height: 10px;\n  margin: 1px;\n  text-indent: -999px;\n  cursor: pointer;\n  background-color: #000 \\9;\n  background-color: rgba(0, 0, 0, 0);\n  border: 1px solid #fff;\n  border-radius: 10px;\n}\n.carousel-indicators .active {\n  width: 12px;\n  height: 12px;\n  margin: 0;\n  background-color: #fff;\n}\n.carousel-caption {\n  position: absolute;\n  right: 15%;\n  bottom: 20px;\n  left: 15%;\n  z-index: 10;\n  padding-top: 20px;\n  padding-bottom: 20px;\n  color: #fff;\n  text-align: center;\n  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);\n}\n.carousel-caption .btn {\n  text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n  .carousel-control .glyphicon-chevron-left,\n  .carousel-control .glyphicon-chevron-right,\n  .carousel-control .icon-prev,\n  .carousel-control .icon-next {\n    width: 30px;\n    height: 30px;\n    margin-top: -10px;\n    font-size: 30px;\n  }\n  .carousel-control .glyphicon-chevron-left,\n  .carousel-control .icon-prev {\n    margin-left: -10px;\n  }\n  .carousel-control .glyphicon-chevron-right,\n  .carousel-control .icon-next {\n    margin-right: -10px;\n  }\n  .carousel-caption {\n    right: 20%;\n    left: 20%;\n    padding-bottom: 30px;\n  }\n  .carousel-indicators {\n    bottom: 20px;\n  }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-header:before,\n.modal-header:after,\n.modal-footer:before,\n.modal-footer:after {\n  display: table;\n  content: \" \";\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-header:after,\n.modal-footer:after {\n  clear: both;\n}\n.center-block {\n  display: block;\n  margin-right: auto;\n  margin-left: auto;\n}\n.pull-right {\n  float: right !important;\n}\n.pull-left {\n  float: left !important;\n}\n.hide {\n  display: none !important;\n}\n.show {\n  display: block !important;\n}\n.invisible {\n  visibility: hidden;\n}\n.text-hide {\n  font: 0/0 a;\n  color: transparent;\n  text-shadow: none;\n  background-color: transparent;\n  border: 0;\n}\n.hidden {\n  display: none !important;\n}\n.affix {\n  position: fixed;\n}\n@-ms-viewport {\n  width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n  display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n  display: none !important;\n}\n@media (max-width: 767px) {\n  .visible-xs {\n    display: block !important;\n  }\n  table.visible-xs {\n    display: table !important;\n  }\n  tr.visible-xs {\n    display: table-row !important;\n  }\n  th.visible-xs,\n  td.visible-xs {\n    display: table-cell !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-block {\n    display: block !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-inline {\n    display: inline !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm {\n    display: block !important;\n  }\n  table.visible-sm {\n    display: table !important;\n  }\n  tr.visible-sm {\n    display: table-row !important;\n  }\n  th.visible-sm,\n  td.visible-sm {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-block {\n    display: block !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md {\n    display: block !important;\n  }\n  table.visible-md {\n    display: table !important;\n  }\n  tr.visible-md {\n    display: table-row !important;\n  }\n  th.visible-md,\n  td.visible-md {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-block {\n    display: block !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg {\n    display: block !important;\n  }\n  table.visible-lg {\n    display: table !important;\n  }\n  tr.visible-lg {\n    display: table-row !important;\n  }\n  th.visible-lg,\n  td.visible-lg {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-block {\n    display: block !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (max-width: 767px) {\n  .hidden-xs {\n    display: none !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .hidden-sm {\n    display: none !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .hidden-md {\n    display: none !important;\n  }\n}\n@media (min-width: 1200px) {\n  .hidden-lg {\n    display: none !important;\n  }\n}\n.visible-print {\n  display: none !important;\n}\n@media print {\n  .visible-print {\n    display: block !important;\n  }\n  table.visible-print {\n    display: table !important;\n  }\n  tr.visible-print {\n    display: table-row !important;\n  }\n  th.visible-print,\n  td.visible-print {\n    display: table-cell !important;\n  }\n}\n.visible-print-block {\n  display: none !important;\n}\n@media print {\n  .visible-print-block {\n    display: block !important;\n  }\n}\n.visible-print-inline {\n  display: none !important;\n}\n@media print {\n  .visible-print-inline {\n    display: inline !important;\n  }\n}\n.visible-print-inline-block {\n  display: none !important;\n}\n@media print {\n  .visible-print-inline-block {\n    display: inline-block !important;\n  }\n}\n@media print {\n  .hidden-print {\n    display: none !important;\n  }\n}\n/*# sourceMappingURL=bootstrap.css.map */\n","//\n// Glyphicons for Bootstrap\n//\n// Since icons are fonts, they can be placed anywhere text is placed and are\n// thus automatically sized to match the surrounding child. To use, create an\n// inline element with the appropriate classes, like so:\n//\n// <a href=\"#\"><span class=\"glyphicon glyphicon-star\"></span> Star</a>\n\n// Import the fonts\n@font-face {\n  font-family: 'Glyphicons Halflings';\n  src: url('@{icon-font-path}@{icon-font-name}.eot');\n  src: url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype'),\n       url('@{icon-font-path}@{icon-font-name}.woff2') format('woff2'),\n       url('@{icon-font-path}@{icon-font-name}.woff') format('woff'),\n       url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype'),\n       url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg');\n}\n\n// Catchall baseclass\n.glyphicon {\n  position: relative;\n  top: 1px;\n  display: inline-block;\n  font-family: 'Glyphicons Halflings';\n  font-style: normal;\n  font-weight: normal;\n  line-height: 1;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\n// Individual icons\n.glyphicon-asterisk               { &:before { content: \"\\002a\"; } }\n.glyphicon-plus                   { &:before { content: \"\\002b\"; } }\n.glyphicon-euro,\n.glyphicon-eur                    { &:before { content: \"\\20ac\"; } }\n.glyphicon-minus                  { &:before { content: \"\\2212\"; } }\n.glyphicon-cloud                  { &:before { content: \"\\2601\"; } }\n.glyphicon-envelope               { &:before { content: \"\\2709\"; } }\n.glyphicon-pencil                 { &:before { content: \"\\270f\"; } }\n.glyphicon-glass                  { &:before { content: \"\\e001\"; } }\n.glyphicon-music                  { &:before { content: \"\\e002\"; } }\n.glyphicon-search                 { &:before { content: \"\\e003\"; } }\n.glyphicon-heart                  { &:before { content: \"\\e005\"; } }\n.glyphicon-star                   { &:before { content: \"\\e006\"; } }\n.glyphicon-star-empty             { &:before { content: \"\\e007\"; } }\n.glyphicon-user                   { &:before { content: \"\\e008\"; } }\n.glyphicon-film                   { &:before { content: \"\\e009\"; } }\n.glyphicon-th-large               { &:before { content: \"\\e010\"; } }\n.glyphicon-th                     { &:before { content: \"\\e011\"; } }\n.glyphicon-th-list                { &:before { content: \"\\e012\"; } }\n.glyphicon-ok                     { &:before { content: \"\\e013\"; } }\n.glyphicon-remove                 { &:before { content: \"\\e014\"; } }\n.glyphicon-zoom-in                { &:before { content: \"\\e015\"; } }\n.glyphicon-zoom-out               { &:before { content: \"\\e016\"; } }\n.glyphicon-off                    { &:before { content: \"\\e017\"; } }\n.glyphicon-signal                 { &:before { content: \"\\e018\"; } }\n.glyphicon-cog                    { &:before { content: \"\\e019\"; } }\n.glyphicon-trash                  { &:before { content: \"\\e020\"; } }\n.glyphicon-home                   { &:before { content: \"\\e021\"; } }\n.glyphicon-file                   { &:before { content: \"\\e022\"; } }\n.glyphicon-time                   { &:before { content: \"\\e023\"; } }\n.glyphicon-road                   { &:before { content: \"\\e024\"; } }\n.glyphicon-download-alt           { &:before { content: \"\\e025\"; } }\n.glyphicon-download               { &:before { content: \"\\e026\"; } }\n.glyphicon-upload                 { &:before { content: \"\\e027\"; } }\n.glyphicon-inbox                  { &:before { content: \"\\e028\"; } }\n.glyphicon-play-circle            { &:before { content: \"\\e029\"; } }\n.glyphicon-repeat                 { &:before { content: \"\\e030\"; } }\n.glyphicon-refresh                { &:before { content: \"\\e031\"; } }\n.glyphicon-list-alt               { &:before { content: \"\\e032\"; } }\n.glyphicon-lock                   { &:before { content: \"\\e033\"; } }\n.glyphicon-flag                   { &:before { content: \"\\e034\"; } }\n.glyphicon-headphones             { &:before { content: \"\\e035\"; } }\n.glyphicon-volume-off             { &:before { content: \"\\e036\"; } }\n.glyphicon-volume-down            { &:before { content: \"\\e037\"; } }\n.glyphicon-volume-up              { &:before { content: \"\\e038\"; } }\n.glyphicon-qrcode                 { &:before { content: \"\\e039\"; } }\n.glyphicon-barcode                { &:before { content: \"\\e040\"; } }\n.glyphicon-tag                    { &:before { content: \"\\e041\"; } }\n.glyphicon-tags                   { &:before { content: \"\\e042\"; } }\n.glyphicon-book                   { &:before { content: \"\\e043\"; } }\n.glyphicon-bookmark               { &:before { content: \"\\e044\"; } }\n.glyphicon-print                  { &:before { content: \"\\e045\"; } }\n.glyphicon-camera                 { &:before { content: \"\\e046\"; } }\n.glyphicon-font                   { &:before { content: \"\\e047\"; } }\n.glyphicon-bold                   { &:before { content: \"\\e048\"; } }\n.glyphicon-italic                 { &:before { content: \"\\e049\"; } }\n.glyphicon-text-height            { &:before { content: \"\\e050\"; } }\n.glyphicon-text-width             { &:before { content: \"\\e051\"; } }\n.glyphicon-align-left             { &:before { content: \"\\e052\"; } }\n.glyphicon-align-center           { &:before { content: \"\\e053\"; } }\n.glyphicon-align-right            { &:before { content: \"\\e054\"; } }\n.glyphicon-align-justify          { &:before { content: \"\\e055\"; } }\n.glyphicon-list                   { &:before { content: \"\\e056\"; } }\n.glyphicon-indent-left            { &:before { content: \"\\e057\"; } }\n.glyphicon-indent-right           { &:before { content: \"\\e058\"; } }\n.glyphicon-facetime-video         { &:before { content: \"\\e059\"; } }\n.glyphicon-picture                { &:before { content: \"\\e060\"; } }\n.glyphicon-map-marker             { &:before { content: \"\\e062\"; } }\n.glyphicon-adjust                 { &:before { content: \"\\e063\"; } }\n.glyphicon-tint                   { &:before { content: \"\\e064\"; } }\n.glyphicon-edit                   { &:before { content: \"\\e065\"; } }\n.glyphicon-share                  { &:before { content: \"\\e066\"; } }\n.glyphicon-check                  { &:before { content: \"\\e067\"; } }\n.glyphicon-move                   { &:before { content: \"\\e068\"; } }\n.glyphicon-step-backward          { &:before { content: \"\\e069\"; } }\n.glyphicon-fast-backward          { &:before { content: \"\\e070\"; } }\n.glyphicon-backward               { &:before { content: \"\\e071\"; } }\n.glyphicon-play                   { &:before { content: \"\\e072\"; } }\n.glyphicon-pause                  { &:before { content: \"\\e073\"; } }\n.glyphicon-stop                   { &:before { content: \"\\e074\"; } }\n.glyphicon-forward                { &:before { content: \"\\e075\"; } }\n.glyphicon-fast-forward           { &:before { content: \"\\e076\"; } }\n.glyphicon-step-forward           { &:before { content: \"\\e077\"; } }\n.glyphicon-eject                  { &:before { content: \"\\e078\"; } }\n.glyphicon-chevron-left           { &:before { content: \"\\e079\"; } }\n.glyphicon-chevron-right          { &:before { content: \"\\e080\"; } }\n.glyphicon-plus-sign              { &:before { content: \"\\e081\"; } }\n.glyphicon-minus-sign             { &:before { content: \"\\e082\"; } }\n.glyphicon-remove-sign            { &:before { content: \"\\e083\"; } }\n.glyphicon-ok-sign                { &:before { content: \"\\e084\"; } }\n.glyphicon-question-sign          { &:before { content: \"\\e085\"; } }\n.glyphicon-info-sign              { &:before { content: \"\\e086\"; } }\n.glyphicon-screenshot             { &:before { content: \"\\e087\"; } }\n.glyphicon-remove-circle          { &:before { content: \"\\e088\"; } }\n.glyphicon-ok-circle              { &:before { content: \"\\e089\"; } }\n.glyphicon-ban-circle             { &:before { content: \"\\e090\"; } }\n.glyphicon-arrow-left             { &:before { content: \"\\e091\"; } }\n.glyphicon-arrow-right            { &:before { content: \"\\e092\"; } }\n.glyphicon-arrow-up               { &:before { content: \"\\e093\"; } }\n.glyphicon-arrow-down             { &:before { content: \"\\e094\"; } }\n.glyphicon-share-alt              { &:before { content: \"\\e095\"; } }\n.glyphicon-resize-full            { &:before { content: \"\\e096\"; } }\n.glyphicon-resize-small           { &:before { content: \"\\e097\"; } }\n.glyphicon-exclamation-sign       { &:before { content: \"\\e101\"; } }\n.glyphicon-gift                   { &:before { content: \"\\e102\"; } }\n.glyphicon-leaf                   { &:before { content: \"\\e103\"; } }\n.glyphicon-fire                   { &:before { content: \"\\e104\"; } }\n.glyphicon-eye-open               { &:before { content: \"\\e105\"; } }\n.glyphicon-eye-close              { &:before { content: \"\\e106\"; } }\n.glyphicon-warning-sign           { &:before { content: \"\\e107\"; } }\n.glyphicon-plane                  { &:before { content: \"\\e108\"; } }\n.glyphicon-calendar               { &:before { content: \"\\e109\"; } }\n.glyphicon-random                 { &:before { content: \"\\e110\"; } }\n.glyphicon-comment                { &:before { content: \"\\e111\"; } }\n.glyphicon-magnet                 { &:before { content: \"\\e112\"; } }\n.glyphicon-chevron-up             { &:before { content: \"\\e113\"; } }\n.glyphicon-chevron-down           { &:before { content: \"\\e114\"; } }\n.glyphicon-retweet                { &:before { content: \"\\e115\"; } }\n.glyphicon-shopping-cart          { &:before { content: \"\\e116\"; } }\n.glyphicon-folder-close           { &:before { content: \"\\e117\"; } }\n.glyphicon-folder-open            { &:before { content: \"\\e118\"; } }\n.glyphicon-resize-vertical        { &:before { content: \"\\e119\"; } }\n.glyphicon-resize-horizontal      { &:before { content: \"\\e120\"; } }\n.glyphicon-hdd                    { &:before { content: \"\\e121\"; } }\n.glyphicon-bullhorn               { &:before { content: \"\\e122\"; } }\n.glyphicon-bell                   { &:before { content: \"\\e123\"; } }\n.glyphicon-certificate            { &:before { content: \"\\e124\"; } }\n.glyphicon-thumbs-up              { &:before { content: \"\\e125\"; } }\n.glyphicon-thumbs-down            { &:before { content: \"\\e126\"; } }\n.glyphicon-hand-right             { &:before { content: \"\\e127\"; } }\n.glyphicon-hand-left              { &:before { content: \"\\e128\"; } }\n.glyphicon-hand-up                { &:before { content: \"\\e129\"; } }\n.glyphicon-hand-down              { &:before { content: \"\\e130\"; } }\n.glyphicon-circle-arrow-right     { &:before { content: \"\\e131\"; } }\n.glyphicon-circle-arrow-left      { &:before { content: \"\\e132\"; } }\n.glyphicon-circle-arrow-up        { &:before { content: \"\\e133\"; } }\n.glyphicon-circle-arrow-down      { &:before { content: \"\\e134\"; } }\n.glyphicon-globe                  { &:before { content: \"\\e135\"; } }\n.glyphicon-wrench                 { &:before { content: \"\\e136\"; } }\n.glyphicon-tasks                  { &:before { content: \"\\e137\"; } }\n.glyphicon-filter                 { &:before { content: \"\\e138\"; } }\n.glyphicon-briefcase              { &:before { content: \"\\e139\"; } }\n.glyphicon-fullscreen             { &:before { content: \"\\e140\"; } }\n.glyphicon-dashboard              { &:before { content: \"\\e141\"; } }\n.glyphicon-paperclip              { &:before { content: \"\\e142\"; } }\n.glyphicon-heart-empty            { &:before { content: \"\\e143\"; } }\n.glyphicon-link                   { &:before { content: \"\\e144\"; } }\n.glyphicon-phone                  { &:before { content: \"\\e145\"; } }\n.glyphicon-pushpin                { &:before { content: \"\\e146\"; } }\n.glyphicon-usd                    { &:before { content: \"\\e148\"; } }\n.glyphicon-gbp                    { &:before { content: \"\\e149\"; } }\n.glyphicon-sort                   { &:before { content: \"\\e150\"; } }\n.glyphicon-sort-by-alphabet       { &:before { content: \"\\e151\"; } }\n.glyphicon-sort-by-alphabet-alt   { &:before { content: \"\\e152\"; } }\n.glyphicon-sort-by-order          { &:before { content: \"\\e153\"; } }\n.glyphicon-sort-by-order-alt      { &:before { content: \"\\e154\"; } }\n.glyphicon-sort-by-attributes     { &:before { content: \"\\e155\"; } }\n.glyphicon-sort-by-attributes-alt { &:before { content: \"\\e156\"; } }\n.glyphicon-unchecked              { &:before { content: \"\\e157\"; } }\n.glyphicon-expand                 { &:before { content: \"\\e158\"; } }\n.glyphicon-collapse-down          { &:before { content: \"\\e159\"; } }\n.glyphicon-collapse-up            { &:before { content: \"\\e160\"; } }\n.glyphicon-log-in                 { &:before { content: \"\\e161\"; } }\n.glyphicon-flash                  { &:before { content: \"\\e162\"; } }\n.glyphicon-log-out                { &:before { content: \"\\e163\"; } }\n.glyphicon-new-window             { &:before { content: \"\\e164\"; } }\n.glyphicon-record                 { &:before { content: \"\\e165\"; } }\n.glyphicon-save                   { &:before { content: \"\\e166\"; } }\n.glyphicon-open                   { &:before { content: \"\\e167\"; } }\n.glyphicon-saved                  { &:before { content: \"\\e168\"; } }\n.glyphicon-import                 { &:before { content: \"\\e169\"; } }\n.glyphicon-export                 { &:before { content: \"\\e170\"; } }\n.glyphicon-send                   { &:before { content: \"\\e171\"; } }\n.glyphicon-floppy-disk            { &:before { content: \"\\e172\"; } }\n.glyphicon-floppy-saved           { &:before { content: \"\\e173\"; } }\n.glyphicon-floppy-remove          { &:before { content: \"\\e174\"; } }\n.glyphicon-floppy-save            { &:before { content: \"\\e175\"; } }\n.glyphicon-floppy-open            { &:before { content: \"\\e176\"; } }\n.glyphicon-credit-card            { &:before { content: \"\\e177\"; } }\n.glyphicon-transfer               { &:before { content: \"\\e178\"; } }\n.glyphicon-cutlery                { &:before { content: \"\\e179\"; } }\n.glyphicon-header                 { &:before { content: \"\\e180\"; } }\n.glyphicon-compressed             { &:before { content: \"\\e181\"; } }\n.glyphicon-earphone               { &:before { content: \"\\e182\"; } }\n.glyphicon-phone-alt              { &:before { content: \"\\e183\"; } }\n.glyphicon-tower                  { &:before { content: \"\\e184\"; } }\n.glyphicon-stats                  { &:before { content: \"\\e185\"; } }\n.glyphicon-sd-video               { &:before { content: \"\\e186\"; } }\n.glyphicon-hd-video               { &:before { content: \"\\e187\"; } }\n.glyphicon-subtitles              { &:before { content: \"\\e188\"; } }\n.glyphicon-sound-stereo           { &:before { content: \"\\e189\"; } }\n.glyphicon-sound-dolby            { &:before { content: \"\\e190\"; } }\n.glyphicon-sound-5-1              { &:before { content: \"\\e191\"; } }\n.glyphicon-sound-6-1              { &:before { content: \"\\e192\"; } }\n.glyphicon-sound-7-1              { &:before { content: \"\\e193\"; } }\n.glyphicon-copyright-mark         { &:before { content: \"\\e194\"; } }\n.glyphicon-registration-mark      { &:before { content: \"\\e195\"; } }\n.glyphicon-cloud-download         { &:before { content: \"\\e197\"; } }\n.glyphicon-cloud-upload           { &:before { content: \"\\e198\"; } }\n.glyphicon-tree-conifer           { &:before { content: \"\\e199\"; } }\n.glyphicon-tree-deciduous         { &:before { content: \"\\e200\"; } }\n.glyphicon-cd                     { &:before { content: \"\\e201\"; } }\n.glyphicon-save-file              { &:before { content: \"\\e202\"; } }\n.glyphicon-open-file              { &:before { content: \"\\e203\"; } }\n.glyphicon-level-up               { &:before { content: \"\\e204\"; } }\n.glyphicon-copy                   { &:before { content: \"\\e205\"; } }\n.glyphicon-paste                  { &:before { content: \"\\e206\"; } }\n// The following 2 Glyphicons are omitted for the time being because\n// they currently use Unicode codepoints that are outside the\n// Basic Multilingual Plane (BMP). Older buggy versions of WebKit can't handle\n// non-BMP codepoints in CSS string escapes, and thus can't display these two icons.\n// Notably, the bug affects some older versions of the Android Browser.\n// More info: https://github.com/twbs/bootstrap/issues/10106\n// .glyphicon-door                   { &:before { content: \"\\1f6aa\"; } }\n// .glyphicon-key                    { &:before { content: \"\\1f511\"; } }\n.glyphicon-alert                  { &:before { content: \"\\e209\"; } }\n.glyphicon-equalizer              { &:before { content: \"\\e210\"; } }\n.glyphicon-king                   { &:before { content: \"\\e211\"; } }\n.glyphicon-queen                  { &:before { content: \"\\e212\"; } }\n.glyphicon-pawn                   { &:before { content: \"\\e213\"; } }\n.glyphicon-bishop                 { &:before { content: \"\\e214\"; } }\n.glyphicon-knight                 { &:before { content: \"\\e215\"; } }\n.glyphicon-baby-formula           { &:before { content: \"\\e216\"; } }\n.glyphicon-tent                   { &:before { content: \"\\26fa\"; } }\n.glyphicon-blackboard             { &:before { content: \"\\e218\"; } }\n.glyphicon-bed                    { &:before { content: \"\\e219\"; } }\n.glyphicon-apple                  { &:before { content: \"\\f8ff\"; } }\n.glyphicon-erase                  { &:before { content: \"\\e221\"; } }\n.glyphicon-hourglass              { &:before { content: \"\\231b\"; } }\n.glyphicon-lamp                   { &:before { content: \"\\e223\"; } }\n.glyphicon-duplicate              { &:before { content: \"\\e224\"; } }\n.glyphicon-piggy-bank             { &:before { content: \"\\e225\"; } }\n.glyphicon-scissors               { &:before { content: \"\\e226\"; } }\n.glyphicon-bitcoin                { &:before { content: \"\\e227\"; } }\n.glyphicon-btc                    { &:before { content: \"\\e227\"; } }\n.glyphicon-xbt                    { &:before { content: \"\\e227\"; } }\n.glyphicon-yen                    { &:before { content: \"\\00a5\"; } }\n.glyphicon-jpy                    { &:before { content: \"\\00a5\"; } }\n.glyphicon-ruble                  { &:before { content: \"\\20bd\"; } }\n.glyphicon-rub                    { &:before { content: \"\\20bd\"; } }\n.glyphicon-scale                  { &:before { content: \"\\e230\"; } }\n.glyphicon-ice-lolly              { &:before { content: \"\\e231\"; } }\n.glyphicon-ice-lolly-tasted       { &:before { content: \"\\e232\"; } }\n.glyphicon-education              { &:before { content: \"\\e233\"; } }\n.glyphicon-option-horizontal      { &:before { content: \"\\e234\"; } }\n.glyphicon-option-vertical        { &:before { content: \"\\e235\"; } }\n.glyphicon-menu-hamburger         { &:before { content: \"\\e236\"; } }\n.glyphicon-modal-window           { &:before { content: \"\\e237\"; } }\n.glyphicon-oil                    { &:before { content: \"\\e238\"; } }\n.glyphicon-grain                  { &:before { content: \"\\e239\"; } }\n.glyphicon-sunglasses             { &:before { content: \"\\e240\"; } }\n.glyphicon-text-size              { &:before { content: \"\\e241\"; } }\n.glyphicon-text-color             { &:before { content: \"\\e242\"; } }\n.glyphicon-text-background        { &:before { content: \"\\e243\"; } }\n.glyphicon-object-align-top       { &:before { content: \"\\e244\"; } }\n.glyphicon-object-align-bottom    { &:before { content: \"\\e245\"; } }\n.glyphicon-object-align-horizontal{ &:before { content: \"\\e246\"; } }\n.glyphicon-object-align-left      { &:before { content: \"\\e247\"; } }\n.glyphicon-object-align-vertical  { &:before { content: \"\\e248\"; } }\n.glyphicon-object-align-right     { &:before { content: \"\\e249\"; } }\n.glyphicon-triangle-right         { &:before { content: \"\\e250\"; } }\n.glyphicon-triangle-left          { &:before { content: \"\\e251\"; } }\n.glyphicon-triangle-bottom        { &:before { content: \"\\e252\"; } }\n.glyphicon-triangle-top           { &:before { content: \"\\e253\"; } }\n.glyphicon-console                { &:before { content: \"\\e254\"; } }\n.glyphicon-superscript            { &:before { content: \"\\e255\"; } }\n.glyphicon-subscript              { &:before { content: \"\\e256\"; } }\n.glyphicon-menu-left              { &:before { content: \"\\e257\"; } }\n.glyphicon-menu-right             { &:before { content: \"\\e258\"; } }\n.glyphicon-menu-down              { &:before { content: \"\\e259\"; } }\n.glyphicon-menu-up                { &:before { content: \"\\e260\"; } }\n","//\n// Scaffolding\n// --------------------------------------------------\n\n\n// Reset the box-sizing\n//\n// Heads up! This reset may cause conflicts with some third-party widgets.\n// For recommendations on resolving such conflicts, see\n// http://getbootstrap.com/getting-started/#third-box-sizing\n* {\n  .box-sizing(border-box);\n}\n*:before,\n*:after {\n  .box-sizing(border-box);\n}\n\n\n// Body reset\n\nhtml {\n  font-size: 10px;\n  -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n\nbody {\n  font-family: @font-family-base;\n  font-size: @font-size-base;\n  line-height: @line-height-base;\n  color: @text-color;\n  background-color: @body-bg;\n}\n\n// Reset fonts for relevant elements\ninput,\nbutton,\nselect,\ntextarea {\n  font-family: inherit;\n  font-size: inherit;\n  line-height: inherit;\n}\n\n\n// Links\n\na {\n  color: @link-color;\n  text-decoration: none;\n\n  &:hover,\n  &:focus {\n    color: @link-hover-color;\n    text-decoration: @link-hover-decoration;\n  }\n\n  &:focus {\n    .tab-focus();\n  }\n}\n\n\n// Figures\n//\n// We reset this here because previously Normalize had no `figure` margins. This\n// ensures we don't break anyone's use of the element.\n\nfigure {\n  margin: 0;\n}\n\n\n// Images\n\nimg {\n  vertical-align: middle;\n}\n\n// Responsive images (ensure images don't scale beyond their parents)\n.img-responsive {\n  .img-responsive();\n}\n\n// Rounded corners\n.img-rounded {\n  border-radius: @border-radius-large;\n}\n\n// Image thumbnails\n//\n// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.\n.img-thumbnail {\n  padding: @thumbnail-padding;\n  line-height: @line-height-base;\n  background-color: @thumbnail-bg;\n  border: 1px solid @thumbnail-border;\n  border-radius: @thumbnail-border-radius;\n  .transition(all .2s ease-in-out);\n\n  // Keep them at most 100% wide\n  .img-responsive(inline-block);\n}\n\n// Perfect circle\n.img-circle {\n  border-radius: 50%; // set radius in percents\n}\n\n\n// Horizontal rules\n\nhr {\n  margin-top:    @line-height-computed;\n  margin-bottom: @line-height-computed;\n  border: 0;\n  border-top: 1px solid @hr-border;\n}\n\n\n// Only display content to screen readers\n//\n// See: http://a11yproject.com/posts/how-to-hide-content\n\n.sr-only {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  padding: 0;\n  overflow: hidden;\n  clip: rect(0,0,0,0);\n  border: 0;\n}\n\n// Use in conjunction with .sr-only to only display content when it's focused.\n// Useful for \"Skip to main content\" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1\n// Credit: HTML5 Boilerplate\n\n.sr-only-focusable {\n  &:active,\n  &:focus {\n    position: static;\n    width: auto;\n    height: auto;\n    margin: 0;\n    overflow: visible;\n    clip: auto;\n  }\n}\n\n\n// iOS \"clickable elements\" fix for role=\"button\"\n//\n// Fixes \"clickability\" issue (and more generally, the firing of events such as focus as well)\n// for traditionally non-focusable elements with role=\"button\"\n// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile\n\n[role=\"button\"] {\n  cursor: pointer;\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n  -webkit-animation: @animation;\n       -o-animation: @animation;\n          animation: @animation;\n}\n.animation-name(@name) {\n  -webkit-animation-name: @name;\n          animation-name: @name;\n}\n.animation-duration(@duration) {\n  -webkit-animation-duration: @duration;\n          animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n  -webkit-animation-timing-function: @timing-function;\n          animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n  -webkit-animation-delay: @delay;\n          animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n  -webkit-animation-iteration-count: @iteration-count;\n          animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n  -webkit-animation-direction: @direction;\n          animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n  -webkit-animation-fill-mode: @fill-mode;\n          animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n  -webkit-backface-visibility: @visibility;\n     -moz-backface-visibility: @visibility;\n          backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n  -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n          box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n  -webkit-box-sizing: @boxmodel;\n     -moz-box-sizing: @boxmodel;\n          box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n  -webkit-column-count: @column-count;\n     -moz-column-count: @column-count;\n          column-count: @column-count;\n  -webkit-column-gap: @column-gap;\n     -moz-column-gap: @column-gap;\n          column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n  word-wrap: break-word;\n  -webkit-hyphens: @mode;\n     -moz-hyphens: @mode;\n      -ms-hyphens: @mode; // IE10+\n       -o-hyphens: @mode;\n          hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n  // Firefox\n  &::-moz-placeholder {\n    color: @color;\n    opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n  }\n  &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n  &::-webkit-input-placeholder  { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n  -webkit-transform: scale(@ratio);\n      -ms-transform: scale(@ratio); // IE9 only\n       -o-transform: scale(@ratio);\n          transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n  -webkit-transform: scale(@ratioX, @ratioY);\n      -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n       -o-transform: scale(@ratioX, @ratioY);\n          transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n  -webkit-transform: scaleX(@ratio);\n      -ms-transform: scaleX(@ratio); // IE9 only\n       -o-transform: scaleX(@ratio);\n          transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n  -webkit-transform: scaleY(@ratio);\n      -ms-transform: scaleY(@ratio); // IE9 only\n       -o-transform: scaleY(@ratio);\n          transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n  -webkit-transform: skewX(@x) skewY(@y);\n      -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n       -o-transform: skewX(@x) skewY(@y);\n          transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n  -webkit-transform: translate(@x, @y);\n      -ms-transform: translate(@x, @y); // IE9 only\n       -o-transform: translate(@x, @y);\n          transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n  -webkit-transform: translate3d(@x, @y, @z);\n          transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n  -webkit-transform: rotate(@degrees);\n      -ms-transform: rotate(@degrees); // IE9 only\n       -o-transform: rotate(@degrees);\n          transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n  -webkit-transform: rotateX(@degrees);\n      -ms-transform: rotateX(@degrees); // IE9 only\n       -o-transform: rotateX(@degrees);\n          transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n  -webkit-transform: rotateY(@degrees);\n      -ms-transform: rotateY(@degrees); // IE9 only\n       -o-transform: rotateY(@degrees);\n          transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n  -webkit-perspective: @perspective;\n     -moz-perspective: @perspective;\n          perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n  -webkit-perspective-origin: @perspective;\n     -moz-perspective-origin: @perspective;\n          perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n  -webkit-transform-origin: @origin;\n     -moz-transform-origin: @origin;\n      -ms-transform-origin: @origin; // IE9 only\n          transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n  -webkit-transition: @transition;\n       -o-transition: @transition;\n          transition: @transition;\n}\n.transition-property(@transition-property) {\n  -webkit-transition-property: @transition-property;\n          transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n  -webkit-transition-delay: @transition-delay;\n          transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n  -webkit-transition-duration: @transition-duration;\n          transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n  -webkit-transition-timing-function: @timing-function;\n          transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n  -webkit-transition: -webkit-transform @transition;\n     -moz-transition: -moz-transform @transition;\n       -o-transition: -o-transform @transition;\n          transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n  -webkit-user-select: @select;\n     -moz-user-select: @select;\n      -ms-user-select: @select; // IE10+\n          user-select: @select;\n}\n","// WebKit-style focus\n\n.tab-focus() {\n  // WebKit-specific. Other browsers will keep their default outline style.\n  // (Initially tried to also force default via `outline: initial`,\n  // but that seems to erroneously remove the outline in Firefox altogether.)\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\n","// Image Mixins\n// - Responsive image\n// - Retina image\n\n\n// Responsive image\n//\n// Keep images from scaling beyond the width of their parents.\n.img-responsive(@display: block) {\n  display: @display;\n  max-width: 100%; // Part 1: Set a maximum relative to the parent\n  height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching\n}\n\n\n// Retina image\n//\n// Short retina mixin for setting background-image and -size. Note that the\n// spelling of `min--moz-device-pixel-ratio` is intentional.\n.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {\n  background-image: url(\"@{file-1x}\");\n\n  @media\n  only screen and (-webkit-min-device-pixel-ratio: 2),\n  only screen and (   min--moz-device-pixel-ratio: 2),\n  only screen and (     -o-min-device-pixel-ratio: 2/1),\n  only screen and (        min-device-pixel-ratio: 2),\n  only screen and (                min-resolution: 192dpi),\n  only screen and (                min-resolution: 2dppx) {\n    background-image: url(\"@{file-2x}\");\n    background-size: @width-1x @height-1x;\n  }\n}\n","//\n// Typography\n// --------------------------------------------------\n\n\n// Headings\n// -------------------------\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6 {\n  font-family: @headings-font-family;\n  font-weight: @headings-font-weight;\n  line-height: @headings-line-height;\n  color: @headings-color;\n\n  small,\n  .small {\n    font-weight: normal;\n    line-height: 1;\n    color: @headings-small-color;\n  }\n}\n\nh1, .h1,\nh2, .h2,\nh3, .h3 {\n  margin-top: @line-height-computed;\n  margin-bottom: (@line-height-computed / 2);\n\n  small,\n  .small {\n    font-size: 65%;\n  }\n}\nh4, .h4,\nh5, .h5,\nh6, .h6 {\n  margin-top: (@line-height-computed / 2);\n  margin-bottom: (@line-height-computed / 2);\n\n  small,\n  .small {\n    font-size: 75%;\n  }\n}\n\nh1, .h1 { font-size: @font-size-h1; }\nh2, .h2 { font-size: @font-size-h2; }\nh3, .h3 { font-size: @font-size-h3; }\nh4, .h4 { font-size: @font-size-h4; }\nh5, .h5 { font-size: @font-size-h5; }\nh6, .h6 { font-size: @font-size-h6; }\n\n\n// Body text\n// -------------------------\n\np {\n  margin: 0 0 (@line-height-computed / 2);\n}\n\n.lead {\n  margin-bottom: @line-height-computed;\n  font-size: floor((@font-size-base * 1.15));\n  font-weight: 300;\n  line-height: 1.4;\n\n  @media (min-width: @screen-sm-min) {\n    font-size: (@font-size-base * 1.5);\n  }\n}\n\n\n// Emphasis & misc\n// -------------------------\n\n// Ex: (12px small font / 14px base font) * 100% = about 85%\nsmall,\n.small {\n  font-size: floor((100% * @font-size-small / @font-size-base));\n}\n\nmark,\n.mark {\n  background-color: @state-warning-bg;\n  padding: .2em;\n}\n\n// Alignment\n.text-left           { text-align: left; }\n.text-right          { text-align: right; }\n.text-center         { text-align: center; }\n.text-justify        { text-align: justify; }\n.text-nowrap         { white-space: nowrap; }\n\n// Transformation\n.text-lowercase      { text-transform: lowercase; }\n.text-uppercase      { text-transform: uppercase; }\n.text-capitalize     { text-transform: capitalize; }\n\n// Contextual colors\n.text-muted {\n  color: @text-muted;\n}\n.text-primary {\n  .text-emphasis-variant(@brand-primary);\n}\n.text-success {\n  .text-emphasis-variant(@state-success-text);\n}\n.text-info {\n  .text-emphasis-variant(@state-info-text);\n}\n.text-warning {\n  .text-emphasis-variant(@state-warning-text);\n}\n.text-danger {\n  .text-emphasis-variant(@state-danger-text);\n}\n\n// Contextual backgrounds\n// For now we'll leave these alongside the text classes until v4 when we can\n// safely shift things around (per SemVer rules).\n.bg-primary {\n  // Given the contrast here, this is the only class to have its color inverted\n  // automatically.\n  color: #fff;\n  .bg-variant(@brand-primary);\n}\n.bg-success {\n  .bg-variant(@state-success-bg);\n}\n.bg-info {\n  .bg-variant(@state-info-bg);\n}\n.bg-warning {\n  .bg-variant(@state-warning-bg);\n}\n.bg-danger {\n  .bg-variant(@state-danger-bg);\n}\n\n\n// Page header\n// -------------------------\n\n.page-header {\n  padding-bottom: ((@line-height-computed / 2) - 1);\n  margin: (@line-height-computed * 2) 0 @line-height-computed;\n  border-bottom: 1px solid @page-header-border-color;\n}\n\n\n// Lists\n// -------------------------\n\n// Unordered and Ordered lists\nul,\nol {\n  margin-top: 0;\n  margin-bottom: (@line-height-computed / 2);\n  ul,\n  ol {\n    margin-bottom: 0;\n  }\n}\n\n// List options\n\n// Unstyled keeps list items block level, just removes default browser padding and list-style\n.list-unstyled {\n  padding-left: 0;\n  list-style: none;\n}\n\n// Inline turns list items into inline-block\n.list-inline {\n  .list-unstyled();\n  margin-left: -5px;\n\n  > li {\n    display: inline-block;\n    padding-left: 5px;\n    padding-right: 5px;\n  }\n}\n\n// Description Lists\ndl {\n  margin-top: 0; // Remove browser default\n  margin-bottom: @line-height-computed;\n}\ndt,\ndd {\n  line-height: @line-height-base;\n}\ndt {\n  font-weight: bold;\n}\ndd {\n  margin-left: 0; // Undo browser default\n}\n\n// Horizontal description lists\n//\n// Defaults to being stacked without any of the below styles applied, until the\n// grid breakpoint is reached (default of ~768px).\n\n.dl-horizontal {\n  dd {\n    &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present\n  }\n\n  @media (min-width: @dl-horizontal-breakpoint) {\n    dt {\n      float: left;\n      width: (@dl-horizontal-offset - 20);\n      clear: left;\n      text-align: right;\n      .text-overflow();\n    }\n    dd {\n      margin-left: @dl-horizontal-offset;\n    }\n  }\n}\n\n\n// Misc\n// -------------------------\n\n// Abbreviations and acronyms\nabbr[title],\n// Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257\nabbr[data-original-title] {\n  cursor: help;\n  border-bottom: 1px dotted @abbr-border-color;\n}\n.initialism {\n  font-size: 90%;\n  .text-uppercase();\n}\n\n// Blockquotes\nblockquote {\n  padding: (@line-height-computed / 2) @line-height-computed;\n  margin: 0 0 @line-height-computed;\n  font-size: @blockquote-font-size;\n  border-left: 5px solid @blockquote-border-color;\n\n  p,\n  ul,\n  ol {\n    &:last-child {\n      margin-bottom: 0;\n    }\n  }\n\n  // Note: Deprecated small and .small as of v3.1.0\n  // Context: https://github.com/twbs/bootstrap/issues/11660\n  footer,\n  small,\n  .small {\n    display: block;\n    font-size: 80%; // back to default font-size\n    line-height: @line-height-base;\n    color: @blockquote-small-color;\n\n    &:before {\n      content: '\\2014 \\00A0'; // em dash, nbsp\n    }\n  }\n}\n\n// Opposite alignment of blockquote\n//\n// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.\n.blockquote-reverse,\nblockquote.pull-right {\n  padding-right: 15px;\n  padding-left: 0;\n  border-right: 5px solid @blockquote-border-color;\n  border-left: 0;\n  text-align: right;\n\n  // Account for citation\n  footer,\n  small,\n  .small {\n    &:before { content: ''; }\n    &:after {\n      content: '\\00A0 \\2014'; // nbsp, em dash\n    }\n  }\n}\n\n// Addresses\naddress {\n  margin-bottom: @line-height-computed;\n  font-style: normal;\n  line-height: @line-height-base;\n}\n","// Typography\n\n.text-emphasis-variant(@color) {\n  color: @color;\n  a&:hover,\n  a&:focus {\n    color: darken(@color, 10%);\n  }\n}\n","// Contextual backgrounds\n\n.bg-variant(@color) {\n  background-color: @color;\n  a&:hover,\n  a&:focus {\n    background-color: darken(@color, 10%);\n  }\n}\n","// Text overflow\n// Requires inline-block or block for proper styling\n\n.text-overflow() {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n","//\n// Code (inline and block)\n// --------------------------------------------------\n\n\n// Inline and block code styles\ncode,\nkbd,\npre,\nsamp {\n  font-family: @font-family-monospace;\n}\n\n// Inline code\ncode {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: @code-color;\n  background-color: @code-bg;\n  border-radius: @border-radius-base;\n}\n\n// User input typically entered via keyboard\nkbd {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: @kbd-color;\n  background-color: @kbd-bg;\n  border-radius: @border-radius-small;\n  box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);\n\n  kbd {\n    padding: 0;\n    font-size: 100%;\n    font-weight: bold;\n    box-shadow: none;\n  }\n}\n\n// Blocks of code\npre {\n  display: block;\n  padding: ((@line-height-computed - 1) / 2);\n  margin: 0 0 (@line-height-computed / 2);\n  font-size: (@font-size-base - 1); // 14px to 13px\n  line-height: @line-height-base;\n  word-break: break-all;\n  word-wrap: break-word;\n  color: @pre-color;\n  background-color: @pre-bg;\n  border: 1px solid @pre-border-color;\n  border-radius: @border-radius-base;\n\n  // Account for some code outputs that place code tags in pre tags\n  code {\n    padding: 0;\n    font-size: inherit;\n    color: inherit;\n    white-space: pre-wrap;\n    background-color: transparent;\n    border-radius: 0;\n  }\n}\n\n// Enable scrollable blocks of code\n.pre-scrollable {\n  max-height: @pre-scrollable-max-height;\n  overflow-y: scroll;\n}\n","//\n// Grid system\n// --------------------------------------------------\n\n\n// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n.container {\n  .container-fixed();\n\n  @media (min-width: @screen-sm-min) {\n    width: @container-sm;\n  }\n  @media (min-width: @screen-md-min) {\n    width: @container-md;\n  }\n  @media (min-width: @screen-lg-min) {\n    width: @container-lg;\n  }\n}\n\n\n// Fluid container\n//\n// Utilizes the mixin meant for fixed width containers, but without any defined\n// width for fluid, full width layouts.\n\n.container-fluid {\n  .container-fixed();\n}\n\n\n// Row\n//\n// Rows contain and clear the floats of your columns.\n\n.row {\n  .make-row();\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n.make-grid-columns();\n\n\n// Extra small grid\n//\n// Columns, offsets, pushes, and pulls for extra small devices like\n// smartphones.\n\n.make-grid(xs);\n\n\n// Small grid\n//\n// Columns, offsets, pushes, and pulls for the small device range, from phones\n// to tablets.\n\n@media (min-width: @screen-sm-min) {\n  .make-grid(sm);\n}\n\n\n// Medium grid\n//\n// Columns, offsets, pushes, and pulls for the desktop device range.\n\n@media (min-width: @screen-md-min) {\n  .make-grid(md);\n}\n\n\n// Large grid\n//\n// Columns, offsets, pushes, and pulls for the large desktop device range.\n\n@media (min-width: @screen-lg-min) {\n  .make-grid(lg);\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n// Centered container element\n.container-fixed(@gutter: @grid-gutter-width) {\n  margin-right: auto;\n  margin-left: auto;\n  padding-left:  floor((@gutter / 2));\n  padding-right: ceil((@gutter / 2));\n  &:extend(.clearfix all);\n}\n\n// Creates a wrapper for a series of columns\n.make-row(@gutter: @grid-gutter-width) {\n  margin-left:  ceil((@gutter / -2));\n  margin-right: floor((@gutter / -2));\n  &:extend(.clearfix all);\n}\n\n// Generate the extra small columns\n.make-xs-column(@columns; @gutter: @grid-gutter-width) {\n  position: relative;\n  float: left;\n  width: percentage((@columns / @grid-columns));\n  min-height: 1px;\n  padding-left:  (@gutter / 2);\n  padding-right: (@gutter / 2);\n}\n.make-xs-column-offset(@columns) {\n  margin-left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-push(@columns) {\n  left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-pull(@columns) {\n  right: percentage((@columns / @grid-columns));\n}\n\n// Generate the small columns\n.make-sm-column(@columns; @gutter: @grid-gutter-width) {\n  position: relative;\n  min-height: 1px;\n  padding-left:  (@gutter / 2);\n  padding-right: (@gutter / 2);\n\n  @media (min-width: @screen-sm-min) {\n    float: left;\n    width: percentage((@columns / @grid-columns));\n  }\n}\n.make-sm-column-offset(@columns) {\n  @media (min-width: @screen-sm-min) {\n    margin-left: percentage((@columns / @grid-columns));\n  }\n}\n.make-sm-column-push(@columns) {\n  @media (min-width: @screen-sm-min) {\n    left: percentage((@columns / @grid-columns));\n  }\n}\n.make-sm-column-pull(@columns) {\n  @media (min-width: @screen-sm-min) {\n    right: percentage((@columns / @grid-columns));\n  }\n}\n\n// Generate the medium columns\n.make-md-column(@columns; @gutter: @grid-gutter-width) {\n  position: relative;\n  min-height: 1px;\n  padding-left:  (@gutter / 2);\n  padding-right: (@gutter / 2);\n\n  @media (min-width: @screen-md-min) {\n    float: left;\n    width: percentage((@columns / @grid-columns));\n  }\n}\n.make-md-column-offset(@columns) {\n  @media (min-width: @screen-md-min) {\n    margin-left: percentage((@columns / @grid-columns));\n  }\n}\n.make-md-column-push(@columns) {\n  @media (min-width: @screen-md-min) {\n    left: percentage((@columns / @grid-columns));\n  }\n}\n.make-md-column-pull(@columns) {\n  @media (min-width: @screen-md-min) {\n    right: percentage((@columns / @grid-columns));\n  }\n}\n\n// Generate the large columns\n.make-lg-column(@columns; @gutter: @grid-gutter-width) {\n  position: relative;\n  min-height: 1px;\n  padding-left:  (@gutter / 2);\n  padding-right: (@gutter / 2);\n\n  @media (min-width: @screen-lg-min) {\n    float: left;\n    width: percentage((@columns / @grid-columns));\n  }\n}\n.make-lg-column-offset(@columns) {\n  @media (min-width: @screen-lg-min) {\n    margin-left: percentage((@columns / @grid-columns));\n  }\n}\n.make-lg-column-push(@columns) {\n  @media (min-width: @screen-lg-min) {\n    left: percentage((@columns / @grid-columns));\n  }\n}\n.make-lg-column-pull(@columns) {\n  @media (min-width: @screen-lg-min) {\n    right: percentage((@columns / @grid-columns));\n  }\n}\n","// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `@grid-columns`.\n\n.make-grid-columns() {\n  // Common styles for all sizes of grid columns, widths 1-12\n  .col(@index) { // initial\n    @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n    .col((@index + 1), @item);\n  }\n  .col(@index, @list) when (@index =< @grid-columns) { // general; \"=<\" isn't a typo\n    @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n    .col((@index + 1), ~\"@{list}, @{item}\");\n  }\n  .col(@index, @list) when (@index > @grid-columns) { // terminal\n    @{list} {\n      position: relative;\n      // Prevent columns from collapsing when empty\n      min-height: 1px;\n      // Inner gutter via padding\n      padding-left:  ceil((@grid-gutter-width / 2));\n      padding-right: floor((@grid-gutter-width / 2));\n    }\n  }\n  .col(1); // kickstart it\n}\n\n.float-grid-columns(@class) {\n  .col(@index) { // initial\n    @item: ~\".col-@{class}-@{index}\";\n    .col((@index + 1), @item);\n  }\n  .col(@index, @list) when (@index =< @grid-columns) { // general\n    @item: ~\".col-@{class}-@{index}\";\n    .col((@index + 1), ~\"@{list}, @{item}\");\n  }\n  .col(@index, @list) when (@index > @grid-columns) { // terminal\n    @{list} {\n      float: left;\n    }\n  }\n  .col(1); // kickstart it\n}\n\n.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {\n  .col-@{class}-@{index} {\n    width: percentage((@index / @grid-columns));\n  }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {\n  .col-@{class}-push-@{index} {\n    left: percentage((@index / @grid-columns));\n  }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {\n  .col-@{class}-push-0 {\n    left: auto;\n  }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {\n  .col-@{class}-pull-@{index} {\n    right: percentage((@index / @grid-columns));\n  }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {\n  .col-@{class}-pull-0 {\n    right: auto;\n  }\n}\n.calc-grid-column(@index, @class, @type) when (@type = offset) {\n  .col-@{class}-offset-@{index} {\n    margin-left: percentage((@index / @grid-columns));\n  }\n}\n\n// Basic looping in LESS\n.loop-grid-columns(@index, @class, @type) when (@index >= 0) {\n  .calc-grid-column(@index, @class, @type);\n  // next iteration\n  .loop-grid-columns((@index - 1), @class, @type);\n}\n\n// Create grid for specific class\n.make-grid(@class) {\n  .float-grid-columns(@class);\n  .loop-grid-columns(@grid-columns, @class, width);\n  .loop-grid-columns(@grid-columns, @class, pull);\n  .loop-grid-columns(@grid-columns, @class, push);\n  .loop-grid-columns(@grid-columns, @class, offset);\n}\n","//\n// Tables\n// --------------------------------------------------\n\n\ntable {\n  background-color: @table-bg;\n}\ncaption {\n  padding-top: @table-cell-padding;\n  padding-bottom: @table-cell-padding;\n  color: @text-muted;\n  text-align: left;\n}\nth {\n  text-align: left;\n}\n\n\n// Baseline styles\n\n.table {\n  width: 100%;\n  max-width: 100%;\n  margin-bottom: @line-height-computed;\n  // Cells\n  > thead,\n  > tbody,\n  > tfoot {\n    > tr {\n      > th,\n      > td {\n        padding: @table-cell-padding;\n        line-height: @line-height-base;\n        vertical-align: top;\n        border-top: 1px solid @table-border-color;\n      }\n    }\n  }\n  // Bottom align for column headings\n  > thead > tr > th {\n    vertical-align: bottom;\n    border-bottom: 2px solid @table-border-color;\n  }\n  // Remove top border from thead by default\n  > caption + thead,\n  > colgroup + thead,\n  > thead:first-child {\n    > tr:first-child {\n      > th,\n      > td {\n        border-top: 0;\n      }\n    }\n  }\n  // Account for multiple tbody instances\n  > tbody + tbody {\n    border-top: 2px solid @table-border-color;\n  }\n\n  // Nesting\n  .table {\n    background-color: @body-bg;\n  }\n}\n\n\n// Condensed table w/ half padding\n\n.table-condensed {\n  > thead,\n  > tbody,\n  > tfoot {\n    > tr {\n      > th,\n      > td {\n        padding: @table-condensed-cell-padding;\n      }\n    }\n  }\n}\n\n\n// Bordered version\n//\n// Add borders all around the table and between all the columns.\n\n.table-bordered {\n  border: 1px solid @table-border-color;\n  > thead,\n  > tbody,\n  > tfoot {\n    > tr {\n      > th,\n      > td {\n        border: 1px solid @table-border-color;\n      }\n    }\n  }\n  > thead > tr {\n    > th,\n    > td {\n      border-bottom-width: 2px;\n    }\n  }\n}\n\n\n// Zebra-striping\n//\n// Default zebra-stripe styles (alternating gray and transparent backgrounds)\n\n.table-striped {\n  > tbody > tr:nth-of-type(odd) {\n    background-color: @table-bg-accent;\n  }\n}\n\n\n// Hover effect\n//\n// Placed here since it has to come after the potential zebra striping\n\n.table-hover {\n  > tbody > tr:hover {\n    background-color: @table-bg-hover;\n  }\n}\n\n\n// Table cell sizing\n//\n// Reset default table behavior\n\ntable col[class*=\"col-\"] {\n  position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n  float: none;\n  display: table-column;\n}\ntable {\n  td,\n  th {\n    &[class*=\"col-\"] {\n      position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n      float: none;\n      display: table-cell;\n    }\n  }\n}\n\n\n// Table backgrounds\n//\n// Exact selectors below required to override `.table-striped` and prevent\n// inheritance to nested tables.\n\n// Generate the contextual variants\n.table-row-variant(active; @table-bg-active);\n.table-row-variant(success; @state-success-bg);\n.table-row-variant(info; @state-info-bg);\n.table-row-variant(warning; @state-warning-bg);\n.table-row-variant(danger; @state-danger-bg);\n\n\n// Responsive tables\n//\n// Wrap your tables in `.table-responsive` and we'll make them mobile friendly\n// by enabling horizontal scrolling. Only applies <768px. Everything above that\n// will display normally.\n\n.table-responsive {\n  overflow-x: auto;\n  min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)\n\n  @media screen and (max-width: @screen-xs-max) {\n    width: 100%;\n    margin-bottom: (@line-height-computed * 0.75);\n    overflow-y: hidden;\n    -ms-overflow-style: -ms-autohiding-scrollbar;\n    border: 1px solid @table-border-color;\n\n    // Tighten up spacing\n    > .table {\n      margin-bottom: 0;\n\n      // Ensure the content doesn't wrap\n      > thead,\n      > tbody,\n      > tfoot {\n        > tr {\n          > th,\n          > td {\n            white-space: nowrap;\n          }\n        }\n      }\n    }\n\n    // Special overrides for the bordered tables\n    > .table-bordered {\n      border: 0;\n\n      // Nuke the appropriate borders so that the parent can handle them\n      > thead,\n      > tbody,\n      > tfoot {\n        > tr {\n          > th:first-child,\n          > td:first-child {\n            border-left: 0;\n          }\n          > th:last-child,\n          > td:last-child {\n            border-right: 0;\n          }\n        }\n      }\n\n      // Only nuke the last row's bottom-border in `tbody` and `tfoot` since\n      // chances are there will be only one `tr` in a `thead` and that would\n      // remove the border altogether.\n      > tbody,\n      > tfoot {\n        > tr:last-child {\n          > th,\n          > td {\n            border-bottom: 0;\n          }\n        }\n      }\n\n    }\n  }\n}\n","// Tables\n\n.table-row-variant(@state; @background) {\n  // Exact selectors below required to override `.table-striped` and prevent\n  // inheritance to nested tables.\n  .table > thead > tr,\n  .table > tbody > tr,\n  .table > tfoot > tr {\n    > td.@{state},\n    > th.@{state},\n    &.@{state} > td,\n    &.@{state} > th {\n      background-color: @background;\n    }\n  }\n\n  // Hover states for `.table-hover`\n  // Note: this is not available for cells or rows within `thead` or `tfoot`.\n  .table-hover > tbody > tr {\n    > td.@{state}:hover,\n    > th.@{state}:hover,\n    &.@{state}:hover > td,\n    &:hover > .@{state},\n    &.@{state}:hover > th {\n      background-color: darken(@background, 5%);\n    }\n  }\n}\n","//\n// Forms\n// --------------------------------------------------\n\n\n// Normalize non-controls\n//\n// Restyle and baseline non-control form elements.\n\nfieldset {\n  padding: 0;\n  margin: 0;\n  border: 0;\n  // Chrome and Firefox set a `min-width: min-content;` on fieldsets,\n  // so we reset that to ensure it behaves more like a standard block element.\n  // See https://github.com/twbs/bootstrap/issues/12359.\n  min-width: 0;\n}\n\nlegend {\n  display: block;\n  width: 100%;\n  padding: 0;\n  margin-bottom: @line-height-computed;\n  font-size: (@font-size-base * 1.5);\n  line-height: inherit;\n  color: @legend-color;\n  border: 0;\n  border-bottom: 1px solid @legend-border-color;\n}\n\nlabel {\n  display: inline-block;\n  max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)\n  margin-bottom: 5px;\n  font-weight: bold;\n}\n\n\n// Normalize form controls\n//\n// While most of our form styles require extra classes, some basic normalization\n// is required to ensure optimum display with or without those classes to better\n// address browser inconsistencies.\n\n// Override content-box in Normalize (* isn't specific enough)\ninput[type=\"search\"] {\n  .box-sizing(border-box);\n}\n\n// Position radios and checkboxes better\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n  margin: 4px 0 0;\n  margin-top: 1px \\9; // IE8-9\n  line-height: normal;\n}\n\ninput[type=\"file\"] {\n  display: block;\n}\n\n// Make range inputs behave like textual form controls\ninput[type=\"range\"] {\n  display: block;\n  width: 100%;\n}\n\n// Make multiple select elements height not fixed\nselect[multiple],\nselect[size] {\n  height: auto;\n}\n\n// Focus for file, radio, and checkbox\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n  .tab-focus();\n}\n\n// Adjust output element\noutput {\n  display: block;\n  padding-top: (@padding-base-vertical + 1);\n  font-size: @font-size-base;\n  line-height: @line-height-base;\n  color: @input-color;\n}\n\n\n// Common form controls\n//\n// Shared size and type resets for form controls. Apply `.form-control` to any\n// of the following form controls:\n//\n// select\n// textarea\n// input[type=\"text\"]\n// input[type=\"password\"]\n// input[type=\"datetime\"]\n// input[type=\"datetime-local\"]\n// input[type=\"date\"]\n// input[type=\"month\"]\n// input[type=\"time\"]\n// input[type=\"week\"]\n// input[type=\"number\"]\n// input[type=\"email\"]\n// input[type=\"url\"]\n// input[type=\"search\"]\n// input[type=\"tel\"]\n// input[type=\"color\"]\n\n.form-control {\n  display: block;\n  width: 100%;\n  height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)\n  padding: @padding-base-vertical @padding-base-horizontal;\n  font-size: @font-size-base;\n  line-height: @line-height-base;\n  color: @input-color;\n  background-color: @input-bg;\n  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n  border: 1px solid @input-border;\n  border-radius: @input-border-radius; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.\n  .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));\n  .transition(~\"border-color ease-in-out .15s, box-shadow ease-in-out .15s\");\n\n  // Customize the `:focus` state to imitate native WebKit styles.\n  .form-control-focus();\n\n  // Placeholder\n  .placeholder();\n\n  // Unstyle the caret on `<select>`s in IE10+.\n  &::-ms-expand {\n    border: 0;\n    background-color: transparent;\n  }\n\n  // Disabled and read-only inputs\n  //\n  // HTML5 says that controls under a fieldset > legend:first-child won't be\n  // disabled if the fieldset is disabled. Due to implementation difficulty, we\n  // don't honor that edge case; we style them as disabled anyway.\n  &[disabled],\n  &[readonly],\n  fieldset[disabled] & {\n    background-color: @input-bg-disabled;\n    opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655\n  }\n\n  &[disabled],\n  fieldset[disabled] & {\n    cursor: @cursor-disabled;\n  }\n\n  // Reset height for `textarea`s\n  textarea& {\n    height: auto;\n  }\n}\n\n\n// Search inputs in iOS\n//\n// This overrides the extra rounded corners on search inputs in iOS so that our\n// `.form-control` class can properly style them. Note that this cannot simply\n// be added to `.form-control` as it's not specific enough. For details, see\n// https://github.com/twbs/bootstrap/issues/11586.\n\ninput[type=\"search\"] {\n  -webkit-appearance: none;\n}\n\n\n// Special styles for iOS temporal inputs\n//\n// In Mobile Safari, setting `display: block` on temporal inputs causes the\n// text within the input to become vertically misaligned. As a workaround, we\n// set a pixel line-height that matches the given height of the input, but only\n// for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848\n//\n// Note that as of 9.3, iOS doesn't support `week`.\n\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n  input[type=\"date\"],\n  input[type=\"time\"],\n  input[type=\"datetime-local\"],\n  input[type=\"month\"] {\n    &.form-control {\n      line-height: @input-height-base;\n    }\n\n    &.input-sm,\n    .input-group-sm & {\n      line-height: @input-height-small;\n    }\n\n    &.input-lg,\n    .input-group-lg & {\n      line-height: @input-height-large;\n    }\n  }\n}\n\n\n// Form groups\n//\n// Designed to help with the organization and spacing of vertical forms. For\n// horizontal forms, use the predefined grid classes.\n\n.form-group {\n  margin-bottom: @form-group-margin-bottom;\n}\n\n\n// Checkboxes and radios\n//\n// Indent the labels to position radios/checkboxes as hanging controls.\n\n.radio,\n.checkbox {\n  position: relative;\n  display: block;\n  margin-top: 10px;\n  margin-bottom: 10px;\n\n  label {\n    min-height: @line-height-computed; // Ensure the input doesn't jump when there is no text\n    padding-left: 20px;\n    margin-bottom: 0;\n    font-weight: normal;\n    cursor: pointer;\n  }\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n  position: absolute;\n  margin-left: -20px;\n  margin-top: 4px \\9;\n}\n\n.radio + .radio,\n.checkbox + .checkbox {\n  margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing\n}\n\n// Radios and checkboxes on same line\n.radio-inline,\n.checkbox-inline {\n  position: relative;\n  display: inline-block;\n  padding-left: 20px;\n  margin-bottom: 0;\n  vertical-align: middle;\n  font-weight: normal;\n  cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n  margin-top: 0;\n  margin-left: 10px; // space out consecutive inline controls\n}\n\n// Apply same disabled cursor tweak as for inputs\n// Some special care is needed because <label>s don't inherit their parent's `cursor`.\n//\n// Note: Neither radios nor checkboxes can be readonly.\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n  &[disabled],\n  &.disabled,\n  fieldset[disabled] & {\n    cursor: @cursor-disabled;\n  }\n}\n// These classes are used directly on <label>s\n.radio-inline,\n.checkbox-inline {\n  &.disabled,\n  fieldset[disabled] & {\n    cursor: @cursor-disabled;\n  }\n}\n// These classes are used on elements with <label> descendants\n.radio,\n.checkbox {\n  &.disabled,\n  fieldset[disabled] & {\n    label {\n      cursor: @cursor-disabled;\n    }\n  }\n}\n\n\n// Static form control text\n//\n// Apply class to a `p` element to make any string of text align with labels in\n// a horizontal form layout.\n\n.form-control-static {\n  // Size it appropriately next to real form controls\n  padding-top: (@padding-base-vertical + 1);\n  padding-bottom: (@padding-base-vertical + 1);\n  // Remove default margin from `p`\n  margin-bottom: 0;\n  min-height: (@line-height-computed + @font-size-base);\n\n  &.input-lg,\n  &.input-sm {\n    padding-left: 0;\n    padding-right: 0;\n  }\n}\n\n\n// Form control sizing\n//\n// Build on `.form-control` with modifier classes to decrease or increase the\n// height and font-size of form controls.\n//\n// The `.form-group-* form-control` variations are sadly duplicated to avoid the\n// issue documented in https://github.com/twbs/bootstrap/issues/15074.\n\n.input-sm {\n  .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);\n}\n.form-group-sm {\n  .form-control {\n    height: @input-height-small;\n    padding: @padding-small-vertical @padding-small-horizontal;\n    font-size: @font-size-small;\n    line-height: @line-height-small;\n    border-radius: @input-border-radius-small;\n  }\n  select.form-control {\n    height: @input-height-small;\n    line-height: @input-height-small;\n  }\n  textarea.form-control,\n  select[multiple].form-control {\n    height: auto;\n  }\n  .form-control-static {\n    height: @input-height-small;\n    min-height: (@line-height-computed + @font-size-small);\n    padding: (@padding-small-vertical + 1) @padding-small-horizontal;\n    font-size: @font-size-small;\n    line-height: @line-height-small;\n  }\n}\n\n.input-lg {\n  .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);\n}\n.form-group-lg {\n  .form-control {\n    height: @input-height-large;\n    padding: @padding-large-vertical @padding-large-horizontal;\n    font-size: @font-size-large;\n    line-height: @line-height-large;\n    border-radius: @input-border-radius-large;\n  }\n  select.form-control {\n    height: @input-height-large;\n    line-height: @input-height-large;\n  }\n  textarea.form-control,\n  select[multiple].form-control {\n    height: auto;\n  }\n  .form-control-static {\n    height: @input-height-large;\n    min-height: (@line-height-computed + @font-size-large);\n    padding: (@padding-large-vertical + 1) @padding-large-horizontal;\n    font-size: @font-size-large;\n    line-height: @line-height-large;\n  }\n}\n\n\n// Form control feedback states\n//\n// Apply contextual and semantic states to individual form controls.\n\n.has-feedback {\n  // Enable absolute positioning\n  position: relative;\n\n  // Ensure icons don't overlap text\n  .form-control {\n    padding-right: (@input-height-base * 1.25);\n  }\n}\n// Feedback icon (requires .glyphicon classes)\n.form-control-feedback {\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: 2; // Ensure icon is above input groups\n  display: block;\n  width: @input-height-base;\n  height: @input-height-base;\n  line-height: @input-height-base;\n  text-align: center;\n  pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n  width: @input-height-large;\n  height: @input-height-large;\n  line-height: @input-height-large;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n  width: @input-height-small;\n  height: @input-height-small;\n  line-height: @input-height-small;\n}\n\n// Feedback states\n.has-success {\n  .form-control-validation(@state-success-text; @state-success-text; @state-success-bg);\n}\n.has-warning {\n  .form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg);\n}\n.has-error {\n  .form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg);\n}\n\n// Reposition feedback icon if input has visible label above\n.has-feedback label {\n\n  & ~ .form-control-feedback {\n    top: (@line-height-computed + 5); // Height of the `label` and its margin\n  }\n  &.sr-only ~ .form-control-feedback {\n    top: 0;\n  }\n}\n\n\n// Help text\n//\n// Apply to any element you wish to create light text for placement immediately\n// below a form control. Use for general help, formatting, or instructional text.\n\n.help-block {\n  display: block; // account for any element using help-block\n  margin-top: 5px;\n  margin-bottom: 10px;\n  color: lighten(@text-color, 25%); // lighten the text some for contrast\n}\n\n\n// Inline forms\n//\n// Make forms appear inline(-block) by adding the `.form-inline` class. Inline\n// forms begin stacked on extra small (mobile) devices and then go inline when\n// viewports reach <768px.\n//\n// Requires wrapping inputs and labels with `.form-group` for proper display of\n// default HTML form controls and our custom form controls (e.g., input groups).\n//\n// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.\n\n.form-inline {\n\n  // Kick in the inline\n  @media (min-width: @screen-sm-min) {\n    // Inline-block all the things for \"inline\"\n    .form-group {\n      display: inline-block;\n      margin-bottom: 0;\n      vertical-align: middle;\n    }\n\n    // In navbar-form, allow folks to *not* use `.form-group`\n    .form-control {\n      display: inline-block;\n      width: auto; // Prevent labels from stacking above inputs in `.form-group`\n      vertical-align: middle;\n    }\n\n    // Make static controls behave like regular ones\n    .form-control-static {\n      display: inline-block;\n    }\n\n    .input-group {\n      display: inline-table;\n      vertical-align: middle;\n\n      .input-group-addon,\n      .input-group-btn,\n      .form-control {\n        width: auto;\n      }\n    }\n\n    // Input groups need that 100% width though\n    .input-group > .form-control {\n      width: 100%;\n    }\n\n    .control-label {\n      margin-bottom: 0;\n      vertical-align: middle;\n    }\n\n    // Remove default margin on radios/checkboxes that were used for stacking, and\n    // then undo the floating of radios and checkboxes to match.\n    .radio,\n    .checkbox {\n      display: inline-block;\n      margin-top: 0;\n      margin-bottom: 0;\n      vertical-align: middle;\n\n      label {\n        padding-left: 0;\n      }\n    }\n    .radio input[type=\"radio\"],\n    .checkbox input[type=\"checkbox\"] {\n      position: relative;\n      margin-left: 0;\n    }\n\n    // Re-override the feedback icon.\n    .has-feedback .form-control-feedback {\n      top: 0;\n    }\n  }\n}\n\n\n// Horizontal forms\n//\n// Horizontal forms are built on grid classes and allow you to create forms with\n// labels on the left and inputs on the right.\n\n.form-horizontal {\n\n  // Consistent vertical alignment of radios and checkboxes\n  //\n  // Labels also get some reset styles, but that is scoped to a media query below.\n  .radio,\n  .checkbox,\n  .radio-inline,\n  .checkbox-inline {\n    margin-top: 0;\n    margin-bottom: 0;\n    padding-top: (@padding-base-vertical + 1); // Default padding plus a border\n  }\n  // Account for padding we're adding to ensure the alignment and of help text\n  // and other content below items\n  .radio,\n  .checkbox {\n    min-height: (@line-height-computed + (@padding-base-vertical + 1));\n  }\n\n  // Make form groups behave like rows\n  .form-group {\n    .make-row();\n  }\n\n  // Reset spacing and right align labels, but scope to media queries so that\n  // labels on narrow viewports stack the same as a default form example.\n  @media (min-width: @screen-sm-min) {\n    .control-label {\n      text-align: right;\n      margin-bottom: 0;\n      padding-top: (@padding-base-vertical + 1); // Default padding plus a border\n    }\n  }\n\n  // Validation states\n  //\n  // Reposition the icon because it's now within a grid column and columns have\n  // `position: relative;` on them. Also accounts for the grid gutter padding.\n  .has-feedback .form-control-feedback {\n    right: floor((@grid-gutter-width / 2));\n  }\n\n  // Form group sizes\n  //\n  // Quick utility class for applying `.input-lg` and `.input-sm` styles to the\n  // inputs and labels within a `.form-group`.\n  .form-group-lg {\n    @media (min-width: @screen-sm-min) {\n      .control-label {\n        padding-top: (@padding-large-vertical + 1);\n        font-size: @font-size-large;\n      }\n    }\n  }\n  .form-group-sm {\n    @media (min-width: @screen-sm-min) {\n      .control-label {\n        padding-top: (@padding-small-vertical + 1);\n        font-size: @font-size-small;\n      }\n    }\n  }\n}\n","// Form validation states\n//\n// Used in forms.less to generate the form validation CSS for warnings, errors,\n// and successes.\n\n.form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {\n  // Color the label and help text\n  .help-block,\n  .control-label,\n  .radio,\n  .checkbox,\n  .radio-inline,\n  .checkbox-inline,\n  &.radio label,\n  &.checkbox label,\n  &.radio-inline label,\n  &.checkbox-inline label  {\n    color: @text-color;\n  }\n  // Set the border and box shadow on specific inputs to match\n  .form-control {\n    border-color: @border-color;\n    .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work\n    &:focus {\n      border-color: darken(@border-color, 10%);\n      @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);\n      .box-shadow(@shadow);\n    }\n  }\n  // Set validation states also for addons\n  .input-group-addon {\n    color: @text-color;\n    border-color: @border-color;\n    background-color: @background-color;\n  }\n  // Optional feedback icon\n  .form-control-feedback {\n    color: @text-color;\n  }\n}\n\n\n// Form control focus state\n//\n// Generate a customized focus state and for any input with the specified color,\n// which defaults to the `@input-border-focus` variable.\n//\n// We highly encourage you to not customize the default value, but instead use\n// this to tweak colors on an as-needed basis. This aesthetic change is based on\n// WebKit's default styles, but applicable to a wider range of browsers. Its\n// usability and accessibility should be taken into account with any change.\n//\n// Example usage: change the default blue border and shadow to white for better\n// contrast against a dark gray background.\n.form-control-focus(@color: @input-border-focus) {\n  @color-rgba: rgba(red(@color), green(@color), blue(@color), .6);\n  &:focus {\n    border-color: @color;\n    outline: 0;\n    .box-shadow(~\"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}\");\n  }\n}\n\n// Form control sizing\n//\n// Relative text size, padding, and border-radii changes for form controls. For\n// horizontal sizing, wrap controls in the predefined grid classes. `<select>`\n// element gets special love because it's special, and that's a fact!\n.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n  height: @input-height;\n  padding: @padding-vertical @padding-horizontal;\n  font-size: @font-size;\n  line-height: @line-height;\n  border-radius: @border-radius;\n\n  select& {\n    height: @input-height;\n    line-height: @input-height;\n  }\n\n  textarea&,\n  select[multiple]& {\n    height: auto;\n  }\n}\n","//\n// Buttons\n// --------------------------------------------------\n\n\n// Base styles\n// --------------------------------------------------\n\n.btn {\n  display: inline-block;\n  margin-bottom: 0; // For input.btn\n  font-weight: @btn-font-weight;\n  text-align: center;\n  vertical-align: middle;\n  touch-action: manipulation;\n  cursor: pointer;\n  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n  border: 1px solid transparent;\n  white-space: nowrap;\n  .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @btn-border-radius-base);\n  .user-select(none);\n\n  &,\n  &:active,\n  &.active {\n    &:focus,\n    &.focus {\n      .tab-focus();\n    }\n  }\n\n  &:hover,\n  &:focus,\n  &.focus {\n    color: @btn-default-color;\n    text-decoration: none;\n  }\n\n  &:active,\n  &.active {\n    outline: 0;\n    background-image: none;\n    .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n  }\n\n  &.disabled,\n  &[disabled],\n  fieldset[disabled] & {\n    cursor: @cursor-disabled;\n    .opacity(.65);\n    .box-shadow(none);\n  }\n\n  a& {\n    &.disabled,\n    fieldset[disabled] & {\n      pointer-events: none; // Future-proof disabling of clicks on `<a>` elements\n    }\n  }\n}\n\n\n// Alternate buttons\n// --------------------------------------------------\n\n.btn-default {\n  .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);\n}\n.btn-primary {\n  .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);\n}\n// Success appears as green\n.btn-success {\n  .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);\n}\n// Info appears as blue-green\n.btn-info {\n  .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);\n}\n// Warning appears as orange\n.btn-warning {\n  .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);\n}\n// Danger and error appear as red\n.btn-danger {\n  .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);\n}\n\n\n// Link buttons\n// -------------------------\n\n// Make a button look and behave like a link\n.btn-link {\n  color: @link-color;\n  font-weight: normal;\n  border-radius: 0;\n\n  &,\n  &:active,\n  &.active,\n  &[disabled],\n  fieldset[disabled] & {\n    background-color: transparent;\n    .box-shadow(none);\n  }\n  &,\n  &:hover,\n  &:focus,\n  &:active {\n    border-color: transparent;\n  }\n  &:hover,\n  &:focus {\n    color: @link-hover-color;\n    text-decoration: @link-hover-decoration;\n    background-color: transparent;\n  }\n  &[disabled],\n  fieldset[disabled] & {\n    &:hover,\n    &:focus {\n      color: @btn-link-disabled-color;\n      text-decoration: none;\n    }\n  }\n}\n\n\n// Button Sizes\n// --------------------------------------------------\n\n.btn-lg {\n  // line-height: ensure even-numbered height of button next to large input\n  .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @btn-border-radius-large);\n}\n.btn-sm {\n  // line-height: ensure proper height of button next to small input\n  .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);\n}\n.btn-xs {\n  .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);\n}\n\n\n// Block button\n// --------------------------------------------------\n\n.btn-block {\n  display: block;\n  width: 100%;\n}\n\n// Vertically space out multiple block buttons\n.btn-block + .btn-block {\n  margin-top: 5px;\n}\n\n// Specificity overrides\ninput[type=\"submit\"],\ninput[type=\"reset\"],\ninput[type=\"button\"] {\n  &.btn-block {\n    width: 100%;\n  }\n}\n","// Button variants\n//\n// Easily pump out default styles, as well as :hover, :focus, :active,\n// and disabled options for all buttons\n\n.button-variant(@color; @background; @border) {\n  color: @color;\n  background-color: @background;\n  border-color: @border;\n\n  &:focus,\n  &.focus {\n    color: @color;\n    background-color: darken(@background, 10%);\n        border-color: darken(@border, 25%);\n  }\n  &:hover {\n    color: @color;\n    background-color: darken(@background, 10%);\n        border-color: darken(@border, 12%);\n  }\n  &:active,\n  &.active,\n  .open > .dropdown-toggle& {\n    color: @color;\n    background-color: darken(@background, 10%);\n        border-color: darken(@border, 12%);\n\n    &:hover,\n    &:focus,\n    &.focus {\n      color: @color;\n      background-color: darken(@background, 17%);\n          border-color: darken(@border, 25%);\n    }\n  }\n  &:active,\n  &.active,\n  .open > .dropdown-toggle& {\n    background-image: none;\n  }\n  &.disabled,\n  &[disabled],\n  fieldset[disabled] & {\n    &:hover,\n    &:focus,\n    &.focus {\n      background-color: @background;\n          border-color: @border;\n    }\n  }\n\n  .badge {\n    color: @background;\n    background-color: @color;\n  }\n}\n\n// Button sizes\n.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n  padding: @padding-vertical @padding-horizontal;\n  font-size: @font-size;\n  line-height: @line-height;\n  border-radius: @border-radius;\n}\n","// Opacity\n\n.opacity(@opacity) {\n  opacity: @opacity;\n  // IE8 filter\n  @opacity-ie: (@opacity * 100);\n  filter: ~\"alpha(opacity=@{opacity-ie})\";\n}\n","//\n// Component animations\n// --------------------------------------------------\n\n// Heads up!\n//\n// We don't use the `.opacity()` mixin here since it causes a bug with text\n// fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.\n\n.fade {\n  opacity: 0;\n  .transition(opacity .15s linear);\n  &.in {\n    opacity: 1;\n  }\n}\n\n.collapse {\n  display: none;\n\n  &.in      { display: block; }\n  tr&.in    { display: table-row; }\n  tbody&.in { display: table-row-group; }\n}\n\n.collapsing {\n  position: relative;\n  height: 0;\n  overflow: hidden;\n  .transition-property(~\"height, visibility\");\n  .transition-duration(.35s);\n  .transition-timing-function(ease);\n}\n","//\n// Dropdown menus\n// --------------------------------------------------\n\n\n// Dropdown arrow/caret\n.caret {\n  display: inline-block;\n  width: 0;\n  height: 0;\n  margin-left: 2px;\n  vertical-align: middle;\n  border-top:   @caret-width-base dashed;\n  border-top:   @caret-width-base solid ~\"\\9\"; // IE8\n  border-right: @caret-width-base solid transparent;\n  border-left:  @caret-width-base solid transparent;\n}\n\n// The dropdown wrapper (div)\n.dropup,\n.dropdown {\n  position: relative;\n}\n\n// Prevent the focus on the dropdown toggle when closing dropdowns\n.dropdown-toggle:focus {\n  outline: 0;\n}\n\n// The dropdown menu (ul)\n.dropdown-menu {\n  position: absolute;\n  top: 100%;\n  left: 0;\n  z-index: @zindex-dropdown;\n  display: none; // none by default, but block on \"open\" of the menu\n  float: left;\n  min-width: 160px;\n  padding: 5px 0;\n  margin: 2px 0 0; // override default ul\n  list-style: none;\n  font-size: @font-size-base;\n  text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)\n  background-color: @dropdown-bg;\n  border: 1px solid @dropdown-fallback-border; // IE8 fallback\n  border: 1px solid @dropdown-border;\n  border-radius: @border-radius-base;\n  .box-shadow(0 6px 12px rgba(0,0,0,.175));\n  background-clip: padding-box;\n\n  // Aligns the dropdown menu to right\n  //\n  // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`\n  &.pull-right {\n    right: 0;\n    left: auto;\n  }\n\n  // Dividers (basically an hr) within the dropdown\n  .divider {\n    .nav-divider(@dropdown-divider-bg);\n  }\n\n  // Links within the dropdown menu\n  > li > a {\n    display: block;\n    padding: 3px 20px;\n    clear: both;\n    font-weight: normal;\n    line-height: @line-height-base;\n    color: @dropdown-link-color;\n    white-space: nowrap; // prevent links from randomly breaking onto new lines\n  }\n}\n\n// Hover/Focus state\n.dropdown-menu > li > a {\n  &:hover,\n  &:focus {\n    text-decoration: none;\n    color: @dropdown-link-hover-color;\n    background-color: @dropdown-link-hover-bg;\n  }\n}\n\n// Active state\n.dropdown-menu > .active > a {\n  &,\n  &:hover,\n  &:focus {\n    color: @dropdown-link-active-color;\n    text-decoration: none;\n    outline: 0;\n    background-color: @dropdown-link-active-bg;\n  }\n}\n\n// Disabled state\n//\n// Gray out text and ensure the hover/focus state remains gray\n\n.dropdown-menu > .disabled > a {\n  &,\n  &:hover,\n  &:focus {\n    color: @dropdown-link-disabled-color;\n  }\n\n  // Nuke hover/focus effects\n  &:hover,\n  &:focus {\n    text-decoration: none;\n    background-color: transparent;\n    background-image: none; // Remove CSS gradient\n    .reset-filter();\n    cursor: @cursor-disabled;\n  }\n}\n\n// Open state for the dropdown\n.open {\n  // Show the menu\n  > .dropdown-menu {\n    display: block;\n  }\n\n  // Remove the outline when :focus is triggered\n  > a {\n    outline: 0;\n  }\n}\n\n// Menu positioning\n//\n// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown\n// menu with the parent.\n.dropdown-menu-right {\n  left: auto; // Reset the default from `.dropdown-menu`\n  right: 0;\n}\n// With v3, we enabled auto-flipping if you have a dropdown within a right\n// aligned nav component. To enable the undoing of that, we provide an override\n// to restore the default dropdown menu alignment.\n//\n// This is only for left-aligning a dropdown menu within a `.navbar-right` or\n// `.pull-right` nav component.\n.dropdown-menu-left {\n  left: 0;\n  right: auto;\n}\n\n// Dropdown section headers\n.dropdown-header {\n  display: block;\n  padding: 3px 20px;\n  font-size: @font-size-small;\n  line-height: @line-height-base;\n  color: @dropdown-header-color;\n  white-space: nowrap; // as with > li > a\n}\n\n// Backdrop to catch body clicks on mobile, etc.\n.dropdown-backdrop {\n  position: fixed;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  top: 0;\n  z-index: (@zindex-dropdown - 10);\n}\n\n// Right aligned dropdowns\n.pull-right > .dropdown-menu {\n  right: 0;\n  left: auto;\n}\n\n// Allow for dropdowns to go bottom up (aka, dropup-menu)\n//\n// Just add .dropup after the standard .dropdown class and you're set, bro.\n// TODO: abstract this so that the navbar fixed styles are not placed here?\n\n.dropup,\n.navbar-fixed-bottom .dropdown {\n  // Reverse the caret\n  .caret {\n    border-top: 0;\n    border-bottom: @caret-width-base dashed;\n    border-bottom: @caret-width-base solid ~\"\\9\"; // IE8\n    content: \"\";\n  }\n  // Different positioning for bottom up menu\n  .dropdown-menu {\n    top: auto;\n    bottom: 100%;\n    margin-bottom: 2px;\n  }\n}\n\n\n// Component alignment\n//\n// Reiterate per navbar.less and the modified component alignment there.\n\n@media (min-width: @grid-float-breakpoint) {\n  .navbar-right {\n    .dropdown-menu {\n      .dropdown-menu-right();\n    }\n    // Necessary for overrides of the default right aligned menu.\n    // Will remove come v4 in all likelihood.\n    .dropdown-menu-left {\n      .dropdown-menu-left();\n    }\n  }\n}\n","// Horizontal dividers\n//\n// Dividers (basically an hr) within dropdowns and nav lists\n\n.nav-divider(@color: #e5e5e5) {\n  height: 1px;\n  margin: ((@line-height-computed / 2) - 1) 0;\n  overflow: hidden;\n  background-color: @color;\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n  filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n","//\n// Button groups\n// --------------------------------------------------\n\n// Make the div behave like a button\n.btn-group,\n.btn-group-vertical {\n  position: relative;\n  display: inline-block;\n  vertical-align: middle; // match .btn alignment given font-size hack above\n  > .btn {\n    position: relative;\n    float: left;\n    // Bring the \"active\" button to the front\n    &:hover,\n    &:focus,\n    &:active,\n    &.active {\n      z-index: 2;\n    }\n  }\n}\n\n// Prevent double borders when buttons are next to each other\n.btn-group {\n  .btn + .btn,\n  .btn + .btn-group,\n  .btn-group + .btn,\n  .btn-group + .btn-group {\n    margin-left: -1px;\n  }\n}\n\n// Optional: Group multiple button groups together for a toolbar\n.btn-toolbar {\n  margin-left: -5px; // Offset the first child's margin\n  &:extend(.clearfix all);\n\n  .btn,\n  .btn-group,\n  .input-group {\n    float: left;\n  }\n  > .btn,\n  > .btn-group,\n  > .input-group {\n    margin-left: 5px;\n  }\n}\n\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n  border-radius: 0;\n}\n\n// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match\n.btn-group > .btn:first-child {\n  margin-left: 0;\n  &:not(:last-child):not(.dropdown-toggle) {\n    .border-right-radius(0);\n  }\n}\n// Need .dropdown-toggle since :last-child doesn't apply, given that a .dropdown-menu is used immediately after it\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n  .border-left-radius(0);\n}\n\n// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)\n.btn-group > .btn-group {\n  float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) {\n  > .btn:last-child,\n  > .dropdown-toggle {\n    .border-right-radius(0);\n  }\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  .border-left-radius(0);\n}\n\n// On active and open, don't show outline\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n  outline: 0;\n}\n\n\n// Sizing\n//\n// Remix the default button sizing classes into new ones for easier manipulation.\n\n.btn-group-xs > .btn { &:extend(.btn-xs); }\n.btn-group-sm > .btn { &:extend(.btn-sm); }\n.btn-group-lg > .btn { &:extend(.btn-lg); }\n\n\n// Split button dropdowns\n// ----------------------\n\n// Give the line between buttons some depth\n.btn-group > .btn + .dropdown-toggle {\n  padding-left: 8px;\n  padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n  padding-left: 12px;\n  padding-right: 12px;\n}\n\n// The clickable button for toggling the menu\n// Remove the gradient and set the same inset shadow as the :active state\n.btn-group.open .dropdown-toggle {\n  .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n\n  // Show no shadow for `.btn-link` since it has no other button styles.\n  &.btn-link {\n    .box-shadow(none);\n  }\n}\n\n\n// Reposition the caret\n.btn .caret {\n  margin-left: 0;\n}\n// Carets in other button sizes\n.btn-lg .caret {\n  border-width: @caret-width-large @caret-width-large 0;\n  border-bottom-width: 0;\n}\n// Upside down carets for .dropup\n.dropup .btn-lg .caret {\n  border-width: 0 @caret-width-large @caret-width-large;\n}\n\n\n// Vertical button groups\n// ----------------------\n\n.btn-group-vertical {\n  > .btn,\n  > .btn-group,\n  > .btn-group > .btn {\n    display: block;\n    float: none;\n    width: 100%;\n    max-width: 100%;\n  }\n\n  // Clear floats so dropdown menus can be properly placed\n  > .btn-group {\n    &:extend(.clearfix all);\n    > .btn {\n      float: none;\n    }\n  }\n\n  > .btn + .btn,\n  > .btn + .btn-group,\n  > .btn-group + .btn,\n  > .btn-group + .btn-group {\n    margin-top: -1px;\n    margin-left: 0;\n  }\n}\n\n.btn-group-vertical > .btn {\n  &:not(:first-child):not(:last-child) {\n    border-radius: 0;\n  }\n  &:first-child:not(:last-child) {\n    .border-top-radius(@btn-border-radius-base);\n    .border-bottom-radius(0);\n  }\n  &:last-child:not(:first-child) {\n    .border-top-radius(0);\n    .border-bottom-radius(@btn-border-radius-base);\n  }\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) {\n  > .btn:last-child,\n  > .dropdown-toggle {\n    .border-bottom-radius(0);\n  }\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  .border-top-radius(0);\n}\n\n\n// Justified button groups\n// ----------------------\n\n.btn-group-justified {\n  display: table;\n  width: 100%;\n  table-layout: fixed;\n  border-collapse: separate;\n  > .btn,\n  > .btn-group {\n    float: none;\n    display: table-cell;\n    width: 1%;\n  }\n  > .btn-group .btn {\n    width: 100%;\n  }\n\n  > .btn-group .dropdown-menu {\n    left: auto;\n  }\n}\n\n\n// Checkbox and radio options\n//\n// In order to support the browser's form validation feedback, powered by the\n// `required` attribute, we have to \"hide\" the inputs via `clip`. We cannot use\n// `display: none;` or `visibility: hidden;` as that also hides the popover.\n// Simply visually hiding the inputs via `opacity` would leave them clickable in\n// certain cases which is prevented by using `clip` and `pointer-events`.\n// This way, we ensure a DOM element is visible to position the popover from.\n//\n// See https://github.com/twbs/bootstrap/pull/12794 and\n// https://github.com/twbs/bootstrap/pull/14559 for more information.\n\n[data-toggle=\"buttons\"] {\n  > .btn,\n  > .btn-group > .btn {\n    input[type=\"radio\"],\n    input[type=\"checkbox\"] {\n      position: absolute;\n      clip: rect(0,0,0,0);\n      pointer-events: none;\n    }\n  }\n}\n","// Single side border-radius\n\n.border-top-radius(@radius) {\n  border-top-right-radius: @radius;\n   border-top-left-radius: @radius;\n}\n.border-right-radius(@radius) {\n  border-bottom-right-radius: @radius;\n     border-top-right-radius: @radius;\n}\n.border-bottom-radius(@radius) {\n  border-bottom-right-radius: @radius;\n   border-bottom-left-radius: @radius;\n}\n.border-left-radius(@radius) {\n  border-bottom-left-radius: @radius;\n     border-top-left-radius: @radius;\n}\n","//\n// Input groups\n// --------------------------------------------------\n\n// Base styles\n// -------------------------\n.input-group {\n  position: relative; // For dropdowns\n  display: table;\n  border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table\n\n  // Undo padding and float of grid classes\n  &[class*=\"col-\"] {\n    float: none;\n    padding-left: 0;\n    padding-right: 0;\n  }\n\n  .form-control {\n    // Ensure that the input is always above the *appended* addon button for\n    // proper border colors.\n    position: relative;\n    z-index: 2;\n\n    // IE9 fubars the placeholder attribute in text inputs and the arrows on\n    // select elements in input groups. To fix it, we float the input. Details:\n    // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855\n    float: left;\n\n    width: 100%;\n    margin-bottom: 0;\n\n    &:focus {\n      z-index: 3;\n    }\n  }\n}\n\n// Sizing options\n//\n// Remix the default form control sizing classes into new ones for easier\n// manipulation.\n\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n  .input-lg();\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n  .input-sm();\n}\n\n\n// Display as table-cell\n// -------------------------\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n  display: table-cell;\n\n  &:not(:first-child):not(:last-child) {\n    border-radius: 0;\n  }\n}\n// Addon and addon wrapper for buttons\n.input-group-addon,\n.input-group-btn {\n  width: 1%;\n  white-space: nowrap;\n  vertical-align: middle; // Match the inputs\n}\n\n// Text input groups\n// -------------------------\n.input-group-addon {\n  padding: @padding-base-vertical @padding-base-horizontal;\n  font-size: @font-size-base;\n  font-weight: normal;\n  line-height: 1;\n  color: @input-color;\n  text-align: center;\n  background-color: @input-group-addon-bg;\n  border: 1px solid @input-group-addon-border-color;\n  border-radius: @input-border-radius;\n\n  // Sizing\n  &.input-sm {\n    padding: @padding-small-vertical @padding-small-horizontal;\n    font-size: @font-size-small;\n    border-radius: @input-border-radius-small;\n  }\n  &.input-lg {\n    padding: @padding-large-vertical @padding-large-horizontal;\n    font-size: @font-size-large;\n    border-radius: @input-border-radius-large;\n  }\n\n  // Nuke default margins from checkboxes and radios to vertically center within.\n  input[type=\"radio\"],\n  input[type=\"checkbox\"] {\n    margin-top: 0;\n  }\n}\n\n// Reset rounded corners\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n  .border-right-radius(0);\n}\n.input-group-addon:first-child {\n  border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n  .border-left-radius(0);\n}\n.input-group-addon:last-child {\n  border-left: 0;\n}\n\n// Button input groups\n// -------------------------\n.input-group-btn {\n  position: relative;\n  // Jankily prevent input button groups from wrapping with `white-space` and\n  // `font-size` in combination with `inline-block` on buttons.\n  font-size: 0;\n  white-space: nowrap;\n\n  // Negative margin for spacing, position for bringing hovered/focused/actived\n  // element above the siblings.\n  > .btn {\n    position: relative;\n    + .btn {\n      margin-left: -1px;\n    }\n    // Bring the \"active\" button to the front\n    &:hover,\n    &:focus,\n    &:active {\n      z-index: 2;\n    }\n  }\n\n  // Negative margin to only have a 1px border between the two\n  &:first-child {\n    > .btn,\n    > .btn-group {\n      margin-right: -1px;\n    }\n  }\n  &:last-child {\n    > .btn,\n    > .btn-group {\n      z-index: 2;\n      margin-left: -1px;\n    }\n  }\n}\n","//\n// Navs\n// --------------------------------------------------\n\n\n// Base class\n// --------------------------------------------------\n\n.nav {\n  margin-bottom: 0;\n  padding-left: 0; // Override default ul/ol\n  list-style: none;\n  &:extend(.clearfix all);\n\n  > li {\n    position: relative;\n    display: block;\n\n    > a {\n      position: relative;\n      display: block;\n      padding: @nav-link-padding;\n      &:hover,\n      &:focus {\n        text-decoration: none;\n        background-color: @nav-link-hover-bg;\n      }\n    }\n\n    // Disabled state sets text to gray and nukes hover/tab effects\n    &.disabled > a {\n      color: @nav-disabled-link-color;\n\n      &:hover,\n      &:focus {\n        color: @nav-disabled-link-hover-color;\n        text-decoration: none;\n        background-color: transparent;\n        cursor: @cursor-disabled;\n      }\n    }\n  }\n\n  // Open dropdowns\n  .open > a {\n    &,\n    &:hover,\n    &:focus {\n      background-color: @nav-link-hover-bg;\n      border-color: @link-color;\n    }\n  }\n\n  // Nav dividers (deprecated with v3.0.1)\n  //\n  // This should have been removed in v3 with the dropping of `.nav-list`, but\n  // we missed it. We don't currently support this anywhere, but in the interest\n  // of maintaining backward compatibility in case you use it, it's deprecated.\n  .nav-divider {\n    .nav-divider();\n  }\n\n  // Prevent IE8 from misplacing imgs\n  //\n  // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989\n  > li > a > img {\n    max-width: none;\n  }\n}\n\n\n// Tabs\n// -------------------------\n\n// Give the tabs something to sit on\n.nav-tabs {\n  border-bottom: 1px solid @nav-tabs-border-color;\n  > li {\n    float: left;\n    // Make the list-items overlay the bottom border\n    margin-bottom: -1px;\n\n    // Actual tabs (as links)\n    > a {\n      margin-right: 2px;\n      line-height: @line-height-base;\n      border: 1px solid transparent;\n      border-radius: @border-radius-base @border-radius-base 0 0;\n      &:hover {\n        border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;\n      }\n    }\n\n    // Active state, and its :hover to override normal :hover\n    &.active > a {\n      &,\n      &:hover,\n      &:focus {\n        color: @nav-tabs-active-link-hover-color;\n        background-color: @nav-tabs-active-link-hover-bg;\n        border: 1px solid @nav-tabs-active-link-hover-border-color;\n        border-bottom-color: transparent;\n        cursor: default;\n      }\n    }\n  }\n  // pulling this in mainly for less shorthand\n  &.nav-justified {\n    .nav-justified();\n    .nav-tabs-justified();\n  }\n}\n\n\n// Pills\n// -------------------------\n.nav-pills {\n  > li {\n    float: left;\n\n    // Links rendered as pills\n    > a {\n      border-radius: @nav-pills-border-radius;\n    }\n    + li {\n      margin-left: 2px;\n    }\n\n    // Active state\n    &.active > a {\n      &,\n      &:hover,\n      &:focus {\n        color: @nav-pills-active-link-hover-color;\n        background-color: @nav-pills-active-link-hover-bg;\n      }\n    }\n  }\n}\n\n\n// Stacked pills\n.nav-stacked {\n  > li {\n    float: none;\n    + li {\n      margin-top: 2px;\n      margin-left: 0; // no need for this gap between nav items\n    }\n  }\n}\n\n\n// Nav variations\n// --------------------------------------------------\n\n// Justified nav links\n// -------------------------\n\n.nav-justified {\n  width: 100%;\n\n  > li {\n    float: none;\n    > a {\n      text-align: center;\n      margin-bottom: 5px;\n    }\n  }\n\n  > .dropdown .dropdown-menu {\n    top: auto;\n    left: auto;\n  }\n\n  @media (min-width: @screen-sm-min) {\n    > li {\n      display: table-cell;\n      width: 1%;\n      > a {\n        margin-bottom: 0;\n      }\n    }\n  }\n}\n\n// Move borders to anchors instead of bottom of list\n//\n// Mixin for adding on top the shared `.nav-justified` styles for our tabs\n.nav-tabs-justified {\n  border-bottom: 0;\n\n  > li > a {\n    // Override margin from .nav-tabs\n    margin-right: 0;\n    border-radius: @border-radius-base;\n  }\n\n  > .active > a,\n  > .active > a:hover,\n  > .active > a:focus {\n    border: 1px solid @nav-tabs-justified-link-border-color;\n  }\n\n  @media (min-width: @screen-sm-min) {\n    > li > a {\n      border-bottom: 1px solid @nav-tabs-justified-link-border-color;\n      border-radius: @border-radius-base @border-radius-base 0 0;\n    }\n    > .active > a,\n    > .active > a:hover,\n    > .active > a:focus {\n      border-bottom-color: @nav-tabs-justified-active-link-border-color;\n    }\n  }\n}\n\n\n// Tabbable tabs\n// -------------------------\n\n// Hide tabbable panes to start, show them when `.active`\n.tab-content {\n  > .tab-pane {\n    display: none;\n  }\n  > .active {\n    display: block;\n  }\n}\n\n\n// Dropdowns\n// -------------------------\n\n// Specific dropdowns\n.nav-tabs .dropdown-menu {\n  // make dropdown border overlap tab border\n  margin-top: -1px;\n  // Remove the top rounded corners here since there is a hard edge above the menu\n  .border-top-radius(0);\n}\n","//\n// Navbars\n// --------------------------------------------------\n\n\n// Wrapper and base class\n//\n// Provide a static navbar from which we expand to create full-width, fixed, and\n// other navbar variations.\n\n.navbar {\n  position: relative;\n  min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)\n  margin-bottom: @navbar-margin-bottom;\n  border: 1px solid transparent;\n\n  // Prevent floats from breaking the navbar\n  &:extend(.clearfix all);\n\n  @media (min-width: @grid-float-breakpoint) {\n    border-radius: @navbar-border-radius;\n  }\n}\n\n\n// Navbar heading\n//\n// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy\n// styling of responsive aspects.\n\n.navbar-header {\n  &:extend(.clearfix all);\n\n  @media (min-width: @grid-float-breakpoint) {\n    float: left;\n  }\n}\n\n\n// Navbar collapse (body)\n//\n// Group your navbar content into this for easy collapsing and expanding across\n// various device sizes. By default, this content is collapsed when <768px, but\n// will expand past that for a horizontal display.\n//\n// To start (on mobile devices) the navbar links, forms, and buttons are stacked\n// vertically and include a `max-height` to overflow in case you have too much\n// content for the user's viewport.\n\n.navbar-collapse {\n  overflow-x: visible;\n  padding-right: @navbar-padding-horizontal;\n  padding-left:  @navbar-padding-horizontal;\n  border-top: 1px solid transparent;\n  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);\n  &:extend(.clearfix all);\n  -webkit-overflow-scrolling: touch;\n\n  &.in {\n    overflow-y: auto;\n  }\n\n  @media (min-width: @grid-float-breakpoint) {\n    width: auto;\n    border-top: 0;\n    box-shadow: none;\n\n    &.collapse {\n      display: block !important;\n      height: auto !important;\n      padding-bottom: 0; // Override default setting\n      overflow: visible !important;\n    }\n\n    &.in {\n      overflow-y: visible;\n    }\n\n    // Undo the collapse side padding for navbars with containers to ensure\n    // alignment of right-aligned contents.\n    .navbar-fixed-top &,\n    .navbar-static-top &,\n    .navbar-fixed-bottom & {\n      padding-left: 0;\n      padding-right: 0;\n    }\n  }\n}\n\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  .navbar-collapse {\n    max-height: @navbar-collapse-max-height;\n\n    @media (max-device-width: @screen-xs-min) and (orientation: landscape) {\n      max-height: 200px;\n    }\n  }\n}\n\n\n// Both navbar header and collapse\n//\n// When a container is present, change the behavior of the header and collapse.\n\n.container,\n.container-fluid {\n  > .navbar-header,\n  > .navbar-collapse {\n    margin-right: -@navbar-padding-horizontal;\n    margin-left:  -@navbar-padding-horizontal;\n\n    @media (min-width: @grid-float-breakpoint) {\n      margin-right: 0;\n      margin-left:  0;\n    }\n  }\n}\n\n\n//\n// Navbar alignment options\n//\n// Display the navbar across the entirety of the page or fixed it to the top or\n// bottom of the page.\n\n// Static top (unfixed, but 100% wide) navbar\n.navbar-static-top {\n  z-index: @zindex-navbar;\n  border-width: 0 0 1px;\n\n  @media (min-width: @grid-float-breakpoint) {\n    border-radius: 0;\n  }\n}\n\n// Fix the top/bottom navbars when screen real estate supports it\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  position: fixed;\n  right: 0;\n  left: 0;\n  z-index: @zindex-navbar-fixed;\n\n  // Undo the rounded corners\n  @media (min-width: @grid-float-breakpoint) {\n    border-radius: 0;\n  }\n}\n.navbar-fixed-top {\n  top: 0;\n  border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n  bottom: 0;\n  margin-bottom: 0; // override .navbar defaults\n  border-width: 1px 0 0;\n}\n\n\n// Brand/project name\n\n.navbar-brand {\n  float: left;\n  padding: @navbar-padding-vertical @navbar-padding-horizontal;\n  font-size: @font-size-large;\n  line-height: @line-height-computed;\n  height: @navbar-height;\n\n  &:hover,\n  &:focus {\n    text-decoration: none;\n  }\n\n  > img {\n    display: block;\n  }\n\n  @media (min-width: @grid-float-breakpoint) {\n    .navbar > .container &,\n    .navbar > .container-fluid & {\n      margin-left: -@navbar-padding-horizontal;\n    }\n  }\n}\n\n\n// Navbar toggle\n//\n// Custom button for toggling the `.navbar-collapse`, powered by the collapse\n// JavaScript plugin.\n\n.navbar-toggle {\n  position: relative;\n  float: right;\n  margin-right: @navbar-padding-horizontal;\n  padding: 9px 10px;\n  .navbar-vertical-align(34px);\n  background-color: transparent;\n  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n  border: 1px solid transparent;\n  border-radius: @border-radius-base;\n\n  // We remove the `outline` here, but later compensate by attaching `:hover`\n  // styles to `:focus`.\n  &:focus {\n    outline: 0;\n  }\n\n  // Bars\n  .icon-bar {\n    display: block;\n    width: 22px;\n    height: 2px;\n    border-radius: 1px;\n  }\n  .icon-bar + .icon-bar {\n    margin-top: 4px;\n  }\n\n  @media (min-width: @grid-float-breakpoint) {\n    display: none;\n  }\n}\n\n\n// Navbar nav links\n//\n// Builds on top of the `.nav` components with its own modifier class to make\n// the nav the full height of the horizontal nav (above 768px).\n\n.navbar-nav {\n  margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;\n\n  > li > a {\n    padding-top:    10px;\n    padding-bottom: 10px;\n    line-height: @line-height-computed;\n  }\n\n  @media (max-width: @grid-float-breakpoint-max) {\n    // Dropdowns get custom display when collapsed\n    .open .dropdown-menu {\n      position: static;\n      float: none;\n      width: auto;\n      margin-top: 0;\n      background-color: transparent;\n      border: 0;\n      box-shadow: none;\n      > li > a,\n      .dropdown-header {\n        padding: 5px 15px 5px 25px;\n      }\n      > li > a {\n        line-height: @line-height-computed;\n        &:hover,\n        &:focus {\n          background-image: none;\n        }\n      }\n    }\n  }\n\n  // Uncollapse the nav\n  @media (min-width: @grid-float-breakpoint) {\n    float: left;\n    margin: 0;\n\n    > li {\n      float: left;\n      > a {\n        padding-top:    @navbar-padding-vertical;\n        padding-bottom: @navbar-padding-vertical;\n      }\n    }\n  }\n}\n\n\n// Navbar form\n//\n// Extension of the `.form-inline` with some extra flavor for optimum display in\n// our navbars.\n\n.navbar-form {\n  margin-left: -@navbar-padding-horizontal;\n  margin-right: -@navbar-padding-horizontal;\n  padding: 10px @navbar-padding-horizontal;\n  border-top: 1px solid transparent;\n  border-bottom: 1px solid transparent;\n  @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);\n  .box-shadow(@shadow);\n\n  // Mixin behavior for optimum display\n  .form-inline();\n\n  .form-group {\n    @media (max-width: @grid-float-breakpoint-max) {\n      margin-bottom: 5px;\n\n      &:last-child {\n        margin-bottom: 0;\n      }\n    }\n  }\n\n  // Vertically center in expanded, horizontal navbar\n  .navbar-vertical-align(@input-height-base);\n\n  // Undo 100% width for pull classes\n  @media (min-width: @grid-float-breakpoint) {\n    width: auto;\n    border: 0;\n    margin-left: 0;\n    margin-right: 0;\n    padding-top: 0;\n    padding-bottom: 0;\n    .box-shadow(none);\n  }\n}\n\n\n// Dropdown menus\n\n// Menu position and menu carets\n.navbar-nav > li > .dropdown-menu {\n  margin-top: 0;\n  .border-top-radius(0);\n}\n// Menu position and menu caret support for dropups via extra dropup class\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n  margin-bottom: 0;\n  .border-top-radius(@navbar-border-radius);\n  .border-bottom-radius(0);\n}\n\n\n// Buttons in navbars\n//\n// Vertically center a button within a navbar (when *not* in a form).\n\n.navbar-btn {\n  .navbar-vertical-align(@input-height-base);\n\n  &.btn-sm {\n    .navbar-vertical-align(@input-height-small);\n  }\n  &.btn-xs {\n    .navbar-vertical-align(22);\n  }\n}\n\n\n// Text in navbars\n//\n// Add a class to make any element properly align itself vertically within the navbars.\n\n.navbar-text {\n  .navbar-vertical-align(@line-height-computed);\n\n  @media (min-width: @grid-float-breakpoint) {\n    float: left;\n    margin-left: @navbar-padding-horizontal;\n    margin-right: @navbar-padding-horizontal;\n  }\n}\n\n\n// Component alignment\n//\n// Repurpose the pull utilities as their own navbar utilities to avoid specificity\n// issues with parents and chaining. Only do this when the navbar is uncollapsed\n// though so that navbar contents properly stack and align in mobile.\n//\n// Declared after the navbar components to ensure more specificity on the margins.\n\n@media (min-width: @grid-float-breakpoint) {\n  .navbar-left  { .pull-left(); }\n  .navbar-right {\n    .pull-right();\n    margin-right: -@navbar-padding-horizontal;\n\n    ~ .navbar-right {\n      margin-right: 0;\n    }\n  }\n}\n\n\n// Alternate navbars\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n  background-color: @navbar-default-bg;\n  border-color: @navbar-default-border;\n\n  .navbar-brand {\n    color: @navbar-default-brand-color;\n    &:hover,\n    &:focus {\n      color: @navbar-default-brand-hover-color;\n      background-color: @navbar-default-brand-hover-bg;\n    }\n  }\n\n  .navbar-text {\n    color: @navbar-default-color;\n  }\n\n  .navbar-nav {\n    > li > a {\n      color: @navbar-default-link-color;\n\n      &:hover,\n      &:focus {\n        color: @navbar-default-link-hover-color;\n        background-color: @navbar-default-link-hover-bg;\n      }\n    }\n    > .active > a {\n      &,\n      &:hover,\n      &:focus {\n        color: @navbar-default-link-active-color;\n        background-color: @navbar-default-link-active-bg;\n      }\n    }\n    > .disabled > a {\n      &,\n      &:hover,\n      &:focus {\n        color: @navbar-default-link-disabled-color;\n        background-color: @navbar-default-link-disabled-bg;\n      }\n    }\n  }\n\n  .navbar-toggle {\n    border-color: @navbar-default-toggle-border-color;\n    &:hover,\n    &:focus {\n      background-color: @navbar-default-toggle-hover-bg;\n    }\n    .icon-bar {\n      background-color: @navbar-default-toggle-icon-bar-bg;\n    }\n  }\n\n  .navbar-collapse,\n  .navbar-form {\n    border-color: @navbar-default-border;\n  }\n\n  // Dropdown menu items\n  .navbar-nav {\n    // Remove background color from open dropdown\n    > .open > a {\n      &,\n      &:hover,\n      &:focus {\n        background-color: @navbar-default-link-active-bg;\n        color: @navbar-default-link-active-color;\n      }\n    }\n\n    @media (max-width: @grid-float-breakpoint-max) {\n      // Dropdowns get custom display when collapsed\n      .open .dropdown-menu {\n        > li > a {\n          color: @navbar-default-link-color;\n          &:hover,\n          &:focus {\n            color: @navbar-default-link-hover-color;\n            background-color: @navbar-default-link-hover-bg;\n          }\n        }\n        > .active > a {\n          &,\n          &:hover,\n          &:focus {\n            color: @navbar-default-link-active-color;\n            background-color: @navbar-default-link-active-bg;\n          }\n        }\n        > .disabled > a {\n          &,\n          &:hover,\n          &:focus {\n            color: @navbar-default-link-disabled-color;\n            background-color: @navbar-default-link-disabled-bg;\n          }\n        }\n      }\n    }\n  }\n\n\n  // Links in navbars\n  //\n  // Add a class to ensure links outside the navbar nav are colored correctly.\n\n  .navbar-link {\n    color: @navbar-default-link-color;\n    &:hover {\n      color: @navbar-default-link-hover-color;\n    }\n  }\n\n  .btn-link {\n    color: @navbar-default-link-color;\n    &:hover,\n    &:focus {\n      color: @navbar-default-link-hover-color;\n    }\n    &[disabled],\n    fieldset[disabled] & {\n      &:hover,\n      &:focus {\n        color: @navbar-default-link-disabled-color;\n      }\n    }\n  }\n}\n\n// Inverse navbar\n\n.navbar-inverse {\n  background-color: @navbar-inverse-bg;\n  border-color: @navbar-inverse-border;\n\n  .navbar-brand {\n    color: @navbar-inverse-brand-color;\n    &:hover,\n    &:focus {\n      color: @navbar-inverse-brand-hover-color;\n      background-color: @navbar-inverse-brand-hover-bg;\n    }\n  }\n\n  .navbar-text {\n    color: @navbar-inverse-color;\n  }\n\n  .navbar-nav {\n    > li > a {\n      color: @navbar-inverse-link-color;\n\n      &:hover,\n      &:focus {\n        color: @navbar-inverse-link-hover-color;\n        background-color: @navbar-inverse-link-hover-bg;\n      }\n    }\n    > .active > a {\n      &,\n      &:hover,\n      &:focus {\n        color: @navbar-inverse-link-active-color;\n        background-color: @navbar-inverse-link-active-bg;\n      }\n    }\n    > .disabled > a {\n      &,\n      &:hover,\n      &:focus {\n        color: @navbar-inverse-link-disabled-color;\n        background-color: @navbar-inverse-link-disabled-bg;\n      }\n    }\n  }\n\n  // Darken the responsive nav toggle\n  .navbar-toggle {\n    border-color: @navbar-inverse-toggle-border-color;\n    &:hover,\n    &:focus {\n      background-color: @navbar-inverse-toggle-hover-bg;\n    }\n    .icon-bar {\n      background-color: @navbar-inverse-toggle-icon-bar-bg;\n    }\n  }\n\n  .navbar-collapse,\n  .navbar-form {\n    border-color: darken(@navbar-inverse-bg, 7%);\n  }\n\n  // Dropdowns\n  .navbar-nav {\n    > .open > a {\n      &,\n      &:hover,\n      &:focus {\n        background-color: @navbar-inverse-link-active-bg;\n        color: @navbar-inverse-link-active-color;\n      }\n    }\n\n    @media (max-width: @grid-float-breakpoint-max) {\n      // Dropdowns get custom display\n      .open .dropdown-menu {\n        > .dropdown-header {\n          border-color: @navbar-inverse-border;\n        }\n        .divider {\n          background-color: @navbar-inverse-border;\n        }\n        > li > a {\n          color: @navbar-inverse-link-color;\n          &:hover,\n          &:focus {\n            color: @navbar-inverse-link-hover-color;\n            background-color: @navbar-inverse-link-hover-bg;\n          }\n        }\n        > .active > a {\n          &,\n          &:hover,\n          &:focus {\n            color: @navbar-inverse-link-active-color;\n            background-color: @navbar-inverse-link-active-bg;\n          }\n        }\n        > .disabled > a {\n          &,\n          &:hover,\n          &:focus {\n            color: @navbar-inverse-link-disabled-color;\n            background-color: @navbar-inverse-link-disabled-bg;\n          }\n        }\n      }\n    }\n  }\n\n  .navbar-link {\n    color: @navbar-inverse-link-color;\n    &:hover {\n      color: @navbar-inverse-link-hover-color;\n    }\n  }\n\n  .btn-link {\n    color: @navbar-inverse-link-color;\n    &:hover,\n    &:focus {\n      color: @navbar-inverse-link-hover-color;\n    }\n    &[disabled],\n    fieldset[disabled] & {\n      &:hover,\n      &:focus {\n        color: @navbar-inverse-link-disabled-color;\n      }\n    }\n  }\n}\n","// Navbar vertical align\n//\n// Vertically center elements in the navbar.\n// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.\n\n.navbar-vertical-align(@element-height) {\n  margin-top: ((@navbar-height - @element-height) / 2);\n  margin-bottom: ((@navbar-height - @element-height) / 2);\n}\n","//\n// Utility classes\n// --------------------------------------------------\n\n\n// Floats\n// -------------------------\n\n.clearfix {\n  .clearfix();\n}\n.center-block {\n  .center-block();\n}\n.pull-right {\n  float: right !important;\n}\n.pull-left {\n  float: left !important;\n}\n\n\n// Toggling content\n// -------------------------\n\n// Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1\n.hide {\n  display: none !important;\n}\n.show {\n  display: block !important;\n}\n.invisible {\n  visibility: hidden;\n}\n.text-hide {\n  .text-hide();\n}\n\n\n// Hide from screenreaders and browsers\n//\n// Credit: HTML5 Boilerplate\n\n.hidden {\n  display: none !important;\n}\n\n\n// For Affix plugin\n// -------------------------\n\n.affix {\n  position: fixed;\n}\n","//\n// Breadcrumbs\n// --------------------------------------------------\n\n\n.breadcrumb {\n  padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;\n  margin-bottom: @line-height-computed;\n  list-style: none;\n  background-color: @breadcrumb-bg;\n  border-radius: @border-radius-base;\n\n  > li {\n    display: inline-block;\n\n    + li:before {\n      content: \"@{breadcrumb-separator}\\00a0\"; // Unicode space added since inline-block means non-collapsing white-space\n      padding: 0 5px;\n      color: @breadcrumb-color;\n    }\n  }\n\n  > .active {\n    color: @breadcrumb-active-color;\n  }\n}\n","//\n// Pagination (multiple pages)\n// --------------------------------------------------\n.pagination {\n  display: inline-block;\n  padding-left: 0;\n  margin: @line-height-computed 0;\n  border-radius: @border-radius-base;\n\n  > li {\n    display: inline; // Remove list-style and block-level defaults\n    > a,\n    > span {\n      position: relative;\n      float: left; // Collapse white-space\n      padding: @padding-base-vertical @padding-base-horizontal;\n      line-height: @line-height-base;\n      text-decoration: none;\n      color: @pagination-color;\n      background-color: @pagination-bg;\n      border: 1px solid @pagination-border;\n      margin-left: -1px;\n    }\n    &:first-child {\n      > a,\n      > span {\n        margin-left: 0;\n        .border-left-radius(@border-radius-base);\n      }\n    }\n    &:last-child {\n      > a,\n      > span {\n        .border-right-radius(@border-radius-base);\n      }\n    }\n  }\n\n  > li > a,\n  > li > span {\n    &:hover,\n    &:focus {\n      z-index: 2;\n      color: @pagination-hover-color;\n      background-color: @pagination-hover-bg;\n      border-color: @pagination-hover-border;\n    }\n  }\n\n  > .active > a,\n  > .active > span {\n    &,\n    &:hover,\n    &:focus {\n      z-index: 3;\n      color: @pagination-active-color;\n      background-color: @pagination-active-bg;\n      border-color: @pagination-active-border;\n      cursor: default;\n    }\n  }\n\n  > .disabled {\n    > span,\n    > span:hover,\n    > span:focus,\n    > a,\n    > a:hover,\n    > a:focus {\n      color: @pagination-disabled-color;\n      background-color: @pagination-disabled-bg;\n      border-color: @pagination-disabled-border;\n      cursor: @cursor-disabled;\n    }\n  }\n}\n\n// Sizing\n// --------------------------------------------------\n\n// Large\n.pagination-lg {\n  .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);\n}\n\n// Small\n.pagination-sm {\n  .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);\n}\n","// Pagination\n\n.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n  > li {\n    > a,\n    > span {\n      padding: @padding-vertical @padding-horizontal;\n      font-size: @font-size;\n      line-height: @line-height;\n    }\n    &:first-child {\n      > a,\n      > span {\n        .border-left-radius(@border-radius);\n      }\n    }\n    &:last-child {\n      > a,\n      > span {\n        .border-right-radius(@border-radius);\n      }\n    }\n  }\n}\n","//\n// Pager pagination\n// --------------------------------------------------\n\n\n.pager {\n  padding-left: 0;\n  margin: @line-height-computed 0;\n  list-style: none;\n  text-align: center;\n  &:extend(.clearfix all);\n  li {\n    display: inline;\n    > a,\n    > span {\n      display: inline-block;\n      padding: 5px 14px;\n      background-color: @pager-bg;\n      border: 1px solid @pager-border;\n      border-radius: @pager-border-radius;\n    }\n\n    > a:hover,\n    > a:focus {\n      text-decoration: none;\n      background-color: @pager-hover-bg;\n    }\n  }\n\n  .next {\n    > a,\n    > span {\n      float: right;\n    }\n  }\n\n  .previous {\n    > a,\n    > span {\n      float: left;\n    }\n  }\n\n  .disabled {\n    > a,\n    > a:hover,\n    > a:focus,\n    > span {\n      color: @pager-disabled-color;\n      background-color: @pager-bg;\n      cursor: @cursor-disabled;\n    }\n  }\n}\n","//\n// Labels\n// --------------------------------------------------\n\n.label {\n  display: inline;\n  padding: .2em .6em .3em;\n  font-size: 75%;\n  font-weight: bold;\n  line-height: 1;\n  color: @label-color;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: baseline;\n  border-radius: .25em;\n\n  // Add hover effects, but only for links\n  a& {\n    &:hover,\n    &:focus {\n      color: @label-link-hover-color;\n      text-decoration: none;\n      cursor: pointer;\n    }\n  }\n\n  // Empty labels collapse automatically (not available in IE8)\n  &:empty {\n    display: none;\n  }\n\n  // Quick fix for labels in buttons\n  .btn & {\n    position: relative;\n    top: -1px;\n  }\n}\n\n// Colors\n// Contextual variations (linked labels get darker on :hover)\n\n.label-default {\n  .label-variant(@label-default-bg);\n}\n\n.label-primary {\n  .label-variant(@label-primary-bg);\n}\n\n.label-success {\n  .label-variant(@label-success-bg);\n}\n\n.label-info {\n  .label-variant(@label-info-bg);\n}\n\n.label-warning {\n  .label-variant(@label-warning-bg);\n}\n\n.label-danger {\n  .label-variant(@label-danger-bg);\n}\n","// Labels\n\n.label-variant(@color) {\n  background-color: @color;\n\n  &[href] {\n    &:hover,\n    &:focus {\n      background-color: darken(@color, 10%);\n    }\n  }\n}\n","//\n// Badges\n// --------------------------------------------------\n\n\n// Base class\n.badge {\n  display: inline-block;\n  min-width: 10px;\n  padding: 3px 7px;\n  font-size: @font-size-small;\n  font-weight: @badge-font-weight;\n  color: @badge-color;\n  line-height: @badge-line-height;\n  vertical-align: middle;\n  white-space: nowrap;\n  text-align: center;\n  background-color: @badge-bg;\n  border-radius: @badge-border-radius;\n\n  // Empty badges collapse automatically (not available in IE8)\n  &:empty {\n    display: none;\n  }\n\n  // Quick fix for badges in buttons\n  .btn & {\n    position: relative;\n    top: -1px;\n  }\n\n  .btn-xs &,\n  .btn-group-xs > .btn & {\n    top: 0;\n    padding: 1px 5px;\n  }\n\n  // Hover state, but only for links\n  a& {\n    &:hover,\n    &:focus {\n      color: @badge-link-hover-color;\n      text-decoration: none;\n      cursor: pointer;\n    }\n  }\n\n  // Account for badges in navs\n  .list-group-item.active > &,\n  .nav-pills > .active > a > & {\n    color: @badge-active-color;\n    background-color: @badge-active-bg;\n  }\n\n  .list-group-item > & {\n    float: right;\n  }\n\n  .list-group-item > & + & {\n    margin-right: 5px;\n  }\n\n  .nav-pills > li > a > & {\n    margin-left: 3px;\n  }\n}\n","//\n// Jumbotron\n// --------------------------------------------------\n\n\n.jumbotron {\n  padding-top:    @jumbotron-padding;\n  padding-bottom: @jumbotron-padding;\n  margin-bottom: @jumbotron-padding;\n  color: @jumbotron-color;\n  background-color: @jumbotron-bg;\n\n  h1,\n  .h1 {\n    color: @jumbotron-heading-color;\n  }\n\n  p {\n    margin-bottom: (@jumbotron-padding / 2);\n    font-size: @jumbotron-font-size;\n    font-weight: 200;\n  }\n\n  > hr {\n    border-top-color: darken(@jumbotron-bg, 10%);\n  }\n\n  .container &,\n  .container-fluid & {\n    border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container\n    padding-left:  (@grid-gutter-width / 2);\n    padding-right: (@grid-gutter-width / 2);\n  }\n\n  .container {\n    max-width: 100%;\n  }\n\n  @media screen and (min-width: @screen-sm-min) {\n    padding-top:    (@jumbotron-padding * 1.6);\n    padding-bottom: (@jumbotron-padding * 1.6);\n\n    .container &,\n    .container-fluid & {\n      padding-left:  (@jumbotron-padding * 2);\n      padding-right: (@jumbotron-padding * 2);\n    }\n\n    h1,\n    .h1 {\n      font-size: @jumbotron-heading-font-size;\n    }\n  }\n}\n","//\n// Thumbnails\n// --------------------------------------------------\n\n\n// Mixin and adjust the regular image class\n.thumbnail {\n  display: block;\n  padding: @thumbnail-padding;\n  margin-bottom: @line-height-computed;\n  line-height: @line-height-base;\n  background-color: @thumbnail-bg;\n  border: 1px solid @thumbnail-border;\n  border-radius: @thumbnail-border-radius;\n  .transition(border .2s ease-in-out);\n\n  > img,\n  a > img {\n    &:extend(.img-responsive);\n    margin-left: auto;\n    margin-right: auto;\n  }\n\n  // Add a hover state for linked versions only\n  a&:hover,\n  a&:focus,\n  a&.active {\n    border-color: @link-color;\n  }\n\n  // Image captions\n  .caption {\n    padding: @thumbnail-caption-padding;\n    color: @thumbnail-caption-color;\n  }\n}\n","//\n// Alerts\n// --------------------------------------------------\n\n\n// Base styles\n// -------------------------\n\n.alert {\n  padding: @alert-padding;\n  margin-bottom: @line-height-computed;\n  border: 1px solid transparent;\n  border-radius: @alert-border-radius;\n\n  // Headings for larger alerts\n  h4 {\n    margin-top: 0;\n    // Specified for the h4 to prevent conflicts of changing @headings-color\n    color: inherit;\n  }\n\n  // Provide class for links that match alerts\n  .alert-link {\n    font-weight: @alert-link-font-weight;\n  }\n\n  // Improve alignment and spacing of inner content\n  > p,\n  > ul {\n    margin-bottom: 0;\n  }\n\n  > p + p {\n    margin-top: 5px;\n  }\n}\n\n// Dismissible alerts\n//\n// Expand the right padding and account for the close button's positioning.\n\n.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.\n.alert-dismissible {\n  padding-right: (@alert-padding + 20);\n\n  // Adjust close link position\n  .close {\n    position: relative;\n    top: -2px;\n    right: -21px;\n    color: inherit;\n  }\n}\n\n// Alternate styles\n//\n// Generate contextual modifier classes for colorizing the alert.\n\n.alert-success {\n  .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);\n}\n\n.alert-info {\n  .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);\n}\n\n.alert-warning {\n  .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);\n}\n\n.alert-danger {\n  .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);\n}\n","// Alerts\n\n.alert-variant(@background; @border; @text-color) {\n  background-color: @background;\n  border-color: @border;\n  color: @text-color;\n\n  hr {\n    border-top-color: darken(@border, 5%);\n  }\n  .alert-link {\n    color: darken(@text-color, 10%);\n  }\n}\n","//\n// Progress bars\n// --------------------------------------------------\n\n\n// Bar animations\n// -------------------------\n\n// WebKit\n@-webkit-keyframes progress-bar-stripes {\n  from  { background-position: 40px 0; }\n  to    { background-position: 0 0; }\n}\n\n// Spec and IE10+\n@keyframes progress-bar-stripes {\n  from  { background-position: 40px 0; }\n  to    { background-position: 0 0; }\n}\n\n\n// Bar itself\n// -------------------------\n\n// Outer container\n.progress {\n  overflow: hidden;\n  height: @line-height-computed;\n  margin-bottom: @line-height-computed;\n  background-color: @progress-bg;\n  border-radius: @progress-border-radius;\n  .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));\n}\n\n// Bar of progress\n.progress-bar {\n  float: left;\n  width: 0%;\n  height: 100%;\n  font-size: @font-size-small;\n  line-height: @line-height-computed;\n  color: @progress-bar-color;\n  text-align: center;\n  background-color: @progress-bar-bg;\n  .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));\n  .transition(width .6s ease);\n}\n\n// Striped bars\n//\n// `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar-striped` class, which you just add to an existing\n// `.progress-bar`.\n.progress-striped .progress-bar,\n.progress-bar-striped {\n  #gradient > .striped();\n  background-size: 40px 40px;\n}\n\n// Call animation for the active one\n//\n// `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar.active` approach.\n.progress.active .progress-bar,\n.progress-bar.active {\n  .animation(progress-bar-stripes 2s linear infinite);\n}\n\n\n// Variations\n// -------------------------\n\n.progress-bar-success {\n  .progress-bar-variant(@progress-bar-success-bg);\n}\n\n.progress-bar-info {\n  .progress-bar-variant(@progress-bar-info-bg);\n}\n\n.progress-bar-warning {\n  .progress-bar-variant(@progress-bar-warning-bg);\n}\n\n.progress-bar-danger {\n  .progress-bar-variant(@progress-bar-danger-bg);\n}\n","// Gradients\n\n#gradient {\n\n  // Horizontal gradient, from left to right\n  //\n  // Creates two color stops, start and end, by specifying a color and position for each color stop.\n  // Color stops are not available in IE9 and below.\n  .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n    background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n    background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n    background-repeat: repeat-x;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n  }\n\n  // Vertical gradient, from top to bottom\n  //\n  // Creates two color stops, start and end, by specifying a color and position for each color stop.\n  // Color stops are not available in IE9 and below.\n  .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n    background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Opera 12\n    background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n    background-repeat: repeat-x;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n  }\n\n  .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n    background-repeat: repeat-x;\n    background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n    background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n    background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n  }\n  .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n    background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n    background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n    background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n    background-repeat: no-repeat;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n  }\n  .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n    background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n    background-repeat: no-repeat;\n    filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n  }\n  .radial(@inner-color: #555; @outer-color: #333) {\n    background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n    background-image: radial-gradient(circle, @inner-color, @outer-color);\n    background-repeat: no-repeat;\n  }\n  .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n    background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n    background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n    background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n  }\n}\n","// Progress bars\n\n.progress-bar-variant(@color) {\n  background-color: @color;\n\n  // Deprecated parent class requirement as of v3.2.0\n  .progress-striped & {\n    #gradient > .striped();\n  }\n}\n",".media {\n  // Proper spacing between instances of .media\n  margin-top: 15px;\n\n  &:first-child {\n    margin-top: 0;\n  }\n}\n\n.media,\n.media-body {\n  zoom: 1;\n  overflow: hidden;\n}\n\n.media-body {\n  width: 10000px;\n}\n\n.media-object {\n  display: block;\n\n  // Fix collapse in webkit from max-width: 100% and display: table-cell.\n  &.img-thumbnail {\n    max-width: none;\n  }\n}\n\n.media-right,\n.media > .pull-right {\n  padding-left: 10px;\n}\n\n.media-left,\n.media > .pull-left {\n  padding-right: 10px;\n}\n\n.media-left,\n.media-right,\n.media-body {\n  display: table-cell;\n  vertical-align: top;\n}\n\n.media-middle {\n  vertical-align: middle;\n}\n\n.media-bottom {\n  vertical-align: bottom;\n}\n\n// Reset margins on headings for tighter default spacing\n.media-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n\n// Media list variation\n//\n// Undo default ul/ol styles\n.media-list {\n  padding-left: 0;\n  list-style: none;\n}\n","//\n// List groups\n// --------------------------------------------------\n\n\n// Base class\n//\n// Easily usable on <ul>, <ol>, or <div>.\n\n.list-group {\n  // No need to set list-style: none; since .list-group-item is block level\n  margin-bottom: 20px;\n  padding-left: 0; // reset padding because ul and ol\n}\n\n\n// Individual list items\n//\n// Use on `li`s or `div`s within the `.list-group` parent.\n\n.list-group-item {\n  position: relative;\n  display: block;\n  padding: 10px 15px;\n  // Place the border on the list items and negative margin up for better styling\n  margin-bottom: -1px;\n  background-color: @list-group-bg;\n  border: 1px solid @list-group-border;\n\n  // Round the first and last items\n  &:first-child {\n    .border-top-radius(@list-group-border-radius);\n  }\n  &:last-child {\n    margin-bottom: 0;\n    .border-bottom-radius(@list-group-border-radius);\n  }\n}\n\n\n// Interactive list items\n//\n// Use anchor or button elements instead of `li`s or `div`s to create interactive items.\n// Includes an extra `.active` modifier class for showing selected items.\n\na.list-group-item,\nbutton.list-group-item {\n  color: @list-group-link-color;\n\n  .list-group-item-heading {\n    color: @list-group-link-heading-color;\n  }\n\n  // Hover state\n  &:hover,\n  &:focus {\n    text-decoration: none;\n    color: @list-group-link-hover-color;\n    background-color: @list-group-hover-bg;\n  }\n}\n\nbutton.list-group-item {\n  width: 100%;\n  text-align: left;\n}\n\n.list-group-item {\n  // Disabled state\n  &.disabled,\n  &.disabled:hover,\n  &.disabled:focus {\n    background-color: @list-group-disabled-bg;\n    color: @list-group-disabled-color;\n    cursor: @cursor-disabled;\n\n    // Force color to inherit for custom content\n    .list-group-item-heading {\n      color: inherit;\n    }\n    .list-group-item-text {\n      color: @list-group-disabled-text-color;\n    }\n  }\n\n  // Active class on item itself, not parent\n  &.active,\n  &.active:hover,\n  &.active:focus {\n    z-index: 2; // Place active items above their siblings for proper border styling\n    color: @list-group-active-color;\n    background-color: @list-group-active-bg;\n    border-color: @list-group-active-border;\n\n    // Force color to inherit for custom content\n    .list-group-item-heading,\n    .list-group-item-heading > small,\n    .list-group-item-heading > .small {\n      color: inherit;\n    }\n    .list-group-item-text {\n      color: @list-group-active-text-color;\n    }\n  }\n}\n\n\n// Contextual variants\n//\n// Add modifier classes to change text and background color on individual items.\n// Organizationally, this must come after the `:hover` states.\n\n.list-group-item-variant(success; @state-success-bg; @state-success-text);\n.list-group-item-variant(info; @state-info-bg; @state-info-text);\n.list-group-item-variant(warning; @state-warning-bg; @state-warning-text);\n.list-group-item-variant(danger; @state-danger-bg; @state-danger-text);\n\n\n// Custom content options\n//\n// Extra classes for creating well-formatted content within `.list-group-item`s.\n\n.list-group-item-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n.list-group-item-text {\n  margin-bottom: 0;\n  line-height: 1.3;\n}\n","// List Groups\n\n.list-group-item-variant(@state; @background; @color) {\n  .list-group-item-@{state} {\n    color: @color;\n    background-color: @background;\n\n    a&,\n    button& {\n      color: @color;\n\n      .list-group-item-heading {\n        color: inherit;\n      }\n\n      &:hover,\n      &:focus {\n        color: @color;\n        background-color: darken(@background, 5%);\n      }\n      &.active,\n      &.active:hover,\n      &.active:focus {\n        color: #fff;\n        background-color: @color;\n        border-color: @color;\n      }\n    }\n  }\n}\n","//\n// Panels\n// --------------------------------------------------\n\n\n// Base class\n.panel {\n  margin-bottom: @line-height-computed;\n  background-color: @panel-bg;\n  border: 1px solid transparent;\n  border-radius: @panel-border-radius;\n  .box-shadow(0 1px 1px rgba(0,0,0,.05));\n}\n\n// Panel contents\n.panel-body {\n  padding: @panel-body-padding;\n  &:extend(.clearfix all);\n}\n\n// Optional heading\n.panel-heading {\n  padding: @panel-heading-padding;\n  border-bottom: 1px solid transparent;\n  .border-top-radius((@panel-border-radius - 1));\n\n  > .dropdown .dropdown-toggle {\n    color: inherit;\n  }\n}\n\n// Within heading, strip any `h*` tag of its default margins for spacing.\n.panel-title {\n  margin-top: 0;\n  margin-bottom: 0;\n  font-size: ceil((@font-size-base * 1.125));\n  color: inherit;\n\n  > a,\n  > small,\n  > .small,\n  > small > a,\n  > .small > a {\n    color: inherit;\n  }\n}\n\n// Optional footer (stays gray in every modifier class)\n.panel-footer {\n  padding: @panel-footer-padding;\n  background-color: @panel-footer-bg;\n  border-top: 1px solid @panel-inner-border;\n  .border-bottom-radius((@panel-border-radius - 1));\n}\n\n\n// List groups in panels\n//\n// By default, space out list group content from panel headings to account for\n// any kind of custom content between the two.\n\n.panel {\n  > .list-group,\n  > .panel-collapse > .list-group {\n    margin-bottom: 0;\n\n    .list-group-item {\n      border-width: 1px 0;\n      border-radius: 0;\n    }\n\n    // Add border top radius for first one\n    &:first-child {\n      .list-group-item:first-child {\n        border-top: 0;\n        .border-top-radius((@panel-border-radius - 1));\n      }\n    }\n\n    // Add border bottom radius for last one\n    &:last-child {\n      .list-group-item:last-child {\n        border-bottom: 0;\n        .border-bottom-radius((@panel-border-radius - 1));\n      }\n    }\n  }\n  > .panel-heading + .panel-collapse > .list-group {\n    .list-group-item:first-child {\n      .border-top-radius(0);\n    }\n  }\n}\n// Collapse space between when there's no additional content.\n.panel-heading + .list-group {\n  .list-group-item:first-child {\n    border-top-width: 0;\n  }\n}\n.list-group + .panel-footer {\n  border-top-width: 0;\n}\n\n// Tables in panels\n//\n// Place a non-bordered `.table` within a panel (not within a `.panel-body`) and\n// watch it go full width.\n\n.panel {\n  > .table,\n  > .table-responsive > .table,\n  > .panel-collapse > .table {\n    margin-bottom: 0;\n\n    caption {\n      padding-left: @panel-body-padding;\n      padding-right: @panel-body-padding;\n    }\n  }\n  // Add border top radius for first one\n  > .table:first-child,\n  > .table-responsive:first-child > .table:first-child {\n    .border-top-radius((@panel-border-radius - 1));\n\n    > thead:first-child,\n    > tbody:first-child {\n      > tr:first-child {\n        border-top-left-radius: (@panel-border-radius - 1);\n        border-top-right-radius: (@panel-border-radius - 1);\n\n        td:first-child,\n        th:first-child {\n          border-top-left-radius: (@panel-border-radius - 1);\n        }\n        td:last-child,\n        th:last-child {\n          border-top-right-radius: (@panel-border-radius - 1);\n        }\n      }\n    }\n  }\n  // Add border bottom radius for last one\n  > .table:last-child,\n  > .table-responsive:last-child > .table:last-child {\n    .border-bottom-radius((@panel-border-radius - 1));\n\n    > tbody:last-child,\n    > tfoot:last-child {\n      > tr:last-child {\n        border-bottom-left-radius: (@panel-border-radius - 1);\n        border-bottom-right-radius: (@panel-border-radius - 1);\n\n        td:first-child,\n        th:first-child {\n          border-bottom-left-radius: (@panel-border-radius - 1);\n        }\n        td:last-child,\n        th:last-child {\n          border-bottom-right-radius: (@panel-border-radius - 1);\n        }\n      }\n    }\n  }\n  > .panel-body + .table,\n  > .panel-body + .table-responsive,\n  > .table + .panel-body,\n  > .table-responsive + .panel-body {\n    border-top: 1px solid @table-border-color;\n  }\n  > .table > tbody:first-child > tr:first-child th,\n  > .table > tbody:first-child > tr:first-child td {\n    border-top: 0;\n  }\n  > .table-bordered,\n  > .table-responsive > .table-bordered {\n    border: 0;\n    > thead,\n    > tbody,\n    > tfoot {\n      > tr {\n        > th:first-child,\n        > td:first-child {\n          border-left: 0;\n        }\n        > th:last-child,\n        > td:last-child {\n          border-right: 0;\n        }\n      }\n    }\n    > thead,\n    > tbody {\n      > tr:first-child {\n        > td,\n        > th {\n          border-bottom: 0;\n        }\n      }\n    }\n    > tbody,\n    > tfoot {\n      > tr:last-child {\n        > td,\n        > th {\n          border-bottom: 0;\n        }\n      }\n    }\n  }\n  > .table-responsive {\n    border: 0;\n    margin-bottom: 0;\n  }\n}\n\n\n// Collapsible panels (aka, accordion)\n//\n// Wrap a series of panels in `.panel-group` to turn them into an accordion with\n// the help of our collapse JavaScript plugin.\n\n.panel-group {\n  margin-bottom: @line-height-computed;\n\n  // Tighten up margin so it's only between panels\n  .panel {\n    margin-bottom: 0;\n    border-radius: @panel-border-radius;\n\n    + .panel {\n      margin-top: 5px;\n    }\n  }\n\n  .panel-heading {\n    border-bottom: 0;\n\n    + .panel-collapse > .panel-body,\n    + .panel-collapse > .list-group {\n      border-top: 1px solid @panel-inner-border;\n    }\n  }\n\n  .panel-footer {\n    border-top: 0;\n    + .panel-collapse .panel-body {\n      border-bottom: 1px solid @panel-inner-border;\n    }\n  }\n}\n\n\n// Contextual variations\n.panel-default {\n  .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border);\n}\n.panel-primary {\n  .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border);\n}\n.panel-success {\n  .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);\n}\n.panel-info {\n  .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);\n}\n.panel-warning {\n  .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);\n}\n.panel-danger {\n  .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);\n}\n","// Panels\n\n.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {\n  border-color: @border;\n\n  & > .panel-heading {\n    color: @heading-text-color;\n    background-color: @heading-bg-color;\n    border-color: @heading-border;\n\n    + .panel-collapse > .panel-body {\n      border-top-color: @border;\n    }\n    .badge {\n      color: @heading-bg-color;\n      background-color: @heading-text-color;\n    }\n  }\n  & > .panel-footer {\n    + .panel-collapse > .panel-body {\n      border-bottom-color: @border;\n    }\n  }\n}\n","// Embeds responsive\n//\n// Credit: Nicolas Gallagher and SUIT CSS.\n\n.embed-responsive {\n  position: relative;\n  display: block;\n  height: 0;\n  padding: 0;\n  overflow: hidden;\n\n  .embed-responsive-item,\n  iframe,\n  embed,\n  object,\n  video {\n    position: absolute;\n    top: 0;\n    left: 0;\n    bottom: 0;\n    height: 100%;\n    width: 100%;\n    border: 0;\n  }\n}\n\n// Modifier class for 16:9 aspect ratio\n.embed-responsive-16by9 {\n  padding-bottom: 56.25%;\n}\n\n// Modifier class for 4:3 aspect ratio\n.embed-responsive-4by3 {\n  padding-bottom: 75%;\n}\n","//\n// Wells\n// --------------------------------------------------\n\n\n// Base class\n.well {\n  min-height: 20px;\n  padding: 19px;\n  margin-bottom: 20px;\n  background-color: @well-bg;\n  border: 1px solid @well-border;\n  border-radius: @border-radius-base;\n  .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));\n  blockquote {\n    border-color: #ddd;\n    border-color: rgba(0,0,0,.15);\n  }\n}\n\n// Sizes\n.well-lg {\n  padding: 24px;\n  border-radius: @border-radius-large;\n}\n.well-sm {\n  padding: 9px;\n  border-radius: @border-radius-small;\n}\n","//\n// Close icons\n// --------------------------------------------------\n\n\n.close {\n  float: right;\n  font-size: (@font-size-base * 1.5);\n  font-weight: @close-font-weight;\n  line-height: 1;\n  color: @close-color;\n  text-shadow: @close-text-shadow;\n  .opacity(.2);\n\n  &:hover,\n  &:focus {\n    color: @close-color;\n    text-decoration: none;\n    cursor: pointer;\n    .opacity(.5);\n  }\n\n  // Additional properties for button version\n  // iOS requires the button element instead of an anchor tag.\n  // If you want the anchor version, it requires `href=\"#\"`.\n  // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile\n  button& {\n    padding: 0;\n    cursor: pointer;\n    background: transparent;\n    border: 0;\n    -webkit-appearance: none;\n  }\n}\n","//\n// Modals\n// --------------------------------------------------\n\n// .modal-open      - body class for killing the scroll\n// .modal           - container to scroll within\n// .modal-dialog    - positioning shell for the actual modal\n// .modal-content   - actual modal w/ bg and corners and shit\n\n// Kill the scroll on the body\n.modal-open {\n  overflow: hidden;\n}\n\n// Container that the modal scrolls within\n.modal {\n  display: none;\n  overflow: hidden;\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: @zindex-modal;\n  -webkit-overflow-scrolling: touch;\n\n  // Prevent Chrome on Windows from adding a focus outline. For details, see\n  // https://github.com/twbs/bootstrap/pull/10951.\n  outline: 0;\n\n  // When fading in the modal, animate it to slide down\n  &.fade .modal-dialog {\n    .translate(0, -25%);\n    .transition-transform(~\"0.3s ease-out\");\n  }\n  &.in .modal-dialog { .translate(0, 0) }\n}\n.modal-open .modal {\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n\n// Shell div to position the modal with bottom padding\n.modal-dialog {\n  position: relative;\n  width: auto;\n  margin: 10px;\n}\n\n// Actual modal\n.modal-content {\n  position: relative;\n  background-color: @modal-content-bg;\n  border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)\n  border: 1px solid @modal-content-border-color;\n  border-radius: @border-radius-large;\n  .box-shadow(0 3px 9px rgba(0,0,0,.5));\n  background-clip: padding-box;\n  // Remove focus outline from opened modal\n  outline: 0;\n}\n\n// Modal background\n.modal-backdrop {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: @zindex-modal-background;\n  background-color: @modal-backdrop-bg;\n  // Fade for backdrop\n  &.fade { .opacity(0); }\n  &.in { .opacity(@modal-backdrop-opacity); }\n}\n\n// Modal header\n// Top section of the modal w/ title and dismiss\n.modal-header {\n  padding: @modal-title-padding;\n  border-bottom: 1px solid @modal-header-border-color;\n  &:extend(.clearfix all);\n}\n// Close icon\n.modal-header .close {\n  margin-top: -2px;\n}\n\n// Title text within header\n.modal-title {\n  margin: 0;\n  line-height: @modal-title-line-height;\n}\n\n// Modal body\n// Where all modal content resides (sibling of .modal-header and .modal-footer)\n.modal-body {\n  position: relative;\n  padding: @modal-inner-padding;\n}\n\n// Footer (for actions)\n.modal-footer {\n  padding: @modal-inner-padding;\n  text-align: right; // right align buttons\n  border-top: 1px solid @modal-footer-border-color;\n  &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons\n\n  // Properly space out buttons\n  .btn + .btn {\n    margin-left: 5px;\n    margin-bottom: 0; // account for input[type=\"submit\"] which gets the bottom margin like all other inputs\n  }\n  // but override that for button groups\n  .btn-group .btn + .btn {\n    margin-left: -1px;\n  }\n  // and override it for block buttons as well\n  .btn-block + .btn-block {\n    margin-left: 0;\n  }\n}\n\n// Measure scrollbar width for padding body during modal show/hide\n.modal-scrollbar-measure {\n  position: absolute;\n  top: -9999px;\n  width: 50px;\n  height: 50px;\n  overflow: scroll;\n}\n\n// Scale up the modal\n@media (min-width: @screen-sm-min) {\n  // Automatically set modal's width for larger viewports\n  .modal-dialog {\n    width: @modal-md;\n    margin: 30px auto;\n  }\n  .modal-content {\n    .box-shadow(0 5px 15px rgba(0,0,0,.5));\n  }\n\n  // Modal sizes\n  .modal-sm { width: @modal-sm; }\n}\n\n@media (min-width: @screen-md-min) {\n  .modal-lg { width: @modal-lg; }\n}\n","//\n// Tooltips\n// --------------------------------------------------\n\n\n// Base class\n.tooltip {\n  position: absolute;\n  z-index: @zindex-tooltip;\n  display: block;\n  // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.\n  // So reset our font and text properties to avoid inheriting weird values.\n  .reset-text();\n  font-size: @font-size-small;\n\n  .opacity(0);\n\n  &.in     { .opacity(@tooltip-opacity); }\n  &.top    { margin-top:  -3px; padding: @tooltip-arrow-width 0; }\n  &.right  { margin-left:  3px; padding: 0 @tooltip-arrow-width; }\n  &.bottom { margin-top:   3px; padding: @tooltip-arrow-width 0; }\n  &.left   { margin-left: -3px; padding: 0 @tooltip-arrow-width; }\n}\n\n// Wrapper for the tooltip content\n.tooltip-inner {\n  max-width: @tooltip-max-width;\n  padding: 3px 8px;\n  color: @tooltip-color;\n  text-align: center;\n  background-color: @tooltip-bg;\n  border-radius: @border-radius-base;\n}\n\n// Arrows\n.tooltip-arrow {\n  position: absolute;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n// Note: Deprecated .top-left, .top-right, .bottom-left, and .bottom-right as of v3.3.1\n.tooltip {\n  &.top .tooltip-arrow {\n    bottom: 0;\n    left: 50%;\n    margin-left: -@tooltip-arrow-width;\n    border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n    border-top-color: @tooltip-arrow-color;\n  }\n  &.top-left .tooltip-arrow {\n    bottom: 0;\n    right: @tooltip-arrow-width;\n    margin-bottom: -@tooltip-arrow-width;\n    border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n    border-top-color: @tooltip-arrow-color;\n  }\n  &.top-right .tooltip-arrow {\n    bottom: 0;\n    left: @tooltip-arrow-width;\n    margin-bottom: -@tooltip-arrow-width;\n    border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n    border-top-color: @tooltip-arrow-color;\n  }\n  &.right .tooltip-arrow {\n    top: 50%;\n    left: 0;\n    margin-top: -@tooltip-arrow-width;\n    border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;\n    border-right-color: @tooltip-arrow-color;\n  }\n  &.left .tooltip-arrow {\n    top: 50%;\n    right: 0;\n    margin-top: -@tooltip-arrow-width;\n    border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;\n    border-left-color: @tooltip-arrow-color;\n  }\n  &.bottom .tooltip-arrow {\n    top: 0;\n    left: 50%;\n    margin-left: -@tooltip-arrow-width;\n    border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n    border-bottom-color: @tooltip-arrow-color;\n  }\n  &.bottom-left .tooltip-arrow {\n    top: 0;\n    right: @tooltip-arrow-width;\n    margin-top: -@tooltip-arrow-width;\n    border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n    border-bottom-color: @tooltip-arrow-color;\n  }\n  &.bottom-right .tooltip-arrow {\n    top: 0;\n    left: @tooltip-arrow-width;\n    margin-top: -@tooltip-arrow-width;\n    border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n    border-bottom-color: @tooltip-arrow-color;\n  }\n}\n",".reset-text() {\n  font-family: @font-family-base;\n  // We deliberately do NOT reset font-size.\n  font-style: normal;\n  font-weight: normal;\n  letter-spacing: normal;\n  line-break: auto;\n  line-height: @line-height-base;\n  text-align: left; // Fallback for where `start` is not supported\n  text-align: start;\n  text-decoration: none;\n  text-shadow: none;\n  text-transform: none;\n  white-space: normal;\n  word-break: normal;\n  word-spacing: normal;\n  word-wrap: normal;\n}\n","//\n// Popovers\n// --------------------------------------------------\n\n\n.popover {\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: @zindex-popover;\n  display: none;\n  max-width: @popover-max-width;\n  padding: 1px;\n  // Our parent element can be arbitrary since popovers are by default inserted as a sibling of their target element.\n  // So reset our font and text properties to avoid inheriting weird values.\n  .reset-text();\n  font-size: @font-size-base;\n\n  background-color: @popover-bg;\n  background-clip: padding-box;\n  border: 1px solid @popover-fallback-border-color;\n  border: 1px solid @popover-border-color;\n  border-radius: @border-radius-large;\n  .box-shadow(0 5px 10px rgba(0,0,0,.2));\n\n  // Offset the popover to account for the popover arrow\n  &.top     { margin-top: -@popover-arrow-width; }\n  &.right   { margin-left: @popover-arrow-width; }\n  &.bottom  { margin-top: @popover-arrow-width; }\n  &.left    { margin-left: -@popover-arrow-width; }\n}\n\n.popover-title {\n  margin: 0; // reset heading margin\n  padding: 8px 14px;\n  font-size: @font-size-base;\n  background-color: @popover-title-bg;\n  border-bottom: 1px solid darken(@popover-title-bg, 5%);\n  border-radius: (@border-radius-large - 1) (@border-radius-large - 1) 0 0;\n}\n\n.popover-content {\n  padding: 9px 14px;\n}\n\n// Arrows\n//\n// .arrow is outer, .arrow:after is inner\n\n.popover > .arrow {\n  &,\n  &:after {\n    position: absolute;\n    display: block;\n    width: 0;\n    height: 0;\n    border-color: transparent;\n    border-style: solid;\n  }\n}\n.popover > .arrow {\n  border-width: @popover-arrow-outer-width;\n}\n.popover > .arrow:after {\n  border-width: @popover-arrow-width;\n  content: \"\";\n}\n\n.popover {\n  &.top > .arrow {\n    left: 50%;\n    margin-left: -@popover-arrow-outer-width;\n    border-bottom-width: 0;\n    border-top-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n    border-top-color: @popover-arrow-outer-color;\n    bottom: -@popover-arrow-outer-width;\n    &:after {\n      content: \" \";\n      bottom: 1px;\n      margin-left: -@popover-arrow-width;\n      border-bottom-width: 0;\n      border-top-color: @popover-arrow-color;\n    }\n  }\n  &.right > .arrow {\n    top: 50%;\n    left: -@popover-arrow-outer-width;\n    margin-top: -@popover-arrow-outer-width;\n    border-left-width: 0;\n    border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n    border-right-color: @popover-arrow-outer-color;\n    &:after {\n      content: \" \";\n      left: 1px;\n      bottom: -@popover-arrow-width;\n      border-left-width: 0;\n      border-right-color: @popover-arrow-color;\n    }\n  }\n  &.bottom > .arrow {\n    left: 50%;\n    margin-left: -@popover-arrow-outer-width;\n    border-top-width: 0;\n    border-bottom-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n    border-bottom-color: @popover-arrow-outer-color;\n    top: -@popover-arrow-outer-width;\n    &:after {\n      content: \" \";\n      top: 1px;\n      margin-left: -@popover-arrow-width;\n      border-top-width: 0;\n      border-bottom-color: @popover-arrow-color;\n    }\n  }\n\n  &.left > .arrow {\n    top: 50%;\n    right: -@popover-arrow-outer-width;\n    margin-top: -@popover-arrow-outer-width;\n    border-right-width: 0;\n    border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n    border-left-color: @popover-arrow-outer-color;\n    &:after {\n      content: \" \";\n      right: 1px;\n      border-right-width: 0;\n      border-left-color: @popover-arrow-color;\n      bottom: -@popover-arrow-width;\n    }\n  }\n}\n","//\n// Carousel\n// --------------------------------------------------\n\n\n// Wrapper for the slide container and indicators\n.carousel {\n  position: relative;\n}\n\n.carousel-inner {\n  position: relative;\n  overflow: hidden;\n  width: 100%;\n\n  > .item {\n    display: none;\n    position: relative;\n    .transition(.6s ease-in-out left);\n\n    // Account for jankitude on images\n    > img,\n    > a > img {\n      &:extend(.img-responsive);\n      line-height: 1;\n    }\n\n    // WebKit CSS3 transforms for supported devices\n    @media all and (transform-3d), (-webkit-transform-3d) {\n      .transition-transform(~'0.6s ease-in-out');\n      .backface-visibility(~'hidden');\n      .perspective(1000px);\n\n      &.next,\n      &.active.right {\n        .translate3d(100%, 0, 0);\n        left: 0;\n      }\n      &.prev,\n      &.active.left {\n        .translate3d(-100%, 0, 0);\n        left: 0;\n      }\n      &.next.left,\n      &.prev.right,\n      &.active {\n        .translate3d(0, 0, 0);\n        left: 0;\n      }\n    }\n  }\n\n  > .active,\n  > .next,\n  > .prev {\n    display: block;\n  }\n\n  > .active {\n    left: 0;\n  }\n\n  > .next,\n  > .prev {\n    position: absolute;\n    top: 0;\n    width: 100%;\n  }\n\n  > .next {\n    left: 100%;\n  }\n  > .prev {\n    left: -100%;\n  }\n  > .next.left,\n  > .prev.right {\n    left: 0;\n  }\n\n  > .active.left {\n    left: -100%;\n  }\n  > .active.right {\n    left: 100%;\n  }\n\n}\n\n// Left/right controls for nav\n// ---------------------------\n\n.carousel-control {\n  position: absolute;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  width: @carousel-control-width;\n  .opacity(@carousel-control-opacity);\n  font-size: @carousel-control-font-size;\n  color: @carousel-control-color;\n  text-align: center;\n  text-shadow: @carousel-text-shadow;\n  background-color: rgba(0, 0, 0, 0); // Fix IE9 click-thru bug\n  // We can't have this transition here because WebKit cancels the carousel\n  // animation if you trip this while in the middle of another animation.\n\n  // Set gradients for backgrounds\n  &.left {\n    #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));\n  }\n  &.right {\n    left: auto;\n    right: 0;\n    #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));\n  }\n\n  // Hover/focus state\n  &:hover,\n  &:focus {\n    outline: 0;\n    color: @carousel-control-color;\n    text-decoration: none;\n    .opacity(.9);\n  }\n\n  // Toggles\n  .icon-prev,\n  .icon-next,\n  .glyphicon-chevron-left,\n  .glyphicon-chevron-right {\n    position: absolute;\n    top: 50%;\n    margin-top: -10px;\n    z-index: 5;\n    display: inline-block;\n  }\n  .icon-prev,\n  .glyphicon-chevron-left {\n    left: 50%;\n    margin-left: -10px;\n  }\n  .icon-next,\n  .glyphicon-chevron-right {\n    right: 50%;\n    margin-right: -10px;\n  }\n  .icon-prev,\n  .icon-next {\n    width:  20px;\n    height: 20px;\n    line-height: 1;\n    font-family: serif;\n  }\n\n\n  .icon-prev {\n    &:before {\n      content: '\\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)\n    }\n  }\n  .icon-next {\n    &:before {\n      content: '\\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)\n    }\n  }\n}\n\n// Optional indicator pips\n//\n// Add an unordered list with the following class and add a list item for each\n// slide your carousel holds.\n\n.carousel-indicators {\n  position: absolute;\n  bottom: 10px;\n  left: 50%;\n  z-index: 15;\n  width: 60%;\n  margin-left: -30%;\n  padding-left: 0;\n  list-style: none;\n  text-align: center;\n\n  li {\n    display: inline-block;\n    width:  10px;\n    height: 10px;\n    margin: 1px;\n    text-indent: -999px;\n    border: 1px solid @carousel-indicator-border-color;\n    border-radius: 10px;\n    cursor: pointer;\n\n    // IE8-9 hack for event handling\n    //\n    // Internet Explorer 8-9 does not support clicks on elements without a set\n    // `background-color`. We cannot use `filter` since that's not viewed as a\n    // background color by the browser. Thus, a hack is needed.\n    // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer\n    //\n    // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we\n    // set alpha transparency for the best results possible.\n    background-color: #000 \\9; // IE8\n    background-color: rgba(0,0,0,0); // IE9\n  }\n  .active {\n    margin: 0;\n    width:  12px;\n    height: 12px;\n    background-color: @carousel-indicator-active-bg;\n  }\n}\n\n// Optional captions\n// -----------------------------\n// Hidden by default for smaller viewports\n.carousel-caption {\n  position: absolute;\n  left: 15%;\n  right: 15%;\n  bottom: 20px;\n  z-index: 10;\n  padding-top: 20px;\n  padding-bottom: 20px;\n  color: @carousel-caption-color;\n  text-align: center;\n  text-shadow: @carousel-text-shadow;\n  & .btn {\n    text-shadow: none; // No shadow for button elements in carousel-caption\n  }\n}\n\n\n// Scale up controls for tablets and up\n@media screen and (min-width: @screen-sm-min) {\n\n  // Scale up the controls a smidge\n  .carousel-control {\n    .glyphicon-chevron-left,\n    .glyphicon-chevron-right,\n    .icon-prev,\n    .icon-next {\n      width: (@carousel-control-font-size * 1.5);\n      height: (@carousel-control-font-size * 1.5);\n      margin-top: (@carousel-control-font-size / -2);\n      font-size: (@carousel-control-font-size * 1.5);\n    }\n    .glyphicon-chevron-left,\n    .icon-prev {\n      margin-left: (@carousel-control-font-size / -2);\n    }\n    .glyphicon-chevron-right,\n    .icon-next {\n      margin-right: (@carousel-control-font-size / -2);\n    }\n  }\n\n  // Show and left align the captions\n  .carousel-caption {\n    left: 20%;\n    right: 20%;\n    padding-bottom: 30px;\n  }\n\n  // Move up the indicators\n  .carousel-indicators {\n    bottom: 20px;\n  }\n}\n","// Clearfix\n//\n// For modern browsers\n// 1. The space content is one way to avoid an Opera bug when the\n//    contenteditable attribute is included anywhere else in the document.\n//    Otherwise it causes space to appear at the top and bottom of elements\n//    that are clearfixed.\n// 2. The use of `table` rather than `block` is only necessary if using\n//    `:before` to contain the top-margins of child elements.\n//\n// Source: http://nicolasgallagher.com/micro-clearfix-hack/\n\n.clearfix() {\n  &:before,\n  &:after {\n    content: \" \"; // 1\n    display: table; // 2\n  }\n  &:after {\n    clear: both;\n  }\n}\n","// Center-align a block level element\n\n.center-block() {\n  display: block;\n  margin-left: auto;\n  margin-right: auto;\n}\n","// CSS image replacement\n//\n// Heads up! v3 launched with only `.hide-text()`, but per our pattern for\n// mixins being reused as classes with the same name, this doesn't hold up. As\n// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.\n//\n// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757\n\n// Deprecated as of v3.0.1 (has been removed in v4)\n.hide-text() {\n  font: ~\"0/0\" a;\n  color: transparent;\n  text-shadow: none;\n  background-color: transparent;\n  border: 0;\n}\n\n// New mixin to use as of v3.0.1\n.text-hide() {\n  .hide-text();\n}\n","//\n// Responsive: Utility classes\n// --------------------------------------------------\n\n\n// IE10 in Windows (Phone) 8\n//\n// Support for responsive views via media queries is kind of borked in IE10, for\n// Surface/desktop in split view and for Windows Phone 8. This particular fix\n// must be accompanied by a snippet of JavaScript to sniff the user agent and\n// apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at\n// our Getting Started page for more information on this bug.\n//\n// For more information, see the following:\n//\n// Issue: https://github.com/twbs/bootstrap/issues/10497\n// Docs: http://getbootstrap.com/getting-started/#support-ie10-width\n// Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/\n// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/\n\n@-ms-viewport {\n  width: device-width;\n}\n\n\n// Visibility utilities\n// Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n  .responsive-invisibility();\n}\n\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n  display: none !important;\n}\n\n.visible-xs {\n  @media (max-width: @screen-xs-max) {\n    .responsive-visibility();\n  }\n}\n.visible-xs-block {\n  @media (max-width: @screen-xs-max) {\n    display: block !important;\n  }\n}\n.visible-xs-inline {\n  @media (max-width: @screen-xs-max) {\n    display: inline !important;\n  }\n}\n.visible-xs-inline-block {\n  @media (max-width: @screen-xs-max) {\n    display: inline-block !important;\n  }\n}\n\n.visible-sm {\n  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n    .responsive-visibility();\n  }\n}\n.visible-sm-block {\n  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n    display: block !important;\n  }\n}\n.visible-sm-inline {\n  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n    display: inline !important;\n  }\n}\n.visible-sm-inline-block {\n  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n    display: inline-block !important;\n  }\n}\n\n.visible-md {\n  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n    .responsive-visibility();\n  }\n}\n.visible-md-block {\n  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n    display: block !important;\n  }\n}\n.visible-md-inline {\n  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n    display: inline !important;\n  }\n}\n.visible-md-inline-block {\n  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n    display: inline-block !important;\n  }\n}\n\n.visible-lg {\n  @media (min-width: @screen-lg-min) {\n    .responsive-visibility();\n  }\n}\n.visible-lg-block {\n  @media (min-width: @screen-lg-min) {\n    display: block !important;\n  }\n}\n.visible-lg-inline {\n  @media (min-width: @screen-lg-min) {\n    display: inline !important;\n  }\n}\n.visible-lg-inline-block {\n  @media (min-width: @screen-lg-min) {\n    display: inline-block !important;\n  }\n}\n\n.hidden-xs {\n  @media (max-width: @screen-xs-max) {\n    .responsive-invisibility();\n  }\n}\n.hidden-sm {\n  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n    .responsive-invisibility();\n  }\n}\n.hidden-md {\n  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n    .responsive-invisibility();\n  }\n}\n.hidden-lg {\n  @media (min-width: @screen-lg-min) {\n    .responsive-invisibility();\n  }\n}\n\n\n// Print utilities\n//\n// Media queries are placed on the inside to be mixin-friendly.\n\n// Note: Deprecated .visible-print as of v3.2.0\n.visible-print {\n  .responsive-invisibility();\n\n  @media print {\n    .responsive-visibility();\n  }\n}\n.visible-print-block {\n  display: none !important;\n\n  @media print {\n    display: block !important;\n  }\n}\n.visible-print-inline {\n  display: none !important;\n\n  @media print {\n    display: inline !important;\n  }\n}\n.visible-print-inline-block {\n  display: none !important;\n\n  @media print {\n    display: inline-block !important;\n  }\n}\n\n.hidden-print {\n  @media print {\n    .responsive-invisibility();\n  }\n}\n","// Responsive utilities\n\n//\n// More easily include all the states for responsive-utilities.less.\n.responsive-visibility() {\n  display: block !important;\n  table&  { display: table !important; }\n  tr&     { display: table-row !important; }\n  th&,\n  td&     { display: table-cell !important; }\n}\n\n.responsive-invisibility() {\n  display: none !important;\n}\n"]}
Index: EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/ie10-viewport-bug-workaround.css
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/ie10-viewport-bug-workaround.css	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/css/ie10-viewport-bug-workaround.css	(revision 270)
@@ -0,0 +1,13 @@
+/*!
+ * IE10 viewport hack for Surface/desktop Windows 8 bug
+ * Copyright 2014-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+/*
+ * See the Getting Started docs for more information:
+ * http://getbootstrap.com/getting-started/#support-ie10-width
+ */
+@-ms-viewport     { width: device-width; }
+@-o-viewport      { width: device-width; }
+@viewport         { width: device-width; }
Index: EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/fonts/glyphicons-halflings-regular.svg
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/fonts/glyphicons-halflings-regular.svg	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/fonts/glyphicons-halflings-regular.svg	(revision 270)
@@ -0,0 +1,288 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
+<font-face units-per-em="1200" ascent="960" descent="-240" />
+<missing-glyph horiz-adv-x="500" />
+<glyph horiz-adv-x="0" />
+<glyph horiz-adv-x="400" />
+<glyph unicode=" " />
+<glyph unicode="*" d="M600 1100q15 0 34 -1.5t30 -3.5l11 -1q10 -2 17.5 -10.5t7.5 -18.5v-224l158 158q7 7 18 8t19 -6l106 -106q7 -8 6 -19t-8 -18l-158 -158h224q10 0 18.5 -7.5t10.5 -17.5q6 -41 6 -75q0 -15 -1.5 -34t-3.5 -30l-1 -11q-2 -10 -10.5 -17.5t-18.5 -7.5h-224l158 -158 q7 -7 8 -18t-6 -19l-106 -106q-8 -7 -19 -6t-18 8l-158 158v-224q0 -10 -7.5 -18.5t-17.5 -10.5q-41 -6 -75 -6q-15 0 -34 1.5t-30 3.5l-11 1q-10 2 -17.5 10.5t-7.5 18.5v224l-158 -158q-7 -7 -18 -8t-19 6l-106 106q-7 8 -6 19t8 18l158 158h-224q-10 0 -18.5 7.5 t-10.5 17.5q-6 41 -6 75q0 15 1.5 34t3.5 30l1 11q2 10 10.5 17.5t18.5 7.5h224l-158 158q-7 7 -8 18t6 19l106 106q8 7 19 6t18 -8l158 -158v224q0 10 7.5 18.5t17.5 10.5q41 6 75 6z" />
+<glyph unicode="+" d="M450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-350h350q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-350v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v350h-350q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5 h350v350q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xa0;" />
+<glyph unicode="&#xa5;" d="M825 1100h250q10 0 12.5 -5t-5.5 -13l-364 -364q-6 -6 -11 -18h268q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-100h275q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-174q0 -11 -7.5 -18.5t-18.5 -7.5h-148q-11 0 -18.5 7.5t-7.5 18.5v174 h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h125v100h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h118q-5 12 -11 18l-364 364q-8 8 -5.5 13t12.5 5h250q25 0 43 -18l164 -164q8 -8 18 -8t18 8l164 164q18 18 43 18z" />
+<glyph unicode="&#x2000;" horiz-adv-x="650" />
+<glyph unicode="&#x2001;" horiz-adv-x="1300" />
+<glyph unicode="&#x2002;" horiz-adv-x="650" />
+<glyph unicode="&#x2003;" horiz-adv-x="1300" />
+<glyph unicode="&#x2004;" horiz-adv-x="433" />
+<glyph unicode="&#x2005;" horiz-adv-x="325" />
+<glyph unicode="&#x2006;" horiz-adv-x="216" />
+<glyph unicode="&#x2007;" horiz-adv-x="216" />
+<glyph unicode="&#x2008;" horiz-adv-x="162" />
+<glyph unicode="&#x2009;" horiz-adv-x="260" />
+<glyph unicode="&#x200a;" horiz-adv-x="72" />
+<glyph unicode="&#x202f;" horiz-adv-x="260" />
+<glyph unicode="&#x205f;" horiz-adv-x="325" />
+<glyph unicode="&#x20ac;" d="M744 1198q242 0 354 -189q60 -104 66 -209h-181q0 45 -17.5 82.5t-43.5 61.5t-58 40.5t-60.5 24t-51.5 7.5q-19 0 -40.5 -5.5t-49.5 -20.5t-53 -38t-49 -62.5t-39 -89.5h379l-100 -100h-300q-6 -50 -6 -100h406l-100 -100h-300q9 -74 33 -132t52.5 -91t61.5 -54.5t59 -29 t47 -7.5q22 0 50.5 7.5t60.5 24.5t58 41t43.5 61t17.5 80h174q-30 -171 -128 -278q-107 -117 -274 -117q-206 0 -324 158q-36 48 -69 133t-45 204h-217l100 100h112q1 47 6 100h-218l100 100h134q20 87 51 153.5t62 103.5q117 141 297 141z" />
+<glyph unicode="&#x20bd;" d="M428 1200h350q67 0 120 -13t86 -31t57 -49.5t35 -56.5t17 -64.5t6.5 -60.5t0.5 -57v-16.5v-16.5q0 -36 -0.5 -57t-6.5 -61t-17 -65t-35 -57t-57 -50.5t-86 -31.5t-120 -13h-178l-2 -100h288q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-138v-175q0 -11 -5.5 -18 t-15.5 -7h-149q-10 0 -17.5 7.5t-7.5 17.5v175h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v100h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v475q0 10 7.5 17.5t17.5 7.5zM600 1000v-300h203q64 0 86.5 33t22.5 119q0 84 -22.5 116t-86.5 32h-203z" />
+<glyph unicode="&#x2212;" d="M250 700h800q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#x231b;" d="M1000 1200v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-50v-100q0 -91 -49.5 -165.5t-130.5 -109.5q81 -35 130.5 -109.5t49.5 -165.5v-150h50q21 0 35.5 -14.5t14.5 -35.5v-150h-800v150q0 21 14.5 35.5t35.5 14.5h50v150q0 91 49.5 165.5t130.5 109.5q-81 35 -130.5 109.5 t-49.5 165.5v100h-50q-21 0 -35.5 14.5t-14.5 35.5v150h800zM400 1000v-100q0 -60 32.5 -109.5t87.5 -73.5q28 -12 44 -37t16 -55t-16 -55t-44 -37q-55 -24 -87.5 -73.5t-32.5 -109.5v-150h400v150q0 60 -32.5 109.5t-87.5 73.5q-28 12 -44 37t-16 55t16 55t44 37 q55 24 87.5 73.5t32.5 109.5v100h-400z" />
+<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
+<glyph unicode="&#x2601;" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -206.5q0 -121 -85 -207.5t-205 -86.5h-750q-79 0 -135.5 57t-56.5 137q0 69 42.5 122.5t108.5 67.5q-2 12 -2 37q0 153 108 260.5t260 107.5z" />
+<glyph unicode="&#x26fa;" d="M774 1193.5q16 -9.5 20.5 -27t-5.5 -33.5l-136 -187l467 -746h30q20 0 35 -18.5t15 -39.5v-42h-1200v42q0 21 15 39.5t35 18.5h30l468 746l-135 183q-10 16 -5.5 34t20.5 28t34 5.5t28 -20.5l111 -148l112 150q9 16 27 20.5t34 -5zM600 200h377l-182 112l-195 534v-646z " />
+<glyph unicode="&#x2709;" d="M25 1100h1150q10 0 12.5 -5t-5.5 -13l-564 -567q-8 -8 -18 -8t-18 8l-564 567q-8 8 -5.5 13t12.5 5zM18 882l264 -264q8 -8 8 -18t-8 -18l-264 -264q-8 -8 -13 -5.5t-5 12.5v550q0 10 5 12.5t13 -5.5zM918 618l264 264q8 8 13 5.5t5 -12.5v-550q0 -10 -5 -12.5t-13 5.5 l-264 264q-8 8 -8 18t8 18zM818 482l364 -364q8 -8 5.5 -13t-12.5 -5h-1150q-10 0 -12.5 5t5.5 13l364 364q8 8 18 8t18 -8l164 -164q8 -8 18 -8t18 8l164 164q8 8 18 8t18 -8z" />
+<glyph unicode="&#x270f;" d="M1011 1210q19 0 33 -13l153 -153q13 -14 13 -33t-13 -33l-99 -92l-214 214l95 96q13 14 32 14zM1013 800l-615 -614l-214 214l614 614zM317 96l-333 -112l110 335z" />
+<glyph unicode="&#xe001;" d="M700 650v-550h250q21 0 35.5 -14.5t14.5 -35.5v-50h-800v50q0 21 14.5 35.5t35.5 14.5h250v550l-500 550h1200z" />
+<glyph unicode="&#xe002;" d="M368 1017l645 163q39 15 63 0t24 -49v-831q0 -55 -41.5 -95.5t-111.5 -63.5q-79 -25 -147 -4.5t-86 75t25.5 111.5t122.5 82q72 24 138 8v521l-600 -155v-606q0 -42 -44 -90t-109 -69q-79 -26 -147 -5.5t-86 75.5t25.5 111.5t122.5 82.5q72 24 138 7v639q0 38 14.5 59 t53.5 34z" />
+<glyph unicode="&#xe003;" d="M500 1191q100 0 191 -39t156.5 -104.5t104.5 -156.5t39 -191l-1 -2l1 -5q0 -141 -78 -262l275 -274q23 -26 22.5 -44.5t-22.5 -42.5l-59 -58q-26 -20 -46.5 -20t-39.5 20l-275 274q-119 -77 -261 -77l-5 1l-2 -1q-100 0 -191 39t-156.5 104.5t-104.5 156.5t-39 191 t39 191t104.5 156.5t156.5 104.5t191 39zM500 1022q-88 0 -162 -43t-117 -117t-43 -162t43 -162t117 -117t162 -43t162 43t117 117t43 162t-43 162t-117 117t-162 43z" />
+<glyph unicode="&#xe005;" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104z" />
+<glyph unicode="&#xe006;" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429z" />
+<glyph unicode="&#xe007;" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429zM477 700h-240l197 -142l-74 -226 l193 139l195 -140l-74 229l192 140h-234l-78 211z" />
+<glyph unicode="&#xe008;" d="M600 1200q124 0 212 -88t88 -212v-250q0 -46 -31 -98t-69 -52v-75q0 -10 6 -21.5t15 -17.5l358 -230q9 -5 15 -16.5t6 -21.5v-93q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v93q0 10 6 21.5t15 16.5l358 230q9 6 15 17.5t6 21.5v75q-38 0 -69 52 t-31 98v250q0 124 88 212t212 88z" />
+<glyph unicode="&#xe009;" d="M25 1100h1150q10 0 17.5 -7.5t7.5 -17.5v-1050q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v1050q0 10 7.5 17.5t17.5 7.5zM100 1000v-100h100v100h-100zM875 1000h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5t17.5 -7.5h550 q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM1000 1000v-100h100v100h-100zM100 800v-100h100v100h-100zM1000 800v-100h100v100h-100zM100 600v-100h100v100h-100zM1000 600v-100h100v100h-100zM875 500h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5 t17.5 -7.5h550q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM100 400v-100h100v100h-100zM1000 400v-100h100v100h-100zM100 200v-100h100v100h-100zM1000 200v-100h100v100h-100z" />
+<glyph unicode="&#xe010;" d="M50 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM50 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe011;" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM850 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 700h200q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5 t35.5 14.5z" />
+<glyph unicode="&#xe012;" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h700q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe013;" d="M465 477l571 571q8 8 18 8t17 -8l177 -177q8 -7 8 -17t-8 -18l-783 -784q-7 -8 -17.5 -8t-17.5 8l-384 384q-8 8 -8 18t8 17l177 177q7 8 17 8t18 -8l171 -171q7 -7 18 -7t18 7z" />
+<glyph unicode="&#xe014;" d="M904 1083l178 -179q8 -8 8 -18.5t-8 -17.5l-267 -268l267 -268q8 -7 8 -17.5t-8 -18.5l-178 -178q-8 -8 -18.5 -8t-17.5 8l-268 267l-268 -267q-7 -8 -17.5 -8t-18.5 8l-178 178q-8 8 -8 18.5t8 17.5l267 268l-267 268q-8 7 -8 17.5t8 18.5l178 178q8 8 18.5 8t17.5 -8 l268 -267l268 268q7 7 17.5 7t18.5 -7z" />
+<glyph unicode="&#xe015;" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM425 900h150q10 0 17.5 -7.5t7.5 -17.5v-75h75q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5 t-17.5 -7.5h-75v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-75q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v75q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe016;" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM325 800h350q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-350q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe017;" d="M550 1200h100q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM800 975v166q167 -62 272 -209.5t105 -331.5q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5 t-184.5 123t-123 184.5t-45.5 224q0 184 105 331.5t272 209.5v-166q-103 -55 -165 -155t-62 -220q0 -116 57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5q0 120 -62 220t-165 155z" />
+<glyph unicode="&#xe018;" d="M1025 1200h150q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM725 800h150q10 0 17.5 -7.5t7.5 -17.5v-750q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v750 q0 10 7.5 17.5t17.5 7.5zM425 500h150q10 0 17.5 -7.5t7.5 -17.5v-450q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v450q0 10 7.5 17.5t17.5 7.5zM125 300h150q10 0 17.5 -7.5t7.5 -17.5v-250q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5 v250q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe019;" d="M600 1174q33 0 74 -5l38 -152l5 -1q49 -14 94 -39l5 -2l134 80q61 -48 104 -105l-80 -134l3 -5q25 -44 39 -93l1 -6l152 -38q5 -43 5 -73q0 -34 -5 -74l-152 -38l-1 -6q-15 -49 -39 -93l-3 -5l80 -134q-48 -61 -104 -105l-134 81l-5 -3q-44 -25 -94 -39l-5 -2l-38 -151 q-43 -5 -74 -5q-33 0 -74 5l-38 151l-5 2q-49 14 -94 39l-5 3l-134 -81q-60 48 -104 105l80 134l-3 5q-25 45 -38 93l-2 6l-151 38q-6 42 -6 74q0 33 6 73l151 38l2 6q13 48 38 93l3 5l-80 134q47 61 105 105l133 -80l5 2q45 25 94 39l5 1l38 152q43 5 74 5zM600 815 q-89 0 -152 -63t-63 -151.5t63 -151.5t152 -63t152 63t63 151.5t-63 151.5t-152 63z" />
+<glyph unicode="&#xe020;" d="M500 1300h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-75h-1100v75q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5zM500 1200v-100h300v100h-300zM1100 900v-800q0 -41 -29.5 -70.5t-70.5 -29.5h-700q-41 0 -70.5 29.5t-29.5 70.5 v800h900zM300 800v-700h100v700h-100zM500 800v-700h100v700h-100zM700 800v-700h100v700h-100zM900 800v-700h100v700h-100z" />
+<glyph unicode="&#xe021;" d="M18 618l620 608q8 7 18.5 7t17.5 -7l608 -608q8 -8 5.5 -13t-12.5 -5h-175v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v375h-300v-375q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v575h-175q-10 0 -12.5 5t5.5 13z" />
+<glyph unicode="&#xe022;" d="M600 1200v-400q0 -41 29.5 -70.5t70.5 -29.5h300v-650q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5h450zM1000 800h-250q-21 0 -35.5 14.5t-14.5 35.5v250z" />
+<glyph unicode="&#xe023;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h50q10 0 17.5 -7.5t7.5 -17.5v-275h175q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe024;" d="M1300 0h-538l-41 400h-242l-41 -400h-538l431 1200h209l-21 -300h162l-20 300h208zM515 800l-27 -300h224l-27 300h-170z" />
+<glyph unicode="&#xe025;" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-450h191q20 0 25.5 -11.5t-7.5 -27.5l-327 -400q-13 -16 -32 -16t-32 16l-327 400q-13 16 -7.5 27.5t25.5 11.5h191v450q0 21 14.5 35.5t35.5 14.5zM1125 400h50q10 0 17.5 -7.5t7.5 -17.5v-350q0 -10 -7.5 -17.5t-17.5 -7.5 h-1050q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h50q10 0 17.5 -7.5t7.5 -17.5v-175h900v175q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe026;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -275q-13 -16 -32 -16t-32 16l-223 275q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z " />
+<glyph unicode="&#xe027;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM632 914l223 -275q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5l223 275q13 16 32 16 t32 -16z" />
+<glyph unicode="&#xe028;" d="M225 1200h750q10 0 19.5 -7t12.5 -17l186 -652q7 -24 7 -49v-425q0 -12 -4 -27t-9 -17q-12 -6 -37 -6h-1100q-12 0 -27 4t-17 8q-6 13 -6 38l1 425q0 25 7 49l185 652q3 10 12.5 17t19.5 7zM878 1000h-556q-10 0 -19 -7t-11 -18l-87 -450q-2 -11 4 -18t16 -7h150 q10 0 19.5 -7t11.5 -17l38 -152q2 -10 11.5 -17t19.5 -7h250q10 0 19.5 7t11.5 17l38 152q2 10 11.5 17t19.5 7h150q10 0 16 7t4 18l-87 450q-2 11 -11 18t-19 7z" />
+<glyph unicode="&#xe029;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM540 820l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
+<glyph unicode="&#xe030;" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-362q0 -10 -7.5 -17.5t-17.5 -7.5h-362q-11 0 -13 5.5t5 12.5l133 133q-109 76 -238 76q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5h150q0 -117 -45.5 -224 t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117z" />
+<glyph unicode="&#xe031;" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-361q0 -11 -7.5 -18.5t-18.5 -7.5h-361q-11 0 -13 5.5t5 12.5l134 134q-110 75 -239 75q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5h-150q0 117 45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117zM1027 600h150 q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5q-192 0 -348 118l-134 -134q-7 -8 -12.5 -5.5t-5.5 12.5v360q0 11 7.5 18.5t18.5 7.5h360q10 0 12.5 -5.5t-5.5 -12.5l-133 -133q110 -76 240 -76q116 0 214.5 57t155.5 155.5t57 214.5z" />
+<glyph unicode="&#xe032;" d="M125 1200h1050q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-1050q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM1075 1000h-850q-10 0 -17.5 -7.5t-7.5 -17.5v-850q0 -10 7.5 -17.5t17.5 -7.5h850q10 0 17.5 7.5t7.5 17.5v850 q0 10 -7.5 17.5t-17.5 7.5zM325 900h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 900h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 700h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 700h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 500h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 500h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 300h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 300h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe033;" d="M900 800v200q0 83 -58.5 141.5t-141.5 58.5h-300q-82 0 -141 -59t-59 -141v-200h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h900q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-100zM400 800v150q0 21 15 35.5t35 14.5h200 q20 0 35 -14.5t15 -35.5v-150h-300z" />
+<glyph unicode="&#xe034;" d="M125 1100h50q10 0 17.5 -7.5t7.5 -17.5v-1075h-100v1075q0 10 7.5 17.5t17.5 7.5zM1075 1052q4 0 9 -2q16 -6 16 -23v-421q0 -6 -3 -12q-33 -59 -66.5 -99t-65.5 -58t-56.5 -24.5t-52.5 -6.5q-26 0 -57.5 6.5t-52.5 13.5t-60 21q-41 15 -63 22.5t-57.5 15t-65.5 7.5 q-85 0 -160 -57q-7 -5 -15 -5q-6 0 -11 3q-14 7 -14 22v438q22 55 82 98.5t119 46.5q23 2 43 0.5t43 -7t32.5 -8.5t38 -13t32.5 -11q41 -14 63.5 -21t57 -14t63.5 -7q103 0 183 87q7 8 18 8z" />
+<glyph unicode="&#xe035;" d="M600 1175q116 0 227 -49.5t192.5 -131t131 -192.5t49.5 -227v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v300q0 127 -70.5 231.5t-184.5 161.5t-245 57t-245 -57t-184.5 -161.5t-70.5 -231.5v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50 q-10 0 -17.5 7.5t-7.5 17.5v300q0 116 49.5 227t131 192.5t192.5 131t227 49.5zM220 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460q0 8 6 14t14 6zM820 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460 q0 8 6 14t14 6z" />
+<glyph unicode="&#xe036;" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM900 668l120 120q7 7 17 7t17 -7l34 -34q7 -7 7 -17t-7 -17l-120 -120l120 -120q7 -7 7 -17 t-7 -17l-34 -34q-7 -7 -17 -7t-17 7l-120 119l-120 -119q-7 -7 -17 -7t-17 7l-34 34q-7 7 -7 17t7 17l119 120l-119 120q-7 7 -7 17t7 17l34 34q7 8 17 8t17 -8z" />
+<glyph unicode="&#xe037;" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6 l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238q-6 8 -4.5 18t9.5 17l29 22q7 5 15 5z" />
+<glyph unicode="&#xe038;" d="M967 1004h3q11 -1 17 -10q135 -179 135 -396q0 -105 -34 -206.5t-98 -185.5q-7 -9 -17 -10h-3q-9 0 -16 6l-42 34q-8 6 -9 16t5 18q111 150 111 328q0 90 -29.5 176t-84.5 157q-6 9 -5 19t10 16l42 33q7 5 15 5zM321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5 t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238 q-6 8 -4.5 18.5t9.5 16.5l29 22q7 5 15 5z" />
+<glyph unicode="&#xe039;" d="M500 900h100v-100h-100v-100h-400v-100h-100v600h500v-300zM1200 700h-200v-100h200v-200h-300v300h-200v300h-100v200h600v-500zM100 1100v-300h300v300h-300zM800 1100v-300h300v300h-300zM300 900h-100v100h100v-100zM1000 900h-100v100h100v-100zM300 500h200v-500 h-500v500h200v100h100v-100zM800 300h200v-100h-100v-100h-200v100h-100v100h100v200h-200v100h300v-300zM100 400v-300h300v300h-300zM300 200h-100v100h100v-100zM1200 200h-100v100h100v-100zM700 0h-100v100h100v-100zM1200 0h-300v100h300v-100z" />
+<glyph unicode="&#xe040;" d="M100 200h-100v1000h100v-1000zM300 200h-100v1000h100v-1000zM700 200h-200v1000h200v-1000zM900 200h-100v1000h100v-1000zM1200 200h-200v1000h200v-1000zM400 0h-300v100h300v-100zM600 0h-100v91h100v-91zM800 0h-100v91h100v-91zM1100 0h-200v91h200v-91z" />
+<glyph unicode="&#xe041;" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
+<glyph unicode="&#xe042;" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM800 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-56 56l424 426l-700 700h150zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5 t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
+<glyph unicode="&#xe043;" d="M300 1200h825q75 0 75 -75v-900q0 -25 -18 -43l-64 -64q-8 -8 -13 -5.5t-5 12.5v950q0 10 -7.5 17.5t-17.5 7.5h-700q-25 0 -43 -18l-64 -64q-8 -8 -5.5 -13t12.5 -5h700q10 0 17.5 -7.5t7.5 -17.5v-950q0 -10 -7.5 -17.5t-17.5 -7.5h-850q-10 0 -17.5 7.5t-7.5 17.5v975 q0 25 18 43l139 139q18 18 43 18z" />
+<glyph unicode="&#xe044;" d="M250 1200h800q21 0 35.5 -14.5t14.5 -35.5v-1150l-450 444l-450 -445v1151q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe045;" d="M822 1200h-444q-11 0 -19 -7.5t-9 -17.5l-78 -301q-7 -24 7 -45l57 -108q6 -9 17.5 -15t21.5 -6h450q10 0 21.5 6t17.5 15l62 108q14 21 7 45l-83 301q-1 10 -9 17.5t-19 7.5zM1175 800h-150q-10 0 -21 -6.5t-15 -15.5l-78 -156q-4 -9 -15 -15.5t-21 -6.5h-550 q-10 0 -21 6.5t-15 15.5l-78 156q-4 9 -15 15.5t-21 6.5h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-650q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h750q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5 t7.5 17.5v650q0 10 -7.5 17.5t-17.5 7.5zM850 200h-500q-10 0 -19.5 -7t-11.5 -17l-38 -152q-2 -10 3.5 -17t15.5 -7h600q10 0 15.5 7t3.5 17l-38 152q-2 10 -11.5 17t-19.5 7z" />
+<glyph unicode="&#xe046;" d="M500 1100h200q56 0 102.5 -20.5t72.5 -50t44 -59t25 -50.5l6 -20h150q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5h150q2 8 6.5 21.5t24 48t45 61t72 48t102.5 21.5zM900 800v-100 h100v100h-100zM600 730q-95 0 -162.5 -67.5t-67.5 -162.5t67.5 -162.5t162.5 -67.5t162.5 67.5t67.5 162.5t-67.5 162.5t-162.5 67.5zM600 603q43 0 73 -30t30 -73t-30 -73t-73 -30t-73 30t-30 73t30 73t73 30z" />
+<glyph unicode="&#xe047;" d="M681 1199l385 -998q20 -50 60 -92q18 -19 36.5 -29.5t27.5 -11.5l10 -2v-66h-417v66q53 0 75 43.5t5 88.5l-82 222h-391q-58 -145 -92 -234q-11 -34 -6.5 -57t25.5 -37t46 -20t55 -6v-66h-365v66q56 24 84 52q12 12 25 30.5t20 31.5l7 13l399 1006h93zM416 521h340 l-162 457z" />
+<glyph unicode="&#xe048;" d="M753 641q5 -1 14.5 -4.5t36 -15.5t50.5 -26.5t53.5 -40t50.5 -54.5t35.5 -70t14.5 -87q0 -67 -27.5 -125.5t-71.5 -97.5t-98.5 -66.5t-108.5 -40.5t-102 -13h-500v89q41 7 70.5 32.5t29.5 65.5v827q0 24 -0.5 34t-3.5 24t-8.5 19.5t-17 13.5t-28 12.5t-42.5 11.5v71 l471 -1q57 0 115.5 -20.5t108 -57t80.5 -94t31 -124.5q0 -51 -15.5 -96.5t-38 -74.5t-45 -50.5t-38.5 -30.5zM400 700h139q78 0 130.5 48.5t52.5 122.5q0 41 -8.5 70.5t-29.5 55.5t-62.5 39.5t-103.5 13.5h-118v-350zM400 200h216q80 0 121 50.5t41 130.5q0 90 -62.5 154.5 t-156.5 64.5h-159v-400z" />
+<glyph unicode="&#xe049;" d="M877 1200l2 -57q-83 -19 -116 -45.5t-40 -66.5l-132 -839q-9 -49 13 -69t96 -26v-97h-500v97q186 16 200 98l173 832q3 17 3 30t-1.5 22.5t-9 17.5t-13.5 12.5t-21.5 10t-26 8.5t-33.5 10q-13 3 -19 5v57h425z" />
+<glyph unicode="&#xe050;" d="M1300 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM175 1000h-75v-800h75l-125 -167l-125 167h75v800h-75l125 167z" />
+<glyph unicode="&#xe051;" d="M1100 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-650q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v650h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM1167 50l-167 -125v75h-800v-75l-167 125l167 125v-75h800v75z" />
+<glyph unicode="&#xe052;" d="M50 1100h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe053;" d="M250 1100h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM250 500h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe054;" d="M500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000 q-21 0 -35.5 14.5t-14.5 35.5zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5zM0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5z" />
+<glyph unicode="&#xe055;" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe056;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 1100h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 800h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 500h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 500h800q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 200h800 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe057;" d="M400 0h-100v1100h100v-1100zM550 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM267 550l-167 -125v75h-200v100h200v75zM550 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe058;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM900 0h-100v1100h100v-1100zM50 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM1100 600h200v-100h-200v-75l-167 125l167 125v-75zM50 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe059;" d="M75 1000h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53v650q0 31 22 53t53 22zM1200 300l-300 300l300 300v-600z" />
+<glyph unicode="&#xe060;" d="M44 1100h1112q18 0 31 -13t13 -31v-1012q0 -18 -13 -31t-31 -13h-1112q-18 0 -31 13t-13 31v1012q0 18 13 31t31 13zM100 1000v-737l247 182l298 -131l-74 156l293 318l236 -288v500h-1000zM342 884q56 0 95 -39t39 -94.5t-39 -95t-95 -39.5t-95 39.5t-39 95t39 94.5 t95 39z" />
+<glyph unicode="&#xe062;" d="M648 1169q117 0 216 -60t156.5 -161t57.5 -218q0 -115 -70 -258q-69 -109 -158 -225.5t-143 -179.5l-54 -62q-9 8 -25.5 24.5t-63.5 67.5t-91 103t-98.5 128t-95.5 148q-60 132 -60 249q0 88 34 169.5t91.5 142t137 96.5t166.5 36zM652.5 974q-91.5 0 -156.5 -65 t-65 -157t65 -156.5t156.5 -64.5t156.5 64.5t65 156.5t-65 157t-156.5 65z" />
+<glyph unicode="&#xe063;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 173v854q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57z" />
+<glyph unicode="&#xe064;" d="M554 1295q21 -72 57.5 -143.5t76 -130t83 -118t82.5 -117t70 -116t49.5 -126t18.5 -136.5q0 -71 -25.5 -135t-68.5 -111t-99 -82t-118.5 -54t-125.5 -23q-84 5 -161.5 34t-139.5 78.5t-99 125t-37 164.5q0 69 18 136.5t49.5 126.5t69.5 116.5t81.5 117.5t83.5 119 t76.5 131t58.5 143zM344 710q-23 -33 -43.5 -70.5t-40.5 -102.5t-17 -123q1 -37 14.5 -69.5t30 -52t41 -37t38.5 -24.5t33 -15q21 -7 32 -1t13 22l6 34q2 10 -2.5 22t-13.5 19q-5 4 -14 12t-29.5 40.5t-32.5 73.5q-26 89 6 271q2 11 -6 11q-8 1 -15 -10z" />
+<glyph unicode="&#xe065;" d="M1000 1013l108 115q2 1 5 2t13 2t20.5 -1t25 -9.5t28.5 -21.5q22 -22 27 -43t0 -32l-6 -10l-108 -115zM350 1100h400q50 0 105 -13l-187 -187h-368q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v182l200 200v-332 q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM1009 803l-362 -362l-161 -50l55 170l355 355z" />
+<glyph unicode="&#xe066;" d="M350 1100h361q-164 -146 -216 -200h-195q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-103q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M824 1073l339 -301q8 -7 8 -17.5t-8 -17.5l-340 -306q-7 -6 -12.5 -4t-6.5 11v203q-26 1 -54.5 0t-78.5 -7.5t-92 -17.5t-86 -35t-70 -57q10 59 33 108t51.5 81.5t65 58.5t68.5 40.5t67 24.5t56 13.5t40 4.5v210q1 10 6.5 12.5t13.5 -4.5z" />
+<glyph unicode="&#xe067;" d="M350 1100h350q60 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-219q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M643 639l395 395q7 7 17.5 7t17.5 -7l101 -101q7 -7 7 -17.5t-7 -17.5l-531 -532q-7 -7 -17.5 -7t-17.5 7l-248 248q-7 7 -7 17.5t7 17.5l101 101q7 7 17.5 7t17.5 -7l111 -111q8 -7 18 -7t18 7z" />
+<glyph unicode="&#xe068;" d="M318 918l264 264q8 8 18 8t18 -8l260 -264q7 -8 4.5 -13t-12.5 -5h-170v-200h200v173q0 10 5 12t13 -5l264 -260q8 -7 8 -17.5t-8 -17.5l-264 -265q-8 -7 -13 -5t-5 12v173h-200v-200h170q10 0 12.5 -5t-4.5 -13l-260 -264q-8 -8 -18 -8t-18 8l-264 264q-8 8 -5.5 13 t12.5 5h175v200h-200v-173q0 -10 -5 -12t-13 5l-264 265q-8 7 -8 17.5t8 17.5l264 260q8 7 13 5t5 -12v-173h200v200h-175q-10 0 -12.5 5t5.5 13z" />
+<glyph unicode="&#xe069;" d="M250 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe070;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5 t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe071;" d="M1200 1050v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-492 480q-15 14 -15 35t15 35l492 480q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25z" />
+<glyph unicode="&#xe072;" d="M243 1074l814 -498q18 -11 18 -26t-18 -26l-814 -498q-18 -11 -30.5 -4t-12.5 28v1000q0 21 12.5 28t30.5 -4z" />
+<glyph unicode="&#xe073;" d="M250 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM650 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800 q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe074;" d="M1100 950v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5z" />
+<glyph unicode="&#xe075;" d="M500 612v438q0 21 10.5 25t25.5 -10l492 -480q15 -14 15 -35t-15 -35l-492 -480q-15 -14 -25.5 -10t-10.5 25v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10z" />
+<glyph unicode="&#xe076;" d="M1048 1102l100 1q20 0 35 -14.5t15 -35.5l5 -1000q0 -21 -14.5 -35.5t-35.5 -14.5l-100 -1q-21 0 -35.5 14.5t-14.5 35.5l-2 437l-463 -454q-14 -15 -24.5 -10.5t-10.5 25.5l-2 437l-462 -455q-15 -14 -25.5 -9.5t-10.5 24.5l-5 1000q0 21 10.5 25.5t25.5 -10.5l466 -450 l-2 438q0 20 10.5 24.5t25.5 -9.5l466 -451l-2 438q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe077;" d="M850 1100h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10l464 -453v438q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe078;" d="M686 1081l501 -540q15 -15 10.5 -26t-26.5 -11h-1042q-22 0 -26.5 11t10.5 26l501 540q15 15 36 15t36 -15zM150 400h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe079;" d="M885 900l-352 -353l352 -353l-197 -198l-552 552l552 550z" />
+<glyph unicode="&#xe080;" d="M1064 547l-551 -551l-198 198l353 353l-353 353l198 198z" />
+<glyph unicode="&#xe081;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM650 900h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-150 q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5h150v-150q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v150h150q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-150v150q0 21 -14.5 35.5t-35.5 14.5z" />
+<glyph unicode="&#xe082;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM850 700h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5 t35.5 -14.5h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5z" />
+<glyph unicode="&#xe083;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM741.5 913q-12.5 0 -21.5 -9l-120 -120l-120 120q-9 9 -21.5 9 t-21.5 -9l-141 -141q-9 -9 -9 -21.5t9 -21.5l120 -120l-120 -120q-9 -9 -9 -21.5t9 -21.5l141 -141q9 -9 21.5 -9t21.5 9l120 120l120 -120q9 -9 21.5 -9t21.5 9l141 141q9 9 9 21.5t-9 21.5l-120 120l120 120q9 9 9 21.5t-9 21.5l-141 141q-9 9 -21.5 9z" />
+<glyph unicode="&#xe084;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM546 623l-84 85q-7 7 -17.5 7t-18.5 -7l-139 -139q-7 -8 -7 -18t7 -18 l242 -241q7 -8 17.5 -8t17.5 8l375 375q7 7 7 17.5t-7 18.5l-139 139q-7 7 -17.5 7t-17.5 -7z" />
+<glyph unicode="&#xe085;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM588 941q-29 0 -59 -5.5t-63 -20.5t-58 -38.5t-41.5 -63t-16.5 -89.5 q0 -25 20 -25h131q30 -5 35 11q6 20 20.5 28t45.5 8q20 0 31.5 -10.5t11.5 -28.5q0 -23 -7 -34t-26 -18q-1 0 -13.5 -4t-19.5 -7.5t-20 -10.5t-22 -17t-18.5 -24t-15.5 -35t-8 -46q-1 -8 5.5 -16.5t20.5 -8.5h173q7 0 22 8t35 28t37.5 48t29.5 74t12 100q0 47 -17 83 t-42.5 57t-59.5 34.5t-64 18t-59 4.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe086;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM675 1000h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5 t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5zM675 700h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h75v-200h-75q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h350q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5 t-17.5 7.5h-75v275q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe087;" d="M525 1200h150q10 0 17.5 -7.5t7.5 -17.5v-194q103 -27 178.5 -102.5t102.5 -178.5h194q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-194q-27 -103 -102.5 -178.5t-178.5 -102.5v-194q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v194 q-103 27 -178.5 102.5t-102.5 178.5h-194q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h194q27 103 102.5 178.5t178.5 102.5v194q0 10 7.5 17.5t17.5 7.5zM700 893v-168q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v168q-68 -23 -119 -74 t-74 -119h168q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-168q23 -68 74 -119t119 -74v168q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-168q68 23 119 74t74 119h-168q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h168 q-23 68 -74 119t-119 74z" />
+<glyph unicode="&#xe088;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM759 823l64 -64q7 -7 7 -17.5t-7 -17.5l-124 -124l124 -124q7 -7 7 -17.5t-7 -17.5l-64 -64q-7 -7 -17.5 -7t-17.5 7l-124 124l-124 -124q-7 -7 -17.5 -7t-17.5 7l-64 64 q-7 7 -7 17.5t7 17.5l124 124l-124 124q-7 7 -7 17.5t7 17.5l64 64q7 7 17.5 7t17.5 -7l124 -124l124 124q7 7 17.5 7t17.5 -7z" />
+<glyph unicode="&#xe089;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM782 788l106 -106q7 -7 7 -17.5t-7 -17.5l-320 -321q-8 -7 -18 -7t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l197 197q7 7 17.5 7t17.5 -7z" />
+<glyph unicode="&#xe090;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5q0 -120 65 -225 l587 587q-105 65 -225 65zM965 819l-584 -584q104 -62 219 -62q116 0 214.5 57t155.5 155.5t57 214.5q0 115 -62 219z" />
+<glyph unicode="&#xe091;" d="M39 582l522 427q16 13 27.5 8t11.5 -26v-291h550q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-550v-291q0 -21 -11.5 -26t-27.5 8l-522 427q-16 13 -16 32t16 32z" />
+<glyph unicode="&#xe092;" d="M639 1009l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291h-550q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h550v291q0 21 11.5 26t27.5 -8z" />
+<glyph unicode="&#xe093;" d="M682 1161l427 -522q13 -16 8 -27.5t-26 -11.5h-291v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v550h-291q-21 0 -26 11.5t8 27.5l427 522q13 16 32 16t32 -16z" />
+<glyph unicode="&#xe094;" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-550h291q21 0 26 -11.5t-8 -27.5l-427 -522q-13 -16 -32 -16t-32 16l-427 522q-13 16 -8 27.5t26 11.5h291v550q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe095;" d="M639 1109l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291q-94 -2 -182 -20t-170.5 -52t-147 -92.5t-100.5 -135.5q5 105 27 193.5t67.5 167t113 135t167 91.5t225.5 42v262q0 21 11.5 26t27.5 -8z" />
+<glyph unicode="&#xe096;" d="M850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5zM350 0h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249 q8 7 18 7t18 -7l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5z" />
+<glyph unicode="&#xe097;" d="M1014 1120l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249q8 7 18 7t18 -7zM250 600h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5z" />
+<glyph unicode="&#xe101;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM704 900h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5 t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe102;" d="M260 1200q9 0 19 -2t15 -4l5 -2q22 -10 44 -23l196 -118q21 -13 36 -24q29 -21 37 -12q11 13 49 35l196 118q22 13 45 23q17 7 38 7q23 0 47 -16.5t37 -33.5l13 -16q14 -21 18 -45l25 -123l8 -44q1 -9 8.5 -14.5t17.5 -5.5h61q10 0 17.5 -7.5t7.5 -17.5v-50 q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 -7.5t-7.5 -17.5v-175h-400v300h-200v-300h-400v175q0 10 -7.5 17.5t-17.5 7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5h61q11 0 18 3t7 8q0 4 9 52l25 128q5 25 19 45q2 3 5 7t13.5 15t21.5 19.5t26.5 15.5 t29.5 7zM915 1079l-166 -162q-7 -7 -5 -12t12 -5h219q10 0 15 7t2 17l-51 149q-3 10 -11 12t-15 -6zM463 917l-177 157q-8 7 -16 5t-11 -12l-51 -143q-3 -10 2 -17t15 -7h231q11 0 12.5 5t-5.5 12zM500 0h-375q-10 0 -17.5 7.5t-7.5 17.5v375h400v-400zM1100 400v-375 q0 -10 -7.5 -17.5t-17.5 -7.5h-375v400h400z" />
+<glyph unicode="&#xe103;" d="M1165 1190q8 3 21 -6.5t13 -17.5q-2 -178 -24.5 -323.5t-55.5 -245.5t-87 -174.5t-102.5 -118.5t-118 -68.5t-118.5 -33t-120 -4.5t-105 9.5t-90 16.5q-61 12 -78 11q-4 1 -12.5 0t-34 -14.5t-52.5 -40.5l-153 -153q-26 -24 -37 -14.5t-11 43.5q0 64 42 102q8 8 50.5 45 t66.5 58q19 17 35 47t13 61q-9 55 -10 102.5t7 111t37 130t78 129.5q39 51 80 88t89.5 63.5t94.5 45t113.5 36t129 31t157.5 37t182 47.5zM1116 1098q-8 9 -22.5 -3t-45.5 -50q-38 -47 -119 -103.5t-142 -89.5l-62 -33q-56 -30 -102 -57t-104 -68t-102.5 -80.5t-85.5 -91 t-64 -104.5q-24 -56 -31 -86t2 -32t31.5 17.5t55.5 59.5q25 30 94 75.5t125.5 77.5t147.5 81q70 37 118.5 69t102 79.5t99 111t86.5 148.5q22 50 24 60t-6 19z" />
+<glyph unicode="&#xe104;" d="M653 1231q-39 -67 -54.5 -131t-10.5 -114.5t24.5 -96.5t47.5 -80t63.5 -62.5t68.5 -46.5t65 -30q-4 7 -17.5 35t-18.5 39.5t-17 39.5t-17 43t-13 42t-9.5 44.5t-2 42t4 43t13.5 39t23 38.5q96 -42 165 -107.5t105 -138t52 -156t13 -159t-19 -149.5q-13 -55 -44 -106.5 t-68 -87t-78.5 -64.5t-72.5 -45t-53 -22q-72 -22 -127 -11q-31 6 -13 19q6 3 17 7q13 5 32.5 21t41 44t38.5 63.5t21.5 81.5t-6.5 94.5t-50 107t-104 115.5q10 -104 -0.5 -189t-37 -140.5t-65 -93t-84 -52t-93.5 -11t-95 24.5q-80 36 -131.5 114t-53.5 171q-2 23 0 49.5 t4.5 52.5t13.5 56t27.5 60t46 64.5t69.5 68.5q-8 -53 -5 -102.5t17.5 -90t34 -68.5t44.5 -39t49 -2q31 13 38.5 36t-4.5 55t-29 64.5t-36 75t-26 75.5q-15 85 2 161.5t53.5 128.5t85.5 92.5t93.5 61t81.5 25.5z" />
+<glyph unicode="&#xe105;" d="M600 1094q82 0 160.5 -22.5t140 -59t116.5 -82.5t94.5 -95t68 -95t42.5 -82.5t14 -57.5t-14 -57.5t-43 -82.5t-68.5 -95t-94.5 -95t-116.5 -82.5t-140 -59t-159.5 -22.5t-159.5 22.5t-140 59t-116.5 82.5t-94.5 95t-68.5 95t-43 82.5t-14 57.5t14 57.5t42.5 82.5t68 95 t94.5 95t116.5 82.5t140 59t160.5 22.5zM888 829q-15 15 -18 12t5 -22q25 -57 25 -119q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 59 23 114q8 19 4.5 22t-17.5 -12q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q22 -36 47 -71t70 -82t92.5 -81t113 -58.5t133.5 -24.5 t133.5 24t113 58.5t92.5 81.5t70 81.5t47 70.5q11 18 9 42.5t-14 41.5q-90 117 -163 189zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l35 34q14 15 12.5 33.5t-16.5 33.5q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
+<glyph unicode="&#xe106;" d="M592 0h-148l31 120q-91 20 -175.5 68.5t-143.5 106.5t-103.5 119t-66.5 110t-22 76q0 21 14 57.5t42.5 82.5t68 95t94.5 95t116.5 82.5t140 59t160.5 22.5q61 0 126 -15l32 121h148zM944 770l47 181q108 -85 176.5 -192t68.5 -159q0 -26 -19.5 -71t-59.5 -102t-93 -112 t-129 -104.5t-158 -75.5l46 173q77 49 136 117t97 131q11 18 9 42.5t-14 41.5q-54 70 -107 130zM310 824q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q18 -30 39 -60t57 -70.5t74 -73t90 -61t105 -41.5l41 154q-107 18 -178.5 101.5t-71.5 193.5q0 59 23 114q8 19 4.5 22 t-17.5 -12zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l12 11l22 86l-3 4q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
+<glyph unicode="&#xe107;" d="M-90 100l642 1066q20 31 48 28.5t48 -35.5l642 -1056q21 -32 7.5 -67.5t-50.5 -35.5h-1294q-37 0 -50.5 34t7.5 66zM155 200h345v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h345l-445 723zM496 700h208q20 0 32 -14.5t8 -34.5l-58 -252 q-4 -20 -21.5 -34.5t-37.5 -14.5h-54q-20 0 -37.5 14.5t-21.5 34.5l-58 252q-4 20 8 34.5t32 14.5z" />
+<glyph unicode="&#xe108;" d="M650 1200q62 0 106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -93 100 -113v-64q0 -21 -13 -29t-32 1l-205 128l-205 -128q-19 -9 -32 -1t-13 29v64q0 20 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5v41 q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44z" />
+<glyph unicode="&#xe109;" d="M850 1200h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-150h-1100v150q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-50h500v50q0 21 14.5 35.5t35.5 14.5zM1100 800v-750q0 -21 -14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v750h1100zM100 600v-100h100v100h-100zM300 600v-100h100v100h-100zM500 600v-100h100v100h-100zM700 600v-100h100v100h-100zM900 600v-100h100v100h-100zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400 v-100h100v100h-100zM700 400v-100h100v100h-100zM900 400v-100h100v100h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100zM500 200v-100h100v100h-100zM700 200v-100h100v100h-100zM900 200v-100h100v100h-100z" />
+<glyph unicode="&#xe110;" d="M1135 1165l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-159l-600 -600h-291q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h209l600 600h241v150q0 21 10.5 25t24.5 -10zM522 819l-141 -141l-122 122h-209q-21 0 -35.5 14.5 t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h291zM1135 565l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-241l-181 181l141 141l122 -122h159v150q0 21 10.5 25t24.5 -10z" />
+<glyph unicode="&#xe111;" d="M100 1100h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5z" />
+<glyph unicode="&#xe112;" d="M150 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM850 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM1100 800v-300q0 -41 -3 -77.5t-15 -89.5t-32 -96t-58 -89t-89 -77t-129 -51t-174 -20t-174 20 t-129 51t-89 77t-58 89t-32 96t-15 89.5t-3 77.5v300h300v-250v-27v-42.5t1.5 -41t5 -38t10 -35t16.5 -30t25.5 -24.5t35 -19t46.5 -12t60 -4t60 4.5t46.5 12.5t35 19.5t25 25.5t17 30.5t10 35t5 38t2 40.5t-0.5 42v25v250h300z" />
+<glyph unicode="&#xe113;" d="M1100 411l-198 -199l-353 353l-353 -353l-197 199l551 551z" />
+<glyph unicode="&#xe114;" d="M1101 789l-550 -551l-551 551l198 199l353 -353l353 353z" />
+<glyph unicode="&#xe115;" d="M404 1000h746q21 0 35.5 -14.5t14.5 -35.5v-551h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v401h-381zM135 984l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-400h385l215 -200h-750q-21 0 -35.5 14.5 t-14.5 35.5v550h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
+<glyph unicode="&#xe116;" d="M56 1200h94q17 0 31 -11t18 -27l38 -162h896q24 0 39 -18.5t10 -42.5l-100 -475q-5 -21 -27 -42.5t-55 -21.5h-633l48 -200h535q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-50q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-300v-50 q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-31q-18 0 -32.5 10t-20.5 19l-5 10l-201 961h-54q-20 0 -35 14.5t-15 35.5t15 35.5t35 14.5z" />
+<glyph unicode="&#xe117;" d="M1200 1000v-100h-1200v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500zM0 800h1200v-800h-1200v800z" />
+<glyph unicode="&#xe118;" d="M200 800l-200 -400v600h200q0 41 29.5 70.5t70.5 29.5h300q42 0 71 -29.5t29 -70.5h500v-200h-1000zM1500 700l-300 -700h-1200l300 700h1200z" />
+<glyph unicode="&#xe119;" d="M635 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-601h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v601h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
+<glyph unicode="&#xe120;" d="M936 864l249 -229q14 -15 14 -35.5t-14 -35.5l-249 -229q-15 -15 -25.5 -10.5t-10.5 24.5v151h-600v-151q0 -20 -10.5 -24.5t-25.5 10.5l-249 229q-14 15 -14 35.5t14 35.5l249 229q15 15 25.5 10.5t10.5 -25.5v-149h600v149q0 21 10.5 25.5t25.5 -10.5z" />
+<glyph unicode="&#xe121;" d="M1169 400l-172 732q-5 23 -23 45.5t-38 22.5h-672q-20 0 -38 -20t-23 -41l-172 -739h1138zM1100 300h-1000q-41 0 -70.5 -29.5t-29.5 -70.5v-100q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v100q0 41 -29.5 70.5t-70.5 29.5zM800 100v100h100v-100h-100 zM1000 100v100h100v-100h-100z" />
+<glyph unicode="&#xe122;" d="M1150 1100q21 0 35.5 -14.5t14.5 -35.5v-850q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v850q0 21 14.5 35.5t35.5 14.5zM1000 200l-675 200h-38l47 -276q3 -16 -5.5 -20t-29.5 -4h-7h-84q-20 0 -34.5 14t-18.5 35q-55 337 -55 351v250v6q0 16 1 23.5t6.5 14 t17.5 6.5h200l675 250v-850zM0 750v-250q-4 0 -11 0.5t-24 6t-30 15t-24 30t-11 48.5v50q0 26 10.5 46t25 30t29 16t25.5 7z" />
+<glyph unicode="&#xe123;" d="M553 1200h94q20 0 29 -10.5t3 -29.5l-18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q19 0 33 -14.5t14 -35t-13 -40.5t-31 -27q-8 -4 -23 -9.5t-65 -19.5t-103 -25t-132.5 -20t-158.5 -9q-57 0 -115 5t-104 12t-88.5 15.5t-73.5 17.5t-54.5 16t-35.5 12l-11 4 q-18 8 -31 28t-13 40.5t14 35t33 14.5h17l118 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3.5 32t28.5 13zM498 110q50 -6 102 -6q53 0 102 6q-12 -49 -39.5 -79.5t-62.5 -30.5t-63 30.5t-39 79.5z" />
+<glyph unicode="&#xe124;" d="M800 946l224 78l-78 -224l234 -45l-180 -155l180 -155l-234 -45l78 -224l-224 78l-45 -234l-155 180l-155 -180l-45 234l-224 -78l78 224l-234 45l180 155l-180 155l234 45l-78 224l224 -78l45 234l155 -180l155 180z" />
+<glyph unicode="&#xe125;" d="M650 1200h50q40 0 70 -40.5t30 -84.5v-150l-28 -125h328q40 0 70 -40.5t30 -84.5v-100q0 -45 -29 -74l-238 -344q-16 -24 -38 -40.5t-45 -16.5h-250q-7 0 -42 25t-66 50l-31 25h-61q-45 0 -72.5 18t-27.5 57v400q0 36 20 63l145 196l96 198q13 28 37.5 48t51.5 20z M650 1100l-100 -212l-150 -213v-375h100l136 -100h214l250 375v125h-450l50 225v175h-50zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe126;" d="M600 1100h250q23 0 45 -16.5t38 -40.5l238 -344q29 -29 29 -74v-100q0 -44 -30 -84.5t-70 -40.5h-328q28 -118 28 -125v-150q0 -44 -30 -84.5t-70 -40.5h-50q-27 0 -51.5 20t-37.5 48l-96 198l-145 196q-20 27 -20 63v400q0 39 27.5 57t72.5 18h61q124 100 139 100z M50 1000h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM636 1000l-136 -100h-100v-375l150 -213l100 -212h50v175l-50 225h450v125l-250 375h-214z" />
+<glyph unicode="&#xe127;" d="M356 873l363 230q31 16 53 -6l110 -112q13 -13 13.5 -32t-11.5 -34l-84 -121h302q84 0 138 -38t54 -110t-55 -111t-139 -39h-106l-131 -339q-6 -21 -19.5 -41t-28.5 -20h-342q-7 0 -90 81t-83 94v525q0 17 14 35.5t28 28.5zM400 792v-503l100 -89h293l131 339 q6 21 19.5 41t28.5 20h203q21 0 30.5 25t0.5 50t-31 25h-456h-7h-6h-5.5t-6 0.5t-5 1.5t-5 2t-4 2.5t-4 4t-2.5 4.5q-12 25 5 47l146 183l-86 83zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500 q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe128;" d="M475 1103l366 -230q2 -1 6 -3.5t14 -10.5t18 -16.5t14.5 -20t6.5 -22.5v-525q0 -13 -86 -94t-93 -81h-342q-15 0 -28.5 20t-19.5 41l-131 339h-106q-85 0 -139.5 39t-54.5 111t54 110t138 38h302l-85 121q-11 15 -10.5 34t13.5 32l110 112q22 22 53 6zM370 945l146 -183 q17 -22 5 -47q-2 -2 -3.5 -4.5t-4 -4t-4 -2.5t-5 -2t-5 -1.5t-6 -0.5h-6h-6.5h-6h-475v-100h221q15 0 29 -20t20 -41l130 -339h294l106 89v503l-342 236zM1050 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5 v500q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe129;" d="M550 1294q72 0 111 -55t39 -139v-106l339 -131q21 -6 41 -19.5t20 -28.5v-342q0 -7 -81 -90t-94 -83h-525q-17 0 -35.5 14t-28.5 28l-9 14l-230 363q-16 31 6 53l112 110q13 13 32 13.5t34 -11.5l121 -84v302q0 84 38 138t110 54zM600 972v203q0 21 -25 30.5t-50 0.5 t-25 -31v-456v-7v-6v-5.5t-0.5 -6t-1.5 -5t-2 -5t-2.5 -4t-4 -4t-4.5 -2.5q-25 -12 -47 5l-183 146l-83 -86l236 -339h503l89 100v293l-339 131q-21 6 -41 19.5t-20 28.5zM450 200h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe130;" d="M350 1100h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5zM600 306v-106q0 -84 -39 -139t-111 -55t-110 54t-38 138v302l-121 -84q-15 -12 -34 -11.5t-32 13.5l-112 110 q-22 22 -6 53l230 363q1 2 3.5 6t10.5 13.5t16.5 17t20 13.5t22.5 6h525q13 0 94 -83t81 -90v-342q0 -15 -20 -28.5t-41 -19.5zM308 900l-236 -339l83 -86l183 146q22 17 47 5q2 -1 4.5 -2.5t4 -4t2.5 -4t2 -5t1.5 -5t0.5 -6v-5.5v-6v-7v-456q0 -22 25 -31t50 0.5t25 30.5 v203q0 15 20 28.5t41 19.5l339 131v293l-89 100h-503z" />
+<glyph unicode="&#xe131;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM914 632l-275 223q-16 13 -27.5 8t-11.5 -26v-137h-275 q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h275v-137q0 -21 11.5 -26t27.5 8l275 223q16 13 16 32t-16 32z" />
+<glyph unicode="&#xe132;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM561 855l-275 -223q-16 -13 -16 -32t16 -32l275 -223q16 -13 27.5 -8 t11.5 26v137h275q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5h-275v137q0 21 -11.5 26t-27.5 -8z" />
+<glyph unicode="&#xe133;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM855 639l-223 275q-13 16 -32 16t-32 -16l-223 -275q-13 -16 -8 -27.5 t26 -11.5h137v-275q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v275h137q21 0 26 11.5t-8 27.5z" />
+<glyph unicode="&#xe134;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM675 900h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-275h-137q-21 0 -26 -11.5 t8 -27.5l223 -275q13 -16 32 -16t32 16l223 275q13 16 8 27.5t-26 11.5h-137v275q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe135;" d="M600 1176q116 0 222.5 -46t184 -123.5t123.5 -184t46 -222.5t-46 -222.5t-123.5 -184t-184 -123.5t-222.5 -46t-222.5 46t-184 123.5t-123.5 184t-46 222.5t46 222.5t123.5 184t184 123.5t222.5 46zM627 1101q-15 -12 -36.5 -20.5t-35.5 -12t-43 -8t-39 -6.5 q-15 -3 -45.5 0t-45.5 -2q-20 -7 -51.5 -26.5t-34.5 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -91t-29.5 -79q-9 -34 5 -93t8 -87q0 -9 17 -44.5t16 -59.5q12 0 23 -5t23.5 -15t19.5 -14q16 -8 33 -15t40.5 -15t34.5 -12q21 -9 52.5 -32t60 -38t57.5 -11 q7 -15 -3 -34t-22.5 -40t-9.5 -38q13 -21 23 -34.5t27.5 -27.5t36.5 -18q0 -7 -3.5 -16t-3.5 -14t5 -17q104 -2 221 112q30 29 46.5 47t34.5 49t21 63q-13 8 -37 8.5t-36 7.5q-15 7 -49.5 15t-51.5 19q-18 0 -41 -0.5t-43 -1.5t-42 -6.5t-38 -16.5q-51 -35 -66 -12 q-4 1 -3.5 25.5t0.5 25.5q-6 13 -26.5 17.5t-24.5 6.5q1 15 -0.5 30.5t-7 28t-18.5 11.5t-31 -21q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q7 -12 18 -24t21.5 -20.5t20 -15t15.5 -10.5l5 -3q2 12 7.5 30.5t8 34.5t-0.5 32q-3 18 3.5 29 t18 22.5t15.5 24.5q6 14 10.5 35t8 31t15.5 22.5t34 22.5q-6 18 10 36q8 0 24 -1.5t24.5 -1.5t20 4.5t20.5 15.5q-10 23 -31 42.5t-37.5 29.5t-49 27t-43.5 23q0 1 2 8t3 11.5t1.5 10.5t-1 9.5t-4.5 4.5q31 -13 58.5 -14.5t38.5 2.5l12 5q5 28 -9.5 46t-36.5 24t-50 15 t-41 20q-18 -4 -37 0zM613 994q0 -17 8 -42t17 -45t9 -23q-8 1 -39.5 5.5t-52.5 10t-37 16.5q3 11 16 29.5t16 25.5q10 -10 19 -10t14 6t13.5 14.5t16.5 12.5z" />
+<glyph unicode="&#xe136;" d="M756 1157q164 92 306 -9l-259 -138l145 -232l251 126q6 -89 -34 -156.5t-117 -110.5q-60 -34 -127 -39.5t-126 16.5l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5t15 37.5l600 599q-34 101 5.5 201.5t135.5 154.5z" />
+<glyph unicode="&#xe137;" horiz-adv-x="1220" d="M100 1196h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 1096h-200v-100h200v100zM100 796h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 696h-500v-100h500v100zM100 396h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 296h-300v-100h300v100z " />
+<glyph unicode="&#xe138;" d="M150 1200h900q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM700 500v-300l-200 -200v500l-350 500h900z" />
+<glyph unicode="&#xe139;" d="M500 1200h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5zM500 1100v-100h200v100h-200zM1200 400v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v200h1200z" />
+<glyph unicode="&#xe140;" d="M50 1200h300q21 0 25 -10.5t-10 -24.5l-94 -94l199 -199q7 -8 7 -18t-7 -18l-106 -106q-8 -7 -18 -7t-18 7l-199 199l-94 -94q-14 -14 -24.5 -10t-10.5 25v300q0 21 14.5 35.5t35.5 14.5zM850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-199 -199q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l199 199l-94 94q-14 14 -10 24.5t25 10.5zM364 470l106 -106q7 -8 7 -18t-7 -18l-199 -199l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l199 199 q8 7 18 7t18 -7zM1071 271l94 94q14 14 24.5 10t10.5 -25v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -25 10.5t10 24.5l94 94l-199 199q-7 8 -7 18t7 18l106 106q8 7 18 7t18 -7z" />
+<glyph unicode="&#xe141;" d="M596 1192q121 0 231.5 -47.5t190 -127t127 -190t47.5 -231.5t-47.5 -231.5t-127 -190.5t-190 -127t-231.5 -47t-231.5 47t-190.5 127t-127 190.5t-47 231.5t47 231.5t127 190t190.5 127t231.5 47.5zM596 1010q-112 0 -207.5 -55.5t-151 -151t-55.5 -207.5t55.5 -207.5 t151 -151t207.5 -55.5t207.5 55.5t151 151t55.5 207.5t-55.5 207.5t-151 151t-207.5 55.5zM454.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38.5 -16.5t-38.5 16.5t-16 39t16 38.5t38.5 16zM754.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38 -16.5q-14 0 -29 10l-55 -145 q17 -23 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 23 16 39t38.5 16zM345.5 709q22.5 0 38.5 -16t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16zM854.5 709q22.5 0 38.5 -16 t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16z" />
+<glyph unicode="&#xe142;" d="M546 173l469 470q91 91 99 192q7 98 -52 175.5t-154 94.5q-22 4 -47 4q-34 0 -66.5 -10t-56.5 -23t-55.5 -38t-48 -41.5t-48.5 -47.5q-376 -375 -391 -390q-30 -27 -45 -41.5t-37.5 -41t-32 -46.5t-16 -47.5t-1.5 -56.5q9 -62 53.5 -95t99.5 -33q74 0 125 51l548 548 q36 36 20 75q-7 16 -21.5 26t-32.5 10q-26 0 -50 -23q-13 -12 -39 -38l-341 -338q-15 -15 -35.5 -15.5t-34.5 13.5t-14 34.5t14 34.5q327 333 361 367q35 35 67.5 51.5t78.5 16.5q14 0 29 -1q44 -8 74.5 -35.5t43.5 -68.5q14 -47 2 -96.5t-47 -84.5q-12 -11 -32 -32 t-79.5 -81t-114.5 -115t-124.5 -123.5t-123 -119.5t-96.5 -89t-57 -45q-56 -27 -120 -27q-70 0 -129 32t-93 89q-48 78 -35 173t81 163l511 511q71 72 111 96q91 55 198 55q80 0 152 -33q78 -36 129.5 -103t66.5 -154q17 -93 -11 -183.5t-94 -156.5l-482 -476 q-15 -15 -36 -16t-37 14t-17.5 34t14.5 35z" />
+<glyph unicode="&#xe143;" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104zM896 972q-33 0 -64.5 -19t-56.5 -46t-47.5 -53.5t-43.5 -45.5t-37.5 -19t-36 19t-40 45.5t-43 53.5t-54 46t-65.5 19q-67 0 -122.5 -55.5t-55.5 -132.5q0 -23 13.5 -51t46 -65t57.5 -63t76 -75l22 -22q15 -14 44 -44t50.5 -51t46 -44t41 -35t23 -12 t23.5 12t42.5 36t46 44t52.5 52t44 43q4 4 12 13q43 41 63.5 62t52 55t46 55t26 46t11.5 44q0 79 -53 133.5t-120 54.5z" />
+<glyph unicode="&#xe144;" d="M776.5 1214q93.5 0 159.5 -66l141 -141q66 -66 66 -160q0 -42 -28 -95.5t-62 -87.5l-29 -29q-31 53 -77 99l-18 18l95 95l-247 248l-389 -389l212 -212l-105 -106l-19 18l-141 141q-66 66 -66 159t66 159l283 283q65 66 158.5 66zM600 706l105 105q10 -8 19 -17l141 -141 q66 -66 66 -159t-66 -159l-283 -283q-66 -66 -159 -66t-159 66l-141 141q-66 66 -66 159.5t66 159.5l55 55q29 -55 75 -102l18 -17l-95 -95l247 -248l389 389z" />
+<glyph unicode="&#xe145;" d="M603 1200q85 0 162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5v953q0 21 30 46.5t81 48t129 37.5t163 15zM300 1000v-700h600v700h-600zM600 254q-43 0 -73.5 -30.5t-30.5 -73.5t30.5 -73.5t73.5 -30.5t73.5 30.5 t30.5 73.5t-30.5 73.5t-73.5 30.5z" />
+<glyph unicode="&#xe146;" d="M902 1185l283 -282q15 -15 15 -36t-14.5 -35.5t-35.5 -14.5t-35 15l-36 35l-279 -267v-300l-212 210l-308 -307l-280 -203l203 280l307 308l-210 212h300l267 279l-35 36q-15 14 -15 35t14.5 35.5t35.5 14.5t35 -15z" />
+<glyph unicode="&#xe148;" d="M700 1248v-78q38 -5 72.5 -14.5t75.5 -31.5t71 -53.5t52 -84t24 -118.5h-159q-4 36 -10.5 59t-21 45t-40 35.5t-64.5 20.5v-307l64 -13q34 -7 64 -16.5t70 -32t67.5 -52.5t47.5 -80t20 -112q0 -139 -89 -224t-244 -97v-77h-100v79q-150 16 -237 103q-40 40 -52.5 93.5 t-15.5 139.5h139q5 -77 48.5 -126t117.5 -65v335l-27 8q-46 14 -79 26.5t-72 36t-63 52t-40 72.5t-16 98q0 70 25 126t67.5 92t94.5 57t110 27v77h100zM600 754v274q-29 -4 -50 -11t-42 -21.5t-31.5 -41.5t-10.5 -65q0 -29 7 -50.5t16.5 -34t28.5 -22.5t31.5 -14t37.5 -10 q9 -3 13 -4zM700 547v-310q22 2 42.5 6.5t45 15.5t41.5 27t29 42t12 59.5t-12.5 59.5t-38 44.5t-53 31t-66.5 24.5z" />
+<glyph unicode="&#xe149;" d="M561 1197q84 0 160.5 -40t123.5 -109.5t47 -147.5h-153q0 40 -19.5 71.5t-49.5 48.5t-59.5 26t-55.5 9q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -26 13.5 -63t26.5 -61t37 -66q6 -9 9 -14h241v-100h-197q8 -50 -2.5 -115t-31.5 -95q-45 -62 -99 -112 q34 10 83 17.5t71 7.5q32 1 102 -16t104 -17q83 0 136 30l50 -147q-31 -19 -58 -30.5t-55 -15.5t-42 -4.5t-46 -0.5q-23 0 -76 17t-111 32.5t-96 11.5q-39 -3 -82 -16t-67 -25l-23 -11l-55 145q4 3 16 11t15.5 10.5t13 9t15.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221v100h166q-23 47 -44 104q-7 20 -12 41.5t-6 55.5t6 66.5t29.5 70.5t58.5 71q97 88 263 88z" />
+<glyph unicode="&#xe150;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM935 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-900h-200v900h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
+<glyph unicode="&#xe151;" d="M1000 700h-100v100h-100v-100h-100v500h300v-500zM400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM801 1100v-200h100v200h-100zM1000 350l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150z " />
+<glyph unicode="&#xe152;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 1050l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150zM1000 0h-100v100h-100v-100h-100v500h300v-500zM801 400v-200h100v200h-100z " />
+<glyph unicode="&#xe153;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 700h-100v400h-100v100h200v-500zM1100 0h-100v100h-200v400h300v-500zM901 400v-200h100v200h-100z" />
+<glyph unicode="&#xe154;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1100 700h-100v100h-200v400h300v-500zM901 1100v-200h100v200h-100zM1000 0h-100v400h-100v100h200v-500z" />
+<glyph unicode="&#xe155;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM900 1000h-200v200h200v-200zM1000 700h-300v200h300v-200zM1100 400h-400v200h400v-200zM1200 100h-500v200h500v-200z" />
+<glyph unicode="&#xe156;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1200 1000h-500v200h500v-200zM1100 700h-400v200h400v-200zM1000 400h-300v200h300v-200zM900 100h-200v200h200v-200z" />
+<glyph unicode="&#xe157;" d="M350 1100h400q162 0 256 -93.5t94 -256.5v-400q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5z" />
+<glyph unicode="&#xe158;" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-163 0 -256.5 92.5t-93.5 257.5v400q0 163 94 256.5t256 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM440 770l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
+<glyph unicode="&#xe159;" d="M350 1100h400q163 0 256.5 -94t93.5 -256v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 163 92.5 256.5t257.5 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM350 700h400q21 0 26.5 -12t-6.5 -28l-190 -253q-12 -17 -30 -17t-30 17l-190 253q-12 16 -6.5 28t26.5 12z" />
+<glyph unicode="&#xe160;" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -163 -92.5 -256.5t-257.5 -93.5h-400q-163 0 -256.5 94t-93.5 256v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM580 693l190 -253q12 -16 6.5 -28t-26.5 -12h-400q-21 0 -26.5 12t6.5 28l190 253q12 17 30 17t30 -17z" />
+<glyph unicode="&#xe161;" d="M550 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h450q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-450q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM338 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
+<glyph unicode="&#xe162;" d="M793 1182l9 -9q8 -10 5 -27q-3 -11 -79 -225.5t-78 -221.5l300 1q24 0 32.5 -17.5t-5.5 -35.5q-1 0 -133.5 -155t-267 -312.5t-138.5 -162.5q-12 -15 -26 -15h-9l-9 8q-9 11 -4 32q2 9 42 123.5t79 224.5l39 110h-302q-23 0 -31 19q-10 21 6 41q75 86 209.5 237.5 t228 257t98.5 111.5q9 16 25 16h9z" />
+<glyph unicode="&#xe163;" d="M350 1100h400q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-450q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h450q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400 q0 165 92.5 257.5t257.5 92.5zM938 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
+<glyph unicode="&#xe164;" d="M750 1200h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -10.5 -25t-24.5 10l-109 109l-312 -312q-15 -15 -35.5 -15t-35.5 15l-141 141q-15 15 -15 35.5t15 35.5l312 312l-109 109q-14 14 -10 24.5t25 10.5zM456 900h-156q-41 0 -70.5 -29.5t-29.5 -70.5v-500 q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v148l200 200v-298q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5h300z" />
+<glyph unicode="&#xe165;" d="M600 1186q119 0 227.5 -46.5t187 -125t125 -187t46.5 -227.5t-46.5 -227.5t-125 -187t-187 -125t-227.5 -46.5t-227.5 46.5t-187 125t-125 187t-46.5 227.5t46.5 227.5t125 187t187 125t227.5 46.5zM600 1022q-115 0 -212 -56.5t-153.5 -153.5t-56.5 -212t56.5 -212 t153.5 -153.5t212 -56.5t212 56.5t153.5 153.5t56.5 212t-56.5 212t-153.5 153.5t-212 56.5zM600 794q80 0 137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137t57 137t137 57z" />
+<glyph unicode="&#xe166;" d="M450 1200h200q21 0 35.5 -14.5t14.5 -35.5v-350h245q20 0 25 -11t-9 -26l-383 -426q-14 -15 -33.5 -15t-32.5 15l-379 426q-13 15 -8.5 26t25.5 11h250v350q0 21 14.5 35.5t35.5 14.5zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
+<glyph unicode="&#xe167;" d="M583 1182l378 -435q14 -15 9 -31t-26 -16h-244v-250q0 -20 -17 -35t-39 -15h-200q-20 0 -32 14.5t-12 35.5v250h-250q-20 0 -25.5 16.5t8.5 31.5l383 431q14 16 33.5 17t33.5 -14zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
+<glyph unicode="&#xe168;" d="M396 723l369 369q7 7 17.5 7t17.5 -7l139 -139q7 -8 7 -18.5t-7 -17.5l-525 -525q-7 -8 -17.5 -8t-17.5 8l-292 291q-7 8 -7 18t7 18l139 139q8 7 18.5 7t17.5 -7zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50 h-100z" />
+<glyph unicode="&#xe169;" d="M135 1023l142 142q14 14 35 14t35 -14l77 -77l-212 -212l-77 76q-14 15 -14 36t14 35zM655 855l210 210q14 14 24.5 10t10.5 -25l-2 -599q-1 -20 -15.5 -35t-35.5 -15l-597 -1q-21 0 -25 10.5t10 24.5l208 208l-154 155l212 212zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5 v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
+<glyph unicode="&#xe170;" d="M350 1200l599 -2q20 -1 35 -15.5t15 -35.5l1 -597q0 -21 -10.5 -25t-24.5 10l-208 208l-155 -154l-212 212l155 154l-210 210q-14 14 -10 24.5t25 10.5zM524 512l-76 -77q-15 -14 -36 -14t-35 14l-142 142q-14 14 -14 35t14 35l77 77zM50 300h1000q21 0 35.5 -14.5 t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
+<glyph unicode="&#xe171;" d="M1200 103l-483 276l-314 -399v423h-399l1196 796v-1096zM483 424v-230l683 953z" />
+<glyph unicode="&#xe172;" d="M1100 1000v-850q0 -21 -14.5 -35.5t-35.5 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200z" />
+<glyph unicode="&#xe173;" d="M1100 1000l-2 -149l-299 -299l-95 95q-9 9 -21.5 9t-21.5 -9l-149 -147h-312v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1132 638l106 -106q7 -7 7 -17.5t-7 -17.5l-420 -421q-8 -7 -18 -7 t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l297 297q7 7 17.5 7t17.5 -7z" />
+<glyph unicode="&#xe174;" d="M1100 1000v-269l-103 -103l-134 134q-15 15 -33.5 16.5t-34.5 -12.5l-266 -266h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1202 572l70 -70q15 -15 15 -35.5t-15 -35.5l-131 -131 l131 -131q15 -15 15 -35.5t-15 -35.5l-70 -70q-15 -15 -35.5 -15t-35.5 15l-131 131l-131 -131q-15 -15 -35.5 -15t-35.5 15l-70 70q-15 15 -15 35.5t15 35.5l131 131l-131 131q-15 15 -15 35.5t15 35.5l70 70q15 15 35.5 15t35.5 -15l131 -131l131 131q15 15 35.5 15 t35.5 -15z" />
+<glyph unicode="&#xe175;" d="M1100 1000v-300h-350q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM850 600h100q21 0 35.5 -14.5t14.5 -35.5v-250h150q21 0 25 -10.5t-10 -24.5 l-230 -230q-14 -14 -35 -14t-35 14l-230 230q-14 14 -10 24.5t25 10.5h150v250q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe176;" d="M1100 1000v-400l-165 165q-14 15 -35 15t-35 -15l-263 -265h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM935 565l230 -229q14 -15 10 -25.5t-25 -10.5h-150v-250q0 -20 -14.5 -35 t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35v250h-150q-21 0 -25 10.5t10 25.5l230 229q14 15 35 15t35 -15z" />
+<glyph unicode="&#xe177;" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-150h-1200v150q0 21 14.5 35.5t35.5 14.5zM1200 800v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v550h1200zM100 500v-200h400v200h-400z" />
+<glyph unicode="&#xe178;" d="M935 1165l248 -230q14 -14 14 -35t-14 -35l-248 -230q-14 -14 -24.5 -10t-10.5 25v150h-400v200h400v150q0 21 10.5 25t24.5 -10zM200 800h-50q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v-200zM400 800h-100v200h100v-200zM18 435l247 230 q14 14 24.5 10t10.5 -25v-150h400v-200h-400v-150q0 -21 -10.5 -25t-24.5 10l-247 230q-15 14 -15 35t15 35zM900 300h-100v200h100v-200zM1000 500h51q20 0 34.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-34.5 -14.5h-51v200z" />
+<glyph unicode="&#xe179;" d="M862 1073l276 116q25 18 43.5 8t18.5 -41v-1106q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v397q-4 1 -11 5t-24 17.5t-30 29t-24 42t-11 56.5v359q0 31 18.5 65t43.5 52zM550 1200q22 0 34.5 -12.5t14.5 -24.5l1 -13v-450q0 -28 -10.5 -59.5 t-25 -56t-29 -45t-25.5 -31.5l-10 -11v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447q-4 4 -11 11.5t-24 30.5t-30 46t-24 55t-11 60v450q0 2 0.5 5.5t4 12t8.5 15t14.5 12t22.5 5.5q20 0 32.5 -12.5t14.5 -24.5l3 -13v-350h100v350v5.5t2.5 12 t7 15t15 12t25.5 5.5q23 0 35.5 -12.5t13.5 -24.5l1 -13v-350h100v350q0 2 0.5 5.5t3 12t7 15t15 12t24.5 5.5z" />
+<glyph unicode="&#xe180;" d="M1200 1100v-56q-4 0 -11 -0.5t-24 -3t-30 -7.5t-24 -15t-11 -24v-888q0 -22 25 -34.5t50 -13.5l25 -2v-56h-400v56q75 0 87.5 6.5t12.5 43.5v394h-500v-394q0 -37 12.5 -43.5t87.5 -6.5v-56h-400v56q4 0 11 0.5t24 3t30 7.5t24 15t11 24v888q0 22 -25 34.5t-50 13.5 l-25 2v56h400v-56q-75 0 -87.5 -6.5t-12.5 -43.5v-394h500v394q0 37 -12.5 43.5t-87.5 6.5v56h400z" />
+<glyph unicode="&#xe181;" d="M675 1000h375q21 0 35.5 -14.5t14.5 -35.5v-150h-105l-295 -98v98l-200 200h-400l100 100h375zM100 900h300q41 0 70.5 -29.5t29.5 -70.5v-500q0 -41 -29.5 -70.5t-70.5 -29.5h-300q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5zM100 800v-200h300v200 h-300zM1100 535l-400 -133v163l400 133v-163zM100 500v-200h300v200h-300zM1100 398v-248q0 -21 -14.5 -35.5t-35.5 -14.5h-375l-100 -100h-375l-100 100h400l200 200h105z" />
+<glyph unicode="&#xe182;" d="M17 1007l162 162q17 17 40 14t37 -22l139 -194q14 -20 11 -44.5t-20 -41.5l-119 -118q102 -142 228 -268t267 -227l119 118q17 17 42.5 19t44.5 -12l192 -136q19 -14 22.5 -37.5t-13.5 -40.5l-163 -162q-3 -1 -9.5 -1t-29.5 2t-47.5 6t-62.5 14.5t-77.5 26.5t-90 42.5 t-101.5 60t-111 83t-119 108.5q-74 74 -133.5 150.5t-94.5 138.5t-60 119.5t-34.5 100t-15 74.5t-4.5 48z" />
+<glyph unicode="&#xe183;" d="M600 1100q92 0 175 -10.5t141.5 -27t108.5 -36.5t81.5 -40t53.5 -37t31 -27l9 -10v-200q0 -21 -14.5 -33t-34.5 -9l-202 34q-20 3 -34.5 20t-14.5 38v146q-141 24 -300 24t-300 -24v-146q0 -21 -14.5 -38t-34.5 -20l-202 -34q-20 -3 -34.5 9t-14.5 33v200q3 4 9.5 10.5 t31 26t54 37.5t80.5 39.5t109 37.5t141 26.5t175 10.5zM600 795q56 0 97 -9.5t60 -23.5t30 -28t12 -24l1 -10v-50l365 -303q14 -15 24.5 -40t10.5 -45v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v212q0 20 10.5 45t24.5 40l365 303v50 q0 4 1 10.5t12 23t30 29t60 22.5t97 10z" />
+<glyph unicode="&#xe184;" d="M1100 700l-200 -200h-600l-200 200v500h200v-200h200v200h200v-200h200v200h200v-500zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5 t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe185;" d="M700 1100h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-1000h300v1000q0 41 -29.5 70.5t-70.5 29.5zM1100 800h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-700h300v700q0 41 -29.5 70.5t-70.5 29.5zM400 0h-300v400q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-400z " />
+<glyph unicode="&#xe186;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
+<glyph unicode="&#xe187;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 300h-100v200h-100v-200h-100v500h100v-200h100v200h100v-500zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
+<glyph unicode="&#xe188;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-300h200v-100h-300v500h300v-100zM900 700h-200v-300h200v-100h-300v500h300v-100z" />
+<glyph unicode="&#xe189;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 400l-300 150l300 150v-300zM900 550l-300 -150v300z" />
+<glyph unicode="&#xe190;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM900 300h-700v500h700v-500zM800 700h-130q-38 0 -66.5 -43t-28.5 -108t27 -107t68 -42h130v300zM300 700v-300 h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130z" />
+<glyph unicode="&#xe191;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 300h-100v400h-100v100h200v-500z M700 300h-100v100h100v-100z" />
+<glyph unicode="&#xe192;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM300 700h200v-400h-300v500h100v-100zM900 300h-100v400h-100v100h200v-500zM300 600v-200h100v200h-100z M700 300h-100v100h100v-100z" />
+<glyph unicode="&#xe193;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 500l-199 -200h-100v50l199 200v150h-200v100h300v-300zM900 300h-100v400h-100v100h200v-500zM701 300h-100 v100h100v-100z" />
+<glyph unicode="&#xe194;" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700h-300v-200h300v-100h-300l-100 100v200l100 100h300v-100z" />
+<glyph unicode="&#xe195;" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700v-100l-50 -50l100 -100v-50h-100l-100 100h-150v-100h-100v400h300zM500 700v-100h200v100h-200z" />
+<glyph unicode="&#xe197;" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -207t-85 -207t-205 -86.5h-128v250q0 21 -14.5 35.5t-35.5 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-250h-222q-80 0 -136 57.5t-56 136.5q0 69 43 122.5t108 67.5q-2 19 -2 37q0 100 49 185 t134 134t185 49zM525 500h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -244q-13 -16 -32 -16t-32 16l-223 244q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe198;" d="M502 1089q110 0 201 -59.5t135 -156.5q43 15 89 15q121 0 206 -86.5t86 -206.5q0 -99 -60 -181t-150 -110l-378 360q-13 16 -31.5 16t-31.5 -16l-381 -365h-9q-79 0 -135.5 57.5t-56.5 136.5q0 69 43 122.5t108 67.5q-2 19 -2 38q0 100 49 184.5t133.5 134t184.5 49.5z M632 467l223 -228q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5q199 204 223 228q19 19 31.5 19t32.5 -19z" />
+<glyph unicode="&#xe199;" d="M700 100v100h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170l-270 -300h400v-100h-50q-21 0 -35.5 -14.5t-14.5 -35.5v-50h400v50q0 21 -14.5 35.5t-35.5 14.5h-50z" />
+<glyph unicode="&#xe200;" d="M600 1179q94 0 167.5 -56.5t99.5 -145.5q89 -6 150.5 -71.5t61.5 -155.5q0 -61 -29.5 -112.5t-79.5 -82.5q9 -29 9 -55q0 -74 -52.5 -126.5t-126.5 -52.5q-55 0 -100 30v-251q21 0 35.5 -14.5t14.5 -35.5v-50h-300v50q0 21 14.5 35.5t35.5 14.5v251q-45 -30 -100 -30 q-74 0 -126.5 52.5t-52.5 126.5q0 18 4 38q-47 21 -75.5 65t-28.5 97q0 74 52.5 126.5t126.5 52.5q5 0 23 -2q0 2 -1 10t-1 13q0 116 81.5 197.5t197.5 81.5z" />
+<glyph unicode="&#xe201;" d="M1010 1010q111 -111 150.5 -260.5t0 -299t-150.5 -260.5q-83 -83 -191.5 -126.5t-218.5 -43.5t-218.5 43.5t-191.5 126.5q-111 111 -150.5 260.5t0 299t150.5 260.5q83 83 191.5 126.5t218.5 43.5t218.5 -43.5t191.5 -126.5zM476 1065q-4 0 -8 -1q-121 -34 -209.5 -122.5 t-122.5 -209.5q-4 -12 2.5 -23t18.5 -14l36 -9q3 -1 7 -1q23 0 29 22q27 96 98 166q70 71 166 98q11 3 17.5 13.5t3.5 22.5l-9 35q-3 13 -14 19q-7 4 -15 4zM512 920q-4 0 -9 -2q-80 -24 -138.5 -82.5t-82.5 -138.5q-4 -13 2 -24t19 -14l34 -9q4 -1 8 -1q22 0 28 21 q18 58 58.5 98.5t97.5 58.5q12 3 18 13.5t3 21.5l-9 35q-3 12 -14 19q-7 4 -15 4zM719.5 719.5q-49.5 49.5 -119.5 49.5t-119.5 -49.5t-49.5 -119.5t49.5 -119.5t119.5 -49.5t119.5 49.5t49.5 119.5t-49.5 119.5zM855 551q-22 0 -28 -21q-18 -58 -58.5 -98.5t-98.5 -57.5 q-11 -4 -17 -14.5t-3 -21.5l9 -35q3 -12 14 -19q7 -4 15 -4q4 0 9 2q80 24 138.5 82.5t82.5 138.5q4 13 -2.5 24t-18.5 14l-34 9q-4 1 -8 1zM1000 515q-23 0 -29 -22q-27 -96 -98 -166q-70 -71 -166 -98q-11 -3 -17.5 -13.5t-3.5 -22.5l9 -35q3 -13 14 -19q7 -4 15 -4 q4 0 8 1q121 34 209.5 122.5t122.5 209.5q4 12 -2.5 23t-18.5 14l-36 9q-3 1 -7 1z" />
+<glyph unicode="&#xe202;" d="M700 800h300v-380h-180v200h-340v-200h-380v755q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM700 300h162l-212 -212l-212 212h162v200h100v-200zM520 0h-395q-10 0 -17.5 7.5t-7.5 17.5v395zM1000 220v-195q0 -10 -7.5 -17.5t-17.5 -7.5h-195z" />
+<glyph unicode="&#xe203;" d="M700 800h300v-520l-350 350l-550 -550v1095q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM862 200h-162v-200h-100v200h-162l212 212zM480 0h-355q-10 0 -17.5 7.5t-7.5 17.5v55h380v-80zM1000 80v-55q0 -10 -7.5 -17.5t-17.5 -7.5h-155v80h180z" />
+<glyph unicode="&#xe204;" d="M1162 800h-162v-200h100l100 -100h-300v300h-162l212 212zM200 800h200q27 0 40 -2t29.5 -10.5t23.5 -30t7 -57.5h300v-100h-600l-200 -350v450h100q0 36 7 57.5t23.5 30t29.5 10.5t40 2zM800 400h240l-240 -400h-800l300 500h500v-100z" />
+<glyph unicode="&#xe205;" d="M650 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM1000 850v150q41 0 70.5 -29.5t29.5 -70.5v-800 q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-1 0 -20 4l246 246l-326 326v324q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM412 250l-212 -212v162h-200v100h200v162z" />
+<glyph unicode="&#xe206;" d="M450 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM800 850v150q41 0 70.5 -29.5t29.5 -70.5v-500 h-200v-300h200q0 -36 -7 -57.5t-23.5 -30t-29.5 -10.5t-40 -2h-600q-41 0 -70.5 29.5t-29.5 70.5v800q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM1212 250l-212 -212v162h-200v100h200v162z" />
+<glyph unicode="&#xe209;" d="M658 1197l637 -1104q23 -38 7 -65.5t-60 -27.5h-1276q-44 0 -60 27.5t7 65.5l637 1104q22 39 54 39t54 -39zM704 800h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM500 300v-100h200 v100h-200z" />
+<glyph unicode="&#xe210;" d="M425 1100h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM825 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM25 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5zM425 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5 v150q0 10 7.5 17.5t17.5 7.5zM25 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe211;" d="M700 1200h100v-200h-100v-100h350q62 0 86.5 -39.5t-3.5 -94.5l-66 -132q-41 -83 -81 -134h-772q-40 51 -81 134l-66 132q-28 55 -3.5 94.5t86.5 39.5h350v100h-100v200h100v100h200v-100zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100 h-950l138 100h-13q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe212;" d="M600 1300q40 0 68.5 -29.5t28.5 -70.5h-194q0 41 28.5 70.5t68.5 29.5zM443 1100h314q18 -37 18 -75q0 -8 -3 -25h328q41 0 44.5 -16.5t-30.5 -38.5l-175 -145h-678l-178 145q-34 22 -29 38.5t46 16.5h328q-3 17 -3 25q0 38 18 75zM250 700h700q21 0 35.5 -14.5 t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-150v-200l275 -200h-950l275 200v200h-150q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe213;" d="M600 1181q75 0 128 -53t53 -128t-53 -128t-128 -53t-128 53t-53 128t53 128t128 53zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13 l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe214;" d="M600 1300q47 0 92.5 -53.5t71 -123t25.5 -123.5q0 -78 -55.5 -133.5t-133.5 -55.5t-133.5 55.5t-55.5 133.5q0 62 34 143l144 -143l111 111l-163 163q34 26 63 26zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45 zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe215;" d="M600 1200l300 -161v-139h-300q0 -57 18.5 -108t50 -91.5t63 -72t70 -67.5t57.5 -61h-530q-60 83 -90.5 177.5t-30.5 178.5t33 164.5t87.5 139.5t126 96.5t145.5 41.5v-98zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100 h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe216;" d="M600 1300q41 0 70.5 -29.5t29.5 -70.5v-78q46 -26 73 -72t27 -100v-50h-400v50q0 54 27 100t73 72v78q0 41 29.5 70.5t70.5 29.5zM400 800h400q54 0 100 -27t72 -73h-172v-100h200v-100h-200v-100h200v-100h-200v-100h200q0 -83 -58.5 -141.5t-141.5 -58.5h-400 q-83 0 -141.5 58.5t-58.5 141.5v400q0 83 58.5 141.5t141.5 58.5z" />
+<glyph unicode="&#xe218;" d="M150 1100h900q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM125 400h950q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-283l224 -224q13 -13 13 -31.5t-13 -32 t-31.5 -13.5t-31.5 13l-88 88h-524l-87 -88q-13 -13 -32 -13t-32 13.5t-13 32t13 31.5l224 224h-289q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM541 300l-100 -100h324l-100 100h-124z" />
+<glyph unicode="&#xe219;" d="M200 1100h800q83 0 141.5 -58.5t58.5 -141.5v-200h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100v200q0 83 58.5 141.5t141.5 58.5zM100 600h1000q41 0 70.5 -29.5 t29.5 -70.5v-300h-1200v300q0 41 29.5 70.5t70.5 29.5zM300 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200zM1100 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200z" />
+<glyph unicode="&#xe221;" d="M480 1165l682 -683q31 -31 31 -75.5t-31 -75.5l-131 -131h-481l-517 518q-32 31 -32 75.5t32 75.5l295 296q31 31 75.5 31t76.5 -31zM108 794l342 -342l303 304l-341 341zM250 100h800q21 0 35.5 -14.5t14.5 -35.5v-50h-900v50q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe223;" d="M1057 647l-189 506q-8 19 -27.5 33t-40.5 14h-400q-21 0 -40.5 -14t-27.5 -33l-189 -506q-8 -19 1.5 -33t30.5 -14h625v-150q0 -21 14.5 -35.5t35.5 -14.5t35.5 14.5t14.5 35.5v150h125q21 0 30.5 14t1.5 33zM897 0h-595v50q0 21 14.5 35.5t35.5 14.5h50v50 q0 21 14.5 35.5t35.5 14.5h48v300h200v-300h47q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-50z" />
+<glyph unicode="&#xe224;" d="M900 800h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-375v591l-300 300v84q0 10 7.5 17.5t17.5 7.5h375v-400zM1200 900h-200v200zM400 600h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-650q-10 0 -17.5 7.5t-7.5 17.5v950q0 10 7.5 17.5t17.5 7.5h375v-400zM700 700h-200v200z " />
+<glyph unicode="&#xe225;" d="M484 1095h195q75 0 146 -32.5t124 -86t89.5 -122.5t48.5 -142q18 -14 35 -20q31 -10 64.5 6.5t43.5 48.5q10 34 -15 71q-19 27 -9 43q5 8 12.5 11t19 -1t23.5 -16q41 -44 39 -105q-3 -63 -46 -106.5t-104 -43.5h-62q-7 -55 -35 -117t-56 -100l-39 -234q-3 -20 -20 -34.5 t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l12 70q-49 -14 -91 -14h-195q-24 0 -65 8l-11 -64q-3 -20 -20 -34.5t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l26 157q-84 74 -128 175l-159 53q-19 7 -33 26t-14 40v50q0 21 14.5 35.5t35.5 14.5h124q11 87 56 166l-111 95 q-16 14 -12.5 23.5t24.5 9.5h203q116 101 250 101zM675 1000h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h250q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5t-17.5 7.5z" />
+<glyph unicode="&#xe226;" d="M641 900l423 247q19 8 42 2.5t37 -21.5l32 -38q14 -15 12.5 -36t-17.5 -34l-139 -120h-390zM50 1100h106q67 0 103 -17t66 -71l102 -212h823q21 0 35.5 -14.5t14.5 -35.5v-50q0 -21 -14 -40t-33 -26l-737 -132q-23 -4 -40 6t-26 25q-42 67 -100 67h-300q-62 0 -106 44 t-44 106v200q0 62 44 106t106 44zM173 928h-80q-19 0 -28 -14t-9 -35v-56q0 -51 42 -51h134q16 0 21.5 8t5.5 24q0 11 -16 45t-27 51q-18 28 -43 28zM550 727q-32 0 -54.5 -22.5t-22.5 -54.5t22.5 -54.5t54.5 -22.5t54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5zM130 389 l152 130q18 19 34 24t31 -3.5t24.5 -17.5t25.5 -28q28 -35 50.5 -51t48.5 -13l63 5l48 -179q13 -61 -3.5 -97.5t-67.5 -79.5l-80 -69q-47 -40 -109 -35.5t-103 51.5l-130 151q-40 47 -35.5 109.5t51.5 102.5zM380 377l-102 -88q-31 -27 2 -65l37 -43q13 -15 27.5 -19.5 t31.5 6.5l61 53q19 16 14 49q-2 20 -12 56t-17 45q-11 12 -19 14t-23 -8z" />
+<glyph unicode="&#xe227;" d="M625 1200h150q10 0 17.5 -7.5t7.5 -17.5v-109q79 -33 131 -87.5t53 -128.5q1 -46 -15 -84.5t-39 -61t-46 -38t-39 -21.5l-17 -6q6 0 15 -1.5t35 -9t50 -17.5t53 -30t50 -45t35.5 -64t14.5 -84q0 -59 -11.5 -105.5t-28.5 -76.5t-44 -51t-49.5 -31.5t-54.5 -16t-49.5 -6.5 t-43.5 -1v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-100v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-175q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v600h-75q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5h175v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h100v75q0 10 7.5 17.5t17.5 7.5zM400 900v-200h263q28 0 48.5 10.5t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-263zM400 500v-200h363q28 0 48.5 10.5 t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-363z" />
+<glyph unicode="&#xe230;" d="M212 1198h780q86 0 147 -61t61 -147v-416q0 -51 -18 -142.5t-36 -157.5l-18 -66q-29 -87 -93.5 -146.5t-146.5 -59.5h-572q-82 0 -147 59t-93 147q-8 28 -20 73t-32 143.5t-20 149.5v416q0 86 61 147t147 61zM600 1045q-70 0 -132.5 -11.5t-105.5 -30.5t-78.5 -41.5 t-57 -45t-36 -41t-20.5 -30.5l-6 -12l156 -243h560l156 243q-2 5 -6 12.5t-20 29.5t-36.5 42t-57 44.5t-79 42t-105 29.5t-132.5 12zM762 703h-157l195 261z" />
+<glyph unicode="&#xe231;" d="M475 1300h150q103 0 189 -86t86 -189v-500q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
+<glyph unicode="&#xe232;" d="M475 1300h96q0 -150 89.5 -239.5t239.5 -89.5v-446q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
+<glyph unicode="&#xe233;" d="M1294 767l-638 -283l-378 170l-78 -60v-224l100 -150v-199l-150 148l-150 -149v200l100 150v250q0 4 -0.5 10.5t0 9.5t1 8t3 8t6.5 6l47 40l-147 65l642 283zM1000 380l-350 -166l-350 166v147l350 -165l350 165v-147z" />
+<glyph unicode="&#xe234;" d="M250 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM650 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM1050 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
+<glyph unicode="&#xe235;" d="M550 1100q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 700q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 300q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
+<glyph unicode="&#xe236;" d="M125 1100h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM125 700h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM125 300h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
+<glyph unicode="&#xe237;" d="M350 1200h500q162 0 256 -93.5t94 -256.5v-500q0 -165 -93.5 -257.5t-256.5 -92.5h-500q-165 0 -257.5 92.5t-92.5 257.5v500q0 165 92.5 257.5t257.5 92.5zM900 1000h-600q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h600q41 0 70.5 29.5 t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5zM350 900h500q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-500q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 14.5 35.5t35.5 14.5zM400 800v-200h400v200h-400z" />
+<glyph unicode="&#xe238;" d="M150 1100h1000q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe239;" d="M650 1187q87 -67 118.5 -156t0 -178t-118.5 -155q-87 66 -118.5 155t0 178t118.5 156zM300 800q124 0 212 -88t88 -212q-124 0 -212 88t-88 212zM1000 800q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM300 500q124 0 212 -88t88 -212q-124 0 -212 88t-88 212z M1000 500q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM700 199v-144q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v142q40 -4 43 -4q17 0 57 6z" />
+<glyph unicode="&#xe240;" d="M745 878l69 19q25 6 45 -12l298 -295q11 -11 15 -26.5t-2 -30.5q-5 -14 -18 -23.5t-28 -9.5h-8q1 0 1 -13q0 -29 -2 -56t-8.5 -62t-20 -63t-33 -53t-51 -39t-72.5 -14h-146q-184 0 -184 288q0 24 10 47q-20 4 -62 4t-63 -4q11 -24 11 -47q0 -288 -184 -288h-142 q-48 0 -84.5 21t-56 51t-32 71.5t-16 75t-3.5 68.5q0 13 2 13h-7q-15 0 -27.5 9.5t-18.5 23.5q-6 15 -2 30.5t15 25.5l298 296q20 18 46 11l76 -19q20 -5 30.5 -22.5t5.5 -37.5t-22.5 -31t-37.5 -5l-51 12l-182 -193h891l-182 193l-44 -12q-20 -5 -37.5 6t-22.5 31t6 37.5 t31 22.5z" />
+<glyph unicode="&#xe241;" d="M1200 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM500 450h-25q0 15 -4 24.5t-9 14.5t-17 7.5t-20 3t-25 0.5h-100v-425q0 -11 12.5 -17.5t25.5 -7.5h12v-50h-200v50q50 0 50 25v425h-100q-17 0 -25 -0.5t-20 -3t-17 -7.5t-9 -14.5t-4 -24.5h-25v150h500v-150z" />
+<glyph unicode="&#xe242;" d="M1000 300v50q-25 0 -55 32q-14 14 -25 31t-16 27l-4 11l-289 747h-69l-300 -754q-18 -35 -39 -56q-9 -9 -24.5 -18.5t-26.5 -14.5l-11 -5v-50h273v50q-49 0 -78.5 21.5t-11.5 67.5l69 176h293l61 -166q13 -34 -3.5 -66.5t-55.5 -32.5v-50h312zM412 691l134 342l121 -342 h-255zM1100 150v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5z" />
+<glyph unicode="&#xe243;" d="M50 1200h1100q21 0 35.5 -14.5t14.5 -35.5v-1100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5zM611 1118h-70q-13 0 -18 -12l-299 -753q-17 -32 -35 -51q-18 -18 -56 -34q-12 -5 -12 -18v-50q0 -8 5.5 -14t14.5 -6 h273q8 0 14 6t6 14v50q0 8 -6 14t-14 6q-55 0 -71 23q-10 14 0 39l63 163h266l57 -153q11 -31 -6 -55q-12 -17 -36 -17q-8 0 -14 -6t-6 -14v-50q0 -8 6 -14t14 -6h313q8 0 14 6t6 14v50q0 7 -5.5 13t-13.5 7q-17 0 -42 25q-25 27 -40 63h-1l-288 748q-5 12 -19 12zM639 611 h-197l103 264z" />
+<glyph unicode="&#xe244;" d="M1200 1100h-1200v100h1200v-100zM50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 1000h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM700 900v-300h300v300h-300z" />
+<glyph unicode="&#xe245;" d="M50 1200h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 700h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM700 600v-300h300v300h-300zM1200 0h-1200v100h1200v-100z" />
+<glyph unicode="&#xe246;" d="M50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-350h100v150q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-150h100v-100h-100v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v150h-100v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM700 700v-300h300v300h-300z" />
+<glyph unicode="&#xe247;" d="M100 0h-100v1200h100v-1200zM250 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM300 1000v-300h300v300h-300zM250 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe248;" d="M600 1100h150q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-100h450q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h350v100h-150q-21 0 -35.5 14.5 t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h150v100h100v-100zM400 1000v-300h300v300h-300z" />
+<glyph unicode="&#xe249;" d="M1200 0h-100v1200h100v-1200zM550 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM600 1000v-300h300v300h-300zM50 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
+<glyph unicode="&#xe250;" d="M865 565l-494 -494q-23 -23 -41 -23q-14 0 -22 13.5t-8 38.5v1000q0 25 8 38.5t22 13.5q18 0 41 -23l494 -494q14 -14 14 -35t-14 -35z" />
+<glyph unicode="&#xe251;" d="M335 635l494 494q29 29 50 20.5t21 -49.5v-1000q0 -41 -21 -49.5t-50 20.5l-494 494q-14 14 -14 35t14 35z" />
+<glyph unicode="&#xe252;" d="M100 900h1000q41 0 49.5 -21t-20.5 -50l-494 -494q-14 -14 -35 -14t-35 14l-494 494q-29 29 -20.5 50t49.5 21z" />
+<glyph unicode="&#xe253;" d="M635 865l494 -494q29 -29 20.5 -50t-49.5 -21h-1000q-41 0 -49.5 21t20.5 50l494 494q14 14 35 14t35 -14z" />
+<glyph unicode="&#xe254;" d="M700 741v-182l-692 -323v221l413 193l-413 193v221zM1200 0h-800v200h800v-200z" />
+<glyph unicode="&#xe255;" d="M1200 900h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300zM0 700h50q0 21 4 37t9.5 26.5t18 17.5t22 11t28.5 5.5t31 2t37 0.5h100v-550q0 -22 -25 -34.5t-50 -13.5l-25 -2v-100h400v100q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v550h100q25 0 37 -0.5t31 -2 t28.5 -5.5t22 -11t18 -17.5t9.5 -26.5t4 -37h50v300h-800v-300z" />
+<glyph unicode="&#xe256;" d="M800 700h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-100v-550q0 -22 25 -34.5t50 -14.5l25 -1v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v550h-100q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h800v-300zM1100 200h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300z" />
+<glyph unicode="&#xe257;" d="M701 1098h160q16 0 21 -11t-7 -23l-464 -464l464 -464q12 -12 7 -23t-21 -11h-160q-13 0 -23 9l-471 471q-7 8 -7 18t7 18l471 471q10 9 23 9z" />
+<glyph unicode="&#xe258;" d="M339 1098h160q13 0 23 -9l471 -471q7 -8 7 -18t-7 -18l-471 -471q-10 -9 -23 -9h-160q-16 0 -21 11t7 23l464 464l-464 464q-12 12 -7 23t21 11z" />
+<glyph unicode="&#xe259;" d="M1087 882q11 -5 11 -21v-160q0 -13 -9 -23l-471 -471q-8 -7 -18 -7t-18 7l-471 471q-9 10 -9 23v160q0 16 11 21t23 -7l464 -464l464 464q12 12 23 7z" />
+<glyph unicode="&#xe260;" d="M618 993l471 -471q9 -10 9 -23v-160q0 -16 -11 -21t-23 7l-464 464l-464 -464q-12 -12 -23 -7t-11 21v160q0 13 9 23l471 471q8 7 18 7t18 -7z" />
+<glyph unicode="&#xf8ff;" d="M1000 1200q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM450 1000h100q21 0 40 -14t26 -33l79 -194q5 1 16 3q34 6 54 9.5t60 7t65.5 1t61 -10t56.5 -23t42.5 -42t29 -64t5 -92t-19.5 -121.5q-1 -7 -3 -19.5t-11 -50t-20.5 -73t-32.5 -81.5t-46.5 -83t-64 -70 t-82.5 -50q-13 -5 -42 -5t-65.5 2.5t-47.5 2.5q-14 0 -49.5 -3.5t-63 -3.5t-43.5 7q-57 25 -104.5 78.5t-75 111.5t-46.5 112t-26 90l-7 35q-15 63 -18 115t4.5 88.5t26 64t39.5 43.5t52 25.5t58.5 13t62.5 2t59.5 -4.5t55.5 -8l-147 192q-12 18 -5.5 30t27.5 12z" />
+<glyph unicode="&#x1f511;" d="M250 1200h600q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-500l-255 -178q-19 -9 -32 -1t-13 29v650h-150q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM400 1100v-100h300v100h-300z" />
+<glyph unicode="&#x1f6aa;" d="M250 1200h750q39 0 69.5 -40.5t30.5 -84.5v-933l-700 -117v950l600 125h-700v-1000h-100v1025q0 23 15.5 49t34.5 26zM500 525v-100l100 20v100z" />
+</font>
+</defs></svg> 
Index: EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/js/bootstrap.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/js/bootstrap.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/js/bootstrap.js	(revision 270)
@@ -0,0 +1,2377 @@
+/*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under the MIT license
+ */
+
+if (typeof jQuery === 'undefined') {
+  throw new Error('Bootstrap\'s JavaScript requires jQuery')
+}
+
++function ($) {
+  'use strict';
+  var version = $.fn.jquery.split(' ')[0].split('.')
+  if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {
+    throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')
+  }
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: transition.js v3.3.7
+ * http://getbootstrap.com/javascript/#transitions
+ * ========================================================================
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
+  // ============================================================
+
+  function transitionEnd() {
+    var el = document.createElement('bootstrap')
+
+    var transEndEventNames = {
+      WebkitTransition : 'webkitTransitionEnd',
+      MozTransition    : 'transitionend',
+      OTransition      : 'oTransitionEnd otransitionend',
+      transition       : 'transitionend'
+    }
+
+    for (var name in transEndEventNames) {
+      if (el.style[name] !== undefined) {
+        return { end: transEndEventNames[name] }
+      }
+    }
+
+    return false // explicit for ie8 (  ._.)
+  }
+
+  // http://blog.alexmaccaw.com/css-transitions
+  $.fn.emulateTransitionEnd = function (duration) {
+    var called = false
+    var $el = this
+    $(this).one('bsTransitionEnd', function () { called = true })
+    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
+    setTimeout(callback, duration)
+    return this
+  }
+
+  $(function () {
+    $.support.transition = transitionEnd()
+
+    if (!$.support.transition) return
+
+    $.event.special.bsTransitionEnd = {
+      bindType: $.support.transition.end,
+      delegateType: $.support.transition.end,
+      handle: function (e) {
+        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
+      }
+    }
+  })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: alert.js v3.3.7
+ * http://getbootstrap.com/javascript/#alerts
+ * ========================================================================
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // ALERT CLASS DEFINITION
+  // ======================
+
+  var dismiss = '[data-dismiss="alert"]'
+  var Alert   = function (el) {
+    $(el).on('click', dismiss, this.close)
+  }
+
+  Alert.VERSION = '3.3.7'
+
+  Alert.TRANSITION_DURATION = 150
+
+  Alert.prototype.close = function (e) {
+    var $this    = $(this)
+    var selector = $this.attr('data-target')
+
+    if (!selector) {
+      selector = $this.attr('href')
+      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+    }
+
+    var $parent = $(selector === '#' ? [] : selector)
+
+    if (e) e.preventDefault()
+
+    if (!$parent.length) {
+      $parent = $this.closest('.alert')
+    }
+
+    $parent.trigger(e = $.Event('close.bs.alert'))
+
+    if (e.isDefaultPrevented()) return
+
+    $parent.removeClass('in')
+
+    function removeElement() {
+      // detach from parent, fire event then clean up data
+      $parent.detach().trigger('closed.bs.alert').remove()
+    }
+
+    $.support.transition && $parent.hasClass('fade') ?
+      $parent
+        .one('bsTransitionEnd', removeElement)
+        .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
+      removeElement()
+  }
+
+
+  // ALERT PLUGIN DEFINITION
+  // =======================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this = $(this)
+      var data  = $this.data('bs.alert')
+
+      if (!data) $this.data('bs.alert', (data = new Alert(this)))
+      if (typeof option == 'string') data[option].call($this)
+    })
+  }
+
+  var old = $.fn.alert
+
+  $.fn.alert             = Plugin
+  $.fn.alert.Constructor = Alert
+
+
+  // ALERT NO CONFLICT
+  // =================
+
+  $.fn.alert.noConflict = function () {
+    $.fn.alert = old
+    return this
+  }
+
+
+  // ALERT DATA-API
+  // ==============
+
+  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: button.js v3.3.7
+ * http://getbootstrap.com/javascript/#buttons
+ * ========================================================================
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // BUTTON PUBLIC CLASS DEFINITION
+  // ==============================
+
+  var Button = function (element, options) {
+    this.$element  = $(element)
+    this.options   = $.extend({}, Button.DEFAULTS, options)
+    this.isLoading = false
+  }
+
+  Button.VERSION  = '3.3.7'
+
+  Button.DEFAULTS = {
+    loadingText: 'loading...'
+  }
+
+  Button.prototype.setState = function (state) {
+    var d    = 'disabled'
+    var $el  = this.$element
+    var val  = $el.is('input') ? 'val' : 'html'
+    var data = $el.data()
+
+    state += 'Text'
+
+    if (data.resetText == null) $el.data('resetText', $el[val]())
+
+    // push to event loop to allow forms to submit
+    setTimeout($.proxy(function () {
+      $el[val](data[state] == null ? this.options[state] : data[state])
+
+      if (state == 'loadingText') {
+        this.isLoading = true
+        $el.addClass(d).attr(d, d).prop(d, true)
+      } else if (this.isLoading) {
+        this.isLoading = false
+        $el.removeClass(d).removeAttr(d).prop(d, false)
+      }
+    }, this), 0)
+  }
+
+  Button.prototype.toggle = function () {
+    var changed = true
+    var $parent = this.$element.closest('[data-toggle="buttons"]')
+
+    if ($parent.length) {
+      var $input = this.$element.find('input')
+      if ($input.prop('type') == 'radio') {
+        if ($input.prop('checked')) changed = false
+        $parent.find('.active').removeClass('active')
+        this.$element.addClass('active')
+      } else if ($input.prop('type') == 'checkbox') {
+        if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
+        this.$element.toggleClass('active')
+      }
+      $input.prop('checked', this.$element.hasClass('active'))
+      if (changed) $input.trigger('change')
+    } else {
+      this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
+      this.$element.toggleClass('active')
+    }
+  }
+
+
+  // BUTTON PLUGIN DEFINITION
+  // ========================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.button')
+      var options = typeof option == 'object' && option
+
+      if (!data) $this.data('bs.button', (data = new Button(this, options)))
+
+      if (option == 'toggle') data.toggle()
+      else if (option) data.setState(option)
+    })
+  }
+
+  var old = $.fn.button
+
+  $.fn.button             = Plugin
+  $.fn.button.Constructor = Button
+
+
+  // BUTTON NO CONFLICT
+  // ==================
+
+  $.fn.button.noConflict = function () {
+    $.fn.button = old
+    return this
+  }
+
+
+  // BUTTON DATA-API
+  // ===============
+
+  $(document)
+    .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
+      var $btn = $(e.target).closest('.btn')
+      Plugin.call($btn, 'toggle')
+      if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
+        // Prevent double click on radios, and the double selections (so cancellation) on checkboxes
+        e.preventDefault()
+        // The target component still receive the focus
+        if ($btn.is('input,button')) $btn.trigger('focus')
+        else $btn.find('input:visible,button:visible').first().trigger('focus')
+      }
+    })
+    .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
+      $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
+    })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: carousel.js v3.3.7
+ * http://getbootstrap.com/javascript/#carousel
+ * ========================================================================
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // CAROUSEL CLASS DEFINITION
+  // =========================
+
+  var Carousel = function (element, options) {
+    this.$element    = $(element)
+    this.$indicators = this.$element.find('.carousel-indicators')
+    this.options     = options
+    this.paused      = null
+    this.sliding     = null
+    this.interval    = null
+    this.$active     = null
+    this.$items      = null
+
+    this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
+
+    this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
+      .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
+      .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
+  }
+
+  Carousel.VERSION  = '3.3.7'
+
+  Carousel.TRANSITION_DURATION = 600
+
+  Carousel.DEFAULTS = {
+    interval: 5000,
+    pause: 'hover',
+    wrap: true,
+    keyboard: true
+  }
+
+  Carousel.prototype.keydown = function (e) {
+    if (/input|textarea/i.test(e.target.tagName)) return
+    switch (e.which) {
+      case 37: this.prev(); break
+      case 39: this.next(); break
+      default: return
+    }
+
+    e.preventDefault()
+  }
+
+  Carousel.prototype.cycle = function (e) {
+    e || (this.paused = false)
+
+    this.interval && clearInterval(this.interval)
+
+    this.options.interval
+      && !this.paused
+      && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
+
+    return this
+  }
+
+  Carousel.prototype.getItemIndex = function (item) {
+    this.$items = item.parent().children('.item')
+    return this.$items.index(item || this.$active)
+  }
+
+  Carousel.prototype.getItemForDirection = function (direction, active) {
+    var activeIndex = this.getItemIndex(active)
+    var willWrap = (direction == 'prev' && activeIndex === 0)
+                || (direction == 'next' && activeIndex == (this.$items.length - 1))
+    if (willWrap && !this.options.wrap) return active
+    var delta = direction == 'prev' ? -1 : 1
+    var itemIndex = (activeIndex + delta) % this.$items.length
+    return this.$items.eq(itemIndex)
+  }
+
+  Carousel.prototype.to = function (pos) {
+    var that        = this
+    var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
+
+    if (pos > (this.$items.length - 1) || pos < 0) return
+
+    if (this.sliding)       return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
+    if (activeIndex == pos) return this.pause().cycle()
+
+    return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
+  }
+
+  Carousel.prototype.pause = function (e) {
+    e || (this.paused = true)
+
+    if (this.$element.find('.next, .prev').length && $.support.transition) {
+      this.$element.trigger($.support.transition.end)
+      this.cycle(true)
+    }
+
+    this.interval = clearInterval(this.interval)
+
+    return this
+  }
+
+  Carousel.prototype.next = function () {
+    if (this.sliding) return
+    return this.slide('next')
+  }
+
+  Carousel.prototype.prev = function () {
+    if (this.sliding) return
+    return this.slide('prev')
+  }
+
+  Carousel.prototype.slide = function (type, next) {
+    var $active   = this.$element.find('.item.active')
+    var $next     = next || this.getItemForDirection(type, $active)
+    var isCycling = this.interval
+    var direction = type == 'next' ? 'left' : 'right'
+    var that      = this
+
+    if ($next.hasClass('active')) return (this.sliding = false)
+
+    var relatedTarget = $next[0]
+    var slideEvent = $.Event('slide.bs.carousel', {
+      relatedTarget: relatedTarget,
+      direction: direction
+    })
+    this.$element.trigger(slideEvent)
+    if (slideEvent.isDefaultPrevented()) return
+
+    this.sliding = true
+
+    isCycling && this.pause()
+
+    if (this.$indicators.length) {
+      this.$indicators.find('.active').removeClass('active')
+      var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
+      $nextIndicator && $nextIndicator.addClass('active')
+    }
+
+    var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
+    if ($.support.transition && this.$element.hasClass('slide')) {
+      $next.addClass(type)
+      $next[0].offsetWidth // force reflow
+      $active.addClass(direction)
+      $next.addClass(direction)
+      $active
+        .one('bsTransitionEnd', function () {
+          $next.removeClass([type, direction].join(' ')).addClass('active')
+          $active.removeClass(['active', direction].join(' '))
+          that.sliding = false
+          setTimeout(function () {
+            that.$element.trigger(slidEvent)
+          }, 0)
+        })
+        .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
+    } else {
+      $active.removeClass('active')
+      $next.addClass('active')
+      this.sliding = false
+      this.$element.trigger(slidEvent)
+    }
+
+    isCycling && this.cycle()
+
+    return this
+  }
+
+
+  // CAROUSEL PLUGIN DEFINITION
+  // ==========================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.carousel')
+      var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
+      var action  = typeof option == 'string' ? option : options.slide
+
+      if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
+      if (typeof option == 'number') data.to(option)
+      else if (action) data[action]()
+      else if (options.interval) data.pause().cycle()
+    })
+  }
+
+  var old = $.fn.carousel
+
+  $.fn.carousel             = Plugin
+  $.fn.carousel.Constructor = Carousel
+
+
+  // CAROUSEL NO CONFLICT
+  // ====================
+
+  $.fn.carousel.noConflict = function () {
+    $.fn.carousel = old
+    return this
+  }
+
+
+  // CAROUSEL DATA-API
+  // =================
+
+  var clickHandler = function (e) {
+    var href
+    var $this   = $(this)
+    var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
+    if (!$target.hasClass('carousel')) return
+    var options = $.extend({}, $target.data(), $this.data())
+    var slideIndex = $this.attr('data-slide-to')
+    if (slideIndex) options.interval = false
+
+    Plugin.call($target, options)
+
+    if (slideIndex) {
+      $target.data('bs.carousel').to(slideIndex)
+    }
+
+    e.preventDefault()
+  }
+
+  $(document)
+    .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
+    .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
+
+  $(window).on('load', function () {
+    $('[data-ride="carousel"]').each(function () {
+      var $carousel = $(this)
+      Plugin.call($carousel, $carousel.data())
+    })
+  })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: collapse.js v3.3.7
+ * http://getbootstrap.com/javascript/#collapse
+ * ========================================================================
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+/* jshint latedef: false */
+
++function ($) {
+  'use strict';
+
+  // COLLAPSE PUBLIC CLASS DEFINITION
+  // ================================
+
+  var Collapse = function (element, options) {
+    this.$element      = $(element)
+    this.options       = $.extend({}, Collapse.DEFAULTS, options)
+    this.$trigger      = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
+                           '[data-toggle="collapse"][data-target="#' + element.id + '"]')
+    this.transitioning = null
+
+    if (this.options.parent) {
+      this.$parent = this.getParent()
+    } else {
+      this.addAriaAndCollapsedClass(this.$element, this.$trigger)
+    }
+
+    if (this.options.toggle) this.toggle()
+  }
+
+  Collapse.VERSION  = '3.3.7'
+
+  Collapse.TRANSITION_DURATION = 350
+
+  Collapse.DEFAULTS = {
+    toggle: true
+  }
+
+  Collapse.prototype.dimension = function () {
+    var hasWidth = this.$element.hasClass('width')
+    return hasWidth ? 'width' : 'height'
+  }
+
+  Collapse.prototype.show = function () {
+    if (this.transitioning || this.$element.hasClass('in')) return
+
+    var activesData
+    var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
+
+    if (actives && actives.length) {
+      activesData = actives.data('bs.collapse')
+      if (activesData && activesData.transitioning) return
+    }
+
+    var startEvent = $.Event('show.bs.collapse')
+    this.$element.trigger(startEvent)
+    if (startEvent.isDefaultPrevented()) return
+
+    if (actives && actives.length) {
+      Plugin.call(actives, 'hide')
+      activesData || actives.data('bs.collapse', null)
+    }
+
+    var dimension = this.dimension()
+
+    this.$element
+      .removeClass('collapse')
+      .addClass('collapsing')[dimension](0)
+      .attr('aria-expanded', true)
+
+    this.$trigger
+      .removeClass('collapsed')
+      .attr('aria-expanded', true)
+
+    this.transitioning = 1
+
+    var complete = function () {
+      this.$element
+        .removeClass('collapsing')
+        .addClass('collapse in')[dimension]('')
+      this.transitioning = 0
+      this.$element
+        .trigger('shown.bs.collapse')
+    }
+
+    if (!$.support.transition) return complete.call(this)
+
+    var scrollSize = $.camelCase(['scroll', dimension].join('-'))
+
+    this.$element
+      .one('bsTransitionEnd', $.proxy(complete, this))
+      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
+  }
+
+  Collapse.prototype.hide = function () {
+    if (this.transitioning || !this.$element.hasClass('in')) return
+
+    var startEvent = $.Event('hide.bs.collapse')
+    this.$element.trigger(startEvent)
+    if (startEvent.isDefaultPrevented()) return
+
+    var dimension = this.dimension()
+
+    this.$element[dimension](this.$element[dimension]())[0].offsetHeight
+
+    this.$element
+      .addClass('collapsing')
+      .removeClass('collapse in')
+      .attr('aria-expanded', false)
+
+    this.$trigger
+      .addClass('collapsed')
+      .attr('aria-expanded', false)
+
+    this.transitioning = 1
+
+    var complete = function () {
+      this.transitioning = 0
+      this.$element
+        .removeClass('collapsing')
+        .addClass('collapse')
+        .trigger('hidden.bs.collapse')
+    }
+
+    if (!$.support.transition) return complete.call(this)
+
+    this.$element
+      [dimension](0)
+      .one('bsTransitionEnd', $.proxy(complete, this))
+      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
+  }
+
+  Collapse.prototype.toggle = function () {
+    this[this.$element.hasClass('in') ? 'hide' : 'show']()
+  }
+
+  Collapse.prototype.getParent = function () {
+    return $(this.options.parent)
+      .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
+      .each($.proxy(function (i, element) {
+        var $element = $(element)
+        this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
+      }, this))
+      .end()
+  }
+
+  Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
+    var isOpen = $element.hasClass('in')
+
+    $element.attr('aria-expanded', isOpen)
+    $trigger
+      .toggleClass('collapsed', !isOpen)
+      .attr('aria-expanded', isOpen)
+  }
+
+  function getTargetFromTrigger($trigger) {
+    var href
+    var target = $trigger.attr('data-target')
+      || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
+
+    return $(target)
+  }
+
+
+  // COLLAPSE PLUGIN DEFINITION
+  // ==========================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.collapse')
+      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
+
+      if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
+      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  var old = $.fn.collapse
+
+  $.fn.collapse             = Plugin
+  $.fn.collapse.Constructor = Collapse
+
+
+  // COLLAPSE NO CONFLICT
+  // ====================
+
+  $.fn.collapse.noConflict = function () {
+    $.fn.collapse = old
+    return this
+  }
+
+
+  // COLLAPSE DATA-API
+  // =================
+
+  $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
+    var $this   = $(this)
+
+    if (!$this.attr('data-target')) e.preventDefault()
+
+    var $target = getTargetFromTrigger($this)
+    var data    = $target.data('bs.collapse')
+    var option  = data ? 'toggle' : $this.data()
+
+    Plugin.call($target, option)
+  })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: dropdown.js v3.3.7
+ * http://getbootstrap.com/javascript/#dropdowns
+ * ========================================================================
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // DROPDOWN CLASS DEFINITION
+  // =========================
+
+  var backdrop = '.dropdown-backdrop'
+  var toggle   = '[data-toggle="dropdown"]'
+  var Dropdown = function (element) {
+    $(element).on('click.bs.dropdown', this.toggle)
+  }
+
+  Dropdown.VERSION = '3.3.7'
+
+  function getParent($this) {
+    var selector = $this.attr('data-target')
+
+    if (!selector) {
+      selector = $this.attr('href')
+      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+    }
+
+    var $parent = selector && $(selector)
+
+    return $parent && $parent.length ? $parent : $this.parent()
+  }
+
+  function clearMenus(e) {
+    if (e && e.which === 3) return
+    $(backdrop).remove()
+    $(toggle).each(function () {
+      var $this         = $(this)
+      var $parent       = getParent($this)
+      var relatedTarget = { relatedTarget: this }
+
+      if (!$parent.hasClass('open')) return
+
+      if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
+
+      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
+
+      if (e.isDefaultPrevented()) return
+
+      $this.attr('aria-expanded', 'false')
+      $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
+    })
+  }
+
+  Dropdown.prototype.toggle = function (e) {
+    var $this = $(this)
+
+    if ($this.is('.disabled, :disabled')) return
+
+    var $parent  = getParent($this)
+    var isActive = $parent.hasClass('open')
+
+    clearMenus()
+
+    if (!isActive) {
+      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
+        // if mobile we use a backdrop because click events don't delegate
+        $(document.createElement('div'))
+          .addClass('dropdown-backdrop')
+          .insertAfter($(this))
+          .on('click', clearMenus)
+      }
+
+      var relatedTarget = { relatedTarget: this }
+      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
+
+      if (e.isDefaultPrevented()) return
+
+      $this
+        .trigger('focus')
+        .attr('aria-expanded', 'true')
+
+      $parent
+        .toggleClass('open')
+        .trigger($.Event('shown.bs.dropdown', relatedTarget))
+    }
+
+    return false
+  }
+
+  Dropdown.prototype.keydown = function (e) {
+    if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
+
+    var $this = $(this)
+
+    e.preventDefault()
+    e.stopPropagation()
+
+    if ($this.is('.disabled, :disabled')) return
+
+    var $parent  = getParent($this)
+    var isActive = $parent.hasClass('open')
+
+    if (!isActive && e.which != 27 || isActive && e.which == 27) {
+      if (e.which == 27) $parent.find(toggle).trigger('focus')
+      return $this.trigger('click')
+    }
+
+    var desc = ' li:not(.disabled):visible a'
+    var $items = $parent.find('.dropdown-menu' + desc)
+
+    if (!$items.length) return
+
+    var index = $items.index(e.target)
+
+    if (e.which == 38 && index > 0)                 index--         // up
+    if (e.which == 40 && index < $items.length - 1) index++         // down
+    if (!~index)                                    index = 0
+
+    $items.eq(index).trigger('focus')
+  }
+
+
+  // DROPDOWN PLUGIN DEFINITION
+  // ==========================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this = $(this)
+      var data  = $this.data('bs.dropdown')
+
+      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
+      if (typeof option == 'string') data[option].call($this)
+    })
+  }
+
+  var old = $.fn.dropdown
+
+  $.fn.dropdown             = Plugin
+  $.fn.dropdown.Constructor = Dropdown
+
+
+  // DROPDOWN NO CONFLICT
+  // ====================
+
+  $.fn.dropdown.noConflict = function () {
+    $.fn.dropdown = old
+    return this
+  }
+
+
+  // APPLY TO STANDARD DROPDOWN ELEMENTS
+  // ===================================
+
+  $(document)
+    .on('click.bs.dropdown.data-api', clearMenus)
+    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
+    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
+    .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
+    .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: modal.js v3.3.7
+ * http://getbootstrap.com/javascript/#modals
+ * ========================================================================
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // MODAL CLASS DEFINITION
+  // ======================
+
+  var Modal = function (element, options) {
+    this.options             = options
+    this.$body               = $(document.body)
+    this.$element            = $(element)
+    this.$dialog             = this.$element.find('.modal-dialog')
+    this.$backdrop           = null
+    this.isShown             = null
+    this.originalBodyPad     = null
+    this.scrollbarWidth      = 0
+    this.ignoreBackdropClick = false
+
+    if (this.options.remote) {
+      this.$element
+        .find('.modal-content')
+        .load(this.options.remote, $.proxy(function () {
+          this.$element.trigger('loaded.bs.modal')
+        }, this))
+    }
+  }
+
+  Modal.VERSION  = '3.3.7'
+
+  Modal.TRANSITION_DURATION = 300
+  Modal.BACKDROP_TRANSITION_DURATION = 150
+
+  Modal.DEFAULTS = {
+    backdrop: true,
+    keyboard: true,
+    show: true
+  }
+
+  Modal.prototype.toggle = function (_relatedTarget) {
+    return this.isShown ? this.hide() : this.show(_relatedTarget)
+  }
+
+  Modal.prototype.show = function (_relatedTarget) {
+    var that = this
+    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
+
+    this.$element.trigger(e)
+
+    if (this.isShown || e.isDefaultPrevented()) return
+
+    this.isShown = true
+
+    this.checkScrollbar()
+    this.setScrollbar()
+    this.$body.addClass('modal-open')
+
+    this.escape()
+    this.resize()
+
+    this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
+
+    this.$dialog.on('mousedown.dismiss.bs.modal', function () {
+      that.$element.one('mouseup.dismiss.bs.modal', function (e) {
+        if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
+      })
+    })
+
+    this.backdrop(function () {
+      var transition = $.support.transition && that.$element.hasClass('fade')
+
+      if (!that.$element.parent().length) {
+        that.$element.appendTo(that.$body) // don't move modals dom position
+      }
+
+      that.$element
+        .show()
+        .scrollTop(0)
+
+      that.adjustDialog()
+
+      if (transition) {
+        that.$element[0].offsetWidth // force reflow
+      }
+
+      that.$element.addClass('in')
+
+      that.enforceFocus()
+
+      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
+
+      transition ?
+        that.$dialog // wait for modal to slide in
+          .one('bsTransitionEnd', function () {
+            that.$element.trigger('focus').trigger(e)
+          })
+          .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
+        that.$element.trigger('focus').trigger(e)
+    })
+  }
+
+  Modal.prototype.hide = function (e) {
+    if (e) e.preventDefault()
+
+    e = $.Event('hide.bs.modal')
+
+    this.$element.trigger(e)
+
+    if (!this.isShown || e.isDefaultPrevented()) return
+
+    this.isShown = false
+
+    this.escape()
+    this.resize()
+
+    $(document).off('focusin.bs.modal')
+
+    this.$element
+      .removeClass('in')
+      .off('click.dismiss.bs.modal')
+      .off('mouseup.dismiss.bs.modal')
+
+    this.$dialog.off('mousedown.dismiss.bs.modal')
+
+    $.support.transition && this.$element.hasClass('fade') ?
+      this.$element
+        .one('bsTransitionEnd', $.proxy(this.hideModal, this))
+        .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
+      this.hideModal()
+  }
+
+  Modal.prototype.enforceFocus = function () {
+    $(document)
+      .off('focusin.bs.modal') // guard against infinite focus loop
+      .on('focusin.bs.modal', $.proxy(function (e) {
+        if (document !== e.target &&
+            this.$element[0] !== e.target &&
+            !this.$element.has(e.target).length) {
+          this.$element.trigger('focus')
+        }
+      }, this))
+  }
+
+  Modal.prototype.escape = function () {
+    if (this.isShown && this.options.keyboard) {
+      this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
+        e.which == 27 && this.hide()
+      }, this))
+    } else if (!this.isShown) {
+      this.$element.off('keydown.dismiss.bs.modal')
+    }
+  }
+
+  Modal.prototype.resize = function () {
+    if (this.isShown) {
+      $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
+    } else {
+      $(window).off('resize.bs.modal')
+    }
+  }
+
+  Modal.prototype.hideModal = function () {
+    var that = this
+    this.$element.hide()
+    this.backdrop(function () {
+      that.$body.removeClass('modal-open')
+      that.resetAdjustments()
+      that.resetScrollbar()
+      that.$element.trigger('hidden.bs.modal')
+    })
+  }
+
+  Modal.prototype.removeBackdrop = function () {
+    this.$backdrop && this.$backdrop.remove()
+    this.$backdrop = null
+  }
+
+  Modal.prototype.backdrop = function (callback) {
+    var that = this
+    var animate = this.$element.hasClass('fade') ? 'fade' : ''
+
+    if (this.isShown && this.options.backdrop) {
+      var doAnimate = $.support.transition && animate
+
+      this.$backdrop = $(document.createElement('div'))
+        .addClass('modal-backdrop ' + animate)
+        .appendTo(this.$body)
+
+      this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
+        if (this.ignoreBackdropClick) {
+          this.ignoreBackdropClick = false
+          return
+        }
+        if (e.target !== e.currentTarget) return
+        this.options.backdrop == 'static'
+          ? this.$element[0].focus()
+          : this.hide()
+      }, this))
+
+      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
+
+      this.$backdrop.addClass('in')
+
+      if (!callback) return
+
+      doAnimate ?
+        this.$backdrop
+          .one('bsTransitionEnd', callback)
+          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
+        callback()
+
+    } else if (!this.isShown && this.$backdrop) {
+      this.$backdrop.removeClass('in')
+
+      var callbackRemove = function () {
+        that.removeBackdrop()
+        callback && callback()
+      }
+      $.support.transition && this.$element.hasClass('fade') ?
+        this.$backdrop
+          .one('bsTransitionEnd', callbackRemove)
+          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
+        callbackRemove()
+
+    } else if (callback) {
+      callback()
+    }
+  }
+
+  // these following methods are used to handle overflowing modals
+
+  Modal.prototype.handleUpdate = function () {
+    this.adjustDialog()
+  }
+
+  Modal.prototype.adjustDialog = function () {
+    var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
+
+    this.$element.css({
+      paddingLeft:  !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
+      paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
+    })
+  }
+
+  Modal.prototype.resetAdjustments = function () {
+    this.$element.css({
+      paddingLeft: '',
+      paddingRight: ''
+    })
+  }
+
+  Modal.prototype.checkScrollbar = function () {
+    var fullWindowWidth = window.innerWidth
+    if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
+      var documentElementRect = document.documentElement.getBoundingClientRect()
+      fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
+    }
+    this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
+    this.scrollbarWidth = this.measureScrollbar()
+  }
+
+  Modal.prototype.setScrollbar = function () {
+    var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
+    this.originalBodyPad = document.body.style.paddingRight || ''
+    if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
+  }
+
+  Modal.prototype.resetScrollbar = function () {
+    this.$body.css('padding-right', this.originalBodyPad)
+  }
+
+  Modal.prototype.measureScrollbar = function () { // thx walsh
+    var scrollDiv = document.createElement('div')
+    scrollDiv.className = 'modal-scrollbar-measure'
+    this.$body.append(scrollDiv)
+    var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
+    this.$body[0].removeChild(scrollDiv)
+    return scrollbarWidth
+  }
+
+
+  // MODAL PLUGIN DEFINITION
+  // =======================
+
+  function Plugin(option, _relatedTarget) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.modal')
+      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
+
+      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
+      if (typeof option == 'string') data[option](_relatedTarget)
+      else if (options.show) data.show(_relatedTarget)
+    })
+  }
+
+  var old = $.fn.modal
+
+  $.fn.modal             = Plugin
+  $.fn.modal.Constructor = Modal
+
+
+  // MODAL NO CONFLICT
+  // =================
+
+  $.fn.modal.noConflict = function () {
+    $.fn.modal = old
+    return this
+  }
+
+
+  // MODAL DATA-API
+  // ==============
+
+  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
+    var $this   = $(this)
+    var href    = $this.attr('href')
+    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
+    var option  = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
+
+    if ($this.is('a')) e.preventDefault()
+
+    $target.one('show.bs.modal', function (showEvent) {
+      if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
+      $target.one('hidden.bs.modal', function () {
+        $this.is(':visible') && $this.trigger('focus')
+      })
+    })
+    Plugin.call($target, option, this)
+  })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: tooltip.js v3.3.7
+ * http://getbootstrap.com/javascript/#tooltip
+ * Inspired by the original jQuery.tipsy by Jason Frame
+ * ========================================================================
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // TOOLTIP PUBLIC CLASS DEFINITION
+  // ===============================
+
+  var Tooltip = function (element, options) {
+    this.type       = null
+    this.options    = null
+    this.enabled    = null
+    this.timeout    = null
+    this.hoverState = null
+    this.$element   = null
+    this.inState    = null
+
+    this.init('tooltip', element, options)
+  }
+
+  Tooltip.VERSION  = '3.3.7'
+
+  Tooltip.TRANSITION_DURATION = 150
+
+  Tooltip.DEFAULTS = {
+    animation: true,
+    placement: 'top',
+    selector: false,
+    template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
+    trigger: 'hover focus',
+    title: '',
+    delay: 0,
+    html: false,
+    container: false,
+    viewport: {
+      selector: 'body',
+      padding: 0
+    }
+  }
+
+  Tooltip.prototype.init = function (type, element, options) {
+    this.enabled   = true
+    this.type      = type
+    this.$element  = $(element)
+    this.options   = this.getOptions(options)
+    this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
+    this.inState   = { click: false, hover: false, focus: false }
+
+    if (this.$element[0] instanceof document.constructor && !this.options.selector) {
+      throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
+    }
+
+    var triggers = this.options.trigger.split(' ')
+
+    for (var i = triggers.length; i--;) {
+      var trigger = triggers[i]
+
+      if (trigger == 'click') {
+        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
+      } else if (trigger != 'manual') {
+        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'
+        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
+
+        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
+        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+      }
+    }
+
+    this.options.selector ?
+      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
+      this.fixTitle()
+  }
+
+  Tooltip.prototype.getDefaults = function () {
+    return Tooltip.DEFAULTS
+  }
+
+  Tooltip.prototype.getOptions = function (options) {
+    options = $.extend({}, this.getDefaults(), this.$element.data(), options)
+
+    if (options.delay && typeof options.delay == 'number') {
+      options.delay = {
+        show: options.delay,
+        hide: options.delay
+      }
+    }
+
+    return options
+  }
+
+  Tooltip.prototype.getDelegateOptions = function () {
+    var options  = {}
+    var defaults = this.getDefaults()
+
+    this._options && $.each(this._options, function (key, value) {
+      if (defaults[key] != value) options[key] = value
+    })
+
+    return options
+  }
+
+  Tooltip.prototype.enter = function (obj) {
+    var self = obj instanceof this.constructor ?
+      obj : $(obj.currentTarget).data('bs.' + this.type)
+
+    if (!self) {
+      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
+      $(obj.currentTarget).data('bs.' + this.type, self)
+    }
+
+    if (obj instanceof $.Event) {
+      self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
+    }
+
+    if (self.tip().hasClass('in') || self.hoverState == 'in') {
+      self.hoverState = 'in'
+      return
+    }
+
+    clearTimeout(self.timeout)
+
+    self.hoverState = 'in'
+
+    if (!self.options.delay || !self.options.delay.show) return self.show()
+
+    self.timeout = setTimeout(function () {
+      if (self.hoverState == 'in') self.show()
+    }, self.options.delay.show)
+  }
+
+  Tooltip.prototype.isInStateTrue = function () {
+    for (var key in this.inState) {
+      if (this.inState[key]) return true
+    }
+
+    return false
+  }
+
+  Tooltip.prototype.leave = function (obj) {
+    var self = obj instanceof this.constructor ?
+      obj : $(obj.currentTarget).data('bs.' + this.type)
+
+    if (!self) {
+      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
+      $(obj.currentTarget).data('bs.' + this.type, self)
+    }
+
+    if (obj instanceof $.Event) {
+      self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
+    }
+
+    if (self.isInStateTrue()) return
+
+    clearTimeout(self.timeout)
+
+    self.hoverState = 'out'
+
+    if (!self.options.delay || !self.options.delay.hide) return self.hide()
+
+    self.timeout = setTimeout(function () {
+      if (self.hoverState == 'out') self.hide()
+    }, self.options.delay.hide)
+  }
+
+  Tooltip.prototype.show = function () {
+    var e = $.Event('show.bs.' + this.type)
+
+    if (this.hasContent() && this.enabled) {
+      this.$element.trigger(e)
+
+      var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
+      if (e.isDefaultPrevented() || !inDom) return
+      var that = this
+
+      var $tip = this.tip()
+
+      var tipId = this.getUID(this.type)
+
+      this.setContent()
+      $tip.attr('id', tipId)
+      this.$element.attr('aria-describedby', tipId)
+
+      if (this.options.animation) $tip.addClass('fade')
+
+      var placement = typeof this.options.placement == 'function' ?
+        this.options.placement.call(this, $tip[0], this.$element[0]) :
+        this.options.placement
+
+      var autoToken = /\s?auto?\s?/i
+      var autoPlace = autoToken.test(placement)
+      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
+
+      $tip
+        .detach()
+        .css({ top: 0, left: 0, display: 'block' })
+        .addClass(placement)
+        .data('bs.' + this.type, this)
+
+      this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
+      this.$element.trigger('inserted.bs.' + this.type)
+
+      var pos          = this.getPosition()
+      var actualWidth  = $tip[0].offsetWidth
+      var actualHeight = $tip[0].offsetHeight
+
+      if (autoPlace) {
+        var orgPlacement = placement
+        var viewportDim = this.getPosition(this.$viewport)
+
+        placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top'    :
+                    placement == 'top'    && pos.top    - actualHeight < viewportDim.top    ? 'bottom' :
+                    placement == 'right'  && pos.right  + actualWidth  > viewportDim.width  ? 'left'   :
+                    placement == 'left'   && pos.left   - actualWidth  < viewportDim.left   ? 'right'  :
+                    placement
+
+        $tip
+          .removeClass(orgPlacement)
+          .addClass(placement)
+      }
+
+      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
+
+      this.applyPlacement(calculatedOffset, placement)
+
+      var complete = function () {
+        var prevHoverState = that.hoverState
+        that.$element.trigger('shown.bs.' + that.type)
+        that.hoverState = null
+
+        if (prevHoverState == 'out') that.leave(that)
+      }
+
+      $.support.transition && this.$tip.hasClass('fade') ?
+        $tip
+          .one('bsTransitionEnd', complete)
+          .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
+        complete()
+    }
+  }
+
+  Tooltip.prototype.applyPlacement = function (offset, placement) {
+    var $tip   = this.tip()
+    var width  = $tip[0].offsetWidth
+    var height = $tip[0].offsetHeight
+
+    // manually read margins because getBoundingClientRect includes difference
+    var marginTop = parseInt($tip.css('margin-top'), 10)
+    var marginLeft = parseInt($tip.css('margin-left'), 10)
+
+    // we must check for NaN for ie 8/9
+    if (isNaN(marginTop))  marginTop  = 0
+    if (isNaN(marginLeft)) marginLeft = 0
+
+    offset.top  += marginTop
+    offset.left += marginLeft
+
+    // $.fn.offset doesn't round pixel values
+    // so we use setOffset directly with our own function B-0
+    $.offset.setOffset($tip[0], $.extend({
+      using: function (props) {
+        $tip.css({
+          top: Math.round(props.top),
+          left: Math.round(props.left)
+        })
+      }
+    }, offset), 0)
+
+    $tip.addClass('in')
+
+    // check to see if placing tip in new offset caused the tip to resize itself
+    var actualWidth  = $tip[0].offsetWidth
+    var actualHeight = $tip[0].offsetHeight
+
+    if (placement == 'top' && actualHeight != height) {
+      offset.top = offset.top + height - actualHeight
+    }
+
+    var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
+
+    if (delta.left) offset.left += delta.left
+    else offset.top += delta.top
+
+    var isVertical          = /top|bottom/.test(placement)
+    var arrowDelta          = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
+    var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
+
+    $tip.offset(offset)
+    this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
+  }
+
+  Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
+    this.arrow()
+      .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
+      .css(isVertical ? 'top' : 'left', '')
+  }
+
+  Tooltip.prototype.setContent = function () {
+    var $tip  = this.tip()
+    var title = this.getTitle()
+
+    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
+    $tip.removeClass('fade in top bottom left right')
+  }
+
+  Tooltip.prototype.hide = function (callback) {
+    var that = this
+    var $tip = $(this.$tip)
+    var e    = $.Event('hide.bs.' + this.type)
+
+    function complete() {
+      if (that.hoverState != 'in') $tip.detach()
+      if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
+        that.$element
+          .removeAttr('aria-describedby')
+          .trigger('hidden.bs.' + that.type)
+      }
+      callback && callback()
+    }
+
+    this.$element.trigger(e)
+
+    if (e.isDefaultPrevented()) return
+
+    $tip.removeClass('in')
+
+    $.support.transition && $tip.hasClass('fade') ?
+      $tip
+        .one('bsTransitionEnd', complete)
+        .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
+      complete()
+
+    this.hoverState = null
+
+    return this
+  }
+
+  Tooltip.prototype.fixTitle = function () {
+    var $e = this.$element
+    if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
+      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
+    }
+  }
+
+  Tooltip.prototype.hasContent = function () {
+    return this.getTitle()
+  }
+
+  Tooltip.prototype.getPosition = function ($element) {
+    $element   = $element || this.$element
+
+    var el     = $element[0]
+    var isBody = el.tagName == 'BODY'
+
+    var elRect    = el.getBoundingClientRect()
+    if (elRect.width == null) {
+      // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
+      elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
+    }
+    var isSvg = window.SVGElement && el instanceof window.SVGElement
+    // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
+    // See https://github.com/twbs/bootstrap/issues/20280
+    var elOffset  = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
+    var scroll    = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
+    var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
+
+    return $.extend({}, elRect, scroll, outerDims, elOffset)
+  }
+
+  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
+    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2 } :
+           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
+           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
+        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
+
+  }
+
+  Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
+    var delta = { top: 0, left: 0 }
+    if (!this.$viewport) return delta
+
+    var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
+    var viewportDimensions = this.getPosition(this.$viewport)
+
+    if (/right|left/.test(placement)) {
+      var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll
+      var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
+      if (topEdgeOffset < viewportDimensions.top) { // top overflow
+        delta.top = viewportDimensions.top - topEdgeOffset
+      } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
+        delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
+      }
+    } else {
+      var leftEdgeOffset  = pos.left - viewportPadding
+      var rightEdgeOffset = pos.left + viewportPadding + actualWidth
+      if (leftEdgeOffset < viewportDimensions.left) { // left overflow
+        delta.left = viewportDimensions.left - leftEdgeOffset
+      } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
+        delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
+      }
+    }
+
+    return delta
+  }
+
+  Tooltip.prototype.getTitle = function () {
+    var title
+    var $e = this.$element
+    var o  = this.options
+
+    title = $e.attr('data-original-title')
+      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
+
+    return title
+  }
+
+  Tooltip.prototype.getUID = function (prefix) {
+    do prefix += ~~(Math.random() * 1000000)
+    while (document.getElementById(prefix))
+    return prefix
+  }
+
+  Tooltip.prototype.tip = function () {
+    if (!this.$tip) {
+      this.$tip = $(this.options.template)
+      if (this.$tip.length != 1) {
+        throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
+      }
+    }
+    return this.$tip
+  }
+
+  Tooltip.prototype.arrow = function () {
+    return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
+  }
+
+  Tooltip.prototype.enable = function () {
+    this.enabled = true
+  }
+
+  Tooltip.prototype.disable = function () {
+    this.enabled = false
+  }
+
+  Tooltip.prototype.toggleEnabled = function () {
+    this.enabled = !this.enabled
+  }
+
+  Tooltip.prototype.toggle = function (e) {
+    var self = this
+    if (e) {
+      self = $(e.currentTarget).data('bs.' + this.type)
+      if (!self) {
+        self = new this.constructor(e.currentTarget, this.getDelegateOptions())
+        $(e.currentTarget).data('bs.' + this.type, self)
+      }
+    }
+
+    if (e) {
+      self.inState.click = !self.inState.click
+      if (self.isInStateTrue()) self.enter(self)
+      else self.leave(self)
+    } else {
+      self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
+    }
+  }
+
+  Tooltip.prototype.destroy = function () {
+    var that = this
+    clearTimeout(this.timeout)
+    this.hide(function () {
+      that.$element.off('.' + that.type).removeData('bs.' + that.type)
+      if (that.$tip) {
+        that.$tip.detach()
+      }
+      that.$tip = null
+      that.$arrow = null
+      that.$viewport = null
+      that.$element = null
+    })
+  }
+
+
+  // TOOLTIP PLUGIN DEFINITION
+  // =========================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.tooltip')
+      var options = typeof option == 'object' && option
+
+      if (!data && /destroy|hide/.test(option)) return
+      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  var old = $.fn.tooltip
+
+  $.fn.tooltip             = Plugin
+  $.fn.tooltip.Constructor = Tooltip
+
+
+  // TOOLTIP NO CONFLICT
+  // ===================
+
+  $.fn.tooltip.noConflict = function () {
+    $.fn.tooltip = old
+    return this
+  }
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: popover.js v3.3.7
+ * http://getbootstrap.com/javascript/#popovers
+ * ========================================================================
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // POPOVER PUBLIC CLASS DEFINITION
+  // ===============================
+
+  var Popover = function (element, options) {
+    this.init('popover', element, options)
+  }
+
+  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
+
+  Popover.VERSION  = '3.3.7'
+
+  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
+    placement: 'right',
+    trigger: 'click',
+    content: '',
+    template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
+  })
+
+
+  // NOTE: POPOVER EXTENDS tooltip.js
+  // ================================
+
+  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
+
+  Popover.prototype.constructor = Popover
+
+  Popover.prototype.getDefaults = function () {
+    return Popover.DEFAULTS
+  }
+
+  Popover.prototype.setContent = function () {
+    var $tip    = this.tip()
+    var title   = this.getTitle()
+    var content = this.getContent()
+
+    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
+    $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
+      this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
+    ](content)
+
+    $tip.removeClass('fade top bottom left right in')
+
+    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
+    // this manually by checking the contents.
+    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
+  }
+
+  Popover.prototype.hasContent = function () {
+    return this.getTitle() || this.getContent()
+  }
+
+  Popover.prototype.getContent = function () {
+    var $e = this.$element
+    var o  = this.options
+
+    return $e.attr('data-content')
+      || (typeof o.content == 'function' ?
+            o.content.call($e[0]) :
+            o.content)
+  }
+
+  Popover.prototype.arrow = function () {
+    return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
+  }
+
+
+  // POPOVER PLUGIN DEFINITION
+  // =========================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.popover')
+      var options = typeof option == 'object' && option
+
+      if (!data && /destroy|hide/.test(option)) return
+      if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  var old = $.fn.popover
+
+  $.fn.popover             = Plugin
+  $.fn.popover.Constructor = Popover
+
+
+  // POPOVER NO CONFLICT
+  // ===================
+
+  $.fn.popover.noConflict = function () {
+    $.fn.popover = old
+    return this
+  }
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: scrollspy.js v3.3.7
+ * http://getbootstrap.com/javascript/#scrollspy
+ * ========================================================================
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // SCROLLSPY CLASS DEFINITION
+  // ==========================
+
+  function ScrollSpy(element, options) {
+    this.$body          = $(document.body)
+    this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
+    this.options        = $.extend({}, ScrollSpy.DEFAULTS, options)
+    this.selector       = (this.options.target || '') + ' .nav li > a'
+    this.offsets        = []
+    this.targets        = []
+    this.activeTarget   = null
+    this.scrollHeight   = 0
+
+    this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
+    this.refresh()
+    this.process()
+  }
+
+  ScrollSpy.VERSION  = '3.3.7'
+
+  ScrollSpy.DEFAULTS = {
+    offset: 10
+  }
+
+  ScrollSpy.prototype.getScrollHeight = function () {
+    return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
+  }
+
+  ScrollSpy.prototype.refresh = function () {
+    var that          = this
+    var offsetMethod  = 'offset'
+    var offsetBase    = 0
+
+    this.offsets      = []
+    this.targets      = []
+    this.scrollHeight = this.getScrollHeight()
+
+    if (!$.isWindow(this.$scrollElement[0])) {
+      offsetMethod = 'position'
+      offsetBase   = this.$scrollElement.scrollTop()
+    }
+
+    this.$body
+      .find(this.selector)
+      .map(function () {
+        var $el   = $(this)
+        var href  = $el.data('target') || $el.attr('href')
+        var $href = /^#./.test(href) && $(href)
+
+        return ($href
+          && $href.length
+          && $href.is(':visible')
+          && [[$href[offsetMethod]().top + offsetBase, href]]) || null
+      })
+      .sort(function (a, b) { return a[0] - b[0] })
+      .each(function () {
+        that.offsets.push(this[0])
+        that.targets.push(this[1])
+      })
+  }
+
+  ScrollSpy.prototype.process = function () {
+    var scrollTop    = this.$scrollElement.scrollTop() + this.options.offset
+    var scrollHeight = this.getScrollHeight()
+    var maxScroll    = this.options.offset + scrollHeight - this.$scrollElement.height()
+    var offsets      = this.offsets
+    var targets      = this.targets
+    var activeTarget = this.activeTarget
+    var i
+
+    if (this.scrollHeight != scrollHeight) {
+      this.refresh()
+    }
+
+    if (scrollTop >= maxScroll) {
+      return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
+    }
+
+    if (activeTarget && scrollTop < offsets[0]) {
+      this.activeTarget = null
+      return this.clear()
+    }
+
+    for (i = offsets.length; i--;) {
+      activeTarget != targets[i]
+        && scrollTop >= offsets[i]
+        && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
+        && this.activate(targets[i])
+    }
+  }
+
+  ScrollSpy.prototype.activate = function (target) {
+    this.activeTarget = target
+
+    this.clear()
+
+    var selector = this.selector +
+      '[data-target="' + target + '"],' +
+      this.selector + '[href="' + target + '"]'
+
+    var active = $(selector)
+      .parents('li')
+      .addClass('active')
+
+    if (active.parent('.dropdown-menu').length) {
+      active = active
+        .closest('li.dropdown')
+        .addClass('active')
+    }
+
+    active.trigger('activate.bs.scrollspy')
+  }
+
+  ScrollSpy.prototype.clear = function () {
+    $(this.selector)
+      .parentsUntil(this.options.target, '.active')
+      .removeClass('active')
+  }
+
+
+  // SCROLLSPY PLUGIN DEFINITION
+  // ===========================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.scrollspy')
+      var options = typeof option == 'object' && option
+
+      if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  var old = $.fn.scrollspy
+
+  $.fn.scrollspy             = Plugin
+  $.fn.scrollspy.Constructor = ScrollSpy
+
+
+  // SCROLLSPY NO CONFLICT
+  // =====================
+
+  $.fn.scrollspy.noConflict = function () {
+    $.fn.scrollspy = old
+    return this
+  }
+
+
+  // SCROLLSPY DATA-API
+  // ==================
+
+  $(window).on('load.bs.scrollspy.data-api', function () {
+    $('[data-spy="scroll"]').each(function () {
+      var $spy = $(this)
+      Plugin.call($spy, $spy.data())
+    })
+  })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: tab.js v3.3.7
+ * http://getbootstrap.com/javascript/#tabs
+ * ========================================================================
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // TAB CLASS DEFINITION
+  // ====================
+
+  var Tab = function (element) {
+    // jscs:disable requireDollarBeforejQueryAssignment
+    this.element = $(element)
+    // jscs:enable requireDollarBeforejQueryAssignment
+  }
+
+  Tab.VERSION = '3.3.7'
+
+  Tab.TRANSITION_DURATION = 150
+
+  Tab.prototype.show = function () {
+    var $this    = this.element
+    var $ul      = $this.closest('ul:not(.dropdown-menu)')
+    var selector = $this.data('target')
+
+    if (!selector) {
+      selector = $this.attr('href')
+      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+    }
+
+    if ($this.parent('li').hasClass('active')) return
+
+    var $previous = $ul.find('.active:last a')
+    var hideEvent = $.Event('hide.bs.tab', {
+      relatedTarget: $this[0]
+    })
+    var showEvent = $.Event('show.bs.tab', {
+      relatedTarget: $previous[0]
+    })
+
+    $previous.trigger(hideEvent)
+    $this.trigger(showEvent)
+
+    if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
+
+    var $target = $(selector)
+
+    this.activate($this.closest('li'), $ul)
+    this.activate($target, $target.parent(), function () {
+      $previous.trigger({
+        type: 'hidden.bs.tab',
+        relatedTarget: $this[0]
+      })
+      $this.trigger({
+        type: 'shown.bs.tab',
+        relatedTarget: $previous[0]
+      })
+    })
+  }
+
+  Tab.prototype.activate = function (element, container, callback) {
+    var $active    = container.find('> .active')
+    var transition = callback
+      && $.support.transition
+      && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
+
+    function next() {
+      $active
+        .removeClass('active')
+        .find('> .dropdown-menu > .active')
+          .removeClass('active')
+        .end()
+        .find('[data-toggle="tab"]')
+          .attr('aria-expanded', false)
+
+      element
+        .addClass('active')
+        .find('[data-toggle="tab"]')
+          .attr('aria-expanded', true)
+
+      if (transition) {
+        element[0].offsetWidth // reflow for transition
+        element.addClass('in')
+      } else {
+        element.removeClass('fade')
+      }
+
+      if (element.parent('.dropdown-menu').length) {
+        element
+          .closest('li.dropdown')
+            .addClass('active')
+          .end()
+          .find('[data-toggle="tab"]')
+            .attr('aria-expanded', true)
+      }
+
+      callback && callback()
+    }
+
+    $active.length && transition ?
+      $active
+        .one('bsTransitionEnd', next)
+        .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
+      next()
+
+    $active.removeClass('in')
+  }
+
+
+  // TAB PLUGIN DEFINITION
+  // =====================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this = $(this)
+      var data  = $this.data('bs.tab')
+
+      if (!data) $this.data('bs.tab', (data = new Tab(this)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  var old = $.fn.tab
+
+  $.fn.tab             = Plugin
+  $.fn.tab.Constructor = Tab
+
+
+  // TAB NO CONFLICT
+  // ===============
+
+  $.fn.tab.noConflict = function () {
+    $.fn.tab = old
+    return this
+  }
+
+
+  // TAB DATA-API
+  // ============
+
+  var clickHandler = function (e) {
+    e.preventDefault()
+    Plugin.call($(this), 'show')
+  }
+
+  $(document)
+    .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
+    .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: affix.js v3.3.7
+ * http://getbootstrap.com/javascript/#affix
+ * ========================================================================
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+  'use strict';
+
+  // AFFIX CLASS DEFINITION
+  // ======================
+
+  var Affix = function (element, options) {
+    this.options = $.extend({}, Affix.DEFAULTS, options)
+
+    this.$target = $(this.options.target)
+      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
+      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))
+
+    this.$element     = $(element)
+    this.affixed      = null
+    this.unpin        = null
+    this.pinnedOffset = null
+
+    this.checkPosition()
+  }
+
+  Affix.VERSION  = '3.3.7'
+
+  Affix.RESET    = 'affix affix-top affix-bottom'
+
+  Affix.DEFAULTS = {
+    offset: 0,
+    target: window
+  }
+
+  Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
+    var scrollTop    = this.$target.scrollTop()
+    var position     = this.$element.offset()
+    var targetHeight = this.$target.height()
+
+    if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
+
+    if (this.affixed == 'bottom') {
+      if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
+      return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
+    }
+
+    var initializing   = this.affixed == null
+    var colliderTop    = initializing ? scrollTop : position.top
+    var colliderHeight = initializing ? targetHeight : height
+
+    if (offsetTop != null && scrollTop <= offsetTop) return 'top'
+    if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
+
+    return false
+  }
+
+  Affix.prototype.getPinnedOffset = function () {
+    if (this.pinnedOffset) return this.pinnedOffset
+    this.$element.removeClass(Affix.RESET).addClass('affix')
+    var scrollTop = this.$target.scrollTop()
+    var position  = this.$element.offset()
+    return (this.pinnedOffset = position.top - scrollTop)
+  }
+
+  Affix.prototype.checkPositionWithEventLoop = function () {
+    setTimeout($.proxy(this.checkPosition, this), 1)
+  }
+
+  Affix.prototype.checkPosition = function () {
+    if (!this.$element.is(':visible')) return
+
+    var height       = this.$element.height()
+    var offset       = this.options.offset
+    var offsetTop    = offset.top
+    var offsetBottom = offset.bottom
+    var scrollHeight = Math.max($(document).height(), $(document.body).height())
+
+    if (typeof offset != 'object')         offsetBottom = offsetTop = offset
+    if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)
+    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
+
+    var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
+
+    if (this.affixed != affix) {
+      if (this.unpin != null) this.$element.css('top', '')
+
+      var affixType = 'affix' + (affix ? '-' + affix : '')
+      var e         = $.Event(affixType + '.bs.affix')
+
+      this.$element.trigger(e)
+
+      if (e.isDefaultPrevented()) return
+
+      this.affixed = affix
+      this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
+
+      this.$element
+        .removeClass(Affix.RESET)
+        .addClass(affixType)
+        .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
+    }
+
+    if (affix == 'bottom') {
+      this.$element.offset({
+        top: scrollHeight - height - offsetBottom
+      })
+    }
+  }
+
+
+  // AFFIX PLUGIN DEFINITION
+  // =======================
+
+  function Plugin(option) {
+    return this.each(function () {
+      var $this   = $(this)
+      var data    = $this.data('bs.affix')
+      var options = typeof option == 'object' && option
+
+      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  var old = $.fn.affix
+
+  $.fn.affix             = Plugin
+  $.fn.affix.Constructor = Affix
+
+
+  // AFFIX NO CONFLICT
+  // =================
+
+  $.fn.affix.noConflict = function () {
+    $.fn.affix = old
+    return this
+  }
+
+
+  // AFFIX DATA-API
+  // ==============
+
+  $(window).on('load', function () {
+    $('[data-spy="affix"]').each(function () {
+      var $spy = $(this)
+      var data = $spy.data()
+
+      data.offset = data.offset || {}
+
+      if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
+      if (data.offsetTop    != null) data.offset.top    = data.offsetTop
+
+      Plugin.call($spy, data)
+    })
+  })
+
+}(jQuery);
Index: EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/js/bootstrap.min.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/js/bootstrap.min.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/js/bootstrap.min.js	(revision 270)
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under the MIT license
+ */
+if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){document===a.target||this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);if(this.$element.trigger(g),!g.isDefaultPrevented())return f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=window.SVGElement&&c instanceof window.SVGElement,g=d?{top:0,left:0}:f?null:b.offset(),h={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},i=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,h,i,g)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){
+this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e<c&&"top";if("bottom"==this.affixed)return null!=c?!(e+this.unpin<=f.top)&&"bottom":!(e+g<=a-d)&&"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&e<=c?"top":null!=d&&i+j>=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
Index: EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/js/ie-emulation-modes-warning.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/js/ie-emulation-modes-warning.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/js/ie-emulation-modes-warning.js	(revision 270)
@@ -0,0 +1,51 @@
+// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
+// IT'S JUST JUNK FOR OUR DOCS!
+// ++++++++++++++++++++++++++++++++++++++++++
+/*!
+ * Copyright 2014-2015 Twitter, Inc.
+ *
+ * Licensed under the Creative Commons Attribution 3.0 Unported License. For
+ * details, see https://creativecommons.org/licenses/by/3.0/.
+ */
+// Intended to prevent false-positive bug reports about Bootstrap not working properly in old versions of IE due to folks testing using IE's unreliable emulation modes.
+(function () {
+  'use strict';
+
+  function emulatedIEMajorVersion() {
+    var groups = /MSIE ([0-9.]+)/.exec(window.navigator.userAgent)
+    if (groups === null) {
+      return null
+    }
+    var ieVersionNum = parseInt(groups[1], 10)
+    var ieMajorVersion = Math.floor(ieVersionNum)
+    return ieMajorVersion
+  }
+
+  function actualNonEmulatedIEMajorVersion() {
+    // Detects the actual version of IE in use, even if it's in an older-IE emulation mode.
+    // IE JavaScript conditional compilation docs: https://msdn.microsoft.com/library/121hztk3%28v=vs.94%29.aspx
+    // @cc_on docs: https://msdn.microsoft.com/library/8ka90k2e%28v=vs.94%29.aspx
+    var jscriptVersion = new Function('/*@cc_on return @_jscript_version; @*/')() // jshint ignore:line
+    if (jscriptVersion === undefined) {
+      return 11 // IE11+ not in emulation mode
+    }
+    if (jscriptVersion < 9) {
+      return 8 // IE8 (or lower; haven't tested on IE<8)
+    }
+    return jscriptVersion // IE9 or IE10 in any mode, or IE11 in non-IE11 mode
+  }
+
+  var ua = window.navigator.userAgent
+  if (ua.indexOf('Opera') > -1 || ua.indexOf('Presto') > -1) {
+    return // Opera, which might pretend to be IE
+  }
+  var emulated = emulatedIEMajorVersion()
+  if (emulated === null) {
+    return // Not IE
+  }
+  var nonEmulated = actualNonEmulatedIEMajorVersion()
+
+  if (emulated !== nonEmulated) {
+    window.alert('WARNING: You appear to be using IE' + nonEmulated + ' in IE' + emulated + ' emulation mode.\nIE emulation modes can behave significantly differently from ACTUAL older versions of IE.\nPLEASE DON\'T FILE BOOTSTRAP BUGS based on testing in IE emulation modes!')
+  }
+})();
Index: EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/js/ie10-viewport-bug-workaround.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/js/ie10-viewport-bug-workaround.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/js/ie10-viewport-bug-workaround.js	(revision 270)
@@ -0,0 +1,23 @@
+/*!
+ * IE10 viewport hack for Surface/desktop Windows 8 bug
+ * Copyright 2014-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+// See the Getting Started docs for more information:
+// http://getbootstrap.com/getting-started/#support-ie10-width
+
+(function () {
+  'use strict';
+
+  if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
+    var msViewportStyle = document.createElement('style')
+    msViewportStyle.appendChild(
+      document.createTextNode(
+        '@-ms-viewport{width:auto!important}'
+      )
+    )
+    document.querySelector('head').appendChild(msViewportStyle)
+  }
+
+})();
Index: EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/js/ie8-responsive-file-warning.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/js/ie8-responsive-file-warning.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/bootstrap/js/ie8-responsive-file-warning.js	(revision 270)
@@ -0,0 +1,13 @@
+// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
+// IT'S JUST JUNK FOR OUR DOCS!
+// ++++++++++++++++++++++++++++++++++++++++++
+/*!
+ * Copyright 2011-2015 Twitter, Inc.
+ *
+ * Licensed under the Creative Commons Attribution 3.0 Unported License. For
+ * details, see https://creativecommons.org/licenses/by/3.0/.
+ */
+// Intended to prevent false-positive bug reports about responsive styling supposedly not working in IE8.
+if (window.location.protocol == 'file:') {
+  window.alert('ERROR: Bootstrap\'s responsive CSS is disabled!\nSee getbootstrap.com/getting-started/#respond-file-proto for details.')
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/copy.bat
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/copy.bat	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/copy.bat	(revision 270)
@@ -0,0 +1,58 @@
+del /Q /S ..\..\httpd-fs
+
+mkdir ..\..\httpd-fs
+mkdir ..\..\httpd-fs\ace
+mkdir ..\..\httpd-fs\bootstrap
+mkdir ..\..\httpd-fs\bootstrap\css
+mkdir ..\..\httpd-fs\bootstrap\fonts
+mkdir ..\..\httpd-fs\bootstrap\js
+mkdir ..\..\httpd-fs\css
+mkdir ..\..\httpd-fs\img
+mkdir ..\..\httpd-fs\js
+mkdir ..\..\httpd-fs\xterm
+mkdir ..\..\httpd-fs\xterm\addons
+mkdir ..\..\httpd-fs\xterm\addons\fit
+mkdir ..\..\httpd-fs\xterm\src
+
+rem java -jar ..\..\tools\yuicompressor-2.4.8.jar mrbc.js -o mrbc.min.js
+java -jar ..\..\tools\yuicompressor-2.4.8.jar css\webmrbc.css -o css\webmrbc.min.css
+rem java -jar ..\..\tools\yuicompressor-2.4.8.jar echonet_objects.json -o echonet_objects.min.json
+java -jar ..\..\tools\yuicompressor-2.4.8.jar ace\ace.js -o ace\ace.min.js
+java -jar ..\..\tools\yuicompressor-2.4.8.jar ace\mode-ruby.js -o ace\mode-ruby.min.js
+java -jar ..\..\tools\yuicompressor-2.4.8.jar ace\theme-twilight.js -o ace\theme-twilight.min.js
+java -jar ..\..\tools\yuicompressor-2.4.8.jar xterm\addons\fit\fit.js -o xterm\addons\fit\fit.min.js
+java -jar ..\..\tools\yuicompressor-2.4.8.jar xterm\src\xterm.css -o xterm\src\xterm.min.css
+java -jar ..\..\tools\yuicompressor-2.4.8.jar xterm\src\xterm.js -o xterm\src\xterm.min.js
+
+copy /Y ace\ace.min.js ..\..\httpd-fs\ace\ace.js
+copy /Y ace\mode-ruby.min.js ..\..\httpd-fs\ace\mode-ruby.js
+copy /Y ace\theme-twilight.min.js ..\..\httpd-fs\ace\theme-twilight.js
+copy /Y arduino_toolbox.xml ..\..\httpd-fs\arduino_toolbox.xml
+copy /Y bootstrap\css\bootstrap-theme.min.css ..\..\httpd-fs\bootstrap\css\bootstrap-theme.min.css
+copy /Y bootstrap\css\bootstrap.min.css ..\..\httpd-fs\bootstrap\css\bootstrap.min.css
+copy /Y bootstrap\fonts\glyphicons-halflings-regular.eot ..\..\httpd-fs\bootstrap\fonts\glyphicons-halflings-regular.eot
+copy /Y bootstrap\fonts\glyphicons-halflings-regular.svg ..\..\httpd-fs\bootstrap\fonts\glyphicons-halflings-regular.svg
+copy /Y bootstrap\fonts\glyphicons-halflings-regular.ttf ..\..\httpd-fs\bootstrap\fonts\glyphicons-halflings-regular.ttf
+copy /Y bootstrap\fonts\glyphicons-halflings-regular.woff ..\..\httpd-fs\bootstrap\fonts\glyphicons-halflings-regular.woff
+copy /Y bootstrap\fonts\glyphicons-halflings-regular.woff2 ..\..\httpd-fs\bootstrap\fonts\glyphicons-halflings-regular.woff2
+copy /Y bootstrap\js\bootstrap.min.js ..\..\httpd-fs\bootstrap\js\bootstrap.min.js
+copy /Y css\webmrbc.min.css ..\..\httpd-fs\css\webmrbc.css
+copy /Y echonet_objects.min.json ..\..\httpd-fs\echonet_objects.json
+copy /Y ecnl_toolbox.xml ..\..\httpd-fs\ecnl_toolbox.xml
+copy /Y favicon.ico ..\..\httpd-fs\favicon.ico
+copy /Y img\banner.svg ..\..\httpd-fs\img\banner.svg
+copy /Y img\no_image.png ..\..\httpd-fs\img\no_image.png
+copy /Y index.min.html ..\..\httpd-fs\index.html
+copy /Y js\FileSaver.min.js ..\..\httpd-fs\js\FileSaver.min.js
+copy /Y js\blockly_compressed.js ..\..\httpd-fs\js\blockly_compressed.js
+copy /Y js\bridge.min.js ..\..\httpd-fs\js\bridge.min.js
+copy /Y js\jquery-3.1.0.min.js ..\..\httpd-fs\js\jquery-3.1.0.min.js
+copy /Y js\jszip.min.js ..\..\httpd-fs\js\jszip.min.js
+copy /Y js\webmrbc.min.js ..\..\httpd-fs\js\webmrbc.min.js
+copy /Y mrbc.min.js ..\..\httpd-fs\mrbc.min.js
+copy /Y xterm\addons\fit\fit.min.js ..\..\httpd-fs\xterm\addons\fit\fit.js
+copy /Y xterm\src\xterm.min.css ..\..\httpd-fs\xterm\src\xterm.css
+copy /Y xterm\src\xterm.min.js ..\..\httpd-fs\xterm\src\xterm.js
+
+CD ..\..\
+tools\makefsdata.exe
Index: EcnlProtoTool/trunk/webapp/webmrbc/css/webmrbc.css
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/css/webmrbc.css	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/css/webmrbc.css	(revision 270)
@@ -0,0 +1,446 @@
+html, body {
+	height: 100%;
+	margin: 0;
+}
+
+body {
+	user-select: none;
+	-moz-user-select: none;
+	-khtml-user-select: none;
+	-webkit-user-select: none;
+	-ms-user-select: none;
+}
+
+html {
+	-ms-touch-action: manipulation;
+}
+
+.dropdown-menu > li > a {
+	cursor: default;
+}
+
+#main-menu {
+	margin-bottom: 0px;
+}
+
+	#main-menu .container {
+		width: 100%;
+	}
+
+#modes-container {
+	position: absolute;
+	width: 100%;
+	left: 0;
+	top: 56px;
+	right: 0;
+	bottom: 0;
+}
+
+	#modes-container .modes-tab-pane {
+		position: relative;
+		height: 100%;
+	}
+
+#selectors-container {
+	position: absolute;
+	margin-left: 20px;
+	width: 200px;
+	height: 100%;
+	overflow: hidden;
+}
+
+	#selectors-container ul.nav-pills {
+		margin: 0 0 4px 0;
+		font-size: 0.8em;
+		line-height: 1em;
+	}
+
+		#selectors-container ul.nav-pills li {
+			line-height: 12px;
+		}
+
+			#selectors-container ul.nav-pills li a {
+				margin-right: 2px;
+				margin-top: 2px;
+				margin-bottom: 2px;
+				padding-top: 8px;
+				padding-bottom: 8px;
+				padding-right: 5px;
+				padding-left: 5px;
+				line-height: 12px;
+			}
+
+#selectors-tab-content {
+	position: absolute;
+	top: 32px;
+	left: 0;
+	right: 0;
+	bottom: -2px;
+	overflow-y: scroll;
+}
+
+	#selectors-tab-content .selector-tab .item {
+		position: relative;
+	}
+
+		#selectors-tab-content .selector-tab .item a {
+			text-decoration: none;
+			cursor: pointer;
+			font-size: 1.5em;
+			vertical-align: middle;
+			display: table-cell;
+		}
+
+		#selectors-tab-content .selector-tab .item .item-info {
+			position: absolute;
+			left: 0;
+			top: 0;
+			right: 0;
+			bottom: 0;
+			width: 160px;
+			height: 160px;
+			color: gray;
+		}
+
+			#selectors-tab-content .selector-tab .item .item-info .name {
+				position: absolute;
+				left: 10px;
+				top: 10px;
+				font-size: 1em;
+				z-index: 1;
+			}
+
+			#selectors-tab-content .selector-tab .item .item-info .attributes {
+				position: absolute;
+				left: 10px;
+				bottom: 10px;
+				font-size: 0.8em;
+				line-height: 1.1em;
+				text-align: left;
+				z-index: 1;
+			}
+
+			#selectors-tab-content .selector-tab .item .item-info a.modify-button {
+				position: absolute;
+				right: 10px;
+				bottom: 10px;
+				padding-left: 0.5em;
+				padding-top: 0.5em;
+				font-size: 1.5em;
+				z-index: 1;
+			}
+
+			#selectors-tab-content .selector-tab .item .item-info .topright-buttons {
+				position: absolute;
+				right: 10px;
+				top: 10px;
+				padding-left: 0.5em;
+				padding-bottom: 0.5em;
+				z-index: 1;
+			}
+
+				#selectors-tab-content .selector-tab .item .item-info .topright-buttons > a {
+					font-size: 1.5em;
+				}
+
+		#selectors-tab-content .selector-tab .item a.celltype {
+			position: relative;
+			overflow: hidden;
+			display: table-cell;
+			text-align: center;
+			vertical-align: middle;
+			width: 170px;
+			height: 170px;
+			border: 5px solid white;
+		}
+
+			#selectors-tab-content .selector-tab .item a.celltype div {
+				margin: -5px;
+			}
+
+			#selectors-tab-content .selector-tab .item a.celltype img {
+				max-width: 160px;
+				max-height: 160px;
+			}
+
+			#selectors-tab-content .selector-tab .item a.celltype:hover {
+				border: 5px solid #0088cc;
+			}
+
+		#selectors-tab-content .selector-tab .item a#add-celltype-button.celltype {
+			text-align: center;
+			vertical-align: middle;
+			font-size: 1em;
+			border: 5px dashed lightgrey;
+		}
+
+			#selectors-tab-content .selector-tab .item a#add-celltype-button.celltype i {
+				font-size: 2em;
+			}
+
+			#selectors-tab-content .selector-tab .item a#add-celltype-button.celltype:hover {
+				border: 5px dashed #0088cc;
+			}
+
+#block-tab-left-pane {
+	position: relative;
+	height: 100%;
+	width: 100%;
+	float: left;
+}
+
+#block-tab-right-pane {
+	position: absolute;
+	height: 100%;
+	width: 100%;
+	float: right;
+}
+
+	#block-tab-right-pane .blockly-div {
+		margin-left: 220px;
+		position: absolute;
+		left: 0;
+		top: 0;
+		right: 0;
+		bottom: 0;
+		-ms-touch-action: none;
+	}
+
+		#block-tab-right-pane .blockly-div svg.blocklySvg {
+			overflow: hidden;
+		}
+
+#text-editor {
+	position: absolute;
+	left: 0;
+	top: 0;
+	right: 0;
+	bottom: 0;
+	font-size: 10pt;
+}
+
+#eobject-modal {
+	position: absolute;
+	top: 5%;
+	left: 5%;
+	width: 90%;
+	height: 90%;
+}
+
+	#eobject-modal .modal-dialog {
+		width: 100%;
+		height: 100%;
+		margin-top: 0px;
+		margin-bottom: 0px;
+	}
+
+	#eobject-modal .modal-body {
+		padding: 0px;
+		height: 480px;
+	}
+
+#eobject-modal-preview {
+	position: relative;
+	width: 160px;
+	height: 160px;
+	background-color: white;
+	border: 1px solid gray;
+	overflow: hidden;
+	margin-bottom: 8px;
+}
+
+#eobject-modal-celltype {
+	position: absolute;
+	-ms-touch-action: none;
+}
+
+	#eobject-modal-celltype img {
+		width: 100%;
+		height: 100%;
+	}
+
+#eobject-modal-form {
+	margin-bottom: 0;
+}
+
+	#eobject-modal-form .control-group {
+		margin-bottom: 8px;
+	}
+
+		#eobject-modal-form .control-group .control-label {
+			width: 30%;
+		}
+
+		#eobject-modal-form .control-group .dropdown {
+			display: inline-block;
+		}
+
+		#eobject-modal-form .control-group .controls {
+			display: inline-flex;
+		}
+
+#eobject-modal-left-pane {
+	position: relative;
+	height: 80%;
+	width: 50%;
+	float: left;
+}
+
+#eobject-modal-right-pane {
+	position: absolute;
+	margin-left: 50%;
+	height: 80%;
+	width: 50%;
+	float: left;
+}
+
+#eobject-modal-right-pane-inner {
+	left: 0;
+	top: 0;
+	right: 0;
+	bottom: 0;
+	height: 480px;
+	overflow-y: scroll;
+}
+
+#eobject_properties {
+	width: 100%;
+}
+
+	#eobject_properties label {
+		text-align: left;
+	}
+
+#preference-modal {
+	width: 700px;
+	margin-left: -350px;
+}
+
+	#preference-modal .modal-body form {
+		margin-bottom: 0;
+	}
+
+		#preference-modal .modal-body form .control-group {
+			margin-bottom: 8px;
+		}
+
+.emscripten {
+	padding-right: 0;
+	margin-left: auto;
+	margin-right: auto;
+	display: block;
+}
+
+div.emscripten {
+	text-align: center;
+}
+
+div.emscripten_border {
+	border: 1px solid black;
+}
+
+#emscripten_logo {
+	display: inline-block;
+	margin: 4px;
+}
+
+.spinner {
+	height: 30px;
+	width: 30px;
+	margin: 0;
+	margin-top: 20px;
+	margin-left: 20px;
+	display: inline-block;
+	vertical-align: top;
+	-webkit-animation: rotation .8s linear infinite;
+	-moz-animation: rotation .8s linear infinite;
+	-o-animation: rotation .8s linear infinite;
+	animation: rotation 0.8s linear infinite;
+	border-left: 5px solid rgb(235, 235, 235);
+	border-right: 5px solid rgb(235, 235, 235);
+	border-bottom: 5px solid rgb(235, 235, 235);
+	border-top: 5px solid rgb(120, 120, 120);
+	border-radius: 100%;
+	background-color: rgb(189, 215, 46);
+}
+
+#emscripten-box {
+	position: absolute;
+	top: 0px;
+}
+
+#term-box {
+	position: relative;
+	height: 100%;
+}
+
+#term {
+	position: absolute;
+	top: 0;
+	right: 0;
+	bottom: 0;
+	left: 0;
+	font-size: small;
+}
+
+@-webkit-keyframes rotation {
+	from {
+		-webkit-transform: rotate(0deg);
+	}
+
+	to {
+		-webkit-transform: rotate(360deg);
+	}
+}
+
+@-moz-keyframes rotation {
+	from {
+		-moz-transform: rotate(0deg);
+	}
+
+	to {
+		-moz-transform: rotate(360deg);
+	}
+}
+
+@-o-keyframes rotation {
+	from {
+		-o-transform: rotate(0deg);
+	}
+
+	to {
+		-o-transform: rotate(360deg);
+	}
+}
+
+@keyframes rotation {
+	from {
+		transform: rotate(0deg);
+	}
+
+	to {
+		transform: rotate(360deg);
+	}
+}
+
+#status {
+	display: inline-block;
+	vertical-align: top;
+	margin-top: 30px;
+	margin-left: 20px;
+	font-weight: bold;
+	color: rgb(120, 120, 120);
+}
+
+#progress {
+	height: 20px;
+	width: 30px;
+}
+
+#controls {
+	display: inline-block;
+	float: right;
+	vertical-align: top;
+	margin-top: 30px;
+	margin-right: 20px;
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/echonet_objects.json
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/echonet_objects.json	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/echonet_objects.json	(revision 270)
@@ -0,0 +1,26851 @@
+{
+	"baseProfilePropertyList":[
+		{
+			"access":[
+				"RULE_GET"
+			],
+			"arrayCount":0,
+			"description":"ç°å¸¸çºçç¶æ
+",
+			"fields":[
+				
+			],
+			"identifier":"FaultStatus",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":true,
+			"propertyCode":136,
+			"required":[
+				"NONE"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":"0x41=ç°å¸¸çºçæ,0x42=ç°å¸¸çºçç¡"
+		},
+		{
+			"access":[
+				"RULE_GET"
+			],
+			"arrayCount":0,
+			"description":"ã¡ã¼ã«ã¼ã³ã¼ã",
+			"fields":[
+				{
+					"arrayCount":3,
+					"description":"ã¡ã¼ã«ã¼ã³ã¼ã",
+					"fields":[
+						
+					],
+					"identifier":"ManufacturerCode",
+					"initialValue":null,
+					"isArray":true,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":null,
+					"valueDescription":"ECHONETã³ã³ã½ã¼ã·ã¢ã ã§è¦å®ã"
+				}
+			],
+			"identifier":"ManufacturerCode",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":false,
+			"propertyCode":138,
+			"required":[
+				"RULE_GET"
+			],
+			"size":3,
+			"type":"manufacturer_code_t",
+			"unitDescription":null,
+			"valueDescription":""
+		},
+		{
+			"access":[
+				"RULE_GET"
+			],
+			"arrayCount":3,
+			"description":"äºæ¥­å ´ã³ã¼ã",
+			"fields":[
+				
+			],
+			"identifier":"PlaceOfBusinessCode",
+			"initialValue":null,
+			"isArray":true,
+			"primitive":true,
+			"propertyCode":139,
+			"required":[
+				"NONE"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":"(åã¡ã¼ã«æ¯ã«è¦å®ã)"
+		},
+		{
+			"access":[
+				"RULE_GET"
+			],
+			"arrayCount":12,
+			"description":"ååã³ã¼ã",
+			"fields":[
+				
+			],
+			"identifier":"ProductCode",
+			"initialValue":null,
+			"isArray":true,
+			"primitive":true,
+			"propertyCode":140,
+			"required":[
+				"NONE"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":"(åã¡ã¼ã«æ¯ã«è¦å®ã)"
+		},
+		{
+			"access":[
+				"RULE_GET"
+			],
+			"arrayCount":12,
+			"description":"è£½é çªå·",
+			"fields":[
+				
+			],
+			"identifier":"SerialNumber",
+			"initialValue":null,
+			"isArray":true,
+			"primitive":true,
+			"propertyCode":141,
+			"required":[
+				"NONE"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":"(åã¡ã¼ã«æ¯ã«è¦å®ã)"
+		},
+		{
+			"access":[
+				"RULE_GET"
+			],
+			"arrayCount":0,
+			"description":"è£½é å¹´ææ¥",
+			"fields":[
+				{
+					"arrayCount":0,
+					"description":"å¹´",
+					"fields":[
+						
+					],
+					"identifier":"Year",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":2,
+					"type":"uint16_t",
+					"unitDescription":"å¹´",
+					"valueDescription":"0x0001ï½0x270F(1ï½9999)"
+				},
+				{
+					"arrayCount":0,
+					"description":"æ",
+					"fields":[
+						
+					],
+					"identifier":"Mounth",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":"æ",
+					"valueDescription":"0x01ï½0x0C(1ï½12)"
+				},
+				{
+					"arrayCount":0,
+					"description":"æ¥",
+					"fields":[
+						
+					],
+					"identifier":"Day",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":"æ¥",
+					"valueDescription":"0x01ï½0x1F(1ï½31)"
+				}
+			],
+			"identifier":"DateOfManufacture",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":false,
+			"propertyCode":142,
+			"required":[
+				"NONE"
+			],
+			"size":4,
+			"type":"year_mounth_day_t",
+			"unitDescription":null,
+			"valueDescription":""
+		},
+		{
+			"access":[
+				"RULE_GET",
+				"VARIABLE"
+			],
+			"arrayCount":17,
+			"description":"ç¶å¤ã¢ãã¦ã³ã¹ãã­ããã£ããã",
+			"fields":[
+				
+			],
+			"identifier":"StatusChangeAnnouncementPropertyMap",
+			"initialValue":null,
+			"isArray":true,
+			"primitive":true,
+			"propertyCode":157,
+			"required":[
+				"RULE_GET"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":""
+		},
+		{
+			"access":[
+				"RULE_GET",
+				"VARIABLE"
+			],
+			"arrayCount":17,
+			"description":"ï¼³ï½
+ï½ãã­ããã£ããã",
+			"fields":[
+				
+			],
+			"identifier":"SetPropertyMap",
+			"initialValue":null,
+			"isArray":true,
+			"primitive":true,
+			"propertyCode":158,
+			"required":[
+				"RULE_GET"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":""
+		},
+		{
+			"access":[
+				"RULE_GET",
+				"VARIABLE"
+			],
+			"arrayCount":17,
+			"description":"ï¼§ï½
+ï½ãã­ããã£ããã",
+			"fields":[
+				
+			],
+			"identifier":"GetPropertyMap",
+			"initialValue":null,
+			"isArray":true,
+			"primitive":true,
+			"propertyCode":159,
+			"required":[
+				"RULE_GET"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":""
+		}
+	],
+	"baseObjectPropertyList":[
+		{
+			"access":[
+				"RULE_SET",
+				"RULE_GET",
+				"ANNOUNCE"
+			],
+			"arrayCount":0,
+			"description":"åä½ç¶æ
+",
+			"fields":[
+				
+			],
+			"identifier":"OperationStatus",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":true,
+			"propertyCode":128,
+			"required":[
+				"RULE_GET"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":"0x30=ON,0x31=OFF"
+		},
+		{
+			"access":[
+				"RULE_SET",
+				"RULE_GET",
+				"ANNOUNCE"
+			],
+			"arrayCount":0,
+			"description":"è¨­ç½®å ´æ",
+			"fields":[
+				
+			],
+			"identifier":"InstallationLocation",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":true,
+			"propertyCode":129,
+			"required":[
+				"RULE_SET",
+				"RULE_GET"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":"2.2è¨­ç½®å ´æãã­ããã£åç
+§"
+		},
+		{
+			"access":[
+				"RULE_GET"
+			],
+			"arrayCount":0,
+			"description":"è¦æ ¼ï¼¶ï½
+ï½ï½ï½ï½ï½æ
+å ±",
+			"fields":[
+				{
+					"arrayCount":0,
+					"description":"åºå®1(for future reserved)",
+					"fields":[
+						
+					],
+					"identifier":"Reserved1",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":null,
+					"valueDescription":"0x00"
+				},
+				{
+					"arrayCount":0,
+					"description":"åºå®2(for future reserved)",
+					"fields":[
+						
+					],
+					"identifier":"Reserved2",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":null,
+					"valueDescription":"0x00"
+				},
+				{
+					"arrayCount":0,
+					"description":"ãªãªã¼ã¹é ãASCIIã§ç¤ºã",
+					"fields":[
+						
+					],
+					"identifier":"OrderOfRelease",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":null,
+					"valueDescription":""
+				},
+				{
+					"arrayCount":0,
+					"description":"åºå®4(for future reserved)",
+					"fields":[
+						
+					],
+					"identifier":"Reserved4",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":null,
+					"valueDescription":"0x00"
+				}
+			],
+			"identifier":"StandardVersionInformation",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":false,
+			"propertyCode":130,
+			"required":[
+				"RULE_GET"
+			],
+			"size":4,
+			"type":"standard_version_information_t",
+			"unitDescription":null,
+			"valueDescription":""
+		},
+		{
+			"access":[
+				"RULE_GET"
+			],
+			"arrayCount":0,
+			"description":"è­å¥çªå·",
+			"fields":[
+				{
+					"arrayCount":0,
+					"description":"ä¸ä½éä¿¡å±¤IDãã£ã¼ã«ã",
+					"fields":[
+						
+					],
+					"identifier":"LowerLayerCommunicationIdField",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":null,
+					"valueDescription":"0x01ï½0xFD=ä¸ä½éä¿¡å±¤ã§ä½¿ç¨ãããéä¿¡ãã­ãã³ã«ã§åºæã®çªå·ãæ¯ããã¦ããå ´åããã­ãã³ã«å¥ã«å¿ãã¦ãä»»æã«è¨­å®ï¼ECHONET Liteã§ã¯ä½¿ç¨ããªãï¼,0x11ï½0x1F=é»ç¯ç·a\/dæ¹å¼,0x31ï½0x3F=ç¹å®å°é»åç¡ç·,0x41ï½0x4F=æ¡å¼µHBS,0x51ï½0x5F=IrDA,0x61ï½0x6F=LonTalk,0x71ï½0x7F=Bluetooth,0x81ï½0x8F=ã¤ã¼ãµããã,0x91ï½0x9F=IEEE802.11\/11b,0xA1=é»ç¯ç·cæ¹å¼,0xB1=IPv6\/Ethernet,0xB2=IPv6\/6LoWPAN,0xFE=2ãã17ãã¤ããã¡ã¼ã«è¦å®ãå½¢å¼ã«ããè¨­å®ï¼è©³ç´°èª¬æåç
+§ï¼,0xFF=2ãã9ãã¤ããä¹±æ°ã«ããçæãããã­ãã³ã«ãä¸ä½éä¿¡å±¤ã§ä½¿ç¨ããå ´åã«è¨­å®,0x00=è­å¥çªå·æªè¨­å®"
+				},
+				{
+					"arrayCount":16,
+					"description":"åºæçªå·ãã£ã¼ã«ã",
+					"fields":[
+						
+					],
+					"identifier":"UniqueNumberField",
+					"initialValue":null,
+					"isArray":true,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":null,
+					"valueDescription":""
+				}
+			],
+			"identifier":"IdentificationNumber",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":false,
+			"propertyCode":131,
+			"required":[
+				"NONE"
+			],
+			"size":17,
+			"type":"device_identification_number_t",
+			"unitDescription":null,
+			"valueDescription":""
+		},
+		{
+			"access":[
+				"RULE_GET"
+			],
+			"arrayCount":0,
+			"description":"ç¬ææ¶è²»é»åè¨æ¸¬å¤",
+			"fields":[
+				
+			],
+			"identifier":"MeasuredInstantaneousPowerConsumption",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":true,
+			"propertyCode":132,
+			"required":[
+				"NONE"
+			],
+			"size":2,
+			"type":"uint16_t",
+			"unitDescription":"W",
+			"valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"
+		},
+		{
+			"access":[
+				"RULE_GET"
+			],
+			"arrayCount":0,
+			"description":"ç©ç®æ¶è²»é»åè¨æ¸¬å¤",
+			"fields":[
+				
+			],
+			"identifier":"MeasuredCumulativePowerConsumption",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":true,
+			"propertyCode":133,
+			"required":[
+				"NONE"
+			],
+			"size":4,
+			"type":"uint32_t",
+			"unitDescription":"kWh",
+			"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"
+		},
+		{
+			"access":[
+				"RULE_GET",
+				"VARIABLE"
+			],
+			"arrayCount":0,
+			"description":"ã¡ã¼ã«ç°å¸¸ã³ã¼ã",
+			"fields":[
+				{
+					"arrayCount":0,
+					"description":"ç°å¸¸ã³ã¼ãé¨ã®ãã¼ã¿ãµã¤ãº",
+					"fields":[
+						
+					],
+					"identifier":"DataSizeOfTheFaultCodeField",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":null,
+					"valueDescription":""
+				},
+				{
+					"arrayCount":0,
+					"description":"ã¡ã¼ã«ã¼ã³ã¼ã",
+					"fields":[
+						{
+							"arrayCount":3,
+							"description":"ã¡ã¼ã«ã¼ã³ã¼ã",
+							"fields":[
+								
+							],
+							"identifier":"ManufacturerCode",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"ECHONETã³ã³ã½ã¼ã·ã¢ã ã§è¦å®ã"
+						}
+					],
+					"identifier":"ManufacturerCode",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":false,
+					"size":3,
+					"type":"manufacturer_code_t",
+					"unitDescription":null,
+					"valueDescription":""
+				},
+				{
+					"arrayCount":221,
+					"description":"åã¡ã¼ã«ç¬èªã®ç°å¸¸ã³ã¼ãé¨",
+					"fields":[
+						
+					],
+					"identifier":"FieldForManufacturerDefinedFaultCode",
+					"initialValue":null,
+					"isArray":true,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":null,
+					"valueDescription":""
+				}
+			],
+			"identifier":"ManufacturersFaultCode",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":false,
+			"propertyCode":134,
+			"required":[
+				"NONE"
+			],
+			"size":225,
+			"type":"manufacturers_fault_code_t",
+			"unitDescription":null,
+			"valueDescription":""
+		},
+		{
+			"access":[
+				"RULE_SET",
+				"RULE_GET"
+			],
+			"arrayCount":0,
+			"description":"é»æµå¶éè¨­å®",
+			"fields":[
+				
+			],
+			"identifier":"CurrentLimitSetting",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":true,
+			"propertyCode":135,
+			"required":[
+				"NONE"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":"ï¼
+",
+			"valueDescription":"0x00ï½0x64(0ï½100%)"
+		},
+		{
+			"access":[
+				"RULE_GET",
+				"ANNOUNCE"
+			],
+			"arrayCount":0,
+			"description":"ç°å¸¸çºçç¶æ
+",
+			"fields":[
+				
+			],
+			"identifier":"FaultStatus",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":true,
+			"propertyCode":136,
+			"required":[
+				"RULE_GET"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":"0x41=ç°å¸¸çºçæ,0x42=ç°å¸¸çºçç¡"
+		},
+		{
+			"access":[
+				"RULE_GET"
+			],
+			"arrayCount":0,
+			"description":"ç°å¸¸å
+å®¹",
+			"fields":[
+				
+			],
+			"identifier":"FaultDescription",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":true,
+			"propertyCode":137,
+			"required":[
+				"NONE"
+			],
+			"size":2,
+			"type":"uint16_t",
+			"unitDescription":null,
+			"valueDescription":"2.5ç°å¸¸å
+å®¹ãã­ããã£åç
+§"
+		},
+		{
+			"access":[
+				"RULE_GET"
+			],
+			"arrayCount":0,
+			"description":"ã¡ã¼ã«ã¼ã³ã¼ã",
+			"fields":[
+				{
+					"arrayCount":3,
+					"description":"ã¡ã¼ã«ã¼ã³ã¼ã",
+					"fields":[
+						
+					],
+					"identifier":"ManufacturerCode",
+					"initialValue":null,
+					"isArray":true,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":null,
+					"valueDescription":"ECHONETã³ã³ã½ã¼ã·ã¢ã ã§è¦å®ã"
+				}
+			],
+			"identifier":"ManufacturerCode",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":false,
+			"propertyCode":138,
+			"required":[
+				"RULE_GET"
+			],
+			"size":3,
+			"type":"manufacturer_code_t",
+			"unitDescription":null,
+			"valueDescription":"(ECHONETã³ã³ã½ã¼ã·ã¢ã ã§è¦å®ã)"
+		},
+		{
+			"access":[
+				"RULE_GET"
+			],
+			"arrayCount":3,
+			"description":"äºæ¥­å ´ã³ã¼ã",
+			"fields":[
+				
+			],
+			"identifier":"BusinessFacilityCode",
+			"initialValue":null,
+			"isArray":true,
+			"primitive":true,
+			"propertyCode":139,
+			"required":[
+				"NONE"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":"(åã¡ã¼ã«æ¯ã«è¦å®ã)"
+		},
+		{
+			"access":[
+				"RULE_GET"
+			],
+			"arrayCount":12,
+			"description":"ååã³ã¼ã",
+			"fields":[
+				
+			],
+			"identifier":"ProductCode",
+			"initialValue":null,
+			"isArray":true,
+			"primitive":true,
+			"propertyCode":140,
+			"required":[
+				"NONE"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":"(åã¡ã¼ã«æ¯ã«è¦å®ã)"
+		},
+		{
+			"access":[
+				"RULE_GET"
+			],
+			"arrayCount":12,
+			"description":"è£½é çªå·",
+			"fields":[
+				
+			],
+			"identifier":"ProductionNumber",
+			"initialValue":null,
+			"isArray":true,
+			"primitive":true,
+			"propertyCode":141,
+			"required":[
+				"NONE"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":"(åã¡ã¼ã«æ¯ã«è¦å®ã)"
+		},
+		{
+			"access":[
+				"RULE_GET"
+			],
+			"arrayCount":0,
+			"description":"è£½é å¹´ææ¥",
+			"fields":[
+				{
+					"arrayCount":0,
+					"description":"å¹´",
+					"fields":[
+						
+					],
+					"identifier":"Year",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":2,
+					"type":"uint16_t",
+					"unitDescription":"å¹´",
+					"valueDescription":"0x0001ï½0x270F(1ï½9999)"
+				},
+				{
+					"arrayCount":0,
+					"description":"æ",
+					"fields":[
+						
+					],
+					"identifier":"Mounth",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":"æ",
+					"valueDescription":"0x01ï½0x0C(1ï½12)"
+				},
+				{
+					"arrayCount":0,
+					"description":"æ¥",
+					"fields":[
+						
+					],
+					"identifier":"Day",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":"æ¥",
+					"valueDescription":"0x01ï½0x1F(1ï½31)"
+				}
+			],
+			"identifier":"ProductionDate",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":false,
+			"propertyCode":142,
+			"required":[
+				"NONE"
+			],
+			"size":4,
+			"type":"year_mounth_day_t",
+			"unitDescription":null,
+			"valueDescription":""
+		},
+		{
+			"access":[
+				"RULE_SET",
+				"RULE_GET"
+			],
+			"arrayCount":0,
+			"description":"ç¯é»åä½è¨­å®",
+			"fields":[
+				
+			],
+			"identifier":"PowerSavingOperationSetting",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":true,
+			"propertyCode":143,
+			"required":[
+				"NONE"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":"0x41=ç¯é»åä½ä¸­,0x42=éå¸¸åä½ä¸­"
+		},
+		{
+			"access":[
+				"RULE_SET",
+				"RULE_GET"
+			],
+			"arrayCount":0,
+			"description":"é éæä½è¨­å®",
+			"fields":[
+				
+			],
+			"identifier":"PositionInformation",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":true,
+			"propertyCode":147,
+			"required":[
+				"NONE"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":"0x41=å
+¬è¡åç·æªçµç±æä½,0x42=å
+¬è¡åç·çµç±æä½"
+		},
+		{
+			"access":[
+				"RULE_SET",
+				"RULE_GET"
+			],
+			"arrayCount":0,
+			"description":"ç¾å¨æå»è¨­å®",
+			"fields":[
+				{
+					"arrayCount":0,
+					"description":"æ",
+					"fields":[
+						
+					],
+					"identifier":"Hour",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":"æ",
+					"valueDescription":"0x00ï½0x17(0ï½23)"
+				},
+				{
+					"arrayCount":0,
+					"description":"å",
+					"fields":[
+						
+					],
+					"identifier":"Minute",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":"å",
+					"valueDescription":"0x00ï½0x3B(0ï½59)"
+				}
+			],
+			"identifier":"CurrentTimeSetting",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":false,
+			"propertyCode":151,
+			"required":[
+				"NONE"
+			],
+			"size":2,
+			"type":"hour_minute_t",
+			"unitDescription":null,
+			"valueDescription":""
+		},
+		{
+			"access":[
+				"RULE_SET",
+				"RULE_GET"
+			],
+			"arrayCount":0,
+			"description":"ç¾å¨å¹´ææ¥è¨­å®",
+			"fields":[
+				{
+					"arrayCount":0,
+					"description":"å¹´",
+					"fields":[
+						
+					],
+					"identifier":"Year",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":2,
+					"type":"uint16_t",
+					"unitDescription":"å¹´",
+					"valueDescription":"0x0001ï½0x270F(1ï½9999)"
+				},
+				{
+					"arrayCount":0,
+					"description":"æ",
+					"fields":[
+						
+					],
+					"identifier":"Mounth",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":"æ",
+					"valueDescription":"0x01ï½0x0C(1ï½12)"
+				},
+				{
+					"arrayCount":0,
+					"description":"æ¥",
+					"fields":[
+						
+					],
+					"identifier":"Day",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":"æ¥",
+					"valueDescription":"0x01ï½0x1F(1ï½31)"
+				}
+			],
+			"identifier":"CurrentDateSetting",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":false,
+			"propertyCode":152,
+			"required":[
+				"NONE"
+			],
+			"size":4,
+			"type":"year_mounth_day_t",
+			"unitDescription":null,
+			"valueDescription":""
+		},
+		{
+			"access":[
+				"RULE_SET",
+				"RULE_GET"
+			],
+			"arrayCount":0,
+			"description":"é»åå¶éè¨­å®",
+			"fields":[
+				
+			],
+			"identifier":"PowerLimitSetting",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":true,
+			"propertyCode":153,
+			"required":[
+				"NONE"
+			],
+			"size":2,
+			"type":"uint16_t",
+			"unitDescription":null,
+			"valueDescription":"0x0000ï½0xFFFF(0ï½65535W)"
+		},
+		{
+			"access":[
+				"RULE_GET"
+			],
+			"arrayCount":0,
+			"description":"ç©ç®éè»¢æé",
+			"fields":[
+				{
+					"arrayCount":0,
+					"description":"åä½",
+					"fields":[
+						
+					],
+					"identifier":"Unit",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":1,
+					"type":"uint8_t",
+					"unitDescription":null,
+					"valueDescription":"0x41=ç§,0x42=å,0x43=æ,0x44=æ¥"
+				},
+				{
+					"arrayCount":0,
+					"description":"çµéæé",
+					"fields":[
+						
+					],
+					"identifier":"ElapsedTime",
+					"initialValue":null,
+					"isArray":false,
+					"primitive":true,
+					"size":4,
+					"type":"uint32_t",
+					"unitDescription":null,
+					"valueDescription":"0x00000000ï½0xFFFFFFFF(0ï½4294967295)"
+				}
+			],
+			"identifier":"CumulativeOperatingTime",
+			"initialValue":null,
+			"isArray":false,
+			"primitive":false,
+			"propertyCode":154,
+			"required":[
+				"NONE"
+			],
+			"size":5,
+			"type":"cumulative_operating_time_t",
+			"unitDescription":null,
+			"valueDescription":""
+		},
+		{
+			"access":[
+				"RULE_GET",
+				"VARIABLE"
+			],
+			"arrayCount":17,
+			"description":"ï¼³ï½
+ï½ï¼­ãã­ããã£ããã",
+			"fields":[
+				
+			],
+			"identifier":"SetMPropertyMap",
+			"initialValue":null,
+			"isArray":true,
+			"primitive":true,
+			"propertyCode":155,
+			"required":[
+				"RULE_GET"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":"ä»é²1.åç
+§"
+		},
+		{
+			"access":[
+				"RULE_GET",
+				"VARIABLE"
+			],
+			"arrayCount":17,
+			"description":"ï¼§ï½
+ï½ï¼­ãã­ããã£ããã",
+			"fields":[
+				
+			],
+			"identifier":"GetMPropertyMap",
+			"initialValue":null,
+			"isArray":true,
+			"primitive":true,
+			"propertyCode":156,
+			"required":[
+				"RULE_GET"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":"ä»é²1.åç
+§"
+		},
+		{
+			"access":[
+				"RULE_GET",
+				"VARIABLE"
+			],
+			"arrayCount":17,
+			"description":"ç¶å¤ã¢ãã¦ã³ã¹ãã­ããã£ããã",
+			"fields":[
+				
+			],
+			"identifier":"StatusChangeAnnouncementPropertyMap",
+			"initialValue":null,
+			"isArray":true,
+			"primitive":true,
+			"propertyCode":157,
+			"required":[
+				"RULE_GET"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":"ä»é²1.åç
+§"
+		},
+		{
+			"access":[
+				"RULE_GET",
+				"VARIABLE"
+			],
+			"arrayCount":17,
+			"description":"ï¼³ï½
+ï½ãã­ããã£ããã",
+			"fields":[
+				
+			],
+			"identifier":"SetPropertyMap",
+			"initialValue":null,
+			"isArray":true,
+			"primitive":true,
+			"propertyCode":158,
+			"required":[
+				"RULE_GET"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":"ä»é²1.åç
+§"
+		},
+		{
+			"access":[
+				"RULE_GET",
+				"VARIABLE"
+			],
+			"arrayCount":17,
+			"description":"ï¼§ï½
+ï½ãã­ããã£ããã",
+			"fields":[
+				
+			],
+			"identifier":"GetPropertyMap",
+			"initialValue":null,
+			"isArray":true,
+			"primitive":true,
+			"propertyCode":159,
+			"required":[
+				"RULE_GET"
+			],
+			"size":1,
+			"type":"uint8_t",
+			"unitDescription":null,
+			"valueDescription":"ä»é²1.åç
+§"
+		}
+	],
+	"classGroupList":[
+		{
+			"classGroupCode":0,
+			"description":"ã»ã³ãµã¼é¢é£æ©å¨",
+			"define":"X1_SENSOR",
+			"classList":[
+				{
+					"classCode":1,
+					"description":"ã¬ã¹æ¼ãã»ã³ãµ",
+					"name":"GAS_LEAK_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"ã¬ã¹æ¼ãçºçç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"GasLeakOccurrenceStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ã¬ã¹æ¼ãçºçæ,0x42=ã¬ã¹æ¼ãçºçç¡"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"ã¬ã¹æ¼ãçºçç¶æ
+ãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"GasLeakOccurrenceStatusResetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":191,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						}
+					]
+				},
+				{
+					"classCode":2,
+					"description":"é²ç¯ã»ã³ãµ",
+					"name":"CRIME_PREVENTION_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"ä¾µå
+¥çºçç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"InvasionOccurrenceStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ä¾µå
+¥çºçæ,0x42=ä¾µå
+¥çºçç¡"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"ä¾µå
+¥çºçç¶æ
+ãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"InvasionOccurrenceStatusResetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":191,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						}
+					]
+				},
+				{
+					"classCode":3,
+					"description":"éå¸¸ãã¿ã³",
+					"name":"EMERGENCY_BUTTON_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"éå¸¸çºçç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"EmergencyOccurrenceStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=éå¸¸çºçæ,0x42=éå¸¸çºçç¡"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"éå¸¸çºçç¶æ
+ãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"EmergencyOccurrenceStatusResetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":191,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						}
+					]
+				},
+				{
+					"classCode":4,
+					"description":"ææ¥ç¨ã»ã³ãµ",
+					"name":"FIRST_AID_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"ææ¥çºçç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"FirstAidOccurrenceStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ææ¥çºçæ,0x42=ææ¥çºçç¡"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"ææ¥çºçç¶æ
+ãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"FirstAidOccurrenceStatusResetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":191,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						}
+					]
+				},
+				{
+					"classCode":5,
+					"description":"å°éã»ã³ãµ",
+					"name":"EARTHQUAKE_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"å°éçºçç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"EarthquakeOccurrenceStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å°éçºçæ,0x42=å°éçºçç¡"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"å°éçºçç¶æ
+ãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"EarthquakeOccurrenceStatusResetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":191,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						}
+					]
+				},
+				{
+					"classCode":6,
+					"description":"æ¼é»ã»ã³ãµ",
+					"name":"ELECTRIC_LEAK_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"æ¼é»çºçç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"ElectricLeakOccurrenceStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ¼é»çºçæ,0x42=æ¼é»çºçç¡"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"æ¼é»çºçç¶æ
+ãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"ElectricLeakOccurrenceStatusResetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":191,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						}
+					]
+				},
+				{
+					"classCode":7,
+					"description":"äººä½æ¤ç¥ã»ã³ãµ",
+					"name":"HUMAN_DETECTION_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"äººä½æ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"HumanDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äººä½æ¤ç¥æ,0x42=äººä½æ¤ç¥ç¡"
+						}
+					]
+				},
+				{
+					"classCode":8,
+					"description":"æ¥å®¢ã»ã³ãµ",
+					"name":"VISITOR_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"æ¥å®¢æ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"VisitorDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ¥å®¢æ¤ç¥æ,0x42=æ¥å®¢æ¤ç¥ç¡"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¥å®¢æ¤ç¥ãã¼ã«ãæéè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"VisitorDetectionHoldingTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":190,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"10sec",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½655,330ç§)"
+						}
+					]
+				},
+				{
+					"classCode":9,
+					"description":"å¼ã³åºãã»ã³ãµ",
+					"name":"CALL_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"å¼ã³åºãç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"CallStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å¼ã³åºãæ,0x42=å¼ã³åºãç¡"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¼ã³åºããã¼ã«ãæéè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"CallHoldingTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":190,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"10sec",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½655,330ç§)"
+						}
+					]
+				},
+				{
+					"classCode":10,
+					"description":"çµé²ã»ã³ãµ",
+					"name":"CONDENSATION_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"çµé²æ¤åºç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"CondensationDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=çµé²æ¤åºæ,0x42=çµé²æ¤åºç¡"
+						}
+					]
+				},
+				{
+					"classCode":11,
+					"description":"ç©ºæ°æ±æã»ã³ãµ",
+					"name":"AIR_POLLUTION_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"ç©ºæ°æ±ææ¤åºç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"AirPollutionDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ç©ºæ°æ±ææ¤åºæ,0x42=ç©ºæ°æ±ææ¤åºç¡"
+						}
+					]
+				},
+				{
+					"classCode":12,
+					"description":"é
+¸ç´ ã»ã³ãµ",
+					"name":"OXYGEN_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é
+¸ç´ æ¿åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredValueOfOxygenConcentration",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.01ï¼
+",
+							"valueDescription":"0x0000ï½0x2710(0.00ï½100.00%)"
+						}
+					]
+				},
+				{
+					"classCode":13,
+					"description":"ç
+§åº¦ã»ã³ãµ",
+					"name":"ILLUMINANCE_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç
+§åº¦è¨æ¸¬å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredIlluminanceValue1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"ã«ã¯ã¹",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533ã«ã¯ã¹)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç
+§åº¦è¨æ¸¬å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredIlluminanceValue2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"kã«ã¯ã¹",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533kã«ã¯ã¹)"
+						}
+					]
+				},
+				{
+					"classCode":14,
+					"description":"é³ã»ã³ãµ",
+					"name":"SOUND_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"é³æ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"SoundDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é³æ¤ç¥æ,0x42=é³æ¤ç¥ç¡"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é³æ¤ç¥ãã¼ã«ãæéè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"SoundDetectionHoldingTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":190,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"10sec",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½655,330ç§)"
+						}
+					]
+				},
+				{
+					"classCode":15,
+					"description":"æå½ã»ã³ãµ",
+					"name":"MAILING_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"æå½æ¤åºç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"MailingDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æå½æ¤åºæ,0x42=æå½æ¤åºç¡"
+						}
+					]
+				},
+				{
+					"classCode":16,
+					"description":"éè·ã»ã³ãµ",
+					"name":"WEIGHT_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"éè·æ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"WeightDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=éè·æ¤ç¥æ,0x42=éè·æ¤ç¥ç¡"
+						}
+					]
+				},
+				{
+					"classCode":17,
+					"description":"æ¸©åº¦ã»ã³ãµ",
+					"name":"TEMPERATURE_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¸©åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredTemperatureValue",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"int16_t",
+							"unitDescription":"0.1â",
+							"valueDescription":"0xF554ï½0x7FFE(-273.2ï½3276.6â)"
+						}
+					]
+				},
+				{
+					"classCode":18,
+					"description":"æ¹¿åº¦ã»ã³ãµ",
+					"name":"HUMIDITY_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¸å¯¾æ¹¿åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredValueOfRelativeHumidity",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						}
+					]
+				},
+				{
+					"classCode":19,
+					"description":"é¨ã»ã³ãµ",
+					"name":"RAIN_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"é¨æ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"RainDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é¨æ¤ç¥æ,0x42=é¨æ¤ç¥ç¡"
+						}
+					]
+				},
+				{
+					"classCode":20,
+					"description":"æ°´ä½ã»ã³ãµ",
+					"name":"WATER_LEVEL_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ°´ä½è¶
+éæ¤ç¥é¾å¤è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"WaterLevelOverDetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"cm",
+							"valueDescription":"0x00ï½0xFD(0ï½253)"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"æ°´ä½è¶
+éæ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"WaterLevelOverDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ°´ä½è¶
+éæ,0x42=æ°´ä½è¶
+éç¡"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ°´ä½è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredValueOfWaterLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"cm",
+							"valueDescription":"0x00ï½0xFD(0ï½253)"
+						}
+					]
+				},
+				{
+					"classCode":21,
+					"description":"é¢¨åæ°´ä½ã»ã³ãµ",
+					"name":"BATH_WATER_LEVEL_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åæ°´ä½è¶
+éæ¤ç¥é¾å¤è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"BathWaterLevelOverDetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"cm",
+							"valueDescription":"0x00ï½0xFD(0ï½253)"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åæ°´ä½è¶
+éæ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"BathWaterLevelOverDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ°´ä½è¶
+éæ,0x42=æ°´ä½è¶
+éç¡"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åæ°´ä½è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredValueOfBathWaterLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"cm",
+							"valueDescription":"0x00ï½0xFD(0ï½253)"
+						}
+					]
+				},
+				{
+					"classCode":22,
+					"description":"é¢¨åæ²¸ãä¸ããã»ã³ãµ",
+					"name":"BATH_HEATING_STATUS_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åæ²¸ãä¸ããæ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"BathHeatingDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é¢¨åæ²¸ãä¸ããæ,0x42=é¢¨åæ²¸ãä¸ããç¡"
+						}
+					]
+				},
+				{
+					"classCode":23,
+					"description":"æ°´æ¼ãã»ã³ãµ",
+					"name":"WATER_LEAK_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"æ°´æ¼ãæ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"WaterLeakDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ°´æ¼ãæ¤ç¥æ,0x42=æ°´æ¼ãæ¤ç¥ç¡"
+						}
+					]
+				},
+				{
+					"classCode":24,
+					"description":"æ°´ããµãã»ã³ãµ",
+					"name":"WATER_OVERFLOW_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"æ°´ããµãæ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"WaterOverflowDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ°´ããµãæ¤ç¥æ,0x42=æ°´ããµãæ¤ç¥ç¡"
+						}
+					]
+				},
+				{
+					"classCode":25,
+					"description":"ç«ç½ã»ã³ãµ",
+					"name":"FIRE_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"ç«ç½çºçæ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"FireOccurrenceDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ç«ç½çºçæ¤ç¥æ,0x42=ç«ç½çºçæ¤ç¥ç¡"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"ç«ç½çºçæ¤ç¥ç¶æ
+ãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"FireOccurrenceDetectionStatusResetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":191,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						}
+					]
+				},
+				{
+					"classCode":26,
+					"description":"ã¿ãã³ç
+ã»ã³ãµ",
+					"name":"CIGARETTE_SMOKE_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"ç
+ï¼ã¿ãã³ï¼æ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"SmokeCigaretteDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ç
+ï¼ã¿ãã³ï¼æ¤ç¥æ,0x42=ç
+ï¼ã¿ãã³ï¼æ¤ç¥ç¡"
+						}
+					]
+				},
+				{
+					"classCode":27,
+					"description":"CO2ã»ã³ãµ",
+					"name":"CO2_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼£ï¼¯ï¼æ¿åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredValueOfCo2Concentration",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"ppm",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533)"
+						}
+					]
+				},
+				{
+					"classCode":28,
+					"description":"ã¬ã¹ã»ã³ãµ",
+					"name":"GAS_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"ã¬ã¹æ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"GasDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ã¬ã¹æ¤ç¥æ,0x42=ã¬ã¹æ¤ç¥ç¡"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã¬ã¹æ¿åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredValueOfGasConcentration",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"ppm",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533)"
+						}
+					]
+				},
+				{
+					"classCode":29,
+					"description":"VOCã»ã³ãµ",
+					"name":"VOC_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"ï¼¶ï¼¯ï¼£æ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"VocDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=VOCæ¤ç¥æ,0x42=VOCæ¤ç¥ç¡"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¶ï¼¯ï¼£æ¿åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredValueOfVocConcentration",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"ppm",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533)"
+						}
+					]
+				},
+				{
+					"classCode":30,
+					"description":"å·®å§ã»ã³ãµ",
+					"name":"DIFFERENTIAL_PRESSURE_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å·®å§è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredValueOfDifferentialPressure",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"int16_t",
+							"unitDescription":"Pa",
+							"valueDescription":"0x8001ï½0x7FFE(-32767ï½32766)"
+						}
+					]
+				},
+				{
+					"classCode":31,
+					"description":"é¢¨éã»ã³ãµ",
+					"name":"AIR_SPEED_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨éè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredValueOfAirSpeed",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.01m\/sec",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½655.33m\/sec)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨å",
+							"fields":[
+								
+							],
+							"identifier":"AirFlowDirection",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"degree",
+							"valueDescription":"0x0000ï½0x0168(0ï½360degree)"
+						}
+					]
+				},
+				{
+					"classCode":32,
+					"description":"è­ãã»ã³ãµ",
+					"name":"ODOR_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è­ãæ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"OdorDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=è­ãæ¤ç¥æ,0x42=è­ãæ¤ç¥ç¡"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è­ãè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredOdorValue",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00ï½0xFD(0ï½253)"
+						}
+					]
+				},
+				{
+					"classCode":33,
+					"description":"çã»ã³ãµ",
+					"name":"FLAME_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"çæ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"FlameDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=çæ¤ç¥æ,0x42=çæ¤ç¥ç¡"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"çæ¤ç¥ç¶æ
+ãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"FlameDetectionStatusResetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":191,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						}
+					]
+				},
+				{
+					"classCode":34,
+					"description":"é»åéã»ã³ãµ",
+					"name":"ELECTRIC_ENERGY_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®é»åéè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"IntegralElectricEnergy",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001kWh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¸­å®¹éã»ã³ãµç¬æé»åå¤è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MediumCapacitySensorInstantaneousElectricEnergy",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"int32_t",
+							"unitDescription":"W",
+							"valueDescription":"0xC4653601ï½0x3B9AC9FF(-999,999,999ï½999,999,999)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å°å®¹éã»ã³ãµç¬æé»åå¤è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"SmallCapacitySensorInstantaneousElectricEnergy",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"int16_t",
+							"unitDescription":"0.1W",
+							"valueDescription":"0x8001ï½0x7FFE(-3276.7ï½3276.6)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¤§å®¹éã»ã³ãµç¬æé»åå¤è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"LargeCapacitySensorInstantaneousElectricEnergy",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"int16_t",
+							"unitDescription":"0.1kW",
+							"valueDescription":"0x8001ï½0x7FFE(-3276.7ï½3276.6)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":48,
+							"description":"ç©ç®é»åéè¨æ¸¬å±¥æ­´æ
+å ±",
+							"fields":[
+								
+							],
+							"identifier":"IntegralElectricEnergyMeasurementLog",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001kWh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®å¹é»å§å¤è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"EffectiveVoltageValue",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"V",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533V)"
+						}
+					]
+				},
+				{
+					"classCode":35,
+					"description":"é»æµå¤ã»ã³ãµ",
+					"name":"CURRENT_VALUE_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é»æµå¤è¨æ¸¬å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCurrentValue1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"mA",
+							"valueDescription":"0x00000000ï½0xFFFFFFFD(0ï½4,294,967,293mA)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬å¯¾è±¡å®æ ¼é»å§å¤",
+							"fields":[
+								
+							],
+							"identifier":"RatedVoltageToBeMeasured",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"V",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533V)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é»æµå¤è¨æ¸¬å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCurrentValue2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"int32_t",
+							"unitDescription":"mA",
+							"valueDescription":"0x80000001ï½0x7FFFFFFE(-2,147,483,647ï½2,147,483,646mA)"
+						}
+					]
+				},
+				{
+					"classCode":36,
+					"description":"æ¼å
+ã»ã³ãµ",
+					"name":"DAYLIGHT_SENSOR_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":37,
+					"description":"æ°´æµéã»ã³ãµ",
+					"name":"WATER_FLOW_RATE_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®æµéè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"IntegralFlowRate",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"cã¥",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æµéè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"FlowRate",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"cã¥\/min",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999)"
+						}
+					]
+				},
+				{
+					"classCode":38,
+					"description":"å¾®åã»ã³ãµ",
+					"name":"MICROMOTION_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"å¾®åæ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"MicromotionDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å¾®åæ¤ç¥æ,0x42=å¾®åæ¤ç¥ç¡"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¾®åæ¤ç¥ã«ã¦ã³ãæ°è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionCounter",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":178,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":null,
+							"valueDescription":"0x0000ï½0xFFFE(0ï½65534)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãµã³ããªã³ã°åæ°è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"SamplingCount",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":188,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":null,
+							"valueDescription":"0x0000ï½0xFFFE(0ï½65534)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãµã³ããªã³ã°æéè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"SamplingCycle",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":189,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"msec",
+							"valueDescription":"0x0000ï½0xFFFE(0ï½65534)"
+						}
+					]
+				},
+				{
+					"classCode":39,
+					"description":"ééã»ã³ãµ",
+					"name":"PASSAGE_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ééæ¤ç¥ãã¼ã«ãæéè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"PassageDetectionHoldTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":190,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"ms",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533ms)"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"ééæ¤ç¥æ¹åç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"PassageDetectionDirection",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x30=ééç¡ã,0x31ï½0x38=ééæ¹å,0x39=ééãæ¤ç¥ãããå ´æãç¹å®ã§ããªãå ´åããããã¯ãééæ¹åãæ¤ç¥ã§ããªãã»ã³ãµã«ãããééããã"
+						}
+					]
+				},
+				{
+					"classCode":40,
+					"description":"å¨åºã»ã³ãµ",
+					"name":"BED_PRESENCE_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"å¨åºæ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"BedPresenceDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å¨åºæ¤ç¥æ,0x42=å¨åºæ¤ç¥ç¡"
+						}
+					]
+				},
+				{
+					"classCode":41,
+					"description":"ééã»ã³ãµ",
+					"name":"OPEN_CLOSE_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éåº¦æ¤ç¥ç¶æ
+ï¼",
+							"fields":[
+								
+							],
+							"identifier":"DegreeOfOpeniNgDetectionStatus1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x30=éæ¤ç¥æã,0x31ï½0x38=éåº¦ã¬ãã«,0x39=éæ¤ç¥æãéåº¦ä¸æ"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"éåº¦æ¤ç¥ç¶æ
+ï¼",
+							"fields":[
+								
+							],
+							"identifier":"DegreeOfOpeniNgDetectionStatus2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=éæ¤ç¥æ,0x42=éæ¤ç¥æ"
+						}
+					]
+				},
+				{
+					"classCode":42,
+					"description":"æ´»åéã»ã³ãµ",
+					"name":"ACTIVITY_AMOUNT_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"VARIABLE"
+							],
+							"arrayCount":128,
+							"description":"æ´»åéã¬ãã«ï¼",
+							"fields":[
+								
+							],
+							"identifier":"ActivityAmountLevel1",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"äººä½ï¼©ï¼¤æ°æå¤§å¤",
+							"fields":[
+								
+							],
+							"identifier":"MaximumNumberOfHumanBodyIdFs",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":null,
+							"valueDescription":"0x0001ï½0x0080(1ï½128)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ´»åéã¬ãã«ï¼",
+							"fields":[
+								
+							],
+							"identifier":"ActivityAmountLevel2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":16,
+							"description":"å­å¨äººä½æ
+å ±",
+							"fields":[
+								
+							],
+							"identifier":"HumanBodyExistenceInformation",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"(è©³ç´°ã¯ãèª¬æ(5)åç
+§)"
+						}
+					]
+				},
+				{
+					"classCode":43,
+					"description":"äººä½ä½ç½®ã»ã³ãµ",
+					"name":"HUMAN_BODY_LOCATION_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"VARIABLE"
+							],
+							"arrayCount":128,
+							"description":"äººä½æ¤ç¥ä½ç½®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"HumanBodyDetectionLocation1",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":false,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":0,
+							"type":"location_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"äººä½ï¼©ï¼¤æ°æå¤§å¤",
+							"fields":[
+								
+							],
+							"identifier":"MaximumNumberOfHumanBodyIdFs",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":null,
+							"valueDescription":"0x0001ï½0x0080(1ï½128)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"äººä½æ¤ç¥ä½ç½®ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"Xåº§æ¨",
+									"fields":[
+										
+									],
+									"identifier":"XCoordinate",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":0,
+									"description":"Yåº§æ¨",
+									"fields":[
+										
+									],
+									"identifier":"YCoordinate",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":0,
+									"description":"Zåº§æ¨",
+									"fields":[
+										
+									],
+									"identifier":"ZCoordinate",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":""
+								}
+							],
+							"identifier":"HumanBodyDetectionLocation2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":3,
+							"type":"location_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":16,
+							"description":"å­å¨äººä½æ
+å ±",
+							"fields":[
+								
+							],
+							"identifier":"HumanBodyExistenceInformation",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"(è©³ç´°ã¯ãèª¬æ(5)åç
+§)"
+						}
+					]
+				},
+				{
+					"classCode":44,
+					"description":"éªã»ã³ãµ",
+					"name":"SNOW_SENSOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤ç¥é¾å¤ã¬ãã«",
+							"fields":[
+								
+							],
+							"identifier":"DetectionThresholdLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"éªæ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"SnowDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=éªæ¤ç¥æ,0x42=éªæ¤ç¥ç¡"
+						}
+					]
+				}
+			]
+		},
+		{
+			"classGroupCode":1,
+			"description":"ç©ºèª¿é¢é£æ©å¨",
+			"define":"X1_AIR_CONDITIONER",
+			"classList":[
+				{
+					"classCode":48,
+					"description":"å®¶åº­ç¨ã¨ã¢ã³ã³",
+					"name":"HOME_AIR_CONDITIONER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"éè»¢ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OperationModeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=èªå,0x42=å·æ¿,0x43=ææ¿,0x44=é¤æ¹¿,0x45=éé¢¨,0x40=ãã®ä»"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¸©åº¦èªåè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AutomaticTemperatureControlSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=AUTO,0x42=éAUTO"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¥éåä½ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"NormalHighSpeedSilentOperationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":178,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=éå¸¸éè»¢,0x42=æ¥é,0x43=éé³"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"SetTemperatureValue",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":179,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x32(0ï½50â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¤æ¹¿ã¢ã¼ãæç¸å¯¾æ¹¿åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"SetValueOfRelativeHumidityInDehumidifyingMode",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":180,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å·æ¿ã¢ã¼ãææ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"SetTemperatureValueInCoolingMode",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":181,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x32(0ï½50â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ææ¿ã¢ã¼ãææ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"SetTemperatureValueInHeatingMode",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":182,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x32(0ï½50â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¤æ¹¿ã¢ã¼ãææ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"SetTemperatureValueInDehumidifyingMode",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":183,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x32(0ï½50â)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":4,
+							"description":"å®æ ¼æ¶è²»é»åå¤",
+							"fields":[
+								
+							],
+							"identifier":"RatedPowerConsumption",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":184,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å·æ¿ï¼ææ¿ï¼é¤æ¹¿ï¼éé¢¨æ¶è²»é»æµè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredValueOfCurrentConsumption",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":185,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1A",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½6553.3A)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®¤å
+ç¸å¯¾æ¹¿åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredValueOfRoomRelativeHumidity",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":186,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®¤å
+æ¸©åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredValueOfRoomTemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":187,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x81ï½0x7D(-127ï½125â)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã¦ã¼ã¶ãªã¢ã³ã³æ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"SetTemperatureValueOfUserRemoteControl",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":188,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x32(0ï½50â)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¹ãåºãæ¸©åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCooledAirTemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":189,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x81ï½0x7D(-127ï½125â)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¤æ°æ¸©åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredOutdoorAirTemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":190,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x81ï½0x7D(-127ï½125â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¸å¯¾æ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"RelativeTemperatureSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":191,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"0.1â",
+							"valueDescription":"0x81ï½0x7D(-12.7ï½12.5â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨éè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AirFlowRateSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":160,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é¢¨éèªåè¨­å®,0x31ï½0x38=é¢¨éã¬ãã«"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åèªåè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AutomaticControlOfAirFlowDirectionSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":161,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=AUTO,0x42=éAUTO,0x43=ä¸ä¸AUTO,0x44=å·¦å³AUTO"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åã¹ã¤ã³ã°è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AutomaticSwingOfAirFlowSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":163,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31=é¢¨åã¹ã¤ã³ã°OFF,0x41=ä¸ä¸,0x42=å·¦å³,0x43=ä¸ä¸å·¦å³"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åä¸ä¸è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AirFlowDirectionVerticalSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":164,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ä¸,0x42=ä¸,0x43=ä¸­å¤®,0x44=ä¸ä¸­,0x45=ä¸ä¸­"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åå·¦å³è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AirFlowDirectionHorizontalSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":165,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å³,0x42=å·¦,0x43=ä¸­å¤®,0x44=å·¦å³,ä»ããã­ããã£è©³ç´°èª¬æã®è¡¨ã«è¨è¼ã®ã³ã¼ãã§ç¤ºãã"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¹æ®ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"SpecialState",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":170,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=éå¸¸ç¶æ
+,0x41=é¤éç¶æ
+,0x42=äºç±ç¶æ
+,0x43=æç±ç¶æ
+"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éåªå
+ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"NonPriorityState",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":171,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=éå¸¸ç¶æ
+,0x41=éåªå
+ç¶æ
+"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ææ°ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"VentilationFunctionSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":192,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ææ°ONï¼ææ°æ¹åï¼,0x42=ææ°OFF,0x43=ææ°ONï¼å¸æ°æ¹åï¼"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å æ¹¿ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"HumidifierFunctionSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":193,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å æ¹¿ON,0x42=OFF"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ææ°é¢¨éè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"VentilationAirFlowRateSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":194,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ææ°é¢¨éèªå,0x31ï½0x38=ææ°é¢¨éã¬ãã«"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å æ¹¿éè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DegreeOfHumidificationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":196,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å æ¹¿éèªå,0x31ï½0x38=å æ¹¿éã¬ãã«"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ­è¼ç©ºæ°æ¸
+æµæ¹æ³",
+							"fields":[
+								
+							],
+							"identifier":"MountedAirCleaningMethod",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":198,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"[0]é»æ°éå¡µæ¹å¼æ­è¼æ
+å ±:0=éæ­è¼,1=æ­è¼\u000d\u000a[1]ã¯ã©ã¹ã¿ã¤ãªã³æ¹å¼æ­è¼æ
+å ±:0=éæ­è¼,1=æ­è¼"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ºæ°æ¸
+æµæ©è½ã¢ã¼ãè¨­å®",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»æ°éå¡µæ¹å¼ã«ããç©ºæ°æ¸
+æµæ©è½ã®è¨­å®ç¶æ
+",
+									"fields":[
+										
+									],
+									"identifier":"WhetherOrNotToUseTheElectricalDustCollectionBasedAirPurifierFunction",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":0,
+									"description":"ã¯ã©ã¹ã¿ã¤ãªã³æ¹å¼ã«ããç©ºæ°æ¸
+æµæ©è½ã®è¨­å®ç¶æ
+",
+									"fields":[
+										
+									],
+									"identifier":"WhetherOrNotToUseTheClusterIonBasedAirPurifierFunction",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":6,
+									"description":"for future reserved",
+									"fields":[
+										
+									],
+									"identifier":"Reserved",
+									"initialValue":null,
+									"isArray":true,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":""
+								}
+							],
+							"identifier":"AirPurifierFunctionSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":199,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"air_purifier_function_setting_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ­è¼ãªãã¬ãã·ã¥æ¹æ³",
+							"fields":[
+								
+							],
+							"identifier":"MountedAirRefreshMethod",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":200,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"[0]ãã¤ãã¹ã¤ãªã³æ¹å¼æ­è¼æ
+å ±:0=éæ­è¼,1=æ­è¼\u000d\u000a[1]ã¯ã©ã¹ã¿ã¤ãªã³æ¹å¼æ­è¼æ
+å ±:0=éæ­è¼,1=æ­è¼"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãªãã¬ãã·ã¥æ©è½ã¢ã¼ãè¨­å®",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"ãã¤ãã¹ã¤ãªã³æ¹å¼ã«ãããªãã¬ãã·ã¥æ©è½ã®è¨­å®ç¶æ
+",
+									"fields":[
+										
+									],
+									"identifier":"WhetherOrNotToUseTheMinusIonBasedAirRefresherFunction",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":0,
+									"description":"ã¯ã©ã¹ã¿ã¤ãªã³æ¹å¼ã«ãããªãã¬ãã·ã¥æ©è½ã®è¨­å®ç¶æ
+",
+									"fields":[
+										
+									],
+									"identifier":"WhetherOrNotToUseTheClusterIonBasedAirRefresherFunction",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":6,
+									"description":"for future reserved",
+									"fields":[
+										
+									],
+									"identifier":"Reserved",
+									"initialValue":null,
+									"isArray":true,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":""
+								}
+							],
+							"identifier":"AirRefresherFunctionSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":201,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"air_refresher_function_setting_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ­è¼èªå·±æ´æµæ¹æ³",
+							"fields":[
+								
+							],
+							"identifier":"MountedSelfCleaningMethod",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":202,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"[0]ãªã¾ã³æ´æµæ¹å¼æ­è¼æ
+å ±:0=éæ­è¼,1=æ­è¼\u000d\u000a[1]ä¹¾ç¥æ¹å¼æ­è¼æ
+å ±:0=éæ­è¼,1=æ­è¼"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"èªå·±æ´æµæ©è½ã¢ã¼ãè¨­å®",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"ãªã¾ã³æ´æµæ¹å¼ã«ããèªå·±æ´æµæ©è½ã®è¨­å®ç¶æ
+",
+									"fields":[
+										
+									],
+									"identifier":"WhetherOrNotToUseTheOzoneBasedSelfCleaningFunction",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":0,
+									"description":"ä¹¾ç¥æ¹å¼ã«ããèªå·±æ´æµæ©è½ã®è¨­å®ç¶æ
+",
+									"fields":[
+										
+									],
+									"identifier":"WhetherOrNotToUseTheDryingBasedSelfCleaningFunction",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":6,
+									"description":"for future reserved",
+									"fields":[
+										
+									],
+									"identifier":"Reserved",
+									"initialValue":null,
+									"isArray":true,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":""
+								}
+							],
+							"identifier":"SelfCleaningFunctionSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":203,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"self_cleaning_function_setting_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¹å¥éè»¢ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"SpecialFunctionSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":204,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=è¨­å®ãªã,0x41=è¡£é¡ä¹¾ç¥,0x42=çµé²æå¶,0x43=ããã«ãæå¶,0x44=å¼·å¶é¤é,0x45ï½=for future reserved"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å
+é¨åä½ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"OperationStatusOfComponents",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":205,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"[0]ã³ã³ãã¬ããµåä½ç¶æ
+:0=åæ­¢ä¸­,1=åä½ä¸­\u000d\u000a[1]ãµã¼ã¢ON\/OFFç¶æ
+:0=ãµã¼ã¢OFFç¶æ
+,1=ãµã¼ã¢ONç¶æ
+\u000d\u000a[2ï½7]for future reserved"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"å¼·å¶ãµã¼ã¢ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"ThermostatSettingOverrideFunction",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":206,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=éå¸¸è¨­å®,0x41=å¼·å¶ãµã¼ã¢ON,0x42=å¼·å¶ãµã¼ã¢OFF"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ºæ°æ¸
+æµã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AirPurificationModeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":207,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ç©ºæ°æ¸
+æµON,0x42=OFF"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OnTimerBasedReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":144,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æå»äºç´ãç¸å¯¾æéäºç´å
+±ã«å
+¥,0x42=äºç´å,0x43=æå»äºç´ã®ã¿å
+¥ã,0x44=ç¸å¯¾æå»äºç´ã®ã¿å
+¥ã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OnTimerSettingTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":145,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æé",
+									"valueDescription":"0x00ï½0xFF(0ï½255)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OnTimerSettingRelativeTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":146,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hours_minutes_2type_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OffTimerBasedReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":148,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æå»äºç´ãç¸å¯¾æéäºç´å
+±ã«å
+¥,0x42=äºç´å,0x43=æå»äºç´ã®ã¿å
+¥ã,0x44=ç¸å¯¾æå»äºç´ã®ã¿å
+¥ã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OffTimerSettingTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":149,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æé",
+									"valueDescription":"0x00ï½0xFF(0ï½255)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OffTimerSettingRelativeTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":150,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hours_minutes_2type_t",
+							"unitDescription":null,
+							"valueDescription":""
+						}
+					]
+				},
+				{
+					"classCode":49,
+					"description":"å·é¢¨æ©",
+					"name":"COLD_BLASTER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":50,
+					"description":"æé¢¨æ©",
+					"name":"ELECTRIC_FAN_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":51,
+					"description":"ææ°æ",
+					"name":"VENTILATION_FAN_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ææ°èªåè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"VentilationAutoSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":191,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=AUTO,0x42=éAUTO"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ææ°é¢¨éè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"SetValueOfVentilationAirFlowRate",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":160,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ææ°é¢¨éèªåç¶æ
+,0x31ï½0x38=ææ°é¢¨éã¬ãã«"
+						}
+					]
+				},
+				{
+					"classCode":52,
+					"description":"ç©ºèª¿ææ°æ",
+					"name":"AIR_CONDITIONER_VENTILATION_FAN_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®¤å
+ç¸å¯¾æ¹¿åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"SetValueOfRoomRelativeHumidity",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":180,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ææ°èªåè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"VentilationAutoSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":191,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=AUTO,0x42=éAUTO"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®¤å
+ç¸å¯¾æ¹¿åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredValueOfRoomRelativeHumidity",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":186,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ææ°é¢¨éè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"SetValueOfVentilationAirFlowRate",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":160,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ææ°é¢¨éèªåç¶æ
+,0x31ï½0x38=ææ°é¢¨éã¬ãã«"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç±äº¤ææ©åä½è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"HeatExchangerOperationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ç±äº¤ææ©ON,0x42=OFF"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼£ï¼¯ï¼æ¿åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredValueOfCo2Concentration",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":192,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"ppm",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533ppm)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç
+ï¼ã¿ãã³ï¼æ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"SmokeCigaretteDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":193,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ç
+ï¼ã¿ãã³ï¼æ¤ç¥æ,0x42=ç
+ï¼ã¿ãã³ï¼æ¤ç¥ç¡"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ±ãæ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"PollutionDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":194,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ±ãæ¤ç¥æ,0x42=æ±ãæ¤ç¥ç¡"
+						}
+					]
+				},
+				{
+					"classCode":53,
+					"description":"ç©ºæ°æ¸
+æµå¨",
+					"name":"AIR_CLEANER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã£ã«ã¿ã¼äº¤æéç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"FilterChangeNotice",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ,0x42=ç¡"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨éè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AirFlowRateSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":160,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ææ°é¢¨éèªåç¶æ
+,0x31ï½0x38=ææ°é¢¨éã¬ãã«"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç
+ï¼ã¿ãã³ï¼æ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"SmokeCigaretteDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":193,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ç
+ï¼ã¿ãã³ï¼æ¤ç¥æ,0x42=ç
+ï¼ã¿ãã³ï¼æ¤ç¥ç¡"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å
+è§¦åªåä½è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OpticalCatalystOperationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":194,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å
+è§¦åªON,0x42=å
+è§¦åªOFF"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ºæ°æ±ãæ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"AirPollutionDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":192,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ç©ºæ°æ±ãæ¤ç¥æ,0x42=ç©ºæ°æ±ãæ¤ç¥ç¡"
+						}
+					]
+				},
+				{
+					"classCode":54,
+					"description":"å·é¢¨æ",
+					"name":"COLD_BLAST_FAN_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":55,
+					"description":"ãµã¼ã­ã¥ã¬ã¼ã¿",
+					"name":"CIRCULATOR_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":56,
+					"description":"é¤æ¹¿æ©",
+					"name":"DEHUMIDIFIER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":57,
+					"description":"å æ¹¿å¨",
+					"name":"HUMIDIFIER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å æ¹¿è¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"HumidifyingSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":192,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00ï½0x64(0ï½100%),0x70=èªåè¨­å®,0x71=é£ç¶éè»¢,0x72=éæ¬ éè»¢"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å æ¹¿è¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"HumidifyingSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":193,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x33=å æ¹¿ã¬ãã«,0x70=èªåè¨­å®,0x71=é£ç¶éè»¢,0x72=éæ¬ éè»¢"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¸å¯¾æ¹¿åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredValueOfRelativeHumidity",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":180,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"ReservationSetOfOffTimer",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":148,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"RelativeTimeValueSetOfOffTimer",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":150,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã¤ãªã³æ¾åºè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"IonEmissionSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":194,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ¾åºå
+¥,0x42=æ¾åºå"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ­è¼ã¤ãªã³æ¾åºæ¹æ³",
+							"fields":[
+								
+							],
+							"identifier":"ImplementedIonEmissionMethod",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":195,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"[0]ãã¤ãã¹ã¤ãªã³æ¹å¼\u000d\u000a[1]ã¯ã©ã¹ã¿ã¤ãªã³æ¹å¼"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¹å¥éè»¢ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"SpecialOperationModeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":196,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"è¨­å®æå¹ã®å ´åã1ã¨ãã\u000d\u000a[0]ã®ã©ä¹¾ç¥æå¶\u000d\u000a[1]éé³éè»¢\u000d\u000a[2ï½7]for future reserved"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ°´éã¬ãã«",
+							"fields":[
+								
+							],
+							"identifier":"WaterAmountLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":197,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=ç©ºç¶æ
+,0x41ï½0x45(æä½ï½æé«ã¬ãã«)"
+						}
+					]
+				},
+				{
+					"classCode":58,
+					"description":"å¤©äºæ",
+					"name":"CEILING_FAN_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":59,
+					"description":"é»æ°ããã¤",
+					"name":"ELECTRIC_KOTATSU_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":60,
+					"description":"é»æ°ããã",
+					"name":"ELECTRIC_HEATING_PAD_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":61,
+					"description":"é»æ°æ¯å¸",
+					"name":"ELECTRIC_BLANKET_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":62,
+					"description":"ã¹ãã¼ã",
+					"name":"SPACE_HEATER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":63,
+					"description":"ããã«ãã¼ã¿",
+					"name":"PANEL_HEATER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":64,
+					"description":"é»æ°ã«ã¼ããã",
+					"name":"ELECTRIC_CARPET_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":65,
+					"description":"ãã­ã¢ãã¼ã¿",
+					"name":"FLOOR_HEATER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":66,
+					"description":"é»æ°ææ¿æ©",
+					"name":"ELECTRIC_HEATER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¸©åº¦èªåè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AutomaticTemperatureControlSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=AUTO,0x42=éAUTO"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"TemperatureSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":179,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x32(0ï½50)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®¤å
+æ¸©åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredRoomTemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":187,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x81ï½0x7E(-128ï½127)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã¦ã¼ã¶ãªã¢ã³ã³æ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"RemotelySetTemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":188,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x32(0ï½50)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨éè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AirFlowRateSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":160,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é¢¨éèªåç¶æ
+,0x31ï½0x38=é¢¨éã¬ãã«"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OnTimerBasedReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":144,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OnTimerSettingTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":145,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OnTimerSettingRelativeTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":146,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OffTimerBasedReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":148,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OffTimerSettingTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":149,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"SetValueOfOffTimerRelativeTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":150,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						}
+					]
+				},
+				{
+					"classCode":67,
+					"description":"ãã¡ã³ãã¼ã¿",
+					"name":"FAN_HEATER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"TemperatureSettingValue",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":179,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x32(0ï½50)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¸©åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredTemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":187,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x81ï½0x7D(-128ï½125)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¸©åº¦èªåè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AutomaticTemperatureControlSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=AUTO,0x42=éAUTO"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OnTimerReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":144,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æå»äºç´ãç¸å¯¾æéäºç´å
+±ã«å
+¥,0x42=äºç´å,0x43=æå»äºç´ã®ã¿å
+¥,0x44=ç¸å¯¾æéäºç´ã®ã¿å
+¥"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OnTimerSettingValueTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":145,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OnTimerSettingValueRelativeTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":146,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OffTimerReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":148,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æå»äºç´ãç¸å¯¾æéäºç´å
+±ã«å
+¥,0x42=äºç´å,0x43=æå»äºç´ã®ã¿å
+¥,0x44=ç¸å¯¾æéäºç´ã®ã¿å
+¥"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OffTimerSettingValueTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":149,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OffTimerValueRelativeTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":150,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å»¶é·éè»¢è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"ExtentionalOperationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":192,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å»¶é·å
+¥,0x42=å»¶é·å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å»¶é·ã¿ã¤ãæéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"ExtentionalOperationTimerTimeSettingValue",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":193,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã¤ãªã³æ¾åºè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"IonEmissionSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":194,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ¾åºå
+¥,0x42=æ¾åºå"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ­è¼ã¤ãªã³æ¾åºæ¹æ³",
+							"fields":[
+								
+							],
+							"identifier":"ImplementedIonEmissionMethod",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":195,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"[0]ãã¤ãã¹ã¤ãªã³æ¹å¼\u000d\u000a[1]ã¯ã©ã¹ã¿ã¤ãªã³æ¹å¼"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ²¹éã¬ãã«",
+							"fields":[
+								
+							],
+							"identifier":"OilAmountLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":196,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=ç©ºç¶æ
+,0x41ï½0x45(æä½ï½æé«ã¬ãã«)"
+						}
+					]
+				},
+				{
+					"classCode":68,
+					"description":"å
+
+é»å¨",
+					"name":"BATTERY_CHARGER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":69,
+					"description":"æ¥­åç¨ããã±ã¼ã¸ã¨ã¢ã³ã³å®¤å
+æ©",
+					"name":"PACKAGE_TYPE_COMMERCIAL_AIR_CONDITIONER_INDOOR_UNIT_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"éè»¢ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OperationModeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=èªå,0x42=å·æ¿,0x43=ææ¿,0x44=é¤æ¹¿,0x45=éé¢¨"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"æ¸©åº¦è¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"TemperatureSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":179,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"1â",
+							"valueDescription":"0x00ï½0x32(0ï½50â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¤æ¹¿ã¢ã¼ãæç¸å¯¾æ¹¿åº¦è¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"RelativeHumiditySettingForDehumidificationMode1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":180,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"1ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å·æ¿ã¢ã¼ãææ¸©åº¦è¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"TemperatureSettingForCoolingMode1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":181,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"1â",
+							"valueDescription":"0x00ï½0x32(0ï½50â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ææ¿ã¢ã¼ãææ¸©åº¦è¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"TemperatureSettingForHeatingMode1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":182,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"1â",
+							"valueDescription":"0x00ï½0x32(0ï½50â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¤æ¹¿ã¢ã¼ãææ¸©åº¦è¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"TemperatureSettingForDehumidificationMode1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":183,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"1â",
+							"valueDescription":"0x00ï½0x32(0ï½50â)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":4,
+							"description":"å®¤å
+å®æ ¼æ¶è²»é»åå¤",
+							"fields":[
+								
+							],
+							"identifier":"RatedPowerConsumptionOfIndoorUnit",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":184,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å·æ¿ï¼ææ¿ï¼é¤æ¹¿ï¼éé¢¨å®¤å
+æ¶è²»é»æµè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredElectricCurrentConsumptionOfIndoorUnit",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":185,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1A",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½6553.3A)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®¤å
+ç¸å¯¾æ¹¿åº¦è¨æ¸¬å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredIndoorRelativeHumidity1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":186,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"1ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®¤å
+æ¸©åº¦è¨æ¸¬å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredIndoorTemperature1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":187,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"1â",
+							"valueDescription":"0x81ï½0x7D(-127ï½125â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¸å¯¾æ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"RelativeTemperatureSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":191,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"0.1â",
+							"valueDescription":"0x81ï½0x7D(-12.7ï½12.5â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨éè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AirFlowRateSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":160,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é¢¨éèªåç¶æ
+,0x31ï½0x38=é¢¨éã¬ãã«"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åä¸ä¸è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AirFlowDirectionVerticalSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":164,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31=èªå,0x32=ã¹ã¤ã³ã°,0x41ï½0x49=é¢¨åä¸ä¸è¨­å®(æä¸ï½æä¸)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åå·¦å³è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AirFlowDirectionHorizontalSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":165,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31=èªå,0x32=ã¹ã¤ã³ã°,0x41=å³,0x42=å·¦,0x43=ä¸­å¤®,0x44=å·¦å³"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¹æ®ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"SpecialState",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":170,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=éå¸¸ç¶æ
+,0x42=äºç±ç¶æ
+,0x43=æç±ç¶æ
+"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãµã¼ã¢ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"ThermostatState",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":172,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ãµã¼ã¢on,0x42=ãµã¼ã¢off"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"èªåéè»¢æéè»¢ã¢ã¼ãç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"CurrentFunctionAutomaticOperationMode",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":174,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x42=å·æ¿,0x43=ææ¿,0x44=é¤æ¹¿,0x45=éé¢¨,0x40=ãã®ä»"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ææ°ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"VentilationModeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":192,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ®éææ°,0x42=å
+¨ç±äº¤ææ°,0x43=èªåææ°"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å
+¨ç±äº¤æå¨é£åè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"CombinedOperationOfIndoorUnitAndTotalHeatExchanger",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":193,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å
+¨ç±äº¤æå¨é£å,0x42=å
+¨ç±äº¤æå¨éé£å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ææ°é¢¨éè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"VentilationAirFlowRateSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":194,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ææ°é¢¨éèªå,0x31ï½0x38=ææ°é¢¨éã¬ãã«"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¼·å¶åæ­¢è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DisablingOfAirConditionerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":205,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å¼·å¶åæ­¢,0x42=è§£é¤"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¼·å¶ãµã¼ã¢ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"ThermostatSettingOverrideFunction",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":206,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=éå¸¸è¨­å®,0x41=å¼·å¶ãµã¼ã¢ON,0x42=å¼·å¶ãµã¼ã¢OFF"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã£ã«ã¿ã¼ãµã¤ã³è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"FilterCleaningReminderLampSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":207,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ç¹ç¯,0x42=æ¶ç¯"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®¤å
+æ¶è²»é»åè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredPowerConsumptionOfIndoorUnit",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":219,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨å¼µå¼éåº¦ã¬ãã«",
+							"fields":[
+								
+							],
+							"identifier":"ApertureOfExpansionValve",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":220,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"æ¸©åº¦è¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"TemperatureSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"int16_t",
+							"unitDescription":"0.1â",
+							"valueDescription":"0xFE0Cï½0x3E8(-50.0ï½100.0â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¤æ¹¿ã¢ã¼ãæç¸å¯¾æ¹¿åº¦è¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"RelativeHumiditySettingForDehumidificationMode2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":228,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.10ï¼
+",
+							"valueDescription":"0x0000ï½0x3E8(0.0ï½100.0%)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å·æ¿ã¢ã¼ãææ¸©åº¦è¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"TemperatureSettingForCoolingMode2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"int16_t",
+							"unitDescription":"0.1â",
+							"valueDescription":"0xFE0Cï½0x3E8(-50.0ï½100.0â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ææ¿ã¢ã¼ãææ¸©åº¦è¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"TemperatureSettingForHeatingMode2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":230,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"int16_t",
+							"unitDescription":"0.1â",
+							"valueDescription":"0xFE0Cï½0x3E8(-50.0ï½100.0â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¤æ¹¿ã¢ã¼ãææ¸©åº¦è¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"TemperatureSettingForDehumidificationMode2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":231,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"int16_t",
+							"unitDescription":"0.1â",
+							"valueDescription":"0xFE0Cï½0x3E8(-50.0ï½100.0â)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®¤å
+ç¸å¯¾æ¹¿åº¦è¨æ¸¬å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredIndoorRelativeHumidity2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":234,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.10ï¼
+",
+							"valueDescription":"0x0000ï½0x3E8(0.0ï½100.0%)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®¤å
+æ¸©åº¦è¨æ¸¬å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredIndoorTemperature2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":235,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"int16_t",
+							"unitDescription":"0.1â",
+							"valueDescription":"0xF554ï½0x7FFD(-273.2ï½3276.5â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OnTimerBasedReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":144,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æå»äºç´ãç¸å¯¾æéäºç´å
+±ã«å
+¥,0x42=äºç´å,0x43=æå»äºç´ã®ã¿å
+¥,0x44=ç¸å¯¾æéäºç´ã®ã¿å
+¥"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OnTimerSettingTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":145,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æé",
+									"valueDescription":"0x00ï½0xFF(0ï½255)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OnTimerSettingRelativeTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":146,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hours_minutes_2type_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OffTimerBasedReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":148,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æå»äºç´ãç¸å¯¾æéäºç´å
+±ã«å
+¥,0x42=äºç´å,0x43=æå»äºç´ã®ã¿å
+¥,0x44=ç¸å¯¾æéäºç´ã®ã¿å
+¥"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OffTimerSettingTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":149,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æé",
+									"valueDescription":"0x00ï½0xFF(0ï½255)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OffTimerSettingRelativeTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":150,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hours_minutes_2type_t",
+							"unitDescription":null,
+							"valueDescription":""
+						}
+					]
+				},
+				{
+					"classCode":70,
+					"description":"æ¥­åç¨ããã±ã¼ã¸ã¨ã¢ã³ã³å®¤å¤æ©",
+					"name":"PACKAGE_TYPE_COMMERCIAL_AIR_CONDITIONER_OUTDOOR_UNIT_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éè»¢ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OperationModeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=èªå,0x42=å·æ¿,0x43=ææ¿,0x44=é¤æ¹¿,0x45=éé¢¨"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":3,
+							"description":"å®¤å¤å®æ ¼æ¶è²»é»åå¤",
+							"fields":[
+								
+							],
+							"identifier":"RatedPowerConsumptionOfOutdoorUnit",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":184,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å·æ¿ï¼ææ¿ï¼é¤æ¹¿å®¤å¤æ¶è²»é»æµè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredElectricCurrentConsumptionOfOutdoorUnit",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":185,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1A",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½6553.3A)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¤æ°æ¸©åº¦è¨æ¸¬å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredOutdoorAirTemperature1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":190,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"1â",
+							"valueDescription":"0x81ï½0x7D(-127ï½125â)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¹æ®ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"SpecialState",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":170,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=éå¸¸ç¶æ
+,0x41=é¤éç¶æ
+"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å§ç¸®æ©åä½ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"OperationStatusOfCompressor",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":208,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å§ç¸®æ©ON,0x42=å§ç¸®æ©OFF"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éè»¢ã¢ã¼ãç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"OperationModeInformation",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":209,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x42=å·æ¿,0x43=ææ¿,0x44=é¤æ¹¿,0x40=ãã®ä»"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã¡ã³åè»¢ã¬ãã«",
+							"fields":[
+								
+							],
+							"identifier":"FanRotationSpeed",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":210,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®¤å¤æ¶è²»é»åè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredPowerConsumptionOfOutdoorUnit",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":219,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¤æ°æ¸©åº¦è¨æ¸¬å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredOutdoorAirTemperature2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":238,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"int16_t",
+							"unitDescription":"0.1â",
+							"valueDescription":"0xF554ï½0x7FFD(-273.2ï½3276.5â)"
+						}
+					]
+				},
+				{
+					"classCode":71,
+					"description":"æ¥­åç¨ããã±ã¼ã¸ã¨ã¢ã³ã³èç±ã¦ããã",
+					"name":"PACKAGE_TYPE_COMMERCIAL_AIR_CONDITIONER_THERMAL_STORAGE_UNIT_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":72,
+					"description":"æ¥­åç¨ãã¡ã³ã³ã¤ã«ã¦ããã",
+					"name":"COMMERCIAL_FAN_COIL_UNIT_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":73,
+					"description":"æ¥­åç¨ç©ºèª¿å·ç±æº(ãã©ã¼)",
+					"name":"COMMERCIAL_AIR_CONDITIONING_COLD_SOURCE_CHILLER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":80,
+					"description":"æ¥­åç¨ç©ºèª¿æ¸©ç±æº(ãã¤ã©ã¼)",
+					"name":"COMMERCIAL_AIR_CONDITIONING_HOT_SOURCE_BOILER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":81,
+					"description":"æ¥­åç¨ç©ºèª¿VAV",
+					"name":"AIR_CONDITIONING_VAV_FOR_COMMERCIAL_APPLICATIONS_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":82,
+					"description":"æ¥­åç¨ç©ºèª¿ã¨ã¢ãã³ããªã³ã°ã¦ããã",
+					"name":"AIR_HANDLING_UNIT_AIR_CONDITIONING_FOR_COMMERCIAL_APPLICATIONS_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":83,
+					"description":"ã¦ãããã¯ã¼ã©ã¼",
+					"name":"UNIT_COOLER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":84,
+					"description":"æ¥­åç¨ã³ã³ãã³ã·ã³ã°ã¦ããã",
+					"name":"CONDENSING_UNIT_FOR_COMMERCIAL_APPLICATIONS_EOBJ",
+					"propertyList":[
+						
+					]
+				}
+			]
+		},
+		{
+			"classGroupCode":2,
+			"description":"ä½å®
+ã»è¨­åé¢é£æ©å¨",
+			"define":"X1_AMENITY",
+			"classList":[
+				{
+					"classCode":96,
+					"description":"é»åãã©ã¤ã³ã",
+					"name":"ELECTRICALLY_OPERATED_SHADE_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"ééè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OpenCloseSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é,0x42=é"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"éåº¦ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DegreeOfOpeningLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã©ã¤ã³ãè§åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"SetValueOfShadeAngle",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"degree",
+							"valueDescription":"0x00ï½0xB4(0ï½180degree)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã©ã¤ã³ãéééåº¦è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"ShadeOpenCloseSpeed",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ä½,0x42=ä¸­,0x43=é«"
+						}
+					]
+				},
+				{
+					"classCode":97,
+					"description":"é»åã·ã£ãã¿ã¼",
+					"name":"ELECTRICALLY_OPERATED_SHUTTER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"ééè¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"OpenCloseSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é,0x42=é,0x43=åæ­¢"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éåº¦ã¬ãã«è¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"ExtentOfOpening1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã©ã¤ã³ãè§åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"BlindAngleSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"degree",
+							"valueDescription":"0x00ï½0xB4(0ï½180degree)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã·ã£ãã¿ã¼éééåº¦è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"ShutterSpeed",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ä½,0x42=ä¸­,0x43=é«"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éåº¦ã¬ãã«è¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"ExtentOfOpening2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00ï½0xFF(0ï½255)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é»æ°é è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"ElectricLockSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ½é ,0x42=éé ,0x41=è¨±å¯,0x42=ç¦æ­¢"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"ééè¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"OpenCloseSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":231,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é,0x42=é"
+						}
+					]
+				},
+				{
+					"classCode":98,
+					"description":"é»åã«ã¼ãã³",
+					"name":"ELECTRICALLY_OPERATED_CURTAIN_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":99,
+					"description":"é»åé¨æ¸",
+					"name":"ELECTRICALLY_OPERATED_STORM_WINDOW_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"ééè¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"OpenCloseSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é,0x42=é,0x43=åæ­¢"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éåº¦ã¬ãã«è¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"ExtentOfOpening1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã©ã¤ã³ãè§åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"BlindAngleSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"degree",
+							"valueDescription":"0x00ï½0xB4(0ï½180degree)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã·ã£ãã¿ã¼éééåº¦ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"ShutterSpeed",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ä½,0x42=ä¸­,0x43=é«"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éåº¦ã¬ãã«è¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"ExtentOfOpening2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00ï½0xFF(0ï½255)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é»æ°é è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"ElectricLockSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ½é ,0x42=éé ,0x41=è¨±å¯,0x42=ç¦æ­¢"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"ééè¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"OpenCloseSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":231,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é,0x42=é"
+						}
+					]
+				},
+				{
+					"classCode":100,
+					"description":"é»åã¬ã¬ã¼ã¸",
+					"name":"ELECTRICALLY_OPERATED_DOOR_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":101,
+					"description":"é»åå¤©çª",
+					"name":"ELECTRICALLY_OPERATED_SKYLIGHT_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":102,
+					"description":"ãªã¼ãã³ã°ï¼æ¥ããï¼",
+					"name":"AWNING_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":103,
+					"description":"æ£æ°´å¨ï¼åº­ç¨ï¼",
+					"name":"GARDEN_SPRINKLER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ£æ°´å¼ééè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"SprinkleValveOpenCloseSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=èªåON,0x41=æåON,0x42=æåOFF"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ°´ããééè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"SprinkleIntervalSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=å,0x41=æ¯æ¥,0x42=ï¼æ¥ãã,0x43=ï¼æ¥ãã,0x44=é±ï¼å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ°´ããåæ°è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"NumberOfSprinklesSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ï¼çªç®ON,0x42=ï¼çªç®ON,0x43=ä¸¡æ¹ON"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ°´ããæå»è¨­å®ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"SprinkleTimeSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ°´ããæå»è¨­å®ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"SprinkleTimeSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ°´ããæéè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"SprinkleDurationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00ï½0x3B(0ï½59)"
+						}
+					]
+				},
+				{
+					"classCode":104,
+					"description":"æ£æ°´å¨ï¼ç«ç½ç¨ï¼",
+					"name":"FIRE_SPRINKLER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":105,
+					"description":"å´æ°´",
+					"name":"FOUNTAIN_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":106,
+					"description":"ç¬éæ¹¯æ²¸å¨",
+					"name":"INSTANTANEOUS_WATER_HEATER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":107,
+					"description":"é»æ°æ¸©æ°´å¨",
+					"name":"ELECTRIC_WATER_HEATER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ²¸ãä¸ãèªåè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AutomaticWaterHeatingSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=èªåæ²¸ãä¸ã,0x43=æåæ²¸ãä¸ãåæ­¢,0x42=æåæ²¸ãä¸ã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ²¸ãä¸ãæ¹¯æ¸©èªåè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AutomaticWaterTemperatureControlSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=AUTO,0x42=éAUTO"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ²¸ãä¸ãä¸­ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"WaterHeaterStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":178,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ²¸ãä¸ãä¸­,0x42=éæ²¸ãä¸ãä¸­"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ²¸ãä¸ãæ¹¯æ¸©è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"WaterHeatingTemperatureSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":179,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x64(0ï½100â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¼éæ²¸ãå¢ãè¨±å¯è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DaytimeReheatingPermissionSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":192,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ¼éæ²¸ãå¢ãè¨±å¯,0x42=æ¼éæ²¸ãå¢ãç¦æ­¢"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¸©æ°´å¨æ¹¯æ¸©è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredTemperatureOfWaterInWaterHeater",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":193,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x64(0ï½100â)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è­¦å ±çºçç¶æ
+",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"è­¦å ±",
+									"fields":[
+										
+									],
+									"identifier":"Alarm",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]æ¹¯åãè­¦å ±:0=æ­£å¸¸,1=çºç\u000d\u000a[1]æ¼æ°´è­¦å ±:0=æ­£å¸¸,1=çºç\u000d\u000a[2]åçµè­¦å ±:0=æ­£å¸¸,1=çºç\u000d\u000a[3ï½7]for future reserved"
+								},
+								{
+									"arrayCount":3,
+									"description":"for future reserved",
+									"fields":[
+										
+									],
+									"identifier":"Reserved",
+									"initialValue":null,
+									"isArray":true,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":""
+								}
+							],
+							"identifier":"AlarmStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":194,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"alarm_status_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"çµ¦æ¹¯æ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"TemperatureOfSuppliedWaterSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":209,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x64(0ï½100â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åæ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"BathWaterTemperatureSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":211,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x64(0ï½100â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ²¸ãä¸ãæ¹¯éè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"BathWaterVolumeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ®æ¹¯éè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredAmountOfWaterRemainingInTank",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"ã",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533ã)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã¿ã³ã¯å®¹éå¤",
+							"fields":[
+								
+							],
+							"identifier":"TankCapacity",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"ã",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533ã)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åèªåã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AutomaticBathWaterHeatingModeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=èªåå
+¥,0x42=èªåè§£é¤"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åè¶³ãæ¹¯åä½è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AdditionOfHotWaterFunctionSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=è¶³ãæ¹¯å
+¥,0x42=è¶³ãæ¹¯å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åã¬ããåä½è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"SlightBathWaterTemperatureLoweringFunctionSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":230,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ã¬ããå
+¥,0x42=ã¬ããå"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åæ¹¯éè¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"BathWaterVolumeSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":231,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ã",
+							"valueDescription":"0x00ï½0xFD(0ï½253ã)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åæ¹¯éè¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"BathWaterVolumeSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":232,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åæ¹¯éè¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"BathWaterVolumeSetting3",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":238,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"ã",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533ã)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åæ¹¯éè¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"BathWaterVolumeSetting4",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":212,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x01ï½0xFF"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åæ¹¯éè¨­å®ï¼è¨­å®å¯è½æå¤§ã¬ãã«",
+							"fields":[
+								
+							],
+							"identifier":"BathWaterVolumeSetting4MaximumSettableLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":213,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x01ï½0xFF"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OnTimerReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":144,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OnTimerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":145,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¬å­£ï¼¨ï¼ï¼°ã¦ãããå®æ ¼æ¶è²»é»å",
+							"fields":[
+								
+							],
+							"identifier":"RatedPowerConsumptionOfHPUnitInWintertime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":219,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¸­éæï¼¨ï¼ï¼°ã¦ãããå®æ ¼æ¶è²»é»å",
+							"fields":[
+								
+							],
+							"identifier":"RatedPowerConsumptionOfHPUnitInInBetweenSeasons",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":220,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¤å­£ï¼¨ï¼ï¼°ã¦ãããå®æ ¼æ¶è²»é»å",
+							"fields":[
+								
+							],
+							"identifier":"RatedPowerConsumptionOfHPUnitInSummertime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":221,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533)"
+						}
+					]
+				},
+				{
+					"classCode":108,
+					"description":"å¤ªé½ç±æ¸©æ°´å¨",
+					"name":"SOLAR_WATER_HEATER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":109,
+					"description":"å¾ªç°ãã³ã",
+					"name":"CIRCULATION_PUMP_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":110,
+					"description":"é»æ°ä¾¿åº§ï¼æ¸©æ°´æ´æµä¾¿åº§ã»ææ¿ä¾¿åº§ãªã©ï¼",
+					"name":"BIDET_EQUIPPED_TOILET_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¾¿åº§æ¸©åº¦ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"TemperatureLevelOfToiletSeat",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x3A"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¾¿åº§ãã¼ã¿è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"HeaterSettingOfToiletSeat",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ON,0x42=OFF"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¾¿åº§ãã¼ã¿ä¸æåæ­¢è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"TemporalHaltSettingOfToiletSeat",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é£ç¶è¨­å®,0x42=ä¸åè¨­å®,0x43=è¨­å®ãªã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¾¿åº§ãã¼ã¿ä¸æåæ­¢éå§æå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"TemporalHaltStartTimeOfToiletSeat",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¾¿åº§ãã¼ã¿ä¸æåæ­¢æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"TemporalHaltTimeDurationOfToiletSeat",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¨å±ææ¿æ¸©åº¦ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"TemperatureLevelSettingOfRoomHeating",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31=ä½,0x32=ä¸­,0x33=é«"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¨å±ææ¿è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"RoomHeatingSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":230,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é¨å±ææ¿ON,0x42=é¨å±ææ¿OFF,0x43=ã¿ã¤ãã¢ã¼ãè¨­å®"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¨å±ææ¿ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"RoomHeatingStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":231,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ON,0x42=OFF"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¨å±ææ¿éå§æå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"StartTimeOfRoomHeating",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":232,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¨å±ææ¿éè»¢æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"DurationTimeOfRoomHreating",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":233,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¹å¥éè»¢ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"SpecialOperationModeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":234,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=è¨­å®ãªã,0x41=å·ãè¾¼ã¿é²æ­¢,0x42ï½=for future reserved"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"äººä½æ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"HumanDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":235,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äººä½æ¤ç¥æ,0x42=äººä½æ¤ç¥ç¡"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"çåº§æ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"SeatingDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":236,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=çåº§æ¤ç¥æ,0x42=çåº§æ¤ç¥ç¡"
+						}
+					]
+				},
+				{
+					"classCode":111,
+					"description":"é»æ°é ",
+					"name":"ELECTRIC_KEY_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"æ½é è¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"LockSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ½é ,0x42=è§£é "
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ½é è¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"LockSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ½é ,0x42=è§£é "
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã¢ã¬ã¼ãæ½é ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"LockStatusOfDoorGuard",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ½é ,0x42=è§£é "
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æééç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"DoorOpenCloseStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é,0x42=é"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¨å®¤ã»ä¸å¨ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"OccupantNonOccupantStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å¨å®¤,0x42=ä¸å¨"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è­¦å ±ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"AlarmStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=éå¸¸ç¶æ
+ï¼è­¦å ±ãªãï¼,0x41=ããéã,0x42=æéæ¾,0x43=æåè§£é ,0x44=ã¿ã³ã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"èªåæ½é ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AutoLockModeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":230,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å
+¥,0x42=å"
+						}
+					]
+				},
+				{
+					"classCode":112,
+					"description":"ã¬ã¹å
+å¼",
+					"name":"GAS_LINE_VALVE_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":113,
+					"description":"ãã¼ã ãµã¦ã",
+					"name":"HOME_SAUNA_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":114,
+					"description":"ç¬éå¼çµ¦æ¹¯å¨",
+					"name":"HOT_WATER_GENERATOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"çµ¦æ¹¯å¨çç¼ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"HotWaterHeatingStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":208,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=çµ¦æ¹¯çç¼ç¶æ
+æ,0x42=ç¡"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"çµ¦æ¹¯æ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"SetValueOfHotWaterTemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":209,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x64(0ï½100)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"çµ¦æ¹¯ä¿æ¸©è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"HotWaterWarmerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":210,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=çµ¦æ¹¯ä¿æ¸©åä½,0x42=çµ¦æ¹¯ä¿æ¸©åä½è§£é¤"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"èªåéè»¢æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"DurationOfAutomaticOperationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":218,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":"0xFFFF=ç¡é"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"èªåéè»¢æ®æé",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"RemainingAutomaticOperationTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":219,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":"0xFFFF=ç¡é"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åæ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"SetValueOfBathTemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x64(0ï½100)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åçµ¦æ¹¯å¨çç¼ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"BathWaterHeaterStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=çç¼ç¶æ
+æ,0x42=ç¡"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åèªåã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"BathAutoModeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=èªåå
+¥,0x42=èªåè§£é¤"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åè¿½ãçãåä½è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"BathAdditionalBoilUpOperationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=è¿½ãçãå
+¥,0x42=è¿½ãçãå"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åè¶³ãæ¹¯åä½è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"BathHotWaterAddingOperationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=è¶³ãæ¹¯å
+¥,0x42=è¶³ãæ¹¯å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åã¬ããåä½è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"BathWaterTemperatureLoweringOperationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":230,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ã¬ããå
+¥,0x42=ã¬ããå"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åæ¹¯éè¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"BathHotWaterVolumeSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":231,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ã",
+							"valueDescription":"0x00ï½0xFD(0ï½253ã)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åæ¹¯éè¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"BathHotWaterVolumeSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":232,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åæ¹¯éè¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"BathHotWaterVolumeSetting3",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":238,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"ã",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533ã)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åæ¹¯éè¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"BathHotWaterVolumeSetting4",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":212,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x01ï½0xFF"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åæ¹¯éè¨­å®ï¼è¨­å®å¯è½æå¤§ã¬ãã«",
+							"fields":[
+								
+							],
+							"identifier":"BathHotWaterVolumeSetting4MaximumSettableLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":213,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x01ï½0xFF"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æµ´å®¤åªå
+è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"BathroomPrioritySetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":233,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æµ´å®¤åªå
+å
+¥,0x42=æµ´å®¤åªå
+å"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã·ã£ã¯ã¼çµ¦æ¹¯ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"ShowerHotWaterSupplyStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":234,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ã·ã£ã¯ã¼çµ¦æ¹¯ç¶æ
+æ,0x42=ã·ã£ã¯ã¼çµ¦æ¹¯ç¶æ
+ç¡"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å°æçµ¦æ¹¯ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"KitchenHotWaterSupplyStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":235,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å°æçµ¦æ¹¯ç¶æ
+æ,0x42=å°æçµ¦æ¹¯ç¶æ
+ç¡"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"çµ¦æ¹¯ä¿æ¸©ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"HotWaterWarmerOnTimerReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":236,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"çµ¦æ¹¯ä¿æ¸©ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"SetValueOfHotWaterWarmerOnTimerTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":237,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åèªåï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OnTimerReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":144,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åèªåï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"SetValueOfOnTimerTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":145,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åèªåï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"SetValueOfOnTimerRelativeTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":146,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						}
+					]
+				},
+				{
+					"classCode":115,
+					"description":"æµ´å®¤ææ¿ä¹¾ç¥æ©",
+					"name":"BATHROOM_DRYER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éè»¢è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OperationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x10=ææ°éè»¢,0x20=å
+¥æµ´åäºåææ¿éè»¢,0x30=å
+¥æµ´ä¸­ææ¿éè»¢,0x40=ä¹¾ç¥éè»¢,0x50=æ¶¼é¢¨éè»¢,0x00=åæ­¢"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ææ°éè»¢è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"VentilationOperationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=èªå,0x42=æ¨æº,0x31ï½0x38=é¢¨éã¬ãã«"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å
+¥æµ´åäºåææ¿éè»¢è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"BathroomPreWarmerOperationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":178,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=èªå,0x42=æ¨æº,0x31ï½0x38=è½åã¬ãã«"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å
+¥æµ´ä¸­ææ¿éè»¢è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"BathroomHeaterOperationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":179,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=èªå,0x42=æ¨æº,0x31ï½0x38=è½åã¬ãã«"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¹¾ç¥éè»¢è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"BathroomDryerOperationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":180,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=èªå,0x42=æ¨æº,0x31ï½0x38=è½åã¬ãã«"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¶¼é¢¨éè»¢è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"CoolAirCirculatorOperationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":181,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=èªå,0x42=æ¨æº,0x31ï½0x38=è½åã¬ãã«"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®¤å
+ç¸å¯¾æ¹¿åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredRelativeBathroomHumidity",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":186,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®¤å
+æ¸©åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredBathroomTemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":187,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x81ï½0x7D(-127ï½125â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ææ°é¢¨éè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"VentilationAirFlowRateSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":194,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=èªå,0x31ï½0x38=é¢¨éã¬ãã«"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã£ã«ã¿ãµã¤ã³è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"FilterCleaningReminderSignSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":207,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ç¹ç¯,0x42=æ¶ç¯"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"äººä½æ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"HumanBodyDetectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äººä½æ¤ç¥ãã,0x42=äººä½æ¤ç¥ãªã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"OnTimerBasedReservationSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":144,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"OnTimerBasedReservationSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x10=ææ°éè»¢äºç´,0x20=å
+¥æµ´åäºåææ¿éè»¢äºç´,0x30=å
+¥æµ´ä¸­ææ¿éè»¢äºç´,0x40=ä¹¾ç¥éè»¢äºç´,0x50=æ¶¼é¢¨éè»¢äºç´,0x00=äºç´å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OnTimerSettingTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":145,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OnTimerSettingRelativeTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":146,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OffTimerBasedReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":148,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OffTimerSettingTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":149,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OffTimerSettingRelativeTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":150,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						}
+					]
+				},
+				{
+					"classCode":116,
+					"description":"ãã¼ã ã¨ã¬ãã¼ã¿",
+					"name":"HOME_ELEVATOR_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":117,
+					"description":"é»åéä»åã",
+					"name":"ELECTRICALLY_OPERATED_ROOM_DIVIDER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":118,
+					"description":"æ°´å¹³ãã©ã³ã¹ãã¡",
+					"name":"HORIZONTAL_TRANSFER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":119,
+					"description":"é»åç©å¹²ã",
+					"name":"ELECTRICALLY_OPERATED_CLOTHES_DRYING_POLE_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":120,
+					"description":"æµåæ§½",
+					"name":"SEPTIC_TANK_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":121,
+					"description":"ä½å®
+ç¨å¤ªé½å
+çºé»",
+					"name":"HOME_SOLAR_POWER_GENERATION_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç³»çµ±é£ç³»ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"SystemInterconnectionStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":208,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ç³»çµ±é£ç³»ï¼éæ½®æµå¯ï¼,0x01=ç¬ç«,0x02=ç³»çµ±é£ç³»ï¼éæ½®æµä¸å¯ï¼"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¬æçºé»é»åè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredInstantaneousAmountOfElectricityGenerated",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®çºé»é»åéè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCumulativeAmountOfElectricityGenerated",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001kWh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®çºé»é»åéãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"ResettingCumulativeAmountOfElectricityGenerated",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®å£²é»é»åéè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCumulativeAmountOfElectricitySold",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001kWh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®å£²é»é»åéãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"ResettingCumulativeAmountOfElectricitySold",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"çºé»é»åå¶éè¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"PowerGenerationOutputLimitSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"çºé»é»åå¶éè¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"PowerGenerationOutputLimitSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":230,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å£²é»é»åå¶éè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"LimitSettingForTheAmountOfElectricitySold",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":231,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®æ ¼çºé»é»åå¤ï¼ç³»çµ±é£ç³»æï¼",
+							"fields":[
+								
+							],
+							"identifier":"RatedPowerGenerationOutputSystemInterconnected",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":232,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®æ ¼çºé»é»åå¤ï¼ç¬ç«æï¼",
+							"fields":[
+								
+							],
+							"identifier":"RatedPowerGenerationOutputIndependent",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":233,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533)"
+						}
+					]
+				},
+				{
+					"classCode":122,
+					"description":"å·æ¸©æ°´ç±æºæ©",
+					"name":"COLD_AND_HOT_WATER_HEAT_SOURCE_EQUIPMENT_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éè»¢ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OperationModeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ææ¿,0x42=å·æ¿"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ°´æ¸©è¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"WaterTemperatureSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x64(0ï½100â),0x71=AUTO"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ°´æ¸©è¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"WaterTemperatureSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x21ï½0x2F=å·æ¿ï¼å·æ°´ï¼(æä½ã¬ãã«ï½æé«ã¬ãã«),0x31ï½0x3F=ææ¿ï¼æ¸©æ°´ï¼(æä½ã¬ãã«ï½æé«ã¬ãã«),0x41=AUTO"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¾ãæ°´æ¸©è¨æ¸¬å¤ï¼åºå£æ°´æ¸©ï¼",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredTemperatureOfOutwardWaterExitWaterTemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x64(0ï½100â)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ»ãæ°´æ¸©è¨æ¸¬å¤ï¼å
+¥å£æ°´æ¸©ï¼",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredTemperatureOfInwardWaterEntranceWaterTemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x64(0ï½100â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¹æ®éè»¢è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"SpecialOperationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=éå¸¸éè»¢,0x42=ã²ãããéè»¢,0x43=ãã¤ãã¯ã¼éè»¢"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã¤ãªã¼ã¿ã¤ãã¼è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DailyTimerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":230,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=ã¿ã¤ãã¼å,0x41=ã¿ã¤ãã¼1,0x42=ã¿ã¤ãã¼2"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã¤ãªã¼ã¿ã¤ãã¼ï¼è¨­å®",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"ï¼æããï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromZeroToThreeOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼æããï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromFourToSevenOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼æããï¼ï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromEightToElevenOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼ï¼æããï¼ï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromTwelveToFifteenOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼ï¼æããï¼ï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromSixteenToNineteenOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼ï¼æããï¼ï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromTwentyToTwentyThreeOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								}
+							],
+							"identifier":"DailyTimerSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":231,
+							"required":[
+								"NONE"
+							],
+							"size":6,
+							"type":"daily_timer_setting_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã¤ãªã¼ã¿ã¤ãã¼ï¼è¨­å®",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"ï¼æããï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromZeroToThreeOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼æããï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromFourToSevenOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼æããï¼ï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromEightToElevenOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼ï¼æããï¼ï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromTwelveToFifteenOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼ï¼æããï¼ï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromSixteenToNineteenOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼ï¼æããï¼ï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromTwentyToTwentyThreeOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								}
+							],
+							"identifier":"DailyTimerSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":232,
+							"required":[
+								"NONE"
+							],
+							"size":6,
+							"type":"daily_timer_setting_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OnTimerReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":144,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OnTimerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":145,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"RelativeOnTimerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":146,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OffTimerReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":148,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"TimeSetByOffTimer",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":149,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"RelativeOffTimerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":150,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						}
+					]
+				},
+				{
+					"classCode":123,
+					"description":"åºææ¿",
+					"name":"FLOOR_HEATER2_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¸©åº¦è¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"TemperatureSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x32(0ï½50â),0x41=AUTO"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¸©åº¦è¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"TemperatureSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x3F(æä½ï½æé«ã¬ãã«),0x41=AUTO"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®¤å
+æ¸©åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredRoomTeemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x81ï½0x7D(-127ï½125â)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"åºæ¸©åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredFloorTemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x81ï½0x7D(-127ï½125â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã¾ã¼ã³åæ¿ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"ZoneChangeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"[0]ã¾ã¼ã³0:1=å¶å¾¡æã,0=å¶å¾¡ç¡ã\u000d\u000a[1]ã¾ã¼ã³1:1=å¶å¾¡æã,0=å¶å¾¡ç¡ã\u000d\u000a[2]ã¾ã¼ã³2:1=å¶å¾¡æã,0=å¶å¾¡ç¡ã\u000d\u000a[3]ã¾ã¼ã³3:1=å¶å¾¡æã,0=å¶å¾¡ç¡ã\u000d\u000a[4]ã¾ã¼ã³4:1=å¶å¾¡æã,0=å¶å¾¡ç¡ã\u000d\u000a[5]ã¾ã¼ã³5:1=å¶å¾¡æã,0=å¶å¾¡ç¡ã\u000d\u000a[6]ã¾ã¼ã³6:1=å¶å¾¡æã,0=å¶å¾¡ç¡ã\u000d\u000a[7]ã¾ã¼ã³7:1=å¶å¾¡æã,0=å¶å¾¡ç¡ã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¹æ®éè»¢è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"SpecialOperationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=éå¸¸éè»¢,0x42=ã²ãããéè»¢,0x43=ãã¤ãã¯ã¼éè»¢"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã¤ãªã¼ã¿ã¤ãã¼è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DailyTimerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":230,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=ã¿ã¤ãã¼å,0x41=ã¿ã¤ãã¼1,0x42=ã¿ã¤ãã¼2"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã¤ãªã¼ã¿ã¤ãã¼ï¼è¨­å®",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"ï¼æããï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromZeroToThreeOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼æããï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromFourToSevenOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼æããï¼ï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromEightToElevenOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼ï¼æããï¼ï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromTwelveToFifteenOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼ï¼æããï¼ï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromSixteenToNineteenOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼ï¼æããï¼ï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromTwentyToTwentyThreeOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								}
+							],
+							"identifier":"DailyTimerSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":231,
+							"required":[
+								"NONE"
+							],
+							"size":6,
+							"type":"daily_timer_setting_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã¤ãªã¼ã¿ã¤ãã¼ï¼è¨­å®",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"ï¼æããï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromZeroToThreeOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼æããï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromFourToSevenOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼æããï¼ï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromEightToElevenOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼ï¼æããï¼ï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromTwelveToFifteenOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼ï¼æããï¼ï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromSixteenToNineteenOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼ï¼æããï¼ï¼æ",
+									"fields":[
+										
+									],
+									"identifier":"FromTwentyToTwentyThreeOClock",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"
+								}
+							],
+							"identifier":"DailyTimerSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":232,
+							"required":[
+								"NONE"
+							],
+							"size":6,
+							"type":"daily_timer_setting_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OnTimerReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":144,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"TimeSetByOnTimer",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":145,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"RelativeOnTimerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":146,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OffTimerReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":148,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"TimeSetByOffTimer",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":149,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"RelativeOffTimerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":150,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						}
+					]
+				},
+				{
+					"classCode":124,
+					"description":"çæé»æ± ",
+					"name":"FUEL_CELL_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¸©æ°´å¨æ¹¯æ¸©è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredTemperatureOfWaterInWaterHeater",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":193,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x64(0ï½100â)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®æ ¼çºé»é",
+							"fields":[
+								
+							],
+							"identifier":"RatedPowerGenerationOutput",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":194,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65,533W)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è²¯æ¹¯æ§½ç±é",
+							"fields":[
+								
+							],
+							"identifier":"HeatingValueOfHotWaterStorageTank",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":195,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"MJ",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65,533MJ)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¬æçºé»é»åè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredInstantaneousPowerGenerationOutput",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":196,
+							"required":[
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65,533W)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®çºé»é»åéè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCumulativePowerGenerationOutput",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":197,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001kWh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®çºé»é»åéãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"CumulativePowerGenerationOutputResetSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":198,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¬æã¬ã¹æ¶è²»éè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredInstantaneousGasConsumption",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":199,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.001ã¥\/h",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65.533ã¥\/h)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®ã¬ã¹æ¶è²»éè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCumulativeGasConsumption",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":200,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001ã¥",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999ã¥)"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®ã¬ã¹æ¶è²»éãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"CumulativeGasConsumptionResetSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":201,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"çºé»åä½è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"PowerGenerationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":202,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=çºé»åä½,0x42=çºé»åæ­¢"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"çºé»åä½ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"PowerGenerationStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":203,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=çºé»ä¸­,0x42=åæ­¢ä¸­,0x43=èµ·åä¸­,0x44=åæ­¢åä½ä¸­,0x45=ã¢ã¤ãã«ä¸­"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®
+å
+ç¬ææ¶è²»é»åè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredInHouseInstantaneousPowerConsumption",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":204,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65,533W)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®
+å
+ç©ç®æ¶è²»é»åéè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredInHouseCumulativePowerConsumption",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":205,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001kWh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"å®
+å
+ç©ç®æ¶è²»é»åéãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"InHouseCumulativePowerConsumptionReset",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":206,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç³»çµ±é£ç³»ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"SystemInterconnectedType",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":208,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ç³»çµ±é£ç³»ï¼éæ½®æµå¯ï¼,0x01=ç¬ç«,0x02=ç³»çµ±é£ç³»ï¼éæ½®æµä¸å¯ï¼"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ®æ¹¯éè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredRemainingHotWaterAmount",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"ã",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65,533ã)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã¿ã³ã¯å®¹éå¤",
+							"fields":[
+								
+							],
+							"identifier":"TankCapacity",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"ã",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65,533ã)"
+						}
+					]
+				},
+				{
+					"classCode":125,
+					"description":"èé»æ± ",
+					"name":"STORAGE_BATTERY_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æå°æå¤§å
+
+é»é»åå¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æå°å
+
+é»é»åå¤",
+									"fields":[
+										
+									],
+									"identifier":"MinimumChargingElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"W",
+									"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"
+								},
+								{
+									"arrayCount":0,
+									"description":"æå¤§å
+
+é»é»åå¤",
+									"fields":[
+										
+									],
+									"identifier":"MaximumChargingElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"W",
+									"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"
+								}
+							],
+							"identifier":"MinimumMaximumChargingElectricEnergy",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":200,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"minimum_maximum_charging_electric_energy_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æå°æå¤§æ¾é»é»åå¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æå°æ¾é»é»åå¤",
+									"fields":[
+										
+									],
+									"identifier":"MinimumDischargingElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"W",
+									"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"
+								},
+								{
+									"arrayCount":0,
+									"description":"æå¤§æ¾é»é»åå¤",
+									"fields":[
+										
+									],
+									"identifier":"MaximumDischargingElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"W",
+									"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"
+								}
+							],
+							"identifier":"MinimumMaximumDischargingElectricEnergy",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":201,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"minimum_maximum_discharging_electric_energy_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æå°æå¤§å
+
+é»é»æµå¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æå°å
+
+é»é»æµå¤",
+									"fields":[
+										
+									],
+									"identifier":"MinimumChargingCurrent",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"
+								},
+								{
+									"arrayCount":0,
+									"description":"æå¤§å
+
+é»é»æµå¤",
+									"fields":[
+										
+									],
+									"identifier":"MaximumChargingCurrent",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"
+								}
+							],
+							"identifier":"MinimumMaximumChargingCurrent",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":202,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"minimum_maximum_charging_current_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æå°æå¤§æ¾é»é»æµå¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æå°æ¾é»é»æµå¤",
+									"fields":[
+										
+									],
+									"identifier":"MinimumDischargingCurrent",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"
+								},
+								{
+									"arrayCount":0,
+									"description":"æå¤§æ¾é»é»æµå¤",
+									"fields":[
+										
+									],
+									"identifier":"MaximumDischargingCurrent",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"
+								}
+							],
+							"identifier":"MinimumMaximumDischargingCurrent",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":203,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"minimum_maximum_discharging_current_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®æ ¼é»åé",
+							"fields":[
+								
+							],
+							"identifier":"RatedElectricEnergy",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":208,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"Wh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®æ ¼å®¹é",
+							"fields":[
+								
+							],
+							"identifier":"RatedCapacity",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":209,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1Ah",
+							"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®æ ¼é»å§",
+							"fields":[
+								
+							],
+							"identifier":"RatedVoltage",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":210,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"V",
+							"valueDescription":"0x0000ï½0x7FFE(0ï½32,766V)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¬æå
+
+æ¾é»é»åè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredInstantaneousChargeDischargElectricEnergy",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":211,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"int32_t",
+							"unitDescription":"W",
+							"valueDescription":"0x00000001ï½0x3B9AC9FF=å
+
+é»æï¼ãã©ã¹å¤ï¼(1ï½999,999,999W),0xFFFFFFFFï½0xC4653601=æ¾é»æï¼ãã¤ãã¹å¤ï¼(-1ï½-999,999,999W)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¬æå
+
+æ¾é»é»æµè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredInstantaneousChargeDischargCurrent",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":212,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"int16_t",
+							"unitDescription":"0.1A",
+							"valueDescription":"0x0001ï½0x7FFE=å
+
+é»æï¼ãã©ã¹å¤ï¼(0.1ï½3,276.6A),0xFFFFï½0x8001=æ¾é»æï¼ãã¤ãã¹å¤ï¼(-0.1ï½-3,276.7A)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¬æå
+
+æ¾é»é»å§è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredInstantaneousChargeDischargVoltage",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":213,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"int16_t",
+							"unitDescription":"V",
+							"valueDescription":"0x0001ï½0x7FFE=å
+
+é»æï¼ãã©ã¹å¤ï¼(1ï½32,766V),0xFFFFï½0x8001=æ¾é»æï¼ãã¤ãã¹å¤ï¼(-1ï½-32,767V)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®æ¾é»é»åéè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCumulativeDischargeElectricEnergy",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":214,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001kWh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®æ¾é»é»åéãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCumulativeDischargeElectricEnergyResetSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":215,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®å
+
+é»é»åéè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCumulativeChargeElectricEnergy",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":216,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001kWh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®å
+
+é»é»åéãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCumulativeChargeElectricEnergyResetSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":217,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"éè»¢ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OperationModeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":218,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ¥éå
+
+é»,0x42=å
+
+é»,0x43=æ¾é»,0x44=å¾
+æ©,0x45=ãã¹ã,0x40=ãã®ä»"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç³»çµ±é£ç³»ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"SystemInterconnectedType",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":219,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ç³»çµ±é£ç³»ï¼éæ½®æµå¯ï¼,0x01=ç¬ç«,0x02=ç³»çµ±é£ç³»ï¼éæ½®æµä¸å¯ï¼"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æå°æå¤§å
+
+é»é»åå¤ï¼ç¬ç«æï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æå°å
+
+é»é»åå¤",
+									"fields":[
+										
+									],
+									"identifier":"MinimumChargingElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"W",
+									"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"
+								},
+								{
+									"arrayCount":0,
+									"description":"æå¤§å
+
+é»é»åå¤",
+									"fields":[
+										
+									],
+									"identifier":"MaximumChargingElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"W",
+									"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"
+								}
+							],
+							"identifier":"MinimumMaximumChargingPowerIndependent",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":220,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"minimum_maximum_charging_electric_energy_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æå°æå¤§æ¾é»é»åå¤ï¼ç¬ç«æï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æå°æ¾é»é»åå¤",
+									"fields":[
+										
+									],
+									"identifier":"MinimumDischargingElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"W",
+									"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"
+								},
+								{
+									"arrayCount":0,
+									"description":"æå¤§æ¾é»é»åå¤",
+									"fields":[
+										
+									],
+									"identifier":"MaximumDischargingElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"W",
+									"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"
+								}
+							],
+							"identifier":"MinimumMaximumDischargingPowerIndependent",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":221,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"minimum_maximum_discharging_electric_energy_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æå°æå¤§å
+
+é»é»æµå¤ï¼ç¬ç«æï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æå°å
+
+é»é»æµå¤",
+									"fields":[
+										
+									],
+									"identifier":"MinimumChargingCurrent",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"
+								},
+								{
+									"arrayCount":0,
+									"description":"æå¤§å
+
+é»é»æµå¤",
+									"fields":[
+										
+									],
+									"identifier":"MaximumChargingCurrent",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"
+								}
+							],
+							"identifier":"MinimumMaximumChargingCurrentIndependent",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":222,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"minimum_maximum_charging_current_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æå°æå¤§æ¾é»é»æµå¤ï¼ç¬ç«æï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æå°æ¾é»é»æµå¤",
+									"fields":[
+										
+									],
+									"identifier":"MinimumDischargingCurrent",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"
+								},
+								{
+									"arrayCount":0,
+									"description":"æå¤§æ¾é»é»æµå¤",
+									"fields":[
+										
+									],
+									"identifier":"MaximumDischargingCurrent",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"
+								}
+							],
+							"identifier":"MinimumMaximumDischargingCurrentIndependent",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":223,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"minimum_maximum_discharging_current_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å
+
+æ¾é»éè¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"ChargingDischaRgingAmountSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"int32_t",
+							"unitDescription":"Wh",
+							"valueDescription":"0x00000001ï½0x3B9AC9FF=å
+
+é»æï¼ãã©ã¹å¤ï¼(1ï½999,999,999Wh),0xFFFFFFFFï½0xC4653601=æ¾é»æï¼ãã¤ãã¹å¤ï¼(-1ï½-999,999,999Wh)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å
+
+æ¾é»éè¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"ChargingDischaRgingAmountSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"int16_t",
+							"unitDescription":"0.1Ah",
+							"valueDescription":"0x0001ï½0x7FFE=å
+
+é»æï¼ãã©ã¹å¤ï¼(0.1ï½3,276.6Ah),0xFFFFï½0x8001=æ¾é»æï¼ãã¤ãã¹å¤ï¼(-0.1ï½-3,276.7Ah)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"èé»æ®éï¼",
+							"fields":[
+								
+							],
+							"identifier":"RemainingStoredElectricity1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"Wh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"èé»æ®éï¼",
+							"fields":[
+								
+							],
+							"identifier":"RemainingStoredElectricity2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1Ah",
+							"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"èé»æ®éï¼",
+							"fields":[
+								
+							],
+							"identifier":"RemainingStoredElectricity3",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":228,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å£åç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"BatteryStateOfHealth",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"èé»æ± ã¿ã¤ã",
+							"fields":[
+								
+							],
+							"identifier":"BatteryType",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":230,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00ï½0xFF=ã¿ã¤ã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å
+
+é»éè¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"ChargingAmountSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":231,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"Wh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¾é»éè¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"DischargingAmountSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":232,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"Wh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å
+
+é»éè¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"ChargingAmountSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":233,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1Ah",
+							"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¾é»éè¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"DischargingAmountSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":234,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1Ah",
+							"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å
+
+é»é»åè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"ChargingElectricEnergySetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":235,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"W",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¾é»é»åè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"DischargingElectricEnergySetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":236,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"W",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å
+
+é»é»æµè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"ChargingCurrentSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":237,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1A",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½6,553.3A)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¾é»é»æµè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"DischargingCurrentSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":238,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1A",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½6,553.3A)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®æ ¼é»å§ï¼ç¬ç«æï¼",
+							"fields":[
+								
+							],
+							"identifier":"RatedVoltageIndependent",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":239,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"V",
+							"valueDescription":"0x0000ï½0x7FFE(0ï½32,766V)"
+						}
+					]
+				},
+				{
+					"classCode":126,
+					"description":"é»æ°èªåè»å
+
+æ¾é»ã·ã¹ãã ",
+					"name":"ELECTRIC_VEHICLE_CHARGER_DISCHARGER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¶ï¼ï¼¨ä½¿ç¨å¯è½å®¹éå¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"DischargeableCapacityOfVehicleMountedBattery1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":192,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"Wh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¶ï¼ï¼¨ä½¿ç¨å¯è½å®¹éå¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"DischargeableCapacityOfVehicleMountedBattery2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":193,
+							"required":[
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1Ah",
+							"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¶ï¼ï¼¨ä½¿ç¨å¯è½æ®å®¹éï¼",
+							"fields":[
+								
+							],
+							"identifier":"RemainingDischargeableCapacityOfVehicleMountedBattery1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":194,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"Wh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¶ï¼ï¼¨ä½¿ç¨å¯è½æ®å®¹éï¼",
+							"fields":[
+								
+							],
+							"identifier":"RemainingDischargeableCapacityOfVehicleMountedBattery2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":195,
+							"required":[
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1Ah",
+							"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¶ï¼ï¼¨ä½¿ç¨å¯è½æ®å®¹éï¼",
+							"fields":[
+								
+							],
+							"identifier":"RemainingDischargeableCapacityOfVehicleMountedBattery3",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":196,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®æ ¼å
+
+é»è½å",
+							"fields":[
+								
+							],
+							"identifier":"RatedChargeCapacity",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":197,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"W",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®æ ¼æ¾é»è½å",
+							"fields":[
+								
+							],
+							"identifier":"RatedDischargeCapacity",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":198,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"W",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"å
+
+æ¾é»å¯å¦ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"VehicleConnectionAndChargeableDischarge",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":199,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=å
+
+é»ä¸å¯ã»æ¾é»ä¸å¯,0x41=å
+
+é»å¯ã»æ¾é»ä¸å¯,0x42=å
+
+é»ä¸å¯ã»æ¾é»å¯,0x043=å
+
+é»å¯ã»æ¾é»å¯"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æå°æå¤§å
+
+é»é»åå¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æå°å
+
+é»é»åå¤",
+									"fields":[
+										
+									],
+									"identifier":"MinimumChargingElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"W",
+									"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"
+								},
+								{
+									"arrayCount":0,
+									"description":"æå¤§å
+
+é»é»åå¤",
+									"fields":[
+										
+									],
+									"identifier":"MaximumChargingElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"W",
+									"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"
+								}
+							],
+							"identifier":"MinimumMaximumChargingElectricEnergy",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":200,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"minimum_maximum_charging_electric_energy_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æå°æå¤§æ¾é»é»åå¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æå°æ¾é»é»åå¤",
+									"fields":[
+										
+									],
+									"identifier":"MinimumDischargingElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"W",
+									"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"
+								},
+								{
+									"arrayCount":0,
+									"description":"æå¤§æ¾é»é»åå¤",
+									"fields":[
+										
+									],
+									"identifier":"MaximumDischargingElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"W",
+									"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"
+								}
+							],
+							"identifier":"MinimumMaximumDischargingElectricEnergy",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":201,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"minimum_maximum_discharging_electric_energy_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æå°æå¤§å
+
+é»é»æµå¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æå°å
+
+é»é»æµå¤",
+									"fields":[
+										
+									],
+									"identifier":"MinimumChargingCurrent",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"
+								},
+								{
+									"arrayCount":0,
+									"description":"æå¤§å
+
+é»é»æµå¤",
+									"fields":[
+										
+									],
+									"identifier":"MaximumChargingCurrent",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"
+								}
+							],
+							"identifier":"MinimumMaximumChargingCurrent",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":202,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"minimum_maximum_charging_current_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æå°æå¤§æ¾é»é»æµå¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æå°æ¾é»é»æµå¤",
+									"fields":[
+										
+									],
+									"identifier":"MinimumDischargingCurrent",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"
+								},
+								{
+									"arrayCount":0,
+									"description":"æå¤§æ¾é»é»æµå¤",
+									"fields":[
+										
+									],
+									"identifier":"MaximumDischargingCurrent",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"
+								}
+							],
+							"identifier":"MinimumMaximumDischargingCurrent",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":203,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"minimum_maximum_discharging_current_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä½¿ç¨å®¹éå¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"UsedCapacityOfVehicleMountedBattery1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":208,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"Wh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä½¿ç¨å®¹éå¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"UsedCapacityOfVehicleMountedBattery2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":209,
+							"required":[
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1Ah",
+							"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®æ ¼é»å§",
+							"fields":[
+								
+							],
+							"identifier":"RatedVoltage",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":210,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"V",
+							"valueDescription":"0x0000ï½0x7FFE(0ï½32,766V)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¬æå
+
+æ¾é»é»åè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredInstantaneousChargingDischargingElectricEnergy",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":211,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"int32_t",
+							"unitDescription":"W",
+							"valueDescription":"0x00000001ï½0x3B9AC9FF=å
+
+é»æï¼ãã©ã¹å¤ï¼(1ï½999,999,999W),0xFFFFFFFFï½0xC4653601=æ¾é»æï¼ãã¤ãã¹å¤ï¼(-1ï½-999,999,999W)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¬æå
+
+æ¾é»é»æµè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredInstantaneousChargingDischargingCurrent",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":212,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"int16_t",
+							"unitDescription":"0.1A",
+							"valueDescription":"0x0001ï½0x7FFE=å
+
+é»æï¼ãã©ã¹å¤ï¼(0.1ï½3,276.6A),0xFFFFï½0x8001=æ¾é»æï¼ãã¤ãã¹å¤ï¼(-0.1ï½-3,276.7A)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¬æå
+
+æ¾é»é»å§è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredInstantaneousChargingDischargingVoltage",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":213,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"int16_t",
+							"unitDescription":"V",
+							"valueDescription":"0x0001ï½0x7FFE=å
+
+é»æï¼ãã©ã¹å¤ï¼(1ï½32,766V),0xFFFFï½0x8001=æ¾é»æï¼ãã¤ãã¹å¤ï¼(-1ï½-32,767V)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®æ¾é»é»åéè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredIntegralDischargingElectricEnergy",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":214,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001kWh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®æ¾é»é»åéãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"IntegralDischargingElectricEnergyResetSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":215,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®å
+
+é»é»åéè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredIntegralChargingElectricEnergy",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":216,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001kWh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®å
+
+é»é»åéãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"IntegralChargingElectricEnergyResetSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":217,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"éè»¢ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OperationModeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":218,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ¥éå
+
+é»,0x42=å
+
+é»,0x43=æ¾é»,0x44=å¾
+æ©,0x45=ãã¹ã,0x40=ãã®ä»"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç³»çµ±é£ç³»ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"SystemInterconnectedType",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":219,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ç³»çµ±é£ç³»ï¼éæ½®æµå¯ï¼,0x01=ç¬ç«,0x02=ç³»çµ±é£ç³»ï¼éæ½®æµä¸å¯ï¼"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é»æ± æ®å®¹éï¼",
+							"fields":[
+								
+							],
+							"identifier":"RemainingStoredElectricityOfVehicleMountedBattery1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"Wh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é»æ± æ®å®¹éï¼",
+							"fields":[
+								
+							],
+							"identifier":"RemainingStoredElectricityOfVehicleMountedBattery2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1Ah",
+							"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é»æ± æ®å®¹éï¼",
+							"fields":[
+								
+							],
+							"identifier":"RemainingStoredElectricityOfVehicleMountedBattery3",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":228,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å£åç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"BatteryStateOfHealth",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å
+
+é»éè¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"ChargingAmountSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":231,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"Wh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¾é»éè¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"DischargingAmountSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":232,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"Wh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å
+
+é»éè¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"ChargingAmountSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":233,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1Ah",
+							"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¾é»éè¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"DischargingAmountSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":234,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1Ah",
+							"valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å
+
+é»é»åè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"ChargingElectricEnergySetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":235,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"W",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¾é»é»åè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"DischargingElectricEnergySetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":236,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"W",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å
+
+é»é»æµè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"ChargingCurrentSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":237,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1A",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½6,553.3A)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¾é»é»æµè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"DischargingCurrentSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":238,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1A",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½6,553.3A)"
+						}
+					]
+				},
+				{
+					"classCode":127,
+					"description":"ã¨ã³ã¸ã³ã³ã¼ã¸ã§ãã¬ã¼ã·ã§ã³",
+					"name":"ENGINE_COGENERATION_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¸©æ°´å¨æ¹¯æ¸©è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredTemperatureOfWaterInWaterHeater",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":193,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x64(0ï½100â)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®æ ¼çºé»é",
+							"fields":[
+								
+							],
+							"identifier":"RatedPowerGenerationOutput",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":194,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65,533W)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è²¯æ¹¯æ§½ç±é",
+							"fields":[
+								
+							],
+							"identifier":"HeatingValueOfHotWaterStorageTank",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":195,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"MJ",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65,533MJ)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¬æçºé»é»åè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredInstantaneousPowerGenerationOutput",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":196,
+							"required":[
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65,533W)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®çºé»é»åéè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCumulativePowerGenerationOutput",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":197,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001kWh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®çºé»é»åéãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"CumulativePowerGenerationOutputResetSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":198,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¬æã¬ã¹æ¶è²»éè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredInstantaneousGasConsumption",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":199,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.001ã¥\/h",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65.533ã¥\/h)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®ã¬ã¹æ¶è²»éè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCumulativeGasConsumption",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":200,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001ã¥",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999ã¥)"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®ã¬ã¹æ¶è²»éãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"CumulativeGasConsumptionResetSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":201,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"çºé»åä½è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"PowerGenerationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":202,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=çºé»åä½,0x42=çºé»åæ­¢"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"çºé»åä½ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"PowerGenerationStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":203,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=çºé»ä¸­,0x42=åæ­¢ä¸­,0x45=ã¢ã¤ãã«ä¸­"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®
+å
+ç¬ææ¶è²»é»åè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredInHouseInstantaneousPowerConsumption",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":204,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65,533W)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®
+å
+ç©ç®æ¶è²»é»åéè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredInHouseCumulativePowerConsumption",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":205,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001kWh",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"å®
+å
+ç©ç®æ¶è²»é»åéãªã»ããè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"InHouseCumulativePowerConsumptionReset",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":206,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ãªã»ãã"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç³»çµ±é£ç³»ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"SystemInterconnectedType",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":208,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=ç³»çµ±é£ç³»ï¼éæ½®æµå¯ï¼,0x01=ç¬ç«,0x02=ç³»çµ±é£ç³»ï¼éæ½®æµä¸å¯ï¼"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ®æ¹¯éè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredRemainingHotWaterAmount",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"ã",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65,533ã)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã¿ã³ã¯å®¹éå¤",
+							"fields":[
+								
+							],
+							"identifier":"TankCapacity",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"ã",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65,533ã)"
+						}
+					]
+				},
+				{
+					"classCode":128,
+					"description":"é»åéã¡ã¼ã¿",
+					"name":"ELECTRIC_ENERGY_METER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®é»åéè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"IntegralElectricEnergyMeasurementValue",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.1kWh|0.01kWh",
+							"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®é»åéåä½",
+							"fields":[
+								
+							],
+							"identifier":"IntegralElectricEnergyUnit",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x01=0.1kWh,0x02=0.01kWh"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":48,
+							"description":"ç©ç®é»åéè¨æ¸¬å¤å±¥æ­´ï¼",
+							"fields":[
+								
+							],
+							"identifier":"IntegralElectricEnergyMeasurementLog1",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.1kWh|0.01kWh",
+							"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+						},
+						{
+							"access":[
+								"NONE"
+							],
+							"arrayCount":2160,
+							"description":"ç©ç®é»åéè¨æ¸¬å¤å±¥æ­´ï¼",
+							"fields":[
+								
+							],
+							"identifier":"IntegralElectricEnergyMeasurementLog2",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.1kWh|0.01kWh",
+							"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+						}
+					]
+				},
+				{
+					"classCode":129,
+					"description":"æ°´æµéã¡ã¼ã¿",
+					"name":"WATER_FLOW_METER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ°´æµåºå",
+							"fields":[
+								
+							],
+							"identifier":"FlowingWaterClassification",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":208,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x30=ä¸æ°´,0x31=ä¸­æ°´,0x32=æ¸©æ°´,0x33=ãã®ä»"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ææè
+åºå",
+							"fields":[
+								
+							],
+							"identifier":"OwnerClassification",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":209,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x30=æå®ãªã,0x31=äºæ¥­ä½,0x32=æ°éä¼ç¤¾,0x33=åäºº"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®æ°´æµéè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCumulativeAmountOfFlowingWater",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"ã¥",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®æ°´æµéè¨æ¸¬å¤åä½",
+							"fields":[
+								
+							],
+							"identifier":"UnitForMeasuredCumulativeAmountsOfFlowingWater",
+							"initialValue":"0x04",
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=1ã¥,0x01=0.1ã¥,0x02=0.01ã¥,0x03=0.001ã¥,0x04=0.0001ã¥,0x05=0.00001ã¥,0x06=0.000001ã¥"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":48,
+							"description":"ç©ç®æ°´æµéè¨æ¸¬å¤å±¥æ­´",
+							"fields":[
+								
+							],
+							"identifier":"HistoricalDataOfMeasuredCumulativeAmountsOfFlowingWater",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001ã¥",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999ã¥)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤éãã¼ã¿ç°å¸¸æ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"DetectionOfAbnormalValueInMeteringData",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ç°å¸¸æ¤ç¥æ,0x42=ç°å¸¸æ¤ç¥ç¡"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã»ã­ã¥ãªãã£ãã¼ã¿æ
+å ±",
+							"fields":[
+								
+							],
+							"identifier":"SecurityDataInformation",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":null,
+							"valueDescription":"0x00000000ï½0xFFFFFFFF"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼©ï¼¤çªå·è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"IdNumberSetting",
+							"initialValue":"'000000'",
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"ASCIIã³ã¼ãã§æå®ã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤å®æºææ
+å ±",
+							"fields":[
+								
+							],
+							"identifier":"VerificationExpirationInformation",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":230,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"ASCIIã³ã¼ãã§æå®ãxxxxå¹´xxæ"
+						}
+					]
+				},
+				{
+					"classCode":130,
+					"description":"ã¬ã¹ã¡ã¼ã¿",
+					"name":"GAS_METER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®ã¬ã¹æ¶è²»éè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"IntegralGasConsumptionMeasurementValue",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001ã¥",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999ã¥)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":48,
+							"description":"ç©ç®ã¬ã¹æ¶è²»éè¨æ¸¬å¤å±¥æ­´",
+							"fields":[
+								
+							],
+							"identifier":"IntegralGasConsumptionMeasurementLog",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001ã¥",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999ã¥)"
+						}
+					]
+				},
+				{
+					"classCode":131,
+					"description":"ï¼¬ï¼°ã¬ã¹ã¡ã¼ã¿",
+					"name":"LP_GAS_METERS_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤éãã¼ã¿ç©ç®ã¬ã¹æ¶è²»éè¨æ¸¬å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"IntegralGasConsumptionOfMeteringData1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.0001ã¥",
+							"valueDescription":"0x00000000ï½0x005F5E0FF(0ï½9,999.9999ã¥)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤éãã¼ã¿ç©ç®ã¬ã¹æ¶è²»éè¨æ¸¬å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"IntegralGasConsumptionOfMeteringData2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001ã¥",
+							"valueDescription":"0x00000000ï½0x005F5E0FF(0ï½99,999.999ã¥)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤éãã¼ã¿ç°å¸¸æ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"ErrorDetectionStatusofMeteringData",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ç°å¸¸æ¤ç¥æ,0x42=ç°å¸¸æ¤ç¥ç¡"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã»ã­ã¥ãªãã£ãã¼ã¿æ
+å ±ï¼",
+							"fields":[
+								
+							],
+							"identifier":"SecurityData1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":null,
+							"valueDescription":"0x00000000ï½0xFFFFFFFF"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã»ã­ã¥ãªãã£ãã¼ã¿æ
+å ±ï¼",
+							"fields":[
+								
+							],
+							"identifier":"SecurityData2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":null,
+							"valueDescription":"0x00000000ï½0xFFFFFFFF"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã»ã³ã¿ã¼å¼é®æ­ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"CenterValveShutOffStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ã»ã³ã¿ã¼å¼é®æ­æã,0x42=ã»ã³ã¿ã¼å¼é®æ­ç¡ã"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã»ã³ã¿ã¼å¼é®æ­å¾©å¸°è¨±å¯ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"CenterValveShutOffRecoveryPermissionSettingStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":230,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ã»ã³ã¿ã¼å¼é®æ­å¾©å¸°è¨±å¯,0x42=ã»ã³ã¿ã¼å¼é®æ­å¾©å¸°éè¨±å¯"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç·æ¥å¼é®æ­ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"EmergencyValveShutOffStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":231,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ç·æ¥å¼é®æ­æã,0x42=ç·æ¥å¼é®æ­ç¡ã"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é®æ­å¼ééç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"ShutOffValveOpenCloseStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":232,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é®æ­å¼éç¶æ
+,0x42=é®æ­å¼éç¶æ
+"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ®éç®¡çè­¦åã¬ãã«",
+							"fields":[
+								
+							],
+							"identifier":"ResidualVolumeControlWarning",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":233,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31=æ®éç®¡çè­¦åã¬ãã«1,0x32=æ®éç®¡çè­¦åã¬ãã«2,0x33=æ®éç®¡çè­¦åã¬ãã«3,0x42=æ®éç®¡çè­¦åç¡ã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":3,
+							"description":"æ®éç®¡çè­¦åã¬ãã«è¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"SetValueOfResidualVolumeControlWarningLevel1",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":234,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ã",
+							"valueDescription":"0x000000ï½0xFFFFFF(0ï½16,777,215)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":3,
+							"description":"æ®éç®¡çè­¦åã¬ãã«è¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"SetValueOfResidualVolumeControlWarningLevel2",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":235,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ã",
+							"valueDescription":"0x000000ï½0xFFFFFF(0ï½16,777,215)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":3,
+							"description":"æ®éç®¡çè­¦åã¬ãã«è¨­å®å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"SetValueOfResidualVolumeControlWarningLevel3",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":236,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ã",
+							"valueDescription":"0x000000ï½0xFFFFFF(0ï½16,777,215)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¾®å°æ¼æ´©ã¿ã¤ãå¤ï¼ã¬ã¹æµéç¶ç¶ï¼",
+							"fields":[
+								
+							],
+							"identifier":"SlightLeakTimerValueGasFlowRateContinuation",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":237,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"æ¥",
+							"valueDescription":"0x00ï½0xFD(0ï½253æ¥)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¾®å°æ¼æ´©ã¿ã¤ãå¤ï¼å§åä¸æç¡ãï¼",
+							"fields":[
+								
+							],
+							"identifier":"SlightLeakTimerValueWithoutPressureIncrease",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":238,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"æ¥",
+							"valueDescription":"0x00ï½0xFD(0ï½253æ¥)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":3,
+							"description":"é®æ­çç±å±¥æ­´æ
+å ±",
+							"fields":[
+								
+							],
+							"identifier":"ShutOffReasonLog",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":239,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0xFF:0xFF:0xFF"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¾çµ¦å§åãã¼ã¿æå¤§å¤",
+							"fields":[
+								
+							],
+							"identifier":"MaximumValueOfSupplyPressureData",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":208,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.01kPa",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½655.33kPa)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¾çµ¦å§åãã¼ã¿æå°å¤",
+							"fields":[
+								
+							],
+							"identifier":"MinimumValueOfSupplyPressureData",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":209,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.01kPa",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½655.33kPa)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¾çµ¦å§åãã¼ã¿ç¾å¨å¤",
+							"fields":[
+								
+							],
+							"identifier":"CurrentValueOfSupplyPressureData",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":210,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.01kPa",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½655.33kPa)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éå¡å§åãã¼ã¿æå¤§å¤",
+							"fields":[
+								
+							],
+							"identifier":"MaximumValueOfBlockPressureData",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":211,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.01kPa",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½655.33kPa)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éå¡å§åãã¼ã¿æå°å¤",
+							"fields":[
+								
+							],
+							"identifier":"MinimumValueOfBlockPressureData",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":212,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.01kPa",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½655.33kPa)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éå¡å§åãã¼ã¿ç¾å¨å¤",
+							"fields":[
+								
+							],
+							"identifier":"CurrentValueOfBlockPressureData",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":213,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.01kPa",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½655.33kPa)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éå¡å§åã»ä¾çµ¦å§åç°å¸¸æ¥åæ°æ
+å ±",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"éå¡å§åç°å¸¸æ¥æ°",
+									"fields":[
+										
+									],
+									"identifier":"NumberOfBlockPressureErrorDays",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x00ï½0xFF(0ï½255æ¥)"
+								},
+								{
+									"arrayCount":0,
+									"description":"ä¾çµ¦å§åç°å¸¸æ¥æ°",
+									"fields":[
+										
+									],
+									"identifier":"NumberOfSupplyPressureErrorDays",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x00ï½0xFF(0ï½255æ¥)"
+								},
+								{
+									"arrayCount":0,
+									"description":"éå¡å§åç°å¸¸åæ°",
+									"fields":[
+										
+									],
+									"identifier":"NumberOfBlockPressureErrorTimes",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x00ï½0xFF(0ï½255å)"
+								},
+								{
+									"arrayCount":0,
+									"description":"ä¾çµ¦å§åç°å¸¸åæ°",
+									"fields":[
+										
+									],
+									"identifier":"NumberOfSupplyPressureErrorTimes",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x00ï½0xFF(0ï½255å)"
+								}
+							],
+							"identifier":"NumberOfBlockPressureSupplyPressureErrorDaysTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":214,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"number_of_block_pressure_supply_pressure_error_days_time_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã¹ãçºå¼è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"TestCallSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":215,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ãã¹ãçºå¼åä½ãã,0x42=ãã¹ãçºå¼åä½ãªã"
+						}
+					]
+				},
+				{
+					"classCode":132,
+					"description":"æè¨",
+					"name":"CLOCK_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":133,
+					"description":"èªåãã¢",
+					"name":"AUTOMATIC_DOOR_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":134,
+					"description":"æ¥­åç¨ã¨ã¬ãã¼ã¿",
+					"name":"COMMERCIAL_ELEVATOR_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":135,
+					"description":"åé»ç¤ã¡ã¼ã¿ãªã³ã°",
+					"name":"DISTRIBUTION_PANEL_METERING_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®é»åéè¨æ¸¬å¤ï¼æ­£æ¹åï¼",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCumulativeAmountOfElectricEnergyNormalDirection",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":192,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"kWh",
+							"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®é»åéè¨æ¸¬å¤ï¼éæ¹åï¼",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCumulativeAmountOfElectricEnergyReverseDirection",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":193,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"kWh",
+							"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®é»åéåä½",
+							"fields":[
+								
+							],
+							"identifier":"UnitForCumulativeAmountsOfElectricEnergy",
+							"initialValue":"0x03",
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":194,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=1kWh,0x01=0.1kWh,0x02=0.01kWh,0x03=0.001kWh,0x04=0.0001kWh,0x0A=10kWh,0x0B=100kWh,0x0C=1000kWh,0x0D=10000kWh"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®é»åéè¨æ¸¬å¤å±¥æ­´ï¼æ­£æ¹åï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"ç©ç®å±¥æ­´åéæ¥",
+									"fields":[
+										
+									],
+									"identifier":"DayForWhichTheHistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"æ¥",
+									"valueDescription":"0x0000ï½0x0063(0ï½99)"
+								},
+								{
+									"arrayCount":48,
+									"description":"ç©ç®é»åé",
+									"fields":[
+										
+									],
+									"identifier":"HistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergy",
+									"initialValue":null,
+									"isArray":true,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								}
+							],
+							"identifier":"HistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergyNormalDirectioHistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergyNormalDirection",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":195,
+							"required":[
+								"NONE"
+							],
+							"size":194,
+							"type":"historical_data_of_measured_cumulative_amounts_of_electric_energy_t",
+							"unitDescription":"kWh",
+							"valueDescription":"0x0000ï½0x0063:0x00000000ï½0x05F5E0FF(0ï½99):(0ï½99,999,999)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®é»åéè¨æ¸¬å¤å±¥æ­´ï¼éæ¹åï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"ç©ç®å±¥æ­´åéæ¥",
+									"fields":[
+										
+									],
+									"identifier":"DayForWhichTheHistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"æ¥",
+									"valueDescription":"0x0000ï½0x0063(0ï½99)"
+								},
+								{
+									"arrayCount":48,
+									"description":"ç©ç®é»åé",
+									"fields":[
+										
+									],
+									"identifier":"HistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergy",
+									"initialValue":null,
+									"isArray":true,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								}
+							],
+							"identifier":"HistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergyReverseDirection",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":196,
+							"required":[
+								"NONE"
+							],
+							"size":194,
+							"type":"historical_data_of_measured_cumulative_amounts_of_electric_energy_t",
+							"unitDescription":"kWh",
+							"valueDescription":"0x0000ï½0x0063:0x00000000ï½0x05F5E0FF(0ï½99):(0ï½99,999,999)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®å±¥æ­´åéæ¥",
+							"fields":[
+								
+							],
+							"identifier":"DayForWhichTheHistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergyIsToBeRetrieved",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":197,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"æ¥",
+							"valueDescription":"0x00=å½æ¥,0x01ï½0x63=åæ¥ã®æ¥æ°(0ï½99)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¬æé»åè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredInstantaneoUsAmountOfElectricEnergy",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":198,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"int32_t",
+							"unitDescription":"W",
+							"valueDescription":"0x80000001ï½0x7FFFFFFD(-2,147,483,647ï½2,147,483,645)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¬æé»æµè¨æ¸¬å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"RPhase",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"TPhase",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasuredInstantaneousCurrents",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":199,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"measured_instantaneous_currents_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¬æé»å§è¨æ¸¬å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"R-S(N)é",
+									"fields":[
+										
+									],
+									"identifier":"BetweenRAndSN",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"0.1V",
+									"valueDescription":"0x0000ï½0xFFFD(0ï½6,553.3)"
+								},
+								{
+									"arrayCount":0,
+									"description":"S(N)-Té",
+									"fields":[
+										
+									],
+									"identifier":"BetweenSNAndT",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"0.1V",
+									"valueDescription":"0x0000ï½0xFFFD(0ï½6,553.3)"
+								}
+							],
+							"identifier":"MeasuredInstantaneousVoltages",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":200,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"measured_instantaneous_voltages_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":208,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":209,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel3",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":210,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel4",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":211,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel5",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":212,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel6",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":213,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel7",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":214,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel8",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":215,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel9",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":216,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel10",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":217,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel11",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":218,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel12",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":219,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel13",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":220,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel14",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":221,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel15",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":222,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel16",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":223,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel17",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel18",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel19",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel20",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel21",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel22",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel23",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":230,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel24",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":231,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel25",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":232,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel26",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":233,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel27",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":234,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel28",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":235,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel29",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":236,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel30",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":237,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel31",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":238,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"é»åé",
+									"fields":[
+										
+									],
+									"identifier":"ElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousRPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å®å¹é»æµå¤Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"EffectiveInstantaneousTPhaseCurrents",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasurementChannel32",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":239,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"measurement_data_t",
+							"unitDescription":null,
+							"valueDescription":""
+						}
+					]
+				},
+				{
+					"classCode":136,
+					"description":"ã¹ãã¼ãé»åéã¡ã¼ã¿",
+					"name":"SMART_ELECTRIC_ENERGY_METER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é»ååºå",
+							"fields":[
+								
+							],
+							"identifier":"ElectricEnergyMeterClassification",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":208,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x30=é»åä¼ç¤¾,0x31=å¤ªé½å
+,0x32=çæé»æ± ,0x33=èé»æ± ,0x34=EV,0x35=ãã®ä»"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ææè
+åºå",
+							"fields":[
+								
+							],
+							"identifier":"OwnerClassification",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":209,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x30=æå®ãªã,0x31=é»åä¼ç¤¾,0x32=é»åä¼ç¤¾ä»¥å¤,0x33=åäºº"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¸ç·å¼è¨­å®ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"ConfigurationInformationOfPhasesAndWiresOfTheSystems",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":210,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x30=åç¸2ç·,0x31=åç¸3ç·,0x32=ä¸ç¸3ç·,0x33=ä¸ç¸4ç·"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"åæå¤ææ¯",
+							"fields":[
+								
+							],
+							"identifier":"CompositeTransformationRatio",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":211,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":null,
+							"valueDescription":"0x00000000ï½0x000F423F(000000ï½999999)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"åæå¤ææ¯ã®åç",
+							"fields":[
+								
+							],
+							"identifier":"MultiplyingFactorForCompositeTransformationRatio",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":212,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=Ã1,0x01=Ã0.1,0x02=Ã0.01,0x03=Ã0.001"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":10,
+							"description":"è¨å¨èªå®çªå·",
+							"fields":[
+								
+							],
+							"identifier":"MeterTypeCertificationNumberTypeApprovalNumberInJapan",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":213,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"(åå¼èªå®è¨å¨çªå·è¨è¼æ¹æ³ã«å¾ã)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":6,
+							"description":"æ¤å®æºäºå¹´æ",
+							"fields":[
+								
+							],
+							"identifier":"VerificationExpirationDate",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":214,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"YYYYMM:YYYY(è¥¿æ¦),MM(æ)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®é»åéæå¹æ¡æ°",
+							"fields":[
+								
+							],
+							"identifier":"NumberOfEffectiveDigitsForCumulativeAmountsOfElectricEnergy",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":215,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"æ¡",
+							"valueDescription":"0x01ï½0x08(1ï½8)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®é»åéè¨æ¸¬å¤ï¼æ­£æ¹åè¨æ¸¬å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCumulativeAmountOfElectricEnergyNormalDirection",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"kWh",
+							"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®é»åéåä½ï¼æ­£æ¹åãéæ¹åè¨æ¸¬å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"UnitForCumulativeAmountsOfElectricEnergyNormalAndReverseDirections",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=1kWh,0x01=0.1kWh,0x02=0.01kWh,0x03=0.001kWh,0x04=0.0001kWh,0x0A=10kWh,0x0B=100kWh,0x0C=1000kWh,0x0D=10000kWh"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®é»åéè¨æ¸¬å¤å±¥æ­´ï¼æ­£æ¹åè¨æ¸¬å¤ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"ç©ç®å±¥æ­´åéæ¥",
+									"fields":[
+										
+									],
+									"identifier":"DayForWhichTheHistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"æ¥",
+									"valueDescription":"0x0000ï½0x0063(0ï½99)"
+								},
+								{
+									"arrayCount":48,
+									"description":"ç©ç®é»åé",
+									"fields":[
+										
+									],
+									"identifier":"HistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergy",
+									"initialValue":null,
+									"isArray":true,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								}
+							],
+							"identifier":"HistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergyNormalDirection",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":194,
+							"type":"historical_data_of_measured_cumulative_amounts_of_electric_energy_t",
+							"unitDescription":"kWh",
+							"valueDescription":"0x0000ï½0x0063:0x00000000ï½0x05F5E0FF(0ï½99):(0ï½99,999,999)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®é»åéè¨æ¸¬å¤ï¼éæ¹åè¨æ¸¬å¤ï¼",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCumulativeAmountOfElectricEnergyReverseDirection",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"kWh",
+							"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®é»åéè¨æ¸¬å¤å±¥æ­´ï¼éæ¹åè¨æ¸¬å¤ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"ç©ç®å±¥æ­´åéæ¥",
+									"fields":[
+										
+									],
+									"identifier":"DayForWhichTheHistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"æ¥",
+									"valueDescription":"0x0000ï½0x0063(0ï½99)"
+								},
+								{
+									"arrayCount":48,
+									"description":"ç©ç®é»åé",
+									"fields":[
+										
+									],
+									"identifier":"HistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergy",
+									"initialValue":null,
+									"isArray":true,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								}
+							],
+							"identifier":"HistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergyReverseDirection",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":194,
+							"type":"historical_data_of_measured_cumulative_amounts_of_electric_energy_t",
+							"unitDescription":"kWh",
+							"valueDescription":"0x0000ï½0x0063:0x00000000ï½0x05F5E0FF(0ï½99):(0ï½99,999,999)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®å±¥æ­´åéæ¥",
+							"fields":[
+								
+							],
+							"identifier":"DayForWhichTheHistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergyIsToBeRetrieved",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=å½æ¥,0x01ï½0x63=åæ¥ã®æ¥æ°(0ï½99)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¬æé»åè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredInstantaneousAmountOfElectricEnergy",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":231,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"int32_t",
+							"unitDescription":"W",
+							"valueDescription":"0x80000001ï½0x7FFFFFFD(-2,147,483,647ï½2,147,483,645)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¬æé»æµè¨æ¸¬å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"Rç¸",
+									"fields":[
+										
+									],
+									"identifier":"RPhase",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								},
+								{
+									"arrayCount":0,
+									"description":"Tç¸",
+									"fields":[
+										
+									],
+									"identifier":"TPhase",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"int16_t",
+									"unitDescription":"0.1A",
+									"valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"
+								}
+							],
+							"identifier":"MeasuredInstantaneousCurrents",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":232,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"measured_instantaneous_currents_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¬æé»å§è¨æ¸¬å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"R-S(N)é",
+									"fields":[
+										
+									],
+									"identifier":"BetweenRAndSN",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"0.1V",
+									"valueDescription":"0x0000ï½0xFFFD(0ï½6,553.3)"
+								},
+								{
+									"arrayCount":0,
+									"description":"S(N)-Té",
+									"fields":[
+										
+									],
+									"identifier":"BetweenSNAndT",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"0.1V",
+									"valueDescription":"0x0000ï½0xFFFD(0ï½6,553.3)"
+								}
+							],
+							"identifier":"MeasuredInstantaneousVoltages",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":233,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"measured_instantaneous_voltages_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®æç©ç®é»åéè¨æ¸¬å¤ï¼æ­£æ¹åè¨æ¸¬å¤ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"è¨æ¸¬å¹´ææ¥",
+									"fields":[
+										{
+											"arrayCount":0,
+											"description":"å¹´",
+											"fields":[
+												
+											],
+											"identifier":"Year",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":2,
+											"type":"uint16_t",
+											"unitDescription":"å¹´",
+											"valueDescription":"0x0001ï½0x270F(1ï½9999)"
+										},
+										{
+											"arrayCount":0,
+											"description":"æ",
+											"fields":[
+												
+											],
+											"identifier":"Mounth",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"æ",
+											"valueDescription":"0x01ï½0x0C(1ï½12)"
+										},
+										{
+											"arrayCount":0,
+											"description":"æ¥",
+											"fields":[
+												
+											],
+											"identifier":"Day",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"æ¥",
+											"valueDescription":"0x01ï½0x1F(1ï½31)"
+										}
+									],
+									"identifier":"DateOfMeasurement",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":false,
+									"size":4,
+									"type":"year_mounth_day_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":0,
+									"description":"è¨æ¸¬æå»",
+									"fields":[
+										{
+											"arrayCount":0,
+											"description":"æ",
+											"fields":[
+												
+											],
+											"identifier":"Hour",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"æ",
+											"valueDescription":"0x00ï½0x17(0ï½23)"
+										},
+										{
+											"arrayCount":0,
+											"description":"å",
+											"fields":[
+												
+											],
+											"identifier":"Minute",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"å",
+											"valueDescription":"0x00ï½0x3B(0ï½59)"
+										},
+										{
+											"arrayCount":0,
+											"description":"ç§",
+											"fields":[
+												
+											],
+											"identifier":"Second",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"ç§",
+											"valueDescription":"0x00ï½0x3B(0ï½59)"
+										}
+									],
+									"identifier":"TimeOfMeasurement",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":false,
+									"size":3,
+									"type":"hour_minute_second_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":0,
+									"description":"ç©ç®é»åé",
+									"fields":[
+										
+									],
+									"identifier":"CumulativeElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								}
+							],
+							"identifier":"CumulativeAmountsOfElectricEnergyMeasuredAtFixedTimeNormalDirection",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":234,
+							"required":[
+								"RULE_GET"
+							],
+							"size":11,
+							"type":"cumulative_amounts_of_electric_energy_measured_at_fixed_time_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®æç©ç®é»åéè¨æ¸¬å¤ï¼éæ¹åè¨æ¸¬å¤ï¼",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"è¨æ¸¬å¹´ææ¥",
+									"fields":[
+										{
+											"arrayCount":0,
+											"description":"å¹´",
+											"fields":[
+												
+											],
+											"identifier":"Year",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":2,
+											"type":"uint16_t",
+											"unitDescription":"å¹´",
+											"valueDescription":"0x0001ï½0x270F(1ï½9999)"
+										},
+										{
+											"arrayCount":0,
+											"description":"æ",
+											"fields":[
+												
+											],
+											"identifier":"Mounth",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"æ",
+											"valueDescription":"0x01ï½0x0C(1ï½12)"
+										},
+										{
+											"arrayCount":0,
+											"description":"æ¥",
+											"fields":[
+												
+											],
+											"identifier":"Day",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"æ¥",
+											"valueDescription":"0x01ï½0x1F(1ï½31)"
+										}
+									],
+									"identifier":"DateOfMeasurement",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":false,
+									"size":4,
+									"type":"year_mounth_day_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":0,
+									"description":"è¨æ¸¬æå»",
+									"fields":[
+										{
+											"arrayCount":0,
+											"description":"æ",
+											"fields":[
+												
+											],
+											"identifier":"Hour",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"æ",
+											"valueDescription":"0x00ï½0x17(0ï½23)"
+										},
+										{
+											"arrayCount":0,
+											"description":"å",
+											"fields":[
+												
+											],
+											"identifier":"Minute",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"å",
+											"valueDescription":"0x00ï½0x3B(0ï½59)"
+										},
+										{
+											"arrayCount":0,
+											"description":"ç§",
+											"fields":[
+												
+											],
+											"identifier":"Second",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"ç§",
+											"valueDescription":"0x00ï½0x3B(0ï½59)"
+										}
+									],
+									"identifier":"TimeOfMeasurement",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":false,
+									"size":3,
+									"type":"hour_minute_second_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":0,
+									"description":"ç©ç®é»åé",
+									"fields":[
+										
+									],
+									"identifier":"CumulativeElectricEnergy",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"kWh",
+									"valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"
+								}
+							],
+							"identifier":"CumulativeAmountsOfElectricEnergyMeasuredAtFixedTimeReverseDirection",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":235,
+							"required":[
+								"NONE"
+							],
+							"size":11,
+							"type":"cumulative_amounts_of_electric_energy_measured_at_fixed_time_t",
+							"unitDescription":null,
+							"valueDescription":""
+						}
+					]
+				},
+				{
+					"classCode":137,
+					"description":"ã¹ãã¼ãã¬ã¹ã¡ã¼ã¿",
+					"name":"SMART_GAS_METER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã¬ã¹åºåè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"GasMeterClassification",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x30=é½å¸ã¬ã¹,0x31=LPã¬ã¹,0x32=å¤©ç¶,0x33=ãã®ä»"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ææè
+åºåè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OwnerClassification",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x30=æå®ãªã,0x31=é½å¸ã¬ã¹,0x32=LPã¬ã¹,0x33=æ°éä¼ç¤¾,0x34=åäºº"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®ã¬ã¹æ¶è²»éè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredCumulativeGasConsumption",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"uint32_t",
+							"unitDescription":"0.001ã¥",
+							"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999ã¥)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®ã¬ã¹æ¶è²»éè¨æ¸¬å¤åä½",
+							"fields":[
+								
+							],
+							"identifier":"UnitForMeasuredCumulativeGasConsumptions",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=1ã¥,0x01=0.1ã¥,0x02=0.01ã¥,0x03=0.001ã¥,0x04=0.0001ã¥,0x05=0.00001ã¥,0x06=0.000001ã¥"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®ã¬ã¹æ¶è²»éå±¥æ­´æ
+å ±",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"ç©ç®å±¥æ­´åéæ¥",
+									"fields":[
+										
+									],
+									"identifier":"DayForWhichTheHistoricalDataOfMeasuredCumulativeGasConsumption",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"æ¥",
+									"valueDescription":"0x0000ï½0x0063(0ï½99)"
+								},
+								{
+									"arrayCount":48,
+									"description":"ç©ç®ã¬ã¹æ¶è²»é",
+									"fields":[
+										
+									],
+									"identifier":"CumulativeGasConsumption",
+									"initialValue":null,
+									"isArray":true,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"0.001ã¥",
+									"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999ã¥)"
+								}
+							],
+							"identifier":"HistoricalDataOfMeasuredCumulativeGasConsumptions",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":194,
+							"type":"historical_data_of_measured_cumulative_gas_consumptions_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç©ç®ã¬ã¹æ¶è²»éå±¥æ­´åéæ¥è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DayForWhichTheHistoricalDataOfMeasuredCumulativeGasConsumptionsIsToBeRetrieved",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00=å½æ¥,0x01ï½0x63=åæ¥ã®æ¥æ°(0ï½99)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¤éãã¼ã¿ç°å¸¸æ¤ç¥ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"DetectionOfAbnormalValueInMeteringData",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":230,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ç°å¸¸æ¤ç¥æ,0x42=ç°å¸¸æ¤ç¥ç¡"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":10,
+							"description":"ã»ã­ã¥ãªãã£ãã¼ã¿æ
+å ±",
+							"fields":[
+								
+							],
+							"identifier":"SecurityDataInformation",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":231,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"è©³ç´°ã¯èª¬æ(9)åç
+§"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã»ã³ã¿ã¼å¼é®æ­ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"ValveClosureByTheCenter",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":232,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ã»ã³ã¿ã¼å¼é®æ­æã,0x42=ã»ã³ã¿ã¼å¼é®æ­ç¡ã"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã»ã³ã¿ã¼å¼é®æ­å¾©å¸°è¨±å¯ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"PermissionFromTheCenterToReopenTheValveClosedByTheCenter",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":233,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ã»ã³ã¿ã¼å¼é®æ­å¾©å¸°è¨±å¯,0x42=ã»ã³ã¿ã¼å¼é®æ­å¾©å¸°éè¨±å¯"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç·æ¥å¼é®æ­ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"EmergencyClosureOfShutoffValve",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":234,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ç·æ¥å¼é®æ­æã,0x42=ç·æ¥å¼é®æ­ç¡ã"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é®æ­å¼ééç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"ShutoffValveStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":235,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é®æ­å¼éç¶æ
+,0x42=é®æ­å¼éç¶æ
+"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":3,
+							"description":"é®æ­çç±å±¥æ­´æ
+å ±",
+							"fields":[
+								
+							],
+							"identifier":"HistoricalDataOfShutoffReasons",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":236,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0xFF:0xFF:0xFF"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":6,
+							"description":"ï¼©ï¼¤çªå·è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"IdNumberSetting",
+							"initialValue":"'000000'",
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":237,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"'000000'ï½'FFFFFF'"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":6,
+							"description":"æ¤å®æºæè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"VerificationExpirationInformation",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":238,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"YYYYMM:YYYY(è¥¿æ¦),MM(æ)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¥æä»ç©ç®ã¬ã¹æ¶è²»éè¨æ¸¬å¤æ
+å ±",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"è¨æ¸¬å¹´ææ¥",
+									"fields":[
+										{
+											"arrayCount":0,
+											"description":"å¹´",
+											"fields":[
+												
+											],
+											"identifier":"Year",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":2,
+											"type":"uint16_t",
+											"unitDescription":"å¹´",
+											"valueDescription":"0x0001ï½0x270F(1ï½9999)"
+										},
+										{
+											"arrayCount":0,
+											"description":"æ",
+											"fields":[
+												
+											],
+											"identifier":"Mounth",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"æ",
+											"valueDescription":"0x01ï½0x0C(1ï½12)"
+										},
+										{
+											"arrayCount":0,
+											"description":"æ¥",
+											"fields":[
+												
+											],
+											"identifier":"Day",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"æ¥",
+											"valueDescription":"0x01ï½0x1F(1ï½31)"
+										}
+									],
+									"identifier":"DateOfMeasurement",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":false,
+									"size":4,
+									"type":"year_mounth_day_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":0,
+									"description":"è¨æ¸¬æå»",
+									"fields":[
+										{
+											"arrayCount":0,
+											"description":"æ",
+											"fields":[
+												
+											],
+											"identifier":"Hour",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"æ",
+											"valueDescription":"0x00ï½0x17(0ï½23)"
+										},
+										{
+											"arrayCount":0,
+											"description":"å",
+											"fields":[
+												
+											],
+											"identifier":"Minute",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"å",
+											"valueDescription":"0x00ï½0x3B(0ï½59)"
+										},
+										{
+											"arrayCount":0,
+											"description":"ç§",
+											"fields":[
+												
+											],
+											"identifier":"Second",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"ç§",
+											"valueDescription":"0x00ï½0x3B(0ï½59)"
+										}
+									],
+									"identifier":"TimeOfMeasurement",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":false,
+									"size":3,
+									"type":"hour_minute_second_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":0,
+									"description":"ç©ç®ã¬ã¹æ¶è²»é",
+									"fields":[
+										
+									],
+									"identifier":"CumulativeGasConsumption",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"0.001ã¥",
+									"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999ã¥)"
+								}
+							],
+							"identifier":"MeasuredCumulativeGasConsumptionInformationWithDateAndTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":208,
+							"required":[
+								"RULE_GET"
+							],
+							"size":11,
+							"type":"measured_cumulative_gas_consumption_information_with_date_and_time_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã¬ã¹æ¶è²»éå±¥æ­´æ
+å ±",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"å±¥æ­´ã¹ã¿ã¼ãå¹´ææ¥",
+									"fields":[
+										{
+											"arrayCount":0,
+											"description":"å¹´",
+											"fields":[
+												
+											],
+											"identifier":"Year",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":2,
+											"type":"uint16_t",
+											"unitDescription":"å¹´",
+											"valueDescription":"0x0001ï½0x270F(1ï½9999)"
+										},
+										{
+											"arrayCount":0,
+											"description":"æ",
+											"fields":[
+												
+											],
+											"identifier":"Mounth",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"æ",
+											"valueDescription":"0x01ï½0x0C(1ï½12)"
+										},
+										{
+											"arrayCount":0,
+											"description":"æ¥",
+											"fields":[
+												
+											],
+											"identifier":"Day",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"æ¥",
+											"valueDescription":"0x01ï½0x1F(1ï½31)"
+										}
+									],
+									"identifier":"Date",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":false,
+									"size":4,
+									"type":"year_mounth_day_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":0,
+									"description":"å±¥æ­´ã¹ã¿ã¼ãæå»",
+									"fields":[
+										{
+											"arrayCount":0,
+											"description":"æ",
+											"fields":[
+												
+											],
+											"identifier":"Hour",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"æ",
+											"valueDescription":"0x00ï½0x17(0ï½23)"
+										},
+										{
+											"arrayCount":0,
+											"description":"å",
+											"fields":[
+												
+											],
+											"identifier":"Minute",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"å",
+											"valueDescription":"0x00ï½0x3B(0ï½59)"
+										},
+										{
+											"arrayCount":0,
+											"description":"ç§",
+											"fields":[
+												
+											],
+											"identifier":"Second",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"ç§",
+											"valueDescription":"0x00ï½0x3B(0ï½59)"
+										}
+									],
+									"identifier":"Time",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":false,
+									"size":3,
+									"type":"hour_minute_second_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":24,
+									"description":"ã¬ã¹æ¶è²»éå±¥æ­´ãã¼ã¿",
+									"fields":[
+										
+									],
+									"identifier":"HistoricalInformationOfGasConsumption",
+									"initialValue":null,
+									"isArray":true,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"0.001ã¥",
+									"valueDescription":"0x00000000ï½0x0001869F(0ï½99.999ã¥)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å±¥æ­´ã¹ã¿ã¼ãæç©ç®ã¬ã¹æ¶è²»é",
+									"fields":[
+										
+									],
+									"identifier":"CumulativeGasConsumptionAtHistoryStart",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":"0.001ã¥",
+									"valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999ã¥)"
+								},
+								{
+									"arrayCount":0,
+									"description":"ç©ç®æééé",
+									"fields":[
+										
+									],
+									"identifier":"CumulativeTimeInterval",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"å",
+									"valueDescription":"0x0001ï½0xFFFF(1ï½65535)"
+								}
+							],
+							"identifier":"HistoricalInformationOfCumulativeGasConsumption",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":209,
+							"required":[
+								"NONE"
+							],
+							"size":109,
+							"type":"historical_information_of_cumulative_gas_consumption_t",
+							"unitDescription":null,
+							"valueDescription":""
+						}
+					]
+				},
+				{
+					"classCode":144,
+					"description":"ä¸è¬ç
+§æ",
+					"name":"GENERAL_LIGHTING_CLASS_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç
+§åº¦ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"IlluminanceLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å
+è²è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"LightColorSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é»çè²,0x42=ç½è²,0x43=æ¼ç½è²,0x44=æ¼å
+è²,0x40=ãã®ä»"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç
+§åº¦ã¬ãã«æ®µæ°è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"IlluminanceLevelStepSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":178,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x01ï½è¨­å®å¯è½ç
+§åº¦ã¬ãã«æå¤§å¤(æï½æ)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å
+è²ã¬ãã«æ®µæ°è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"LightColorStepSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":179,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x01ï½è¨­å®å¯è½å
+è²ã¬ãã«æå¤§å¤(é»çè²ï½ç½è²)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨­å®å¯è½ã¬ãã«æå¤§å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"ç
+§åº¦",
+									"fields":[
+										
+									],
+									"identifier":"Illuminance",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=æ©è½ãæ­è¼ãã¦ããªã"
+								},
+								{
+									"arrayCount":0,
+									"description":"å
+è²",
+									"fields":[
+										
+									],
+									"identifier":"LightColor",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=æ©è½ãæ­è¼ãã¦ããªã"
+								}
+							],
+							"identifier":"MaximumSpecifiableValues",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":180,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"maximum_specifiable_values_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¸¸å¤ç¯è¨­å®å¯è½ã¬ãã«æå¤§å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"ç
+§åº¦",
+									"fields":[
+										
+									],
+									"identifier":"Illuminance",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=æ©è½ãæ­è¼ãã¦ããªã"
+								},
+								{
+									"arrayCount":0,
+									"description":"å
+è²",
+									"fields":[
+										
+									],
+									"identifier":"LightColor",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=æ©è½ãæ­è¼ãã¦ããªã"
+								}
+							],
+							"identifier":"MaximumValueOfSettableLevelForNightLighting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":181,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"maximum_specifiable_values_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç¹ç¯ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"LightingModeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":182,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=èªå,0x42=éå¸¸ç¯,0x43=å¸¸å¤ç¯,0x45=ã«ã©ã¼ç¯"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éå¸¸ç¯ã¢ã¼ãæç
+§åº¦ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"IlluminanceLevelSettingForMainLighting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":183,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éå¸¸ç¯ã¢ã¼ãæç
+§åº¦ã¬ãã«æ®µæ°è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"IlluminanceLevelStepSettingForMainLighting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":184,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x01ï½è¨­å®å¯è½ç
+§åº¦ã¬ãã«æå¤§å¤(æï½æ)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¸¸å¤ç¯ã¢ã¼ãæç
+§åº¦ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"IlluminanceLevelSettingForNightLighting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":185,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ï¼
+",
+							"valueDescription":"0x00ï½0x64(0ï½100%)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¸¸å¤ç¯ã¢ã¼ãæç
+§åº¦ã¬ãã«æ®µæ°è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"IlluminanceLevelStepSettingForNightLighting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":186,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x01ï½è¨­å®å¯è½ç
+§åº¦ã¬ãã«æå¤§å¤(æï½æ)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éå¸¸ç¯ã¢ã¼ãæå
+è²è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"LightColorSettingForMainLighting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":187,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é»çè²,0x42=ç½è²,0x43=æ¼ç½è²,0x44=æ¼å
+è²,0x40=ãã®ä»"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éå¸¸ç¯ã¢ã¼ãæå
+è²ã¬ãã«æ®µæ°è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"LightColorLevelStepSettingForMainLighting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":188,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x01ï½è¨­å®å¯è½å
+è²ã¬ãã«æå¤§å¤(é»çè²ï½ç½è²)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¸¸å¤ç¯ã¢ã¼ãæå
+è²è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"LightColorSettingForNightLighting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":189,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é»çè²,0x42=ç½è²,0x43=æ¼ç½è²,0x44=æ¼å
+è²,0x40=ãã®ä»"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å¸¸å¤ç¯ã¢ã¼ãæå
+è²ã¬ãã«æ®µæ°è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"LightColorLevelStepSettingForNightLighting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":190,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x01ï½è¨­å®å¯è½å
+è²ã¬ãã«æå¤§å¤(é»çè²ï½ç½è²)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"èªåã¢ã¼ãæç¹ç¯ã¢ã¼ãç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"LightingModeStatusInAutoMode",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":191,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x42=éå¸¸ç¯,0x43=å¸¸å¤ç¯,0x44=æ¶ç¯,0x45=ã«ã©ã¼ç¯"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã«ã©ã¼ç¯ã¢ã¼ãæï¼²ï¼§ï¼¢è¨­å®",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"ï¼²",
+									"fields":[
+										
+									],
+									"identifier":"ï¼²",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x00ï½0xFF(æä½è¼åº¦ï½æé«è¼åº¦)"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼§",
+									"fields":[
+										
+									],
+									"identifier":"ï¼§",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x00ï½0xFF(æä½è¼åº¦ï½æé«è¼åº¦)"
+								},
+								{
+									"arrayCount":0,
+									"description":"ï¼¢",
+									"fields":[
+										
+									],
+									"identifier":"ï¼¢",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x00ï½0xFF(æä½è¼åº¦ï½æé«è¼åº¦)"
+								}
+							],
+							"identifier":"RGBSettingForColorLighting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":192,
+							"required":[
+								"NONE"
+							],
+							"size":3,
+							"type":"rgbsetting_for_color_lighting_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OnTimerReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":144,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OnTimerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":145,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OffTimerReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":148,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OffTimerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":149,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						}
+					]
+				},
+				{
+					"classCode":153,
+					"description":"éå¸¸ç
+§æ",
+					"name":"EMERGENCY_LIGHTING_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":157,
+					"description":"è¨­åç
+§æ",
+					"name":"EQUIPMENT_LIGHT_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":160,
+					"description":"ãã¶ã¼",
+					"name":"BUZZER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é³çºçè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"SoundGenerationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é³çºçæ,0x42=é³çºçç¡"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã¶ã¼é³ç¨®å¥è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"BuzzerSoundType",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x38"
+						}
+					]
+				}
+			]
+		},
+		{
+			"classGroupCode":3,
+			"description":"èª¿çã»å®¶äºé¢é£æ©å¨",
+			"define":"X1_HOUSEWORK",
+			"classList":[
+				{
+					"classCode":176,
+					"description":"ã³ã¼ãã¼ã¡ã¼ã«",
+					"name":"COFFEE_MACHINE_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":177,
+					"description":"ã³ã¼ãã¼ãã«",
+					"name":"COFFEE_MILL_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":178,
+					"description":"é»æ°ããã",
+					"name":"ELECTRIC_HOT_WATER_POT_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"èééç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"CoverOpenCloseStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=èé,0x42=èé"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"æ¹¯åãè­¦åç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"NoWaterWarning",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ¹¯åãæã,0x40=æ¹¯åããªã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ²¸é¨°è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"BoilUpSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":178,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ²¸é¨°éå§,0x42=æ²¸é¨°åæ­¢\/ä¿æ¸©"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ²¸é¨°ï¼ä¿æ¸©ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"BoilUpWarmerModeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ã¯ã¨ã³é
+¸æ´æµ,0x42=éå¸¸ä¿æ¸©,0x43=çã¨ãä¿æ¸©"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¿æ¸©æ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"SetValueOfWarmerTemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x64(0ï½100)"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"åºæ¹¯ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"HotWaterDischargeStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=åºæ¹¯æ,0x42=åºæ¹¯ç¡"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã­ãã¯ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"LockStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ã­ãã¯æ,0x42=ã­ãã¯ç¡"
+						}
+					]
+				},
+				{
+					"classCode":179,
+					"description":"é»æ°ããã",
+					"name":"ELECTRIC_STOVE_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":180,
+					"description":"ãã¼ã¹ã¿",
+					"name":"TOASTER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":181,
+					"description":"ã¸ã¥ã¼ãµã»ãã­ãµ",
+					"name":"JUICER_FOOD_MIXER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":182,
+					"description":"ãã¼ããã­ã»ããµ",
+					"name":"FOOD_PROCESSOR_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":183,
+					"description":"å·åå·èµåº«",
+					"name":"REFRIGERATOR_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã¢ééç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"DoorOpenCloseStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ãã¢é,0x42=ãã¢é"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã¢éæ¾è­¦åç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"DoorOpenWarning",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ãã¢éæ¾è­¦åæ,0x42=ãã¢éæ¾è­¦åç¡"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å·èµå®¤ãã¢ééç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"RefrigeratorCompartmentDoorStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":178,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ãã¢é,0x42=ãã¢é"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å·åå®¤ãã¢ééç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"FreezerCompartmentDoorStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":179,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ãã¢é,0x42=ãã¢é"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ°·æ¸©å®¤ãã¢ééç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"IceCompartmentDoorStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":180,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ãã¢é,0x42=ãã¢é"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éèå®¤ãã¢ééç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"VegetableCompartmentDoorStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":181,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ãã¢é,0x42=ãã¢é"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"åæå®¤ãã¢ééç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"MultiRefrigeratingModeCompartmentDoor",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":182,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ãã¢é,0x42=ãã¢é"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¨­å®å¯è½æ¸©åº¦ã¬ãã«æå¤§å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"å·èµå®¤",
+									"fields":[
+										
+									],
+									"identifier":"RefrigeratorCompartment",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=å®¤ãæ­è¼ãã¦ããªã"
+								},
+								{
+									"arrayCount":0,
+									"description":"å·åå®¤",
+									"fields":[
+										
+									],
+									"identifier":"FreezerCompartment",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=å®¤ãæ­è¼ãã¦ããªã"
+								},
+								{
+									"arrayCount":0,
+									"description":"æ°·æ¸©å®¤",
+									"fields":[
+										
+									],
+									"identifier":"SubzeroFreshCompartment",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=å®¤ãæ­è¼ãã¦ããªã"
+								},
+								{
+									"arrayCount":0,
+									"description":"éèå®¤",
+									"fields":[
+										
+									],
+									"identifier":"VegetableCompartment",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=å®¤ãæ­è¼ãã¦ããªã"
+								},
+								{
+									"arrayCount":0,
+									"description":"åæå®¤",
+									"fields":[
+										
+									],
+									"identifier":"MultiRefrigeratingModeCompartment",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=å®¤ãæ­è¼ãã¦ããªã"
+								},
+								{
+									"arrayCount":0,
+									"description":"for future reserved 1",
+									"fields":[
+										
+									],
+									"identifier":"Reserved6",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=å®¤ãæ­è¼ãã¦ããªã"
+								},
+								{
+									"arrayCount":0,
+									"description":"for future reserved 2",
+									"fields":[
+										
+									],
+									"identifier":"Reserved7",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=å®¤ãæ­è¼ãã¦ããªã"
+								},
+								{
+									"arrayCount":0,
+									"description":"for future reserved 3",
+									"fields":[
+										
+									],
+									"identifier":"Reserved8",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=å®¤ãæ­è¼ãã¦ããªã"
+								}
+							],
+							"identifier":"MaximumAllowableTemperatureSettingLevel",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":8,
+							"type":"maximum_allowable_temperature_setting_level_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å·èµå®¤æ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"RefrigeratorCompartmentTemperatureSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x81ï½0x7E(-127ï½126â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å·åå®¤æ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"FreezerCompartmentTemperatureSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x81ï½0x7E(-127ï½126â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ°·æ¸©å®¤æ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"IceTemperatureSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x81ï½0x7E(-127ï½126â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éèå®¤æ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"VegetableCompartmentTemperatureSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x81ï½0x7E(-127ï½126â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"åæå®¤æ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"MultiRefrigeratingModeCompartmentTemperatureSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":230,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x81ï½0x7E(-127ï½126â)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å·èµå®¤æ¸©åº¦ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"RefrigeratorCompartmentTemperatureLevelSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":233,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x01ï½è¨­å®å¯è½æ¸©åº¦ã¬ãã«æå¤§å¤(å¼±ï½å¼·)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å·åå®¤æ¸©åº¦ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"FreezerCompartmentTemperatureLevelSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":234,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x01ï½è¨­å®å¯è½æ¸©åº¦ã¬ãã«æå¤§å¤(å¼±ï½å¼·)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ°·æ¸©å®¤æ¸©åº¦ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"IceCompartmentTemperatureLevelSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":235,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x01ï½è¨­å®å¯è½æ¸©åº¦ã¬ãã«æå¤§å¤(å¼±ï½å¼·)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éèå®¤æ¸©åº¦ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"VegetableCompartmentTemperatureLevelSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":236,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x01ï½è¨­å®å¯è½æ¸©åº¦ã¬ãã«æå¤§å¤(å¼±ï½å¼·)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"åæå®¤æ¸©åº¦ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"MultiRefrigeratingModeCompartmentTemperatureLevelSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":237,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x01ï½è¨­å®å¯è½æ¸©åº¦ã¬ãã«æå¤§å¤(å¼±ï½å¼·)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å·èµå®¤æ¸©åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredRefrigeratorCompartmentTemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":209,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x81ï½0x7E(-127ï½126â)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å·åå®¤æ¸©åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredFreezerCompartmentTemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":210,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x81ï½0x7E(-127ï½126â)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ°·æ¸©å®¤æ¸©åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredSubzeroFreshCompartmentTemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":211,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x81ï½0x7E(-127ï½126â)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éèå®¤æ¸©åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredVegetableCompartmentTemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":212,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x81ï½0x7E(-127ï½126â)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"åæå®¤æ¸©åº¦è¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredMultiRefrigeratingModeCompartmentTemperature",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":213,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"int8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x81ï½0x7E(-127ï½126â)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å§ç¸®æ©åè»¢æ°ã¬ãã«",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æå¤§åè»¢æ°ã¬ãã«",
+									"fields":[
+										
+									],
+									"identifier":"MaximumRotationSpeedLevel",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x01ï½0xFF(1ï½255)"
+								},
+								{
+									"arrayCount":0,
+									"description":"åè»¢æ°ã¬ãã«",
+									"fields":[
+										
+									],
+									"identifier":"RotationSpeedLevel",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x00=åæ­¢,0x01ï½0xFF(å¼±ï½å¼·)"
+								}
+							],
+							"identifier":"CompressorRotationSpeed",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":216,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"compressor_rotation_speed_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¶è²»é»æµè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredElectricCurrentConsumption",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":218,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1A",
+							"valueDescription":"0x81ï½0x7E(-127ï½126â)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å®æ ¼æ¶è²»é»åå¤",
+							"fields":[
+								
+							],
+							"identifier":"RatedPowerConsumption",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":220,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¥éå·ååä½è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"QuickFreezeFunctionSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":160,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=éå¸¸å·å,0x42=æ¥éå·å,0x43=æ¥éå·åå¾
+æ©"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ¥éå·èµåä½è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"QuickRefrigerationFunctionSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":161,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=éå¸¸å·èµ,0x42=æ¥éå·èµ,0x43=æ¥éå·èµå¾
+æ©"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è£½æ°·è¨±å¯è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"IcemakerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":164,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=è£½æ°·è¨±å¯,0x42=è£½æ°·ç¦æ­¢,0x43=è£½æ°·ä¸å®æéç¦æ­¢"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è£½æ°·åä½ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"IcemakerOperationStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":165,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=éè»¢ä¸­,0x42=åæ­¢ä¸­"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è£½æ°·ç¨çµ¦æ°´ã¿ã³ã¯ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"IcemakerTankStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":166,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ã¿ã³ã¯æ°´ãã,0x42=ã¿ã³ã¯ãªãoræ°´ãªã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å·èµå®¤å æ¹¿åä½è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"RefrigeratorCompartmentHumidificationFunctionSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":168,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å æ¹¿ON,0x42=å æ¹¿OFF"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éèå®¤å æ¹¿åä½è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"VegetableCompartmentHumidificationFunctionSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":169,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å æ¹¿ON,0x42=å æ¹¿OFF"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è±è­åä½è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DeodorizationFunctionSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":173,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=è±è­ON,0x42=è±è­OFF"
+						}
+					]
+				},
+				{
+					"classCode":184,
+					"description":"ãªã¼ãã³ã¬ã³ã¸",
+					"name":"COMBINATION_MICROWAVE_OVEN_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã¢ééç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"DoorOpenCloseStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ãã¢é,0x42=ãã¢é"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å ç±ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"HeatingStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=åæç¶æ
+,0x41=éè»¢ä¸­,0x42=ä¸æåæ­¢ä¸­,0x43=å®äºå ±ç¥ä¸­,0x44=è¨­å®ä¸­,0x45=äºç±ä¸­,0x46=äºç±å®äºä¿æ¸©ä¸­,0x47=å ç±éä¸­å ±ç¥ä¸æåæ­¢ä¸­"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å ç±è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"HeatingSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":178,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å ç±éå§ã»åé,0x42=å ç±ä¸æåæ­¢,0x43=å ç±åæ­¢"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å ç±ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"HeatingModeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=é»å­ã¬ã³ã¸å ç±,0x42=è§£å,0x43=ãªã¼ãã³,0x44=ã°ãªã«,0x45=ãã¼ã¹ã,0x46=çºé
+µ,0x47=ç
+®è¾¼ã¿,0x48=ã¹ãã¼ã å ç±,0x51=é»å­ã¬ã³ã¸2æ®µå ç±,0xFF=æªè¨­å®"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"èªåå ç±è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AutomaticHeatingSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=èªå,0x42=ããã¥ã¢ã«,0xFF=æªè¨­å®"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"èªåå ç±ã¬ãã«è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AutomaticHeatingLevelSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x31ï½0x35(å¼±ï½å¼·),0xFF=æªè¨­å®"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"èªåã¡ãã¥ã¼ã³ã¼ã¹è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AutomaticHeatingMenuSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":208,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00ï½0xFE=èªåã¡ãã¥ã¼ã³ã¼ã¹ã³ã¼ããã­ããã£ã®è©³ç´°èª¬æã«ãå®ç¾©ãããã³ã¼ããç¤ºãã,0xFF=æªè¨­å®"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãªã¼ãã³ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OvenModeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":209,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=èªåé¸æã¢ã¼ã,0x41=å¯¾æµãªã¼ãã³ã¢ã¼ã,0x42=ç±é¢¨ãªã¼ãã³ã¢ã¼ã,0x43=è¤åãªã¼ãã³ã¢ã¼ã,0xFF=æªè¨­å®"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãªã¼ãã³äºç±è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OvenPreheatingSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":213,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç±ãã,0x42=äºç±ãªã,0xFF=æªè¨­å®"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"çºé
+µã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"FermentingModeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":214,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=èªåé¸æã¢ã¼ã,0x41=å¯¾æµçºé
+µã¢ã¼ã,0x42=ç±é¢¨çºé
+µã¢ã¼ã,0x43=è¤åçºé
+µã¢ã¼ã,0x51=é»å­ã¬ã³ã¸çºé
+µã¢ã¼ã,0xFF=æªè¨­å®"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"åº«å
+æ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"ChamberTemperatureSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"int16_t",
+							"unitDescription":"â",
+							"valueDescription":"0xF554ï½0x7FFE(-273.2ï½3276.6â),0x8001=èªåè¨­å®,0x8002=æªè¨­å®"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä»ä¸ããæ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"FoodTemperatureSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"int16_t",
+							"unitDescription":"â",
+							"valueDescription":"0xF554ï½0x7FFE(-273.2ï½3276.6â),0x8002=æªè¨­å®"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å ç±æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								},
+								{
+									"arrayCount":0,
+									"description":"ç§",
+									"fields":[
+										
+									],
+									"identifier":"Second",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"ç§",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"HeatingTimeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":3,
+							"type":"hour_minute_second_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å ç±æ®æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								},
+								{
+									"arrayCount":0,
+									"description":"ç§",
+									"fields":[
+										
+									],
+									"identifier":"Second",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"ç§",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"RemainingHeatingTimeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":230,
+							"required":[
+								"NONE"
+							],
+							"size":3,
+							"type":"hour_minute_second_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é»å­ã¬ã³ã¸å ç±åºåè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"MicrowaveHeatingPowerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":231,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":4,
+							"description":"éä¸­å ±ç¥ãã¿ã¼ã³è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"PromptMessageSetting",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":false,
+							"propertyCode":232,
+							"required":[
+								"NONE"
+							],
+							"size":0,
+							"type":"prompt_message_setting_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä»å±åè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AccessoriesToCombinationMicrowaveOvenSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":233,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":null,
+							"valueDescription":"ä½¿ç¨ããä»å±åã®çµã¿åããã2ãã¤ãã®ããããããã§ç¤ºããä½¿ç¨ããä»å±åã«å¯¾å¿ããããããã¿ã¼ã³ã1ã¨ããããã­ããã£ã®è©³ç´°èª¬æã«åä»å±åã«å¯¾å¿ãããããããããã¿ã¼ã³ãç¤ºãã"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":20,
+							"description":"è¡¨ç¤ºæå­åè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DisplayCharacterStringSetting",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":234,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":null,
+							"valueDescription":"ShiftJISã³ã¼ãÃ20"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é»å­ã¬ã³ã¸ï¼æ®µå ç±æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"1æ®µç®ã®å ç±æé",
+									"fields":[
+										{
+											"arrayCount":0,
+											"description":"æ",
+											"fields":[
+												
+											],
+											"identifier":"Hour",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"æ",
+											"valueDescription":"0x00ï½0x17(0ï½23)"
+										},
+										{
+											"arrayCount":0,
+											"description":"å",
+											"fields":[
+												
+											],
+											"identifier":"Minute",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"å",
+											"valueDescription":"0x00ï½0x3B(0ï½59)"
+										},
+										{
+											"arrayCount":0,
+											"description":"ç§",
+											"fields":[
+												
+											],
+											"identifier":"Second",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"ç§",
+											"valueDescription":"0x00ï½0x3B(0ï½59)"
+										}
+									],
+									"identifier":"DurationOfFirstMicrowaveHeatingCycle",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":false,
+									"size":3,
+									"type":"hour_minute_second_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":0,
+									"description":"2æ®µç®ã®å ç±æé",
+									"fields":[
+										{
+											"arrayCount":0,
+											"description":"æ",
+											"fields":[
+												
+											],
+											"identifier":"Hour",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"æ",
+											"valueDescription":"0x00ï½0x17(0ï½23)"
+										},
+										{
+											"arrayCount":0,
+											"description":"å",
+											"fields":[
+												
+											],
+											"identifier":"Minute",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"å",
+											"valueDescription":"0x00ï½0x3B(0ï½59)"
+										},
+										{
+											"arrayCount":0,
+											"description":"ç§",
+											"fields":[
+												
+											],
+											"identifier":"Second",
+											"initialValue":null,
+											"isArray":false,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":"ç§",
+											"valueDescription":"0x00ï½0x3B(0ï½59)"
+										}
+									],
+									"identifier":"DurationOfSecondMicrowaveHeatingCycle",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":false,
+									"size":3,
+									"type":"hour_minute_second_t",
+									"unitDescription":null,
+									"valueDescription":""
+								}
+							],
+							"identifier":"TwoStageMicrowaveHeatingSettingDuration",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":235,
+							"required":[
+								"NONE"
+							],
+							"size":6,
+							"type":"two_stage_microwave_heating_setting_duration_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é»å­ã¬ã³ã¸ï¼æ®µå ç±åºåè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"1æ®µç®ã®å ç±åºå",
+									"fields":[
+										
+									],
+									"identifier":"HeatingPowerForFirstMicrowaveHeatingCycle",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"W",
+									"valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"
+								},
+								{
+									"arrayCount":0,
+									"description":"2æ®µç®ã®å ç±åºå",
+									"fields":[
+										
+									],
+									"identifier":"HeatingPowerForSecondMicrowaveHeatingCycle",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":2,
+									"type":"uint16_t",
+									"unitDescription":"W",
+									"valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"
+								}
+							],
+							"identifier":"TwoStageMicrowaveHeatingSettingHeatingPower",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":236,
+							"required":[
+								"NONE"
+							],
+							"size":4,
+							"type":"two_stage_microwave_heating_setting_heating_power_t",
+							"unitDescription":null,
+							"valueDescription":""
+						}
+					]
+				},
+				{
+					"classCode":185,
+					"description":"ã¯ãã­ã³ã°ãã¼ã¿",
+					"name":"COOKING_HEATER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":4,
+							"description":"å ç±ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"HeatingStatus",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=å¾
+æ©ä¸­,0x41=éè»¢ä¸­,0x42=ä¸æåæ­¢ä¸­,0x50=å ç±ç¦æ­¢ç¶æ
+,0xFF=ä¸æ"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":4,
+							"description":"å ç±è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"HeatingSetting",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":178,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=å ç±åæ­¢,0x41=å ç±éå§ã»åé,0x42=å ç±ä¸æåæ­¢,0xFF=è¨­å®ãªã"
+						},
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"ä¸æ¬åæ­¢è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"AllStopSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":179,
+							"required":[
+								"RULE_SET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=ä¸æ¬å ç±åæ­¢"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":4,
+							"description":"å ç±åºåè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"HeatingPowerSetting",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":231,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"W|æ®µé|ï¼",
+							"valueDescription":"0x0000ï½0x2710=åºåè¨­å®å½¢å¼(0ï½10000W),0x3000ï½0x3010=ã¬ãã«è¨­å®å½¢å¼ï¼17æ®µéï¼,0x4002=ã¨ãç«,0x4004=å¼±ç«,0x4006=ä¸­ç«,0x4008=å¼·ç«,0x400A=ãã¤ãã¯ã¼,0xFFFF=æªè¨­å®"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":3,
+							"description":"å ç±æ¸©åº¦è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"HeatingTemperatureSetting",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x32ï½0xFA=è¨­å®æ¸©åº¦(50ï½250â),0xFF=è¨­å®ãªã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":3,
+							"description":"ã³ã³ã­å ç±ã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"HeatingModesOfStovesSetting",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=å ç±åºåå¶å¾¡ã¢ã¼ã,0x42=å¤©ã·ãï¼æãç©ï¼,0x43=æ¹¯æ²¸ã,0x44=çé£¯,0x45=çãç©,0xFF=è¨­å®ãªã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":3,
+							"description":"åã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"RelativeTimeSettingsOfOffTimers",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":false,
+							"propertyCode":150,
+							"required":[
+								"NONE"
+							],
+							"size":0,
+							"type":"hour_minute_second_t",
+							"unitDescription":null,
+							"valueDescription":"0xFFFFFF=è¨­å®ãªã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãã£ã¤ã«ãã­ãã¯è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"ChildLockSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":161,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=ãã£ã¤ã«ãã­ãã¯OFF,0x41=ãã£ã¤ã«ãã­ãã¯ON"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã©ã¸ã¨ã³ããã¼ã¿ã­ãã¯è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"RadiantHeaterLockSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":162,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=ã©ã¸ã¨ã³ããã¼ã¿ã­ãã¯OFF,0x41=ã©ã¸ã¨ã³ããã¼ã¿ã­ãã¯ON"
+						}
+					]
+				},
+				{
+					"classCode":186,
+					"description":"ãªã¼ãã³",
+					"name":"OVEN_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":187,
+					"description":"çé£¯å¨",
+					"name":"RICE_COOKER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"èééç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"CoverOpenCloseStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=èé,0x42=èé"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"çé£¯ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"RiceCookingStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=åæ­¢,0x42=äºç±,0x43=çé£¯,0x44=è¸ãã,0x45=çé£¯å®äº"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"çé£¯å¶å¾¡è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"RiceCookingControlSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":178,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=çé£¯éå§ã»çé£¯åé,0x42=çé£¯ä¸æåæ­¢"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¿æ¸©è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"WarmerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ä¿æ¸©æ,0x42=ä¿æ¸©ç¡"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"å
+ãªã¹åãå¤ãç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"InnerPotRemovalStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=åãå¤ãæ,0x42=åãå¤ãç¡"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"èåãå¤ãç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"CoverRemovalStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":230,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=åãå¤ãæ,0x42=åãå¤ãç¡"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"çé£¯äºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"RiceCookingReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":144,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç´æ,0x42=äºç´ç¡"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"çé£¯äºç´è¨­å®æå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"SetValueOfRiceCookingReservationSettingTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":145,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"çé£¯äºç´è¨­å®ç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"SetValueOfRiceCookingReservationSettingRelativeTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":146,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						}
+					]
+				},
+				{
+					"classCode":188,
+					"description":"é»å­ã¸ã£ã¼",
+					"name":"ELECTRONIC_JAR_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":189,
+					"description":"é£å¨æ´ãæ©",
+					"name":"DISH_WASHER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":190,
+					"description":"é£å¨ä¹¾ç¥æ©",
+					"name":"DISH_DRYER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":191,
+					"description":"é»æ°ãã¡ã¤ãæ©",
+					"name":"ELECTRIC_RICE_CARD_COOKER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":192,
+					"description":"ä¿æ¸©æ©",
+					"name":"KEEP_WARM_MACHINE_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":193,
+					"description":"ç²¾ç±³æ©",
+					"name":"RICE_MILL_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":194,
+					"description":"èªåè£½ãã³æ©",
+					"name":"AUTOMATIC_BREAD_COOKER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":195,
+					"description":"ã¹ã­ã¼ã¯ãã«ã¼",
+					"name":"SLOW_COOKER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":196,
+					"description":"é»æ°æ¼¬ç©æ©",
+					"name":"ELECTRIC_PICKLES_COOKER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":197,
+					"description":"æ´æ¿¯æ©",
+					"name":"WASHING_MACHINE_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æã»èééç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"DoorCoverOpenCloseStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æã»èé,0x42=æã»èé"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ´æ¿¯è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"WashingMachineSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":178,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ´æ¿¯éå§ã»åé,0x42=æ´æ¿¯ä¸æåæ­¢,0x43=æ´æ¿¯åæ­¢"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ´æ¿¯é·ç§»ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"CurrentStageOfWashingCycle",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ´ã,0x42=ããã,0x43=è±æ°´,0x44=ä¸æåæ­¢,0x45=æ´æ¿¯å®äºã»åæ­¢"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ´æ¿¯æ®ãæé",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								},
+								{
+									"arrayCount":0,
+									"description":"ç§",
+									"fields":[
+										
+									],
+									"identifier":"Second",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"ç§",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"TimeRemainingToCompleteWashingCycle",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":230,
+							"required":[
+								"NONE"
+							],
+							"size":3,
+							"type":"hour_minute_second_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OnTimerReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":144,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OnTimerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":145,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"RelativeTimeBasedOnTimerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":146,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						}
+					]
+				},
+				{
+					"classCode":198,
+					"description":"è¡£é¡ä¹¾ç¥æ©",
+					"name":"CLOTHES_DRYER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æã»èééç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"DoorCoverOpenCloseStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æã»èé,0x42=æã»èé"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¹¾ç¥è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DryingSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":178,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ä¹¾ç¥éå§ã»åé,0x42=ä¹¾ç¥ä¸æåæ­¢,0x43=ä¹¾ç¥åæ­¢"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¹¾ç¥é·ç§»ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"DryingStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ä¹¾ç¥,0x42=ä¸æåæ­¢,0x43=ä¹¾ç¥å®äºã»åæ­¢"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¹¾ç¥æ®ãæé",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								},
+								{
+									"arrayCount":0,
+									"description":"ç§",
+									"fields":[
+										
+									],
+									"identifier":"Second",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"ç§",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"RemainingDryingTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":230,
+							"required":[
+								"NONE"
+							],
+							"size":3,
+							"type":"hour_minute_second_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OnTimerReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":144,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OnTimerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":145,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"RelativeTimeBasedOnTimerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":146,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						}
+					]
+				},
+				{
+					"classCode":199,
+					"description":"é»æ°ã¢ã¤ã­ã³",
+					"name":"ELECTRIC_IRON_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":200,
+					"description":"ãºãã³ãã¬ããµ",
+					"name":"TROUSER_PRESS_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":201,
+					"description":"ãµã¨ãä¹¾ç¥æ©",
+					"name":"FUTON_DRYER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":202,
+					"description":"å°ç©ã»ãã¤ä¹¾ç¥æ©",
+					"name":"SMALL_ARTICLE_SHOES_DRYER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":203,
+					"description":"é»æ°æé¤æ©ï¼ã»ã³ãã©ã«ã¯ãªã¼ãå«ãï¼",
+					"name":"ELECTRIC_VACUUM_CLEANER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":204,
+					"description":"ãã£ã¹ãã¼ã¶",
+					"name":"DISPOSER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":205,
+					"description":"é»æ°èåãæ©",
+					"name":"ELECTRIC_MOSQUITO_CATCHER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":206,
+					"description":"æ¥­åç¨ã·ã§ã¼ã±ã¼ã¹",
+					"name":"COMMERCIAL_SHOW_CASE_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":207,
+					"description":"æ¥­åç¨å·èµåº«",
+					"name":"COMMERCIAL_REFRIGERATOR_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":208,
+					"description":"æ¥­åç¨ãããã±ã¼ã¹",
+					"name":"COMMERCIAL_HOT_CASE_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":209,
+					"description":"æ¥­åç¨ãã©ã¤ã¤ã¼",
+					"name":"COMMERCIAL_FRYER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":210,
+					"description":"æ¥­åç¨é»å­ã¬ã³ã¸",
+					"name":"COMMERCIAL_MICROWAVE_OVEN_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":211,
+					"description":"æ´æ¿¯ä¹¾ç¥æ©",
+					"name":"WASHER_AND_DRYER_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æã»èééç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"DoorCoverOpenCloseStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æã»èé,0x42=æã»èé"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ´æ¿¯ã»ä¹¾ç¥è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"WasherAndDryerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":178,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ´æ¿¯ä¹¾ç¥éå§ã»åé\/æ´æ¿¯ä¹¾ç¥éè»¢ä¸­,0x42=æ´æ¿¯ä¹¾ç¥ä¸æåæ­¢,0x43=æ´æ¿¯ä¹¾ç¥åæ­¢"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ´æ¿¯ä¹¾ç¥ã³ã¼ã¹è¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"WasherAndDryerCycleSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":208,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"<æ´æ¿¯ä¹¾ç¥ã³ã¼ã¹>\u000d\u000a0x21=æ¨æº,0x22=éé³,0x23=æ±ãå¤§,0x24=ãã¤ããæ±ã,0x25=ã¤ããã,0x26=æ¯å¸,0x27=ã½ãã,0x28=ãã©ã¤,0x29=æ¸
+æ½ããã,0x2A=ã¢ã¤ã­ã³\/Yã·ã£ã,0x2B=åãå¹²ã,0x2C=åç©,0x2D=é¤è,0x2E=æ²¹æ±ã,0x2F=ã¡ã¢ãªã¼,0x30=çæ´å¤,0x31=æ±ãå°,0x32=å°éç­æé,0x40ï½0x4F=æ´æ¿¯ä¹¾ç¥ã³ã¼ã¹\/ã¡ã¼ã«ãªãªã¸ãã«ã³ã¼ã¹\u000d\u000a<æ´æ¿¯ã³ã¼ã¹>\u000d\u000a0x61=æ¨æº,0x62=éé³,0x63=æ±ãå¤§,0x64=ãã¤ããæ±ã,0x65=ã¤ããã,0x66=æ¯å¸,0x67=ã½ãã,0x68=ãã©ã¤,0x69=æ¸
+æ½ããã,0x6A=é¤è,0x6B=æ²¹æ±ã,0x6C=ã¡ã¢ãª,0x6D=çæ´å¤,0x6E=æ±ãå°,0x6F=å°éç­æé,0x7F=æ§½æ´æµ,0x80ï½0x8F=æ´æ¿¯ã³ã¼ã¹\/ã¡ã¼ã«ãªãªã¸ãã«ã³ã¼ã¹\u000d\u000a<ä¹¾ç¥ã³ã¼ã¹>\u000d\u000a0xA1=æ¨æº,0xA2=æ¯å¸,0xA3=ã½ãã,0xA4=ãã©ã¤,0xA5=ã¢ã¤ã­ã³\/Yã·ã£ã,0xA6=åãå¹²ã,0xA7=åç©,0xA8=é¤è,0xA9=ç¸®ã¿ä½æ¸,0xAA=ä»ä¸ã,0xAB=éæ­¢ä¹¾ç¥,0xAC=æéæå®,0xAD=è¡£é¡ãããã,0xBF=æ§½ä¹¾ç¥,0xC0ï½0xCF=ä¹¾ç¥ã³ã¼ã¹\/ã¡ã¼ã«ãªãªã¸ãã«ã³ã¼ã¹"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ´æ¿¯ä¹¾ç¥ã³ã¼ã¹è¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"WasherAndDryerCycleSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":209,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x20=æ´æ¿¯ãªã,0x21=æ¨æº,0x22=éé³,0x23=æ±ãå¤§,0x24=ãã¤ããæ±ã,0x25=ã¤ããã,0x26=æ¯å¸,0x27=ã½ãã,0x28=ãã©ã¤,0x29=æ¸
+æ½ããã,0x2D=é¤è,0x2E=æ²¹æ±ã,0x2F=ã¡ã¢ãªã¼,0x30=çæ´å¤,0x31=æ±ãå°,0x32=å°éç­æé,0x3F=æ§½æ´æµ,0xE0ï½0xEF=ã¡ã¼ã«ãªãªã¸ãã«ã³ã¼ã¹"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¹¾ç¥æ¹æ³è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DryingCycleSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":210,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0xA0=ä¹¾ç¥ãªã,0xA1=æ¨æº,0xA2=æ¯å¸,0xA3=ã½ãã,0xA4=ãã©ã¤,0xA5=ã¢ã¤ã­ã³\/Yã·ã£ã,0xA6=åãå¹²ã,0xA7=åç©,0xA8=é¤è,0xA9=ç¸®ã¿ä½æ¸,0xAA=ä»ä¸ã,0xAB=éæ­¢ä¹¾ç¥,0xAC=æéæå®,0xAD=è¡£é¡ãããã,0xAE=ãã¼ã¿å
+¥åå¶é,0xBF=æ§½ä¹¾ç¥,0xE0ï½0xEF=ã¡ã¼ã«ãªãªã¸ãã«ã³ã¼ã¹"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":12,
+							"description":"è¨­å®å¯è½ã³ã¼ã¹æ
+å ±ï¼",
+							"fields":[
+								
+							],
+							"identifier":"WasherAndDryerCycleOptionList1",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":211,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"ãããã1ã®å ´åãå¯¾å¿ããã³ã¼ã¹ã®è¨­å®ãå¯è½ãªãã¨ãã0ã®å ´åã¯ä¸å¯è½ãªãã¨ãç¤ºãããããã¨ã³ã¼ã¹ã®é¢ä¿ã¯è©³ç´°ãåç
+§ã®ãã¨ã"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":4,
+							"description":"è¨­å®å¯è½ã³ã¼ã¹æ
+å ±ï¼",
+							"fields":[
+								
+							],
+							"identifier":"WasherAndDryerCycleOptionList2",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":212,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"ãããã1ã®å ´åãå¯¾å¿ããã³ã¼ã¹ã®è¨­å®ãå¯è½ãªãã¨ãã0ã®å ´åã¯ä¸å¯è½ãªãã¨ãç¤ºãããããã¨ã³ã¼ã¹ã®é¢ä¿ã¯è©³ç´°ãåç
+§ã®ãã¨ã"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":4,
+							"description":"è¨­å®å¯è½ã³ã¼ã¹æ
+å ±ï¼",
+							"fields":[
+								
+							],
+							"identifier":"WasherAndDryerCycleOptionList3",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":213,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"ãããã1ã®å ´åãå¯¾å¿ããã³ã¼ã¹ã®è¨­å®ãå¯è½ãªãã¨ãã0ã®å ´åã¯ä¸å¯è½ãªãã¨ãç¤ºãããããã¨ã³ã¼ã¹ã®é¢ä¿ã¯è©³ç´°ãåç
+§ã®ãã¨ã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ°´æµè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"WaterFlowRateSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":214,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"<çµ¶å¯¾å¤æå®>\u000d\u000a0x31ï½0x40(æãå¼±ãæ°´æµï½æãå¼·ãæ°´æµ)\u000d\u000a<èªåããã®ç¸å¯¾æå®>\u000d\u000a0xFF=èªåè¨­å®,0xA0ï½0xA7=ãã©ã¹ç¸å¯¾æå®(1ï½8æ®µé),0xC0ï½0xC7=ãã¤ãã¹ç¸å¯¾æå®(1ï½8æ®µé)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ®µéè±æ°´åè»¢æ°è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"RotationSpeedForSpinDryingSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":215,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":null,
+							"valueDescription":"<çµ¶å¯¾å¤æå®>\u000d\u000a0x0000ï½0x0FFF(0ï½4095 r\/min)\u000d\u000a<èªåããã®ç¸å¯¾æå®>\u000d\u000a0xFFFF=èªåè¨­å®,0xA000ï½0xA7FF=ãã©ã¹ç¸å¯¾æå®(1ï½2048r\/min),0xC000ï½0xC7FF=ãã¤ãã¹ç¸å¯¾æå®(1ï½2048r\/min)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¹¾ç¥åº¦è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DegreeOfDryingSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":216,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"<çµ¶å¯¾å¤æå®>\u000d\u000a0x31ï½0x40(æãä½ãä¹¾ç¥åº¦ï½æãé«ãä¹¾ç¥åº¦)\u000d\u000a<èªåããã®ç¸å¯¾æå®>\u000d\u000a0xFF=èªåè¨­å®,0xA0ï½0xA7=ãã©ã¹ç¸å¯¾æå®(1ï½8æ®µé),0xC0ï½0xC7=ãã¤ãã¹ç¸å¯¾æå®(1ï½8æ®µé)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ´æ¿¯æ®ãæé",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æé",
+									"valueDescription":"0x00ï½0xFE(0ï½254)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"RemainingWashingTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":219,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hours_minutes_t",
+							"unitDescription":null,
+							"valueDescription":"0xFFFF=æ®ãæéä¸æ"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä¹¾ç¥æ®ãæé",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æé",
+									"valueDescription":"0x00ï½0xFE(0ï½254)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"RemainingDryingTime",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":220,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hours_minutes_t",
+							"unitDescription":null,
+							"valueDescription":"0xFFFF=æ®ãæéä¸æ"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãçµéæé",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æé",
+									"valueDescription":"0x00ï½0xFF(0ï½255)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"ElapsedTimeOnTheOnTimer",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":223,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hours_minutes_2type_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":2,
+							"description":"ã¤ãããè¡ç¨æéè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"PresoakingTimeSetting",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"æéå",
+							"valueDescription":"<çµ¶å¯¾å¤æå®>\u000d\u000a0x00ï½0x17:0x00ï½0x3B(0ï½23):(0ï½59)\u000d\u000a<èªåããã®ç¸å¯¾æå®>\u000d\u000a0xFFFF=èªåè¨­å®,0xA000ï½0xA03B=ãã©ã¹ç¸å¯¾æå®(1ï½60å),0xC000ï½0xC03B=ãã¤ãã¹ç¸å¯¾æå®(1ï½60å)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ´æ¿¯ä¹¾ç¥é·ç§»ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"CurrentStageOfWasherAndDryerCycle",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":226,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=æ´ã,0x42=ããã,0x43=è±æ°´,0x44=ä¸æåæ­¢,0x45=æ´æ¿¯å®äº,0x51=æ´æ¿¯\/ä¹¾ç¥ï¼ã½ããã­ã¼ããªãï¼å®äº,0x52=ä¹¾ç¥,0x53=ã½ããã­ã¼ã,0x54=ä¹¾ç¥ï¼ã½ããã­ã¼ãããï¼å®äº,0x61=éè»¢åå¾
+æ©ä¸­,0x71=ç¬¬1ããã,0x72=ç¬¬2ããã,0x73=ç¬¬3ããã,0x74=ç¬¬4ããã,0x75=ç¬¬5ããã,0x76=ç¬¬6ããã,0x77=ç¬¬7ããã,0x78=ç¬¬8ããã,0x81=ç¬¬1è±æ°´,0x82=ç¬¬2è±æ°´,0x83=ç¬¬3è±æ°´,0x84=ç¬¬4è±æ°´,0x85=ç¬¬5è±æ°´,0x86=ç¬¬6è±æ°´,0x87=ç¬¬7è±æ°´,0x88=ç¬¬8è±æ°´,0x91=ããªãã¼ãè±æ°´,0xE0ï½0xEF=ã¡ã¼ã«ãªãªã¸ãã«ã³ã¼ã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ°´éè¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"WaterVolumeSetting1",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":227,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"ã",
+							"valueDescription":"<çµ¶å¯¾å¤æå®>\u000d\u000a0x00ï½0x7F(0ï½127ã)\u000d\u000a<èªåããã®ç¸å¯¾æå®>\u000d\u000a0xFF=èªåè¨­å®,0xA0ï½0xBF=ãã©ã¹ç¸å¯¾æå®(1ï½32ã),0xC0ï½0xDF=ãã¤ãã¹ç¸å¯¾æå®(1ï½32ã)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ°´éè¨­å®ï¼",
+							"fields":[
+								
+							],
+							"identifier":"WaterVolumeSetting2",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":228,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"<çµ¶å¯¾å¤æå®>\u000d\u000a0x31ï½0x40(æãä½ãæ°´ä½ï½æãé«ãæ°´ä½)\u000d\u000a<èªåããã®ç¸å¯¾æå®>\u000d\u000a0xFF=èªåè¨­å®,0xA0ï½0xA7=ãã©ã¹ç¸å¯¾æå®(1ï½8æ®µé),0xC0ï½0xC7=ãã¤ãã¹ç¸å¯¾æå®(1ï½8æ®µé)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":2,
+							"description":"æ´ãæéè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"WashingTimeSetting",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":229,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"æéå",
+							"valueDescription":"<çµ¶å¯¾å¤æå®>\u000d\u000a0x00ï½0x17:0x00ï½0x3B(0ï½23):(0ï½59)\u000d\u000a<èªåããã®ç¸å¯¾æå®>\u000d\u000a0xFF=èªåè¨­å®,0xA000ï½0xA03B=ãã©ã¹ç¸å¯¾æå®(1ï½60å),0xC000ï½0xC03B=ãã¤ãã¹ç¸å¯¾æå®(1ï½60å)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ãããåæ°è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"NumberOfTimesOfRinsingSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":230,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x00ï½0x08(0ï½8å),0xFF=èªå"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":4,
+							"description":"ãããã¢ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"RinsingProcessSetting",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":231,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0000=ã¢ã¼ãèªåè¨­å®,0001=æºãããã,0010=æµæ°´ããã,0011=ã·ã£ã¯ã¼ããã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è±æ°´æéè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"SpinDryingTimeSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":232,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"å",
+							"valueDescription":"<çµ¶å¯¾å¤æå®>\u000d\u000a0x00ï½0x3B(0ï½59å)\u000d\u000a<èªåããã®ç¸å¯¾æå®>\u000d\u000a0xFF=èªåè¨­å®,0xA0ï½0xBF=ãã©ã¹ç¸å¯¾æå®(1ï½32å),0xC0ï½0xDF=ãã¤ãã¹ç¸å¯¾æå®(1ï½32å)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":2,
+							"description":"ä¹¾ç¥æéè¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"DryingTimeSetting",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":233,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"æéå",
+							"valueDescription":"<çµ¶å¯¾å¤æå®>\u000d\u000a0x00ï½0x17:0x00ï½0x3B(0ï½23):(0ï½59)\u000d\u000a<èªåããã®ç¸å¯¾æå®>\u000d\u000a0xFFFF=èªåè¨­å®,0xA000ï½0xA03B=ãã©ã¹ç¸å¯¾æå®(1ï½60å),0xC000ï½0xC03B=ãã¤ãã¹ç¸å¯¾æå®(1ï½60å)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ´ãæ¸©æ°´è¨­å®å¤",
+							"fields":[
+								
+							],
+							"identifier":"WarmWaterSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":234,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":"â",
+							"valueDescription":"0x00ï½0x64(0ï½100â),0xFE=æ¸©æ°´ä¸ä½¿ç¨,0xFF=æ¸©åº¦èªåè¨­å®"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"é¢¨åæ°´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"BathtubWaterRecycleSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":235,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x40=é¢¨åæ°´çµ¦æ°´ãªã,0x41=æ´ãã®ã¿,0x42=ãããã®ã¿ï¼é¤ãæçµãããï¼,0x43=å
+¨ããã,0x44=æ´ãï¼ãããï¼é¤ãæçµãããï¼,0x45=æ´ãï¼å
+¨ããã"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ã½ããã­ã¼ãè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"WrinklingMinimizationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":236,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ã½ããã­ã¼ãå
+¥ã,0x42=ã½ããã­ã¼ãåã"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ´æ¿¯ä¹¾ç¥æ®ãæé",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æé",
+									"valueDescription":"0x00ï½0xFE(0ï½254)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"TimeRemainingToCompleteWasherAndDryerCycle",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":237,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hours_minutes_t",
+							"unitDescription":null,
+							"valueDescription":"0xFFFF=æ®ãæéä¸æ"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"éè»¢ä¸­æã»èã­ãã¯è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DoorCoverLockSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":238,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=ã­ãã¯,0x42=ã¢ã³ã­ãã¯"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"æ´æ¿¯ä¹¾ç¥è¡ç¨æ
+å ±",
+							"fields":[
+								{
+									"arrayCount":2,
+									"description":"æå¹ãªè¡¨ç¤ºé 
+ç®",
+									"fields":[
+										
+									],
+									"identifier":"AvailableItems",
+									"initialValue":null,
+									"isArray":true,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"æå¹ãªè¡¨ç¤ºé 
+ç®ãããããããã§ç¤ºãã"
+								},
+								{
+									"arrayCount":0,
+									"description":"ã¤ãããè¡ç¨",
+									"fields":[
+										
+									],
+									"identifier":"Presoaking",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x41=ã¤ãããè¡ç¨ãã,0x42=ã¤ãããè¡ç¨ãªã"
+								},
+								{
+									"arrayCount":2,
+									"description":"æ´ãæé",
+									"fields":[
+										
+									],
+									"identifier":"WashingTime",
+									"initialValue":null,
+									"isArray":true,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"å¤ã¯æ´ãæéè¨­å®å¤ãåç
+§"
+								},
+								{
+									"arrayCount":0,
+									"description":"ãããåæ°",
+									"fields":[
+										
+									],
+									"identifier":"NumberOfTimesOfRinsing",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"å¤ã¯ãããåæ°è¨­å®å¤ãåç
+§"
+								},
+								{
+									"arrayCount":0,
+									"description":"ãããã¢ã¼ã",
+									"fields":[
+										
+									],
+									"identifier":"RinsingProcess",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":4,
+									"type":"uint32_t",
+									"unitDescription":null,
+									"valueDescription":"å¤ã¯ãããã¢ã¼ãè¨­å®ãåç
+§"
+								},
+								{
+									"arrayCount":0,
+									"description":"è±æ°´æé",
+									"fields":[
+										
+									],
+									"identifier":"SpinDryingTime",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"å¤ã¯è±æ°´æéè¨­å®å¤ãåç
+§"
+								},
+								{
+									"arrayCount":2,
+									"description":"ä¹¾ç¥æé",
+									"fields":[
+										
+									],
+									"identifier":"DryingTime",
+									"initialValue":null,
+									"isArray":true,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"å¤ã¯ä¹¾ç¥æéè¨­å®å¤ãåç
+§"
+								},
+								{
+									"arrayCount":0,
+									"description":"æ¸©æ°´è¨­å®",
+									"fields":[
+										
+									],
+									"identifier":"WarmWaterSetting",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"å¤ã¯æ¸©æ°´è¨­å®ãåç
+§"
+								},
+								{
+									"arrayCount":0,
+									"description":"æ°´éè¨­å®1",
+									"fields":[
+										
+									],
+									"identifier":"WaterVolumeSetting1",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"å¤ã¯æ°´éè¨­å®1ãåç
+§"
+								},
+								{
+									"arrayCount":0,
+									"description":"æ°´éè¨­å®2",
+									"fields":[
+										
+									],
+									"identifier":"WaterVolumeSetting2",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"å¤ã¯æ°´éè¨­å®2ãåç
+§"
+								},
+								{
+									"arrayCount":0,
+									"description":"é¢¨åæ°´è¨­å®",
+									"fields":[
+										
+									],
+									"identifier":"BathtubWaterRecycleSetting",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"å¤ã¯é¢¨åæ°´è¨­å®ãåç
+§"
+								},
+								{
+									"arrayCount":0,
+									"description":"æ°´æµè¨­å®",
+									"fields":[
+										
+									],
+									"identifier":"WaterFlowRateSetting",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"å¤ã¯æ°´æµè¨­å®ãåç
+§"
+								},
+								{
+									"arrayCount":2,
+									"description":"è±æ°´åè»¢æ°è¨­å®",
+									"fields":[
+										
+									],
+									"identifier":"RotationSpeedForSpinDryingSetting",
+									"initialValue":null,
+									"isArray":true,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"å¤ã¯è±æ°´åè»¢æ°è¨­å®å¤ãåç
+§"
+								},
+								{
+									"arrayCount":0,
+									"description":"ä¹¾ç¥åº¦è¨­å®",
+									"fields":[
+										
+									],
+									"identifier":"DegreeOfDryingSetting",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"å¤ã¯ä¹¾ç¥åº¦è¨­å®ãåç
+§"
+								},
+								{
+									"arrayCount":2,
+									"description":"ã¤ãããè¡ç¨æéè¨­å®",
+									"fields":[
+										
+									],
+									"identifier":"PresoakingTimeSetting",
+									"initialValue":null,
+									"isArray":true,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"å¤ã¯ã¤ãããè¡ç¨æéè¨­å®ãåç
+§"
+								},
+								{
+									"arrayCount":0,
+									"description":"ã½ããã­ã¼ãè¨­å®",
+									"fields":[
+										
+									],
+									"identifier":"WrinklingMinimizationSetting",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"å¤ã¯ã½ããã­ã¼ãè¨­å®ãåç
+§"
+								}
+							],
+							"identifier":"WasherAndDryerCycle",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":239,
+							"required":[
+								"NONE"
+							],
+							"size":24,
+							"type":"washer_and_dryer_cycle_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"OnTimerReservationSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":144,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æ",
+									"valueDescription":"0x00ï½0x17(0ï½23)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"OnTimerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":145,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hour_minute_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"æ",
+									"fields":[
+										
+									],
+									"identifier":"Hour",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"æé",
+									"valueDescription":"0x00ï½0xFF(0ï½255)"
+								},
+								{
+									"arrayCount":0,
+									"description":"å",
+									"fields":[
+										
+									],
+									"identifier":"Minute",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":"å",
+									"valueDescription":"0x00ï½0x3B(0ï½59)"
+								}
+							],
+							"identifier":"RelativeTimeBasedOnTimerSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":146,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"hours_minutes_2type_t",
+							"unitDescription":null,
+							"valueDescription":""
+						}
+					]
+				}
+			]
+		},
+		{
+			"classGroupCode":4,
+			"description":"å¥åº·é¢é£æ©å¨",
+			"define":"X1_WELLNESS",
+			"classList":[
+				{
+					"classCode":1,
+					"description":"ä½éè¨",
+					"name":"WEIGHING_MACHINE_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä½éè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredValueOfBodyWeight",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.1kg",
+							"valueDescription":"0x0000ï½0xFFFD(0ï½6553.3kg)"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ä½èèªè¨æ¸¬å¤",
+							"fields":[
+								
+							],
+							"identifier":"MeasuredValueOfBodyFat",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":225,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":"0.10ï¼
+",
+							"valueDescription":"0x0000ï½0x03E8(0ï½100.0%)"
+						}
+					]
+				},
+				{
+					"classCode":2,
+					"description":"ä½æ¸©è¨",
+					"name":"CLINICAL_THERMOMETER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":3,
+					"description":"è¡å§è¨",
+					"name":"BLOOD_PRESSURE_METER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":4,
+					"description":"è¡ç³å¤è¨",
+					"name":"BLOOD_SUGAR_METER_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":5,
+					"description":"ä½èèªè¨",
+					"name":"BODY_FAT_METER_EOBJ",
+					"propertyList":[
+						
+					]
+				}
+			]
+		},
+		{
+			"classGroupCode":5,
+			"description":"ç®¡çã»æä½é¢é£æ©å¨",
+			"define":"X1_CONTROLLER",
+			"classList":[
+				{
+					"classCode":252,
+					"description":"ã»ã­ã¥ã¢éä¿¡ç¨å
+±æéµè¨­å®ãã¼ã",
+					"name":"SECURE_COMMUNICATION_SHARED_KEY_SETUP_NODE_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":253,
+					"description":"ã¹ã¤ããï¼JEMA/HAç«¯å­å¯¾å¿ï¼",
+					"name":"SWITCH_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET"
+							],
+							"arrayCount":0,
+							"description":"æ¥ç¶æ©å¨",
+							"fields":[
+								
+							],
+							"identifier":"ConnectedDevice",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":224,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"æ©å¨ã®å½¢åãä¿æãã"
+						}
+					]
+				},
+				{
+					"classCode":254,
+					"description":"æºå¸¯ç«¯æ«",
+					"name":"PORTABLE_TERMINAL_EOBJ",
+					"propertyList":[
+						
+					]
+				},
+				{
+					"classCode":255,
+					"description":"ã³ã³ãã­ã¼ã©",
+					"name":"CONTROLLER_EOBJ",
+					"propertyList":[
+						
+					]
+				}
+			]
+		},
+		{
+			"classGroupCode":6,
+			"description":"AVé¢é£æ©å¨",
+			"define":"X1_AUDIO_VISUAL",
+			"classList":[
+				{
+					"classCode":1,
+					"description":"ãã£ã¹ãã¬ã¼",
+					"name":"DISPLAY_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¡¨ç¤ºå¶å¾¡è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DisplayControlSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x30=è¡¨ç¤º,0x31=éè¡¨ç¤º"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"æå­åè¨­å®åä»å¯è½ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"CharacterStringSettingAcceptanceStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x30=ã¬ãã£,0x31=ãã¸ã¼"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":2,
+							"description":"è¡¨ç¤ºå¯è½æå­ã³ã¼ã",
+							"fields":[
+								
+							],
+							"identifier":"SupportedCharacterCodes",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":178,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"[0]ANSI X3.4:1=æ­è¼,0=éæ­è¼\u000d\u000a[1]Shift-JIS:1=æ­è¼,0=éæ­è¼\u000d\u000a[2]JIS:1=æ­è¼,0=éæ­è¼\u000d\u000a[3]æ¥æ¬èªEUC:1=æ­è¼,0=éæ­è¼\u000d\u000a[4]UCS-4:1=æ­è¼,0=éæ­è¼\u000d\u000a[5]UCS-2:1=æ­è¼,0=éæ­è¼\u000d\u000a[6]Latin-1:1=æ­è¼,0=éæ­è¼\u000d\u000a[7]UTF-8:1=æ­è¼,0=éæ­è¼\u000d\u000a[8ï½15]for future reserved:0"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET",
+								"VARIABLE"
+							],
+							"arrayCount":0,
+							"description":"ä¼éæå­åè¨­å®",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"ä¼éæå­ãã¤ãã³ã¼ãåãã¼ã¿é·",
+									"fields":[
+										
+									],
+									"identifier":"ByteCodeSequenceDataLength",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"ä¼éæå­ãã¤ãã³ã¼ãåãã¼ã¿é·ã®16é²æç®å¤"
+								},
+								{
+									"arrayCount":0,
+									"description":"ä½¿ç¨æå­ã³ã¼ã",
+									"fields":[
+										
+									],
+									"identifier":"CharacterCodeToUse",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x01=ANSI X3.4,0x02=Shift-JIS,0x03=JIS,0x04=æ¥æ¬èªEUC,0x05=UCS-4,0x06=UCS-2,0x07=Latin-1,0x08=UTF-8,0x09ï½=for future reserved"
+								},
+								{
+									"arrayCount":0,
+									"description":"for future reserved",
+									"fields":[
+										
+									],
+									"identifier":"Reserved",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":244,
+									"description":"ä¼éæå­åãã¤ãã³ã¼ãå",
+									"fields":[
+										
+									],
+									"identifier":"ByteCodeSequenceOfTheCharacterStringToPresentToTheUser",
+									"initialValue":null,
+									"isArray":true,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":""
+								}
+							],
+							"identifier":"CharacterStringToPresentToTheUser",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":179,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":247,
+							"type":"character_string_to_present_to_the_user_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"åä»ãä¼éæå­åé·",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"for future reserved",
+									"fields":[
+										
+									],
+									"identifier":"TotalNumberOfBytesOfTheNewestCharacterString",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x00ï½0xF4"
+								},
+								{
+									"arrayCount":0,
+									"description":"for future reserved",
+									"fields":[
+										
+									],
+									"identifier":"Reserved",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0x00"
+								}
+							],
+							"identifier":"LengthOfCharacterStringAccepted",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":180,
+							"required":[
+								"RULE_GET"
+							],
+							"size":2,
+							"type":"length_of_character_string_accepted_t",
+							"unitDescription":null,
+							"valueDescription":""
+						}
+					]
+				},
+				{
+					"classCode":2,
+					"description":"ãã¬ã",
+					"name":"TELEVISION_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è¡¨ç¤ºå¶å¾¡è¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"DisplayControlSetting",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":176,
+							"required":[
+								"NONE"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"æå­åè¨­å®åä»å¯è½ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"CharacterStringSettingAcceptanceStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":177,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":2,
+							"description":"è¡¨ç¤ºå¯è½æå­ã³ã¼ã",
+							"fields":[
+								
+							],
+							"identifier":"SupportedCharacterCodes",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":178,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET",
+								"VARIABLE"
+							],
+							"arrayCount":247,
+							"description":"ä¼éæå­åè¨­å®",
+							"fields":[
+								
+							],
+							"identifier":"CharacterStringToPresentToTheUser",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":179,
+							"required":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"ANNOUNCE"
+							],
+							"arrayCount":0,
+							"description":"åä»ãä¼éæå­åé·",
+							"fields":[
+								
+							],
+							"identifier":"LengthOfCharacterStringAccepted",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":180,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":""
+						}
+					]
+				}
+			]
+		},
+		{
+			"classGroupCode":14,
+			"description":"ãã­ãã¡ã¤ã«",
+			"define":"X1_PROFILE",
+			"classList":[
+				{
+					"classCode":240,
+					"description":"ãã¼ããã­ãã¡ã¤ã«ãªãã¸ã§ã¯ã",
+					"name":"NODE_PROFILE_EOBJ",
+					"propertyList":[
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"åä½ç¶æ
+",
+							"fields":[
+								
+							],
+							"identifier":"OperationStatus",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":128,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"0x30=èµ·åä¸­,0x31=æªèµ·åä¸­"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ï¼¶ï½
+ï½ï½ï½ï½ï½æ
+å ±",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"ã¡ã¸ã£ã¼ãã¼ã¸ã§ã³(å°æ°ç¹ä»¥ä¸)",
+									"fields":[
+										
+									],
+									"identifier":"MajorVersionNumber",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"Binary"
+								},
+								{
+									"arrayCount":0,
+									"description":"ãã¤ãã¼ãã¼ã¸ã§ã³(å°æ°ç¹ä»¥ä¸)",
+									"fields":[
+										
+									],
+									"identifier":"MinorVersionNumber",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"Binary"
+								},
+								{
+									"arrayCount":2,
+									"description":"é»æã¿ã¤ã",
+									"fields":[
+										
+									],
+									"identifier":"MessageType",
+									"initialValue":null,
+									"isArray":true,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"Bitmap"
+								}
+							],
+							"identifier":"VersionInformation",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":130,
+							"required":[
+								"RULE_GET"
+							],
+							"size":4,
+							"type":"version_information_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"è­å¥çªå·",
+							"fields":[
+								{
+									"arrayCount":0,
+									"description":"ä¸ä½éä¿¡å±¤IDãã£ã¼ã«ã",
+									"fields":[
+										
+									],
+									"identifier":"LowerCommunicationIdField",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":"0xFE=2ãã17ãã¤ããã¡ã¼ã«è¦å®å½¢å¼ã«ããè¨­å®,ãã®ä»=future reserved"
+								},
+								{
+									"arrayCount":0,
+									"description":"ã¡ã¼ã«ã¼ã³ã¼ã",
+									"fields":[
+										{
+											"arrayCount":3,
+											"description":"ã¡ã¼ã«ã¼ã³ã¼ã",
+											"fields":[
+												
+											],
+											"identifier":"ManufacturerCode",
+											"initialValue":null,
+											"isArray":true,
+											"primitive":true,
+											"size":1,
+											"type":"uint8_t",
+											"unitDescription":null,
+											"valueDescription":"ECHONETã³ã³ã½ã¼ã·ã¢ã ã§è¦å®ã"
+										}
+									],
+									"identifier":"ManufacturerCode",
+									"initialValue":null,
+									"isArray":false,
+									"primitive":false,
+									"size":3,
+									"type":"manufacturer_code_t",
+									"unitDescription":null,
+									"valueDescription":""
+								},
+								{
+									"arrayCount":13,
+									"description":"ã¦ãã¼ã¯IDé¨(ã¡ã¼ã«ã¼ç¬èª)",
+									"fields":[
+										
+									],
+									"identifier":"UniqueIdSection",
+									"initialValue":null,
+									"isArray":true,
+									"primitive":true,
+									"size":1,
+									"type":"uint8_t",
+									"unitDescription":null,
+									"valueDescription":""
+								}
+							],
+							"identifier":"IdentificationNumber",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":false,
+							"propertyCode":131,
+							"required":[
+								"RULE_GET"
+							],
+							"size":17,
+							"type":"node_identification_number_t",
+							"unitDescription":null,
+							"valueDescription":""
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"ç°å¸¸å
+å®¹",
+							"fields":[
+								
+							],
+							"identifier":"FaultContent",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":137,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":null,
+							"valueDescription":"0x0000ï½0x03EC(0ï½1004)"
+						},
+						{
+							"access":[
+								"RULE_SET",
+								"RULE_GET"
+							],
+							"arrayCount":0,
+							"description":"åä½è­å¥æ
+å ±",
+							"fields":[
+								
+							],
+							"identifier":"UniqueIdentifierData",
+							"initialValue":null,
+							"isArray":false,
+							"primitive":true,
+							"propertyCode":191,
+							"required":[
+								"NONE"
+							],
+							"size":2,
+							"type":"uint16_t",
+							"unitDescription":null,
+							"valueDescription":"ä¸è¨(3)åç
+§ã"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":3,
+							"description":"èªãã¼ãã¤ã³ã¹ã¿ã³ã¹æ°",
+							"fields":[
+								
+							],
+							"identifier":"NumberOfSelfNodeInstances",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":211,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"1ï½3ãã¤ãç®ï¼ã¤ã³ã¹ã¿ã³ã¹ç·æ°"
+						},
+						{
+							"access":[
+								"RULE_GET"
+							],
+							"arrayCount":2,
+							"description":"èªãã¼ãã¯ã©ã¹æ°",
+							"fields":[
+								
+							],
+							"identifier":"NumberOfSelfNodeClasses",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":212,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"1ï½2ãã¤ãç®ï¼ã¯ã©ã¹ç·æ°"
+						},
+						{
+							"access":[
+								"RULE_ANNO",
+								"VARIABLE"
+							],
+							"arrayCount":253,
+							"description":"ã¤ã³ã¹ã¿ã³ã¹ãªã¹ãéç¥",
+							"fields":[
+								
+							],
+							"identifier":"InstanceListNotification",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":213,
+							"required":[
+								"RULE_ANNO"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"1ãã¤ãç®ï¼éå ±ã¤ã³ã¹ã¿ã³ã¹æ°\u000d\u000a2ï½253ãã¤ãç®ï¼ECHONETãªãã¸ã§ã¯ãã³ã¼ã(EOJ3ãã¤ã)ãåæã"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"VARIABLE"
+							],
+							"arrayCount":253,
+							"description":"èªãã¼ãã¤ã³ã¹ã¿ã³ã¹ãªã¹ãï¼³",
+							"fields":[
+								
+							],
+							"identifier":"SelfNodeInstanceListS",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":214,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"1ãã¤ãç®ï¼ã¤ã³ã¹ã¿ã³ã¹ç·æ°\u000d\u000a2ï½253ãã¤ãç®ï¼ECHONETãªãã¸ã§ã¯ãã³ã¼ã(EOJ3ãã¤ã)ãåæã"
+						},
+						{
+							"access":[
+								"RULE_GET",
+								"VARIABLE"
+							],
+							"arrayCount":17,
+							"description":"èªãã¼ãã¯ã©ã¹ãªã¹ãï¼³",
+							"fields":[
+								
+							],
+							"identifier":"SelfNodeClassListS",
+							"initialValue":null,
+							"isArray":true,
+							"primitive":true,
+							"propertyCode":215,
+							"required":[
+								"RULE_GET"
+							],
+							"size":1,
+							"type":"uint8_t",
+							"unitDescription":null,
+							"valueDescription":"1ãã¤ãç®ï¼ã¯ã©ã¹ç·æ°\u000d\u000a2ï½17ãã¤ãç®ï¼ã¯ã©ã¹ã³ã¼ã(EOJã®ä¸ä½2ãã¤ã)ãåæã"
+						}
+					]
+				}
+			]
+		},
+		{
+			"classGroupCode":15,
+			"description":"ã¦ã¼ã¶ã¼å®ç¾©",
+			"define":"X1_USER_DEFINED",
+			"classList":[
+				
+			]
+		}
+	]
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/echonet_objects.min.json
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/echonet_objects.min.json	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/echonet_objects.min.json	(revision 270)
@@ -0,0 +1,573 @@
+{"baseProfilePropertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"ç°å¸¸çºçç¶æ
+","fields":[],"identifier":"FaultStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":136,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç°å¸¸çºçæ,0x42=ç°å¸¸çºçç¡"},{"access":["RULE_GET"],"arrayCount":0,"description":"ã¡ã¼ã«ã¼ã³ã¼ã","fields":[{"arrayCount":3,"description":"ã¡ã¼ã«ã¼ã³ã¼ã","fields":[],"identifier":"ManufacturerCode","initialValue":null,"isArray":true,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"ECHONETã³ã³ã½ã¼ã·ã¢ã ã§è¦å®ã"}],"identifier":"ManufacturerCode","initialValue":null,"isArray":false,"primitive":false,"propertyCode":138,"required":["RULE_GET"],"size":3,"type":"manufacturer_code_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":3,"description":"äºæ¥­å ´ã³ã¼ã","fields":[],"identifier":"PlaceOfBusinessCode","initialValue":null,"isArray":true,"primitive":true,"propertyCode":139,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"(åã¡ã¼ã«æ¯ã«è¦å®ã)"},{"access":["RULE_GET"],"arrayCount":12,"description":"ååã³ã¼ã","fields":[],"identifier":"ProductCode","initialValue":null,"isArray":true,"primitive":true,"propertyCode":140,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"(åã¡ã¼ã«æ¯ã«è¦å®ã)"},{"access":["RULE_GET"],"arrayCount":12,"description":"è£½é çªå·","fields":[],"identifier":"SerialNumber","initialValue":null,"isArray":true,"primitive":true,"propertyCode":141,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"(åã¡ã¼ã«æ¯ã«è¦å®ã)"},{"access":["RULE_GET"],"arrayCount":0,"description":"è£½é å¹´ææ¥","fields":[{"arrayCount":0,"description":"å¹´","fields":[],"identifier":"Year","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"å¹´","valueDescription":"0x0001ï½0x270F(1ï½9999)"},{"arrayCount":0,"description":"æ","fields":[],"identifier":"Mounth","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x01ï½0x0C(1ï½12)"},{"arrayCount":0,"description":"æ¥","fields":[],"identifier":"Day","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ¥","valueDescription":"0x01ï½0x1F(1ï½31)"}],"identifier":"DateOfManufacture","initialValue":null,"isArray":false,"primitive":false,"propertyCode":142,"required":["NONE"],"size":4,"type":"year_mounth_day_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET","VARIABLE"],"arrayCount":17,"description":"ç¶å¤ã¢ãã¦ã³ã¹ãã­ããã£ããã","fields":[],"identifier":"StatusChangeAnnouncementPropertyMap","initialValue":null,"isArray":true,"primitive":true,"propertyCode":157,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET","VARIABLE"],"arrayCount":17,"description":"ï¼³ï½
+ï½ãã­ããã£ããã","fields":[],"identifier":"SetPropertyMap","initialValue":null,"isArray":true,"primitive":true,"propertyCode":158,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET","VARIABLE"],"arrayCount":17,"description":"ï¼§ï½
+ï½ãã­ããã£ããã","fields":[],"identifier":"GetPropertyMap","initialValue":null,"isArray":true,"primitive":true,"propertyCode":159,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""}],"baseObjectPropertyList":[{"access":["RULE_SET","RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"åä½ç¶æ
+","fields":[],"identifier":"OperationStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":128,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x30=ON,0x31=OFF"},{"access":["RULE_SET","RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"è¨­ç½®å ´æ","fields":[],"identifier":"InstallationLocation","initialValue":null,"isArray":false,"primitive":true,"propertyCode":129,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"2.2è¨­ç½®å ´æãã­ããã£åç
+§"},{"access":["RULE_GET"],"arrayCount":0,"description":"è¦æ ¼ï¼¶ï½
+ï½ï½ï½ï½ï½æ
+å ±","fields":[{"arrayCount":0,"description":"åºå®1(for future reserved)","fields":[],"identifier":"Reserved1","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00"},{"arrayCount":0,"description":"åºå®2(for future reserved)","fields":[],"identifier":"Reserved2","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00"},{"arrayCount":0,"description":"ãªãªã¼ã¹é ãASCIIã§ç¤ºã","fields":[],"identifier":"OrderOfRelease","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""},{"arrayCount":0,"description":"åºå®4(for future reserved)","fields":[],"identifier":"Reserved4","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00"}],"identifier":"StandardVersionInformation","initialValue":null,"isArray":false,"primitive":false,"propertyCode":130,"required":["RULE_GET"],"size":4,"type":"standard_version_information_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è­å¥çªå·","fields":[{"arrayCount":0,"description":"ä¸ä½éä¿¡å±¤IDãã£ã¼ã«ã","fields":[],"identifier":"LowerLayerCommunicationIdField","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½0xFD=ä¸ä½éä¿¡å±¤ã§ä½¿ç¨ãããéä¿¡ãã­ãã³ã«ã§åºæã®çªå·ãæ¯ããã¦ããå ´åããã­ãã³ã«å¥ã«å¿ãã¦ãä»»æã«è¨­å®ï¼ECHONET Liteã§ã¯ä½¿ç¨ããªãï¼,0x11ï½0x1F=é»ç¯ç·a\/dæ¹å¼,0x31ï½0x3F=ç¹å®å°é»åç¡ç·,0x41ï½0x4F=æ¡å¼µHBS,0x51ï½0x5F=IrDA,0x61ï½0x6F=LonTalk,0x71ï½0x7F=Bluetooth,0x81ï½0x8F=ã¤ã¼ãµããã,0x91ï½0x9F=IEEE802.11\/11b,0xA1=é»ç¯ç·cæ¹å¼,0xB1=IPv6\/Ethernet,0xB2=IPv6\/6LoWPAN,0xFE=2ãã17ãã¤ããã¡ã¼ã«è¦å®ãå½¢å¼ã«ããè¨­å®ï¼è©³ç´°èª¬æåç
+§ï¼,0xFF=2ãã9ãã¤ããä¹±æ°ã«ããçæãããã­ãã³ã«ãä¸ä½éä¿¡å±¤ã§ä½¿ç¨ããå ´åã«è¨­å®,0x00=è­å¥çªå·æªè¨­å®"},{"arrayCount":16,"description":"åºæçªå·ãã£ã¼ã«ã","fields":[],"identifier":"UniqueNumberField","initialValue":null,"isArray":true,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""}],"identifier":"IdentificationNumber","initialValue":null,"isArray":false,"primitive":false,"propertyCode":131,"required":["NONE"],"size":17,"type":"device_identification_number_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¬ææ¶è²»é»åè¨æ¸¬å¤","fields":[],"identifier":"MeasuredInstantaneousPowerConsumption","initialValue":null,"isArray":false,"primitive":true,"propertyCode":132,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®æ¶è²»é»åè¨æ¸¬å¤","fields":[],"identifier":"MeasuredCumulativePowerConsumption","initialValue":null,"isArray":false,"primitive":true,"propertyCode":133,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"},{"access":["RULE_GET","VARIABLE"],"arrayCount":0,"description":"ã¡ã¼ã«ç°å¸¸ã³ã¼ã","fields":[{"arrayCount":0,"description":"ç°å¸¸ã³ã¼ãé¨ã®ãã¼ã¿ãµã¤ãº","fields":[],"identifier":"DataSizeOfTheFaultCodeField","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""},{"arrayCount":0,"description":"ã¡ã¼ã«ã¼ã³ã¼ã","fields":[{"arrayCount":3,"description":"ã¡ã¼ã«ã¼ã³ã¼ã","fields":[],"identifier":"ManufacturerCode","initialValue":null,"isArray":true,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"ECHONETã³ã³ã½ã¼ã·ã¢ã ã§è¦å®ã"}],"identifier":"ManufacturerCode","initialValue":null,"isArray":false,"primitive":false,"size":3,"type":"manufacturer_code_t","unitDescription":null,"valueDescription":""},{"arrayCount":221,"description":"åã¡ã¼ã«ç¬èªã®ç°å¸¸ã³ã¼ãé¨","fields":[],"identifier":"FieldForManufacturerDefinedFaultCode","initialValue":null,"isArray":true,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""}],"identifier":"ManufacturersFaultCode","initialValue":null,"isArray":false,"primitive":false,"propertyCode":134,"required":["NONE"],"size":225,"type":"manufacturers_fault_code_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é»æµå¶éè¨­å®","fields":[],"identifier":"CurrentLimitSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":135,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"ç°å¸¸çºçç¶æ
+","fields":[],"identifier":"FaultStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":136,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç°å¸¸çºçæ,0x42=ç°å¸¸çºçç¡"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç°å¸¸å
+å®¹","fields":[],"identifier":"FaultDescription","initialValue":null,"isArray":false,"primitive":true,"propertyCode":137,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":null,"valueDescription":"2.5ç°å¸¸å
+å®¹ãã­ããã£åç
+§"},{"access":["RULE_GET"],"arrayCount":0,"description":"ã¡ã¼ã«ã¼ã³ã¼ã","fields":[{"arrayCount":3,"description":"ã¡ã¼ã«ã¼ã³ã¼ã","fields":[],"identifier":"ManufacturerCode","initialValue":null,"isArray":true,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"ECHONETã³ã³ã½ã¼ã·ã¢ã ã§è¦å®ã"}],"identifier":"ManufacturerCode","initialValue":null,"isArray":false,"primitive":false,"propertyCode":138,"required":["RULE_GET"],"size":3,"type":"manufacturer_code_t","unitDescription":null,"valueDescription":"(ECHONETã³ã³ã½ã¼ã·ã¢ã ã§è¦å®ã)"},{"access":["RULE_GET"],"arrayCount":3,"description":"äºæ¥­å ´ã³ã¼ã","fields":[],"identifier":"BusinessFacilityCode","initialValue":null,"isArray":true,"primitive":true,"propertyCode":139,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"(åã¡ã¼ã«æ¯ã«è¦å®ã)"},{"access":["RULE_GET"],"arrayCount":12,"description":"ååã³ã¼ã","fields":[],"identifier":"ProductCode","initialValue":null,"isArray":true,"primitive":true,"propertyCode":140,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"(åã¡ã¼ã«æ¯ã«è¦å®ã)"},{"access":["RULE_GET"],"arrayCount":12,"description":"è£½é çªå·","fields":[],"identifier":"ProductionNumber","initialValue":null,"isArray":true,"primitive":true,"propertyCode":141,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"(åã¡ã¼ã«æ¯ã«è¦å®ã)"},{"access":["RULE_GET"],"arrayCount":0,"description":"è£½é å¹´ææ¥","fields":[{"arrayCount":0,"description":"å¹´","fields":[],"identifier":"Year","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"å¹´","valueDescription":"0x0001ï½0x270F(1ï½9999)"},{"arrayCount":0,"description":"æ","fields":[],"identifier":"Mounth","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x01ï½0x0C(1ï½12)"},{"arrayCount":0,"description":"æ¥","fields":[],"identifier":"Day","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ¥","valueDescription":"0x01ï½0x1F(1ï½31)"}],"identifier":"ProductionDate","initialValue":null,"isArray":false,"primitive":false,"propertyCode":142,"required":["NONE"],"size":4,"type":"year_mounth_day_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç¯é»åä½è¨­å®","fields":[],"identifier":"PowerSavingOperationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":143,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç¯é»åä½ä¸­,0x42=éå¸¸åä½ä¸­"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é éæä½è¨­å®","fields":[],"identifier":"PositionInformation","initialValue":null,"isArray":false,"primitive":true,"propertyCode":147,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å
+¬è¡åç·æªçµç±æä½,0x42=å
+¬è¡åç·çµç±æä½"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç¾å¨æå»è¨­å®","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"CurrentTimeSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":151,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç¾å¨å¹´ææ¥è¨­å®","fields":[{"arrayCount":0,"description":"å¹´","fields":[],"identifier":"Year","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"å¹´","valueDescription":"0x0001ï½0x270F(1ï½9999)"},{"arrayCount":0,"description":"æ","fields":[],"identifier":"Mounth","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x01ï½0x0C(1ï½12)"},{"arrayCount":0,"description":"æ¥","fields":[],"identifier":"Day","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ¥","valueDescription":"0x01ï½0x1F(1ï½31)"}],"identifier":"CurrentDateSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":152,"required":["NONE"],"size":4,"type":"year_mounth_day_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é»åå¶éè¨­å®","fields":[],"identifier":"PowerLimitSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":153,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":null,"valueDescription":"0x0000ï½0xFFFF(0ï½65535W)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®éè»¢æé","fields":[{"arrayCount":0,"description":"åä½","fields":[],"identifier":"Unit","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç§,0x42=å,0x43=æ,0x44=æ¥"},{"arrayCount":0,"description":"çµéæé","fields":[],"identifier":"ElapsedTime","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":null,"valueDescription":"0x00000000ï½0xFFFFFFFF(0ï½4294967295)"}],"identifier":"CumulativeOperatingTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":154,"required":["NONE"],"size":5,"type":"cumulative_operating_time_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET","VARIABLE"],"arrayCount":17,"description":"ï¼³ï½
+ï½ï¼­ãã­ããã£ããã","fields":[],"identifier":"SetMPropertyMap","initialValue":null,"isArray":true,"primitive":true,"propertyCode":155,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"ä»é²1.åç
+§"},{"access":["RULE_GET","VARIABLE"],"arrayCount":17,"description":"ï¼§ï½
+ï½ï¼­ãã­ããã£ããã","fields":[],"identifier":"GetMPropertyMap","initialValue":null,"isArray":true,"primitive":true,"propertyCode":156,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"ä»é²1.åç
+§"},{"access":["RULE_GET","VARIABLE"],"arrayCount":17,"description":"ç¶å¤ã¢ãã¦ã³ã¹ãã­ããã£ããã","fields":[],"identifier":"StatusChangeAnnouncementPropertyMap","initialValue":null,"isArray":true,"primitive":true,"propertyCode":157,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"ä»é²1.åç
+§"},{"access":["RULE_GET","VARIABLE"],"arrayCount":17,"description":"ï¼³ï½
+ï½ãã­ããã£ããã","fields":[],"identifier":"SetPropertyMap","initialValue":null,"isArray":true,"primitive":true,"propertyCode":158,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"ä»é²1.åç
+§"},{"access":["RULE_GET","VARIABLE"],"arrayCount":17,"description":"ï¼§ï½
+ï½ãã­ããã£ããã","fields":[],"identifier":"GetPropertyMap","initialValue":null,"isArray":true,"primitive":true,"propertyCode":159,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"ä»é²1.åç
+§"}],"classGroupList":[{"classGroupCode":0,"description":"ã»ã³ãµã¼é¢é£æ©å¨","define":"X1_SENSOR","classList":[{"classCode":1,"description":"ã¬ã¹æ¼ãã»ã³ãµ","name":"GAS_LEAK_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"ã¬ã¹æ¼ãçºçç¶æ
+","fields":[],"identifier":"GasLeakOccurrenceStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ã¬ã¹æ¼ãçºçæ,0x42=ã¬ã¹æ¼ãçºçç¡"},{"access":["RULE_SET"],"arrayCount":0,"description":"ã¬ã¹æ¼ãçºçç¶æ
+ãªã»ããè¨­å®","fields":[],"identifier":"GasLeakOccurrenceStatusResetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":191,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"}]},{"classCode":2,"description":"é²ç¯ã»ã³ãµ","name":"CRIME_PREVENTION_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"ä¾µå
+¥çºçç¶æ
+","fields":[],"identifier":"InvasionOccurrenceStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ä¾µå
+¥çºçæ,0x42=ä¾µå
+¥çºçç¡"},{"access":["RULE_SET"],"arrayCount":0,"description":"ä¾µå
+¥çºçç¶æ
+ãªã»ããè¨­å®","fields":[],"identifier":"InvasionOccurrenceStatusResetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":191,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"}]},{"classCode":3,"description":"éå¸¸ãã¿ã³","name":"EMERGENCY_BUTTON_EOBJ","propertyList":[{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"éå¸¸çºçç¶æ
+","fields":[],"identifier":"EmergencyOccurrenceStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=éå¸¸çºçæ,0x42=éå¸¸çºçç¡"},{"access":["RULE_SET"],"arrayCount":0,"description":"éå¸¸çºçç¶æ
+ãªã»ããè¨­å®","fields":[],"identifier":"EmergencyOccurrenceStatusResetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":191,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"}]},{"classCode":4,"description":"ææ¥ç¨ã»ã³ãµ","name":"FIRST_AID_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"ææ¥çºçç¶æ
+","fields":[],"identifier":"FirstAidOccurrenceStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ææ¥çºçæ,0x42=ææ¥çºçç¡"},{"access":["RULE_SET"],"arrayCount":0,"description":"ææ¥çºçç¶æ
+ãªã»ããè¨­å®","fields":[],"identifier":"FirstAidOccurrenceStatusResetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":191,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"}]},{"classCode":5,"description":"å°éã»ã³ãµ","name":"EARTHQUAKE_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"å°éçºçç¶æ
+","fields":[],"identifier":"EarthquakeOccurrenceStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å°éçºçæ,0x42=å°éçºçç¡"},{"access":["RULE_SET"],"arrayCount":0,"description":"å°éçºçç¶æ
+ãªã»ããè¨­å®","fields":[],"identifier":"EarthquakeOccurrenceStatusResetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":191,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"}]},{"classCode":6,"description":"æ¼é»ã»ã³ãµ","name":"ELECTRIC_LEAK_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"æ¼é»çºçç¶æ
+","fields":[],"identifier":"ElectricLeakOccurrenceStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ¼é»çºçæ,0x42=æ¼é»çºçç¡"},{"access":["RULE_SET"],"arrayCount":0,"description":"æ¼é»çºçç¶æ
+ãªã»ããè¨­å®","fields":[],"identifier":"ElectricLeakOccurrenceStatusResetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":191,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"}]},{"classCode":7,"description":"äººä½æ¤ç¥ã»ã³ãµ","name":"HUMAN_DETECTION_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"äººä½æ¤ç¥ç¶æ
+","fields":[],"identifier":"HumanDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äººä½æ¤ç¥æ,0x42=äººä½æ¤ç¥ç¡"}]},{"classCode":8,"description":"æ¥å®¢ã»ã³ãµ","name":"VISITOR_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"æ¥å®¢æ¤ç¥ç¶æ
+","fields":[],"identifier":"VisitorDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ¥å®¢æ¤ç¥æ,0x42=æ¥å®¢æ¤ç¥ç¡"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¥å®¢æ¤ç¥ãã¼ã«ãæéè¨­å®å¤","fields":[],"identifier":"VisitorDetectionHoldingTime","initialValue":null,"isArray":false,"primitive":true,"propertyCode":190,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"10sec","valueDescription":"0x0000ï½0xFFFD(0ï½655,330ç§)"}]},{"classCode":9,"description":"å¼ã³åºãã»ã³ãµ","name":"CALL_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"å¼ã³åºãç¶æ
+","fields":[],"identifier":"CallStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å¼ã³åºãæ,0x42=å¼ã³åºãç¡"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å¼ã³åºããã¼ã«ãæéè¨­å®å¤","fields":[],"identifier":"CallHoldingTime","initialValue":null,"isArray":false,"primitive":true,"propertyCode":190,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"10sec","valueDescription":"0x0000ï½0xFFFD(0ï½655,330ç§)"}]},{"classCode":10,"description":"çµé²ã»ã³ãµ","name":"CONDENSATION_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"çµé²æ¤åºç¶æ
+","fields":[],"identifier":"CondensationDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=çµé²æ¤åºæ,0x42=çµé²æ¤åºç¡"}]},{"classCode":11,"description":"ç©ºæ°æ±æã»ã³ãµ","name":"AIR_POLLUTION_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"ç©ºæ°æ±ææ¤åºç¶æ
+","fields":[],"identifier":"AirPollutionDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç©ºæ°æ±ææ¤åºæ,0x42=ç©ºæ°æ±ææ¤åºç¡"}]},{"classCode":12,"description":"é
+¸ç´ ã»ã³ãµ","name":"OXYGEN_SENSOR_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"é
+¸ç´ æ¿åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredValueOfOxygenConcentration","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":2,"type":"uint16_t","unitDescription":"0.01ï¼
+","valueDescription":"0x0000ï½0x2710(0.00ï½100.00%)"}]},{"classCode":13,"description":"ç
+§åº¦ã»ã³ãµ","name":"ILLUMINANCE_SENSOR_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"ç
+§åº¦è¨æ¸¬å¤ï¼","fields":[],"identifier":"MeasuredIlluminanceValue1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":2,"type":"uint16_t","unitDescription":"ã«ã¯ã¹","valueDescription":"0x0000ï½0xFFFD(0ï½65533ã«ã¯ã¹)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç
+§åº¦è¨æ¸¬å¤ï¼","fields":[],"identifier":"MeasuredIlluminanceValue2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["RULE_GET"],"size":2,"type":"uint16_t","unitDescription":"kã«ã¯ã¹","valueDescription":"0x0000ï½0xFFFD(0ï½65533kã«ã¯ã¹)"}]},{"classCode":14,"description":"é³ã»ã³ãµ","name":"SOUND_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"é³æ¤ç¥ç¶æ
+","fields":[],"identifier":"SoundDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é³æ¤ç¥æ,0x42=é³æ¤ç¥ç¡"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é³æ¤ç¥ãã¼ã«ãæéè¨­å®å¤","fields":[],"identifier":"SoundDetectionHoldingTime","initialValue":null,"isArray":false,"primitive":true,"propertyCode":190,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"10sec","valueDescription":"0x0000ï½0xFFFD(0ï½655,330ç§)"}]},{"classCode":15,"description":"æå½ã»ã³ãµ","name":"MAILING_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"æå½æ¤åºç¶æ
+","fields":[],"identifier":"MailingDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æå½æ¤åºæ,0x42=æå½æ¤åºç¡"}]},{"classCode":16,"description":"éè·ã»ã³ãµ","name":"WEIGHT_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"éè·æ¤ç¥ç¶æ
+","fields":[],"identifier":"WeightDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=éè·æ¤ç¥æ,0x42=éè·æ¤ç¥ç¡"}]},{"classCode":17,"description":"æ¸©åº¦ã»ã³ãµ","name":"TEMPERATURE_SENSOR_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"æ¸©åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredTemperatureValue","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":2,"type":"int16_t","unitDescription":"0.1â","valueDescription":"0xF554ï½0x7FFE(-273.2ï½3276.6â)"}]},{"classCode":18,"description":"æ¹¿åº¦ã»ã³ãµ","name":"HUMIDITY_SENSOR_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"ç¸å¯¾æ¹¿åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredValueOfRelativeHumidity","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"}]},{"classCode":19,"description":"é¨ã»ã³ãµ","name":"RAIN_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"é¨æ¤ç¥ç¶æ
+","fields":[],"identifier":"RainDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é¨æ¤ç¥æ,0x42=é¨æ¤ç¥ç¡"}]},{"classCode":20,"description":"æ°´ä½ã»ã³ãµ","name":"WATER_LEVEL_SENSOR_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"æ°´ä½è¶
+éæ¤ç¥é¾å¤è¨­å®å¤","fields":[],"identifier":"WaterLevelOverDetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"cm","valueDescription":"0x00ï½0xFD(0ï½253)"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"æ°´ä½è¶
+éæ¤ç¥ç¶æ
+","fields":[],"identifier":"WaterLevelOverDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ°´ä½è¶
+éæ,0x42=æ°´ä½è¶
+éç¡"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ°´ä½è¨æ¸¬å¤","fields":[],"identifier":"MeasuredValueOfWaterLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":"cm","valueDescription":"0x00ï½0xFD(0ï½253)"}]},{"classCode":21,"description":"é¢¨åæ°´ä½ã»ã³ãµ","name":"BATH_WATER_LEVEL_SENSOR_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"é¢¨åæ°´ä½è¶
+éæ¤ç¥é¾å¤è¨­å®å¤","fields":[],"identifier":"BathWaterLevelOverDetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"cm","valueDescription":"0x00ï½0xFD(0ï½253)"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"é¢¨åæ°´ä½è¶
+éæ¤ç¥ç¶æ
+","fields":[],"identifier":"BathWaterLevelOverDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ°´ä½è¶
+éæ,0x42=æ°´ä½è¶
+éç¡"},{"access":["RULE_GET"],"arrayCount":0,"description":"é¢¨åæ°´ä½è¨æ¸¬å¤","fields":[],"identifier":"MeasuredValueOfBathWaterLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":"cm","valueDescription":"0x00ï½0xFD(0ï½253)"}]},{"classCode":22,"description":"é¢¨åæ²¸ãä¸ããã»ã³ãµ","name":"BATH_HEATING_STATUS_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"é¢¨åæ²¸ãä¸ããæ¤ç¥ç¶æ
+","fields":[],"identifier":"BathHeatingDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é¢¨åæ²¸ãä¸ããæ,0x42=é¢¨åæ²¸ãä¸ããç¡"}]},{"classCode":23,"description":"æ°´æ¼ãã»ã³ãµ","name":"WATER_LEAK_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"æ°´æ¼ãæ¤ç¥ç¶æ
+","fields":[],"identifier":"WaterLeakDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ°´æ¼ãæ¤ç¥æ,0x42=æ°´æ¼ãæ¤ç¥ç¡"}]},{"classCode":24,"description":"æ°´ããµãã»ã³ãµ","name":"WATER_OVERFLOW_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"æ°´ããµãæ¤ç¥ç¶æ
+","fields":[],"identifier":"WaterOverflowDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ°´ããµãæ¤ç¥æ,0x42=æ°´ããµãæ¤ç¥ç¡"}]},{"classCode":25,"description":"ç«ç½ã»ã³ãµ","name":"FIRE_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"ç«ç½çºçæ¤ç¥ç¶æ
+","fields":[],"identifier":"FireOccurrenceDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç«ç½çºçæ¤ç¥æ,0x42=ç«ç½çºçæ¤ç¥ç¡"},{"access":["RULE_SET"],"arrayCount":0,"description":"ç«ç½çºçæ¤ç¥ç¶æ
+ãªã»ããè¨­å®","fields":[],"identifier":"FireOccurrenceDetectionStatusResetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":191,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"}]},{"classCode":26,"description":"ã¿ãã³ç
+ã»ã³ãµ","name":"CIGARETTE_SMOKE_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"ç
+ï¼ã¿ãã³ï¼æ¤ç¥ç¶æ
+","fields":[],"identifier":"SmokeCigaretteDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç
+ï¼ã¿ãã³ï¼æ¤ç¥æ,0x42=ç
+ï¼ã¿ãã³ï¼æ¤ç¥ç¡"}]},{"classCode":27,"description":"CO2ã»ã³ãµ","name":"CO2_SENSOR_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"ï¼£ï¼¯ï¼æ¿åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredValueOfCo2Concentration","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":2,"type":"uint16_t","unitDescription":"ppm","valueDescription":"0x0000ï½0xFFFD(0ï½65533)"}]},{"classCode":28,"description":"ã¬ã¹ã»ã³ãµ","name":"GAS_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"ã¬ã¹æ¤ç¥ç¶æ
+","fields":[],"identifier":"GasDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ã¬ã¹æ¤ç¥æ,0x42=ã¬ã¹æ¤ç¥ç¡"},{"access":["RULE_GET"],"arrayCount":0,"description":"ã¬ã¹æ¿åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredValueOfGasConcentration","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":2,"type":"uint16_t","unitDescription":"ppm","valueDescription":"0x0000ï½0xFFFD(0ï½65533)"}]},{"classCode":29,"description":"VOCã»ã³ãµ","name":"VOC_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"ï¼¶ï¼¯ï¼£æ¤ç¥ç¶æ
+","fields":[],"identifier":"VocDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=VOCæ¤ç¥æ,0x42=VOCæ¤ç¥ç¡"},{"access":["RULE_GET"],"arrayCount":0,"description":"ï¼¶ï¼¯ï¼£æ¿åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredValueOfVocConcentration","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":2,"type":"uint16_t","unitDescription":"ppm","valueDescription":"0x0000ï½0xFFFD(0ï½65533)"}]},{"classCode":30,"description":"å·®å§ã»ã³ãµ","name":"DIFFERENTIAL_PRESSURE_SENSOR_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"å·®å§è¨æ¸¬å¤","fields":[],"identifier":"MeasuredValueOfDifferentialPressure","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":2,"type":"int16_t","unitDescription":"Pa","valueDescription":"0x8001ï½0x7FFE(-32767ï½32766)"}]},{"classCode":31,"description":"é¢¨éã»ã³ãµ","name":"AIR_SPEED_SENSOR_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"é¢¨éè¨æ¸¬å¤","fields":[],"identifier":"MeasuredValueOfAirSpeed","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":2,"type":"uint16_t","unitDescription":"0.01m\/sec","valueDescription":"0x0000ï½0xFFFD(0ï½655.33m\/sec)"},{"access":["RULE_GET"],"arrayCount":0,"description":"é¢¨å","fields":[],"identifier":"AirFlowDirection","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"degree","valueDescription":"0x0000ï½0x0168(0ï½360degree)"}]},{"classCode":32,"description":"è­ãã»ã³ãµ","name":"ODOR_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"},{"access":["RULE_GET"],"arrayCount":0,"description":"è­ãæ¤ç¥ç¶æ
+","fields":[],"identifier":"OdorDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=è­ãæ¤ç¥æ,0x42=è­ãæ¤ç¥ç¡"},{"access":["RULE_GET"],"arrayCount":0,"description":"è­ãè¨æ¸¬å¤","fields":[],"identifier":"MeasuredOdorValue","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00ï½0xFD(0ï½253)"}]},{"classCode":33,"description":"çã»ã³ãµ","name":"FLAME_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"çæ¤ç¥ç¶æ
+","fields":[],"identifier":"FlameDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=çæ¤ç¥æ,0x42=çæ¤ç¥ç¡"},{"access":["RULE_SET"],"arrayCount":0,"description":"çæ¤ç¥ç¶æ
+ãªã»ããè¨­å®","fields":[],"identifier":"FlameDetectionStatusResetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":191,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"}]},{"classCode":34,"description":"é»åéã»ã³ãµ","name":"ELECTRIC_ENERGY_SENSOR_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®é»åéè¨æ¸¬å¤","fields":[],"identifier":"IntegralElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"0.001kWh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ä¸­å®¹éã»ã³ãµç¬æé»åå¤è¨æ¸¬å¤","fields":[],"identifier":"MediumCapacitySensorInstantaneousElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":4,"type":"int32_t","unitDescription":"W","valueDescription":"0xC4653601ï½0x3B9AC9FF(-999,999,999ï½999,999,999)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å°å®¹éã»ã³ãµç¬æé»åå¤è¨æ¸¬å¤","fields":[],"identifier":"SmallCapacitySensorInstantaneousElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["NONE"],"size":2,"type":"int16_t","unitDescription":"0.1W","valueDescription":"0x8001ï½0x7FFE(-3276.7ï½3276.6)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å¤§å®¹éã»ã³ãµç¬æé»åå¤è¨æ¸¬å¤","fields":[],"identifier":"LargeCapacitySensorInstantaneousElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["NONE"],"size":2,"type":"int16_t","unitDescription":"0.1kW","valueDescription":"0x8001ï½0x7FFE(-3276.7ï½3276.6)"},{"access":["RULE_GET"],"arrayCount":48,"description":"ç©ç®é»åéè¨æ¸¬å±¥æ­´æ
+å ±","fields":[],"identifier":"IntegralElectricEnergyMeasurementLog","initialValue":null,"isArray":true,"primitive":true,"propertyCode":228,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"0.001kWh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®å¹é»å§å¤è¨æ¸¬å¤","fields":[],"identifier":"EffectiveVoltageValue","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"V","valueDescription":"0x0000ï½0xFFFD(0ï½65533V)"}]},{"classCode":35,"description":"é»æµå¤ã»ã³ãµ","name":"CURRENT_VALUE_SENSOR_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"é»æµå¤è¨æ¸¬å¤ï¼","fields":[],"identifier":"MeasuredCurrentValue1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"mA","valueDescription":"0x00000000ï½0xFFFFFFFD(0ï½4,294,967,293mA)"},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬å¯¾è±¡å®æ ¼é»å§å¤","fields":[],"identifier":"RatedVoltageToBeMeasured","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"V","valueDescription":"0x0000ï½0xFFFD(0ï½65533V)"},{"access":["RULE_GET"],"arrayCount":0,"description":"é»æµå¤è¨æ¸¬å¤ï¼","fields":[],"identifier":"MeasuredCurrentValue2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["RULE_GET"],"size":4,"type":"int32_t","unitDescription":"mA","valueDescription":"0x80000001ï½0x7FFFFFFE(-2,147,483,647ï½2,147,483,646mA)"}]},{"classCode":36,"description":"æ¼å
+ã»ã³ãµ","name":"DAYLIGHT_SENSOR_EOBJ","propertyList":[]},{"classCode":37,"description":"æ°´æµéã»ã³ãµ","name":"WATER_FLOW_RATE_SENSOR_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®æµéè¨æ¸¬å¤","fields":[],"identifier":"IntegralFlowRate","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"cã¥","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999)"},{"access":["RULE_GET"],"arrayCount":0,"description":"æµéè¨æ¸¬å¤","fields":[],"identifier":"FlowRate","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"cã¥\/min","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999)"}]},{"classCode":38,"description":"å¾®åã»ã³ãµ","name":"MICROMOTION_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"å¾®åæ¤ç¥ç¶æ
+","fields":[],"identifier":"MicromotionDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å¾®åæ¤ç¥æ,0x42=å¾®åæ¤ç¥ç¡"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å¾®åæ¤ç¥ã«ã¦ã³ãæ°è¨­å®","fields":[],"identifier":"DetectionCounter","initialValue":null,"isArray":false,"primitive":true,"propertyCode":178,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":null,"valueDescription":"0x0000ï½0xFFFE(0ï½65534)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãµã³ããªã³ã°åæ°è¨­å®","fields":[],"identifier":"SamplingCount","initialValue":null,"isArray":false,"primitive":true,"propertyCode":188,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":null,"valueDescription":"0x0000ï½0xFFFE(0ï½65534)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãµã³ããªã³ã°æéè¨­å®å¤","fields":[],"identifier":"SamplingCycle","initialValue":null,"isArray":false,"primitive":true,"propertyCode":189,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"msec","valueDescription":"0x0000ï½0xFFFE(0ï½65534)"}]},{"classCode":39,"description":"ééã»ã³ãµ","name":"PASSAGE_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ééæ¤ç¥ãã¼ã«ãæéè¨­å®å¤","fields":[],"identifier":"PassageDetectionHoldTime","initialValue":null,"isArray":false,"primitive":true,"propertyCode":190,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"ms","valueDescription":"0x0000ï½0xFFFD(0ï½65533ms)"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"ééæ¤ç¥æ¹åç¶æ
+","fields":[],"identifier":"PassageDetectionDirection","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x30=ééç¡ã,0x31ï½0x38=ééæ¹å,0x39=ééãæ¤ç¥ãããå ´æãç¹å®ã§ããªãå ´åããããã¯ãééæ¹åãæ¤ç¥ã§ããªãã»ã³ãµã«ãããééããã"}]},{"classCode":40,"description":"å¨åºã»ã³ãµ","name":"BED_PRESENCE_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«è¨­å®","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"å¨åºæ¤ç¥ç¶æ
+","fields":[],"identifier":"BedPresenceDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å¨åºæ¤ç¥æ,0x42=å¨åºæ¤ç¥ç¡"}]},{"classCode":41,"description":"ééã»ã³ãµ","name":"OPEN_CLOSE_SENSOR_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"éåº¦æ¤ç¥ç¶æ
+ï¼","fields":[],"identifier":"DegreeOfOpeniNgDetectionStatus1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x30=éæ¤ç¥æã,0x31ï½0x38=éåº¦ã¬ãã«,0x39=éæ¤ç¥æãéåº¦ä¸æ"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"éåº¦æ¤ç¥ç¶æ
+ï¼","fields":[],"identifier":"DegreeOfOpeniNgDetectionStatus2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=éæ¤ç¥æ,0x42=éæ¤ç¥æ"}]},{"classCode":42,"description":"æ´»åéã»ã³ãµ","name":"ACTIVITY_AMOUNT_SENSOR_EOBJ","propertyList":[{"access":["VARIABLE"],"arrayCount":128,"description":"æ´»åéã¬ãã«ï¼","fields":[],"identifier":"ActivityAmountLevel1","initialValue":null,"isArray":true,"primitive":true,"propertyCode":224,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"},{"access":["RULE_GET"],"arrayCount":0,"description":"äººä½ï¼©ï¼¤æ°æå¤§å¤","fields":[],"identifier":"MaximumNumberOfHumanBodyIdFs","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":null,"valueDescription":"0x0001ï½0x0080(1ï½128)"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ´»åéã¬ãã«ï¼","fields":[],"identifier":"ActivityAmountLevel2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"},{"access":["RULE_GET"],"arrayCount":16,"description":"å­å¨äººä½æ
+å ±","fields":[],"identifier":"HumanBodyExistenceInformation","initialValue":null,"isArray":true,"primitive":true,"propertyCode":227,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"(è©³ç´°ã¯ãèª¬æ(5)åç
+§)"}]},{"classCode":43,"description":"äººä½ä½ç½®ã»ã³ãµ","name":"HUMAN_BODY_LOCATION_SENSOR_EOBJ","propertyList":[{"access":["VARIABLE"],"arrayCount":128,"description":"äººä½æ¤ç¥ä½ç½®ï¼","fields":[],"identifier":"HumanBodyDetectionLocation1","initialValue":null,"isArray":true,"primitive":false,"propertyCode":224,"required":["NONE"],"size":0,"type":"location_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"äººä½ï¼©ï¼¤æ°æå¤§å¤","fields":[],"identifier":"MaximumNumberOfHumanBodyIdFs","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":null,"valueDescription":"0x0001ï½0x0080(1ï½128)"},{"access":["RULE_GET"],"arrayCount":0,"description":"äººä½æ¤ç¥ä½ç½®ï¼","fields":[{"arrayCount":0,"description":"Xåº§æ¨","fields":[],"identifier":"XCoordinate","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""},{"arrayCount":0,"description":"Yåº§æ¨","fields":[],"identifier":"YCoordinate","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""},{"arrayCount":0,"description":"Zåº§æ¨","fields":[],"identifier":"ZCoordinate","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""}],"identifier":"HumanBodyDetectionLocation2","initialValue":null,"isArray":false,"primitive":false,"propertyCode":226,"required":["NONE"],"size":3,"type":"location_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":16,"description":"å­å¨äººä½æ
+å ±","fields":[],"identifier":"HumanBodyExistenceInformation","initialValue":null,"isArray":true,"primitive":true,"propertyCode":227,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"(è©³ç´°ã¯ãèª¬æ(5)åç
+§)"}]},{"classCode":44,"description":"éªã»ã³ãµ","name":"SNOW_SENSOR_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤ç¥é¾å¤ã¬ãã«","fields":[],"identifier":"DetectionThresholdLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38(ã¬ãã«1ï½ã¬ãã«8)"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"éªæ¤ç¥ç¶æ
+","fields":[],"identifier":"SnowDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=éªæ¤ç¥æ,0x42=éªæ¤ç¥ç¡"}]}]},{"classGroupCode":1,"description":"ç©ºèª¿é¢é£æ©å¨","define":"X1_AIR_CONDITIONER","classList":[{"classCode":48,"description":"å®¶åº­ç¨ã¨ã¢ã³ã³","name":"HOME_AIR_CONDITIONER_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"éè»¢ã¢ã¼ãè¨­å®","fields":[],"identifier":"OperationModeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=èªå,0x42=å·æ¿,0x43=ææ¿,0x44=é¤æ¹¿,0x45=éé¢¨,0x40=ãã®ä»"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¸©åº¦èªåè¨­å®","fields":[],"identifier":"AutomaticTemperatureControlSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=AUTO,0x42=éAUTO"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¥éåä½ã¢ã¼ãè¨­å®","fields":[],"identifier":"NormalHighSpeedSilentOperationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":178,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=éå¸¸éè»¢,0x42=æ¥é,0x43=éé³"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¸©åº¦è¨­å®å¤","fields":[],"identifier":"SetTemperatureValue","initialValue":null,"isArray":false,"primitive":true,"propertyCode":179,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x32(0ï½50â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¤æ¹¿ã¢ã¼ãæç¸å¯¾æ¹¿åº¦è¨­å®å¤","fields":[],"identifier":"SetValueOfRelativeHumidityInDehumidifyingMode","initialValue":null,"isArray":false,"primitive":true,"propertyCode":180,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å·æ¿ã¢ã¼ãææ¸©åº¦è¨­å®å¤","fields":[],"identifier":"SetTemperatureValueInCoolingMode","initialValue":null,"isArray":false,"primitive":true,"propertyCode":181,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x32(0ï½50â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ææ¿ã¢ã¼ãææ¸©åº¦è¨­å®å¤","fields":[],"identifier":"SetTemperatureValueInHeatingMode","initialValue":null,"isArray":false,"primitive":true,"propertyCode":182,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x32(0ï½50â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¤æ¹¿ã¢ã¼ãææ¸©åº¦è¨­å®å¤","fields":[],"identifier":"SetTemperatureValueInDehumidifyingMode","initialValue":null,"isArray":false,"primitive":true,"propertyCode":183,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x32(0ï½50â)"},{"access":["RULE_GET"],"arrayCount":4,"description":"å®æ ¼æ¶è²»é»åå¤","fields":[],"identifier":"RatedPowerConsumption","initialValue":null,"isArray":true,"primitive":true,"propertyCode":184,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å·æ¿ï¼ææ¿ï¼é¤æ¹¿ï¼éé¢¨æ¶è²»é»æµè¨æ¸¬å¤","fields":[],"identifier":"MeasuredValueOfCurrentConsumption","initialValue":null,"isArray":false,"primitive":true,"propertyCode":185,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0xFFFD(0ï½6553.3A)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®¤å
+ç¸å¯¾æ¹¿åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredValueOfRoomRelativeHumidity","initialValue":null,"isArray":false,"primitive":true,"propertyCode":186,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®¤å
+æ¸©åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredValueOfRoomTemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":187,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"â","valueDescription":"0x81ï½0x7D(-127ï½125â)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ã¦ã¼ã¶ãªã¢ã³ã³æ¸©åº¦è¨­å®å¤","fields":[],"identifier":"SetTemperatureValueOfUserRemoteControl","initialValue":null,"isArray":false,"primitive":true,"propertyCode":188,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x32(0ï½50â)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å¹ãåºãæ¸©åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredCooledAirTemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":189,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"â","valueDescription":"0x81ï½0x7D(-127ï½125â)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å¤æ°æ¸©åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredOutdoorAirTemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":190,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"â","valueDescription":"0x81ï½0x7D(-127ï½125â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç¸å¯¾æ¸©åº¦è¨­å®å¤","fields":[],"identifier":"RelativeTemperatureSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":191,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"0.1â","valueDescription":"0x81ï½0x7D(-12.7ï½12.5â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨éè¨­å®","fields":[],"identifier":"AirFlowRateSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":160,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é¢¨éèªåè¨­å®,0x31ï½0x38=é¢¨éã¬ãã«"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åèªåè¨­å®","fields":[],"identifier":"AutomaticControlOfAirFlowDirectionSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":161,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=AUTO,0x42=éAUTO,0x43=ä¸ä¸AUTO,0x44=å·¦å³AUTO"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åã¹ã¤ã³ã°è¨­å®","fields":[],"identifier":"AutomaticSwingOfAirFlowSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":163,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31=é¢¨åã¹ã¤ã³ã°OFF,0x41=ä¸ä¸,0x42=å·¦å³,0x43=ä¸ä¸å·¦å³"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åä¸ä¸è¨­å®","fields":[],"identifier":"AirFlowDirectionVerticalSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":164,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ä¸,0x42=ä¸,0x43=ä¸­å¤®,0x44=ä¸ä¸­,0x45=ä¸ä¸­"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åå·¦å³è¨­å®","fields":[],"identifier":"AirFlowDirectionHorizontalSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":165,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å³,0x42=å·¦,0x43=ä¸­å¤®,0x44=å·¦å³,ä»ããã­ããã£è©³ç´°èª¬æã®è¡¨ã«è¨è¼ã®ã³ã¼ãã§ç¤ºãã"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¹æ®ç¶æ
+","fields":[],"identifier":"SpecialState","initialValue":null,"isArray":false,"primitive":true,"propertyCode":170,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=éå¸¸ç¶æ
+,0x41=é¤éç¶æ
+,0x42=äºç±ç¶æ
+,0x43=æç±ç¶æ
+"},{"access":["RULE_GET"],"arrayCount":0,"description":"éåªå
+ç¶æ
+","fields":[],"identifier":"NonPriorityState","initialValue":null,"isArray":false,"primitive":true,"propertyCode":171,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=éå¸¸ç¶æ
+,0x41=éåªå
+ç¶æ
+"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ææ°ã¢ã¼ãè¨­å®","fields":[],"identifier":"VentilationFunctionSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":192,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ææ°ONï¼ææ°æ¹åï¼,0x42=ææ°OFF,0x43=ææ°ONï¼å¸æ°æ¹åï¼"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å æ¹¿ã¢ã¼ãè¨­å®","fields":[],"identifier":"HumidifierFunctionSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":193,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å æ¹¿ON,0x42=OFF"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ææ°é¢¨éè¨­å®","fields":[],"identifier":"VentilationAirFlowRateSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":194,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ææ°é¢¨éèªå,0x31ï½0x38=ææ°é¢¨éã¬ãã«"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å æ¹¿éè¨­å®","fields":[],"identifier":"DegreeOfHumidificationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":196,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å æ¹¿éèªå,0x31ï½0x38=å æ¹¿éã¬ãã«"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ­è¼ç©ºæ°æ¸
+æµæ¹æ³","fields":[],"identifier":"MountedAirCleaningMethod","initialValue":null,"isArray":false,"primitive":true,"propertyCode":198,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]é»æ°éå¡µæ¹å¼æ­è¼æ
+å ±:0=éæ­è¼,1=æ­è¼\u000d\u000a[1]ã¯ã©ã¹ã¿ã¤ãªã³æ¹å¼æ­è¼æ
+å ±:0=éæ­è¼,1=æ­è¼"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç©ºæ°æ¸
+æµæ©è½ã¢ã¼ãè¨­å®","fields":[{"arrayCount":0,"description":"é»æ°éå¡µæ¹å¼ã«ããç©ºæ°æ¸
+æµæ©è½ã®è¨­å®ç¶æ
+","fields":[],"identifier":"WhetherOrNotToUseTheElectricalDustCollectionBasedAirPurifierFunction","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""},{"arrayCount":0,"description":"ã¯ã©ã¹ã¿ã¤ãªã³æ¹å¼ã«ããç©ºæ°æ¸
+æµæ©è½ã®è¨­å®ç¶æ
+","fields":[],"identifier":"WhetherOrNotToUseTheClusterIonBasedAirPurifierFunction","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""},{"arrayCount":6,"description":"for future reserved","fields":[],"identifier":"Reserved","initialValue":null,"isArray":true,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""}],"identifier":"AirPurifierFunctionSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":199,"required":["NONE"],"size":8,"type":"air_purifier_function_setting_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"æ­è¼ãªãã¬ãã·ã¥æ¹æ³","fields":[],"identifier":"MountedAirRefreshMethod","initialValue":null,"isArray":false,"primitive":true,"propertyCode":200,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ãã¤ãã¹ã¤ãªã³æ¹å¼æ­è¼æ
+å ±:0=éæ­è¼,1=æ­è¼\u000d\u000a[1]ã¯ã©ã¹ã¿ã¤ãªã³æ¹å¼æ­è¼æ
+å ±:0=éæ­è¼,1=æ­è¼"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãªãã¬ãã·ã¥æ©è½ã¢ã¼ãè¨­å®","fields":[{"arrayCount":0,"description":"ãã¤ãã¹ã¤ãªã³æ¹å¼ã«ãããªãã¬ãã·ã¥æ©è½ã®è¨­å®ç¶æ
+","fields":[],"identifier":"WhetherOrNotToUseTheMinusIonBasedAirRefresherFunction","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""},{"arrayCount":0,"description":"ã¯ã©ã¹ã¿ã¤ãªã³æ¹å¼ã«ãããªãã¬ãã·ã¥æ©è½ã®è¨­å®ç¶æ
+","fields":[],"identifier":"WhetherOrNotToUseTheClusterIonBasedAirRefresherFunction","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""},{"arrayCount":6,"description":"for future reserved","fields":[],"identifier":"Reserved","initialValue":null,"isArray":true,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""}],"identifier":"AirRefresherFunctionSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":201,"required":["NONE"],"size":8,"type":"air_refresher_function_setting_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"æ­è¼èªå·±æ´æµæ¹æ³","fields":[],"identifier":"MountedSelfCleaningMethod","initialValue":null,"isArray":false,"primitive":true,"propertyCode":202,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ãªã¾ã³æ´æµæ¹å¼æ­è¼æ
+å ±:0=éæ­è¼,1=æ­è¼\u000d\u000a[1]ä¹¾ç¥æ¹å¼æ­è¼æ
+å ±:0=éæ­è¼,1=æ­è¼"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"èªå·±æ´æµæ©è½ã¢ã¼ãè¨­å®","fields":[{"arrayCount":0,"description":"ãªã¾ã³æ´æµæ¹å¼ã«ããèªå·±æ´æµæ©è½ã®è¨­å®ç¶æ
+","fields":[],"identifier":"WhetherOrNotToUseTheOzoneBasedSelfCleaningFunction","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""},{"arrayCount":0,"description":"ä¹¾ç¥æ¹å¼ã«ããèªå·±æ´æµæ©è½ã®è¨­å®ç¶æ
+","fields":[],"identifier":"WhetherOrNotToUseTheDryingBasedSelfCleaningFunction","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""},{"arrayCount":6,"description":"for future reserved","fields":[],"identifier":"Reserved","initialValue":null,"isArray":true,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""}],"identifier":"SelfCleaningFunctionSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":203,"required":["NONE"],"size":8,"type":"self_cleaning_function_setting_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç¹å¥éè»¢ã¢ã¼ãè¨­å®","fields":[],"identifier":"SpecialFunctionSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":204,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=è¨­å®ãªã,0x41=è¡£é¡ä¹¾ç¥,0x42=çµé²æå¶,0x43=ããã«ãæå¶,0x44=å¼·å¶é¤é,0x45ï½=for future reserved"},{"access":["RULE_GET"],"arrayCount":0,"description":"å
+é¨åä½ç¶æ
+","fields":[],"identifier":"OperationStatusOfComponents","initialValue":null,"isArray":false,"primitive":true,"propertyCode":205,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ã³ã³ãã¬ããµåä½ç¶æ
+:0=åæ­¢ä¸­,1=åä½ä¸­\u000d\u000a[1]ãµã¼ã¢ON\/OFFç¶æ
+:0=ãµã¼ã¢OFFç¶æ
+,1=ãµã¼ã¢ONç¶æ
+\u000d\u000a[2ï½7]for future reserved"},{"access":["RULE_SET"],"arrayCount":0,"description":"å¼·å¶ãµã¼ã¢ã¢ã¼ãè¨­å®","fields":[],"identifier":"ThermostatSettingOverrideFunction","initialValue":null,"isArray":false,"primitive":true,"propertyCode":206,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=éå¸¸è¨­å®,0x41=å¼·å¶ãµã¼ã¢ON,0x42=å¼·å¶ãµã¼ã¢OFF"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç©ºæ°æ¸
+æµã¢ã¼ãè¨­å®","fields":[],"identifier":"AirPurificationModeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":207,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç©ºæ°æ¸
+æµON,0x42=OFF"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OnTimerBasedReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":144,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æå»äºç´ãç¸å¯¾æéäºç´å
+±ã«å
+¥,0x42=äºç´å,0x43=æå»äºç´ã®ã¿å
+¥ã,0x44=ç¸å¯¾æå»äºç´ã®ã¿å
+¥ã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OnTimerSettingTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":145,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æé","valueDescription":"0x00ï½0xFF(0ï½255)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OnTimerSettingRelativeTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":146,"required":["NONE"],"size":2,"type":"hours_minutes_2type_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OffTimerBasedReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":148,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æå»äºç´ãç¸å¯¾æéäºç´å
+±ã«å
+¥,0x42=äºç´å,0x43=æå»äºç´ã®ã¿å
+¥ã,0x44=ç¸å¯¾æå»äºç´ã®ã¿å
+¥ã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OffTimerSettingTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":149,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æé","valueDescription":"0x00ï½0xFF(0ï½255)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OffTimerSettingRelativeTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":150,"required":["NONE"],"size":2,"type":"hours_minutes_2type_t","unitDescription":null,"valueDescription":""}]},{"classCode":49,"description":"å·é¢¨æ©","name":"COLD_BLASTER_EOBJ","propertyList":[]},{"classCode":50,"description":"æé¢¨æ©","name":"ELECTRIC_FAN_EOBJ","propertyList":[]},{"classCode":51,"description":"ææ°æ","name":"VENTILATION_FAN_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ææ°èªåè¨­å®","fields":[],"identifier":"VentilationAutoSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":191,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=AUTO,0x42=éAUTO"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ææ°é¢¨éè¨­å®","fields":[],"identifier":"SetValueOfVentilationAirFlowRate","initialValue":null,"isArray":false,"primitive":true,"propertyCode":160,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ææ°é¢¨éèªåç¶æ
+,0x31ï½0x38=ææ°é¢¨éã¬ãã«"}]},{"classCode":52,"description":"ç©ºèª¿ææ°æ","name":"AIR_CONDITIONER_VENTILATION_FAN_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å®¤å
+ç¸å¯¾æ¹¿åº¦è¨­å®å¤","fields":[],"identifier":"SetValueOfRoomRelativeHumidity","initialValue":null,"isArray":false,"primitive":true,"propertyCode":180,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ææ°èªåè¨­å®","fields":[],"identifier":"VentilationAutoSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":191,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=AUTO,0x42=éAUTO"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®¤å
+ç¸å¯¾æ¹¿åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredValueOfRoomRelativeHumidity","initialValue":null,"isArray":false,"primitive":true,"propertyCode":186,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ææ°é¢¨éè¨­å®","fields":[],"identifier":"SetValueOfVentilationAirFlowRate","initialValue":null,"isArray":false,"primitive":true,"propertyCode":160,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ææ°é¢¨éèªåç¶æ
+,0x31ï½0x38=ææ°é¢¨éã¬ãã«"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç±äº¤ææ©åä½è¨­å®","fields":[],"identifier":"HeatExchangerOperationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç±äº¤ææ©ON,0x42=OFF"},{"access":["RULE_GET"],"arrayCount":0,"description":"ï¼£ï¼¯ï¼æ¿åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredValueOfCo2Concentration","initialValue":null,"isArray":false,"primitive":true,"propertyCode":192,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"ppm","valueDescription":"0x0000ï½0xFFFD(0ï½65533ppm)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç
+ï¼ã¿ãã³ï¼æ¤ç¥ç¶æ
+","fields":[],"identifier":"SmokeCigaretteDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":193,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç
+ï¼ã¿ãã³ï¼æ¤ç¥æ,0x42=ç
+ï¼ã¿ãã³ï¼æ¤ç¥ç¡"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ±ãæ¤ç¥ç¶æ
+","fields":[],"identifier":"PollutionDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":194,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ±ãæ¤ç¥æ,0x42=æ±ãæ¤ç¥ç¡"}]},{"classCode":53,"description":"ç©ºæ°æ¸
+æµå¨","name":"AIR_CLEANER_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"ãã£ã«ã¿ã¼äº¤æéç¥ç¶æ
+","fields":[],"identifier":"FilterChangeNotice","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ,0x42=ç¡"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨éè¨­å®","fields":[],"identifier":"AirFlowRateSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":160,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ææ°é¢¨éèªåç¶æ
+,0x31ï½0x38=ææ°é¢¨éã¬ãã«"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç
+ï¼ã¿ãã³ï¼æ¤ç¥ç¶æ
+","fields":[],"identifier":"SmokeCigaretteDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":193,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç
+ï¼ã¿ãã³ï¼æ¤ç¥æ,0x42=ç
+ï¼ã¿ãã³ï¼æ¤ç¥ç¡"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å
+è§¦åªåä½è¨­å®","fields":[],"identifier":"OpticalCatalystOperationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":194,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å
+è§¦åªON,0x42=å
+è§¦åªOFF"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ºæ°æ±ãæ¤ç¥ç¶æ
+","fields":[],"identifier":"AirPollutionDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":192,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç©ºæ°æ±ãæ¤ç¥æ,0x42=ç©ºæ°æ±ãæ¤ç¥ç¡"}]},{"classCode":54,"description":"å·é¢¨æ","name":"COLD_BLAST_FAN_EOBJ","propertyList":[]},{"classCode":55,"description":"ãµã¼ã­ã¥ã¬ã¼ã¿","name":"CIRCULATOR_EOBJ","propertyList":[]},{"classCode":56,"description":"é¤æ¹¿æ©","name":"DEHUMIDIFIER_EOBJ","propertyList":[]},{"classCode":57,"description":"å æ¹¿å¨","name":"HUMIDIFIER_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å æ¹¿è¨­å®ï¼","fields":[],"identifier":"HumidifyingSetting1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":192,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00ï½0x64(0ï½100%),0x70=èªåè¨­å®,0x71=é£ç¶éè»¢,0x72=éæ¬ éè»¢"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å æ¹¿è¨­å®ï¼","fields":[],"identifier":"HumidifyingSetting2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":193,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x33=å æ¹¿ã¬ãã«,0x70=èªåè¨­å®,0x71=é£ç¶éè»¢,0x72=éæ¬ éè»¢"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¸å¯¾æ¹¿åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredValueOfRelativeHumidity","initialValue":null,"isArray":false,"primitive":true,"propertyCode":180,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"ReservationSetOfOffTimer","initialValue":null,"isArray":false,"primitive":true,"propertyCode":148,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"RelativeTimeValueSetOfOffTimer","initialValue":null,"isArray":false,"primitive":false,"propertyCode":150,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ã¤ãªã³æ¾åºè¨­å®","fields":[],"identifier":"IonEmissionSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":194,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ¾åºå
+¥,0x42=æ¾åºå"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ­è¼ã¤ãªã³æ¾åºæ¹æ³","fields":[],"identifier":"ImplementedIonEmissionMethod","initialValue":null,"isArray":false,"primitive":true,"propertyCode":195,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ãã¤ãã¹ã¤ãªã³æ¹å¼\u000d\u000a[1]ã¯ã©ã¹ã¿ã¤ãªã³æ¹å¼"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç¹å¥éè»¢ã¢ã¼ãè¨­å®","fields":[],"identifier":"SpecialOperationModeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":196,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"è¨­å®æå¹ã®å ´åã1ã¨ãã\u000d\u000a[0]ã®ã©ä¹¾ç¥æå¶\u000d\u000a[1]éé³éè»¢\u000d\u000a[2ï½7]for future reserved"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ°´éã¬ãã«","fields":[],"identifier":"WaterAmountLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":197,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=ç©ºç¶æ
+,0x41ï½0x45(æä½ï½æé«ã¬ãã«)"}]},{"classCode":58,"description":"å¤©äºæ","name":"CEILING_FAN_EOBJ","propertyList":[]},{"classCode":59,"description":"é»æ°ããã¤","name":"ELECTRIC_KOTATSU_EOBJ","propertyList":[]},{"classCode":60,"description":"é»æ°ããã","name":"ELECTRIC_HEATING_PAD_EOBJ","propertyList":[]},{"classCode":61,"description":"é»æ°æ¯å¸","name":"ELECTRIC_BLANKET_EOBJ","propertyList":[]},{"classCode":62,"description":"ã¹ãã¼ã","name":"SPACE_HEATER_EOBJ","propertyList":[]},{"classCode":63,"description":"ããã«ãã¼ã¿","name":"PANEL_HEATER_EOBJ","propertyList":[]},{"classCode":64,"description":"é»æ°ã«ã¼ããã","name":"ELECTRIC_CARPET_EOBJ","propertyList":[]},{"classCode":65,"description":"ãã­ã¢ãã¼ã¿","name":"FLOOR_HEATER_EOBJ","propertyList":[]},{"classCode":66,"description":"é»æ°ææ¿æ©","name":"ELECTRIC_HEATER_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¸©åº¦èªåè¨­å®","fields":[],"identifier":"AutomaticTemperatureControlSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=AUTO,0x42=éAUTO"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¸©åº¦è¨­å®å¤","fields":[],"identifier":"TemperatureSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":179,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x32(0ï½50)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®¤å
+æ¸©åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredRoomTemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":187,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"â","valueDescription":"0x81ï½0x7E(-128ï½127)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ã¦ã¼ã¶ãªã¢ã³ã³æ¸©åº¦è¨­å®å¤","fields":[],"identifier":"RemotelySetTemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":188,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x32(0ï½50)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨éè¨­å®","fields":[],"identifier":"AirFlowRateSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":160,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é¢¨éèªåç¶æ
+,0x31ï½0x38=é¢¨éã¬ãã«"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OnTimerBasedReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":144,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OnTimerSettingTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":145,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OnTimerSettingRelativeTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":146,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OffTimerBasedReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":148,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OffTimerSettingTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":149,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"SetValueOfOffTimerRelativeTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":150,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""}]},{"classCode":67,"description":"ãã¡ã³ãã¼ã¿","name":"FAN_HEATER_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¸©åº¦è¨­å®å¤","fields":[],"identifier":"TemperatureSettingValue","initialValue":null,"isArray":false,"primitive":true,"propertyCode":179,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x32(0ï½50)"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ¸©åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredTemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":187,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"â","valueDescription":"0x81ï½0x7D(-128ï½125)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¸©åº¦èªåè¨­å®","fields":[],"identifier":"AutomaticTemperatureControlSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=AUTO,0x42=éAUTO"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OnTimerReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":144,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æå»äºç´ãç¸å¯¾æéäºç´å
+±ã«å
+¥,0x42=äºç´å,0x43=æå»äºç´ã®ã¿å
+¥,0x44=ç¸å¯¾æéäºç´ã®ã¿å
+¥"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OnTimerSettingValueTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":145,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OnTimerSettingValueRelativeTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":146,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OffTimerReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":148,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æå»äºç´ãç¸å¯¾æéäºç´å
+±ã«å
+¥,0x42=äºç´å,0x43=æå»äºç´ã®ã¿å
+¥,0x44=ç¸å¯¾æéäºç´ã®ã¿å
+¥"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OffTimerSettingValueTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":149,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OffTimerValueRelativeTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":150,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å»¶é·éè»¢è¨­å®","fields":[],"identifier":"ExtentionalOperationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":192,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å»¶é·å
+¥,0x42=å»¶é·å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å»¶é·ã¿ã¤ãæéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"ExtentionalOperationTimerTimeSettingValue","initialValue":null,"isArray":false,"primitive":false,"propertyCode":193,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ã¤ãªã³æ¾åºè¨­å®","fields":[],"identifier":"IonEmissionSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":194,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ¾åºå
+¥,0x42=æ¾åºå"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ­è¼ã¤ãªã³æ¾åºæ¹æ³","fields":[],"identifier":"ImplementedIonEmissionMethod","initialValue":null,"isArray":false,"primitive":true,"propertyCode":195,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ãã¤ãã¹ã¤ãªã³æ¹å¼\u000d\u000a[1]ã¯ã©ã¹ã¿ã¤ãªã³æ¹å¼"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ²¹éã¬ãã«","fields":[],"identifier":"OilAmountLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":196,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=ç©ºç¶æ
+,0x41ï½0x45(æä½ï½æé«ã¬ãã«)"}]},{"classCode":68,"description":"å
+
+é»å¨","name":"BATTERY_CHARGER_EOBJ","propertyList":[]},{"classCode":69,"description":"æ¥­åç¨ããã±ã¼ã¸ã¨ã¢ã³ã³å®¤å
+æ©","name":"PACKAGE_TYPE_COMMERCIAL_AIR_CONDITIONER_INDOOR_UNIT_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"éè»¢ã¢ã¼ãè¨­å®","fields":[],"identifier":"OperationModeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=èªå,0x42=å·æ¿,0x43=ææ¿,0x44=é¤æ¹¿,0x45=éé¢¨"},{"access":["RULE_SET","RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"æ¸©åº¦è¨­å®å¤ï¼","fields":[],"identifier":"TemperatureSetting1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":179,"required":["RULE_SET","RULE_GET"],"size":1,"type":"int8_t","unitDescription":"1â","valueDescription":"0x00ï½0x32(0ï½50â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¤æ¹¿ã¢ã¼ãæç¸å¯¾æ¹¿åº¦è¨­å®å¤ï¼","fields":[],"identifier":"RelativeHumiditySettingForDehumidificationMode1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":180,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":"1ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å·æ¿ã¢ã¼ãææ¸©åº¦è¨­å®å¤ï¼","fields":[],"identifier":"TemperatureSettingForCoolingMode1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":181,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"1â","valueDescription":"0x00ï½0x32(0ï½50â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ææ¿ã¢ã¼ãææ¸©åº¦è¨­å®å¤ï¼","fields":[],"identifier":"TemperatureSettingForHeatingMode1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":182,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"1â","valueDescription":"0x00ï½0x32(0ï½50â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¤æ¹¿ã¢ã¼ãææ¸©åº¦è¨­å®å¤ï¼","fields":[],"identifier":"TemperatureSettingForDehumidificationMode1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":183,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"1â","valueDescription":"0x00ï½0x32(0ï½50â)"},{"access":["RULE_GET"],"arrayCount":4,"description":"å®¤å
+å®æ ¼æ¶è²»é»åå¤","fields":[],"identifier":"RatedPowerConsumptionOfIndoorUnit","initialValue":null,"isArray":true,"primitive":true,"propertyCode":184,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å·æ¿ï¼ææ¿ï¼é¤æ¹¿ï¼éé¢¨å®¤å
+æ¶è²»é»æµè¨æ¸¬å¤","fields":[],"identifier":"MeasuredElectricCurrentConsumptionOfIndoorUnit","initialValue":null,"isArray":false,"primitive":true,"propertyCode":185,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0xFFFD(0ï½6553.3A)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®¤å
+ç¸å¯¾æ¹¿åº¦è¨æ¸¬å¤ï¼","fields":[],"identifier":"MeasuredIndoorRelativeHumidity1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":186,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"1ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®¤å
+æ¸©åº¦è¨æ¸¬å¤ï¼","fields":[],"identifier":"MeasuredIndoorTemperature1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":187,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"1â","valueDescription":"0x81ï½0x7D(-127ï½125â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç¸å¯¾æ¸©åº¦è¨­å®å¤","fields":[],"identifier":"RelativeTemperatureSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":191,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"0.1â","valueDescription":"0x81ï½0x7D(-12.7ï½12.5â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨éè¨­å®","fields":[],"identifier":"AirFlowRateSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":160,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é¢¨éèªåç¶æ
+,0x31ï½0x38=é¢¨éã¬ãã«"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åä¸ä¸è¨­å®","fields":[],"identifier":"AirFlowDirectionVerticalSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":164,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31=èªå,0x32=ã¹ã¤ã³ã°,0x41ï½0x49=é¢¨åä¸ä¸è¨­å®(æä¸ï½æä¸)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åå·¦å³è¨­å®","fields":[],"identifier":"AirFlowDirectionHorizontalSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":165,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31=èªå,0x32=ã¹ã¤ã³ã°,0x41=å³,0x42=å·¦,0x43=ä¸­å¤®,0x44=å·¦å³"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¹æ®ç¶æ
+","fields":[],"identifier":"SpecialState","initialValue":null,"isArray":false,"primitive":true,"propertyCode":170,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=éå¸¸ç¶æ
+,0x42=äºç±ç¶æ
+,0x43=æç±ç¶æ
+"},{"access":["RULE_GET"],"arrayCount":0,"description":"ãµã¼ã¢ç¶æ
+","fields":[],"identifier":"ThermostatState","initialValue":null,"isArray":false,"primitive":true,"propertyCode":172,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ãµã¼ã¢on,0x42=ãµã¼ã¢off"},{"access":["RULE_GET"],"arrayCount":0,"description":"èªåéè»¢æéè»¢ã¢ã¼ãç¶æ
+","fields":[],"identifier":"CurrentFunctionAutomaticOperationMode","initialValue":null,"isArray":false,"primitive":true,"propertyCode":174,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x42=å·æ¿,0x43=ææ¿,0x44=é¤æ¹¿,0x45=éé¢¨,0x40=ãã®ä»"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ææ°ã¢ã¼ãè¨­å®","fields":[],"identifier":"VentilationModeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":192,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ®éææ°,0x42=å
+¨ç±äº¤ææ°,0x43=èªåææ°"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å
+¨ç±äº¤æå¨é£åè¨­å®","fields":[],"identifier":"CombinedOperationOfIndoorUnitAndTotalHeatExchanger","initialValue":null,"isArray":false,"primitive":true,"propertyCode":193,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å
+¨ç±äº¤æå¨é£å,0x42=å
+¨ç±äº¤æå¨éé£å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ææ°é¢¨éè¨­å®","fields":[],"identifier":"VentilationAirFlowRateSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":194,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ææ°é¢¨éèªå,0x31ï½0x38=ææ°é¢¨éã¬ãã«"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å¼·å¶åæ­¢è¨­å®","fields":[],"identifier":"DisablingOfAirConditionerSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":205,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å¼·å¶åæ­¢,0x42=è§£é¤"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å¼·å¶ãµã¼ã¢ã¢ã¼ãè¨­å®","fields":[],"identifier":"ThermostatSettingOverrideFunction","initialValue":null,"isArray":false,"primitive":true,"propertyCode":206,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=éå¸¸è¨­å®,0x41=å¼·å¶ãµã¼ã¢ON,0x42=å¼·å¶ãµã¼ã¢OFF"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãã£ã«ã¿ã¼ãµã¤ã³è¨­å®","fields":[],"identifier":"FilterCleaningReminderLampSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":207,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç¹ç¯,0x42=æ¶ç¯"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®¤å
+æ¶è²»é»åè¨æ¸¬å¤","fields":[],"identifier":"MeasuredPowerConsumptionOfIndoorUnit","initialValue":null,"isArray":false,"primitive":true,"propertyCode":219,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨å¼µå¼éåº¦ã¬ãã«","fields":[],"identifier":"ApertureOfExpansionValve","initialValue":null,"isArray":false,"primitive":true,"propertyCode":220,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100)"},{"access":["RULE_SET","RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"æ¸©åº¦è¨­å®å¤ï¼","fields":[],"identifier":"TemperatureSetting2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["RULE_SET","RULE_GET"],"size":2,"type":"int16_t","unitDescription":"0.1â","valueDescription":"0xFE0Cï½0x3E8(-50.0ï½100.0â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¤æ¹¿ã¢ã¼ãæç¸å¯¾æ¹¿åº¦è¨­å®å¤ï¼","fields":[],"identifier":"RelativeHumiditySettingForDehumidificationMode2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":228,"required":["RULE_SET","RULE_GET"],"size":2,"type":"uint16_t","unitDescription":"0.10ï¼
+","valueDescription":"0x0000ï½0x3E8(0.0ï½100.0%)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å·æ¿ã¢ã¼ãææ¸©åº¦è¨­å®å¤ï¼","fields":[],"identifier":"TemperatureSettingForCoolingMode2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["NONE"],"size":2,"type":"int16_t","unitDescription":"0.1â","valueDescription":"0xFE0Cï½0x3E8(-50.0ï½100.0â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ææ¿ã¢ã¼ãææ¸©åº¦è¨­å®å¤ï¼","fields":[],"identifier":"TemperatureSettingForHeatingMode2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":230,"required":["NONE"],"size":2,"type":"int16_t","unitDescription":"0.1â","valueDescription":"0xFE0Cï½0x3E8(-50.0ï½100.0â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¤æ¹¿ã¢ã¼ãææ¸©åº¦è¨­å®å¤ï¼","fields":[],"identifier":"TemperatureSettingForDehumidificationMode2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":231,"required":["NONE"],"size":2,"type":"int16_t","unitDescription":"0.1â","valueDescription":"0xFE0Cï½0x3E8(-50.0ï½100.0â)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®¤å
+ç¸å¯¾æ¹¿åº¦è¨æ¸¬å¤ï¼","fields":[],"identifier":"MeasuredIndoorRelativeHumidity2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":234,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.10ï¼
+","valueDescription":"0x0000ï½0x3E8(0.0ï½100.0%)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®¤å
+æ¸©åº¦è¨æ¸¬å¤ï¼","fields":[],"identifier":"MeasuredIndoorTemperature2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":235,"required":["NONE"],"size":2,"type":"int16_t","unitDescription":"0.1â","valueDescription":"0xF554ï½0x7FFD(-273.2ï½3276.5â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OnTimerBasedReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":144,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æå»äºç´ãç¸å¯¾æéäºç´å
+±ã«å
+¥,0x42=äºç´å,0x43=æå»äºç´ã®ã¿å
+¥,0x44=ç¸å¯¾æéäºç´ã®ã¿å
+¥"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OnTimerSettingTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":145,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æé","valueDescription":"0x00ï½0xFF(0ï½255)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OnTimerSettingRelativeTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":146,"required":["NONE"],"size":2,"type":"hours_minutes_2type_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OffTimerBasedReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":148,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æå»äºç´ãç¸å¯¾æéäºç´å
+±ã«å
+¥,0x42=äºç´å,0x43=æå»äºç´ã®ã¿å
+¥,0x44=ç¸å¯¾æéäºç´ã®ã¿å
+¥"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OffTimerSettingTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":149,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æé","valueDescription":"0x00ï½0xFF(0ï½255)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OffTimerSettingRelativeTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":150,"required":["NONE"],"size":2,"type":"hours_minutes_2type_t","unitDescription":null,"valueDescription":""}]},{"classCode":70,"description":"æ¥­åç¨ããã±ã¼ã¸ã¨ã¢ã³ã³å®¤å¤æ©","name":"PACKAGE_TYPE_COMMERCIAL_AIR_CONDITIONER_OUTDOOR_UNIT_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"éè»¢ã¢ã¼ãè¨­å®","fields":[],"identifier":"OperationModeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=èªå,0x42=å·æ¿,0x43=ææ¿,0x44=é¤æ¹¿,0x45=éé¢¨"},{"access":["RULE_GET"],"arrayCount":3,"description":"å®¤å¤å®æ ¼æ¶è²»é»åå¤","fields":[],"identifier":"RatedPowerConsumptionOfOutdoorUnit","initialValue":null,"isArray":true,"primitive":true,"propertyCode":184,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å·æ¿ï¼ææ¿ï¼é¤æ¹¿å®¤å¤æ¶è²»é»æµè¨æ¸¬å¤","fields":[],"identifier":"MeasuredElectricCurrentConsumptionOfOutdoorUnit","initialValue":null,"isArray":false,"primitive":true,"propertyCode":185,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0xFFFD(0ï½6553.3A)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å¤æ°æ¸©åº¦è¨æ¸¬å¤ï¼","fields":[],"identifier":"MeasuredOutdoorAirTemperature1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":190,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"1â","valueDescription":"0x81ï½0x7D(-127ï½125â)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¹æ®ç¶æ
+","fields":[],"identifier":"SpecialState","initialValue":null,"isArray":false,"primitive":true,"propertyCode":170,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=éå¸¸ç¶æ
+,0x41=é¤éç¶æ
+"},{"access":["RULE_GET"],"arrayCount":0,"description":"å§ç¸®æ©åä½ç¶æ
+","fields":[],"identifier":"OperationStatusOfCompressor","initialValue":null,"isArray":false,"primitive":true,"propertyCode":208,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å§ç¸®æ©ON,0x42=å§ç¸®æ©OFF"},{"access":["RULE_GET"],"arrayCount":0,"description":"éè»¢ã¢ã¼ãç¶æ
+","fields":[],"identifier":"OperationModeInformation","initialValue":null,"isArray":false,"primitive":true,"propertyCode":209,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x42=å·æ¿,0x43=ææ¿,0x44=é¤æ¹¿,0x40=ãã®ä»"},{"access":["RULE_GET"],"arrayCount":0,"description":"ãã¡ã³åè»¢ã¬ãã«","fields":[],"identifier":"FanRotationSpeed","initialValue":null,"isArray":false,"primitive":true,"propertyCode":210,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®¤å¤æ¶è²»é»åè¨æ¸¬å¤","fields":[],"identifier":"MeasuredPowerConsumptionOfOutdoorUnit","initialValue":null,"isArray":false,"primitive":true,"propertyCode":219,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å¤æ°æ¸©åº¦è¨æ¸¬å¤ï¼","fields":[],"identifier":"MeasuredOutdoorAirTemperature2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":238,"required":["NONE"],"size":2,"type":"int16_t","unitDescription":"0.1â","valueDescription":"0xF554ï½0x7FFD(-273.2ï½3276.5â)"}]},{"classCode":71,"description":"æ¥­åç¨ããã±ã¼ã¸ã¨ã¢ã³ã³èç±ã¦ããã","name":"PACKAGE_TYPE_COMMERCIAL_AIR_CONDITIONER_THERMAL_STORAGE_UNIT_EOBJ","propertyList":[]},{"classCode":72,"description":"æ¥­åç¨ãã¡ã³ã³ã¤ã«ã¦ããã","name":"COMMERCIAL_FAN_COIL_UNIT_EOBJ","propertyList":[]},{"classCode":73,"description":"æ¥­åç¨ç©ºèª¿å·ç±æº(ãã©ã¼)","name":"COMMERCIAL_AIR_CONDITIONING_COLD_SOURCE_CHILLER_EOBJ","propertyList":[]},{"classCode":80,"description":"æ¥­åç¨ç©ºèª¿æ¸©ç±æº(ãã¤ã©ã¼)","name":"COMMERCIAL_AIR_CONDITIONING_HOT_SOURCE_BOILER_EOBJ","propertyList":[]},{"classCode":81,"description":"æ¥­åç¨ç©ºèª¿VAV","name":"AIR_CONDITIONING_VAV_FOR_COMMERCIAL_APPLICATIONS_EOBJ","propertyList":[]},{"classCode":82,"description":"æ¥­åç¨ç©ºèª¿ã¨ã¢ãã³ããªã³ã°ã¦ããã","name":"AIR_HANDLING_UNIT_AIR_CONDITIONING_FOR_COMMERCIAL_APPLICATIONS_EOBJ","propertyList":[]},{"classCode":83,"description":"ã¦ãããã¯ã¼ã©ã¼","name":"UNIT_COOLER_EOBJ","propertyList":[]},{"classCode":84,"description":"æ¥­åç¨ã³ã³ãã³ã·ã³ã°ã¦ããã","name":"CONDENSING_UNIT_FOR_COMMERCIAL_APPLICATIONS_EOBJ","propertyList":[]}]},{"classGroupCode":2,"description":"ä½å®
+ã»è¨­åé¢é£æ©å¨","define":"X1_AMENITY","classList":[{"classCode":96,"description":"é»åãã©ã¤ã³ã","name":"ELECTRICALLY_OPERATED_SHADE_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"ééè¨­å®","fields":[],"identifier":"OpenCloseSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é,0x42=é"},{"access":["RULE_SET","RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"éåº¦ã¬ãã«è¨­å®","fields":[],"identifier":"DegreeOfOpeningLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãã©ã¤ã³ãè§åº¦è¨­å®å¤","fields":[],"identifier":"SetValueOfShadeAngle","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"degree","valueDescription":"0x00ï½0xB4(0ï½180degree)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãã©ã¤ã³ãéééåº¦è¨­å®","fields":[],"identifier":"ShadeOpenCloseSpeed","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ä½,0x42=ä¸­,0x43=é«"}]},{"classCode":97,"description":"é»åã·ã£ãã¿ã¼","name":"ELECTRICALLY_OPERATED_SHUTTER_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"ééè¨­å®ï¼","fields":[],"identifier":"OpenCloseSetting1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é,0x42=é,0x43=åæ­¢"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"éåº¦ã¬ãã«è¨­å®ï¼","fields":[],"identifier":"ExtentOfOpening1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãã©ã¤ã³ãè§åº¦è¨­å®å¤","fields":[],"identifier":"BlindAngleSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"degree","valueDescription":"0x00ï½0xB4(0ï½180degree)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ã·ã£ãã¿ã¼éééåº¦è¨­å®","fields":[],"identifier":"ShutterSpeed","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ä½,0x42=ä¸­,0x43=é«"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"éåº¦ã¬ãã«è¨­å®ï¼","fields":[],"identifier":"ExtentOfOpening2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":228,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00ï½0xFF(0ï½255)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é»æ°é è¨­å®","fields":[],"identifier":"ElectricLockSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ½é ,0x42=éé ,0x41=è¨±å¯,0x42=ç¦æ­¢"},{"access":["RULE_SET","RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"ééè¨­å®ï¼","fields":[],"identifier":"OpenCloseSetting2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":231,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é,0x42=é"}]},{"classCode":98,"description":"é»åã«ã¼ãã³","name":"ELECTRICALLY_OPERATED_CURTAIN_EOBJ","propertyList":[]},{"classCode":99,"description":"é»åé¨æ¸","name":"ELECTRICALLY_OPERATED_STORM_WINDOW_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"ééè¨­å®ï¼","fields":[],"identifier":"OpenCloseSetting1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é,0x42=é,0x43=åæ­¢"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"éåº¦ã¬ãã«è¨­å®ï¼","fields":[],"identifier":"ExtentOfOpening1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãã©ã¤ã³ãè§åº¦è¨­å®å¤","fields":[],"identifier":"BlindAngleSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"degree","valueDescription":"0x00ï½0xB4(0ï½180degree)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ã·ã£ãã¿ã¼éééåº¦ã¬ãã«è¨­å®","fields":[],"identifier":"ShutterSpeed","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ä½,0x42=ä¸­,0x43=é«"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"éåº¦ã¬ãã«è¨­å®ï¼","fields":[],"identifier":"ExtentOfOpening2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":228,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00ï½0xFF(0ï½255)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é»æ°é è¨­å®","fields":[],"identifier":"ElectricLockSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ½é ,0x42=éé ,0x41=è¨±å¯,0x42=ç¦æ­¢"},{"access":["RULE_SET","RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"ééè¨­å®ï¼","fields":[],"identifier":"OpenCloseSetting2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":231,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é,0x42=é"}]},{"classCode":100,"description":"é»åã¬ã¬ã¼ã¸","name":"ELECTRICALLY_OPERATED_DOOR_EOBJ","propertyList":[]},{"classCode":101,"description":"é»åå¤©çª","name":"ELECTRICALLY_OPERATED_SKYLIGHT_EOBJ","propertyList":[]},{"classCode":102,"description":"ãªã¼ãã³ã°ï¼æ¥ããï¼","name":"AWNING_EOBJ","propertyList":[]},{"classCode":103,"description":"æ£æ°´å¨ï¼åº­ç¨ï¼","name":"GARDEN_SPRINKLER_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ£æ°´å¼ééè¨­å®","fields":[],"identifier":"SprinkleValveOpenCloseSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=èªåON,0x41=æåON,0x42=æåOFF"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ°´ããééè¨­å®","fields":[],"identifier":"SprinkleIntervalSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":null,"valueDescription":"0x40=å,0x41=æ¯æ¥,0x42=ï¼æ¥ãã,0x43=ï¼æ¥ãã,0x44=é±ï¼å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ°´ããåæ°è¨­å®","fields":[],"identifier":"NumberOfSprinklesSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ï¼çªç®ON,0x42=ï¼çªç®ON,0x43=ä¸¡æ¹ON"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ°´ããæå»è¨­å®ï¼","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"SprinkleTimeSetting1","initialValue":null,"isArray":false,"primitive":false,"propertyCode":227,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ°´ããæå»è¨­å®ï¼","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"SprinkleTimeSetting2","initialValue":null,"isArray":false,"primitive":false,"propertyCode":228,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ°´ããæéè¨­å®","fields":[],"identifier":"SprinkleDurationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00ï½0x3B(0ï½59)"}]},{"classCode":104,"description":"æ£æ°´å¨ï¼ç«ç½ç¨ï¼","name":"FIRE_SPRINKLER_EOBJ","propertyList":[]},{"classCode":105,"description":"å´æ°´","name":"FOUNTAIN_EOBJ","propertyList":[]},{"classCode":106,"description":"ç¬éæ¹¯æ²¸å¨","name":"INSTANTANEOUS_WATER_HEATER_EOBJ","propertyList":[]},{"classCode":107,"description":"é»æ°æ¸©æ°´å¨","name":"ELECTRIC_WATER_HEATER_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ²¸ãä¸ãèªåè¨­å®","fields":[],"identifier":"AutomaticWaterHeatingSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=èªåæ²¸ãä¸ã,0x43=æåæ²¸ãä¸ãåæ­¢,0x42=æåæ²¸ãä¸ã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ²¸ãä¸ãæ¹¯æ¸©èªåè¨­å®","fields":[],"identifier":"AutomaticWaterTemperatureControlSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=AUTO,0x42=éAUTO"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ²¸ãä¸ãä¸­ç¶æ
+","fields":[],"identifier":"WaterHeaterStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":178,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ²¸ãä¸ãä¸­,0x42=éæ²¸ãä¸ãä¸­"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ²¸ãä¸ãæ¹¯æ¸©è¨­å®å¤","fields":[],"identifier":"WaterHeatingTemperatureSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":179,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x64(0ï½100â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¼éæ²¸ãå¢ãè¨±å¯è¨­å®","fields":[],"identifier":"DaytimeReheatingPermissionSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":192,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ¼éæ²¸ãå¢ãè¨±å¯,0x42=æ¼éæ²¸ãå¢ãç¦æ­¢"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ¸©æ°´å¨æ¹¯æ¸©è¨æ¸¬å¤","fields":[],"identifier":"MeasuredTemperatureOfWaterInWaterHeater","initialValue":null,"isArray":false,"primitive":true,"propertyCode":193,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x64(0ï½100â)"},{"access":["RULE_GET"],"arrayCount":0,"description":"è­¦å ±çºçç¶æ
+","fields":[{"arrayCount":0,"description":"è­¦å ±","fields":[],"identifier":"Alarm","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]æ¹¯åãè­¦å ±:0=æ­£å¸¸,1=çºç\u000d\u000a[1]æ¼æ°´è­¦å ±:0=æ­£å¸¸,1=çºç\u000d\u000a[2]åçµè­¦å ±:0=æ­£å¸¸,1=çºç\u000d\u000a[3ï½7]for future reserved"},{"arrayCount":3,"description":"for future reserved","fields":[],"identifier":"Reserved","initialValue":null,"isArray":true,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""}],"identifier":"AlarmStatus","initialValue":null,"isArray":false,"primitive":false,"propertyCode":194,"required":["RULE_GET"],"size":4,"type":"alarm_status_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"çµ¦æ¹¯æ¸©åº¦è¨­å®å¤","fields":[],"identifier":"TemperatureOfSuppliedWaterSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":209,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x64(0ï½100â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åæ¸©åº¦è¨­å®å¤","fields":[],"identifier":"BathWaterTemperatureSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":211,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x64(0ï½100â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ²¸ãä¸ãæ¹¯éè¨­å®å¤","fields":[],"identifier":"BathWaterVolumeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ®æ¹¯éè¨æ¸¬å¤","fields":[],"identifier":"MeasuredAmountOfWaterRemainingInTank","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"ã","valueDescription":"0x0000ï½0xFFFD(0ï½65533ã)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ã¿ã³ã¯å®¹éå¤","fields":[],"identifier":"TankCapacity","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"ã","valueDescription":"0x0000ï½0xFFFD(0ï½65533ã)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åèªåã¢ã¼ãè¨­å®","fields":[],"identifier":"AutomaticBathWaterHeatingModeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=èªåå
+¥,0x42=èªåè§£é¤"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åè¶³ãæ¹¯åä½è¨­å®","fields":[],"identifier":"AdditionOfHotWaterFunctionSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=è¶³ãæ¹¯å
+¥,0x42=è¶³ãæ¹¯å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åã¬ããåä½è¨­å®","fields":[],"identifier":"SlightBathWaterTemperatureLoweringFunctionSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":230,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ã¬ããå
+¥,0x42=ã¬ããå"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åæ¹¯éè¨­å®ï¼","fields":[],"identifier":"BathWaterVolumeSetting1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":231,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ã","valueDescription":"0x00ï½0xFD(0ï½253ã)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åæ¹¯éè¨­å®ï¼","fields":[],"identifier":"BathWaterVolumeSetting2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":232,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åæ¹¯éè¨­å®ï¼","fields":[],"identifier":"BathWaterVolumeSetting3","initialValue":null,"isArray":false,"primitive":true,"propertyCode":238,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"ã","valueDescription":"0x0000ï½0xFFFD(0ï½65533ã)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åæ¹¯éè¨­å®ï¼","fields":[],"identifier":"BathWaterVolumeSetting4","initialValue":null,"isArray":false,"primitive":true,"propertyCode":212,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½0xFF"},{"access":["RULE_GET"],"arrayCount":0,"description":"é¢¨åæ¹¯éè¨­å®ï¼è¨­å®å¯è½æå¤§ã¬ãã«","fields":[],"identifier":"BathWaterVolumeSetting4MaximumSettableLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":213,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½0xFF"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OnTimerReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":144,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OnTimerSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":145,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"å¬å­£ï¼¨ï¼ï¼°ã¦ãããå®æ ¼æ¶è²»é»å","fields":[],"identifier":"RatedPowerConsumptionOfHPUnitInWintertime","initialValue":null,"isArray":false,"primitive":true,"propertyCode":219,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65533)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ä¸­éæï¼¨ï¼ï¼°ã¦ãããå®æ ¼æ¶è²»é»å","fields":[],"identifier":"RatedPowerConsumptionOfHPUnitInInBetweenSeasons","initialValue":null,"isArray":false,"primitive":true,"propertyCode":220,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65533)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å¤å­£ï¼¨ï¼ï¼°ã¦ãããå®æ ¼æ¶è²»é»å","fields":[],"identifier":"RatedPowerConsumptionOfHPUnitInSummertime","initialValue":null,"isArray":false,"primitive":true,"propertyCode":221,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65533)"}]},{"classCode":108,"description":"å¤ªé½ç±æ¸©æ°´å¨","name":"SOLAR_WATER_HEATER_EOBJ","propertyList":[]},{"classCode":109,"description":"å¾ªç°ãã³ã","name":"CIRCULATION_PUMP_EOBJ","propertyList":[]},{"classCode":110,"description":"é»æ°ä¾¿åº§ï¼æ¸©æ°´æ´æµä¾¿åº§ã»ææ¿ä¾¿åº§ãªã©ï¼","name":"BIDET_EQUIPPED_TOILET_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ä¾¿åº§æ¸©åº¦ã¬ãã«è¨­å®","fields":[],"identifier":"TemperatureLevelOfToiletSeat","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x3A"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ä¾¿åº§ãã¼ã¿è¨­å®","fields":[],"identifier":"HeaterSettingOfToiletSeat","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ON,0x42=OFF"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ä¾¿åº§ãã¼ã¿ä¸æåæ­¢è¨­å®","fields":[],"identifier":"TemporalHaltSettingOfToiletSeat","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é£ç¶è¨­å®,0x42=ä¸åè¨­å®,0x43=è¨­å®ãªã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ä¾¿åº§ãã¼ã¿ä¸æåæ­¢éå§æå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"TemporalHaltStartTimeOfToiletSeat","initialValue":null,"isArray":false,"primitive":false,"propertyCode":227,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ä¾¿åº§ãã¼ã¿ä¸æåæ­¢æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"TemporalHaltTimeDurationOfToiletSeat","initialValue":null,"isArray":false,"primitive":false,"propertyCode":228,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¨å±ææ¿æ¸©åº¦ã¬ãã«è¨­å®","fields":[],"identifier":"TemperatureLevelSettingOfRoomHeating","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31=ä½,0x32=ä¸­,0x33=é«"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¨å±ææ¿è¨­å®","fields":[],"identifier":"RoomHeatingSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":230,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é¨å±ææ¿ON,0x42=é¨å±ææ¿OFF,0x43=ã¿ã¤ãã¢ã¼ãè¨­å®"},{"access":["RULE_GET"],"arrayCount":0,"description":"é¨å±ææ¿ç¶æ
+","fields":[],"identifier":"RoomHeatingStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":231,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ON,0x42=OFF"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¨å±ææ¿éå§æå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"StartTimeOfRoomHeating","initialValue":null,"isArray":false,"primitive":false,"propertyCode":232,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¨å±ææ¿éè»¢æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"DurationTimeOfRoomHreating","initialValue":null,"isArray":false,"primitive":false,"propertyCode":233,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç¹å¥éè»¢ã¢ã¼ãè¨­å®","fields":[],"identifier":"SpecialOperationModeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":234,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=è¨­å®ãªã,0x41=å·ãè¾¼ã¿é²æ­¢,0x42ï½=for future reserved"},{"access":["RULE_GET"],"arrayCount":0,"description":"äººä½æ¤ç¥ç¶æ
+","fields":[],"identifier":"HumanDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":235,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äººä½æ¤ç¥æ,0x42=äººä½æ¤ç¥ç¡"},{"access":["RULE_GET"],"arrayCount":0,"description":"çåº§æ¤ç¥ç¶æ
+","fields":[],"identifier":"SeatingDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":236,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=çåº§æ¤ç¥æ,0x42=çåº§æ¤ç¥ç¡"}]},{"classCode":111,"description":"é»æ°é ","name":"ELECTRIC_KEY_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"æ½é è¨­å®ï¼","fields":[],"identifier":"LockSetting1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ½é ,0x42=è§£é "},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ½é è¨­å®ï¼","fields":[],"identifier":"LockSetting2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ½é ,0x42=è§£é "},{"access":["RULE_GET"],"arrayCount":0,"description":"ãã¢ã¬ã¼ãæ½é ç¶æ
+","fields":[],"identifier":"LockStatusOfDoorGuard","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ½é ,0x42=è§£é "},{"access":["RULE_GET"],"arrayCount":0,"description":"æééç¶æ
+","fields":[],"identifier":"DoorOpenCloseStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é,0x42=é"},{"access":["RULE_GET"],"arrayCount":0,"description":"å¨å®¤ã»ä¸å¨ç¶æ
+","fields":[],"identifier":"OccupantNonOccupantStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":228,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å¨å®¤,0x42=ä¸å¨"},{"access":["RULE_GET"],"arrayCount":0,"description":"è­¦å ±ç¶æ
+","fields":[],"identifier":"AlarmStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=éå¸¸ç¶æ
+ï¼è­¦å ±ãªãï¼,0x41=ããéã,0x42=æéæ¾,0x43=æåè§£é ,0x44=ã¿ã³ã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"èªåæ½é ã¢ã¼ãè¨­å®","fields":[],"identifier":"AutoLockModeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":230,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å
+¥,0x42=å"}]},{"classCode":112,"description":"ã¬ã¹å
+å¼","name":"GAS_LINE_VALVE_EOBJ","propertyList":[]},{"classCode":113,"description":"ãã¼ã ãµã¦ã","name":"HOME_SAUNA_EOBJ","propertyList":[]},{"classCode":114,"description":"ç¬éå¼çµ¦æ¹¯å¨","name":"HOT_WATER_GENERATOR_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"çµ¦æ¹¯å¨çç¼ç¶æ
+","fields":[],"identifier":"HotWaterHeatingStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":208,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=çµ¦æ¹¯çç¼ç¶æ
+æ,0x42=ç¡"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"çµ¦æ¹¯æ¸©åº¦è¨­å®å¤","fields":[],"identifier":"SetValueOfHotWaterTemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":209,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x64(0ï½100)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"çµ¦æ¹¯ä¿æ¸©è¨­å®","fields":[],"identifier":"HotWaterWarmerSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":210,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=çµ¦æ¹¯ä¿æ¸©åä½,0x42=çµ¦æ¹¯ä¿æ¸©åä½è§£é¤"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"èªåéè»¢æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"DurationOfAutomaticOperationSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":218,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":"0xFFFF=ç¡é"},{"access":["RULE_GET"],"arrayCount":0,"description":"èªåéè»¢æ®æé","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"RemainingAutomaticOperationTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":219,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":"0xFFFF=ç¡é"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åæ¸©åº¦è¨­å®å¤","fields":[],"identifier":"SetValueOfBathTemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x64(0ï½100)"},{"access":["RULE_GET"],"arrayCount":0,"description":"é¢¨åçµ¦æ¹¯å¨çç¼ç¶æ
+","fields":[],"identifier":"BathWaterHeaterStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=çç¼ç¶æ
+æ,0x42=ç¡"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åèªåã¢ã¼ãè¨­å®","fields":[],"identifier":"BathAutoModeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=èªåå
+¥,0x42=èªåè§£é¤"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åè¿½ãçãåä½è¨­å®","fields":[],"identifier":"BathAdditionalBoilUpOperationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":228,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=è¿½ãçãå
+¥,0x42=è¿½ãçãå"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åè¶³ãæ¹¯åä½è¨­å®","fields":[],"identifier":"BathHotWaterAddingOperationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=è¶³ãæ¹¯å
+¥,0x42=è¶³ãæ¹¯å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åã¬ããåä½è¨­å®","fields":[],"identifier":"BathWaterTemperatureLoweringOperationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":230,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ã¬ããå
+¥,0x42=ã¬ããå"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åæ¹¯éè¨­å®ï¼","fields":[],"identifier":"BathHotWaterVolumeSetting1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":231,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ã","valueDescription":"0x00ï½0xFD(0ï½253ã)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åæ¹¯éè¨­å®ï¼","fields":[],"identifier":"BathHotWaterVolumeSetting2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":232,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åæ¹¯éè¨­å®ï¼","fields":[],"identifier":"BathHotWaterVolumeSetting3","initialValue":null,"isArray":false,"primitive":true,"propertyCode":238,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"ã","valueDescription":"0x0000ï½0xFFFD(0ï½65533ã)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åæ¹¯éè¨­å®ï¼","fields":[],"identifier":"BathHotWaterVolumeSetting4","initialValue":null,"isArray":false,"primitive":true,"propertyCode":212,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½0xFF"},{"access":["RULE_GET"],"arrayCount":0,"description":"é¢¨åæ¹¯éè¨­å®ï¼è¨­å®å¯è½æå¤§ã¬ãã«","fields":[],"identifier":"BathHotWaterVolumeSetting4MaximumSettableLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":213,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½0xFF"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æµ´å®¤åªå
+è¨­å®","fields":[],"identifier":"BathroomPrioritySetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":233,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æµ´å®¤åªå
+å
+¥,0x42=æµ´å®¤åªå
+å"},{"access":["RULE_GET"],"arrayCount":0,"description":"ã·ã£ã¯ã¼çµ¦æ¹¯ç¶æ
+","fields":[],"identifier":"ShowerHotWaterSupplyStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":234,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ã·ã£ã¯ã¼çµ¦æ¹¯ç¶æ
+æ,0x42=ã·ã£ã¯ã¼çµ¦æ¹¯ç¶æ
+ç¡"},{"access":["RULE_GET"],"arrayCount":0,"description":"å°æçµ¦æ¹¯ç¶æ
+","fields":[],"identifier":"KitchenHotWaterSupplyStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":235,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å°æçµ¦æ¹¯ç¶æ
+æ,0x42=å°æçµ¦æ¹¯ç¶æ
+ç¡"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"çµ¦æ¹¯ä¿æ¸©ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"HotWaterWarmerOnTimerReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":236,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"çµ¦æ¹¯ä¿æ¸©ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"SetValueOfHotWaterWarmerOnTimerTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":237,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åèªåï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OnTimerReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":144,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åèªåï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"SetValueOfOnTimerTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":145,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åèªåï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"SetValueOfOnTimerRelativeTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":146,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""}]},{"classCode":115,"description":"æµ´å®¤ææ¿ä¹¾ç¥æ©","name":"BATHROOM_DRYER_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"éè»¢è¨­å®","fields":[],"identifier":"OperationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x10=ææ°éè»¢,0x20=å
+¥æµ´åäºåææ¿éè»¢,0x30=å
+¥æµ´ä¸­ææ¿éè»¢,0x40=ä¹¾ç¥éè»¢,0x50=æ¶¼é¢¨éè»¢,0x00=åæ­¢"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ææ°éè»¢è¨­å®","fields":[],"identifier":"VentilationOperationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=èªå,0x42=æ¨æº,0x31ï½0x38=é¢¨éã¬ãã«"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å
+¥æµ´åäºåææ¿éè»¢è¨­å®","fields":[],"identifier":"BathroomPreWarmerOperationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":178,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=èªå,0x42=æ¨æº,0x31ï½0x38=è½åã¬ãã«"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å
+¥æµ´ä¸­ææ¿éè»¢è¨­å®","fields":[],"identifier":"BathroomHeaterOperationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":179,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=èªå,0x42=æ¨æº,0x31ï½0x38=è½åã¬ãã«"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ä¹¾ç¥éè»¢è¨­å®","fields":[],"identifier":"BathroomDryerOperationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":180,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=èªå,0x42=æ¨æº,0x31ï½0x38=è½åã¬ãã«"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¶¼é¢¨éè»¢è¨­å®","fields":[],"identifier":"CoolAirCirculatorOperationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":181,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=èªå,0x42=æ¨æº,0x31ï½0x38=è½åã¬ãã«"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®¤å
+ç¸å¯¾æ¹¿åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredRelativeBathroomHumidity","initialValue":null,"isArray":false,"primitive":true,"propertyCode":186,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®¤å
+æ¸©åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredBathroomTemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":187,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"â","valueDescription":"0x81ï½0x7D(-127ï½125â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ææ°é¢¨éè¨­å®","fields":[],"identifier":"VentilationAirFlowRateSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":194,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=èªå,0x31ï½0x38=é¢¨éã¬ãã«"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãã£ã«ã¿ãµã¤ã³è¨­å®","fields":[],"identifier":"FilterCleaningReminderSignSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":207,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç¹ç¯,0x42=æ¶ç¯"},{"access":["RULE_GET"],"arrayCount":0,"description":"äººä½æ¤ç¥ç¶æ
+","fields":[],"identifier":"HumanBodyDetectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äººä½æ¤ç¥ãã,0x42=äººä½æ¤ç¥ãªã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®ï¼","fields":[],"identifier":"OnTimerBasedReservationSetting1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":144,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®ï¼","fields":[],"identifier":"OnTimerBasedReservationSetting2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x10=ææ°éè»¢äºç´,0x20=å
+¥æµ´åäºåææ¿éè»¢äºç´,0x30=å
+¥æµ´ä¸­ææ¿éè»¢äºç´,0x40=ä¹¾ç¥éè»¢äºç´,0x50=æ¶¼é¢¨éè»¢äºç´,0x00=äºç´å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OnTimerSettingTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":145,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OnTimerSettingRelativeTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":146,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OffTimerBasedReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":148,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OffTimerSettingTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":149,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OffTimerSettingRelativeTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":150,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""}]},{"classCode":116,"description":"ãã¼ã ã¨ã¬ãã¼ã¿","name":"HOME_ELEVATOR_EOBJ","propertyList":[]},{"classCode":117,"description":"é»åéä»åã","name":"ELECTRICALLY_OPERATED_ROOM_DIVIDER_EOBJ","propertyList":[]},{"classCode":118,"description":"æ°´å¹³ãã©ã³ã¹ãã¡","name":"HORIZONTAL_TRANSFER_EOBJ","propertyList":[]},{"classCode":119,"description":"é»åç©å¹²ã","name":"ELECTRICALLY_OPERATED_CLOTHES_DRYING_POLE_EOBJ","propertyList":[]},{"classCode":120,"description":"æµåæ§½","name":"SEPTIC_TANK_EOBJ","propertyList":[]},{"classCode":121,"description":"ä½å®
+ç¨å¤ªé½å
+çºé»","name":"HOME_SOLAR_POWER_GENERATION_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"ç³»çµ±é£ç³»ç¶æ
+","fields":[],"identifier":"SystemInterconnectionStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":208,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ç³»çµ±é£ç³»ï¼éæ½®æµå¯ï¼,0x01=ç¬ç«,0x02=ç³»çµ±é£ç³»ï¼éæ½®æµä¸å¯ï¼"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¬æçºé»é»åè¨æ¸¬å¤","fields":[],"identifier":"MeasuredInstantaneousAmountOfElectricityGenerated","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65533)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®çºé»é»åéè¨æ¸¬å¤","fields":[],"identifier":"MeasuredCumulativeAmountOfElectricityGenerated","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"0.001kWh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"},{"access":["RULE_SET"],"arrayCount":0,"description":"ç©ç®çºé»é»åéãªã»ããè¨­å®","fields":[],"identifier":"ResettingCumulativeAmountOfElectricityGenerated","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®å£²é»é»åéè¨æ¸¬å¤","fields":[],"identifier":"MeasuredCumulativeAmountOfElectricitySold","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"0.001kWh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"},{"access":["RULE_SET"],"arrayCount":0,"description":"ç©ç®å£²é»é»åéãªã»ããè¨­å®","fields":[],"identifier":"ResettingCumulativeAmountOfElectricitySold","initialValue":null,"isArray":false,"primitive":true,"propertyCode":228,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"çºé»é»åå¶éè¨­å®ï¼","fields":[],"identifier":"PowerGenerationOutputLimitSetting1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"çºé»é»åå¶éè¨­å®ï¼","fields":[],"identifier":"PowerGenerationOutputLimitSetting2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":230,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65533)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å£²é»é»åå¶éè¨­å®","fields":[],"identifier":"LimitSettingForTheAmountOfElectricitySold","initialValue":null,"isArray":false,"primitive":true,"propertyCode":231,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65533)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å®æ ¼çºé»é»åå¤ï¼ç³»çµ±é£ç³»æï¼","fields":[],"identifier":"RatedPowerGenerationOutputSystemInterconnected","initialValue":null,"isArray":false,"primitive":true,"propertyCode":232,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65533)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å®æ ¼çºé»é»åå¤ï¼ç¬ç«æï¼","fields":[],"identifier":"RatedPowerGenerationOutputIndependent","initialValue":null,"isArray":false,"primitive":true,"propertyCode":233,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65533)"}]},{"classCode":122,"description":"å·æ¸©æ°´ç±æºæ©","name":"COLD_AND_HOT_WATER_HEAT_SOURCE_EQUIPMENT_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"éè»¢ã¢ã¼ãè¨­å®","fields":[],"identifier":"OperationModeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ææ¿,0x42=å·æ¿"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ°´æ¸©è¨­å®ï¼","fields":[],"identifier":"WaterTemperatureSetting1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x64(0ï½100â),0x71=AUTO"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ°´æ¸©è¨­å®ï¼","fields":[],"identifier":"WaterTemperatureSetting2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x21ï½0x2F=å·æ¿ï¼å·æ°´ï¼(æä½ã¬ãã«ï½æé«ã¬ãã«),0x31ï½0x3F=ææ¿ï¼æ¸©æ°´ï¼(æä½ã¬ãã«ï½æé«ã¬ãã«),0x41=AUTO"},{"access":["RULE_GET"],"arrayCount":0,"description":"å¾ãæ°´æ¸©è¨æ¸¬å¤ï¼åºå£æ°´æ¸©ï¼","fields":[],"identifier":"MeasuredTemperatureOfOutwardWaterExitWaterTemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x64(0ï½100â)"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ»ãæ°´æ¸©è¨æ¸¬å¤ï¼å
+¥å£æ°´æ¸©ï¼","fields":[],"identifier":"MeasuredTemperatureOfInwardWaterEntranceWaterTemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":228,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x64(0ï½100â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç¹æ®éè»¢è¨­å®","fields":[],"identifier":"SpecialOperationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=éå¸¸éè»¢,0x42=ã²ãããéè»¢,0x43=ãã¤ãã¯ã¼éè»¢"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãã¤ãªã¼ã¿ã¤ãã¼è¨­å®","fields":[],"identifier":"DailyTimerSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":230,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=ã¿ã¤ãã¼å,0x41=ã¿ã¤ãã¼1,0x42=ã¿ã¤ãã¼2"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãã¤ãªã¼ã¿ã¤ãã¼ï¼è¨­å®","fields":[{"arrayCount":0,"description":"ï¼æããï¼æ","fields":[],"identifier":"FromZeroToThreeOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼æããï¼æ","fields":[],"identifier":"FromFourToSevenOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼æããï¼ï¼æ","fields":[],"identifier":"FromEightToElevenOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼ï¼æããï¼ï¼æ","fields":[],"identifier":"FromTwelveToFifteenOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼ï¼æããï¼ï¼æ","fields":[],"identifier":"FromSixteenToNineteenOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼ï¼æããï¼ï¼æ","fields":[],"identifier":"FromTwentyToTwentyThreeOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"}],"identifier":"DailyTimerSetting1","initialValue":null,"isArray":false,"primitive":false,"propertyCode":231,"required":["NONE"],"size":6,"type":"daily_timer_setting_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãã¤ãªã¼ã¿ã¤ãã¼ï¼è¨­å®","fields":[{"arrayCount":0,"description":"ï¼æããï¼æ","fields":[],"identifier":"FromZeroToThreeOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼æããï¼æ","fields":[],"identifier":"FromFourToSevenOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼æããï¼ï¼æ","fields":[],"identifier":"FromEightToElevenOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼ï¼æããï¼ï¼æ","fields":[],"identifier":"FromTwelveToFifteenOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼ï¼æããï¼ï¼æ","fields":[],"identifier":"FromSixteenToNineteenOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼ï¼æããï¼ï¼æ","fields":[],"identifier":"FromTwentyToTwentyThreeOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"}],"identifier":"DailyTimerSetting2","initialValue":null,"isArray":false,"primitive":false,"propertyCode":232,"required":["NONE"],"size":6,"type":"daily_timer_setting_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OnTimerReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":144,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OnTimerSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":145,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"RelativeOnTimerSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":146,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OffTimerReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":148,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"TimeSetByOffTimer","initialValue":null,"isArray":false,"primitive":false,"propertyCode":149,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"RelativeOffTimerSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":150,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""}]},{"classCode":123,"description":"åºææ¿","name":"FLOOR_HEATER2_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¸©åº¦è¨­å®ï¼","fields":[],"identifier":"TemperatureSetting1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x32(0ï½50â),0x41=AUTO"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¸©åº¦è¨­å®ï¼","fields":[],"identifier":"TemperatureSetting2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x3F(æä½ï½æé«ã¬ãã«),0x41=AUTO"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®¤å
+æ¸©åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredRoomTeemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"â","valueDescription":"0x81ï½0x7D(-127ï½125â)"},{"access":["RULE_GET"],"arrayCount":0,"description":"åºæ¸©åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredFloorTemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"â","valueDescription":"0x81ï½0x7D(-127ï½125â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ã¾ã¼ã³åæ¿ãè¨­å®","fields":[],"identifier":"ZoneChangeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":228,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ã¾ã¼ã³0:1=å¶å¾¡æã,0=å¶å¾¡ç¡ã\u000d\u000a[1]ã¾ã¼ã³1:1=å¶å¾¡æã,0=å¶å¾¡ç¡ã\u000d\u000a[2]ã¾ã¼ã³2:1=å¶å¾¡æã,0=å¶å¾¡ç¡ã\u000d\u000a[3]ã¾ã¼ã³3:1=å¶å¾¡æã,0=å¶å¾¡ç¡ã\u000d\u000a[4]ã¾ã¼ã³4:1=å¶å¾¡æã,0=å¶å¾¡ç¡ã\u000d\u000a[5]ã¾ã¼ã³5:1=å¶å¾¡æã,0=å¶å¾¡ç¡ã\u000d\u000a[6]ã¾ã¼ã³6:1=å¶å¾¡æã,0=å¶å¾¡ç¡ã\u000d\u000a[7]ã¾ã¼ã³7:1=å¶å¾¡æã,0=å¶å¾¡ç¡ã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç¹æ®éè»¢è¨­å®","fields":[],"identifier":"SpecialOperationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=éå¸¸éè»¢,0x42=ã²ãããéè»¢,0x43=ãã¤ãã¯ã¼éè»¢"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãã¤ãªã¼ã¿ã¤ãã¼è¨­å®","fields":[],"identifier":"DailyTimerSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":230,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=ã¿ã¤ãã¼å,0x41=ã¿ã¤ãã¼1,0x42=ã¿ã¤ãã¼2"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãã¤ãªã¼ã¿ã¤ãã¼ï¼è¨­å®","fields":[{"arrayCount":0,"description":"ï¼æããï¼æ","fields":[],"identifier":"FromZeroToThreeOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼æããï¼æ","fields":[],"identifier":"FromFourToSevenOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼æããï¼ï¼æ","fields":[],"identifier":"FromEightToElevenOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼ï¼æããï¼ï¼æ","fields":[],"identifier":"FromTwelveToFifteenOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼ï¼æããï¼ï¼æ","fields":[],"identifier":"FromSixteenToNineteenOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼ï¼æããï¼ï¼æ","fields":[],"identifier":"FromTwentyToTwentyThreeOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"}],"identifier":"DailyTimerSetting1","initialValue":null,"isArray":false,"primitive":false,"propertyCode":231,"required":["NONE"],"size":6,"type":"daily_timer_setting_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãã¤ãªã¼ã¿ã¤ãã¼ï¼è¨­å®","fields":[{"arrayCount":0,"description":"ï¼æããï¼æ","fields":[],"identifier":"FromZeroToThreeOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼æããï¼æ","fields":[],"identifier":"FromFourToSevenOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼æããï¼ï¼æ","fields":[],"identifier":"FromEightToElevenOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼ï¼æããï¼ï¼æ","fields":[],"identifier":"FromTwelveToFifteenOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼ï¼æããï¼ï¼æ","fields":[],"identifier":"FromSixteenToNineteenOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"},{"arrayCount":0,"description":"ï¼ï¼æããï¼ï¼æ","fields":[],"identifier":"FromTwentyToTwentyThreeOClock","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[1]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[2]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[3]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[4]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[5]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[6]ï¼ï¼æï¼å:1=éè»¢,0=åæ­¢\u000d\u000a[7]ï¼ï¼æï¼ï¼å:1=éè»¢,0=åæ­¢"}],"identifier":"DailyTimerSetting2","initialValue":null,"isArray":false,"primitive":false,"propertyCode":232,"required":["NONE"],"size":6,"type":"daily_timer_setting_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OnTimerReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":144,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"TimeSetByOnTimer","initialValue":null,"isArray":false,"primitive":false,"propertyCode":145,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"RelativeOnTimerSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":146,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OffTimerReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":148,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"TimeSetByOffTimer","initialValue":null,"isArray":false,"primitive":false,"propertyCode":149,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"RelativeOffTimerSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":150,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""}]},{"classCode":124,"description":"çæé»æ± ","name":"FUEL_CELL_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"æ¸©æ°´å¨æ¹¯æ¸©è¨æ¸¬å¤","fields":[],"identifier":"MeasuredTemperatureOfWaterInWaterHeater","initialValue":null,"isArray":false,"primitive":true,"propertyCode":193,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x64(0ï½100â)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®æ ¼çºé»é","fields":[],"identifier":"RatedPowerGenerationOutput","initialValue":null,"isArray":false,"primitive":true,"propertyCode":194,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65,533W)"},{"access":["RULE_GET"],"arrayCount":0,"description":"è²¯æ¹¯æ§½ç±é","fields":[],"identifier":"HeatingValueOfHotWaterStorageTank","initialValue":null,"isArray":false,"primitive":true,"propertyCode":195,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"MJ","valueDescription":"0x0000ï½0xFFFD(0ï½65,533MJ)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¬æçºé»é»åè¨æ¸¬å¤","fields":[],"identifier":"MeasuredInstantaneousPowerGenerationOutput","initialValue":null,"isArray":false,"primitive":true,"propertyCode":196,"required":["RULE_GET"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65,533W)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®çºé»é»åéè¨æ¸¬å¤","fields":[],"identifier":"MeasuredCumulativePowerGenerationOutput","initialValue":null,"isArray":false,"primitive":true,"propertyCode":197,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"0.001kWh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"},{"access":["RULE_SET"],"arrayCount":0,"description":"ç©ç®çºé»é»åéãªã»ããè¨­å®","fields":[],"identifier":"CumulativePowerGenerationOutputResetSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":198,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¬æã¬ã¹æ¶è²»éè¨æ¸¬å¤","fields":[],"identifier":"MeasuredInstantaneousGasConsumption","initialValue":null,"isArray":false,"primitive":true,"propertyCode":199,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.001ã¥\/h","valueDescription":"0x0000ï½0xFFFD(0ï½65.533ã¥\/h)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®ã¬ã¹æ¶è²»éè¨æ¸¬å¤","fields":[],"identifier":"MeasuredCumulativeGasConsumption","initialValue":null,"isArray":false,"primitive":true,"propertyCode":200,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"0.001ã¥","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999ã¥)"},{"access":["RULE_SET"],"arrayCount":0,"description":"ç©ç®ã¬ã¹æ¶è²»éãªã»ããè¨­å®","fields":[],"identifier":"CumulativeGasConsumptionResetSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":201,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"},{"access":["RULE_SET"],"arrayCount":0,"description":"çºé»åä½è¨­å®","fields":[],"identifier":"PowerGenerationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":202,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=çºé»åä½,0x42=çºé»åæ­¢"},{"access":["RULE_GET"],"arrayCount":0,"description":"çºé»åä½ç¶æ
+","fields":[],"identifier":"PowerGenerationStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":203,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=çºé»ä¸­,0x42=åæ­¢ä¸­,0x43=èµ·åä¸­,0x44=åæ­¢åä½ä¸­,0x45=ã¢ã¤ãã«ä¸­"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®
+å
+ç¬ææ¶è²»é»åè¨æ¸¬å¤","fields":[],"identifier":"MeasuredInHouseInstantaneousPowerConsumption","initialValue":null,"isArray":false,"primitive":true,"propertyCode":204,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65,533W)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®
+å
+ç©ç®æ¶è²»é»åéè¨æ¸¬å¤","fields":[],"identifier":"MeasuredInHouseCumulativePowerConsumption","initialValue":null,"isArray":false,"primitive":true,"propertyCode":205,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"0.001kWh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"},{"access":["RULE_SET"],"arrayCount":0,"description":"å®
+å
+ç©ç®æ¶è²»é»åéãªã»ããè¨­å®","fields":[],"identifier":"InHouseCumulativePowerConsumptionReset","initialValue":null,"isArray":false,"primitive":true,"propertyCode":206,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç³»çµ±é£ç³»ç¶æ
+","fields":[],"identifier":"SystemInterconnectedType","initialValue":null,"isArray":false,"primitive":true,"propertyCode":208,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ç³»çµ±é£ç³»ï¼éæ½®æµå¯ï¼,0x01=ç¬ç«,0x02=ç³»çµ±é£ç³»ï¼éæ½®æµä¸å¯ï¼"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ®æ¹¯éè¨æ¸¬å¤","fields":[],"identifier":"MeasuredRemainingHotWaterAmount","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"ã","valueDescription":"0x0000ï½0xFFFD(0ï½65,533ã)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ã¿ã³ã¯å®¹éå¤","fields":[],"identifier":"TankCapacity","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"ã","valueDescription":"0x0000ï½0xFFFD(0ï½65,533ã)"}]},{"classCode":125,"description":"èé»æ± ","name":"STORAGE_BATTERY_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"æå°æå¤§å
+
+é»é»åå¤","fields":[{"arrayCount":0,"description":"æå°å
+
+é»é»åå¤","fields":[],"identifier":"MinimumChargingElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"W","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"},{"arrayCount":0,"description":"æå¤§å
+
+é»é»åå¤","fields":[],"identifier":"MaximumChargingElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"W","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"}],"identifier":"MinimumMaximumChargingElectricEnergy","initialValue":null,"isArray":false,"primitive":false,"propertyCode":200,"required":["NONE"],"size":8,"type":"minimum_maximum_charging_electric_energy_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"æå°æå¤§æ¾é»é»åå¤","fields":[{"arrayCount":0,"description":"æå°æ¾é»é»åå¤","fields":[],"identifier":"MinimumDischargingElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"W","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"},{"arrayCount":0,"description":"æå¤§æ¾é»é»åå¤","fields":[],"identifier":"MaximumDischargingElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"W","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"}],"identifier":"MinimumMaximumDischargingElectricEnergy","initialValue":null,"isArray":false,"primitive":false,"propertyCode":201,"required":["NONE"],"size":8,"type":"minimum_maximum_discharging_electric_energy_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"æå°æå¤§å
+
+é»é»æµå¤","fields":[{"arrayCount":0,"description":"æå°å
+
+é»é»æµå¤","fields":[],"identifier":"MinimumChargingCurrent","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"},{"arrayCount":0,"description":"æå¤§å
+
+é»é»æµå¤","fields":[],"identifier":"MaximumChargingCurrent","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"}],"identifier":"MinimumMaximumChargingCurrent","initialValue":null,"isArray":false,"primitive":false,"propertyCode":202,"required":["NONE"],"size":4,"type":"minimum_maximum_charging_current_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"æå°æå¤§æ¾é»é»æµå¤","fields":[{"arrayCount":0,"description":"æå°æ¾é»é»æµå¤","fields":[],"identifier":"MinimumDischargingCurrent","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"},{"arrayCount":0,"description":"æå¤§æ¾é»é»æµå¤","fields":[],"identifier":"MaximumDischargingCurrent","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"}],"identifier":"MinimumMaximumDischargingCurrent","initialValue":null,"isArray":false,"primitive":false,"propertyCode":203,"required":["NONE"],"size":4,"type":"minimum_maximum_discharging_current_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"å®æ ¼é»åé","fields":[],"identifier":"RatedElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"propertyCode":208,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"Wh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®æ ¼å®¹é","fields":[],"identifier":"RatedCapacity","initialValue":null,"isArray":false,"primitive":true,"propertyCode":209,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.1Ah","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®æ ¼é»å§","fields":[],"identifier":"RatedVoltage","initialValue":null,"isArray":false,"primitive":true,"propertyCode":210,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"V","valueDescription":"0x0000ï½0x7FFE(0ï½32,766V)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¬æå
+
+æ¾é»é»åè¨æ¸¬å¤","fields":[],"identifier":"MeasuredInstantaneousChargeDischargElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"propertyCode":211,"required":["NONE"],"size":4,"type":"int32_t","unitDescription":"W","valueDescription":"0x00000001ï½0x3B9AC9FF=å
+
+é»æï¼ãã©ã¹å¤ï¼(1ï½999,999,999W),0xFFFFFFFFï½0xC4653601=æ¾é»æï¼ãã¤ãã¹å¤ï¼(-1ï½-999,999,999W)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¬æå
+
+æ¾é»é»æµè¨æ¸¬å¤","fields":[],"identifier":"MeasuredInstantaneousChargeDischargCurrent","initialValue":null,"isArray":false,"primitive":true,"propertyCode":212,"required":["NONE"],"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x0001ï½0x7FFE=å
+
+é»æï¼ãã©ã¹å¤ï¼(0.1ï½3,276.6A),0xFFFFï½0x8001=æ¾é»æï¼ãã¤ãã¹å¤ï¼(-0.1ï½-3,276.7A)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¬æå
+
+æ¾é»é»å§è¨æ¸¬å¤","fields":[],"identifier":"MeasuredInstantaneousChargeDischargVoltage","initialValue":null,"isArray":false,"primitive":true,"propertyCode":213,"required":["NONE"],"size":2,"type":"int16_t","unitDescription":"V","valueDescription":"0x0001ï½0x7FFE=å
+
+é»æï¼ãã©ã¹å¤ï¼(1ï½32,766V),0xFFFFï½0x8001=æ¾é»æï¼ãã¤ãã¹å¤ï¼(-1ï½-32,767V)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®æ¾é»é»åéè¨æ¸¬å¤","fields":[],"identifier":"MeasuredCumulativeDischargeElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"propertyCode":214,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"0.001kWh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"},{"access":["RULE_SET"],"arrayCount":0,"description":"ç©ç®æ¾é»é»åéãªã»ããè¨­å®","fields":[],"identifier":"MeasuredCumulativeDischargeElectricEnergyResetSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":215,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®å
+
+é»é»åéè¨æ¸¬å¤","fields":[],"identifier":"MeasuredCumulativeChargeElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"propertyCode":216,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"0.001kWh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"},{"access":["RULE_SET"],"arrayCount":0,"description":"ç©ç®å
+
+é»é»åéãªã»ããè¨­å®","fields":[],"identifier":"MeasuredCumulativeChargeElectricEnergyResetSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":217,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"},{"access":["RULE_SET","RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"éè»¢ã¢ã¼ãè¨­å®","fields":[],"identifier":"OperationModeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":218,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ¥éå
+
+é»,0x42=å
+
+é»,0x43=æ¾é»,0x44=å¾
+æ©,0x45=ãã¹ã,0x40=ãã®ä»"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç³»çµ±é£ç³»ç¶æ
+","fields":[],"identifier":"SystemInterconnectedType","initialValue":null,"isArray":false,"primitive":true,"propertyCode":219,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ç³»çµ±é£ç³»ï¼éæ½®æµå¯ï¼,0x01=ç¬ç«,0x02=ç³»çµ±é£ç³»ï¼éæ½®æµä¸å¯ï¼"},{"access":["RULE_GET"],"arrayCount":0,"description":"æå°æå¤§å
+
+é»é»åå¤ï¼ç¬ç«æï¼","fields":[{"arrayCount":0,"description":"æå°å
+
+é»é»åå¤","fields":[],"identifier":"MinimumChargingElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"W","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"},{"arrayCount":0,"description":"æå¤§å
+
+é»é»åå¤","fields":[],"identifier":"MaximumChargingElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"W","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"}],"identifier":"MinimumMaximumChargingPowerIndependent","initialValue":null,"isArray":false,"primitive":false,"propertyCode":220,"required":["NONE"],"size":8,"type":"minimum_maximum_charging_electric_energy_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"æå°æå¤§æ¾é»é»åå¤ï¼ç¬ç«æï¼","fields":[{"arrayCount":0,"description":"æå°æ¾é»é»åå¤","fields":[],"identifier":"MinimumDischargingElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"W","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"},{"arrayCount":0,"description":"æå¤§æ¾é»é»åå¤","fields":[],"identifier":"MaximumDischargingElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"W","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"}],"identifier":"MinimumMaximumDischargingPowerIndependent","initialValue":null,"isArray":false,"primitive":false,"propertyCode":221,"required":["NONE"],"size":8,"type":"minimum_maximum_discharging_electric_energy_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"æå°æå¤§å
+
+é»é»æµå¤ï¼ç¬ç«æï¼","fields":[{"arrayCount":0,"description":"æå°å
+
+é»é»æµå¤","fields":[],"identifier":"MinimumChargingCurrent","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"},{"arrayCount":0,"description":"æå¤§å
+
+é»é»æµå¤","fields":[],"identifier":"MaximumChargingCurrent","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"}],"identifier":"MinimumMaximumChargingCurrentIndependent","initialValue":null,"isArray":false,"primitive":false,"propertyCode":222,"required":["NONE"],"size":4,"type":"minimum_maximum_charging_current_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"æå°æå¤§æ¾é»é»æµå¤ï¼ç¬ç«æï¼","fields":[{"arrayCount":0,"description":"æå°æ¾é»é»æµå¤","fields":[],"identifier":"MinimumDischargingCurrent","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"},{"arrayCount":0,"description":"æå¤§æ¾é»é»æµå¤","fields":[],"identifier":"MaximumDischargingCurrent","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"}],"identifier":"MinimumMaximumDischargingCurrentIndependent","initialValue":null,"isArray":false,"primitive":false,"propertyCode":223,"required":["NONE"],"size":4,"type":"minimum_maximum_discharging_current_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å
+
+æ¾é»éè¨­å®å¤ï¼","fields":[],"identifier":"ChargingDischaRgingAmountSetting1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["NONE"],"size":4,"type":"int32_t","unitDescription":"Wh","valueDescription":"0x00000001ï½0x3B9AC9FF=å
+
+é»æï¼ãã©ã¹å¤ï¼(1ï½999,999,999Wh),0xFFFFFFFFï½0xC4653601=æ¾é»æï¼ãã¤ãã¹å¤ï¼(-1ï½-999,999,999Wh)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å
+
+æ¾é»éè¨­å®å¤ï¼","fields":[],"identifier":"ChargingDischaRgingAmountSetting2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":2,"type":"int16_t","unitDescription":"0.1Ah","valueDescription":"0x0001ï½0x7FFE=å
+
+é»æï¼ãã©ã¹å¤ï¼(0.1ï½3,276.6Ah),0xFFFFï½0x8001=æ¾é»æï¼ãã¤ãã¹å¤ï¼(-0.1ï½-3,276.7Ah)"},{"access":["RULE_GET"],"arrayCount":0,"description":"èé»æ®éï¼","fields":[],"identifier":"RemainingStoredElectricity1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"Wh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"},{"access":["RULE_GET"],"arrayCount":0,"description":"èé»æ®éï¼","fields":[],"identifier":"RemainingStoredElectricity2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["RULE_GET"],"size":2,"type":"uint16_t","unitDescription":"0.1Ah","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"},{"access":["RULE_GET"],"arrayCount":0,"description":"èé»æ®éï¼","fields":[],"identifier":"RemainingStoredElectricity3","initialValue":null,"isArray":false,"primitive":true,"propertyCode":228,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å£åç¶æ
+","fields":[],"identifier":"BatteryStateOfHealth","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_GET"],"arrayCount":0,"description":"èé»æ± ã¿ã¤ã","fields":[],"identifier":"BatteryType","initialValue":null,"isArray":false,"primitive":true,"propertyCode":230,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00ï½0xFF=ã¿ã¤ã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å
+
+é»éè¨­å®å¤ï¼","fields":[],"identifier":"ChargingAmountSetting1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":231,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"Wh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¾é»éè¨­å®å¤ï¼","fields":[],"identifier":"DischargingAmountSetting1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":232,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"Wh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å
+
+é»éè¨­å®å¤ï¼","fields":[],"identifier":"ChargingAmountSetting2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":233,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.1Ah","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¾é»éè¨­å®å¤ï¼","fields":[],"identifier":"DischargingAmountSetting2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":234,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.1Ah","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å
+
+é»é»åè¨­å®å¤","fields":[],"identifier":"ChargingElectricEnergySetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":235,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"W","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¾é»é»åè¨­å®å¤","fields":[],"identifier":"DischargingElectricEnergySetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":236,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"W","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å
+
+é»é»æµè¨­å®å¤","fields":[],"identifier":"ChargingCurrentSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":237,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0xFFFD(0ï½6,553.3A)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¾é»é»æµè¨­å®å¤","fields":[],"identifier":"DischargingCurrentSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":238,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0xFFFD(0ï½6,553.3A)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®æ ¼é»å§ï¼ç¬ç«æï¼","fields":[],"identifier":"RatedVoltageIndependent","initialValue":null,"isArray":false,"primitive":true,"propertyCode":239,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"V","valueDescription":"0x0000ï½0x7FFE(0ï½32,766V)"}]},{"classCode":126,"description":"é»æ°èªåè»å
+
+æ¾é»ã·ã¹ãã ","name":"ELECTRIC_VEHICLE_CHARGER_DISCHARGER_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"ï¼¶ï¼ï¼¨ä½¿ç¨å¯è½å®¹éå¤ï¼","fields":[],"identifier":"DischargeableCapacityOfVehicleMountedBattery1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":192,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"Wh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ï¼¶ï¼ï¼¨ä½¿ç¨å¯è½å®¹éå¤ï¼","fields":[],"identifier":"DischargeableCapacityOfVehicleMountedBattery2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":193,"required":["RULE_GET"],"size":2,"type":"uint16_t","unitDescription":"0.1Ah","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ï¼¶ï¼ï¼¨ä½¿ç¨å¯è½æ®å®¹éï¼","fields":[],"identifier":"RemainingDischargeableCapacityOfVehicleMountedBattery1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":194,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"Wh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ï¼¶ï¼ï¼¨ä½¿ç¨å¯è½æ®å®¹éï¼","fields":[],"identifier":"RemainingDischargeableCapacityOfVehicleMountedBattery2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":195,"required":["RULE_GET"],"size":2,"type":"uint16_t","unitDescription":"0.1Ah","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ï¼¶ï¼ï¼¨ä½¿ç¨å¯è½æ®å®¹éï¼","fields":[],"identifier":"RemainingDischargeableCapacityOfVehicleMountedBattery3","initialValue":null,"isArray":false,"primitive":true,"propertyCode":196,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®æ ¼å
+
+é»è½å","fields":[],"identifier":"RatedChargeCapacity","initialValue":null,"isArray":false,"primitive":true,"propertyCode":197,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"W","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®æ ¼æ¾é»è½å","fields":[],"identifier":"RatedDischargeCapacity","initialValue":null,"isArray":false,"primitive":true,"propertyCode":198,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"W","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"å
+
+æ¾é»å¯å¦ç¶æ
+","fields":[],"identifier":"VehicleConnectionAndChargeableDischarge","initialValue":null,"isArray":false,"primitive":true,"propertyCode":199,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=å
+
+é»ä¸å¯ã»æ¾é»ä¸å¯,0x41=å
+
+é»å¯ã»æ¾é»ä¸å¯,0x42=å
+
+é»ä¸å¯ã»æ¾é»å¯,0x043=å
+
+é»å¯ã»æ¾é»å¯"},{"access":["RULE_GET"],"arrayCount":0,"description":"æå°æå¤§å
+
+é»é»åå¤","fields":[{"arrayCount":0,"description":"æå°å
+
+é»é»åå¤","fields":[],"identifier":"MinimumChargingElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"W","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"},{"arrayCount":0,"description":"æå¤§å
+
+é»é»åå¤","fields":[],"identifier":"MaximumChargingElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"W","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"}],"identifier":"MinimumMaximumChargingElectricEnergy","initialValue":null,"isArray":false,"primitive":false,"propertyCode":200,"required":["NONE"],"size":8,"type":"minimum_maximum_charging_electric_energy_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"æå°æå¤§æ¾é»é»åå¤","fields":[{"arrayCount":0,"description":"æå°æ¾é»é»åå¤","fields":[],"identifier":"MinimumDischargingElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"W","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"},{"arrayCount":0,"description":"æå¤§æ¾é»é»åå¤","fields":[],"identifier":"MaximumDischargingElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"W","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"}],"identifier":"MinimumMaximumDischargingElectricEnergy","initialValue":null,"isArray":false,"primitive":false,"propertyCode":201,"required":["NONE"],"size":8,"type":"minimum_maximum_discharging_electric_energy_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"æå°æå¤§å
+
+é»é»æµå¤","fields":[{"arrayCount":0,"description":"æå°å
+
+é»é»æµå¤","fields":[],"identifier":"MinimumChargingCurrent","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"},{"arrayCount":0,"description":"æå¤§å
+
+é»é»æµå¤","fields":[],"identifier":"MaximumChargingCurrent","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"}],"identifier":"MinimumMaximumChargingCurrent","initialValue":null,"isArray":false,"primitive":false,"propertyCode":202,"required":["NONE"],"size":4,"type":"minimum_maximum_charging_current_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"æå°æå¤§æ¾é»é»æµå¤","fields":[{"arrayCount":0,"description":"æå°æ¾é»é»æµå¤","fields":[],"identifier":"MinimumDischargingCurrent","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"},{"arrayCount":0,"description":"æå¤§æ¾é»é»æµå¤","fields":[],"identifier":"MaximumDischargingCurrent","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6A)"}],"identifier":"MinimumMaximumDischargingCurrent","initialValue":null,"isArray":false,"primitive":false,"propertyCode":203,"required":["NONE"],"size":4,"type":"minimum_maximum_discharging_current_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"ä½¿ç¨å®¹éå¤ï¼","fields":[],"identifier":"UsedCapacityOfVehicleMountedBattery1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":208,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"Wh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ä½¿ç¨å®¹éå¤ï¼","fields":[],"identifier":"UsedCapacityOfVehicleMountedBattery2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":209,"required":["RULE_GET"],"size":2,"type":"uint16_t","unitDescription":"0.1Ah","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®æ ¼é»å§","fields":[],"identifier":"RatedVoltage","initialValue":null,"isArray":false,"primitive":true,"propertyCode":210,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"V","valueDescription":"0x0000ï½0x7FFE(0ï½32,766V)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¬æå
+
+æ¾é»é»åè¨æ¸¬å¤","fields":[],"identifier":"MeasuredInstantaneousChargingDischargingElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"propertyCode":211,"required":["NONE"],"size":4,"type":"int32_t","unitDescription":"W","valueDescription":"0x00000001ï½0x3B9AC9FF=å
+
+é»æï¼ãã©ã¹å¤ï¼(1ï½999,999,999W),0xFFFFFFFFï½0xC4653601=æ¾é»æï¼ãã¤ãã¹å¤ï¼(-1ï½-999,999,999W)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¬æå
+
+æ¾é»é»æµè¨æ¸¬å¤","fields":[],"identifier":"MeasuredInstantaneousChargingDischargingCurrent","initialValue":null,"isArray":false,"primitive":true,"propertyCode":212,"required":["NONE"],"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x0001ï½0x7FFE=å
+
+é»æï¼ãã©ã¹å¤ï¼(0.1ï½3,276.6A),0xFFFFï½0x8001=æ¾é»æï¼ãã¤ãã¹å¤ï¼(-0.1ï½-3,276.7A)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¬æå
+
+æ¾é»é»å§è¨æ¸¬å¤","fields":[],"identifier":"MeasuredInstantaneousChargingDischargingVoltage","initialValue":null,"isArray":false,"primitive":true,"propertyCode":213,"required":["NONE"],"size":2,"type":"int16_t","unitDescription":"V","valueDescription":"0x0001ï½0x7FFE=å
+
+é»æï¼ãã©ã¹å¤ï¼(1ï½32,766V),0xFFFFï½0x8001=æ¾é»æï¼ãã¤ãã¹å¤ï¼(-1ï½-32,767V)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®æ¾é»é»åéè¨æ¸¬å¤","fields":[],"identifier":"MeasuredIntegralDischargingElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"propertyCode":214,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"0.001kWh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç©ç®æ¾é»é»åéãªã»ããè¨­å®","fields":[],"identifier":"IntegralDischargingElectricEnergyResetSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":215,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®å
+
+é»é»åéè¨æ¸¬å¤","fields":[],"identifier":"MeasuredIntegralChargingElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"propertyCode":216,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"0.001kWh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç©ç®å
+
+é»é»åéãªã»ããè¨­å®","fields":[],"identifier":"IntegralChargingElectricEnergyResetSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":217,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"},{"access":["RULE_SET","RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"éè»¢ã¢ã¼ãè¨­å®","fields":[],"identifier":"OperationModeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":218,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ¥éå
+
+é»,0x42=å
+
+é»,0x43=æ¾é»,0x44=å¾
+æ©,0x45=ãã¹ã,0x40=ãã®ä»"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç³»çµ±é£ç³»ç¶æ
+","fields":[],"identifier":"SystemInterconnectedType","initialValue":null,"isArray":false,"primitive":true,"propertyCode":219,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ç³»çµ±é£ç³»ï¼éæ½®æµå¯ï¼,0x01=ç¬ç«,0x02=ç³»çµ±é£ç³»ï¼éæ½®æµä¸å¯ï¼"},{"access":["RULE_GET"],"arrayCount":0,"description":"é»æ± æ®å®¹éï¼","fields":[],"identifier":"RemainingStoredElectricityOfVehicleMountedBattery1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"Wh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"},{"access":["RULE_GET"],"arrayCount":0,"description":"é»æ± æ®å®¹éï¼","fields":[],"identifier":"RemainingStoredElectricityOfVehicleMountedBattery2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["RULE_GET"],"size":2,"type":"uint16_t","unitDescription":"0.1Ah","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"},{"access":["RULE_GET"],"arrayCount":0,"description":"é»æ± æ®å®¹éï¼","fields":[],"identifier":"RemainingStoredElectricityOfVehicleMountedBattery3","initialValue":null,"isArray":false,"primitive":true,"propertyCode":228,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å£åç¶æ
+","fields":[],"identifier":"BatteryStateOfHealth","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å
+
+é»éè¨­å®å¤ï¼","fields":[],"identifier":"ChargingAmountSetting1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":231,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"Wh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¾é»éè¨­å®å¤ï¼","fields":[],"identifier":"DischargingAmountSetting1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":232,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"Wh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999Wh)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å
+
+é»éè¨­å®å¤ï¼","fields":[],"identifier":"ChargingAmountSetting2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":233,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.1Ah","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¾é»éè¨­å®å¤ï¼","fields":[],"identifier":"DischargingAmountSetting2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":234,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.1Ah","valueDescription":"0x0000ï½0x7FFE(0ï½3,276.6Ah)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å
+
+é»é»åè¨­å®å¤","fields":[],"identifier":"ChargingElectricEnergySetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":235,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"W","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¾é»é»åè¨­å®å¤","fields":[],"identifier":"DischargingElectricEnergySetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":236,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"W","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999W)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å
+
+é»é»æµè¨­å®å¤","fields":[],"identifier":"ChargingCurrentSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":237,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0xFFFD(0ï½6,553.3A)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¾é»é»æµè¨­å®å¤","fields":[],"identifier":"DischargingCurrentSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":238,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x0000ï½0xFFFD(0ï½6,553.3A)"}]},{"classCode":127,"description":"ã¨ã³ã¸ã³ã³ã¼ã¸ã§ãã¬ã¼ã·ã§ã³","name":"ENGINE_COGENERATION_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"æ¸©æ°´å¨æ¹¯æ¸©è¨æ¸¬å¤","fields":[],"identifier":"MeasuredTemperatureOfWaterInWaterHeater","initialValue":null,"isArray":false,"primitive":true,"propertyCode":193,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x64(0ï½100â)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®æ ¼çºé»é","fields":[],"identifier":"RatedPowerGenerationOutput","initialValue":null,"isArray":false,"primitive":true,"propertyCode":194,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65,533W)"},{"access":["RULE_GET"],"arrayCount":0,"description":"è²¯æ¹¯æ§½ç±é","fields":[],"identifier":"HeatingValueOfHotWaterStorageTank","initialValue":null,"isArray":false,"primitive":true,"propertyCode":195,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"MJ","valueDescription":"0x0000ï½0xFFFD(0ï½65,533MJ)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¬æçºé»é»åè¨æ¸¬å¤","fields":[],"identifier":"MeasuredInstantaneousPowerGenerationOutput","initialValue":null,"isArray":false,"primitive":true,"propertyCode":196,"required":["RULE_GET"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65,533W)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®çºé»é»åéè¨æ¸¬å¤","fields":[],"identifier":"MeasuredCumulativePowerGenerationOutput","initialValue":null,"isArray":false,"primitive":true,"propertyCode":197,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"0.001kWh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"},{"access":["RULE_SET"],"arrayCount":0,"description":"ç©ç®çºé»é»åéãªã»ããè¨­å®","fields":[],"identifier":"CumulativePowerGenerationOutputResetSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":198,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¬æã¬ã¹æ¶è²»éè¨æ¸¬å¤","fields":[],"identifier":"MeasuredInstantaneousGasConsumption","initialValue":null,"isArray":false,"primitive":true,"propertyCode":199,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.001ã¥\/h","valueDescription":"0x0000ï½0xFFFD(0ï½65.533ã¥\/h)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®ã¬ã¹æ¶è²»éè¨æ¸¬å¤","fields":[],"identifier":"MeasuredCumulativeGasConsumption","initialValue":null,"isArray":false,"primitive":true,"propertyCode":200,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"0.001ã¥","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999ã¥)"},{"access":["RULE_SET"],"arrayCount":0,"description":"ç©ç®ã¬ã¹æ¶è²»éãªã»ããè¨­å®","fields":[],"identifier":"CumulativeGasConsumptionResetSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":201,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"},{"access":["RULE_SET"],"arrayCount":0,"description":"çºé»åä½è¨­å®","fields":[],"identifier":"PowerGenerationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":202,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=çºé»åä½,0x42=çºé»åæ­¢"},{"access":["RULE_GET"],"arrayCount":0,"description":"çºé»åä½ç¶æ
+","fields":[],"identifier":"PowerGenerationStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":203,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=çºé»ä¸­,0x42=åæ­¢ä¸­,0x45=ã¢ã¤ãã«ä¸­"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®
+å
+ç¬ææ¶è²»é»åè¨æ¸¬å¤","fields":[],"identifier":"MeasuredInHouseInstantaneousPowerConsumption","initialValue":null,"isArray":false,"primitive":true,"propertyCode":204,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65,533W)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®
+å
+ç©ç®æ¶è²»é»åéè¨æ¸¬å¤","fields":[],"identifier":"MeasuredInHouseCumulativePowerConsumption","initialValue":null,"isArray":false,"primitive":true,"propertyCode":205,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"0.001kWh","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999kWh)"},{"access":["RULE_SET"],"arrayCount":0,"description":"å®
+å
+ç©ç®æ¶è²»é»åéãªã»ããè¨­å®","fields":[],"identifier":"InHouseCumulativePowerConsumptionReset","initialValue":null,"isArray":false,"primitive":true,"propertyCode":206,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ãªã»ãã"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç³»çµ±é£ç³»ç¶æ
+","fields":[],"identifier":"SystemInterconnectedType","initialValue":null,"isArray":false,"primitive":true,"propertyCode":208,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=ç³»çµ±é£ç³»ï¼éæ½®æµå¯ï¼,0x01=ç¬ç«,0x02=ç³»çµ±é£ç³»ï¼éæ½®æµä¸å¯ï¼"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ®æ¹¯éè¨æ¸¬å¤","fields":[],"identifier":"MeasuredRemainingHotWaterAmount","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"ã","valueDescription":"0x0000ï½0xFFFD(0ï½65,533ã)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ã¿ã³ã¯å®¹éå¤","fields":[],"identifier":"TankCapacity","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"ã","valueDescription":"0x0000ï½0xFFFD(0ï½65,533ã)"}]},{"classCode":128,"description":"é»åéã¡ã¼ã¿","name":"ELECTRIC_ENERGY_METER_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®é»åéè¨æ¸¬å¤","fields":[],"identifier":"IntegralElectricEnergyMeasurementValue","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"0.1kWh|0.01kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®é»åéåä½","fields":[],"identifier":"IntegralElectricEnergyUnit","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01=0.1kWh,0x02=0.01kWh"},{"access":["RULE_GET"],"arrayCount":48,"description":"ç©ç®é»åéè¨æ¸¬å¤å±¥æ­´ï¼","fields":[],"identifier":"IntegralElectricEnergyMeasurementLog1","initialValue":null,"isArray":true,"primitive":true,"propertyCode":227,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"0.1kWh|0.01kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"access":["NONE"],"arrayCount":2160,"description":"ç©ç®é»åéè¨æ¸¬å¤å±¥æ­´ï¼","fields":[],"identifier":"IntegralElectricEnergyMeasurementLog2","initialValue":null,"isArray":true,"primitive":true,"propertyCode":228,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"0.1kWh|0.01kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"}]},{"classCode":129,"description":"æ°´æµéã¡ã¼ã¿","name":"WATER_FLOW_METER_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ°´æµåºå","fields":[],"identifier":"FlowingWaterClassification","initialValue":null,"isArray":false,"primitive":true,"propertyCode":208,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x30=ä¸æ°´,0x31=ä¸­æ°´,0x32=æ¸©æ°´,0x33=ãã®ä»"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ææè
+åºå","fields":[],"identifier":"OwnerClassification","initialValue":null,"isArray":false,"primitive":true,"propertyCode":209,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x30=æå®ãªã,0x31=äºæ¥­ä½,0x32=æ°éä¼ç¤¾,0x33=åäºº"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®æ°´æµéè¨æ¸¬å¤","fields":[],"identifier":"MeasuredCumulativeAmountOfFlowingWater","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"ã¥","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®æ°´æµéè¨æ¸¬å¤åä½","fields":[],"identifier":"UnitForMeasuredCumulativeAmountsOfFlowingWater","initialValue":"0x04","isArray":false,"primitive":true,"propertyCode":225,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=1ã¥,0x01=0.1ã¥,0x02=0.01ã¥,0x03=0.001ã¥,0x04=0.0001ã¥,0x05=0.00001ã¥,0x06=0.000001ã¥"},{"access":["RULE_GET"],"arrayCount":48,"description":"ç©ç®æ°´æµéè¨æ¸¬å¤å±¥æ­´","fields":[],"identifier":"HistoricalDataOfMeasuredCumulativeAmountsOfFlowingWater","initialValue":null,"isArray":true,"primitive":true,"propertyCode":226,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"0.001ã¥","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999ã¥)"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ¤éãã¼ã¿ç°å¸¸æ¤ç¥ç¶æ
+","fields":[],"identifier":"DetectionOfAbnormalValueInMeteringData","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç°å¸¸æ¤ç¥æ,0x42=ç°å¸¸æ¤ç¥ç¡"},{"access":["RULE_GET"],"arrayCount":0,"description":"ã»ã­ã¥ãªãã£ãã¼ã¿æ
+å ±","fields":[],"identifier":"SecurityDataInformation","initialValue":null,"isArray":false,"primitive":true,"propertyCode":228,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":null,"valueDescription":"0x00000000ï½0xFFFFFFFF"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼©ï¼¤çªå·è¨­å®","fields":[],"identifier":"IdNumberSetting","initialValue":"'000000'","isArray":false,"primitive":true,"propertyCode":229,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"ASCIIã³ã¼ãã§æå®ã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¤å®æºææ
+å ±","fields":[],"identifier":"VerificationExpirationInformation","initialValue":null,"isArray":false,"primitive":true,"propertyCode":230,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"ASCIIã³ã¼ãã§æå®ãxxxxå¹´xxæ"}]},{"classCode":130,"description":"ã¬ã¹ã¡ã¼ã¿","name":"GAS_METER_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®ã¬ã¹æ¶è²»éè¨æ¸¬å¤","fields":[],"identifier":"IntegralGasConsumptionMeasurementValue","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"0.001ã¥","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999ã¥)"},{"access":["RULE_GET"],"arrayCount":48,"description":"ç©ç®ã¬ã¹æ¶è²»éè¨æ¸¬å¤å±¥æ­´","fields":[],"identifier":"IntegralGasConsumptionMeasurementLog","initialValue":null,"isArray":true,"primitive":true,"propertyCode":226,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"0.001ã¥","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999ã¥)"}]},{"classCode":131,"description":"ï¼¬ï¼°ã¬ã¹ã¡ã¼ã¿","name":"LP_GAS_METERS_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"æ¤éãã¼ã¿ç©ç®ã¬ã¹æ¶è²»éè¨æ¸¬å¤ï¼","fields":[],"identifier":"IntegralGasConsumptionOfMeteringData1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"0.0001ã¥","valueDescription":"0x00000000ï½0x005F5E0FF(0ï½9,999.9999ã¥)"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ¤éãã¼ã¿ç©ç®ã¬ã¹æ¶è²»éè¨æ¸¬å¤ï¼","fields":[],"identifier":"IntegralGasConsumptionOfMeteringData2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"0.001ã¥","valueDescription":"0x00000000ï½0x005F5E0FF(0ï½99,999.999ã¥)"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ¤éãã¼ã¿ç°å¸¸æ¤ç¥ç¶æ
+","fields":[],"identifier":"ErrorDetectionStatusofMeteringData","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç°å¸¸æ¤ç¥æ,0x42=ç°å¸¸æ¤ç¥ç¡"},{"access":["RULE_GET"],"arrayCount":0,"description":"ã»ã­ã¥ãªãã£ãã¼ã¿æ
+å ±ï¼","fields":[],"identifier":"SecurityData1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":null,"valueDescription":"0x00000000ï½0xFFFFFFFF"},{"access":["RULE_GET"],"arrayCount":0,"description":"ã»ã­ã¥ãªãã£ãã¼ã¿æ
+å ±ï¼","fields":[],"identifier":"SecurityData2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":228,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":null,"valueDescription":"0x00000000ï½0xFFFFFFFF"},{"access":["RULE_GET"],"arrayCount":0,"description":"ã»ã³ã¿ã¼å¼é®æ­ç¶æ
+","fields":[],"identifier":"CenterValveShutOffStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ã»ã³ã¿ã¼å¼é®æ­æã,0x42=ã»ã³ã¿ã¼å¼é®æ­ç¡ã"},{"access":["RULE_GET"],"arrayCount":0,"description":"ã»ã³ã¿ã¼å¼é®æ­å¾©å¸°è¨±å¯ç¶æ
+","fields":[],"identifier":"CenterValveShutOffRecoveryPermissionSettingStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":230,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ã»ã³ã¿ã¼å¼é®æ­å¾©å¸°è¨±å¯,0x42=ã»ã³ã¿ã¼å¼é®æ­å¾©å¸°éè¨±å¯"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç·æ¥å¼é®æ­ç¶æ
+","fields":[],"identifier":"EmergencyValveShutOffStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":231,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç·æ¥å¼é®æ­æã,0x42=ç·æ¥å¼é®æ­ç¡ã"},{"access":["RULE_GET"],"arrayCount":0,"description":"é®æ­å¼ééç¶æ
+","fields":[],"identifier":"ShutOffValveOpenCloseStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":232,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é®æ­å¼éç¶æ
+,0x42=é®æ­å¼éç¶æ
+"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ®éç®¡çè­¦åã¬ãã«","fields":[],"identifier":"ResidualVolumeControlWarning","initialValue":null,"isArray":false,"primitive":true,"propertyCode":233,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31=æ®éç®¡çè­¦åã¬ãã«1,0x32=æ®éç®¡çè­¦åã¬ãã«2,0x33=æ®éç®¡çè­¦åã¬ãã«3,0x42=æ®éç®¡çè­¦åç¡ã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":3,"description":"æ®éç®¡çè­¦åã¬ãã«è¨­å®å¤ï¼","fields":[],"identifier":"SetValueOfResidualVolumeControlWarningLevel1","initialValue":null,"isArray":true,"primitive":true,"propertyCode":234,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ã","valueDescription":"0x000000ï½0xFFFFFF(0ï½16,777,215)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":3,"description":"æ®éç®¡çè­¦åã¬ãã«è¨­å®å¤ï¼","fields":[],"identifier":"SetValueOfResidualVolumeControlWarningLevel2","initialValue":null,"isArray":true,"primitive":true,"propertyCode":235,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ã","valueDescription":"0x000000ï½0xFFFFFF(0ï½16,777,215)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":3,"description":"æ®éç®¡çè­¦åã¬ãã«è¨­å®å¤ï¼","fields":[],"identifier":"SetValueOfResidualVolumeControlWarningLevel3","initialValue":null,"isArray":true,"primitive":true,"propertyCode":236,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ã","valueDescription":"0x000000ï½0xFFFFFF(0ï½16,777,215)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å¾®å°æ¼æ´©ã¿ã¤ãå¤ï¼ã¬ã¹æµéç¶ç¶ï¼","fields":[],"identifier":"SlightLeakTimerValueGasFlowRateContinuation","initialValue":null,"isArray":false,"primitive":true,"propertyCode":237,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"æ¥","valueDescription":"0x00ï½0xFD(0ï½253æ¥)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å¾®å°æ¼æ´©ã¿ã¤ãå¤ï¼å§åä¸æç¡ãï¼","fields":[],"identifier":"SlightLeakTimerValueWithoutPressureIncrease","initialValue":null,"isArray":false,"primitive":true,"propertyCode":238,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"æ¥","valueDescription":"0x00ï½0xFD(0ï½253æ¥)"},{"access":["RULE_GET"],"arrayCount":3,"description":"é®æ­çç±å±¥æ­´æ
+å ±","fields":[],"identifier":"ShutOffReasonLog","initialValue":null,"isArray":true,"primitive":true,"propertyCode":239,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0xFF:0xFF:0xFF"},{"access":["RULE_GET"],"arrayCount":0,"description":"ä¾çµ¦å§åãã¼ã¿æå¤§å¤","fields":[],"identifier":"MaximumValueOfSupplyPressureData","initialValue":null,"isArray":false,"primitive":true,"propertyCode":208,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.01kPa","valueDescription":"0x0000ï½0xFFFD(0ï½655.33kPa)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ä¾çµ¦å§åãã¼ã¿æå°å¤","fields":[],"identifier":"MinimumValueOfSupplyPressureData","initialValue":null,"isArray":false,"primitive":true,"propertyCode":209,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.01kPa","valueDescription":"0x0000ï½0xFFFD(0ï½655.33kPa)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ä¾çµ¦å§åãã¼ã¿ç¾å¨å¤","fields":[],"identifier":"CurrentValueOfSupplyPressureData","initialValue":null,"isArray":false,"primitive":true,"propertyCode":210,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.01kPa","valueDescription":"0x0000ï½0xFFFD(0ï½655.33kPa)"},{"access":["RULE_GET"],"arrayCount":0,"description":"éå¡å§åãã¼ã¿æå¤§å¤","fields":[],"identifier":"MaximumValueOfBlockPressureData","initialValue":null,"isArray":false,"primitive":true,"propertyCode":211,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.01kPa","valueDescription":"0x0000ï½0xFFFD(0ï½655.33kPa)"},{"access":["RULE_GET"],"arrayCount":0,"description":"éå¡å§åãã¼ã¿æå°å¤","fields":[],"identifier":"MinimumValueOfBlockPressureData","initialValue":null,"isArray":false,"primitive":true,"propertyCode":212,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.01kPa","valueDescription":"0x0000ï½0xFFFD(0ï½655.33kPa)"},{"access":["RULE_GET"],"arrayCount":0,"description":"éå¡å§åãã¼ã¿ç¾å¨å¤","fields":[],"identifier":"CurrentValueOfBlockPressureData","initialValue":null,"isArray":false,"primitive":true,"propertyCode":213,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.01kPa","valueDescription":"0x0000ï½0xFFFD(0ï½655.33kPa)"},{"access":["RULE_GET"],"arrayCount":0,"description":"éå¡å§åã»ä¾çµ¦å§åç°å¸¸æ¥åæ°æ
+å ±","fields":[{"arrayCount":0,"description":"éå¡å§åç°å¸¸æ¥æ°","fields":[],"identifier":"NumberOfBlockPressureErrorDays","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00ï½0xFF(0ï½255æ¥)"},{"arrayCount":0,"description":"ä¾çµ¦å§åç°å¸¸æ¥æ°","fields":[],"identifier":"NumberOfSupplyPressureErrorDays","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00ï½0xFF(0ï½255æ¥)"},{"arrayCount":0,"description":"éå¡å§åç°å¸¸åæ°","fields":[],"identifier":"NumberOfBlockPressureErrorTimes","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00ï½0xFF(0ï½255å)"},{"arrayCount":0,"description":"ä¾çµ¦å§åç°å¸¸åæ°","fields":[],"identifier":"NumberOfSupplyPressureErrorTimes","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00ï½0xFF(0ï½255å)"}],"identifier":"NumberOfBlockPressureSupplyPressureErrorDaysTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":214,"required":["NONE"],"size":4,"type":"number_of_block_pressure_supply_pressure_error_days_time_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãã¹ãçºå¼è¨­å®","fields":[],"identifier":"TestCallSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":215,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ãã¹ãçºå¼åä½ãã,0x42=ãã¹ãçºå¼åä½ãªã"}]},{"classCode":132,"description":"æè¨","name":"CLOCK_EOBJ","propertyList":[]},{"classCode":133,"description":"èªåãã¢","name":"AUTOMATIC_DOOR_EOBJ","propertyList":[]},{"classCode":134,"description":"æ¥­åç¨ã¨ã¬ãã¼ã¿","name":"COMMERCIAL_ELEVATOR_EOBJ","propertyList":[]},{"classCode":135,"description":"åé»ç¤ã¡ã¼ã¿ãªã³ã°","name":"DISTRIBUTION_PANEL_METERING_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®é»åéè¨æ¸¬å¤ï¼æ­£æ¹åï¼","fields":[],"identifier":"MeasuredCumulativeAmountOfElectricEnergyNormalDirection","initialValue":null,"isArray":false,"primitive":true,"propertyCode":192,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®é»åéè¨æ¸¬å¤ï¼éæ¹åï¼","fields":[],"identifier":"MeasuredCumulativeAmountOfElectricEnergyReverseDirection","initialValue":null,"isArray":false,"primitive":true,"propertyCode":193,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®é»åéåä½","fields":[],"identifier":"UnitForCumulativeAmountsOfElectricEnergy","initialValue":"0x03","isArray":false,"primitive":true,"propertyCode":194,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=1kWh,0x01=0.1kWh,0x02=0.01kWh,0x03=0.001kWh,0x04=0.0001kWh,0x0A=10kWh,0x0B=100kWh,0x0C=1000kWh,0x0D=10000kWh"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®é»åéè¨æ¸¬å¤å±¥æ­´ï¼æ­£æ¹åï¼","fields":[{"arrayCount":0,"description":"ç©ç®å±¥æ­´åéæ¥","fields":[],"identifier":"DayForWhichTheHistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"æ¥","valueDescription":"0x0000ï½0x0063(0ï½99)"},{"arrayCount":48,"description":"ç©ç®é»åé","fields":[],"identifier":"HistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergy","initialValue":null,"isArray":true,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"}],"identifier":"HistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergyNormalDirectioHistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergyNormalDirection","initialValue":null,"isArray":false,"primitive":false,"propertyCode":195,"required":["NONE"],"size":194,"type":"historical_data_of_measured_cumulative_amounts_of_electric_energy_t","unitDescription":"kWh","valueDescription":"0x0000ï½0x0063:0x00000000ï½0x05F5E0FF(0ï½99):(0ï½99,999,999)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®é»åéè¨æ¸¬å¤å±¥æ­´ï¼éæ¹åï¼","fields":[{"arrayCount":0,"description":"ç©ç®å±¥æ­´åéæ¥","fields":[],"identifier":"DayForWhichTheHistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"æ¥","valueDescription":"0x0000ï½0x0063(0ï½99)"},{"arrayCount":48,"description":"ç©ç®é»åé","fields":[],"identifier":"HistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergy","initialValue":null,"isArray":true,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"}],"identifier":"HistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergyReverseDirection","initialValue":null,"isArray":false,"primitive":false,"propertyCode":196,"required":["NONE"],"size":194,"type":"historical_data_of_measured_cumulative_amounts_of_electric_energy_t","unitDescription":"kWh","valueDescription":"0x0000ï½0x0063:0x00000000ï½0x05F5E0FF(0ï½99):(0ï½99,999,999)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç©ç®å±¥æ­´åéæ¥","fields":[],"identifier":"DayForWhichTheHistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergyIsToBeRetrieved","initialValue":null,"isArray":false,"primitive":true,"propertyCode":197,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"æ¥","valueDescription":"0x00=å½æ¥,0x01ï½0x63=åæ¥ã®æ¥æ°(0ï½99)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¬æé»åè¨æ¸¬å¤","fields":[],"identifier":"MeasuredInstantaneoUsAmountOfElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"propertyCode":198,"required":["NONE"],"size":4,"type":"int32_t","unitDescription":"W","valueDescription":"0x80000001ï½0x7FFFFFFD(-2,147,483,647ï½2,147,483,645)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¬æé»æµè¨æ¸¬å¤","fields":[{"arrayCount":0,"description":"Rç¸","fields":[],"identifier":"RPhase","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"Tç¸","fields":[],"identifier":"TPhase","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasuredInstantaneousCurrents","initialValue":null,"isArray":false,"primitive":false,"propertyCode":199,"required":["NONE"],"size":4,"type":"measured_instantaneous_currents_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¬æé»å§è¨æ¸¬å¤","fields":[{"arrayCount":0,"description":"R-S(N)é","fields":[],"identifier":"BetweenRAndSN","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"0.1V","valueDescription":"0x0000ï½0xFFFD(0ï½6,553.3)"},{"arrayCount":0,"description":"S(N)-Té","fields":[],"identifier":"BetweenSNAndT","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"0.1V","valueDescription":"0x0000ï½0xFFFD(0ï½6,553.3)"}],"identifier":"MeasuredInstantaneousVoltages","initialValue":null,"isArray":false,"primitive":false,"propertyCode":200,"required":["NONE"],"size":4,"type":"measured_instantaneous_voltages_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel1","initialValue":null,"isArray":false,"primitive":false,"propertyCode":208,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel2","initialValue":null,"isArray":false,"primitive":false,"propertyCode":209,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel3","initialValue":null,"isArray":false,"primitive":false,"propertyCode":210,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel4","initialValue":null,"isArray":false,"primitive":false,"propertyCode":211,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel5","initialValue":null,"isArray":false,"primitive":false,"propertyCode":212,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel6","initialValue":null,"isArray":false,"primitive":false,"propertyCode":213,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel7","initialValue":null,"isArray":false,"primitive":false,"propertyCode":214,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel8","initialValue":null,"isArray":false,"primitive":false,"propertyCode":215,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel9","initialValue":null,"isArray":false,"primitive":false,"propertyCode":216,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel10","initialValue":null,"isArray":false,"primitive":false,"propertyCode":217,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel11","initialValue":null,"isArray":false,"primitive":false,"propertyCode":218,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel12","initialValue":null,"isArray":false,"primitive":false,"propertyCode":219,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel13","initialValue":null,"isArray":false,"primitive":false,"propertyCode":220,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel14","initialValue":null,"isArray":false,"primitive":false,"propertyCode":221,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel15","initialValue":null,"isArray":false,"primitive":false,"propertyCode":222,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel16","initialValue":null,"isArray":false,"primitive":false,"propertyCode":223,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel17","initialValue":null,"isArray":false,"primitive":false,"propertyCode":224,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel18","initialValue":null,"isArray":false,"primitive":false,"propertyCode":225,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel19","initialValue":null,"isArray":false,"primitive":false,"propertyCode":226,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel20","initialValue":null,"isArray":false,"primitive":false,"propertyCode":227,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel21","initialValue":null,"isArray":false,"primitive":false,"propertyCode":228,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel22","initialValue":null,"isArray":false,"primitive":false,"propertyCode":229,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel23","initialValue":null,"isArray":false,"primitive":false,"propertyCode":230,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel24","initialValue":null,"isArray":false,"primitive":false,"propertyCode":231,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel25","initialValue":null,"isArray":false,"primitive":false,"propertyCode":232,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel26","initialValue":null,"isArray":false,"primitive":false,"propertyCode":233,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel27","initialValue":null,"isArray":false,"primitive":false,"propertyCode":234,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel28","initialValue":null,"isArray":false,"primitive":false,"propertyCode":235,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel29","initialValue":null,"isArray":false,"primitive":false,"propertyCode":236,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel30","initialValue":null,"isArray":false,"primitive":false,"propertyCode":237,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel31","initialValue":null,"isArray":false,"primitive":false,"propertyCode":238,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨æ¸¬ãã£ã³ãã«ï¼ï¼","fields":[{"arrayCount":0,"description":"é»åé","fields":[],"identifier":"ElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Rç¸","fields":[],"identifier":"EffectiveInstantaneousRPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"å®å¹é»æµå¤Tç¸","fields":[],"identifier":"EffectiveInstantaneousTPhaseCurrents","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasurementChannel32","initialValue":null,"isArray":false,"primitive":false,"propertyCode":239,"required":["NONE"],"size":8,"type":"measurement_data_t","unitDescription":null,"valueDescription":""}]},{"classCode":136,"description":"ã¹ãã¼ãé»åéã¡ã¼ã¿","name":"SMART_ELECTRIC_ENERGY_METER_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é»ååºå","fields":[],"identifier":"ElectricEnergyMeterClassification","initialValue":null,"isArray":false,"primitive":true,"propertyCode":208,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x30=é»åä¼ç¤¾,0x31=å¤ªé½å
+,0x32=çæé»æ± ,0x33=èé»æ± ,0x34=EV,0x35=ãã®ä»"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ææè
+åºå","fields":[],"identifier":"OwnerClassification","initialValue":null,"isArray":false,"primitive":true,"propertyCode":209,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x30=æå®ãªã,0x31=é»åä¼ç¤¾,0x32=é»åä¼ç¤¾ä»¥å¤,0x33=åäºº"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¸ç·å¼è¨­å®ç¶æ
+","fields":[],"identifier":"ConfigurationInformationOfPhasesAndWiresOfTheSystems","initialValue":null,"isArray":false,"primitive":true,"propertyCode":210,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x30=åç¸2ç·,0x31=åç¸3ç·,0x32=ä¸ç¸3ç·,0x33=ä¸ç¸4ç·"},{"access":["RULE_GET"],"arrayCount":0,"description":"åæå¤ææ¯","fields":[],"identifier":"CompositeTransformationRatio","initialValue":null,"isArray":false,"primitive":true,"propertyCode":211,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":null,"valueDescription":"0x00000000ï½0x000F423F(000000ï½999999)"},{"access":["RULE_GET"],"arrayCount":0,"description":"åæå¤ææ¯ã®åç","fields":[],"identifier":"MultiplyingFactorForCompositeTransformationRatio","initialValue":null,"isArray":false,"primitive":true,"propertyCode":212,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=Ã1,0x01=Ã0.1,0x02=Ã0.01,0x03=Ã0.001"},{"access":["RULE_GET"],"arrayCount":10,"description":"è¨å¨èªå®çªå·","fields":[],"identifier":"MeterTypeCertificationNumberTypeApprovalNumberInJapan","initialValue":null,"isArray":true,"primitive":true,"propertyCode":213,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"(åå¼èªå®è¨å¨çªå·è¨è¼æ¹æ³ã«å¾ã)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":6,"description":"æ¤å®æºäºå¹´æ","fields":[],"identifier":"VerificationExpirationDate","initialValue":null,"isArray":true,"primitive":true,"propertyCode":214,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"YYYYMM:YYYY(è¥¿æ¦),MM(æ)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®é»åéæå¹æ¡æ°","fields":[],"identifier":"NumberOfEffectiveDigitsForCumulativeAmountsOfElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"propertyCode":215,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":"æ¡","valueDescription":"0x01ï½0x08(1ï½8)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®é»åéè¨æ¸¬å¤ï¼æ­£æ¹åè¨æ¸¬å¤ï¼","fields":[],"identifier":"MeasuredCumulativeAmountOfElectricEnergyNormalDirection","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®é»åéåä½ï¼æ­£æ¹åãéæ¹åè¨æ¸¬å¤ï¼","fields":[],"identifier":"UnitForCumulativeAmountsOfElectricEnergyNormalAndReverseDirections","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=1kWh,0x01=0.1kWh,0x02=0.01kWh,0x03=0.001kWh,0x04=0.0001kWh,0x0A=10kWh,0x0B=100kWh,0x0C=1000kWh,0x0D=10000kWh"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®é»åéè¨æ¸¬å¤å±¥æ­´ï¼æ­£æ¹åè¨æ¸¬å¤ï¼","fields":[{"arrayCount":0,"description":"ç©ç®å±¥æ­´åéæ¥","fields":[],"identifier":"DayForWhichTheHistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"æ¥","valueDescription":"0x0000ï½0x0063(0ï½99)"},{"arrayCount":48,"description":"ç©ç®é»åé","fields":[],"identifier":"HistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergy","initialValue":null,"isArray":true,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"}],"identifier":"HistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergyNormalDirection","initialValue":null,"isArray":false,"primitive":false,"propertyCode":226,"required":["NONE"],"size":194,"type":"historical_data_of_measured_cumulative_amounts_of_electric_energy_t","unitDescription":"kWh","valueDescription":"0x0000ï½0x0063:0x00000000ï½0x05F5E0FF(0ï½99):(0ï½99,999,999)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®é»åéè¨æ¸¬å¤ï¼éæ¹åè¨æ¸¬å¤ï¼","fields":[],"identifier":"MeasuredCumulativeAmountOfElectricEnergyReverseDirection","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["NONE"],"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®é»åéè¨æ¸¬å¤å±¥æ­´ï¼éæ¹åè¨æ¸¬å¤ï¼","fields":[{"arrayCount":0,"description":"ç©ç®å±¥æ­´åéæ¥","fields":[],"identifier":"DayForWhichTheHistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"æ¥","valueDescription":"0x0000ï½0x0063(0ï½99)"},{"arrayCount":48,"description":"ç©ç®é»åé","fields":[],"identifier":"HistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergy","initialValue":null,"isArray":true,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"}],"identifier":"HistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergyReverseDirection","initialValue":null,"isArray":false,"primitive":false,"propertyCode":228,"required":["NONE"],"size":194,"type":"historical_data_of_measured_cumulative_amounts_of_electric_energy_t","unitDescription":"kWh","valueDescription":"0x0000ï½0x0063:0x00000000ï½0x05F5E0FF(0ï½99):(0ï½99,999,999)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç©ç®å±¥æ­´åéæ¥","fields":[],"identifier":"DayForWhichTheHistoricalDataOfMeasuredCumulativeAmountsOfElectricEnergyIsToBeRetrieved","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=å½æ¥,0x01ï½0x63=åæ¥ã®æ¥æ°(0ï½99)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¬æé»åè¨æ¸¬å¤","fields":[],"identifier":"MeasuredInstantaneousAmountOfElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"propertyCode":231,"required":["NONE"],"size":4,"type":"int32_t","unitDescription":"W","valueDescription":"0x80000001ï½0x7FFFFFFD(-2,147,483,647ï½2,147,483,645)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¬æé»æµè¨æ¸¬å¤","fields":[{"arrayCount":0,"description":"Rç¸","fields":[],"identifier":"RPhase","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"},{"arrayCount":0,"description":"Tç¸","fields":[],"identifier":"TPhase","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"int16_t","unitDescription":"0.1A","valueDescription":"0x8001ï½0x7FFD(-3,276.7ï½3,276.5)"}],"identifier":"MeasuredInstantaneousCurrents","initialValue":null,"isArray":false,"primitive":false,"propertyCode":232,"required":["NONE"],"size":4,"type":"measured_instantaneous_currents_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"ç¬æé»å§è¨æ¸¬å¤","fields":[{"arrayCount":0,"description":"R-S(N)é","fields":[],"identifier":"BetweenRAndSN","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"0.1V","valueDescription":"0x0000ï½0xFFFD(0ï½6,553.3)"},{"arrayCount":0,"description":"S(N)-Té","fields":[],"identifier":"BetweenSNAndT","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"0.1V","valueDescription":"0x0000ï½0xFFFD(0ï½6,553.3)"}],"identifier":"MeasuredInstantaneousVoltages","initialValue":null,"isArray":false,"primitive":false,"propertyCode":233,"required":["NONE"],"size":4,"type":"measured_instantaneous_voltages_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"å®æç©ç®é»åéè¨æ¸¬å¤ï¼æ­£æ¹åè¨æ¸¬å¤ï¼","fields":[{"arrayCount":0,"description":"è¨æ¸¬å¹´ææ¥","fields":[{"arrayCount":0,"description":"å¹´","fields":[],"identifier":"Year","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"å¹´","valueDescription":"0x0001ï½0x270F(1ï½9999)"},{"arrayCount":0,"description":"æ","fields":[],"identifier":"Mounth","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x01ï½0x0C(1ï½12)"},{"arrayCount":0,"description":"æ¥","fields":[],"identifier":"Day","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ¥","valueDescription":"0x01ï½0x1F(1ï½31)"}],"identifier":"DateOfMeasurement","initialValue":null,"isArray":false,"primitive":false,"size":4,"type":"year_mounth_day_t","unitDescription":null,"valueDescription":""},{"arrayCount":0,"description":"è¨æ¸¬æå»","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"},{"arrayCount":0,"description":"ç§","fields":[],"identifier":"Second","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"ç§","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"TimeOfMeasurement","initialValue":null,"isArray":false,"primitive":false,"size":3,"type":"hour_minute_second_t","unitDescription":null,"valueDescription":""},{"arrayCount":0,"description":"ç©ç®é»åé","fields":[],"identifier":"CumulativeElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"}],"identifier":"CumulativeAmountsOfElectricEnergyMeasuredAtFixedTimeNormalDirection","initialValue":null,"isArray":false,"primitive":false,"propertyCode":234,"required":["RULE_GET"],"size":11,"type":"cumulative_amounts_of_electric_energy_measured_at_fixed_time_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"å®æç©ç®é»åéè¨æ¸¬å¤ï¼éæ¹åè¨æ¸¬å¤ï¼","fields":[{"arrayCount":0,"description":"è¨æ¸¬å¹´ææ¥","fields":[{"arrayCount":0,"description":"å¹´","fields":[],"identifier":"Year","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"å¹´","valueDescription":"0x0001ï½0x270F(1ï½9999)"},{"arrayCount":0,"description":"æ","fields":[],"identifier":"Mounth","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x01ï½0x0C(1ï½12)"},{"arrayCount":0,"description":"æ¥","fields":[],"identifier":"Day","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ¥","valueDescription":"0x01ï½0x1F(1ï½31)"}],"identifier":"DateOfMeasurement","initialValue":null,"isArray":false,"primitive":false,"size":4,"type":"year_mounth_day_t","unitDescription":null,"valueDescription":""},{"arrayCount":0,"description":"è¨æ¸¬æå»","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"},{"arrayCount":0,"description":"ç§","fields":[],"identifier":"Second","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"ç§","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"TimeOfMeasurement","initialValue":null,"isArray":false,"primitive":false,"size":3,"type":"hour_minute_second_t","unitDescription":null,"valueDescription":""},{"arrayCount":0,"description":"ç©ç®é»åé","fields":[],"identifier":"CumulativeElectricEnergy","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"kWh","valueDescription":"0x00000000ï½0x05F5E0FF(0ï½99,999,999)"}],"identifier":"CumulativeAmountsOfElectricEnergyMeasuredAtFixedTimeReverseDirection","initialValue":null,"isArray":false,"primitive":false,"propertyCode":235,"required":["NONE"],"size":11,"type":"cumulative_amounts_of_electric_energy_measured_at_fixed_time_t","unitDescription":null,"valueDescription":""}]},{"classCode":137,"description":"ã¹ãã¼ãã¬ã¹ã¡ã¼ã¿","name":"SMART_GAS_METER_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ã¬ã¹åºåè¨­å®","fields":[],"identifier":"GasMeterClassification","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x30=é½å¸ã¬ã¹,0x31=LPã¬ã¹,0x32=å¤©ç¶,0x33=ãã®ä»"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ææè
+åºåè¨­å®","fields":[],"identifier":"OwnerClassification","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x30=æå®ãªã,0x31=é½å¸ã¬ã¹,0x32=LPã¬ã¹,0x33=æ°éä¼ç¤¾,0x34=åäºº"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®ã¬ã¹æ¶è²»éè¨æ¸¬å¤","fields":[],"identifier":"MeasuredCumulativeGasConsumption","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["RULE_GET"],"size":4,"type":"uint32_t","unitDescription":"0.001ã¥","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999.999ã¥)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®ã¬ã¹æ¶è²»éè¨æ¸¬å¤åä½","fields":[],"identifier":"UnitForMeasuredCumulativeGasConsumptions","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=1ã¥,0x01=0.1ã¥,0x02=0.01ã¥,0x03=0.001ã¥,0x04=0.0001ã¥,0x05=0.00001ã¥,0x06=0.000001ã¥"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç©ç®ã¬ã¹æ¶è²»éå±¥æ­´æ
+å ±","fields":[{"arrayCount":0,"description":"ç©ç®å±¥æ­´åéæ¥","fields":[],"identifier":"DayForWhichTheHistoricalDataOfMeasuredCumulativeGasConsumption","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"æ¥","valueDescription":"0x0000ï½0x0063(0ï½99)"},{"arrayCount":48,"description":"ç©ç®ã¬ã¹æ¶è²»é","fields":[],"identifier":"CumulativeGasConsumption","initialValue":null,"isArray":true,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"0.001ã¥","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999ã¥)"}],"identifier":"HistoricalDataOfMeasuredCumulativeGasConsumptions","initialValue":null,"isArray":false,"primitive":false,"propertyCode":228,"required":["NONE"],"size":194,"type":"historical_data_of_measured_cumulative_gas_consumptions_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç©ç®ã¬ã¹æ¶è²»éå±¥æ­´åéæ¥è¨­å®","fields":[],"identifier":"DayForWhichTheHistoricalDataOfMeasuredCumulativeGasConsumptionsIsToBeRetrieved","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=å½æ¥,0x01ï½0x63=åæ¥ã®æ¥æ°(0ï½99)"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ¤éãã¼ã¿ç°å¸¸æ¤ç¥ç¶æ
+","fields":[],"identifier":"DetectionOfAbnormalValueInMeteringData","initialValue":null,"isArray":false,"primitive":true,"propertyCode":230,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç°å¸¸æ¤ç¥æ,0x42=ç°å¸¸æ¤ç¥ç¡"},{"access":["RULE_GET"],"arrayCount":10,"description":"ã»ã­ã¥ãªãã£ãã¼ã¿æ
+å ±","fields":[],"identifier":"SecurityDataInformation","initialValue":null,"isArray":true,"primitive":true,"propertyCode":231,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"è©³ç´°ã¯èª¬æ(9)åç
+§"},{"access":["RULE_GET"],"arrayCount":0,"description":"ã»ã³ã¿ã¼å¼é®æ­ç¶æ
+","fields":[],"identifier":"ValveClosureByTheCenter","initialValue":null,"isArray":false,"primitive":true,"propertyCode":232,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ã»ã³ã¿ã¼å¼é®æ­æã,0x42=ã»ã³ã¿ã¼å¼é®æ­ç¡ã"},{"access":["RULE_GET"],"arrayCount":0,"description":"ã»ã³ã¿ã¼å¼é®æ­å¾©å¸°è¨±å¯ç¶æ
+","fields":[],"identifier":"PermissionFromTheCenterToReopenTheValveClosedByTheCenter","initialValue":null,"isArray":false,"primitive":true,"propertyCode":233,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ã»ã³ã¿ã¼å¼é®æ­å¾©å¸°è¨±å¯,0x42=ã»ã³ã¿ã¼å¼é®æ­å¾©å¸°éè¨±å¯"},{"access":["RULE_GET"],"arrayCount":0,"description":"ç·æ¥å¼é®æ­ç¶æ
+","fields":[],"identifier":"EmergencyClosureOfShutoffValve","initialValue":null,"isArray":false,"primitive":true,"propertyCode":234,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ç·æ¥å¼é®æ­æã,0x42=ç·æ¥å¼é®æ­ç¡ã"},{"access":["RULE_GET"],"arrayCount":0,"description":"é®æ­å¼ééç¶æ
+","fields":[],"identifier":"ShutoffValveStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":235,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é®æ­å¼éç¶æ
+,0x42=é®æ­å¼éç¶æ
+"},{"access":["RULE_GET"],"arrayCount":3,"description":"é®æ­çç±å±¥æ­´æ
+å ±","fields":[],"identifier":"HistoricalDataOfShutoffReasons","initialValue":null,"isArray":true,"primitive":true,"propertyCode":236,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0xFF:0xFF:0xFF"},{"access":["RULE_SET","RULE_GET"],"arrayCount":6,"description":"ï¼©ï¼¤çªå·è¨­å®","fields":[],"identifier":"IdNumberSetting","initialValue":"'000000'","isArray":true,"primitive":true,"propertyCode":237,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"'000000'ï½'FFFFFF'"},{"access":["RULE_SET","RULE_GET"],"arrayCount":6,"description":"æ¤å®æºæè¨­å®","fields":[],"identifier":"VerificationExpirationInformation","initialValue":null,"isArray":true,"primitive":true,"propertyCode":238,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"YYYYMM:YYYY(è¥¿æ¦),MM(æ)"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ¥æä»ç©ç®ã¬ã¹æ¶è²»éè¨æ¸¬å¤æ
+å ±","fields":[{"arrayCount":0,"description":"è¨æ¸¬å¹´ææ¥","fields":[{"arrayCount":0,"description":"å¹´","fields":[],"identifier":"Year","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"å¹´","valueDescription":"0x0001ï½0x270F(1ï½9999)"},{"arrayCount":0,"description":"æ","fields":[],"identifier":"Mounth","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x01ï½0x0C(1ï½12)"},{"arrayCount":0,"description":"æ¥","fields":[],"identifier":"Day","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ¥","valueDescription":"0x01ï½0x1F(1ï½31)"}],"identifier":"DateOfMeasurement","initialValue":null,"isArray":false,"primitive":false,"size":4,"type":"year_mounth_day_t","unitDescription":null,"valueDescription":""},{"arrayCount":0,"description":"è¨æ¸¬æå»","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"},{"arrayCount":0,"description":"ç§","fields":[],"identifier":"Second","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"ç§","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"TimeOfMeasurement","initialValue":null,"isArray":false,"primitive":false,"size":3,"type":"hour_minute_second_t","unitDescription":null,"valueDescription":""},{"arrayCount":0,"description":"ç©ç®ã¬ã¹æ¶è²»é","fields":[],"identifier":"CumulativeGasConsumption","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"0.001ã¥","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999ã¥)"}],"identifier":"MeasuredCumulativeGasConsumptionInformationWithDateAndTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":208,"required":["RULE_GET"],"size":11,"type":"measured_cumulative_gas_consumption_information_with_date_and_time_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"ã¬ã¹æ¶è²»éå±¥æ­´æ
+å ±","fields":[{"arrayCount":0,"description":"å±¥æ­´ã¹ã¿ã¼ãå¹´ææ¥","fields":[{"arrayCount":0,"description":"å¹´","fields":[],"identifier":"Year","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"å¹´","valueDescription":"0x0001ï½0x270F(1ï½9999)"},{"arrayCount":0,"description":"æ","fields":[],"identifier":"Mounth","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x01ï½0x0C(1ï½12)"},{"arrayCount":0,"description":"æ¥","fields":[],"identifier":"Day","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ¥","valueDescription":"0x01ï½0x1F(1ï½31)"}],"identifier":"Date","initialValue":null,"isArray":false,"primitive":false,"size":4,"type":"year_mounth_day_t","unitDescription":null,"valueDescription":""},{"arrayCount":0,"description":"å±¥æ­´ã¹ã¿ã¼ãæå»","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"},{"arrayCount":0,"description":"ç§","fields":[],"identifier":"Second","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"ç§","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"Time","initialValue":null,"isArray":false,"primitive":false,"size":3,"type":"hour_minute_second_t","unitDescription":null,"valueDescription":""},{"arrayCount":24,"description":"ã¬ã¹æ¶è²»éå±¥æ­´ãã¼ã¿","fields":[],"identifier":"HistoricalInformationOfGasConsumption","initialValue":null,"isArray":true,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"0.001ã¥","valueDescription":"0x00000000ï½0x0001869F(0ï½99.999ã¥)"},{"arrayCount":0,"description":"å±¥æ­´ã¹ã¿ã¼ãæç©ç®ã¬ã¹æ¶è²»é","fields":[],"identifier":"CumulativeGasConsumptionAtHistoryStart","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":"0.001ã¥","valueDescription":"0x00000000ï½0x3B9AC9FF(0ï½999,999,999ã¥)"},{"arrayCount":0,"description":"ç©ç®æééé","fields":[],"identifier":"CumulativeTimeInterval","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"å","valueDescription":"0x0001ï½0xFFFF(1ï½65535)"}],"identifier":"HistoricalInformationOfCumulativeGasConsumption","initialValue":null,"isArray":false,"primitive":false,"propertyCode":209,"required":["NONE"],"size":109,"type":"historical_information_of_cumulative_gas_consumption_t","unitDescription":null,"valueDescription":""}]},{"classCode":144,"description":"ä¸è¬ç
+§æ","name":"GENERAL_LIGHTING_CLASS_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç
+§åº¦ã¬ãã«è¨­å®","fields":[],"identifier":"IlluminanceLevel","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å
+è²è¨­å®","fields":[],"identifier":"LightColorSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é»çè²,0x42=ç½è²,0x43=æ¼ç½è²,0x44=æ¼å
+è²,0x40=ãã®ä»"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç
+§åº¦ã¬ãã«æ®µæ°è¨­å®","fields":[],"identifier":"IlluminanceLevelStepSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":178,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½è¨­å®å¯è½ç
+§åº¦ã¬ãã«æå¤§å¤(æï½æ)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å
+è²ã¬ãã«æ®µæ°è¨­å®","fields":[],"identifier":"LightColorStepSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":179,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½è¨­å®å¯è½å
+è²ã¬ãã«æå¤§å¤(é»çè²ï½ç½è²)"},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨­å®å¯è½ã¬ãã«æå¤§å¤","fields":[{"arrayCount":0,"description":"ç
+§åº¦","fields":[],"identifier":"Illuminance","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=æ©è½ãæ­è¼ãã¦ããªã"},{"arrayCount":0,"description":"å
+è²","fields":[],"identifier":"LightColor","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=æ©è½ãæ­è¼ãã¦ããªã"}],"identifier":"MaximumSpecifiableValues","initialValue":null,"isArray":false,"primitive":false,"propertyCode":180,"required":["NONE"],"size":2,"type":"maximum_specifiable_values_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"å¸¸å¤ç¯è¨­å®å¯è½ã¬ãã«æå¤§å¤","fields":[{"arrayCount":0,"description":"ç
+§åº¦","fields":[],"identifier":"Illuminance","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=æ©è½ãæ­è¼ãã¦ããªã"},{"arrayCount":0,"description":"å
+è²","fields":[],"identifier":"LightColor","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=æ©è½ãæ­è¼ãã¦ããªã"}],"identifier":"MaximumValueOfSettableLevelForNightLighting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":181,"required":["NONE"],"size":2,"type":"maximum_specifiable_values_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ç¹ç¯ã¢ã¼ãè¨­å®","fields":[],"identifier":"LightingModeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":182,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=èªå,0x42=éå¸¸ç¯,0x43=å¸¸å¤ç¯,0x45=ã«ã©ã¼ç¯"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"éå¸¸ç¯ã¢ã¼ãæç
+§åº¦ã¬ãã«è¨­å®","fields":[],"identifier":"IlluminanceLevelSettingForMainLighting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":183,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"éå¸¸ç¯ã¢ã¼ãæç
+§åº¦ã¬ãã«æ®µæ°è¨­å®","fields":[],"identifier":"IlluminanceLevelStepSettingForMainLighting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":184,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½è¨­å®å¯è½ç
+§åº¦ã¬ãã«æå¤§å¤(æï½æ)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å¸¸å¤ç¯ã¢ã¼ãæç
+§åº¦ã¬ãã«è¨­å®","fields":[],"identifier":"IlluminanceLevelSettingForNightLighting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":185,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ï¼
+","valueDescription":"0x00ï½0x64(0ï½100%)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å¸¸å¤ç¯ã¢ã¼ãæç
+§åº¦ã¬ãã«æ®µæ°è¨­å®","fields":[],"identifier":"IlluminanceLevelStepSettingForNightLighting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":186,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½è¨­å®å¯è½ç
+§åº¦ã¬ãã«æå¤§å¤(æï½æ)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"éå¸¸ç¯ã¢ã¼ãæå
+è²è¨­å®","fields":[],"identifier":"LightColorSettingForMainLighting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":187,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é»çè²,0x42=ç½è²,0x43=æ¼ç½è²,0x44=æ¼å
+è²,0x40=ãã®ä»"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"éå¸¸ç¯ã¢ã¼ãæå
+è²ã¬ãã«æ®µæ°è¨­å®","fields":[],"identifier":"LightColorLevelStepSettingForMainLighting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":188,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½è¨­å®å¯è½å
+è²ã¬ãã«æå¤§å¤(é»çè²ï½ç½è²)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å¸¸å¤ç¯ã¢ã¼ãæå
+è²è¨­å®","fields":[],"identifier":"LightColorSettingForNightLighting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":189,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é»çè²,0x42=ç½è²,0x43=æ¼ç½è²,0x44=æ¼å
+è²,0x40=ãã®ä»"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å¸¸å¤ç¯ã¢ã¼ãæå
+è²ã¬ãã«æ®µæ°è¨­å®","fields":[],"identifier":"LightColorLevelStepSettingForNightLighting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":190,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½è¨­å®å¯è½å
+è²ã¬ãã«æå¤§å¤(é»çè²ï½ç½è²)"},{"access":["RULE_GET"],"arrayCount":0,"description":"èªåã¢ã¼ãæç¹ç¯ã¢ã¼ãç¶æ
+","fields":[],"identifier":"LightingModeStatusInAutoMode","initialValue":null,"isArray":false,"primitive":true,"propertyCode":191,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x42=éå¸¸ç¯,0x43=å¸¸å¤ç¯,0x44=æ¶ç¯,0x45=ã«ã©ã¼ç¯"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ã«ã©ã¼ç¯ã¢ã¼ãæï¼²ï¼§ï¼¢è¨­å®","fields":[{"arrayCount":0,"description":"ï¼²","fields":[],"identifier":"ï¼²","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00ï½0xFF(æä½è¼åº¦ï½æé«è¼åº¦)"},{"arrayCount":0,"description":"ï¼§","fields":[],"identifier":"ï¼§","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00ï½0xFF(æä½è¼åº¦ï½æé«è¼åº¦)"},{"arrayCount":0,"description":"ï¼¢","fields":[],"identifier":"ï¼¢","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00ï½0xFF(æä½è¼åº¦ï½æé«è¼åº¦)"}],"identifier":"RGBSettingForColorLighting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":192,"required":["NONE"],"size":3,"type":"rgbsetting_for_color_lighting_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OnTimerReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":144,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OnTimerSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":145,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OffTimerReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":148,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼¦ï¼¦ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OffTimerSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":149,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""}]},{"classCode":153,"description":"éå¸¸ç
+§æ","name":"EMERGENCY_LIGHTING_EOBJ","propertyList":[]},{"classCode":157,"description":"è¨­åç
+§æ","name":"EQUIPMENT_LIGHT_EOBJ","propertyList":[]},{"classCode":160,"description":"ãã¶ã¼","name":"BUZZER_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é³çºçè¨­å®","fields":[],"identifier":"SoundGenerationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é³çºçæ,0x42=é³çºçç¡"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãã¶ã¼é³ç¨®å¥è¨­å®","fields":[],"identifier":"BuzzerSoundType","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x38"}]}]},{"classGroupCode":3,"description":"èª¿çã»å®¶äºé¢é£æ©å¨","define":"X1_HOUSEWORK","classList":[{"classCode":176,"description":"ã³ã¼ãã¼ã¡ã¼ã«","name":"COFFEE_MACHINE_EOBJ","propertyList":[]},{"classCode":177,"description":"ã³ã¼ãã¼ãã«","name":"COFFEE_MILL_EOBJ","propertyList":[]},{"classCode":178,"description":"é»æ°ããã","name":"ELECTRIC_HOT_WATER_POT_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"èééç¶æ
+","fields":[],"identifier":"CoverOpenCloseStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=èé,0x42=èé"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"æ¹¯åãè­¦åç¶æ
+","fields":[],"identifier":"NoWaterWarning","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ¹¯åãæã,0x40=æ¹¯åããªã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ²¸é¨°è¨­å®","fields":[],"identifier":"BoilUpSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":178,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ²¸é¨°éå§,0x42=æ²¸é¨°åæ­¢\/ä¿æ¸©"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ²¸é¨°ï¼ä¿æ¸©ã¢ã¼ãè¨­å®","fields":[],"identifier":"BoilUpWarmerModeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ã¯ã¨ã³é
+¸æ´æµ,0x42=éå¸¸ä¿æ¸©,0x43=çã¨ãä¿æ¸©"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ä¿æ¸©æ¸©åº¦è¨­å®å¤","fields":[],"identifier":"SetValueOfWarmerTemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x64(0ï½100)"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"åºæ¹¯ç¶æ
+","fields":[],"identifier":"HotWaterDischargeStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=åºæ¹¯æ,0x42=åºæ¹¯ç¡"},{"access":["RULE_GET"],"arrayCount":0,"description":"ã­ãã¯ç¶æ
+","fields":[],"identifier":"LockStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ã­ãã¯æ,0x42=ã­ãã¯ç¡"}]},{"classCode":179,"description":"é»æ°ããã","name":"ELECTRIC_STOVE_EOBJ","propertyList":[]},{"classCode":180,"description":"ãã¼ã¹ã¿","name":"TOASTER_EOBJ","propertyList":[]},{"classCode":181,"description":"ã¸ã¥ã¼ãµã»ãã­ãµ","name":"JUICER_FOOD_MIXER_EOBJ","propertyList":[]},{"classCode":182,"description":"ãã¼ããã­ã»ããµ","name":"FOOD_PROCESSOR_EOBJ","propertyList":[]},{"classCode":183,"description":"å·åå·èµåº«","name":"REFRIGERATOR_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"ãã¢ééç¶æ
+","fields":[],"identifier":"DoorOpenCloseStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ãã¢é,0x42=ãã¢é"},{"access":["RULE_GET"],"arrayCount":0,"description":"ãã¢éæ¾è­¦åç¶æ
+","fields":[],"identifier":"DoorOpenWarning","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ãã¢éæ¾è­¦åæ,0x42=ãã¢éæ¾è­¦åç¡"},{"access":["RULE_GET"],"arrayCount":0,"description":"å·èµå®¤ãã¢ééç¶æ
+","fields":[],"identifier":"RefrigeratorCompartmentDoorStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":178,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ãã¢é,0x42=ãã¢é"},{"access":["RULE_GET"],"arrayCount":0,"description":"å·åå®¤ãã¢ééç¶æ
+","fields":[],"identifier":"FreezerCompartmentDoorStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":179,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ãã¢é,0x42=ãã¢é"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ°·æ¸©å®¤ãã¢ééç¶æ
+","fields":[],"identifier":"IceCompartmentDoorStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":180,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ãã¢é,0x42=ãã¢é"},{"access":["RULE_GET"],"arrayCount":0,"description":"éèå®¤ãã¢ééç¶æ
+","fields":[],"identifier":"VegetableCompartmentDoorStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":181,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ãã¢é,0x42=ãã¢é"},{"access":["RULE_GET"],"arrayCount":0,"description":"åæå®¤ãã¢ééç¶æ
+","fields":[],"identifier":"MultiRefrigeratingModeCompartmentDoor","initialValue":null,"isArray":false,"primitive":true,"propertyCode":182,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ãã¢é,0x42=ãã¢é"},{"access":["RULE_GET"],"arrayCount":0,"description":"è¨­å®å¯è½æ¸©åº¦ã¬ãã«æå¤§å¤","fields":[{"arrayCount":0,"description":"å·èµå®¤","fields":[],"identifier":"RefrigeratorCompartment","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=å®¤ãæ­è¼ãã¦ããªã"},{"arrayCount":0,"description":"å·åå®¤","fields":[],"identifier":"FreezerCompartment","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=å®¤ãæ­è¼ãã¦ããªã"},{"arrayCount":0,"description":"æ°·æ¸©å®¤","fields":[],"identifier":"SubzeroFreshCompartment","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=å®¤ãæ­è¼ãã¦ããªã"},{"arrayCount":0,"description":"éèå®¤","fields":[],"identifier":"VegetableCompartment","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=å®¤ãæ­è¼ãã¦ããªã"},{"arrayCount":0,"description":"åæå®¤","fields":[],"identifier":"MultiRefrigeratingModeCompartment","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=å®¤ãæ­è¼ãã¦ããªã"},{"arrayCount":0,"description":"for future reserved 1","fields":[],"identifier":"Reserved6","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=å®¤ãæ­è¼ãã¦ããªã"},{"arrayCount":0,"description":"for future reserved 2","fields":[],"identifier":"Reserved7","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=å®¤ãæ­è¼ãã¦ããªã"},{"arrayCount":0,"description":"for future reserved 3","fields":[],"identifier":"Reserved8","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½0xFF(1ï½255æ®µé),0x00=å®¤ãæ­è¼ãã¦ããªã"}],"identifier":"MaximumAllowableTemperatureSettingLevel","initialValue":null,"isArray":false,"primitive":false,"propertyCode":224,"required":["NONE"],"size":8,"type":"maximum_allowable_temperature_setting_level_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å·èµå®¤æ¸©åº¦è¨­å®å¤","fields":[],"identifier":"RefrigeratorCompartmentTemperatureSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"â","valueDescription":"0x81ï½0x7E(-127ï½126â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å·åå®¤æ¸©åº¦è¨­å®å¤","fields":[],"identifier":"FreezerCompartmentTemperatureSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"â","valueDescription":"0x81ï½0x7E(-127ï½126â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ°·æ¸©å®¤æ¸©åº¦è¨­å®å¤","fields":[],"identifier":"IceTemperatureSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":228,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"â","valueDescription":"0x81ï½0x7E(-127ï½126â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"éèå®¤æ¸©åº¦è¨­å®å¤","fields":[],"identifier":"VegetableCompartmentTemperatureSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"â","valueDescription":"0x81ï½0x7E(-127ï½126â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"åæå®¤æ¸©åº¦è¨­å®å¤","fields":[],"identifier":"MultiRefrigeratingModeCompartmentTemperatureSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":230,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"â","valueDescription":"0x81ï½0x7E(-127ï½126â)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å·èµå®¤æ¸©åº¦ã¬ãã«è¨­å®","fields":[],"identifier":"RefrigeratorCompartmentTemperatureLevelSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":233,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½è¨­å®å¯è½æ¸©åº¦ã¬ãã«æå¤§å¤(å¼±ï½å¼·)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å·åå®¤æ¸©åº¦ã¬ãã«è¨­å®","fields":[],"identifier":"FreezerCompartmentTemperatureLevelSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":234,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½è¨­å®å¯è½æ¸©åº¦ã¬ãã«æå¤§å¤(å¼±ï½å¼·)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ°·æ¸©å®¤æ¸©åº¦ã¬ãã«è¨­å®","fields":[],"identifier":"IceCompartmentTemperatureLevelSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":235,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½è¨­å®å¯è½æ¸©åº¦ã¬ãã«æå¤§å¤(å¼±ï½å¼·)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"éèå®¤æ¸©åº¦ã¬ãã«è¨­å®","fields":[],"identifier":"VegetableCompartmentTemperatureLevelSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":236,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½è¨­å®å¯è½æ¸©åº¦ã¬ãã«æå¤§å¤(å¼±ï½å¼·)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"åæå®¤æ¸©åº¦ã¬ãã«è¨­å®","fields":[],"identifier":"MultiRefrigeratingModeCompartmentTemperatureLevelSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":237,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½è¨­å®å¯è½æ¸©åº¦ã¬ãã«æå¤§å¤(å¼±ï½å¼·)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å·èµå®¤æ¸©åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredRefrigeratorCompartmentTemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":209,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"â","valueDescription":"0x81ï½0x7E(-127ï½126â)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å·åå®¤æ¸©åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredFreezerCompartmentTemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":210,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"â","valueDescription":"0x81ï½0x7E(-127ï½126â)"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ°·æ¸©å®¤æ¸©åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredSubzeroFreshCompartmentTemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":211,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"â","valueDescription":"0x81ï½0x7E(-127ï½126â)"},{"access":["RULE_GET"],"arrayCount":0,"description":"éèå®¤æ¸©åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredVegetableCompartmentTemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":212,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"â","valueDescription":"0x81ï½0x7E(-127ï½126â)"},{"access":["RULE_GET"],"arrayCount":0,"description":"åæå®¤æ¸©åº¦è¨æ¸¬å¤","fields":[],"identifier":"MeasuredMultiRefrigeratingModeCompartmentTemperature","initialValue":null,"isArray":false,"primitive":true,"propertyCode":213,"required":["NONE"],"size":1,"type":"int8_t","unitDescription":"â","valueDescription":"0x81ï½0x7E(-127ï½126â)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å§ç¸®æ©åè»¢æ°ã¬ãã«","fields":[{"arrayCount":0,"description":"æå¤§åè»¢æ°ã¬ãã«","fields":[],"identifier":"MaximumRotationSpeedLevel","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01ï½0xFF(1ï½255)"},{"arrayCount":0,"description":"åè»¢æ°ã¬ãã«","fields":[],"identifier":"RotationSpeedLevel","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00=åæ­¢,0x01ï½0xFF(å¼±ï½å¼·)"}],"identifier":"CompressorRotationSpeed","initialValue":null,"isArray":false,"primitive":false,"propertyCode":216,"required":["NONE"],"size":2,"type":"compressor_rotation_speed_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"æ¶è²»é»æµè¨æ¸¬å¤","fields":[],"identifier":"MeasuredElectricCurrentConsumption","initialValue":null,"isArray":false,"primitive":true,"propertyCode":218,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.1A","valueDescription":"0x81ï½0x7E(-127ï½126â)"},{"access":["RULE_GET"],"arrayCount":0,"description":"å®æ ¼æ¶è²»é»åå¤","fields":[],"identifier":"RatedPowerConsumption","initialValue":null,"isArray":false,"primitive":true,"propertyCode":220,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¥éå·ååä½è¨­å®","fields":[],"identifier":"QuickFreezeFunctionSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":160,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=éå¸¸å·å,0x42=æ¥éå·å,0x43=æ¥éå·åå¾
+æ©"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ¥éå·èµåä½è¨­å®","fields":[],"identifier":"QuickRefrigerationFunctionSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":161,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=éå¸¸å·èµ,0x42=æ¥éå·èµ,0x43=æ¥éå·èµå¾
+æ©"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"è£½æ°·è¨±å¯è¨­å®","fields":[],"identifier":"IcemakerSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":164,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=è£½æ°·è¨±å¯,0x42=è£½æ°·ç¦æ­¢,0x43=è£½æ°·ä¸å®æéç¦æ­¢"},{"access":["RULE_GET"],"arrayCount":0,"description":"è£½æ°·åä½ç¶æ
+","fields":[],"identifier":"IcemakerOperationStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":165,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=éè»¢ä¸­,0x42=åæ­¢ä¸­"},{"access":["RULE_GET"],"arrayCount":0,"description":"è£½æ°·ç¨çµ¦æ°´ã¿ã³ã¯ç¶æ
+","fields":[],"identifier":"IcemakerTankStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":166,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ã¿ã³ã¯æ°´ãã,0x42=ã¿ã³ã¯ãªãoræ°´ãªã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å·èµå®¤å æ¹¿åä½è¨­å®","fields":[],"identifier":"RefrigeratorCompartmentHumidificationFunctionSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":168,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å æ¹¿ON,0x42=å æ¹¿OFF"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"éèå®¤å æ¹¿åä½è¨­å®","fields":[],"identifier":"VegetableCompartmentHumidificationFunctionSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":169,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å æ¹¿ON,0x42=å æ¹¿OFF"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"è±è­åä½è¨­å®","fields":[],"identifier":"DeodorizationFunctionSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":173,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=è±è­ON,0x42=è±è­OFF"}]},{"classCode":184,"description":"ãªã¼ãã³ã¬ã³ã¸","name":"COMBINATION_MICROWAVE_OVEN_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"ãã¢ééç¶æ
+","fields":[],"identifier":"DoorOpenCloseStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ãã¢é,0x42=ãã¢é"},{"access":["RULE_GET"],"arrayCount":0,"description":"å ç±ç¶æ
+","fields":[],"identifier":"HeatingStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=åæç¶æ
+,0x41=éè»¢ä¸­,0x42=ä¸æåæ­¢ä¸­,0x43=å®äºå ±ç¥ä¸­,0x44=è¨­å®ä¸­,0x45=äºç±ä¸­,0x46=äºç±å®äºä¿æ¸©ä¸­,0x47=å ç±éä¸­å ±ç¥ä¸æåæ­¢ä¸­"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å ç±è¨­å®","fields":[],"identifier":"HeatingSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":178,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å ç±éå§ã»åé,0x42=å ç±ä¸æåæ­¢,0x43=å ç±åæ­¢"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å ç±ã¢ã¼ãè¨­å®","fields":[],"identifier":"HeatingModeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=é»å­ã¬ã³ã¸å ç±,0x42=è§£å,0x43=ãªã¼ãã³,0x44=ã°ãªã«,0x45=ãã¼ã¹ã,0x46=çºé
+µ,0x47=ç
+®è¾¼ã¿,0x48=ã¹ãã¼ã å ç±,0x51=é»å­ã¬ã³ã¸2æ®µå ç±,0xFF=æªè¨­å®"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"èªåå ç±è¨­å®","fields":[],"identifier":"AutomaticHeatingSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=èªå,0x42=ããã¥ã¢ã«,0xFF=æªè¨­å®"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"èªåå ç±ã¬ãã«è¨­å®","fields":[],"identifier":"AutomaticHeatingLevelSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x31ï½0x35(å¼±ï½å¼·),0xFF=æªè¨­å®"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"èªåã¡ãã¥ã¼ã³ã¼ã¹è¨­å®","fields":[],"identifier":"AutomaticHeatingMenuSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":208,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00ï½0xFE=èªåã¡ãã¥ã¼ã³ã¼ã¹ã³ã¼ããã­ããã£ã®è©³ç´°èª¬æã«ãå®ç¾©ãããã³ã¼ããç¤ºãã,0xFF=æªè¨­å®"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãªã¼ãã³ã¢ã¼ãè¨­å®","fields":[],"identifier":"OvenModeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":209,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=èªåé¸æã¢ã¼ã,0x41=å¯¾æµãªã¼ãã³ã¢ã¼ã,0x42=ç±é¢¨ãªã¼ãã³ã¢ã¼ã,0x43=è¤åãªã¼ãã³ã¢ã¼ã,0xFF=æªè¨­å®"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãªã¼ãã³äºç±è¨­å®","fields":[],"identifier":"OvenPreheatingSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":213,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç±ãã,0x42=äºç±ãªã,0xFF=æªè¨­å®"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"çºé
+µã¢ã¼ãè¨­å®","fields":[],"identifier":"FermentingModeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":214,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=èªåé¸æã¢ã¼ã,0x41=å¯¾æµçºé
+µã¢ã¼ã,0x42=ç±é¢¨çºé
+µã¢ã¼ã,0x43=è¤åçºé
+µã¢ã¼ã,0x51=é»å­ã¬ã³ã¸çºé
+µã¢ã¼ã,0xFF=æªè¨­å®"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"åº«å
+æ¸©åº¦è¨­å®å¤","fields":[],"identifier":"ChamberTemperatureSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["NONE"],"size":2,"type":"int16_t","unitDescription":"â","valueDescription":"0xF554ï½0x7FFE(-273.2ï½3276.6â),0x8001=èªåè¨­å®,0x8002=æªè¨­å®"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ä»ä¸ããæ¸©åº¦è¨­å®å¤","fields":[],"identifier":"FoodTemperatureSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":228,"required":["NONE"],"size":2,"type":"int16_t","unitDescription":"â","valueDescription":"0xF554ï½0x7FFE(-273.2ï½3276.6â),0x8002=æªè¨­å®"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å ç±æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"},{"arrayCount":0,"description":"ç§","fields":[],"identifier":"Second","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"ç§","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"HeatingTimeSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":229,"required":["NONE"],"size":3,"type":"hour_minute_second_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"å ç±æ®æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"},{"arrayCount":0,"description":"ç§","fields":[],"identifier":"Second","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"ç§","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"RemainingHeatingTimeSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":230,"required":["NONE"],"size":3,"type":"hour_minute_second_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é»å­ã¬ã³ã¸å ç±åºåè¨­å®å¤","fields":[],"identifier":"MicrowaveHeatingPowerSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":231,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":4,"description":"éä¸­å ±ç¥ãã¿ã¼ã³è¨­å®","fields":[],"identifier":"PromptMessageSetting","initialValue":null,"isArray":true,"primitive":false,"propertyCode":232,"required":["NONE"],"size":0,"type":"prompt_message_setting_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ä»å±åè¨­å®","fields":[],"identifier":"AccessoriesToCombinationMicrowaveOvenSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":233,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":null,"valueDescription":"ä½¿ç¨ããä»å±åã®çµã¿åããã2ãã¤ãã®ããããããã§ç¤ºããä½¿ç¨ããä»å±åã«å¯¾å¿ããããããã¿ã¼ã³ã1ã¨ããããã­ããã£ã®è©³ç´°èª¬æã«åä»å±åã«å¯¾å¿ãããããããããã¿ã¼ã³ãç¤ºãã"},{"access":["RULE_SET"],"arrayCount":20,"description":"è¡¨ç¤ºæå­åè¨­å®","fields":[],"identifier":"DisplayCharacterStringSetting","initialValue":null,"isArray":true,"primitive":true,"propertyCode":234,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":null,"valueDescription":"ShiftJISã³ã¼ãÃ20"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é»å­ã¬ã³ã¸ï¼æ®µå ç±æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"1æ®µç®ã®å ç±æé","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"},{"arrayCount":0,"description":"ç§","fields":[],"identifier":"Second","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"ç§","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"DurationOfFirstMicrowaveHeatingCycle","initialValue":null,"isArray":false,"primitive":false,"size":3,"type":"hour_minute_second_t","unitDescription":null,"valueDescription":""},{"arrayCount":0,"description":"2æ®µç®ã®å ç±æé","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"},{"arrayCount":0,"description":"ç§","fields":[],"identifier":"Second","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"ç§","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"DurationOfSecondMicrowaveHeatingCycle","initialValue":null,"isArray":false,"primitive":false,"size":3,"type":"hour_minute_second_t","unitDescription":null,"valueDescription":""}],"identifier":"TwoStageMicrowaveHeatingSettingDuration","initialValue":null,"isArray":false,"primitive":false,"propertyCode":235,"required":["NONE"],"size":6,"type":"two_stage_microwave_heating_setting_duration_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é»å­ã¬ã³ã¸ï¼æ®µå ç±åºåè¨­å®å¤","fields":[{"arrayCount":0,"description":"1æ®µç®ã®å ç±åºå","fields":[],"identifier":"HeatingPowerForFirstMicrowaveHeatingCycle","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"},{"arrayCount":0,"description":"2æ®µç®ã®å ç±åºå","fields":[],"identifier":"HeatingPowerForSecondMicrowaveHeatingCycle","initialValue":null,"isArray":false,"primitive":true,"size":2,"type":"uint16_t","unitDescription":"W","valueDescription":"0x0000ï½0xFFFD(0ï½65533W)"}],"identifier":"TwoStageMicrowaveHeatingSettingHeatingPower","initialValue":null,"isArray":false,"primitive":false,"propertyCode":236,"required":["NONE"],"size":4,"type":"two_stage_microwave_heating_setting_heating_power_t","unitDescription":null,"valueDescription":""}]},{"classCode":185,"description":"ã¯ãã­ã³ã°ãã¼ã¿","name":"COOKING_HEATER_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":4,"description":"å ç±ç¶æ
+","fields":[],"identifier":"HeatingStatus","initialValue":null,"isArray":true,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=å¾
+æ©ä¸­,0x41=éè»¢ä¸­,0x42=ä¸æåæ­¢ä¸­,0x50=å ç±ç¦æ­¢ç¶æ
+,0xFF=ä¸æ"},{"access":["RULE_SET","RULE_GET"],"arrayCount":4,"description":"å ç±è¨­å®","fields":[],"identifier":"HeatingSetting","initialValue":null,"isArray":true,"primitive":true,"propertyCode":178,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=å ç±åæ­¢,0x41=å ç±éå§ã»åé,0x42=å ç±ä¸æåæ­¢,0xFF=è¨­å®ãªã"},{"access":["RULE_SET"],"arrayCount":0,"description":"ä¸æ¬åæ­¢è¨­å®","fields":[],"identifier":"AllStopSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":179,"required":["RULE_SET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=ä¸æ¬å ç±åæ­¢"},{"access":["RULE_SET","RULE_GET"],"arrayCount":4,"description":"å ç±åºåè¨­å®","fields":[],"identifier":"HeatingPowerSetting","initialValue":null,"isArray":true,"primitive":true,"propertyCode":231,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"W|æ®µé|ï¼","valueDescription":"0x0000ï½0x2710=åºåè¨­å®å½¢å¼(0ï½10000W),0x3000ï½0x3010=ã¬ãã«è¨­å®å½¢å¼ï¼17æ®µéï¼,0x4002=ã¨ãç«,0x4004=å¼±ç«,0x4006=ä¸­ç«,0x4008=å¼·ç«,0x400A=ãã¤ãã¯ã¼,0xFFFF=æªè¨­å®"},{"access":["RULE_SET","RULE_GET"],"arrayCount":3,"description":"å ç±æ¸©åº¦è¨­å®å¤","fields":[],"identifier":"HeatingTemperatureSetting","initialValue":null,"isArray":true,"primitive":true,"propertyCode":227,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x32ï½0xFA=è¨­å®æ¸©åº¦(50ï½250â),0xFF=è¨­å®ãªã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":3,"description":"ã³ã³ã­å ç±ã¢ã¼ãè¨­å®","fields":[],"identifier":"HeatingModesOfStovesSetting","initialValue":null,"isArray":true,"primitive":true,"propertyCode":224,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=å ç±åºåå¶å¾¡ã¢ã¼ã,0x42=å¤©ã·ãï¼æãç©ï¼,0x43=æ¹¯æ²¸ã,0x44=çé£¯,0x45=çãç©,0xFF=è¨­å®ãªã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":3,"description":"åã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[],"identifier":"RelativeTimeSettingsOfOffTimers","initialValue":null,"isArray":true,"primitive":false,"propertyCode":150,"required":["NONE"],"size":0,"type":"hour_minute_second_t","unitDescription":null,"valueDescription":"0xFFFFFF=è¨­å®ãªã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãã£ã¤ã«ãã­ãã¯è¨­å®","fields":[],"identifier":"ChildLockSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":161,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=ãã£ã¤ã«ãã­ãã¯OFF,0x41=ãã£ã¤ã«ãã­ãã¯ON"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ã©ã¸ã¨ã³ããã¼ã¿ã­ãã¯è¨­å®","fields":[],"identifier":"RadiantHeaterLockSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":162,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=ã©ã¸ã¨ã³ããã¼ã¿ã­ãã¯OFF,0x41=ã©ã¸ã¨ã³ããã¼ã¿ã­ãã¯ON"}]},{"classCode":186,"description":"ãªã¼ãã³","name":"OVEN_EOBJ","propertyList":[]},{"classCode":187,"description":"çé£¯å¨","name":"RICE_COOKER_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"èééç¶æ
+","fields":[],"identifier":"CoverOpenCloseStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=èé,0x42=èé"},{"access":["RULE_GET"],"arrayCount":0,"description":"çé£¯ç¶æ
+","fields":[],"identifier":"RiceCookingStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=åæ­¢,0x42=äºç±,0x43=çé£¯,0x44=è¸ãã,0x45=çé£¯å®äº"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"çé£¯å¶å¾¡è¨­å®","fields":[],"identifier":"RiceCookingControlSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":178,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=çé£¯éå§ã»çé£¯åé,0x42=çé£¯ä¸æåæ­¢"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ä¿æ¸©è¨­å®","fields":[],"identifier":"WarmerSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ä¿æ¸©æ,0x42=ä¿æ¸©ç¡"},{"access":["RULE_GET"],"arrayCount":0,"description":"å
+ãªã¹åãå¤ãç¶æ
+","fields":[],"identifier":"InnerPotRemovalStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":229,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=åãå¤ãæ,0x42=åãå¤ãç¡"},{"access":["RULE_GET"],"arrayCount":0,"description":"èåãå¤ãç¶æ
+","fields":[],"identifier":"CoverRemovalStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":230,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=åãå¤ãæ,0x42=åãå¤ãç¡"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"çé£¯äºç´è¨­å®","fields":[],"identifier":"RiceCookingReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":144,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç´æ,0x42=äºç´ç¡"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"çé£¯äºç´è¨­å®æå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"SetValueOfRiceCookingReservationSettingTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":145,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"çé£¯äºç´è¨­å®ç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"SetValueOfRiceCookingReservationSettingRelativeTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":146,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""}]},{"classCode":188,"description":"é»å­ã¸ã£ã¼","name":"ELECTRONIC_JAR_EOBJ","propertyList":[]},{"classCode":189,"description":"é£å¨æ´ãæ©","name":"DISH_WASHER_EOBJ","propertyList":[]},{"classCode":190,"description":"é£å¨ä¹¾ç¥æ©","name":"DISH_DRYER_EOBJ","propertyList":[]},{"classCode":191,"description":"é»æ°ãã¡ã¤ãæ©","name":"ELECTRIC_RICE_CARD_COOKER_EOBJ","propertyList":[]},{"classCode":192,"description":"ä¿æ¸©æ©","name":"KEEP_WARM_MACHINE_EOBJ","propertyList":[]},{"classCode":193,"description":"ç²¾ç±³æ©","name":"RICE_MILL_EOBJ","propertyList":[]},{"classCode":194,"description":"èªåè£½ãã³æ©","name":"AUTOMATIC_BREAD_COOKER_EOBJ","propertyList":[]},{"classCode":195,"description":"ã¹ã­ã¼ã¯ãã«ã¼","name":"SLOW_COOKER_EOBJ","propertyList":[]},{"classCode":196,"description":"é»æ°æ¼¬ç©æ©","name":"ELECTRIC_PICKLES_COOKER_EOBJ","propertyList":[]},{"classCode":197,"description":"æ´æ¿¯æ©","name":"WASHING_MACHINE_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"æã»èééç¶æ
+","fields":[],"identifier":"DoorCoverOpenCloseStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æã»èé,0x42=æã»èé"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ´æ¿¯è¨­å®","fields":[],"identifier":"WashingMachineSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":178,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ´æ¿¯éå§ã»åé,0x42=æ´æ¿¯ä¸æåæ­¢,0x43=æ´æ¿¯åæ­¢"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ´æ¿¯é·ç§»ç¶æ
+","fields":[],"identifier":"CurrentStageOfWashingCycle","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ´ã,0x42=ããã,0x43=è±æ°´,0x44=ä¸æåæ­¢,0x45=æ´æ¿¯å®äºã»åæ­¢"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ´æ¿¯æ®ãæé","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"},{"arrayCount":0,"description":"ç§","fields":[],"identifier":"Second","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"ç§","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"TimeRemainingToCompleteWashingCycle","initialValue":null,"isArray":false,"primitive":false,"propertyCode":230,"required":["NONE"],"size":3,"type":"hour_minute_second_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OnTimerReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":144,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OnTimerSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":145,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"RelativeTimeBasedOnTimerSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":146,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""}]},{"classCode":198,"description":"è¡£é¡ä¹¾ç¥æ©","name":"CLOTHES_DRYER_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"æã»èééç¶æ
+","fields":[],"identifier":"DoorCoverOpenCloseStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æã»èé,0x42=æã»èé"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ä¹¾ç¥è¨­å®","fields":[],"identifier":"DryingSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":178,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ä¹¾ç¥éå§ã»åé,0x42=ä¹¾ç¥ä¸æåæ­¢,0x43=ä¹¾ç¥åæ­¢"},{"access":["RULE_GET"],"arrayCount":0,"description":"ä¹¾ç¥é·ç§»ç¶æ
+","fields":[],"identifier":"DryingStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ä¹¾ç¥,0x42=ä¸æåæ­¢,0x43=ä¹¾ç¥å®äºã»åæ­¢"},{"access":["RULE_GET"],"arrayCount":0,"description":"ä¹¾ç¥æ®ãæé","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"},{"arrayCount":0,"description":"ç§","fields":[],"identifier":"Second","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"ç§","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"RemainingDryingTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":230,"required":["NONE"],"size":3,"type":"hour_minute_second_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OnTimerReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":144,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OnTimerSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":145,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"RelativeTimeBasedOnTimerSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":146,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""}]},{"classCode":199,"description":"é»æ°ã¢ã¤ã­ã³","name":"ELECTRIC_IRON_EOBJ","propertyList":[]},{"classCode":200,"description":"ãºãã³ãã¬ããµ","name":"TROUSER_PRESS_EOBJ","propertyList":[]},{"classCode":201,"description":"ãµã¨ãä¹¾ç¥æ©","name":"FUTON_DRYER_EOBJ","propertyList":[]},{"classCode":202,"description":"å°ç©ã»ãã¤ä¹¾ç¥æ©","name":"SMALL_ARTICLE_SHOES_DRYER_EOBJ","propertyList":[]},{"classCode":203,"description":"é»æ°æé¤æ©ï¼ã»ã³ãã©ã«ã¯ãªã¼ãå«ãï¼","name":"ELECTRIC_VACUUM_CLEANER_EOBJ","propertyList":[]},{"classCode":204,"description":"ãã£ã¹ãã¼ã¶","name":"DISPOSER_EOBJ","propertyList":[]},{"classCode":205,"description":"é»æ°èåãæ©","name":"ELECTRIC_MOSQUITO_CATCHER_EOBJ","propertyList":[]},{"classCode":206,"description":"æ¥­åç¨ã·ã§ã¼ã±ã¼ã¹","name":"COMMERCIAL_SHOW_CASE_EOBJ","propertyList":[]},{"classCode":207,"description":"æ¥­åç¨å·èµåº«","name":"COMMERCIAL_REFRIGERATOR_EOBJ","propertyList":[]},{"classCode":208,"description":"æ¥­åç¨ãããã±ã¼ã¹","name":"COMMERCIAL_HOT_CASE_EOBJ","propertyList":[]},{"classCode":209,"description":"æ¥­åç¨ãã©ã¤ã¤ã¼","name":"COMMERCIAL_FRYER_EOBJ","propertyList":[]},{"classCode":210,"description":"æ¥­åç¨é»å­ã¬ã³ã¸","name":"COMMERCIAL_MICROWAVE_OVEN_EOBJ","propertyList":[]},{"classCode":211,"description":"æ´æ¿¯ä¹¾ç¥æ©","name":"WASHER_AND_DRYER_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"æã»èééç¶æ
+","fields":[],"identifier":"DoorCoverOpenCloseStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æã»èé,0x42=æã»èé"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ´æ¿¯ã»ä¹¾ç¥è¨­å®","fields":[],"identifier":"WasherAndDryerSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":178,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ´æ¿¯ä¹¾ç¥éå§ã»åé\/æ´æ¿¯ä¹¾ç¥éè»¢ä¸­,0x42=æ´æ¿¯ä¹¾ç¥ä¸æåæ­¢,0x43=æ´æ¿¯ä¹¾ç¥åæ­¢"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ´æ¿¯ä¹¾ç¥ã³ã¼ã¹è¨­å®ï¼","fields":[],"identifier":"WasherAndDryerCycleSetting1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":208,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"<æ´æ¿¯ä¹¾ç¥ã³ã¼ã¹>\u000d\u000a0x21=æ¨æº,0x22=éé³,0x23=æ±ãå¤§,0x24=ãã¤ããæ±ã,0x25=ã¤ããã,0x26=æ¯å¸,0x27=ã½ãã,0x28=ãã©ã¤,0x29=æ¸
+æ½ããã,0x2A=ã¢ã¤ã­ã³\/Yã·ã£ã,0x2B=åãå¹²ã,0x2C=åç©,0x2D=é¤è,0x2E=æ²¹æ±ã,0x2F=ã¡ã¢ãªã¼,0x30=çæ´å¤,0x31=æ±ãå°,0x32=å°éç­æé,0x40ï½0x4F=æ´æ¿¯ä¹¾ç¥ã³ã¼ã¹\/ã¡ã¼ã«ãªãªã¸ãã«ã³ã¼ã¹\u000d\u000a<æ´æ¿¯ã³ã¼ã¹>\u000d\u000a0x61=æ¨æº,0x62=éé³,0x63=æ±ãå¤§,0x64=ãã¤ããæ±ã,0x65=ã¤ããã,0x66=æ¯å¸,0x67=ã½ãã,0x68=ãã©ã¤,0x69=æ¸
+æ½ããã,0x6A=é¤è,0x6B=æ²¹æ±ã,0x6C=ã¡ã¢ãª,0x6D=çæ´å¤,0x6E=æ±ãå°,0x6F=å°éç­æé,0x7F=æ§½æ´æµ,0x80ï½0x8F=æ´æ¿¯ã³ã¼ã¹\/ã¡ã¼ã«ãªãªã¸ãã«ã³ã¼ã¹\u000d\u000a<ä¹¾ç¥ã³ã¼ã¹>\u000d\u000a0xA1=æ¨æº,0xA2=æ¯å¸,0xA3=ã½ãã,0xA4=ãã©ã¤,0xA5=ã¢ã¤ã­ã³\/Yã·ã£ã,0xA6=åãå¹²ã,0xA7=åç©,0xA8=é¤è,0xA9=ç¸®ã¿ä½æ¸,0xAA=ä»ä¸ã,0xAB=éæ­¢ä¹¾ç¥,0xAC=æéæå®,0xAD=è¡£é¡ãããã,0xBF=æ§½ä¹¾ç¥,0xC0ï½0xCF=ä¹¾ç¥ã³ã¼ã¹\/ã¡ã¼ã«ãªãªã¸ãã«ã³ã¼ã¹"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ´æ¿¯ä¹¾ç¥ã³ã¼ã¹è¨­å®ï¼","fields":[],"identifier":"WasherAndDryerCycleSetting2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":209,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x20=æ´æ¿¯ãªã,0x21=æ¨æº,0x22=éé³,0x23=æ±ãå¤§,0x24=ãã¤ããæ±ã,0x25=ã¤ããã,0x26=æ¯å¸,0x27=ã½ãã,0x28=ãã©ã¤,0x29=æ¸
+æ½ããã,0x2D=é¤è,0x2E=æ²¹æ±ã,0x2F=ã¡ã¢ãªã¼,0x30=çæ´å¤,0x31=æ±ãå°,0x32=å°éç­æé,0x3F=æ§½æ´æµ,0xE0ï½0xEF=ã¡ã¼ã«ãªãªã¸ãã«ã³ã¼ã¹"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ä¹¾ç¥æ¹æ³è¨­å®","fields":[],"identifier":"DryingCycleSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":210,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0xA0=ä¹¾ç¥ãªã,0xA1=æ¨æº,0xA2=æ¯å¸,0xA3=ã½ãã,0xA4=ãã©ã¤,0xA5=ã¢ã¤ã­ã³\/Yã·ã£ã,0xA6=åãå¹²ã,0xA7=åç©,0xA8=é¤è,0xA9=ç¸®ã¿ä½æ¸,0xAA=ä»ä¸ã,0xAB=éæ­¢ä¹¾ç¥,0xAC=æéæå®,0xAD=è¡£é¡ãããã,0xAE=ãã¼ã¿å
+¥åå¶é,0xBF=æ§½ä¹¾ç¥,0xE0ï½0xEF=ã¡ã¼ã«ãªãªã¸ãã«ã³ã¼ã¹"},{"access":["RULE_GET"],"arrayCount":12,"description":"è¨­å®å¯è½ã³ã¼ã¹æ
+å ±ï¼","fields":[],"identifier":"WasherAndDryerCycleOptionList1","initialValue":null,"isArray":true,"primitive":true,"propertyCode":211,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"ãããã1ã®å ´åãå¯¾å¿ããã³ã¼ã¹ã®è¨­å®ãå¯è½ãªãã¨ãã0ã®å ´åã¯ä¸å¯è½ãªãã¨ãç¤ºãããããã¨ã³ã¼ã¹ã®é¢ä¿ã¯è©³ç´°ãåç
+§ã®ãã¨ã"},{"access":["RULE_GET"],"arrayCount":4,"description":"è¨­å®å¯è½ã³ã¼ã¹æ
+å ±ï¼","fields":[],"identifier":"WasherAndDryerCycleOptionList2","initialValue":null,"isArray":true,"primitive":true,"propertyCode":212,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"ãããã1ã®å ´åãå¯¾å¿ããã³ã¼ã¹ã®è¨­å®ãå¯è½ãªãã¨ãã0ã®å ´åã¯ä¸å¯è½ãªãã¨ãç¤ºãããããã¨ã³ã¼ã¹ã®é¢ä¿ã¯è©³ç´°ãåç
+§ã®ãã¨ã"},{"access":["RULE_GET"],"arrayCount":4,"description":"è¨­å®å¯è½ã³ã¼ã¹æ
+å ±ï¼","fields":[],"identifier":"WasherAndDryerCycleOptionList3","initialValue":null,"isArray":true,"primitive":true,"propertyCode":213,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"ãããã1ã®å ´åãå¯¾å¿ããã³ã¼ã¹ã®è¨­å®ãå¯è½ãªãã¨ãã0ã®å ´åã¯ä¸å¯è½ãªãã¨ãç¤ºãããããã¨ã³ã¼ã¹ã®é¢ä¿ã¯è©³ç´°ãåç
+§ã®ãã¨ã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ°´æµè¨­å®","fields":[],"identifier":"WaterFlowRateSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":214,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"<çµ¶å¯¾å¤æå®>\u000d\u000a0x31ï½0x40(æãå¼±ãæ°´æµï½æãå¼·ãæ°´æµ)\u000d\u000a<èªåããã®ç¸å¯¾æå®>\u000d\u000a0xFF=èªåè¨­å®,0xA0ï½0xA7=ãã©ã¹ç¸å¯¾æå®(1ï½8æ®µé),0xC0ï½0xC7=ãã¤ãã¹ç¸å¯¾æå®(1ï½8æ®µé)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ®µéè±æ°´åè»¢æ°è¨­å®å¤","fields":[],"identifier":"RotationSpeedForSpinDryingSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":215,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":null,"valueDescription":"<çµ¶å¯¾å¤æå®>\u000d\u000a0x0000ï½0x0FFF(0ï½4095 r\/min)\u000d\u000a<èªåããã®ç¸å¯¾æå®>\u000d\u000a0xFFFF=èªåè¨­å®,0xA000ï½0xA7FF=ãã©ã¹ç¸å¯¾æå®(1ï½2048r\/min),0xC000ï½0xC7FF=ãã¤ãã¹ç¸å¯¾æå®(1ï½2048r\/min)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ä¹¾ç¥åº¦è¨­å®","fields":[],"identifier":"DegreeOfDryingSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":216,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"<çµ¶å¯¾å¤æå®>\u000d\u000a0x31ï½0x40(æãä½ãä¹¾ç¥åº¦ï½æãé«ãä¹¾ç¥åº¦)\u000d\u000a<èªåããã®ç¸å¯¾æå®>\u000d\u000a0xFF=èªåè¨­å®,0xA0ï½0xA7=ãã©ã¹ç¸å¯¾æå®(1ï½8æ®µé),0xC0ï½0xC7=ãã¤ãã¹ç¸å¯¾æå®(1ï½8æ®µé)"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ´æ¿¯æ®ãæé","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æé","valueDescription":"0x00ï½0xFE(0ï½254)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"RemainingWashingTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":219,"required":["NONE"],"size":2,"type":"hours_minutes_t","unitDescription":null,"valueDescription":"0xFFFF=æ®ãæéä¸æ"},{"access":["RULE_GET"],"arrayCount":0,"description":"ä¹¾ç¥æ®ãæé","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æé","valueDescription":"0x00ï½0xFE(0ï½254)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"RemainingDryingTime","initialValue":null,"isArray":false,"primitive":false,"propertyCode":220,"required":["NONE"],"size":2,"type":"hours_minutes_t","unitDescription":null,"valueDescription":"0xFFFF=æ®ãæéä¸æ"},{"access":["RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãçµéæé","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æé","valueDescription":"0x00ï½0xFF(0ï½255)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"ElapsedTimeOnTheOnTimer","initialValue":null,"isArray":false,"primitive":false,"propertyCode":223,"required":["NONE"],"size":2,"type":"hours_minutes_2type_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":2,"description":"ã¤ãããè¡ç¨æéè¨­å®å¤","fields":[],"identifier":"PresoakingTimeSetting","initialValue":null,"isArray":true,"primitive":true,"propertyCode":225,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"æéå","valueDescription":"<çµ¶å¯¾å¤æå®>\u000d\u000a0x00ï½0x17:0x00ï½0x3B(0ï½23):(0ï½59)\u000d\u000a<èªåããã®ç¸å¯¾æå®>\u000d\u000a0xFFFF=èªåè¨­å®,0xA000ï½0xA03B=ãã©ã¹ç¸å¯¾æå®(1ï½60å),0xC000ï½0xC03B=ãã¤ãã¹ç¸å¯¾æå®(1ï½60å)"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ´æ¿¯ä¹¾ç¥é·ç§»ç¶æ
+","fields":[],"identifier":"CurrentStageOfWasherAndDryerCycle","initialValue":null,"isArray":false,"primitive":true,"propertyCode":226,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=æ´ã,0x42=ããã,0x43=è±æ°´,0x44=ä¸æåæ­¢,0x45=æ´æ¿¯å®äº,0x51=æ´æ¿¯\/ä¹¾ç¥ï¼ã½ããã­ã¼ããªãï¼å®äº,0x52=ä¹¾ç¥,0x53=ã½ããã­ã¼ã,0x54=ä¹¾ç¥ï¼ã½ããã­ã¼ãããï¼å®äº,0x61=éè»¢åå¾
+æ©ä¸­,0x71=ç¬¬1ããã,0x72=ç¬¬2ããã,0x73=ç¬¬3ããã,0x74=ç¬¬4ããã,0x75=ç¬¬5ããã,0x76=ç¬¬6ããã,0x77=ç¬¬7ããã,0x78=ç¬¬8ããã,0x81=ç¬¬1è±æ°´,0x82=ç¬¬2è±æ°´,0x83=ç¬¬3è±æ°´,0x84=ç¬¬4è±æ°´,0x85=ç¬¬5è±æ°´,0x86=ç¬¬6è±æ°´,0x87=ç¬¬7è±æ°´,0x88=ç¬¬8è±æ°´,0x91=ããªãã¼ãè±æ°´,0xE0ï½0xEF=ã¡ã¼ã«ãªãªã¸ãã«ã³ã¼ã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ°´éè¨­å®ï¼","fields":[],"identifier":"WaterVolumeSetting1","initialValue":null,"isArray":false,"primitive":true,"propertyCode":227,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"ã","valueDescription":"<çµ¶å¯¾å¤æå®>\u000d\u000a0x00ï½0x7F(0ï½127ã)\u000d\u000a<èªåããã®ç¸å¯¾æå®>\u000d\u000a0xFF=èªåè¨­å®,0xA0ï½0xBF=ãã©ã¹ç¸å¯¾æå®(1ï½32ã),0xC0ï½0xDF=ãã¤ãã¹ç¸å¯¾æå®(1ï½32ã)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ°´éè¨­å®ï¼","fields":[],"identifier":"WaterVolumeSetting2","initialValue":null,"isArray":false,"primitive":true,"propertyCode":228,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"<çµ¶å¯¾å¤æå®>\u000d\u000a0x31ï½0x40(æãä½ãæ°´ä½ï½æãé«ãæ°´ä½)\u000d\u000a<èªåããã®ç¸å¯¾æå®>\u000d\u000a0xFF=èªåè¨­å®,0xA0ï½0xA7=ãã©ã¹ç¸å¯¾æå®(1ï½8æ®µé),0xC0ï½0xC7=ãã¤ãã¹ç¸å¯¾æå®(1ï½8æ®µé)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":2,"description":"æ´ãæéè¨­å®å¤","fields":[],"identifier":"WashingTimeSetting","initialValue":null,"isArray":true,"primitive":true,"propertyCode":229,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"æéå","valueDescription":"<çµ¶å¯¾å¤æå®>\u000d\u000a0x00ï½0x17:0x00ï½0x3B(0ï½23):(0ï½59)\u000d\u000a<èªåããã®ç¸å¯¾æå®>\u000d\u000a0xFF=èªåè¨­å®,0xA000ï½0xA03B=ãã©ã¹ç¸å¯¾æå®(1ï½60å),0xC000ï½0xC03B=ãã¤ãã¹ç¸å¯¾æå®(1ï½60å)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ãããåæ°è¨­å®å¤","fields":[],"identifier":"NumberOfTimesOfRinsingSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":230,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00ï½0x08(0ï½8å),0xFF=èªå"},{"access":["RULE_SET","RULE_GET"],"arrayCount":4,"description":"ãããã¢ã¼ãè¨­å®","fields":[],"identifier":"RinsingProcessSetting","initialValue":null,"isArray":true,"primitive":true,"propertyCode":231,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0000=ã¢ã¼ãèªåè¨­å®,0001=æºãããã,0010=æµæ°´ããã,0011=ã·ã£ã¯ã¼ããã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"è±æ°´æéè¨­å®å¤","fields":[],"identifier":"SpinDryingTimeSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":232,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"<çµ¶å¯¾å¤æå®>\u000d\u000a0x00ï½0x3B(0ï½59å)\u000d\u000a<èªåããã®ç¸å¯¾æå®>\u000d\u000a0xFF=èªåè¨­å®,0xA0ï½0xBF=ãã©ã¹ç¸å¯¾æå®(1ï½32å),0xC0ï½0xDF=ãã¤ãã¹ç¸å¯¾æå®(1ï½32å)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":2,"description":"ä¹¾ç¥æéè¨­å®å¤","fields":[],"identifier":"DryingTimeSetting","initialValue":null,"isArray":true,"primitive":true,"propertyCode":233,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"æéå","valueDescription":"<çµ¶å¯¾å¤æå®>\u000d\u000a0x00ï½0x17:0x00ï½0x3B(0ï½23):(0ï½59)\u000d\u000a<èªåããã®ç¸å¯¾æå®>\u000d\u000a0xFFFF=èªåè¨­å®,0xA000ï½0xA03B=ãã©ã¹ç¸å¯¾æå®(1ï½60å),0xC000ï½0xC03B=ãã¤ãã¹ç¸å¯¾æå®(1ï½60å)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"æ´ãæ¸©æ°´è¨­å®å¤","fields":[],"identifier":"WarmWaterSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":234,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":"â","valueDescription":"0x00ï½0x64(0ï½100â),0xFE=æ¸©æ°´ä¸ä½¿ç¨,0xFF=æ¸©åº¦èªåè¨­å®"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"é¢¨åæ°´è¨­å®","fields":[],"identifier":"BathtubWaterRecycleSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":235,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x40=é¢¨åæ°´çµ¦æ°´ãªã,0x41=æ´ãã®ã¿,0x42=ãããã®ã¿ï¼é¤ãæçµãããï¼,0x43=å
+¨ããã,0x44=æ´ãï¼ãããï¼é¤ãæçµãããï¼,0x45=æ´ãï¼å
+¨ããã"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ã½ããã­ã¼ãè¨­å®","fields":[],"identifier":"WrinklingMinimizationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":236,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ã½ããã­ã¼ãå
+¥ã,0x42=ã½ããã­ã¼ãåã"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ´æ¿¯ä¹¾ç¥æ®ãæé","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æé","valueDescription":"0x00ï½0xFE(0ï½254)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"TimeRemainingToCompleteWasherAndDryerCycle","initialValue":null,"isArray":false,"primitive":false,"propertyCode":237,"required":["NONE"],"size":2,"type":"hours_minutes_t","unitDescription":null,"valueDescription":"0xFFFF=æ®ãæéä¸æ"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"éè»¢ä¸­æã»èã­ãã¯è¨­å®","fields":[],"identifier":"DoorCoverLockSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":238,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ã­ãã¯,0x42=ã¢ã³ã­ãã¯"},{"access":["RULE_GET"],"arrayCount":0,"description":"æ´æ¿¯ä¹¾ç¥è¡ç¨æ
+å ±","fields":[{"arrayCount":2,"description":"æå¹ãªè¡¨ç¤ºé 
+ç®","fields":[],"identifier":"AvailableItems","initialValue":null,"isArray":true,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"æå¹ãªè¡¨ç¤ºé 
+ç®ãããããããã§ç¤ºãã"},{"arrayCount":0,"description":"ã¤ãããè¡ç¨","fields":[],"identifier":"Presoaking","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=ã¤ãããè¡ç¨ãã,0x42=ã¤ãããè¡ç¨ãªã"},{"arrayCount":2,"description":"æ´ãæé","fields":[],"identifier":"WashingTime","initialValue":null,"isArray":true,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"å¤ã¯æ´ãæéè¨­å®å¤ãåç
+§"},{"arrayCount":0,"description":"ãããåæ°","fields":[],"identifier":"NumberOfTimesOfRinsing","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"å¤ã¯ãããåæ°è¨­å®å¤ãåç
+§"},{"arrayCount":0,"description":"ãããã¢ã¼ã","fields":[],"identifier":"RinsingProcess","initialValue":null,"isArray":false,"primitive":true,"size":4,"type":"uint32_t","unitDescription":null,"valueDescription":"å¤ã¯ãããã¢ã¼ãè¨­å®ãåç
+§"},{"arrayCount":0,"description":"è±æ°´æé","fields":[],"identifier":"SpinDryingTime","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"å¤ã¯è±æ°´æéè¨­å®å¤ãåç
+§"},{"arrayCount":2,"description":"ä¹¾ç¥æé","fields":[],"identifier":"DryingTime","initialValue":null,"isArray":true,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"å¤ã¯ä¹¾ç¥æéè¨­å®å¤ãåç
+§"},{"arrayCount":0,"description":"æ¸©æ°´è¨­å®","fields":[],"identifier":"WarmWaterSetting","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"å¤ã¯æ¸©æ°´è¨­å®ãåç
+§"},{"arrayCount":0,"description":"æ°´éè¨­å®1","fields":[],"identifier":"WaterVolumeSetting1","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"å¤ã¯æ°´éè¨­å®1ãåç
+§"},{"arrayCount":0,"description":"æ°´éè¨­å®2","fields":[],"identifier":"WaterVolumeSetting2","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"å¤ã¯æ°´éè¨­å®2ãåç
+§"},{"arrayCount":0,"description":"é¢¨åæ°´è¨­å®","fields":[],"identifier":"BathtubWaterRecycleSetting","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"å¤ã¯é¢¨åæ°´è¨­å®ãåç
+§"},{"arrayCount":0,"description":"æ°´æµè¨­å®","fields":[],"identifier":"WaterFlowRateSetting","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"å¤ã¯æ°´æµè¨­å®ãåç
+§"},{"arrayCount":2,"description":"è±æ°´åè»¢æ°è¨­å®","fields":[],"identifier":"RotationSpeedForSpinDryingSetting","initialValue":null,"isArray":true,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"å¤ã¯è±æ°´åè»¢æ°è¨­å®å¤ãåç
+§"},{"arrayCount":0,"description":"ä¹¾ç¥åº¦è¨­å®","fields":[],"identifier":"DegreeOfDryingSetting","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"å¤ã¯ä¹¾ç¥åº¦è¨­å®ãåç
+§"},{"arrayCount":2,"description":"ã¤ãããè¡ç¨æéè¨­å®","fields":[],"identifier":"PresoakingTimeSetting","initialValue":null,"isArray":true,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"å¤ã¯ã¤ãããè¡ç¨æéè¨­å®ãåç
+§"},{"arrayCount":0,"description":"ã½ããã­ã¼ãè¨­å®","fields":[],"identifier":"WrinklingMinimizationSetting","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"å¤ã¯ã½ããã­ã¼ãè¨­å®ãåç
+§"}],"identifier":"WasherAndDryerCycle","initialValue":null,"isArray":false,"primitive":false,"propertyCode":239,"required":["NONE"],"size":24,"type":"washer_and_dryer_cycle_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãäºç´è¨­å®","fields":[],"identifier":"OnTimerReservationSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":144,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x41=äºç´å
+¥,0x42=äºç´å"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãæå»è¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æ","valueDescription":"0x00ï½0x17(0ï½23)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"OnTimerSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":145,"required":["NONE"],"size":2,"type":"hour_minute_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"ï¼¯ï¼®ã¿ã¤ãç¸å¯¾æéè¨­å®å¤","fields":[{"arrayCount":0,"description":"æ","fields":[],"identifier":"Hour","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"æé","valueDescription":"0x00ï½0xFF(0ï½255)"},{"arrayCount":0,"description":"å","fields":[],"identifier":"Minute","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":"å","valueDescription":"0x00ï½0x3B(0ï½59)"}],"identifier":"RelativeTimeBasedOnTimerSetting","initialValue":null,"isArray":false,"primitive":false,"propertyCode":146,"required":["NONE"],"size":2,"type":"hours_minutes_2type_t","unitDescription":null,"valueDescription":""}]}]},{"classGroupCode":4,"description":"å¥åº·é¢é£æ©å¨","define":"X1_WELLNESS","classList":[{"classCode":1,"description":"ä½éè¨","name":"WEIGHING_MACHINE_EOBJ","propertyList":[{"access":["RULE_GET"],"arrayCount":0,"description":"ä½éè¨æ¸¬å¤","fields":[],"identifier":"MeasuredValueOfBodyWeight","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.1kg","valueDescription":"0x0000ï½0xFFFD(0ï½6553.3kg)"},{"access":["RULE_GET"],"arrayCount":0,"description":"ä½èèªè¨æ¸¬å¤","fields":[],"identifier":"MeasuredValueOfBodyFat","initialValue":null,"isArray":false,"primitive":true,"propertyCode":225,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":"0.10ï¼
+","valueDescription":"0x0000ï½0x03E8(0ï½100.0%)"}]},{"classCode":2,"description":"ä½æ¸©è¨","name":"CLINICAL_THERMOMETER_EOBJ","propertyList":[]},{"classCode":3,"description":"è¡å§è¨","name":"BLOOD_PRESSURE_METER_EOBJ","propertyList":[]},{"classCode":4,"description":"è¡ç³å¤è¨","name":"BLOOD_SUGAR_METER_EOBJ","propertyList":[]},{"classCode":5,"description":"ä½èèªè¨","name":"BODY_FAT_METER_EOBJ","propertyList":[]}]},{"classGroupCode":5,"description":"ç®¡çã»æä½é¢é£æ©å¨","define":"X1_CONTROLLER","classList":[{"classCode":252,"description":"ã»ã­ã¥ã¢éä¿¡ç¨å
+±æéµè¨­å®ãã¼ã","name":"SECURE_COMMUNICATION_SHARED_KEY_SETUP_NODE_EOBJ","propertyList":[]},{"classCode":253,"description":"ã¹ã¤ããï¼JEMA/HAç«¯å­å¯¾å¿ï¼","name":"SWITCH_EOBJ","propertyList":[{"access":["RULE_SET"],"arrayCount":0,"description":"æ¥ç¶æ©å¨","fields":[],"identifier":"ConnectedDevice","initialValue":null,"isArray":false,"primitive":true,"propertyCode":224,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"æ©å¨ã®å½¢åãä¿æãã"}]},{"classCode":254,"description":"æºå¸¯ç«¯æ«","name":"PORTABLE_TERMINAL_EOBJ","propertyList":[]},{"classCode":255,"description":"ã³ã³ãã­ã¼ã©","name":"CONTROLLER_EOBJ","propertyList":[]}]},{"classGroupCode":6,"description":"AVé¢é£æ©å¨","define":"X1_AUDIO_VISUAL","classList":[{"classCode":1,"description":"ãã£ã¹ãã¬ã¼","name":"DISPLAY_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"è¡¨ç¤ºå¶å¾¡è¨­å®","fields":[],"identifier":"DisplayControlSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x30=è¡¨ç¤º,0x31=éè¡¨ç¤º"},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"æå­åè¨­å®åä»å¯è½ç¶æ
+","fields":[],"identifier":"CharacterStringSettingAcceptanceStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x30=ã¬ãã£,0x31=ãã¸ã¼"},{"access":["RULE_GET"],"arrayCount":2,"description":"è¡¨ç¤ºå¯è½æå­ã³ã¼ã","fields":[],"identifier":"SupportedCharacterCodes","initialValue":null,"isArray":true,"primitive":true,"propertyCode":178,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"[0]ANSI X3.4:1=æ­è¼,0=éæ­è¼\u000d\u000a[1]Shift-JIS:1=æ­è¼,0=éæ­è¼\u000d\u000a[2]JIS:1=æ­è¼,0=éæ­è¼\u000d\u000a[3]æ¥æ¬èªEUC:1=æ­è¼,0=éæ­è¼\u000d\u000a[4]UCS-4:1=æ­è¼,0=éæ­è¼\u000d\u000a[5]UCS-2:1=æ­è¼,0=éæ­è¼\u000d\u000a[6]Latin-1:1=æ­è¼,0=éæ­è¼\u000d\u000a[7]UTF-8:1=æ­è¼,0=éæ­è¼\u000d\u000a[8ï½15]for future reserved:0"},{"access":["RULE_SET","RULE_GET","VARIABLE"],"arrayCount":0,"description":"ä¼éæå­åè¨­å®","fields":[{"arrayCount":0,"description":"ä¼éæå­ãã¤ãã³ã¼ãåãã¼ã¿é·","fields":[],"identifier":"ByteCodeSequenceDataLength","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"ä¼éæå­ãã¤ãã³ã¼ãåãã¼ã¿é·ã®16é²æç®å¤"},{"arrayCount":0,"description":"ä½¿ç¨æå­ã³ã¼ã","fields":[],"identifier":"CharacterCodeToUse","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x01=ANSI X3.4,0x02=Shift-JIS,0x03=JIS,0x04=æ¥æ¬èªEUC,0x05=UCS-4,0x06=UCS-2,0x07=Latin-1,0x08=UTF-8,0x09ï½=for future reserved"},{"arrayCount":0,"description":"for future reserved","fields":[],"identifier":"Reserved","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""},{"arrayCount":244,"description":"ä¼éæå­åãã¤ãã³ã¼ãå","fields":[],"identifier":"ByteCodeSequenceOfTheCharacterStringToPresentToTheUser","initialValue":null,"isArray":true,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""}],"identifier":"CharacterStringToPresentToTheUser","initialValue":null,"isArray":false,"primitive":false,"propertyCode":179,"required":["RULE_SET","RULE_GET"],"size":247,"type":"character_string_to_present_to_the_user_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"åä»ãä¼éæå­åé·","fields":[{"arrayCount":0,"description":"for future reserved","fields":[],"identifier":"TotalNumberOfBytesOfTheNewestCharacterString","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00ï½0xF4"},{"arrayCount":0,"description":"for future reserved","fields":[],"identifier":"Reserved","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x00"}],"identifier":"LengthOfCharacterStringAccepted","initialValue":null,"isArray":false,"primitive":false,"propertyCode":180,"required":["RULE_GET"],"size":2,"type":"length_of_character_string_accepted_t","unitDescription":null,"valueDescription":""}]},{"classCode":2,"description":"ãã¬ã","name":"TELEVISION_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"è¡¨ç¤ºå¶å¾¡è¨­å®","fields":[],"identifier":"DisplayControlSetting","initialValue":null,"isArray":false,"primitive":true,"propertyCode":176,"required":["NONE"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"æå­åè¨­å®åä»å¯è½ç¶æ
+","fields":[],"identifier":"CharacterStringSettingAcceptanceStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":177,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":2,"description":"è¡¨ç¤ºå¯è½æå­ã³ã¼ã","fields":[],"identifier":"SupportedCharacterCodes","initialValue":null,"isArray":true,"primitive":true,"propertyCode":178,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""},{"access":["RULE_SET","RULE_GET","VARIABLE"],"arrayCount":247,"description":"ä¼éæå­åè¨­å®","fields":[],"identifier":"CharacterStringToPresentToTheUser","initialValue":null,"isArray":true,"primitive":true,"propertyCode":179,"required":["RULE_SET","RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET","ANNOUNCE"],"arrayCount":0,"description":"åä»ãä¼éæå­åé·","fields":[],"identifier":"LengthOfCharacterStringAccepted","initialValue":null,"isArray":false,"primitive":true,"propertyCode":180,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""}]}]},{"classGroupCode":14,"description":"ãã­ãã¡ã¤ã«","define":"X1_PROFILE","classList":[{"classCode":240,"description":"ãã¼ããã­ãã¡ã¤ã«ãªãã¸ã§ã¯ã","name":"NODE_PROFILE_EOBJ","propertyList":[{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"åä½ç¶æ
+","fields":[],"identifier":"OperationStatus","initialValue":null,"isArray":false,"primitive":true,"propertyCode":128,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0x30=èµ·åä¸­,0x31=æªèµ·åä¸­"},{"access":["RULE_GET"],"arrayCount":0,"description":"ï¼¶ï½
+ï½ï½ï½ï½ï½æ
+å ±","fields":[{"arrayCount":0,"description":"ã¡ã¸ã£ã¼ãã¼ã¸ã§ã³(å°æ°ç¹ä»¥ä¸)","fields":[],"identifier":"MajorVersionNumber","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"Binary"},{"arrayCount":0,"description":"ãã¤ãã¼ãã¼ã¸ã§ã³(å°æ°ç¹ä»¥ä¸)","fields":[],"identifier":"MinorVersionNumber","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"Binary"},{"arrayCount":2,"description":"é»æã¿ã¤ã","fields":[],"identifier":"MessageType","initialValue":null,"isArray":true,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"Bitmap"}],"identifier":"VersionInformation","initialValue":null,"isArray":false,"primitive":false,"propertyCode":130,"required":["RULE_GET"],"size":4,"type":"version_information_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"è­å¥çªå·","fields":[{"arrayCount":0,"description":"ä¸ä½éä¿¡å±¤IDãã£ã¼ã«ã","fields":[],"identifier":"LowerCommunicationIdField","initialValue":null,"isArray":false,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"0xFE=2ãã17ãã¤ããã¡ã¼ã«è¦å®å½¢å¼ã«ããè¨­å®,ãã®ä»=future reserved"},{"arrayCount":0,"description":"ã¡ã¼ã«ã¼ã³ã¼ã","fields":[{"arrayCount":3,"description":"ã¡ã¼ã«ã¼ã³ã¼ã","fields":[],"identifier":"ManufacturerCode","initialValue":null,"isArray":true,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"ECHONETã³ã³ã½ã¼ã·ã¢ã ã§è¦å®ã"}],"identifier":"ManufacturerCode","initialValue":null,"isArray":false,"primitive":false,"size":3,"type":"manufacturer_code_t","unitDescription":null,"valueDescription":""},{"arrayCount":13,"description":"ã¦ãã¼ã¯IDé¨(ã¡ã¼ã«ã¼ç¬èª)","fields":[],"identifier":"UniqueIdSection","initialValue":null,"isArray":true,"primitive":true,"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":""}],"identifier":"IdentificationNumber","initialValue":null,"isArray":false,"primitive":false,"propertyCode":131,"required":["RULE_GET"],"size":17,"type":"node_identification_number_t","unitDescription":null,"valueDescription":""},{"access":["RULE_GET"],"arrayCount":0,"description":"ç°å¸¸å
+å®¹","fields":[],"identifier":"FaultContent","initialValue":null,"isArray":false,"primitive":true,"propertyCode":137,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":null,"valueDescription":"0x0000ï½0x03EC(0ï½1004)"},{"access":["RULE_SET","RULE_GET"],"arrayCount":0,"description":"åä½è­å¥æ
+å ±","fields":[],"identifier":"UniqueIdentifierData","initialValue":null,"isArray":false,"primitive":true,"propertyCode":191,"required":["NONE"],"size":2,"type":"uint16_t","unitDescription":null,"valueDescription":"ä¸è¨(3)åç
+§ã"},{"access":["RULE_GET"],"arrayCount":3,"description":"èªãã¼ãã¤ã³ã¹ã¿ã³ã¹æ°","fields":[],"identifier":"NumberOfSelfNodeInstances","initialValue":null,"isArray":true,"primitive":true,"propertyCode":211,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"1ï½3ãã¤ãç®ï¼ã¤ã³ã¹ã¿ã³ã¹ç·æ°"},{"access":["RULE_GET"],"arrayCount":2,"description":"èªãã¼ãã¯ã©ã¹æ°","fields":[],"identifier":"NumberOfSelfNodeClasses","initialValue":null,"isArray":true,"primitive":true,"propertyCode":212,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"1ï½2ãã¤ãç®ï¼ã¯ã©ã¹ç·æ°"},{"access":["RULE_ANNO","VARIABLE"],"arrayCount":253,"description":"ã¤ã³ã¹ã¿ã³ã¹ãªã¹ãéç¥","fields":[],"identifier":"InstanceListNotification","initialValue":null,"isArray":true,"primitive":true,"propertyCode":213,"required":["RULE_ANNO"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"1ãã¤ãç®ï¼éå ±ã¤ã³ã¹ã¿ã³ã¹æ°\u000d\u000a2ï½253ãã¤ãç®ï¼ECHONETãªãã¸ã§ã¯ãã³ã¼ã(EOJ3ãã¤ã)ãåæã"},{"access":["RULE_GET","VARIABLE"],"arrayCount":253,"description":"èªãã¼ãã¤ã³ã¹ã¿ã³ã¹ãªã¹ãï¼³","fields":[],"identifier":"SelfNodeInstanceListS","initialValue":null,"isArray":true,"primitive":true,"propertyCode":214,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"1ãã¤ãç®ï¼ã¤ã³ã¹ã¿ã³ã¹ç·æ°\u000d\u000a2ï½253ãã¤ãç®ï¼ECHONETãªãã¸ã§ã¯ãã³ã¼ã(EOJ3ãã¤ã)ãåæã"},{"access":["RULE_GET","VARIABLE"],"arrayCount":17,"description":"èªãã¼ãã¯ã©ã¹ãªã¹ãï¼³","fields":[],"identifier":"SelfNodeClassListS","initialValue":null,"isArray":true,"primitive":true,"propertyCode":215,"required":["RULE_GET"],"size":1,"type":"uint8_t","unitDescription":null,"valueDescription":"1ãã¤ãç®ï¼ã¯ã©ã¹ç·æ°\u000d\u000a2ï½17ãã¤ãç®ï¼ã¯ã©ã¹ã³ã¼ã(EOJã®ä¸ä½2ãã¤ã)ãåæã"}]}]},{"classGroupCode":15,"description":"ã¦ã¼ã¶ã¼å®ç¾©","define":"X1_USER_DEFINED","classList":[]}]}
Index: EcnlProtoTool/trunk/webapp/webmrbc/ecnl_toolbox.xml
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/ecnl_toolbox.xml	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/ecnl_toolbox.xml	(revision 270)
@@ -0,0 +1,41 @@
+<xml id="toolbox" style="display: none">
+	<category name="ECHONET Lite API" colour="230">
+		<block type="property_attribute"></block>
+		<block type="service_code"></block>
+		<block type="node_id"></block>
+		<block type="save_received_property"></block>
+		<block type="get_saved_property"></block>
+		<block type="get_property_info"></block>
+		<block type="set_announce_request"></block>
+		<block type="data_to_number">
+			<value name="POSITION">
+				<shadow type="math_number"></shadow>
+			</value>
+		</block>
+		<block type="number_to_data">
+			<value name="POSITION">
+				<shadow type="math_number"></shadow>
+			</value>
+		</block>
+		<block type="no_op"></block>
+		<block type="received_data"></block>
+		<block type="received_data_size"></block>
+		<block type="data_join"></block>
+		<block type="create_esv_get"></block>
+		<block type="create_esv_set"></block>
+		<block type="esv_add_edt"></block>
+		<block type="esv_add_epc"></block>
+		<block type="send_esv"></block>
+		<block type="release_esv"></block>
+		<block type="notify_initial_esv"></block>
+		<block type="esv_get_esv"></block>
+		<block type="esv_iterate"></block>
+		<block type="esv_iterator"></block>
+		<block type="svctask_set_timer"></block>
+		<block type="svctask_timer"></block>
+		<block type="svctask_progress"></block>
+		<block type="svctask_recv_msg"></block>
+		<block type="svctask_call_timeout"></block>
+		<block type="svctask_is_match"></block>
+	</category>
+</xml>
Index: EcnlProtoTool/trunk/webapp/webmrbc/img/banner.svg
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/img/banner.svg	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/img/banner.svg	(revision 270)
@@ -0,0 +1,1541 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   xml:space="preserve"
+   width="245.56302"
+   height="58.124538"
+   viewBox="0 0 245.56302 58.124538"
+   sodipodi:docname="banner.svg"><metadata
+     id="metadata8"><rdf:RDF><cc:Work
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+     id="defs6"><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath18"><path
+         d="M 0,0 793,0 793,1122 0,1122 0,0 Z"
+         id="path20"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath206"><path
+         d="m 92,72 296,0 0,78 -296,0 0,-78 z"
+         id="path208"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath214"><path
+         d="m 170,81 0,21 94,0 0,-21 -94,0 z"
+         id="path216"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask220"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJMAAAAhCAAAAAD4jMa3AAAAAXNCSVQI5gpbmQAABqlJREFUWIXtV2tvW8cRPTN7H7yXb1EvS7RswY8ospvEgRMEqNECRdF/3bRAkAAOChexkzSWH7IlWaREUg+Sl/e1u9MPIinajoD2g1UUyPnEIWfvHp45M7sX+A3/CegSt5H/JvmDw68yIB17FpUJQJxfmO1cBiWqfuUD8dcjAID/h4Bgvju0F6XzZXBCHJHi3JwFOialOL64kpfCSYbfRoJ4HJlvexY6+x9zgoBJokmxNCCjCyv3np/onP20Vd7tmdmY3u4m+pXvCSQIHGBaLa/Ikr639vy5Z5wUAdDETjFJzv4Au40CZHiSg9YUIPsp4PtAllC1xpAdAxAHNTc+ygXMAAyckjccCYj9aiE/iQ0AUuWqH/V8QEYTvgUHSMUJK7abC8oE6FhQLBGQ9O2Yk3rQYOi/ubcXXfP8lwygYKPpE0R6j/rqbkgwUdeq360p+/JHs7ThQbdjOFc2SwwZPm7jzg0H5p/ZZpUGf09V5e6CAvTWVg4q373CJEnfAaKJKiEg6dxH8yynj469PxZITr5Jubnhwf44nHCi0GGY5o2AoG71dw3V71eVFVJYuPcwa10pkQQEd9kDhySD7gpHFt5nTVeEVPXeX/NQOeDyekCSQq1vBrDEaqN3aMu/LzMEYUiQeGwhKjJocd0loP7pd/7JkoOKm8qgvaaSPQ1AAYBt1UJyFpycGOzsG+9+Q+ntp726Q4Xh6WGhzjg6xtWmApI9PQoWaKuHmzc8+/pZVlFqJ+04NaY5BsvBQe3zEEc/deYV9Y/50wUl0X43KzLi53rM6eocU4G1VkT+Xr9VKjMORhL5S/T00E79lOQCZE9fzX/hUQl8Y471o12t1KarFnZNJEBA1FQAhQCtqnTXVG550nqs7VVobfOBQI4fX7tGEW8WkD6MihuuxJhfVtJ/eCrOg3kaTk0fEpBsvXa/rDNVTnVnVVG9Y9W6il/rmb4LCfH3Hd1OXfLZWXflZD+H6VogYB1ZUEClOTYKPlOjgt2M1n3YV7Ryx7W9DAgI9odjdOl4bo7trp7f9JH3ZMWBfX5qYLKZ7qcyI3vY1dyuMrmQngXVmFYreJHinBMFLN0jDZsDFmWf7JEBJAGQWBkIEKimsq0rir3smmNea64ysFH02A5+0qCQYCPT7YIXFajxp4JC/GSEBkPaBoA7Y3Hlk3SONaAFAGQYeSiTc9MZyzTxuMJkpEmKgIBUAHIA0UBiQKFaUaetRUW+Web2QKhI4DlI/GYrskBIMrIQQMoMqkHyw2dd44aMOAPAAdnpKCgy7J4G4JxNKNutOKVCfSrTWKcQQGSBMCQZWitALgCqBEQCGQZcmC/hzakA4ZxrtjU8l5C2T/sdbQFQQIimZpFW/7QbW0GBISkAqvmE0XQUENC349RIIJ3r4PrtqUxjnYoMiQVqVcG2TALAJ0AtK+h9A4wEfNM1+5EFhVfVcdfCAJI/iUWILeC6ZMc6G4F9eWCEaDrSybvtQOKpTgQQCfwFhokE0tMef1yayjQ+70ICNXyncdNB3tZRJlR3WS0tK7szEkgkoAYdRSYRvlvDjgZMIhQuuypoXndARcZYBxkJ+LqnvIVNH5kBVWre3BcrCjqf6FQk0Kqrws8CkqNUgHRgqaKmMk38ROCP1pOiC/M8Qb5z213+8qC0WrD95xqQoQBk940MK4qR7GnAvrrjqc83xed4XwdLDHB5lALyes2h5mLmK9s70IMCew+0S0ZJGqRm2nZyezkLiwz9IgcgnQaTfTmR6Wxm8s0iWTgFBbPzcw7pl4uqtFR37eDhqQDkrDlA9jhBo86w2y0LyLBaJHI9gt6VP68o0Pz62q4GctQUlKdgOn2rlxywkr2TMvvN1tmmasOX3UKp5BP09rYGAGo6SH9I8I5O0mqtVVWy8zQFkPzjk1UPdrCzFwkAiXIFOUyEhjmgzzROv19bKjnJsN3OCscRAEjfADDPTq9WvDzuvoks9r2NAPHW3r2IYMa1U9nQHr64dYWR7f6cAYDEgN0+v+QRAAR/CezTfxmHczsebMrxkWqxM8zFYHz+jxczARCRsdjAOJ34PGDXy3OxZyfYhBRgwUFoh9l4wfJXfvL1YMrJAUAVhgyMMZjCmBQzmLjPzt7Ezj+b2VzITGjT9L0EAwBmGI0vZ0L+x+6sTFNOEOedR39oCABQ05yEmw2Ot/X5Lw4AlAnqvul/k/766g+I4JNQiCl/Ep3LdKZT0eq3rr2XBioZYUj8y85sjQgYX33f8sGlkfIWy5wcjN7a+pLezS8G0Wy3/Ib/c/wbOotkzDtkykAAAAAASUVORK5CYII="
+         id="image222" /></mask><linearGradient
+       x1="0"
+       y1="128.127"
+       x2="0"
+       y2="166.25999"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.34766,0,0,-0.34766,15.66952,822.94012)"
+       spreadMethod="pad"
+       id="linearGradient228"><stop
+         style="stop-opacity:1;stop-color:#c1d72f"
+         offset="0"
+         id="stop230" /><stop
+         style="stop-opacity:1;stop-color:#bcd631"
+         offset="0.1394"
+         id="stop232" /><stop
+         style="stop-opacity:1;stop-color:#afd136"
+         offset="0.5859"
+         id="stop234" /><stop
+         style="stop-opacity:1;stop-color:#abd037"
+         offset="1"
+         id="stop236" /></linearGradient><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath264"><path
+         d="m 105.106,83.011803 44.965,0 0,51.388187 -44.965,0 0,-51.388187 z"
+         id="path266"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath272"><path
+         d="m 105.106,83.011803 44.965,0 0,51.388187 -44.965,0 0,-51.388187 z"
+         id="path274"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath280"><path
+         d="m 105.106,83.011803 44.894,0 0,51.388187 -44.894,0 0,-51.388187 z"
+         id="path282"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask292"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATAAAAFXCAAAAAAAYU3NAAAAAXNCSVQI5gpbmQAADE9JREFUeJztnNti27gORQF1/v+TjfPAG8CbtHvaVJb2Sho7saWYKwAI0poRIYQQQgghhBBCMPR3j8APvBXW3V4GG7eKaPqSDlT3APyrfxAV6RxZ+mfpC3qqq0/U+pGPU/egf013Io4wiyp3rCi7/MqvCFOnKvgSERX7suw0f2MmJmZiJhdj7cJgkyb3GQ8ahd0kznZDs1JEkjAr4s5f+7kwFVUVVdUWYPJ/VM1/xTBSlRRV1ZhdMXZBWKXzVUuB52b+ZsOr5TdPBUWWXTL235Xf6pTFCdHc11sSXlq2Z2n+KtOYqVmta3o6ll9nT1A9VFX1OFQ19RJ+Og4l9N64KV29sXRf1fUAF86yeFCrsHSq6if6+gphvuVWd1MmSPvUWrY5yS4lc61PwkR84Sqy5sJuoW8bCqZiWm7KPH+YfLKt9Qg2p62V61CVlIn1rxEbwO1vuAl+UVKXKXHFksr+xz67lmxTw1JsHUdJSWmp6Nu8dubbStPZfQ2fWnqnJnTOTthx5FKf2tWylOgz0nu6nTOdfeuqWK746UfFl2xK/0bYcRx66FHOYu6jq2GdprtYG8ccfNUf1C0F1c2xmYUw1UOTr9p6RV1943oXSTviLNntH7Rv0tJmNaK5sFTqjyPXe5Goq5X/oYm9KzF2grO41CulDCv6ehxHqfb5bNZkDV3F4uQ2jes/LBbaKnFBVeuY62BzY17HPGMqLLUSo68uH+9f8hNj1vUh5lv8MujFaObCSrXX3AqfVbC7qoqE7c5Q7qsraaUfizCXjykHff3aLiNvpW41T/qsbCnpVpVitqgoU2G5gGX7Zi0hFwEmNxM1Qfu7NRvjmltVNG8lTpuxUZiqHsev1H+JiJhNU/KrGopKWCANjUVNTCt3RgZhmhPyGMr9zNdX2Ur0lcyHmDqHi+m3F6aikoVpS79grGbkN+oSicqCMRXfhM2710FYijA92oIomxq2Db9Ul4j42u+NlQhzwTUMchSWdiiOMkVOfH29LhHxS+8xwqR8dy7s0Lqlk98dKL7GnvXbGaqYmxfdjkOkE5ai69BD3YahxXXRQ3SJyDQnS19WVuDdXHn0Z0hvd4jUN+uq5Qf68mlTYiI1BrWH1XNhxVg9YbcP9jRcVTYpuiSF1qkwlVLvrbyB3vvavqfydbi6U6tP/k6vR1h7zrAqelyM+Urd+kwRN2EGYzNhqdrVN84f7WswVi9JKcujs5QUkdJP+IIoT/VVDbmVn5vkel+dsBqG6TirOxUhWB9H6MfTNJnrtw7GphGWTxJWjQ/2VYlFLC8oT4t+eXLLSfNneCSh9OTsKqPdCmuXF5YGwvpYeyxNlrs/9hVDhNXD3EbOY3vWSu3C2nWbVruL8My+6M8C7Bm7E3ss3rcSL3qylpwF2NOjKxEbC5ESYv3Ga5+S6dgyVVi4eTbWbsMK8GSWlDi5Pt9T5HxFMwgzZ6u0cn/t9d0KP9Dq7GSWDLs69Uh5V6SFtmJ4dJaSVmveG+ZHj9/1y8M+6/RjMr6kp8iE1gJqK+R9sVXp+6h94yqirmnzJ3khVvZcw0/nRT893y+8X0I32Hp9T2PWuM4Pfg0xI89Ssjsy3L6L2unHH8+F+U3aF+EjxJd9z3Qt6YPyXcrGzdIri+94xNuUBS51+iQEyaUa1h3zMia9RWO6vUMSMxP7PuyF7s6GfFbDXqisMh37QthLPV0Y9pVO/31sRj7fD7t48BthHwayWEuGG+JYRRhdLThJSXrrmQqjpjUXdiuIh7MkyPxiFLKEEQZCYSAUBjJe7vQvXsUXwQgDoTAQCgOhMBAKAzkV9r5Zcz9iRtiSuTgKA+GlAltGCYwwEAoDoTAQCgOhMBAKA6EwkLWwxf808e0wwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQCgMhMJAKAyEwkAoDITCQNbC7AdfxRexFqY/+Cq+CKYkCIWBUNiWsS5R2JJ5EacwEAoDORX2vu5iP2JGGAiFgQzC3peCGIwwEAoDoTCQmTCWsQ2MMJClMIbZnKkwylpzkpJU18MaBrISxtBasI0wWhuZC6OpJaxhHu1uJ2/OUljHWXKNwpiOW3YRRnW/9TYbtQUWwmhpBYv+mmnUTITp8huyjbDXutoOfJ+SdDbAC+o2zBRcKPqvMqdnwz3don6VroYbdlxPsq1wjEFiYt36uxdmIqKaj9Fy80JURGxibLEf9l5Rddj5xrYpGR57o68oS0wGY/u2QlNWvkmdhntm+whLT3xzPor0Q9/XMAtHvEyazu72m9SrN0FSQr5RmdZ7IqezpIm0qlWOfJW3Wo7KvwsRpv6o96iqaBz7tT4sVf7Wvb7Bm5amQNbxNS/62mLsDaIGWj0SMTPb9GFlYSTt9jXV37UGKk3DlcV3S8J3dWQxIzNni+9yZJGsIUAfTOzwa4zZWYS1R7VOFdXbg1FX9JMtLYuj+MRpp19C7D2bPLHJD4vDs8Y1PZ6OcCn5/LofAyy1Cirymyn58JmyDk5LgNWE7LcrhpQsfYdvWh9fwXyd9kM1MbNPeOJ/3YGtT1MRMTXR5K/dfR41OEqAaSr6aT8s0tewtDq3VveC+kcGWizV2sVar2xMyfIUVW2+WnvxONyiOQ5TRczss10atbWT1ujUaOxpyurSr9Tr/FlT8hNrWB9hiXqsL/rq/hqPIfiq4VWX3tKvvcelUYvCuOzWRxpzvrqEzB3FMM396k/QJopyRh+wzzKmLSbUZWMZ58fsMxj71Z8jnajksHbny3PKIyqZ32DQ9iUXsJSNo7ChDxMR01LFciOWWjIxNRUTFUuP/ciw/ha1cXAVLJdtldKyfsbj+ggTEZPsOSZky9bSpH1vmGmLrt5XyS772LDbKjJGmJipiaaoSl/FtH3kCNP8BtM3hlmrzmOE5aQ0kTT3XfpPZ8xKO2al9Qp/gfx78mr128LMv+5phKWnZQGns2Q5aSvrIStD++r+Ul9D0KWTeMgtaw2YgSElRSQ1Y0ddU1l1kpKy5WVJTLl/bmp3r7VIYZ4Ulda+TzJyHh96HHrU3iK5Lh/ts0jqz3ordTr9NtQvF2D5Z2afz+fzGa4NE1lHmHz0SCfzhV9yeyGmUkMsPb58jTehizCvq/mqSyIwJU1NTOUwTb2YxE7MZWWdKEut/GMD/GPo+M0ywGoHZmaf+VgWESaSNOfGIm0fBl/JZB9h94wuEWkvbRVgGasVbM5cmJhoC8ty0Vj2ZaKtGbt/hPk/Ygswr6v6MsnZ2G+CORYRpmJqZh9x7UXJy/qU+BPv7XZouLMzVn0tjC1GqCKqearMzyoXyLZZ0s2UtwytiG8bu4x0FmqArUJsGRIqWluL1v9e6yz+ub35qGJCjsZquZ9cC1xZ1LA06I9WY/41lGlTpPYc8bg7JaYO911CSttLdvXrM15R0VgK6w4pLZ2WmbIVMb8SuJesQqxgYwlz/f1009CzESa9s1y3tM2Pzteta37sKVzlFylDMjmZHjNbYZbfuTW/GpeqaszH+zJ0YeL/vB/Xf50o246221XTcITFLzco9WsmXYVrHU2sRJgsltyTU60ezRW/rcXV/Spx/YW4H96IcWWUv5QXWje+2ibDjtMaVq6pUD1ErF3SI9IutfDXXJSW7Z+y7i5j22WtV3Ut05a9MHfSQ0UP8R1MfhHne0Y/5e+0mHphaf+gtvbzvZwJ0x3X6e9yeZiuu7PQtP7zqNrjevmchSkSbLeVM+M8wtwvEjFVUx3/ljfX1TYQpL1WJyxfsnSFyz1Bff/DXwt0nb9sFG9tyoxVJsarLxD4TWUV7o75ihasY5zSL0cXIYQQQgghhBDyO/wP78pZb1RZxAMAAAAASUVORK5CYII="
+         id="image294" /></mask><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath302"><path
+         d="m 92,72 296,0 0,78 -296,0 0,-78 z"
+         id="path304"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><linearGradient
+       x1="0"
+       y1="152.49899"
+       x2="0"
+       y2="247.62601"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.34412,0,0,-0.34412,18.26468,828.79413)"
+       spreadMethod="pad"
+       id="linearGradient308"><stop
+         style="stop-opacity:1;stop-color:#c1d72f"
+         offset="0"
+         id="stop310" /><stop
+         style="stop-opacity:1;stop-color:#bcd631"
+         offset="0.1394"
+         id="stop312" /><stop
+         style="stop-opacity:1;stop-color:#afd136"
+         offset="0.5859"
+         id="stop314" /><stop
+         style="stop-opacity:1;stop-color:#abd037"
+         offset="1"
+         id="stop316" /></linearGradient><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath324"><path
+         d="m 108.776,86.682404 37.62399,0 0,44.046596 -37.62399,0 0,-44.046596 z"
+         id="path326"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath332"><path
+         d="m 108.776,86.682404 37.62399,0 0,44.046596 -37.62399,0 0,-44.046596 z"
+         id="path334"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath340"><path
+         d="m 109,86.682404 37.39999,0 0,44.046596 -37.39999,0 0,-44.046596 z"
+         id="path342"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask352"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQIAAAEpCAAAAABdT3N5AAAAAXNCSVQI5gpbmQAACOtJREFUeJzt2dGW2kqvBOAqSSbv/7jYLdW5aDMZMJBcnD8bGFXWSoaJM3F/qNXdBuh0Op1Op9PpdDqd3+HD7xMECRD6p3f0/5avoQmSoEfDeEBAoxnNSRIQIAhvwMFvX3B/JSizMgv37z4e/Ci6m3uYGXdG7T/vlcPL7wTmuwcAyjEGJIH3bv8RgXtELBFuBkiSaq+G2/zHKDy8IkgQtN1AyvW8oorSPYMjAUkwYomIxd1JSCqI9xH/67LQcSrPScBpQAAJGDmqqlSHyw8EZnTaEhEeTkoolVQlvWQZ8PBirwKn0XaGgNkyRo4cOtzvgYDm7n4KdzdiH32pqnBpiq+bCwEImpkZzcwIC/MaY7VNx6Z4JPCIiFOYGSRVVZaqVI96wSvl0g4JzsGbu7mR7otyNaqGbpe1e1WwLKfFjVJWZWVWqapmBbw2waUMvqrA3KPczc0Ip2oc1/VjL/BYTr9OBtXIzMyRcya8D8FcEuckCC9XnehLkKjhNif0t8TNT6B7xLIElZXbRJgCbwCwZ18RzGhWoZKbg27LiAhn3gzDr19Z/Dotp8VZmdu2ZtasgXfYF31l3xwAnEumRJJUZpVE6nqvfEXA8DidlnBD5djWNauySpqbwzcRuBjsEaC5zc+cO8QbguuJ4O5LhFOVYxvbNteCecZ4GwBA8zAjkpCrjARYEkNg5fVu6oqA7rGEEZVjbNu6SRPg5TcEt9l3sqIgMyMBBUEXMUZeXXtTBbEs4VRt29i2bft6+98LAMB+16SsaICgcqMtrrM9qwLzCDfVWMc2tm2849i/MsuA2g/NksKdqnhGADMjVJWzeb61wB4BlFSVpINmw41X572bfQGNKOUk+AgBQuAUsALdw92uLrmeCCS5nwuq6v0BgNkSaxZBiebhTycCjYBqbor18GnbO0UUoEomXICFuz2pAgCEKjOzsj5CYK6PRSaQJVqE81kvwHxElJk1HxB8RAQVCWQK5m43E+G6Joj9Kcl7bYj/JvP5570WZ3eunZvijwLYn/5U5jgYHAgk7YfjDzKYBz1VVs6z0vfcEgj6/XjgozIX+8y8rYLrdqgJVvNw+EkKEqT7EyFur5wA73U4/nNEzXbwFxNhcun9jsd/yD4s3dnwHVcEfN74Aeyfgdyb3HcWxcvV/+C2/nHub3aOK8JHlsC3HAZ32w4vBh+ooK/fnm2QL8/IPmo9/MqDhe5uO/xIgIe5Q/DT8oMIHtX2zyF4OLt/DMHj/vZjCB7npxA8WeR+CsGTNEETNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgCNAGaAE2AJkAToAnQBGgC/BwCPv6rn0LwJD+G4HEZ/BiCx/k5BHxUB/cInrSOT8w1AQmQP8zgtgpmuTwsmrcOefftteNV88rPQ5hvLng7NDtedefrj879KvjE8fPvJsIsk/nrwxh4+eMwrNsqwG+Hjwq/2tyhy8XtpTSzeZn+0d39i+wCZu5Fu0aImytBkkZC4CchTABz87rdB8TxSpJm9VFVQII0mplH2U0VHDbI+0ywD9sYXKaB22FkxzPCPhM+rCFyvrfmboY/VQFo9nGbg/m+mrmH31bBbTskvdw9EkD9u1v832afA+5ud9a6KwKCNLmmgMhP6IkEaDT3CDez45huqmAncAcgUeC7G/DSBv6uCi4GUQNSEe9vcBHwSxUA0lMCgAaUOyQr6s0BcNkXmnnsVUDougyOBIQ8QnOb/AkG+77w0gv0tApUmUmYayEJaAbv2RUJAHOXF7Esp2VxQ42Rul7qrqsgx7aY0YnZN0pVX2jvxcDZB8yMZnE6nU6nCGrklvmsCnLYFnCz+XhBVaRqr4N3OjZNAIJuZmbLcjr9OhmRqXXUs3aYtEGD7eunsioLBcym8C6N4eupx1wLzE+n069fJ6iqchvPqwDczEV3AFAxCciktzKYG+B51DH3sFiW0+l0qqzatnVUPV4RlMJmHnCCkIpMaO8e3wxe9vDwe2jzdExzDw+fE2FIuZ3/NBGEESOqnOYLZDlIllRzZXiLItgngu3PByLClyXcicqxrc8nAqQamxkUEB2IEWNEqqQS3sWAl/OumcUkCGjL9byez+tWT3eHKuQwSGWkmWWMGCNVqpoAb2CwL4duNLeI8MXcWRvW8/m8ruPpRFAROSBVRbhZZHq6p6pKl0dpL46wrwaX5TAiIoxAqtbzeV3XrKe9QJgHpFSBEfT09MiqqvreC16U4dtnBaT5pRUEqzJzW9fzed0ynxOICVVuggfcVZkxsqrydy940fHPEPtn43RzN1t8icC2aazbup7X81bPT4qCoEozmofoMvO0rEov/T5hvSzCZUcAkubm5uERoUSOdV3Xdd22wz86nBQlFTA2I2oBIJUAA+/0wpeh4M2r+aQIKihzs1rX87qu27idAwDuEEBCITdCGQYSEgT+3hi+zMDvZf8EHQSFQpEEa1u3ddvG3xJAQOWAagtzGr+a7Pf/5dvF/3UOe9X5jb13CUKOsY1t5KETArg3EQCRicoxn7YZ7fJhJI+HhBfcK+8CkoQqqapG5sicTf3B9bffmh870PenTUaz/UP3t4lKVVVZNceeVV8PgK7zaFAECAsPD3dz83czqDnwkZmj9h1+p9PpdDqdTqfT6fw5/wcXwecwahJbmwAAAABJRU5ErkJggg=="
+         id="image354" /></mask><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath362"><path
+         d="m 92,72 296,0 0,78 -296,0 0,-78 z"
+         id="path364"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><linearGradient
+       x1="0"
+       y1="159.714"
+       x2="0"
+       y2="200"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.34412,0,0,-0.34412,18.26468,828.79413)"
+       spreadMethod="pad"
+       id="linearGradient368"><stop
+         style="stop-opacity:1;stop-color:#ffffff"
+         offset="0"
+         id="stop370" /><stop
+         style="stop-opacity:1;stop-color:#f8fbf3"
+         offset="0.3788"
+         id="stop372" /><stop
+         style="stop-opacity:1;stop-color:#f2f7e8"
+         offset="1"
+         id="stop374" /></linearGradient><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath382"><path
+         d="m 106.577,107.858 43.276,0 0,26.758 -43.276,0 0,-26.758 z"
+         id="path384"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath390"><path
+         d="m 106.577,107.858 43.276,0 0,26.758 -43.276,0 0,-26.758 z"
+         id="path392"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath398"><path
+         d="m 106.577,107.858 43.276,0 0,26.758 -43.276,0 0,-26.758 z"
+         id="path400"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath406"><path
+         d="M 1.21951,0 390.78,0 l 0,242 -389.56049,0 0,-242 z"
+         id="path408"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask414"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYwAAAD2CAAAAADgnO+FAAAAAXNCSVQI5gpbmQAAF9FJREFUeJztnOli27gOhQGQct//cccigPsDCylZdhyn7XVlnkwSZ5E64SeshAQwNTU1NTU1NTX1uvAfOON7Sn//KX/T0uHhyzNL77z+iX68dDie5kNAhPTo0w/0o+XD4f3nZ/v3pONnHb/zml5evg0I7J8/SWrvOn7xEx4vLh8OMHDrpT4FSF94TST6Mx6vLB12GAkF80yfBAN8/Y2Adh6v4fj+0oUpICACAG65vHTKf1HJQoOHdh4vmsc3V64bBSaPeLnxUicmskmebP39o2p+/ZJ5fG/RfMkRjQMCYrzv7ePs0tE72YfhHcJgvqXvLF2i8A9IgIjJY4jq5yaSSexgEKqg0j9lKPkWjudXbUARJMhZEO581blpbMJFx6Cq/cUQSZ7X04uGIwpERAJyGuQ2MtI4P4wNC1FVFechieObxlGf+7UeqgcOBiOQjJEDTkxj66RUFURVVEBUVFQR0LGAIgAoPk3juTVLs0BbfSAkIiS0D4YnI8d5QYTCBRkNNQwiOr55CIns6hk9tW5jyHYISAWJ8gukHjl2/aqzKWuIiBaiqiKiIv6xY4HBWz2hJ9yUuR97d4sgokJYyHHceio4L40eviNauFmwiLAKqzAJ9hIQn3ZVXy9Z1hOE6CCISiGi4kycBm0y3HMro3e6KBERYRaRDiV91ZOu6kvLCBeFiIRuDqUUouJEDMc2apydRmdhNFgNAQsLF2YhYRREkSLwvHF8BSPKCjMLJ1GolPhcMnBkfnv6EB5h2RNZ1rAKZmZmKsyCIoyIQgIoiopP0PgCRmdhZuEQSimlJoyyiRrnT6iyug4vZS7KUXBjpsLEjIwICqqk8pRtPIQRoRsRC1IhSg7VYJh1eBDfwDgxjd55ivBtKISZuTUu3JgJkRgZQVBUgFTxaxqPYCQLz58CRa3+wWl4TgWEQNlfPyuOYc+ihwyPF8ytNm6tNG5IjIgMKCDkgeMrGo8tI1lYsKil1FrqUmqticMtIxtVudt0UummzFDNkGE+qrW6ttKImFuUZwrP0XgAI5sfhIUKmXNaaq21LkZksAxjQefvTm22McxPibKHjMattVbaWgpxQyRERgQBUHmCxn0YnYWlsbWUupSlLrUakVpqqWSW8TmGMWx0W1tKRTRCRmu1tdbWshZqhLQCIiMAmKv6isZdGBsWHirqkm9GwywDS+9PnT9+j9veltuKiDILc6scLFYiwgaIgAwAz9G4B2PPotZalmWpy1IvSaMbxjaXOjMJk+7zKSsyWivVWJQ1vYUf8gSNOzAOWNRlWZalXjqNHjLGku/DYGxMo1ReS7CwSxQSh9GAFywDRha11rLUy7IsF/u01LqUTKYilfJ/9+R+apz/8M0MsHYIc21c2lo7C0Bc88io/O7iOIaRPVqkHi0uy3JZLsuyXOqy1GowiIq10AEJPsUuoJuGqYiysjDXVkpp3rajTRcbAEAAHzmqQxjRC8cM3cuyLJfLclmWi/spy3RpqDE+ZQv8Zt9VBUSKFGFm99wrIVEMb+RhSELygMYRDGdB3gExFpflcnEcHjGCRbEKYzsecmIc42it9t4tK5egsQ45DQ4HCSo+CBv3Azhh8YBRksXlclku9RIVH40BIy3yc2BsaBQmKcxM3jkdUUT7BJTkQdg4gJGZFFoPxOLF5fLLWFzqYjDIy73jpPa0MDT/sqg3REGFhITF+nSMBZGSxDBbBYwPwsYtjAwYSESlelJ7ufy6XH5dlstyWaLeGypv+IQ8apR6zeDJqiKIMgkTEVLL8b50Um5BSMD3HdWdbArIgncttZiD+hWWsdTFfFQhImvVDj7Kjj691Ds+CoqKoL57xMRE1AgRiDoHjTESC+J3HdUNjJtyzxIpA7JclmWpS402CIx28TlmAYAewREQQBUVRBUVBRk3NgHZaq+Qw1QWxm91nE2ZkVEvvMM0nIW1QYa6+9x7GIdCBUBzVwiqBCoKiCiZ5pt0yLhUVd1RHZnGHkYahu8cLYNhLFZ8L57UWqn3ERuthzJv4CEDVaEIKuLOMmxGRHyoilTdUR3F8Hr7D7iPotjXs6r7slwu1p2y4B0zCDckPgWKLyUCoKIqoiqpBoV0E2pNdhWRsA1EOA4at5YBPidFETAssTWzWJbFGHl5sc1nP4UDAMRSx0tUAFRVjYk/DysqsUcuIsJEgoj3ZkUOU1u0CTXvSl2GttSylFKHeHHQAPkUIgoQGVWQQVQhIYD8joj2kQWRolIihh9EjS0Mv9aHHSU3jOVyuSzWNq+lkCdSexSfwgEAOgeL4mYdiqQo0b72xlXOjpRSpJgv08OE6ii1zZBRa631UpdludS61LosvSOVe6xw9nsAHsiBDDgAgKQAAICqVoPBFxFZhhh+xzQ2MMIwENFgLLUu9WKOqi5RX9hgTrL4sJR2L9zgAEChuIVDIfKohRdmFi4yRI0b0yib81pHyh1UXS7L5Ze9ZVZbPKuFaL3EQOcHK27BhshGc0E0NqDypo1+j9mBbrIpW10bCCk2fbDYe24nEdLYof1sEgAwWgdaxwMLqJa4dWMRZrONUoRtz8nCzRbKaBlW8EUXJAK3NQiThs2cY1wDn24VIezrgdpLL7cD8VF1e4ttqZuV28FA8mbtUrPy/nWxNkit1bdZbYpzmsVGOCyJtZ9sxztu4WCPH176+UGbU5TxbAi+h1GWWuuyXJZfRmOJvNZ3kwCnWdzq4OK0+BADJHaPmXr/9tY0buoMpGG7tdoHDxalEGH4qGkWt/KdCoumZFFDpHLlWuvSastcVBXwq6LP15gyctQc5Owosgc2WdwIkwYJkioVEanMXGqrtVZupTAVgcMQTttzAbhpRJfQNru9Tes3xcRv/rU/8R8S+iLGnXe931pSfjcL4N7Nd8vAOBzHuzHGW2IKjXsXk8UjoSIigVIRKpXNRZU+N0BHfopuTzPc0po4iIjyYSH2a3/jT/oHFaZhmSnGTcF52x3ZUyUOkx/aniiNq6OgAWj8+iRxX0P72qadRidjqZFPuO3maW43l9LTUbinsAsE7M9AmDgeyWM4AgLufMw43+S/2pWWgTFa0PuEPVqY5xq6tJPFfeXVitAjsL2VUkou9Hb2E+Awm0Ib2oxTFLOrm6GHqXuKXpH3M5BKsiCPIeZk9gfS5iQ5etVZmFEVHHqR0zCeEaZ1RIZrT/ko4YDgpnLeWQYigt9aELck5ZNaCI9oTt1qNI184kqheN7KGDQ2C0rDGawKIfNUxRPcsh2nhWkY31FvL8VDiMpmIHYrGg/0wxNoQKS4/2LqOWGU4YDmp+zJUMVpUFTPOyABI+OBPSdkfNJa2pRvPE0oz8r2h/xxRO5nELuj2Wtb9MWYASXN8TGEk8I3FAnumBHlNQ7HPGh/OPQ6fuugZrX3DfXxAABMV0PeC+m50LGbslNkLRE3aESLZfNv/IU/5izadHA9EMcoJtzEjdtGoYeNuIeZEIYH3k09qfG5HXGF+6pS3HP3sOgDSI/ktUqkYB90S9LvlZd3OEBIjwM36dSuAvfjIY9zJ4U9ZEwkT8sXzryLU8inJjzKpjBn0jJyYG5gTAQvy69he8pjdkKOHc3B5hJkRkaZR4W3mnpWPrURPYvR20AGjYdd2x5vYFOyz6z2Z/Jmej5i5TnLyP5TnzqYxd4PFAVa7zTh1tEcBfBhOnFMnW5ATDDfVF/MHE+O2vt2LW82l/zFsME6WNbU9xSrn1/hsKq3v35Q9I21/Mhg0nhZ3Te55zleyyMYMFbrxwynvhT2izrDQ5RsQWSXGB3CyN+YGH6D0HPaO6Pij3pTOLzAm29OfU+4/bxD8TiAw8husLKpn2nj7O+PEhwHcNx9noHjdwi/cv13YsbOvKZ+g75uY9wN4F8dOPWkeovKv9q9GPQQxtTPNWa2m28/HtWZ+sOKdtTdADxh/DXhndddE8bf1BdBeML4s/pWDjRhvJEmjDfShPG39f0KfOr/oQnjL+vldsjU39WE8UaaMN5IE8YbacJ4I00Yb6QJ4400YbyRJow30oTxRpow3kgTxhtpwngjTRhvpAnjjTRhvJEmjDfShPFGmjDeSBPGG2nCeCNNGG+kCeONNGG8kSaMN9KE8UaaMN5IE8YbacJ4I00Yb6QJ4400YbyRJow30oTxRpow3kgTxhtpwngjTRhvpAnjjTRhvJEmjDfShPFGmjDeSBPGX5Y++NmE8UaaMP62HpjGhPFGmjD+rB6FiBtNGG+kCeOvSb+0kwnj7ylQqOoxlQnjD0vjw/YFwAGQCeNPSwH01j8d2sZDGAcnmXpZaRp3dQRDk5s+eZapZ/TlOu5g6P6L+w5u6nn5SjqNu2t5Yxk90g9mMfWihgRq/N63s6nxmEnkRwqL2Ke0+2U9hKG9Phlc1dQrsgCs6t4pvugrOwA6DuBpF3rjtqaelA5+vptGxI7xIs+FveumRuuY6dSL6u7Fr+xwVXoYNmhzmP+OgiZGP3iieE3GIZdQTXcubcpj+lHjd0ajOK4lpx6o57OQV7TatW5ruVnOvZsKU+pHB8evm45Th7JrXBVURdV9zmFidBAz4kjVjYH98f/pEypSKFBVlaQxBvNRCSONQeNdRWE0kanvaEymPFaIDkEDDlaVNsfHge6pjGagnCX5dxUOXsGNQiSv9ada6P1IFRUQFXd0s1/4gjRswi9rFYMy+KFBWxi26AoCRlFlkxVPEt9Uz2YFxFZTU7e/TuORUVgoiGi3LIlkbNJ4Wj10gxmA+RqRXQjf6MYyAl0eFxlAHjmJPKu8uM1RsQNRFdHhx/n7+/0MW3fxoMFiJhLVOEwUzym8ugKAmoMyCOyvwtds1FNb0PgVURUVtqPDQmTmU9+Sp1GqImCXdS5pRpL9Mb03lYmtJEo2LOGper9x6rGy0wcqCr6gLCoaV7j2XnoXbc/hmZSKsoiIsH2InoiO/9bUA0Ubw3y+sAhrrOe9ZGpX9CmAgogYQxE7hcbxCjpN4wkNhmHLJwaCufM4SKaOArhGqDCzYDMuGYLG5PGVwpG4l7LFNBZe9UnsUAxH7VPbRMEiwszMwsyiYoF9msYT6m0lcS9lKGwpZeephtXsMOKnZkFBQkRY1LzVkItNHg8VW0rhoXw1WYR9KaMW3GhIbSF7vUYyTUNYlMcyfqJ4pKFPCyrKwo7Cr24Oy7g58iabGmL3cAYjIjNqPKWIGBF6BxodxW3I2MHwvnnEfmbmFji8qN9luVN7dcMQMwxhbrGOzOzp1UHI2DQKdfRTjqJxa9289KCGn9rIL1XzUenqcx3NOPyqv98ojFaiqKhY5G/MjZtB9ZxsmsZjaUZvX0ixhWxhHd7WOLys6/ZU4adUmLnV1morzK0wEzEiogoBAIIiKP6tv/Df0RC8tadRZhfNLmsZ4vfONurmTNj9lDC31lprdS2lFCajAaQAQQMmjq2iMe5xNwJv45VbS38/eqkNjTK8RsR4R0IiKpRCQhMgIABCf58KdRZWYgjzyut6Xdfrer1er+u1rW4eKgd+/gYGIBEiISEaDeOCGDgAAQGTxMQRigtdJVpSzK21dV3X63pdr9f1uraVG8eexs1MwgYG2DL7uhMhEiFhIeODiGA/R53GsVMOCdgUhwozy8rGov23Xtfruq6ttSw18qjUCCN9FCKYaWDYBREhAZqL2hvGxDGgUNu/8IS2tXW9XteBRePmbdvbYZ0tjJ1pDG+ACAQRU0YIE8cwxBQb3laYNV7bdTUHdV3Xta2r51PHA54bGIBpG0AbFkjkP3Fi/vv94+fyGPzNwCLsYr1eBxrdMI7KtBsYMJiGxwwk/36kW05DYeLYobCIYSy48bqu63o1OY1uGLc8djAiQCNC5riIiASIlE7M/nkcEWw/fYg2TdMcULPyovHaOov/1ut1NSfFosfhew8jTcPtgKK6yCLDPRSmp+qVXwdxfiS6fxX3F6mYYQwsVkPRLHo/MIwbGIZiyKiSQo/au7XW4TvnxzCq77X5bS22xcosycKd1LpeLWLw0LH9wk1BLvrgrbzQM3PZ/XY/3/iT8yPRzesYu/FtPY5iL6PF9bqu65p2cccwbmFYdI7gYLEbB7c0AFBrUPX/t/ND2Mk73T12W0OqtcbdKOy/tjZLa2Oa/It2CAB4NEgaOGRY9mMFwMiSEVQB++1N6k3ED9D4J6uKW4U1zNfmhXcq7MJ2lu7cnXEEI3FgWkl88v8LBVA0U8OwURiRnPxGJ98z7RtAoGYVLBa7N+HCaUTAkJgieMJNZYSm+Cq6tAbDVzx2mdL95W2Dm47+qahs/ya3CB/h9A05YW6rF3sG47/rf9d1bW317eu4UeZwYerNdxQBFFBIBZHdRnD451VUSxURKkQkBNlCVI8nQ9FxJhqwqyzA/UHcCRPbeq2tLbrm1/+u17WtHjC0O6mjhbmFAaCAqiCAgsiIuKZZ5OhIkSpShAohoRBQJlzdiPBkIABgpOG9KFAQuzGJvdprra1rsxbI9T9Laz14Cx/NIaQOYCgqoAFHRM5woXErk7BUkSpCRWy/AyUaiH3v6cxS6DFSo2fu+3qttbVdoyl1va7rtbXcb41bMw51aBno1iEA0INF39e1WFVL4dh9sobJx8HIblRnwasZhvupdV2vbW3ppfS+kzqGYSiEhByHf1NB7ZYPXqRy5VKpEBWMTVmgTY1+SiJRIUQqNYweSG5h+O7eul6va+ss5GHAgDswzFEpyOabMahwkUW4LsyFqRQqhAX7RqB7tZPucuTWqrspGVmITYCsfO00mu8oRVr7cMrpjmWgAgqNNLTPPCzMdeHKpZVSChEZjtwKHHicTllzb1uDKjFotra2trWt17Vd17Y2ZxHDUg8Hzo5h2FiUBXH7OrdNhIUXXrjWUmspxUdI+vTIpkQ8pXqF62mUDk6KjcXarm01FFZ5+xDgAyd1FwZ420kojCNakiKy8MJLq5XNMspoGjbi9hEwgkWfkGoZMxyERwtmfYbFXRiR33YaoNX6w85iaaXUUqiUgmTDPEgZw0/qp7ZeKljYdHOMDjoNjmDBzKLPsHhkGRsaw2CWMC9t4VaL0yCj4ZX4UPydDUfOENiaRvRW1hwdbK618dqna4cC41ElfBfGhkYWGSpShJkrW8QolfZRY2hlnYxF0vBenNHoESOjhm/qxd0UncUX7aH7MDoNBBwy6iLC3GpttZiIqJDt0FJMJZ4QRGoIGTZqzjG171HDDKTfqjQ8mOhxh+gBjKRhrsruo+VShCtXbhEwSolpXCAEGjc/zoZE87MqgKj3B8e7k2yUNm+j8Fu3n2PxEMZAAxUQVElJRYoULqVwoUKeTRU0GDmLCwBnQwGQGwT2Fs3a7BGmWr+zVdkeNfVVvAD4cr18fJDA5zyJyOyBLKstVHxYfRhTjwmS3/HXv528HxIF31BmZOAQjrBtTzcIq/iyi/3QMsw2AFUwAocUFRJhMiRGomyahXiT2P77WHT7MmHkDal+w5j7K+kOKh4Q9cz9d1+uU9+DzTHoQOD+qRAWHJKpPYt/HwXAiMOLbx/N8bvF4v694BJG4S4KnroX8uuVGkapCNFn0tENwkDkRO6OxTkwjMqxDt2bRjz6RtienxNPFQwSz+y0PbNeo3H4oluZR1g209HDsNs5YQwN9B0NjWCdgSIeEglxR+rXemq9onTwYWi/W6AgbYyiVxnnTGxhyG39atcI4vHoHO1vqlHnPX279nPrFRsVMQwNNNy9AYRWYORG+LktY9hxtVoDNgyMTYzPPO2iAJ5fr24caSBAeVNNn8cdN5fOR6MPE6RpZO2n8QF2KJ6fkHl6uRA2OIAQouYeZ6PH/vnZUADcDOlk4NgrZ9y+M6z0jQUbcUDWFN0mxl3Xb57639HQEQkaYR9OQbLx8T2zgG+uWO/Idqc0khg3Xb977n9Dg2HszWN4h5dQfHfBho2jXH2P2fuZ3G+f+5/QphLX7KVHZRe28hKKFxYMYTSP0RxOvcW307DjNyDpRvEKipfWbVz07An25uA5k9qNdsNT2TzsL15B8eqqbWqJPlx71oz2RpniDi/G771CAl5ft3F0cAPns7RZex3eX9IPFvBm7OADHNSg7BnmV9vvvKAfrt2w/h9DYadelf8IBMDRnUvf1gGFs4PR29c/BQHwW2B8oA5g/A79kWv47IbxWwlMTU1NTU1NTU1NTU39Qf0PJHYKwNYeoV8AAAAASUVORK5CYII="
+         id="image416" /></mask><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath424"><path
+         d="m 92,72 296,0 0,78 -296,0 0,-78 z"
+         id="path426"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><radialGradient
+       fx="225.19299"
+       fy="226.13901"
+       cx="225.19299"
+       cy="226.13901"
+       r="30.829901"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.34412,0,0,-0.25809,18.26468,809.33948)"
+       spreadMethod="pad"
+       id="radialGradient430"><stop
+         style="stop-opacity:1;stop-color:#ffffff"
+         offset="0"
+         id="stop432" /><stop
+         style="stop-opacity:1;stop-color:#fdfefb"
+         offset="0.4828"
+         id="stop434" /><stop
+         style="stop-opacity:1;stop-color:#f8fbf3"
+         offset="0.7611"
+         id="stop436" /><stop
+         style="stop-opacity:1;stop-color:#f2f8e8"
+         offset="0.989"
+         id="stop438" /><stop
+         style="stop-opacity:1;stop-color:#f2f7e8"
+         offset="1"
+         id="stop440" /></radialGradient><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath452"><path
+         d="m 109.694,110.541 35.78799,0 0,11.93 -35.78799,0 0,-11.93 z"
+         id="path454"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath460"><path
+         d="m 109.694,110.541 35.78799,0 0,11.93 -35.78799,0 0,-11.93 z"
+         id="path462"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath468"><path
+         d="m 110,110.541 35.48199,0 0,11.93 -35.48199,0 0,-11.93 z"
+         id="path470"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath480"><path
+         d="m 92,72 296,0 0,78 -296,0 0,-78 z"
+         id="path482"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask492"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPYAAACTCAAAAACYQLv9AAAAAXNCSVQI5gpbmQAAArtJREFUeJztnE1T4zAMhpUmkE45cOH//0IOu2nTNmmc7IXZHcmygR0wtfQ+N7sc/Iw+7JgZEwEAAAAAAAAAAAB8Cc1//lYBW+a3jFrl1pQTT7rVL00Z75Td7psWUpgtId7q00asPxlVExlORESNrqLO7uxoE61anmtJbspaD6yi3Vgp7AyKojVrrby7aMZWihMRNbTKqSi0idZXNbETtBN/YYGocGVtG23jjdi8pWXisFo7UlOMTaY4xbW7yw7tIMREbdvbtN/YBT7kI6vWMsu5tlnrKL6ZkSl4RHlt2zysEFE2voatBVz7p1ZRAB5SkeRFV1IWdj413MQELKR+tBlOtf3UNsNNJ+c4TXJoe8JPS8O+DW1fONVmLc3p97YfoO0Jp9p+TmkMp9GGtvEcd3phzECSe8KpNmrbE061/Xxv4wrRrTY6uSeg7QnUtieg7QkcTj0BbU9g3/YEtD2B2vYEtI3nOP7jiST3BZLcE9D2BGrbE0w7enHJEkyOJflqOcmZttNoc23D3mta23K4uRrfwAwXN9fm0Z5KLqQsXI1rz7lXnqtmm9mQa9/4j4aYb2woXtC67QsupSTcWh5OzRa3EBPaIhfMIKtXfoqciq2kKFJLvnx52R9KLaUg54uYiD48LwZPaqu0jh/4XNrHMmspyDjKmfia4WQu3GvcsJRD+OHZ1huv4fc5mlMMb42tM8sxSnH98d656b99LeU4Dspk/Cw7EZ06O7vYWT2JqGW8LY2Vdj4eF21a717rRDbyfBiCOp9o2tu0PdR/hR6GIXGBkL5F6l9q38fCa/KDMq0WrmtXc8CX46/0pUn2zvDx6VBrxMN5zN0UvXNV2j0farxM3cZBbeB/eVeq3fd9XbvZPE1XvX//40Ox7Pdd27b3n+8hhLBcP3Ix9pkUVk90d0Q+rwEAAAAAAAB3xB9MoXbb4wtccAAAAABJRU5ErkJggg=="
+         id="image494" /></mask><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath502"><path
+         d="m 115.673,116.302 3.413,0 0,3.413 -3.413,0 0,-3.413 z"
+         id="path504"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath510"><path
+         d="m 115.673,116.302 3.413,0 0,3.413 -3.413,0 0,-3.413 z"
+         id="path512"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath518"><path
+         d="m 115.673,116.302 3.327,0 0,3.413 -3.327,0 0,-3.413 z"
+         id="path520"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath526"><path
+         d="M 0,0 30,0 30,30 0,30 0,0 Z"
+         id="path528"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask534"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAAAAAByj52zAAAAAXNCSVQI5gpbmQAAAV5JREFUOI2lk9tugzAMhn/bCYemk8r7v2RZBymQxLsItBml06T5KsgfPv4G/m9UvvOHQo8JFmMIAGIISV8JFtu4mgFoGP1UMJkgqRrnWssAEO5+GKcllQSZ08e5rQ3nOuLix9vXtCICgIzrunNjmLKJVJXRuCYSAMZ1F1fxs2hiMaxrLQJwfemcKdsGsQiWXIoAxnXn6gcAgBjLHBUAg61r7R4AuHatAABD1jnsg5hT7p7JuNa8hgC4ds1K1PYgBLA5GMSHAEDMBOCNNyM52y8E/k7oG5eq5onFEI6ZtOSZahjv8RjwU8qE9w+1lBbvw5SQty9VufotxNx/Pgiylex70jBch4CVABkjtAPG/jZt+oAmZWEqmBTGa+9zA5mIChBtTArz0PdjeOoUmsKyRBBBVVOcx/5689uU1t9YbNu6mgnQxQ/lST2Ss9jGEgEap/LkysvmrAfVlN6t6ti+ATbgo2YOdFevAAAAAElFTkSuQmCC"
+         id="image536" /></mask><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath544"><path
+         d="m 92,72 296,0 0,78 -296,0 0,-78 z"
+         id="path546"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><radialGradient
+       fx="202.629"
+       fy="219.70399"
+       cx="202.629"
+       cy="219.70399"
+       r="2.9995"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.34412,0,0,-0.25809,18.26468,809.89307)"
+       spreadMethod="pad"
+       id="radialGradient550"><stop
+         style="stop-opacity:1;stop-color:#ffffff"
+         offset="0"
+         id="stop552" /><stop
+         style="stop-opacity:1;stop-color:#fafcf6"
+         offset="0.4235"
+         id="stop554" /><stop
+         style="stop-opacity:1;stop-color:#f2f7e8"
+         offset="1"
+         id="stop556" /></radialGradient><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath564"><path
+         d="m 122.516,116.302 3.414,0 0,3.413 -3.414,0 0,-3.413 z"
+         id="path566"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath572"><path
+         d="m 122.516,116.302 3.414,0 0,3.413 -3.414,0 0,-3.413 z"
+         id="path574"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath580"><path
+         d="m 122.516,116.302 3.414,0 0,3.413 -3.414,0 0,-3.413 z"
+         id="path582"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath588"><path
+         d="m -1e-6,1.97368 30.000001,0 0,26.05262 -30.000001,0 0,-26.05262 z"
+         id="path590"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask596"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAAAAACQU4bKAAAAAXNCSVQI5gpbmQAAAVxJREFUOI211F13gyAMBuA3ELFg17Pu///HrqvVyofZhVjRuZ1dbNxpnhOSAwH4y0Xb7+mHyA+MiCsNAEghrmTJFBvrDAEQ3/U+jnuMuLaNs0wAJPbdvR+ifGFUHU/OGs61Rd93H22YHT/Vy/lUc+4AVLE5MN1mpzOrXt5eLaslOSlmSnN9mSn3drZ63bbSWnwuT+c9TueGsVlKifdTOjWx+mj1VgHaHmsqGDtXbc8DAFXO8cKUafaSAdo2Rj0Z8YF3khWBaVOl1Z5aAt+Ev/D/YPJdXAomKaRd+AxMzN+HfTbcfcFC18UdJ7HrwsKQ+nYvnQxtnwAs941qo7cHIeF26ceSCYiLS5lVe2kDVtkkQWlVTJBIaC/XYdywMQpAhHmc46N9vz4S1gwyxhBHECAiY3y01/fbMKtynBUb65o8zvf1PJdVE7E55HF++NXrsG6OSBMBEEnbx+ZX6xODVKQl3IRyawAAAABJRU5ErkJggg=="
+         id="image598" /></mask><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath606"><path
+         d="m 92,72 296,0 0,78 -296,0 0,-78 z"
+         id="path608"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><radialGradient
+       fx="217.54401"
+       fy="219.70399"
+       cx="217.54401"
+       cy="219.70399"
+       r="2.9995"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.34412,0,0,-0.25809,18.26468,809.89307)"
+       spreadMethod="pad"
+       id="radialGradient612"><stop
+         style="stop-opacity:1;stop-color:#ffffff"
+         offset="0"
+         id="stop614" /><stop
+         style="stop-opacity:1;stop-color:#fafcf6"
+         offset="0.4235"
+         id="stop616" /><stop
+         style="stop-opacity:1;stop-color:#f2f7e8"
+         offset="1"
+         id="stop618" /></radialGradient><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath626"><path
+         d="m 129.35899,116.302 3.414,0 0,3.413 -3.414,0 0,-3.413 z"
+         id="path628"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath634"><path
+         d="m 129.35899,116.302 3.414,0 0,3.413 -3.414,0 0,-3.413 z"
+         id="path636"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath642"><path
+         d="m 129.35899,116.302 3.414,0 0,3.413 -3.414,0 0,-3.413 z"
+         id="path644"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath650"><path
+         d="m -1e-6,1.97368 30.000001,0 0,26.05262 -30.000001,0 0,-26.05262 z"
+         id="path652"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask658"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAAAAACQU4bKAAAAAXNCSVQI5gpbmQAAAW5JREFUOI2tk91S6zAMhFdS4qampfD+L0lbsJP4R+ciobGDOQwz6E6jz2t5JQN/GbRL11z1PxhJ1zEA5BiTfoOR9Ac7dAAQRzeFEtww6Qf7ZI0AQJrdhxtD+oKRDOeTPfRMAKA5TO79Pj4Eu0+t4fLy1DOvh5j7g2GMscZkuLyeet6aYWYmwK/3ynLanF9PpqAAEAvFUGFyfHkeagogpjRF3TAy54uVndMAKIdVjgGAjR1alAx27YQBUHe05isFkLHHjgo10xADSEyhBmJuUUVhwahNbZW9C9/EbzDV/Rqu8Sh8bmFuYo8CA9DkfWzJafR+2SUGgDS5uSWXZzctw1pGr9w3DNb5fnW5wECd6fbmafK3+1xsCBQQkZrT5G/Xei2hObNUI9M43t4+AioMmjKKqWma3e3tPege0xRiUhBUVdPs79erC4/nb9eQ9Adrj0KAJu/q/1x2vfw6AjTPU8ilk7UJJAwCFDm1h/xD/AOyCKkhSYyCUgAAAABJRU5ErkJggg=="
+         id="image660" /></mask><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath668"><path
+         d="m 92,72 296,0 0,78 -296,0 0,-78 z"
+         id="path670"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><radialGradient
+       fx="232.459"
+       fy="219.70399"
+       cx="232.459"
+       cy="219.70399"
+       r="2.9995"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.34412,0,0,-0.25809,18.26468,809.89307)"
+       spreadMethod="pad"
+       id="radialGradient674"><stop
+         style="stop-opacity:1;stop-color:#ffffff"
+         offset="0"
+         id="stop676" /><stop
+         style="stop-opacity:1;stop-color:#fafcf6"
+         offset="0.4235"
+         id="stop678" /><stop
+         style="stop-opacity:1;stop-color:#f2f7e8"
+         offset="1"
+         id="stop680" /></radialGradient><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath688"><path
+         d="m 136.203,116.302 3.413,0 0,3.413 -3.413,0 0,-3.413 z"
+         id="path690"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath696"><path
+         d="m 136.203,116.302 3.413,0 0,3.413 -3.413,0 0,-3.413 z"
+         id="path698"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath704"><path
+         d="m 136.203,116.302 3.413,0 0,3.413 -3.413,0 0,-3.413 z"
+         id="path706"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath712"><path
+         d="M 0,0 30,0 30,30 0,30 0,0 Z"
+         id="path714"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask720"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAAAAAByj52zAAAAAXNCSVQI5gpbmQAAAVlJREFUOI2l09tugzAMBuDfdsKh6aTy/i9Z1kFKc/AuApRRqk2a76J8shzHBv4ftDuWs0KPBYsxBAApxqyvgsU2rmYAGkc/LWYVJFXjXGsZAOLdD+MU8laQOX2c29pwqSMFP96+pgxAFuC67twYphIiVWU0ZV2Fcd3FVfysilgMa8w6C64vnTM/3kUsghDyLIzrztWuNSBGeCRlAGDrWrsHANeuFTAAyNyHfRJzai1zeUhrXlMAXLtmFrU9SDFfcKnpEADETG+uVgL8IvB3oW9uVbV0LMV4bHIoPdU43tMx8FMuwvsyLbtI92HK8+9Ltf36JcWj/1wF2Ur2z9I4XIe4TBDIGKEdGPvbtMwHNCsL08bkOF57n/AUSQGixeT4GPp+jM85heYYQgIRVDWnx9hfbz4qthvFYtvW1UyABj+sK7WtjsU2lgjQNK0rt9tsZiYAqjm/+6qD+AZNTaNmvElwKgAAAABJRU5ErkJggg=="
+         id="image722" /></mask><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath730"><path
+         d="m 92,72 296,0 0,78 -296,0 0,-78 z"
+         id="path732"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><radialGradient
+       fx="247.37399"
+       fy="219.70399"
+       cx="247.37399"
+       cy="219.70399"
+       r="2.9995"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.34412,0,0,-0.25809,18.26468,809.89307)"
+       spreadMethod="pad"
+       id="radialGradient736"><stop
+         style="stop-opacity:1;stop-color:#ffffff"
+         offset="0"
+         id="stop738" /><stop
+         style="stop-opacity:1;stop-color:#fafcf6"
+         offset="0.4235"
+         id="stop740" /><stop
+         style="stop-opacity:1;stop-color:#f2f7e8"
+         offset="1"
+         id="stop742" /></radialGradient><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath750"><path
+         d="m 115.673,122.572 3.413,0 0,3.414 -3.413,0 0,-3.414 z"
+         id="path752"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath758"><path
+         d="m 115.673,122.572 3.413,0 0,3.414 -3.413,0 0,-3.414 z"
+         id="path760"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath766"><path
+         d="m 115.673,122.572 3.327,0 0,3.414 -3.327,0 0,-3.414 z"
+         id="path768"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath774"><path
+         d="M 0,0 30,0 30,30 0,30 0,0 Z"
+         id="path776"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask782"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAAAAAByj52zAAAAAXNCSVQI5gpbmQAAATVJREFUOI2t08tygzAMBdAr+ZEYkmmS//9HSkJ4GNvqAtNCoZMuohXYZwxcJOBV0eKapzsR2RVE2moGgOjHKFvB+lCURwVAxmfbLcwkSB+LU+HyGUPbPHsfl4LM6ePkjJq4SBja+t5nogCQOd+upc0ARGysRkjyLcz5dnF68VVESrOE6V0UwO56cepXCKwwjilnoF1x4E1OpigtZWHL1SNmMi8ztCvsFoDmdWZT7B0BkJ0SZCi7C0B5gwHaBQARZfGi3iTWDfNTMrUSI/qwSyRvcBrbbpeIf/YRACN0rd8RMq8rAGwtbzKRvr4PWQiZ3MNLMDafbUQWAtaKN+Dh5w6CxESKF+GLjE1VDwmzQApRJP8GQCR0j6pedjKQgvcx0ZRS6B5V1QyracDricI/phL4a7LfUV8TiqEyjR3PrAAAAABJRU5ErkJggg=="
+         id="image784" /></mask><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath792"><path
+         d="m 92,72 296,0 0,78 -296,0 0,-78 z"
+         id="path794"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><radialGradient
+       fx="202.629"
+       fy="233.371"
+       cx="202.629"
+       cy="233.371"
+       r="2.9990001"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.34412,0,0,-0.25809,18.26468,808.71729)"
+       spreadMethod="pad"
+       id="radialGradient798"><stop
+         style="stop-opacity:1;stop-color:#ffffff"
+         offset="0"
+         id="stop800" /><stop
+         style="stop-opacity:1;stop-color:#fafcf6"
+         offset="0.4235"
+         id="stop802" /><stop
+         style="stop-opacity:1;stop-color:#f2f7e8"
+         offset="1"
+         id="stop804" /></radialGradient><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath812"><path
+         d="m 122.516,122.572 3.414,0 0,3.414 -3.414,0 0,-3.414 z"
+         id="path814"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath820"><path
+         d="m 122.516,122.572 3.414,0 0,3.414 -3.414,0 0,-3.414 z"
+         id="path822"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath828"><path
+         d="m 122.516,122.572 3.414,0 0,3.414 -3.414,0 0,-3.414 z"
+         id="path830"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath836"><path
+         d="m -1e-6,1.97368 30.000001,0 0,26.05262 -30.000001,0 0,-26.05262 z"
+         id="path838"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask844"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAAAAACQU4bKAAAAAXNCSVQI5gpbmQAAAT5JREFUOI21lMtywyAMRS+P+NU4aSf9/z9sJhM71GBAXYAxtclMFq121j2+aJAE8FKwzScLCSJ6jjEua8EAkNPWUxljXDbdsWYASI9qysEVY4e267smuk1qUN8z7TBe9e9vjeSxNm+nx20wPqpiwevT57ldKDAuDpX01kVZxnTVX04Vz4sWNQORodxNdJdznVPBEXrOMXY4fbQC2HIwOlQXHHjTN3xL5WkOAEx2nWR7bM0HrD6WzADehOuOmAg92tstQjBZOr7nolA8q3D6P2DbKUyxCBwAyGlX5JIQMD1OvoT5adQZZpWyBbs1z+NfQ8luTaexrKpdI7y53zYYkUyjm6jh+rD4hXnnheBZz8ib4WuIw5sweOsAltbZz+p+TdSKkZuN8cRAROStul9vo9kv4KvrjBcfB+D5U/O38QNU+KnrlKV1OAAAAABJRU5ErkJggg=="
+         id="image846" /></mask><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath854"><path
+         d="m 92,72 296,0 0,78 -296,0 0,-78 z"
+         id="path856"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><radialGradient
+       fx="217.54401"
+       fy="233.371"
+       cx="217.54401"
+       cy="233.371"
+       r="2.9990001"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.34412,0,0,-0.25809,18.26468,808.71729)"
+       spreadMethod="pad"
+       id="radialGradient860"><stop
+         style="stop-opacity:1;stop-color:#ffffff"
+         offset="0"
+         id="stop862" /><stop
+         style="stop-opacity:1;stop-color:#fafcf6"
+         offset="0.4235"
+         id="stop864" /><stop
+         style="stop-opacity:1;stop-color:#f2f7e8"
+         offset="1"
+         id="stop866" /></radialGradient><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath874"><path
+         d="m 129.35899,122.572 3.414,0 0,3.414 -3.414,0 0,-3.414 z"
+         id="path876"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath882"><path
+         d="m 129.35899,122.572 3.414,0 0,3.414 -3.414,0 0,-3.414 z"
+         id="path884"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath890"><path
+         d="m 129.35899,122.572 3.414,0 0,3.414 -3.414,0 0,-3.414 z"
+         id="path892"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath898"><path
+         d="m -1e-6,1.97368 30.000001,0 0,26.05262 -30.000001,0 0,-26.05262 z"
+         id="path900"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask906"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAAAAACQU4bKAAAAAXNCSVQI5gpbmQAAAUxJREFUOI2tlMtywyAMRa8E2MHupE3//x/rvExtA+oCm/iVThbRDulw5w6SAF4KWh2JAEBE/sFYmYIBIPZDiE8wVoWtrSZAvLu7fg5mjFRpP2o7qbn7zXVB1hjp6ni0heJ0jKF3l0vrJ05n6vRlNWcDrIxRyJwa6ep0qkymABArBT/5SxiVn9+1Xj4OsWLfh1E9wWV9WFEA6UNdqhlGpq7MmgLIVPWY5iRWTdcW8cgzANLW7ogBZKxNXhgAuCh4h5oVkrex41u5qbCvspV9PyabMRwjF8a56eMulgsMQLxzw56cDM6lGWEACF3bhR3skR97REWxaT2kvza/cYYJqULzihPfnm8D5moQ0mrJiW+bS7cYS0gMpHjesuhd07jJcVYLIeZtBqLv7s35sTJ5zMQPnY8giIiE7nb+ubrtAuLFdU7gC58D8PyreW/8AexpoCgytBwHAAAAAElFTkSuQmCC"
+         id="image908" /></mask><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath916"><path
+         d="m 92,72 296,0 0,78 -296,0 0,-78 z"
+         id="path918"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><radialGradient
+       fx="232.459"
+       fy="233.371"
+       cx="232.459"
+       cy="233.371"
+       r="2.9990001"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.34412,0,0,-0.25809,18.26468,808.71729)"
+       spreadMethod="pad"
+       id="radialGradient922"><stop
+         style="stop-opacity:1;stop-color:#ffffff"
+         offset="0"
+         id="stop924" /><stop
+         style="stop-opacity:1;stop-color:#fafcf6"
+         offset="0.4235"
+         id="stop926" /><stop
+         style="stop-opacity:1;stop-color:#f2f7e8"
+         offset="1"
+         id="stop928" /></radialGradient><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath936"><path
+         d="m 136.203,122.572 3.413,0 0,3.414 -3.413,0 0,-3.414 z"
+         id="path938"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath944"><path
+         d="m 136.203,122.572 3.413,0 0,3.414 -3.413,0 0,-3.414 z"
+         id="path946"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath952"><path
+         d="m 136.203,122.572 3.413,0 0,3.414 -3.413,0 0,-3.414 z"
+         id="path954"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath960"><path
+         d="M 0,0 30,0 30,30 0,30 0,0 Z"
+         id="path962"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask968"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAAAAAByj52zAAAAAXNCSVQI5gpbmQAAAUBJREFUOI2t08uOgzAMBdBrJ6QNdDRt//8fGVrKIyTxLAgIhkidRb0LOsrDXAPvivZLnj+ISFYQaaMZAIKbghwF61NZnRUAmV5dv5hVkD6Xl9KmPcaufQ0ubAUVl++LLdS8FvFj1zyGAEAt4Ot+q0wCIOLCaPgoqyi+7lerN5ciUprFB0mC7e1q1Z8+sMI0RfB8S1ue+NCqoqwMJWGq3RELMZXVxACgbWmOAKRtaYgBcFHmtgDIVGfFAKBMFoCUSaeAsgAgIjq84FCfE5vA7EpEJAXGZ4kE54UBxKnrs0TcawgMAL7vXEaI7zsn6YeyMXzoiQzNY0xCqEgZ3oKp/elCyocIWCs+gKdbEgQJkRRvmi8ytXUzxjWFiD6IENGa5P5ZN9skA9E7FyLNXfL9s67bcTcNeD9R+MdUAtnJ/kT9AjCQoTK7asG0AAAAAElFTkSuQmCC"
+         id="image970" /></mask><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath978"><path
+         d="m 92,72 296,0 0,78 -296,0 0,-78 z"
+         id="path980"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath><radialGradient
+       fx="247.37399"
+       fy="233.371"
+       cx="247.37399"
+       cy="233.371"
+       r="2.9990001"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.34412,0,0,-0.25809,18.26468,808.71729)"
+       spreadMethod="pad"
+       id="radialGradient984"><stop
+         style="stop-opacity:1;stop-color:#ffffff"
+         offset="0"
+         id="stop986" /><stop
+         style="stop-opacity:1;stop-color:#fafcf6"
+         offset="0.4235"
+         id="stop988" /><stop
+         style="stop-opacity:1;stop-color:#f2f7e8"
+         offset="1"
+         id="stop990" /></radialGradient><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask1046"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIoAAACeCAAAAADIq801AAAAAXNCSVQI5gpbmQAACANJREFUeJztnFtPG0cUx4+xsTE2YHOxjbENtgPGJTEJpCSVmrRqlURNXyKFqmpV9VP0tZ+hUt+qPvWp7VOqVFXbqCkNQWC3CQl3jBwwt8SG2AGMuRiM+wC57O7Mztn1Lmkl/1/QzuzO/nxmdvbMmbMAlFRSSSWVVNLrkUb5Jg0aANgtvD4UvcloNBnLDC8azB3s5fd3sxvZg2NE0ddYrEYtrbaQXdvcyCKMVCyK3mq1mNin5VeW11VFMVtrrTrsyelUalMlFK3NUSft6oPVxWcqoFT6HGUyLns8va8wSoPdVi7rQlhfWlIQRWO32+VY5EiLS5QBLB2lqsMqnwMAIDdMHjFSUUxul744EoCt6BNSMfpZBAAAjdtVpEkAAEythQSpcSltVJ5qKB4EAGB3iDDFSEFp8ZqVIQF4Nv1UUIbvIKPPp9xrvNa/Jphg0K3X+x2KgQAAjM7xS7BWafHVKEoC7uQWrwRplUA71QmQq8lpXgHKKtr2dqVBADxJ3kyHQjnZqjwJVHuko1QET6hAAmDT5iWiaLpcqpCAtZprFiZKecitDgmAUyJKUI1xcqh67iELJfiGCiulIzXUcDwXBorrtHokoK+TgOI+U4S7xpaFcySKYugxSmh4f2VrK5stVJpNZqsBdUUFGqWsqxLNkU0kE9kXR1XNzbWKovjRD8/WyBznnZ8Zn2rvYo8y7rJSBMXRgRyy27HYBr8sP6HpZl7I9ZLpKPqAhVrH0WzsMal40sx8h1Zwpn46SpsPRzJ2j1x+cN/N8j/15SiU6m5c90QmaDV7cyHWxTrqwavqQbkPhb9m6ZWJTtblHL+fdkNHC4qkT+ChvqINll1xTkIPapodFCOBAquNLOeIghJoxJBMTolWV7CssoNAMbZixuzCWF603sRqJIdA8WHcpb3BNfETmEEphFXKUA9yhEEC7axWVtko3ioEyTp1QjmSizlbc+MJRJQ2jFHuM0LDlZ2sVrYyTBSPF4ESizJO6GC+OFLbTBQ/ZqJlGcX5JvP3sJdkBoxzEFthkFxjhzB58yMB5STGKIwx23qZTbK5zEQJIYyyuSBWW3b+HLsJmOZ1sRClFhP4mxQbKbWXmhBNwCTvWIiCepLH6FWGnrOoV+mTNBPFj0BZFPiyz2Xq7sQtPOAhv0CAUuVENEMziuVcBzY6tczvHyEK6p08Tyz1dOOX+gd/CIoEKM0IlOWsoEjvafbY0CAAD4TzEh/FiBm1q/wCV3sA8wZ9qd1BYRkfxYsZ/a/OTUaH3eGQGvjP9W0LC/koqJ2e2NHfSqfd7ZazEXJP8PgQUFyI/knsAJgb7Y2N1TIoAAAe3SWV8lGcCBTNNWt9Bfs0qtI3iHM1D8WBmZ8aUcsBqjZ/3CGW81DcKsa7jjTXL9x/IaHYVUeJ3Vmk1PBQMBNcUVr5iboFz0XR2VUmefBLjlrHRbGpa5Sn4YhILRelRlWUqUhMrPr4UPYH+uj5CEIUi3ooD4YfMc44JpS54fvMvB4uSr06KJk7YfG+IaCY1UCJj4+xYg5CFD0mGi5Rq33DyBQwDoriQyUdjUYRXUNAKVcU5SAajQpcTywKM46H1/7c9DjlDYxC0SmEshiPz/PXfhJRlOigTDwej2NzFekolcVuzz2ZnYjtyr2Yg1Im3yqZRDKRTDCTE9Eoelko6UQykUgKF4xFoUicbPPpVDqdWJbywKJRsNksz56mUunUKmo6l4mSRaF8PSPrAZGGkkOh6NQh4aJso1AUTnp6of8qSgaFokDqIlEclD0UipTgkhTJ6CCPReGnmIiSwwQSqt3qoHBegPkdDUYeVUi4KJBHoZw8DpQNFEqwuFAPDmUBhaK5cAwoKziUTlWmFi7KMg7Fc1YNFK6TkEZ6CVeWxFMAZIlrlaXtMpSc12Xd7MSHYrW8WNwEZqcNADou35LKUfv2O878rT00SvQ8suHrZb9J4agLnQqZAXQdpIg6GeUR1ru1fKy/ieXQhUKho93EFjzKzDoy7QtMnxV+xpynbe06/zLXXWzvih/jH7qKRAH4PHh3iHGKO9AW4GwAOnX0wAIfZVx0kHPV03Wmf5xaawgEAm38zEd3Mz0ix0f5J12HZyl//93Rvx8SUgI8Ld4WP/FrtyY6imCYftqLRznUcmQhldlZAQCwlVuMFo/fS9+i+fVbapVgG3PgI6korsM08mzWgtgwC9KrBCgLdy9KZTmUGfWZjL2Buq4V7r6H35GHgpPZS0URRlSGIrjXs0x5qZRCqxT+fEvmL0YpIAEFhgfU8dIO5TLQwlIElNztTrXWogDQ5OV/jPNcpOjbvdtqDhZqYhgxEPjDmooobTQUYrrJ3nrIoBrK3u9SUGBWf1o1lKr+DPGetHzbG44rNDsWK6OPmOBORdn6pkOllTGAb4BcTktNys3YmlTqoWwf+ZbUzMCp76BH4s9Fym8ih5tF3Orar1Tpo/TN78k78GIevrdXgneJ0044HKF9ii+62DBe71V0oT4XDossPhjrntNfKvQFMwBM37hNz41go0DL1Q+wKyNRPQ4PhRmnsFeDvi+YX5GwlIsM9on/5wgcCsCVT4r59nC9fzAs2jFSUEB/8cIFeSlfo6MjI2x7SEABAF/ve5L9qZFwHznvszgUAG3XpYvoEZybGRkdT0ngkIQCANrOYGeQFeLPxefHx2dQo6MIFAAAsAWDThspSy+1lk7Ox+fj0iHkohyp0a61GEFrB0jmYW17N0X85xQllVRSSSWV9H/Qv8fJ5BNXSgZwAAAAAElFTkSuQmCC"
+         id="image1048" /></mask><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask1060"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOcAAACbCAAAAAC8f9NGAAAAAXNCSVQI5gpbmQAACjJJREFUeJztXUlzG8cZ/QBipwCC4AISEAQQXGxHlhRLWcquSq455GZfcskhPyU/ILdccsgxh5ydKm8ql5OKLJciRZTslCWHoWSRFA1QEgmCOwAyB4AiZnp73dND2qp5J7Ib8/C9/r7eexpEAQIECBAgQIAAAQK8OgidzddGItRpeec4PEA/fNo6z2XTiUgkQUREB53m+uaWPkcim0lGo/EQEVG7fbDX2FCTnKLO0NBQNjvgTm2vLelIjeeywwkmtbOx/rQt/3JZZvINDQuIiB7sCLNSxYmYIOvFk+cYfXhsckSU1155Igtiqc6xK9j3v8TfBXUunC9mZc89/wqorIOFQlSWf7j8v44wMyJ7MqUZ1YKmJVIuM+HqxOg7X75QcA/N5BSfGCjn5vdEmVIlPzqvoHaheZOTGC5NSwuzi6NvvpVlp6fHEQP25xuCHKv+5JRmqDDDNhschF5vr4jtqBYwSxI/m1/j50h1ntPUybZC2UuD6MNv7glao3B1GrZj4PINfujKdIaTKH0P7q8YmCvjJRW6dmObl569DBcVEcUu3+Kmy3RmdDtXl85iSdV0OE2ZuccmDpZK0kaWwejMApdc8khCV6ejw49c1GzF6PzKM3fSyBXdmKK5lV1OqkynbvXs9HfU41Njek8TUbXh7JiiU1N6ziQiCpUfcFJlOgc1dbb6rCxdUnSZPOTHHW1u/OqoPgfR1DeHbKJMp263chK2qWpV79EeHDqL1WEjkmhlkU2U6Rwy7T5TP8/oPXmM4r0TV8y+YTrH0NSZiIX1+I/rf3FWOpiVIFxc6v2VnJ025CDKZDaZNInOODBcc6DX/ZXf0iyfPuR7OmM/NaqaXYTSWjrNus/Y3Ky5TOrFe35Ov7HuQ44dQkp06ja3tENEmbmK5lPO74y0iag8N+SFhDjVxqLOnR2i/NyE3kMuJAYbRK/NQUN/MbIJZpAr0ak7TGgR5d8WrRmgSDZCV81boGMSVpVE5z8mKwWdzn6Lpq96qJpdpJ+9M+mVgyjFLDnJfRYtTwkXZBg0Ghf0LXJjv5PyTkI3ltwpytgcn5jApX5fcPu/7hRlH1mvfz0xMXnOH3v8QpxJAcYCraWlyMxFj03g6YKdzGFjnvaDlV/rjo7OEuxsDrW++XjWrim+gl1fhb20e0Y7TkZgV+ZhnZEfks4jJgXWqT3aPUuwCwqvpk527wzWmTPWebTV3A5nhr201/vf1ja3KV14ne0YuWD3k9Bvjxn2n53Hj5Y7RESxN39sWFJHCwvfHRIRba3e/1UeesTcn2kjIzfvLR438Qf/3v6FCcXRwt2T1YHWx7+BJkTswj6qc9hgJrKy+Kh/HviwUtbnePTwSf+/B1+/hTy1z6SgOnUno0R7Nxdczd5SRZejdfsrF8fiVeQ5dncQ1am9WPTwJjOnr+lyrH3cdCdtIBzMU7hOzbXc5qdP2cRtTZ13b7H9YGcrrX6Qs+8G108tGx99ytYQoj0tjp3ry7zkEEBirjOhs3e2ff8+95CL1v7b4j1ORBDRga86kxrrW5sf1vkZUQ2dDz8TnECJ+6pTo3ouXufFLBFREiY5/OKOKAspLPN2KIuaePjPeWEe3Ga3PuHuSRMREbKJzzl0AupETWy9z6y0nQAtrJ33vxPmQTGxwSbZ1bl8RyITHTs+viOWCZXVOudYGKhzBDJx9QPuiZFjYP5c/kBUv4kwf/JO1mA6o9DW9n9uSWViU9j5f8lkQg0i7wgdpjOBLJJ/eZ1zLqAfY4CNNz+X5yMViHf2DdM5CrAffq6QOQps1jQUMiGdvPO8mE4kWpqq48IQieoDSB1nd7Ot6rRBwjOxHzFEp3nc2jDRCskQ0FA0eCV+ijpNQ84KB6QzdGo6RceEj2FsCKRzCDkWoa5awBKTSifC4UEn0sErqxYwAt9U6USm+1wOSCcScU2lK5CQYzdG9EnMdUK1QvxORRc2qmfi7P2pbIaMTeznAE4d82Pfmk6ViVZIIA7u8BPSacMVEAlngmzJEERn2oYrYlbi1ledWeRDShOBbmXrbP2JuHNPZSIUE/J3G7FNWL4hiE6oFIVvsGmQqMrqnL86rTS35iaeYBhYLd/22Z82SGxUzw3Bu5nqJ62YaMWfHjgAnUkbJsa//zo5733D9CckQLeys674gM86kcU+KyZKV24JWy0XGGJJ54ZqGG8jbIcQEnOdNkyESJQxARi7+yroRAwRjFcs6VSZ6KVqWeFQ64zmgLUnlYnxEQskXjjUOnPIO45KE4EXCfZUV0X460/ooKaNqrUuvhylC2Q3S1RWdnQ2/HTFS0PO3p8bqsU+xERVWY0C1XPf3J82TLRCArlTtDlpR6eyW/FStaxwnI4/EzZ0eipwpc4R5C06pYlAt9JSkSDHG8z9CZ2osRJyiqnAAEIivIDLis5dGyGn5EAuhfFXp5UeXnUXGsLR8Tduld2KjWYIqp7CeZNSpw1XQDba8KeYw4pOlSuSNnR641DpzFipWkC3csjcseSCvzpHkQPjVkJOMaaKjfurE1ns8zfkehzImRd/dapcYaUtQ8qKxLFvRafqA95CrgsoJsx1jgGTPnW3ApAomyFvHCqd5y3MygaQ2wr5b+WcoOhtdVWhM4Wc6xW8lvMSFWRTTrWgj+wK1MRZChOQnk8ZcsgloM8E938eI5lHSMRZCp0eW7kuJhETFSfeCsBrgiQpKws616340wKHz/58rjolclo61839ifR8KhOHERsV1RNqbtckBa7QWbKgM4e8/CK+zLgL5KpfWf8m15lBjtSo9gSrFk4pjyDTfVmBy3WWkAskVe+tIGF7oCisInJGwtyf0BUWqjPQFYAkLn8zDWtuZXfQS0eNr70bAnBJ8fVVCyRlhOOK5MUuYVam8va7v4si9NVro4kjcfAO/hYh+eV49mhX3F6+lwc4Sj8ZS3UEhjDxEB3vQvMiz61arV6r1+rsCue136McnXqtVq/V6uz8Z+BP8HWWW7UuXGd0XPUz9oeC2cU06fQMEVFn9enCX5w5yKivZ0uhQERE66tLf3UOyTP4HY09Q1pPV+/+rZ/b+amKx7stI6VS2qUT6YKdyOUufuTUqX+1caxScRytdOlEZgUKuEc2yAzWjbaLxITDOV106UTGeQq4TIyY2LjmWhHWjwm3Ifb96Zp1F00uxLURE6es07uJRBkjf8riNu/5AltGpwmjm8Pk/vI1R1Pm1Jma8OzPpg/+NHOnYzzq1DlueL99H9ZcIwUjG10LWt7D1qXTuzvdIZeyYKOF5tal034zVDK5DPmFy58XvMeE3zrNenjnDGvSSKfPcWu/atEF/R9hYQzxW6cFV5iV1ZZEZxifW4jQsV+1DMvKuULh0DkB/RiaFDXnYtSwDZ0aP5ol5HDqtN4MXTC6kN1pY9xGWTl0mt9x+xKutUXdn+TpwnkLWs7opzFWnf86dK792YTRAddPkH1hwrjrPLW8+kft3/YiotsGzwQIECBAgAABAgQI8APB/wGGO4lEXyCkKgAAAABJRU5ErkJggg=="
+         id="image1062" /></mask><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask1074"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIgAAACeCAAAAADMXh0IAAAAAXNCSVQI5gpbmQAACEBJREFUeJztnMlvG1Ucx3/jfZmJ6yx2ndiNHTcmiYmgSAgKEgdEhQAJJCQOXJCQ4MKlAgkuiD+AMzdAILEICakIEGItVGwl7IR0SdOk2VzStEnc2E7ssR2HQ0qxZ97yezPPcPH3lJn35vkzv7f93nu/CUBHHXXUUUcdtVeK3OI8DgAAqDb+DxBnQAu6nG7FC96m0mp1vVbTa7peqf0HID4tqKoBTqZGpbK9Xdri8FgH0SLhoEsgf61UKhS2ZYNokSjPEETVC1fzm8QGZAVEi1qjuKbGZn79qn0Q52C/HYpr0tcur7caRhBEiae99jEAAKB2KVewCuLoj/VIwgAAWJlsuhBp9/v7oxIxAMrNF3iQ3v5+h1QOqFgBcSVTHrkY1iwSSsVlY1gC6bnFJ5+jURIGOXCDXz4HtHCgQAZH2mAPQ81gQJIj7bCHOEh8tD0c0DoTc0H6MhKmFqLELKJlutvEIWiRbH+7OGBTBCR1oH0cuwIgWkqyl9+k1ibCAUlF2sZhaCJsEG0MZ5D8xnZVL1d0HQBc3oDb71fVEG+ObB1Y2SBjmHk/d+FytemyXt/a+0OLDYdYzwlYxI9oIfNnzH7wnorF83expuwiHiTDHe3KExcZqbt/JqSAuEZ4Bil+Vmam5xkF6HU0SIznr9e/YXMwXXNDW2WBDPIMMrnBycACMdQMA8TbywEpLPM4oEKfuPEg4TDnVy4WOBkAGvR3wYPEeTVzhcsBigyQEA+E11IBoEovo2K4poP08UCM7Z6gGrWMurFeqSBqkDe++4zWJYhaRt54gwoS4g6rGr+R7FAtYjIn3SLceYY5pe2pTi3EtIdFBfFyQdKz3LrZpRZi6vo2QCLJKesgm8YbVBA33wU4vLbCyVGp0uYrPIifD+K5//11do6TJ8EZgC5QFb/b7XOooEHABQDQMNUqFcSJ8BIDj3x9lpdnp2gcRL1et2/HlI8KQq/eJnmOJL6j7+FSpOuku/ZAAEZj09Om+rYiJy1hcL+Ckj8xENSFrSIAEkvgQBRFTWS7dMRwzxa1ahiuhLmQ8fHC2XNrtkCoPzfygGBJu0tLS5esg1Atsia66lWSSVicnkV4KWIgJd3CxlkyWVleWka4bgIglS1LO1b+TKaxfHqmys9pELXXQPcAttsY5NiXGe11Fc2DJ1N092fFxtZIOHzor/kF/nKjSXSL1MfdFk2iKIqidB0Y6wXuCuxfMV77MdYSGqfliRlsVrpFwJmxYxFFURQllI17iriGy7CI62kpO98bn5/HZGNYpBGy2m9aFBiPLhMnfjQIbMU1GSRKX8a9wT2XZ4GUdkalgCiB9PAKb8XOAoH17qgcEkUdaeRsgDT0lE8SiWfImWPGcjBBIO8bkgSiOFLeS6yOzAaB3Jgqi0RJxM4w5h/ehKI+0cfJIaCV1+jOLcciUF3W+qTZRAvOUtsJDwSKV7SINJL+8pJlEChdVmV1YkXpW6MtUvkgUDrXJ43EH/2VUjkIENiZKu7rkkTS5aJMgRgQgNzpqKwmm1wge0s4EKhOboXlzIBKYHKX9AtIENhdnnINOGWARGZNO4oiIADV6bNbmoxx1jNJKh4PAlCcnS2p9isoOkM69BIBASjN/bKudtsEcaws2gYB2Mn9OLPpCtsiafxKKNjaKuqGW7OqpQf3Xub5LVkgAGr64EHL655X/zDfE4lDa1ZpchLSh2605iOQztftnf0rQ+mhdFD4sYk3zPesWmRPu3NzoI6NjwvGLw4S7kmJhnCnbz0kEnfTeKpNIADQnc1m0aF7jaNmN1p0HKGpvPTLvB72I4e0r8xrUFkgALB26idnyoEiOWHe8pMIAqCfPpMNYEC+NHvzZpA70wPd+3xewIWzG5T/diCGADluBjF334f/OQHXi3qptlnbbGzAOqzBBir6X3/lmWErb2AGcVyPO/MZ9mmeRe1x6y+9wA9MIpRkOpiNU+2JONUEACh9yq2ZGuE42HSrh/o4diPrj0UeSIVQy6aqCVOHOCxIfibFyUHaFTCBRKgg6EE8xxuuSTvBJhB6+Ap6j3GdB3IZA0KPOe/CgqzywhtIoVpGEKWL+jpojyHIswhpIW4sXe2lPq5hQbghMHMIEEb4ihsLQm/vezpvjKYhgfTTC0EfJGU5IL+RbgpYBNt9h27igJyzCYKtmsOcxnTpNAYkRgdBBtkeeohjENI6zwzCaGg4V33gKK+bf4ICYQR9h32k1m7Q6HO8SfpH8im1AYRRMwB3f8zDcB55kut7fkS+bQBhDgFPhD4krJ6bdNvjMR4GzJ9CgURZIK5HH5w6NTVPSU3dfgdpBWfU27TCWy+ZVQOgHj4Mldy5xdVCoXkGjQzGB2/Gfa828TMOhGmRPfmH97zjfA1gFaDXGRRYhVdepaUYQHrwS9BuABD+XO7dVSQIN7zYnqaPUZNaQXrp3ogMnXmFfnLUCtIn+ZPAVq2+N01PNFikrQZ5+3tGYivI/jaClN/6nJXcChJtX9UU3nqPmW4AaZtF8m9+wM7QCpJoF8jmi7QRlQjio6837enbY8QTCSpIFLngF1T92DHS2o4BwlsHWNPJ418icrVapA0gF19n9trravnpyJF7DsrFOH/8C2ScnsEG6r33jcjDqL7zDuK7BiIIAAzff4ecz67Lx1+2G4c2dNedWbsU35yYEApYpDXPeCaTyVj9bwUXf//td9HQVlY/8dyYGUkPie5Nl78+8YN48Cb/dMKTHB2OJWKok4fFhQsziwuCYZtYkGuKJOLxnh6tJ0I0UKm4sDg3s2A1ulcE5LoCoajTGQGAiAuubpevwl+wbqEmOuqoo4466ug/19/ph/ymxVtc0gAAAABJRU5ErkJggg=="
+         id="image1076" /></mask><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask1088"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIwAAACeCAAAAADFtb1yAAAAAXNCSVQI5gpbmQAABxlJREFUeJztnMtPG0ccx3+2sQ1+YbAx5eFgEh4hJEAeJLRVU0W5NJceaKWoUk/NrVKltlIvPfeSW6Weeuo/UPUURUqUUJGWhD6UNCgQFUgCDk9jwDHYi80aekjaeGd3Zn+zu2NRab+33Z2Z/fg3v3n9ZtYAtmzZsmXL1sGSQ0CZTg8AABT2eTNaBuOp9lZ7a7xul7vsplwsFHYKhZ08jssKGG9tKBhysVLs53O5XHZHNEwgUht26ycDAICdzc1NJpAZGEdtLOrjzCOl1zapdWYcJtrYgDWJUvJaKr1nJUygIVpnLCcAAGyn19etggnGW5wmUAAAIPskZQVMfUe9WRIAANiaXTULE+qOWoICAPBiKmMGpq65pcoyFgD5+cJW2SVX0VVdbaZ9RSH34ZJRmOa2iKUoAABS+QUepjqRMNavMGUMpjHRaD0KQL78AgvT0WOtt7ySbADG29kpAgVgS3GFggl0JUSQAFFLKJi67hYxKIT/YmAau2OCUPgtEzznFYXC7TOxE9XCUAAKiis9mMgx68ZFtaSc4lIHJtz7hkAWkJQzPjZMsFdYOwIA0n/ZMI5BoXbhg+lt4i1dlvI5ac8PPofXg1g4bONhYv1cU698MrkhlxcdjsUb2FmULZsF43mHY2wsPJ9bJm7J6fSUb/AQK1cWDfO2H42Sf/BUe2WWv/N+LT1bCe0zR5m/SVHmxGSJ9mw/FaZnzBHXVJjQINZhMqObjKdbjGII/6XDnMVOu6bHqWYBANhhwBD+S4U5gqwkeeKhTuzFPIwT2ar3783opCgxCiIaEw3mGG4FW/pDjwVkBgzRmCgw4U5cF3P/kW4SmV5SAefAXbi53dR9/TQMyxSKGJj6DpTHJP9CJGLAZMgbmjAJRq/5WrkpsjVwwpC1pAnj7EMZZmIOk2qXXhbZmDRhelCD0sI0JhWraZOjgRaMsx1lmGmyYWpLLlG7clUta6Rsb8e8ZBZnGNgv0WIXuxiYHpzHMEek8nfWUB4UJfKOGibaioF5toRkgT1acergqxqmBbVoe4beMqG2bXXHoIZBGSb1FMtCb06qlq2GcXdiYJKqZknVSLXLD76qKh/4q1x+8P+3/aLqgNUwHcy9mn/1N5oF1lSvfIVFTuA1YFCdzILqDRySsxo1pAkTiqNguHf8UCJhGlFjJLLD4xUJcwjVltIiUNQwMQzMqvbelWkRMH4cjBAUFUwsgMm0IoIE1DAol6kQTBMGJoMdsHlFwEQxMILaEgkTaURZRgwKCVOL2lFSb7taJMIyGMPsqZYYVkkJE8LASJWqJgwMKzRkTgZgcEsUI1LChDEw+EkerxQwNSjLVAimFrWzVCGYAGr5hok9GJPSMiiYClnGi4JBLR8MSQHjRsGIGrMJGA8KRtZPYlA2DE3KTu8gwThRoejAhhgUQ9UkbtP94MLgOj1ajM68FDDFg2QZ1nbMax0omApVEyPOXybGdqxJGbCMuLMaChgJBRNvUocGrZEChrUH/VquVlEwigHghQOlVkEsSstkcfvHlYHZxMF0u3eFsCirKb2Pqib/OTEsShiYxznNmYrArOBgBk5UAmYVB+McqATMAg7G8W6wAjBJJEz1J0JglMvD4qk6HE1rFr8Vh5fSMjLWNI7L/F9l6M+DiIWzZwgJ42n/lWvPKXjhyrlRvUREUHpewn6w1PvZtVk0SV9fXz1konrRbAJmcQl9cv2t7qtzmHSuY4NDYQCAulY9GDK+4R/Aeo3Ddz6b1Ksq/9Dwpxc7a15m2NI7b0MOjeHvecIvKz/+Qg+QuOJ9p4+Wl5b8khMGvj7NAQOwcm1iUYujI9EV95C3r+iEs1Uwb37FBQMAmUeTC2vFl+9xRRoi0YgGBwAAfPczJ4z7B/z5UoVyOZfeRz6j37Kfqzxkz9mPdmFlzxPw6aYZYYfg1EGQu3PGYBBKdLEtoz4lsjR2mJ3FhLrYhww1wkPX88JM089m1ehVdndPi4Jx32F+e6vVxSWb2wTB+CcXWDBaUTzp5rogGEc3i0U79r7s7xMEI9/mhoHFSLsYmPC9F9ww0kpLkxAY9zRrukoZozeynWEhNBu/M2Coq+vBb4Rs5ax8zHhIfePSRkdAgGWCfzLOjtF//sz24ZAAmqeP6TCMTx1uLF21PrBJP5ALOt9rDw2ftRYlNzLywCgMxIeHLUSRb4+MMxPoxaoufW5VVRVv/qS30NINnPVfes+KNj55d+yJbiJEFO/MF20mSYq/Xb+L2fPFhBRdH3xk5uvbyRu3WAMSJwyA68LlXmMkE+O3mFMYAzAAcPzD87yuvD0+Ns51Conj48TIyZMDR7CJZ2dmpmeQtWMEBgBcp4739Oj5z/rM3OOHhrYXDPyXSPj4kbbmWJO6wS+n1lNz0/PGj7QY//+ZWMwbrgFvBGC1BBkpn9L6ExdbtmzZsmXr/61/AN2tphPd5t5jAAAAAElFTkSuQmCC"
+         id="image1090" /></mask><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask1102"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJEAAACbCAAAAABHKCaZAAAAAXNCSVQI5gpbmQAABVhJREFUeJztm0FT20YYhj9jG9vgGNtYmLgJoZlA0nQ67fTQybHH/o7+g/6gHnvoTP9Ce+xMMyVtIRmaTieHlgTIEIxly44lAz1gF7SSd99dPilyRu+JXfaTH7+7Wn27XhGlSpUqVapU748ycX9gkYhGI0mD+Ijm6/VCIZ+7KJy57sgdDpyB946IMvV6fTH0PyOn12/3YKLlO5qf/CS0Nt9am5eGPe5eKeRkLZfqekBOWOVywyrKw87dqyUp0YJmn7rBqtJGUxnmDWGioiZRP8DTapXUYX5rWT0a+IuZ1gc1JOwtTDS/oAckfNnsJ6tYGE50Q3dq8I0ja70BhuFEJU2i0dVeu7MePgGFyN/ZMqJFTSLv0qPMRx/icb4JktWjyyuXNm/jYUP/k4TTo//dL2/c0gk7Q4kypjd/ZbOlE+Yf2DKiBd2bfzxB1jbBu34sYRaTEc0ZEVUe6AFpEOkOI7dPRFTavKkXFiHRwCOi3H3dDEZ8GjIS9YmI7t/TBfJwoiWDW+3uQ10gcoXEVkJkMEHWPtfPksU0T0L0Y3O1Kc9G/epT9bOsNpAOkfPiRW21id/KThbIF4MS0zxpxkbt9m5tfQ2bKc87+qOaiKgrlOVERNRu/968e0vZjOjs4adGSy2x17CL5O59rFhPmOt7YYELfHkiGv158kUlAhoi6oorboyI6ODVEjfLhQLrF5SIOhGtxwdiBUx0bkI08pTLtcA6GCaa0yZ6/fdLh8pfleWtbGOiiibRP78dExH1nj2St+uJFRERdX7eH/91rIgz90grE9h+cjr505HHjYxHdkZjV+Jk5/llQXFHnARqUKLyDRjo3529KyVPnq0HhhFMhO8B7G77vrfrSTOa4CYYSgSv3R6LO39uQdbc3KMqRvR2a1usGkkjo+41Z+tpoM57l0Sdrd1gpZTIFfM1nAiZII9//SukVkrUGwaqQKI8sqH400FYrXQcBeZHmGgZsKgbCkRDWWhwgkSJkE4LDlIiInKlvRasAomQgR2640/08pdSnubKRIUCUVmYwTvGRMh0FHiKX2hvz1/Ol4gWszRXJirNHxoTIR5NIRLlefKmIBGSi4BEKmFERYQoONkZCSOqSJ+WFxrE6hFy89vBHziNhBHF2GmMREydNrNEVWBrO1aiHDJlhzwQjAQRLSlWykREbqxE0FMtJNUxEuZRjJ3G6NF1SSZiI4rXo1riiBCPQjJmMyFEVWAhch6rR5BFsRLFOoz4PLo2yURcHsVLVE8cUeI8KifOo1pe3abbvj7KWAARZJHsFKieEI9i7TQuj/g6DSIC0v54iZD9tViJionrtSmHhn0aHDOgjAUQIRZxLUQIIYp5GL23RIzDaBaJcokjWq6qL3L6hgNlLDURYhFf3s9FxEEy0QwSNQAizmE0i0RW0ojqifOogSSQRywoYymJEIvO1G1wqYgswCPWTuPxiIVkIqVHABHrMFISrSSNqJI4jxrAcdperESQRYwLEVISxT+MVESrceciSqJmrBvHRKQimr9tfqbGVHIi6J0m4AdKHUkfW5WvM4Ae8Z5un9orxdbaxpfYZ9nP94/sNz37dTRERctasSzLWtF9V4zotGPbdse2O7Ztd4zPbAhED765afBaTJiObOfQ+W7KuS2ZhJGt80alXJZF5P1wfSJkjsZ1aDJ5RktkEiQQIXM0LgaiLK9H4Uc2FfITrVgsJBNxEPG+OMNAxDuMphy0VShKjw6MsoIoPTKySCBCUkZcHES8Hu2rm4TIR1RJnEdN3ffn5WLwiLfTjl4ZhfmIeDtt3yxpi5LILMxHtPMtB8lEf3BeLFWqVKlSpZpN/QftN0PcvrSR8gAAAABJRU5ErkJggg=="
+         id="image1104" /></mask><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask1116"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFYAAADXCAAAAACl0flWAAAAAXNCSVQI5gpbmQAABLlJREFUeJzt289z20QUB/DVDzux4zhxklpM06RlhmE4lBkOHLgyw53/kzNnDvwBMMORG52G2mman/4pWxYHQhut3u77vpUWAujdvF5/+vJW0q5WqlJNNNFEEx8icP5RXh8b6P1zAy5gg4DqnJMyzIYkqpRSGwIG2SCydMyzkouxoU1VKs82LmwUMx3ylZYvwkYttssmFbNRC+iUZoWP3J+nVNgKeVXFUrYdAaqK1wWXZWP+H/6zn4xFCquUUsW/iWNj/ii47xg9TJdjt5DxUkopFQrYMMYvGg8/MGwMHQZyFr9wFnoyLHocKFG2gYAtXGzsbAQfByI2FMxJntjClfwfYe1zTSEyAWucbQlWcAXLcXZZ+FQbuxKwG5jdLATsGmYnxY92NsvAKWc9E7EpODnMtHUCk03ag9RMS5Zjp4cQe7fQGhh2dbsHqLfXegs3JJNdftCm1/qCkWXndwecuj5fldrYXC5jpgyTy7IKrBij51u2r2/flCoAsSo+3jF+t7m4INuRszMYHhnQq4u14ScAq9T24X654+bqrQHFb6Bag17n4TQ8n0ymlvtIye1ed6sVRSpfZdlqYcyziSaaaKKJJv7m0Oay8AsH46dyk7ZY6rErrnJMiTaN3XbYJtbXtgTbcWCXRFsN2c551iVbT0Xgsw26cnbDs51tsaoW/JDVVdoaWKoGGutQWoR1yVa/LyXYrmDf668Ast2RZ5vz2bYcajvls+22xSpdA42ta8SKbNsP+9s0GQ5rYfX8gmSYYDse9/HDOdWq3/jno1GcJMk+zFIzGbmfsD4720o+SnYxFWaVUstXr9qfvUQGMKWbjbsf6S/plwB7RzdbLgKvs4APA2vZq5ksgS07OQudHfS5a2NbyMR2JWYHQLIzan60s7sAa9pYsbA9gJ0Y2itm68ICE9ujybbT98L2gHNsZjjJLCyUbGb4wswipTUlWzVbOesp2z0vbBspwq2Y7QOXxbk8WyTZO2IPvw7W+I2RRUbMWNr/CBv7YffMT0bex0LOQieDYdq1sMRTkTJr/spYBGAic2CRbG/kLHIgyNkAWSnJ2X3ggelSzkI1MCxCLWzFETOxFUtbJdvSo2ieRbJ9NGwfYFM5OwBeA7uhb0utbMUaPD7WcEdmYw/8ZIuw8mx7ALu+FLMDYD/s2rxSMrGVa2BggfnRhfWT7SHAWkfMPVs52wGyzeTsAbCsu7KeZCRbvbR0tn7YIz+spyIg7Dsx20KKIGePgGXdhZytobRkttVr8MhY+p21yqw82/CJl2x3gKcZM/IZhpX9BJjIzrgOZfZpDTX4t7PdY4B9K2afDnjVhUWWHn5Y05uhFvZFDZdFgh1WXn9R7JNnVXaDjeyB9dXg++BX1Tr7MfKk8PO24Vnh+9BvF7/5FHikd/R10g/ntsNBzxY5vpRKvlUqHY/G49F4TN6j6sp3wGqxENmb1z9/X2rVsn2Bvdr/EDg5SVkWObxKQUwVdbDEFUJjT1zYMcv6KcL+qcOrKjcs+6wvV9U5sXtXZJ1KS60ZamCJEdPYUz/ZOrFstsd+2FP8P1d+iNmIZZ2SpTb0C+zzumpQR7YsiyzvS/E71ViAvnrpwP74q8OPmmiiif9X/AEJFin0N91H1AAAAABJRU5ErkJggg=="
+         id="image1118" /></mask><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask1130"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKMAAADPCAAAAAC8MT59AAAAAXNCSVQI5gpbmQAACn9JREFUeJztnUtMXNcZxz8YYGDi4TU8Bgx4MMaBpE6wVDW2pbRNajeplBIlm0itqnZRdedNt9lm1V27rVr1EeJKbVrJkVI3cWldv3B5BIOdxNiYiTOAPYYxHsxrPEAX5jHn3vP4f3PvHYg6/xX33HPO/c13Hvfc7zwgyiuvvPLKK6+8drsKcv5AP9HjVV4Sj1DsKi7fU76HSomIaH3lcXplOZFch1LmhtFXGyovswenZxKzj82pVYxfK2FiDCnvFIbCNYXKuw/vTa4Zsi5ShNczDbykuhFsCvt0CSsrW6MxPaWCMaj+4XItSEMLa+vqjDn5n66L3dVFUDD6ufV0RRJWEI4EocTV1VVjmqauYHyKy7hoD2porIGTtwSis8qbCsYAl9FWH6sb93LyqPVPTKvuKRj3cBnnxUtfWyuzRlc8v66qlC6V9Zpox9pDpbz0RFTQdeWB/I6cseAp5gOE6ljUsY+ZnIiIfC/0zUlvyBnLuUX9KOPvhkiImXqT5dnRpDRcGrs0+yZT2LE/6/drdfugLFjOyG4yW2Ud2t/ATJqpvYkJSaicMevusbmtgplSVGRWUtpyxgCz41h/8ir0HWjzc6lEVTZftwe6Y8fFRSKi4IFWNpRVLfH7tjApo6+SmXOKiChwFHs7axVoAxnZXU+SiBqfLs+Cyaa6kO3FLWVkN5kFoog7iORvxBjZI7NHFPk6d8Sp0v5PrcM0KeP47L4I64W79MyhrJmsKm2x9pEqi/nD9eGAa89l6c4lS4CmVMvDYf2niEdaPmsZ6OlrXm1DGB9Lu6Yr4+K1sXWED1d7xaJS7Jx4bW7BvlerPGJRKf0n8Vr1fb2t1ZsveMSiUnH9PeHazEjJnPutqtiMhTlntLRTgLHEIWMqVQo8JVNh8RJIzR5hbCs9FX2YTBGVVXW2MJIFS5czLz1kXL8djW28epeWpqq/0YgnLecyskdBRES0MjExlXmdON/VASeuimdeAYzV2TDeGrJ+mCxcLougqcVhnpmxtIw/6ordGLcHrg0EwvZQqcQBvZkxUAxmvKX0J8NSp+fcCPpdK77ZzIxBblHPfPxQcSf6Jdi6Rd+5mbGSx7g2OjqvvDkOOoL8vsyxuNt2TIxKPpC3FHuADaL8pZm+azNjFYcxfkZtRCJamALdVUXKC6kY3WN6ZOSRPsb0c1hOwcwqbWasxXIlopWzt01RYuAPFr74jIw1sBm/GPrSGGdpBvvJwneUkRF+W98YtHtB7ErUQZl5wzg8YKiKTwQOmHltBmNM9w+koYcvYIw8O1Ygmc73D0OPJlr0wo7IqGfpw0noyQSXtTBGcIWxF0ak+SwGeibGEPIpIp2xkGsVYxRm3k0ISJNZZTCm16HRqODeMzEiTSYJ9TpPtJaGvPruMyJP3Xo6VNgsxhCQpXaoY3s6xChUCBNjNVB9EshTN1UA1UfhZxsYC5HJdlZZY1ORnLKuQKbWVJ8vMhVi8wHC8gwTI5DjY/mss1wlmOuH46dAPrgeytfNyFWM9eEcO0KM0FM3hDnhljl2RLoeFmMBvzqaGJFXoWKlhlzYohyxxzUwhoEsWd1jGcQovlz1jBWud4+YE07sKfSMlcBLIcXperBhveVn6xkRH8Ucp+sBvUeuMyIP3RLGKHYVekak9vAY6yBGzvwM8qtZXU851PfEU8KlczuyGJFGSDQjXmoZixDHxz1zlG1hHgXLigotYyOQ4wrjY4aoBWK0OI60jEizfiBZ5aoWtraUw+h6dQw2IYxLbjOy3tZ7oTVAM5aPOD0j0ApZdmyCmrV18bCWERk9suwIFTXFLNc6xgDCqF7WbVex+4xByVYNq1ZxlxlRNTRfmIxaAnSMyL4K5cJzmbogM96wBugY3a6OBR1ZFXVOGTuwSXbXGTlNBjPj1B1rSA4ZyzohxnHb9gwNox+Z4mIwdkagaLdsIRrGELAE+BGHETLjAxYj8gm3sGyOs6HAMaxV23+1hhHpHqfMUTb1CrZ69po9SMOIVMcZc5QNHTiKeXpu2sMcMuLV8Sg2KXxdMr+sYax1045dWG2kUUmYmtHnZln7jmGLpKck1VHDWAMscU2ijMeOYPFGZZVHzQh5j8AZyuCbYMSLskA1I/LhWnnyY2TiOvhDcOHIyBeyUDVjLfLtcfjZP/7THKv7m0BWRETS7Vy6+ggVj/+nkY9My1G6vwuWdFTWqnWMzWDGJ7pOWTcYiPreD7CMiAbj0mA1yK/x/TA33/tUec/3+ltoNgsn5e5WpR1rGMtwD7594YK8mKj91RfhbM4qPMJKxgrO6tGSl791/j+2vTlEvhd/hJdG6kPFDSUjMuuRmc9LLyX7L14XMEu/083ZVXpB5RFWMjawF5BUHD+eHIxOjieJiELB5w53sM49SL2vuqNkxBzXFlW8TES0OlvC3fxHRO/LGzW5zbiRZ30WiUb+rc5PdcMBYzZa7VUPT1SMVdwDKhyq95z6noqxjr0q3JEmdW99pR1za8bTn2tuqhhZBzc41t/P6u66dV6KI139QHv6zG5gjJ+2uaEE7QbG0336+wpGX8R1EqXO/dUQQcHYmjsz/ut3phgKxtwV9fke7dk9RErGsFs7vk261GNenL/DduzvMW5xUDLmqAu/8wvE568o06YCs96+B0TSaujn0LSEwo7ApFni8vDP3kAeodR7v8HOi5MztgKrFG/T0i8/+z64Z0ei6F8+AGPKYZAPrrtE9NFYdzf3sLYN9f25H40qZ0QG4dNERNFfDZxsQp+VodSpHuWpbTbJGZFmvdH1Xrp5/MRB+HFPtHbmjProO7uyL+vNGdf7py6dON7MeCT998w/ONEV/p5395tTfjtjMVPox2/AJ1nE3/0b7/hHBWOveXY9/rpw2fSTE0jjSV00DcQkkpZ1C+Bgt0yZxd7pOXLEdADDYN9l+0ybWVJG5IPLtgBgYuLUwSNHledGzl29OvQZC21LUsYIwGibCSeisbE/lBx6vm1fxAI6du3asCw+KCkj4q5XPDM1OEhEDY1llRQMrswuzc0tzqbkUWFJGRGfmXbD4zRrKYhJ2dpxnjHj6lQyxgKAcZq1sceZZIwNwLb9HJpRytgIfMzsOKO7CwAcS8aIjHr03g93JWNEFs2yVgo7lIwReM0kOMv1nErCWAU4UibxUbRzSRgjwF64XDYZKSNQHXNZ1NkyOhjF8CVhRPx6O21HhHGH7dgAnG97d4cZW4G1a5PYQQ8uScK424o6S8acNhkJI3Lcstk/7KayY9zhsm4F3Cg7bUeoqHfajq6ucHVFNsY2ZIurFyRq2RgPAXbM8iz4bGWzWicwZ9GJrhV0R1arNQ9AyXo/v5WIx3PUvK2Mr/2WkXj5/pZ4O3N5stbHNs4kXFnL5hl/qS3YOGsTGiRHjNvyN23OgPS95ohHJivjAaeTmR44ByyMFY4ZPWhHFsY2/HQ9hby3o2MzknSFtzO5zbj+FbDjHe8Z250yelDUFsZ6x4xe+CVFxnbH/w3DezvuymZtteP/A2PKe8aDjpuMF85TgTHimNELM4qM7Vmug9lW1GkGMgmMjs2YAzsWOWa07eV3QwLj71lHlcl0xWkGeeWVV1555ZXXV1P/AyKASAZNk3zeAAAAAElFTkSuQmCC"
+         id="image1132" /></mask><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask1144"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHcAAADACAAAAAAbnaObAAAAAXNCSVQI5gpbmQAABYtJREFUeJztnM9vG0UUx5/j2PGuf//AjbPGdptwqNQKLjkAlXoqPXHiBndu3DlxRogLSPwHXBBVTwiJU6mQSAAhftRVRFqppKKC+ECcOjFJGyccCk29njfzZnaex4d9x53d/fj73uzMm7ezBogttthii20WLWFyUaomPLz/kH6LeROuJ77qROMWRtwFsZdGzNx5hHvEzF1A3MzNzYjlPj7m5SYQrk54TbiZjPi4jpuNuMgzz603Nyc+/piX62F6mf2cS4qPH/PqTeYwubzxzXlIg5abDbjYDKblZm2ul8e4vHpzKayFVW+6iCYKjzi55SzWcsKp16/gcjm5FWRKAN3w6nGLVTwN1AuvFjdRlZzNqLdckTQesnGLgSzZZtPrNbCRGQD49CYbRSmWq1816tJmTSyZW31e3q4ZXio3WEKSqv/tgIObCpqqUzS7FYmbbcpjy8TNnvfVJw1tc3P1+oL6NgeW+9Vcs0XqAXpJjoqbOHOOoBVAP7wS7ly1VkOTqbBlEjpFBkDrKsnnajVkXSC2Q3XH6j47pk3oTfu+73u+FhTwxempjcY8EuZeXNQEkm08AQtz0bQ8so0HIsRN+Wzc8RE8xEUqYuxcPrnwj4zr8XEd6R1J+xVjtxrPhKbGHQ9viJvKuuH65InAMleRvXFx+dwcToSmxT12xB2GEuxpcUPhHecyPkbhdGSMmyVmcda5U+vOU+Puy7hozTOynTji7kv9vBtebhSrlJveV69S9sIHFAovtwjcTzXXCgDKddmQ4Pm+AVbFRd5AjpluiYHCpeR5Gm+byVzK8iH8iFjgZihPFgMXf5vwjE08Ixa4BLnHDNw8Id8a6JZyKFyu8FrgGrl5NrnzFO7APjdPKBBy6CUVOxj0FijhdcQdmMyCFvxsJlfOxV+6nppZt5JyExQ/G82+cm6+QLgBg58pcjn0UrhDBi6lWw20K/yWuGbYyFxDN88iN+uIW0gTrt+1z6XIPWTglihuNlocybkUvaZyI+t1xGXQmy674ZYoyWSfgUuQO+LQS3Gz6bQg4VLCa+zmqHoZuI70zjnilkqEqxm4FLmw44bbd6TXqDKp4OI7NE/N3M0R9TJwHektVAklMwZumVKZZOBS3Dz42w13R3ezF4Er2fn71CLIjaaXgetIr+eIW0H3z/NyKXIPHHF3jAr8FrgRsLPGXeKdBTFuklIyC2+NsMCtlgmXau9NVXNJBX6t77po3DMUbqTNAGIuZW0EkTaZROBSqtOa3CJl/5f4Y+toXIretn3uIoW7vPiXOVfs0HSCYlfNsQjXI3GvRNgrLebmSNyFd2XZQWr1HUmzOL7EIaH53scPEOj5V1cLcPNXHi6sfHDtxsS0lFx+6cILaQCADs4VE64TuQAw+un2g/s9AADIFDJBKwiCp/Xy799HLxPrPVTuzj+9weoqAED/UXYymiuSy4RHd5bI3P9MOHGWAyT8GHffzsaz+ZYbLrTXHHHRFqRfWeJe0OTes8SttLe0uHdtbWhEueLx+c7vpAFabR3sB4n1Ht09pykMMbRjIQnNHUt6z2LfMSHrlJ8tBbhZ2xY3IL/n4dKKHcGb98QArL7x9SXK6yO1dZDjWML63U07es9qcuHGwA4XWVWg3B/XrHADJLvH3+N81LyItmnYingqxL8TPPqt3oosd+2zH8RvxGXPaeUT5efGUht98zma2EnHh/aHDXPq1hdfSQpc8nHJe/sN3Q82n1jv2y9vS09QjYeXX39Flzno3rrVVRU/lONw8s23pH8YELLd9fV1SoGJMP6nX756ibJ1BfY2uuu/UE6kcQHAe+3Ki1J0v7vV3fyDyKRzAQA67U57uTPx3xB7239ubmz0NJCa3CdWT+bz0ICSD/0hjHq9bd0/Zogttthii22m7V+oqSBpkidfSQAAAABJRU5ErkJggg=="
+         id="image1146" /></mask><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask1158"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIkAAACeCAAAAAAjnHY2AAAAAXNCSVQI5gpbmQAAB9lJREFUeJztm9tTG1Ucx38hEiAJJeGSCyEhhJZwa0AsU+soo9U+6Ex1HJ06js6obzo+++jojI/+Cf4P7TgdrbWtoyADtAwtkFJCIaVcc+mGkBQSKBcfWlvO7jl7frvZpX3I9y3nnD357Ln+zu/8FqCooooqqqiiDk8GzWssMQHA/tZzIzFUVJgrzBWGsqcpecjD1nY2kztEErPddqSCmbuTebieQTRRoSRWu73KxC+2tbzCgymIpNput2HL7ggPhG19SMxOZ6WyJ7ZXF2UGjVoSR+CIiqd27y5oS2JyOmvUPAcAsSVBO5Jyl9OukgMAcotL9OGinKS+tYxfSE7pMeo0UkpS1+AujAMAEpFswSQWb0OBDQIAAKszDwskcXeUa8ABAKnhvUJILE1N2nAAwEIkr57EEXBoBgIQiYhTXsI+2hSwaggC3sSaOhJzc7O2lkylVx1JVbBBUw4A8MXjKkiqWwtfRMQq86kgKe9VuOmi1HjvgVISZ5uabZevBqUklSc1Ws7E8txSRuLoYpuohcnqSCghsbWptUT4qlVCUtFWrxsI1BG/OCRd2m01UtWbDtpM8iTHm3UEAYP94JIiS+LrUlJxdm1zczNnsFqs1lrc1kDYOnIktcfxe40Qi8We2RzORh9mxhFl5Ei60dNmdZyYBhCP3+lp5D9GLFQyJB0eJEdybnZXnJYd2ecPdiSJpxXXN7nZ2XVKcv5OZR0lmRCud0pO4Habnb/j9IzkxDvakIRwgyR3LcHKWszzRi3R6CySim5U32xeSrMzYwHO0/sYkhMoEypzUc5jlOW9zCaCxBYsQYA8uiLrutrn1bGDIOk2IkD2routYlKlvDYhzjx0kuYWzCiZvC2fb+FVQjgN6CRdmCaJX+cUcPJINrgkPhcCZOea9GxLyM31wfEtJdTOF6atrAfVwZ06hMeARlJfjyARJAdbkQJ+Xi3LxC8aSRPGmJ9h+cueyNLBtQvIGigkxk5Ek6RvcQr08rfiGI+kHdMkoxI7gFQf39zLcUkwO86W/Cgxvt3Or+Mu+TJSEk8tvxKYlm0S6/tORB1h8qeUJICZwlNymR19GCM2nuSRYBb6JMM6AgBwnMZZneKXkZBUY/zPk8wcT+9RFAfkuCRBRJPsTTMyjr3ixXEADIod1RKSYwiSONUsMbWewAz2x3owIU4Rk7jqECSUqxG7z+tT4Hnak7qGxSTeUkQ9S6LfpmOtAYwd8UxR6eQTk2A2v42Dbim7y+VyKfU6LQ1J08QkfoT9msr8T+H0NmLWMLF2rq5ySaowfb0AUFJT63G61TrgLlFAxCSYzoH6c/ZajOnP0g3JvKGQ+DAkLQVQAMDUn9RkEQlmDheokX66/UuSWFy6kwz9I7nZoZGgBmxhIJdZOSSJR+cm2b58g5lHktj0JZkZmWFnHiLJ3vBwSiabJNFz6qz9LmvoieeObiTpsTG5BhGTVOrVO/tjY1FeGYLErGxrRyt6lcshItFlmOyGJ9lmL4vkiA4kt6+s4ArqS3I/MnMfW5YgMWlKko5EIgoC7MgRqx1JdjoypSzOjyAp0YYkNz9/f142YoxLokXvrM7PzzMd6GgSayE2IQBsLczcWVT7MEFiUN8miVg8Fo8p7hIWiare2Y3FY7FYnOMSVUiicD3ZTKWE1MoCNuxUCQmydx4JqaSQElKUACytSDYwZ33h5wy/UKEkOUybmGhhcc+FpKpK5ppLK5I8apwcBgmqTcCsCwgQq2regJFO4Rcq2gTt1NOdxFf66AUhcfvmXhAS8OtCQozYddSINZzWA4QkWcuiSBp6dCfJJ3CNoihoSBUJpHAkb+C94mpJVnAkpk+0iOsWiTwJW1/DofiEeyr+q/RUtcy9EOm1mNpDntE/vcnxQUh19PSp8n/HsSSbUyFctdZvLsj7ZUQKhELtACB3Gybyx0ax0yJkOi/zfqSqu0Khx+Hg/gbxNQiTZBptU7d9+xPqaFPe091refpvbjTJ4go2iA3sP/YPcBw0xpZgS5AIAWvBekFBCOODyKvOvjzQn2Rm1wSDQcntpJ9dnbg3Qj+gSQAA0qPXb0u936W+Fn+zjzYNtz9nXnlLxsUvSmOEt6dHExvJfAYASu0Ws93W3ORhrwXfMfdxyd3o4AcKScq6Hs+39C7mHdrxJEN91QpRngj3xRU72E5CEhl5Tx0JTmxzXOoxGcrh9h51CjBRpBEOE5OvqnxflOpZeyfFi/Qb0kpRp1YWIiUm59Zf51S+L0bMIUuL3braxQTXgKSaYU/QSJZ/bdOPxOZmkFBXw6UjQf0GyjIjbpMabbh7wXlS3RsjxPqsgR4LunLB5deLJGCkb4KMvSqWfNOoU+/Y/9ig/iVr11xaD5p1QonOUv+RGbh9Eb5QuRXyxBgo7BDyi5nvdbkWnBqjp8tZ0G991Kk1xtLw8CgjS9aWb/34jKYco8NDbNte/lRh/OozzXpoe+C87B0p73zz+rt9mnCEh4buypfgn7TOfl1VKEZy+NpNTmQv6ktn65dnC/m0ODowyPlCAE0C4O17A3lyFyk7Pj4e5hfDkwAY+z7sUTp2czf6BxW4+PG3XLa+M3iY9EQ4HFZ2K6jovs3W09nZwotMTkfnwmH2sqENCQCAsbnT73ZQvrnYTQhCYj46p/bORe29rNlRA26AykrYEgBWIS3oc+tTVFFFFVVUUfroP4vL55+m8dpuAAAAAElFTkSuQmCC"
+         id="image1160" /></mask><mask
+       maskUnits="userSpaceOnUse"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       id="mask1172"><image
+         width="1"
+         height="1"
+         preserveAspectRatio="none"
+         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKgAAACbCAAAAADTzo9rAAAAAXNCSVQI5gpbmQAABy1JREFUeJztnFtPG0cYhj+wg2MbH7AxPoABJ4Dahl60F1Fy3/ve9Q9U6s/ob6kq9Re0qoRaqRdRm6qJ2kahSQtVGiBA7XCwORkbDL0Axd7db2bfmZ01pNr3CmZ2Xj/7zezsHHaXKFCgQIECBQr0f9bAFf3u0CCdtVUK9Bs0mkwkBofCYSIi6pycthuNvQ5SsJ+gI+lEOuxMPt+rbzVcC0tBi0U1kvaiOC9aLEXEubtrr128mTPsKp1xKW1TXZQRKhTT0pKZzP7qv+eyI6SgUcWG0eST4/n8sGvZ5Hx2ZV+SLwWNKYIec4nxfMEdk4ioFF2piXNloKE49ANdMRENVaaksehVJv38lTBT5pJU7RJajpTxiRGF8qH58EtRngxUteYdVZ8uTyg6TDerghwZqOq11LZW/dDEBNY4exSrHAu6VBnosCroWe9/0Q/lPRKv7Du/8L2UyYge9f4zNZ1QK32p3PQ/bLrJNtpT87FKRffmXFxnBysS0Kh+7zRWySuW7Wq0uMIlS0DjqjF5Azo9o3qOvSq94oZTEtDYoOIvXIKGZmduKJa0qFBaY1INRrRzARqfvaVWzqG8z6DNFhFRdnZcrZhTIyGm7k2CEhGNz2XVSjFKjWw5E8WgA6r9fZOIbs8p34wYZZRAwzfV+/v59xSReOWWGBzh0SffTE4pVeNh+J7n5nmhMSZNHrVkZSoG268NqwzppPr60JHkVr1DhULBS++tp++dUz234Xd7dTVRLBRD/gCJFHUmAfOE/f2l5B3tMYaWmIk1NqHZe7j3gWEWqZgLA515Ld+RLB8Yl17VExFR+/SmURS5mLsGPJc972cjZX4LBlUenXoR08mgoFEvQ8zOTuOweRIZLqPTKGd/D4MqL0a8UWt1bf3k4s9Ht+/DNWgXWjChCbrz5GV3En223PoI8vHQRtNaoBtP1q0Jqy9mkHIeQFOqEygi2nm47kh7OoeUZFbbUFDldSjaWlpmliG368gQ68iZhIJmVUGf/cxveuwjq9gHziQQNMLc1GRq/sCuIhBRfRoorg+aUQvon4vCteMO4uRcaEVBlXqnxuLiqTDzFHA60u/wVUC3FnYluWHAybp+eVkO+/EUDHr25CfmZ7oaBJy43REQFL6Dbv32XH4A0s9xi84gKNo77X4r3BS7FAK6x6RhoDFw8fmPX904oeEi0zuBoElokHf++BHTr9iELBTpRxRqos1Hj90PigH9x6m/oCcLLwCnGLBC0OL2VDFQpHd6gXBCtzhmLc8kqGxrWM2Jq3mDoKy9OScINPK2gKaQxQcMFJnSeAAF3FsQ6E3A6ozdtsVAgQnTnntfT0QpYABe525MGKh2fTmE1A2/D34NQXmnPoMiTvoRDevb2+UvaBrZ5LoOEUXc+T7Frhsj7lbn/JDWFGgDiihSN3V/I+p3zUOgQH35fi31GRRxEsy6ANABD/Y2+QuaRh60ug4RRdyxiA5ePeiBbLmp6wTUTUPgZAi0IV6+U3SqC1auAFBk4uj7tWQqohiol1O+dhEVNXZ30CSykgddS9Ap64NmkMc0sIgip7wjSAdAgZldG4poGrDa9xBRpImyE0eHE1A3uyeCDDOg5pqoqOYBUHPXkienfoL6G9F4fyOqD5pFFsiE9lYrX0GhXVAINDnqbnXoIaJIzUOgmSH3Y3bYN42ITIFK3+1ScRKfsSsoUF9gE/XmZCSi5q6lbWGOG2jkbYnoKPLwlzgOFitfIwptK0MRjQOgx+xeGBEBEUWerIAimgUe695mntG4lAnQHcH7oOpOkjM2AdqPJuoKmuvrRa8PGjIXUeSUxdeSG+go8hKGxL5HOWDupQ+KhAGLaASwanuIKADagSKaS7kfI/segIGIbkPj+6K3JmoE1P0QIir5Czrm0b6r8auPKAbqb0RHjUU0MQE4yT5YIQdNIQtkG8AxNJoEDnopyZOD3kK6UWjTDnHaFs7syA20jDyVCi05IteS1EgKGroL2EfEY8geTQJO0kOkX9X4pIQwvP8UOGgWAJ0ekdw6hOWLE7P3KgABUefB8t+vXBpq8ivEaffBs5VNwSeAHKCJsQspfhhhq1at1qrVmmCX6O7nqNFxtVatVWtV+5nbQO9/qvidH5sONzYXfmfSP/5M1WlzY/PL3tZva6PvQq1SrOG5ub840CnlV01KpYMvev+3gSJ3Ihex7zQg/Zxdry1zRvOg3H0wrgVq+c8KOpD3DNriIlrWef1aBjqW0zC02XOjdGRE4pD1jG2gGu+B2cSOgMo6vjJQ7zXPX0vIDdTFyRbRa3TRn15BRIs6Ea1Z52JW0IJ3UO7DUmVgm8EhW2PvS0S1mqjtjC2gw94j+pqLqIFryQqa9/5ZCnb4ZDyiPjXRqPqQxOlkjag/oJPcB1JUnfoRUa2A7spAtW7JVnGfatJqonXbG8UW0B+hV5KkWmbSvtMx2vQIEihQoECBAgV6u/QfDfuwncWXSUEAAAAASUVORK5CYII="
+         id="image1174" /></mask><clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath1380"><path
+         d="m 72,202 649,0 0,848 -649,0 0,-848 z"
+         id="path1382"
+         inkscape:connector-curvature="0"
+         style="clip-rule:evenodd" /></clipPath></defs><sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1366"
+     inkscape:window-height="715"
+     id="namedview4"
+     showgrid="false"
+     inkscape:zoom="1.2691789"
+     inkscape:cx="228.99472"
+     inkscape:cy="-28.418818"
+     inkscape:window-x="-8"
+     inkscape:window-y="-8"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="g10"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0" /><g
+     id="g10"
+     inkscape:groupmode="layer"
+     inkscape:label="banner"
+     transform="matrix(0.9375,0,0,0.9375,-94.046064,-73.279967)"><g
+       id="g14"><g
+         clip-path="url(#clipPath18)"
+         id="g16" /></g><g
+       id="g202"><g
+         clip-path="url(#clipPath206)"
+         id="g204"><g
+           id="g210"><g
+             clip-path="url(#clipPath214)"
+             id="g212"><g
+               transform="matrix(94,0,0,-21,170,102)"
+               id="g218"><image
+                 id="image224"
+                 mask="url(#mask220)"
+                 xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJMAAAAhCAYAAADd55lrAAAABHNCSVQICAgIfAhkiAAADK5JREFUeJztW1tvG1UXXXPxjJ3asXHqUMeJkjimogk8RIG2QiA/0IdKPPCU34P4MTzxBBISQkJqUJS2UqK0QeLqJHbtxknc3H2Z+3wP1j49Z2ZyKSpQPnlJFbE958w+++yz9tp7BgmAjwEGeA2Q/20DBvj/wSCYBnhtUP9tAwYIo1QqIZfLQdM09p1hGHj8+PGF40ZGRuD7omo5PDz8W2yMwiCY3kDkcjnYtg3Lsth3siwjn8+j2WyeO25mZgau67LPkiTh/fffx9LS0t9qL2GQ5t5A5HI5xGIxyLIMSZIgSRJUVcW1a9cuHKcoChRFYWNkWUa9Xv+HrB4E0xuJb7/9Fjs7O5AkiX2nqpcnkVarxYIJABKJhMBufzcGwfSGolarwfM8AP10ZVkW0un0hWMqlYrw2bZtxOPxv83GIAaa6Q1FOp2GJElMUJumiSdPnlw6zrZt9rcs/7NcERlMi4uL2N/fF74jEbe4uIj19XUUi0X8/PPPFwrCL774Al999RVGR0cZ3VqWheHhYfR6PaytrbFr5+fnoSgK+2xZFjY2NoT5SqWSUJ2kUinUajUAwOeff45qtYpYLHbueLL/wYMHmJ6ehmEY0HUdnU4Hv/zyi3BduVyOXP/CwgIqlQreffddVKtV7O3theZfXl5GqVTCyckJ4vE4tre30Wq1In1ULpfx5MkTTE1NIZvNotPpYGdnBzMzM+h2uwD6zKTreuR4HsEAtCwLmqahXC4jkUjg8PAQqqri+PhYWG+wCtR1XdjXt99+G3Nzc4K4531CkBDRAb979y4cx2E3UBQFL168wMTEBDzPg2macF0XkiRBURScnZ2FNiOfzyOfzyMej8M0TTYX5XNd17G7u4utrS0AwO3bt+G6LruOxCO/WRRwvu9DkiTEYjFYloW1tTV89NFHcByHLViWZTSbTTQaDQD9Tet0OszZvPNI7K6srLD1e54nzCXLMhRFged5zDeapqHVarH08tlnn+Ho6AiWZQnzy7IMTdNgGIZwgLLZLObm5tDr9eD7PmRZhud5kCQJjuNA0zR4nsfGLy8vB7cqtG/kQxLtjuNAURRhP1VVRTKZxI8//ggA+PDDD1lKJX+8ePGCrSvoW0mSoGkaYrGYEFCRPOg4DqsIyPmpVAqdTge9Xo8tGABc10UqlRLGDw8PY2JiAqqqwrIsVpWQIZIkwbZt5PN5jI+Ps3tqmsY2TpZlFItFNufk5CQToTSXZVno9XrsGtd1mQCNxWJML8zOzqLdbgMAczRtMm2c4ziYnJxkzqY10rXEEo7jMBv4NDI/P4+9vT1B8NK9fN+HaZpIJpPst2w2i2KxCMMw2HwUULwNtK6r9ItUVWUBw/+Xt1mSJHieh263y9araZqw37QXPIg4KEjb7XaImSKDqV6vsxuQQXRKdF0PNcZisRhKpRKA/sbdunULvu/D8zyBkfjT4fs+bNvGjRs3APRTluu6zJm+7wsbk8vlQvfVdZ1ds7KywmyUJAmmabKTRfRP8/LswgfE8fExAGB3d7fvHM4WTdMExiFRTGmET9HkdF6/ULBQ+rx16xZkWRbm8zwPiqIIfiD/djqdqK0SYBiGMM62bSETEHzfh+u6jGmOjo4YA9K6R0ZG2PUrKyuwbZv5VlVVvPXWW6H7RwbT3t6ecCrJGN/3UavVhO8BCJtOQUEbRU5aXV3FxsaGUOJ6ngfP87CwsIClpSVmMEHTNCwsLADoOzR4XzpxPHjmA4B79+4JmwoAyWQSmUwGuq6z+yUSCXYaK5UKXNcN2dJoNNh3nuchkUig0+nAsiyB7Q4ODjA9Pc3SF9llmiaWlpZQLpdhGAabS1EUNJtNzMzM4NGjRzBNUyjxZVlmWvAiBNcpyzISiQR830ez2RTmBIBCoQAATKKQPSQDeN1I5KIoCk5PTyMboefKfdu2Bf0iSRLW19fRaDSwuroqULbneYyueZCm4HVCMChc18XJyQmA/ibzDGLbNnq9Hu7du8cClGcn/r537txhwcU7/+TkRDhxyWQSm5ubaLfbME0TwEvWyOVybG5d14Vx1WoVu7u7uHbtGmzbZqe+UCgIOkWSJKTTaRwcHCCbzUYy39nZGWMy+r3RaODrr78G0N9c+l6SJBiGcWlbAOgfCP4AECmsra1ha2tLIAhKvYSJiQnhN8MwWNHA+/Y8VgIuCCZeDLuuG6ragq1+APj000+F3ojjOLh+/bow7tdffxU+K4rCHPXbb7+FhODp6Sl6vZ7gCD79EP2TzvN9H8+ePWMBHEzLpmlienqaffZ9H4qiIB6PC0UEvz5KPwCwvLyMp0+fYmNjA0tLS0w083PJsoyTkxOW5mmTf//9d7Yu3rcUZDyC1RV/eKNQKpUEZvI8LySQKcVH4ZtvvhEOORU3wEu2v4iVgHOC6f79+4JglmX5wpNB156dnQlOUBQl5AQ+NZGBhFarJSzI930MDw/DcRx4nscEJp8eNE1DLpdj6dTzPGQyGTYHz7BUofEsqqoqjo6O8MMPPwh2xuNxoZo9r/ln23ZIp/Ag7be6uir4gJ87WHIDENjOtu1Ln68Vi0WBSVVVDTUxg0VDlGyg30lyXJWVgHOCia+QyDg+VY2MjAgUqes64vE4VFUVDLQsK+SEqakpIeASiYQQcLzw9zwPqVRKOE3NZlO4x9TUFGZnZ5mdqqoKDMMHryzLcF0XiUQCsVgM3W4Xjx8/ZozBg2fmYGXDg1oV/Dhi5VqthmKxGHraz29o1Nwff/yxsObLnskB/RTK20EtER4820qSFDroPMvKssyKnquwEnBOMPEMI0lS6FTevHlTSDlnZ2eoVCoh4xRFCTX/MpmMkKYajYZgoGEYQjDxebxer6PZbAppxTRNdLtd1g4INhGDcBwHP/30Ex49ehTqjRHGx8eFcvqiRxlBoaxpGhKJBJ4+fYpWq8V00EXg2YyqYr71cpWHtcFnd++8847wOZ/PCwfT87yQdHn+/Dn7O5gOL2Ml4JwOOJXYlPN7vR7u3r3LSnFFUZgDNE1jPZytrS3k83lWxcRiMcZgi4uLqNfraLfbgv4JGqjrukD7tKmaprGg1jSNpS8qr6laoo44gS+/ySmlUgmFQgGbm5usNcGnIeo+853k9fX1SAcGg991Xdi2jXK5jFarxYKQb27y9lDKnZ2dRT6fh2EYsCxLSOXBTHGeHdSboj27f/8+UqkU68jz8wTTMdBn/enpaeZb2gdVVXF6ehr5RIFHJDMFG2+kU0zThG3bzAF0Q6qCKpWKYCQt8L333kO1WhVeqVAUBfv7+0L6BF62C3gQO9BmdLtdQR/w1wTBl9TEdJlMBt1uFzdu3GCBSA28fD4vBBKNS6fTjDV4jI6OCvYSk/d6PQwNDcGyLNagJfCpHACuX7+ObDaL4+Nj9Ho9oScUbNGch6GhIUEbAv1K9vnz55iYmBBaEeSXoKYCxKYu3V9RlEtZCTgnmHjxKUkS67nw+oOCLJ1OC2mq2WwyIUclJukCavopioKdnZ0Qi9C9o5zHVzzBngstOKoXs7+/H1oP2c/fh9iVHhnx6yQ2y2azLOgI3333HXscQzBNU9AewUDnmYds4g8oL+pd10WhULi0NUCHmHwRj8fhOA67F98sVlWVdfSD4K+l+fb29q70gl1kMGmaJpSufAOSf+4zOjqK77//Xhhbq9XYaeRTEHWRAWBzcxPPnj2LNGhzc5Mtmj9pvFAdGhoSrpEkCfV6PcRyQJ8t+eahpmks8GhDO50ODg4OALwsJnRdZ//i8TgSiQQURQm1OoC+xtJ1HaqqIh6Ps5fUfN/H0NAQTk9PBRG+uroqPCEg/6qqilarxXpxNM9V3mUKPj/8448/mCzg7xGLxaDr+rl68c8//2R/02G7So8LiHjQOz4+jrGxMeHZVLvdxtzcHNbX12EYBmZmZi6NVHq7gJ4pZbNZzM/PX0mQBkX76OhoaNx5T/Uvs4nH7Owsvvzyywuv4XGZ7VFjLxpTKpVwdHSEZDKJ27dvs2tfdZ7gGH6eBw8eoFQqQdM0VKvVyGzA45NPPoFhGCz4Dg8PI9NhFELBdOfOHXZiqFTkxekA/7+YnJzE2NiYUMm6rhvJ+FEI8aeu60I+lWUZpVLpyqwywH8HH3zwATRNw/b2Nm7evAnLsgRZ8yqsBERopna7zcQflbqZTAb1ej2ymhngv4l8Po9EIgHTNDE2NoZ2uy08aPc875UCCYgIpng8LghDwlXK0wH+O5iammIVJIl3/rnqX5E2oTRXKBRCr+wCfRH88OHDV77BAG8mHj58iFKpxF7FcV0XjuNge3ubVbavisjXdgcY4K9g8L86DfDaMAimAV4bBsE0wGvD/wBhn/6+SiWiOwAAAABJRU5ErkJggg=="
+                 transform="matrix(1,0,0,-1,0,1)"
+                 preserveAspectRatio="none"
+                 height="1"
+                 width="1" /></g></g></g><g
+           transform="matrix(0.420242,0,0,0.420242,37.2812,23.430599)"
+           id="g226"><path
+             inkscape:connector-curvature="0"
+             id="path238"
+             style="fill:url(#linearGradient228);fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 509.55899,174.25999 c 0.633,0.31701 2.064,1.10601 3.19302,1.13501 0.61402,0.015 1.25696,-0.18499 1.76697,-0.528 1.32904,-0.89399 2.46704,-2.24 3.008,-3.74701 0.21405,-0.59599 0.026,-1.899 0.026,-1.899 l -4.22199,-15.515 -2.19,0 0.55502,-2.95498 7.01798,0 2.823,13.48298 5.27704,-10.68599 -2.21601,0 0,-2.929 7.94098,0 -12.13702,24.696 -1.87299,2.11099 -2.53302,1.47802 -2.71698,0.28999 -2.53299,-0.23801 -3.087,-1.50299 1.89999,-3.19301 z M 496.25201,158.194 c -1.03402,2.08099 -1.87802,4.802 -0.90301,6.909 0.40301,0.871 1.48999,1.318 2.418,1.56401 0.67199,0.17799 1.42499,0.10998 2.082,-0.11602 0.531,-0.18199 0.974,-0.57598 1.38501,-0.959 0.44498,-0.416 0.85699,-0.88699 1.142,-1.42599 0.24099,-0.45599 0.44299,-0.935 0.544,-1.44099 0.228,-1.15702 0.39499,-2.32601 0.37,-3.50402 -0.02,-0.96399 -0.087,-2.06399 -0.526,-2.92299 -0.29102,-0.567 -0.85001,-0.792 -1.469,-0.944 -0.46701,-0.11599 -0.89801,-0.069 -1.34301,0.116 -0.72199,0.3 -1.383,0.58499 -2.00901,1.056 -0.63199,0.476 -1.33899,0.959 -1.69098,1.668 z m 0.723,-4.756 c 0,0 2.41998,-1.994 3.81198,-2.505 0.79101,-0.291 3.80999,-0.72 4.578,-0.372 1.62402,0.735 2.49402,1.737 3.00302,2.86699 0.508,1.13102 0.771,2.86801 0.879,4.12201 0.14599,1.70999 -0.151,4.165 -0.58902,6.34101 -0.332,1.64599 -1.12399,3.02699 -2.02399,4.32499 -1.17499,1.696 -2.01199,2.373 -4.04599,2.72 -1.09002,0.187 -2.138,0.517 -3.59002,0.103 -1.58698,-0.45199 -2.59498,-0.896 -3.74598,-1.802 -0.80001,-0.629 -1.28003,-1.69901 -1.28003,-1.69901 l 0,3.11802 -5.39398,0 3.749,-25.38801 -2.12101,-0.947 0.045,-2.627 8.00598,0.059 -1.28198,11.68499 z m -26.228,2.43199 c 0.32199,1.64602 0.089,5.33001 -0.95001,7.38701 -0.33799,0.66899 -1.04599,1.467 -1.715,1.874 -1.11999,0.681 -2.44501,1.33799 -3.74701,1.18699 -0.52798,-0.06 -1.06998,-0.379 -1.37198,-0.81799 -0.526,-0.765 -0.48102,-1.71001 -0.501,-2.638 -0.026,-1.179 0.14498,-2.469 0.42199,-3.61501 0.207,-0.85399 0.46701,-1.74598 0.95001,-2.47999 0.431,-0.655 1.02198,-1.24201 1.715,-1.61 0.60498,-0.31999 1.31998,-0.424 2.00498,-0.448 0.70202,-0.025 1.43801,0.042 2.08502,0.31599 0.427,0.18201 1.01898,0.38901 1.108,0.845 z m 1.42599,-10.69 -0.708,6.75402 c 0,0 -1.85801,-1.06801 -2.874,-1.38001 -0.806,-0.248 -1.65799,-0.405 -2.5,-0.37401 -1.07,0.039 -2.10901,0.24401 -3.108,0.63001 -1.013,0.392 -1.96701,1.043 -2.75,1.796 -0.97101,0.93199 -1.67001,2.101 -2.23901,3.321 -0.43698,0.937 -0.767,1.933 -0.97,2.94699 -0.25299,1.261 -0.48999,2.63401 -0.48499,3.91802 0.011,1.59799 0.068,3.19398 0.59699,4.70199 0.281,0.804 0.79,1.55001 1.418,2.127 0.62701,0.57601 1.42901,0.96601 2.238,1.23101 0.45301,0.149 0.94202,0.19099 1.41901,0.18699 1.10599,-0.011 2.24701,-0.097 3.28299,-0.485 0.73401,-0.27499 1.34302,-0.81 1.97799,-1.269 0.83103,-0.60099 2.38801,-2.052 2.38801,-2.052 l 0,1.791 -0.63498,0 0,1.642 7.57498,0 0,-3.13499 -2.12699,0 3.54499,-26.00701 -8.13398,0 0,2.57401 2.08899,1.08198 z m -103.24701,8.33701 2.57401,17.185 6.87399,0 4.45902,-12.51 1.794,12.51 6.48999,0 7.784,-18.07801 0,-2.22099 -6.80701,0 0,3.114 2.08402,0 -4.45902,11.218 -0.81799,0 -1.42499,-13.852 -5.936,0 -5.224,13.79901 -1.715,-14.27901 -7.573,0 0,3.114 1.89798,0 z m -13.402,0.796 c -0.62,0.098 -1.142,0.192 -1.68799,0.50099 -0.81299,0.461 -1.612,1.05701 -2.11099,1.847 -0.487,0.77302 -0.58701,1.73801 -0.73902,2.63901 -0.19299,1.14701 -0.22098,2.31999 -0.211,3.483 0.011,0.9 -0.015,1.83699 0.396,2.638 0.21002,0.41199 0.58301,0.89299 0.97601,1.135 0.61801,0.38 1.176,0.612 1.9,0.659 0.79999,0.053 1.64099,-0.208 2.32199,-0.633 0.655,-0.409 1.13901,-1.074 1.53,-1.741 0.509,-0.869 0.78201,-1.867 1.00302,-2.85 0.224,-1 0.36999,-2.036 0.31598,-3.06101 -0.054,-1.02199 -0.20099,-2.07798 -0.633,-3.00699 -0.30099,-0.64801 -0.78299,-1.112 -1.42499,-1.425 -0.48999,-0.239 -1.09701,-0.269 -1.63601,-0.185 z m -7.30698,-0.81199 c 0.72198,-0.735 1.552,-1.38401 2.46298,-1.86602 1.137,-0.60099 2.387,-1.02299 3.65702,-1.23098 1.669,-0.27301 3.41198,-0.31401 5.074,0 0.97199,0.18399 1.96698,0.49398 2.76099,1.08299 0.854,0.632 1.492,1.554 1.97799,2.5 0.473,0.92 0.75302,1.95399 0.85801,2.985 0.18301,1.786 0.026,3.63 -0.41001,5.373 -0.36798,1.47501 -0.97598,2.92 -1.828,4.179 -0.746,1.099 -1.68698,2.11 -2.79898,2.836 -0.99201,0.648 -2.17502,0.967 -3.32102,1.26801 -0.961,0.25399 -1.95398,0.45199 -2.94699,0.44799 -1.336,-0.011 -2.73599,-0.09 -3.95599,-0.634 -1.21201,-0.54001 -2.09302,-1.465 -2.87302,-2.53799 -0.67398,-0.92601 -1.13098,-1.76401 -1.45498,-3.17101 -0.23502,-1.018 -0.44101,-2.42599 -0.41101,-3.47 0.037,-1.286 0.39401,-3.024 0.92001,-4.19701 0.57999,-1.291 1.298,-2.554 2.289,-3.56498 z m 104.737,15.24798 c -2.43201,1.123 -5.09,1.871 -7.74701,1.871 -5.87601,0 -7.97202,-3.44299 -7.97202,-7.97099 0,-7.86 5.01603,-12.351 11.11603,-12.351 4.11698,0 6.138,1.87101 6.138,4.941 0,5.351 -5.651,6.92399 -11.49002,7.522 0.112,1.91 0.89902,3.668 3.706,3.668 1.34701,0 3.181,-0.412 5.427,-1.347 l 0.82202,3.66699 z m -3.55502,-12.987 c 0,-0.89799 -0.63599,-1.42199 -1.79599,-1.42199 -2.09601,0 -3.818,1.834 -4.379,4.791 1.60901,-0.22499 6.17499,-1.01101 6.17499,-3.36901 z m -33.46,12.987 c -2.43298,1.123 -5.08999,1.871 -7.74798,1.871 -5.875,0 -7.97101,-3.44299 -7.97101,-7.97099 0,-7.86 5.01498,-12.351 11.116,-12.351 4.117,0 6.13699,1.87101 6.13699,4.941 0,5.351 -5.64999,6.92399 -11.48898,7.522 0.112,1.91 0.89798,3.668 3.70498,3.668 1.348,0 3.18201,-0.412 5.42701,-1.347 l 0.82299,3.66699 z m -3.55499,-12.987 c 0,-0.89799 -0.63601,-1.42199 -1.79699,-1.42199 -2.09601,0 -3.81702,1.834 -4.379,4.791 1.60998,-0.22499 6.17599,-1.01101 6.17599,-3.36901 z m -90.849,22.64202 -0.075,-0.14901 1.086,-6.25 2.32001,-16.731 c 0.075,-0.448 -0.037,-0.673 -0.33701,-0.785 l -1.83398,-0.674 0.41198,-2.84401 7.48502,0 -0.448,2.99401 0.11099,0.037 c 2.20801,-2.05901 4.529,-3.40601 6.887,-3.40601 3.21899,0 5.46399,2.05802 5.46399,7.485 0,5.16501 -2.021,12.83701 -8.982,12.83701 -2.43298,0 -3.78,-0.935 -5.16498,-1.90801 L 327.636,174.623 c -0.038,0.412 0.035,0.562 0.52301,0.599 l 3.781,0.375 -0.41299,2.806 -9.99201,0 0,0.001 z m 7.486,-13.28601 c 0.93499,0.78601 2.17001,1.46 3.55499,1.46 3.03201,0 4.15402,-4.267 4.15402,-7.56 0,-2.20899 -0.52301,-3.669 -1.94601,-3.669 -1.49701,0 -3.405,1.61 -4.75299,2.808 l -1.01001,6.961 z m 89.44601,5.352 0.375,-2.80701 1.72098,-0.22499 c 0.52402,-0.075 0.599,-0.18699 0.67401,-0.748 l 1.57101,-11.41501 c 0.037,-0.41198 -0.036,-0.67399 -0.37402,-0.78599 l -1.87198,-0.674 0.413,-2.84401 7.41,0 -0.487,3.36801 0.11298,0.075 c 1.45901,-2.095 3.556,-3.817 5.95102,-3.817 0.82299,0 2.24499,0.14999 2.88198,0.33701 l -0.936,6.81199 -4.379,-0.15001 -0.112,-1.94699 c -0.037,-0.336 -0.113,-0.448 -0.41199,-0.448 -0.71099,0 -1.872,0.86 -2.92001,1.946 l -1.30899,9.506 c -0.075,0.599 -0.037,0.711 0.52399,0.74899 l 3.556,0.29901 -0.413,2.76999 -11.97598,0 0,-9.9e-4 z" /></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+           id="g240"><path
+             inkscape:connector-curvature="0"
+             id="path242"
+             style="fill:#e2e2e2;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 256.02301,135.437 -59.66301,0 c -16.43201,0 -29.8,13.36799 -29.8,29.8 l 0,73.52701 c 0,16.43199 13.36799,29.79998 29.8,29.79998 l 59.66301,0 c 16.43298,0 29.80099,-13.36799 29.80099,-29.79998 l 0,-73.52701 c 0,-16.43201 -13.36801,-29.8 -29.80099,-29.8 z M 191.561,165.23599 c 0,-2.64599 2.153,-4.79999 4.79999,-4.79999 l 59.663,0 c 2.647,0 4.80102,2.153 4.80102,4.79999 l 0,73.52701 c 0,2.646 -2.15301,4.8 -4.80102,4.8 l -59.66399,0 c -2.646,0 -4.8,-2.153 -4.8,-4.8 l 0,-73.52701 0.001,0 z" /></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+           id="g244"><path
+             inkscape:connector-curvature="0"
+             id="path246"
+             style="fill:#e2e2e2;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 531.664,250.155 18.49799,0 -2.80896,18.06399 5.58996,0 37.586,0 2.60004,-17.71798 c 4.97998,-1.09101 9.13299,-3.45501 12.51196,-6.69301 3.08399,4.075 8.56598,7.36999 18.25202,7.36999 6.33801,0 12.77502,-1.80699 17.17401,-3.68699 4.25396,2.399 9.46301,3.68699 15.45898,3.68699 3.08801,0 6.23602,-0.35499 9.42603,-1.02299 l 67.13495,0 3.354,-24.827 -5.44501,-0.76401 1.87903,-13.356 c 0.37097,-2.38598 0.44898,-4.65999 0.44898,-6.15599 l -0.008,-0.375 c -0.45697,-12.19101 -8.13898,-19.765 -20.04498,-19.765 -2.404,0 -4.62299,0.314 -6.67603,0.85201 l -34.18896,0 -0.035,0.24399 c -2.52698,-0.70099 -5.40997,-1.096 -8.68597,-1.096 -3.80103,0 -7.40601,0.55499 -10.76001,1.59799 l 0.10504,-0.74598 -12.46704,0 1.82599,-12.95101 -27.30896,0 -1.84601,7.65799 c -1.37299,5.70401 -2.21301,5.79302 -4.453,6.03002 l -4.508,0.47699 c -3.04901,-1.424 -6.35699,-2.06501 -9.60199,-2.06501 -2.13501,0 -4.27502,0.28402 -6.41602,0.85201 l -19.29101,0 c 0.50201,-1.772 0.77502,-3.674 0.77502,-5.67799 0,-9.60102 -6.846,-16.30501 -16.64599,-16.30501 -11.055,0 -18.77503,7.72101 -18.77503,18.776 0,0.951 0.082,1.869 0.219,2.76401 -2.13501,-0.28801 -4.27698,-0.40902 -5.55298,-0.40902 -2.05298,0 -4.07202,0.28801 -6.04498,0.85201 l -31.34205,0 c -2.73999,-0.55299 -5.64099,-0.85201 -8.53698,-0.85201 -7.138,0 -13.49201,1.67402 -18.80799,4.72301 l -3.45102,-1.461 c -3.71099,-1.571 -11.23199,-3.26201 -18.979,-3.26201 -8.93298,0 -16.383,2.56002 -21.57599,7.01601 -3.26501,-4.47301 -8.52301,-7.01601 -15.228,-7.01601 -4.82199,0 -9.02099,1.47701 -12.57199,3.44001 -2.996,-2.204 -6.79602,-3.44001 -11.11502,-3.44001 -2.32699,0 -4.47998,0.31501 -6.47598,0.85201 l -33.96301,0 -0.035,0.24499 c -2.526,-0.70199 -5.41,-1.097 -8.68698,-1.097 -20.458,0 -35.307,16.03101 -35.307,38.11701 0,17.363 10.785,28.149 28.14798,28.149 3.087,0 6.23602,-0.356 9.42602,-1.02299 l 88.81598,0 c 3.70602,0.67599 7.66901,1.02299 11.15402,1.02299 8.90698,0 16.27799,-2.375 21.50998,-6.593 4.87201,4.252 11.58502,6.593 19.728,6.593 3.05301,0 6.20602,-0.368 9.28601,-1.02299 l 44.66397,0 2.06903,0 0,-0.001 z" /></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+           id="g248"><path
+             inkscape:connector-curvature="0"
+             id="path250"
+             style="fill:#f5f5f5;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 255.02299,133.437 -59.66299,0 c -16.43201,0 -29.8,13.36799 -29.8,29.8 l 0,73.52701 c 0,16.43199 13.36799,29.79998 29.8,29.79998 l 59.66299,0 c 16.433,0 29.80101,-13.36799 29.80101,-29.79998 l 0,-73.52701 c 0,-16.43201 -13.36801,-29.8 -29.80101,-29.8 z M 190.561,163.23599 c 0,-2.64599 2.153,-4.79999 4.79999,-4.79999 l 59.66301,0 c 2.64699,0 4.80101,2.153 4.80101,4.79999 l 0,73.52701 c 0,2.646 -2.15301,4.8 -4.80101,4.8 l -59.664,0 c -2.646,0 -4.8,-2.153 -4.8,-4.8 l 0,-73.52701 0.001,0 z" /></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+           id="g252"><path
+             inkscape:connector-curvature="0"
+             id="path254"
+             style="fill:#fbfdf8;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 195.36099,251.62601 c -8.16099,0 -14.79999,-6.64002 -14.79999,-14.80001 l 0,-73.527 c 0,-8.161 6.639,-14.80001 14.79999,-14.80001 l 59.66301,0 c 8.161,0 14.8,6.63901 14.8,14.80001 l 0,73.527 c 0,8.15999 -6.639,14.80001 -14.8,14.80001 l -59.66301,0 z" /></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+           id="g256"><path
+             inkscape:connector-curvature="0"
+             id="path258"
+             style="fill:#f0f4e1;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 255.024,152.49899 c 5.96401,0 10.8,4.83501 10.8,10.80001 l 0,73.527 c 0,5.965 -4.83499,10.80001 -10.8,10.80001 l -59.66301,0 c -5.96399,0 -10.79999,-4.83501 -10.79999,-10.80001 l 0,-73.527 c 0,-5.96399 4.835,-10.80001 10.79999,-10.80001 l 59.66301,0 m 0,-8 -59.66301,0 c -10.366,0 -18.79999,8.43401 -18.79999,18.80001 l 0,73.527 c 0,10.366 8.43399,18.80001 18.79999,18.80001 l 59.66301,0 c 10.36601,0 18.8,-8.43401 18.8,-18.80001 l 0,-73.527 c 0,-10.366 -8.43301,-18.80001 -18.8,-18.80001 l 0,0 z" /></g><g
+           id="g260"><g
+             clip-path="url(#clipPath264)"
+             id="g262"><g
+               id="g268"><g
+                 clip-path="url(#clipPath272)"
+                 id="g270" /></g><g
+               id="g276"><g
+                 clip-path="url(#clipPath280)"
+                 id="g278"><g
+                   id="g284" /><g
+                   id="g286"><g
+                     id="g288"><g
+                       transform="matrix(48.626007,0,0,-54.487297,103.364,135.728)"
+                       id="g290"><image
+                         id="image296"
+                         mask="url(#mask292)"
+                         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATAAAAFXCAYAAAAlChIRAAAABHNCSVQICAgIfAhkiAAAIABJREFUeJzsvd9uXFeSr/lFrL2TpCTbbR9316npwhQwEE4PfDMXegDNA8xtPc/BPE+/xNQDGBhgMAZm4NNoD6pPdf3pqpIlimTuvSLmItbaeydFyRZFUUo7vio5k5nJ5M5k7h8jYv0ilgBOkiTJEaIf+gCSJEluSwpYkiRHSwpYkiRHSwpYkiRHSwpYkiRHSwpYkiRHSwpYkiRHSwpYkiRHSwpYkiRHSwpYkiRHSwpYkiRHy/ChD+BWPIXH//aYaZrY7/fsP93j1flkqtSHjpljp46b88DA7AFu0fLp7lhdr5+1p3QHO2m328krP1JU7uWlJUn/rG6Jz9/lwW1XV2c8kEsuRZD28dQSMUkZlJcqwAv0UhAVhlGR7+H5WJAi7L7fsdvtGMfv+Owz+PoR8Nv3+9ruGuFjb+b+r8D/AU9ePOHi4oL9fs+z3TMenO+5+vyM8WJiLMZcRspkzFIpOmDVseJ4LRR3vIRguTlF23Uv8TMKMEMpjjt4KaFoHalxOW9ukhS05N1xv3b6DbQzshzeXgWG9gGc4/NXBcQEVQGp1DogWuO+drtUoeqMVEXLRLUzSp0o40S1wuw7dlcveT4WTs5P2O12fPnll3z9v30N//s9vAHvyMcjYL+Bp3+EF02ozv/+nP2LPZ++2HN5+YjpbMJmo+4qAzPlaqCcVmYKOhdkqFh1VBTBmJwQLikUZlzL8mFxc1TBXYFK/7C4A+qowxuz6zeIl1Hv6h1JfiLodTG6znURW7+R/okqFjfV9rkUAHXcoIhgVkEGRCpigomEmNlAlYq6UEVQN9QEc8VGY9hXzAta9lQrTKcDwzxwur/g0aMdf3kwUk4KD//0kLOzMx49+prf/q98NOL2UQjYkyfw5z//mocPX3I+7tlfPOB0V1Ef2DOhMjDvK0UNQZldEAxRwcTBDUEQcRxF3EHAq6MopgZxrYkW8aG5plH9PpHtW2LLtR+KuuyVK8nPHj24+EHWiOzN32GAuIAQn/d2WxEw659VA1EMQ0QQB0xwMRzDRZE5JMBRCobLgHtlPDVMBqoPDHXP1a6wqxc8qjvOzx8wjiO73Y6zs2/4+uu3flfujI9CwH71q1+x252jesIFe4oMCDOMBUyYvSJFwSXESgUxoYohONJehohi7ogrqEH8HyWCJrO4btouDVTBXOIG935xwHXdekWf7DUPTJJO/1DdoEvXb7o5IOsfWgAHccybYN3489pncfvH2AtgeBM9R+LvuBGfXQkpQx3MQQdcjIGKS8G0cnaxA/Y82xVOvj/h9PSUzz779oOJ2IcXsN/A3//ff0/ZF/TkCmpBTBmL4ApYxU2oXWAEBAeEGnEXEI9RBVDcjeUPkAi2/JVSROLX3YXNPJ6hc5A9tk/Gcv+P0KesjSXXeaXO9doHXrvaP4fuq0pd/4xvbq4eeUbcYBFtxamCQGQr7clF4j5xwT1KKma+pK14YVAHLVCdSR2qwXCCT87u6iWnpwPfP9rx8NlD/vEfv+W3H2AB4MOvQv4RPrmcmUbDrDCo4MUjDJ6gDooWa38lAA/5cmnREj3iEhxbwyx3XBTEEQcXQdyiSB9aFuIlQAuxAcQUu/YnbQ3QgwOJuhZ9/egPa/Lz4zVR2PKJWcKJ9oD+B9SvfU9XpU222eu/YLgLuLRviUgLMXBdbmv/BypIwXBUhaXYIk4Vp1SjatSTtSiz7RkUTk4ecLEb+fTFOeeXhRcv7uYtels+uIA9eQF/OH1IqRNWHRfHBzB3VCtqpf0CAHeEeIxI1Lrc118OCKJxPUQu/uPii+iIEEmnA264SktN2wPUaUEaPbIOVmE6+MDRo64UruQHkPYH7k0fFwHwQ60Tls//wbdpyyxc4w+02PLHGYcq3mrD4C4U8YjSXDBtp008CQBG++Z+PpnEc7TALE61gopwqROnVzDNxvTFxMXFV8A3d/2O/SD3f+Y9DdG6uPiK8/NzxvE5L08cnUd0cMQcqwUvNYREu05IvMG+Hvh6pYXD7QMSuiUhdi1FdPGl6OnuIUytTuACmB2mf9IF7HVFhq24dSWLFaAk2eLqQGmf3e5BfNM3tIe3muxyW7/as4V+m3j7/PeUcZt1tLpWv94UzsVCyKQ/T0R1vj4p0p7HVBGguGEiuCkulZEBl0rlhCuu+B/P/nTvtbB7E7AnT+C/80vO/nrJ5e6MUScmmaEWtDhSC1KcdlOI1xJ19Te2HW6LutxlvW0rWL0Y2a8vz7Gu2CDg1lZxBBCLhQEWTYzn7K6Ia7rUxasiSH9QhSzkJ6/gvti63Es37Sx3vfr4dlGuPaBHQurgqy0ogiaPr1WbePla6yKECJFFQ8XbamTLPnpmglg7VyzOsyKoRZQnRXADpVJ9aMV+0OpQwpJx8fkpuz/vGMfxXor79yZgv/71r/FP/wbTCFZgmMA0RCV+K4g7lbBKRK3LWwRUl+IlrBGUt5BX6GF0e/Pb/eaRUopJCJsCYpitzmVZREwwqYsILfevSrU6vPp9PbUllhTaekKSHFJYzKldQA6SQT986Cp2m7KFr1dcC6Wnmd4FDUQdN12us43CuqD1LKRlJPEUfSW/H46vn+seBLQ//oZSnH6WYs2ZNgOjCpUrdpeF80c7Tp+d8uWX371XEbuXGtjTp0/55k/f8KDuoiCohkvBC2gVbI61XIfmU4k3KyIhx1pxUgxo0dnyC3Bv+X9LL3vRwJ0ijlkU+DGLx5nG0rPEKg3aRLJG0V+ki1JtOWR7Edcvt9crocLtr9yW1wVkd1Xrz4DvbrjLtZft78SdxfqwCNL1yKo/vt9k22+Ox0ek0ZTNekS31tNcFOmriLamkFxLKdfn1SVLodeIeynYNlkIjnuYw80VlfY6ijAbYRxXYbSKz4rqjpc6cPrsgpcPjWfPHgPfvuM7+nreu4A9ffqUFy9e8MnljJ2c4HPFhrZsOxdcQyi8OeilFSBpplSwaJVwDaOqg6u0OqXgau3NbumktVQzcsdI8Pvzmy2poVsXq4pXX4TL8RaVKSxiBlApEh0dvaVoiRC7drVbt5/g154XdyQ8uXRwR9zhH4KD38m2+N7zHeNQwFr7UFnyoRCq/hGm90a6R7Qlm+fQ9njzJaWjR2LtOtZW5MP9unzOtXnJ1hJNu1v7qROfbet//N0xHFFpWbHjAjYBg0DZo7ZjkD1X4xmfXF5xfnEOT3lvPZbvVcC6eF1cXHC5OwPfM5aQnjopMsxUD4d82B5Yz3+nCVaLvlqh3tud3t50Fd38kns+2qMr2bhXaa7Vuq7qCGDxFwTZ5Ig9ZKZFdzPQorMlyBIBprWSKoJPXbvuX1bSf/Z23LvdpZ9p3lI/GRcR87ret1z2u2Vzu7CJvsr62G48NQctm1Y5XxWpR2YKZrEiadIiKvHwUS4RlyznTF8Uaz9sSRxxMIn6mBWLXkspCDNFR4SJy2FmPp158gLeVxb53gTsyZMn/Nu//dsyMWL8bKJWwQqoFvAZTFpVQBfjqYtz8Htr1XzHw/Kw5OvtUdeFy4lfaLffS1lFy4ivhUMhqyBalugMaUo0N0HSjTD1qGxqb99WN1Reka73mUIepCrLbdO7P/FPjBCr3eGNcv0xd/fzrv/O3Yk/jotAtf+M269ZFpj645fMsove4KBjTKvoCwPd5KqOeIjXNhLDSquN+RqZ9T/oXeAI8epnnvSD2LyQqND0rGYNMqJZzzEqXhUfFeYZlRnVU04vZy7u7q19hTsv4j99Cv/tv0Vr0MVwGquN+5Ey1ta2YxSkWRQiB3fpf5WkFeR7OWmNtrpwLW9ya4UQjZWUqIe1/kgXtBXvrbUdidYo3musLFYRRGekSvSJCUwiyMRaxG+XIlMLuIRpc/vyJv7IutfruM3Jc/1niMr1aSvJTZzGxU0jazp38ft403P6VqjaFfcmsePhfe7j+nV7nA/O0I7fzPHiuA8UjfpUTFwprdziqEWUZa6U5riPem/cZ80yEX5JZV1kkDUTop+ba6mlxxfemsQNZ6RQC6g7MzCIcDkof/inP8A/v/37+kPcuYA9fvyYafoTPNzhsyI+waB4dby01cAeZYmE72v7BEu/F4vM94jLf0C43BXxiqmgHsa+asRYEROqVtRCsGYVZA5BU52Q+VCcuqiJClzJcjhXKohcrfd1Nn9m7lvAclbZ7XidiL0PATt43jM28+nA/YRTDm9brpwe3m7mjBbRm9kY32/OUMLEejBCSmM2XmmTV0yc4pHlmLWacksjzRzdBAy9Xc+duL/dZu0cbK+6ZUpRC+5iogguNcTOCnJ2yZfDMx49gt/+A3cqZHcuYL988kvO/mrMxWOEUevBxjzGeVBxjYKieHTLd8/JGpb24nmEYouHq+XnjqMueDHE14jLvAmX2hJtxVykGTV9VbRUmCba1/KDYiWX7bIbCW8QDn2DmIjKG//y35Z+HOcAH6il46PnUVw8vHbz+/h9vAnb/Dzv3i2uidfZq2J24ift8eCjLWKGO+PQxMxiBt7QnteLU2zAWgqp6riVJSqzjXj1Qr5sFs/EtC1URY0sGpEj6ACWTpdYKIt6tHkFFYqHi7+oMY47pr/+Ow8fwtnZ3Q5OvHMB+6d/+k+8qI4MY8weGmCaIwxVb5aIa4XJJcJanPIRPXXxWv4qaERbimCtjUg1ehytXTc3tAi1ClIqWiPa0ipomSPS0hBLVUGmqL/ty371fl2t0ZeILALRRe7lS3lFvN4UBakeNr/Z9WbLdyCe+/s7e76fF58Cd/v76Gx/59vn92sC1i8fPlq/NrsuauvXtgsRO/GTmCzsjo2+RGa+EbOeapoabgOlxOPcHJWCiR0ImYsjNSKzHnF1I+ySCXmUf5YYY7E0EQtZ7s2goSGYHsc/P9qxe7Rj/Lc2/fV/4k4isTsv4l+ezuj5DrcZV2WaiRWPZSm5RVusDmEjxL2bT5TWGrERL8fDFV96n5hSxKIVAsW94qK4Kz5XBhVmFEMZZWJCgIK6MHoI054r5CQiq1Ha0rUKeroKVb9NVKLT375nd9ZMsY3y/NUZKW+KxLbYO0QA68/44C2tR8rLV265m9/Hm5+zfhKC5hvd3M9dvB61+66J2APnga0CVH2K6yetfuY7vNkcjMrYqlTmAy4Ss75mx3WgYOGD7CuU0RiM1369xTVNvBxp7ZFxkrrYMnbKe7lGfels6TW12YQyQLGZTy5m/grwj7/m4k/fwR9v/TYfcOef/OnqIaNcUlVbA+iMuTYXfGui7uFqW2fpp/+yCrP1UrQ3Mwr/8SZLiV8TKF4rrhLGWKkMIlQvGMIwzczFMQojyiT7iNqI2tnoA+rChevSwygIygtUhN1Z/H67QKkKpYz8ua6zx3XQJT0B0PHHjq5Lfk7YZDdfr3H9S6BWp6/EmPmh0DlM9kl4spqInZ3aKmg24acxleJAzMQYMUzGVrwP4XKMMhdMnYJGrWxjGu9N3oJDjQkx3TGkrktUFkj4yXokRnTCaKkwjdRx5PJ05vML+Csw7rkza8W7p5BP4as/wX7/mMvLS+yzc3RSVIXZhdKXY5tguTdNXx2rfY12ES3vURjaDHbWivXhGbNW/1IX1JXaalzVlDLMzFXQouis7ItQhj26F4axLOmfDoqqouX5DSIl/JkQKR3a7U2Yyh8KpawjgsdxXK7vdjs+REd+8rHzFfv9/uCWaVrtLrUe9p/VX8TXNhk2t/l11fi8+iJsPXqz+gl1rgeCZtVissuJM867ELghhG8cnFrHOH9mw6SgGt9TtFAxtK1GWjVENMyrCH2YKEtBvw1I2NSs3cOSsTQFIFAqWmZMCjsfmf2SKznlV+Mf3rnN6PYC9l/hq3/+ir+e/ZX9iz2PLmemM2OsYxTLARYVv/ajYqlivQ6Lv8prm0gkrWDfLrWEcBWUapXiig11ES4tQrWZMoRwTU20yli4vFTKrjCM5wznq1D9tcgrIlX+EOJUSlnEqQvTWdvC6Osecd3xikryM+E33JhCPYVlrtbFBXTh62JXa6X+oh4I2xfVqNWZHlbcYJ4eRq1sNh48cOps1NmwnbOrO3wXtw3VqTpQ1ELwNkIm7fyrSBOzPglmszq5qY+tJe3VXtRHVisV7/1/WvF5QHYG00w5/5zvvvvund7KWwvY06fw365+xe6P5wfTJYZalmVVt9UyAb1nkc1Ko7Xm0hZ5WSjbIl4tlFUM0xAv8zYGZDCKyRJ1TVUZxhCved6jRSmDcnGpDLuBMj5nPC+vFa0eVaVoJR+E32yu/3EVs62QQURutVb4FdRpFbMeoU1TxT+NVNLsEXVfOT21JSrrQlaLtahrwNQo1alSULEDEbM2xfhGEetZFSEky0DXjoSIwczMwFgcmaITbwAuVPjTN396p7ft1gL25MkT/vXFv7Lz6H1SBiaJfsHeB60lnLs94LL24r0VO/uYm6WYWP1AvLrH14uGaG3Ey1xRU4rNzEUoszKNE2USxpOBi8sQqR51qQrPdoXhLMp+b4q0gFeFC1K8kvthE6E92dhiLi6iVAO8Niq7nmrWyanzQ+zUOJ1XIRvHHVVrRGPFqXNEY1UsVihvELE+IQa2kZi0DDJcA751FRhRrxYBrwgFk/Ck1brn4aT8y7/89Z3eqlsL2OPHj7HP/oP5vCBe2PuMjhp9g9AmR7RX1H8ShKBpX26VtWAvhGO4i1fRwwjMheKRPtqg7fockVaNlLHMyjAWLveFMpxTRlmiruFkYPzL+IORFqRoJR8J11LN62J2U2R2Xcw+m+xQyFpqOV3N1NEZp5G5GGOxRcRmVhGLbQpDxHpP8mJoXWKv7gkLIROJxFG6y0BbmmkR1FQs5gDqnt99824WoFsL2K9//Wvqw0rlPLwjg0KVNkW1RpF+63lpS6vBZhVDWsG+pY83iZd77GOnHuIVda+ZwQo6NPGalKtdoewL48n5gXDpqMuQteuC9ejRxlP3D+0yBSv5GLkmaNdrZtvobCtm89Uc6eXDSp0itTzd1RCxwRimXZRkZou6mNQbRax2b1gXsTbwELPWS8nSQhmDL7xNa3dwRdvGFuaOmjHXU/79239/p7fk1gL2y1/+kt3nM/vZGCT6obyClpj1FfPq24YbslHq/lPZpI+xw8aaNpZr4kWheKVWoYyV2ZShKvNuosyKFuVqXxh2L9ldFp6fDgxnw1LbCuH6dnUBQ0ZWyU+Lp3Hx5JqgdTGbvoiNob+oxjQZ+9PKvH/Abpipsx2klCohYj2djNsU3Gg2cvpUCi96MD15mUEGxLjWJmYxtwe1ttuYOCbO3/kvl5fwzTdvv4J/awH74vEXfFJGqs9ocfZeUK+Ubo/w2B1Yu8O+r1a0n7p0TkmzStSNaJUbxMuUYZyZTSm1MI97hlpeibqePxg5fXb6qmilYCU/N34DT/7lVTGrv6h8+mLPxW5muopNpOepRio5jcxaD0VsLm0P1lW8DIOicR5bU7AWbXVz+tIE3ipJfTGv+dWxGcaTeTnc/+//evbWL/HWAvarrz6lzmObIaQgMyKKtxfZ92QUiT3s+nZo/eC736sX8BXHay/Yh/PEPHYLNm/+rmvitZ+HZYXx9HLgbycDp89OefjwuxSuJOk87RvprEJ2+dkln7yc2J/VV0RskIF5ihXKg0jMm4h594eFNwyX2IeyL9L1iYjt/PYWfcW5L0j1mERVZTHyAvzu07+8tbv11rbxeW/oqPgArr68oNh7UZbavfsSX4ZIaS/iR3Qmvn5PnyJhCLWJ12JOvR55tZSx2yP+UpTxwcg4joepYopX8nPnH+J8ODuD3e5bxnFk/MvIs11hd1EYT15yuS8MY6FMQrFCGeK8q6ar19LX89PaeavNdK7N0BoTYmjzxlgDmfY/QzB1bNaon40FxoIPyuO3D8BuKWD/FU52BlbRVou3VpRfjLlL02cr16vgKotgSRMxJ6auGrb4vIprpI1FXhGvMivDrjCejuwuCy8uB54/GKPm9fvCbvftGnndUcd7khw1/8wiYn//9/DZZ99yenrKcDaEtehcFxEbTwamaU+pylzj/LN+Pnr3YbYsyTV6nLWV9r2Pm16dBX0MfPeRFXcKBaQym0Sb0ixQlfPzX/7gS7nOrSOwOp1G5IQgUum7/vq6ngrta+nRV9tGZTGpllB0Jd6U7vOqVqllfdO24jWeDFzuC7vLc56fDtHh/peR3Z93PHz4MFYXM21MkkP+GfhtzOP6+lFEYrs/7xjOhjiPtpHYrsQCWS0RPLRIrHhtfszaBKu2c7m3CMqSOQa9q6bXwNs0C4/+S6xGIazMoDPz5/Prjv613KoG9vTpU/713/9P9kNB69Lx1ObVyzJpdTG89Zw4VlNjnMeyAhkN2i4tAmsm1eJK9cpgrxbsT/cXPD8dOPn+5OZVxoy8kuTNtB7m8/Nfs/9yz3wx80U1LnYz+4szdsPMXCrDtKOWyqDG3EYqSMuYelE/KvSy7kGxFPSDKHn7srGOaSvse+weHsMX4XJy/vLtX97qZdxKwH71q1/hn1xG7avN7u7Lp221FaSJ1NI21GcGNctEs0+EcDloSyM98m3z8HnNu+mgYN8jr5PvT/j0099xdrbxcqVwJcmPpxX3nz2LQQzb1cmtiI3zLlYmoxOZuV0u3jBXaIMMtwV9WAVmmUID4eonNgSpbrhHH6Zeznz33dsVwm41Tuf09CV72VHnPaLKakFtKaNAn+G1TGxcwstYflXAa28vMNyUAW95djRlTz4xLuK1erxOPj3hUz7lm78n08UkuS2/ha+fwhO+BR4z/Xnib58Zn7x0bPeS/f4BO2Aa9gzTjllmnNKMropKlH7wihSN1qFum/LDKCxcB31MVmRkFY2NSUxAoT58e0PErWpgl7uZearNNhHhoAmxRArdv9Z29W3TTVuBrxfxra06WptT371epUzRHmSxIjLsSrNKCOMY/Y3l9wX4JsUrSd6V1n2yrE4+GPlrEcoYI6fKoNFnPMSABC1zTDgutU1Ajj0oqoXjIHodY3JyGNnbTLGuA3hsCGaypp8a/ZLz/sFbH/6tBGx3eUY56VOCYma2WHhzm45FUU8I0ULaCzNcBbPYxURdEY/NNmqJkc+zreNwSu9rbFaJv7V+xm6VSPFKknfknw8tFuX3JfqGz2P81NZeoXOsTKopWtvY9mZ9UrUlQFE8xq+3xqOlyO/SWooI+xUa8/NFUIMHD+4pAtuXiTpZCJf0Pse1FyqKeLGbh7thZi3yWi0U1tQ7oi9FqsaKx7zpbdzHm3jarBI6KqVsrBJJkrw7G5/YOMZ51u0VZTjn4lIpY1misFImahHEYs8JkZZRueAaUZg1L6iItUnLkVJa23LM+20z+AwYzPv6pqO8kbcXsKcwDIZqQSwiqN6X3bdD854yRnW/zZP3EK0WfYm1TThK83vZTCnCNBaGqi11fMnuYo28XrFKJEny7mx8Ylt7xbNR2V3GeXi1X6OwqUbAUYpQi4ap1VoU5msU1oWrD3IQlxhQA+CxeYioQw9oNq78H8vbF/FfgM07VATTOXwRy8ScVrjzdTPa2B1Y42FmiGqkkzWmqoooLkodYLCCz1cMzet1ui88f9R6G0+vWSUyfUySu6OdT988ha94SP1DZfhi4Bkzn10CpwOFyp49gwwoE/M0oDLHJBqLLQzp3Th9RRKW7AyxJVuLrcpbeakFQbfZUOWtBewJ8PsSni1Vpbq3If99p5K1WXNdSvUDn4igUQuTikthmGacgcn2DLuoe+3OznmuOx5kb2OS3B+/hbMn38Ronr8AX8AzZh6Nz7k6P2OQiqoyq6NFUIm6WAwsjA13ll3H2vnurTMHaGkkgEaE1jM16eWnt+OtBeziAkZzatsqTZ1moGjz6/tR9naCNtceM5ASK6i1UtDWP6mxCS7C2LYhHymU54o+igw3exuT5H7Z7XYxvWKsDAyM5840KIqy18MoTIYZ8T6Zornti+EWG3yIxyJezA2LSTMxAKJbrcIXenJyD0X8bwAfRihQrDcI9J7G1rLZVFX6luNtl2zRulyvqm1z2Sl2AurLtJexU9A4Kjoq4ziu4pVG1SR578T59g3jOFL+UNBRYy8JfRGb5pTYEHqqGvVtU6QKSKUKmISQSbdUNBErpfVJEm73Ze/XtoG01ZO3Pta3FrDH+8hV3WOCf+yyZBTRyBqbfYKmuuYWe2daF7Lwj0idmVvDqEyK7iV2Dxpi9eMvJTbb2O2+zcbsJLlnwlax4/T0lPKHsFaUUWKvib1E+qhCKRMiUFWo3d8lNQKYJmKYtZXK9uTWLBTSLFjNbHGbHPJWNgo3X1YTjGgFWPZ77BFZX5EQMHdMZFmFrDVevJaIxvabnYK0PI/7hrBMpN8rSe6Z33ZbxTeLiOmoUdYZYgLyXq/QSZhmYa6K6ByBiTS7lLXd680iunJZa+Pa9p7cTLEBuVUR/1YCNjSljE1+Y8BZeD4iXHT3NW307sRf00dp1olt+ng5hOdkOA8PSp/tlX6vJPkA/MNWxMJa8WzUNY3cN3tUiTRSavunaxppEg57V1ktVQCtCubNAO8Wt/rungSMIVLIsJ21/R6bkiq+5r62Ou9721A1CfNbjRxa5xaSXipllHiTWrvQZ599m6ljknwINt6wbnA9SCNLay+a1kBkSSP7/q/WnQdRA+ulJbAYxOwSNqs2msLvKwLroZ627+5biUNbIm2NnCz5r6zFfJHopWovel90UfHyPK734n2SJB+QawbXnkbGglz8QwSZhUnadW07k1mvg7X+7WazamMpwrHQunhoz3MvKeQ0/RovjmtZWs3DRCHNld9bCNYinkhdXojUGZn77SByiaowjOdr7attOvso08ck+bA0EevbEKoKqrFRtFzGOTwJcU7r3HqhZfkHNBVbGnVw11Z6aj6wdjkO91bEH3DfTk9sByhdbdeDXu5u6qxNuad5XX18qVHw+2uRTb/jLrPHJPkYaIto5Q+x16qW57x8GefxVY/CBGSO4Q0QdbBaoxYWkydVQt1dAAAgAElEQVRgkTBpaaO2bh3aTMT7SSG/i7nWbeUxjqtNZRVZR2j06KuljUhtRb5IH2WzCqmXuqSPK2+/R1ySJO+Hrx9BKWU5R6WtOKpeNSd9O89nqLaNwipG84ZBmx0YYuXWxky3//rbt0K+vYDVCjBTy3qblHbwth5BHLSFEjc1nkWY5zUSu5Krpf6lKstmtMu4nGzYTpKPg39gqUuLclAH0x6UCNSl3s1ayI+6/YK3yc1oi7y6meK+UkgcysFqQ+wDudS+lgL+pnivLUdWYZqI9LH0F/+iDVErS/r4KBu2k+TjoZ2LOqyF/KUOtpdWC+t5JMT4nLpEZwBIWff7gGUlsv+7DbergQ1DjIJt372KVl9NkMMCfl+UnNtDmi9ELuFlSyW1KPyuq/w3Wf9Kko+M3W6HjroEHS83K5FM24W5Fti08V7SL9vz9GZuuJ1obbllBBY+MK99Dn47KKMvSa7HVokvlpx4Wgr6ooK8jAJ+d97DuuKRJMnHiZZ27kqPvoj/zOuJv65CsmZqNNFZtiyKO10E97e3Tt1CwH71yi09vb2up2shL6KvuC3+XcnVImTleXi/IFQ+SZKPkVhYK+XwTJftSmQ712vXrtWWcO25jN7+6Oso57fmdilk/3m6Ts3pkddBHaxPiG17r0lT6Z5CXqenj0AW8JPkI6T8ofBnDgv5l/3OvhLZzv16wzm+0uaFiS9Bzm2s67cu4r+y4nmgSIKJUDlcgZxEItRsr3i7ihGTJ3Y5cTVJPnK2Vopo4L5agxa2URettYi1ELblFraJV47l1t+5HOwN91mFWg9eyFLY6y0HV+sKZCnS6l/p/UqSj5Vtbbo83/rBDkVrZvO1EJvf2nXBePcCPtxWwF7zs7sXTJZkeK2DwXRtpYLFzPrn9v0HY6OTJPno6AttAKovOH+xFbHpIKCR69HNNT/YXXD7CGwhjkj65fWD7kuo2yXWljqev2gHUbJ5O0mOBR1W2YjWoRs4ELL3eCzv9N3XDszaMmnd3L2YWjdJ8pVcxf2tB7LzKOfeJ8lxsy2G1d4ktGrCXXMHERivSOymhLd8fd1G0SMxCEVfmrczfUySjx7dRl4XcSEC042Pfl/ydRcC9hoT2BJ5be4QibYDWEPP1QPWCvgZfSXJUaDl9bnhe8waD4/hvTzrgQufAxf+dgWyL8NCW+HI/qEk+Wh503y+bS1M5OY47H3wbgLW24TesLJw6A85/FrbSNc+wDBJko+X18UXsvV2Xi/ev+dQ7G4jsGtLqMuK5A2CHIr9/SttCUmSfJw8/dAHcAN3n0LepEfCa5dSuwcsdx9Kko+bFy/e7/P7fe0L+ToWjRI57IPsTBsPGGsRcGuOS5Ik+bHceQTW256WPkiiD/IVq8XLTB2TJGncbhjFHQpYK+TbUrFvt7cAbKLNDLp+AH0Ofvq/kiR5S96bjUK2/i/WAOxqU9zvLvxxHNP/lSTJW3MrAesbqi1CxMZJ8f5Mt0mSJAfcSsCu+1STJEk+BO+eQt4wxCxJkuQ+uGMjq9xfE1SSJD97bi1gIpsyfYpWkiQfgPezCpkkSXIPfAABu/zhhyRJchQcTGR9Qx38fSVpdy9g3i9usNZuN/l43SjaJEmOk/3m+lbMru3M7Xd46t97BNY381gOYMgsNkmOni5Ye14bib0P29Xdqoc7vEVfdt+aKUmS46IUOdjcFloAdm1/WOm33ahpt2yA3PB+FMR59dj6lmq6TmNNkuT40FGXMVhbFu2abg7C3odX9G4E7IeEdHvgF3fyE5Mk+QC8bvvDVyaxLkNMX5M43pGW3XkEdpuhZEmSHB/L7tzbxbk3jZS+ScveUS6yCJUkya3p+1rcBnntF2/x82/905MkSbZ8gH7oFLAkSd6aZRAp33/Y4/igPz1JkuQdSAFLkuRH8aaNbe+C29gsUsCSJHlnPpSv834ELK0VSfKTxu3DnOMZgSVJ8qN43xvb3ob7F7Cze/+JSZL8RLk/Acs0Mkl+Mljt+5B9+kGP4/4EbJcaliQ/aT7ACX7vKaSbYx+o4Jckyd1Rq2FmP/zA90gW8ZMkOVo+mIB9qGXXJEl+OmQEliTJ0fJBBax+8mHz5yRJjpuMwJIkOVpSwJIkOVru30aRtfskSe6IjMCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDlaUsCSJDla7l3ARO77JyZJ8lMlI7AkSY6WDypg5XnqZ5IktycVJEmSoyUFLEmSo+WDCZhoVvOTJHk37n8VUgVN8UqSo6eUD5/A3d8R7NNCkSQ/NVQ/rIh9eAlNkuSI+X69+gEilPsTsP7iLu7tJyZJ8p7QjyB9hIzAkiT5kTx69KGP4FXuR8Cy+JUkP2k+lKvgfgTM/V5+TJIkHwa3V89xd+A9n/r3n0Ke3ftPTJLkDnjx4gce4L7GKuMN95c7PiDuU8BGz0AsSX4iWLW4tFcLY+7bpOv1qnVdDvwWAnHvEZibYzeEm0mSHBf1kxAx92vByU3R13X649+xdPbBViFvypmTJPm4mabptfeNzrV6t4dOuYPfLsL6IT6ojaIreJIkx4NNxpevu3PH9Rzyx3FLbbtfAbseaiZJcpTUGieym//obOrVati7Wy/uTMB6eCg/wvO1fcE2ZxSWJMeIb0/dDxSZ3FrA3P3NUV96V5Mkgfdin+i8nxQyxStJfn7s7v9HvruA3TJyzFXIJPmJ8SPTyLuMmm71XD/mMCXDsCT5yfNjA5FtV9FdlstuJWBD/+Z2JP5WT3R6mx+ZJEnyCu/NRrEt8W/9bSfuy4plX8WYpgl+876OJEmSnyrDDz/kR9KkUN1xb+mjECsQ1roL3hQ6/vHOjiRJkp8JdydgDQe8QKntC+FGZ64/iPaC3hSaJMnPGOFWC4J3mkIuP9999X74xgQy+uLcfQhYc/PWWu/yMJIk+Zlw9zWwm1T0Da1Rvafq6Z0fSJIkd8n7Hin9Y7p4rnO3ArYRKd8U628arxHLr58uPVU/OCwtSZIPym8/9AHcwN0I2A88S9exXgrrX5tF/av+IlPIJDlW3FncUe7Xbr8h87rLLTLeTcAK/FDl7cbU8YwcapgkR8b1Mk+vYcOhodX95omGXbfWZbt314D3O05nU7+PlHKMkTrbaRRbIUsvWJIcBf28dfNln4uD6Ova418bdL2jhr0fAXt12PV6fWPE3wrZRW54myQfNTfWqR8dnsfjPY/VeXcBe4tncF9fbDZzJ8lxss7w+5SH7drhJOle9D78voNKt9zN0Jp7mMjaBOt6cW+DTe0NSTd+khwNZvb62pfzHmzyr3I3AtaG9r96++ZiXB+63G2+mYv/VVxkHSxJjoo3BSc/MPb0nXk3AfObn2Jt3i7rC9r4J9xPXtmhZL/fv9OhJEny/uldM9c35Nmez86hD9S94FwbzNpjHrn5OX4stxOwG/wdjqKquPvaRcT1K3GQ24E6btfm4mcamSRHyY2+9XZb4aYkTV553NvyzimkXxOnV+Zfl/VxS22v9UP6g8OjfpJu/CT5aOlOgR8awHA9krouCTeLzu1K+rcWMH3doH7fPOXiwHe6Lm9f28P16uGGmVkHS5KPk1+tV9cC/g8NKd0Uw/X1fdEfthdymwPrtt61OdpxXZHslgqrniN1kuQo+Io6Hbb9mXmrd1176AA4lJ6B6aafsHMHPorbC9jmdbxy8F6gXFuB8Gsv4Kzf8ekykeLioqWRWQdLko+L36wLbV/CwZ6QS/zVC/cOZTtRqy3ovYKD9Hr6h6qB3YzjXtaDKiHIg3kEYSdRAzNzzIxpMvZf7tnvH3Nx0XquMo1Mko+SWiNzWmrZ5k28WmY1cDgHEO6i7fFGbidg0r958+3KoqhRy3dKaUrsZQ0z+1BDX4v59RPDJmt1sK+iZSGjsCT56FhM58RU5X5ej+3cZjgsH60lpD6ChsOvO7dMJ28dgW3rbf1JrncTHLyAYXs7nDQvmM22WClqrez3++yLTJKPmMicHvFgE30xbiKw69+wdSDccB920x0/jndLId9Ue9+kj+scsJhI4b6Gng8erIX8+ou6RGFpqUiSj5deAnIH37UoDDhwG/Rzfynka1McBROwFni9QzH/VgKmKogIXnyJxPpxIR5Lpe3g4+jXUPPg3+mq5p9Xx6Y1CgOyDpYkHxHTNEWmtHHh+0k/r0cOQ7CtcrVopoZWGQYFRB0XaZV8mOe3P6a3FrBSClIFaWGfskkn24Hqtm2IZg1z1vw4csiDQqBZpJM9Css0Mkk+IjY1abeNGX3JrOK0Hth8fdPzWNTFvfcbblYgRd5ewW4RgX0HQP9RZlBd8U0Bfxkl21qLln824IMzDiFevQ62FPKrbYqEX2UhP0k+ImqtcY7WXvqxdg6zWCjcwj8RXlBguQS0RvYIiDiI4OJAXMot1OhWKeQsgrTEdUlrAaSllu5xvO4UbSuRWijuDOaYjRFxteXYBw8cN/h8s81aNncnycfDkxexd8XnNUo+Pfqy6ow9GhvCQlFa6ujuqJdFCzC6eh00SjveamH34sT/dfyc9rOqKy4VF1lSX1Rx0TW8VF+Ked0+MZrjo+EnTp0Nq58cpJH9TUuS5APzdNMHuSn5+MlmBXIkMqyWPpbmwo/zP7RgjXYs9EIct9jR1t2Z53sQsHEcEZ2XhQPt//VVWGURrp5SliWNNDWsOD40BbeT9oZE6tjbig56I5Mk+TA87Ve+ikW2T6y1ABpmJ9gYGdXQ7RQtilksVL3W1bHQCXFHEFR9CYZE7yUC+5ZaBSyiru6lkF4AE19WFXAH9TUKs6iDbdPIE/ODOlhfjUyS5APTXABPXkQbUfds+oM4X5dzt53updfBFNBykHVBj8JgkZ1tzZzbbbd2q6GvUhTDEMBFW8gFLoKY4wIuTmkHjhI6p4BFzuveLlkNr9v+qlprrkQmyYfkj2sZZ5omrBiG80Cd/Sn4VRMfcwxHR6E4VHdCBHpEFnXx1e9lLfhxpN3eKupvfYi3KuLLHMV6BMQtwkEPa4W3Ar82QXPb1sE0LlsKOQ6ODUYdnZNdZZ4eMj2szFcz9ReV/f7xq5vRJUny/nka4nVxAc+ePabWKODX+WGrWUcNexxaOagMrT5Wmk3CcS2ot+xss9jX4xRxWfTCEXS6hxTy2x2UMiHWvGCNShyo0Ar2InGpjotjpphE8a/0NLLGi97VXeTUs1En57Np7Y3MQn6SfDj2+8dM08T0xcT0sC71r13dNSdBnMtLd43H+a7qqDejardYSWhDq+MDINv/3SKFfPsI7Aymqu2HCZHbCiKOu+AezlpxQlfNEdONnQJMo5jvgzMWwwbDdhGF1fkh80OLKKynkenIT5J7JaKvr5imif2X+yW4ODs1/HRjZG2iNZQY3hCZVqt/ySaYka2zVcMD5kv1CfD7G2g4jErV1heghiw5bPg5pBnTIvpSXNvyq7Q0shXzS3VqjWL+OEcUdnYalorPqzN9MUUa+UdSxJLkvmjn2n6/D/PqZHy2r5g9WtJHG32TPvpB+qjuYZlw0BbM4IqIL4IjxARW11AMR+5pFfIRyF4ihcTABXPrh7SGiaLRQ9QK96hiHmmkq1OWF+0MzdBqu/CE1bkyPazYvEkjU8SS5H74Y9S+pmmi/qKdh+18PEgfm33CbThIH11b5tX9X+KIOIauzgUJ24S3Ohj3JmDAlTYfvoFjqET+6mItlw1hWlJIUcQ2rnwvIV5lYCiRStpgWD1ZamFu4Qnr2ziliCXJffLVQfTlxkH6uLjvHYrdkD5qSzN7LTwcVQCYhZCZG778T7i6unrro7yVgJVhzyzSugKiSGfmSNvQw10P81/vhfxIKZcorBpmTp0HrBrjbNTBOD01pqsHfDYZ0xcTz5495uLiqxSxJLkHnryA8/Nzpi8m/u5qZnpYma4eUGdjnHfUoQUdZWNMt4JaFO9dNOxSvRbeJk4s2ZmCNiuFqKGto1vvJQL7LeheUKug0vxd6wqCtGVTcUVaZCY46qAimHm80FqimC+FoRhDcWqpjPOOeV853VX2pw/55OXE+WfnfP/99zx79piv/kQ2eSfJ++Jp2Cb2X+6Zr2YuT2emq4ec7ipzqdhgDDWCjlKN0tJHE8OlLOe3iDYr1eL2jNta1d5MW72sr0AKWu4phdSiiDavmhAjKWBRWZqILasUIhiCCag6JoqJxVKrOrW9IUN1ajHGccc8Veb9zP6ssn+xZ/pi4vLykv3+cURiGYUlyd3xG+ApfPUnuLy8ZL6YeXQZ4lV3lXlqwcVkWCv9mA5xHsth9BWRli8er+V/1r2gAIZJFO8dR2+5CnkrJ/7VvrA7c5gNc209ALEC2ZdPAWTj0kc8dE4VrS3vFY1LLRSMyoDVGTOh7oyTUtlfPeDR2UtOL+FvX0B5Vri4+Ar++M1tDj1Jki2/IRz3/xJf/vn810xfXPLJi5n9Q8f2xgmVeYhREiPGvI/FuiJGxZESPUNuFnUuVXpbTZz6gguYtKkT3X1vhmkzuhoMw9vHU7cSsGH3krmehMu2FexoXeWIoD1olLpOMxSPTUDMMXGg4GIUQrFNHMcY3KkaufZcJ05PhWn6hMvL58zA/ss947PxTYeXJMmP5Y+r436/f8z+y3PmFzPzQ6NePeRkNzPvjdF3TFJxRkqpVAomRqFEBuZQtfUM9jlgFot9TnTqxG2EeLXiPg7WUsiLy3tqJdqdFYq3gy1tdSGcq5vmTI1/EqGhmC49ki4a6WOfxFoNqyV8YfPAoEYtRt2kkvVhOvST5E75zaF4TdMUq46TMU9R96pTpY47bDDGYniJon0psRBnEiUhb8570eb3ajVwF0G8l5bCQuHu1Nqir1KbJ8wYdi/f+iXcSsCevVDqWHFRxB1rStobA/rk6yVC6wul5gi6Clcr6hUtEY62gn6tY/hN2qrkya4y7x8wPzQ+eRnO4IuLr7IOliTvwNPm9zo//zWXl5dcfnYZ59dppe6j7lVHj/Nwtla4d6wWrMZCnLaivbW8y21TGrJePmrjtjAQRbSgJXSgziA1Ms7d5Q2b3/4ALe97O3755JeM31fqWCm9YRtZpuggLFMW3WX5IULztlq7V3r5zkCdgmJeKa4YheqVwQr1ZGKopdXeLjjbD3z/aMfDZw/Z7b7l7Ay+fgT8A/DPb/0eJMnPh17zehGrjb1VaL6Y+WxfY9Hs4ozdMDNpZZxG5mIUKSiV2RURQ1GqG9JHzWg7/8PFHgV7VnEJu5VFEEbUxLRNbPUS9oqX1fiP/+c/3url3ErAHj9+zEv/D/wURh9xixeA+9q0CQdpYx+NHQU8XcSriOM1lNk8amI2xOLAQKW6Mlhh3t0sYuUPhVIK4zjy2WffppAlyU20qS699PLs2WMuLy+ZvpiYr+ZIGx+G/3LUiblUhmnHrDVKOlIQrwgFcaPGzJmlGwe1xZbgS7gSqSH0un3v1IktsasIOkqbpw/ytx2/+93v3upl3aqI/4//+I/865+e4dXbnpQaZrRWAwu1lc2cHzlU4v4CJepfLlHoL1owb/Uwr1QfGHaVKsawH5nrxMkO9lcP4OQl+xegnyrD2UD9QwUe89XFt5y9gK+fkkKWJHAwGueCr9jv94t4/V3zeu2LU5vfay/GcLWjlsogkTqqhHhVDHFFB0OiDyfyP9PWTRjGiH6K+yJkNGGLEVyoMLpweUV/IH/49O3Eq33n7fbE/R/+509QHkAx1ONpDEHMeqdm5MDLlmtC12YkrhVnSSXDm9tWJYkIrLRbzGe0KKUqc50YdoX9PLA7e0l5rjwbleFkYHwwUn5fePjwuzWtBPjtbV5hkvwEePpqob7WyvTFxCcvY0ROnT5h3s+cnRrT1cww7JilUqQyTwNFjdqirT69q3rrhS66po49PWzqpW20Fm1SzXppSB3w0fE6hk4Av/9/f//WL+9WERjAeKJMV5XiLboyULFYJfWuSSFiztrA2aM1acun21RSa7QnOI6KY23ua/GBWmdkgFF3zNOe3Qj7iweU03MejcZ47jwHqPGLgh1PCK/Y109JEUt+tmzFa//lHpssIq+NeMVA0RguKlIpk1GliZcUVCLy6hGYSNS/+gTmvnC31LzFehUcc0H7SGYFNcUGp3hBLt7NEnXrCOw//dN/4rOyY7YJKY5ZWFG7TquAuTUTW5vY2ndTavlw943F6moIXWnl/6Ue5oaPippSbaYMSrHCPO8ZTwYuLpVhN1DG54znhecPRsa/jEtd7KDInyKW/Jx4enOx/otqS4uQzbHKX6eK7TxKNVpRGSgS5RuVQp0NKRp+rhaJmfdSEM07JUuxqJ/zy93ERh7hF2NpQby0VX7etoAP7yBgv/zlL9l9PrOfjfEkGrt9DuWNlFLWPLjtQAItF/bu3O8itjZ/elPrvjpZhliZVItxPGWYmU0ptTCPe8qsaFGu9gUdlPHknPG88GwXX+uo7P68OxAzyFXL5CfGpkjfIy7glUJ9/cQOoq7arRI1vF7z1FYcm61Jqc1Br1G7asV7a8V7WWrfTazMw5zVdvCIzDGCEo2Z82Fcx6nskL+t7UO///3bp5C3FrDHjx9zubvE5ByxErmwCVY9zGkmGLHbbqxG2mLEVRXcYkslN1lzzqqtLKh4WUVMUcwE9YoNazQ27AqyF6bhUMiG3UvKKJTniqosYraNzIBF0B492gRnKWrJx0azPmx5CrzYmLkvLqI432tc9Rd1SRWntsI4TxFxnZ1aeLyG6Hixwag1piMf1LyaXSIELFLGpfbVxauPMl0TKrrdflmNXGpkEhMnZsOaSO7mv1tew7fffvvWb82tBezJkyf8bvod43xB4YRJZgoDOMzmYY/YjJd2WJs1e0E/8sylqK+tHkYXsRaJqQuGoSbYYBQTqheKzcxFKIMeCNkwFi4uFR2UYTxHlFeisq39Ang1OoMUs+TDshGubn9Yd+r6atm9/rpozVdz20HbF2uEnRqnbSCh7WICctW6CFetI14Mndeal0b81RqtNWrWHukj3hbtlkoXy+Jd94AtqWMb+GAUVAS3CoNiNvLff/Hf19d7ixLPrQUMgKfw+N8ec/7ZOfPFTN1XHo6OlYLPgrRCnvomzOwvelliXdStiZhyuIoRhXz1ZnIdlGoaNgtTtAham5DNyn5QyrSPWtmgB0I2nEdE9tci4QS+Qcx2ux3wTaaayYflmm9rmxb2TZ9rrfArqFNlvpixakua6MYScZ3sagwHHYydncR8+zYWx8qAVae0uV4665IyWivUx4LaRry6TX2pe8FqktiISmsplNYwrQPUaaYQrdMvuV3da8s7Cxgv4PGmSFgu5hgxLdosFe0Fe58Zthb0e0YdoWfLk1nd+bFi2aOwEEMrLRJrNotZBa2Clpm5RjSms7Ive3QvB0I27Aa0PEe+h3EsP1rIMiJL7o2NUx5eFa6taNlky5jnz6s3S4Rj9mhJFets1NGo845d7ZOPY/6e1UgXzRzTmO/Vi/aCYRJLcrYuzUEUhpb0cem4iVOeAxVDkEor5CtaYKqOujDMcPG58vuv377uteXdBAxCxP4Ej9sy7eXp31DfoUO8KMWboocKX5/405vUF6G79uYsIuZxaSZoiajMXFGdoyZWBKl6Y1qpe6GMhcsWjZWhoOX5QUQ2nAzoGK2hh0KWhf/kHrgxXVzrWgD1l/VG4eqp4rbGVdv92wL99XSx1JioqrVEY7b5Kl50q0SrZW/ECxwxwUsr2otGN46stvXFdR9WMVQHptlipvxUYZwp55/z3XffvdPb9u4C1t/4F/DVxVd8P/07tShFBaqF2176uumyhSXuTi+BdX+FLoq+CVMXSQvldj1MKbUo1eRAyNQULTPTLJQiyKSLkGmLusqgvHwpEX3pi4OifynCX0qI2TY6A67VzXaveVPWWWVd/CAWCzrp6Dh+nm6uHxbUt4/66rXf32tYcC0thKWe1YXqS6A2seopotVPqHPs1bgVLdt5pIo3RFw++GuFy9WR2sVrPe+4FlQ0+2abNNEK+F3UpJWHRPAaLYQMEgapfcWoVHY8Ys9u95/55pt3m+v37gLWab/N//xv/xlkj4wl3gTrRfym4BJCtebR0GbPxuqrRIeVtxEXS1rpghdBfBONeaxqVKtx6YqWilZZIjLVibnGjidlVucchwsAAA+CSURBVEQl0ssiyCUHYia6/lN9EY9RKM+bmDVx+zPxfVv0NcPYelR3nTK2zvu3755IPjS/ios61RvvtsluvP2Vx83xOKtx+XmNU7GLFLQunRppYZ9w/OBBXPZRVG5+IFo+2rrjVxMuKx6bSWuMgTaxA+HSzXQYw5CqbSehzWrjxu+1uuqbTaI31IjEP5vRviuZCIPMTLUw2cjZfMnFxSn/5b/8nt++41/yuxOwxq//l8+4vITBdugINjk+VMR0kyRbS5FlqYGZtghrE3VBmyNUQ3icZozdRGPicihkJSwX0iKyWQWZZSn2TxqP1SJwJeyLoHqF7pt4SRewuHz5soXFum771MXtlTfzJq36G5TyGnG7xSYGyceB2c2nTa0Gf3fjXa/QhpZi1YFPMeui1cbSPHAe2CpqfVdsd/CTaNPZ1V183UTLauzXaDY2AdvUuMyWiKtowWQjXG3QqMqaMhrWghBdxSts9u0cjBbIjrQ2oZhpGDUvhBj0wBW7izCanz475eHD73jH4At4h1ai13Hpp/jolCuwCgyV0ZQZRbziJar3LuvahYrEssRW4ZupZJn42vegbOJlJcSrEjWxaq07vvlUhIIgiAsqM4owj4pWRZmQK2FSYRBBdWxiClciCFdhTXspDMIibEATt9OD+d3nAC+4eV+71inxuj3vbrMXXvLh8RsEzLuJ8/xHPscD5yE0UbmiLFuRORTwC2ffd8EGXE440bbbF4YDk1TAGXHcRxRnxhmoGM7sheKOUKk4hdLq0d3X1VoAiyKVGBFNc9u38y9ijD4OOs5T9djjQlrv4FIrc0HU0b5NBqDnwuefP+PrL7jz2smdC9jps1P8079hFCgFsRFjRgpYjZEcLn3pNTgwvHUfSdtEzq2lkNpCWRco0rxka00NQIgxH0qkmrPHTkjiyuyCUFsfZgiqIgdiJgKDCCJDCMt2tyURruSqrzUgL9f7RoDy48To+sYFKWDHxyJU/WtvYvaW8/j8wrly4IxlyzEUTvykCRlwBZy0iIzKFJ3TIVhAfPqcyUO0XBxzZ2ZgGB2zKOQXK1hxMEOKhwWJuB5hVGvMtlaEX9wDkTX17MJj04s2Rr6P0ertgq0eZgWGOOZanVNmvv76tu/2m7lzARvHES4Kz22k7PaIFHr0VJS2JPvqXy9tb5ZIt/PGY7TrWhc5JWJvl/hroV3M1l6tRchailqltr8mytxkTyWuzc1cp/RZslOI65UwdWOehPAMEm+X7KWFxcvCS1z/EWJ0CYisG3jeYiOW5APjB+J1wuktf4dOE60rwB3fxdcTM2hLRtwZr0DG9mdeRtydeQIfQrTiAxub4hT3ZkUyahsYGCFbpIMVbblJK9J7K827tBVFWYvy0cCIe9MqWI3pBr3wFV5PwbWCFXQwrIZPbGTg2Tjf/s3+Ae5cwD777Ft+N/2CE7+k+AlXOqFXAzI4tRlG1NdBh7QdS8Lj6utUDrRNrGhvJBLGuqXPcp0CWd2akLHebkLMqm2RVI/YPEaxURQq8bghCv+xwKJMCDKCTEsHZ1dRRCakLz5OcfvUP8Cx0+8b3x8FZPun2l+NypKPl+jr3X49s3/to9/4RECL3sf2uXfAx/Y59qU6Pbf7R3fwGscwOFh0vjAQUZTXiAIX0SJu89KuE/2M/39757Ibt5WE4a8Oye6WnFgTxHaQCxBgkJW38wB+tGCeZ7bzAn6ALGdWHsCzCjAxgsCIdWnynMqiqg7ZukWSJVkanH/T3RTJbnWT/6n666YLTYu52UJJ6hOCjMiKfyjFPJm4P9S3m6S9GOJTzADJagKOdkrJE6vPLorWfzxuncB++gy+f7vh8ElhrzuhHO/R9xNTzBtHkJRQzZYKAbUlR3JSk1pYZb52EFxkkRmfOetr8dpK6jFagJTR4sK7E4vGMN7Iok1iQl32VUcEMgwiTGCuqoxmhU3+xpLmXL3godDH/oyHtmd3atz1uFDzzjVe+4tr3qNWlWLHal5cBDo5KUVL9gFy3RUNYbyIkVMCzU5QESNzSyg62FCyjTpznVnFGhBGSoRVwVi7qxIJ5yrVTZbaGsc/hL9WhJSKDSWSzm4tMkULmYEuD4xqzRTuCrdOYLyGZ3/7L+/efc/2Wc+43bI+mkirDuknJJu8mIoxdFfiS9NFL6F5gUhiYVrwnDFgZwlE6gFmcou1ty3i/cjMtdPiVlpxApPsRLcgNP/R1NTMSlimRNq7qbuUjP62dWWKj3MJI+182+PFuzZWe5gI1mJhwDDYq3L+fhchRJK6ax/PfYqPhkdh7lcfllXxA7s4AU5kp0gstgWJ+aBZ6oK++Kzu1SRsHzPMSt0u0rn25cZCHF5Mm07q1lZJSLFxiSVtGY9XTMOWb579zEfmq/7p93g3eDW39zg+/oKTZFG9LEI39JQJs5SyWzPeayjGsWlxYpsNMv/UvkGDu6S27KntO/yHCvIytxKKCFLyrG0VITsRiROXiG0DdzHjLVk+j8+SbYE8PyXoDC51FxtvPQ6cumP0CoR1Br0lpdu5ZknBTuXaWDefu/O30KSou4SqSuf7GA8lqztWfMwZlZCseYKixXK9Klk6acV9F3qYreXuYvq9p5ESINnjlJ0Ze5LRLjHkhEpmLAOrvUMOxxUH24MbdZm4Ku6WwBb44Ycf2O79Qj7q0E4YumTuubjLjS0UucNDs9Gyw7PzY2WAEAuqLx/kFQNFgsgsoll2yExKsRm8YoRmGRxmsS0jjtmJDAlecbE0z/sElh7AjfWsUwTYjLCHgwv56VTU8bpE1i1234lkKihOUr5Qd/63ICucyJaEpQop2X1h3ksQm1RBXtQGSUuMP4syP/BYW6pCfQj0lvPldZFuycX9qgIlCbl0rPojxtV+7b/35uAN3FH0MXD7LuQFWK3eUD58QbffU0aBcUT6BNkE8+SRjSCvyDPBW9myKD2SaGMtQCnWosO/bCM6+0EkWn6oaxcR9g0z3Ec9VRfUSQ2Y9bGIf0Y72YhABcNUV9O36zWYZ7lrOm/zFc26hjtEt7OY7FCU7j6e7ctw3kFnTl+P1YVwb9elIh1mcaFz5M+nXndYYiqabLGPij1f3KObRGjMUeoTcrRg91kGTxuyYyt5iQUGpFJcqm3jE3iU0xJxe838PnZ8/n5BXovSubvCvRHY8+fw7196hqmnly3IwJgnxCvTzT/PZgmVtEheBZywYrWIzhYKkKxzhXi+ilYtwrrEJrUBIUgxjb7MK8eyCZu6DubUR6eFLLNVFoGDCq+yj8wO0/9ll5SuhVwf6vXezLBPC1XOLCLn5XqJ/WE2wKw1+u7fz1pyCvNiCtA5USwGZFhCaEGTX98AKrMbWMQ8DNQW34iVMS/MLIg1VfHN3UuceDNVrrEZr67tuhdUoqmfR+RLZ+QlnaK6Yhph2FeGw4E3KyevF1f4jj8S90Zgr1/Ad/9Zs9kccthvGPrROj5qMvFPJ0QSkgpZXVK0KbgkMqKdma9+PsEjjwlEvenO4jsm8lwkmdblJUcixUnO1pUS7ufCjFLXBdJyRZxVW/Mkk1tlTpihMwQhXh9ugi1zyRp/fVqcZzld6Cbqzv5XqoYMMR7Xs05ZdIClMqS0c+0hunN+yU48qvVaV785VIr12NNiTQmdG+1+UYtpeRDNqlHmIR2me9mzJEpWhWIpHDr1lFQomtnrCmV1Ar/9hTfPFuR1D11b7k0DA3j5Et6//46Tpyfsf9gy7j1h3U+c6EifBptylKwn90QhaWdfeGfpd+ruZQjv1rU1++AQy74vJPcSdQ7I+L8aZRHiI8RPF6PaRqmL1rmahuw8+Au54hV7Oa6QRtbwCaG64+lfH7VX/DnnPvPEIKf8V1ugIzcSCCvKF3fZkTC8SZfXJ8bpU01WxRdcqVUAomrDpBVKyqRpQPtiaRZFUemRrjDpxFAWxdlfbPiGn/npr9xru6l7JTAAXsHLX6xJWwwcGA9HPtvLjCeZvNpnryijTKQ0IN5CxOqrhJJsuIBtM1Es0iN0pqqaTew1D/WHdvmAzlexGsFcEFhYcXaKi7+ec+Wu62hgl6Dx2KfHjW+MazDdJZxWr9nlB5qHaMByUbZreA50Jew6t5pHO5dEKkV9HnqyVMNAuxiyLXSTUAaTYAqZtQxkJrTbsjqyFu3r92s2mw0HB2/urFzoMtw/gV2GH5lbaf0Lvuq/otMJmawkoiSQ4sXckQWsxeu/wuh1Iqs6mYKkmktW3UvxicIups0kJmFjV1MaQOQcEys27ZpjN/73b+k0DbcJPffpzU5w+uUFJBf1h7FLJTjfHFpW3U9NHw59ar50ontqvSuIW141uqsIiN9TqmgqoAPDUJDcMZWR1dQzjkccH2z4cvryo3t43SbuTQO7Ev7OTGJ70H04ZFjvMyVT13tVz/qltqsOOyq55WNF4K5qeSpGUp0T7xeupf92c0AgrLaa6BcqvylqO9hJXLQXUQB7U5wb4Wr4v8CuHOHMVbiAxOZ9Z1lBF0mpFo1P3vFULfPBSEnj4p0vbEmRemEk1dXAlU8PEiVrR6KjS5iruO2ZOGEYe7ZPVux1I/nXgb2vHg55wUMjMJhJ7H+woWf8fYLkzQ6TVcFL8R9JxS0pnMy8DCkKy0pEByPs6yPd3J+fQzLE4gUepSxheS0/24U6V6Tp3/zfbvWQDx83Slh1yEUmdU3biTdZvF99jN40ca37X4rVI9r6uWwBbUeJeOOEGmiyoBne8gZJXv2iNpyaDJMt8h2ZdR7YPlmxOvqd3/YHPs+beT7EA8HDciGX+BG+/ufXrN6tOHxySKcjSXuSTiTpLR8l2cTgJB0lF5szKeZualLyBCklIJsUlhPJargt+FPlseLB8mR5hL5C5ezZ+ddBI6KG07gm8dnuHp7cfYg9yNawCko3lzz6lR3POzpK8qAXmT4J5riIN/0USrJ5q5oVUg+poF0mH6046EbW655f9wc27zZ8++23vP7YFqq3jIdLYMCrV694+/YtxwfHfL4Z2R5l9scnbLeZaZVR3SNPNjJK18q6KGVQVJXjoqz9PKqgvW0fFOvntML/8wG2I6yoiYSqw8xDlxDS3XHV2DSwh4C4Pu7i1Fe562IlZQvj2Y8ik+cpiiAjbFewmYRo1rSWRUuoLWyTsAEkJU4E5CTmQ3T02xOGoeN4fcjetufDhz2ePn3K8+fPAXjx4jX/eIl5SA8ID5rAGhoaGi7DR6W1NDQ0NHxKNAJraGh4tGgE1tDQ8GjRCKyhoeHRohFYQ0PDo0UjsIaGhkeLRmANDQ2PFo3AGhoaHi0agTU0NDxaNAJraGh4tGgE1tDQ8GjxB3JbVNVRaiBIAAAAAElFTkSuQmCC"
+                         transform="matrix(1,0,0,-1,0,1)"
+                         preserveAspectRatio="none"
+                         height="1"
+                         width="1" /></g></g></g></g></g></g></g></g></g><g
+       id="g298"><g
+         clip-path="url(#clipPath302)"
+         id="g300"><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+           id="g306"><path
+             inkscape:connector-curvature="0"
+             id="path318"
+             style="fill:url(#linearGradient308);fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 184.562,236.826 c 0,5.965 4.835,10.80001 10.8,10.80001 l 59.66299,0 c 5.96402,0 10.80002,-4.83501 10.80002,-10.80001 l 0,-73.527 c 0,-5.96399 -4.83502,-10.80001 -10.80002,-10.80001 l -59.66299,0 c -5.96401,0 -10.8,4.83501 -10.8,10.80001 l 0,73.527 z" /></g><g
+           id="g320"><g
+             clip-path="url(#clipPath324)"
+             id="g322"><g
+               id="g328"><g
+                 clip-path="url(#clipPath332)"
+                 id="g330" /></g><g
+               id="g336"><g
+                 clip-path="url(#clipPath340)"
+                 id="g338"><g
+                   id="g344" /><g
+                   id="g346"><g
+                     id="g348"><g
+                       transform="matrix(41.286011,0,0,-47.146694,107.034,132.058)"
+                       id="g350"><image
+                         id="image356"
+                         mask="url(#mask352)"
+                         xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQIAAAEpCAYAAAB4JCylAAAABHNCSVQICAgIfAhkiAAAH8JJREFUeJzt3ctyHEeW5vH/OR6RF4AEVVW6mKo01tPVWoxx0RttZsd5gNnqecb6eeolRg9Am9VwxSobmamsTKSqKVBMZGZEuJ9ZuEcC1JWZIKsk8fuZKIAAMhGZzPjCL8c9DQhE5K3m/+wDEJF/PgWBiCgIRERBICIoCEQEBYGIoCAQERQEIoKCQERQEIgICgIRAbo3/QsePICnT2EYPma32zGOI9M7E2UslLuFd4BnY3ABfJOMe5dw+Rt452v4GvB0nVUllzd9uCIne+ed9snX8HX7/J2v4esLuJuvl/SU8vLyHnerH5Nx+Ry6VUf3dcdqteL8/HMePXrzx268oUVHDx484M9//jOr1RW7xcTgKxb7CV9lLDryVCi5I1KQSkAPNoFZfVLMgMmYzDAbgMXhvqMdcfvR09zqxvKrFK9+KnznRyMOL9GufW+MoG/fii6I0hExQnTABEBvPSMjNtUTIBVjb4WFZcI6YjPCRxf82/Lf+IzP4H3gPvAft3ys3/LGWgRPnz5ltbriBQvcgsU2oA9KTlAMo8NS4BaEBUQiyEBgxTADS0AJzJybeVXPYbvlufztf8l8mzuTX6T08l9f8fUUcfM6EoevERARTECKenKVCHAok5O8EDhBYe6VT5Fxc7CMmVOWhTQZpetII+TfdSyeLPir/5VP7n3CwxcPb/+wv8cbaxF89N8/YvXVxNRDMUjTSLiRwwkyYYa5QRQioh1JO7lLbRlEFDDD279QmY/4cPTXfzl89qrnsxoE8n1+4myIOTu+1SSIABw8vL6emf8eRDiFqJ/b9cBctsDM8FLPEQsDMplER9QLZp/ZpR7vnfRlYrVa8fjeY/gj8KfX97BfSxB88glcXrYxgN+OTPuJczOy1WQsBikbk4F5rs9mFIoHbu2Jaye/BRQzLAoWRngcvjb/G5T5JJ67EcdezBUC8kNe4WyIxPcGgXtA+KF14B61W2CGUT83rLaA59t8+84tIIwIA29XxUiMsaMviXHds4wde1vxu+l3PHpNAwi3DoL79+/zlKes00CKJYNNpF1HJkgLKBNguQ6IlESJwCwIs5eeS7NChGHUEKhPXm0VWBjW2eFqn60+oe2/7/ETyXDzRuoRyM0ewk+eDen6R2L+EBCQUu0a1NZBEJFqK4B65TeCMKeU2iW2FhIR1C5yaXfprftBbQVb+1ObDoHnnm0f5CHzr/f+lYd3HsL/4FbjBrcOgg8/+RDbGDbtsEWqZ2kyrNQHhmVo6VZTcW5D1SfNDSKMIPAwihccoxTDKZQwUpqfDiDXXwHUrsUtHvgPf1NNhl+tHxkQfOUTYQ6Am/eVIEVqdx9Ee32ngIzVE5+gYPVCWBwjoJ4V9cIXgBWsQLi188MoVoPGgHAo2UhuTENiOS7p+5579+7x8H8+PDkMbj1YeH65Z5+M3DmpBMXnB+81wfDa329NHjywCKJcPwFhhWRexwRizr9SH3XK9SPt/OxaM2C0Nmhwmjjc4Q99E37sR+SX45UmA06dMWizBfUKXtqXWt+Anno1LNRmRwHzdkEshNvhBLeYIwHCvH29nhsEUIzibdzAaqD4cs/uLOASttstD/73gzqzcIJbB8Gwzth+RZ8KUy64zc3/elKHRe3vREs1MzAHK3iBKEYyuG4EOUSGzrFoIVBSnUWw+sQV9lhP60N9y/b4x/BjJ7s2dPx1O+L8r9btdjdqAep9rKDUk9aWASWIyG2OIGEUMo5T6g2SEwXMC1Hs0EKuHWIo1BZElNqtKF5a98KIFjkpOnZXI9wDLuG99947+Xm4fRBs1yx9JCbHLbUnqD4wC8NaKARBwesV34AWALkUJkuYBx2ZUsCjo+xH0qqjlAXdtAFq4cWzZHjq6mCMfU9h5NntHo/3Krb8tSvj7QvTSrx8HyUPnOeglCCv6/csgl0+o08jbj2ZCbNCHhNmBfM2KJiMNDeGo4452GEksZ749ZfQWgi1a0BxzhZLrq6u6D/sefr06cmP56Qg+PRTePIE/vrXj7la/p3IdQDFW/+leLTHcMg16shefYBWAvME3sZpfIKxJ0dmsXT2kViVgY0bd3cr/vBfvqgNnvd5rVMmIq/T3z8FnsAnL2C7va6mXa4GrsxZds6wK3TJGS3AjS63MTLLtWVw6CdYraFJc7ejthZeih8DG6E/61l9teL57vnJx37SYOEH//4B49XI0pd0qRCR62HOc4XtXi2ift2iXunngY8ShCU6CnghLBFDpl927KeOfrnhxa5jvVlzcfEFj95DISC/DA/qhzkMNpt/4er8iru7id1izbKbGPcTXbcg8gjJWteg1tTgNQDy9UnUZhWo51LUrkP2jE+J6GFZFoxlRz8Wcn7G558ff9gntQjSkFgtCuTa35lIYAVyHROwXFsH2epMQJjV7rwZyWv/qpQ2OJI7SkxMpYeyZTUkLqNjcWfBKq9Yr+HE8Q+Rf7zPgE/hIfAJAOfk55lvLuDubsvg50zheExAh6WpltEXIALL19Pi1v5Xoo2ztW+EBV4SeJCKE9NEFOfqoifKB8CXRx/28R3iT8CXO4pBJsgpMHJtCbhhOOZGCcdw2owIYUYpmTIZGfA+GLoCqZBZsLq74zz3bO4sWG/WnF+ec+/eYx7+8egjFPnn+hPwGTz8I6zXj1itViyfL9ncWbAarlieb5lYgGcs97ULgJGs/gmjtpSjDo57G0Ck1eBYWJ1mDCcwRndiBenFwN2r8aRDPrpr8PHHsFu8B9koNtJ5VxMLIOp8aY7aDTAKhVRbOznTJcciMU0D/bJjNyT65RWLbWJzb3kooVwsHrNew8M7qDUgv3wP4P6NFbj5g8y0na6L8HYTyXsmzyRLWCm1/NgDire6A+plu1CbCj7PxCXMJqwY0UHEni8+fX50PcHRXYNxBLqJzo3sRpnaUKDX8YDS0qqOfs61UUDnxOjEcstqTFyWoLsL9tU70Pf8nsc8/Dc0FiC/Pp/BI4BPH18PJgLPFh+yuNxji4lhWLBwmHzAY0FKtbAoR2mz6nXhnXkrPMp11iEz1cFFdyyccTgDjh80PDoIhuFD+vXIWFphkBcSiYlaHhCtRjL8MEsIo9W1Bp74cHHJw/+GTnZ5+7TX/GH94Kd/4/7/hd3zj8gXexZDgb4whsMUeNea6+1/dV1eXbhU63Fqt4GwVnOUWS7gf3F8geHRYwTlvUK2Wjhk5m211fWCIW9jGlGCyIVEoesnpn6g6zfcuYNCQATgT7Bew2q1olt3XC4Si20ijXtS5NqxtrYM3x2szhoQ10VHcw1jhGHhTEPm0aNPjz6U4wcLv4RUEm6FkuOwksraWuwg8BK1hsASMTg5Emlyuo2ryy9yw8M7sFg8ZvHV4hAG/bKj9E4MDpPXIr1WcBSttqgWHQGUQ4WiTYUu9Tx58uTo4zi+RfC70qb/6hJicmsRtPJIrwur6bzWCXRkpqgP7rJ3Df6J3PQZvPcenJ9/zvnlOcvnS/ZTR2aiswIe139yuVln2JYre1v+XAfnczqtavKketpo1U7hgSeAtoCiFUBQHHItGiqLRDcNDFPP4s7iJ+5Z5O3z2Wfw6D24d+8xFxdfsBq29NERkSjUegGiLmGOVqI/L1M2oAR1fw+cNBVevHhx9DGcVFAUdRcGmKIWEraqqLaAuMaL1d2Fimem3HOeN+TNxSm/TuTX77PrQcQP/n1BGhIWu1qKPyXocp2Ai3lDE6M4WA7MvdUYFLJ1bLfHr7w7fYVNUBcKWGnjA9Y2V/CaYFNP2WeW1rM837G5s+D8/ITaR5G3zN2ru5xNOzILik2QAivdofAIa5X8h3GDtg7BnDhxp+/jxwjyvI0KhzWcpY1mlmIUN1J4nSVYJHZDots43nstFxaRH7VYLHiW6p6eaXJ8cqY84X69gM/afIFR9+UoVjCM/sTe92tZc2t1vwVqUXEhF6fLif2Q6PoNl23jxTt3XsdvE/m1e4QnJ3UbPDljN5A6p4TjXpf21zy43kgjwjCH8cSddG69H4FZW13YBg9TMSYmptyzWG9ZbBP7s45VXmnCQOQVrNfgo5PM2IXTb61u8mtTbYTb9UzdvErAwrFSsOzf2aX9VdwiCHJtBhQoqa4tiFI3bEi90y1qCHxz1tP/Z8/i4rGmDkVekfdOeuZ457VV4EN9L5CoO3wc5hDrNsm4FzLMy5OO/31H3yD54SASbavmYuQCpRRS50wxsRm6QwisVitusYuSyFsnfZno+9o92C8SXXa8OAnH67Rcqyjwwzofn98X5ASnjxG0N2XAqDsPR8GTtfEBZ71Zs7pccXFxwb17j/ns/ZN/k8hb5eEdSCnxn8lZ7BJpSHR9IpeJEqW+U9K8briNF0QEZhn305Yhn9w1MKi9g1RaKBipGN6NuHWkby8n1voCkaN4VwcH3V+w3Z3hXak7mM1vCWjtPRUOrYDr91Q8+nedciMzu95WfH6DkLYiahjrtIf2FBA5Xd/3h8+9bvN92LGI6w/f7QoMp/2+07sGNwIAMyxbXYpscHVl1yGgLoHISW7uqG1udYZu4tACmN8q8OZJHCcWEtyijiAxv6WDzUXPNtUDdrsOAXUJRE6WUq0POLB5ZuCHRgVPaxLcYowgEzjtvctrGOTaZUhdUndA5DX4CrjD3CJoXzQ4vJWg1fdVqZf06fqdxY90WovAAFL7fYXSpg/mAQxP35x0tyLyMk9O+sZxr5sCT9baA/PbBmCv5X35blVifPONhLNNtQ8zfKspIyJHWywWpC9vlgg+h92rXeyH4fjuwemn7PU26yLyj3C48l9fgl/X+adrt8jPzffMtM1TiDe9zouwgkDkZ86//a7fb6AZfnIQ5J/+ERE52SOgVhe+pHUPXvf5d+tlyNc0WiDyplhdZ/TGqGsg8jOV0gkbC5xIQSAiCgIRURCICAoCEUFBICIoCEQEBYGIoCAQERQEIoKCQERQEIgICgIRQUEgIigIRAQFgYigIBARFAQigoJARFAQiAgKAhFBQSAiKAhEBAWBiKAgEBEUBCKCgkBEUBCICAoCEUFBICIoCEQEBYGIoCAQERQEIoKCQERQEIgICgIRQUEgIigIRAQFgYigIBARFAQigoJARFAQiAgKAhFBQSAiKAhEBAWBiKAgEBEUBCKCgkBEUBCICAoCEUFBICIoCEQEBYGIoCAQERQEIoKCQERQEIgICgIRQUEgIigIRAQFgYigIBARFAQigoJARFAQiAgKAhFBQSAiKAhEBAWBiKAgEBEUBCKCgkBEUBCICAoCEUFBICIoCEQEBYGIoCAQERQEIoKCQERQEIgICgIRQUEgIigIRAQFgYigIBARFAQigoJARFAQiAgKAhFBQSAiKAhEBAWBiKAgEBEUBCKCgkBEUBCICAoCEUFBICIoCEQEBYGIoCAQERQEIoKCQERQEIgICgIRQUEgIigIRAQFgYigIBARFAQigoJARFAQiAgKAhFBQSAiKAhEBAWBiKAgEBEUBCKCgkBEUBCICAoCEUFBICIoCEQEBYGIoCAQERQEIoKCQERQEIgICgIRQUEgIigIRAQFgYigIBARFAQigoJARFAQiAgKAhFBQSAiKAhEBAWBiKAgEBEUBCKCgkBEUBCICAoCEUFBICIoCEQEBYGIoCAQERQEIoKCQERQEIgICgIRQUEgIigIRAQFgYigIBARFAQigoJARFAQiAgKAhFBQSAiKAhEBAWBiKAgEBEUBCKCgkBEUBCICAoCEUFBICIoCEQEBYGIoCAQERQEIoKCQERQEIgICgIRQUEgIigIRAQFgYigIBARFAQigoJARFAQiAgKApGfrZzzP+x3nRwE6TtfiVsdiIj8sCgQb/AUU4tA5GfpPgBlKi9/uaXBdy/Et3N6EET9cx1S3Ws4HBH5SW+gZaAWgcjPzZOX/1pKUPJ3z/7XmQevNQjiTXZiRN52b/D8Oi0IWpdgvnFEkNoxxiKI8kM3FJFXMQwD+YObswYXsJpbAdcjBK8rGk4Kgoiot4zAw3GvX4vUEQEl331Nhyfydiu5kO8WSilECbqIOjzn8wBdvJaWwsldg4ggAsLipb+XEuQpwwPg01sfn8hb7V3a1GGp5xeHP61VEOBOy4Pu5Ew4OghKLtftkbmFEgGptRQiiBJ88oI66PHgtAMTeduVsZDbIGENgoAe4pAGfM8ZvDjpd53UIkgp8Ljxx50U0EXQl+DsLNhu79cwALUMRI40juPh83nGIOZeQPtoZu3rjtOaBSc6cYyA2gKw64OrYwQQPeSpsNlsrsPgyU/do4h8n1KCUu5wdjaPxgfpRjVRxLdO4RP7BieOESTqeGEdNLxOqaCUvg5wfJhfDgO1CkSOUqY6UBildrf7Nk4wD9ZHgLWT79BaONHRQRB5HrSIw8mPBWZO5CB5YUqF7bMtu3s7nj9/zuXlxzxQq0DklXzyoi44ujdk8niX1SIz7ieyd7g5hkOAAVg9/8ICtxoYpzitLjgAg4zj1gYIHTyckgt96elXexZXwTe/hXSZePr0pN8k8lbKH2TGrzITE5YyXbcgmJhoAUD7pE0hGq173hsMx/++08YIUjvxrd5FWB3VLBZkS0ypMO7PGNaZu1cjw7sDw/CxZhBEXsF2C9N2Ii5gvSrkrpA9k63gOIZhYXWQzowII8wIT/T/2DGCGywIM8xq6yBZofPCopsY92eM55lpO700CioiP+Y+JRem8ZxpzPTTgpwDzwmzG1MHzB8MI/C51uAEtwiCdH0crbCoFG8FRR15zKwWtY9zb8jkD/P1dKKI/KBhGPhNDspUKIugdPXiWiwoFMIMsDo+QBujCyfPtTwnOCkI6vxlpsChsikC3AK3RPJC1y2Yxsw0TIznmfFqZLs96RhF3jqlBOtVoeQlOdeLq5tjudYLhFG7BhgWtcjISi04OsVpYwRlHiD0NkxhmLc+i2dIRuQRi47OBvabNecvBp4//+i0oxR5i3xz9g3bbsU+RqyMWLI6XVhyHZiL2hUIa1MHbfTQDGyyH73vH3L0rEGUIFJAJKwEZkGJGgclElZaMCTDfMSHGga7xZpxta8Dhu8DfzrpeEV+nR7UacPtFnYvBqZFokRHlHpiJ89EHZXHcErMkwYB4YQHyYyJOKnI+KTpwzRXElodpqAADm6lHqxTH0A4tphIU0/ykdVu4r2n91m/eMTDB8Bnp/x2kV+RT+GTv8D2KVwOH7Pb7Sh3CsUKCwZKB5GNyBDJsBIUK7URMM8aUPBiZMCKsVgcHwUn7keQDnsS1Jpn6nSGGxhElEMTZozEaJkpZYbV+cvVhppOlLfcgyew3d5ns/kXNvc27C/2LLuJzjIWzmGe3ucLrrUxulZE0FoGhYKV1kU/wdFB8Jv2cS5xDgvCrw8KKzUMSiangkXGSaR9z7irNQWbzYbLy48VBvJ2+xSePoXNZsPw7sC0nbi7mxh2E05mCsfCSKXWCdQrr0HrLkQdKSAwzBLZwNxYr9dHH8rRQfAMgAyl3rhWOBrhRqkbFOBmhxaB4yTL5JRZLjLDi4Hh3YFx1CyCvOWewDB8/HIIrDJd6smWMCt1MwKntgbMwEobF4hWYtxaBwU6Mzw7d+7cOfpQjh4jMDfKYQ4TMD+sO7CWWhFBCaf9JBnoDLIbXZdI2w0p7XjKe3z4ouP843Me/+Gxxgzk1+1TDitxP3kBX/75I56dP+PONMF0Rl4Bo1G6VqUTkL0OyuPzgLzVoiKsFg8V2tW4nnfTdNqbohwdBGmRavM/O97mMwuGWQa81jkA7lEHDNuA4lQyyWCRCxOJsXfSkOjTFSkNfLT/iNXHKwAWi8es1/DwDpphkF++NiNw+X8+ZhxHcs588duR1e++od+sKbtatp+BtIAxB5aDZE6iEF5LimPugVv9xMxaQV8LBnNSB++///7Rh3h0EPjfHX5jWASlThDglltS0XottSDCrLYGvIB5Ipc6BbIwIyevNx57nkfP+smGy9Webt2x+/IjNpvE/e359QyDAkF+aVoL4P7T+3y12TC8u2HaTtwbMskynpf4cg90LBkY2yC8R0AKClEH4Ynatm5L/+fanSjUC20ySgEojN1p6wiPHiPo+y8hBd5NdU+UNpVhdXFkXQABuFlbHAHFa9WTeyJFkDFiMpZ5hJLobGDbrTjrB84v9+wv9odBxZc2N9HAovwSfEp9rT6B+20wcHdvx8WLgbN+4KpbkWIuGEpEdspkdAYeHeYBxaHE9dWeWrODzbMCdU8Ch8N4QWdBGveccsU8OghWK1jkwIbuUEhYSu0mlDYm4DGPahYwq9MgXsc4CxBTm3VIhvW1ArH3kf1mzW4xcbYZDoOKNQxq0+oBKAzk5621Ah5QX7PzYOA7+4ntYmLYntXX+tVYT/ri4CNhRplqlz+iDr3NA4FBHDYim1cSWFtoVGyu6A0KiXHdc//+8Yd9dBA8vgeeMlMX5KlOa6QExdrSSIfwufHibWQz1x2Oa4iRrKZfFIPiTDYxeq4rFrs14/qcO6uJaTuRc2YYPma7vc8L7YEoP3dPagC8aFWC4zgybSd2q7oad9FNTCmTvK8XyC5DaUv5abt+zSfLjdM+Wq2OGbWaF+raAwvCS6slyKQh8R8nHPZha4Nj/PHfP8CvRiISU1corcgh53qQjrWpzmiX/qgViFZLEI0gFw4joVYCSzXRUnbGbqDLiWHq6BZXLHYJd+NZMjw53jneO6lP5PEf99bRIt9nfh2WsdQVg7nwLpBzMKwzw3ZNn0ZG7+k942MdMA+vs2lh+VBK7NbqA+YNR2zegqx+39r/gjpZMK/6jUViOW2Jq+Dzzy+PfgwnjSwM05Z+lYl8lzxlktcD97oEsc1z0mYMgrA2qhG1AxEebS92xwKy19LIwChMEB0FZ+kjmSVT55jBXTf27LEMdlVnJF73u8KKnMIDbFmb8Etfsit1856SE8vlwDR2LGIiZ4dkJCDIlFLH0wCINgPXlhLPM/NmdWDwUFDYrt3Xaw6MNBVySVytTjv+k4JgsUvsFkHvGVJPIdervXurhfZWDHHYMqGNF9RR0Mj1QRUrBI6H1QedM5GcLoxCJsyBDB43GkldfS5aOfPJ7DY3ll+l2+z+GfWiVz+dWlO/Nu9LJOgyJTtOrjU2VghsrrvDSvsYbXUx1vYWaK99r1+rG5XWLgEekAtOwqbCaAu61WnvN3hSEGzuLJj2jrPEpj3eQw7DUsEi1f5Ksdrst1z3MjS7UYNUH6RjFI+2qgoieZt1KFwPLabDSRuW6xMwb9w2n8wnntOKApndaH2fcMP2yQRdgiC1+2tvStJGy4rfHDlr+wyWdrFsXQBr3eh5hMDb2Fs53N+NYcPweuEsE5MH63EkXz476fGfFAR3r+6y2+24uNjzoguy1Qfi1PnMABJ1D0PC67rp1ucJs+vkjLqaal5BBYZHmZ+i2jbKraDCDPBDCBg/3CJ4tX/PfMwPy6+cHU7oH+9sfqfNcONaNO8OVFu/cwOj1gdHGN5e44fXOtwoGW5dgJhD4vrCma0uPZ7HDer3a+VunxMlFXxzzvbdgb8BfH784z8pCP7wh8cAPH16n274G3HWU0aDfmKytvzY6xU/St1A4XDiztHb0rJuaFLqxT3iEAJ+Mwzq8GLd62A+/+1b/yQ3mvo/1sAzaBngN74gb7WbL5gUP/r6efl2N35y7ubnAE+HUHCuL2ztLDi8VKOUQ3Wgta7EXCsQJVo/4ca7GIWDl0MI7Ok4G/dslgtW/xV+/+L3/O3h3056Ck6aNbjp/v37POUpS/b0XoskEh02UWMmqIuR5l/YBhEPb9l0+N5cexCt9uBGIcW8tLINmHynF3QjBIzyPT8g8po4bVa/+fZru71L+HzxttYCnisD22nfTvrWKp4HCNptYr5mHlrRdaZt3pgkktGXRBoH/vKX07oC33ZaPeIN6/UjOj5k8Wxit+joPRhtgtSRMnWOM+Z50NqkCeq2zNd10zAPilh7C5e4EQY3RgrrxbyVU9ohWq//MY5ONbUI5JgXTTn87+W7aFv3edCa90C00a4WBoHVixzR3qXIrk9w6vkRh7G0ervCdQi4GcU7+mkkU7ha3fr0Pbj1PT28A//y/xZ8cz5x1m8Y9+csO2M/5bqUslU9caOPc0jUQ4S2Jzbmaqn53h3z8lIvoM4YHD77fq/SIrgxZSMCvPqswfeU4dX+/Tytd+Pn5jGwqBe2oPV2ixFeWwLzTMG8mChu3Ie1G0SrOK4/2zMVo1u/vqvY7SPlfTh/ek5+nrm6gLvDlsEzkRJdlLoYKRIltdmCUpOveJCibawQhkd9YmrJkZPjupl/dMnQKz0/SgD5llc9r37kpVNXBcf1z83XOZ+7AQGlDX7HdWs3CLy0xQM3GsFhddygC8A7GAukwnI9wlfvHP8Yf8Dt3+DkT/DovUdcXFxwtjlj+5sVe5YwrZhaHyg7xDRRouCp9vlTpLqmos0AFJ9XWrXqyrbzUZjX5ZjWVjq+loMWeb1efm1e/+3QIi5RxwJKu97Pr3erRUQpUt0MtFXmzs1iK4GRiMmYbE9aAv3ILla8++4J0wM/4NaDhQdtsUXdifU+f+/+zsp27G1NtxkYPdN5j3UTZCfM6EpNxRxWR0OtdhusPVk3pxrnYsVaY/3yO7qoNkj+mX6sR1GnAet0obWamXmkLDA8ByRvBXlBjE5YIUh1A1PrCMtklix2G75ZdSyfL7m4+IJHj17fY3h9QfB95h1ZXgBbYIDf/va3pBeJdbI65egQGTrP5KjtIvNSWwnUUVLg8AYqh6lUkV+Al076ecCwdfbNE+RaIWipYGVBiYnF1DGst6yHjs1mzQcffMHDh2/2ON9sEIjIL4K62yKiIBARBYGIoCAQERQEIoKCQERQEIgICgIRQUEgIigIRAQFgYgA/x9yuL0cmA8kJAAAAABJRU5ErkJggg=="
+                         transform="matrix(1,0,0,-1,0,1)"
+                         preserveAspectRatio="none"
+                         height="1"
+                         width="1" /></g></g></g></g></g></g></g></g></g><g
+       id="g358"><g
+         clip-path="url(#clipPath362)"
+         id="g360"><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+           id="g366"><path
+             inkscape:connector-curvature="0"
+             id="path376"
+             style="fill:url(#linearGradient368);fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 221.18899,159.714 -7.04699,21.237 9.906,0 -9.906,19.049 24.101,-26.39 -10.588,0 9.323,-13.896 -15.78901,0 z" /></g><g
+           id="g378"><g
+             clip-path="url(#clipPath382)"
+             id="g380"><g
+               id="g386"><g
+                 clip-path="url(#clipPath390)"
+                 id="g388" /></g><g
+               id="g394"><g
+                 clip-path="url(#clipPath398)"
+                 id="g396"><g
+                   transform="matrix(0.110118,0,0,0.110118,106.577,107.858)"
+                   id="g402"><g
+                     clip-path="url(#clipPath406)"
+                     id="g404"><g
+                       transform="matrix(0.98374,0,0,0.98374,1.21951,0)"
+                       id="g410"><g
+                         transform="matrix(396,0,0,-246,0,246)"
+                         id="g412"><image
+                           id="image418"
+                           mask="url(#mask414)"
+                           xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYwAAAD2CAYAAADF97BZAAAABHNCSVQICAgIfAhkiAAAA35JREFUeJzt1cENwCAQwLCD/XduRyA/hGRPkF/WzHwDAAf7dgAAbzAMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAgMQwAEsMAIDEMABLDACAxDAASwwAg+QFYLQLr1Tn2NQAAAABJRU5ErkJggg=="
+                           transform="matrix(1,0,0,-1,0,1)"
+                           preserveAspectRatio="none"
+                           height="1"
+                           width="1" /></g></g></g></g></g></g></g></g></g></g><g
+       id="g420"><g
+         clip-path="url(#clipPath424)"
+         id="g422"><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+           id="g428"><path
+             inkscape:connector-curvature="0"
+             id="path442"
+             style="fill:url(#radialGradient430);fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 186.70599,235.825 c 0,5.96499 4.83501,10.80101 10.79901,10.80101 l 55.374,0 c 5.96499,0 10.80099,-4.83602 10.80099,-10.80101 l 0,-19.373 c 0,-5.965 -4.836,-10.801 -10.80099,-10.801 l -55.374,0 c -5.964,0 -10.79901,4.836 -10.79901,10.801 l 0,19.373 z" /></g><g
+           id="g444"><path
+             inkscape:connector-curvature="0"
+             id="path446"
+             style="fill:#edf5e5;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 108.871,125.143 2.294,0 0.299,1.482 0.816,1.211 1.211,0.817 1.482,0.299 25.407,0 1.482,-0.299 1.211,-0.817 0.817,-1.211 0.298,-1.482 0,-8.889 -0.298,-1.482 -0.817,-1.211 -1.211,-0.816 -1.482,-0.299 -25.407,0 -1.482,0.299 -1.211,0.816 -0.816,1.211 -0.299,1.482 0,8.889 -2.294,0 0,-8.889 0.48,-2.375 1.307,-1.94 1.939,-1.307 2.376,-0.48 25.407,0 2.376,0.48 1.93901,1.307 1.30699,1.94 0.481,2.375 0,8.889 -0.481,2.376 -1.30699,1.94 -1.93901,1.30701 -2.376,0.47999 -25.407,0 -2.376,-0.47999 -1.939,-1.30802 -1.307,-1.93899 -0.48,-2.376" /></g><g
+           id="g448"><g
+             clip-path="url(#clipPath452)"
+             id="g450"><g
+               id="g456"><g
+                 clip-path="url(#clipPath460)"
+                 id="g458" /></g><g
+               id="g464"><g
+                 clip-path="url(#clipPath468)"
+                 id="g466"><g
+                   transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+                   id="g472"><path
+                     inkscape:connector-curvature="0"
+                     id="path474"
+                     style="fill:#ffffff;fill-opacity:0.73999999;fill-rule:nonzero;stroke:none"
+                     d="m 263.62299,229.595 c 0.037,-0.364 0.057,-0.73401 0.057,-1.10699 l 0,-13.375 c 0,-5.96502 -4.836,-10.79902 -10.80099,-10.79902 l -55.374,0 c -5.964,0 -10.79901,4.834 -10.79901,10.79902 l 0,7.32399 c 7.54502,-1.012 15.69901,-1.566 24.21302,-1.566 21.03999,-0.001 39.89299,3.381 52.70398,8.724 z" /></g></g></g></g></g></g></g><g
+       id="g476"><g
+         clip-path="url(#clipPath480)"
+         id="g478"><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+           id="g484" /><g
+           id="g486"><g
+             id="g488"><g
+               transform="matrix(39.317528,0,0,-22.914223,108.01809,131.59914)"
+               id="g490"><image
+                 id="image496"
+                 mask="url(#mask492)"
+                 xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPYAAACTCAYAAAC9K+QhAAAABHNCSVQICAgIfAhkiAAABrxJREFUeJzt3U1v21YWxvGHpCg5tltUCZy0btCFEWCAeOlNEwSIF9OpF4PZ+fNw8jX6FbQrZmFMZ6EAQdqNljbQojCCIhhPPYjkphrLFimxi0GAvthJ7uUl7Rz/f/v7snlwzr0UqUhSKQCmxBe9AQDhEWzAIIINGESwAYMINmAQwQYMItiAQQQbMIhgAwYRbMAggg0YRLABgwg2YBDBBgwi2IBBBBswqNXkYmXJNx1wNUVR1Ox6augLKoQaaC7gtQebQAO/1US4az1jZ1lW5/TAOynLstoLXm0Vm0oNvFld1buWik2ogbdTV1aC34pnWaZerxd6WsCssiyDV+6gFTvLMq2vr4ecEjCv1+sFr9zBgl2WJaEGLolgrXiv19P2dqjZgKumF7QlD3IrnmWZNjc3q+8GuOL6/b4ePXpUeZ4grTgtOBDG+vp6kPN25WBnWaaVlZXKGwGgYFmqHGyqNRBWv9+vXLUrXZ5lWabRaKTRaFRpEwB+q9/vVxpfqWKvrq5WWhzA2apeRntX7LIsNRh8UWlxAOf5rtLjL++Kzc9GgXpVyZh3xR6NRtrf/7f3wgBer8rVlVewsyxTt9uV1PVfGcBrdbv+L4h4teI84gKa4duOewWbx1tAM3x/sOLVine7XR0cHHgtCODt7e7ueo1zrthlWRJqoCG+x95E0t9dB127ds1rMQBuxuOxdnZ2nMd5teLvvz/0GQbAQ5Zlzq9y8hc/wCW3vr7nPIZgAwYRbMAgrzP2cPgy9D4AnGNpyX2Mc8Xe23Pv9wE0i1YcMIhgAwY5B5tvhwOXn9fl2cuX/wu9DwDn2N09dB5DKw4YRLABgwg2YBDBBgxyvjzb3T3UeNypYy8AzrC87D6Gig0YRLABgwg2YBDBBgzy+uXZZHIaeh8AzsHlGQBJBBswyTnYBwfjOvYB4Bw+mfM6Y58sccYGmtL6yX0MrThgEMEGDCLYgEFeZ+zTk2nofQA4h09IqdiAQQQbMMi5yo9GE6lb1LEXAGeYjibOY6jYgEFel2fd0LsAcK6Rxxi/W/HT3GcYgIbQigMGEWzAIIINGOR1xs7zWeh9AAiIig0YRLABgwg2YJDzGfvnn6daXuYnpUBTxmP3tymp2IBBBBswiGADBnk9xy6Ko9D7ABAQFRswiGADBhFswCDPM/Y89D4ABETFBgwi2IBBzq345Fau96adOvYC4AyTtvunyPzO2DlnbKAxbfchtOKAQQQbMMirFZ/NaMWBy4yKDRhEsAGDCDZgkN8ZuyhD7wNAQFRs4LJ75j7EOdg3j5fcVwHg7eZN98w5t+KHhyvS0jPnhQD4OTxccR7jXLE3Nx87LwLAn0/mIknON2H3PltTO+X/u4C6TfNEX3+17zzO6/Ks3Zn4DAPgyDdrXo+7TqeJ0ohHXkDd8iLxGudVsd8r3d8PBeDON2tewR4ObytOIq8FAbydOIk0HN72Gut1eSZJn/7lttKI37cAdcnLub7553OvsV5nbEmKxxPNFhd9hwN4g/jY/5Lau+QefXzLe1EAb1YlY96tuCQ92PpQ8yL1XhzA2eJWric7//EfX2Xx4si7kwfwGlWzValiS9KDB5+oaPOpJCCU1jTWkyc/VJqj8rV2kkRKc27HgRDSPFYS4FFy5YotSRt/XlM6n1beDHDV5XFbg3+5/zb894KU2rXuvtKUqg1Ukaax1rrVQy0FqtiStPHXj1TmqVoRb30BrooyUZTmGvzjIMh8wYItSff/dkPFdCHUdMCV0Wqf6OmXL4LNFzTY0v/P20nrNOSUgGmzohPkXP1rwR9Er3X39Wy4qtLvbTPgSolm0tr1fQ1Cz6vAFVuSNjY2lN74Ual4vg2cJ1es/MUtDQahY13T54cHg4E+v/dcnTnnbeAsnfmCPr/3vJZQSzVV7F+7f/+GtLioJOa2HJjNE+n4WE+fhrsoO0vtwZakra07OpqeEG5cabN5og/aC9rZ+b72tRoJtiRtbEjd7pqOlStS0cSSwKVQqqVFpRqN9lVT5/0HjQX7lbvbd3X9YKyiPaeCw7TZPFFrGmv40bL2enuNrt14sF95+FA6bq1qIZHmc754CjviOFKuWJ3T53p8Qf+vcWHBfmV7W/r26JYWo1RpdKJiyjveePe02oXyckHHZa4/ffCjer2L3c+FB/v3trbu6L/FC8XlNbXimVonM53GHdp2XAqzeaLO/FTFQqJinmgeTbTSutHIhZiLSxfs13n48KJ3gKvsotpqH+9UsAG8HV6iBgwi2IBBBBswiGADBhFswCCCDRhEsAGDCDZgEMEGDCLYgEEEGzDoF+PUpv/fmgtSAAAAAElFTkSuQmCC"
+                 transform="matrix(1,0,0,-1,0,1)"
+                 preserveAspectRatio="none"
+                 height="1"
+                 width="1" /></g></g></g><g
+           id="g498"><g
+             clip-path="url(#clipPath502)"
+             id="g500"><g
+               id="g506"><g
+                 clip-path="url(#clipPath510)"
+                 id="g508" /></g><g
+               id="g514"><g
+                 clip-path="url(#clipPath518)"
+                 id="g516"><g
+                   transform="matrix(0.110118,0,0,0.110118,115.673,116.302)"
+                   id="g522"><g
+                     clip-path="url(#clipPath526)"
+                     id="g524"><g
+                       transform="scale(0.909091,0.909091)"
+                       id="g530"><g
+                         transform="matrix(33,0,0,-33,0,33)"
+                         id="g532"><image
+                           id="image538"
+                           mask="url(#mask534)"
+                           xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABHNCSVQICAgIfAhkiAAAADpJREFUWIXtzjERgEAABLED/56h2kHCUyQKcm17dth9OrBJfCQiEYlIRCISkYhEJCIRiUhEIhL5ReIFV+YBQdtYhsUAAAAASUVORK5CYII="
+                           transform="matrix(1,0,0,-1,0,1)"
+                           preserveAspectRatio="none"
+                           height="1"
+                           width="1" /></g></g></g></g></g></g></g></g></g></g><g
+       id="g540"><g
+         clip-path="url(#clipPath544)"
+         id="g542"><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+           id="g548"><path
+             inkscape:connector-curvature="0"
+             id="path558"
+             style="fill:url(#radialGradient550);fill-opacity:1;fill-rule:evenodd;stroke:none"
+             d="m 199.63,219.70399 c 0,-1.65599 1.34301,-2.99899 2.999,-2.99899 l 0,0 c 1.656,0 2.99901,1.343 2.99901,2.99899 l 0,0 c 0,1.65601 -1.34301,2.99901 -2.99901,2.99901 l 0,0 c -1.65599,0 -2.999,-1.343 -2.999,-2.99901 z" /></g><g
+           id="g560"><g
+             clip-path="url(#clipPath564)"
+             id="g562"><g
+               id="g568"><g
+                 clip-path="url(#clipPath572)"
+                 id="g570" /></g><g
+               id="g576"><g
+                 clip-path="url(#clipPath580)"
+                 id="g578"><g
+                   transform="matrix(0.110118,0,0,0.110118,122.516,116.302)"
+                   id="g584"><g
+                     clip-path="url(#clipPath588)"
+                     id="g586"><g
+                       transform="matrix(0.789474,0,0,0.789474,-1e-6,1.97368)"
+                       id="g592"><g
+                         transform="matrix(38,0,0,-33,0,33)"
+                         id="g594"><image
+                           id="image600"
+                           mask="url(#mask596)"
+                           xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAABHNCSVQICAgIfAhkiAAAAEBJREFUWIXtzjEBgDAQALEH/56LAoab+kOiIM/MnFnovR34I1aJVWKVWCVWiVVilVglVolVYpVYJVaJVWLV2tgHQScBQcIgUc4AAAAASUVORK5CYII="
+                           transform="matrix(1,0,0,-1,0,1)"
+                           preserveAspectRatio="none"
+                           height="1"
+                           width="1" /></g></g></g></g></g></g></g></g></g></g><g
+       id="g602"><g
+         clip-path="url(#clipPath606)"
+         id="g604"><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+           id="g610"><path
+             inkscape:connector-curvature="0"
+             id="path620"
+             style="fill:url(#radialGradient612);fill-opacity:1;fill-rule:evenodd;stroke:none"
+             d="m 214.545,219.70399 c 0,-1.65599 1.343,-2.99899 2.99901,-2.99899 l 0,0 c 1.65599,0 2.99899,1.343 2.99899,2.99899 l 0,0 c 0,1.65601 -1.343,2.99901 -2.99899,2.99901 l 0,0 c -1.65601,0 -2.99901,-1.343 -2.99901,-2.99901 z" /></g><g
+           id="g622"><g
+             clip-path="url(#clipPath626)"
+             id="g624"><g
+               id="g630"><g
+                 clip-path="url(#clipPath634)"
+                 id="g632" /></g><g
+               id="g638"><g
+                 clip-path="url(#clipPath642)"
+                 id="g640"><g
+                   transform="matrix(0.110118,0,0,0.110118,129.35899,116.302)"
+                   id="g646"><g
+                     clip-path="url(#clipPath650)"
+                     id="g648"><g
+                       transform="matrix(0.789474,0,0,0.789474,-1e-6,1.97368)"
+                       id="g654"><g
+                         transform="matrix(38,0,0,-33,0,33)"
+                         id="g656"><image
+                           id="image662"
+                           mask="url(#mask658)"
+                           xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAABHNCSVQICAgIfAhkiAAAAEBJREFUWIXtzjEBgDAQALEH/56LAoab+kOiIM/MnFnovR34I1aJVWKVWCVWiVVilVglVolVYpVYJVaJVWLV2tgHQScBQcIgUc4AAAAASUVORK5CYII="
+                           transform="matrix(1,0,0,-1,0,1)"
+                           preserveAspectRatio="none"
+                           height="1"
+                           width="1" /></g></g></g></g></g></g></g></g></g></g><g
+       id="g664"><g
+         clip-path="url(#clipPath668)"
+         id="g666"><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+           id="g672"><path
+             inkscape:connector-curvature="0"
+             id="path682"
+             style="fill:url(#radialGradient674);fill-opacity:1;fill-rule:evenodd;stroke:none"
+             d="m 229.46001,219.70399 c 0,-1.65599 1.34298,-2.99899 2.99899,-2.99899 l 0,0 c 1.656,0 2.99899,1.343 2.99899,2.99899 l 0,0 c 0,1.65601 -1.34299,2.99901 -2.99899,2.99901 l 0,0 c -1.65601,0 -2.99899,-1.343 -2.99899,-2.99901 z" /></g><g
+           id="g684"><g
+             clip-path="url(#clipPath688)"
+             id="g686"><g
+               id="g692"><g
+                 clip-path="url(#clipPath696)"
+                 id="g694" /></g><g
+               id="g700"><g
+                 clip-path="url(#clipPath704)"
+                 id="g702"><g
+                   transform="matrix(0.110118,0,0,0.110118,136.203,116.302)"
+                   id="g708"><g
+                     clip-path="url(#clipPath712)"
+                     id="g710"><g
+                       transform="scale(0.909091,0.909091)"
+                       id="g716"><g
+                         transform="matrix(33,0,0,-33,0,33)"
+                         id="g718"><image
+                           id="image724"
+                           mask="url(#mask720)"
+                           xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABHNCSVQICAgIfAhkiAAAADpJREFUWIXtzjERgEAABLED/56h2kHCUyQKcm17dth9OrBJfCQiEYlIRCISkYhEJCIRiUhEIhL5ReIFV+YBQdtYhsUAAAAASUVORK5CYII="
+                           transform="matrix(1,0,0,-1,0,1)"
+                           preserveAspectRatio="none"
+                           height="1"
+                           width="1" /></g></g></g></g></g></g></g></g></g></g><g
+       id="g726"><g
+         clip-path="url(#clipPath730)"
+         id="g728"><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+           id="g734"><path
+             inkscape:connector-curvature="0"
+             id="path744"
+             style="fill:url(#radialGradient736);fill-opacity:1;fill-rule:evenodd;stroke:none"
+             d="m 244.375,219.70399 c 0,-1.65599 1.343,-2.99899 2.99899,-2.99899 l 0,0 c 1.65601,0 2.99901,1.343 2.99901,2.99899 l 0,0 c 0,1.65601 -1.343,2.99901 -2.99901,2.99901 l 0,0 c -1.65599,0 -2.99899,-1.343 -2.99899,-2.99901 z" /></g><g
+           id="g746"><g
+             clip-path="url(#clipPath750)"
+             id="g748"><g
+               id="g754"><g
+                 clip-path="url(#clipPath758)"
+                 id="g756" /></g><g
+               id="g762"><g
+                 clip-path="url(#clipPath766)"
+                 id="g764"><g
+                   transform="matrix(0.110118,0,0,0.110118,115.673,122.572)"
+                   id="g770"><g
+                     clip-path="url(#clipPath774)"
+                     id="g772"><g
+                       transform="scale(0.909091,0.909091)"
+                       id="g778"><g
+                         transform="matrix(33,0,0,-33,0,33)"
+                         id="g780"><image
+                           id="image786"
+                           mask="url(#mask782)"
+                           xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABHNCSVQICAgIfAhkiAAAADpJREFUWIXtzjERgEAABLED/56h2kHCUyQKcm17dth9OrBJfCQiEYlIRCISkYhEJCIRiUhEIhL5ReIFV+YBQdtYhsUAAAAASUVORK5CYII="
+                           transform="matrix(1,0,0,-1,0,1)"
+                           preserveAspectRatio="none"
+                           height="1"
+                           width="1" /></g></g></g></g></g></g></g></g></g></g><g
+       id="g788"><g
+         clip-path="url(#clipPath792)"
+         id="g790"><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+           id="g796"><path
+             inkscape:connector-curvature="0"
+             id="path806"
+             style="fill:url(#radialGradient798);fill-opacity:1;fill-rule:evenodd;stroke:none"
+             d="m 199.63,233.36999 c 0,-1.65599 1.34301,-2.99899 2.999,-2.99899 l 0,0 c 1.656,0 2.99901,1.343 2.99901,2.99899 l 0,0 c 0,1.65601 -1.34301,2.99901 -2.99901,2.99901 l 0,0 c -1.65599,0 -2.999,-1.343 -2.999,-2.99901 z" /></g><g
+           id="g808"><g
+             clip-path="url(#clipPath812)"
+             id="g810"><g
+               id="g816"><g
+                 clip-path="url(#clipPath820)"
+                 id="g818" /></g><g
+               id="g824"><g
+                 clip-path="url(#clipPath828)"
+                 id="g826"><g
+                   transform="matrix(0.110118,0,0,0.110118,122.516,122.572)"
+                   id="g832"><g
+                     clip-path="url(#clipPath836)"
+                     id="g834"><g
+                       transform="matrix(0.789474,0,0,0.789474,-1e-6,1.97368)"
+                       id="g840"><g
+                         transform="matrix(38,0,0,-33,0,33)"
+                         id="g842"><image
+                           id="image848"
+                           mask="url(#mask844)"
+                           xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAABHNCSVQICAgIfAhkiAAAAEBJREFUWIXtzjEBgDAQALEH/56LAoab+kOiIM/MnFnovR34I1aJVWKVWCVWiVVilVglVolVYpVYJVaJVWLV2tgHQScBQcIgUc4AAAAASUVORK5CYII="
+                           transform="matrix(1,0,0,-1,0,1)"
+                           preserveAspectRatio="none"
+                           height="1"
+                           width="1" /></g></g></g></g></g></g></g></g></g></g><g
+       id="g850"><g
+         clip-path="url(#clipPath854)"
+         id="g852"><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+           id="g858"><path
+             inkscape:connector-curvature="0"
+             id="path868"
+             style="fill:url(#radialGradient860);fill-opacity:1;fill-rule:evenodd;stroke:none"
+             d="m 214.545,233.36999 c 0,-1.65599 1.343,-2.99899 2.99901,-2.99899 l 0,0 c 1.65599,0 2.99899,1.343 2.99899,2.99899 l 0,0 c 0,1.65601 -1.343,2.99901 -2.99899,2.99901 l 0,0 c -1.65601,0 -2.99901,-1.343 -2.99901,-2.99901 z" /></g><g
+           id="g870"><g
+             clip-path="url(#clipPath874)"
+             id="g872"><g
+               id="g878"><g
+                 clip-path="url(#clipPath882)"
+                 id="g880" /></g><g
+               id="g886"><g
+                 clip-path="url(#clipPath890)"
+                 id="g888"><g
+                   transform="matrix(0.110118,0,0,0.110118,129.35899,122.572)"
+                   id="g894"><g
+                     clip-path="url(#clipPath898)"
+                     id="g896"><g
+                       transform="matrix(0.789474,0,0,0.789474,-1e-6,1.97368)"
+                       id="g902"><g
+                         transform="matrix(38,0,0,-33,0,33)"
+                         id="g904"><image
+                           id="image910"
+                           mask="url(#mask906)"
+                           xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAABHNCSVQICAgIfAhkiAAAAEBJREFUWIXtzjEBgDAQALEH/56LAoab+kOiIM/MnFnovR34I1aJVWKVWCVWiVVilVglVolVYpVYJVaJVWLV2tgHQScBQcIgUc4AAAAASUVORK5CYII="
+                           transform="matrix(1,0,0,-1,0,1)"
+                           preserveAspectRatio="none"
+                           height="1"
+                           width="1" /></g></g></g></g></g></g></g></g></g></g><g
+       id="g912"><g
+         clip-path="url(#clipPath916)"
+         id="g914"><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+           id="g920"><path
+             inkscape:connector-curvature="0"
+             id="path930"
+             style="fill:url(#radialGradient922);fill-opacity:1;fill-rule:evenodd;stroke:none"
+             d="m 229.46001,233.36999 c 0,-1.65599 1.34298,-2.99899 2.99899,-2.99899 l 0,0 c 1.656,0 2.99899,1.343 2.99899,2.99899 l 0,0 c 0,1.65601 -1.34299,2.99901 -2.99899,2.99901 l 0,0 c -1.65601,0 -2.99899,-1.343 -2.99899,-2.99901 z" /></g><g
+           id="g932"><g
+             clip-path="url(#clipPath936)"
+             id="g934"><g
+               id="g940"><g
+                 clip-path="url(#clipPath944)"
+                 id="g942" /></g><g
+               id="g948"><g
+                 clip-path="url(#clipPath952)"
+                 id="g950"><g
+                   transform="matrix(0.110118,0,0,0.110118,136.203,122.572)"
+                   id="g956"><g
+                     clip-path="url(#clipPath960)"
+                     id="g958"><g
+                       transform="scale(0.909091,0.909091)"
+                       id="g964"><g
+                         transform="matrix(33,0,0,-33,0,33)"
+                         id="g966"><image
+                           id="image972"
+                           mask="url(#mask968)"
+                           xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABHNCSVQICAgIfAhkiAAAADpJREFUWIXtzjERgEAABLED/56h2kHCUyQKcm17dth9OrBJfCQiEYlIRCISkYhEJCIRiUhEIhL5ReIFV+YBQdtYhsUAAAAASUVORK5CYII="
+                           transform="matrix(1,0,0,-1,0,1)"
+                           preserveAspectRatio="none"
+                           height="1"
+                           width="1" /></g></g></g></g></g></g></g></g></g></g><g
+       id="g974"><g
+         clip-path="url(#clipPath978)"
+         id="g976"><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+           id="g982"><path
+             inkscape:connector-curvature="0"
+             id="path992"
+             style="fill:url(#radialGradient984);fill-opacity:1;fill-rule:evenodd;stroke:none"
+             d="m 244.375,233.36999 c 0,-1.65599 1.343,-2.99899 2.99899,-2.99899 l 0,0 c 1.65601,0 2.99901,1.343 2.99901,2.99899 l 0,0 c 0,1.65601 -1.343,2.99901 -2.99901,2.99901 l 0,0 c -1.65599,0 -2.99899,-1.343 -2.99899,-2.99901 z" /></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,16.9412)"
+           id="g994"><path
+             inkscape:connector-curvature="0"
+             id="path996"
+             style="fill:#f5f5f5;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 529.664,248.155 18.49799,0 -2.80896,18.06399 5.58996,0 37.586,0 2.60004,-17.71798 c 4.97998,-1.09101 9.13299,-3.45501 12.51196,-6.69301 3.08399,4.075 8.56598,7.36999 18.25202,7.36999 6.33801,0 12.77502,-1.80699 17.17401,-3.68699 4.25396,2.399 9.46301,3.68699 15.45898,3.68699 3.08801,0 6.23602,-0.35499 9.42603,-1.02299 l 67.13495,0 3.354,-24.827 -5.44501,-0.76401 1.87903,-13.356 c 0.37097,-2.38598 0.44898,-4.65999 0.44898,-6.15599 l -0.008,-0.375 c -0.45697,-12.19101 -8.13898,-19.765 -20.04498,-19.765 -2.404,0 -4.62299,0.314 -6.67603,0.85201 l -34.18896,0 -0.035,0.24399 c -2.52698,-0.70099 -5.40997,-1.096 -8.68597,-1.096 -3.80103,0 -7.40601,0.55499 -10.76001,1.59799 l 0.10504,-0.74598 -12.46704,0 1.82599,-12.95101 -27.30896,0 -1.84601,7.65799 c -1.37299,5.70401 -2.21301,5.79302 -4.453,6.03002 l -4.508,0.47699 c -3.04901,-1.424 -6.35699,-2.06501 -9.60199,-2.06501 -2.13501,0 -4.27502,0.28402 -6.41602,0.85201 l -19.29101,0 c 0.50201,-1.772 0.77502,-3.674 0.77502,-5.67799 0,-9.60102 -6.846,-16.30501 -16.64599,-16.30501 -11.055,0 -18.77503,7.72101 -18.77503,18.776 0,0.951 0.082,1.869 0.219,2.76401 -2.13501,-0.28801 -4.27698,-0.40902 -5.55298,-0.40902 -2.05298,0 -4.07202,0.28801 -6.04498,0.85201 l -31.34205,0 c -2.73999,-0.55299 -5.64099,-0.85201 -8.53698,-0.85201 -7.138,0 -13.49201,1.67402 -18.80799,4.72301 l -3.45102,-1.461 c -3.71099,-1.571 -11.23199,-3.26201 -18.979,-3.26201 -8.93298,0 -16.383,2.56002 -21.57599,7.01601 -3.26501,-4.47301 -8.52301,-7.01601 -15.228,-7.01601 -4.82199,0 -9.02099,1.47701 -12.57199,3.44001 -2.996,-2.204 -6.79602,-3.44001 -11.11502,-3.44001 -2.32699,0 -4.47998,0.31501 -6.47598,0.85201 l -33.96301,0 -0.035,0.24499 c -2.526,-0.70199 -5.41,-1.097 -8.68698,-1.097 -20.458,0 -35.307,16.03101 -35.307,38.11701 0,17.363 10.785,28.149 28.14798,28.149 3.087,0 6.23602,-0.356 9.42602,-1.02299 l 88.81598,0 c 3.70602,0.67599 7.66901,1.02299 11.15402,1.02299 8.90698,0 16.27799,-2.375 21.50998,-6.593 4.87201,4.252 11.58502,6.593 19.728,6.593 3.05301,0 6.20602,-0.368 9.28601,-1.02299 l 44.66397,0 2.06903,0 0,-0.001 z" /></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g998"><path
+             inkscape:connector-curvature="0"
+             id="path1000"
+             style="fill:#383838;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 340.30801,218.463 c -5.53802,2.556 -11.58801,4.26001 -17.638,4.26001 -13.37701,0 -18.14801,-7.83901 -18.14801,-18.14801 0,-17.89299 11.418,-28.11701 25.30701,-28.11701 9.37198,0 13.97299,4.26001 13.97299,11.24701 0,12.18401 -12.86499,15.763 -26.15701,17.12599 0.255,4.34601 2.04501,8.35001 8.435,8.35001 3.06802,0 7.24301,-0.937 12.35501,-3.067 l 1.87301,8.349 z m -8.095,-29.567 c 0,-2.045 -1.448,-3.237 -4.09002,-3.237 -4.771,0 -8.68998,4.175 -9.969,10.906 3.664,-0.511 14.05902,-2.3 14.05902,-7.669 z" /></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1002"><path
+             inkscape:connector-curvature="0"
+             id="path1004"
+             style="fill:#383838;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 394.07001,221.7 -0.17102,-0.25499 1.789,-10.05501 2.642,-18.063 c 0.51202,-3.749 0.341,-5.62301 -1.95999,-5.62301 -2.642,0 -5.79401,2.72701 -9.37201,5.879 L 384.271,213.095 c -0.17099,1.36299 -0.17099,1.534 1.022,1.704 l 4.26001,0.597 -0.85202,6.305 -18.40399,0 -0.17099,-0.341 1.875,-10.82001 2.47097,-17.21199 c 0.51203,-3.237 0.68201,-5.453 -1.78897,-5.453 -3.238,0 -7.41302,3.664 -9.71402,5.709 l -2.64199,19.51199 c -0.16999,1.36301 -0.16999,1.53401 1.108,1.70401 l 4.26001,0.597 -0.85202,6.305 -23.34699,0 0.853,-6.39 3.74899,-0.512 c 1.107,-0.17 1.36301,-0.42601 1.53302,-1.70401 l 3.57898,-25.987 c 0.17001,-0.93799 0,-1.53399 -0.767,-1.78898 l -4.17599,-1.53402 0.93799,-6.47599 16.871,0 -0.93799,6.987 0.25601,0.085 c 4.42999,-3.749 9.116,-7.92401 15.59198,-7.92401 4.68701,0 7.83902,2.64101 8.18,7.75301 l 0.25601,0.086 c 4.17498,-3.664 9.20199,-7.83901 15.25201,-7.83901 6.22,0 8.77499,3.15201 8.94599,9.20201 0,1.618 -0.171,3.493 -0.426,5.538 l -3.06699,21.897 c -0.17102,1.36299 -0.17102,1.534 1.107,1.704 l 4.17499,0.597 -0.85199,6.305 -18.487,0 0,-0.001 z" /></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1006"><path
+             inkscape:connector-curvature="0"
+             id="path1008"
+             style="fill:#383838;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 443.99499,190.771 -0.16998,-4.431 c 0,-0.682 -0.085,-1.10801 -1.022,-1.363 -1.022,-0.25601 -2.642,-0.427 -4.771,-0.427 -3.57901,0 -6.39102,1.108 -6.39102,4.09 0,2.727 2.982,3.74901 6.73102,5.02701 6.04999,2.045 13.888,4.431 13.888,13.46299 0,11.07599 -9.37201,15.592 -20.19302,15.592 -8.00898,0 -14.90998,-1.959 -16.27298,-2.981 l 1.61798,-12.355 8.69101,0.51199 0.255,4.94101 c 0,0.597 0.17099,1.10801 0.93799,1.363 1.27801,0.427 3.23801,0.768 6.05002,0.768 4.68698,0 7.32699,-1.79001 7.32699,-4.687 0,-3.408 -3.152,-4.175 -8.009,-5.624 -6.13501,-1.874 -12.78,-4.26 -12.78,-13.206 0,-10.47999 9.116,-14.996 19.59699,-14.996 6.64602,0 12.866,1.533 15.08102,2.47099 l -1.70401,12.35401 -8.86301,-0.511 z" /></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1010"><path
+             inkscape:connector-curvature="0"
+             id="path1012"
+             style="fill:#383838;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 489.74799,218.548 c -4.17499,2.38601 -10.39499,4.17501 -16.444,4.17501 -13.03599,0 -18.57499,-7.58301 -18.57499,-18.57401 0,-18.83 11.58799,-27.69101 25.98801,-27.69101 6.47498,0 11.84299,1.87401 14.229,3.578 l -1.87402,13.377 -8.69098,-0.42599 -0.255,-5.79401 c 0,-0.597 -0.086,-0.93799 -0.59702,-1.19198 -1.022,-0.42701 -2.55701,-0.597 -4.17499,-0.597 -5.62399,0 -11.418,4.60099 -11.418,17.38198 0,7.83901 3.49299,10.39501 8.43601,10.39501 4.34598,0 8.436,-1.448 11.24698,-2.556 l 2.129,7.923 z" /></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1014"><path
+             inkscape:connector-curvature="0"
+             id="path1016"
+             style="fill:#383838;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 491.36401,221.7 0.853,-6.39 3.91898,-0.512 c 1.19302,-0.16999 1.363,-0.42601 1.53402,-1.70401 l 3.57798,-25.987 c 0.086,-0.93798 -0.085,-1.53399 -0.85199,-1.789 l -4.26099,-1.53399 0.93799,-6.476 16.86999,0 -1.10699,7.669 0.25598,0.17 c 3.323,-4.77099 8.09503,-8.69 13.54803,-8.69 1.87397,0 5.112,0.341 6.56098,0.767 l -2.13001,15.507 -9.96899,-0.341 -0.25598,-4.431 c -0.086,-0.767 -0.25598,-1.022 -0.93799,-1.022 -1.61902,0 -4.26001,1.96 -6.646,4.431 l -2.98101,21.643 c -0.17102,1.36299 -0.085,1.619 1.19198,1.704 l 8.095,0.682 -0.93799,6.305 -27.26599,0 0,-0.002 z" /></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1018"><path
+             inkscape:connector-curvature="0"
+             id="path1020"
+             style="fill:#383838;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 536.09399,221.7 -0.16998,-0.426 2.04498,-11.503 3.15198,-22.749 c 0.17005,-0.938 -0.086,-1.53399 -0.85296,-1.79001 l -4.17499,-1.44799 0.85199,-6.476 18.14898,0 -5.02697,35.78599 c -0.17102,1.36301 -0.085,1.53402 1.19195,1.70401 l 4.09003,0.597 -0.85199,6.305 -18.40302,0 z m 5.87903,-57.598 c 0,-5.453 3.23798,-8.775 8.776,-8.775 4.17499,0 6.646,2.21501 6.646,6.305 0,5.368 -3.32202,8.861 -8.86102,8.861 -4.17603,-0.001 -6.56098,-2.387 -6.56098,-6.391 z" /></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1022"><path
+             inkscape:connector-curvature="0"
+             id="path1024"
+             style="fill:#383838;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 556.79602,239.76401 -0.17004,-0.34101 2.47101,-14.229 5.28204,-38.08701 c 0.17096,-1.02198 -0.085,-1.53399 -0.76703,-1.789 l -4.17499,-1.53399 0.93799,-6.476 17.04102,0 -1.02204,6.81599 0.25501,0.085 c 5.02703,-4.68601 10.31103,-7.75301 15.67804,-7.75301 7.328,0 12.44,4.68601 12.44,17.041 0,11.75801 -4.60101,29.22501 -20.44904,29.22501 -5.53796,0 -8.60498,-2.13001 -11.75897,-4.345 l -1.87402,12.78 c -0.085,0.938 0.085,1.278 1.19201,1.363 l 8.60596,0.853 -0.93799,6.39 -22.74896,0 0,0.001 z M 573.83697,209.517 c 2.13001,1.789 4.94202,3.322 8.09504,3.322 6.901,0 9.458,-9.71299 9.458,-17.21099 0,-5.02701 -1.19299,-8.35102 -4.43103,-8.35102 -3.40796,0 -7.75396,3.664 -10.82098,6.39101 l -2.30103,15.849 z" /></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1026"><path
+             inkscape:connector-curvature="0"
+             id="path1028"
+             style="fill:#383838;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 635.77698,219.39999 c -3.74897,1.789 -9.45801,3.32201 -14.22901,3.32201 -8.52099,0 -12.09899,-2.981 -12.09899,-9.96899 0,-1.10701 0.085,-2.38601 0.25604,-3.74901 l 3.06598,-22.323 c 0.086,-0.51199 0.086,-0.853 -0.51099,-0.853 l -5.87903,0 1.107,-7.839 c 7.242,-0.767 10.906,-4.431 13.12201,-13.633 l 7.92401,0 -1.70398,12.09999 c -0.085,0.59601 -0.085,0.85201 0.59698,0.85201 l 11.758,0 -1.193,8.521 -12.43902,0 -2.81195,20.36399 c -0.17102,1.10701 -0.25604,1.96001 -0.25604,2.72701 0,2.98199 1.27801,4.25999 4.94201,4.25999 2.38501,0 4.771,-0.59599 6.81598,-1.36299 l 1.534,7.58299 z" /></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1030"><path
+             inkscape:connector-curvature="0"
+             id="path1032"
+             style="fill:#383838;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 671.81702,218.463 c -5.53803,2.556 -11.58802,4.26001 -17.638,4.26001 -13.37702,0 -18.14801,-7.83901 -18.14801,-18.14801 0,-17.89299 11.41797,-28.11701 25.307,-28.11701 9.37201,0 13.97296,4.26001 13.97296,11.24701 0,12.18401 -12.86499,15.763 -26.15698,17.12599 0.25501,4.34601 2.04499,8.35001 8.435,8.35001 3.06799,0 7.24298,-0.937 12.35498,-3.067 l 1.87305,8.349 z m -8.094,-29.567 c 0,-2.045 -1.448,-3.237 -4.09002,-3.237 -4.771,0 -8.69001,4.175 -9.969,10.906 3.664,-0.511 14.05902,-2.3 14.05902,-7.669 z" /></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1034"><path
+             inkscape:connector-curvature="0"
+             id="path1036"
+             style="fill:#383838;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             d="m 703.59601,221.7 -0.16999,-0.25499 1.87397,-10.39601 2.47101,-17.723 c 0.51202,-3.578 0.341,-5.87899 -2.21497,-5.87899 -3.664,0 -8.18005,3.57798 -11.07703,6.13499 l -2.64099,19.51199 c -0.17102,1.36301 -0.17102,1.53402 1.107,1.70401 l 4.26001,0.597 -0.85199,6.305 -23.34705,0 0.85303,-6.39 3.74896,-0.512 c 1.10706,-0.16999 1.36304,-0.42601 1.53302,-1.70401 l 3.57898,-25.987 c 0.17004,-0.93798 0,-1.53399 -0.76794,-1.789 l -4.17505,-1.53399 0.93805,-6.476 16.86999,0 -0.93701,6.987 0.255,0.085 c 4.771,-4.09001 9.37299,-7.92401 16.01996,-7.92401 6.47504,0 9.79804,3.32201 10.05402,10.13901 0,1.36299 -0.085,3.067 -0.341,4.687 l -3.06702,21.81199 c -0.17096,1.36301 -0.17096,1.53402 1.02203,1.70401 l 4.26001,0.597 L 722,221.7 l -18.40399,0 z" /></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1038" /><g
+           id="g1040"><g
+             id="g1042"><g
+               transform="matrix(22.022614,0,0,-24.727501,162.0749,127.97307)"
+               id="g1044"><image
+                 id="image1050"
+                 mask="url(#mask1046)"
+                 xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIoAAACeCAYAAADtwJLpAAAABHNCSVQICAgIfAhkiAAAAZhJREFUeJzt0sENwCAQwLCD/XduRyA/hGRPkEfWzHwDB/t2AG8wColRSIxCYhQSo5AYhcQoJEYhMQqJUUiMQmIUEqOQGIXEKCRGITEKiVFIjEJiFBKjkBiFxCgkRiExColRSIxCYhQSo5AYhcQoJEYhMQqJUUiMQmIUEqOQGIXEKCRGITEKiVFIjEJiFBKjkBiFxCgkRiExColRSIxCYhQSo5AYhcQoJEYhMQqJUUiMQmIUEqOQGIXEKCRGITEKiVFIjEJiFBKjkBiFxCgkRiExColRSIxCYhQSo5AYhcQoJEYhMQqJUUiMQmIUEqOQGIXEKCRGITEKiVFIjEJiFBKjkBiFxCgkRiExColRSIxCYhQSo5AYhcQoJEYhMQqJUUiMQmIUEqOQGIXEKCRGITEKiVFIjEJiFBKjkBiFxCgkRiExColRSIxCYhQSo5AYhcQoJEYhMQqJUUiMQmIUEqOQGIXEKCRGITEKiVFIjEJiFBKjkBiFxCgkRiExColRSIxCYhQSo5AYhcQoJEYhMQqJUUiMQmIUkh8QgAI7RQ3ZgAAAAABJRU5ErkJggg=="
+                 transform="matrix(1,0,0,-1,0,1)"
+                 preserveAspectRatio="none"
+                 height="1"
+                 width="1" /></g></g></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1052" /><g
+           id="g1054"><g
+             id="g1056"><g
+               transform="matrix(36.995407,0,0,-24.259041,179.03947,127.50461)"
+               id="g1058"><image
+                 id="image1064"
+                 mask="url(#mask1060)"
+                 xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOcAAACbCAYAAACZFIyaAAAABHNCSVQICAgIfAhkiAAAAdxJREFUeJzt0zEBACAMwLCBf89ggJ8eiYI+XTNzBsjZvwOAN3NClDkhypwQZU6IMidEmROizAlR5oQoc0KUOSHKnBBlTogyJ0SZE6LMCVHmhChzQpQ5IcqcEGVOiDInRJkToswJUeaEKHNClDkhypwQZU6IMidEmROizAlR5oQoc0KUOSHKnBBlTogyJ0SZE6LMCVHmhChzQpQ5IcqcEGVOiDInRJkToswJUeaEKHNClDkhypwQZU6IMidEmROizAlR5oQoc0KUOSHKnBBlTogyJ0SZE6LMCVHmhChzQpQ5IcqcEGVOiDInRJkToswJUeaEKHNClDkhypwQZU6IMidEmROizAlR5oQoc0KUOSHKnBBlTogyJ0SZE6LMCVHmhChzQpQ5IcqcEGVOiDInRJkToswJUeaEKHNClDkhypwQZU6IMidEmROizAlR5oQoc0KUOSHKnBBlTogyJ0SZE6LMCVHmhChzQpQ5IcqcEGVOiDInRJkToswJUeaEKHNClDkhypwQZU6IMidEmROizAlR5oQoc0KUOSHKnBBlTogyJ0SZE6LMCVHmhChzQpQ5IcqcEGVOiDInRJkToswJUeaEKHNClDkhypwQZU6IMidEmROizAlR5oQoc0LUBVjGAjUsZLODAAAAAElFTkSuQmCC"
+                 transform="matrix(1,0,0,-1,0,1)"
+                 preserveAspectRatio="none"
+                 height="1"
+                 width="1" /></g></g></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1066" /><g
+           id="g1068"><g
+             id="g1070"><g
+               transform="matrix(21.787689,0,0,-24.727484,213.12918,127.97259)"
+               id="g1072"><image
+                 id="image1078"
+                 mask="url(#mask1074)"
+                 xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIgAAACeCAYAAADpNULUAAAABHNCSVQICAgIfAhkiAAAAYRJREFUeJzt0jEBwCAQwMAH/55bBWSF4U5BhqyZ+QYO9u0A3mYQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhGQQkkFIBiEZhPQDE+gCO20KAXUAAAAASUVORK5CYII="
+                 transform="matrix(1,0,0,-1,0,1)"
+                 preserveAspectRatio="none"
+                 height="1"
+                 width="1" /></g></g></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1080" /><g
+           id="g1082"><g
+             id="g1084"><g
+               transform="matrix(22.45253,0,0,-24.727501,230.99348,127.97307)"
+               id="g1086"><image
+                 id="image1092"
+                 mask="url(#mask1088)"
+                 xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIwAAACeCAYAAADg3uKuAAAABHNCSVQICAgIfAhkiAAAAZhJREFUeJzt0sENwCAQwLCD/XduVyAvhGRPkEfWzHwDh/btAN5iGBLDkBiGxDAkhiExDIlhSAxDYhgSw5AYhsQwJIYhMQyJYUgMQ2IYEsOQGIbEMCSGITEMiWFIDENiGBLDkBiGxDAkhiExDIlhSAxDYhgSw5AYhsQwJIYhMQyJYUgMQ2IYEsOQGIbEMCSGITEMiWFIDENiGBLDkBiGxDAkhiExDIlhSAxDYhgSw5AYhsQwJIYhMQyJYUgMQ2IYEsOQGIbEMCSGITEMiWFIDENiGBLDkBiGxDAkhiExDIlhSAxDYhgSw5AYhsQwJIYhMQyJYUgMQ2IYEsOQGIbEMCSGITEMiWFIDENiGBLDkBiGxDAkhiExDIlhSAxDYhgSw5AYhsQwJIYhMQyJYUgMQ2IYEsOQGIbEMCSGITEMiWFIDENiGBLDkBiGxDAkhiExDIlhSAxDYhgSw5AYhsQwJIYhMQyJYUgMQ2IYEsOQGIbEMCSGITEMiWFIDENiGBLDkBiGxDAkhiExDIlhSAxDYhgSw5AYhsQwJD8NGAI7v6Sd4QAAAABJRU5ErkJggg=="
+                 transform="matrix(1,0,0,-1,0,1)"
+                 preserveAspectRatio="none"
+                 height="1"
+                 width="1" /></g></g></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1094" /><g
+           id="g1096"><g
+             id="g1098"><g
+               transform="matrix(23.195816,0,0,-24.259501,247.8025,127.50461)"
+               id="g1100"><image
+                 id="image1106"
+                 mask="url(#mask1102)"
+                 xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJEAAACbCAYAAABiQ3lFAAAABHNCSVQICAgIfAhkiAAAAY9JREFUeJzt0kENACAQwLAD/55BxB6EpFWwx9bMnIFgvw7gfyYiMxGZichMRGYiMhORmYjMRGQmIjMRmYnITERmIjITkZmIzERkJiIzEZmJyExEZiIyE5GZiMxEZCYiMxGZichMRGYiMhORmYjMRGQmIjMRmYnITERmIjITkZmIzERkJiIzEZmJyExEZiIyE5GZiMxEZCYiMxGZichMRGYiMhORmYjMRGQmIjMRmYnITERmIjITkZmIzERkJiIzEZmJyExEZiIyE5GZiMxEZCYiMxGZichMRGYiMhORmYjMRGQmIjMRmYnITERmIjITkZmIzERkJiIzEZmJyExEZiIyE5GZiMxEZCYiMxGZichMRGYiMhORmYjMRGQmIjMRmYnITERmIjITkZmIzERkJiIzEZmJyExEZiIyE5GZiMxEZCYiMxGZichMRGYiMhORmYjMRGQmIjMRmYnITERmIjITkZmIzERkJiIzEZmJyExEZiIyE5GZiMxEZCYiMxGZichMRGYiMhORmYjMRGQmIrvhjQI13Q+QzQAAAABJRU5ErkJggg=="
+                 transform="matrix(1,0,0,-1,0,1)"
+                 preserveAspectRatio="none"
+                 height="1"
+                 width="1" /></g></g></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1108" /><g
+           id="g1110"><g
+             id="g1112"><g
+               transform="matrix(13.85141,0,0,-33.953537,268.24771,127.50369)"
+               id="g1114"><image
+                 id="image1120"
+                 mask="url(#mask1116)"
+                 xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFYAAADXCAYAAACAuqaKAAAABHNCSVQICAgIfAhkiAAAAelJREFUeJzt0IEJACEQwLDT/Xf+X8IiSDJB6ZqZbzhu3w54lbERYyPGRoyNGBsxNmJsxNiIsRFjI8ZGjI0YGzE2YmzE2IixEWMjxkaMjRgbMTZibMTYiLERYyPGRoyNGBsxNmJsxNiIsRFjI8ZGjI0YGzE2YmzE2IixEWMjxkaMjRgbMTZibMTYiLERYyPGRoyNGBsxNmJsxNiIsRFjI8ZGjI0YGzE2YmzE2IixEWMjxkaMjRgbMTZibMTYiLERYyPGRoyNGBsxNmJsxNiIsRFjI8ZGjI0YGzE2YmzE2IixEWMjxkaMjRgbMTZibMTYiLERYyPGRoyNGBsxNmJsxNiIsRFjI8ZGjI0YGzE2YmzE2IixEWMjxkaMjRgbMTZibMTYiLERYyPGRoyNGBsxNmJsxNiIsRFjI8ZGjI0YGzE2YmzE2IixEWMjxkaMjRgbMTZibMTYiLERYyPGRoyNGBsxNmJsxNiIsRFjI8ZGjI0YGzE2YmzE2IixEWMjxkaMjRgbMTZibMTYiLERYyPGRoyNGBsxNmJsxNiIsRFjI8ZGjI0YGzE2YmzE2IixEWMjxkaMjRgbMTZibMTYiLERYyPGRoyNGBsxNmJsxNiIsRFjI8ZGjI0YGzE2YmzE2IixEWMjxkaMjRgb+QExqAKtMIXUeQAAAABJRU5ErkJggg=="
+                 transform="matrix(1,0,0,-1,0,1)"
+                 preserveAspectRatio="none"
+                 height="1"
+                 width="1" /></g></g></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1122" /><g
+           id="g1124"><g
+             id="g1126"><g
+               transform="matrix(26.088287,0,0,-32.547234,277.74625,135.79188)"
+               id="g1128"><image
+                 id="image1134"
+                 mask="url(#mask1130)"
+                 xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKMAAADPCAYAAACZWmGhAAAABHNCSVQICAgIfAhkiAAAAj1JREFUeJzt0jEBACAMwLCBf89woYEeiYIeXTNzBgL27wB4zEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZJiRDDOSYUYyzEiGGckwIxlmJMOMZFwpZgKdL2J5lwAAAABJRU5ErkJggg=="
+                 transform="matrix(1,0,0,-1,0,1)"
+                 preserveAspectRatio="none"
+                 height="1"
+                 width="1" /></g></g></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1136" /><g
+           id="g1138"><g
+             id="g1140"><g
+               transform="matrix(19.0513,0,0,-30.279716,300.57504,127.97259)"
+               id="g1142"><image
+                 id="image1148"
+                 mask="url(#mask1144)"
+                 xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHcAAADACAYAAAA+9vxHAAAABHNCSVQICAgIfAhkiAAAAc5JREFUeJzt0QEJACAQwMDX/p01hQjjLsFga2bOkLR/B/COuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhpkbZm6YuWHmhl0wsgJ/ju/9YQAAAABJRU5ErkJggg=="
+                 transform="matrix(1,0,0,-1,0,1)"
+                 preserveAspectRatio="none"
+                 height="1"
+                 width="1" /></g></g></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1150" /><g
+           id="g1152"><g
+             id="g1154"><g
+               transform="matrix(22.022583,0,0,-24.727501,314.1792,127.97307)"
+               id="g1156"><image
+                 id="image1162"
+                 mask="url(#mask1158)"
+                 xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIkAAACeCAYAAAAG9ynqAAAABHNCSVQICAgIfAhkiAAAAYRJREFUeJzt0jEBwCAQwMAH/55bB2SE4U5BhqyZ+QYO9u0A3mcSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhGQSkklIJiGZhPQDEjQCO2GENJYAAAAASUVORK5CYII="
+                 transform="matrix(1,0,0,-1,0,1)"
+                 preserveAspectRatio="none"
+                 height="1"
+                 width="1" /></g></g></g><g
+           transform="matrix(0.458824,0,0,0.458824,24.3529,24.2824)"
+           id="g1164" /><g
+           id="g1166"><g
+             id="g1168"><g
+               transform="matrix(26.870115,0,0,-24.259041,331.1442,127.50369)"
+               id="g1170"><image
+                 id="image1176"
+                 mask="url(#mask1172)"
+                 xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKgAAACbCAYAAAD2pdC3AAAABHNCSVQICAgIfAhkiAAAAbVJREFUeJzt0jEBACAMwLCBf8/ggJceiYIeXTNzBqL27wB4MShpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpBiXNoKQZlDSDkmZQ0gxKmkFJMyhpF1TPAjWGqHwSAAAAAElFTkSuQmCC"
+                 transform="matrix(1,0,0,-1,0,1)"
+                 preserveAspectRatio="none"
+                 height="1"
+                 width="1" /></g></g></g></g></g><g
+       id="g1376"><g
+         clip-path="url(#clipPath1380)"
+         id="g1378" /></g></g></svg>
Index: EcnlProtoTool/trunk/webapp/webmrbc/index.html
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/index.html	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/index.html	(revision 270)
@@ -0,0 +1,620 @@
+﻿<!doctype html>
+<html lang="ja-jp">
+<head>
+	<meta charset="utf-8" />
+	<meta http-equiv="X-UA-Compatible" content="IE=edge">
+	<meta name="viewport" content="width=device-width, initial-scale=1">
+	<title>TOPPERS/ECNL for mruby Prototype Generator</title>
+	<link rel="stylesheet" href="bootstrap/css/bootstrap.css" />
+	<link rel="stylesheet" href="bootstrap/css/bootstrap-theme.css" />
+	<link rel="stylesheet" href="bootstrap/css/ie10-viewport-bug-workaround.css">
+	<link rel="stylesheet" href="xterm/src/xterm.css" />
+	<link rel="stylesheet" href="css/webmrbc.css" />
+	<script src="js/jquery-3.1.0.js"></script>
+	<script src="bootstrap/js/bootstrap.js"></script>
+	<script src="bootstrap/js/ie-emulation-modes-warning.js"></script>
+	<script src="xterm/src/xterm.js"></script>
+	<script src="xterm/addons/fit/fit.js"></script>
+	<script src="ace/ace.js" type="text/javascript" charset="utf-8"></script>
+	<script src="ace/theme-twilight.js" type="text/javascript" charset="utf-8"></script>
+	<script src="ace/mode-ruby.js" type="text/javascript" charset="utf-8"></script>
+	<script src="js/blockly.js" type="text/javascript"></script>
+	<script src="js/jszip.js"></script>
+	<script src="js/FileSaver.js" type="text/javascript"></script>
+	<script async src="mrbc.js" type="text/javascript"></script>
+	<script src="js/bridge.js" type="text/javascript"></script>
+	<script src="js/webmrbc.js" type="text/javascript"></script>
+</head>
+<body>
+	<div class="navbar navbar-inverse" id="main-menu">
+		<div class="container">
+			<ul class="nav navbar-nav" id="tabs">
+				<li class="active">
+					<a href="#block-tab" id="block-mode-button" onclick="WebMrbc.Views.MainMenuView.onBlockMode()">
+						<i class="glyphicon glyphicon-equalizer"></i>
+						ブロック
+					</a>
+				</li>
+				<li>
+					<a href="#ruby-tab" id="ruby-mode-button" onclick="WebMrbc.Views.MainMenuView.onRubyMode()">
+						<i class="glyphicon glyphicon-pencil"></i>
+						Ruby
+					</a>
+				</li>
+				<li>
+					<a href="#output-tab" id="output-mode-button" onclick="WebMrbc.Views.MainMenuView.onOutputMode()">
+						<i class="glyphicon glyphicon-console"></i>
+						出力
+					</a>
+				</li>
+			</ul>
+			<form accept-charset="UTF-8" action="/upload" class="navbar-form pull-right" enctype="multipart/form-data" id="file-form" method="post">
+				<div class="btn-group">
+					<a class="dropdown-toggle btn btn-primary" data-toggle="dropdown" href="#menu" id="submenu-button">
+						<i class="glyphicon glyphicon-th-list"></i>
+						メニュー
+					</a>
+					<ul class="dropdown-menu pull-right" id="submenu">
+						<li>
+							<a id="load-local-button">
+								<h4>
+									<label for="load-file">
+										<i class="glyphicon glyphicon-folder-open"></i>
+										ロード
+									</label>
+									<input type="file" name="workspace_xml" id="load-file" accept=".xml,application/xml" style="position:absolute; visibility: hidden" onclick="WebMrbc.Views.MainMenuView.onLoad()" />
+								</h4>
+							</a>
+						</li>
+						<li>
+							<a id="save-button" onclick="WebMrbc.Views.MainMenuView.onSaveWorkspace()">
+								<h4>
+									<i class="glyphicon glyphicon-hdd"></i>
+									ブロックを保存
+								</h4>
+							</a>
+						</li>
+						<li>
+							<a id="save-button" onclick="WebMrbc.Views.MainMenuView.onSaveRuby()">
+								<h4>
+									<i class="glyphicon glyphicon-hdd"></i>
+									Rubyコードを保存
+								</h4>
+							</a>
+						</li>
+						<li>
+							<a id="reset-button" onclick="WebMrbc.Views.MainMenuView.onReset()">
+								<h4>
+									<i class="glyphicon glyphicon-off"></i>
+									リセット
+								</h4>
+							</a>
+						</li>
+					</ul>
+				</div>
+				<div class="btn-group">
+					<a class="dropdown-toggle btn btn-info" data-toggle="dropdown" href="#compile" id="compile-submenu-button">
+						<i class="glyphicon glyphicon-random"></i>
+						ビルド
+					</a>
+					<ul class="dropdown-menu pull-right" id="compile-submenu">
+						<li>
+							<a id="mrbc-help-button" onclick="WebMrbc.Views.MainMenuView.onHelp()">
+								<h4>
+									<i class="glyphicon glyphicon-question-sign"></i>
+									ヘルプ
+								</h4>
+							</a>
+						</li>
+						<li>
+							<a id="mrbc-version-button" onclick="WebMrbc.Views.MainMenuView.onVersion()">
+								<h4>
+									<i class="glyphicon glyphicon-info-sign"></i>
+									バージョン
+								</h4>
+							</a>
+						</li>
+						<li>
+							<a id="mrbc-compile-to-c-button" onclick="WebMrbc.Views.MainMenuView.onCompileToC()">
+								<h4>
+									<i class="glyphicon glyphicon-circle-arrow-down"></i>
+									ビルド（.c）
+								</h4>
+							</a>
+						</li>
+						<li>
+							<a id="mrbc-compile-to-bin-button" onclick="WebMrbc.Views.MainMenuView.onCompileToMrb()">
+								<h4>
+									<i class="glyphicon glyphicon-download"></i>
+									ビルド（.mrb）
+								</h4>
+							</a>
+						</li>
+					</ul>
+				</div>
+				<a class="btn btn-default" id="run-button" onclick="WebMrbc.Views.MainMenuView.onRun()">
+					<i class="glyphicon glyphicon-send"></i>
+					実行
+				</a>
+			</form>
+		</div>
+	</div>
+
+	<div class="tab-content" id="modes-container">
+		<div class="tab-pane active modes-tab-pane" id="block-tab">
+			<div class="right-pane" id="block-tab-right-pane">
+			</div>
+			<div class="left-pane" id="block-tab-left-pane">
+				<div id="selectors-container">
+					<ul class="nav nav-pills">
+						<li class="active">
+							<a data-toggle="tab" href="#class-selector-tab">クラス</a>
+						</li>
+					</ul>
+					<div class="tab-content" id="selectors-tab-content">
+						<div class="tab-pane active selector-tab" id="class-selector-tab">
+							<div id="class-selector-celltype-set"></div>
+							<div class="item" id="add-celltype-item">
+								<a class="celltype" id="add-celltype-button">
+									<i class="glyphicon glyphicon-plus"></i>
+									<br>
+									新しい機器オブジェクト
+								</a>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+
+		<div class="tab-pane modes-tab-pane" id="ruby-tab">
+			<div class="ace_editor ace-clouds" id="text-editor"><textarea style="opacity: 0;" spellcheck="false" class="ace_text-input" nowrap></textarea><div class="ace_gutter"><div class="ace_layer ace_gutter-layer ace_folding-enabled"></div><div class="ace_gutter-active-line"></div></div><div class="ace_scroller"><div class="ace_content"><div class="ace_layer ace_print-margin-layer"><div style="left: 4px; visibility: visible;" class="ace_print-margin"></div></div><div class="ace_layer ace_marker-layer"></div><div style="padding: 0px 4px;" class="ace_layer ace_text-layer"></div><div class="ace_layer ace_marker-layer"></div><div class="ace_layer ace_cursor-layer ace_hidden-cursors"><div class="ace_cursor"></div></div></div></div><div style="height: auto; width: auto; top: -100px; left: -100px; visibility: hidden; position: fixed; overflow: visible; white-space: nowrap;">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</div><div style="width: 22px; display: none; overflow-y: scroll;" class="ace_scrollbar"><div style="width: 22px;" class="ace_scrollbar-inner"></div></div><div style="height: 22px; display: none; overflow-x: scroll;" class="ace_scrollbar-h"><div style="height: 22px;" class="ace_scrollbar-inner"></div></div></div>
+		</div>
+
+		<div class="tab-pane modes-tab-pane" id="output-tab">
+			<div id="term-box">
+				<div id="term"></div>
+			</div>
+			<div id="emscripten-box">
+				<a href="http://emscripten.org" id="emscripten_logo">
+					<img src="img/banner.svg" />
+				</a>
+				<div class="spinner" id='spinner'></div>
+				<div class="emscripten" id="status">Downloading...</div>
+				<div class="emscripten">
+					<progress value="0" max="100" id="progress" hidden></progress>
+				</div>
+			</div>
+		</div>
+	</div>
+
+	<div id="eobject-modal" class="modal fade">
+		<div class="modal-dialog">
+			<div class="modal-content">
+				<div class="modal-body">
+					<div class="right-pane" id="eobject-modal-right-pane">
+						<div id="eobject-modal-right-pane-inner">
+							<div class="btn-group-vertical" data-toggle="buttons" id="eobject_properties">
+								<label class="btn btn-default">
+									<input type="checkbox" autocomplete="off">動作状態
+								</label>
+								<label class="btn btn-default">
+									<input type="checkbox" autocomplete="off">設置場所
+								</label>
+							</div>
+						</div>
+					</div>
+					<div class="left-pane" id="eobject-modal-left-pane">
+						<div class="ui-droppable" id="eobject-modal-preview">
+							<div style="left: 0px; top: 0px; transform: rotate(0deg) scaleX(1);" class="ui-draggable" id="eobject-modal-celltype">
+								<img alt="no_image.png" src="img/no_image.png">
+							</div>
+						</div>
+						<div id="eobject-modal-attributes">
+							<form class="form-horizontal" id="eobject-modal-form">
+								<div class="control-group" for="celltype[identifier]">
+									<label class="control-label" for="eobject_identifier">名前</label>
+									<div class="controls">
+										<input class="form-control" id="eobject_identifier" name="eobject[identifier]" placeholder="Identifier" type="text" onchange="external.onChangeIdentifier(this)">
+									</div>
+								</div>
+								<div class="control-group" for="celltype[attribute]">
+									<label class="control-label" for="eobject_attribute">区分</label>
+									<div class="dropdown">
+										<button class="btn btn-default dropdown-toggle" type="button" id="eobject_attribute" data-toggle="dropdown" aria-expanded="false">
+											区分
+											<span class="caret"></span>
+										</button>
+										<ul class="dropdown-menu" role="menu" aria-labelledby="eobject_attribute">
+											<li role="presentation"><a role="menuitem" onclick="WebMrbc.Views.EObjectModalView.onSelectAttribute(this, 'local')">ローカルノード</a></li>
+											<li role="presentation"><a role="menuitem" onclick="WebMrbc.Views.EObjectModalView.onSelectAttribute(this, 'sync')">リモートノード（同期）</a></li>
+											<li role="presentation"><a role="menuitem" onclick="WebMrbc.Views.EObjectModalView.onSelectAttribute(this, 'async')">リモートノード（非同期）</a></li>
+											<li role="presentation"><a role="menuitem" onclick="WebMrbc.Views.EObjectModalView.onSelectAttribute(this, 'device')">機器オブジェクト</a></li>
+										</ul>
+									</div>
+								</div>
+								<div class="control-group" for="celltype[classGroupCode]">
+									<label class="control-label" for="eobject_classGroupCode">クラスグループ</label>
+									<div class="dropdown">
+										<button class="btn btn-default dropdown-toggle" type="button" id="eobject_classGroupCode" data-toggle="dropdown" aria-expanded="false">
+											クラスグループ
+											<span class="caret"></span>
+										</button>
+										<ul class="dropdown-menu" role="menu" aria-labelledby="eobject_classGroupCode" id="eobject_classGroups">
+											<li role="presentation"><a role="menuitem">センサー関連機器</a></li>
+											<li role="presentation"><a role="menuitem">空調関連機器</a></li>
+										</ul>
+									</div>
+								</div>
+								<div class="control-group" for="celltype[classCode]">
+									<label class="control-label" for="eobject_classCode">クラス</label>
+									<div class="dropdown">
+										<button class="btn btn-default dropdown-toggle" type="button" id="eobject_classCode" data-toggle="dropdown" aria-expanded="false">
+											クラス
+											<span class="caret"></span>
+										</button>
+										<ul class="dropdown-menu" role="menu" aria-labelledby="eobject_classCode" id="eobject_classs">
+											<li role="presentation"><a role="menuitem">ガス漏れセンサ</a></li>
+											<li role="presentation"><a role="menuitem">防犯センサ</a></li>
+											<li role="presentation"><a role="menuitem">非常ボタン</a></li>
+										</ul>
+									</div>
+								</div>
+								<div class="control-group" for="celltype[instanceCode]">
+									<label class="control-label" for="eobject_instanceCode">インスタンス</label>
+									<div class="controls">
+										<input class="form-control" id="eobject_instanceCode" name="celltype[instanceCode]" placeholder="1～127" type="text" onchange="WebMrbc.Views.EObjectModalView.onChangeInstanceCode(this)">
+									</div>
+								</div>
+							</form>
+						</div>
+					</div>
+				</div>
+				<div class="modal-footer">
+					<button aria-hidden="true" class="btn btn-default" onclick="WebMrbc.Views.EObjectModalView.onCancel(this)"><i class="glyphicon glyphicon-remove"></i>やめる</button>
+					<button class="btn btn-primary" id="eobject-modal-ok-button" onclick="WebMrbc.Views.EObjectModalView.onOk(this)"><i class="glyphicon glyphicon-ok"></i>決めた！</button>
+				</div>
+			</div>
+		</div>
+
+		<script id="class-selector-template" type="text/template">
+			<div class='item' id="%identifier%">
+				<div class='item-info'>
+					<div class='name'>
+						%identifier%
+					</div>
+					<div class='attributes'>
+						%attribute%
+					</div>
+					<a class='modify-button'>
+						<i class='glyphicon glyphicon-cog'></i>
+					</a>
+					<span class="topright-buttons">
+						<a class='selected-mark'>
+							<i class='glyphicon glyphicon-chevron-right'></i>
+						</a>
+						<a class='remove-button'>
+							<i class='glyphicon glyphicon-remove'></i>
+						</a>
+					</span>
+				</div>
+				<a class='celltype'>
+					<img src='%img%'>
+				</a>
+			</div>
+		</script>
+	</div>
+
+	<div id="message-modal" class="modal fade">
+		<div class="modal-dialog">
+			<div class="modal-content">
+				<div class="modal-body">
+					<div id="message-text">実行ファイルを転送しています。</div>
+					<div style="text-align: right;">
+						<button id="message-button" class="btn btn-default" hidden onclick="WebMrbc.Views.MainMenuView.onMessageClose()">OK</button>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+
+	<xml id="toolbox" style="display: none">
+		<category name="Logic" colour="210">
+			<block type="controls_if"></block>
+			<block type="switch_case_number"></block>
+			<block type="switch_case_text"></block>
+			<block type="logic_compare"></block>
+			<block type="logic_operation"></block>
+			<block type="logic_negate"></block>
+			<block type="logic_boolean"></block>
+			<block type="logic_null"></block>
+			<block type="logic_ternary"></block>
+		</category>
+		<category name="Loops" colour="120">
+			<block type="controls_repeat_ext">
+				<value name="TIMES">
+					<shadow type="math_number">
+						<field name="NUM">10</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="controls_whileUntil"></block>
+			<block type="controls_for">
+				<value name="FROM">
+					<shadow type="math_number">
+						<field name="NUM">1</field>
+					</shadow>
+				</value>
+				<value name="TO">
+					<shadow type="math_number">
+						<field name="NUM">10</field>
+					</shadow>
+				</value>
+				<value name="BY">
+					<shadow type="math_number">
+						<field name="NUM">1</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="controls_forEach"></block>
+			<block type="controls_flow_statements"></block>
+		</category>
+		<category name="Math" colour="230">
+			<block type="math_number"></block>
+			<block type="math_arithmetic">
+				<value name="A">
+					<shadow type="math_number">
+						<field name="NUM">1</field>
+					</shadow>
+				</value>
+				<value name="B">
+					<shadow type="math_number">
+						<field name="NUM">1</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="math_single">
+				<value name="NUM">
+					<shadow type="math_number">
+						<field name="NUM">9</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="math_trig">
+				<value name="NUM">
+					<shadow type="math_number">
+						<field name="NUM">45</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="math_constant"></block>
+			<block type="math_number_property">
+				<value name="NUMBER_TO_CHECK">
+					<shadow type="math_number">
+						<field name="NUM">0</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="math_round">
+				<value name="NUM">
+					<shadow type="math_number">
+						<field name="NUM">3.1</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="math_on_list"></block>
+			<block type="math_modulo">
+				<value name="DIVIDEND">
+					<shadow type="math_number">
+						<field name="NUM">64</field>
+					</shadow>
+				</value>
+				<value name="DIVISOR">
+					<shadow type="math_number">
+						<field name="NUM">10</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="math_constrain">
+				<value name="VALUE">
+					<shadow type="math_number">
+						<field name="NUM">50</field>
+					</shadow>
+				</value>
+				<value name="LOW">
+					<shadow type="math_number">
+						<field name="NUM">1</field>
+					</shadow>
+				</value>
+				<value name="HIGH">
+					<shadow type="math_number">
+						<field name="NUM">100</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="math_random_int">
+				<value name="FROM">
+					<shadow type="math_number">
+						<field name="NUM">1</field>
+					</shadow>
+				</value>
+				<value name="TO">
+					<shadow type="math_number">
+						<field name="NUM">100</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="math_random_float"></block>
+		</category>
+		<category name="Text" colour="160">
+			<block type="text"></block>
+			<block type="text_join"></block>
+			<block type="text_append">
+				<value name="TEXT">
+					<shadow type="text"></shadow>
+				</value>
+			</block>
+			<block type="text_length">
+				<value name="VALUE">
+					<shadow type="text">
+						<field name="TEXT">abc</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="text_isEmpty">
+				<value name="VALUE">
+					<shadow type="text">
+						<field name="TEXT"></field>
+					</shadow>
+				</value>
+			</block>
+			<block type="text_indexOf">
+				<value name="VALUE">
+					<block type="variables_get">
+						<field name="VAR">text</field>
+					</block>
+				</value>
+				<value name="FIND">
+					<shadow type="text">
+						<field name="TEXT">abc</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="text_charAt">
+				<value name="VALUE">
+					<block type="variables_get">
+						<field name="VAR">text</field>
+					</block>
+				</value>
+			</block>
+			<block type="text_getSubstring">
+				<value name="STRING">
+					<block type="variables_get">
+						<field name="VAR">text</field>
+					</block>
+				</value>
+			</block>
+			<block type="text_changeCase">
+				<value name="TEXT">
+					<shadow type="text">
+						<field name="TEXT">abc</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="text_trim">
+				<value name="TEXT">
+					<shadow type="text">
+						<field name="TEXT">abc</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="text_print">
+				<value name="TEXT">
+					<shadow type="text">
+						<field name="TEXT">abc</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="text_prompt_ext">
+				<value name="TEXT">
+					<shadow type="text">
+						<field name="TEXT">abc</field>
+					</shadow>
+				</value>
+			</block>
+		</category>
+		<category name="Lists" colour="260">
+			<block type="lists_create_with">
+				<mutation items="0"></mutation>
+			</block>
+			<block type="lists_create_with"></block>
+			<block type="lists_repeat">
+				<value name="NUM">
+					<shadow type="math_number">
+						<field name="NUM">5</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="lists_length"></block>
+			<block type="lists_isEmpty"></block>
+			<block type="lists_indexOf">
+				<value name="VALUE">
+					<block type="variables_get">
+						<field name="VAR">list</field>
+					</block>
+				</value>
+			</block>
+			<block type="lists_getIndex">
+				<value name="VALUE">
+					<block type="variables_get">
+						<field name="VAR">list</field>
+					</block>
+				</value>
+			</block>
+			<block type="lists_setIndex">
+				<value name="LIST">
+					<block type="variables_get">
+						<field name="VAR">list</field>
+					</block>
+				</value>
+			</block>
+			<block type="lists_getSublist">
+				<value name="LIST">
+					<block type="variables_get">
+						<field name="VAR">list</field>
+					</block>
+				</value>
+			</block>
+			<block type="lists_split">
+				<value name="DELIM">
+					<shadow type="text">
+						<field name="TEXT">,</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="lists_sort"></block>
+		</category>
+		<category name="Color" colour="20">
+			<block type="colour_picker"></block>
+			<block type="colour_random"></block>
+			<block type="colour_rgb">
+				<value name="RED">
+					<shadow type="math_number">
+						<field name="NUM">100</field>
+					</shadow>
+				</value>
+				<value name="GREEN">
+					<shadow type="math_number">
+						<field name="NUM">50</field>
+					</shadow>
+				</value>
+				<value name="BLUE">
+					<shadow type="math_number">
+						<field name="NUM">0</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="colour_blend">
+				<value name="COLOUR1">
+					<shadow type="colour_picker">
+						<field name="COLOUR">#ff0000</field>
+					</shadow>
+				</value>
+				<value name="COLOUR2">
+					<shadow type="colour_picker">
+						<field name="COLOUR">#3333ff</field>
+					</shadow>
+				</value>
+				<value name="RATIO">
+					<shadow type="math_number">
+						<field name="NUM">0.5</field>
+					</shadow>
+				</value>
+			</block>
+		</category>
+		<sep></sep>
+		<category name="Variables" custom="VARIABLE" colour="330"></category>
+		<category name="Functions" custom="PROCEDURE" colour="290"></category>
+	</xml>
+</body>
+</html>
Index: EcnlProtoTool/trunk/webapp/webmrbc/index.min.html
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/index.min.html	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/index.min.html	(revision 270)
@@ -0,0 +1,618 @@
+﻿<!doctype html>
+<html lang="ja-jp">
+<head>
+	<meta charset="utf-8" />
+	<meta http-equiv="X-UA-Compatible" content="IE=edge">
+	<meta name="viewport" content="width=device-width, initial-scale=1">
+	<title>TOPPERS/ECNL for mruby Prototype Generator</title>
+	<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" />
+	<link rel="stylesheet" href="bootstrap/css/bootstrap-theme.min.css" />
+	<link rel="stylesheet" href="xterm/src/xterm.css" />
+	<link rel="stylesheet" href="css/webmrbc.css" />
+	<script src="js/jquery-3.1.0.min.js"></script>
+	<script src="bootstrap/js/bootstrap.min.js"></script>
+	<script src="xterm/src/xterm.js"></script>
+	<script src="xterm/addons/fit/fit.js"></script>
+	<script src="ace/ace.js" type="text/javascript" charset="utf-8"></script>
+	<script src="ace/theme-twilight.js" type="text/javascript" charset="utf-8"></script>
+	<script src="ace/mode-ruby.js" type="text/javascript" charset="utf-8"></script>
+	<script src="js/blockly_compressed.js" type="text/javascript"></script>
+	<script src="js/jszip.min.js"></script>
+	<script src="js/FileSaver.min.js" type="text/javascript"></script>
+	<script async src="mrbc.min.js" type="text/javascript"></script>
+	<script src="js/bridge.min.js" type="text/javascript"></script>
+	<script src="js/webmrbc.min.js" type="text/javascript"></script>
+</head>
+<body>
+	<div class="navbar navbar-inverse" id="main-menu">
+		<div class="container">
+			<ul class="nav navbar-nav" id="tabs">
+				<li class="active">
+					<a href="#block-tab" id="block-mode-button" onclick="WebMrbc.Views.MainMenuView.onBlockMode()">
+						<i class="glyphicon glyphicon-equalizer"></i>
+						ブロック
+					</a>
+				</li>
+				<li>
+					<a href="#ruby-tab" id="ruby-mode-button" onclick="WebMrbc.Views.MainMenuView.onRubyMode()">
+						<i class="glyphicon glyphicon-pencil"></i>
+						Ruby
+					</a>
+				</li>
+				<li>
+					<a href="#output-tab" id="output-mode-button" onclick="WebMrbc.Views.MainMenuView.onOutputMode()">
+						<i class="glyphicon glyphicon-console"></i>
+						出力
+					</a>
+				</li>
+			</ul>
+			<form accept-charset="UTF-8" action="/upload" class="navbar-form pull-right" enctype="multipart/form-data" id="file-form" method="post">
+				<div class="btn-group">
+					<a class="dropdown-toggle btn btn-primary" data-toggle="dropdown" href="#menu" id="submenu-button">
+						<i class="glyphicon glyphicon-th-list"></i>
+						メニュー
+					</a>
+					<ul class="dropdown-menu pull-right" id="submenu">
+						<li>
+							<a id="load-local-button">
+								<h4>
+									<label for="load-file">
+										<i class="glyphicon glyphicon-folder-open"></i>
+										ロード
+									</label>
+									<input type="file" name="workspace_xml" id="load-file" accept=".xml,application/xml" style="position:absolute; visibility: hidden" onclick="WebMrbc.Views.MainMenuView.onLoad()" />
+								</h4>
+							</a>
+						</li>
+						<li>
+							<a id="save-button" onclick="WebMrbc.Views.MainMenuView.onSaveWorkspace()">
+								<h4>
+									<i class="glyphicon glyphicon-hdd"></i>
+									ブロックを保存
+								</h4>
+							</a>
+						</li>
+						<li>
+							<a id="save-button" onclick="WebMrbc.Views.MainMenuView.onSaveRuby()">
+								<h4>
+									<i class="glyphicon glyphicon-hdd"></i>
+									Rubyコードを保存
+								</h4>
+							</a>
+						</li>
+						<li>
+							<a id="reset-button" onclick="WebMrbc.Views.MainMenuView.onReset()">
+								<h4>
+									<i class="glyphicon glyphicon-off"></i>
+									リセット
+								</h4>
+							</a>
+						</li>
+					</ul>
+				</div>
+				<div class="btn-group">
+					<a class="dropdown-toggle btn btn-info" data-toggle="dropdown" href="#compile" id="compile-submenu-button">
+						<i class="glyphicon glyphicon-random"></i>
+						ビルド
+					</a>
+					<ul class="dropdown-menu pull-right" id="compile-submenu">
+						<li>
+							<a id="mrbc-help-button" onclick="WebMrbc.Views.MainMenuView.onHelp()">
+								<h4>
+									<i class="glyphicon glyphicon-question-sign"></i>
+									ヘルプ
+								</h4>
+							</a>
+						</li>
+						<li>
+							<a id="mrbc-version-button" onclick="WebMrbc.Views.MainMenuView.onVersion()">
+								<h4>
+									<i class="glyphicon glyphicon-info-sign"></i>
+									バージョン
+								</h4>
+							</a>
+						</li>
+						<li>
+							<a id="mrbc-compile-to-c-button" onclick="WebMrbc.Views.MainMenuView.onCompileToC()">
+								<h4>
+									<i class="glyphicon glyphicon-circle-arrow-down"></i>
+									ビルド（.c）
+								</h4>
+							</a>
+						</li>
+						<li>
+							<a id="mrbc-compile-to-bin-button" onclick="WebMrbc.Views.MainMenuView.onCompileToMrb()">
+								<h4>
+									<i class="glyphicon glyphicon-download"></i>
+									ビルド（.mrb）
+								</h4>
+							</a>
+						</li>
+					</ul>
+				</div>
+				<a class="btn btn-default" id="run-button" onclick="WebMrbc.Views.MainMenuView.onRun()">
+					<i class="glyphicon glyphicon-send"></i>
+					実行
+				</a>
+			</form>
+		</div>
+	</div>
+
+	<div class="tab-content" id="modes-container">
+		<div class="tab-pane active modes-tab-pane" id="block-tab">
+			<div class="right-pane" id="block-tab-right-pane">
+			</div>
+			<div class="left-pane" id="block-tab-left-pane">
+				<div id="selectors-container">
+					<ul class="nav nav-pills">
+						<li class="active">
+							<a data-toggle="tab" href="#class-selector-tab">クラス</a>
+						</li>
+					</ul>
+					<div class="tab-content" id="selectors-tab-content">
+						<div class="tab-pane active selector-tab" id="class-selector-tab">
+							<div id="class-selector-celltype-set"></div>
+							<div class="item" id="add-celltype-item">
+								<a class="celltype" id="add-celltype-button">
+									<i class="glyphicon glyphicon-plus"></i>
+									<br>
+									新しい機器オブジェクト
+								</a>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+
+		<div class="tab-pane modes-tab-pane" id="ruby-tab">
+			<div class="ace_editor ace-clouds" id="text-editor"><textarea style="opacity: 0;" spellcheck="false" class="ace_text-input" nowrap></textarea><div class="ace_gutter"><div class="ace_layer ace_gutter-layer ace_folding-enabled"></div><div class="ace_gutter-active-line"></div></div><div class="ace_scroller"><div class="ace_content"><div class="ace_layer ace_print-margin-layer"><div style="left: 4px; visibility: visible;" class="ace_print-margin"></div></div><div class="ace_layer ace_marker-layer"></div><div style="padding: 0px 4px;" class="ace_layer ace_text-layer"></div><div class="ace_layer ace_marker-layer"></div><div class="ace_layer ace_cursor-layer ace_hidden-cursors"><div class="ace_cursor"></div></div></div></div><div style="height: auto; width: auto; top: -100px; left: -100px; visibility: hidden; position: fixed; overflow: visible; white-space: nowrap;">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</div><div style="width: 22px; display: none; overflow-y: scroll;" class="ace_scrollbar"><div style="width: 22px;" class="ace_scrollbar-inner"></div></div><div style="height: 22px; display: none; overflow-x: scroll;" class="ace_scrollbar-h"><div style="height: 22px;" class="ace_scrollbar-inner"></div></div></div>
+		</div>
+
+		<div class="tab-pane modes-tab-pane" id="output-tab">
+			<div id="term-box">
+				<div id="term"></div>
+			</div>
+			<div id="emscripten-box">
+				<a href="http://emscripten.org" id="emscripten_logo">
+					<img src="img/banner.svg" />
+				</a>
+				<div class="spinner" id='spinner'></div>
+				<div class="emscripten" id="status">Downloading...</div>
+				<div class="emscripten">
+					<progress value="0" max="100" id="progress" hidden></progress>
+				</div>
+			</div>
+		</div>
+	</div>
+
+	<div id="eobject-modal" class="modal fade">
+		<div class="modal-dialog">
+			<div class="modal-content">
+				<div class="modal-body">
+					<div class="right-pane" id="eobject-modal-right-pane">
+						<div id="eobject-modal-right-pane-inner">
+							<div class="btn-group-vertical" data-toggle="buttons" id="eobject_properties">
+								<label class="btn btn-default">
+									<input type="checkbox" autocomplete="off">動作状態
+								</label>
+								<label class="btn btn-default">
+									<input type="checkbox" autocomplete="off">設置場所
+								</label>
+							</div>
+						</div>
+					</div>
+					<div class="left-pane" id="eobject-modal-left-pane">
+						<div class="ui-droppable" id="eobject-modal-preview">
+							<div style="left: 0px; top: 0px; transform: rotate(0deg) scaleX(1);" class="ui-draggable" id="eobject-modal-celltype">
+								<img alt="no_image.png" src="img/no_image.png">
+							</div>
+						</div>
+						<div id="eobject-modal-attributes">
+							<form class="form-horizontal" id="eobject-modal-form">
+								<div class="control-group" for="celltype[identifier]">
+									<label class="control-label" for="eobject_identifier">名前</label>
+									<div class="controls">
+										<input class="form-control" id="eobject_identifier" name="eobject[identifier]" placeholder="Identifier" type="text" onchange="external.onChangeIdentifier(this)">
+									</div>
+								</div>
+								<div class="control-group" for="celltype[attribute]">
+									<label class="control-label" for="eobject_attribute">区分</label>
+									<div class="dropdown">
+										<button class="btn btn-default dropdown-toggle" type="button" id="eobject_attribute" data-toggle="dropdown" aria-expanded="false">
+											区分
+											<span class="caret"></span>
+										</button>
+										<ul class="dropdown-menu" role="menu" aria-labelledby="eobject_attribute">
+											<li role="presentation"><a role="menuitem" onclick="WebMrbc.Views.EObjectModalView.onSelectAttribute(this, 'local')">ローカルノード</a></li>
+											<li role="presentation"><a role="menuitem" onclick="WebMrbc.Views.EObjectModalView.onSelectAttribute(this, 'sync')">リモートノード（同期）</a></li>
+											<li role="presentation"><a role="menuitem" onclick="WebMrbc.Views.EObjectModalView.onSelectAttribute(this, 'async')">リモートノード（非同期）</a></li>
+											<li role="presentation"><a role="menuitem" onclick="WebMrbc.Views.EObjectModalView.onSelectAttribute(this, 'device')">機器オブジェクト</a></li>
+										</ul>
+									</div>
+								</div>
+								<div class="control-group" for="celltype[classGroupCode]">
+									<label class="control-label" for="eobject_classGroupCode">クラスグループ</label>
+									<div class="dropdown">
+										<button class="btn btn-default dropdown-toggle" type="button" id="eobject_classGroupCode" data-toggle="dropdown" aria-expanded="false">
+											クラスグループ
+											<span class="caret"></span>
+										</button>
+										<ul class="dropdown-menu" role="menu" aria-labelledby="eobject_classGroupCode" id="eobject_classGroups">
+											<li role="presentation"><a role="menuitem">センサー関連機器</a></li>
+											<li role="presentation"><a role="menuitem">空調関連機器</a></li>
+										</ul>
+									</div>
+								</div>
+								<div class="control-group" for="celltype[classCode]">
+									<label class="control-label" for="eobject_classCode">クラス</label>
+									<div class="dropdown">
+										<button class="btn btn-default dropdown-toggle" type="button" id="eobject_classCode" data-toggle="dropdown" aria-expanded="false">
+											クラス
+											<span class="caret"></span>
+										</button>
+										<ul class="dropdown-menu" role="menu" aria-labelledby="eobject_classCode" id="eobject_classs">
+											<li role="presentation"><a role="menuitem">ガス漏れセンサ</a></li>
+											<li role="presentation"><a role="menuitem">防犯センサ</a></li>
+											<li role="presentation"><a role="menuitem">非常ボタン</a></li>
+										</ul>
+									</div>
+								</div>
+								<div class="control-group" for="celltype[instanceCode]">
+									<label class="control-label" for="eobject_instanceCode">インスタンス</label>
+									<div class="controls">
+										<input class="form-control" id="eobject_instanceCode" name="celltype[instanceCode]" placeholder="1～127" type="text" onchange="WebMrbc.Views.EObjectModalView.onChangeInstanceCode(this)">
+									</div>
+								</div>
+							</form>
+						</div>
+					</div>
+				</div>
+				<div class="modal-footer">
+					<button aria-hidden="true" class="btn btn-default" onclick="WebMrbc.Views.EObjectModalView.onCancel(this)"><i class="glyphicon glyphicon-remove"></i>やめる</button>
+					<button class="btn btn-primary" id="eobject-modal-ok-button" onclick="WebMrbc.Views.EObjectModalView.onOk(this)"><i class="glyphicon glyphicon-ok"></i>決めた！</button>
+				</div>
+			</div>
+		</div>
+
+		<script id="class-selector-template" type="text/template">
+			<div class='item' id="%identifier%">
+				<div class='item-info'>
+					<div class='name'>
+						%identifier%
+					</div>
+					<div class='attributes'>
+						%attribute%
+					</div>
+					<a class='modify-button'>
+						<i class='glyphicon glyphicon-cog'></i>
+					</a>
+					<span class="topright-buttons">
+						<a class='selected-mark'>
+							<i class='glyphicon glyphicon-chevron-right'></i>
+						</a>
+						<a class='remove-button'>
+							<i class='glyphicon glyphicon-remove'></i>
+						</a>
+					</span>
+				</div>
+				<a class='celltype'>
+					<img src='%img%'>
+				</a>
+			</div>
+		</script>
+	</div>
+
+	<div id="message-modal" class="modal fade">
+		<div class="modal-dialog">
+			<div class="modal-content">
+				<div class="modal-body">
+					<div id="message-text">実行ファイルを転送しています。</div>
+					<div style="text-align: right;">
+						<button id="message-button" class="btn btn-default" hidden onclick="WebMrbc.Views.MainMenuView.onMessageClose()">OK</button>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+
+	<xml id="toolbox" style="display: none">
+		<category name="Logic" colour="210">
+			<block type="controls_if"></block>
+			<block type="switch_case_number"></block>
+			<block type="switch_case_text"></block>
+			<block type="logic_compare"></block>
+			<block type="logic_operation"></block>
+			<block type="logic_negate"></block>
+			<block type="logic_boolean"></block>
+			<block type="logic_null"></block>
+			<block type="logic_ternary"></block>
+		</category>
+		<category name="Loops" colour="120">
+			<block type="controls_repeat_ext">
+				<value name="TIMES">
+					<shadow type="math_number">
+						<field name="NUM">10</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="controls_whileUntil"></block>
+			<block type="controls_for">
+				<value name="FROM">
+					<shadow type="math_number">
+						<field name="NUM">1</field>
+					</shadow>
+				</value>
+				<value name="TO">
+					<shadow type="math_number">
+						<field name="NUM">10</field>
+					</shadow>
+				</value>
+				<value name="BY">
+					<shadow type="math_number">
+						<field name="NUM">1</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="controls_forEach"></block>
+			<block type="controls_flow_statements"></block>
+		</category>
+		<category name="Math" colour="230">
+			<block type="math_number"></block>
+			<block type="math_arithmetic">
+				<value name="A">
+					<shadow type="math_number">
+						<field name="NUM">1</field>
+					</shadow>
+				</value>
+				<value name="B">
+					<shadow type="math_number">
+						<field name="NUM">1</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="math_single">
+				<value name="NUM">
+					<shadow type="math_number">
+						<field name="NUM">9</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="math_trig">
+				<value name="NUM">
+					<shadow type="math_number">
+						<field name="NUM">45</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="math_constant"></block>
+			<block type="math_number_property">
+				<value name="NUMBER_TO_CHECK">
+					<shadow type="math_number">
+						<field name="NUM">0</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="math_round">
+				<value name="NUM">
+					<shadow type="math_number">
+						<field name="NUM">3.1</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="math_on_list"></block>
+			<block type="math_modulo">
+				<value name="DIVIDEND">
+					<shadow type="math_number">
+						<field name="NUM">64</field>
+					</shadow>
+				</value>
+				<value name="DIVISOR">
+					<shadow type="math_number">
+						<field name="NUM">10</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="math_constrain">
+				<value name="VALUE">
+					<shadow type="math_number">
+						<field name="NUM">50</field>
+					</shadow>
+				</value>
+				<value name="LOW">
+					<shadow type="math_number">
+						<field name="NUM">1</field>
+					</shadow>
+				</value>
+				<value name="HIGH">
+					<shadow type="math_number">
+						<field name="NUM">100</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="math_random_int">
+				<value name="FROM">
+					<shadow type="math_number">
+						<field name="NUM">1</field>
+					</shadow>
+				</value>
+				<value name="TO">
+					<shadow type="math_number">
+						<field name="NUM">100</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="math_random_float"></block>
+		</category>
+		<category name="Text" colour="160">
+			<block type="text"></block>
+			<block type="text_join"></block>
+			<block type="text_append">
+				<value name="TEXT">
+					<shadow type="text"></shadow>
+				</value>
+			</block>
+			<block type="text_length">
+				<value name="VALUE">
+					<shadow type="text">
+						<field name="TEXT">abc</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="text_isEmpty">
+				<value name="VALUE">
+					<shadow type="text">
+						<field name="TEXT"></field>
+					</shadow>
+				</value>
+			</block>
+			<block type="text_indexOf">
+				<value name="VALUE">
+					<block type="variables_get">
+						<field name="VAR">text</field>
+					</block>
+				</value>
+				<value name="FIND">
+					<shadow type="text">
+						<field name="TEXT">abc</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="text_charAt">
+				<value name="VALUE">
+					<block type="variables_get">
+						<field name="VAR">text</field>
+					</block>
+				</value>
+			</block>
+			<block type="text_getSubstring">
+				<value name="STRING">
+					<block type="variables_get">
+						<field name="VAR">text</field>
+					</block>
+				</value>
+			</block>
+			<block type="text_changeCase">
+				<value name="TEXT">
+					<shadow type="text">
+						<field name="TEXT">abc</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="text_trim">
+				<value name="TEXT">
+					<shadow type="text">
+						<field name="TEXT">abc</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="text_print">
+				<value name="TEXT">
+					<shadow type="text">
+						<field name="TEXT">abc</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="text_prompt_ext">
+				<value name="TEXT">
+					<shadow type="text">
+						<field name="TEXT">abc</field>
+					</shadow>
+				</value>
+			</block>
+		</category>
+		<category name="Lists" colour="260">
+			<block type="lists_create_with">
+				<mutation items="0"></mutation>
+			</block>
+			<block type="lists_create_with"></block>
+			<block type="lists_repeat">
+				<value name="NUM">
+					<shadow type="math_number">
+						<field name="NUM">5</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="lists_length"></block>
+			<block type="lists_isEmpty"></block>
+			<block type="lists_indexOf">
+				<value name="VALUE">
+					<block type="variables_get">
+						<field name="VAR">list</field>
+					</block>
+				</value>
+			</block>
+			<block type="lists_getIndex">
+				<value name="VALUE">
+					<block type="variables_get">
+						<field name="VAR">list</field>
+					</block>
+				</value>
+			</block>
+			<block type="lists_setIndex">
+				<value name="LIST">
+					<block type="variables_get">
+						<field name="VAR">list</field>
+					</block>
+				</value>
+			</block>
+			<block type="lists_getSublist">
+				<value name="LIST">
+					<block type="variables_get">
+						<field name="VAR">list</field>
+					</block>
+				</value>
+			</block>
+			<block type="lists_split">
+				<value name="DELIM">
+					<shadow type="text">
+						<field name="TEXT">,</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="lists_sort"></block>
+		</category>
+		<category name="Color" colour="20">
+			<block type="colour_picker"></block>
+			<block type="colour_random"></block>
+			<block type="colour_rgb">
+				<value name="RED">
+					<shadow type="math_number">
+						<field name="NUM">100</field>
+					</shadow>
+				</value>
+				<value name="GREEN">
+					<shadow type="math_number">
+						<field name="NUM">50</field>
+					</shadow>
+				</value>
+				<value name="BLUE">
+					<shadow type="math_number">
+						<field name="NUM">0</field>
+					</shadow>
+				</value>
+			</block>
+			<block type="colour_blend">
+				<value name="COLOUR1">
+					<shadow type="colour_picker">
+						<field name="COLOUR">#ff0000</field>
+					</shadow>
+				</value>
+				<value name="COLOUR2">
+					<shadow type="colour_picker">
+						<field name="COLOUR">#3333ff</field>
+					</shadow>
+				</value>
+				<value name="RATIO">
+					<shadow type="math_number">
+						<field name="NUM">0.5</field>
+					</shadow>
+				</value>
+			</block>
+		</category>
+		<sep></sep>
+		<category name="Variables" custom="VARIABLE" colour="330"></category>
+		<category name="Functions" custom="PROCEDURE" colour="290"></category>
+	</xml>
+</body>
+</html>
Index: EcnlProtoTool/trunk/webapp/webmrbc/js/FileSaver.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/js/FileSaver.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/js/FileSaver.js	(revision 270)
@@ -0,0 +1,243 @@
+/* FileSaver.js
+ * A saveAs() FileSaver implementation.
+ * 2014-08-29
+ *
+ * By Eli Grey, http://eligrey.com
+ * License: X11/MIT
+ *   See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md
+ */
+
+/*global self */
+/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */
+
+/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
+
+var saveAs = saveAs
+  // IE 10+ (native saveAs)
+  || (typeof navigator !== "undefined" &&
+      navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator))
+  // Everyone else
+  || (function(view) {
+	"use strict";
+	// IE <10 is explicitly unsupported
+	if (typeof navigator !== "undefined" &&
+	    /MSIE [1-9]\./.test(navigator.userAgent)) {
+		return;
+	}
+	var
+		  doc = view.document
+		  // only get URL when necessary in case Blob.js hasn't overridden it yet
+		, get_URL = function() {
+			return view.URL || view.webkitURL || view;
+		}
+		, save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a")
+		, can_use_save_link = "download" in save_link
+		, click = function(node) {
+			var event = doc.createEvent("MouseEvents");
+			event.initMouseEvent(
+				"click", true, false, view, 0, 0, 0, 0, 0
+				, false, false, false, false, 0, null
+			);
+			node.dispatchEvent(event);
+		}
+		, webkit_req_fs = view.webkitRequestFileSystem
+		, req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem
+		, throw_outside = function(ex) {
+			(view.setImmediate || view.setTimeout)(function() {
+				throw ex;
+			}, 0);
+		}
+		, force_saveable_type = "application/octet-stream"
+		, fs_min_size = 0
+		// See https://code.google.com/p/chromium/issues/detail?id=375297#c7 for
+		// the reasoning behind the timeout and revocation flow
+		, arbitrary_revoke_timeout = 10
+		, revoke = function(file) {
+			var revoker = function() {
+				if (typeof file === "string") { // file is an object URL
+					get_URL().revokeObjectURL(file);
+				} else { // file is a File
+					file.remove();
+				}
+			};
+			if (view.chrome) {
+				revoker();
+			} else {
+				setTimeout(revoker, arbitrary_revoke_timeout);
+			}
+		}
+		, dispatch = function(filesaver, event_types, event) {
+			event_types = [].concat(event_types);
+			var i = event_types.length;
+			while (i--) {
+				var listener = filesaver["on" + event_types[i]];
+				if (typeof listener === "function") {
+					try {
+						listener.call(filesaver, event || filesaver);
+					} catch (ex) {
+						throw_outside(ex);
+					}
+				}
+			}
+		}
+		, FileSaver = function(blob, name) {
+			// First try a.download, then web filesystem, then object URLs
+			var
+				  filesaver = this
+				, type = blob.type
+				, blob_changed = false
+				, object_url
+				, target_view
+				, dispatch_all = function() {
+					dispatch(filesaver, "writestart progress write writeend".split(" "));
+				}
+				// on any filesys errors revert to saving with object URLs
+				, fs_error = function() {
+					// don't create more object URLs than needed
+					if (blob_changed || !object_url) {
+						object_url = get_URL().createObjectURL(blob);
+					}
+					if (target_view) {
+						target_view.location.href = object_url;
+					} else {
+						var new_tab = view.open(object_url, "_blank");
+						if (new_tab == undefined && typeof safari !== "undefined") {
+							//Apple do not allow window.open, see http://bit.ly/1kZffRI
+							view.location.href = object_url
+						}
+					}
+					filesaver.readyState = filesaver.DONE;
+					dispatch_all();
+					revoke(object_url);
+				}
+				, abortable = function(func) {
+					return function() {
+						if (filesaver.readyState !== filesaver.DONE) {
+							return func.apply(this, arguments);
+						}
+					};
+				}
+				, create_if_not_found = {create: true, exclusive: false}
+				, slice
+			;
+			filesaver.readyState = filesaver.INIT;
+			if (!name) {
+				name = "download";
+			}
+			if (can_use_save_link) {
+				object_url = get_URL().createObjectURL(blob);
+				save_link.href = object_url;
+				save_link.download = name;
+				click(save_link);
+				filesaver.readyState = filesaver.DONE;
+				dispatch_all();
+				revoke(object_url);
+				return;
+			}
+			// Object and web filesystem URLs have a problem saving in Google Chrome when
+			// viewed in a tab, so I force save with application/octet-stream
+			// http://code.google.com/p/chromium/issues/detail?id=91158
+			// Update: Google errantly closed 91158, I submitted it again:
+			// https://code.google.com/p/chromium/issues/detail?id=389642
+			if (view.chrome && type && type !== force_saveable_type) {
+				slice = blob.slice || blob.webkitSlice;
+				blob = slice.call(blob, 0, blob.size, force_saveable_type);
+				blob_changed = true;
+			}
+			// Since I can't be sure that the guessed media type will trigger a download
+			// in WebKit, I append .download to the filename.
+			// https://bugs.webkit.org/show_bug.cgi?id=65440
+			if (webkit_req_fs && name !== "download") {
+				name += ".download";
+			}
+			if (type === force_saveable_type || webkit_req_fs) {
+				target_view = view;
+			}
+			if (!req_fs) {
+				fs_error();
+				return;
+			}
+			fs_min_size += blob.size;
+			req_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) {
+				fs.root.getDirectory("saved", create_if_not_found, abortable(function(dir) {
+					var save = function() {
+						dir.getFile(name, create_if_not_found, abortable(function(file) {
+							file.createWriter(abortable(function(writer) {
+								writer.onwriteend = function(event) {
+									target_view.location.href = file.toURL();
+									filesaver.readyState = filesaver.DONE;
+									dispatch(filesaver, "writeend", event);
+									revoke(file);
+								};
+								writer.onerror = function() {
+									var error = writer.error;
+									if (error.code !== error.ABORT_ERR) {
+										fs_error();
+									}
+								};
+								"writestart progress write abort".split(" ").forEach(function(event) {
+									writer["on" + event] = filesaver["on" + event];
+								});
+								writer.write(blob);
+								filesaver.abort = function() {
+									writer.abort();
+									filesaver.readyState = filesaver.DONE;
+								};
+								filesaver.readyState = filesaver.WRITING;
+							}), fs_error);
+						}), fs_error);
+					};
+					dir.getFile(name, {create: false}, abortable(function(file) {
+						// delete file if it already exists
+						file.remove();
+						save();
+					}), abortable(function(ex) {
+						if (ex.code === ex.NOT_FOUND_ERR) {
+							save();
+						} else {
+							fs_error();
+						}
+					}));
+				}), fs_error);
+			}), fs_error);
+		}
+		, FS_proto = FileSaver.prototype
+		, saveAs = function(blob, name) {
+			return new FileSaver(blob, name);
+		}
+	;
+	FS_proto.abort = function() {
+		var filesaver = this;
+		filesaver.readyState = filesaver.DONE;
+		dispatch(filesaver, "abort");
+	};
+	FS_proto.readyState = FS_proto.INIT = 0;
+	FS_proto.WRITING = 1;
+	FS_proto.DONE = 2;
+
+	FS_proto.error =
+	FS_proto.onwritestart =
+	FS_proto.onprogress =
+	FS_proto.onwrite =
+	FS_proto.onabort =
+	FS_proto.onerror =
+	FS_proto.onwriteend =
+		null;
+
+	return saveAs;
+}(
+	   typeof self !== "undefined" && self
+	|| typeof window !== "undefined" && window
+	|| this.content
+));
+// `self` is undefined in Firefox for Android content script context
+// while `this` is nsIContentFrameMessageManager
+// with an attribute `content` that corresponds to the window
+
+if (typeof module !== "undefined" && module !== null) {
+  module.exports = saveAs;
+} else if ((typeof define !== "undefined" && define !== null) && (define.amd != null)) {
+  define([], function() {
+    return saveAs;
+  });
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/js/FileSaver.min.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/js/FileSaver.min.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/js/FileSaver.min.js	(revision 270)
@@ -0,0 +1,7 @@
+/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
+var saveAs=saveAs||"undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){"use strict";if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var k=a.document,n=k.createElementNS("http://www.w3.org/1999/xhtml","a"),w="download"in n,x=function(c){var e=k.createEvent("MouseEvents");e.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null);c.dispatchEvent(e)},q=a.webkitRequestFileSystem,u=a.requestFileSystem||q||a.mozRequestFileSystem,
+y=function(c){(a.setImmediate||a.setTimeout)(function(){throw c;},0)},r=0,s=function(c){var e=function(){"string"===typeof c?(a.URL||a.webkitURL||a).revokeObjectURL(c):c.remove()};a.chrome?e():setTimeout(e,10)},t=function(c,a,d){a=[].concat(a);for(var b=a.length;b--;){var l=c["on"+a[b]];if("function"===typeof l)try{l.call(c,d||c)}catch(f){y(f)}}},m=function(c,e){var d=this,b=c.type,l=!1,f,p,k=function(){t(d,["writestart","progress","write","writeend"])},g=function(){if(l||!f)f=(a.URL||a.webkitURL||
+a).createObjectURL(c);p?p.location.href=f:void 0==a.open(f,"_blank")&&"undefined"!==typeof safari&&(a.location.href=f);d.readyState=d.DONE;k();s(f)},h=function(a){return function(){if(d.readyState!==d.DONE)return a.apply(this,arguments)}},m={create:!0,exclusive:!1},v;d.readyState=d.INIT;e||(e="download");if(w)f=(a.URL||a.webkitURL||a).createObjectURL(c),n.href=f,n.download=e,x(n),d.readyState=d.DONE,k(),s(f);else{a.chrome&&b&&"application/octet-stream"!==b&&(v=c.slice||c.webkitSlice,c=v.call(c,0,
+c.size,"application/octet-stream"),l=!0);q&&"download"!==e&&(e+=".download");if("application/octet-stream"===b||q)p=a;u?(r+=c.size,u(a.TEMPORARY,r,h(function(a){a.root.getDirectory("saved",m,h(function(a){var b=function(){a.getFile(e,m,h(function(a){a.createWriter(h(function(b){b.onwriteend=function(b){p.location.href=a.toURL();d.readyState=d.DONE;t(d,"writeend",b);s(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&g()};["writestart","progress","write","abort"].forEach(function(a){b["on"+
+a]=d["on"+a]});b.write(c);d.abort=function(){b.abort();d.readyState=d.DONE};d.readyState=d.WRITING}),g)}),g)};a.getFile(e,{create:!1},h(function(a){a.remove();b()}),h(function(a){a.code===a.NOT_FOUND_ERR?b():g()}))}),g)}),g)):g()}},b=m.prototype;b.abort=function(){this.readyState=this.DONE;t(this,"abort")};b.readyState=b.INIT=0;b.WRITING=1;b.DONE=2;b.error=b.onwritestart=b.onprogress=b.onwrite=b.onabort=b.onerror=b.onwriteend=null;return function(a,b){return new m(a,b)}}}("undefined"!==typeof self&&
+self||"undefined"!==typeof window&&window||this.content);"undefined"!==typeof module&&null!==module?module.exports=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
Index: EcnlProtoTool/trunk/webapp/webmrbc/js/blockly.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/js/blockly.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/js/blockly.js	(revision 270)
@@ -0,0 +1,18018 @@
+// Do not edit this file; automatically generated by build.py.
+'use strict';
+
+var COMPILED = !0,
+	goog = goog || {};
+goog.global = this;
+goog.isDef = function (a) {
+	return void 0 !== a
+};
+goog.exportPath_ = function (a, b, c) {
+	a = a.split(".");
+	c = c || goog.global;
+	a[0] in c || !c.execScript || c.execScript("var " + a[0]);
+	for (var d; a.length && (d = a.shift()) ;) !a.length && goog.isDef(b) ? c[d] = b : c = c[d] ? c[d] : c[d] = {}
+};
+goog.define = function (a, b) {
+	var c = b;
+	COMPILED || (goog.global.CLOSURE_UNCOMPILED_DEFINES && Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_UNCOMPILED_DEFINES, a) ? c = goog.global.CLOSURE_UNCOMPILED_DEFINES[a] : goog.global.CLOSURE_DEFINES && Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_DEFINES, a) && (c = goog.global.CLOSURE_DEFINES[a]));
+	goog.exportPath_(a, c)
+};
+goog.DEBUG = !1;
+goog.LOCALE = "en";
+goog.TRUSTED_SITE = !0;
+goog.STRICT_MODE_COMPATIBLE = !1;
+goog.DISALLOW_TEST_ONLY_CODE = COMPILED && !goog.DEBUG;
+goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING = !1;
+goog.provide = function (a) {
+	if (goog.isInModuleLoader_()) throw Error("goog.provide can not be used within a goog.module.");
+	if (!COMPILED && goog.isProvided_(a)) throw Error('Namespace "' + a + '" already declared.');
+	goog.constructNamespace_(a)
+};
+goog.constructNamespace_ = function (a, b) {
+	if (!COMPILED) {
+		delete goog.implicitNamespaces_[a];
+		for (var c = a;
+			(c = c.substring(0, c.lastIndexOf("."))) && !goog.getObjectByName(c) ;) goog.implicitNamespaces_[c] = !0
+	}
+	goog.exportPath_(a, b)
+};
+goog.VALID_MODULE_RE_ = /^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
+goog.module = function (a) {
+	if (!goog.isString(a) || !a || -1 == a.search(goog.VALID_MODULE_RE_)) throw Error("Invalid module identifier");
+	if (!goog.isInModuleLoader_()) throw Error("Module " + a + " has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");
+	if (goog.moduleLoaderState_.moduleName) throw Error("goog.module may only be called once per module.");
+	goog.moduleLoaderState_.moduleName = a;
+	if (!COMPILED) {
+		if (goog.isProvided_(a)) throw Error('Namespace "' + a + '" already declared.');
+		delete goog.implicitNamespaces_[a]
+	}
+};
+goog.module.get = function (a) {
+	return goog.module.getInternal_(a)
+};
+goog.module.getInternal_ = function (a) {
+	if (!COMPILED) return goog.isProvided_(a) ? a in goog.loadedModules_ ? goog.loadedModules_[a] : goog.getObjectByName(a) : null
+};
+goog.moduleLoaderState_ = null;
+goog.isInModuleLoader_ = function () {
+	return null != goog.moduleLoaderState_
+};
+goog.module.declareLegacyNamespace = function () {
+	if (!COMPILED && !goog.isInModuleLoader_()) throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");
+	if (!COMPILED && !goog.moduleLoaderState_.moduleName) throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");
+	goog.moduleLoaderState_.declareLegacyNamespace = !0
+};
+goog.setTestOnly = function (a) {
+	if (goog.DISALLOW_TEST_ONLY_CODE) throw a = a || "", Error("Importing test-only code into non-debug environment" + (a ? ": " + a : "."));
+};
+goog.forwardDeclare = function (a) { };
+COMPILED || (goog.isProvided_ = function (a) {
+	return a in goog.loadedModules_ || !goog.implicitNamespaces_[a] && goog.isDefAndNotNull(goog.getObjectByName(a))
+}, goog.implicitNamespaces_ = {
+	"goog.module": !0
+});
+goog.getObjectByName = function (a, b) {
+	for (var c = a.split("."), d = b || goog.global, e; e = c.shift() ;)
+		if (goog.isDefAndNotNull(d[e])) d = d[e];
+		else return null;
+	return d
+};
+goog.globalize = function (a, b) {
+	var c = b || goog.global,
+		d;
+	for (d in a) c[d] = a[d]
+};
+goog.addDependency = function (a, b, c, d) {
+	if (goog.DEPENDENCIES_ENABLED) {
+		var e;
+		a = a.replace(/\\/g, "/");
+		var f = goog.dependencies_;
+		d && "boolean" !== typeof d || (d = d ? {
+			module: "goog"
+		} : {});
+		for (var g = 0; e = b[g]; g++) f.nameToPath[e] = a, f.loadFlags[a] = d;
+		for (d = 0; b = c[d]; d++) a in f.requires || (f.requires[a] = {}), f.requires[a][b] = !0
+	}
+};
+goog.ENABLE_DEBUG_LOADER = !0;
+goog.logToConsole_ = function (a) {
+	goog.global.console && goog.global.console.error(a)
+};
+goog.require = function (a) {
+	if (!COMPILED) {
+		goog.ENABLE_DEBUG_LOADER && goog.IS_OLD_IE_ && goog.maybeProcessDeferredDep_(a);
+		if (goog.isProvided_(a)) {
+			if (goog.isInModuleLoader_()) return goog.module.getInternal_(a)
+		} else if (goog.ENABLE_DEBUG_LOADER) {
+			var b = goog.getPathFromDeps_(a);
+			if (b) goog.writeScripts_(b);
+			else throw a = "goog.require could not find: " + a, goog.logToConsole_(a), Error(a);
+		}
+		return null
+	}
+};
+goog.basePath = "";
+goog.nullFunction = function () { };
+goog.abstractMethod = function () {
+	throw Error("unimplemented abstract method");
+};
+goog.addSingletonGetter = function (a) {
+	a.getInstance = function () {
+		if (a.instance_) return a.instance_;
+		goog.DEBUG && (goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = a);
+		return a.instance_ = new a
+	}
+};
+goog.instantiatedSingletons_ = [];
+goog.LOAD_MODULE_USING_EVAL = !0;
+goog.SEAL_MODULE_EXPORTS = goog.DEBUG;
+goog.loadedModules_ = {};
+goog.DEPENDENCIES_ENABLED = !COMPILED && goog.ENABLE_DEBUG_LOADER;
+goog.TRANSPILE = "detect";
+goog.TRANSPILER = "transpile.js";
+goog.DEPENDENCIES_ENABLED && (goog.dependencies_ = {
+	loadFlags: {},
+	nameToPath: {},
+	requires: {},
+	visited: {},
+	written: {},
+	deferred: {}
+}, goog.inHtmlDocument_ = function () {
+	var a = goog.global.document;
+	return null != a && "write" in a
+}, goog.findBasePath_ = function () {
+	if (goog.isDef(goog.global.CLOSURE_BASE_PATH)) goog.basePath = goog.global.CLOSURE_BASE_PATH;
+	else if (goog.inHtmlDocument_())
+		for (var a = goog.global.document.getElementsByTagName("SCRIPT"), b = a.length - 1; 0 <= b; --b) {
+			var c = a[b].src,
+				d = c.lastIndexOf("?"),
+				d = -1 == d ? c.length : d;
+			if ("base.js" ==
+				c.substr(d - 7, 7)) {
+				goog.basePath = c.substr(0, d - 7);
+				break
+			}
+		}
+}, goog.importScript_ = function (a, b) {
+	(goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_)(a, b) && (goog.dependencies_.written[a] = !0)
+}, goog.IS_OLD_IE_ = !(goog.global.atob || !goog.global.document || !goog.global.document.all), goog.importProcessedScript_ = function (a, b, c) {
+	goog.importScript_("", 'goog.retrieveAndExec_("' + a + '", ' + b + ", " + c + ");")
+}, goog.queuedModules_ = [], goog.wrapModule_ = function (a, b) {
+	return goog.LOAD_MODULE_USING_EVAL && goog.isDef(goog.global.JSON) ?
+		"goog.loadModule(" + goog.global.JSON.stringify(b + "\n//# sourceURL=" + a + "\n") + ");" : 'goog.loadModule(function(exports) {"use strict";' + b + "\n;return exports});\n//# sourceURL=" + a + "\n"
+}, goog.loadQueuedModules_ = function () {
+	var a = goog.queuedModules_.length;
+	if (0 < a) {
+		var b = goog.queuedModules_;
+		goog.queuedModules_ = [];
+		for (var c = 0; c < a; c++) goog.maybeProcessDeferredPath_(b[c])
+	}
+}, goog.maybeProcessDeferredDep_ = function (a) {
+	goog.isDeferredModule_(a) && goog.allDepsAreAvailable_(a) && (a = goog.getPathFromDeps_(a), goog.maybeProcessDeferredPath_(goog.basePath +
+		a))
+}, goog.isDeferredModule_ = function (a) {
+	var b = (a = goog.getPathFromDeps_(a)) && goog.dependencies_.loadFlags[a] || {},
+		c = b.lang || "es3";
+	return a && ("goog" == b.module || goog.needsTranspile_(c)) ? goog.basePath + a in goog.dependencies_.deferred : !1
+}, goog.allDepsAreAvailable_ = function (a) {
+	if ((a = goog.getPathFromDeps_(a)) && a in goog.dependencies_.requires)
+		for (var b in goog.dependencies_.requires[a])
+			if (!goog.isProvided_(b) && !goog.isDeferredModule_(b)) return !1;
+	return !0
+}, goog.maybeProcessDeferredPath_ = function (a) {
+	if (a in
+		goog.dependencies_.deferred) {
+		var b = goog.dependencies_.deferred[a];
+		delete goog.dependencies_.deferred[a];
+		goog.globalEval(b)
+	}
+}, goog.loadModuleFromUrl = function (a) {
+	goog.retrieveAndExec_(a, !0, !1)
+}, goog.writeScriptSrcNode_ = function (a) {
+	goog.global.document.write('<script type="text/javascript" src="' + a + '">\x3c/script>')
+}, goog.appendScriptSrcNode_ = function (a) {
+	var b = goog.global.document,
+		c = b.createElement("script");
+	c.type = "text/javascript";
+	c.src = a;
+	c.defer = !1;
+	c.async = !1;
+	b.head.appendChild(c)
+}, goog.writeScriptTag_ =
+	function (a, b) {
+    	if (goog.inHtmlDocument_()) {
+    		var c = goog.global.document;
+    		if (!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING && "complete" == c.readyState) {
+    			if (/\bdeps.js$/.test(a)) return !1;
+    			throw Error('Cannot write "' + a + '" after document load');
+    		}
+    		if (void 0 === b)
+    			if (goog.IS_OLD_IE_) {
+    				var d = " onreadystatechange='goog.onScriptLoad_(this, " + ++goog.lastNonModuleScriptIndex_ + ")' ";
+    				c.write('<script type="text/javascript" src="' + a + '"' + d + ">\x3c/script>")
+    			} else goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING ? goog.appendScriptSrcNode_(a) :
+					goog.writeScriptSrcNode_(a);
+    		else c.write('<script type="text/javascript">' + b + "\x3c/script>");
+    		return !0
+    	}
+    	return !1
+	}, goog.needsTranspile_ = function (a) {
+    	if ("always" == goog.TRANSPILE) return !0;
+    	if ("never" == goog.TRANSPILE) return !1;
+    	goog.requiresTranspilation_ || (goog.requiresTranspilation_ = goog.createRequiresTranspilation_());
+    	if (a in goog.requiresTranspilation_) return goog.requiresTranspilation_[a];
+    	throw Error("Unknown language mode: " + a);
+	}, goog.requiresTranspilation_ = null, goog.lastNonModuleScriptIndex_ = 0, goog.onScriptLoad_ =
+	function (a, b) {
+    	"complete" == a.readyState && goog.lastNonModuleScriptIndex_ == b && goog.loadQueuedModules_();
+    	return !0
+	}, goog.writeScripts_ = function (a) {
+    	function b(a) {
+    		if (!(a in e.written || a in e.visited)) {
+    			e.visited[a] = !0;
+    			if (a in e.requires)
+    				for (var f in e.requires[a])
+    					if (!goog.isProvided_(f))
+    						if (f in e.nameToPath) b(e.nameToPath[f]);
+    						else throw Error("Undefined nameToPath for " + f);
+    			a in d || (d[a] = !0, c.push(a))
+    		}
+    	}
+    	var c = [],
+			d = {},
+			e = goog.dependencies_;
+    	b(a);
+    	for (a = 0; a < c.length; a++) {
+    		var f = c[a];
+    		goog.dependencies_.written[f] = !0
+    	}
+    	var g = goog.moduleLoaderState_;
+    	goog.moduleLoaderState_ = null;
+    	for (a = 0; a < c.length; a++)
+    		if (f = c[a]) {
+    			var h = e.loadFlags[f] || {},
+					k = goog.needsTranspile_(h.lang || "es3");
+    			"goog" == h.module || k ? goog.importProcessedScript_(goog.basePath + f, "goog" == h.module, k) : goog.importScript_(goog.basePath + f)
+    		} else throw goog.moduleLoaderState_ = g, Error("Undefined script input");
+    	goog.moduleLoaderState_ = g
+	}, goog.getPathFromDeps_ = function (a) {
+    	return a in goog.dependencies_.nameToPath ? goog.dependencies_.nameToPath[a] : null
+	}, goog.findBasePath_(),
+	goog.global.CLOSURE_NO_DEPS || goog.importScript_(goog.basePath + "deps.js"));
+goog.loadModule = function (a) {
+	var b = goog.moduleLoaderState_;
+	try {
+		goog.moduleLoaderState_ = {
+			moduleName: void 0,
+			declareLegacyNamespace: !1
+		};
+		var c;
+		if (goog.isFunction(a)) c = a.call(void 0, {});
+		else if (goog.isString(a)) c = goog.loadModuleFromSource_.call(void 0, a);
+		else throw Error("Invalid module definition");
+		var d = goog.moduleLoaderState_.moduleName;
+		if (!goog.isString(d) || !d) throw Error('Invalid module name "' + d + '"');
+		goog.moduleLoaderState_.declareLegacyNamespace ? goog.constructNamespace_(d, c) : goog.SEAL_MODULE_EXPORTS &&
+			Object.seal && goog.isObject(c) && Object.seal(c);
+		goog.loadedModules_[d] = c
+	} finally {
+		goog.moduleLoaderState_ = b
+	}
+};
+goog.loadModuleFromSource_ = function (a) {
+	eval(a);
+	return {}
+};
+goog.normalizePath_ = function (a) {
+	a = a.split("/");
+	for (var b = 0; b < a.length;) "." == a[b] ? a.splice(b, 1) : b && ".." == a[b] && a[b - 1] && ".." != a[b - 1] ? a.splice(--b, 2) : b++;
+	return a.join("/")
+};
+goog.loadFileSync_ = function (a) {
+	if (goog.global.CLOSURE_LOAD_FILE_SYNC) return goog.global.CLOSURE_LOAD_FILE_SYNC(a);
+	try {
+		var b = new goog.global.XMLHttpRequest;
+		b.open("get", a, !1);
+		b.send();
+		return 0 == b.status || 200 == b.status ? b.responseText : null
+	} catch (c) {
+		return null
+	}
+};
+goog.retrieveAndExec_ = function (a, b, c) {
+	if (!COMPILED) {
+		var d = a;
+		a = goog.normalizePath_(a);
+		var e = goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_,
+			f = goog.loadFileSync_(a);
+		if (null == f) throw Error('Load of "' + a + '" failed');
+		c && (f = goog.transpile_.call(goog.global, f, a));
+		f = b ? goog.wrapModule_(a, f) : f + ("\n//# sourceURL=" + a);
+		goog.IS_OLD_IE_ ? (goog.dependencies_.deferred[d] = f, goog.queuedModules_.push(d)) : e(a, f)
+	}
+};
+goog.transpile_ = function (a, b) {
+	var c = goog.global.$jscomp;
+	c || (goog.global.$jscomp = c = {});
+	var d = c.transpile;
+	if (!d) {
+		var e = goog.basePath + goog.TRANSPILER,
+			f = goog.loadFileSync_(e);
+		if (f) {
+			eval(f + "\n//# sourceURL=" + e);
+			if (goog.global.$gwtExport && goog.global.$gwtExport.$jscomp && !goog.global.$gwtExport.$jscomp.transpile) throw Error('The transpiler did not properly export the "transpile" method. $gwtExport: ' + JSON.stringify(goog.global.$gwtExport));
+			goog.global.$jscomp.transpile = goog.global.$gwtExport.$jscomp.transpile;
+			c = goog.global.$jscomp;
+			d = c.transpile
+		}
+	}
+	d || (d = c.transpile = function (a, b) {
+		goog.logToConsole_(b + " requires transpilation but no transpiler was found.");
+		return a
+	});
+	return d(a, b)
+};
+goog.typeOf = function (a) {
+	var b = typeof a;
+	if ("object" == b)
+		if (a) {
+			if (a instanceof Array) return "array";
+			if (a instanceof Object) return b;
+			var c = Object.prototype.toString.call(a);
+			if ("[object Window]" == c) return "object";
+			if ("[object Array]" == c || "number" == typeof a.length && "undefined" != typeof a.splice && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("splice")) return "array";
+			if ("[object Function]" == c || "undefined" != typeof a.call && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("call")) return "function"
+		} else return "null";
+	else if ("function" == b && "undefined" == typeof a.call) return "object";
+	return b
+};
+goog.isNull = function (a) {
+	return null === a
+};
+goog.isDefAndNotNull = function (a) {
+	return null != a
+};
+goog.isArray = function (a) {
+	return "array" == goog.typeOf(a)
+};
+goog.isArrayLike = function (a) {
+	var b = goog.typeOf(a);
+	return "array" == b || "object" == b && "number" == typeof a.length
+};
+goog.isDateLike = function (a) {
+	return goog.isObject(a) && "function" == typeof a.getFullYear
+};
+goog.isString = function (a) {
+	return "string" == typeof a
+};
+goog.isBoolean = function (a) {
+	return "boolean" == typeof a
+};
+goog.isNumber = function (a) {
+	return "number" == typeof a
+};
+goog.isFunction = function (a) {
+	return "function" == goog.typeOf(a)
+};
+goog.isObject = function (a) {
+	var b = typeof a;
+	return "object" == b && null != a || "function" == b
+};
+goog.getUid = function (a) {
+	return a[goog.UID_PROPERTY_] || (a[goog.UID_PROPERTY_] = ++goog.uidCounter_)
+};
+goog.hasUid = function (a) {
+	return !!a[goog.UID_PROPERTY_]
+};
+goog.removeUid = function (a) {
+	null !== a && "removeAttribute" in a && a.removeAttribute(goog.UID_PROPERTY_);
+	try {
+		delete a[goog.UID_PROPERTY_]
+	} catch (b) { }
+};
+goog.UID_PROPERTY_ = "closure_uid_" + (1E9 * Math.random() >>> 0);
+goog.uidCounter_ = 0;
+goog.getHashCode = goog.getUid;
+goog.removeHashCode = goog.removeUid;
+goog.cloneObject = function (a) {
+	var b = goog.typeOf(a);
+	if ("object" == b || "array" == b) {
+		if (a.clone) return a.clone();
+		var b = "array" == b ? [] : {},
+			c;
+		for (c in a) b[c] = goog.cloneObject(a[c]);
+		return b
+	}
+	return a
+};
+goog.bindNative_ = function (a, b, c) {
+	return a.call.apply(a.bind, arguments)
+};
+goog.bindJs_ = function (a, b, c) {
+	if (!a) throw Error();
+	if (2 < arguments.length) {
+		var d = Array.prototype.slice.call(arguments, 2);
+		return function () {
+			var c = Array.prototype.slice.call(arguments);
+			Array.prototype.unshift.apply(c, d);
+			return a.apply(b, c)
+		}
+	}
+	return function () {
+		return a.apply(b, arguments)
+	}
+};
+goog.bind = function (a, b, c) {
+	Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf("native code") ? goog.bind = goog.bindNative_ : goog.bind = goog.bindJs_;
+	return goog.bind.apply(null, arguments)
+};
+goog.partial = function (a, b) {
+	var c = Array.prototype.slice.call(arguments, 1);
+	return function () {
+		var b = c.slice();
+		b.push.apply(b, arguments);
+		return a.apply(this, b)
+	}
+};
+goog.mixin = function (a, b) {
+	for (var c in b) a[c] = b[c]
+};
+goog.now = goog.TRUSTED_SITE && Date.now || function () {
+	return +new Date
+};
+goog.globalEval = function (a) {
+	if (goog.global.execScript) goog.global.execScript(a, "JavaScript");
+	else if (goog.global.eval) {
+		if (null == goog.evalWorksForGlobals_)
+			if (goog.global.eval("var _evalTest_ = 1;"), "undefined" != typeof goog.global._evalTest_) {
+				try {
+					delete goog.global._evalTest_
+				} catch (d) { }
+				goog.evalWorksForGlobals_ = !0
+			} else goog.evalWorksForGlobals_ = !1;
+		if (goog.evalWorksForGlobals_) goog.global.eval(a);
+		else {
+			var b = goog.global.document,
+				c = b.createElement("SCRIPT");
+			c.type = "text/javascript";
+			c.defer = !1;
+			c.appendChild(b.createTextNode(a));
+			b.body.appendChild(c);
+			b.body.removeChild(c)
+		}
+	} else throw Error("goog.globalEval not available");
+};
+goog.evalWorksForGlobals_ = null;
+goog.getCssName = function (a, b) {
+	if ("." == String(a).charAt(0)) throw Error('className passed in goog.getCssName must not start with ".". You passed: ' + a);
+	var c = function (a) {
+		return goog.cssNameMapping_[a] || a
+	},
+		d = function (a) {
+        	a = a.split("-");
+        	for (var b = [], d = 0; d < a.length; d++) b.push(c(a[d]));
+        	return b.join("-")
+		},
+		d = goog.cssNameMapping_ ? "BY_WHOLE" == goog.cssNameMappingStyle_ ? c : d : function (a) {
+        	return a
+		},
+		d = b ? a + "-" + d(b) : d(a);
+	return goog.global.CLOSURE_CSS_NAME_MAP_FN ? goog.global.CLOSURE_CSS_NAME_MAP_FN(d) : d
+};
+goog.setCssNameMapping = function (a, b) {
+	goog.cssNameMapping_ = a;
+	goog.cssNameMappingStyle_ = b
+};
+!COMPILED && goog.global.CLOSURE_CSS_NAME_MAPPING && (goog.cssNameMapping_ = goog.global.CLOSURE_CSS_NAME_MAPPING);
+goog.getMsg = function (a, b) {
+	b && (a = a.replace(/\{\$([^}]+)}/g, function (a, d) {
+		return null != b && d in b ? b[d] : a
+	}));
+	return a
+};
+goog.getMsgWithFallback = function (a, b) {
+	return a
+};
+goog.exportSymbol = function (a, b, c) {
+	goog.exportPath_(a, b, c)
+};
+goog.exportProperty = function (a, b, c) {
+	a[b] = c
+};
+goog.inherits = function (a, b) {
+	function c() { }
+	c.prototype = b.prototype;
+	a.superClass_ = b.prototype;
+	a.prototype = new c;
+	a.prototype.constructor = a;
+	a.base = function (a, c, f) {
+		for (var d = Array(arguments.length - 2), e = 2; e < arguments.length; e++) d[e - 2] = arguments[e];
+		return b.prototype[c].apply(a, d)
+	}
+};
+goog.base = function (a, b, c) {
+	var d = arguments.callee.caller;
+	if (goog.STRICT_MODE_COMPATIBLE || goog.DEBUG && !d) throw Error("arguments.caller not defined.  goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");
+	if (d.superClass_) {
+		for (var e = Array(arguments.length - 1), f = 1; f < arguments.length; f++) e[f - 1] = arguments[f];
+		return d.superClass_.constructor.apply(a, e)
+	}
+	e = Array(arguments.length - 2);
+	for (f = 2; f < arguments.length; f++) e[f - 2] = arguments[f];
+	for (var f = !1, g = a.constructor; g; g =
+		g.superClass_ && g.superClass_.constructor)
+		if (g.prototype[b] === d) f = !0;
+		else if (f) return g.prototype[b].apply(a, e);
+	if (a[b] === d) return a.constructor.prototype[b].apply(a, e);
+	throw Error("goog.base called from a method of one name to a method of a different name");
+};
+goog.scope = function (a) {
+	if (goog.isInModuleLoader_()) throw Error("goog.scope is not supported within a goog.module.");
+	a.call(goog.global)
+};
+COMPILED || (goog.global.COMPILED = COMPILED);
+goog.defineClass = function (a, b) {
+	var c = b.constructor,
+		d = b.statics;
+	c && c != Object.prototype.constructor || (c = function () {
+		throw Error("cannot instantiate an interface (no constructor defined).");
+	});
+	c = goog.defineClass.createSealingConstructor_(c, a);
+	a && goog.inherits(c, a);
+	delete b.constructor;
+	delete b.statics;
+	goog.defineClass.applyProperties_(c.prototype, b);
+	null != d && (d instanceof Function ? d(c) : goog.defineClass.applyProperties_(c, d));
+	return c
+};
+goog.defineClass.SEAL_CLASS_INSTANCES = goog.DEBUG;
+goog.defineClass.createSealingConstructor_ = function (a, b) {
+	if (!goog.defineClass.SEAL_CLASS_INSTANCES) return a;
+	var c = !goog.defineClass.isUnsealable_(b),
+		d = function () {
+        	var b = a.apply(this, arguments) || this;
+        	b[goog.UID_PROPERTY_] = b[goog.UID_PROPERTY_];
+        	this.constructor === d && c && Object.seal instanceof Function && Object.seal(b);
+        	return b
+		};
+	return d
+};
+goog.defineClass.isUnsealable_ = function (a) {
+	return a && a.prototype && a.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]
+};
+goog.defineClass.OBJECT_PROTOTYPE_FIELDS_ = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
+goog.defineClass.applyProperties_ = function (a, b) {
+	for (var c in b) Object.prototype.hasOwnProperty.call(b, c) && (a[c] = b[c]);
+	for (var d = 0; d < goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length; d++) c = goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[d], Object.prototype.hasOwnProperty.call(b, c) && (a[c] = b[c])
+};
+goog.tagUnsealableClass = function (a) {
+	!COMPILED && goog.defineClass.SEAL_CLASS_INSTANCES && (a.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_] = !0)
+};
+goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_ = "goog_defineClass_legacy_unsealable";
+goog.createRequiresTranspilation_ = function () {
+	function a(a, b) {
+		d ? c[a] = !0 : b() ? c[a] = !1 : d = c[a] = !0
+	}
+
+	function b(a) {
+		try {
+			return !!eval(a)
+		} catch (f) {
+			return !1
+		}
+	}
+	var c = {
+		es3: !1
+	},
+		d = !1;
+	a("es5", function () {
+		return b("[1,].length==1")
+	});
+	a("es6", function () {
+		return b('(()=>{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')
+	});
+	a("es6-impl", function () {
+		return !0
+	});
+	a("es7", function () {
+		return b("2 ** 2 == 4")
+	});
+	a("es8", function () {
+		return b("async () => 1, true")
+	});
+	return c
+};
+goog.debug = {};
+goog.debug.Error = function (a) {
+	if (Error.captureStackTrace) Error.captureStackTrace(this, goog.debug.Error);
+	else {
+		var b = Error().stack;
+		b && (this.stack = b)
+	}
+	a && (this.message = String(a));
+	this.reportErrorToServer = !0
+};
+goog.inherits(goog.debug.Error, Error);
+goog.debug.Error.prototype.name = "CustomError";
+goog.dom = {};
+goog.dom.NodeType = {
+	ELEMENT: 1,
+	ATTRIBUTE: 2,
+	TEXT: 3,
+	CDATA_SECTION: 4,
+	ENTITY_REFERENCE: 5,
+	ENTITY: 6,
+	PROCESSING_INSTRUCTION: 7,
+	COMMENT: 8,
+	DOCUMENT: 9,
+	DOCUMENT_TYPE: 10,
+	DOCUMENT_FRAGMENT: 11,
+	NOTATION: 12
+};
+goog.string = {};
+goog.string.DETECT_DOUBLE_ESCAPING = !1;
+goog.string.FORCE_NON_DOM_HTML_UNESCAPING = !1;
+goog.string.Unicode = {
+	NBSP: "\u00a0"
+};
+goog.string.startsWith = function (a, b) {
+	return 0 == a.lastIndexOf(b, 0)
+};
+goog.string.endsWith = function (a, b) {
+	var c = a.length - b.length;
+	return 0 <= c && a.indexOf(b, c) == c
+};
+goog.string.caseInsensitiveStartsWith = function (a, b) {
+	return 0 == goog.string.caseInsensitiveCompare(b, a.substr(0, b.length))
+};
+goog.string.caseInsensitiveEndsWith = function (a, b) {
+	return 0 == goog.string.caseInsensitiveCompare(b, a.substr(a.length - b.length, b.length))
+};
+goog.string.caseInsensitiveEquals = function (a, b) {
+	return a.toLowerCase() == b.toLowerCase()
+};
+goog.string.subs = function (a, b) {
+	for (var c = a.split("%s"), d = "", e = Array.prototype.slice.call(arguments, 1) ; e.length && 1 < c.length;) d += c.shift() + e.shift();
+	return d + c.join("%s")
+};
+goog.string.collapseWhitespace = function (a) {
+	return a.replace(/[\s\xa0]+/g, " ").replace(/^\s+|\s+$/g, "")
+};
+goog.string.isEmptyOrWhitespace = function (a) {
+	return /^[\s\xa0]*$/.test(a)
+};
+goog.string.isEmptyString = function (a) {
+	return 0 == a.length
+};
+goog.string.isEmpty = goog.string.isEmptyOrWhitespace;
+goog.string.isEmptyOrWhitespaceSafe = function (a) {
+	return goog.string.isEmptyOrWhitespace(goog.string.makeSafe(a))
+};
+goog.string.isEmptySafe = goog.string.isEmptyOrWhitespaceSafe;
+goog.string.isBreakingWhitespace = function (a) {
+	return !/[^\t\n\r ]/.test(a)
+};
+goog.string.isAlpha = function (a) {
+	return !/[^a-zA-Z]/.test(a)
+};
+goog.string.isNumeric = function (a) {
+	return !/[^0-9]/.test(a)
+};
+goog.string.isAlphaNumeric = function (a) {
+	return !/[^a-zA-Z0-9]/.test(a)
+};
+goog.string.isSpace = function (a) {
+	return " " == a
+};
+goog.string.isUnicodeChar = function (a) {
+	return 1 == a.length && " " <= a && "~" >= a || "\u0080" <= a && "\ufffd" >= a
+};
+goog.string.stripNewlines = function (a) {
+	return a.replace(/(\r\n|\r|\n)+/g, " ")
+};
+goog.string.canonicalizeNewlines = function (a) {
+	return a.replace(/(\r\n|\r|\n)/g, "\n")
+};
+goog.string.normalizeWhitespace = function (a) {
+	return a.replace(/\xa0|\s/g, " ")
+};
+goog.string.normalizeSpaces = function (a) {
+	return a.replace(/\xa0|[ \t]+/g, " ")
+};
+goog.string.collapseBreakingSpaces = function (a) {
+	return a.replace(/[\t\r\n ]+/g, " ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g, "")
+};
+goog.string.trim = goog.TRUSTED_SITE && String.prototype.trim ? function (a) {
+	return a.trim()
+} : function (a) {
+	return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g, "")
+};
+goog.string.trimLeft = function (a) {
+	return a.replace(/^[\s\xa0]+/, "")
+};
+goog.string.trimRight = function (a) {
+	return a.replace(/[\s\xa0]+$/, "")
+};
+goog.string.caseInsensitiveCompare = function (a, b) {
+	var c = String(a).toLowerCase(),
+		d = String(b).toLowerCase();
+	return c < d ? -1 : c == d ? 0 : 1
+};
+goog.string.numberAwareCompare_ = function (a, b, c) {
+	if (a == b) return 0;
+	if (!a) return -1;
+	if (!b) return 1;
+	for (var d = a.toLowerCase().match(c), e = b.toLowerCase().match(c), f = Math.min(d.length, e.length), g = 0; g < f; g++) {
+		c = d[g];
+		var h = e[g];
+		if (c != h) return a = parseInt(c, 10), !isNaN(a) && (b = parseInt(h, 10), !isNaN(b) && a - b) ? a - b : c < h ? -1 : 1
+	}
+	return d.length != e.length ? d.length - e.length : a < b ? -1 : 1
+};
+goog.string.intAwareCompare = function (a, b) {
+	return goog.string.numberAwareCompare_(a, b, /\d+|\D+/g)
+};
+goog.string.floatAwareCompare = function (a, b) {
+	return goog.string.numberAwareCompare_(a, b, /\d+|\.\d+|\D+/g)
+};
+goog.string.numerateCompare = goog.string.floatAwareCompare;
+goog.string.urlEncode = function (a) {
+	return encodeURIComponent(String(a))
+};
+goog.string.urlDecode = function (a) {
+	return decodeURIComponent(a.replace(/\+/g, " "))
+};
+goog.string.newLineToBr = function (a, b) {
+	return a.replace(/(\r\n|\r|\n)/g, b ? "<br />" : "<br>")
+};
+goog.string.htmlEscape = function (a, b) {
+	if (b) a = a.replace(goog.string.AMP_RE_, "&amp;").replace(goog.string.LT_RE_, "&lt;").replace(goog.string.GT_RE_, "&gt;").replace(goog.string.QUOT_RE_, "&quot;").replace(goog.string.SINGLE_QUOTE_RE_, "&#39;").replace(goog.string.NULL_RE_, "&#0;"), goog.string.DETECT_DOUBLE_ESCAPING && (a = a.replace(goog.string.E_RE_, "&#101;"));
+	else {
+		if (!goog.string.ALL_RE_.test(a)) return a; -1 != a.indexOf("&") && (a = a.replace(goog.string.AMP_RE_, "&amp;")); -1 != a.indexOf("<") && (a = a.replace(goog.string.LT_RE_,
+			"&lt;")); -1 != a.indexOf(">") && (a = a.replace(goog.string.GT_RE_, "&gt;")); -1 != a.indexOf('"') && (a = a.replace(goog.string.QUOT_RE_, "&quot;")); -1 != a.indexOf("'") && (a = a.replace(goog.string.SINGLE_QUOTE_RE_, "&#39;")); -1 != a.indexOf("\x00") && (a = a.replace(goog.string.NULL_RE_, "&#0;"));
+		goog.string.DETECT_DOUBLE_ESCAPING && -1 != a.indexOf("e") && (a = a.replace(goog.string.E_RE_, "&#101;"))
+	}
+	return a
+};
+goog.string.AMP_RE_ = /&/g;
+goog.string.LT_RE_ = /</g;
+goog.string.GT_RE_ = />/g;
+goog.string.QUOT_RE_ = /"/g;
+goog.string.SINGLE_QUOTE_RE_ = /'/g;
+goog.string.NULL_RE_ = /\x00/g;
+goog.string.E_RE_ = /e/g;
+goog.string.ALL_RE_ = goog.string.DETECT_DOUBLE_ESCAPING ? /[\x00&<>"'e]/ : /[\x00&<>"']/;
+goog.string.unescapeEntities = function (a) {
+	return goog.string.contains(a, "&") ? !goog.string.FORCE_NON_DOM_HTML_UNESCAPING && "document" in goog.global ? goog.string.unescapeEntitiesUsingDom_(a) : goog.string.unescapePureXmlEntities_(a) : a
+};
+goog.string.unescapeEntitiesWithDocument = function (a, b) {
+	return goog.string.contains(a, "&") ? goog.string.unescapeEntitiesUsingDom_(a, b) : a
+};
+goog.string.unescapeEntitiesUsingDom_ = function (a, b) {
+	var c = {
+		"&amp;": "&",
+		"&lt;": "<",
+		"&gt;": ">",
+		"&quot;": '"'
+	},
+		d;
+	d = b ? b.createElement("div") : goog.global.document.createElement("div");
+	return a.replace(goog.string.HTML_ENTITY_PATTERN_, function (a, b) {
+		var e = c[a];
+		if (e) return e;
+		if ("#" == b.charAt(0)) {
+			var f = Number("0" + b.substr(1));
+			isNaN(f) || (e = String.fromCharCode(f))
+		}
+		e || (d.innerHTML = a + " ", e = d.firstChild.nodeValue.slice(0, -1));
+		return c[a] = e
+	})
+};
+goog.string.unescapePureXmlEntities_ = function (a) {
+	return a.replace(/&([^;]+);/g, function (a, c) {
+		switch (c) {
+			case "amp":
+				return "&";
+			case "lt":
+				return "<";
+			case "gt":
+				return ">";
+			case "quot":
+				return '"';
+			default:
+				if ("#" == c.charAt(0)) {
+					var b = Number("0" + c.substr(1));
+					if (!isNaN(b)) return String.fromCharCode(b)
+				}
+				return a
+		}
+	})
+};
+goog.string.HTML_ENTITY_PATTERN_ = /&([^;\s<&]+);?/g;
+goog.string.whitespaceEscape = function (a, b) {
+	return goog.string.newLineToBr(a.replace(/  /g, " &#160;"), b)
+};
+goog.string.preserveSpaces = function (a) {
+	return a.replace(/(^|[\n ]) /g, "$1" + goog.string.Unicode.NBSP)
+};
+goog.string.stripQuotes = function (a, b) {
+	for (var c = b.length, d = 0; d < c; d++) {
+		var e = 1 == c ? b : b.charAt(d);
+		if (a.charAt(0) == e && a.charAt(a.length - 1) == e) return a.substring(1, a.length - 1)
+	}
+	return a
+};
+goog.string.truncate = function (a, b, c) {
+	c && (a = goog.string.unescapeEntities(a));
+	a.length > b && (a = a.substring(0, b - 3) + "...");
+	c && (a = goog.string.htmlEscape(a));
+	return a
+};
+goog.string.truncateMiddle = function (a, b, c, d) {
+	c && (a = goog.string.unescapeEntities(a));
+	if (d && a.length > b) {
+		d > b && (d = b);
+		var e = a.length - d;
+		a = a.substring(0, b - d) + "..." + a.substring(e)
+	} else a.length > b && (d = Math.floor(b / 2), e = a.length - d, a = a.substring(0, d + b % 2) + "..." + a.substring(e));
+	c && (a = goog.string.htmlEscape(a));
+	return a
+};
+goog.string.specialEscapeChars_ = {
+	"\x00": "\\0",
+	"\b": "\\b",
+	"\f": "\\f",
+	"\n": "\\n",
+	"\r": "\\r",
+	"\t": "\\t",
+	"\x0B": "\\x0B",
+	'"': '\\"',
+	"\\": "\\\\",
+	"<": "<"
+};
+goog.string.jsEscapeCache_ = {
+	"'": "\\'"
+};
+goog.string.quote = function (a) {
+	a = String(a);
+	for (var b = ['"'], c = 0; c < a.length; c++) {
+		var d = a.charAt(c),
+			e = d.charCodeAt(0);
+		b[c + 1] = goog.string.specialEscapeChars_[d] || (31 < e && 127 > e ? d : goog.string.escapeChar(d))
+	}
+	b.push('"');
+	return b.join("")
+};
+goog.string.escapeString = function (a) {
+	for (var b = [], c = 0; c < a.length; c++) b[c] = goog.string.escapeChar(a.charAt(c));
+	return b.join("")
+};
+goog.string.escapeChar = function (a) {
+	if (a in goog.string.jsEscapeCache_) return goog.string.jsEscapeCache_[a];
+	if (a in goog.string.specialEscapeChars_) return goog.string.jsEscapeCache_[a] = goog.string.specialEscapeChars_[a];
+	var b, c = a.charCodeAt(0);
+	if (31 < c && 127 > c) b = a;
+	else {
+		if (256 > c) {
+			if (b = "\\x", 16 > c || 256 < c) b += "0"
+		} else b = "\\u", 4096 > c && (b += "0");
+		b += c.toString(16).toUpperCase()
+	}
+	return goog.string.jsEscapeCache_[a] = b
+};
+goog.string.contains = function (a, b) {
+	return -1 != a.indexOf(b)
+};
+goog.string.caseInsensitiveContains = function (a, b) {
+	return goog.string.contains(a.toLowerCase(), b.toLowerCase())
+};
+goog.string.countOf = function (a, b) {
+	return a && b ? a.split(b).length - 1 : 0
+};
+goog.string.removeAt = function (a, b, c) {
+	var d = a;
+	0 <= b && b < a.length && 0 < c && (d = a.substr(0, b) + a.substr(b + c, a.length - b - c));
+	return d
+};
+goog.string.remove = function (a, b) {
+	return a.replace(b, "")
+};
+goog.string.removeAll = function (a, b) {
+	var c = new RegExp(goog.string.regExpEscape(b), "g");
+	return a.replace(c, "")
+};
+goog.string.replaceAll = function (a, b, c) {
+	b = new RegExp(goog.string.regExpEscape(b), "g");
+	return a.replace(b, c.replace(/\$/g, "$$$$"))
+};
+goog.string.regExpEscape = function (a) {
+	return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, "\\$1").replace(/\x08/g, "\\x08")
+};
+goog.string.repeat = String.prototype.repeat ? function (a, b) {
+	return a.repeat(b)
+} : function (a, b) {
+	return Array(b + 1).join(a)
+};
+goog.string.padNumber = function (a, b, c) {
+	a = goog.isDef(c) ? a.toFixed(c) : String(a);
+	c = a.indexOf("."); -1 == c && (c = a.length);
+	return goog.string.repeat("0", Math.max(0, b - c)) + a
+};
+goog.string.makeSafe = function (a) {
+	return null == a ? "" : String(a)
+};
+goog.string.buildString = function (a) {
+	return Array.prototype.join.call(arguments, "")
+};
+goog.string.getRandomString = function () {
+	return Math.floor(2147483648 * Math.random()).toString(36) + Math.abs(Math.floor(2147483648 * Math.random()) ^ goog.now()).toString(36)
+};
+goog.string.compareVersions = function (a, b) {
+	for (var c = 0, d = goog.string.trim(String(a)).split("."), e = goog.string.trim(String(b)).split("."), f = Math.max(d.length, e.length), g = 0; 0 == c && g < f; g++) {
+		var h = d[g] || "",
+			k = e[g] || "";
+		do {
+			h = /(\d*)(\D*)(.*)/.exec(h) || ["", "", "", ""];
+			k = /(\d*)(\D*)(.*)/.exec(k) || ["", "", "", ""];
+			if (0 == h[0].length && 0 == k[0].length) break;
+			var c = 0 == h[1].length ? 0 : parseInt(h[1], 10),
+				m = 0 == k[1].length ? 0 : parseInt(k[1], 10),
+				c = goog.string.compareElements_(c, m) || goog.string.compareElements_(0 == h[2].length, 0 == k[2].length) ||
+				goog.string.compareElements_(h[2], k[2]),
+				h = h[3],
+				k = k[3]
+		} while (0 == c)
+	}
+	return c
+};
+goog.string.compareElements_ = function (a, b) {
+	return a < b ? -1 : a > b ? 1 : 0
+};
+goog.string.hashCode = function (a) {
+	for (var b = 0, c = 0; c < a.length; ++c) b = 31 * b + a.charCodeAt(c) >>> 0;
+	return b
+};
+goog.string.uniqueStringCounter_ = 2147483648 * Math.random() | 0;
+goog.string.createUniqueString = function () {
+	return "goog_" + goog.string.uniqueStringCounter_++
+};
+goog.string.toNumber = function (a) {
+	var b = Number(a);
+	return 0 == b && goog.string.isEmptyOrWhitespace(a) ? NaN : b
+};
+goog.string.isLowerCamelCase = function (a) {
+	return /^[a-z]+([A-Z][a-z]*)*$/.test(a)
+};
+goog.string.isUpperCamelCase = function (a) {
+	return /^([A-Z][a-z]*)+$/.test(a)
+};
+goog.string.toCamelCase = function (a) {
+	return String(a).replace(/\-([a-z])/g, function (a, c) {
+		return c.toUpperCase()
+	})
+};
+goog.string.toSelectorCase = function (a) {
+	return String(a).replace(/([A-Z])/g, "-$1").toLowerCase()
+};
+goog.string.toTitleCase = function (a, b) {
+	var c = goog.isString(b) ? goog.string.regExpEscape(b) : "\\s";
+	return a.replace(new RegExp("(^" + (c ? "|[" + c + "]+" : "") + ")([a-z])", "g"), function (a, b, c) {
+		return b + c.toUpperCase()
+	})
+};
+goog.string.capitalize = function (a) {
+	return String(a.charAt(0)).toUpperCase() + String(a.substr(1)).toLowerCase()
+};
+goog.string.parseInt = function (a) {
+	isFinite(a) && (a = String(a));
+	return goog.isString(a) ? /^\s*-?0x/i.test(a) ? parseInt(a, 16) : parseInt(a, 10) : NaN
+};
+goog.string.splitLimit = function (a, b, c) {
+	a = a.split(b);
+	for (var d = []; 0 < c && a.length;) d.push(a.shift()), c--;
+	a.length && d.push(a.join(b));
+	return d
+};
+goog.string.lastComponent = function (a, b) {
+	if (b) "string" == typeof b && (b = [b]);
+	else return a;
+	for (var c = -1, d = 0; d < b.length; d++)
+		if ("" != b[d]) {
+			var e = a.lastIndexOf(b[d]);
+			e > c && (c = e)
+		}
+	return -1 == c ? a : a.slice(c + 1)
+};
+goog.string.editDistance = function (a, b) {
+	var c = [],
+		d = [];
+	if (a == b) return 0;
+	if (!a.length || !b.length) return Math.max(a.length, b.length);
+	for (var e = 0; e < b.length + 1; e++) c[e] = e;
+	for (e = 0; e < a.length; e++) {
+		d[0] = e + 1;
+		for (var f = 0; f < b.length; f++) d[f + 1] = Math.min(d[f] + 1, c[f + 1] + 1, c[f] + Number(a[e] != b[f]));
+		for (f = 0; f < c.length; f++) c[f] = d[f]
+	}
+	return d[b.length]
+};
+goog.asserts = {};
+goog.asserts.ENABLE_ASSERTS = goog.DEBUG;
+goog.asserts.AssertionError = function (a, b) {
+	b.unshift(a);
+	goog.debug.Error.call(this, goog.string.subs.apply(null, b));
+	b.shift();
+	this.messagePattern = a
+};
+goog.inherits(goog.asserts.AssertionError, goog.debug.Error);
+goog.asserts.AssertionError.prototype.name = "AssertionError";
+goog.asserts.DEFAULT_ERROR_HANDLER = function (a) {
+	throw a;
+};
+goog.asserts.errorHandler_ = goog.asserts.DEFAULT_ERROR_HANDLER;
+goog.asserts.doAssertFailure_ = function (a, b, c, d) {
+	var e = "Assertion failed";
+	if (c) var e = e + (": " + c),
+		f = d;
+	else a && (e += ": " + a, f = b);
+	a = new goog.asserts.AssertionError("" + e, f || []);
+	goog.asserts.errorHandler_(a)
+};
+goog.asserts.setErrorHandler = function (a) {
+	goog.asserts.ENABLE_ASSERTS && (goog.asserts.errorHandler_ = a)
+};
+goog.asserts.assert = function (a, b, c) {
+	goog.asserts.ENABLE_ASSERTS && !a && goog.asserts.doAssertFailure_("", null, b, Array.prototype.slice.call(arguments, 2));
+	return a
+};
+goog.asserts.fail = function (a, b) {
+	goog.asserts.ENABLE_ASSERTS && goog.asserts.errorHandler_(new goog.asserts.AssertionError("Failure" + (a ? ": " + a : ""), Array.prototype.slice.call(arguments, 1)))
+};
+goog.asserts.assertNumber = function (a, b, c) {
+	goog.asserts.ENABLE_ASSERTS && !goog.isNumber(a) && goog.asserts.doAssertFailure_("Expected number but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
+	return a
+};
+goog.asserts.assertString = function (a, b, c) {
+	goog.asserts.ENABLE_ASSERTS && !goog.isString(a) && goog.asserts.doAssertFailure_("Expected string but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
+	return a
+};
+goog.asserts.assertFunction = function (a, b, c) {
+	goog.asserts.ENABLE_ASSERTS && !goog.isFunction(a) && goog.asserts.doAssertFailure_("Expected function but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
+	return a
+};
+goog.asserts.assertObject = function (a, b, c) {
+	goog.asserts.ENABLE_ASSERTS && !goog.isObject(a) && goog.asserts.doAssertFailure_("Expected object but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
+	return a
+};
+goog.asserts.assertArray = function (a, b, c) {
+	goog.asserts.ENABLE_ASSERTS && !goog.isArray(a) && goog.asserts.doAssertFailure_("Expected array but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
+	return a
+};
+goog.asserts.assertBoolean = function (a, b, c) {
+	goog.asserts.ENABLE_ASSERTS && !goog.isBoolean(a) && goog.asserts.doAssertFailure_("Expected boolean but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
+	return a
+};
+goog.asserts.assertElement = function (a, b, c) {
+	!goog.asserts.ENABLE_ASSERTS || goog.isObject(a) && a.nodeType == goog.dom.NodeType.ELEMENT || goog.asserts.doAssertFailure_("Expected Element but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
+	return a
+};
+goog.asserts.assertInstanceof = function (a, b, c, d) {
+	!goog.asserts.ENABLE_ASSERTS || a instanceof b || goog.asserts.doAssertFailure_("Expected instanceof %s but got %s.", [goog.asserts.getType_(b), goog.asserts.getType_(a)], c, Array.prototype.slice.call(arguments, 3));
+	return a
+};
+goog.asserts.assertObjectPrototypeIsIntact = function () {
+	for (var a in Object.prototype) goog.asserts.fail(a + " should not be enumerable in Object.prototype.")
+};
+goog.asserts.getType_ = function (a) {
+	return a instanceof Function ? a.displayName || a.name || "unknown type name" : a instanceof Object ? a.constructor.displayName || a.constructor.name || Object.prototype.toString.call(a) : null === a ? "null" : typeof a
+};
+goog.debug.entryPointRegistry = {};
+goog.debug.EntryPointMonitor = function () { };
+goog.debug.entryPointRegistry.refList_ = [];
+goog.debug.entryPointRegistry.monitors_ = [];
+goog.debug.entryPointRegistry.monitorsMayExist_ = !1;
+goog.debug.entryPointRegistry.register = function (a) {
+	goog.debug.entryPointRegistry.refList_[goog.debug.entryPointRegistry.refList_.length] = a;
+	if (goog.debug.entryPointRegistry.monitorsMayExist_)
+		for (var b = goog.debug.entryPointRegistry.monitors_, c = 0; c < b.length; c++) a(goog.bind(b[c].wrap, b[c]))
+};
+goog.debug.entryPointRegistry.monitorAll = function (a) {
+	goog.debug.entryPointRegistry.monitorsMayExist_ = !0;
+	for (var b = goog.bind(a.wrap, a), c = 0; c < goog.debug.entryPointRegistry.refList_.length; c++) goog.debug.entryPointRegistry.refList_[c](b);
+	goog.debug.entryPointRegistry.monitors_.push(a)
+};
+goog.debug.entryPointRegistry.unmonitorAllIfPossible = function (a) {
+	var b = goog.debug.entryPointRegistry.monitors_;
+	goog.asserts.assert(a == b[b.length - 1], "Only the most recent monitor can be unwrapped.");
+	a = goog.bind(a.unwrap, a);
+	for (var c = 0; c < goog.debug.entryPointRegistry.refList_.length; c++) goog.debug.entryPointRegistry.refList_[c](a);
+	b.length--
+};
+goog.array = {};
+goog.NATIVE_ARRAY_PROTOTYPES = goog.TRUSTED_SITE;
+goog.array.ASSUME_NATIVE_FUNCTIONS = !1;
+goog.array.peek = function (a) {
+	return a[a.length - 1]
+};
+goog.array.last = goog.array.peek;
+goog.array.indexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.indexOf) ? function (a, b, c) {
+	goog.asserts.assert(null != a.length);
+	return Array.prototype.indexOf.call(a, b, c)
+} : function (a, b, c) {
+	c = null == c ? 0 : 0 > c ? Math.max(0, a.length + c) : c;
+	if (goog.isString(a)) return goog.isString(b) && 1 == b.length ? a.indexOf(b, c) : -1;
+	for (; c < a.length; c++)
+		if (c in a && a[c] === b) return c;
+	return -1
+};
+goog.array.lastIndexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.lastIndexOf) ? function (a, b, c) {
+	goog.asserts.assert(null != a.length);
+	return Array.prototype.lastIndexOf.call(a, b, null == c ? a.length - 1 : c)
+} : function (a, b, c) {
+	c = null == c ? a.length - 1 : c;
+	0 > c && (c = Math.max(0, a.length + c));
+	if (goog.isString(a)) return goog.isString(b) && 1 == b.length ? a.lastIndexOf(b, c) : -1;
+	for (; 0 <= c; c--)
+		if (c in a && a[c] === b) return c;
+	return -1
+};
+goog.array.forEach = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.forEach) ? function (a, b, c) {
+	goog.asserts.assert(null != a.length);
+	Array.prototype.forEach.call(a, b, c)
+} : function (a, b, c) {
+	for (var d = a.length, e = goog.isString(a) ? a.split("") : a, f = 0; f < d; f++) f in e && b.call(c, e[f], f, a)
+};
+goog.array.forEachRight = function (a, b, c) {
+	for (var d = a.length, e = goog.isString(a) ? a.split("") : a, d = d - 1; 0 <= d; --d) d in e && b.call(c, e[d], d, a)
+};
+goog.array.filter = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.filter) ? function (a, b, c) {
+	goog.asserts.assert(null != a.length);
+	return Array.prototype.filter.call(a, b, c)
+} : function (a, b, c) {
+	for (var d = a.length, e = [], f = 0, g = goog.isString(a) ? a.split("") : a, h = 0; h < d; h++)
+		if (h in g) {
+			var k = g[h];
+			b.call(c, k, h, a) && (e[f++] = k)
+		}
+	return e
+};
+goog.array.map = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.map) ? function (a, b, c) {
+	goog.asserts.assert(null != a.length);
+	return Array.prototype.map.call(a, b, c)
+} : function (a, b, c) {
+	for (var d = a.length, e = Array(d), f = goog.isString(a) ? a.split("") : a, g = 0; g < d; g++) g in f && (e[g] = b.call(c, f[g], g, a));
+	return e
+};
+goog.array.reduce = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.reduce) ? function (a, b, c, d) {
+	goog.asserts.assert(null != a.length);
+	d && (b = goog.bind(b, d));
+	return Array.prototype.reduce.call(a, b, c)
+} : function (a, b, c, d) {
+	var e = c;
+	goog.array.forEach(a, function (c, g) {
+		e = b.call(d, e, c, g, a)
+	});
+	return e
+};
+goog.array.reduceRight = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.reduceRight) ? function (a, b, c, d) {
+	goog.asserts.assert(null != a.length);
+	goog.asserts.assert(null != b);
+	d && (b = goog.bind(b, d));
+	return Array.prototype.reduceRight.call(a, b, c)
+} : function (a, b, c, d) {
+	var e = c;
+	goog.array.forEachRight(a, function (c, g) {
+		e = b.call(d, e, c, g, a)
+	});
+	return e
+};
+goog.array.some = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.some) ? function (a, b, c) {
+	goog.asserts.assert(null != a.length);
+	return Array.prototype.some.call(a, b, c)
+} : function (a, b, c) {
+	for (var d = a.length, e = goog.isString(a) ? a.split("") : a, f = 0; f < d; f++)
+		if (f in e && b.call(c, e[f], f, a)) return !0;
+	return !1
+};
+goog.array.every = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || Array.prototype.every) ? function (a, b, c) {
+	goog.asserts.assert(null != a.length);
+	return Array.prototype.every.call(a, b, c)
+} : function (a, b, c) {
+	for (var d = a.length, e = goog.isString(a) ? a.split("") : a, f = 0; f < d; f++)
+		if (f in e && !b.call(c, e[f], f, a)) return !1;
+	return !0
+};
+goog.array.count = function (a, b, c) {
+	var d = 0;
+	goog.array.forEach(a, function (a, f, g) {
+		b.call(c, a, f, g) && ++d
+	}, c);
+	return d
+};
+goog.array.find = function (a, b, c) {
+	b = goog.array.findIndex(a, b, c);
+	return 0 > b ? null : goog.isString(a) ? a.charAt(b) : a[b]
+};
+goog.array.findIndex = function (a, b, c) {
+	for (var d = a.length, e = goog.isString(a) ? a.split("") : a, f = 0; f < d; f++)
+		if (f in e && b.call(c, e[f], f, a)) return f;
+	return -1
+};
+goog.array.findRight = function (a, b, c) {
+	b = goog.array.findIndexRight(a, b, c);
+	return 0 > b ? null : goog.isString(a) ? a.charAt(b) : a[b]
+};
+goog.array.findIndexRight = function (a, b, c) {
+	for (var d = a.length, e = goog.isString(a) ? a.split("") : a, d = d - 1; 0 <= d; d--)
+		if (d in e && b.call(c, e[d], d, a)) return d;
+	return -1
+};
+goog.array.contains = function (a, b) {
+	return 0 <= goog.array.indexOf(a, b)
+};
+goog.array.isEmpty = function (a) {
+	return 0 == a.length
+};
+goog.array.clear = function (a) {
+	if (!goog.isArray(a))
+		for (var b = a.length - 1; 0 <= b; b--) delete a[b];
+	a.length = 0
+};
+goog.array.insert = function (a, b) {
+	goog.array.contains(a, b) || a.push(b)
+};
+goog.array.insertAt = function (a, b, c) {
+	goog.array.splice(a, c, 0, b)
+};
+goog.array.insertArrayAt = function (a, b, c) {
+	goog.partial(goog.array.splice, a, c, 0).apply(null, b)
+};
+goog.array.insertBefore = function (a, b, c) {
+	var d;
+	2 == arguments.length || 0 > (d = goog.array.indexOf(a, c)) ? a.push(b) : goog.array.insertAt(a, b, d)
+};
+goog.array.remove = function (a, b) {
+	var c = goog.array.indexOf(a, b),
+		d;
+	(d = 0 <= c) && goog.array.removeAt(a, c);
+	return d
+};
+goog.array.removeLast = function (a, b) {
+	var c = goog.array.lastIndexOf(a, b);
+	return 0 <= c ? (goog.array.removeAt(a, c), !0) : !1
+};
+goog.array.removeAt = function (a, b) {
+	goog.asserts.assert(null != a.length);
+	return 1 == Array.prototype.splice.call(a, b, 1).length
+};
+goog.array.removeIf = function (a, b, c) {
+	b = goog.array.findIndex(a, b, c);
+	return 0 <= b ? (goog.array.removeAt(a, b), !0) : !1
+};
+goog.array.removeAllIf = function (a, b, c) {
+	var d = 0;
+	goog.array.forEachRight(a, function (e, f) {
+		b.call(c, e, f, a) && goog.array.removeAt(a, f) && d++
+	});
+	return d
+};
+goog.array.concat = function (a) {
+	return Array.prototype.concat.apply(Array.prototype, arguments)
+};
+goog.array.join = function (a) {
+	return Array.prototype.concat.apply(Array.prototype, arguments)
+};
+goog.array.toArray = function (a) {
+	var b = a.length;
+	if (0 < b) {
+		for (var c = Array(b), d = 0; d < b; d++) c[d] = a[d];
+		return c
+	}
+	return []
+};
+goog.array.clone = goog.array.toArray;
+goog.array.extend = function (a, b) {
+	for (var c = 1; c < arguments.length; c++) {
+		var d = arguments[c];
+		if (goog.isArrayLike(d)) {
+			var e = a.length || 0,
+				f = d.length || 0;
+			a.length = e + f;
+			for (var g = 0; g < f; g++) a[e + g] = d[g]
+		} else a.push(d)
+	}
+};
+goog.array.splice = function (a, b, c, d) {
+	goog.asserts.assert(null != a.length);
+	return Array.prototype.splice.apply(a, goog.array.slice(arguments, 1))
+};
+goog.array.slice = function (a, b, c) {
+	goog.asserts.assert(null != a.length);
+	return 2 >= arguments.length ? Array.prototype.slice.call(a, b) : Array.prototype.slice.call(a, b, c)
+};
+goog.array.removeDuplicates = function (a, b, c) {
+	b = b || a;
+	var d = function (a) {
+		return goog.isObject(a) ? "o" + goog.getUid(a) : (typeof a).charAt(0) + a
+	};
+	c = c || d;
+	for (var d = {}, e = 0, f = 0; f < a.length;) {
+		var g = a[f++],
+			h = c(g);
+		Object.prototype.hasOwnProperty.call(d, h) || (d[h] = !0, b[e++] = g)
+	}
+	b.length = e
+};
+goog.array.binarySearch = function (a, b, c) {
+	return goog.array.binarySearch_(a, c || goog.array.defaultCompare, !1, b)
+};
+goog.array.binarySelect = function (a, b, c) {
+	return goog.array.binarySearch_(a, b, !0, void 0, c)
+};
+goog.array.binarySearch_ = function (a, b, c, d, e) {
+	for (var f = 0, g = a.length, h; f < g;) {
+		var k = f + g >> 1,
+			m;
+		m = c ? b.call(e, a[k], k, a) : b(d, a[k]);
+		0 < m ? f = k + 1 : (g = k, h = !m)
+	}
+	return h ? f : ~f
+};
+goog.array.sort = function (a, b) {
+	a.sort(b || goog.array.defaultCompare)
+};
+goog.array.stableSort = function (a, b) {
+	for (var c = Array(a.length), d = 0; d < a.length; d++) c[d] = {
+		index: d,
+		value: a[d]
+	};
+	var e = b || goog.array.defaultCompare;
+	goog.array.sort(c, function (a, b) {
+		return e(a.value, b.value) || a.index - b.index
+	});
+	for (d = 0; d < a.length; d++) a[d] = c[d].value
+};
+goog.array.sortByKey = function (a, b, c) {
+	var d = c || goog.array.defaultCompare;
+	goog.array.sort(a, function (a, c) {
+		return d(b(a), b(c))
+	})
+};
+goog.array.sortObjectsByKey = function (a, b, c) {
+	goog.array.sortByKey(a, function (a) {
+		return a[b]
+	}, c)
+};
+goog.array.isSorted = function (a, b, c) {
+	b = b || goog.array.defaultCompare;
+	for (var d = 1; d < a.length; d++) {
+		var e = b(a[d - 1], a[d]);
+		if (0 < e || 0 == e && c) return !1
+	}
+	return !0
+};
+goog.array.equals = function (a, b, c) {
+	if (!goog.isArrayLike(a) || !goog.isArrayLike(b) || a.length != b.length) return !1;
+	var d = a.length;
+	c = c || goog.array.defaultCompareEquality;
+	for (var e = 0; e < d; e++)
+		if (!c(a[e], b[e])) return !1;
+	return !0
+};
+goog.array.compare3 = function (a, b, c) {
+	c = c || goog.array.defaultCompare;
+	for (var d = Math.min(a.length, b.length), e = 0; e < d; e++) {
+		var f = c(a[e], b[e]);
+		if (0 != f) return f
+	}
+	return goog.array.defaultCompare(a.length, b.length)
+};
+goog.array.defaultCompare = function (a, b) {
+	return a > b ? 1 : a < b ? -1 : 0
+};
+goog.array.inverseDefaultCompare = function (a, b) {
+	return -goog.array.defaultCompare(a, b)
+};
+goog.array.defaultCompareEquality = function (a, b) {
+	return a === b
+};
+goog.array.binaryInsert = function (a, b, c) {
+	c = goog.array.binarySearch(a, b, c);
+	return 0 > c ? (goog.array.insertAt(a, b, -(c + 1)), !0) : !1
+};
+goog.array.binaryRemove = function (a, b, c) {
+	b = goog.array.binarySearch(a, b, c);
+	return 0 <= b ? goog.array.removeAt(a, b) : !1
+};
+goog.array.bucket = function (a, b, c) {
+	for (var d = {}, e = 0; e < a.length; e++) {
+		var f = a[e],
+			g = b.call(c, f, e, a);
+		goog.isDef(g) && (d[g] || (d[g] = [])).push(f)
+	}
+	return d
+};
+goog.array.toObject = function (a, b, c) {
+	var d = {};
+	goog.array.forEach(a, function (e, f) {
+		d[b.call(c, e, f, a)] = e
+	});
+	return d
+};
+goog.array.range = function (a, b, c) {
+	var d = [],
+		e = 0,
+		f = a;
+	c = c || 1;
+	void 0 !== b && (e = a, f = b);
+	if (0 > c * (f - e)) return [];
+	if (0 < c)
+		for (a = e; a < f; a += c) d.push(a);
+	else
+		for (a = e; a > f; a += c) d.push(a);
+	return d
+};
+goog.array.repeat = function (a, b) {
+	for (var c = [], d = 0; d < b; d++) c[d] = a;
+	return c
+};
+goog.array.flatten = function (a) {
+	for (var b = [], c = 0; c < arguments.length; c++) {
+		var d = arguments[c];
+		if (goog.isArray(d))
+			for (var e = 0; e < d.length; e += 8192)
+				for (var f = goog.array.slice(d, e, e + 8192), f = goog.array.flatten.apply(null, f), g = 0; g < f.length; g++) b.push(f[g]);
+		else b.push(d)
+	}
+	return b
+};
+goog.array.rotate = function (a, b) {
+	goog.asserts.assert(null != a.length);
+	a.length && (b %= a.length, 0 < b ? Array.prototype.unshift.apply(a, a.splice(-b, b)) : 0 > b && Array.prototype.push.apply(a, a.splice(0, -b)));
+	return a
+};
+goog.array.moveItem = function (a, b, c) {
+	goog.asserts.assert(0 <= b && b < a.length);
+	goog.asserts.assert(0 <= c && c < a.length);
+	b = Array.prototype.splice.call(a, b, 1);
+	Array.prototype.splice.call(a, c, 0, b[0])
+};
+goog.array.zip = function (a) {
+	if (!arguments.length) return [];
+	for (var b = [], c = arguments[0].length, d = 1; d < arguments.length; d++) arguments[d].length < c && (c = arguments[d].length);
+	for (d = 0; d < c; d++) {
+		for (var e = [], f = 0; f < arguments.length; f++) e.push(arguments[f][d]);
+		b.push(e)
+	}
+	return b
+};
+goog.array.shuffle = function (a, b) {
+	for (var c = b || Math.random, d = a.length - 1; 0 < d; d--) {
+		var e = Math.floor(c() * (d + 1)),
+			f = a[d];
+		a[d] = a[e];
+		a[e] = f
+	}
+};
+goog.array.copyByIndex = function (a, b) {
+	var c = [];
+	goog.array.forEach(b, function (b) {
+		c.push(a[b])
+	});
+	return c
+};
+goog.array.concatMap = function (a, b, c) {
+	return goog.array.concat.apply([], goog.array.map(a, b, c))
+};
+goog.labs = {};
+goog.labs.userAgent = {};
+goog.labs.userAgent.util = {};
+goog.labs.userAgent.util.getNativeUserAgentString_ = function () {
+	var a = goog.labs.userAgent.util.getNavigator_();
+	return a && (a = a.userAgent) ? a : ""
+};
+goog.labs.userAgent.util.getNavigator_ = function () {
+	return goog.global.navigator
+};
+goog.labs.userAgent.util.userAgent_ = goog.labs.userAgent.util.getNativeUserAgentString_();
+goog.labs.userAgent.util.setUserAgent = function (a) {
+	goog.labs.userAgent.util.userAgent_ = a || goog.labs.userAgent.util.getNativeUserAgentString_()
+};
+goog.labs.userAgent.util.getUserAgent = function () {
+	return goog.labs.userAgent.util.userAgent_
+};
+goog.labs.userAgent.util.matchUserAgent = function (a) {
+	var b = goog.labs.userAgent.util.getUserAgent();
+	return goog.string.contains(b, a)
+};
+goog.labs.userAgent.util.matchUserAgentIgnoreCase = function (a) {
+	var b = goog.labs.userAgent.util.getUserAgent();
+	return goog.string.caseInsensitiveContains(b, a)
+};
+goog.labs.userAgent.util.extractVersionTuples = function (a) {
+	for (var b = RegExp("(\\w[\\w ]+)/([^\\s]+)\\s*(?:\\((.*?)\\))?", "g"), c = [], d; d = b.exec(a) ;) c.push([d[1], d[2], d[3] || void 0]);
+	return c
+};
+goog.object = {};
+goog.object.is = function (a, b) {
+	return a === b ? 0 !== a || 1 / a === 1 / b : a !== a && b !== b
+};
+goog.object.forEach = function (a, b, c) {
+	for (var d in a) b.call(c, a[d], d, a)
+};
+goog.object.filter = function (a, b, c) {
+	var d = {},
+		e;
+	for (e in a) b.call(c, a[e], e, a) && (d[e] = a[e]);
+	return d
+};
+goog.object.map = function (a, b, c) {
+	var d = {},
+		e;
+	for (e in a) d[e] = b.call(c, a[e], e, a);
+	return d
+};
+goog.object.some = function (a, b, c) {
+	for (var d in a)
+		if (b.call(c, a[d], d, a)) return !0;
+	return !1
+};
+goog.object.every = function (a, b, c) {
+	for (var d in a)
+		if (!b.call(c, a[d], d, a)) return !1;
+	return !0
+};
+goog.object.getCount = function (a) {
+	var b = 0,
+		c;
+	for (c in a) b++;
+	return b
+};
+goog.object.getAnyKey = function (a) {
+	for (var b in a) return b
+};
+goog.object.getAnyValue = function (a) {
+	for (var b in a) return a[b]
+};
+goog.object.contains = function (a, b) {
+	return goog.object.containsValue(a, b)
+};
+goog.object.getValues = function (a) {
+	var b = [],
+		c = 0,
+		d;
+	for (d in a) b[c++] = a[d];
+	return b
+};
+goog.object.getKeys = function (a) {
+	var b = [],
+		c = 0,
+		d;
+	for (d in a) b[c++] = d;
+	return b
+};
+goog.object.getValueByKeys = function (a, b) {
+	for (var c = goog.isArrayLike(b), d = c ? b : arguments, c = c ? 0 : 1; c < d.length && (a = a[d[c]], goog.isDef(a)) ; c++);
+	return a
+};
+goog.object.containsKey = function (a, b) {
+	return null !== a && b in a
+};
+goog.object.containsValue = function (a, b) {
+	for (var c in a)
+		if (a[c] == b) return !0;
+	return !1
+};
+goog.object.findKey = function (a, b, c) {
+	for (var d in a)
+		if (b.call(c, a[d], d, a)) return d
+};
+goog.object.findValue = function (a, b, c) {
+	return (b = goog.object.findKey(a, b, c)) && a[b]
+};
+goog.object.isEmpty = function (a) {
+	for (var b in a) return !1;
+	return !0
+};
+goog.object.clear = function (a) {
+	for (var b in a) delete a[b]
+};
+goog.object.remove = function (a, b) {
+	var c;
+	(c = b in a) && delete a[b];
+	return c
+};
+goog.object.add = function (a, b, c) {
+	if (null !== a && b in a) throw Error('The object already contains the key "' + b + '"');
+	goog.object.set(a, b, c)
+};
+goog.object.get = function (a, b, c) {
+	return null !== a && b in a ? a[b] : c
+};
+goog.object.set = function (a, b, c) {
+	a[b] = c
+};
+goog.object.setIfUndefined = function (a, b, c) {
+	return b in a ? a[b] : a[b] = c
+};
+goog.object.setWithReturnValueIfNotSet = function (a, b, c) {
+	if (b in a) return a[b];
+	c = c();
+	return a[b] = c
+};
+goog.object.equals = function (a, b) {
+	for (var c in a)
+		if (!(c in b) || a[c] !== b[c]) return !1;
+	for (c in b)
+		if (!(c in a)) return !1;
+	return !0
+};
+goog.object.clone = function (a) {
+	var b = {},
+		c;
+	for (c in a) b[c] = a[c];
+	return b
+};
+goog.object.unsafeClone = function (a) {
+	var b = goog.typeOf(a);
+	if ("object" == b || "array" == b) {
+		if (goog.isFunction(a.clone)) return a.clone();
+		var b = "array" == b ? [] : {},
+			c;
+		for (c in a) b[c] = goog.object.unsafeClone(a[c]);
+		return b
+	}
+	return a
+};
+goog.object.transpose = function (a) {
+	var b = {},
+		c;
+	for (c in a) b[a[c]] = c;
+	return b
+};
+goog.object.PROTOTYPE_FIELDS_ = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
+goog.object.extend = function (a, b) {
+	for (var c, d, e = 1; e < arguments.length; e++) {
+		d = arguments[e];
+		for (c in d) a[c] = d[c];
+		for (var f = 0; f < goog.object.PROTOTYPE_FIELDS_.length; f++) c = goog.object.PROTOTYPE_FIELDS_[f], Object.prototype.hasOwnProperty.call(d, c) && (a[c] = d[c])
+	}
+};
+goog.object.create = function (a) {
+	var b = arguments.length;
+	if (1 == b && goog.isArray(arguments[0])) return goog.object.create.apply(null, arguments[0]);
+	if (b % 2) throw Error("Uneven number of arguments");
+	for (var c = {}, d = 0; d < b; d += 2) c[arguments[d]] = arguments[d + 1];
+	return c
+};
+goog.object.createSet = function (a) {
+	var b = arguments.length;
+	if (1 == b && goog.isArray(arguments[0])) return goog.object.createSet.apply(null, arguments[0]);
+	for (var c = {}, d = 0; d < b; d++) c[arguments[d]] = !0;
+	return c
+};
+goog.object.createImmutableView = function (a) {
+	var b = a;
+	Object.isFrozen && !Object.isFrozen(a) && (b = Object.create(a), Object.freeze(b));
+	return b
+};
+goog.object.isImmutableView = function (a) {
+	return !!Object.isFrozen && Object.isFrozen(a)
+};
+goog.labs.userAgent.browser = {};
+goog.labs.userAgent.browser.matchOpera_ = function () {
+	return goog.labs.userAgent.util.matchUserAgent("Opera")
+};
+goog.labs.userAgent.browser.matchIE_ = function () {
+	return goog.labs.userAgent.util.matchUserAgent("Trident") || goog.labs.userAgent.util.matchUserAgent("MSIE")
+};
+goog.labs.userAgent.browser.matchEdge_ = function () {
+	return goog.labs.userAgent.util.matchUserAgent("Edge")
+};
+goog.labs.userAgent.browser.matchFirefox_ = function () {
+	return goog.labs.userAgent.util.matchUserAgent("Firefox")
+};
+goog.labs.userAgent.browser.matchSafari_ = function () {
+	return goog.labs.userAgent.util.matchUserAgent("Safari") && !(goog.labs.userAgent.browser.matchChrome_() || goog.labs.userAgent.browser.matchCoast_() || goog.labs.userAgent.browser.matchOpera_() || goog.labs.userAgent.browser.matchEdge_() || goog.labs.userAgent.browser.isSilk() || goog.labs.userAgent.util.matchUserAgent("Android"))
+};
+goog.labs.userAgent.browser.matchCoast_ = function () {
+	return goog.labs.userAgent.util.matchUserAgent("Coast")
+};
+goog.labs.userAgent.browser.matchIosWebview_ = function () {
+	return (goog.labs.userAgent.util.matchUserAgent("iPad") || goog.labs.userAgent.util.matchUserAgent("iPhone")) && !goog.labs.userAgent.browser.matchSafari_() && !goog.labs.userAgent.browser.matchChrome_() && !goog.labs.userAgent.browser.matchCoast_() && goog.labs.userAgent.util.matchUserAgent("AppleWebKit")
+};
+goog.labs.userAgent.browser.matchChrome_ = function () {
+	return (goog.labs.userAgent.util.matchUserAgent("Chrome") || goog.labs.userAgent.util.matchUserAgent("CriOS")) && !goog.labs.userAgent.browser.matchEdge_()
+};
+goog.labs.userAgent.browser.matchAndroidBrowser_ = function () {
+	return goog.labs.userAgent.util.matchUserAgent("Android") && !(goog.labs.userAgent.browser.isChrome() || goog.labs.userAgent.browser.isFirefox() || goog.labs.userAgent.browser.isOpera() || goog.labs.userAgent.browser.isSilk())
+};
+goog.labs.userAgent.browser.isOpera = goog.labs.userAgent.browser.matchOpera_;
+goog.labs.userAgent.browser.isIE = goog.labs.userAgent.browser.matchIE_;
+goog.labs.userAgent.browser.isEdge = goog.labs.userAgent.browser.matchEdge_;
+goog.labs.userAgent.browser.isFirefox = goog.labs.userAgent.browser.matchFirefox_;
+goog.labs.userAgent.browser.isSafari = goog.labs.userAgent.browser.matchSafari_;
+goog.labs.userAgent.browser.isCoast = goog.labs.userAgent.browser.matchCoast_;
+goog.labs.userAgent.browser.isIosWebview = goog.labs.userAgent.browser.matchIosWebview_;
+goog.labs.userAgent.browser.isChrome = goog.labs.userAgent.browser.matchChrome_;
+goog.labs.userAgent.browser.isAndroidBrowser = goog.labs.userAgent.browser.matchAndroidBrowser_;
+goog.labs.userAgent.browser.isSilk = function () {
+	return goog.labs.userAgent.util.matchUserAgent("Silk")
+};
+goog.labs.userAgent.browser.getVersion = function () {
+	function a(a) {
+		a = goog.array.find(a, d);
+		return c[a] || ""
+	}
+	var b = goog.labs.userAgent.util.getUserAgent();
+	if (goog.labs.userAgent.browser.isIE()) return goog.labs.userAgent.browser.getIEVersion_(b);
+	var b = goog.labs.userAgent.util.extractVersionTuples(b),
+		c = {};
+	goog.array.forEach(b, function (a) {
+		c[a[0]] = a[1]
+	});
+	var d = goog.partial(goog.object.containsKey, c);
+	return goog.labs.userAgent.browser.isOpera() ? a(["Version", "Opera"]) : goog.labs.userAgent.browser.isEdge() ? a(["Edge"]) :
+		goog.labs.userAgent.browser.isChrome() ? a(["Chrome", "CriOS"]) : (b = b[2]) && b[1] || ""
+};
+goog.labs.userAgent.browser.isVersionOrHigher = function (a) {
+	return 0 <= goog.string.compareVersions(goog.labs.userAgent.browser.getVersion(), a)
+};
+goog.labs.userAgent.browser.getIEVersion_ = function (a) {
+	var b = /rv: *([\d\.]*)/.exec(a);
+	if (b && b[1]) return b[1];
+	var b = "",
+		c = /MSIE +([\d\.]+)/.exec(a);
+	if (c && c[1])
+		if (a = /Trident\/(\d.\d)/.exec(a), "7.0" == c[1])
+			if (a && a[1]) switch (a[1]) {
+				case "4.0":
+					b = "8.0";
+					break;
+				case "5.0":
+					b = "9.0";
+					break;
+				case "6.0":
+					b = "10.0";
+					break;
+				case "7.0":
+					b = "11.0"
+			} else b = "7.0";
+		else b = c[1];
+	return b
+};
+goog.labs.userAgent.engine = {};
+goog.labs.userAgent.engine.isPresto = function () {
+	return goog.labs.userAgent.util.matchUserAgent("Presto")
+};
+goog.labs.userAgent.engine.isTrident = function () {
+	return goog.labs.userAgent.util.matchUserAgent("Trident") || goog.labs.userAgent.util.matchUserAgent("MSIE")
+};
+goog.labs.userAgent.engine.isEdge = function () {
+	return goog.labs.userAgent.util.matchUserAgent("Edge")
+};
+goog.labs.userAgent.engine.isWebKit = function () {
+	return goog.labs.userAgent.util.matchUserAgentIgnoreCase("WebKit") && !goog.labs.userAgent.engine.isEdge()
+};
+goog.labs.userAgent.engine.isGecko = function () {
+	return goog.labs.userAgent.util.matchUserAgent("Gecko") && !goog.labs.userAgent.engine.isWebKit() && !goog.labs.userAgent.engine.isTrident() && !goog.labs.userAgent.engine.isEdge()
+};
+goog.labs.userAgent.engine.getVersion = function () {
+	var a = goog.labs.userAgent.util.getUserAgent();
+	if (a) {
+		var a = goog.labs.userAgent.util.extractVersionTuples(a),
+			b = goog.labs.userAgent.engine.getEngineTuple_(a);
+		if (b) return "Gecko" == b[0] ? goog.labs.userAgent.engine.getVersionForKey_(a, "Firefox") : b[1];
+		var a = a[0],
+			c;
+		if (a && (c = a[2]) && (c = /Trident\/([^\s;]+)/.exec(c))) return c[1]
+	}
+	return ""
+};
+goog.labs.userAgent.engine.getEngineTuple_ = function (a) {
+	if (!goog.labs.userAgent.engine.isEdge()) return a[1];
+	for (var b = 0; b < a.length; b++) {
+		var c = a[b];
+		if ("Edge" == c[0]) return c
+	}
+};
+goog.labs.userAgent.engine.isVersionOrHigher = function (a) {
+	return 0 <= goog.string.compareVersions(goog.labs.userAgent.engine.getVersion(), a)
+};
+goog.labs.userAgent.engine.getVersionForKey_ = function (a, b) {
+	var c = goog.array.find(a, function (a) {
+		return b == a[0]
+	});
+	return c && c[1] || ""
+};
+goog.labs.userAgent.platform = {};
+goog.labs.userAgent.platform.isAndroid = function () {
+	return goog.labs.userAgent.util.matchUserAgent("Android")
+};
+goog.labs.userAgent.platform.isIpod = function () {
+	return goog.labs.userAgent.util.matchUserAgent("iPod")
+};
+goog.labs.userAgent.platform.isIphone = function () {
+	return goog.labs.userAgent.util.matchUserAgent("iPhone") && !goog.labs.userAgent.util.matchUserAgent("iPod") && !goog.labs.userAgent.util.matchUserAgent("iPad")
+};
+goog.labs.userAgent.platform.isIpad = function () {
+	return goog.labs.userAgent.util.matchUserAgent("iPad")
+};
+goog.labs.userAgent.platform.isIos = function () {
+	return goog.labs.userAgent.platform.isIphone() || goog.labs.userAgent.platform.isIpad() || goog.labs.userAgent.platform.isIpod()
+};
+goog.labs.userAgent.platform.isMacintosh = function () {
+	return goog.labs.userAgent.util.matchUserAgent("Macintosh")
+};
+goog.labs.userAgent.platform.isLinux = function () {
+	return goog.labs.userAgent.util.matchUserAgent("Linux")
+};
+goog.labs.userAgent.platform.isWindows = function () {
+	return goog.labs.userAgent.util.matchUserAgent("Windows")
+};
+goog.labs.userAgent.platform.isChromeOS = function () {
+	return goog.labs.userAgent.util.matchUserAgent("CrOS")
+};
+goog.labs.userAgent.platform.getVersion = function () {
+	var a = goog.labs.userAgent.util.getUserAgent(),
+		b = "";
+	goog.labs.userAgent.platform.isWindows() ? (b = /Windows (?:NT|Phone) ([0-9.]+)/, b = (a = b.exec(a)) ? a[1] : "0.0") : goog.labs.userAgent.platform.isIos() ? (b = /(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/, b = (a = b.exec(a)) && a[1].replace(/_/g, ".")) : goog.labs.userAgent.platform.isMacintosh() ? (b = /Mac OS X ([0-9_.]+)/, b = (a = b.exec(a)) ? a[1].replace(/_/g, ".") : "10") : goog.labs.userAgent.platform.isAndroid() ? (b = /Android\s+([^\);]+)(\)|;)/,
+		b = (a = b.exec(a)) && a[1]) : goog.labs.userAgent.platform.isChromeOS() && (b = /(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/, b = (a = b.exec(a)) && a[1]);
+	return b || ""
+};
+goog.labs.userAgent.platform.isVersionOrHigher = function (a) {
+	return 0 <= goog.string.compareVersions(goog.labs.userAgent.platform.getVersion(), a)
+};
+goog.reflect = {};
+goog.reflect.object = function (a, b) {
+	return b
+};
+goog.reflect.objectProperty = function (a, b) {
+	return a
+};
+goog.reflect.sinkValue = function (a) {
+	goog.reflect.sinkValue[" "](a);
+	return a
+};
+goog.reflect.sinkValue[" "] = goog.nullFunction;
+goog.reflect.canAccessProperty = function (a, b) {
+	try {
+		return goog.reflect.sinkValue(a[b]), !0
+	} catch (c) { }
+	return !1
+};
+goog.reflect.cache = function (a, b, c, d) {
+	d = d ? d(b) : b;
+	return Object.prototype.hasOwnProperty.call(a, d) ? a[d] : a[d] = c(b)
+};
+goog.userAgent = {};
+goog.userAgent.ASSUME_IE = !1;
+goog.userAgent.ASSUME_EDGE = !1;
+goog.userAgent.ASSUME_GECKO = !1;
+goog.userAgent.ASSUME_WEBKIT = !1;
+goog.userAgent.ASSUME_MOBILE_WEBKIT = !1;
+goog.userAgent.ASSUME_OPERA = !1;
+goog.userAgent.ASSUME_ANY_VERSION = !1;
+goog.userAgent.BROWSER_KNOWN_ = goog.userAgent.ASSUME_IE || goog.userAgent.ASSUME_EDGE || goog.userAgent.ASSUME_GECKO || goog.userAgent.ASSUME_MOBILE_WEBKIT || goog.userAgent.ASSUME_WEBKIT || goog.userAgent.ASSUME_OPERA;
+goog.userAgent.getUserAgentString = function () {
+	return goog.labs.userAgent.util.getUserAgent()
+};
+goog.userAgent.getNavigator = function () {
+	return goog.global.navigator || null
+};
+goog.userAgent.OPERA = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_OPERA : goog.labs.userAgent.browser.isOpera();
+goog.userAgent.IE = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_IE : goog.labs.userAgent.browser.isIE();
+goog.userAgent.EDGE = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_EDGE : goog.labs.userAgent.engine.isEdge();
+goog.userAgent.EDGE_OR_IE = goog.userAgent.EDGE || goog.userAgent.IE;
+goog.userAgent.GECKO = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_GECKO : goog.labs.userAgent.engine.isGecko();
+goog.userAgent.WEBKIT = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_WEBKIT || goog.userAgent.ASSUME_MOBILE_WEBKIT : goog.labs.userAgent.engine.isWebKit();
+goog.userAgent.isMobile_ = function () {
+	return goog.userAgent.WEBKIT && goog.labs.userAgent.util.matchUserAgent("Mobile")
+};
+goog.userAgent.MOBILE = goog.userAgent.ASSUME_MOBILE_WEBKIT || goog.userAgent.isMobile_();
+goog.userAgent.SAFARI = goog.userAgent.WEBKIT;
+goog.userAgent.determinePlatform_ = function () {
+	var a = goog.userAgent.getNavigator();
+	return a && a.platform || ""
+};
+goog.userAgent.PLATFORM = goog.userAgent.determinePlatform_();
+goog.userAgent.ASSUME_MAC = !1;
+goog.userAgent.ASSUME_WINDOWS = !1;
+goog.userAgent.ASSUME_LINUX = !1;
+goog.userAgent.ASSUME_X11 = !1;
+goog.userAgent.ASSUME_ANDROID = !1;
+goog.userAgent.ASSUME_IPHONE = !1;
+goog.userAgent.ASSUME_IPAD = !1;
+goog.userAgent.ASSUME_IPOD = !1;
+goog.userAgent.PLATFORM_KNOWN_ = goog.userAgent.ASSUME_MAC || goog.userAgent.ASSUME_WINDOWS || goog.userAgent.ASSUME_LINUX || goog.userAgent.ASSUME_X11 || goog.userAgent.ASSUME_ANDROID || goog.userAgent.ASSUME_IPHONE || goog.userAgent.ASSUME_IPAD || goog.userAgent.ASSUME_IPOD;
+goog.userAgent.MAC = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_MAC : goog.labs.userAgent.platform.isMacintosh();
+goog.userAgent.WINDOWS = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_WINDOWS : goog.labs.userAgent.platform.isWindows();
+goog.userAgent.isLegacyLinux_ = function () {
+	return goog.labs.userAgent.platform.isLinux() || goog.labs.userAgent.platform.isChromeOS()
+};
+goog.userAgent.LINUX = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_LINUX : goog.userAgent.isLegacyLinux_();
+goog.userAgent.isX11_ = function () {
+	var a = goog.userAgent.getNavigator();
+	return !!a && goog.string.contains(a.appVersion || "", "X11")
+};
+goog.userAgent.X11 = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_X11 : goog.userAgent.isX11_();
+goog.userAgent.ANDROID = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_ANDROID : goog.labs.userAgent.platform.isAndroid();
+goog.userAgent.IPHONE = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPHONE : goog.labs.userAgent.platform.isIphone();
+goog.userAgent.IPAD = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPAD : goog.labs.userAgent.platform.isIpad();
+goog.userAgent.IPOD = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPOD : goog.labs.userAgent.platform.isIpod();
+goog.userAgent.IOS = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPHONE || goog.userAgent.ASSUME_IPAD || goog.userAgent.ASSUME_IPOD : goog.labs.userAgent.platform.isIos();
+goog.userAgent.determineVersion_ = function () {
+	var a = "",
+		b = goog.userAgent.getVersionRegexResult_();
+	b && (a = b ? b[1] : "");
+	return goog.userAgent.IE && (b = goog.userAgent.getDocumentMode_(), null != b && b > parseFloat(a)) ? String(b) : a
+};
+goog.userAgent.getVersionRegexResult_ = function () {
+	var a = goog.userAgent.getUserAgentString();
+	if (goog.userAgent.GECKO) return /rv\:([^\);]+)(\)|;)/.exec(a);
+	if (goog.userAgent.EDGE) return /Edge\/([\d\.]+)/.exec(a);
+	if (goog.userAgent.IE) return /\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);
+	if (goog.userAgent.WEBKIT) return /WebKit\/(\S+)/.exec(a);
+	if (goog.userAgent.OPERA) return /(?:Version)[ \/]?(\S+)/.exec(a)
+};
+goog.userAgent.getDocumentMode_ = function () {
+	var a = goog.global.document;
+	return a ? a.documentMode : void 0
+};
+goog.userAgent.VERSION = goog.userAgent.determineVersion_();
+goog.userAgent.compare = function (a, b) {
+	return goog.string.compareVersions(a, b)
+};
+goog.userAgent.isVersionOrHigherCache_ = {};
+goog.userAgent.isVersionOrHigher = function (a) {
+	return goog.userAgent.ASSUME_ANY_VERSION || goog.reflect.cache(goog.userAgent.isVersionOrHigherCache_, a, function () {
+		return 0 <= goog.string.compareVersions(goog.userAgent.VERSION, a)
+	})
+};
+goog.userAgent.isVersion = goog.userAgent.isVersionOrHigher;
+goog.userAgent.isDocumentModeOrHigher = function (a) {
+	return Number(goog.userAgent.DOCUMENT_MODE) >= a
+};
+goog.userAgent.isDocumentMode = goog.userAgent.isDocumentModeOrHigher;
+goog.userAgent.DOCUMENT_MODE = function () {
+	var a = goog.global.document,
+		b = goog.userAgent.getDocumentMode_();
+	if (a && goog.userAgent.IE) return b || ("CSS1Compat" == a.compatMode ? parseInt(goog.userAgent.VERSION, 10) : 5)
+}();
+goog.events = {};
+goog.events.BrowserFeature = {
+	HAS_W3C_BUTTON: !goog.userAgent.IE || goog.userAgent.isDocumentModeOrHigher(9),
+	HAS_W3C_EVENT_SUPPORT: !goog.userAgent.IE || goog.userAgent.isDocumentModeOrHigher(9),
+	SET_KEY_CODE_TO_PREVENT_DEFAULT: goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("9"),
+	HAS_NAVIGATOR_ONLINE_PROPERTY: !goog.userAgent.WEBKIT || goog.userAgent.isVersionOrHigher("528"),
+	HAS_HTML5_NETWORK_EVENT_SUPPORT: goog.userAgent.GECKO && goog.userAgent.isVersionOrHigher("1.9b") || goog.userAgent.IE && goog.userAgent.isVersionOrHigher("8") ||
+		goog.userAgent.OPERA && goog.userAgent.isVersionOrHigher("9.5") || goog.userAgent.WEBKIT && goog.userAgent.isVersionOrHigher("528"),
+	HTML5_NETWORK_EVENTS_FIRE_ON_BODY: goog.userAgent.GECKO && !goog.userAgent.isVersionOrHigher("8") || goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("9"),
+	TOUCH_ENABLED: "ontouchstart" in goog.global || !!(goog.global.document && document.documentElement && "ontouchstart" in document.documentElement) || !(!goog.global.navigator || !goog.global.navigator.msMaxTouchPoints)
+};
+goog.disposable = {};
+goog.disposable.IDisposable = function () { };
+goog.disposable.IDisposable.prototype.dispose = goog.abstractMethod;
+goog.disposable.IDisposable.prototype.isDisposed = goog.abstractMethod;
+goog.Disposable = function () {
+	goog.Disposable.MONITORING_MODE != goog.Disposable.MonitoringMode.OFF && (goog.Disposable.INCLUDE_STACK_ON_CREATION && (this.creationStack = Error().stack), goog.Disposable.instances_[goog.getUid(this)] = this);
+	this.disposed_ = this.disposed_;
+	this.onDisposeCallbacks_ = this.onDisposeCallbacks_
+};
+goog.Disposable.MonitoringMode = {
+	OFF: 0,
+	PERMANENT: 1,
+	INTERACTIVE: 2
+};
+goog.Disposable.MONITORING_MODE = 0;
+goog.Disposable.INCLUDE_STACK_ON_CREATION = !0;
+goog.Disposable.instances_ = {};
+goog.Disposable.getUndisposedObjects = function () {
+	var a = [],
+		b;
+	for (b in goog.Disposable.instances_) goog.Disposable.instances_.hasOwnProperty(b) && a.push(goog.Disposable.instances_[Number(b)]);
+	return a
+};
+goog.Disposable.clearUndisposedObjects = function () {
+	goog.Disposable.instances_ = {}
+};
+goog.Disposable.prototype.disposed_ = !1;
+goog.Disposable.prototype.isDisposed = function () {
+	return this.disposed_
+};
+goog.Disposable.prototype.getDisposed = goog.Disposable.prototype.isDisposed;
+goog.Disposable.prototype.dispose = function () {
+	if (!this.disposed_ && (this.disposed_ = !0, this.disposeInternal(), goog.Disposable.MONITORING_MODE != goog.Disposable.MonitoringMode.OFF)) {
+		var a = goog.getUid(this);
+		if (goog.Disposable.MONITORING_MODE == goog.Disposable.MonitoringMode.PERMANENT && !goog.Disposable.instances_.hasOwnProperty(a)) throw Error(this + " did not call the goog.Disposable base constructor or was disposed of after a clearUndisposedObjects call");
+		delete goog.Disposable.instances_[a]
+	}
+};
+goog.Disposable.prototype.registerDisposable = function (a) {
+	this.addOnDisposeCallback(goog.partial(goog.dispose, a))
+};
+goog.Disposable.prototype.addOnDisposeCallback = function (a, b) {
+	this.disposed_ ? goog.isDef(b) ? a.call(b) : a() : (this.onDisposeCallbacks_ || (this.onDisposeCallbacks_ = []), this.onDisposeCallbacks_.push(goog.isDef(b) ? goog.bind(a, b) : a))
+};
+goog.Disposable.prototype.disposeInternal = function () {
+	if (this.onDisposeCallbacks_)
+		for (; this.onDisposeCallbacks_.length;) this.onDisposeCallbacks_.shift()()
+};
+goog.Disposable.isDisposed = function (a) {
+	return a && "function" == typeof a.isDisposed ? a.isDisposed() : !1
+};
+goog.dispose = function (a) {
+	a && "function" == typeof a.dispose && a.dispose()
+};
+goog.disposeAll = function (a) {
+	for (var b = 0, c = arguments.length; b < c; ++b) {
+		var d = arguments[b];
+		goog.isArrayLike(d) ? goog.disposeAll.apply(null, d) : goog.dispose(d)
+	}
+};
+goog.events.EventId = function (a) {
+	this.id = a
+};
+goog.events.EventId.prototype.toString = function () {
+	return this.id
+};
+goog.events.Event = function (a, b) {
+	this.type = a instanceof goog.events.EventId ? String(a) : a;
+	this.currentTarget = this.target = b;
+	this.defaultPrevented = this.propagationStopped_ = !1;
+	this.returnValue_ = !0
+};
+goog.events.Event.prototype.stopPropagation = function () {
+	this.propagationStopped_ = !0
+};
+goog.events.Event.prototype.preventDefault = function () {
+	this.defaultPrevented = !0;
+	this.returnValue_ = !1
+};
+goog.events.Event.stopPropagation = function (a) {
+	a.stopPropagation()
+};
+goog.events.Event.preventDefault = function (a) {
+	a.preventDefault()
+};
+goog.events.getVendorPrefixedName_ = function (a) {
+	return goog.userAgent.WEBKIT ? "webkit" + a : goog.userAgent.OPERA ? "o" + a.toLowerCase() : a.toLowerCase()
+};
+goog.events.EventType = {
+	CLICK: "click",
+	RIGHTCLICK: "rightclick",
+	DBLCLICK: "dblclick",
+	MOUSEDOWN: "mousedown",
+	MOUSEUP: "mouseup",
+	MOUSEOVER: "mouseover",
+	MOUSEOUT: "mouseout",
+	MOUSEMOVE: "mousemove",
+	MOUSEENTER: "mouseenter",
+	MOUSELEAVE: "mouseleave",
+	SELECTIONCHANGE: "selectionchange",
+	SELECTSTART: "selectstart",
+	WHEEL: "wheel",
+	KEYPRESS: "keypress",
+	KEYDOWN: "keydown",
+	KEYUP: "keyup",
+	BLUR: "blur",
+	FOCUS: "focus",
+	DEACTIVATE: "deactivate",
+	FOCUSIN: goog.userAgent.IE ? "focusin" : "DOMFocusIn",
+	FOCUSOUT: goog.userAgent.IE ? "focusout" : "DOMFocusOut",
+	CHANGE: "change",
+	RESET: "reset",
+	SELECT: "select",
+	SUBMIT: "submit",
+	INPUT: "input",
+	PROPERTYCHANGE: "propertychange",
+	DRAGSTART: "dragstart",
+	DRAG: "drag",
+	DRAGENTER: "dragenter",
+	DRAGOVER: "dragover",
+	DRAGLEAVE: "dragleave",
+	DROP: "drop",
+	DRAGEND: "dragend",
+	TOUCHSTART: "touchstart",
+	TOUCHMOVE: "touchmove",
+	TOUCHEND: "touchend",
+	TOUCHCANCEL: "touchcancel",
+	BEFOREUNLOAD: "beforeunload",
+	CONSOLEMESSAGE: "consolemessage",
+	CONTEXTMENU: "contextmenu",
+	DEVICEORIENTATION: "deviceorientation",
+	DOMCONTENTLOADED: "DOMContentLoaded",
+	ERROR: "error",
+	HELP: "help",
+	LOAD: "load",
+	LOSECAPTURE: "losecapture",
+	ORIENTATIONCHANGE: "orientationchange",
+	READYSTATECHANGE: "readystatechange",
+	RESIZE: "resize",
+	SCROLL: "scroll",
+	UNLOAD: "unload",
+	CANPLAY: "canplay",
+	CANPLAYTHROUGH: "canplaythrough",
+	DURATIONCHANGE: "durationchange",
+	EMPTIED: "emptied",
+	ENDED: "ended",
+	LOADEDDATA: "loadeddata",
+	LOADEDMETADATA: "loadedmetadata",
+	PAUSE: "pause",
+	PLAY: "play",
+	PLAYING: "playing",
+	RATECHANGE: "ratechange",
+	SEEKED: "seeked",
+	SEEKING: "seeking",
+	STALLED: "stalled",
+	SUSPEND: "suspend",
+	TIMEUPDATE: "timeupdate",
+	VOLUMECHANGE: "volumechange",
+	WAITING: "waiting",
+	HASHCHANGE: "hashchange",
+	PAGEHIDE: "pagehide",
+	PAGESHOW: "pageshow",
+	POPSTATE: "popstate",
+	COPY: "copy",
+	PASTE: "paste",
+	CUT: "cut",
+	BEFORECOPY: "beforecopy",
+	BEFORECUT: "beforecut",
+	BEFOREPASTE: "beforepaste",
+	ONLINE: "online",
+	OFFLINE: "offline",
+	MESSAGE: "message",
+	CONNECT: "connect",
+	ANIMATIONSTART: goog.events.getVendorPrefixedName_("AnimationStart"),
+	ANIMATIONEND: goog.events.getVendorPrefixedName_("AnimationEnd"),
+	ANIMATIONITERATION: goog.events.getVendorPrefixedName_("AnimationIteration"),
+	TRANSITIONEND: goog.events.getVendorPrefixedName_("TransitionEnd"),
+	POINTERDOWN: "pointerdown",
+	POINTERUP: "pointerup",
+	POINTERCANCEL: "pointercancel",
+	POINTERMOVE: "pointermove",
+	POINTEROVER: "pointerover",
+	POINTEROUT: "pointerout",
+	POINTERENTER: "pointerenter",
+	POINTERLEAVE: "pointerleave",
+	GOTPOINTERCAPTURE: "gotpointercapture",
+	LOSTPOINTERCAPTURE: "lostpointercapture",
+	MSGESTURECHANGE: "MSGestureChange",
+	MSGESTUREEND: "MSGestureEnd",
+	MSGESTUREHOLD: "MSGestureHold",
+	MSGESTURESTART: "MSGestureStart",
+	MSGESTURETAP: "MSGestureTap",
+	MSGOTPOINTERCAPTURE: "MSGotPointerCapture",
+	MSINERTIASTART: "MSInertiaStart",
+	MSLOSTPOINTERCAPTURE: "MSLostPointerCapture",
+	MSPOINTERCANCEL: "MSPointerCancel",
+	MSPOINTERDOWN: "MSPointerDown",
+	MSPOINTERENTER: "MSPointerEnter",
+	MSPOINTERHOVER: "MSPointerHover",
+	MSPOINTERLEAVE: "MSPointerLeave",
+	MSPOINTERMOVE: "MSPointerMove",
+	MSPOINTEROUT: "MSPointerOut",
+	MSPOINTEROVER: "MSPointerOver",
+	MSPOINTERUP: "MSPointerUp",
+	TEXT: "text",
+	TEXTINPUT: "textInput",
+	COMPOSITIONSTART: "compositionstart",
+	COMPOSITIONUPDATE: "compositionupdate",
+	COMPOSITIONEND: "compositionend",
+	EXIT: "exit",
+	LOADABORT: "loadabort",
+	LOADCOMMIT: "loadcommit",
+	LOADREDIRECT: "loadredirect",
+	LOADSTART: "loadstart",
+	LOADSTOP: "loadstop",
+	RESPONSIVE: "responsive",
+	SIZECHANGED: "sizechanged",
+	UNRESPONSIVE: "unresponsive",
+	VISIBILITYCHANGE: "visibilitychange",
+	STORAGE: "storage",
+	DOMSUBTREEMODIFIED: "DOMSubtreeModified",
+	DOMNODEINSERTED: "DOMNodeInserted",
+	DOMNODEREMOVED: "DOMNodeRemoved",
+	DOMNODEREMOVEDFROMDOCUMENT: "DOMNodeRemovedFromDocument",
+	DOMNODEINSERTEDINTODOCUMENT: "DOMNodeInsertedIntoDocument",
+	DOMATTRMODIFIED: "DOMAttrModified",
+	DOMCHARACTERDATAMODIFIED: "DOMCharacterDataModified",
+	BEFOREPRINT: "beforeprint",
+	AFTERPRINT: "afterprint"
+};
+goog.events.BrowserEvent = function (a, b) {
+	goog.events.Event.call(this, a ? a.type : "");
+	this.relatedTarget = this.currentTarget = this.target = null;
+	this.charCode = this.keyCode = this.button = this.screenY = this.screenX = this.clientY = this.clientX = this.offsetY = this.offsetX = 0;
+	this.metaKey = this.shiftKey = this.altKey = this.ctrlKey = !1;
+	this.state = null;
+	this.platformModifierKey = !1;
+	this.event_ = null;
+	a && this.init(a, b)
+};
+goog.inherits(goog.events.BrowserEvent, goog.events.Event);
+goog.events.BrowserEvent.MouseButton = {
+	LEFT: 0,
+	MIDDLE: 1,
+	RIGHT: 2
+};
+goog.events.BrowserEvent.IEButtonMap = [1, 4, 2];
+goog.events.BrowserEvent.prototype.init = function (a, b) {
+	var c = this.type = a.type,
+		d = a.changedTouches ? a.changedTouches[0] : null;
+	this.target = a.target || a.srcElement;
+	this.currentTarget = b;
+	var e = a.relatedTarget;
+	e ? goog.userAgent.GECKO && (goog.reflect.canAccessProperty(e, "nodeName") || (e = null)) : c == goog.events.EventType.MOUSEOVER ? e = a.fromElement : c == goog.events.EventType.MOUSEOUT && (e = a.toElement);
+	this.relatedTarget = e;
+	goog.isNull(d) ? (this.offsetX = goog.userAgent.WEBKIT || void 0 !== a.offsetX ? a.offsetX : a.layerX, this.offsetY =
+		goog.userAgent.WEBKIT || void 0 !== a.offsetY ? a.offsetY : a.layerY, this.clientX = void 0 !== a.clientX ? a.clientX : a.pageX, this.clientY = void 0 !== a.clientY ? a.clientY : a.pageY, this.screenX = a.screenX || 0, this.screenY = a.screenY || 0) : (this.clientX = void 0 !== d.clientX ? d.clientX : d.pageX, this.clientY = void 0 !== d.clientY ? d.clientY : d.pageY, this.screenX = d.screenX || 0, this.screenY = d.screenY || 0);
+	this.button = a.button;
+	this.keyCode = a.keyCode || 0;
+	this.charCode = a.charCode || ("keypress" == c ? a.keyCode : 0);
+	this.ctrlKey = a.ctrlKey;
+	this.altKey =
+		a.altKey;
+	this.shiftKey = a.shiftKey;
+	this.metaKey = a.metaKey;
+	this.platformModifierKey = goog.userAgent.MAC ? a.metaKey : a.ctrlKey;
+	this.state = a.state;
+	this.event_ = a;
+	a.defaultPrevented && this.preventDefault()
+};
+goog.events.BrowserEvent.prototype.isButton = function (a) {
+	return goog.events.BrowserFeature.HAS_W3C_BUTTON ? this.event_.button == a : "click" == this.type ? a == goog.events.BrowserEvent.MouseButton.LEFT : !!(this.event_.button & goog.events.BrowserEvent.IEButtonMap[a])
+};
+goog.events.BrowserEvent.prototype.isMouseActionButton = function () {
+	return this.isButton(goog.events.BrowserEvent.MouseButton.LEFT) && !(goog.userAgent.WEBKIT && goog.userAgent.MAC && this.ctrlKey)
+};
+goog.events.BrowserEvent.prototype.stopPropagation = function () {
+	goog.events.BrowserEvent.superClass_.stopPropagation.call(this);
+	this.event_.stopPropagation ? this.event_.stopPropagation() : this.event_.cancelBubble = !0
+};
+goog.events.BrowserEvent.prototype.preventDefault = function () {
+	goog.events.BrowserEvent.superClass_.preventDefault.call(this);
+	var a = this.event_;
+	if (a.preventDefault) a.preventDefault();
+	else if (a.returnValue = !1, goog.events.BrowserFeature.SET_KEY_CODE_TO_PREVENT_DEFAULT) try {
+		if (a.ctrlKey || 112 <= a.keyCode && 123 >= a.keyCode) a.keyCode = -1
+	} catch (b) { }
+};
+goog.events.BrowserEvent.prototype.getBrowserEvent = function () {
+	return this.event_
+};
+goog.events.Listenable = function () { };
+goog.events.Listenable.IMPLEMENTED_BY_PROP = "closure_listenable_" + (1E6 * Math.random() | 0);
+goog.events.Listenable.addImplementation = function (a) {
+	a.prototype[goog.events.Listenable.IMPLEMENTED_BY_PROP] = !0
+};
+goog.events.Listenable.isImplementedBy = function (a) {
+	return !(!a || !a[goog.events.Listenable.IMPLEMENTED_BY_PROP])
+};
+goog.events.ListenableKey = function () { };
+goog.events.ListenableKey.counter_ = 0;
+goog.events.ListenableKey.reserveKey = function () {
+	return ++goog.events.ListenableKey.counter_
+};
+goog.events.Listener = function (a, b, c, d, e, f) {
+	goog.events.Listener.ENABLE_MONITORING && (this.creationStack = Error().stack);
+	this.listener = a;
+	this.proxy = b;
+	this.src = c;
+	this.type = d;
+	this.capture = !!e;
+	this.handler = f;
+	this.key = goog.events.ListenableKey.reserveKey();
+	this.removed = this.callOnce = !1
+};
+goog.events.Listener.ENABLE_MONITORING = !1;
+goog.events.Listener.prototype.markAsRemoved = function () {
+	this.removed = !0;
+	this.handler = this.src = this.proxy = this.listener = null
+};
+goog.events.ListenerMap = function (a) {
+	this.src = a;
+	this.listeners = {};
+	this.typeCount_ = 0
+};
+goog.events.ListenerMap.prototype.getTypeCount = function () {
+	return this.typeCount_
+};
+goog.events.ListenerMap.prototype.getListenerCount = function () {
+	var a = 0,
+		b;
+	for (b in this.listeners) a += this.listeners[b].length;
+	return a
+};
+goog.events.ListenerMap.prototype.add = function (a, b, c, d, e) {
+	var f = a.toString();
+	a = this.listeners[f];
+	a || (a = this.listeners[f] = [], this.typeCount_++);
+	var g = goog.events.ListenerMap.findListenerIndex_(a, b, d, e); -1 < g ? (b = a[g], c || (b.callOnce = !1)) : (b = new goog.events.Listener(b, null, this.src, f, !!d, e), b.callOnce = c, a.push(b));
+	return b
+};
+goog.events.ListenerMap.prototype.remove = function (a, b, c, d) {
+	a = a.toString();
+	if (!(a in this.listeners)) return !1;
+	var e = this.listeners[a];
+	b = goog.events.ListenerMap.findListenerIndex_(e, b, c, d);
+	return -1 < b ? (e[b].markAsRemoved(), goog.array.removeAt(e, b), 0 == e.length && (delete this.listeners[a], this.typeCount_--), !0) : !1
+};
+goog.events.ListenerMap.prototype.removeByKey = function (a) {
+	var b = a.type;
+	if (!(b in this.listeners)) return !1;
+	var c = goog.array.remove(this.listeners[b], a);
+	c && (a.markAsRemoved(), 0 == this.listeners[b].length && (delete this.listeners[b], this.typeCount_--));
+	return c
+};
+goog.events.ListenerMap.prototype.removeAll = function (a) {
+	a = a && a.toString();
+	var b = 0,
+		c;
+	for (c in this.listeners)
+		if (!a || c == a) {
+			for (var d = this.listeners[c], e = 0; e < d.length; e++)++b, d[e].markAsRemoved();
+			delete this.listeners[c];
+			this.typeCount_--
+		}
+	return b
+};
+goog.events.ListenerMap.prototype.getListeners = function (a, b) {
+	var c = this.listeners[a.toString()],
+		d = [];
+	if (c)
+		for (var e = 0; e < c.length; ++e) {
+			var f = c[e];
+			f.capture == b && d.push(f)
+		}
+	return d
+};
+goog.events.ListenerMap.prototype.getListener = function (a, b, c, d) {
+	a = this.listeners[a.toString()];
+	var e = -1;
+	a && (e = goog.events.ListenerMap.findListenerIndex_(a, b, c, d));
+	return -1 < e ? a[e] : null
+};
+goog.events.ListenerMap.prototype.hasListener = function (a, b) {
+	var c = goog.isDef(a),
+		d = c ? a.toString() : "",
+		e = goog.isDef(b);
+	return goog.object.some(this.listeners, function (a, g) {
+		for (var f = 0; f < a.length; ++f)
+			if (!(c && a[f].type != d || e && a[f].capture != b)) return !0;
+		return !1
+	})
+};
+goog.events.ListenerMap.findListenerIndex_ = function (a, b, c, d) {
+	for (var e = 0; e < a.length; ++e) {
+		var f = a[e];
+		if (!f.removed && f.listener == b && f.capture == !!c && f.handler == d) return e
+	}
+	return -1
+};
+goog.events.LISTENER_MAP_PROP_ = "closure_lm_" + (1E6 * Math.random() | 0);
+goog.events.onString_ = "on";
+goog.events.onStringMap_ = {};
+goog.events.CaptureSimulationMode = {
+	OFF_AND_FAIL: 0,
+	OFF_AND_SILENT: 1,
+	ON: 2
+};
+goog.events.CAPTURE_SIMULATION_MODE = 2;
+goog.events.listenerCountEstimate_ = 0;
+goog.events.listen = function (a, b, c, d, e) {
+	if (goog.isArray(b)) {
+		for (var f = 0; f < b.length; f++) goog.events.listen(a, b[f], c, d, e);
+		return null
+	}
+	c = goog.events.wrapListener(c);
+	return goog.events.Listenable.isImplementedBy(a) ? a.listen(b, c, d, e) : goog.events.listen_(a, b, c, !1, d, e)
+};
+goog.events.listen_ = function (a, b, c, d, e, f) {
+	if (!b) throw Error("Invalid event type");
+	var g = !!e;
+	if (g && !goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT) {
+		if (goog.events.CAPTURE_SIMULATION_MODE == goog.events.CaptureSimulationMode.OFF_AND_FAIL) return goog.asserts.fail("Can not register capture listener in IE8-."), null;
+		if (goog.events.CAPTURE_SIMULATION_MODE == goog.events.CaptureSimulationMode.OFF_AND_SILENT) return null
+	}
+	var h = goog.events.getListenerMap_(a);
+	h || (a[goog.events.LISTENER_MAP_PROP_] = h = new goog.events.ListenerMap(a));
+	c = h.add(b, c, d, e, f);
+	if (c.proxy) return c;
+	d = goog.events.getProxy();
+	c.proxy = d;
+	d.src = a;
+	d.listener = c;
+	if (a.addEventListener) a.addEventListener(b.toString(), d, g);
+	else if (a.attachEvent) a.attachEvent(goog.events.getOnString_(b.toString()), d);
+	else throw Error("addEventListener and attachEvent are unavailable.");
+	goog.events.listenerCountEstimate_++;
+	return c
+};
+goog.events.getProxy = function () {
+	var a = goog.events.handleBrowserEvent_,
+		b = goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT ? function (c) {
+        	return a.call(b.src, b.listener, c)
+		} : function (c) {
+        	c = a.call(b.src, b.listener, c);
+        	if (!c) return c
+		};
+	return b
+};
+goog.events.listenOnce = function (a, b, c, d, e) {
+	if (goog.isArray(b)) {
+		for (var f = 0; f < b.length; f++) goog.events.listenOnce(a, b[f], c, d, e);
+		return null
+	}
+	c = goog.events.wrapListener(c);
+	return goog.events.Listenable.isImplementedBy(a) ? a.listenOnce(b, c, d, e) : goog.events.listen_(a, b, c, !0, d, e)
+};
+goog.events.listenWithWrapper = function (a, b, c, d, e) {
+	b.listen(a, c, d, e)
+};
+goog.events.unlisten = function (a, b, c, d, e) {
+	if (goog.isArray(b)) {
+		for (var f = 0; f < b.length; f++) goog.events.unlisten(a, b[f], c, d, e);
+		return null
+	}
+	c = goog.events.wrapListener(c);
+	if (goog.events.Listenable.isImplementedBy(a)) return a.unlisten(b, c, d, e);
+	if (!a) return !1;
+	d = !!d;
+	if (a = goog.events.getListenerMap_(a))
+		if (b = a.getListener(b, c, d, e)) return goog.events.unlistenByKey(b);
+	return !1
+};
+goog.events.unlistenByKey = function (a) {
+	if (goog.isNumber(a) || !a || a.removed) return !1;
+	var b = a.src;
+	if (goog.events.Listenable.isImplementedBy(b)) return b.unlistenByKey(a);
+	var c = a.type,
+		d = a.proxy;
+	b.removeEventListener ? b.removeEventListener(c, d, a.capture) : b.detachEvent && b.detachEvent(goog.events.getOnString_(c), d);
+	goog.events.listenerCountEstimate_--;
+	(c = goog.events.getListenerMap_(b)) ? (c.removeByKey(a), 0 == c.getTypeCount() && (c.src = null, b[goog.events.LISTENER_MAP_PROP_] = null)) : a.markAsRemoved();
+	return !0
+};
+goog.events.unlistenWithWrapper = function (a, b, c, d, e) {
+	b.unlisten(a, c, d, e)
+};
+goog.events.removeAll = function (a, b) {
+	if (!a) return 0;
+	if (goog.events.Listenable.isImplementedBy(a)) return a.removeAllListeners(b);
+	var c = goog.events.getListenerMap_(a);
+	if (!c) return 0;
+	var d = 0,
+		e = b && b.toString(),
+		f;
+	for (f in c.listeners)
+		if (!e || f == e)
+			for (var g = c.listeners[f].concat(), h = 0; h < g.length; ++h) goog.events.unlistenByKey(g[h]) && ++d;
+	return d
+};
+goog.events.getListeners = function (a, b, c) {
+	return goog.events.Listenable.isImplementedBy(a) ? a.getListeners(b, c) : a ? (a = goog.events.getListenerMap_(a)) ? a.getListeners(b, c) : [] : []
+};
+goog.events.getListener = function (a, b, c, d, e) {
+	c = goog.events.wrapListener(c);
+	d = !!d;
+	return goog.events.Listenable.isImplementedBy(a) ? a.getListener(b, c, d, e) : a ? (a = goog.events.getListenerMap_(a)) ? a.getListener(b, c, d, e) : null : null
+};
+goog.events.hasListener = function (a, b, c) {
+	if (goog.events.Listenable.isImplementedBy(a)) return a.hasListener(b, c);
+	a = goog.events.getListenerMap_(a);
+	return !!a && a.hasListener(b, c)
+};
+goog.events.expose = function (a) {
+	var b = [],
+		c;
+	for (c in a) a[c] && a[c].id ? b.push(c + " = " + a[c] + " (" + a[c].id + ")") : b.push(c + " = " + a[c]);
+	return b.join("\n")
+};
+goog.events.getOnString_ = function (a) {
+	return a in goog.events.onStringMap_ ? goog.events.onStringMap_[a] : goog.events.onStringMap_[a] = goog.events.onString_ + a
+};
+goog.events.fireListeners = function (a, b, c, d) {
+	return goog.events.Listenable.isImplementedBy(a) ? a.fireListeners(b, c, d) : goog.events.fireListeners_(a, b, c, d)
+};
+goog.events.fireListeners_ = function (a, b, c, d) {
+	var e = !0;
+	if (a = goog.events.getListenerMap_(a))
+		if (b = a.listeners[b.toString()])
+			for (b = b.concat(), a = 0; a < b.length; a++) {
+				var f = b[a];
+				f && f.capture == c && !f.removed && (f = goog.events.fireListener(f, d), e = e && !1 !== f)
+			}
+	return e
+};
+goog.events.fireListener = function (a, b) {
+	var c = a.listener,
+		d = a.handler || a.src;
+	a.callOnce && goog.events.unlistenByKey(a);
+	return c.call(d, b)
+};
+goog.events.getTotalListenerCount = function () {
+	return goog.events.listenerCountEstimate_
+};
+goog.events.dispatchEvent = function (a, b) {
+	goog.asserts.assert(goog.events.Listenable.isImplementedBy(a), "Can not use goog.events.dispatchEvent with non-goog.events.Listenable instance.");
+	return a.dispatchEvent(b)
+};
+goog.events.protectBrowserEventEntryPoint = function (a) {
+	goog.events.handleBrowserEvent_ = a.protectEntryPoint(goog.events.handleBrowserEvent_)
+};
+goog.events.handleBrowserEvent_ = function (a, b) {
+	if (a.removed) return !0;
+	if (!goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT) {
+		var c = b || goog.getObjectByName("window.event"),
+			d = new goog.events.BrowserEvent(c, this),
+			e = !0;
+		if (goog.events.CAPTURE_SIMULATION_MODE == goog.events.CaptureSimulationMode.ON) {
+			if (!goog.events.isMarkedIeEvent_(c)) {
+				goog.events.markIeEvent_(c);
+				for (var c = [], f = d.currentTarget; f; f = f.parentNode) c.push(f);
+				for (var f = a.type, g = c.length - 1; !d.propagationStopped_ && 0 <= g; g--) {
+					d.currentTarget = c[g];
+					var h =
+						goog.events.fireListeners_(c[g], f, !0, d),
+						e = e && h
+				}
+				for (g = 0; !d.propagationStopped_ && g < c.length; g++) d.currentTarget = c[g], h = goog.events.fireListeners_(c[g], f, !1, d), e = e && h
+			}
+		} else e = goog.events.fireListener(a, d);
+		return e
+	}
+	return goog.events.fireListener(a, new goog.events.BrowserEvent(b, this))
+};
+goog.events.markIeEvent_ = function (a) {
+	var b = !1;
+	if (0 == a.keyCode) try {
+		a.keyCode = -1;
+		return
+	} catch (c) {
+		b = !0
+	}
+	if (b || void 0 == a.returnValue) a.returnValue = !0
+};
+goog.events.isMarkedIeEvent_ = function (a) {
+	return 0 > a.keyCode || void 0 != a.returnValue
+};
+goog.events.uniqueIdCounter_ = 0;
+goog.events.getUniqueId = function (a) {
+	return a + "_" + goog.events.uniqueIdCounter_++
+};
+goog.events.getListenerMap_ = function (a) {
+	a = a[goog.events.LISTENER_MAP_PROP_];
+	return a instanceof goog.events.ListenerMap ? a : null
+};
+goog.events.LISTENER_WRAPPER_PROP_ = "__closure_events_fn_" + (1E9 * Math.random() >>> 0);
+goog.events.wrapListener = function (a) {
+	goog.asserts.assert(a, "Listener can not be null.");
+	if (goog.isFunction(a)) return a;
+	goog.asserts.assert(a.handleEvent, "An object listener must have handleEvent method.");
+	a[goog.events.LISTENER_WRAPPER_PROP_] || (a[goog.events.LISTENER_WRAPPER_PROP_] = function (b) {
+		return a.handleEvent(b)
+	});
+	return a[goog.events.LISTENER_WRAPPER_PROP_]
+};
+goog.debug.entryPointRegistry.register(function (a) {
+	goog.events.handleBrowserEvent_ = a(goog.events.handleBrowserEvent_)
+});
+goog.math = {};
+goog.math.randomInt = function (a) {
+	return Math.floor(Math.random() * a)
+};
+goog.math.uniformRandom = function (a, b) {
+	return a + Math.random() * (b - a)
+};
+goog.math.clamp = function (a, b, c) {
+	return Math.min(Math.max(a, b), c)
+};
+goog.math.modulo = function (a, b) {
+	var c = a % b;
+	return 0 > c * b ? c + b : c
+};
+goog.math.lerp = function (a, b, c) {
+	return a + c * (b - a)
+};
+goog.math.nearlyEquals = function (a, b, c) {
+	return Math.abs(a - b) <= (c || 1E-6)
+};
+goog.math.standardAngle = function (a) {
+	return goog.math.modulo(a, 360)
+};
+goog.math.standardAngleInRadians = function (a) {
+	return goog.math.modulo(a, 2 * Math.PI)
+};
+goog.math.toRadians = function (a) {
+	return a * Math.PI / 180
+};
+goog.math.toDegrees = function (a) {
+	return 180 * a / Math.PI
+};
+goog.math.angleDx = function (a, b) {
+	return b * Math.cos(goog.math.toRadians(a))
+};
+goog.math.angleDy = function (a, b) {
+	return b * Math.sin(goog.math.toRadians(a))
+};
+goog.math.angle = function (a, b, c, d) {
+	return goog.math.standardAngle(goog.math.toDegrees(Math.atan2(d - b, c - a)))
+};
+goog.math.angleDifference = function (a, b) {
+	var c = goog.math.standardAngle(b) - goog.math.standardAngle(a);
+	180 < c ? c -= 360 : -180 >= c && (c = 360 + c);
+	return c
+};
+goog.math.sign = function (a) {
+	return 0 < a ? 1 : 0 > a ? -1 : a
+};
+goog.math.longestCommonSubsequence = function (a, b, c, d) {
+	c = c || function (a, b) {
+		return a == b
+	};
+	d = d || function (b, c) {
+		return a[b]
+	};
+	for (var e = a.length, f = b.length, g = [], h = 0; h < e + 1; h++) g[h] = [], g[h][0] = 0;
+	for (var k = 0; k < f + 1; k++) g[0][k] = 0;
+	for (h = 1; h <= e; h++)
+		for (k = 1; k <= f; k++) c(a[h - 1], b[k - 1]) ? g[h][k] = g[h - 1][k - 1] + 1 : g[h][k] = Math.max(g[h - 1][k], g[h][k - 1]);
+	for (var m = [], h = e, k = f; 0 < h && 0 < k;) c(a[h - 1], b[k - 1]) ? (m.unshift(d(h - 1, k - 1)), h--, k--) : g[h - 1][k] > g[h][k - 1] ? h-- : k--;
+	return m
+};
+goog.math.sum = function (a) {
+	return goog.array.reduce(arguments, function (a, c) {
+		return a + c
+	}, 0)
+};
+goog.math.average = function (a) {
+	return goog.math.sum.apply(null, arguments) / arguments.length
+};
+goog.math.sampleVariance = function (a) {
+	var b = arguments.length;
+	if (2 > b) return 0;
+	var c = goog.math.average.apply(null, arguments);
+	return goog.math.sum.apply(null, goog.array.map(arguments, function (a) {
+		return Math.pow(a - c, 2)
+	})) / (b - 1)
+};
+goog.math.standardDeviation = function (a) {
+	return Math.sqrt(goog.math.sampleVariance.apply(null, arguments))
+};
+goog.math.isInt = function (a) {
+	return isFinite(a) && 0 == a % 1
+};
+goog.math.isFiniteNumber = function (a) {
+	return isFinite(a) && !isNaN(a)
+};
+goog.math.isNegativeZero = function (a) {
+	return 0 == a && 0 > 1 / a
+};
+goog.math.log10Floor = function (a) {
+	if (0 < a) {
+		var b = Math.round(Math.log(a) * Math.LOG10E);
+		return b - (parseFloat("1e" + b) > a ? 1 : 0)
+	}
+	return 0 == a ? -Infinity : NaN
+};
+goog.math.safeFloor = function (a, b) {
+	goog.asserts.assert(!goog.isDef(b) || 0 < b);
+	return Math.floor(a + (b || 2E-15))
+};
+goog.math.safeCeil = function (a, b) {
+	goog.asserts.assert(!goog.isDef(b) || 0 < b);
+	return Math.ceil(a - (b || 2E-15))
+};
+goog.dom.BrowserFeature = {
+	CAN_ADD_NAME_OR_TYPE_ATTRIBUTES: !goog.userAgent.IE || goog.userAgent.isDocumentModeOrHigher(9),
+	CAN_USE_CHILDREN_ATTRIBUTE: !goog.userAgent.GECKO && !goog.userAgent.IE || goog.userAgent.IE && goog.userAgent.isDocumentModeOrHigher(9) || goog.userAgent.GECKO && goog.userAgent.isVersionOrHigher("1.9.1"),
+	CAN_USE_INNER_TEXT: goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("9"),
+	CAN_USE_PARENT_ELEMENT_PROPERTY: goog.userAgent.IE || goog.userAgent.OPERA || goog.userAgent.WEBKIT,
+	INNER_HTML_NEEDS_SCOPED_ELEMENT: goog.userAgent.IE,
+	LEGACY_IE_RANGES: goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(9)
+};
+goog.dom.TagName = function (a) {
+	this.tagName_ = a
+};
+goog.dom.TagName.prototype.toString = function () {
+	return this.tagName_
+};
+goog.dom.TagName.A = new goog.dom.TagName("A");
+goog.dom.TagName.ABBR = new goog.dom.TagName("ABBR");
+goog.dom.TagName.ACRONYM = new goog.dom.TagName("ACRONYM");
+goog.dom.TagName.ADDRESS = new goog.dom.TagName("ADDRESS");
+goog.dom.TagName.APPLET = new goog.dom.TagName("APPLET");
+goog.dom.TagName.AREA = new goog.dom.TagName("AREA");
+goog.dom.TagName.ARTICLE = new goog.dom.TagName("ARTICLE");
+goog.dom.TagName.ASIDE = new goog.dom.TagName("ASIDE");
+goog.dom.TagName.AUDIO = new goog.dom.TagName("AUDIO");
+goog.dom.TagName.B = new goog.dom.TagName("B");
+goog.dom.TagName.BASE = new goog.dom.TagName("BASE");
+goog.dom.TagName.BASEFONT = new goog.dom.TagName("BASEFONT");
+goog.dom.TagName.BDI = new goog.dom.TagName("BDI");
+goog.dom.TagName.BDO = new goog.dom.TagName("BDO");
+goog.dom.TagName.BIG = new goog.dom.TagName("BIG");
+goog.dom.TagName.BLOCKQUOTE = new goog.dom.TagName("BLOCKQUOTE");
+goog.dom.TagName.BODY = new goog.dom.TagName("BODY");
+goog.dom.TagName.BR = new goog.dom.TagName("BR");
+goog.dom.TagName.BUTTON = new goog.dom.TagName("BUTTON");
+goog.dom.TagName.CANVAS = new goog.dom.TagName("CANVAS");
+goog.dom.TagName.CAPTION = new goog.dom.TagName("CAPTION");
+goog.dom.TagName.CENTER = new goog.dom.TagName("CENTER");
+goog.dom.TagName.CITE = new goog.dom.TagName("CITE");
+goog.dom.TagName.CODE = new goog.dom.TagName("CODE");
+goog.dom.TagName.COL = new goog.dom.TagName("COL");
+goog.dom.TagName.COLGROUP = new goog.dom.TagName("COLGROUP");
+goog.dom.TagName.COMMAND = new goog.dom.TagName("COMMAND");
+goog.dom.TagName.DATA = new goog.dom.TagName("DATA");
+goog.dom.TagName.DATALIST = new goog.dom.TagName("DATALIST");
+goog.dom.TagName.DD = new goog.dom.TagName("DD");
+goog.dom.TagName.DEL = new goog.dom.TagName("DEL");
+goog.dom.TagName.DETAILS = new goog.dom.TagName("DETAILS");
+goog.dom.TagName.DFN = new goog.dom.TagName("DFN");
+goog.dom.TagName.DIALOG = new goog.dom.TagName("DIALOG");
+goog.dom.TagName.DIR = new goog.dom.TagName("DIR");
+goog.dom.TagName.DIV = new goog.dom.TagName("DIV");
+goog.dom.TagName.DL = new goog.dom.TagName("DL");
+goog.dom.TagName.DT = new goog.dom.TagName("DT");
+goog.dom.TagName.EM = new goog.dom.TagName("EM");
+goog.dom.TagName.EMBED = new goog.dom.TagName("EMBED");
+goog.dom.TagName.FIELDSET = new goog.dom.TagName("FIELDSET");
+goog.dom.TagName.FIGCAPTION = new goog.dom.TagName("FIGCAPTION");
+goog.dom.TagName.FIGURE = new goog.dom.TagName("FIGURE");
+goog.dom.TagName.FONT = new goog.dom.TagName("FONT");
+goog.dom.TagName.FOOTER = new goog.dom.TagName("FOOTER");
+goog.dom.TagName.FORM = new goog.dom.TagName("FORM");
+goog.dom.TagName.FRAME = new goog.dom.TagName("FRAME");
+goog.dom.TagName.FRAMESET = new goog.dom.TagName("FRAMESET");
+goog.dom.TagName.H1 = new goog.dom.TagName("H1");
+goog.dom.TagName.H2 = new goog.dom.TagName("H2");
+goog.dom.TagName.H3 = new goog.dom.TagName("H3");
+goog.dom.TagName.H4 = new goog.dom.TagName("H4");
+goog.dom.TagName.H5 = new goog.dom.TagName("H5");
+goog.dom.TagName.H6 = new goog.dom.TagName("H6");
+goog.dom.TagName.HEAD = new goog.dom.TagName("HEAD");
+goog.dom.TagName.HEADER = new goog.dom.TagName("HEADER");
+goog.dom.TagName.HGROUP = new goog.dom.TagName("HGROUP");
+goog.dom.TagName.HR = new goog.dom.TagName("HR");
+goog.dom.TagName.HTML = new goog.dom.TagName("HTML");
+goog.dom.TagName.I = new goog.dom.TagName("I");
+goog.dom.TagName.IFRAME = new goog.dom.TagName("IFRAME");
+goog.dom.TagName.IMG = new goog.dom.TagName("IMG");
+goog.dom.TagName.INPUT = new goog.dom.TagName("INPUT");
+goog.dom.TagName.INS = new goog.dom.TagName("INS");
+goog.dom.TagName.ISINDEX = new goog.dom.TagName("ISINDEX");
+goog.dom.TagName.KBD = new goog.dom.TagName("KBD");
+goog.dom.TagName.KEYGEN = new goog.dom.TagName("KEYGEN");
+goog.dom.TagName.LABEL = new goog.dom.TagName("LABEL");
+goog.dom.TagName.LEGEND = new goog.dom.TagName("LEGEND");
+goog.dom.TagName.LI = new goog.dom.TagName("LI");
+goog.dom.TagName.LINK = new goog.dom.TagName("LINK");
+goog.dom.TagName.MAP = new goog.dom.TagName("MAP");
+goog.dom.TagName.MARK = new goog.dom.TagName("MARK");
+goog.dom.TagName.MATH = new goog.dom.TagName("MATH");
+goog.dom.TagName.MENU = new goog.dom.TagName("MENU");
+goog.dom.TagName.META = new goog.dom.TagName("META");
+goog.dom.TagName.METER = new goog.dom.TagName("METER");
+goog.dom.TagName.NAV = new goog.dom.TagName("NAV");
+goog.dom.TagName.NOFRAMES = new goog.dom.TagName("NOFRAMES");
+goog.dom.TagName.NOSCRIPT = new goog.dom.TagName("NOSCRIPT");
+goog.dom.TagName.OBJECT = new goog.dom.TagName("OBJECT");
+goog.dom.TagName.OL = new goog.dom.TagName("OL");
+goog.dom.TagName.OPTGROUP = new goog.dom.TagName("OPTGROUP");
+goog.dom.TagName.OPTION = new goog.dom.TagName("OPTION");
+goog.dom.TagName.OUTPUT = new goog.dom.TagName("OUTPUT");
+goog.dom.TagName.P = new goog.dom.TagName("P");
+goog.dom.TagName.PARAM = new goog.dom.TagName("PARAM");
+goog.dom.TagName.PRE = new goog.dom.TagName("PRE");
+goog.dom.TagName.PROGRESS = new goog.dom.TagName("PROGRESS");
+goog.dom.TagName.Q = new goog.dom.TagName("Q");
+goog.dom.TagName.RP = new goog.dom.TagName("RP");
+goog.dom.TagName.RT = new goog.dom.TagName("RT");
+goog.dom.TagName.RUBY = new goog.dom.TagName("RUBY");
+goog.dom.TagName.S = new goog.dom.TagName("S");
+goog.dom.TagName.SAMP = new goog.dom.TagName("SAMP");
+goog.dom.TagName.SCRIPT = new goog.dom.TagName("SCRIPT");
+goog.dom.TagName.SECTION = new goog.dom.TagName("SECTION");
+goog.dom.TagName.SELECT = new goog.dom.TagName("SELECT");
+goog.dom.TagName.SMALL = new goog.dom.TagName("SMALL");
+goog.dom.TagName.SOURCE = new goog.dom.TagName("SOURCE");
+goog.dom.TagName.SPAN = new goog.dom.TagName("SPAN");
+goog.dom.TagName.STRIKE = new goog.dom.TagName("STRIKE");
+goog.dom.TagName.STRONG = new goog.dom.TagName("STRONG");
+goog.dom.TagName.STYLE = new goog.dom.TagName("STYLE");
+goog.dom.TagName.SUB = new goog.dom.TagName("SUB");
+goog.dom.TagName.SUMMARY = new goog.dom.TagName("SUMMARY");
+goog.dom.TagName.SUP = new goog.dom.TagName("SUP");
+goog.dom.TagName.SVG = new goog.dom.TagName("SVG");
+goog.dom.TagName.TABLE = new goog.dom.TagName("TABLE");
+goog.dom.TagName.TBODY = new goog.dom.TagName("TBODY");
+goog.dom.TagName.TD = new goog.dom.TagName("TD");
+goog.dom.TagName.TEMPLATE = new goog.dom.TagName("TEMPLATE");
+goog.dom.TagName.TEXTAREA = new goog.dom.TagName("TEXTAREA");
+goog.dom.TagName.TFOOT = new goog.dom.TagName("TFOOT");
+goog.dom.TagName.TH = new goog.dom.TagName("TH");
+goog.dom.TagName.THEAD = new goog.dom.TagName("THEAD");
+goog.dom.TagName.TIME = new goog.dom.TagName("TIME");
+goog.dom.TagName.TITLE = new goog.dom.TagName("TITLE");
+goog.dom.TagName.TR = new goog.dom.TagName("TR");
+goog.dom.TagName.TRACK = new goog.dom.TagName("TRACK");
+goog.dom.TagName.TT = new goog.dom.TagName("TT");
+goog.dom.TagName.U = new goog.dom.TagName("U");
+goog.dom.TagName.UL = new goog.dom.TagName("UL");
+goog.dom.TagName.VAR = new goog.dom.TagName("VAR");
+goog.dom.TagName.VIDEO = new goog.dom.TagName("VIDEO");
+goog.dom.TagName.WBR = new goog.dom.TagName("WBR");
+goog.dom.tags = {};
+goog.dom.tags.VOID_TAGS_ = {
+	area: !0,
+	base: !0,
+	br: !0,
+	col: !0,
+	command: !0,
+	embed: !0,
+	hr: !0,
+	img: !0,
+	input: !0,
+	keygen: !0,
+	link: !0,
+	meta: !0,
+	param: !0,
+	source: !0,
+	track: !0,
+	wbr: !0
+};
+goog.dom.tags.isVoidTag = function (a) {
+	return !0 === goog.dom.tags.VOID_TAGS_[a]
+};
+goog.string.TypedString = function () { };
+goog.string.Const = function () {
+	this.stringConstValueWithSecurityContract__googStringSecurityPrivate_ = "";
+	this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_ = goog.string.Const.TYPE_MARKER_
+};
+goog.string.Const.prototype.implementsGoogStringTypedString = !0;
+goog.string.Const.prototype.getTypedStringValue = function () {
+	return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_
+};
+goog.string.Const.prototype.toString = function () {
+	return "Const{" + this.stringConstValueWithSecurityContract__googStringSecurityPrivate_ + "}"
+};
+goog.string.Const.unwrap = function (a) {
+	if (a instanceof goog.string.Const && a.constructor === goog.string.Const && a.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_ === goog.string.Const.TYPE_MARKER_) return a.stringConstValueWithSecurityContract__googStringSecurityPrivate_;
+	goog.asserts.fail("expected object of type Const, got '" + a + "'");
+	return "type_error:Const"
+};
+goog.string.Const.from = function (a) {
+	return goog.string.Const.create__googStringSecurityPrivate_(a)
+};
+goog.string.Const.TYPE_MARKER_ = {};
+goog.string.Const.create__googStringSecurityPrivate_ = function (a) {
+	var b = new goog.string.Const;
+	b.stringConstValueWithSecurityContract__googStringSecurityPrivate_ = a;
+	return b
+};
+goog.string.Const.EMPTY = goog.string.Const.from("");
+goog.html = {};
+goog.html.SafeStyle = function () {
+	this.privateDoNotAccessOrElseSafeStyleWrappedValue_ = "";
+	this.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_
+};
+goog.html.SafeStyle.prototype.implementsGoogStringTypedString = !0;
+goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
+goog.html.SafeStyle.fromConstant = function (a) {
+	a = goog.string.Const.unwrap(a);
+	if (0 === a.length) return goog.html.SafeStyle.EMPTY;
+	goog.html.SafeStyle.checkStyle_(a);
+	goog.asserts.assert(goog.string.endsWith(a, ";"), "Last character of style string is not ';': " + a);
+	goog.asserts.assert(goog.string.contains(a, ":"), "Style string must contain at least one ':', to specify a \"name: value\" pair: " + a);
+	return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(a)
+};
+goog.html.SafeStyle.checkStyle_ = function (a) {
+	goog.asserts.assert(!/[<>]/.test(a), "Forbidden characters in style string: " + a)
+};
+goog.html.SafeStyle.prototype.getTypedStringValue = function () {
+	return this.privateDoNotAccessOrElseSafeStyleWrappedValue_
+};
+goog.DEBUG && (goog.html.SafeStyle.prototype.toString = function () {
+	return "SafeStyle{" + this.privateDoNotAccessOrElseSafeStyleWrappedValue_ + "}"
+});
+goog.html.SafeStyle.unwrap = function (a) {
+	if (a instanceof goog.html.SafeStyle && a.constructor === goog.html.SafeStyle && a.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) return a.privateDoNotAccessOrElseSafeStyleWrappedValue_;
+	goog.asserts.fail("expected object of type SafeStyle, got '" + a + "' of type " + goog.typeOf(a));
+	return "type_error:SafeStyle"
+};
+goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse = function (a) {
+	return (new goog.html.SafeStyle).initSecurityPrivateDoNotAccessOrElse_(a)
+};
+goog.html.SafeStyle.prototype.initSecurityPrivateDoNotAccessOrElse_ = function (a) {
+	this.privateDoNotAccessOrElseSafeStyleWrappedValue_ = a;
+	return this
+};
+goog.html.SafeStyle.EMPTY = goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse("");
+goog.html.SafeStyle.INNOCUOUS_STRING = "zClosurez";
+goog.html.SafeStyle.create = function (a) {
+	var b = "",
+		c;
+	for (c in a) {
+		if (!/^[-_a-zA-Z0-9]+$/.test(c)) throw Error("Name allows only [-_a-zA-Z0-9], got: " + c);
+		var d = a[c];
+		null != d && (d instanceof goog.string.Const ? (d = goog.string.Const.unwrap(d), goog.asserts.assert(!/[{;}]/.test(d), "Value does not allow [{;}].")) : goog.html.SafeStyle.VALUE_RE_.test(d) ? goog.html.SafeStyle.hasBalancedQuotes_(d) || (goog.asserts.fail("String value requires balanced quotes, got: " + d), d = goog.html.SafeStyle.INNOCUOUS_STRING) : (goog.asserts.fail("String value allows only [-,.\"'%_!# a-zA-Z0-9], rgb() and rgba(), got: " +
+			d), d = goog.html.SafeStyle.INNOCUOUS_STRING), b += c + ":" + d + ";")
+	}
+	if (!b) return goog.html.SafeStyle.EMPTY;
+	goog.html.SafeStyle.checkStyle_(b);
+	return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b)
+};
+goog.html.SafeStyle.hasBalancedQuotes_ = function (a) {
+	for (var b = !0, c = !0, d = 0; d < a.length; d++) {
+		var e = a.charAt(d);
+		"'" == e && c ? b = !b : '"' == e && b && (c = !c)
+	}
+	return b && c
+};
+goog.html.SafeStyle.VALUE_RE_ = /^([-,."'%_!# a-zA-Z0-9]+|(?:rgb|hsl)a?\([0-9.%, ]+\))$/;
+goog.html.SafeStyle.concat = function (a) {
+	var b = "",
+		c = function (a) {
+        	goog.isArray(a) ? goog.array.forEach(a, c) : b += goog.html.SafeStyle.unwrap(a)
+		};
+	goog.array.forEach(arguments, c);
+	return b ? goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b) : goog.html.SafeStyle.EMPTY
+};
+goog.html.SafeStyleSheet = function () {
+	this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_ = "";
+	this.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_
+};
+goog.html.SafeStyleSheet.prototype.implementsGoogStringTypedString = !0;
+goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
+goog.html.SafeStyleSheet.concat = function (a) {
+	var b = "",
+		c = function (a) {
+        	goog.isArray(a) ? goog.array.forEach(a, c) : b += goog.html.SafeStyleSheet.unwrap(a)
+		};
+	goog.array.forEach(arguments, c);
+	return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(b)
+};
+goog.html.SafeStyleSheet.fromConstant = function (a) {
+	a = goog.string.Const.unwrap(a);
+	if (0 === a.length) return goog.html.SafeStyleSheet.EMPTY;
+	goog.asserts.assert(!goog.string.contains(a, "<"), "Forbidden '<' character in style sheet string: " + a);
+	return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(a)
+};
+goog.html.SafeStyleSheet.prototype.getTypedStringValue = function () {
+	return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_
+};
+goog.DEBUG && (goog.html.SafeStyleSheet.prototype.toString = function () {
+	return "SafeStyleSheet{" + this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_ + "}"
+});
+goog.html.SafeStyleSheet.unwrap = function (a) {
+	if (a instanceof goog.html.SafeStyleSheet && a.constructor === goog.html.SafeStyleSheet && a.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) return a.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_;
+	goog.asserts.fail("expected object of type SafeStyleSheet, got '" + a + "' of type " + goog.typeOf(a));
+	return "type_error:SafeStyleSheet"
+};
+goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse = function (a) {
+	return (new goog.html.SafeStyleSheet).initSecurityPrivateDoNotAccessOrElse_(a)
+};
+goog.html.SafeStyleSheet.prototype.initSecurityPrivateDoNotAccessOrElse_ = function (a) {
+	this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_ = a;
+	return this
+};
+goog.html.SafeStyleSheet.EMPTY = goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse("");
+goog.fs = {};
+goog.fs.url = {};
+goog.fs.url.createObjectUrl = function (a) {
+	return goog.fs.url.getUrlObject_().createObjectURL(a)
+};
+goog.fs.url.revokeObjectUrl = function (a) {
+	goog.fs.url.getUrlObject_().revokeObjectURL(a)
+};
+goog.fs.url.getUrlObject_ = function () {
+	var a = goog.fs.url.findUrlObject_();
+	if (null != a) return a;
+	throw Error("This browser doesn't seem to support blob URLs");
+};
+goog.fs.url.findUrlObject_ = function () {
+	return goog.isDef(goog.global.URL) && goog.isDef(goog.global.URL.createObjectURL) ? goog.global.URL : goog.isDef(goog.global.webkitURL) && goog.isDef(goog.global.webkitURL.createObjectURL) ? goog.global.webkitURL : goog.isDef(goog.global.createObjectURL) ? goog.global : null
+};
+goog.fs.url.browserSupportsObjectUrls = function () {
+	return null != goog.fs.url.findUrlObject_()
+};
+goog.i18n = {};
+goog.i18n.bidi = {};
+goog.i18n.bidi.FORCE_RTL = !1;
+goog.i18n.bidi.IS_RTL = goog.i18n.bidi.FORCE_RTL || ("ar" == goog.LOCALE.substring(0, 2).toLowerCase() || "fa" == goog.LOCALE.substring(0, 2).toLowerCase() || "he" == goog.LOCALE.substring(0, 2).toLowerCase() || "iw" == goog.LOCALE.substring(0, 2).toLowerCase() || "ps" == goog.LOCALE.substring(0, 2).toLowerCase() || "sd" == goog.LOCALE.substring(0, 2).toLowerCase() || "ug" == goog.LOCALE.substring(0, 2).toLowerCase() || "ur" == goog.LOCALE.substring(0, 2).toLowerCase() || "yi" == goog.LOCALE.substring(0, 2).toLowerCase()) && (2 == goog.LOCALE.length ||
+	"-" == goog.LOCALE.substring(2, 3) || "_" == goog.LOCALE.substring(2, 3)) || 3 <= goog.LOCALE.length && "ckb" == goog.LOCALE.substring(0, 3).toLowerCase() && (3 == goog.LOCALE.length || "-" == goog.LOCALE.substring(3, 4) || "_" == goog.LOCALE.substring(3, 4));
+goog.i18n.bidi.Format = {
+	LRE: "\u202a",
+	RLE: "\u202b",
+	PDF: "\u202c",
+	LRM: "\u200e",
+	RLM: "\u200f"
+};
+goog.i18n.bidi.Dir = {
+	LTR: 1,
+	RTL: -1,
+	NEUTRAL: 0
+};
+goog.i18n.bidi.RIGHT = "right";
+goog.i18n.bidi.LEFT = "left";
+goog.i18n.bidi.I18N_RIGHT = goog.i18n.bidi.IS_RTL ? goog.i18n.bidi.LEFT : goog.i18n.bidi.RIGHT;
+goog.i18n.bidi.I18N_LEFT = goog.i18n.bidi.IS_RTL ? goog.i18n.bidi.RIGHT : goog.i18n.bidi.LEFT;
+goog.i18n.bidi.toDir = function (a, b) {
+	return "number" == typeof a ? 0 < a ? goog.i18n.bidi.Dir.LTR : 0 > a ? goog.i18n.bidi.Dir.RTL : b ? null : goog.i18n.bidi.Dir.NEUTRAL : null == a ? null : a ? goog.i18n.bidi.Dir.RTL : goog.i18n.bidi.Dir.LTR
+};
+goog.i18n.bidi.ltrChars_ = "A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff";
+goog.i18n.bidi.rtlChars_ = "\u0591-\u06ef\u06fa-\u07ff\u200f\ufb1d-\ufdff\ufe70-\ufefc";
+goog.i18n.bidi.htmlSkipReg_ = /<[^>]*>|&[^;]+;/g;
+goog.i18n.bidi.stripHtmlIfNeeded_ = function (a, b) {
+	return b ? a.replace(goog.i18n.bidi.htmlSkipReg_, "") : a
+};
+goog.i18n.bidi.rtlCharReg_ = new RegExp("[" + goog.i18n.bidi.rtlChars_ + "]");
+goog.i18n.bidi.ltrCharReg_ = new RegExp("[" + goog.i18n.bidi.ltrChars_ + "]");
+goog.i18n.bidi.hasAnyRtl = function (a, b) {
+	return goog.i18n.bidi.rtlCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b))
+};
+goog.i18n.bidi.hasRtlChar = goog.i18n.bidi.hasAnyRtl;
+goog.i18n.bidi.hasAnyLtr = function (a, b) {
+	return goog.i18n.bidi.ltrCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b))
+};
+goog.i18n.bidi.ltrRe_ = new RegExp("^[" + goog.i18n.bidi.ltrChars_ + "]");
+goog.i18n.bidi.rtlRe_ = new RegExp("^[" + goog.i18n.bidi.rtlChars_ + "]");
+goog.i18n.bidi.isRtlChar = function (a) {
+	return goog.i18n.bidi.rtlRe_.test(a)
+};
+goog.i18n.bidi.isLtrChar = function (a) {
+	return goog.i18n.bidi.ltrRe_.test(a)
+};
+goog.i18n.bidi.isNeutralChar = function (a) {
+	return !goog.i18n.bidi.isLtrChar(a) && !goog.i18n.bidi.isRtlChar(a)
+};
+goog.i18n.bidi.ltrDirCheckRe_ = new RegExp("^[^" + goog.i18n.bidi.rtlChars_ + "]*[" + goog.i18n.bidi.ltrChars_ + "]");
+goog.i18n.bidi.rtlDirCheckRe_ = new RegExp("^[^" + goog.i18n.bidi.ltrChars_ + "]*[" + goog.i18n.bidi.rtlChars_ + "]");
+goog.i18n.bidi.startsWithRtl = function (a, b) {
+	return goog.i18n.bidi.rtlDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b))
+};
+goog.i18n.bidi.isRtlText = goog.i18n.bidi.startsWithRtl;
+goog.i18n.bidi.startsWithLtr = function (a, b) {
+	return goog.i18n.bidi.ltrDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b))
+};
+goog.i18n.bidi.isLtrText = goog.i18n.bidi.startsWithLtr;
+goog.i18n.bidi.isRequiredLtrRe_ = /^http:\/\/.*/;
+goog.i18n.bidi.isNeutralText = function (a, b) {
+	a = goog.i18n.bidi.stripHtmlIfNeeded_(a, b);
+	return goog.i18n.bidi.isRequiredLtrRe_.test(a) || !goog.i18n.bidi.hasAnyLtr(a) && !goog.i18n.bidi.hasAnyRtl(a)
+};
+goog.i18n.bidi.ltrExitDirCheckRe_ = new RegExp("[" + goog.i18n.bidi.ltrChars_ + "][^" + goog.i18n.bidi.rtlChars_ + "]*$");
+goog.i18n.bidi.rtlExitDirCheckRe_ = new RegExp("[" + goog.i18n.bidi.rtlChars_ + "][^" + goog.i18n.bidi.ltrChars_ + "]*$");
+goog.i18n.bidi.endsWithLtr = function (a, b) {
+	return goog.i18n.bidi.ltrExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b))
+};
+goog.i18n.bidi.isLtrExitText = goog.i18n.bidi.endsWithLtr;
+goog.i18n.bidi.endsWithRtl = function (a, b) {
+	return goog.i18n.bidi.rtlExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b))
+};
+goog.i18n.bidi.isRtlExitText = goog.i18n.bidi.endsWithRtl;
+goog.i18n.bidi.rtlLocalesRe_ = /^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Arab|Hebr|Thaa|Nkoo|Tfng))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;
+goog.i18n.bidi.isRtlLanguage = function (a) {
+	return goog.i18n.bidi.rtlLocalesRe_.test(a)
+};
+goog.i18n.bidi.bracketGuardTextRe_ = /(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g;
+goog.i18n.bidi.guardBracketInText = function (a, b) {
+	var c = (void 0 === b ? goog.i18n.bidi.hasAnyRtl(a) : b) ? goog.i18n.bidi.Format.RLM : goog.i18n.bidi.Format.LRM;
+	return a.replace(goog.i18n.bidi.bracketGuardTextRe_, c + "$&" + c)
+};
+goog.i18n.bidi.enforceRtlInHtml = function (a) {
+	return "<" == a.charAt(0) ? a.replace(/<\w+/, "$& dir=rtl") : "\n<span dir=rtl>" + a + "</span>"
+};
+goog.i18n.bidi.enforceRtlInText = function (a) {
+	return goog.i18n.bidi.Format.RLE + a + goog.i18n.bidi.Format.PDF
+};
+goog.i18n.bidi.enforceLtrInHtml = function (a) {
+	return "<" == a.charAt(0) ? a.replace(/<\w+/, "$& dir=ltr") : "\n<span dir=ltr>" + a + "</span>"
+};
+goog.i18n.bidi.enforceLtrInText = function (a) {
+	return goog.i18n.bidi.Format.LRE + a + goog.i18n.bidi.Format.PDF
+};
+goog.i18n.bidi.dimensionsRe_ = /:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g;
+goog.i18n.bidi.leftRe_ = /left/gi;
+goog.i18n.bidi.rightRe_ = /right/gi;
+goog.i18n.bidi.tempRe_ = /%%%%/g;
+goog.i18n.bidi.mirrorCSS = function (a) {
+	return a.replace(goog.i18n.bidi.dimensionsRe_, ":$1 $4 $3 $2").replace(goog.i18n.bidi.leftRe_, "%%%%").replace(goog.i18n.bidi.rightRe_, goog.i18n.bidi.LEFT).replace(goog.i18n.bidi.tempRe_, goog.i18n.bidi.RIGHT)
+};
+goog.i18n.bidi.doubleQuoteSubstituteRe_ = /([\u0591-\u05f2])"/g;
+goog.i18n.bidi.singleQuoteSubstituteRe_ = /([\u0591-\u05f2])'/g;
+goog.i18n.bidi.normalizeHebrewQuote = function (a) {
+	return a.replace(goog.i18n.bidi.doubleQuoteSubstituteRe_, "$1\u05f4").replace(goog.i18n.bidi.singleQuoteSubstituteRe_, "$1\u05f3")
+};
+goog.i18n.bidi.wordSeparatorRe_ = /\s+/;
+goog.i18n.bidi.hasNumeralsRe_ = /[\d\u06f0-\u06f9]/;
+goog.i18n.bidi.rtlDetectionThreshold_ = .4;
+goog.i18n.bidi.estimateDirection = function (a, b) {
+	for (var c = 0, d = 0, e = !1, f = goog.i18n.bidi.stripHtmlIfNeeded_(a, b).split(goog.i18n.bidi.wordSeparatorRe_), g = 0; g < f.length; g++) {
+		var h = f[g];
+		goog.i18n.bidi.startsWithRtl(h) ? (c++, d++) : goog.i18n.bidi.isRequiredLtrRe_.test(h) ? e = !0 : goog.i18n.bidi.hasAnyLtr(h) ? d++ : goog.i18n.bidi.hasNumeralsRe_.test(h) && (e = !0)
+	}
+	return 0 == d ? e ? goog.i18n.bidi.Dir.LTR : goog.i18n.bidi.Dir.NEUTRAL : c / d > goog.i18n.bidi.rtlDetectionThreshold_ ? goog.i18n.bidi.Dir.RTL : goog.i18n.bidi.Dir.LTR
+};
+goog.i18n.bidi.detectRtlDirectionality = function (a, b) {
+	return goog.i18n.bidi.estimateDirection(a, b) == goog.i18n.bidi.Dir.RTL
+};
+goog.i18n.bidi.setElementDirAndAlign = function (a, b) {
+	a && (b = goog.i18n.bidi.toDir(b)) && (a.style.textAlign = b == goog.i18n.bidi.Dir.RTL ? goog.i18n.bidi.RIGHT : goog.i18n.bidi.LEFT, a.dir = b == goog.i18n.bidi.Dir.RTL ? "rtl" : "ltr")
+};
+goog.i18n.bidi.setElementDirByTextDirectionality = function (a, b) {
+	switch (goog.i18n.bidi.estimateDirection(b)) {
+		case goog.i18n.bidi.Dir.LTR:
+			a.dir = "ltr";
+			break;
+		case goog.i18n.bidi.Dir.RTL:
+			a.dir = "rtl";
+			break;
+		default:
+			a.removeAttribute("dir")
+	}
+};
+goog.i18n.bidi.DirectionalString = function () { };
+goog.html.SafeUrl = function () {
+	this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = "";
+	this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_
+};
+goog.html.SafeUrl.INNOCUOUS_STRING = "about:invalid#zClosurez";
+goog.html.SafeUrl.prototype.implementsGoogStringTypedString = !0;
+goog.html.SafeUrl.prototype.getTypedStringValue = function () {
+	return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_
+};
+goog.html.SafeUrl.prototype.implementsGoogI18nBidiDirectionalString = !0;
+goog.html.SafeUrl.prototype.getDirection = function () {
+	return goog.i18n.bidi.Dir.LTR
+};
+goog.DEBUG && (goog.html.SafeUrl.prototype.toString = function () {
+	return "SafeUrl{" + this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ + "}"
+});
+goog.html.SafeUrl.unwrap = function (a) {
+	if (a instanceof goog.html.SafeUrl && a.constructor === goog.html.SafeUrl && a.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) return a.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
+	goog.asserts.fail("expected object of type SafeUrl, got '" + a + "' of type " + goog.typeOf(a));
+	return "type_error:SafeUrl"
+};
+goog.html.SafeUrl.fromConstant = function (a) {
+	return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(a))
+};
+goog.html.SAFE_MIME_TYPE_PATTERN_ = /^(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm))$/i;
+goog.html.SafeUrl.fromBlob = function (a) {
+	a = goog.html.SAFE_MIME_TYPE_PATTERN_.test(a.type) ? goog.fs.url.createObjectUrl(a) : goog.html.SafeUrl.INNOCUOUS_STRING;
+	return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
+};
+goog.html.DATA_URL_PATTERN_ = /^data:([^;,]*);base64,[a-z0-9+\/]+=*$/i;
+goog.html.SafeUrl.fromDataUrl = function (a) {
+	var b = a.match(goog.html.DATA_URL_PATTERN_),
+		b = b && goog.html.SAFE_MIME_TYPE_PATTERN_.test(b[1]);
+	return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b ? a : goog.html.SafeUrl.INNOCUOUS_STRING)
+};
+goog.html.SafeUrl.fromTelUrl = function (a) {
+	goog.string.caseInsensitiveStartsWith(a, "tel:") || (a = goog.html.SafeUrl.INNOCUOUS_STRING);
+	return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
+};
+goog.html.SAFE_URL_PATTERN_ = /^(?:(?:https?|mailto|ftp):|[^&:/?#]*(?:[/?#]|$))/i;
+goog.html.SafeUrl.sanitize = function (a) {
+	if (a instanceof goog.html.SafeUrl) return a;
+	a = a.implementsGoogStringTypedString ? a.getTypedStringValue() : String(a);
+	goog.html.SAFE_URL_PATTERN_.test(a) || (a = goog.html.SafeUrl.INNOCUOUS_STRING);
+	return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
+};
+goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
+goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse = function (a) {
+	var b = new goog.html.SafeUrl;
+	b.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = a;
+	return b
+};
+goog.html.SafeUrl.ABOUT_BLANK = goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse("about:blank");
+goog.html.TrustedResourceUrl = function () {
+	this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ = "";
+	this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_
+};
+goog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString = !0;
+goog.html.TrustedResourceUrl.prototype.getTypedStringValue = function () {
+	return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_
+};
+goog.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString = !0;
+goog.html.TrustedResourceUrl.prototype.getDirection = function () {
+	return goog.i18n.bidi.Dir.LTR
+};
+goog.DEBUG && (goog.html.TrustedResourceUrl.prototype.toString = function () {
+	return "TrustedResourceUrl{" + this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ + "}"
+});
+goog.html.TrustedResourceUrl.unwrap = function (a) {
+	if (a instanceof goog.html.TrustedResourceUrl && a.constructor === goog.html.TrustedResourceUrl && a.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) return a.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;
+	goog.asserts.fail("expected object of type TrustedResourceUrl, got '" + a + "' of type " + goog.typeOf(a));
+	return "type_error:TrustedResourceUrl"
+};
+goog.html.TrustedResourceUrl.format = function (a, b) {
+	var c = goog.string.Const.unwrap(a);
+	if (!goog.html.TrustedResourceUrl.BASE_URL_.test(c)) throw Error("Invalid TrustedResourceUrl format: " + c);
+	var d = c.replace(goog.html.TrustedResourceUrl.FORMAT_MARKER_, function (a, d) {
+		if (!Object.prototype.hasOwnProperty.call(b, d)) throw Error('Found marker, "' + d + '", in format string, "' + c + '", but no valid label mapping found in args: ' + JSON.stringify(b));
+		var e = b[d];
+		return e instanceof goog.string.Const ? goog.string.Const.unwrap(e) :
+			encodeURIComponent(String(e))
+	});
+	return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(d)
+};
+goog.html.TrustedResourceUrl.FORMAT_MARKER_ = /%{(\w+)}/g;
+goog.html.TrustedResourceUrl.SCHEME_AND_ORIGIN_ = "(?:(?:https:)?//[0-9a-z.:[\\]-]+)?";
+goog.html.TrustedResourceUrl.BASE_ABSOLUTE_PATH_ = "(?:/[0-9a-z_~-]+(?:[/#?]|$))";
+goog.html.TrustedResourceUrl.BASE_URL_ = new RegExp("^" + goog.html.TrustedResourceUrl.SCHEME_AND_ORIGIN_ + goog.html.TrustedResourceUrl.BASE_ABSOLUTE_PATH_, "i");
+goog.html.TrustedResourceUrl.fromConstant = function (a) {
+	return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(a))
+};
+goog.html.TrustedResourceUrl.fromConstants = function (a) {
+	for (var b = "", c = 0; c < a.length; c++) b += goog.string.Const.unwrap(a[c]);
+	return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(b)
+};
+goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
+goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse = function (a) {
+	var b = new goog.html.TrustedResourceUrl;
+	b.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ = a;
+	return b
+};
+goog.html.SafeHtml = function () {
+	this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = "";
+	this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
+	this.dir_ = null
+};
+goog.html.SafeHtml.prototype.implementsGoogI18nBidiDirectionalString = !0;
+goog.html.SafeHtml.prototype.getDirection = function () {
+	return this.dir_
+};
+goog.html.SafeHtml.prototype.implementsGoogStringTypedString = !0;
+goog.html.SafeHtml.prototype.getTypedStringValue = function () {
+	return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_
+};
+goog.DEBUG && (goog.html.SafeHtml.prototype.toString = function () {
+	return "SafeHtml{" + this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ + "}"
+});
+goog.html.SafeHtml.unwrap = function (a) {
+	if (a instanceof goog.html.SafeHtml && a.constructor === goog.html.SafeHtml && a.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) return a.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
+	goog.asserts.fail("expected object of type SafeHtml, got '" + a + "' of type " + goog.typeOf(a));
+	return "type_error:SafeHtml"
+};
+goog.html.SafeHtml.htmlEscape = function (a) {
+	if (a instanceof goog.html.SafeHtml) return a;
+	var b = null;
+	a.implementsGoogI18nBidiDirectionalString && (b = a.getDirection());
+	a = a.implementsGoogStringTypedString ? a.getTypedStringValue() : String(a);
+	return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.htmlEscape(a), b)
+};
+goog.html.SafeHtml.htmlEscapePreservingNewlines = function (a) {
+	if (a instanceof goog.html.SafeHtml) return a;
+	a = goog.html.SafeHtml.htmlEscape(a);
+	return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.newLineToBr(goog.html.SafeHtml.unwrap(a)), a.getDirection())
+};
+goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces = function (a) {
+	if (a instanceof goog.html.SafeHtml) return a;
+	a = goog.html.SafeHtml.htmlEscape(a);
+	return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.whitespaceEscape(goog.html.SafeHtml.unwrap(a)), a.getDirection())
+};
+goog.html.SafeHtml.from = goog.html.SafeHtml.htmlEscape;
+goog.html.SafeHtml.VALID_NAMES_IN_TAG_ = /^[a-zA-Z0-9-]+$/;
+goog.html.SafeHtml.URL_ATTRIBUTES_ = {
+	action: !0,
+	cite: !0,
+	data: !0,
+	formaction: !0,
+	href: !0,
+	manifest: !0,
+	poster: !0,
+	src: !0
+};
+goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_ = {
+	APPLET: !0,
+	BASE: !0,
+	EMBED: !0,
+	IFRAME: !0,
+	LINK: !0,
+	MATH: !0,
+	META: !0,
+	OBJECT: !0,
+	SCRIPT: !0,
+	STYLE: !0,
+	SVG: !0,
+	TEMPLATE: !0
+};
+goog.html.SafeHtml.create = function (a, b, c) {
+	goog.html.SafeHtml.verifyTagName(String(a));
+	return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(String(a), b, c)
+};
+goog.html.SafeHtml.verifyTagName = function (a) {
+	if (!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(a)) throw Error("Invalid tag name <" + a + ">.");
+	if (a.toUpperCase() in goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_) throw Error("Tag name <" + a + "> is not allowed for SafeHtml.");
+};
+goog.html.SafeHtml.createIframe = function (a, b, c, d) {
+	a && goog.html.TrustedResourceUrl.unwrap(a);
+	var e = {};
+	e.src = a || null;
+	e.srcdoc = b && goog.html.SafeHtml.unwrap(b);
+	a = goog.html.SafeHtml.combineAttributes(e, {
+		sandbox: ""
+	}, c);
+	return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe", a, d)
+};
+goog.html.SafeHtml.createSandboxIframe = function (a, b, c, d) {
+	if (!goog.html.SafeHtml.canUseSandboxIframe()) throw Error("The browser does not support sandboxed iframes.");
+	var e = {};
+	e.src = a ? goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(a)) : null;
+	e.srcdoc = b || null;
+	e.sandbox = "";
+	a = goog.html.SafeHtml.combineAttributes(e, {}, c);
+	return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe", a, d)
+};
+goog.html.SafeHtml.canUseSandboxIframe = function () {
+	return goog.global.HTMLIFrameElement && "sandbox" in goog.global.HTMLIFrameElement.prototype
+};
+goog.html.SafeHtml.createScriptSrc = function (a, b) {
+	goog.html.TrustedResourceUrl.unwrap(a);
+	var c = goog.html.SafeHtml.combineAttributes({
+		src: a
+	}, {}, b);
+	return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script", c)
+};
+goog.html.SafeHtml.createStyle = function (a, b) {
+	var c = goog.html.SafeHtml.combineAttributes({
+		type: "text/css"
+	}, {}, b),
+		d = "";
+	a = goog.array.concat(a);
+	for (var e = 0; e < a.length; e++) d += goog.html.SafeStyleSheet.unwrap(a[e]);
+	d = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(d, goog.i18n.bidi.Dir.NEUTRAL);
+	return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style", c, d)
+};
+goog.html.SafeHtml.createMetaRefresh = function (a, b) {
+	var c = goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(a));
+	(goog.labs.userAgent.browser.isIE() || goog.labs.userAgent.browser.isEdge()) && goog.string.contains(c, ";") && (c = "'" + c.replace(/'/g, "%27") + "'");
+	return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("meta", {
+		"http-equiv": "refresh",
+		content: (b || 0) + "; url=" + c
+	})
+};
+goog.html.SafeHtml.getAttrNameAndValue_ = function (a, b, c) {
+	if (c instanceof goog.string.Const) c = goog.string.Const.unwrap(c);
+	else if ("style" == b.toLowerCase()) c = goog.html.SafeHtml.getStyleValue_(c);
+	else {
+		if (/^on/i.test(b)) throw Error('Attribute "' + b + '" requires goog.string.Const value, "' + c + '" given.');
+		if (b.toLowerCase() in goog.html.SafeHtml.URL_ATTRIBUTES_)
+			if (c instanceof goog.html.TrustedResourceUrl) c = goog.html.TrustedResourceUrl.unwrap(c);
+			else if (c instanceof goog.html.SafeUrl) c = goog.html.SafeUrl.unwrap(c);
+			else if (goog.isString(c)) c = goog.html.SafeUrl.sanitize(c).getTypedStringValue();
+			else throw Error('Attribute "' + b + '" on tag "' + a + '" requires goog.html.SafeUrl, goog.string.Const, or string, value "' + c + '" given.');
+	}
+	c.implementsGoogStringTypedString && (c = c.getTypedStringValue());
+	goog.asserts.assert(goog.isString(c) || goog.isNumber(c), "String or number value expected, got " + typeof c + " with value: " + c);
+	return b + '="' + goog.string.htmlEscape(String(c)) + '"'
+};
+goog.html.SafeHtml.getStyleValue_ = function (a) {
+	if (!goog.isObject(a)) throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, ' + typeof a + " given: " + a);
+	a instanceof goog.html.SafeStyle || (a = goog.html.SafeStyle.create(a));
+	return goog.html.SafeStyle.unwrap(a)
+};
+goog.html.SafeHtml.createWithDir = function (a, b, c, d) {
+	b = goog.html.SafeHtml.create(b, c, d);
+	b.dir_ = a;
+	return b
+};
+goog.html.SafeHtml.concat = function (a) {
+	var b = goog.i18n.bidi.Dir.NEUTRAL,
+		c = "",
+		d = function (a) {
+        	goog.isArray(a) ? goog.array.forEach(a, d) : (a = goog.html.SafeHtml.htmlEscape(a), c += goog.html.SafeHtml.unwrap(a), a = a.getDirection(), b == goog.i18n.bidi.Dir.NEUTRAL ? b = a : a != goog.i18n.bidi.Dir.NEUTRAL && b != a && (b = null))
+		};
+	goog.array.forEach(arguments, d);
+	return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(c, b)
+};
+goog.html.SafeHtml.concatWithDir = function (a, b) {
+	var c = goog.html.SafeHtml.concat(goog.array.slice(arguments, 1));
+	c.dir_ = a;
+	return c
+};
+goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
+goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse = function (a, b) {
+	return (new goog.html.SafeHtml).initSecurityPrivateDoNotAccessOrElse_(a, b)
+};
+goog.html.SafeHtml.prototype.initSecurityPrivateDoNotAccessOrElse_ = function (a, b) {
+	this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = a;
+	this.dir_ = b;
+	return this
+};
+goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse = function (a, b, c) {
+	var d = null,
+		e;
+	e = "<" + a + goog.html.SafeHtml.stringifyAttributes(a, b);
+	goog.isDefAndNotNull(c) ? goog.isArray(c) || (c = [c]) : c = [];
+	goog.dom.tags.isVoidTag(a.toLowerCase()) ? (goog.asserts.assert(!c.length, "Void tag <" + a + "> does not allow content."), e += ">") : (d = goog.html.SafeHtml.concat(c), e += ">" + goog.html.SafeHtml.unwrap(d) + "</" + a + ">", d = d.getDirection());
+	(a = b && b.dir) && (d = /^(ltr|rtl|auto)$/i.test(a) ? goog.i18n.bidi.Dir.NEUTRAL : null);
+	return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(e, d)
+};
+goog.html.SafeHtml.stringifyAttributes = function (a, b) {
+	var c = "";
+	if (b)
+		for (var d in b) {
+			if (!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(d)) throw Error('Invalid attribute name "' + d + '".');
+			var e = b[d];
+			goog.isDefAndNotNull(e) && (c += " " + goog.html.SafeHtml.getAttrNameAndValue_(a, d, e))
+		}
+	return c
+};
+goog.html.SafeHtml.combineAttributes = function (a, b, c) {
+	var d = {},
+		e;
+	for (e in a) goog.asserts.assert(e.toLowerCase() == e, "Must be lower case"), d[e] = a[e];
+	for (e in b) goog.asserts.assert(e.toLowerCase() == e, "Must be lower case"), d[e] = b[e];
+	for (e in c) {
+		var f = e.toLowerCase();
+		if (f in a) throw Error('Cannot override "' + f + '" attribute, got "' + e + '" with value "' + c[e] + '"');
+		f in b && delete d[f];
+		d[e] = c[e]
+	}
+	return d
+};
+goog.html.SafeHtml.DOCTYPE_HTML = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<!DOCTYPE html>", goog.i18n.bidi.Dir.NEUTRAL);
+goog.html.SafeHtml.EMPTY = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("", goog.i18n.bidi.Dir.NEUTRAL);
+goog.html.SafeHtml.BR = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<br>", goog.i18n.bidi.Dir.NEUTRAL);
+goog.dom.safe = {};
+goog.dom.safe.InsertAdjacentHtmlPosition = {
+	AFTERBEGIN: "afterbegin",
+	AFTEREND: "afterend",
+	BEFOREBEGIN: "beforebegin",
+	BEFOREEND: "beforeend"
+};
+goog.dom.safe.insertAdjacentHtml = function (a, b, c) {
+	a.insertAdjacentHTML(b, goog.html.SafeHtml.unwrap(c))
+};
+goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_ = {
+	MATH: !0,
+	SCRIPT: !0,
+	STYLE: !0,
+	SVG: !0,
+	TEMPLATE: !0
+};
+goog.dom.safe.setInnerHtml = function (a, b) {
+	if (goog.asserts.ENABLE_ASSERTS) {
+		var c = a.tagName.toUpperCase();
+		if (goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_[c]) throw Error("goog.dom.safe.setInnerHtml cannot be used to set content of " + a.tagName + ".");
+	}
+	a.innerHTML = goog.html.SafeHtml.unwrap(b)
+};
+goog.dom.safe.setOuterHtml = function (a, b) {
+	a.outerHTML = goog.html.SafeHtml.unwrap(b)
+};
+goog.dom.safe.setStyle = function (a, b) {
+	a.style.cssText = goog.html.SafeStyle.unwrap(b)
+};
+goog.dom.safe.documentWrite = function (a, b) {
+	a.write(goog.html.SafeHtml.unwrap(b))
+};
+goog.dom.safe.setAnchorHref = function (a, b) {
+	goog.dom.safe.assertIsHTMLAnchorElement_(a);
+	var c;
+	c = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitize(b);
+	a.href = goog.html.SafeUrl.unwrap(c)
+};
+goog.dom.safe.setImageSrc = function (a, b) {
+	goog.dom.safe.assertIsHTMLImageElement_(a);
+	var c;
+	c = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitize(b);
+	a.src = goog.html.SafeUrl.unwrap(c)
+};
+goog.dom.safe.setEmbedSrc = function (a, b) {
+	goog.dom.safe.assertIsHTMLEmbedElement_(a);
+	a.src = goog.html.TrustedResourceUrl.unwrap(b)
+};
+goog.dom.safe.setFrameSrc = function (a, b) {
+	goog.dom.safe.assertIsHTMLFrameElement_(a);
+	a.src = goog.html.TrustedResourceUrl.unwrap(b)
+};
+goog.dom.safe.setIframeSrc = function (a, b) {
+	goog.dom.safe.assertIsHTMLIFrameElement_(a);
+	a.src = goog.html.TrustedResourceUrl.unwrap(b)
+};
+goog.dom.safe.setLinkHrefAndRel = function (a, b, c) {
+	goog.dom.safe.assertIsHTMLLinkElement_(a);
+	a.rel = c;
+	goog.string.caseInsensitiveContains(c, "stylesheet") ? (goog.asserts.assert(b instanceof goog.html.TrustedResourceUrl, 'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'), a.href = goog.html.TrustedResourceUrl.unwrap(b)) : a.href = b instanceof goog.html.TrustedResourceUrl ? goog.html.TrustedResourceUrl.unwrap(b) : b instanceof goog.html.SafeUrl ? goog.html.SafeUrl.unwrap(b) : goog.html.SafeUrl.sanitize(b).getTypedStringValue()
+};
+goog.dom.safe.setObjectData = function (a, b) {
+	goog.dom.safe.assertIsHTMLObjectElement_(a);
+	a.data = goog.html.TrustedResourceUrl.unwrap(b)
+};
+goog.dom.safe.setScriptSrc = function (a, b) {
+	goog.dom.safe.assertIsHTMLScriptElement_(a);
+	a.src = goog.html.TrustedResourceUrl.unwrap(b)
+};
+goog.dom.safe.setLocationHref = function (a, b) {
+	goog.dom.safe.assertIsLocation_(a);
+	var c;
+	c = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitize(b);
+	a.href = goog.html.SafeUrl.unwrap(c)
+};
+goog.dom.safe.openInWindow = function (a, b, c, d, e) {
+	a = a instanceof goog.html.SafeUrl ? a : goog.html.SafeUrl.sanitize(a);
+	return (b || window).open(goog.html.SafeUrl.unwrap(a), c ? goog.string.Const.unwrap(c) : "", d, e)
+};
+goog.dom.safe.assertIsLocation_ = function (a) {
+	goog.asserts.ENABLE_ASSERTS && "undefined" != typeof Location && "undefined" != typeof Element && goog.asserts.assert(a && (a instanceof Location || !(a instanceof Element)), "Argument is not a Location (or a non-Element mock); got: %s", goog.dom.safe.debugStringForType_(a));
+	return a
+};
+goog.dom.safe.assertIsHTMLAnchorElement_ = function (a) {
+	goog.asserts.ENABLE_ASSERTS && "undefined" != typeof HTMLAnchorElement && "undefined" != typeof Location && "undefined" != typeof Element && goog.asserts.assert(a && (a instanceof HTMLAnchorElement || !(a instanceof Location || a instanceof Element)), "Argument is not a HTMLAnchorElement (or a non-Element mock); got: %s", goog.dom.safe.debugStringForType_(a));
+	return a
+};
+goog.dom.safe.assertIsHTMLLinkElement_ = function (a) {
+	goog.asserts.ENABLE_ASSERTS && "undefined" != typeof HTMLLinkElement && "undefined" != typeof Location && "undefined" != typeof Element && goog.asserts.assert(a && (a instanceof HTMLLinkElement || !(a instanceof Location || a instanceof Element)), "Argument is not a HTMLLinkElement (or a non-Element mock); got: %s", goog.dom.safe.debugStringForType_(a));
+	return a
+};
+goog.dom.safe.assertIsHTMLImageElement_ = function (a) {
+	goog.asserts.ENABLE_ASSERTS && "undefined" != typeof HTMLImageElement && "undefined" != typeof Element && goog.asserts.assert(a && (a instanceof HTMLImageElement || !(a instanceof Element)), "Argument is not a HTMLImageElement (or a non-Element mock); got: %s", goog.dom.safe.debugStringForType_(a));
+	return a
+};
+goog.dom.safe.assertIsHTMLEmbedElement_ = function (a) {
+	goog.asserts.ENABLE_ASSERTS && "undefined" != typeof HTMLEmbedElement && "undefined" != typeof Element && goog.asserts.assert(a && (a instanceof HTMLEmbedElement || !(a instanceof Element)), "Argument is not a HTMLEmbedElement (or a non-Element mock); got: %s", goog.dom.safe.debugStringForType_(a));
+	return a
+};
+goog.dom.safe.assertIsHTMLFrameElement_ = function (a) {
+	goog.asserts.ENABLE_ASSERTS && "undefined" != typeof HTMLFrameElement && "undefined" != typeof Element && goog.asserts.assert(a && (a instanceof HTMLFrameElement || !(a instanceof Element)), "Argument is not a HTMLFrameElement (or a non-Element mock); got: %s", goog.dom.safe.debugStringForType_(a));
+	return a
+};
+goog.dom.safe.assertIsHTMLIFrameElement_ = function (a) {
+	goog.asserts.ENABLE_ASSERTS && "undefined" != typeof HTMLIFrameElement && "undefined" != typeof Element && goog.asserts.assert(a && (a instanceof HTMLIFrameElement || !(a instanceof Element)), "Argument is not a HTMLIFrameElement (or a non-Element mock); got: %s", goog.dom.safe.debugStringForType_(a));
+	return a
+};
+goog.dom.safe.assertIsHTMLObjectElement_ = function (a) {
+	goog.asserts.ENABLE_ASSERTS && "undefined" != typeof HTMLObjectElement && "undefined" != typeof Element && goog.asserts.assert(a && (a instanceof HTMLObjectElement || !(a instanceof Element)), "Argument is not a HTMLObjectElement (or a non-Element mock); got: %s", goog.dom.safe.debugStringForType_(a));
+	return a
+};
+goog.dom.safe.assertIsHTMLScriptElement_ = function (a) {
+	goog.asserts.ENABLE_ASSERTS && "undefined" != typeof HTMLScriptElement && "undefined" != typeof Element && goog.asserts.assert(a && (a instanceof HTMLScriptElement || !(a instanceof Element)), "Argument is not a HTMLScriptElement (or a non-Element mock); got: %s", goog.dom.safe.debugStringForType_(a));
+	return a
+};
+goog.dom.safe.debugStringForType_ = function (a) {
+	return goog.isObject(a) ? a.constructor.displayName || a.constructor.name || Object.prototype.toString.call(a) : void 0 === a ? "undefined" : null === a ? "null" : typeof a
+};
+goog.html.SafeScript = function () {
+	this.privateDoNotAccessOrElseSafeScriptWrappedValue_ = "";
+	this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_
+};
+goog.html.SafeScript.prototype.implementsGoogStringTypedString = !0;
+goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
+goog.html.SafeScript.fromConstant = function (a) {
+	a = goog.string.Const.unwrap(a);
+	return 0 === a.length ? goog.html.SafeScript.EMPTY : goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(a)
+};
+goog.html.SafeScript.prototype.getTypedStringValue = function () {
+	return this.privateDoNotAccessOrElseSafeScriptWrappedValue_
+};
+goog.DEBUG && (goog.html.SafeScript.prototype.toString = function () {
+	return "SafeScript{" + this.privateDoNotAccessOrElseSafeScriptWrappedValue_ + "}"
+});
+goog.html.SafeScript.unwrap = function (a) {
+	if (a instanceof goog.html.SafeScript && a.constructor === goog.html.SafeScript && a.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) return a.privateDoNotAccessOrElseSafeScriptWrappedValue_;
+	goog.asserts.fail("expected object of type SafeScript, got '" + a + "' of type " + goog.typeOf(a));
+	return "type_error:SafeScript"
+};
+goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse = function (a) {
+	return (new goog.html.SafeScript).initSecurityPrivateDoNotAccessOrElse_(a)
+};
+goog.html.SafeScript.prototype.initSecurityPrivateDoNotAccessOrElse_ = function (a) {
+	this.privateDoNotAccessOrElseSafeScriptWrappedValue_ = a;
+	return this
+};
+goog.html.SafeScript.EMPTY = goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("");
+goog.html.uncheckedconversions = {};
+goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract = function (a, b, c) {
+	goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
+	goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)), "must provide non-empty justification");
+	return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(b, c || null)
+};
+goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract = function (a, b) {
+	goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
+	goog.asserts.assert(!goog.string.isEmpty(goog.string.Const.unwrap(a)), "must provide non-empty justification");
+	return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(b)
+};
+goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract = function (a, b) {
+	goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
+	goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)), "must provide non-empty justification");
+	return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b)
+};
+goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract = function (a, b) {
+	goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
+	goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)), "must provide non-empty justification");
+	return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(b)
+};
+goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract = function (a, b) {
+	goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
+	goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)), "must provide non-empty justification");
+	return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b)
+};
+goog.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract = function (a, b) {
+	goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
+	goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)), "must provide non-empty justification");
+	return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(b)
+};
+goog.math.Coordinate = function (a, b) {
+	this.x = goog.isDef(a) ? a : 0;
+	this.y = goog.isDef(b) ? b : 0
+};
+goog.math.Coordinate.prototype.clone = function () {
+	return new goog.math.Coordinate(this.x, this.y)
+};
+goog.DEBUG && (goog.math.Coordinate.prototype.toString = function () {
+	return "(" + this.x + ", " + this.y + ")"
+});
+goog.math.Coordinate.prototype.equals = function (a) {
+	return a instanceof goog.math.Coordinate && goog.math.Coordinate.equals(this, a)
+};
+goog.math.Coordinate.equals = function (a, b) {
+	return a == b ? !0 : a && b ? a.x == b.x && a.y == b.y : !1
+};
+goog.math.Coordinate.distance = function (a, b) {
+	var c = a.x - b.x,
+		d = a.y - b.y;
+	return Math.sqrt(c * c + d * d)
+};
+goog.math.Coordinate.magnitude = function (a) {
+	return Math.sqrt(a.x * a.x + a.y * a.y)
+};
+goog.math.Coordinate.azimuth = function (a) {
+	return goog.math.angle(0, 0, a.x, a.y)
+};
+goog.math.Coordinate.squaredDistance = function (a, b) {
+	var c = a.x - b.x,
+		d = a.y - b.y;
+	return c * c + d * d
+};
+goog.math.Coordinate.difference = function (a, b) {
+	return new goog.math.Coordinate(a.x - b.x, a.y - b.y)
+};
+goog.math.Coordinate.sum = function (a, b) {
+	return new goog.math.Coordinate(a.x + b.x, a.y + b.y)
+};
+goog.math.Coordinate.prototype.ceil = function () {
+	this.x = Math.ceil(this.x);
+	this.y = Math.ceil(this.y);
+	return this
+};
+goog.math.Coordinate.prototype.floor = function () {
+	this.x = Math.floor(this.x);
+	this.y = Math.floor(this.y);
+	return this
+};
+goog.math.Coordinate.prototype.round = function () {
+	this.x = Math.round(this.x);
+	this.y = Math.round(this.y);
+	return this
+};
+goog.math.Coordinate.prototype.translate = function (a, b) {
+	a instanceof goog.math.Coordinate ? (this.x += a.x, this.y += a.y) : (this.x += Number(a), goog.isNumber(b) && (this.y += b));
+	return this
+};
+goog.math.Coordinate.prototype.scale = function (a, b) {
+	var c = goog.isNumber(b) ? b : a;
+	this.x *= a;
+	this.y *= c;
+	return this
+};
+goog.math.Coordinate.prototype.rotateRadians = function (a, b) {
+	var c = b || new goog.math.Coordinate(0, 0),
+		d = this.x,
+		e = this.y,
+		f = Math.cos(a),
+		g = Math.sin(a);
+	this.x = (d - c.x) * f - (e - c.y) * g + c.x;
+	this.y = (d - c.x) * g + (e - c.y) * f + c.y
+};
+goog.math.Coordinate.prototype.rotateDegrees = function (a, b) {
+	this.rotateRadians(goog.math.toRadians(a), b)
+};
+goog.math.Size = function (a, b) {
+	this.width = a;
+	this.height = b
+};
+goog.math.Size.equals = function (a, b) {
+	return a == b ? !0 : a && b ? a.width == b.width && a.height == b.height : !1
+};
+goog.math.Size.prototype.clone = function () {
+	return new goog.math.Size(this.width, this.height)
+};
+goog.DEBUG && (goog.math.Size.prototype.toString = function () {
+	return "(" + this.width + " x " + this.height + ")"
+});
+goog.math.Size.prototype.getLongest = function () {
+	return Math.max(this.width, this.height)
+};
+goog.math.Size.prototype.getShortest = function () {
+	return Math.min(this.width, this.height)
+};
+goog.math.Size.prototype.area = function () {
+	return this.width * this.height
+};
+goog.math.Size.prototype.perimeter = function () {
+	return 2 * (this.width + this.height)
+};
+goog.math.Size.prototype.aspectRatio = function () {
+	return this.width / this.height
+};
+goog.math.Size.prototype.isEmpty = function () {
+	return !this.area()
+};
+goog.math.Size.prototype.ceil = function () {
+	this.width = Math.ceil(this.width);
+	this.height = Math.ceil(this.height);
+	return this
+};
+goog.math.Size.prototype.fitsInside = function (a) {
+	return this.width <= a.width && this.height <= a.height
+};
+goog.math.Size.prototype.floor = function () {
+	this.width = Math.floor(this.width);
+	this.height = Math.floor(this.height);
+	return this
+};
+goog.math.Size.prototype.round = function () {
+	this.width = Math.round(this.width);
+	this.height = Math.round(this.height);
+	return this
+};
+goog.math.Size.prototype.scale = function (a, b) {
+	var c = goog.isNumber(b) ? b : a;
+	this.width *= a;
+	this.height *= c;
+	return this
+};
+goog.math.Size.prototype.scaleToCover = function (a) {
+	a = this.aspectRatio() <= a.aspectRatio() ? a.width / this.width : a.height / this.height;
+	return this.scale(a)
+};
+goog.math.Size.prototype.scaleToFit = function (a) {
+	a = this.aspectRatio() > a.aspectRatio() ? a.width / this.width : a.height / this.height;
+	return this.scale(a)
+};
+goog.dom.ASSUME_QUIRKS_MODE = !1;
+goog.dom.ASSUME_STANDARDS_MODE = !1;
+goog.dom.COMPAT_MODE_KNOWN_ = goog.dom.ASSUME_QUIRKS_MODE || goog.dom.ASSUME_STANDARDS_MODE;
+goog.dom.getDomHelper = function (a) {
+	return a ? new goog.dom.DomHelper(goog.dom.getOwnerDocument(a)) : goog.dom.defaultDomHelper_ || (goog.dom.defaultDomHelper_ = new goog.dom.DomHelper)
+};
+goog.dom.getDocument = function () {
+	return document
+};
+goog.dom.getElement = function (a) {
+	return goog.dom.getElementHelper_(document, a)
+};
+goog.dom.getElementHelper_ = function (a, b) {
+	return goog.isString(b) ? a.getElementById(b) : b
+};
+goog.dom.getRequiredElement = function (a) {
+	return goog.dom.getRequiredElementHelper_(document, a)
+};
+goog.dom.getRequiredElementHelper_ = function (a, b) {
+	goog.asserts.assertString(b);
+	var c = goog.dom.getElementHelper_(a, b);
+	return c = goog.asserts.assertElement(c, "No element found with id: " + b)
+};
+goog.dom.$ = goog.dom.getElement;
+goog.dom.getElementsByTagName = function (a, b) {
+	return (b || document).getElementsByTagName(String(a))
+};
+goog.dom.getElementsByTagNameAndClass = function (a, b, c) {
+	return goog.dom.getElementsByTagNameAndClass_(document, a, b, c)
+};
+goog.dom.getElementsByClass = function (a, b) {
+	var c = b || document;
+	return goog.dom.canUseQuerySelector_(c) ? c.querySelectorAll("." + a) : goog.dom.getElementsByTagNameAndClass_(document, "*", a, b)
+};
+goog.dom.getElementByClass = function (a, b) {
+	var c = b || document;
+	return (c.getElementsByClassName ? c.getElementsByClassName(a)[0] : goog.dom.canUseQuerySelector_(c) ? c.querySelector("." + a) : goog.dom.getElementsByTagNameAndClass_(document, "*", a, b)[0]) || null
+};
+goog.dom.getRequiredElementByClass = function (a, b) {
+	var c = goog.dom.getElementByClass(a, b);
+	return goog.asserts.assert(c, "No element found with className: " + a)
+};
+goog.dom.canUseQuerySelector_ = function (a) {
+	return !(!a.querySelectorAll || !a.querySelector)
+};
+goog.dom.getElementsByTagNameAndClass_ = function (a, b, c, d) {
+	a = d || a;
+	b = b && "*" != b ? String(b).toUpperCase() : "";
+	if (goog.dom.canUseQuerySelector_(a) && (b || c)) return a.querySelectorAll(b + (c ? "." + c : ""));
+	if (c && a.getElementsByClassName) {
+		a = a.getElementsByClassName(c);
+		if (b) {
+			d = {};
+			for (var e = 0, f = 0, g; g = a[f]; f++) b == g.nodeName && (d[e++] = g);
+			d.length = e;
+			return d
+		}
+		return a
+	}
+	a = a.getElementsByTagName(b || "*");
+	if (c) {
+		d = {};
+		for (f = e = 0; g = a[f]; f++) b = g.className, "function" == typeof b.split && goog.array.contains(b.split(/\s+/), c) && (d[e++] = g);
+		d.length = e;
+		return d
+	}
+	return a
+};
+goog.dom.$$ = goog.dom.getElementsByTagNameAndClass;
+goog.dom.setProperties = function (a, b) {
+	goog.object.forEach(b, function (b, d) {
+		"style" == d ? a.style.cssText = b : "class" == d ? a.className = b : "for" == d ? a.htmlFor = b : goog.dom.DIRECT_ATTRIBUTE_MAP_.hasOwnProperty(d) ? a.setAttribute(goog.dom.DIRECT_ATTRIBUTE_MAP_[d], b) : goog.string.startsWith(d, "aria-") || goog.string.startsWith(d, "data-") ? a.setAttribute(d, b) : a[d] = b
+	})
+};
+goog.dom.DIRECT_ATTRIBUTE_MAP_ = {
+	cellpadding: "cellPadding",
+	cellspacing: "cellSpacing",
+	colspan: "colSpan",
+	frameborder: "frameBorder",
+	height: "height",
+	maxlength: "maxLength",
+	nonce: "nonce",
+	role: "role",
+	rowspan: "rowSpan",
+	type: "type",
+	usemap: "useMap",
+	valign: "vAlign",
+	width: "width"
+};
+goog.dom.getViewportSize = function (a) {
+	return goog.dom.getViewportSize_(a || window)
+};
+goog.dom.getViewportSize_ = function (a) {
+	a = a.document;
+	a = goog.dom.isCss1CompatMode_(a) ? a.documentElement : a.body;
+	return new goog.math.Size(a.clientWidth, a.clientHeight)
+};
+goog.dom.getDocumentHeight = function () {
+	return goog.dom.getDocumentHeight_(window)
+};
+goog.dom.getDocumentHeightForWindow = function (a) {
+	return goog.dom.getDocumentHeight_(a)
+};
+goog.dom.getDocumentHeight_ = function (a) {
+	var b = a.document,
+		c = 0;
+	if (b) {
+		var c = b.body,
+			d = b.documentElement;
+		if (!d || !c) return 0;
+		a = goog.dom.getViewportSize_(a).height;
+		if (goog.dom.isCss1CompatMode_(b) && d.scrollHeight) c = d.scrollHeight != a ? d.scrollHeight : d.offsetHeight;
+		else {
+			var b = d.scrollHeight,
+				e = d.offsetHeight;
+			d.clientHeight != e && (b = c.scrollHeight, e = c.offsetHeight);
+			c = b > a ? b > e ? b : e : b < e ? b : e
+		}
+	}
+	return c
+};
+goog.dom.getPageScroll = function (a) {
+	return goog.dom.getDomHelper((a || goog.global || window).document).getDocumentScroll()
+};
+goog.dom.getDocumentScroll = function () {
+	return goog.dom.getDocumentScroll_(document)
+};
+goog.dom.getDocumentScroll_ = function (a) {
+	var b = goog.dom.getDocumentScrollElement_(a);
+	a = goog.dom.getWindow_(a);
+	return goog.userAgent.IE && goog.userAgent.isVersionOrHigher("10") && a.pageYOffset != b.scrollTop ? new goog.math.Coordinate(b.scrollLeft, b.scrollTop) : new goog.math.Coordinate(a.pageXOffset || b.scrollLeft, a.pageYOffset || b.scrollTop)
+};
+goog.dom.getDocumentScrollElement = function () {
+	return goog.dom.getDocumentScrollElement_(document)
+};
+goog.dom.getDocumentScrollElement_ = function (a) {
+	return a.scrollingElement ? a.scrollingElement : !goog.userAgent.WEBKIT && goog.dom.isCss1CompatMode_(a) ? a.documentElement : a.body || a.documentElement
+};
+goog.dom.getWindow = function (a) {
+	return a ? goog.dom.getWindow_(a) : window
+};
+goog.dom.getWindow_ = function (a) {
+	return a.parentWindow || a.defaultView
+};
+goog.dom.createDom = function (a, b, c) {
+	return goog.dom.createDom_(document, arguments)
+};
+goog.dom.createDom_ = function (a, b) {
+	var c = String(b[0]),
+		d = b[1];
+	if (!goog.dom.BrowserFeature.CAN_ADD_NAME_OR_TYPE_ATTRIBUTES && d && (d.name || d.type)) {
+		c = ["<", c];
+		d.name && c.push(' name="', goog.string.htmlEscape(d.name), '"');
+		if (d.type) {
+			c.push(' type="', goog.string.htmlEscape(d.type), '"');
+			var e = {};
+			goog.object.extend(e, d);
+			delete e.type;
+			d = e
+		}
+		c.push(">");
+		c = c.join("")
+	}
+	c = a.createElement(c);
+	d && (goog.isString(d) ? c.className = d : goog.isArray(d) ? c.className = d.join(" ") : goog.dom.setProperties(c, d));
+	2 < b.length && goog.dom.append_(a,
+		c, b, 2);
+	return c
+};
+goog.dom.append_ = function (a, b, c, d) {
+	function e(c) {
+		c && b.appendChild(goog.isString(c) ? a.createTextNode(c) : c)
+	}
+	for (; d < c.length; d++) {
+		var f = c[d];
+		goog.isArrayLike(f) && !goog.dom.isNodeLike(f) ? goog.array.forEach(goog.dom.isNodeList(f) ? goog.array.toArray(f) : f, e) : e(f)
+	}
+};
+goog.dom.$dom = goog.dom.createDom;
+goog.dom.createElement = function (a) {
+	return goog.dom.createElement_(document, a)
+};
+goog.dom.createElement_ = function (a, b) {
+	return a.createElement(String(b))
+};
+goog.dom.createTextNode = function (a) {
+	return document.createTextNode(String(a))
+};
+goog.dom.createTable = function (a, b, c) {
+	return goog.dom.createTable_(document, a, b, !!c)
+};
+goog.dom.createTable_ = function (a, b, c, d) {
+	for (var e = goog.dom.createElement_(a, "TABLE"), f = e.appendChild(goog.dom.createElement_(a, "TBODY")), g = 0; g < b; g++) {
+		for (var h = goog.dom.createElement_(a, "TR"), k = 0; k < c; k++) {
+			var m = goog.dom.createElement_(a, "TD");
+			d && goog.dom.setTextContent(m, goog.string.Unicode.NBSP);
+			h.appendChild(m)
+		}
+		f.appendChild(h)
+	}
+	return e
+};
+goog.dom.constHtmlToNode = function (a) {
+	var b = goog.array.map(arguments, goog.string.Const.unwrap),
+		b = goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Constant HTML string, that gets turned into a Node later, so it will be automatically balanced."), b.join(""));
+	return goog.dom.safeHtmlToNode(b)
+};
+goog.dom.safeHtmlToNode = function (a) {
+	return goog.dom.safeHtmlToNode_(document, a)
+};
+goog.dom.safeHtmlToNode_ = function (a, b) {
+	var c = goog.dom.createElement_(a, "DIV");
+	goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT ? (goog.dom.safe.setInnerHtml(c, goog.html.SafeHtml.concat(goog.html.SafeHtml.BR, b)), c.removeChild(c.firstChild)) : goog.dom.safe.setInnerHtml(c, b);
+	return goog.dom.childrenToNode_(a, c)
+};
+goog.dom.childrenToNode_ = function (a, b) {
+	if (1 == b.childNodes.length) return b.removeChild(b.firstChild);
+	for (var c = a.createDocumentFragment() ; b.firstChild;) c.appendChild(b.firstChild);
+	return c
+};
+goog.dom.isCss1CompatMode = function () {
+	return goog.dom.isCss1CompatMode_(document)
+};
+goog.dom.isCss1CompatMode_ = function (a) {
+	return goog.dom.COMPAT_MODE_KNOWN_ ? goog.dom.ASSUME_STANDARDS_MODE : "CSS1Compat" == a.compatMode
+};
+goog.dom.canHaveChildren = function (a) {
+	if (a.nodeType != goog.dom.NodeType.ELEMENT) return !1;
+	switch (a.tagName) {
+		case "APPLET":
+		case "AREA":
+		case "BASE":
+		case "BR":
+		case "COL":
+		case "COMMAND":
+		case "EMBED":
+		case "FRAME":
+		case "HR":
+		case "IMG":
+		case "INPUT":
+		case "IFRAME":
+		case "ISINDEX":
+		case "KEYGEN":
+		case "LINK":
+		case "NOFRAMES":
+		case "NOSCRIPT":
+		case "META":
+		case "OBJECT":
+		case "PARAM":
+		case "SCRIPT":
+		case "SOURCE":
+		case "STYLE":
+		case "TRACK":
+		case "WBR":
+			return !1
+	}
+	return !0
+};
+goog.dom.appendChild = function (a, b) {
+	a.appendChild(b)
+};
+goog.dom.append = function (a, b) {
+	goog.dom.append_(goog.dom.getOwnerDocument(a), a, arguments, 1)
+};
+goog.dom.removeChildren = function (a) {
+	for (var b; b = a.firstChild;) a.removeChild(b)
+};
+goog.dom.insertSiblingBefore = function (a, b) {
+	b.parentNode && b.parentNode.insertBefore(a, b)
+};
+goog.dom.insertSiblingAfter = function (a, b) {
+	b.parentNode && b.parentNode.insertBefore(a, b.nextSibling)
+};
+goog.dom.insertChildAt = function (a, b, c) {
+	a.insertBefore(b, a.childNodes[c] || null)
+};
+goog.dom.removeNode = function (a) {
+	return a && a.parentNode ? a.parentNode.removeChild(a) : null
+};
+goog.dom.replaceNode = function (a, b) {
+	var c = b.parentNode;
+	c && c.replaceChild(a, b)
+};
+goog.dom.flattenElement = function (a) {
+	var b, c = a.parentNode;
+	if (c && c.nodeType != goog.dom.NodeType.DOCUMENT_FRAGMENT) {
+		if (a.removeNode) return a.removeNode(!1);
+		for (; b = a.firstChild;) c.insertBefore(b, a);
+		return goog.dom.removeNode(a)
+	}
+};
+goog.dom.getChildren = function (a) {
+	return goog.dom.BrowserFeature.CAN_USE_CHILDREN_ATTRIBUTE && void 0 != a.children ? a.children : goog.array.filter(a.childNodes, function (a) {
+		return a.nodeType == goog.dom.NodeType.ELEMENT
+	})
+};
+goog.dom.getFirstElementChild = function (a) {
+	return goog.isDef(a.firstElementChild) ? a.firstElementChild : goog.dom.getNextElementNode_(a.firstChild, !0)
+};
+goog.dom.getLastElementChild = function (a) {
+	return goog.isDef(a.lastElementChild) ? a.lastElementChild : goog.dom.getNextElementNode_(a.lastChild, !1)
+};
+goog.dom.getNextElementSibling = function (a) {
+	return goog.isDef(a.nextElementSibling) ? a.nextElementSibling : goog.dom.getNextElementNode_(a.nextSibling, !0)
+};
+goog.dom.getPreviousElementSibling = function (a) {
+	return goog.isDef(a.previousElementSibling) ? a.previousElementSibling : goog.dom.getNextElementNode_(a.previousSibling, !1)
+};
+goog.dom.getNextElementNode_ = function (a, b) {
+	for (; a && a.nodeType != goog.dom.NodeType.ELEMENT;) a = b ? a.nextSibling : a.previousSibling;
+	return a
+};
+goog.dom.getNextNode = function (a) {
+	if (!a) return null;
+	if (a.firstChild) return a.firstChild;
+	for (; a && !a.nextSibling;) a = a.parentNode;
+	return a ? a.nextSibling : null
+};
+goog.dom.getPreviousNode = function (a) {
+	if (!a) return null;
+	if (!a.previousSibling) return a.parentNode;
+	for (a = a.previousSibling; a && a.lastChild;) a = a.lastChild;
+	return a
+};
+goog.dom.isNodeLike = function (a) {
+	return goog.isObject(a) && 0 < a.nodeType
+};
+goog.dom.isElement = function (a) {
+	return goog.isObject(a) && a.nodeType == goog.dom.NodeType.ELEMENT
+};
+goog.dom.isWindow = function (a) {
+	return goog.isObject(a) && a.window == a
+};
+goog.dom.getParentElement = function (a) {
+	var b;
+	if (goog.dom.BrowserFeature.CAN_USE_PARENT_ELEMENT_PROPERTY && !(goog.userAgent.IE && goog.userAgent.isVersionOrHigher("9") && !goog.userAgent.isVersionOrHigher("10") && goog.global.SVGElement && a instanceof goog.global.SVGElement) && (b = a.parentElement)) return b;
+	b = a.parentNode;
+	return goog.dom.isElement(b) ? b : null
+};
+goog.dom.contains = function (a, b) {
+	if (!a || !b) return !1;
+	if (a.contains && b.nodeType == goog.dom.NodeType.ELEMENT) return a == b || a.contains(b);
+	if ("undefined" != typeof a.compareDocumentPosition) return a == b || !!(a.compareDocumentPosition(b) & 16);
+	for (; b && a != b;) b = b.parentNode;
+	return b == a
+};
+goog.dom.compareNodeOrder = function (a, b) {
+	if (a == b) return 0;
+	if (a.compareDocumentPosition) return a.compareDocumentPosition(b) & 2 ? 1 : -1;
+	if (goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(9)) {
+		if (a.nodeType == goog.dom.NodeType.DOCUMENT) return -1;
+		if (b.nodeType == goog.dom.NodeType.DOCUMENT) return 1
+	}
+	if ("sourceIndex" in a || a.parentNode && "sourceIndex" in a.parentNode) {
+		var c = a.nodeType == goog.dom.NodeType.ELEMENT,
+			d = b.nodeType == goog.dom.NodeType.ELEMENT;
+		if (c && d) return a.sourceIndex - b.sourceIndex;
+		var e = a.parentNode,
+			f = b.parentNode;
+		return e == f ? goog.dom.compareSiblingOrder_(a, b) : !c && goog.dom.contains(e, b) ? -1 * goog.dom.compareParentsDescendantNodeIe_(a, b) : !d && goog.dom.contains(f, a) ? goog.dom.compareParentsDescendantNodeIe_(b, a) : (c ? a.sourceIndex : e.sourceIndex) - (d ? b.sourceIndex : f.sourceIndex)
+	}
+	d = goog.dom.getOwnerDocument(a);
+	c = d.createRange();
+	c.selectNode(a);
+	c.collapse(!0);
+	d = d.createRange();
+	d.selectNode(b);
+	d.collapse(!0);
+	return c.compareBoundaryPoints(goog.global.Range.START_TO_END, d)
+};
+goog.dom.compareParentsDescendantNodeIe_ = function (a, b) {
+	var c = a.parentNode;
+	if (c == b) return -1;
+	for (var d = b; d.parentNode != c;) d = d.parentNode;
+	return goog.dom.compareSiblingOrder_(d, a)
+};
+goog.dom.compareSiblingOrder_ = function (a, b) {
+	for (var c = b; c = c.previousSibling;)
+		if (c == a) return -1;
+	return 1
+};
+goog.dom.findCommonAncestor = function (a) {
+	var b, c = arguments.length;
+	if (!c) return null;
+	if (1 == c) return arguments[0];
+	var d = [],
+		e = Infinity;
+	for (b = 0; b < c; b++) {
+		for (var f = [], g = arguments[b]; g;) f.unshift(g), g = g.parentNode;
+		d.push(f);
+		e = Math.min(e, f.length)
+	}
+	f = null;
+	for (b = 0; b < e; b++) {
+		for (var g = d[0][b], h = 1; h < c; h++)
+			if (g != d[h][b]) return f;
+		f = g
+	}
+	return f
+};
+goog.dom.getOwnerDocument = function (a) {
+	goog.asserts.assert(a, "Node cannot be null or undefined.");
+	return a.nodeType == goog.dom.NodeType.DOCUMENT ? a : a.ownerDocument || a.document
+};
+goog.dom.getFrameContentDocument = function (a) {
+	return a.contentDocument || a.contentWindow.document
+};
+goog.dom.getFrameContentWindow = function (a) {
+	try {
+		return a.contentWindow || (a.contentDocument ? goog.dom.getWindow(a.contentDocument) : null)
+	} catch (b) { }
+	return null
+};
+goog.dom.setTextContent = function (a, b) {
+	goog.asserts.assert(null != a, "goog.dom.setTextContent expects a non-null value for node");
+	if ("textContent" in a) a.textContent = b;
+	else if (a.nodeType == goog.dom.NodeType.TEXT) a.data = b;
+	else if (a.firstChild && a.firstChild.nodeType == goog.dom.NodeType.TEXT) {
+		for (; a.lastChild != a.firstChild;) a.removeChild(a.lastChild);
+		a.firstChild.data = b
+	} else {
+		goog.dom.removeChildren(a);
+		var c = goog.dom.getOwnerDocument(a);
+		a.appendChild(c.createTextNode(String(b)))
+	}
+};
+goog.dom.getOuterHtml = function (a) {
+	goog.asserts.assert(null !== a, "goog.dom.getOuterHtml expects a non-null value for element");
+	if ("outerHTML" in a) return a.outerHTML;
+	var b = goog.dom.getOwnerDocument(a),
+		b = goog.dom.createElement_(b, "DIV");
+	b.appendChild(a.cloneNode(!0));
+	return b.innerHTML
+};
+goog.dom.findNode = function (a, b) {
+	var c = [];
+	return goog.dom.findNodes_(a, b, c, !0) ? c[0] : void 0
+};
+goog.dom.findNodes = function (a, b) {
+	var c = [];
+	goog.dom.findNodes_(a, b, c, !1);
+	return c
+};
+goog.dom.findNodes_ = function (a, b, c, d) {
+	if (null != a)
+		for (a = a.firstChild; a;) {
+			if (b(a) && (c.push(a), d) || goog.dom.findNodes_(a, b, c, d)) return !0;
+			a = a.nextSibling
+		}
+	return !1
+};
+goog.dom.TAGS_TO_IGNORE_ = {
+	SCRIPT: 1,
+	STYLE: 1,
+	HEAD: 1,
+	IFRAME: 1,
+	OBJECT: 1
+};
+goog.dom.PREDEFINED_TAG_VALUES_ = {
+	IMG: " ",
+	BR: "\n"
+};
+goog.dom.isFocusableTabIndex = function (a) {
+	return goog.dom.hasSpecifiedTabIndex_(a) && goog.dom.isTabIndexFocusable_(a)
+};
+goog.dom.setFocusableTabIndex = function (a, b) {
+	b ? a.tabIndex = 0 : (a.tabIndex = -1, a.removeAttribute("tabIndex"))
+};
+goog.dom.isFocusable = function (a) {
+	var b;
+	return (b = goog.dom.nativelySupportsFocus_(a) ? !a.disabled && (!goog.dom.hasSpecifiedTabIndex_(a) || goog.dom.isTabIndexFocusable_(a)) : goog.dom.isFocusableTabIndex(a)) && goog.userAgent.IE ? goog.dom.hasNonZeroBoundingRect_(a) : b
+};
+goog.dom.hasSpecifiedTabIndex_ = function (a) {
+	return goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("9") ? (a = a.getAttributeNode("tabindex"), goog.isDefAndNotNull(a) && a.specified) : a.hasAttribute("tabindex")
+};
+goog.dom.isTabIndexFocusable_ = function (a) {
+	a = a.tabIndex;
+	return goog.isNumber(a) && 0 <= a && 32768 > a
+};
+goog.dom.nativelySupportsFocus_ = function (a) {
+	return "A" == a.tagName || "INPUT" == a.tagName || "TEXTAREA" == a.tagName || "SELECT" == a.tagName || "BUTTON" == a.tagName
+};
+goog.dom.hasNonZeroBoundingRect_ = function (a) {
+	a = !goog.isFunction(a.getBoundingClientRect) || goog.userAgent.IE && null == a.parentElement ? {
+		height: a.offsetHeight,
+		width: a.offsetWidth
+	} : a.getBoundingClientRect();
+	return goog.isDefAndNotNull(a) && 0 < a.height && 0 < a.width
+};
+goog.dom.getTextContent = function (a) {
+	if (goog.dom.BrowserFeature.CAN_USE_INNER_TEXT && null !== a && "innerText" in a) a = goog.string.canonicalizeNewlines(a.innerText);
+	else {
+		var b = [];
+		goog.dom.getTextContent_(a, b, !0);
+		a = b.join("")
+	}
+	a = a.replace(/ \xAD /g, " ").replace(/\xAD/g, "");
+	a = a.replace(/\u200B/g, "");
+	goog.dom.BrowserFeature.CAN_USE_INNER_TEXT || (a = a.replace(/ +/g, " "));
+	" " != a && (a = a.replace(/^\s*/, ""));
+	return a
+};
+goog.dom.getRawTextContent = function (a) {
+	var b = [];
+	goog.dom.getTextContent_(a, b, !1);
+	return b.join("")
+};
+goog.dom.getTextContent_ = function (a, b, c) {
+	if (!(a.nodeName in goog.dom.TAGS_TO_IGNORE_))
+		if (a.nodeType == goog.dom.NodeType.TEXT) c ? b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g, "")) : b.push(a.nodeValue);
+		else if (a.nodeName in goog.dom.PREDEFINED_TAG_VALUES_) b.push(goog.dom.PREDEFINED_TAG_VALUES_[a.nodeName]);
+		else
+			for (a = a.firstChild; a;) goog.dom.getTextContent_(a, b, c), a = a.nextSibling
+};
+goog.dom.getNodeTextLength = function (a) {
+	return goog.dom.getTextContent(a).length
+};
+goog.dom.getNodeTextOffset = function (a, b) {
+	for (var c = b || goog.dom.getOwnerDocument(a).body, d = []; a && a != c;) {
+		for (var e = a; e = e.previousSibling;) d.unshift(goog.dom.getTextContent(e));
+		a = a.parentNode
+	}
+	return goog.string.trimLeft(d.join("")).replace(/ +/g, " ").length
+};
+goog.dom.getNodeAtOffset = function (a, b, c) {
+	a = [a];
+	for (var d = 0, e = null; 0 < a.length && d < b;)
+		if (e = a.pop(), !(e.nodeName in goog.dom.TAGS_TO_IGNORE_))
+			if (e.nodeType == goog.dom.NodeType.TEXT) var f = e.nodeValue.replace(/(\r\n|\r|\n)/g, "").replace(/ +/g, " "),
+				d = d + f.length;
+			else if (e.nodeName in goog.dom.PREDEFINED_TAG_VALUES_) d += goog.dom.PREDEFINED_TAG_VALUES_[e.nodeName].length;
+			else
+				for (f = e.childNodes.length - 1; 0 <= f; f--) a.push(e.childNodes[f]);
+	goog.isObject(c) && (c.remainder = e ? e.nodeValue.length + b - d - 1 : 0, c.node = e);
+	return e
+};
+goog.dom.isNodeList = function (a) {
+	if (a && "number" == typeof a.length) {
+		if (goog.isObject(a)) return "function" == typeof a.item || "string" == typeof a.item;
+		if (goog.isFunction(a)) return "function" == typeof a.item
+	}
+	return !1
+};
+goog.dom.getAncestorByTagNameAndClass = function (a, b, c, d) {
+	if (!b && !c) return null;
+	var e = b ? String(b).toUpperCase() : null;
+	return goog.dom.getAncestor(a, function (a) {
+		return (!e || a.nodeName == e) && (!c || goog.isString(a.className) && goog.array.contains(a.className.split(/\s+/), c))
+	}, !0, d)
+};
+goog.dom.getAncestorByClass = function (a, b, c) {
+	return goog.dom.getAncestorByTagNameAndClass(a, null, b, c)
+};
+goog.dom.getAncestor = function (a, b, c, d) {
+	c || (a = a.parentNode);
+	for (c = 0; a && (null == d || c <= d) ;) {
+		goog.asserts.assert("parentNode" != a.name);
+		if (b(a)) return a;
+		a = a.parentNode;
+		c++
+	}
+	return null
+};
+goog.dom.getActiveElement = function (a) {
+	try {
+		return a && a.activeElement
+	} catch (b) { }
+	return null
+};
+goog.dom.getPixelRatio = function () {
+	var a = goog.dom.getWindow();
+	return goog.isDef(a.devicePixelRatio) ? a.devicePixelRatio : a.matchMedia ? goog.dom.matchesPixelRatio_(3) || goog.dom.matchesPixelRatio_(2) || goog.dom.matchesPixelRatio_(1.5) || goog.dom.matchesPixelRatio_(1) || .75 : 1
+};
+goog.dom.matchesPixelRatio_ = function (a) {
+	return goog.dom.getWindow().matchMedia("(min-resolution: " + a + "dppx),(min--moz-device-pixel-ratio: " + a + "),(min-resolution: " + 96 * a + "dpi)").matches ? a : 0
+};
+goog.dom.getCanvasContext2D = function (a) {
+	return a.getContext("2d")
+};
+goog.dom.DomHelper = function (a) {
+	this.document_ = a || goog.global.document || document
+};
+goog.dom.DomHelper.prototype.getDomHelper = goog.dom.getDomHelper;
+goog.dom.DomHelper.prototype.setDocument = function (a) {
+	this.document_ = a
+};
+goog.dom.DomHelper.prototype.getDocument = function () {
+	return this.document_
+};
+goog.dom.DomHelper.prototype.getElement = function (a) {
+	return goog.dom.getElementHelper_(this.document_, a)
+};
+goog.dom.DomHelper.prototype.getRequiredElement = function (a) {
+	return goog.dom.getRequiredElementHelper_(this.document_, a)
+};
+goog.dom.DomHelper.prototype.$ = goog.dom.DomHelper.prototype.getElement;
+goog.dom.DomHelper.prototype.getElementsByTagName = function (a, b) {
+	return (b || this.document_).getElementsByTagName(String(a))
+};
+goog.dom.DomHelper.prototype.getElementsByTagNameAndClass = function (a, b, c) {
+	return goog.dom.getElementsByTagNameAndClass_(this.document_, a, b, c)
+};
+goog.dom.DomHelper.prototype.getElementsByClass = function (a, b) {
+	return goog.dom.getElementsByClass(a, b || this.document_)
+};
+goog.dom.DomHelper.prototype.getElementByClass = function (a, b) {
+	return goog.dom.getElementByClass(a, b || this.document_)
+};
+goog.dom.DomHelper.prototype.getRequiredElementByClass = function (a, b) {
+	return goog.dom.getRequiredElementByClass(a, b || this.document_)
+};
+goog.dom.DomHelper.prototype.$$ = goog.dom.DomHelper.prototype.getElementsByTagNameAndClass;
+goog.dom.DomHelper.prototype.setProperties = goog.dom.setProperties;
+goog.dom.DomHelper.prototype.getViewportSize = function (a) {
+	return goog.dom.getViewportSize(a || this.getWindow())
+};
+goog.dom.DomHelper.prototype.getDocumentHeight = function () {
+	return goog.dom.getDocumentHeight_(this.getWindow())
+};
+goog.dom.DomHelper.prototype.createDom = function (a, b, c) {
+	return goog.dom.createDom_(this.document_, arguments)
+};
+goog.dom.DomHelper.prototype.$dom = goog.dom.DomHelper.prototype.createDom;
+goog.dom.DomHelper.prototype.createElement = function (a) {
+	return goog.dom.createElement_(this.document_, a)
+};
+goog.dom.DomHelper.prototype.createTextNode = function (a) {
+	return this.document_.createTextNode(String(a))
+};
+goog.dom.DomHelper.prototype.createTable = function (a, b, c) {
+	return goog.dom.createTable_(this.document_, a, b, !!c)
+};
+goog.dom.DomHelper.prototype.safeHtmlToNode = function (a) {
+	return goog.dom.safeHtmlToNode_(this.document_, a)
+};
+goog.dom.DomHelper.prototype.isCss1CompatMode = function () {
+	return goog.dom.isCss1CompatMode_(this.document_)
+};
+goog.dom.DomHelper.prototype.getWindow = function () {
+	return goog.dom.getWindow_(this.document_)
+};
+goog.dom.DomHelper.prototype.getDocumentScrollElement = function () {
+	return goog.dom.getDocumentScrollElement_(this.document_)
+};
+goog.dom.DomHelper.prototype.getDocumentScroll = function () {
+	return goog.dom.getDocumentScroll_(this.document_)
+};
+goog.dom.DomHelper.prototype.getActiveElement = function (a) {
+	return goog.dom.getActiveElement(a || this.document_)
+};
+goog.dom.DomHelper.prototype.appendChild = goog.dom.appendChild;
+goog.dom.DomHelper.prototype.append = goog.dom.append;
+goog.dom.DomHelper.prototype.canHaveChildren = goog.dom.canHaveChildren;
+goog.dom.DomHelper.prototype.removeChildren = goog.dom.removeChildren;
+goog.dom.DomHelper.prototype.insertSiblingBefore = goog.dom.insertSiblingBefore;
+goog.dom.DomHelper.prototype.insertSiblingAfter = goog.dom.insertSiblingAfter;
+goog.dom.DomHelper.prototype.insertChildAt = goog.dom.insertChildAt;
+goog.dom.DomHelper.prototype.removeNode = goog.dom.removeNode;
+goog.dom.DomHelper.prototype.replaceNode = goog.dom.replaceNode;
+goog.dom.DomHelper.prototype.flattenElement = goog.dom.flattenElement;
+goog.dom.DomHelper.prototype.getChildren = goog.dom.getChildren;
+goog.dom.DomHelper.prototype.getFirstElementChild = goog.dom.getFirstElementChild;
+goog.dom.DomHelper.prototype.getLastElementChild = goog.dom.getLastElementChild;
+goog.dom.DomHelper.prototype.getNextElementSibling = goog.dom.getNextElementSibling;
+goog.dom.DomHelper.prototype.getPreviousElementSibling = goog.dom.getPreviousElementSibling;
+goog.dom.DomHelper.prototype.getNextNode = goog.dom.getNextNode;
+goog.dom.DomHelper.prototype.getPreviousNode = goog.dom.getPreviousNode;
+goog.dom.DomHelper.prototype.isNodeLike = goog.dom.isNodeLike;
+goog.dom.DomHelper.prototype.isElement = goog.dom.isElement;
+goog.dom.DomHelper.prototype.isWindow = goog.dom.isWindow;
+goog.dom.DomHelper.prototype.getParentElement = goog.dom.getParentElement;
+goog.dom.DomHelper.prototype.contains = goog.dom.contains;
+goog.dom.DomHelper.prototype.compareNodeOrder = goog.dom.compareNodeOrder;
+goog.dom.DomHelper.prototype.findCommonAncestor = goog.dom.findCommonAncestor;
+goog.dom.DomHelper.prototype.getOwnerDocument = goog.dom.getOwnerDocument;
+goog.dom.DomHelper.prototype.getFrameContentDocument = goog.dom.getFrameContentDocument;
+goog.dom.DomHelper.prototype.getFrameContentWindow = goog.dom.getFrameContentWindow;
+goog.dom.DomHelper.prototype.setTextContent = goog.dom.setTextContent;
+goog.dom.DomHelper.prototype.getOuterHtml = goog.dom.getOuterHtml;
+goog.dom.DomHelper.prototype.findNode = goog.dom.findNode;
+goog.dom.DomHelper.prototype.findNodes = goog.dom.findNodes;
+goog.dom.DomHelper.prototype.isFocusableTabIndex = goog.dom.isFocusableTabIndex;
+goog.dom.DomHelper.prototype.setFocusableTabIndex = goog.dom.setFocusableTabIndex;
+goog.dom.DomHelper.prototype.isFocusable = goog.dom.isFocusable;
+goog.dom.DomHelper.prototype.getTextContent = goog.dom.getTextContent;
+goog.dom.DomHelper.prototype.getNodeTextLength = goog.dom.getNodeTextLength;
+goog.dom.DomHelper.prototype.getNodeTextOffset = goog.dom.getNodeTextOffset;
+goog.dom.DomHelper.prototype.getNodeAtOffset = goog.dom.getNodeAtOffset;
+goog.dom.DomHelper.prototype.isNodeList = goog.dom.isNodeList;
+goog.dom.DomHelper.prototype.getAncestorByTagNameAndClass = goog.dom.getAncestorByTagNameAndClass;
+goog.dom.DomHelper.prototype.getAncestorByClass = goog.dom.getAncestorByClass;
+goog.dom.DomHelper.prototype.getAncestor = goog.dom.getAncestor;
+goog.dom.DomHelper.prototype.getCanvasContext2D = goog.dom.getCanvasContext2D;
+goog.dom.vendor = {};
+goog.dom.vendor.getVendorJsPrefix = function () {
+	return goog.userAgent.WEBKIT ? "Webkit" : goog.userAgent.GECKO ? "Moz" : goog.userAgent.IE ? "ms" : goog.userAgent.OPERA ? "O" : null
+};
+goog.dom.vendor.getVendorPrefix = function () {
+	return goog.userAgent.WEBKIT ? "-webkit" : goog.userAgent.GECKO ? "-moz" : goog.userAgent.IE ? "-ms" : goog.userAgent.OPERA ? "-o" : null
+};
+goog.dom.vendor.getPrefixedPropertyName = function (a, b) {
+	if (b && a in b) return a;
+	var c = goog.dom.vendor.getVendorJsPrefix();
+	return c ? (c = c.toLowerCase(), c += goog.string.toTitleCase(a), !goog.isDef(b) || c in b ? c : null) : null
+};
+goog.dom.vendor.getPrefixedEventType = function (a) {
+	return ((goog.dom.vendor.getVendorJsPrefix() || "") + a).toLowerCase()
+};
+goog.html.legacyconversions = {};
+goog.html.legacyconversions.safeHtmlFromString = function (a) {
+	goog.html.legacyconversions.reportCallback_();
+	return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(a, null)
+};
+goog.html.legacyconversions.safeStyleFromString = function (a) {
+	goog.html.legacyconversions.reportCallback_();
+	return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(a)
+};
+goog.html.legacyconversions.safeStyleSheetFromString = function (a) {
+	goog.html.legacyconversions.reportCallback_();
+	return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(a)
+};
+goog.html.legacyconversions.safeUrlFromString = function (a) {
+	goog.html.legacyconversions.reportCallback_();
+	return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)
+};
+goog.html.legacyconversions.trustedResourceUrlFromString = function (a) {
+	goog.html.legacyconversions.reportCallback_();
+	return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(a)
+};
+goog.html.legacyconversions.reportCallback_ = goog.nullFunction;
+goog.html.legacyconversions.setReportCallback = function (a) {
+	goog.html.legacyconversions.reportCallback_ = a
+};
+goog.math.Box = function (a, b, c, d) {
+	this.top = a;
+	this.right = b;
+	this.bottom = c;
+	this.left = d
+};
+goog.math.Box.boundingBox = function (a) {
+	for (var b = new goog.math.Box(arguments[0].y, arguments[0].x, arguments[0].y, arguments[0].x), c = 1; c < arguments.length; c++) b.expandToIncludeCoordinate(arguments[c]);
+	return b
+};
+goog.math.Box.prototype.getWidth = function () {
+	return this.right - this.left
+};
+goog.math.Box.prototype.getHeight = function () {
+	return this.bottom - this.top
+};
+goog.math.Box.prototype.clone = function () {
+	return new goog.math.Box(this.top, this.right, this.bottom, this.left)
+};
+goog.DEBUG && (goog.math.Box.prototype.toString = function () {
+	return "(" + this.top + "t, " + this.right + "r, " + this.bottom + "b, " + this.left + "l)"
+});
+goog.math.Box.prototype.contains = function (a) {
+	return goog.math.Box.contains(this, a)
+};
+goog.math.Box.prototype.expand = function (a, b, c, d) {
+	goog.isObject(a) ? (this.top -= a.top, this.right += a.right, this.bottom += a.bottom, this.left -= a.left) : (this.top -= a, this.right += Number(b), this.bottom += Number(c), this.left -= Number(d));
+	return this
+};
+goog.math.Box.prototype.expandToInclude = function (a) {
+	this.left = Math.min(this.left, a.left);
+	this.top = Math.min(this.top, a.top);
+	this.right = Math.max(this.right, a.right);
+	this.bottom = Math.max(this.bottom, a.bottom)
+};
+goog.math.Box.prototype.expandToIncludeCoordinate = function (a) {
+	this.top = Math.min(this.top, a.y);
+	this.right = Math.max(this.right, a.x);
+	this.bottom = Math.max(this.bottom, a.y);
+	this.left = Math.min(this.left, a.x)
+};
+goog.math.Box.equals = function (a, b) {
+	return a == b ? !0 : a && b ? a.top == b.top && a.right == b.right && a.bottom == b.bottom && a.left == b.left : !1
+};
+goog.math.Box.contains = function (a, b) {
+	return a && b ? b instanceof goog.math.Box ? b.left >= a.left && b.right <= a.right && b.top >= a.top && b.bottom <= a.bottom : b.x >= a.left && b.x <= a.right && b.y >= a.top && b.y <= a.bottom : !1
+};
+goog.math.Box.relativePositionX = function (a, b) {
+	return b.x < a.left ? b.x - a.left : b.x > a.right ? b.x - a.right : 0
+};
+goog.math.Box.relativePositionY = function (a, b) {
+	return b.y < a.top ? b.y - a.top : b.y > a.bottom ? b.y - a.bottom : 0
+};
+goog.math.Box.distance = function (a, b) {
+	var c = goog.math.Box.relativePositionX(a, b),
+		d = goog.math.Box.relativePositionY(a, b);
+	return Math.sqrt(c * c + d * d)
+};
+goog.math.Box.intersects = function (a, b) {
+	return a.left <= b.right && b.left <= a.right && a.top <= b.bottom && b.top <= a.bottom
+};
+goog.math.Box.intersectsWithPadding = function (a, b, c) {
+	return a.left <= b.right + c && b.left <= a.right + c && a.top <= b.bottom + c && b.top <= a.bottom + c
+};
+goog.math.Box.prototype.ceil = function () {
+	this.top = Math.ceil(this.top);
+	this.right = Math.ceil(this.right);
+	this.bottom = Math.ceil(this.bottom);
+	this.left = Math.ceil(this.left);
+	return this
+};
+goog.math.Box.prototype.floor = function () {
+	this.top = Math.floor(this.top);
+	this.right = Math.floor(this.right);
+	this.bottom = Math.floor(this.bottom);
+	this.left = Math.floor(this.left);
+	return this
+};
+goog.math.Box.prototype.round = function () {
+	this.top = Math.round(this.top);
+	this.right = Math.round(this.right);
+	this.bottom = Math.round(this.bottom);
+	this.left = Math.round(this.left);
+	return this
+};
+goog.math.Box.prototype.translate = function (a, b) {
+	a instanceof goog.math.Coordinate ? (this.left += a.x, this.right += a.x, this.top += a.y, this.bottom += a.y) : (goog.asserts.assertNumber(a), this.left += a, this.right += a, goog.isNumber(b) && (this.top += b, this.bottom += b));
+	return this
+};
+goog.math.Box.prototype.scale = function (a, b) {
+	var c = goog.isNumber(b) ? b : a;
+	this.left *= a;
+	this.right *= a;
+	this.top *= c;
+	this.bottom *= c;
+	return this
+};
+goog.math.IRect = function () { };
+goog.math.Rect = function (a, b, c, d) {
+	this.left = a;
+	this.top = b;
+	this.width = c;
+	this.height = d
+};
+goog.math.Rect.prototype.clone = function () {
+	return new goog.math.Rect(this.left, this.top, this.width, this.height)
+};
+goog.math.Rect.prototype.toBox = function () {
+	return new goog.math.Box(this.top, this.left + this.width, this.top + this.height, this.left)
+};
+goog.math.Rect.createFromPositionAndSize = function (a, b) {
+	return new goog.math.Rect(a.x, a.y, b.width, b.height)
+};
+goog.math.Rect.createFromBox = function (a) {
+	return new goog.math.Rect(a.left, a.top, a.right - a.left, a.bottom - a.top)
+};
+goog.DEBUG && (goog.math.Rect.prototype.toString = function () {
+	return "(" + this.left + ", " + this.top + " - " + this.width + "w x " + this.height + "h)"
+});
+goog.math.Rect.equals = function (a, b) {
+	return a == b ? !0 : a && b ? a.left == b.left && a.width == b.width && a.top == b.top && a.height == b.height : !1
+};
+goog.math.Rect.prototype.intersection = function (a) {
+	var b = Math.max(this.left, a.left),
+		c = Math.min(this.left + this.width, a.left + a.width);
+	if (b <= c) {
+		var d = Math.max(this.top, a.top);
+		a = Math.min(this.top + this.height, a.top + a.height);
+		if (d <= a) return this.left = b, this.top = d, this.width = c - b, this.height = a - d, !0
+	}
+	return !1
+};
+goog.math.Rect.intersection = function (a, b) {
+	var c = Math.max(a.left, b.left),
+		d = Math.min(a.left + a.width, b.left + b.width);
+	if (c <= d) {
+		var e = Math.max(a.top, b.top),
+			f = Math.min(a.top + a.height, b.top + b.height);
+		if (e <= f) return new goog.math.Rect(c, e, d - c, f - e)
+	}
+	return null
+};
+goog.math.Rect.intersects = function (a, b) {
+	return a.left <= b.left + b.width && b.left <= a.left + a.width && a.top <= b.top + b.height && b.top <= a.top + a.height
+};
+goog.math.Rect.prototype.intersects = function (a) {
+	return goog.math.Rect.intersects(this, a)
+};
+goog.math.Rect.difference = function (a, b) {
+	var c = goog.math.Rect.intersection(a, b);
+	if (!c || !c.height || !c.width) return [a.clone()];
+	var c = [],
+		d = a.top,
+		e = a.height,
+		f = a.left + a.width,
+		g = a.top + a.height,
+		h = b.left + b.width,
+		k = b.top + b.height;
+	b.top > a.top && (c.push(new goog.math.Rect(a.left, a.top, a.width, b.top - a.top)), d = b.top, e -= b.top - a.top);
+	k < g && (c.push(new goog.math.Rect(a.left, k, a.width, g - k)), e = k - d);
+	b.left > a.left && c.push(new goog.math.Rect(a.left, d, b.left - a.left, e));
+	h < f && c.push(new goog.math.Rect(h, d, f - h, e));
+	return c
+};
+goog.math.Rect.prototype.difference = function (a) {
+	return goog.math.Rect.difference(this, a)
+};
+goog.math.Rect.prototype.boundingRect = function (a) {
+	var b = Math.max(this.left + this.width, a.left + a.width),
+		c = Math.max(this.top + this.height, a.top + a.height);
+	this.left = Math.min(this.left, a.left);
+	this.top = Math.min(this.top, a.top);
+	this.width = b - this.left;
+	this.height = c - this.top
+};
+goog.math.Rect.boundingRect = function (a, b) {
+	if (!a || !b) return null;
+	var c = new goog.math.Rect(a.left, a.top, a.width, a.height);
+	c.boundingRect(b);
+	return c
+};
+goog.math.Rect.prototype.contains = function (a) {
+	return a instanceof goog.math.Coordinate ? a.x >= this.left && a.x <= this.left + this.width && a.y >= this.top && a.y <= this.top + this.height : this.left <= a.left && this.left + this.width >= a.left + a.width && this.top <= a.top && this.top + this.height >= a.top + a.height
+};
+goog.math.Rect.prototype.squaredDistance = function (a) {
+	var b = a.x < this.left ? this.left - a.x : Math.max(a.x - (this.left + this.width), 0);
+	a = a.y < this.top ? this.top - a.y : Math.max(a.y - (this.top + this.height), 0);
+	return b * b + a * a
+};
+goog.math.Rect.prototype.distance = function (a) {
+	return Math.sqrt(this.squaredDistance(a))
+};
+goog.math.Rect.prototype.getSize = function () {
+	return new goog.math.Size(this.width, this.height)
+};
+goog.math.Rect.prototype.getTopLeft = function () {
+	return new goog.math.Coordinate(this.left, this.top)
+};
+goog.math.Rect.prototype.getCenter = function () {
+	return new goog.math.Coordinate(this.left + this.width / 2, this.top + this.height / 2)
+};
+goog.math.Rect.prototype.getBottomRight = function () {
+	return new goog.math.Coordinate(this.left + this.width, this.top + this.height)
+};
+goog.math.Rect.prototype.ceil = function () {
+	this.left = Math.ceil(this.left);
+	this.top = Math.ceil(this.top);
+	this.width = Math.ceil(this.width);
+	this.height = Math.ceil(this.height);
+	return this
+};
+goog.math.Rect.prototype.floor = function () {
+	this.left = Math.floor(this.left);
+	this.top = Math.floor(this.top);
+	this.width = Math.floor(this.width);
+	this.height = Math.floor(this.height);
+	return this
+};
+goog.math.Rect.prototype.round = function () {
+	this.left = Math.round(this.left);
+	this.top = Math.round(this.top);
+	this.width = Math.round(this.width);
+	this.height = Math.round(this.height);
+	return this
+};
+goog.math.Rect.prototype.translate = function (a, b) {
+	a instanceof goog.math.Coordinate ? (this.left += a.x, this.top += a.y) : (this.left += goog.asserts.assertNumber(a), goog.isNumber(b) && (this.top += b));
+	return this
+};
+goog.math.Rect.prototype.scale = function (a, b) {
+	var c = goog.isNumber(b) ? b : a;
+	this.left *= a;
+	this.width *= a;
+	this.top *= c;
+	this.height *= c;
+	return this
+};
+goog.style = {};
+goog.style.setStyle = function (a, b, c) {
+	if (goog.isString(b)) goog.style.setStyle_(a, c, b);
+	else
+		for (var d in b) goog.style.setStyle_(a, b[d], d)
+};
+goog.style.setStyle_ = function (a, b, c) {
+	(c = goog.style.getVendorJsStyleName_(a, c)) && (a.style[c] = b)
+};
+goog.style.styleNameCache_ = {};
+goog.style.getVendorJsStyleName_ = function (a, b) {
+	var c = goog.style.styleNameCache_[b];
+	if (!c) {
+		var d = goog.string.toCamelCase(b),
+			c = d;
+		void 0 === a.style[d] && (d = goog.dom.vendor.getVendorJsPrefix() + goog.string.toTitleCase(d), void 0 !== a.style[d] && (c = d));
+		goog.style.styleNameCache_[b] = c
+	}
+	return c
+};
+goog.style.getVendorStyleName_ = function (a, b) {
+	var c = goog.string.toCamelCase(b);
+	return void 0 === a.style[c] && (c = goog.dom.vendor.getVendorJsPrefix() + goog.string.toTitleCase(c), void 0 !== a.style[c]) ? goog.dom.vendor.getVendorPrefix() + "-" + b : b
+};
+goog.style.getStyle = function (a, b) {
+	var c = a.style[goog.string.toCamelCase(b)];
+	return "undefined" !== typeof c ? c : a.style[goog.style.getVendorJsStyleName_(a, b)] || ""
+};
+goog.style.getComputedStyle = function (a, b) {
+	var c = goog.dom.getOwnerDocument(a);
+	return c.defaultView && c.defaultView.getComputedStyle && (c = c.defaultView.getComputedStyle(a, null)) ? c[b] || c.getPropertyValue(b) || "" : ""
+};
+goog.style.getCascadedStyle = function (a, b) {
+	return a.currentStyle ? a.currentStyle[b] : null
+};
+goog.style.getStyle_ = function (a, b) {
+	return goog.style.getComputedStyle(a, b) || goog.style.getCascadedStyle(a, b) || a.style && a.style[b]
+};
+goog.style.getComputedBoxSizing = function (a) {
+	return goog.style.getStyle_(a, "boxSizing") || goog.style.getStyle_(a, "MozBoxSizing") || goog.style.getStyle_(a, "WebkitBoxSizing") || null
+};
+goog.style.getComputedPosition = function (a) {
+	return goog.style.getStyle_(a, "position")
+};
+goog.style.getBackgroundColor = function (a) {
+	return goog.style.getStyle_(a, "backgroundColor")
+};
+goog.style.getComputedOverflowX = function (a) {
+	return goog.style.getStyle_(a, "overflowX")
+};
+goog.style.getComputedOverflowY = function (a) {
+	return goog.style.getStyle_(a, "overflowY")
+};
+goog.style.getComputedZIndex = function (a) {
+	return goog.style.getStyle_(a, "zIndex")
+};
+goog.style.getComputedTextAlign = function (a) {
+	return goog.style.getStyle_(a, "textAlign")
+};
+goog.style.getComputedCursor = function (a) {
+	return goog.style.getStyle_(a, "cursor")
+};
+goog.style.getComputedTransform = function (a) {
+	var b = goog.style.getVendorStyleName_(a, "transform");
+	return goog.style.getStyle_(a, b) || goog.style.getStyle_(a, "transform")
+};
+goog.style.setPosition = function (a, b, c) {
+	var d;
+	b instanceof goog.math.Coordinate ? (d = b.x, b = b.y) : (d = b, b = c);
+	a.style.left = goog.style.getPixelStyleValue_(d, !1);
+	a.style.top = goog.style.getPixelStyleValue_(b, !1)
+};
+goog.style.getPosition = function (a) {
+	return new goog.math.Coordinate(a.offsetLeft, a.offsetTop)
+};
+goog.style.getClientViewportElement = function (a) {
+	a = a ? goog.dom.getOwnerDocument(a) : goog.dom.getDocument();
+	return !goog.userAgent.IE || goog.userAgent.isDocumentModeOrHigher(9) || goog.dom.getDomHelper(a).isCss1CompatMode() ? a.documentElement : a.body
+};
+goog.style.getViewportPageOffset = function (a) {
+	var b = a.body;
+	a = a.documentElement;
+	return new goog.math.Coordinate(b.scrollLeft || a.scrollLeft, b.scrollTop || a.scrollTop)
+};
+goog.style.getBoundingClientRect_ = function (a) {
+	var b;
+	try {
+		b = a.getBoundingClientRect()
+	} catch (c) {
+		return {
+			left: 0,
+			top: 0,
+			right: 0,
+			bottom: 0
+		}
+	}
+	goog.userAgent.IE && a.ownerDocument.body && (a = a.ownerDocument, b.left -= a.documentElement.clientLeft + a.body.clientLeft, b.top -= a.documentElement.clientTop + a.body.clientTop);
+	return b
+};
+goog.style.getOffsetParent = function (a) {
+	if (goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(8)) return goog.asserts.assert(a && "offsetParent" in a), a.offsetParent;
+	var b = goog.dom.getOwnerDocument(a),
+		c = goog.style.getStyle_(a, "position"),
+		d = "fixed" == c || "absolute" == c;
+	for (a = a.parentNode; a && a != b; a = a.parentNode)
+		if (a.nodeType == goog.dom.NodeType.DOCUMENT_FRAGMENT && a.host && (a = a.host), c = goog.style.getStyle_(a, "position"), d = d && "static" == c && a != b.documentElement && a != b.body, !d && (a.scrollWidth > a.clientWidth ||
+				a.scrollHeight > a.clientHeight || "fixed" == c || "absolute" == c || "relative" == c)) return a;
+	return null
+};
+goog.style.getVisibleRectForElement = function (a) {
+	for (var b = new goog.math.Box(0, Infinity, Infinity, 0), c = goog.dom.getDomHelper(a), d = c.getDocument().body, e = c.getDocument().documentElement, f = c.getDocumentScrollElement() ; a = goog.style.getOffsetParent(a) ;)
+		if (!(goog.userAgent.IE && 0 == a.clientWidth || goog.userAgent.WEBKIT && 0 == a.clientHeight && a == d) && a != d && a != e && "visible" != goog.style.getStyle_(a, "overflow")) {
+			var g = goog.style.getPageOffset(a),
+				h = goog.style.getClientLeftTop(a);
+			g.x += h.x;
+			g.y += h.y;
+			b.top = Math.max(b.top,
+				g.y);
+			b.right = Math.min(b.right, g.x + a.clientWidth);
+			b.bottom = Math.min(b.bottom, g.y + a.clientHeight);
+			b.left = Math.max(b.left, g.x)
+		}
+	d = f.scrollLeft;
+	f = f.scrollTop;
+	b.left = Math.max(b.left, d);
+	b.top = Math.max(b.top, f);
+	c = c.getViewportSize();
+	b.right = Math.min(b.right, d + c.width);
+	b.bottom = Math.min(b.bottom, f + c.height);
+	return 0 <= b.top && 0 <= b.left && b.bottom > b.top && b.right > b.left ? b : null
+};
+goog.style.getContainerOffsetToScrollInto = function (a, b, c) {
+	var d = b || goog.dom.getDocumentScrollElement(),
+		e = goog.style.getPageOffset(a),
+		f = goog.style.getPageOffset(d),
+		g = goog.style.getBorderBox(d);
+	d == goog.dom.getDocumentScrollElement() ? (b = e.x - d.scrollLeft, e = e.y - d.scrollTop, goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(10) && (b += g.left, e += g.top)) : (b = e.x - f.x - g.left, e = e.y - f.y - g.top);
+	g = goog.style.getSizeWithDisplay_(a);
+	a = d.clientWidth - g.width;
+	g = d.clientHeight - g.height;
+	f = d.scrollLeft;
+	d = d.scrollTop;
+	c ? (f += b - a / 2, d += e - g / 2) : (f += Math.min(b, Math.max(b - a, 0)), d += Math.min(e, Math.max(e - g, 0)));
+	return new goog.math.Coordinate(f, d)
+};
+goog.style.scrollIntoContainerView = function (a, b, c) {
+	b = b || goog.dom.getDocumentScrollElement();
+	a = goog.style.getContainerOffsetToScrollInto(a, b, c);
+	b.scrollLeft = a.x;
+	b.scrollTop = a.y
+};
+goog.style.getClientLeftTop = function (a) {
+	return new goog.math.Coordinate(a.clientLeft, a.clientTop)
+};
+goog.style.getPageOffset = function (a) {
+	var b = goog.dom.getOwnerDocument(a);
+	goog.asserts.assertObject(a, "Parameter is required");
+	var c = new goog.math.Coordinate(0, 0),
+		d = goog.style.getClientViewportElement(b);
+	if (a == d) return c;
+	a = goog.style.getBoundingClientRect_(a);
+	b = goog.dom.getDomHelper(b).getDocumentScroll();
+	c.x = a.left + b.x;
+	c.y = a.top + b.y;
+	return c
+};
+goog.style.getPageOffsetLeft = function (a) {
+	return goog.style.getPageOffset(a).x
+};
+goog.style.getPageOffsetTop = function (a) {
+	return goog.style.getPageOffset(a).y
+};
+goog.style.getFramedPageOffset = function (a, b) {
+	var c = new goog.math.Coordinate(0, 0),
+		d = goog.dom.getWindow(goog.dom.getOwnerDocument(a));
+	if (!goog.reflect.canAccessProperty(d, "parent")) return c;
+	var e = a;
+	do {
+		var f = d == b ? goog.style.getPageOffset(e) : goog.style.getClientPositionForElement_(goog.asserts.assert(e));
+		c.x += f.x;
+		c.y += f.y
+	} while (d && d != b && d != d.parent && (e = d.frameElement) && (d = d.parent));
+	return c
+};
+goog.style.translateRectForAnotherFrame = function (a, b, c) {
+	if (b.getDocument() != c.getDocument()) {
+		var d = b.getDocument().body;
+		c = goog.style.getFramedPageOffset(d, c.getWindow());
+		c = goog.math.Coordinate.difference(c, goog.style.getPageOffset(d));
+		!goog.userAgent.IE || goog.userAgent.isDocumentModeOrHigher(9) || b.isCss1CompatMode() || (c = goog.math.Coordinate.difference(c, b.getDocumentScroll()));
+		a.left += c.x;
+		a.top += c.y
+	}
+};
+goog.style.getRelativePosition = function (a, b) {
+	var c = goog.style.getClientPosition(a),
+		d = goog.style.getClientPosition(b);
+	return new goog.math.Coordinate(c.x - d.x, c.y - d.y)
+};
+goog.style.getClientPositionForElement_ = function (a) {
+	a = goog.style.getBoundingClientRect_(a);
+	return new goog.math.Coordinate(a.left, a.top)
+};
+goog.style.getClientPosition = function (a) {
+	goog.asserts.assert(a);
+	if (a.nodeType == goog.dom.NodeType.ELEMENT) return goog.style.getClientPositionForElement_(a);
+	a = a.changedTouches ? a.changedTouches[0] : a;
+	return new goog.math.Coordinate(a.clientX, a.clientY)
+};
+goog.style.setPageOffset = function (a, b, c) {
+	var d = goog.style.getPageOffset(a);
+	b instanceof goog.math.Coordinate && (c = b.y, b = b.x);
+	b = goog.asserts.assertNumber(b) - d.x;
+	goog.style.setPosition(a, a.offsetLeft + b, a.offsetTop + (Number(c) - d.y))
+};
+goog.style.setSize = function (a, b, c) {
+	if (b instanceof goog.math.Size) c = b.height, b = b.width;
+	else if (void 0 == c) throw Error("missing height argument");
+	goog.style.setWidth(a, b);
+	goog.style.setHeight(a, c)
+};
+goog.style.getPixelStyleValue_ = function (a, b) {
+	"number" == typeof a && (a = (b ? Math.round(a) : a) + "px");
+	return a
+};
+goog.style.setHeight = function (a, b) {
+	a.style.height = goog.style.getPixelStyleValue_(b, !0)
+};
+goog.style.setWidth = function (a, b) {
+	a.style.width = goog.style.getPixelStyleValue_(b, !0)
+};
+goog.style.getSize = function (a) {
+	return goog.style.evaluateWithTemporaryDisplay_(goog.style.getSizeWithDisplay_, a)
+};
+goog.style.evaluateWithTemporaryDisplay_ = function (a, b) {
+	if ("none" != goog.style.getStyle_(b, "display")) return a(b);
+	var c = b.style,
+		d = c.display,
+		e = c.visibility,
+		f = c.position;
+	c.visibility = "hidden";
+	c.position = "absolute";
+	c.display = "inline";
+	var g = a(b);
+	c.display = d;
+	c.position = f;
+	c.visibility = e;
+	return g
+};
+goog.style.getSizeWithDisplay_ = function (a) {
+	var b = a.offsetWidth,
+		c = a.offsetHeight,
+		d = goog.userAgent.WEBKIT && !b && !c;
+	return goog.isDef(b) && !d || !a.getBoundingClientRect ? new goog.math.Size(b, c) : (a = goog.style.getBoundingClientRect_(a), new goog.math.Size(a.right - a.left, a.bottom - a.top))
+};
+goog.style.getTransformedSize = function (a) {
+	if (!a.getBoundingClientRect) return null;
+	a = goog.style.evaluateWithTemporaryDisplay_(goog.style.getBoundingClientRect_, a);
+	return new goog.math.Size(a.right - a.left, a.bottom - a.top)
+};
+goog.style.getBounds = function (a) {
+	var b = goog.style.getPageOffset(a);
+	a = goog.style.getSize(a);
+	return new goog.math.Rect(b.x, b.y, a.width, a.height)
+};
+goog.style.toCamelCase = function (a) {
+	return goog.string.toCamelCase(String(a))
+};
+goog.style.toSelectorCase = function (a) {
+	return goog.string.toSelectorCase(a)
+};
+goog.style.getOpacity = function (a) {
+	goog.asserts.assert(a);
+	var b = a.style;
+	a = "";
+	"opacity" in b ? a = b.opacity : "MozOpacity" in b ? a = b.MozOpacity : "filter" in b && (b = b.filter.match(/alpha\(opacity=([\d.]+)\)/)) && (a = String(b[1] / 100));
+	return "" == a ? a : Number(a)
+};
+goog.style.setOpacity = function (a, b) {
+	goog.asserts.assert(a);
+	var c = a.style;
+	"opacity" in c ? c.opacity = b : "MozOpacity" in c ? c.MozOpacity = b : "filter" in c && (c.filter = "" === b ? "" : "alpha(opacity=" + 100 * Number(b) + ")")
+};
+goog.style.setTransparentBackgroundImage = function (a, b) {
+	var c = a.style;
+	goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("8") ? c.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + b + '", sizingMethod="crop")' : (c.backgroundImage = "url(" + b + ")", c.backgroundPosition = "top left", c.backgroundRepeat = "no-repeat")
+};
+goog.style.clearTransparentBackgroundImage = function (a) {
+	a = a.style;
+	"filter" in a ? a.filter = "" : a.backgroundImage = "none"
+};
+goog.style.showElement = function (a, b) {
+	goog.style.setElementShown(a, b)
+};
+goog.style.setElementShown = function (a, b) {
+	a.style.display = b ? "" : "none"
+};
+goog.style.isElementShown = function (a) {
+	return "none" != a.style.display
+};
+goog.style.installStyles = function (a, b) {
+	return goog.style.installSafeStyleSheet(goog.html.legacyconversions.safeStyleSheetFromString(a), b)
+};
+goog.style.installSafeStyleSheet = function (a, b) {
+	var c = goog.dom.getDomHelper(b),
+		d, e = c.getDocument();
+	goog.userAgent.IE && e.createStyleSheet ? (d = e.createStyleSheet(), goog.style.setSafeStyleSheet(d, a)) : (e = c.getElementsByTagNameAndClass("HEAD")[0], e || (d = c.getElementsByTagNameAndClass("BODY")[0], e = c.createDom("HEAD"), d.parentNode.insertBefore(e, d)), d = c.createDom("STYLE"), goog.style.setSafeStyleSheet(d, a), c.appendChild(e, d));
+	return d
+};
+goog.style.uninstallStyles = function (a) {
+	goog.dom.removeNode(a.ownerNode || a.owningElement || a)
+};
+goog.style.setStyles = function (a, b) {
+	goog.style.setSafeStyleSheet(a, goog.html.legacyconversions.safeStyleSheetFromString(b))
+};
+goog.style.setSafeStyleSheet = function (a, b) {
+	var c = goog.html.SafeStyleSheet.unwrap(b);
+	goog.userAgent.IE && goog.isDef(a.cssText) ? a.cssText = c : a.innerHTML = c
+};
+goog.style.setPreWrap = function (a) {
+	a = a.style;
+	goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("8") ? (a.whiteSpace = "pre", a.wordWrap = "break-word") : a.whiteSpace = goog.userAgent.GECKO ? "-moz-pre-wrap" : "pre-wrap"
+};
+goog.style.setInlineBlock = function (a) {
+	a = a.style;
+	a.position = "relative";
+	goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("8") ? (a.zoom = "1", a.display = "inline") : a.display = "inline-block"
+};
+goog.style.isRightToLeft = function (a) {
+	return "rtl" == goog.style.getStyle_(a, "direction")
+};
+goog.style.unselectableStyle_ = goog.userAgent.GECKO ? "MozUserSelect" : goog.userAgent.WEBKIT || goog.userAgent.EDGE ? "WebkitUserSelect" : null;
+goog.style.isUnselectable = function (a) {
+	return goog.style.unselectableStyle_ ? "none" == a.style[goog.style.unselectableStyle_].toLowerCase() : goog.userAgent.IE || goog.userAgent.OPERA ? "on" == a.getAttribute("unselectable") : !1
+};
+goog.style.setUnselectable = function (a, b, c) {
+	c = c ? null : a.getElementsByTagName("*");
+	var d = goog.style.unselectableStyle_;
+	if (d) {
+		if (b = b ? "none" : "", a.style && (a.style[d] = b), c) {
+			a = 0;
+			for (var e; e = c[a]; a++) e.style && (e.style[d] = b)
+		}
+	} else if (goog.userAgent.IE || goog.userAgent.OPERA)
+		if (b = b ? "on" : "", a.setAttribute("unselectable", b), c)
+			for (a = 0; e = c[a]; a++) e.setAttribute("unselectable", b)
+};
+goog.style.getBorderBoxSize = function (a) {
+	return new goog.math.Size(a.offsetWidth, a.offsetHeight)
+};
+goog.style.setBorderBoxSize = function (a, b) {
+	var c = goog.dom.getOwnerDocument(a),
+		d = goog.dom.getDomHelper(c).isCss1CompatMode();
+	if (!goog.userAgent.IE || goog.userAgent.isVersionOrHigher("10") || d && goog.userAgent.isVersionOrHigher("8")) goog.style.setBoxSizingSize_(a, b, "border-box");
+	else if (c = a.style, d) {
+		var d = goog.style.getPaddingBox(a),
+			e = goog.style.getBorderBox(a);
+		c.pixelWidth = b.width - e.left - d.left - d.right - e.right;
+		c.pixelHeight = b.height - e.top - d.top - d.bottom - e.bottom
+	} else c.pixelWidth = b.width, c.pixelHeight =
+		b.height
+};
+goog.style.getContentBoxSize = function (a) {
+	var b = goog.dom.getOwnerDocument(a),
+		c = goog.userAgent.IE && a.currentStyle;
+	if (c && goog.dom.getDomHelper(b).isCss1CompatMode() && "auto" != c.width && "auto" != c.height && !c.boxSizing) return b = goog.style.getIePixelValue_(a, c.width, "width", "pixelWidth"), a = goog.style.getIePixelValue_(a, c.height, "height", "pixelHeight"), new goog.math.Size(b, a);
+	c = goog.style.getBorderBoxSize(a);
+	b = goog.style.getPaddingBox(a);
+	a = goog.style.getBorderBox(a);
+	return new goog.math.Size(c.width - a.left -
+		b.left - b.right - a.right, c.height - a.top - b.top - b.bottom - a.bottom)
+};
+goog.style.setContentBoxSize = function (a, b) {
+	var c = goog.dom.getOwnerDocument(a),
+		d = goog.dom.getDomHelper(c).isCss1CompatMode();
+	if (!goog.userAgent.IE || goog.userAgent.isVersionOrHigher("10") || d && goog.userAgent.isVersionOrHigher("8")) goog.style.setBoxSizingSize_(a, b, "content-box");
+	else if (c = a.style, d) c.pixelWidth = b.width, c.pixelHeight = b.height;
+	else {
+		var d = goog.style.getPaddingBox(a),
+			e = goog.style.getBorderBox(a);
+		c.pixelWidth = b.width + e.left + d.left + d.right + e.right;
+		c.pixelHeight = b.height + e.top + d.top + d.bottom +
+			e.bottom
+	}
+};
+goog.style.setBoxSizingSize_ = function (a, b, c) {
+	a = a.style;
+	goog.userAgent.GECKO ? a.MozBoxSizing = c : goog.userAgent.WEBKIT ? a.WebkitBoxSizing = c : a.boxSizing = c;
+	a.width = Math.max(b.width, 0) + "px";
+	a.height = Math.max(b.height, 0) + "px"
+};
+goog.style.getIePixelValue_ = function (a, b, c, d) {
+	if (/^\d+px?$/.test(b)) return parseInt(b, 10);
+	var e = a.style[c],
+		f = a.runtimeStyle[c];
+	a.runtimeStyle[c] = a.currentStyle[c];
+	a.style[c] = b;
+	b = a.style[d];
+	a.style[c] = e;
+	a.runtimeStyle[c] = f;
+	return b
+};
+goog.style.getIePixelDistance_ = function (a, b) {
+	var c = goog.style.getCascadedStyle(a, b);
+	return c ? goog.style.getIePixelValue_(a, c, "left", "pixelLeft") : 0
+};
+goog.style.getBox_ = function (a, b) {
+	if (goog.userAgent.IE) {
+		var c = goog.style.getIePixelDistance_(a, b + "Left"),
+			d = goog.style.getIePixelDistance_(a, b + "Right"),
+			e = goog.style.getIePixelDistance_(a, b + "Top"),
+			f = goog.style.getIePixelDistance_(a, b + "Bottom");
+		return new goog.math.Box(e, d, f, c)
+	}
+	c = goog.style.getComputedStyle(a, b + "Left");
+	d = goog.style.getComputedStyle(a, b + "Right");
+	e = goog.style.getComputedStyle(a, b + "Top");
+	f = goog.style.getComputedStyle(a, b + "Bottom");
+	return new goog.math.Box(parseFloat(e), parseFloat(d), parseFloat(f),
+		parseFloat(c))
+};
+goog.style.getPaddingBox = function (a) {
+	return goog.style.getBox_(a, "padding")
+};
+goog.style.getMarginBox = function (a) {
+	return goog.style.getBox_(a, "margin")
+};
+goog.style.ieBorderWidthKeywords_ = {
+	thin: 2,
+	medium: 4,
+	thick: 6
+};
+goog.style.getIePixelBorder_ = function (a, b) {
+	if ("none" == goog.style.getCascadedStyle(a, b + "Style")) return 0;
+	var c = goog.style.getCascadedStyle(a, b + "Width");
+	return c in goog.style.ieBorderWidthKeywords_ ? goog.style.ieBorderWidthKeywords_[c] : goog.style.getIePixelValue_(a, c, "left", "pixelLeft")
+};
+goog.style.getBorderBox = function (a) {
+	if (goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(9)) {
+		var b = goog.style.getIePixelBorder_(a, "borderLeft"),
+			c = goog.style.getIePixelBorder_(a, "borderRight"),
+			d = goog.style.getIePixelBorder_(a, "borderTop");
+		a = goog.style.getIePixelBorder_(a, "borderBottom");
+		return new goog.math.Box(d, c, a, b)
+	}
+	b = goog.style.getComputedStyle(a, "borderLeftWidth");
+	c = goog.style.getComputedStyle(a, "borderRightWidth");
+	d = goog.style.getComputedStyle(a, "borderTopWidth");
+	a = goog.style.getComputedStyle(a,
+		"borderBottomWidth");
+	return new goog.math.Box(parseFloat(d), parseFloat(c), parseFloat(a), parseFloat(b))
+};
+goog.style.getFontFamily = function (a) {
+	var b = goog.dom.getOwnerDocument(a),
+		c = "";
+	if (b.body.createTextRange && goog.dom.contains(b, a)) {
+		b = b.body.createTextRange();
+		b.moveToElementText(a);
+		try {
+			c = b.queryCommandValue("FontName")
+		} catch (d) {
+			c = ""
+		}
+	}
+	c || (c = goog.style.getStyle_(a, "fontFamily"));
+	a = c.split(",");
+	1 < a.length && (c = a[0]);
+	return goog.string.stripQuotes(c, "\"'")
+};
+goog.style.lengthUnitRegex_ = /[^\d]+$/;
+goog.style.getLengthUnits = function (a) {
+	return (a = a.match(goog.style.lengthUnitRegex_)) && a[0] || null
+};
+goog.style.ABSOLUTE_CSS_LENGTH_UNITS_ = {
+	cm: 1,
+	"in": 1,
+	mm: 1,
+	pc: 1,
+	pt: 1
+};
+goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_ = {
+	em: 1,
+	ex: 1
+};
+goog.style.getFontSize = function (a) {
+	var b = goog.style.getStyle_(a, "fontSize"),
+		c = goog.style.getLengthUnits(b);
+	if (b && "px" == c) return parseInt(b, 10);
+	if (goog.userAgent.IE) {
+		if (String(c) in goog.style.ABSOLUTE_CSS_LENGTH_UNITS_) return goog.style.getIePixelValue_(a, b, "left", "pixelLeft");
+		if (a.parentNode && a.parentNode.nodeType == goog.dom.NodeType.ELEMENT && String(c) in goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_) return a = a.parentNode, c = goog.style.getStyle_(a, "fontSize"), goog.style.getIePixelValue_(a, b == c ? "1em" : b,
+			"left", "pixelLeft")
+	}
+	c = goog.dom.createDom("SPAN", {
+		style: "visibility:hidden;position:absolute;line-height:0;padding:0;margin:0;border:0;height:1em;"
+	});
+	goog.dom.appendChild(a, c);
+	b = c.offsetHeight;
+	goog.dom.removeNode(c);
+	return b
+};
+goog.style.parseStyleAttribute = function (a) {
+	var b = {};
+	goog.array.forEach(a.split(/\s*;\s*/), function (a) {
+		var c = a.match(/\s*([\w-]+)\s*\:(.+)/);
+		c && (a = c[1], c = goog.string.trim(c[2]), b[goog.string.toCamelCase(a.toLowerCase())] = c)
+	});
+	return b
+};
+goog.style.toStyleAttribute = function (a) {
+	var b = [];
+	goog.object.forEach(a, function (a, d) {
+		b.push(goog.string.toSelectorCase(d), ":", a, ";")
+	});
+	return b.join("")
+};
+goog.style.setFloat = function (a, b) {
+	a.style[goog.userAgent.IE ? "styleFloat" : "cssFloat"] = b
+};
+goog.style.getFloat = function (a) {
+	return a.style[goog.userAgent.IE ? "styleFloat" : "cssFloat"] || ""
+};
+goog.style.getScrollbarWidth = function (a) {
+	var b = goog.dom.createElement("DIV");
+	a && (b.className = a);
+	b.style.cssText = "overflow:auto;position:absolute;top:0;width:100px;height:100px";
+	a = goog.dom.createElement("DIV");
+	goog.style.setSize(a, "200px", "200px");
+	b.appendChild(a);
+	goog.dom.appendChild(goog.dom.getDocument().body, b);
+	a = b.offsetWidth - b.clientWidth;
+	goog.dom.removeNode(b);
+	return a
+};
+goog.style.MATRIX_TRANSLATION_REGEX_ = /matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;
+goog.style.getCssTranslation = function (a) {
+	a = goog.style.getComputedTransform(a);
+	return a ? (a = a.match(goog.style.MATRIX_TRANSLATION_REGEX_)) ? new goog.math.Coordinate(parseFloat(a[1]), parseFloat(a[2])) : new goog.math.Coordinate(0, 0) : new goog.math.Coordinate(0, 0)
+};
+goog.Thenable = function () { };
+goog.Thenable.prototype.then = function (a, b, c) { };
+goog.Thenable.IMPLEMENTED_BY_PROP = "$goog_Thenable";
+goog.Thenable.addImplementation = function (a) {
+	a.prototype.then = a.prototype.then;
+	COMPILED ? a.prototype[goog.Thenable.IMPLEMENTED_BY_PROP] = !0 : a.prototype.$goog_Thenable = !0
+};
+goog.Thenable.isImplementedBy = function (a) {
+	if (!a) return !1;
+	try {
+		return COMPILED ? !!a[goog.Thenable.IMPLEMENTED_BY_PROP] : !!a.$goog_Thenable
+	} catch (b) {
+		return !1
+	}
+};
+goog.async = {};
+goog.async.FreeList = function (a, b, c) {
+	this.limit_ = c;
+	this.create_ = a;
+	this.reset_ = b;
+	this.occupants_ = 0;
+	this.head_ = null
+};
+goog.async.FreeList.prototype.get = function () {
+	var a;
+	0 < this.occupants_ ? (this.occupants_--, a = this.head_, this.head_ = a.next, a.next = null) : a = this.create_();
+	return a
+};
+goog.async.FreeList.prototype.put = function (a) {
+	this.reset_(a);
+	this.occupants_ < this.limit_ && (this.occupants_++, a.next = this.head_, this.head_ = a)
+};
+goog.async.FreeList.prototype.occupants = function () {
+	return this.occupants_
+};
+goog.async.WorkQueue = function () {
+	this.workTail_ = this.workHead_ = null
+};
+goog.async.WorkQueue.DEFAULT_MAX_UNUSED = 100;
+goog.async.WorkQueue.freelist_ = new goog.async.FreeList(function () {
+	return new goog.async.WorkItem
+}, function (a) {
+	a.reset()
+}, goog.async.WorkQueue.DEFAULT_MAX_UNUSED);
+goog.async.WorkQueue.prototype.add = function (a, b) {
+	var c = this.getUnusedItem_();
+	c.set(a, b);
+	this.workTail_ ? this.workTail_.next = c : (goog.asserts.assert(!this.workHead_), this.workHead_ = c);
+	this.workTail_ = c
+};
+goog.async.WorkQueue.prototype.remove = function () {
+	var a = null;
+	this.workHead_ && (a = this.workHead_, this.workHead_ = this.workHead_.next, this.workHead_ || (this.workTail_ = null), a.next = null);
+	return a
+};
+goog.async.WorkQueue.prototype.returnUnused = function (a) {
+	goog.async.WorkQueue.freelist_.put(a)
+};
+goog.async.WorkQueue.prototype.getUnusedItem_ = function () {
+	return goog.async.WorkQueue.freelist_.get()
+};
+goog.async.WorkItem = function () {
+	this.next = this.scope = this.fn = null
+};
+goog.async.WorkItem.prototype.set = function (a, b) {
+	this.fn = a;
+	this.scope = b;
+	this.next = null
+};
+goog.async.WorkItem.prototype.reset = function () {
+	this.next = this.scope = this.fn = null
+};
+goog.functions = {};
+goog.functions.constant = function (a) {
+	return function () {
+		return a
+	}
+};
+goog.functions.FALSE = goog.functions.constant(!1);
+goog.functions.TRUE = goog.functions.constant(!0);
+goog.functions.NULL = goog.functions.constant(null);
+goog.functions.identity = function (a, b) {
+	return a
+};
+goog.functions.error = function (a) {
+	return function () {
+		throw Error(a);
+	}
+};
+goog.functions.fail = function (a) {
+	return function () {
+		throw a;
+	}
+};
+goog.functions.lock = function (a, b) {
+	b = b || 0;
+	return function () {
+		return a.apply(this, Array.prototype.slice.call(arguments, 0, b))
+	}
+};
+goog.functions.nth = function (a) {
+	return function () {
+		return arguments[a]
+	}
+};
+goog.functions.partialRight = function (a, b) {
+	var c = Array.prototype.slice.call(arguments, 1);
+	return function () {
+		var b = Array.prototype.slice.call(arguments);
+		b.push.apply(b, c);
+		return a.apply(this, b)
+	}
+};
+goog.functions.withReturnValue = function (a, b) {
+	return goog.functions.sequence(a, goog.functions.constant(b))
+};
+goog.functions.equalTo = function (a, b) {
+	return function (c) {
+		return b ? a == c : a === c
+	}
+};
+goog.functions.compose = function (a, b) {
+	var c = arguments,
+		d = c.length;
+	return function () {
+		var a;
+		d && (a = c[d - 1].apply(this, arguments));
+		for (var b = d - 2; 0 <= b; b--) a = c[b].call(this, a);
+		return a
+	}
+};
+goog.functions.sequence = function (a) {
+	var b = arguments,
+		c = b.length;
+	return function () {
+		for (var a, e = 0; e < c; e++) a = b[e].apply(this, arguments);
+		return a
+	}
+};
+goog.functions.and = function (a) {
+	var b = arguments,
+		c = b.length;
+	return function () {
+		for (var a = 0; a < c; a++)
+			if (!b[a].apply(this, arguments)) return !1;
+		return !0
+	}
+};
+goog.functions.or = function (a) {
+	var b = arguments,
+		c = b.length;
+	return function () {
+		for (var a = 0; a < c; a++)
+			if (b[a].apply(this, arguments)) return !0;
+		return !1
+	}
+};
+goog.functions.not = function (a) {
+	return function () {
+		return !a.apply(this, arguments)
+	}
+};
+goog.functions.create = function (a, b) {
+	var c = function () { };
+	c.prototype = a.prototype;
+	c = new c;
+	a.apply(c, Array.prototype.slice.call(arguments, 1));
+	return c
+};
+goog.functions.CACHE_RETURN_VALUE = !0;
+goog.functions.cacheReturnValue = function (a) {
+	var b = !1,
+		c;
+	return function () {
+		if (!goog.functions.CACHE_RETURN_VALUE) return a();
+		b || (c = a(), b = !0);
+		return c
+	}
+};
+goog.functions.once = function (a) {
+	var b = a;
+	return function () {
+		if (b) {
+			var a = b;
+			b = null;
+			a()
+		}
+	}
+};
+goog.functions.debounce = function (a, b, c) {
+	c && (a = goog.bind(a, c));
+	var d = null;
+	return function (c) {
+		goog.global.clearTimeout(d);
+		var e = arguments;
+		d = goog.global.setTimeout(function () {
+			a.apply(null, e)
+		}, b)
+	}
+};
+goog.functions.throttle = function (a, b, c) {
+	c && (a = goog.bind(a, c));
+	var d = null,
+		e = !1,
+		f = [],
+		g = function () {
+        	d = null;
+        	e && (e = !1, h())
+		},
+		h = function () {
+        	d = goog.global.setTimeout(g, b);
+        	a.apply(null, f)
+		};
+	return function (a) {
+		f = arguments;
+		d ? e = !0 : h()
+	}
+};
+goog.async.throwException = function (a) {
+	goog.global.setTimeout(function () {
+		throw a;
+	}, 0)
+};
+goog.async.nextTick = function (a, b, c) {
+	var d = a;
+	b && (d = goog.bind(a, b));
+	d = goog.async.nextTick.wrapCallback_(d);
+	goog.isFunction(goog.global.setImmediate) && (c || goog.async.nextTick.useSetImmediate_()) ? goog.global.setImmediate(d) : (goog.async.nextTick.setImmediate_ || (goog.async.nextTick.setImmediate_ = goog.async.nextTick.getSetImmediateEmulator_()), goog.async.nextTick.setImmediate_(d))
+};
+goog.async.nextTick.useSetImmediate_ = function () {
+	return goog.global.Window && goog.global.Window.prototype && !goog.labs.userAgent.browser.isEdge() && goog.global.Window.prototype.setImmediate == goog.global.setImmediate ? !1 : !0
+};
+goog.async.nextTick.getSetImmediateEmulator_ = function () {
+	var a = goog.global.MessageChannel;
+	"undefined" === typeof a && "undefined" !== typeof window && window.postMessage && window.addEventListener && !goog.labs.userAgent.engine.isPresto() && (a = function () {
+		var a = document.createElement("IFRAME");
+		a.style.display = "none";
+		a.src = "";
+		document.documentElement.appendChild(a);
+		var b = a.contentWindow,
+			a = b.document;
+		a.open();
+		a.write("");
+		a.close();
+		var c = "callImmediate" + Math.random(),
+			d = "file:" == b.location.protocol ? "*" : b.location.protocol +
+			"//" + b.location.host,
+			a = goog.bind(function (a) {
+            	if (("*" == d || a.origin == d) && a.data == c) this.port1.onmessage()
+			}, this);
+		b.addEventListener("message", a, !1);
+		this.port1 = {};
+		this.port2 = {
+			postMessage: function () {
+				b.postMessage(c, d)
+			}
+		}
+	});
+	if ("undefined" !== typeof a && !goog.labs.userAgent.browser.isIE()) {
+		var b = new a,
+			c = {},
+			d = c;
+		b.port1.onmessage = function () {
+			if (goog.isDef(c.next)) {
+				c = c.next;
+				var a = c.cb;
+				c.cb = null;
+				a()
+			}
+		};
+		return function (a) {
+			d.next = {
+				cb: a
+			};
+			d = d.next;
+			b.port2.postMessage(0)
+		}
+	}
+	return "undefined" !== typeof document && "onreadystatechange" in
+		document.createElement("SCRIPT") ? function (a) {
+        	var b = document.createElement("SCRIPT");
+        	b.onreadystatechange = function () {
+        		b.onreadystatechange = null;
+        		b.parentNode.removeChild(b);
+        		b = null;
+        		a();
+        		a = null
+        	};
+        	document.documentElement.appendChild(b)
+		} : function (a) {
+        	goog.global.setTimeout(a, 0)
+		}
+};
+goog.async.nextTick.wrapCallback_ = goog.functions.identity;
+goog.debug.entryPointRegistry.register(function (a) {
+	goog.async.nextTick.wrapCallback_ = a
+});
+goog.async.run = function (a, b) {
+	goog.async.run.schedule_ || goog.async.run.initializeRunner_();
+	goog.async.run.workQueueScheduled_ || (goog.async.run.schedule_(), goog.async.run.workQueueScheduled_ = !0);
+	goog.async.run.workQueue_.add(a, b)
+};
+goog.async.run.initializeRunner_ = function () {
+	var a = goog.global.Promise;
+	if (-1 != String(a).indexOf("[native code]")) {
+		var b = a.resolve(void 0);
+		goog.async.run.schedule_ = function () {
+			b.then(goog.async.run.processWorkQueue)
+		}
+	} else goog.async.run.schedule_ = function () {
+		goog.async.nextTick(goog.async.run.processWorkQueue)
+	}
+};
+goog.async.run.forceNextTick = function (a) {
+	goog.async.run.schedule_ = function () {
+		goog.async.nextTick(goog.async.run.processWorkQueue);
+		a && a(goog.async.run.processWorkQueue)
+	}
+};
+goog.async.run.workQueueScheduled_ = !1;
+goog.async.run.workQueue_ = new goog.async.WorkQueue;
+goog.DEBUG && (goog.async.run.resetQueue = function () {
+	goog.async.run.workQueueScheduled_ = !1;
+	goog.async.run.workQueue_ = new goog.async.WorkQueue
+});
+goog.async.run.processWorkQueue = function () {
+	for (var a; a = goog.async.run.workQueue_.remove() ;) {
+		try {
+			a.fn.call(a.scope)
+		} catch (b) {
+			goog.async.throwException(b)
+		}
+		goog.async.run.workQueue_.returnUnused(a)
+	}
+	goog.async.run.workQueueScheduled_ = !1
+};
+goog.promise = {};
+goog.promise.Resolver = function () { };
+goog.Promise = function (a, b) {
+	this.state_ = goog.Promise.State_.PENDING;
+	this.result_ = void 0;
+	this.callbackEntriesTail_ = this.callbackEntries_ = this.parent_ = null;
+	this.executing_ = !1;
+	0 < goog.Promise.UNHANDLED_REJECTION_DELAY ? this.unhandledRejectionId_ = 0 : 0 == goog.Promise.UNHANDLED_REJECTION_DELAY && (this.hadUnhandledRejection_ = !1);
+	goog.Promise.LONG_STACK_TRACES && (this.stack_ = [], this.addStackTrace_(Error("created")), this.currentStep_ = 0);
+	if (a != goog.nullFunction) try {
+		var c = this;
+		a.call(b, function (a) {
+			c.resolve_(goog.Promise.State_.FULFILLED,
+				a)
+		}, function (a) {
+			if (goog.DEBUG && !(a instanceof goog.Promise.CancellationError)) try {
+				if (a instanceof Error) throw a;
+				throw Error("Promise rejected.");
+			} catch (e) { }
+			c.resolve_(goog.Promise.State_.REJECTED, a)
+		})
+	} catch (d) {
+		this.resolve_(goog.Promise.State_.REJECTED, d)
+	}
+};
+goog.Promise.LONG_STACK_TRACES = !1;
+goog.Promise.UNHANDLED_REJECTION_DELAY = 0;
+goog.Promise.State_ = {
+	PENDING: 0,
+	BLOCKED: 1,
+	FULFILLED: 2,
+	REJECTED: 3
+};
+goog.Promise.CallbackEntry_ = function () {
+	this.next = this.context = this.onRejected = this.onFulfilled = this.child = null;
+	this.always = !1
+};
+goog.Promise.CallbackEntry_.prototype.reset = function () {
+	this.context = this.onRejected = this.onFulfilled = this.child = null;
+	this.always = !1
+};
+goog.Promise.DEFAULT_MAX_UNUSED = 100;
+goog.Promise.freelist_ = new goog.async.FreeList(function () {
+	return new goog.Promise.CallbackEntry_
+}, function (a) {
+	a.reset()
+}, goog.Promise.DEFAULT_MAX_UNUSED);
+goog.Promise.getCallbackEntry_ = function (a, b, c) {
+	var d = goog.Promise.freelist_.get();
+	d.onFulfilled = a;
+	d.onRejected = b;
+	d.context = c;
+	return d
+};
+goog.Promise.returnEntry_ = function (a) {
+	goog.Promise.freelist_.put(a)
+};
+goog.Promise.resolve = function (a) {
+	if (a instanceof goog.Promise) return a;
+	var b = new goog.Promise(goog.nullFunction);
+	b.resolve_(goog.Promise.State_.FULFILLED, a);
+	return b
+};
+goog.Promise.reject = function (a) {
+	return new goog.Promise(function (b, c) {
+		c(a)
+	})
+};
+goog.Promise.resolveThen_ = function (a, b, c) {
+	goog.Promise.maybeThen_(a, b, c, null) || goog.async.run(goog.partial(b, a))
+};
+goog.Promise.race = function (a) {
+	return new goog.Promise(function (b, c) {
+		a.length || b(void 0);
+		for (var d = 0, e; d < a.length; d++) e = a[d], goog.Promise.resolveThen_(e, b, c)
+	})
+};
+goog.Promise.all = function (a) {
+	return new goog.Promise(function (b, c) {
+		var d = a.length,
+			e = [];
+		if (d)
+			for (var f = function (a, c) {
+					d--;
+					e[a] = c;
+					0 == d && b(e)
+			}, g = function (a) {
+					c(a)
+			}, h = 0, k; h < a.length; h++) k = a[h], goog.Promise.resolveThen_(k, goog.partial(f, h), g);
+		else b(e)
+	})
+};
+goog.Promise.allSettled = function (a) {
+	return new goog.Promise(function (b, c) {
+		var d = a.length,
+			e = [];
+		if (d)
+			for (var f = function (a, c, f) {
+					d--;
+					e[a] = c ? {
+				fulfilled: !0,
+				value: f
+			} : {
+				fulfilled: !1,
+				reason: f
+			};
+					0 == d && b(e)
+			}, g = 0, h; g < a.length; g++) h = a[g], goog.Promise.resolveThen_(h, goog.partial(f, g, !0), goog.partial(f, g, !1));
+		else b(e)
+	})
+};
+goog.Promise.firstFulfilled = function (a) {
+	return new goog.Promise(function (b, c) {
+		var d = a.length,
+			e = [];
+		if (d)
+			for (var f = function (a) {
+					b(a)
+			}, g = function (a, b) {
+					d--;
+					e[a] = b;
+					0 == d && c(e)
+			}, h = 0, k; h < a.length; h++) k = a[h], goog.Promise.resolveThen_(k, f, goog.partial(g, h));
+		else b(void 0)
+	})
+};
+goog.Promise.withResolver = function () {
+	var a, b, c = new goog.Promise(function (c, e) {
+		a = c;
+		b = e
+	});
+	return new goog.Promise.Resolver_(c, a, b)
+};
+goog.Promise.prototype.then = function (a, b, c) {
+	null != a && goog.asserts.assertFunction(a, "opt_onFulfilled should be a function.");
+	null != b && goog.asserts.assertFunction(b, "opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");
+	goog.Promise.LONG_STACK_TRACES && this.addStackTrace_(Error("then"));
+	return this.addChildPromise_(goog.isFunction(a) ? a : null, goog.isFunction(b) ? b : null, c)
+};
+goog.Thenable.addImplementation(goog.Promise);
+goog.Promise.prototype.thenVoid = function (a, b, c) {
+	null != a && goog.asserts.assertFunction(a, "opt_onFulfilled should be a function.");
+	null != b && goog.asserts.assertFunction(b, "opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");
+	goog.Promise.LONG_STACK_TRACES && this.addStackTrace_(Error("then"));
+	this.addCallbackEntry_(goog.Promise.getCallbackEntry_(a || goog.nullFunction, b || null, c))
+};
+goog.Promise.prototype.thenAlways = function (a, b) {
+	goog.Promise.LONG_STACK_TRACES && this.addStackTrace_(Error("thenAlways"));
+	var c = goog.Promise.getCallbackEntry_(a, a, b);
+	c.always = !0;
+	this.addCallbackEntry_(c);
+	return this
+};
+goog.Promise.prototype.thenCatch = function (a, b) {
+	goog.Promise.LONG_STACK_TRACES && this.addStackTrace_(Error("thenCatch"));
+	return this.addChildPromise_(null, a, b)
+};
+goog.Promise.prototype.cancel = function (a) {
+	this.state_ == goog.Promise.State_.PENDING && goog.async.run(function () {
+		var b = new goog.Promise.CancellationError(a);
+		this.cancelInternal_(b)
+	}, this)
+};
+goog.Promise.prototype.cancelInternal_ = function (a) {
+	this.state_ == goog.Promise.State_.PENDING && (this.parent_ ? (this.parent_.cancelChild_(this, a), this.parent_ = null) : this.resolve_(goog.Promise.State_.REJECTED, a))
+};
+goog.Promise.prototype.cancelChild_ = function (a, b) {
+	if (this.callbackEntries_) {
+		for (var c = 0, d = null, e = null, f = this.callbackEntries_; f && (f.always || (c++, f.child == a && (d = f), !(d && 1 < c))) ; f = f.next) d || (e = f);
+		d && (this.state_ == goog.Promise.State_.PENDING && 1 == c ? this.cancelInternal_(b) : (e ? this.removeEntryAfter_(e) : this.popEntry_(), this.executeCallback_(d, goog.Promise.State_.REJECTED, b)))
+	}
+};
+goog.Promise.prototype.addCallbackEntry_ = function (a) {
+	this.hasEntry_() || this.state_ != goog.Promise.State_.FULFILLED && this.state_ != goog.Promise.State_.REJECTED || this.scheduleCallbacks_();
+	this.queueEntry_(a)
+};
+goog.Promise.prototype.addChildPromise_ = function (a, b, c) {
+	var d = goog.Promise.getCallbackEntry_(null, null, null);
+	d.child = new goog.Promise(function (e, f) {
+		d.onFulfilled = a ? function (b) {
+			try {
+				var d = a.call(c, b);
+				e(d)
+			} catch (k) {
+				f(k)
+			}
+		} : e;
+		d.onRejected = b ? function (a) {
+			try {
+				var d = b.call(c, a);
+				!goog.isDef(d) && a instanceof goog.Promise.CancellationError ? f(a) : e(d)
+			} catch (k) {
+				f(k)
+			}
+		} : f
+	});
+	d.child.parent_ = this;
+	this.addCallbackEntry_(d);
+	return d.child
+};
+goog.Promise.prototype.unblockAndFulfill_ = function (a) {
+	goog.asserts.assert(this.state_ == goog.Promise.State_.BLOCKED);
+	this.state_ = goog.Promise.State_.PENDING;
+	this.resolve_(goog.Promise.State_.FULFILLED, a)
+};
+goog.Promise.prototype.unblockAndReject_ = function (a) {
+	goog.asserts.assert(this.state_ == goog.Promise.State_.BLOCKED);
+	this.state_ = goog.Promise.State_.PENDING;
+	this.resolve_(goog.Promise.State_.REJECTED, a)
+};
+goog.Promise.prototype.resolve_ = function (a, b) {
+	this.state_ == goog.Promise.State_.PENDING && (this === b && (a = goog.Promise.State_.REJECTED, b = new TypeError("Promise cannot resolve to itself")), this.state_ = goog.Promise.State_.BLOCKED, goog.Promise.maybeThen_(b, this.unblockAndFulfill_, this.unblockAndReject_, this) || (this.result_ = b, this.state_ = a, this.parent_ = null, this.scheduleCallbacks_(), a != goog.Promise.State_.REJECTED || b instanceof goog.Promise.CancellationError || goog.Promise.addUnhandledRejection_(this, b)))
+};
+goog.Promise.maybeThen_ = function (a, b, c, d) {
+	if (a instanceof goog.Promise) return a.thenVoid(b, c, d), !0;
+	if (goog.Thenable.isImplementedBy(a)) return a.then(b, c, d), !0;
+	if (goog.isObject(a)) try {
+		var e = a.then;
+		if (goog.isFunction(e)) return goog.Promise.tryThen_(a, e, b, c, d), !0
+	} catch (f) {
+		return c.call(d, f), !0
+	}
+	return !1
+};
+goog.Promise.tryThen_ = function (a, b, c, d, e) {
+	var f = !1,
+		g = function (a) {
+        	f || (f = !0, c.call(e, a))
+		},
+		h = function (a) {
+        	f || (f = !0, d.call(e, a))
+		};
+	try {
+		b.call(a, g, h)
+	} catch (k) {
+		h(k)
+	}
+};
+goog.Promise.prototype.scheduleCallbacks_ = function () {
+	this.executing_ || (this.executing_ = !0, goog.async.run(this.executeCallbacks_, this))
+};
+goog.Promise.prototype.hasEntry_ = function () {
+	return !!this.callbackEntries_
+};
+goog.Promise.prototype.queueEntry_ = function (a) {
+	goog.asserts.assert(null != a.onFulfilled);
+	this.callbackEntriesTail_ ? this.callbackEntriesTail_.next = a : this.callbackEntries_ = a;
+	this.callbackEntriesTail_ = a
+};
+goog.Promise.prototype.popEntry_ = function () {
+	var a = null;
+	this.callbackEntries_ && (a = this.callbackEntries_, this.callbackEntries_ = a.next, a.next = null);
+	this.callbackEntries_ || (this.callbackEntriesTail_ = null);
+	null != a && goog.asserts.assert(null != a.onFulfilled);
+	return a
+};
+goog.Promise.prototype.removeEntryAfter_ = function (a) {
+	goog.asserts.assert(this.callbackEntries_);
+	goog.asserts.assert(null != a);
+	a.next == this.callbackEntriesTail_ && (this.callbackEntriesTail_ = a);
+	a.next = a.next.next
+};
+goog.Promise.prototype.executeCallbacks_ = function () {
+	for (var a; a = this.popEntry_() ;) goog.Promise.LONG_STACK_TRACES && this.currentStep_++, this.executeCallback_(a, this.state_, this.result_);
+	this.executing_ = !1
+};
+goog.Promise.prototype.executeCallback_ = function (a, b, c) {
+	b == goog.Promise.State_.REJECTED && a.onRejected && !a.always && this.removeUnhandledRejection_();
+	if (a.child) a.child.parent_ = null, goog.Promise.invokeCallback_(a, b, c);
+	else try {
+		a.always ? a.onFulfilled.call(a.context) : goog.Promise.invokeCallback_(a, b, c)
+	} catch (d) {
+		goog.Promise.handleRejection_.call(null, d)
+	}
+	goog.Promise.returnEntry_(a)
+};
+goog.Promise.invokeCallback_ = function (a, b, c) {
+	b == goog.Promise.State_.FULFILLED ? a.onFulfilled.call(a.context, c) : a.onRejected && a.onRejected.call(a.context, c)
+};
+goog.Promise.prototype.addStackTrace_ = function (a) {
+	if (goog.Promise.LONG_STACK_TRACES && goog.isString(a.stack)) {
+		var b = a.stack.split("\n", 4)[3];
+		a = a.message;
+		a += Array(11 - a.length).join(" ");
+		this.stack_.push(a + b)
+	}
+};
+goog.Promise.prototype.appendLongStack_ = function (a) {
+	if (goog.Promise.LONG_STACK_TRACES && a && goog.isString(a.stack) && this.stack_.length) {
+		for (var b = ["Promise trace:"], c = this; c; c = c.parent_) {
+			for (var d = this.currentStep_; 0 <= d; d--) b.push(c.stack_[d]);
+			b.push("Value: [" + (c.state_ == goog.Promise.State_.REJECTED ? "REJECTED" : "FULFILLED") + "] <" + String(c.result_) + ">")
+		}
+		a.stack += "\n\n" + b.join("\n")
+	}
+};
+goog.Promise.prototype.removeUnhandledRejection_ = function () {
+	if (0 < goog.Promise.UNHANDLED_REJECTION_DELAY)
+		for (var a = this; a && a.unhandledRejectionId_; a = a.parent_) goog.global.clearTimeout(a.unhandledRejectionId_), a.unhandledRejectionId_ = 0;
+	else if (0 == goog.Promise.UNHANDLED_REJECTION_DELAY)
+		for (a = this; a && a.hadUnhandledRejection_; a = a.parent_) a.hadUnhandledRejection_ = !1
+};
+goog.Promise.addUnhandledRejection_ = function (a, b) {
+	0 < goog.Promise.UNHANDLED_REJECTION_DELAY ? a.unhandledRejectionId_ = goog.global.setTimeout(function () {
+		a.appendLongStack_(b);
+		goog.Promise.handleRejection_.call(null, b)
+	}, goog.Promise.UNHANDLED_REJECTION_DELAY) : 0 == goog.Promise.UNHANDLED_REJECTION_DELAY && (a.hadUnhandledRejection_ = !0, goog.async.run(function () {
+		a.hadUnhandledRejection_ && (a.appendLongStack_(b), goog.Promise.handleRejection_.call(null, b))
+	}))
+};
+goog.Promise.handleRejection_ = goog.async.throwException;
+goog.Promise.setUnhandledRejectionHandler = function (a) {
+	goog.Promise.handleRejection_ = a
+};
+goog.Promise.CancellationError = function (a) {
+	goog.debug.Error.call(this, a)
+};
+goog.inherits(goog.Promise.CancellationError, goog.debug.Error);
+goog.Promise.CancellationError.prototype.name = "cancel";
+goog.Promise.Resolver_ = function (a, b, c) {
+	this.promise = a;
+	this.resolve = b;
+	this.reject = c
+};
+goog.events.EventTarget = function () {
+	goog.Disposable.call(this);
+	this.eventTargetListeners_ = new goog.events.ListenerMap(this);
+	this.actualEventTarget_ = this;
+	this.parentEventTarget_ = null
+};
+goog.inherits(goog.events.EventTarget, goog.Disposable);
+goog.events.Listenable.addImplementation(goog.events.EventTarget);
+goog.events.EventTarget.MAX_ANCESTORS_ = 1E3;
+goog.events.EventTarget.prototype.getParentEventTarget = function () {
+	return this.parentEventTarget_
+};
+goog.events.EventTarget.prototype.setParentEventTarget = function (a) {
+	this.parentEventTarget_ = a
+};
+goog.events.EventTarget.prototype.addEventListener = function (a, b, c, d) {
+	goog.events.listen(this, a, b, c, d)
+};
+goog.events.EventTarget.prototype.removeEventListener = function (a, b, c, d) {
+	goog.events.unlisten(this, a, b, c, d)
+};
+goog.events.EventTarget.prototype.dispatchEvent = function (a) {
+	this.assertInitialized_();
+	var b, c = this.getParentEventTarget();
+	if (c) {
+		b = [];
+		for (var d = 1; c; c = c.getParentEventTarget()) b.push(c), goog.asserts.assert(++d < goog.events.EventTarget.MAX_ANCESTORS_, "infinite loop")
+	}
+	return goog.events.EventTarget.dispatchEventInternal_(this.actualEventTarget_, a, b)
+};
+goog.events.EventTarget.prototype.disposeInternal = function () {
+	goog.events.EventTarget.superClass_.disposeInternal.call(this);
+	this.removeAllListeners();
+	this.parentEventTarget_ = null
+};
+goog.events.EventTarget.prototype.listen = function (a, b, c, d) {
+	this.assertInitialized_();
+	return this.eventTargetListeners_.add(String(a), b, !1, c, d)
+};
+goog.events.EventTarget.prototype.listenOnce = function (a, b, c, d) {
+	return this.eventTargetListeners_.add(String(a), b, !0, c, d)
+};
+goog.events.EventTarget.prototype.unlisten = function (a, b, c, d) {
+	return this.eventTargetListeners_.remove(String(a), b, c, d)
+};
+goog.events.EventTarget.prototype.unlistenByKey = function (a) {
+	return this.eventTargetListeners_.removeByKey(a)
+};
+goog.events.EventTarget.prototype.removeAllListeners = function (a) {
+	return this.eventTargetListeners_ ? this.eventTargetListeners_.removeAll(a) : 0
+};
+goog.events.EventTarget.prototype.fireListeners = function (a, b, c) {
+	a = this.eventTargetListeners_.listeners[String(a)];
+	if (!a) return !0;
+	a = a.concat();
+	for (var d = !0, e = 0; e < a.length; ++e) {
+		var f = a[e];
+		if (f && !f.removed && f.capture == b) {
+			var g = f.listener,
+				h = f.handler || f.src;
+			f.callOnce && this.unlistenByKey(f);
+			d = !1 !== g.call(h, c) && d
+		}
+	}
+	return d && 0 != c.returnValue_
+};
+goog.events.EventTarget.prototype.getListeners = function (a, b) {
+	return this.eventTargetListeners_.getListeners(String(a), b)
+};
+goog.events.EventTarget.prototype.getListener = function (a, b, c, d) {
+	return this.eventTargetListeners_.getListener(String(a), b, c, d)
+};
+goog.events.EventTarget.prototype.hasListener = function (a, b) {
+	var c = goog.isDef(a) ? String(a) : void 0;
+	return this.eventTargetListeners_.hasListener(c, b)
+};
+goog.events.EventTarget.prototype.setTargetForTesting = function (a) {
+	this.actualEventTarget_ = a
+};
+goog.events.EventTarget.prototype.assertInitialized_ = function () {
+	goog.asserts.assert(this.eventTargetListeners_, "Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")
+};
+goog.events.EventTarget.dispatchEventInternal_ = function (a, b, c) {
+	var d = b.type || b;
+	if (goog.isString(b)) b = new goog.events.Event(b, a);
+	else if (b instanceof goog.events.Event) b.target = b.target || a;
+	else {
+		var e = b;
+		b = new goog.events.Event(d, a);
+		goog.object.extend(b, e)
+	}
+	var e = !0,
+		f;
+	if (c)
+		for (var g = c.length - 1; !b.propagationStopped_ && 0 <= g; g--) f = b.currentTarget = c[g], e = f.fireListeners(d, !0, b) && e;
+	b.propagationStopped_ || (f = b.currentTarget = a, e = f.fireListeners(d, !0, b) && e, b.propagationStopped_ || (e = f.fireListeners(d, !1, b) && e));
+	if (c)
+		for (g = 0; !b.propagationStopped_ && g < c.length; g++) f = b.currentTarget = c[g], e = f.fireListeners(d, !1, b) && e;
+	return e
+};
+goog.Timer = function (a, b) {
+	goog.events.EventTarget.call(this);
+	this.interval_ = a || 1;
+	this.timerObject_ = b || goog.Timer.defaultTimerObject;
+	this.boundTick_ = goog.bind(this.tick_, this);
+	this.last_ = goog.now()
+};
+goog.inherits(goog.Timer, goog.events.EventTarget);
+goog.Timer.MAX_TIMEOUT_ = 2147483647;
+goog.Timer.INVALID_TIMEOUT_ID_ = -1;
+goog.Timer.prototype.enabled = !1;
+goog.Timer.defaultTimerObject = goog.global;
+goog.Timer.intervalScale = .8;
+goog.Timer.prototype.timer_ = null;
+goog.Timer.prototype.getInterval = function () {
+	return this.interval_
+};
+goog.Timer.prototype.setInterval = function (a) {
+	this.interval_ = a;
+	this.timer_ && this.enabled ? (this.stop(), this.start()) : this.timer_ && this.stop()
+};
+goog.Timer.prototype.tick_ = function () {
+	if (this.enabled) {
+		var a = goog.now() - this.last_;
+		0 < a && a < this.interval_ * goog.Timer.intervalScale ? this.timer_ = this.timerObject_.setTimeout(this.boundTick_, this.interval_ - a) : (this.timer_ && (this.timerObject_.clearTimeout(this.timer_), this.timer_ = null), this.dispatchTick(), this.enabled && (this.timer_ = this.timerObject_.setTimeout(this.boundTick_, this.interval_), this.last_ = goog.now()))
+	}
+};
+goog.Timer.prototype.dispatchTick = function () {
+	this.dispatchEvent(goog.Timer.TICK)
+};
+goog.Timer.prototype.start = function () {
+	this.enabled = !0;
+	this.timer_ || (this.timer_ = this.timerObject_.setTimeout(this.boundTick_, this.interval_), this.last_ = goog.now())
+};
+goog.Timer.prototype.stop = function () {
+	this.enabled = !1;
+	this.timer_ && (this.timerObject_.clearTimeout(this.timer_), this.timer_ = null)
+};
+goog.Timer.prototype.disposeInternal = function () {
+	goog.Timer.superClass_.disposeInternal.call(this);
+	this.stop();
+	delete this.timerObject_
+};
+goog.Timer.TICK = "tick";
+goog.Timer.callOnce = function (a, b, c) {
+	if (goog.isFunction(a)) c && (a = goog.bind(a, c));
+	else if (a && "function" == typeof a.handleEvent) a = goog.bind(a.handleEvent, a);
+	else throw Error("Invalid listener argument");
+	return Number(b) > goog.Timer.MAX_TIMEOUT_ ? goog.Timer.INVALID_TIMEOUT_ID_ : goog.Timer.defaultTimerObject.setTimeout(a, b || 0)
+};
+goog.Timer.clear = function (a) {
+	goog.Timer.defaultTimerObject.clearTimeout(a)
+};
+goog.Timer.promise = function (a, b) {
+	var c = null;
+	return (new goog.Promise(function (d, e) {
+		c = goog.Timer.callOnce(function () {
+			d(b)
+		}, a);
+		c == goog.Timer.INVALID_TIMEOUT_ID_ && e(Error("Failed to schedule timer."))
+	})).thenCatch(function (a) {
+		goog.Timer.clear(c);
+		throw a;
+	})
+};
+goog.events.EventHandler = function (a) {
+	goog.Disposable.call(this);
+	this.handler_ = a;
+	this.keys_ = {}
+};
+goog.inherits(goog.events.EventHandler, goog.Disposable);
+goog.events.EventHandler.typeArray_ = [];
+goog.events.EventHandler.prototype.listen = function (a, b, c, d) {
+	return this.listen_(a, b, c, d)
+};
+goog.events.EventHandler.prototype.listenWithScope = function (a, b, c, d, e) {
+	return this.listen_(a, b, c, d, e)
+};
+goog.events.EventHandler.prototype.listen_ = function (a, b, c, d, e) {
+	goog.isArray(b) || (b && (goog.events.EventHandler.typeArray_[0] = b.toString()), b = goog.events.EventHandler.typeArray_);
+	for (var f = 0; f < b.length; f++) {
+		var g = goog.events.listen(a, b[f], c || this.handleEvent, d || !1, e || this.handler_ || this);
+		if (!g) break;
+		this.keys_[g.key] = g
+	}
+	return this
+};
+goog.events.EventHandler.prototype.listenOnce = function (a, b, c, d) {
+	return this.listenOnce_(a, b, c, d)
+};
+goog.events.EventHandler.prototype.listenOnceWithScope = function (a, b, c, d, e) {
+	return this.listenOnce_(a, b, c, d, e)
+};
+goog.events.EventHandler.prototype.listenOnce_ = function (a, b, c, d, e) {
+	if (goog.isArray(b))
+		for (var f = 0; f < b.length; f++) this.listenOnce_(a, b[f], c, d, e);
+	else {
+		a = goog.events.listenOnce(a, b, c || this.handleEvent, d, e || this.handler_ || this);
+		if (!a) return this;
+		this.keys_[a.key] = a
+	}
+	return this
+};
+goog.events.EventHandler.prototype.listenWithWrapper = function (a, b, c, d) {
+	return this.listenWithWrapper_(a, b, c, d)
+};
+goog.events.EventHandler.prototype.listenWithWrapperAndScope = function (a, b, c, d, e) {
+	return this.listenWithWrapper_(a, b, c, d, e)
+};
+goog.events.EventHandler.prototype.listenWithWrapper_ = function (a, b, c, d, e) {
+	b.listen(a, c, d, e || this.handler_ || this, this);
+	return this
+};
+goog.events.EventHandler.prototype.getListenerCount = function () {
+	var a = 0,
+		b;
+	for (b in this.keys_) Object.prototype.hasOwnProperty.call(this.keys_, b) && a++;
+	return a
+};
+goog.events.EventHandler.prototype.unlisten = function (a, b, c, d, e) {
+	if (goog.isArray(b))
+		for (var f = 0; f < b.length; f++) this.unlisten(a, b[f], c, d, e);
+	else if (a = goog.events.getListener(a, b, c || this.handleEvent, d, e || this.handler_ || this)) goog.events.unlistenByKey(a), delete this.keys_[a.key];
+	return this
+};
+goog.events.EventHandler.prototype.unlistenWithWrapper = function (a, b, c, d, e) {
+	b.unlisten(a, c, d, e || this.handler_ || this, this);
+	return this
+};
+goog.events.EventHandler.prototype.removeAll = function () {
+	goog.object.forEach(this.keys_, function (a, b) {
+		this.keys_.hasOwnProperty(b) && goog.events.unlistenByKey(a)
+	}, this);
+	this.keys_ = {}
+};
+goog.events.EventHandler.prototype.disposeInternal = function () {
+	goog.events.EventHandler.superClass_.disposeInternal.call(this);
+	this.removeAll()
+};
+goog.events.EventHandler.prototype.handleEvent = function (a) {
+	throw Error("EventHandler.handleEvent not implemented");
+};
+goog.ui = {};
+goog.ui.IdGenerator = function () { };
+goog.addSingletonGetter(goog.ui.IdGenerator);
+goog.ui.IdGenerator.prototype.nextId_ = 0;
+goog.ui.IdGenerator.prototype.getNextUniqueId = function () {
+	return ":" + (this.nextId_++).toString(36)
+};
+goog.ui.Component = function (a) {
+	goog.events.EventTarget.call(this);
+	this.dom_ = a || goog.dom.getDomHelper();
+	this.rightToLeft_ = goog.ui.Component.defaultRightToLeft_;
+	this.id_ = null;
+	this.inDocument_ = !1;
+	this.element_ = null;
+	this.googUiComponentHandler_ = void 0;
+	this.childIndex_ = this.children_ = this.parent_ = this.model_ = null;
+	this.wasDecorated_ = !1
+};
+goog.inherits(goog.ui.Component, goog.events.EventTarget);
+goog.ui.Component.ALLOW_DETACHED_DECORATION = !1;
+goog.ui.Component.prototype.idGenerator_ = goog.ui.IdGenerator.getInstance();
+goog.ui.Component.DEFAULT_BIDI_DIR = 0;
+goog.ui.Component.defaultRightToLeft_ = 1 == goog.ui.Component.DEFAULT_BIDI_DIR ? !1 : -1 == goog.ui.Component.DEFAULT_BIDI_DIR ? !0 : null;
+goog.ui.Component.EventType = {
+	BEFORE_SHOW: "beforeshow",
+	SHOW: "show",
+	HIDE: "hide",
+	DISABLE: "disable",
+	ENABLE: "enable",
+	HIGHLIGHT: "highlight",
+	UNHIGHLIGHT: "unhighlight",
+	ACTIVATE: "activate",
+	DEACTIVATE: "deactivate",
+	SELECT: "select",
+	UNSELECT: "unselect",
+	CHECK: "check",
+	UNCHECK: "uncheck",
+	FOCUS: "focus",
+	BLUR: "blur",
+	OPEN: "open",
+	CLOSE: "close",
+	ENTER: "enter",
+	LEAVE: "leave",
+	ACTION: "action",
+	CHANGE: "change"
+};
+goog.ui.Component.Error = {
+	NOT_SUPPORTED: "Method not supported",
+	DECORATE_INVALID: "Invalid element to decorate",
+	ALREADY_RENDERED: "Component already rendered",
+	PARENT_UNABLE_TO_BE_SET: "Unable to set parent component",
+	CHILD_INDEX_OUT_OF_BOUNDS: "Child component index out of bounds",
+	NOT_OUR_CHILD: "Child is not in parent component",
+	NOT_IN_DOCUMENT: "Operation not supported while component is not in document",
+	STATE_INVALID: "Invalid component state"
+};
+goog.ui.Component.State = {
+	ALL: 255,
+	DISABLED: 1,
+	HOVER: 2,
+	ACTIVE: 4,
+	SELECTED: 8,
+	CHECKED: 16,
+	FOCUSED: 32,
+	OPENED: 64
+};
+goog.ui.Component.getStateTransitionEvent = function (a, b) {
+	switch (a) {
+		case goog.ui.Component.State.DISABLED:
+			return b ? goog.ui.Component.EventType.DISABLE : goog.ui.Component.EventType.ENABLE;
+		case goog.ui.Component.State.HOVER:
+			return b ? goog.ui.Component.EventType.HIGHLIGHT : goog.ui.Component.EventType.UNHIGHLIGHT;
+		case goog.ui.Component.State.ACTIVE:
+			return b ? goog.ui.Component.EventType.ACTIVATE : goog.ui.Component.EventType.DEACTIVATE;
+		case goog.ui.Component.State.SELECTED:
+			return b ? goog.ui.Component.EventType.SELECT :
+				goog.ui.Component.EventType.UNSELECT;
+		case goog.ui.Component.State.CHECKED:
+			return b ? goog.ui.Component.EventType.CHECK : goog.ui.Component.EventType.UNCHECK;
+		case goog.ui.Component.State.FOCUSED:
+			return b ? goog.ui.Component.EventType.FOCUS : goog.ui.Component.EventType.BLUR;
+		case goog.ui.Component.State.OPENED:
+			return b ? goog.ui.Component.EventType.OPEN : goog.ui.Component.EventType.CLOSE
+	}
+	throw Error(goog.ui.Component.Error.STATE_INVALID);
+};
+goog.ui.Component.setDefaultRightToLeft = function (a) {
+	goog.ui.Component.defaultRightToLeft_ = a
+};
+goog.ui.Component.prototype.getId = function () {
+	return this.id_ || (this.id_ = this.idGenerator_.getNextUniqueId())
+};
+goog.ui.Component.prototype.setId = function (a) {
+	this.parent_ && this.parent_.childIndex_ && (goog.object.remove(this.parent_.childIndex_, this.id_), goog.object.add(this.parent_.childIndex_, a, this));
+	this.id_ = a
+};
+goog.ui.Component.prototype.getElement = function () {
+	return this.element_
+};
+goog.ui.Component.prototype.getElementStrict = function () {
+	var a = this.element_;
+	goog.asserts.assert(a, "Can not call getElementStrict before rendering/decorating.");
+	return a
+};
+goog.ui.Component.prototype.setElementInternal = function (a) {
+	this.element_ = a
+};
+goog.ui.Component.prototype.getElementsByClass = function (a) {
+	return this.element_ ? this.dom_.getElementsByClass(a, this.element_) : []
+};
+goog.ui.Component.prototype.getElementByClass = function (a) {
+	return this.element_ ? this.dom_.getElementByClass(a, this.element_) : null
+};
+goog.ui.Component.prototype.getRequiredElementByClass = function (a) {
+	var b = this.getElementByClass(a);
+	goog.asserts.assert(b, "Expected element in component with class: %s", a);
+	return b
+};
+goog.ui.Component.prototype.getHandler = function () {
+	this.googUiComponentHandler_ || (this.googUiComponentHandler_ = new goog.events.EventHandler(this));
+	return this.googUiComponentHandler_
+};
+goog.ui.Component.prototype.setParent = function (a) {
+	if (this == a) throw Error(goog.ui.Component.Error.PARENT_UNABLE_TO_BE_SET);
+	if (a && this.parent_ && this.id_ && this.parent_.getChild(this.id_) && this.parent_ != a) throw Error(goog.ui.Component.Error.PARENT_UNABLE_TO_BE_SET);
+	this.parent_ = a;
+	goog.ui.Component.superClass_.setParentEventTarget.call(this, a)
+};
+goog.ui.Component.prototype.getParent = function () {
+	return this.parent_
+};
+goog.ui.Component.prototype.setParentEventTarget = function (a) {
+	if (this.parent_ && this.parent_ != a) throw Error(goog.ui.Component.Error.NOT_SUPPORTED);
+	goog.ui.Component.superClass_.setParentEventTarget.call(this, a)
+};
+goog.ui.Component.prototype.getDomHelper = function () {
+	return this.dom_
+};
+goog.ui.Component.prototype.isInDocument = function () {
+	return this.inDocument_
+};
+goog.ui.Component.prototype.createDom = function () {
+	this.element_ = this.dom_.createElement("DIV")
+};
+goog.ui.Component.prototype.render = function (a) {
+	this.render_(a)
+};
+goog.ui.Component.prototype.renderBefore = function (a) {
+	this.render_(a.parentNode, a)
+};
+goog.ui.Component.prototype.render_ = function (a, b) {
+	if (this.inDocument_) throw Error(goog.ui.Component.Error.ALREADY_RENDERED);
+	this.element_ || this.createDom();
+	a ? a.insertBefore(this.element_, b || null) : this.dom_.getDocument().body.appendChild(this.element_);
+	this.parent_ && !this.parent_.isInDocument() || this.enterDocument()
+};
+goog.ui.Component.prototype.decorate = function (a) {
+	if (this.inDocument_) throw Error(goog.ui.Component.Error.ALREADY_RENDERED);
+	if (a && this.canDecorate(a)) {
+		this.wasDecorated_ = !0;
+		var b = goog.dom.getOwnerDocument(a);
+		this.dom_ && this.dom_.getDocument() == b || (this.dom_ = goog.dom.getDomHelper(a));
+		this.decorateInternal(a);
+		goog.ui.Component.ALLOW_DETACHED_DECORATION && !goog.dom.contains(b, a) || this.enterDocument()
+	} else throw Error(goog.ui.Component.Error.DECORATE_INVALID);
+};
+goog.ui.Component.prototype.canDecorate = function (a) {
+	return !0
+};
+goog.ui.Component.prototype.wasDecorated = function () {
+	return this.wasDecorated_
+};
+goog.ui.Component.prototype.decorateInternal = function (a) {
+	this.element_ = a
+};
+goog.ui.Component.prototype.enterDocument = function () {
+	this.inDocument_ = !0;
+	this.forEachChild(function (a) {
+		!a.isInDocument() && a.getElement() && a.enterDocument()
+	})
+};
+goog.ui.Component.prototype.exitDocument = function () {
+	this.forEachChild(function (a) {
+		a.isInDocument() && a.exitDocument()
+	});
+	this.googUiComponentHandler_ && this.googUiComponentHandler_.removeAll();
+	this.inDocument_ = !1
+};
+goog.ui.Component.prototype.disposeInternal = function () {
+	this.inDocument_ && this.exitDocument();
+	this.googUiComponentHandler_ && (this.googUiComponentHandler_.dispose(), delete this.googUiComponentHandler_);
+	this.forEachChild(function (a) {
+		a.dispose()
+	});
+	!this.wasDecorated_ && this.element_ && goog.dom.removeNode(this.element_);
+	this.parent_ = this.model_ = this.element_ = this.childIndex_ = this.children_ = null;
+	goog.ui.Component.superClass_.disposeInternal.call(this)
+};
+goog.ui.Component.prototype.makeId = function (a) {
+	return this.getId() + "." + a
+};
+goog.ui.Component.prototype.makeIds = function (a) {
+	var b = {},
+		c;
+	for (c in a) b[c] = this.makeId(a[c]);
+	return b
+};
+goog.ui.Component.prototype.getModel = function () {
+	return this.model_
+};
+goog.ui.Component.prototype.setModel = function (a) {
+	this.model_ = a
+};
+goog.ui.Component.prototype.getFragmentFromId = function (a) {
+	return a.substring(this.getId().length + 1)
+};
+goog.ui.Component.prototype.getElementByFragment = function (a) {
+	if (!this.inDocument_) throw Error(goog.ui.Component.Error.NOT_IN_DOCUMENT);
+	return this.dom_.getElement(this.makeId(a))
+};
+goog.ui.Component.prototype.addChild = function (a, b) {
+	this.addChildAt(a, this.getChildCount(), b)
+};
+goog.ui.Component.prototype.addChildAt = function (a, b, c) {
+	goog.asserts.assert(!!a, "Provided element must not be null.");
+	if (a.inDocument_ && (c || !this.inDocument_)) throw Error(goog.ui.Component.Error.ALREADY_RENDERED);
+	if (0 > b || b > this.getChildCount()) throw Error(goog.ui.Component.Error.CHILD_INDEX_OUT_OF_BOUNDS);
+	this.childIndex_ && this.children_ || (this.childIndex_ = {}, this.children_ = []);
+	a.getParent() == this ? (goog.object.set(this.childIndex_, a.getId(), a), goog.array.remove(this.children_, a)) : goog.object.add(this.childIndex_,
+		a.getId(), a);
+	a.setParent(this);
+	goog.array.insertAt(this.children_, a, b);
+	a.inDocument_ && this.inDocument_ && a.getParent() == this ? (c = this.getContentElement(), b = c.childNodes[b] || null, b != a.getElement() && c.insertBefore(a.getElement(), b)) : c ? (this.element_ || this.createDom(), b = this.getChildAt(b + 1), a.render_(this.getContentElement(), b ? b.element_ : null)) : this.inDocument_ && !a.inDocument_ && a.element_ && a.element_.parentNode && a.element_.parentNode.nodeType == goog.dom.NodeType.ELEMENT && a.enterDocument()
+};
+goog.ui.Component.prototype.getContentElement = function () {
+	return this.element_
+};
+goog.ui.Component.prototype.isRightToLeft = function () {
+	null == this.rightToLeft_ && (this.rightToLeft_ = goog.style.isRightToLeft(this.inDocument_ ? this.element_ : this.dom_.getDocument().body));
+	return this.rightToLeft_
+};
+goog.ui.Component.prototype.setRightToLeft = function (a) {
+	if (this.inDocument_) throw Error(goog.ui.Component.Error.ALREADY_RENDERED);
+	this.rightToLeft_ = a
+};
+goog.ui.Component.prototype.hasChildren = function () {
+	return !!this.children_ && 0 != this.children_.length
+};
+goog.ui.Component.prototype.getChildCount = function () {
+	return this.children_ ? this.children_.length : 0
+};
+goog.ui.Component.prototype.getChildIds = function () {
+	var a = [];
+	this.forEachChild(function (b) {
+		a.push(b.getId())
+	});
+	return a
+};
+goog.ui.Component.prototype.getChild = function (a) {
+	return this.childIndex_ && a ? goog.object.get(this.childIndex_, a) || null : null
+};
+goog.ui.Component.prototype.getChildAt = function (a) {
+	return this.children_ ? this.children_[a] || null : null
+};
+goog.ui.Component.prototype.forEachChild = function (a, b) {
+	this.children_ && goog.array.forEach(this.children_, a, b)
+};
+goog.ui.Component.prototype.indexOfChild = function (a) {
+	return this.children_ && a ? goog.array.indexOf(this.children_, a) : -1
+};
+goog.ui.Component.prototype.removeChild = function (a, b) {
+	if (a) {
+		var c = goog.isString(a) ? a : a.getId();
+		a = this.getChild(c);
+		c && a && (goog.object.remove(this.childIndex_, c), goog.array.remove(this.children_, a), b && (a.exitDocument(), a.element_ && goog.dom.removeNode(a.element_)), a.setParent(null))
+	}
+	if (!a) throw Error(goog.ui.Component.Error.NOT_OUR_CHILD);
+	return a
+};
+goog.ui.Component.prototype.removeChildAt = function (a, b) {
+	return this.removeChild(this.getChildAt(a), b)
+};
+goog.ui.Component.prototype.removeChildren = function (a) {
+	for (var b = []; this.hasChildren() ;) b.push(this.removeChildAt(0, a));
+	return b
+};
+goog.a11y = {};
+goog.a11y.aria = {};
+goog.a11y.aria.Role = {
+	ALERT: "alert",
+	ALERTDIALOG: "alertdialog",
+	APPLICATION: "application",
+	ARTICLE: "article",
+	BANNER: "banner",
+	BUTTON: "button",
+	CHECKBOX: "checkbox",
+	COLUMNHEADER: "columnheader",
+	COMBOBOX: "combobox",
+	COMPLEMENTARY: "complementary",
+	CONTENTINFO: "contentinfo",
+	DEFINITION: "definition",
+	DIALOG: "dialog",
+	DIRECTORY: "directory",
+	DOCUMENT: "document",
+	FORM: "form",
+	GRID: "grid",
+	GRIDCELL: "gridcell",
+	GROUP: "group",
+	HEADING: "heading",
+	IMG: "img",
+	LINK: "link",
+	LIST: "list",
+	LISTBOX: "listbox",
+	LISTITEM: "listitem",
+	LOG: "log",
+	MAIN: "main",
+	MARQUEE: "marquee",
+	MATH: "math",
+	MENU: "menu",
+	MENUBAR: "menubar",
+	MENU_ITEM: "menuitem",
+	MENU_ITEM_CHECKBOX: "menuitemcheckbox",
+	MENU_ITEM_RADIO: "menuitemradio",
+	NAVIGATION: "navigation",
+	NOTE: "note",
+	OPTION: "option",
+	PRESENTATION: "presentation",
+	PROGRESSBAR: "progressbar",
+	RADIO: "radio",
+	RADIOGROUP: "radiogroup",
+	REGION: "region",
+	ROW: "row",
+	ROWGROUP: "rowgroup",
+	ROWHEADER: "rowheader",
+	SCROLLBAR: "scrollbar",
+	SEARCH: "search",
+	SEPARATOR: "separator",
+	SLIDER: "slider",
+	SPINBUTTON: "spinbutton",
+	STATUS: "status",
+	TAB: "tab",
+	TAB_LIST: "tablist",
+	TAB_PANEL: "tabpanel",
+	TEXTBOX: "textbox",
+	TEXTINFO: "textinfo",
+	TIMER: "timer",
+	TOOLBAR: "toolbar",
+	TOOLTIP: "tooltip",
+	TREE: "tree",
+	TREEGRID: "treegrid",
+	TREEITEM: "treeitem"
+};
+goog.a11y.aria.State = {
+	ACTIVEDESCENDANT: "activedescendant",
+	ATOMIC: "atomic",
+	AUTOCOMPLETE: "autocomplete",
+	BUSY: "busy",
+	CHECKED: "checked",
+	CONTROLS: "controls",
+	DESCRIBEDBY: "describedby",
+	DISABLED: "disabled",
+	DROPEFFECT: "dropeffect",
+	EXPANDED: "expanded",
+	FLOWTO: "flowto",
+	GRABBED: "grabbed",
+	HASPOPUP: "haspopup",
+	HIDDEN: "hidden",
+	INVALID: "invalid",
+	LABEL: "label",
+	LABELLEDBY: "labelledby",
+	LEVEL: "level",
+	LIVE: "live",
+	MULTILINE: "multiline",
+	MULTISELECTABLE: "multiselectable",
+	ORIENTATION: "orientation",
+	OWNS: "owns",
+	POSINSET: "posinset",
+	PRESSED: "pressed",
+	READONLY: "readonly",
+	RELEVANT: "relevant",
+	REQUIRED: "required",
+	SELECTED: "selected",
+	SETSIZE: "setsize",
+	SORT: "sort",
+	VALUEMAX: "valuemax",
+	VALUEMIN: "valuemin",
+	VALUENOW: "valuenow",
+	VALUETEXT: "valuetext"
+};
+goog.a11y.aria.AutoCompleteValues = {
+	INLINE: "inline",
+	LIST: "list",
+	BOTH: "both",
+	NONE: "none"
+};
+goog.a11y.aria.DropEffectValues = {
+	COPY: "copy",
+	MOVE: "move",
+	LINK: "link",
+	EXECUTE: "execute",
+	POPUP: "popup",
+	NONE: "none"
+};
+goog.a11y.aria.LivePriority = {
+	OFF: "off",
+	POLITE: "polite",
+	ASSERTIVE: "assertive"
+};
+goog.a11y.aria.OrientationValues = {
+	VERTICAL: "vertical",
+	HORIZONTAL: "horizontal"
+};
+goog.a11y.aria.RelevantValues = {
+	ADDITIONS: "additions",
+	REMOVALS: "removals",
+	TEXT: "text",
+	ALL: "all"
+};
+goog.a11y.aria.SortValues = {
+	ASCENDING: "ascending",
+	DESCENDING: "descending",
+	NONE: "none",
+	OTHER: "other"
+};
+goog.a11y.aria.CheckedValues = {
+	TRUE: "true",
+	FALSE: "false",
+	MIXED: "mixed",
+	UNDEFINED: "undefined"
+};
+goog.a11y.aria.ExpandedValues = {
+	TRUE: "true",
+	FALSE: "false",
+	UNDEFINED: "undefined"
+};
+goog.a11y.aria.GrabbedValues = {
+	TRUE: "true",
+	FALSE: "false",
+	UNDEFINED: "undefined"
+};
+goog.a11y.aria.InvalidValues = {
+	FALSE: "false",
+	TRUE: "true",
+	GRAMMAR: "grammar",
+	SPELLING: "spelling"
+};
+goog.a11y.aria.PressedValues = {
+	TRUE: "true",
+	FALSE: "false",
+	MIXED: "mixed",
+	UNDEFINED: "undefined"
+};
+goog.a11y.aria.SelectedValues = {
+	TRUE: "true",
+	FALSE: "false",
+	UNDEFINED: "undefined"
+};
+goog.a11y.aria.datatables = {};
+goog.a11y.aria.datatables.getDefaultValuesMap = function () {
+	goog.a11y.aria.DefaultStateValueMap_ || (goog.a11y.aria.DefaultStateValueMap_ = goog.object.create(goog.a11y.aria.State.ATOMIC, !1, goog.a11y.aria.State.AUTOCOMPLETE, "none", goog.a11y.aria.State.DROPEFFECT, "none", goog.a11y.aria.State.HASPOPUP, !1, goog.a11y.aria.State.LIVE, "off", goog.a11y.aria.State.MULTILINE, !1, goog.a11y.aria.State.MULTISELECTABLE, !1, goog.a11y.aria.State.ORIENTATION, "vertical", goog.a11y.aria.State.READONLY, !1, goog.a11y.aria.State.RELEVANT,
+		"additions text", goog.a11y.aria.State.REQUIRED, !1, goog.a11y.aria.State.SORT, "none", goog.a11y.aria.State.BUSY, !1, goog.a11y.aria.State.DISABLED, !1, goog.a11y.aria.State.HIDDEN, !1, goog.a11y.aria.State.INVALID, "false"));
+	return goog.a11y.aria.DefaultStateValueMap_
+};
+goog.a11y.aria.ARIA_PREFIX_ = "aria-";
+goog.a11y.aria.ROLE_ATTRIBUTE_ = "role";
+goog.a11y.aria.TAGS_WITH_ASSUMED_ROLES_ = goog.object.createSet("A AREA BUTTON HEAD INPUT LINK MENU META OPTGROUP OPTION PROGRESS STYLE SELECT SOURCE TEXTAREA TITLE TRACK".split(" "));
+goog.a11y.aria.CONTAINER_ROLES_ = [goog.a11y.aria.Role.COMBOBOX, goog.a11y.aria.Role.GRID, goog.a11y.aria.Role.GROUP, goog.a11y.aria.Role.LISTBOX, goog.a11y.aria.Role.MENU, goog.a11y.aria.Role.MENUBAR, goog.a11y.aria.Role.RADIOGROUP, goog.a11y.aria.Role.ROW, goog.a11y.aria.Role.ROWGROUP, goog.a11y.aria.Role.TAB_LIST, goog.a11y.aria.Role.TEXTBOX, goog.a11y.aria.Role.TOOLBAR, goog.a11y.aria.Role.TREE, goog.a11y.aria.Role.TREEGRID];
+goog.a11y.aria.setRole = function (a, b) {
+	b ? (goog.asserts.ENABLE_ASSERTS && goog.asserts.assert(goog.object.containsValue(goog.a11y.aria.Role, b), "No such ARIA role " + b), a.setAttribute(goog.a11y.aria.ROLE_ATTRIBUTE_, b)) : goog.a11y.aria.removeRole(a)
+};
+goog.a11y.aria.getRole = function (a) {
+	return a.getAttribute(goog.a11y.aria.ROLE_ATTRIBUTE_) || null
+};
+goog.a11y.aria.removeRole = function (a) {
+	a.removeAttribute(goog.a11y.aria.ROLE_ATTRIBUTE_)
+};
+goog.a11y.aria.setState = function (a, b, c) {
+	goog.isArray(c) && (c = c.join(" "));
+	var d = goog.a11y.aria.getAriaAttributeName_(b);
+	"" === c || void 0 == c ? (c = goog.a11y.aria.datatables.getDefaultValuesMap(), b in c ? a.setAttribute(d, c[b]) : a.removeAttribute(d)) : a.setAttribute(d, c)
+};
+goog.a11y.aria.toggleState = function (a, b) {
+	var c = goog.a11y.aria.getState(a, b);
+	goog.string.isEmptyOrWhitespace(goog.string.makeSafe(c)) || "true" == c || "false" == c ? goog.a11y.aria.setState(a, b, "true" == c ? "false" : "true") : goog.a11y.aria.removeState(a, b)
+};
+goog.a11y.aria.removeState = function (a, b) {
+	a.removeAttribute(goog.a11y.aria.getAriaAttributeName_(b))
+};
+goog.a11y.aria.getState = function (a, b) {
+	var c = a.getAttribute(goog.a11y.aria.getAriaAttributeName_(b));
+	return null == c || void 0 == c ? "" : String(c)
+};
+goog.a11y.aria.getActiveDescendant = function (a) {
+	var b = goog.a11y.aria.getState(a, goog.a11y.aria.State.ACTIVEDESCENDANT);
+	return goog.dom.getOwnerDocument(a).getElementById(b)
+};
+goog.a11y.aria.setActiveDescendant = function (a, b) {
+	var c = "";
+	b && (c = b.id, goog.asserts.assert(c, "The active element should have an id."));
+	goog.a11y.aria.setState(a, goog.a11y.aria.State.ACTIVEDESCENDANT, c)
+};
+goog.a11y.aria.getLabel = function (a) {
+	return goog.a11y.aria.getState(a, goog.a11y.aria.State.LABEL)
+};
+goog.a11y.aria.setLabel = function (a, b) {
+	goog.a11y.aria.setState(a, goog.a11y.aria.State.LABEL, b)
+};
+goog.a11y.aria.assertRoleIsSetInternalUtil = function (a, b) {
+	if (!goog.a11y.aria.TAGS_WITH_ASSUMED_ROLES_[a.tagName]) {
+		var c = goog.a11y.aria.getRole(a);
+		goog.asserts.assert(null != c, "The element ARIA role cannot be null.");
+		goog.asserts.assert(goog.array.contains(b, c), 'Non existing or incorrect role set for element.The role set is "' + c + '". The role should be any of "' + b + '". Check the ARIA specification for more details http://www.w3.org/TR/wai-aria/roles.')
+	}
+};
+goog.a11y.aria.getStateBoolean = function (a, b) {
+	var c = a.getAttribute(goog.a11y.aria.getAriaAttributeName_(b));
+	goog.asserts.assert(goog.isBoolean(c) || null == c || "true" == c || "false" == c);
+	return null == c ? c : goog.isBoolean(c) ? c : "true" == c
+};
+goog.a11y.aria.getStateNumber = function (a, b) {
+	var c = a.getAttribute(goog.a11y.aria.getAriaAttributeName_(b));
+	goog.asserts.assert((null == c || !isNaN(Number(c))) && !goog.isBoolean(c));
+	return null == c ? null : Number(c)
+};
+goog.a11y.aria.getStateString = function (a, b) {
+	var c = a.getAttribute(goog.a11y.aria.getAriaAttributeName_(b));
+	goog.asserts.assert((null == c || goog.isString(c)) && ("" == c || isNaN(Number(c))) && "true" != c && "false" != c);
+	return null == c || "" == c ? null : c
+};
+goog.a11y.aria.getStringArrayStateInternalUtil = function (a, b) {
+	var c = a.getAttribute(goog.a11y.aria.getAriaAttributeName_(b));
+	return goog.a11y.aria.splitStringOnWhitespace_(c)
+};
+goog.a11y.aria.hasState = function (a, b) {
+	return a.hasAttribute(goog.a11y.aria.getAriaAttributeName_(b))
+};
+goog.a11y.aria.isContainerRole = function (a) {
+	a = goog.a11y.aria.getRole(a);
+	return goog.array.contains(goog.a11y.aria.CONTAINER_ROLES_, a)
+};
+goog.a11y.aria.splitStringOnWhitespace_ = function (a) {
+	return a ? a.split(/\s+/) : []
+};
+goog.a11y.aria.getAriaAttributeName_ = function (a) {
+	goog.asserts.ENABLE_ASSERTS && (goog.asserts.assert(a, "ARIA attribute cannot be empty."), goog.asserts.assert(goog.object.containsValue(goog.a11y.aria.State, a), "No such ARIA attribute " + a));
+	return goog.a11y.aria.ARIA_PREFIX_ + a
+};
+goog.events.KeyCodes = {
+	WIN_KEY_FF_LINUX: 0,
+	MAC_ENTER: 3,
+	BACKSPACE: 8,
+	TAB: 9,
+	NUM_CENTER: 12,
+	ENTER: 13,
+	SHIFT: 16,
+	CTRL: 17,
+	ALT: 18,
+	PAUSE: 19,
+	CAPS_LOCK: 20,
+	ESC: 27,
+	SPACE: 32,
+	PAGE_UP: 33,
+	PAGE_DOWN: 34,
+	END: 35,
+	HOME: 36,
+	LEFT: 37,
+	UP: 38,
+	RIGHT: 39,
+	DOWN: 40,
+	PLUS_SIGN: 43,
+	PRINT_SCREEN: 44,
+	INSERT: 45,
+	DELETE: 46,
+	ZERO: 48,
+	ONE: 49,
+	TWO: 50,
+	THREE: 51,
+	FOUR: 52,
+	FIVE: 53,
+	SIX: 54,
+	SEVEN: 55,
+	EIGHT: 56,
+	NINE: 57,
+	FF_SEMICOLON: 59,
+	FF_EQUALS: 61,
+	FF_DASH: 173,
+	QUESTION_MARK: 63,
+	AT_SIGN: 64,
+	A: 65,
+	B: 66,
+	C: 67,
+	D: 68,
+	E: 69,
+	F: 70,
+	G: 71,
+	H: 72,
+	I: 73,
+	J: 74,
+	K: 75,
+	L: 76,
+	M: 77,
+	N: 78,
+	O: 79,
+	P: 80,
+	Q: 81,
+	R: 82,
+	S: 83,
+	T: 84,
+	U: 85,
+	V: 86,
+	W: 87,
+	X: 88,
+	Y: 89,
+	Z: 90,
+	META: 91,
+	WIN_KEY_RIGHT: 92,
+	CONTEXT_MENU: 93,
+	NUM_ZERO: 96,
+	NUM_ONE: 97,
+	NUM_TWO: 98,
+	NUM_THREE: 99,
+	NUM_FOUR: 100,
+	NUM_FIVE: 101,
+	NUM_SIX: 102,
+	NUM_SEVEN: 103,
+	NUM_EIGHT: 104,
+	NUM_NINE: 105,
+	NUM_MULTIPLY: 106,
+	NUM_PLUS: 107,
+	NUM_MINUS: 109,
+	NUM_PERIOD: 110,
+	NUM_DIVISION: 111,
+	F1: 112,
+	F2: 113,
+	F3: 114,
+	F4: 115,
+	F5: 116,
+	F6: 117,
+	F7: 118,
+	F8: 119,
+	F9: 120,
+	F10: 121,
+	F11: 122,
+	F12: 123,
+	NUMLOCK: 144,
+	SCROLL_LOCK: 145,
+	FIRST_MEDIA_KEY: 166,
+	LAST_MEDIA_KEY: 183,
+	SEMICOLON: 186,
+	DASH: 189,
+	EQUALS: 187,
+	COMMA: 188,
+	PERIOD: 190,
+	SLASH: 191,
+	APOSTROPHE: 192,
+	TILDE: 192,
+	SINGLE_QUOTE: 222,
+	OPEN_SQUARE_BRACKET: 219,
+	BACKSLASH: 220,
+	CLOSE_SQUARE_BRACKET: 221,
+	WIN_KEY: 224,
+	MAC_FF_META: 224,
+	MAC_WK_CMD_LEFT: 91,
+	MAC_WK_CMD_RIGHT: 93,
+	WIN_IME: 229,
+	VK_NONAME: 252,
+	PHANTOM: 255
+};
+goog.events.KeyCodes.isTextModifyingKeyEvent = function (a) {
+	if (a.altKey && !a.ctrlKey || a.metaKey || a.keyCode >= goog.events.KeyCodes.F1 && a.keyCode <= goog.events.KeyCodes.F12) return !1;
+	switch (a.keyCode) {
+		case goog.events.KeyCodes.ALT:
+		case goog.events.KeyCodes.CAPS_LOCK:
+		case goog.events.KeyCodes.CONTEXT_MENU:
+		case goog.events.KeyCodes.CTRL:
+		case goog.events.KeyCodes.DOWN:
+		case goog.events.KeyCodes.END:
+		case goog.events.KeyCodes.ESC:
+		case goog.events.KeyCodes.HOME:
+		case goog.events.KeyCodes.INSERT:
+		case goog.events.KeyCodes.LEFT:
+		case goog.events.KeyCodes.MAC_FF_META:
+		case goog.events.KeyCodes.META:
+		case goog.events.KeyCodes.NUMLOCK:
+		case goog.events.KeyCodes.NUM_CENTER:
+		case goog.events.KeyCodes.PAGE_DOWN:
+		case goog.events.KeyCodes.PAGE_UP:
+		case goog.events.KeyCodes.PAUSE:
+		case goog.events.KeyCodes.PHANTOM:
+		case goog.events.KeyCodes.PRINT_SCREEN:
+		case goog.events.KeyCodes.RIGHT:
+		case goog.events.KeyCodes.SCROLL_LOCK:
+		case goog.events.KeyCodes.SHIFT:
+		case goog.events.KeyCodes.UP:
+		case goog.events.KeyCodes.VK_NONAME:
+		case goog.events.KeyCodes.WIN_KEY:
+		case goog.events.KeyCodes.WIN_KEY_RIGHT:
+			return !1;
+		case goog.events.KeyCodes.WIN_KEY_FF_LINUX:
+			return !goog.userAgent.GECKO;
+		default:
+			return a.keyCode < goog.events.KeyCodes.FIRST_MEDIA_KEY || a.keyCode > goog.events.KeyCodes.LAST_MEDIA_KEY
+	}
+};
+goog.events.KeyCodes.firesKeyPressEvent = function (a, b, c, d, e, f) {
+	if (!(goog.userAgent.IE || goog.userAgent.EDGE || goog.userAgent.WEBKIT && goog.userAgent.isVersionOrHigher("525"))) return !0;
+	if (goog.userAgent.MAC && e) return goog.events.KeyCodes.isCharacterKey(a);
+	if (e && !d) return !1;
+	goog.isNumber(b) && (b = goog.events.KeyCodes.normalizeKeyCode(b));
+	e = b == goog.events.KeyCodes.CTRL || b == goog.events.KeyCodes.ALT || goog.userAgent.MAC && b == goog.events.KeyCodes.META;
+	f = b == goog.events.KeyCodes.SHIFT && (d || f);
+	if ((!c || goog.userAgent.MAC) &&
+		e || goog.userAgent.MAC && f) return !1;
+	if ((goog.userAgent.WEBKIT || goog.userAgent.EDGE) && d && c) switch (a) {
+		case goog.events.KeyCodes.BACKSLASH:
+		case goog.events.KeyCodes.OPEN_SQUARE_BRACKET:
+		case goog.events.KeyCodes.CLOSE_SQUARE_BRACKET:
+		case goog.events.KeyCodes.TILDE:
+		case goog.events.KeyCodes.SEMICOLON:
+		case goog.events.KeyCodes.DASH:
+		case goog.events.KeyCodes.EQUALS:
+		case goog.events.KeyCodes.COMMA:
+		case goog.events.KeyCodes.PERIOD:
+		case goog.events.KeyCodes.SLASH:
+		case goog.events.KeyCodes.APOSTROPHE:
+		case goog.events.KeyCodes.SINGLE_QUOTE:
+			return !1
+	}
+	if (goog.userAgent.IE &&
+		d && b == a) return !1;
+	switch (a) {
+		case goog.events.KeyCodes.ENTER:
+			return !0;
+		case goog.events.KeyCodes.ESC:
+			return !(goog.userAgent.WEBKIT || goog.userAgent.EDGE)
+	}
+	return goog.events.KeyCodes.isCharacterKey(a)
+};
+goog.events.KeyCodes.isCharacterKey = function (a) {
+	if (a >= goog.events.KeyCodes.ZERO && a <= goog.events.KeyCodes.NINE || a >= goog.events.KeyCodes.NUM_ZERO && a <= goog.events.KeyCodes.NUM_MULTIPLY || a >= goog.events.KeyCodes.A && a <= goog.events.KeyCodes.Z || (goog.userAgent.WEBKIT || goog.userAgent.EDGE) && 0 == a) return !0;
+	switch (a) {
+		case goog.events.KeyCodes.SPACE:
+		case goog.events.KeyCodes.PLUS_SIGN:
+		case goog.events.KeyCodes.QUESTION_MARK:
+		case goog.events.KeyCodes.AT_SIGN:
+		case goog.events.KeyCodes.NUM_PLUS:
+		case goog.events.KeyCodes.NUM_MINUS:
+		case goog.events.KeyCodes.NUM_PERIOD:
+		case goog.events.KeyCodes.NUM_DIVISION:
+		case goog.events.KeyCodes.SEMICOLON:
+		case goog.events.KeyCodes.FF_SEMICOLON:
+		case goog.events.KeyCodes.DASH:
+		case goog.events.KeyCodes.EQUALS:
+		case goog.events.KeyCodes.FF_EQUALS:
+		case goog.events.KeyCodes.COMMA:
+		case goog.events.KeyCodes.PERIOD:
+		case goog.events.KeyCodes.SLASH:
+		case goog.events.KeyCodes.APOSTROPHE:
+		case goog.events.KeyCodes.SINGLE_QUOTE:
+		case goog.events.KeyCodes.OPEN_SQUARE_BRACKET:
+		case goog.events.KeyCodes.BACKSLASH:
+		case goog.events.KeyCodes.CLOSE_SQUARE_BRACKET:
+			return !0;
+		default:
+			return !1
+	}
+};
+goog.events.KeyCodes.normalizeKeyCode = function (a) {
+	return goog.userAgent.GECKO ? goog.events.KeyCodes.normalizeGeckoKeyCode(a) : goog.userAgent.MAC && goog.userAgent.WEBKIT ? goog.events.KeyCodes.normalizeMacWebKitKeyCode(a) : a
+};
+goog.events.KeyCodes.normalizeGeckoKeyCode = function (a) {
+	switch (a) {
+		case goog.events.KeyCodes.FF_EQUALS:
+			return goog.events.KeyCodes.EQUALS;
+		case goog.events.KeyCodes.FF_SEMICOLON:
+			return goog.events.KeyCodes.SEMICOLON;
+		case goog.events.KeyCodes.FF_DASH:
+			return goog.events.KeyCodes.DASH;
+		case goog.events.KeyCodes.MAC_FF_META:
+			return goog.events.KeyCodes.META;
+		case goog.events.KeyCodes.WIN_KEY_FF_LINUX:
+			return goog.events.KeyCodes.WIN_KEY;
+		default:
+			return a
+	}
+};
+goog.events.KeyCodes.normalizeMacWebKitKeyCode = function (a) {
+	switch (a) {
+		case goog.events.KeyCodes.MAC_WK_CMD_RIGHT:
+			return goog.events.KeyCodes.META;
+		default:
+			return a
+	}
+};
+goog.events.KeyHandler = function (a, b) {
+	goog.events.EventTarget.call(this);
+	a && this.attach(a, b)
+};
+goog.inherits(goog.events.KeyHandler, goog.events.EventTarget);
+goog.events.KeyHandler.prototype.element_ = null;
+goog.events.KeyHandler.prototype.keyPressKey_ = null;
+goog.events.KeyHandler.prototype.keyDownKey_ = null;
+goog.events.KeyHandler.prototype.keyUpKey_ = null;
+goog.events.KeyHandler.prototype.lastKey_ = -1;
+goog.events.KeyHandler.prototype.keyCode_ = -1;
+goog.events.KeyHandler.prototype.altKey_ = !1;
+goog.events.KeyHandler.EventType = {
+	KEY: "key"
+};
+goog.events.KeyHandler.safariKey_ = {
+	3: goog.events.KeyCodes.ENTER,
+	12: goog.events.KeyCodes.NUMLOCK,
+	63232: goog.events.KeyCodes.UP,
+	63233: goog.events.KeyCodes.DOWN,
+	63234: goog.events.KeyCodes.LEFT,
+	63235: goog.events.KeyCodes.RIGHT,
+	63236: goog.events.KeyCodes.F1,
+	63237: goog.events.KeyCodes.F2,
+	63238: goog.events.KeyCodes.F3,
+	63239: goog.events.KeyCodes.F4,
+	63240: goog.events.KeyCodes.F5,
+	63241: goog.events.KeyCodes.F6,
+	63242: goog.events.KeyCodes.F7,
+	63243: goog.events.KeyCodes.F8,
+	63244: goog.events.KeyCodes.F9,
+	63245: goog.events.KeyCodes.F10,
+	63246: goog.events.KeyCodes.F11,
+	63247: goog.events.KeyCodes.F12,
+	63248: goog.events.KeyCodes.PRINT_SCREEN,
+	63272: goog.events.KeyCodes.DELETE,
+	63273: goog.events.KeyCodes.HOME,
+	63275: goog.events.KeyCodes.END,
+	63276: goog.events.KeyCodes.PAGE_UP,
+	63277: goog.events.KeyCodes.PAGE_DOWN,
+	63289: goog.events.KeyCodes.NUMLOCK,
+	63302: goog.events.KeyCodes.INSERT
+};
+goog.events.KeyHandler.keyIdentifier_ = {
+	Up: goog.events.KeyCodes.UP,
+	Down: goog.events.KeyCodes.DOWN,
+	Left: goog.events.KeyCodes.LEFT,
+	Right: goog.events.KeyCodes.RIGHT,
+	Enter: goog.events.KeyCodes.ENTER,
+	F1: goog.events.KeyCodes.F1,
+	F2: goog.events.KeyCodes.F2,
+	F3: goog.events.KeyCodes.F3,
+	F4: goog.events.KeyCodes.F4,
+	F5: goog.events.KeyCodes.F5,
+	F6: goog.events.KeyCodes.F6,
+	F7: goog.events.KeyCodes.F7,
+	F8: goog.events.KeyCodes.F8,
+	F9: goog.events.KeyCodes.F9,
+	F10: goog.events.KeyCodes.F10,
+	F11: goog.events.KeyCodes.F11,
+	F12: goog.events.KeyCodes.F12,
+	"U+007F": goog.events.KeyCodes.DELETE,
+	Home: goog.events.KeyCodes.HOME,
+	End: goog.events.KeyCodes.END,
+	PageUp: goog.events.KeyCodes.PAGE_UP,
+	PageDown: goog.events.KeyCodes.PAGE_DOWN,
+	Insert: goog.events.KeyCodes.INSERT
+};
+goog.events.KeyHandler.USES_KEYDOWN_ = goog.userAgent.IE || goog.userAgent.EDGE || goog.userAgent.WEBKIT && goog.userAgent.isVersionOrHigher("525");
+goog.events.KeyHandler.SAVE_ALT_FOR_KEYPRESS_ = goog.userAgent.MAC && goog.userAgent.GECKO;
+goog.events.KeyHandler.prototype.handleKeyDown_ = function (a) {
+	(goog.userAgent.WEBKIT || goog.userAgent.EDGE) && (this.lastKey_ == goog.events.KeyCodes.CTRL && !a.ctrlKey || this.lastKey_ == goog.events.KeyCodes.ALT && !a.altKey || goog.userAgent.MAC && this.lastKey_ == goog.events.KeyCodes.META && !a.metaKey) && this.resetState(); -1 == this.lastKey_ && (a.ctrlKey && a.keyCode != goog.events.KeyCodes.CTRL ? this.lastKey_ = goog.events.KeyCodes.CTRL : a.altKey && a.keyCode != goog.events.KeyCodes.ALT ? this.lastKey_ = goog.events.KeyCodes.ALT : a.metaKey &&
+		a.keyCode != goog.events.KeyCodes.META && (this.lastKey_ = goog.events.KeyCodes.META));
+	goog.events.KeyHandler.USES_KEYDOWN_ && !goog.events.KeyCodes.firesKeyPressEvent(a.keyCode, this.lastKey_, a.shiftKey, a.ctrlKey, a.altKey, a.metaKey) ? this.handleEvent(a) : (this.keyCode_ = goog.events.KeyCodes.normalizeKeyCode(a.keyCode), goog.events.KeyHandler.SAVE_ALT_FOR_KEYPRESS_ && (this.altKey_ = a.altKey))
+};
+goog.events.KeyHandler.prototype.resetState = function () {
+	this.keyCode_ = this.lastKey_ = -1
+};
+goog.events.KeyHandler.prototype.handleKeyup_ = function (a) {
+	this.resetState();
+	this.altKey_ = a.altKey
+};
+goog.events.KeyHandler.prototype.handleEvent = function (a) {
+	var b = a.getBrowserEvent(),
+		c, d, e = b.altKey;
+	goog.userAgent.IE && a.type == goog.events.EventType.KEYPRESS ? (c = this.keyCode_, d = c != goog.events.KeyCodes.ENTER && c != goog.events.KeyCodes.ESC ? b.keyCode : 0) : (goog.userAgent.WEBKIT || goog.userAgent.EDGE) && a.type == goog.events.EventType.KEYPRESS ? (c = this.keyCode_, d = 0 <= b.charCode && 63232 > b.charCode && goog.events.KeyCodes.isCharacterKey(c) ? b.charCode : 0) : goog.userAgent.OPERA && !goog.userAgent.WEBKIT ? (c = this.keyCode_, d =
+		goog.events.KeyCodes.isCharacterKey(c) ? b.keyCode : 0) : (c = b.keyCode || this.keyCode_, d = b.charCode || 0, goog.events.KeyHandler.SAVE_ALT_FOR_KEYPRESS_ && (e = this.altKey_), goog.userAgent.MAC && d == goog.events.KeyCodes.QUESTION_MARK && c == goog.events.KeyCodes.WIN_KEY && (c = goog.events.KeyCodes.SLASH));
+	var f = c = goog.events.KeyCodes.normalizeKeyCode(c);
+	c ? 63232 <= c && c in goog.events.KeyHandler.safariKey_ ? f = goog.events.KeyHandler.safariKey_[c] : 25 == c && a.shiftKey && (f = 9) : b.keyIdentifier && b.keyIdentifier in goog.events.KeyHandler.keyIdentifier_ &&
+		(f = goog.events.KeyHandler.keyIdentifier_[b.keyIdentifier]);
+	a = f == this.lastKey_;
+	this.lastKey_ = f;
+	b = new goog.events.KeyEvent(f, d, a, b);
+	b.altKey = e;
+	this.dispatchEvent(b)
+};
+goog.events.KeyHandler.prototype.getElement = function () {
+	return this.element_
+};
+goog.events.KeyHandler.prototype.attach = function (a, b) {
+	this.keyUpKey_ && this.detach();
+	this.element_ = a;
+	this.keyPressKey_ = goog.events.listen(this.element_, goog.events.EventType.KEYPRESS, this, b);
+	this.keyDownKey_ = goog.events.listen(this.element_, goog.events.EventType.KEYDOWN, this.handleKeyDown_, b, this);
+	this.keyUpKey_ = goog.events.listen(this.element_, goog.events.EventType.KEYUP, this.handleKeyup_, b, this)
+};
+goog.events.KeyHandler.prototype.detach = function () {
+	this.keyPressKey_ && (goog.events.unlistenByKey(this.keyPressKey_), goog.events.unlistenByKey(this.keyDownKey_), goog.events.unlistenByKey(this.keyUpKey_), this.keyUpKey_ = this.keyDownKey_ = this.keyPressKey_ = null);
+	this.element_ = null;
+	this.keyCode_ = this.lastKey_ = -1
+};
+goog.events.KeyHandler.prototype.disposeInternal = function () {
+	goog.events.KeyHandler.superClass_.disposeInternal.call(this);
+	this.detach()
+};
+goog.events.KeyEvent = function (a, b, c, d) {
+	goog.events.BrowserEvent.call(this, d);
+	this.type = goog.events.KeyHandler.EventType.KEY;
+	this.keyCode = a;
+	this.charCode = b;
+	this.repeat = c
+};
+goog.inherits(goog.events.KeyEvent, goog.events.BrowserEvent);
+goog.dom.classlist = {};
+goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST = !1;
+goog.dom.classlist.get = function (a) {
+	if (goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST || a.classList) return a.classList;
+	a = a.className;
+	return goog.isString(a) && a.match(/\S+/g) || []
+};
+goog.dom.classlist.set = function (a, b) {
+	a.className = b
+};
+goog.dom.classlist.contains = function (a, b) {
+	return goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST || a.classList ? a.classList.contains(b) : goog.array.contains(goog.dom.classlist.get(a), b)
+};
+goog.dom.classlist.add = function (a, b) {
+	goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST || a.classList ? a.classList.add(b) : goog.dom.classlist.contains(a, b) || (a.className += 0 < a.className.length ? " " + b : b)
+};
+goog.dom.classlist.addAll = function (a, b) {
+	if (goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST || a.classList) goog.array.forEach(b, function (b) {
+		goog.dom.classlist.add(a, b)
+	});
+	else {
+		var c = {};
+		goog.array.forEach(goog.dom.classlist.get(a), function (a) {
+			c[a] = !0
+		});
+		goog.array.forEach(b, function (a) {
+			c[a] = !0
+		});
+		a.className = "";
+		for (var d in c) a.className += 0 < a.className.length ? " " + d : d
+	}
+};
+goog.dom.classlist.remove = function (a, b) {
+	goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST || a.classList ? a.classList.remove(b) : goog.dom.classlist.contains(a, b) && (a.className = goog.array.filter(goog.dom.classlist.get(a), function (a) {
+		return a != b
+	}).join(" "))
+};
+goog.dom.classlist.removeAll = function (a, b) {
+	goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST || a.classList ? goog.array.forEach(b, function (b) {
+		goog.dom.classlist.remove(a, b)
+	}) : a.className = goog.array.filter(goog.dom.classlist.get(a), function (a) {
+		return !goog.array.contains(b, a)
+	}).join(" ")
+};
+goog.dom.classlist.enable = function (a, b, c) {
+	c ? goog.dom.classlist.add(a, b) : goog.dom.classlist.remove(a, b)
+};
+goog.dom.classlist.enableAll = function (a, b, c) {
+	(c ? goog.dom.classlist.addAll : goog.dom.classlist.removeAll)(a, b)
+};
+goog.dom.classlist.swap = function (a, b, c) {
+	return goog.dom.classlist.contains(a, b) ? (goog.dom.classlist.remove(a, b), goog.dom.classlist.add(a, c), !0) : !1
+};
+goog.dom.classlist.toggle = function (a, b) {
+	var c = !goog.dom.classlist.contains(a, b);
+	goog.dom.classlist.enable(a, b, c);
+	return c
+};
+goog.dom.classlist.addRemove = function (a, b, c) {
+	goog.dom.classlist.remove(a, b);
+	goog.dom.classlist.add(a, c)
+};
+goog.ui.registry = {};
+goog.ui.registry.getDefaultRenderer = function (a) {
+	for (var b; a;) {
+		b = goog.getUid(a);
+		if (b = goog.ui.registry.defaultRenderers_[b]) break;
+		a = a.superClass_ ? a.superClass_.constructor : null
+	}
+	return b ? goog.isFunction(b.getInstance) ? b.getInstance() : new b : null
+};
+goog.ui.registry.setDefaultRenderer = function (a, b) {
+	if (!goog.isFunction(a)) throw Error("Invalid component class " + a);
+	if (!goog.isFunction(b)) throw Error("Invalid renderer class " + b);
+	var c = goog.getUid(a);
+	goog.ui.registry.defaultRenderers_[c] = b
+};
+goog.ui.registry.getDecoratorByClassName = function (a) {
+	return a in goog.ui.registry.decoratorFunctions_ ? goog.ui.registry.decoratorFunctions_[a]() : null
+};
+goog.ui.registry.setDecoratorByClassName = function (a, b) {
+	if (!a) throw Error("Invalid class name " + a);
+	if (!goog.isFunction(b)) throw Error("Invalid decorator function " + b);
+	goog.ui.registry.decoratorFunctions_[a] = b
+};
+goog.ui.registry.getDecorator = function (a) {
+	goog.asserts.assert(a);
+	for (var b = goog.dom.classlist.get(a), c = 0, d = b.length; c < d; c++)
+		if (a = goog.ui.registry.getDecoratorByClassName(b[c])) return a;
+	return null
+};
+goog.ui.registry.reset = function () {
+	goog.ui.registry.defaultRenderers_ = {};
+	goog.ui.registry.decoratorFunctions_ = {}
+};
+goog.ui.registry.defaultRenderers_ = {};
+goog.ui.registry.decoratorFunctions_ = {};
+goog.ui.ContainerRenderer = function (a) {
+	this.ariaRole_ = a
+};
+goog.addSingletonGetter(goog.ui.ContainerRenderer);
+goog.ui.ContainerRenderer.getCustomRenderer = function (a, b) {
+	var c = new a;
+	c.getCssClass = function () {
+		return b
+	};
+	return c
+};
+goog.ui.ContainerRenderer.CSS_CLASS = "goog-container";
+goog.ui.ContainerRenderer.prototype.getAriaRole = function () {
+	return this.ariaRole_
+};
+goog.ui.ContainerRenderer.prototype.enableTabIndex = function (a, b) {
+	a && (a.tabIndex = b ? 0 : -1)
+};
+goog.ui.ContainerRenderer.prototype.createDom = function (a) {
+	return a.getDomHelper().createDom("DIV", this.getClassNames(a).join(" "))
+};
+goog.ui.ContainerRenderer.prototype.getContentElement = function (a) {
+	return a
+};
+goog.ui.ContainerRenderer.prototype.canDecorate = function (a) {
+	return "DIV" == a.tagName
+};
+goog.ui.ContainerRenderer.prototype.decorate = function (a, b) {
+	b.id && a.setId(b.id);
+	var c = this.getCssClass(),
+		d = !1,
+		e = goog.dom.classlist.get(b);
+	e && goog.array.forEach(e, function (b) {
+		b == c ? d = !0 : b && this.setStateFromClassName(a, b, c)
+	}, this);
+	d || goog.dom.classlist.add(b, c);
+	this.decorateChildren(a, this.getContentElement(b));
+	return b
+};
+goog.ui.ContainerRenderer.prototype.setStateFromClassName = function (a, b, c) {
+	b == c + "-disabled" ? a.setEnabled(!1) : b == c + "-horizontal" ? a.setOrientation(goog.ui.Container.Orientation.HORIZONTAL) : b == c + "-vertical" && a.setOrientation(goog.ui.Container.Orientation.VERTICAL)
+};
+goog.ui.ContainerRenderer.prototype.decorateChildren = function (a, b, c) {
+	if (b) {
+		c = c || b.firstChild;
+		for (var d; c && c.parentNode == b;) {
+			d = c.nextSibling;
+			if (c.nodeType == goog.dom.NodeType.ELEMENT) {
+				var e = this.getDecoratorForChild(c);
+				e && (e.setElementInternal(c), a.isEnabled() || e.setEnabled(!1), a.addChild(e), e.decorate(c))
+			} else c.nodeValue && "" != goog.string.trim(c.nodeValue) || b.removeChild(c);
+			c = d
+		}
+	}
+};
+goog.ui.ContainerRenderer.prototype.getDecoratorForChild = function (a) {
+	return goog.ui.registry.getDecorator(a)
+};
+goog.ui.ContainerRenderer.prototype.initializeDom = function (a) {
+	a = a.getElement();
+	goog.asserts.assert(a, "The container DOM element cannot be null.");
+	goog.style.setUnselectable(a, !0, goog.userAgent.GECKO);
+	goog.userAgent.IE && (a.hideFocus = !0);
+	var b = this.getAriaRole();
+	b && goog.a11y.aria.setRole(a, b)
+};
+goog.ui.ContainerRenderer.prototype.getKeyEventTarget = function (a) {
+	return a.getElement()
+};
+goog.ui.ContainerRenderer.prototype.getCssClass = function () {
+	return goog.ui.ContainerRenderer.CSS_CLASS
+};
+goog.ui.ContainerRenderer.prototype.getClassNames = function (a) {
+	var b = this.getCssClass(),
+		c = a.getOrientation() == goog.ui.Container.Orientation.HORIZONTAL,
+		c = [b, c ? b + "-horizontal" : b + "-vertical"];
+	a.isEnabled() || c.push(b + "-disabled");
+	return c
+};
+goog.ui.ContainerRenderer.prototype.getDefaultOrientation = function () {
+	return goog.ui.Container.Orientation.VERTICAL
+};
+goog.ui.ControlRenderer = function () { };
+goog.addSingletonGetter(goog.ui.ControlRenderer);
+goog.tagUnsealableClass(goog.ui.ControlRenderer);
+goog.ui.ControlRenderer.getCustomRenderer = function (a, b) {
+	var c = new a;
+	c.getCssClass = function () {
+		return b
+	};
+	return c
+};
+goog.ui.ControlRenderer.CSS_CLASS = "goog-control";
+goog.ui.ControlRenderer.IE6_CLASS_COMBINATIONS = [];
+goog.ui.ControlRenderer.TOGGLE_ARIA_STATE_MAP_ = goog.object.create(goog.a11y.aria.Role.BUTTON, goog.a11y.aria.State.PRESSED, goog.a11y.aria.Role.CHECKBOX, goog.a11y.aria.State.CHECKED, goog.a11y.aria.Role.MENU_ITEM, goog.a11y.aria.State.SELECTED, goog.a11y.aria.Role.MENU_ITEM_CHECKBOX, goog.a11y.aria.State.CHECKED, goog.a11y.aria.Role.MENU_ITEM_RADIO, goog.a11y.aria.State.CHECKED, goog.a11y.aria.Role.RADIO, goog.a11y.aria.State.CHECKED, goog.a11y.aria.Role.TAB, goog.a11y.aria.State.SELECTED, goog.a11y.aria.Role.TREEITEM,
+	goog.a11y.aria.State.SELECTED);
+goog.ui.ControlRenderer.prototype.getAriaRole = function () { };
+goog.ui.ControlRenderer.prototype.createDom = function (a) {
+	return a.getDomHelper().createDom("DIV", this.getClassNames(a).join(" "), a.getContent())
+};
+goog.ui.ControlRenderer.prototype.getContentElement = function (a) {
+	return a
+};
+goog.ui.ControlRenderer.prototype.enableClassName = function (a, b, c) {
+	if (a = a.getElement ? a.getElement() : a) {
+		var d = [b];
+		goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("7") && (d = this.getAppliedCombinedClassNames_(goog.dom.classlist.get(a), b), d.push(b));
+		goog.dom.classlist.enableAll(a, d, c)
+	}
+};
+goog.ui.ControlRenderer.prototype.enableExtraClassName = function (a, b, c) {
+	this.enableClassName(a, b, c)
+};
+goog.ui.ControlRenderer.prototype.canDecorate = function (a) {
+	return !0
+};
+goog.ui.ControlRenderer.prototype.decorate = function (a, b) {
+	b.id && a.setId(b.id);
+	var c = this.getContentElement(b);
+	c && c.firstChild ? a.setContentInternal(c.firstChild.nextSibling ? goog.array.clone(c.childNodes) : c.firstChild) : a.setContentInternal(null);
+	var d = 0,
+		e = this.getCssClass(),
+		f = this.getStructuralCssClass(),
+		g = !1,
+		h = !1,
+		k = !1,
+		m = goog.array.toArray(goog.dom.classlist.get(b));
+	goog.array.forEach(m, function (a) {
+		g || a != e ? h || a != f ? d |= this.getStateFromClass(a) : h = !0 : (g = !0, f == e && (h = !0));
+		this.getStateFromClass(a) == goog.ui.Component.State.DISABLED &&
+			(goog.asserts.assertElement(c), goog.dom.isFocusableTabIndex(c) && goog.dom.setFocusableTabIndex(c, !1))
+	}, this);
+	a.setStateInternal(d);
+	g || (m.push(e), f == e && (h = !0));
+	h || m.push(f);
+	var p = a.getExtraClassNames();
+	p && m.push.apply(m, p);
+	if (goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("7")) {
+		var l = this.getAppliedCombinedClassNames_(m);
+		0 < l.length && (m.push.apply(m, l), k = !0)
+	}
+	g && h && !p && !k || goog.dom.classlist.set(b, m.join(" "));
+	return b
+};
+goog.ui.ControlRenderer.prototype.initializeDom = function (a) {
+	a.isRightToLeft() && this.setRightToLeft(a.getElement(), !0);
+	a.isEnabled() && this.setFocusable(a, a.isVisible())
+};
+goog.ui.ControlRenderer.prototype.setAriaRole = function (a, b) {
+	var c = b || this.getAriaRole();
+	if (c) {
+		goog.asserts.assert(a, "The element passed as a first parameter cannot be null.");
+		var d = goog.a11y.aria.getRole(a);
+		c != d && goog.a11y.aria.setRole(a, c)
+	}
+};
+goog.ui.ControlRenderer.prototype.setAriaStates = function (a, b) {
+	goog.asserts.assert(a);
+	goog.asserts.assert(b);
+	var c = a.getAriaLabel();
+	goog.isDefAndNotNull(c) && this.setAriaLabel(b, c);
+	a.isVisible() || goog.a11y.aria.setState(b, goog.a11y.aria.State.HIDDEN, !a.isVisible());
+	a.isEnabled() || this.updateAriaState(b, goog.ui.Component.State.DISABLED, !a.isEnabled());
+	a.isSupportedState(goog.ui.Component.State.SELECTED) && this.updateAriaState(b, goog.ui.Component.State.SELECTED, a.isSelected());
+	a.isSupportedState(goog.ui.Component.State.CHECKED) &&
+		this.updateAriaState(b, goog.ui.Component.State.CHECKED, a.isChecked());
+	a.isSupportedState(goog.ui.Component.State.OPENED) && this.updateAriaState(b, goog.ui.Component.State.OPENED, a.isOpen())
+};
+goog.ui.ControlRenderer.prototype.setAriaLabel = function (a, b) {
+	goog.a11y.aria.setLabel(a, b)
+};
+goog.ui.ControlRenderer.prototype.setAllowTextSelection = function (a, b) {
+	goog.style.setUnselectable(a, !b, !goog.userAgent.IE && !goog.userAgent.OPERA)
+};
+goog.ui.ControlRenderer.prototype.setRightToLeft = function (a, b) {
+	this.enableClassName(a, this.getStructuralCssClass() + "-rtl", b)
+};
+goog.ui.ControlRenderer.prototype.isFocusable = function (a) {
+	var b;
+	return a.isSupportedState(goog.ui.Component.State.FOCUSED) && (b = a.getKeyEventTarget()) ? goog.dom.isFocusableTabIndex(b) : !1
+};
+goog.ui.ControlRenderer.prototype.setFocusable = function (a, b) {
+	var c;
+	if (a.isSupportedState(goog.ui.Component.State.FOCUSED) && (c = a.getKeyEventTarget())) {
+		if (!b && a.isFocused()) {
+			try {
+				c.blur()
+			} catch (d) { }
+			a.isFocused() && a.handleBlur(null)
+		}
+		goog.dom.isFocusableTabIndex(c) != b && goog.dom.setFocusableTabIndex(c, b)
+	}
+};
+goog.ui.ControlRenderer.prototype.setVisible = function (a, b) {
+	goog.style.setElementShown(a, b);
+	a && goog.a11y.aria.setState(a, goog.a11y.aria.State.HIDDEN, !b)
+};
+goog.ui.ControlRenderer.prototype.setState = function (a, b, c) {
+	var d = a.getElement();
+	if (d) {
+		var e = this.getClassForState(b);
+		e && this.enableClassName(a, e, c);
+		this.updateAriaState(d, b, c)
+	}
+};
+goog.ui.ControlRenderer.prototype.updateAriaState = function (a, b, c) {
+	goog.ui.ControlRenderer.ariaAttributeMap_ || (goog.ui.ControlRenderer.ariaAttributeMap_ = goog.object.create(goog.ui.Component.State.DISABLED, goog.a11y.aria.State.DISABLED, goog.ui.Component.State.SELECTED, goog.a11y.aria.State.SELECTED, goog.ui.Component.State.CHECKED, goog.a11y.aria.State.CHECKED, goog.ui.Component.State.OPENED, goog.a11y.aria.State.EXPANDED));
+	goog.asserts.assert(a, "The element passed as a first parameter cannot be null.");
+	(b = goog.ui.ControlRenderer.getAriaStateForAriaRole_(a, goog.ui.ControlRenderer.ariaAttributeMap_[b])) && goog.a11y.aria.setState(a, b, c)
+};
+goog.ui.ControlRenderer.getAriaStateForAriaRole_ = function (a, b) {
+	var c = goog.a11y.aria.getRole(a);
+	if (!c) return b;
+	c = goog.ui.ControlRenderer.TOGGLE_ARIA_STATE_MAP_[c] || b;
+	return goog.ui.ControlRenderer.isAriaState_(b) ? c : b
+};
+goog.ui.ControlRenderer.isAriaState_ = function (a) {
+	return a == goog.a11y.aria.State.CHECKED || a == goog.a11y.aria.State.SELECTED
+};
+goog.ui.ControlRenderer.prototype.setContent = function (a, b) {
+	var c = this.getContentElement(a);
+	if (c && (goog.dom.removeChildren(c), b))
+		if (goog.isString(b)) goog.dom.setTextContent(c, b);
+		else {
+			var d = function (a) {
+				if (a) {
+					var b = goog.dom.getOwnerDocument(c);
+					c.appendChild(goog.isString(a) ? b.createTextNode(a) : a)
+				}
+			};
+			goog.isArray(b) ? goog.array.forEach(b, d) : !goog.isArrayLike(b) || "nodeType" in b ? d(b) : goog.array.forEach(goog.array.clone(b), d)
+		}
+};
+goog.ui.ControlRenderer.prototype.getKeyEventTarget = function (a) {
+	return a.getElement()
+};
+goog.ui.ControlRenderer.prototype.getCssClass = function () {
+	return goog.ui.ControlRenderer.CSS_CLASS
+};
+goog.ui.ControlRenderer.prototype.getIe6ClassCombinations = function () {
+	return []
+};
+goog.ui.ControlRenderer.prototype.getStructuralCssClass = function () {
+	return this.getCssClass()
+};
+goog.ui.ControlRenderer.prototype.getClassNames = function (a) {
+	var b = this.getCssClass(),
+		c = [b],
+		d = this.getStructuralCssClass();
+	d != b && c.push(d);
+	b = this.getClassNamesForState(a.getState());
+	c.push.apply(c, b);
+	(a = a.getExtraClassNames()) && c.push.apply(c, a);
+	goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("7") && c.push.apply(c, this.getAppliedCombinedClassNames_(c));
+	return c
+};
+goog.ui.ControlRenderer.prototype.getAppliedCombinedClassNames_ = function (a, b) {
+	var c = [];
+	b && (a = goog.array.concat(a, [b]));
+	goog.array.forEach(this.getIe6ClassCombinations(), function (d) {
+		!goog.array.every(d, goog.partial(goog.array.contains, a)) || b && !goog.array.contains(d, b) || c.push(d.join("_"))
+	});
+	return c
+};
+goog.ui.ControlRenderer.prototype.getClassNamesForState = function (a) {
+	for (var b = []; a;) {
+		var c = a & -a;
+		b.push(this.getClassForState(c));
+		a &= ~c
+	}
+	return b
+};
+goog.ui.ControlRenderer.prototype.getClassForState = function (a) {
+	this.classByState_ || this.createClassByStateMap_();
+	return this.classByState_[a]
+};
+goog.ui.ControlRenderer.prototype.getStateFromClass = function (a) {
+	this.stateByClass_ || this.createStateByClassMap_();
+	a = parseInt(this.stateByClass_[a], 10);
+	return isNaN(a) ? 0 : a
+};
+goog.ui.ControlRenderer.prototype.createClassByStateMap_ = function () {
+	var a = this.getStructuralCssClass(),
+		b = !goog.string.contains(goog.string.normalizeWhitespace(a), " ");
+	goog.asserts.assert(b, "ControlRenderer has an invalid css class: '" + a + "'");
+	this.classByState_ = goog.object.create(goog.ui.Component.State.DISABLED, a + "-disabled", goog.ui.Component.State.HOVER, a + "-hover", goog.ui.Component.State.ACTIVE, a + "-active", goog.ui.Component.State.SELECTED, a + "-selected", goog.ui.Component.State.CHECKED, a + "-checked",
+		goog.ui.Component.State.FOCUSED, a + "-focused", goog.ui.Component.State.OPENED, a + "-open")
+};
+goog.ui.ControlRenderer.prototype.createStateByClassMap_ = function () {
+	this.classByState_ || this.createClassByStateMap_();
+	this.stateByClass_ = goog.object.transpose(this.classByState_)
+};
+goog.ui.Control = function (a, b, c) {
+	goog.ui.Component.call(this, c);
+	this.renderer_ = b || goog.ui.registry.getDefaultRenderer(this.constructor);
+	this.setContentInternal(goog.isDef(a) ? a : null);
+	this.ariaLabel_ = null
+};
+goog.inherits(goog.ui.Control, goog.ui.Component);
+goog.tagUnsealableClass(goog.ui.Control);
+goog.ui.Control.registerDecorator = goog.ui.registry.setDecoratorByClassName;
+goog.ui.Control.getDecorator = goog.ui.registry.getDecorator;
+goog.ui.Control.prototype.content_ = null;
+goog.ui.Control.prototype.state_ = 0;
+goog.ui.Control.prototype.supportedStates_ = goog.ui.Component.State.DISABLED | goog.ui.Component.State.HOVER | goog.ui.Component.State.ACTIVE | goog.ui.Component.State.FOCUSED;
+goog.ui.Control.prototype.autoStates_ = goog.ui.Component.State.ALL;
+goog.ui.Control.prototype.statesWithTransitionEvents_ = 0;
+goog.ui.Control.prototype.visible_ = !0;
+goog.ui.Control.prototype.extraClassNames_ = null;
+goog.ui.Control.prototype.handleMouseEvents_ = !0;
+goog.ui.Control.prototype.allowTextSelection_ = !1;
+goog.ui.Control.prototype.preferredAriaRole_ = null;
+goog.ui.Control.prototype.isHandleMouseEvents = function () {
+	return this.handleMouseEvents_
+};
+goog.ui.Control.prototype.setHandleMouseEvents = function (a) {
+	this.isInDocument() && a != this.handleMouseEvents_ && this.enableMouseEventHandling_(a);
+	this.handleMouseEvents_ = a
+};
+goog.ui.Control.prototype.getKeyEventTarget = function () {
+	return this.renderer_.getKeyEventTarget(this)
+};
+goog.ui.Control.prototype.getKeyHandler = function () {
+	return this.keyHandler_ || (this.keyHandler_ = new goog.events.KeyHandler)
+};
+goog.ui.Control.prototype.getRenderer = function () {
+	return this.renderer_
+};
+goog.ui.Control.prototype.setRenderer = function (a) {
+	if (this.isInDocument()) throw Error(goog.ui.Component.Error.ALREADY_RENDERED);
+	this.getElement() && this.setElementInternal(null);
+	this.renderer_ = a
+};
+goog.ui.Control.prototype.getExtraClassNames = function () {
+	return this.extraClassNames_
+};
+goog.ui.Control.prototype.addClassName = function (a) {
+	a && (this.extraClassNames_ ? goog.array.contains(this.extraClassNames_, a) || this.extraClassNames_.push(a) : this.extraClassNames_ = [a], this.renderer_.enableExtraClassName(this, a, !0))
+};
+goog.ui.Control.prototype.removeClassName = function (a) {
+	a && this.extraClassNames_ && goog.array.remove(this.extraClassNames_, a) && (0 == this.extraClassNames_.length && (this.extraClassNames_ = null), this.renderer_.enableExtraClassName(this, a, !1))
+};
+goog.ui.Control.prototype.enableClassName = function (a, b) {
+	b ? this.addClassName(a) : this.removeClassName(a)
+};
+goog.ui.Control.prototype.createDom = function () {
+	var a = this.renderer_.createDom(this);
+	this.setElementInternal(a);
+	this.renderer_.setAriaRole(a, this.getPreferredAriaRole());
+	this.isAllowTextSelection() || this.renderer_.setAllowTextSelection(a, !1);
+	this.isVisible() || this.renderer_.setVisible(a, !1)
+};
+goog.ui.Control.prototype.getPreferredAriaRole = function () {
+	return this.preferredAriaRole_
+};
+goog.ui.Control.prototype.setPreferredAriaRole = function (a) {
+	this.preferredAriaRole_ = a
+};
+goog.ui.Control.prototype.getAriaLabel = function () {
+	return this.ariaLabel_
+};
+goog.ui.Control.prototype.setAriaLabel = function (a) {
+	this.ariaLabel_ = a;
+	var b = this.getElement();
+	b && this.renderer_.setAriaLabel(b, a)
+};
+goog.ui.Control.prototype.getContentElement = function () {
+	return this.renderer_.getContentElement(this.getElement())
+};
+goog.ui.Control.prototype.canDecorate = function (a) {
+	return this.renderer_.canDecorate(a)
+};
+goog.ui.Control.prototype.decorateInternal = function (a) {
+	a = this.renderer_.decorate(this, a);
+	this.setElementInternal(a);
+	this.renderer_.setAriaRole(a, this.getPreferredAriaRole());
+	this.isAllowTextSelection() || this.renderer_.setAllowTextSelection(a, !1);
+	this.visible_ = "none" != a.style.display
+};
+goog.ui.Control.prototype.enterDocument = function () {
+	goog.ui.Control.superClass_.enterDocument.call(this);
+	this.renderer_.setAriaStates(this, this.getElementStrict());
+	this.renderer_.initializeDom(this);
+	if (this.supportedStates_ & ~goog.ui.Component.State.DISABLED && (this.isHandleMouseEvents() && this.enableMouseEventHandling_(!0), this.isSupportedState(goog.ui.Component.State.FOCUSED))) {
+		var a = this.getKeyEventTarget();
+		if (a) {
+			var b = this.getKeyHandler();
+			b.attach(a);
+			this.getHandler().listen(b, goog.events.KeyHandler.EventType.KEY,
+				this.handleKeyEvent).listen(a, goog.events.EventType.FOCUS, this.handleFocus).listen(a, goog.events.EventType.BLUR, this.handleBlur)
+		}
+	}
+};
+goog.ui.Control.prototype.enableMouseEventHandling_ = function (a) {
+	var b = this.getHandler(),
+		c = this.getElement();
+	a ? (b.listen(c, goog.events.EventType.MOUSEOVER, this.handleMouseOver).listen(c, goog.events.EventType.MOUSEDOWN, this.handleMouseDown).listen(c, goog.events.EventType.MOUSEUP, this.handleMouseUp).listen(c, goog.events.EventType.MOUSEOUT, this.handleMouseOut), this.handleContextMenu != goog.nullFunction && b.listen(c, goog.events.EventType.CONTEXTMENU, this.handleContextMenu), goog.userAgent.IE && (goog.userAgent.isVersionOrHigher(9) ||
+		b.listen(c, goog.events.EventType.DBLCLICK, this.handleDblClick), this.ieMouseEventSequenceSimulator_ || (this.ieMouseEventSequenceSimulator_ = new goog.ui.Control.IeMouseEventSequenceSimulator_(this), this.registerDisposable(this.ieMouseEventSequenceSimulator_)))) : (b.unlisten(c, goog.events.EventType.MOUSEOVER, this.handleMouseOver).unlisten(c, goog.events.EventType.MOUSEDOWN, this.handleMouseDown).unlisten(c, goog.events.EventType.MOUSEUP, this.handleMouseUp).unlisten(c, goog.events.EventType.MOUSEOUT, this.handleMouseOut),
+		this.handleContextMenu != goog.nullFunction && b.unlisten(c, goog.events.EventType.CONTEXTMENU, this.handleContextMenu), goog.userAgent.IE && (goog.userAgent.isVersionOrHigher(9) || b.unlisten(c, goog.events.EventType.DBLCLICK, this.handleDblClick), goog.dispose(this.ieMouseEventSequenceSimulator_), this.ieMouseEventSequenceSimulator_ = null))
+};
+goog.ui.Control.prototype.exitDocument = function () {
+	goog.ui.Control.superClass_.exitDocument.call(this);
+	this.keyHandler_ && this.keyHandler_.detach();
+	this.isVisible() && this.isEnabled() && this.renderer_.setFocusable(this, !1)
+};
+goog.ui.Control.prototype.disposeInternal = function () {
+	goog.ui.Control.superClass_.disposeInternal.call(this);
+	this.keyHandler_ && (this.keyHandler_.dispose(), delete this.keyHandler_);
+	delete this.renderer_;
+	this.ieMouseEventSequenceSimulator_ = this.extraClassNames_ = this.content_ = null
+};
+goog.ui.Control.prototype.getContent = function () {
+	return this.content_
+};
+goog.ui.Control.prototype.setContent = function (a) {
+	this.renderer_.setContent(this.getElement(), a);
+	this.setContentInternal(a)
+};
+goog.ui.Control.prototype.setContentInternal = function (a) {
+	this.content_ = a
+};
+goog.ui.Control.prototype.getCaption = function () {
+	var a = this.getContent();
+	if (!a) return "";
+	a = goog.isString(a) ? a : goog.isArray(a) ? goog.array.map(a, goog.dom.getRawTextContent).join("") : goog.dom.getTextContent(a);
+	return goog.string.collapseBreakingSpaces(a)
+};
+goog.ui.Control.prototype.setCaption = function (a) {
+	this.setContent(a)
+};
+goog.ui.Control.prototype.setRightToLeft = function (a) {
+	goog.ui.Control.superClass_.setRightToLeft.call(this, a);
+	var b = this.getElement();
+	b && this.renderer_.setRightToLeft(b, a)
+};
+goog.ui.Control.prototype.isAllowTextSelection = function () {
+	return this.allowTextSelection_
+};
+goog.ui.Control.prototype.setAllowTextSelection = function (a) {
+	this.allowTextSelection_ = a;
+	var b = this.getElement();
+	b && this.renderer_.setAllowTextSelection(b, a)
+};
+goog.ui.Control.prototype.isVisible = function () {
+	return this.visible_
+};
+goog.ui.Control.prototype.setVisible = function (a, b) {
+	if (b || this.visible_ != a && this.dispatchEvent(a ? goog.ui.Component.EventType.SHOW : goog.ui.Component.EventType.HIDE)) {
+		var c = this.getElement();
+		c && this.renderer_.setVisible(c, a);
+		this.isEnabled() && this.renderer_.setFocusable(this, a);
+		this.visible_ = a;
+		return !0
+	}
+	return !1
+};
+goog.ui.Control.prototype.isEnabled = function () {
+	return !this.hasState(goog.ui.Component.State.DISABLED)
+};
+goog.ui.Control.prototype.isParentDisabled_ = function () {
+	var a = this.getParent();
+	return !!a && "function" == typeof a.isEnabled && !a.isEnabled()
+};
+goog.ui.Control.prototype.setEnabled = function (a) {
+	!this.isParentDisabled_() && this.isTransitionAllowed(goog.ui.Component.State.DISABLED, !a) && (a || (this.setActive(!1), this.setHighlighted(!1)), this.isVisible() && this.renderer_.setFocusable(this, a), this.setState(goog.ui.Component.State.DISABLED, !a, !0))
+};
+goog.ui.Control.prototype.isHighlighted = function () {
+	return this.hasState(goog.ui.Component.State.HOVER)
+};
+goog.ui.Control.prototype.setHighlighted = function (a) {
+	this.isTransitionAllowed(goog.ui.Component.State.HOVER, a) && this.setState(goog.ui.Component.State.HOVER, a)
+};
+goog.ui.Control.prototype.isActive = function () {
+	return this.hasState(goog.ui.Component.State.ACTIVE)
+};
+goog.ui.Control.prototype.setActive = function (a) {
+	this.isTransitionAllowed(goog.ui.Component.State.ACTIVE, a) && this.setState(goog.ui.Component.State.ACTIVE, a)
+};
+goog.ui.Control.prototype.isSelected = function () {
+	return this.hasState(goog.ui.Component.State.SELECTED)
+};
+goog.ui.Control.prototype.setSelected = function (a) {
+	this.isTransitionAllowed(goog.ui.Component.State.SELECTED, a) && this.setState(goog.ui.Component.State.SELECTED, a)
+};
+goog.ui.Control.prototype.isChecked = function () {
+	return this.hasState(goog.ui.Component.State.CHECKED)
+};
+goog.ui.Control.prototype.setChecked = function (a) {
+	this.isTransitionAllowed(goog.ui.Component.State.CHECKED, a) && this.setState(goog.ui.Component.State.CHECKED, a)
+};
+goog.ui.Control.prototype.isFocused = function () {
+	return this.hasState(goog.ui.Component.State.FOCUSED)
+};
+goog.ui.Control.prototype.setFocused = function (a) {
+	this.isTransitionAllowed(goog.ui.Component.State.FOCUSED, a) && this.setState(goog.ui.Component.State.FOCUSED, a)
+};
+goog.ui.Control.prototype.isOpen = function () {
+	return this.hasState(goog.ui.Component.State.OPENED)
+};
+goog.ui.Control.prototype.setOpen = function (a) {
+	this.isTransitionAllowed(goog.ui.Component.State.OPENED, a) && this.setState(goog.ui.Component.State.OPENED, a)
+};
+goog.ui.Control.prototype.getState = function () {
+	return this.state_
+};
+goog.ui.Control.prototype.hasState = function (a) {
+	return !!(this.state_ & a)
+};
+goog.ui.Control.prototype.setState = function (a, b, c) {
+	c || a != goog.ui.Component.State.DISABLED ? this.isSupportedState(a) && b != this.hasState(a) && (this.renderer_.setState(this, a, b), this.state_ = b ? this.state_ | a : this.state_ & ~a) : this.setEnabled(!b)
+};
+goog.ui.Control.prototype.setStateInternal = function (a) {
+	this.state_ = a
+};
+goog.ui.Control.prototype.isSupportedState = function (a) {
+	return !!(this.supportedStates_ & a)
+};
+goog.ui.Control.prototype.setSupportedState = function (a, b) {
+	if (this.isInDocument() && this.hasState(a) && !b) throw Error(goog.ui.Component.Error.ALREADY_RENDERED);
+	!b && this.hasState(a) && this.setState(a, !1);
+	this.supportedStates_ = b ? this.supportedStates_ | a : this.supportedStates_ & ~a
+};
+goog.ui.Control.prototype.isAutoState = function (a) {
+	return !!(this.autoStates_ & a) && this.isSupportedState(a)
+};
+goog.ui.Control.prototype.setAutoStates = function (a, b) {
+	this.autoStates_ = b ? this.autoStates_ | a : this.autoStates_ & ~a
+};
+goog.ui.Control.prototype.isDispatchTransitionEvents = function (a) {
+	return !!(this.statesWithTransitionEvents_ & a) && this.isSupportedState(a)
+};
+goog.ui.Control.prototype.setDispatchTransitionEvents = function (a, b) {
+	this.statesWithTransitionEvents_ = b ? this.statesWithTransitionEvents_ | a : this.statesWithTransitionEvents_ & ~a
+};
+goog.ui.Control.prototype.isTransitionAllowed = function (a, b) {
+	return this.isSupportedState(a) && this.hasState(a) != b && (!(this.statesWithTransitionEvents_ & a) || this.dispatchEvent(goog.ui.Component.getStateTransitionEvent(a, b))) && !this.isDisposed()
+};
+goog.ui.Control.prototype.handleMouseOver = function (a) {
+	!goog.ui.Control.isMouseEventWithinElement_(a, this.getElement()) && this.dispatchEvent(goog.ui.Component.EventType.ENTER) && this.isEnabled() && this.isAutoState(goog.ui.Component.State.HOVER) && this.setHighlighted(!0)
+};
+goog.ui.Control.prototype.handleMouseOut = function (a) {
+	!goog.ui.Control.isMouseEventWithinElement_(a, this.getElement()) && this.dispatchEvent(goog.ui.Component.EventType.LEAVE) && (this.isAutoState(goog.ui.Component.State.ACTIVE) && this.setActive(!1), this.isAutoState(goog.ui.Component.State.HOVER) && this.setHighlighted(!1))
+};
+goog.ui.Control.prototype.handleContextMenu = goog.nullFunction;
+goog.ui.Control.isMouseEventWithinElement_ = function (a, b) {
+	return !!a.relatedTarget && goog.dom.contains(b, a.relatedTarget)
+};
+goog.ui.Control.prototype.handleMouseDown = function (a) {
+	this.isEnabled() && (this.isAutoState(goog.ui.Component.State.HOVER) && this.setHighlighted(!0), a.isMouseActionButton() && (this.isAutoState(goog.ui.Component.State.ACTIVE) && this.setActive(!0), this.renderer_ && this.renderer_.isFocusable(this) && this.getKeyEventTarget().focus()));
+	!this.isAllowTextSelection() && a.isMouseActionButton() && a.preventDefault()
+};
+goog.ui.Control.prototype.handleMouseUp = function (a) {
+	this.isEnabled() && (this.isAutoState(goog.ui.Component.State.HOVER) && this.setHighlighted(!0), this.isActive() && this.performActionInternal(a) && this.isAutoState(goog.ui.Component.State.ACTIVE) && this.setActive(!1))
+};
+goog.ui.Control.prototype.handleDblClick = function (a) {
+	this.isEnabled() && this.performActionInternal(a)
+};
+goog.ui.Control.prototype.performActionInternal = function (a) {
+	this.isAutoState(goog.ui.Component.State.CHECKED) && this.setChecked(!this.isChecked());
+	this.isAutoState(goog.ui.Component.State.SELECTED) && this.setSelected(!0);
+	this.isAutoState(goog.ui.Component.State.OPENED) && this.setOpen(!this.isOpen());
+	var b = new goog.events.Event(goog.ui.Component.EventType.ACTION, this);
+	a && (b.altKey = a.altKey, b.ctrlKey = a.ctrlKey, b.metaKey = a.metaKey, b.shiftKey = a.shiftKey, b.platformModifierKey = a.platformModifierKey);
+	return this.dispatchEvent(b)
+};
+goog.ui.Control.prototype.handleFocus = function (a) {
+	this.isAutoState(goog.ui.Component.State.FOCUSED) && this.setFocused(!0)
+};
+goog.ui.Control.prototype.handleBlur = function (a) {
+	this.isAutoState(goog.ui.Component.State.ACTIVE) && this.setActive(!1);
+	this.isAutoState(goog.ui.Component.State.FOCUSED) && this.setFocused(!1)
+};
+goog.ui.Control.prototype.handleKeyEvent = function (a) {
+	return this.isVisible() && this.isEnabled() && this.handleKeyEventInternal(a) ? (a.preventDefault(), a.stopPropagation(), !0) : !1
+};
+goog.ui.Control.prototype.handleKeyEventInternal = function (a) {
+	return a.keyCode == goog.events.KeyCodes.ENTER && this.performActionInternal(a)
+};
+goog.ui.registry.setDefaultRenderer(goog.ui.Control, goog.ui.ControlRenderer);
+goog.ui.registry.setDecoratorByClassName(goog.ui.ControlRenderer.CSS_CLASS, function () {
+	return new goog.ui.Control(null)
+});
+goog.ui.Control.IeMouseEventSequenceSimulator_ = function (a) {
+	goog.Disposable.call(this);
+	this.control_ = a;
+	this.clickExpected_ = !1;
+	this.handler_ = new goog.events.EventHandler(this);
+	this.registerDisposable(this.handler_);
+	a = this.control_.getElementStrict();
+	this.handler_.listen(a, goog.events.EventType.MOUSEDOWN, this.handleMouseDown_).listen(a, goog.events.EventType.MOUSEUP, this.handleMouseUp_).listen(a, goog.events.EventType.CLICK, this.handleClick_)
+};
+goog.inherits(goog.ui.Control.IeMouseEventSequenceSimulator_, goog.Disposable);
+goog.ui.Control.IeMouseEventSequenceSimulator_.SYNTHETIC_EVENTS_ = !goog.userAgent.IE || goog.userAgent.isDocumentModeOrHigher(9);
+goog.ui.Control.IeMouseEventSequenceSimulator_.prototype.handleMouseDown_ = function () {
+	this.clickExpected_ = !1
+};
+goog.ui.Control.IeMouseEventSequenceSimulator_.prototype.handleMouseUp_ = function () {
+	this.clickExpected_ = !0
+};
+goog.ui.Control.IeMouseEventSequenceSimulator_.makeLeftMouseEvent_ = function (a, b) {
+	if (!goog.ui.Control.IeMouseEventSequenceSimulator_.SYNTHETIC_EVENTS_) return a.button = goog.events.BrowserEvent.MouseButton.LEFT, a.type = b, a;
+	var c = document.createEvent("MouseEvents");
+	c.initMouseEvent(b, a.bubbles, a.cancelable, a.view || null, a.detail, a.screenX, a.screenY, a.clientX, a.clientY, a.ctrlKey, a.altKey, a.shiftKey, a.metaKey, goog.events.BrowserEvent.MouseButton.LEFT, a.relatedTarget || null);
+	return c
+};
+goog.ui.Control.IeMouseEventSequenceSimulator_.prototype.handleClick_ = function (a) {
+	if (this.clickExpected_) this.clickExpected_ = !1;
+	else {
+		var b = a.getBrowserEvent(),
+			c = b.button,
+			d = b.type,
+			e = goog.ui.Control.IeMouseEventSequenceSimulator_.makeLeftMouseEvent_(b, goog.events.EventType.MOUSEDOWN);
+		this.control_.handleMouseDown(new goog.events.BrowserEvent(e, a.currentTarget));
+		e = goog.ui.Control.IeMouseEventSequenceSimulator_.makeLeftMouseEvent_(b, goog.events.EventType.MOUSEUP);
+		this.control_.handleMouseUp(new goog.events.BrowserEvent(e,
+			a.currentTarget));
+		goog.ui.Control.IeMouseEventSequenceSimulator_.SYNTHETIC_EVENTS_ || (b.button = c, b.type = d)
+	}
+};
+goog.ui.Control.IeMouseEventSequenceSimulator_.prototype.disposeInternal = function () {
+	this.control_ = null;
+	goog.ui.Control.IeMouseEventSequenceSimulator_.superClass_.disposeInternal.call(this)
+};
+goog.ui.Container = function (a, b, c) {
+	goog.ui.Component.call(this, c);
+	this.renderer_ = b || goog.ui.ContainerRenderer.getInstance();
+	this.orientation_ = a || this.renderer_.getDefaultOrientation()
+};
+goog.inherits(goog.ui.Container, goog.ui.Component);
+goog.tagUnsealableClass(goog.ui.Container);
+goog.ui.Container.EventType = {
+	AFTER_SHOW: "aftershow",
+	AFTER_HIDE: "afterhide"
+};
+goog.ui.Container.Orientation = {
+	HORIZONTAL: "horizontal",
+	VERTICAL: "vertical"
+};
+goog.ui.Container.prototype.keyEventTarget_ = null;
+goog.ui.Container.prototype.keyHandler_ = null;
+goog.ui.Container.prototype.renderer_ = null;
+goog.ui.Container.prototype.orientation_ = null;
+goog.ui.Container.prototype.visible_ = !0;
+goog.ui.Container.prototype.enabled_ = !0;
+goog.ui.Container.prototype.focusable_ = !0;
+goog.ui.Container.prototype.highlightedIndex_ = -1;
+goog.ui.Container.prototype.openItem_ = null;
+goog.ui.Container.prototype.mouseButtonPressed_ = !1;
+goog.ui.Container.prototype.allowFocusableChildren_ = !1;
+goog.ui.Container.prototype.openFollowsHighlight_ = !0;
+goog.ui.Container.prototype.childElementIdMap_ = null;
+goog.ui.Container.prototype.getKeyEventTarget = function () {
+	return this.keyEventTarget_ || this.renderer_.getKeyEventTarget(this)
+};
+goog.ui.Container.prototype.setKeyEventTarget = function (a) {
+	if (this.focusable_) {
+		var b = this.getKeyEventTarget(),
+			c = this.isInDocument();
+		this.keyEventTarget_ = a;
+		var d = this.getKeyEventTarget();
+		c && (this.keyEventTarget_ = b, this.enableFocusHandling_(!1), this.keyEventTarget_ = a, this.getKeyHandler().attach(d), this.enableFocusHandling_(!0))
+	} else throw Error("Can't set key event target for container that doesn't support keyboard focus!");
+};
+goog.ui.Container.prototype.getKeyHandler = function () {
+	return this.keyHandler_ || (this.keyHandler_ = new goog.events.KeyHandler(this.getKeyEventTarget()))
+};
+goog.ui.Container.prototype.getRenderer = function () {
+	return this.renderer_
+};
+goog.ui.Container.prototype.setRenderer = function (a) {
+	if (this.getElement()) throw Error(goog.ui.Component.Error.ALREADY_RENDERED);
+	this.renderer_ = a
+};
+goog.ui.Container.prototype.createDom = function () {
+	this.setElementInternal(this.renderer_.createDom(this))
+};
+goog.ui.Container.prototype.getContentElement = function () {
+	return this.renderer_.getContentElement(this.getElement())
+};
+goog.ui.Container.prototype.canDecorate = function (a) {
+	return this.renderer_.canDecorate(a)
+};
+goog.ui.Container.prototype.decorateInternal = function (a) {
+	this.setElementInternal(this.renderer_.decorate(this, a));
+	"none" == a.style.display && (this.visible_ = !1)
+};
+goog.ui.Container.prototype.enterDocument = function () {
+	goog.ui.Container.superClass_.enterDocument.call(this);
+	this.forEachChild(function (a) {
+		a.isInDocument() && this.registerChildId_(a)
+	}, this);
+	var a = this.getElement();
+	this.renderer_.initializeDom(this);
+	this.setVisible(this.visible_, !0);
+	this.getHandler().listen(this, goog.ui.Component.EventType.ENTER, this.handleEnterItem).listen(this, goog.ui.Component.EventType.HIGHLIGHT, this.handleHighlightItem).listen(this, goog.ui.Component.EventType.UNHIGHLIGHT, this.handleUnHighlightItem).listen(this,
+		goog.ui.Component.EventType.OPEN, this.handleOpenItem).listen(this, goog.ui.Component.EventType.CLOSE, this.handleCloseItem).listen(a, goog.events.EventType.MOUSEDOWN, this.handleMouseDown).listen(goog.dom.getOwnerDocument(a), goog.events.EventType.MOUSEUP, this.handleDocumentMouseUp).listen(a, [goog.events.EventType.MOUSEDOWN, goog.events.EventType.MOUSEUP, goog.events.EventType.MOUSEOVER, goog.events.EventType.MOUSEOUT, goog.events.EventType.CONTEXTMENU], this.handleChildMouseEvents);
+	this.isFocusable() && this.enableFocusHandling_(!0)
+};
+goog.ui.Container.prototype.enableFocusHandling_ = function (a) {
+	var b = this.getHandler(),
+		c = this.getKeyEventTarget();
+	a ? b.listen(c, goog.events.EventType.FOCUS, this.handleFocus).listen(c, goog.events.EventType.BLUR, this.handleBlur).listen(this.getKeyHandler(), goog.events.KeyHandler.EventType.KEY, this.handleKeyEvent) : b.unlisten(c, goog.events.EventType.FOCUS, this.handleFocus).unlisten(c, goog.events.EventType.BLUR, this.handleBlur).unlisten(this.getKeyHandler(), goog.events.KeyHandler.EventType.KEY, this.handleKeyEvent)
+};
+goog.ui.Container.prototype.exitDocument = function () {
+	this.setHighlightedIndex(-1);
+	this.openItem_ && this.openItem_.setOpen(!1);
+	this.mouseButtonPressed_ = !1;
+	goog.ui.Container.superClass_.exitDocument.call(this)
+};
+goog.ui.Container.prototype.disposeInternal = function () {
+	goog.ui.Container.superClass_.disposeInternal.call(this);
+	this.keyHandler_ && (this.keyHandler_.dispose(), this.keyHandler_ = null);
+	this.renderer_ = this.openItem_ = this.childElementIdMap_ = this.keyEventTarget_ = null
+};
+goog.ui.Container.prototype.handleEnterItem = function (a) {
+	return !0
+};
+goog.ui.Container.prototype.handleHighlightItem = function (a) {
+	var b = this.indexOfChild(a.target);
+	if (-1 < b && b != this.highlightedIndex_) {
+		var c = this.getHighlighted();
+		c && c.setHighlighted(!1);
+		this.highlightedIndex_ = b;
+		c = this.getHighlighted();
+		this.isMouseButtonPressed() && c.setActive(!0);
+		this.openFollowsHighlight_ && this.openItem_ && c != this.openItem_ && (c.isSupportedState(goog.ui.Component.State.OPENED) ? c.setOpen(!0) : this.openItem_.setOpen(!1))
+	}
+	b = this.getElement();
+	goog.asserts.assert(b, "The DOM element for the container cannot be null.");
+	null != a.target.getElement() && goog.a11y.aria.setState(b, goog.a11y.aria.State.ACTIVEDESCENDANT, a.target.getElement().id)
+};
+goog.ui.Container.prototype.handleUnHighlightItem = function (a) {
+	a.target == this.getHighlighted() && (this.highlightedIndex_ = -1);
+	a = this.getElement();
+	goog.asserts.assert(a, "The DOM element for the container cannot be null.");
+	goog.a11y.aria.removeState(a, goog.a11y.aria.State.ACTIVEDESCENDANT)
+};
+goog.ui.Container.prototype.handleOpenItem = function (a) {
+	(a = a.target) && a != this.openItem_ && a.getParent() == this && (this.openItem_ && this.openItem_.setOpen(!1), this.openItem_ = a)
+};
+goog.ui.Container.prototype.handleCloseItem = function (a) {
+	a.target == this.openItem_ && (this.openItem_ = null);
+	var b = this.getElement(),
+		c = a.target.getElement();
+	b && a.target.isHighlighted() && c && goog.a11y.aria.setActiveDescendant(b, c)
+};
+goog.ui.Container.prototype.handleMouseDown = function (a) {
+	this.enabled_ && this.setMouseButtonPressed(!0);
+	var b = this.getKeyEventTarget();
+	b && goog.dom.isFocusableTabIndex(b) ? b.focus() : a.preventDefault()
+};
+goog.ui.Container.prototype.handleDocumentMouseUp = function (a) {
+	this.setMouseButtonPressed(!1)
+};
+goog.ui.Container.prototype.handleChildMouseEvents = function (a) {
+	var b = this.getOwnerControl(a.target);
+	if (b) switch (a.type) {
+		case goog.events.EventType.MOUSEDOWN:
+			b.handleMouseDown(a);
+			break;
+		case goog.events.EventType.MOUSEUP:
+			b.handleMouseUp(a);
+			break;
+		case goog.events.EventType.MOUSEOVER:
+			b.handleMouseOver(a);
+			break;
+		case goog.events.EventType.MOUSEOUT:
+			b.handleMouseOut(a);
+			break;
+		case goog.events.EventType.CONTEXTMENU:
+			b.handleContextMenu(a)
+	}
+};
+goog.ui.Container.prototype.getOwnerControl = function (a) {
+	if (this.childElementIdMap_)
+		for (var b = this.getElement() ; a && a !== b;) {
+			var c = a.id;
+			if (c in this.childElementIdMap_) return this.childElementIdMap_[c];
+			a = a.parentNode
+		}
+	return null
+};
+goog.ui.Container.prototype.handleFocus = function (a) { };
+goog.ui.Container.prototype.handleBlur = function (a) {
+	this.setHighlightedIndex(-1);
+	this.setMouseButtonPressed(!1);
+	this.openItem_ && this.openItem_.setOpen(!1)
+};
+goog.ui.Container.prototype.handleKeyEvent = function (a) {
+	return this.isEnabled() && this.isVisible() && (0 != this.getChildCount() || this.keyEventTarget_) && this.handleKeyEventInternal(a) ? (a.preventDefault(), a.stopPropagation(), !0) : !1
+};
+goog.ui.Container.prototype.handleKeyEventInternal = function (a) {
+	var b = this.getHighlighted();
+	if (b && "function" == typeof b.handleKeyEvent && b.handleKeyEvent(a) || this.openItem_ && this.openItem_ != b && "function" == typeof this.openItem_.handleKeyEvent && this.openItem_.handleKeyEvent(a)) return !0;
+	if (a.shiftKey || a.ctrlKey || a.metaKey || a.altKey) return !1;
+	switch (a.keyCode) {
+		case goog.events.KeyCodes.ESC:
+			if (this.isFocusable()) this.getKeyEventTarget().blur();
+			else return !1;
+			break;
+		case goog.events.KeyCodes.HOME:
+			this.highlightFirst();
+			break;
+		case goog.events.KeyCodes.END:
+			this.highlightLast();
+			break;
+		case goog.events.KeyCodes.UP:
+			if (this.orientation_ == goog.ui.Container.Orientation.VERTICAL) this.highlightPrevious();
+			else return !1;
+			break;
+		case goog.events.KeyCodes.LEFT:
+			if (this.orientation_ == goog.ui.Container.Orientation.HORIZONTAL) this.isRightToLeft() ? this.highlightNext() : this.highlightPrevious();
+			else return !1;
+			break;
+		case goog.events.KeyCodes.DOWN:
+			if (this.orientation_ == goog.ui.Container.Orientation.VERTICAL) this.highlightNext();
+			else return !1;
+			break;
+		case goog.events.KeyCodes.RIGHT:
+			if (this.orientation_ == goog.ui.Container.Orientation.HORIZONTAL) this.isRightToLeft() ? this.highlightPrevious() : this.highlightNext();
+			else return !1;
+			break;
+		default:
+			return !1
+	}
+	return !0
+};
+goog.ui.Container.prototype.registerChildId_ = function (a) {
+	var b = a.getElement(),
+		b = b.id || (b.id = a.getId());
+	this.childElementIdMap_ || (this.childElementIdMap_ = {});
+	this.childElementIdMap_[b] = a
+};
+goog.ui.Container.prototype.addChild = function (a, b) {
+	goog.asserts.assertInstanceof(a, goog.ui.Control, "The child of a container must be a control");
+	goog.ui.Container.superClass_.addChild.call(this, a, b)
+};
+goog.ui.Container.prototype.addChildAt = function (a, b, c) {
+	goog.asserts.assertInstanceof(a, goog.ui.Control);
+	a.setDispatchTransitionEvents(goog.ui.Component.State.HOVER, !0);
+	a.setDispatchTransitionEvents(goog.ui.Component.State.OPENED, !0);
+	!this.isFocusable() && this.isFocusableChildrenAllowed() || a.setSupportedState(goog.ui.Component.State.FOCUSED, !1);
+	a.setHandleMouseEvents(!1);
+	var d = a.getParent() == this ? this.indexOfChild(a) : -1;
+	goog.ui.Container.superClass_.addChildAt.call(this, a, b, c);
+	a.isInDocument() && this.isInDocument() &&
+		this.registerChildId_(a);
+	this.updateHighlightedIndex_(d, b)
+};
+goog.ui.Container.prototype.updateHighlightedIndex_ = function (a, b) {
+	-1 == a && (a = this.getChildCount());
+	a == this.highlightedIndex_ ? this.highlightedIndex_ = Math.min(this.getChildCount() - 1, b) : a > this.highlightedIndex_ && b <= this.highlightedIndex_ ? this.highlightedIndex_++ : a < this.highlightedIndex_ && b > this.highlightedIndex_ && this.highlightedIndex_--
+};
+goog.ui.Container.prototype.removeChild = function (a, b) {
+	a = goog.isString(a) ? this.getChild(a) : a;
+	goog.asserts.assertInstanceof(a, goog.ui.Control);
+	if (a) {
+		var c = this.indexOfChild(a); -1 != c && (c == this.highlightedIndex_ ? (a.setHighlighted(!1), this.highlightedIndex_ = -1) : c < this.highlightedIndex_ && this.highlightedIndex_--);
+		(c = a.getElement()) && c.id && this.childElementIdMap_ && goog.object.remove(this.childElementIdMap_, c.id)
+	}
+	a = goog.ui.Container.superClass_.removeChild.call(this, a, b);
+	a.setHandleMouseEvents(!0);
+	return a
+};
+goog.ui.Container.prototype.getOrientation = function () {
+	return this.orientation_
+};
+goog.ui.Container.prototype.setOrientation = function (a) {
+	if (this.getElement()) throw Error(goog.ui.Component.Error.ALREADY_RENDERED);
+	this.orientation_ = a
+};
+goog.ui.Container.prototype.isVisible = function () {
+	return this.visible_
+};
+goog.ui.Container.prototype.setVisible = function (a, b) {
+	if (b || this.visible_ != a && this.dispatchEvent(a ? goog.ui.Component.EventType.SHOW : goog.ui.Component.EventType.HIDE)) {
+		this.visible_ = a;
+		var c = this.getElement();
+		c && (goog.style.setElementShown(c, a), this.isFocusable() && this.renderer_.enableTabIndex(this.getKeyEventTarget(), this.enabled_ && this.visible_), b || this.dispatchEvent(this.visible_ ? goog.ui.Container.EventType.AFTER_SHOW : goog.ui.Container.EventType.AFTER_HIDE));
+		return !0
+	}
+	return !1
+};
+goog.ui.Container.prototype.isEnabled = function () {
+	return this.enabled_
+};
+goog.ui.Container.prototype.setEnabled = function (a) {
+	this.enabled_ != a && this.dispatchEvent(a ? goog.ui.Component.EventType.ENABLE : goog.ui.Component.EventType.DISABLE) && (a ? (this.enabled_ = !0, this.forEachChild(function (a) {
+		a.wasDisabled ? delete a.wasDisabled : a.setEnabled(!0)
+	})) : (this.forEachChild(function (a) {
+		a.isEnabled() ? a.setEnabled(!1) : a.wasDisabled = !0
+	}), this.enabled_ = !1, this.setMouseButtonPressed(!1)), this.isFocusable() && this.renderer_.enableTabIndex(this.getKeyEventTarget(), a && this.visible_))
+};
+goog.ui.Container.prototype.isFocusable = function () {
+	return this.focusable_
+};
+goog.ui.Container.prototype.setFocusable = function (a) {
+	a != this.focusable_ && this.isInDocument() && this.enableFocusHandling_(a);
+	this.focusable_ = a;
+	this.enabled_ && this.visible_ && this.renderer_.enableTabIndex(this.getKeyEventTarget(), a)
+};
+goog.ui.Container.prototype.isFocusableChildrenAllowed = function () {
+	return this.allowFocusableChildren_
+};
+goog.ui.Container.prototype.setFocusableChildrenAllowed = function (a) {
+	this.allowFocusableChildren_ = a
+};
+goog.ui.Container.prototype.isOpenFollowsHighlight = function () {
+	return this.openFollowsHighlight_
+};
+goog.ui.Container.prototype.setOpenFollowsHighlight = function (a) {
+	this.openFollowsHighlight_ = a
+};
+goog.ui.Container.prototype.getHighlightedIndex = function () {
+	return this.highlightedIndex_
+};
+goog.ui.Container.prototype.setHighlightedIndex = function (a) {
+	(a = this.getChildAt(a)) ? a.setHighlighted(!0) : -1 < this.highlightedIndex_ && this.getHighlighted().setHighlighted(!1)
+};
+goog.ui.Container.prototype.setHighlighted = function (a) {
+	this.setHighlightedIndex(this.indexOfChild(a))
+};
+goog.ui.Container.prototype.getHighlighted = function () {
+	return this.getChildAt(this.highlightedIndex_)
+};
+goog.ui.Container.prototype.highlightFirst = function () {
+	this.highlightHelper(function (a, b) {
+		return (a + 1) % b
+	}, this.getChildCount() - 1)
+};
+goog.ui.Container.prototype.highlightLast = function () {
+	this.highlightHelper(function (a, b) {
+		a--;
+		return 0 > a ? b - 1 : a
+	}, 0)
+};
+goog.ui.Container.prototype.highlightNext = function () {
+	this.highlightHelper(function (a, b) {
+		return (a + 1) % b
+	}, this.highlightedIndex_)
+};
+goog.ui.Container.prototype.highlightPrevious = function () {
+	this.highlightHelper(function (a, b) {
+		a--;
+		return 0 > a ? b - 1 : a
+	}, this.highlightedIndex_)
+};
+goog.ui.Container.prototype.highlightHelper = function (a, b) {
+	for (var c = 0 > b ? this.indexOfChild(this.openItem_) : b, d = this.getChildCount(), c = a.call(this, c, d), e = 0; e <= d;) {
+		var f = this.getChildAt(c);
+		if (f && this.canHighlightItem(f)) return this.setHighlightedIndexFromKeyEvent(c), !0;
+		e++;
+		c = a.call(this, c, d)
+	}
+	return !1
+};
+goog.ui.Container.prototype.canHighlightItem = function (a) {
+	return a.isVisible() && a.isEnabled() && a.isSupportedState(goog.ui.Component.State.HOVER)
+};
+goog.ui.Container.prototype.setHighlightedIndexFromKeyEvent = function (a) {
+	this.setHighlightedIndex(a)
+};
+goog.ui.Container.prototype.getOpenItem = function () {
+	return this.openItem_
+};
+goog.ui.Container.prototype.isMouseButtonPressed = function () {
+	return this.mouseButtonPressed_
+};
+goog.ui.Container.prototype.setMouseButtonPressed = function (a) {
+	this.mouseButtonPressed_ = a
+};
+goog.ui.MenuHeaderRenderer = function () {
+	goog.ui.ControlRenderer.call(this)
+};
+goog.inherits(goog.ui.MenuHeaderRenderer, goog.ui.ControlRenderer);
+goog.addSingletonGetter(goog.ui.MenuHeaderRenderer);
+goog.ui.MenuHeaderRenderer.CSS_CLASS = "goog-menuheader";
+goog.ui.MenuHeaderRenderer.prototype.getCssClass = function () {
+	return goog.ui.MenuHeaderRenderer.CSS_CLASS
+};
+goog.ui.MenuHeader = function (a, b, c) {
+	goog.ui.Control.call(this, a, c || goog.ui.MenuHeaderRenderer.getInstance(), b);
+	this.setSupportedState(goog.ui.Component.State.DISABLED, !1);
+	this.setSupportedState(goog.ui.Component.State.HOVER, !1);
+	this.setSupportedState(goog.ui.Component.State.ACTIVE, !1);
+	this.setSupportedState(goog.ui.Component.State.FOCUSED, !1);
+	this.setStateInternal(goog.ui.Component.State.DISABLED)
+};
+goog.inherits(goog.ui.MenuHeader, goog.ui.Control);
+goog.ui.registry.setDecoratorByClassName(goog.ui.MenuHeaderRenderer.CSS_CLASS, function () {
+	return new goog.ui.MenuHeader(null)
+});
+goog.ui.MenuItemRenderer = function () {
+	goog.ui.ControlRenderer.call(this);
+	this.classNameCache_ = []
+};
+goog.inherits(goog.ui.MenuItemRenderer, goog.ui.ControlRenderer);
+goog.addSingletonGetter(goog.ui.MenuItemRenderer);
+goog.ui.MenuItemRenderer.CSS_CLASS = "goog-menuitem";
+goog.ui.MenuItemRenderer.CompositeCssClassIndex_ = {
+	HOVER: 0,
+	CHECKBOX: 1,
+	CONTENT: 2
+};
+goog.ui.MenuItemRenderer.prototype.getCompositeCssClass_ = function (a) {
+	var b = this.classNameCache_[a];
+	if (!b) {
+		switch (a) {
+			case goog.ui.MenuItemRenderer.CompositeCssClassIndex_.HOVER:
+				b = this.getStructuralCssClass() + "-highlight";
+				break;
+			case goog.ui.MenuItemRenderer.CompositeCssClassIndex_.CHECKBOX:
+				b = this.getStructuralCssClass() + "-checkbox";
+				break;
+			case goog.ui.MenuItemRenderer.CompositeCssClassIndex_.CONTENT:
+				b = this.getStructuralCssClass() + "-content"
+		}
+		this.classNameCache_[a] = b
+	}
+	return b
+};
+goog.ui.MenuItemRenderer.prototype.getAriaRole = function () {
+	return goog.a11y.aria.Role.MENU_ITEM
+};
+goog.ui.MenuItemRenderer.prototype.createDom = function (a) {
+	var b = a.getDomHelper().createDom("DIV", this.getClassNames(a).join(" "), this.createContent(a.getContent(), a.getDomHelper()));
+	this.setEnableCheckBoxStructure(a, b, a.isSupportedState(goog.ui.Component.State.SELECTED) || a.isSupportedState(goog.ui.Component.State.CHECKED));
+	return b
+};
+goog.ui.MenuItemRenderer.prototype.getContentElement = function (a) {
+	return a && a.firstChild
+};
+goog.ui.MenuItemRenderer.prototype.decorate = function (a, b) {
+	goog.asserts.assert(b);
+	this.hasContentStructure(b) || b.appendChild(this.createContent(b.childNodes, a.getDomHelper()));
+	goog.dom.classlist.contains(b, "goog-option") && (a.setCheckable(!0), this.setCheckable(a, b, !0));
+	return goog.ui.MenuItemRenderer.superClass_.decorate.call(this, a, b)
+};
+goog.ui.MenuItemRenderer.prototype.setContent = function (a, b) {
+	var c = this.getContentElement(a),
+		d = this.hasCheckBoxStructure(a) ? c.firstChild : null;
+	goog.ui.MenuItemRenderer.superClass_.setContent.call(this, a, b);
+	d && !this.hasCheckBoxStructure(a) && c.insertBefore(d, c.firstChild || null)
+};
+goog.ui.MenuItemRenderer.prototype.hasContentStructure = function (a) {
+	a = goog.dom.getFirstElementChild(a);
+	var b = this.getCompositeCssClass_(goog.ui.MenuItemRenderer.CompositeCssClassIndex_.CONTENT);
+	return !!a && goog.dom.classlist.contains(a, b)
+};
+goog.ui.MenuItemRenderer.prototype.createContent = function (a, b) {
+	var c = this.getCompositeCssClass_(goog.ui.MenuItemRenderer.CompositeCssClassIndex_.CONTENT);
+	return b.createDom("DIV", c, a)
+};
+goog.ui.MenuItemRenderer.prototype.setSelectable = function (a, b, c) {
+	a && b && this.setEnableCheckBoxStructure(a, b, c)
+};
+goog.ui.MenuItemRenderer.prototype.setCheckable = function (a, b, c) {
+	a && b && this.setEnableCheckBoxStructure(a, b, c)
+};
+goog.ui.MenuItemRenderer.prototype.hasCheckBoxStructure = function (a) {
+	if (a = this.getContentElement(a)) {
+		a = a.firstChild;
+		var b = this.getCompositeCssClass_(goog.ui.MenuItemRenderer.CompositeCssClassIndex_.CHECKBOX);
+		return !!a && goog.dom.isElement(a) && goog.dom.classlist.contains(a, b)
+	}
+	return !1
+};
+goog.ui.MenuItemRenderer.prototype.setEnableCheckBoxStructure = function (a, b, c) {
+	this.setAriaRole(b, a.getPreferredAriaRole());
+	this.setAriaStates(a, b);
+	c != this.hasCheckBoxStructure(b) && (goog.dom.classlist.enable(b, "goog-option", c), b = this.getContentElement(b), c ? (c = this.getCompositeCssClass_(goog.ui.MenuItemRenderer.CompositeCssClassIndex_.CHECKBOX), b.insertBefore(a.getDomHelper().createDom("DIV", c), b.firstChild || null)) : b.removeChild(b.firstChild))
+};
+goog.ui.MenuItemRenderer.prototype.getClassForState = function (a) {
+	switch (a) {
+		case goog.ui.Component.State.HOVER:
+			return this.getCompositeCssClass_(goog.ui.MenuItemRenderer.CompositeCssClassIndex_.HOVER);
+		case goog.ui.Component.State.CHECKED:
+		case goog.ui.Component.State.SELECTED:
+			return "goog-option-selected";
+		default:
+			return goog.ui.MenuItemRenderer.superClass_.getClassForState.call(this, a)
+	}
+};
+goog.ui.MenuItemRenderer.prototype.getStateFromClass = function (a) {
+	var b = this.getCompositeCssClass_(goog.ui.MenuItemRenderer.CompositeCssClassIndex_.HOVER);
+	switch (a) {
+		case "goog-option-selected":
+			return goog.ui.Component.State.CHECKED;
+		case b:
+			return goog.ui.Component.State.HOVER;
+		default:
+			return goog.ui.MenuItemRenderer.superClass_.getStateFromClass.call(this, a)
+	}
+};
+goog.ui.MenuItemRenderer.prototype.getCssClass = function () {
+	return goog.ui.MenuItemRenderer.CSS_CLASS
+};
+goog.ui.MenuItem = function (a, b, c, d) {
+	goog.ui.Control.call(this, a, d || goog.ui.MenuItemRenderer.getInstance(), c);
+	this.setValue(b)
+};
+goog.inherits(goog.ui.MenuItem, goog.ui.Control);
+goog.tagUnsealableClass(goog.ui.MenuItem);
+goog.ui.MenuItem.MNEMONIC_WRAPPER_CLASS_ = "goog-menuitem-mnemonic-separator";
+goog.ui.MenuItem.ACCELERATOR_CLASS = "goog-menuitem-accel";
+goog.ui.MenuItem.prototype.getValue = function () {
+	var a = this.getModel();
+	return null != a ? a : this.getCaption()
+};
+goog.ui.MenuItem.prototype.setValue = function (a) {
+	this.setModel(a)
+};
+goog.ui.MenuItem.prototype.setSupportedState = function (a, b) {
+	goog.ui.MenuItem.superClass_.setSupportedState.call(this, a, b);
+	switch (a) {
+		case goog.ui.Component.State.SELECTED:
+			this.setSelectableInternal_(b);
+			break;
+		case goog.ui.Component.State.CHECKED:
+			this.setCheckableInternal_(b)
+	}
+};
+goog.ui.MenuItem.prototype.setSelectable = function (a) {
+	this.setSupportedState(goog.ui.Component.State.SELECTED, a)
+};
+goog.ui.MenuItem.prototype.setSelectableInternal_ = function (a) {
+	this.isChecked() && !a && this.setChecked(!1);
+	var b = this.getElement();
+	b && this.getRenderer().setSelectable(this, b, a)
+};
+goog.ui.MenuItem.prototype.setCheckable = function (a) {
+	this.setSupportedState(goog.ui.Component.State.CHECKED, a)
+};
+goog.ui.MenuItem.prototype.setCheckableInternal_ = function (a) {
+	var b = this.getElement();
+	b && this.getRenderer().setCheckable(this, b, a)
+};
+goog.ui.MenuItem.prototype.getCaption = function () {
+	var a = this.getContent();
+	if (goog.isArray(a)) {
+		var b = goog.ui.MenuItem.ACCELERATOR_CLASS,
+			c = goog.ui.MenuItem.MNEMONIC_WRAPPER_CLASS_,
+			a = goog.array.map(a, function (a) {
+            	return goog.dom.isElement(a) && (goog.dom.classlist.contains(a, b) || goog.dom.classlist.contains(a, c)) ? "" : goog.dom.getRawTextContent(a)
+			}).join("");
+		return goog.string.collapseBreakingSpaces(a)
+	}
+	return goog.ui.MenuItem.superClass_.getCaption.call(this)
+};
+goog.ui.MenuItem.prototype.getAccelerator = function () {
+	var a = this.getDomHelper(),
+		b = this.getContent();
+	return goog.isArray(b) && (b = goog.array.find(b, function (a) {
+		return goog.dom.classlist.contains(a, goog.ui.MenuItem.ACCELERATOR_CLASS)
+	})) ? a.getTextContent(b) : null
+};
+goog.ui.MenuItem.prototype.handleMouseUp = function (a) {
+	var b = this.getParent();
+	if (b) {
+		var c = b.openingCoords;
+		b.openingCoords = null;
+		if (c && goog.isNumber(a.clientX) && (b = new goog.math.Coordinate(a.clientX, a.clientY), goog.math.Coordinate.equals(c, b))) return
+	}
+	goog.ui.MenuItem.superClass_.handleMouseUp.call(this, a)
+};
+goog.ui.MenuItem.prototype.handleKeyEventInternal = function (a) {
+	return a.keyCode == this.getMnemonic() && this.performActionInternal(a) ? !0 : goog.ui.MenuItem.superClass_.handleKeyEventInternal.call(this, a)
+};
+goog.ui.MenuItem.prototype.setMnemonic = function (a) {
+	this.mnemonicKey_ = a
+};
+goog.ui.MenuItem.prototype.getMnemonic = function () {
+	return this.mnemonicKey_
+};
+goog.ui.registry.setDecoratorByClassName(goog.ui.MenuItemRenderer.CSS_CLASS, function () {
+	return new goog.ui.MenuItem(null)
+});
+goog.ui.MenuItem.prototype.getPreferredAriaRole = function () {
+	return this.isSupportedState(goog.ui.Component.State.CHECKED) ? goog.a11y.aria.Role.MENU_ITEM_CHECKBOX : this.isSupportedState(goog.ui.Component.State.SELECTED) ? goog.a11y.aria.Role.MENU_ITEM_RADIO : goog.ui.MenuItem.superClass_.getPreferredAriaRole.call(this)
+};
+goog.ui.MenuItem.prototype.getParent = function () {
+	return goog.ui.Control.prototype.getParent.call(this)
+};
+goog.ui.MenuItem.prototype.getParentEventTarget = function () {
+	return goog.ui.Control.prototype.getParentEventTarget.call(this)
+};
+goog.ui.MenuSeparatorRenderer = function () {
+	goog.ui.ControlRenderer.call(this)
+};
+goog.inherits(goog.ui.MenuSeparatorRenderer, goog.ui.ControlRenderer);
+goog.addSingletonGetter(goog.ui.MenuSeparatorRenderer);
+goog.ui.MenuSeparatorRenderer.CSS_CLASS = "goog-menuseparator";
+goog.ui.MenuSeparatorRenderer.prototype.createDom = function (a) {
+	return a.getDomHelper().createDom("DIV", this.getCssClass())
+};
+goog.ui.MenuSeparatorRenderer.prototype.decorate = function (a, b) {
+	b.id && a.setId(b.id);
+	if ("HR" == b.tagName) {
+		var c = b;
+		b = this.createDom(a);
+		goog.dom.insertSiblingBefore(b, c);
+		goog.dom.removeNode(c)
+	} else goog.dom.classlist.add(b, this.getCssClass());
+	return b
+};
+goog.ui.MenuSeparatorRenderer.prototype.setContent = function (a, b) { };
+goog.ui.MenuSeparatorRenderer.prototype.getCssClass = function () {
+	return goog.ui.MenuSeparatorRenderer.CSS_CLASS
+};
+goog.ui.Separator = function (a, b) {
+	goog.ui.Control.call(this, null, a || goog.ui.MenuSeparatorRenderer.getInstance(), b);
+	this.setSupportedState(goog.ui.Component.State.DISABLED, !1);
+	this.setSupportedState(goog.ui.Component.State.HOVER, !1);
+	this.setSupportedState(goog.ui.Component.State.ACTIVE, !1);
+	this.setSupportedState(goog.ui.Component.State.FOCUSED, !1);
+	this.setStateInternal(goog.ui.Component.State.DISABLED)
+};
+goog.inherits(goog.ui.Separator, goog.ui.Control);
+goog.ui.Separator.prototype.enterDocument = function () {
+	goog.ui.Separator.superClass_.enterDocument.call(this);
+	var a = this.getElement();
+	goog.asserts.assert(a, "The DOM element for the separator cannot be null.");
+	goog.a11y.aria.setRole(a, "separator")
+};
+goog.ui.registry.setDecoratorByClassName(goog.ui.MenuSeparatorRenderer.CSS_CLASS, function () {
+	return new goog.ui.Separator
+});
+goog.ui.MenuRenderer = function (a) {
+	goog.ui.ContainerRenderer.call(this, a || goog.a11y.aria.Role.MENU)
+};
+goog.inherits(goog.ui.MenuRenderer, goog.ui.ContainerRenderer);
+goog.addSingletonGetter(goog.ui.MenuRenderer);
+goog.ui.MenuRenderer.CSS_CLASS = "goog-menu";
+goog.ui.MenuRenderer.prototype.canDecorate = function (a) {
+	return "UL" == a.tagName || goog.ui.MenuRenderer.superClass_.canDecorate.call(this, a)
+};
+goog.ui.MenuRenderer.prototype.getDecoratorForChild = function (a) {
+	return "HR" == a.tagName ? new goog.ui.Separator : goog.ui.MenuRenderer.superClass_.getDecoratorForChild.call(this, a)
+};
+goog.ui.MenuRenderer.prototype.containsElement = function (a, b) {
+	return goog.dom.contains(a.getElement(), b)
+};
+goog.ui.MenuRenderer.prototype.getCssClass = function () {
+	return goog.ui.MenuRenderer.CSS_CLASS
+};
+goog.ui.MenuRenderer.prototype.initializeDom = function (a) {
+	goog.ui.MenuRenderer.superClass_.initializeDom.call(this, a);
+	a = a.getElement();
+	goog.asserts.assert(a, "The menu DOM element cannot be null.");
+	goog.a11y.aria.setState(a, goog.a11y.aria.State.HASPOPUP, "true")
+};
+goog.ui.MenuSeparator = function (a) {
+	goog.ui.Separator.call(this, goog.ui.MenuSeparatorRenderer.getInstance(), a)
+};
+goog.inherits(goog.ui.MenuSeparator, goog.ui.Separator);
+goog.ui.registry.setDecoratorByClassName(goog.ui.MenuSeparatorRenderer.CSS_CLASS, function () {
+	return new goog.ui.Separator
+});
+goog.ui.Menu = function (a, b) {
+	goog.ui.Container.call(this, goog.ui.Container.Orientation.VERTICAL, b || goog.ui.MenuRenderer.getInstance(), a);
+	this.setFocusable(!1)
+};
+goog.inherits(goog.ui.Menu, goog.ui.Container);
+goog.tagUnsealableClass(goog.ui.Menu);
+goog.ui.Menu.EventType = {
+	BEFORE_SHOW: goog.ui.Component.EventType.BEFORE_SHOW,
+	SHOW: goog.ui.Component.EventType.SHOW,
+	BEFORE_HIDE: goog.ui.Component.EventType.HIDE,
+	HIDE: goog.ui.Component.EventType.HIDE
+};
+goog.ui.Menu.CSS_CLASS = goog.ui.MenuRenderer.CSS_CLASS;
+goog.ui.Menu.prototype.allowAutoFocus_ = !0;
+goog.ui.Menu.prototype.allowHighlightDisabled_ = !1;
+goog.ui.Menu.prototype.getCssClass = function () {
+	return this.getRenderer().getCssClass()
+};
+goog.ui.Menu.prototype.containsElement = function (a) {
+	if (this.getRenderer().containsElement(this, a)) return !0;
+	for (var b = 0, c = this.getChildCount() ; b < c; b++) {
+		var d = this.getChildAt(b);
+		if ("function" == typeof d.containsElement && d.containsElement(a)) return !0
+	}
+	return !1
+};
+goog.ui.Menu.prototype.addItem = function (a) {
+	this.addChild(a, !0)
+};
+goog.ui.Menu.prototype.addItemAt = function (a, b) {
+	this.addChildAt(a, b, !0)
+};
+goog.ui.Menu.prototype.removeItem = function (a) {
+	(a = this.removeChild(a, !0)) && a.dispose()
+};
+goog.ui.Menu.prototype.removeItemAt = function (a) {
+	(a = this.removeChildAt(a, !0)) && a.dispose()
+};
+goog.ui.Menu.prototype.getItemAt = function (a) {
+	return this.getChildAt(a)
+};
+goog.ui.Menu.prototype.getItemCount = function () {
+	return this.getChildCount()
+};
+goog.ui.Menu.prototype.getItems = function () {
+	var a = [];
+	this.forEachChild(function (b) {
+		a.push(b)
+	});
+	return a
+};
+goog.ui.Menu.prototype.setPosition = function (a, b) {
+	var c = this.isVisible();
+	c || goog.style.setElementShown(this.getElement(), !0);
+	goog.style.setPageOffset(this.getElement(), a, b);
+	c || goog.style.setElementShown(this.getElement(), !1)
+};
+goog.ui.Menu.prototype.getPosition = function () {
+	return this.isVisible() ? goog.style.getPageOffset(this.getElement()) : null
+};
+goog.ui.Menu.prototype.setAllowAutoFocus = function (a) {
+	(this.allowAutoFocus_ = a) && this.setFocusable(!0)
+};
+goog.ui.Menu.prototype.getAllowAutoFocus = function () {
+	return this.allowAutoFocus_
+};
+goog.ui.Menu.prototype.setAllowHighlightDisabled = function (a) {
+	this.allowHighlightDisabled_ = a
+};
+goog.ui.Menu.prototype.getAllowHighlightDisabled = function () {
+	return this.allowHighlightDisabled_
+};
+goog.ui.Menu.prototype.setVisible = function (a, b, c) {
+	(b = goog.ui.Menu.superClass_.setVisible.call(this, a, b)) && a && this.isInDocument() && this.allowAutoFocus_ && this.getKeyEventTarget().focus();
+	a && c && goog.isNumber(c.clientX) ? this.openingCoords = new goog.math.Coordinate(c.clientX, c.clientY) : this.openingCoords = null;
+	return b
+};
+goog.ui.Menu.prototype.handleEnterItem = function (a) {
+	this.allowAutoFocus_ && this.getKeyEventTarget().focus();
+	return goog.ui.Menu.superClass_.handleEnterItem.call(this, a)
+};
+goog.ui.Menu.prototype.highlightNextPrefix = function (a) {
+	var b = new RegExp("^" + goog.string.regExpEscape(a), "i");
+	return this.highlightHelper(function (a, d) {
+		var c = 0 > a ? 0 : a,
+			f = !1;
+		do {
+			++a;
+			a == d && (a = 0, f = !0);
+			var g = this.getChildAt(a).getCaption();
+			if (g && g.match(b)) return a
+		} while (!f || a != c);
+		return this.getHighlightedIndex()
+	}, this.getHighlightedIndex())
+};
+goog.ui.Menu.prototype.canHighlightItem = function (a) {
+	return (this.allowHighlightDisabled_ || a.isEnabled()) && a.isVisible() && a.isSupportedState(goog.ui.Component.State.HOVER)
+};
+goog.ui.Menu.prototype.decorateInternal = function (a) {
+	this.decorateContent(a);
+	goog.ui.Menu.superClass_.decorateInternal.call(this, a)
+};
+goog.ui.Menu.prototype.handleKeyEventInternal = function (a) {
+	var b = goog.ui.Menu.superClass_.handleKeyEventInternal.call(this, a);
+	b || this.forEachChild(function (c) {
+		!b && c.getMnemonic && c.getMnemonic() == a.keyCode && (this.isEnabled() && this.setHighlighted(c), b = c.handleKeyEvent(a))
+	}, this);
+	return b
+};
+goog.ui.Menu.prototype.setHighlightedIndex = function (a) {
+	goog.ui.Menu.superClass_.setHighlightedIndex.call(this, a);
+	(a = this.getChildAt(a)) && goog.style.scrollIntoContainerView(a.getElement(), this.getElement())
+};
+goog.ui.Menu.prototype.decorateContent = function (a) {
+	var b = this.getRenderer();
+	a = this.getDomHelper().getElementsByTagNameAndClass("DIV", b.getCssClass() + "-content", a);
+	for (var c = a.length, d = 0; d < c; d++) b.decorateChildren(this, a[d])
+};
+goog.color = {};
+goog.color.names = {
+	aliceblue: "#f0f8ff",
+	antiquewhite: "#faebd7",
+	aqua: "#00ffff",
+	aquamarine: "#7fffd4",
+	azure: "#f0ffff",
+	beige: "#f5f5dc",
+	bisque: "#ffe4c4",
+	black: "#000000",
+	blanchedalmond: "#ffebcd",
+	blue: "#0000ff",
+	blueviolet: "#8a2be2",
+	brown: "#a52a2a",
+	burlywood: "#deb887",
+	cadetblue: "#5f9ea0",
+	chartreuse: "#7fff00",
+	chocolate: "#d2691e",
+	coral: "#ff7f50",
+	cornflowerblue: "#6495ed",
+	cornsilk: "#fff8dc",
+	crimson: "#dc143c",
+	cyan: "#00ffff",
+	darkblue: "#00008b",
+	darkcyan: "#008b8b",
+	darkgoldenrod: "#b8860b",
+	darkgray: "#a9a9a9",
+	darkgreen: "#006400",
+	darkgrey: "#a9a9a9",
+	darkkhaki: "#bdb76b",
+	darkmagenta: "#8b008b",
+	darkolivegreen: "#556b2f",
+	darkorange: "#ff8c00",
+	darkorchid: "#9932cc",
+	darkred: "#8b0000",
+	darksalmon: "#e9967a",
+	darkseagreen: "#8fbc8f",
+	darkslateblue: "#483d8b",
+	darkslategray: "#2f4f4f",
+	darkslategrey: "#2f4f4f",
+	darkturquoise: "#00ced1",
+	darkviolet: "#9400d3",
+	deeppink: "#ff1493",
+	deepskyblue: "#00bfff",
+	dimgray: "#696969",
+	dimgrey: "#696969",
+	dodgerblue: "#1e90ff",
+	firebrick: "#b22222",
+	floralwhite: "#fffaf0",
+	forestgreen: "#228b22",
+	fuchsia: "#ff00ff",
+	gainsboro: "#dcdcdc",
+	ghostwhite: "#f8f8ff",
+	gold: "#ffd700",
+	goldenrod: "#daa520",
+	gray: "#808080",
+	green: "#008000",
+	greenyellow: "#adff2f",
+	grey: "#808080",
+	honeydew: "#f0fff0",
+	hotpink: "#ff69b4",
+	indianred: "#cd5c5c",
+	indigo: "#4b0082",
+	ivory: "#fffff0",
+	khaki: "#f0e68c",
+	lavender: "#e6e6fa",
+	lavenderblush: "#fff0f5",
+	lawngreen: "#7cfc00",
+	lemonchiffon: "#fffacd",
+	lightblue: "#add8e6",
+	lightcoral: "#f08080",
+	lightcyan: "#e0ffff",
+	lightgoldenrodyellow: "#fafad2",
+	lightgray: "#d3d3d3",
+	lightgreen: "#90ee90",
+	lightgrey: "#d3d3d3",
+	lightpink: "#ffb6c1",
+	lightsalmon: "#ffa07a",
+	lightseagreen: "#20b2aa",
+	lightskyblue: "#87cefa",
+	lightslategray: "#778899",
+	lightslategrey: "#778899",
+	lightsteelblue: "#b0c4de",
+	lightyellow: "#ffffe0",
+	lime: "#00ff00",
+	limegreen: "#32cd32",
+	linen: "#faf0e6",
+	magenta: "#ff00ff",
+	maroon: "#800000",
+	mediumaquamarine: "#66cdaa",
+	mediumblue: "#0000cd",
+	mediumorchid: "#ba55d3",
+	mediumpurple: "#9370db",
+	mediumseagreen: "#3cb371",
+	mediumslateblue: "#7b68ee",
+	mediumspringgreen: "#00fa9a",
+	mediumturquoise: "#48d1cc",
+	mediumvioletred: "#c71585",
+	midnightblue: "#191970",
+	mintcream: "#f5fffa",
+	mistyrose: "#ffe4e1",
+	moccasin: "#ffe4b5",
+	navajowhite: "#ffdead",
+	navy: "#000080",
+	oldlace: "#fdf5e6",
+	olive: "#808000",
+	olivedrab: "#6b8e23",
+	orange: "#ffa500",
+	orangered: "#ff4500",
+	orchid: "#da70d6",
+	palegoldenrod: "#eee8aa",
+	palegreen: "#98fb98",
+	paleturquoise: "#afeeee",
+	palevioletred: "#db7093",
+	papayawhip: "#ffefd5",
+	peachpuff: "#ffdab9",
+	peru: "#cd853f",
+	pink: "#ffc0cb",
+	plum: "#dda0dd",
+	powderblue: "#b0e0e6",
+	purple: "#800080",
+	red: "#ff0000",
+	rosybrown: "#bc8f8f",
+	royalblue: "#4169e1",
+	saddlebrown: "#8b4513",
+	salmon: "#fa8072",
+	sandybrown: "#f4a460",
+	seagreen: "#2e8b57",
+	seashell: "#fff5ee",
+	sienna: "#a0522d",
+	silver: "#c0c0c0",
+	skyblue: "#87ceeb",
+	slateblue: "#6a5acd",
+	slategray: "#708090",
+	slategrey: "#708090",
+	snow: "#fffafa",
+	springgreen: "#00ff7f",
+	steelblue: "#4682b4",
+	tan: "#d2b48c",
+	teal: "#008080",
+	thistle: "#d8bfd8",
+	tomato: "#ff6347",
+	turquoise: "#40e0d0",
+	violet: "#ee82ee",
+	wheat: "#f5deb3",
+	white: "#ffffff",
+	whitesmoke: "#f5f5f5",
+	yellow: "#ffff00",
+	yellowgreen: "#9acd32"
+};
+goog.color.parse = function (a) {
+	var b = {};
+	a = String(a);
+	var c = goog.color.prependHashIfNecessaryHelper(a);
+	if (goog.color.isValidHexColor_(c)) return b.hex = goog.color.normalizeHex(c), b.type = "hex", b;
+	c = goog.color.isValidRgbColor_(a);
+	if (c.length) return b.hex = goog.color.rgbArrayToHex(c), b.type = "rgb", b;
+	if (goog.color.names && (c = goog.color.names[a.toLowerCase()])) return b.hex = c, b.type = "named", b;
+	throw Error(a + " is not a valid color string");
+};
+goog.color.isValidColor = function (a) {
+	var b = goog.color.prependHashIfNecessaryHelper(a);
+	return !!(goog.color.isValidHexColor_(b) || goog.color.isValidRgbColor_(a).length || goog.color.names && goog.color.names[a.toLowerCase()])
+};
+goog.color.parseRgb = function (a) {
+	var b = goog.color.isValidRgbColor_(a);
+	if (!b.length) throw Error(a + " is not a valid RGB color");
+	return b
+};
+goog.color.hexToRgbStyle = function (a) {
+	return goog.color.rgbStyle_(goog.color.hexToRgb(a))
+};
+goog.color.hexTripletRe_ = /#(.)(.)(.)/;
+goog.color.normalizeHex = function (a) {
+	if (!goog.color.isValidHexColor_(a)) throw Error("'" + a + "' is not a valid hex color");
+	4 == a.length && (a = a.replace(goog.color.hexTripletRe_, "#$1$1$2$2$3$3"));
+	return a.toLowerCase()
+};
+goog.color.hexToRgb = function (a) {
+	a = goog.color.normalizeHex(a);
+	var b = parseInt(a.substr(1, 2), 16),
+		c = parseInt(a.substr(3, 2), 16);
+	a = parseInt(a.substr(5, 2), 16);
+	return [b, c, a]
+};
+goog.color.rgbToHex = function (a, b, c) {
+	a = Number(a);
+	b = Number(b);
+	c = Number(c);
+	if (a != (a & 255) || b != (b & 255) || c != (c & 255)) throw Error('"(' + a + "," + b + "," + c + '") is not a valid RGB color');
+	a = goog.color.prependZeroIfNecessaryHelper(a.toString(16));
+	b = goog.color.prependZeroIfNecessaryHelper(b.toString(16));
+	c = goog.color.prependZeroIfNecessaryHelper(c.toString(16));
+	return "#" + a + b + c
+};
+goog.color.rgbArrayToHex = function (a) {
+	return goog.color.rgbToHex(a[0], a[1], a[2])
+};
+goog.color.rgbToHsl = function (a, b, c) {
+	a /= 255;
+	b /= 255;
+	c /= 255;
+	var d = Math.max(a, b, c),
+		e = Math.min(a, b, c),
+		f = 0,
+		g = 0,
+		h = .5 * (d + e);
+	d != e && (d == a ? f = 60 * (b - c) / (d - e) : d == b ? f = 60 * (c - a) / (d - e) + 120 : d == c && (f = 60 * (a - b) / (d - e) + 240), g = 0 < h && .5 >= h ? (d - e) / (2 * h) : (d - e) / (2 - 2 * h));
+	return [Math.round(f + 360) % 360, g, h]
+};
+goog.color.rgbArrayToHsl = function (a) {
+	return goog.color.rgbToHsl(a[0], a[1], a[2])
+};
+goog.color.hueToRgb_ = function (a, b, c) {
+	0 > c ? c += 1 : 1 < c && --c;
+	return 1 > 6 * c ? a + 6 * (b - a) * c : 1 > 2 * c ? b : 2 > 3 * c ? a + (b - a) * (2 / 3 - c) * 6 : a
+};
+goog.color.hslToRgb = function (a, b, c) {
+	a /= 360;
+	if (0 == b) c = b = a = 255 * c;
+	else {
+		var d, e;
+		e = .5 > c ? c * (1 + b) : c + b - b * c;
+		d = 2 * c - e;
+		c = 255 * goog.color.hueToRgb_(d, e, a + 1 / 3);
+		b = 255 * goog.color.hueToRgb_(d, e, a);
+		a = 255 * goog.color.hueToRgb_(d, e, a - 1 / 3)
+	}
+	return [Math.round(c), Math.round(b), Math.round(a)]
+};
+goog.color.hslArrayToRgb = function (a) {
+	return goog.color.hslToRgb(a[0], a[1], a[2])
+};
+goog.color.validHexColorRe_ = /^#(?:[0-9a-f]{3}){1,2}$/i;
+goog.color.isValidHexColor_ = function (a) {
+	return goog.color.validHexColorRe_.test(a)
+};
+goog.color.normalizedHexColorRe_ = /^#[0-9a-f]{6}$/;
+goog.color.isNormalizedHexColor_ = function (a) {
+	return goog.color.normalizedHexColorRe_.test(a)
+};
+goog.color.rgbColorRe_ = /^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;
+goog.color.isValidRgbColor_ = function (a) {
+	var b = a.match(goog.color.rgbColorRe_);
+	if (b) {
+		a = Number(b[1]);
+		var c = Number(b[2]),
+			b = Number(b[3]);
+		if (0 <= a && 255 >= a && 0 <= c && 255 >= c && 0 <= b && 255 >= b) return [a, c, b]
+	}
+	return []
+};
+goog.color.prependZeroIfNecessaryHelper = function (a) {
+	return 1 == a.length ? "0" + a : a
+};
+goog.color.prependHashIfNecessaryHelper = function (a) {
+	return "#" == a.charAt(0) ? a : "#" + a
+};
+goog.color.rgbStyle_ = function (a) {
+	return "rgb(" + a.join(",") + ")"
+};
+goog.color.hsvToRgb = function (a, b, c) {
+	var d = 0,
+		e = 0,
+		f = 0;
+	if (0 == b) f = e = d = c;
+	else {
+		var g = Math.floor(a / 60),
+			h = a / 60 - g;
+		a = c * (1 - b);
+		var k = c * (1 - b * h);
+		b = c * (1 - b * (1 - h));
+		switch (g) {
+			case 1:
+				d = k;
+				e = c;
+				f = a;
+				break;
+			case 2:
+				d = a;
+				e = c;
+				f = b;
+				break;
+			case 3:
+				d = a;
+				e = k;
+				f = c;
+				break;
+			case 4:
+				d = b;
+				e = a;
+				f = c;
+				break;
+			case 5:
+				d = c;
+				e = a;
+				f = k;
+				break;
+			case 6:
+			case 0:
+				d = c, e = b, f = a
+		}
+	}
+	return [Math.floor(d), Math.floor(e), Math.floor(f)]
+};
+goog.color.rgbToHsv = function (a, b, c) {
+	var d = Math.max(Math.max(a, b), c),
+		e = Math.min(Math.min(a, b), c);
+	if (e == d) e = a = 0;
+	else {
+		var f = d - e,
+			e = f / d;
+		a = 60 * (a == d ? (b - c) / f : b == d ? 2 + (c - a) / f : 4 + (a - b) / f);
+		0 > a && (a += 360);
+		360 < a && (a -= 360)
+	}
+	return [a, e, d]
+};
+goog.color.rgbArrayToHsv = function (a) {
+	return goog.color.rgbToHsv(a[0], a[1], a[2])
+};
+goog.color.hsvArrayToRgb = function (a) {
+	return goog.color.hsvToRgb(a[0], a[1], a[2])
+};
+goog.color.hexToHsl = function (a) {
+	a = goog.color.hexToRgb(a);
+	return goog.color.rgbToHsl(a[0], a[1], a[2])
+};
+goog.color.hslToHex = function (a, b, c) {
+	return goog.color.rgbArrayToHex(goog.color.hslToRgb(a, b, c))
+};
+goog.color.hslArrayToHex = function (a) {
+	return goog.color.rgbArrayToHex(goog.color.hslToRgb(a[0], a[1], a[2]))
+};
+goog.color.hexToHsv = function (a) {
+	return goog.color.rgbArrayToHsv(goog.color.hexToRgb(a))
+};
+goog.color.hsvToHex = function (a, b, c) {
+	return goog.color.rgbArrayToHex(goog.color.hsvToRgb(a, b, c))
+};
+goog.color.hsvArrayToHex = function (a) {
+	return goog.color.hsvToHex(a[0], a[1], a[2])
+};
+goog.color.hslDistance = function (a, b) {
+	var c, d;
+	c = .5 >= a[2] ? a[1] * a[2] : a[1] * (1 - a[2]);
+	d = .5 >= b[2] ? b[1] * b[2] : b[1] * (1 - b[2]);
+	return (a[2] - b[2]) * (a[2] - b[2]) + c * c + d * d - 2 * c * d * Math.cos(2 * (a[0] / 360 - b[0] / 360) * Math.PI)
+};
+goog.color.blend = function (a, b, c) {
+	c = goog.math.clamp(c, 0, 1);
+	return [Math.round(c * a[0] + (1 - c) * b[0]), Math.round(c * a[1] + (1 - c) * b[1]), Math.round(c * a[2] + (1 - c) * b[2])]
+};
+goog.color.darken = function (a, b) {
+	return goog.color.blend([0, 0, 0], a, b)
+};
+goog.color.lighten = function (a, b) {
+	return goog.color.blend([255, 255, 255], a, b)
+};
+goog.color.highContrast = function (a, b) {
+	for (var c = [], d = 0; d < b.length; d++) c.push({
+		color: b[d],
+		diff: goog.color.yiqBrightnessDiff_(b[d], a) + goog.color.colorDiff_(b[d], a)
+	});
+	c.sort(function (a, b) {
+		return b.diff - a.diff
+	});
+	return c[0].color
+};
+goog.color.yiqBrightness_ = function (a) {
+	return Math.round((299 * a[0] + 587 * a[1] + 114 * a[2]) / 1E3)
+};
+goog.color.yiqBrightnessDiff_ = function (a, b) {
+	return Math.abs(goog.color.yiqBrightness_(a) - goog.color.yiqBrightness_(b))
+};
+goog.color.colorDiff_ = function (a, b) {
+	return Math.abs(a[0] - b[0]) + Math.abs(a[1] - b[1]) + Math.abs(a[2] - b[2])
+};
+goog.iter = {};
+goog.iter.StopIteration = "StopIteration" in goog.global ? goog.global.StopIteration : {
+	message: "StopIteration",
+	stack: ""
+};
+goog.iter.Iterator = function () { };
+goog.iter.Iterator.prototype.next = function () {
+	throw goog.iter.StopIteration;
+};
+goog.iter.Iterator.prototype.__iterator__ = function (a) {
+	return this
+};
+goog.iter.toIterator = function (a) {
+	if (a instanceof goog.iter.Iterator) return a;
+	if ("function" == typeof a.__iterator__) return a.__iterator__(!1);
+	if (goog.isArrayLike(a)) {
+		var b = 0,
+			c = new goog.iter.Iterator;
+		c.next = function () {
+			for (; ;) {
+				if (b >= a.length) throw goog.iter.StopIteration;
+				if (b in a) return a[b++];
+				b++
+			}
+		};
+		return c
+	}
+	throw Error("Not implemented");
+};
+goog.iter.forEach = function (a, b, c) {
+	if (goog.isArrayLike(a)) try {
+		goog.array.forEach(a, b, c)
+	} catch (d) {
+		if (d !== goog.iter.StopIteration) throw d;
+	} else {
+		a = goog.iter.toIterator(a);
+		try {
+			for (; ;) b.call(c, a.next(), void 0, a)
+		} catch (d) {
+			if (d !== goog.iter.StopIteration) throw d;
+		}
+	}
+};
+goog.iter.filter = function (a, b, c) {
+	var d = goog.iter.toIterator(a);
+	a = new goog.iter.Iterator;
+	a.next = function () {
+		for (; ;) {
+			var a = d.next();
+			if (b.call(c, a, void 0, d)) return a
+		}
+	};
+	return a
+};
+goog.iter.filterFalse = function (a, b, c) {
+	return goog.iter.filter(a, goog.functions.not(b), c)
+};
+goog.iter.range = function (a, b, c) {
+	var d = 0,
+		e = a,
+		f = c || 1;
+	1 < arguments.length && (d = a, e = b);
+	if (0 == f) throw Error("Range step argument must not be zero");
+	var g = new goog.iter.Iterator;
+	g.next = function () {
+		if (0 < f && d >= e || 0 > f && d <= e) throw goog.iter.StopIteration;
+		var a = d;
+		d += f;
+		return a
+	};
+	return g
+};
+goog.iter.join = function (a, b) {
+	return goog.iter.toArray(a).join(b)
+};
+goog.iter.map = function (a, b, c) {
+	var d = goog.iter.toIterator(a);
+	a = new goog.iter.Iterator;
+	a.next = function () {
+		var a = d.next();
+		return b.call(c, a, void 0, d)
+	};
+	return a
+};
+goog.iter.reduce = function (a, b, c, d) {
+	var e = c;
+	goog.iter.forEach(a, function (a) {
+		e = b.call(d, e, a)
+	});
+	return e
+};
+goog.iter.some = function (a, b, c) {
+	a = goog.iter.toIterator(a);
+	try {
+		for (; ;)
+			if (b.call(c, a.next(), void 0, a)) return !0
+	} catch (d) {
+		if (d !== goog.iter.StopIteration) throw d;
+	}
+	return !1
+};
+goog.iter.every = function (a, b, c) {
+	a = goog.iter.toIterator(a);
+	try {
+		for (; ;)
+			if (!b.call(c, a.next(), void 0, a)) return !1
+	} catch (d) {
+		if (d !== goog.iter.StopIteration) throw d;
+	}
+	return !0
+};
+goog.iter.chain = function (a) {
+	return goog.iter.chainFromIterable(arguments)
+};
+goog.iter.chainFromIterable = function (a) {
+	var b = goog.iter.toIterator(a);
+	a = new goog.iter.Iterator;
+	var c = null;
+	a.next = function () {
+		for (; ;) {
+			if (null == c) {
+				var a = b.next();
+				c = goog.iter.toIterator(a)
+			}
+			try {
+				return c.next()
+			} catch (e) {
+				if (e !== goog.iter.StopIteration) throw e;
+				c = null
+			}
+		}
+	};
+	return a
+};
+goog.iter.dropWhile = function (a, b, c) {
+	var d = goog.iter.toIterator(a);
+	a = new goog.iter.Iterator;
+	var e = !0;
+	a.next = function () {
+		for (; ;) {
+			var a = d.next();
+			if (!e || !b.call(c, a, void 0, d)) return e = !1, a
+		}
+	};
+	return a
+};
+goog.iter.takeWhile = function (a, b, c) {
+	var d = goog.iter.toIterator(a);
+	a = new goog.iter.Iterator;
+	a.next = function () {
+		var a = d.next();
+		if (b.call(c, a, void 0, d)) return a;
+		throw goog.iter.StopIteration;
+	};
+	return a
+};
+goog.iter.toArray = function (a) {
+	if (goog.isArrayLike(a)) return goog.array.toArray(a);
+	a = goog.iter.toIterator(a);
+	var b = [];
+	goog.iter.forEach(a, function (a) {
+		b.push(a)
+	});
+	return b
+};
+goog.iter.equals = function (a, b, c) {
+	a = goog.iter.zipLongest({}, a, b);
+	var d = c || goog.array.defaultCompareEquality;
+	return goog.iter.every(a, function (a) {
+		return d(a[0], a[1])
+	})
+};
+goog.iter.nextOrValue = function (a, b) {
+	try {
+		return goog.iter.toIterator(a).next()
+	} catch (c) {
+		if (c != goog.iter.StopIteration) throw c;
+		return b
+	}
+};
+goog.iter.product = function (a) {
+	if (goog.array.some(arguments, function (a) {
+			return !a.length
+	}) || !arguments.length) return new goog.iter.Iterator;
+	var b = new goog.iter.Iterator,
+		c = arguments,
+		d = goog.array.repeat(0, c.length);
+	b.next = function () {
+		if (d) {
+			for (var a = goog.array.map(d, function (a, b) {
+					return c[b][a]
+			}), b = d.length - 1; 0 <= b; b--) {
+				goog.asserts.assert(d);
+				if (d[b] < c[b].length - 1) {
+					d[b]++;
+					break
+				}
+				if (0 == b) {
+					d = null;
+					break
+				}
+				d[b] = 0
+			}
+			return a
+		}
+		throw goog.iter.StopIteration;
+	};
+	return b
+};
+goog.iter.cycle = function (a) {
+	var b = goog.iter.toIterator(a),
+		c = [],
+		d = 0;
+	a = new goog.iter.Iterator;
+	var e = !1;
+	a.next = function () {
+		var a = null;
+		if (!e) try {
+			return a = b.next(), c.push(a), a
+		} catch (g) {
+			if (g != goog.iter.StopIteration || goog.array.isEmpty(c)) throw g;
+			e = !0
+		}
+		a = c[d];
+		d = (d + 1) % c.length;
+		return a
+	};
+	return a
+};
+goog.iter.count = function (a, b) {
+	var c = a || 0,
+		d = goog.isDef(b) ? b : 1,
+		e = new goog.iter.Iterator;
+	e.next = function () {
+		var a = c;
+		c += d;
+		return a
+	};
+	return e
+};
+goog.iter.repeat = function (a) {
+	var b = new goog.iter.Iterator;
+	b.next = goog.functions.constant(a);
+	return b
+};
+goog.iter.accumulate = function (a) {
+	var b = goog.iter.toIterator(a),
+		c = 0;
+	a = new goog.iter.Iterator;
+	a.next = function () {
+		return c += b.next()
+	};
+	return a
+};
+goog.iter.zip = function (a) {
+	var b = arguments,
+		c = new goog.iter.Iterator;
+	if (0 < b.length) {
+		var d = goog.array.map(b, goog.iter.toIterator);
+		c.next = function () {
+			return goog.array.map(d, function (a) {
+				return a.next()
+			})
+		}
+	}
+	return c
+};
+goog.iter.zipLongest = function (a, b) {
+	var c = goog.array.slice(arguments, 1),
+		d = new goog.iter.Iterator;
+	if (0 < c.length) {
+		var e = goog.array.map(c, goog.iter.toIterator);
+		d.next = function () {
+			var b = !1,
+				c = goog.array.map(e, function (c) {
+                	var d;
+                	try {
+                		d = c.next(), b = !0
+                	} catch (m) {
+                		if (m !== goog.iter.StopIteration) throw m;
+                		d = a
+                	}
+                	return d
+				});
+			if (!b) throw goog.iter.StopIteration;
+			return c
+		}
+	}
+	return d
+};
+goog.iter.compress = function (a, b) {
+	var c = goog.iter.toIterator(b);
+	return goog.iter.filter(a, function () {
+		return !!c.next()
+	})
+};
+goog.iter.GroupByIterator_ = function (a, b) {
+	this.iterator = goog.iter.toIterator(a);
+	this.keyFunc = b || goog.functions.identity
+};
+goog.inherits(goog.iter.GroupByIterator_, goog.iter.Iterator);
+goog.iter.GroupByIterator_.prototype.next = function () {
+	for (; this.currentKey == this.targetKey;) this.currentValue = this.iterator.next(), this.currentKey = this.keyFunc(this.currentValue);
+	this.targetKey = this.currentKey;
+	return [this.currentKey, this.groupItems_(this.targetKey)]
+};
+goog.iter.GroupByIterator_.prototype.groupItems_ = function (a) {
+	for (var b = []; this.currentKey == a;) {
+		b.push(this.currentValue);
+		try {
+			this.currentValue = this.iterator.next()
+		} catch (c) {
+			if (c !== goog.iter.StopIteration) throw c;
+			break
+		}
+		this.currentKey = this.keyFunc(this.currentValue)
+	}
+	return b
+};
+goog.iter.groupBy = function (a, b) {
+	return new goog.iter.GroupByIterator_(a, b)
+};
+goog.iter.starMap = function (a, b, c) {
+	var d = goog.iter.toIterator(a);
+	a = new goog.iter.Iterator;
+	a.next = function () {
+		var a = goog.iter.toArray(d.next());
+		return b.apply(c, goog.array.concat(a, void 0, d))
+	};
+	return a
+};
+goog.iter.tee = function (a, b) {
+	var c = goog.iter.toIterator(a),
+		d = goog.isNumber(b) ? b : 2,
+		e = goog.array.map(goog.array.range(d), function () {
+        	return []
+		}),
+		f = function () {
+        	var a = c.next();
+        	goog.array.forEach(e, function (b) {
+        		b.push(a)
+        	})
+		};
+	return goog.array.map(e, function (a) {
+		var b = new goog.iter.Iterator;
+		b.next = function () {
+			goog.array.isEmpty(a) && f();
+			goog.asserts.assert(!goog.array.isEmpty(a));
+			return a.shift()
+		};
+		return b
+	})
+};
+goog.iter.enumerate = function (a, b) {
+	return goog.iter.zip(goog.iter.count(b), a)
+};
+goog.iter.limit = function (a, b) {
+	goog.asserts.assert(goog.math.isInt(b) && 0 <= b);
+	var c = goog.iter.toIterator(a),
+		d = new goog.iter.Iterator,
+		e = b;
+	d.next = function () {
+		if (0 < e--) return c.next();
+		throw goog.iter.StopIteration;
+	};
+	return d
+};
+goog.iter.consume = function (a, b) {
+	goog.asserts.assert(goog.math.isInt(b) && 0 <= b);
+	for (var c = goog.iter.toIterator(a) ; 0 < b--;) goog.iter.nextOrValue(c, null);
+	return c
+};
+goog.iter.slice = function (a, b, c) {
+	goog.asserts.assert(goog.math.isInt(b) && 0 <= b);
+	a = goog.iter.consume(a, b);
+	goog.isNumber(c) && (goog.asserts.assert(goog.math.isInt(c) && c >= b), a = goog.iter.limit(a, c - b));
+	return a
+};
+goog.iter.hasDuplicates_ = function (a) {
+	var b = [];
+	goog.array.removeDuplicates(a, b);
+	return a.length != b.length
+};
+goog.iter.permutations = function (a, b) {
+	var c = goog.iter.toArray(a),
+		d = goog.isNumber(b) ? b : c.length,
+		c = goog.array.repeat(c, d),
+		c = goog.iter.product.apply(void 0, c);
+	return goog.iter.filter(c, function (a) {
+		return !goog.iter.hasDuplicates_(a)
+	})
+};
+goog.iter.combinations = function (a, b) {
+	function c(a) {
+		return d[a]
+	}
+	var d = goog.iter.toArray(a),
+		e = goog.iter.range(d.length),
+		e = goog.iter.permutations(e, b),
+		f = goog.iter.filter(e, function (a) {
+        	return goog.array.isSorted(a)
+		}),
+		e = new goog.iter.Iterator;
+	e.next = function () {
+		return goog.array.map(f.next(), c)
+	};
+	return e
+};
+goog.iter.combinationsWithReplacement = function (a, b) {
+	function c(a) {
+		return d[a]
+	}
+	var d = goog.iter.toArray(a),
+		e = goog.array.range(d.length),
+		e = goog.array.repeat(e, b),
+		e = goog.iter.product.apply(void 0, e),
+		f = goog.iter.filter(e, function (a) {
+        	return goog.array.isSorted(a)
+		}),
+		e = new goog.iter.Iterator;
+	e.next = function () {
+		return goog.array.map(f.next(), c)
+	};
+	return e
+};
+goog.dom.TagWalkType = {
+	START_TAG: 1,
+	OTHER: 0,
+	END_TAG: -1
+};
+goog.dom.TagIterator = function (a, b, c, d, e) {
+	this.reversed = !!b;
+	this.node = null;
+	this.tagType = goog.dom.TagWalkType.OTHER;
+	this.started_ = !1;
+	this.constrained = !c;
+	a && this.setPosition(a, d);
+	this.depth = void 0 != e ? e : this.tagType || 0;
+	this.reversed && (this.depth *= -1)
+};
+goog.inherits(goog.dom.TagIterator, goog.iter.Iterator);
+goog.dom.TagIterator.prototype.setPosition = function (a, b, c) {
+	if (this.node = a) goog.isNumber(b) ? this.tagType = b : this.tagType = this.node.nodeType != goog.dom.NodeType.ELEMENT ? goog.dom.TagWalkType.OTHER : this.reversed ? goog.dom.TagWalkType.END_TAG : goog.dom.TagWalkType.START_TAG;
+	goog.isNumber(c) && (this.depth = c)
+};
+goog.dom.TagIterator.prototype.copyFrom = function (a) {
+	this.node = a.node;
+	this.tagType = a.tagType;
+	this.depth = a.depth;
+	this.reversed = a.reversed;
+	this.constrained = a.constrained
+};
+goog.dom.TagIterator.prototype.clone = function () {
+	return new goog.dom.TagIterator(this.node, this.reversed, !this.constrained, this.tagType, this.depth)
+};
+goog.dom.TagIterator.prototype.skipTag = function () {
+	var a = this.reversed ? goog.dom.TagWalkType.END_TAG : goog.dom.TagWalkType.START_TAG;
+	this.tagType == a && (this.tagType = -1 * a, this.depth += this.tagType * (this.reversed ? -1 : 1))
+};
+goog.dom.TagIterator.prototype.restartTag = function () {
+	var a = this.reversed ? goog.dom.TagWalkType.START_TAG : goog.dom.TagWalkType.END_TAG;
+	this.tagType == a && (this.tagType = -1 * a, this.depth += this.tagType * (this.reversed ? -1 : 1))
+};
+goog.dom.TagIterator.prototype.next = function () {
+	var a;
+	if (this.started_) {
+		if (!this.node || this.constrained && 0 == this.depth) throw goog.iter.StopIteration;
+		a = this.node;
+		var b = this.reversed ? goog.dom.TagWalkType.END_TAG : goog.dom.TagWalkType.START_TAG;
+		if (this.tagType == b) {
+			var c = this.reversed ? a.lastChild : a.firstChild;
+			c ? this.setPosition(c) : this.setPosition(a, -1 * b)
+		} else (c = this.reversed ? a.previousSibling : a.nextSibling) ? this.setPosition(c) : this.setPosition(a.parentNode, -1 * b);
+		this.depth += this.tagType * (this.reversed ?
+			-1 : 1)
+	} else this.started_ = !0;
+	a = this.node;
+	if (!this.node) throw goog.iter.StopIteration;
+	return a
+};
+goog.dom.TagIterator.prototype.isStarted = function () {
+	return this.started_
+};
+goog.dom.TagIterator.prototype.isStartTag = function () {
+	return this.tagType == goog.dom.TagWalkType.START_TAG
+};
+goog.dom.TagIterator.prototype.isEndTag = function () {
+	return this.tagType == goog.dom.TagWalkType.END_TAG
+};
+goog.dom.TagIterator.prototype.isNonElement = function () {
+	return this.tagType == goog.dom.TagWalkType.OTHER
+};
+goog.dom.TagIterator.prototype.equals = function (a) {
+	return a.node == this.node && (!this.node || a.tagType == this.tagType)
+};
+goog.dom.TagIterator.prototype.splice = function (a) {
+	var b = this.node;
+	this.restartTag();
+	this.reversed = !this.reversed;
+	goog.dom.TagIterator.prototype.next.call(this);
+	this.reversed = !this.reversed;
+	for (var c = goog.isArrayLike(arguments[0]) ? arguments[0] : arguments, d = c.length - 1; 0 <= d; d--) goog.dom.insertSiblingAfter(c[d], b);
+	goog.dom.removeNode(b)
+};
+goog.dom.NodeIterator = function (a, b, c, d) {
+	goog.dom.TagIterator.call(this, a, b, c, null, d)
+};
+goog.inherits(goog.dom.NodeIterator, goog.dom.TagIterator);
+goog.dom.NodeIterator.prototype.next = function () {
+	do goog.dom.NodeIterator.superClass_.next.call(this); while (this.isEndTag());
+	return this.node
+};
+goog.ui.PaletteRenderer = function () {
+	goog.ui.ControlRenderer.call(this)
+};
+goog.inherits(goog.ui.PaletteRenderer, goog.ui.ControlRenderer);
+goog.addSingletonGetter(goog.ui.PaletteRenderer);
+goog.ui.PaletteRenderer.cellId_ = 0;
+goog.ui.PaletteRenderer.CSS_CLASS = "goog-palette";
+goog.ui.PaletteRenderer.prototype.createDom = function (a) {
+	var b = this.getClassNames(a);
+	a = a.getDomHelper().createDom("DIV", b ? b.join(" ") : null, this.createGrid(a.getContent(), a.getSize(), a.getDomHelper()));
+	goog.a11y.aria.setRole(a, goog.a11y.aria.Role.GRID);
+	return a
+};
+goog.ui.PaletteRenderer.prototype.createGrid = function (a, b, c) {
+	for (var d = [], e = 0, f = 0; e < b.height; e++) {
+		for (var g = [], h = 0; h < b.width; h++) {
+			var k = a && a[f++];
+			g.push(this.createCell(k, c))
+		}
+		d.push(this.createRow(g, c))
+	}
+	return this.createTable(d, c)
+};
+goog.ui.PaletteRenderer.prototype.createTable = function (a, b) {
+	var c = b.createDom("TABLE", this.getCssClass() + "-table", b.createDom("TBODY", this.getCssClass() + "-body", a));
+	c.cellSpacing = "0";
+	c.cellPadding = "0";
+	return c
+};
+goog.ui.PaletteRenderer.prototype.createRow = function (a, b) {
+	var c = b.createDom("TR", this.getCssClass() + "-row", a);
+	goog.a11y.aria.setRole(c, goog.a11y.aria.Role.ROW);
+	return c
+};
+goog.ui.PaletteRenderer.prototype.createCell = function (a, b) {
+	var c = b.createDom("TD", {
+		"class": this.getCssClass() + "-cell",
+		id: this.getCssClass() + "-cell-" + goog.ui.PaletteRenderer.cellId_++
+	}, a);
+	goog.a11y.aria.setRole(c, goog.a11y.aria.Role.GRIDCELL);
+	goog.a11y.aria.setState(c, goog.a11y.aria.State.SELECTED, !1);
+	if (!goog.dom.getTextContent(c) && !goog.a11y.aria.getLabel(c)) {
+		var d = this.findAriaLabelForCell_(c);
+		d && goog.a11y.aria.setLabel(c, d)
+	}
+	return c
+};
+goog.ui.PaletteRenderer.prototype.findAriaLabelForCell_ = function (a) {
+	a = new goog.dom.NodeIterator(a);
+	for (var b = "", c; !b && (c = goog.iter.nextOrValue(a, null)) ;) c.nodeType == goog.dom.NodeType.ELEMENT && (b = goog.a11y.aria.getLabel(c) || c.title);
+	return b
+};
+goog.ui.PaletteRenderer.prototype.canDecorate = function (a) {
+	return !1
+};
+goog.ui.PaletteRenderer.prototype.decorate = function (a, b) {
+	return null
+};
+goog.ui.PaletteRenderer.prototype.setContent = function (a, b) {
+	if (a) {
+		var c = goog.dom.getElementsByTagNameAndClass("TBODY", this.getCssClass() + "-body", a)[0];
+		if (c) {
+			var d = 0;
+			goog.array.forEach(c.rows, function (a) {
+				goog.array.forEach(a.cells, function (a) {
+					goog.dom.removeChildren(a);
+					if (b) {
+						var c = b[d++];
+						c && goog.dom.appendChild(a, c)
+					}
+				})
+			});
+			if (d < b.length) {
+				for (var e = [], f = goog.dom.getDomHelper(a), g = c.rows[0].cells.length; d < b.length;) {
+					var h = b[d++];
+					e.push(this.createCell(h, f));
+					e.length == g && (h = this.createRow(e, f), goog.dom.appendChild(c,
+						h), e.length = 0)
+				}
+				if (0 < e.length) {
+					for (; e.length < g;) e.push(this.createCell("", f));
+					h = this.createRow(e, f);
+					goog.dom.appendChild(c, h)
+				}
+			}
+		}
+		goog.style.setUnselectable(a, !0, goog.userAgent.GECKO)
+	}
+};
+goog.ui.PaletteRenderer.prototype.getContainingItem = function (a, b) {
+	for (var c = a.getElement() ; b && b.nodeType == goog.dom.NodeType.ELEMENT && b != c;) {
+		if ("TD" == b.tagName && goog.dom.classlist.contains(b, this.getCssClass() + "-cell")) return b.firstChild;
+		b = b.parentNode
+	}
+	return null
+};
+goog.ui.PaletteRenderer.prototype.highlightCell = function (a, b, c) {
+	b && (b = this.getCellForItem(b), goog.asserts.assert(b), goog.dom.classlist.enable(b, this.getCssClass() + "-cell-hover", c), c ? goog.a11y.aria.setState(a.getElementStrict(), goog.a11y.aria.State.ACTIVEDESCENDANT, b.id) : b.id == goog.a11y.aria.getState(a.getElementStrict(), goog.a11y.aria.State.ACTIVEDESCENDANT) && goog.a11y.aria.removeState(a.getElementStrict(), goog.a11y.aria.State.ACTIVEDESCENDANT))
+};
+goog.ui.PaletteRenderer.prototype.getCellForItem = function (a) {
+	return a ? a.parentNode : null
+};
+goog.ui.PaletteRenderer.prototype.selectCell = function (a, b, c) {
+	b && (a = b.parentNode, goog.dom.classlist.enable(a, this.getCssClass() + "-cell-selected", c), goog.a11y.aria.setState(a, goog.a11y.aria.State.SELECTED, c))
+};
+goog.ui.PaletteRenderer.prototype.getCssClass = function () {
+	return goog.ui.PaletteRenderer.CSS_CLASS
+};
+goog.ui.SelectionModel = function (a) {
+	goog.events.EventTarget.call(this);
+	this.items_ = [];
+	this.addItems(a)
+};
+goog.inherits(goog.ui.SelectionModel, goog.events.EventTarget);
+goog.tagUnsealableClass(goog.ui.SelectionModel);
+goog.ui.SelectionModel.prototype.selectedItem_ = null;
+goog.ui.SelectionModel.prototype.selectionHandler_ = null;
+goog.ui.SelectionModel.prototype.getSelectionHandler = function () {
+	return this.selectionHandler_
+};
+goog.ui.SelectionModel.prototype.setSelectionHandler = function (a) {
+	this.selectionHandler_ = a
+};
+goog.ui.SelectionModel.prototype.getItemCount = function () {
+	return this.items_.length
+};
+goog.ui.SelectionModel.prototype.indexOfItem = function (a) {
+	return a ? goog.array.indexOf(this.items_, a) : -1
+};
+goog.ui.SelectionModel.prototype.getFirst = function () {
+	return this.items_[0]
+};
+goog.ui.SelectionModel.prototype.getLast = function () {
+	return this.items_[this.items_.length - 1]
+};
+goog.ui.SelectionModel.prototype.getItemAt = function (a) {
+	return this.items_[a] || null
+};
+goog.ui.SelectionModel.prototype.addItems = function (a) {
+	a && (goog.array.forEach(a, function (a) {
+		this.selectItem_(a, !1)
+	}, this), goog.array.extend(this.items_, a))
+};
+goog.ui.SelectionModel.prototype.addItem = function (a) {
+	this.addItemAt(a, this.getItemCount())
+};
+goog.ui.SelectionModel.prototype.addItemAt = function (a, b) {
+	a && (this.selectItem_(a, !1), goog.array.insertAt(this.items_, a, b))
+};
+goog.ui.SelectionModel.prototype.removeItem = function (a) {
+	a && goog.array.remove(this.items_, a) && a == this.selectedItem_ && (this.selectedItem_ = null, this.dispatchEvent(goog.events.EventType.SELECT))
+};
+goog.ui.SelectionModel.prototype.removeItemAt = function (a) {
+	this.removeItem(this.getItemAt(a))
+};
+goog.ui.SelectionModel.prototype.getSelectedItem = function () {
+	return this.selectedItem_
+};
+goog.ui.SelectionModel.prototype.getItems = function () {
+	return goog.array.clone(this.items_)
+};
+goog.ui.SelectionModel.prototype.setSelectedItem = function (a) {
+	a != this.selectedItem_ && (this.selectItem_(this.selectedItem_, !1), this.selectedItem_ = a, this.selectItem_(a, !0));
+	this.dispatchEvent(goog.events.EventType.SELECT)
+};
+goog.ui.SelectionModel.prototype.getSelectedIndex = function () {
+	return this.indexOfItem(this.selectedItem_)
+};
+goog.ui.SelectionModel.prototype.setSelectedIndex = function (a) {
+	this.setSelectedItem(this.getItemAt(a))
+};
+goog.ui.SelectionModel.prototype.clear = function () {
+	goog.array.clear(this.items_);
+	this.selectedItem_ = null
+};
+goog.ui.SelectionModel.prototype.disposeInternal = function () {
+	goog.ui.SelectionModel.superClass_.disposeInternal.call(this);
+	delete this.items_;
+	this.selectedItem_ = null
+};
+goog.ui.SelectionModel.prototype.selectItem_ = function (a, b) {
+	a && ("function" == typeof this.selectionHandler_ ? this.selectionHandler_(a, b) : "function" == typeof a.setSelected && a.setSelected(b))
+};
+goog.ui.Palette = function (a, b, c) {
+	goog.ui.Control.call(this, a, b || goog.ui.PaletteRenderer.getInstance(), c);
+	this.setAutoStates(goog.ui.Component.State.CHECKED | goog.ui.Component.State.SELECTED | goog.ui.Component.State.OPENED, !1);
+	this.currentCellControl_ = new goog.ui.Palette.CurrentCell_;
+	this.currentCellControl_.setParentEventTarget(this);
+	this.lastHighlightedIndex_ = -1
+};
+goog.inherits(goog.ui.Palette, goog.ui.Control);
+goog.tagUnsealableClass(goog.ui.Palette);
+goog.ui.Palette.EventType = {
+	AFTER_HIGHLIGHT: goog.events.getUniqueId("afterhighlight")
+};
+goog.ui.Palette.prototype.size_ = null;
+goog.ui.Palette.prototype.highlightedIndex_ = -1;
+goog.ui.Palette.prototype.selectionModel_ = null;
+goog.ui.Palette.prototype.disposeInternal = function () {
+	goog.ui.Palette.superClass_.disposeInternal.call(this);
+	this.selectionModel_ && (this.selectionModel_.dispose(), this.selectionModel_ = null);
+	this.size_ = null;
+	this.currentCellControl_.dispose()
+};
+goog.ui.Palette.prototype.setContentInternal = function (a) {
+	goog.ui.Palette.superClass_.setContentInternal.call(this, a);
+	this.adjustSize_();
+	this.selectionModel_ ? (this.selectionModel_.clear(), this.selectionModel_.addItems(a)) : (this.selectionModel_ = new goog.ui.SelectionModel(a), this.selectionModel_.setSelectionHandler(goog.bind(this.selectItem_, this)), this.getHandler().listen(this.selectionModel_, goog.events.EventType.SELECT, this.handleSelectionChange));
+	this.highlightedIndex_ = -1
+};
+goog.ui.Palette.prototype.getCaption = function () {
+	return ""
+};
+goog.ui.Palette.prototype.setCaption = function (a) { };
+goog.ui.Palette.prototype.handleMouseOver = function (a) {
+	goog.ui.Palette.superClass_.handleMouseOver.call(this, a);
+	var b = this.getRenderer().getContainingItem(this, a.target);
+	b && a.relatedTarget && goog.dom.contains(b, a.relatedTarget) || b != this.getHighlightedItem() && this.setHighlightedItem(b)
+};
+goog.ui.Palette.prototype.handleMouseDown = function (a) {
+	goog.ui.Palette.superClass_.handleMouseDown.call(this, a);
+	this.isActive() && (a = this.getRenderer().getContainingItem(this, a.target), a != this.getHighlightedItem() && this.setHighlightedItem(a))
+};
+goog.ui.Palette.prototype.performActionInternal = function (a) {
+	var b = this.getHighlightedItem();
+	return b ? (a && this.shouldSelectHighlightedItem_(a) && this.setSelectedItem(b), goog.ui.Palette.superClass_.performActionInternal.call(this, a)) : !1
+};
+goog.ui.Palette.prototype.shouldSelectHighlightedItem_ = function (a) {
+	return this.getSelectedItem() ? "mouseup" != a.type ? !0 : !!this.getRenderer().getContainingItem(this, a.target) : !0
+};
+goog.ui.Palette.prototype.handleKeyEvent = function (a) {
+	var b = this.getContent(),
+		b = b ? b.length : 0,
+		c = this.size_.width;
+	if (0 == b || !this.isEnabled()) return !1;
+	if (a.keyCode == goog.events.KeyCodes.ENTER || a.keyCode == goog.events.KeyCodes.SPACE) return this.performActionInternal(a);
+	if (a.keyCode == goog.events.KeyCodes.HOME) return this.setHighlightedIndex(0), !0;
+	if (a.keyCode == goog.events.KeyCodes.END) return this.setHighlightedIndex(b - 1), !0;
+	var d = 0 > this.highlightedIndex_ ? this.getSelectedIndex() : this.highlightedIndex_;
+	switch (a.keyCode) {
+		case goog.events.KeyCodes.LEFT:
+			if (-1 ==
+				d || 0 == d) d = b;
+			this.setHighlightedIndex(d - 1);
+			a.preventDefault();
+			return !0;
+		case goog.events.KeyCodes.RIGHT:
+			return d == b - 1 && (d = -1), this.setHighlightedIndex(d + 1), a.preventDefault(), !0;
+		case goog.events.KeyCodes.UP:
+			-1 == d && (d = b + c - 1);
+			if (d >= c) return this.setHighlightedIndex(d - c), a.preventDefault(), !0;
+			break;
+		case goog.events.KeyCodes.DOWN:
+			if (-1 == d && (d = -c), d < b - c) return this.setHighlightedIndex(d + c), a.preventDefault(), !0
+	}
+	return !1
+};
+goog.ui.Palette.prototype.handleSelectionChange = function (a) { };
+goog.ui.Palette.prototype.getSize = function () {
+	return this.size_
+};
+goog.ui.Palette.prototype.setSize = function (a, b) {
+	if (this.getElement()) throw Error(goog.ui.Component.Error.ALREADY_RENDERED);
+	this.size_ = goog.isNumber(a) ? new goog.math.Size(a, b) : a;
+	this.adjustSize_()
+};
+goog.ui.Palette.prototype.getHighlightedIndex = function () {
+	return this.highlightedIndex_
+};
+goog.ui.Palette.prototype.getHighlightedItem = function () {
+	var a = this.getContent();
+	return a && a[this.highlightedIndex_]
+};
+goog.ui.Palette.prototype.getHighlightedCellElement_ = function () {
+	return this.getRenderer().getCellForItem(this.getHighlightedItem())
+};
+goog.ui.Palette.prototype.setHighlightedIndex = function (a) {
+	a != this.highlightedIndex_ && (this.highlightIndex_(this.highlightedIndex_, !1), this.lastHighlightedIndex_ = this.highlightedIndex_, this.highlightedIndex_ = a, this.highlightIndex_(a, !0), this.dispatchEvent(goog.ui.Palette.EventType.AFTER_HIGHLIGHT))
+};
+goog.ui.Palette.prototype.setHighlightedItem = function (a) {
+	var b = this.getContent();
+	this.setHighlightedIndex(b && a ? goog.array.indexOf(b, a) : -1)
+};
+goog.ui.Palette.prototype.getSelectedIndex = function () {
+	return this.selectionModel_ ? this.selectionModel_.getSelectedIndex() : -1
+};
+goog.ui.Palette.prototype.getSelectedItem = function () {
+	return this.selectionModel_ ? this.selectionModel_.getSelectedItem() : null
+};
+goog.ui.Palette.prototype.setSelectedIndex = function (a) {
+	this.selectionModel_ && this.selectionModel_.setSelectedIndex(a)
+};
+goog.ui.Palette.prototype.setSelectedItem = function (a) {
+	this.selectionModel_ && this.selectionModel_.setSelectedItem(a)
+};
+goog.ui.Palette.prototype.highlightIndex_ = function (a, b) {
+	if (this.getElement()) {
+		var c = this.getContent();
+		if (c && 0 <= a && a < c.length) {
+			var d = this.getHighlightedCellElement_();
+			this.currentCellControl_.getElement() != d && this.currentCellControl_.setElementInternal(d);
+			this.currentCellControl_.tryHighlight(b) && this.getRenderer().highlightCell(this, c[a], b)
+		}
+	}
+};
+goog.ui.Palette.prototype.setHighlighted = function (a) {
+	a && -1 == this.highlightedIndex_ ? this.setHighlightedIndex(-1 < this.lastHighlightedIndex_ ? this.lastHighlightedIndex_ : 0) : a || this.setHighlightedIndex(-1);
+	goog.ui.Palette.superClass_.setHighlighted.call(this, a)
+};
+goog.ui.Palette.prototype.selectItem_ = function (a, b) {
+	this.getElement() && this.getRenderer().selectCell(this, a, b)
+};
+goog.ui.Palette.prototype.adjustSize_ = function () {
+	var a = this.getContent();
+	if (a)
+		if (this.size_ && this.size_.width) {
+			if (a = Math.ceil(a.length / this.size_.width), !goog.isNumber(this.size_.height) || this.size_.height < a) this.size_.height = a
+		} else a = Math.ceil(Math.sqrt(a.length)), this.size_ = new goog.math.Size(a, a);
+	else this.size_ = new goog.math.Size(0, 0)
+};
+goog.ui.Palette.CurrentCell_ = function () {
+	goog.ui.Control.call(this, null);
+	this.setDispatchTransitionEvents(goog.ui.Component.State.HOVER, !0)
+};
+goog.inherits(goog.ui.Palette.CurrentCell_, goog.ui.Control);
+goog.ui.Palette.CurrentCell_.prototype.tryHighlight = function (a) {
+	this.setHighlighted(a);
+	return this.isHighlighted() == a
+};
+goog.ui.ColorPalette = function (a, b, c) {
+	this.colors_ = a || [];
+	goog.ui.Palette.call(this, null, b || goog.ui.PaletteRenderer.getInstance(), c);
+	this.setColors(this.colors_)
+};
+goog.inherits(goog.ui.ColorPalette, goog.ui.Palette);
+goog.tagUnsealableClass(goog.ui.ColorPalette);
+goog.ui.ColorPalette.prototype.normalizedColors_ = null;
+goog.ui.ColorPalette.prototype.labels_ = null;
+goog.ui.ColorPalette.prototype.getColors = function () {
+	return this.colors_
+};
+goog.ui.ColorPalette.prototype.setColors = function (a, b) {
+	this.colors_ = a;
+	this.labels_ = b || null;
+	this.normalizedColors_ = null;
+	this.setContent(this.createColorNodes())
+};
+goog.ui.ColorPalette.prototype.getSelectedColor = function () {
+	var a = this.getSelectedItem();
+	return a ? (a = goog.style.getStyle(a, "background-color"), goog.ui.ColorPalette.parseColor_(a)) : null
+};
+goog.ui.ColorPalette.prototype.setSelectedColor = function (a) {
+	a = goog.ui.ColorPalette.parseColor_(a);
+	this.normalizedColors_ || (this.normalizedColors_ = goog.array.map(this.colors_, function (a) {
+		return goog.ui.ColorPalette.parseColor_(a)
+	}));
+	this.setSelectedIndex(a ? goog.array.indexOf(this.normalizedColors_, a) : -1)
+};
+goog.ui.ColorPalette.prototype.createColorNodes = function () {
+	return goog.array.map(this.colors_, function (a, b) {
+		var c = this.getDomHelper().createDom("DIV", {
+			"class": this.getRenderer().getCssClass() + "-colorswatch",
+			style: "background-color:" + a
+		});
+		c.title = this.labels_ && this.labels_[b] ? this.labels_[b] : "#" == a.charAt(0) ? "RGB (" + goog.color.hexToRgb(a).join(", ") + ")" : a;
+		return c
+	}, this)
+};
+goog.ui.ColorPalette.parseColor_ = function (a) {
+	if (a) try {
+		return goog.color.parse(a).hex
+	} catch (b) { }
+	return null
+};
+goog.ui.ColorPicker = function (a, b) {
+	goog.ui.Component.call(this, a);
+	this.colorPalette_ = b || null;
+	this.getHandler().listen(this, goog.ui.Component.EventType.ACTION, this.onColorPaletteAction_)
+};
+goog.inherits(goog.ui.ColorPicker, goog.ui.Component);
+goog.ui.ColorPicker.DEFAULT_NUM_COLS = 5;
+goog.ui.ColorPicker.EventType = {
+	CHANGE: "change"
+};
+goog.ui.ColorPicker.prototype.focusable_ = !0;
+goog.ui.ColorPicker.prototype.getColors = function () {
+	return this.colorPalette_ ? this.colorPalette_.getColors() : null
+};
+goog.ui.ColorPicker.prototype.setColors = function (a) {
+	this.colorPalette_ ? this.colorPalette_.setColors(a) : this.createColorPalette_(a)
+};
+goog.ui.ColorPicker.prototype.addColors = function (a) {
+	this.setColors(a)
+};
+goog.ui.ColorPicker.prototype.setSize = function (a) {
+	this.colorPalette_ || this.createColorPalette_([]);
+	this.colorPalette_.setSize(a)
+};
+goog.ui.ColorPicker.prototype.getSize = function () {
+	return this.colorPalette_ ? this.colorPalette_.getSize() : null
+};
+goog.ui.ColorPicker.prototype.setColumnCount = function (a) {
+	this.setSize(a)
+};
+goog.ui.ColorPicker.prototype.getSelectedIndex = function () {
+	return this.colorPalette_ ? this.colorPalette_.getSelectedIndex() : -1
+};
+goog.ui.ColorPicker.prototype.setSelectedIndex = function (a) {
+	this.colorPalette_ && this.colorPalette_.setSelectedIndex(a)
+};
+goog.ui.ColorPicker.prototype.getSelectedColor = function () {
+	return this.colorPalette_ ? this.colorPalette_.getSelectedColor() : null
+};
+goog.ui.ColorPicker.prototype.setSelectedColor = function (a) {
+	this.colorPalette_ && this.colorPalette_.setSelectedColor(a)
+};
+goog.ui.ColorPicker.prototype.isFocusable = function () {
+	return this.focusable_
+};
+goog.ui.ColorPicker.prototype.setFocusable = function (a) {
+	this.focusable_ = a;
+	this.colorPalette_ && this.colorPalette_.setSupportedState(goog.ui.Component.State.FOCUSED, a)
+};
+goog.ui.ColorPicker.prototype.canDecorate = function (a) {
+	return !1
+};
+goog.ui.ColorPicker.prototype.enterDocument = function () {
+	goog.ui.ColorPicker.superClass_.enterDocument.call(this);
+	this.colorPalette_ && this.colorPalette_.render(this.getElement());
+	this.getElement().unselectable = "on"
+};
+goog.ui.ColorPicker.prototype.disposeInternal = function () {
+	goog.ui.ColorPicker.superClass_.disposeInternal.call(this);
+	this.colorPalette_ && (this.colorPalette_.dispose(), this.colorPalette_ = null)
+};
+goog.ui.ColorPicker.prototype.focus = function () {
+	this.colorPalette_ && this.colorPalette_.getElement().focus()
+};
+goog.ui.ColorPicker.prototype.onColorPaletteAction_ = function (a) {
+	a.stopPropagation();
+	this.dispatchEvent(goog.ui.ColorPicker.EventType.CHANGE)
+};
+goog.ui.ColorPicker.prototype.createColorPalette_ = function (a) {
+	a = new goog.ui.ColorPalette(a, null, this.getDomHelper());
+	a.setSize(goog.ui.ColorPicker.DEFAULT_NUM_COLS);
+	a.setSupportedState(goog.ui.Component.State.FOCUSED, this.focusable_);
+	this.addChild(a);
+	this.colorPalette_ = a;
+	this.isInDocument() && this.colorPalette_.render(this.getElement())
+};
+goog.ui.ColorPicker.createSimpleColorGrid = function (a) {
+	a = new goog.ui.ColorPicker(a);
+	a.setSize(7);
+	a.setColors(goog.ui.ColorPicker.SIMPLE_GRID_COLORS);
+	return a
+};
+goog.ui.ColorPicker.SIMPLE_GRID_COLORS = "#ffffff #cccccc #c0c0c0 #999999 #666666 #333333 #000000 #ffcccc #ff6666 #ff0000 #cc0000 #990000 #660000 #330000 #ffcc99 #ff9966 #ff9900 #ff6600 #cc6600 #993300 #663300 #ffff99 #ffff66 #ffcc66 #ffcc33 #cc9933 #996633 #663333 #ffffcc #ffff33 #ffff00 #ffcc00 #999900 #666600 #333300 #99ff99 #66ff99 #33ff33 #33cc00 #009900 #006600 #003300 #99ffff #33ffff #66cccc #00cccc #339999 #336666 #003333 #ccffff #66ffff #33ccff #3366ff #3333ff #000099 #000066 #ccccff #9999ff #6666cc #6633ff #6600cc #333399 #330099 #ffccff #ff99ff #cc66cc #cc33cc #993399 #663366 #330033".split(" ");
+goog.events.FocusHandler = function (a) {
+	goog.events.EventTarget.call(this);
+	this.element_ = a;
+	a = goog.userAgent.IE ? "focusout" : "blur";
+	this.listenKeyIn_ = goog.events.listen(this.element_, goog.userAgent.IE ? "focusin" : "focus", this, !goog.userAgent.IE);
+	this.listenKeyOut_ = goog.events.listen(this.element_, a, this, !goog.userAgent.IE)
+};
+goog.inherits(goog.events.FocusHandler, goog.events.EventTarget);
+goog.events.FocusHandler.EventType = {
+	FOCUSIN: "focusin",
+	FOCUSOUT: "focusout"
+};
+goog.events.FocusHandler.prototype.handleEvent = function (a) {
+	var b = a.getBrowserEvent(),
+		b = new goog.events.BrowserEvent(b);
+	b.type = "focusin" == a.type || "focus" == a.type ? goog.events.FocusHandler.EventType.FOCUSIN : goog.events.FocusHandler.EventType.FOCUSOUT;
+	this.dispatchEvent(b)
+};
+goog.events.FocusHandler.prototype.disposeInternal = function () {
+	goog.events.FocusHandler.superClass_.disposeInternal.call(this);
+	goog.events.unlistenByKey(this.listenKeyIn_);
+	goog.events.unlistenByKey(this.listenKeyOut_);
+	delete this.element_
+};
+goog.structs = {};
+goog.structs.getCount = function (a) {
+	return a.getCount && "function" == typeof a.getCount ? a.getCount() : goog.isArrayLike(a) || goog.isString(a) ? a.length : goog.object.getCount(a)
+};
+goog.structs.getValues = function (a) {
+	if (a.getValues && "function" == typeof a.getValues) return a.getValues();
+	if (goog.isString(a)) return a.split("");
+	if (goog.isArrayLike(a)) {
+		for (var b = [], c = a.length, d = 0; d < c; d++) b.push(a[d]);
+		return b
+	}
+	return goog.object.getValues(a)
+};
+goog.structs.getKeys = function (a) {
+	if (a.getKeys && "function" == typeof a.getKeys) return a.getKeys();
+	if (!a.getValues || "function" != typeof a.getValues) {
+		if (goog.isArrayLike(a) || goog.isString(a)) {
+			var b = [];
+			a = a.length;
+			for (var c = 0; c < a; c++) b.push(c);
+			return b
+		}
+		return goog.object.getKeys(a)
+	}
+};
+goog.structs.contains = function (a, b) {
+	return a.contains && "function" == typeof a.contains ? a.contains(b) : a.containsValue && "function" == typeof a.containsValue ? a.containsValue(b) : goog.isArrayLike(a) || goog.isString(a) ? goog.array.contains(a, b) : goog.object.containsValue(a, b)
+};
+goog.structs.isEmpty = function (a) {
+	return a.isEmpty && "function" == typeof a.isEmpty ? a.isEmpty() : goog.isArrayLike(a) || goog.isString(a) ? goog.array.isEmpty(a) : goog.object.isEmpty(a)
+};
+goog.structs.clear = function (a) {
+	a.clear && "function" == typeof a.clear ? a.clear() : goog.isArrayLike(a) ? goog.array.clear(a) : goog.object.clear(a)
+};
+goog.structs.forEach = function (a, b, c) {
+	if (a.forEach && "function" == typeof a.forEach) a.forEach(b, c);
+	else if (goog.isArrayLike(a) || goog.isString(a)) goog.array.forEach(a, b, c);
+	else
+		for (var d = goog.structs.getKeys(a), e = goog.structs.getValues(a), f = e.length, g = 0; g < f; g++) b.call(c, e[g], d && d[g], a)
+};
+goog.structs.filter = function (a, b, c) {
+	if ("function" == typeof a.filter) return a.filter(b, c);
+	if (goog.isArrayLike(a) || goog.isString(a)) return goog.array.filter(a, b, c);
+	var d, e = goog.structs.getKeys(a),
+		f = goog.structs.getValues(a),
+		g = f.length;
+	if (e) {
+		d = {};
+		for (var h = 0; h < g; h++) b.call(c, f[h], e[h], a) && (d[e[h]] = f[h])
+	} else
+		for (d = [], h = 0; h < g; h++) b.call(c, f[h], void 0, a) && d.push(f[h]);
+	return d
+};
+goog.structs.map = function (a, b, c) {
+	if ("function" == typeof a.map) return a.map(b, c);
+	if (goog.isArrayLike(a) || goog.isString(a)) return goog.array.map(a, b, c);
+	var d, e = goog.structs.getKeys(a),
+		f = goog.structs.getValues(a),
+		g = f.length;
+	if (e) {
+		d = {};
+		for (var h = 0; h < g; h++) d[e[h]] = b.call(c, f[h], e[h], a)
+	} else
+		for (d = [], h = 0; h < g; h++) d[h] = b.call(c, f[h], void 0, a);
+	return d
+};
+goog.structs.some = function (a, b, c) {
+	if ("function" == typeof a.some) return a.some(b, c);
+	if (goog.isArrayLike(a) || goog.isString(a)) return goog.array.some(a, b, c);
+	for (var d = goog.structs.getKeys(a), e = goog.structs.getValues(a), f = e.length, g = 0; g < f; g++)
+		if (b.call(c, e[g], d && d[g], a)) return !0;
+	return !1
+};
+goog.structs.every = function (a, b, c) {
+	if ("function" == typeof a.every) return a.every(b, c);
+	if (goog.isArrayLike(a) || goog.isString(a)) return goog.array.every(a, b, c);
+	for (var d = goog.structs.getKeys(a), e = goog.structs.getValues(a), f = e.length, g = 0; g < f; g++)
+		if (!b.call(c, e[g], d && d[g], a)) return !1;
+	return !0
+};
+goog.structs.Collection = function () { };
+goog.structs.Map = function (a, b) {
+	this.map_ = {};
+	this.keys_ = [];
+	this.version_ = this.count_ = 0;
+	var c = arguments.length;
+	if (1 < c) {
+		if (c % 2) throw Error("Uneven number of arguments");
+		for (var d = 0; d < c; d += 2) this.set(arguments[d], arguments[d + 1])
+	} else a && this.addAll(a)
+};
+goog.structs.Map.prototype.getCount = function () {
+	return this.count_
+};
+goog.structs.Map.prototype.getValues = function () {
+	this.cleanupKeysArray_();
+	for (var a = [], b = 0; b < this.keys_.length; b++) a.push(this.map_[this.keys_[b]]);
+	return a
+};
+goog.structs.Map.prototype.getKeys = function () {
+	this.cleanupKeysArray_();
+	return this.keys_.concat()
+};
+goog.structs.Map.prototype.containsKey = function (a) {
+	return goog.structs.Map.hasKey_(this.map_, a)
+};
+goog.structs.Map.prototype.containsValue = function (a) {
+	for (var b = 0; b < this.keys_.length; b++) {
+		var c = this.keys_[b];
+		if (goog.structs.Map.hasKey_(this.map_, c) && this.map_[c] == a) return !0
+	}
+	return !1
+};
+goog.structs.Map.prototype.equals = function (a, b) {
+	if (this === a) return !0;
+	if (this.count_ != a.getCount()) return !1;
+	var c = b || goog.structs.Map.defaultEquals;
+	this.cleanupKeysArray_();
+	for (var d, e = 0; d = this.keys_[e]; e++)
+		if (!c(this.get(d), a.get(d))) return !1;
+	return !0
+};
+goog.structs.Map.defaultEquals = function (a, b) {
+	return a === b
+};
+goog.structs.Map.prototype.isEmpty = function () {
+	return 0 == this.count_
+};
+goog.structs.Map.prototype.clear = function () {
+	this.map_ = {};
+	this.version_ = this.count_ = this.keys_.length = 0
+};
+goog.structs.Map.prototype.remove = function (a) {
+	return goog.structs.Map.hasKey_(this.map_, a) ? (delete this.map_[a], this.count_--, this.version_++, this.keys_.length > 2 * this.count_ && this.cleanupKeysArray_(), !0) : !1
+};
+goog.structs.Map.prototype.cleanupKeysArray_ = function () {
+	if (this.count_ != this.keys_.length) {
+		for (var a = 0, b = 0; a < this.keys_.length;) {
+			var c = this.keys_[a];
+			goog.structs.Map.hasKey_(this.map_, c) && (this.keys_[b++] = c);
+			a++
+		}
+		this.keys_.length = b
+	}
+	if (this.count_ != this.keys_.length) {
+		for (var d = {}, b = a = 0; a < this.keys_.length;) c = this.keys_[a], goog.structs.Map.hasKey_(d, c) || (this.keys_[b++] = c, d[c] = 1), a++;
+		this.keys_.length = b
+	}
+};
+goog.structs.Map.prototype.get = function (a, b) {
+	return goog.structs.Map.hasKey_(this.map_, a) ? this.map_[a] : b
+};
+goog.structs.Map.prototype.set = function (a, b) {
+	goog.structs.Map.hasKey_(this.map_, a) || (this.count_++, this.keys_.push(a), this.version_++);
+	this.map_[a] = b
+};
+goog.structs.Map.prototype.addAll = function (a) {
+	var b;
+	a instanceof goog.structs.Map ? (b = a.getKeys(), a = a.getValues()) : (b = goog.object.getKeys(a), a = goog.object.getValues(a));
+	for (var c = 0; c < b.length; c++) this.set(b[c], a[c])
+};
+goog.structs.Map.prototype.forEach = function (a, b) {
+	for (var c = this.getKeys(), d = 0; d < c.length; d++) {
+		var e = c[d],
+			f = this.get(e);
+		a.call(b, f, e, this)
+	}
+};
+goog.structs.Map.prototype.clone = function () {
+	return new goog.structs.Map(this)
+};
+goog.structs.Map.prototype.transpose = function () {
+	for (var a = new goog.structs.Map, b = 0; b < this.keys_.length; b++) {
+		var c = this.keys_[b];
+		a.set(this.map_[c], c)
+	}
+	return a
+};
+goog.structs.Map.prototype.toObject = function () {
+	this.cleanupKeysArray_();
+	for (var a = {}, b = 0; b < this.keys_.length; b++) {
+		var c = this.keys_[b];
+		a[c] = this.map_[c]
+	}
+	return a
+};
+goog.structs.Map.prototype.getKeyIterator = function () {
+	return this.__iterator__(!0)
+};
+goog.structs.Map.prototype.getValueIterator = function () {
+	return this.__iterator__(!1)
+};
+goog.structs.Map.prototype.__iterator__ = function (a) {
+	this.cleanupKeysArray_();
+	var b = 0,
+		c = this.version_,
+		d = this,
+		e = new goog.iter.Iterator;
+	e.next = function () {
+		if (c != d.version_) throw Error("The map has changed since the iterator was created");
+		if (b >= d.keys_.length) throw goog.iter.StopIteration;
+		var e = d.keys_[b++];
+		return a ? e : d.map_[e]
+	};
+	return e
+};
+goog.structs.Map.hasKey_ = function (a, b) {
+	return Object.prototype.hasOwnProperty.call(a, b)
+};
+goog.structs.Set = function (a) {
+	this.map_ = new goog.structs.Map;
+	a && this.addAll(a)
+};
+goog.structs.Set.getKey_ = function (a) {
+	var b = typeof a;
+	return "object" == b && a || "function" == b ? "o" + goog.getUid(a) : b.substr(0, 1) + a
+};
+goog.structs.Set.prototype.getCount = function () {
+	return this.map_.getCount()
+};
+goog.structs.Set.prototype.add = function (a) {
+	this.map_.set(goog.structs.Set.getKey_(a), a)
+};
+goog.structs.Set.prototype.addAll = function (a) {
+	a = goog.structs.getValues(a);
+	for (var b = a.length, c = 0; c < b; c++) this.add(a[c])
+};
+goog.structs.Set.prototype.removeAll = function (a) {
+	a = goog.structs.getValues(a);
+	for (var b = a.length, c = 0; c < b; c++) this.remove(a[c])
+};
+goog.structs.Set.prototype.remove = function (a) {
+	return this.map_.remove(goog.structs.Set.getKey_(a))
+};
+goog.structs.Set.prototype.clear = function () {
+	this.map_.clear()
+};
+goog.structs.Set.prototype.isEmpty = function () {
+	return this.map_.isEmpty()
+};
+goog.structs.Set.prototype.contains = function (a) {
+	return this.map_.containsKey(goog.structs.Set.getKey_(a))
+};
+goog.structs.Set.prototype.containsAll = function (a) {
+	return goog.structs.every(a, this.contains, this)
+};
+goog.structs.Set.prototype.intersection = function (a) {
+	var b = new goog.structs.Set;
+	a = goog.structs.getValues(a);
+	for (var c = 0; c < a.length; c++) {
+		var d = a[c];
+		this.contains(d) && b.add(d)
+	}
+	return b
+};
+goog.structs.Set.prototype.difference = function (a) {
+	var b = this.clone();
+	b.removeAll(a);
+	return b
+};
+goog.structs.Set.prototype.getValues = function () {
+	return this.map_.getValues()
+};
+goog.structs.Set.prototype.clone = function () {
+	return new goog.structs.Set(this)
+};
+goog.structs.Set.prototype.equals = function (a) {
+	return this.getCount() == goog.structs.getCount(a) && this.isSubsetOf(a)
+};
+goog.structs.Set.prototype.isSubsetOf = function (a) {
+	var b = goog.structs.getCount(a);
+	if (this.getCount() > b) return !1;
+	!(a instanceof goog.structs.Set) && 5 < b && (a = new goog.structs.Set(a));
+	return goog.structs.every(this, function (b) {
+		return goog.structs.contains(a, b)
+	})
+};
+goog.structs.Set.prototype.__iterator__ = function (a) {
+	return this.map_.__iterator__(!1)
+};
+goog.debug.LOGGING_ENABLED = goog.DEBUG;
+goog.debug.FORCE_SLOPPY_STACKS = !1;
+goog.debug.catchErrors = function (a, b, c) {
+	c = c || goog.global;
+	var d = c.onerror,
+		e = !!b;
+	goog.userAgent.WEBKIT && !goog.userAgent.isVersionOrHigher("535.3") && (e = !e);
+	c.onerror = function (b, c, h, k, m) {
+		d && d(b, c, h, k, m);
+		a({
+			message: b,
+			fileName: c,
+			line: h,
+			col: k,
+			error: m
+		});
+		return e
+	}
+};
+goog.debug.expose = function (a, b) {
+	if ("undefined" == typeof a) return "undefined";
+	if (null == a) return "NULL";
+	var c = [],
+		d;
+	for (d in a)
+		if (b || !goog.isFunction(a[d])) {
+			var e = d + " = ";
+			try {
+				e += a[d]
+			} catch (f) {
+				e += "*** " + f + " ***"
+			}
+			c.push(e)
+		}
+	return c.join("\n")
+};
+goog.debug.deepExpose = function (a, b) {
+	var c = [],
+		d = function (a, f, g) {
+        	var e = f + "  ";
+        	g = new goog.structs.Set(g);
+        	try {
+        		if (goog.isDef(a))
+        			if (goog.isNull(a)) c.push("NULL");
+        			else if (goog.isString(a)) c.push('"' + a.replace(/\n/g, "\n" + f) + '"');
+        			else if (goog.isFunction(a)) c.push(String(a).replace(/\n/g, "\n" + f));
+        			else if (goog.isObject(a))
+        				if (g.contains(a)) c.push("*** reference loop detected ***");
+        				else {
+        					g.add(a);
+        					c.push("{");
+        					for (var k in a)
+        						if (b || !goog.isFunction(a[k])) c.push("\n"), c.push(e), c.push(k + " = "), d(a[k], e, g);
+        					c.push("\n" +
+								f + "}")
+        				}
+        			else c.push(a);
+        		else c.push("undefined")
+        	} catch (m) {
+        		c.push("*** " + m + " ***")
+        	}
+		};
+	d(a, "", new goog.structs.Set);
+	return c.join("")
+};
+goog.debug.exposeArray = function (a) {
+	for (var b = [], c = 0; c < a.length; c++) goog.isArray(a[c]) ? b.push(goog.debug.exposeArray(a[c])) : b.push(a[c]);
+	return "[ " + b.join(", ") + " ]"
+};
+goog.debug.exposeException = function (a, b) {
+	var c = goog.debug.exposeExceptionAsHtml(a, b);
+	return goog.html.SafeHtml.unwrap(c)
+};
+goog.debug.exposeExceptionAsHtml = function (a, b) {
+	try {
+		var c = goog.debug.normalizeErrorObject(a),
+			d = goog.debug.createViewSourceUrl_(c.fileName);
+		return goog.html.SafeHtml.concat(goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces("Message: " + c.message + "\nUrl: "), goog.html.SafeHtml.create("a", {
+			href: d,
+			target: "_new"
+		}, c.fileName), goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces("\nLine: " + c.lineNumber + "\n\nBrowser stack:\n" + c.stack + "-> [end]\n\nJS stack traversal:\n" + goog.debug.getStacktrace(b) +
+			"-> "))
+	} catch (e) {
+		return goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces("Exception trying to expose exception! You win, we lose. " + e)
+	}
+};
+goog.debug.createViewSourceUrl_ = function (a) {
+	goog.isDefAndNotNull(a) || (a = "");
+	if (!/^https?:\/\//i.test(a)) return goog.html.SafeUrl.fromConstant(goog.string.Const.from("sanitizedviewsrc"));
+	a = goog.html.SafeUrl.sanitize(a);
+	return goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("view-source scheme plus HTTP/HTTPS URL"), "view-source:" + goog.html.SafeUrl.unwrap(a))
+};
+goog.debug.normalizeErrorObject = function (a) {
+	var b = goog.getObjectByName("window.location.href");
+	if (goog.isString(a)) return {
+		message: a,
+		name: "Unknown error",
+		lineNumber: "Not available",
+		fileName: b,
+		stack: "Not available"
+	};
+	var c, d, e = !1;
+	try {
+		c = a.lineNumber || a.line || "Not available"
+	} catch (f) {
+		c = "Not available", e = !0
+	}
+	try {
+		d = a.fileName || a.filename || a.sourceURL || goog.global.$googDebugFname || b
+	} catch (f) {
+		d = "Not available", e = !0
+	}
+	return !e && a.lineNumber && a.fileName && a.stack && a.message && a.name ? a : {
+		message: a.message || "Not available",
+		name: a.name || "UnknownError",
+		lineNumber: c,
+		fileName: d,
+		stack: a.stack || "Not available"
+	}
+};
+goog.debug.enhanceError = function (a, b) {
+	var c;
+	a instanceof Error ? c = a : (c = Error(a), Error.captureStackTrace && Error.captureStackTrace(c, goog.debug.enhanceError));
+	c.stack || (c.stack = goog.debug.getStacktrace(goog.debug.enhanceError));
+	if (b) {
+		for (var d = 0; c["message" + d];)++d;
+		c["message" + d] = String(b)
+	}
+	return c
+};
+goog.debug.getStacktraceSimple = function (a) {
+	if (!goog.debug.FORCE_SLOPPY_STACKS) {
+		var b = goog.debug.getNativeStackTrace_(goog.debug.getStacktraceSimple);
+		if (b) return b
+	}
+	for (var b = [], c = arguments.callee.caller, d = 0; c && (!a || d < a) ;) {
+		b.push(goog.debug.getFunctionName(c));
+		b.push("()\n");
+		try {
+			c = c.caller
+		} catch (e) {
+			b.push("[exception trying to get caller]\n");
+			break
+		}
+		d++;
+		if (d >= goog.debug.MAX_STACK_DEPTH) {
+			b.push("[...long stack...]");
+			break
+		}
+	}
+	a && d >= a ? b.push("[...reached max depth limit...]") : b.push("[end]");
+	return b.join("")
+};
+goog.debug.MAX_STACK_DEPTH = 50;
+goog.debug.getNativeStackTrace_ = function (a) {
+	var b = Error();
+	if (Error.captureStackTrace) return Error.captureStackTrace(b, a), String(b.stack);
+	try {
+		throw b;
+	} catch (c) {
+		b = c
+	}
+	return (a = b.stack) ? String(a) : null
+};
+goog.debug.getStacktrace = function (a) {
+	var b;
+	goog.debug.FORCE_SLOPPY_STACKS || (b = goog.debug.getNativeStackTrace_(a || goog.debug.getStacktrace));
+	b || (b = goog.debug.getStacktraceHelper_(a || arguments.callee.caller, []));
+	return b
+};
+goog.debug.getStacktraceHelper_ = function (a, b) {
+	var c = [];
+	if (goog.array.contains(b, a)) c.push("[...circular reference...]");
+	else if (a && b.length < goog.debug.MAX_STACK_DEPTH) {
+		c.push(goog.debug.getFunctionName(a) + "(");
+		for (var d = a.arguments, e = 0; d && e < d.length; e++) {
+			0 < e && c.push(", ");
+			var f;
+			f = d[e];
+			switch (typeof f) {
+				case "object":
+					f = f ? "object" : "null";
+					break;
+				case "string":
+					break;
+				case "number":
+					f = String(f);
+					break;
+				case "boolean":
+					f = f ? "true" : "false";
+					break;
+				case "function":
+					f = (f = goog.debug.getFunctionName(f)) ? f : "[fn]";
+					break;
+				default:
+					f = typeof f
+			}
+			40 < f.length && (f = f.substr(0, 40) + "...");
+			c.push(f)
+		}
+		b.push(a);
+		c.push(")\n");
+		try {
+			c.push(goog.debug.getStacktraceHelper_(a.caller, b))
+		} catch (g) {
+			c.push("[exception trying to get caller]\n")
+		}
+	} else a ? c.push("[...long stack...]") : c.push("[end]");
+	return c.join("")
+};
+goog.debug.setFunctionResolver = function (a) {
+	goog.debug.fnNameResolver_ = a
+};
+goog.debug.getFunctionName = function (a) {
+	if (goog.debug.fnNameCache_[a]) return goog.debug.fnNameCache_[a];
+	if (goog.debug.fnNameResolver_) {
+		var b = goog.debug.fnNameResolver_(a);
+		if (b) return goog.debug.fnNameCache_[a] = b
+	}
+	a = String(a);
+	goog.debug.fnNameCache_[a] || (b = /function ([^\(]+)/.exec(a), goog.debug.fnNameCache_[a] = b ? b[1] : "[Anonymous]");
+	return goog.debug.fnNameCache_[a]
+};
+goog.debug.makeWhitespaceVisible = function (a) {
+	return a.replace(/ /g, "[_]").replace(/\f/g, "[f]").replace(/\n/g, "[n]\n").replace(/\r/g, "[r]").replace(/\t/g, "[t]")
+};
+goog.debug.runtimeType = function (a) {
+	return a instanceof Function ? a.displayName || a.name || "unknown type name" : a instanceof Object ? a.constructor.displayName || a.constructor.name || Object.prototype.toString.call(a) : null === a ? "null" : typeof a
+};
+goog.debug.fnNameCache_ = {};
+goog.debug.LogRecord = function (a, b, c, d, e) {
+	this.reset(a, b, c, d, e)
+};
+goog.debug.LogRecord.prototype.sequenceNumber_ = 0;
+goog.debug.LogRecord.prototype.exception_ = null;
+goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS = !0;
+goog.debug.LogRecord.nextSequenceNumber_ = 0;
+goog.debug.LogRecord.prototype.reset = function (a, b, c, d, e) {
+	goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS && (this.sequenceNumber_ = "number" == typeof e ? e : goog.debug.LogRecord.nextSequenceNumber_++);
+	this.time_ = d || goog.now();
+	this.level_ = a;
+	this.msg_ = b;
+	this.loggerName_ = c;
+	delete this.exception_
+};
+goog.debug.LogRecord.prototype.getLoggerName = function () {
+	return this.loggerName_
+};
+goog.debug.LogRecord.prototype.getException = function () {
+	return this.exception_
+};
+goog.debug.LogRecord.prototype.setException = function (a) {
+	this.exception_ = a
+};
+goog.debug.LogRecord.prototype.setLoggerName = function (a) {
+	this.loggerName_ = a
+};
+goog.debug.LogRecord.prototype.getLevel = function () {
+	return this.level_
+};
+goog.debug.LogRecord.prototype.setLevel = function (a) {
+	this.level_ = a
+};
+goog.debug.LogRecord.prototype.getMessage = function () {
+	return this.msg_
+};
+goog.debug.LogRecord.prototype.setMessage = function (a) {
+	this.msg_ = a
+};
+goog.debug.LogRecord.prototype.getMillis = function () {
+	return this.time_
+};
+goog.debug.LogRecord.prototype.setMillis = function (a) {
+	this.time_ = a
+};
+goog.debug.LogRecord.prototype.getSequenceNumber = function () {
+	return this.sequenceNumber_
+};
+goog.debug.LogBuffer = function () {
+	goog.asserts.assert(goog.debug.LogBuffer.isBufferingEnabled(), "Cannot use goog.debug.LogBuffer without defining goog.debug.LogBuffer.CAPACITY.");
+	this.clear()
+};
+goog.debug.LogBuffer.getInstance = function () {
+	goog.debug.LogBuffer.instance_ || (goog.debug.LogBuffer.instance_ = new goog.debug.LogBuffer);
+	return goog.debug.LogBuffer.instance_
+};
+goog.debug.LogBuffer.CAPACITY = 0;
+goog.debug.LogBuffer.prototype.addRecord = function (a, b, c) {
+	var d = (this.curIndex_ + 1) % goog.debug.LogBuffer.CAPACITY;
+	this.curIndex_ = d;
+	if (this.isFull_) return d = this.buffer_[d], d.reset(a, b, c), d;
+	this.isFull_ = d == goog.debug.LogBuffer.CAPACITY - 1;
+	return this.buffer_[d] = new goog.debug.LogRecord(a, b, c)
+};
+goog.debug.LogBuffer.isBufferingEnabled = function () {
+	return 0 < goog.debug.LogBuffer.CAPACITY
+};
+goog.debug.LogBuffer.prototype.clear = function () {
+	this.buffer_ = Array(goog.debug.LogBuffer.CAPACITY);
+	this.curIndex_ = -1;
+	this.isFull_ = !1
+};
+goog.debug.LogBuffer.prototype.forEachRecord = function (a) {
+	var b = this.buffer_;
+	if (b[0]) {
+		var c = this.curIndex_,
+			d = this.isFull_ ? c : -1;
+		do d = (d + 1) % goog.debug.LogBuffer.CAPACITY, a(b[d]); while (d != c)
+	}
+};
+goog.debug.Logger = function (a) {
+	this.name_ = a;
+	this.handlers_ = this.children_ = this.level_ = this.parent_ = null
+};
+goog.debug.Logger.ROOT_LOGGER_NAME = "";
+goog.debug.Logger.ENABLE_HIERARCHY = !0;
+goog.debug.Logger.ENABLE_HIERARCHY || (goog.debug.Logger.rootHandlers_ = []);
+goog.debug.Logger.Level = function (a, b) {
+	this.name = a;
+	this.value = b
+};
+goog.debug.Logger.Level.prototype.toString = function () {
+	return this.name
+};
+goog.debug.Logger.Level.OFF = new goog.debug.Logger.Level("OFF", Infinity);
+goog.debug.Logger.Level.SHOUT = new goog.debug.Logger.Level("SHOUT", 1200);
+goog.debug.Logger.Level.SEVERE = new goog.debug.Logger.Level("SEVERE", 1E3);
+goog.debug.Logger.Level.WARNING = new goog.debug.Logger.Level("WARNING", 900);
+goog.debug.Logger.Level.INFO = new goog.debug.Logger.Level("INFO", 800);
+goog.debug.Logger.Level.CONFIG = new goog.debug.Logger.Level("CONFIG", 700);
+goog.debug.Logger.Level.FINE = new goog.debug.Logger.Level("FINE", 500);
+goog.debug.Logger.Level.FINER = new goog.debug.Logger.Level("FINER", 400);
+goog.debug.Logger.Level.FINEST = new goog.debug.Logger.Level("FINEST", 300);
+goog.debug.Logger.Level.ALL = new goog.debug.Logger.Level("ALL", 0);
+goog.debug.Logger.Level.PREDEFINED_LEVELS = [goog.debug.Logger.Level.OFF, goog.debug.Logger.Level.SHOUT, goog.debug.Logger.Level.SEVERE, goog.debug.Logger.Level.WARNING, goog.debug.Logger.Level.INFO, goog.debug.Logger.Level.CONFIG, goog.debug.Logger.Level.FINE, goog.debug.Logger.Level.FINER, goog.debug.Logger.Level.FINEST, goog.debug.Logger.Level.ALL];
+goog.debug.Logger.Level.predefinedLevelsCache_ = null;
+goog.debug.Logger.Level.createPredefinedLevelsCache_ = function () {
+	goog.debug.Logger.Level.predefinedLevelsCache_ = {};
+	for (var a = 0, b; b = goog.debug.Logger.Level.PREDEFINED_LEVELS[a]; a++) goog.debug.Logger.Level.predefinedLevelsCache_[b.value] = b, goog.debug.Logger.Level.predefinedLevelsCache_[b.name] = b
+};
+goog.debug.Logger.Level.getPredefinedLevel = function (a) {
+	goog.debug.Logger.Level.predefinedLevelsCache_ || goog.debug.Logger.Level.createPredefinedLevelsCache_();
+	return goog.debug.Logger.Level.predefinedLevelsCache_[a] || null
+};
+goog.debug.Logger.Level.getPredefinedLevelByValue = function (a) {
+	goog.debug.Logger.Level.predefinedLevelsCache_ || goog.debug.Logger.Level.createPredefinedLevelsCache_();
+	if (a in goog.debug.Logger.Level.predefinedLevelsCache_) return goog.debug.Logger.Level.predefinedLevelsCache_[a];
+	for (var b = 0; b < goog.debug.Logger.Level.PREDEFINED_LEVELS.length; ++b) {
+		var c = goog.debug.Logger.Level.PREDEFINED_LEVELS[b];
+		if (c.value <= a) return c
+	}
+	return null
+};
+goog.debug.Logger.getLogger = function (a) {
+	return goog.debug.LogManager.getLogger(a)
+};
+goog.debug.Logger.logToProfilers = function (a) {
+	goog.global.console && (goog.global.console.timeStamp ? goog.global.console.timeStamp(a) : goog.global.console.markTimeline && goog.global.console.markTimeline(a));
+	goog.global.msWriteProfilerMark && goog.global.msWriteProfilerMark(a)
+};
+goog.debug.Logger.prototype.getName = function () {
+	return this.name_
+};
+goog.debug.Logger.prototype.addHandler = function (a) {
+	goog.debug.LOGGING_ENABLED && (goog.debug.Logger.ENABLE_HIERARCHY ? (this.handlers_ || (this.handlers_ = []), this.handlers_.push(a)) : (goog.asserts.assert(!this.name_, "Cannot call addHandler on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."), goog.debug.Logger.rootHandlers_.push(a)))
+};
+goog.debug.Logger.prototype.removeHandler = function (a) {
+	if (goog.debug.LOGGING_ENABLED) {
+		var b = goog.debug.Logger.ENABLE_HIERARCHY ? this.handlers_ : goog.debug.Logger.rootHandlers_;
+		return !!b && goog.array.remove(b, a)
+	}
+	return !1
+};
+goog.debug.Logger.prototype.getParent = function () {
+	return this.parent_
+};
+goog.debug.Logger.prototype.getChildren = function () {
+	this.children_ || (this.children_ = {});
+	return this.children_
+};
+goog.debug.Logger.prototype.setLevel = function (a) {
+	goog.debug.LOGGING_ENABLED && (goog.debug.Logger.ENABLE_HIERARCHY ? this.level_ = a : (goog.asserts.assert(!this.name_, "Cannot call setLevel() on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."), goog.debug.Logger.rootLevel_ = a))
+};
+goog.debug.Logger.prototype.getLevel = function () {
+	return goog.debug.LOGGING_ENABLED ? this.level_ : goog.debug.Logger.Level.OFF
+};
+goog.debug.Logger.prototype.getEffectiveLevel = function () {
+	if (!goog.debug.LOGGING_ENABLED) return goog.debug.Logger.Level.OFF;
+	if (!goog.debug.Logger.ENABLE_HIERARCHY) return goog.debug.Logger.rootLevel_;
+	if (this.level_) return this.level_;
+	if (this.parent_) return this.parent_.getEffectiveLevel();
+	goog.asserts.fail("Root logger has no level set.");
+	return null
+};
+goog.debug.Logger.prototype.isLoggable = function (a) {
+	return goog.debug.LOGGING_ENABLED && a.value >= this.getEffectiveLevel().value
+};
+goog.debug.Logger.prototype.log = function (a, b, c) {
+	goog.debug.LOGGING_ENABLED && this.isLoggable(a) && (goog.isFunction(b) && (b = b()), this.doLogRecord_(this.getLogRecord(a, b, c)))
+};
+goog.debug.Logger.prototype.getLogRecord = function (a, b, c) {
+	a = goog.debug.LogBuffer.isBufferingEnabled() ? goog.debug.LogBuffer.getInstance().addRecord(a, b, this.name_) : new goog.debug.LogRecord(a, String(b), this.name_);
+	c && a.setException(c);
+	return a
+};
+goog.debug.Logger.prototype.shout = function (a, b) {
+	goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.SHOUT, a, b)
+};
+goog.debug.Logger.prototype.severe = function (a, b) {
+	goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.SEVERE, a, b)
+};
+goog.debug.Logger.prototype.warning = function (a, b) {
+	goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.WARNING, a, b)
+};
+goog.debug.Logger.prototype.info = function (a, b) {
+	goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.INFO, a, b)
+};
+goog.debug.Logger.prototype.config = function (a, b) {
+	goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.CONFIG, a, b)
+};
+goog.debug.Logger.prototype.fine = function (a, b) {
+	goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.FINE, a, b)
+};
+goog.debug.Logger.prototype.finer = function (a, b) {
+	goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.FINER, a, b)
+};
+goog.debug.Logger.prototype.finest = function (a, b) {
+	goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.FINEST, a, b)
+};
+goog.debug.Logger.prototype.logRecord = function (a) {
+	goog.debug.LOGGING_ENABLED && this.isLoggable(a.getLevel()) && this.doLogRecord_(a)
+};
+goog.debug.Logger.prototype.doLogRecord_ = function (a) {
+	goog.debug.Logger.logToProfilers("log:" + a.getMessage());
+	if (goog.debug.Logger.ENABLE_HIERARCHY)
+		for (var b = this; b;) b.callPublish_(a), b = b.getParent();
+	else
+		for (var b = 0, c; c = goog.debug.Logger.rootHandlers_[b++];) c(a)
+};
+goog.debug.Logger.prototype.callPublish_ = function (a) {
+	if (this.handlers_)
+		for (var b = 0, c; c = this.handlers_[b]; b++) c(a)
+};
+goog.debug.Logger.prototype.setParent_ = function (a) {
+	this.parent_ = a
+};
+goog.debug.Logger.prototype.addChild_ = function (a, b) {
+	this.getChildren()[a] = b
+};
+goog.debug.LogManager = {};
+goog.debug.LogManager.loggers_ = {};
+goog.debug.LogManager.rootLogger_ = null;
+goog.debug.LogManager.initialize = function () {
+	goog.debug.LogManager.rootLogger_ || (goog.debug.LogManager.rootLogger_ = new goog.debug.Logger(goog.debug.Logger.ROOT_LOGGER_NAME), goog.debug.LogManager.loggers_[goog.debug.Logger.ROOT_LOGGER_NAME] = goog.debug.LogManager.rootLogger_, goog.debug.LogManager.rootLogger_.setLevel(goog.debug.Logger.Level.CONFIG))
+};
+goog.debug.LogManager.getLoggers = function () {
+	return goog.debug.LogManager.loggers_
+};
+goog.debug.LogManager.getRoot = function () {
+	goog.debug.LogManager.initialize();
+	return goog.debug.LogManager.rootLogger_
+};
+goog.debug.LogManager.getLogger = function (a) {
+	goog.debug.LogManager.initialize();
+	return goog.debug.LogManager.loggers_[a] || goog.debug.LogManager.createLogger_(a)
+};
+goog.debug.LogManager.createFunctionForCatchErrors = function (a) {
+	return function (b) {
+		(a || goog.debug.LogManager.getRoot()).severe("Error: " + b.message + " (" + b.fileName + " @ Line: " + b.line + ")")
+	}
+};
+goog.debug.LogManager.createLogger_ = function (a) {
+	var b = new goog.debug.Logger(a);
+	if (goog.debug.Logger.ENABLE_HIERARCHY) {
+		var c = a.lastIndexOf("."),
+			d = a.substr(0, c),
+			c = a.substr(c + 1),
+			d = goog.debug.LogManager.getLogger(d);
+		d.addChild_(c, b);
+		b.setParent_(d)
+	}
+	return goog.debug.LogManager.loggers_[a] = b
+};
+goog.log = {};
+goog.log.ENABLED = goog.debug.LOGGING_ENABLED;
+goog.log.ROOT_LOGGER_NAME = goog.debug.Logger.ROOT_LOGGER_NAME;
+goog.log.Logger = goog.debug.Logger;
+goog.log.Level = goog.debug.Logger.Level;
+goog.log.LogRecord = goog.debug.LogRecord;
+goog.log.getLogger = function (a, b) {
+	if (goog.log.ENABLED) {
+		var c = goog.debug.LogManager.getLogger(a);
+		b && c && c.setLevel(b);
+		return c
+	}
+	return null
+};
+goog.log.addHandler = function (a, b) {
+	goog.log.ENABLED && a && a.addHandler(b)
+};
+goog.log.removeHandler = function (a, b) {
+	return goog.log.ENABLED && a ? a.removeHandler(b) : !1
+};
+goog.log.log = function (a, b, c, d) {
+	goog.log.ENABLED && a && a.log(b, c, d)
+};
+goog.log.error = function (a, b, c) {
+	goog.log.ENABLED && a && a.severe(b, c)
+};
+goog.log.warning = function (a, b, c) {
+	goog.log.ENABLED && a && a.warning(b, c)
+};
+goog.log.info = function (a, b, c) {
+	goog.log.ENABLED && a && a.info(b, c)
+};
+goog.log.fine = function (a, b, c) {
+	goog.log.ENABLED && a && a.fine(b, c)
+};
+goog.string.StringBuffer = function (a, b) {
+	null != a && this.append.apply(this, arguments)
+};
+goog.string.StringBuffer.prototype.buffer_ = "";
+goog.string.StringBuffer.prototype.set = function (a) {
+	this.buffer_ = "" + a
+};
+goog.string.StringBuffer.prototype.append = function (a, b, c) {
+	this.buffer_ += String(a);
+	if (null != b)
+		for (var d = 1; d < arguments.length; d++) this.buffer_ += arguments[d];
+	return this
+};
+goog.string.StringBuffer.prototype.clear = function () {
+	this.buffer_ = ""
+};
+goog.string.StringBuffer.prototype.getLength = function () {
+	return this.buffer_.length
+};
+goog.string.StringBuffer.prototype.toString = function () {
+	return this.buffer_
+};
+goog.ui.tree = {};
+goog.ui.tree.BaseNode = function (a, b, c) {
+	goog.ui.Component.call(this, c);
+	this.config_ = b || goog.ui.tree.BaseNode.defaultConfig;
+	this.html_ = goog.html.SafeHtml.htmlEscapePreservingNewlines(a);
+	this.expanded_ = this.selected_ = !1;
+	this.toolTip_ = null;
+	this.afterLabelHtml_ = goog.html.SafeHtml.EMPTY;
+	this.isUserCollapsible_ = !0;
+	this.depth_ = -1
+};
+goog.inherits(goog.ui.tree.BaseNode, goog.ui.Component);
+goog.ui.tree.BaseNode.EventType = {
+	BEFORE_EXPAND: "beforeexpand",
+	EXPAND: "expand",
+	BEFORE_COLLAPSE: "beforecollapse",
+	COLLAPSE: "collapse"
+};
+goog.ui.tree.BaseNode.allNodes = {};
+goog.ui.tree.BaseNode.prototype.disposeInternal = function () {
+	goog.ui.tree.BaseNode.superClass_.disposeInternal.call(this);
+	this.tree && (this.tree.removeNode(this), this.tree = null);
+	this.setElementInternal(null)
+};
+goog.ui.tree.BaseNode.prototype.initAccessibility = function () {
+	var a = this.getElement();
+	if (a) {
+		var b = this.getLabelElement();
+		b && !b.id && (b.id = this.getId() + ".label");
+		goog.a11y.aria.setRole(a, "treeitem");
+		goog.a11y.aria.setState(a, "selected", !1);
+		goog.a11y.aria.setState(a, "expanded", !1);
+		goog.a11y.aria.setState(a, "level", this.getDepth());
+		b && goog.a11y.aria.setState(a, "labelledby", b.id);
+		(a = this.getIconElement()) && goog.a11y.aria.setRole(a, "presentation");
+		(a = this.getExpandIconElement()) && goog.a11y.aria.setRole(a,
+			"presentation");
+		if (a = this.getChildrenElement())
+			if (goog.a11y.aria.setRole(a, "group"), a.hasChildNodes())
+				for (a = this.getChildCount(), b = 1; b <= a; b++) {
+					var c = this.getChildAt(b - 1).getElement();
+					goog.asserts.assert(c, "The child element cannot be null");
+					goog.a11y.aria.setState(c, "setsize", a);
+					goog.a11y.aria.setState(c, "posinset", b)
+				}
+	}
+};
+goog.ui.tree.BaseNode.prototype.createDom = function () {
+	var a = this.getDomHelper().safeHtmlToNode(this.toSafeHtml());
+	this.setElementInternal(a)
+};
+goog.ui.tree.BaseNode.prototype.enterDocument = function () {
+	goog.ui.tree.BaseNode.superClass_.enterDocument.call(this);
+	goog.ui.tree.BaseNode.allNodes[this.getId()] = this;
+	this.initAccessibility()
+};
+goog.ui.tree.BaseNode.prototype.exitDocument = function () {
+	goog.ui.tree.BaseNode.superClass_.exitDocument.call(this);
+	delete goog.ui.tree.BaseNode.allNodes[this.getId()]
+};
+goog.ui.tree.BaseNode.prototype.addChildAt = function (a, b, c) {
+	goog.asserts.assert(!a.getParent());
+	goog.asserts.assertInstanceof(a, goog.ui.tree.BaseNode);
+	c = this.getChildAt(b - 1);
+	var d = this.getChildAt(b);
+	goog.ui.tree.BaseNode.superClass_.addChildAt.call(this, a, b);
+	a.previousSibling_ = c;
+	a.nextSibling_ = d;
+	c ? c.nextSibling_ = a : this.firstChild_ = a;
+	d ? d.previousSibling_ = a : this.lastChild_ = a;
+	(b = this.getTree()) && a.setTreeInternal(b);
+	a.setDepth_(this.getDepth() + 1);
+	if (this.getElement() && (this.updateExpandIcon(), this.getExpanded())) {
+		b =
+			this.getChildrenElement();
+		a.getElement() || a.createDom();
+		var e = a.getElement(),
+			f = d && d.getElement();
+		b.insertBefore(e, f);
+		this.isInDocument() && a.enterDocument();
+		d || (c ? c.updateExpandIcon() : (goog.style.setElementShown(b, !0), this.setExpanded(this.getExpanded())))
+	}
+};
+goog.ui.tree.BaseNode.prototype.add = function (a, b) {
+	goog.asserts.assert(!b || b.getParent() == this, "Can only add nodes before siblings");
+	a.getParent() && a.getParent().removeChild(a);
+	this.addChildAt(a, b ? this.indexOfChild(b) : this.getChildCount());
+	return a
+};
+goog.ui.tree.BaseNode.prototype.removeChild = function (a, b) {
+	var c = this.getTree(),
+		d = c ? c.getSelectedItem() : null;
+	if (d == a || a.contains(d)) c.hasFocus() ? (this.select(), goog.Timer.callOnce(this.onTimeoutSelect_, 10, this)) : this.select();
+	goog.ui.tree.BaseNode.superClass_.removeChild.call(this, a);
+	this.lastChild_ == a && (this.lastChild_ = a.previousSibling_);
+	this.firstChild_ == a && (this.firstChild_ = a.nextSibling_);
+	a.previousSibling_ && (a.previousSibling_.nextSibling_ = a.nextSibling_);
+	a.nextSibling_ && (a.nextSibling_.previousSibling_ =
+		a.previousSibling_);
+	d = a.isLastSibling();
+	a.tree = null;
+	a.depth_ = -1;
+	if (c && (c.removeNode(a), this.isInDocument())) {
+		c = this.getChildrenElement();
+		if (a.isInDocument()) {
+			var e = a.getElement();
+			c.removeChild(e);
+			a.exitDocument()
+		}
+		d && (d = this.getLastChild()) && d.updateExpandIcon();
+		this.hasChildren() || (c.style.display = "none", this.updateExpandIcon(), this.updateIcon_())
+	}
+	return a
+};
+goog.ui.tree.BaseNode.prototype.remove = goog.ui.tree.BaseNode.prototype.removeChild;
+goog.ui.tree.BaseNode.prototype.onTimeoutSelect_ = function () {
+	this.select()
+};
+goog.ui.tree.BaseNode.prototype.getTree = goog.abstractMethod;
+goog.ui.tree.BaseNode.prototype.getDepth = function () {
+	var a = this.depth_;
+	0 > a && (a = this.computeDepth_(), this.setDepth_(a));
+	return a
+};
+goog.ui.tree.BaseNode.prototype.computeDepth_ = function () {
+	var a = this.getParent();
+	return a ? a.getDepth() + 1 : 0
+};
+goog.ui.tree.BaseNode.prototype.setDepth_ = function (a) {
+	if (a != this.depth_) {
+		this.depth_ = a;
+		var b = this.getRowElement();
+		if (b) {
+			var c = this.getPixelIndent_() + "px";
+			this.isRightToLeft() ? b.style.paddingRight = c : b.style.paddingLeft = c
+		}
+		this.forEachChild(function (b) {
+			b.setDepth_(a + 1)
+		})
+	}
+};
+goog.ui.tree.BaseNode.prototype.contains = function (a) {
+	for (; a;) {
+		if (a == this) return !0;
+		a = a.getParent()
+	}
+	return !1
+};
+goog.ui.tree.BaseNode.EMPTY_CHILDREN_ = [];
+goog.ui.tree.BaseNode.prototype.getChildren = function () {
+	var a = [];
+	this.forEachChild(function (b) {
+		a.push(b)
+	});
+	return a
+};
+goog.ui.tree.BaseNode.prototype.getFirstChild = function () {
+	return this.getChildAt(0)
+};
+goog.ui.tree.BaseNode.prototype.getLastChild = function () {
+	return this.getChildAt(this.getChildCount() - 1)
+};
+goog.ui.tree.BaseNode.prototype.getPreviousSibling = function () {
+	return this.previousSibling_
+};
+goog.ui.tree.BaseNode.prototype.getNextSibling = function () {
+	return this.nextSibling_
+};
+goog.ui.tree.BaseNode.prototype.isLastSibling = function () {
+	return !this.nextSibling_
+};
+goog.ui.tree.BaseNode.prototype.isSelected = function () {
+	return this.selected_
+};
+goog.ui.tree.BaseNode.prototype.select = function () {
+	var a = this.getTree();
+	a && a.setSelectedItem(this)
+};
+goog.ui.tree.BaseNode.prototype.deselect = goog.nullFunction;
+goog.ui.tree.BaseNode.prototype.setSelectedInternal = function (a) {
+	if (this.selected_ != a) {
+		this.selected_ = a;
+		this.updateRow();
+		var b = this.getElement();
+		b && (goog.a11y.aria.setState(b, "selected", a), a && (a = this.getTree().getElement(), goog.asserts.assert(a, "The DOM element for the tree cannot be null"), goog.a11y.aria.setState(a, "activedescendant", this.getId())))
+	}
+};
+goog.ui.tree.BaseNode.prototype.getExpanded = function () {
+	return this.expanded_
+};
+goog.ui.tree.BaseNode.prototype.setExpandedInternal = function (a) {
+	this.expanded_ = a
+};
+goog.ui.tree.BaseNode.prototype.setExpanded = function (a) {
+	var b = a != this.expanded_;
+	if (!b || this.dispatchEvent(a ? goog.ui.tree.BaseNode.EventType.BEFORE_EXPAND : goog.ui.tree.BaseNode.EventType.BEFORE_COLLAPSE)) {
+		var c;
+		this.expanded_ = a;
+		c = this.getTree();
+		var d = this.getElement();
+		if (this.hasChildren()) {
+			if (!a && c && this.contains(c.getSelectedItem()) && this.select(), d) {
+				if (c = this.getChildrenElement())
+					if (goog.style.setElementShown(c, a), a && this.isInDocument() && !c.hasChildNodes()) {
+						var e = [];
+						this.forEachChild(function (a) {
+							e.push(a.toSafeHtml())
+						});
+						goog.dom.safe.setInnerHtml(c, goog.html.SafeHtml.concat(e));
+						this.forEachChild(function (a) {
+							a.enterDocument()
+						})
+					}
+				this.updateExpandIcon()
+			}
+		} else (c = this.getChildrenElement()) && goog.style.setElementShown(c, !1);
+		d && (this.updateIcon_(), goog.a11y.aria.setState(d, "expanded", a));
+		b && this.dispatchEvent(a ? goog.ui.tree.BaseNode.EventType.EXPAND : goog.ui.tree.BaseNode.EventType.COLLAPSE)
+	}
+};
+goog.ui.tree.BaseNode.prototype.toggle = function () {
+	this.setExpanded(!this.getExpanded())
+};
+goog.ui.tree.BaseNode.prototype.expand = function () {
+	this.setExpanded(!0)
+};
+goog.ui.tree.BaseNode.prototype.collapse = function () {
+	this.setExpanded(!1)
+};
+goog.ui.tree.BaseNode.prototype.collapseChildren = function () {
+	this.forEachChild(function (a) {
+		a.collapseAll()
+	})
+};
+goog.ui.tree.BaseNode.prototype.collapseAll = function () {
+	this.collapseChildren();
+	this.collapse()
+};
+goog.ui.tree.BaseNode.prototype.expandChildren = function () {
+	this.forEachChild(function (a) {
+		a.expandAll()
+	})
+};
+goog.ui.tree.BaseNode.prototype.expandAll = function () {
+	this.expandChildren();
+	this.expand()
+};
+goog.ui.tree.BaseNode.prototype.reveal = function () {
+	var a = this.getParent();
+	a && (a.setExpanded(!0), a.reveal())
+};
+goog.ui.tree.BaseNode.prototype.setIsUserCollapsible = function (a) {
+	(this.isUserCollapsible_ = a) || this.expand();
+	this.getElement() && this.updateExpandIcon()
+};
+goog.ui.tree.BaseNode.prototype.isUserCollapsible = function () {
+	return this.isUserCollapsible_
+};
+goog.ui.tree.BaseNode.prototype.toSafeHtml = function () {
+	var a = this.getTree(),
+		b = !a.getShowLines() || a == this.getParent() && !a.getShowRootLines() ? this.config_.cssChildrenNoLines : this.config_.cssChildren,
+		a = this.getExpanded() && this.hasChildren(),
+		b = {
+        	"class": b,
+        	style: this.getLineStyle()
+		},
+		c = [];
+	a && this.forEachChild(function (a) {
+		c.push(a.toSafeHtml())
+	});
+	a = goog.html.SafeHtml.create("div", b, c);
+	return goog.html.SafeHtml.create("div", {
+		"class": this.config_.cssItem,
+		id: this.getId()
+	}, [this.getRowSafeHtml(), a])
+};
+goog.ui.tree.BaseNode.prototype.getPixelIndent_ = function () {
+	return Math.max(0, (this.getDepth() - 1) * this.config_.indentWidth)
+};
+goog.ui.tree.BaseNode.prototype.getRowSafeHtml = function () {
+	var a = {};
+	a["padding-" + (this.isRightToLeft() ? "right" : "left")] = this.getPixelIndent_() + "px";
+	var a = {
+		"class": this.getRowClassName(),
+		style: a
+	},
+		b = [this.getExpandIconSafeHtml(), this.getIconSafeHtml(), this.getLabelSafeHtml()];
+	return goog.html.SafeHtml.create("div", a, b)
+};
+goog.ui.tree.BaseNode.prototype.getRowClassName = function () {
+	var a;
+	a = this.isSelected() ? " " + this.config_.cssSelectedRow : "";
+	return this.config_.cssTreeRow + a
+};
+goog.ui.tree.BaseNode.prototype.getLabelSafeHtml = function () {
+	var a = goog.html.SafeHtml.create("span", {
+		"class": this.config_.cssItemLabel,
+		title: this.getToolTip() || null
+	}, this.getSafeHtml());
+	return goog.html.SafeHtml.concat(a, goog.html.SafeHtml.create("span", {}, this.getAfterLabelSafeHtml()))
+};
+goog.ui.tree.BaseNode.prototype.getAfterLabelHtml = function () {
+	return goog.html.SafeHtml.unwrap(this.getAfterLabelSafeHtml())
+};
+goog.ui.tree.BaseNode.prototype.getAfterLabelSafeHtml = function () {
+	return this.afterLabelHtml_
+};
+goog.ui.tree.BaseNode.prototype.setAfterLabelSafeHtml = function (a) {
+	this.afterLabelHtml_ = a;
+	var b = this.getAfterLabelElement();
+	b && goog.dom.safe.setInnerHtml(b, a)
+};
+goog.ui.tree.BaseNode.prototype.getIconSafeHtml = function () {
+	return goog.html.SafeHtml.create("span", {
+		style: {
+			display: "inline-block"
+		},
+		"class": this.getCalculatedIconClass()
+	})
+};
+goog.ui.tree.BaseNode.prototype.getCalculatedIconClass = goog.abstractMethod;
+goog.ui.tree.BaseNode.prototype.getExpandIconSafeHtml = function () {
+	return goog.html.SafeHtml.create("span", {
+		type: "expand",
+		style: {
+			display: "inline-block"
+		},
+		"class": this.getExpandIconClass()
+	})
+};
+goog.ui.tree.BaseNode.prototype.getExpandIconClass = function () {
+	var a = this.getTree(),
+		b = !a.getShowLines() || a == this.getParent() && !a.getShowRootLines(),
+		c = this.config_,
+		d = new goog.string.StringBuffer;
+	d.append(c.cssTreeIcon, " ", c.cssExpandTreeIcon, " ");
+	if (this.hasChildren()) {
+		var e = 0;
+		a.getShowExpandIcons() && this.isUserCollapsible_ && (e = this.getExpanded() ? 2 : 1);
+		b || (e = this.isLastSibling() ? e + 4 : e + 8);
+		switch (e) {
+			case 1:
+				d.append(c.cssExpandTreeIconPlus);
+				break;
+			case 2:
+				d.append(c.cssExpandTreeIconMinus);
+				break;
+			case 4:
+				d.append(c.cssExpandTreeIconL);
+				break;
+			case 5:
+				d.append(c.cssExpandTreeIconLPlus);
+				break;
+			case 6:
+				d.append(c.cssExpandTreeIconLMinus);
+				break;
+			case 8:
+				d.append(c.cssExpandTreeIconT);
+				break;
+			case 9:
+				d.append(c.cssExpandTreeIconTPlus);
+				break;
+			case 10:
+				d.append(c.cssExpandTreeIconTMinus);
+				break;
+			default:
+				d.append(c.cssExpandTreeIconBlank)
+		}
+	} else b ? d.append(c.cssExpandTreeIconBlank) : this.isLastSibling() ? d.append(c.cssExpandTreeIconL) : d.append(c.cssExpandTreeIconT);
+	return d.toString()
+};
+goog.ui.tree.BaseNode.prototype.getLineStyle = function () {
+	var a = this.getExpanded() && this.hasChildren();
+	return goog.html.SafeStyle.create({
+		"background-position": this.getBackgroundPosition(),
+		display: a ? null : "none"
+	})
+};
+goog.ui.tree.BaseNode.prototype.getBackgroundPosition = function () {
+	return (this.isLastSibling() ? "-100" : (this.getDepth() - 1) * this.config_.indentWidth) + "px 0"
+};
+goog.ui.tree.BaseNode.prototype.getElement = function () {
+	var a = goog.ui.tree.BaseNode.superClass_.getElement.call(this);
+	a || (a = this.getDomHelper().getElement(this.getId()), this.setElementInternal(a));
+	return a
+};
+goog.ui.tree.BaseNode.prototype.getRowElement = function () {
+	var a = this.getElement();
+	return a ? a.firstChild : null
+};
+goog.ui.tree.BaseNode.prototype.getExpandIconElement = function () {
+	var a = this.getRowElement();
+	return a ? a.firstChild : null
+};
+goog.ui.tree.BaseNode.prototype.getIconElement = function () {
+	var a = this.getRowElement();
+	return a ? a.childNodes[1] : null
+};
+goog.ui.tree.BaseNode.prototype.getLabelElement = function () {
+	var a = this.getRowElement();
+	return a && a.lastChild ? a.lastChild.previousSibling : null
+};
+goog.ui.tree.BaseNode.prototype.getAfterLabelElement = function () {
+	var a = this.getRowElement();
+	return a ? a.lastChild : null
+};
+goog.ui.tree.BaseNode.prototype.getChildrenElement = function () {
+	var a = this.getElement();
+	return a ? a.lastChild : null
+};
+goog.ui.tree.BaseNode.prototype.setIconClass = function (a) {
+	this.iconClass_ = a;
+	this.isInDocument() && this.updateIcon_()
+};
+goog.ui.tree.BaseNode.prototype.getIconClass = function () {
+	return this.iconClass_
+};
+goog.ui.tree.BaseNode.prototype.setExpandedIconClass = function (a) {
+	this.expandedIconClass_ = a;
+	this.isInDocument() && this.updateIcon_()
+};
+goog.ui.tree.BaseNode.prototype.getExpandedIconClass = function () {
+	return this.expandedIconClass_
+};
+goog.ui.tree.BaseNode.prototype.setText = function (a) {
+	this.setSafeHtml(goog.html.SafeHtml.htmlEscape(a))
+};
+goog.ui.tree.BaseNode.prototype.getText = function () {
+	return goog.string.unescapeEntities(goog.html.SafeHtml.unwrap(this.html_))
+};
+goog.ui.tree.BaseNode.prototype.setSafeHtml = function (a) {
+	this.html_ = a;
+	var b = this.getLabelElement();
+	b && goog.dom.safe.setInnerHtml(b, a);
+	(a = this.getTree()) && a.setNode(this)
+};
+goog.ui.tree.BaseNode.prototype.getHtml = function () {
+	return goog.html.SafeHtml.unwrap(this.getSafeHtml())
+};
+goog.ui.tree.BaseNode.prototype.getSafeHtml = function () {
+	return this.html_
+};
+goog.ui.tree.BaseNode.prototype.setToolTip = function (a) {
+	this.toolTip_ = a;
+	var b = this.getLabelElement();
+	b && (b.title = a)
+};
+goog.ui.tree.BaseNode.prototype.getToolTip = function () {
+	return this.toolTip_
+};
+goog.ui.tree.BaseNode.prototype.updateRow = function () {
+	var a = this.getRowElement();
+	a && (a.className = this.getRowClassName())
+};
+goog.ui.tree.BaseNode.prototype.updateExpandIcon = function () {
+	var a = this.getExpandIconElement();
+	a && (a.className = this.getExpandIconClass());
+	if (a = this.getChildrenElement()) a.style.backgroundPosition = this.getBackgroundPosition()
+};
+goog.ui.tree.BaseNode.prototype.updateIcon_ = function () {
+	this.getIconElement().className = this.getCalculatedIconClass()
+};
+goog.ui.tree.BaseNode.prototype.onMouseDown = function (a) {
+	"expand" == a.target.getAttribute("type") && this.hasChildren() ? this.isUserCollapsible_ && this.toggle() : (this.select(), this.updateRow())
+};
+goog.ui.tree.BaseNode.prototype.onClick_ = goog.events.Event.preventDefault;
+goog.ui.tree.BaseNode.prototype.onDoubleClick_ = function (a) {
+	"expand" == a.target.getAttribute("type") && this.hasChildren() || this.isUserCollapsible_ && this.toggle()
+};
+goog.ui.tree.BaseNode.prototype.onKeyDown = function (a) {
+	var b = !0;
+	switch (a.keyCode) {
+		case goog.events.KeyCodes.RIGHT:
+			if (a.altKey) break;
+			this.hasChildren() && (this.getExpanded() ? this.getFirstChild().select() : this.setExpanded(!0));
+			break;
+		case goog.events.KeyCodes.LEFT:
+			if (a.altKey) break;
+			if (this.hasChildren() && this.getExpanded() && this.isUserCollapsible_) this.setExpanded(!1);
+			else {
+				var c = this.getParent(),
+					d = this.getTree();
+				c && (d.getShowRootNode() || c != d) && c.select()
+			}
+			break;
+		case goog.events.KeyCodes.DOWN:
+			(c = this.getNextShownNode()) &&
+			c.select();
+			break;
+		case goog.events.KeyCodes.UP:
+			(c = this.getPreviousShownNode()) && c.select();
+			break;
+		default:
+			b = !1
+	}
+	b && (a.preventDefault(), (d = this.getTree()) && d.clearTypeAhead());
+	return b
+};
+goog.ui.tree.BaseNode.prototype.getLastShownDescendant = function () {
+	return this.getExpanded() && this.hasChildren() ? this.getLastChild().getLastShownDescendant() : this
+};
+goog.ui.tree.BaseNode.prototype.getNextShownNode = function () {
+	if (this.hasChildren() && this.getExpanded()) return this.getFirstChild();
+	for (var a = this, b; a != this.getTree() ;) {
+		b = a.getNextSibling();
+		if (null != b) return b;
+		a = a.getParent()
+	}
+	return null
+};
+goog.ui.tree.BaseNode.prototype.getPreviousShownNode = function () {
+	var a = this.getPreviousSibling();
+	if (null != a) return a.getLastShownDescendant();
+	var a = this.getParent(),
+		b = this.getTree();
+	return !b.getShowRootNode() && a == b || this == b ? null : a
+};
+goog.ui.tree.BaseNode.prototype.getClientData = goog.ui.tree.BaseNode.prototype.getModel;
+goog.ui.tree.BaseNode.prototype.setClientData = goog.ui.tree.BaseNode.prototype.setModel;
+goog.ui.tree.BaseNode.prototype.getConfig = function () {
+	return this.config_
+};
+goog.ui.tree.BaseNode.prototype.setTreeInternal = function (a) {
+	this.tree != a && (this.tree = a, a.setNode(this), this.forEachChild(function (b) {
+		b.setTreeInternal(a)
+	}))
+};
+goog.ui.tree.BaseNode.defaultConfig = {
+	indentWidth: 19,
+	cssRoot: "goog-tree-root goog-tree-item",
+	cssHideRoot: "goog-tree-hide-root",
+	cssItem: "goog-tree-item",
+	cssChildren: "goog-tree-children",
+	cssChildrenNoLines: "goog-tree-children-nolines",
+	cssTreeRow: "goog-tree-row",
+	cssItemLabel: "goog-tree-item-label",
+	cssTreeIcon: "goog-tree-icon",
+	cssExpandTreeIcon: "goog-tree-expand-icon",
+	cssExpandTreeIconPlus: "goog-tree-expand-icon-plus",
+	cssExpandTreeIconMinus: "goog-tree-expand-icon-minus",
+	cssExpandTreeIconTPlus: "goog-tree-expand-icon-tplus",
+	cssExpandTreeIconTMinus: "goog-tree-expand-icon-tminus",
+	cssExpandTreeIconLPlus: "goog-tree-expand-icon-lplus",
+	cssExpandTreeIconLMinus: "goog-tree-expand-icon-lminus",
+	cssExpandTreeIconT: "goog-tree-expand-icon-t",
+	cssExpandTreeIconL: "goog-tree-expand-icon-l",
+	cssExpandTreeIconBlank: "goog-tree-expand-icon-blank",
+	cssExpandedFolderIcon: "goog-tree-expanded-folder-icon",
+	cssCollapsedFolderIcon: "goog-tree-collapsed-folder-icon",
+	cssFileIcon: "goog-tree-file-icon",
+	cssExpandedRootIcon: "goog-tree-expanded-folder-icon",
+	cssCollapsedRootIcon: "goog-tree-collapsed-folder-icon",
+	cssSelectedRow: "selected"
+};
+goog.ui.tree.TreeNode = function (a, b, c) {
+	goog.ui.tree.BaseNode.call(this, a, b, c)
+};
+goog.inherits(goog.ui.tree.TreeNode, goog.ui.tree.BaseNode);
+goog.ui.tree.TreeNode.prototype.getTree = function () {
+	if (this.tree) return this.tree;
+	var a = this.getParent();
+	return a && (a = a.getTree()) ? (this.setTreeInternal(a), a) : null
+};
+goog.ui.tree.TreeNode.prototype.getCalculatedIconClass = function () {
+	var a = this.getExpanded(),
+		b = this.getExpandedIconClass();
+	if (a && b) return b;
+	b = this.getIconClass();
+	if (!a && b) return b;
+	b = this.getConfig();
+	if (this.hasChildren()) {
+		if (a && b.cssExpandedFolderIcon) return b.cssTreeIcon + " " + b.cssExpandedFolderIcon;
+		if (!a && b.cssCollapsedFolderIcon) return b.cssTreeIcon + " " + b.cssCollapsedFolderIcon
+	} else if (b.cssFileIcon) return b.cssTreeIcon + " " + b.cssFileIcon;
+	return ""
+};
+goog.structs.Trie = function (a) {
+	this.value_ = void 0;
+	this.childNodes_ = {};
+	a && this.setAll(a)
+};
+goog.structs.Trie.prototype.set = function (a, b) {
+	this.setOrAdd_(a, b, !1)
+};
+goog.structs.Trie.prototype.add = function (a, b) {
+	this.setOrAdd_(a, b, !0)
+};
+goog.structs.Trie.prototype.setOrAdd_ = function (a, b, c) {
+	for (var d = this, e = 0; e < a.length; e++) {
+		var f = a.charAt(e);
+		d.childNodes_[f] || (d.childNodes_[f] = new goog.structs.Trie);
+		d = d.childNodes_[f]
+	}
+	if (c && void 0 !== d.value_) throw Error('The collection already contains the key "' + a + '"');
+	d.value_ = b
+};
+goog.structs.Trie.prototype.setAll = function (a) {
+	var b = goog.structs.getKeys(a);
+	a = goog.structs.getValues(a);
+	for (var c = 0; c < b.length; c++) this.set(b[c], a[c])
+};
+goog.structs.Trie.prototype.getChildNode_ = function (a) {
+	for (var b = this, c = 0; c < a.length; c++) {
+		var d = a.charAt(c),
+			b = b.childNodes_[d];
+		if (!b) return
+	}
+	return b
+};
+goog.structs.Trie.prototype.get = function (a) {
+	return (a = this.getChildNode_(a)) ? a.value_ : void 0
+};
+goog.structs.Trie.prototype.getKeyAndPrefixes = function (a, b) {
+	var c = this,
+		d = {},
+		e = b || 0;
+	void 0 !== c.value_ && (d[e] = c.value_);
+	for (; e < a.length; e++) {
+		var f = a.charAt(e);
+		if (!(f in c.childNodes_)) break;
+		c = c.childNodes_[f];
+		void 0 !== c.value_ && (d[e] = c.value_)
+	}
+	return d
+};
+goog.structs.Trie.prototype.getValues = function () {
+	var a = [];
+	this.getValuesInternal_(a);
+	return a
+};
+goog.structs.Trie.prototype.getValuesInternal_ = function (a) {
+	void 0 !== this.value_ && a.push(this.value_);
+	for (var b in this.childNodes_) this.childNodes_[b].getValuesInternal_(a)
+};
+goog.structs.Trie.prototype.getKeys = function (a) {
+	var b = [];
+	if (a) {
+		for (var c = this, d = 0; d < a.length; d++) {
+			var e = a.charAt(d);
+			if (!c.childNodes_[e]) return [];
+			c = c.childNodes_[e]
+		}
+		c.getKeysInternal_(a, b)
+	} else this.getKeysInternal_("", b);
+	return b
+};
+goog.structs.Trie.prototype.getKeysInternal_ = function (a, b) {
+	void 0 !== this.value_ && b.push(a);
+	for (var c in this.childNodes_) this.childNodes_[c].getKeysInternal_(a + c, b)
+};
+goog.structs.Trie.prototype.containsKey = function (a) {
+	return void 0 !== this.get(a)
+};
+goog.structs.Trie.prototype.containsPrefix = function (a) {
+	return 0 == a.length ? !this.isEmpty() : !!this.getChildNode_(a)
+};
+goog.structs.Trie.prototype.containsValue = function (a) {
+	if (this.value_ === a) return !0;
+	for (var b in this.childNodes_)
+		if (this.childNodes_[b].containsValue(a)) return !0;
+	return !1
+};
+goog.structs.Trie.prototype.clear = function () {
+	this.childNodes_ = {};
+	this.value_ = void 0
+};
+goog.structs.Trie.prototype.remove = function (a) {
+	for (var b = this, c = [], d = 0; d < a.length; d++) {
+		var e = a.charAt(d);
+		if (!b.childNodes_[e]) throw Error('The collection does not have the key "' + a + '"');
+		c.push([b, e]);
+		b = b.childNodes_[e]
+	}
+	a = b.value_;
+	for (delete b.value_; 0 < c.length;)
+		if (e = c.pop(), b = e[0], e = e[1], b.childNodes_[e].isEmpty()) delete b.childNodes_[e];
+		else break;
+	return a
+};
+goog.structs.Trie.prototype.clone = function () {
+	return new goog.structs.Trie(this)
+};
+goog.structs.Trie.prototype.getCount = function () {
+	return goog.structs.getCount(this.getValues())
+};
+goog.structs.Trie.prototype.isEmpty = function () {
+	return void 0 === this.value_ && goog.object.isEmpty(this.childNodes_)
+};
+goog.ui.tree.TypeAhead = function () {
+	this.nodeMap_ = new goog.structs.Trie;
+	this.buffer_ = "";
+	this.matchingNodes_ = this.matchingLabels_ = null;
+	this.matchingNodeIndex_ = this.matchingLabelIndex_ = 0
+};
+goog.ui.tree.TypeAhead.Offset = {
+	DOWN: 1,
+	UP: -1
+};
+goog.ui.tree.TypeAhead.prototype.handleNavigation = function (a) {
+	var b = !1;
+	switch (a.keyCode) {
+		case goog.events.KeyCodes.DOWN:
+		case goog.events.KeyCodes.UP:
+			a.ctrlKey && (this.jumpTo_(a.keyCode == goog.events.KeyCodes.DOWN ? goog.ui.tree.TypeAhead.Offset.DOWN : goog.ui.tree.TypeAhead.Offset.UP), b = !0);
+			break;
+		case goog.events.KeyCodes.BACKSPACE:
+			a = this.buffer_.length - 1;
+			b = !0;
+			0 < a ? (this.buffer_ = this.buffer_.substring(0, a), this.jumpToLabel_(this.buffer_)) : 0 == a ? this.buffer_ = "" : b = !1;
+			break;
+		case goog.events.KeyCodes.ESC:
+			this.buffer_ =
+				"", b = !0
+	}
+	return b
+};
+goog.ui.tree.TypeAhead.prototype.handleTypeAheadChar = function (a) {
+	var b = !1;
+	a.ctrlKey || a.altKey || (a = String.fromCharCode(a.charCode || a.keyCode).toLowerCase(), goog.string.isUnicodeChar(a) && (" " != a || this.buffer_) && (this.buffer_ += a, b = this.jumpToLabel_(this.buffer_)));
+	return b
+};
+goog.ui.tree.TypeAhead.prototype.setNodeInMap = function (a) {
+	var b = a.getText();
+	if (b && !goog.string.isEmptyOrWhitespace(goog.string.makeSafe(b))) {
+		var b = b.toLowerCase(),
+			c = this.nodeMap_.get(b);
+		c ? c.push(a) : this.nodeMap_.set(b, [a])
+	}
+};
+goog.ui.tree.TypeAhead.prototype.removeNodeFromMap = function (a) {
+	var b = a.getText();
+	if (b && !goog.string.isEmptyOrWhitespace(goog.string.makeSafe(b))) {
+		var b = b.toLowerCase(),
+			c = this.nodeMap_.get(b);
+		if (c) {
+			for (var d = a.getChildCount(), e = 0; e < d; e++) this.removeNodeFromMap(a.getChildAt(e));
+			goog.array.remove(c, a);
+			c.length || this.nodeMap_.remove(b)
+		}
+	}
+};
+goog.ui.tree.TypeAhead.prototype.jumpToLabel_ = function (a) {
+	var b = !1;
+	(a = this.nodeMap_.getKeys(a)) && a.length && (this.matchingLabelIndex_ = this.matchingNodeIndex_ = 0, b = this.nodeMap_.get(a[0]), b = this.selectMatchingNode_(b)) && (this.matchingLabels_ = a);
+	return b
+};
+goog.ui.tree.TypeAhead.prototype.jumpTo_ = function (a) {
+	var b = !1,
+		c = this.matchingLabels_;
+	if (c) {
+		var b = null,
+			d = !1;
+		if (this.matchingNodes_) {
+			var e = this.matchingNodeIndex_ + a;
+			0 <= e && e < this.matchingNodes_.length ? (this.matchingNodeIndex_ = e, b = this.matchingNodes_) : d = !0
+		}
+		b || (e = this.matchingLabelIndex_ + a, 0 <= e && e < c.length && (this.matchingLabelIndex_ = e), c.length > this.matchingLabelIndex_ && (b = this.nodeMap_.get(c[this.matchingLabelIndex_])), b && b.length && d && (this.matchingNodeIndex_ = a == goog.ui.tree.TypeAhead.Offset.UP ? b.length -
+			1 : 0));
+		if (b = this.selectMatchingNode_(b)) this.matchingLabels_ = c
+	}
+	return b
+};
+goog.ui.tree.TypeAhead.prototype.selectMatchingNode_ = function (a) {
+	var b;
+	a && (this.matchingNodeIndex_ < a.length && (b = a[this.matchingNodeIndex_], this.matchingNodes_ = a), b && (b.reveal(), b.select()));
+	return !!b
+};
+goog.ui.tree.TypeAhead.prototype.clear = function () {
+	this.buffer_ = ""
+};
+goog.ui.tree.TreeControl = function (a, b, c) {
+	goog.ui.tree.BaseNode.call(this, a, b, c);
+	this.setExpandedInternal(!0);
+	this.setSelectedInternal(!0);
+	this.selectedItem_ = this;
+	this.typeAhead_ = new goog.ui.tree.TypeAhead;
+	this.focusHandler_ = this.keyHandler_ = null;
+	this.logger_ = goog.log.getLogger("this");
+	this.focused_ = !1;
+	this.focusedNode_ = null;
+	this.showRootLines_ = this.showRootNode_ = this.showExpandIcons_ = this.showLines_ = !0;
+	if (goog.userAgent.IE) try {
+		document.execCommand("BackgroundImageCache", !1, !0)
+	} catch (d) {
+		goog.log.warning(this.logger_,
+			"Failed to enable background image cache")
+	}
+};
+goog.inherits(goog.ui.tree.TreeControl, goog.ui.tree.BaseNode);
+goog.ui.tree.TreeControl.prototype.getTree = function () {
+	return this
+};
+goog.ui.tree.TreeControl.prototype.getDepth = function () {
+	return 0
+};
+goog.ui.tree.TreeControl.prototype.reveal = function () { };
+goog.ui.tree.TreeControl.prototype.handleFocus_ = function (a) {
+	this.focused_ = !0;
+	goog.dom.classlist.add(goog.asserts.assert(this.getElement()), "focused");
+	this.selectedItem_ && this.selectedItem_.select()
+};
+goog.ui.tree.TreeControl.prototype.handleBlur_ = function (a) {
+	this.focused_ = !1;
+	goog.dom.classlist.remove(goog.asserts.assert(this.getElement()), "focused")
+};
+goog.ui.tree.TreeControl.prototype.hasFocus = function () {
+	return this.focused_
+};
+goog.ui.tree.TreeControl.prototype.getExpanded = function () {
+	return !this.showRootNode_ || goog.ui.tree.TreeControl.superClass_.getExpanded.call(this)
+};
+goog.ui.tree.TreeControl.prototype.setExpanded = function (a) {
+	this.showRootNode_ ? goog.ui.tree.TreeControl.superClass_.setExpanded.call(this, a) : this.setExpandedInternal(a)
+};
+goog.ui.tree.TreeControl.prototype.getExpandIconSafeHtml = function () {
+	return goog.html.SafeHtml.EMPTY
+};
+goog.ui.tree.TreeControl.prototype.getIconElement = function () {
+	var a = this.getRowElement();
+	return a ? a.firstChild : null
+};
+goog.ui.tree.TreeControl.prototype.getExpandIconElement = function () {
+	return null
+};
+goog.ui.tree.TreeControl.prototype.updateExpandIcon = function () { };
+goog.ui.tree.TreeControl.prototype.getRowClassName = function () {
+	return goog.ui.tree.TreeControl.superClass_.getRowClassName.call(this) + (this.showRootNode_ ? "" : " " + this.getConfig().cssHideRoot)
+};
+goog.ui.tree.TreeControl.prototype.getCalculatedIconClass = function () {
+	var a = this.getExpanded(),
+		b = this.getExpandedIconClass();
+	if (a && b) return b;
+	b = this.getIconClass();
+	if (!a && b) return b;
+	b = this.getConfig();
+	return a && b.cssExpandedRootIcon ? b.cssTreeIcon + " " + b.cssExpandedRootIcon : !a && b.cssCollapsedRootIcon ? b.cssTreeIcon + " " + b.cssCollapsedRootIcon : ""
+};
+goog.ui.tree.TreeControl.prototype.setSelectedItem = function (a) {
+	if (this.selectedItem_ != a) {
+		var b = !1;
+		this.selectedItem_ && (b = this.selectedItem_ == this.focusedNode_, this.selectedItem_.setSelectedInternal(!1));
+		if (this.selectedItem_ = a) a.setSelectedInternal(!0), b && a.select();
+		this.dispatchEvent(goog.events.EventType.CHANGE)
+	}
+};
+goog.ui.tree.TreeControl.prototype.getSelectedItem = function () {
+	return this.selectedItem_
+};
+goog.ui.tree.TreeControl.prototype.setShowLines = function (a) {
+	this.showLines_ != a && (this.showLines_ = a, this.isInDocument() && this.updateLinesAndExpandIcons_())
+};
+goog.ui.tree.TreeControl.prototype.getShowLines = function () {
+	return this.showLines_
+};
+goog.ui.tree.TreeControl.prototype.updateLinesAndExpandIcons_ = function () {
+	function a(e) {
+		var f = e.getChildrenElement();
+		if (f) {
+			var g = !c || b == e.getParent() && !d ? e.getConfig().cssChildrenNoLines : e.getConfig().cssChildren;
+			f.className = g;
+			if (f = e.getExpandIconElement()) f.className = e.getExpandIconClass()
+		}
+		e.forEachChild(a)
+	}
+	var b = this,
+		c = b.getShowLines(),
+		d = b.getShowRootLines();
+	a(this)
+};
+goog.ui.tree.TreeControl.prototype.setShowRootLines = function (a) {
+	this.showRootLines_ != a && (this.showRootLines_ = a, this.isInDocument() && this.updateLinesAndExpandIcons_())
+};
+goog.ui.tree.TreeControl.prototype.getShowRootLines = function () {
+	return this.showRootLines_
+};
+goog.ui.tree.TreeControl.prototype.setShowExpandIcons = function (a) {
+	this.showExpandIcons_ != a && (this.showExpandIcons_ = a, this.isInDocument() && this.updateLinesAndExpandIcons_())
+};
+goog.ui.tree.TreeControl.prototype.getShowExpandIcons = function () {
+	return this.showExpandIcons_
+};
+goog.ui.tree.TreeControl.prototype.setShowRootNode = function (a) {
+	if (this.showRootNode_ != a) {
+		this.showRootNode_ = a;
+		if (this.isInDocument()) {
+			var b = this.getRowElement();
+			b && (b.className = this.getRowClassName())
+		} !a && this.getSelectedItem() == this && this.getFirstChild() && this.setSelectedItem(this.getFirstChild())
+	}
+};
+goog.ui.tree.TreeControl.prototype.getShowRootNode = function () {
+	return this.showRootNode_
+};
+goog.ui.tree.TreeControl.prototype.initAccessibility = function () {
+	goog.ui.tree.TreeControl.superClass_.initAccessibility.call(this);
+	var a = this.getElement();
+	goog.asserts.assert(a, "The DOM element for the tree cannot be null.");
+	goog.a11y.aria.setRole(a, "tree");
+	goog.a11y.aria.setState(a, "labelledby", this.getLabelElement().id)
+};
+goog.ui.tree.TreeControl.prototype.enterDocument = function () {
+	goog.ui.tree.TreeControl.superClass_.enterDocument.call(this);
+	var a = this.getElement();
+	a.className = this.getConfig().cssRoot;
+	a.setAttribute("hideFocus", "true");
+	this.attachEvents_();
+	this.initAccessibility()
+};
+goog.ui.tree.TreeControl.prototype.exitDocument = function () {
+	goog.ui.tree.TreeControl.superClass_.exitDocument.call(this);
+	this.detachEvents_()
+};
+goog.ui.tree.TreeControl.prototype.attachEvents_ = function () {
+	var a = this.getElement();
+	a.tabIndex = 0;
+	var b = this.keyHandler_ = new goog.events.KeyHandler(a),
+		c = this.focusHandler_ = new goog.events.FocusHandler(a);
+	this.getHandler().listen(c, goog.events.FocusHandler.EventType.FOCUSOUT, this.handleBlur_).listen(c, goog.events.FocusHandler.EventType.FOCUSIN, this.handleFocus_).listen(b, goog.events.KeyHandler.EventType.KEY, this.handleKeyEvent).listen(a, goog.events.EventType.MOUSEDOWN, this.handleMouseEvent_).listen(a,
+		goog.events.EventType.CLICK, this.handleMouseEvent_).listen(a, goog.events.EventType.DBLCLICK, this.handleMouseEvent_)
+};
+goog.ui.tree.TreeControl.prototype.detachEvents_ = function () {
+	this.keyHandler_.dispose();
+	this.keyHandler_ = null;
+	this.focusHandler_.dispose();
+	this.focusHandler_ = null
+};
+goog.ui.tree.TreeControl.prototype.handleMouseEvent_ = function (a) {
+	goog.log.fine(this.logger_, "Received event " + a.type);
+	var b = this.getNodeFromEvent_(a);
+	if (b) switch (a.type) {
+		case goog.events.EventType.MOUSEDOWN:
+			b.onMouseDown(a);
+			break;
+		case goog.events.EventType.CLICK:
+			b.onClick_(a);
+			break;
+		case goog.events.EventType.DBLCLICK:
+			b.onDoubleClick_(a)
+	}
+};
+goog.ui.tree.TreeControl.prototype.handleKeyEvent = function (a) {
+	var b;
+	(b = this.typeAhead_.handleNavigation(a) || this.selectedItem_ && this.selectedItem_.onKeyDown(a) || this.typeAhead_.handleTypeAheadChar(a)) && a.preventDefault();
+	return b
+};
+goog.ui.tree.TreeControl.prototype.getNodeFromEvent_ = function (a) {
+	for (var b = a.target; null != b;) {
+		if (a = goog.ui.tree.BaseNode.allNodes[b.id]) return a;
+		if (b == this.getElement()) break;
+		b = b.parentNode
+	}
+	return null
+};
+goog.ui.tree.TreeControl.prototype.createNode = function (a) {
+	return new goog.ui.tree.TreeNode(a || goog.html.SafeHtml.EMPTY, this.getConfig(), this.getDomHelper())
+};
+goog.ui.tree.TreeControl.prototype.setNode = function (a) {
+	this.typeAhead_.setNodeInMap(a)
+};
+goog.ui.tree.TreeControl.prototype.removeNode = function (a) {
+	this.typeAhead_.removeNodeFromMap(a)
+};
+goog.ui.tree.TreeControl.prototype.clearTypeAhead = function () {
+	this.typeAhead_.clear()
+};
+goog.ui.tree.TreeControl.defaultConfig = goog.ui.tree.BaseNode.defaultConfig;
+// Copyright 2013 Google Inc.  Apache License 2.0
+var Blockly = {
+	Blocks: {}
+};
+// Copyright 2016 Google Inc.  Apache License 2.0
+Blockly.Touch = {};
+Blockly.Touch.touchIdentifier_ = null;
+Blockly.Touch.onTouchUpWrapper_ = null;
+Blockly.Touch.TOUCH_MAP = {};
+goog.events.BrowserFeature.TOUCH_ENABLED && (Blockly.Touch.TOUCH_MAP = {
+	mousedown: ["touchstart"],
+	mousemove: ["touchmove"],
+	mouseup: ["touchend", "touchcancel"]
+});
+Blockly.longPid_ = 0;
+Blockly.longStart_ = function (a, b) {
+	Blockly.longStop_();
+	Blockly.longPid_ = setTimeout(function () {
+		a.button = 2;
+		b.onMouseDown_(a)
+	}, Blockly.LONGPRESS)
+};
+Blockly.longStop_ = function () {
+	Blockly.longPid_ && (clearTimeout(Blockly.longPid_), Blockly.longPid_ = 0)
+};
+Blockly.onMouseUp_ = function (a) {
+	a = Blockly.getMainWorkspace();
+	a.dragMode_ != Blockly.DRAG_NONE && (Blockly.Touch.clearTouchIdentifier(), Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN), a.dragMode_ = Blockly.DRAG_NONE, Blockly.Touch.onTouchUpWrapper_ && (Blockly.unbindEvent_(Blockly.Touch.onTouchUpWrapper_), Blockly.Touch.onTouchUpWrapper_ = null), Blockly.onMouseMoveWrapper_ && (Blockly.unbindEvent_(Blockly.onMouseMoveWrapper_), Blockly.onMouseMoveWrapper_ = null))
+};
+Blockly.onMouseMove_ = function (a) {
+	var b = Blockly.getMainWorkspace();
+	if (b.dragMode_ != Blockly.DRAG_NONE) {
+		var c = a.clientX - b.startDragMouseX,
+			d = a.clientY - b.startDragMouseY,
+			e = b.startDragMetrics,
+			f = b.startScrollX + c,
+			g = b.startScrollY + d,
+			f = Math.min(f, -e.contentLeft),
+			g = Math.min(g, -e.contentTop),
+			f = Math.max(f, e.viewWidth - e.contentLeft - e.contentWidth),
+			g = Math.max(g, e.viewHeight - e.contentTop - e.contentHeight);
+		b.scrollbar.set(-f - e.contentLeft, -g - e.contentTop);
+		Math.sqrt(c * c + d * d) > Blockly.DRAG_RADIUS && (Blockly.longStop_(),
+			b.dragMode_ = Blockly.DRAG_FREE);
+		a.stopPropagation();
+		a.preventDefault()
+	}
+};
+Blockly.Touch.clearTouchIdentifier = function () {
+	Blockly.Touch.touchIdentifier_ = null
+};
+Blockly.Touch.shouldHandleEvent = function (a) {
+	return !Blockly.Touch.isMouseOrTouchEvent(a) || Blockly.Touch.checkTouchIdentifier(a)
+};
+Blockly.Touch.checkTouchIdentifier = function (a) {
+	var b = a.changedTouches && a.changedTouches[0] && void 0 != a.changedTouches[0].identifier && null != a.changedTouches[0].identifier ? a.changedTouches[0].identifier : "mouse";
+	return void 0 != Blockly.Touch.touchIdentifier_ && null != Blockly.Touch.touchIdentifier_ ? Blockly.Touch.touchIdentifier_ == b : "mousedown" == a.type || "touchstart" == a.type ? (Blockly.Touch.touchIdentifier_ = b, !0) : !1
+};
+Blockly.Touch.setClientFromTouch = function (a) {
+	if (goog.string.startsWith(a.type, "touch")) {
+		var b = a.changedTouches[0];
+		a.clientX = b.clientX;
+		a.clientY = b.clientY
+	}
+};
+Blockly.Touch.isMouseOrTouchEvent = function (a) {
+	return goog.string.startsWith(a.type, "touch") || goog.string.startsWith(a.type, "mouse")
+};
+Blockly.Touch.splitEventByTouches = function (a) {
+	var b = [];
+	if (a.changedTouches)
+		for (var c = 0; c < a.changedTouches.length; c++) b[c] = {
+			type: a.type,
+			changedTouches: [a.changedTouches[c]],
+			target: a.target,
+			stopPropagation: function () {
+				a.stopPropagation()
+			},
+			preventDefault: function () {
+				a.preventDefault()
+			}
+		};
+	else b.push(a);
+	return b
+};
+// Copyright 2012 Google Inc.  Apache License 2.0
+Blockly.Workspace = function (a) {
+	this.id = Blockly.genUid();
+	Blockly.Workspace.WorkspaceDB_[this.id] = this;
+	this.options = a || {};
+	this.RTL = !!this.options.RTL;
+	this.horizontalLayout = !!this.options.horizontalLayout;
+	this.toolboxPosition = this.options.toolboxPosition;
+	this.topBlocks_ = [];
+	this.listeners_ = [];
+	this.undoStack_ = [];
+	this.redoStack_ = [];
+	this.blockDB_ = Object.create(null);
+	this.variableList = []
+};
+Blockly.Workspace.prototype.rendered = !1;
+Blockly.Workspace.prototype.MAX_UNDO = 1024;
+Blockly.Workspace.prototype.dispose = function () {
+	this.listeners_.length = 0;
+	this.clear();
+	delete Blockly.Workspace.WorkspaceDB_[this.id]
+};
+Blockly.Workspace.SCAN_ANGLE = 3;
+Blockly.Workspace.prototype.addTopBlock = function (a) {
+	this.topBlocks_.push(a);
+	if (this.isFlyout) {
+		a = Blockly.Variables.allUsedVariables(a);
+		for (var b = 0; b < a.length; b++) -1 == this.variableList.indexOf(a[b]) && this.variableList.push(a[b])
+	}
+};
+Blockly.Workspace.prototype.removeTopBlock = function (a) {
+	if (!goog.array.remove(this.topBlocks_, a)) throw "Block not present in workspace's list of top-most blocks.";
+};
+Blockly.Workspace.prototype.getTopBlocks = function (a) {
+	var b = [].concat(this.topBlocks_);
+	if (a && 1 < b.length) {
+		var c = Math.sin(goog.math.toRadians(Blockly.Workspace.SCAN_ANGLE));
+		this.RTL && (c *= -1);
+		b.sort(function (a, b) {
+			var d = a.getRelativeToSurfaceXY(),
+				e = b.getRelativeToSurfaceXY();
+			return d.y + c * d.x - (e.y + c * e.x)
+		})
+	}
+	return b
+};
+Blockly.Workspace.prototype.getAllBlocks = function () {
+	for (var a = this.getTopBlocks(!1), b = 0; b < a.length; b++) a.push.apply(a, a[b].getChildren());
+	return a
+};
+Blockly.Workspace.prototype.clear = function () {
+	var a = Blockly.Events.getGroup();
+	for (a || Blockly.Events.setGroup(!0) ; this.topBlocks_.length;) this.topBlocks_[0].dispose();
+	a || Blockly.Events.setGroup(!1);
+	this.variableList.length = 0
+};
+Blockly.Workspace.prototype.updateVariableList = function (a) {
+	if (!this.isFlyout) {
+		a && (this.variableList.length = 0);
+		a = Blockly.Variables.allUsedVariables(this);
+		for (var b = 0; b < a.length; b++) this.createVariable(a[b])
+	}
+};
+Blockly.Workspace.prototype.renameVariable = function (a, b) {
+	var c = this.variableIndexOf(a),
+		d = this.variableIndexOf(b);
+	if (-1 != d && this.variableList[d] != b) var e = this.variableList[d];
+	Blockly.Events.setGroup(!0);
+	for (var f = this.getAllBlocks(), g = 0; g < f.length; g++) f[g].renameVar(a, b), e && f[g].renameVar(e, b);
+	Blockly.Events.setGroup(!1);
+	c == d || -1 != c && -1 == d ? this.variableList[c] = b : -1 != c && -1 != d ? (this.variableList[d] = b, this.variableList.splice(c, 1)) : (this.variableList.push(b), console.log("Tried to rename an non-existent variable."))
+};
+Blockly.Workspace.prototype.createVariable = function (a) {
+	-1 == this.variableIndexOf(a) && this.variableList.push(a)
+};
+Blockly.Workspace.prototype.getVariableUses = function (a) {
+	for (var b = [], c = this.getAllBlocks(), d = 0; d < c.length; d++) {
+		var e = c[d].getVars();
+		if (e)
+			for (var f = 0; f < e.length; f++) {
+				var g = e[f];
+				g && Blockly.Names.equals(g, a) && b.push(c[d])
+			}
+	}
+	return b
+};
+Blockly.Workspace.prototype.deleteVariable = function (a) {
+	var b = this,
+		c = this.variableIndexOf(a);
+	if (-1 != c) {
+		for (var d = function () {
+				Blockly.Events.setGroup(!0);
+				for (var a = 0; a < e.length; a++) e[a].dispose(!0, !1);
+				Blockly.Events.setGroup(!1);
+				b.variableList.splice(c, 1)
+		}, e = this.getVariableUses(a), f = 0, g; g = e[f]; f++)
+			if ("procedures_defnoreturn" == g.type || "procedures_defreturn" == g.type) {
+				f = g.getFieldValue("NAME");
+				Blockly.alert(Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE.replace("%1", a).replace("%2", f));
+				return
+			}
+		1 < e.length ?
+			Blockly.confirm(Blockly.Msg.DELETE_VARIABLE_CONFIRMATION.replace("%1", e.length).replace("%2", a), function (a) {
+            	a && d()
+			}) : d()
+	}
+};
+Blockly.Workspace.prototype.variableIndexOf = function (a) {
+	for (var b = 0, c; c = this.variableList[b]; b++)
+		if (Blockly.Names.equals(c, a)) return b;
+	return -1
+};
+Blockly.Workspace.prototype.getWidth = function () {
+	return 0
+};
+Blockly.Workspace.prototype.newBlock = function (a, b) {
+	return new Blockly.Block(this, a, b)
+};
+Blockly.Workspace.prototype.remainingCapacity = function () {
+	return isNaN(this.options.maxBlocks) ? Infinity : this.options.maxBlocks - this.getAllBlocks().length
+};
+Blockly.Workspace.prototype.undo = function (a) {
+	var b = a ? this.redoStack_ : this.undoStack_,
+		c = a ? this.undoStack_ : this.redoStack_,
+		d = b.pop();
+	if (d) {
+		for (var e = [d]; b.length && d.group && d.group == b[b.length - 1].group;) e.push(b.pop());
+		for (b = 0; d = e[b]; b++) c.push(d);
+		e = Blockly.Events.filter(e, a);
+		Blockly.Events.recordUndo = !1;
+		for (b = 0; d = e[b]; b++) d.run(a);
+		Blockly.Events.recordUndo = !0
+	}
+};
+Blockly.Workspace.prototype.clearUndo = function () {
+	this.undoStack_.length = 0;
+	this.redoStack_.length = 0;
+	Blockly.Events.clearPendingUndo()
+};
+Blockly.Workspace.prototype.addChangeListener = function (a) {
+	this.listeners_.push(a);
+	return a
+};
+Blockly.Workspace.prototype.removeChangeListener = function (a) {
+	goog.array.remove(this.listeners_, a)
+};
+Blockly.Workspace.prototype.fireChangeListener = function (a) {
+	a.recordUndo && (this.undoStack_.push(a), this.redoStack_.length = 0, this.undoStack_.length > this.MAX_UNDO && this.undoStack_.unshift());
+	for (var b = 0, c; c = this.listeners_[b]; b++) c(a)
+};
+Blockly.Workspace.prototype.getBlockById = function (a) {
+	return this.blockDB_[a] || null
+};
+Blockly.Workspace.WorkspaceDB_ = Object.create(null);
+Blockly.Workspace.getById = function (a) {
+	return Blockly.Workspace.WorkspaceDB_[a] || null
+};
+Blockly.Workspace.prototype.clear = Blockly.Workspace.prototype.clear;
+Blockly.Workspace.prototype.clearUndo = Blockly.Workspace.prototype.clearUndo;
+Blockly.Workspace.prototype.addChangeListener = Blockly.Workspace.prototype.addChangeListener;
+Blockly.Workspace.prototype.removeChangeListener = Blockly.Workspace.prototype.removeChangeListener;
+Blockly.Bubble = function (a, b, c, d, e, f) {
+	this.workspace_ = a;
+	this.content_ = b;
+	this.shape_ = c;
+	c = Blockly.Bubble.ARROW_ANGLE;
+	this.workspace_.RTL && (c = -c);
+	this.arrow_radians_ = goog.math.toRadians(c);
+	a.getBubbleCanvas().appendChild(this.createDom_(b, !(!e || !f)));
+	this.setAnchorLocation(d);
+	e && f || (b = this.content_.getBBox(), e = b.width + 2 * Blockly.Bubble.BORDER_WIDTH, f = b.height + 2 * Blockly.Bubble.BORDER_WIDTH);
+	this.setBubbleSize(e, f);
+	this.positionBubble_();
+	this.renderArrow_();
+	this.rendered_ = !0;
+	a.options.readOnly || (Blockly.bindEventWithChecks_(this.bubbleBack_,
+		"mousedown", this, this.bubbleMouseDown_), this.resizeGroup_ && Blockly.bindEventWithChecks_(this.resizeGroup_, "mousedown", this, this.resizeMouseDown_))
+};
+Blockly.Bubble.BORDER_WIDTH = 6;
+Blockly.Bubble.ARROW_THICKNESS = 5;
+Blockly.Bubble.ARROW_ANGLE = 20;
+Blockly.Bubble.ARROW_BEND = 4;
+Blockly.Bubble.ANCHOR_RADIUS = 8;
+Blockly.Bubble.onMouseUpWrapper_ = null;
+Blockly.Bubble.onMouseMoveWrapper_ = null;
+Blockly.Bubble.prototype.resizeCallback_ = null;
+Blockly.Bubble.unbindDragEvents_ = function () {
+	Blockly.Bubble.onMouseUpWrapper_ && (Blockly.unbindEvent_(Blockly.Bubble.onMouseUpWrapper_), Blockly.Bubble.onMouseUpWrapper_ = null);
+	Blockly.Bubble.onMouseMoveWrapper_ && (Blockly.unbindEvent_(Blockly.Bubble.onMouseMoveWrapper_), Blockly.Bubble.onMouseMoveWrapper_ = null)
+};
+Blockly.Bubble.bubbleMouseUp_ = function () {
+	Blockly.Touch.clearTouchIdentifier();
+	Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN);
+	Blockly.Bubble.unbindDragEvents_()
+};
+Blockly.Bubble.prototype.rendered_ = !1;
+Blockly.Bubble.prototype.anchorXY_ = null;
+Blockly.Bubble.prototype.relativeLeft_ = 0;
+Blockly.Bubble.prototype.relativeTop_ = 0;
+Blockly.Bubble.prototype.width_ = 0;
+Blockly.Bubble.prototype.height_ = 0;
+Blockly.Bubble.prototype.autoLayout_ = !0;
+Blockly.Bubble.prototype.createDom_ = function (a, b) {
+	this.bubbleGroup_ = Blockly.createSvgElement("g", {}, null);
+	var c = {
+		filter: "url(#" + this.workspace_.options.embossFilterId + ")"
+	}; -1 != goog.userAgent.getUserAgentString().indexOf("JavaFX") && (c = {});
+	c = Blockly.createSvgElement("g", c, this.bubbleGroup_);
+	this.bubbleArrow_ = Blockly.createSvgElement("path", {}, c);
+	this.bubbleBack_ = Blockly.createSvgElement("rect", {
+		"class": "blocklyDraggable",
+		x: 0,
+		y: 0,
+		rx: Blockly.Bubble.BORDER_WIDTH,
+		ry: Blockly.Bubble.BORDER_WIDTH
+	}, c);
+	b ? (this.resizeGroup_ =
+		Blockly.createSvgElement("g", {
+        	"class": this.workspace_.RTL ? "blocklyResizeSW" : "blocklyResizeSE"
+		}, this.bubbleGroup_), c = 2 * Blockly.Bubble.BORDER_WIDTH, Blockly.createSvgElement("polygon", {
+        	points: "0,x x,x x,0".replace(/x/g, c.toString())
+		}, this.resizeGroup_), Blockly.createSvgElement("line", {
+        	"class": "blocklyResizeLine",
+        	x1: c / 3,
+        	y1: c - 1,
+        	x2: c - 1,
+        	y2: c / 3
+		}, this.resizeGroup_), Blockly.createSvgElement("line", {
+        	"class": "blocklyResizeLine",
+        	x1: 2 * c / 3,
+        	y1: c - 1,
+        	x2: c - 1,
+        	y2: 2 * c / 3
+		}, this.resizeGroup_)) : this.resizeGroup_ = null;
+	this.bubbleGroup_.appendChild(a);
+	return this.bubbleGroup_
+};
+Blockly.Bubble.prototype.bubbleMouseDown_ = function (a) {
+	this.promote_();
+	Blockly.Bubble.unbindDragEvents_();
+	Blockly.isRightButton(a) ? a.stopPropagation() : Blockly.isTargetInput_(a) || (Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED), this.workspace_.startDrag(a, new goog.math.Coordinate(this.workspace_.RTL ? -this.relativeLeft_ : this.relativeLeft_, this.relativeTop_)), Blockly.Bubble.onMouseUpWrapper_ = Blockly.bindEventWithChecks_(document, "mouseup", this, Blockly.Bubble.bubbleMouseUp_), Blockly.Bubble.onMouseMoveWrapper_ =
+		Blockly.bindEventWithChecks_(document, "mousemove", this, this.bubbleMouseMove_), Blockly.hideChaff(), a.stopPropagation())
+};
+Blockly.Bubble.prototype.bubbleMouseMove_ = function (a) {
+	this.autoLayout_ = !1;
+	a = this.workspace_.moveDrag(a);
+	this.relativeLeft_ = this.workspace_.RTL ? -a.x : a.x;
+	this.relativeTop_ = a.y;
+	this.positionBubble_();
+	this.renderArrow_()
+};
+Blockly.Bubble.prototype.resizeMouseDown_ = function (a) {
+	this.promote_();
+	Blockly.Bubble.unbindDragEvents_();
+	Blockly.isRightButton(a) || (Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED), this.workspace_.startDrag(a, new goog.math.Coordinate(this.workspace_.RTL ? -this.width_ : this.width_, this.height_)), Blockly.Bubble.onMouseUpWrapper_ = Blockly.bindEventWithChecks_(document, "mouseup", this, Blockly.Bubble.bubbleMouseUp_), Blockly.Bubble.onMouseMoveWrapper_ = Blockly.bindEventWithChecks_(document, "mousemove", this,
+		this.resizeMouseMove_), Blockly.hideChaff());
+	a.stopPropagation()
+};
+Blockly.Bubble.prototype.resizeMouseMove_ = function (a) {
+	this.autoLayout_ = !1;
+	a = this.workspace_.moveDrag(a);
+	this.setBubbleSize(this.workspace_.RTL ? -a.x : a.x, a.y);
+	this.workspace_.RTL && this.positionBubble_()
+};
+Blockly.Bubble.prototype.registerResizeEvent = function (a) {
+	this.resizeCallback_ = a
+};
+Blockly.Bubble.prototype.promote_ = function () {
+	this.bubbleGroup_.parentNode.appendChild(this.bubbleGroup_)
+};
+Blockly.Bubble.prototype.setAnchorLocation = function (a) {
+	this.anchorXY_ = a;
+	this.rendered_ && this.positionBubble_()
+};
+Blockly.Bubble.prototype.layoutBubble_ = function () {
+	var a = -this.width_ / 4,
+		b = -this.height_ - Blockly.BlockSvg.MIN_BLOCK_Y,
+		c = this.workspace_.getMetrics();
+	c.viewWidth /= this.workspace_.scale;
+	c.viewLeft /= this.workspace_.scale;
+	var d = this.anchorXY_.x;
+	this.workspace_.RTL ? d - c.viewLeft - a - this.width_ < Blockly.Scrollbar.scrollbarThickness ? a = d - c.viewLeft - this.width_ - Blockly.Scrollbar.scrollbarThickness : d - c.viewLeft - a > c.viewWidth && (a = d - c.viewLeft - c.viewWidth) : d + a < c.viewLeft ? a = c.viewLeft - d : c.viewLeft + c.viewWidth < d + a +
+		this.width_ + Blockly.BlockSvg.SEP_SPACE_X + Blockly.Scrollbar.scrollbarThickness && (a = c.viewLeft + c.viewWidth - d - this.width_ - Blockly.Scrollbar.scrollbarThickness);
+	this.anchorXY_.y + b < c.viewTop && (b = this.shape_.getBBox().height);
+	this.relativeLeft_ = a;
+	this.relativeTop_ = b
+};
+Blockly.Bubble.prototype.positionBubble_ = function () {
+	var a = this.anchorXY_.x,
+		a = this.workspace_.RTL ? a - (this.relativeLeft_ + this.width_) : a + this.relativeLeft_;
+	this.bubbleGroup_.setAttribute("transform", "translate(" + a + "," + (this.relativeTop_ + this.anchorXY_.y) + ")")
+};
+Blockly.Bubble.prototype.getBubbleSize = function () {
+	return {
+		width: this.width_,
+		height: this.height_
+	}
+};
+Blockly.Bubble.prototype.setBubbleSize = function (a, b) {
+	var c = 2 * Blockly.Bubble.BORDER_WIDTH;
+	a = Math.max(a, c + 45);
+	b = Math.max(b, c + 20);
+	this.width_ = a;
+	this.height_ = b;
+	this.bubbleBack_.setAttribute("width", a);
+	this.bubbleBack_.setAttribute("height", b);
+	this.resizeGroup_ && (this.workspace_.RTL ? this.resizeGroup_.setAttribute("transform", "translate(" + 2 * Blockly.Bubble.BORDER_WIDTH + "," + (b - c) + ") scale(-1 1)") : this.resizeGroup_.setAttribute("transform", "translate(" + (a - c) + "," + (b - c) + ")"));
+	this.rendered_ && (this.autoLayout_ &&
+		this.layoutBubble_(), this.positionBubble_(), this.renderArrow_());
+	this.resizeCallback_ && this.resizeCallback_()
+};
+Blockly.Bubble.prototype.renderArrow_ = function () {
+	var a = [],
+		b = this.width_ / 2,
+		c = this.height_ / 2,
+		d = -this.relativeLeft_,
+		e = -this.relativeTop_;
+	if (b == d && c == e) a.push("M " + b + "," + c);
+	else {
+		e -= c;
+		d -= b;
+		this.workspace_.RTL && (d *= -1);
+		var f = Math.sqrt(e * e + d * d),
+			g = Math.acos(d / f);
+		0 > e && (g = 2 * Math.PI - g);
+		var h = g + Math.PI / 2;
+		h > 2 * Math.PI && (h -= 2 * Math.PI);
+		var k = Math.sin(h),
+			m = Math.cos(h),
+			p = this.getBubbleSize(),
+			h = (p.width + p.height) / Blockly.Bubble.ARROW_THICKNESS,
+			h = Math.min(h, p.width, p.height) / 4,
+			p = 1 - Blockly.Bubble.ANCHOR_RADIUS / f,
+			d = b +
+			p * d,
+			e = c + p * e,
+			p = b + h * m,
+			l = c + h * k,
+			b = b - h * m,
+			c = c - h * k,
+			k = g + this.arrow_radians_;
+		k > 2 * Math.PI && (k -= 2 * Math.PI);
+		g = Math.sin(k) * f / Blockly.Bubble.ARROW_BEND;
+		f = Math.cos(k) * f / Blockly.Bubble.ARROW_BEND;
+		a.push("M" + p + "," + l);
+		a.push("C" + (p + f) + "," + (l + g) + " " + d + "," + e + " " + d + "," + e);
+		a.push("C" + d + "," + e + " " + (b + f) + "," + (c + g) + " " + b + "," + c)
+	}
+	a.push("z");
+	this.bubbleArrow_.setAttribute("d", a.join(" "))
+};
+Blockly.Bubble.prototype.setColour = function (a) {
+	this.bubbleBack_.setAttribute("fill", a);
+	this.bubbleArrow_.setAttribute("fill", a)
+};
+Blockly.Bubble.prototype.dispose = function () {
+	Blockly.Bubble.unbindDragEvents_();
+	goog.dom.removeNode(this.bubbleGroup_);
+	this.shape_ = this.content_ = this.workspace_ = this.resizeGroup_ = this.bubbleBack_ = this.bubbleArrow_ = this.bubbleGroup_ = null
+};
+Blockly.Icon = function (a) {
+	this.block_ = a
+};
+Blockly.Icon.prototype.collapseHidden = !0;
+Blockly.Icon.prototype.SIZE = 17;
+Blockly.Icon.prototype.bubble_ = null;
+Blockly.Icon.prototype.iconXY_ = null;
+Blockly.Icon.prototype.createIcon = function () {
+	this.iconGroup_ || (this.iconGroup_ = Blockly.createSvgElement("g", {
+		"class": "blocklyIconGroup"
+	}, null), this.block_.isInFlyout && Blockly.addClass_(this.iconGroup_, "blocklyIconGroupReadonly"), this.drawIcon_(this.iconGroup_), this.block_.getSvgRoot().appendChild(this.iconGroup_), Blockly.bindEventWithChecks_(this.iconGroup_, "mouseup", this, this.iconClick_), this.updateEditable())
+};
+Blockly.Icon.prototype.dispose = function () {
+	goog.dom.removeNode(this.iconGroup_);
+	this.iconGroup_ = null;
+	this.setVisible(!1);
+	this.block_ = null
+};
+Blockly.Icon.prototype.updateEditable = function () { };
+Blockly.Icon.prototype.isVisible = function () {
+	return !!this.bubble_
+};
+Blockly.Icon.prototype.iconClick_ = function (a) {
+	this.block_.workspace.isDragging() || this.block_.isInFlyout || Blockly.isRightButton(a) || this.setVisible(!this.isVisible())
+};
+Blockly.Icon.prototype.updateColour = function () {
+	this.isVisible() && this.bubble_.setColour(this.block_.getColour())
+};
+Blockly.Icon.prototype.renderIcon = function (a) {
+	if (this.collapseHidden && this.block_.isCollapsed()) return this.iconGroup_.setAttribute("display", "none"), a;
+	this.iconGroup_.setAttribute("display", "block");
+	var b = this.SIZE;
+	this.block_.RTL && (a -= b);
+	this.iconGroup_.setAttribute("transform", "translate(" + a + ",5)");
+	this.computeIconLocation();
+	return a = this.block_.RTL ? a - Blockly.BlockSvg.SEP_SPACE_X : a + (b + Blockly.BlockSvg.SEP_SPACE_X)
+};
+Blockly.Icon.prototype.setIconLocation = function (a) {
+	this.iconXY_ = a;
+	this.isVisible() && this.bubble_.setAnchorLocation(a)
+};
+Blockly.Icon.prototype.computeIconLocation = function () {
+	var a = this.block_.getRelativeToSurfaceXY(),
+		b = Blockly.getRelativeXY_(this.iconGroup_),
+		a = new goog.math.Coordinate(a.x + b.x + this.SIZE / 2, a.y + b.y + this.SIZE / 2);
+	goog.math.Coordinate.equals(this.getIconLocation(), a) || this.setIconLocation(a)
+};
+Blockly.Icon.prototype.getIconLocation = function () {
+	return this.iconXY_
+};
+// Copyright 2011 Google Inc.  Apache License 2.0
+Blockly.Comment = function (a) {
+	Blockly.Comment.superClass_.constructor.call(this, a);
+	this.createIcon()
+};
+goog.inherits(Blockly.Comment, Blockly.Icon);
+Blockly.Comment.prototype.text_ = "";
+Blockly.Comment.prototype.width_ = 160;
+Blockly.Comment.prototype.height_ = 80;
+Blockly.Comment.prototype.drawIcon_ = function (a) {
+	Blockly.createSvgElement("circle", {
+		"class": "blocklyIconShape",
+		r: "8",
+		cx: "8",
+		cy: "8"
+	}, a);
+	Blockly.createSvgElement("path", {
+		"class": "blocklyIconSymbol",
+		d: "m6.8,10h2c0.003,-0.617 0.271,-0.962 0.633,-1.266 2.875,-2.405 0.607,-5.534 -3.765,-3.874v1.7c3.12,-1.657 3.698,0.118 2.336,1.25 -1.201,0.998 -1.201,1.528 -1.204,2.19z"
+	}, a);
+	Blockly.createSvgElement("rect", {
+		"class": "blocklyIconSymbol",
+		x: "6.8",
+		y: "10.78",
+		height: "2",
+		width: "2"
+	}, a)
+};
+Blockly.Comment.prototype.createEditor_ = function () {
+	this.foreignObject_ = Blockly.createSvgElement("foreignObject", {
+		x: Blockly.Bubble.BORDER_WIDTH,
+		y: Blockly.Bubble.BORDER_WIDTH
+	}, null);
+	var a = document.createElementNS(Blockly.HTML_NS, "body");
+	a.setAttribute("xmlns", Blockly.HTML_NS);
+	a.className = "blocklyMinimalBody";
+	var b = document.createElementNS(Blockly.HTML_NS, "textarea");
+	b.className = "blocklyCommentTextarea";
+	b.setAttribute("dir", this.block_.RTL ? "RTL" : "LTR");
+	a.appendChild(b);
+	this.textarea_ = b;
+	this.foreignObject_.appendChild(a);
+	Blockly.bindEventWithChecks_(b, "mouseup", this, this.textareaFocus_);
+	Blockly.bindEventWithChecks_(b, "wheel", this, function (a) {
+		a.stopPropagation()
+	});
+	Blockly.bindEventWithChecks_(b, "change", this, function (a) {
+		this.text_ != b.value && (Blockly.Events.fire(new Blockly.Events.Change(this.block_, "comment", null, this.text_, b.value)), this.text_ = b.value)
+	});
+	setTimeout(function () {
+		b.focus()
+	}, 0);
+	return this.foreignObject_
+};
+Blockly.Comment.prototype.updateEditable = function () {
+	this.isVisible() && (this.setVisible(!1), this.setVisible(!0));
+	Blockly.Icon.prototype.updateEditable.call(this)
+};
+Blockly.Comment.prototype.resizeBubble_ = function () {
+	if (this.isVisible()) {
+		var a = this.bubble_.getBubbleSize(),
+			b = 2 * Blockly.Bubble.BORDER_WIDTH;
+		this.foreignObject_.setAttribute("width", a.width - b);
+		this.foreignObject_.setAttribute("height", a.height - b);
+		this.textarea_.style.width = a.width - b - 4 + "px";
+		this.textarea_.style.height = a.height - b - 4 + "px"
+	}
+};
+Blockly.Comment.prototype.setVisible = function (a) {
+	if (a != this.isVisible())
+		if (Blockly.Events.fire(new Blockly.Events.Ui(this.block_, "commentOpen", !a, a)), !this.block_.isEditable() && !this.textarea_ || goog.userAgent.IE) Blockly.Warning.prototype.setVisible.call(this, a);
+		else {
+			var b = this.getText(),
+				c = this.getBubbleSize();
+			a ? (this.bubble_ = new Blockly.Bubble(this.block_.workspace, this.createEditor_(), this.block_.svgPath_, this.iconXY_, this.width_, this.height_), this.bubble_.registerResizeEvent(this.resizeBubble_.bind(this)),
+				this.updateColour()) : (this.bubble_.dispose(), this.foreignObject_ = this.textarea_ = this.bubble_ = null);
+			this.setText(b);
+			this.setBubbleSize(c.width, c.height)
+		}
+};
+Blockly.Comment.prototype.textareaFocus_ = function (a) {
+	this.bubble_.promote_();
+	this.textarea_.focus()
+};
+Blockly.Comment.prototype.getBubbleSize = function () {
+	return this.isVisible() ? this.bubble_.getBubbleSize() : {
+		width: this.width_,
+		height: this.height_
+	}
+};
+Blockly.Comment.prototype.setBubbleSize = function (a, b) {
+	this.textarea_ ? this.bubble_.setBubbleSize(a, b) : (this.width_ = a, this.height_ = b)
+};
+Blockly.Comment.prototype.getText = function () {
+	return this.textarea_ ? this.textarea_.value : this.text_
+};
+Blockly.Comment.prototype.setText = function (a) {
+	this.text_ != a && (Blockly.Events.fire(new Blockly.Events.Change(this.block_, "comment", null, this.text_, a)), this.text_ = a);
+	this.textarea_ && (this.textarea_.value = a)
+};
+Blockly.Comment.prototype.dispose = function () {
+	Blockly.Events.isEnabled() && this.setText("");
+	this.block_.comment = null;
+	Blockly.Icon.prototype.dispose.call(this)
+};
+Blockly.Connection = function (a, b) {
+	this.sourceBlock_ = a;
+	this.type = b;
+	a.workspace.connectionDBList && (this.db_ = a.workspace.connectionDBList[b], this.dbOpposite_ = a.workspace.connectionDBList[Blockly.OPPOSITE_TYPE[b]], this.hidden_ = !this.db_)
+};
+Blockly.Connection.CAN_CONNECT = 0;
+Blockly.Connection.REASON_SELF_CONNECTION = 1;
+Blockly.Connection.REASON_WRONG_TYPE = 2;
+Blockly.Connection.REASON_TARGET_NULL = 3;
+Blockly.Connection.REASON_CHECKS_FAILED = 4;
+Blockly.Connection.REASON_DIFFERENT_WORKSPACES = 5;
+Blockly.Connection.REASON_SHADOW_PARENT = 6;
+Blockly.Connection.prototype.targetConnection = null;
+Blockly.Connection.prototype.check_ = null;
+Blockly.Connection.prototype.shadowDom_ = null;
+Blockly.Connection.prototype.x_ = 0;
+Blockly.Connection.prototype.y_ = 0;
+Blockly.Connection.prototype.inDB_ = !1;
+Blockly.Connection.prototype.db_ = null;
+Blockly.Connection.prototype.dbOpposite_ = null;
+Blockly.Connection.prototype.hidden_ = null;
+Blockly.Connection.prototype.connect_ = function (a) {
+	var b = this,
+		c = b.getSourceBlock(),
+		d = a.getSourceBlock();
+	a.isConnected() && a.disconnect();
+	if (b.isConnected()) {
+		var e = b.targetBlock(),
+			f = b.getShadowDom();
+		b.setShadowDom(null);
+		if (e.isShadow()) f = Blockly.Xml.blockToDom(e), e.dispose(), e = null;
+		else if (b.type == Blockly.INPUT_VALUE) {
+			if (!e.outputConnection) throw "Orphan block does not have an output connection.";
+			var g = Blockly.Connection.lastConnectionInRow_(d, e);
+			g && (e.outputConnection.connect(g), e = null)
+		} else if (b.type ==
+			Blockly.NEXT_STATEMENT) {
+			if (!e.previousConnection) throw "Orphan block does not have a previous connection.";
+			for (g = d; g.nextConnection;) {
+				var h = g.getNextBlock();
+				if (h && !h.isShadow()) g = h;
+				else {
+					e.previousConnection.checkType_(g.nextConnection) && (g.nextConnection.connect(e.previousConnection), e = null);
+					break
+				}
+			}
+		}
+		if (e && (b.disconnect(), Blockly.Events.recordUndo)) {
+			var k = Blockly.Events.getGroup();
+			setTimeout(function () {
+				e.workspace && !e.getParent() && (Blockly.Events.setGroup(k), e.outputConnection ? e.outputConnection.bumpAwayFrom_(b) :
+					e.previousConnection && e.previousConnection.bumpAwayFrom_(b), Blockly.Events.setGroup(!1))
+			}, Blockly.BUMP_DELAY)
+		}
+		b.setShadowDom(f)
+	}
+	var m;
+	Blockly.Events.isEnabled() && (m = new Blockly.Events.Move(d));
+	Blockly.Connection.connectReciprocally_(b, a);
+	d.setParent(c);
+	m && (m.recordNew(), Blockly.Events.fire(m))
+};
+Blockly.Connection.prototype.dispose = function () {
+	if (this.isConnected()) throw "Disconnect connection before disposing of it.";
+	this.inDB_ && this.db_.removeConnection_(this);
+	Blockly.highlightedConnection_ == this && (Blockly.highlightedConnection_ = null);
+	Blockly.localConnection_ == this && (Blockly.localConnection_ = null);
+	this.dbOpposite_ = this.db_ = null
+};
+Blockly.Connection.prototype.getSourceBlock = function () {
+	return this.sourceBlock_
+};
+Blockly.Connection.prototype.isSuperior = function () {
+	return this.type == Blockly.INPUT_VALUE || this.type == Blockly.NEXT_STATEMENT
+};
+Blockly.Connection.prototype.isConnected = function () {
+	return !!this.targetConnection
+};
+Blockly.Connection.prototype.canConnectWithReason_ = function (a) {
+	if (!a) return Blockly.Connection.REASON_TARGET_NULL;
+	if (this.isSuperior()) var b = this.sourceBlock_,
+		c = a.getSourceBlock();
+	else c = this.sourceBlock_, b = a.getSourceBlock();
+	return b && b == c ? Blockly.Connection.REASON_SELF_CONNECTION : a.type != Blockly.OPPOSITE_TYPE[this.type] ? Blockly.Connection.REASON_WRONG_TYPE : b && c && b.workspace !== c.workspace ? Blockly.Connection.REASON_DIFFERENT_WORKSPACES : this.checkType_(a) ? b.isShadow() && !c.isShadow() ? Blockly.Connection.REASON_SHADOW_PARENT :
+		Blockly.Connection.CAN_CONNECT : Blockly.Connection.REASON_CHECKS_FAILED
+};
+Blockly.Connection.prototype.checkConnection_ = function (a) {
+	switch (this.canConnectWithReason_(a)) {
+		case Blockly.Connection.CAN_CONNECT:
+			break;
+		case Blockly.Connection.REASON_SELF_CONNECTION:
+			throw "Attempted to connect a block to itself.";
+		case Blockly.Connection.REASON_DIFFERENT_WORKSPACES:
+			throw "Blocks not on same workspace.";
+		case Blockly.Connection.REASON_WRONG_TYPE:
+			throw "Attempt to connect incompatible types.";
+		case Blockly.Connection.REASON_TARGET_NULL:
+			throw "Target connection is null.";
+		case Blockly.Connection.REASON_CHECKS_FAILED:
+			throw "Connection checks failed.";
+		case Blockly.Connection.REASON_SHADOW_PARENT:
+			throw "Connecting non-shadow to shadow block.";
+		default:
+			throw "Unknown connection failure: this should never happen!";
+	}
+};
+Blockly.Connection.prototype.isConnectionAllowed = function (a) {
+	if (this.canConnectWithReason_(a) != Blockly.Connection.CAN_CONNECT) return !1;
+	if (a.type == Blockly.OUTPUT_VALUE || a.type == Blockly.PREVIOUS_STATEMENT)
+		if (a.isConnected() || this.isConnected()) return !1;
+	return a.type == Blockly.INPUT_VALUE && a.isConnected() && !a.targetBlock().isMovable() && !a.targetBlock().isShadow() || this.type == Blockly.PREVIOUS_STATEMENT && a.isConnected() && !this.sourceBlock_.nextConnection && !a.targetBlock().isShadow() && a.targetBlock().nextConnection ||
+		-1 != Blockly.draggingConnections_.indexOf(a) ? !1 : !0
+};
+Blockly.Connection.prototype.connect = function (a) {
+	this.targetConnection != a && (this.checkConnection_(a), this.isSuperior() ? this.connect_(a) : a.connect_(this))
+};
+Blockly.Connection.connectReciprocally_ = function (a, b) {
+	goog.asserts.assert(a && b, "Cannot connect null connections.");
+	a.targetConnection = b;
+	b.targetConnection = a
+};
+Blockly.Connection.singleConnection_ = function (a, b) {
+	for (var c = !1, d = 0; d < a.inputList.length; d++) {
+		var e = a.inputList[d].connection;
+		if (e && e.type == Blockly.INPUT_VALUE && b.outputConnection.checkType_(e)) {
+			if (c) return null;
+			c = e
+		}
+	}
+	return c
+};
+Blockly.Connection.lastConnectionInRow_ = function (a, b) {
+	for (var c = a, d; d = Blockly.Connection.singleConnection_(c, b) ;)
+		if (c = d.targetBlock(), !c || c.isShadow()) return d;
+	return null
+};
+Blockly.Connection.prototype.disconnect = function () {
+	var a = this.targetConnection;
+	goog.asserts.assert(a, "Source connection not connected.");
+	goog.asserts.assert(a.targetConnection == this, "Target connection not connected to source connection.");
+	var b, c;
+	this.isSuperior() ? (b = this.sourceBlock_, c = a.getSourceBlock(), a = this) : (b = a.getSourceBlock(), c = this.sourceBlock_);
+	this.disconnectInternal_(b, c);
+	a.respawnShadow_()
+};
+Blockly.Connection.prototype.disconnectInternal_ = function (a, b) {
+	var c;
+	Blockly.Events.isEnabled() && (c = new Blockly.Events.Move(b));
+	this.targetConnection = this.targetConnection.targetConnection = null;
+	b.setParent(null);
+	c && (c.recordNew(), Blockly.Events.fire(c))
+};
+Blockly.Connection.prototype.respawnShadow_ = function () {
+	var a = this.getSourceBlock(),
+		b = this.getShadowDom();
+	if (a.workspace && b && Blockly.Events.recordUndo)
+		if (a = Blockly.Xml.domToBlock(b, a.workspace), a.outputConnection) this.connect(a.outputConnection);
+		else if (a.previousConnection) this.connect(a.previousConnection);
+		else throw "Child block does not have output or previous statement.";
+};
+Blockly.Connection.prototype.targetBlock = function () {
+	return this.isConnected() ? this.targetConnection.getSourceBlock() : null
+};
+Blockly.Connection.prototype.checkType_ = function (a) {
+	if (!this.check_ || !a.check_) return !0;
+	for (var b = 0; b < this.check_.length; b++)
+		if (-1 != a.check_.indexOf(this.check_[b])) return !0;
+	return !1
+};
+Blockly.Connection.prototype.setCheck = function (a) {
+	a ? (goog.isArray(a) || (a = [a]), this.check_ = a, this.isConnected() && !this.checkType_(this.targetConnection) && ((this.isSuperior() ? this.targetBlock() : this.sourceBlock_).unplug(), this.sourceBlock_.bumpNeighbours_())) : this.check_ = null;
+	return this
+};
+Blockly.Connection.prototype.setShadowDom = function (a) {
+	this.shadowDom_ = a
+};
+Blockly.Connection.prototype.getShadowDom = function () {
+	return this.shadowDom_
+};
+Blockly.Field = function (a, b) {
+	this.size_ = new goog.math.Size(0, 25);
+	this.setValue(a);
+	this.setValidator(b)
+};
+Blockly.Field.cacheWidths_ = null;
+Blockly.Field.cacheReference_ = 0;
+Blockly.Field.prototype.name = void 0;
+Blockly.Field.prototype.maxDisplayLength = 50;
+Blockly.Field.prototype.text_ = "";
+Blockly.Field.prototype.sourceBlock_ = null;
+Blockly.Field.prototype.visible_ = !0;
+Blockly.Field.prototype.validator_ = null;
+Blockly.Field.NBSP = "\u00a0";
+Blockly.Field.prototype.EDITABLE = !0;
+Blockly.Field.prototype.setSourceBlock = function (a) {
+	goog.asserts.assert(!this.sourceBlock_, "Field already bound to a block.");
+	this.sourceBlock_ = a
+};
+Blockly.Field.prototype.init = function () {
+	this.fieldGroup_ || (this.fieldGroup_ = Blockly.createSvgElement("g", {}, null), this.visible_ || (this.fieldGroup_.style.display = "none"), this.borderRect_ = Blockly.createSvgElement("rect", {
+		rx: 4,
+		ry: 4,
+		x: -Blockly.BlockSvg.SEP_SPACE_X / 2,
+		y: 0,
+		height: 16
+	}, this.fieldGroup_, this.sourceBlock_.workspace), this.textElement_ = Blockly.createSvgElement("text", {
+		"class": "blocklyText",
+		y: this.size_.height - 12.5
+	}, this.fieldGroup_), this.updateEditable(), this.sourceBlock_.getSvgRoot().appendChild(this.fieldGroup_),
+		this.mouseUpWrapper_ = Blockly.bindEventWithChecks_(this.fieldGroup_, "mouseup", this, this.onMouseUp_), this.updateTextNode_())
+};
+Blockly.Field.prototype.dispose = function () {
+	this.mouseUpWrapper_ && (Blockly.unbindEvent_(this.mouseUpWrapper_), this.mouseUpWrapper_ = null);
+	this.sourceBlock_ = null;
+	goog.dom.removeNode(this.fieldGroup_);
+	this.validator_ = this.borderRect_ = this.textElement_ = this.fieldGroup_ = null
+};
+Blockly.Field.prototype.updateEditable = function () {
+	var a = this.fieldGroup_;
+	this.EDITABLE && a && (this.sourceBlock_.isEditable() ? (Blockly.addClass_(a, "blocklyEditableText"), Blockly.removeClass_(a, "blocklyNonEditableText"), this.fieldGroup_.style.cursor = this.CURSOR) : (Blockly.addClass_(a, "blocklyNonEditableText"), Blockly.removeClass_(a, "blocklyEditableText"), this.fieldGroup_.style.cursor = ""))
+};
+Blockly.Field.prototype.isVisible = function () {
+	return this.visible_
+};
+Blockly.Field.prototype.setVisible = function (a) {
+	if (this.visible_ != a) {
+		this.visible_ = a;
+		var b = this.getSvgRoot();
+		b && (b.style.display = a ? "block" : "none", this.render_())
+	}
+};
+Blockly.Field.prototype.setValidator = function (a) {
+	this.validator_ = a
+};
+Blockly.Field.prototype.getValidator = function () {
+	return this.validator_
+};
+Blockly.Field.prototype.classValidator = function (a) {
+	return a
+};
+Blockly.Field.prototype.callValidator = function (a) {
+	var b = this.classValidator(a);
+	if (null === b) return null;
+	void 0 !== b && (a = b);
+	if (b = this.getValidator()) {
+		b = b.call(this, a);
+		if (null === b) return null;
+		void 0 !== b && (a = b)
+	}
+	return a
+};
+Blockly.Field.prototype.getSvgRoot = function () {
+	return this.fieldGroup_
+};
+Blockly.Field.prototype.render_ = function () {
+	if (this.visible_ && this.textElement_) {
+		var a = this.textElement_.textContent + "\n" + this.textElement_.className.baseVal;
+		if (Blockly.Field.cacheWidths_ && Blockly.Field.cacheWidths_[a]) var b = Blockly.Field.cacheWidths_[a];
+		else {
+			try {
+				b = this.textElement_.getComputedTextLength()
+			} catch (c) {
+				b = 8 * this.textElement_.textContent.length
+			}
+			Blockly.Field.cacheWidths_ && (Blockly.Field.cacheWidths_[a] = b)
+		}
+		this.borderRect_ && this.borderRect_.setAttribute("width", b + Blockly.BlockSvg.SEP_SPACE_X)
+	} else b =
+		0;
+	this.size_.width = b
+};
+Blockly.Field.startCache = function () {
+	Blockly.Field.cacheReference_++;
+	Blockly.Field.cacheWidths_ || (Blockly.Field.cacheWidths_ = {})
+};
+Blockly.Field.stopCache = function () {
+	Blockly.Field.cacheReference_--;
+	Blockly.Field.cacheReference_ || (Blockly.Field.cacheWidths_ = null)
+};
+Blockly.Field.prototype.getSize = function () {
+	this.size_.width || this.render_();
+	return this.size_
+};
+Blockly.Field.prototype.getScaledBBox_ = function () {
+	var a = this.borderRect_.getBBox();
+	return new goog.math.Size(a.width * this.sourceBlock_.workspace.scale, a.height * this.sourceBlock_.workspace.scale)
+};
+Blockly.Field.prototype.getText = function () {
+	return this.text_
+};
+Blockly.Field.prototype.setText = function (a) {
+	null !== a && (a = String(a), a !== this.text_ && (this.text_ = a, this.updateTextNode_(), this.sourceBlock_ && this.sourceBlock_.rendered && (this.sourceBlock_.render(), this.sourceBlock_.bumpNeighbours_())))
+};
+Blockly.Field.prototype.updateTextNode_ = function () {
+	if (this.textElement_) {
+		var a = this.text_;
+		a.length > this.maxDisplayLength && (a = a.substring(0, this.maxDisplayLength - 2) + "\u2026");
+		a = a.replace(/\s/g, Blockly.Field.NBSP);
+		this.sourceBlock_.RTL && a && (a += "\u200f");
+		a || (a = Blockly.Field.NBSP);
+		goog.dom.removeChildren(this.textElement_);
+		a = document.createTextNode(a);
+		this.textElement_.appendChild(a);
+		this.size_.width = 0
+	}
+};
+Blockly.Field.prototype.getValue = function () {
+	return this.getText()
+};
+Blockly.Field.prototype.setValue = function (a) {
+	if (null !== a) {
+		var b = this.getValue();
+		b != a && (this.sourceBlock_ && Blockly.Events.isEnabled() && Blockly.Events.fire(new Blockly.Events.Change(this.sourceBlock_, "field", this.name, b, a)), this.setText(a))
+	}
+};
+Blockly.Field.prototype.onMouseUp_ = function (a) {
+	if (!goog.userAgent.IPHONE && !goog.userAgent.IPAD || goog.userAgent.isVersionOrHigher("537.51.2") || 0 === a.layerX || 0 === a.layerY) Blockly.isRightButton(a) || this.sourceBlock_.workspace.isDragging() || this.sourceBlock_.isEditable() && this.showEditor_()
+};
+Blockly.Field.prototype.setTooltip = function (a) { };
+Blockly.Field.prototype.getAbsoluteXY_ = function () {
+	return goog.style.getPageOffset(this.borderRect_)
+};
+Blockly.Tooltip = {};
+Blockly.Tooltip.visible = !1;
+Blockly.Tooltip.LIMIT = 50;
+Blockly.Tooltip.mouseOutPid_ = 0;
+Blockly.Tooltip.showPid_ = 0;
+Blockly.Tooltip.lastX_ = 0;
+Blockly.Tooltip.lastY_ = 0;
+Blockly.Tooltip.element_ = null;
+Blockly.Tooltip.poisonedElement_ = null;
+Blockly.Tooltip.OFFSET_X = 0;
+Blockly.Tooltip.OFFSET_Y = 10;
+Blockly.Tooltip.RADIUS_OK = 10;
+Blockly.Tooltip.HOVER_MS = 750;
+Blockly.Tooltip.MARGINS = 5;
+Blockly.Tooltip.DIV = null;
+Blockly.Tooltip.createDom = function () {
+	Blockly.Tooltip.DIV || (Blockly.Tooltip.DIV = goog.dom.createDom("DIV", "blocklyTooltipDiv"), document.body.appendChild(Blockly.Tooltip.DIV))
+};
+Blockly.Tooltip.bindMouseEvents = function (a) {
+	Blockly.bindEvent_(a, "mouseover", null, Blockly.Tooltip.onMouseOver_);
+	Blockly.bindEvent_(a, "mouseout", null, Blockly.Tooltip.onMouseOut_);
+	a.addEventListener("mousemove", Blockly.Tooltip.onMouseMove_, !1)
+};
+Blockly.Tooltip.onMouseOver_ = function (a) {
+	for (a = a.target; !goog.isString(a.tooltip) && !goog.isFunction(a.tooltip) ;) a = a.tooltip;
+	Blockly.Tooltip.element_ != a && (Blockly.Tooltip.hide(), Blockly.Tooltip.poisonedElement_ = null, Blockly.Tooltip.element_ = a);
+	clearTimeout(Blockly.Tooltip.mouseOutPid_)
+};
+Blockly.Tooltip.onMouseOut_ = function (a) {
+	Blockly.Tooltip.mouseOutPid_ = setTimeout(function () {
+		Blockly.Tooltip.element_ = null;
+		Blockly.Tooltip.poisonedElement_ = null;
+		Blockly.Tooltip.hide()
+	}, 1);
+	clearTimeout(Blockly.Tooltip.showPid_)
+};
+Blockly.Tooltip.onMouseMove_ = function (a) {
+	if (Blockly.Tooltip.element_ && Blockly.Tooltip.element_.tooltip && Blockly.dragMode_ == Blockly.DRAG_NONE && !Blockly.WidgetDiv.isVisible())
+		if (Blockly.Tooltip.visible) {
+			var b = Blockly.Tooltip.lastX_ - a.pageX;
+			a = Blockly.Tooltip.lastY_ - a.pageY;
+			Math.sqrt(b * b + a * a) > Blockly.Tooltip.RADIUS_OK && Blockly.Tooltip.hide()
+		} else Blockly.Tooltip.poisonedElement_ != Blockly.Tooltip.element_ && (clearTimeout(Blockly.Tooltip.showPid_), Blockly.Tooltip.lastX_ = a.pageX, Blockly.Tooltip.lastY_ = a.pageY,
+			Blockly.Tooltip.showPid_ = setTimeout(Blockly.Tooltip.show_, Blockly.Tooltip.HOVER_MS))
+};
+Blockly.Tooltip.hide = function () {
+	Blockly.Tooltip.visible && (Blockly.Tooltip.visible = !1, Blockly.Tooltip.DIV && (Blockly.Tooltip.DIV.style.display = "none"));
+	clearTimeout(Blockly.Tooltip.showPid_)
+};
+Blockly.Tooltip.show_ = function () {
+	Blockly.Tooltip.poisonedElement_ = Blockly.Tooltip.element_;
+	if (Blockly.Tooltip.DIV) {
+		goog.dom.removeChildren(Blockly.Tooltip.DIV);
+		for (var a = Blockly.Tooltip.element_.tooltip; goog.isFunction(a) ;) a = a();
+		for (var a = Blockly.utils.wrap(a, Blockly.Tooltip.LIMIT), a = a.split("\n"), b = 0; b < a.length; b++) {
+			var c = document.createElement("div");
+			c.appendChild(document.createTextNode(a[b]));
+			Blockly.Tooltip.DIV.appendChild(c)
+		}
+		a = Blockly.Tooltip.element_.RTL;
+		b = goog.dom.getViewportSize();
+		Blockly.Tooltip.DIV.style.direction =
+			a ? "rtl" : "ltr";
+		Blockly.Tooltip.DIV.style.display = "block";
+		Blockly.Tooltip.visible = !0;
+		var c = Blockly.Tooltip.lastX_,
+			c = a ? c - (Blockly.Tooltip.OFFSET_X + Blockly.Tooltip.DIV.offsetWidth) : c + Blockly.Tooltip.OFFSET_X,
+			d = Blockly.Tooltip.lastY_ + Blockly.Tooltip.OFFSET_Y;
+		d + Blockly.Tooltip.DIV.offsetHeight > b.height + window.scrollY && (d -= Blockly.Tooltip.DIV.offsetHeight + 2 * Blockly.Tooltip.OFFSET_Y);
+		a ? c = Math.max(Blockly.Tooltip.MARGINS - window.scrollX, c) : c + Blockly.Tooltip.DIV.offsetWidth > b.width + window.scrollX - 2 * Blockly.Tooltip.MARGINS &&
+			(c = b.width - Blockly.Tooltip.DIV.offsetWidth - 2 * Blockly.Tooltip.MARGINS);
+		Blockly.Tooltip.DIV.style.top = d + "px";
+		Blockly.Tooltip.DIV.style.left = c + "px"
+	}
+};
+Blockly.FieldLabel = function (a, b) {
+	this.size_ = new goog.math.Size(0, 17.5);
+	this.class_ = b;
+	this.setValue(a)
+};
+goog.inherits(Blockly.FieldLabel, Blockly.Field);
+Blockly.FieldLabel.prototype.EDITABLE = !1;
+Blockly.FieldLabel.prototype.init = function () {
+	this.textElement_ || (this.textElement_ = Blockly.createSvgElement("text", {
+		"class": "blocklyText",
+		y: this.size_.height - 5
+	}, null), this.class_ && Blockly.addClass_(this.textElement_, this.class_), this.visible_ || (this.textElement_.style.display = "none"), this.sourceBlock_.getSvgRoot().appendChild(this.textElement_), this.textElement_.tooltip = this.sourceBlock_, Blockly.Tooltip.bindMouseEvents(this.textElement_), this.updateTextNode_())
+};
+Blockly.FieldLabel.prototype.dispose = function () {
+	goog.dom.removeNode(this.textElement_);
+	this.textElement_ = null
+};
+Blockly.FieldLabel.prototype.getSvgRoot = function () {
+	return this.textElement_
+};
+Blockly.FieldLabel.prototype.setTooltip = function (a) {
+	this.textElement_.tooltip = a
+};
+Blockly.Input = function (a, b, c, d) {
+	this.type = a;
+	this.name = b;
+	this.sourceBlock_ = c;
+	this.connection = d;
+	this.fieldRow = []
+};
+Blockly.Input.prototype.align = Blockly.ALIGN_LEFT;
+Blockly.Input.prototype.visible_ = !0;
+Blockly.Input.prototype.appendField = function (a, b) {
+	if (!a && !b) return this;
+	goog.isString(a) && (a = new Blockly.FieldLabel(a));
+	a.setSourceBlock(this.sourceBlock_);
+	this.sourceBlock_.rendered && a.init();
+	a.name = b;
+	a.prefixField && this.appendField(a.prefixField);
+	this.fieldRow.push(a);
+	a.suffixField && this.appendField(a.suffixField);
+	this.sourceBlock_.rendered && (this.sourceBlock_.render(), this.sourceBlock_.bumpNeighbours_());
+	return this
+};
+Blockly.Input.prototype.appendTitle = function (a, b) {
+	console.warn("Deprecated call to appendTitle, use appendField instead.");
+	return this.appendField(a, b)
+};
+Blockly.Input.prototype.removeField = function (a) {
+	for (var b = 0, c; c = this.fieldRow[b]; b++)
+		if (c.name === a) {
+			c.dispose();
+			this.fieldRow.splice(b, 1);
+			this.sourceBlock_.rendered && (this.sourceBlock_.render(), this.sourceBlock_.bumpNeighbours_());
+			return
+		}
+	goog.asserts.fail('Field "%s" not found.', a)
+};
+Blockly.Input.prototype.isVisible = function () {
+	return this.visible_
+};
+Blockly.Input.prototype.setVisible = function (a) {
+	var b = [];
+	if (this.visible_ == a) return b;
+	for (var c = (this.visible_ = a) ? "block" : "none", d = 0, e; e = this.fieldRow[d]; d++) e.setVisible(a);
+	this.connection && (a ? b = this.connection.unhideAll() : this.connection.hideAll(), d = this.connection.targetBlock()) && (d.getSvgRoot().style.display = c, a || (d.rendered = !1));
+	return b
+};
+Blockly.Input.prototype.setCheck = function (a) {
+	if (!this.connection) throw "This input does not have a connection.";
+	this.connection.setCheck(a);
+	return this
+};
+Blockly.Input.prototype.setAlign = function (a) {
+	this.align = a;
+	this.sourceBlock_.rendered && this.sourceBlock_.render();
+	return this
+};
+Blockly.Input.prototype.init = function () {
+	if (this.sourceBlock_.workspace.rendered)
+		for (var a = 0; a < this.fieldRow.length; a++) this.fieldRow[a].init()
+};
+Blockly.Input.prototype.dispose = function () {
+	for (var a = 0, b; b = this.fieldRow[a]; a++) b.dispose();
+	this.connection && this.connection.dispose();
+	this.sourceBlock_ = null
+};
+Blockly.ConnectionDB = function () { };
+Blockly.ConnectionDB.prototype = [];
+Blockly.ConnectionDB.constructor = Blockly.ConnectionDB;
+Blockly.ConnectionDB.prototype.addConnection = function (a) {
+	if (a.inDB_) throw "Connection already in database.";
+	if (!a.getSourceBlock().isInFlyout) {
+		var b = this.findPositionForConnection_(a);
+		this.splice(b, 0, a);
+		a.inDB_ = !0
+	}
+};
+Blockly.ConnectionDB.prototype.findConnection = function (a) {
+	if (!this.length) return -1;
+	var b = this.findPositionForConnection_(a);
+	if (b >= this.length) return -1;
+	for (var c = a.y_, d = b; 0 <= d && this[d].y_ == c;) {
+		if (this[d] == a) return d;
+		d--
+	}
+	for (; b < this.length && this[b].y_ == c;) {
+		if (this[b] == a) return b;
+		b++
+	}
+	return -1
+};
+Blockly.ConnectionDB.prototype.findPositionForConnection_ = function (a) {
+	if (!this.length) return 0;
+	for (var b = 0, c = this.length; b < c;) {
+		var d = Math.floor((b + c) / 2);
+		if (this[d].y_ < a.y_) b = d + 1;
+		else if (this[d].y_ > a.y_) c = d;
+		else {
+			b = d;
+			break
+		}
+	}
+	return b
+};
+Blockly.ConnectionDB.prototype.removeConnection_ = function (a) {
+	if (!a.inDB_) throw "Connection not in database.";
+	var b = this.findConnection(a);
+	if (-1 == b) throw "Unable to find connection in connectionDB.";
+	a.inDB_ = !1;
+	this.splice(b, 1)
+};
+Blockly.ConnectionDB.prototype.getNeighbours = function (a, b) {
+	function c(a) {
+		var c = e - d[a].x_,
+			g = f - d[a].y_;
+		Math.sqrt(c * c + g * g) <= b && m.push(d[a]);
+		return g < b
+	}
+	for (var d = this, e = a.x_, f = a.y_, g = 0, h = d.length - 2, k = h; g < k;) d[k].y_ < f ? g = k : h = k, k = Math.floor((g + h) / 2);
+	var m = [],
+		h = g = k;
+	if (d.length) {
+		for (; 0 <= g && c(g) ;) g--;
+		do h++; while (h < d.length && c(h))
+	}
+	return m
+};
+Blockly.ConnectionDB.prototype.isInYRange_ = function (a, b, c) {
+	return Math.abs(this[a].y_ - b) <= c
+};
+Blockly.ConnectionDB.prototype.searchForClosest = function (a, b, c) {
+	if (!this.length) return {
+		connection: null,
+		radius: b
+	};
+	var d = a.y_,
+		e = a.x_;
+	a.x_ = e + c.x;
+	a.y_ = d + c.y;
+	var f = this.findPositionForConnection_(a);
+	c = null;
+	for (var g = b, h, k = f - 1; 0 <= k && this.isInYRange_(k, a.y_, b) ;) h = this[k], a.isConnectionAllowed(h, g) && (c = h, g = h.distanceFrom(a)), k--;
+	for (; f < this.length && this.isInYRange_(f, a.y_, b) ;) h = this[f], a.isConnectionAllowed(h, g) && (c = h, g = h.distanceFrom(a)), f++;
+	a.x_ = e;
+	a.y_ = d;
+	return {
+		connection: c,
+		radius: g
+	}
+};
+Blockly.ConnectionDB.init = function (a) {
+	var b = [];
+	b[Blockly.INPUT_VALUE] = new Blockly.ConnectionDB;
+	b[Blockly.OUTPUT_VALUE] = new Blockly.ConnectionDB;
+	b[Blockly.NEXT_STATEMENT] = new Blockly.ConnectionDB;
+	b[Blockly.PREVIOUS_STATEMENT] = new Blockly.ConnectionDB;
+	a.connectionDBList = b
+};
+Blockly.constants = {};
+Blockly.DRAG_RADIUS = 5;
+Blockly.SNAP_RADIUS = 20;
+Blockly.BUMP_DELAY = 250;
+Blockly.COLLAPSE_CHARS = 30;
+Blockly.LONGPRESS = 750;
+Blockly.SOUND_LIMIT = 100;
+Blockly.HSV_SATURATION = .45;
+Blockly.HSV_VALUE = .65;
+Blockly.SPRITE = {
+	width: 96,
+	height: 124,
+	url: "sprites.png"
+};
+Blockly.SVG_NS = "http://www.w3.org/2000/svg";
+Blockly.HTML_NS = "http://www.w3.org/1999/xhtml";
+Blockly.INPUT_VALUE = 1;
+Blockly.OUTPUT_VALUE = 2;
+Blockly.NEXT_STATEMENT = 3;
+Blockly.PREVIOUS_STATEMENT = 4;
+Blockly.DUMMY_INPUT = 5;
+Blockly.ALIGN_LEFT = -1;
+Blockly.ALIGN_CENTRE = 0;
+Blockly.ALIGN_RIGHT = 1;
+Blockly.DRAG_NONE = 0;
+Blockly.DRAG_STICKY = 1;
+Blockly.DRAG_BEGIN = 1;
+Blockly.DRAG_FREE = 2;
+Blockly.OPPOSITE_TYPE = [];
+Blockly.OPPOSITE_TYPE[Blockly.INPUT_VALUE] = Blockly.OUTPUT_VALUE;
+Blockly.OPPOSITE_TYPE[Blockly.OUTPUT_VALUE] = Blockly.INPUT_VALUE;
+Blockly.OPPOSITE_TYPE[Blockly.NEXT_STATEMENT] = Blockly.PREVIOUS_STATEMENT;
+Blockly.OPPOSITE_TYPE[Blockly.PREVIOUS_STATEMENT] = Blockly.NEXT_STATEMENT;
+Blockly.TOOLBOX_AT_TOP = 0;
+Blockly.TOOLBOX_AT_BOTTOM = 1;
+Blockly.TOOLBOX_AT_LEFT = 2;
+Blockly.TOOLBOX_AT_RIGHT = 3;
+Blockly.Options = function (a) {
+	var b = !!a.readOnly;
+	if (b) var c = null,
+		d = !1,
+		e = !1,
+		f = !1,
+		g = !1,
+		h = !1,
+		k = !1;
+	else c = Blockly.Options.parseToolboxTree(a.toolbox), d = !(!c || !c.getElementsByTagName("category").length), e = a.trashcan, void 0 === e && (e = d), f = a.collapse, void 0 === f && (f = d), g = a.comments, void 0 === g && (g = d), h = a.disable, void 0 === h && (h = d), k = a.sounds, void 0 === k && (k = !0);
+	var m = !!a.rtl,
+		p = a.horizontalLayout;
+	void 0 === p && (p = !1);
+	var l = a.toolboxPosition,
+		l = "end" === l ? !1 : !0,
+		l = p ? l ? Blockly.TOOLBOX_AT_TOP : Blockly.TOOLBOX_AT_BOTTOM : l ==
+		m ? Blockly.TOOLBOX_AT_RIGHT : Blockly.TOOLBOX_AT_LEFT,
+		n = a.scrollbars;
+	void 0 === n && (n = d);
+	var q = a.css;
+	void 0 === q && (q = !0);
+	var t = "https://blockly-demo.appspot.com/static/media/";
+	a.media ? t = a.media : a.path && (t = a.path + "media/");
+	var r = void 0 === a.oneBasedIndex ? !0 : !!a.oneBasedIndex;
+	this.RTL = m;
+	this.oneBasedIndex = r;
+	this.collapse = f;
+	this.comments = g;
+	this.disable = h;
+	this.readOnly = b;
+	this.maxBlocks = a.maxBlocks || Infinity;
+	this.pathToMedia = t;
+	this.hasCategories = d;
+	this.hasScrollbars = n;
+	this.hasTrashcan = e;
+	this.hasSounds = k;
+	this.hasCss =
+		q;
+	this.horizontalLayout = p;
+	this.languageTree = c;
+	this.gridOptions = Blockly.Options.parseGridOptions_(a);
+	this.zoomOptions = Blockly.Options.parseZoomOptions_(a);
+	this.toolboxPosition = l
+};
+Blockly.Options.prototype.parentWorkspace = null;
+Blockly.Options.prototype.setMetrics = null;
+Blockly.Options.prototype.getMetrics = null;
+Blockly.Options.parseZoomOptions_ = function (a) {
+	a = a.zoom || {};
+	var b = {};
+	b.controls = void 0 === a.controls ? !1 : !!a.controls;
+	b.wheel = void 0 === a.wheel ? !1 : !!a.wheel;
+	b.startScale = void 0 === a.startScale ? 1 : parseFloat(a.startScale);
+	b.maxScale = void 0 === a.maxScale ? 3 : parseFloat(a.maxScale);
+	b.minScale = void 0 === a.minScale ? .3 : parseFloat(a.minScale);
+	b.scaleSpeed = void 0 === a.scaleSpeed ? 1.2 : parseFloat(a.scaleSpeed);
+	return b
+};
+Blockly.Options.parseGridOptions_ = function (a) {
+	a = a.grid || {};
+	var b = {};
+	b.spacing = parseFloat(a.spacing) || 0;
+	b.colour = a.colour || "#888";
+	b.length = parseFloat(a.length) || 1;
+	b.snap = 0 < b.spacing && !!a.snap;
+	return b
+};
+Blockly.Options.parseToolboxTree = function (a) {
+	a ? ("string" != typeof a && ("undefined" == typeof XSLTProcessor && a.outerHTML ? a = a.outerHTML : a instanceof Element || (a = null)), "string" == typeof a && (a = Blockly.Xml.textToDom(a))) : a = null;
+	return a
+};
+Blockly.ScrollbarPair = function (a) {
+	this.workspace_ = a;
+	this.hScroll = new Blockly.Scrollbar(a, !0, !0);
+	this.vScroll = new Blockly.Scrollbar(a, !1, !0);
+	this.corner_ = Blockly.createSvgElement("rect", {
+		height: Blockly.Scrollbar.scrollbarThickness,
+		width: Blockly.Scrollbar.scrollbarThickness,
+		"class": "blocklyScrollbarBackground"
+	}, null);
+	Blockly.Scrollbar.insertAfter_(this.corner_, a.getBubbleCanvas())
+};
+Blockly.ScrollbarPair.prototype.oldHostMetrics_ = null;
+Blockly.ScrollbarPair.prototype.dispose = function () {
+	goog.dom.removeNode(this.corner_);
+	this.oldHostMetrics_ = this.workspace_ = this.corner_ = null;
+	this.hScroll.dispose();
+	this.hScroll = null;
+	this.vScroll.dispose();
+	this.vScroll = null
+};
+Blockly.ScrollbarPair.prototype.resize = function () {
+	var a = this.workspace_.getMetrics();
+	if (a) {
+		var b = !1,
+			c = !1;
+		this.oldHostMetrics_ && this.oldHostMetrics_.viewWidth == a.viewWidth && this.oldHostMetrics_.viewHeight == a.viewHeight && this.oldHostMetrics_.absoluteTop == a.absoluteTop && this.oldHostMetrics_.absoluteLeft == a.absoluteLeft ? (this.oldHostMetrics_ && this.oldHostMetrics_.contentWidth == a.contentWidth && this.oldHostMetrics_.viewLeft == a.viewLeft && this.oldHostMetrics_.contentLeft == a.contentLeft || (b = !0), this.oldHostMetrics_ &&
+			this.oldHostMetrics_.contentHeight == a.contentHeight && this.oldHostMetrics_.viewTop == a.viewTop && this.oldHostMetrics_.contentTop == a.contentTop || (c = !0)) : c = b = !0;
+		b && this.hScroll.resize(a);
+		c && this.vScroll.resize(a);
+		this.oldHostMetrics_ && this.oldHostMetrics_.viewWidth == a.viewWidth && this.oldHostMetrics_.absoluteLeft == a.absoluteLeft || this.corner_.setAttribute("x", this.vScroll.position_.x);
+		this.oldHostMetrics_ && this.oldHostMetrics_.viewHeight == a.viewHeight && this.oldHostMetrics_.absoluteTop == a.absoluteTop || this.corner_.setAttribute("y",
+			this.hScroll.position_.y);
+		this.oldHostMetrics_ = a
+	}
+};
+Blockly.ScrollbarPair.prototype.set = function (a, b) {
+	var c = {},
+		d = a * this.hScroll.ratio_,
+		e = b * this.vScroll.ratio_,
+		f = this.vScroll.scrollViewSize_;
+	c.x = this.getRatio_(d, this.hScroll.scrollViewSize_);
+	c.y = this.getRatio_(e, f);
+	this.workspace_.setMetrics(c);
+	this.hScroll.setHandlePosition(d);
+	this.vScroll.setHandlePosition(e)
+};
+Blockly.ScrollbarPair.prototype.getRatio_ = function (a, b) {
+	var c = a / b;
+	return isNaN(c) ? 0 : c
+};
+Blockly.Scrollbar = function (a, b, c) {
+	this.workspace_ = a;
+	this.pair_ = c || !1;
+	this.horizontal_ = b;
+	this.oldHostMetrics_ = null;
+	this.createDom_();
+	this.position_ = new goog.math.Coordinate(0, 0);
+	b ? (this.svgBackground_.setAttribute("height", Blockly.Scrollbar.scrollbarThickness), this.svgHandle_.setAttribute("height", Blockly.Scrollbar.scrollbarThickness - 5), this.svgHandle_.setAttribute("y", 2.5), this.lengthAttribute_ = "width", this.positionAttribute_ = "x") : (this.svgBackground_.setAttribute("width", Blockly.Scrollbar.scrollbarThickness),
+		this.svgHandle_.setAttribute("width", Blockly.Scrollbar.scrollbarThickness - 5), this.svgHandle_.setAttribute("x", 2.5), this.lengthAttribute_ = "height", this.positionAttribute_ = "y");
+	this.onMouseDownBarWrapper_ = Blockly.bindEventWithChecks_(this.svgBackground_, "mousedown", this, this.onMouseDownBar_);
+	this.onMouseDownHandleWrapper_ = Blockly.bindEventWithChecks_(this.svgHandle_, "mousedown", this, this.onMouseDownHandle_)
+};
+Blockly.Scrollbar.prototype.scrollViewSize_ = 0;
+Blockly.Scrollbar.prototype.handleLength_ = 0;
+Blockly.Scrollbar.prototype.handlePosition_ = 0;
+Blockly.Scrollbar.prototype.isVisible_ = !0;
+Blockly.Scrollbar.scrollbarThickness = 15;
+goog.events.BrowserFeature.TOUCH_ENABLED && (Blockly.Scrollbar.scrollbarThickness = 25);
+Blockly.Scrollbar.metricsAreEquivalent_ = function (a, b) {
+	return a && b && a.viewWidth == b.viewWidth && a.viewHeight == b.viewHeight && a.viewLeft == b.viewLeft && a.viewTop == b.viewTop && a.absoluteTop == b.absoluteTop && a.absoluteLeft == b.absoluteLeft && a.contentWidth == b.contentWidth && a.contentHeight == b.contentHeight && a.contentLeft == b.contentLeft && a.contentTop == b.contentTop ? !0 : !1
+};
+Blockly.Scrollbar.prototype.dispose = function () {
+	this.cleanUp_();
+	Blockly.unbindEvent_(this.onMouseDownBarWrapper_);
+	this.onMouseDownBarWrapper_ = null;
+	Blockly.unbindEvent_(this.onMouseDownHandleWrapper_);
+	this.onMouseDownHandleWrapper_ = null;
+	goog.dom.removeNode(this.svgGroup_);
+	this.workspace_ = this.svgHandle_ = this.svgBackground_ = this.svgGroup_ = null
+};
+Blockly.Scrollbar.prototype.setHandleLength_ = function (a) {
+	this.handleLength_ = a;
+	this.svgHandle_.setAttribute(this.lengthAttribute_, this.handleLength_)
+};
+Blockly.Scrollbar.prototype.setHandlePosition = function (a) {
+	this.handlePosition_ = a;
+	this.svgHandle_.setAttribute(this.positionAttribute_, this.handlePosition_)
+};
+Blockly.Scrollbar.prototype.setScrollViewSize_ = function (a) {
+	this.scrollViewSize_ = a;
+	this.svgBackground_.setAttribute(this.lengthAttribute_, this.scrollViewSize_)
+};
+Blockly.Scrollbar.prototype.setPosition = function (a, b) {
+	this.position_.x = a;
+	this.position_.y = b;
+	this.svgGroup_.setAttribute("transform", "translate(" + this.position_.x + "," + this.position_.y + ")")
+};
+Blockly.Scrollbar.prototype.resize = function (a) {
+	if (!a && (a = this.workspace_.getMetrics(), !a)) return;
+	Blockly.Scrollbar.metricsAreEquivalent_(a, this.oldHostMetrics_) || (this.oldHostMetrics_ = a, this.horizontal_ ? this.resizeHorizontal_(a) : this.resizeVertical_(a), this.onScroll_())
+};
+Blockly.Scrollbar.prototype.resizeHorizontal_ = function (a) {
+	this.resizeViewHorizontal(a)
+};
+Blockly.Scrollbar.prototype.resizeViewHorizontal = function (a) {
+	var b = a.viewWidth - 1;
+	this.pair_ && (b -= Blockly.Scrollbar.scrollbarThickness);
+	this.setScrollViewSize_(Math.max(0, b));
+	b = a.absoluteLeft + .5;
+	this.pair_ && this.workspace_.RTL && (b += Blockly.Scrollbar.scrollbarThickness);
+	this.setPosition(b, a.absoluteTop + a.viewHeight - Blockly.Scrollbar.scrollbarThickness - .5);
+	this.resizeContentHorizontal(a)
+};
+Blockly.Scrollbar.prototype.resizeContentHorizontal = function (a) {
+	this.pair_ || this.setVisible(this.scrollViewSize_ < a.contentWidth);
+	this.ratio_ = this.scrollViewSize_ / a.contentWidth;
+	if (-Infinity == this.ratio_ || Infinity == this.ratio_ || isNaN(this.ratio_)) this.ratio_ = 0;
+	this.setHandleLength_(Math.max(0, a.viewWidth * this.ratio_));
+	this.setHandlePosition(this.constrainHandle_((a.viewLeft - a.contentLeft) * this.ratio_))
+};
+Blockly.Scrollbar.prototype.resizeVertical_ = function (a) {
+	this.resizeViewVertical(a)
+};
+Blockly.Scrollbar.prototype.resizeViewVertical = function (a) {
+	var b = a.viewHeight - 1;
+	this.pair_ && (b -= Blockly.Scrollbar.scrollbarThickness);
+	this.setScrollViewSize_(Math.max(0, b));
+	b = a.absoluteLeft + .5;
+	this.workspace_.RTL || (b += a.viewWidth - Blockly.Scrollbar.scrollbarThickness - 1);
+	this.setPosition(b, a.absoluteTop + .5);
+	this.resizeContentVertical(a)
+};
+Blockly.Scrollbar.prototype.resizeContentVertical = function (a) {
+	this.pair_ || this.setVisible(this.scrollViewSize_ < a.contentHeight);
+	this.ratio_ = this.scrollViewSize_ / a.contentHeight;
+	if (-Infinity == this.ratio_ || Infinity == this.ratio_ || isNaN(this.ratio_)) this.ratio_ = 0;
+	this.setHandleLength_(Math.max(0, a.viewHeight * this.ratio_));
+	this.setHandlePosition(this.constrainHandle_((a.viewTop - a.contentTop) * this.ratio_))
+};
+Blockly.Scrollbar.prototype.createDom_ = function () {
+	this.svgGroup_ = Blockly.createSvgElement("g", {
+		"class": "blocklyScrollbar" + (this.horizontal_ ? "Horizontal" : "Vertical")
+	}, null);
+	this.svgBackground_ = Blockly.createSvgElement("rect", {
+		"class": "blocklyScrollbarBackground"
+	}, this.svgGroup_);
+	var a = Math.floor((Blockly.Scrollbar.scrollbarThickness - 5) / 2);
+	this.svgHandle_ = Blockly.createSvgElement("rect", {
+		"class": "blocklyScrollbarHandle",
+		rx: a,
+		ry: a
+	}, this.svgGroup_);
+	Blockly.Scrollbar.insertAfter_(this.svgGroup_, this.workspace_.getBubbleCanvas())
+};
+Blockly.Scrollbar.prototype.isVisible = function () {
+	return this.isVisible_
+};
+Blockly.Scrollbar.prototype.setVisible = function (a) {
+	if (a != this.isVisible()) {
+		if (this.pair_) throw "Unable to toggle visibility of paired scrollbars.";
+		(this.isVisible_ = a) ? this.svgGroup_.setAttribute("display", "block") : (this.workspace_.setMetrics({
+			x: 0,
+			y: 0
+		}), this.svgGroup_.setAttribute("display", "none"))
+	}
+};
+Blockly.Scrollbar.prototype.onMouseDownBar_ = function (a) {
+	this.workspace_.markFocused();
+	Blockly.Touch.clearTouchIdentifier();
+	this.cleanUp_();
+	if (Blockly.isRightButton(a)) a.stopPropagation();
+	else {
+		var b = Blockly.mouseToSvg(a, this.workspace_.getParentSvg(), this.workspace_.getInverseScreenCTM()),
+			b = this.horizontal_ ? b.x : b.y,
+			c = Blockly.getSvgXY_(this.svgHandle_, this.workspace_),
+			c = this.horizontal_ ? c.x : c.y,
+			d = this.handlePosition_,
+			e = .95 * this.handleLength_;
+		b <= c ? d -= e : b >= c + this.handleLength_ && (d += e);
+		this.setHandlePosition(this.constrainHandle_(d));
+		this.onScroll_();
+		a.stopPropagation();
+		a.preventDefault()
+	}
+};
+Blockly.Scrollbar.prototype.onMouseDownHandle_ = function (a) {
+	this.workspace_.markFocused();
+	this.cleanUp_();
+	Blockly.isRightButton(a) ? a.stopPropagation() : (this.startDragHandle = this.handlePosition_, this.startDragMouse = this.horizontal_ ? a.clientX : a.clientY, Blockly.Scrollbar.onMouseUpWrapper_ = Blockly.bindEventWithChecks_(document, "mouseup", this, this.onMouseUpHandle_), Blockly.Scrollbar.onMouseMoveWrapper_ = Blockly.bindEventWithChecks_(document, "mousemove", this, this.onMouseMoveHandle_), a.stopPropagation(), a.preventDefault())
+};
+Blockly.Scrollbar.prototype.onMouseMoveHandle_ = function (a) {
+	this.setHandlePosition(this.constrainHandle_(this.startDragHandle + ((this.horizontal_ ? a.clientX : a.clientY) - this.startDragMouse)));
+	this.onScroll_()
+};
+Blockly.Scrollbar.prototype.onMouseUpHandle_ = function () {
+	Blockly.Touch.clearTouchIdentifier();
+	this.cleanUp_()
+};
+Blockly.Scrollbar.prototype.cleanUp_ = function () {
+	Blockly.hideChaff(!0);
+	Blockly.Scrollbar.onMouseUpWrapper_ && (Blockly.unbindEvent_(Blockly.Scrollbar.onMouseUpWrapper_), Blockly.Scrollbar.onMouseUpWrapper_ = null);
+	Blockly.Scrollbar.onMouseMoveWrapper_ && (Blockly.unbindEvent_(Blockly.Scrollbar.onMouseMoveWrapper_), Blockly.Scrollbar.onMouseMoveWrapper_ = null)
+};
+Blockly.Scrollbar.prototype.constrainHandle_ = function (a) {
+	return a = 0 >= a || isNaN(a) || this.scrollViewSize_ < this.handleLength_ ? 0 : Math.min(a, this.scrollViewSize_ - this.handleLength_)
+};
+Blockly.Scrollbar.prototype.onScroll_ = function () {
+	var a = this.handlePosition_ / this.scrollViewSize_;
+	isNaN(a) && (a = 0);
+	var b = {};
+	this.horizontal_ ? b.x = a : b.y = a;
+	this.workspace_.setMetrics(b)
+};
+Blockly.Scrollbar.prototype.set = function (a) {
+	this.setHandlePosition(this.constrainHandle_(a * this.ratio_));
+	this.onScroll_()
+};
+Blockly.Scrollbar.insertAfter_ = function (a, b) {
+	var c = b.nextSibling,
+		d = b.parentNode;
+	if (!d) throw "Reference node has no parent.";
+	c ? d.insertBefore(a, c) : d.appendChild(a)
+};
+Blockly.Trashcan = function (a) {
+	this.workspace_ = a
+};
+Blockly.Trashcan.prototype.WIDTH_ = 47;
+Blockly.Trashcan.prototype.BODY_HEIGHT_ = 44;
+Blockly.Trashcan.prototype.LID_HEIGHT_ = 16;
+Blockly.Trashcan.prototype.MARGIN_BOTTOM_ = 20;
+Blockly.Trashcan.prototype.MARGIN_SIDE_ = 20;
+Blockly.Trashcan.prototype.MARGIN_HOTSPOT_ = 10;
+Blockly.Trashcan.prototype.SPRITE_LEFT_ = 0;
+Blockly.Trashcan.prototype.SPRITE_TOP_ = 32;
+Blockly.Trashcan.prototype.isOpen = !1;
+Blockly.Trashcan.prototype.svgGroup_ = null;
+Blockly.Trashcan.prototype.svgLid_ = null;
+Blockly.Trashcan.prototype.lidTask_ = 0;
+Blockly.Trashcan.prototype.lidOpen_ = 0;
+Blockly.Trashcan.prototype.left_ = 0;
+Blockly.Trashcan.prototype.top_ = 0;
+Blockly.Trashcan.prototype.createDom = function () {
+	this.svgGroup_ = Blockly.createSvgElement("g", {
+		"class": "blocklyTrash"
+	}, null);
+	var a = String(Math.random()).substring(2),
+		b = Blockly.createSvgElement("clipPath", {
+        	id: "blocklyTrashBodyClipPath" + a
+		}, this.svgGroup_);
+	Blockly.createSvgElement("rect", {
+		width: this.WIDTH_,
+		height: this.BODY_HEIGHT_,
+		y: this.LID_HEIGHT_
+	}, b);
+	Blockly.createSvgElement("image", {
+		width: Blockly.SPRITE.width,
+		x: -this.SPRITE_LEFT_,
+		height: Blockly.SPRITE.height,
+		y: -this.SPRITE_TOP_,
+		"clip-path": "url(#blocklyTrashBodyClipPath" +
+			a + ")"
+	}, this.svgGroup_).setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", this.workspace_.options.pathToMedia + Blockly.SPRITE.url);
+	b = Blockly.createSvgElement("clipPath", {
+		id: "blocklyTrashLidClipPath" + a
+	}, this.svgGroup_);
+	Blockly.createSvgElement("rect", {
+		width: this.WIDTH_,
+		height: this.LID_HEIGHT_
+	}, b);
+	this.svgLid_ = Blockly.createSvgElement("image", {
+		width: Blockly.SPRITE.width,
+		x: -this.SPRITE_LEFT_,
+		height: Blockly.SPRITE.height,
+		y: -this.SPRITE_TOP_,
+		"clip-path": "url(#blocklyTrashLidClipPath" + a + ")"
+	}, this.svgGroup_);
+	this.svgLid_.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", this.workspace_.options.pathToMedia + Blockly.SPRITE.url);
+	Blockly.bindEventWithChecks_(this.svgGroup_, "mouseup", this, this.click);
+	this.animateLid_();
+	return this.svgGroup_
+};
+Blockly.Trashcan.prototype.init = function (a) {
+	this.bottom_ = this.MARGIN_BOTTOM_ + a;
+	this.setOpen_(!1);
+	return this.bottom_ + this.BODY_HEIGHT_ + this.LID_HEIGHT_
+};
+Blockly.Trashcan.prototype.dispose = function () {
+	this.svgGroup_ && (goog.dom.removeNode(this.svgGroup_), this.svgGroup_ = null);
+	this.workspace_ = this.svgLid_ = null;
+	goog.Timer.clear(this.lidTask_)
+};
+Blockly.Trashcan.prototype.position = function () {
+	var a = this.workspace_.getMetrics();
+	a && (this.workspace_.RTL ? (this.left_ = this.MARGIN_SIDE_ + Blockly.Scrollbar.scrollbarThickness, a.toolboxPosition == Blockly.TOOLBOX_AT_LEFT && (this.left_ += a.flyoutWidth, this.workspace_.toolbox_ && (this.left_ += a.absoluteLeft))) : (this.left_ = a.viewWidth + a.absoluteLeft - this.WIDTH_ - this.MARGIN_SIDE_ - Blockly.Scrollbar.scrollbarThickness, a.toolboxPosition == Blockly.TOOLBOX_AT_RIGHT && (this.left_ -= a.flyoutWidth)), this.top_ = a.viewHeight +
+		a.absoluteTop - (this.BODY_HEIGHT_ + this.LID_HEIGHT_) - this.bottom_, a.toolboxPosition == Blockly.TOOLBOX_AT_BOTTOM && (this.top_ -= a.flyoutHeight), this.svgGroup_.setAttribute("transform", "translate(" + this.left_ + "," + this.top_ + ")"))
+};
+Blockly.Trashcan.prototype.getClientRect = function () {
+	if (!this.svgGroup_) return null;
+	var a = this.svgGroup_.getBoundingClientRect();
+	return new goog.math.Rect(a.left + this.SPRITE_LEFT_ - this.MARGIN_HOTSPOT_, a.top + this.SPRITE_TOP_ - this.MARGIN_HOTSPOT_, this.WIDTH_ + 2 * this.MARGIN_HOTSPOT_, this.LID_HEIGHT_ + this.BODY_HEIGHT_ + 2 * this.MARGIN_HOTSPOT_)
+};
+Blockly.Trashcan.prototype.setOpen_ = function (a) {
+	this.isOpen != a && (goog.Timer.clear(this.lidTask_), this.isOpen = a, this.animateLid_())
+};
+Blockly.Trashcan.prototype.animateLid_ = function () {
+	this.lidOpen_ += this.isOpen ? .2 : -.2;
+	this.lidOpen_ = goog.math.clamp(this.lidOpen_, 0, 1);
+	var a = 45 * this.lidOpen_;
+	this.svgLid_.setAttribute("transform", "rotate(" + (this.workspace_.RTL ? -a : a) + "," + (this.workspace_.RTL ? 4 : this.WIDTH_ - 4) + "," + (this.LID_HEIGHT_ - 2) + ")");
+	a = goog.math.lerp(.4, .8, this.lidOpen_);
+	this.svgGroup_.style.opacity = a;
+	0 < this.lidOpen_ && 1 > this.lidOpen_ && (this.lidTask_ = goog.Timer.callOnce(this.animateLid_, 20, this))
+};
+Blockly.Trashcan.prototype.close = function () {
+	this.setOpen_(!1)
+};
+Blockly.Trashcan.prototype.click = function () {
+	var a = this.workspace_.startScrollX - this.workspace_.scrollX,
+		b = this.workspace_.startScrollY - this.workspace_.scrollY;
+	Math.sqrt(a * a + b * b) > Blockly.DRAG_RADIUS || console.log("TODO: Inspect trash.")
+};
+Blockly.Xml = {};
+Blockly.Xml.workspaceToDom = function (a, b) {
+	for (var c = goog.dom.createDom("xml"), d = a.getTopBlocks(!0), e = 0, f; f = d[e]; e++) c.appendChild(Blockly.Xml.blockToDomWithXY(f, b));
+	return c
+};
+Blockly.Xml.blockToDomWithXY = function (a, b) {
+	var c;
+	a.workspace.RTL && (c = a.workspace.getWidth());
+	var d = Blockly.Xml.blockToDom(a, b),
+		e = a.getRelativeToSurfaceXY();
+	d.setAttribute("x", Math.round(a.workspace.RTL ? c - e.x : e.x));
+	d.setAttribute("y", Math.round(e.y));
+	return d
+};
+Blockly.Xml.blockToDom = function (a, b) {
+	var c = goog.dom.createDom(a.isShadow() ? "shadow" : "block");
+	c.setAttribute("type", a.type);
+	b || c.setAttribute("id", a.id);
+	if (a.mutationToDom) {
+		var d = a.mutationToDom();
+		d && (d.hasChildNodes() || d.hasAttributes()) && c.appendChild(d)
+	}
+	for (var d = 0, e; e = a.inputList[d]; d++)
+		for (var f = 0, g; g = e.fieldRow[f]; f++)
+			if (g.name && g.EDITABLE) {
+				var h = goog.dom.createDom("field", null, g.getValue());
+				h.setAttribute("name", g.name);
+				c.appendChild(h)
+			}
+	if (d = a.getCommentText()) d = goog.dom.createDom("comment",
+		null, d), "object" == typeof a.comment && (d.setAttribute("pinned", a.comment.isVisible()), e = a.comment.getBubbleSize(), d.setAttribute("h", e.height), d.setAttribute("w", e.width)), c.appendChild(d);
+	a.data && (d = goog.dom.createDom("data", null, a.data), c.appendChild(d));
+	for (d = 0; e = a.inputList[d]; d++) {
+		var k;
+		g = !0;
+		e.type != Blockly.DUMMY_INPUT && (h = e.connection.targetBlock(), e.type == Blockly.INPUT_VALUE ? k = goog.dom.createDom("value") : e.type == Blockly.NEXT_STATEMENT && (k = goog.dom.createDom("statement")), f = e.connection.getShadowDom(), !f || h && h.isShadow() || k.appendChild(Blockly.Xml.cloneShadow_(f)), h && (k.appendChild(Blockly.Xml.blockToDom(h, b)), g = !1), k.setAttribute("name", e.name), g || c.appendChild(k))
+	}
+	a.inputsInlineDefault != a.inputsInline && c.setAttribute("inline", a.inputsInline);
+	a.isCollapsed() && c.setAttribute("collapsed", !0);
+	a.disabled && c.setAttribute("disabled", !0);
+	a.isDeletable() || a.isShadow() || c.setAttribute("deletable", !1);
+	a.isMovable() || a.isShadow() || c.setAttribute("movable", !1);
+	a.isEditable() || c.setAttribute("editable", !1);
+	if (d = a.getNextBlock()) k = goog.dom.createDom("next", null, Blockly.Xml.blockToDom(d, b)), c.appendChild(k);
+	f = a.nextConnection && a.nextConnection.getShadowDom();
+	!f || d && d.isShadow() || k.appendChild(Blockly.Xml.cloneShadow_(f));
+	return c
+};
+Blockly.Xml.cloneShadow_ = function (a) {
+	for (var b = a = a.cloneNode(!0), c; b;)
+		if (b.firstChild) b = b.firstChild;
+		else {
+			for (; b && !b.nextSibling;) c = b, b = b.parentNode, 3 == c.nodeType && "" == c.data.trim() && b.firstChild != c && goog.dom.removeNode(c);
+			b && (c = b, b = b.nextSibling, 3 == c.nodeType && "" == c.data.trim() && goog.dom.removeNode(c))
+		}
+	return a
+};
+Blockly.Xml.domToText = function (a) {
+	return (new XMLSerializer).serializeToString(a)
+};
+Blockly.Xml.domToPrettyText = function (a) {
+	a = Blockly.Xml.domToText(a).split("<");
+	for (var b = "", c = 1; c < a.length; c++) {
+		var d = a[c];
+		"/" == d[0] && (b = b.substring(2));
+		a[c] = b + "<" + d;
+		"/" != d[0] && "/>" != d.slice(-2) && (b += "  ")
+	}
+	a = a.join("\n");
+	a = a.replace(/(<(\w+)\b[^>]*>[^\n]*)\n *<\/\2>/g, "$1</$2>");
+	return a.replace(/^\n/, "")
+};
+Blockly.Xml.textToDom = function (a) {
+	(a = (new DOMParser).parseFromString(a, "text/xml")) && a.firstChild && "xml" == a.firstChild.nodeName.toLowerCase() && a.firstChild === a.lastChild || goog.asserts.fail("Blockly.Xml.textToDom did not obtain a valid XML tree.");
+	return a.firstChild
+};
+Blockly.Xml.domToWorkspace = function (a, b) {
+	if (a instanceof Blockly.Workspace) {
+		var c = a;
+		a = b;
+		b = c;
+		console.warn("Deprecated call to Blockly.Xml.domToWorkspace, swap the arguments.")
+	}
+	var d;
+	b.RTL && (d = b.getWidth());
+	Blockly.Field.startCache();
+	var c = a.childNodes.length,
+		e = Blockly.Events.getGroup();
+	e || Blockly.Events.setGroup(!0);
+	b.setResizesEnabled && b.setResizesEnabled(!1);
+	for (var f = 0; f < c; f++) {
+		var g = a.childNodes[f],
+			h = g.nodeName.toLowerCase();
+		if ("block" == h || "shadow" == h && !Blockly.Events.recordUndo) {
+			var h = Blockly.Xml.domToBlock(g,
+					b),
+				k = parseInt(g.getAttribute("x"), 10),
+				g = parseInt(g.getAttribute("y"), 10);
+			isNaN(k) || isNaN(g) || h.moveBy(b.RTL ? d - k : k, g)
+		} else "shadow" == h && goog.asserts.fail("Shadow block cannot be a top-level block.")
+	}
+	e || Blockly.Events.setGroup(!1);
+	Blockly.Field.stopCache();
+	b.updateVariableList(!1);
+	b.setResizesEnabled && b.setResizesEnabled(!0)
+};
+Blockly.Xml.domToBlock = function (a, b) {
+	if (a instanceof Blockly.Workspace) {
+		var c = a;
+		a = b;
+		b = c;
+		console.warn("Deprecated call to Blockly.Xml.domToBlock, swap the arguments.")
+	}
+	Blockly.Events.disable();
+	try {
+		var d = Blockly.Xml.domToBlockHeadless_(a, b);
+		if (b.rendered) {
+			d.setConnectionsHidden(!0);
+			for (var e = d.getDescendants(), f = e.length - 1; 0 <= f; f--) e[f].initSvg();
+			for (f = e.length - 1; 0 <= f; f--) e[f].render(!1);
+			setTimeout(function () {
+				d.workspace && d.setConnectionsHidden(!1)
+			}, 1);
+			d.updateDisabled();
+			b.resizeContents()
+		}
+	} finally {
+		Blockly.Events.enable()
+	}
+	Blockly.Events.isEnabled() &&
+		Blockly.Events.fire(new Blockly.Events.Create(d));
+	return d
+};
+Blockly.Xml.domToBlockHeadless_ = function (a, b) {
+	var c = null,
+		d = a.getAttribute("type");
+	goog.asserts.assert(d, "Block type unspecified: %s", a.outerHTML);
+	for (var e = a.getAttribute("id"), c = b.newBlock(d, e), f = null, e = 0, g; g = a.childNodes[e]; e++)
+		if (3 != g.nodeType) {
+			for (var h = f = null, k = 0, m; m = g.childNodes[k]; k++) 1 == m.nodeType && ("block" == m.nodeName.toLowerCase() ? f = m : "shadow" == m.nodeName.toLowerCase() && (h = m));
+			!f && h && (f = h);
+			k = g.getAttribute("name");
+			switch (g.nodeName.toLowerCase()) {
+				case "mutation":
+					c.domToMutation && (c.domToMutation(g),
+						c.initSvg && c.initSvg());
+					break;
+				case "comment":
+					c.setCommentText(g.textContent);
+					var p = g.getAttribute("pinned");
+					p && !c.isInFlyout && setTimeout(function () {
+						c.comment && c.comment.setVisible && c.comment.setVisible("true" == p)
+					}, 1);
+					f = parseInt(g.getAttribute("w"), 10);
+					g = parseInt(g.getAttribute("h"), 10);
+					!isNaN(f) && !isNaN(g) && c.comment && c.comment.setVisible && c.comment.setBubbleSize(f, g);
+					break;
+				case "data":
+					c.data = g.textContent;
+					break;
+				case "title":
+				case "field":
+					f = c.getField(k);
+					if (!f) {
+						console.warn("Ignoring non-existent field " +
+							k + " in block " + d);
+						break
+					}
+					f.setValue(g.textContent);
+					break;
+				case "value":
+				case "statement":
+					g = c.getInput(k);
+					if (!g) {
+						console.warn("Ignoring non-existent input " + k + " in block " + d);
+						break
+					}
+					h && g.connection.setShadowDom(h);
+					f && (f = Blockly.Xml.domToBlockHeadless_(f, b), f.outputConnection ? g.connection.connect(f.outputConnection) : f.previousConnection ? g.connection.connect(f.previousConnection) : goog.asserts.fail("Child block does not have output or previous statement."));
+					break;
+				case "next":
+					h && c.nextConnection && c.nextConnection.setShadowDom(h);
+					f && (goog.asserts.assert(c.nextConnection, "Next statement does not exist."), goog.asserts.assert(!c.nextConnection.isConnected(), "Next statement is already connected."), f = Blockly.Xml.domToBlockHeadless_(f, b), goog.asserts.assert(f.previousConnection, "Next block does not have previous statement."), c.nextConnection.connect(f.previousConnection));
+					break;
+				default:
+					console.warn("Ignoring unknown tag: " + g.nodeName)
+			}
+		} (e = a.getAttribute("inline")) && c.setInputsInline("true" == e);
+	(e = a.getAttribute("disabled")) && c.setDisabled("true" ==
+		e);
+	(e = a.getAttribute("deletable")) && c.setDeletable("true" == e);
+	(e = a.getAttribute("movable")) && c.setMovable("true" == e);
+	(e = a.getAttribute("editable")) && c.setEditable("true" == e);
+	(e = a.getAttribute("collapsed")) && c.setCollapsed("true" == e);
+	if ("shadow" == a.nodeName.toLowerCase()) {
+		d = c.getChildren();
+		for (e = 0; g = d[e]; e++) goog.asserts.assert(g.isShadow(), "Shadow block not allowed non-shadow child.");
+		goog.asserts.assert(0 == c.getVars().length, "Shadow blocks cannot have variable fields.");
+		c.setShadow(!0)
+	}
+	return c
+};
+Blockly.Xml.deleteNext = function (a) {
+	for (var b = 0, c; c = a.childNodes[b]; b++)
+		if ("next" == c.nodeName.toLowerCase()) {
+			a.removeChild(c);
+			break
+		}
+};
+goog.global.Blockly || (goog.global.Blockly = {});
+goog.global.Blockly.Xml || (goog.global.Blockly.Xml = {});
+goog.global.Blockly.Xml.domToText = Blockly.Xml.domToText;
+goog.global.Blockly.Xml.domToWorkspace = Blockly.Xml.domToWorkspace;
+goog.global.Blockly.Xml.textToDom = Blockly.Xml.textToDom;
+goog.global.Blockly.Xml.workspaceToDom = Blockly.Xml.workspaceToDom;
+// Copyright 2015 Google Inc.  Apache License 2.0
+Blockly.ZoomControls = function (a) {
+	this.workspace_ = a
+};
+Blockly.ZoomControls.prototype.WIDTH_ = 32;
+Blockly.ZoomControls.prototype.HEIGHT_ = 110;
+Blockly.ZoomControls.prototype.MARGIN_BOTTOM_ = 20;
+Blockly.ZoomControls.prototype.MARGIN_SIDE_ = 20;
+Blockly.ZoomControls.prototype.svgGroup_ = null;
+Blockly.ZoomControls.prototype.left_ = 0;
+Blockly.ZoomControls.prototype.top_ = 0;
+Blockly.ZoomControls.prototype.createDom = function () {
+	var a = this.workspace_;
+	this.svgGroup_ = Blockly.createSvgElement("g", {
+		"class": "blocklyZoom"
+	}, null);
+	var b = String(Math.random()).substring(2),
+		c = Blockly.createSvgElement("clipPath", {
+        	id: "blocklyZoomoutClipPath" + b
+		}, this.svgGroup_);
+	Blockly.createSvgElement("rect", {
+		width: 32,
+		height: 32,
+		y: 77
+	}, c);
+	var d = Blockly.createSvgElement("image", {
+		width: Blockly.SPRITE.width,
+		height: Blockly.SPRITE.height,
+		x: -64,
+		y: -15,
+		"clip-path": "url(#blocklyZoomoutClipPath" + b + ")"
+	}, this.svgGroup_);
+	d.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", a.options.pathToMedia + Blockly.SPRITE.url);
+	c = Blockly.createSvgElement("clipPath", {
+		id: "blocklyZoominClipPath" + b
+	}, this.svgGroup_);
+	Blockly.createSvgElement("rect", {
+		width: 32,
+		height: 32,
+		y: 43
+	}, c);
+	var e = Blockly.createSvgElement("image", {
+		width: Blockly.SPRITE.width,
+		height: Blockly.SPRITE.height,
+		x: -32,
+		y: -49,
+		"clip-path": "url(#blocklyZoominClipPath" + b + ")"
+	}, this.svgGroup_);
+	e.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", a.options.pathToMedia +
+		Blockly.SPRITE.url);
+	c = Blockly.createSvgElement("clipPath", {
+		id: "blocklyZoomresetClipPath" + b
+	}, this.svgGroup_);
+	Blockly.createSvgElement("rect", {
+		width: 32,
+		height: 32
+	}, c);
+	b = Blockly.createSvgElement("image", {
+		width: Blockly.SPRITE.width,
+		height: Blockly.SPRITE.height,
+		y: -92,
+		"clip-path": "url(#blocklyZoomresetClipPath" + b + ")"
+	}, this.svgGroup_);
+	b.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", a.options.pathToMedia + Blockly.SPRITE.url);
+	Blockly.bindEventWithChecks_(b, "mousedown", null, function (b) {
+		a.markFocused();
+		a.setScale(a.options.zoomOptions.startScale);
+		a.scrollCenter();
+		Blockly.Touch.clearTouchIdentifier();
+		b.stopPropagation();
+		b.preventDefault()
+	});
+	Blockly.bindEventWithChecks_(e, "mousedown", null, function (b) {
+		a.markFocused();
+		a.zoomCenter(1);
+		Blockly.Touch.clearTouchIdentifier();
+		b.stopPropagation();
+		b.preventDefault()
+	});
+	Blockly.bindEventWithChecks_(d, "mousedown", null, function (b) {
+		a.markFocused();
+		a.zoomCenter(-1);
+		Blockly.Touch.clearTouchIdentifier();
+		b.stopPropagation();
+		b.preventDefault()
+	});
+	return this.svgGroup_
+};
+Blockly.ZoomControls.prototype.init = function (a) {
+	this.bottom_ = this.MARGIN_BOTTOM_ + a;
+	return this.bottom_ + this.HEIGHT_
+};
+Blockly.ZoomControls.prototype.dispose = function () {
+	this.svgGroup_ && (goog.dom.removeNode(this.svgGroup_), this.svgGroup_ = null);
+	this.workspace_ = null
+};
+Blockly.ZoomControls.prototype.position = function () {
+	var a = this.workspace_.getMetrics();
+	a && (this.workspace_.RTL ? (this.left_ = this.MARGIN_SIDE_ + Blockly.Scrollbar.scrollbarThickness, a.toolboxPosition == Blockly.TOOLBOX_AT_LEFT && (this.left_ += a.flyoutWidth, this.workspace_.toolbox_ && (this.left_ += a.absoluteLeft))) : (this.left_ = a.viewWidth + a.absoluteLeft - this.WIDTH_ - this.MARGIN_SIDE_ - Blockly.Scrollbar.scrollbarThickness, a.toolboxPosition == Blockly.TOOLBOX_AT_RIGHT && (this.left_ -= a.flyoutWidth)), this.top_ = a.viewHeight +
+		a.absoluteTop - this.HEIGHT_ - this.bottom_, a.toolboxPosition == Blockly.TOOLBOX_AT_BOTTOM && (this.top_ -= a.flyoutHeight), this.svgGroup_.setAttribute("transform", "translate(" + this.left_ + "," + this.top_ + ")"))
+};
+// Copyright 2014 Google Inc.  Apache License 2.0
+Blockly.WorkspaceSvg = function (a) {
+	Blockly.WorkspaceSvg.superClass_.constructor.call(this, a);
+	this.getMetrics = a.getMetrics || Blockly.WorkspaceSvg.getTopLevelWorkspaceMetrics_;
+	this.setMetrics = a.setMetrics || Blockly.WorkspaceSvg.setTopLevelWorkspaceMetrics_;
+	Blockly.ConnectionDB.init(this);
+	this.SOUNDS_ = Object.create(null);
+	this.highlightedBlocks_ = []
+};
+goog.inherits(Blockly.WorkspaceSvg, Blockly.Workspace);
+Blockly.WorkspaceSvg.prototype.resizeHandlerWrapper_ = null;
+Blockly.WorkspaceSvg.prototype.rendered = !0;
+Blockly.WorkspaceSvg.prototype.isFlyout = !1;
+Blockly.WorkspaceSvg.prototype.isMutator = !1;
+Blockly.WorkspaceSvg.prototype.dragMode_ = Blockly.DRAG_NONE;
+Blockly.WorkspaceSvg.prototype.resizesEnabled_ = !0;
+Blockly.WorkspaceSvg.prototype.scrollX = 0;
+Blockly.WorkspaceSvg.prototype.scrollY = 0;
+Blockly.WorkspaceSvg.prototype.startScrollX = 0;
+Blockly.WorkspaceSvg.prototype.startScrollY = 0;
+Blockly.WorkspaceSvg.prototype.dragDeltaXY_ = null;
+Blockly.WorkspaceSvg.prototype.scale = 1;
+Blockly.WorkspaceSvg.prototype.trashcan = null;
+Blockly.WorkspaceSvg.prototype.scrollbar = null;
+Blockly.WorkspaceSvg.prototype.lastSound_ = null;
+Blockly.WorkspaceSvg.prototype.lastRecordedPageScroll_ = null;
+Blockly.WorkspaceSvg.prototype.inverseScreenCTM_ = null;
+Blockly.WorkspaceSvg.prototype.getInverseScreenCTM = function () {
+	return this.inverseScreenCTM_
+};
+Blockly.WorkspaceSvg.prototype.updateInverseScreenCTM = function () {
+	var a = this.getParentSvg().getScreenCTM();
+	a && (this.inverseScreenCTM_ = a.inverse())
+};
+Blockly.WorkspaceSvg.prototype.setResizeHandlerWrapper = function (a) {
+	this.resizeHandlerWrapper_ = a
+};
+Blockly.WorkspaceSvg.prototype.createDom = function (a) {
+	this.svgGroup_ = Blockly.createSvgElement("g", {
+		"class": "blocklyWorkspace"
+	}, null);
+	a && (this.svgBackground_ = Blockly.createSvgElement("rect", {
+		height: "100%",
+		width: "100%",
+		"class": a
+	}, this.svgGroup_), "blocklyMainBackground" == a && (this.svgBackground_.style.fill = "url(#" + this.options.gridPattern.id + ")"));
+	this.svgBlockCanvas_ = Blockly.createSvgElement("g", {
+		"class": "blocklyBlockCanvas"
+	}, this.svgGroup_, this);
+	this.svgBubbleCanvas_ = Blockly.createSvgElement("g", {
+		"class": "blocklyBubbleCanvas"
+	},
+		this.svgGroup_, this);
+	a = Blockly.Scrollbar.scrollbarThickness;
+	this.options.hasTrashcan && (a = this.addTrashcan_(a));
+	this.options.zoomOptions && this.options.zoomOptions.controls && (a = this.addZoomControls_(a));
+	if (!this.isFlyout) {
+		Blockly.bindEventWithChecks_(this.svgGroup_, "mousedown", this, this.onMouseDown_);
+		var b = this;
+		Blockly.bindEvent_(this.svgGroup_, "touchstart", null, function (a) {
+			Blockly.longStart_(a, b)
+		});
+		this.options.zoomOptions && this.options.zoomOptions.wheel && Blockly.bindEventWithChecks_(this.svgGroup_,
+			"wheel", this, this.onMouseWheel_)
+	}
+	this.options.hasCategories ? this.toolbox_ = new Blockly.Toolbox(this) : this.options.languageTree && this.addFlyout_();
+	this.updateGridPattern_();
+	this.recordDeleteAreas();
+	return this.svgGroup_
+};
+Blockly.WorkspaceSvg.prototype.dispose = function () {
+	this.rendered = !1;
+	Blockly.WorkspaceSvg.superClass_.dispose.call(this);
+	this.svgGroup_ && (goog.dom.removeNode(this.svgGroup_), this.svgGroup_ = null);
+	this.svgBubbleCanvas_ = this.svgBlockCanvas_ = null;
+	this.toolbox_ && (this.toolbox_.dispose(), this.toolbox_ = null);
+	this.flyout_ && (this.flyout_.dispose(), this.flyout_ = null);
+	this.trashcan && (this.trashcan.dispose(), this.trashcan = null);
+	this.scrollbar && (this.scrollbar.dispose(), this.scrollbar = null);
+	this.zoomControls_ &&
+		(this.zoomControls_.dispose(), this.zoomControls_ = null);
+	this.options.parentWorkspace || goog.dom.removeNode(this.getParentSvg().parentNode);
+	this.resizeHandlerWrapper_ && (Blockly.unbindEvent_(this.resizeHandlerWrapper_), this.resizeHandlerWrapper_ = null)
+};
+Blockly.WorkspaceSvg.prototype.newBlock = function (a, b) {
+	return new Blockly.BlockSvg(this, a, b)
+};
+Blockly.WorkspaceSvg.prototype.addTrashcan_ = function (a) {
+	this.trashcan = new Blockly.Trashcan(this);
+	var b = this.trashcan.createDom();
+	this.svgGroup_.insertBefore(b, this.svgBlockCanvas_);
+	return this.trashcan.init(a)
+};
+Blockly.WorkspaceSvg.prototype.addZoomControls_ = function (a) {
+	this.zoomControls_ = new Blockly.ZoomControls(this);
+	var b = this.zoomControls_.createDom();
+	this.svgGroup_.appendChild(b);
+	return this.zoomControls_.init(a)
+};
+Blockly.WorkspaceSvg.prototype.addFlyout_ = function () {
+	this.flyout_ = new Blockly.Flyout({
+		disabledPatternId: this.options.disabledPatternId,
+		parentWorkspace: this,
+		RTL: this.RTL,
+		oneBasedIndex: this.options.oneBasedIndex,
+		horizontalLayout: this.horizontalLayout,
+		toolboxPosition: this.options.toolboxPosition
+	});
+	this.flyout_.autoClose = !1;
+	var a = this.flyout_.createDom();
+	this.svgGroup_.insertBefore(a, this.svgBlockCanvas_)
+};
+Blockly.WorkspaceSvg.prototype.updateScreenCalculations_ = function () {
+	this.updateInverseScreenCTM();
+	this.recordDeleteAreas()
+};
+Blockly.WorkspaceSvg.prototype.resizeContents = function () {
+	this.resizesEnabled_ && this.rendered && (this.scrollbar && this.scrollbar.resize(), this.updateInverseScreenCTM())
+};
+Blockly.WorkspaceSvg.prototype.resize = function () {
+	this.toolbox_ && this.toolbox_.position();
+	this.flyout_ && this.flyout_.position();
+	this.trashcan && this.trashcan.position();
+	this.zoomControls_ && this.zoomControls_.position();
+	this.scrollbar && this.scrollbar.resize();
+	this.updateScreenCalculations_()
+};
+Blockly.WorkspaceSvg.prototype.updateScreenCalculationsIfScrolled = function () {
+	var a = goog.dom.getDocumentScroll();
+	goog.math.Coordinate.equals(this.lastRecordedPageScroll_, a) || (this.lastRecordedPageScroll_ = a, this.updateScreenCalculations_())
+};
+Blockly.WorkspaceSvg.prototype.getCanvas = function () {
+	return this.svgBlockCanvas_
+};
+Blockly.WorkspaceSvg.prototype.getBubbleCanvas = function () {
+	return this.svgBubbleCanvas_
+};
+Blockly.WorkspaceSvg.prototype.getParentSvg = function () {
+	if (this.cachedParentSvg_) return this.cachedParentSvg_;
+	for (var a = this.svgGroup_; a;) {
+		if ("svg" == a.tagName) return this.cachedParentSvg_ = a;
+		a = a.parentNode
+	}
+	return null
+};
+Blockly.WorkspaceSvg.prototype.translate = function (a, b) {
+	var c = "translate(" + a + "," + b + ") scale(" + this.scale + ")";
+	this.svgBlockCanvas_.setAttribute("transform", c);
+	this.svgBubbleCanvas_.setAttribute("transform", c)
+};
+Blockly.WorkspaceSvg.prototype.getWidth = function () {
+	var a = this.getMetrics();
+	return a ? a.viewWidth / this.scale : 0
+};
+Blockly.WorkspaceSvg.prototype.setVisible = function (a) {
+	this.getParentSvg().style.display = a ? "block" : "none";
+	this.toolbox_ && (this.toolbox_.HtmlDiv.style.display = a ? "block" : "none");
+	a ? (this.render(), this.toolbox_ && this.toolbox_.position()) : Blockly.hideChaff(!0)
+};
+Blockly.WorkspaceSvg.prototype.render = function () {
+	for (var a = this.getAllBlocks(), b = a.length - 1; 0 <= b; b--) a[b].render(!1)
+};
+Blockly.WorkspaceSvg.prototype.traceOn = function () {
+	console.warn("Deprecated call to traceOn, delete this.")
+};
+Blockly.WorkspaceSvg.prototype.highlightBlock = function (a, b) {
+	if (void 0 === b) {
+		for (var c = 0, d; d = this.highlightedBlocks_[c]; c++) d.setHighlighted(!1);
+		this.highlightedBlocks_.length = 0
+	}
+	if (d = a ? this.getBlockById(a) : null) (c = void 0 === b || b) ? -1 == this.highlightedBlocks_.indexOf(d) && this.highlightedBlocks_.push(d) : goog.array.remove(this.highlightedBlocks_, d), d.setHighlighted(c)
+};
+Blockly.WorkspaceSvg.prototype.paste = function (a) {
+	if (this.rendered && !(a.getElementsByTagName("block").length >= this.remainingCapacity())) {
+		Blockly.terminateDrag_();
+		Blockly.Events.disable();
+		try {
+			var b = Blockly.Xml.domToBlock(a, this),
+				c = parseInt(a.getAttribute("x"), 10),
+				d = parseInt(a.getAttribute("y"), 10);
+			if (!isNaN(c) && !isNaN(d)) {
+				this.RTL && (c = -c);
+				do {
+					a = !1;
+					for (var e = this.getAllBlocks(), f = 0, g; g = e[f]; f++) {
+						var h = g.getRelativeToSurfaceXY();
+						if (1 >= Math.abs(c - h.x) && 1 >= Math.abs(d - h.y)) {
+							a = !0;
+							break
+						}
+					}
+					if (!a)
+						for (var k = b.getConnections_(!1),
+								f = 0, m; m = k[f]; f++)
+							if (m.closest(Blockly.SNAP_RADIUS, new goog.math.Coordinate(c, d)).connection) {
+								a = !0;
+								break
+							}
+					a && (c = this.RTL ? c - Blockly.SNAP_RADIUS : c + Blockly.SNAP_RADIUS, d += 2 * Blockly.SNAP_RADIUS)
+				} while (a);
+				b.moveBy(c, d)
+			}
+		} finally {
+			Blockly.Events.enable()
+		}
+		Blockly.Events.isEnabled() && !b.isShadow() && Blockly.Events.fire(new Blockly.Events.Create(b));
+		b.select()
+	}
+};
+Blockly.WorkspaceSvg.prototype.createVariable = function (a) {
+	Blockly.WorkspaceSvg.superClass_.createVariable.call(this, a);
+	this.toolbox_ && this.toolbox_.flyout_ && !Blockly.Flyout.startFlyout_ && this.toolbox_.refreshSelection()
+};
+Blockly.WorkspaceSvg.prototype.recordDeleteAreas = function () {
+	this.deleteAreaTrash_ = this.trashcan ? this.trashcan.getClientRect() : null;
+	this.deleteAreaToolbox_ = this.flyout_ ? this.flyout_.getClientRect() : this.toolbox_ ? this.toolbox_.getClientRect() : null
+};
+Blockly.WorkspaceSvg.prototype.isDeleteArea = function (a) {
+	a = new goog.math.Coordinate(a.clientX, a.clientY);
+	if (this.deleteAreaTrash_) {
+		if (this.deleteAreaTrash_.contains(a)) return this.trashcan.setOpen_(!0), Blockly.Css.setCursor(Blockly.Css.Cursor.DELETE), !0;
+		this.trashcan.setOpen_(!1)
+	}
+	if (this.deleteAreaToolbox_ && this.deleteAreaToolbox_.contains(a)) return Blockly.Css.setCursor(Blockly.Css.Cursor.DELETE), !0;
+	Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED);
+	return !1
+};
+Blockly.WorkspaceSvg.prototype.onMouseDown_ = function (a) {
+	this.markFocused();
+	Blockly.isTargetInput_(a) ? Blockly.Touch.clearTouchIdentifier() : (Blockly.terminateDrag_(), Blockly.hideChaff(), a.target && a.target.nodeName && ("svg" == a.target.nodeName.toLowerCase() || a.target == this.svgBackground_) && Blockly.selected && !this.options.readOnly && Blockly.selected.unselect(), Blockly.isRightButton(a) ? (this.showContextMenu_(a), Blockly.Touch.clearTouchIdentifier()) : this.scrollbar ? (this.dragMode_ = Blockly.DRAG_BEGIN, this.startDragMouseX =
+		a.clientX, this.startDragMouseY = a.clientY, this.startDragMetrics = this.getMetrics(), this.startScrollX = this.scrollX, this.startScrollY = this.scrollY, "mouseup" in Blockly.Touch.TOUCH_MAP && (Blockly.Touch.onTouchUpWrapper_ = Blockly.Touch.onTouchUpWrapper_ || [], Blockly.Touch.onTouchUpWrapper_ = Blockly.Touch.onTouchUpWrapper_.concat(Blockly.bindEventWithChecks_(document, "mouseup", null, Blockly.onMouseUp_))), Blockly.onMouseMoveWrapper_ = Blockly.onMouseMoveWrapper_ || [], Blockly.onMouseMoveWrapper_ = Blockly.onMouseMoveWrapper_.concat(Blockly.bindEventWithChecks_(document,
+			"mousemove", null, Blockly.onMouseMove_))) : Blockly.Touch.clearTouchIdentifier(), a.stopPropagation(), a.preventDefault())
+};
+Blockly.WorkspaceSvg.prototype.startDrag = function (a, b) {
+	var c = Blockly.mouseToSvg(a, this.getParentSvg(), this.getInverseScreenCTM());
+	c.x /= this.scale;
+	c.y /= this.scale;
+	this.dragDeltaXY_ = goog.math.Coordinate.difference(b, c)
+};
+Blockly.WorkspaceSvg.prototype.moveDrag = function (a) {
+	a = Blockly.mouseToSvg(a, this.getParentSvg(), this.getInverseScreenCTM());
+	a.x /= this.scale;
+	a.y /= this.scale;
+	return goog.math.Coordinate.sum(this.dragDeltaXY_, a)
+};
+Blockly.WorkspaceSvg.prototype.isDragging = function () {
+	return Blockly.dragMode_ == Blockly.DRAG_FREE || Blockly.Flyout.startFlyout_ && Blockly.Flyout.startFlyout_.dragMode_ == Blockly.DRAG_FREE || this.dragMode_ == Blockly.DRAG_FREE
+};
+Blockly.WorkspaceSvg.prototype.onMouseWheel_ = function (a) {
+	Blockly.terminateDrag_();
+	var b = 0 < a.deltaY ? -1 : 1,
+		c = Blockly.mouseToSvg(a, this.getParentSvg(), this.getInverseScreenCTM());
+	this.zoom(c.x, c.y, b);
+	a.preventDefault()
+};
+Blockly.WorkspaceSvg.prototype.getBlocksBoundingBox = function () {
+	var a = this.getTopBlocks(!1);
+	if (!a.length) return {
+		x: 0,
+		y: 0,
+		width: 0,
+		height: 0
+	};
+	for (var b = a[0].getBoundingRectangle(), c = 1; c < a.length; c++) {
+		var d = a[c].getBoundingRectangle();
+		d.topLeft.x < b.topLeft.x && (b.topLeft.x = d.topLeft.x);
+		d.bottomRight.x > b.bottomRight.x && (b.bottomRight.x = d.bottomRight.x);
+		d.topLeft.y < b.topLeft.y && (b.topLeft.y = d.topLeft.y);
+		d.bottomRight.y > b.bottomRight.y && (b.bottomRight.y = d.bottomRight.y)
+	}
+	return {
+		x: b.topLeft.x,
+		y: b.topLeft.y,
+		width: b.bottomRight.x -
+			b.topLeft.x,
+		height: b.bottomRight.y - b.topLeft.y
+	}
+};
+Blockly.WorkspaceSvg.prototype.cleanUp = function () {
+	Blockly.Events.setGroup(!0);
+	for (var a = this.getTopBlocks(!0), b = 0, c = 0, d; d = a[c]; c++) {
+		var e = d.getRelativeToSurfaceXY();
+		d.moveBy(-e.x, b - e.y);
+		d.snapToGrid();
+		b = d.getRelativeToSurfaceXY().y + d.getHeightWidth().height + Blockly.BlockSvg.MIN_BLOCK_Y
+	}
+	Blockly.Events.setGroup(!1);
+	this.resizeContents()
+};
+Blockly.WorkspaceSvg.prototype.showContextMenu_ = function (a) {
+	function b(a) {
+		if (a.isDeletable()) l = l.concat(a.getDescendants());
+		else {
+			a = a.getChildren();
+			for (var c = 0; c < a.length; c++) b(a[c])
+		}
+	}
+
+	function c() {
+		Blockly.Events.setGroup(f);
+		var a = l.shift();
+		a && (a.workspace ? (a.dispose(!1, !0), setTimeout(c, 10)) : c());
+		Blockly.Events.setGroup(!1)
+	}
+	if (!this.options.readOnly && !this.isFlyout) {
+		var d = [],
+			e = this.getTopBlocks(!0),
+			f = Blockly.genUid(),
+			g = {};
+		g.text = Blockly.Msg.UNDO;
+		g.enabled = 0 < this.undoStack_.length;
+		g.callback = this.undo.bind(this, !1);
+		d.push(g);
+		g = {};
+		g.text = Blockly.Msg.REDO;
+		g.enabled = 0 < this.redoStack_.length;
+		g.callback = this.undo.bind(this, !0);
+		d.push(g);
+		this.scrollbar && (g = {}, g.text = Blockly.Msg.CLEAN_UP, g.enabled = 1 < e.length, g.callback = this.cleanUp.bind(this), d.push(g));
+		if (this.options.collapse) {
+			for (var h = g = !1, k = 0; k < e.length; k++)
+				for (var m = e[k]; m;) m.isCollapsed() ? g = !0 : h = !0, m = m.getNextBlock();
+			var p = function (a) {
+				for (var b = 0, c = 0; c < e.length; c++)
+					for (var d = e[c]; d;) setTimeout(d.setCollapsed.bind(d, a), b), d = d.getNextBlock(), b += 10
+			},
+				h = {
+                	enabled: h
+				};
+			h.text = Blockly.Msg.COLLAPSE_ALL;
+			h.callback = function () {
+				p(!0)
+			};
+			d.push(h);
+			g = {
+				enabled: g
+			};
+			g.text = Blockly.Msg.EXPAND_ALL;
+			g.callback = function () {
+				p(!1)
+			};
+			d.push(g)
+		}
+		for (var l = [], k = 0; k < e.length; k++) b(e[k]);
+		g = {
+			text: 1 == l.length ? Blockly.Msg.DELETE_BLOCK : Blockly.Msg.DELETE_X_BLOCKS.replace("%1", String(l.length)),
+			enabled: 0 < l.length,
+			callback: function () {
+				2 > l.length ? c() : Blockly.confirm(Blockly.Msg.DELETE_ALL_BLOCKS.replace("%1", l.length), function (a) {
+					a && c()
+				})
+			}
+		};
+		d.push(g);
+		Blockly.ContextMenu.show(a, d, this.RTL)
+	}
+};
+Blockly.WorkspaceSvg.prototype.loadAudio_ = function (a, b) {
+	if (a.length) {
+		try {
+			var c = new window.Audio
+		} catch (h) {
+			return
+		}
+		for (var d, e = 0; e < a.length; e++) {
+			var f = a[e],
+				g = f.match(/\.(\w+)$/);
+			if (g && c.canPlayType("audio/" + g[1])) {
+				d = new window.Audio(f);
+				break
+			}
+		}
+		d && d.play && (this.SOUNDS_[b] = d)
+	}
+};
+Blockly.WorkspaceSvg.prototype.preloadAudio_ = function () {
+	for (var a in this.SOUNDS_) {
+		var b = this.SOUNDS_[a];
+		b.volume = .01;
+		b.play();
+		b.pause();
+		if (goog.userAgent.IPAD || goog.userAgent.IPHONE) break
+	}
+};
+Blockly.WorkspaceSvg.prototype.playAudio = function (a, b) {
+	var c = this.SOUNDS_[a];
+	if (c) {
+		var d = new Date;
+		d - this.lastSound_ < Blockly.SOUND_LIMIT || (this.lastSound_ = d, c = goog.userAgent.DOCUMENT_MODE && 9 === goog.userAgent.DOCUMENT_MODE || goog.userAgent.IPAD || goog.userAgent.ANDROID ? c : c.cloneNode(), c.volume = void 0 === b ? 1 : b, c.play())
+	} else this.options.parentWorkspace && this.options.parentWorkspace.playAudio(a, b)
+};
+Blockly.WorkspaceSvg.prototype.updateToolbox = function (a) {
+	if (a = Blockly.Options.parseToolboxTree(a)) {
+		if (!this.options.languageTree) throw "Existing toolbox is null.  Can't create new toolbox.";
+		if (a.getElementsByTagName("category").length) {
+			if (!this.toolbox_) throw "Existing toolbox has no categories.  Can't change mode.";
+			this.options.languageTree = a;
+			this.toolbox_.populate_(a);
+			this.toolbox_.addColour_()
+		} else {
+			if (!this.flyout_) throw "Existing toolbox has categories.  Can't change mode.";
+			this.options.languageTree =
+				a;
+			this.flyout_.show(a.childNodes)
+		}
+	} else if (this.options.languageTree) throw "Can't nullify an existing toolbox.";
+};
+Blockly.WorkspaceSvg.prototype.markFocused = function () {
+	this.options.parentWorkspace ? this.options.parentWorkspace.markFocused() : Blockly.mainWorkspace = this
+};
+Blockly.WorkspaceSvg.prototype.zoom = function (a, b, c) {
+	var d = this.options.zoomOptions.scaleSpeed,
+		e = this.getMetrics(),
+		f = this.getParentSvg().createSVGPoint();
+	f.x = a;
+	f.y = b;
+	f = f.matrixTransform(this.getCanvas().getCTM().inverse());
+	a = f.x;
+	b = f.y;
+	f = this.getCanvas();
+	d = 1 == c ? d : 1 / d;
+	c = this.scale * d;
+	c > this.options.zoomOptions.maxScale ? d = this.options.zoomOptions.maxScale / this.scale : c < this.options.zoomOptions.minScale && (d = this.options.zoomOptions.minScale / this.scale);
+	this.scale != c && (this.scrollbar && (a = f.getCTM().translate(a *
+		(1 - d), b * (1 - d)).scale(d), this.scrollX = a.e - e.absoluteLeft, this.scrollY = a.f - e.absoluteTop), this.setScale(c))
+};
+Blockly.WorkspaceSvg.prototype.zoomCenter = function (a) {
+	var b = this.getMetrics();
+	this.zoom(b.viewWidth / 2, b.viewHeight / 2, a)
+};
+Blockly.WorkspaceSvg.prototype.zoomToFit = function () {
+	var a = this.getMetrics(),
+		b = this.getBlocksBoundingBox(),
+		c = b.width,
+		b = b.height;
+	if (c) {
+		var d = a.viewWidth,
+			e = a.viewHeight;
+		this.flyout_ && (d -= this.flyout_.width_);
+		this.scrollbar || (c += a.contentLeft, b += a.contentTop);
+		this.setScale(Math.min(d / c, e / b));
+		this.scrollCenter()
+	}
+};
+Blockly.WorkspaceSvg.prototype.scrollCenter = function () {
+	if (this.scrollbar) {
+		var a = this.getMetrics(),
+			b = (a.contentWidth - a.viewWidth) / 2;
+		this.flyout_ && (b -= this.flyout_.width_ / 2);
+		this.scrollbar.set(b, (a.contentHeight - a.viewHeight) / 2)
+	}
+};
+Blockly.WorkspaceSvg.prototype.setScale = function (a) {
+	this.options.zoomOptions.maxScale && a > this.options.zoomOptions.maxScale ? a = this.options.zoomOptions.maxScale : this.options.zoomOptions.minScale && a < this.options.zoomOptions.minScale && (a = this.options.zoomOptions.minScale);
+	this.scale = a;
+	this.updateGridPattern_();
+	this.scrollbar ? this.scrollbar.resize() : this.translate(this.scrollX, this.scrollY);
+	Blockly.hideChaff(!1);
+	this.flyout_ && this.flyout_.reflow()
+};
+Blockly.WorkspaceSvg.prototype.updateGridPattern_ = function () {
+	if (this.options.gridPattern) {
+		var a = this.options.gridOptions.spacing * this.scale || 100;
+		this.options.gridPattern.setAttribute("width", a);
+		this.options.gridPattern.setAttribute("height", a);
+		var a = Math.floor(this.options.gridOptions.spacing / 2) + .5,
+			b = a - this.options.gridOptions.length / 2,
+			c = a + this.options.gridOptions.length / 2,
+			d = this.options.gridPattern.firstChild,
+			e = d && d.nextSibling,
+			a = a * this.scale,
+			b = b * this.scale,
+			c = c * this.scale;
+		d && (d.setAttribute("stroke-width",
+			this.scale), d.setAttribute("x1", b), d.setAttribute("y1", a), d.setAttribute("x2", c), d.setAttribute("y2", a));
+		e && (e.setAttribute("stroke-width", this.scale), e.setAttribute("x1", a), e.setAttribute("y1", b), e.setAttribute("x2", a), e.setAttribute("y2", c))
+	}
+};
+Blockly.WorkspaceSvg.getTopLevelWorkspaceMetrics_ = function () {
+	var a = Blockly.svgSize(this.getParentSvg());
+	if (this.toolbox_)
+		if (this.toolboxPosition == Blockly.TOOLBOX_AT_TOP || this.toolboxPosition == Blockly.TOOLBOX_AT_BOTTOM) a.height -= this.toolbox_.getHeight();
+		else if (this.toolboxPosition == Blockly.TOOLBOX_AT_LEFT || this.toolboxPosition == Blockly.TOOLBOX_AT_RIGHT) a.width -= this.toolbox_.getWidth();
+	var b = Blockly.Flyout.prototype.CORNER_RADIUS - 1,
+		c = a.width - b,
+		d = a.height - b,
+		e = this.getBlocksBoundingBox(),
+		f = e.width *
+		this.scale,
+		g = e.height * this.scale,
+		h = e.x * this.scale,
+		k = e.y * this.scale;
+	this.scrollbar ? (b = Math.min(h - c / 2, h + f - c), c = Math.max(h + f + c / 2, h + c), f = Math.min(k - d / 2, k + g - d), d = Math.max(k + g + d / 2, k + d)) : (b = e.x, c = b + e.width, f = e.y, d = f + e.height);
+	e = 0;
+	this.toolbox_ && this.toolboxPosition == Blockly.TOOLBOX_AT_LEFT && (e = this.toolbox_.getWidth());
+	g = 0;
+	this.toolbox_ && this.toolboxPosition == Blockly.TOOLBOX_AT_TOP && (g = this.toolbox_.getHeight());
+	return {
+		viewHeight: a.height,
+		viewWidth: a.width,
+		contentHeight: d - f,
+		contentWidth: c - b,
+		viewTop: -this.scrollY,
+		viewLeft: -this.scrollX,
+		contentTop: f,
+		contentLeft: b,
+		absoluteTop: g,
+		absoluteLeft: e,
+		toolboxWidth: this.toolbox_ ? this.toolbox_.getWidth() : 0,
+		toolboxHeight: this.toolbox_ ? this.toolbox_.getHeight() : 0,
+		flyoutWidth: this.flyout_ ? this.flyout_.getWidth() : 0,
+		flyoutHeight: this.flyout_ ? this.flyout_.getHeight() : 0,
+		toolboxPosition: this.toolboxPosition
+	}
+};
+Blockly.WorkspaceSvg.setTopLevelWorkspaceMetrics_ = function (a) {
+	if (!this.scrollbar) throw "Attempt to set top level workspace scroll without scrollbars.";
+	var b = this.getMetrics();
+	goog.isNumber(a.x) && (this.scrollX = -b.contentWidth * a.x - b.contentLeft);
+	goog.isNumber(a.y) && (this.scrollY = -b.contentHeight * a.y - b.contentTop);
+	a = this.scrollX + b.absoluteLeft;
+	b = this.scrollY + b.absoluteTop;
+	this.translate(a, b);
+	this.options.gridPattern && (this.options.gridPattern.setAttribute("x", a), this.options.gridPattern.setAttribute("y",
+		b), goog.userAgent.IE && this.updateGridPattern_())
+};
+Blockly.WorkspaceSvg.prototype.setResizesEnabled = function (a) {
+	var b = !this.resizesEnabled_ && a;
+	this.resizesEnabled_ = a;
+	b && this.resizeContents()
+};
+Blockly.WorkspaceSvg.prototype.clear = function () {
+	this.setResizesEnabled(!1);
+	Blockly.WorkspaceSvg.superClass_.clear.call(this);
+	this.setResizesEnabled(!0)
+};
+Blockly.WorkspaceSvg.prototype.setVisible = Blockly.WorkspaceSvg.prototype.setVisible;
+Blockly.Mutator = function (a) {
+	Blockly.Mutator.superClass_.constructor.call(this, null);
+	this.quarkNames_ = a
+};
+goog.inherits(Blockly.Mutator, Blockly.Icon);
+Blockly.Mutator.prototype.workspaceWidth_ = 0;
+Blockly.Mutator.prototype.workspaceHeight_ = 0;
+Blockly.Mutator.prototype.drawIcon_ = function (a) {
+	Blockly.createSvgElement("rect", {
+		"class": "blocklyIconShape",
+		rx: "4",
+		ry: "4",
+		height: "16",
+		width: "16"
+	}, a);
+	Blockly.createSvgElement("path", {
+		"class": "blocklyIconSymbol",
+		d: "m4.203,7.296 0,1.368 -0.92,0.677 -0.11,0.41 0.9,1.559 0.41,0.11 1.043,-0.457 1.187,0.683 0.127,1.134 0.3,0.3 1.8,0 0.3,-0.299 0.127,-1.138 1.185,-0.682 1.046,0.458 0.409,-0.11 0.9,-1.559 -0.11,-0.41 -0.92,-0.677 0,-1.366 0.92,-0.677 0.11,-0.41 -0.9,-1.559 -0.409,-0.109 -1.046,0.458 -1.185,-0.682 -0.127,-1.138 -0.3,-0.299 -1.8,0 -0.3,0.3 -0.126,1.135 -1.187,0.682 -1.043,-0.457 -0.41,0.11 -0.899,1.559 0.108,0.409z"
+	}, a);
+	Blockly.createSvgElement("circle", {
+		"class": "blocklyIconShape",
+		r: "2.7",
+		cx: "8",
+		cy: "8"
+	}, a)
+};
+Blockly.Mutator.prototype.iconClick_ = function (a) {
+	this.block_.isEditable() && Blockly.Icon.prototype.iconClick_.call(this, a)
+};
+Blockly.Mutator.prototype.createEditor_ = function () {
+	this.svgDialog_ = Blockly.createSvgElement("svg", {
+		x: Blockly.Bubble.BORDER_WIDTH,
+		y: Blockly.Bubble.BORDER_WIDTH
+	}, null);
+	if (this.quarkNames_.length)
+		for (var a = goog.dom.createDom("xml"), b = 0, c; c = this.quarkNames_[b]; b++) a.appendChild(goog.dom.createDom("block", {
+			type: c
+		}));
+	else a = null;
+	a = {
+		languageTree: a,
+		parentWorkspace: this.block_.workspace,
+		pathToMedia: this.block_.workspace.options.pathToMedia,
+		RTL: this.block_.RTL,
+		toolboxPosition: this.block_.RTL ? Blockly.TOOLBOX_AT_RIGHT : Blockly.TOOLBOX_AT_LEFT,
+		horizontalLayout: !1,
+		getMetrics: this.getFlyoutMetrics_.bind(this),
+		setMetrics: null
+	};
+	this.workspace_ = new Blockly.WorkspaceSvg(a);
+	this.workspace_.isMutator = !0;
+	this.svgDialog_.appendChild(this.workspace_.createDom("blocklyMutatorBackground"));
+	return this.svgDialog_
+};
+Blockly.Mutator.prototype.updateEditable = function () {
+	this.block_.isInFlyout || (this.block_.isEditable() ? this.iconGroup_ && Blockly.removeClass_(this.iconGroup_, "blocklyIconGroupReadonly") : (this.setVisible(!1), this.iconGroup_ && Blockly.addClass_(this.iconGroup_, "blocklyIconGroupReadonly")));
+	Blockly.Icon.prototype.updateEditable.call(this)
+};
+Blockly.Mutator.prototype.resizeBubble_ = function () {
+	var a = 2 * Blockly.Bubble.BORDER_WIDTH,
+		b = this.workspace_.getCanvas().getBBox(),
+		c;
+	c = this.block_.RTL ? -b.x : b.width + b.x;
+	b = b.height + 3 * a;
+	if (this.workspace_.flyout_) var d = this.workspace_.flyout_.getMetrics_(),
+		b = Math.max(b, d.contentHeight + 20);
+	c += 3 * a;
+	if (Math.abs(this.workspaceWidth_ - c) > a || Math.abs(this.workspaceHeight_ - b) > a) this.workspaceWidth_ = c, this.workspaceHeight_ = b, this.bubble_.setBubbleSize(c + a, b + a), this.svgDialog_.setAttribute("width", this.workspaceWidth_),
+		this.svgDialog_.setAttribute("height", this.workspaceHeight_);
+	this.block_.RTL && (a = "translate(" + this.workspaceWidth_ + ",0)", this.workspace_.getCanvas().setAttribute("transform", a));
+	this.workspace_.resize()
+};
+Blockly.Mutator.prototype.setVisible = function (a) {
+	if (a != this.isVisible())
+		if (Blockly.Events.fire(new Blockly.Events.Ui(this.block_, "mutatorOpen", !a, a)), a) {
+			this.bubble_ = new Blockly.Bubble(this.block_.workspace, this.createEditor_(), this.block_.svgPath_, this.iconXY_, null, null);
+			if (a = this.workspace_.options.languageTree) this.workspace_.flyout_.init(this.workspace_), this.workspace_.flyout_.show(a.childNodes);
+			this.rootBlock_ = this.block_.decompose(this.workspace_);
+			a = this.rootBlock_.getDescendants();
+			for (var b =
+					0, c; c = a[b]; b++) c.render();
+			this.rootBlock_.setMovable(!1);
+			this.rootBlock_.setDeletable(!1);
+			this.workspace_.flyout_ ? (a = 2 * this.workspace_.flyout_.CORNER_RADIUS, b = this.workspace_.flyout_.width_ + a) : b = a = 16;
+			this.block_.RTL && (b = -b);
+			this.rootBlock_.moveBy(b, a);
+			if (this.block_.saveConnections) {
+				var d = this;
+				this.block_.saveConnections(this.rootBlock_);
+				this.sourceListener_ = function () {
+					d.block_.saveConnections(d.rootBlock_)
+				};
+				this.block_.workspace.addChangeListener(this.sourceListener_)
+			}
+			this.resizeBubble_();
+			this.workspace_.addChangeListener(this.workspaceChanged_.bind(this));
+			this.updateColour()
+		} else this.svgDialog_ = null, this.workspace_.dispose(), this.rootBlock_ = this.workspace_ = null, this.bubble_.dispose(), this.bubble_ = null, this.workspaceHeight_ = this.workspaceWidth_ = 0, this.sourceListener_ && (this.block_.workspace.removeChangeListener(this.sourceListener_), this.sourceListener_ = null)
+};
+Blockly.Mutator.prototype.workspaceChanged_ = function () {
+	if (Blockly.dragMode_ == Blockly.DRAG_NONE)
+		for (var a = this.workspace_.getTopBlocks(!1), b = 0, c; c = a[b]; b++) {
+			var d = c.getRelativeToSurfaceXY(),
+				e = c.getHeightWidth();
+			20 > d.y + e.height && c.moveBy(0, 20 - e.height - d.y)
+		}
+	if (this.rootBlock_.workspace == this.workspace_) {
+		Blockly.Events.setGroup(!0);
+		c = this.block_;
+		a = (a = c.mutationToDom()) && Blockly.Xml.domToText(a);
+		b = c.rendered;
+		c.rendered = !1;
+		c.compose(this.rootBlock_);
+		c.rendered = b;
+		c.initSvg();
+		b = (b = c.mutationToDom()) && Blockly.Xml.domToText(b);
+		if (a != b) {
+			Blockly.Events.fire(new Blockly.Events.Change(c, "mutation", null, a, b));
+			var f = Blockly.Events.getGroup();
+			setTimeout(function () {
+				Blockly.Events.setGroup(f);
+				c.bumpNeighbours_();
+				Blockly.Events.setGroup(!1)
+			}, Blockly.BUMP_DELAY)
+		}
+		c.rendered && c.render();
+		this.resizeBubble_();
+		Blockly.Events.setGroup(!1)
+	}
+};
+Blockly.Mutator.prototype.getFlyoutMetrics_ = function () {
+	return {
+		viewHeight: this.workspaceHeight_,
+		viewWidth: this.workspaceWidth_,
+		absoluteTop: 0,
+		absoluteLeft: 0
+	}
+};
+Blockly.Mutator.prototype.dispose = function () {
+	this.block_.mutator = null;
+	Blockly.Icon.prototype.dispose.call(this)
+};
+Blockly.Mutator.reconnect = function (a, b, c) {
+	if (!a || !a.getSourceBlock().workspace) return !1;
+	c = b.getInput(c).connection;
+	var d = a.targetBlock();
+	return d && d != b || c.targetConnection == a ? !1 : (c.isConnected() && c.disconnect(), c.connect(a), !0)
+};
+goog.global.Blockly || (goog.global.Blockly = {});
+goog.global.Blockly.Mutator || (goog.global.Blockly.Mutator = {});
+goog.global.Blockly.Mutator.reconnect = Blockly.Mutator.reconnect;
+Blockly.Warning = function (a) {
+	Blockly.Warning.superClass_.constructor.call(this, a);
+	this.createIcon();
+	this.text_ = {}
+};
+goog.inherits(Blockly.Warning, Blockly.Icon);
+Blockly.Warning.prototype.collapseHidden = !1;
+Blockly.Warning.prototype.drawIcon_ = function (a) {
+	Blockly.createSvgElement("path", {
+		"class": "blocklyIconShape",
+		d: "M2,15Q-1,15 0.5,12L6.5,1.7Q8,-1 9.5,1.7L15.5,12Q17,15 14,15z"
+	}, a);
+	Blockly.createSvgElement("path", {
+		"class": "blocklyIconSymbol",
+		d: "m7,4.8v3.16l0.27,2.27h1.46l0.27,-2.27v-3.16z"
+	}, a);
+	Blockly.createSvgElement("rect", {
+		"class": "blocklyIconSymbol",
+		x: "7",
+		y: "11",
+		height: "2",
+		width: "2"
+	}, a)
+};
+Blockly.Warning.textToDom_ = function (a) {
+	var b = Blockly.createSvgElement("text", {
+		"class": "blocklyText blocklyBubbleText",
+		y: Blockly.Bubble.BORDER_WIDTH
+	}, null);
+	a = a.split("\n");
+	for (var c = 0; c < a.length; c++) {
+		var d = Blockly.createSvgElement("tspan", {
+			dy: "1em",
+			x: Blockly.Bubble.BORDER_WIDTH
+		}, b),
+			e = document.createTextNode(a[c]);
+		d.appendChild(e)
+	}
+	return b
+};
+Blockly.Warning.prototype.setVisible = function (a) {
+	if (a != this.isVisible())
+		if (Blockly.Events.fire(new Blockly.Events.Ui(this.block_, "warningOpen", !a, a)), a) {
+			a = Blockly.Warning.textToDom_(this.getText());
+			this.bubble_ = new Blockly.Bubble(this.block_.workspace, a, this.block_.svgPath_, this.iconXY_, null, null);
+			if (this.block_.RTL)
+				for (var b = a.getBBox().width, c = 0, d; d = a.childNodes[c]; c++) d.setAttribute("text-anchor", "end"), d.setAttribute("x", b + Blockly.Bubble.BORDER_WIDTH);
+			this.updateColour();
+			a = this.bubble_.getBubbleSize();
+			this.bubble_.setBubbleSize(a.width, a.height)
+		} else this.bubble_.dispose(), this.body_ = this.bubble_ = null
+};
+Blockly.Warning.prototype.bodyFocus_ = function (a) {
+	this.bubble_.promote_()
+};
+Blockly.Warning.prototype.setText = function (a, b) {
+	this.text_[b] != a && (a ? this.text_[b] = a : delete this.text_[b], this.isVisible() && (this.setVisible(!1), this.setVisible(!0)))
+};
+Blockly.Warning.prototype.getText = function () {
+	var a = [],
+		b;
+	for (b in this.text_) a.push(this.text_[b]);
+	return a.join("\n")
+};
+Blockly.Warning.prototype.dispose = function () {
+	this.block_.warning = null;
+	Blockly.Icon.prototype.dispose.call(this)
+};
+Blockly.Block = function (a, b, c) {
+	this.id = c && !a.getBlockById(c) ? c : Blockly.genUid();
+	a.blockDB_[this.id] = this;
+	this.previousConnection = this.nextConnection = this.outputConnection = null;
+	this.inputList = [];
+	this.inputsInline = void 0;
+	this.disabled = !1;
+	this.tooltip = "";
+	this.contextMenu = !0;
+	this.parentBlock_ = null;
+	this.childBlocks_ = [];
+	this.editable_ = this.movable_ = this.deletable_ = !0;
+	this.collapsed_ = this.isShadow_ = !1;
+	this.comment = null;
+	this.xy_ = new goog.math.Coordinate(0, 0);
+	this.workspace = a;
+	this.isInFlyout = a.isFlyout;
+	this.isInMutator =
+		a.isMutator;
+	this.RTL = a.RTL;
+	b && (this.type = b, c = Blockly.Blocks[b], goog.asserts.assertObject(c, 'Error: "%s" is an unknown language block.', b), goog.mixin(this, c));
+	a.addTopBlock(this);
+	goog.isFunction(this.init) && this.init();
+	this.inputsInlineDefault = this.inputsInline;
+	Blockly.Events.isEnabled() && Blockly.Events.fire(new Blockly.Events.Create(this));
+	goog.isFunction(this.onchange) && (this.onchangeWrapper_ = this.onchange.bind(this), this.workspace.addChangeListener(this.onchangeWrapper_))
+};
+Blockly.Block.obtain = function (a, b) {
+	console.warn("Deprecated call to Blockly.Block.obtain, use workspace.newBlock instead.");
+	return a.newBlock(b)
+};
+Blockly.Block.prototype.data = null;
+Blockly.Block.prototype.colour_ = "#000000";
+Blockly.Block.prototype.dispose = function (a) {
+	if (this.workspace) {
+		this.onchangeWrapper_ && this.workspace.removeChangeListener(this.onchangeWrapper_);
+		this.unplug(a);
+		Blockly.Events.isEnabled() && Blockly.Events.fire(new Blockly.Events.Delete(this));
+		Blockly.Events.disable();
+		try {
+			this.workspace && (this.workspace.removeTopBlock(this), delete this.workspace.blockDB_[this.id], this.workspace = null);
+			for (var b = this.childBlocks_.length - 1; 0 <= b; b--) this.childBlocks_[b].dispose(!1);
+			for (var b = 0, c; c = this.inputList[b]; b++) c.dispose();
+			this.inputList.length = 0;
+			for (var d = this.getConnections_(!0), b = 0; b < d.length; b++) {
+				var e = d[b];
+				e.isConnected() && e.disconnect();
+				d[b].dispose()
+			}
+		} finally {
+			Blockly.Events.enable()
+		}
+	}
+};
+Blockly.Block.prototype.unplug = function (a) {
+	if (this.outputConnection) this.outputConnection.isConnected() && this.outputConnection.disconnect();
+	else if (this.previousConnection) {
+		var b = null;
+		this.previousConnection.isConnected() && (b = this.previousConnection.targetConnection, this.previousConnection.disconnect());
+		var c = this.getNextBlock();
+		a && c && (a = this.nextConnection.targetConnection, a.disconnect(), b && b.checkType_(a) && b.connect(a))
+	}
+};
+Blockly.Block.prototype.getConnections_ = function () {
+	var a = [];
+	this.outputConnection && a.push(this.outputConnection);
+	this.previousConnection && a.push(this.previousConnection);
+	this.nextConnection && a.push(this.nextConnection);
+	for (var b = 0, c; c = this.inputList[b]; b++) c.connection && a.push(c.connection);
+	return a
+};
+Blockly.Block.prototype.lastConnectionInStack_ = function () {
+	for (var a = this.nextConnection; a;) {
+		var b = a.targetBlock();
+		if (!b) return a;
+		a = b.nextConnection
+	}
+	return null
+};
+Blockly.Block.prototype.bumpNeighbours_ = function () {
+	if (this.workspace && Blockly.dragMode_ == Blockly.DRAG_NONE) {
+		var a = this.getRootBlock();
+		if (!a.isInFlyout)
+			for (var b = this.getConnections_(!1), c = 0, d; d = b[c]; c++) {
+				d.isConnected() && d.isSuperior() && d.targetBlock().bumpNeighbours_();
+				for (var e = d.neighbours_(Blockly.SNAP_RADIUS), f = 0, g; g = e[f]; f++) d.isConnected() && g.isConnected() || g.getSourceBlock().getRootBlock() != a && (d.isSuperior() ? g.bumpAwayFrom_(d) : d.bumpAwayFrom_(g))
+			}
+	}
+};
+Blockly.Block.prototype.getParent = function () {
+	return this.parentBlock_
+};
+Blockly.Block.prototype.getInputWithBlock = function (a) {
+	for (var b = 0, c; c = this.inputList[b]; b++)
+		if (c.connection && c.connection.targetBlock() == a) return c;
+	return null
+};
+Blockly.Block.prototype.getSurroundParent = function () {
+	var a = this;
+	do {
+		var b = a,
+			a = a.getParent();
+		if (!a) return null
+	} while (a.getNextBlock() == b);
+	return a
+};
+Blockly.Block.prototype.getNextBlock = function () {
+	return this.nextConnection && this.nextConnection.targetBlock()
+};
+Blockly.Block.prototype.getRootBlock = function () {
+	var a, b = this;
+	do a = b, b = a.parentBlock_; while (b);
+	return a
+};
+Blockly.Block.prototype.getChildren = function () {
+	return this.childBlocks_
+};
+Blockly.Block.prototype.setParent = function (a) {
+	if (a != this.parentBlock_) {
+		if (this.parentBlock_) {
+			goog.array.remove(this.parentBlock_.childBlocks_, this);
+			if (this.previousConnection && this.previousConnection.isConnected()) throw "Still connected to previous block.";
+			if (this.outputConnection && this.outputConnection.isConnected()) throw "Still connected to parent block.";
+			this.parentBlock_ = null
+		} else this.workspace.removeTopBlock(this);
+		(this.parentBlock_ = a) ? a.childBlocks_.push(this) : this.workspace.addTopBlock(this)
+	}
+};
+Blockly.Block.prototype.getDescendants = function () {
+	for (var a = [this], b, c = 0; b = this.childBlocks_[c]; c++) a.push.apply(a, b.getDescendants());
+	return a
+};
+Blockly.Block.prototype.isDeletable = function () {
+	return this.deletable_ && !this.isShadow_ && !(this.workspace && this.workspace.options.readOnly)
+};
+Blockly.Block.prototype.setDeletable = function (a) {
+	this.deletable_ = a
+};
+Blockly.Block.prototype.isMovable = function () {
+	return this.movable_ && !this.isShadow_ && !(this.workspace && this.workspace.options.readOnly)
+};
+Blockly.Block.prototype.setMovable = function (a) {
+	this.movable_ = a
+};
+Blockly.Block.prototype.isShadow = function () {
+	return this.isShadow_
+};
+Blockly.Block.prototype.setShadow = function (a) {
+	this.isShadow_ = a
+};
+Blockly.Block.prototype.isEditable = function () {
+	return this.editable_ && !(this.workspace && this.workspace.options.readOnly)
+};
+Blockly.Block.prototype.setEditable = function (a) {
+	this.editable_ = a;
+	a = 0;
+	for (var b; b = this.inputList[a]; a++)
+		for (var c = 0, d; d = b.fieldRow[c]; c++) d.updateEditable()
+};
+Blockly.Block.prototype.setConnectionsHidden = function (a) {
+	if (!a && this.isCollapsed()) {
+		if (this.outputConnection && this.outputConnection.setHidden(a), this.previousConnection && this.previousConnection.setHidden(a), this.nextConnection) {
+			this.nextConnection.setHidden(a);
+			var b = this.nextConnection.targetBlock();
+			b && b.setConnectionsHidden(a)
+		}
+	} else
+		for (var c = this.getConnections_(!0), d = 0; b = c[d]; d++) b.setHidden(a), b.isSuperior() && (b = b.targetBlock()) && b.setConnectionsHidden(a)
+};
+Blockly.Block.prototype.setHelpUrl = function (a) {
+	this.helpUrl = a
+};
+Blockly.Block.prototype.setTooltip = function (a) {
+	this.tooltip = a
+};
+Blockly.Block.prototype.getColour = function () {
+	return this.colour_
+};
+Blockly.Block.prototype.setColour = function (a) {
+	var b = parseFloat(a);
+	if (isNaN(b))
+		if (goog.isString(a) && a.match(/^#[0-9a-fA-F]{6}$/)) this.colour_ = a;
+		else throw "Invalid colour: " + a;
+	else this.colour_ = Blockly.hueToRgb(b)
+};
+Blockly.Block.prototype.getField = function (a) {
+	for (var b = 0, c; c = this.inputList[b]; b++)
+		for (var d = 0, e; e = c.fieldRow[d]; d++)
+			if (e.name === a) return e;
+	return null
+};
+Blockly.Block.prototype.getVars = function () {
+	for (var a = [], b = 0, c; c = this.inputList[b]; b++)
+		for (var d = 0, e; e = c.fieldRow[d]; d++) e instanceof Blockly.FieldVariable && a.push(e.getValue());
+	return a
+};
+Blockly.Block.prototype.renameVar = function (a, b) {
+	for (var c = 0, d; d = this.inputList[c]; c++)
+		for (var e = 0, f; f = d.fieldRow[e]; e++) f instanceof Blockly.FieldVariable && Blockly.Names.equals(a, f.getValue()) && f.setValue(b)
+};
+Blockly.Block.prototype.getFieldValue = function (a) {
+	return (a = this.getField(a)) ? a.getValue() : null
+};
+Blockly.Block.prototype.getTitleValue = function (a) {
+	console.warn("Deprecated call to getTitleValue, use getFieldValue instead.");
+	return this.getFieldValue(a)
+};
+Blockly.Block.prototype.setFieldValue = function (a, b) {
+	var c = this.getField(b);
+	goog.asserts.assertObject(c, 'Field "%s" not found.', b);
+	c.setValue(a)
+};
+Blockly.Block.prototype.setTitleValue = function (a, b) {
+	console.warn("Deprecated call to setTitleValue, use setFieldValue instead.");
+	this.setFieldValue(a, b)
+};
+Blockly.Block.prototype.setPreviousStatement = function (a, b) {
+	a ? (void 0 === b && (b = null), this.previousConnection || (goog.asserts.assert(!this.outputConnection, "Remove output connection prior to adding previous connection."), this.previousConnection = this.makeConnection_(Blockly.PREVIOUS_STATEMENT)), this.previousConnection.setCheck(b)) : this.previousConnection && (goog.asserts.assert(!this.previousConnection.isConnected(), "Must disconnect previous statement before removing connection."), this.previousConnection.dispose(),
+		this.previousConnection = null)
+};
+Blockly.Block.prototype.setNextStatement = function (a, b) {
+	a ? (void 0 === b && (b = null), this.nextConnection || (this.nextConnection = this.makeConnection_(Blockly.NEXT_STATEMENT)), this.nextConnection.setCheck(b)) : this.nextConnection && (goog.asserts.assert(!this.nextConnection.isConnected(), "Must disconnect next statement before removing connection."), this.nextConnection.dispose(), this.nextConnection = null)
+};
+Blockly.Block.prototype.setOutput = function (a, b) {
+	a ? (void 0 === b && (b = null), this.outputConnection || (goog.asserts.assert(!this.previousConnection, "Remove previous connection prior to adding output connection."), this.outputConnection = this.makeConnection_(Blockly.OUTPUT_VALUE)), this.outputConnection.setCheck(b)) : this.outputConnection && (goog.asserts.assert(!this.outputConnection.isConnected(), "Must disconnect output value before removing connection."), this.outputConnection.dispose(), this.outputConnection =
+		null)
+};
+Blockly.Block.prototype.setInputsInline = function (a) {
+	this.inputsInline != a && (Blockly.Events.fire(new Blockly.Events.Change(this, "inline", null, this.inputsInline, a)), this.inputsInline = a)
+};
+Blockly.Block.prototype.getInputsInline = function () {
+	if (void 0 != this.inputsInline) return this.inputsInline;
+	for (var a = 1; a < this.inputList.length; a++)
+		if (this.inputList[a - 1].type == Blockly.DUMMY_INPUT && this.inputList[a].type == Blockly.DUMMY_INPUT) return !1;
+	for (a = 1; a < this.inputList.length; a++)
+		if (this.inputList[a - 1].type == Blockly.INPUT_VALUE && this.inputList[a].type == Blockly.DUMMY_INPUT) return !0;
+	return !1
+};
+Blockly.Block.prototype.setDisabled = function (a) {
+	this.disabled != a && (Blockly.Events.fire(new Blockly.Events.Change(this, "disabled", null, this.disabled, a)), this.disabled = a)
+};
+Blockly.Block.prototype.getInheritedDisabled = function () {
+	for (var a = this; ;) {
+		a = a.getSurroundParent();
+		if (!a) return !1;
+		if (a.disabled) return !0
+	}
+};
+Blockly.Block.prototype.isCollapsed = function () {
+	return this.collapsed_
+};
+Blockly.Block.prototype.setCollapsed = function (a) {
+	this.collapsed_ != a && (Blockly.Events.fire(new Blockly.Events.Change(this, "collapsed", null, this.collapsed_, a)), this.collapsed_ = a)
+};
+Blockly.Block.prototype.toString = function (a, b) {
+	var c = [],
+		d = b || "?";
+	if (this.collapsed_) c.push(this.getInput("_TEMP_COLLAPSED_INPUT").fieldRow[0].text_);
+	else
+		for (var e = 0, f; f = this.inputList[e]; e++) {
+			for (var g = 0, h; h = f.fieldRow[g]; g++) c.push(h.getText());
+			f.connection && ((f = f.connection.targetBlock()) ? c.push(f.toString(void 0, b)) : c.push(d))
+		}
+	c = goog.string.trim(c.join(" ")) || "???";
+	a && (c = goog.string.truncate(c, a));
+	return c
+};
+Blockly.Block.prototype.appendValueInput = function (a) {
+	return this.appendInput_(Blockly.INPUT_VALUE, a)
+};
+Blockly.Block.prototype.appendStatementInput = function (a) {
+	return this.appendInput_(Blockly.NEXT_STATEMENT, a)
+};
+Blockly.Block.prototype.appendDummyInput = function (a) {
+	return this.appendInput_(Blockly.DUMMY_INPUT, a || "")
+};
+Blockly.Block.prototype.jsonInit = function (a) {
+	goog.asserts.assert(void 0 == a.output || void 0 == a.previousStatement, "Must not have both an output and a previousStatement.");
+	void 0 !== a.colour && this.setColour(a.colour);
+	for (var b = 0; void 0 !== a["message" + b];) this.interpolate_(a["message" + b], a["args" + b] || [], a["lastDummyAlign" + b]), b++;
+	void 0 !== a.inputsInline && this.setInputsInline(a.inputsInline);
+	void 0 !== a.output && this.setOutput(!0, a.output);
+	void 0 !== a.previousStatement && this.setPreviousStatement(!0, a.previousStatement);
+	void 0 !== a.nextStatement && this.setNextStatement(!0, a.nextStatement);
+	void 0 !== a.tooltip && this.setTooltip(a.tooltip);
+	void 0 !== a.helpUrl && this.setHelpUrl(a.helpUrl)
+};
+Blockly.Block.prototype.interpolate_ = function (a, b, c) {
+	var d = Blockly.utils.tokenizeInterpolation(a),
+		e = [],
+		f = 0;
+	a = [];
+	for (var g = 0; g < d.length; g++) {
+		var h = d[g];
+		"number" == typeof h ? (goog.asserts.assert(0 < h && h <= b.length, 'Message index "%s" out of range.', h), goog.asserts.assert(!e[h], 'Message index "%s" duplicated.', h), e[h] = !0, f++, a.push(b[h - 1])) : (h = h.trim()) && a.push(h)
+	}
+	goog.asserts.assert(f == b.length, "Message does not reference all %s arg(s).", b.length);
+	a.length && ("string" == typeof a[a.length - 1] || goog.string.startsWith(a[a.length -
+		1].type, "field_")) && (g = {
+        	type: "input_dummy"
+		}, c && (g.align = c), a.push(g));
+	c = {
+		LEFT: Blockly.ALIGN_LEFT,
+		RIGHT: Blockly.ALIGN_RIGHT,
+		CENTRE: Blockly.ALIGN_CENTRE
+	};
+	b = [];
+	for (g = 0; g < a.length; g++)
+		if (e = a[g], "string" == typeof e) b.push([e, void 0]);
+		else {
+			d = f = null;
+			do
+				if (h = !1, "string" == typeof e) f = new Blockly.FieldLabel(e);
+				else switch (e.type) {
+					case "input_value":
+						d = this.appendValueInput(e.name);
+						break;
+					case "input_statement":
+						d = this.appendStatementInput(e.name);
+						break;
+					case "input_dummy":
+						d = this.appendDummyInput(e.name);
+						break;
+					case "field_label":
+						f =
+							new Blockly.FieldLabel(e.text, e["class"]);
+						break;
+					case "field_input":
+						f = new Blockly.FieldTextInput(e.text);
+						"boolean" == typeof e.spellcheck && f.setSpellcheck(e.spellcheck);
+						break;
+					case "field_angle":
+						f = new Blockly.FieldAngle(e.angle);
+						break;
+					case "field_checkbox":
+						f = new Blockly.FieldCheckbox(e.checked ? "TRUE" : "FALSE");
+						break;
+					case "field_colour":
+						f = new Blockly.FieldColour(e.colour);
+						break;
+					case "field_variable":
+						f = new Blockly.FieldVariable(e.variable);
+						break;
+					case "field_dropdown":
+						f = new Blockly.FieldDropdown(e.options);
+						break;
+					case "field_image":
+						f = new Blockly.FieldImage(e.src, e.width, e.height, e.alt);
+						break;
+					case "field_number":
+						f = new Blockly.FieldNumber(e.value, e.min, e.max, e.precision);
+						break;
+					case "field_date":
+						if (Blockly.FieldDate) {
+							f = new Blockly.FieldDate(e.date);
+							break
+						}
+					default:
+						e.alt && (e = e.alt, h = !0)
+				}
+			while (h);
+			if (f) b.push([f, e.name]);
+			else if (d) {
+				e.check && d.setCheck(e.check);
+				e.align && d.setAlign(c[e.align]);
+				for (e = 0; e < b.length; e++) d.appendField(b[e][0], b[e][1]);
+				b.length = 0
+			}
+		}
+};
+Blockly.Block.prototype.appendInput_ = function (a, b) {
+	var c = null;
+	if (a == Blockly.INPUT_VALUE || a == Blockly.NEXT_STATEMENT) c = this.makeConnection_(a);
+	c = new Blockly.Input(a, b, this, c);
+	this.inputList.push(c);
+	return c
+};
+Blockly.Block.prototype.moveInputBefore = function (a, b) {
+	if (a != b) {
+		for (var c = -1, d = b ? -1 : this.inputList.length, e = 0, f; f = this.inputList[e]; e++)
+			if (f.name == a) {
+				if (c = e, -1 != d) break
+			} else if (b && f.name == b && (d = e, -1 != c)) break;
+		goog.asserts.assert(-1 != c, 'Named input "%s" not found.', a);
+		goog.asserts.assert(-1 != d, 'Reference input "%s" not found.', b);
+		this.moveNumberedInputBefore(c, d)
+	}
+};
+Blockly.Block.prototype.moveNumberedInputBefore = function (a, b) {
+	goog.asserts.assert(a != b, "Can't move input to itself.");
+	goog.asserts.assert(a < this.inputList.length, "Input index " + a + " out of bounds.");
+	goog.asserts.assert(b <= this.inputList.length, "Reference input " + b + " out of bounds.");
+	var c = this.inputList[a];
+	this.inputList.splice(a, 1);
+	a < b && b--;
+	this.inputList.splice(b, 0, c)
+};
+Blockly.Block.prototype.removeInput = function (a, b) {
+	for (var c = 0, d; d = this.inputList[c]; c++)
+		if (d.name == a) {
+			if (d.connection && d.connection.isConnected()) {
+				d.connection.setShadowDom(null);
+				var e = d.connection.targetBlock();
+				e.isShadow() ? e.dispose() : e.unplug()
+			}
+			d.dispose();
+			this.inputList.splice(c, 1);
+			return
+		}
+	b || goog.asserts.fail('Input "%s" not found.', a)
+};
+Blockly.Block.prototype.getInput = function (a) {
+	for (var b = 0, c; c = this.inputList[b]; b++)
+		if (c.name == a) return c;
+	return null
+};
+Blockly.Block.prototype.getInputTargetBlock = function (a) {
+	return (a = this.getInput(a)) && a.connection && a.connection.targetBlock()
+};
+Blockly.Block.prototype.getCommentText = function () {
+	return this.comment || ""
+};
+Blockly.Block.prototype.setCommentText = function (a) {
+	this.comment != a && (Blockly.Events.fire(new Blockly.Events.Change(this, "comment", null, this.comment, a || "")), this.comment = a)
+};
+Blockly.Block.prototype.setWarningText = function (a) { };
+Blockly.Block.prototype.setMutator = function (a) { };
+Blockly.Block.prototype.getRelativeToSurfaceXY = function () {
+	return this.xy_
+};
+Blockly.Block.prototype.moveBy = function (a, b) {
+	goog.asserts.assert(!this.parentBlock_, "Block has parent.");
+	var c = new Blockly.Events.Move(this);
+	this.xy_.translate(a, b);
+	c.recordNew();
+	Blockly.Events.fire(c)
+};
+Blockly.Block.prototype.makeConnection_ = function (a) {
+	return new Blockly.Connection(this, a)
+};
+Blockly.ContextMenu = {};
+Blockly.ContextMenu.currentBlock = null;
+Blockly.ContextMenu.show = function (a, b, c) {
+	Blockly.WidgetDiv.show(Blockly.ContextMenu, c, null);
+	if (b.length) {
+		var d = new goog.ui.Menu;
+		d.setRightToLeft(c);
+		for (var e = 0, f; f = b[e]; e++) {
+			var g = new goog.ui.MenuItem(f.text);
+			g.setRightToLeft(c);
+			d.addChild(g, !0);
+			g.setEnabled(f.enabled);
+			f.enabled && (goog.events.listen(g, goog.ui.Component.EventType.ACTION, f.callback), g.handleContextMenu = function (a) {
+				goog.events.dispatchEvent(this, goog.ui.Component.EventType.ACTION)
+			})
+		}
+		goog.events.listen(d, goog.ui.Component.EventType.ACTION,
+			Blockly.ContextMenu.hide);
+		b = goog.dom.getViewportSize();
+		e = goog.style.getViewportPageOffset(document);
+		d.render(Blockly.WidgetDiv.DIV);
+		var h = d.getElement();
+		Blockly.addClass_(h, "blocklyContextMenu");
+		Blockly.bindEventWithChecks_(h, "contextmenu", null, Blockly.noEvent);
+		f = goog.style.getSize(h);
+		var g = a.clientX + e.x,
+			k = a.clientY + e.y;
+		a.clientY + f.height >= b.height && (k -= f.height);
+		c ? f.width >= a.clientX && (g += f.width) : a.clientX + f.width >= b.width && (g -= f.width);
+		Blockly.WidgetDiv.position(g, k, b, e, c);
+		d.setAllowAutoFocus(!0);
+		setTimeout(function () {
+			h.focus()
+		}, 1);
+		Blockly.ContextMenu.currentBlock = null
+	} else Blockly.ContextMenu.hide()
+};
+Blockly.ContextMenu.hide = function () {
+	Blockly.WidgetDiv.hideIfOwner(Blockly.ContextMenu);
+	Blockly.ContextMenu.currentBlock = null
+};
+Blockly.ContextMenu.callbackFactory = function (a, b) {
+	return function () {
+		Blockly.Events.disable();
+		try {
+			var c = Blockly.Xml.domToBlock(b, a.workspace),
+				d = a.getRelativeToSurfaceXY();
+			d.x = a.RTL ? d.x - Blockly.SNAP_RADIUS : d.x + Blockly.SNAP_RADIUS;
+			d.y += 2 * Blockly.SNAP_RADIUS;
+			c.moveBy(d.x, d.y)
+		} finally {
+			Blockly.Events.enable()
+		}
+		Blockly.Events.isEnabled() && !c.isShadow() && Blockly.Events.fire(new Blockly.Events.Create(c));
+		c.select()
+	}
+};
+Blockly.RenderedConnection = function (a, b) {
+	Blockly.RenderedConnection.superClass_.constructor.call(this, a, b);
+	this.offsetInBlock_ = new goog.math.Coordinate(0, 0)
+};
+goog.inherits(Blockly.RenderedConnection, Blockly.Connection);
+Blockly.RenderedConnection.prototype.distanceFrom = function (a) {
+	var b = this.x_ - a.x_;
+	a = this.y_ - a.y_;
+	return Math.sqrt(b * b + a * a)
+};
+Blockly.RenderedConnection.prototype.bumpAwayFrom_ = function (a) {
+	if (Blockly.dragMode_ == Blockly.DRAG_NONE) {
+		var b = this.sourceBlock_.getRootBlock();
+		if (!b.isInFlyout) {
+			var c = !1;
+			if (!b.isMovable()) {
+				b = a.getSourceBlock().getRootBlock();
+				if (!b.isMovable()) return;
+				a = this;
+				c = !0
+			}
+			var d = Blockly.selected == b;
+			d || b.addSelect();
+			var e = a.x_ + Blockly.SNAP_RADIUS - this.x_;
+			a = a.y_ + Blockly.SNAP_RADIUS - this.y_;
+			c && (a = -a);
+			b.RTL && (e = -e);
+			b.moveBy(e, a);
+			d || b.removeSelect()
+		}
+	}
+};
+Blockly.RenderedConnection.prototype.moveTo = function (a, b) {
+	this.inDB_ && this.db_.removeConnection_(this);
+	this.x_ = a;
+	this.y_ = b;
+	this.hidden_ || this.db_.addConnection(this)
+};
+Blockly.RenderedConnection.prototype.moveBy = function (a, b) {
+	this.moveTo(this.x_ + a, this.y_ + b)
+};
+Blockly.RenderedConnection.prototype.moveToOffset = function (a) {
+	this.moveTo(a.x + this.offsetInBlock_.x, a.y + this.offsetInBlock_.y)
+};
+Blockly.RenderedConnection.prototype.setOffsetInBlock = function (a, b) {
+	this.offsetInBlock_.x = a;
+	this.offsetInBlock_.y = b
+};
+Blockly.RenderedConnection.prototype.tighten_ = function () {
+	var a = this.targetConnection.x_ - this.x_,
+		b = this.targetConnection.y_ - this.y_;
+	if (0 != a || 0 != b) {
+		var c = this.targetBlock(),
+			d = c.getSvgRoot();
+		if (!d) throw "block is not rendered.";
+		d = Blockly.getRelativeXY_(d);
+		c.getSvgRoot().setAttribute("transform", "translate(" + (d.x - a) + "," + (d.y - b) + ")");
+		c.moveConnections_(-a, -b)
+	}
+};
+Blockly.RenderedConnection.prototype.closest = function (a, b, c) {
+	return this.dbOpposite_.searchForClosest(this, a, b, c)
+};
+Blockly.RenderedConnection.prototype.highlight = function () {
+	var a;
+	a = this.type == Blockly.INPUT_VALUE || this.type == Blockly.OUTPUT_VALUE ? "m 0,0 " + Blockly.BlockSvg.TAB_PATH_DOWN + " v 5" : "m -20,0 h 5 " + Blockly.BlockSvg.NOTCH_PATH_LEFT + " h 5";
+	var b = this.sourceBlock_.getRelativeToSurfaceXY();
+	Blockly.Connection.highlightedPath_ = Blockly.createSvgElement("path", {
+		"class": "blocklyHighlightedConnectionPath",
+		d: a,
+		transform: "translate(" + (this.x_ - b.x) + "," + (this.y_ - b.y) + ")" + (this.sourceBlock_.RTL ? " scale(-1 1)" : "")
+	}, this.sourceBlock_.getSvgRoot())
+};
+Blockly.RenderedConnection.prototype.unhideAll = function () {
+	this.setHidden(!1);
+	var a = [];
+	if (this.type != Blockly.INPUT_VALUE && this.type != Blockly.NEXT_STATEMENT) return a;
+	var b = this.targetBlock();
+	if (b) {
+		var c;
+		b.isCollapsed() ? (c = [], b.outputConnection && c.push(b.outputConnection), b.nextConnection && c.push(b.nextConnection), b.previousConnection && c.push(b.previousConnection)) : c = b.getConnections_(!0);
+		for (var d = 0; d < c.length; d++) a.push.apply(a, c[d].unhideAll());
+		a.length || (a[0] = b)
+	}
+	return a
+};
+Blockly.RenderedConnection.prototype.unhighlight = function () {
+	goog.dom.removeNode(Blockly.Connection.highlightedPath_);
+	delete Blockly.Connection.highlightedPath_
+};
+Blockly.RenderedConnection.prototype.setHidden = function (a) {
+	(this.hidden_ = a) && this.inDB_ ? this.db_.removeConnection_(this) : a || this.inDB_ || this.db_.addConnection(this)
+};
+Blockly.RenderedConnection.prototype.hideAll = function () {
+	this.setHidden(!0);
+	if (this.targetConnection)
+		for (var a = this.targetBlock().getDescendants(), b = 0; b < a.length; b++) {
+			for (var c = a[b], d = c.getConnections_(!0), e = 0; e < d.length; e++) d[e].setHidden(!0);
+			c = c.getIcons();
+			for (e = 0; e < c.length; e++) c[e].setVisible(!1)
+		}
+};
+Blockly.RenderedConnection.prototype.isConnectionAllowed = function (a, b) {
+	return this.distanceFrom(a) > b ? !1 : Blockly.RenderedConnection.superClass_.isConnectionAllowed.call(this, a)
+};
+Blockly.RenderedConnection.prototype.disconnectInternal_ = function (a, b) {
+	Blockly.RenderedConnection.superClass_.disconnectInternal_.call(this, a, b);
+	a.rendered && a.render();
+	b.rendered && (b.updateDisabled(), b.render())
+};
+Blockly.RenderedConnection.prototype.respawnShadow_ = function () {
+	var a = this.getSourceBlock(),
+		b = this.getShadowDom();
+	if (a.workspace && b && Blockly.Events.recordUndo) {
+		Blockly.RenderedConnection.superClass_.respawnShadow_.call(this);
+		b = this.targetBlock();
+		if (!b) throw "Couldn't respawn the shadow block that should exist here.";
+		b.initSvg();
+		b.render(!1);
+		a.rendered && a.render()
+	}
+};
+Blockly.RenderedConnection.prototype.neighbours_ = function (a) {
+	return this.dbOpposite_.getNeighbours(this, a)
+};
+Blockly.RenderedConnection.prototype.connect_ = function (a) {
+	Blockly.RenderedConnection.superClass_.connect_.call(this, a);
+	var b = this.getSourceBlock();
+	a = a.getSourceBlock();
+	b.rendered && b.updateDisabled();
+	a.rendered && a.updateDisabled();
+	b.rendered && a.rendered && (this.type == Blockly.NEXT_STATEMENT || this.type == Blockly.PREVIOUS_STATEMENT ? a.render() : b.render())
+};
+Blockly.BlockSvg = function (a, b, c) {
+	this.svgGroup_ = Blockly.createSvgElement("g", {}, null);
+	this.svgPathDark_ = Blockly.createSvgElement("path", {
+		"class": "blocklyPathDark",
+		transform: "translate(1,1)"
+	}, this.svgGroup_);
+	this.svgPath_ = Blockly.createSvgElement("path", {
+		"class": "blocklyPath"
+	}, this.svgGroup_);
+	this.svgPathLight_ = Blockly.createSvgElement("path", {
+		"class": "blocklyPathLight"
+	}, this.svgGroup_);
+	this.svgPath_.tooltip = this;
+	this.rendered = !1;
+	Blockly.Tooltip.bindMouseEvents(this.svgPath_);
+	Blockly.BlockSvg.superClass_.constructor.call(this,
+		a, b, c)
+};
+goog.inherits(Blockly.BlockSvg, Blockly.Block);
+Blockly.BlockSvg.prototype.height = 0;
+Blockly.BlockSvg.prototype.width = 0;
+Blockly.BlockSvg.prototype.dragStartXY_ = null;
+Blockly.BlockSvg.INLINE = -1;
+Blockly.BlockSvg.prototype.initSvg = function () {
+	goog.asserts.assert(this.workspace.rendered, "Workspace is headless.");
+	for (var a = 0, b; b = this.inputList[a]; a++) b.init();
+	b = this.getIcons();
+	for (a = 0; a < b.length; a++) b[a].createIcon();
+	this.updateColour();
+	this.updateMovable();
+	if (!this.workspace.options.readOnly && !this.eventsInit_) {
+		Blockly.bindEventWithChecks_(this.getSvgRoot(), "mousedown", this, this.onMouseDown_);
+		var c = this;
+		Blockly.bindEvent_(this.getSvgRoot(), "touchstart", null, function (a) {
+			Blockly.longStart_(a,
+				c)
+		})
+	}
+	this.eventsInit_ = !0;
+	this.getSvgRoot().parentNode || this.workspace.getCanvas().appendChild(this.getSvgRoot())
+};
+Blockly.BlockSvg.prototype.select = function () {
+	if (this.isShadow() && this.getParent()) this.getParent().select();
+	else if (Blockly.selected != this) {
+		var a = null;
+		if (Blockly.selected) {
+			a = Blockly.selected.id;
+			Blockly.Events.disable();
+			try {
+				Blockly.selected.unselect()
+			} finally {
+				Blockly.Events.enable()
+			}
+		}
+		a = new Blockly.Events.Ui(null, "selected", a, this.id);
+		a.workspaceId = this.workspace.id;
+		Blockly.Events.fire(a);
+		Blockly.selected = this;
+		this.addSelect()
+	}
+};
+Blockly.BlockSvg.prototype.unselect = function () {
+	if (Blockly.selected == this) {
+		var a = new Blockly.Events.Ui(null, "selected", this.id, null);
+		a.workspaceId = this.workspace.id;
+		Blockly.Events.fire(a);
+		Blockly.selected = null;
+		this.removeSelect()
+	}
+};
+Blockly.BlockSvg.prototype.mutator = null;
+Blockly.BlockSvg.prototype.comment = null;
+Blockly.BlockSvg.prototype.warning = null;
+Blockly.BlockSvg.prototype.getIcons = function () {
+	var a = [];
+	this.mutator && a.push(this.mutator);
+	this.comment && a.push(this.comment);
+	this.warning && a.push(this.warning);
+	return a
+};
+Blockly.BlockSvg.onMouseUpWrapper_ = null;
+Blockly.BlockSvg.onMouseMoveWrapper_ = null;
+Blockly.BlockSvg.terminateDrag = function () {
+	Blockly.BlockSvg.disconnectUiStop_();
+	Blockly.BlockSvg.onMouseUpWrapper_ && (Blockly.unbindEvent_(Blockly.BlockSvg.onMouseUpWrapper_), Blockly.BlockSvg.onMouseUpWrapper_ = null);
+	Blockly.BlockSvg.onMouseMoveWrapper_ && (Blockly.unbindEvent_(Blockly.BlockSvg.onMouseMoveWrapper_), Blockly.BlockSvg.onMouseMoveWrapper_ = null);
+	var a = Blockly.selected;
+	if (Blockly.dragMode_ == Blockly.DRAG_FREE && a) {
+		var b = a.getRelativeToSurfaceXY(),
+			b = goog.math.Coordinate.difference(b, a.dragStartXY_),
+			c = new Blockly.Events.Move(a);
+		c.oldCoordinate = a.dragStartXY_;
+		c.recordNew();
+		Blockly.Events.fire(c);
+		a.moveConnections_(b.x, b.y);
+		delete a.draggedBubbles_;
+		a.setDragging_(!1);
+		a.render();
+		a.workspace.setResizesEnabled(!0);
+		var d = Blockly.Events.getGroup();
+		setTimeout(function () {
+			Blockly.Events.setGroup(d);
+			a.snapToGrid();
+			Blockly.Events.setGroup(!1)
+		}, Blockly.BUMP_DELAY / 2);
+		setTimeout(function () {
+			Blockly.Events.setGroup(d);
+			a.bumpNeighbours_();
+			Blockly.Events.setGroup(!1)
+		}, Blockly.BUMP_DELAY)
+	}
+	Blockly.dragMode_ = Blockly.DRAG_NONE;
+	Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN)
+};
+Blockly.BlockSvg.prototype.setParent = function (a) {
+	if (a != this.parentBlock_) {
+		var b = this.getSvgRoot();
+		if (this.parentBlock_ && b) {
+			var c = this.getRelativeToSurfaceXY();
+			this.workspace.getCanvas().appendChild(b);
+			b.setAttribute("transform", "translate(" + c.x + "," + c.y + ")")
+		}
+		Blockly.Field.startCache();
+		Blockly.BlockSvg.superClass_.setParent.call(this, a);
+		Blockly.Field.stopCache();
+		a && (c = this.getRelativeToSurfaceXY(), a.getSvgRoot().appendChild(b), a = this.getRelativeToSurfaceXY(), this.moveConnections_(a.x - c.x, a.y - c.y))
+	}
+};
+Blockly.BlockSvg.prototype.getRelativeToSurfaceXY = function () {
+	var a = 0,
+		b = 0,
+		c = this.getSvgRoot();
+	if (c) {
+		do var d = Blockly.getRelativeXY_(c),
+			a = a + d.x,
+			b = b + d.y,
+			c = c.parentNode; while (c && c != this.workspace.getCanvas())
+	}
+	return new goog.math.Coordinate(a, b)
+};
+Blockly.BlockSvg.prototype.moveBy = function (a, b) {
+	goog.asserts.assert(!this.parentBlock_, "Block has parent.");
+	var c = new Blockly.Events.Move(this),
+		d = this.getRelativeToSurfaceXY();
+	this.getSvgRoot().setAttribute("transform", "translate(" + (d.x + a) + "," + (d.y + b) + ")");
+	this.moveConnections_(a, b);
+	c.recordNew();
+	this.workspace.resizeContents();
+	Blockly.Events.fire(c)
+};
+Blockly.BlockSvg.prototype.snapToGrid = function () {
+	if (this.workspace && Blockly.dragMode_ == Blockly.DRAG_NONE && !this.getParent() && !this.isInFlyout && this.workspace.options.gridOptions && this.workspace.options.gridOptions.snap) {
+		var a = this.workspace.options.gridOptions.spacing,
+			b = a / 2,
+			c = this.getRelativeToSurfaceXY(),
+			d = Math.round((c.x - b) / a) * a + b - c.x,
+			a = Math.round((c.y - b) / a) * a + b - c.y,
+			d = Math.round(d),
+			a = Math.round(a);
+		0 == d && 0 == a || this.moveBy(d, a)
+	}
+};
+Blockly.BlockSvg.prototype.getHeightWidth = function () {
+	var a = this.height,
+		b = this.width,
+		c = this.getNextBlock();
+	c ? (c = c.getHeightWidth(), a += c.height - 4, b = Math.max(b, c.width)) : this.nextConnection || this.outputConnection || (a += 2);
+	return {
+		height: a,
+		width: b
+	}
+};
+Blockly.BlockSvg.prototype.getBoundingRectangle = function () {
+	var a = this.getRelativeToSurfaceXY(this),
+		b = this.outputConnection ? Blockly.BlockSvg.TAB_WIDTH : 0,
+		c = this.getHeightWidth(),
+		d;
+	this.RTL ? (d = new goog.math.Coordinate(a.x - (c.width - b), a.y), a = new goog.math.Coordinate(a.x + b, a.y + c.height)) : (d = new goog.math.Coordinate(a.x - b, a.y), a = new goog.math.Coordinate(a.x + c.width - b, a.y + c.height));
+	return {
+		topLeft: d,
+		bottomRight: a
+	}
+};
+Blockly.BlockSvg.prototype.setCollapsed = function (a) {
+	if (this.collapsed_ != a) {
+		for (var b = [], c = 0, d; d = this.inputList[c]; c++) b.push.apply(b, d.setVisible(!a));
+		if (a) {
+			d = this.getIcons();
+			for (c = 0; c < d.length; c++) d[c].setVisible(!1);
+			c = this.toString(Blockly.COLLAPSE_CHARS);
+			this.appendDummyInput("_TEMP_COLLAPSED_INPUT").appendField(c).init()
+		} else this.removeInput("_TEMP_COLLAPSED_INPUT"), this.setWarningText(null);
+		Blockly.BlockSvg.superClass_.setCollapsed.call(this, a);
+		b.length || (b[0] = this);
+		if (this.rendered)
+			for (c = 0; a =
+				b[c]; c++) a.render()
+	}
+};
+Blockly.BlockSvg.prototype.tab = function (a, b) {
+	for (var c = [], d = 0, e; e = this.inputList[d]; d++) {
+		for (var f = 0, g; g = e.fieldRow[f]; f++) g instanceof Blockly.FieldTextInput && c.push(g);
+		e.connection && (e = e.connection.targetBlock()) && c.push(e)
+	}
+	d = c.indexOf(a); -1 == d && (d = b ? -1 : c.length);
+	(c = c[b ? d + 1 : d - 1]) ? c instanceof Blockly.Field ? c.showEditor_() : c.tab(null, b) : (c = this.getParent()) && c.tab(this, b)
+};
+Blockly.BlockSvg.prototype.onMouseDown_ = function (a) {
+	if (!this.workspace.options.readOnly)
+		if (this.isInFlyout) "touchstart" == a.type && Blockly.isRightButton(a) && (Blockly.Flyout.blockRightClick_(a, this), a.stopPropagation(), a.preventDefault());
+		else {
+			this.isInMutator && this.workspace.resize();
+			this.workspace.updateScreenCalculationsIfScrolled();
+			this.workspace.markFocused();
+			Blockly.terminateDrag_();
+			this.select();
+			Blockly.hideChaff();
+			if (Blockly.isRightButton(a)) this.showContextMenu_(a), Blockly.Touch.clearTouchIdentifier();
+			else if (this.isMovable()) {
+				Blockly.Events.getGroup() || Blockly.Events.setGroup(!0);
+				Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED);
+				this.dragStartXY_ = this.getRelativeToSurfaceXY();
+				this.workspace.startDrag(a, this.dragStartXY_);
+				Blockly.dragMode_ = Blockly.DRAG_STICKY;
+				Blockly.BlockSvg.onMouseUpWrapper_ = Blockly.bindEventWithChecks_(document, "mouseup", this, this.onMouseUp_);
+				Blockly.BlockSvg.onMouseMoveWrapper_ = Blockly.bindEventWithChecks_(document, "mousemove", this, this.onMouseMove_);
+				this.draggedBubbles_ = [];
+				for (var b = this.getDescendants(), c = 0, d; d = b[c]; c++) {
+					d = d.getIcons();
+					for (var e = 0; e < d.length; e++) {
+						var f = d[e].getIconLocation();
+						f.bubble = d[e];
+						this.draggedBubbles_.push(f)
+					}
+				}
+			} else return;
+			a.stopPropagation();
+			a.preventDefault()
+		}
+};
+Blockly.BlockSvg.prototype.onMouseUp_ = function (a) {
+	Blockly.Touch.clearTouchIdentifier();
+	Blockly.dragMode_ == Blockly.DRAG_FREE || Blockly.WidgetDiv.isVisible() || Blockly.Events.fire(new Blockly.Events.Ui(this, "click", void 0, void 0));
+	Blockly.terminateDrag_();
+	Blockly.selected && Blockly.highlightedConnection_ ? (Blockly.localConnection_.connect(Blockly.highlightedConnection_), this.rendered && (Blockly.localConnection_.isSuperior() ? Blockly.highlightedConnection_ : Blockly.localConnection_).getSourceBlock().connectionUiEffect(),
+		this.workspace.trashcan && this.workspace.trashcan.close()) : !this.getParent() && Blockly.selected.isDeletable() && this.workspace.isDeleteArea(a) && ((a = this.workspace.trashcan) && goog.Timer.callOnce(a.close, 100, a), Blockly.selected.dispose(!1, !0));
+	Blockly.highlightedConnection_ && (Blockly.highlightedConnection_.unhighlight(), Blockly.highlightedConnection_ = null);
+	Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN);
+	Blockly.WidgetDiv.isVisible() || Blockly.Events.setGroup(!1)
+};
+Blockly.BlockSvg.prototype.showHelp_ = function () {
+	var a = goog.isFunction(this.helpUrl) ? this.helpUrl() : this.helpUrl;
+	a && window.open(a)
+};
+Blockly.BlockSvg.prototype.showContextMenu_ = function (a) {
+	if (!this.workspace.options.readOnly && this.contextMenu) {
+		var b = this,
+			c = [];
+		if (this.isDeletable() && this.isMovable() && !b.isInFlyout) {
+			var d = {
+				text: Blockly.Msg.DUPLICATE_BLOCK,
+				enabled: !0,
+				callback: function () {
+					Blockly.duplicate_(b)
+				}
+			};
+			this.getDescendants().length > this.workspace.remainingCapacity() && (d.enabled = !1);
+			c.push(d);
+			this.isEditable() && !this.collapsed_ && this.workspace.options.comments && (d = {
+				enabled: !goog.userAgent.IE
+			}, this.comment ? (d.text = Blockly.Msg.REMOVE_COMMENT,
+				d.callback = function () {
+                	b.setCommentText(null)
+				}) : (d.text = Blockly.Msg.ADD_COMMENT, d.callback = function () {
+                	b.setCommentText("")
+				}), c.push(d));
+			if (!this.collapsed_)
+				for (d = 1; d < this.inputList.length; d++)
+					if (this.inputList[d - 1].type != Blockly.NEXT_STATEMENT && this.inputList[d].type != Blockly.NEXT_STATEMENT) {
+						var d = {
+							enabled: !0
+						},
+							e = this.getInputsInline();
+						d.text = e ? Blockly.Msg.EXTERNAL_INPUTS : Blockly.Msg.INLINE_INPUTS;
+						d.callback = function () {
+							b.setInputsInline(!e)
+						};
+						c.push(d);
+						break
+					}
+			this.workspace.options.collapse && (this.collapsed_ ?
+				(d = {
+                	enabled: !0
+				}, d.text = Blockly.Msg.EXPAND_BLOCK, d.callback = function () {
+                	b.setCollapsed(!1)
+				}) : (d = {
+                	enabled: !0
+				}, d.text = Blockly.Msg.COLLAPSE_BLOCK, d.callback = function () {
+                	b.setCollapsed(!0)
+				}), c.push(d));
+			this.workspace.options.disable && (d = {
+				text: this.disabled ? Blockly.Msg.ENABLE_BLOCK : Blockly.Msg.DISABLE_BLOCK,
+				enabled: !this.getInheritedDisabled(),
+				callback: function () {
+					b.setDisabled(!b.disabled)
+				}
+			}, c.push(d));
+			var d = this.getDescendants().length,
+				f = this.getNextBlock();
+			f && (d -= f.getDescendants().length);
+			d = {
+				text: 1 == d ?
+					Blockly.Msg.DELETE_BLOCK : Blockly.Msg.DELETE_X_BLOCKS.replace("%1", String(d)),
+				enabled: !0,
+				callback: function () {
+					Blockly.Events.setGroup(!0);
+					b.dispose(!0, !0);
+					Blockly.Events.setGroup(!1)
+				}
+			};
+			c.push(d)
+		}
+		d = {
+			enabled: !(goog.isFunction(this.helpUrl) ? !this.helpUrl() : !this.helpUrl)
+		};
+		d.text = Blockly.Msg.HELP;
+		d.callback = function () {
+			b.showHelp_()
+		};
+		c.push(d);
+		this.customContextMenu && !b.isInFlyout && this.customContextMenu(c);
+		Blockly.ContextMenu.show(a, c, this.RTL);
+		Blockly.ContextMenu.currentBlock = this
+	}
+};
+Blockly.BlockSvg.prototype.moveConnections_ = function (a, b) {
+	if (this.rendered) {
+		for (var c = this.getConnections_(!1), d = 0; d < c.length; d++) c[d].moveBy(a, b);
+		c = this.getIcons();
+		for (d = 0; d < c.length; d++) c[d].computeIconLocation();
+		for (d = 0; d < this.childBlocks_.length; d++) this.childBlocks_[d].moveConnections_(a, b)
+	}
+};
+Blockly.BlockSvg.prototype.setDragging_ = function (a) {
+	if (a) {
+		var b = this.getSvgRoot();
+		b.translate_ = "";
+		b.skew_ = "";
+		Blockly.draggingConnections_ = Blockly.draggingConnections_.concat(this.getConnections_(!0));
+		Blockly.addClass_(this.svgGroup_, "blocklyDragging")
+	} else Blockly.draggingConnections_ = [], Blockly.removeClass_(this.svgGroup_, "blocklyDragging");
+	for (b = 0; b < this.childBlocks_.length; b++) this.childBlocks_[b].setDragging_(a)
+};
+Blockly.BlockSvg.prototype.onMouseMove_ = function (a) {
+	if ("mousemove" == a.type && 1 >= a.clientX && 0 == a.clientY && 0 == a.button) a.stopPropagation();
+	else {
+		var b = this.getRelativeToSurfaceXY(),
+			c = this.workspace.moveDrag(a);
+		if (Blockly.dragMode_ == Blockly.DRAG_STICKY && goog.math.Coordinate.distance(b, c) * this.workspace.scale > Blockly.DRAG_RADIUS) {
+			Blockly.dragMode_ = Blockly.DRAG_FREE;
+			Blockly.longStop_();
+			this.workspace.setResizesEnabled(!1);
+			if (this.parentBlock_) {
+				this.unplug();
+				var d = this.getSvgRoot();
+				d.translate_ = "translate(" +
+					c.x + "," + c.y + ")";
+				this.disconnectUiEffect()
+			}
+			this.setDragging_(!0)
+		}
+		if (Blockly.dragMode_ == Blockly.DRAG_FREE) {
+			b = goog.math.Coordinate.difference(b, this.dragStartXY_);
+			d = this.getSvgRoot();
+			d.translate_ = "translate(" + c.x + "," + c.y + ")";
+			d.setAttribute("transform", d.translate_ + d.skew_);
+			for (c = 0; c < this.draggedBubbles_.length; c++) d = this.draggedBubbles_[c], d.bubble.setIconLocation(goog.math.Coordinate.sum(d, b));
+			d = this.getConnections_(!1);
+			(c = this.lastConnectionInStack_()) && c != this.nextConnection && d.push(c);
+			for (var e =
+					null, f = null, g = Blockly.SNAP_RADIUS, c = 0; c < d.length; c++) {
+				var h = d[c],
+					k = h.closest(g, b);
+				k.connection && (e = k.connection, f = h, g = k.radius)
+			}
+			Blockly.highlightedConnection_ && Blockly.highlightedConnection_ != e && (Blockly.highlightedConnection_.unhighlight(), Blockly.highlightedConnection_ = null, Blockly.localConnection_ = null);
+			e && e != Blockly.highlightedConnection_ && (e.highlight(), Blockly.highlightedConnection_ = e, Blockly.localConnection_ = f);
+			this.isDeletable() && this.workspace.isDeleteArea(a)
+		}
+		a.stopPropagation();
+		a.preventDefault()
+	}
+};
+Blockly.BlockSvg.prototype.updateMovable = function () {
+	this.isMovable() ? Blockly.addClass_(this.svgGroup_, "blocklyDraggable") : Blockly.removeClass_(this.svgGroup_, "blocklyDraggable")
+};
+Blockly.BlockSvg.prototype.setMovable = function (a) {
+	Blockly.BlockSvg.superClass_.setMovable.call(this, a);
+	this.updateMovable()
+};
+Blockly.BlockSvg.prototype.setEditable = function (a) {
+	Blockly.BlockSvg.superClass_.setEditable.call(this, a);
+	a = this.getIcons();
+	for (var b = 0; b < a.length; b++) a[b].updateEditable()
+};
+Blockly.BlockSvg.prototype.setShadow = function (a) {
+	Blockly.BlockSvg.superClass_.setShadow.call(this, a);
+	this.updateColour()
+};
+Blockly.BlockSvg.prototype.getSvgRoot = function () {
+	return this.svgGroup_
+};
+Blockly.BlockSvg.prototype.dispose = function (a, b) {
+	if (this.workspace) {
+		Blockly.Tooltip.hide();
+		Blockly.Field.startCache();
+		var c = this.workspace;
+		Blockly.selected == this && (this.unselect(), Blockly.terminateDrag_());
+		Blockly.ContextMenu.currentBlock == this && Blockly.ContextMenu.hide();
+		b && this.rendered && (this.unplug(a), this.disposeUiEffect());
+		this.rendered = !1;
+		Blockly.Events.disable();
+		try {
+			for (var d = this.getIcons(), e = 0; e < d.length; e++) d[e].dispose()
+		} finally {
+			Blockly.Events.enable()
+		}
+		Blockly.BlockSvg.superClass_.dispose.call(this,
+			a);
+		goog.dom.removeNode(this.svgGroup_);
+		c.resizeContents();
+		this.svgPathDark_ = this.svgPathLight_ = this.svgPath_ = this.svgGroup_ = null;
+		Blockly.Field.stopCache()
+	}
+};
+Blockly.BlockSvg.prototype.disposeUiEffect = function () {
+	this.workspace.playAudio("delete");
+	var a = Blockly.getSvgXY_(this.svgGroup_, this.workspace),
+		b = this.svgGroup_.cloneNode(!0);
+	b.translateX_ = a.x;
+	b.translateY_ = a.y;
+	b.setAttribute("transform", "translate(" + b.translateX_ + "," + b.translateY_ + ")");
+	this.workspace.getParentSvg().appendChild(b);
+	b.bBox_ = b.getBBox();
+	Blockly.BlockSvg.disposeUiStep_(b, this.RTL, new Date, this.workspace.scale)
+};
+Blockly.BlockSvg.disposeUiStep_ = function (a, b, c, d) {
+	var e = (new Date - c) / 150;
+	1 < e ? goog.dom.removeNode(a) : (a.setAttribute("transform", "translate(" + (a.translateX_ + (b ? -1 : 1) * a.bBox_.width * d / 2 * e) + "," + (a.translateY_ + a.bBox_.height * d * e) + ") scale(" + (1 - e) * d + ")"), setTimeout(function () {
+		Blockly.BlockSvg.disposeUiStep_(a, b, c, d)
+	}, 10))
+};
+Blockly.BlockSvg.prototype.connectionUiEffect = function () {
+	this.workspace.playAudio("click");
+	if (!(1 > this.workspace.scale)) {
+		var a = Blockly.getSvgXY_(this.svgGroup_, this.workspace);
+		this.outputConnection ? (a.x += (this.RTL ? 3 : -3) * this.workspace.scale, a.y += 13 * this.workspace.scale) : this.previousConnection && (a.x += (this.RTL ? -23 : 23) * this.workspace.scale, a.y += 3 * this.workspace.scale);
+		a = Blockly.createSvgElement("circle", {
+			cx: a.x,
+			cy: a.y,
+			r: 0,
+			fill: "none",
+			stroke: "#888",
+			"stroke-width": 10
+		}, this.workspace.getParentSvg());
+		Blockly.BlockSvg.connectionUiStep_(a, new Date, this.workspace.scale)
+	}
+};
+Blockly.BlockSvg.connectionUiStep_ = function (a, b, c) {
+	var d = (new Date - b) / 150;
+	1 < d ? goog.dom.removeNode(a) : (a.setAttribute("r", 25 * d * c), a.style.opacity = 1 - d, Blockly.BlockSvg.disconnectUiStop_.pid_ = setTimeout(function () {
+		Blockly.BlockSvg.connectionUiStep_(a, b, c)
+	}, 10))
+};
+Blockly.BlockSvg.prototype.disconnectUiEffect = function () {
+	this.workspace.playAudio("disconnect");
+	if (!(1 > this.workspace.scale)) {
+		var a = this.getHeightWidth().height,
+			a = Math.atan(10 / a) / Math.PI * 180;
+		this.RTL || (a *= -1);
+		Blockly.BlockSvg.disconnectUiStep_(this.svgGroup_, a, new Date)
+	}
+};
+Blockly.BlockSvg.disconnectUiStep_ = function (a, b, c) {
+	var d = (new Date - c) / 200;
+	1 < d ? a.skew_ = "" : (a.skew_ = "skewX(" + Math.round(Math.sin(d * Math.PI * 3) * (1 - d) * b) + ")", Blockly.BlockSvg.disconnectUiStop_.group = a, Blockly.BlockSvg.disconnectUiStop_.pid = setTimeout(function () {
+		Blockly.BlockSvg.disconnectUiStep_(a, b, c)
+	}, 10));
+	a.setAttribute("transform", a.translate_ + a.skew_)
+};
+Blockly.BlockSvg.disconnectUiStop_ = function () {
+	if (Blockly.BlockSvg.disconnectUiStop_.group) {
+		clearTimeout(Blockly.BlockSvg.disconnectUiStop_.pid);
+		var a = Blockly.BlockSvg.disconnectUiStop_.group;
+		a.skew_ = "";
+		a.setAttribute("transform", a.translate_);
+		Blockly.BlockSvg.disconnectUiStop_.group = null
+	}
+};
+Blockly.BlockSvg.disconnectUiStop_.pid = 0;
+Blockly.BlockSvg.disconnectUiStop_.group = null;
+Blockly.BlockSvg.prototype.updateColour = function () {
+	if (!this.disabled) {
+		var a = this.getColour(),
+			b = goog.color.hexToRgb(a);
+		if (this.isShadow()) b = goog.color.lighten(b, .6), a = goog.color.rgbArrayToHex(b), this.svgPathLight_.style.display = "none", this.svgPathDark_.setAttribute("fill", a);
+		else {
+			this.svgPathLight_.style.display = "";
+			var c = goog.color.rgbArrayToHex(goog.color.lighten(b, .3)),
+				b = goog.color.rgbArrayToHex(goog.color.darken(b, .2));
+			this.svgPathLight_.setAttribute("stroke", c);
+			this.svgPathDark_.setAttribute("fill",
+				b)
+		}
+		this.svgPath_.setAttribute("fill", a);
+		a = this.getIcons();
+		for (c = 0; c < a.length; c++) a[c].updateColour();
+		for (a = 0; c = this.inputList[a]; a++)
+			for (var b = 0, d; d = c.fieldRow[b]; b++) d.setText(null)
+	}
+};
+Blockly.BlockSvg.prototype.updateDisabled = function () {
+	var a = Blockly.hasClass_(this.svgGroup_, "blocklyDisabled");
+	this.disabled || this.getInheritedDisabled() ? a || (Blockly.addClass_(this.svgGroup_, "blocklyDisabled"), this.svgPath_.setAttribute("fill", "url(#" + this.workspace.options.disabledPatternId + ")")) : a && (Blockly.removeClass_(this.svgGroup_, "blocklyDisabled"), this.updateColour());
+	for (var a = this.getChildren(), b = 0, c; c = a[b]; b++) c.updateDisabled()
+};
+Blockly.BlockSvg.prototype.getCommentText = function () {
+	return this.comment ? this.comment.getText().replace(/\s+$/, "").replace(/ +\n/g, "\n") : ""
+};
+Blockly.BlockSvg.prototype.setCommentText = function (a) {
+	var b = !1;
+	goog.isString(a) ? (this.comment || (this.comment = new Blockly.Comment(this), b = !0), this.comment.setText(a)) : this.comment && (this.comment.dispose(), b = !0);
+	b && this.rendered && (this.render(), this.bumpNeighbours_())
+};
+Blockly.BlockSvg.prototype.setWarningText = function (a, b) {
+	this.setWarningText.pid_ || (this.setWarningText.pid_ = Object.create(null));
+	var c = b || "";
+	if (c) this.setWarningText.pid_[c] && (clearTimeout(this.setWarningText.pid_[c]), delete this.setWarningText.pid_[c]);
+	else
+		for (var d in this.setWarningText.pid_) clearTimeout(this.setWarningText.pid_[d]), delete this.setWarningText.pid_[d];
+	if (Blockly.dragMode_ == Blockly.DRAG_FREE) {
+		var e = this;
+		this.setWarningText.pid_[c] = setTimeout(function () {
+			e.workspace && (delete e.setWarningText.pid_[c],
+				e.setWarningText(a, c))
+		}, 100)
+	} else {
+		this.isInFlyout && (a = null);
+		d = this.getSurroundParent();
+		for (var f = null; d;) d.isCollapsed() && (f = d), d = d.getSurroundParent();
+		f && f.setWarningText(a, "collapsed " + this.id + " " + c);
+		d = !1;
+		goog.isString(a) ? (this.warning || (this.warning = new Blockly.Warning(this), d = !0), this.warning.setText(a, c)) : this.warning && !c ? (this.warning.dispose(), d = !0) : this.warning && (d = this.warning.getText(), this.warning.setText("", c), (f = this.warning.getText()) || this.warning.dispose(), d = d == f);
+		d && this.rendered &&
+			(this.render(), this.bumpNeighbours_())
+	}
+};
+Blockly.BlockSvg.prototype.setMutator = function (a) {
+	this.mutator && this.mutator !== a && this.mutator.dispose();
+	a && (a.block_ = this, this.mutator = a, a.createIcon())
+};
+Blockly.BlockSvg.prototype.setDisabled = function (a) {
+	this.disabled != a && (Blockly.BlockSvg.superClass_.setDisabled.call(this, a), this.rendered && this.updateDisabled())
+};
+Blockly.BlockSvg.prototype.setHighlighted = function (a) {
+	a ? (this.svgPath_.setAttribute("filter", "url(#" + this.workspace.options.embossFilterId + ")"), this.svgPathLight_.style.display = "none") : (this.svgPath_.removeAttribute("filter"), this.svgPathLight_.style.display = "block")
+};
+Blockly.BlockSvg.prototype.addSelect = function () {
+	Blockly.addClass_(this.svgGroup_, "blocklySelected");
+	var a = this;
+	do {
+		var b = a.getSvgRoot();
+		b.parentNode.appendChild(b);
+		a = a.getParent()
+	} while (a)
+};
+Blockly.BlockSvg.prototype.removeSelect = function () {
+	Blockly.removeClass_(this.svgGroup_, "blocklySelected")
+};
+Blockly.BlockSvg.prototype.setColour = function (a) {
+	Blockly.BlockSvg.superClass_.setColour.call(this, a);
+	this.rendered && this.updateColour()
+};
+Blockly.BlockSvg.prototype.setPreviousStatement = function (a, b) {
+	Blockly.BlockSvg.superClass_.setPreviousStatement.call(this, a, b);
+	this.rendered && (this.render(), this.bumpNeighbours_())
+};
+Blockly.BlockSvg.prototype.setNextStatement = function (a, b) {
+	Blockly.BlockSvg.superClass_.setNextStatement.call(this, a, b);
+	this.rendered && (this.render(), this.bumpNeighbours_())
+};
+Blockly.BlockSvg.prototype.setOutput = function (a, b) {
+	Blockly.BlockSvg.superClass_.setOutput.call(this, a, b);
+	this.rendered && (this.render(), this.bumpNeighbours_())
+};
+Blockly.BlockSvg.prototype.setInputsInline = function (a) {
+	Blockly.BlockSvg.superClass_.setInputsInline.call(this, a);
+	this.rendered && (this.render(), this.bumpNeighbours_())
+};
+Blockly.BlockSvg.prototype.removeInput = function (a, b) {
+	Blockly.BlockSvg.superClass_.removeInput.call(this, a, b);
+	this.rendered && (this.render(), this.bumpNeighbours_())
+};
+Blockly.BlockSvg.prototype.moveNumberedInputBefore = function (a, b) {
+	Blockly.BlockSvg.superClass_.moveNumberedInputBefore.call(this, a, b);
+	this.rendered && (this.render(), this.bumpNeighbours_())
+};
+Blockly.BlockSvg.prototype.appendInput_ = function (a, b) {
+	var c = Blockly.BlockSvg.superClass_.appendInput_.call(this, a, b);
+	this.rendered && (this.render(), this.bumpNeighbours_());
+	return c
+};
+Blockly.BlockSvg.prototype.getConnections_ = function (a) {
+	var b = [];
+	if (a || this.rendered)
+		if (this.outputConnection && b.push(this.outputConnection), this.previousConnection && b.push(this.previousConnection), this.nextConnection && b.push(this.nextConnection), a || !this.collapsed_) {
+			a = 0;
+			for (var c; c = this.inputList[a]; a++) c.connection && b.push(c.connection)
+		}
+	return b
+};
+Blockly.BlockSvg.prototype.makeConnection_ = function (a) {
+	return new Blockly.RenderedConnection(this, a)
+};
+Blockly.BlockSvg.render = {};
+Blockly.BlockSvg.SEP_SPACE_X = 10;
+Blockly.BlockSvg.SEP_SPACE_Y = 10;
+Blockly.BlockSvg.INLINE_PADDING_Y = 5;
+Blockly.BlockSvg.MIN_BLOCK_Y = 25;
+Blockly.BlockSvg.TAB_HEIGHT = 20;
+Blockly.BlockSvg.TAB_WIDTH = 8;
+Blockly.BlockSvg.NOTCH_WIDTH = 30;
+Blockly.BlockSvg.CORNER_RADIUS = 8;
+Blockly.BlockSvg.START_HAT = !1;
+Blockly.BlockSvg.START_HAT_HEIGHT = 15;
+Blockly.BlockSvg.START_HAT_PATH = "c 30,-" + Blockly.BlockSvg.START_HAT_HEIGHT + " 70,-" + Blockly.BlockSvg.START_HAT_HEIGHT + " 100,0";
+Blockly.BlockSvg.START_HAT_HIGHLIGHT_LTR = "c 17.8,-9.2 45.3,-14.9 75,-8.7 M 100.5,0.5";
+Blockly.BlockSvg.START_HAT_HIGHLIGHT_RTL = "m 25,-8.7 c 29.7,-6.2 57.2,-0.5 75,8.7";
+Blockly.BlockSvg.DISTANCE_45_INSIDE = (1 - Math.SQRT1_2) * (Blockly.BlockSvg.CORNER_RADIUS - .5) + .5;
+Blockly.BlockSvg.DISTANCE_45_OUTSIDE = (1 - Math.SQRT1_2) * (Blockly.BlockSvg.CORNER_RADIUS + .5) - .5;
+Blockly.BlockSvg.NOTCH_PATH_LEFT = "l 6,4 3,0 6,-4";
+Blockly.BlockSvg.NOTCH_PATH_LEFT_HIGHLIGHT = "l 6,4 3,0 6,-4";
+Blockly.BlockSvg.NOTCH_PATH_RIGHT = "l -6,4 -3,0 -6,-4";
+Blockly.BlockSvg.JAGGED_TEETH = "l 8,0 0,4 8,4 -16,8 8,4";
+Blockly.BlockSvg.JAGGED_TEETH_HEIGHT = 20;
+Blockly.BlockSvg.JAGGED_TEETH_WIDTH = 15;
+Blockly.BlockSvg.TAB_PATH_DOWN = "v 5 c 0,10 -" + Blockly.BlockSvg.TAB_WIDTH + ",-8 -" + Blockly.BlockSvg.TAB_WIDTH + ",7.5 s " + Blockly.BlockSvg.TAB_WIDTH + ",-2.5 " + Blockly.BlockSvg.TAB_WIDTH + ",7.5";
+Blockly.BlockSvg.TAB_PATH_DOWN_HIGHLIGHT_RTL = "v 6.5 m -" + .97 * Blockly.BlockSvg.TAB_WIDTH + ",3 q -" + .05 * Blockly.BlockSvg.TAB_WIDTH + ",10 " + .3 * Blockly.BlockSvg.TAB_WIDTH + ",9.5 m " + .67 * Blockly.BlockSvg.TAB_WIDTH + ",-1.9 v 1.4";
+Blockly.BlockSvg.TOP_LEFT_CORNER_START = "m 0," + Blockly.BlockSvg.CORNER_RADIUS;
+Blockly.BlockSvg.TOP_LEFT_CORNER_START_HIGHLIGHT_RTL = "m " + Blockly.BlockSvg.DISTANCE_45_INSIDE + "," + Blockly.BlockSvg.DISTANCE_45_INSIDE;
+Blockly.BlockSvg.TOP_LEFT_CORNER_START_HIGHLIGHT_LTR = "m 0.5," + (Blockly.BlockSvg.CORNER_RADIUS - .5);
+Blockly.BlockSvg.TOP_LEFT_CORNER = "A " + Blockly.BlockSvg.CORNER_RADIUS + "," + Blockly.BlockSvg.CORNER_RADIUS + " 0 0,1 " + Blockly.BlockSvg.CORNER_RADIUS + ",0";
+Blockly.BlockSvg.TOP_LEFT_CORNER_HIGHLIGHT = "A " + (Blockly.BlockSvg.CORNER_RADIUS - .5) + "," + (Blockly.BlockSvg.CORNER_RADIUS - .5) + " 0 0,1 " + Blockly.BlockSvg.CORNER_RADIUS + ",0.5";
+Blockly.BlockSvg.INNER_TOP_LEFT_CORNER = Blockly.BlockSvg.NOTCH_PATH_RIGHT + " h -" + (Blockly.BlockSvg.NOTCH_WIDTH - 15 - Blockly.BlockSvg.CORNER_RADIUS) + " a " + Blockly.BlockSvg.CORNER_RADIUS + "," + Blockly.BlockSvg.CORNER_RADIUS + " 0 0,0 -" + Blockly.BlockSvg.CORNER_RADIUS + "," + Blockly.BlockSvg.CORNER_RADIUS;
+Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER = "a " + Blockly.BlockSvg.CORNER_RADIUS + "," + Blockly.BlockSvg.CORNER_RADIUS + " 0 0,0 " + Blockly.BlockSvg.CORNER_RADIUS + "," + Blockly.BlockSvg.CORNER_RADIUS;
+Blockly.BlockSvg.INNER_TOP_LEFT_CORNER_HIGHLIGHT_RTL = "a " + Blockly.BlockSvg.CORNER_RADIUS + "," + Blockly.BlockSvg.CORNER_RADIUS + " 0 0,0 " + (-Blockly.BlockSvg.DISTANCE_45_OUTSIDE - .5) + "," + (Blockly.BlockSvg.CORNER_RADIUS - Blockly.BlockSvg.DISTANCE_45_OUTSIDE);
+Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER_HIGHLIGHT_RTL = "a " + (Blockly.BlockSvg.CORNER_RADIUS + .5) + "," + (Blockly.BlockSvg.CORNER_RADIUS + .5) + " 0 0,0 " + (Blockly.BlockSvg.CORNER_RADIUS + .5) + "," + (Blockly.BlockSvg.CORNER_RADIUS + .5);
+Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER_HIGHLIGHT_LTR = "a " + (Blockly.BlockSvg.CORNER_RADIUS + .5) + "," + (Blockly.BlockSvg.CORNER_RADIUS + .5) + " 0 0,0 " + (Blockly.BlockSvg.CORNER_RADIUS - Blockly.BlockSvg.DISTANCE_45_OUTSIDE) + "," + (Blockly.BlockSvg.DISTANCE_45_OUTSIDE + .5);
+Blockly.BlockSvg.prototype.render = function (a) {
+	Blockly.Field.startCache();
+	this.rendered = !0;
+	var b = Blockly.BlockSvg.SEP_SPACE_X;
+	this.RTL && (b = -b);
+	for (var c = this.getIcons(), d = 0; d < c.length; d++) b = c[d].renderIcon(b);
+	b += this.RTL ? Blockly.BlockSvg.SEP_SPACE_X : -Blockly.BlockSvg.SEP_SPACE_X;
+	c = this.renderCompute_(b);
+	this.renderDraw_(b, c);
+	this.renderMoveConnections_();
+	!1 !== a && ((a = this.getParent()) ? a.render(!0) : this.workspace.resizeContents());
+	Blockly.Field.stopCache()
+};
+Blockly.BlockSvg.prototype.renderFields_ = function (a, b, c) {
+	c += Blockly.BlockSvg.INLINE_PADDING_Y;
+	this.RTL && (b = -b);
+	for (var d = 0, e; e = a[d]; d++) {
+		var f = e.getSvgRoot();
+		f && (this.RTL ? (b -= e.renderSep + e.renderWidth, f.setAttribute("transform", "translate(" + b + "," + c + ")"), e.renderWidth && (b -= Blockly.BlockSvg.SEP_SPACE_X)) : (f.setAttribute("transform", "translate(" + (b + e.renderSep) + "," + c + ")"), e.renderWidth && (b += e.renderSep + e.renderWidth + Blockly.BlockSvg.SEP_SPACE_X)))
+	}
+	return this.RTL ? -b : b
+};
+Blockly.BlockSvg.prototype.renderCompute_ = function (a) {
+	var b = this.inputList,
+		c = [];
+	c.rightEdge = a + 2 * Blockly.BlockSvg.SEP_SPACE_X;
+	if (this.previousConnection || this.nextConnection) c.rightEdge = Math.max(c.rightEdge, Blockly.BlockSvg.NOTCH_WIDTH + Blockly.BlockSvg.SEP_SPACE_X);
+	for (var d = 0, e = 0, f = !1, g = !1, h = !1, k = void 0, m = this.getInputsInline() && !this.isCollapsed(), p = 0, l; l = b[p]; p++)
+		if (l.isVisible()) {
+			var n;
+			m && k && k != Blockly.NEXT_STATEMENT && l.type != Blockly.NEXT_STATEMENT ? n = c[c.length - 1] : (k = l.type, n = [], n.type = m && l.type !=
+				Blockly.NEXT_STATEMENT ? Blockly.BlockSvg.INLINE : l.type, n.height = 0, c.push(n));
+			n.push(l);
+			l.renderHeight = Blockly.BlockSvg.MIN_BLOCK_Y;
+			l.renderWidth = m && l.type == Blockly.INPUT_VALUE ? Blockly.BlockSvg.TAB_WIDTH + 1.25 * Blockly.BlockSvg.SEP_SPACE_X : 0;
+			if (l.connection && l.connection.isConnected()) {
+				var q = l.connection.targetBlock().getHeightWidth();
+				l.renderHeight = Math.max(l.renderHeight, q.height);
+				l.renderWidth = Math.max(l.renderWidth, q.width)
+			}
+			m || p != b.length - 1 ? !m && l.type == Blockly.INPUT_VALUE && b[p + 1] && b[p + 1].type == Blockly.NEXT_STATEMENT &&
+				l.renderHeight-- : l.renderHeight--;
+			n.height = Math.max(n.height, l.renderHeight);
+			l.fieldWidth = 0;
+			1 == c.length && (l.fieldWidth += this.RTL ? -a : a);
+			for (var q = !1, t = 0, r; r = l.fieldRow[t]; t++) {
+				0 != t && (l.fieldWidth += Blockly.BlockSvg.SEP_SPACE_X);
+				var u = r.getSize();
+				r.renderWidth = u.width;
+				r.renderSep = q && r.EDITABLE ? Blockly.BlockSvg.SEP_SPACE_X : 0;
+				l.fieldWidth += r.renderWidth + r.renderSep;
+				n.height = Math.max(n.height, u.height);
+				q = r.EDITABLE
+			}
+			n.type != Blockly.BlockSvg.INLINE && (n.type == Blockly.NEXT_STATEMENT ? (g = !0, e = Math.max(e, l.fieldWidth)) :
+				(n.type == Blockly.INPUT_VALUE ? f = !0 : n.type == Blockly.DUMMY_INPUT && (h = !0), d = Math.max(d, l.fieldWidth)))
+		}
+	for (a = 0; n = c[a]; a++)
+		if (n.thicker = !1, n.type == Blockly.BlockSvg.INLINE)
+			for (b = 0; l = n[b]; b++)
+				if (l.type == Blockly.INPUT_VALUE) {
+					n.height += 2 * Blockly.BlockSvg.INLINE_PADDING_Y;
+					n.thicker = !0;
+					break
+				}
+	c.statementEdge = 2 * Blockly.BlockSvg.SEP_SPACE_X + e;
+	g && (c.rightEdge = Math.max(c.rightEdge, c.statementEdge + Blockly.BlockSvg.NOTCH_WIDTH));
+	f ? c.rightEdge = Math.max(c.rightEdge, d + 2 * Blockly.BlockSvg.SEP_SPACE_X + Blockly.BlockSvg.TAB_WIDTH) :
+		h && (c.rightEdge = Math.max(c.rightEdge, d + 2 * Blockly.BlockSvg.SEP_SPACE_X));
+	c.hasValue = f;
+	c.hasStatement = g;
+	c.hasDummy = h;
+	return c
+};
+Blockly.BlockSvg.prototype.renderDraw_ = function (a, b) {
+	this.startHat_ = !1;
+	this.height = 0;
+	if (this.outputConnection) this.squareBottomLeftCorner_ = this.squareTopLeftCorner_ = !0;
+	else {
+		this.squareBottomLeftCorner_ = this.squareTopLeftCorner_ = !1;
+		if (this.previousConnection) {
+			var c = this.previousConnection.targetBlock();
+			c && c.getNextBlock() == this && (this.squareTopLeftCorner_ = !0)
+		} else Blockly.BlockSvg.START_HAT && (this.startHat_ = this.squareTopLeftCorner_ = !0, this.height += Blockly.BlockSvg.START_HAT_HEIGHT, b.rightEdge = Math.max(b.rightEdge,
+			100));
+		this.getNextBlock() && (this.squareBottomLeftCorner_ = !0)
+	}
+	var d = [],
+		e = [],
+		c = [],
+		f = [];
+	this.renderDrawTop_(d, c, b.rightEdge);
+	var g = this.renderDrawRight_(d, c, e, f, b, a);
+	this.renderDrawBottom_(d, c, g);
+	this.renderDrawLeft_(d, c);
+	d = d.join(" ") + "\n" + e.join(" ");
+	this.svgPath_.setAttribute("d", d);
+	this.svgPathDark_.setAttribute("d", d);
+	d = c.join(" ") + "\n" + f.join(" ");
+	this.svgPathLight_.setAttribute("d", d);
+	this.RTL && (this.svgPath_.setAttribute("transform", "scale(-1 1)"), this.svgPathLight_.setAttribute("transform",
+		"scale(-1 1)"), this.svgPathDark_.setAttribute("transform", "translate(1,1) scale(-1 1)"))
+};
+Blockly.BlockSvg.prototype.renderMoveConnections_ = function () {
+	var a = this.getRelativeToSurfaceXY();
+	this.previousConnection && this.previousConnection.moveToOffset(a);
+	this.outputConnection && this.outputConnection.moveToOffset(a);
+	for (var b = 0; b < this.inputList.length; b++) {
+		var c = this.inputList[b].connection;
+		c && (c.moveToOffset(a), c.isConnected() && c.tighten_())
+	}
+	this.nextConnection && (this.nextConnection.moveToOffset(a), this.nextConnection.isConnected() && this.nextConnection.tighten_())
+};
+Blockly.BlockSvg.prototype.renderDrawTop_ = function (a, b, c) {
+	this.squareTopLeftCorner_ ? (a.push("m 0,0"), b.push("m 0.5,0.5"), this.startHat_ && (a.push(Blockly.BlockSvg.START_HAT_PATH), b.push(this.RTL ? Blockly.BlockSvg.START_HAT_HIGHLIGHT_RTL : Blockly.BlockSvg.START_HAT_HIGHLIGHT_LTR))) : (a.push(Blockly.BlockSvg.TOP_LEFT_CORNER_START), b.push(this.RTL ? Blockly.BlockSvg.TOP_LEFT_CORNER_START_HIGHLIGHT_RTL : Blockly.BlockSvg.TOP_LEFT_CORNER_START_HIGHLIGHT_LTR), a.push(Blockly.BlockSvg.TOP_LEFT_CORNER), b.push(Blockly.BlockSvg.TOP_LEFT_CORNER_HIGHLIGHT));
+	this.previousConnection && (a.push("H", Blockly.BlockSvg.NOTCH_WIDTH - 15), b.push("H", Blockly.BlockSvg.NOTCH_WIDTH - 15), a.push(Blockly.BlockSvg.NOTCH_PATH_LEFT), b.push(Blockly.BlockSvg.NOTCH_PATH_LEFT_HIGHLIGHT), this.previousConnection.setOffsetInBlock(this.RTL ? -Blockly.BlockSvg.NOTCH_WIDTH : Blockly.BlockSvg.NOTCH_WIDTH, 0));
+	a.push("H", c);
+	b.push("H", c - .5);
+	this.width = c
+};
+Blockly.BlockSvg.prototype.renderDrawRight_ = function (a, b, c, d, e, f) {
+	for (var g, h = 0, k, m, p = 0, l; l = e[p]; p++) {
+		g = Blockly.BlockSvg.SEP_SPACE_X;
+		0 == p && (g += this.RTL ? -f : f);
+		b.push("M", e.rightEdge - .5 + "," + (h + .5));
+		if (this.isCollapsed()) {
+			var n = l[0];
+			k = h;
+			this.renderFields_(n.fieldRow, g, k);
+			a.push(Blockly.BlockSvg.JAGGED_TEETH);
+			b.push("h 8");
+			n = l.height - Blockly.BlockSvg.JAGGED_TEETH_HEIGHT;
+			a.push("v", n);
+			this.RTL && (b.push("v 3.9 l 7.2,3.4 m -14.5,8.9 l 7.3,3.5"), b.push("v", n - .7));
+			this.width += Blockly.BlockSvg.JAGGED_TEETH_WIDTH
+		} else if (l.type ==
+			Blockly.BlockSvg.INLINE) {
+			for (var q = 0; n = l[q]; q++) k = h, l.thicker && (k += Blockly.BlockSvg.INLINE_PADDING_Y), g = this.renderFields_(n.fieldRow, g, k), n.type != Blockly.DUMMY_INPUT && (g += n.renderWidth + Blockly.BlockSvg.SEP_SPACE_X), n.type == Blockly.INPUT_VALUE && (c.push("M", g - Blockly.BlockSvg.SEP_SPACE_X + "," + (h + Blockly.BlockSvg.INLINE_PADDING_Y)), c.push("h", Blockly.BlockSvg.TAB_WIDTH - 2 - n.renderWidth), c.push(Blockly.BlockSvg.TAB_PATH_DOWN), c.push("v", n.renderHeight + 1 - Blockly.BlockSvg.TAB_HEIGHT), c.push("h", n.renderWidth +
+				2 - Blockly.BlockSvg.TAB_WIDTH), c.push("z"), this.RTL ? (d.push("M", g - Blockly.BlockSvg.SEP_SPACE_X - 2.5 + Blockly.BlockSvg.TAB_WIDTH - n.renderWidth + "," + (h + Blockly.BlockSvg.INLINE_PADDING_Y + .5)), d.push(Blockly.BlockSvg.TAB_PATH_DOWN_HIGHLIGHT_RTL), d.push("v", n.renderHeight - Blockly.BlockSvg.TAB_HEIGHT + 2.5), d.push("h", n.renderWidth - Blockly.BlockSvg.TAB_WIDTH + 2)) : (d.push("M", g - Blockly.BlockSvg.SEP_SPACE_X + .5 + "," + (h + Blockly.BlockSvg.INLINE_PADDING_Y + .5)), d.push("v", n.renderHeight + 1), d.push("h", Blockly.BlockSvg.TAB_WIDTH -
+				2 - n.renderWidth), d.push("M", g - n.renderWidth - Blockly.BlockSvg.SEP_SPACE_X + .9 + "," + (h + Blockly.BlockSvg.INLINE_PADDING_Y + Blockly.BlockSvg.TAB_HEIGHT - .7)), d.push("l", .46 * Blockly.BlockSvg.TAB_WIDTH + ",-2.1")), k = this.RTL ? -g - Blockly.BlockSvg.TAB_WIDTH + Blockly.BlockSvg.SEP_SPACE_X + n.renderWidth + 1 : g + Blockly.BlockSvg.TAB_WIDTH - Blockly.BlockSvg.SEP_SPACE_X - n.renderWidth - 1, m = h + Blockly.BlockSvg.INLINE_PADDING_Y + 1, n.connection.setOffsetInBlock(k, m));
+			g = Math.max(g, e.rightEdge);
+			this.width = Math.max(this.width, g);
+			a.push("H",
+				g);
+			b.push("H", g - .5);
+			a.push("v", l.height);
+			this.RTL && b.push("v", l.height - 1)
+		} else l.type == Blockly.INPUT_VALUE ? (n = l[0], k = h, n.align != Blockly.ALIGN_LEFT && (q = e.rightEdge - n.fieldWidth - Blockly.BlockSvg.TAB_WIDTH - 2 * Blockly.BlockSvg.SEP_SPACE_X, n.align == Blockly.ALIGN_RIGHT ? g += q : n.align == Blockly.ALIGN_CENTRE && (g += q / 2)), this.renderFields_(n.fieldRow, g, k), a.push(Blockly.BlockSvg.TAB_PATH_DOWN), q = l.height - Blockly.BlockSvg.TAB_HEIGHT, a.push("v", q), this.RTL ? (b.push(Blockly.BlockSvg.TAB_PATH_DOWN_HIGHLIGHT_RTL), b.push("v",
+			q + .5)) : (b.push("M", e.rightEdge - 5 + "," + (h + Blockly.BlockSvg.TAB_HEIGHT - .7)), b.push("l", .46 * Blockly.BlockSvg.TAB_WIDTH + ",-2.1")), k = this.RTL ? -e.rightEdge - 1 : e.rightEdge + 1, n.connection.setOffsetInBlock(k, h), n.connection.isConnected() && (this.width = Math.max(this.width, e.rightEdge + n.connection.targetBlock().getHeightWidth().width - Blockly.BlockSvg.TAB_WIDTH + 1))) : l.type == Blockly.DUMMY_INPUT ? (n = l[0], k = h, n.align != Blockly.ALIGN_LEFT && (q = e.rightEdge - n.fieldWidth - 2 * Blockly.BlockSvg.SEP_SPACE_X, e.hasValue && (q -= Blockly.BlockSvg.TAB_WIDTH),
+			n.align == Blockly.ALIGN_RIGHT ? g += q : n.align == Blockly.ALIGN_CENTRE && (g += q / 2)), this.renderFields_(n.fieldRow, g, k), a.push("v", l.height), this.RTL && b.push("v", l.height - 1)) : l.type == Blockly.NEXT_STATEMENT && (n = l[0], 0 == p && (a.push("v", Blockly.BlockSvg.SEP_SPACE_Y), this.RTL && b.push("v", Blockly.BlockSvg.SEP_SPACE_Y - 1), h += Blockly.BlockSvg.SEP_SPACE_Y), k = h, n.align != Blockly.ALIGN_LEFT && (q = e.statementEdge - n.fieldWidth - 2 * Blockly.BlockSvg.SEP_SPACE_X, n.align == Blockly.ALIGN_RIGHT ? g += q : n.align == Blockly.ALIGN_CENTRE && (g +=
+				q / 2)), this.renderFields_(n.fieldRow, g, k), g = e.statementEdge + Blockly.BlockSvg.NOTCH_WIDTH, a.push("H", g), a.push(Blockly.BlockSvg.INNER_TOP_LEFT_CORNER), a.push("v", l.height - 2 * Blockly.BlockSvg.CORNER_RADIUS), a.push(Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER), a.push("H", e.rightEdge), this.RTL ? (b.push("M", g - Blockly.BlockSvg.NOTCH_WIDTH + Blockly.BlockSvg.DISTANCE_45_OUTSIDE + "," + (h + Blockly.BlockSvg.DISTANCE_45_OUTSIDE)), b.push(Blockly.BlockSvg.INNER_TOP_LEFT_CORNER_HIGHLIGHT_RTL), b.push("v", l.height - 2 * Blockly.BlockSvg.CORNER_RADIUS),
+				b.push(Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER_HIGHLIGHT_RTL)) : (b.push("M", g - Blockly.BlockSvg.NOTCH_WIDTH + Blockly.BlockSvg.DISTANCE_45_OUTSIDE + "," + (h + l.height - Blockly.BlockSvg.DISTANCE_45_OUTSIDE)), b.push(Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER_HIGHLIGHT_LTR)), b.push("H", e.rightEdge - .5), k = this.RTL ? -g : g + 1, n.connection.setOffsetInBlock(k, h + 1), n.connection.isConnected() && (this.width = Math.max(this.width, e.statementEdge + n.connection.targetBlock().getHeightWidth().width)), p == e.length - 1 || e[p + 1].type ==
+			Blockly.NEXT_STATEMENT) && (a.push("v", Blockly.BlockSvg.SEP_SPACE_Y), this.RTL && b.push("v", Blockly.BlockSvg.SEP_SPACE_Y - 1), h += Blockly.BlockSvg.SEP_SPACE_Y);
+		h += l.height
+	}
+	e.length || (h = Blockly.BlockSvg.MIN_BLOCK_Y, a.push("V", h), this.RTL && b.push("V", h - 1));
+	return h
+};
+Blockly.BlockSvg.prototype.renderDrawBottom_ = function (a, b, c) {
+	this.height += c + 1;
+	this.nextConnection && (a.push("H", Blockly.BlockSvg.NOTCH_WIDTH + (this.RTL ? .5 : -.5) + " " + Blockly.BlockSvg.NOTCH_PATH_RIGHT), this.nextConnection.setOffsetInBlock(this.RTL ? -Blockly.BlockSvg.NOTCH_WIDTH : Blockly.BlockSvg.NOTCH_WIDTH, c + 1), this.height += 4);
+	this.squareBottomLeftCorner_ ? (a.push("H 0"), this.RTL || b.push("M", "0.5," + (c - .5))) : (a.push("H", Blockly.BlockSvg.CORNER_RADIUS), a.push("a", Blockly.BlockSvg.CORNER_RADIUS + "," + Blockly.BlockSvg.CORNER_RADIUS +
+		" 0 0,1 -" + Blockly.BlockSvg.CORNER_RADIUS + ",-" + Blockly.BlockSvg.CORNER_RADIUS), this.RTL || (b.push("M", Blockly.BlockSvg.DISTANCE_45_INSIDE + "," + (c - Blockly.BlockSvg.DISTANCE_45_INSIDE)), b.push("A", Blockly.BlockSvg.CORNER_RADIUS - .5 + "," + (Blockly.BlockSvg.CORNER_RADIUS - .5) + " 0 0,1 0.5," + (c - Blockly.BlockSvg.CORNER_RADIUS))))
+};
+Blockly.BlockSvg.prototype.renderDrawLeft_ = function (a, b) {
+	this.outputConnection ? (this.outputConnection.setOffsetInBlock(0, 0), a.push("V", Blockly.BlockSvg.TAB_HEIGHT), a.push("c 0,-10 -" + Blockly.BlockSvg.TAB_WIDTH + ",8 -" + Blockly.BlockSvg.TAB_WIDTH + ",-7.5 s " + Blockly.BlockSvg.TAB_WIDTH + ",2.5 " + Blockly.BlockSvg.TAB_WIDTH + ",-7.5"), this.RTL ? (b.push("M", -.25 * Blockly.BlockSvg.TAB_WIDTH + ",8.4"), b.push("l", -.45 * Blockly.BlockSvg.TAB_WIDTH + ",-2.1")) : (b.push("V", Blockly.BlockSvg.TAB_HEIGHT - 1.5), b.push("m", -.92 *
+		Blockly.BlockSvg.TAB_WIDTH + ",-0.5 q " + -.19 * Blockly.BlockSvg.TAB_WIDTH + ",-5.5 0,-11"), b.push("m", .92 * Blockly.BlockSvg.TAB_WIDTH + ",1 V 0.5 H 1")), this.width += Blockly.BlockSvg.TAB_WIDTH) : this.RTL || (this.squareTopLeftCorner_ ? b.push("V", .5) : b.push("V", Blockly.BlockSvg.CORNER_RADIUS));
+	a.push("z")
+};
+Blockly.Events = {};
+Blockly.Events.group_ = "";
+Blockly.Events.recordUndo = !0;
+Blockly.Events.disabled_ = 0;
+Blockly.Events.CREATE = "create";
+Blockly.Events.DELETE = "delete";
+Blockly.Events.CHANGE = "change";
+Blockly.Events.MOVE = "move";
+Blockly.Events.UI = "ui";
+Blockly.Events.FIRE_QUEUE_ = [];
+Blockly.Events.fire = function (a) {
+	Blockly.Events.isEnabled() && (Blockly.Events.FIRE_QUEUE_.length || setTimeout(Blockly.Events.fireNow_, 0), Blockly.Events.FIRE_QUEUE_.push(a))
+};
+Blockly.Events.fireNow_ = function () {
+	for (var a = Blockly.Events.filter(Blockly.Events.FIRE_QUEUE_, !0), b = Blockly.Events.FIRE_QUEUE_.length = 0, c; c = a[b]; b++) {
+		var d = Blockly.Workspace.getById(c.workspaceId);
+		d && d.fireChangeListener(c)
+	}
+};
+Blockly.Events.filter = function (a, b) {
+	var c = goog.array.clone(a);
+	b || c.reverse();
+	for (var d = 0, e; e = c[d]; d++)
+		for (var f = d + 1, g; g = c[f]; f++) e.type == g.type && e.blockId == g.blockId && e.workspaceId == g.workspaceId && (e.type == Blockly.Events.MOVE ? (e.newParentId = g.newParentId, e.newInputName = g.newInputName, e.newCoordinate = g.newCoordinate, c.splice(f, 1), f--) : e.type == Blockly.Events.CHANGE && e.element == g.element && e.name == g.name ? (e.newValue = g.newValue, c.splice(f, 1), f--) : e.type != Blockly.Events.UI || "click" != g.element || "commentOpen" !=
+			e.element && "mutatorOpen" != e.element && "warningOpen" != e.element || (e.newValue = g.newValue, c.splice(f, 1), f--));
+	for (d = c.length - 1; 0 <= d; d--) c[d].isNull() && c.splice(d, 1);
+	b || c.reverse();
+	for (d = 1; e = c[d]; d++) e.type == Blockly.Events.CHANGE && "mutation" == e.element && c.unshift(c.splice(d, 1)[0]);
+	return c
+};
+Blockly.Events.clearPendingUndo = function () {
+	for (var a = 0, b; b = Blockly.Events.FIRE_QUEUE_[a]; a++) b.recordUndo = !1
+};
+Blockly.Events.disable = function () {
+	Blockly.Events.disabled_++
+};
+Blockly.Events.enable = function () {
+	Blockly.Events.disabled_--
+};
+Blockly.Events.isEnabled = function () {
+	return 0 == Blockly.Events.disabled_
+};
+Blockly.Events.getGroup = function () {
+	return Blockly.Events.group_
+};
+Blockly.Events.setGroup = function (a) {
+	Blockly.Events.group_ = "boolean" == typeof a ? a ? Blockly.genUid() : "" : a
+};
+Blockly.Events.getDescendantIds_ = function (a) {
+	var b = [];
+	a = a.getDescendants();
+	for (var c = 0, d; d = a[c]; c++) b[c] = d.id;
+	return b
+};
+Blockly.Events.fromJson = function (a, b) {
+	var c;
+	switch (a.type) {
+		case Blockly.Events.CREATE:
+			c = new Blockly.Events.Create(null);
+			break;
+		case Blockly.Events.DELETE:
+			c = new Blockly.Events.Delete(null);
+			break;
+		case Blockly.Events.CHANGE:
+			c = new Blockly.Events.Change(null);
+			break;
+		case Blockly.Events.MOVE:
+			c = new Blockly.Events.Move(null);
+			break;
+		case Blockly.Events.UI:
+			c = new Blockly.Events.Ui(null);
+			break;
+		default:
+			throw "Unknown event type.";
+	}
+	c.fromJson(a);
+	c.workspaceId = b.id;
+	return c
+};
+Blockly.Events.Abstract = function (a) {
+	a && (this.blockId = a.id, this.workspaceId = a.workspace.id);
+	this.group = Blockly.Events.group_;
+	this.recordUndo = Blockly.Events.recordUndo
+};
+Blockly.Events.Abstract.prototype.toJson = function () {
+	var a = {
+		type: this.type
+	};
+	this.blockId && (a.blockId = this.blockId);
+	this.group && (a.group = this.group);
+	return a
+};
+Blockly.Events.Abstract.prototype.fromJson = function (a) {
+	this.blockId = a.blockId;
+	this.group = a.group
+};
+Blockly.Events.Abstract.prototype.isNull = function () {
+	return !1
+};
+Blockly.Events.Abstract.prototype.run = function (a) { };
+Blockly.Events.Create = function (a) {
+	a && (Blockly.Events.Create.superClass_.constructor.call(this, a), this.xml = Blockly.Xml.blockToDomWithXY(a), this.ids = Blockly.Events.getDescendantIds_(a))
+};
+goog.inherits(Blockly.Events.Create, Blockly.Events.Abstract);
+Blockly.Events.Create.prototype.type = Blockly.Events.CREATE;
+Blockly.Events.Create.prototype.toJson = function () {
+	var a = Blockly.Events.Create.superClass_.toJson.call(this);
+	a.xml = Blockly.Xml.domToText(this.xml);
+	a.ids = this.ids;
+	return a
+};
+Blockly.Events.Create.prototype.fromJson = function (a) {
+	Blockly.Events.Create.superClass_.fromJson.call(this, a);
+	this.xml = Blockly.Xml.textToDom("<xml>" + a.xml + "</xml>").firstChild;
+	this.ids = a.ids
+};
+Blockly.Events.Create.prototype.run = function (a) {
+	var b = Blockly.Workspace.getById(this.workspaceId);
+	if (a) a = goog.dom.createDom("xml"), a.appendChild(this.xml), Blockly.Xml.domToWorkspace(a, b);
+	else {
+		a = 0;
+		for (var c; c = this.ids[a]; a++) {
+			var d = b.getBlockById(c);
+			d ? d.dispose(!1, !1) : c == this.blockId && console.warn("Can't uncreate non-existant block: " + c)
+		}
+	}
+};
+Blockly.Events.Delete = function (a) {
+	if (a) {
+		if (a.getParent()) throw "Connected blocks cannot be deleted.";
+		Blockly.Events.Delete.superClass_.constructor.call(this, a);
+		this.oldXml = Blockly.Xml.blockToDomWithXY(a);
+		this.ids = Blockly.Events.getDescendantIds_(a)
+	}
+};
+goog.inherits(Blockly.Events.Delete, Blockly.Events.Abstract);
+Blockly.Events.Delete.prototype.type = Blockly.Events.DELETE;
+Blockly.Events.Delete.prototype.toJson = function () {
+	var a = Blockly.Events.Delete.superClass_.toJson.call(this);
+	a.ids = this.ids;
+	return a
+};
+Blockly.Events.Delete.prototype.fromJson = function (a) {
+	Blockly.Events.Delete.superClass_.fromJson.call(this, a);
+	this.ids = a.ids
+};
+Blockly.Events.Delete.prototype.run = function (a) {
+	var b = Blockly.Workspace.getById(this.workspaceId);
+	if (a) {
+		a = 0;
+		for (var c; c = this.ids[a]; a++) {
+			var d = b.getBlockById(c);
+			d ? d.dispose(!1, !1) : c == this.blockId && console.warn("Can't delete non-existant block: " + c)
+		}
+	} else a = goog.dom.createDom("xml"), a.appendChild(this.oldXml), Blockly.Xml.domToWorkspace(a, b)
+};
+Blockly.Events.Change = function (a, b, c, d, e) {
+	a && (Blockly.Events.Change.superClass_.constructor.call(this, a), this.element = b, this.name = c, this.oldValue = d, this.newValue = e)
+};
+goog.inherits(Blockly.Events.Change, Blockly.Events.Abstract);
+Blockly.Events.Change.prototype.type = Blockly.Events.CHANGE;
+Blockly.Events.Change.prototype.toJson = function () {
+	var a = Blockly.Events.Change.superClass_.toJson.call(this);
+	a.element = this.element;
+	this.name && (a.name = this.name);
+	a.newValue = this.newValue;
+	return a
+};
+Blockly.Events.Change.prototype.fromJson = function (a) {
+	Blockly.Events.Change.superClass_.fromJson.call(this, a);
+	this.element = a.element;
+	this.name = a.name;
+	this.newValue = a.newValue
+};
+Blockly.Events.Change.prototype.isNull = function () {
+	return this.oldValue == this.newValue
+};
+Blockly.Events.Change.prototype.run = function (a) {
+	var b = Blockly.Workspace.getById(this.workspaceId).getBlockById(this.blockId);
+	if (b) switch (b.mutator && b.mutator.setVisible(!1), a = a ? this.newValue : this.oldValue, this.element) {
+		case "field":
+			(b = b.getField(this.name)) ? (b.callValidator(a), b.setValue(a)) : console.warn("Can't set non-existant field: " + this.name);
+			break;
+		case "comment":
+			b.setCommentText(a || null);
+			break;
+		case "collapsed":
+			b.setCollapsed(a);
+			break;
+		case "disabled":
+			b.setDisabled(a);
+			break;
+		case "inline":
+			b.setInputsInline(a);
+			break;
+		case "mutation":
+			var c = "";
+			b.mutationToDom && (c = (c = b.mutationToDom()) && Blockly.Xml.domToText(c));
+			if (b.domToMutation) {
+				a = a || "<mutation></mutation>";
+				var d = Blockly.Xml.textToDom("<xml>" + a + "</xml>");
+				b.domToMutation(d.firstChild)
+			}
+			Blockly.Events.fire(new Blockly.Events.Change(b, "mutation", null, c, a));
+			break;
+		default:
+			console.warn("Unknown change type: " + this.element)
+	} else console.warn("Can't change non-existant block: " + this.blockId)
+};
+Blockly.Events.Move = function (a) {
+	a && (Blockly.Events.Move.superClass_.constructor.call(this, a), a = this.currentLocation_(), this.oldParentId = a.parentId, this.oldInputName = a.inputName, this.oldCoordinate = a.coordinate)
+};
+goog.inherits(Blockly.Events.Move, Blockly.Events.Abstract);
+Blockly.Events.Move.prototype.type = Blockly.Events.MOVE;
+Blockly.Events.Move.prototype.toJson = function () {
+	var a = Blockly.Events.Move.superClass_.toJson.call(this);
+	this.newParentId && (a.newParentId = this.newParentId);
+	this.newInputName && (a.newInputName = this.newInputName);
+	this.newCoordinate && (a.newCoordinate = Math.round(this.newCoordinate.x) + "," + Math.round(this.newCoordinate.y));
+	return a
+};
+Blockly.Events.Move.prototype.fromJson = function (a) {
+	Blockly.Events.Move.superClass_.fromJson.call(this, a);
+	this.newParentId = a.newParentId;
+	this.newInputName = a.newInputName;
+	a.newCoordinate && (a = a.newCoordinate.split(","), this.newCoordinate = new goog.math.Coordinate(parseFloat(a[0]), parseFloat(a[1])))
+};
+Blockly.Events.Move.prototype.recordNew = function () {
+	var a = this.currentLocation_();
+	this.newParentId = a.parentId;
+	this.newInputName = a.inputName;
+	this.newCoordinate = a.coordinate
+};
+Blockly.Events.Move.prototype.currentLocation_ = function () {
+	var a = Blockly.Workspace.getById(this.workspaceId).getBlockById(this.blockId),
+		b = {},
+		c = a.getParent();
+	if (c) {
+		if (b.parentId = c.id, a = c.getInputWithBlock(a)) b.inputName = a.name
+	} else b.coordinate = a.getRelativeToSurfaceXY();
+	return b
+};
+Blockly.Events.Move.prototype.isNull = function () {
+	return this.oldParentId == this.newParentId && this.oldInputName == this.newInputName && goog.math.Coordinate.equals(this.oldCoordinate, this.newCoordinate)
+};
+Blockly.Events.Move.prototype.run = function (a) {
+	var b = Blockly.Workspace.getById(this.workspaceId),
+		c = b.getBlockById(this.blockId);
+	if (c) {
+		var d = a ? this.newParentId : this.oldParentId,
+			e = a ? this.newInputName : this.oldInputName;
+		a = a ? this.newCoordinate : this.oldCoordinate;
+		var f = null;
+		if (d && (f = b.getBlockById(d), !f)) {
+			console.warn("Can't connect to non-existant block: " + d);
+			return
+		}
+		c.getParent() && c.unplug();
+		if (a) e = c.getRelativeToSurfaceXY(), c.moveBy(a.x - e.x, a.y - e.y);
+		else {
+			var c = c.outputConnection || c.previousConnection,
+				g;
+			if (e) {
+				if (b = f.getInput(e)) g = b.connection
+			} else c.type == Blockly.PREVIOUS_STATEMENT && (g = f.nextConnection);
+			g ? c.connect(g) : console.warn("Can't connect to non-existant input: " + e)
+		}
+	} else console.warn("Can't move non-existant block: " + this.blockId)
+};
+Blockly.Events.Ui = function (a, b, c, d) {
+	Blockly.Events.Ui.superClass_.constructor.call(this, a);
+	this.element = b;
+	this.oldValue = c;
+	this.newValue = d;
+	this.recordUndo = !1
+};
+goog.inherits(Blockly.Events.Ui, Blockly.Events.Abstract);
+Blockly.Events.Ui.prototype.type = Blockly.Events.UI;
+Blockly.Events.Ui.prototype.toJson = function () {
+	var a = Blockly.Events.Ui.superClass_.toJson.call(this);
+	a.element = this.element;
+	void 0 !== this.newValue && (a.newValue = this.newValue);
+	return a
+};
+Blockly.Events.Ui.prototype.fromJson = function (a) {
+	Blockly.Events.Ui.superClass_.fromJson.call(this, a);
+	this.element = a.element;
+	this.newValue = a.newValue
+};
+Blockly.Events.disableOrphans = function (a) {
+	if (a.type == Blockly.Events.MOVE || a.type == Blockly.Events.CREATE) {
+		Blockly.Events.disable();
+		if (a = Blockly.Workspace.getById(a.workspaceId).getBlockById(a.blockId))
+			if (a.getParent() && !a.getParent().disabled) {
+				a = a.getDescendants();
+				for (var b = 0, c; c = a[b]; b++) c.setDisabled(!1)
+			} else if ((a.outputConnection || a.previousConnection) && Blockly.dragMode_ == Blockly.DRAG_NONE) {
+				do a.setDisabled(!0), a = a.getNextBlock(); while (a)
+			}
+		Blockly.Events.enable()
+	}
+};
+Blockly.Msg = {};
+goog.getMsgOrig = goog.getMsg;
+goog.getMsg = function (a, b) {
+	var c = goog.getMsg.blocklyMsgMap[a];
+	c && (a = Blockly.Msg[c]);
+	return goog.getMsgOrig(a, b)
+};
+goog.getMsg.blocklyMsgMap = {
+	Today: "TODAY"
+};
+Blockly.FieldTextInput = function (a, b) {
+	Blockly.FieldTextInput.superClass_.constructor.call(this, a, b)
+};
+goog.inherits(Blockly.FieldTextInput, Blockly.Field);
+Blockly.FieldTextInput.FONTSIZE = 11;
+Blockly.FieldTextInput.prototype.CURSOR = "text";
+Blockly.FieldTextInput.prototype.spellcheck_ = !0;
+Blockly.FieldTextInput.prototype.dispose = function () {
+	Blockly.WidgetDiv.hideIfOwner(this);
+	Blockly.FieldTextInput.superClass_.dispose.call(this)
+};
+Blockly.FieldTextInput.prototype.setValue = function (a) {
+	if (null !== a) {
+		if (this.sourceBlock_) {
+			var b = this.callValidator(a);
+			null !== b && (a = b)
+		}
+		Blockly.Field.prototype.setValue.call(this, a)
+	}
+};
+Blockly.FieldTextInput.prototype.setSpellcheck = function (a) {
+	this.spellcheck_ = a
+};
+Blockly.FieldTextInput.prototype.showEditor_ = function (a) {
+	this.workspace_ = this.sourceBlock_.workspace;
+	a = a || !1;
+	if (!a && (goog.userAgent.MOBILE || goog.userAgent.ANDROID || goog.userAgent.IPAD)) {
+		var b = this;
+		Blockly.prompt(Blockly.Msg.CHANGE_VALUE_TITLE, this.text_, function (a) {
+			b.sourceBlock_ && (a = b.callValidator(a));
+			b.setValue(a)
+		})
+	} else {
+		Blockly.WidgetDiv.show(this, this.sourceBlock_.RTL, this.widgetDispose_());
+		var c = Blockly.WidgetDiv.DIV,
+			d = goog.dom.createDom("INPUT", "blocklyHtmlInput");
+		d.setAttribute("spellcheck",
+			this.spellcheck_);
+		var e = Blockly.FieldTextInput.FONTSIZE * this.workspace_.scale + "pt";
+		c.style.fontSize = e;
+		d.style.fontSize = e;
+		Blockly.FieldTextInput.htmlInput_ = d;
+		c.appendChild(d);
+		d.value = d.defaultValue = this.text_;
+		d.oldValue_ = null;
+		this.validate_();
+		this.resizeEditor_();
+		a || (d.focus(), d.select());
+		d.onKeyDownWrapper_ = Blockly.bindEventWithChecks_(d, "keydown", this, this.onHtmlInputKeyDown_);
+		d.onKeyUpWrapper_ = Blockly.bindEventWithChecks_(d, "keyup", this, this.onHtmlInputChange_);
+		d.onKeyPressWrapper_ = Blockly.bindEventWithChecks_(d,
+			"keypress", this, this.onHtmlInputChange_);
+		d.onWorkspaceChangeWrapper_ = this.resizeEditor_.bind(this);
+		this.workspace_.addChangeListener(d.onWorkspaceChangeWrapper_)
+	}
+};
+Blockly.FieldTextInput.prototype.onHtmlInputKeyDown_ = function (a) {
+	var b = Blockly.FieldTextInput.htmlInput_;
+	13 == a.keyCode ? Blockly.WidgetDiv.hide() : 27 == a.keyCode ? (b.value = b.defaultValue, Blockly.WidgetDiv.hide()) : 9 == a.keyCode && (Blockly.WidgetDiv.hide(), this.sourceBlock_.tab(this, !a.shiftKey), a.preventDefault())
+};
+Blockly.FieldTextInput.prototype.onHtmlInputChange_ = function (a) {
+	a = Blockly.FieldTextInput.htmlInput_;
+	var b = a.value;
+	b !== a.oldValue_ ? (a.oldValue_ = b, this.setValue(b), this.validate_()) : goog.userAgent.WEBKIT && this.sourceBlock_.render();
+	this.resizeEditor_();
+	Blockly.svgResize(this.sourceBlock_.workspace)
+};
+Blockly.FieldTextInput.prototype.validate_ = function () {
+	var a = !0;
+	goog.asserts.assertObject(Blockly.FieldTextInput.htmlInput_);
+	var b = Blockly.FieldTextInput.htmlInput_;
+	this.sourceBlock_ && (a = this.callValidator(b.value));
+	null === a ? Blockly.addClass_(b, "blocklyInvalidInput") : Blockly.removeClass_(b, "blocklyInvalidInput")
+};
+Blockly.FieldTextInput.prototype.resizeEditor_ = function () {
+	var a = Blockly.WidgetDiv.DIV,
+		b = this.fieldGroup_.getBBox();
+	a.style.width = b.width * this.workspace_.scale + "px";
+	a.style.height = b.height * this.workspace_.scale + "px";
+	b = this.getAbsoluteXY_();
+	if (this.sourceBlock_.RTL) {
+		var c = this.getScaledBBox_();
+		b.x += c.width;
+		b.x -= a.offsetWidth
+	}
+	b.y += 1;
+	goog.userAgent.GECKO && Blockly.WidgetDiv.DIV.style.top && (--b.x, --b.y);
+	goog.userAgent.WEBKIT && (b.y -= 3);
+	a.style.left = b.x + "px";
+	a.style.top = b.y + "px"
+};
+Blockly.FieldTextInput.prototype.widgetDispose_ = function () {
+	var a = this;
+	return function () {
+		var b = Blockly.FieldTextInput.htmlInput_,
+			c = b.value;
+		if (a.sourceBlock_)
+			if (c = a.callValidator(c), null === c) c = b.defaultValue;
+			else if (a.onFinishEditing_) a.onFinishEditing_(c);
+		a.setValue(c);
+		a.sourceBlock_.rendered && a.sourceBlock_.render();
+		Blockly.unbindEvent_(b.onKeyDownWrapper_);
+		Blockly.unbindEvent_(b.onKeyUpWrapper_);
+		Blockly.unbindEvent_(b.onKeyPressWrapper_);
+		a.workspace_.removeChangeListener(b.onWorkspaceChangeWrapper_);
+		Blockly.FieldTextInput.htmlInput_ = null;
+		b = Blockly.WidgetDiv.DIV.style;
+		b.width = "auto";
+		b.height = "auto";
+		b.fontSize = ""
+	}
+};
+Blockly.FieldTextInput.numberValidator = function (a) {
+	console.warn("Blockly.FieldTextInput.numberValidator is deprecated. Use Blockly.FieldNumber instead.");
+	if (null === a) return null;
+	a = String(a);
+	a = a.replace(/O/ig, "0");
+	a = a.replace(/,/g, "");
+	a = parseFloat(a || 0);
+	return isNaN(a) ? null : String(a)
+};
+Blockly.FieldTextInput.nonnegativeIntegerValidator = function (a) {
+	(a = Blockly.FieldTextInput.numberValidator(a)) && (a = String(Math.max(0, Math.floor(a))));
+	return a
+};
+Blockly.FieldAngle = function (a, b) {
+	this.symbol_ = Blockly.createSvgElement("tspan", {}, null);
+	this.symbol_.appendChild(document.createTextNode("\u00b0"));
+	Blockly.FieldAngle.superClass_.constructor.call(this, a, b)
+};
+goog.inherits(Blockly.FieldAngle, Blockly.FieldTextInput);
+Blockly.FieldAngle.ROUND = 15;
+Blockly.FieldAngle.HALF = 50;
+Blockly.FieldAngle.CLOCKWISE = !1;
+Blockly.FieldAngle.OFFSET = 0;
+Blockly.FieldAngle.WRAP = 360;
+Blockly.FieldAngle.RADIUS = Blockly.FieldAngle.HALF - 1;
+Blockly.FieldAngle.prototype.dispose_ = function () {
+	var a = this;
+	return function () {
+		Blockly.FieldAngle.superClass_.dispose_.call(a)();
+		a.gauge_ = null;
+		a.clickWrapper_ && Blockly.unbindEvent_(a.clickWrapper_);
+		a.moveWrapper1_ && Blockly.unbindEvent_(a.moveWrapper1_);
+		a.moveWrapper2_ && Blockly.unbindEvent_(a.moveWrapper2_)
+	}
+};
+Blockly.FieldAngle.prototype.showEditor_ = function () {
+	Blockly.FieldAngle.superClass_.showEditor_.call(this, goog.userAgent.MOBILE || goog.userAgent.ANDROID || goog.userAgent.IPAD);
+	var a = Blockly.WidgetDiv.DIV;
+	if (a.firstChild) {
+		var a = Blockly.createSvgElement("svg", {
+			xmlns: "http://www.w3.org/2000/svg",
+			"xmlns:html": "http://www.w3.org/1999/xhtml",
+			"xmlns:xlink": "http://www.w3.org/1999/xlink",
+			version: "1.1",
+			height: 2 * Blockly.FieldAngle.HALF + "px",
+			width: 2 * Blockly.FieldAngle.HALF + "px"
+		}, a),
+			b = Blockly.createSvgElement("circle", {
+            	cx: Blockly.FieldAngle.HALF,
+            	cy: Blockly.FieldAngle.HALF,
+            	r: Blockly.FieldAngle.RADIUS,
+            	"class": "blocklyAngleCircle"
+			}, a);
+		this.gauge_ = Blockly.createSvgElement("path", {
+			"class": "blocklyAngleGauge"
+		}, a);
+		this.line_ = Blockly.createSvgElement("line", {
+			x1: Blockly.FieldAngle.HALF,
+			y1: Blockly.FieldAngle.HALF,
+			"class": "blocklyAngleLine"
+		}, a);
+		for (var c = 0; 360 > c; c += 15) Blockly.createSvgElement("line", {
+			x1: Blockly.FieldAngle.HALF + Blockly.FieldAngle.RADIUS,
+			y1: Blockly.FieldAngle.HALF,
+			x2: Blockly.FieldAngle.HALF + Blockly.FieldAngle.RADIUS -
+				(0 == c % 45 ? 10 : 5),
+			y2: Blockly.FieldAngle.HALF,
+			"class": "blocklyAngleMarks",
+			transform: "rotate(" + c + "," + Blockly.FieldAngle.HALF + "," + Blockly.FieldAngle.HALF + ")"
+		}, a);
+		a.style.marginLeft = 15 - Blockly.FieldAngle.RADIUS + "px";
+		this.clickWrapper_ = Blockly.bindEvent_(a, "click", this, Blockly.WidgetDiv.hide);
+		this.moveWrapper1_ = Blockly.bindEvent_(b, "mousemove", this, this.onMouseMove);
+		this.moveWrapper2_ = Blockly.bindEvent_(this.gauge_, "mousemove", this, this.onMouseMove);
+		this.updateGraph_()
+	}
+};
+Blockly.FieldAngle.prototype.onMouseMove = function (a) {
+	var b = this.gauge_.ownerSVGElement.getBoundingClientRect(),
+		c = a.clientX - b.left - Blockly.FieldAngle.HALF;
+	a = a.clientY - b.top - Blockly.FieldAngle.HALF;
+	b = Math.atan(-a / c);
+	isNaN(b) || (b = goog.math.toDegrees(b), 0 > c ? b += 180 : 0 < a && (b += 360), b = Blockly.FieldAngle.CLOCKWISE ? Blockly.FieldAngle.OFFSET + 360 - b : b - Blockly.FieldAngle.OFFSET, Blockly.FieldAngle.ROUND && (b = Math.round(b / Blockly.FieldAngle.ROUND) * Blockly.FieldAngle.ROUND), b = this.callValidator(b), Blockly.FieldTextInput.htmlInput_.value =
+		b, this.setValue(b), this.validate_(), this.resizeEditor_())
+};
+Blockly.FieldAngle.prototype.setText = function (a) {
+	Blockly.FieldAngle.superClass_.setText.call(this, a);
+	this.textElement_ && (this.updateGraph_(), this.sourceBlock_.RTL ? this.textElement_.insertBefore(this.symbol_, this.textElement_.firstChild) : this.textElement_.appendChild(this.symbol_), this.size_.width = 0)
+};
+Blockly.FieldAngle.prototype.updateGraph_ = function () {
+	if (this.gauge_) {
+		var a = Number(this.getText()) + Blockly.FieldAngle.OFFSET,
+			b = goog.math.toRadians(a),
+			a = ["M ", Blockly.FieldAngle.HALF, ",", Blockly.FieldAngle.HALF],
+			c = Blockly.FieldAngle.HALF,
+			d = Blockly.FieldAngle.HALF;
+		if (!isNaN(b)) {
+			var e = goog.math.toRadians(Blockly.FieldAngle.OFFSET),
+				f = Math.cos(e) * Blockly.FieldAngle.RADIUS,
+				g = Math.sin(e) * -Blockly.FieldAngle.RADIUS;
+			Blockly.FieldAngle.CLOCKWISE && (b = 2 * e - b);
+			c += Math.cos(b) * Blockly.FieldAngle.RADIUS;
+			d -= Math.sin(b) *
+				Blockly.FieldAngle.RADIUS;
+			b = Math.abs(Math.floor((b - e) / Math.PI) % 2);
+			Blockly.FieldAngle.CLOCKWISE && (b = 1 - b);
+			a.push(" l ", f, ",", g, " A ", Blockly.FieldAngle.RADIUS, ",", Blockly.FieldAngle.RADIUS, " 0 ", b, " ", Number(Blockly.FieldAngle.CLOCKWISE), " ", c, ",", d, " z")
+		}
+		this.gauge_.setAttribute("d", a.join(""));
+		this.line_.setAttribute("x2", c);
+		this.line_.setAttribute("y2", d)
+	}
+};
+Blockly.FieldAngle.prototype.classValidator = function (a) {
+	if (null === a) return null;
+	a = parseFloat(a || 0);
+	if (isNaN(a)) return null;
+	a %= 360;
+	0 > a && (a += 360);
+	a > Blockly.FieldAngle.WRAP && (a -= 360);
+	return String(a)
+};
+Blockly.FieldCheckbox = function (a, b) {
+	Blockly.FieldCheckbox.superClass_.constructor.call(this, "", b);
+	this.setValue(a)
+};
+goog.inherits(Blockly.FieldCheckbox, Blockly.Field);
+Blockly.FieldCheckbox.CHECK_CHAR = "\u2713";
+Blockly.FieldCheckbox.prototype.CURSOR = "default";
+Blockly.FieldCheckbox.prototype.init = function () {
+	if (!this.fieldGroup_) {
+		Blockly.FieldCheckbox.superClass_.init.call(this);
+		this.checkElement_ = Blockly.createSvgElement("text", {
+			"class": "blocklyText blocklyCheckbox",
+			x: -3,
+			y: 14
+		}, this.fieldGroup_);
+		var a = document.createTextNode(Blockly.FieldCheckbox.CHECK_CHAR);
+		this.checkElement_.appendChild(a);
+		this.checkElement_.style.display = this.state_ ? "block" : "none"
+	}
+};
+Blockly.FieldCheckbox.prototype.getValue = function () {
+	return String(this.state_).toUpperCase()
+};
+Blockly.FieldCheckbox.prototype.setValue = function (a) {
+	a = "TRUE" == a.toUpperCase();
+	this.state_ !== a && (this.sourceBlock_ && Blockly.Events.isEnabled() && Blockly.Events.fire(new Blockly.Events.Change(this.sourceBlock_, "field", this.name, this.state_, a)), this.state_ = a, this.checkElement_ && (this.checkElement_.style.display = a ? "block" : "none"))
+};
+Blockly.FieldCheckbox.prototype.showEditor_ = function () {
+	var a = !this.state_;
+	this.sourceBlock_ && (a = this.callValidator(a));
+	null !== a && this.setValue(String(a).toUpperCase())
+};
+Blockly.FieldColour = function (a, b) {
+	Blockly.FieldColour.superClass_.constructor.call(this, a, b);
+	this.setText(Blockly.Field.NBSP + Blockly.Field.NBSP + Blockly.Field.NBSP)
+};
+goog.inherits(Blockly.FieldColour, Blockly.Field);
+Blockly.FieldColour.prototype.colours_ = null;
+Blockly.FieldColour.prototype.columns_ = 0;
+Blockly.FieldColour.prototype.init = function () {
+	Blockly.FieldColour.superClass_.init.call(this);
+	this.borderRect_.style.fillOpacity = 1;
+	this.setValue(this.getValue())
+};
+Blockly.FieldColour.prototype.CURSOR = "default";
+Blockly.FieldColour.prototype.dispose = function () {
+	Blockly.WidgetDiv.hideIfOwner(this);
+	Blockly.FieldColour.superClass_.dispose.call(this)
+};
+Blockly.FieldColour.prototype.getValue = function () {
+	return this.colour_
+};
+Blockly.FieldColour.prototype.setValue = function (a) {
+	this.sourceBlock_ && Blockly.Events.isEnabled() && this.colour_ != a && Blockly.Events.fire(new Blockly.Events.Change(this.sourceBlock_, "field", this.name, this.colour_, a));
+	this.colour_ = a;
+	this.borderRect_ && (this.borderRect_.style.fill = a)
+};
+Blockly.FieldColour.prototype.getText = function () {
+	var a = this.colour_,
+		b = a.match(/^#(.)\1(.)\2(.)\3$/);
+	b && (a = "#" + b[1] + b[2] + b[3]);
+	return a
+};
+Blockly.FieldColour.COLOURS = goog.ui.ColorPicker.SIMPLE_GRID_COLORS;
+Blockly.FieldColour.COLUMNS = 7;
+Blockly.FieldColour.prototype.setColours = function (a) {
+	this.colours_ = a;
+	return this
+};
+Blockly.FieldColour.prototype.setColumns = function (a) {
+	this.columns_ = a;
+	return this
+};
+Blockly.FieldColour.prototype.showEditor_ = function () {
+	Blockly.WidgetDiv.show(this, this.sourceBlock_.RTL, Blockly.FieldColour.widgetDispose_);
+	var a = new goog.ui.ColorPicker;
+	a.setSize(this.columns_ || Blockly.FieldColour.COLUMNS);
+	a.setColors(this.colours_ || Blockly.FieldColour.COLOURS);
+	var b = goog.dom.getViewportSize(),
+		c = goog.style.getViewportPageOffset(document),
+		d = this.getAbsoluteXY_(),
+		e = this.getScaledBBox_();
+	a.render(Blockly.WidgetDiv.DIV);
+	a.setSelectedColor(this.getValue());
+	var f = goog.style.getSize(a.getElement());
+	d.y = d.y + f.height + e.height >= b.height + c.y ? d.y - (f.height - 1) : d.y + (e.height - 1);
+	this.sourceBlock_.RTL ? (d.x += e.width, d.x -= f.width, d.x < c.x && (d.x = c.x)) : d.x > b.width + c.x - f.width && (d.x = b.width + c.x - f.width);
+	Blockly.WidgetDiv.position(d.x, d.y, b, c, this.sourceBlock_.RTL);
+	var g = this;
+	Blockly.FieldColour.changeEventKey_ = goog.events.listen(a, goog.ui.ColorPicker.EventType.CHANGE, function (a) {
+		a = a.target.getSelectedColor() || "#000000";
+		Blockly.WidgetDiv.hide();
+		g.sourceBlock_ && (a = g.callValidator(a));
+		null !== a && g.setValue(a)
+	})
+};
+Blockly.FieldColour.widgetDispose_ = function () {
+	Blockly.FieldColour.changeEventKey_ && goog.events.unlistenByKey(Blockly.FieldColour.changeEventKey_)
+};
+Blockly.FieldDropdown = function (a, b) {
+	this.menuGenerator_ = a;
+	this.trimOptions_();
+	var c = this.getOptions_()[0];
+	Blockly.FieldDropdown.superClass_.constructor.call(this, c[1], b)
+};
+goog.inherits(Blockly.FieldDropdown, Blockly.Field);
+Blockly.FieldDropdown.CHECKMARK_OVERHANG = 25;
+Blockly.FieldDropdown.ARROW_CHAR = goog.userAgent.ANDROID ? "\u25bc" : "\u25be";
+Blockly.FieldDropdown.prototype.CURSOR = "default";
+Blockly.FieldDropdown.prototype.value_ = "";
+Blockly.FieldDropdown.prototype.init = function () {
+	if (!this.fieldGroup_) {
+		this.arrow_ = Blockly.createSvgElement("tspan", {}, null);
+		this.arrow_.appendChild(document.createTextNode(this.sourceBlock_.RTL ? Blockly.FieldDropdown.ARROW_CHAR + " " : " " + Blockly.FieldDropdown.ARROW_CHAR));
+		Blockly.FieldDropdown.superClass_.init.call(this);
+		var a = this.text_;
+		this.text_ = null;
+		this.setText(a)
+	}
+};
+Blockly.FieldDropdown.prototype.showEditor_ = function () {
+	Blockly.WidgetDiv.show(this, this.sourceBlock_.RTL, null);
+	var a = this,
+		b = new goog.ui.Menu;
+	b.setRightToLeft(this.sourceBlock_.RTL);
+	for (var c = this.getOptions_(), d = 0; d < c.length; d++) {
+		var e = c[d][1],
+			f = new goog.ui.MenuItem(c[d][0]);
+		f.setRightToLeft(this.sourceBlock_.RTL);
+		f.setValue(e);
+		f.setCheckable(!0);
+		b.addChild(f, !0);
+		f.setChecked(e == this.value_)
+	}
+	goog.events.listen(b, goog.ui.Component.EventType.ACTION, function (b) {
+		if (b = b.target) a.onItemSelected(this, b);
+		Blockly.WidgetDiv.hideIfOwner(a)
+	});
+	b.getHandler().listen(b.getElement(), goog.events.EventType.TOUCHSTART, function (a) {
+		this.getOwnerControl(a.target).handleMouseDown(a)
+	});
+	b.getHandler().listen(b.getElement(), goog.events.EventType.TOUCHEND, function (a) {
+		this.getOwnerControl(a.target).performActionInternal(a)
+	});
+	c = goog.dom.getViewportSize();
+	d = goog.style.getViewportPageOffset(document);
+	e = this.getAbsoluteXY_();
+	f = this.getScaledBBox_();
+	b.render(Blockly.WidgetDiv.DIV);
+	var g = b.getElement();
+	Blockly.addClass_(g,
+		"blocklyDropdownMenu");
+	var h = goog.style.getSize(g);
+	h.height = g.scrollHeight;
+	e.y = e.y + h.height + f.height >= c.height + d.y ? e.y - (h.height + 2) : e.y + f.height;
+	this.sourceBlock_.RTL ? (e.x += f.width, e.x += Blockly.FieldDropdown.CHECKMARK_OVERHANG, e.x < d.x + h.width && (e.x = d.x + h.width)) : (e.x -= Blockly.FieldDropdown.CHECKMARK_OVERHANG, e.x > c.width + d.x - h.width && (e.x = c.width + d.x - h.width));
+	Blockly.WidgetDiv.position(e.x, e.y, c, d, this.sourceBlock_.RTL);
+	b.setAllowAutoFocus(!0);
+	g.focus()
+};
+Blockly.FieldDropdown.prototype.onItemSelected = function (a, b) {
+	var c = b.getValue();
+	this.sourceBlock_ && (c = this.callValidator(c));
+	null !== c && this.setValue(c)
+};
+Blockly.FieldDropdown.prototype.trimOptions_ = function () {
+	this.suffixField = this.prefixField = null;
+	var a = this.menuGenerator_;
+	if (goog.isArray(a) && !(2 > a.length)) {
+		var b = a.map(function (a) {
+			return a[0]
+		}),
+			c = Blockly.shortestStringLength(b),
+			d = Blockly.commonWordPrefix(b, c),
+			e = Blockly.commonWordSuffix(b, c);
+		if ((d || e) && !(c <= d + e)) {
+			d && (this.prefixField = b[0].substring(0, d - 1));
+			e && (this.suffixField = b[0].substr(1 - e));
+			b = [];
+			for (c = 0; c < a.length; c++) {
+				var f = a[c][0],
+					g = a[c][1],
+					f = f.substring(d, f.length - e);
+				b[c] = [f, g]
+			}
+			this.menuGenerator_ =
+				b
+		}
+	}
+};
+Blockly.FieldDropdown.prototype.getOptions_ = function () {
+	return goog.isFunction(this.menuGenerator_) ? this.menuGenerator_.call(this) : this.menuGenerator_
+};
+Blockly.FieldDropdown.prototype.getValue = function () {
+	return this.value_
+};
+Blockly.FieldDropdown.prototype.setValue = function (a) {
+	if (null !== a && a !== this.value_) {
+		this.sourceBlock_ && Blockly.Events.isEnabled() && Blockly.Events.fire(new Blockly.Events.Change(this.sourceBlock_, "field", this.name, this.value_, a));
+		this.value_ = a;
+		for (var b = this.getOptions_(), c = 0; c < b.length; c++)
+			if (b[c][1] == a) {
+				this.setText(b[c][0]);
+				return
+			}
+		this.setText(a)
+	}
+};
+Blockly.FieldDropdown.prototype.setText = function (a) {
+	this.sourceBlock_ && this.arrow_ && (this.arrow_.style.fill = this.sourceBlock_.getColour());
+	null !== a && a !== this.text_ && (this.text_ = a, this.updateTextNode_(), this.textElement_ && (this.sourceBlock_.RTL ? this.textElement_.insertBefore(this.arrow_, this.textElement_.firstChild) : this.textElement_.appendChild(this.arrow_)), this.sourceBlock_ && this.sourceBlock_.rendered && (this.sourceBlock_.render(), this.sourceBlock_.bumpNeighbours_()))
+};
+Blockly.FieldDropdown.prototype.dispose = function () {
+	Blockly.WidgetDiv.hideIfOwner(this);
+	Blockly.FieldDropdown.superClass_.dispose.call(this)
+};
+Blockly.FieldImage = function (a, b, c, d) {
+	this.sourceBlock_ = null;
+	this.height_ = Number(c);
+	this.width_ = Number(b);
+	this.size_ = new goog.math.Size(this.width_, this.height_ + 2 * Blockly.BlockSvg.INLINE_PADDING_Y);
+	this.text_ = d || "";
+	this.setValue(a)
+};
+goog.inherits(Blockly.FieldImage, Blockly.Field);
+Blockly.FieldImage.prototype.rectElement_ = null;
+Blockly.FieldImage.prototype.EDITABLE = !1;
+Blockly.FieldImage.prototype.init = function () {
+	if (!this.fieldGroup_) {
+		this.fieldGroup_ = Blockly.createSvgElement("g", {}, null);
+		this.visible_ || (this.fieldGroup_.style.display = "none");
+		this.imageElement_ = Blockly.createSvgElement("image", {
+			height: this.height_ + "px",
+			width: this.width_ + "px"
+		}, this.fieldGroup_);
+		this.setValue(this.src_);
+		goog.userAgent.GECKO && (this.rectElement_ = Blockly.createSvgElement("rect", {
+			height: this.height_ + "px",
+			width: this.width_ + "px",
+			"fill-opacity": 0
+		}, this.fieldGroup_));
+		this.sourceBlock_.getSvgRoot().appendChild(this.fieldGroup_);
+		var a = this.rectElement_ || this.imageElement_;
+		a.tooltip = this.sourceBlock_;
+		Blockly.Tooltip.bindMouseEvents(a)
+	}
+};
+Blockly.FieldImage.prototype.dispose = function () {
+	goog.dom.removeNode(this.fieldGroup_);
+	this.rectElement_ = this.imageElement_ = this.fieldGroup_ = null
+};
+Blockly.FieldImage.prototype.setTooltip = function (a) {
+	(this.rectElement_ || this.imageElement_).tooltip = a
+};
+Blockly.FieldImage.prototype.getValue = function () {
+	return this.src_
+};
+Blockly.FieldImage.prototype.setValue = function (a) {
+	null !== a && (this.src_ = a, this.imageElement_ && this.imageElement_.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", goog.isString(a) ? a : ""))
+};
+Blockly.FieldImage.prototype.setText = function (a) {
+	null !== a && (this.text_ = a)
+};
+Blockly.FieldImage.prototype.render_ = function () { };
+Blockly.FieldNumber = function (a, b, c, d, e) {
+	a = String(a);
+	Blockly.FieldNumber.superClass_.constructor.call(this, a, e);
+	this.setConstraints(b, c, d)
+};
+goog.inherits(Blockly.FieldNumber, Blockly.FieldTextInput);
+Blockly.FieldNumber.prototype.setConstraints = function (a, b, c) {
+	c = parseFloat(c);
+	this.precision_ = isNaN(c) ? 0 : c;
+	a = parseFloat(a);
+	this.min_ = isNaN(a) ? -Infinity : a;
+	b = parseFloat(b);
+	this.max_ = isNaN(b) ? Infinity : b;
+	this.setValue(this.callValidator(this.getValue()))
+};
+Blockly.FieldNumber.prototype.classValidator = function (a) {
+	if (null === a) return null;
+	a = String(a);
+	a = a.replace(/O/ig, "0");
+	a = a.replace(/,/g, "");
+	a = parseFloat(a || 0);
+	if (isNaN(a)) return null;
+	this.precision_ && isFinite(a) && (a = Math.round(a / this.precision_) * this.precision_);
+	a = goog.math.clamp(a, this.min_, this.max_);
+	return String(a)
+};
+Blockly.FieldVariable = function (a, b) {
+	Blockly.FieldVariable.superClass_.constructor.call(this, Blockly.FieldVariable.dropdownCreate, b);
+	this.setValue(a || "")
+};
+goog.inherits(Blockly.FieldVariable, Blockly.FieldDropdown);
+Blockly.FieldVariable.prototype.renameVarItemIndex_ = -1;
+Blockly.FieldVariable.prototype.deleteVarItemIndex_ = -1;
+Blockly.FieldVariable.prototype.init = function () {
+	this.fieldGroup_ || (Blockly.FieldVariable.superClass_.init.call(this), this.getValue() || this.setValue(Blockly.Variables.generateUniqueName(this.sourceBlock_.isInFlyout ? this.sourceBlock_.workspace.targetWorkspace : this.sourceBlock_.workspace)), this.sourceBlock_.isInFlyout || this.sourceBlock_.workspace.createVariable(this.getValue()))
+};
+Blockly.FieldVariable.prototype.setSourceBlock = function (a) {
+	goog.asserts.assert(!a.isShadow(), "Variable fields are not allowed to exist on shadow blocks.");
+	Blockly.FieldVariable.superClass_.setSourceBlock.call(this, a)
+};
+Blockly.FieldVariable.prototype.getValue = function () {
+	return this.getText()
+};
+Blockly.FieldVariable.prototype.setValue = function (a) {
+	this.sourceBlock_ && Blockly.Events.isEnabled() && Blockly.Events.fire(new Blockly.Events.Change(this.sourceBlock_, "field", this.name, this.value_, a));
+	this.value_ = a;
+	this.setText(a)
+};
+Blockly.FieldVariable.dropdownCreate = function () {
+	var a = this.sourceBlock_ && this.sourceBlock_.workspace ? this.sourceBlock_.workspace.variableList.slice(0) : [],
+		b = this.getText();
+	b && -1 == a.indexOf(b) && a.push(b);
+	a.sort(goog.string.caseInsensitiveCompare);
+	this.renameVarItemIndex_ = a.length;
+	a.push(Blockly.Msg.RENAME_VARIABLE);
+	this.deleteVarItemIndex_ = a.length;
+	a.push(Blockly.Msg.DELETE_VARIABLE.replace("%1", b));
+	for (var b = [], c = 0; c < a.length; c++) b[c] = [a[c], a[c]];
+	return b
+};
+Blockly.FieldVariable.prototype.onItemSelected = function (a, b) {
+	a.getChildCount();
+	var c = b.getValue();
+	if (this.sourceBlock_) {
+		var d = this.sourceBlock_.workspace;
+		if (0 <= this.renameVarItemIndex_ && a.getChildAt(this.renameVarItemIndex_) === b) {
+			var e = this.getText();
+			Blockly.hideChaff();
+			Blockly.Variables.promptName(Blockly.Msg.RENAME_VARIABLE_TITLE.replace("%1", e), e, function (a) {
+				a && d.renameVariable(e, a)
+			});
+			return
+		}
+		if (0 <= this.deleteVarItemIndex_ && a.getChildAt(this.deleteVarItemIndex_) === b) {
+			d.deleteVariable(this.getText());
+			return
+		}
+		c = this.callValidator(c)
+	}
+	null !== c && this.setValue(c)
+};
+Blockly.FlyoutButton = function (a, b, c, d, e) {
+	this.workspace_ = a;
+	this.targetWorkspace_ = b;
+	this.text_ = c;
+	this.position_ = new goog.math.Coordinate(0, 0);
+	this.callback_ = Blockly.flyoutButtonCallbacks_[d];
+	this.isLabel_ = e
+};
+Blockly.FlyoutButton.MARGIN = 5;
+Blockly.FlyoutButton.prototype.width = 0;
+Blockly.FlyoutButton.prototype.height = 0;
+Blockly.FlyoutButton.prototype.createDom = function () {
+	this.svgGroup_ = Blockly.createSvgElement("g", {
+		"class": this.isLabel_ ? "blocklyFlyoutLabel" : "blocklyFlyoutButton"
+	}, this.workspace_.getCanvas());
+	if (!this.isLabel_) var a = Blockly.createSvgElement("rect", {
+		"class": "blocklyFlyoutButtonShadow",
+		rx: 4,
+		ry: 4,
+		x: 1,
+		y: 1
+	}, this.svgGroup_);
+	var b = Blockly.createSvgElement("rect", {
+		"class": this.isLabel_ ? "blocklyFlyoutLabelBackground" : "blocklyFlyoutButtonBackground",
+		rx: 4,
+		ry: 4
+	}, this.svgGroup_),
+		c = Blockly.createSvgElement("text", {
+        	"class": this.isLabel_ ? "blocklyFlyoutLabelText" : "blocklyText",
+        	x: 0,
+        	y: 0,
+        	"text-anchor": "middle"
+		}, this.svgGroup_);
+	c.textContent = this.text_;
+	this.width = c.getComputedTextLength() + 2 * Blockly.FlyoutButton.MARGIN;
+	this.height = 20;
+	this.isLabel_ || (a.setAttribute("width", this.width), a.setAttribute("height", this.height));
+	b.setAttribute("width", this.width);
+	b.setAttribute("height", this.height);
+	c.setAttribute("x", this.width / 2);
+	c.setAttribute("y", this.height - Blockly.FlyoutButton.MARGIN);
+	this.updateTransform_();
+	return this.svgGroup_
+};
+Blockly.FlyoutButton.prototype.show = function () {
+	this.updateTransform_();
+	this.svgGroup_.setAttribute("display", "block")
+};
+Blockly.FlyoutButton.prototype.updateTransform_ = function () {
+	this.svgGroup_.setAttribute("transform", "translate(" + this.position_.x + "," + this.position_.y + ")")
+};
+Blockly.FlyoutButton.prototype.moveTo = function (a, b) {
+	this.position_.x = a;
+	this.position_.y = b;
+	this.updateTransform_()
+};
+Blockly.FlyoutButton.prototype.getTargetWorkspace = function () {
+	return this.targetWorkspace_
+};
+Blockly.FlyoutButton.prototype.dispose = function () {
+	this.svgGroup_ && (goog.dom.removeNode(this.svgGroup_), this.svgGroup_ = null);
+	this.targetWorkspace_ = this.workspace_ = null
+};
+Blockly.FlyoutButton.prototype.onMouseUp = function (a) {
+	a.preventDefault();
+	a.stopPropagation();
+	Blockly.Flyout.terminateDrag_();
+	this.callback_ && this.callback_(this)
+};
+Blockly.Flyout = function (a) {
+	a.getMetrics = this.getMetrics_.bind(this);
+	a.setMetrics = this.setMetrics_.bind(this);
+	this.workspace_ = new Blockly.WorkspaceSvg(a);
+	this.workspace_.isFlyout = !0;
+	this.RTL = !!a.RTL;
+	this.horizontalLayout_ = a.horizontalLayout;
+	this.toolboxPosition_ = a.toolboxPosition;
+	this.eventWrappers_ = [];
+	this.backgroundButtons_ = [];
+	this.buttons_ = [];
+	this.listeners_ = [];
+	this.permanentlyDisabled_ = [];
+	this.startDragMouseX_ = this.startDragMouseY_ = 0
+};
+Blockly.Flyout.startFlyout_ = null;
+Blockly.Flyout.startDownEvent_ = null;
+Blockly.Flyout.startBlock_ = null;
+Blockly.Flyout.onMouseUpWrapper_ = null;
+Blockly.Flyout.onMouseMoveWrapper_ = null;
+Blockly.Flyout.onMouseMoveBlockWrapper_ = null;
+Blockly.Flyout.prototype.autoClose = !0;
+Blockly.Flyout.prototype.CORNER_RADIUS = 8;
+Blockly.Flyout.prototype.DRAG_RADIUS = 10;
+Blockly.Flyout.prototype.MARGIN = Blockly.Flyout.prototype.CORNER_RADIUS;
+Blockly.Flyout.prototype.GAP_X = 3 * Blockly.Flyout.prototype.MARGIN;
+Blockly.Flyout.prototype.GAP_Y = 3 * Blockly.Flyout.prototype.MARGIN;
+Blockly.Flyout.prototype.SCROLLBAR_PADDING = 2;
+Blockly.Flyout.prototype.width_ = 0;
+Blockly.Flyout.prototype.height_ = 0;
+Blockly.Flyout.prototype.dragMode_ = Blockly.DRAG_NONE;
+Blockly.Flyout.prototype.dragAngleRange_ = 70;
+Blockly.Flyout.prototype.createDom = function () {
+	this.svgGroup_ = Blockly.createSvgElement("g", {
+		"class": "blocklyFlyout"
+	}, null);
+	this.svgBackground_ = Blockly.createSvgElement("path", {
+		"class": "blocklyFlyoutBackground"
+	}, this.svgGroup_);
+	this.svgGroup_.appendChild(this.workspace_.createDom());
+	return this.svgGroup_
+};
+Blockly.Flyout.prototype.init = function (a) {
+	this.targetWorkspace_ = a;
+	this.workspace_.targetWorkspace = a;
+	this.scrollbar_ = new Blockly.Scrollbar(this.workspace_, this.horizontalLayout_, !1);
+	this.hide();
+	Array.prototype.push.apply(this.eventWrappers_, Blockly.bindEventWithChecks_(this.svgGroup_, "wheel", this, this.wheel_));
+	this.autoClose || (this.filterWrapper_ = this.filterForCapacity_.bind(this), this.targetWorkspace_.addChangeListener(this.filterWrapper_));
+	Array.prototype.push.apply(this.eventWrappers_, Blockly.bindEventWithChecks_(this.svgGroup_,
+		"mousedown", this, this.onMouseDown_))
+};
+Blockly.Flyout.prototype.dispose = function () {
+	this.hide();
+	Blockly.unbindEvent_(this.eventWrappers_);
+	this.filterWrapper_ && (this.targetWorkspace_.removeChangeListener(this.filterWrapper_), this.filterWrapper_ = null);
+	this.scrollbar_ && (this.scrollbar_.dispose(), this.scrollbar_ = null);
+	this.workspace_ && (this.workspace_.targetWorkspace = null, this.workspace_.dispose(), this.workspace_ = null);
+	this.svgGroup_ && (goog.dom.removeNode(this.svgGroup_), this.svgGroup_ = null);
+	this.targetWorkspace_ = this.svgBackground_ = null
+};
+Blockly.Flyout.prototype.getWidth = function () {
+	return this.width_
+};
+Blockly.Flyout.prototype.getHeight = function () {
+	return this.height_
+};
+Blockly.Flyout.prototype.getMetrics_ = function () {
+	if (!this.isVisible()) return null;
+	try {
+		var a = this.workspace_.getCanvas().getBBox()
+	} catch (f) {
+		a = {
+			height: 0,
+			y: 0,
+			width: 0,
+			x: 0
+		}
+	}
+	var b = this.SCROLLBAR_PADDING,
+		c = this.SCROLLBAR_PADDING;
+	if (this.horizontalLayout_) {
+		this.toolboxPosition_ == Blockly.TOOLBOX_AT_BOTTOM && (b = 0);
+		var d = this.height_;
+		this.toolboxPosition_ == Blockly.TOOLBOX_AT_TOP && (d -= this.SCROLLBAR_PADDING);
+		var e = this.width_ - 2 * this.SCROLLBAR_PADDING
+	} else c = 0, d = this.height_ - 2 * this.SCROLLBAR_PADDING, e = this.width_,
+		this.RTL || (e -= this.SCROLLBAR_PADDING);
+	return {
+		viewHeight: d,
+		viewWidth: e,
+		contentHeight: (a.height + 2 * this.MARGIN) * this.workspace_.scale,
+		contentWidth: (a.width + 2 * this.MARGIN) * this.workspace_.scale,
+		viewTop: -this.workspace_.scrollY,
+		viewLeft: -this.workspace_.scrollX,
+		contentTop: a.y,
+		contentLeft: a.x,
+		absoluteTop: b,
+		absoluteLeft: c
+	}
+};
+Blockly.Flyout.prototype.setMetrics_ = function (a) {
+	var b = this.getMetrics_();
+	b && (!this.horizontalLayout_ && goog.isNumber(a.y) ? this.workspace_.scrollY = -b.contentHeight * a.y : this.horizontalLayout_ && goog.isNumber(a.x) && (this.workspace_.scrollX = -b.contentWidth * a.x), this.workspace_.translate(this.workspace_.scrollX + b.absoluteLeft, this.workspace_.scrollY + b.absoluteTop))
+};
+Blockly.Flyout.prototype.position = function () {
+	if (this.isVisible()) {
+		var a = this.targetWorkspace_.getMetrics();
+		if (a) {
+			this.setBackgroundPath_(this.horizontalLayout_ ? a.viewWidth - 2 * this.CORNER_RADIUS : this.width_ - this.CORNER_RADIUS, this.horizontalLayout_ ? this.height_ - this.CORNER_RADIUS : a.viewHeight - 2 * this.CORNER_RADIUS);
+			var b = a.absoluteLeft;
+			this.toolboxPosition_ == Blockly.TOOLBOX_AT_RIGHT && (b += a.viewWidth, b -= this.width_);
+			var c = a.absoluteTop;
+			this.toolboxPosition_ == Blockly.TOOLBOX_AT_BOTTOM && (c += a.viewHeight,
+				c -= this.height_);
+			this.svgGroup_.setAttribute("transform", "translate(" + b + "," + c + ")");
+			this.horizontalLayout_ ? this.width_ = a.viewWidth : this.height_ = a.viewHeight;
+			this.scrollbar_ && this.scrollbar_.resize()
+		}
+	}
+};
+Blockly.Flyout.prototype.setBackgroundPath_ = function (a, b) {
+	this.horizontalLayout_ ? this.setBackgroundPathHorizontal_(a, b) : this.setBackgroundPathVertical_(a, b)
+};
+Blockly.Flyout.prototype.setBackgroundPathVertical_ = function (a, b) {
+	var c = this.toolboxPosition_ == Blockly.TOOLBOX_AT_RIGHT,
+		d = a + this.CORNER_RADIUS,
+		d = ["M " + (c ? d : 0) + ",0"];
+	d.push("h", c ? -a : a);
+	d.push("a", this.CORNER_RADIUS, this.CORNER_RADIUS, 0, 0, c ? 0 : 1, c ? -this.CORNER_RADIUS : this.CORNER_RADIUS, this.CORNER_RADIUS);
+	d.push("v", Math.max(0, b));
+	d.push("a", this.CORNER_RADIUS, this.CORNER_RADIUS, 0, 0, c ? 0 : 1, c ? this.CORNER_RADIUS : -this.CORNER_RADIUS, this.CORNER_RADIUS);
+	d.push("h", c ? a : -a);
+	d.push("z");
+	this.svgBackground_.setAttribute("d",
+		d.join(" "))
+};
+Blockly.Flyout.prototype.setBackgroundPathHorizontal_ = function (a, b) {
+	var c = this.toolboxPosition_ == Blockly.TOOLBOX_AT_TOP,
+		d = ["M 0," + (c ? 0 : this.CORNER_RADIUS)];
+	c ? (d.push("h", a + 2 * this.CORNER_RADIUS), d.push("v", b), d.push("a", this.CORNER_RADIUS, this.CORNER_RADIUS, 0, 0, 1, -this.CORNER_RADIUS, this.CORNER_RADIUS), d.push("h", -1 * a), d.push("a", this.CORNER_RADIUS, this.CORNER_RADIUS, 0, 0, 1, -this.CORNER_RADIUS, -this.CORNER_RADIUS)) : (d.push("a", this.CORNER_RADIUS, this.CORNER_RADIUS, 0, 0, 1, this.CORNER_RADIUS, -this.CORNER_RADIUS),
+		d.push("h", a), d.push("a", this.CORNER_RADIUS, this.CORNER_RADIUS, 0, 0, 1, this.CORNER_RADIUS, this.CORNER_RADIUS), d.push("v", b), d.push("h", -a - 2 * this.CORNER_RADIUS));
+	d.push("z");
+	this.svgBackground_.setAttribute("d", d.join(" "))
+};
+Blockly.Flyout.prototype.scrollToStart = function () {
+	this.scrollbar_.set(this.horizontalLayout_ && this.RTL ? Infinity : 0)
+};
+Blockly.Flyout.prototype.wheel_ = function (a) {
+	var b = this.horizontalLayout_ ? a.deltaX : a.deltaY;
+	if (b) {
+		goog.userAgent.GECKO && (b *= 10);
+		var c = this.getMetrics_(),
+			b = this.horizontalLayout_ ? c.viewLeft + b : c.viewTop + b,
+			b = Math.min(b, this.horizontalLayout_ ? c.contentWidth - c.viewWidth : c.contentHeight - c.viewHeight),
+			b = Math.max(b, 0);
+		this.scrollbar_.set(b)
+	}
+	a.preventDefault();
+	a.stopPropagation()
+};
+Blockly.Flyout.prototype.isVisible = function () {
+	return this.svgGroup_ && "block" == this.svgGroup_.style.display
+};
+Blockly.Flyout.prototype.hide = function () {
+	if (this.isVisible()) {
+		this.svgGroup_.style.display = "none";
+		for (var a = 0, b; b = this.listeners_[a]; a++) Blockly.unbindEvent_(b);
+		this.listeners_.length = 0;
+		this.reflowWrapper_ && (this.workspace_.removeChangeListener(this.reflowWrapper_), this.reflowWrapper_ = null)
+	}
+};
+Blockly.Flyout.prototype.flyoutCategory = function (a, b) {
+	return a;
+};
+Blockly.Flyout.prototype.show = function (a) {
+	this.hide();
+	this.clearOldBlocks_();
+	a = this.flyoutCategory(a, this.workspace_.targetWorkspace);
+	this.svgGroup_.style.display = "block";
+	for (var b = [], c = [], d = this.permanentlyDisabled_.length = 0, e; e = a[d]; d++)
+		if (e.tagName) {
+			var f = e.tagName.toUpperCase(),
+				g = this.horizontalLayout_ ? this.GAP_X : this.GAP_Y;
+			if ("BLOCK" == f) f = Blockly.Xml.domToBlock(e,
+				this.workspace_), f.disabled && this.permanentlyDisabled_.push(f), b.push({
+                	type: "block",
+                	block: f
+				}), e = parseInt(e.getAttribute("gap"), 10), c.push(isNaN(e) ? g : e);
+			else if ("SEP" == e.tagName.toUpperCase()) e = parseInt(e.getAttribute("gap"), 10), !isNaN(e) && 0 < c.length ? c[c.length - 1] = e : c.push(g);
+			else if ("BUTTON" == f || "LABEL" == f) {
+				var f = "LABEL" == f,
+					h = e.getAttribute("text");
+				e = e.getAttribute("callbackKey");
+				e = new Blockly.FlyoutButton(this.workspace_, this.targetWorkspace_, h, e, f);
+				b.push({
+					type: "button",
+					button: e
+				});
+				c.push(g)
+			}
+		}
+	this.layout_(b,
+		c);
+	this.listeners_.push(Blockly.bindEventWithChecks_(this.svgBackground_, "mouseover", this, function () {
+		for (var a = this.workspace_.getTopBlocks(!1), b = 0, c; c = a[b]; b++) c.removeSelect()
+	}));
+	this.horizontalLayout_ ? this.height_ = 0 : this.width_ = 0;
+	this.reflow();
+	this.filterForCapacity_();
+	this.position();
+	this.reflowWrapper_ = this.reflow.bind(this);
+	this.workspace_.addChangeListener(this.reflowWrapper_)
+};
+Blockly.Flyout.prototype.layout_ = function (a, b) {
+	this.workspace_.scale = this.targetWorkspace_.scale;
+	var c = this.MARGIN,
+		d = this.RTL ? c : c + Blockly.BlockSvg.TAB_WIDTH;
+	this.horizontalLayout_ && this.RTL && (a = a.reverse());
+	for (var e = 0, f; f = a[e]; e++)
+		if ("block" == f.type) {
+			f = f.block;
+			for (var g = f.getDescendants(), h = 0, k; k = g[h]; h++) k.isInFlyout = !0;
+			f.render();
+			g = f.getSvgRoot();
+			h = f.getHeightWidth();
+			k = f.outputConnection ? Blockly.BlockSvg.TAB_WIDTH : 0;
+			this.horizontalLayout_ && (d += k);
+			f.moveBy(this.horizontalLayout_ && this.RTL ? d + h.width -
+				k : d, c);
+			this.horizontalLayout_ ? d += h.width + b[e] - k : c += h.height + b[e];
+			h = Blockly.createSvgElement("rect", {
+				"fill-opacity": 0
+			}, null);
+			h.tooltip = f;
+			Blockly.Tooltip.bindMouseEvents(h);
+			this.workspace_.getCanvas().insertBefore(h, f.getSvgRoot());
+			f.flyoutRect_ = h;
+			this.backgroundButtons_[e] = h;
+			this.addBlockListeners_(g, f, h)
+		} else "button" == f.type && (f = f.button, g = f.createDom(), f.moveTo(d, c), f.show(), Blockly.bindEventWithChecks_(g, "mouseup", f, f.onMouseUp), this.buttons_.push(f), this.horizontalLayout_ ? d += f.width + b[e] : c += f.height +
+			b[e])
+};
+Blockly.Flyout.prototype.clearOldBlocks_ = function () {
+	for (var a = this.workspace_.getTopBlocks(!1), b = 0, c; c = a[b]; b++) c.workspace == this.workspace_ && c.dispose(!1, !1);
+	for (b = 0; a = this.backgroundButtons_[b]; b++) goog.dom.removeNode(a);
+	for (b = this.backgroundButtons_.length = 0; a = this.buttons_[b]; b++) a.dispose();
+	this.buttons_.length = 0
+};
+Blockly.Flyout.prototype.addBlockListeners_ = function (a, b, c) {
+	this.listeners_.push(Blockly.bindEventWithChecks_(a, "mousedown", null, this.blockMouseDown_(b)));
+	this.listeners_.push(Blockly.bindEventWithChecks_(c, "mousedown", null, this.blockMouseDown_(b)));
+	this.listeners_.push(Blockly.bindEvent_(a, "mouseover", b, b.addSelect));
+	this.listeners_.push(Blockly.bindEvent_(a, "mouseout", b, b.removeSelect));
+	this.listeners_.push(Blockly.bindEvent_(c, "mouseover", b, b.addSelect));
+	this.listeners_.push(Blockly.bindEvent_(c,
+		"mouseout", b, b.removeSelect))
+};
+Blockly.Flyout.blockRightClick_ = function (a, b) {
+	Blockly.terminateDrag_();
+	Blockly.hideChaff(!0);
+	b.showContextMenu_(a);
+	Blockly.Touch.clearTouchIdentifier()
+};
+Blockly.Flyout.prototype.blockMouseDown_ = function (a) {
+	var b = this;
+	return function (c) {
+		Blockly.isRightButton(c) ? Blockly.Flyout.blockRightClick_(c, a) : (Blockly.terminateDrag_(), Blockly.hideChaff(!0), Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED), b.startDragMouseY_ = c.clientY, b.startDragMouseX_ = c.clientX, Blockly.Flyout.startDownEvent_ = c, Blockly.Flyout.startBlock_ = a, Blockly.Flyout.startFlyout_ = b, Blockly.Flyout.onMouseUpWrapper_ = Blockly.bindEventWithChecks_(document, "mouseup", b, b.onMouseUp_), Blockly.Flyout.onMouseMoveBlockWrapper_ =
+			Blockly.bindEventWithChecks_(document, "mousemove", b, b.onMouseMoveBlock_));
+		c.stopPropagation();
+		c.preventDefault()
+	}
+};
+Blockly.Flyout.prototype.onMouseDown_ = function (a) {
+	Blockly.isRightButton(a) ? Blockly.Touch.clearTouchIdentifier() : (Blockly.hideChaff(!0), this.dragMode_ = Blockly.DRAG_FREE, this.startDragMouseY_ = a.clientY, this.startDragMouseX_ = a.clientX, Blockly.Flyout.startFlyout_ = this, Blockly.Flyout.onMouseMoveWrapper_ = Blockly.bindEventWithChecks_(document, "mousemove", this, this.onMouseMove_), Blockly.Flyout.onMouseUpWrapper_ = Blockly.bindEventWithChecks_(document, "mouseup", this, Blockly.Flyout.terminateDrag_), a.preventDefault(),
+		a.stopPropagation())
+};
+Blockly.Flyout.prototype.onMouseUp_ = function (a) {
+	this.workspace_.isDragging() || (Blockly.Touch.clearTouchIdentifier(), this.autoClose ? this.createBlockFunc_(Blockly.Flyout.startBlock_)(Blockly.Flyout.startDownEvent_) : Blockly.WidgetDiv.isVisible() || Blockly.Events.fire(new Blockly.Events.Ui(Blockly.Flyout.startBlock_, "click", void 0, void 0)));
+	Blockly.terminateDrag_()
+};
+Blockly.Flyout.prototype.onMouseMove_ = function (a) {
+	var b = this.getMetrics_();
+	if (this.horizontalLayout_) {
+		if (!(0 > b.contentWidth - b.viewWidth)) {
+			var c = a.clientX - this.startDragMouseX_;
+			this.startDragMouseX_ = a.clientX;
+			a = b.viewLeft - c;
+			a = goog.math.clamp(a, 0, b.contentWidth - b.viewWidth);
+			this.scrollbar_.set(a)
+		}
+	} else 0 > b.contentHeight - b.viewHeight || (c = a.clientY - this.startDragMouseY_, this.startDragMouseY_ = a.clientY, a = b.viewTop - c, a = goog.math.clamp(a, 0, b.contentHeight - b.viewHeight), this.scrollbar_.set(a))
+};
+Blockly.Flyout.prototype.onMouseMoveBlock_ = function (a) {
+	"mousemove" == a.type && 1 >= a.clientX && 0 == a.clientY && 0 == a.button || (this.determineDragIntention_(a.clientX - Blockly.Flyout.startDownEvent_.clientX, a.clientY - Blockly.Flyout.startDownEvent_.clientY) ? (Blockly.longStop_(), this.createBlockFunc_(Blockly.Flyout.startBlock_)(Blockly.Flyout.startDownEvent_)) : this.dragMode_ == Blockly.DRAG_FREE && (Blockly.longStop_(), this.onMouseMove_(a)));
+	a.stopPropagation()
+};
+Blockly.Flyout.prototype.determineDragIntention_ = function (a, b) {
+	if (this.dragMode_ == Blockly.DRAG_FREE) return !1;
+	if (Math.sqrt(a * a + b * b) < this.DRAG_RADIUS) return this.dragMode_ = Blockly.DRAG_STICKY, !1;
+	if (this.isDragTowardWorkspace_(a, b) || !this.scrollbar_.isVisible()) return !0;
+	this.dragMode_ = Blockly.DRAG_FREE;
+	return !1
+};
+Blockly.Flyout.prototype.isDragTowardWorkspace_ = function (a, b) {
+	var c = Math.atan2(b, a) / Math.PI * 180,
+		d = this.dragAngleRange_;
+	if (this.horizontalLayout_) {
+		if (c < 90 + d && c > 90 - d || c > -90 - d && c < -90 + d) return !0
+	} else if (c < d && c > -d || c < -180 + d || c > 180 - d) return !0;
+	return !1
+};
+Blockly.Flyout.prototype.createBlockFunc_ = function (a) {
+	var b = this;
+	return function (c) {
+		if (!Blockly.isRightButton(c) && !a.disabled) {
+			Blockly.Events.disable();
+			try {
+				var d = b.placeNewBlock_(a)
+			} finally {
+				Blockly.Events.enable()
+			}
+			Blockly.Events.isEnabled() && (Blockly.Events.setGroup(!0), Blockly.Events.fire(new Blockly.Events.Create(d)));
+			b.autoClose ? b.hide() : b.filterForCapacity_();
+			d.onMouseDown_(c);
+			Blockly.dragMode_ = Blockly.DRAG_FREE;
+			d.setDragging_(!0);
+			b.targetWorkspace_.setResizesEnabled(!1)
+		}
+	}
+};
+Blockly.Flyout.prototype.placeNewBlock_ = function (a) {
+	var b = this.targetWorkspace_,
+		c = a.getSvgRoot();
+	if (!c) throw "originBlock is not rendered.";
+	var c = Blockly.getSvgXY_(c, b),
+		d = this.workspace_.scrollX,
+		e = this.workspace_.scale;
+	c.x += d / e - d;
+	this.toolboxPosition_ == Blockly.TOOLBOX_AT_RIGHT && (d = b.getMetrics().viewWidth - this.width_, e = b.scale, c.x += d / e - d);
+	d = this.workspace_.scrollY;
+	e = this.workspace_.scale;
+	c.y += d / e - d;
+	this.toolboxPosition_ == Blockly.TOOLBOX_AT_BOTTOM && (d = b.getMetrics().viewHeight - this.height_, e = b.scale,
+		c.y += d / e - d);
+	a = Blockly.Xml.blockToDom(a);
+	a = Blockly.Xml.domToBlock(a, b);
+	e = a.getSvgRoot();
+	if (!e) throw "block is not rendered.";
+	e = Blockly.getSvgXY_(e, b);
+	e.x += b.scrollX / b.scale - b.scrollX;
+	e.y += b.scrollY / b.scale - b.scrollY;
+	b.toolbox_ && !b.scrollbar && (e.x += b.toolbox_.getWidth() / b.scale, e.y += b.toolbox_.getHeight() / b.scale);
+	a.moveBy(c.x - e.x, c.y - e.y);
+	return a
+};
+Blockly.Flyout.prototype.filterForCapacity_ = function () {
+	for (var a = this.targetWorkspace_.remainingCapacity(), b = this.workspace_.getTopBlocks(!1), c = 0, d; d = b[c]; c++)
+		if (-1 == this.permanentlyDisabled_.indexOf(d)) {
+			var e = d.getDescendants();
+			d.setDisabled(e.length > a)
+		}
+};
+Blockly.Flyout.prototype.getClientRect = function () {
+	if (!this.svgGroup_) return null;
+	var a = this.svgGroup_.getBoundingClientRect(),
+		b = a.left,
+		c = a.top,
+		d = a.width,
+		a = a.height;
+	return this.toolboxPosition_ == Blockly.TOOLBOX_AT_TOP ? new goog.math.Rect(-1E9, c - 1E9, 2E9, 1E9 + a) : this.toolboxPosition_ == Blockly.TOOLBOX_AT_BOTTOM ? new goog.math.Rect(-1E9, c, 2E9, 1E9 + a) : this.toolboxPosition_ == Blockly.TOOLBOX_AT_LEFT ? new goog.math.Rect(b - 1E9, -1E9, 1E9 + d, 2E9) : new goog.math.Rect(b, -1E9, 1E9 + d, 2E9)
+};
+Blockly.Flyout.terminateDrag_ = function () {
+	Blockly.Flyout.startFlyout_ && (Blockly.Flyout.startFlyout_.dragMode_ == Blockly.DRAG_FREE && Blockly.Touch.clearTouchIdentifier(), Blockly.Flyout.startFlyout_.dragMode_ = Blockly.DRAG_NONE, Blockly.Flyout.startFlyout_ = null);
+	Blockly.Flyout.onMouseUpWrapper_ && (Blockly.unbindEvent_(Blockly.Flyout.onMouseUpWrapper_), Blockly.Flyout.onMouseUpWrapper_ = null);
+	Blockly.Flyout.onMouseMoveBlockWrapper_ && (Blockly.unbindEvent_(Blockly.Flyout.onMouseMoveBlockWrapper_), Blockly.Flyout.onMouseMoveBlockWrapper_ =
+		null);
+	Blockly.Flyout.onMouseMoveWrapper_ && (Blockly.unbindEvent_(Blockly.Flyout.onMouseMoveWrapper_), Blockly.Flyout.onMouseMoveWrapper_ = null);
+	Blockly.Flyout.startDownEvent_ = null;
+	Blockly.Flyout.startBlock_ = null
+};
+Blockly.Flyout.prototype.reflowHorizontal = function (a) {
+	this.workspace_.scale = this.targetWorkspace_.scale;
+	for (var b = 0, c = 0, d; d = a[c]; c++) b = Math.max(b, d.getHeightWidth().height);
+	b += 1.5 * this.MARGIN;
+	b *= this.workspace_.scale;
+	b += Blockly.Scrollbar.scrollbarThickness;
+	if (this.height_ != b) {
+		for (c = 0; d = a[c]; c++) {
+			var e = d.getHeightWidth();
+			if (d.flyoutRect_) {
+				d.flyoutRect_.setAttribute("width", e.width);
+				d.flyoutRect_.setAttribute("height", e.height);
+				var f = d.outputConnection ? Blockly.BlockSvg.TAB_WIDTH : 0,
+					g = d.getRelativeToSurfaceXY();
+				d.flyoutRect_.setAttribute("y", g.y);
+				d.flyoutRect_.setAttribute("x", this.RTL ? g.x - e.width + f : g.x - f);
+				(e = d.startHat_ ? Blockly.BlockSvg.START_HAT_HEIGHT : 0) && d.moveBy(0, e);
+				d.flyoutRect_.setAttribute("y", g.y)
+			}
+		}
+		this.height_ = b;
+		this.targetWorkspace_.resize()
+	}
+};
+Blockly.Flyout.prototype.reflowVertical = function (a) {
+	this.workspace_.scale = this.targetWorkspace_.scale;
+	for (var b = 0, c = 0, d; d = a[c]; c++) {
+		var e = d.getHeightWidth().width;
+		d.outputConnection && (e -= Blockly.BlockSvg.TAB_WIDTH);
+		b = Math.max(b, e)
+	}
+	for (c = 0; d = this.buttons_[c]; c++) b = Math.max(b, d.width);
+	b += 1.5 * this.MARGIN + Blockly.BlockSvg.TAB_WIDTH;
+	b *= this.workspace_.scale;
+	b += Blockly.Scrollbar.scrollbarThickness;
+	if (this.width_ != b) {
+		for (c = 0; d = a[c]; c++) {
+			e = d.getHeightWidth();
+			if (this.RTL) {
+				var f = d.getRelativeToSurfaceXY().x,
+					g = b / this.workspace_.scale - this.MARGIN,
+					g = g - Blockly.BlockSvg.TAB_WIDTH;
+				d.moveBy(g - f, 0)
+			}
+			d.flyoutRect_ && (d.flyoutRect_.setAttribute("width", e.width), d.flyoutRect_.setAttribute("height", e.height), g = d.outputConnection ? Blockly.BlockSvg.TAB_WIDTH : 0, f = d.getRelativeToSurfaceXY(), d.flyoutRect_.setAttribute("x", this.RTL ? f.x - e.width + g : f.x - g), (e = d.startHat_ ? Blockly.BlockSvg.START_HAT_HEIGHT : 0) && d.moveBy(0, e), d.flyoutRect_.setAttribute("y", f.y))
+		}
+		this.width_ = b;
+		this.targetWorkspace_.resize()
+	}
+};
+Blockly.Flyout.prototype.reflow = function () {
+	this.reflowWrapper_ && this.workspace_.removeChangeListener(this.reflowWrapper_);
+	var a = this.workspace_.getTopBlocks(!1);
+	this.horizontalLayout_ ? this.reflowHorizontal(a) : this.reflowVertical(a);
+	this.reflowWrapper_ && this.workspace_.addChangeListener(this.reflowWrapper_)
+};
+Blockly.Toolbox = function (a) {
+	this.workspace_ = a;
+	this.RTL = a.options.RTL;
+	this.horizontalLayout_ = a.options.horizontalLayout;
+	this.toolboxPosition = a.options.toolboxPosition;
+	this.config_ = {
+		indentWidth: 19,
+		cssRoot: "blocklyTreeRoot",
+		cssHideRoot: "blocklyHidden",
+		cssItem: "",
+		cssTreeRow: "blocklyTreeRow",
+		cssItemLabel: "blocklyTreeLabel",
+		cssTreeIcon: "blocklyTreeIcon",
+		cssExpandedFolderIcon: "blocklyTreeIconOpen",
+		cssFileIcon: "blocklyTreeIconNone",
+		cssSelectedRow: "blocklyTreeSelected"
+	};
+	this.treeSeparatorConfig_ = {
+		cssTreeRow: "blocklyTreeSeparator"
+	};
+	this.horizontalLayout_ && (this.config_.cssTreeRow += a.RTL ? " blocklyHorizontalTreeRtl" : " blocklyHorizontalTree", this.treeSeparatorConfig_.cssTreeRow = "blocklyTreeSeparatorHorizontal " + (a.RTL ? "blocklyHorizontalTreeRtl" : "blocklyHorizontalTree"), this.config_.cssTreeIcon = "")
+};
+Blockly.Toolbox.prototype.width = 0;
+Blockly.Toolbox.prototype.height = 0;
+Blockly.Toolbox.prototype.selectedOption_ = null;
+Blockly.Toolbox.prototype.lastCategory_ = null;
+Blockly.Toolbox.prototype.init = function () {
+	var a = this.workspace_,
+		b = this.workspace_.getParentSvg();
+	this.HtmlDiv = goog.dom.createDom("DIV", "blocklyToolboxDiv");
+	this.HtmlDiv.setAttribute("dir", a.RTL ? "RTL" : "LTR");
+	b.parentNode.insertBefore(this.HtmlDiv, b);
+	Blockly.bindEventWithChecks_(this.HtmlDiv, "mousedown", this, function (a) {
+		Blockly.isRightButton(a) || a.target == this.HtmlDiv ? Blockly.hideChaff(!1) : Blockly.hideChaff(!0);
+		Blockly.Touch.clearTouchIdentifier()
+	});
+	this.flyout_ = new Blockly.Flyout({
+		disabledPatternId: a.options.disabledPatternId,
+		parentWorkspace: a,
+		RTL: a.RTL,
+		oneBasedIndex: a.options.oneBasedIndex,
+		horizontalLayout: a.horizontalLayout,
+		toolboxPosition: a.options.toolboxPosition
+	});
+	goog.dom.insertSiblingAfter(this.flyout_.createDom(), a.svgGroup_);
+	this.flyout_.init(a);
+	this.config_.cleardotPath = a.options.pathToMedia + "1x1.gif";
+	this.config_.cssCollapsedFolderIcon = "blocklyTreeIconClosed" + (a.RTL ? "Rtl" : "Ltr");
+	this.tree_ = b = new Blockly.Toolbox.TreeControl(this, this.config_);
+	b.setShowRootNode(!1);
+	b.setShowLines(!1);
+	b.setShowExpandIcons(!1);
+	b.setSelectedItem(null);
+	a = this.populate_(a.options.languageTree);
+	b.render(this.HtmlDiv);
+	a && b.setSelectedItem(a);
+	this.addColour_();
+	this.position()
+};
+Blockly.Toolbox.prototype.dispose = function () {
+	this.flyout_.dispose();
+	this.tree_.dispose();
+	goog.dom.removeNode(this.HtmlDiv);
+	this.lastCategory_ = this.workspace_ = null
+};
+Blockly.Toolbox.prototype.getWidth = function () {
+	return this.width
+};
+Blockly.Toolbox.prototype.getHeight = function () {
+	return this.height
+};
+Blockly.Toolbox.prototype.position = function () {
+	var a = this.HtmlDiv;
+	if (a) {
+		var b = this.workspace_.getParentSvg();
+		goog.style.getPageOffset(b);
+		b = Blockly.svgSize(b);
+		this.horizontalLayout_ ? (a.style.left = "0", a.style.height = "auto", a.style.width = b.width + "px", this.height = a.offsetHeight, this.toolboxPosition == Blockly.TOOLBOX_AT_TOP ? a.style.top = "0" : a.style.bottom = "0") : (this.toolboxPosition == Blockly.TOOLBOX_AT_RIGHT ? a.style.right = "0" : a.style.left = "0", a.style.height = b.height + "px", this.width = a.offsetWidth);
+		this.flyout_.position()
+	}
+};
+Blockly.Toolbox.prototype.populate_ = function (a) {
+	this.tree_.removeChildren();
+	this.tree_.blocks = [];
+	this.hasColours_ = !1;
+	a = this.syncTrees_(a, this.tree_, this.workspace_.options.pathToMedia);
+	if (this.tree_.blocks.length) throw "Toolbox cannot have both blocks and categories in the root level.";
+	this.workspace_.resizeContents();
+	return a
+};
+Blockly.Toolbox.prototype.syncTrees_ = function (a, b, c) {
+	for (var d = null, e = null, f = 0, g; g = a.childNodes[f]; f++)
+		if (g.tagName) switch (g.tagName.toUpperCase()) {
+			case "CATEGORY":
+				e = this.tree_.createNode(g.getAttribute("name"));
+				e.blocks = [];
+				b.add(e);
+				var h = g.getAttribute("custom");
+				h ? e.blocks = h : (h = this.syncTrees_(g, e, c)) && (d = h);
+				h = g.getAttribute("colour");
+				goog.isString(h) ? (h.match(/^#[0-9a-fA-F]{6}$/) ? e.hexColour = h : e.hexColour = Blockly.hueToRgb(h), this.hasColours_ = !0) : e.hexColour = "";
+				"true" == g.getAttribute("expanded") ?
+					(e.blocks.length && (d = e), e.setExpanded(!0)) : e.setExpanded(!1);
+				e = g;
+				break;
+			case "SEP":
+				e && ("CATEGORY" == e.tagName.toUpperCase() ? b.add(new Blockly.Toolbox.TreeSeparator(this.treeSeparatorConfig_)) : (g = parseFloat(g.getAttribute("gap")), !isNaN(g) && e && e.setAttribute("gap", g)));
+				break;
+			case "BLOCK":
+			case "SHADOW":
+			case "LABEL":
+			case "BUTTON":
+				b.blocks.push(g), e = g
+		}
+	return d
+};
+Blockly.Toolbox.prototype.addColour_ = function (a) {
+	a = (a || this.tree_).getChildren();
+	for (var b = 0, c; c = a[b]; b++) {
+		var d = c.getRowElement();
+		if (d) {
+			var e = this.hasColours_ ? "8px solid " + (c.hexColour || "#ddd") : "none";
+			this.workspace_.RTL ? d.style.borderRight = e : d.style.borderLeft = e
+		}
+		this.addColour_(c)
+	}
+};
+Blockly.Toolbox.prototype.clearSelection = function () {
+	this.tree_.setSelectedItem(null)
+};
+Blockly.Toolbox.prototype.getClientRect = function () {
+	if (!this.HtmlDiv) return null;
+	var a = this.HtmlDiv.getBoundingClientRect(),
+		b = a.left,
+		c = a.top,
+		d = a.width,
+		a = a.height;
+	return this.toolboxPosition == Blockly.TOOLBOX_AT_LEFT ? new goog.math.Rect(-1E7, -1E7, 1E7 + b + d, 2E7) : this.toolboxPosition == Blockly.TOOLBOX_AT_RIGHT ? new goog.math.Rect(b, -1E7, 1E7 + d, 2E7) : this.toolboxPosition == Blockly.TOOLBOX_AT_TOP ? new goog.math.Rect(-1E7, -1E7, 2E7, 1E7 + c + a) : new goog.math.Rect(0, c, 2E7, 1E7 + d)
+};
+Blockly.Toolbox.prototype.refreshSelection = function () {
+	var a = this.tree_.getSelectedItem();
+	a && a.blocks && this.flyout_.show(a.blocks)
+};
+Blockly.Toolbox.TreeControl = function (a, b) {
+	this.toolbox_ = a;
+	goog.ui.tree.TreeControl.call(this, goog.html.SafeHtml.EMPTY, b)
+};
+goog.inherits(Blockly.Toolbox.TreeControl, goog.ui.tree.TreeControl);
+Blockly.Toolbox.TreeControl.prototype.enterDocument = function () {
+	Blockly.Toolbox.TreeControl.superClass_.enterDocument.call(this);
+	var a = this.getElement();
+	goog.events.BrowserFeature.TOUCH_ENABLED && Blockly.bindEventWithChecks_(a, goog.events.EventType.TOUCHSTART, this, this.handleTouchEvent_)
+};
+Blockly.Toolbox.TreeControl.prototype.handleTouchEvent_ = function (a) {
+	a.preventDefault();
+	var b = this.getNodeFromEvent_(a);
+	b && a.type === goog.events.EventType.TOUCHSTART && setTimeout(function () {
+		b.onMouseDown(a)
+	}, 1)
+};
+Blockly.Toolbox.TreeControl.prototype.createNode = function (a) {
+	return new Blockly.Toolbox.TreeNode(this.toolbox_, a ? goog.html.SafeHtml.htmlEscape(a) : goog.html.SafeHtml.EMPTY, this.getConfig(), this.getDomHelper())
+};
+Blockly.Toolbox.TreeControl.prototype.setSelectedItem = function (a) {
+	var b = this.toolbox_;
+	if (a != this.selectedItem_ && a != b.tree_) {
+		b.lastCategory_ && (b.lastCategory_.getRowElement().style.backgroundColor = "");
+		if (a) {
+			var c = a.hexColour || "#57e";
+			a.getRowElement().style.backgroundColor = c;
+			b.addColour_(a)
+		}
+		c = this.getSelectedItem();
+		goog.ui.tree.TreeControl.prototype.setSelectedItem.call(this, a);
+		a && a.blocks && a.blocks.length ? (b.flyout_.show(a.blocks), b.lastCategory_ != a && b.flyout_.scrollToStart()) : b.flyout_.hide();
+		c !=
+			a && c != this && (c = new Blockly.Events.Ui(null, "category", c && c.getHtml(), a && a.getHtml()), c.workspaceId = b.workspace_.id, Blockly.Events.fire(c));
+		a && (b.lastCategory_ = a)
+	}
+};
+Blockly.Toolbox.TreeNode = function (a, b, c, d) {
+	goog.ui.tree.TreeNode.call(this, b, c, d);
+	a && (b = function () {
+		Blockly.svgResize(a.workspace_)
+	}, goog.events.listen(a.tree_, goog.ui.tree.BaseNode.EventType.EXPAND, b), goog.events.listen(a.tree_, goog.ui.tree.BaseNode.EventType.COLLAPSE, b))
+};
+goog.inherits(Blockly.Toolbox.TreeNode, goog.ui.tree.TreeNode);
+Blockly.Toolbox.TreeNode.prototype.getExpandIconSafeHtml = function () {
+	return goog.html.SafeHtml.create("span")
+};
+Blockly.Toolbox.TreeNode.prototype.onMouseDown = function (a) {
+	this.hasChildren() && this.isUserCollapsible_ ? (this.toggle(), this.select()) : this.isSelected() ? this.getTree().setSelectedItem(null) : this.select();
+	this.updateRow()
+};
+Blockly.Toolbox.TreeNode.prototype.onDoubleClick_ = function (a) { };
+Blockly.Toolbox.TreeNode.prototype.onKeyDown = function (a) {
+	if (this.tree.toolbox_.horizontalLayout_) {
+		var b = {},
+			c = goog.events.KeyCodes.DOWN,
+			d = goog.events.KeyCodes.UP;
+		b[goog.events.KeyCodes.RIGHT] = this.rightToLeft_ ? d : c;
+		b[goog.events.KeyCodes.LEFT] = this.rightToLeft_ ? c : d;
+		b[goog.events.KeyCodes.UP] = goog.events.KeyCodes.LEFT;
+		b[goog.events.KeyCodes.DOWN] = goog.events.KeyCodes.RIGHT;
+		a.keyCode = b[a.keyCode] || a.keyCode
+	}
+	return Blockly.Toolbox.TreeNode.superClass_.onKeyDown.call(this, a)
+};
+Blockly.Toolbox.TreeSeparator = function (a) {
+	Blockly.Toolbox.TreeNode.call(this, null, "", a)
+};
+goog.inherits(Blockly.Toolbox.TreeSeparator, Blockly.Toolbox.TreeNode);
+Blockly.Css = {};
+Blockly.Css.Cursor = {
+	OPEN: "handopen",
+	CLOSED: "handclosed",
+	DELETE: "handdelete"
+};
+Blockly.Css.currentCursor_ = "";
+Blockly.Css.styleSheet_ = null;
+Blockly.Css.mediaPath_ = "";
+Blockly.Css.inject = function (a, b) {
+	if (!Blockly.Css.styleSheet_) {
+		var c = ".blocklyDraggable {}\n";
+		a && (c += Blockly.Css.CONTENT.join("\n"), Blockly.FieldDate && (c += Blockly.FieldDate.CSS.join("\n")));
+		Blockly.Css.mediaPath_ = b.replace(/[\\\/]$/, "");
+		var c = c.replace(/<<<PATH>>>/g, Blockly.Css.mediaPath_),
+			d = document.createElement("style");
+		document.head.insertBefore(d, document.head.firstChild);
+		c = document.createTextNode(c);
+		d.appendChild(c);
+		Blockly.Css.styleSheet_ = d.sheet;
+		Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN)
+	}
+};
+Blockly.Css.setCursor = function (a) {
+	if (Blockly.Css.currentCursor_ != a) {
+		Blockly.Css.currentCursor_ = a;
+		var b = "url(" + Blockly.Css.mediaPath_ + "/" + a + ".cur), auto",
+			c = ".blocklyDraggable {\n  cursor: " + b + ";\n}\n";
+		Blockly.Css.styleSheet_.deleteRule(0);
+		Blockly.Css.styleSheet_.insertRule(c, 0);
+		for (var c = document.getElementsByClassName("blocklyToolboxDiv"), d = 0, e; e = c[d]; d++) e.style.cursor = a == Blockly.Css.Cursor.DELETE ? b : "";
+		document.body.parentNode.style.cursor = a == Blockly.Css.Cursor.OPEN ? "" : b
+	}
+};
+Blockly.Css.CONTENT = [".blocklySvg {", "background-color: #fff;", "outline: none;", "overflow: hidden;", "display: block;", "}", ".blocklyWidgetDiv {", "display: none;", "position: absolute;", "z-index: 99999;", "}", ".injectionDiv {", "height: 100%;", "position: relative;", "}", ".blocklyNonSelectable {", "user-select: none;", "-moz-user-select: none;", "-webkit-user-select: none;", "-ms-user-select: none;", "}", ".blocklyTooltipDiv {", "background-color: #ffffc7;", "border: 1px solid #ddc;", "box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);",
+	"color: #000;", "display: none;", "font-family: sans-serif;", "font-size: 9pt;", "opacity: 0.9;", "padding: 2px;", "position: absolute;", "z-index: 100000;", "}", ".blocklyResizeSE {", "cursor: se-resize;", "fill: #aaa;", "}", ".blocklyResizeSW {", "cursor: sw-resize;", "fill: #aaa;", "}", ".blocklyResizeLine {", "stroke: #888;", "stroke-width: 1;", "}", ".blocklyHighlightedConnectionPath {", "fill: none;", "stroke: #fc3;", "stroke-width: 4px;", "}", ".blocklyPathLight {", "fill: none;", "stroke-linecap: round;", "stroke-width: 1;",
+	"}", ".blocklySelected>.blocklyPath {", "stroke: #fc3;", "stroke-width: 3px;", "}", ".blocklySelected>.blocklyPathLight {", "display: none;", "}", ".blocklyDragging>.blocklyPath,", ".blocklyDragging>.blocklyPathLight {", "fill-opacity: .8;", "stroke-opacity: .8;", "}", ".blocklyDragging>.blocklyPathDark {", "display: none;", "}", ".blocklyDisabled>.blocklyPath {", "fill-opacity: .5;", "stroke-opacity: .5;", "}", ".blocklyDisabled>.blocklyPathLight,", ".blocklyDisabled>.blocklyPathDark {", "display: none;", "}", ".blocklyText {",
+	"cursor: default;", "fill: #fff;", "font-family: sans-serif;", "font-size: 11pt;", "}", ".blocklyNonEditableText>text {", "pointer-events: none;", "}", ".blocklyNonEditableText>rect,", ".blocklyEditableText>rect {", "fill: #fff;", "fill-opacity: .6;", "}", ".blocklyNonEditableText>text,", ".blocklyEditableText>text {", "fill: #000;", "}", ".blocklyEditableText:hover>rect {", "stroke: #fff;", "stroke-width: 2;", "}", ".blocklyBubbleText {", "fill: #000;", "}", ".blocklyFlyoutButton {", "fill: #888;", "cursor: default;", "}",
+	".blocklyFlyoutButtonShadow {", "fill: #666;", "}", ".blocklyFlyoutButton:hover {", "fill: #aaa;", "}", ".blocklyFlyoutLabel {", "cursor: default;", "}", ".blocklyFlyoutLabelBackground {", "opacity: 0;", "}", ".blocklyFlyoutLabelText {", "fill: #000;", "}", ".blocklyFlyoutLabelText:hover {", "fill: #aaa;", "}", ".blocklySvg text {", "user-select: none;", "-moz-user-select: none;", "-webkit-user-select: none;", "cursor: inherit;", "}", ".blocklyHidden {", "display: none;", "}", ".blocklyFieldDropdown:not(.blocklyHidden) {",
+	"display: block;", "}", ".blocklyIconGroup {", "cursor: default;", "}", ".blocklyIconGroup:not(:hover),", ".blocklyIconGroupReadonly {", "opacity: .6;", "}", ".blocklyIconShape {", "fill: #00f;", "stroke: #fff;", "stroke-width: 1px;", "}", ".blocklyIconSymbol {", "fill: #fff;", "}", ".blocklyMinimalBody {", "margin: 0;", "padding: 0;", "}", ".blocklyCommentTextarea {", "background-color: #ffc;", "border: 0;", "margin: 0;", "padding: 2px;", "resize: none;", "}", ".blocklyHtmlInput {", "border: none;", "border-radius: 4px;", "font-family: sans-serif;",
+	"height: 100%;", "margin: 0;", "outline: none;", "padding: 0 1px;", "width: 100%", "}", ".blocklyMainBackground {", "stroke-width: 1;", "stroke: #c6c6c6;", "}", ".blocklyMutatorBackground {", "fill: #fff;", "stroke: #ddd;", "stroke-width: 1;", "}", ".blocklyFlyoutBackground {", "fill: #ddd;", "fill-opacity: .8;", "}", ".blocklyScrollbarBackground {", "opacity: 0;", "}", ".blocklyScrollbarHandle {", "fill: #ccc;", "}", ".blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,", ".blocklyScrollbarHandle:hover {", "fill: #bbb;",
+	"}", ".blocklyZoom>image {", "opacity: .4;", "}", ".blocklyZoom>image:hover {", "opacity: .6;", "}", ".blocklyZoom>image:active {", "opacity: .8;", "}", ".blocklyFlyout .blocklyScrollbarHandle {", "fill: #bbb;", "}", ".blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,", ".blocklyFlyout .blocklyScrollbarHandle:hover {", "fill: #aaa;", "}", ".blocklyInvalidInput {", "background: #faa;", "}", ".blocklyAngleCircle {", "stroke: #444;", "stroke-width: 1;", "fill: #ddd;", "fill-opacity: .8;", "}", ".blocklyAngleMarks {",
+	"stroke: #444;", "stroke-width: 1;", "}", ".blocklyAngleGauge {", "fill: #f88;", "fill-opacity: .8;", "}", ".blocklyAngleLine {", "stroke: #f00;", "stroke-width: 2;", "stroke-linecap: round;", "}", ".blocklyContextMenu {", "border-radius: 4px;", "}", ".blocklyDropdownMenu {", "padding: 0 !important;", "}", ".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,", ".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {", "background: url(<<<PATH>>>/sprites.png) no-repeat -48px -16px !important;", "}",
+	".blocklyToolboxDiv {", "background-color: #ddd;", "overflow-x: visible;", "overflow-y: auto;", "position: absolute;", "}", ".blocklyTreeRoot {", "padding: 4px 0;", "}", ".blocklyTreeRoot:focus {", "outline: none;", "}", ".blocklyTreeRow {", "height: 22px;", "line-height: 22px;", "margin-bottom: 3px;", "padding-right: 8px;", "white-space: nowrap;", "}", ".blocklyHorizontalTree {", "float: left;", "margin: 1px 5px 8px 0;", "}", ".blocklyHorizontalTreeRtl {", "float: right;", "margin: 1px 0 8px 5px;", "}", '.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {',
+	"margin-left: 8px;", "}", ".blocklyTreeRow:not(.blocklyTreeSelected):hover {", "background-color: #e4e4e4;", "}", ".blocklyTreeSeparator {", "border-bottom: solid #e5e5e5 1px;", "height: 0;", "margin: 5px 0;", "}", ".blocklyTreeSeparatorHorizontal {", "border-right: solid #e5e5e5 1px;", "width: 0;", "padding: 5px 0;", "margin: 0 5px;", "}", ".blocklyTreeIcon {", "background-image: url(<<<PATH>>>/sprites.png);", "height: 16px;", "vertical-align: middle;", "width: 16px;", "}", ".blocklyTreeIconClosedLtr {", "background-position: -32px -1px;",
+	"}", ".blocklyTreeIconClosedRtl {", "background-position: 0px -1px;", "}", ".blocklyTreeIconOpen {", "background-position: -16px -1px;", "}", ".blocklyTreeSelected>.blocklyTreeIconClosedLtr {", "background-position: -32px -17px;", "}", ".blocklyTreeSelected>.blocklyTreeIconClosedRtl {", "background-position: 0px -17px;", "}", ".blocklyTreeSelected>.blocklyTreeIconOpen {", "background-position: -16px -17px;", "}", ".blocklyTreeIconNone,", ".blocklyTreeSelected>.blocklyTreeIconNone {", "background-position: -48px -1px;",
+	"}", ".blocklyTreeLabel {", "cursor: default;", "font-family: sans-serif;", "font-size: 16px;", "padding: 0 3px;", "vertical-align: middle;", "}", ".blocklyTreeSelected .blocklyTreeLabel {", "color: #fff;", "}", ".blocklyWidgetDiv .goog-palette {", "outline: none;", "cursor: default;", "}", ".blocklyWidgetDiv .goog-palette-table {", "border: 1px solid #666;", "border-collapse: collapse;", "}", ".blocklyWidgetDiv .goog-palette-cell {", "height: 13px;", "width: 15px;", "margin: 0;", "border: 0;", "text-align: center;", "vertical-align: middle;",
+	"border-right: 1px solid #666;", "font-size: 1px;", "}", ".blocklyWidgetDiv .goog-palette-colorswatch {", "position: relative;", "height: 13px;", "width: 15px;", "border: 1px solid #666;", "}", ".blocklyWidgetDiv .goog-palette-cell-hover .goog-palette-colorswatch {", "border: 1px solid #FFF;", "}", ".blocklyWidgetDiv .goog-palette-cell-selected .goog-palette-colorswatch {", "border: 1px solid #000;", "color: #fff;", "}", ".blocklyWidgetDiv .goog-menu {", "background: #fff;", "border-color: #ccc #666 #666 #ccc;", "border-style: solid;",
+	"border-width: 1px;", "cursor: default;", "font: normal 13px Arial, sans-serif;", "margin: 0;", "outline: none;", "padding: 4px 0;", "position: absolute;", "overflow-y: auto;", "overflow-x: hidden;", "max-height: 100%;", "z-index: 20000;", "}", ".blocklyWidgetDiv .goog-menuitem {", "color: #000;", "font: normal 13px Arial, sans-serif;", "list-style: none;", "margin: 0;", "padding: 4px 7em 4px 28px;", "white-space: nowrap;", "}", ".blocklyWidgetDiv .goog-menuitem.goog-menuitem-rtl {", "padding-left: 7em;", "padding-right: 28px;",
+	"}", ".blocklyWidgetDiv .goog-menu-nocheckbox .goog-menuitem,", ".blocklyWidgetDiv .goog-menu-noicon .goog-menuitem {", "padding-left: 12px;", "}", ".blocklyWidgetDiv .goog-menu-noaccel .goog-menuitem {", "padding-right: 20px;", "}", ".blocklyWidgetDiv .goog-menuitem-content {", "color: #000;", "font: normal 13px Arial, sans-serif;", "}", ".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-accel,", ".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-content {", "color: #ccc !important;", "}", ".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-icon {",
+	"opacity: 0.3;", "-moz-opacity: 0.3;", "filter: alpha(opacity=30);", "}", ".blocklyWidgetDiv .goog-menuitem-highlight,", ".blocklyWidgetDiv .goog-menuitem-hover {", "background-color: #d6e9f8;", "border-color: #d6e9f8;", "border-style: dotted;", "border-width: 1px 0;", "padding-bottom: 3px;", "padding-top: 3px;", "}", ".blocklyWidgetDiv .goog-menuitem-checkbox,", ".blocklyWidgetDiv .goog-menuitem-icon {", "background-repeat: no-repeat;", "height: 16px;", "left: 6px;", "position: absolute;", "right: auto;", "vertical-align: middle;",
+	"width: 16px;", "}", ".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox,", ".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon {", "left: auto;", "right: 6px;", "}", ".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,", ".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {", "background: url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat -512px 0;", "}", ".blocklyWidgetDiv .goog-menuitem-accel {", "color: #999;", "direction: ltr;", "left: auto;", "padding: 0 6px;",
+	"position: absolute;", "right: 0;", "text-align: right;", "}", ".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-accel {", "left: 0;", "right: auto;", "text-align: left;", "}", ".blocklyWidgetDiv .goog-menuitem-mnemonic-hint {", "text-decoration: underline;", "}", ".blocklyWidgetDiv .goog-menuitem-mnemonic-separator {", "color: #999;", "font-size: 12px;", "padding-left: 4px;", "}", ".blocklyWidgetDiv .goog-menuseparator {", "border-top: 1px solid #ccc;", "margin: 4px 0;", "padding: 0;", "}", ""
+];
+Blockly.WidgetDiv = {};
+Blockly.WidgetDiv.DIV = null;
+Blockly.WidgetDiv.owner_ = null;
+Blockly.WidgetDiv.dispose_ = null;
+Blockly.WidgetDiv.createDom = function () {
+	Blockly.WidgetDiv.DIV || (Blockly.WidgetDiv.DIV = goog.dom.createDom("DIV", "blocklyWidgetDiv"), document.body.appendChild(Blockly.WidgetDiv.DIV))
+};
+Blockly.WidgetDiv.show = function (a, b, c) {
+	Blockly.WidgetDiv.hide();
+	Blockly.WidgetDiv.owner_ = a;
+	Blockly.WidgetDiv.dispose_ = c;
+	a = goog.style.getViewportPageOffset(document);
+	Blockly.WidgetDiv.DIV.style.top = a.y + "px";
+	Blockly.WidgetDiv.DIV.style.direction = b ? "rtl" : "ltr";
+	Blockly.WidgetDiv.DIV.style.display = "block"
+};
+Blockly.WidgetDiv.hide = function () {
+	Blockly.WidgetDiv.owner_ && (Blockly.WidgetDiv.owner_ = null, Blockly.WidgetDiv.DIV.style.display = "none", Blockly.WidgetDiv.DIV.style.left = "", Blockly.WidgetDiv.DIV.style.top = "", Blockly.WidgetDiv.dispose_ && Blockly.WidgetDiv.dispose_(), Blockly.WidgetDiv.dispose_ = null, goog.dom.removeChildren(Blockly.WidgetDiv.DIV))
+};
+Blockly.WidgetDiv.isVisible = function () {
+	return !!Blockly.WidgetDiv.owner_
+};
+Blockly.WidgetDiv.hideIfOwner = function (a) {
+	Blockly.WidgetDiv.owner_ == a && Blockly.WidgetDiv.hide()
+};
+Blockly.WidgetDiv.position = function (a, b, c, d, e) {
+	b < d.y && (b = d.y);
+	e ? a > c.width + d.x && (a = c.width + d.x) : a < d.x && (a = d.x);
+	Blockly.WidgetDiv.DIV.style.left = a + "px";
+	Blockly.WidgetDiv.DIV.style.top = b + "px";
+	Blockly.WidgetDiv.DIV.style.height = c.height + "px"
+};
+Blockly.inject = function (a, b) {
+	goog.isString(a) && (a = document.getElementById(a) || document.querySelector(a));
+	if (!goog.dom.contains(document, a)) throw "Error: container is not in current document.";
+	var c = new Blockly.Options(b || {}),
+		d = goog.dom.createDom("div", "injectionDiv");
+	a.appendChild(d);
+	d = Blockly.createDom_(d, c);
+	c = Blockly.createMainWorkspace_(d, c);
+	Blockly.init_(c);
+	c.markFocused();
+	Blockly.bindEventWithChecks_(d, "focus", c, c.markFocused);
+	Blockly.svgResize(c);
+	return c
+};
+Blockly.createDom_ = function (a, b) {
+	a.setAttribute("dir", "LTR");
+	goog.ui.Component.setDefaultRightToLeft(b.RTL);
+	Blockly.Css.inject(b.hasCss, b.pathToMedia);
+	var c = Blockly.createSvgElement("svg", {
+		xmlns: "http://www.w3.org/2000/svg",
+		"xmlns:html": "http://www.w3.org/1999/xhtml",
+		"xmlns:xlink": "http://www.w3.org/1999/xlink",
+		version: "1.1",
+		"class": "blocklySvg"
+	}, a),
+		d = Blockly.createSvgElement("defs", {}, c),
+		e = String(Math.random()).substring(2),
+		f = Blockly.createSvgElement("filter", {
+        	id: "blocklyEmbossFilter" + e
+		}, d);
+	Blockly.createSvgElement("feGaussianBlur", {
+		"in": "SourceAlpha",
+		stdDeviation: 1,
+		result: "blur"
+	}, f);
+	var g = Blockly.createSvgElement("feSpecularLighting", {
+		"in": "blur",
+		surfaceScale: 1,
+		specularConstant: .5,
+		specularExponent: 10,
+		"lighting-color": "white",
+		result: "specOut"
+	}, f);
+	Blockly.createSvgElement("fePointLight", {
+		x: -5E3,
+		y: -1E4,
+		z: 2E4
+	}, g);
+	Blockly.createSvgElement("feComposite", {
+		"in": "specOut",
+		in2: "SourceAlpha",
+		operator: "in",
+		result: "specOut"
+	}, f);
+	Blockly.createSvgElement("feComposite", {
+		"in": "SourceGraphic",
+		in2: "specOut",
+		operator: "arithmetic",
+		k1: 0,
+		k2: 1,
+		k3: 1,
+		k4: 0
+	}, f);
+	b.embossFilterId = f.id;
+	f = Blockly.createSvgElement("pattern", {
+		id: "blocklyDisabledPattern" + e,
+		patternUnits: "userSpaceOnUse",
+		width: 10,
+		height: 10
+	}, d);
+	Blockly.createSvgElement("rect", {
+		width: 10,
+		height: 10,
+		fill: "#aaa"
+	}, f);
+	Blockly.createSvgElement("path", {
+		d: "M 0 0 L 10 10 M 10 0 L 0 10",
+		stroke: "#cc0"
+	}, f);
+	b.disabledPatternId = f.id;
+	d = Blockly.createSvgElement("pattern", {
+		id: "blocklyGridPattern" + e,
+		patternUnits: "userSpaceOnUse"
+	}, d);
+	0 < b.gridOptions.length && 0 < b.gridOptions.spacing && (Blockly.createSvgElement("line", {
+		stroke: b.gridOptions.colour
+	}, d), 1 < b.gridOptions.length && Blockly.createSvgElement("line", {
+		stroke: b.gridOptions.colour
+	}, d));
+	b.gridPattern = d;
+	return c
+};
+Blockly.createMainWorkspace_ = function (a, b) {
+	b.parentWorkspace = null;
+	var c = new Blockly.WorkspaceSvg(b);
+	c.scale = b.zoomOptions.startScale;
+	a.appendChild(c.createDom("blocklyMainBackground"));
+	c.translate(0, 0);
+	c.markFocused();
+	b.readOnly || b.hasScrollbars || c.addChangeListener(function () {
+		if (Blockly.dragMode_ == Blockly.DRAG_NONE) {
+			var a = c.getMetrics(),
+				e = a.viewLeft + a.absoluteLeft,
+				f = a.viewTop + a.absoluteTop;
+			if (a.contentTop < f || a.contentTop + a.contentHeight > a.viewHeight + f || a.contentLeft < (b.RTL ? a.viewLeft : e) || a.contentLeft +
+				a.contentWidth > (b.RTL ? a.viewWidth : a.viewWidth + e))
+				for (var g = c.getTopBlocks(!1), h = 0, k; k = g[h]; h++) {
+					var m = k.getRelativeToSurfaceXY(),
+						p = k.getHeightWidth(),
+						l = f + 25 - p.height - m.y;
+					0 < l && k.moveBy(0, l);
+					l = f + a.viewHeight - 25 - m.y;
+					0 > l && k.moveBy(0, l);
+					l = 25 + e - m.x - (b.RTL ? 0 : p.width);
+					0 < l && k.moveBy(l, 0);
+					m = e + a.viewWidth - 25 - m.x + (b.RTL ? p.width : 0);
+					0 > m && k.moveBy(m, 0)
+				}
+		}
+	});
+	Blockly.svgResize(c);
+	Blockly.WidgetDiv.createDom();
+	Blockly.Tooltip.createDom();
+	return c
+};
+Blockly.init_ = function (a) {
+	var b = a.options,
+		c = a.getParentSvg();
+	Blockly.bindEventWithChecks_(c, "contextmenu", null, function (a) {
+		Blockly.isTargetInput_(a) || a.preventDefault()
+	});
+	c = Blockly.bindEventWithChecks_(window, "resize", null, function () {
+		Blockly.hideChaff(!0);
+		Blockly.svgResize(a)
+	});
+	a.setResizeHandlerWrapper(c);
+	Blockly.inject.bindDocumentEvents_();
+	b.languageTree && (a.toolbox_ ? a.toolbox_.init(a) : a.flyout_ && (a.flyout_.init(a), a.flyout_.show(b.languageTree.childNodes), a.flyout_.scrollToStart(), a.scrollX = a.flyout_.width_,
+		b.toolboxPosition == Blockly.TOOLBOX_AT_RIGHT && (a.scrollX *= -1), a.translate(a.scrollX, 0)));
+	b.hasScrollbars && (a.scrollbar = new Blockly.ScrollbarPair(a), a.scrollbar.resize());
+	b.hasSounds && Blockly.inject.loadSounds_(b.pathToMedia, a)
+};
+Blockly.inject.bindDocumentEvents_ = function () {
+	Blockly.documentEventsBound_ || (Blockly.bindEventWithChecks_(document, "keydown", null, Blockly.onKeyDown_), Blockly.bindEventWithChecks_(document, "touchend", null, Blockly.longStop_), Blockly.bindEventWithChecks_(document, "touchcancel", null, Blockly.longStop_), document.addEventListener("mouseup", Blockly.onMouseUp_, !1), goog.userAgent.IPAD && Blockly.bindEventWithChecks_(window, "orientationchange", document, function () {
+		Blockly.svgResize(Blockly.getMainWorkspace())
+	}));
+	Blockly.documentEventsBound_ = !0
+};
+Blockly.inject.loadSounds_ = function (a, b) {
+	b.loadAudio_([a + "click.mp3", a + "click.wav", a + "click.ogg"], "click");
+	b.loadAudio_([a + "disconnect.wav", a + "disconnect.mp3", a + "disconnect.ogg"], "disconnect");
+	b.loadAudio_([a + "delete.mp3", a + "delete.ogg", a + "delete.wav"], "delete");
+	var c = [],
+		d = function () {
+        	for (; c.length;) Blockly.unbindEvent_(c.pop());
+        	b.preloadAudio_()
+		};
+	c.push(Blockly.bindEventWithChecks_(document, "mousemove", null, d, !0));
+	c.push(Blockly.bindEventWithChecks_(document, "touchstart", null, d, !0))
+};
+Blockly.updateToolbox = function (a) {
+	console.warn("Deprecated call to Blockly.updateToolbox, use workspace.updateToolbox instead.");
+	Blockly.getMainWorkspace().updateToolbox(a)
+};
+Blockly.utils = {};
+Blockly.addClass_ = function (a, b) {
+	var c = a.getAttribute("class") || ""; -1 == (" " + c + " ").indexOf(" " + b + " ") && (c && (c += " "), a.setAttribute("class", c + b))
+};
+Blockly.removeClass_ = function (a, b) {
+	var c = a.getAttribute("class");
+	if (-1 != (" " + c + " ").indexOf(" " + b + " ")) {
+		for (var c = c.split(/\s+/), d = 0; d < c.length; d++) c[d] && c[d] != b || (c.splice(d, 1), d--);
+		c.length ? a.setAttribute("class", c.join(" ")) : a.removeAttribute("class")
+	}
+};
+Blockly.hasClass_ = function (a, b) {
+	return -1 != (" " + a.getAttribute("class") + " ").indexOf(" " + b + " ")
+};
+Blockly.bindEventWithChecks_ = function (a, b, c, d, e) {
+	var f = !1,
+		g = function (a) {
+        	var b = !e;
+        	a = Blockly.Touch.splitEventByTouches(a);
+        	for (var g = 0, h; h = a[g]; g++)
+        		if (!b || Blockly.Touch.shouldHandleEvent(h)) Blockly.Touch.setClientFromTouch(h), c ? d.call(c, h) : d(h), f = !0
+		};
+	a.addEventListener(b, g, !1);
+	var h = [
+		[a, b, g]
+	];
+	if (b in Blockly.Touch.TOUCH_MAP)
+		for (var k = function (a) {
+				g(a);
+				f && a.preventDefault()
+		}, m = 0, p; p = Blockly.Touch.TOUCH_MAP[b][m]; m++) a.addEventListener(p, k, !1), h.push([a, p, k]);
+	return h
+};
+Blockly.bindEvent_ = function (a, b, c, d) {
+	var e = function (a) {
+		c ? d.call(c, a) : d(a)
+	};
+	a.addEventListener(b, e, !1);
+	var f = [
+		[a, b, e]
+	];
+	if (b in Blockly.Touch.TOUCH_MAP)
+		for (var g = function (a) {
+				if (1 == a.changedTouches.length) {
+					var b = a.changedTouches[0];
+					a.clientX = b.clientX;
+					a.clientY = b.clientY
+		}
+				e(a);
+				a.preventDefault()
+		}, h = 0, k; k = Blockly.Touch.TOUCH_MAP[b][h]; h++) a.addEventListener(k, g, !1), f.push([a, k, g]);
+	return f
+};
+Blockly.unbindEvent_ = function (a) {
+	for (; a.length;) {
+		var b = a.pop(),
+			c = b[2];
+		b[0].removeEventListener(b[1], c, !1)
+	}
+	return c
+};
+Blockly.noEvent = function (a) {
+	a.preventDefault();
+	a.stopPropagation()
+};
+Blockly.isTargetInput_ = function (a) {
+	return "textarea" == a.target.type || "text" == a.target.type || "number" == a.target.type || "email" == a.target.type || "password" == a.target.type || "search" == a.target.type || "tel" == a.target.type || "url" == a.target.type || a.target.isContentEditable
+};
+Blockly.getRelativeXY_ = function (a) {
+	var b = new goog.math.Coordinate(0, 0),
+		c = a.getAttribute("x");
+	c && (b.x = parseInt(c, 10));
+	if (c = a.getAttribute("y")) b.y = parseInt(c, 10);
+	if (a = (a = a.getAttribute("transform")) && a.match(Blockly.getRelativeXY_.XY_REGEXP_)) b.x += parseFloat(a[1]), a[3] && (b.y += parseFloat(a[3]));
+	return b
+};
+Blockly.getRelativeXY_.XY_REGEXP_ = /translate\(\s*([-+\d.e]+)([ ,]\s*([-+\d.e]+)\s*\))?/;
+Blockly.getSvgXY_ = function (a, b) {
+	var c = 0,
+		d = 0,
+		e = 1;
+	if (goog.dom.contains(b.getCanvas(), a) || goog.dom.contains(b.getBubbleCanvas(), a)) e = b.scale;
+	do {
+		var f = Blockly.getRelativeXY_(a);
+		if (a == b.getCanvas() || a == b.getBubbleCanvas()) e = 1;
+		c += f.x * e;
+		d += f.y * e;
+		a = a.parentNode
+	} while (a && a != b.getParentSvg());
+	return new goog.math.Coordinate(c, d)
+};
+Blockly.createSvgElement = function (a, b, c, d) {
+	a = document.createElementNS(Blockly.SVG_NS, a);
+	for (var e in b) a.setAttribute(e, b[e]);
+	document.body.runtimeStyle && (a.runtimeStyle = a.currentStyle = a.style);
+	c && c.appendChild(a);
+	return a
+};
+Blockly.isRightButton = function (a) {
+	return a.ctrlKey && goog.userAgent.MAC ? !0 : 2 == a.button
+};
+Blockly.mouseToSvg = function (a, b, c) {
+	var d = b.createSVGPoint();
+	d.x = a.clientX;
+	d.y = a.clientY;
+	c || (c = b.getScreenCTM().inverse());
+	return d.matrixTransform(c)
+};
+Blockly.shortestStringLength = function (a) {
+	if (!a.length) return 0;
+	for (var b = a[0].length, c = 1; c < a.length; c++) b = Math.min(b, a[c].length);
+	return b
+};
+Blockly.commonWordPrefix = function (a, b) {
+	if (!a.length) return 0;
+	if (1 == a.length) return a[0].length;
+	for (var c = 0, d = b || Blockly.shortestStringLength(a), e = 0; e < d; e++) {
+		for (var f = a[0][e], g = 1; g < a.length; g++)
+			if (f != a[g][e]) return c;
+		" " == f && (c = e + 1)
+	}
+	for (g = 1; g < a.length; g++)
+		if ((f = a[g][e]) && " " != f) return c;
+	return d
+};
+Blockly.commonWordSuffix = function (a, b) {
+	if (!a.length) return 0;
+	if (1 == a.length) return a[0].length;
+	for (var c = 0, d = b || Blockly.shortestStringLength(a), e = 0; e < d; e++) {
+		for (var f = a[0].substr(-e - 1, 1), g = 1; g < a.length; g++)
+			if (f != a[g].substr(-e - 1, 1)) return c;
+		" " == f && (c = e + 1)
+	}
+	for (g = 1; g < a.length; g++)
+		if ((f = a[g].charAt(a[g].length - e - 1)) && " " != f) return c;
+	return d
+};
+Blockly.isNumber = function (a) {
+	return !!a.match(/^\s*-?\d+(\.\d+)?\s*$/)
+};
+Blockly.utils.tokenizeInterpolation = function (a) {
+	var b = [];
+	a = a.split("");
+	a.push("");
+	for (var c = 0, d = [], e = null, f = 0; f < a.length; f++) {
+		var g = a[f];
+		0 == c ? "%" == g ? c = 1 : d.push(g) : 1 == c ? "%" == g ? (d.push(g), c = 0) : "0" <= g && "9" >= g ? (c = 2, e = g, (g = d.join("")) && b.push(g), d.length = 0) : (d.push("%", g), c = 0) : 2 == c && ("0" <= g && "9" >= g ? e += g : (b.push(parseInt(e, 10)), f--, c = 0))
+	} (g = d.join("")) && b.push(g);
+	return b
+};
+Blockly.genUid = function () {
+	for (var a = Blockly.genUid.soup_.length, b = [], c = 0; 20 > c; c++) b[c] = Blockly.genUid.soup_.charAt(Math.random() * a);
+	return b.join("")
+};
+Blockly.genUid.soup_ = "!#$%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
+Blockly.utils.wrap = function (a, b) {
+	for (var c = a.split("\n"), d = 0; d < c.length; d++) c[d] = Blockly.utils.wrap_line_(c[d], b);
+	return c.join("\n")
+};
+Blockly.utils.wrap_line_ = function (a, b) {
+	if (a.length <= b) return a;
+	for (var c = a.trim().split(/\s+/), d = 0; d < c.length; d++) c[d].length > b && (b = c[d].length);
+	var e, d = -Infinity,
+		f, g = 1;
+	do {
+		e = d;
+		f = a;
+		for (var h = [], k = c.length / g, m = 1, d = 0; d < c.length - 1; d++) m < (d + 1.5) / k ? (m++, h[d] = !0) : h[d] = !1;
+		h = Blockly.utils.wrapMutate_(c, h, b);
+		d = Blockly.utils.wrapScore_(c, h, b);
+		a = Blockly.utils.wrapToText_(c, h);
+		g++
+	} while (d > e);
+	return f
+};
+Blockly.utils.wrapScore_ = function (a, b, c) {
+	for (var d = [0], e = [], f = 0; f < a.length; f++) d[d.length - 1] += a[f].length, !0 === b[f] ? (d.push(0), e.push(a[f].charAt(a[f].length - 1))) : !1 === b[f] && d[d.length - 1]++;
+	a = Math.max.apply(Math, d);
+	for (f = b = 0; f < d.length; f++) b -= 2 * Math.pow(Math.abs(c - d[f]), 1.5), b -= Math.pow(a - d[f], 1.5), -1 != ".?!".indexOf(e[f]) ? b += c / 3 : -1 != ",;)]}".indexOf(e[f]) && (b += c / 4);
+	1 < d.length && d[d.length - 1] <= d[d.length - 2] && (b += .5);
+	return b
+};
+Blockly.utils.wrapMutate_ = function (a, b, c) {
+	for (var d = Blockly.utils.wrapScore_(a, b, c), e, f = 0; f < b.length - 1; f++)
+		if (b[f] != b[f + 1]) {
+			var g = [].concat(b);
+			g[f] = !g[f];
+			g[f + 1] = !g[f + 1];
+			var h = Blockly.utils.wrapScore_(a, g, c);
+			h > d && (d = h, e = g)
+		}
+	return e ? Blockly.utils.wrapMutate_(a, e, c) : b
+};
+Blockly.utils.wrapToText_ = function (a, b) {
+	for (var c = [], d = 0; d < a.length; d++) c.push(a[d]), void 0 !== b[d] && c.push(b[d] ? "\n" : " ");
+	return c.join("")
+};
+var CLOSURE_DEFINES = {
+	"goog.DEBUG": !1
+};
+Blockly.mainWorkspace = null;
+Blockly.selected = null;
+Blockly.highlightedConnection_ = null;
+Blockly.localConnection_ = null;
+Blockly.draggingConnections_ = [];
+Blockly.clipboardXml_ = null;
+Blockly.clipboardSource_ = null;
+Blockly.dragMode_ = Blockly.DRAG_NONE;
+Blockly.flyoutButtonCallbacks_ = {};
+Blockly.registerButtonCallback = function (a, b) {
+	Blockly.flyoutButtonCallbacks_[a] = b
+};
+Blockly.hueToRgb = function (a) {
+	return goog.color.hsvToHex(a, Blockly.HSV_SATURATION, 255 * Blockly.HSV_VALUE)
+};
+Blockly.svgSize = function (a) {
+	return {
+		width: a.cachedWidth_,
+		height: a.cachedHeight_
+	}
+};
+Blockly.resizeSvgContents = function (a) {
+	a.resizeContents()
+};
+Blockly.svgResize = function (a) {
+	for (; a.options.parentWorkspace;) a = a.options.parentWorkspace;
+	var b = a.getParentSvg(),
+		c = b.parentNode;
+	if (c) {
+		var d = c.offsetWidth,
+			c = c.offsetHeight;
+		b.cachedWidth_ != d && (b.setAttribute("width", d + "px"), b.cachedWidth_ = d);
+		b.cachedHeight_ != c && (b.setAttribute("height", c + "px"), b.cachedHeight_ = c);
+		a.resize()
+	}
+};
+Blockly.onKeyDown_ = function (a) {
+	if (!Blockly.mainWorkspace.options.readOnly && !Blockly.isTargetInput_(a)) {
+		var b = !1;
+		if (27 == a.keyCode) Blockly.hideChaff();
+		else if (8 == a.keyCode || 46 == a.keyCode) a.preventDefault(), Blockly.selected && Blockly.selected.isDeletable() && (b = !0);
+		else if (a.altKey || a.ctrlKey || a.metaKey) Blockly.selected && Blockly.selected.isDeletable() && Blockly.selected.isMovable() && (67 == a.keyCode ? (Blockly.hideChaff(), Blockly.copy_(Blockly.selected)) : 88 == a.keyCode && (Blockly.copy_(Blockly.selected), b = !0)),
+			86 == a.keyCode ? Blockly.clipboardXml_ && (Blockly.Events.setGroup(!0), Blockly.clipboardSource_.paste(Blockly.clipboardXml_), Blockly.Events.setGroup(!1)) : 90 == a.keyCode && (Blockly.hideChaff(), Blockly.mainWorkspace.undo(a.shiftKey));
+		b && (Blockly.Events.setGroup(!0), Blockly.hideChaff(), Blockly.selected.dispose(Blockly.dragMode_ != Blockly.DRAG_FREE, !0), Blockly.highlightedConnection_ && (Blockly.highlightedConnection_.unhighlight(), Blockly.highlightedConnection_ = null), Blockly.Events.setGroup(!1))
+	}
+};
+Blockly.terminateDrag_ = function () {
+	Blockly.BlockSvg.terminateDrag();
+	Blockly.Flyout.terminateDrag_()
+};
+Blockly.copy_ = function (a) {
+	var b = Blockly.Xml.blockToDom(a);
+	Blockly.dragMode_ != Blockly.DRAG_FREE && Blockly.Xml.deleteNext(b);
+	var c = a.getRelativeToSurfaceXY();
+	b.setAttribute("x", a.RTL ? -c.x : c.x);
+	b.setAttribute("y", c.y);
+	Blockly.clipboardXml_ = b;
+	Blockly.clipboardSource_ = a.workspace
+};
+Blockly.duplicate_ = function (a) {
+	var b = Blockly.clipboardXml_,
+		c = Blockly.clipboardSource_;
+	Blockly.copy_(a);
+	a.workspace.paste(Blockly.clipboardXml_);
+	Blockly.clipboardXml_ = b;
+	Blockly.clipboardSource_ = c
+};
+Blockly.onContextMenu_ = function (a) {
+	Blockly.isTargetInput_(a) || a.preventDefault()
+};
+Blockly.hideChaff = function (a) {
+	Blockly.Tooltip.hide();
+	Blockly.WidgetDiv.hide();
+	a || (a = Blockly.getMainWorkspace(), a.toolbox_ && a.toolbox_.flyout_ && a.toolbox_.flyout_.autoClose && a.toolbox_.clearSelection())
+};
+Blockly.addChangeListener = function (a) {
+	console.warn("Deprecated call to Blockly.addChangeListener, use workspace.addChangeListener instead.");
+	return Blockly.getMainWorkspace().addChangeListener(a)
+};
+Blockly.getMainWorkspace = function () {
+	return Blockly.mainWorkspace
+};
+Blockly.alert = function (a, b) {
+	window.alert(a);
+	b && b()
+};
+Blockly.confirm = function (a, b) {
+	b(window.confirm(a))
+};
+Blockly.prompt = function (a, b, c) {
+	c(window.prompt(a, b))
+};
+Blockly.jsonInitFactory_ = function (a) {
+	return function () {
+		this.jsonInit(a)
+	}
+};
+Blockly.defineBlocksWithJsonArray = function (a) {
+	for (var b = 0, c; c = a[b]; b++) Blockly.Blocks[c.type] = {
+		init: Blockly.jsonInitFactory_(c)
+	}
+};
+goog.global.console || (goog.global.console = {
+	log: function () { },
+	warn: function () { }
+});
+goog.global.Blockly || (goog.global.Blockly = {});
+goog.global.Blockly.getMainWorkspace = Blockly.getMainWorkspace;
+goog.global.Blockly.addChangeListener = Blockly.addChangeListener;
Index: EcnlProtoTool/trunk/webapp/webmrbc/js/blockly_compressed.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/js/blockly_compressed.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/js/blockly_compressed.js	(revision 270)
@@ -0,0 +1,22 @@
+"use strict";var COMPILED=!0,goog=goog||{};goog.global=this,goog.isDef=function(e){return void 0!==e},goog.exportPath_=function(e,o,t){e=e.split("."),t=t||goog.global,e[0]in t||!t.execScript||t.execScript("var "+e[0]);for(var n;e.length&&(n=e.shift());)!e.length&&goog.isDef(o)?t[n]=o:t=t[n]?t[n]:t[n]={}},goog.define=function(e,o){var t=o;COMPILED||(goog.global.CLOSURE_UNCOMPILED_DEFINES&&Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_UNCOMPILED_DEFINES,e)?t=goog.global.CLOSURE_UNCOMPILED_DEFINES[e]:goog.global.CLOSURE_DEFINES&&Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_DEFINES,e)&&(t=goog.global.CLOSURE_DEFINES[e])),goog.exportPath_(e,t)},goog.DEBUG=!1,goog.LOCALE="en",goog.TRUSTED_SITE=!0,goog.STRICT_MODE_COMPATIBLE=!1,goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG,goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1,goog.provide=function(e){if(goog.isInModuleLoader_())throw Error("goog.provide can not be used within a goog.module.");if(!COMPILED&&goog.isProvided_(e))throw Error('Namespace "'+e+'" already declared.');goog.constructNamespace_(e)},goog.constructNamespace_=function(e,o){if(!COMPILED){delete goog.implicitNamespaces_[e];for(var t=e;(t=t.substring(0,t.lastIndexOf(".")))&&!goog.getObjectByName(t);)goog.implicitNamespaces_[t]=!0}goog.exportPath_(e,o)},goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/,goog.module=function(e){if(!goog.isString(e)||!e||-1==e.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInModuleLoader_())throw Error("Module "+e+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");if(goog.moduleLoaderState_.moduleName=e,!COMPILED){if(goog.isProvided_(e))throw Error('Namespace "'+e+'" already declared.');delete goog.implicitNamespaces_[e]}},goog.module.get=function(e){return goog.module.getInternal_(e)},goog.module.getInternal_=function(e){return COMPILED?void 0:goog.isProvided_(e)?e in goog.loadedModules_?goog.loadedModules_[e]:goog.getObjectByName(e):null},goog.moduleLoaderState_=null,goog.isInModuleLoader_=function(){return null!=goog.moduleLoaderState_},goog.module.declareLegacyNamespace=function(){if(!COMPILED&&!goog.isInModuleLoader_())throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");if(!COMPILED&&!goog.moduleLoaderState_.moduleName)throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");goog.moduleLoaderState_.declareLegacyNamespace=!0},goog.setTestOnly=function(e){if(goog.DISALLOW_TEST_ONLY_CODE)throw e=e||"",Error("Importing test-only code into non-debug environment"+(e?": "+e:"."))},goog.forwardDeclare=function(e){},COMPILED||(goog.isProvided_=function(e){return e in goog.loadedModules_||!goog.implicitNamespaces_[e]&&goog.isDefAndNotNull(goog.getObjectByName(e))},goog.implicitNamespaces_={"goog.module":!0}),goog.getObjectByName=function(e,o){for(var t,n=e.split("."),r=o||goog.global;t=n.shift();){if(!goog.isDefAndNotNull(r[t]))return null;r=r[t]}return r},goog.globalize=function(e,o){var t,n=o||goog.global;for(t in e)n[t]=e[t]},goog.addDependency=function(e,o,t,n){if(goog.DEPENDENCIES_ENABLED){var r;e=e.replace(/\\/g,"/");var i=goog.dependencies_;n&&"boolean"!=typeof n||(n=n?{module:"goog"}:{});for(var s=0;r=o[s];s++)i.nameToPath[r]=e,i.loadFlags[e]=n;for(n=0;o=t[n];n++)e in i.requires||(i.requires[e]={}),i.requires[e][o]=!0}},goog.ENABLE_DEBUG_LOADER=!0,goog.logToConsole_=function(e){goog.global.console&&goog.global.console.error(e)},goog.require=function(e){if(!COMPILED){if(goog.ENABLE_DEBUG_LOADER&&goog.IS_OLD_IE_&&goog.maybeProcessDeferredDep_(e),goog.isProvided_(e)){if(goog.isInModuleLoader_())return goog.module.getInternal_(e)}else if(goog.ENABLE_DEBUG_LOADER){var o=goog.getPathFromDeps_(e);if(!o)throw e="goog.require could not find: "+e,goog.logToConsole_(e),Error(e);goog.writeScripts_(o)}return null}},goog.basePath="",goog.nullFunction=function(){},goog.abstractMethod=function(){throw Error("unimplemented abstract method")},goog.addSingletonGetter=function(e){e.getInstance=function(){return e.instance_?e.instance_:(goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=e),e.instance_=new e)}},goog.instantiatedSingletons_=[],goog.LOAD_MODULE_USING_EVAL=!0,goog.SEAL_MODULE_EXPORTS=goog.DEBUG,goog.loadedModules_={},goog.DEPENDENCIES_ENABLED=!COMPILED&&goog.ENABLE_DEBUG_LOADER,goog.TRANSPILE="detect",goog.TRANSPILER="transpile.js",goog.DEPENDENCIES_ENABLED&&(goog.dependencies_={loadFlags:{},nameToPath:{},requires:{},visited:{},written:{},deferred:{}},goog.inHtmlDocument_=function(){var e=goog.global.document;return null!=e&&"write"in e},goog.findBasePath_=function(){if(goog.isDef(goog.global.CLOSURE_BASE_PATH))goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_())for(var e=goog.global.document.getElementsByTagName("SCRIPT"),o=e.length-1;o>=0;--o){var t=e[o].src,n=t.lastIndexOf("?"),n=-1==n?t.length:n;if("base.js"==t.substr(n-7,7)){goog.basePath=t.substr(0,n-7);break}}},goog.importScript_=function(e,o){(goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_)(e,o)&&(goog.dependencies_.written[e]=!0)},goog.IS_OLD_IE_=!(goog.global.atob||!goog.global.document||!goog.global.document.all),goog.importProcessedScript_=function(e,o,t){goog.importScript_("",'goog.retrieveAndExec_("'+e+'", '+o+", "+t+");")},goog.queuedModules_=[],goog.wrapModule_=function(e,o){return goog.LOAD_MODULE_USING_EVAL&&goog.isDef(goog.global.JSON)?"goog.loadModule("+goog.global.JSON.stringify(o+"\n//# sourceURL="+e+"\n")+");":'goog.loadModule(function(exports) {"use strict";'+o+"\n;return exports});\n//# sourceURL="+e+"\n"},goog.loadQueuedModules_=function(){var e=goog.queuedModules_.length;if(e>0){var o=goog.queuedModules_;goog.queuedModules_=[];for(var t=0;e>t;t++)goog.maybeProcessDeferredPath_(o[t])}},goog.maybeProcessDeferredDep_=function(e){goog.isDeferredModule_(e)&&goog.allDepsAreAvailable_(e)&&(e=goog.getPathFromDeps_(e),goog.maybeProcessDeferredPath_(goog.basePath+e))},goog.isDeferredModule_=function(e){var o=(e=goog.getPathFromDeps_(e))&&goog.dependencies_.loadFlags[e]||{},t=o.lang||"es3";return e&&("goog"==o.module||goog.needsTranspile_(t))?goog.basePath+e in goog.dependencies_.deferred:!1},goog.allDepsAreAvailable_=function(e){if((e=goog.getPathFromDeps_(e))&&e in goog.dependencies_.requires)for(var o in goog.dependencies_.requires[e])if(!goog.isProvided_(o)&&!goog.isDeferredModule_(o))return!1;return!0},goog.maybeProcessDeferredPath_=function(e){if(e in goog.dependencies_.deferred){var o=goog.dependencies_.deferred[e];delete goog.dependencies_.deferred[e],goog.globalEval(o)}},goog.loadModuleFromUrl=function(e){goog.retrieveAndExec_(e,!0,!1)},goog.writeScriptSrcNode_=function(e){goog.global.document.write('<script type="text/javascript" src="'+e+'"></script>')},goog.appendScriptSrcNode_=function(e){var o=goog.global.document,t=o.createElement("script");t.type="text/javascript",t.src=e,t.defer=!1,t.async=!1,o.head.appendChild(t)},goog.writeScriptTag_=function(e,o){if(goog.inHtmlDocument_()){var t=goog.global.document;if(!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING&&"complete"==t.readyState){if(/\bdeps.js$/.test(e))return!1;throw Error('Cannot write "'+e+'" after document load')}if(void 0===o)if(goog.IS_OLD_IE_){var n=" onreadystatechange='goog.onScriptLoad_(this, "+ ++goog.lastNonModuleScriptIndex_+")' ";t.write('<script type="text/javascript" src="'+e+'"'+n+"></script>")}else goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING?goog.appendScriptSrcNode_(e):goog.writeScriptSrcNode_(e);else t.write('<script type="text/javascript">'+o+"</script>");return!0}return!1},goog.needsTranspile_=function(e){if("always"==goog.TRANSPILE)return!0;if("never"==goog.TRANSPILE)return!1;if(goog.requiresTranspilation_||(goog.requiresTranspilation_=goog.createRequiresTranspilation_()),e in goog.requiresTranspilation_)return goog.requiresTranspilation_[e];throw Error("Unknown language mode: "+e)},goog.requiresTranspilation_=null,goog.lastNonModuleScriptIndex_=0,goog.onScriptLoad_=function(e,o){return"complete"==e.readyState&&goog.lastNonModuleScriptIndex_==o&&goog.loadQueuedModules_(),!0},goog.writeScripts_=function(e){function o(e){if(!(e in r.written||e in r.visited)){if(r.visited[e]=!0,e in r.requires)for(var i in r.requires[e])if(!goog.isProvided_(i)){if(!(i in r.nameToPath))throw Error("Undefined nameToPath for "+i);o(r.nameToPath[i])}e in n||(n[e]=!0,t.push(e))}}var t=[],n={},r=goog.dependencies_;for(o(e),e=0;e<t.length;e++){var i=t[e];goog.dependencies_.written[i]=!0}var s=goog.moduleLoaderState_;for(goog.moduleLoaderState_=null,e=0;e<t.length;e++){if(!(i=t[e]))throw goog.moduleLoaderState_=s,Error("Undefined script input");var l=r.loadFlags[i]||{},g=goog.needsTranspile_(l.lang||"es3");"goog"==l.module||g?goog.importProcessedScript_(goog.basePath+i,"goog"==l.module,g):goog.importScript_(goog.basePath+i)}goog.moduleLoaderState_=s},goog.getPathFromDeps_=function(e){return e in goog.dependencies_.nameToPath?goog.dependencies_.nameToPath[e]:null},goog.findBasePath_(),goog.global.CLOSURE_NO_DEPS||goog.importScript_(goog.basePath+"deps.js")),goog.loadModule=function(e){var o=goog.moduleLoaderState_;try{goog.moduleLoaderState_={moduleName:void 0,declareLegacyNamespace:!1};var t;if(goog.isFunction(e))t=e.call(void 0,{});else{if(!goog.isString(e))throw Error("Invalid module definition");t=goog.loadModuleFromSource_.call(void 0,e)}var n=goog.moduleLoaderState_.moduleName;if(!goog.isString(n)||!n)throw Error('Invalid module name "'+n+'"');goog.moduleLoaderState_.declareLegacyNamespace?goog.constructNamespace_(n,t):goog.SEAL_MODULE_EXPORTS&&Object.seal&&goog.isObject(t)&&Object.seal(t),goog.loadedModules_[n]=t}finally{goog.moduleLoaderState_=o}},goog.loadModuleFromSource_=function(a){return eval(a),{}},goog.normalizePath_=function(e){e=e.split("/");for(var o=0;o<e.length;)"."==e[o]?e.splice(o,1):o&&".."==e[o]&&e[o-1]&&".."!=e[o-1]?e.splice(--o,2):o++;return e.join("/")},goog.loadFileSync_=function(e){if(goog.global.CLOSURE_LOAD_FILE_SYNC)return goog.global.CLOSURE_LOAD_FILE_SYNC(e);try{var o=new goog.global.XMLHttpRequest;return o.open("get",e,!1),o.send(),0==o.status||200==o.status?o.responseText:null}catch(t){return null}},goog.retrieveAndExec_=function(e,o,t){if(!COMPILED){var n=e;e=goog.normalizePath_(e);var r=goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_,i=goog.loadFileSync_(e);if(null==i)throw Error('Load of "'+e+'" failed');t&&(i=goog.transpile_.call(goog.global,i,e)),i=o?goog.wrapModule_(e,i):i+("\n//# sourceURL="+e),goog.IS_OLD_IE_?(goog.dependencies_.deferred[n]=i,goog.queuedModules_.push(n)):r(e,i)}},goog.transpile_=function(a,b){var c=goog.global.$jscomp;c||(goog.global.$jscomp=c={});var d=c.transpile;if(!d){var e=goog.basePath+goog.TRANSPILER,f=goog.loadFileSync_(e);if(f){if(eval(f+"\n//# sourceURL="+e),goog.global.$gwtExport&&goog.global.$gwtExport.$jscomp&&!goog.global.$gwtExport.$jscomp.transpile)throw Error('The transpiler did not properly export the "transpile" method. $gwtExport: '+JSON.stringify(goog.global.$gwtExport));goog.global.$jscomp.transpile=goog.global.$gwtExport.$jscomp.transpile,c=goog.global.$jscomp,d=c.transpile}}return d||(d=c.transpile=function(e,o){return goog.logToConsole_(o+" requires transpilation but no transpiler was found."),e}),d(a,b)},goog.typeOf=function(e){var o=typeof e;if("object"==o){if(!e)return"null";if(e instanceof Array)return"array";if(e instanceof Object)return o;var t=Object.prototype.toString.call(e);if("[object Window]"==t)return"object";if("[object Array]"==t||"number"==typeof e.length&&"undefined"!=typeof e.splice&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("splice"))return"array";if("[object Function]"==t||"undefined"!=typeof e.call&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("call"))return"function"}else if("function"==o&&"undefined"==typeof e.call)return"object";return o},goog.isNull=function(e){return null===e},goog.isDefAndNotNull=function(e){return null!=e},goog.isArray=function(e){return"array"==goog.typeOf(e)},goog.isArrayLike=function(e){var o=goog.typeOf(e);return"array"==o||"object"==o&&"number"==typeof e.length},goog.isDateLike=function(e){return goog.isObject(e)&&"function"==typeof e.getFullYear},goog.isString=function(e){return"string"==typeof e},goog.isBoolean=function(e){return"boolean"==typeof e},goog.isNumber=function(e){return"number"==typeof e},goog.isFunction=function(e){return"function"==goog.typeOf(e)},goog.isObject=function(e){var o=typeof e;return"object"==o&&null!=e||"function"==o},goog.getUid=function(e){return e[goog.UID_PROPERTY_]||(e[goog.UID_PROPERTY_]=++goog.uidCounter_)},goog.hasUid=function(e){return!!e[goog.UID_PROPERTY_]},goog.removeUid=function(e){null!==e&&"removeAttribute"in e&&e.removeAttribute(goog.UID_PROPERTY_);try{delete e[goog.UID_PROPERTY_]}catch(o){}},goog.UID_PROPERTY_="closure_uid_"+(1e9*Math.random()>>>0),goog.uidCounter_=0,goog.getHashCode=goog.getUid,goog.removeHashCode=goog.removeUid,goog.cloneObject=function(e){var o=goog.typeOf(e);if("object"==o||"array"==o){if(e.clone)return e.clone();var t,o="array"==o?[]:{};for(t in e)o[t]=goog.cloneObject(e[t]);return o}return e},goog.bindNative_=function(e,o,t){return e.call.apply(e.bind,arguments)},goog.bindJs_=function(e,o,t){if(!e)throw Error();if(2<arguments.length){var n=Array.prototype.slice.call(arguments,2);return function(){var t=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(t,n),e.apply(o,t)}}return function(){return e.apply(o,arguments)}},goog.bind=function(e,o,t){return Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?goog.bind=goog.bindNative_:goog.bind=goog.bindJs_,goog.bind.apply(null,arguments)},goog.partial=function(e,o){var t=Array.prototype.slice.call(arguments,1);return function(){var o=t.slice();return o.push.apply(o,arguments),e.apply(this,o)}},goog.mixin=function(e,o){for(var t in o)e[t]=o[t]},goog.now=goog.TRUSTED_SITE&&Date.now||function(){return+new Date},goog.globalEval=function(e){if(goog.global.execScript)goog.global.execScript(e,"JavaScript");else{if(!goog.global.eval)throw Error("goog.globalEval not available");if(null==goog.evalWorksForGlobals_)if(goog.global.eval("var _evalTest_ = 1;"),"undefined"!=typeof goog.global._evalTest_){try{delete goog.global._evalTest_}catch(o){}goog.evalWorksForGlobals_=!0}else goog.evalWorksForGlobals_=!1;if(goog.evalWorksForGlobals_)goog.global.eval(e);else{var t=goog.global.document,n=t.createElement("SCRIPT");n.type="text/javascript",n.defer=!1,n.appendChild(t.createTextNode(e)),t.body.appendChild(n),t.body.removeChild(n)}}},goog.evalWorksForGlobals_=null,goog.getCssName=function(e,o){if("."==String(e).charAt(0))throw Error('className passed in goog.getCssName must not start with ".". You passed: '+e);var t=function(e){return goog.cssNameMapping_[e]||e},n=function(e){e=e.split("-");for(var o=[],n=0;n<e.length;n++)o.push(t(e[n]));return o.join("-")},n=goog.cssNameMapping_?"BY_WHOLE"==goog.cssNameMappingStyle_?t:n:function(e){return e},n=o?e+"-"+n(o):n(e);return goog.global.CLOSURE_CSS_NAME_MAP_FN?goog.global.CLOSURE_CSS_NAME_MAP_FN(n):n},goog.setCssNameMapping=function(e,o){goog.cssNameMapping_=e,goog.cssNameMappingStyle_=o},!COMPILED&&goog.global.CLOSURE_CSS_NAME_MAPPING&&(goog.cssNameMapping_=goog.global.CLOSURE_CSS_NAME_MAPPING),goog.getMsg=function(e,o){return o&&(e=e.replace(/\{\$([^}]+)}/g,function(e,t){return null!=o&&t in o?o[t]:e})),e},goog.getMsgWithFallback=function(e,o){return e},goog.exportSymbol=function(e,o,t){goog.exportPath_(e,o,t)},goog.exportProperty=function(e,o,t){e[o]=t},goog.inherits=function(e,o){function t(){}t.prototype=o.prototype,e.superClass_=o.prototype,e.prototype=new t,e.prototype.constructor=e,e.base=function(e,t,n){for(var r=Array(arguments.length-2),i=2;i<arguments.length;i++)r[i-2]=arguments[i];return o.prototype[t].apply(e,r)}},goog.base=function(e,o,t){var n=arguments.callee.caller;if(goog.STRICT_MODE_COMPATIBLE||goog.DEBUG&&!n)throw Error("arguments.caller not defined.  goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");if(n.superClass_){for(var r=Array(arguments.length-1),i=1;i<arguments.length;i++)r[i-1]=arguments[i];return n.superClass_.constructor.apply(e,r)}for(r=Array(arguments.length-2),i=2;i<arguments.length;i++)r[i-2]=arguments[i];for(var i=!1,s=e.constructor;s;s=s.superClass_&&s.superClass_.constructor)if(s.prototype[o]===n)i=!0;else if(i)return s.prototype[o].apply(e,r);if(e[o]===n)return e.constructor.prototype[o].apply(e,r);throw Error("goog.base called from a method of one name to a method of a different name")},goog.scope=function(e){if(goog.isInModuleLoader_())throw Error("goog.scope is not supported within a goog.module.");e.call(goog.global)},COMPILED||(goog.global.COMPILED=COMPILED),goog.defineClass=function(e,o){var t=o.constructor,n=o.statics;return t&&t!=Object.prototype.constructor||(t=function(){throw Error("cannot instantiate an interface (no constructor defined).")}),t=goog.defineClass.createSealingConstructor_(t,e),e&&goog.inherits(t,e),delete o.constructor,delete o.statics,goog.defineClass.applyProperties_(t.prototype,o),null!=n&&(n instanceof Function?n(t):goog.defineClass.applyProperties_(t,n)),t},goog.defineClass.SEAL_CLASS_INSTANCES=goog.DEBUG,goog.defineClass.createSealingConstructor_=function(e,o){if(!goog.defineClass.SEAL_CLASS_INSTANCES)return e;var t=!goog.defineClass.isUnsealable_(o),n=function(){var o=e.apply(this,arguments)||this;return o[goog.UID_PROPERTY_]=o[goog.UID_PROPERTY_],this.constructor===n&&t&&Object.seal instanceof Function&&Object.seal(o),o};return n},goog.defineClass.isUnsealable_=function(e){return e&&e.prototype&&e.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]},goog.defineClass.OBJECT_PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),goog.defineClass.applyProperties_=function(e,o){for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t]);for(var n=0;n<goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length;n++)t=goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[n],Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t])},goog.tagUnsealableClass=function(e){!COMPILED&&goog.defineClass.SEAL_CLASS_INSTANCES&&(e.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]=!0)},goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_="goog_defineClass_legacy_unsealable",goog.createRequiresTranspilation_=function(){function a(e,o){d?c[e]=!0:o()?c[e]=!1:d=c[e]=!0}function b(a){try{return!!eval(a)}catch(f){return!1}}var c={es3:!1},d=!1;return a("es5",function(){return b("[1,].length==1")}),a("es6",function(){return b('(()=>{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')}),a("es6-impl",function(){return!0}),a("es7",function(){return b("2 ** 2 == 4")}),a("es8",function(){return b("async () => 1, true")}),c},goog.debug={},goog.debug.Error=function(e){if(Error.captureStackTrace)Error.captureStackTrace(this,goog.debug.Error);else{var o=Error().stack;o&&(this.stack=o)}e&&(this.message=String(e)),this.reportErrorToServer=!0},goog.inherits(goog.debug.Error,Error),goog.debug.Error.prototype.name="CustomError",goog.dom={},goog.dom.NodeType={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12},goog.string={},goog.string.DETECT_DOUBLE_ESCAPING=!1,goog.string.FORCE_NON_DOM_HTML_UNESCAPING=!1,goog.string.Unicode={NBSP:"Â "},goog.string.startsWith=function(e,o){return 0==e.lastIndexOf(o,0)},goog.string.endsWith=function(e,o){var t=e.length-o.length;return t>=0&&e.indexOf(o,t)==t},goog.string.caseInsensitiveStartsWith=function(e,o){return 0==goog.string.caseInsensitiveCompare(o,e.substr(0,o.length))},goog.string.caseInsensitiveEndsWith=function(e,o){return 0==goog.string.caseInsensitiveCompare(o,e.substr(e.length-o.length,o.length))},goog.string.caseInsensitiveEquals=function(e,o){return e.toLowerCase()==o.toLowerCase()},goog.string.subs=function(e,o){for(var t=e.split("%s"),n="",r=Array.prototype.slice.call(arguments,1);r.length&&1<t.length;)n+=t.shift()+r.shift();return n+t.join("%s")},goog.string.collapseWhitespace=function(e){return e.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},goog.string.isEmptyOrWhitespace=function(e){return/^[\s\xa0]*$/.test(e)},goog.string.isEmptyString=function(e){return 0==e.length},goog.string.isEmpty=goog.string.isEmptyOrWhitespace,goog.string.isEmptyOrWhitespaceSafe=function(e){return goog.string.isEmptyOrWhitespace(goog.string.makeSafe(e))},goog.string.isEmptySafe=goog.string.isEmptyOrWhitespaceSafe,goog.string.isBreakingWhitespace=function(e){return!/[^\t\n\r ]/.test(e)},goog.string.isAlpha=function(e){return!/[^a-zA-Z]/.test(e)},goog.string.isNumeric=function(e){return!/[^0-9]/.test(e)},goog.string.isAlphaNumeric=function(e){return!/[^a-zA-Z0-9]/.test(e)},goog.string.isSpace=function(e){return" "==e},goog.string.isUnicodeChar=function(e){return 1==e.length&&e>=" "&&"~">=e||e>="Â"&&"ï¿½">=e},goog.string.stripNewlines=function(e){return e.replace(/(\r\n|\r|\n)+/g," ")},goog.string.canonicalizeNewlines=function(e){return e.replace(/(\r\n|\r|\n)/g,"\n")},goog.string.normalizeWhitespace=function(e){return e.replace(/\xa0|\s/g," ")},goog.string.normalizeSpaces=function(e){return e.replace(/\xa0|[ \t]+/g," ")},goog.string.collapseBreakingSpaces=function(e){return e.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")},goog.string.trim=goog.TRUSTED_SITE&&String.prototype.trim?function(e){return e.trim()}:function(e){return e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},goog.string.trimLeft=function(e){return e.replace(/^[\s\xa0]+/,"")},goog.string.trimRight=function(e){return e.replace(/[\s\xa0]+$/,"")},goog.string.caseInsensitiveCompare=function(e,o){var t=String(e).toLowerCase(),n=String(o).toLowerCase();return n>t?-1:t==n?0:1},goog.string.numberAwareCompare_=function(e,o,t){if(e==o)return 0;if(!e)return-1;if(!o)return 1;for(var n=e.toLowerCase().match(t),r=o.toLowerCase().match(t),i=Math.min(n.length,r.length),s=0;i>s;s++){t=n[s];var l=r[s];if(t!=l)return e=parseInt(t,10),!isNaN(e)&&(o=parseInt(l,10),!isNaN(o)&&e-o)?e-o:l>t?-1:1}return n.length!=r.length?n.length-r.length:o>e?-1:1},goog.string.intAwareCompare=function(e,o){return goog.string.numberAwareCompare_(e,o,/\d+|\D+/g)},goog.string.floatAwareCompare=function(e,o){return goog.string.numberAwareCompare_(e,o,/\d+|\.\d+|\D+/g)},goog.string.numerateCompare=goog.string.floatAwareCompare,goog.string.urlEncode=function(e){return encodeURIComponent(String(e))},goog.string.urlDecode=function(e){return decodeURIComponent(e.replace(/\+/g," "))},goog.string.newLineToBr=function(e,o){return e.replace(/(\r\n|\r|\n)/g,o?"<br />":"<br>")},goog.string.htmlEscape=function(e,o){if(o)e=e.replace(goog.string.AMP_RE_,"&amp;").replace(goog.string.LT_RE_,"&lt;").replace(goog.string.GT_RE_,"&gt;").replace(goog.string.QUOT_RE_,"&quot;").replace(goog.string.SINGLE_QUOTE_RE_,"&#39;").replace(goog.string.NULL_RE_,"&#0;"),goog.string.DETECT_DOUBLE_ESCAPING&&(e=e.replace(goog.string.E_RE_,"&#101;"));else{if(!goog.string.ALL_RE_.test(e))return e;-1!=e.indexOf("&")&&(e=e.replace(goog.string.AMP_RE_,"&amp;")),-1!=e.indexOf("<")&&(e=e.replace(goog.string.LT_RE_,"&lt;")),-1!=e.indexOf(">")&&(e=e.replace(goog.string.GT_RE_,"&gt;")),-1!=e.indexOf('"')&&(e=e.replace(goog.string.QUOT_RE_,"&quot;")),-1!=e.indexOf("'")&&(e=e.replace(goog.string.SINGLE_QUOTE_RE_,"&#39;")),-1!=e.indexOf("\x00")&&(e=e.replace(goog.string.NULL_RE_,"&#0;")),goog.string.DETECT_DOUBLE_ESCAPING&&-1!=e.indexOf("e")&&(e=e.replace(goog.string.E_RE_,"&#101;"))}return e},goog.string.AMP_RE_=/&/g,goog.string.LT_RE_=/</g,goog.string.GT_RE_=/>/g,goog.string.QUOT_RE_=/"/g,goog.string.SINGLE_QUOTE_RE_=/'/g,goog.string.NULL_RE_=/\x00/g,goog.string.E_RE_=/e/g,goog.string.ALL_RE_=goog.string.DETECT_DOUBLE_ESCAPING?/[\x00&<>"'e]/:/[\x00&<>"']/,goog.string.unescapeEntities=function(e){return goog.string.contains(e,"&")?!goog.string.FORCE_NON_DOM_HTML_UNESCAPING&&"document"in goog.global?goog.string.unescapeEntitiesUsingDom_(e):goog.string.unescapePureXmlEntities_(e):e},goog.string.unescapeEntitiesWithDocument=function(e,o){return goog.string.contains(e,"&")?goog.string.unescapeEntitiesUsingDom_(e,o):e},goog.string.unescapeEntitiesUsingDom_=function(e,o){var t,n={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'};return t=o?o.createElement("div"):goog.global.document.createElement("div"),e.replace(goog.string.HTML_ENTITY_PATTERN_,function(e,o){var r=n[e];if(r)return r;if("#"==o.charAt(0)){var i=Number("0"+o.substr(1));isNaN(i)||(r=String.fromCharCode(i))}return r||(t.innerHTML=e+" ",r=t.firstChild.nodeValue.slice(0,-1)),n[e]=r})},goog.string.unescapePureXmlEntities_=function(e){return e.replace(/&([^;]+);/g,function(e,o){switch(o){case"amp":return"&";case"lt":return"<";case"gt":return">";case"quot":return'"';default:if("#"==o.charAt(0)){var t=Number("0"+o.substr(1));if(!isNaN(t))return String.fromCharCode(t)}return e}})},goog.string.HTML_ENTITY_PATTERN_=/&([^;\s<&]+);?/g,goog.string.whitespaceEscape=function(e,o){return goog.string.newLineToBr(e.replace(/  /g," &#160;"),o)},goog.string.preserveSpaces=function(e){return e.replace(/(^|[\n ]) /g,"$1"+goog.string.Unicode.NBSP)},goog.string.stripQuotes=function(e,o){for(var t=o.length,n=0;t>n;n++){var r=1==t?o:o.charAt(n);if(e.charAt(0)==r&&e.charAt(e.length-1)==r)return e.substring(1,e.length-1)}return e},goog.string.truncate=function(e,o,t){return t&&(e=goog.string.unescapeEntities(e)),e.length>o&&(e=e.substring(0,o-3)+"..."),t&&(e=goog.string.htmlEscape(e)),e},goog.string.truncateMiddle=function(e,o,t,n){if(t&&(e=goog.string.unescapeEntities(e)),n&&e.length>o){n>o&&(n=o);var r=e.length-n;e=e.substring(0,o-n)+"..."+e.substring(r)}else e.length>o&&(n=Math.floor(o/2),r=e.length-n,e=e.substring(0,n+o%2)+"..."+e.substring(r));return t&&(e=goog.string.htmlEscape(e)),e},goog.string.specialEscapeChars_={"\x00":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","	":"\\t","
+":"\\x0B",'"':'\\"',"\\":"\\\\","<":"<"},goog.string.jsEscapeCache_={"'":"\\'"},goog.string.quote=function(e){e=String(e);for(var o=['"'],t=0;t<e.length;t++){var n=e.charAt(t),r=n.charCodeAt(0);o[t+1]=goog.string.specialEscapeChars_[n]||(r>31&&127>r?n:goog.string.escapeChar(n))}return o.push('"'),o.join("")},goog.string.escapeString=function(e){for(var o=[],t=0;t<e.length;t++)o[t]=goog.string.escapeChar(e.charAt(t));return o.join("")},goog.string.escapeChar=function(e){if(e in goog.string.jsEscapeCache_)return goog.string.jsEscapeCache_[e];if(e in goog.string.specialEscapeChars_)return goog.string.jsEscapeCache_[e]=goog.string.specialEscapeChars_[e];var o,t=e.charCodeAt(0);return t>31&&127>t?o=e:(256>t?(o="\\x",(16>t||t>256)&&(o+="0")):(o="\\u",4096>t&&(o+="0")),o+=t.toString(16).toUpperCase()),goog.string.jsEscapeCache_[e]=o},goog.string.contains=function(e,o){return-1!=e.indexOf(o)},goog.string.caseInsensitiveContains=function(e,o){return goog.string.contains(e.toLowerCase(),o.toLowerCase())},goog.string.countOf=function(e,o){return e&&o?e.split(o).length-1:0},goog.string.removeAt=function(e,o,t){var n=e;return o>=0&&o<e.length&&t>0&&(n=e.substr(0,o)+e.substr(o+t,e.length-o-t)),n},goog.string.remove=function(e,o){return e.replace(o,"")},goog.string.removeAll=function(e,o){var t=new RegExp(goog.string.regExpEscape(o),"g");return e.replace(t,"")},goog.string.replaceAll=function(e,o,t){return o=new RegExp(goog.string.regExpEscape(o),"g"),e.replace(o,t.replace(/\$/g,"$$$$"))},goog.string.regExpEscape=function(e){return String(e).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},goog.string.repeat=String.prototype.repeat?function(e,o){return e.repeat(o)}:function(e,o){return Array(o+1).join(e)},goog.string.padNumber=function(e,o,t){return e=goog.isDef(t)?e.toFixed(t):String(e),t=e.indexOf("."),-1==t&&(t=e.length),goog.string.repeat("0",Math.max(0,o-t))+e},goog.string.makeSafe=function(e){return null==e?"":String(e)},goog.string.buildString=function(e){return Array.prototype.join.call(arguments,"")},goog.string.getRandomString=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^goog.now()).toString(36)},goog.string.compareVersions=function(e,o){for(var t=0,n=goog.string.trim(String(e)).split("."),r=goog.string.trim(String(o)).split("."),i=Math.max(n.length,r.length),s=0;0==t&&i>s;s++){var l=n[s]||"",g=r[s]||"";do{if(l=/(\d*)(\D*)(.*)/.exec(l)||["","","",""],g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""],0==l[0].length&&0==g[0].length)break;var t=0==l[1].length?0:parseInt(l[1],10),a=0==g[1].length?0:parseInt(g[1],10),t=goog.string.compareElements_(t,a)||goog.string.compareElements_(0==l[2].length,0==g[2].length)||goog.string.compareElements_(l[2],g[2]),l=l[3],g=g[3]}while(0==t)}return t},goog.string.compareElements_=function(e,o){return o>e?-1:e>o?1:0},goog.string.hashCode=function(e){for(var o=0,t=0;t<e.length;++t)o=31*o+e.charCodeAt(t)>>>0;return o},goog.string.uniqueStringCounter_=2147483648*Math.random()|0,goog.string.createUniqueString=function(){return"goog_"+goog.string.uniqueStringCounter_++},goog.string.toNumber=function(e){var o=Number(e);return 0==o&&goog.string.isEmptyOrWhitespace(e)?NaN:o},goog.string.isLowerCamelCase=function(e){return/^[a-z]+([A-Z][a-z]*)*$/.test(e)},goog.string.isUpperCamelCase=function(e){return/^([A-Z][a-z]*)+$/.test(e)},goog.string.toCamelCase=function(e){return String(e).replace(/\-([a-z])/g,function(e,o){return o.toUpperCase()})},goog.string.toSelectorCase=function(e){return String(e).replace(/([A-Z])/g,"-$1").toLowerCase()},goog.string.toTitleCase=function(e,o){var t=goog.isString(o)?goog.string.regExpEscape(o):"\\s";return e.replace(new RegExp("(^"+(t?"|["+t+"]+":"")+")([a-z])","g"),function(e,o,t){return o+t.toUpperCase()})},goog.string.capitalize=function(e){return String(e.charAt(0)).toUpperCase()+String(e.substr(1)).toLowerCase()},goog.string.parseInt=function(e){return isFinite(e)&&(e=String(e)),goog.isString(e)?/^\s*-?0x/i.test(e)?parseInt(e,16):parseInt(e,10):NaN},goog.string.splitLimit=function(e,o,t){e=e.split(o);for(var n=[];t>0&&e.length;)n.push(e.shift()),t--;return e.length&&n.push(e.join(o)),n},goog.string.lastComponent=function(e,o){if(!o)return e;"string"==typeof o&&(o=[o]);for(var t=-1,n=0;n<o.length;n++)if(""!=o[n]){var r=e.lastIndexOf(o[n]);r>t&&(t=r)}return-1==t?e:e.slice(t+1)},goog.string.editDistance=function(e,o){var t=[],n=[];if(e==o)return 0;if(!e.length||!o.length)return Math.max(e.length,o.length);for(var r=0;r<o.length+1;r++)t[r]=r;for(r=0;r<e.length;r++){n[0]=r+1;for(var i=0;i<o.length;i++)n[i+1]=Math.min(n[i]+1,t[i+1]+1,t[i]+Number(e[r]!=o[i]));for(i=0;i<t.length;i++)t[i]=n[i]}return n[o.length]},goog.asserts={},goog.asserts.ENABLE_ASSERTS=goog.DEBUG,goog.asserts.AssertionError=function(e,o){o.unshift(e),goog.debug.Error.call(this,goog.string.subs.apply(null,o)),o.shift(),this.messagePattern=e},goog.inherits(goog.asserts.AssertionError,goog.debug.Error),goog.asserts.AssertionError.prototype.name="AssertionError",goog.asserts.DEFAULT_ERROR_HANDLER=function(e){throw e},goog.asserts.errorHandler_=goog.asserts.DEFAULT_ERROR_HANDLER,goog.asserts.doAssertFailure_=function(e,o,t,n){var r="Assertion failed";if(t)var r=r+(": "+t),i=n;else e&&(r+=": "+e,i=o);e=new goog.asserts.AssertionError(""+r,i||[]),goog.asserts.errorHandler_(e);
+},goog.asserts.setErrorHandler=function(e){goog.asserts.ENABLE_ASSERTS&&(goog.asserts.errorHandler_=e)},goog.asserts.assert=function(e,o,t){return goog.asserts.ENABLE_ASSERTS&&!e&&goog.asserts.doAssertFailure_("",null,o,Array.prototype.slice.call(arguments,2)),e},goog.asserts.fail=function(e,o){goog.asserts.ENABLE_ASSERTS&&goog.asserts.errorHandler_(new goog.asserts.AssertionError("Failure"+(e?": "+e:""),Array.prototype.slice.call(arguments,1)))},goog.asserts.assertNumber=function(e,o,t){return goog.asserts.ENABLE_ASSERTS&&!goog.isNumber(e)&&goog.asserts.doAssertFailure_("Expected number but got %s: %s.",[goog.typeOf(e),e],o,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertString=function(e,o,t){return goog.asserts.ENABLE_ASSERTS&&!goog.isString(e)&&goog.asserts.doAssertFailure_("Expected string but got %s: %s.",[goog.typeOf(e),e],o,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertFunction=function(e,o,t){return goog.asserts.ENABLE_ASSERTS&&!goog.isFunction(e)&&goog.asserts.doAssertFailure_("Expected function but got %s: %s.",[goog.typeOf(e),e],o,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertObject=function(e,o,t){return goog.asserts.ENABLE_ASSERTS&&!goog.isObject(e)&&goog.asserts.doAssertFailure_("Expected object but got %s: %s.",[goog.typeOf(e),e],o,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertArray=function(e,o,t){return goog.asserts.ENABLE_ASSERTS&&!goog.isArray(e)&&goog.asserts.doAssertFailure_("Expected array but got %s: %s.",[goog.typeOf(e),e],o,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertBoolean=function(e,o,t){return goog.asserts.ENABLE_ASSERTS&&!goog.isBoolean(e)&&goog.asserts.doAssertFailure_("Expected boolean but got %s: %s.",[goog.typeOf(e),e],o,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertElement=function(e,o,t){return!goog.asserts.ENABLE_ASSERTS||goog.isObject(e)&&e.nodeType==goog.dom.NodeType.ELEMENT||goog.asserts.doAssertFailure_("Expected Element but got %s: %s.",[goog.typeOf(e),e],o,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertInstanceof=function(e,o,t,n){return!goog.asserts.ENABLE_ASSERTS||e instanceof o||goog.asserts.doAssertFailure_("Expected instanceof %s but got %s.",[goog.asserts.getType_(o),goog.asserts.getType_(e)],t,Array.prototype.slice.call(arguments,3)),e},goog.asserts.assertObjectPrototypeIsIntact=function(){for(var e in Object.prototype)goog.asserts.fail(e+" should not be enumerable in Object.prototype.")},goog.asserts.getType_=function(e){return e instanceof Function?e.displayName||e.name||"unknown type name":e instanceof Object?e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e):null===e?"null":typeof e},goog.debug.entryPointRegistry={},goog.debug.EntryPointMonitor=function(){},goog.debug.entryPointRegistry.refList_=[],goog.debug.entryPointRegistry.monitors_=[],goog.debug.entryPointRegistry.monitorsMayExist_=!1,goog.debug.entryPointRegistry.register=function(e){if(goog.debug.entryPointRegistry.refList_[goog.debug.entryPointRegistry.refList_.length]=e,goog.debug.entryPointRegistry.monitorsMayExist_)for(var o=goog.debug.entryPointRegistry.monitors_,t=0;t<o.length;t++)e(goog.bind(o[t].wrap,o[t]))},goog.debug.entryPointRegistry.monitorAll=function(e){goog.debug.entryPointRegistry.monitorsMayExist_=!0;for(var o=goog.bind(e.wrap,e),t=0;t<goog.debug.entryPointRegistry.refList_.length;t++)goog.debug.entryPointRegistry.refList_[t](o);goog.debug.entryPointRegistry.monitors_.push(e)},goog.debug.entryPointRegistry.unmonitorAllIfPossible=function(e){var o=goog.debug.entryPointRegistry.monitors_;goog.asserts.assert(e==o[o.length-1],"Only the most recent monitor can be unwrapped."),e=goog.bind(e.unwrap,e);for(var t=0;t<goog.debug.entryPointRegistry.refList_.length;t++)goog.debug.entryPointRegistry.refList_[t](e);o.length--},goog.array={},goog.NATIVE_ARRAY_PROTOTYPES=goog.TRUSTED_SITE,goog.array.ASSUME_NATIVE_FUNCTIONS=!1,goog.array.peek=function(e){return e[e.length-1]},goog.array.last=goog.array.peek,goog.array.indexOf=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.indexOf)?function(e,o,t){return goog.asserts.assert(null!=e.length),Array.prototype.indexOf.call(e,o,t)}:function(e,o,t){if(t=null==t?0:0>t?Math.max(0,e.length+t):t,goog.isString(e))return goog.isString(o)&&1==o.length?e.indexOf(o,t):-1;for(;t<e.length;t++)if(t in e&&e[t]===o)return t;return-1},goog.array.lastIndexOf=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.lastIndexOf)?function(e,o,t){return goog.asserts.assert(null!=e.length),Array.prototype.lastIndexOf.call(e,o,null==t?e.length-1:t)}:function(e,o,t){if(t=null==t?e.length-1:t,0>t&&(t=Math.max(0,e.length+t)),goog.isString(e))return goog.isString(o)&&1==o.length?e.lastIndexOf(o,t):-1;for(;t>=0;t--)if(t in e&&e[t]===o)return t;return-1},goog.array.forEach=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.forEach)?function(e,o,t){goog.asserts.assert(null!=e.length),Array.prototype.forEach.call(e,o,t)}:function(e,o,t){for(var n=e.length,r=goog.isString(e)?e.split(""):e,i=0;n>i;i++)i in r&&o.call(t,r[i],i,e)},goog.array.forEachRight=function(e,o,t){for(var n=e.length,r=goog.isString(e)?e.split(""):e,n=n-1;n>=0;--n)n in r&&o.call(t,r[n],n,e)},goog.array.filter=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.filter)?function(e,o,t){return goog.asserts.assert(null!=e.length),Array.prototype.filter.call(e,o,t)}:function(e,o,t){for(var n=e.length,r=[],i=0,s=goog.isString(e)?e.split(""):e,l=0;n>l;l++)if(l in s){var g=s[l];o.call(t,g,l,e)&&(r[i++]=g)}return r},goog.array.map=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.map)?function(e,o,t){return goog.asserts.assert(null!=e.length),Array.prototype.map.call(e,o,t)}:function(e,o,t){for(var n=e.length,r=Array(n),i=goog.isString(e)?e.split(""):e,s=0;n>s;s++)s in i&&(r[s]=o.call(t,i[s],s,e));return r},goog.array.reduce=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduce)?function(e,o,t,n){return goog.asserts.assert(null!=e.length),n&&(o=goog.bind(o,n)),Array.prototype.reduce.call(e,o,t)}:function(e,o,t,n){var r=t;return goog.array.forEach(e,function(t,i){r=o.call(n,r,t,i,e)}),r},goog.array.reduceRight=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduceRight)?function(e,o,t,n){return goog.asserts.assert(null!=e.length),goog.asserts.assert(null!=o),n&&(o=goog.bind(o,n)),Array.prototype.reduceRight.call(e,o,t)}:function(e,o,t,n){var r=t;return goog.array.forEachRight(e,function(t,i){r=o.call(n,r,t,i,e)}),r},goog.array.some=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.some)?function(e,o,t){return goog.asserts.assert(null!=e.length),Array.prototype.some.call(e,o,t)}:function(e,o,t){for(var n=e.length,r=goog.isString(e)?e.split(""):e,i=0;n>i;i++)if(i in r&&o.call(t,r[i],i,e))return!0;return!1},goog.array.every=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.every)?function(e,o,t){return goog.asserts.assert(null!=e.length),Array.prototype.every.call(e,o,t)}:function(e,o,t){for(var n=e.length,r=goog.isString(e)?e.split(""):e,i=0;n>i;i++)if(i in r&&!o.call(t,r[i],i,e))return!1;return!0},goog.array.count=function(e,o,t){var n=0;return goog.array.forEach(e,function(e,r,i){o.call(t,e,r,i)&&++n},t),n},goog.array.find=function(e,o,t){return o=goog.array.findIndex(e,o,t),0>o?null:goog.isString(e)?e.charAt(o):e[o]},goog.array.findIndex=function(e,o,t){for(var n=e.length,r=goog.isString(e)?e.split(""):e,i=0;n>i;i++)if(i in r&&o.call(t,r[i],i,e))return i;return-1},goog.array.findRight=function(e,o,t){return o=goog.array.findIndexRight(e,o,t),0>o?null:goog.isString(e)?e.charAt(o):e[o]},goog.array.findIndexRight=function(e,o,t){for(var n=e.length,r=goog.isString(e)?e.split(""):e,n=n-1;n>=0;n--)if(n in r&&o.call(t,r[n],n,e))return n;return-1},goog.array.contains=function(e,o){return 0<=goog.array.indexOf(e,o)},goog.array.isEmpty=function(e){return 0==e.length},goog.array.clear=function(e){if(!goog.isArray(e))for(var o=e.length-1;o>=0;o--)delete e[o];e.length=0},goog.array.insert=function(e,o){goog.array.contains(e,o)||e.push(o)},goog.array.insertAt=function(e,o,t){goog.array.splice(e,t,0,o)},goog.array.insertArrayAt=function(e,o,t){goog.partial(goog.array.splice,e,t,0).apply(null,o)},goog.array.insertBefore=function(e,o,t){var n;2==arguments.length||0>(n=goog.array.indexOf(e,t))?e.push(o):goog.array.insertAt(e,o,n)},goog.array.remove=function(e,o){var t,n=goog.array.indexOf(e,o);return(t=n>=0)&&goog.array.removeAt(e,n),t},goog.array.removeLast=function(e,o){var t=goog.array.lastIndexOf(e,o);return t>=0?(goog.array.removeAt(e,t),!0):!1},goog.array.removeAt=function(e,o){return goog.asserts.assert(null!=e.length),1==Array.prototype.splice.call(e,o,1).length},goog.array.removeIf=function(e,o,t){return o=goog.array.findIndex(e,o,t),o>=0?(goog.array.removeAt(e,o),!0):!1},goog.array.removeAllIf=function(e,o,t){var n=0;return goog.array.forEachRight(e,function(r,i){o.call(t,r,i,e)&&goog.array.removeAt(e,i)&&n++}),n},goog.array.concat=function(e){return Array.prototype.concat.apply(Array.prototype,arguments)},goog.array.join=function(e){return Array.prototype.concat.apply(Array.prototype,arguments)},goog.array.toArray=function(e){var o=e.length;if(o>0){for(var t=Array(o),n=0;o>n;n++)t[n]=e[n];return t}return[]},goog.array.clone=goog.array.toArray,goog.array.extend=function(e,o){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(goog.isArrayLike(n)){var r=e.length||0,i=n.length||0;e.length=r+i;for(var s=0;i>s;s++)e[r+s]=n[s]}else e.push(n)}},goog.array.splice=function(e,o,t,n){return goog.asserts.assert(null!=e.length),Array.prototype.splice.apply(e,goog.array.slice(arguments,1))},goog.array.slice=function(e,o,t){return goog.asserts.assert(null!=e.length),2>=arguments.length?Array.prototype.slice.call(e,o):Array.prototype.slice.call(e,o,t)},goog.array.removeDuplicates=function(e,o,t){o=o||e;var n=function(e){return goog.isObject(e)?"o"+goog.getUid(e):(typeof e).charAt(0)+e};t=t||n;for(var n={},r=0,i=0;i<e.length;){var s=e[i++],l=t(s);Object.prototype.hasOwnProperty.call(n,l)||(n[l]=!0,o[r++]=s)}o.length=r},goog.array.binarySearch=function(e,o,t){return goog.array.binarySearch_(e,t||goog.array.defaultCompare,!1,o)},goog.array.binarySelect=function(e,o,t){return goog.array.binarySearch_(e,o,!0,void 0,t)},goog.array.binarySearch_=function(e,o,t,n,r){for(var i,s=0,l=e.length;l>s;){var g,a=s+l>>1;g=t?o.call(r,e[a],a,e):o(n,e[a]),g>0?s=a+1:(l=a,i=!g)}return i?s:~s},goog.array.sort=function(e,o){e.sort(o||goog.array.defaultCompare)},goog.array.stableSort=function(e,o){for(var t=Array(e.length),n=0;n<e.length;n++)t[n]={index:n,value:e[n]};var r=o||goog.array.defaultCompare;for(goog.array.sort(t,function(e,o){return r(e.value,o.value)||e.index-o.index}),n=0;n<e.length;n++)e[n]=t[n].value},goog.array.sortByKey=function(e,o,t){var n=t||goog.array.defaultCompare;goog.array.sort(e,function(e,t){return n(o(e),o(t))})},goog.array.sortObjectsByKey=function(e,o,t){goog.array.sortByKey(e,function(e){return e[o]},t)},goog.array.isSorted=function(e,o,t){o=o||goog.array.defaultCompare;for(var n=1;n<e.length;n++){var r=o(e[n-1],e[n]);if(r>0||0==r&&t)return!1}return!0},goog.array.equals=function(e,o,t){if(!goog.isArrayLike(e)||!goog.isArrayLike(o)||e.length!=o.length)return!1;var n=e.length;t=t||goog.array.defaultCompareEquality;for(var r=0;n>r;r++)if(!t(e[r],o[r]))return!1;return!0},goog.array.compare3=function(e,o,t){t=t||goog.array.defaultCompare;for(var n=Math.min(e.length,o.length),r=0;n>r;r++){var i=t(e[r],o[r]);if(0!=i)return i}return goog.array.defaultCompare(e.length,o.length)},goog.array.defaultCompare=function(e,o){return e>o?1:o>e?-1:0},goog.array.inverseDefaultCompare=function(e,o){return-goog.array.defaultCompare(e,o)},goog.array.defaultCompareEquality=function(e,o){return e===o},goog.array.binaryInsert=function(e,o,t){return t=goog.array.binarySearch(e,o,t),0>t?(goog.array.insertAt(e,o,-(t+1)),!0):!1},goog.array.binaryRemove=function(e,o,t){return o=goog.array.binarySearch(e,o,t),o>=0?goog.array.removeAt(e,o):!1},goog.array.bucket=function(e,o,t){for(var n={},r=0;r<e.length;r++){var i=e[r],s=o.call(t,i,r,e);goog.isDef(s)&&(n[s]||(n[s]=[])).push(i)}return n},goog.array.toObject=function(e,o,t){var n={};return goog.array.forEach(e,function(r,i){n[o.call(t,r,i,e)]=r}),n},goog.array.range=function(e,o,t){var n=[],r=0,i=e;if(t=t||1,void 0!==o&&(r=e,i=o),0>t*(i-r))return[];if(t>0)for(e=r;i>e;e+=t)n.push(e);else for(e=r;e>i;e+=t)n.push(e);return n},goog.array.repeat=function(e,o){for(var t=[],n=0;o>n;n++)t[n]=e;return t},goog.array.flatten=function(e){for(var o=[],t=0;t<arguments.length;t++){var n=arguments[t];if(goog.isArray(n))for(var r=0;r<n.length;r+=8192)for(var i=goog.array.slice(n,r,r+8192),i=goog.array.flatten.apply(null,i),s=0;s<i.length;s++)o.push(i[s]);else o.push(n)}return o},goog.array.rotate=function(e,o){return goog.asserts.assert(null!=e.length),e.length&&(o%=e.length,o>0?Array.prototype.unshift.apply(e,e.splice(-o,o)):0>o&&Array.prototype.push.apply(e,e.splice(0,-o))),e},goog.array.moveItem=function(e,o,t){goog.asserts.assert(o>=0&&o<e.length),goog.asserts.assert(t>=0&&t<e.length),o=Array.prototype.splice.call(e,o,1),Array.prototype.splice.call(e,t,0,o[0])},goog.array.zip=function(e){if(!arguments.length)return[];for(var o=[],t=arguments[0].length,n=1;n<arguments.length;n++)arguments[n].length<t&&(t=arguments[n].length);for(n=0;t>n;n++){for(var r=[],i=0;i<arguments.length;i++)r.push(arguments[i][n]);o.push(r)}return o},goog.array.shuffle=function(e,o){for(var t=o||Math.random,n=e.length-1;n>0;n--){var r=Math.floor(t()*(n+1)),i=e[n];e[n]=e[r],e[r]=i}},goog.array.copyByIndex=function(e,o){var t=[];return goog.array.forEach(o,function(o){t.push(e[o])}),t},goog.array.concatMap=function(e,o,t){return goog.array.concat.apply([],goog.array.map(e,o,t))},goog.labs={},goog.labs.userAgent={},goog.labs.userAgent.util={},goog.labs.userAgent.util.getNativeUserAgentString_=function(){var e=goog.labs.userAgent.util.getNavigator_();return e&&(e=e.userAgent)?e:""},goog.labs.userAgent.util.getNavigator_=function(){return goog.global.navigator},goog.labs.userAgent.util.userAgent_=goog.labs.userAgent.util.getNativeUserAgentString_(),goog.labs.userAgent.util.setUserAgent=function(e){goog.labs.userAgent.util.userAgent_=e||goog.labs.userAgent.util.getNativeUserAgentString_()},goog.labs.userAgent.util.getUserAgent=function(){return goog.labs.userAgent.util.userAgent_},goog.labs.userAgent.util.matchUserAgent=function(e){var o=goog.labs.userAgent.util.getUserAgent();return goog.string.contains(o,e)},goog.labs.userAgent.util.matchUserAgentIgnoreCase=function(e){var o=goog.labs.userAgent.util.getUserAgent();return goog.string.caseInsensitiveContains(o,e)},goog.labs.userAgent.util.extractVersionTuples=function(e){for(var o,t=RegExp("(\\w[\\w ]+)/([^\\s]+)\\s*(?:\\((.*?)\\))?","g"),n=[];o=t.exec(e);)n.push([o[1],o[2],o[3]||void 0]);return n},goog.object={},goog.object.is=function(e,o){return e===o?0!==e||1/e===1/o:e!==e&&o!==o},goog.object.forEach=function(e,o,t){for(var n in e)o.call(t,e[n],n,e)},goog.object.filter=function(e,o,t){var n,r={};for(n in e)o.call(t,e[n],n,e)&&(r[n]=e[n]);return r},goog.object.map=function(e,o,t){var n,r={};for(n in e)r[n]=o.call(t,e[n],n,e);return r},goog.object.some=function(e,o,t){for(var n in e)if(o.call(t,e[n],n,e))return!0;return!1},goog.object.every=function(e,o,t){for(var n in e)if(!o.call(t,e[n],n,e))return!1;return!0},goog.object.getCount=function(e){var o,t=0;for(o in e)t++;return t},goog.object.getAnyKey=function(e){for(var o in e)return o},goog.object.getAnyValue=function(e){for(var o in e)return e[o]},goog.object.contains=function(e,o){return goog.object.containsValue(e,o)},goog.object.getValues=function(e){var o,t=[],n=0;for(o in e)t[n++]=e[o];return t},goog.object.getKeys=function(e){var o,t=[],n=0;for(o in e)t[n++]=o;return t},goog.object.getValueByKeys=function(e,o){for(var t=goog.isArrayLike(o),n=t?o:arguments,t=t?0:1;t<n.length&&(e=e[n[t]],goog.isDef(e));t++);return e},goog.object.containsKey=function(e,o){return null!==e&&o in e},goog.object.containsValue=function(e,o){for(var t in e)if(e[t]==o)return!0;return!1},goog.object.findKey=function(e,o,t){for(var n in e)if(o.call(t,e[n],n,e))return n},goog.object.findValue=function(e,o,t){return(o=goog.object.findKey(e,o,t))&&e[o]},goog.object.isEmpty=function(e){for(var o in e)return!1;return!0},goog.object.clear=function(e){for(var o in e)delete e[o]},goog.object.remove=function(e,o){var t;return(t=o in e)&&delete e[o],t},goog.object.add=function(e,o,t){if(null!==e&&o in e)throw Error('The object already contains the key "'+o+'"');goog.object.set(e,o,t)},goog.object.get=function(e,o,t){return null!==e&&o in e?e[o]:t},goog.object.set=function(e,o,t){e[o]=t},goog.object.setIfUndefined=function(e,o,t){return o in e?e[o]:e[o]=t},goog.object.setWithReturnValueIfNotSet=function(e,o,t){return o in e?e[o]:(t=t(),e[o]=t)},goog.object.equals=function(e,o){for(var t in e)if(!(t in o)||e[t]!==o[t])return!1;for(t in o)if(!(t in e))return!1;return!0},goog.object.clone=function(e){var o,t={};for(o in e)t[o]=e[o];return t},goog.object.unsafeClone=function(e){var o=goog.typeOf(e);if("object"==o||"array"==o){if(goog.isFunction(e.clone))return e.clone();var t,o="array"==o?[]:{};for(t in e)o[t]=goog.object.unsafeClone(e[t]);return o}return e},goog.object.transpose=function(e){var o,t={};for(o in e)t[e[o]]=o;return t},goog.object.PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),goog.object.extend=function(e,o){for(var t,n,r=1;r<arguments.length;r++){n=arguments[r];for(t in n)e[t]=n[t];for(var i=0;i<goog.object.PROTOTYPE_FIELDS_.length;i++)t=goog.object.PROTOTYPE_FIELDS_[i],Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}},goog.object.create=function(e){var o=arguments.length;if(1==o&&goog.isArray(arguments[0]))return goog.object.create.apply(null,arguments[0]);if(o%2)throw Error("Uneven number of arguments");for(var t={},n=0;o>n;n+=2)t[arguments[n]]=arguments[n+1];return t},goog.object.createSet=function(e){var o=arguments.length;if(1==o&&goog.isArray(arguments[0]))return goog.object.createSet.apply(null,arguments[0]);for(var t={},n=0;o>n;n++)t[arguments[n]]=!0;return t},goog.object.createImmutableView=function(e){var o=e;return Object.isFrozen&&!Object.isFrozen(e)&&(o=Object.create(e),Object.freeze(o)),o},goog.object.isImmutableView=function(e){return!!Object.isFrozen&&Object.isFrozen(e)},goog.labs.userAgent.browser={},goog.labs.userAgent.browser.matchOpera_=function(){return goog.labs.userAgent.util.matchUserAgent("Opera")},goog.labs.userAgent.browser.matchIE_=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")},goog.labs.userAgent.browser.matchEdge_=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")},goog.labs.userAgent.browser.matchFirefox_=function(){return goog.labs.userAgent.util.matchUserAgent("Firefox")},goog.labs.userAgent.browser.matchSafari_=function(){return goog.labs.userAgent.util.matchUserAgent("Safari")&&!(goog.labs.userAgent.browser.matchChrome_()||goog.labs.userAgent.browser.matchCoast_()||goog.labs.userAgent.browser.matchOpera_()||goog.labs.userAgent.browser.matchEdge_()||goog.labs.userAgent.browser.isSilk()||goog.labs.userAgent.util.matchUserAgent("Android"))},goog.labs.userAgent.browser.matchCoast_=function(){return goog.labs.userAgent.util.matchUserAgent("Coast")},goog.labs.userAgent.browser.matchIosWebview_=function(){return(goog.labs.userAgent.util.matchUserAgent("iPad")||goog.labs.userAgent.util.matchUserAgent("iPhone"))&&!goog.labs.userAgent.browser.matchSafari_()&&!goog.labs.userAgent.browser.matchChrome_()&&!goog.labs.userAgent.browser.matchCoast_()&&goog.labs.userAgent.util.matchUserAgent("AppleWebKit")},goog.labs.userAgent.browser.matchChrome_=function(){return(goog.labs.userAgent.util.matchUserAgent("Chrome")||goog.labs.userAgent.util.matchUserAgent("CriOS"))&&!goog.labs.userAgent.browser.matchEdge_()},goog.labs.userAgent.browser.matchAndroidBrowser_=function(){return goog.labs.userAgent.util.matchUserAgent("Android")&&!(goog.labs.userAgent.browser.isChrome()||goog.labs.userAgent.browser.isFirefox()||goog.labs.userAgent.browser.isOpera()||goog.labs.userAgent.browser.isSilk())},goog.labs.userAgent.browser.isOpera=goog.labs.userAgent.browser.matchOpera_,goog.labs.userAgent.browser.isIE=goog.labs.userAgent.browser.matchIE_,goog.labs.userAgent.browser.isEdge=goog.labs.userAgent.browser.matchEdge_,goog.labs.userAgent.browser.isFirefox=goog.labs.userAgent.browser.matchFirefox_,goog.labs.userAgent.browser.isSafari=goog.labs.userAgent.browser.matchSafari_,goog.labs.userAgent.browser.isCoast=goog.labs.userAgent.browser.matchCoast_,goog.labs.userAgent.browser.isIosWebview=goog.labs.userAgent.browser.matchIosWebview_,goog.labs.userAgent.browser.isChrome=goog.labs.userAgent.browser.matchChrome_,goog.labs.userAgent.browser.isAndroidBrowser=goog.labs.userAgent.browser.matchAndroidBrowser_,goog.labs.userAgent.browser.isSilk=function(){return goog.labs.userAgent.util.matchUserAgent("Silk")},goog.labs.userAgent.browser.getVersion=function(){function e(e){return e=goog.array.find(e,n),t[e]||""}var o=goog.labs.userAgent.util.getUserAgent();if(goog.labs.userAgent.browser.isIE())return goog.labs.userAgent.browser.getIEVersion_(o);var o=goog.labs.userAgent.util.extractVersionTuples(o),t={};goog.array.forEach(o,function(e){t[e[0]]=e[1]});var n=goog.partial(goog.object.containsKey,t);return goog.labs.userAgent.browser.isOpera()?e(["Version","Opera"]):goog.labs.userAgent.browser.isEdge()?e(["Edge"]):goog.labs.userAgent.browser.isChrome()?e(["Chrome","CriOS"]):(o=o[2])&&o[1]||""},goog.labs.userAgent.browser.isVersionOrHigher=function(e){return 0<=goog.string.compareVersions(goog.labs.userAgent.browser.getVersion(),e)},goog.labs.userAgent.browser.getIEVersion_=function(e){var o=/rv: *([\d\.]*)/.exec(e);if(o&&o[1])return o[1];var o="",t=/MSIE +([\d\.]+)/.exec(e);if(t&&t[1])if(e=/Trident\/(\d.\d)/.exec(e),"7.0"==t[1])if(e&&e[1])switch(e[1]){case"4.0":o="8.0";break;case"5.0":o="9.0";break;case"6.0":o="10.0";break;case"7.0":o="11.0"}else o="7.0";else o=t[1];return o},goog.labs.userAgent.engine={},goog.labs.userAgent.engine.isPresto=function(){return goog.labs.userAgent.util.matchUserAgent("Presto")},goog.labs.userAgent.engine.isTrident=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")},goog.labs.userAgent.engine.isEdge=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")},goog.labs.userAgent.engine.isWebKit=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("WebKit")&&!goog.labs.userAgent.engine.isEdge()},goog.labs.userAgent.engine.isGecko=function(){return goog.labs.userAgent.util.matchUserAgent("Gecko")&&!goog.labs.userAgent.engine.isWebKit()&&!goog.labs.userAgent.engine.isTrident()&&!goog.labs.userAgent.engine.isEdge()},goog.labs.userAgent.engine.getVersion=function(){var e=goog.labs.userAgent.util.getUserAgent();if(e){var e=goog.labs.userAgent.util.extractVersionTuples(e),o=goog.labs.userAgent.engine.getEngineTuple_(e);if(o)return"Gecko"==o[0]?goog.labs.userAgent.engine.getVersionForKey_(e,"Firefox"):o[1];var t,e=e[0];if(e&&(t=e[2])&&(t=/Trident\/([^\s;]+)/.exec(t)))return t[1]}return""},goog.labs.userAgent.engine.getEngineTuple_=function(e){if(!goog.labs.userAgent.engine.isEdge())return e[1];for(var o=0;o<e.length;o++){var t=e[o];if("Edge"==t[0])return t}},goog.labs.userAgent.engine.isVersionOrHigher=function(e){return 0<=goog.string.compareVersions(goog.labs.userAgent.engine.getVersion(),e)},goog.labs.userAgent.engine.getVersionForKey_=function(e,o){var t=goog.array.find(e,function(e){return o==e[0]});return t&&t[1]||""},goog.labs.userAgent.platform={},goog.labs.userAgent.platform.isAndroid=function(){return goog.labs.userAgent.util.matchUserAgent("Android")},goog.labs.userAgent.platform.isIpod=function(){return goog.labs.userAgent.util.matchUserAgent("iPod")},goog.labs.userAgent.platform.isIphone=function(){return goog.labs.userAgent.util.matchUserAgent("iPhone")&&!goog.labs.userAgent.util.matchUserAgent("iPod")&&!goog.labs.userAgent.util.matchUserAgent("iPad")},goog.labs.userAgent.platform.isIpad=function(){return goog.labs.userAgent.util.matchUserAgent("iPad")},goog.labs.userAgent.platform.isIos=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpad()||goog.labs.userAgent.platform.isIpod()},goog.labs.userAgent.platform.isMacintosh=function(){return goog.labs.userAgent.util.matchUserAgent("Macintosh")},goog.labs.userAgent.platform.isLinux=function(){return goog.labs.userAgent.util.matchUserAgent("Linux")},goog.labs.userAgent.platform.isWindows=function(){return goog.labs.userAgent.util.matchUserAgent("Windows")},goog.labs.userAgent.platform.isChromeOS=function(){return goog.labs.userAgent.util.matchUserAgent("CrOS")},goog.labs.userAgent.platform.getVersion=function(){var e=goog.labs.userAgent.util.getUserAgent(),o="";return goog.labs.userAgent.platform.isWindows()?(o=/Windows (?:NT|Phone) ([0-9.]+)/,o=(e=o.exec(e))?e[1]:"0.0"):goog.labs.userAgent.platform.isIos()?(o=/(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/,o=(e=o.exec(e))&&e[1].replace(/_/g,".")):goog.labs.userAgent.platform.isMacintosh()?(o=/Mac OS X ([0-9_.]+)/,o=(e=o.exec(e))?e[1].replace(/_/g,"."):"10"):goog.labs.userAgent.platform.isAndroid()?(o=/Android\s+([^\);]+)(\)|;)/,o=(e=o.exec(e))&&e[1]):goog.labs.userAgent.platform.isChromeOS()&&(o=/(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/,o=(e=o.exec(e))&&e[1]),o||""},goog.labs.userAgent.platform.isVersionOrHigher=function(e){return 0<=goog.string.compareVersions(goog.labs.userAgent.platform.getVersion(),e)},goog.reflect={},goog.reflect.object=function(e,o){return o},goog.reflect.objectProperty=function(e,o){return e},goog.reflect.sinkValue=function(e){return goog.reflect.sinkValue[" "](e),e},goog.reflect.sinkValue[" "]=goog.nullFunction,goog.reflect.canAccessProperty=function(e,o){try{return goog.reflect.sinkValue(e[o]),!0}catch(t){}return!1},goog.reflect.cache=function(e,o,t,n){return n=n?n(o):o,Object.prototype.hasOwnProperty.call(e,n)?e[n]:e[n]=t(o)},goog.userAgent={},goog.userAgent.ASSUME_IE=!1,goog.userAgent.ASSUME_EDGE=!1,goog.userAgent.ASSUME_GECKO=!1,goog.userAgent.ASSUME_WEBKIT=!1,goog.userAgent.ASSUME_MOBILE_WEBKIT=!1,goog.userAgent.ASSUME_OPERA=!1,goog.userAgent.ASSUME_ANY_VERSION=!1,goog.userAgent.BROWSER_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_GECKO||goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_OPERA,goog.userAgent.getUserAgentString=function(){return goog.labs.userAgent.util.getUserAgent()},goog.userAgent.getNavigator=function(){return goog.global.navigator||null},goog.userAgent.OPERA=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_OPERA:goog.labs.userAgent.browser.isOpera(),goog.userAgent.IE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_IE:goog.labs.userAgent.browser.isIE(),goog.userAgent.EDGE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_EDGE:goog.labs.userAgent.engine.isEdge(),goog.userAgent.EDGE_OR_IE=goog.userAgent.EDGE||goog.userAgent.IE,goog.userAgent.GECKO=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_GECKO:goog.labs.userAgent.engine.isGecko(),goog.userAgent.WEBKIT=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_MOBILE_WEBKIT:goog.labs.userAgent.engine.isWebKit(),goog.userAgent.isMobile_=function(){return goog.userAgent.WEBKIT&&goog.labs.userAgent.util.matchUserAgent("Mobile")},goog.userAgent.MOBILE=goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.isMobile_(),goog.userAgent.SAFARI=goog.userAgent.WEBKIT,goog.userAgent.determinePlatform_=function(){var e=goog.userAgent.getNavigator();return e&&e.platform||""},goog.userAgent.PLATFORM=goog.userAgent.determinePlatform_(),goog.userAgent.ASSUME_MAC=!1,goog.userAgent.ASSUME_WINDOWS=!1,goog.userAgent.ASSUME_LINUX=!1,goog.userAgent.ASSUME_X11=!1,goog.userAgent.ASSUME_ANDROID=!1,goog.userAgent.ASSUME_IPHONE=!1,goog.userAgent.ASSUME_IPAD=!1,goog.userAgent.ASSUME_IPOD=!1,goog.userAgent.PLATFORM_KNOWN_=goog.userAgent.ASSUME_MAC||goog.userAgent.ASSUME_WINDOWS||goog.userAgent.ASSUME_LINUX||goog.userAgent.ASSUME_X11||goog.userAgent.ASSUME_ANDROID||goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD||goog.userAgent.ASSUME_IPOD,goog.userAgent.MAC=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_MAC:goog.labs.userAgent.platform.isMacintosh(),goog.userAgent.WINDOWS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_WINDOWS:goog.labs.userAgent.platform.isWindows(),goog.userAgent.isLegacyLinux_=function(){return goog.labs.userAgent.platform.isLinux()||goog.labs.userAgent.platform.isChromeOS()},goog.userAgent.LINUX=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_LINUX:goog.userAgent.isLegacyLinux_(),goog.userAgent.isX11_=function(){var e=goog.userAgent.getNavigator();return!!e&&goog.string.contains(e.appVersion||"","X11")},goog.userAgent.X11=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_X11:goog.userAgent.isX11_(),goog.userAgent.ANDROID=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_ANDROID:goog.labs.userAgent.platform.isAndroid(),goog.userAgent.IPHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE:goog.labs.userAgent.platform.isIphone(),goog.userAgent.IPAD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad(),goog.userAgent.IPOD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPOD:goog.labs.userAgent.platform.isIpod(),goog.userAgent.IOS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD||goog.userAgent.ASSUME_IPOD:goog.labs.userAgent.platform.isIos(),goog.userAgent.determineVersion_=function(){var e="",o=goog.userAgent.getVersionRegexResult_();return o&&(e=o?o[1]:""),goog.userAgent.IE&&(o=goog.userAgent.getDocumentMode_(),null!=o&&o>parseFloat(e))?String(o):e},goog.userAgent.getVersionRegexResult_=function(){var e=goog.userAgent.getUserAgentString();return goog.userAgent.GECKO?/rv\:([^\);]+)(\)|;)/.exec(e):goog.userAgent.EDGE?/Edge\/([\d\.]+)/.exec(e):goog.userAgent.IE?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):goog.userAgent.WEBKIT?/WebKit\/(\S+)/.exec(e):goog.userAgent.OPERA?/(?:Version)[ \/]?(\S+)/.exec(e):void 0},goog.userAgent.getDocumentMode_=function(){var e=goog.global.document;return e?e.documentMode:void 0},goog.userAgent.VERSION=goog.userAgent.determineVersion_(),goog.userAgent.compare=function(e,o){return goog.string.compareVersions(e,o)},goog.userAgent.isVersionOrHigherCache_={},goog.userAgent.isVersionOrHigher=function(e){return goog.userAgent.ASSUME_ANY_VERSION||goog.reflect.cache(goog.userAgent.isVersionOrHigherCache_,e,function(){return 0<=goog.string.compareVersions(goog.userAgent.VERSION,e)})},goog.userAgent.isVersion=goog.userAgent.isVersionOrHigher,goog.userAgent.isDocumentModeOrHigher=function(e){return Number(goog.userAgent.DOCUMENT_MODE)>=e},goog.userAgent.isDocumentMode=goog.userAgent.isDocumentModeOrHigher,goog.userAgent.DOCUMENT_MODE=function(){var e=goog.global.document,o=goog.userAgent.getDocumentMode_();return e&&goog.userAgent.IE?o||("CSS1Compat"==e.compatMode?parseInt(goog.userAgent.VERSION,10):5):void 0}(),goog.events={},goog.events.BrowserFeature={HAS_W3C_BUTTON:!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9),HAS_W3C_EVENT_SUPPORT:!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9),SET_KEY_CODE_TO_PREVENT_DEFAULT:goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("9"),HAS_NAVIGATOR_ONLINE_PROPERTY:!goog.userAgent.WEBKIT||goog.userAgent.isVersionOrHigher("528"),HAS_HTML5_NETWORK_EVENT_SUPPORT:goog.userAgent.GECKO&&goog.userAgent.isVersionOrHigher("1.9b")||goog.userAgent.IE&&goog.userAgent.isVersionOrHigher("8")||goog.userAgent.OPERA&&goog.userAgent.isVersionOrHigher("9.5")||goog.userAgent.WEBKIT&&goog.userAgent.isVersionOrHigher("528"),
+HTML5_NETWORK_EVENTS_FIRE_ON_BODY:goog.userAgent.GECKO&&!goog.userAgent.isVersionOrHigher("8")||goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("9"),TOUCH_ENABLED:"ontouchstart"in goog.global||!!(goog.global.document&&document.documentElement&&"ontouchstart"in document.documentElement)||!(!goog.global.navigator||!goog.global.navigator.msMaxTouchPoints)},goog.disposable={},goog.disposable.IDisposable=function(){},goog.disposable.IDisposable.prototype.dispose=goog.abstractMethod,goog.disposable.IDisposable.prototype.isDisposed=goog.abstractMethod,goog.Disposable=function(){goog.Disposable.MONITORING_MODE!=goog.Disposable.MonitoringMode.OFF&&(goog.Disposable.INCLUDE_STACK_ON_CREATION&&(this.creationStack=Error().stack),goog.Disposable.instances_[goog.getUid(this)]=this),this.disposed_=this.disposed_,this.onDisposeCallbacks_=this.onDisposeCallbacks_},goog.Disposable.MonitoringMode={OFF:0,PERMANENT:1,INTERACTIVE:2},goog.Disposable.MONITORING_MODE=0,goog.Disposable.INCLUDE_STACK_ON_CREATION=!0,goog.Disposable.instances_={},goog.Disposable.getUndisposedObjects=function(){var e,o=[];for(e in goog.Disposable.instances_)goog.Disposable.instances_.hasOwnProperty(e)&&o.push(goog.Disposable.instances_[Number(e)]);return o},goog.Disposable.clearUndisposedObjects=function(){goog.Disposable.instances_={}},goog.Disposable.prototype.disposed_=!1,goog.Disposable.prototype.isDisposed=function(){return this.disposed_},goog.Disposable.prototype.getDisposed=goog.Disposable.prototype.isDisposed,goog.Disposable.prototype.dispose=function(){if(!this.disposed_&&(this.disposed_=!0,this.disposeInternal(),goog.Disposable.MONITORING_MODE!=goog.Disposable.MonitoringMode.OFF)){var e=goog.getUid(this);if(goog.Disposable.MONITORING_MODE==goog.Disposable.MonitoringMode.PERMANENT&&!goog.Disposable.instances_.hasOwnProperty(e))throw Error(this+" did not call the goog.Disposable base constructor or was disposed of after a clearUndisposedObjects call");delete goog.Disposable.instances_[e]}},goog.Disposable.prototype.registerDisposable=function(e){this.addOnDisposeCallback(goog.partial(goog.dispose,e))},goog.Disposable.prototype.addOnDisposeCallback=function(e,o){this.disposed_?goog.isDef(o)?e.call(o):e():(this.onDisposeCallbacks_||(this.onDisposeCallbacks_=[]),this.onDisposeCallbacks_.push(goog.isDef(o)?goog.bind(e,o):e))},goog.Disposable.prototype.disposeInternal=function(){if(this.onDisposeCallbacks_)for(;this.onDisposeCallbacks_.length;)this.onDisposeCallbacks_.shift()()},goog.Disposable.isDisposed=function(e){return e&&"function"==typeof e.isDisposed?e.isDisposed():!1},goog.dispose=function(e){e&&"function"==typeof e.dispose&&e.dispose()},goog.disposeAll=function(e){for(var o=0,t=arguments.length;t>o;++o){var n=arguments[o];goog.isArrayLike(n)?goog.disposeAll.apply(null,n):goog.dispose(n)}},goog.events.EventId=function(e){this.id=e},goog.events.EventId.prototype.toString=function(){return this.id},goog.events.Event=function(e,o){this.type=e instanceof goog.events.EventId?String(e):e,this.currentTarget=this.target=o,this.defaultPrevented=this.propagationStopped_=!1,this.returnValue_=!0},goog.events.Event.prototype.stopPropagation=function(){this.propagationStopped_=!0},goog.events.Event.prototype.preventDefault=function(){this.defaultPrevented=!0,this.returnValue_=!1},goog.events.Event.stopPropagation=function(e){e.stopPropagation()},goog.events.Event.preventDefault=function(e){e.preventDefault()},goog.events.getVendorPrefixedName_=function(e){return goog.userAgent.WEBKIT?"webkit"+e:goog.userAgent.OPERA?"o"+e.toLowerCase():e.toLowerCase()},goog.events.EventType={CLICK:"click",RIGHTCLICK:"rightclick",DBLCLICK:"dblclick",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEMOVE:"mousemove",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave",SELECTIONCHANGE:"selectionchange",SELECTSTART:"selectstart",WHEEL:"wheel",KEYPRESS:"keypress",KEYDOWN:"keydown",KEYUP:"keyup",BLUR:"blur",FOCUS:"focus",DEACTIVATE:"deactivate",FOCUSIN:goog.userAgent.IE?"focusin":"DOMFocusIn",FOCUSOUT:goog.userAgent.IE?"focusout":"DOMFocusOut",CHANGE:"change",RESET:"reset",SELECT:"select",SUBMIT:"submit",INPUT:"input",PROPERTYCHANGE:"propertychange",DRAGSTART:"dragstart",DRAG:"drag",DRAGENTER:"dragenter",DRAGOVER:"dragover",DRAGLEAVE:"dragleave",DROP:"drop",DRAGEND:"dragend",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",TOUCHCANCEL:"touchcancel",BEFOREUNLOAD:"beforeunload",CONSOLEMESSAGE:"consolemessage",CONTEXTMENU:"contextmenu",DEVICEORIENTATION:"deviceorientation",DOMCONTENTLOADED:"DOMContentLoaded",ERROR:"error",HELP:"help",LOAD:"load",LOSECAPTURE:"losecapture",ORIENTATIONCHANGE:"orientationchange",READYSTATECHANGE:"readystatechange",RESIZE:"resize",SCROLL:"scroll",UNLOAD:"unload",CANPLAY:"canplay",CANPLAYTHROUGH:"canplaythrough",DURATIONCHANGE:"durationchange",EMPTIED:"emptied",ENDED:"ended",LOADEDDATA:"loadeddata",LOADEDMETADATA:"loadedmetadata",PAUSE:"pause",PLAY:"play",PLAYING:"playing",RATECHANGE:"ratechange",SEEKED:"seeked",SEEKING:"seeking",STALLED:"stalled",SUSPEND:"suspend",TIMEUPDATE:"timeupdate",VOLUMECHANGE:"volumechange",WAITING:"waiting",HASHCHANGE:"hashchange",PAGEHIDE:"pagehide",PAGESHOW:"pageshow",POPSTATE:"popstate",COPY:"copy",PASTE:"paste",CUT:"cut",BEFORECOPY:"beforecopy",BEFORECUT:"beforecut",BEFOREPASTE:"beforepaste",ONLINE:"online",OFFLINE:"offline",MESSAGE:"message",CONNECT:"connect",ANIMATIONSTART:goog.events.getVendorPrefixedName_("AnimationStart"),ANIMATIONEND:goog.events.getVendorPrefixedName_("AnimationEnd"),ANIMATIONITERATION:goog.events.getVendorPrefixedName_("AnimationIteration"),TRANSITIONEND:goog.events.getVendorPrefixedName_("TransitionEnd"),POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTERCANCEL:"pointercancel",POINTERMOVE:"pointermove",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",GOTPOINTERCAPTURE:"gotpointercapture",LOSTPOINTERCAPTURE:"lostpointercapture",MSGESTURECHANGE:"MSGestureChange",MSGESTUREEND:"MSGestureEnd",MSGESTUREHOLD:"MSGestureHold",MSGESTURESTART:"MSGestureStart",MSGESTURETAP:"MSGestureTap",MSGOTPOINTERCAPTURE:"MSGotPointerCapture",MSINERTIASTART:"MSInertiaStart",MSLOSTPOINTERCAPTURE:"MSLostPointerCapture",MSPOINTERCANCEL:"MSPointerCancel",MSPOINTERDOWN:"MSPointerDown",MSPOINTERENTER:"MSPointerEnter",MSPOINTERHOVER:"MSPointerHover",MSPOINTERLEAVE:"MSPointerLeave",MSPOINTERMOVE:"MSPointerMove",MSPOINTEROUT:"MSPointerOut",MSPOINTEROVER:"MSPointerOver",MSPOINTERUP:"MSPointerUp",TEXT:"text",TEXTINPUT:"textInput",COMPOSITIONSTART:"compositionstart",COMPOSITIONUPDATE:"compositionupdate",COMPOSITIONEND:"compositionend",EXIT:"exit",LOADABORT:"loadabort",LOADCOMMIT:"loadcommit",LOADREDIRECT:"loadredirect",LOADSTART:"loadstart",LOADSTOP:"loadstop",RESPONSIVE:"responsive",SIZECHANGED:"sizechanged",UNRESPONSIVE:"unresponsive",VISIBILITYCHANGE:"visibilitychange",STORAGE:"storage",DOMSUBTREEMODIFIED:"DOMSubtreeModified",DOMNODEINSERTED:"DOMNodeInserted",DOMNODEREMOVED:"DOMNodeRemoved",DOMNODEREMOVEDFROMDOCUMENT:"DOMNodeRemovedFromDocument",DOMNODEINSERTEDINTODOCUMENT:"DOMNodeInsertedIntoDocument",DOMATTRMODIFIED:"DOMAttrModified",DOMCHARACTERDATAMODIFIED:"DOMCharacterDataModified",BEFOREPRINT:"beforeprint",AFTERPRINT:"afterprint"},goog.events.BrowserEvent=function(e,o){goog.events.Event.call(this,e?e.type:""),this.relatedTarget=this.currentTarget=this.target=null,this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0,this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.platformModifierKey=!1,this.event_=null,e&&this.init(e,o)},goog.inherits(goog.events.BrowserEvent,goog.events.Event),goog.events.BrowserEvent.MouseButton={LEFT:0,MIDDLE:1,RIGHT:2},goog.events.BrowserEvent.IEButtonMap=[1,4,2],goog.events.BrowserEvent.prototype.init=function(e,o){var t=this.type=e.type,n=e.changedTouches?e.changedTouches[0]:null;this.target=e.target||e.srcElement,this.currentTarget=o;var r=e.relatedTarget;r?goog.userAgent.GECKO&&(goog.reflect.canAccessProperty(r,"nodeName")||(r=null)):t==goog.events.EventType.MOUSEOVER?r=e.fromElement:t==goog.events.EventType.MOUSEOUT&&(r=e.toElement),this.relatedTarget=r,goog.isNull(n)?(this.offsetX=goog.userAgent.WEBKIT||void 0!==e.offsetX?e.offsetX:e.layerX,this.offsetY=goog.userAgent.WEBKIT||void 0!==e.offsetY?e.offsetY:e.layerY,this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0):(this.clientX=void 0!==n.clientX?n.clientX:n.pageX,this.clientY=void 0!==n.clientY?n.clientY:n.pageY,this.screenX=n.screenX||0,this.screenY=n.screenY||0),this.button=e.button,this.keyCode=e.keyCode||0,this.charCode=e.charCode||("keypress"==t?e.keyCode:0),this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.platformModifierKey=goog.userAgent.MAC?e.metaKey:e.ctrlKey,this.state=e.state,this.event_=e,e.defaultPrevented&&this.preventDefault()},goog.events.BrowserEvent.prototype.isButton=function(e){return goog.events.BrowserFeature.HAS_W3C_BUTTON?this.event_.button==e:"click"==this.type?e==goog.events.BrowserEvent.MouseButton.LEFT:!!(this.event_.button&goog.events.BrowserEvent.IEButtonMap[e])},goog.events.BrowserEvent.prototype.isMouseActionButton=function(){return this.isButton(goog.events.BrowserEvent.MouseButton.LEFT)&&!(goog.userAgent.WEBKIT&&goog.userAgent.MAC&&this.ctrlKey)},goog.events.BrowserEvent.prototype.stopPropagation=function(){goog.events.BrowserEvent.superClass_.stopPropagation.call(this),this.event_.stopPropagation?this.event_.stopPropagation():this.event_.cancelBubble=!0},goog.events.BrowserEvent.prototype.preventDefault=function(){goog.events.BrowserEvent.superClass_.preventDefault.call(this);var e=this.event_;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,goog.events.BrowserFeature.SET_KEY_CODE_TO_PREVENT_DEFAULT)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(o){}},goog.events.BrowserEvent.prototype.getBrowserEvent=function(){return this.event_},goog.events.Listenable=function(){},goog.events.Listenable.IMPLEMENTED_BY_PROP="closure_listenable_"+(1e6*Math.random()|0),goog.events.Listenable.addImplementation=function(e){e.prototype[goog.events.Listenable.IMPLEMENTED_BY_PROP]=!0},goog.events.Listenable.isImplementedBy=function(e){return!(!e||!e[goog.events.Listenable.IMPLEMENTED_BY_PROP])},goog.events.ListenableKey=function(){},goog.events.ListenableKey.counter_=0,goog.events.ListenableKey.reserveKey=function(){return++goog.events.ListenableKey.counter_},goog.events.Listener=function(e,o,t,n,r,i){goog.events.Listener.ENABLE_MONITORING&&(this.creationStack=Error().stack),this.listener=e,this.proxy=o,this.src=t,this.type=n,this.capture=!!r,this.handler=i,this.key=goog.events.ListenableKey.reserveKey(),this.removed=this.callOnce=!1},goog.events.Listener.ENABLE_MONITORING=!1,goog.events.Listener.prototype.markAsRemoved=function(){this.removed=!0,this.handler=this.src=this.proxy=this.listener=null},goog.events.ListenerMap=function(e){this.src=e,this.listeners={},this.typeCount_=0},goog.events.ListenerMap.prototype.getTypeCount=function(){return this.typeCount_},goog.events.ListenerMap.prototype.getListenerCount=function(){var e,o=0;for(e in this.listeners)o+=this.listeners[e].length;return o},goog.events.ListenerMap.prototype.add=function(e,o,t,n,r){var i=e.toString();e=this.listeners[i],e||(e=this.listeners[i]=[],this.typeCount_++);var s=goog.events.ListenerMap.findListenerIndex_(e,o,n,r);return s>-1?(o=e[s],t||(o.callOnce=!1)):(o=new goog.events.Listener(o,null,this.src,i,!!n,r),o.callOnce=t,e.push(o)),o},goog.events.ListenerMap.prototype.remove=function(e,o,t,n){if(e=e.toString(),!(e in this.listeners))return!1;var r=this.listeners[e];return o=goog.events.ListenerMap.findListenerIndex_(r,o,t,n),o>-1?(r[o].markAsRemoved(),goog.array.removeAt(r,o),0==r.length&&(delete this.listeners[e],this.typeCount_--),!0):!1},goog.events.ListenerMap.prototype.removeByKey=function(e){var o=e.type;if(!(o in this.listeners))return!1;var t=goog.array.remove(this.listeners[o],e);return t&&(e.markAsRemoved(),0==this.listeners[o].length&&(delete this.listeners[o],this.typeCount_--)),t},goog.events.ListenerMap.prototype.removeAll=function(e){e=e&&e.toString();var o,t=0;for(o in this.listeners)if(!e||o==e){for(var n=this.listeners[o],r=0;r<n.length;r++)++t,n[r].markAsRemoved();delete this.listeners[o],this.typeCount_--}return t},goog.events.ListenerMap.prototype.getListeners=function(e,o){var t=this.listeners[e.toString()],n=[];if(t)for(var r=0;r<t.length;++r){var i=t[r];i.capture==o&&n.push(i)}return n},goog.events.ListenerMap.prototype.getListener=function(e,o,t,n){e=this.listeners[e.toString()];var r=-1;return e&&(r=goog.events.ListenerMap.findListenerIndex_(e,o,t,n)),r>-1?e[r]:null},goog.events.ListenerMap.prototype.hasListener=function(e,o){var t=goog.isDef(e),n=t?e.toString():"",r=goog.isDef(o);return goog.object.some(this.listeners,function(e,i){for(var s=0;s<e.length;++s)if(!(t&&e[s].type!=n||r&&e[s].capture!=o))return!0;return!1})},goog.events.ListenerMap.findListenerIndex_=function(e,o,t,n){for(var r=0;r<e.length;++r){var i=e[r];if(!i.removed&&i.listener==o&&i.capture==!!t&&i.handler==n)return r}return-1},goog.events.LISTENER_MAP_PROP_="closure_lm_"+(1e6*Math.random()|0),goog.events.onString_="on",goog.events.onStringMap_={},goog.events.CaptureSimulationMode={OFF_AND_FAIL:0,OFF_AND_SILENT:1,ON:2},goog.events.CAPTURE_SIMULATION_MODE=2,goog.events.listenerCountEstimate_=0,goog.events.listen=function(e,o,t,n,r){if(goog.isArray(o)){for(var i=0;i<o.length;i++)goog.events.listen(e,o[i],t,n,r);return null}return t=goog.events.wrapListener(t),goog.events.Listenable.isImplementedBy(e)?e.listen(o,t,n,r):goog.events.listen_(e,o,t,!1,n,r)},goog.events.listen_=function(e,o,t,n,r,i){if(!o)throw Error("Invalid event type");var s=!!r;if(s&&!goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT){if(goog.events.CAPTURE_SIMULATION_MODE==goog.events.CaptureSimulationMode.OFF_AND_FAIL)return goog.asserts.fail("Can not register capture listener in IE8-."),null;if(goog.events.CAPTURE_SIMULATION_MODE==goog.events.CaptureSimulationMode.OFF_AND_SILENT)return null}var l=goog.events.getListenerMap_(e);if(l||(e[goog.events.LISTENER_MAP_PROP_]=l=new goog.events.ListenerMap(e)),t=l.add(o,t,n,r,i),t.proxy)return t;if(n=goog.events.getProxy(),t.proxy=n,n.src=e,n.listener=t,e.addEventListener)e.addEventListener(o.toString(),n,s);else{if(!e.attachEvent)throw Error("addEventListener and attachEvent are unavailable.");e.attachEvent(goog.events.getOnString_(o.toString()),n)}return goog.events.listenerCountEstimate_++,t},goog.events.getProxy=function(){var e=goog.events.handleBrowserEvent_,o=goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT?function(t){return e.call(o.src,o.listener,t)}:function(t){return t=e.call(o.src,o.listener,t),t?void 0:t};return o},goog.events.listenOnce=function(e,o,t,n,r){if(goog.isArray(o)){for(var i=0;i<o.length;i++)goog.events.listenOnce(e,o[i],t,n,r);return null}return t=goog.events.wrapListener(t),goog.events.Listenable.isImplementedBy(e)?e.listenOnce(o,t,n,r):goog.events.listen_(e,o,t,!0,n,r)},goog.events.listenWithWrapper=function(e,o,t,n,r){o.listen(e,t,n,r)},goog.events.unlisten=function(e,o,t,n,r){if(goog.isArray(o)){for(var i=0;i<o.length;i++)goog.events.unlisten(e,o[i],t,n,r);return null}return t=goog.events.wrapListener(t),goog.events.Listenable.isImplementedBy(e)?e.unlisten(o,t,n,r):e?(n=!!n,(e=goog.events.getListenerMap_(e))&&(o=e.getListener(o,t,n,r))?goog.events.unlistenByKey(o):!1):!1},goog.events.unlistenByKey=function(e){if(goog.isNumber(e)||!e||e.removed)return!1;var o=e.src;if(goog.events.Listenable.isImplementedBy(o))return o.unlistenByKey(e);var t=e.type,n=e.proxy;return o.removeEventListener?o.removeEventListener(t,n,e.capture):o.detachEvent&&o.detachEvent(goog.events.getOnString_(t),n),goog.events.listenerCountEstimate_--,(t=goog.events.getListenerMap_(o))?(t.removeByKey(e),0==t.getTypeCount()&&(t.src=null,o[goog.events.LISTENER_MAP_PROP_]=null)):e.markAsRemoved(),!0},goog.events.unlistenWithWrapper=function(e,o,t,n,r){o.unlisten(e,t,n,r)},goog.events.removeAll=function(e,o){if(!e)return 0;if(goog.events.Listenable.isImplementedBy(e))return e.removeAllListeners(o);var t=goog.events.getListenerMap_(e);if(!t)return 0;var n,r=0,i=o&&o.toString();for(n in t.listeners)if(!i||n==i)for(var s=t.listeners[n].concat(),l=0;l<s.length;++l)goog.events.unlistenByKey(s[l])&&++r;return r},goog.events.getListeners=function(e,o,t){return goog.events.Listenable.isImplementedBy(e)?e.getListeners(o,t):e&&(e=goog.events.getListenerMap_(e))?e.getListeners(o,t):[]},goog.events.getListener=function(e,o,t,n,r){return t=goog.events.wrapListener(t),n=!!n,goog.events.Listenable.isImplementedBy(e)?e.getListener(o,t,n,r):e&&(e=goog.events.getListenerMap_(e))?e.getListener(o,t,n,r):null},goog.events.hasListener=function(e,o,t){return goog.events.Listenable.isImplementedBy(e)?e.hasListener(o,t):(e=goog.events.getListenerMap_(e),!!e&&e.hasListener(o,t))},goog.events.expose=function(e){var o,t=[];for(o in e)e[o]&&e[o].id?t.push(o+" = "+e[o]+" ("+e[o].id+")"):t.push(o+" = "+e[o]);return t.join("\n")},goog.events.getOnString_=function(e){return e in goog.events.onStringMap_?goog.events.onStringMap_[e]:goog.events.onStringMap_[e]=goog.events.onString_+e},goog.events.fireListeners=function(e,o,t,n){return goog.events.Listenable.isImplementedBy(e)?e.fireListeners(o,t,n):goog.events.fireListeners_(e,o,t,n)},goog.events.fireListeners_=function(e,o,t,n){var r=!0;if((e=goog.events.getListenerMap_(e))&&(o=e.listeners[o.toString()]))for(o=o.concat(),e=0;e<o.length;e++){var i=o[e];i&&i.capture==t&&!i.removed&&(i=goog.events.fireListener(i,n),r=r&&!1!==i)}return r},goog.events.fireListener=function(e,o){var t=e.listener,n=e.handler||e.src;return e.callOnce&&goog.events.unlistenByKey(e),t.call(n,o)},goog.events.getTotalListenerCount=function(){return goog.events.listenerCountEstimate_},goog.events.dispatchEvent=function(e,o){return goog.asserts.assert(goog.events.Listenable.isImplementedBy(e),"Can not use goog.events.dispatchEvent with non-goog.events.Listenable instance."),e.dispatchEvent(o)},goog.events.protectBrowserEventEntryPoint=function(e){goog.events.handleBrowserEvent_=e.protectEntryPoint(goog.events.handleBrowserEvent_)},goog.events.handleBrowserEvent_=function(e,o){if(e.removed)return!0;if(!goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT){var t=o||goog.getObjectByName("window.event"),n=new goog.events.BrowserEvent(t,this),r=!0;if(goog.events.CAPTURE_SIMULATION_MODE==goog.events.CaptureSimulationMode.ON){if(!goog.events.isMarkedIeEvent_(t)){goog.events.markIeEvent_(t);for(var t=[],i=n.currentTarget;i;i=i.parentNode)t.push(i);for(var i=e.type,s=t.length-1;!n.propagationStopped_&&s>=0;s--){n.currentTarget=t[s];var l=goog.events.fireListeners_(t[s],i,!0,n),r=r&&l}for(s=0;!n.propagationStopped_&&s<t.length;s++)n.currentTarget=t[s],l=goog.events.fireListeners_(t[s],i,!1,n),r=r&&l}}else r=goog.events.fireListener(e,n);return r}return goog.events.fireListener(e,new goog.events.BrowserEvent(o,this))},goog.events.markIeEvent_=function(e){var o=!1;if(0==e.keyCode)try{return void(e.keyCode=-1)}catch(t){o=!0}(o||void 0==e.returnValue)&&(e.returnValue=!0)},goog.events.isMarkedIeEvent_=function(e){return 0>e.keyCode||void 0!=e.returnValue},goog.events.uniqueIdCounter_=0,goog.events.getUniqueId=function(e){return e+"_"+goog.events.uniqueIdCounter_++},goog.events.getListenerMap_=function(e){return e=e[goog.events.LISTENER_MAP_PROP_],e instanceof goog.events.ListenerMap?e:null},goog.events.LISTENER_WRAPPER_PROP_="__closure_events_fn_"+(1e9*Math.random()>>>0),goog.events.wrapListener=function(e){return goog.asserts.assert(e,"Listener can not be null."),goog.isFunction(e)?e:(goog.asserts.assert(e.handleEvent,"An object listener must have handleEvent method."),e[goog.events.LISTENER_WRAPPER_PROP_]||(e[goog.events.LISTENER_WRAPPER_PROP_]=function(o){return e.handleEvent(o)}),e[goog.events.LISTENER_WRAPPER_PROP_])},goog.debug.entryPointRegistry.register(function(e){goog.events.handleBrowserEvent_=e(goog.events.handleBrowserEvent_)}),goog.math={},goog.math.randomInt=function(e){return Math.floor(Math.random()*e)},goog.math.uniformRandom=function(e,o){return e+Math.random()*(o-e)},goog.math.clamp=function(e,o,t){return Math.min(Math.max(e,o),t)},goog.math.modulo=function(e,o){var t=e%o;return 0>t*o?t+o:t},goog.math.lerp=function(e,o,t){return e+t*(o-e)},goog.math.nearlyEquals=function(e,o,t){return Math.abs(e-o)<=(t||1e-6)},goog.math.standardAngle=function(e){return goog.math.modulo(e,360)},goog.math.standardAngleInRadians=function(e){return goog.math.modulo(e,2*Math.PI)},goog.math.toRadians=function(e){return e*Math.PI/180},goog.math.toDegrees=function(e){return 180*e/Math.PI},goog.math.angleDx=function(e,o){return o*Math.cos(goog.math.toRadians(e))},goog.math.angleDy=function(e,o){return o*Math.sin(goog.math.toRadians(e))},goog.math.angle=function(e,o,t,n){return goog.math.standardAngle(goog.math.toDegrees(Math.atan2(n-o,t-e)))},goog.math.angleDifference=function(e,o){var t=goog.math.standardAngle(o)-goog.math.standardAngle(e);return t>180?t-=360:-180>=t&&(t=360+t),t},goog.math.sign=function(e){return e>0?1:0>e?-1:e},goog.math.longestCommonSubsequence=function(e,o,t,n){t=t||function(e,o){return e==o},n=n||function(o,t){return e[o]};for(var r=e.length,i=o.length,s=[],l=0;r+1>l;l++)s[l]=[],s[l][0]=0;for(var g=0;i+1>g;g++)s[0][g]=0;for(l=1;r>=l;l++)for(g=1;i>=g;g++)t(e[l-1],o[g-1])?s[l][g]=s[l-1][g-1]+1:s[l][g]=Math.max(s[l-1][g],s[l][g-1]);for(var a=[],l=r,g=i;l>0&&g>0;)t(e[l-1],o[g-1])?(a.unshift(n(l-1,g-1)),l--,g--):s[l-1][g]>s[l][g-1]?l--:g--;return a},goog.math.sum=function(e){return goog.array.reduce(arguments,function(e,o){return e+o},0)},goog.math.average=function(e){return goog.math.sum.apply(null,arguments)/arguments.length},goog.math.sampleVariance=function(e){var o=arguments.length;if(2>o)return 0;var t=goog.math.average.apply(null,arguments);return goog.math.sum.apply(null,goog.array.map(arguments,function(e){return Math.pow(e-t,2)}))/(o-1)},goog.math.standardDeviation=function(e){return Math.sqrt(goog.math.sampleVariance.apply(null,arguments))},goog.math.isInt=function(e){return isFinite(e)&&0==e%1},goog.math.isFiniteNumber=function(e){return isFinite(e)&&!isNaN(e)},goog.math.isNegativeZero=function(e){return 0==e&&0>1/e},goog.math.log10Floor=function(e){if(e>0){var o=Math.round(Math.log(e)*Math.LOG10E);return o-(parseFloat("1e"+o)>e?1:0)}return 0==e?-(1/0):NaN},goog.math.safeFloor=function(e,o){return goog.asserts.assert(!goog.isDef(o)||o>0),Math.floor(e+(o||2e-15))},goog.math.safeCeil=function(e,o){return goog.asserts.assert(!goog.isDef(o)||o>0),Math.ceil(e-(o||2e-15))},goog.dom.BrowserFeature={CAN_ADD_NAME_OR_TYPE_ATTRIBUTES:!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9),CAN_USE_CHILDREN_ATTRIBUTE:!goog.userAgent.GECKO&&!goog.userAgent.IE||goog.userAgent.IE&&goog.userAgent.isDocumentModeOrHigher(9)||goog.userAgent.GECKO&&goog.userAgent.isVersionOrHigher("1.9.1"),CAN_USE_INNER_TEXT:goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("9"),CAN_USE_PARENT_ELEMENT_PROPERTY:goog.userAgent.IE||goog.userAgent.OPERA||goog.userAgent.WEBKIT,INNER_HTML_NEEDS_SCOPED_ELEMENT:goog.userAgent.IE,LEGACY_IE_RANGES:goog.userAgent.IE&&!goog.userAgent.isDocumentModeOrHigher(9)},goog.dom.TagName=function(e){this.tagName_=e},goog.dom.TagName.prototype.toString=function(){return this.tagName_},goog.dom.TagName.A=new goog.dom.TagName("A"),goog.dom.TagName.ABBR=new goog.dom.TagName("ABBR"),goog.dom.TagName.ACRONYM=new goog.dom.TagName("ACRONYM"),goog.dom.TagName.ADDRESS=new goog.dom.TagName("ADDRESS"),goog.dom.TagName.APPLET=new goog.dom.TagName("APPLET"),goog.dom.TagName.AREA=new goog.dom.TagName("AREA"),goog.dom.TagName.ARTICLE=new goog.dom.TagName("ARTICLE"),goog.dom.TagName.ASIDE=new goog.dom.TagName("ASIDE"),goog.dom.TagName.AUDIO=new goog.dom.TagName("AUDIO"),goog.dom.TagName.B=new goog.dom.TagName("B"),goog.dom.TagName.BASE=new goog.dom.TagName("BASE"),goog.dom.TagName.BASEFONT=new goog.dom.TagName("BASEFONT"),goog.dom.TagName.BDI=new goog.dom.TagName("BDI"),goog.dom.TagName.BDO=new goog.dom.TagName("BDO"),goog.dom.TagName.BIG=new goog.dom.TagName("BIG"),goog.dom.TagName.BLOCKQUOTE=new goog.dom.TagName("BLOCKQUOTE"),goog.dom.TagName.BODY=new goog.dom.TagName("BODY"),goog.dom.TagName.BR=new goog.dom.TagName("BR"),goog.dom.TagName.BUTTON=new goog.dom.TagName("BUTTON"),goog.dom.TagName.CANVAS=new goog.dom.TagName("CANVAS"),goog.dom.TagName.CAPTION=new goog.dom.TagName("CAPTION"),goog.dom.TagName.CENTER=new goog.dom.TagName("CENTER"),goog.dom.TagName.CITE=new goog.dom.TagName("CITE"),goog.dom.TagName.CODE=new goog.dom.TagName("CODE"),goog.dom.TagName.COL=new goog.dom.TagName("COL"),goog.dom.TagName.COLGROUP=new goog.dom.TagName("COLGROUP"),goog.dom.TagName.COMMAND=new goog.dom.TagName("COMMAND"),goog.dom.TagName.DATA=new goog.dom.TagName("DATA"),goog.dom.TagName.DATALIST=new goog.dom.TagName("DATALIST"),goog.dom.TagName.DD=new goog.dom.TagName("DD"),goog.dom.TagName.DEL=new goog.dom.TagName("DEL"),goog.dom.TagName.DETAILS=new goog.dom.TagName("DETAILS"),goog.dom.TagName.DFN=new goog.dom.TagName("DFN"),goog.dom.TagName.DIALOG=new goog.dom.TagName("DIALOG"),goog.dom.TagName.DIR=new goog.dom.TagName("DIR"),goog.dom.TagName.DIV=new goog.dom.TagName("DIV"),goog.dom.TagName.DL=new goog.dom.TagName("DL"),goog.dom.TagName.DT=new goog.dom.TagName("DT"),goog.dom.TagName.EM=new goog.dom.TagName("EM"),goog.dom.TagName.EMBED=new goog.dom.TagName("EMBED"),goog.dom.TagName.FIELDSET=new goog.dom.TagName("FIELDSET"),goog.dom.TagName.FIGCAPTION=new goog.dom.TagName("FIGCAPTION"),goog.dom.TagName.FIGURE=new goog.dom.TagName("FIGURE"),goog.dom.TagName.FONT=new goog.dom.TagName("FONT"),goog.dom.TagName.FOOTER=new goog.dom.TagName("FOOTER"),goog.dom.TagName.FORM=new goog.dom.TagName("FORM"),goog.dom.TagName.FRAME=new goog.dom.TagName("FRAME"),goog.dom.TagName.FRAMESET=new goog.dom.TagName("FRAMESET"),goog.dom.TagName.H1=new goog.dom.TagName("H1"),goog.dom.TagName.H2=new goog.dom.TagName("H2"),goog.dom.TagName.H3=new goog.dom.TagName("H3"),goog.dom.TagName.H4=new goog.dom.TagName("H4"),goog.dom.TagName.H5=new goog.dom.TagName("H5"),goog.dom.TagName.H6=new goog.dom.TagName("H6"),goog.dom.TagName.HEAD=new goog.dom.TagName("HEAD"),goog.dom.TagName.HEADER=new goog.dom.TagName("HEADER"),goog.dom.TagName.HGROUP=new goog.dom.TagName("HGROUP"),goog.dom.TagName.HR=new goog.dom.TagName("HR"),goog.dom.TagName.HTML=new goog.dom.TagName("HTML"),goog.dom.TagName.I=new goog.dom.TagName("I"),goog.dom.TagName.IFRAME=new goog.dom.TagName("IFRAME"),goog.dom.TagName.IMG=new goog.dom.TagName("IMG"),goog.dom.TagName.INPUT=new goog.dom.TagName("INPUT"),goog.dom.TagName.INS=new goog.dom.TagName("INS"),goog.dom.TagName.ISINDEX=new goog.dom.TagName("ISINDEX"),goog.dom.TagName.KBD=new goog.dom.TagName("KBD"),goog.dom.TagName.KEYGEN=new goog.dom.TagName("KEYGEN"),goog.dom.TagName.LABEL=new goog.dom.TagName("LABEL"),goog.dom.TagName.LEGEND=new goog.dom.TagName("LEGEND"),goog.dom.TagName.LI=new goog.dom.TagName("LI"),goog.dom.TagName.LINK=new goog.dom.TagName("LINK"),goog.dom.TagName.MAP=new goog.dom.TagName("MAP"),goog.dom.TagName.MARK=new goog.dom.TagName("MARK"),goog.dom.TagName.MATH=new goog.dom.TagName("MATH"),goog.dom.TagName.MENU=new goog.dom.TagName("MENU"),goog.dom.TagName.META=new goog.dom.TagName("META"),goog.dom.TagName.METER=new goog.dom.TagName("METER"),goog.dom.TagName.NAV=new goog.dom.TagName("NAV"),goog.dom.TagName.NOFRAMES=new goog.dom.TagName("NOFRAMES"),goog.dom.TagName.NOSCRIPT=new goog.dom.TagName("NOSCRIPT"),goog.dom.TagName.OBJECT=new goog.dom.TagName("OBJECT"),goog.dom.TagName.OL=new goog.dom.TagName("OL"),goog.dom.TagName.OPTGROUP=new goog.dom.TagName("OPTGROUP"),goog.dom.TagName.OPTION=new goog.dom.TagName("OPTION"),goog.dom.TagName.OUTPUT=new goog.dom.TagName("OUTPUT"),goog.dom.TagName.P=new goog.dom.TagName("P"),goog.dom.TagName.PARAM=new goog.dom.TagName("PARAM"),goog.dom.TagName.PRE=new goog.dom.TagName("PRE"),goog.dom.TagName.PROGRESS=new goog.dom.TagName("PROGRESS"),goog.dom.TagName.Q=new goog.dom.TagName("Q"),goog.dom.TagName.RP=new goog.dom.TagName("RP"),goog.dom.TagName.RT=new goog.dom.TagName("RT"),goog.dom.TagName.RUBY=new goog.dom.TagName("RUBY"),goog.dom.TagName.S=new goog.dom.TagName("S"),goog.dom.TagName.SAMP=new goog.dom.TagName("SAMP"),goog.dom.TagName.SCRIPT=new goog.dom.TagName("SCRIPT"),goog.dom.TagName.SECTION=new goog.dom.TagName("SECTION"),goog.dom.TagName.SELECT=new goog.dom.TagName("SELECT"),goog.dom.TagName.SMALL=new goog.dom.TagName("SMALL"),goog.dom.TagName.SOURCE=new goog.dom.TagName("SOURCE"),goog.dom.TagName.SPAN=new goog.dom.TagName("SPAN"),goog.dom.TagName.STRIKE=new goog.dom.TagName("STRIKE"),goog.dom.TagName.STRONG=new goog.dom.TagName("STRONG"),goog.dom.TagName.STYLE=new goog.dom.TagName("STYLE"),goog.dom.TagName.SUB=new goog.dom.TagName("SUB"),goog.dom.TagName.SUMMARY=new goog.dom.TagName("SUMMARY"),goog.dom.TagName.SUP=new goog.dom.TagName("SUP"),goog.dom.TagName.SVG=new goog.dom.TagName("SVG"),goog.dom.TagName.TABLE=new goog.dom.TagName("TABLE"),goog.dom.TagName.TBODY=new goog.dom.TagName("TBODY"),goog.dom.TagName.TD=new goog.dom.TagName("TD"),goog.dom.TagName.TEMPLATE=new goog.dom.TagName("TEMPLATE"),goog.dom.TagName.TEXTAREA=new goog.dom.TagName("TEXTAREA"),goog.dom.TagName.TFOOT=new goog.dom.TagName("TFOOT"),goog.dom.TagName.TH=new goog.dom.TagName("TH"),goog.dom.TagName.THEAD=new goog.dom.TagName("THEAD"),goog.dom.TagName.TIME=new goog.dom.TagName("TIME"),goog.dom.TagName.TITLE=new goog.dom.TagName("TITLE"),goog.dom.TagName.TR=new goog.dom.TagName("TR"),goog.dom.TagName.TRACK=new goog.dom.TagName("TRACK"),goog.dom.TagName.TT=new goog.dom.TagName("TT"),goog.dom.TagName.U=new goog.dom.TagName("U"),goog.dom.TagName.UL=new goog.dom.TagName("UL"),goog.dom.TagName.VAR=new goog.dom.TagName("VAR"),goog.dom.TagName.VIDEO=new goog.dom.TagName("VIDEO"),goog.dom.TagName.WBR=new goog.dom.TagName("WBR"),goog.dom.tags={},goog.dom.tags.VOID_TAGS_={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},goog.dom.tags.isVoidTag=function(e){return!0===goog.dom.tags.VOID_TAGS_[e]},goog.string.TypedString=function(){},goog.string.Const=function(){this.stringConstValueWithSecurityContract__googStringSecurityPrivate_="",this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_=goog.string.Const.TYPE_MARKER_},goog.string.Const.prototype.implementsGoogStringTypedString=!0,goog.string.Const.prototype.getTypedStringValue=function(){return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_},goog.string.Const.prototype.toString=function(){return"Const{"+this.stringConstValueWithSecurityContract__googStringSecurityPrivate_+"}"},goog.string.Const.unwrap=function(e){return e instanceof goog.string.Const&&e.constructor===goog.string.Const&&e.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_===goog.string.Const.TYPE_MARKER_?e.stringConstValueWithSecurityContract__googStringSecurityPrivate_:(goog.asserts.fail("expected object of type Const, got '"+e+"'"),"type_error:Const")},goog.string.Const.from=function(e){return goog.string.Const.create__googStringSecurityPrivate_(e)},goog.string.Const.TYPE_MARKER_={},goog.string.Const.create__googStringSecurityPrivate_=function(e){var o=new goog.string.Const;return o.stringConstValueWithSecurityContract__googStringSecurityPrivate_=e,o},goog.string.Const.EMPTY=goog.string.Const.from(""),goog.html={},goog.html.SafeStyle=function(){this.privateDoNotAccessOrElseSafeStyleWrappedValue_="",this.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeStyle.prototype.implementsGoogStringTypedString=!0,goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeStyle.fromConstant=function(e){
+return e=goog.string.Const.unwrap(e),0===e.length?goog.html.SafeStyle.EMPTY:(goog.html.SafeStyle.checkStyle_(e),goog.asserts.assert(goog.string.endsWith(e,";"),"Last character of style string is not ';': "+e),goog.asserts.assert(goog.string.contains(e,":"),"Style string must contain at least one ':', to specify a \"name: value\" pair: "+e),goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeStyle.checkStyle_=function(e){goog.asserts.assert(!/[<>]/.test(e),"Forbidden characters in style string: "+e)},goog.html.SafeStyle.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_},goog.DEBUG&&(goog.html.SafeStyle.prototype.toString=function(){return"SafeStyle{"+this.privateDoNotAccessOrElseSafeStyleWrappedValue_+"}"}),goog.html.SafeStyle.unwrap=function(e){return e instanceof goog.html.SafeStyle&&e.constructor===goog.html.SafeStyle&&e.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeStyleWrappedValue_:(goog.asserts.fail("expected object of type SafeStyle, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeStyle")},goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse=function(e){return(new goog.html.SafeStyle).initSecurityPrivateDoNotAccessOrElse_(e)},goog.html.SafeStyle.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_=e,this},goog.html.SafeStyle.EMPTY=goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(""),goog.html.SafeStyle.INNOCUOUS_STRING="zClosurez",goog.html.SafeStyle.create=function(e){var o,t="";for(o in e){if(!/^[-_a-zA-Z0-9]+$/.test(o))throw Error("Name allows only [-_a-zA-Z0-9], got: "+o);var n=e[o];null!=n&&(n instanceof goog.string.Const?(n=goog.string.Const.unwrap(n),goog.asserts.assert(!/[{;}]/.test(n),"Value does not allow [{;}].")):goog.html.SafeStyle.VALUE_RE_.test(n)?goog.html.SafeStyle.hasBalancedQuotes_(n)||(goog.asserts.fail("String value requires balanced quotes, got: "+n),n=goog.html.SafeStyle.INNOCUOUS_STRING):(goog.asserts.fail("String value allows only [-,.\"'%_!# a-zA-Z0-9], rgb() and rgba(), got: "+n),n=goog.html.SafeStyle.INNOCUOUS_STRING),t+=o+":"+n+";")}return t?(goog.html.SafeStyle.checkStyle_(t),goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(t)):goog.html.SafeStyle.EMPTY},goog.html.SafeStyle.hasBalancedQuotes_=function(e){for(var o=!0,t=!0,n=0;n<e.length;n++){var r=e.charAt(n);"'"==r&&t?o=!o:'"'==r&&o&&(t=!t)}return o&&t},goog.html.SafeStyle.VALUE_RE_=/^([-,."'%_!# a-zA-Z0-9]+|(?:rgb|hsl)a?\([0-9.%, ]+\))$/,goog.html.SafeStyle.concat=function(e){var o="",t=function(e){goog.isArray(e)?goog.array.forEach(e,t):o+=goog.html.SafeStyle.unwrap(e)};return goog.array.forEach(arguments,t),o?goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(o):goog.html.SafeStyle.EMPTY},goog.html.SafeStyleSheet=function(){this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_="",this.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeStyleSheet.prototype.implementsGoogStringTypedString=!0,goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeStyleSheet.concat=function(e){var o="",t=function(e){goog.isArray(e)?goog.array.forEach(e,t):o+=goog.html.SafeStyleSheet.unwrap(e)};return goog.array.forEach(arguments,t),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(o)},goog.html.SafeStyleSheet.fromConstant=function(e){return e=goog.string.Const.unwrap(e),0===e.length?goog.html.SafeStyleSheet.EMPTY:(goog.asserts.assert(!goog.string.contains(e,"<"),"Forbidden '<' character in style sheet string: "+e),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeStyleSheet.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_},goog.DEBUG&&(goog.html.SafeStyleSheet.prototype.toString=function(){return"SafeStyleSheet{"+this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_+"}"}),goog.html.SafeStyleSheet.unwrap=function(e){return e instanceof goog.html.SafeStyleSheet&&e.constructor===goog.html.SafeStyleSheet&&e.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_:(goog.asserts.fail("expected object of type SafeStyleSheet, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeStyleSheet")},goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse=function(e){return(new goog.html.SafeStyleSheet).initSecurityPrivateDoNotAccessOrElse_(e)},goog.html.SafeStyleSheet.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e){return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_=e,this},goog.html.SafeStyleSheet.EMPTY=goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(""),goog.fs={},goog.fs.url={},goog.fs.url.createObjectUrl=function(e){return goog.fs.url.getUrlObject_().createObjectURL(e)},goog.fs.url.revokeObjectUrl=function(e){goog.fs.url.getUrlObject_().revokeObjectURL(e)},goog.fs.url.getUrlObject_=function(){var e=goog.fs.url.findUrlObject_();if(null!=e)return e;throw Error("This browser doesn't seem to support blob URLs")},goog.fs.url.findUrlObject_=function(){return goog.isDef(goog.global.URL)&&goog.isDef(goog.global.URL.createObjectURL)?goog.global.URL:goog.isDef(goog.global.webkitURL)&&goog.isDef(goog.global.webkitURL.createObjectURL)?goog.global.webkitURL:goog.isDef(goog.global.createObjectURL)?goog.global:null},goog.fs.url.browserSupportsObjectUrls=function(){return null!=goog.fs.url.findUrlObject_()},goog.i18n={},goog.i18n.bidi={},goog.i18n.bidi.FORCE_RTL=!1,goog.i18n.bidi.IS_RTL=goog.i18n.bidi.FORCE_RTL||("ar"==goog.LOCALE.substring(0,2).toLowerCase()||"fa"==goog.LOCALE.substring(0,2).toLowerCase()||"he"==goog.LOCALE.substring(0,2).toLowerCase()||"iw"==goog.LOCALE.substring(0,2).toLowerCase()||"ps"==goog.LOCALE.substring(0,2).toLowerCase()||"sd"==goog.LOCALE.substring(0,2).toLowerCase()||"ug"==goog.LOCALE.substring(0,2).toLowerCase()||"ur"==goog.LOCALE.substring(0,2).toLowerCase()||"yi"==goog.LOCALE.substring(0,2).toLowerCase())&&(2==goog.LOCALE.length||"-"==goog.LOCALE.substring(2,3)||"_"==goog.LOCALE.substring(2,3))||3<=goog.LOCALE.length&&"ckb"==goog.LOCALE.substring(0,3).toLowerCase()&&(3==goog.LOCALE.length||"-"==goog.LOCALE.substring(3,4)||"_"==goog.LOCALE.substring(3,4)),goog.i18n.bidi.Format={LRE:"âª",RLE:"â«",PDF:"â¬",LRM:"â",RLM:"â"},goog.i18n.bidi.Dir={LTR:1,RTL:-1,NEUTRAL:0},goog.i18n.bidi.RIGHT="right",goog.i18n.bidi.LEFT="left",goog.i18n.bidi.I18N_RIGHT=goog.i18n.bidi.IS_RTL?goog.i18n.bidi.LEFT:goog.i18n.bidi.RIGHT,goog.i18n.bidi.I18N_LEFT=goog.i18n.bidi.IS_RTL?goog.i18n.bidi.RIGHT:goog.i18n.bidi.LEFT,goog.i18n.bidi.toDir=function(e,o){return"number"==typeof e?e>0?goog.i18n.bidi.Dir.LTR:0>e?goog.i18n.bidi.Dir.RTL:o?null:goog.i18n.bidi.Dir.NEUTRAL:null==e?null:e?goog.i18n.bidi.Dir.RTL:goog.i18n.bidi.Dir.LTR},goog.i18n.bidi.ltrChars_="A-Za-zÃ-ÃÃ-Ã¶Ã¸-Ê¸Ì-Öà -á¿¿ââ°-ï¬ï¸-ï¹¯ï»½-ï¿¿",goog.i18n.bidi.rtlChars_="Ö-Û¯Ûº-ß¿âï¬-ï·¿ï¹°-ï»¼",goog.i18n.bidi.htmlSkipReg_=/<[^>]*>|&[^;]+;/g,goog.i18n.bidi.stripHtmlIfNeeded_=function(e,o){return o?e.replace(goog.i18n.bidi.htmlSkipReg_,""):e},goog.i18n.bidi.rtlCharReg_=new RegExp("["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.ltrCharReg_=new RegExp("["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.hasAnyRtl=function(e,o){return goog.i18n.bidi.rtlCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,o))},goog.i18n.bidi.hasRtlChar=goog.i18n.bidi.hasAnyRtl,goog.i18n.bidi.hasAnyLtr=function(e,o){return goog.i18n.bidi.ltrCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,o))},goog.i18n.bidi.ltrRe_=new RegExp("^["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.rtlRe_=new RegExp("^["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.isRtlChar=function(e){return goog.i18n.bidi.rtlRe_.test(e)},goog.i18n.bidi.isLtrChar=function(e){return goog.i18n.bidi.ltrRe_.test(e)},goog.i18n.bidi.isNeutralChar=function(e){return!goog.i18n.bidi.isLtrChar(e)&&!goog.i18n.bidi.isRtlChar(e)},goog.i18n.bidi.ltrDirCheckRe_=new RegExp("^[^"+goog.i18n.bidi.rtlChars_+"]*["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.rtlDirCheckRe_=new RegExp("^[^"+goog.i18n.bidi.ltrChars_+"]*["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.startsWithRtl=function(e,o){return goog.i18n.bidi.rtlDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,o))},goog.i18n.bidi.isRtlText=goog.i18n.bidi.startsWithRtl,goog.i18n.bidi.startsWithLtr=function(e,o){return goog.i18n.bidi.ltrDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,o))},goog.i18n.bidi.isLtrText=goog.i18n.bidi.startsWithLtr,goog.i18n.bidi.isRequiredLtrRe_=/^http:\/\/.*/,goog.i18n.bidi.isNeutralText=function(e,o){return e=goog.i18n.bidi.stripHtmlIfNeeded_(e,o),goog.i18n.bidi.isRequiredLtrRe_.test(e)||!goog.i18n.bidi.hasAnyLtr(e)&&!goog.i18n.bidi.hasAnyRtl(e)},goog.i18n.bidi.ltrExitDirCheckRe_=new RegExp("["+goog.i18n.bidi.ltrChars_+"][^"+goog.i18n.bidi.rtlChars_+"]*$"),goog.i18n.bidi.rtlExitDirCheckRe_=new RegExp("["+goog.i18n.bidi.rtlChars_+"][^"+goog.i18n.bidi.ltrChars_+"]*$"),goog.i18n.bidi.endsWithLtr=function(e,o){return goog.i18n.bidi.ltrExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,o))},goog.i18n.bidi.isLtrExitText=goog.i18n.bidi.endsWithLtr,goog.i18n.bidi.endsWithRtl=function(e,o){return goog.i18n.bidi.rtlExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,o))},goog.i18n.bidi.isRtlExitText=goog.i18n.bidi.endsWithRtl,goog.i18n.bidi.rtlLocalesRe_=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Arab|Hebr|Thaa|Nkoo|Tfng))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i,goog.i18n.bidi.isRtlLanguage=function(e){return goog.i18n.bidi.rtlLocalesRe_.test(e)},goog.i18n.bidi.bracketGuardTextRe_=/(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g,goog.i18n.bidi.guardBracketInText=function(e,o){var t=(void 0===o?goog.i18n.bidi.hasAnyRtl(e):o)?goog.i18n.bidi.Format.RLM:goog.i18n.bidi.Format.LRM;return e.replace(goog.i18n.bidi.bracketGuardTextRe_,t+"$&"+t)},goog.i18n.bidi.enforceRtlInHtml=function(e){return"<"==e.charAt(0)?e.replace(/<\w+/,"$& dir=rtl"):"\n<span dir=rtl>"+e+"</span>"},goog.i18n.bidi.enforceRtlInText=function(e){return goog.i18n.bidi.Format.RLE+e+goog.i18n.bidi.Format.PDF},goog.i18n.bidi.enforceLtrInHtml=function(e){return"<"==e.charAt(0)?e.replace(/<\w+/,"$& dir=ltr"):"\n<span dir=ltr>"+e+"</span>"},goog.i18n.bidi.enforceLtrInText=function(e){return goog.i18n.bidi.Format.LRE+e+goog.i18n.bidi.Format.PDF},goog.i18n.bidi.dimensionsRe_=/:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g,goog.i18n.bidi.leftRe_=/left/gi,goog.i18n.bidi.rightRe_=/right/gi,goog.i18n.bidi.tempRe_=/%%%%/g,goog.i18n.bidi.mirrorCSS=function(e){return e.replace(goog.i18n.bidi.dimensionsRe_,":$1 $4 $3 $2").replace(goog.i18n.bidi.leftRe_,"%%%%").replace(goog.i18n.bidi.rightRe_,goog.i18n.bidi.LEFT).replace(goog.i18n.bidi.tempRe_,goog.i18n.bidi.RIGHT)},goog.i18n.bidi.doubleQuoteSubstituteRe_=/([\u0591-\u05f2])"/g,goog.i18n.bidi.singleQuoteSubstituteRe_=/([\u0591-\u05f2])'/g,goog.i18n.bidi.normalizeHebrewQuote=function(e){return e.replace(goog.i18n.bidi.doubleQuoteSubstituteRe_,"$1×´").replace(goog.i18n.bidi.singleQuoteSubstituteRe_,"$1×³")},goog.i18n.bidi.wordSeparatorRe_=/\s+/,goog.i18n.bidi.hasNumeralsRe_=/[\d\u06f0-\u06f9]/,goog.i18n.bidi.rtlDetectionThreshold_=.4,goog.i18n.bidi.estimateDirection=function(e,o){for(var t=0,n=0,r=!1,i=goog.i18n.bidi.stripHtmlIfNeeded_(e,o).split(goog.i18n.bidi.wordSeparatorRe_),s=0;s<i.length;s++){var l=i[s];goog.i18n.bidi.startsWithRtl(l)?(t++,n++):goog.i18n.bidi.isRequiredLtrRe_.test(l)?r=!0:goog.i18n.bidi.hasAnyLtr(l)?n++:goog.i18n.bidi.hasNumeralsRe_.test(l)&&(r=!0)}return 0==n?r?goog.i18n.bidi.Dir.LTR:goog.i18n.bidi.Dir.NEUTRAL:t/n>goog.i18n.bidi.rtlDetectionThreshold_?goog.i18n.bidi.Dir.RTL:goog.i18n.bidi.Dir.LTR},goog.i18n.bidi.detectRtlDirectionality=function(e,o){return goog.i18n.bidi.estimateDirection(e,o)==goog.i18n.bidi.Dir.RTL},goog.i18n.bidi.setElementDirAndAlign=function(e,o){e&&(o=goog.i18n.bidi.toDir(o))&&(e.style.textAlign=o==goog.i18n.bidi.Dir.RTL?goog.i18n.bidi.RIGHT:goog.i18n.bidi.LEFT,e.dir=o==goog.i18n.bidi.Dir.RTL?"rtl":"ltr")},goog.i18n.bidi.setElementDirByTextDirectionality=function(e,o){switch(goog.i18n.bidi.estimateDirection(o)){case goog.i18n.bidi.Dir.LTR:e.dir="ltr";break;case goog.i18n.bidi.Dir.RTL:e.dir="rtl";break;default:e.removeAttribute("dir")}},goog.i18n.bidi.DirectionalString=function(){},goog.html.SafeUrl=function(){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_="",this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeUrl.INNOCUOUS_STRING="about:invalid#zClosurez",goog.html.SafeUrl.prototype.implementsGoogStringTypedString=!0,goog.html.SafeUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_},goog.html.SafeUrl.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.SafeUrl.prototype.getDirection=function(){return goog.i18n.bidi.Dir.LTR},goog.DEBUG&&(goog.html.SafeUrl.prototype.toString=function(){return"SafeUrl{"+this.privateDoNotAccessOrElseSafeHtmlWrappedValue_+"}"}),goog.html.SafeUrl.unwrap=function(e){return e instanceof goog.html.SafeUrl&&e.constructor===goog.html.SafeUrl&&e.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeHtmlWrappedValue_:(goog.asserts.fail("expected object of type SafeUrl, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeUrl")},goog.html.SafeUrl.fromConstant=function(e){return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(e))},goog.html.SAFE_MIME_TYPE_PATTERN_=/^(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm))$/i,goog.html.SafeUrl.fromBlob=function(e){return e=goog.html.SAFE_MIME_TYPE_PATTERN_.test(e.type)?goog.fs.url.createObjectUrl(e):goog.html.SafeUrl.INNOCUOUS_STRING,goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.DATA_URL_PATTERN_=/^data:([^;,]*);base64,[a-z0-9+\/]+=*$/i,goog.html.SafeUrl.fromDataUrl=function(e){var o=e.match(goog.html.DATA_URL_PATTERN_),o=o&&goog.html.SAFE_MIME_TYPE_PATTERN_.test(o[1]);return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(o?e:goog.html.SafeUrl.INNOCUOUS_STRING)},goog.html.SafeUrl.fromTelUrl=function(e){return goog.string.caseInsensitiveStartsWith(e,"tel:")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SAFE_URL_PATTERN_=/^(?:(?:https?|mailto|ftp):|[^&:\/?#]*(?:[\/?#]|$))/i,goog.html.SafeUrl.sanitize=function(e){return e instanceof goog.html.SafeUrl?e:(e=e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),goog.html.SAFE_URL_PATTERN_.test(e)||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse=function(e){var o=new goog.html.SafeUrl;return o.privateDoNotAccessOrElseSafeHtmlWrappedValue_=e,o},goog.html.SafeUrl.ABOUT_BLANK=goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse("about:blank"),goog.html.TrustedResourceUrl=function(){this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_="",this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString=!0,goog.html.TrustedResourceUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_},goog.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.TrustedResourceUrl.prototype.getDirection=function(){return goog.i18n.bidi.Dir.LTR},goog.DEBUG&&(goog.html.TrustedResourceUrl.prototype.toString=function(){return"TrustedResourceUrl{"+this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_+"}"}),goog.html.TrustedResourceUrl.unwrap=function(e){return e instanceof goog.html.TrustedResourceUrl&&e.constructor===goog.html.TrustedResourceUrl&&e.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_:(goog.asserts.fail("expected object of type TrustedResourceUrl, got '"+e+"' of type "+goog.typeOf(e)),"type_error:TrustedResourceUrl")},goog.html.TrustedResourceUrl.format=function(e,o){var t=goog.string.Const.unwrap(e);if(!goog.html.TrustedResourceUrl.BASE_URL_.test(t))throw Error("Invalid TrustedResourceUrl format: "+t);var n=t.replace(goog.html.TrustedResourceUrl.FORMAT_MARKER_,function(e,n){if(!Object.prototype.hasOwnProperty.call(o,n))throw Error('Found marker, "'+n+'", in format string, "'+t+'", but no valid label mapping found in args: '+JSON.stringify(o));var r=o[n];return r instanceof goog.string.Const?goog.string.Const.unwrap(r):encodeURIComponent(String(r))});return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(n)},goog.html.TrustedResourceUrl.FORMAT_MARKER_=/%{(\w+)}/g,goog.html.TrustedResourceUrl.SCHEME_AND_ORIGIN_="(?:(?:https:)?//[0-9a-z.:[\\]-]+)?",goog.html.TrustedResourceUrl.BASE_ABSOLUTE_PATH_="(?:/[0-9a-z_~-]+(?:[/#?]|$))",goog.html.TrustedResourceUrl.BASE_URL_=new RegExp("^"+goog.html.TrustedResourceUrl.SCHEME_AND_ORIGIN_+goog.html.TrustedResourceUrl.BASE_ABSOLUTE_PATH_,"i"),goog.html.TrustedResourceUrl.fromConstant=function(e){return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(e))},goog.html.TrustedResourceUrl.fromConstants=function(e){for(var o="",t=0;t<e.length;t++)o+=goog.string.Const.unwrap(e[t]);return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(o)},goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse=function(e){var o=new goog.html.TrustedResourceUrl;return o.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_=e,o},goog.html.SafeHtml=function(){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_="",this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_,this.dir_=null},goog.html.SafeHtml.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.SafeHtml.prototype.getDirection=function(){return this.dir_},goog.html.SafeHtml.prototype.implementsGoogStringTypedString=!0,goog.html.SafeHtml.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_},goog.DEBUG&&(goog.html.SafeHtml.prototype.toString=function(){return"SafeHtml{"+this.privateDoNotAccessOrElseSafeHtmlWrappedValue_+"}"}),goog.html.SafeHtml.unwrap=function(e){return e instanceof goog.html.SafeHtml&&e.constructor===goog.html.SafeHtml&&e.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeHtmlWrappedValue_:(goog.asserts.fail("expected object of type SafeHtml, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeHtml")},goog.html.SafeHtml.htmlEscape=function(e){if(e instanceof goog.html.SafeHtml)return e;var o=null;return e.implementsGoogI18nBidiDirectionalString&&(o=e.getDirection()),e=e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.htmlEscape(e),o)},goog.html.SafeHtml.htmlEscapePreservingNewlines=function(e){return e instanceof goog.html.SafeHtml?e:(e=goog.html.SafeHtml.htmlEscape(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.newLineToBr(goog.html.SafeHtml.unwrap(e)),e.getDirection()))},goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces=function(e){return e instanceof goog.html.SafeHtml?e:(e=goog.html.SafeHtml.htmlEscape(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.whitespaceEscape(goog.html.SafeHtml.unwrap(e)),e.getDirection()))},goog.html.SafeHtml.from=goog.html.SafeHtml.htmlEscape,goog.html.SafeHtml.VALID_NAMES_IN_TAG_=/^[a-zA-Z0-9-]+$/,goog.html.SafeHtml.URL_ATTRIBUTES_={action:!0,cite:!0,data:!0,formaction:!0,href:!0,manifest:!0,poster:!0,src:!0},goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_={APPLET:!0,BASE:!0,EMBED:!0,IFRAME:!0,LINK:!0,MATH:!0,META:!0,OBJECT:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},goog.html.SafeHtml.create=function(e,o,t){return goog.html.SafeHtml.verifyTagName(String(e)),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(String(e),o,t)},goog.html.SafeHtml.verifyTagName=function(e){if(!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(e))throw Error("Invalid tag name <"+e+">.");if(e.toUpperCase()in goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_)throw Error("Tag name <"+e+"> is not allowed for SafeHtml.")},goog.html.SafeHtml.createIframe=function(e,o,t,n){e&&goog.html.TrustedResourceUrl.unwrap(e);var r={};return r.src=e||null,r.srcdoc=o&&goog.html.SafeHtml.unwrap(o),e=goog.html.SafeHtml.combineAttributes(r,{sandbox:""},t),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",e,n)},goog.html.SafeHtml.createSandboxIframe=function(e,o,t,n){if(!goog.html.SafeHtml.canUseSandboxIframe())throw Error("The browser does not support sandboxed iframes.");var r={};return r.src=e?goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(e)):null,r.srcdoc=o||null,r.sandbox="",e=goog.html.SafeHtml.combineAttributes(r,{},t),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",e,n)},goog.html.SafeHtml.canUseSandboxIframe=function(){return goog.global.HTMLIFrameElement&&"sandbox"in goog.global.HTMLIFrameElement.prototype},goog.html.SafeHtml.createScriptSrc=function(e,o){goog.html.TrustedResourceUrl.unwrap(e);var t=goog.html.SafeHtml.combineAttributes({src:e},{},o);return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",t)},goog.html.SafeHtml.createStyle=function(e,o){var t=goog.html.SafeHtml.combineAttributes({type:"text/css"},{},o),n="";e=goog.array.concat(e);for(var r=0;r<e.length;r++)n+=goog.html.SafeStyleSheet.unwrap(e[r]);return n=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(n,goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style",t,n)},goog.html.SafeHtml.createMetaRefresh=function(e,o){var t=goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(e));return(goog.labs.userAgent.browser.isIE()||goog.labs.userAgent.browser.isEdge())&&goog.string.contains(t,";")&&(t="'"+t.replace(/'/g,"%27")+"'"),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("meta",{"http-equiv":"refresh",content:(o||0)+"; url="+t})},goog.html.SafeHtml.getAttrNameAndValue_=function(e,o,t){if(t instanceof goog.string.Const)t=goog.string.Const.unwrap(t);else if("style"==o.toLowerCase())t=goog.html.SafeHtml.getStyleValue_(t);else{if(/^on/i.test(o))throw Error('Attribute "'+o+'" requires goog.string.Const value, "'+t+'" given.');if(o.toLowerCase()in goog.html.SafeHtml.URL_ATTRIBUTES_)if(t instanceof goog.html.TrustedResourceUrl)t=goog.html.TrustedResourceUrl.unwrap(t);else if(t instanceof goog.html.SafeUrl)t=goog.html.SafeUrl.unwrap(t);else{if(!goog.isString(t))throw Error('Attribute "'+o+'" on tag "'+e+'" requires goog.html.SafeUrl, goog.string.Const, or string, value "'+t+'" given.');t=goog.html.SafeUrl.sanitize(t).getTypedStringValue()}}return t.implementsGoogStringTypedString&&(t=t.getTypedStringValue()),goog.asserts.assert(goog.isString(t)||goog.isNumber(t),"String or number value expected, got "+typeof t+" with value: "+t),o+'="'+goog.string.htmlEscape(String(t))+'"'},goog.html.SafeHtml.getStyleValue_=function(e){if(!goog.isObject(e))throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, '+typeof e+" given: "+e);return e instanceof goog.html.SafeStyle||(e=goog.html.SafeStyle.create(e)),goog.html.SafeStyle.unwrap(e)},goog.html.SafeHtml.createWithDir=function(e,o,t,n){return o=goog.html.SafeHtml.create(o,t,n),o.dir_=e,o},goog.html.SafeHtml.concat=function(e){var o=goog.i18n.bidi.Dir.NEUTRAL,t="",n=function(e){goog.isArray(e)?goog.array.forEach(e,n):(e=goog.html.SafeHtml.htmlEscape(e),t+=goog.html.SafeHtml.unwrap(e),e=e.getDirection(),o==goog.i18n.bidi.Dir.NEUTRAL?o=e:e!=goog.i18n.bidi.Dir.NEUTRAL&&o!=e&&(o=null))};return goog.array.forEach(arguments,n),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(t,o)},goog.html.SafeHtml.concatWithDir=function(e,o){var t=goog.html.SafeHtml.concat(goog.array.slice(arguments,1));return t.dir_=e,t},goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse=function(e,o){return(new goog.html.SafeHtml).initSecurityPrivateDoNotAccessOrElse_(e,o)},goog.html.SafeHtml.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e,o){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_=e,this.dir_=o,this},goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse=function(e,o,t){var n,r=null;return n="<"+e+goog.html.SafeHtml.stringifyAttributes(e,o),goog.isDefAndNotNull(t)?goog.isArray(t)||(t=[t]):t=[],goog.dom.tags.isVoidTag(e.toLowerCase())?(goog.asserts.assert(!t.length,"Void tag <"+e+"> does not allow content."),n+=">"):(r=goog.html.SafeHtml.concat(t),n+=">"+goog.html.SafeHtml.unwrap(r)+"</"+e+">",r=r.getDirection()),(e=o&&o.dir)&&(r=/^(ltr|rtl|auto)$/i.test(e)?goog.i18n.bidi.Dir.NEUTRAL:null),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(n,r)},goog.html.SafeHtml.stringifyAttributes=function(e,o){var t="";if(o)for(var n in o){if(!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(n))throw Error('Invalid attribute name "'+n+'".');var r=o[n];goog.isDefAndNotNull(r)&&(t+=" "+goog.html.SafeHtml.getAttrNameAndValue_(e,n,r))}return t},goog.html.SafeHtml.combineAttributes=function(e,o,t){var n,r={};for(n in e)goog.asserts.assert(n.toLowerCase()==n,"Must be lower case"),r[n]=e[n];for(n in o)goog.asserts.assert(n.toLowerCase()==n,"Must be lower case"),r[n]=o[n];for(n in t){var i=n.toLowerCase();if(i in e)throw Error('Cannot override "'+i+'" attribute, got "'+n+'" with value "'+t[n]+'"');i in o&&delete r[i],r[n]=t[n]}return r},goog.html.SafeHtml.DOCTYPE_HTML=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<!DOCTYPE html>",goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.EMPTY=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("",goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.BR=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<br>",goog.i18n.bidi.Dir.NEUTRAL),goog.dom.safe={},goog.dom.safe.InsertAdjacentHtmlPosition={AFTERBEGIN:"afterbegin",AFTEREND:"afterend",BEFOREBEGIN:"beforebegin",BEFOREEND:"beforeend"},goog.dom.safe.insertAdjacentHtml=function(e,o,t){e.insertAdjacentHTML(o,goog.html.SafeHtml.unwrap(t))},goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_={MATH:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},goog.dom.safe.setInnerHtml=function(e,o){if(goog.asserts.ENABLE_ASSERTS){var t=e.tagName.toUpperCase();if(goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_[t])throw Error("goog.dom.safe.setInnerHtml cannot be used to set content of "+e.tagName+".")}e.innerHTML=goog.html.SafeHtml.unwrap(o)},goog.dom.safe.setOuterHtml=function(e,o){e.outerHTML=goog.html.SafeHtml.unwrap(o)},goog.dom.safe.setStyle=function(e,o){e.style.cssText=goog.html.SafeStyle.unwrap(o)},goog.dom.safe.documentWrite=function(e,o){e.write(goog.html.SafeHtml.unwrap(o))},goog.dom.safe.setAnchorHref=function(e,o){goog.dom.safe.assertIsHTMLAnchorElement_(e);var t;t=o instanceof goog.html.SafeUrl?o:goog.html.SafeUrl.sanitize(o),e.href=goog.html.SafeUrl.unwrap(t)},goog.dom.safe.setImageSrc=function(e,o){goog.dom.safe.assertIsHTMLImageElement_(e);var t;t=o instanceof goog.html.SafeUrl?o:goog.html.SafeUrl.sanitize(o),e.src=goog.html.SafeUrl.unwrap(t)},goog.dom.safe.setEmbedSrc=function(e,o){goog.dom.safe.assertIsHTMLEmbedElement_(e),e.src=goog.html.TrustedResourceUrl.unwrap(o)},goog.dom.safe.setFrameSrc=function(e,o){goog.dom.safe.assertIsHTMLFrameElement_(e),e.src=goog.html.TrustedResourceUrl.unwrap(o)},goog.dom.safe.setIframeSrc=function(e,o){goog.dom.safe.assertIsHTMLIFrameElement_(e),e.src=goog.html.TrustedResourceUrl.unwrap(o)},goog.dom.safe.setLinkHrefAndRel=function(e,o,t){goog.dom.safe.assertIsHTMLLinkElement_(e),e.rel=t,goog.string.caseInsensitiveContains(t,"stylesheet")?(goog.asserts.assert(o instanceof goog.html.TrustedResourceUrl,'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'),e.href=goog.html.TrustedResourceUrl.unwrap(o)):e.href=o instanceof goog.html.TrustedResourceUrl?goog.html.TrustedResourceUrl.unwrap(o):o instanceof goog.html.SafeUrl?goog.html.SafeUrl.unwrap(o):goog.html.SafeUrl.sanitize(o).getTypedStringValue()},goog.dom.safe.setObjectData=function(e,o){goog.dom.safe.assertIsHTMLObjectElement_(e),e.data=goog.html.TrustedResourceUrl.unwrap(o)},goog.dom.safe.setScriptSrc=function(e,o){goog.dom.safe.assertIsHTMLScriptElement_(e),e.src=goog.html.TrustedResourceUrl.unwrap(o)},goog.dom.safe.setLocationHref=function(e,o){goog.dom.safe.assertIsLocation_(e);var t;t=o instanceof goog.html.SafeUrl?o:goog.html.SafeUrl.sanitize(o),e.href=goog.html.SafeUrl.unwrap(t)},goog.dom.safe.openInWindow=function(e,o,t,n,r){return e=e instanceof goog.html.SafeUrl?e:goog.html.SafeUrl.sanitize(e),(o||window).open(goog.html.SafeUrl.unwrap(e),t?goog.string.Const.unwrap(t):"",n,r)},goog.dom.safe.assertIsLocation_=function(e){return goog.asserts.ENABLE_ASSERTS&&"undefined"!=typeof Location&&"undefined"!=typeof Element&&goog.asserts.assert(e&&(e instanceof Location||!(e instanceof Element)),"Argument is not a Location (or a non-Element mock); got: %s",goog.dom.safe.debugStringForType_(e)),e},goog.dom.safe.assertIsHTMLAnchorElement_=function(e){return goog.asserts.ENABLE_ASSERTS&&"undefined"!=typeof HTMLAnchorElement&&"undefined"!=typeof Location&&"undefined"!=typeof Element&&goog.asserts.assert(e&&(e instanceof HTMLAnchorElement||!(e instanceof Location||e instanceof Element)),"Argument is not a HTMLAnchorElement (or a non-Element mock); got: %s",goog.dom.safe.debugStringForType_(e)),e},goog.dom.safe.assertIsHTMLLinkElement_=function(e){return goog.asserts.ENABLE_ASSERTS&&"undefined"!=typeof HTMLLinkElement&&"undefined"!=typeof Location&&"undefined"!=typeof Element&&goog.asserts.assert(e&&(e instanceof HTMLLinkElement||!(e instanceof Location||e instanceof Element)),"Argument is not a HTMLLinkElement (or a non-Element mock); got: %s",goog.dom.safe.debugStringForType_(e)),e},goog.dom.safe.assertIsHTMLImageElement_=function(e){return goog.asserts.ENABLE_ASSERTS&&"undefined"!=typeof HTMLImageElement&&"undefined"!=typeof Element&&goog.asserts.assert(e&&(e instanceof HTMLImageElement||!(e instanceof Element)),"Argument is not a HTMLImageElement (or a non-Element mock); got: %s",goog.dom.safe.debugStringForType_(e)),e},goog.dom.safe.assertIsHTMLEmbedElement_=function(e){return goog.asserts.ENABLE_ASSERTS&&"undefined"!=typeof HTMLEmbedElement&&"undefined"!=typeof Element&&goog.asserts.assert(e&&(e instanceof HTMLEmbedElement||!(e instanceof Element)),"Argument is not a HTMLEmbedElement (or a non-Element mock); got: %s",goog.dom.safe.debugStringForType_(e)),e},goog.dom.safe.assertIsHTMLFrameElement_=function(e){return goog.asserts.ENABLE_ASSERTS&&"undefined"!=typeof HTMLFrameElement&&"undefined"!=typeof Element&&goog.asserts.assert(e&&(e instanceof HTMLFrameElement||!(e instanceof Element)),"Argument is not a HTMLFrameElement (or a non-Element mock); got: %s",goog.dom.safe.debugStringForType_(e)),e},goog.dom.safe.assertIsHTMLIFrameElement_=function(e){
+return goog.asserts.ENABLE_ASSERTS&&"undefined"!=typeof HTMLIFrameElement&&"undefined"!=typeof Element&&goog.asserts.assert(e&&(e instanceof HTMLIFrameElement||!(e instanceof Element)),"Argument is not a HTMLIFrameElement (or a non-Element mock); got: %s",goog.dom.safe.debugStringForType_(e)),e},goog.dom.safe.assertIsHTMLObjectElement_=function(e){return goog.asserts.ENABLE_ASSERTS&&"undefined"!=typeof HTMLObjectElement&&"undefined"!=typeof Element&&goog.asserts.assert(e&&(e instanceof HTMLObjectElement||!(e instanceof Element)),"Argument is not a HTMLObjectElement (or a non-Element mock); got: %s",goog.dom.safe.debugStringForType_(e)),e},goog.dom.safe.assertIsHTMLScriptElement_=function(e){return goog.asserts.ENABLE_ASSERTS&&"undefined"!=typeof HTMLScriptElement&&"undefined"!=typeof Element&&goog.asserts.assert(e&&(e instanceof HTMLScriptElement||!(e instanceof Element)),"Argument is not a HTMLScriptElement (or a non-Element mock); got: %s",goog.dom.safe.debugStringForType_(e)),e},goog.dom.safe.debugStringForType_=function(e){return goog.isObject(e)?e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e):void 0===e?"undefined":null===e?"null":typeof e},goog.html.SafeScript=function(){this.privateDoNotAccessOrElseSafeScriptWrappedValue_="",this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeScript.prototype.implementsGoogStringTypedString=!0,goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeScript.fromConstant=function(e){return e=goog.string.Const.unwrap(e),0===e.length?goog.html.SafeScript.EMPTY:goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeScript.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_},goog.DEBUG&&(goog.html.SafeScript.prototype.toString=function(){return"SafeScript{"+this.privateDoNotAccessOrElseSafeScriptWrappedValue_+"}"}),goog.html.SafeScript.unwrap=function(e){return e instanceof goog.html.SafeScript&&e.constructor===goog.html.SafeScript&&e.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeScriptWrappedValue_:(goog.asserts.fail("expected object of type SafeScript, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeScript")},goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse=function(e){return(new goog.html.SafeScript).initSecurityPrivateDoNotAccessOrElse_(e)},goog.html.SafeScript.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_=e,this},goog.html.SafeScript.EMPTY=goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(""),goog.html.uncheckedconversions={},goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract=function(e,o,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(o,t||null)},goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract=function(e,o){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.isEmpty(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(o)},goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract=function(e,o){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(o)},goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract=function(e,o){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(o)},goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract=function(e,o){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(o)},goog.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract=function(e,o){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(o)},goog.math.Coordinate=function(e,o){this.x=goog.isDef(e)?e:0,this.y=goog.isDef(o)?o:0},goog.math.Coordinate.prototype.clone=function(){return new goog.math.Coordinate(this.x,this.y)},goog.DEBUG&&(goog.math.Coordinate.prototype.toString=function(){return"("+this.x+", "+this.y+")"}),goog.math.Coordinate.prototype.equals=function(e){return e instanceof goog.math.Coordinate&&goog.math.Coordinate.equals(this,e)},goog.math.Coordinate.equals=function(e,o){return e==o?!0:e&&o?e.x==o.x&&e.y==o.y:!1},goog.math.Coordinate.distance=function(e,o){var t=e.x-o.x,n=e.y-o.y;return Math.sqrt(t*t+n*n)},goog.math.Coordinate.magnitude=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},goog.math.Coordinate.azimuth=function(e){return goog.math.angle(0,0,e.x,e.y)},goog.math.Coordinate.squaredDistance=function(e,o){var t=e.x-o.x,n=e.y-o.y;return t*t+n*n},goog.math.Coordinate.difference=function(e,o){return new goog.math.Coordinate(e.x-o.x,e.y-o.y)},goog.math.Coordinate.sum=function(e,o){return new goog.math.Coordinate(e.x+o.x,e.y+o.y)},goog.math.Coordinate.prototype.ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},goog.math.Coordinate.prototype.floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},goog.math.Coordinate.prototype.round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},goog.math.Coordinate.prototype.translate=function(e,o){return e instanceof goog.math.Coordinate?(this.x+=e.x,this.y+=e.y):(this.x+=Number(e),goog.isNumber(o)&&(this.y+=o)),this},goog.math.Coordinate.prototype.scale=function(e,o){var t=goog.isNumber(o)?o:e;return this.x*=e,this.y*=t,this},goog.math.Coordinate.prototype.rotateRadians=function(e,o){var t=o||new goog.math.Coordinate(0,0),n=this.x,r=this.y,i=Math.cos(e),s=Math.sin(e);this.x=(n-t.x)*i-(r-t.y)*s+t.x,this.y=(n-t.x)*s+(r-t.y)*i+t.y},goog.math.Coordinate.prototype.rotateDegrees=function(e,o){this.rotateRadians(goog.math.toRadians(e),o)},goog.math.Size=function(e,o){this.width=e,this.height=o},goog.math.Size.equals=function(e,o){return e==o?!0:e&&o?e.width==o.width&&e.height==o.height:!1},goog.math.Size.prototype.clone=function(){return new goog.math.Size(this.width,this.height)},goog.DEBUG&&(goog.math.Size.prototype.toString=function(){return"("+this.width+" x "+this.height+")"}),goog.math.Size.prototype.getLongest=function(){return Math.max(this.width,this.height)},goog.math.Size.prototype.getShortest=function(){return Math.min(this.width,this.height)},goog.math.Size.prototype.area=function(){return this.width*this.height},goog.math.Size.prototype.perimeter=function(){return 2*(this.width+this.height)},goog.math.Size.prototype.aspectRatio=function(){return this.width/this.height},goog.math.Size.prototype.isEmpty=function(){return!this.area()},goog.math.Size.prototype.ceil=function(){return this.width=Math.ceil(this.width),this.height=Math.ceil(this.height),this},goog.math.Size.prototype.fitsInside=function(e){return this.width<=e.width&&this.height<=e.height},goog.math.Size.prototype.floor=function(){return this.width=Math.floor(this.width),this.height=Math.floor(this.height),this},goog.math.Size.prototype.round=function(){return this.width=Math.round(this.width),this.height=Math.round(this.height),this},goog.math.Size.prototype.scale=function(e,o){var t=goog.isNumber(o)?o:e;return this.width*=e,this.height*=t,this},goog.math.Size.prototype.scaleToCover=function(e){return e=this.aspectRatio()<=e.aspectRatio()?e.width/this.width:e.height/this.height,this.scale(e)},goog.math.Size.prototype.scaleToFit=function(e){return e=this.aspectRatio()>e.aspectRatio()?e.width/this.width:e.height/this.height,this.scale(e)},goog.dom.ASSUME_QUIRKS_MODE=!1,goog.dom.ASSUME_STANDARDS_MODE=!1,goog.dom.COMPAT_MODE_KNOWN_=goog.dom.ASSUME_QUIRKS_MODE||goog.dom.ASSUME_STANDARDS_MODE,goog.dom.getDomHelper=function(e){return e?new goog.dom.DomHelper(goog.dom.getOwnerDocument(e)):goog.dom.defaultDomHelper_||(goog.dom.defaultDomHelper_=new goog.dom.DomHelper)},goog.dom.getDocument=function(){return document},goog.dom.getElement=function(e){return goog.dom.getElementHelper_(document,e)},goog.dom.getElementHelper_=function(e,o){return goog.isString(o)?e.getElementById(o):o},goog.dom.getRequiredElement=function(e){return goog.dom.getRequiredElementHelper_(document,e)},goog.dom.getRequiredElementHelper_=function(e,o){goog.asserts.assertString(o);var t=goog.dom.getElementHelper_(e,o);return t=goog.asserts.assertElement(t,"No element found with id: "+o)},goog.dom.$=goog.dom.getElement,goog.dom.getElementsByTagName=function(e,o){return(o||document).getElementsByTagName(String(e))},goog.dom.getElementsByTagNameAndClass=function(e,o,t){return goog.dom.getElementsByTagNameAndClass_(document,e,o,t)},goog.dom.getElementsByClass=function(e,o){var t=o||document;return goog.dom.canUseQuerySelector_(t)?t.querySelectorAll("."+e):goog.dom.getElementsByTagNameAndClass_(document,"*",e,o)},goog.dom.getElementByClass=function(e,o){var t=o||document;return(t.getElementsByClassName?t.getElementsByClassName(e)[0]:goog.dom.canUseQuerySelector_(t)?t.querySelector("."+e):goog.dom.getElementsByTagNameAndClass_(document,"*",e,o)[0])||null},goog.dom.getRequiredElementByClass=function(e,o){var t=goog.dom.getElementByClass(e,o);return goog.asserts.assert(t,"No element found with className: "+e)},goog.dom.canUseQuerySelector_=function(e){return!(!e.querySelectorAll||!e.querySelector)},goog.dom.getElementsByTagNameAndClass_=function(e,o,t,n){if(e=n||e,o=o&&"*"!=o?String(o).toUpperCase():"",goog.dom.canUseQuerySelector_(e)&&(o||t))return e.querySelectorAll(o+(t?"."+t:""));if(t&&e.getElementsByClassName){if(e=e.getElementsByClassName(t),o){n={};for(var r,i=0,s=0;r=e[s];s++)o==r.nodeName&&(n[i++]=r);return n.length=i,n}return e}if(e=e.getElementsByTagName(o||"*"),t){for(n={},s=i=0;r=e[s];s++)o=r.className,"function"==typeof o.split&&goog.array.contains(o.split(/\s+/),t)&&(n[i++]=r);return n.length=i,n}return e},goog.dom.$$=goog.dom.getElementsByTagNameAndClass,goog.dom.setProperties=function(e,o){goog.object.forEach(o,function(o,t){"style"==t?e.style.cssText=o:"class"==t?e.className=o:"for"==t?e.htmlFor=o:goog.dom.DIRECT_ATTRIBUTE_MAP_.hasOwnProperty(t)?e.setAttribute(goog.dom.DIRECT_ATTRIBUTE_MAP_[t],o):goog.string.startsWith(t,"aria-")||goog.string.startsWith(t,"data-")?e.setAttribute(t,o):e[t]=o})},goog.dom.DIRECT_ATTRIBUTE_MAP_={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},goog.dom.getViewportSize=function(e){return goog.dom.getViewportSize_(e||window)},goog.dom.getViewportSize_=function(e){return e=e.document,e=goog.dom.isCss1CompatMode_(e)?e.documentElement:e.body,new goog.math.Size(e.clientWidth,e.clientHeight)},goog.dom.getDocumentHeight=function(){return goog.dom.getDocumentHeight_(window)},goog.dom.getDocumentHeightForWindow=function(e){return goog.dom.getDocumentHeight_(e)},goog.dom.getDocumentHeight_=function(e){var o=e.document,t=0;if(o){var t=o.body,n=o.documentElement;if(!n||!t)return 0;if(e=goog.dom.getViewportSize_(e).height,goog.dom.isCss1CompatMode_(o)&&n.scrollHeight)t=n.scrollHeight!=e?n.scrollHeight:n.offsetHeight;else{var o=n.scrollHeight,r=n.offsetHeight;n.clientHeight!=r&&(o=t.scrollHeight,r=t.offsetHeight),t=o>e?o>r?o:r:r>o?o:r}}return t},goog.dom.getPageScroll=function(e){return goog.dom.getDomHelper((e||goog.global||window).document).getDocumentScroll()},goog.dom.getDocumentScroll=function(){return goog.dom.getDocumentScroll_(document)},goog.dom.getDocumentScroll_=function(e){var o=goog.dom.getDocumentScrollElement_(e);return e=goog.dom.getWindow_(e),goog.userAgent.IE&&goog.userAgent.isVersionOrHigher("10")&&e.pageYOffset!=o.scrollTop?new goog.math.Coordinate(o.scrollLeft,o.scrollTop):new goog.math.Coordinate(e.pageXOffset||o.scrollLeft,e.pageYOffset||o.scrollTop)},goog.dom.getDocumentScrollElement=function(){return goog.dom.getDocumentScrollElement_(document)},goog.dom.getDocumentScrollElement_=function(e){return e.scrollingElement?e.scrollingElement:!goog.userAgent.WEBKIT&&goog.dom.isCss1CompatMode_(e)?e.documentElement:e.body||e.documentElement},goog.dom.getWindow=function(e){return e?goog.dom.getWindow_(e):window},goog.dom.getWindow_=function(e){return e.parentWindow||e.defaultView},goog.dom.createDom=function(e,o,t){return goog.dom.createDom_(document,arguments)},goog.dom.createDom_=function(e,o){var t=String(o[0]),n=o[1];if(!goog.dom.BrowserFeature.CAN_ADD_NAME_OR_TYPE_ATTRIBUTES&&n&&(n.name||n.type)){if(t=["<",t],n.name&&t.push(' name="',goog.string.htmlEscape(n.name),'"'),n.type){t.push(' type="',goog.string.htmlEscape(n.type),'"');var r={};goog.object.extend(r,n),delete r.type,n=r}t.push(">"),t=t.join("")}return t=e.createElement(t),n&&(goog.isString(n)?t.className=n:goog.isArray(n)?t.className=n.join(" "):goog.dom.setProperties(t,n)),2<o.length&&goog.dom.append_(e,t,o,2),t},goog.dom.append_=function(e,o,t,n){function r(t){t&&o.appendChild(goog.isString(t)?e.createTextNode(t):t)}for(;n<t.length;n++){var i=t[n];goog.isArrayLike(i)&&!goog.dom.isNodeLike(i)?goog.array.forEach(goog.dom.isNodeList(i)?goog.array.toArray(i):i,r):r(i)}},goog.dom.$dom=goog.dom.createDom,goog.dom.createElement=function(e){return goog.dom.createElement_(document,e)},goog.dom.createElement_=function(e,o){return e.createElement(String(o))},goog.dom.createTextNode=function(e){return document.createTextNode(String(e))},goog.dom.createTable=function(e,o,t){return goog.dom.createTable_(document,e,o,!!t)},goog.dom.createTable_=function(e,o,t,n){for(var r=goog.dom.createElement_(e,"TABLE"),i=r.appendChild(goog.dom.createElement_(e,"TBODY")),s=0;o>s;s++){for(var l=goog.dom.createElement_(e,"TR"),g=0;t>g;g++){var a=goog.dom.createElement_(e,"TD");n&&goog.dom.setTextContent(a,goog.string.Unicode.NBSP),l.appendChild(a)}i.appendChild(l)}return r},goog.dom.constHtmlToNode=function(e){var o=goog.array.map(arguments,goog.string.Const.unwrap),o=goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Constant HTML string, that gets turned into a Node later, so it will be automatically balanced."),o.join(""));return goog.dom.safeHtmlToNode(o)},goog.dom.safeHtmlToNode=function(e){return goog.dom.safeHtmlToNode_(document,e)},goog.dom.safeHtmlToNode_=function(e,o){var t=goog.dom.createElement_(e,"DIV");return goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT?(goog.dom.safe.setInnerHtml(t,goog.html.SafeHtml.concat(goog.html.SafeHtml.BR,o)),t.removeChild(t.firstChild)):goog.dom.safe.setInnerHtml(t,o),goog.dom.childrenToNode_(e,t)},goog.dom.childrenToNode_=function(e,o){if(1==o.childNodes.length)return o.removeChild(o.firstChild);for(var t=e.createDocumentFragment();o.firstChild;)t.appendChild(o.firstChild);return t},goog.dom.isCss1CompatMode=function(){return goog.dom.isCss1CompatMode_(document)},goog.dom.isCss1CompatMode_=function(e){return goog.dom.COMPAT_MODE_KNOWN_?goog.dom.ASSUME_STANDARDS_MODE:"CSS1Compat"==e.compatMode},goog.dom.canHaveChildren=function(e){if(e.nodeType!=goog.dom.NodeType.ELEMENT)return!1;switch(e.tagName){case"APPLET":case"AREA":case"BASE":case"BR":case"COL":case"COMMAND":case"EMBED":case"FRAME":case"HR":case"IMG":case"INPUT":case"IFRAME":case"ISINDEX":case"KEYGEN":case"LINK":case"NOFRAMES":case"NOSCRIPT":case"META":case"OBJECT":case"PARAM":case"SCRIPT":case"SOURCE":case"STYLE":case"TRACK":case"WBR":return!1}return!0},goog.dom.appendChild=function(e,o){e.appendChild(o)},goog.dom.append=function(e,o){goog.dom.append_(goog.dom.getOwnerDocument(e),e,arguments,1)},goog.dom.removeChildren=function(e){for(var o;o=e.firstChild;)e.removeChild(o)},goog.dom.insertSiblingBefore=function(e,o){o.parentNode&&o.parentNode.insertBefore(e,o)},goog.dom.insertSiblingAfter=function(e,o){o.parentNode&&o.parentNode.insertBefore(e,o.nextSibling)},goog.dom.insertChildAt=function(e,o,t){e.insertBefore(o,e.childNodes[t]||null)},goog.dom.removeNode=function(e){return e&&e.parentNode?e.parentNode.removeChild(e):null},goog.dom.replaceNode=function(e,o){var t=o.parentNode;t&&t.replaceChild(e,o)},goog.dom.flattenElement=function(e){var o,t=e.parentNode;if(t&&t.nodeType!=goog.dom.NodeType.DOCUMENT_FRAGMENT){if(e.removeNode)return e.removeNode(!1);for(;o=e.firstChild;)t.insertBefore(o,e);return goog.dom.removeNode(e)}},goog.dom.getChildren=function(e){return goog.dom.BrowserFeature.CAN_USE_CHILDREN_ATTRIBUTE&&void 0!=e.children?e.children:goog.array.filter(e.childNodes,function(e){return e.nodeType==goog.dom.NodeType.ELEMENT})},goog.dom.getFirstElementChild=function(e){return goog.isDef(e.firstElementChild)?e.firstElementChild:goog.dom.getNextElementNode_(e.firstChild,!0)},goog.dom.getLastElementChild=function(e){return goog.isDef(e.lastElementChild)?e.lastElementChild:goog.dom.getNextElementNode_(e.lastChild,!1)},goog.dom.getNextElementSibling=function(e){return goog.isDef(e.nextElementSibling)?e.nextElementSibling:goog.dom.getNextElementNode_(e.nextSibling,!0)},goog.dom.getPreviousElementSibling=function(e){return goog.isDef(e.previousElementSibling)?e.previousElementSibling:goog.dom.getNextElementNode_(e.previousSibling,!1)},goog.dom.getNextElementNode_=function(e,o){for(;e&&e.nodeType!=goog.dom.NodeType.ELEMENT;)e=o?e.nextSibling:e.previousSibling;return e},goog.dom.getNextNode=function(e){if(!e)return null;if(e.firstChild)return e.firstChild;for(;e&&!e.nextSibling;)e=e.parentNode;return e?e.nextSibling:null},goog.dom.getPreviousNode=function(e){if(!e)return null;if(!e.previousSibling)return e.parentNode;for(e=e.previousSibling;e&&e.lastChild;)e=e.lastChild;return e},goog.dom.isNodeLike=function(e){return goog.isObject(e)&&0<e.nodeType},goog.dom.isElement=function(e){return goog.isObject(e)&&e.nodeType==goog.dom.NodeType.ELEMENT},goog.dom.isWindow=function(e){return goog.isObject(e)&&e.window==e},goog.dom.getParentElement=function(e){var o;return!goog.dom.BrowserFeature.CAN_USE_PARENT_ELEMENT_PROPERTY||goog.userAgent.IE&&goog.userAgent.isVersionOrHigher("9")&&!goog.userAgent.isVersionOrHigher("10")&&goog.global.SVGElement&&e instanceof goog.global.SVGElement||!(o=e.parentElement)?(o=e.parentNode,goog.dom.isElement(o)?o:null):o},goog.dom.contains=function(e,o){if(!e||!o)return!1;if(e.contains&&o.nodeType==goog.dom.NodeType.ELEMENT)return e==o||e.contains(o);if("undefined"!=typeof e.compareDocumentPosition)return e==o||!!(16&e.compareDocumentPosition(o));for(;o&&e!=o;)o=o.parentNode;return o==e},goog.dom.compareNodeOrder=function(e,o){if(e==o)return 0;if(e.compareDocumentPosition)return 2&e.compareDocumentPosition(o)?1:-1;if(goog.userAgent.IE&&!goog.userAgent.isDocumentModeOrHigher(9)){if(e.nodeType==goog.dom.NodeType.DOCUMENT)return-1;if(o.nodeType==goog.dom.NodeType.DOCUMENT)return 1}if("sourceIndex"in e||e.parentNode&&"sourceIndex"in e.parentNode){var t=e.nodeType==goog.dom.NodeType.ELEMENT,n=o.nodeType==goog.dom.NodeType.ELEMENT;if(t&&n)return e.sourceIndex-o.sourceIndex;var r=e.parentNode,i=o.parentNode;return r==i?goog.dom.compareSiblingOrder_(e,o):!t&&goog.dom.contains(r,o)?-1*goog.dom.compareParentsDescendantNodeIe_(e,o):!n&&goog.dom.contains(i,e)?goog.dom.compareParentsDescendantNodeIe_(o,e):(t?e.sourceIndex:r.sourceIndex)-(n?o.sourceIndex:i.sourceIndex)}return n=goog.dom.getOwnerDocument(e),t=n.createRange(),t.selectNode(e),t.collapse(!0),n=n.createRange(),n.selectNode(o),n.collapse(!0),t.compareBoundaryPoints(goog.global.Range.START_TO_END,n)},goog.dom.compareParentsDescendantNodeIe_=function(e,o){var t=e.parentNode;if(t==o)return-1;for(var n=o;n.parentNode!=t;)n=n.parentNode;return goog.dom.compareSiblingOrder_(n,e)},goog.dom.compareSiblingOrder_=function(e,o){for(var t=o;t=t.previousSibling;)if(t==e)return-1;return 1},goog.dom.findCommonAncestor=function(e){var o,t=arguments.length;if(!t)return null;if(1==t)return arguments[0];var n=[],r=1/0;for(o=0;t>o;o++){for(var i=[],s=arguments[o];s;)i.unshift(s),s=s.parentNode;n.push(i),r=Math.min(r,i.length)}for(i=null,o=0;r>o;o++){for(var s=n[0][o],l=1;t>l;l++)if(s!=n[l][o])return i;i=s}return i},goog.dom.getOwnerDocument=function(e){return goog.asserts.assert(e,"Node cannot be null or undefined."),e.nodeType==goog.dom.NodeType.DOCUMENT?e:e.ownerDocument||e.document},goog.dom.getFrameContentDocument=function(e){return e.contentDocument||e.contentWindow.document},goog.dom.getFrameContentWindow=function(e){try{return e.contentWindow||(e.contentDocument?goog.dom.getWindow(e.contentDocument):null)}catch(o){}return null},goog.dom.setTextContent=function(e,o){if(goog.asserts.assert(null!=e,"goog.dom.setTextContent expects a non-null value for node"),"textContent"in e)e.textContent=o;else if(e.nodeType==goog.dom.NodeType.TEXT)e.data=o;else if(e.firstChild&&e.firstChild.nodeType==goog.dom.NodeType.TEXT){for(;e.lastChild!=e.firstChild;)e.removeChild(e.lastChild);e.firstChild.data=o}else{goog.dom.removeChildren(e);var t=goog.dom.getOwnerDocument(e);e.appendChild(t.createTextNode(String(o)))}},goog.dom.getOuterHtml=function(e){if(goog.asserts.assert(null!==e,"goog.dom.getOuterHtml expects a non-null value for element"),"outerHTML"in e)return e.outerHTML;var o=goog.dom.getOwnerDocument(e),o=goog.dom.createElement_(o,"DIV");return o.appendChild(e.cloneNode(!0)),o.innerHTML},goog.dom.findNode=function(e,o){var t=[];return goog.dom.findNodes_(e,o,t,!0)?t[0]:void 0},goog.dom.findNodes=function(e,o){var t=[];return goog.dom.findNodes_(e,o,t,!1),t},goog.dom.findNodes_=function(e,o,t,n){if(null!=e)for(e=e.firstChild;e;){if(o(e)&&(t.push(e),n)||goog.dom.findNodes_(e,o,t,n))return!0;e=e.nextSibling}return!1},goog.dom.TAGS_TO_IGNORE_={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},goog.dom.PREDEFINED_TAG_VALUES_={IMG:" ",BR:"\n"},goog.dom.isFocusableTabIndex=function(e){return goog.dom.hasSpecifiedTabIndex_(e)&&goog.dom.isTabIndexFocusable_(e)},goog.dom.setFocusableTabIndex=function(e,o){o?e.tabIndex=0:(e.tabIndex=-1,e.removeAttribute("tabIndex"))},goog.dom.isFocusable=function(e){var o;return(o=goog.dom.nativelySupportsFocus_(e)?!e.disabled&&(!goog.dom.hasSpecifiedTabIndex_(e)||goog.dom.isTabIndexFocusable_(e)):goog.dom.isFocusableTabIndex(e))&&goog.userAgent.IE?goog.dom.hasNonZeroBoundingRect_(e):o},goog.dom.hasSpecifiedTabIndex_=function(e){return goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("9")?(e=e.getAttributeNode("tabindex"),goog.isDefAndNotNull(e)&&e.specified):e.hasAttribute("tabindex")},goog.dom.isTabIndexFocusable_=function(e){return e=e.tabIndex,goog.isNumber(e)&&e>=0&&32768>e},goog.dom.nativelySupportsFocus_=function(e){return"A"==e.tagName||"INPUT"==e.tagName||"TEXTAREA"==e.tagName||"SELECT"==e.tagName||"BUTTON"==e.tagName},goog.dom.hasNonZeroBoundingRect_=function(e){return e=!goog.isFunction(e.getBoundingClientRect)||goog.userAgent.IE&&null==e.parentElement?{height:e.offsetHeight,width:e.offsetWidth}:e.getBoundingClientRect(),goog.isDefAndNotNull(e)&&0<e.height&&0<e.width},goog.dom.getTextContent=function(e){if(goog.dom.BrowserFeature.CAN_USE_INNER_TEXT&&null!==e&&"innerText"in e)e=goog.string.canonicalizeNewlines(e.innerText);else{var o=[];goog.dom.getTextContent_(e,o,!0),e=o.join("")}return e=e.replace(/ \xAD /g," ").replace(/\xAD/g,""),e=e.replace(/\u200B/g,""),goog.dom.BrowserFeature.CAN_USE_INNER_TEXT||(e=e.replace(/ +/g," "))," "!=e&&(e=e.replace(/^\s*/,"")),e},goog.dom.getRawTextContent=function(e){var o=[];return goog.dom.getTextContent_(e,o,!1),o.join("")},goog.dom.getTextContent_=function(e,o,t){if(!(e.nodeName in goog.dom.TAGS_TO_IGNORE_))if(e.nodeType==goog.dom.NodeType.TEXT)t?o.push(String(e.nodeValue).replace(/(\r\n|\r|\n)/g,"")):o.push(e.nodeValue);else if(e.nodeName in goog.dom.PREDEFINED_TAG_VALUES_)o.push(goog.dom.PREDEFINED_TAG_VALUES_[e.nodeName]);else for(e=e.firstChild;e;)goog.dom.getTextContent_(e,o,t),e=e.nextSibling},goog.dom.getNodeTextLength=function(e){return goog.dom.getTextContent(e).length},goog.dom.getNodeTextOffset=function(e,o){for(var t=o||goog.dom.getOwnerDocument(e).body,n=[];e&&e!=t;){for(var r=e;r=r.previousSibling;)n.unshift(goog.dom.getTextContent(r));e=e.parentNode}return goog.string.trimLeft(n.join("")).replace(/ +/g," ").length},goog.dom.getNodeAtOffset=function(e,o,t){e=[e];for(var n=0,r=null;0<e.length&&o>n;)if(r=e.pop(),!(r.nodeName in goog.dom.TAGS_TO_IGNORE_))if(r.nodeType==goog.dom.NodeType.TEXT)var i=r.nodeValue.replace(/(\r\n|\r|\n)/g,"").replace(/ +/g," "),n=n+i.length;else if(r.nodeName in goog.dom.PREDEFINED_TAG_VALUES_)n+=goog.dom.PREDEFINED_TAG_VALUES_[r.nodeName].length;else for(i=r.childNodes.length-1;i>=0;i--)e.push(r.childNodes[i]);return goog.isObject(t)&&(t.remainder=r?r.nodeValue.length+o-n-1:0,t.node=r),r},goog.dom.isNodeList=function(e){if(e&&"number"==typeof e.length){if(goog.isObject(e))return"function"==typeof e.item||"string"==typeof e.item;if(goog.isFunction(e))return"function"==typeof e.item}return!1},goog.dom.getAncestorByTagNameAndClass=function(e,o,t,n){if(!o&&!t)return null;var r=o?String(o).toUpperCase():null;return goog.dom.getAncestor(e,function(e){return(!r||e.nodeName==r)&&(!t||goog.isString(e.className)&&goog.array.contains(e.className.split(/\s+/),t))},!0,n)},goog.dom.getAncestorByClass=function(e,o,t){return goog.dom.getAncestorByTagNameAndClass(e,null,o,t)},goog.dom.getAncestor=function(e,o,t,n){for(t||(e=e.parentNode),t=0;e&&(null==n||n>=t);){if(goog.asserts.assert("parentNode"!=e.name),o(e))return e;e=e.parentNode,t++}return null},goog.dom.getActiveElement=function(e){try{return e&&e.activeElement}catch(o){}return null},goog.dom.getPixelRatio=function(){var e=goog.dom.getWindow();return goog.isDef(e.devicePixelRatio)?e.devicePixelRatio:e.matchMedia?goog.dom.matchesPixelRatio_(3)||goog.dom.matchesPixelRatio_(2)||goog.dom.matchesPixelRatio_(1.5)||goog.dom.matchesPixelRatio_(1)||.75:1},goog.dom.matchesPixelRatio_=function(e){return goog.dom.getWindow().matchMedia("(min-resolution: "+e+"dppx),(min--moz-device-pixel-ratio: "+e+"),(min-resolution: "+96*e+"dpi)").matches?e:0},goog.dom.getCanvasContext2D=function(e){return e.getContext("2d")},goog.dom.DomHelper=function(e){this.document_=e||goog.global.document||document},goog.dom.DomHelper.prototype.getDomHelper=goog.dom.getDomHelper,goog.dom.DomHelper.prototype.setDocument=function(e){this.document_=e},goog.dom.DomHelper.prototype.getDocument=function(){return this.document_},goog.dom.DomHelper.prototype.getElement=function(e){return goog.dom.getElementHelper_(this.document_,e)},goog.dom.DomHelper.prototype.getRequiredElement=function(e){return goog.dom.getRequiredElementHelper_(this.document_,e)},goog.dom.DomHelper.prototype.$=goog.dom.DomHelper.prototype.getElement,goog.dom.DomHelper.prototype.getElementsByTagName=function(e,o){return(o||this.document_).getElementsByTagName(String(e))},goog.dom.DomHelper.prototype.getElementsByTagNameAndClass=function(e,o,t){return goog.dom.getElementsByTagNameAndClass_(this.document_,e,o,t)},goog.dom.DomHelper.prototype.getElementsByClass=function(e,o){return goog.dom.getElementsByClass(e,o||this.document_)},goog.dom.DomHelper.prototype.getElementByClass=function(e,o){return goog.dom.getElementByClass(e,o||this.document_)},goog.dom.DomHelper.prototype.getRequiredElementByClass=function(e,o){return goog.dom.getRequiredElementByClass(e,o||this.document_)},goog.dom.DomHelper.prototype.$$=goog.dom.DomHelper.prototype.getElementsByTagNameAndClass,goog.dom.DomHelper.prototype.setProperties=goog.dom.setProperties,goog.dom.DomHelper.prototype.getViewportSize=function(e){return goog.dom.getViewportSize(e||this.getWindow())},goog.dom.DomHelper.prototype.getDocumentHeight=function(){return goog.dom.getDocumentHeight_(this.getWindow())},goog.dom.DomHelper.prototype.createDom=function(e,o,t){return goog.dom.createDom_(this.document_,arguments)},goog.dom.DomHelper.prototype.$dom=goog.dom.DomHelper.prototype.createDom,goog.dom.DomHelper.prototype.createElement=function(e){return goog.dom.createElement_(this.document_,e)},goog.dom.DomHelper.prototype.createTextNode=function(e){return this.document_.createTextNode(String(e))},goog.dom.DomHelper.prototype.createTable=function(e,o,t){return goog.dom.createTable_(this.document_,e,o,!!t)},goog.dom.DomHelper.prototype.safeHtmlToNode=function(e){return goog.dom.safeHtmlToNode_(this.document_,e)},goog.dom.DomHelper.prototype.isCss1CompatMode=function(){return goog.dom.isCss1CompatMode_(this.document_)},goog.dom.DomHelper.prototype.getWindow=function(){return goog.dom.getWindow_(this.document_)},goog.dom.DomHelper.prototype.getDocumentScrollElement=function(){return goog.dom.getDocumentScrollElement_(this.document_)},goog.dom.DomHelper.prototype.getDocumentScroll=function(){return goog.dom.getDocumentScroll_(this.document_)},goog.dom.DomHelper.prototype.getActiveElement=function(e){return goog.dom.getActiveElement(e||this.document_)},goog.dom.DomHelper.prototype.appendChild=goog.dom.appendChild,goog.dom.DomHelper.prototype.append=goog.dom.append,goog.dom.DomHelper.prototype.canHaveChildren=goog.dom.canHaveChildren,goog.dom.DomHelper.prototype.removeChildren=goog.dom.removeChildren,goog.dom.DomHelper.prototype.insertSiblingBefore=goog.dom.insertSiblingBefore,goog.dom.DomHelper.prototype.insertSiblingAfter=goog.dom.insertSiblingAfter,goog.dom.DomHelper.prototype.insertChildAt=goog.dom.insertChildAt,goog.dom.DomHelper.prototype.removeNode=goog.dom.removeNode,goog.dom.DomHelper.prototype.replaceNode=goog.dom.replaceNode,goog.dom.DomHelper.prototype.flattenElement=goog.dom.flattenElement,goog.dom.DomHelper.prototype.getChildren=goog.dom.getChildren,goog.dom.DomHelper.prototype.getFirstElementChild=goog.dom.getFirstElementChild,goog.dom.DomHelper.prototype.getLastElementChild=goog.dom.getLastElementChild,goog.dom.DomHelper.prototype.getNextElementSibling=goog.dom.getNextElementSibling,goog.dom.DomHelper.prototype.getPreviousElementSibling=goog.dom.getPreviousElementSibling,goog.dom.DomHelper.prototype.getNextNode=goog.dom.getNextNode,goog.dom.DomHelper.prototype.getPreviousNode=goog.dom.getPreviousNode,goog.dom.DomHelper.prototype.isNodeLike=goog.dom.isNodeLike,goog.dom.DomHelper.prototype.isElement=goog.dom.isElement,goog.dom.DomHelper.prototype.isWindow=goog.dom.isWindow,goog.dom.DomHelper.prototype.getParentElement=goog.dom.getParentElement,goog.dom.DomHelper.prototype.contains=goog.dom.contains,goog.dom.DomHelper.prototype.compareNodeOrder=goog.dom.compareNodeOrder,goog.dom.DomHelper.prototype.findCommonAncestor=goog.dom.findCommonAncestor,goog.dom.DomHelper.prototype.getOwnerDocument=goog.dom.getOwnerDocument,goog.dom.DomHelper.prototype.getFrameContentDocument=goog.dom.getFrameContentDocument,goog.dom.DomHelper.prototype.getFrameContentWindow=goog.dom.getFrameContentWindow,goog.dom.DomHelper.prototype.setTextContent=goog.dom.setTextContent,goog.dom.DomHelper.prototype.getOuterHtml=goog.dom.getOuterHtml,goog.dom.DomHelper.prototype.findNode=goog.dom.findNode,goog.dom.DomHelper.prototype.findNodes=goog.dom.findNodes,
+goog.dom.DomHelper.prototype.isFocusableTabIndex=goog.dom.isFocusableTabIndex,goog.dom.DomHelper.prototype.setFocusableTabIndex=goog.dom.setFocusableTabIndex,goog.dom.DomHelper.prototype.isFocusable=goog.dom.isFocusable,goog.dom.DomHelper.prototype.getTextContent=goog.dom.getTextContent,goog.dom.DomHelper.prototype.getNodeTextLength=goog.dom.getNodeTextLength,goog.dom.DomHelper.prototype.getNodeTextOffset=goog.dom.getNodeTextOffset,goog.dom.DomHelper.prototype.getNodeAtOffset=goog.dom.getNodeAtOffset,goog.dom.DomHelper.prototype.isNodeList=goog.dom.isNodeList,goog.dom.DomHelper.prototype.getAncestorByTagNameAndClass=goog.dom.getAncestorByTagNameAndClass,goog.dom.DomHelper.prototype.getAncestorByClass=goog.dom.getAncestorByClass,goog.dom.DomHelper.prototype.getAncestor=goog.dom.getAncestor,goog.dom.DomHelper.prototype.getCanvasContext2D=goog.dom.getCanvasContext2D,goog.dom.vendor={},goog.dom.vendor.getVendorJsPrefix=function(){return goog.userAgent.WEBKIT?"Webkit":goog.userAgent.GECKO?"Moz":goog.userAgent.IE?"ms":goog.userAgent.OPERA?"O":null},goog.dom.vendor.getVendorPrefix=function(){return goog.userAgent.WEBKIT?"-webkit":goog.userAgent.GECKO?"-moz":goog.userAgent.IE?"-ms":goog.userAgent.OPERA?"-o":null},goog.dom.vendor.getPrefixedPropertyName=function(e,o){if(o&&e in o)return e;var t=goog.dom.vendor.getVendorJsPrefix();return t?(t=t.toLowerCase(),t+=goog.string.toTitleCase(e),!goog.isDef(o)||t in o?t:null):null},goog.dom.vendor.getPrefixedEventType=function(e){return((goog.dom.vendor.getVendorJsPrefix()||"")+e).toLowerCase()},goog.html.legacyconversions={},goog.html.legacyconversions.safeHtmlFromString=function(e){return goog.html.legacyconversions.reportCallback_(),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(e,null)},goog.html.legacyconversions.safeStyleFromString=function(e){return goog.html.legacyconversions.reportCallback_(),goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(e)},goog.html.legacyconversions.safeStyleSheetFromString=function(e){return goog.html.legacyconversions.reportCallback_(),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(e)},goog.html.legacyconversions.safeUrlFromString=function(e){return goog.html.legacyconversions.reportCallback_(),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.legacyconversions.trustedResourceUrlFromString=function(e){return goog.html.legacyconversions.reportCallback_(),goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.legacyconversions.reportCallback_=goog.nullFunction,goog.html.legacyconversions.setReportCallback=function(e){goog.html.legacyconversions.reportCallback_=e},goog.math.Box=function(e,o,t,n){this.top=e,this.right=o,this.bottom=t,this.left=n},goog.math.Box.boundingBox=function(e){for(var o=new goog.math.Box(arguments[0].y,arguments[0].x,arguments[0].y,arguments[0].x),t=1;t<arguments.length;t++)o.expandToIncludeCoordinate(arguments[t]);return o},goog.math.Box.prototype.getWidth=function(){return this.right-this.left},goog.math.Box.prototype.getHeight=function(){return this.bottom-this.top},goog.math.Box.prototype.clone=function(){return new goog.math.Box(this.top,this.right,this.bottom,this.left)},goog.DEBUG&&(goog.math.Box.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"}),goog.math.Box.prototype.contains=function(e){return goog.math.Box.contains(this,e)},goog.math.Box.prototype.expand=function(e,o,t,n){return goog.isObject(e)?(this.top-=e.top,this.right+=e.right,this.bottom+=e.bottom,this.left-=e.left):(this.top-=e,this.right+=Number(o),this.bottom+=Number(t),this.left-=Number(n)),this},goog.math.Box.prototype.expandToInclude=function(e){this.left=Math.min(this.left,e.left),this.top=Math.min(this.top,e.top),this.right=Math.max(this.right,e.right),this.bottom=Math.max(this.bottom,e.bottom)},goog.math.Box.prototype.expandToIncludeCoordinate=function(e){this.top=Math.min(this.top,e.y),this.right=Math.max(this.right,e.x),this.bottom=Math.max(this.bottom,e.y),this.left=Math.min(this.left,e.x)},goog.math.Box.equals=function(e,o){return e==o?!0:e&&o?e.top==o.top&&e.right==o.right&&e.bottom==o.bottom&&e.left==o.left:!1},goog.math.Box.contains=function(e,o){return e&&o?o instanceof goog.math.Box?o.left>=e.left&&o.right<=e.right&&o.top>=e.top&&o.bottom<=e.bottom:o.x>=e.left&&o.x<=e.right&&o.y>=e.top&&o.y<=e.bottom:!1},goog.math.Box.relativePositionX=function(e,o){return o.x<e.left?o.x-e.left:o.x>e.right?o.x-e.right:0},goog.math.Box.relativePositionY=function(e,o){return o.y<e.top?o.y-e.top:o.y>e.bottom?o.y-e.bottom:0},goog.math.Box.distance=function(e,o){var t=goog.math.Box.relativePositionX(e,o),n=goog.math.Box.relativePositionY(e,o);return Math.sqrt(t*t+n*n)},goog.math.Box.intersects=function(e,o){return e.left<=o.right&&o.left<=e.right&&e.top<=o.bottom&&o.top<=e.bottom},goog.math.Box.intersectsWithPadding=function(e,o,t){return e.left<=o.right+t&&o.left<=e.right+t&&e.top<=o.bottom+t&&o.top<=e.bottom+t},goog.math.Box.prototype.ceil=function(){return this.top=Math.ceil(this.top),this.right=Math.ceil(this.right),this.bottom=Math.ceil(this.bottom),this.left=Math.ceil(this.left),this},goog.math.Box.prototype.floor=function(){return this.top=Math.floor(this.top),this.right=Math.floor(this.right),this.bottom=Math.floor(this.bottom),this.left=Math.floor(this.left),this},goog.math.Box.prototype.round=function(){return this.top=Math.round(this.top),this.right=Math.round(this.right),this.bottom=Math.round(this.bottom),this.left=Math.round(this.left),this},goog.math.Box.prototype.translate=function(e,o){return e instanceof goog.math.Coordinate?(this.left+=e.x,this.right+=e.x,this.top+=e.y,this.bottom+=e.y):(goog.asserts.assertNumber(e),this.left+=e,this.right+=e,goog.isNumber(o)&&(this.top+=o,this.bottom+=o)),this},goog.math.Box.prototype.scale=function(e,o){var t=goog.isNumber(o)?o:e;return this.left*=e,this.right*=e,this.top*=t,this.bottom*=t,this},goog.math.IRect=function(){},goog.math.Rect=function(e,o,t,n){this.left=e,this.top=o,this.width=t,this.height=n},goog.math.Rect.prototype.clone=function(){return new goog.math.Rect(this.left,this.top,this.width,this.height)},goog.math.Rect.prototype.toBox=function(){return new goog.math.Box(this.top,this.left+this.width,this.top+this.height,this.left)},goog.math.Rect.createFromPositionAndSize=function(e,o){return new goog.math.Rect(e.x,e.y,o.width,o.height)},goog.math.Rect.createFromBox=function(e){return new goog.math.Rect(e.left,e.top,e.right-e.left,e.bottom-e.top)},goog.DEBUG&&(goog.math.Rect.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"}),goog.math.Rect.equals=function(e,o){return e==o?!0:e&&o?e.left==o.left&&e.width==o.width&&e.top==o.top&&e.height==o.height:!1},goog.math.Rect.prototype.intersection=function(e){var o=Math.max(this.left,e.left),t=Math.min(this.left+this.width,e.left+e.width);if(t>=o){var n=Math.max(this.top,e.top);if(e=Math.min(this.top+this.height,e.top+e.height),e>=n)return this.left=o,this.top=n,this.width=t-o,this.height=e-n,!0}return!1},goog.math.Rect.intersection=function(e,o){var t=Math.max(e.left,o.left),n=Math.min(e.left+e.width,o.left+o.width);if(n>=t){var r=Math.max(e.top,o.top),i=Math.min(e.top+e.height,o.top+o.height);if(i>=r)return new goog.math.Rect(t,r,n-t,i-r)}return null},goog.math.Rect.intersects=function(e,o){return e.left<=o.left+o.width&&o.left<=e.left+e.width&&e.top<=o.top+o.height&&o.top<=e.top+e.height},goog.math.Rect.prototype.intersects=function(e){return goog.math.Rect.intersects(this,e)},goog.math.Rect.difference=function(e,o){var t=goog.math.Rect.intersection(e,o);if(!t||!t.height||!t.width)return[e.clone()];var t=[],n=e.top,r=e.height,i=e.left+e.width,s=e.top+e.height,l=o.left+o.width,g=o.top+o.height;return o.top>e.top&&(t.push(new goog.math.Rect(e.left,e.top,e.width,o.top-e.top)),n=o.top,r-=o.top-e.top),s>g&&(t.push(new goog.math.Rect(e.left,g,e.width,s-g)),r=g-n),o.left>e.left&&t.push(new goog.math.Rect(e.left,n,o.left-e.left,r)),i>l&&t.push(new goog.math.Rect(l,n,i-l,r)),t},goog.math.Rect.prototype.difference=function(e){return goog.math.Rect.difference(this,e)},goog.math.Rect.prototype.boundingRect=function(e){var o=Math.max(this.left+this.width,e.left+e.width),t=Math.max(this.top+this.height,e.top+e.height);this.left=Math.min(this.left,e.left),this.top=Math.min(this.top,e.top),this.width=o-this.left,this.height=t-this.top},goog.math.Rect.boundingRect=function(e,o){if(!e||!o)return null;var t=new goog.math.Rect(e.left,e.top,e.width,e.height);return t.boundingRect(o),t},goog.math.Rect.prototype.contains=function(e){return e instanceof goog.math.Coordinate?e.x>=this.left&&e.x<=this.left+this.width&&e.y>=this.top&&e.y<=this.top+this.height:this.left<=e.left&&this.left+this.width>=e.left+e.width&&this.top<=e.top&&this.top+this.height>=e.top+e.height},goog.math.Rect.prototype.squaredDistance=function(e){var o=e.x<this.left?this.left-e.x:Math.max(e.x-(this.left+this.width),0);return e=e.y<this.top?this.top-e.y:Math.max(e.y-(this.top+this.height),0),o*o+e*e},goog.math.Rect.prototype.distance=function(e){return Math.sqrt(this.squaredDistance(e))},goog.math.Rect.prototype.getSize=function(){return new goog.math.Size(this.width,this.height)},goog.math.Rect.prototype.getTopLeft=function(){return new goog.math.Coordinate(this.left,this.top)},goog.math.Rect.prototype.getCenter=function(){return new goog.math.Coordinate(this.left+this.width/2,this.top+this.height/2)},goog.math.Rect.prototype.getBottomRight=function(){return new goog.math.Coordinate(this.left+this.width,this.top+this.height)},goog.math.Rect.prototype.ceil=function(){return this.left=Math.ceil(this.left),this.top=Math.ceil(this.top),this.width=Math.ceil(this.width),this.height=Math.ceil(this.height),this},goog.math.Rect.prototype.floor=function(){return this.left=Math.floor(this.left),this.top=Math.floor(this.top),this.width=Math.floor(this.width),this.height=Math.floor(this.height),this},goog.math.Rect.prototype.round=function(){return this.left=Math.round(this.left),this.top=Math.round(this.top),this.width=Math.round(this.width),this.height=Math.round(this.height),this},goog.math.Rect.prototype.translate=function(e,o){return e instanceof goog.math.Coordinate?(this.left+=e.x,this.top+=e.y):(this.left+=goog.asserts.assertNumber(e),goog.isNumber(o)&&(this.top+=o)),this},goog.math.Rect.prototype.scale=function(e,o){var t=goog.isNumber(o)?o:e;return this.left*=e,this.width*=e,this.top*=t,this.height*=t,this},goog.style={},goog.style.setStyle=function(e,o,t){if(goog.isString(o))goog.style.setStyle_(e,t,o);else for(var n in o)goog.style.setStyle_(e,o[n],n)},goog.style.setStyle_=function(e,o,t){(t=goog.style.getVendorJsStyleName_(e,t))&&(e.style[t]=o)},goog.style.styleNameCache_={},goog.style.getVendorJsStyleName_=function(e,o){var t=goog.style.styleNameCache_[o];if(!t){var n=goog.string.toCamelCase(o),t=n;void 0===e.style[n]&&(n=goog.dom.vendor.getVendorJsPrefix()+goog.string.toTitleCase(n),void 0!==e.style[n]&&(t=n)),goog.style.styleNameCache_[o]=t}return t},goog.style.getVendorStyleName_=function(e,o){var t=goog.string.toCamelCase(o);return void 0===e.style[t]&&(t=goog.dom.vendor.getVendorJsPrefix()+goog.string.toTitleCase(t),void 0!==e.style[t])?goog.dom.vendor.getVendorPrefix()+"-"+o:o},goog.style.getStyle=function(e,o){var t=e.style[goog.string.toCamelCase(o)];return"undefined"!=typeof t?t:e.style[goog.style.getVendorJsStyleName_(e,o)]||""},goog.style.getComputedStyle=function(e,o){var t=goog.dom.getOwnerDocument(e);return t.defaultView&&t.defaultView.getComputedStyle&&(t=t.defaultView.getComputedStyle(e,null))?t[o]||t.getPropertyValue(o)||"":""},goog.style.getCascadedStyle=function(e,o){return e.currentStyle?e.currentStyle[o]:null},goog.style.getStyle_=function(e,o){return goog.style.getComputedStyle(e,o)||goog.style.getCascadedStyle(e,o)||e.style&&e.style[o]},goog.style.getComputedBoxSizing=function(e){return goog.style.getStyle_(e,"boxSizing")||goog.style.getStyle_(e,"MozBoxSizing")||goog.style.getStyle_(e,"WebkitBoxSizing")||null},goog.style.getComputedPosition=function(e){return goog.style.getStyle_(e,"position")},goog.style.getBackgroundColor=function(e){return goog.style.getStyle_(e,"backgroundColor")},goog.style.getComputedOverflowX=function(e){return goog.style.getStyle_(e,"overflowX")},goog.style.getComputedOverflowY=function(e){return goog.style.getStyle_(e,"overflowY")},goog.style.getComputedZIndex=function(e){return goog.style.getStyle_(e,"zIndex")},goog.style.getComputedTextAlign=function(e){return goog.style.getStyle_(e,"textAlign")},goog.style.getComputedCursor=function(e){return goog.style.getStyle_(e,"cursor")},goog.style.getComputedTransform=function(e){var o=goog.style.getVendorStyleName_(e,"transform");return goog.style.getStyle_(e,o)||goog.style.getStyle_(e,"transform")},goog.style.setPosition=function(e,o,t){var n;o instanceof goog.math.Coordinate?(n=o.x,o=o.y):(n=o,o=t),e.style.left=goog.style.getPixelStyleValue_(n,!1),e.style.top=goog.style.getPixelStyleValue_(o,!1)},goog.style.getPosition=function(e){return new goog.math.Coordinate(e.offsetLeft,e.offsetTop)},goog.style.getClientViewportElement=function(e){return e=e?goog.dom.getOwnerDocument(e):goog.dom.getDocument(),!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9)||goog.dom.getDomHelper(e).isCss1CompatMode()?e.documentElement:e.body},goog.style.getViewportPageOffset=function(e){var o=e.body;return e=e.documentElement,new goog.math.Coordinate(o.scrollLeft||e.scrollLeft,o.scrollTop||e.scrollTop)},goog.style.getBoundingClientRect_=function(e){var o;try{o=e.getBoundingClientRect()}catch(t){return{left:0,top:0,right:0,bottom:0}}return goog.userAgent.IE&&e.ownerDocument.body&&(e=e.ownerDocument,o.left-=e.documentElement.clientLeft+e.body.clientLeft,o.top-=e.documentElement.clientTop+e.body.clientTop),o},goog.style.getOffsetParent=function(e){if(goog.userAgent.IE&&!goog.userAgent.isDocumentModeOrHigher(8))return goog.asserts.assert(e&&"offsetParent"in e),e.offsetParent;var o=goog.dom.getOwnerDocument(e),t=goog.style.getStyle_(e,"position"),n="fixed"==t||"absolute"==t;for(e=e.parentNode;e&&e!=o;e=e.parentNode)if(e.nodeType==goog.dom.NodeType.DOCUMENT_FRAGMENT&&e.host&&(e=e.host),t=goog.style.getStyle_(e,"position"),n=n&&"static"==t&&e!=o.documentElement&&e!=o.body,!n&&(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight||"fixed"==t||"absolute"==t||"relative"==t))return e;return null},goog.style.getVisibleRectForElement=function(e){for(var o=new goog.math.Box(0,1/0,1/0,0),t=goog.dom.getDomHelper(e),n=t.getDocument().body,r=t.getDocument().documentElement,i=t.getDocumentScrollElement();e=goog.style.getOffsetParent(e);)if(!(goog.userAgent.IE&&0==e.clientWidth||goog.userAgent.WEBKIT&&0==e.clientHeight&&e==n)&&e!=n&&e!=r&&"visible"!=goog.style.getStyle_(e,"overflow")){var s=goog.style.getPageOffset(e),l=goog.style.getClientLeftTop(e);s.x+=l.x,s.y+=l.y,o.top=Math.max(o.top,s.y),o.right=Math.min(o.right,s.x+e.clientWidth),o.bottom=Math.min(o.bottom,s.y+e.clientHeight),o.left=Math.max(o.left,s.x)}return n=i.scrollLeft,i=i.scrollTop,o.left=Math.max(o.left,n),o.top=Math.max(o.top,i),t=t.getViewportSize(),o.right=Math.min(o.right,n+t.width),o.bottom=Math.min(o.bottom,i+t.height),0<=o.top&&0<=o.left&&o.bottom>o.top&&o.right>o.left?o:null},goog.style.getContainerOffsetToScrollInto=function(e,o,t){var n=o||goog.dom.getDocumentScrollElement(),r=goog.style.getPageOffset(e),i=goog.style.getPageOffset(n),s=goog.style.getBorderBox(n);return n==goog.dom.getDocumentScrollElement()?(o=r.x-n.scrollLeft,r=r.y-n.scrollTop,goog.userAgent.IE&&!goog.userAgent.isDocumentModeOrHigher(10)&&(o+=s.left,r+=s.top)):(o=r.x-i.x-s.left,r=r.y-i.y-s.top),s=goog.style.getSizeWithDisplay_(e),e=n.clientWidth-s.width,s=n.clientHeight-s.height,i=n.scrollLeft,n=n.scrollTop,t?(i+=o-e/2,n+=r-s/2):(i+=Math.min(o,Math.max(o-e,0)),n+=Math.min(r,Math.max(r-s,0))),new goog.math.Coordinate(i,n)},goog.style.scrollIntoContainerView=function(e,o,t){o=o||goog.dom.getDocumentScrollElement(),e=goog.style.getContainerOffsetToScrollInto(e,o,t),o.scrollLeft=e.x,o.scrollTop=e.y},goog.style.getClientLeftTop=function(e){return new goog.math.Coordinate(e.clientLeft,e.clientTop)},goog.style.getPageOffset=function(e){var o=goog.dom.getOwnerDocument(e);goog.asserts.assertObject(e,"Parameter is required");var t=new goog.math.Coordinate(0,0),n=goog.style.getClientViewportElement(o);return e==n?t:(e=goog.style.getBoundingClientRect_(e),o=goog.dom.getDomHelper(o).getDocumentScroll(),t.x=e.left+o.x,t.y=e.top+o.y,t)},goog.style.getPageOffsetLeft=function(e){return goog.style.getPageOffset(e).x},goog.style.getPageOffsetTop=function(e){return goog.style.getPageOffset(e).y},goog.style.getFramedPageOffset=function(e,o){var t=new goog.math.Coordinate(0,0),n=goog.dom.getWindow(goog.dom.getOwnerDocument(e));if(!goog.reflect.canAccessProperty(n,"parent"))return t;var r=e;do{var i=n==o?goog.style.getPageOffset(r):goog.style.getClientPositionForElement_(goog.asserts.assert(r));t.x+=i.x,t.y+=i.y}while(n&&n!=o&&n!=n.parent&&(r=n.frameElement)&&(n=n.parent));return t},goog.style.translateRectForAnotherFrame=function(e,o,t){if(o.getDocument()!=t.getDocument()){var n=o.getDocument().body;t=goog.style.getFramedPageOffset(n,t.getWindow()),t=goog.math.Coordinate.difference(t,goog.style.getPageOffset(n)),!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9)||o.isCss1CompatMode()||(t=goog.math.Coordinate.difference(t,o.getDocumentScroll())),e.left+=t.x,e.top+=t.y}},goog.style.getRelativePosition=function(e,o){var t=goog.style.getClientPosition(e),n=goog.style.getClientPosition(o);return new goog.math.Coordinate(t.x-n.x,t.y-n.y)},goog.style.getClientPositionForElement_=function(e){return e=goog.style.getBoundingClientRect_(e),new goog.math.Coordinate(e.left,e.top)},goog.style.getClientPosition=function(e){return goog.asserts.assert(e),e.nodeType==goog.dom.NodeType.ELEMENT?goog.style.getClientPositionForElement_(e):(e=e.changedTouches?e.changedTouches[0]:e,new goog.math.Coordinate(e.clientX,e.clientY))},goog.style.setPageOffset=function(e,o,t){var n=goog.style.getPageOffset(e);o instanceof goog.math.Coordinate&&(t=o.y,o=o.x),o=goog.asserts.assertNumber(o)-n.x,goog.style.setPosition(e,e.offsetLeft+o,e.offsetTop+(Number(t)-n.y))},goog.style.setSize=function(e,o,t){if(o instanceof goog.math.Size)t=o.height,o=o.width;else if(void 0==t)throw Error("missing height argument");goog.style.setWidth(e,o),goog.style.setHeight(e,t)},goog.style.getPixelStyleValue_=function(e,o){return"number"==typeof e&&(e=(o?Math.round(e):e)+"px"),e},goog.style.setHeight=function(e,o){e.style.height=goog.style.getPixelStyleValue_(o,!0)},goog.style.setWidth=function(e,o){e.style.width=goog.style.getPixelStyleValue_(o,!0)},goog.style.getSize=function(e){return goog.style.evaluateWithTemporaryDisplay_(goog.style.getSizeWithDisplay_,e)},goog.style.evaluateWithTemporaryDisplay_=function(e,o){if("none"!=goog.style.getStyle_(o,"display"))return e(o);var t=o.style,n=t.display,r=t.visibility,i=t.position;t.visibility="hidden",t.position="absolute",t.display="inline";var s=e(o);return t.display=n,t.position=i,t.visibility=r,s},goog.style.getSizeWithDisplay_=function(e){var o=e.offsetWidth,t=e.offsetHeight,n=goog.userAgent.WEBKIT&&!o&&!t;return goog.isDef(o)&&!n||!e.getBoundingClientRect?new goog.math.Size(o,t):(e=goog.style.getBoundingClientRect_(e),new goog.math.Size(e.right-e.left,e.bottom-e.top))},goog.style.getTransformedSize=function(e){return e.getBoundingClientRect?(e=goog.style.evaluateWithTemporaryDisplay_(goog.style.getBoundingClientRect_,e),new goog.math.Size(e.right-e.left,e.bottom-e.top)):null},goog.style.getBounds=function(e){var o=goog.style.getPageOffset(e);return e=goog.style.getSize(e),new goog.math.Rect(o.x,o.y,e.width,e.height)},goog.style.toCamelCase=function(e){return goog.string.toCamelCase(String(e))},goog.style.toSelectorCase=function(e){return goog.string.toSelectorCase(e)},goog.style.getOpacity=function(e){goog.asserts.assert(e);var o=e.style;return e="","opacity"in o?e=o.opacity:"MozOpacity"in o?e=o.MozOpacity:"filter"in o&&(o=o.filter.match(/alpha\(opacity=([\d.]+)\)/))&&(e=String(o[1]/100)),""==e?e:Number(e)},goog.style.setOpacity=function(e,o){goog.asserts.assert(e);var t=e.style;"opacity"in t?t.opacity=o:"MozOpacity"in t?t.MozOpacity=o:"filter"in t&&(t.filter=""===o?"":"alpha(opacity="+100*Number(o)+")")},goog.style.setTransparentBackgroundImage=function(e,o){var t=e.style;goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("8")?t.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+o+'", sizingMethod="crop")':(t.backgroundImage="url("+o+")",t.backgroundPosition="top left",t.backgroundRepeat="no-repeat")},goog.style.clearTransparentBackgroundImage=function(e){e=e.style,"filter"in e?e.filter="":e.backgroundImage="none"},goog.style.showElement=function(e,o){goog.style.setElementShown(e,o)},goog.style.setElementShown=function(e,o){e.style.display=o?"":"none"},goog.style.isElementShown=function(e){return"none"!=e.style.display},goog.style.installStyles=function(e,o){return goog.style.installSafeStyleSheet(goog.html.legacyconversions.safeStyleSheetFromString(e),o)},goog.style.installSafeStyleSheet=function(e,o){var t,n=goog.dom.getDomHelper(o),r=n.getDocument();return goog.userAgent.IE&&r.createStyleSheet?(t=r.createStyleSheet(),goog.style.setSafeStyleSheet(t,e)):(r=n.getElementsByTagNameAndClass("HEAD")[0],r||(t=n.getElementsByTagNameAndClass("BODY")[0],r=n.createDom("HEAD"),t.parentNode.insertBefore(r,t)),t=n.createDom("STYLE"),goog.style.setSafeStyleSheet(t,e),n.appendChild(r,t)),t},goog.style.uninstallStyles=function(e){goog.dom.removeNode(e.ownerNode||e.owningElement||e)},goog.style.setStyles=function(e,o){goog.style.setSafeStyleSheet(e,goog.html.legacyconversions.safeStyleSheetFromString(o))},goog.style.setSafeStyleSheet=function(e,o){var t=goog.html.SafeStyleSheet.unwrap(o);goog.userAgent.IE&&goog.isDef(e.cssText)?e.cssText=t:e.innerHTML=t},goog.style.setPreWrap=function(e){e=e.style,goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("8")?(e.whiteSpace="pre",e.wordWrap="break-word"):e.whiteSpace=goog.userAgent.GECKO?"-moz-pre-wrap":"pre-wrap"},goog.style.setInlineBlock=function(e){e=e.style,e.position="relative",goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("8")?(e.zoom="1",e.display="inline"):e.display="inline-block"},goog.style.isRightToLeft=function(e){return"rtl"==goog.style.getStyle_(e,"direction")},goog.style.unselectableStyle_=goog.userAgent.GECKO?"MozUserSelect":goog.userAgent.WEBKIT||goog.userAgent.EDGE?"WebkitUserSelect":null,goog.style.isUnselectable=function(e){return goog.style.unselectableStyle_?"none"==e.style[goog.style.unselectableStyle_].toLowerCase():goog.userAgent.IE||goog.userAgent.OPERA?"on"==e.getAttribute("unselectable"):!1},goog.style.setUnselectable=function(e,o,t){t=t?null:e.getElementsByTagName("*");var n=goog.style.unselectableStyle_;if(n){if(o=o?"none":"",e.style&&(e.style[n]=o),t){e=0;for(var r;r=t[e];e++)r.style&&(r.style[n]=o)}}else if((goog.userAgent.IE||goog.userAgent.OPERA)&&(o=o?"on":"",e.setAttribute("unselectable",o),t))for(e=0;r=t[e];e++)r.setAttribute("unselectable",o)},goog.style.getBorderBoxSize=function(e){return new goog.math.Size(e.offsetWidth,e.offsetHeight)},goog.style.setBorderBoxSize=function(e,o){var t=goog.dom.getOwnerDocument(e),n=goog.dom.getDomHelper(t).isCss1CompatMode();if(!goog.userAgent.IE||goog.userAgent.isVersionOrHigher("10")||n&&goog.userAgent.isVersionOrHigher("8"))goog.style.setBoxSizingSize_(e,o,"border-box");else if(t=e.style,n){var n=goog.style.getPaddingBox(e),r=goog.style.getBorderBox(e);t.pixelWidth=o.width-r.left-n.left-n.right-r.right,t.pixelHeight=o.height-r.top-n.top-n.bottom-r.bottom}else t.pixelWidth=o.width,t.pixelHeight=o.height},goog.style.getContentBoxSize=function(e){var o=goog.dom.getOwnerDocument(e),t=goog.userAgent.IE&&e.currentStyle;return t&&goog.dom.getDomHelper(o).isCss1CompatMode()&&"auto"!=t.width&&"auto"!=t.height&&!t.boxSizing?(o=goog.style.getIePixelValue_(e,t.width,"width","pixelWidth"),e=goog.style.getIePixelValue_(e,t.height,"height","pixelHeight"),new goog.math.Size(o,e)):(t=goog.style.getBorderBoxSize(e),o=goog.style.getPaddingBox(e),e=goog.style.getBorderBox(e),new goog.math.Size(t.width-e.left-o.left-o.right-e.right,t.height-e.top-o.top-o.bottom-e.bottom))},goog.style.setContentBoxSize=function(e,o){var t=goog.dom.getOwnerDocument(e),n=goog.dom.getDomHelper(t).isCss1CompatMode();if(!goog.userAgent.IE||goog.userAgent.isVersionOrHigher("10")||n&&goog.userAgent.isVersionOrHigher("8"))goog.style.setBoxSizingSize_(e,o,"content-box");else if(t=e.style,n)t.pixelWidth=o.width,t.pixelHeight=o.height;else{var n=goog.style.getPaddingBox(e),r=goog.style.getBorderBox(e);t.pixelWidth=o.width+r.left+n.left+n.right+r.right,t.pixelHeight=o.height+r.top+n.top+n.bottom+r.bottom}},goog.style.setBoxSizingSize_=function(e,o,t){e=e.style,goog.userAgent.GECKO?e.MozBoxSizing=t:goog.userAgent.WEBKIT?e.WebkitBoxSizing=t:e.boxSizing=t,e.width=Math.max(o.width,0)+"px",e.height=Math.max(o.height,0)+"px"},goog.style.getIePixelValue_=function(e,o,t,n){if(/^\d+px?$/.test(o))return parseInt(o,10);var r=e.style[t],i=e.runtimeStyle[t];return e.runtimeStyle[t]=e.currentStyle[t],e.style[t]=o,o=e.style[n],e.style[t]=r,e.runtimeStyle[t]=i,o},goog.style.getIePixelDistance_=function(e,o){var t=goog.style.getCascadedStyle(e,o);return t?goog.style.getIePixelValue_(e,t,"left","pixelLeft"):0},goog.style.getBox_=function(e,o){if(goog.userAgent.IE){var t=goog.style.getIePixelDistance_(e,o+"Left"),n=goog.style.getIePixelDistance_(e,o+"Right"),r=goog.style.getIePixelDistance_(e,o+"Top"),i=goog.style.getIePixelDistance_(e,o+"Bottom");return new goog.math.Box(r,n,i,t)}return t=goog.style.getComputedStyle(e,o+"Left"),n=goog.style.getComputedStyle(e,o+"Right"),r=goog.style.getComputedStyle(e,o+"Top"),i=goog.style.getComputedStyle(e,o+"Bottom"),new goog.math.Box(parseFloat(r),parseFloat(n),parseFloat(i),parseFloat(t))},goog.style.getPaddingBox=function(e){return goog.style.getBox_(e,"padding")},goog.style.getMarginBox=function(e){return goog.style.getBox_(e,"margin")},goog.style.ieBorderWidthKeywords_={thin:2,medium:4,thick:6},goog.style.getIePixelBorder_=function(e,o){if("none"==goog.style.getCascadedStyle(e,o+"Style"))return 0;var t=goog.style.getCascadedStyle(e,o+"Width");return t in goog.style.ieBorderWidthKeywords_?goog.style.ieBorderWidthKeywords_[t]:goog.style.getIePixelValue_(e,t,"left","pixelLeft")},goog.style.getBorderBox=function(e){if(goog.userAgent.IE&&!goog.userAgent.isDocumentModeOrHigher(9)){var o=goog.style.getIePixelBorder_(e,"borderLeft"),t=goog.style.getIePixelBorder_(e,"borderRight"),n=goog.style.getIePixelBorder_(e,"borderTop");return e=goog.style.getIePixelBorder_(e,"borderBottom"),new goog.math.Box(n,t,e,o)}return o=goog.style.getComputedStyle(e,"borderLeftWidth"),t=goog.style.getComputedStyle(e,"borderRightWidth"),n=goog.style.getComputedStyle(e,"borderTopWidth"),e=goog.style.getComputedStyle(e,"borderBottomWidth"),new goog.math.Box(parseFloat(n),parseFloat(t),parseFloat(e),parseFloat(o))},goog.style.getFontFamily=function(e){var o=goog.dom.getOwnerDocument(e),t="";if(o.body.createTextRange&&goog.dom.contains(o,e)){o=o.body.createTextRange(),o.moveToElementText(e);try{t=o.queryCommandValue("FontName")}catch(n){t=""}}return t||(t=goog.style.getStyle_(e,"fontFamily")),e=t.split(","),1<e.length&&(t=e[0]),goog.string.stripQuotes(t,"\"'")},goog.style.lengthUnitRegex_=/[^\d]+$/,goog.style.getLengthUnits=function(e){return(e=e.match(goog.style.lengthUnitRegex_))&&e[0]||null},goog.style.ABSOLUTE_CSS_LENGTH_UNITS_={cm:1,"in":1,mm:1,pc:1,pt:1},goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_={em:1,ex:1},goog.style.getFontSize=function(e){var o=goog.style.getStyle_(e,"fontSize"),t=goog.style.getLengthUnits(o);if(o&&"px"==t)return parseInt(o,10);if(goog.userAgent.IE){if(String(t)in goog.style.ABSOLUTE_CSS_LENGTH_UNITS_)return goog.style.getIePixelValue_(e,o,"left","pixelLeft");if(e.parentNode&&e.parentNode.nodeType==goog.dom.NodeType.ELEMENT&&String(t)in goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_)return e=e.parentNode,t=goog.style.getStyle_(e,"fontSize"),goog.style.getIePixelValue_(e,o==t?"1em":o,"left","pixelLeft")}return t=goog.dom.createDom("SPAN",{style:"visibility:hidden;position:absolute;line-height:0;padding:0;margin:0;border:0;height:1em;"}),goog.dom.appendChild(e,t),o=t.offsetHeight,goog.dom.removeNode(t),o},goog.style.parseStyleAttribute=function(e){var o={};return goog.array.forEach(e.split(/\s*;\s*/),function(e){var t=e.match(/\s*([\w-]+)\s*\:(.+)/);t&&(e=t[1],t=goog.string.trim(t[2]),o[goog.string.toCamelCase(e.toLowerCase())]=t)}),o},goog.style.toStyleAttribute=function(e){var o=[];return goog.object.forEach(e,function(e,t){o.push(goog.string.toSelectorCase(t),":",e,";")}),o.join("")},goog.style.setFloat=function(e,o){e.style[goog.userAgent.IE?"styleFloat":"cssFloat"]=o},goog.style.getFloat=function(e){return e.style[goog.userAgent.IE?"styleFloat":"cssFloat"]||""},goog.style.getScrollbarWidth=function(e){var o=goog.dom.createElement("DIV");return e&&(o.className=e),o.style.cssText="overflow:auto;position:absolute;top:0;width:100px;height:100px",e=goog.dom.createElement("DIV"),goog.style.setSize(e,"200px","200px"),o.appendChild(e),goog.dom.appendChild(goog.dom.getDocument().body,o),e=o.offsetWidth-o.clientWidth,goog.dom.removeNode(o),e},goog.style.MATRIX_TRANSLATION_REGEX_=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/,goog.style.getCssTranslation=function(e){return e=goog.style.getComputedTransform(e),e&&(e=e.match(goog.style.MATRIX_TRANSLATION_REGEX_))?new goog.math.Coordinate(parseFloat(e[1]),parseFloat(e[2])):new goog.math.Coordinate(0,0)},goog.Thenable=function(){},goog.Thenable.prototype.then=function(e,o,t){},goog.Thenable.IMPLEMENTED_BY_PROP="$goog_Thenable",goog.Thenable.addImplementation=function(e){e.prototype.then=e.prototype.then,COMPILED?e.prototype[goog.Thenable.IMPLEMENTED_BY_PROP]=!0:e.prototype.$goog_Thenable=!0},goog.Thenable.isImplementedBy=function(e){if(!e)return!1;try{return COMPILED?!!e[goog.Thenable.IMPLEMENTED_BY_PROP]:!!e.$goog_Thenable}catch(o){return!1}},goog.async={},goog.async.FreeList=function(e,o,t){this.limit_=t,this.create_=e,this.reset_=o,this.occupants_=0,this.head_=null},goog.async.FreeList.prototype.get=function(){var e;return 0<this.occupants_?(this.occupants_--,e=this.head_,this.head_=e.next,e.next=null):e=this.create_(),e},goog.async.FreeList.prototype.put=function(e){this.reset_(e),this.occupants_<this.limit_&&(this.occupants_++,e.next=this.head_,this.head_=e)},goog.async.FreeList.prototype.occupants=function(){return this.occupants_},goog.async.WorkQueue=function(){this.workTail_=this.workHead_=null},goog.async.WorkQueue.DEFAULT_MAX_UNUSED=100,goog.async.WorkQueue.freelist_=new goog.async.FreeList(function(){return new goog.async.WorkItem},function(e){e.reset()},goog.async.WorkQueue.DEFAULT_MAX_UNUSED),goog.async.WorkQueue.prototype.add=function(e,o){var t=this.getUnusedItem_();t.set(e,o),this.workTail_?this.workTail_.next=t:(goog.asserts.assert(!this.workHead_),this.workHead_=t),this.workTail_=t},goog.async.WorkQueue.prototype.remove=function(){var e=null;return this.workHead_&&(e=this.workHead_,this.workHead_=this.workHead_.next,this.workHead_||(this.workTail_=null),e.next=null),e},goog.async.WorkQueue.prototype.returnUnused=function(e){goog.async.WorkQueue.freelist_.put(e)},goog.async.WorkQueue.prototype.getUnusedItem_=function(){return goog.async.WorkQueue.freelist_.get()},goog.async.WorkItem=function(){this.next=this.scope=this.fn=null},goog.async.WorkItem.prototype.set=function(e,o){this.fn=e,this.scope=o,this.next=null},goog.async.WorkItem.prototype.reset=function(){this.next=this.scope=this.fn=null},goog.functions={},goog.functions.constant=function(e){return function(){return e}},goog.functions.FALSE=goog.functions.constant(!1),goog.functions.TRUE=goog.functions.constant(!0),
+goog.functions.NULL=goog.functions.constant(null),goog.functions.identity=function(e,o){return e},goog.functions.error=function(e){return function(){throw Error(e)}},goog.functions.fail=function(e){return function(){throw e}},goog.functions.lock=function(e,o){return o=o||0,function(){return e.apply(this,Array.prototype.slice.call(arguments,0,o))}},goog.functions.nth=function(e){return function(){return arguments[e]}},goog.functions.partialRight=function(e,o){var t=Array.prototype.slice.call(arguments,1);return function(){var o=Array.prototype.slice.call(arguments);return o.push.apply(o,t),e.apply(this,o)}},goog.functions.withReturnValue=function(e,o){return goog.functions.sequence(e,goog.functions.constant(o))},goog.functions.equalTo=function(e,o){return function(t){return o?e==t:e===t}},goog.functions.compose=function(e,o){var t=arguments,n=t.length;return function(){var e;n&&(e=t[n-1].apply(this,arguments));for(var o=n-2;o>=0;o--)e=t[o].call(this,e);return e}},goog.functions.sequence=function(e){var o=arguments,t=o.length;return function(){for(var e,n=0;t>n;n++)e=o[n].apply(this,arguments);return e}},goog.functions.and=function(e){var o=arguments,t=o.length;return function(){for(var e=0;t>e;e++)if(!o[e].apply(this,arguments))return!1;return!0}},goog.functions.or=function(e){var o=arguments,t=o.length;return function(){for(var e=0;t>e;e++)if(o[e].apply(this,arguments))return!0;return!1}},goog.functions.not=function(e){return function(){return!e.apply(this,arguments)}},goog.functions.create=function(e,o){var t=function(){};return t.prototype=e.prototype,t=new t,e.apply(t,Array.prototype.slice.call(arguments,1)),t},goog.functions.CACHE_RETURN_VALUE=!0,goog.functions.cacheReturnValue=function(e){var o,t=!1;return function(){return goog.functions.CACHE_RETURN_VALUE?(t||(o=e(),t=!0),o):e()}},goog.functions.once=function(e){var o=e;return function(){if(o){var e=o;o=null,e()}}},goog.functions.debounce=function(e,o,t){t&&(e=goog.bind(e,t));var n=null;return function(t){goog.global.clearTimeout(n);var r=arguments;n=goog.global.setTimeout(function(){e.apply(null,r)},o)}},goog.functions.throttle=function(e,o,t){t&&(e=goog.bind(e,t));var n=null,r=!1,i=[],s=function(){n=null,r&&(r=!1,l())},l=function(){n=goog.global.setTimeout(s,o),e.apply(null,i)};return function(e){i=arguments,n?r=!0:l()}},goog.async.throwException=function(e){goog.global.setTimeout(function(){throw e},0)},goog.async.nextTick=function(e,o,t){var n=e;o&&(n=goog.bind(e,o)),n=goog.async.nextTick.wrapCallback_(n),goog.isFunction(goog.global.setImmediate)&&(t||goog.async.nextTick.useSetImmediate_())?goog.global.setImmediate(n):(goog.async.nextTick.setImmediate_||(goog.async.nextTick.setImmediate_=goog.async.nextTick.getSetImmediateEmulator_()),goog.async.nextTick.setImmediate_(n))},goog.async.nextTick.useSetImmediate_=function(){return goog.global.Window&&goog.global.Window.prototype&&!goog.labs.userAgent.browser.isEdge()&&goog.global.Window.prototype.setImmediate==goog.global.setImmediate?!1:!0},goog.async.nextTick.getSetImmediateEmulator_=function(){var e=goog.global.MessageChannel;if("undefined"==typeof e&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&!goog.labs.userAgent.engine.isPresto()&&(e=function(){var e=document.createElement("IFRAME");e.style.display="none",e.src="",document.documentElement.appendChild(e);var o=e.contentWindow,e=o.document;e.open(),e.write(""),e.close();var t="callImmediate"+Math.random(),n="file:"==o.location.protocol?"*":o.location.protocol+"//"+o.location.host,e=goog.bind(function(e){"*"!=n&&e.origin!=n||e.data!=t||this.port1.onmessage()},this);o.addEventListener("message",e,!1),this.port1={},this.port2={postMessage:function(){o.postMessage(t,n)}}}),"undefined"!=typeof e&&!goog.labs.userAgent.browser.isIE()){var o=new e,t={},n=t;return o.port1.onmessage=function(){if(goog.isDef(t.next)){t=t.next;var e=t.cb;t.cb=null,e()}},function(e){n.next={cb:e},n=n.next,o.port2.postMessage(0)}}return"undefined"!=typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(e){var o=document.createElement("SCRIPT");o.onreadystatechange=function(){o.onreadystatechange=null,o.parentNode.removeChild(o),o=null,e(),e=null},document.documentElement.appendChild(o)}:function(e){goog.global.setTimeout(e,0)}},goog.async.nextTick.wrapCallback_=goog.functions.identity,goog.debug.entryPointRegistry.register(function(e){goog.async.nextTick.wrapCallback_=e}),goog.async.run=function(e,o){goog.async.run.schedule_||goog.async.run.initializeRunner_(),goog.async.run.workQueueScheduled_||(goog.async.run.schedule_(),goog.async.run.workQueueScheduled_=!0),goog.async.run.workQueue_.add(e,o)},goog.async.run.initializeRunner_=function(){var e=goog.global.Promise;if(-1!=String(e).indexOf("[native code]")){var o=e.resolve(void 0);goog.async.run.schedule_=function(){o.then(goog.async.run.processWorkQueue)}}else goog.async.run.schedule_=function(){goog.async.nextTick(goog.async.run.processWorkQueue)}},goog.async.run.forceNextTick=function(e){goog.async.run.schedule_=function(){goog.async.nextTick(goog.async.run.processWorkQueue),e&&e(goog.async.run.processWorkQueue)}},goog.async.run.workQueueScheduled_=!1,goog.async.run.workQueue_=new goog.async.WorkQueue,goog.DEBUG&&(goog.async.run.resetQueue=function(){goog.async.run.workQueueScheduled_=!1,goog.async.run.workQueue_=new goog.async.WorkQueue}),goog.async.run.processWorkQueue=function(){for(var e;e=goog.async.run.workQueue_.remove();){try{e.fn.call(e.scope)}catch(o){goog.async.throwException(o)}goog.async.run.workQueue_.returnUnused(e)}goog.async.run.workQueueScheduled_=!1},goog.promise={},goog.promise.Resolver=function(){},goog.Promise=function(e,o){if(this.state_=goog.Promise.State_.PENDING,this.result_=void 0,this.callbackEntriesTail_=this.callbackEntries_=this.parent_=null,this.executing_=!1,0<goog.Promise.UNHANDLED_REJECTION_DELAY?this.unhandledRejectionId_=0:0==goog.Promise.UNHANDLED_REJECTION_DELAY&&(this.hadUnhandledRejection_=!1),goog.Promise.LONG_STACK_TRACES&&(this.stack_=[],this.addStackTrace_(Error("created")),this.currentStep_=0),e!=goog.nullFunction)try{var t=this;e.call(o,function(e){t.resolve_(goog.Promise.State_.FULFILLED,e)},function(e){if(goog.DEBUG&&!(e instanceof goog.Promise.CancellationError))try{if(e instanceof Error)throw e;throw Error("Promise rejected.")}catch(o){}t.resolve_(goog.Promise.State_.REJECTED,e)})}catch(n){this.resolve_(goog.Promise.State_.REJECTED,n)}},goog.Promise.LONG_STACK_TRACES=!1,goog.Promise.UNHANDLED_REJECTION_DELAY=0,goog.Promise.State_={PENDING:0,BLOCKED:1,FULFILLED:2,REJECTED:3},goog.Promise.CallbackEntry_=function(){this.next=this.context=this.onRejected=this.onFulfilled=this.child=null,this.always=!1},goog.Promise.CallbackEntry_.prototype.reset=function(){this.context=this.onRejected=this.onFulfilled=this.child=null,this.always=!1},goog.Promise.DEFAULT_MAX_UNUSED=100,goog.Promise.freelist_=new goog.async.FreeList(function(){return new goog.Promise.CallbackEntry_},function(e){e.reset()},goog.Promise.DEFAULT_MAX_UNUSED),goog.Promise.getCallbackEntry_=function(e,o,t){var n=goog.Promise.freelist_.get();return n.onFulfilled=e,n.onRejected=o,n.context=t,n},goog.Promise.returnEntry_=function(e){goog.Promise.freelist_.put(e)},goog.Promise.resolve=function(e){if(e instanceof goog.Promise)return e;var o=new goog.Promise(goog.nullFunction);return o.resolve_(goog.Promise.State_.FULFILLED,e),o},goog.Promise.reject=function(e){return new goog.Promise(function(o,t){t(e)})},goog.Promise.resolveThen_=function(e,o,t){goog.Promise.maybeThen_(e,o,t,null)||goog.async.run(goog.partial(o,e))},goog.Promise.race=function(e){return new goog.Promise(function(o,t){e.length||o(void 0);for(var n,r=0;r<e.length;r++)n=e[r],goog.Promise.resolveThen_(n,o,t)})},goog.Promise.all=function(e){return new goog.Promise(function(o,t){var n=e.length,r=[];if(n)for(var i,s=function(e,t){n--,r[e]=t,0==n&&o(r)},l=function(e){t(e)},g=0;g<e.length;g++)i=e[g],goog.Promise.resolveThen_(i,goog.partial(s,g),l);else o(r)})},goog.Promise.allSettled=function(e){return new goog.Promise(function(o,t){var n=e.length,r=[];if(n)for(var i,s=function(e,t,i){n--,r[e]=t?{fulfilled:!0,value:i}:{fulfilled:!1,reason:i},0==n&&o(r)},l=0;l<e.length;l++)i=e[l],goog.Promise.resolveThen_(i,goog.partial(s,l,!0),goog.partial(s,l,!1));else o(r)})},goog.Promise.firstFulfilled=function(e){return new goog.Promise(function(o,t){var n=e.length,r=[];if(n)for(var i,s=function(e){o(e)},l=function(e,o){n--,r[e]=o,0==n&&t(r)},g=0;g<e.length;g++)i=e[g],goog.Promise.resolveThen_(i,s,goog.partial(l,g));else o(void 0)})},goog.Promise.withResolver=function(){var e,o,t=new goog.Promise(function(t,n){e=t,o=n});return new goog.Promise.Resolver_(t,e,o)},goog.Promise.prototype.then=function(e,o,t){return null!=e&&goog.asserts.assertFunction(e,"opt_onFulfilled should be a function."),null!=o&&goog.asserts.assertFunction(o,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),goog.Promise.LONG_STACK_TRACES&&this.addStackTrace_(Error("then")),this.addChildPromise_(goog.isFunction(e)?e:null,goog.isFunction(o)?o:null,t)},goog.Thenable.addImplementation(goog.Promise),goog.Promise.prototype.thenVoid=function(e,o,t){null!=e&&goog.asserts.assertFunction(e,"opt_onFulfilled should be a function."),null!=o&&goog.asserts.assertFunction(o,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),goog.Promise.LONG_STACK_TRACES&&this.addStackTrace_(Error("then")),this.addCallbackEntry_(goog.Promise.getCallbackEntry_(e||goog.nullFunction,o||null,t))},goog.Promise.prototype.thenAlways=function(e,o){goog.Promise.LONG_STACK_TRACES&&this.addStackTrace_(Error("thenAlways"));var t=goog.Promise.getCallbackEntry_(e,e,o);return t.always=!0,this.addCallbackEntry_(t),this},goog.Promise.prototype.thenCatch=function(e,o){return goog.Promise.LONG_STACK_TRACES&&this.addStackTrace_(Error("thenCatch")),this.addChildPromise_(null,e,o)},goog.Promise.prototype.cancel=function(e){this.state_==goog.Promise.State_.PENDING&&goog.async.run(function(){var o=new goog.Promise.CancellationError(e);this.cancelInternal_(o)},this)},goog.Promise.prototype.cancelInternal_=function(e){this.state_==goog.Promise.State_.PENDING&&(this.parent_?(this.parent_.cancelChild_(this,e),this.parent_=null):this.resolve_(goog.Promise.State_.REJECTED,e))},goog.Promise.prototype.cancelChild_=function(e,o){if(this.callbackEntries_){for(var t=0,n=null,r=null,i=this.callbackEntries_;i&&(i.always||(t++,i.child==e&&(n=i),!(n&&t>1)));i=i.next)n||(r=i);n&&(this.state_==goog.Promise.State_.PENDING&&1==t?this.cancelInternal_(o):(r?this.removeEntryAfter_(r):this.popEntry_(),this.executeCallback_(n,goog.Promise.State_.REJECTED,o)))}},goog.Promise.prototype.addCallbackEntry_=function(e){this.hasEntry_()||this.state_!=goog.Promise.State_.FULFILLED&&this.state_!=goog.Promise.State_.REJECTED||this.scheduleCallbacks_(),this.queueEntry_(e)},goog.Promise.prototype.addChildPromise_=function(e,o,t){var n=goog.Promise.getCallbackEntry_(null,null,null);return n.child=new goog.Promise(function(r,i){n.onFulfilled=e?function(o){try{var n=e.call(t,o);r(n)}catch(s){i(s)}}:r,n.onRejected=o?function(e){try{var n=o.call(t,e);!goog.isDef(n)&&e instanceof goog.Promise.CancellationError?i(e):r(n)}catch(s){i(s)}}:i}),n.child.parent_=this,this.addCallbackEntry_(n),n.child},goog.Promise.prototype.unblockAndFulfill_=function(e){goog.asserts.assert(this.state_==goog.Promise.State_.BLOCKED),this.state_=goog.Promise.State_.PENDING,this.resolve_(goog.Promise.State_.FULFILLED,e)},goog.Promise.prototype.unblockAndReject_=function(e){goog.asserts.assert(this.state_==goog.Promise.State_.BLOCKED),this.state_=goog.Promise.State_.PENDING,this.resolve_(goog.Promise.State_.REJECTED,e)},goog.Promise.prototype.resolve_=function(e,o){this.state_==goog.Promise.State_.PENDING&&(this===o&&(e=goog.Promise.State_.REJECTED,o=new TypeError("Promise cannot resolve to itself")),this.state_=goog.Promise.State_.BLOCKED,goog.Promise.maybeThen_(o,this.unblockAndFulfill_,this.unblockAndReject_,this)||(this.result_=o,this.state_=e,this.parent_=null,this.scheduleCallbacks_(),e!=goog.Promise.State_.REJECTED||o instanceof goog.Promise.CancellationError||goog.Promise.addUnhandledRejection_(this,o)))},goog.Promise.maybeThen_=function(e,o,t,n){if(e instanceof goog.Promise)return e.thenVoid(o,t,n),!0;if(goog.Thenable.isImplementedBy(e))return e.then(o,t,n),!0;if(goog.isObject(e))try{var r=e.then;if(goog.isFunction(r))return goog.Promise.tryThen_(e,r,o,t,n),!0}catch(i){return t.call(n,i),!0}return!1},goog.Promise.tryThen_=function(e,o,t,n,r){var i=!1,s=function(e){i||(i=!0,t.call(r,e))},l=function(e){i||(i=!0,n.call(r,e))};try{o.call(e,s,l)}catch(g){l(g)}},goog.Promise.prototype.scheduleCallbacks_=function(){this.executing_||(this.executing_=!0,goog.async.run(this.executeCallbacks_,this))},goog.Promise.prototype.hasEntry_=function(){return!!this.callbackEntries_},goog.Promise.prototype.queueEntry_=function(e){goog.asserts.assert(null!=e.onFulfilled),this.callbackEntriesTail_?this.callbackEntriesTail_.next=e:this.callbackEntries_=e,this.callbackEntriesTail_=e},goog.Promise.prototype.popEntry_=function(){var e=null;return this.callbackEntries_&&(e=this.callbackEntries_,this.callbackEntries_=e.next,e.next=null),this.callbackEntries_||(this.callbackEntriesTail_=null),null!=e&&goog.asserts.assert(null!=e.onFulfilled),e},goog.Promise.prototype.removeEntryAfter_=function(e){goog.asserts.assert(this.callbackEntries_),goog.asserts.assert(null!=e),e.next==this.callbackEntriesTail_&&(this.callbackEntriesTail_=e),e.next=e.next.next},goog.Promise.prototype.executeCallbacks_=function(){for(var e;e=this.popEntry_();)goog.Promise.LONG_STACK_TRACES&&this.currentStep_++,this.executeCallback_(e,this.state_,this.result_);this.executing_=!1},goog.Promise.prototype.executeCallback_=function(e,o,t){if(o==goog.Promise.State_.REJECTED&&e.onRejected&&!e.always&&this.removeUnhandledRejection_(),e.child)e.child.parent_=null,goog.Promise.invokeCallback_(e,o,t);else try{e.always?e.onFulfilled.call(e.context):goog.Promise.invokeCallback_(e,o,t)}catch(n){goog.Promise.handleRejection_.call(null,n)}goog.Promise.returnEntry_(e)},goog.Promise.invokeCallback_=function(e,o,t){o==goog.Promise.State_.FULFILLED?e.onFulfilled.call(e.context,t):e.onRejected&&e.onRejected.call(e.context,t)},goog.Promise.prototype.addStackTrace_=function(e){if(goog.Promise.LONG_STACK_TRACES&&goog.isString(e.stack)){var o=e.stack.split("\n",4)[3];e=e.message,e+=Array(11-e.length).join(" "),this.stack_.push(e+o)}},goog.Promise.prototype.appendLongStack_=function(e){if(goog.Promise.LONG_STACK_TRACES&&e&&goog.isString(e.stack)&&this.stack_.length){for(var o=["Promise trace:"],t=this;t;t=t.parent_){for(var n=this.currentStep_;n>=0;n--)o.push(t.stack_[n]);o.push("Value: ["+(t.state_==goog.Promise.State_.REJECTED?"REJECTED":"FULFILLED")+"] <"+String(t.result_)+">")}e.stack+="\n\n"+o.join("\n")}},goog.Promise.prototype.removeUnhandledRejection_=function(){if(0<goog.Promise.UNHANDLED_REJECTION_DELAY)for(var e=this;e&&e.unhandledRejectionId_;e=e.parent_)goog.global.clearTimeout(e.unhandledRejectionId_),e.unhandledRejectionId_=0;else if(0==goog.Promise.UNHANDLED_REJECTION_DELAY)for(e=this;e&&e.hadUnhandledRejection_;e=e.parent_)e.hadUnhandledRejection_=!1},goog.Promise.addUnhandledRejection_=function(e,o){0<goog.Promise.UNHANDLED_REJECTION_DELAY?e.unhandledRejectionId_=goog.global.setTimeout(function(){e.appendLongStack_(o),goog.Promise.handleRejection_.call(null,o)},goog.Promise.UNHANDLED_REJECTION_DELAY):0==goog.Promise.UNHANDLED_REJECTION_DELAY&&(e.hadUnhandledRejection_=!0,goog.async.run(function(){e.hadUnhandledRejection_&&(e.appendLongStack_(o),goog.Promise.handleRejection_.call(null,o))}))},goog.Promise.handleRejection_=goog.async.throwException,goog.Promise.setUnhandledRejectionHandler=function(e){goog.Promise.handleRejection_=e},goog.Promise.CancellationError=function(e){goog.debug.Error.call(this,e)},goog.inherits(goog.Promise.CancellationError,goog.debug.Error),goog.Promise.CancellationError.prototype.name="cancel",goog.Promise.Resolver_=function(e,o,t){this.promise=e,this.resolve=o,this.reject=t},goog.events.EventTarget=function(){goog.Disposable.call(this),this.eventTargetListeners_=new goog.events.ListenerMap(this),this.actualEventTarget_=this,this.parentEventTarget_=null},goog.inherits(goog.events.EventTarget,goog.Disposable),goog.events.Listenable.addImplementation(goog.events.EventTarget),goog.events.EventTarget.MAX_ANCESTORS_=1e3,goog.events.EventTarget.prototype.getParentEventTarget=function(){return this.parentEventTarget_},goog.events.EventTarget.prototype.setParentEventTarget=function(e){this.parentEventTarget_=e},goog.events.EventTarget.prototype.addEventListener=function(e,o,t,n){goog.events.listen(this,e,o,t,n)},goog.events.EventTarget.prototype.removeEventListener=function(e,o,t,n){goog.events.unlisten(this,e,o,t,n)},goog.events.EventTarget.prototype.dispatchEvent=function(e){this.assertInitialized_();var o,t=this.getParentEventTarget();if(t){o=[];for(var n=1;t;t=t.getParentEventTarget())o.push(t),goog.asserts.assert(++n<goog.events.EventTarget.MAX_ANCESTORS_,"infinite loop")}return goog.events.EventTarget.dispatchEventInternal_(this.actualEventTarget_,e,o)},goog.events.EventTarget.prototype.disposeInternal=function(){goog.events.EventTarget.superClass_.disposeInternal.call(this),this.removeAllListeners(),this.parentEventTarget_=null},goog.events.EventTarget.prototype.listen=function(e,o,t,n){return this.assertInitialized_(),this.eventTargetListeners_.add(String(e),o,!1,t,n)},goog.events.EventTarget.prototype.listenOnce=function(e,o,t,n){return this.eventTargetListeners_.add(String(e),o,!0,t,n)},goog.events.EventTarget.prototype.unlisten=function(e,o,t,n){return this.eventTargetListeners_.remove(String(e),o,t,n)},goog.events.EventTarget.prototype.unlistenByKey=function(e){return this.eventTargetListeners_.removeByKey(e)},goog.events.EventTarget.prototype.removeAllListeners=function(e){return this.eventTargetListeners_?this.eventTargetListeners_.removeAll(e):0},goog.events.EventTarget.prototype.fireListeners=function(e,o,t){if(e=this.eventTargetListeners_.listeners[String(e)],!e)return!0;e=e.concat();for(var n=!0,r=0;r<e.length;++r){var i=e[r];if(i&&!i.removed&&i.capture==o){var s=i.listener,l=i.handler||i.src;i.callOnce&&this.unlistenByKey(i),n=!1!==s.call(l,t)&&n}}return n&&0!=t.returnValue_},goog.events.EventTarget.prototype.getListeners=function(e,o){return this.eventTargetListeners_.getListeners(String(e),o)},goog.events.EventTarget.prototype.getListener=function(e,o,t,n){return this.eventTargetListeners_.getListener(String(e),o,t,n)},goog.events.EventTarget.prototype.hasListener=function(e,o){var t=goog.isDef(e)?String(e):void 0;return this.eventTargetListeners_.hasListener(t,o)},goog.events.EventTarget.prototype.setTargetForTesting=function(e){this.actualEventTarget_=e},goog.events.EventTarget.prototype.assertInitialized_=function(){goog.asserts.assert(this.eventTargetListeners_,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")},goog.events.EventTarget.dispatchEventInternal_=function(e,o,t){var n=o.type||o;if(goog.isString(o))o=new goog.events.Event(o,e);else if(o instanceof goog.events.Event)o.target=o.target||e;else{var r=o;o=new goog.events.Event(n,e),goog.object.extend(o,r)}var i,r=!0;if(t)for(var s=t.length-1;!o.propagationStopped_&&s>=0;s--)i=o.currentTarget=t[s],r=i.fireListeners(n,!0,o)&&r;if(o.propagationStopped_||(i=o.currentTarget=e,r=i.fireListeners(n,!0,o)&&r,o.propagationStopped_||(r=i.fireListeners(n,!1,o)&&r)),t)for(s=0;!o.propagationStopped_&&s<t.length;s++)i=o.currentTarget=t[s],r=i.fireListeners(n,!1,o)&&r;return r},goog.Timer=function(e,o){goog.events.EventTarget.call(this),this.interval_=e||1,this.timerObject_=o||goog.Timer.defaultTimerObject,this.boundTick_=goog.bind(this.tick_,this),this.last_=goog.now()},goog.inherits(goog.Timer,goog.events.EventTarget),goog.Timer.MAX_TIMEOUT_=2147483647,goog.Timer.INVALID_TIMEOUT_ID_=-1,goog.Timer.prototype.enabled=!1,goog.Timer.defaultTimerObject=goog.global,goog.Timer.intervalScale=.8,goog.Timer.prototype.timer_=null,goog.Timer.prototype.getInterval=function(){return this.interval_},goog.Timer.prototype.setInterval=function(e){this.interval_=e,this.timer_&&this.enabled?(this.stop(),this.start()):this.timer_&&this.stop()},goog.Timer.prototype.tick_=function(){if(this.enabled){var e=goog.now()-this.last_;e>0&&e<this.interval_*goog.Timer.intervalScale?this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_-e):(this.timer_&&(this.timerObject_.clearTimeout(this.timer_),this.timer_=null),this.dispatchTick(),this.enabled&&(this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_),this.last_=goog.now()))}},goog.Timer.prototype.dispatchTick=function(){this.dispatchEvent(goog.Timer.TICK)},goog.Timer.prototype.start=function(){this.enabled=!0,this.timer_||(this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_),this.last_=goog.now())},goog.Timer.prototype.stop=function(){this.enabled=!1,this.timer_&&(this.timerObject_.clearTimeout(this.timer_),this.timer_=null)},goog.Timer.prototype.disposeInternal=function(){goog.Timer.superClass_.disposeInternal.call(this),this.stop(),delete this.timerObject_},goog.Timer.TICK="tick",goog.Timer.callOnce=function(e,o,t){if(goog.isFunction(e))t&&(e=goog.bind(e,t));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=goog.bind(e.handleEvent,e)}return Number(o)>goog.Timer.MAX_TIMEOUT_?goog.Timer.INVALID_TIMEOUT_ID_:goog.Timer.defaultTimerObject.setTimeout(e,o||0)},goog.Timer.clear=function(e){goog.Timer.defaultTimerObject.clearTimeout(e)},goog.Timer.promise=function(e,o){var t=null;return new goog.Promise(function(n,r){t=goog.Timer.callOnce(function(){n(o)},e),t==goog.Timer.INVALID_TIMEOUT_ID_&&r(Error("Failed to schedule timer."))}).thenCatch(function(e){throw goog.Timer.clear(t),e})},goog.events.EventHandler=function(e){goog.Disposable.call(this),this.handler_=e,this.keys_={}},goog.inherits(goog.events.EventHandler,goog.Disposable),goog.events.EventHandler.typeArray_=[],goog.events.EventHandler.prototype.listen=function(e,o,t,n){return this.listen_(e,o,t,n)},goog.events.EventHandler.prototype.listenWithScope=function(e,o,t,n,r){return this.listen_(e,o,t,n,r)},goog.events.EventHandler.prototype.listen_=function(e,o,t,n,r){goog.isArray(o)||(o&&(goog.events.EventHandler.typeArray_[0]=o.toString()),o=goog.events.EventHandler.typeArray_);for(var i=0;i<o.length;i++){var s=goog.events.listen(e,o[i],t||this.handleEvent,n||!1,r||this.handler_||this);if(!s)break;this.keys_[s.key]=s}return this},goog.events.EventHandler.prototype.listenOnce=function(e,o,t,n){return this.listenOnce_(e,o,t,n)},goog.events.EventHandler.prototype.listenOnceWithScope=function(e,o,t,n,r){return this.listenOnce_(e,o,t,n,r)},goog.events.EventHandler.prototype.listenOnce_=function(e,o,t,n,r){if(goog.isArray(o))for(var i=0;i<o.length;i++)this.listenOnce_(e,o[i],t,n,r);else{if(e=goog.events.listenOnce(e,o,t||this.handleEvent,n,r||this.handler_||this),!e)return this;this.keys_[e.key]=e}return this},goog.events.EventHandler.prototype.listenWithWrapper=function(e,o,t,n){return this.listenWithWrapper_(e,o,t,n)},goog.events.EventHandler.prototype.listenWithWrapperAndScope=function(e,o,t,n,r){return this.listenWithWrapper_(e,o,t,n,r)},goog.events.EventHandler.prototype.listenWithWrapper_=function(e,o,t,n,r){return o.listen(e,t,n,r||this.handler_||this,this),this},goog.events.EventHandler.prototype.getListenerCount=function(){var e,o=0;for(e in this.keys_)Object.prototype.hasOwnProperty.call(this.keys_,e)&&o++;return o},goog.events.EventHandler.prototype.unlisten=function(e,o,t,n,r){if(goog.isArray(o))for(var i=0;i<o.length;i++)this.unlisten(e,o[i],t,n,r);else(e=goog.events.getListener(e,o,t||this.handleEvent,n,r||this.handler_||this))&&(goog.events.unlistenByKey(e),delete this.keys_[e.key]);return this},goog.events.EventHandler.prototype.unlistenWithWrapper=function(e,o,t,n,r){return o.unlisten(e,t,n,r||this.handler_||this,this),this},goog.events.EventHandler.prototype.removeAll=function(){goog.object.forEach(this.keys_,function(e,o){this.keys_.hasOwnProperty(o)&&goog.events.unlistenByKey(e)},this),this.keys_={}},goog.events.EventHandler.prototype.disposeInternal=function(){goog.events.EventHandler.superClass_.disposeInternal.call(this),this.removeAll()},goog.events.EventHandler.prototype.handleEvent=function(e){throw Error("EventHandler.handleEvent not implemented")},goog.ui={},goog.ui.IdGenerator=function(){},goog.addSingletonGetter(goog.ui.IdGenerator),goog.ui.IdGenerator.prototype.nextId_=0,goog.ui.IdGenerator.prototype.getNextUniqueId=function(){return":"+(this.nextId_++).toString(36)},goog.ui.Component=function(e){goog.events.EventTarget.call(this),this.dom_=e||goog.dom.getDomHelper(),this.rightToLeft_=goog.ui.Component.defaultRightToLeft_,this.id_=null,this.inDocument_=!1,this.element_=null,this.googUiComponentHandler_=void 0,this.childIndex_=this.children_=this.parent_=this.model_=null,this.wasDecorated_=!1},goog.inherits(goog.ui.Component,goog.events.EventTarget),goog.ui.Component.ALLOW_DETACHED_DECORATION=!1,goog.ui.Component.prototype.idGenerator_=goog.ui.IdGenerator.getInstance(),goog.ui.Component.DEFAULT_BIDI_DIR=0,goog.ui.Component.defaultRightToLeft_=1==goog.ui.Component.DEFAULT_BIDI_DIR?!1:-1==goog.ui.Component.DEFAULT_BIDI_DIR?!0:null,goog.ui.Component.EventType={BEFORE_SHOW:"beforeshow",SHOW:"show",HIDE:"hide",DISABLE:"disable",ENABLE:"enable",HIGHLIGHT:"highlight",UNHIGHLIGHT:"unhighlight",ACTIVATE:"activate",DEACTIVATE:"deactivate",SELECT:"select",UNSELECT:"unselect",CHECK:"check",UNCHECK:"uncheck",FOCUS:"focus",BLUR:"blur",OPEN:"open",CLOSE:"close",ENTER:"enter",LEAVE:"leave",ACTION:"action",CHANGE:"change"},goog.ui.Component.Error={NOT_SUPPORTED:"Method not supported",DECORATE_INVALID:"Invalid element to decorate",ALREADY_RENDERED:"Component already rendered",PARENT_UNABLE_TO_BE_SET:"Unable to set parent component",CHILD_INDEX_OUT_OF_BOUNDS:"Child component index out of bounds",NOT_OUR_CHILD:"Child is not in parent component",NOT_IN_DOCUMENT:"Operation not supported while component is not in document",STATE_INVALID:"Invalid component state"},goog.ui.Component.State={ALL:255,DISABLED:1,HOVER:2,ACTIVE:4,SELECTED:8,CHECKED:16,FOCUSED:32,OPENED:64},goog.ui.Component.getStateTransitionEvent=function(e,o){switch(e){case goog.ui.Component.State.DISABLED:return o?goog.ui.Component.EventType.DISABLE:goog.ui.Component.EventType.ENABLE;case goog.ui.Component.State.HOVER:return o?goog.ui.Component.EventType.HIGHLIGHT:goog.ui.Component.EventType.UNHIGHLIGHT;case goog.ui.Component.State.ACTIVE:return o?goog.ui.Component.EventType.ACTIVATE:goog.ui.Component.EventType.DEACTIVATE;case goog.ui.Component.State.SELECTED:return o?goog.ui.Component.EventType.SELECT:goog.ui.Component.EventType.UNSELECT;case goog.ui.Component.State.CHECKED:return o?goog.ui.Component.EventType.CHECK:goog.ui.Component.EventType.UNCHECK;case goog.ui.Component.State.FOCUSED:return o?goog.ui.Component.EventType.FOCUS:goog.ui.Component.EventType.BLUR;case goog.ui.Component.State.OPENED:return o?goog.ui.Component.EventType.OPEN:goog.ui.Component.EventType.CLOSE}throw Error(goog.ui.Component.Error.STATE_INVALID)},goog.ui.Component.setDefaultRightToLeft=function(e){goog.ui.Component.defaultRightToLeft_=e},goog.ui.Component.prototype.getId=function(){return this.id_||(this.id_=this.idGenerator_.getNextUniqueId())},goog.ui.Component.prototype.setId=function(e){this.parent_&&this.parent_.childIndex_&&(goog.object.remove(this.parent_.childIndex_,this.id_),goog.object.add(this.parent_.childIndex_,e,this)),this.id_=e},goog.ui.Component.prototype.getElement=function(){return this.element_},goog.ui.Component.prototype.getElementStrict=function(){var e=this.element_;return goog.asserts.assert(e,"Can not call getElementStrict before rendering/decorating."),e},goog.ui.Component.prototype.setElementInternal=function(e){this.element_=e},goog.ui.Component.prototype.getElementsByClass=function(e){return this.element_?this.dom_.getElementsByClass(e,this.element_):[]},goog.ui.Component.prototype.getElementByClass=function(e){return this.element_?this.dom_.getElementByClass(e,this.element_):null},goog.ui.Component.prototype.getRequiredElementByClass=function(e){var o=this.getElementByClass(e);return goog.asserts.assert(o,"Expected element in component with class: %s",e),o},goog.ui.Component.prototype.getHandler=function(){return this.googUiComponentHandler_||(this.googUiComponentHandler_=new goog.events.EventHandler(this)),this.googUiComponentHandler_},goog.ui.Component.prototype.setParent=function(e){if(this==e)throw Error(goog.ui.Component.Error.PARENT_UNABLE_TO_BE_SET);if(e&&this.parent_&&this.id_&&this.parent_.getChild(this.id_)&&this.parent_!=e)throw Error(goog.ui.Component.Error.PARENT_UNABLE_TO_BE_SET);this.parent_=e,goog.ui.Component.superClass_.setParentEventTarget.call(this,e)},goog.ui.Component.prototype.getParent=function(){return this.parent_},goog.ui.Component.prototype.setParentEventTarget=function(e){if(this.parent_&&this.parent_!=e)throw Error(goog.ui.Component.Error.NOT_SUPPORTED);goog.ui.Component.superClass_.setParentEventTarget.call(this,e)},goog.ui.Component.prototype.getDomHelper=function(){return this.dom_},goog.ui.Component.prototype.isInDocument=function(){return this.inDocument_},goog.ui.Component.prototype.createDom=function(){this.element_=this.dom_.createElement("DIV")},goog.ui.Component.prototype.render=function(e){this.render_(e)},goog.ui.Component.prototype.renderBefore=function(e){this.render_(e.parentNode,e)},goog.ui.Component.prototype.render_=function(e,o){if(this.inDocument_)throw Error(goog.ui.Component.Error.ALREADY_RENDERED);this.element_||this.createDom(),e?e.insertBefore(this.element_,o||null):this.dom_.getDocument().body.appendChild(this.element_),this.parent_&&!this.parent_.isInDocument()||this.enterDocument()},goog.ui.Component.prototype.decorate=function(e){if(this.inDocument_)throw Error(goog.ui.Component.Error.ALREADY_RENDERED);if(!e||!this.canDecorate(e))throw Error(goog.ui.Component.Error.DECORATE_INVALID);this.wasDecorated_=!0;var o=goog.dom.getOwnerDocument(e);this.dom_&&this.dom_.getDocument()==o||(this.dom_=goog.dom.getDomHelper(e)),this.decorateInternal(e),goog.ui.Component.ALLOW_DETACHED_DECORATION&&!goog.dom.contains(o,e)||this.enterDocument()},goog.ui.Component.prototype.canDecorate=function(e){return!0},goog.ui.Component.prototype.wasDecorated=function(){return this.wasDecorated_},goog.ui.Component.prototype.decorateInternal=function(e){this.element_=e},goog.ui.Component.prototype.enterDocument=function(){this.inDocument_=!0,this.forEachChild(function(e){!e.isInDocument()&&e.getElement()&&e.enterDocument()})},goog.ui.Component.prototype.exitDocument=function(){this.forEachChild(function(e){e.isInDocument()&&e.exitDocument()}),this.googUiComponentHandler_&&this.googUiComponentHandler_.removeAll(),this.inDocument_=!1},goog.ui.Component.prototype.disposeInternal=function(){this.inDocument_&&this.exitDocument(),this.googUiComponentHandler_&&(this.googUiComponentHandler_.dispose(),delete this.googUiComponentHandler_),this.forEachChild(function(e){e.dispose()}),!this.wasDecorated_&&this.element_&&goog.dom.removeNode(this.element_),this.parent_=this.model_=this.element_=this.childIndex_=this.children_=null,goog.ui.Component.superClass_.disposeInternal.call(this)},goog.ui.Component.prototype.makeId=function(e){return this.getId()+"."+e},goog.ui.Component.prototype.makeIds=function(e){var o,t={};for(o in e)t[o]=this.makeId(e[o]);return t},goog.ui.Component.prototype.getModel=function(){return this.model_},goog.ui.Component.prototype.setModel=function(e){this.model_=e},goog.ui.Component.prototype.getFragmentFromId=function(e){return e.substring(this.getId().length+1)},goog.ui.Component.prototype.getElementByFragment=function(e){
+if(!this.inDocument_)throw Error(goog.ui.Component.Error.NOT_IN_DOCUMENT);return this.dom_.getElement(this.makeId(e))},goog.ui.Component.prototype.addChild=function(e,o){this.addChildAt(e,this.getChildCount(),o)},goog.ui.Component.prototype.addChildAt=function(e,o,t){if(goog.asserts.assert(!!e,"Provided element must not be null."),e.inDocument_&&(t||!this.inDocument_))throw Error(goog.ui.Component.Error.ALREADY_RENDERED);if(0>o||o>this.getChildCount())throw Error(goog.ui.Component.Error.CHILD_INDEX_OUT_OF_BOUNDS);this.childIndex_&&this.children_||(this.childIndex_={},this.children_=[]),e.getParent()==this?(goog.object.set(this.childIndex_,e.getId(),e),goog.array.remove(this.children_,e)):goog.object.add(this.childIndex_,e.getId(),e),e.setParent(this),goog.array.insertAt(this.children_,e,o),e.inDocument_&&this.inDocument_&&e.getParent()==this?(t=this.getContentElement(),o=t.childNodes[o]||null,o!=e.getElement()&&t.insertBefore(e.getElement(),o)):t?(this.element_||this.createDom(),o=this.getChildAt(o+1),e.render_(this.getContentElement(),o?o.element_:null)):this.inDocument_&&!e.inDocument_&&e.element_&&e.element_.parentNode&&e.element_.parentNode.nodeType==goog.dom.NodeType.ELEMENT&&e.enterDocument()},goog.ui.Component.prototype.getContentElement=function(){return this.element_},goog.ui.Component.prototype.isRightToLeft=function(){return null==this.rightToLeft_&&(this.rightToLeft_=goog.style.isRightToLeft(this.inDocument_?this.element_:this.dom_.getDocument().body)),this.rightToLeft_},goog.ui.Component.prototype.setRightToLeft=function(e){if(this.inDocument_)throw Error(goog.ui.Component.Error.ALREADY_RENDERED);this.rightToLeft_=e},goog.ui.Component.prototype.hasChildren=function(){return!!this.children_&&0!=this.children_.length},goog.ui.Component.prototype.getChildCount=function(){return this.children_?this.children_.length:0},goog.ui.Component.prototype.getChildIds=function(){var e=[];return this.forEachChild(function(o){e.push(o.getId())}),e},goog.ui.Component.prototype.getChild=function(e){return this.childIndex_&&e?goog.object.get(this.childIndex_,e)||null:null},goog.ui.Component.prototype.getChildAt=function(e){return this.children_?this.children_[e]||null:null},goog.ui.Component.prototype.forEachChild=function(e,o){this.children_&&goog.array.forEach(this.children_,e,o)},goog.ui.Component.prototype.indexOfChild=function(e){return this.children_&&e?goog.array.indexOf(this.children_,e):-1},goog.ui.Component.prototype.removeChild=function(e,o){if(e){var t=goog.isString(e)?e:e.getId();e=this.getChild(t),t&&e&&(goog.object.remove(this.childIndex_,t),goog.array.remove(this.children_,e),o&&(e.exitDocument(),e.element_&&goog.dom.removeNode(e.element_)),e.setParent(null))}if(!e)throw Error(goog.ui.Component.Error.NOT_OUR_CHILD);return e},goog.ui.Component.prototype.removeChildAt=function(e,o){return this.removeChild(this.getChildAt(e),o)},goog.ui.Component.prototype.removeChildren=function(e){for(var o=[];this.hasChildren();)o.push(this.removeChildAt(0,e));return o},goog.a11y={},goog.a11y.aria={},goog.a11y.aria.Role={ALERT:"alert",ALERTDIALOG:"alertdialog",APPLICATION:"application",ARTICLE:"article",BANNER:"banner",BUTTON:"button",CHECKBOX:"checkbox",COLUMNHEADER:"columnheader",COMBOBOX:"combobox",COMPLEMENTARY:"complementary",CONTENTINFO:"contentinfo",DEFINITION:"definition",DIALOG:"dialog",DIRECTORY:"directory",DOCUMENT:"document",FORM:"form",GRID:"grid",GRIDCELL:"gridcell",GROUP:"group",HEADING:"heading",IMG:"img",LINK:"link",LIST:"list",LISTBOX:"listbox",LISTITEM:"listitem",LOG:"log",MAIN:"main",MARQUEE:"marquee",MATH:"math",MENU:"menu",MENUBAR:"menubar",MENU_ITEM:"menuitem",MENU_ITEM_CHECKBOX:"menuitemcheckbox",MENU_ITEM_RADIO:"menuitemradio",NAVIGATION:"navigation",NOTE:"note",OPTION:"option",PRESENTATION:"presentation",PROGRESSBAR:"progressbar",RADIO:"radio",RADIOGROUP:"radiogroup",REGION:"region",ROW:"row",ROWGROUP:"rowgroup",ROWHEADER:"rowheader",SCROLLBAR:"scrollbar",SEARCH:"search",SEPARATOR:"separator",SLIDER:"slider",SPINBUTTON:"spinbutton",STATUS:"status",TAB:"tab",TAB_LIST:"tablist",TAB_PANEL:"tabpanel",TEXTBOX:"textbox",TEXTINFO:"textinfo",TIMER:"timer",TOOLBAR:"toolbar",TOOLTIP:"tooltip",TREE:"tree",TREEGRID:"treegrid",TREEITEM:"treeitem"},goog.a11y.aria.State={ACTIVEDESCENDANT:"activedescendant",ATOMIC:"atomic",AUTOCOMPLETE:"autocomplete",BUSY:"busy",CHECKED:"checked",CONTROLS:"controls",DESCRIBEDBY:"describedby",DISABLED:"disabled",DROPEFFECT:"dropeffect",EXPANDED:"expanded",FLOWTO:"flowto",GRABBED:"grabbed",HASPOPUP:"haspopup",HIDDEN:"hidden",INVALID:"invalid",LABEL:"label",LABELLEDBY:"labelledby",LEVEL:"level",LIVE:"live",MULTILINE:"multiline",MULTISELECTABLE:"multiselectable",ORIENTATION:"orientation",OWNS:"owns",POSINSET:"posinset",PRESSED:"pressed",READONLY:"readonly",RELEVANT:"relevant",REQUIRED:"required",SELECTED:"selected",SETSIZE:"setsize",SORT:"sort",VALUEMAX:"valuemax",VALUEMIN:"valuemin",VALUENOW:"valuenow",VALUETEXT:"valuetext"},goog.a11y.aria.AutoCompleteValues={INLINE:"inline",LIST:"list",BOTH:"both",NONE:"none"},goog.a11y.aria.DropEffectValues={COPY:"copy",MOVE:"move",LINK:"link",EXECUTE:"execute",POPUP:"popup",NONE:"none"},goog.a11y.aria.LivePriority={OFF:"off",POLITE:"polite",ASSERTIVE:"assertive"},goog.a11y.aria.OrientationValues={VERTICAL:"vertical",HORIZONTAL:"horizontal"},goog.a11y.aria.RelevantValues={ADDITIONS:"additions",REMOVALS:"removals",TEXT:"text",ALL:"all"},goog.a11y.aria.SortValues={ASCENDING:"ascending",DESCENDING:"descending",NONE:"none",OTHER:"other"},goog.a11y.aria.CheckedValues={TRUE:"true",FALSE:"false",MIXED:"mixed",UNDEFINED:"undefined"},goog.a11y.aria.ExpandedValues={TRUE:"true",FALSE:"false",UNDEFINED:"undefined"},goog.a11y.aria.GrabbedValues={TRUE:"true",FALSE:"false",UNDEFINED:"undefined"},goog.a11y.aria.InvalidValues={FALSE:"false",TRUE:"true",GRAMMAR:"grammar",SPELLING:"spelling"},goog.a11y.aria.PressedValues={TRUE:"true",FALSE:"false",MIXED:"mixed",UNDEFINED:"undefined"},goog.a11y.aria.SelectedValues={TRUE:"true",FALSE:"false",UNDEFINED:"undefined"},goog.a11y.aria.datatables={},goog.a11y.aria.datatables.getDefaultValuesMap=function(){return goog.a11y.aria.DefaultStateValueMap_||(goog.a11y.aria.DefaultStateValueMap_=goog.object.create(goog.a11y.aria.State.ATOMIC,!1,goog.a11y.aria.State.AUTOCOMPLETE,"none",goog.a11y.aria.State.DROPEFFECT,"none",goog.a11y.aria.State.HASPOPUP,!1,goog.a11y.aria.State.LIVE,"off",goog.a11y.aria.State.MULTILINE,!1,goog.a11y.aria.State.MULTISELECTABLE,!1,goog.a11y.aria.State.ORIENTATION,"vertical",goog.a11y.aria.State.READONLY,!1,goog.a11y.aria.State.RELEVANT,"additions text",goog.a11y.aria.State.REQUIRED,!1,goog.a11y.aria.State.SORT,"none",goog.a11y.aria.State.BUSY,!1,goog.a11y.aria.State.DISABLED,!1,goog.a11y.aria.State.HIDDEN,!1,goog.a11y.aria.State.INVALID,"false")),goog.a11y.aria.DefaultStateValueMap_},goog.a11y.aria.ARIA_PREFIX_="aria-",goog.a11y.aria.ROLE_ATTRIBUTE_="role",goog.a11y.aria.TAGS_WITH_ASSUMED_ROLES_=goog.object.createSet("A AREA BUTTON HEAD INPUT LINK MENU META OPTGROUP OPTION PROGRESS STYLE SELECT SOURCE TEXTAREA TITLE TRACK".split(" ")),goog.a11y.aria.CONTAINER_ROLES_=[goog.a11y.aria.Role.COMBOBOX,goog.a11y.aria.Role.GRID,goog.a11y.aria.Role.GROUP,goog.a11y.aria.Role.LISTBOX,goog.a11y.aria.Role.MENU,goog.a11y.aria.Role.MENUBAR,goog.a11y.aria.Role.RADIOGROUP,goog.a11y.aria.Role.ROW,goog.a11y.aria.Role.ROWGROUP,goog.a11y.aria.Role.TAB_LIST,goog.a11y.aria.Role.TEXTBOX,goog.a11y.aria.Role.TOOLBAR,goog.a11y.aria.Role.TREE,goog.a11y.aria.Role.TREEGRID],goog.a11y.aria.setRole=function(e,o){o?(goog.asserts.ENABLE_ASSERTS&&goog.asserts.assert(goog.object.containsValue(goog.a11y.aria.Role,o),"No such ARIA role "+o),e.setAttribute(goog.a11y.aria.ROLE_ATTRIBUTE_,o)):goog.a11y.aria.removeRole(e)},goog.a11y.aria.getRole=function(e){return e.getAttribute(goog.a11y.aria.ROLE_ATTRIBUTE_)||null},goog.a11y.aria.removeRole=function(e){e.removeAttribute(goog.a11y.aria.ROLE_ATTRIBUTE_)},goog.a11y.aria.setState=function(e,o,t){goog.isArray(t)&&(t=t.join(" "));var n=goog.a11y.aria.getAriaAttributeName_(o);""===t||void 0==t?(t=goog.a11y.aria.datatables.getDefaultValuesMap(),o in t?e.setAttribute(n,t[o]):e.removeAttribute(n)):e.setAttribute(n,t)},goog.a11y.aria.toggleState=function(e,o){var t=goog.a11y.aria.getState(e,o);goog.string.isEmptyOrWhitespace(goog.string.makeSafe(t))||"true"==t||"false"==t?goog.a11y.aria.setState(e,o,"true"==t?"false":"true"):goog.a11y.aria.removeState(e,o)},goog.a11y.aria.removeState=function(e,o){e.removeAttribute(goog.a11y.aria.getAriaAttributeName_(o))},goog.a11y.aria.getState=function(e,o){var t=e.getAttribute(goog.a11y.aria.getAriaAttributeName_(o));return null==t||void 0==t?"":String(t)},goog.a11y.aria.getActiveDescendant=function(e){var o=goog.a11y.aria.getState(e,goog.a11y.aria.State.ACTIVEDESCENDANT);return goog.dom.getOwnerDocument(e).getElementById(o)},goog.a11y.aria.setActiveDescendant=function(e,o){var t="";o&&(t=o.id,goog.asserts.assert(t,"The active element should have an id.")),goog.a11y.aria.setState(e,goog.a11y.aria.State.ACTIVEDESCENDANT,t)},goog.a11y.aria.getLabel=function(e){return goog.a11y.aria.getState(e,goog.a11y.aria.State.LABEL)},goog.a11y.aria.setLabel=function(e,o){goog.a11y.aria.setState(e,goog.a11y.aria.State.LABEL,o)},goog.a11y.aria.assertRoleIsSetInternalUtil=function(e,o){if(!goog.a11y.aria.TAGS_WITH_ASSUMED_ROLES_[e.tagName]){var t=goog.a11y.aria.getRole(e);goog.asserts.assert(null!=t,"The element ARIA role cannot be null."),goog.asserts.assert(goog.array.contains(o,t),'Non existing or incorrect role set for element.The role set is "'+t+'". The role should be any of "'+o+'". Check the ARIA specification for more details http://www.w3.org/TR/wai-aria/roles.')}},goog.a11y.aria.getStateBoolean=function(e,o){var t=e.getAttribute(goog.a11y.aria.getAriaAttributeName_(o));return goog.asserts.assert(goog.isBoolean(t)||null==t||"true"==t||"false"==t),null==t?t:goog.isBoolean(t)?t:"true"==t},goog.a11y.aria.getStateNumber=function(e,o){var t=e.getAttribute(goog.a11y.aria.getAriaAttributeName_(o));return goog.asserts.assert(!(null!=t&&isNaN(Number(t))||goog.isBoolean(t))),null==t?null:Number(t)},goog.a11y.aria.getStateString=function(e,o){var t=e.getAttribute(goog.a11y.aria.getAriaAttributeName_(o));return goog.asserts.assert((null==t||goog.isString(t))&&(""==t||isNaN(Number(t)))&&"true"!=t&&"false"!=t),null==t||""==t?null:t},goog.a11y.aria.getStringArrayStateInternalUtil=function(e,o){var t=e.getAttribute(goog.a11y.aria.getAriaAttributeName_(o));return goog.a11y.aria.splitStringOnWhitespace_(t)},goog.a11y.aria.hasState=function(e,o){return e.hasAttribute(goog.a11y.aria.getAriaAttributeName_(o))},goog.a11y.aria.isContainerRole=function(e){return e=goog.a11y.aria.getRole(e),goog.array.contains(goog.a11y.aria.CONTAINER_ROLES_,e)},goog.a11y.aria.splitStringOnWhitespace_=function(e){return e?e.split(/\s+/):[]},goog.a11y.aria.getAriaAttributeName_=function(e){return goog.asserts.ENABLE_ASSERTS&&(goog.asserts.assert(e,"ARIA attribute cannot be empty."),goog.asserts.assert(goog.object.containsValue(goog.a11y.aria.State,e),"No such ARIA attribute "+e)),goog.a11y.aria.ARIA_PREFIX_+e},goog.events.KeyCodes={WIN_KEY_FF_LINUX:0,MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PLUS_SIGN:43,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,FF_SEMICOLON:59,FF_EQUALS:61,FF_DASH:173,QUESTION_MARK:63,AT_SIGN:64,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SCROLL_LOCK:145,FIRST_MEDIA_KEY:166,LAST_MEDIA_KEY:183,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,TILDE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,MAC_WK_CMD_LEFT:91,MAC_WK_CMD_RIGHT:93,WIN_IME:229,VK_NONAME:252,PHANTOM:255},goog.events.KeyCodes.isTextModifyingKeyEvent=function(e){if(e.altKey&&!e.ctrlKey||e.metaKey||e.keyCode>=goog.events.KeyCodes.F1&&e.keyCode<=goog.events.KeyCodes.F12)return!1;switch(e.keyCode){case goog.events.KeyCodes.ALT:case goog.events.KeyCodes.CAPS_LOCK:case goog.events.KeyCodes.CONTEXT_MENU:case goog.events.KeyCodes.CTRL:case goog.events.KeyCodes.DOWN:case goog.events.KeyCodes.END:case goog.events.KeyCodes.ESC:case goog.events.KeyCodes.HOME:case goog.events.KeyCodes.INSERT:case goog.events.KeyCodes.LEFT:case goog.events.KeyCodes.MAC_FF_META:case goog.events.KeyCodes.META:case goog.events.KeyCodes.NUMLOCK:case goog.events.KeyCodes.NUM_CENTER:case goog.events.KeyCodes.PAGE_DOWN:case goog.events.KeyCodes.PAGE_UP:case goog.events.KeyCodes.PAUSE:case goog.events.KeyCodes.PHANTOM:case goog.events.KeyCodes.PRINT_SCREEN:case goog.events.KeyCodes.RIGHT:case goog.events.KeyCodes.SCROLL_LOCK:case goog.events.KeyCodes.SHIFT:case goog.events.KeyCodes.UP:case goog.events.KeyCodes.VK_NONAME:case goog.events.KeyCodes.WIN_KEY:case goog.events.KeyCodes.WIN_KEY_RIGHT:return!1;case goog.events.KeyCodes.WIN_KEY_FF_LINUX:return!goog.userAgent.GECKO;default:return e.keyCode<goog.events.KeyCodes.FIRST_MEDIA_KEY||e.keyCode>goog.events.KeyCodes.LAST_MEDIA_KEY}},goog.events.KeyCodes.firesKeyPressEvent=function(e,o,t,n,r,i){if(!(goog.userAgent.IE||goog.userAgent.EDGE||goog.userAgent.WEBKIT&&goog.userAgent.isVersionOrHigher("525")))return!0;if(goog.userAgent.MAC&&r)return goog.events.KeyCodes.isCharacterKey(e);if(r&&!n)return!1;if(goog.isNumber(o)&&(o=goog.events.KeyCodes.normalizeKeyCode(o)),r=o==goog.events.KeyCodes.CTRL||o==goog.events.KeyCodes.ALT||goog.userAgent.MAC&&o==goog.events.KeyCodes.META,i=o==goog.events.KeyCodes.SHIFT&&(n||i),(!t||goog.userAgent.MAC)&&r||goog.userAgent.MAC&&i)return!1;if((goog.userAgent.WEBKIT||goog.userAgent.EDGE)&&n&&t)switch(e){case goog.events.KeyCodes.BACKSLASH:case goog.events.KeyCodes.OPEN_SQUARE_BRACKET:case goog.events.KeyCodes.CLOSE_SQUARE_BRACKET:case goog.events.KeyCodes.TILDE:case goog.events.KeyCodes.SEMICOLON:case goog.events.KeyCodes.DASH:case goog.events.KeyCodes.EQUALS:case goog.events.KeyCodes.COMMA:case goog.events.KeyCodes.PERIOD:case goog.events.KeyCodes.SLASH:case goog.events.KeyCodes.APOSTROPHE:case goog.events.KeyCodes.SINGLE_QUOTE:return!1}if(goog.userAgent.IE&&n&&o==e)return!1;switch(e){case goog.events.KeyCodes.ENTER:return!0;case goog.events.KeyCodes.ESC:return!(goog.userAgent.WEBKIT||goog.userAgent.EDGE)}return goog.events.KeyCodes.isCharacterKey(e)},goog.events.KeyCodes.isCharacterKey=function(e){if(e>=goog.events.KeyCodes.ZERO&&e<=goog.events.KeyCodes.NINE||e>=goog.events.KeyCodes.NUM_ZERO&&e<=goog.events.KeyCodes.NUM_MULTIPLY||e>=goog.events.KeyCodes.A&&e<=goog.events.KeyCodes.Z||(goog.userAgent.WEBKIT||goog.userAgent.EDGE)&&0==e)return!0;switch(e){case goog.events.KeyCodes.SPACE:case goog.events.KeyCodes.PLUS_SIGN:case goog.events.KeyCodes.QUESTION_MARK:case goog.events.KeyCodes.AT_SIGN:case goog.events.KeyCodes.NUM_PLUS:case goog.events.KeyCodes.NUM_MINUS:case goog.events.KeyCodes.NUM_PERIOD:case goog.events.KeyCodes.NUM_DIVISION:case goog.events.KeyCodes.SEMICOLON:case goog.events.KeyCodes.FF_SEMICOLON:case goog.events.KeyCodes.DASH:case goog.events.KeyCodes.EQUALS:case goog.events.KeyCodes.FF_EQUALS:case goog.events.KeyCodes.COMMA:case goog.events.KeyCodes.PERIOD:case goog.events.KeyCodes.SLASH:case goog.events.KeyCodes.APOSTROPHE:case goog.events.KeyCodes.SINGLE_QUOTE:case goog.events.KeyCodes.OPEN_SQUARE_BRACKET:case goog.events.KeyCodes.BACKSLASH:case goog.events.KeyCodes.CLOSE_SQUARE_BRACKET:return!0;default:return!1}},goog.events.KeyCodes.normalizeKeyCode=function(e){return goog.userAgent.GECKO?goog.events.KeyCodes.normalizeGeckoKeyCode(e):goog.userAgent.MAC&&goog.userAgent.WEBKIT?goog.events.KeyCodes.normalizeMacWebKitKeyCode(e):e},goog.events.KeyCodes.normalizeGeckoKeyCode=function(e){switch(e){case goog.events.KeyCodes.FF_EQUALS:return goog.events.KeyCodes.EQUALS;case goog.events.KeyCodes.FF_SEMICOLON:return goog.events.KeyCodes.SEMICOLON;case goog.events.KeyCodes.FF_DASH:return goog.events.KeyCodes.DASH;case goog.events.KeyCodes.MAC_FF_META:return goog.events.KeyCodes.META;case goog.events.KeyCodes.WIN_KEY_FF_LINUX:return goog.events.KeyCodes.WIN_KEY;default:return e}},goog.events.KeyCodes.normalizeMacWebKitKeyCode=function(e){switch(e){case goog.events.KeyCodes.MAC_WK_CMD_RIGHT:return goog.events.KeyCodes.META;default:return e}},goog.events.KeyHandler=function(e,o){goog.events.EventTarget.call(this),e&&this.attach(e,o)},goog.inherits(goog.events.KeyHandler,goog.events.EventTarget),goog.events.KeyHandler.prototype.element_=null,goog.events.KeyHandler.prototype.keyPressKey_=null,goog.events.KeyHandler.prototype.keyDownKey_=null,goog.events.KeyHandler.prototype.keyUpKey_=null,goog.events.KeyHandler.prototype.lastKey_=-1,goog.events.KeyHandler.prototype.keyCode_=-1,goog.events.KeyHandler.prototype.altKey_=!1,goog.events.KeyHandler.EventType={KEY:"key"},goog.events.KeyHandler.safariKey_={3:goog.events.KeyCodes.ENTER,12:goog.events.KeyCodes.NUMLOCK,63232:goog.events.KeyCodes.UP,63233:goog.events.KeyCodes.DOWN,63234:goog.events.KeyCodes.LEFT,63235:goog.events.KeyCodes.RIGHT,63236:goog.events.KeyCodes.F1,63237:goog.events.KeyCodes.F2,63238:goog.events.KeyCodes.F3,63239:goog.events.KeyCodes.F4,63240:goog.events.KeyCodes.F5,63241:goog.events.KeyCodes.F6,63242:goog.events.KeyCodes.F7,63243:goog.events.KeyCodes.F8,63244:goog.events.KeyCodes.F9,63245:goog.events.KeyCodes.F10,63246:goog.events.KeyCodes.F11,63247:goog.events.KeyCodes.F12,63248:goog.events.KeyCodes.PRINT_SCREEN,63272:goog.events.KeyCodes.DELETE,63273:goog.events.KeyCodes.HOME,63275:goog.events.KeyCodes.END,63276:goog.events.KeyCodes.PAGE_UP,63277:goog.events.KeyCodes.PAGE_DOWN,63289:goog.events.KeyCodes.NUMLOCK,63302:goog.events.KeyCodes.INSERT},goog.events.KeyHandler.keyIdentifier_={Up:goog.events.KeyCodes.UP,Down:goog.events.KeyCodes.DOWN,Left:goog.events.KeyCodes.LEFT,Right:goog.events.KeyCodes.RIGHT,Enter:goog.events.KeyCodes.ENTER,F1:goog.events.KeyCodes.F1,F2:goog.events.KeyCodes.F2,F3:goog.events.KeyCodes.F3,F4:goog.events.KeyCodes.F4,F5:goog.events.KeyCodes.F5,F6:goog.events.KeyCodes.F6,F7:goog.events.KeyCodes.F7,F8:goog.events.KeyCodes.F8,F9:goog.events.KeyCodes.F9,F10:goog.events.KeyCodes.F10,F11:goog.events.KeyCodes.F11,F12:goog.events.KeyCodes.F12,"U+007F":goog.events.KeyCodes.DELETE,Home:goog.events.KeyCodes.HOME,End:goog.events.KeyCodes.END,PageUp:goog.events.KeyCodes.PAGE_UP,PageDown:goog.events.KeyCodes.PAGE_DOWN,Insert:goog.events.KeyCodes.INSERT},goog.events.KeyHandler.USES_KEYDOWN_=goog.userAgent.IE||goog.userAgent.EDGE||goog.userAgent.WEBKIT&&goog.userAgent.isVersionOrHigher("525"),goog.events.KeyHandler.SAVE_ALT_FOR_KEYPRESS_=goog.userAgent.MAC&&goog.userAgent.GECKO,goog.events.KeyHandler.prototype.handleKeyDown_=function(e){(goog.userAgent.WEBKIT||goog.userAgent.EDGE)&&(this.lastKey_==goog.events.KeyCodes.CTRL&&!e.ctrlKey||this.lastKey_==goog.events.KeyCodes.ALT&&!e.altKey||goog.userAgent.MAC&&this.lastKey_==goog.events.KeyCodes.META&&!e.metaKey)&&this.resetState(),-1==this.lastKey_&&(e.ctrlKey&&e.keyCode!=goog.events.KeyCodes.CTRL?this.lastKey_=goog.events.KeyCodes.CTRL:e.altKey&&e.keyCode!=goog.events.KeyCodes.ALT?this.lastKey_=goog.events.KeyCodes.ALT:e.metaKey&&e.keyCode!=goog.events.KeyCodes.META&&(this.lastKey_=goog.events.KeyCodes.META)),goog.events.KeyHandler.USES_KEYDOWN_&&!goog.events.KeyCodes.firesKeyPressEvent(e.keyCode,this.lastKey_,e.shiftKey,e.ctrlKey,e.altKey,e.metaKey)?this.handleEvent(e):(this.keyCode_=goog.events.KeyCodes.normalizeKeyCode(e.keyCode),goog.events.KeyHandler.SAVE_ALT_FOR_KEYPRESS_&&(this.altKey_=e.altKey))},goog.events.KeyHandler.prototype.resetState=function(){this.keyCode_=this.lastKey_=-1},goog.events.KeyHandler.prototype.handleKeyup_=function(e){this.resetState(),this.altKey_=e.altKey},goog.events.KeyHandler.prototype.handleEvent=function(e){var o,t,n=e.getBrowserEvent(),r=n.altKey;goog.userAgent.IE&&e.type==goog.events.EventType.KEYPRESS?(o=this.keyCode_,t=o!=goog.events.KeyCodes.ENTER&&o!=goog.events.KeyCodes.ESC?n.keyCode:0):(goog.userAgent.WEBKIT||goog.userAgent.EDGE)&&e.type==goog.events.EventType.KEYPRESS?(o=this.keyCode_,t=0<=n.charCode&&63232>n.charCode&&goog.events.KeyCodes.isCharacterKey(o)?n.charCode:0):goog.userAgent.OPERA&&!goog.userAgent.WEBKIT?(o=this.keyCode_,t=goog.events.KeyCodes.isCharacterKey(o)?n.keyCode:0):(o=n.keyCode||this.keyCode_,t=n.charCode||0,goog.events.KeyHandler.SAVE_ALT_FOR_KEYPRESS_&&(r=this.altKey_),goog.userAgent.MAC&&t==goog.events.KeyCodes.QUESTION_MARK&&o==goog.events.KeyCodes.WIN_KEY&&(o=goog.events.KeyCodes.SLASH));var i=o=goog.events.KeyCodes.normalizeKeyCode(o);o?o>=63232&&o in goog.events.KeyHandler.safariKey_?i=goog.events.KeyHandler.safariKey_[o]:25==o&&e.shiftKey&&(i=9):n.keyIdentifier&&n.keyIdentifier in goog.events.KeyHandler.keyIdentifier_&&(i=goog.events.KeyHandler.keyIdentifier_[n.keyIdentifier]),e=i==this.lastKey_,this.lastKey_=i,n=new goog.events.KeyEvent(i,t,e,n),n.altKey=r,this.dispatchEvent(n)},goog.events.KeyHandler.prototype.getElement=function(){return this.element_},goog.events.KeyHandler.prototype.attach=function(e,o){this.keyUpKey_&&this.detach(),this.element_=e,this.keyPressKey_=goog.events.listen(this.element_,goog.events.EventType.KEYPRESS,this,o),this.keyDownKey_=goog.events.listen(this.element_,goog.events.EventType.KEYDOWN,this.handleKeyDown_,o,this),this.keyUpKey_=goog.events.listen(this.element_,goog.events.EventType.KEYUP,this.handleKeyup_,o,this)},goog.events.KeyHandler.prototype.detach=function(){this.keyPressKey_&&(goog.events.unlistenByKey(this.keyPressKey_),goog.events.unlistenByKey(this.keyDownKey_),goog.events.unlistenByKey(this.keyUpKey_),this.keyUpKey_=this.keyDownKey_=this.keyPressKey_=null),this.element_=null,this.keyCode_=this.lastKey_=-1},goog.events.KeyHandler.prototype.disposeInternal=function(){goog.events.KeyHandler.superClass_.disposeInternal.call(this),this.detach()},goog.events.KeyEvent=function(e,o,t,n){goog.events.BrowserEvent.call(this,n),this.type=goog.events.KeyHandler.EventType.KEY,this.keyCode=e,this.charCode=o,this.repeat=t},goog.inherits(goog.events.KeyEvent,goog.events.BrowserEvent),goog.dom.classlist={},goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST=!1,goog.dom.classlist.get=function(e){return goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST||e.classList?e.classList:(e=e.className,goog.isString(e)&&e.match(/\S+/g)||[])},goog.dom.classlist.set=function(e,o){e.className=o},goog.dom.classlist.contains=function(e,o){return goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST||e.classList?e.classList.contains(o):goog.array.contains(goog.dom.classlist.get(e),o)},goog.dom.classlist.add=function(e,o){goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST||e.classList?e.classList.add(o):goog.dom.classlist.contains(e,o)||(e.className+=0<e.className.length?" "+o:o)},goog.dom.classlist.addAll=function(e,o){if(goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST||e.classList)goog.array.forEach(o,function(o){goog.dom.classlist.add(e,o)});else{var t={};goog.array.forEach(goog.dom.classlist.get(e),function(e){t[e]=!0}),goog.array.forEach(o,function(e){t[e]=!0}),e.className="";for(var n in t)e.className+=0<e.className.length?" "+n:n}},goog.dom.classlist.remove=function(e,o){goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST||e.classList?e.classList.remove(o):goog.dom.classlist.contains(e,o)&&(e.className=goog.array.filter(goog.dom.classlist.get(e),function(e){return e!=o}).join(" "))},goog.dom.classlist.removeAll=function(e,o){goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST||e.classList?goog.array.forEach(o,function(o){goog.dom.classlist.remove(e,o)}):e.className=goog.array.filter(goog.dom.classlist.get(e),function(e){return!goog.array.contains(o,e)}).join(" ")},goog.dom.classlist.enable=function(e,o,t){t?goog.dom.classlist.add(e,o):goog.dom.classlist.remove(e,o)},goog.dom.classlist.enableAll=function(e,o,t){(t?goog.dom.classlist.addAll:goog.dom.classlist.removeAll)(e,o)},goog.dom.classlist.swap=function(e,o,t){return goog.dom.classlist.contains(e,o)?(goog.dom.classlist.remove(e,o),goog.dom.classlist.add(e,t),!0):!1},goog.dom.classlist.toggle=function(e,o){var t=!goog.dom.classlist.contains(e,o);return goog.dom.classlist.enable(e,o,t),t},goog.dom.classlist.addRemove=function(e,o,t){goog.dom.classlist.remove(e,o),goog.dom.classlist.add(e,t)},goog.ui.registry={},goog.ui.registry.getDefaultRenderer=function(e){for(var o;e&&(o=goog.getUid(e),!(o=goog.ui.registry.defaultRenderers_[o]));)e=e.superClass_?e.superClass_.constructor:null;return o?goog.isFunction(o.getInstance)?o.getInstance():new o:null},goog.ui.registry.setDefaultRenderer=function(e,o){if(!goog.isFunction(e))throw Error("Invalid component class "+e);if(!goog.isFunction(o))throw Error("Invalid renderer class "+o);var t=goog.getUid(e);goog.ui.registry.defaultRenderers_[t]=o},goog.ui.registry.getDecoratorByClassName=function(e){return e in goog.ui.registry.decoratorFunctions_?goog.ui.registry.decoratorFunctions_[e]():null},goog.ui.registry.setDecoratorByClassName=function(e,o){if(!e)throw Error("Invalid class name "+e);if(!goog.isFunction(o))throw Error("Invalid decorator function "+o);goog.ui.registry.decoratorFunctions_[e]=o},goog.ui.registry.getDecorator=function(e){goog.asserts.assert(e);for(var o=goog.dom.classlist.get(e),t=0,n=o.length;n>t;t++)if(e=goog.ui.registry.getDecoratorByClassName(o[t]))return e;return null},goog.ui.registry.reset=function(){goog.ui.registry.defaultRenderers_={},goog.ui.registry.decoratorFunctions_={}},goog.ui.registry.defaultRenderers_={},goog.ui.registry.decoratorFunctions_={},goog.ui.ContainerRenderer=function(e){this.ariaRole_=e},goog.addSingletonGetter(goog.ui.ContainerRenderer),goog.ui.ContainerRenderer.getCustomRenderer=function(e,o){var t=new e;return t.getCssClass=function(){return o},t},goog.ui.ContainerRenderer.CSS_CLASS="goog-container",goog.ui.ContainerRenderer.prototype.getAriaRole=function(){return this.ariaRole_},goog.ui.ContainerRenderer.prototype.enableTabIndex=function(e,o){e&&(e.tabIndex=o?0:-1)},goog.ui.ContainerRenderer.prototype.createDom=function(e){return e.getDomHelper().createDom("DIV",this.getClassNames(e).join(" "))},goog.ui.ContainerRenderer.prototype.getContentElement=function(e){return e},goog.ui.ContainerRenderer.prototype.canDecorate=function(e){return"DIV"==e.tagName},goog.ui.ContainerRenderer.prototype.decorate=function(e,o){o.id&&e.setId(o.id);var t=this.getCssClass(),n=!1,r=goog.dom.classlist.get(o);return r&&goog.array.forEach(r,function(o){o==t?n=!0:o&&this.setStateFromClassName(e,o,t)},this),n||goog.dom.classlist.add(o,t),this.decorateChildren(e,this.getContentElement(o)),o},goog.ui.ContainerRenderer.prototype.setStateFromClassName=function(e,o,t){o==t+"-disabled"?e.setEnabled(!1):o==t+"-horizontal"?e.setOrientation(goog.ui.Container.Orientation.HORIZONTAL):o==t+"-vertical"&&e.setOrientation(goog.ui.Container.Orientation.VERTICAL)},goog.ui.ContainerRenderer.prototype.decorateChildren=function(e,o,t){if(o){t=t||o.firstChild;for(var n;t&&t.parentNode==o;){if(n=t.nextSibling,t.nodeType==goog.dom.NodeType.ELEMENT){var r=this.getDecoratorForChild(t);r&&(r.setElementInternal(t),e.isEnabled()||r.setEnabled(!1),e.addChild(r),r.decorate(t))}else t.nodeValue&&""!=goog.string.trim(t.nodeValue)||o.removeChild(t);t=n}}},goog.ui.ContainerRenderer.prototype.getDecoratorForChild=function(e){return goog.ui.registry.getDecorator(e)},goog.ui.ContainerRenderer.prototype.initializeDom=function(e){e=e.getElement(),goog.asserts.assert(e,"The container DOM element cannot be null."),goog.style.setUnselectable(e,!0,goog.userAgent.GECKO),goog.userAgent.IE&&(e.hideFocus=!0);var o=this.getAriaRole();o&&goog.a11y.aria.setRole(e,o)},goog.ui.ContainerRenderer.prototype.getKeyEventTarget=function(e){return e.getElement()},goog.ui.ContainerRenderer.prototype.getCssClass=function(){return goog.ui.ContainerRenderer.CSS_CLASS},goog.ui.ContainerRenderer.prototype.getClassNames=function(e){var o=this.getCssClass(),t=e.getOrientation()==goog.ui.Container.Orientation.HORIZONTAL,t=[o,t?o+"-horizontal":o+"-vertical"];return e.isEnabled()||t.push(o+"-disabled"),t},goog.ui.ContainerRenderer.prototype.getDefaultOrientation=function(){return goog.ui.Container.Orientation.VERTICAL},goog.ui.ControlRenderer=function(){},goog.addSingletonGetter(goog.ui.ControlRenderer),goog.tagUnsealableClass(goog.ui.ControlRenderer),goog.ui.ControlRenderer.getCustomRenderer=function(e,o){var t=new e;return t.getCssClass=function(){return o},t},goog.ui.ControlRenderer.CSS_CLASS="goog-control",goog.ui.ControlRenderer.IE6_CLASS_COMBINATIONS=[],goog.ui.ControlRenderer.TOGGLE_ARIA_STATE_MAP_=goog.object.create(goog.a11y.aria.Role.BUTTON,goog.a11y.aria.State.PRESSED,goog.a11y.aria.Role.CHECKBOX,goog.a11y.aria.State.CHECKED,goog.a11y.aria.Role.MENU_ITEM,goog.a11y.aria.State.SELECTED,goog.a11y.aria.Role.MENU_ITEM_CHECKBOX,goog.a11y.aria.State.CHECKED,goog.a11y.aria.Role.MENU_ITEM_RADIO,goog.a11y.aria.State.CHECKED,goog.a11y.aria.Role.RADIO,goog.a11y.aria.State.CHECKED,goog.a11y.aria.Role.TAB,goog.a11y.aria.State.SELECTED,goog.a11y.aria.Role.TREEITEM,goog.a11y.aria.State.SELECTED),goog.ui.ControlRenderer.prototype.getAriaRole=function(){},goog.ui.ControlRenderer.prototype.createDom=function(e){return e.getDomHelper().createDom("DIV",this.getClassNames(e).join(" "),e.getContent())},goog.ui.ControlRenderer.prototype.getContentElement=function(e){return e},goog.ui.ControlRenderer.prototype.enableClassName=function(e,o,t){if(e=e.getElement?e.getElement():e){var n=[o];goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("7")&&(n=this.getAppliedCombinedClassNames_(goog.dom.classlist.get(e),o),n.push(o)),goog.dom.classlist.enableAll(e,n,t)}},goog.ui.ControlRenderer.prototype.enableExtraClassName=function(e,o,t){this.enableClassName(e,o,t)},goog.ui.ControlRenderer.prototype.canDecorate=function(e){return!0},goog.ui.ControlRenderer.prototype.decorate=function(e,o){o.id&&e.setId(o.id);var t=this.getContentElement(o);t&&t.firstChild?e.setContentInternal(t.firstChild.nextSibling?goog.array.clone(t.childNodes):t.firstChild):e.setContentInternal(null);var n=0,r=this.getCssClass(),i=this.getStructuralCssClass(),s=!1,l=!1,g=!1,a=goog.array.toArray(goog.dom.classlist.get(o));goog.array.forEach(a,function(e){s||e!=r?l||e!=i?n|=this.getStateFromClass(e):l=!0:(s=!0,i==r&&(l=!0)),this.getStateFromClass(e)==goog.ui.Component.State.DISABLED&&(goog.asserts.assertElement(t),goog.dom.isFocusableTabIndex(t)&&goog.dom.setFocusableTabIndex(t,!1))},this),e.setStateInternal(n),s||(a.push(r),i==r&&(l=!0)),l||a.push(i);var c=e.getExtraClassNames();if(c&&a.push.apply(a,c),goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("7")){var u=this.getAppliedCombinedClassNames_(a);0<u.length&&(a.push.apply(a,u),g=!0)}return s&&l&&!c&&!g||goog.dom.classlist.set(o,a.join(" ")),o},goog.ui.ControlRenderer.prototype.initializeDom=function(e){e.isRightToLeft()&&this.setRightToLeft(e.getElement(),!0),e.isEnabled()&&this.setFocusable(e,e.isVisible())},goog.ui.ControlRenderer.prototype.setAriaRole=function(e,o){var t=o||this.getAriaRole();if(t){goog.asserts.assert(e,"The element passed as a first parameter cannot be null.");var n=goog.a11y.aria.getRole(e);t!=n&&goog.a11y.aria.setRole(e,t)}},goog.ui.ControlRenderer.prototype.setAriaStates=function(e,o){goog.asserts.assert(e),goog.asserts.assert(o);var t=e.getAriaLabel();goog.isDefAndNotNull(t)&&this.setAriaLabel(o,t),e.isVisible()||goog.a11y.aria.setState(o,goog.a11y.aria.State.HIDDEN,!e.isVisible()),e.isEnabled()||this.updateAriaState(o,goog.ui.Component.State.DISABLED,!e.isEnabled()),e.isSupportedState(goog.ui.Component.State.SELECTED)&&this.updateAriaState(o,goog.ui.Component.State.SELECTED,e.isSelected()),
+e.isSupportedState(goog.ui.Component.State.CHECKED)&&this.updateAriaState(o,goog.ui.Component.State.CHECKED,e.isChecked()),e.isSupportedState(goog.ui.Component.State.OPENED)&&this.updateAriaState(o,goog.ui.Component.State.OPENED,e.isOpen())},goog.ui.ControlRenderer.prototype.setAriaLabel=function(e,o){goog.a11y.aria.setLabel(e,o)},goog.ui.ControlRenderer.prototype.setAllowTextSelection=function(e,o){goog.style.setUnselectable(e,!o,!goog.userAgent.IE&&!goog.userAgent.OPERA)},goog.ui.ControlRenderer.prototype.setRightToLeft=function(e,o){this.enableClassName(e,this.getStructuralCssClass()+"-rtl",o)},goog.ui.ControlRenderer.prototype.isFocusable=function(e){var o;return e.isSupportedState(goog.ui.Component.State.FOCUSED)&&(o=e.getKeyEventTarget())?goog.dom.isFocusableTabIndex(o):!1},goog.ui.ControlRenderer.prototype.setFocusable=function(e,o){var t;if(e.isSupportedState(goog.ui.Component.State.FOCUSED)&&(t=e.getKeyEventTarget())){if(!o&&e.isFocused()){try{t.blur()}catch(n){}e.isFocused()&&e.handleBlur(null)}goog.dom.isFocusableTabIndex(t)!=o&&goog.dom.setFocusableTabIndex(t,o)}},goog.ui.ControlRenderer.prototype.setVisible=function(e,o){goog.style.setElementShown(e,o),e&&goog.a11y.aria.setState(e,goog.a11y.aria.State.HIDDEN,!o)},goog.ui.ControlRenderer.prototype.setState=function(e,o,t){var n=e.getElement();if(n){var r=this.getClassForState(o);r&&this.enableClassName(e,r,t),this.updateAriaState(n,o,t)}},goog.ui.ControlRenderer.prototype.updateAriaState=function(e,o,t){goog.ui.ControlRenderer.ariaAttributeMap_||(goog.ui.ControlRenderer.ariaAttributeMap_=goog.object.create(goog.ui.Component.State.DISABLED,goog.a11y.aria.State.DISABLED,goog.ui.Component.State.SELECTED,goog.a11y.aria.State.SELECTED,goog.ui.Component.State.CHECKED,goog.a11y.aria.State.CHECKED,goog.ui.Component.State.OPENED,goog.a11y.aria.State.EXPANDED)),goog.asserts.assert(e,"The element passed as a first parameter cannot be null."),(o=goog.ui.ControlRenderer.getAriaStateForAriaRole_(e,goog.ui.ControlRenderer.ariaAttributeMap_[o]))&&goog.a11y.aria.setState(e,o,t)},goog.ui.ControlRenderer.getAriaStateForAriaRole_=function(e,o){var t=goog.a11y.aria.getRole(e);return t?(t=goog.ui.ControlRenderer.TOGGLE_ARIA_STATE_MAP_[t]||o,goog.ui.ControlRenderer.isAriaState_(o)?t:o):o},goog.ui.ControlRenderer.isAriaState_=function(e){return e==goog.a11y.aria.State.CHECKED||e==goog.a11y.aria.State.SELECTED},goog.ui.ControlRenderer.prototype.setContent=function(e,o){var t=this.getContentElement(e);if(t&&(goog.dom.removeChildren(t),o))if(goog.isString(o))goog.dom.setTextContent(t,o);else{var n=function(e){if(e){var o=goog.dom.getOwnerDocument(t);t.appendChild(goog.isString(e)?o.createTextNode(e):e)}};goog.isArray(o)?goog.array.forEach(o,n):!goog.isArrayLike(o)||"nodeType"in o?n(o):goog.array.forEach(goog.array.clone(o),n)}},goog.ui.ControlRenderer.prototype.getKeyEventTarget=function(e){return e.getElement()},goog.ui.ControlRenderer.prototype.getCssClass=function(){return goog.ui.ControlRenderer.CSS_CLASS},goog.ui.ControlRenderer.prototype.getIe6ClassCombinations=function(){return[]},goog.ui.ControlRenderer.prototype.getStructuralCssClass=function(){return this.getCssClass()},goog.ui.ControlRenderer.prototype.getClassNames=function(e){var o=this.getCssClass(),t=[o],n=this.getStructuralCssClass();return n!=o&&t.push(n),o=this.getClassNamesForState(e.getState()),t.push.apply(t,o),(e=e.getExtraClassNames())&&t.push.apply(t,e),goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("7")&&t.push.apply(t,this.getAppliedCombinedClassNames_(t)),t},goog.ui.ControlRenderer.prototype.getAppliedCombinedClassNames_=function(e,o){var t=[];return o&&(e=goog.array.concat(e,[o])),goog.array.forEach(this.getIe6ClassCombinations(),function(n){!goog.array.every(n,goog.partial(goog.array.contains,e))||o&&!goog.array.contains(n,o)||t.push(n.join("_"))}),t},goog.ui.ControlRenderer.prototype.getClassNamesForState=function(e){for(var o=[];e;){var t=e&-e;o.push(this.getClassForState(t)),e&=~t}return o},goog.ui.ControlRenderer.prototype.getClassForState=function(e){return this.classByState_||this.createClassByStateMap_(),this.classByState_[e]},goog.ui.ControlRenderer.prototype.getStateFromClass=function(e){return this.stateByClass_||this.createStateByClassMap_(),e=parseInt(this.stateByClass_[e],10),isNaN(e)?0:e},goog.ui.ControlRenderer.prototype.createClassByStateMap_=function(){var e=this.getStructuralCssClass(),o=!goog.string.contains(goog.string.normalizeWhitespace(e)," ");goog.asserts.assert(o,"ControlRenderer has an invalid css class: '"+e+"'"),this.classByState_=goog.object.create(goog.ui.Component.State.DISABLED,e+"-disabled",goog.ui.Component.State.HOVER,e+"-hover",goog.ui.Component.State.ACTIVE,e+"-active",goog.ui.Component.State.SELECTED,e+"-selected",goog.ui.Component.State.CHECKED,e+"-checked",goog.ui.Component.State.FOCUSED,e+"-focused",goog.ui.Component.State.OPENED,e+"-open")},goog.ui.ControlRenderer.prototype.createStateByClassMap_=function(){this.classByState_||this.createClassByStateMap_(),this.stateByClass_=goog.object.transpose(this.classByState_)},goog.ui.Control=function(e,o,t){goog.ui.Component.call(this,t),this.renderer_=o||goog.ui.registry.getDefaultRenderer(this.constructor),this.setContentInternal(goog.isDef(e)?e:null),this.ariaLabel_=null},goog.inherits(goog.ui.Control,goog.ui.Component),goog.tagUnsealableClass(goog.ui.Control),goog.ui.Control.registerDecorator=goog.ui.registry.setDecoratorByClassName,goog.ui.Control.getDecorator=goog.ui.registry.getDecorator,goog.ui.Control.prototype.content_=null,goog.ui.Control.prototype.state_=0,goog.ui.Control.prototype.supportedStates_=goog.ui.Component.State.DISABLED|goog.ui.Component.State.HOVER|goog.ui.Component.State.ACTIVE|goog.ui.Component.State.FOCUSED,goog.ui.Control.prototype.autoStates_=goog.ui.Component.State.ALL,goog.ui.Control.prototype.statesWithTransitionEvents_=0,goog.ui.Control.prototype.visible_=!0,goog.ui.Control.prototype.extraClassNames_=null,goog.ui.Control.prototype.handleMouseEvents_=!0,goog.ui.Control.prototype.allowTextSelection_=!1,goog.ui.Control.prototype.preferredAriaRole_=null,goog.ui.Control.prototype.isHandleMouseEvents=function(){return this.handleMouseEvents_},goog.ui.Control.prototype.setHandleMouseEvents=function(e){this.isInDocument()&&e!=this.handleMouseEvents_&&this.enableMouseEventHandling_(e),this.handleMouseEvents_=e},goog.ui.Control.prototype.getKeyEventTarget=function(){return this.renderer_.getKeyEventTarget(this)},goog.ui.Control.prototype.getKeyHandler=function(){return this.keyHandler_||(this.keyHandler_=new goog.events.KeyHandler)},goog.ui.Control.prototype.getRenderer=function(){return this.renderer_},goog.ui.Control.prototype.setRenderer=function(e){if(this.isInDocument())throw Error(goog.ui.Component.Error.ALREADY_RENDERED);this.getElement()&&this.setElementInternal(null),this.renderer_=e},goog.ui.Control.prototype.getExtraClassNames=function(){return this.extraClassNames_},goog.ui.Control.prototype.addClassName=function(e){e&&(this.extraClassNames_?goog.array.contains(this.extraClassNames_,e)||this.extraClassNames_.push(e):this.extraClassNames_=[e],this.renderer_.enableExtraClassName(this,e,!0))},goog.ui.Control.prototype.removeClassName=function(e){e&&this.extraClassNames_&&goog.array.remove(this.extraClassNames_,e)&&(0==this.extraClassNames_.length&&(this.extraClassNames_=null),this.renderer_.enableExtraClassName(this,e,!1))},goog.ui.Control.prototype.enableClassName=function(e,o){o?this.addClassName(e):this.removeClassName(e)},goog.ui.Control.prototype.createDom=function(){var e=this.renderer_.createDom(this);this.setElementInternal(e),this.renderer_.setAriaRole(e,this.getPreferredAriaRole()),this.isAllowTextSelection()||this.renderer_.setAllowTextSelection(e,!1),this.isVisible()||this.renderer_.setVisible(e,!1)},goog.ui.Control.prototype.getPreferredAriaRole=function(){return this.preferredAriaRole_},goog.ui.Control.prototype.setPreferredAriaRole=function(e){this.preferredAriaRole_=e},goog.ui.Control.prototype.getAriaLabel=function(){return this.ariaLabel_},goog.ui.Control.prototype.setAriaLabel=function(e){this.ariaLabel_=e;var o=this.getElement();o&&this.renderer_.setAriaLabel(o,e)},goog.ui.Control.prototype.getContentElement=function(){return this.renderer_.getContentElement(this.getElement())},goog.ui.Control.prototype.canDecorate=function(e){return this.renderer_.canDecorate(e)},goog.ui.Control.prototype.decorateInternal=function(e){e=this.renderer_.decorate(this,e),this.setElementInternal(e),this.renderer_.setAriaRole(e,this.getPreferredAriaRole()),this.isAllowTextSelection()||this.renderer_.setAllowTextSelection(e,!1),this.visible_="none"!=e.style.display},goog.ui.Control.prototype.enterDocument=function(){if(goog.ui.Control.superClass_.enterDocument.call(this),this.renderer_.setAriaStates(this,this.getElementStrict()),this.renderer_.initializeDom(this),this.supportedStates_&~goog.ui.Component.State.DISABLED&&(this.isHandleMouseEvents()&&this.enableMouseEventHandling_(!0),this.isSupportedState(goog.ui.Component.State.FOCUSED))){var e=this.getKeyEventTarget();if(e){var o=this.getKeyHandler();o.attach(e),this.getHandler().listen(o,goog.events.KeyHandler.EventType.KEY,this.handleKeyEvent).listen(e,goog.events.EventType.FOCUS,this.handleFocus).listen(e,goog.events.EventType.BLUR,this.handleBlur)}}},goog.ui.Control.prototype.enableMouseEventHandling_=function(e){var o=this.getHandler(),t=this.getElement();e?(o.listen(t,goog.events.EventType.MOUSEOVER,this.handleMouseOver).listen(t,goog.events.EventType.MOUSEDOWN,this.handleMouseDown).listen(t,goog.events.EventType.MOUSEUP,this.handleMouseUp).listen(t,goog.events.EventType.MOUSEOUT,this.handleMouseOut),this.handleContextMenu!=goog.nullFunction&&o.listen(t,goog.events.EventType.CONTEXTMENU,this.handleContextMenu),goog.userAgent.IE&&(goog.userAgent.isVersionOrHigher(9)||o.listen(t,goog.events.EventType.DBLCLICK,this.handleDblClick),this.ieMouseEventSequenceSimulator_||(this.ieMouseEventSequenceSimulator_=new goog.ui.Control.IeMouseEventSequenceSimulator_(this),this.registerDisposable(this.ieMouseEventSequenceSimulator_)))):(o.unlisten(t,goog.events.EventType.MOUSEOVER,this.handleMouseOver).unlisten(t,goog.events.EventType.MOUSEDOWN,this.handleMouseDown).unlisten(t,goog.events.EventType.MOUSEUP,this.handleMouseUp).unlisten(t,goog.events.EventType.MOUSEOUT,this.handleMouseOut),this.handleContextMenu!=goog.nullFunction&&o.unlisten(t,goog.events.EventType.CONTEXTMENU,this.handleContextMenu),goog.userAgent.IE&&(goog.userAgent.isVersionOrHigher(9)||o.unlisten(t,goog.events.EventType.DBLCLICK,this.handleDblClick),goog.dispose(this.ieMouseEventSequenceSimulator_),this.ieMouseEventSequenceSimulator_=null))},goog.ui.Control.prototype.exitDocument=function(){goog.ui.Control.superClass_.exitDocument.call(this),this.keyHandler_&&this.keyHandler_.detach(),this.isVisible()&&this.isEnabled()&&this.renderer_.setFocusable(this,!1)},goog.ui.Control.prototype.disposeInternal=function(){goog.ui.Control.superClass_.disposeInternal.call(this),this.keyHandler_&&(this.keyHandler_.dispose(),delete this.keyHandler_),delete this.renderer_,this.ieMouseEventSequenceSimulator_=this.extraClassNames_=this.content_=null},goog.ui.Control.prototype.getContent=function(){return this.content_},goog.ui.Control.prototype.setContent=function(e){this.renderer_.setContent(this.getElement(),e),this.setContentInternal(e)},goog.ui.Control.prototype.setContentInternal=function(e){this.content_=e},goog.ui.Control.prototype.getCaption=function(){var e=this.getContent();return e?(e=goog.isString(e)?e:goog.isArray(e)?goog.array.map(e,goog.dom.getRawTextContent).join(""):goog.dom.getTextContent(e),goog.string.collapseBreakingSpaces(e)):""},goog.ui.Control.prototype.setCaption=function(e){this.setContent(e)},goog.ui.Control.prototype.setRightToLeft=function(e){goog.ui.Control.superClass_.setRightToLeft.call(this,e);var o=this.getElement();o&&this.renderer_.setRightToLeft(o,e)},goog.ui.Control.prototype.isAllowTextSelection=function(){return this.allowTextSelection_},goog.ui.Control.prototype.setAllowTextSelection=function(e){this.allowTextSelection_=e;var o=this.getElement();o&&this.renderer_.setAllowTextSelection(o,e)},goog.ui.Control.prototype.isVisible=function(){return this.visible_},goog.ui.Control.prototype.setVisible=function(e,o){if(o||this.visible_!=e&&this.dispatchEvent(e?goog.ui.Component.EventType.SHOW:goog.ui.Component.EventType.HIDE)){var t=this.getElement();return t&&this.renderer_.setVisible(t,e),this.isEnabled()&&this.renderer_.setFocusable(this,e),this.visible_=e,!0}return!1},goog.ui.Control.prototype.isEnabled=function(){return!this.hasState(goog.ui.Component.State.DISABLED)},goog.ui.Control.prototype.isParentDisabled_=function(){var e=this.getParent();return!!e&&"function"==typeof e.isEnabled&&!e.isEnabled()},goog.ui.Control.prototype.setEnabled=function(e){!this.isParentDisabled_()&&this.isTransitionAllowed(goog.ui.Component.State.DISABLED,!e)&&(e||(this.setActive(!1),this.setHighlighted(!1)),this.isVisible()&&this.renderer_.setFocusable(this,e),this.setState(goog.ui.Component.State.DISABLED,!e,!0))},goog.ui.Control.prototype.isHighlighted=function(){return this.hasState(goog.ui.Component.State.HOVER)},goog.ui.Control.prototype.setHighlighted=function(e){this.isTransitionAllowed(goog.ui.Component.State.HOVER,e)&&this.setState(goog.ui.Component.State.HOVER,e)},goog.ui.Control.prototype.isActive=function(){return this.hasState(goog.ui.Component.State.ACTIVE)},goog.ui.Control.prototype.setActive=function(e){this.isTransitionAllowed(goog.ui.Component.State.ACTIVE,e)&&this.setState(goog.ui.Component.State.ACTIVE,e)},goog.ui.Control.prototype.isSelected=function(){return this.hasState(goog.ui.Component.State.SELECTED)},goog.ui.Control.prototype.setSelected=function(e){this.isTransitionAllowed(goog.ui.Component.State.SELECTED,e)&&this.setState(goog.ui.Component.State.SELECTED,e)},goog.ui.Control.prototype.isChecked=function(){return this.hasState(goog.ui.Component.State.CHECKED)},goog.ui.Control.prototype.setChecked=function(e){this.isTransitionAllowed(goog.ui.Component.State.CHECKED,e)&&this.setState(goog.ui.Component.State.CHECKED,e)},goog.ui.Control.prototype.isFocused=function(){return this.hasState(goog.ui.Component.State.FOCUSED)},goog.ui.Control.prototype.setFocused=function(e){this.isTransitionAllowed(goog.ui.Component.State.FOCUSED,e)&&this.setState(goog.ui.Component.State.FOCUSED,e)},goog.ui.Control.prototype.isOpen=function(){return this.hasState(goog.ui.Component.State.OPENED)},goog.ui.Control.prototype.setOpen=function(e){this.isTransitionAllowed(goog.ui.Component.State.OPENED,e)&&this.setState(goog.ui.Component.State.OPENED,e)},goog.ui.Control.prototype.getState=function(){return this.state_},goog.ui.Control.prototype.hasState=function(e){return!!(this.state_&e)},goog.ui.Control.prototype.setState=function(e,o,t){t||e!=goog.ui.Component.State.DISABLED?this.isSupportedState(e)&&o!=this.hasState(e)&&(this.renderer_.setState(this,e,o),this.state_=o?this.state_|e:this.state_&~e):this.setEnabled(!o)},goog.ui.Control.prototype.setStateInternal=function(e){this.state_=e},goog.ui.Control.prototype.isSupportedState=function(e){return!!(this.supportedStates_&e)},goog.ui.Control.prototype.setSupportedState=function(e,o){if(this.isInDocument()&&this.hasState(e)&&!o)throw Error(goog.ui.Component.Error.ALREADY_RENDERED);!o&&this.hasState(e)&&this.setState(e,!1),this.supportedStates_=o?this.supportedStates_|e:this.supportedStates_&~e},goog.ui.Control.prototype.isAutoState=function(e){return!!(this.autoStates_&e)&&this.isSupportedState(e)},goog.ui.Control.prototype.setAutoStates=function(e,o){this.autoStates_=o?this.autoStates_|e:this.autoStates_&~e},goog.ui.Control.prototype.isDispatchTransitionEvents=function(e){return!!(this.statesWithTransitionEvents_&e)&&this.isSupportedState(e)},goog.ui.Control.prototype.setDispatchTransitionEvents=function(e,o){this.statesWithTransitionEvents_=o?this.statesWithTransitionEvents_|e:this.statesWithTransitionEvents_&~e},goog.ui.Control.prototype.isTransitionAllowed=function(e,o){return this.isSupportedState(e)&&this.hasState(e)!=o&&(!(this.statesWithTransitionEvents_&e)||this.dispatchEvent(goog.ui.Component.getStateTransitionEvent(e,o)))&&!this.isDisposed()},goog.ui.Control.prototype.handleMouseOver=function(e){!goog.ui.Control.isMouseEventWithinElement_(e,this.getElement())&&this.dispatchEvent(goog.ui.Component.EventType.ENTER)&&this.isEnabled()&&this.isAutoState(goog.ui.Component.State.HOVER)&&this.setHighlighted(!0)},goog.ui.Control.prototype.handleMouseOut=function(e){!goog.ui.Control.isMouseEventWithinElement_(e,this.getElement())&&this.dispatchEvent(goog.ui.Component.EventType.LEAVE)&&(this.isAutoState(goog.ui.Component.State.ACTIVE)&&this.setActive(!1),this.isAutoState(goog.ui.Component.State.HOVER)&&this.setHighlighted(!1))},goog.ui.Control.prototype.handleContextMenu=goog.nullFunction,goog.ui.Control.isMouseEventWithinElement_=function(e,o){return!!e.relatedTarget&&goog.dom.contains(o,e.relatedTarget)},goog.ui.Control.prototype.handleMouseDown=function(e){this.isEnabled()&&(this.isAutoState(goog.ui.Component.State.HOVER)&&this.setHighlighted(!0),e.isMouseActionButton()&&(this.isAutoState(goog.ui.Component.State.ACTIVE)&&this.setActive(!0),this.renderer_&&this.renderer_.isFocusable(this)&&this.getKeyEventTarget().focus())),!this.isAllowTextSelection()&&e.isMouseActionButton()&&e.preventDefault()},goog.ui.Control.prototype.handleMouseUp=function(e){this.isEnabled()&&(this.isAutoState(goog.ui.Component.State.HOVER)&&this.setHighlighted(!0),this.isActive()&&this.performActionInternal(e)&&this.isAutoState(goog.ui.Component.State.ACTIVE)&&this.setActive(!1))},goog.ui.Control.prototype.handleDblClick=function(e){this.isEnabled()&&this.performActionInternal(e)},goog.ui.Control.prototype.performActionInternal=function(e){this.isAutoState(goog.ui.Component.State.CHECKED)&&this.setChecked(!this.isChecked()),this.isAutoState(goog.ui.Component.State.SELECTED)&&this.setSelected(!0),this.isAutoState(goog.ui.Component.State.OPENED)&&this.setOpen(!this.isOpen());var o=new goog.events.Event(goog.ui.Component.EventType.ACTION,this);return e&&(o.altKey=e.altKey,o.ctrlKey=e.ctrlKey,o.metaKey=e.metaKey,o.shiftKey=e.shiftKey,o.platformModifierKey=e.platformModifierKey),this.dispatchEvent(o)},goog.ui.Control.prototype.handleFocus=function(e){this.isAutoState(goog.ui.Component.State.FOCUSED)&&this.setFocused(!0)},goog.ui.Control.prototype.handleBlur=function(e){this.isAutoState(goog.ui.Component.State.ACTIVE)&&this.setActive(!1),this.isAutoState(goog.ui.Component.State.FOCUSED)&&this.setFocused(!1)},goog.ui.Control.prototype.handleKeyEvent=function(e){return this.isVisible()&&this.isEnabled()&&this.handleKeyEventInternal(e)?(e.preventDefault(),e.stopPropagation(),!0):!1},goog.ui.Control.prototype.handleKeyEventInternal=function(e){return e.keyCode==goog.events.KeyCodes.ENTER&&this.performActionInternal(e)},goog.ui.registry.setDefaultRenderer(goog.ui.Control,goog.ui.ControlRenderer),goog.ui.registry.setDecoratorByClassName(goog.ui.ControlRenderer.CSS_CLASS,function(){return new goog.ui.Control(null)}),goog.ui.Control.IeMouseEventSequenceSimulator_=function(e){goog.Disposable.call(this),this.control_=e,this.clickExpected_=!1,this.handler_=new goog.events.EventHandler(this),this.registerDisposable(this.handler_),e=this.control_.getElementStrict(),this.handler_.listen(e,goog.events.EventType.MOUSEDOWN,this.handleMouseDown_).listen(e,goog.events.EventType.MOUSEUP,this.handleMouseUp_).listen(e,goog.events.EventType.CLICK,this.handleClick_)},goog.inherits(goog.ui.Control.IeMouseEventSequenceSimulator_,goog.Disposable),goog.ui.Control.IeMouseEventSequenceSimulator_.SYNTHETIC_EVENTS_=!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9),goog.ui.Control.IeMouseEventSequenceSimulator_.prototype.handleMouseDown_=function(){this.clickExpected_=!1},goog.ui.Control.IeMouseEventSequenceSimulator_.prototype.handleMouseUp_=function(){this.clickExpected_=!0},goog.ui.Control.IeMouseEventSequenceSimulator_.makeLeftMouseEvent_=function(e,o){if(!goog.ui.Control.IeMouseEventSequenceSimulator_.SYNTHETIC_EVENTS_)return e.button=goog.events.BrowserEvent.MouseButton.LEFT,e.type=o,e;var t=document.createEvent("MouseEvents");return t.initMouseEvent(o,e.bubbles,e.cancelable,e.view||null,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,goog.events.BrowserEvent.MouseButton.LEFT,e.relatedTarget||null),t},goog.ui.Control.IeMouseEventSequenceSimulator_.prototype.handleClick_=function(e){if(this.clickExpected_)this.clickExpected_=!1;else{var o=e.getBrowserEvent(),t=o.button,n=o.type,r=goog.ui.Control.IeMouseEventSequenceSimulator_.makeLeftMouseEvent_(o,goog.events.EventType.MOUSEDOWN);this.control_.handleMouseDown(new goog.events.BrowserEvent(r,e.currentTarget)),r=goog.ui.Control.IeMouseEventSequenceSimulator_.makeLeftMouseEvent_(o,goog.events.EventType.MOUSEUP),this.control_.handleMouseUp(new goog.events.BrowserEvent(r,e.currentTarget)),goog.ui.Control.IeMouseEventSequenceSimulator_.SYNTHETIC_EVENTS_||(o.button=t,o.type=n)}},goog.ui.Control.IeMouseEventSequenceSimulator_.prototype.disposeInternal=function(){this.control_=null,goog.ui.Control.IeMouseEventSequenceSimulator_.superClass_.disposeInternal.call(this)},goog.ui.Container=function(e,o,t){goog.ui.Component.call(this,t),this.renderer_=o||goog.ui.ContainerRenderer.getInstance(),this.orientation_=e||this.renderer_.getDefaultOrientation()},goog.inherits(goog.ui.Container,goog.ui.Component),goog.tagUnsealableClass(goog.ui.Container),goog.ui.Container.EventType={AFTER_SHOW:"aftershow",AFTER_HIDE:"afterhide"},goog.ui.Container.Orientation={HORIZONTAL:"horizontal",VERTICAL:"vertical"},goog.ui.Container.prototype.keyEventTarget_=null,goog.ui.Container.prototype.keyHandler_=null,goog.ui.Container.prototype.renderer_=null,goog.ui.Container.prototype.orientation_=null,goog.ui.Container.prototype.visible_=!0,goog.ui.Container.prototype.enabled_=!0,goog.ui.Container.prototype.focusable_=!0,goog.ui.Container.prototype.highlightedIndex_=-1,goog.ui.Container.prototype.openItem_=null,goog.ui.Container.prototype.mouseButtonPressed_=!1,goog.ui.Container.prototype.allowFocusableChildren_=!1,goog.ui.Container.prototype.openFollowsHighlight_=!0,goog.ui.Container.prototype.childElementIdMap_=null,goog.ui.Container.prototype.getKeyEventTarget=function(){return this.keyEventTarget_||this.renderer_.getKeyEventTarget(this)},goog.ui.Container.prototype.setKeyEventTarget=function(e){if(!this.focusable_)throw Error("Can't set key event target for container that doesn't support keyboard focus!");var o=this.getKeyEventTarget(),t=this.isInDocument();this.keyEventTarget_=e;var n=this.getKeyEventTarget();t&&(this.keyEventTarget_=o,this.enableFocusHandling_(!1),this.keyEventTarget_=e,this.getKeyHandler().attach(n),this.enableFocusHandling_(!0))},goog.ui.Container.prototype.getKeyHandler=function(){return this.keyHandler_||(this.keyHandler_=new goog.events.KeyHandler(this.getKeyEventTarget()))},goog.ui.Container.prototype.getRenderer=function(){return this.renderer_},goog.ui.Container.prototype.setRenderer=function(e){if(this.getElement())throw Error(goog.ui.Component.Error.ALREADY_RENDERED);this.renderer_=e},goog.ui.Container.prototype.createDom=function(){this.setElementInternal(this.renderer_.createDom(this))},goog.ui.Container.prototype.getContentElement=function(){return this.renderer_.getContentElement(this.getElement())},goog.ui.Container.prototype.canDecorate=function(e){return this.renderer_.canDecorate(e)},goog.ui.Container.prototype.decorateInternal=function(e){this.setElementInternal(this.renderer_.decorate(this,e)),"none"==e.style.display&&(this.visible_=!1)},goog.ui.Container.prototype.enterDocument=function(){goog.ui.Container.superClass_.enterDocument.call(this),this.forEachChild(function(e){e.isInDocument()&&this.registerChildId_(e)},this);var e=this.getElement();this.renderer_.initializeDom(this),this.setVisible(this.visible_,!0),this.getHandler().listen(this,goog.ui.Component.EventType.ENTER,this.handleEnterItem).listen(this,goog.ui.Component.EventType.HIGHLIGHT,this.handleHighlightItem).listen(this,goog.ui.Component.EventType.UNHIGHLIGHT,this.handleUnHighlightItem).listen(this,goog.ui.Component.EventType.OPEN,this.handleOpenItem).listen(this,goog.ui.Component.EventType.CLOSE,this.handleCloseItem).listen(e,goog.events.EventType.MOUSEDOWN,this.handleMouseDown).listen(goog.dom.getOwnerDocument(e),goog.events.EventType.MOUSEUP,this.handleDocumentMouseUp).listen(e,[goog.events.EventType.MOUSEDOWN,goog.events.EventType.MOUSEUP,goog.events.EventType.MOUSEOVER,goog.events.EventType.MOUSEOUT,goog.events.EventType.CONTEXTMENU],this.handleChildMouseEvents),this.isFocusable()&&this.enableFocusHandling_(!0)},goog.ui.Container.prototype.enableFocusHandling_=function(e){var o=this.getHandler(),t=this.getKeyEventTarget();e?o.listen(t,goog.events.EventType.FOCUS,this.handleFocus).listen(t,goog.events.EventType.BLUR,this.handleBlur).listen(this.getKeyHandler(),goog.events.KeyHandler.EventType.KEY,this.handleKeyEvent):o.unlisten(t,goog.events.EventType.FOCUS,this.handleFocus).unlisten(t,goog.events.EventType.BLUR,this.handleBlur).unlisten(this.getKeyHandler(),goog.events.KeyHandler.EventType.KEY,this.handleKeyEvent)},goog.ui.Container.prototype.exitDocument=function(){this.setHighlightedIndex(-1),this.openItem_&&this.openItem_.setOpen(!1),this.mouseButtonPressed_=!1,goog.ui.Container.superClass_.exitDocument.call(this)},goog.ui.Container.prototype.disposeInternal=function(){goog.ui.Container.superClass_.disposeInternal.call(this),this.keyHandler_&&(this.keyHandler_.dispose(),this.keyHandler_=null),this.renderer_=this.openItem_=this.childElementIdMap_=this.keyEventTarget_=null},goog.ui.Container.prototype.handleEnterItem=function(e){return!0},goog.ui.Container.prototype.handleHighlightItem=function(e){var o=this.indexOfChild(e.target);if(o>-1&&o!=this.highlightedIndex_){var t=this.getHighlighted();t&&t.setHighlighted(!1),this.highlightedIndex_=o,t=this.getHighlighted(),this.isMouseButtonPressed()&&t.setActive(!0),this.openFollowsHighlight_&&this.openItem_&&t!=this.openItem_&&(t.isSupportedState(goog.ui.Component.State.OPENED)?t.setOpen(!0):this.openItem_.setOpen(!1))}o=this.getElement(),goog.asserts.assert(o,"The DOM element for the container cannot be null."),null!=e.target.getElement()&&goog.a11y.aria.setState(o,goog.a11y.aria.State.ACTIVEDESCENDANT,e.target.getElement().id)},goog.ui.Container.prototype.handleUnHighlightItem=function(e){e.target==this.getHighlighted()&&(this.highlightedIndex_=-1),e=this.getElement(),goog.asserts.assert(e,"The DOM element for the container cannot be null."),goog.a11y.aria.removeState(e,goog.a11y.aria.State.ACTIVEDESCENDANT)},goog.ui.Container.prototype.handleOpenItem=function(e){(e=e.target)&&e!=this.openItem_&&e.getParent()==this&&(this.openItem_&&this.openItem_.setOpen(!1),this.openItem_=e)},goog.ui.Container.prototype.handleCloseItem=function(e){e.target==this.openItem_&&(this.openItem_=null);var o=this.getElement(),t=e.target.getElement();o&&e.target.isHighlighted()&&t&&goog.a11y.aria.setActiveDescendant(o,t)},goog.ui.Container.prototype.handleMouseDown=function(e){this.enabled_&&this.setMouseButtonPressed(!0);var o=this.getKeyEventTarget();o&&goog.dom.isFocusableTabIndex(o)?o.focus():e.preventDefault()},goog.ui.Container.prototype.handleDocumentMouseUp=function(e){this.setMouseButtonPressed(!1)},goog.ui.Container.prototype.handleChildMouseEvents=function(e){var o=this.getOwnerControl(e.target);if(o)switch(e.type){case goog.events.EventType.MOUSEDOWN:o.handleMouseDown(e);break;case goog.events.EventType.MOUSEUP:o.handleMouseUp(e);break;case goog.events.EventType.MOUSEOVER:o.handleMouseOver(e);break;case goog.events.EventType.MOUSEOUT:o.handleMouseOut(e);break;case goog.events.EventType.CONTEXTMENU:o.handleContextMenu(e)}},goog.ui.Container.prototype.getOwnerControl=function(e){if(this.childElementIdMap_)for(var o=this.getElement();e&&e!==o;){var t=e.id;if(t in this.childElementIdMap_)return this.childElementIdMap_[t];e=e.parentNode}return null},goog.ui.Container.prototype.handleFocus=function(e){},goog.ui.Container.prototype.handleBlur=function(e){this.setHighlightedIndex(-1),this.setMouseButtonPressed(!1),this.openItem_&&this.openItem_.setOpen(!1)},goog.ui.Container.prototype.handleKeyEvent=function(e){return this.isEnabled()&&this.isVisible()&&(0!=this.getChildCount()||this.keyEventTarget_)&&this.handleKeyEventInternal(e)?(e.preventDefault(),e.stopPropagation(),!0):!1},goog.ui.Container.prototype.handleKeyEventInternal=function(e){var o=this.getHighlighted();if(o&&"function"==typeof o.handleKeyEvent&&o.handleKeyEvent(e)||this.openItem_&&this.openItem_!=o&&"function"==typeof this.openItem_.handleKeyEvent&&this.openItem_.handleKeyEvent(e))return!0;if(e.shiftKey||e.ctrlKey||e.metaKey||e.altKey)return!1;switch(e.keyCode){case goog.events.KeyCodes.ESC:if(!this.isFocusable())return!1;this.getKeyEventTarget().blur();break;case goog.events.KeyCodes.HOME:this.highlightFirst();break;case goog.events.KeyCodes.END:this.highlightLast();break;case goog.events.KeyCodes.UP:if(this.orientation_!=goog.ui.Container.Orientation.VERTICAL)return!1;this.highlightPrevious();break;case goog.events.KeyCodes.LEFT:if(this.orientation_!=goog.ui.Container.Orientation.HORIZONTAL)return!1;this.isRightToLeft()?this.highlightNext():this.highlightPrevious();break;case goog.events.KeyCodes.DOWN:if(this.orientation_!=goog.ui.Container.Orientation.VERTICAL)return!1;this.highlightNext();break;case goog.events.KeyCodes.RIGHT:if(this.orientation_!=goog.ui.Container.Orientation.HORIZONTAL)return!1;this.isRightToLeft()?this.highlightPrevious():this.highlightNext();break;default:return!1}return!0},goog.ui.Container.prototype.registerChildId_=function(e){var o=e.getElement(),o=o.id||(o.id=e.getId());this.childElementIdMap_||(this.childElementIdMap_={}),this.childElementIdMap_[o]=e},goog.ui.Container.prototype.addChild=function(e,o){goog.asserts.assertInstanceof(e,goog.ui.Control,"The child of a container must be a control"),goog.ui.Container.superClass_.addChild.call(this,e,o)},goog.ui.Container.prototype.addChildAt=function(e,o,t){goog.asserts.assertInstanceof(e,goog.ui.Control),e.setDispatchTransitionEvents(goog.ui.Component.State.HOVER,!0),e.setDispatchTransitionEvents(goog.ui.Component.State.OPENED,!0),!this.isFocusable()&&this.isFocusableChildrenAllowed()||e.setSupportedState(goog.ui.Component.State.FOCUSED,!1),e.setHandleMouseEvents(!1);var n=e.getParent()==this?this.indexOfChild(e):-1;goog.ui.Container.superClass_.addChildAt.call(this,e,o,t),e.isInDocument()&&this.isInDocument()&&this.registerChildId_(e),this.updateHighlightedIndex_(n,o)},goog.ui.Container.prototype.updateHighlightedIndex_=function(e,o){-1==e&&(e=this.getChildCount()),e==this.highlightedIndex_?this.highlightedIndex_=Math.min(this.getChildCount()-1,o):e>this.highlightedIndex_&&o<=this.highlightedIndex_?this.highlightedIndex_++:e<this.highlightedIndex_&&o>this.highlightedIndex_&&this.highlightedIndex_--},goog.ui.Container.prototype.removeChild=function(e,o){if(e=goog.isString(e)?this.getChild(e):e,goog.asserts.assertInstanceof(e,goog.ui.Control),e){var t=this.indexOfChild(e);-1!=t&&(t==this.highlightedIndex_?(e.setHighlighted(!1),this.highlightedIndex_=-1):t<this.highlightedIndex_&&this.highlightedIndex_--),(t=e.getElement())&&t.id&&this.childElementIdMap_&&goog.object.remove(this.childElementIdMap_,t.id)}return e=goog.ui.Container.superClass_.removeChild.call(this,e,o),e.setHandleMouseEvents(!0),e},goog.ui.Container.prototype.getOrientation=function(){return this.orientation_},goog.ui.Container.prototype.setOrientation=function(e){if(this.getElement())throw Error(goog.ui.Component.Error.ALREADY_RENDERED);this.orientation_=e},goog.ui.Container.prototype.isVisible=function(){return this.visible_},goog.ui.Container.prototype.setVisible=function(e,o){if(o||this.visible_!=e&&this.dispatchEvent(e?goog.ui.Component.EventType.SHOW:goog.ui.Component.EventType.HIDE)){
+this.visible_=e;var t=this.getElement();return t&&(goog.style.setElementShown(t,e),this.isFocusable()&&this.renderer_.enableTabIndex(this.getKeyEventTarget(),this.enabled_&&this.visible_),o||this.dispatchEvent(this.visible_?goog.ui.Container.EventType.AFTER_SHOW:goog.ui.Container.EventType.AFTER_HIDE)),!0}return!1},goog.ui.Container.prototype.isEnabled=function(){return this.enabled_},goog.ui.Container.prototype.setEnabled=function(e){this.enabled_!=e&&this.dispatchEvent(e?goog.ui.Component.EventType.ENABLE:goog.ui.Component.EventType.DISABLE)&&(e?(this.enabled_=!0,this.forEachChild(function(e){e.wasDisabled?delete e.wasDisabled:e.setEnabled(!0)})):(this.forEachChild(function(e){e.isEnabled()?e.setEnabled(!1):e.wasDisabled=!0}),this.enabled_=!1,this.setMouseButtonPressed(!1)),this.isFocusable()&&this.renderer_.enableTabIndex(this.getKeyEventTarget(),e&&this.visible_))},goog.ui.Container.prototype.isFocusable=function(){return this.focusable_},goog.ui.Container.prototype.setFocusable=function(e){e!=this.focusable_&&this.isInDocument()&&this.enableFocusHandling_(e),this.focusable_=e,this.enabled_&&this.visible_&&this.renderer_.enableTabIndex(this.getKeyEventTarget(),e)},goog.ui.Container.prototype.isFocusableChildrenAllowed=function(){return this.allowFocusableChildren_},goog.ui.Container.prototype.setFocusableChildrenAllowed=function(e){this.allowFocusableChildren_=e},goog.ui.Container.prototype.isOpenFollowsHighlight=function(){return this.openFollowsHighlight_},goog.ui.Container.prototype.setOpenFollowsHighlight=function(e){this.openFollowsHighlight_=e},goog.ui.Container.prototype.getHighlightedIndex=function(){return this.highlightedIndex_},goog.ui.Container.prototype.setHighlightedIndex=function(e){(e=this.getChildAt(e))?e.setHighlighted(!0):-1<this.highlightedIndex_&&this.getHighlighted().setHighlighted(!1)},goog.ui.Container.prototype.setHighlighted=function(e){this.setHighlightedIndex(this.indexOfChild(e))},goog.ui.Container.prototype.getHighlighted=function(){return this.getChildAt(this.highlightedIndex_)},goog.ui.Container.prototype.highlightFirst=function(){this.highlightHelper(function(e,o){return(e+1)%o},this.getChildCount()-1)},goog.ui.Container.prototype.highlightLast=function(){this.highlightHelper(function(e,o){return e--,0>e?o-1:e},0)},goog.ui.Container.prototype.highlightNext=function(){this.highlightHelper(function(e,o){return(e+1)%o},this.highlightedIndex_)},goog.ui.Container.prototype.highlightPrevious=function(){this.highlightHelper(function(e,o){return e--,0>e?o-1:e},this.highlightedIndex_)},goog.ui.Container.prototype.highlightHelper=function(e,o){for(var t=0>o?this.indexOfChild(this.openItem_):o,n=this.getChildCount(),t=e.call(this,t,n),r=0;n>=r;){var i=this.getChildAt(t);if(i&&this.canHighlightItem(i))return this.setHighlightedIndexFromKeyEvent(t),!0;r++,t=e.call(this,t,n)}return!1},goog.ui.Container.prototype.canHighlightItem=function(e){return e.isVisible()&&e.isEnabled()&&e.isSupportedState(goog.ui.Component.State.HOVER)},goog.ui.Container.prototype.setHighlightedIndexFromKeyEvent=function(e){this.setHighlightedIndex(e)},goog.ui.Container.prototype.getOpenItem=function(){return this.openItem_},goog.ui.Container.prototype.isMouseButtonPressed=function(){return this.mouseButtonPressed_},goog.ui.Container.prototype.setMouseButtonPressed=function(e){this.mouseButtonPressed_=e},goog.ui.MenuHeaderRenderer=function(){goog.ui.ControlRenderer.call(this)},goog.inherits(goog.ui.MenuHeaderRenderer,goog.ui.ControlRenderer),goog.addSingletonGetter(goog.ui.MenuHeaderRenderer),goog.ui.MenuHeaderRenderer.CSS_CLASS="goog-menuheader",goog.ui.MenuHeaderRenderer.prototype.getCssClass=function(){return goog.ui.MenuHeaderRenderer.CSS_CLASS},goog.ui.MenuHeader=function(e,o,t){goog.ui.Control.call(this,e,t||goog.ui.MenuHeaderRenderer.getInstance(),o),this.setSupportedState(goog.ui.Component.State.DISABLED,!1),this.setSupportedState(goog.ui.Component.State.HOVER,!1),this.setSupportedState(goog.ui.Component.State.ACTIVE,!1),this.setSupportedState(goog.ui.Component.State.FOCUSED,!1),this.setStateInternal(goog.ui.Component.State.DISABLED)},goog.inherits(goog.ui.MenuHeader,goog.ui.Control),goog.ui.registry.setDecoratorByClassName(goog.ui.MenuHeaderRenderer.CSS_CLASS,function(){return new goog.ui.MenuHeader(null)}),goog.ui.MenuItemRenderer=function(){goog.ui.ControlRenderer.call(this),this.classNameCache_=[]},goog.inherits(goog.ui.MenuItemRenderer,goog.ui.ControlRenderer),goog.addSingletonGetter(goog.ui.MenuItemRenderer),goog.ui.MenuItemRenderer.CSS_CLASS="goog-menuitem",goog.ui.MenuItemRenderer.CompositeCssClassIndex_={HOVER:0,CHECKBOX:1,CONTENT:2},goog.ui.MenuItemRenderer.prototype.getCompositeCssClass_=function(e){var o=this.classNameCache_[e];if(!o){switch(e){case goog.ui.MenuItemRenderer.CompositeCssClassIndex_.HOVER:o=this.getStructuralCssClass()+"-highlight";break;case goog.ui.MenuItemRenderer.CompositeCssClassIndex_.CHECKBOX:o=this.getStructuralCssClass()+"-checkbox";break;case goog.ui.MenuItemRenderer.CompositeCssClassIndex_.CONTENT:o=this.getStructuralCssClass()+"-content"}this.classNameCache_[e]=o}return o},goog.ui.MenuItemRenderer.prototype.getAriaRole=function(){return goog.a11y.aria.Role.MENU_ITEM},goog.ui.MenuItemRenderer.prototype.createDom=function(e){var o=e.getDomHelper().createDom("DIV",this.getClassNames(e).join(" "),this.createContent(e.getContent(),e.getDomHelper()));return this.setEnableCheckBoxStructure(e,o,e.isSupportedState(goog.ui.Component.State.SELECTED)||e.isSupportedState(goog.ui.Component.State.CHECKED)),o},goog.ui.MenuItemRenderer.prototype.getContentElement=function(e){return e&&e.firstChild},goog.ui.MenuItemRenderer.prototype.decorate=function(e,o){return goog.asserts.assert(o),this.hasContentStructure(o)||o.appendChild(this.createContent(o.childNodes,e.getDomHelper())),goog.dom.classlist.contains(o,"goog-option")&&(e.setCheckable(!0),this.setCheckable(e,o,!0)),goog.ui.MenuItemRenderer.superClass_.decorate.call(this,e,o)},goog.ui.MenuItemRenderer.prototype.setContent=function(e,o){var t=this.getContentElement(e),n=this.hasCheckBoxStructure(e)?t.firstChild:null;goog.ui.MenuItemRenderer.superClass_.setContent.call(this,e,o),n&&!this.hasCheckBoxStructure(e)&&t.insertBefore(n,t.firstChild||null)},goog.ui.MenuItemRenderer.prototype.hasContentStructure=function(e){e=goog.dom.getFirstElementChild(e);var o=this.getCompositeCssClass_(goog.ui.MenuItemRenderer.CompositeCssClassIndex_.CONTENT);return!!e&&goog.dom.classlist.contains(e,o)},goog.ui.MenuItemRenderer.prototype.createContent=function(e,o){var t=this.getCompositeCssClass_(goog.ui.MenuItemRenderer.CompositeCssClassIndex_.CONTENT);return o.createDom("DIV",t,e)},goog.ui.MenuItemRenderer.prototype.setSelectable=function(e,o,t){e&&o&&this.setEnableCheckBoxStructure(e,o,t)},goog.ui.MenuItemRenderer.prototype.setCheckable=function(e,o,t){e&&o&&this.setEnableCheckBoxStructure(e,o,t)},goog.ui.MenuItemRenderer.prototype.hasCheckBoxStructure=function(e){if(e=this.getContentElement(e)){e=e.firstChild;var o=this.getCompositeCssClass_(goog.ui.MenuItemRenderer.CompositeCssClassIndex_.CHECKBOX);return!!e&&goog.dom.isElement(e)&&goog.dom.classlist.contains(e,o)}return!1},goog.ui.MenuItemRenderer.prototype.setEnableCheckBoxStructure=function(e,o,t){this.setAriaRole(o,e.getPreferredAriaRole()),this.setAriaStates(e,o),t!=this.hasCheckBoxStructure(o)&&(goog.dom.classlist.enable(o,"goog-option",t),o=this.getContentElement(o),t?(t=this.getCompositeCssClass_(goog.ui.MenuItemRenderer.CompositeCssClassIndex_.CHECKBOX),o.insertBefore(e.getDomHelper().createDom("DIV",t),o.firstChild||null)):o.removeChild(o.firstChild))},goog.ui.MenuItemRenderer.prototype.getClassForState=function(e){switch(e){case goog.ui.Component.State.HOVER:return this.getCompositeCssClass_(goog.ui.MenuItemRenderer.CompositeCssClassIndex_.HOVER);case goog.ui.Component.State.CHECKED:case goog.ui.Component.State.SELECTED:return"goog-option-selected";default:return goog.ui.MenuItemRenderer.superClass_.getClassForState.call(this,e)}},goog.ui.MenuItemRenderer.prototype.getStateFromClass=function(e){var o=this.getCompositeCssClass_(goog.ui.MenuItemRenderer.CompositeCssClassIndex_.HOVER);switch(e){case"goog-option-selected":return goog.ui.Component.State.CHECKED;case o:return goog.ui.Component.State.HOVER;default:return goog.ui.MenuItemRenderer.superClass_.getStateFromClass.call(this,e)}},goog.ui.MenuItemRenderer.prototype.getCssClass=function(){return goog.ui.MenuItemRenderer.CSS_CLASS},goog.ui.MenuItem=function(e,o,t,n){goog.ui.Control.call(this,e,n||goog.ui.MenuItemRenderer.getInstance(),t),this.setValue(o)},goog.inherits(goog.ui.MenuItem,goog.ui.Control),goog.tagUnsealableClass(goog.ui.MenuItem),goog.ui.MenuItem.MNEMONIC_WRAPPER_CLASS_="goog-menuitem-mnemonic-separator",goog.ui.MenuItem.ACCELERATOR_CLASS="goog-menuitem-accel",goog.ui.MenuItem.prototype.getValue=function(){var e=this.getModel();return null!=e?e:this.getCaption()},goog.ui.MenuItem.prototype.setValue=function(e){this.setModel(e)},goog.ui.MenuItem.prototype.setSupportedState=function(e,o){switch(goog.ui.MenuItem.superClass_.setSupportedState.call(this,e,o),e){case goog.ui.Component.State.SELECTED:this.setSelectableInternal_(o);break;case goog.ui.Component.State.CHECKED:this.setCheckableInternal_(o)}},goog.ui.MenuItem.prototype.setSelectable=function(e){this.setSupportedState(goog.ui.Component.State.SELECTED,e)},goog.ui.MenuItem.prototype.setSelectableInternal_=function(e){this.isChecked()&&!e&&this.setChecked(!1);var o=this.getElement();o&&this.getRenderer().setSelectable(this,o,e)},goog.ui.MenuItem.prototype.setCheckable=function(e){this.setSupportedState(goog.ui.Component.State.CHECKED,e)},goog.ui.MenuItem.prototype.setCheckableInternal_=function(e){var o=this.getElement();o&&this.getRenderer().setCheckable(this,o,e)},goog.ui.MenuItem.prototype.getCaption=function(){var e=this.getContent();if(goog.isArray(e)){var o=goog.ui.MenuItem.ACCELERATOR_CLASS,t=goog.ui.MenuItem.MNEMONIC_WRAPPER_CLASS_,e=goog.array.map(e,function(e){return goog.dom.isElement(e)&&(goog.dom.classlist.contains(e,o)||goog.dom.classlist.contains(e,t))?"":goog.dom.getRawTextContent(e)}).join("");return goog.string.collapseBreakingSpaces(e)}return goog.ui.MenuItem.superClass_.getCaption.call(this)},goog.ui.MenuItem.prototype.getAccelerator=function(){var e=this.getDomHelper(),o=this.getContent();return goog.isArray(o)&&(o=goog.array.find(o,function(e){return goog.dom.classlist.contains(e,goog.ui.MenuItem.ACCELERATOR_CLASS)}))?e.getTextContent(o):null},goog.ui.MenuItem.prototype.handleMouseUp=function(e){var o=this.getParent();if(o){var t=o.openingCoords;if(o.openingCoords=null,t&&goog.isNumber(e.clientX)&&(o=new goog.math.Coordinate(e.clientX,e.clientY),goog.math.Coordinate.equals(t,o)))return}goog.ui.MenuItem.superClass_.handleMouseUp.call(this,e)},goog.ui.MenuItem.prototype.handleKeyEventInternal=function(e){return e.keyCode==this.getMnemonic()&&this.performActionInternal(e)?!0:goog.ui.MenuItem.superClass_.handleKeyEventInternal.call(this,e)},goog.ui.MenuItem.prototype.setMnemonic=function(e){this.mnemonicKey_=e},goog.ui.MenuItem.prototype.getMnemonic=function(){return this.mnemonicKey_},goog.ui.registry.setDecoratorByClassName(goog.ui.MenuItemRenderer.CSS_CLASS,function(){return new goog.ui.MenuItem(null)}),goog.ui.MenuItem.prototype.getPreferredAriaRole=function(){return this.isSupportedState(goog.ui.Component.State.CHECKED)?goog.a11y.aria.Role.MENU_ITEM_CHECKBOX:this.isSupportedState(goog.ui.Component.State.SELECTED)?goog.a11y.aria.Role.MENU_ITEM_RADIO:goog.ui.MenuItem.superClass_.getPreferredAriaRole.call(this)},goog.ui.MenuItem.prototype.getParent=function(){return goog.ui.Control.prototype.getParent.call(this)},goog.ui.MenuItem.prototype.getParentEventTarget=function(){return goog.ui.Control.prototype.getParentEventTarget.call(this)},goog.ui.MenuSeparatorRenderer=function(){goog.ui.ControlRenderer.call(this)},goog.inherits(goog.ui.MenuSeparatorRenderer,goog.ui.ControlRenderer),goog.addSingletonGetter(goog.ui.MenuSeparatorRenderer),goog.ui.MenuSeparatorRenderer.CSS_CLASS="goog-menuseparator",goog.ui.MenuSeparatorRenderer.prototype.createDom=function(e){return e.getDomHelper().createDom("DIV",this.getCssClass())},goog.ui.MenuSeparatorRenderer.prototype.decorate=function(e,o){if(o.id&&e.setId(o.id),"HR"==o.tagName){var t=o;o=this.createDom(e),goog.dom.insertSiblingBefore(o,t),goog.dom.removeNode(t)}else goog.dom.classlist.add(o,this.getCssClass());return o},goog.ui.MenuSeparatorRenderer.prototype.setContent=function(e,o){},goog.ui.MenuSeparatorRenderer.prototype.getCssClass=function(){return goog.ui.MenuSeparatorRenderer.CSS_CLASS},goog.ui.Separator=function(e,o){goog.ui.Control.call(this,null,e||goog.ui.MenuSeparatorRenderer.getInstance(),o),this.setSupportedState(goog.ui.Component.State.DISABLED,!1),this.setSupportedState(goog.ui.Component.State.HOVER,!1),this.setSupportedState(goog.ui.Component.State.ACTIVE,!1),this.setSupportedState(goog.ui.Component.State.FOCUSED,!1),this.setStateInternal(goog.ui.Component.State.DISABLED)},goog.inherits(goog.ui.Separator,goog.ui.Control),goog.ui.Separator.prototype.enterDocument=function(){goog.ui.Separator.superClass_.enterDocument.call(this);var e=this.getElement();goog.asserts.assert(e,"The DOM element for the separator cannot be null."),goog.a11y.aria.setRole(e,"separator")},goog.ui.registry.setDecoratorByClassName(goog.ui.MenuSeparatorRenderer.CSS_CLASS,function(){return new goog.ui.Separator}),goog.ui.MenuRenderer=function(e){goog.ui.ContainerRenderer.call(this,e||goog.a11y.aria.Role.MENU)},goog.inherits(goog.ui.MenuRenderer,goog.ui.ContainerRenderer),goog.addSingletonGetter(goog.ui.MenuRenderer),goog.ui.MenuRenderer.CSS_CLASS="goog-menu",goog.ui.MenuRenderer.prototype.canDecorate=function(e){return"UL"==e.tagName||goog.ui.MenuRenderer.superClass_.canDecorate.call(this,e)},goog.ui.MenuRenderer.prototype.getDecoratorForChild=function(e){return"HR"==e.tagName?new goog.ui.Separator:goog.ui.MenuRenderer.superClass_.getDecoratorForChild.call(this,e)},goog.ui.MenuRenderer.prototype.containsElement=function(e,o){return goog.dom.contains(e.getElement(),o)},goog.ui.MenuRenderer.prototype.getCssClass=function(){return goog.ui.MenuRenderer.CSS_CLASS},goog.ui.MenuRenderer.prototype.initializeDom=function(e){goog.ui.MenuRenderer.superClass_.initializeDom.call(this,e),e=e.getElement(),goog.asserts.assert(e,"The menu DOM element cannot be null."),goog.a11y.aria.setState(e,goog.a11y.aria.State.HASPOPUP,"true")},goog.ui.MenuSeparator=function(e){goog.ui.Separator.call(this,goog.ui.MenuSeparatorRenderer.getInstance(),e)},goog.inherits(goog.ui.MenuSeparator,goog.ui.Separator),goog.ui.registry.setDecoratorByClassName(goog.ui.MenuSeparatorRenderer.CSS_CLASS,function(){return new goog.ui.Separator}),goog.ui.Menu=function(e,o){goog.ui.Container.call(this,goog.ui.Container.Orientation.VERTICAL,o||goog.ui.MenuRenderer.getInstance(),e),this.setFocusable(!1)},goog.inherits(goog.ui.Menu,goog.ui.Container),goog.tagUnsealableClass(goog.ui.Menu),goog.ui.Menu.EventType={BEFORE_SHOW:goog.ui.Component.EventType.BEFORE_SHOW,SHOW:goog.ui.Component.EventType.SHOW,BEFORE_HIDE:goog.ui.Component.EventType.HIDE,HIDE:goog.ui.Component.EventType.HIDE},goog.ui.Menu.CSS_CLASS=goog.ui.MenuRenderer.CSS_CLASS,goog.ui.Menu.prototype.allowAutoFocus_=!0,goog.ui.Menu.prototype.allowHighlightDisabled_=!1,goog.ui.Menu.prototype.getCssClass=function(){return this.getRenderer().getCssClass()},goog.ui.Menu.prototype.containsElement=function(e){if(this.getRenderer().containsElement(this,e))return!0;for(var o=0,t=this.getChildCount();t>o;o++){var n=this.getChildAt(o);if("function"==typeof n.containsElement&&n.containsElement(e))return!0}return!1},goog.ui.Menu.prototype.addItem=function(e){this.addChild(e,!0)},goog.ui.Menu.prototype.addItemAt=function(e,o){this.addChildAt(e,o,!0)},goog.ui.Menu.prototype.removeItem=function(e){(e=this.removeChild(e,!0))&&e.dispose()},goog.ui.Menu.prototype.removeItemAt=function(e){(e=this.removeChildAt(e,!0))&&e.dispose()},goog.ui.Menu.prototype.getItemAt=function(e){return this.getChildAt(e)},goog.ui.Menu.prototype.getItemCount=function(){return this.getChildCount()},goog.ui.Menu.prototype.getItems=function(){var e=[];return this.forEachChild(function(o){e.push(o)}),e},goog.ui.Menu.prototype.setPosition=function(e,o){var t=this.isVisible();t||goog.style.setElementShown(this.getElement(),!0),goog.style.setPageOffset(this.getElement(),e,o),t||goog.style.setElementShown(this.getElement(),!1)},goog.ui.Menu.prototype.getPosition=function(){return this.isVisible()?goog.style.getPageOffset(this.getElement()):null},goog.ui.Menu.prototype.setAllowAutoFocus=function(e){(this.allowAutoFocus_=e)&&this.setFocusable(!0)},goog.ui.Menu.prototype.getAllowAutoFocus=function(){return this.allowAutoFocus_},goog.ui.Menu.prototype.setAllowHighlightDisabled=function(e){this.allowHighlightDisabled_=e},goog.ui.Menu.prototype.getAllowHighlightDisabled=function(){return this.allowHighlightDisabled_},goog.ui.Menu.prototype.setVisible=function(e,o,t){return(o=goog.ui.Menu.superClass_.setVisible.call(this,e,o))&&e&&this.isInDocument()&&this.allowAutoFocus_&&this.getKeyEventTarget().focus(),e&&t&&goog.isNumber(t.clientX)?this.openingCoords=new goog.math.Coordinate(t.clientX,t.clientY):this.openingCoords=null,o},goog.ui.Menu.prototype.handleEnterItem=function(e){return this.allowAutoFocus_&&this.getKeyEventTarget().focus(),goog.ui.Menu.superClass_.handleEnterItem.call(this,e)},goog.ui.Menu.prototype.highlightNextPrefix=function(e){var o=new RegExp("^"+goog.string.regExpEscape(e),"i");return this.highlightHelper(function(e,t){var n=0>e?0:e,r=!1;do{++e,e==t&&(e=0,r=!0);var i=this.getChildAt(e).getCaption();if(i&&i.match(o))return e}while(!r||e!=n);return this.getHighlightedIndex()},this.getHighlightedIndex())},goog.ui.Menu.prototype.canHighlightItem=function(e){return(this.allowHighlightDisabled_||e.isEnabled())&&e.isVisible()&&e.isSupportedState(goog.ui.Component.State.HOVER)},goog.ui.Menu.prototype.decorateInternal=function(e){this.decorateContent(e),goog.ui.Menu.superClass_.decorateInternal.call(this,e)},goog.ui.Menu.prototype.handleKeyEventInternal=function(e){var o=goog.ui.Menu.superClass_.handleKeyEventInternal.call(this,e);return o||this.forEachChild(function(t){!o&&t.getMnemonic&&t.getMnemonic()==e.keyCode&&(this.isEnabled()&&this.setHighlighted(t),o=t.handleKeyEvent(e))},this),o},goog.ui.Menu.prototype.setHighlightedIndex=function(e){goog.ui.Menu.superClass_.setHighlightedIndex.call(this,e),(e=this.getChildAt(e))&&goog.style.scrollIntoContainerView(e.getElement(),this.getElement())},goog.ui.Menu.prototype.decorateContent=function(e){var o=this.getRenderer();e=this.getDomHelper().getElementsByTagNameAndClass("DIV",o.getCssClass()+"-content",e);for(var t=e.length,n=0;t>n;n++)o.decorateChildren(this,e[n])},goog.color={},goog.color.names={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},goog.color.parse=function(e){var o={};e=String(e);var t=goog.color.prependHashIfNecessaryHelper(e);if(goog.color.isValidHexColor_(t))return o.hex=goog.color.normalizeHex(t),o.type="hex",o;if(t=goog.color.isValidRgbColor_(e),t.length)return o.hex=goog.color.rgbArrayToHex(t),o.type="rgb",o;if(goog.color.names&&(t=goog.color.names[e.toLowerCase()]))return o.hex=t,o.type="named",o;throw Error(e+" is not a valid color string")},goog.color.isValidColor=function(e){var o=goog.color.prependHashIfNecessaryHelper(e);return!!(goog.color.isValidHexColor_(o)||goog.color.isValidRgbColor_(e).length||goog.color.names&&goog.color.names[e.toLowerCase()])},goog.color.parseRgb=function(e){var o=goog.color.isValidRgbColor_(e);if(!o.length)throw Error(e+" is not a valid RGB color");return o},goog.color.hexToRgbStyle=function(e){return goog.color.rgbStyle_(goog.color.hexToRgb(e))},goog.color.hexTripletRe_=/#(.)(.)(.)/,goog.color.normalizeHex=function(e){if(!goog.color.isValidHexColor_(e))throw Error("'"+e+"' is not a valid hex color");return 4==e.length&&(e=e.replace(goog.color.hexTripletRe_,"#$1$1$2$2$3$3")),e.toLowerCase()},goog.color.hexToRgb=function(e){e=goog.color.normalizeHex(e);var o=parseInt(e.substr(1,2),16),t=parseInt(e.substr(3,2),16);return e=parseInt(e.substr(5,2),16),[o,t,e]},goog.color.rgbToHex=function(e,o,t){if(e=Number(e),o=Number(o),t=Number(t),e!=(255&e)||o!=(255&o)||t!=(255&t))throw Error('"('+e+","+o+","+t+'") is not a valid RGB color');return e=goog.color.prependZeroIfNecessaryHelper(e.toString(16)),o=goog.color.prependZeroIfNecessaryHelper(o.toString(16)),t=goog.color.prependZeroIfNecessaryHelper(t.toString(16)),"#"+e+o+t},goog.color.rgbArrayToHex=function(e){return goog.color.rgbToHex(e[0],e[1],e[2])},goog.color.rgbToHsl=function(e,o,t){e/=255,o/=255,t/=255;var n=Math.max(e,o,t),r=Math.min(e,o,t),i=0,s=0,l=.5*(n+r);return n!=r&&(n==e?i=60*(o-t)/(n-r):n==o?i=60*(t-e)/(n-r)+120:n==t&&(i=60*(e-o)/(n-r)+240),s=l>0&&.5>=l?(n-r)/(2*l):(n-r)/(2-2*l)),[Math.round(i+360)%360,s,l]},goog.color.rgbArrayToHsl=function(e){return goog.color.rgbToHsl(e[0],e[1],e[2])},goog.color.hueToRgb_=function(e,o,t){return 0>t?t+=1:t>1&&--t,1>6*t?e+6*(o-e)*t:1>2*t?o:2>3*t?e+(o-e)*(2/3-t)*6:e},goog.color.hslToRgb=function(e,o,t){if(e/=360,0==o)t=o=e=255*t;else{var n,r;r=.5>t?t*(1+o):t+o-o*t,n=2*t-r,t=255*goog.color.hueToRgb_(n,r,e+1/3),o=255*goog.color.hueToRgb_(n,r,e),e=255*goog.color.hueToRgb_(n,r,e-1/3)}return[Math.round(t),Math.round(o),Math.round(e)]},goog.color.hslArrayToRgb=function(e){return goog.color.hslToRgb(e[0],e[1],e[2])},goog.color.validHexColorRe_=/^#(?:[0-9a-f]{3}){1,2}$/i,goog.color.isValidHexColor_=function(e){return goog.color.validHexColorRe_.test(e)},goog.color.normalizedHexColorRe_=/^#[0-9a-f]{6}$/,goog.color.isNormalizedHexColor_=function(e){return goog.color.normalizedHexColorRe_.test(e)},goog.color.rgbColorRe_=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i,goog.color.isValidRgbColor_=function(e){var o=e.match(goog.color.rgbColorRe_);if(o){e=Number(o[1]);var t=Number(o[2]),o=Number(o[3]);if(e>=0&&255>=e&&t>=0&&255>=t&&o>=0&&255>=o)return[e,t,o]}return[]},goog.color.prependZeroIfNecessaryHelper=function(e){return 1==e.length?"0"+e:e},goog.color.prependHashIfNecessaryHelper=function(e){return"#"==e.charAt(0)?e:"#"+e},goog.color.rgbStyle_=function(e){return"rgb("+e.join(",")+")"},goog.color.hsvToRgb=function(e,o,t){var n=0,r=0,i=0;if(0==o)i=r=n=t;else{var s=Math.floor(e/60),l=e/60-s;e=t*(1-o);var g=t*(1-o*l);switch(o=t*(1-o*(1-l)),s){case 1:n=g,r=t,i=e;break;case 2:n=e,r=t,i=o;break;case 3:n=e,r=g,i=t;break;case 4:n=o,r=e,i=t;break;case 5:n=t,r=e,i=g;break;case 6:case 0:n=t,r=o,i=e}}return[Math.floor(n),Math.floor(r),Math.floor(i)]},goog.color.rgbToHsv=function(e,o,t){var n=Math.max(Math.max(e,o),t),r=Math.min(Math.min(e,o),t);if(r==n)r=e=0;else{var i=n-r,r=i/n;e=60*(e==n?(o-t)/i:o==n?2+(t-e)/i:4+(e-o)/i),0>e&&(e+=360),e>360&&(e-=360)}return[e,r,n]},goog.color.rgbArrayToHsv=function(e){return goog.color.rgbToHsv(e[0],e[1],e[2])},goog.color.hsvArrayToRgb=function(e){return goog.color.hsvToRgb(e[0],e[1],e[2])},goog.color.hexToHsl=function(e){return e=goog.color.hexToRgb(e),goog.color.rgbToHsl(e[0],e[1],e[2])},goog.color.hslToHex=function(e,o,t){return goog.color.rgbArrayToHex(goog.color.hslToRgb(e,o,t))},goog.color.hslArrayToHex=function(e){return goog.color.rgbArrayToHex(goog.color.hslToRgb(e[0],e[1],e[2]))},goog.color.hexToHsv=function(e){return goog.color.rgbArrayToHsv(goog.color.hexToRgb(e))},goog.color.hsvToHex=function(e,o,t){return goog.color.rgbArrayToHex(goog.color.hsvToRgb(e,o,t))},goog.color.hsvArrayToHex=function(e){return goog.color.hsvToHex(e[0],e[1],e[2])},goog.color.hslDistance=function(e,o){var t,n;return t=.5>=e[2]?e[1]*e[2]:e[1]*(1-e[2]),n=.5>=o[2]?o[1]*o[2]:o[1]*(1-o[2]),(e[2]-o[2])*(e[2]-o[2])+t*t+n*n-2*t*n*Math.cos(2*(e[0]/360-o[0]/360)*Math.PI)},goog.color.blend=function(e,o,t){return t=goog.math.clamp(t,0,1),[Math.round(t*e[0]+(1-t)*o[0]),Math.round(t*e[1]+(1-t)*o[1]),Math.round(t*e[2]+(1-t)*o[2])]},goog.color.darken=function(e,o){return goog.color.blend([0,0,0],e,o)},goog.color.lighten=function(e,o){return goog.color.blend([255,255,255],e,o)},goog.color.highContrast=function(e,o){for(var t=[],n=0;n<o.length;n++)t.push({color:o[n],diff:goog.color.yiqBrightnessDiff_(o[n],e)+goog.color.colorDiff_(o[n],e)});return t.sort(function(e,o){return o.diff-e.diff}),t[0].color},goog.color.yiqBrightness_=function(e){return Math.round((299*e[0]+587*e[1]+114*e[2])/1e3)},goog.color.yiqBrightnessDiff_=function(e,o){return Math.abs(goog.color.yiqBrightness_(e)-goog.color.yiqBrightness_(o))},goog.color.colorDiff_=function(e,o){return Math.abs(e[0]-o[0])+Math.abs(e[1]-o[1])+Math.abs(e[2]-o[2])},goog.iter={},goog.iter.StopIteration="StopIteration"in goog.global?goog.global.StopIteration:{message:"StopIteration",stack:""},goog.iter.Iterator=function(){},goog.iter.Iterator.prototype.next=function(){throw goog.iter.StopIteration},goog.iter.Iterator.prototype.__iterator__=function(e){return this},goog.iter.toIterator=function(e){if(e instanceof goog.iter.Iterator)return e;if("function"==typeof e.__iterator__)return e.__iterator__(!1);if(goog.isArrayLike(e)){var o=0,t=new goog.iter.Iterator;return t.next=function(){for(;;){if(o>=e.length)throw goog.iter.StopIteration;if(o in e)return e[o++];o++}},t}throw Error("Not implemented")},goog.iter.forEach=function(e,o,t){if(goog.isArrayLike(e))try{goog.array.forEach(e,o,t)}catch(n){if(n!==goog.iter.StopIteration)throw n}else{e=goog.iter.toIterator(e);try{for(;;)o.call(t,e.next(),void 0,e)}catch(n){if(n!==goog.iter.StopIteration)throw n}}},goog.iter.filter=function(e,o,t){var n=goog.iter.toIterator(e);return e=new goog.iter.Iterator,e.next=function(){for(;;){var e=n.next();if(o.call(t,e,void 0,n))return e}},e},goog.iter.filterFalse=function(e,o,t){return goog.iter.filter(e,goog.functions.not(o),t)},goog.iter.range=function(e,o,t){var n=0,r=e,i=t||1;if(1<arguments.length&&(n=e,r=o),0==i)throw Error("Range step argument must not be zero");var s=new goog.iter.Iterator;return s.next=function(){if(i>0&&n>=r||0>i&&r>=n)throw goog.iter.StopIteration;var e=n;return n+=i,e},s},goog.iter.join=function(e,o){return goog.iter.toArray(e).join(o)},goog.iter.map=function(e,o,t){var n=goog.iter.toIterator(e);return e=new goog.iter.Iterator,e.next=function(){var e=n.next();return o.call(t,e,void 0,n)},e},goog.iter.reduce=function(e,o,t,n){var r=t;return goog.iter.forEach(e,function(e){r=o.call(n,r,e)}),r},goog.iter.some=function(e,o,t){e=goog.iter.toIterator(e);try{for(;;)if(o.call(t,e.next(),void 0,e))return!0}catch(n){if(n!==goog.iter.StopIteration)throw n}return!1},goog.iter.every=function(e,o,t){e=goog.iter.toIterator(e);try{for(;;)if(!o.call(t,e.next(),void 0,e))return!1}catch(n){if(n!==goog.iter.StopIteration)throw n}return!0},goog.iter.chain=function(e){return goog.iter.chainFromIterable(arguments)},goog.iter.chainFromIterable=function(e){var o=goog.iter.toIterator(e);e=new goog.iter.Iterator;var t=null;return e.next=function(){for(;;){if(null==t){var e=o.next();t=goog.iter.toIterator(e)}try{return t.next()}catch(n){if(n!==goog.iter.StopIteration)throw n;t=null}}},e},goog.iter.dropWhile=function(e,o,t){var n=goog.iter.toIterator(e);e=new goog.iter.Iterator;var r=!0;return e.next=function(){for(;;){var e=n.next();if(!r||!o.call(t,e,void 0,n))return r=!1,e}},e},goog.iter.takeWhile=function(e,o,t){var n=goog.iter.toIterator(e);return e=new goog.iter.Iterator,e.next=function(){var e=n.next();if(o.call(t,e,void 0,n))return e;throw goog.iter.StopIteration},e},goog.iter.toArray=function(e){if(goog.isArrayLike(e))return goog.array.toArray(e);e=goog.iter.toIterator(e);var o=[];return goog.iter.forEach(e,function(e){o.push(e)}),o},goog.iter.equals=function(e,o,t){e=goog.iter.zipLongest({},e,o);var n=t||goog.array.defaultCompareEquality;return goog.iter.every(e,function(e){return n(e[0],e[1])})},goog.iter.nextOrValue=function(e,o){try{return goog.iter.toIterator(e).next()}catch(t){if(t!=goog.iter.StopIteration)throw t;return o}},goog.iter.product=function(e){if(goog.array.some(arguments,function(e){return!e.length})||!arguments.length)return new goog.iter.Iterator;var o=new goog.iter.Iterator,t=arguments,n=goog.array.repeat(0,t.length);return o.next=function(){if(n){for(var e=goog.array.map(n,function(e,o){return t[o][e]}),o=n.length-1;o>=0;o--){if(goog.asserts.assert(n),n[o]<t[o].length-1){n[o]++;break}if(0==o){n=null;break}n[o]=0}return e}throw goog.iter.StopIteration},o},goog.iter.cycle=function(e){var o=goog.iter.toIterator(e),t=[],n=0;e=new goog.iter.Iterator;var r=!1;return e.next=function(){var e=null;if(!r)try{return e=o.next(),t.push(e),e}catch(i){if(i!=goog.iter.StopIteration||goog.array.isEmpty(t))throw i;r=!0}return e=t[n],n=(n+1)%t.length,e},e},goog.iter.count=function(e,o){var t=e||0,n=goog.isDef(o)?o:1,r=new goog.iter.Iterator;return r.next=function(){var e=t;return t+=n,e},r},goog.iter.repeat=function(e){var o=new goog.iter.Iterator;return o.next=goog.functions.constant(e),o},goog.iter.accumulate=function(e){var o=goog.iter.toIterator(e),t=0;return e=new goog.iter.Iterator,e.next=function(){return t+=o.next()},e},goog.iter.zip=function(e){var o=arguments,t=new goog.iter.Iterator;
+if(0<o.length){var n=goog.array.map(o,goog.iter.toIterator);t.next=function(){return goog.array.map(n,function(e){return e.next()})}}return t},goog.iter.zipLongest=function(e,o){var t=goog.array.slice(arguments,1),n=new goog.iter.Iterator;if(0<t.length){var r=goog.array.map(t,goog.iter.toIterator);n.next=function(){var o=!1,t=goog.array.map(r,function(t){var n;try{n=t.next(),o=!0}catch(r){if(r!==goog.iter.StopIteration)throw r;n=e}return n});if(!o)throw goog.iter.StopIteration;return t}}return n},goog.iter.compress=function(e,o){var t=goog.iter.toIterator(o);return goog.iter.filter(e,function(){return!!t.next()})},goog.iter.GroupByIterator_=function(e,o){this.iterator=goog.iter.toIterator(e),this.keyFunc=o||goog.functions.identity},goog.inherits(goog.iter.GroupByIterator_,goog.iter.Iterator),goog.iter.GroupByIterator_.prototype.next=function(){for(;this.currentKey==this.targetKey;)this.currentValue=this.iterator.next(),this.currentKey=this.keyFunc(this.currentValue);return this.targetKey=this.currentKey,[this.currentKey,this.groupItems_(this.targetKey)]},goog.iter.GroupByIterator_.prototype.groupItems_=function(e){for(var o=[];this.currentKey==e;){o.push(this.currentValue);try{this.currentValue=this.iterator.next()}catch(t){if(t!==goog.iter.StopIteration)throw t;break}this.currentKey=this.keyFunc(this.currentValue)}return o},goog.iter.groupBy=function(e,o){return new goog.iter.GroupByIterator_(e,o)},goog.iter.starMap=function(e,o,t){var n=goog.iter.toIterator(e);return e=new goog.iter.Iterator,e.next=function(){var e=goog.iter.toArray(n.next());return o.apply(t,goog.array.concat(e,void 0,n))},e},goog.iter.tee=function(e,o){var t=goog.iter.toIterator(e),n=goog.isNumber(o)?o:2,r=goog.array.map(goog.array.range(n),function(){return[]}),i=function(){var e=t.next();goog.array.forEach(r,function(o){o.push(e)})};return goog.array.map(r,function(e){var o=new goog.iter.Iterator;return o.next=function(){return goog.array.isEmpty(e)&&i(),goog.asserts.assert(!goog.array.isEmpty(e)),e.shift()},o})},goog.iter.enumerate=function(e,o){return goog.iter.zip(goog.iter.count(o),e)},goog.iter.limit=function(e,o){goog.asserts.assert(goog.math.isInt(o)&&o>=0);var t=goog.iter.toIterator(e),n=new goog.iter.Iterator,r=o;return n.next=function(){if(0<r--)return t.next();throw goog.iter.StopIteration},n},goog.iter.consume=function(e,o){goog.asserts.assert(goog.math.isInt(o)&&o>=0);for(var t=goog.iter.toIterator(e);0<o--;)goog.iter.nextOrValue(t,null);return t},goog.iter.slice=function(e,o,t){return goog.asserts.assert(goog.math.isInt(o)&&o>=0),e=goog.iter.consume(e,o),goog.isNumber(t)&&(goog.asserts.assert(goog.math.isInt(t)&&t>=o),e=goog.iter.limit(e,t-o)),e},goog.iter.hasDuplicates_=function(e){var o=[];return goog.array.removeDuplicates(e,o),e.length!=o.length},goog.iter.permutations=function(e,o){var t=goog.iter.toArray(e),n=goog.isNumber(o)?o:t.length,t=goog.array.repeat(t,n),t=goog.iter.product.apply(void 0,t);return goog.iter.filter(t,function(e){return!goog.iter.hasDuplicates_(e)})},goog.iter.combinations=function(e,o){function t(e){return n[e]}var n=goog.iter.toArray(e),r=goog.iter.range(n.length),r=goog.iter.permutations(r,o),i=goog.iter.filter(r,function(e){return goog.array.isSorted(e)}),r=new goog.iter.Iterator;return r.next=function(){return goog.array.map(i.next(),t)},r},goog.iter.combinationsWithReplacement=function(e,o){function t(e){return n[e]}var n=goog.iter.toArray(e),r=goog.array.range(n.length),r=goog.array.repeat(r,o),r=goog.iter.product.apply(void 0,r),i=goog.iter.filter(r,function(e){return goog.array.isSorted(e)}),r=new goog.iter.Iterator;return r.next=function(){return goog.array.map(i.next(),t)},r},goog.dom.TagWalkType={START_TAG:1,OTHER:0,END_TAG:-1},goog.dom.TagIterator=function(e,o,t,n,r){this.reversed=!!o,this.node=null,this.tagType=goog.dom.TagWalkType.OTHER,this.started_=!1,this.constrained=!t,e&&this.setPosition(e,n),this.depth=void 0!=r?r:this.tagType||0,this.reversed&&(this.depth*=-1)},goog.inherits(goog.dom.TagIterator,goog.iter.Iterator),goog.dom.TagIterator.prototype.setPosition=function(e,o,t){(this.node=e)&&(goog.isNumber(o)?this.tagType=o:this.tagType=this.node.nodeType!=goog.dom.NodeType.ELEMENT?goog.dom.TagWalkType.OTHER:this.reversed?goog.dom.TagWalkType.END_TAG:goog.dom.TagWalkType.START_TAG),goog.isNumber(t)&&(this.depth=t)},goog.dom.TagIterator.prototype.copyFrom=function(e){this.node=e.node,this.tagType=e.tagType,this.depth=e.depth,this.reversed=e.reversed,this.constrained=e.constrained},goog.dom.TagIterator.prototype.clone=function(){return new goog.dom.TagIterator(this.node,this.reversed,!this.constrained,this.tagType,this.depth)},goog.dom.TagIterator.prototype.skipTag=function(){var e=this.reversed?goog.dom.TagWalkType.END_TAG:goog.dom.TagWalkType.START_TAG;this.tagType==e&&(this.tagType=-1*e,this.depth+=this.tagType*(this.reversed?-1:1))},goog.dom.TagIterator.prototype.restartTag=function(){var e=this.reversed?goog.dom.TagWalkType.START_TAG:goog.dom.TagWalkType.END_TAG;this.tagType==e&&(this.tagType=-1*e,this.depth+=this.tagType*(this.reversed?-1:1))},goog.dom.TagIterator.prototype.next=function(){var e;if(this.started_){if(!this.node||this.constrained&&0==this.depth)throw goog.iter.StopIteration;e=this.node;var o=this.reversed?goog.dom.TagWalkType.END_TAG:goog.dom.TagWalkType.START_TAG;if(this.tagType==o){var t=this.reversed?e.lastChild:e.firstChild;t?this.setPosition(t):this.setPosition(e,-1*o)}else(t=this.reversed?e.previousSibling:e.nextSibling)?this.setPosition(t):this.setPosition(e.parentNode,-1*o);this.depth+=this.tagType*(this.reversed?-1:1)}else this.started_=!0;if(e=this.node,!this.node)throw goog.iter.StopIteration;return e},goog.dom.TagIterator.prototype.isStarted=function(){return this.started_},goog.dom.TagIterator.prototype.isStartTag=function(){return this.tagType==goog.dom.TagWalkType.START_TAG},goog.dom.TagIterator.prototype.isEndTag=function(){return this.tagType==goog.dom.TagWalkType.END_TAG},goog.dom.TagIterator.prototype.isNonElement=function(){return this.tagType==goog.dom.TagWalkType.OTHER},goog.dom.TagIterator.prototype.equals=function(e){return e.node==this.node&&(!this.node||e.tagType==this.tagType)},goog.dom.TagIterator.prototype.splice=function(e){var o=this.node;this.restartTag(),this.reversed=!this.reversed,goog.dom.TagIterator.prototype.next.call(this),this.reversed=!this.reversed;for(var t=goog.isArrayLike(arguments[0])?arguments[0]:arguments,n=t.length-1;n>=0;n--)goog.dom.insertSiblingAfter(t[n],o);goog.dom.removeNode(o)},goog.dom.NodeIterator=function(e,o,t,n){goog.dom.TagIterator.call(this,e,o,t,null,n)},goog.inherits(goog.dom.NodeIterator,goog.dom.TagIterator),goog.dom.NodeIterator.prototype.next=function(){do goog.dom.NodeIterator.superClass_.next.call(this);while(this.isEndTag());return this.node},goog.ui.PaletteRenderer=function(){goog.ui.ControlRenderer.call(this)},goog.inherits(goog.ui.PaletteRenderer,goog.ui.ControlRenderer),goog.addSingletonGetter(goog.ui.PaletteRenderer),goog.ui.PaletteRenderer.cellId_=0,goog.ui.PaletteRenderer.CSS_CLASS="goog-palette",goog.ui.PaletteRenderer.prototype.createDom=function(e){var o=this.getClassNames(e);return e=e.getDomHelper().createDom("DIV",o?o.join(" "):null,this.createGrid(e.getContent(),e.getSize(),e.getDomHelper())),goog.a11y.aria.setRole(e,goog.a11y.aria.Role.GRID),e},goog.ui.PaletteRenderer.prototype.createGrid=function(e,o,t){for(var n=[],r=0,i=0;r<o.height;r++){for(var s=[],l=0;l<o.width;l++){var g=e&&e[i++];s.push(this.createCell(g,t))}n.push(this.createRow(s,t))}return this.createTable(n,t)},goog.ui.PaletteRenderer.prototype.createTable=function(e,o){var t=o.createDom("TABLE",this.getCssClass()+"-table",o.createDom("TBODY",this.getCssClass()+"-body",e));return t.cellSpacing="0",t.cellPadding="0",t},goog.ui.PaletteRenderer.prototype.createRow=function(e,o){var t=o.createDom("TR",this.getCssClass()+"-row",e);return goog.a11y.aria.setRole(t,goog.a11y.aria.Role.ROW),t},goog.ui.PaletteRenderer.prototype.createCell=function(e,o){var t=o.createDom("TD",{"class":this.getCssClass()+"-cell",id:this.getCssClass()+"-cell-"+goog.ui.PaletteRenderer.cellId_++},e);if(goog.a11y.aria.setRole(t,goog.a11y.aria.Role.GRIDCELL),goog.a11y.aria.setState(t,goog.a11y.aria.State.SELECTED,!1),!goog.dom.getTextContent(t)&&!goog.a11y.aria.getLabel(t)){var n=this.findAriaLabelForCell_(t);n&&goog.a11y.aria.setLabel(t,n)}return t},goog.ui.PaletteRenderer.prototype.findAriaLabelForCell_=function(e){e=new goog.dom.NodeIterator(e);for(var o,t="";!t&&(o=goog.iter.nextOrValue(e,null));)o.nodeType==goog.dom.NodeType.ELEMENT&&(t=goog.a11y.aria.getLabel(o)||o.title);return t},goog.ui.PaletteRenderer.prototype.canDecorate=function(e){return!1},goog.ui.PaletteRenderer.prototype.decorate=function(e,o){return null},goog.ui.PaletteRenderer.prototype.setContent=function(e,o){if(e){var t=goog.dom.getElementsByTagNameAndClass("TBODY",this.getCssClass()+"-body",e)[0];if(t){var n=0;if(goog.array.forEach(t.rows,function(e){goog.array.forEach(e.cells,function(e){if(goog.dom.removeChildren(e),o){var t=o[n++];t&&goog.dom.appendChild(e,t)}})}),n<o.length){for(var r=[],i=goog.dom.getDomHelper(e),s=t.rows[0].cells.length;n<o.length;){var l=o[n++];r.push(this.createCell(l,i)),r.length==s&&(l=this.createRow(r,i),goog.dom.appendChild(t,l),r.length=0)}if(0<r.length){for(;r.length<s;)r.push(this.createCell("",i));l=this.createRow(r,i),goog.dom.appendChild(t,l)}}}goog.style.setUnselectable(e,!0,goog.userAgent.GECKO)}},goog.ui.PaletteRenderer.prototype.getContainingItem=function(e,o){for(var t=e.getElement();o&&o.nodeType==goog.dom.NodeType.ELEMENT&&o!=t;){if("TD"==o.tagName&&goog.dom.classlist.contains(o,this.getCssClass()+"-cell"))return o.firstChild;o=o.parentNode}return null},goog.ui.PaletteRenderer.prototype.highlightCell=function(e,o,t){o&&(o=this.getCellForItem(o),goog.asserts.assert(o),goog.dom.classlist.enable(o,this.getCssClass()+"-cell-hover",t),t?goog.a11y.aria.setState(e.getElementStrict(),goog.a11y.aria.State.ACTIVEDESCENDANT,o.id):o.id==goog.a11y.aria.getState(e.getElementStrict(),goog.a11y.aria.State.ACTIVEDESCENDANT)&&goog.a11y.aria.removeState(e.getElementStrict(),goog.a11y.aria.State.ACTIVEDESCENDANT))},goog.ui.PaletteRenderer.prototype.getCellForItem=function(e){return e?e.parentNode:null},goog.ui.PaletteRenderer.prototype.selectCell=function(e,o,t){o&&(e=o.parentNode,goog.dom.classlist.enable(e,this.getCssClass()+"-cell-selected",t),goog.a11y.aria.setState(e,goog.a11y.aria.State.SELECTED,t))},goog.ui.PaletteRenderer.prototype.getCssClass=function(){return goog.ui.PaletteRenderer.CSS_CLASS},goog.ui.SelectionModel=function(e){goog.events.EventTarget.call(this),this.items_=[],this.addItems(e)},goog.inherits(goog.ui.SelectionModel,goog.events.EventTarget),goog.tagUnsealableClass(goog.ui.SelectionModel),goog.ui.SelectionModel.prototype.selectedItem_=null,goog.ui.SelectionModel.prototype.selectionHandler_=null,goog.ui.SelectionModel.prototype.getSelectionHandler=function(){return this.selectionHandler_},goog.ui.SelectionModel.prototype.setSelectionHandler=function(e){this.selectionHandler_=e},goog.ui.SelectionModel.prototype.getItemCount=function(){return this.items_.length},goog.ui.SelectionModel.prototype.indexOfItem=function(e){return e?goog.array.indexOf(this.items_,e):-1},goog.ui.SelectionModel.prototype.getFirst=function(){return this.items_[0]},goog.ui.SelectionModel.prototype.getLast=function(){return this.items_[this.items_.length-1]},goog.ui.SelectionModel.prototype.getItemAt=function(e){return this.items_[e]||null},goog.ui.SelectionModel.prototype.addItems=function(e){e&&(goog.array.forEach(e,function(e){this.selectItem_(e,!1)},this),goog.array.extend(this.items_,e))},goog.ui.SelectionModel.prototype.addItem=function(e){this.addItemAt(e,this.getItemCount())},goog.ui.SelectionModel.prototype.addItemAt=function(e,o){e&&(this.selectItem_(e,!1),goog.array.insertAt(this.items_,e,o))},goog.ui.SelectionModel.prototype.removeItem=function(e){e&&goog.array.remove(this.items_,e)&&e==this.selectedItem_&&(this.selectedItem_=null,this.dispatchEvent(goog.events.EventType.SELECT))},goog.ui.SelectionModel.prototype.removeItemAt=function(e){this.removeItem(this.getItemAt(e))},goog.ui.SelectionModel.prototype.getSelectedItem=function(){return this.selectedItem_},goog.ui.SelectionModel.prototype.getItems=function(){return goog.array.clone(this.items_)},goog.ui.SelectionModel.prototype.setSelectedItem=function(e){e!=this.selectedItem_&&(this.selectItem_(this.selectedItem_,!1),this.selectedItem_=e,this.selectItem_(e,!0)),this.dispatchEvent(goog.events.EventType.SELECT)},goog.ui.SelectionModel.prototype.getSelectedIndex=function(){return this.indexOfItem(this.selectedItem_)},goog.ui.SelectionModel.prototype.setSelectedIndex=function(e){this.setSelectedItem(this.getItemAt(e))},goog.ui.SelectionModel.prototype.clear=function(){goog.array.clear(this.items_),this.selectedItem_=null},goog.ui.SelectionModel.prototype.disposeInternal=function(){goog.ui.SelectionModel.superClass_.disposeInternal.call(this),delete this.items_,this.selectedItem_=null},goog.ui.SelectionModel.prototype.selectItem_=function(e,o){e&&("function"==typeof this.selectionHandler_?this.selectionHandler_(e,o):"function"==typeof e.setSelected&&e.setSelected(o))},goog.ui.Palette=function(e,o,t){goog.ui.Control.call(this,e,o||goog.ui.PaletteRenderer.getInstance(),t),this.setAutoStates(goog.ui.Component.State.CHECKED|goog.ui.Component.State.SELECTED|goog.ui.Component.State.OPENED,!1),this.currentCellControl_=new goog.ui.Palette.CurrentCell_,this.currentCellControl_.setParentEventTarget(this),this.lastHighlightedIndex_=-1},goog.inherits(goog.ui.Palette,goog.ui.Control),goog.tagUnsealableClass(goog.ui.Palette),goog.ui.Palette.EventType={AFTER_HIGHLIGHT:goog.events.getUniqueId("afterhighlight")},goog.ui.Palette.prototype.size_=null,goog.ui.Palette.prototype.highlightedIndex_=-1,goog.ui.Palette.prototype.selectionModel_=null,goog.ui.Palette.prototype.disposeInternal=function(){goog.ui.Palette.superClass_.disposeInternal.call(this),this.selectionModel_&&(this.selectionModel_.dispose(),this.selectionModel_=null),this.size_=null,this.currentCellControl_.dispose()},goog.ui.Palette.prototype.setContentInternal=function(e){goog.ui.Palette.superClass_.setContentInternal.call(this,e),this.adjustSize_(),this.selectionModel_?(this.selectionModel_.clear(),this.selectionModel_.addItems(e)):(this.selectionModel_=new goog.ui.SelectionModel(e),this.selectionModel_.setSelectionHandler(goog.bind(this.selectItem_,this)),this.getHandler().listen(this.selectionModel_,goog.events.EventType.SELECT,this.handleSelectionChange)),this.highlightedIndex_=-1},goog.ui.Palette.prototype.getCaption=function(){return""},goog.ui.Palette.prototype.setCaption=function(e){},goog.ui.Palette.prototype.handleMouseOver=function(e){goog.ui.Palette.superClass_.handleMouseOver.call(this,e);var o=this.getRenderer().getContainingItem(this,e.target);o&&e.relatedTarget&&goog.dom.contains(o,e.relatedTarget)||o!=this.getHighlightedItem()&&this.setHighlightedItem(o)},goog.ui.Palette.prototype.handleMouseDown=function(e){goog.ui.Palette.superClass_.handleMouseDown.call(this,e),this.isActive()&&(e=this.getRenderer().getContainingItem(this,e.target),e!=this.getHighlightedItem()&&this.setHighlightedItem(e))},goog.ui.Palette.prototype.performActionInternal=function(e){var o=this.getHighlightedItem();return o?(e&&this.shouldSelectHighlightedItem_(e)&&this.setSelectedItem(o),goog.ui.Palette.superClass_.performActionInternal.call(this,e)):!1},goog.ui.Palette.prototype.shouldSelectHighlightedItem_=function(e){return this.getSelectedItem()?"mouseup"!=e.type?!0:!!this.getRenderer().getContainingItem(this,e.target):!0},goog.ui.Palette.prototype.handleKeyEvent=function(e){var o=this.getContent(),o=o?o.length:0,t=this.size_.width;if(0==o||!this.isEnabled())return!1;if(e.keyCode==goog.events.KeyCodes.ENTER||e.keyCode==goog.events.KeyCodes.SPACE)return this.performActionInternal(e);if(e.keyCode==goog.events.KeyCodes.HOME)return this.setHighlightedIndex(0),!0;if(e.keyCode==goog.events.KeyCodes.END)return this.setHighlightedIndex(o-1),!0;var n=0>this.highlightedIndex_?this.getSelectedIndex():this.highlightedIndex_;switch(e.keyCode){case goog.events.KeyCodes.LEFT:return(-1==n||0==n)&&(n=o),this.setHighlightedIndex(n-1),e.preventDefault(),!0;case goog.events.KeyCodes.RIGHT:return n==o-1&&(n=-1),this.setHighlightedIndex(n+1),e.preventDefault(),!0;case goog.events.KeyCodes.UP:if(-1==n&&(n=o+t-1),n>=t)return this.setHighlightedIndex(n-t),e.preventDefault(),!0;break;case goog.events.KeyCodes.DOWN:if(-1==n&&(n=-t),o-t>n)return this.setHighlightedIndex(n+t),e.preventDefault(),!0}return!1},goog.ui.Palette.prototype.handleSelectionChange=function(e){},goog.ui.Palette.prototype.getSize=function(){return this.size_},goog.ui.Palette.prototype.setSize=function(e,o){if(this.getElement())throw Error(goog.ui.Component.Error.ALREADY_RENDERED);this.size_=goog.isNumber(e)?new goog.math.Size(e,o):e,this.adjustSize_()},goog.ui.Palette.prototype.getHighlightedIndex=function(){return this.highlightedIndex_},goog.ui.Palette.prototype.getHighlightedItem=function(){var e=this.getContent();return e&&e[this.highlightedIndex_]},goog.ui.Palette.prototype.getHighlightedCellElement_=function(){return this.getRenderer().getCellForItem(this.getHighlightedItem())},goog.ui.Palette.prototype.setHighlightedIndex=function(e){e!=this.highlightedIndex_&&(this.highlightIndex_(this.highlightedIndex_,!1),this.lastHighlightedIndex_=this.highlightedIndex_,this.highlightedIndex_=e,this.highlightIndex_(e,!0),this.dispatchEvent(goog.ui.Palette.EventType.AFTER_HIGHLIGHT))},goog.ui.Palette.prototype.setHighlightedItem=function(e){var o=this.getContent();this.setHighlightedIndex(o&&e?goog.array.indexOf(o,e):-1)},goog.ui.Palette.prototype.getSelectedIndex=function(){return this.selectionModel_?this.selectionModel_.getSelectedIndex():-1},goog.ui.Palette.prototype.getSelectedItem=function(){return this.selectionModel_?this.selectionModel_.getSelectedItem():null},goog.ui.Palette.prototype.setSelectedIndex=function(e){this.selectionModel_&&this.selectionModel_.setSelectedIndex(e)},goog.ui.Palette.prototype.setSelectedItem=function(e){this.selectionModel_&&this.selectionModel_.setSelectedItem(e)},goog.ui.Palette.prototype.highlightIndex_=function(e,o){if(this.getElement()){var t=this.getContent();if(t&&e>=0&&e<t.length){var n=this.getHighlightedCellElement_();this.currentCellControl_.getElement()!=n&&this.currentCellControl_.setElementInternal(n),this.currentCellControl_.tryHighlight(o)&&this.getRenderer().highlightCell(this,t[e],o)}}},goog.ui.Palette.prototype.setHighlighted=function(e){e&&-1==this.highlightedIndex_?this.setHighlightedIndex(-1<this.lastHighlightedIndex_?this.lastHighlightedIndex_:0):e||this.setHighlightedIndex(-1),goog.ui.Palette.superClass_.setHighlighted.call(this,e)},goog.ui.Palette.prototype.selectItem_=function(e,o){this.getElement()&&this.getRenderer().selectCell(this,e,o)},goog.ui.Palette.prototype.adjustSize_=function(){var e=this.getContent();e?this.size_&&this.size_.width?(e=Math.ceil(e.length/this.size_.width),(!goog.isNumber(this.size_.height)||this.size_.height<e)&&(this.size_.height=e)):(e=Math.ceil(Math.sqrt(e.length)),this.size_=new goog.math.Size(e,e)):this.size_=new goog.math.Size(0,0)},goog.ui.Palette.CurrentCell_=function(){goog.ui.Control.call(this,null),this.setDispatchTransitionEvents(goog.ui.Component.State.HOVER,!0)},goog.inherits(goog.ui.Palette.CurrentCell_,goog.ui.Control),goog.ui.Palette.CurrentCell_.prototype.tryHighlight=function(e){return this.setHighlighted(e),this.isHighlighted()==e},goog.ui.ColorPalette=function(e,o,t){this.colors_=e||[],goog.ui.Palette.call(this,null,o||goog.ui.PaletteRenderer.getInstance(),t),this.setColors(this.colors_)},goog.inherits(goog.ui.ColorPalette,goog.ui.Palette),goog.tagUnsealableClass(goog.ui.ColorPalette),goog.ui.ColorPalette.prototype.normalizedColors_=null,goog.ui.ColorPalette.prototype.labels_=null,goog.ui.ColorPalette.prototype.getColors=function(){return this.colors_},goog.ui.ColorPalette.prototype.setColors=function(e,o){this.colors_=e,this.labels_=o||null,this.normalizedColors_=null,this.setContent(this.createColorNodes())},goog.ui.ColorPalette.prototype.getSelectedColor=function(){var e=this.getSelectedItem();return e?(e=goog.style.getStyle(e,"background-color"),goog.ui.ColorPalette.parseColor_(e)):null},goog.ui.ColorPalette.prototype.setSelectedColor=function(e){e=goog.ui.ColorPalette.parseColor_(e),this.normalizedColors_||(this.normalizedColors_=goog.array.map(this.colors_,function(e){return goog.ui.ColorPalette.parseColor_(e)})),this.setSelectedIndex(e?goog.array.indexOf(this.normalizedColors_,e):-1)},goog.ui.ColorPalette.prototype.createColorNodes=function(){return goog.array.map(this.colors_,function(e,o){var t=this.getDomHelper().createDom("DIV",{"class":this.getRenderer().getCssClass()+"-colorswatch",style:"background-color:"+e});return t.title=this.labels_&&this.labels_[o]?this.labels_[o]:"#"==e.charAt(0)?"RGB ("+goog.color.hexToRgb(e).join(", ")+")":e,t},this)},goog.ui.ColorPalette.parseColor_=function(e){if(e)try{return goog.color.parse(e).hex}catch(o){}return null},goog.ui.ColorPicker=function(e,o){goog.ui.Component.call(this,e),this.colorPalette_=o||null,this.getHandler().listen(this,goog.ui.Component.EventType.ACTION,this.onColorPaletteAction_)},goog.inherits(goog.ui.ColorPicker,goog.ui.Component),goog.ui.ColorPicker.DEFAULT_NUM_COLS=5,goog.ui.ColorPicker.EventType={CHANGE:"change"},goog.ui.ColorPicker.prototype.focusable_=!0,goog.ui.ColorPicker.prototype.getColors=function(){return this.colorPalette_?this.colorPalette_.getColors():null},goog.ui.ColorPicker.prototype.setColors=function(e){this.colorPalette_?this.colorPalette_.setColors(e):this.createColorPalette_(e)},goog.ui.ColorPicker.prototype.addColors=function(e){this.setColors(e)},goog.ui.ColorPicker.prototype.setSize=function(e){this.colorPalette_||this.createColorPalette_([]),this.colorPalette_.setSize(e)},goog.ui.ColorPicker.prototype.getSize=function(){return this.colorPalette_?this.colorPalette_.getSize():null},goog.ui.ColorPicker.prototype.setColumnCount=function(e){this.setSize(e)},goog.ui.ColorPicker.prototype.getSelectedIndex=function(){return this.colorPalette_?this.colorPalette_.getSelectedIndex():-1},goog.ui.ColorPicker.prototype.setSelectedIndex=function(e){this.colorPalette_&&this.colorPalette_.setSelectedIndex(e)},goog.ui.ColorPicker.prototype.getSelectedColor=function(){return this.colorPalette_?this.colorPalette_.getSelectedColor():null},goog.ui.ColorPicker.prototype.setSelectedColor=function(e){this.colorPalette_&&this.colorPalette_.setSelectedColor(e)},goog.ui.ColorPicker.prototype.isFocusable=function(){return this.focusable_},goog.ui.ColorPicker.prototype.setFocusable=function(e){this.focusable_=e,this.colorPalette_&&this.colorPalette_.setSupportedState(goog.ui.Component.State.FOCUSED,e)},goog.ui.ColorPicker.prototype.canDecorate=function(e){return!1},goog.ui.ColorPicker.prototype.enterDocument=function(){goog.ui.ColorPicker.superClass_.enterDocument.call(this),this.colorPalette_&&this.colorPalette_.render(this.getElement()),this.getElement().unselectable="on"},goog.ui.ColorPicker.prototype.disposeInternal=function(){goog.ui.ColorPicker.superClass_.disposeInternal.call(this),this.colorPalette_&&(this.colorPalette_.dispose(),this.colorPalette_=null)},goog.ui.ColorPicker.prototype.focus=function(){this.colorPalette_&&this.colorPalette_.getElement().focus()},goog.ui.ColorPicker.prototype.onColorPaletteAction_=function(e){e.stopPropagation(),this.dispatchEvent(goog.ui.ColorPicker.EventType.CHANGE)},goog.ui.ColorPicker.prototype.createColorPalette_=function(e){e=new goog.ui.ColorPalette(e,null,this.getDomHelper()),e.setSize(goog.ui.ColorPicker.DEFAULT_NUM_COLS),e.setSupportedState(goog.ui.Component.State.FOCUSED,this.focusable_),this.addChild(e),this.colorPalette_=e,this.isInDocument()&&this.colorPalette_.render(this.getElement())},goog.ui.ColorPicker.createSimpleColorGrid=function(e){return e=new goog.ui.ColorPicker(e),e.setSize(7),e.setColors(goog.ui.ColorPicker.SIMPLE_GRID_COLORS),e},goog.ui.ColorPicker.SIMPLE_GRID_COLORS="#ffffff #cccccc #c0c0c0 #999999 #666666 #333333 #000000 #ffcccc #ff6666 #ff0000 #cc0000 #990000 #660000 #330000 #ffcc99 #ff9966 #ff9900 #ff6600 #cc6600 #993300 #663300 #ffff99 #ffff66 #ffcc66 #ffcc33 #cc9933 #996633 #663333 #ffffcc #ffff33 #ffff00 #ffcc00 #999900 #666600 #333300 #99ff99 #66ff99 #33ff33 #33cc00 #009900 #006600 #003300 #99ffff #33ffff #66cccc #00cccc #339999 #336666 #003333 #ccffff #66ffff #33ccff #3366ff #3333ff #000099 #000066 #ccccff #9999ff #6666cc #6633ff #6600cc #333399 #330099 #ffccff #ff99ff #cc66cc #cc33cc #993399 #663366 #330033".split(" "),goog.events.FocusHandler=function(e){goog.events.EventTarget.call(this),this.element_=e,e=goog.userAgent.IE?"focusout":"blur",this.listenKeyIn_=goog.events.listen(this.element_,goog.userAgent.IE?"focusin":"focus",this,!goog.userAgent.IE),this.listenKeyOut_=goog.events.listen(this.element_,e,this,!goog.userAgent.IE)},goog.inherits(goog.events.FocusHandler,goog.events.EventTarget),goog.events.FocusHandler.EventType={FOCUSIN:"focusin",FOCUSOUT:"focusout"},goog.events.FocusHandler.prototype.handleEvent=function(e){var o=e.getBrowserEvent(),o=new goog.events.BrowserEvent(o);o.type="focusin"==e.type||"focus"==e.type?goog.events.FocusHandler.EventType.FOCUSIN:goog.events.FocusHandler.EventType.FOCUSOUT,this.dispatchEvent(o)},goog.events.FocusHandler.prototype.disposeInternal=function(){goog.events.FocusHandler.superClass_.disposeInternal.call(this),goog.events.unlistenByKey(this.listenKeyIn_),goog.events.unlistenByKey(this.listenKeyOut_),delete this.element_},goog.structs={},goog.structs.getCount=function(e){return e.getCount&&"function"==typeof e.getCount?e.getCount():goog.isArrayLike(e)||goog.isString(e)?e.length:goog.object.getCount(e)},goog.structs.getValues=function(e){if(e.getValues&&"function"==typeof e.getValues)return e.getValues();if(goog.isString(e))return e.split("");if(goog.isArrayLike(e)){for(var o=[],t=e.length,n=0;t>n;n++)o.push(e[n]);return o}return goog.object.getValues(e)},goog.structs.getKeys=function(e){if(e.getKeys&&"function"==typeof e.getKeys)return e.getKeys();if(!e.getValues||"function"!=typeof e.getValues){if(goog.isArrayLike(e)||goog.isString(e)){var o=[];e=e.length;for(var t=0;e>t;t++)o.push(t);return o}return goog.object.getKeys(e)}},goog.structs.contains=function(e,o){return e.contains&&"function"==typeof e.contains?e.contains(o):e.containsValue&&"function"==typeof e.containsValue?e.containsValue(o):goog.isArrayLike(e)||goog.isString(e)?goog.array.contains(e,o):goog.object.containsValue(e,o)},goog.structs.isEmpty=function(e){return e.isEmpty&&"function"==typeof e.isEmpty?e.isEmpty():goog.isArrayLike(e)||goog.isString(e)?goog.array.isEmpty(e):goog.object.isEmpty(e)},goog.structs.clear=function(e){e.clear&&"function"==typeof e.clear?e.clear():goog.isArrayLike(e)?goog.array.clear(e):goog.object.clear(e)},goog.structs.forEach=function(e,o,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(o,t);else if(goog.isArrayLike(e)||goog.isString(e))goog.array.forEach(e,o,t);else for(var n=goog.structs.getKeys(e),r=goog.structs.getValues(e),i=r.length,s=0;i>s;s++)o.call(t,r[s],n&&n[s],e)},goog.structs.filter=function(e,o,t){if("function"==typeof e.filter)return e.filter(o,t);if(goog.isArrayLike(e)||goog.isString(e))return goog.array.filter(e,o,t);var n,r=goog.structs.getKeys(e),i=goog.structs.getValues(e),s=i.length;if(r){n={};for(var l=0;s>l;l++)o.call(t,i[l],r[l],e)&&(n[r[l]]=i[l])}else for(n=[],l=0;s>l;l++)o.call(t,i[l],void 0,e)&&n.push(i[l]);return n},goog.structs.map=function(e,o,t){if("function"==typeof e.map)return e.map(o,t);if(goog.isArrayLike(e)||goog.isString(e))return goog.array.map(e,o,t);var n,r=goog.structs.getKeys(e),i=goog.structs.getValues(e),s=i.length;if(r){n={};for(var l=0;s>l;l++)n[r[l]]=o.call(t,i[l],r[l],e)}else for(n=[],l=0;s>l;l++)n[l]=o.call(t,i[l],void 0,e);return n},goog.structs.some=function(e,o,t){if("function"==typeof e.some)return e.some(o,t);if(goog.isArrayLike(e)||goog.isString(e))return goog.array.some(e,o,t);for(var n=goog.structs.getKeys(e),r=goog.structs.getValues(e),i=r.length,s=0;i>s;s++)if(o.call(t,r[s],n&&n[s],e))return!0;return!1},goog.structs.every=function(e,o,t){if("function"==typeof e.every)return e.every(o,t);if(goog.isArrayLike(e)||goog.isString(e))return goog.array.every(e,o,t);for(var n=goog.structs.getKeys(e),r=goog.structs.getValues(e),i=r.length,s=0;i>s;s++)if(!o.call(t,r[s],n&&n[s],e))return!1;return!0},goog.structs.Collection=function(){},goog.structs.Map=function(e,o){this.map_={},this.keys_=[],this.version_=this.count_=0;var t=arguments.length;if(t>1){if(t%2)throw Error("Uneven number of arguments");for(var n=0;t>n;n+=2)this.set(arguments[n],arguments[n+1])}else e&&this.addAll(e)},goog.structs.Map.prototype.getCount=function(){return this.count_},goog.structs.Map.prototype.getValues=function(){this.cleanupKeysArray_();for(var e=[],o=0;o<this.keys_.length;o++)e.push(this.map_[this.keys_[o]]);return e},goog.structs.Map.prototype.getKeys=function(){return this.cleanupKeysArray_(),this.keys_.concat()},goog.structs.Map.prototype.containsKey=function(e){return goog.structs.Map.hasKey_(this.map_,e)},goog.structs.Map.prototype.containsValue=function(e){for(var o=0;o<this.keys_.length;o++){var t=this.keys_[o];if(goog.structs.Map.hasKey_(this.map_,t)&&this.map_[t]==e)return!0}return!1},goog.structs.Map.prototype.equals=function(e,o){if(this===e)return!0;if(this.count_!=e.getCount())return!1;var t=o||goog.structs.Map.defaultEquals;this.cleanupKeysArray_();for(var n,r=0;n=this.keys_[r];r++)if(!t(this.get(n),e.get(n)))return!1;return!0},goog.structs.Map.defaultEquals=function(e,o){return e===o},goog.structs.Map.prototype.isEmpty=function(){return 0==this.count_},goog.structs.Map.prototype.clear=function(){this.map_={},this.version_=this.count_=this.keys_.length=0},goog.structs.Map.prototype.remove=function(e){return goog.structs.Map.hasKey_(this.map_,e)?(delete this.map_[e],this.count_--,this.version_++,this.keys_.length>2*this.count_&&this.cleanupKeysArray_(),!0):!1},goog.structs.Map.prototype.cleanupKeysArray_=function(){if(this.count_!=this.keys_.length){for(var e=0,o=0;e<this.keys_.length;){var t=this.keys_[e];goog.structs.Map.hasKey_(this.map_,t)&&(this.keys_[o++]=t),e++}this.keys_.length=o}if(this.count_!=this.keys_.length){for(var n={},o=e=0;e<this.keys_.length;)t=this.keys_[e],goog.structs.Map.hasKey_(n,t)||(this.keys_[o++]=t,n[t]=1),e++;this.keys_.length=o}},goog.structs.Map.prototype.get=function(e,o){return goog.structs.Map.hasKey_(this.map_,e)?this.map_[e]:o},goog.structs.Map.prototype.set=function(e,o){goog.structs.Map.hasKey_(this.map_,e)||(this.count_++,this.keys_.push(e),this.version_++),this.map_[e]=o},goog.structs.Map.prototype.addAll=function(e){var o;e instanceof goog.structs.Map?(o=e.getKeys(),e=e.getValues()):(o=goog.object.getKeys(e),e=goog.object.getValues(e));for(var t=0;t<o.length;t++)this.set(o[t],e[t])},goog.structs.Map.prototype.forEach=function(e,o){for(var t=this.getKeys(),n=0;n<t.length;n++){var r=t[n],i=this.get(r);e.call(o,i,r,this)}},goog.structs.Map.prototype.clone=function(){return new goog.structs.Map(this)},goog.structs.Map.prototype.transpose=function(){for(var e=new goog.structs.Map,o=0;o<this.keys_.length;o++){var t=this.keys_[o];e.set(this.map_[t],t)}return e},goog.structs.Map.prototype.toObject=function(){this.cleanupKeysArray_();for(var e={},o=0;o<this.keys_.length;o++){var t=this.keys_[o];e[t]=this.map_[t]}return e},goog.structs.Map.prototype.getKeyIterator=function(){return this.__iterator__(!0)},goog.structs.Map.prototype.getValueIterator=function(){return this.__iterator__(!1)},goog.structs.Map.prototype.__iterator__=function(e){this.cleanupKeysArray_();var o=0,t=this.version_,n=this,r=new goog.iter.Iterator;return r.next=function(){if(t!=n.version_)throw Error("The map has changed since the iterator was created");if(o>=n.keys_.length)throw goog.iter.StopIteration;
+var r=n.keys_[o++];return e?r:n.map_[r]},r},goog.structs.Map.hasKey_=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},goog.structs.Set=function(e){this.map_=new goog.structs.Map,e&&this.addAll(e)},goog.structs.Set.getKey_=function(e){var o=typeof e;return"object"==o&&e||"function"==o?"o"+goog.getUid(e):o.substr(0,1)+e},goog.structs.Set.prototype.getCount=function(){return this.map_.getCount()},goog.structs.Set.prototype.add=function(e){this.map_.set(goog.structs.Set.getKey_(e),e)},goog.structs.Set.prototype.addAll=function(e){e=goog.structs.getValues(e);for(var o=e.length,t=0;o>t;t++)this.add(e[t])},goog.structs.Set.prototype.removeAll=function(e){e=goog.structs.getValues(e);for(var o=e.length,t=0;o>t;t++)this.remove(e[t])},goog.structs.Set.prototype.remove=function(e){return this.map_.remove(goog.structs.Set.getKey_(e))},goog.structs.Set.prototype.clear=function(){this.map_.clear()},goog.structs.Set.prototype.isEmpty=function(){return this.map_.isEmpty()},goog.structs.Set.prototype.contains=function(e){return this.map_.containsKey(goog.structs.Set.getKey_(e))},goog.structs.Set.prototype.containsAll=function(e){return goog.structs.every(e,this.contains,this)},goog.structs.Set.prototype.intersection=function(e){var o=new goog.structs.Set;e=goog.structs.getValues(e);for(var t=0;t<e.length;t++){var n=e[t];this.contains(n)&&o.add(n)}return o},goog.structs.Set.prototype.difference=function(e){var o=this.clone();return o.removeAll(e),o},goog.structs.Set.prototype.getValues=function(){return this.map_.getValues()},goog.structs.Set.prototype.clone=function(){return new goog.structs.Set(this)},goog.structs.Set.prototype.equals=function(e){return this.getCount()==goog.structs.getCount(e)&&this.isSubsetOf(e)},goog.structs.Set.prototype.isSubsetOf=function(e){var o=goog.structs.getCount(e);return this.getCount()>o?!1:(!(e instanceof goog.structs.Set)&&o>5&&(e=new goog.structs.Set(e)),goog.structs.every(this,function(o){return goog.structs.contains(e,o)}))},goog.structs.Set.prototype.__iterator__=function(e){return this.map_.__iterator__(!1)},goog.debug.LOGGING_ENABLED=goog.DEBUG,goog.debug.FORCE_SLOPPY_STACKS=!1,goog.debug.catchErrors=function(e,o,t){t=t||goog.global;var n=t.onerror,r=!!o;goog.userAgent.WEBKIT&&!goog.userAgent.isVersionOrHigher("535.3")&&(r=!r),t.onerror=function(o,t,i,s,l){return n&&n(o,t,i,s,l),e({message:o,fileName:t,line:i,col:s,error:l}),r}},goog.debug.expose=function(e,o){if("undefined"==typeof e)return"undefined";if(null==e)return"NULL";var t,n=[];for(t in e)if(o||!goog.isFunction(e[t])){var r=t+" = ";try{r+=e[t]}catch(i){r+="*** "+i+" ***"}n.push(r)}return n.join("\n")},goog.debug.deepExpose=function(e,o){var t=[],n=function(e,r,i){var s=r+"  ";i=new goog.structs.Set(i);try{if(goog.isDef(e))if(goog.isNull(e))t.push("NULL");else if(goog.isString(e))t.push('"'+e.replace(/\n/g,"\n"+r)+'"');else if(goog.isFunction(e))t.push(String(e).replace(/\n/g,"\n"+r));else if(goog.isObject(e))if(i.contains(e))t.push("*** reference loop detected ***");else{i.add(e),t.push("{");for(var l in e)(o||!goog.isFunction(e[l]))&&(t.push("\n"),t.push(s),t.push(l+" = "),n(e[l],s,i));t.push("\n"+r+"}")}else t.push(e);else t.push("undefined")}catch(g){t.push("*** "+g+" ***")}};return n(e,"",new goog.structs.Set),t.join("")},goog.debug.exposeArray=function(e){for(var o=[],t=0;t<e.length;t++)goog.isArray(e[t])?o.push(goog.debug.exposeArray(e[t])):o.push(e[t]);return"[ "+o.join(", ")+" ]"},goog.debug.exposeException=function(e,o){var t=goog.debug.exposeExceptionAsHtml(e,o);return goog.html.SafeHtml.unwrap(t)},goog.debug.exposeExceptionAsHtml=function(e,o){try{var t=goog.debug.normalizeErrorObject(e),n=goog.debug.createViewSourceUrl_(t.fileName);return goog.html.SafeHtml.concat(goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces("Message: "+t.message+"\nUrl: "),goog.html.SafeHtml.create("a",{href:n,target:"_new"},t.fileName),goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces("\nLine: "+t.lineNumber+"\n\nBrowser stack:\n"+t.stack+"-> [end]\n\nJS stack traversal:\n"+goog.debug.getStacktrace(o)+"-> "))}catch(r){return goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces("Exception trying to expose exception! You win, we lose. "+r)}},goog.debug.createViewSourceUrl_=function(e){return goog.isDefAndNotNull(e)||(e=""),/^https?:\/\//i.test(e)?(e=goog.html.SafeUrl.sanitize(e),goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("view-source scheme plus HTTP/HTTPS URL"),"view-source:"+goog.html.SafeUrl.unwrap(e))):goog.html.SafeUrl.fromConstant(goog.string.Const.from("sanitizedviewsrc"))},goog.debug.normalizeErrorObject=function(e){var o=goog.getObjectByName("window.location.href");if(goog.isString(e))return{message:e,name:"Unknown error",lineNumber:"Not available",fileName:o,stack:"Not available"};var t,n,r=!1;try{t=e.lineNumber||e.line||"Not available"}catch(i){t="Not available",r=!0}try{n=e.fileName||e.filename||e.sourceURL||goog.global.$googDebugFname||o}catch(i){n="Not available",r=!0}return!r&&e.lineNumber&&e.fileName&&e.stack&&e.message&&e.name?e:{message:e.message||"Not available",name:e.name||"UnknownError",lineNumber:t,fileName:n,stack:e.stack||"Not available"}},goog.debug.enhanceError=function(e,o){var t;if(e instanceof Error?t=e:(t=Error(e),Error.captureStackTrace&&Error.captureStackTrace(t,goog.debug.enhanceError)),t.stack||(t.stack=goog.debug.getStacktrace(goog.debug.enhanceError)),o){for(var n=0;t["message"+n];)++n;t["message"+n]=String(o)}return t},goog.debug.getStacktraceSimple=function(e){if(!goog.debug.FORCE_SLOPPY_STACKS){var o=goog.debug.getNativeStackTrace_(goog.debug.getStacktraceSimple);if(o)return o}for(var o=[],t=arguments.callee.caller,n=0;t&&(!e||e>n);){o.push(goog.debug.getFunctionName(t)),o.push("()\n");try{t=t.caller}catch(r){o.push("[exception trying to get caller]\n");break}if(n++,n>=goog.debug.MAX_STACK_DEPTH){o.push("[...long stack...]");break}}return e&&n>=e?o.push("[...reached max depth limit...]"):o.push("[end]"),o.join("")},goog.debug.MAX_STACK_DEPTH=50,goog.debug.getNativeStackTrace_=function(e){var o=Error();if(Error.captureStackTrace)return Error.captureStackTrace(o,e),String(o.stack);try{throw o}catch(t){o=t}return(e=o.stack)?String(e):null},goog.debug.getStacktrace=function(e){var o;return goog.debug.FORCE_SLOPPY_STACKS||(o=goog.debug.getNativeStackTrace_(e||goog.debug.getStacktrace)),o||(o=goog.debug.getStacktraceHelper_(e||arguments.callee.caller,[])),o},goog.debug.getStacktraceHelper_=function(e,o){var t=[];if(goog.array.contains(o,e))t.push("[...circular reference...]");else if(e&&o.length<goog.debug.MAX_STACK_DEPTH){t.push(goog.debug.getFunctionName(e)+"(");for(var n=e.arguments,r=0;n&&r<n.length;r++){r>0&&t.push(", ");var i;switch(i=n[r],typeof i){case"object":i=i?"object":"null";break;case"string":break;case"number":i=String(i);break;case"boolean":i=i?"true":"false";break;case"function":i=(i=goog.debug.getFunctionName(i))?i:"[fn]";break;default:i=typeof i}40<i.length&&(i=i.substr(0,40)+"..."),t.push(i)}o.push(e),t.push(")\n");try{t.push(goog.debug.getStacktraceHelper_(e.caller,o))}catch(s){t.push("[exception trying to get caller]\n")}}else e?t.push("[...long stack...]"):t.push("[end]");return t.join("")},goog.debug.setFunctionResolver=function(e){goog.debug.fnNameResolver_=e},goog.debug.getFunctionName=function(e){if(goog.debug.fnNameCache_[e])return goog.debug.fnNameCache_[e];if(goog.debug.fnNameResolver_){var o=goog.debug.fnNameResolver_(e);if(o)return goog.debug.fnNameCache_[e]=o}return e=String(e),goog.debug.fnNameCache_[e]||(o=/function ([^\(]+)/.exec(e),goog.debug.fnNameCache_[e]=o?o[1]:"[Anonymous]"),goog.debug.fnNameCache_[e]},goog.debug.makeWhitespaceVisible=function(e){return e.replace(/ /g,"[_]").replace(/\f/g,"[f]").replace(/\n/g,"[n]\n").replace(/\r/g,"[r]").replace(/\t/g,"[t]")},goog.debug.runtimeType=function(e){return e instanceof Function?e.displayName||e.name||"unknown type name":e instanceof Object?e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e):null===e?"null":typeof e},goog.debug.fnNameCache_={},goog.debug.LogRecord=function(e,o,t,n,r){this.reset(e,o,t,n,r)},goog.debug.LogRecord.prototype.sequenceNumber_=0,goog.debug.LogRecord.prototype.exception_=null,goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS=!0,goog.debug.LogRecord.nextSequenceNumber_=0,goog.debug.LogRecord.prototype.reset=function(e,o,t,n,r){goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS&&(this.sequenceNumber_="number"==typeof r?r:goog.debug.LogRecord.nextSequenceNumber_++),this.time_=n||goog.now(),this.level_=e,this.msg_=o,this.loggerName_=t,delete this.exception_},goog.debug.LogRecord.prototype.getLoggerName=function(){return this.loggerName_},goog.debug.LogRecord.prototype.getException=function(){return this.exception_},goog.debug.LogRecord.prototype.setException=function(e){this.exception_=e},goog.debug.LogRecord.prototype.setLoggerName=function(e){this.loggerName_=e},goog.debug.LogRecord.prototype.getLevel=function(){return this.level_},goog.debug.LogRecord.prototype.setLevel=function(e){this.level_=e},goog.debug.LogRecord.prototype.getMessage=function(){return this.msg_},goog.debug.LogRecord.prototype.setMessage=function(e){this.msg_=e},goog.debug.LogRecord.prototype.getMillis=function(){return this.time_},goog.debug.LogRecord.prototype.setMillis=function(e){this.time_=e},goog.debug.LogRecord.prototype.getSequenceNumber=function(){return this.sequenceNumber_},goog.debug.LogBuffer=function(){goog.asserts.assert(goog.debug.LogBuffer.isBufferingEnabled(),"Cannot use goog.debug.LogBuffer without defining goog.debug.LogBuffer.CAPACITY."),this.clear()},goog.debug.LogBuffer.getInstance=function(){return goog.debug.LogBuffer.instance_||(goog.debug.LogBuffer.instance_=new goog.debug.LogBuffer),goog.debug.LogBuffer.instance_},goog.debug.LogBuffer.CAPACITY=0,goog.debug.LogBuffer.prototype.addRecord=function(e,o,t){var n=(this.curIndex_+1)%goog.debug.LogBuffer.CAPACITY;return this.curIndex_=n,this.isFull_?(n=this.buffer_[n],n.reset(e,o,t),n):(this.isFull_=n==goog.debug.LogBuffer.CAPACITY-1,this.buffer_[n]=new goog.debug.LogRecord(e,o,t))},goog.debug.LogBuffer.isBufferingEnabled=function(){return 0<goog.debug.LogBuffer.CAPACITY},goog.debug.LogBuffer.prototype.clear=function(){this.buffer_=Array(goog.debug.LogBuffer.CAPACITY),this.curIndex_=-1,this.isFull_=!1},goog.debug.LogBuffer.prototype.forEachRecord=function(e){var o=this.buffer_;if(o[0]){var t=this.curIndex_,n=this.isFull_?t:-1;do n=(n+1)%goog.debug.LogBuffer.CAPACITY,e(o[n]);while(n!=t)}},goog.debug.Logger=function(e){this.name_=e,this.handlers_=this.children_=this.level_=this.parent_=null},goog.debug.Logger.ROOT_LOGGER_NAME="",goog.debug.Logger.ENABLE_HIERARCHY=!0,goog.debug.Logger.ENABLE_HIERARCHY||(goog.debug.Logger.rootHandlers_=[]),goog.debug.Logger.Level=function(e,o){this.name=e,this.value=o},goog.debug.Logger.Level.prototype.toString=function(){return this.name},goog.debug.Logger.Level.OFF=new goog.debug.Logger.Level("OFF",1/0),goog.debug.Logger.Level.SHOUT=new goog.debug.Logger.Level("SHOUT",1200),goog.debug.Logger.Level.SEVERE=new goog.debug.Logger.Level("SEVERE",1e3),goog.debug.Logger.Level.WARNING=new goog.debug.Logger.Level("WARNING",900),goog.debug.Logger.Level.INFO=new goog.debug.Logger.Level("INFO",800),goog.debug.Logger.Level.CONFIG=new goog.debug.Logger.Level("CONFIG",700),goog.debug.Logger.Level.FINE=new goog.debug.Logger.Level("FINE",500),goog.debug.Logger.Level.FINER=new goog.debug.Logger.Level("FINER",400),goog.debug.Logger.Level.FINEST=new goog.debug.Logger.Level("FINEST",300),goog.debug.Logger.Level.ALL=new goog.debug.Logger.Level("ALL",0),goog.debug.Logger.Level.PREDEFINED_LEVELS=[goog.debug.Logger.Level.OFF,goog.debug.Logger.Level.SHOUT,goog.debug.Logger.Level.SEVERE,goog.debug.Logger.Level.WARNING,goog.debug.Logger.Level.INFO,goog.debug.Logger.Level.CONFIG,goog.debug.Logger.Level.FINE,goog.debug.Logger.Level.FINER,goog.debug.Logger.Level.FINEST,goog.debug.Logger.Level.ALL],goog.debug.Logger.Level.predefinedLevelsCache_=null,goog.debug.Logger.Level.createPredefinedLevelsCache_=function(){goog.debug.Logger.Level.predefinedLevelsCache_={};for(var e,o=0;e=goog.debug.Logger.Level.PREDEFINED_LEVELS[o];o++)goog.debug.Logger.Level.predefinedLevelsCache_[e.value]=e,goog.debug.Logger.Level.predefinedLevelsCache_[e.name]=e},goog.debug.Logger.Level.getPredefinedLevel=function(e){return goog.debug.Logger.Level.predefinedLevelsCache_||goog.debug.Logger.Level.createPredefinedLevelsCache_(),goog.debug.Logger.Level.predefinedLevelsCache_[e]||null},goog.debug.Logger.Level.getPredefinedLevelByValue=function(e){if(goog.debug.Logger.Level.predefinedLevelsCache_||goog.debug.Logger.Level.createPredefinedLevelsCache_(),e in goog.debug.Logger.Level.predefinedLevelsCache_)return goog.debug.Logger.Level.predefinedLevelsCache_[e];for(var o=0;o<goog.debug.Logger.Level.PREDEFINED_LEVELS.length;++o){var t=goog.debug.Logger.Level.PREDEFINED_LEVELS[o];if(t.value<=e)return t}return null},goog.debug.Logger.getLogger=function(e){return goog.debug.LogManager.getLogger(e)},goog.debug.Logger.logToProfilers=function(e){goog.global.console&&(goog.global.console.timeStamp?goog.global.console.timeStamp(e):goog.global.console.markTimeline&&goog.global.console.markTimeline(e)),goog.global.msWriteProfilerMark&&goog.global.msWriteProfilerMark(e)},goog.debug.Logger.prototype.getName=function(){return this.name_},goog.debug.Logger.prototype.addHandler=function(e){goog.debug.LOGGING_ENABLED&&(goog.debug.Logger.ENABLE_HIERARCHY?(this.handlers_||(this.handlers_=[]),this.handlers_.push(e)):(goog.asserts.assert(!this.name_,"Cannot call addHandler on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."),goog.debug.Logger.rootHandlers_.push(e)))},goog.debug.Logger.prototype.removeHandler=function(e){if(goog.debug.LOGGING_ENABLED){var o=goog.debug.Logger.ENABLE_HIERARCHY?this.handlers_:goog.debug.Logger.rootHandlers_;return!!o&&goog.array.remove(o,e)}return!1},goog.debug.Logger.prototype.getParent=function(){return this.parent_},goog.debug.Logger.prototype.getChildren=function(){return this.children_||(this.children_={}),this.children_},goog.debug.Logger.prototype.setLevel=function(e){goog.debug.LOGGING_ENABLED&&(goog.debug.Logger.ENABLE_HIERARCHY?this.level_=e:(goog.asserts.assert(!this.name_,"Cannot call setLevel() on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."),goog.debug.Logger.rootLevel_=e))},goog.debug.Logger.prototype.getLevel=function(){return goog.debug.LOGGING_ENABLED?this.level_:goog.debug.Logger.Level.OFF},goog.debug.Logger.prototype.getEffectiveLevel=function(){return goog.debug.LOGGING_ENABLED?goog.debug.Logger.ENABLE_HIERARCHY?this.level_?this.level_:this.parent_?this.parent_.getEffectiveLevel():(goog.asserts.fail("Root logger has no level set."),null):goog.debug.Logger.rootLevel_:goog.debug.Logger.Level.OFF},goog.debug.Logger.prototype.isLoggable=function(e){return goog.debug.LOGGING_ENABLED&&e.value>=this.getEffectiveLevel().value},goog.debug.Logger.prototype.log=function(e,o,t){goog.debug.LOGGING_ENABLED&&this.isLoggable(e)&&(goog.isFunction(o)&&(o=o()),this.doLogRecord_(this.getLogRecord(e,o,t)))},goog.debug.Logger.prototype.getLogRecord=function(e,o,t){return e=goog.debug.LogBuffer.isBufferingEnabled()?goog.debug.LogBuffer.getInstance().addRecord(e,o,this.name_):new goog.debug.LogRecord(e,String(o),this.name_),t&&e.setException(t),e},goog.debug.Logger.prototype.shout=function(e,o){goog.debug.LOGGING_ENABLED&&this.log(goog.debug.Logger.Level.SHOUT,e,o)},goog.debug.Logger.prototype.severe=function(e,o){goog.debug.LOGGING_ENABLED&&this.log(goog.debug.Logger.Level.SEVERE,e,o)},goog.debug.Logger.prototype.warning=function(e,o){goog.debug.LOGGING_ENABLED&&this.log(goog.debug.Logger.Level.WARNING,e,o)},goog.debug.Logger.prototype.info=function(e,o){goog.debug.LOGGING_ENABLED&&this.log(goog.debug.Logger.Level.INFO,e,o)},goog.debug.Logger.prototype.config=function(e,o){goog.debug.LOGGING_ENABLED&&this.log(goog.debug.Logger.Level.CONFIG,e,o)},goog.debug.Logger.prototype.fine=function(e,o){goog.debug.LOGGING_ENABLED&&this.log(goog.debug.Logger.Level.FINE,e,o)},goog.debug.Logger.prototype.finer=function(e,o){goog.debug.LOGGING_ENABLED&&this.log(goog.debug.Logger.Level.FINER,e,o)},goog.debug.Logger.prototype.finest=function(e,o){goog.debug.LOGGING_ENABLED&&this.log(goog.debug.Logger.Level.FINEST,e,o)},goog.debug.Logger.prototype.logRecord=function(e){goog.debug.LOGGING_ENABLED&&this.isLoggable(e.getLevel())&&this.doLogRecord_(e)},goog.debug.Logger.prototype.doLogRecord_=function(e){if(goog.debug.Logger.logToProfilers("log:"+e.getMessage()),goog.debug.Logger.ENABLE_HIERARCHY)for(var o=this;o;)o.callPublish_(e),o=o.getParent();else for(var t,o=0;t=goog.debug.Logger.rootHandlers_[o++];)t(e)},goog.debug.Logger.prototype.callPublish_=function(e){if(this.handlers_)for(var o,t=0;o=this.handlers_[t];t++)o(e)},goog.debug.Logger.prototype.setParent_=function(e){this.parent_=e},goog.debug.Logger.prototype.addChild_=function(e,o){this.getChildren()[e]=o},goog.debug.LogManager={},goog.debug.LogManager.loggers_={},goog.debug.LogManager.rootLogger_=null,goog.debug.LogManager.initialize=function(){goog.debug.LogManager.rootLogger_||(goog.debug.LogManager.rootLogger_=new goog.debug.Logger(goog.debug.Logger.ROOT_LOGGER_NAME),goog.debug.LogManager.loggers_[goog.debug.Logger.ROOT_LOGGER_NAME]=goog.debug.LogManager.rootLogger_,goog.debug.LogManager.rootLogger_.setLevel(goog.debug.Logger.Level.CONFIG))},goog.debug.LogManager.getLoggers=function(){return goog.debug.LogManager.loggers_},goog.debug.LogManager.getRoot=function(){return goog.debug.LogManager.initialize(),goog.debug.LogManager.rootLogger_},goog.debug.LogManager.getLogger=function(e){return goog.debug.LogManager.initialize(),goog.debug.LogManager.loggers_[e]||goog.debug.LogManager.createLogger_(e)},goog.debug.LogManager.createFunctionForCatchErrors=function(e){return function(o){(e||goog.debug.LogManager.getRoot()).severe("Error: "+o.message+" ("+o.fileName+" @ Line: "+o.line+")")}},goog.debug.LogManager.createLogger_=function(e){var o=new goog.debug.Logger(e);if(goog.debug.Logger.ENABLE_HIERARCHY){var t=e.lastIndexOf("."),n=e.substr(0,t),t=e.substr(t+1),n=goog.debug.LogManager.getLogger(n);n.addChild_(t,o),o.setParent_(n)}return goog.debug.LogManager.loggers_[e]=o},goog.log={},goog.log.ENABLED=goog.debug.LOGGING_ENABLED,goog.log.ROOT_LOGGER_NAME=goog.debug.Logger.ROOT_LOGGER_NAME,goog.log.Logger=goog.debug.Logger,goog.log.Level=goog.debug.Logger.Level,goog.log.LogRecord=goog.debug.LogRecord,goog.log.getLogger=function(e,o){if(goog.log.ENABLED){var t=goog.debug.LogManager.getLogger(e);return o&&t&&t.setLevel(o),t}return null},goog.log.addHandler=function(e,o){goog.log.ENABLED&&e&&e.addHandler(o)},goog.log.removeHandler=function(e,o){return goog.log.ENABLED&&e?e.removeHandler(o):!1},goog.log.log=function(e,o,t,n){goog.log.ENABLED&&e&&e.log(o,t,n)},goog.log.error=function(e,o,t){goog.log.ENABLED&&e&&e.severe(o,t)},goog.log.warning=function(e,o,t){goog.log.ENABLED&&e&&e.warning(o,t)},goog.log.info=function(e,o,t){goog.log.ENABLED&&e&&e.info(o,t)},goog.log.fine=function(e,o,t){goog.log.ENABLED&&e&&e.fine(o,t)},goog.string.StringBuffer=function(e,o){null!=e&&this.append.apply(this,arguments)},goog.string.StringBuffer.prototype.buffer_="",goog.string.StringBuffer.prototype.set=function(e){this.buffer_=""+e},goog.string.StringBuffer.prototype.append=function(e,o,t){if(this.buffer_+=String(e),null!=o)for(var n=1;n<arguments.length;n++)this.buffer_+=arguments[n];return this},goog.string.StringBuffer.prototype.clear=function(){this.buffer_=""},goog.string.StringBuffer.prototype.getLength=function(){return this.buffer_.length},goog.string.StringBuffer.prototype.toString=function(){return this.buffer_},goog.ui.tree={},goog.ui.tree.BaseNode=function(e,o,t){goog.ui.Component.call(this,t),this.config_=o||goog.ui.tree.BaseNode.defaultConfig,this.html_=goog.html.SafeHtml.htmlEscapePreservingNewlines(e),this.expanded_=this.selected_=!1,this.toolTip_=null,this.afterLabelHtml_=goog.html.SafeHtml.EMPTY,this.isUserCollapsible_=!0,this.depth_=-1},goog.inherits(goog.ui.tree.BaseNode,goog.ui.Component),goog.ui.tree.BaseNode.EventType={BEFORE_EXPAND:"beforeexpand",EXPAND:"expand",BEFORE_COLLAPSE:"beforecollapse",COLLAPSE:"collapse"},goog.ui.tree.BaseNode.allNodes={},goog.ui.tree.BaseNode.prototype.disposeInternal=function(){goog.ui.tree.BaseNode.superClass_.disposeInternal.call(this),this.tree&&(this.tree.removeNode(this),this.tree=null),this.setElementInternal(null)},goog.ui.tree.BaseNode.prototype.initAccessibility=function(){var e=this.getElement();if(e){var o=this.getLabelElement();if(o&&!o.id&&(o.id=this.getId()+".label"),goog.a11y.aria.setRole(e,"treeitem"),goog.a11y.aria.setState(e,"selected",!1),goog.a11y.aria.setState(e,"expanded",!1),goog.a11y.aria.setState(e,"level",this.getDepth()),o&&goog.a11y.aria.setState(e,"labelledby",o.id),(e=this.getIconElement())&&goog.a11y.aria.setRole(e,"presentation"),(e=this.getExpandIconElement())&&goog.a11y.aria.setRole(e,"presentation"),(e=this.getChildrenElement())&&(goog.a11y.aria.setRole(e,"group"),e.hasChildNodes()))for(e=this.getChildCount(),o=1;e>=o;o++){var t=this.getChildAt(o-1).getElement();goog.asserts.assert(t,"The child element cannot be null"),goog.a11y.aria.setState(t,"setsize",e),goog.a11y.aria.setState(t,"posinset",o)}}},goog.ui.tree.BaseNode.prototype.createDom=function(){var e=this.getDomHelper().safeHtmlToNode(this.toSafeHtml());this.setElementInternal(e)},goog.ui.tree.BaseNode.prototype.enterDocument=function(){goog.ui.tree.BaseNode.superClass_.enterDocument.call(this),goog.ui.tree.BaseNode.allNodes[this.getId()]=this,this.initAccessibility()},goog.ui.tree.BaseNode.prototype.exitDocument=function(){goog.ui.tree.BaseNode.superClass_.exitDocument.call(this),delete goog.ui.tree.BaseNode.allNodes[this.getId()]},goog.ui.tree.BaseNode.prototype.addChildAt=function(e,o,t){goog.asserts.assert(!e.getParent()),goog.asserts.assertInstanceof(e,goog.ui.tree.BaseNode),t=this.getChildAt(o-1);var n=this.getChildAt(o);if(goog.ui.tree.BaseNode.superClass_.addChildAt.call(this,e,o),e.previousSibling_=t,e.nextSibling_=n,t?t.nextSibling_=e:this.firstChild_=e,n?n.previousSibling_=e:this.lastChild_=e,(o=this.getTree())&&e.setTreeInternal(o),e.setDepth_(this.getDepth()+1),this.getElement()&&(this.updateExpandIcon(),this.getExpanded())){o=this.getChildrenElement(),e.getElement()||e.createDom();var r=e.getElement(),i=n&&n.getElement();o.insertBefore(r,i),this.isInDocument()&&e.enterDocument(),n||(t?t.updateExpandIcon():(goog.style.setElementShown(o,!0),this.setExpanded(this.getExpanded())))}},goog.ui.tree.BaseNode.prototype.add=function(e,o){return goog.asserts.assert(!o||o.getParent()==this,"Can only add nodes before siblings"),e.getParent()&&e.getParent().removeChild(e),this.addChildAt(e,o?this.indexOfChild(o):this.getChildCount()),e},goog.ui.tree.BaseNode.prototype.removeChild=function(e,o){var t=this.getTree(),n=t?t.getSelectedItem():null;if((n==e||e.contains(n))&&(t.hasFocus()?(this.select(),goog.Timer.callOnce(this.onTimeoutSelect_,10,this)):this.select()),goog.ui.tree.BaseNode.superClass_.removeChild.call(this,e),this.lastChild_==e&&(this.lastChild_=e.previousSibling_),this.firstChild_==e&&(this.firstChild_=e.nextSibling_),e.previousSibling_&&(e.previousSibling_.nextSibling_=e.nextSibling_),e.nextSibling_&&(e.nextSibling_.previousSibling_=e.previousSibling_),n=e.isLastSibling(),e.tree=null,e.depth_=-1,t&&(t.removeNode(e),this.isInDocument())){if(t=this.getChildrenElement(),e.isInDocument()){var r=e.getElement();t.removeChild(r),e.exitDocument()}n&&(n=this.getLastChild())&&n.updateExpandIcon(),this.hasChildren()||(t.style.display="none",this.updateExpandIcon(),this.updateIcon_())}return e},goog.ui.tree.BaseNode.prototype.remove=goog.ui.tree.BaseNode.prototype.removeChild,goog.ui.tree.BaseNode.prototype.onTimeoutSelect_=function(){this.select()},goog.ui.tree.BaseNode.prototype.getTree=goog.abstractMethod,goog.ui.tree.BaseNode.prototype.getDepth=function(){var e=this.depth_;return 0>e&&(e=this.computeDepth_(),this.setDepth_(e)),e},goog.ui.tree.BaseNode.prototype.computeDepth_=function(){var e=this.getParent();return e?e.getDepth()+1:0},goog.ui.tree.BaseNode.prototype.setDepth_=function(e){if(e!=this.depth_){this.depth_=e;var o=this.getRowElement();if(o){var t=this.getPixelIndent_()+"px";this.isRightToLeft()?o.style.paddingRight=t:o.style.paddingLeft=t}this.forEachChild(function(o){o.setDepth_(e+1)})}},goog.ui.tree.BaseNode.prototype.contains=function(e){for(;e;){if(e==this)return!0;e=e.getParent()}return!1},goog.ui.tree.BaseNode.EMPTY_CHILDREN_=[],goog.ui.tree.BaseNode.prototype.getChildren=function(){var e=[];return this.forEachChild(function(o){e.push(o)}),e},goog.ui.tree.BaseNode.prototype.getFirstChild=function(){return this.getChildAt(0)},goog.ui.tree.BaseNode.prototype.getLastChild=function(){return this.getChildAt(this.getChildCount()-1)},goog.ui.tree.BaseNode.prototype.getPreviousSibling=function(){return this.previousSibling_},goog.ui.tree.BaseNode.prototype.getNextSibling=function(){return this.nextSibling_},goog.ui.tree.BaseNode.prototype.isLastSibling=function(){return!this.nextSibling_},goog.ui.tree.BaseNode.prototype.isSelected=function(){return this.selected_},goog.ui.tree.BaseNode.prototype.select=function(){var e=this.getTree();e&&e.setSelectedItem(this)},goog.ui.tree.BaseNode.prototype.deselect=goog.nullFunction,goog.ui.tree.BaseNode.prototype.setSelectedInternal=function(e){if(this.selected_!=e){this.selected_=e,this.updateRow();var o=this.getElement();o&&(goog.a11y.aria.setState(o,"selected",e),e&&(e=this.getTree().getElement(),goog.asserts.assert(e,"The DOM element for the tree cannot be null"),goog.a11y.aria.setState(e,"activedescendant",this.getId())))}},goog.ui.tree.BaseNode.prototype.getExpanded=function(){return this.expanded_},goog.ui.tree.BaseNode.prototype.setExpandedInternal=function(e){this.expanded_=e},goog.ui.tree.BaseNode.prototype.setExpanded=function(e){var o=e!=this.expanded_;if(!o||this.dispatchEvent(e?goog.ui.tree.BaseNode.EventType.BEFORE_EXPAND:goog.ui.tree.BaseNode.EventType.BEFORE_COLLAPSE)){var t;this.expanded_=e,t=this.getTree();var n=this.getElement();if(this.hasChildren()){if(!e&&t&&this.contains(t.getSelectedItem())&&this.select(),n){if((t=this.getChildrenElement())&&(goog.style.setElementShown(t,e),e&&this.isInDocument()&&!t.hasChildNodes())){var r=[];this.forEachChild(function(e){r.push(e.toSafeHtml())}),goog.dom.safe.setInnerHtml(t,goog.html.SafeHtml.concat(r)),this.forEachChild(function(e){e.enterDocument()})}this.updateExpandIcon()}}else(t=this.getChildrenElement())&&goog.style.setElementShown(t,!1);n&&(this.updateIcon_(),goog.a11y.aria.setState(n,"expanded",e)),o&&this.dispatchEvent(e?goog.ui.tree.BaseNode.EventType.EXPAND:goog.ui.tree.BaseNode.EventType.COLLAPSE)}},goog.ui.tree.BaseNode.prototype.toggle=function(){this.setExpanded(!this.getExpanded())},goog.ui.tree.BaseNode.prototype.expand=function(){this.setExpanded(!0)},goog.ui.tree.BaseNode.prototype.collapse=function(){this.setExpanded(!1)},goog.ui.tree.BaseNode.prototype.collapseChildren=function(){this.forEachChild(function(e){e.collapseAll()})},goog.ui.tree.BaseNode.prototype.collapseAll=function(){this.collapseChildren(),this.collapse()},goog.ui.tree.BaseNode.prototype.expandChildren=function(){this.forEachChild(function(e){e.expandAll()})},goog.ui.tree.BaseNode.prototype.expandAll=function(){this.expandChildren(),this.expand()},goog.ui.tree.BaseNode.prototype.reveal=function(){var e=this.getParent();e&&(e.setExpanded(!0),e.reveal())},goog.ui.tree.BaseNode.prototype.setIsUserCollapsible=function(e){(this.isUserCollapsible_=e)||this.expand(),this.getElement()&&this.updateExpandIcon()},goog.ui.tree.BaseNode.prototype.isUserCollapsible=function(){return this.isUserCollapsible_},goog.ui.tree.BaseNode.prototype.toSafeHtml=function(){var e=this.getTree(),o=!e.getShowLines()||e==this.getParent()&&!e.getShowRootLines()?this.config_.cssChildrenNoLines:this.config_.cssChildren,e=this.getExpanded()&&this.hasChildren(),o={"class":o,style:this.getLineStyle()},t=[];return e&&this.forEachChild(function(e){t.push(e.toSafeHtml())}),e=goog.html.SafeHtml.create("div",o,t),goog.html.SafeHtml.create("div",{"class":this.config_.cssItem,id:this.getId()},[this.getRowSafeHtml(),e])},goog.ui.tree.BaseNode.prototype.getPixelIndent_=function(){return Math.max(0,(this.getDepth()-1)*this.config_.indentWidth)},goog.ui.tree.BaseNode.prototype.getRowSafeHtml=function(){var e={};e["padding-"+(this.isRightToLeft()?"right":"left")]=this.getPixelIndent_()+"px";var e={"class":this.getRowClassName(),style:e},o=[this.getExpandIconSafeHtml(),this.getIconSafeHtml(),this.getLabelSafeHtml()];return goog.html.SafeHtml.create("div",e,o)},goog.ui.tree.BaseNode.prototype.getRowClassName=function(){var e;return e=this.isSelected()?" "+this.config_.cssSelectedRow:"",this.config_.cssTreeRow+e},goog.ui.tree.BaseNode.prototype.getLabelSafeHtml=function(){var e=goog.html.SafeHtml.create("span",{"class":this.config_.cssItemLabel,title:this.getToolTip()||null},this.getSafeHtml());return goog.html.SafeHtml.concat(e,goog.html.SafeHtml.create("span",{},this.getAfterLabelSafeHtml()))},goog.ui.tree.BaseNode.prototype.getAfterLabelHtml=function(){return goog.html.SafeHtml.unwrap(this.getAfterLabelSafeHtml())},goog.ui.tree.BaseNode.prototype.getAfterLabelSafeHtml=function(){return this.afterLabelHtml_},goog.ui.tree.BaseNode.prototype.setAfterLabelSafeHtml=function(e){this.afterLabelHtml_=e;var o=this.getAfterLabelElement();o&&goog.dom.safe.setInnerHtml(o,e)},goog.ui.tree.BaseNode.prototype.getIconSafeHtml=function(){return goog.html.SafeHtml.create("span",{style:{display:"inline-block"},"class":this.getCalculatedIconClass()})},goog.ui.tree.BaseNode.prototype.getCalculatedIconClass=goog.abstractMethod,goog.ui.tree.BaseNode.prototype.getExpandIconSafeHtml=function(){return goog.html.SafeHtml.create("span",{type:"expand",style:{display:"inline-block"},"class":this.getExpandIconClass()})},goog.ui.tree.BaseNode.prototype.getExpandIconClass=function(){var e=this.getTree(),o=!e.getShowLines()||e==this.getParent()&&!e.getShowRootLines(),t=this.config_,n=new goog.string.StringBuffer;if(n.append(t.cssTreeIcon," ",t.cssExpandTreeIcon," "),this.hasChildren()){var r=0;switch(e.getShowExpandIcons()&&this.isUserCollapsible_&&(r=this.getExpanded()?2:1),o||(r=this.isLastSibling()?r+4:r+8),r){case 1:n.append(t.cssExpandTreeIconPlus);break;case 2:n.append(t.cssExpandTreeIconMinus);break;case 4:n.append(t.cssExpandTreeIconL);break;case 5:n.append(t.cssExpandTreeIconLPlus);break;case 6:n.append(t.cssExpandTreeIconLMinus);break;case 8:n.append(t.cssExpandTreeIconT);break;case 9:n.append(t.cssExpandTreeIconTPlus);break;case 10:n.append(t.cssExpandTreeIconTMinus);break;default:n.append(t.cssExpandTreeIconBlank)}}else o?n.append(t.cssExpandTreeIconBlank):this.isLastSibling()?n.append(t.cssExpandTreeIconL):n.append(t.cssExpandTreeIconT);return n.toString()},goog.ui.tree.BaseNode.prototype.getLineStyle=function(){var e=this.getExpanded()&&this.hasChildren();return goog.html.SafeStyle.create({"background-position":this.getBackgroundPosition(),display:e?null:"none"})},goog.ui.tree.BaseNode.prototype.getBackgroundPosition=function(){return(this.isLastSibling()?"-100":(this.getDepth()-1)*this.config_.indentWidth)+"px 0"},goog.ui.tree.BaseNode.prototype.getElement=function(){var e=goog.ui.tree.BaseNode.superClass_.getElement.call(this);return e||(e=this.getDomHelper().getElement(this.getId()),this.setElementInternal(e)),e},goog.ui.tree.BaseNode.prototype.getRowElement=function(){var e=this.getElement();return e?e.firstChild:null},goog.ui.tree.BaseNode.prototype.getExpandIconElement=function(){var e=this.getRowElement();return e?e.firstChild:null},goog.ui.tree.BaseNode.prototype.getIconElement=function(){var e=this.getRowElement();return e?e.childNodes[1]:null},goog.ui.tree.BaseNode.prototype.getLabelElement=function(){var e=this.getRowElement();
+return e&&e.lastChild?e.lastChild.previousSibling:null},goog.ui.tree.BaseNode.prototype.getAfterLabelElement=function(){var e=this.getRowElement();return e?e.lastChild:null},goog.ui.tree.BaseNode.prototype.getChildrenElement=function(){var e=this.getElement();return e?e.lastChild:null},goog.ui.tree.BaseNode.prototype.setIconClass=function(e){this.iconClass_=e,this.isInDocument()&&this.updateIcon_()},goog.ui.tree.BaseNode.prototype.getIconClass=function(){return this.iconClass_},goog.ui.tree.BaseNode.prototype.setExpandedIconClass=function(e){this.expandedIconClass_=e,this.isInDocument()&&this.updateIcon_()},goog.ui.tree.BaseNode.prototype.getExpandedIconClass=function(){return this.expandedIconClass_},goog.ui.tree.BaseNode.prototype.setText=function(e){this.setSafeHtml(goog.html.SafeHtml.htmlEscape(e))},goog.ui.tree.BaseNode.prototype.getText=function(){return goog.string.unescapeEntities(goog.html.SafeHtml.unwrap(this.html_))},goog.ui.tree.BaseNode.prototype.setSafeHtml=function(e){this.html_=e;var o=this.getLabelElement();o&&goog.dom.safe.setInnerHtml(o,e),(e=this.getTree())&&e.setNode(this)},goog.ui.tree.BaseNode.prototype.getHtml=function(){return goog.html.SafeHtml.unwrap(this.getSafeHtml())},goog.ui.tree.BaseNode.prototype.getSafeHtml=function(){return this.html_},goog.ui.tree.BaseNode.prototype.setToolTip=function(e){this.toolTip_=e;var o=this.getLabelElement();o&&(o.title=e)},goog.ui.tree.BaseNode.prototype.getToolTip=function(){return this.toolTip_},goog.ui.tree.BaseNode.prototype.updateRow=function(){var e=this.getRowElement();e&&(e.className=this.getRowClassName())},goog.ui.tree.BaseNode.prototype.updateExpandIcon=function(){var e=this.getExpandIconElement();e&&(e.className=this.getExpandIconClass()),(e=this.getChildrenElement())&&(e.style.backgroundPosition=this.getBackgroundPosition())},goog.ui.tree.BaseNode.prototype.updateIcon_=function(){this.getIconElement().className=this.getCalculatedIconClass()},goog.ui.tree.BaseNode.prototype.onMouseDown=function(e){"expand"==e.target.getAttribute("type")&&this.hasChildren()?this.isUserCollapsible_&&this.toggle():(this.select(),this.updateRow())},goog.ui.tree.BaseNode.prototype.onClick_=goog.events.Event.preventDefault,goog.ui.tree.BaseNode.prototype.onDoubleClick_=function(e){"expand"==e.target.getAttribute("type")&&this.hasChildren()||this.isUserCollapsible_&&this.toggle()},goog.ui.tree.BaseNode.prototype.onKeyDown=function(e){var o=!0;switch(e.keyCode){case goog.events.KeyCodes.RIGHT:if(e.altKey)break;this.hasChildren()&&(this.getExpanded()?this.getFirstChild().select():this.setExpanded(!0));break;case goog.events.KeyCodes.LEFT:if(e.altKey)break;if(this.hasChildren()&&this.getExpanded()&&this.isUserCollapsible_)this.setExpanded(!1);else{var t=this.getParent(),n=this.getTree();t&&(n.getShowRootNode()||t!=n)&&t.select()}break;case goog.events.KeyCodes.DOWN:(t=this.getNextShownNode())&&t.select();break;case goog.events.KeyCodes.UP:(t=this.getPreviousShownNode())&&t.select();break;default:o=!1}return o&&(e.preventDefault(),(n=this.getTree())&&n.clearTypeAhead()),o},goog.ui.tree.BaseNode.prototype.getLastShownDescendant=function(){return this.getExpanded()&&this.hasChildren()?this.getLastChild().getLastShownDescendant():this},goog.ui.tree.BaseNode.prototype.getNextShownNode=function(){if(this.hasChildren()&&this.getExpanded())return this.getFirstChild();for(var e,o=this;o!=this.getTree();){if(e=o.getNextSibling(),null!=e)return e;o=o.getParent()}return null},goog.ui.tree.BaseNode.prototype.getPreviousShownNode=function(){var e=this.getPreviousSibling();if(null!=e)return e.getLastShownDescendant();var e=this.getParent(),o=this.getTree();return!o.getShowRootNode()&&e==o||this==o?null:e},goog.ui.tree.BaseNode.prototype.getClientData=goog.ui.tree.BaseNode.prototype.getModel,goog.ui.tree.BaseNode.prototype.setClientData=goog.ui.tree.BaseNode.prototype.setModel,goog.ui.tree.BaseNode.prototype.getConfig=function(){return this.config_},goog.ui.tree.BaseNode.prototype.setTreeInternal=function(e){this.tree!=e&&(this.tree=e,e.setNode(this),this.forEachChild(function(o){o.setTreeInternal(e)}))},goog.ui.tree.BaseNode.defaultConfig={indentWidth:19,cssRoot:"goog-tree-root goog-tree-item",cssHideRoot:"goog-tree-hide-root",cssItem:"goog-tree-item",cssChildren:"goog-tree-children",cssChildrenNoLines:"goog-tree-children-nolines",cssTreeRow:"goog-tree-row",cssItemLabel:"goog-tree-item-label",cssTreeIcon:"goog-tree-icon",cssExpandTreeIcon:"goog-tree-expand-icon",cssExpandTreeIconPlus:"goog-tree-expand-icon-plus",cssExpandTreeIconMinus:"goog-tree-expand-icon-minus",cssExpandTreeIconTPlus:"goog-tree-expand-icon-tplus",cssExpandTreeIconTMinus:"goog-tree-expand-icon-tminus",cssExpandTreeIconLPlus:"goog-tree-expand-icon-lplus",cssExpandTreeIconLMinus:"goog-tree-expand-icon-lminus",cssExpandTreeIconT:"goog-tree-expand-icon-t",cssExpandTreeIconL:"goog-tree-expand-icon-l",cssExpandTreeIconBlank:"goog-tree-expand-icon-blank",cssExpandedFolderIcon:"goog-tree-expanded-folder-icon",cssCollapsedFolderIcon:"goog-tree-collapsed-folder-icon",cssFileIcon:"goog-tree-file-icon",cssExpandedRootIcon:"goog-tree-expanded-folder-icon",cssCollapsedRootIcon:"goog-tree-collapsed-folder-icon",cssSelectedRow:"selected"},goog.ui.tree.TreeNode=function(e,o,t){goog.ui.tree.BaseNode.call(this,e,o,t)},goog.inherits(goog.ui.tree.TreeNode,goog.ui.tree.BaseNode),goog.ui.tree.TreeNode.prototype.getTree=function(){if(this.tree)return this.tree;var e=this.getParent();return e&&(e=e.getTree())?(this.setTreeInternal(e),e):null},goog.ui.tree.TreeNode.prototype.getCalculatedIconClass=function(){var e=this.getExpanded(),o=this.getExpandedIconClass();if(e&&o)return o;if(o=this.getIconClass(),!e&&o)return o;if(o=this.getConfig(),this.hasChildren()){if(e&&o.cssExpandedFolderIcon)return o.cssTreeIcon+" "+o.cssExpandedFolderIcon;if(!e&&o.cssCollapsedFolderIcon)return o.cssTreeIcon+" "+o.cssCollapsedFolderIcon}else if(o.cssFileIcon)return o.cssTreeIcon+" "+o.cssFileIcon;return""},goog.structs.Trie=function(e){this.value_=void 0,this.childNodes_={},e&&this.setAll(e)},goog.structs.Trie.prototype.set=function(e,o){this.setOrAdd_(e,o,!1)},goog.structs.Trie.prototype.add=function(e,o){this.setOrAdd_(e,o,!0)},goog.structs.Trie.prototype.setOrAdd_=function(e,o,t){for(var n=this,r=0;r<e.length;r++){var i=e.charAt(r);n.childNodes_[i]||(n.childNodes_[i]=new goog.structs.Trie),n=n.childNodes_[i]}if(t&&void 0!==n.value_)throw Error('The collection already contains the key "'+e+'"');n.value_=o},goog.structs.Trie.prototype.setAll=function(e){var o=goog.structs.getKeys(e);e=goog.structs.getValues(e);for(var t=0;t<o.length;t++)this.set(o[t],e[t])},goog.structs.Trie.prototype.getChildNode_=function(e){for(var o=this,t=0;t<e.length;t++){var n=e.charAt(t),o=o.childNodes_[n];if(!o)return}return o},goog.structs.Trie.prototype.get=function(e){return(e=this.getChildNode_(e))?e.value_:void 0},goog.structs.Trie.prototype.getKeyAndPrefixes=function(e,o){var t=this,n={},r=o||0;for(void 0!==t.value_&&(n[r]=t.value_);r<e.length;r++){var i=e.charAt(r);if(!(i in t.childNodes_))break;t=t.childNodes_[i],void 0!==t.value_&&(n[r]=t.value_)}return n},goog.structs.Trie.prototype.getValues=function(){var e=[];return this.getValuesInternal_(e),e},goog.structs.Trie.prototype.getValuesInternal_=function(e){void 0!==this.value_&&e.push(this.value_);for(var o in this.childNodes_)this.childNodes_[o].getValuesInternal_(e)},goog.structs.Trie.prototype.getKeys=function(e){var o=[];if(e){for(var t=this,n=0;n<e.length;n++){var r=e.charAt(n);if(!t.childNodes_[r])return[];t=t.childNodes_[r]}t.getKeysInternal_(e,o)}else this.getKeysInternal_("",o);return o},goog.structs.Trie.prototype.getKeysInternal_=function(e,o){void 0!==this.value_&&o.push(e);for(var t in this.childNodes_)this.childNodes_[t].getKeysInternal_(e+t,o)},goog.structs.Trie.prototype.containsKey=function(e){return void 0!==this.get(e)},goog.structs.Trie.prototype.containsPrefix=function(e){return 0==e.length?!this.isEmpty():!!this.getChildNode_(e)},goog.structs.Trie.prototype.containsValue=function(e){if(this.value_===e)return!0;for(var o in this.childNodes_)if(this.childNodes_[o].containsValue(e))return!0;return!1},goog.structs.Trie.prototype.clear=function(){this.childNodes_={},this.value_=void 0},goog.structs.Trie.prototype.remove=function(e){for(var o=this,t=[],n=0;n<e.length;n++){var r=e.charAt(n);if(!o.childNodes_[r])throw Error('The collection does not have the key "'+e+'"');t.push([o,r]),o=o.childNodes_[r]}for(e=o.value_,delete o.value_;0<t.length&&(r=t.pop(),o=r[0],r=r[1],o.childNodes_[r].isEmpty());)delete o.childNodes_[r];return e},goog.structs.Trie.prototype.clone=function(){return new goog.structs.Trie(this)},goog.structs.Trie.prototype.getCount=function(){return goog.structs.getCount(this.getValues())},goog.structs.Trie.prototype.isEmpty=function(){return void 0===this.value_&&goog.object.isEmpty(this.childNodes_)},goog.ui.tree.TypeAhead=function(){this.nodeMap_=new goog.structs.Trie,this.buffer_="",this.matchingNodes_=this.matchingLabels_=null,this.matchingNodeIndex_=this.matchingLabelIndex_=0},goog.ui.tree.TypeAhead.Offset={DOWN:1,UP:-1},goog.ui.tree.TypeAhead.prototype.handleNavigation=function(e){var o=!1;switch(e.keyCode){case goog.events.KeyCodes.DOWN:case goog.events.KeyCodes.UP:e.ctrlKey&&(this.jumpTo_(e.keyCode==goog.events.KeyCodes.DOWN?goog.ui.tree.TypeAhead.Offset.DOWN:goog.ui.tree.TypeAhead.Offset.UP),o=!0);break;case goog.events.KeyCodes.BACKSPACE:e=this.buffer_.length-1,o=!0,e>0?(this.buffer_=this.buffer_.substring(0,e),this.jumpToLabel_(this.buffer_)):0==e?this.buffer_="":o=!1;break;case goog.events.KeyCodes.ESC:this.buffer_="",o=!0}return o},goog.ui.tree.TypeAhead.prototype.handleTypeAheadChar=function(e){var o=!1;return e.ctrlKey||e.altKey||(e=String.fromCharCode(e.charCode||e.keyCode).toLowerCase(),goog.string.isUnicodeChar(e)&&(" "!=e||this.buffer_)&&(this.buffer_+=e,o=this.jumpToLabel_(this.buffer_))),o},goog.ui.tree.TypeAhead.prototype.setNodeInMap=function(e){var o=e.getText();if(o&&!goog.string.isEmptyOrWhitespace(goog.string.makeSafe(o))){var o=o.toLowerCase(),t=this.nodeMap_.get(o);t?t.push(e):this.nodeMap_.set(o,[e])}},goog.ui.tree.TypeAhead.prototype.removeNodeFromMap=function(e){var o=e.getText();if(o&&!goog.string.isEmptyOrWhitespace(goog.string.makeSafe(o))){var o=o.toLowerCase(),t=this.nodeMap_.get(o);if(t){for(var n=e.getChildCount(),r=0;n>r;r++)this.removeNodeFromMap(e.getChildAt(r));goog.array.remove(t,e),t.length||this.nodeMap_.remove(o)}}},goog.ui.tree.TypeAhead.prototype.jumpToLabel_=function(e){var o=!1;return(e=this.nodeMap_.getKeys(e))&&e.length&&(this.matchingLabelIndex_=this.matchingNodeIndex_=0,o=this.nodeMap_.get(e[0]),o=this.selectMatchingNode_(o))&&(this.matchingLabels_=e),o},goog.ui.tree.TypeAhead.prototype.jumpTo_=function(e){var o=!1,t=this.matchingLabels_;if(t){var o=null,n=!1;if(this.matchingNodes_){var r=this.matchingNodeIndex_+e;r>=0&&r<this.matchingNodes_.length?(this.matchingNodeIndex_=r,o=this.matchingNodes_):n=!0}o||(r=this.matchingLabelIndex_+e,r>=0&&r<t.length&&(this.matchingLabelIndex_=r),t.length>this.matchingLabelIndex_&&(o=this.nodeMap_.get(t[this.matchingLabelIndex_])),o&&o.length&&n&&(this.matchingNodeIndex_=e==goog.ui.tree.TypeAhead.Offset.UP?o.length-1:0)),(o=this.selectMatchingNode_(o))&&(this.matchingLabels_=t)}return o},goog.ui.tree.TypeAhead.prototype.selectMatchingNode_=function(e){var o;return e&&(this.matchingNodeIndex_<e.length&&(o=e[this.matchingNodeIndex_],this.matchingNodes_=e),o&&(o.reveal(),o.select())),!!o},goog.ui.tree.TypeAhead.prototype.clear=function(){this.buffer_=""},goog.ui.tree.TreeControl=function(e,o,t){if(goog.ui.tree.BaseNode.call(this,e,o,t),this.setExpandedInternal(!0),this.setSelectedInternal(!0),this.selectedItem_=this,this.typeAhead_=new goog.ui.tree.TypeAhead,this.focusHandler_=this.keyHandler_=null,this.logger_=goog.log.getLogger("this"),this.focused_=!1,this.focusedNode_=null,this.showRootLines_=this.showRootNode_=this.showExpandIcons_=this.showLines_=!0,goog.userAgent.IE)try{document.execCommand("BackgroundImageCache",!1,!0)}catch(n){goog.log.warning(this.logger_,"Failed to enable background image cache")}},goog.inherits(goog.ui.tree.TreeControl,goog.ui.tree.BaseNode),goog.ui.tree.TreeControl.prototype.getTree=function(){return this},goog.ui.tree.TreeControl.prototype.getDepth=function(){return 0},goog.ui.tree.TreeControl.prototype.reveal=function(){},goog.ui.tree.TreeControl.prototype.handleFocus_=function(e){this.focused_=!0,goog.dom.classlist.add(goog.asserts.assert(this.getElement()),"focused"),this.selectedItem_&&this.selectedItem_.select()},goog.ui.tree.TreeControl.prototype.handleBlur_=function(e){this.focused_=!1,goog.dom.classlist.remove(goog.asserts.assert(this.getElement()),"focused")},goog.ui.tree.TreeControl.prototype.hasFocus=function(){return this.focused_},goog.ui.tree.TreeControl.prototype.getExpanded=function(){return!this.showRootNode_||goog.ui.tree.TreeControl.superClass_.getExpanded.call(this)},goog.ui.tree.TreeControl.prototype.setExpanded=function(e){this.showRootNode_?goog.ui.tree.TreeControl.superClass_.setExpanded.call(this,e):this.setExpandedInternal(e)},goog.ui.tree.TreeControl.prototype.getExpandIconSafeHtml=function(){return goog.html.SafeHtml.EMPTY},goog.ui.tree.TreeControl.prototype.getIconElement=function(){var e=this.getRowElement();return e?e.firstChild:null},goog.ui.tree.TreeControl.prototype.getExpandIconElement=function(){return null},goog.ui.tree.TreeControl.prototype.updateExpandIcon=function(){},goog.ui.tree.TreeControl.prototype.getRowClassName=function(){return goog.ui.tree.TreeControl.superClass_.getRowClassName.call(this)+(this.showRootNode_?"":" "+this.getConfig().cssHideRoot)},goog.ui.tree.TreeControl.prototype.getCalculatedIconClass=function(){var e=this.getExpanded(),o=this.getExpandedIconClass();return e&&o?o:(o=this.getIconClass(),!e&&o?o:(o=this.getConfig(),e&&o.cssExpandedRootIcon?o.cssTreeIcon+" "+o.cssExpandedRootIcon:!e&&o.cssCollapsedRootIcon?o.cssTreeIcon+" "+o.cssCollapsedRootIcon:""))},goog.ui.tree.TreeControl.prototype.setSelectedItem=function(e){if(this.selectedItem_!=e){var o=!1;this.selectedItem_&&(o=this.selectedItem_==this.focusedNode_,this.selectedItem_.setSelectedInternal(!1)),(this.selectedItem_=e)&&(e.setSelectedInternal(!0),o&&e.select()),this.dispatchEvent(goog.events.EventType.CHANGE)}},goog.ui.tree.TreeControl.prototype.getSelectedItem=function(){return this.selectedItem_},goog.ui.tree.TreeControl.prototype.setShowLines=function(e){this.showLines_!=e&&(this.showLines_=e,this.isInDocument()&&this.updateLinesAndExpandIcons_())},goog.ui.tree.TreeControl.prototype.getShowLines=function(){return this.showLines_},goog.ui.tree.TreeControl.prototype.updateLinesAndExpandIcons_=function(){function e(r){var i=r.getChildrenElement();if(i){var s=!t||o==r.getParent()&&!n?r.getConfig().cssChildrenNoLines:r.getConfig().cssChildren;i.className=s,(i=r.getExpandIconElement())&&(i.className=r.getExpandIconClass())}r.forEachChild(e)}var o=this,t=o.getShowLines(),n=o.getShowRootLines();e(this)},goog.ui.tree.TreeControl.prototype.setShowRootLines=function(e){this.showRootLines_!=e&&(this.showRootLines_=e,this.isInDocument()&&this.updateLinesAndExpandIcons_())},goog.ui.tree.TreeControl.prototype.getShowRootLines=function(){return this.showRootLines_},goog.ui.tree.TreeControl.prototype.setShowExpandIcons=function(e){this.showExpandIcons_!=e&&(this.showExpandIcons_=e,this.isInDocument()&&this.updateLinesAndExpandIcons_())},goog.ui.tree.TreeControl.prototype.getShowExpandIcons=function(){return this.showExpandIcons_},goog.ui.tree.TreeControl.prototype.setShowRootNode=function(e){if(this.showRootNode_!=e){if(this.showRootNode_=e,this.isInDocument()){var o=this.getRowElement();o&&(o.className=this.getRowClassName())}!e&&this.getSelectedItem()==this&&this.getFirstChild()&&this.setSelectedItem(this.getFirstChild())}},goog.ui.tree.TreeControl.prototype.getShowRootNode=function(){return this.showRootNode_},goog.ui.tree.TreeControl.prototype.initAccessibility=function(){goog.ui.tree.TreeControl.superClass_.initAccessibility.call(this);var e=this.getElement();goog.asserts.assert(e,"The DOM element for the tree cannot be null."),goog.a11y.aria.setRole(e,"tree"),goog.a11y.aria.setState(e,"labelledby",this.getLabelElement().id)},goog.ui.tree.TreeControl.prototype.enterDocument=function(){goog.ui.tree.TreeControl.superClass_.enterDocument.call(this);var e=this.getElement();e.className=this.getConfig().cssRoot,e.setAttribute("hideFocus","true"),this.attachEvents_(),this.initAccessibility()},goog.ui.tree.TreeControl.prototype.exitDocument=function(){goog.ui.tree.TreeControl.superClass_.exitDocument.call(this),this.detachEvents_()},goog.ui.tree.TreeControl.prototype.attachEvents_=function(){var e=this.getElement();e.tabIndex=0;var o=this.keyHandler_=new goog.events.KeyHandler(e),t=this.focusHandler_=new goog.events.FocusHandler(e);this.getHandler().listen(t,goog.events.FocusHandler.EventType.FOCUSOUT,this.handleBlur_).listen(t,goog.events.FocusHandler.EventType.FOCUSIN,this.handleFocus_).listen(o,goog.events.KeyHandler.EventType.KEY,this.handleKeyEvent).listen(e,goog.events.EventType.MOUSEDOWN,this.handleMouseEvent_).listen(e,goog.events.EventType.CLICK,this.handleMouseEvent_).listen(e,goog.events.EventType.DBLCLICK,this.handleMouseEvent_)},goog.ui.tree.TreeControl.prototype.detachEvents_=function(){this.keyHandler_.dispose(),this.keyHandler_=null,this.focusHandler_.dispose(),this.focusHandler_=null},goog.ui.tree.TreeControl.prototype.handleMouseEvent_=function(e){goog.log.fine(this.logger_,"Received event "+e.type);var o=this.getNodeFromEvent_(e);if(o)switch(e.type){case goog.events.EventType.MOUSEDOWN:o.onMouseDown(e);break;case goog.events.EventType.CLICK:o.onClick_(e);break;case goog.events.EventType.DBLCLICK:o.onDoubleClick_(e)}},goog.ui.tree.TreeControl.prototype.handleKeyEvent=function(e){var o;return(o=this.typeAhead_.handleNavigation(e)||this.selectedItem_&&this.selectedItem_.onKeyDown(e)||this.typeAhead_.handleTypeAheadChar(e))&&e.preventDefault(),o},goog.ui.tree.TreeControl.prototype.getNodeFromEvent_=function(e){for(var o=e.target;null!=o;){if(e=goog.ui.tree.BaseNode.allNodes[o.id])return e;if(o==this.getElement())break;o=o.parentNode}return null},goog.ui.tree.TreeControl.prototype.createNode=function(e){return new goog.ui.tree.TreeNode(e||goog.html.SafeHtml.EMPTY,this.getConfig(),this.getDomHelper())},goog.ui.tree.TreeControl.prototype.setNode=function(e){this.typeAhead_.setNodeInMap(e)},goog.ui.tree.TreeControl.prototype.removeNode=function(e){this.typeAhead_.removeNodeFromMap(e)},goog.ui.tree.TreeControl.prototype.clearTypeAhead=function(){this.typeAhead_.clear()},goog.ui.tree.TreeControl.defaultConfig=goog.ui.tree.BaseNode.defaultConfig;var Blockly={Blocks:{}};Blockly.Touch={},Blockly.Touch.touchIdentifier_=null,Blockly.Touch.onTouchUpWrapper_=null,Blockly.Touch.TOUCH_MAP={},goog.events.BrowserFeature.TOUCH_ENABLED&&(Blockly.Touch.TOUCH_MAP={mousedown:["touchstart"],mousemove:["touchmove"],mouseup:["touchend","touchcancel"]}),Blockly.longPid_=0,Blockly.longStart_=function(e,o){Blockly.longStop_(),Blockly.longPid_=setTimeout(function(){e.button=2,o.onMouseDown_(e)},Blockly.LONGPRESS)},Blockly.longStop_=function(){Blockly.longPid_&&(clearTimeout(Blockly.longPid_),Blockly.longPid_=0)},Blockly.onMouseUp_=function(e){e=Blockly.getMainWorkspace(),e.dragMode_!=Blockly.DRAG_NONE&&(Blockly.Touch.clearTouchIdentifier(),Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN),e.dragMode_=Blockly.DRAG_NONE,Blockly.Touch.onTouchUpWrapper_&&(Blockly.unbindEvent_(Blockly.Touch.onTouchUpWrapper_),Blockly.Touch.onTouchUpWrapper_=null),Blockly.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.onMouseMoveWrapper_),Blockly.onMouseMoveWrapper_=null))},Blockly.onMouseMove_=function(e){var o=Blockly.getMainWorkspace();if(o.dragMode_!=Blockly.DRAG_NONE){var t=e.clientX-o.startDragMouseX,n=e.clientY-o.startDragMouseY,r=o.startDragMetrics,i=o.startScrollX+t,s=o.startScrollY+n,i=Math.min(i,-r.contentLeft),s=Math.min(s,-r.contentTop),i=Math.max(i,r.viewWidth-r.contentLeft-r.contentWidth),s=Math.max(s,r.viewHeight-r.contentTop-r.contentHeight);o.scrollbar.set(-i-r.contentLeft,-s-r.contentTop),Math.sqrt(t*t+n*n)>Blockly.DRAG_RADIUS&&(Blockly.longStop_(),o.dragMode_=Blockly.DRAG_FREE),e.stopPropagation(),e.preventDefault()}},Blockly.Touch.clearTouchIdentifier=function(){Blockly.Touch.touchIdentifier_=null},Blockly.Touch.shouldHandleEvent=function(e){return!Blockly.Touch.isMouseOrTouchEvent(e)||Blockly.Touch.checkTouchIdentifier(e)},Blockly.Touch.checkTouchIdentifier=function(e){var o=e.changedTouches&&e.changedTouches[0]&&void 0!=e.changedTouches[0].identifier&&null!=e.changedTouches[0].identifier?e.changedTouches[0].identifier:"mouse";return void 0!=Blockly.Touch.touchIdentifier_&&null!=Blockly.Touch.touchIdentifier_?Blockly.Touch.touchIdentifier_==o:"mousedown"==e.type||"touchstart"==e.type?(Blockly.Touch.touchIdentifier_=o,!0):!1},Blockly.Touch.setClientFromTouch=function(e){if(goog.string.startsWith(e.type,"touch")){var o=e.changedTouches[0];e.clientX=o.clientX,e.clientY=o.clientY}},Blockly.Touch.isMouseOrTouchEvent=function(e){return goog.string.startsWith(e.type,"touch")||goog.string.startsWith(e.type,"mouse")},Blockly.Touch.splitEventByTouches=function(e){var o=[];if(e.changedTouches)for(var t=0;t<e.changedTouches.length;t++)o[t]={type:e.type,changedTouches:[e.changedTouches[t]],target:e.target,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()}};else o.push(e);return o},Blockly.Workspace=function(e){this.id=Blockly.genUid(),Blockly.Workspace.WorkspaceDB_[this.id]=this,this.options=e||{},this.RTL=!!this.options.RTL,this.horizontalLayout=!!this.options.horizontalLayout,this.toolboxPosition=this.options.toolboxPosition,this.topBlocks_=[],this.listeners_=[],this.undoStack_=[],this.redoStack_=[],this.blockDB_=Object.create(null),this.variableList=[]},Blockly.Workspace.prototype.rendered=!1,Blockly.Workspace.prototype.MAX_UNDO=1024,Blockly.Workspace.prototype.dispose=function(){this.listeners_.length=0,this.clear(),delete Blockly.Workspace.WorkspaceDB_[this.id]},Blockly.Workspace.SCAN_ANGLE=3,Blockly.Workspace.prototype.addTopBlock=function(e){if(this.topBlocks_.push(e),this.isFlyout){e=Blockly.Variables.allUsedVariables(e);for(var o=0;o<e.length;o++)-1==this.variableList.indexOf(e[o])&&this.variableList.push(e[o])}},Blockly.Workspace.prototype.removeTopBlock=function(e){if(!goog.array.remove(this.topBlocks_,e))throw"Block not present in workspace's list of top-most blocks."},Blockly.Workspace.prototype.getTopBlocks=function(e){var o=[].concat(this.topBlocks_);if(e&&1<o.length){var t=Math.sin(goog.math.toRadians(Blockly.Workspace.SCAN_ANGLE));this.RTL&&(t*=-1),o.sort(function(e,o){var n=e.getRelativeToSurfaceXY(),r=o.getRelativeToSurfaceXY();return n.y+t*n.x-(r.y+t*r.x)})}return o},Blockly.Workspace.prototype.getAllBlocks=function(){for(var e=this.getTopBlocks(!1),o=0;o<e.length;o++)e.push.apply(e,e[o].getChildren());return e},Blockly.Workspace.prototype.clear=function(){var e=Blockly.Events.getGroup();for(e||Blockly.Events.setGroup(!0);this.topBlocks_.length;)this.topBlocks_[0].dispose();e||Blockly.Events.setGroup(!1),this.variableList.length=0},Blockly.Workspace.prototype.updateVariableList=function(e){if(!this.isFlyout){e&&(this.variableList.length=0),e=Blockly.Variables.allUsedVariables(this);for(var o=0;o<e.length;o++)this.createVariable(e[o])}},Blockly.Workspace.prototype.renameVariable=function(e,o){var t=this.variableIndexOf(e),n=this.variableIndexOf(o);if(-1!=n&&this.variableList[n]!=o)var r=this.variableList[n];Blockly.Events.setGroup(!0);for(var i=this.getAllBlocks(),s=0;s<i.length;s++)i[s].renameVar(e,o),r&&i[s].renameVar(r,o);Blockly.Events.setGroup(!1),t==n||-1!=t&&-1==n?this.variableList[t]=o:-1!=t&&-1!=n?(this.variableList[n]=o,this.variableList.splice(t,1)):(this.variableList.push(o),console.log("Tried to rename an non-existent variable."))},Blockly.Workspace.prototype.createVariable=function(e){-1==this.variableIndexOf(e)&&this.variableList.push(e)},Blockly.Workspace.prototype.getVariableUses=function(e){for(var o=[],t=this.getAllBlocks(),n=0;n<t.length;n++){var r=t[n].getVars();if(r)for(var i=0;i<r.length;i++){var s=r[i];s&&Blockly.Names.equals(s,e)&&o.push(t[n])}}return o},Blockly.Workspace.prototype.deleteVariable=function(e){var o=this,t=this.variableIndexOf(e);if(-1!=t){for(var n,r=function(){Blockly.Events.setGroup(!0);for(var e=0;e<i.length;e++)i[e].dispose(!0,!1);Blockly.Events.setGroup(!1),o.variableList.splice(t,1)},i=this.getVariableUses(e),s=0;n=i[s];s++)if("procedures_defnoreturn"==n.type||"procedures_defreturn"==n.type)return s=n.getFieldValue("NAME"),void Blockly.alert(Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE.replace("%1",e).replace("%2",s));1<i.length?Blockly.confirm(Blockly.Msg.DELETE_VARIABLE_CONFIRMATION.replace("%1",i.length).replace("%2",e),function(e){e&&r()}):r()}},Blockly.Workspace.prototype.variableIndexOf=function(e){for(var o,t=0;o=this.variableList[t];t++)if(Blockly.Names.equals(o,e))return t;return-1},Blockly.Workspace.prototype.getWidth=function(){return 0},Blockly.Workspace.prototype.newBlock=function(e,o){return new Blockly.Block(this,e,o)},Blockly.Workspace.prototype.remainingCapacity=function(){return isNaN(this.options.maxBlocks)?1/0:this.options.maxBlocks-this.getAllBlocks().length},Blockly.Workspace.prototype.undo=function(e){var o=e?this.redoStack_:this.undoStack_,t=e?this.undoStack_:this.redoStack_,n=o.pop();if(n){for(var r=[n];o.length&&n.group&&n.group==o[o.length-1].group;)r.push(o.pop());for(o=0;n=r[o];o++)t.push(n);for(r=Blockly.Events.filter(r,e),Blockly.Events.recordUndo=!1,o=0;n=r[o];o++)n.run(e);Blockly.Events.recordUndo=!0}},Blockly.Workspace.prototype.clearUndo=function(){this.undoStack_.length=0,this.redoStack_.length=0,Blockly.Events.clearPendingUndo()},Blockly.Workspace.prototype.addChangeListener=function(e){return this.listeners_.push(e),e},Blockly.Workspace.prototype.removeChangeListener=function(e){goog.array.remove(this.listeners_,e)},Blockly.Workspace.prototype.fireChangeListener=function(e){e.recordUndo&&(this.undoStack_.push(e),this.redoStack_.length=0,this.undoStack_.length>this.MAX_UNDO&&this.undoStack_.unshift());for(var o,t=0;o=this.listeners_[t];t++)o(e)},Blockly.Workspace.prototype.getBlockById=function(e){return this.blockDB_[e]||null},Blockly.Workspace.WorkspaceDB_=Object.create(null),Blockly.Workspace.getById=function(e){return Blockly.Workspace.WorkspaceDB_[e]||null},Blockly.Workspace.prototype.clear=Blockly.Workspace.prototype.clear,Blockly.Workspace.prototype.clearUndo=Blockly.Workspace.prototype.clearUndo,Blockly.Workspace.prototype.addChangeListener=Blockly.Workspace.prototype.addChangeListener,Blockly.Workspace.prototype.removeChangeListener=Blockly.Workspace.prototype.removeChangeListener,Blockly.Bubble=function(e,o,t,n,r,i){this.workspace_=e,this.content_=o,this.shape_=t,t=Blockly.Bubble.ARROW_ANGLE,this.workspace_.RTL&&(t=-t),this.arrow_radians_=goog.math.toRadians(t),e.getBubbleCanvas().appendChild(this.createDom_(o,!(!r||!i))),this.setAnchorLocation(n),r&&i||(o=this.content_.getBBox(),r=o.width+2*Blockly.Bubble.BORDER_WIDTH,i=o.height+2*Blockly.Bubble.BORDER_WIDTH),this.setBubbleSize(r,i),this.positionBubble_(),this.renderArrow_(),this.rendered_=!0,e.options.readOnly||(Blockly.bindEventWithChecks_(this.bubbleBack_,"mousedown",this,this.bubbleMouseDown_),this.resizeGroup_&&Blockly.bindEventWithChecks_(this.resizeGroup_,"mousedown",this,this.resizeMouseDown_))},Blockly.Bubble.BORDER_WIDTH=6,Blockly.Bubble.ARROW_THICKNESS=5,Blockly.Bubble.ARROW_ANGLE=20,Blockly.Bubble.ARROW_BEND=4,Blockly.Bubble.ANCHOR_RADIUS=8,Blockly.Bubble.onMouseUpWrapper_=null,Blockly.Bubble.onMouseMoveWrapper_=null,Blockly.Bubble.prototype.resizeCallback_=null,Blockly.Bubble.unbindDragEvents_=function(){Blockly.Bubble.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Bubble.onMouseUpWrapper_),Blockly.Bubble.onMouseUpWrapper_=null),Blockly.Bubble.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.Bubble.onMouseMoveWrapper_),Blockly.Bubble.onMouseMoveWrapper_=null)},Blockly.Bubble.bubbleMouseUp_=function(){Blockly.Touch.clearTouchIdentifier(),Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN),Blockly.Bubble.unbindDragEvents_()},Blockly.Bubble.prototype.rendered_=!1,Blockly.Bubble.prototype.anchorXY_=null,Blockly.Bubble.prototype.relativeLeft_=0,Blockly.Bubble.prototype.relativeTop_=0,Blockly.Bubble.prototype.width_=0,Blockly.Bubble.prototype.height_=0,Blockly.Bubble.prototype.autoLayout_=!0,Blockly.Bubble.prototype.createDom_=function(e,o){this.bubbleGroup_=Blockly.createSvgElement("g",{},null);var t={filter:"url(#"+this.workspace_.options.embossFilterId+")"};return-1!=goog.userAgent.getUserAgentString().indexOf("JavaFX")&&(t={}),t=Blockly.createSvgElement("g",t,this.bubbleGroup_),this.bubbleArrow_=Blockly.createSvgElement("path",{},t),this.bubbleBack_=Blockly.createSvgElement("rect",{"class":"blocklyDraggable",x:0,y:0,rx:Blockly.Bubble.BORDER_WIDTH,ry:Blockly.Bubble.BORDER_WIDTH},t),o?(this.resizeGroup_=Blockly.createSvgElement("g",{"class":this.workspace_.RTL?"blocklyResizeSW":"blocklyResizeSE"},this.bubbleGroup_),t=2*Blockly.Bubble.BORDER_WIDTH,Blockly.createSvgElement("polygon",{points:"0,x x,x x,0".replace(/x/g,t.toString())},this.resizeGroup_),Blockly.createSvgElement("line",{"class":"blocklyResizeLine",x1:t/3,y1:t-1,x2:t-1,y2:t/3},this.resizeGroup_),Blockly.createSvgElement("line",{"class":"blocklyResizeLine",x1:2*t/3,y1:t-1,x2:t-1,y2:2*t/3},this.resizeGroup_)):this.resizeGroup_=null,this.bubbleGroup_.appendChild(e),this.bubbleGroup_},Blockly.Bubble.prototype.bubbleMouseDown_=function(e){this.promote_(),Blockly.Bubble.unbindDragEvents_(),Blockly.isRightButton(e)?e.stopPropagation():Blockly.isTargetInput_(e)||(Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED),this.workspace_.startDrag(e,new goog.math.Coordinate(this.workspace_.RTL?-this.relativeLeft_:this.relativeLeft_,this.relativeTop_)),Blockly.Bubble.onMouseUpWrapper_=Blockly.bindEventWithChecks_(document,"mouseup",this,Blockly.Bubble.bubbleMouseUp_),Blockly.Bubble.onMouseMoveWrapper_=Blockly.bindEventWithChecks_(document,"mousemove",this,this.bubbleMouseMove_),Blockly.hideChaff(),e.stopPropagation())},Blockly.Bubble.prototype.bubbleMouseMove_=function(e){this.autoLayout_=!1,e=this.workspace_.moveDrag(e),this.relativeLeft_=this.workspace_.RTL?-e.x:e.x,this.relativeTop_=e.y,this.positionBubble_(),this.renderArrow_()},Blockly.Bubble.prototype.resizeMouseDown_=function(e){this.promote_(),Blockly.Bubble.unbindDragEvents_(),Blockly.isRightButton(e)||(Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED),this.workspace_.startDrag(e,new goog.math.Coordinate(this.workspace_.RTL?-this.width_:this.width_,this.height_)),Blockly.Bubble.onMouseUpWrapper_=Blockly.bindEventWithChecks_(document,"mouseup",this,Blockly.Bubble.bubbleMouseUp_),Blockly.Bubble.onMouseMoveWrapper_=Blockly.bindEventWithChecks_(document,"mousemove",this,this.resizeMouseMove_),Blockly.hideChaff()),e.stopPropagation()},Blockly.Bubble.prototype.resizeMouseMove_=function(e){this.autoLayout_=!1,e=this.workspace_.moveDrag(e),this.setBubbleSize(this.workspace_.RTL?-e.x:e.x,e.y),this.workspace_.RTL&&this.positionBubble_()},Blockly.Bubble.prototype.registerResizeEvent=function(e){this.resizeCallback_=e},Blockly.Bubble.prototype.promote_=function(){this.bubbleGroup_.parentNode.appendChild(this.bubbleGroup_)},Blockly.Bubble.prototype.setAnchorLocation=function(e){this.anchorXY_=e,this.rendered_&&this.positionBubble_()},Blockly.Bubble.prototype.layoutBubble_=function(){var e=-this.width_/4,o=-this.height_-Blockly.BlockSvg.MIN_BLOCK_Y,t=this.workspace_.getMetrics();t.viewWidth/=this.workspace_.scale,t.viewLeft/=this.workspace_.scale;var n=this.anchorXY_.x;this.workspace_.RTL?n-t.viewLeft-e-this.width_<Blockly.Scrollbar.scrollbarThickness?e=n-t.viewLeft-this.width_-Blockly.Scrollbar.scrollbarThickness:n-t.viewLeft-e>t.viewWidth&&(e=n-t.viewLeft-t.viewWidth):n+e<t.viewLeft?e=t.viewLeft-n:t.viewLeft+t.viewWidth<n+e+this.width_+Blockly.BlockSvg.SEP_SPACE_X+Blockly.Scrollbar.scrollbarThickness&&(e=t.viewLeft+t.viewWidth-n-this.width_-Blockly.Scrollbar.scrollbarThickness),
+this.anchorXY_.y+o<t.viewTop&&(o=this.shape_.getBBox().height),this.relativeLeft_=e,this.relativeTop_=o},Blockly.Bubble.prototype.positionBubble_=function(){var e=this.anchorXY_.x,e=this.workspace_.RTL?e-(this.relativeLeft_+this.width_):e+this.relativeLeft_;this.bubbleGroup_.setAttribute("transform","translate("+e+","+(this.relativeTop_+this.anchorXY_.y)+")")},Blockly.Bubble.prototype.getBubbleSize=function(){return{width:this.width_,height:this.height_}},Blockly.Bubble.prototype.setBubbleSize=function(e,o){var t=2*Blockly.Bubble.BORDER_WIDTH;e=Math.max(e,t+45),o=Math.max(o,t+20),this.width_=e,this.height_=o,this.bubbleBack_.setAttribute("width",e),this.bubbleBack_.setAttribute("height",o),this.resizeGroup_&&(this.workspace_.RTL?this.resizeGroup_.setAttribute("transform","translate("+2*Blockly.Bubble.BORDER_WIDTH+","+(o-t)+") scale(-1 1)"):this.resizeGroup_.setAttribute("transform","translate("+(e-t)+","+(o-t)+")")),this.rendered_&&(this.autoLayout_&&this.layoutBubble_(),this.positionBubble_(),this.renderArrow_()),this.resizeCallback_&&this.resizeCallback_()},Blockly.Bubble.prototype.renderArrow_=function(){var e=[],o=this.width_/2,t=this.height_/2,n=-this.relativeLeft_,r=-this.relativeTop_;if(o==n&&t==r)e.push("M "+o+","+t);else{r-=t,n-=o,this.workspace_.RTL&&(n*=-1);var i=Math.sqrt(r*r+n*n),s=Math.acos(n/i);0>r&&(s=2*Math.PI-s);var l=s+Math.PI/2;l>2*Math.PI&&(l-=2*Math.PI);var g=Math.sin(l),a=Math.cos(l),c=this.getBubbleSize(),l=(c.width+c.height)/Blockly.Bubble.ARROW_THICKNESS,l=Math.min(l,c.width,c.height)/4,c=1-Blockly.Bubble.ANCHOR_RADIUS/i,n=o+c*n,r=t+c*r,c=o+l*a,u=t+l*g,o=o-l*a,t=t-l*g,g=s+this.arrow_radians_;g>2*Math.PI&&(g-=2*Math.PI),s=Math.sin(g)*i/Blockly.Bubble.ARROW_BEND,i=Math.cos(g)*i/Blockly.Bubble.ARROW_BEND,e.push("M"+c+","+u),e.push("C"+(c+i)+","+(u+s)+" "+n+","+r+" "+n+","+r),e.push("C"+n+","+r+" "+(o+i)+","+(t+s)+" "+o+","+t)}e.push("z"),this.bubbleArrow_.setAttribute("d",e.join(" "))},Blockly.Bubble.prototype.setColour=function(e){this.bubbleBack_.setAttribute("fill",e),this.bubbleArrow_.setAttribute("fill",e)},Blockly.Bubble.prototype.dispose=function(){Blockly.Bubble.unbindDragEvents_(),goog.dom.removeNode(this.bubbleGroup_),this.shape_=this.content_=this.workspace_=this.resizeGroup_=this.bubbleBack_=this.bubbleArrow_=this.bubbleGroup_=null},Blockly.Icon=function(e){this.block_=e},Blockly.Icon.prototype.collapseHidden=!0,Blockly.Icon.prototype.SIZE=17,Blockly.Icon.prototype.bubble_=null,Blockly.Icon.prototype.iconXY_=null,Blockly.Icon.prototype.createIcon=function(){this.iconGroup_||(this.iconGroup_=Blockly.createSvgElement("g",{"class":"blocklyIconGroup"},null),this.block_.isInFlyout&&Blockly.addClass_(this.iconGroup_,"blocklyIconGroupReadonly"),this.drawIcon_(this.iconGroup_),this.block_.getSvgRoot().appendChild(this.iconGroup_),Blockly.bindEventWithChecks_(this.iconGroup_,"mouseup",this,this.iconClick_),this.updateEditable())},Blockly.Icon.prototype.dispose=function(){goog.dom.removeNode(this.iconGroup_),this.iconGroup_=null,this.setVisible(!1),this.block_=null},Blockly.Icon.prototype.updateEditable=function(){},Blockly.Icon.prototype.isVisible=function(){return!!this.bubble_},Blockly.Icon.prototype.iconClick_=function(e){this.block_.workspace.isDragging()||this.block_.isInFlyout||Blockly.isRightButton(e)||this.setVisible(!this.isVisible())},Blockly.Icon.prototype.updateColour=function(){this.isVisible()&&this.bubble_.setColour(this.block_.getColour())},Blockly.Icon.prototype.renderIcon=function(e){if(this.collapseHidden&&this.block_.isCollapsed())return this.iconGroup_.setAttribute("display","none"),e;this.iconGroup_.setAttribute("display","block");var o=this.SIZE;return this.block_.RTL&&(e-=o),this.iconGroup_.setAttribute("transform","translate("+e+",5)"),this.computeIconLocation(),e=this.block_.RTL?e-Blockly.BlockSvg.SEP_SPACE_X:e+(o+Blockly.BlockSvg.SEP_SPACE_X)},Blockly.Icon.prototype.setIconLocation=function(e){this.iconXY_=e,this.isVisible()&&this.bubble_.setAnchorLocation(e)},Blockly.Icon.prototype.computeIconLocation=function(){var e=this.block_.getRelativeToSurfaceXY(),o=Blockly.getRelativeXY_(this.iconGroup_),e=new goog.math.Coordinate(e.x+o.x+this.SIZE/2,e.y+o.y+this.SIZE/2);goog.math.Coordinate.equals(this.getIconLocation(),e)||this.setIconLocation(e)},Blockly.Icon.prototype.getIconLocation=function(){return this.iconXY_},Blockly.Comment=function(e){Blockly.Comment.superClass_.constructor.call(this,e),this.createIcon()},goog.inherits(Blockly.Comment,Blockly.Icon),Blockly.Comment.prototype.text_="",Blockly.Comment.prototype.width_=160,Blockly.Comment.prototype.height_=80,Blockly.Comment.prototype.drawIcon_=function(e){Blockly.createSvgElement("circle",{"class":"blocklyIconShape",r:"8",cx:"8",cy:"8"},e),Blockly.createSvgElement("path",{"class":"blocklyIconSymbol",d:"m6.8,10h2c0.003,-0.617 0.271,-0.962 0.633,-1.266 2.875,-2.405 0.607,-5.534 -3.765,-3.874v1.7c3.12,-1.657 3.698,0.118 2.336,1.25 -1.201,0.998 -1.201,1.528 -1.204,2.19z"},e),Blockly.createSvgElement("rect",{"class":"blocklyIconSymbol",x:"6.8",y:"10.78",height:"2",width:"2"},e)},Blockly.Comment.prototype.createEditor_=function(){this.foreignObject_=Blockly.createSvgElement("foreignObject",{x:Blockly.Bubble.BORDER_WIDTH,y:Blockly.Bubble.BORDER_WIDTH},null);var e=document.createElementNS(Blockly.HTML_NS,"body");e.setAttribute("xmlns",Blockly.HTML_NS),e.className="blocklyMinimalBody";var o=document.createElementNS(Blockly.HTML_NS,"textarea");return o.className="blocklyCommentTextarea",o.setAttribute("dir",this.block_.RTL?"RTL":"LTR"),e.appendChild(o),this.textarea_=o,this.foreignObject_.appendChild(e),Blockly.bindEventWithChecks_(o,"mouseup",this,this.textareaFocus_),Blockly.bindEventWithChecks_(o,"wheel",this,function(e){e.stopPropagation()}),Blockly.bindEventWithChecks_(o,"change",this,function(e){this.text_!=o.value&&(Blockly.Events.fire(new Blockly.Events.Change(this.block_,"comment",null,this.text_,o.value)),this.text_=o.value)}),setTimeout(function(){o.focus()},0),this.foreignObject_},Blockly.Comment.prototype.updateEditable=function(){this.isVisible()&&(this.setVisible(!1),this.setVisible(!0)),Blockly.Icon.prototype.updateEditable.call(this)},Blockly.Comment.prototype.resizeBubble_=function(){if(this.isVisible()){var e=this.bubble_.getBubbleSize(),o=2*Blockly.Bubble.BORDER_WIDTH;this.foreignObject_.setAttribute("width",e.width-o),this.foreignObject_.setAttribute("height",e.height-o),this.textarea_.style.width=e.width-o-4+"px",this.textarea_.style.height=e.height-o-4+"px"}},Blockly.Comment.prototype.setVisible=function(e){if(e!=this.isVisible())if(Blockly.Events.fire(new Blockly.Events.Ui(this.block_,"commentOpen",!e,e)),!this.block_.isEditable()&&!this.textarea_||goog.userAgent.IE)Blockly.Warning.prototype.setVisible.call(this,e);else{var o=this.getText(),t=this.getBubbleSize();e?(this.bubble_=new Blockly.Bubble(this.block_.workspace,this.createEditor_(),this.block_.svgPath_,this.iconXY_,this.width_,this.height_),this.bubble_.registerResizeEvent(this.resizeBubble_.bind(this)),this.updateColour()):(this.bubble_.dispose(),this.foreignObject_=this.textarea_=this.bubble_=null),this.setText(o),this.setBubbleSize(t.width,t.height)}},Blockly.Comment.prototype.textareaFocus_=function(e){this.bubble_.promote_(),this.textarea_.focus()},Blockly.Comment.prototype.getBubbleSize=function(){return this.isVisible()?this.bubble_.getBubbleSize():{width:this.width_,height:this.height_}},Blockly.Comment.prototype.setBubbleSize=function(e,o){this.textarea_?this.bubble_.setBubbleSize(e,o):(this.width_=e,this.height_=o)},Blockly.Comment.prototype.getText=function(){return this.textarea_?this.textarea_.value:this.text_},Blockly.Comment.prototype.setText=function(e){this.text_!=e&&(Blockly.Events.fire(new Blockly.Events.Change(this.block_,"comment",null,this.text_,e)),this.text_=e),this.textarea_&&(this.textarea_.value=e)},Blockly.Comment.prototype.dispose=function(){Blockly.Events.isEnabled()&&this.setText(""),this.block_.comment=null,Blockly.Icon.prototype.dispose.call(this)},Blockly.Connection=function(e,o){this.sourceBlock_=e,this.type=o,e.workspace.connectionDBList&&(this.db_=e.workspace.connectionDBList[o],this.dbOpposite_=e.workspace.connectionDBList[Blockly.OPPOSITE_TYPE[o]],this.hidden_=!this.db_)},Blockly.Connection.CAN_CONNECT=0,Blockly.Connection.REASON_SELF_CONNECTION=1,Blockly.Connection.REASON_WRONG_TYPE=2,Blockly.Connection.REASON_TARGET_NULL=3,Blockly.Connection.REASON_CHECKS_FAILED=4,Blockly.Connection.REASON_DIFFERENT_WORKSPACES=5,Blockly.Connection.REASON_SHADOW_PARENT=6,Blockly.Connection.prototype.targetConnection=null,Blockly.Connection.prototype.check_=null,Blockly.Connection.prototype.shadowDom_=null,Blockly.Connection.prototype.x_=0,Blockly.Connection.prototype.y_=0,Blockly.Connection.prototype.inDB_=!1,Blockly.Connection.prototype.db_=null,Blockly.Connection.prototype.dbOpposite_=null,Blockly.Connection.prototype.hidden_=null,Blockly.Connection.prototype.connect_=function(e){var o=this,t=o.getSourceBlock(),n=e.getSourceBlock();if(e.isConnected()&&e.disconnect(),o.isConnected()){var r=o.targetBlock(),i=o.getShadowDom();if(o.setShadowDom(null),r.isShadow())i=Blockly.Xml.blockToDom(r),r.dispose(),r=null;else if(o.type==Blockly.INPUT_VALUE){if(!r.outputConnection)throw"Orphan block does not have an output connection.";var s=Blockly.Connection.lastConnectionInRow_(n,r);s&&(r.outputConnection.connect(s),r=null)}else if(o.type==Blockly.NEXT_STATEMENT){if(!r.previousConnection)throw"Orphan block does not have a previous connection.";for(s=n;s.nextConnection;){var l=s.getNextBlock();if(!l||l.isShadow()){r.previousConnection.checkType_(s.nextConnection)&&(s.nextConnection.connect(r.previousConnection),r=null);break}s=l}}if(r&&(o.disconnect(),Blockly.Events.recordUndo)){var g=Blockly.Events.getGroup();setTimeout(function(){r.workspace&&!r.getParent()&&(Blockly.Events.setGroup(g),r.outputConnection?r.outputConnection.bumpAwayFrom_(o):r.previousConnection&&r.previousConnection.bumpAwayFrom_(o),Blockly.Events.setGroup(!1))},Blockly.BUMP_DELAY)}o.setShadowDom(i)}var a;Blockly.Events.isEnabled()&&(a=new Blockly.Events.Move(n)),Blockly.Connection.connectReciprocally_(o,e),n.setParent(t),a&&(a.recordNew(),Blockly.Events.fire(a))},Blockly.Connection.prototype.dispose=function(){if(this.isConnected())throw"Disconnect connection before disposing of it.";this.inDB_&&this.db_.removeConnection_(this),Blockly.highlightedConnection_==this&&(Blockly.highlightedConnection_=null),Blockly.localConnection_==this&&(Blockly.localConnection_=null),this.dbOpposite_=this.db_=null},Blockly.Connection.prototype.getSourceBlock=function(){return this.sourceBlock_},Blockly.Connection.prototype.isSuperior=function(){return this.type==Blockly.INPUT_VALUE||this.type==Blockly.NEXT_STATEMENT},Blockly.Connection.prototype.isConnected=function(){return!!this.targetConnection},Blockly.Connection.prototype.canConnectWithReason_=function(e){if(!e)return Blockly.Connection.REASON_TARGET_NULL;if(this.isSuperior())var o=this.sourceBlock_,t=e.getSourceBlock();else t=this.sourceBlock_,o=e.getSourceBlock();return o&&o==t?Blockly.Connection.REASON_SELF_CONNECTION:e.type!=Blockly.OPPOSITE_TYPE[this.type]?Blockly.Connection.REASON_WRONG_TYPE:o&&t&&o.workspace!==t.workspace?Blockly.Connection.REASON_DIFFERENT_WORKSPACES:this.checkType_(e)?o.isShadow()&&!t.isShadow()?Blockly.Connection.REASON_SHADOW_PARENT:Blockly.Connection.CAN_CONNECT:Blockly.Connection.REASON_CHECKS_FAILED},Blockly.Connection.prototype.checkConnection_=function(e){switch(this.canConnectWithReason_(e)){case Blockly.Connection.CAN_CONNECT:break;case Blockly.Connection.REASON_SELF_CONNECTION:throw"Attempted to connect a block to itself.";case Blockly.Connection.REASON_DIFFERENT_WORKSPACES:throw"Blocks not on same workspace.";case Blockly.Connection.REASON_WRONG_TYPE:throw"Attempt to connect incompatible types.";case Blockly.Connection.REASON_TARGET_NULL:throw"Target connection is null.";case Blockly.Connection.REASON_CHECKS_FAILED:throw"Connection checks failed.";case Blockly.Connection.REASON_SHADOW_PARENT:throw"Connecting non-shadow to shadow block.";default:throw"Unknown connection failure: this should never happen!"}},Blockly.Connection.prototype.isConnectionAllowed=function(e){return this.canConnectWithReason_(e)!=Blockly.Connection.CAN_CONNECT?!1:e.type!=Blockly.OUTPUT_VALUE&&e.type!=Blockly.PREVIOUS_STATEMENT||!e.isConnected()&&!this.isConnected()?e.type==Blockly.INPUT_VALUE&&e.isConnected()&&!e.targetBlock().isMovable()&&!e.targetBlock().isShadow()||this.type==Blockly.PREVIOUS_STATEMENT&&e.isConnected()&&!this.sourceBlock_.nextConnection&&!e.targetBlock().isShadow()&&e.targetBlock().nextConnection||-1!=Blockly.draggingConnections_.indexOf(e)?!1:!0:!1},Blockly.Connection.prototype.connect=function(e){this.targetConnection!=e&&(this.checkConnection_(e),this.isSuperior()?this.connect_(e):e.connect_(this))},Blockly.Connection.connectReciprocally_=function(e,o){goog.asserts.assert(e&&o,"Cannot connect null connections."),e.targetConnection=o,o.targetConnection=e},Blockly.Connection.singleConnection_=function(e,o){for(var t=!1,n=0;n<e.inputList.length;n++){var r=e.inputList[n].connection;if(r&&r.type==Blockly.INPUT_VALUE&&o.outputConnection.checkType_(r)){if(t)return null;t=r}}return t},Blockly.Connection.lastConnectionInRow_=function(e,o){for(var t,n=e;t=Blockly.Connection.singleConnection_(n,o);)if(n=t.targetBlock(),!n||n.isShadow())return t;return null},Blockly.Connection.prototype.disconnect=function(){var e=this.targetConnection;goog.asserts.assert(e,"Source connection not connected."),goog.asserts.assert(e.targetConnection==this,"Target connection not connected to source connection.");var o,t;this.isSuperior()?(o=this.sourceBlock_,t=e.getSourceBlock(),e=this):(o=e.getSourceBlock(),t=this.sourceBlock_),this.disconnectInternal_(o,t),e.respawnShadow_()},Blockly.Connection.prototype.disconnectInternal_=function(e,o){var t;Blockly.Events.isEnabled()&&(t=new Blockly.Events.Move(o)),this.targetConnection=this.targetConnection.targetConnection=null,o.setParent(null),t&&(t.recordNew(),Blockly.Events.fire(t))},Blockly.Connection.prototype.respawnShadow_=function(){var e=this.getSourceBlock(),o=this.getShadowDom();if(e.workspace&&o&&Blockly.Events.recordUndo)if(e=Blockly.Xml.domToBlock(o,e.workspace),e.outputConnection)this.connect(e.outputConnection);else{if(!e.previousConnection)throw"Child block does not have output or previous statement.";this.connect(e.previousConnection)}},Blockly.Connection.prototype.targetBlock=function(){return this.isConnected()?this.targetConnection.getSourceBlock():null},Blockly.Connection.prototype.checkType_=function(e){if(!this.check_||!e.check_)return!0;for(var o=0;o<this.check_.length;o++)if(-1!=e.check_.indexOf(this.check_[o]))return!0;return!1},Blockly.Connection.prototype.setCheck=function(e){return e?(goog.isArray(e)||(e=[e]),this.check_=e,this.isConnected()&&!this.checkType_(this.targetConnection)&&((this.isSuperior()?this.targetBlock():this.sourceBlock_).unplug(),this.sourceBlock_.bumpNeighbours_())):this.check_=null,this},Blockly.Connection.prototype.setShadowDom=function(e){this.shadowDom_=e},Blockly.Connection.prototype.getShadowDom=function(){return this.shadowDom_},Blockly.Field=function(e,o){this.size_=new goog.math.Size(0,25),this.setValue(e),this.setValidator(o)},Blockly.Field.cacheWidths_=null,Blockly.Field.cacheReference_=0,Blockly.Field.prototype.name=void 0,Blockly.Field.prototype.maxDisplayLength=50,Blockly.Field.prototype.text_="",Blockly.Field.prototype.sourceBlock_=null,Blockly.Field.prototype.visible_=!0,Blockly.Field.prototype.validator_=null,Blockly.Field.NBSP="Â ",Blockly.Field.prototype.EDITABLE=!0,Blockly.Field.prototype.setSourceBlock=function(e){goog.asserts.assert(!this.sourceBlock_,"Field already bound to a block."),this.sourceBlock_=e},Blockly.Field.prototype.init=function(){this.fieldGroup_||(this.fieldGroup_=Blockly.createSvgElement("g",{},null),this.visible_||(this.fieldGroup_.style.display="none"),this.borderRect_=Blockly.createSvgElement("rect",{rx:4,ry:4,x:-Blockly.BlockSvg.SEP_SPACE_X/2,y:0,height:16},this.fieldGroup_,this.sourceBlock_.workspace),this.textElement_=Blockly.createSvgElement("text",{"class":"blocklyText",y:this.size_.height-12.5},this.fieldGroup_),this.updateEditable(),this.sourceBlock_.getSvgRoot().appendChild(this.fieldGroup_),this.mouseUpWrapper_=Blockly.bindEventWithChecks_(this.fieldGroup_,"mouseup",this,this.onMouseUp_),this.updateTextNode_())},Blockly.Field.prototype.dispose=function(){this.mouseUpWrapper_&&(Blockly.unbindEvent_(this.mouseUpWrapper_),this.mouseUpWrapper_=null),this.sourceBlock_=null,goog.dom.removeNode(this.fieldGroup_),this.validator_=this.borderRect_=this.textElement_=this.fieldGroup_=null},Blockly.Field.prototype.updateEditable=function(){var e=this.fieldGroup_;this.EDITABLE&&e&&(this.sourceBlock_.isEditable()?(Blockly.addClass_(e,"blocklyEditableText"),Blockly.removeClass_(e,"blocklyNonEditableText"),this.fieldGroup_.style.cursor=this.CURSOR):(Blockly.addClass_(e,"blocklyNonEditableText"),Blockly.removeClass_(e,"blocklyEditableText"),this.fieldGroup_.style.cursor=""))},Blockly.Field.prototype.isVisible=function(){return this.visible_},Blockly.Field.prototype.setVisible=function(e){if(this.visible_!=e){this.visible_=e;var o=this.getSvgRoot();o&&(o.style.display=e?"block":"none",this.render_())}},Blockly.Field.prototype.setValidator=function(e){this.validator_=e},Blockly.Field.prototype.getValidator=function(){return this.validator_},Blockly.Field.prototype.classValidator=function(e){return e},Blockly.Field.prototype.callValidator=function(e){var o=this.classValidator(e);if(null===o)return null;if(void 0!==o&&(e=o),o=this.getValidator()){if(o=o.call(this,e),null===o)return null;void 0!==o&&(e=o)}return e},Blockly.Field.prototype.getSvgRoot=function(){return this.fieldGroup_},Blockly.Field.prototype.render_=function(){if(this.visible_&&this.textElement_){var e=this.textElement_.textContent+"\n"+this.textElement_.className.baseVal;if(Blockly.Field.cacheWidths_&&Blockly.Field.cacheWidths_[e])var o=Blockly.Field.cacheWidths_[e];else{try{o=this.textElement_.getComputedTextLength()}catch(t){o=8*this.textElement_.textContent.length}Blockly.Field.cacheWidths_&&(Blockly.Field.cacheWidths_[e]=o)}this.borderRect_&&this.borderRect_.setAttribute("width",o+Blockly.BlockSvg.SEP_SPACE_X)}else o=0;this.size_.width=o},Blockly.Field.startCache=function(){Blockly.Field.cacheReference_++,Blockly.Field.cacheWidths_||(Blockly.Field.cacheWidths_={})},Blockly.Field.stopCache=function(){Blockly.Field.cacheReference_--,Blockly.Field.cacheReference_||(Blockly.Field.cacheWidths_=null)},Blockly.Field.prototype.getSize=function(){return this.size_.width||this.render_(),this.size_},Blockly.Field.prototype.getScaledBBox_=function(){var e=this.borderRect_.getBBox();return new goog.math.Size(e.width*this.sourceBlock_.workspace.scale,e.height*this.sourceBlock_.workspace.scale)},Blockly.Field.prototype.getText=function(){return this.text_},Blockly.Field.prototype.setText=function(e){null!==e&&(e=String(e),e!==this.text_&&(this.text_=e,this.updateTextNode_(),this.sourceBlock_&&this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours_())))},Blockly.Field.prototype.updateTextNode_=function(){if(this.textElement_){var e=this.text_;e.length>this.maxDisplayLength&&(e=e.substring(0,this.maxDisplayLength-2)+"â¦"),e=e.replace(/\s/g,Blockly.Field.NBSP),this.sourceBlock_.RTL&&e&&(e+="â"),e||(e=Blockly.Field.NBSP),goog.dom.removeChildren(this.textElement_),e=document.createTextNode(e),this.textElement_.appendChild(e),this.size_.width=0}},Blockly.Field.prototype.getValue=function(){return this.getText()},Blockly.Field.prototype.setValue=function(e){if(null!==e){var o=this.getValue();o!=e&&(this.sourceBlock_&&Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.Change(this.sourceBlock_,"field",this.name,o,e)),this.setText(e))}},Blockly.Field.prototype.onMouseUp_=function(e){(!goog.userAgent.IPHONE&&!goog.userAgent.IPAD||goog.userAgent.isVersionOrHigher("537.51.2")||0===e.layerX||0===e.layerY)&&(Blockly.isRightButton(e)||this.sourceBlock_.workspace.isDragging()||this.sourceBlock_.isEditable()&&this.showEditor_())},Blockly.Field.prototype.setTooltip=function(e){},Blockly.Field.prototype.getAbsoluteXY_=function(){return goog.style.getPageOffset(this.borderRect_)},Blockly.Tooltip={},Blockly.Tooltip.visible=!1,Blockly.Tooltip.LIMIT=50,Blockly.Tooltip.mouseOutPid_=0,Blockly.Tooltip.showPid_=0,Blockly.Tooltip.lastX_=0,Blockly.Tooltip.lastY_=0,Blockly.Tooltip.element_=null,Blockly.Tooltip.poisonedElement_=null,Blockly.Tooltip.OFFSET_X=0,Blockly.Tooltip.OFFSET_Y=10,Blockly.Tooltip.RADIUS_OK=10,Blockly.Tooltip.HOVER_MS=750,Blockly.Tooltip.MARGINS=5,Blockly.Tooltip.DIV=null,Blockly.Tooltip.createDom=function(){Blockly.Tooltip.DIV||(Blockly.Tooltip.DIV=goog.dom.createDom("DIV","blocklyTooltipDiv"),document.body.appendChild(Blockly.Tooltip.DIV))},Blockly.Tooltip.bindMouseEvents=function(e){Blockly.bindEvent_(e,"mouseover",null,Blockly.Tooltip.onMouseOver_),Blockly.bindEvent_(e,"mouseout",null,Blockly.Tooltip.onMouseOut_),e.addEventListener("mousemove",Blockly.Tooltip.onMouseMove_,!1)},Blockly.Tooltip.onMouseOver_=function(e){for(e=e.target;!goog.isString(e.tooltip)&&!goog.isFunction(e.tooltip);)e=e.tooltip;Blockly.Tooltip.element_!=e&&(Blockly.Tooltip.hide(),Blockly.Tooltip.poisonedElement_=null,Blockly.Tooltip.element_=e),clearTimeout(Blockly.Tooltip.mouseOutPid_)},Blockly.Tooltip.onMouseOut_=function(e){Blockly.Tooltip.mouseOutPid_=setTimeout(function(){Blockly.Tooltip.element_=null,Blockly.Tooltip.poisonedElement_=null,Blockly.Tooltip.hide()},1),clearTimeout(Blockly.Tooltip.showPid_)},Blockly.Tooltip.onMouseMove_=function(e){if(Blockly.Tooltip.element_&&Blockly.Tooltip.element_.tooltip&&Blockly.dragMode_==Blockly.DRAG_NONE&&!Blockly.WidgetDiv.isVisible())if(Blockly.Tooltip.visible){var o=Blockly.Tooltip.lastX_-e.pageX;e=Blockly.Tooltip.lastY_-e.pageY,Math.sqrt(o*o+e*e)>Blockly.Tooltip.RADIUS_OK&&Blockly.Tooltip.hide()}else Blockly.Tooltip.poisonedElement_!=Blockly.Tooltip.element_&&(clearTimeout(Blockly.Tooltip.showPid_),Blockly.Tooltip.lastX_=e.pageX,Blockly.Tooltip.lastY_=e.pageY,Blockly.Tooltip.showPid_=setTimeout(Blockly.Tooltip.show_,Blockly.Tooltip.HOVER_MS))},Blockly.Tooltip.hide=function(){Blockly.Tooltip.visible&&(Blockly.Tooltip.visible=!1,Blockly.Tooltip.DIV&&(Blockly.Tooltip.DIV.style.display="none")),clearTimeout(Blockly.Tooltip.showPid_)},Blockly.Tooltip.show_=function(){if(Blockly.Tooltip.poisonedElement_=Blockly.Tooltip.element_,Blockly.Tooltip.DIV){goog.dom.removeChildren(Blockly.Tooltip.DIV);for(var e=Blockly.Tooltip.element_.tooltip;goog.isFunction(e);)e=e();for(var e=Blockly.utils.wrap(e,Blockly.Tooltip.LIMIT),e=e.split("\n"),o=0;o<e.length;o++){var t=document.createElement("div");t.appendChild(document.createTextNode(e[o])),Blockly.Tooltip.DIV.appendChild(t)}e=Blockly.Tooltip.element_.RTL,o=goog.dom.getViewportSize(),Blockly.Tooltip.DIV.style.direction=e?"rtl":"ltr",Blockly.Tooltip.DIV.style.display="block",Blockly.Tooltip.visible=!0;var t=Blockly.Tooltip.lastX_,t=e?t-(Blockly.Tooltip.OFFSET_X+Blockly.Tooltip.DIV.offsetWidth):t+Blockly.Tooltip.OFFSET_X,n=Blockly.Tooltip.lastY_+Blockly.Tooltip.OFFSET_Y;n+Blockly.Tooltip.DIV.offsetHeight>o.height+window.scrollY&&(n-=Blockly.Tooltip.DIV.offsetHeight+2*Blockly.Tooltip.OFFSET_Y),e?t=Math.max(Blockly.Tooltip.MARGINS-window.scrollX,t):t+Blockly.Tooltip.DIV.offsetWidth>o.width+window.scrollX-2*Blockly.Tooltip.MARGINS&&(t=o.width-Blockly.Tooltip.DIV.offsetWidth-2*Blockly.Tooltip.MARGINS),Blockly.Tooltip.DIV.style.top=n+"px",Blockly.Tooltip.DIV.style.left=t+"px"}},Blockly.FieldLabel=function(e,o){this.size_=new goog.math.Size(0,17.5),this.class_=o,this.setValue(e)},goog.inherits(Blockly.FieldLabel,Blockly.Field),Blockly.FieldLabel.prototype.EDITABLE=!1,Blockly.FieldLabel.prototype.init=function(){this.textElement_||(this.textElement_=Blockly.createSvgElement("text",{"class":"blocklyText",y:this.size_.height-5},null),this.class_&&Blockly.addClass_(this.textElement_,this.class_),this.visible_||(this.textElement_.style.display="none"),this.sourceBlock_.getSvgRoot().appendChild(this.textElement_),this.textElement_.tooltip=this.sourceBlock_,Blockly.Tooltip.bindMouseEvents(this.textElement_),this.updateTextNode_())},Blockly.FieldLabel.prototype.dispose=function(){goog.dom.removeNode(this.textElement_),this.textElement_=null},Blockly.FieldLabel.prototype.getSvgRoot=function(){return this.textElement_},Blockly.FieldLabel.prototype.setTooltip=function(e){this.textElement_.tooltip=e},Blockly.Input=function(e,o,t,n){this.type=e,this.name=o,this.sourceBlock_=t,this.connection=n,this.fieldRow=[]},Blockly.Input.prototype.align=Blockly.ALIGN_LEFT,Blockly.Input.prototype.visible_=!0,Blockly.Input.prototype.appendField=function(e,o){return e||o?(goog.isString(e)&&(e=new Blockly.FieldLabel(e)),e.setSourceBlock(this.sourceBlock_),this.sourceBlock_.rendered&&e.init(),e.name=o,e.prefixField&&this.appendField(e.prefixField),this.fieldRow.push(e),e.suffixField&&this.appendField(e.suffixField),this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours_()),this):this},Blockly.Input.prototype.appendTitle=function(e,o){return console.warn("Deprecated call to appendTitle, use appendField instead."),this.appendField(e,o)},Blockly.Input.prototype.removeField=function(e){for(var o,t=0;o=this.fieldRow[t];t++)if(o.name===e)return o.dispose(),this.fieldRow.splice(t,1),void(this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours_()));goog.asserts.fail('Field "%s" not found.',e)},Blockly.Input.prototype.isVisible=function(){return this.visible_},Blockly.Input.prototype.setVisible=function(e){var o=[];if(this.visible_==e)return o;for(var t,n=(this.visible_=e)?"block":"none",r=0;t=this.fieldRow[r];r++)t.setVisible(e);return this.connection&&(e?o=this.connection.unhideAll():this.connection.hideAll(),r=this.connection.targetBlock())&&(r.getSvgRoot().style.display=n,e||(r.rendered=!1)),o},Blockly.Input.prototype.setCheck=function(e){if(!this.connection)throw"This input does not have a connection.";return this.connection.setCheck(e),this},Blockly.Input.prototype.setAlign=function(e){return this.align=e,this.sourceBlock_.rendered&&this.sourceBlock_.render(),this},Blockly.Input.prototype.init=function(){if(this.sourceBlock_.workspace.rendered)for(var e=0;e<this.fieldRow.length;e++)this.fieldRow[e].init()},Blockly.Input.prototype.dispose=function(){for(var e,o=0;e=this.fieldRow[o];o++)e.dispose();this.connection&&this.connection.dispose(),this.sourceBlock_=null},Blockly.ConnectionDB=function(){},Blockly.ConnectionDB.prototype=[],Blockly.ConnectionDB.constructor=Blockly.ConnectionDB,Blockly.ConnectionDB.prototype.addConnection=function(e){if(e.inDB_)throw"Connection already in database.";if(!e.getSourceBlock().isInFlyout){var o=this.findPositionForConnection_(e);this.splice(o,0,e),e.inDB_=!0}},Blockly.ConnectionDB.prototype.findConnection=function(e){if(!this.length)return-1;var o=this.findPositionForConnection_(e);if(o>=this.length)return-1;for(var t=e.y_,n=o;n>=0&&this[n].y_==t;){if(this[n]==e)return n;n--}for(;o<this.length&&this[o].y_==t;){if(this[o]==e)return o;o++}return-1},Blockly.ConnectionDB.prototype.findPositionForConnection_=function(e){if(!this.length)return 0;for(var o=0,t=this.length;t>o;){var n=Math.floor((o+t)/2);if(this[n].y_<e.y_)o=n+1;else{if(!(this[n].y_>e.y_)){o=n;break}t=n}}return o},Blockly.ConnectionDB.prototype.removeConnection_=function(e){if(!e.inDB_)throw"Connection not in database.";var o=this.findConnection(e);if(-1==o)throw"Unable to find connection in connectionDB.";e.inDB_=!1,this.splice(o,1)},Blockly.ConnectionDB.prototype.getNeighbours=function(e,o){function t(e){var t=r-n[e].x_,s=i-n[e].y_;return Math.sqrt(t*t+s*s)<=o&&a.push(n[e]),o>s}for(var n=this,r=e.x_,i=e.y_,s=0,l=n.length-2,g=l;g>s;)n[g].y_<i?s=g:l=g,g=Math.floor((s+l)/2);var a=[],l=s=g;if(n.length){for(;s>=0&&t(s);)s--;do l++;while(l<n.length&&t(l))}return a},Blockly.ConnectionDB.prototype.isInYRange_=function(e,o,t){return Math.abs(this[e].y_-o)<=t},Blockly.ConnectionDB.prototype.searchForClosest=function(e,o,t){if(!this.length)return{connection:null,radius:o};var n=e.y_,r=e.x_;e.x_=r+t.x,e.y_=n+t.y;var i=this.findPositionForConnection_(e);t=null;for(var s,l=o,g=i-1;g>=0&&this.isInYRange_(g,e.y_,o);)s=this[g],e.isConnectionAllowed(s,l)&&(t=s,l=s.distanceFrom(e)),g--;for(;i<this.length&&this.isInYRange_(i,e.y_,o);)s=this[i],e.isConnectionAllowed(s,l)&&(t=s,l=s.distanceFrom(e)),i++;return e.x_=r,e.y_=n,{connection:t,radius:l}},Blockly.ConnectionDB.init=function(e){var o=[];o[Blockly.INPUT_VALUE]=new Blockly.ConnectionDB,o[Blockly.OUTPUT_VALUE]=new Blockly.ConnectionDB,o[Blockly.NEXT_STATEMENT]=new Blockly.ConnectionDB,o[Blockly.PREVIOUS_STATEMENT]=new Blockly.ConnectionDB,e.connectionDBList=o},Blockly.constants={},Blockly.DRAG_RADIUS=5,Blockly.SNAP_RADIUS=20,Blockly.BUMP_DELAY=250,Blockly.COLLAPSE_CHARS=30,Blockly.LONGPRESS=750,Blockly.SOUND_LIMIT=100,Blockly.HSV_SATURATION=.45,Blockly.HSV_VALUE=.65,Blockly.SPRITE={width:96,height:124,url:"sprites.png"},Blockly.SVG_NS="http://www.w3.org/2000/svg",Blockly.HTML_NS="http://www.w3.org/1999/xhtml",Blockly.INPUT_VALUE=1,Blockly.OUTPUT_VALUE=2,Blockly.NEXT_STATEMENT=3,Blockly.PREVIOUS_STATEMENT=4,Blockly.DUMMY_INPUT=5,Blockly.ALIGN_LEFT=-1,Blockly.ALIGN_CENTRE=0,Blockly.ALIGN_RIGHT=1,Blockly.DRAG_NONE=0,Blockly.DRAG_STICKY=1,Blockly.DRAG_BEGIN=1,Blockly.DRAG_FREE=2,Blockly.OPPOSITE_TYPE=[],Blockly.OPPOSITE_TYPE[Blockly.INPUT_VALUE]=Blockly.OUTPUT_VALUE,Blockly.OPPOSITE_TYPE[Blockly.OUTPUT_VALUE]=Blockly.INPUT_VALUE,Blockly.OPPOSITE_TYPE[Blockly.NEXT_STATEMENT]=Blockly.PREVIOUS_STATEMENT,Blockly.OPPOSITE_TYPE[Blockly.PREVIOUS_STATEMENT]=Blockly.NEXT_STATEMENT,Blockly.TOOLBOX_AT_TOP=0,Blockly.TOOLBOX_AT_BOTTOM=1,Blockly.TOOLBOX_AT_LEFT=2,Blockly.TOOLBOX_AT_RIGHT=3,Blockly.Options=function(e){var o=!!e.readOnly;if(o)var t=null,n=!1,r=!1,i=!1,s=!1,l=!1,g=!1;else t=Blockly.Options.parseToolboxTree(e.toolbox),n=!(!t||!t.getElementsByTagName("category").length),r=e.trashcan,void 0===r&&(r=n),i=e.collapse,void 0===i&&(i=n),s=e.comments,void 0===s&&(s=n),l=e.disable,void 0===l&&(l=n),g=e.sounds,void 0===g&&(g=!0);var a=!!e.rtl,c=e.horizontalLayout;void 0===c&&(c=!1);var u=e.toolboxPosition,u="end"===u?!1:!0,u=c?u?Blockly.TOOLBOX_AT_TOP:Blockly.TOOLBOX_AT_BOTTOM:u==a?Blockly.TOOLBOX_AT_RIGHT:Blockly.TOOLBOX_AT_LEFT,h=e.scrollbars;void 0===h&&(h=n);var d=e.css;void 0===d&&(d=!0);var p="https://blockly-demo.appspot.com/static/media/";e.media?p=e.media:e.path&&(p=e.path+"media/");var y=void 0===e.oneBasedIndex?!0:!!e.oneBasedIndex;this.RTL=a,this.oneBasedIndex=y,this.collapse=i,this.comments=s,this.disable=l,this.readOnly=o,this.maxBlocks=e.maxBlocks||1/0,this.pathToMedia=p,this.hasCategories=n,this.hasScrollbars=h,this.hasTrashcan=r,this.hasSounds=g,this.hasCss=d,this.horizontalLayout=c,this.languageTree=t,this.gridOptions=Blockly.Options.parseGridOptions_(e),this.zoomOptions=Blockly.Options.parseZoomOptions_(e),this.toolboxPosition=u},Blockly.Options.prototype.parentWorkspace=null,Blockly.Options.prototype.setMetrics=null,Blockly.Options.prototype.getMetrics=null,Blockly.Options.parseZoomOptions_=function(e){e=e.zoom||{};var o={};return o.controls=void 0===e.controls?!1:!!e.controls,o.wheel=void 0===e.wheel?!1:!!e.wheel,o.startScale=void 0===e.startScale?1:parseFloat(e.startScale),o.maxScale=void 0===e.maxScale?3:parseFloat(e.maxScale),o.minScale=void 0===e.minScale?.3:parseFloat(e.minScale),o.scaleSpeed=void 0===e.scaleSpeed?1.2:parseFloat(e.scaleSpeed),o},Blockly.Options.parseGridOptions_=function(e){e=e.grid||{};var o={};return o.spacing=parseFloat(e.spacing)||0,o.colour=e.colour||"#888",o.length=parseFloat(e.length)||1,o.snap=0<o.spacing&&!!e.snap,o},Blockly.Options.parseToolboxTree=function(e){return e?("string"!=typeof e&&("undefined"==typeof XSLTProcessor&&e.outerHTML?e=e.outerHTML:e instanceof Element||(e=null)),
+"string"==typeof e&&(e=Blockly.Xml.textToDom(e))):e=null,e},Blockly.ScrollbarPair=function(e){this.workspace_=e,this.hScroll=new Blockly.Scrollbar(e,!0,!0),this.vScroll=new Blockly.Scrollbar(e,!1,!0),this.corner_=Blockly.createSvgElement("rect",{height:Blockly.Scrollbar.scrollbarThickness,width:Blockly.Scrollbar.scrollbarThickness,"class":"blocklyScrollbarBackground"},null),Blockly.Scrollbar.insertAfter_(this.corner_,e.getBubbleCanvas())},Blockly.ScrollbarPair.prototype.oldHostMetrics_=null,Blockly.ScrollbarPair.prototype.dispose=function(){goog.dom.removeNode(this.corner_),this.oldHostMetrics_=this.workspace_=this.corner_=null,this.hScroll.dispose(),this.hScroll=null,this.vScroll.dispose(),this.vScroll=null},Blockly.ScrollbarPair.prototype.resize=function(){var e=this.workspace_.getMetrics();if(e){var o=!1,t=!1;this.oldHostMetrics_&&this.oldHostMetrics_.viewWidth==e.viewWidth&&this.oldHostMetrics_.viewHeight==e.viewHeight&&this.oldHostMetrics_.absoluteTop==e.absoluteTop&&this.oldHostMetrics_.absoluteLeft==e.absoluteLeft?(this.oldHostMetrics_&&this.oldHostMetrics_.contentWidth==e.contentWidth&&this.oldHostMetrics_.viewLeft==e.viewLeft&&this.oldHostMetrics_.contentLeft==e.contentLeft||(o=!0),this.oldHostMetrics_&&this.oldHostMetrics_.contentHeight==e.contentHeight&&this.oldHostMetrics_.viewTop==e.viewTop&&this.oldHostMetrics_.contentTop==e.contentTop||(t=!0)):t=o=!0,o&&this.hScroll.resize(e),t&&this.vScroll.resize(e),this.oldHostMetrics_&&this.oldHostMetrics_.viewWidth==e.viewWidth&&this.oldHostMetrics_.absoluteLeft==e.absoluteLeft||this.corner_.setAttribute("x",this.vScroll.position_.x),this.oldHostMetrics_&&this.oldHostMetrics_.viewHeight==e.viewHeight&&this.oldHostMetrics_.absoluteTop==e.absoluteTop||this.corner_.setAttribute("y",this.hScroll.position_.y),this.oldHostMetrics_=e}},Blockly.ScrollbarPair.prototype.set=function(e,o){var t={},n=e*this.hScroll.ratio_,r=o*this.vScroll.ratio_,i=this.vScroll.scrollViewSize_;t.x=this.getRatio_(n,this.hScroll.scrollViewSize_),t.y=this.getRatio_(r,i),this.workspace_.setMetrics(t),this.hScroll.setHandlePosition(n),this.vScroll.setHandlePosition(r)},Blockly.ScrollbarPair.prototype.getRatio_=function(e,o){var t=e/o;return isNaN(t)?0:t},Blockly.Scrollbar=function(e,o,t){this.workspace_=e,this.pair_=t||!1,this.horizontal_=o,this.oldHostMetrics_=null,this.createDom_(),this.position_=new goog.math.Coordinate(0,0),o?(this.svgBackground_.setAttribute("height",Blockly.Scrollbar.scrollbarThickness),this.svgHandle_.setAttribute("height",Blockly.Scrollbar.scrollbarThickness-5),this.svgHandle_.setAttribute("y",2.5),this.lengthAttribute_="width",this.positionAttribute_="x"):(this.svgBackground_.setAttribute("width",Blockly.Scrollbar.scrollbarThickness),this.svgHandle_.setAttribute("width",Blockly.Scrollbar.scrollbarThickness-5),this.svgHandle_.setAttribute("x",2.5),this.lengthAttribute_="height",this.positionAttribute_="y"),this.onMouseDownBarWrapper_=Blockly.bindEventWithChecks_(this.svgBackground_,"mousedown",this,this.onMouseDownBar_),this.onMouseDownHandleWrapper_=Blockly.bindEventWithChecks_(this.svgHandle_,"mousedown",this,this.onMouseDownHandle_)},Blockly.Scrollbar.prototype.scrollViewSize_=0,Blockly.Scrollbar.prototype.handleLength_=0,Blockly.Scrollbar.prototype.handlePosition_=0,Blockly.Scrollbar.prototype.isVisible_=!0,Blockly.Scrollbar.scrollbarThickness=15,goog.events.BrowserFeature.TOUCH_ENABLED&&(Blockly.Scrollbar.scrollbarThickness=25),Blockly.Scrollbar.metricsAreEquivalent_=function(e,o){return e&&o&&e.viewWidth==o.viewWidth&&e.viewHeight==o.viewHeight&&e.viewLeft==o.viewLeft&&e.viewTop==o.viewTop&&e.absoluteTop==o.absoluteTop&&e.absoluteLeft==o.absoluteLeft&&e.contentWidth==o.contentWidth&&e.contentHeight==o.contentHeight&&e.contentLeft==o.contentLeft&&e.contentTop==o.contentTop?!0:!1},Blockly.Scrollbar.prototype.dispose=function(){this.cleanUp_(),Blockly.unbindEvent_(this.onMouseDownBarWrapper_),this.onMouseDownBarWrapper_=null,Blockly.unbindEvent_(this.onMouseDownHandleWrapper_),this.onMouseDownHandleWrapper_=null,goog.dom.removeNode(this.svgGroup_),this.workspace_=this.svgHandle_=this.svgBackground_=this.svgGroup_=null},Blockly.Scrollbar.prototype.setHandleLength_=function(e){this.handleLength_=e,this.svgHandle_.setAttribute(this.lengthAttribute_,this.handleLength_)},Blockly.Scrollbar.prototype.setHandlePosition=function(e){this.handlePosition_=e,this.svgHandle_.setAttribute(this.positionAttribute_,this.handlePosition_)},Blockly.Scrollbar.prototype.setScrollViewSize_=function(e){this.scrollViewSize_=e,this.svgBackground_.setAttribute(this.lengthAttribute_,this.scrollViewSize_)},Blockly.Scrollbar.prototype.setPosition=function(e,o){this.position_.x=e,this.position_.y=o,this.svgGroup_.setAttribute("transform","translate("+this.position_.x+","+this.position_.y+")")},Blockly.Scrollbar.prototype.resize=function(e){(e||(e=this.workspace_.getMetrics()))&&(Blockly.Scrollbar.metricsAreEquivalent_(e,this.oldHostMetrics_)||(this.oldHostMetrics_=e,this.horizontal_?this.resizeHorizontal_(e):this.resizeVertical_(e),this.onScroll_()))},Blockly.Scrollbar.prototype.resizeHorizontal_=function(e){this.resizeViewHorizontal(e)},Blockly.Scrollbar.prototype.resizeViewHorizontal=function(e){var o=e.viewWidth-1;this.pair_&&(o-=Blockly.Scrollbar.scrollbarThickness),this.setScrollViewSize_(Math.max(0,o)),o=e.absoluteLeft+.5,this.pair_&&this.workspace_.RTL&&(o+=Blockly.Scrollbar.scrollbarThickness),this.setPosition(o,e.absoluteTop+e.viewHeight-Blockly.Scrollbar.scrollbarThickness-.5),this.resizeContentHorizontal(e)},Blockly.Scrollbar.prototype.resizeContentHorizontal=function(e){this.pair_||this.setVisible(this.scrollViewSize_<e.contentWidth),this.ratio_=this.scrollViewSize_/e.contentWidth,(-(1/0)==this.ratio_||1/0==this.ratio_||isNaN(this.ratio_))&&(this.ratio_=0),this.setHandleLength_(Math.max(0,e.viewWidth*this.ratio_)),this.setHandlePosition(this.constrainHandle_((e.viewLeft-e.contentLeft)*this.ratio_))},Blockly.Scrollbar.prototype.resizeVertical_=function(e){this.resizeViewVertical(e)},Blockly.Scrollbar.prototype.resizeViewVertical=function(e){var o=e.viewHeight-1;this.pair_&&(o-=Blockly.Scrollbar.scrollbarThickness),this.setScrollViewSize_(Math.max(0,o)),o=e.absoluteLeft+.5,this.workspace_.RTL||(o+=e.viewWidth-Blockly.Scrollbar.scrollbarThickness-1),this.setPosition(o,e.absoluteTop+.5),this.resizeContentVertical(e)},Blockly.Scrollbar.prototype.resizeContentVertical=function(e){this.pair_||this.setVisible(this.scrollViewSize_<e.contentHeight),this.ratio_=this.scrollViewSize_/e.contentHeight,(-(1/0)==this.ratio_||1/0==this.ratio_||isNaN(this.ratio_))&&(this.ratio_=0),this.setHandleLength_(Math.max(0,e.viewHeight*this.ratio_)),this.setHandlePosition(this.constrainHandle_((e.viewTop-e.contentTop)*this.ratio_))},Blockly.Scrollbar.prototype.createDom_=function(){this.svgGroup_=Blockly.createSvgElement("g",{"class":"blocklyScrollbar"+(this.horizontal_?"Horizontal":"Vertical")},null),this.svgBackground_=Blockly.createSvgElement("rect",{"class":"blocklyScrollbarBackground"},this.svgGroup_);var e=Math.floor((Blockly.Scrollbar.scrollbarThickness-5)/2);this.svgHandle_=Blockly.createSvgElement("rect",{"class":"blocklyScrollbarHandle",rx:e,ry:e},this.svgGroup_),Blockly.Scrollbar.insertAfter_(this.svgGroup_,this.workspace_.getBubbleCanvas())},Blockly.Scrollbar.prototype.isVisible=function(){return this.isVisible_},Blockly.Scrollbar.prototype.setVisible=function(e){if(e!=this.isVisible()){if(this.pair_)throw"Unable to toggle visibility of paired scrollbars.";(this.isVisible_=e)?this.svgGroup_.setAttribute("display","block"):(this.workspace_.setMetrics({x:0,y:0}),this.svgGroup_.setAttribute("display","none"))}},Blockly.Scrollbar.prototype.onMouseDownBar_=function(e){if(this.workspace_.markFocused(),Blockly.Touch.clearTouchIdentifier(),this.cleanUp_(),Blockly.isRightButton(e))e.stopPropagation();else{var o=Blockly.mouseToSvg(e,this.workspace_.getParentSvg(),this.workspace_.getInverseScreenCTM()),o=this.horizontal_?o.x:o.y,t=Blockly.getSvgXY_(this.svgHandle_,this.workspace_),t=this.horizontal_?t.x:t.y,n=this.handlePosition_,r=.95*this.handleLength_;t>=o?n-=r:o>=t+this.handleLength_&&(n+=r),this.setHandlePosition(this.constrainHandle_(n)),this.onScroll_(),e.stopPropagation(),e.preventDefault()}},Blockly.Scrollbar.prototype.onMouseDownHandle_=function(e){this.workspace_.markFocused(),this.cleanUp_(),Blockly.isRightButton(e)?e.stopPropagation():(this.startDragHandle=this.handlePosition_,this.startDragMouse=this.horizontal_?e.clientX:e.clientY,Blockly.Scrollbar.onMouseUpWrapper_=Blockly.bindEventWithChecks_(document,"mouseup",this,this.onMouseUpHandle_),Blockly.Scrollbar.onMouseMoveWrapper_=Blockly.bindEventWithChecks_(document,"mousemove",this,this.onMouseMoveHandle_),e.stopPropagation(),e.preventDefault())},Blockly.Scrollbar.prototype.onMouseMoveHandle_=function(e){this.setHandlePosition(this.constrainHandle_(this.startDragHandle+((this.horizontal_?e.clientX:e.clientY)-this.startDragMouse))),this.onScroll_()},Blockly.Scrollbar.prototype.onMouseUpHandle_=function(){Blockly.Touch.clearTouchIdentifier(),this.cleanUp_()},Blockly.Scrollbar.prototype.cleanUp_=function(){Blockly.hideChaff(!0),Blockly.Scrollbar.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Scrollbar.onMouseUpWrapper_),Blockly.Scrollbar.onMouseUpWrapper_=null),Blockly.Scrollbar.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.Scrollbar.onMouseMoveWrapper_),Blockly.Scrollbar.onMouseMoveWrapper_=null)},Blockly.Scrollbar.prototype.constrainHandle_=function(e){return e=0>=e||isNaN(e)||this.scrollViewSize_<this.handleLength_?0:Math.min(e,this.scrollViewSize_-this.handleLength_)},Blockly.Scrollbar.prototype.onScroll_=function(){var e=this.handlePosition_/this.scrollViewSize_;isNaN(e)&&(e=0);var o={};this.horizontal_?o.x=e:o.y=e,this.workspace_.setMetrics(o)},Blockly.Scrollbar.prototype.set=function(e){this.setHandlePosition(this.constrainHandle_(e*this.ratio_)),this.onScroll_()},Blockly.Scrollbar.insertAfter_=function(e,o){var t=o.nextSibling,n=o.parentNode;if(!n)throw"Reference node has no parent.";t?n.insertBefore(e,t):n.appendChild(e)},Blockly.Trashcan=function(e){this.workspace_=e},Blockly.Trashcan.prototype.WIDTH_=47,Blockly.Trashcan.prototype.BODY_HEIGHT_=44,Blockly.Trashcan.prototype.LID_HEIGHT_=16,Blockly.Trashcan.prototype.MARGIN_BOTTOM_=20,Blockly.Trashcan.prototype.MARGIN_SIDE_=20,Blockly.Trashcan.prototype.MARGIN_HOTSPOT_=10,Blockly.Trashcan.prototype.SPRITE_LEFT_=0,Blockly.Trashcan.prototype.SPRITE_TOP_=32,Blockly.Trashcan.prototype.isOpen=!1,Blockly.Trashcan.prototype.svgGroup_=null,Blockly.Trashcan.prototype.svgLid_=null,Blockly.Trashcan.prototype.lidTask_=0,Blockly.Trashcan.prototype.lidOpen_=0,Blockly.Trashcan.prototype.left_=0,Blockly.Trashcan.prototype.top_=0,Blockly.Trashcan.prototype.createDom=function(){this.svgGroup_=Blockly.createSvgElement("g",{"class":"blocklyTrash"},null);var e=String(Math.random()).substring(2),o=Blockly.createSvgElement("clipPath",{id:"blocklyTrashBodyClipPath"+e},this.svgGroup_);return Blockly.createSvgElement("rect",{width:this.WIDTH_,height:this.BODY_HEIGHT_,y:this.LID_HEIGHT_},o),Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,x:-this.SPRITE_LEFT_,height:Blockly.SPRITE.height,y:-this.SPRITE_TOP_,"clip-path":"url(#blocklyTrashBodyClipPath"+e+")"},this.svgGroup_).setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",this.workspace_.options.pathToMedia+Blockly.SPRITE.url),o=Blockly.createSvgElement("clipPath",{id:"blocklyTrashLidClipPath"+e},this.svgGroup_),Blockly.createSvgElement("rect",{width:this.WIDTH_,height:this.LID_HEIGHT_},o),this.svgLid_=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,x:-this.SPRITE_LEFT_,height:Blockly.SPRITE.height,y:-this.SPRITE_TOP_,"clip-path":"url(#blocklyTrashLidClipPath"+e+")"},this.svgGroup_),this.svgLid_.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",this.workspace_.options.pathToMedia+Blockly.SPRITE.url),Blockly.bindEventWithChecks_(this.svgGroup_,"mouseup",this,this.click),this.animateLid_(),this.svgGroup_},Blockly.Trashcan.prototype.init=function(e){return this.bottom_=this.MARGIN_BOTTOM_+e,this.setOpen_(!1),this.bottom_+this.BODY_HEIGHT_+this.LID_HEIGHT_},Blockly.Trashcan.prototype.dispose=function(){this.svgGroup_&&(goog.dom.removeNode(this.svgGroup_),this.svgGroup_=null),this.workspace_=this.svgLid_=null,goog.Timer.clear(this.lidTask_)},Blockly.Trashcan.prototype.position=function(){var e=this.workspace_.getMetrics();e&&(this.workspace_.RTL?(this.left_=this.MARGIN_SIDE_+Blockly.Scrollbar.scrollbarThickness,e.toolboxPosition==Blockly.TOOLBOX_AT_LEFT&&(this.left_+=e.flyoutWidth,this.workspace_.toolbox_&&(this.left_+=e.absoluteLeft))):(this.left_=e.viewWidth+e.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_-Blockly.Scrollbar.scrollbarThickness,e.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT&&(this.left_-=e.flyoutWidth)),this.top_=e.viewHeight+e.absoluteTop-(this.BODY_HEIGHT_+this.LID_HEIGHT_)-this.bottom_,e.toolboxPosition==Blockly.TOOLBOX_AT_BOTTOM&&(this.top_-=e.flyoutHeight),this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))},Blockly.Trashcan.prototype.getClientRect=function(){if(!this.svgGroup_)return null;var e=this.svgGroup_.getBoundingClientRect();return new goog.math.Rect(e.left+this.SPRITE_LEFT_-this.MARGIN_HOTSPOT_,e.top+this.SPRITE_TOP_-this.MARGIN_HOTSPOT_,this.WIDTH_+2*this.MARGIN_HOTSPOT_,this.LID_HEIGHT_+this.BODY_HEIGHT_+2*this.MARGIN_HOTSPOT_)},Blockly.Trashcan.prototype.setOpen_=function(e){this.isOpen!=e&&(goog.Timer.clear(this.lidTask_),this.isOpen=e,this.animateLid_())},Blockly.Trashcan.prototype.animateLid_=function(){this.lidOpen_+=this.isOpen?.2:-.2,this.lidOpen_=goog.math.clamp(this.lidOpen_,0,1);var e=45*this.lidOpen_;this.svgLid_.setAttribute("transform","rotate("+(this.workspace_.RTL?-e:e)+","+(this.workspace_.RTL?4:this.WIDTH_-4)+","+(this.LID_HEIGHT_-2)+")"),e=goog.math.lerp(.4,.8,this.lidOpen_),this.svgGroup_.style.opacity=e,0<this.lidOpen_&&1>this.lidOpen_&&(this.lidTask_=goog.Timer.callOnce(this.animateLid_,20,this))},Blockly.Trashcan.prototype.close=function(){this.setOpen_(!1)},Blockly.Trashcan.prototype.click=function(){var e=this.workspace_.startScrollX-this.workspace_.scrollX,o=this.workspace_.startScrollY-this.workspace_.scrollY;Math.sqrt(e*e+o*o)>Blockly.DRAG_RADIUS||console.log("TODO: Inspect trash.")},Blockly.Xml={},Blockly.Xml.workspaceToDom=function(e,o){for(var t,n=goog.dom.createDom("xml"),r=e.getTopBlocks(!0),i=0;t=r[i];i++)n.appendChild(Blockly.Xml.blockToDomWithXY(t,o));return n},Blockly.Xml.blockToDomWithXY=function(e,o){var t;e.workspace.RTL&&(t=e.workspace.getWidth());var n=Blockly.Xml.blockToDom(e,o),r=e.getRelativeToSurfaceXY();return n.setAttribute("x",Math.round(e.workspace.RTL?t-r.x:r.x)),n.setAttribute("y",Math.round(r.y)),n},Blockly.Xml.blockToDom=function(e,o){var t=goog.dom.createDom(e.isShadow()?"shadow":"block");if(t.setAttribute("type",e.type),o||t.setAttribute("id",e.id),e.mutationToDom){var n=e.mutationToDom();n&&(n.hasChildNodes()||n.hasAttributes())&&t.appendChild(n)}for(var r,n=0;r=e.inputList[n];n++)for(var i,s=0;i=r.fieldRow[s];s++)if(i.name&&i.EDITABLE){var l=goog.dom.createDom("field",null,i.getValue());l.setAttribute("name",i.name),t.appendChild(l)}for((n=e.getCommentText())&&(n=goog.dom.createDom("comment",null,n),"object"==typeof e.comment&&(n.setAttribute("pinned",e.comment.isVisible()),r=e.comment.getBubbleSize(),n.setAttribute("h",r.height),n.setAttribute("w",r.width)),t.appendChild(n)),e.data&&(n=goog.dom.createDom("data",null,e.data),t.appendChild(n)),n=0;r=e.inputList[n];n++){var g;i=!0,r.type!=Blockly.DUMMY_INPUT&&(l=r.connection.targetBlock(),r.type==Blockly.INPUT_VALUE?g=goog.dom.createDom("value"):r.type==Blockly.NEXT_STATEMENT&&(g=goog.dom.createDom("statement")),s=r.connection.getShadowDom(),!s||l&&l.isShadow()||g.appendChild(Blockly.Xml.cloneShadow_(s)),l&&(g.appendChild(Blockly.Xml.blockToDom(l,o)),i=!1),g.setAttribute("name",r.name),i||t.appendChild(g))}return e.inputsInlineDefault!=e.inputsInline&&t.setAttribute("inline",e.inputsInline),e.isCollapsed()&&t.setAttribute("collapsed",!0),e.disabled&&t.setAttribute("disabled",!0),e.isDeletable()||e.isShadow()||t.setAttribute("deletable",!1),e.isMovable()||e.isShadow()||t.setAttribute("movable",!1),e.isEditable()||t.setAttribute("editable",!1),(n=e.getNextBlock())&&(g=goog.dom.createDom("next",null,Blockly.Xml.blockToDom(n,o)),t.appendChild(g)),s=e.nextConnection&&e.nextConnection.getShadowDom(),!s||n&&n.isShadow()||g.appendChild(Blockly.Xml.cloneShadow_(s)),t},Blockly.Xml.cloneShadow_=function(e){for(var o,t=e=e.cloneNode(!0);t;)if(t.firstChild)t=t.firstChild;else{for(;t&&!t.nextSibling;)o=t,t=t.parentNode,3==o.nodeType&&""==o.data.trim()&&t.firstChild!=o&&goog.dom.removeNode(o);t&&(o=t,t=t.nextSibling,3==o.nodeType&&""==o.data.trim()&&goog.dom.removeNode(o))}return e},Blockly.Xml.domToText=function(e){return(new XMLSerializer).serializeToString(e)},Blockly.Xml.domToPrettyText=function(e){e=Blockly.Xml.domToText(e).split("<");for(var o="",t=1;t<e.length;t++){var n=e[t];"/"==n[0]&&(o=o.substring(2)),e[t]=o+"<"+n,"/"!=n[0]&&"/>"!=n.slice(-2)&&(o+="  ")}return e=e.join("\n"),e=e.replace(/(<(\w+)\b[^>]*>[^\n]*)\n *<\/\2>/g,"$1</$2>"),e.replace(/^\n/,"")},Blockly.Xml.textToDom=function(e){return(e=(new DOMParser).parseFromString(e,"text/xml"))&&e.firstChild&&"xml"==e.firstChild.nodeName.toLowerCase()&&e.firstChild===e.lastChild||goog.asserts.fail("Blockly.Xml.textToDom did not obtain a valid XML tree."),e.firstChild},Blockly.Xml.domToWorkspace=function(e,o){if(e instanceof Blockly.Workspace){var t=e;e=o,o=t,console.warn("Deprecated call to Blockly.Xml.domToWorkspace, swap the arguments.")}var n;o.RTL&&(n=o.getWidth()),Blockly.Field.startCache();var t=e.childNodes.length,r=Blockly.Events.getGroup();r||Blockly.Events.setGroup(!0),o.setResizesEnabled&&o.setResizesEnabled(!1);for(var i=0;t>i;i++){var s=e.childNodes[i],l=s.nodeName.toLowerCase();if("block"==l||"shadow"==l&&!Blockly.Events.recordUndo){var l=Blockly.Xml.domToBlock(s,o),g=parseInt(s.getAttribute("x"),10),s=parseInt(s.getAttribute("y"),10);isNaN(g)||isNaN(s)||l.moveBy(o.RTL?n-g:g,s)}else"shadow"==l&&goog.asserts.fail("Shadow block cannot be a top-level block.")}r||Blockly.Events.setGroup(!1),Blockly.Field.stopCache(),o.updateVariableList(!1),o.setResizesEnabled&&o.setResizesEnabled(!0)},Blockly.Xml.domToBlock=function(e,o){if(e instanceof Blockly.Workspace){var t=e;e=o,o=t,console.warn("Deprecated call to Blockly.Xml.domToBlock, swap the arguments.")}Blockly.Events.disable();try{var n=Blockly.Xml.domToBlockHeadless_(e,o);if(o.rendered){n.setConnectionsHidden(!0);for(var r=n.getDescendants(),i=r.length-1;i>=0;i--)r[i].initSvg();for(i=r.length-1;i>=0;i--)r[i].render(!1);setTimeout(function(){n.workspace&&n.setConnectionsHidden(!1)},1),n.updateDisabled(),o.resizeContents()}}finally{Blockly.Events.enable()}return Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.Create(n)),n},Blockly.Xml.domToBlockHeadless_=function(e,o){var t=null,n=e.getAttribute("type");goog.asserts.assert(n,"Block type unspecified: %s",e.outerHTML);for(var r,i=e.getAttribute("id"),t=o.newBlock(n,i),s=null,i=0;r=e.childNodes[i];i++)if(3!=r.nodeType){for(var l,g=s=null,a=0;l=r.childNodes[a];a++)1==l.nodeType&&("block"==l.nodeName.toLowerCase()?s=l:"shadow"==l.nodeName.toLowerCase()&&(g=l));switch(!s&&g&&(s=g),a=r.getAttribute("name"),r.nodeName.toLowerCase()){case"mutation":t.domToMutation&&(t.domToMutation(r),t.initSvg&&t.initSvg());break;case"comment":t.setCommentText(r.textContent);var c=r.getAttribute("pinned");c&&!t.isInFlyout&&setTimeout(function(){t.comment&&t.comment.setVisible&&t.comment.setVisible("true"==c)},1),s=parseInt(r.getAttribute("w"),10),r=parseInt(r.getAttribute("h"),10),!isNaN(s)&&!isNaN(r)&&t.comment&&t.comment.setVisible&&t.comment.setBubbleSize(s,r);break;case"data":t.data=r.textContent;break;case"title":case"field":if(s=t.getField(a),!s){console.warn("Ignoring non-existent field "+a+" in block "+n);break}s.setValue(r.textContent);break;case"value":case"statement":if(r=t.getInput(a),!r){console.warn("Ignoring non-existent input "+a+" in block "+n);break}g&&r.connection.setShadowDom(g),s&&(s=Blockly.Xml.domToBlockHeadless_(s,o),s.outputConnection?r.connection.connect(s.outputConnection):s.previousConnection?r.connection.connect(s.previousConnection):goog.asserts.fail("Child block does not have output or previous statement."));break;case"next":g&&t.nextConnection&&t.nextConnection.setShadowDom(g),s&&(goog.asserts.assert(t.nextConnection,"Next statement does not exist."),goog.asserts.assert(!t.nextConnection.isConnected(),"Next statement is already connected."),s=Blockly.Xml.domToBlockHeadless_(s,o),goog.asserts.assert(s.previousConnection,"Next block does not have previous statement."),t.nextConnection.connect(s.previousConnection));break;default:console.warn("Ignoring unknown tag: "+r.nodeName)}}if((i=e.getAttribute("inline"))&&t.setInputsInline("true"==i),(i=e.getAttribute("disabled"))&&t.setDisabled("true"==i),(i=e.getAttribute("deletable"))&&t.setDeletable("true"==i),(i=e.getAttribute("movable"))&&t.setMovable("true"==i),(i=e.getAttribute("editable"))&&t.setEditable("true"==i),(i=e.getAttribute("collapsed"))&&t.setCollapsed("true"==i),"shadow"==e.nodeName.toLowerCase()){for(n=t.getChildren(),i=0;r=n[i];i++)goog.asserts.assert(r.isShadow(),"Shadow block not allowed non-shadow child.");goog.asserts.assert(0==t.getVars().length,"Shadow blocks cannot have variable fields."),t.setShadow(!0)}return t},Blockly.Xml.deleteNext=function(e){for(var o,t=0;o=e.childNodes[t];t++)if("next"==o.nodeName.toLowerCase()){e.removeChild(o);break}},goog.global.Blockly||(goog.global.Blockly={}),goog.global.Blockly.Xml||(goog.global.Blockly.Xml={}),goog.global.Blockly.Xml.domToText=Blockly.Xml.domToText,goog.global.Blockly.Xml.domToWorkspace=Blockly.Xml.domToWorkspace,goog.global.Blockly.Xml.textToDom=Blockly.Xml.textToDom,goog.global.Blockly.Xml.workspaceToDom=Blockly.Xml.workspaceToDom,Blockly.ZoomControls=function(e){this.workspace_=e},Blockly.ZoomControls.prototype.WIDTH_=32,Blockly.ZoomControls.prototype.HEIGHT_=110,Blockly.ZoomControls.prototype.MARGIN_BOTTOM_=20,Blockly.ZoomControls.prototype.MARGIN_SIDE_=20,Blockly.ZoomControls.prototype.svgGroup_=null,Blockly.ZoomControls.prototype.left_=0,Blockly.ZoomControls.prototype.top_=0,Blockly.ZoomControls.prototype.createDom=function(){var e=this.workspace_;this.svgGroup_=Blockly.createSvgElement("g",{"class":"blocklyZoom"},null);var o=String(Math.random()).substring(2),t=Blockly.createSvgElement("clipPath",{id:"blocklyZoomoutClipPath"+o},this.svgGroup_);Blockly.createSvgElement("rect",{width:32,height:32,y:77},t);var n=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,x:-64,y:-15,"clip-path":"url(#blocklyZoomoutClipPath"+o+")"},this.svgGroup_);n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.options.pathToMedia+Blockly.SPRITE.url),t=Blockly.createSvgElement("clipPath",{id:"blocklyZoominClipPath"+o},this.svgGroup_),Blockly.createSvgElement("rect",{width:32,height:32,y:43},t);var r=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,x:-32,y:-49,"clip-path":"url(#blocklyZoominClipPath"+o+")"},this.svgGroup_);return r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.options.pathToMedia+Blockly.SPRITE.url),t=Blockly.createSvgElement("clipPath",{id:"blocklyZoomresetClipPath"+o},this.svgGroup_),Blockly.createSvgElement("rect",{width:32,height:32},t),o=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,y:-92,"clip-path":"url(#blocklyZoomresetClipPath"+o+")"},this.svgGroup_),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.options.pathToMedia+Blockly.SPRITE.url),Blockly.bindEventWithChecks_(o,"mousedown",null,function(o){e.markFocused(),e.setScale(e.options.zoomOptions.startScale),e.scrollCenter(),Blockly.Touch.clearTouchIdentifier(),o.stopPropagation(),o.preventDefault()}),Blockly.bindEventWithChecks_(r,"mousedown",null,function(o){e.markFocused(),e.zoomCenter(1),Blockly.Touch.clearTouchIdentifier(),o.stopPropagation(),o.preventDefault()}),Blockly.bindEventWithChecks_(n,"mousedown",null,function(o){e.markFocused(),e.zoomCenter(-1),Blockly.Touch.clearTouchIdentifier(),o.stopPropagation(),o.preventDefault()}),this.svgGroup_},Blockly.ZoomControls.prototype.init=function(e){return this.bottom_=this.MARGIN_BOTTOM_+e,this.bottom_+this.HEIGHT_},Blockly.ZoomControls.prototype.dispose=function(){this.svgGroup_&&(goog.dom.removeNode(this.svgGroup_),this.svgGroup_=null),this.workspace_=null},Blockly.ZoomControls.prototype.position=function(){var e=this.workspace_.getMetrics();e&&(this.workspace_.RTL?(this.left_=this.MARGIN_SIDE_+Blockly.Scrollbar.scrollbarThickness,e.toolboxPosition==Blockly.TOOLBOX_AT_LEFT&&(this.left_+=e.flyoutWidth,this.workspace_.toolbox_&&(this.left_+=e.absoluteLeft))):(this.left_=e.viewWidth+e.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_-Blockly.Scrollbar.scrollbarThickness,e.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT&&(this.left_-=e.flyoutWidth)),this.top_=e.viewHeight+e.absoluteTop-this.HEIGHT_-this.bottom_,e.toolboxPosition==Blockly.TOOLBOX_AT_BOTTOM&&(this.top_-=e.flyoutHeight),this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))},Blockly.WorkspaceSvg=function(e){Blockly.WorkspaceSvg.superClass_.constructor.call(this,e),this.getMetrics=e.getMetrics||Blockly.WorkspaceSvg.getTopLevelWorkspaceMetrics_,this.setMetrics=e.setMetrics||Blockly.WorkspaceSvg.setTopLevelWorkspaceMetrics_,Blockly.ConnectionDB.init(this),this.SOUNDS_=Object.create(null),this.highlightedBlocks_=[]},goog.inherits(Blockly.WorkspaceSvg,Blockly.Workspace),Blockly.WorkspaceSvg.prototype.resizeHandlerWrapper_=null,Blockly.WorkspaceSvg.prototype.rendered=!0,Blockly.WorkspaceSvg.prototype.isFlyout=!1,Blockly.WorkspaceSvg.prototype.isMutator=!1,Blockly.WorkspaceSvg.prototype.dragMode_=Blockly.DRAG_NONE,Blockly.WorkspaceSvg.prototype.resizesEnabled_=!0,Blockly.WorkspaceSvg.prototype.scrollX=0,Blockly.WorkspaceSvg.prototype.scrollY=0,Blockly.WorkspaceSvg.prototype.startScrollX=0,Blockly.WorkspaceSvg.prototype.startScrollY=0,Blockly.WorkspaceSvg.prototype.dragDeltaXY_=null,Blockly.WorkspaceSvg.prototype.scale=1,Blockly.WorkspaceSvg.prototype.trashcan=null,Blockly.WorkspaceSvg.prototype.scrollbar=null,Blockly.WorkspaceSvg.prototype.lastSound_=null,Blockly.WorkspaceSvg.prototype.lastRecordedPageScroll_=null,Blockly.WorkspaceSvg.prototype.inverseScreenCTM_=null,Blockly.WorkspaceSvg.prototype.getInverseScreenCTM=function(){return this.inverseScreenCTM_},Blockly.WorkspaceSvg.prototype.updateInverseScreenCTM=function(){var e=this.getParentSvg().getScreenCTM();e&&(this.inverseScreenCTM_=e.inverse())},Blockly.WorkspaceSvg.prototype.setResizeHandlerWrapper=function(e){this.resizeHandlerWrapper_=e},Blockly.WorkspaceSvg.prototype.createDom=function(e){if(this.svgGroup_=Blockly.createSvgElement("g",{"class":"blocklyWorkspace"},null),e&&(this.svgBackground_=Blockly.createSvgElement("rect",{height:"100%",width:"100%","class":e},this.svgGroup_),"blocklyMainBackground"==e&&(this.svgBackground_.style.fill="url(#"+this.options.gridPattern.id+")")),this.svgBlockCanvas_=Blockly.createSvgElement("g",{"class":"blocklyBlockCanvas"},this.svgGroup_,this),this.svgBubbleCanvas_=Blockly.createSvgElement("g",{"class":"blocklyBubbleCanvas"},this.svgGroup_,this),e=Blockly.Scrollbar.scrollbarThickness,this.options.hasTrashcan&&(e=this.addTrashcan_(e)),this.options.zoomOptions&&this.options.zoomOptions.controls&&(e=this.addZoomControls_(e)),!this.isFlyout){Blockly.bindEventWithChecks_(this.svgGroup_,"mousedown",this,this.onMouseDown_);var o=this;Blockly.bindEvent_(this.svgGroup_,"touchstart",null,function(e){Blockly.longStart_(e,o)}),this.options.zoomOptions&&this.options.zoomOptions.wheel&&Blockly.bindEventWithChecks_(this.svgGroup_,"wheel",this,this.onMouseWheel_)}return this.options.hasCategories?this.toolbox_=new Blockly.Toolbox(this):this.options.languageTree&&this.addFlyout_(),this.updateGridPattern_(),this.recordDeleteAreas(),this.svgGroup_},Blockly.WorkspaceSvg.prototype.dispose=function(){this.rendered=!1,Blockly.WorkspaceSvg.superClass_.dispose.call(this),this.svgGroup_&&(goog.dom.removeNode(this.svgGroup_),this.svgGroup_=null),this.svgBubbleCanvas_=this.svgBlockCanvas_=null,this.toolbox_&&(this.toolbox_.dispose(),this.toolbox_=null),this.flyout_&&(this.flyout_.dispose(),this.flyout_=null),this.trashcan&&(this.trashcan.dispose(),this.trashcan=null),this.scrollbar&&(this.scrollbar.dispose(),this.scrollbar=null),this.zoomControls_&&(this.zoomControls_.dispose(),this.zoomControls_=null),this.options.parentWorkspace||goog.dom.removeNode(this.getParentSvg().parentNode),this.resizeHandlerWrapper_&&(Blockly.unbindEvent_(this.resizeHandlerWrapper_),this.resizeHandlerWrapper_=null)},Blockly.WorkspaceSvg.prototype.newBlock=function(e,o){return new Blockly.BlockSvg(this,e,o)},Blockly.WorkspaceSvg.prototype.addTrashcan_=function(e){this.trashcan=new Blockly.Trashcan(this);var o=this.trashcan.createDom();return this.svgGroup_.insertBefore(o,this.svgBlockCanvas_),this.trashcan.init(e)},Blockly.WorkspaceSvg.prototype.addZoomControls_=function(e){this.zoomControls_=new Blockly.ZoomControls(this);var o=this.zoomControls_.createDom();return this.svgGroup_.appendChild(o),this.zoomControls_.init(e)},Blockly.WorkspaceSvg.prototype.addFlyout_=function(){this.flyout_=new Blockly.Flyout({disabledPatternId:this.options.disabledPatternId,parentWorkspace:this,RTL:this.RTL,oneBasedIndex:this.options.oneBasedIndex,horizontalLayout:this.horizontalLayout,toolboxPosition:this.options.toolboxPosition}),this.flyout_.autoClose=!1;var e=this.flyout_.createDom();this.svgGroup_.insertBefore(e,this.svgBlockCanvas_)},Blockly.WorkspaceSvg.prototype.updateScreenCalculations_=function(){this.updateInverseScreenCTM(),this.recordDeleteAreas()},Blockly.WorkspaceSvg.prototype.resizeContents=function(){this.resizesEnabled_&&this.rendered&&(this.scrollbar&&this.scrollbar.resize(),this.updateInverseScreenCTM())},Blockly.WorkspaceSvg.prototype.resize=function(){this.toolbox_&&this.toolbox_.position(),this.flyout_&&this.flyout_.position(),this.trashcan&&this.trashcan.position(),this.zoomControls_&&this.zoomControls_.position(),this.scrollbar&&this.scrollbar.resize(),this.updateScreenCalculations_()},Blockly.WorkspaceSvg.prototype.updateScreenCalculationsIfScrolled=function(){var e=goog.dom.getDocumentScroll();goog.math.Coordinate.equals(this.lastRecordedPageScroll_,e)||(this.lastRecordedPageScroll_=e,this.updateScreenCalculations_())},Blockly.WorkspaceSvg.prototype.getCanvas=function(){return this.svgBlockCanvas_},Blockly.WorkspaceSvg.prototype.getBubbleCanvas=function(){return this.svgBubbleCanvas_},Blockly.WorkspaceSvg.prototype.getParentSvg=function(){if(this.cachedParentSvg_)return this.cachedParentSvg_;for(var e=this.svgGroup_;e;){if("svg"==e.tagName)return this.cachedParentSvg_=e;e=e.parentNode}return null},Blockly.WorkspaceSvg.prototype.translate=function(e,o){var t="translate("+e+","+o+") scale("+this.scale+")";this.svgBlockCanvas_.setAttribute("transform",t),this.svgBubbleCanvas_.setAttribute("transform",t)},Blockly.WorkspaceSvg.prototype.getWidth=function(){var e=this.getMetrics();return e?e.viewWidth/this.scale:0},Blockly.WorkspaceSvg.prototype.setVisible=function(e){this.getParentSvg().style.display=e?"block":"none",this.toolbox_&&(this.toolbox_.HtmlDiv.style.display=e?"block":"none"),e?(this.render(),this.toolbox_&&this.toolbox_.position()):Blockly.hideChaff(!0)},Blockly.WorkspaceSvg.prototype.render=function(){for(var e=this.getAllBlocks(),o=e.length-1;o>=0;o--)e[o].render(!1)},Blockly.WorkspaceSvg.prototype.traceOn=function(){console.warn("Deprecated call to traceOn, delete this.")},Blockly.WorkspaceSvg.prototype.highlightBlock=function(e,o){if(void 0===o){for(var t,n=0;t=this.highlightedBlocks_[n];n++)t.setHighlighted(!1);this.highlightedBlocks_.length=0}(t=e?this.getBlockById(e):null)&&((n=void 0===o||o)?-1==this.highlightedBlocks_.indexOf(t)&&this.highlightedBlocks_.push(t):goog.array.remove(this.highlightedBlocks_,t),
+t.setHighlighted(n))},Blockly.WorkspaceSvg.prototype.paste=function(e){if(this.rendered&&!(e.getElementsByTagName("block").length>=this.remainingCapacity())){Blockly.terminateDrag_(),Blockly.Events.disable();try{var o=Blockly.Xml.domToBlock(e,this),t=parseInt(e.getAttribute("x"),10),n=parseInt(e.getAttribute("y"),10);if(!isNaN(t)&&!isNaN(n)){this.RTL&&(t=-t);do{e=!1;for(var r,i=this.getAllBlocks(),s=0;r=i[s];s++){var l=r.getRelativeToSurfaceXY();if(1>=Math.abs(t-l.x)&&1>=Math.abs(n-l.y)){e=!0;break}}if(!e)for(var g,a=o.getConnections_(!1),s=0;g=a[s];s++)if(g.closest(Blockly.SNAP_RADIUS,new goog.math.Coordinate(t,n)).connection){e=!0;break}e&&(t=this.RTL?t-Blockly.SNAP_RADIUS:t+Blockly.SNAP_RADIUS,n+=2*Blockly.SNAP_RADIUS)}while(e);o.moveBy(t,n)}}finally{Blockly.Events.enable()}Blockly.Events.isEnabled()&&!o.isShadow()&&Blockly.Events.fire(new Blockly.Events.Create(o)),o.select()}},Blockly.WorkspaceSvg.prototype.createVariable=function(e){Blockly.WorkspaceSvg.superClass_.createVariable.call(this,e),this.toolbox_&&this.toolbox_.flyout_&&!Blockly.Flyout.startFlyout_&&this.toolbox_.refreshSelection()},Blockly.WorkspaceSvg.prototype.recordDeleteAreas=function(){this.deleteAreaTrash_=this.trashcan?this.trashcan.getClientRect():null,this.deleteAreaToolbox_=this.flyout_?this.flyout_.getClientRect():this.toolbox_?this.toolbox_.getClientRect():null},Blockly.WorkspaceSvg.prototype.isDeleteArea=function(e){if(e=new goog.math.Coordinate(e.clientX,e.clientY),this.deleteAreaTrash_){if(this.deleteAreaTrash_.contains(e))return this.trashcan.setOpen_(!0),Blockly.Css.setCursor(Blockly.Css.Cursor.DELETE),!0;this.trashcan.setOpen_(!1)}return this.deleteAreaToolbox_&&this.deleteAreaToolbox_.contains(e)?(Blockly.Css.setCursor(Blockly.Css.Cursor.DELETE),!0):(Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED),!1)},Blockly.WorkspaceSvg.prototype.onMouseDown_=function(e){this.markFocused(),Blockly.isTargetInput_(e)?Blockly.Touch.clearTouchIdentifier():(Blockly.terminateDrag_(),Blockly.hideChaff(),e.target&&e.target.nodeName&&("svg"==e.target.nodeName.toLowerCase()||e.target==this.svgBackground_)&&Blockly.selected&&!this.options.readOnly&&Blockly.selected.unselect(),Blockly.isRightButton(e)?(this.showContextMenu_(e),Blockly.Touch.clearTouchIdentifier()):this.scrollbar?(this.dragMode_=Blockly.DRAG_BEGIN,this.startDragMouseX=e.clientX,this.startDragMouseY=e.clientY,this.startDragMetrics=this.getMetrics(),this.startScrollX=this.scrollX,this.startScrollY=this.scrollY,"mouseup"in Blockly.Touch.TOUCH_MAP&&(Blockly.Touch.onTouchUpWrapper_=Blockly.Touch.onTouchUpWrapper_||[],Blockly.Touch.onTouchUpWrapper_=Blockly.Touch.onTouchUpWrapper_.concat(Blockly.bindEventWithChecks_(document,"mouseup",null,Blockly.onMouseUp_))),Blockly.onMouseMoveWrapper_=Blockly.onMouseMoveWrapper_||[],Blockly.onMouseMoveWrapper_=Blockly.onMouseMoveWrapper_.concat(Blockly.bindEventWithChecks_(document,"mousemove",null,Blockly.onMouseMove_))):Blockly.Touch.clearTouchIdentifier(),e.stopPropagation(),e.preventDefault())},Blockly.WorkspaceSvg.prototype.startDrag=function(e,o){var t=Blockly.mouseToSvg(e,this.getParentSvg(),this.getInverseScreenCTM());t.x/=this.scale,t.y/=this.scale,this.dragDeltaXY_=goog.math.Coordinate.difference(o,t)},Blockly.WorkspaceSvg.prototype.moveDrag=function(e){return e=Blockly.mouseToSvg(e,this.getParentSvg(),this.getInverseScreenCTM()),e.x/=this.scale,e.y/=this.scale,goog.math.Coordinate.sum(this.dragDeltaXY_,e)},Blockly.WorkspaceSvg.prototype.isDragging=function(){return Blockly.dragMode_==Blockly.DRAG_FREE||Blockly.Flyout.startFlyout_&&Blockly.Flyout.startFlyout_.dragMode_==Blockly.DRAG_FREE||this.dragMode_==Blockly.DRAG_FREE},Blockly.WorkspaceSvg.prototype.onMouseWheel_=function(e){Blockly.terminateDrag_();var o=0<e.deltaY?-1:1,t=Blockly.mouseToSvg(e,this.getParentSvg(),this.getInverseScreenCTM());this.zoom(t.x,t.y,o),e.preventDefault()},Blockly.WorkspaceSvg.prototype.getBlocksBoundingBox=function(){var e=this.getTopBlocks(!1);if(!e.length)return{x:0,y:0,width:0,height:0};for(var o=e[0].getBoundingRectangle(),t=1;t<e.length;t++){var n=e[t].getBoundingRectangle();n.topLeft.x<o.topLeft.x&&(o.topLeft.x=n.topLeft.x),n.bottomRight.x>o.bottomRight.x&&(o.bottomRight.x=n.bottomRight.x),n.topLeft.y<o.topLeft.y&&(o.topLeft.y=n.topLeft.y),n.bottomRight.y>o.bottomRight.y&&(o.bottomRight.y=n.bottomRight.y)}return{x:o.topLeft.x,y:o.topLeft.y,width:o.bottomRight.x-o.topLeft.x,height:o.bottomRight.y-o.topLeft.y}},Blockly.WorkspaceSvg.prototype.cleanUp=function(){Blockly.Events.setGroup(!0);for(var e,o=this.getTopBlocks(!0),t=0,n=0;e=o[n];n++){var r=e.getRelativeToSurfaceXY();e.moveBy(-r.x,t-r.y),e.snapToGrid(),t=e.getRelativeToSurfaceXY().y+e.getHeightWidth().height+Blockly.BlockSvg.MIN_BLOCK_Y}Blockly.Events.setGroup(!1),this.resizeContents()},Blockly.WorkspaceSvg.prototype.showContextMenu_=function(e){function o(e){if(e.isDeletable())u=u.concat(e.getDescendants());else{e=e.getChildren();for(var t=0;t<e.length;t++)o(e[t])}}function t(){Blockly.Events.setGroup(i);var e=u.shift();e&&(e.workspace?(e.dispose(!1,!0),setTimeout(t,10)):t()),Blockly.Events.setGroup(!1)}if(!this.options.readOnly&&!this.isFlyout){var n=[],r=this.getTopBlocks(!0),i=Blockly.genUid(),s={};if(s.text=Blockly.Msg.UNDO,s.enabled=0<this.undoStack_.length,s.callback=this.undo.bind(this,!1),n.push(s),s={},s.text=Blockly.Msg.REDO,s.enabled=0<this.redoStack_.length,s.callback=this.undo.bind(this,!0),n.push(s),this.scrollbar&&(s={},s.text=Blockly.Msg.CLEAN_UP,s.enabled=1<r.length,s.callback=this.cleanUp.bind(this),n.push(s)),this.options.collapse){for(var l=s=!1,g=0;g<r.length;g++)for(var a=r[g];a;)a.isCollapsed()?s=!0:l=!0,a=a.getNextBlock();var c=function(e){for(var o=0,t=0;t<r.length;t++)for(var n=r[t];n;)setTimeout(n.setCollapsed.bind(n,e),o),n=n.getNextBlock(),o+=10},l={enabled:l};l.text=Blockly.Msg.COLLAPSE_ALL,l.callback=function(){c(!0)},n.push(l),s={enabled:s},s.text=Blockly.Msg.EXPAND_ALL,s.callback=function(){c(!1)},n.push(s)}for(var u=[],g=0;g<r.length;g++)o(r[g]);s={text:1==u.length?Blockly.Msg.DELETE_BLOCK:Blockly.Msg.DELETE_X_BLOCKS.replace("%1",String(u.length)),enabled:0<u.length,callback:function(){2>u.length?t():Blockly.confirm(Blockly.Msg.DELETE_ALL_BLOCKS.replace("%1",u.length),function(e){e&&t()})}},n.push(s),Blockly.ContextMenu.show(e,n,this.RTL)}},Blockly.WorkspaceSvg.prototype.loadAudio_=function(e,o){if(e.length){try{var t=new window.Audio}catch(n){return}for(var r,i=0;i<e.length;i++){var s=e[i],l=s.match(/\.(\w+)$/);if(l&&t.canPlayType("audio/"+l[1])){r=new window.Audio(s);break}}r&&r.play&&(this.SOUNDS_[o]=r)}},Blockly.WorkspaceSvg.prototype.preloadAudio_=function(){for(var e in this.SOUNDS_){var o=this.SOUNDS_[e];if(o.volume=.01,o.play(),o.pause(),goog.userAgent.IPAD||goog.userAgent.IPHONE)break}},Blockly.WorkspaceSvg.prototype.playAudio=function(e,o){var t=this.SOUNDS_[e];if(t){var n=new Date;n-this.lastSound_<Blockly.SOUND_LIMIT||(this.lastSound_=n,t=goog.userAgent.DOCUMENT_MODE&&9===goog.userAgent.DOCUMENT_MODE||goog.userAgent.IPAD||goog.userAgent.ANDROID?t:t.cloneNode(),t.volume=void 0===o?1:o,t.play())}else this.options.parentWorkspace&&this.options.parentWorkspace.playAudio(e,o)},Blockly.WorkspaceSvg.prototype.updateToolbox=function(e){if(e=Blockly.Options.parseToolboxTree(e)){if(!this.options.languageTree)throw"Existing toolbox is null.  Can't create new toolbox.";if(e.getElementsByTagName("category").length){if(!this.toolbox_)throw"Existing toolbox has no categories.  Can't change mode.";this.options.languageTree=e,this.toolbox_.populate_(e),this.toolbox_.addColour_()}else{if(!this.flyout_)throw"Existing toolbox has categories.  Can't change mode.";this.options.languageTree=e,this.flyout_.show(e.childNodes)}}else if(this.options.languageTree)throw"Can't nullify an existing toolbox."},Blockly.WorkspaceSvg.prototype.markFocused=function(){this.options.parentWorkspace?this.options.parentWorkspace.markFocused():Blockly.mainWorkspace=this},Blockly.WorkspaceSvg.prototype.zoom=function(e,o,t){var n=this.options.zoomOptions.scaleSpeed,r=this.getMetrics(),i=this.getParentSvg().createSVGPoint();i.x=e,i.y=o,i=i.matrixTransform(this.getCanvas().getCTM().inverse()),e=i.x,o=i.y,i=this.getCanvas(),n=1==t?n:1/n,t=this.scale*n,t>this.options.zoomOptions.maxScale?n=this.options.zoomOptions.maxScale/this.scale:t<this.options.zoomOptions.minScale&&(n=this.options.zoomOptions.minScale/this.scale),this.scale!=t&&(this.scrollbar&&(e=i.getCTM().translate(e*(1-n),o*(1-n)).scale(n),this.scrollX=e.e-r.absoluteLeft,this.scrollY=e.f-r.absoluteTop),this.setScale(t))},Blockly.WorkspaceSvg.prototype.zoomCenter=function(e){var o=this.getMetrics();this.zoom(o.viewWidth/2,o.viewHeight/2,e)},Blockly.WorkspaceSvg.prototype.zoomToFit=function(){var e=this.getMetrics(),o=this.getBlocksBoundingBox(),t=o.width,o=o.height;if(t){var n=e.viewWidth,r=e.viewHeight;this.flyout_&&(n-=this.flyout_.width_),this.scrollbar||(t+=e.contentLeft,o+=e.contentTop),this.setScale(Math.min(n/t,r/o)),this.scrollCenter()}},Blockly.WorkspaceSvg.prototype.scrollCenter=function(){if(this.scrollbar){var e=this.getMetrics(),o=(e.contentWidth-e.viewWidth)/2;this.flyout_&&(o-=this.flyout_.width_/2),this.scrollbar.set(o,(e.contentHeight-e.viewHeight)/2)}},Blockly.WorkspaceSvg.prototype.setScale=function(e){this.options.zoomOptions.maxScale&&e>this.options.zoomOptions.maxScale?e=this.options.zoomOptions.maxScale:this.options.zoomOptions.minScale&&e<this.options.zoomOptions.minScale&&(e=this.options.zoomOptions.minScale),this.scale=e,this.updateGridPattern_(),this.scrollbar?this.scrollbar.resize():this.translate(this.scrollX,this.scrollY),Blockly.hideChaff(!1),this.flyout_&&this.flyout_.reflow()},Blockly.WorkspaceSvg.prototype.updateGridPattern_=function(){if(this.options.gridPattern){var e=this.options.gridOptions.spacing*this.scale||100;this.options.gridPattern.setAttribute("width",e),this.options.gridPattern.setAttribute("height",e);var e=Math.floor(this.options.gridOptions.spacing/2)+.5,o=e-this.options.gridOptions.length/2,t=e+this.options.gridOptions.length/2,n=this.options.gridPattern.firstChild,r=n&&n.nextSibling,e=e*this.scale,o=o*this.scale,t=t*this.scale;n&&(n.setAttribute("stroke-width",this.scale),n.setAttribute("x1",o),n.setAttribute("y1",e),n.setAttribute("x2",t),n.setAttribute("y2",e)),r&&(r.setAttribute("stroke-width",this.scale),r.setAttribute("x1",e),r.setAttribute("y1",o),r.setAttribute("x2",e),r.setAttribute("y2",t))}},Blockly.WorkspaceSvg.getTopLevelWorkspaceMetrics_=function(){var e=Blockly.svgSize(this.getParentSvg());this.toolbox_&&(this.toolboxPosition==Blockly.TOOLBOX_AT_TOP||this.toolboxPosition==Blockly.TOOLBOX_AT_BOTTOM?e.height-=this.toolbox_.getHeight():(this.toolboxPosition==Blockly.TOOLBOX_AT_LEFT||this.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT)&&(e.width-=this.toolbox_.getWidth()));var o=Blockly.Flyout.prototype.CORNER_RADIUS-1,t=e.width-o,n=e.height-o,r=this.getBlocksBoundingBox(),i=r.width*this.scale,s=r.height*this.scale,l=r.x*this.scale,g=r.y*this.scale;return this.scrollbar?(o=Math.min(l-t/2,l+i-t),t=Math.max(l+i+t/2,l+t),i=Math.min(g-n/2,g+s-n),n=Math.max(g+s+n/2,g+n)):(o=r.x,t=o+r.width,i=r.y,n=i+r.height),r=0,this.toolbox_&&this.toolboxPosition==Blockly.TOOLBOX_AT_LEFT&&(r=this.toolbox_.getWidth()),s=0,this.toolbox_&&this.toolboxPosition==Blockly.TOOLBOX_AT_TOP&&(s=this.toolbox_.getHeight()),{viewHeight:e.height,viewWidth:e.width,contentHeight:n-i,contentWidth:t-o,viewTop:-this.scrollY,viewLeft:-this.scrollX,contentTop:i,contentLeft:o,absoluteTop:s,absoluteLeft:r,toolboxWidth:this.toolbox_?this.toolbox_.getWidth():0,toolboxHeight:this.toolbox_?this.toolbox_.getHeight():0,flyoutWidth:this.flyout_?this.flyout_.getWidth():0,flyoutHeight:this.flyout_?this.flyout_.getHeight():0,toolboxPosition:this.toolboxPosition}},Blockly.WorkspaceSvg.setTopLevelWorkspaceMetrics_=function(e){if(!this.scrollbar)throw"Attempt to set top level workspace scroll without scrollbars.";var o=this.getMetrics();goog.isNumber(e.x)&&(this.scrollX=-o.contentWidth*e.x-o.contentLeft),goog.isNumber(e.y)&&(this.scrollY=-o.contentHeight*e.y-o.contentTop),e=this.scrollX+o.absoluteLeft,o=this.scrollY+o.absoluteTop,this.translate(e,o),this.options.gridPattern&&(this.options.gridPattern.setAttribute("x",e),this.options.gridPattern.setAttribute("y",o),goog.userAgent.IE&&this.updateGridPattern_())},Blockly.WorkspaceSvg.prototype.setResizesEnabled=function(e){var o=!this.resizesEnabled_&&e;this.resizesEnabled_=e,o&&this.resizeContents()},Blockly.WorkspaceSvg.prototype.clear=function(){this.setResizesEnabled(!1),Blockly.WorkspaceSvg.superClass_.clear.call(this),this.setResizesEnabled(!0)},Blockly.WorkspaceSvg.prototype.setVisible=Blockly.WorkspaceSvg.prototype.setVisible,Blockly.Mutator=function(e){Blockly.Mutator.superClass_.constructor.call(this,null),this.quarkNames_=e},goog.inherits(Blockly.Mutator,Blockly.Icon),Blockly.Mutator.prototype.workspaceWidth_=0,Blockly.Mutator.prototype.workspaceHeight_=0,Blockly.Mutator.prototype.drawIcon_=function(e){Blockly.createSvgElement("rect",{"class":"blocklyIconShape",rx:"4",ry:"4",height:"16",width:"16"},e),Blockly.createSvgElement("path",{"class":"blocklyIconSymbol",d:"m4.203,7.296 0,1.368 -0.92,0.677 -0.11,0.41 0.9,1.559 0.41,0.11 1.043,-0.457 1.187,0.683 0.127,1.134 0.3,0.3 1.8,0 0.3,-0.299 0.127,-1.138 1.185,-0.682 1.046,0.458 0.409,-0.11 0.9,-1.559 -0.11,-0.41 -0.92,-0.677 0,-1.366 0.92,-0.677 0.11,-0.41 -0.9,-1.559 -0.409,-0.109 -1.046,0.458 -1.185,-0.682 -0.127,-1.138 -0.3,-0.299 -1.8,0 -0.3,0.3 -0.126,1.135 -1.187,0.682 -1.043,-0.457 -0.41,0.11 -0.899,1.559 0.108,0.409z"},e),Blockly.createSvgElement("circle",{"class":"blocklyIconShape",r:"2.7",cx:"8",cy:"8"},e)},Blockly.Mutator.prototype.iconClick_=function(e){this.block_.isEditable()&&Blockly.Icon.prototype.iconClick_.call(this,e)},Blockly.Mutator.prototype.createEditor_=function(){if(this.svgDialog_=Blockly.createSvgElement("svg",{x:Blockly.Bubble.BORDER_WIDTH,y:Blockly.Bubble.BORDER_WIDTH},null),this.quarkNames_.length)for(var e,o=goog.dom.createDom("xml"),t=0;e=this.quarkNames_[t];t++)o.appendChild(goog.dom.createDom("block",{type:e}));else o=null;return o={languageTree:o,parentWorkspace:this.block_.workspace,pathToMedia:this.block_.workspace.options.pathToMedia,RTL:this.block_.RTL,toolboxPosition:this.block_.RTL?Blockly.TOOLBOX_AT_RIGHT:Blockly.TOOLBOX_AT_LEFT,horizontalLayout:!1,getMetrics:this.getFlyoutMetrics_.bind(this),setMetrics:null},this.workspace_=new Blockly.WorkspaceSvg(o),this.workspace_.isMutator=!0,this.svgDialog_.appendChild(this.workspace_.createDom("blocklyMutatorBackground")),this.svgDialog_},Blockly.Mutator.prototype.updateEditable=function(){this.block_.isInFlyout||(this.block_.isEditable()?this.iconGroup_&&Blockly.removeClass_(this.iconGroup_,"blocklyIconGroupReadonly"):(this.setVisible(!1),this.iconGroup_&&Blockly.addClass_(this.iconGroup_,"blocklyIconGroupReadonly"))),Blockly.Icon.prototype.updateEditable.call(this)},Blockly.Mutator.prototype.resizeBubble_=function(){var e,o=2*Blockly.Bubble.BORDER_WIDTH,t=this.workspace_.getCanvas().getBBox();if(e=this.block_.RTL?-t.x:t.width+t.x,t=t.height+3*o,this.workspace_.flyout_)var n=this.workspace_.flyout_.getMetrics_(),t=Math.max(t,n.contentHeight+20);e+=3*o,(Math.abs(this.workspaceWidth_-e)>o||Math.abs(this.workspaceHeight_-t)>o)&&(this.workspaceWidth_=e,this.workspaceHeight_=t,this.bubble_.setBubbleSize(e+o,t+o),this.svgDialog_.setAttribute("width",this.workspaceWidth_),this.svgDialog_.setAttribute("height",this.workspaceHeight_)),this.block_.RTL&&(o="translate("+this.workspaceWidth_+",0)",this.workspace_.getCanvas().setAttribute("transform",o)),this.workspace_.resize()},Blockly.Mutator.prototype.setVisible=function(e){if(e!=this.isVisible())if(Blockly.Events.fire(new Blockly.Events.Ui(this.block_,"mutatorOpen",!e,e)),e){this.bubble_=new Blockly.Bubble(this.block_.workspace,this.createEditor_(),this.block_.svgPath_,this.iconXY_,null,null),(e=this.workspace_.options.languageTree)&&(this.workspace_.flyout_.init(this.workspace_),this.workspace_.flyout_.show(e.childNodes)),this.rootBlock_=this.block_.decompose(this.workspace_),e=this.rootBlock_.getDescendants();for(var o,t=0;o=e[t];t++)o.render();if(this.rootBlock_.setMovable(!1),this.rootBlock_.setDeletable(!1),this.workspace_.flyout_?(e=2*this.workspace_.flyout_.CORNER_RADIUS,t=this.workspace_.flyout_.width_+e):t=e=16,this.block_.RTL&&(t=-t),this.rootBlock_.moveBy(t,e),this.block_.saveConnections){var n=this;this.block_.saveConnections(this.rootBlock_),this.sourceListener_=function(){n.block_.saveConnections(n.rootBlock_)},this.block_.workspace.addChangeListener(this.sourceListener_)}this.resizeBubble_(),this.workspace_.addChangeListener(this.workspaceChanged_.bind(this)),this.updateColour()}else this.svgDialog_=null,this.workspace_.dispose(),this.rootBlock_=this.workspace_=null,this.bubble_.dispose(),this.bubble_=null,this.workspaceHeight_=this.workspaceWidth_=0,this.sourceListener_&&(this.block_.workspace.removeChangeListener(this.sourceListener_),this.sourceListener_=null)},Blockly.Mutator.prototype.workspaceChanged_=function(){if(Blockly.dragMode_==Blockly.DRAG_NONE)for(var e,o=this.workspace_.getTopBlocks(!1),t=0;e=o[t];t++){var n=e.getRelativeToSurfaceXY(),r=e.getHeightWidth();20>n.y+r.height&&e.moveBy(0,20-r.height-n.y)}if(this.rootBlock_.workspace==this.workspace_){if(Blockly.Events.setGroup(!0),e=this.block_,o=(o=e.mutationToDom())&&Blockly.Xml.domToText(o),t=e.rendered,e.rendered=!1,e.compose(this.rootBlock_),e.rendered=t,e.initSvg(),t=(t=e.mutationToDom())&&Blockly.Xml.domToText(t),o!=t){Blockly.Events.fire(new Blockly.Events.Change(e,"mutation",null,o,t));var i=Blockly.Events.getGroup();setTimeout(function(){Blockly.Events.setGroup(i),e.bumpNeighbours_(),Blockly.Events.setGroup(!1)},Blockly.BUMP_DELAY)}e.rendered&&e.render(),this.resizeBubble_(),Blockly.Events.setGroup(!1)}},Blockly.Mutator.prototype.getFlyoutMetrics_=function(){return{viewHeight:this.workspaceHeight_,viewWidth:this.workspaceWidth_,absoluteTop:0,absoluteLeft:0}},Blockly.Mutator.prototype.dispose=function(){this.block_.mutator=null,Blockly.Icon.prototype.dispose.call(this)},Blockly.Mutator.reconnect=function(e,o,t){if(!e||!e.getSourceBlock().workspace)return!1;t=o.getInput(t).connection;var n=e.targetBlock();return n&&n!=o||t.targetConnection==e?!1:(t.isConnected()&&t.disconnect(),t.connect(e),!0)},goog.global.Blockly||(goog.global.Blockly={}),goog.global.Blockly.Mutator||(goog.global.Blockly.Mutator={}),goog.global.Blockly.Mutator.reconnect=Blockly.Mutator.reconnect,Blockly.Warning=function(e){Blockly.Warning.superClass_.constructor.call(this,e),this.createIcon(),this.text_={}},goog.inherits(Blockly.Warning,Blockly.Icon),Blockly.Warning.prototype.collapseHidden=!1,Blockly.Warning.prototype.drawIcon_=function(e){Blockly.createSvgElement("path",{"class":"blocklyIconShape",d:"M2,15Q-1,15 0.5,12L6.5,1.7Q8,-1 9.5,1.7L15.5,12Q17,15 14,15z"},e),Blockly.createSvgElement("path",{"class":"blocklyIconSymbol",d:"m7,4.8v3.16l0.27,2.27h1.46l0.27,-2.27v-3.16z"},e),Blockly.createSvgElement("rect",{"class":"blocklyIconSymbol",x:"7",y:"11",height:"2",width:"2"},e)},Blockly.Warning.textToDom_=function(e){var o=Blockly.createSvgElement("text",{"class":"blocklyText blocklyBubbleText",y:Blockly.Bubble.BORDER_WIDTH},null);e=e.split("\n");for(var t=0;t<e.length;t++){var n=Blockly.createSvgElement("tspan",{dy:"1em",x:Blockly.Bubble.BORDER_WIDTH},o),r=document.createTextNode(e[t]);n.appendChild(r)}return o},Blockly.Warning.prototype.setVisible=function(e){if(e!=this.isVisible())if(Blockly.Events.fire(new Blockly.Events.Ui(this.block_,"warningOpen",!e,e)),e){if(e=Blockly.Warning.textToDom_(this.getText()),this.bubble_=new Blockly.Bubble(this.block_.workspace,e,this.block_.svgPath_,this.iconXY_,null,null),this.block_.RTL)for(var o,t=e.getBBox().width,n=0;o=e.childNodes[n];n++)o.setAttribute("text-anchor","end"),o.setAttribute("x",t+Blockly.Bubble.BORDER_WIDTH);this.updateColour(),e=this.bubble_.getBubbleSize(),this.bubble_.setBubbleSize(e.width,e.height)}else this.bubble_.dispose(),this.body_=this.bubble_=null},Blockly.Warning.prototype.bodyFocus_=function(e){this.bubble_.promote_()},Blockly.Warning.prototype.setText=function(e,o){this.text_[o]!=e&&(e?this.text_[o]=e:delete this.text_[o],this.isVisible()&&(this.setVisible(!1),this.setVisible(!0)))},Blockly.Warning.prototype.getText=function(){var e,o=[];for(e in this.text_)o.push(this.text_[e]);return o.join("\n")},Blockly.Warning.prototype.dispose=function(){this.block_.warning=null,Blockly.Icon.prototype.dispose.call(this)},Blockly.Block=function(e,o,t){this.id=t&&!e.getBlockById(t)?t:Blockly.genUid(),e.blockDB_[this.id]=this,this.previousConnection=this.nextConnection=this.outputConnection=null,this.inputList=[],this.inputsInline=void 0,this.disabled=!1,this.tooltip="",this.contextMenu=!0,this.parentBlock_=null,this.childBlocks_=[],this.editable_=this.movable_=this.deletable_=!0,this.collapsed_=this.isShadow_=!1,this.comment=null,this.xy_=new goog.math.Coordinate(0,0),this.workspace=e,this.isInFlyout=e.isFlyout,this.isInMutator=e.isMutator,this.RTL=e.RTL,o&&(this.type=o,t=Blockly.Blocks[o],goog.asserts.assertObject(t,'Error: "%s" is an unknown language block.',o),goog.mixin(this,t)),e.addTopBlock(this),goog.isFunction(this.init)&&this.init(),this.inputsInlineDefault=this.inputsInline,Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.Create(this)),goog.isFunction(this.onchange)&&(this.onchangeWrapper_=this.onchange.bind(this),this.workspace.addChangeListener(this.onchangeWrapper_))},Blockly.Block.obtain=function(e,o){return console.warn("Deprecated call to Blockly.Block.obtain, use workspace.newBlock instead."),e.newBlock(o)},Blockly.Block.prototype.data=null,Blockly.Block.prototype.colour_="#000000",Blockly.Block.prototype.dispose=function(e){if(this.workspace){this.onchangeWrapper_&&this.workspace.removeChangeListener(this.onchangeWrapper_),this.unplug(e),Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.Delete(this)),Blockly.Events.disable();try{this.workspace&&(this.workspace.removeTopBlock(this),delete this.workspace.blockDB_[this.id],this.workspace=null);for(var o=this.childBlocks_.length-1;o>=0;o--)this.childBlocks_[o].dispose(!1);for(var t,o=0;t=this.inputList[o];o++)t.dispose();this.inputList.length=0;for(var n=this.getConnections_(!0),o=0;o<n.length;o++){var r=n[o];r.isConnected()&&r.disconnect(),n[o].dispose()}}finally{Blockly.Events.enable()}}},Blockly.Block.prototype.unplug=function(e){if(this.outputConnection)this.outputConnection.isConnected()&&this.outputConnection.disconnect();else if(this.previousConnection){var o=null;this.previousConnection.isConnected()&&(o=this.previousConnection.targetConnection,this.previousConnection.disconnect());var t=this.getNextBlock();e&&t&&(e=this.nextConnection.targetConnection,e.disconnect(),o&&o.checkType_(e)&&o.connect(e))}},Blockly.Block.prototype.getConnections_=function(){var e=[];this.outputConnection&&e.push(this.outputConnection),this.previousConnection&&e.push(this.previousConnection),this.nextConnection&&e.push(this.nextConnection);for(var o,t=0;o=this.inputList[t];t++)o.connection&&e.push(o.connection);return e},Blockly.Block.prototype.lastConnectionInStack_=function(){for(var e=this.nextConnection;e;){var o=e.targetBlock();if(!o)return e;e=o.nextConnection}return null},Blockly.Block.prototype.bumpNeighbours_=function(){if(this.workspace&&Blockly.dragMode_==Blockly.DRAG_NONE){var e=this.getRootBlock();if(!e.isInFlyout)for(var o,t=this.getConnections_(!1),n=0;o=t[n];n++){o.isConnected()&&o.isSuperior()&&o.targetBlock().bumpNeighbours_();for(var r,i=o.neighbours_(Blockly.SNAP_RADIUS),s=0;r=i[s];s++)o.isConnected()&&r.isConnected()||r.getSourceBlock().getRootBlock()!=e&&(o.isSuperior()?r.bumpAwayFrom_(o):o.bumpAwayFrom_(r))}}},Blockly.Block.prototype.getParent=function(){return this.parentBlock_},Blockly.Block.prototype.getInputWithBlock=function(e){for(var o,t=0;o=this.inputList[t];t++)if(o.connection&&o.connection.targetBlock()==e)return o;return null},Blockly.Block.prototype.getSurroundParent=function(){var e=this;do{var o=e,e=e.getParent();if(!e)return null}while(e.getNextBlock()==o);return e},Blockly.Block.prototype.getNextBlock=function(){return this.nextConnection&&this.nextConnection.targetBlock()},Blockly.Block.prototype.getRootBlock=function(){var e,o=this;do e=o,o=e.parentBlock_;while(o);return e},Blockly.Block.prototype.getChildren=function(){return this.childBlocks_},Blockly.Block.prototype.setParent=function(e){if(e!=this.parentBlock_){if(this.parentBlock_){if(goog.array.remove(this.parentBlock_.childBlocks_,this),this.previousConnection&&this.previousConnection.isConnected())throw"Still connected to previous block.";if(this.outputConnection&&this.outputConnection.isConnected())throw"Still connected to parent block.";this.parentBlock_=null}else this.workspace.removeTopBlock(this);(this.parentBlock_=e)?e.childBlocks_.push(this):this.workspace.addTopBlock(this)}},Blockly.Block.prototype.getDescendants=function(){for(var e,o=[this],t=0;e=this.childBlocks_[t];t++)o.push.apply(o,e.getDescendants());return o},Blockly.Block.prototype.isDeletable=function(){return this.deletable_&&!this.isShadow_&&!(this.workspace&&this.workspace.options.readOnly)},Blockly.Block.prototype.setDeletable=function(e){this.deletable_=e},Blockly.Block.prototype.isMovable=function(){return this.movable_&&!this.isShadow_&&!(this.workspace&&this.workspace.options.readOnly)},Blockly.Block.prototype.setMovable=function(e){this.movable_=e},Blockly.Block.prototype.isShadow=function(){return this.isShadow_},Blockly.Block.prototype.setShadow=function(e){this.isShadow_=e},Blockly.Block.prototype.isEditable=function(){return this.editable_&&!(this.workspace&&this.workspace.options.readOnly)},Blockly.Block.prototype.setEditable=function(e){this.editable_=e,e=0;for(var o;o=this.inputList[e];e++)for(var t,n=0;t=o.fieldRow[n];n++)t.updateEditable()},Blockly.Block.prototype.setConnectionsHidden=function(e){if(!e&&this.isCollapsed()){if(this.outputConnection&&this.outputConnection.setHidden(e),this.previousConnection&&this.previousConnection.setHidden(e),this.nextConnection){this.nextConnection.setHidden(e);var o=this.nextConnection.targetBlock();o&&o.setConnectionsHidden(e)}}else for(var t=this.getConnections_(!0),n=0;o=t[n];n++)o.setHidden(e),o.isSuperior()&&(o=o.targetBlock())&&o.setConnectionsHidden(e)},Blockly.Block.prototype.setHelpUrl=function(e){this.helpUrl=e},Blockly.Block.prototype.setTooltip=function(e){this.tooltip=e},Blockly.Block.prototype.getColour=function(){return this.colour_},Blockly.Block.prototype.setColour=function(e){var o=parseFloat(e);if(isNaN(o)){if(!goog.isString(e)||!e.match(/^#[0-9a-fA-F]{6}$/))throw"Invalid colour: "+e;this.colour_=e}else this.colour_=Blockly.hueToRgb(o)},Blockly.Block.prototype.getField=function(e){for(var o,t=0;o=this.inputList[t];t++)for(var n,r=0;n=o.fieldRow[r];r++)if(n.name===e)return n;return null},Blockly.Block.prototype.getVars=function(){for(var e,o=[],t=0;e=this.inputList[t];t++)for(var n,r=0;n=e.fieldRow[r];r++)n instanceof Blockly.FieldVariable&&o.push(n.getValue());return o},Blockly.Block.prototype.renameVar=function(e,o){for(var t,n=0;t=this.inputList[n];n++)for(var r,i=0;r=t.fieldRow[i];i++)r instanceof Blockly.FieldVariable&&Blockly.Names.equals(e,r.getValue())&&r.setValue(o)},Blockly.Block.prototype.getFieldValue=function(e){return(e=this.getField(e))?e.getValue():null},Blockly.Block.prototype.getTitleValue=function(e){return console.warn("Deprecated call to getTitleValue, use getFieldValue instead."),this.getFieldValue(e)},Blockly.Block.prototype.setFieldValue=function(e,o){var t=this.getField(o);goog.asserts.assertObject(t,'Field "%s" not found.',o),t.setValue(e)},Blockly.Block.prototype.setTitleValue=function(e,o){console.warn("Deprecated call to setTitleValue, use setFieldValue instead."),this.setFieldValue(e,o)},Blockly.Block.prototype.setPreviousStatement=function(e,o){e?(void 0===o&&(o=null),this.previousConnection||(goog.asserts.assert(!this.outputConnection,"Remove output connection prior to adding previous connection."),this.previousConnection=this.makeConnection_(Blockly.PREVIOUS_STATEMENT)),this.previousConnection.setCheck(o)):this.previousConnection&&(goog.asserts.assert(!this.previousConnection.isConnected(),"Must disconnect previous statement before removing connection."),this.previousConnection.dispose(),this.previousConnection=null)},Blockly.Block.prototype.setNextStatement=function(e,o){e?(void 0===o&&(o=null),this.nextConnection||(this.nextConnection=this.makeConnection_(Blockly.NEXT_STATEMENT)),this.nextConnection.setCheck(o)):this.nextConnection&&(goog.asserts.assert(!this.nextConnection.isConnected(),"Must disconnect next statement before removing connection."),this.nextConnection.dispose(),this.nextConnection=null)},Blockly.Block.prototype.setOutput=function(e,o){e?(void 0===o&&(o=null),this.outputConnection||(goog.asserts.assert(!this.previousConnection,"Remove previous connection prior to adding output connection."),this.outputConnection=this.makeConnection_(Blockly.OUTPUT_VALUE)),this.outputConnection.setCheck(o)):this.outputConnection&&(goog.asserts.assert(!this.outputConnection.isConnected(),"Must disconnect output value before removing connection."),this.outputConnection.dispose(),this.outputConnection=null)},Blockly.Block.prototype.setInputsInline=function(e){this.inputsInline!=e&&(Blockly.Events.fire(new Blockly.Events.Change(this,"inline",null,this.inputsInline,e)),this.inputsInline=e)},Blockly.Block.prototype.getInputsInline=function(){if(void 0!=this.inputsInline)return this.inputsInline;for(var e=1;e<this.inputList.length;e++)if(this.inputList[e-1].type==Blockly.DUMMY_INPUT&&this.inputList[e].type==Blockly.DUMMY_INPUT)return!1;for(e=1;e<this.inputList.length;e++)if(this.inputList[e-1].type==Blockly.INPUT_VALUE&&this.inputList[e].type==Blockly.DUMMY_INPUT)return!0;return!1},Blockly.Block.prototype.setDisabled=function(e){this.disabled!=e&&(Blockly.Events.fire(new Blockly.Events.Change(this,"disabled",null,this.disabled,e)),this.disabled=e)},Blockly.Block.prototype.getInheritedDisabled=function(){for(var e=this;;){if(e=e.getSurroundParent(),!e)return!1;if(e.disabled)return!0}},Blockly.Block.prototype.isCollapsed=function(){return this.collapsed_},Blockly.Block.prototype.setCollapsed=function(e){this.collapsed_!=e&&(Blockly.Events.fire(new Blockly.Events.Change(this,"collapsed",null,this.collapsed_,e)),this.collapsed_=e)},Blockly.Block.prototype.toString=function(e,o){var t=[],n=o||"?";if(this.collapsed_)t.push(this.getInput("_TEMP_COLLAPSED_INPUT").fieldRow[0].text_);else for(var r,i=0;r=this.inputList[i];i++){for(var s,l=0;s=r.fieldRow[l];l++)t.push(s.getText());r.connection&&((r=r.connection.targetBlock())?t.push(r.toString(void 0,o)):t.push(n))}return t=goog.string.trim(t.join(" "))||"???",e&&(t=goog.string.truncate(t,e)),t},Blockly.Block.prototype.appendValueInput=function(e){return this.appendInput_(Blockly.INPUT_VALUE,e)},Blockly.Block.prototype.appendStatementInput=function(e){return this.appendInput_(Blockly.NEXT_STATEMENT,e)},Blockly.Block.prototype.appendDummyInput=function(e){return this.appendInput_(Blockly.DUMMY_INPUT,e||"")},Blockly.Block.prototype.jsonInit=function(e){goog.asserts.assert(void 0==e.output||void 0==e.previousStatement,"Must not have both an output and a previousStatement."),void 0!==e.colour&&this.setColour(e.colour);for(var o=0;void 0!==e["message"+o];)this.interpolate_(e["message"+o],e["args"+o]||[],e["lastDummyAlign"+o]),o++;void 0!==e.inputsInline&&this.setInputsInline(e.inputsInline),void 0!==e.output&&this.setOutput(!0,e.output),void 0!==e.previousStatement&&this.setPreviousStatement(!0,e.previousStatement),void 0!==e.nextStatement&&this.setNextStatement(!0,e.nextStatement),void 0!==e.tooltip&&this.setTooltip(e.tooltip),void 0!==e.helpUrl&&this.setHelpUrl(e.helpUrl)},Blockly.Block.prototype.interpolate_=function(e,o,t){var n=Blockly.utils.tokenizeInterpolation(e),r=[],i=0;e=[];for(var s=0;s<n.length;s++){
+var l=n[s];"number"==typeof l?(goog.asserts.assert(l>0&&l<=o.length,'Message index "%s" out of range.',l),goog.asserts.assert(!r[l],'Message index "%s" duplicated.',l),r[l]=!0,i++,e.push(o[l-1])):(l=l.trim())&&e.push(l)}for(goog.asserts.assert(i==o.length,"Message does not reference all %s arg(s).",o.length),e.length&&("string"==typeof e[e.length-1]||goog.string.startsWith(e[e.length-1].type,"field_"))&&(s={type:"input_dummy"},t&&(s.align=t),e.push(s)),t={LEFT:Blockly.ALIGN_LEFT,RIGHT:Blockly.ALIGN_RIGHT,CENTRE:Blockly.ALIGN_CENTRE},o=[],s=0;s<e.length;s++)if(r=e[s],"string"==typeof r)o.push([r,void 0]);else{n=i=null;do if(l=!1,"string"==typeof r)i=new Blockly.FieldLabel(r);else switch(r.type){case"input_value":n=this.appendValueInput(r.name);break;case"input_statement":n=this.appendStatementInput(r.name);break;case"input_dummy":n=this.appendDummyInput(r.name);break;case"field_label":i=new Blockly.FieldLabel(r.text,r["class"]);break;case"field_input":i=new Blockly.FieldTextInput(r.text),"boolean"==typeof r.spellcheck&&i.setSpellcheck(r.spellcheck);break;case"field_angle":i=new Blockly.FieldAngle(r.angle);break;case"field_checkbox":i=new Blockly.FieldCheckbox(r.checked?"TRUE":"FALSE");break;case"field_colour":i=new Blockly.FieldColour(r.colour);break;case"field_variable":i=new Blockly.FieldVariable(r.variable);break;case"field_dropdown":i=new Blockly.FieldDropdown(r.options);break;case"field_image":i=new Blockly.FieldImage(r.src,r.width,r.height,r.alt);break;case"field_number":i=new Blockly.FieldNumber(r.value,r.min,r.max,r.precision);break;case"field_date":if(Blockly.FieldDate){i=new Blockly.FieldDate(r.date);break}default:r.alt&&(r=r.alt,l=!0)}while(l);if(i)o.push([i,r.name]);else if(n){for(r.check&&n.setCheck(r.check),r.align&&n.setAlign(t[r.align]),r=0;r<o.length;r++)n.appendField(o[r][0],o[r][1]);o.length=0}}},Blockly.Block.prototype.appendInput_=function(e,o){var t=null;return(e==Blockly.INPUT_VALUE||e==Blockly.NEXT_STATEMENT)&&(t=this.makeConnection_(e)),t=new Blockly.Input(e,o,this,t),this.inputList.push(t),t},Blockly.Block.prototype.moveInputBefore=function(e,o){if(e!=o){for(var t,n=-1,r=o?-1:this.inputList.length,i=0;t=this.inputList[i];i++)if(t.name==e){if(n=i,-1!=r)break}else if(o&&t.name==o&&(r=i,-1!=n))break;goog.asserts.assert(-1!=n,'Named input "%s" not found.',e),goog.asserts.assert(-1!=r,'Reference input "%s" not found.',o),this.moveNumberedInputBefore(n,r)}},Blockly.Block.prototype.moveNumberedInputBefore=function(e,o){goog.asserts.assert(e!=o,"Can't move input to itself."),goog.asserts.assert(e<this.inputList.length,"Input index "+e+" out of bounds."),goog.asserts.assert(o<=this.inputList.length,"Reference input "+o+" out of bounds.");var t=this.inputList[e];this.inputList.splice(e,1),o>e&&o--,this.inputList.splice(o,0,t)},Blockly.Block.prototype.removeInput=function(e,o){for(var t,n=0;t=this.inputList[n];n++)if(t.name==e){if(t.connection&&t.connection.isConnected()){t.connection.setShadowDom(null);var r=t.connection.targetBlock();r.isShadow()?r.dispose():r.unplug()}return t.dispose(),void this.inputList.splice(n,1)}o||goog.asserts.fail('Input "%s" not found.',e)},Blockly.Block.prototype.getInput=function(e){for(var o,t=0;o=this.inputList[t];t++)if(o.name==e)return o;return null},Blockly.Block.prototype.getInputTargetBlock=function(e){return(e=this.getInput(e))&&e.connection&&e.connection.targetBlock()},Blockly.Block.prototype.getCommentText=function(){return this.comment||""},Blockly.Block.prototype.setCommentText=function(e){this.comment!=e&&(Blockly.Events.fire(new Blockly.Events.Change(this,"comment",null,this.comment,e||"")),this.comment=e)},Blockly.Block.prototype.setWarningText=function(e){},Blockly.Block.prototype.setMutator=function(e){},Blockly.Block.prototype.getRelativeToSurfaceXY=function(){return this.xy_},Blockly.Block.prototype.moveBy=function(e,o){goog.asserts.assert(!this.parentBlock_,"Block has parent.");var t=new Blockly.Events.Move(this);this.xy_.translate(e,o),t.recordNew(),Blockly.Events.fire(t)},Blockly.Block.prototype.makeConnection_=function(e){return new Blockly.Connection(this,e)},Blockly.ContextMenu={},Blockly.ContextMenu.currentBlock=null,Blockly.ContextMenu.show=function(e,o,t){if(Blockly.WidgetDiv.show(Blockly.ContextMenu,t,null),o.length){var n=new goog.ui.Menu;n.setRightToLeft(t);for(var r,i=0;r=o[i];i++){var s=new goog.ui.MenuItem(r.text);s.setRightToLeft(t),n.addChild(s,!0),s.setEnabled(r.enabled),r.enabled&&(goog.events.listen(s,goog.ui.Component.EventType.ACTION,r.callback),s.handleContextMenu=function(e){goog.events.dispatchEvent(this,goog.ui.Component.EventType.ACTION)})}goog.events.listen(n,goog.ui.Component.EventType.ACTION,Blockly.ContextMenu.hide),o=goog.dom.getViewportSize(),i=goog.style.getViewportPageOffset(document),n.render(Blockly.WidgetDiv.DIV);var l=n.getElement();Blockly.addClass_(l,"blocklyContextMenu"),Blockly.bindEventWithChecks_(l,"contextmenu",null,Blockly.noEvent),r=goog.style.getSize(l);var s=e.clientX+i.x,g=e.clientY+i.y;e.clientY+r.height>=o.height&&(g-=r.height),t?r.width>=e.clientX&&(s+=r.width):e.clientX+r.width>=o.width&&(s-=r.width),Blockly.WidgetDiv.position(s,g,o,i,t),n.setAllowAutoFocus(!0),setTimeout(function(){l.focus()},1),Blockly.ContextMenu.currentBlock=null}else Blockly.ContextMenu.hide()},Blockly.ContextMenu.hide=function(){Blockly.WidgetDiv.hideIfOwner(Blockly.ContextMenu),Blockly.ContextMenu.currentBlock=null},Blockly.ContextMenu.callbackFactory=function(e,o){return function(){Blockly.Events.disable();try{var t=Blockly.Xml.domToBlock(o,e.workspace),n=e.getRelativeToSurfaceXY();n.x=e.RTL?n.x-Blockly.SNAP_RADIUS:n.x+Blockly.SNAP_RADIUS,n.y+=2*Blockly.SNAP_RADIUS,t.moveBy(n.x,n.y)}finally{Blockly.Events.enable()}Blockly.Events.isEnabled()&&!t.isShadow()&&Blockly.Events.fire(new Blockly.Events.Create(t)),t.select()}},Blockly.RenderedConnection=function(e,o){Blockly.RenderedConnection.superClass_.constructor.call(this,e,o),this.offsetInBlock_=new goog.math.Coordinate(0,0)},goog.inherits(Blockly.RenderedConnection,Blockly.Connection),Blockly.RenderedConnection.prototype.distanceFrom=function(e){var o=this.x_-e.x_;return e=this.y_-e.y_,Math.sqrt(o*o+e*e)},Blockly.RenderedConnection.prototype.bumpAwayFrom_=function(e){if(Blockly.dragMode_==Blockly.DRAG_NONE){var o=this.sourceBlock_.getRootBlock();if(!o.isInFlyout){var t=!1;if(!o.isMovable()){if(o=e.getSourceBlock().getRootBlock(),!o.isMovable())return;e=this,t=!0}var n=Blockly.selected==o;n||o.addSelect();var r=e.x_+Blockly.SNAP_RADIUS-this.x_;e=e.y_+Blockly.SNAP_RADIUS-this.y_,t&&(e=-e),o.RTL&&(r=-r),o.moveBy(r,e),n||o.removeSelect()}}},Blockly.RenderedConnection.prototype.moveTo=function(e,o){this.inDB_&&this.db_.removeConnection_(this),this.x_=e,this.y_=o,this.hidden_||this.db_.addConnection(this)},Blockly.RenderedConnection.prototype.moveBy=function(e,o){this.moveTo(this.x_+e,this.y_+o)},Blockly.RenderedConnection.prototype.moveToOffset=function(e){this.moveTo(e.x+this.offsetInBlock_.x,e.y+this.offsetInBlock_.y)},Blockly.RenderedConnection.prototype.setOffsetInBlock=function(e,o){this.offsetInBlock_.x=e,this.offsetInBlock_.y=o},Blockly.RenderedConnection.prototype.tighten_=function(){var e=this.targetConnection.x_-this.x_,o=this.targetConnection.y_-this.y_;if(0!=e||0!=o){var t=this.targetBlock(),n=t.getSvgRoot();if(!n)throw"block is not rendered.";n=Blockly.getRelativeXY_(n),t.getSvgRoot().setAttribute("transform","translate("+(n.x-e)+","+(n.y-o)+")"),t.moveConnections_(-e,-o)}},Blockly.RenderedConnection.prototype.closest=function(e,o,t){return this.dbOpposite_.searchForClosest(this,e,o,t)},Blockly.RenderedConnection.prototype.highlight=function(){var e;e=this.type==Blockly.INPUT_VALUE||this.type==Blockly.OUTPUT_VALUE?"m 0,0 "+Blockly.BlockSvg.TAB_PATH_DOWN+" v 5":"m -20,0 h 5 "+Blockly.BlockSvg.NOTCH_PATH_LEFT+" h 5";var o=this.sourceBlock_.getRelativeToSurfaceXY();Blockly.Connection.highlightedPath_=Blockly.createSvgElement("path",{"class":"blocklyHighlightedConnectionPath",d:e,transform:"translate("+(this.x_-o.x)+","+(this.y_-o.y)+")"+(this.sourceBlock_.RTL?" scale(-1 1)":"")},this.sourceBlock_.getSvgRoot())},Blockly.RenderedConnection.prototype.unhideAll=function(){this.setHidden(!1);var e=[];if(this.type!=Blockly.INPUT_VALUE&&this.type!=Blockly.NEXT_STATEMENT)return e;var o=this.targetBlock();if(o){var t;o.isCollapsed()?(t=[],o.outputConnection&&t.push(o.outputConnection),o.nextConnection&&t.push(o.nextConnection),o.previousConnection&&t.push(o.previousConnection)):t=o.getConnections_(!0);for(var n=0;n<t.length;n++)e.push.apply(e,t[n].unhideAll());e.length||(e[0]=o)}return e},Blockly.RenderedConnection.prototype.unhighlight=function(){goog.dom.removeNode(Blockly.Connection.highlightedPath_),delete Blockly.Connection.highlightedPath_},Blockly.RenderedConnection.prototype.setHidden=function(e){(this.hidden_=e)&&this.inDB_?this.db_.removeConnection_(this):e||this.inDB_||this.db_.addConnection(this)},Blockly.RenderedConnection.prototype.hideAll=function(){if(this.setHidden(!0),this.targetConnection)for(var e=this.targetBlock().getDescendants(),o=0;o<e.length;o++){for(var t=e[o],n=t.getConnections_(!0),r=0;r<n.length;r++)n[r].setHidden(!0);for(t=t.getIcons(),r=0;r<t.length;r++)t[r].setVisible(!1)}},Blockly.RenderedConnection.prototype.isConnectionAllowed=function(e,o){return this.distanceFrom(e)>o?!1:Blockly.RenderedConnection.superClass_.isConnectionAllowed.call(this,e)},Blockly.RenderedConnection.prototype.disconnectInternal_=function(e,o){Blockly.RenderedConnection.superClass_.disconnectInternal_.call(this,e,o),e.rendered&&e.render(),o.rendered&&(o.updateDisabled(),o.render())},Blockly.RenderedConnection.prototype.respawnShadow_=function(){var e=this.getSourceBlock(),o=this.getShadowDom();if(e.workspace&&o&&Blockly.Events.recordUndo){if(Blockly.RenderedConnection.superClass_.respawnShadow_.call(this),o=this.targetBlock(),!o)throw"Couldn't respawn the shadow block that should exist here.";o.initSvg(),o.render(!1),e.rendered&&e.render()}},Blockly.RenderedConnection.prototype.neighbours_=function(e){return this.dbOpposite_.getNeighbours(this,e)},Blockly.RenderedConnection.prototype.connect_=function(e){Blockly.RenderedConnection.superClass_.connect_.call(this,e);var o=this.getSourceBlock();e=e.getSourceBlock(),o.rendered&&o.updateDisabled(),e.rendered&&e.updateDisabled(),o.rendered&&e.rendered&&(this.type==Blockly.NEXT_STATEMENT||this.type==Blockly.PREVIOUS_STATEMENT?e.render():o.render())},Blockly.BlockSvg=function(e,o,t){this.svgGroup_=Blockly.createSvgElement("g",{},null),this.svgPathDark_=Blockly.createSvgElement("path",{"class":"blocklyPathDark",transform:"translate(1,1)"},this.svgGroup_),this.svgPath_=Blockly.createSvgElement("path",{"class":"blocklyPath"},this.svgGroup_),this.svgPathLight_=Blockly.createSvgElement("path",{"class":"blocklyPathLight"},this.svgGroup_),this.svgPath_.tooltip=this,this.rendered=!1,Blockly.Tooltip.bindMouseEvents(this.svgPath_),Blockly.BlockSvg.superClass_.constructor.call(this,e,o,t)},goog.inherits(Blockly.BlockSvg,Blockly.Block),Blockly.BlockSvg.prototype.height=0,Blockly.BlockSvg.prototype.width=0,Blockly.BlockSvg.prototype.dragStartXY_=null,Blockly.BlockSvg.INLINE=-1,Blockly.BlockSvg.prototype.initSvg=function(){goog.asserts.assert(this.workspace.rendered,"Workspace is headless.");for(var e,o=0;e=this.inputList[o];o++)e.init();for(e=this.getIcons(),o=0;o<e.length;o++)e[o].createIcon();if(this.updateColour(),this.updateMovable(),!this.workspace.options.readOnly&&!this.eventsInit_){Blockly.bindEventWithChecks_(this.getSvgRoot(),"mousedown",this,this.onMouseDown_);var t=this;Blockly.bindEvent_(this.getSvgRoot(),"touchstart",null,function(e){Blockly.longStart_(e,t)})}this.eventsInit_=!0,this.getSvgRoot().parentNode||this.workspace.getCanvas().appendChild(this.getSvgRoot())},Blockly.BlockSvg.prototype.select=function(){if(this.isShadow()&&this.getParent())this.getParent().select();else if(Blockly.selected!=this){var e=null;if(Blockly.selected){e=Blockly.selected.id,Blockly.Events.disable();try{Blockly.selected.unselect()}finally{Blockly.Events.enable()}}e=new Blockly.Events.Ui(null,"selected",e,this.id),e.workspaceId=this.workspace.id,Blockly.Events.fire(e),Blockly.selected=this,this.addSelect()}},Blockly.BlockSvg.prototype.unselect=function(){if(Blockly.selected==this){var e=new Blockly.Events.Ui(null,"selected",this.id,null);e.workspaceId=this.workspace.id,Blockly.Events.fire(e),Blockly.selected=null,this.removeSelect()}},Blockly.BlockSvg.prototype.mutator=null,Blockly.BlockSvg.prototype.comment=null,Blockly.BlockSvg.prototype.warning=null,Blockly.BlockSvg.prototype.getIcons=function(){var e=[];return this.mutator&&e.push(this.mutator),this.comment&&e.push(this.comment),this.warning&&e.push(this.warning),e},Blockly.BlockSvg.onMouseUpWrapper_=null,Blockly.BlockSvg.onMouseMoveWrapper_=null,Blockly.BlockSvg.terminateDrag=function(){Blockly.BlockSvg.disconnectUiStop_(),Blockly.BlockSvg.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.BlockSvg.onMouseUpWrapper_),Blockly.BlockSvg.onMouseUpWrapper_=null),Blockly.BlockSvg.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.BlockSvg.onMouseMoveWrapper_),Blockly.BlockSvg.onMouseMoveWrapper_=null);var e=Blockly.selected;if(Blockly.dragMode_==Blockly.DRAG_FREE&&e){var o=e.getRelativeToSurfaceXY(),o=goog.math.Coordinate.difference(o,e.dragStartXY_),t=new Blockly.Events.Move(e);t.oldCoordinate=e.dragStartXY_,t.recordNew(),Blockly.Events.fire(t),e.moveConnections_(o.x,o.y),delete e.draggedBubbles_,e.setDragging_(!1),e.render(),e.workspace.setResizesEnabled(!0);var n=Blockly.Events.getGroup();setTimeout(function(){Blockly.Events.setGroup(n),e.snapToGrid(),Blockly.Events.setGroup(!1)},Blockly.BUMP_DELAY/2),setTimeout(function(){Blockly.Events.setGroup(n),e.bumpNeighbours_(),Blockly.Events.setGroup(!1)},Blockly.BUMP_DELAY)}Blockly.dragMode_=Blockly.DRAG_NONE,Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN)},Blockly.BlockSvg.prototype.setParent=function(e){if(e!=this.parentBlock_){var o=this.getSvgRoot();if(this.parentBlock_&&o){var t=this.getRelativeToSurfaceXY();this.workspace.getCanvas().appendChild(o),o.setAttribute("transform","translate("+t.x+","+t.y+")")}Blockly.Field.startCache(),Blockly.BlockSvg.superClass_.setParent.call(this,e),Blockly.Field.stopCache(),e&&(t=this.getRelativeToSurfaceXY(),e.getSvgRoot().appendChild(o),e=this.getRelativeToSurfaceXY(),this.moveConnections_(e.x-t.x,e.y-t.y))}},Blockly.BlockSvg.prototype.getRelativeToSurfaceXY=function(){var e=0,o=0,t=this.getSvgRoot();if(t)do var n=Blockly.getRelativeXY_(t),e=e+n.x,o=o+n.y,t=t.parentNode;while(t&&t!=this.workspace.getCanvas());return new goog.math.Coordinate(e,o)},Blockly.BlockSvg.prototype.moveBy=function(e,o){goog.asserts.assert(!this.parentBlock_,"Block has parent.");var t=new Blockly.Events.Move(this),n=this.getRelativeToSurfaceXY();this.getSvgRoot().setAttribute("transform","translate("+(n.x+e)+","+(n.y+o)+")"),this.moveConnections_(e,o),t.recordNew(),this.workspace.resizeContents(),Blockly.Events.fire(t)},Blockly.BlockSvg.prototype.snapToGrid=function(){if(this.workspace&&Blockly.dragMode_==Blockly.DRAG_NONE&&!this.getParent()&&!this.isInFlyout&&this.workspace.options.gridOptions&&this.workspace.options.gridOptions.snap){var e=this.workspace.options.gridOptions.spacing,o=e/2,t=this.getRelativeToSurfaceXY(),n=Math.round((t.x-o)/e)*e+o-t.x,e=Math.round((t.y-o)/e)*e+o-t.y,n=Math.round(n),e=Math.round(e);0==n&&0==e||this.moveBy(n,e)}},Blockly.BlockSvg.prototype.getHeightWidth=function(){var e=this.height,o=this.width,t=this.getNextBlock();return t?(t=t.getHeightWidth(),e+=t.height-4,o=Math.max(o,t.width)):this.nextConnection||this.outputConnection||(e+=2),{height:e,width:o}},Blockly.BlockSvg.prototype.getBoundingRectangle=function(){var e,o=this.getRelativeToSurfaceXY(this),t=this.outputConnection?Blockly.BlockSvg.TAB_WIDTH:0,n=this.getHeightWidth();return this.RTL?(e=new goog.math.Coordinate(o.x-(n.width-t),o.y),o=new goog.math.Coordinate(o.x+t,o.y+n.height)):(e=new goog.math.Coordinate(o.x-t,o.y),o=new goog.math.Coordinate(o.x+n.width-t,o.y+n.height)),{topLeft:e,bottomRight:o}},Blockly.BlockSvg.prototype.setCollapsed=function(e){if(this.collapsed_!=e){for(var o,t=[],n=0;o=this.inputList[n];n++)t.push.apply(t,o.setVisible(!e));if(e){for(o=this.getIcons(),n=0;n<o.length;n++)o[n].setVisible(!1);n=this.toString(Blockly.COLLAPSE_CHARS),this.appendDummyInput("_TEMP_COLLAPSED_INPUT").appendField(n).init()}else this.removeInput("_TEMP_COLLAPSED_INPUT"),this.setWarningText(null);if(Blockly.BlockSvg.superClass_.setCollapsed.call(this,e),t.length||(t[0]=this),this.rendered)for(n=0;e=t[n];n++)e.render()}},Blockly.BlockSvg.prototype.tab=function(e,o){for(var t,n=[],r=0;t=this.inputList[r];r++){for(var i,s=0;i=t.fieldRow[s];s++)i instanceof Blockly.FieldTextInput&&n.push(i);t.connection&&(t=t.connection.targetBlock())&&n.push(t)}r=n.indexOf(e),-1==r&&(r=o?-1:n.length),(n=n[o?r+1:r-1])?n instanceof Blockly.Field?n.showEditor_():n.tab(null,o):(n=this.getParent())&&n.tab(this,o)},Blockly.BlockSvg.prototype.onMouseDown_=function(e){if(!this.workspace.options.readOnly)if(this.isInFlyout)"touchstart"==e.type&&Blockly.isRightButton(e)&&(Blockly.Flyout.blockRightClick_(e,this),e.stopPropagation(),e.preventDefault());else{if(this.isInMutator&&this.workspace.resize(),this.workspace.updateScreenCalculationsIfScrolled(),this.workspace.markFocused(),Blockly.terminateDrag_(),this.select(),Blockly.hideChaff(),Blockly.isRightButton(e))this.showContextMenu_(e),Blockly.Touch.clearTouchIdentifier();else{if(!this.isMovable())return;Blockly.Events.getGroup()||Blockly.Events.setGroup(!0),Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED),this.dragStartXY_=this.getRelativeToSurfaceXY(),this.workspace.startDrag(e,this.dragStartXY_),Blockly.dragMode_=Blockly.DRAG_STICKY,Blockly.BlockSvg.onMouseUpWrapper_=Blockly.bindEventWithChecks_(document,"mouseup",this,this.onMouseUp_),Blockly.BlockSvg.onMouseMoveWrapper_=Blockly.bindEventWithChecks_(document,"mousemove",this,this.onMouseMove_),this.draggedBubbles_=[];for(var o,t=this.getDescendants(),n=0;o=t[n];n++){o=o.getIcons();for(var r=0;r<o.length;r++){var i=o[r].getIconLocation();i.bubble=o[r],this.draggedBubbles_.push(i)}}}e.stopPropagation(),e.preventDefault()}},Blockly.BlockSvg.prototype.onMouseUp_=function(e){Blockly.Touch.clearTouchIdentifier(),Blockly.dragMode_==Blockly.DRAG_FREE||Blockly.WidgetDiv.isVisible()||Blockly.Events.fire(new Blockly.Events.Ui(this,"click",void 0,void 0)),Blockly.terminateDrag_(),Blockly.selected&&Blockly.highlightedConnection_?(Blockly.localConnection_.connect(Blockly.highlightedConnection_),this.rendered&&(Blockly.localConnection_.isSuperior()?Blockly.highlightedConnection_:Blockly.localConnection_).getSourceBlock().connectionUiEffect(),this.workspace.trashcan&&this.workspace.trashcan.close()):!this.getParent()&&Blockly.selected.isDeletable()&&this.workspace.isDeleteArea(e)&&((e=this.workspace.trashcan)&&goog.Timer.callOnce(e.close,100,e),Blockly.selected.dispose(!1,!0)),Blockly.highlightedConnection_&&(Blockly.highlightedConnection_.unhighlight(),Blockly.highlightedConnection_=null),Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN),Blockly.WidgetDiv.isVisible()||Blockly.Events.setGroup(!1)},Blockly.BlockSvg.prototype.showHelp_=function(){var e=goog.isFunction(this.helpUrl)?this.helpUrl():this.helpUrl;e&&window.open(e)},Blockly.BlockSvg.prototype.showContextMenu_=function(e){if(!this.workspace.options.readOnly&&this.contextMenu){var o=this,t=[];if(this.isDeletable()&&this.isMovable()&&!o.isInFlyout){var n={text:Blockly.Msg.DUPLICATE_BLOCK,enabled:!0,callback:function(){Blockly.duplicate_(o)}};if(this.getDescendants().length>this.workspace.remainingCapacity()&&(n.enabled=!1),t.push(n),this.isEditable()&&!this.collapsed_&&this.workspace.options.comments&&(n={enabled:!goog.userAgent.IE},this.comment?(n.text=Blockly.Msg.REMOVE_COMMENT,n.callback=function(){o.setCommentText(null)}):(n.text=Blockly.Msg.ADD_COMMENT,n.callback=function(){o.setCommentText("")}),t.push(n)),!this.collapsed_)for(n=1;n<this.inputList.length;n++)if(this.inputList[n-1].type!=Blockly.NEXT_STATEMENT&&this.inputList[n].type!=Blockly.NEXT_STATEMENT){var n={enabled:!0},r=this.getInputsInline();n.text=r?Blockly.Msg.EXTERNAL_INPUTS:Blockly.Msg.INLINE_INPUTS,n.callback=function(){o.setInputsInline(!r)},t.push(n);break}this.workspace.options.collapse&&(this.collapsed_?(n={enabled:!0},n.text=Blockly.Msg.EXPAND_BLOCK,n.callback=function(){o.setCollapsed(!1)}):(n={enabled:!0},n.text=Blockly.Msg.COLLAPSE_BLOCK,n.callback=function(){o.setCollapsed(!0)}),t.push(n)),this.workspace.options.disable&&(n={text:this.disabled?Blockly.Msg.ENABLE_BLOCK:Blockly.Msg.DISABLE_BLOCK,enabled:!this.getInheritedDisabled(),callback:function(){o.setDisabled(!o.disabled)}},t.push(n));var n=this.getDescendants().length,i=this.getNextBlock();i&&(n-=i.getDescendants().length),n={text:1==n?Blockly.Msg.DELETE_BLOCK:Blockly.Msg.DELETE_X_BLOCKS.replace("%1",String(n)),enabled:!0,callback:function(){Blockly.Events.setGroup(!0),o.dispose(!0,!0),Blockly.Events.setGroup(!1)}},t.push(n)}n={enabled:!(goog.isFunction(this.helpUrl)?!this.helpUrl():!this.helpUrl)},n.text=Blockly.Msg.HELP,n.callback=function(){o.showHelp_()},t.push(n),this.customContextMenu&&!o.isInFlyout&&this.customContextMenu(t),Blockly.ContextMenu.show(e,t,this.RTL),Blockly.ContextMenu.currentBlock=this}},Blockly.BlockSvg.prototype.moveConnections_=function(e,o){if(this.rendered){for(var t=this.getConnections_(!1),n=0;n<t.length;n++)t[n].moveBy(e,o);for(t=this.getIcons(),n=0;n<t.length;n++)t[n].computeIconLocation();for(n=0;n<this.childBlocks_.length;n++)this.childBlocks_[n].moveConnections_(e,o)}},Blockly.BlockSvg.prototype.setDragging_=function(e){if(e){var o=this.getSvgRoot();o.translate_="",o.skew_="",Blockly.draggingConnections_=Blockly.draggingConnections_.concat(this.getConnections_(!0)),Blockly.addClass_(this.svgGroup_,"blocklyDragging")}else Blockly.draggingConnections_=[],Blockly.removeClass_(this.svgGroup_,"blocklyDragging");for(o=0;o<this.childBlocks_.length;o++)this.childBlocks_[o].setDragging_(e)},Blockly.BlockSvg.prototype.onMouseMove_=function(e){if("mousemove"==e.type&&1>=e.clientX&&0==e.clientY&&0==e.button)e.stopPropagation();else{var o=this.getRelativeToSurfaceXY(),t=this.workspace.moveDrag(e);if(Blockly.dragMode_==Blockly.DRAG_STICKY&&goog.math.Coordinate.distance(o,t)*this.workspace.scale>Blockly.DRAG_RADIUS){if(Blockly.dragMode_=Blockly.DRAG_FREE,Blockly.longStop_(),this.workspace.setResizesEnabled(!1),this.parentBlock_){this.unplug();var n=this.getSvgRoot();n.translate_="translate("+t.x+","+t.y+")",this.disconnectUiEffect()}this.setDragging_(!0)}if(Blockly.dragMode_==Blockly.DRAG_FREE){for(o=goog.math.Coordinate.difference(o,this.dragStartXY_),n=this.getSvgRoot(),n.translate_="translate("+t.x+","+t.y+")",n.setAttribute("transform",n.translate_+n.skew_),t=0;t<this.draggedBubbles_.length;t++)n=this.draggedBubbles_[t],n.bubble.setIconLocation(goog.math.Coordinate.sum(n,o));n=this.getConnections_(!1),(t=this.lastConnectionInStack_())&&t!=this.nextConnection&&n.push(t);for(var r=null,i=null,s=Blockly.SNAP_RADIUS,t=0;t<n.length;t++){var l=n[t],g=l.closest(s,o);g.connection&&(r=g.connection,i=l,s=g.radius)}Blockly.highlightedConnection_&&Blockly.highlightedConnection_!=r&&(Blockly.highlightedConnection_.unhighlight(),Blockly.highlightedConnection_=null,Blockly.localConnection_=null),r&&r!=Blockly.highlightedConnection_&&(r.highlight(),Blockly.highlightedConnection_=r,Blockly.localConnection_=i),this.isDeletable()&&this.workspace.isDeleteArea(e)}e.stopPropagation(),e.preventDefault()}},Blockly.BlockSvg.prototype.updateMovable=function(){this.isMovable()?Blockly.addClass_(this.svgGroup_,"blocklyDraggable"):Blockly.removeClass_(this.svgGroup_,"blocklyDraggable")},Blockly.BlockSvg.prototype.setMovable=function(e){Blockly.BlockSvg.superClass_.setMovable.call(this,e),this.updateMovable()},Blockly.BlockSvg.prototype.setEditable=function(e){Blockly.BlockSvg.superClass_.setEditable.call(this,e),e=this.getIcons();for(var o=0;o<e.length;o++)e[o].updateEditable()},Blockly.BlockSvg.prototype.setShadow=function(e){Blockly.BlockSvg.superClass_.setShadow.call(this,e),this.updateColour()},Blockly.BlockSvg.prototype.getSvgRoot=function(){return this.svgGroup_},Blockly.BlockSvg.prototype.dispose=function(e,o){if(this.workspace){Blockly.Tooltip.hide(),Blockly.Field.startCache();var t=this.workspace;Blockly.selected==this&&(this.unselect(),Blockly.terminateDrag_()),Blockly.ContextMenu.currentBlock==this&&Blockly.ContextMenu.hide(),o&&this.rendered&&(this.unplug(e),this.disposeUiEffect()),this.rendered=!1,Blockly.Events.disable();try{for(var n=this.getIcons(),r=0;r<n.length;r++)n[r].dispose()}finally{Blockly.Events.enable()}Blockly.BlockSvg.superClass_.dispose.call(this,e),goog.dom.removeNode(this.svgGroup_),t.resizeContents(),this.svgPathDark_=this.svgPathLight_=this.svgPath_=this.svgGroup_=null,Blockly.Field.stopCache()}},Blockly.BlockSvg.prototype.disposeUiEffect=function(){this.workspace.playAudio("delete");var e=Blockly.getSvgXY_(this.svgGroup_,this.workspace),o=this.svgGroup_.cloneNode(!0);o.translateX_=e.x,o.translateY_=e.y,o.setAttribute("transform","translate("+o.translateX_+","+o.translateY_+")"),this.workspace.getParentSvg().appendChild(o),o.bBox_=o.getBBox(),Blockly.BlockSvg.disposeUiStep_(o,this.RTL,new Date,this.workspace.scale)},Blockly.BlockSvg.disposeUiStep_=function(e,o,t,n){var r=(new Date-t)/150;r>1?goog.dom.removeNode(e):(e.setAttribute("transform","translate("+(e.translateX_+(o?-1:1)*e.bBox_.width*n/2*r)+","+(e.translateY_+e.bBox_.height*n*r)+") scale("+(1-r)*n+")"),setTimeout(function(){Blockly.BlockSvg.disposeUiStep_(e,o,t,n)},10))},Blockly.BlockSvg.prototype.connectionUiEffect=function(){if(this.workspace.playAudio("click"),!(1>this.workspace.scale)){var e=Blockly.getSvgXY_(this.svgGroup_,this.workspace);this.outputConnection?(e.x+=(this.RTL?3:-3)*this.workspace.scale,e.y+=13*this.workspace.scale):this.previousConnection&&(e.x+=(this.RTL?-23:23)*this.workspace.scale,e.y+=3*this.workspace.scale),e=Blockly.createSvgElement("circle",{cx:e.x,cy:e.y,r:0,fill:"none",stroke:"#888","stroke-width":10},this.workspace.getParentSvg()),Blockly.BlockSvg.connectionUiStep_(e,new Date,this.workspace.scale)}},Blockly.BlockSvg.connectionUiStep_=function(e,o,t){var n=(new Date-o)/150;n>1?goog.dom.removeNode(e):(e.setAttribute("r",25*n*t),e.style.opacity=1-n,Blockly.BlockSvg.disconnectUiStop_.pid_=setTimeout(function(){Blockly.BlockSvg.connectionUiStep_(e,o,t)},10))},Blockly.BlockSvg.prototype.disconnectUiEffect=function(){if(this.workspace.playAudio("disconnect"),!(1>this.workspace.scale)){var e=this.getHeightWidth().height,e=Math.atan(10/e)/Math.PI*180;this.RTL||(e*=-1),Blockly.BlockSvg.disconnectUiStep_(this.svgGroup_,e,new Date)}},Blockly.BlockSvg.disconnectUiStep_=function(e,o,t){var n=(new Date-t)/200;n>1?e.skew_="":(e.skew_="skewX("+Math.round(Math.sin(n*Math.PI*3)*(1-n)*o)+")",Blockly.BlockSvg.disconnectUiStop_.group=e,Blockly.BlockSvg.disconnectUiStop_.pid=setTimeout(function(){Blockly.BlockSvg.disconnectUiStep_(e,o,t)},10)),e.setAttribute("transform",e.translate_+e.skew_)},Blockly.BlockSvg.disconnectUiStop_=function(){if(Blockly.BlockSvg.disconnectUiStop_.group){clearTimeout(Blockly.BlockSvg.disconnectUiStop_.pid);var e=Blockly.BlockSvg.disconnectUiStop_.group;e.skew_="",e.setAttribute("transform",e.translate_),Blockly.BlockSvg.disconnectUiStop_.group=null}},Blockly.BlockSvg.disconnectUiStop_.pid=0,Blockly.BlockSvg.disconnectUiStop_.group=null,Blockly.BlockSvg.prototype.updateColour=function(){if(!this.disabled){var e=this.getColour(),o=goog.color.hexToRgb(e);if(this.isShadow())o=goog.color.lighten(o,.6),e=goog.color.rgbArrayToHex(o),this.svgPathLight_.style.display="none",this.svgPathDark_.setAttribute("fill",e);else{this.svgPathLight_.style.display="";var t=goog.color.rgbArrayToHex(goog.color.lighten(o,.3)),o=goog.color.rgbArrayToHex(goog.color.darken(o,.2));this.svgPathLight_.setAttribute("stroke",t),this.svgPathDark_.setAttribute("fill",o)}for(this.svgPath_.setAttribute("fill",e),e=this.getIcons(),t=0;t<e.length;t++)e[t].updateColour();for(e=0;t=this.inputList[e];e++)for(var n,o=0;n=t.fieldRow[o];o++)n.setText(null)}},Blockly.BlockSvg.prototype.updateDisabled=function(){var e=Blockly.hasClass_(this.svgGroup_,"blocklyDisabled");this.disabled||this.getInheritedDisabled()?e||(Blockly.addClass_(this.svgGroup_,"blocklyDisabled"),this.svgPath_.setAttribute("fill","url(#"+this.workspace.options.disabledPatternId+")")):e&&(Blockly.removeClass_(this.svgGroup_,"blocklyDisabled"),this.updateColour());for(var o,e=this.getChildren(),t=0;o=e[t];t++)o.updateDisabled()},Blockly.BlockSvg.prototype.getCommentText=function(){return this.comment?this.comment.getText().replace(/\s+$/,"").replace(/ +\n/g,"\n"):""},Blockly.BlockSvg.prototype.setCommentText=function(e){var o=!1;goog.isString(e)?(this.comment||(this.comment=new Blockly.Comment(this),o=!0),this.comment.setText(e)):this.comment&&(this.comment.dispose(),o=!0),o&&this.rendered&&(this.render(),this.bumpNeighbours_())},Blockly.BlockSvg.prototype.setWarningText=function(e,o){this.setWarningText.pid_||(this.setWarningText.pid_=Object.create(null));var t=o||"";if(t)this.setWarningText.pid_[t]&&(clearTimeout(this.setWarningText.pid_[t]),delete this.setWarningText.pid_[t]);else for(var n in this.setWarningText.pid_)clearTimeout(this.setWarningText.pid_[n]),delete this.setWarningText.pid_[n];if(Blockly.dragMode_==Blockly.DRAG_FREE){var r=this;this.setWarningText.pid_[t]=setTimeout(function(){r.workspace&&(delete r.setWarningText.pid_[t],r.setWarningText(e,t))},100)}else{this.isInFlyout&&(e=null),n=this.getSurroundParent();for(var i=null;n;)n.isCollapsed()&&(i=n),n=n.getSurroundParent();i&&i.setWarningText(e,"collapsed "+this.id+" "+t),n=!1,goog.isString(e)?(this.warning||(this.warning=new Blockly.Warning(this),n=!0),this.warning.setText(e,t)):this.warning&&!t?(this.warning.dispose(),n=!0):this.warning&&(n=this.warning.getText(),this.warning.setText("",t),(i=this.warning.getText())||this.warning.dispose(),n=n==i),n&&this.rendered&&(this.render(),this.bumpNeighbours_())}},Blockly.BlockSvg.prototype.setMutator=function(e){this.mutator&&this.mutator!==e&&this.mutator.dispose(),e&&(e.block_=this,this.mutator=e,e.createIcon())},Blockly.BlockSvg.prototype.setDisabled=function(e){this.disabled!=e&&(Blockly.BlockSvg.superClass_.setDisabled.call(this,e),this.rendered&&this.updateDisabled())},Blockly.BlockSvg.prototype.setHighlighted=function(e){e?(this.svgPath_.setAttribute("filter","url(#"+this.workspace.options.embossFilterId+")"),this.svgPathLight_.style.display="none"):(this.svgPath_.removeAttribute("filter"),this.svgPathLight_.style.display="block")},Blockly.BlockSvg.prototype.addSelect=function(){Blockly.addClass_(this.svgGroup_,"blocklySelected");var e=this;do{var o=e.getSvgRoot();o.parentNode.appendChild(o),e=e.getParent()}while(e)},Blockly.BlockSvg.prototype.removeSelect=function(){Blockly.removeClass_(this.svgGroup_,"blocklySelected")},Blockly.BlockSvg.prototype.setColour=function(e){Blockly.BlockSvg.superClass_.setColour.call(this,e),this.rendered&&this.updateColour()},Blockly.BlockSvg.prototype.setPreviousStatement=function(e,o){Blockly.BlockSvg.superClass_.setPreviousStatement.call(this,e,o),this.rendered&&(this.render(),this.bumpNeighbours_())},Blockly.BlockSvg.prototype.setNextStatement=function(e,o){Blockly.BlockSvg.superClass_.setNextStatement.call(this,e,o),this.rendered&&(this.render(),this.bumpNeighbours_())},Blockly.BlockSvg.prototype.setOutput=function(e,o){Blockly.BlockSvg.superClass_.setOutput.call(this,e,o),this.rendered&&(this.render(),this.bumpNeighbours_())},Blockly.BlockSvg.prototype.setInputsInline=function(e){Blockly.BlockSvg.superClass_.setInputsInline.call(this,e),this.rendered&&(this.render(),this.bumpNeighbours_())},Blockly.BlockSvg.prototype.removeInput=function(e,o){Blockly.BlockSvg.superClass_.removeInput.call(this,e,o),this.rendered&&(this.render(),this.bumpNeighbours_())},Blockly.BlockSvg.prototype.moveNumberedInputBefore=function(e,o){
+Blockly.BlockSvg.superClass_.moveNumberedInputBefore.call(this,e,o),this.rendered&&(this.render(),this.bumpNeighbours_())},Blockly.BlockSvg.prototype.appendInput_=function(e,o){var t=Blockly.BlockSvg.superClass_.appendInput_.call(this,e,o);return this.rendered&&(this.render(),this.bumpNeighbours_()),t},Blockly.BlockSvg.prototype.getConnections_=function(e){var o=[];if((e||this.rendered)&&(this.outputConnection&&o.push(this.outputConnection),this.previousConnection&&o.push(this.previousConnection),this.nextConnection&&o.push(this.nextConnection),e||!this.collapsed_)){e=0;for(var t;t=this.inputList[e];e++)t.connection&&o.push(t.connection)}return o},Blockly.BlockSvg.prototype.makeConnection_=function(e){return new Blockly.RenderedConnection(this,e)},Blockly.BlockSvg.render={},Blockly.BlockSvg.SEP_SPACE_X=10,Blockly.BlockSvg.SEP_SPACE_Y=10,Blockly.BlockSvg.INLINE_PADDING_Y=5,Blockly.BlockSvg.MIN_BLOCK_Y=25,Blockly.BlockSvg.TAB_HEIGHT=20,Blockly.BlockSvg.TAB_WIDTH=8,Blockly.BlockSvg.NOTCH_WIDTH=30,Blockly.BlockSvg.CORNER_RADIUS=8,Blockly.BlockSvg.START_HAT=!1,Blockly.BlockSvg.START_HAT_HEIGHT=15,Blockly.BlockSvg.START_HAT_PATH="c 30,-"+Blockly.BlockSvg.START_HAT_HEIGHT+" 70,-"+Blockly.BlockSvg.START_HAT_HEIGHT+" 100,0",Blockly.BlockSvg.START_HAT_HIGHLIGHT_LTR="c 17.8,-9.2 45.3,-14.9 75,-8.7 M 100.5,0.5",Blockly.BlockSvg.START_HAT_HIGHLIGHT_RTL="m 25,-8.7 c 29.7,-6.2 57.2,-0.5 75,8.7",Blockly.BlockSvg.DISTANCE_45_INSIDE=(1-Math.SQRT1_2)*(Blockly.BlockSvg.CORNER_RADIUS-.5)+.5,Blockly.BlockSvg.DISTANCE_45_OUTSIDE=(1-Math.SQRT1_2)*(Blockly.BlockSvg.CORNER_RADIUS+.5)-.5,Blockly.BlockSvg.NOTCH_PATH_LEFT="l 6,4 3,0 6,-4",Blockly.BlockSvg.NOTCH_PATH_LEFT_HIGHLIGHT="l 6,4 3,0 6,-4",Blockly.BlockSvg.NOTCH_PATH_RIGHT="l -6,4 -3,0 -6,-4",Blockly.BlockSvg.JAGGED_TEETH="l 8,0 0,4 8,4 -16,8 8,4",Blockly.BlockSvg.JAGGED_TEETH_HEIGHT=20,Blockly.BlockSvg.JAGGED_TEETH_WIDTH=15,Blockly.BlockSvg.TAB_PATH_DOWN="v 5 c 0,10 -"+Blockly.BlockSvg.TAB_WIDTH+",-8 -"+Blockly.BlockSvg.TAB_WIDTH+",7.5 s "+Blockly.BlockSvg.TAB_WIDTH+",-2.5 "+Blockly.BlockSvg.TAB_WIDTH+",7.5",Blockly.BlockSvg.TAB_PATH_DOWN_HIGHLIGHT_RTL="v 6.5 m -"+.97*Blockly.BlockSvg.TAB_WIDTH+",3 q -"+.05*Blockly.BlockSvg.TAB_WIDTH+",10 "+.3*Blockly.BlockSvg.TAB_WIDTH+",9.5 m "+.67*Blockly.BlockSvg.TAB_WIDTH+",-1.9 v 1.4",Blockly.BlockSvg.TOP_LEFT_CORNER_START="m 0,"+Blockly.BlockSvg.CORNER_RADIUS,Blockly.BlockSvg.TOP_LEFT_CORNER_START_HIGHLIGHT_RTL="m "+Blockly.BlockSvg.DISTANCE_45_INSIDE+","+Blockly.BlockSvg.DISTANCE_45_INSIDE,Blockly.BlockSvg.TOP_LEFT_CORNER_START_HIGHLIGHT_LTR="m 0.5,"+(Blockly.BlockSvg.CORNER_RADIUS-.5),Blockly.BlockSvg.TOP_LEFT_CORNER="A "+Blockly.BlockSvg.CORNER_RADIUS+","+Blockly.BlockSvg.CORNER_RADIUS+" 0 0,1 "+Blockly.BlockSvg.CORNER_RADIUS+",0",Blockly.BlockSvg.TOP_LEFT_CORNER_HIGHLIGHT="A "+(Blockly.BlockSvg.CORNER_RADIUS-.5)+","+(Blockly.BlockSvg.CORNER_RADIUS-.5)+" 0 0,1 "+Blockly.BlockSvg.CORNER_RADIUS+",0.5",Blockly.BlockSvg.INNER_TOP_LEFT_CORNER=Blockly.BlockSvg.NOTCH_PATH_RIGHT+" h -"+(Blockly.BlockSvg.NOTCH_WIDTH-15-Blockly.BlockSvg.CORNER_RADIUS)+" a "+Blockly.BlockSvg.CORNER_RADIUS+","+Blockly.BlockSvg.CORNER_RADIUS+" 0 0,0 -"+Blockly.BlockSvg.CORNER_RADIUS+","+Blockly.BlockSvg.CORNER_RADIUS,Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER="a "+Blockly.BlockSvg.CORNER_RADIUS+","+Blockly.BlockSvg.CORNER_RADIUS+" 0 0,0 "+Blockly.BlockSvg.CORNER_RADIUS+","+Blockly.BlockSvg.CORNER_RADIUS,Blockly.BlockSvg.INNER_TOP_LEFT_CORNER_HIGHLIGHT_RTL="a "+Blockly.BlockSvg.CORNER_RADIUS+","+Blockly.BlockSvg.CORNER_RADIUS+" 0 0,0 "+(-Blockly.BlockSvg.DISTANCE_45_OUTSIDE-.5)+","+(Blockly.BlockSvg.CORNER_RADIUS-Blockly.BlockSvg.DISTANCE_45_OUTSIDE),Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER_HIGHLIGHT_RTL="a "+(Blockly.BlockSvg.CORNER_RADIUS+.5)+","+(Blockly.BlockSvg.CORNER_RADIUS+.5)+" 0 0,0 "+(Blockly.BlockSvg.CORNER_RADIUS+.5)+","+(Blockly.BlockSvg.CORNER_RADIUS+.5),Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER_HIGHLIGHT_LTR="a "+(Blockly.BlockSvg.CORNER_RADIUS+.5)+","+(Blockly.BlockSvg.CORNER_RADIUS+.5)+" 0 0,0 "+(Blockly.BlockSvg.CORNER_RADIUS-Blockly.BlockSvg.DISTANCE_45_OUTSIDE)+","+(Blockly.BlockSvg.DISTANCE_45_OUTSIDE+.5),Blockly.BlockSvg.prototype.render=function(e){Blockly.Field.startCache(),this.rendered=!0;var o=Blockly.BlockSvg.SEP_SPACE_X;this.RTL&&(o=-o);for(var t=this.getIcons(),n=0;n<t.length;n++)o=t[n].renderIcon(o);o+=this.RTL?Blockly.BlockSvg.SEP_SPACE_X:-Blockly.BlockSvg.SEP_SPACE_X,t=this.renderCompute_(o),this.renderDraw_(o,t),this.renderMoveConnections_(),!1!==e&&((e=this.getParent())?e.render(!0):this.workspace.resizeContents()),Blockly.Field.stopCache()},Blockly.BlockSvg.prototype.renderFields_=function(e,o,t){t+=Blockly.BlockSvg.INLINE_PADDING_Y,this.RTL&&(o=-o);for(var n,r=0;n=e[r];r++){var i=n.getSvgRoot();i&&(this.RTL?(o-=n.renderSep+n.renderWidth,i.setAttribute("transform","translate("+o+","+t+")"),n.renderWidth&&(o-=Blockly.BlockSvg.SEP_SPACE_X)):(i.setAttribute("transform","translate("+(o+n.renderSep)+","+t+")"),n.renderWidth&&(o+=n.renderSep+n.renderWidth+Blockly.BlockSvg.SEP_SPACE_X)))}return this.RTL?-o:o},Blockly.BlockSvg.prototype.renderCompute_=function(e){var o=this.inputList,t=[];t.rightEdge=e+2*Blockly.BlockSvg.SEP_SPACE_X,(this.previousConnection||this.nextConnection)&&(t.rightEdge=Math.max(t.rightEdge,Blockly.BlockSvg.NOTCH_WIDTH+Blockly.BlockSvg.SEP_SPACE_X));for(var n,r=0,i=0,s=!1,l=!1,g=!1,a=void 0,c=this.getInputsInline()&&!this.isCollapsed(),u=0;n=o[u];u++)if(n.isVisible()){var h;if(c&&a&&a!=Blockly.NEXT_STATEMENT&&n.type!=Blockly.NEXT_STATEMENT?h=t[t.length-1]:(a=n.type,h=[],h.type=c&&n.type!=Blockly.NEXT_STATEMENT?Blockly.BlockSvg.INLINE:n.type,h.height=0,t.push(h)),h.push(n),n.renderHeight=Blockly.BlockSvg.MIN_BLOCK_Y,n.renderWidth=c&&n.type==Blockly.INPUT_VALUE?Blockly.BlockSvg.TAB_WIDTH+1.25*Blockly.BlockSvg.SEP_SPACE_X:0,n.connection&&n.connection.isConnected()){var d=n.connection.targetBlock().getHeightWidth();n.renderHeight=Math.max(n.renderHeight,d.height),n.renderWidth=Math.max(n.renderWidth,d.width)}c||u!=o.length-1?!c&&n.type==Blockly.INPUT_VALUE&&o[u+1]&&o[u+1].type==Blockly.NEXT_STATEMENT&&n.renderHeight--:n.renderHeight--,h.height=Math.max(h.height,n.renderHeight),n.fieldWidth=0,1==t.length&&(n.fieldWidth+=this.RTL?-e:e);for(var p,d=!1,y=0;p=n.fieldRow[y];y++){0!=y&&(n.fieldWidth+=Blockly.BlockSvg.SEP_SPACE_X);var f=p.getSize();p.renderWidth=f.width,p.renderSep=d&&p.EDITABLE?Blockly.BlockSvg.SEP_SPACE_X:0,n.fieldWidth+=p.renderWidth+p.renderSep,h.height=Math.max(h.height,f.height),d=p.EDITABLE}h.type!=Blockly.BlockSvg.INLINE&&(h.type==Blockly.NEXT_STATEMENT?(l=!0,i=Math.max(i,n.fieldWidth)):(h.type==Blockly.INPUT_VALUE?s=!0:h.type==Blockly.DUMMY_INPUT&&(g=!0),r=Math.max(r,n.fieldWidth)))}for(e=0;h=t[e];e++)if(h.thicker=!1,h.type==Blockly.BlockSvg.INLINE)for(o=0;n=h[o];o++)if(n.type==Blockly.INPUT_VALUE){h.height+=2*Blockly.BlockSvg.INLINE_PADDING_Y,h.thicker=!0;break}return t.statementEdge=2*Blockly.BlockSvg.SEP_SPACE_X+i,l&&(t.rightEdge=Math.max(t.rightEdge,t.statementEdge+Blockly.BlockSvg.NOTCH_WIDTH)),s?t.rightEdge=Math.max(t.rightEdge,r+2*Blockly.BlockSvg.SEP_SPACE_X+Blockly.BlockSvg.TAB_WIDTH):g&&(t.rightEdge=Math.max(t.rightEdge,r+2*Blockly.BlockSvg.SEP_SPACE_X)),t.hasValue=s,t.hasStatement=l,t.hasDummy=g,t},Blockly.BlockSvg.prototype.renderDraw_=function(e,o){if(this.startHat_=!1,this.height=0,this.outputConnection)this.squareBottomLeftCorner_=this.squareTopLeftCorner_=!0;else{if(this.squareBottomLeftCorner_=this.squareTopLeftCorner_=!1,this.previousConnection){var t=this.previousConnection.targetBlock();t&&t.getNextBlock()==this&&(this.squareTopLeftCorner_=!0)}else Blockly.BlockSvg.START_HAT&&(this.startHat_=this.squareTopLeftCorner_=!0,this.height+=Blockly.BlockSvg.START_HAT_HEIGHT,o.rightEdge=Math.max(o.rightEdge,100));this.getNextBlock()&&(this.squareBottomLeftCorner_=!0)}var n=[],r=[],t=[],i=[];this.renderDrawTop_(n,t,o.rightEdge);var s=this.renderDrawRight_(n,t,r,i,o,e);this.renderDrawBottom_(n,t,s),this.renderDrawLeft_(n,t),n=n.join(" ")+"\n"+r.join(" "),this.svgPath_.setAttribute("d",n),this.svgPathDark_.setAttribute("d",n),n=t.join(" ")+"\n"+i.join(" "),this.svgPathLight_.setAttribute("d",n),this.RTL&&(this.svgPath_.setAttribute("transform","scale(-1 1)"),this.svgPathLight_.setAttribute("transform","scale(-1 1)"),this.svgPathDark_.setAttribute("transform","translate(1,1) scale(-1 1)"))},Blockly.BlockSvg.prototype.renderMoveConnections_=function(){var e=this.getRelativeToSurfaceXY();this.previousConnection&&this.previousConnection.moveToOffset(e),this.outputConnection&&this.outputConnection.moveToOffset(e);for(var o=0;o<this.inputList.length;o++){var t=this.inputList[o].connection;t&&(t.moveToOffset(e),t.isConnected()&&t.tighten_())}this.nextConnection&&(this.nextConnection.moveToOffset(e),this.nextConnection.isConnected()&&this.nextConnection.tighten_())},Blockly.BlockSvg.prototype.renderDrawTop_=function(e,o,t){this.squareTopLeftCorner_?(e.push("m 0,0"),o.push("m 0.5,0.5"),this.startHat_&&(e.push(Blockly.BlockSvg.START_HAT_PATH),o.push(this.RTL?Blockly.BlockSvg.START_HAT_HIGHLIGHT_RTL:Blockly.BlockSvg.START_HAT_HIGHLIGHT_LTR))):(e.push(Blockly.BlockSvg.TOP_LEFT_CORNER_START),o.push(this.RTL?Blockly.BlockSvg.TOP_LEFT_CORNER_START_HIGHLIGHT_RTL:Blockly.BlockSvg.TOP_LEFT_CORNER_START_HIGHLIGHT_LTR),e.push(Blockly.BlockSvg.TOP_LEFT_CORNER),o.push(Blockly.BlockSvg.TOP_LEFT_CORNER_HIGHLIGHT)),this.previousConnection&&(e.push("H",Blockly.BlockSvg.NOTCH_WIDTH-15),o.push("H",Blockly.BlockSvg.NOTCH_WIDTH-15),e.push(Blockly.BlockSvg.NOTCH_PATH_LEFT),o.push(Blockly.BlockSvg.NOTCH_PATH_LEFT_HIGHLIGHT),this.previousConnection.setOffsetInBlock(this.RTL?-Blockly.BlockSvg.NOTCH_WIDTH:Blockly.BlockSvg.NOTCH_WIDTH,0)),e.push("H",t),o.push("H",t-.5),this.width=t},Blockly.BlockSvg.prototype.renderDrawRight_=function(e,o,t,n,r,i){for(var s,l,g,a,c=0,u=0;a=r[u];u++){if(s=Blockly.BlockSvg.SEP_SPACE_X,0==u&&(s+=this.RTL?-i:i),o.push("M",r.rightEdge-.5+","+(c+.5)),this.isCollapsed()){var h=a[0];l=c,this.renderFields_(h.fieldRow,s,l),e.push(Blockly.BlockSvg.JAGGED_TEETH),o.push("h 8"),h=a.height-Blockly.BlockSvg.JAGGED_TEETH_HEIGHT,e.push("v",h),this.RTL&&(o.push("v 3.9 l 7.2,3.4 m -14.5,8.9 l 7.3,3.5"),o.push("v",h-.7)),this.width+=Blockly.BlockSvg.JAGGED_TEETH_WIDTH}else if(a.type==Blockly.BlockSvg.INLINE){for(var d=0;h=a[d];d++)l=c,a.thicker&&(l+=Blockly.BlockSvg.INLINE_PADDING_Y),s=this.renderFields_(h.fieldRow,s,l),h.type!=Blockly.DUMMY_INPUT&&(s+=h.renderWidth+Blockly.BlockSvg.SEP_SPACE_X),h.type==Blockly.INPUT_VALUE&&(t.push("M",s-Blockly.BlockSvg.SEP_SPACE_X+","+(c+Blockly.BlockSvg.INLINE_PADDING_Y)),t.push("h",Blockly.BlockSvg.TAB_WIDTH-2-h.renderWidth),t.push(Blockly.BlockSvg.TAB_PATH_DOWN),t.push("v",h.renderHeight+1-Blockly.BlockSvg.TAB_HEIGHT),t.push("h",h.renderWidth+2-Blockly.BlockSvg.TAB_WIDTH),t.push("z"),this.RTL?(n.push("M",s-Blockly.BlockSvg.SEP_SPACE_X-2.5+Blockly.BlockSvg.TAB_WIDTH-h.renderWidth+","+(c+Blockly.BlockSvg.INLINE_PADDING_Y+.5)),n.push(Blockly.BlockSvg.TAB_PATH_DOWN_HIGHLIGHT_RTL),n.push("v",h.renderHeight-Blockly.BlockSvg.TAB_HEIGHT+2.5),n.push("h",h.renderWidth-Blockly.BlockSvg.TAB_WIDTH+2)):(n.push("M",s-Blockly.BlockSvg.SEP_SPACE_X+.5+","+(c+Blockly.BlockSvg.INLINE_PADDING_Y+.5)),n.push("v",h.renderHeight+1),n.push("h",Blockly.BlockSvg.TAB_WIDTH-2-h.renderWidth),n.push("M",s-h.renderWidth-Blockly.BlockSvg.SEP_SPACE_X+.9+","+(c+Blockly.BlockSvg.INLINE_PADDING_Y+Blockly.BlockSvg.TAB_HEIGHT-.7)),n.push("l",.46*Blockly.BlockSvg.TAB_WIDTH+",-2.1")),l=this.RTL?-s-Blockly.BlockSvg.TAB_WIDTH+Blockly.BlockSvg.SEP_SPACE_X+h.renderWidth+1:s+Blockly.BlockSvg.TAB_WIDTH-Blockly.BlockSvg.SEP_SPACE_X-h.renderWidth-1,g=c+Blockly.BlockSvg.INLINE_PADDING_Y+1,h.connection.setOffsetInBlock(l,g));s=Math.max(s,r.rightEdge),this.width=Math.max(this.width,s),e.push("H",s),o.push("H",s-.5),e.push("v",a.height),this.RTL&&o.push("v",a.height-1)}else a.type==Blockly.INPUT_VALUE?(h=a[0],l=c,h.align!=Blockly.ALIGN_LEFT&&(d=r.rightEdge-h.fieldWidth-Blockly.BlockSvg.TAB_WIDTH-2*Blockly.BlockSvg.SEP_SPACE_X,h.align==Blockly.ALIGN_RIGHT?s+=d:h.align==Blockly.ALIGN_CENTRE&&(s+=d/2)),this.renderFields_(h.fieldRow,s,l),e.push(Blockly.BlockSvg.TAB_PATH_DOWN),d=a.height-Blockly.BlockSvg.TAB_HEIGHT,e.push("v",d),this.RTL?(o.push(Blockly.BlockSvg.TAB_PATH_DOWN_HIGHLIGHT_RTL),o.push("v",d+.5)):(o.push("M",r.rightEdge-5+","+(c+Blockly.BlockSvg.TAB_HEIGHT-.7)),o.push("l",.46*Blockly.BlockSvg.TAB_WIDTH+",-2.1")),l=this.RTL?-r.rightEdge-1:r.rightEdge+1,h.connection.setOffsetInBlock(l,c),h.connection.isConnected()&&(this.width=Math.max(this.width,r.rightEdge+h.connection.targetBlock().getHeightWidth().width-Blockly.BlockSvg.TAB_WIDTH+1))):a.type==Blockly.DUMMY_INPUT?(h=a[0],l=c,h.align!=Blockly.ALIGN_LEFT&&(d=r.rightEdge-h.fieldWidth-2*Blockly.BlockSvg.SEP_SPACE_X,r.hasValue&&(d-=Blockly.BlockSvg.TAB_WIDTH),h.align==Blockly.ALIGN_RIGHT?s+=d:h.align==Blockly.ALIGN_CENTRE&&(s+=d/2)),this.renderFields_(h.fieldRow,s,l),e.push("v",a.height),this.RTL&&o.push("v",a.height-1)):a.type==Blockly.NEXT_STATEMENT&&(h=a[0],0==u&&(e.push("v",Blockly.BlockSvg.SEP_SPACE_Y),this.RTL&&o.push("v",Blockly.BlockSvg.SEP_SPACE_Y-1),c+=Blockly.BlockSvg.SEP_SPACE_Y),l=c,h.align!=Blockly.ALIGN_LEFT&&(d=r.statementEdge-h.fieldWidth-2*Blockly.BlockSvg.SEP_SPACE_X,h.align==Blockly.ALIGN_RIGHT?s+=d:h.align==Blockly.ALIGN_CENTRE&&(s+=d/2)),this.renderFields_(h.fieldRow,s,l),s=r.statementEdge+Blockly.BlockSvg.NOTCH_WIDTH,e.push("H",s),e.push(Blockly.BlockSvg.INNER_TOP_LEFT_CORNER),e.push("v",a.height-2*Blockly.BlockSvg.CORNER_RADIUS),e.push(Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER),e.push("H",r.rightEdge),this.RTL?(o.push("M",s-Blockly.BlockSvg.NOTCH_WIDTH+Blockly.BlockSvg.DISTANCE_45_OUTSIDE+","+(c+Blockly.BlockSvg.DISTANCE_45_OUTSIDE)),o.push(Blockly.BlockSvg.INNER_TOP_LEFT_CORNER_HIGHLIGHT_RTL),o.push("v",a.height-2*Blockly.BlockSvg.CORNER_RADIUS),o.push(Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER_HIGHLIGHT_RTL)):(o.push("M",s-Blockly.BlockSvg.NOTCH_WIDTH+Blockly.BlockSvg.DISTANCE_45_OUTSIDE+","+(c+a.height-Blockly.BlockSvg.DISTANCE_45_OUTSIDE)),o.push(Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER_HIGHLIGHT_LTR)),o.push("H",r.rightEdge-.5),l=this.RTL?-s:s+1,h.connection.setOffsetInBlock(l,c+1),h.connection.isConnected()&&(this.width=Math.max(this.width,r.statementEdge+h.connection.targetBlock().getHeightWidth().width)),u==r.length-1||r[u+1].type==Blockly.NEXT_STATEMENT)&&(e.push("v",Blockly.BlockSvg.SEP_SPACE_Y),this.RTL&&o.push("v",Blockly.BlockSvg.SEP_SPACE_Y-1),c+=Blockly.BlockSvg.SEP_SPACE_Y);c+=a.height}return r.length||(c=Blockly.BlockSvg.MIN_BLOCK_Y,e.push("V",c),this.RTL&&o.push("V",c-1)),c},Blockly.BlockSvg.prototype.renderDrawBottom_=function(e,o,t){this.height+=t+1,this.nextConnection&&(e.push("H",Blockly.BlockSvg.NOTCH_WIDTH+(this.RTL?.5:-.5)+" "+Blockly.BlockSvg.NOTCH_PATH_RIGHT),this.nextConnection.setOffsetInBlock(this.RTL?-Blockly.BlockSvg.NOTCH_WIDTH:Blockly.BlockSvg.NOTCH_WIDTH,t+1),this.height+=4),this.squareBottomLeftCorner_?(e.push("H 0"),this.RTL||o.push("M","0.5,"+(t-.5))):(e.push("H",Blockly.BlockSvg.CORNER_RADIUS),e.push("a",Blockly.BlockSvg.CORNER_RADIUS+","+Blockly.BlockSvg.CORNER_RADIUS+" 0 0,1 -"+Blockly.BlockSvg.CORNER_RADIUS+",-"+Blockly.BlockSvg.CORNER_RADIUS),this.RTL||(o.push("M",Blockly.BlockSvg.DISTANCE_45_INSIDE+","+(t-Blockly.BlockSvg.DISTANCE_45_INSIDE)),o.push("A",Blockly.BlockSvg.CORNER_RADIUS-.5+","+(Blockly.BlockSvg.CORNER_RADIUS-.5)+" 0 0,1 0.5,"+(t-Blockly.BlockSvg.CORNER_RADIUS))))},Blockly.BlockSvg.prototype.renderDrawLeft_=function(e,o){this.outputConnection?(this.outputConnection.setOffsetInBlock(0,0),e.push("V",Blockly.BlockSvg.TAB_HEIGHT),e.push("c 0,-10 -"+Blockly.BlockSvg.TAB_WIDTH+",8 -"+Blockly.BlockSvg.TAB_WIDTH+",-7.5 s "+Blockly.BlockSvg.TAB_WIDTH+",2.5 "+Blockly.BlockSvg.TAB_WIDTH+",-7.5"),this.RTL?(o.push("M",-.25*Blockly.BlockSvg.TAB_WIDTH+",8.4"),o.push("l",-.45*Blockly.BlockSvg.TAB_WIDTH+",-2.1")):(o.push("V",Blockly.BlockSvg.TAB_HEIGHT-1.5),o.push("m",-.92*Blockly.BlockSvg.TAB_WIDTH+",-0.5 q "+-.19*Blockly.BlockSvg.TAB_WIDTH+",-5.5 0,-11"),o.push("m",.92*Blockly.BlockSvg.TAB_WIDTH+",1 V 0.5 H 1")),this.width+=Blockly.BlockSvg.TAB_WIDTH):this.RTL||(this.squareTopLeftCorner_?o.push("V",.5):o.push("V",Blockly.BlockSvg.CORNER_RADIUS)),e.push("z")},Blockly.Events={},Blockly.Events.group_="",Blockly.Events.recordUndo=!0,Blockly.Events.disabled_=0,Blockly.Events.CREATE="create",Blockly.Events.DELETE="delete",Blockly.Events.CHANGE="change",Blockly.Events.MOVE="move",Blockly.Events.UI="ui",Blockly.Events.FIRE_QUEUE_=[],Blockly.Events.fire=function(e){Blockly.Events.isEnabled()&&(Blockly.Events.FIRE_QUEUE_.length||setTimeout(Blockly.Events.fireNow_,0),Blockly.Events.FIRE_QUEUE_.push(e))},Blockly.Events.fireNow_=function(){for(var e,o=Blockly.Events.filter(Blockly.Events.FIRE_QUEUE_,!0),t=Blockly.Events.FIRE_QUEUE_.length=0;e=o[t];t++){var n=Blockly.Workspace.getById(e.workspaceId);n&&n.fireChangeListener(e)}},Blockly.Events.filter=function(e,o){var t=goog.array.clone(e);o||t.reverse();for(var n,r=0;n=t[r];r++)for(var i,s=r+1;i=t[s];s++)n.type==i.type&&n.blockId==i.blockId&&n.workspaceId==i.workspaceId&&(n.type==Blockly.Events.MOVE?(n.newParentId=i.newParentId,n.newInputName=i.newInputName,n.newCoordinate=i.newCoordinate,t.splice(s,1),s--):n.type==Blockly.Events.CHANGE&&n.element==i.element&&n.name==i.name?(n.newValue=i.newValue,t.splice(s,1),s--):n.type!=Blockly.Events.UI||"click"!=i.element||"commentOpen"!=n.element&&"mutatorOpen"!=n.element&&"warningOpen"!=n.element||(n.newValue=i.newValue,t.splice(s,1),s--));for(r=t.length-1;r>=0;r--)t[r].isNull()&&t.splice(r,1);for(o||t.reverse(),r=1;n=t[r];r++)n.type==Blockly.Events.CHANGE&&"mutation"==n.element&&t.unshift(t.splice(r,1)[0]);return t},Blockly.Events.clearPendingUndo=function(){for(var e,o=0;e=Blockly.Events.FIRE_QUEUE_[o];o++)e.recordUndo=!1},Blockly.Events.disable=function(){Blockly.Events.disabled_++},Blockly.Events.enable=function(){Blockly.Events.disabled_--},Blockly.Events.isEnabled=function(){return 0==Blockly.Events.disabled_},Blockly.Events.getGroup=function(){return Blockly.Events.group_},Blockly.Events.setGroup=function(e){Blockly.Events.group_="boolean"==typeof e?e?Blockly.genUid():"":e},Blockly.Events.getDescendantIds_=function(e){var o=[];e=e.getDescendants();for(var t,n=0;t=e[n];n++)o[n]=t.id;return o},Blockly.Events.fromJson=function(e,o){var t;switch(e.type){case Blockly.Events.CREATE:t=new Blockly.Events.Create(null);break;case Blockly.Events.DELETE:t=new Blockly.Events.Delete(null);break;case Blockly.Events.CHANGE:t=new Blockly.Events.Change(null);break;case Blockly.Events.MOVE:t=new Blockly.Events.Move(null);break;case Blockly.Events.UI:t=new Blockly.Events.Ui(null);break;default:throw"Unknown event type."}return t.fromJson(e),t.workspaceId=o.id,t},Blockly.Events.Abstract=function(e){e&&(this.blockId=e.id,this.workspaceId=e.workspace.id),this.group=Blockly.Events.group_,this.recordUndo=Blockly.Events.recordUndo},Blockly.Events.Abstract.prototype.toJson=function(){var e={type:this.type};return this.blockId&&(e.blockId=this.blockId),this.group&&(e.group=this.group),e},Blockly.Events.Abstract.prototype.fromJson=function(e){this.blockId=e.blockId,this.group=e.group},Blockly.Events.Abstract.prototype.isNull=function(){return!1},Blockly.Events.Abstract.prototype.run=function(e){},Blockly.Events.Create=function(e){e&&(Blockly.Events.Create.superClass_.constructor.call(this,e),this.xml=Blockly.Xml.blockToDomWithXY(e),this.ids=Blockly.Events.getDescendantIds_(e))},goog.inherits(Blockly.Events.Create,Blockly.Events.Abstract),Blockly.Events.Create.prototype.type=Blockly.Events.CREATE,Blockly.Events.Create.prototype.toJson=function(){var e=Blockly.Events.Create.superClass_.toJson.call(this);return e.xml=Blockly.Xml.domToText(this.xml),e.ids=this.ids,e},Blockly.Events.Create.prototype.fromJson=function(e){Blockly.Events.Create.superClass_.fromJson.call(this,e),this.xml=Blockly.Xml.textToDom("<xml>"+e.xml+"</xml>").firstChild,this.ids=e.ids},Blockly.Events.Create.prototype.run=function(e){var o=Blockly.Workspace.getById(this.workspaceId);if(e)e=goog.dom.createDom("xml"),e.appendChild(this.xml),Blockly.Xml.domToWorkspace(e,o);else{e=0;for(var t;t=this.ids[e];e++){var n=o.getBlockById(t);n?n.dispose(!1,!1):t==this.blockId&&console.warn("Can't uncreate non-existant block: "+t)}}},Blockly.Events.Delete=function(e){if(e){if(e.getParent())throw"Connected blocks cannot be deleted.";Blockly.Events.Delete.superClass_.constructor.call(this,e),this.oldXml=Blockly.Xml.blockToDomWithXY(e),this.ids=Blockly.Events.getDescendantIds_(e)}},goog.inherits(Blockly.Events.Delete,Blockly.Events.Abstract),Blockly.Events.Delete.prototype.type=Blockly.Events.DELETE,Blockly.Events.Delete.prototype.toJson=function(){var e=Blockly.Events.Delete.superClass_.toJson.call(this);return e.ids=this.ids,e},Blockly.Events.Delete.prototype.fromJson=function(e){Blockly.Events.Delete.superClass_.fromJson.call(this,e),this.ids=e.ids},Blockly.Events.Delete.prototype.run=function(e){var o=Blockly.Workspace.getById(this.workspaceId);if(e){e=0;for(var t;t=this.ids[e];e++){var n=o.getBlockById(t);n?n.dispose(!1,!1):t==this.blockId&&console.warn("Can't delete non-existant block: "+t)}}else e=goog.dom.createDom("xml"),e.appendChild(this.oldXml),Blockly.Xml.domToWorkspace(e,o)},Blockly.Events.Change=function(e,o,t,n,r){e&&(Blockly.Events.Change.superClass_.constructor.call(this,e),this.element=o,this.name=t,this.oldValue=n,this.newValue=r)},goog.inherits(Blockly.Events.Change,Blockly.Events.Abstract),Blockly.Events.Change.prototype.type=Blockly.Events.CHANGE,Blockly.Events.Change.prototype.toJson=function(){var e=Blockly.Events.Change.superClass_.toJson.call(this);return e.element=this.element,this.name&&(e.name=this.name),e.newValue=this.newValue,e},Blockly.Events.Change.prototype.fromJson=function(e){Blockly.Events.Change.superClass_.fromJson.call(this,e),this.element=e.element,this.name=e.name,this.newValue=e.newValue},Blockly.Events.Change.prototype.isNull=function(){return this.oldValue==this.newValue},Blockly.Events.Change.prototype.run=function(e){var o=Blockly.Workspace.getById(this.workspaceId).getBlockById(this.blockId);if(o)switch(o.mutator&&o.mutator.setVisible(!1),e=e?this.newValue:this.oldValue,this.element){case"field":(o=o.getField(this.name))?(o.callValidator(e),o.setValue(e)):console.warn("Can't set non-existant field: "+this.name);break;case"comment":o.setCommentText(e||null);break;case"collapsed":o.setCollapsed(e);break;case"disabled":o.setDisabled(e);break;case"inline":o.setInputsInline(e);break;case"mutation":var t="";if(o.mutationToDom&&(t=(t=o.mutationToDom())&&Blockly.Xml.domToText(t)),o.domToMutation){e=e||"<mutation></mutation>";var n=Blockly.Xml.textToDom("<xml>"+e+"</xml>");o.domToMutation(n.firstChild)}Blockly.Events.fire(new Blockly.Events.Change(o,"mutation",null,t,e));break;default:console.warn("Unknown change type: "+this.element)}else console.warn("Can't change non-existant block: "+this.blockId)},Blockly.Events.Move=function(e){e&&(Blockly.Events.Move.superClass_.constructor.call(this,e),e=this.currentLocation_(),this.oldParentId=e.parentId,this.oldInputName=e.inputName,this.oldCoordinate=e.coordinate)},goog.inherits(Blockly.Events.Move,Blockly.Events.Abstract),Blockly.Events.Move.prototype.type=Blockly.Events.MOVE,Blockly.Events.Move.prototype.toJson=function(){var e=Blockly.Events.Move.superClass_.toJson.call(this);return this.newParentId&&(e.newParentId=this.newParentId),this.newInputName&&(e.newInputName=this.newInputName),this.newCoordinate&&(e.newCoordinate=Math.round(this.newCoordinate.x)+","+Math.round(this.newCoordinate.y)),e},Blockly.Events.Move.prototype.fromJson=function(e){Blockly.Events.Move.superClass_.fromJson.call(this,e),this.newParentId=e.newParentId,this.newInputName=e.newInputName,e.newCoordinate&&(e=e.newCoordinate.split(","),this.newCoordinate=new goog.math.Coordinate(parseFloat(e[0]),parseFloat(e[1])))},Blockly.Events.Move.prototype.recordNew=function(){var e=this.currentLocation_();this.newParentId=e.parentId,this.newInputName=e.inputName,this.newCoordinate=e.coordinate},Blockly.Events.Move.prototype.currentLocation_=function(){var e=Blockly.Workspace.getById(this.workspaceId).getBlockById(this.blockId),o={},t=e.getParent();return t?(o.parentId=t.id,(e=t.getInputWithBlock(e))&&(o.inputName=e.name)):o.coordinate=e.getRelativeToSurfaceXY(),o},Blockly.Events.Move.prototype.isNull=function(){return this.oldParentId==this.newParentId&&this.oldInputName==this.newInputName&&goog.math.Coordinate.equals(this.oldCoordinate,this.newCoordinate)},Blockly.Events.Move.prototype.run=function(e){var o=Blockly.Workspace.getById(this.workspaceId),t=o.getBlockById(this.blockId);if(t){var n=e?this.newParentId:this.oldParentId,r=e?this.newInputName:this.oldInputName;e=e?this.newCoordinate:this.oldCoordinate;var i=null;if(n&&(i=o.getBlockById(n),!i))return void console.warn("Can't connect to non-existant block: "+n);if(t.getParent()&&t.unplug(),e)r=t.getRelativeToSurfaceXY(),t.moveBy(e.x-r.x,e.y-r.y);else{var s,t=t.outputConnection||t.previousConnection;r?(o=i.getInput(r))&&(s=o.connection):t.type==Blockly.PREVIOUS_STATEMENT&&(s=i.nextConnection),s?t.connect(s):console.warn("Can't connect to non-existant input: "+r)}}else console.warn("Can't move non-existant block: "+this.blockId)},Blockly.Events.Ui=function(e,o,t,n){Blockly.Events.Ui.superClass_.constructor.call(this,e),this.element=o,this.oldValue=t,this.newValue=n,this.recordUndo=!1},goog.inherits(Blockly.Events.Ui,Blockly.Events.Abstract),Blockly.Events.Ui.prototype.type=Blockly.Events.UI,Blockly.Events.Ui.prototype.toJson=function(){var e=Blockly.Events.Ui.superClass_.toJson.call(this);return e.element=this.element,void 0!==this.newValue&&(e.newValue=this.newValue),e},Blockly.Events.Ui.prototype.fromJson=function(e){Blockly.Events.Ui.superClass_.fromJson.call(this,e),this.element=e.element,this.newValue=e.newValue},Blockly.Events.disableOrphans=function(e){if(e.type==Blockly.Events.MOVE||e.type==Blockly.Events.CREATE){if(Blockly.Events.disable(),e=Blockly.Workspace.getById(e.workspaceId).getBlockById(e.blockId))if(e.getParent()&&!e.getParent().disabled){e=e.getDescendants();for(var o,t=0;o=e[t];t++)o.setDisabled(!1)}else if((e.outputConnection||e.previousConnection)&&Blockly.dragMode_==Blockly.DRAG_NONE)do e.setDisabled(!0),e=e.getNextBlock();while(e);Blockly.Events.enable()}},Blockly.Msg={},goog.getMsgOrig=goog.getMsg,goog.getMsg=function(e,o){var t=goog.getMsg.blocklyMsgMap[e];return t&&(e=Blockly.Msg[t]),goog.getMsgOrig(e,o)},goog.getMsg.blocklyMsgMap={Today:"TODAY"},Blockly.FieldTextInput=function(e,o){Blockly.FieldTextInput.superClass_.constructor.call(this,e,o)},goog.inherits(Blockly.FieldTextInput,Blockly.Field),Blockly.FieldTextInput.FONTSIZE=11,Blockly.FieldTextInput.prototype.CURSOR="text",Blockly.FieldTextInput.prototype.spellcheck_=!0,Blockly.FieldTextInput.prototype.dispose=function(){Blockly.WidgetDiv.hideIfOwner(this),Blockly.FieldTextInput.superClass_.dispose.call(this)},Blockly.FieldTextInput.prototype.setValue=function(e){if(null!==e){if(this.sourceBlock_){var o=this.callValidator(e);null!==o&&(e=o)}Blockly.Field.prototype.setValue.call(this,e)}},Blockly.FieldTextInput.prototype.setSpellcheck=function(e){this.spellcheck_=e},Blockly.FieldTextInput.prototype.showEditor_=function(e){if(this.workspace_=this.sourceBlock_.workspace,e=e||!1,!e&&(goog.userAgent.MOBILE||goog.userAgent.ANDROID||goog.userAgent.IPAD)){var o=this;Blockly.prompt(Blockly.Msg.CHANGE_VALUE_TITLE,this.text_,function(e){o.sourceBlock_&&(e=o.callValidator(e)),o.setValue(e)})}else{Blockly.WidgetDiv.show(this,this.sourceBlock_.RTL,this.widgetDispose_());var t=Blockly.WidgetDiv.DIV,n=goog.dom.createDom("INPUT","blocklyHtmlInput");n.setAttribute("spellcheck",this.spellcheck_);var r=Blockly.FieldTextInput.FONTSIZE*this.workspace_.scale+"pt";t.style.fontSize=r,n.style.fontSize=r,Blockly.FieldTextInput.htmlInput_=n,t.appendChild(n),n.value=n.defaultValue=this.text_,n.oldValue_=null,this.validate_(),this.resizeEditor_(),e||(n.focus(),n.select()),n.onKeyDownWrapper_=Blockly.bindEventWithChecks_(n,"keydown",this,this.onHtmlInputKeyDown_),n.onKeyUpWrapper_=Blockly.bindEventWithChecks_(n,"keyup",this,this.onHtmlInputChange_),n.onKeyPressWrapper_=Blockly.bindEventWithChecks_(n,"keypress",this,this.onHtmlInputChange_),n.onWorkspaceChangeWrapper_=this.resizeEditor_.bind(this),this.workspace_.addChangeListener(n.onWorkspaceChangeWrapper_)}},Blockly.FieldTextInput.prototype.onHtmlInputKeyDown_=function(e){var o=Blockly.FieldTextInput.htmlInput_;13==e.keyCode?Blockly.WidgetDiv.hide():27==e.keyCode?(o.value=o.defaultValue,Blockly.WidgetDiv.hide()):9==e.keyCode&&(Blockly.WidgetDiv.hide(),this.sourceBlock_.tab(this,!e.shiftKey),e.preventDefault())},Blockly.FieldTextInput.prototype.onHtmlInputChange_=function(e){e=Blockly.FieldTextInput.htmlInput_;var o=e.value;o!==e.oldValue_?(e.oldValue_=o,this.setValue(o),this.validate_()):goog.userAgent.WEBKIT&&this.sourceBlock_.render(),this.resizeEditor_(),Blockly.svgResize(this.sourceBlock_.workspace)},Blockly.FieldTextInput.prototype.validate_=function(){var e=!0;goog.asserts.assertObject(Blockly.FieldTextInput.htmlInput_);var o=Blockly.FieldTextInput.htmlInput_;this.sourceBlock_&&(e=this.callValidator(o.value)),null===e?Blockly.addClass_(o,"blocklyInvalidInput"):Blockly.removeClass_(o,"blocklyInvalidInput")},Blockly.FieldTextInput.prototype.resizeEditor_=function(){var e=Blockly.WidgetDiv.DIV,o=this.fieldGroup_.getBBox();if(e.style.width=o.width*this.workspace_.scale+"px",e.style.height=o.height*this.workspace_.scale+"px",o=this.getAbsoluteXY_(),this.sourceBlock_.RTL){var t=this.getScaledBBox_();o.x+=t.width,o.x-=e.offsetWidth}o.y+=1,goog.userAgent.GECKO&&Blockly.WidgetDiv.DIV.style.top&&(--o.x,--o.y),goog.userAgent.WEBKIT&&(o.y-=3),e.style.left=o.x+"px",e.style.top=o.y+"px"},Blockly.FieldTextInput.prototype.widgetDispose_=function(){var e=this;return function(){var o=Blockly.FieldTextInput.htmlInput_,t=o.value;e.sourceBlock_&&(t=e.callValidator(t),null===t?t=o.defaultValue:e.onFinishEditing_&&e.onFinishEditing_(t)),e.setValue(t),e.sourceBlock_.rendered&&e.sourceBlock_.render(),Blockly.unbindEvent_(o.onKeyDownWrapper_),Blockly.unbindEvent_(o.onKeyUpWrapper_),Blockly.unbindEvent_(o.onKeyPressWrapper_),e.workspace_.removeChangeListener(o.onWorkspaceChangeWrapper_),Blockly.FieldTextInput.htmlInput_=null,o=Blockly.WidgetDiv.DIV.style,o.width="auto",o.height="auto",o.fontSize=""}},Blockly.FieldTextInput.numberValidator=function(e){return console.warn("Blockly.FieldTextInput.numberValidator is deprecated. Use Blockly.FieldNumber instead."),null===e?null:(e=String(e),e=e.replace(/O/gi,"0"),e=e.replace(/,/g,""),e=parseFloat(e||0),isNaN(e)?null:String(e))},Blockly.FieldTextInput.nonnegativeIntegerValidator=function(e){return(e=Blockly.FieldTextInput.numberValidator(e))&&(e=String(Math.max(0,Math.floor(e)))),e},Blockly.FieldAngle=function(e,o){this.symbol_=Blockly.createSvgElement("tspan",{},null),this.symbol_.appendChild(document.createTextNode("Â°")),Blockly.FieldAngle.superClass_.constructor.call(this,e,o)},goog.inherits(Blockly.FieldAngle,Blockly.FieldTextInput),Blockly.FieldAngle.ROUND=15,Blockly.FieldAngle.HALF=50,Blockly.FieldAngle.CLOCKWISE=!1,Blockly.FieldAngle.OFFSET=0,Blockly.FieldAngle.WRAP=360,Blockly.FieldAngle.RADIUS=Blockly.FieldAngle.HALF-1,Blockly.FieldAngle.prototype.dispose_=function(){var e=this;return function(){Blockly.FieldAngle.superClass_.dispose_.call(e)(),e.gauge_=null,e.clickWrapper_&&Blockly.unbindEvent_(e.clickWrapper_),e.moveWrapper1_&&Blockly.unbindEvent_(e.moveWrapper1_),e.moveWrapper2_&&Blockly.unbindEvent_(e.moveWrapper2_)}},Blockly.FieldAngle.prototype.showEditor_=function(){Blockly.FieldAngle.superClass_.showEditor_.call(this,goog.userAgent.MOBILE||goog.userAgent.ANDROID||goog.userAgent.IPAD);var e=Blockly.WidgetDiv.DIV;if(e.firstChild){var e=Blockly.createSvgElement("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:html":"http://www.w3.org/1999/xhtml",
+"xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",height:2*Blockly.FieldAngle.HALF+"px",width:2*Blockly.FieldAngle.HALF+"px"},e),o=Blockly.createSvgElement("circle",{cx:Blockly.FieldAngle.HALF,cy:Blockly.FieldAngle.HALF,r:Blockly.FieldAngle.RADIUS,"class":"blocklyAngleCircle"},e);this.gauge_=Blockly.createSvgElement("path",{"class":"blocklyAngleGauge"},e),this.line_=Blockly.createSvgElement("line",{x1:Blockly.FieldAngle.HALF,y1:Blockly.FieldAngle.HALF,"class":"blocklyAngleLine"},e);for(var t=0;360>t;t+=15)Blockly.createSvgElement("line",{x1:Blockly.FieldAngle.HALF+Blockly.FieldAngle.RADIUS,y1:Blockly.FieldAngle.HALF,x2:Blockly.FieldAngle.HALF+Blockly.FieldAngle.RADIUS-(0==t%45?10:5),y2:Blockly.FieldAngle.HALF,"class":"blocklyAngleMarks",transform:"rotate("+t+","+Blockly.FieldAngle.HALF+","+Blockly.FieldAngle.HALF+")"},e);e.style.marginLeft=15-Blockly.FieldAngle.RADIUS+"px",this.clickWrapper_=Blockly.bindEvent_(e,"click",this,Blockly.WidgetDiv.hide),this.moveWrapper1_=Blockly.bindEvent_(o,"mousemove",this,this.onMouseMove),this.moveWrapper2_=Blockly.bindEvent_(this.gauge_,"mousemove",this,this.onMouseMove),this.updateGraph_()}},Blockly.FieldAngle.prototype.onMouseMove=function(e){var o=this.gauge_.ownerSVGElement.getBoundingClientRect(),t=e.clientX-o.left-Blockly.FieldAngle.HALF;e=e.clientY-o.top-Blockly.FieldAngle.HALF,o=Math.atan(-e/t),isNaN(o)||(o=goog.math.toDegrees(o),0>t?o+=180:e>0&&(o+=360),o=Blockly.FieldAngle.CLOCKWISE?Blockly.FieldAngle.OFFSET+360-o:o-Blockly.FieldAngle.OFFSET,Blockly.FieldAngle.ROUND&&(o=Math.round(o/Blockly.FieldAngle.ROUND)*Blockly.FieldAngle.ROUND),o=this.callValidator(o),Blockly.FieldTextInput.htmlInput_.value=o,this.setValue(o),this.validate_(),this.resizeEditor_())},Blockly.FieldAngle.prototype.setText=function(e){Blockly.FieldAngle.superClass_.setText.call(this,e),this.textElement_&&(this.updateGraph_(),this.sourceBlock_.RTL?this.textElement_.insertBefore(this.symbol_,this.textElement_.firstChild):this.textElement_.appendChild(this.symbol_),this.size_.width=0)},Blockly.FieldAngle.prototype.updateGraph_=function(){if(this.gauge_){var e=Number(this.getText())+Blockly.FieldAngle.OFFSET,o=goog.math.toRadians(e),e=["M ",Blockly.FieldAngle.HALF,",",Blockly.FieldAngle.HALF],t=Blockly.FieldAngle.HALF,n=Blockly.FieldAngle.HALF;if(!isNaN(o)){var r=goog.math.toRadians(Blockly.FieldAngle.OFFSET),i=Math.cos(r)*Blockly.FieldAngle.RADIUS,s=Math.sin(r)*-Blockly.FieldAngle.RADIUS;Blockly.FieldAngle.CLOCKWISE&&(o=2*r-o),t+=Math.cos(o)*Blockly.FieldAngle.RADIUS,n-=Math.sin(o)*Blockly.FieldAngle.RADIUS,o=Math.abs(Math.floor((o-r)/Math.PI)%2),Blockly.FieldAngle.CLOCKWISE&&(o=1-o),e.push(" l ",i,",",s," A ",Blockly.FieldAngle.RADIUS,",",Blockly.FieldAngle.RADIUS," 0 ",o," ",Number(Blockly.FieldAngle.CLOCKWISE)," ",t,",",n," z")}this.gauge_.setAttribute("d",e.join("")),this.line_.setAttribute("x2",t),this.line_.setAttribute("y2",n)}},Blockly.FieldAngle.prototype.classValidator=function(e){return null===e?null:(e=parseFloat(e||0),isNaN(e)?null:(e%=360,0>e&&(e+=360),e>Blockly.FieldAngle.WRAP&&(e-=360),String(e)))},Blockly.FieldCheckbox=function(e,o){Blockly.FieldCheckbox.superClass_.constructor.call(this,"",o),this.setValue(e)},goog.inherits(Blockly.FieldCheckbox,Blockly.Field),Blockly.FieldCheckbox.CHECK_CHAR="â",Blockly.FieldCheckbox.prototype.CURSOR="default",Blockly.FieldCheckbox.prototype.init=function(){if(!this.fieldGroup_){Blockly.FieldCheckbox.superClass_.init.call(this),this.checkElement_=Blockly.createSvgElement("text",{"class":"blocklyText blocklyCheckbox",x:-3,y:14},this.fieldGroup_);var e=document.createTextNode(Blockly.FieldCheckbox.CHECK_CHAR);this.checkElement_.appendChild(e),this.checkElement_.style.display=this.state_?"block":"none"}},Blockly.FieldCheckbox.prototype.getValue=function(){return String(this.state_).toUpperCase()},Blockly.FieldCheckbox.prototype.setValue=function(e){e="TRUE"==e.toUpperCase(),this.state_!==e&&(this.sourceBlock_&&Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.Change(this.sourceBlock_,"field",this.name,this.state_,e)),this.state_=e,this.checkElement_&&(this.checkElement_.style.display=e?"block":"none"))},Blockly.FieldCheckbox.prototype.showEditor_=function(){var e=!this.state_;this.sourceBlock_&&(e=this.callValidator(e)),null!==e&&this.setValue(String(e).toUpperCase())},Blockly.FieldColour=function(e,o){Blockly.FieldColour.superClass_.constructor.call(this,e,o),this.setText(Blockly.Field.NBSP+Blockly.Field.NBSP+Blockly.Field.NBSP)},goog.inherits(Blockly.FieldColour,Blockly.Field),Blockly.FieldColour.prototype.colours_=null,Blockly.FieldColour.prototype.columns_=0,Blockly.FieldColour.prototype.init=function(){Blockly.FieldColour.superClass_.init.call(this),this.borderRect_.style.fillOpacity=1,this.setValue(this.getValue())},Blockly.FieldColour.prototype.CURSOR="default",Blockly.FieldColour.prototype.dispose=function(){Blockly.WidgetDiv.hideIfOwner(this),Blockly.FieldColour.superClass_.dispose.call(this)},Blockly.FieldColour.prototype.getValue=function(){return this.colour_},Blockly.FieldColour.prototype.setValue=function(e){this.sourceBlock_&&Blockly.Events.isEnabled()&&this.colour_!=e&&Blockly.Events.fire(new Blockly.Events.Change(this.sourceBlock_,"field",this.name,this.colour_,e)),this.colour_=e,this.borderRect_&&(this.borderRect_.style.fill=e)},Blockly.FieldColour.prototype.getText=function(){var e=this.colour_,o=e.match(/^#(.)\1(.)\2(.)\3$/);return o&&(e="#"+o[1]+o[2]+o[3]),e},Blockly.FieldColour.COLOURS=goog.ui.ColorPicker.SIMPLE_GRID_COLORS,Blockly.FieldColour.COLUMNS=7,Blockly.FieldColour.prototype.setColours=function(e){return this.colours_=e,this},Blockly.FieldColour.prototype.setColumns=function(e){return this.columns_=e,this},Blockly.FieldColour.prototype.showEditor_=function(){Blockly.WidgetDiv.show(this,this.sourceBlock_.RTL,Blockly.FieldColour.widgetDispose_);var e=new goog.ui.ColorPicker;e.setSize(this.columns_||Blockly.FieldColour.COLUMNS),e.setColors(this.colours_||Blockly.FieldColour.COLOURS);var o=goog.dom.getViewportSize(),t=goog.style.getViewportPageOffset(document),n=this.getAbsoluteXY_(),r=this.getScaledBBox_();e.render(Blockly.WidgetDiv.DIV),e.setSelectedColor(this.getValue());var i=goog.style.getSize(e.getElement());n.y=n.y+i.height+r.height>=o.height+t.y?n.y-(i.height-1):n.y+(r.height-1),this.sourceBlock_.RTL?(n.x+=r.width,n.x-=i.width,n.x<t.x&&(n.x=t.x)):n.x>o.width+t.x-i.width&&(n.x=o.width+t.x-i.width),Blockly.WidgetDiv.position(n.x,n.y,o,t,this.sourceBlock_.RTL);var s=this;Blockly.FieldColour.changeEventKey_=goog.events.listen(e,goog.ui.ColorPicker.EventType.CHANGE,function(e){e=e.target.getSelectedColor()||"#000000",Blockly.WidgetDiv.hide(),s.sourceBlock_&&(e=s.callValidator(e)),null!==e&&s.setValue(e)})},Blockly.FieldColour.widgetDispose_=function(){Blockly.FieldColour.changeEventKey_&&goog.events.unlistenByKey(Blockly.FieldColour.changeEventKey_)},Blockly.FieldDropdown=function(e,o){this.menuGenerator_=e,this.trimOptions_();var t=this.getOptions_()[0];Blockly.FieldDropdown.superClass_.constructor.call(this,t[1],o)},goog.inherits(Blockly.FieldDropdown,Blockly.Field),Blockly.FieldDropdown.CHECKMARK_OVERHANG=25,Blockly.FieldDropdown.ARROW_CHAR=goog.userAgent.ANDROID?"â¼":"â¾",Blockly.FieldDropdown.prototype.CURSOR="default",Blockly.FieldDropdown.prototype.value_="",Blockly.FieldDropdown.prototype.init=function(){if(!this.fieldGroup_){this.arrow_=Blockly.createSvgElement("tspan",{},null),this.arrow_.appendChild(document.createTextNode(this.sourceBlock_.RTL?Blockly.FieldDropdown.ARROW_CHAR+" ":" "+Blockly.FieldDropdown.ARROW_CHAR)),Blockly.FieldDropdown.superClass_.init.call(this);var e=this.text_;this.text_=null,this.setText(e)}},Blockly.FieldDropdown.prototype.showEditor_=function(){Blockly.WidgetDiv.show(this,this.sourceBlock_.RTL,null);var e=this,o=new goog.ui.Menu;o.setRightToLeft(this.sourceBlock_.RTL);for(var t=this.getOptions_(),n=0;n<t.length;n++){var r=t[n][1],i=new goog.ui.MenuItem(t[n][0]);i.setRightToLeft(this.sourceBlock_.RTL),i.setValue(r),i.setCheckable(!0),o.addChild(i,!0),i.setChecked(r==this.value_)}goog.events.listen(o,goog.ui.Component.EventType.ACTION,function(o){(o=o.target)&&e.onItemSelected(this,o),Blockly.WidgetDiv.hideIfOwner(e)}),o.getHandler().listen(o.getElement(),goog.events.EventType.TOUCHSTART,function(e){this.getOwnerControl(e.target).handleMouseDown(e)}),o.getHandler().listen(o.getElement(),goog.events.EventType.TOUCHEND,function(e){this.getOwnerControl(e.target).performActionInternal(e)}),t=goog.dom.getViewportSize(),n=goog.style.getViewportPageOffset(document),r=this.getAbsoluteXY_(),i=this.getScaledBBox_(),o.render(Blockly.WidgetDiv.DIV);var s=o.getElement();Blockly.addClass_(s,"blocklyDropdownMenu");var l=goog.style.getSize(s);l.height=s.scrollHeight,r.y=r.y+l.height+i.height>=t.height+n.y?r.y-(l.height+2):r.y+i.height,this.sourceBlock_.RTL?(r.x+=i.width,r.x+=Blockly.FieldDropdown.CHECKMARK_OVERHANG,r.x<n.x+l.width&&(r.x=n.x+l.width)):(r.x-=Blockly.FieldDropdown.CHECKMARK_OVERHANG,r.x>t.width+n.x-l.width&&(r.x=t.width+n.x-l.width)),Blockly.WidgetDiv.position(r.x,r.y,t,n,this.sourceBlock_.RTL),o.setAllowAutoFocus(!0),s.focus()},Blockly.FieldDropdown.prototype.onItemSelected=function(e,o){var t=o.getValue();this.sourceBlock_&&(t=this.callValidator(t)),null!==t&&this.setValue(t)},Blockly.FieldDropdown.prototype.trimOptions_=function(){this.suffixField=this.prefixField=null;var e=this.menuGenerator_;if(goog.isArray(e)&&!(2>e.length)){var o=e.map(function(e){return e[0]}),t=Blockly.shortestStringLength(o),n=Blockly.commonWordPrefix(o,t),r=Blockly.commonWordSuffix(o,t);if((n||r)&&!(n+r>=t)){for(n&&(this.prefixField=o[0].substring(0,n-1)),r&&(this.suffixField=o[0].substr(1-r)),o=[],t=0;t<e.length;t++){var i=e[t][0],s=e[t][1],i=i.substring(n,i.length-r);o[t]=[i,s]}this.menuGenerator_=o}}},Blockly.FieldDropdown.prototype.getOptions_=function(){return goog.isFunction(this.menuGenerator_)?this.menuGenerator_.call(this):this.menuGenerator_},Blockly.FieldDropdown.prototype.getValue=function(){return this.value_},Blockly.FieldDropdown.prototype.setValue=function(e){if(null!==e&&e!==this.value_){this.sourceBlock_&&Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.Change(this.sourceBlock_,"field",this.name,this.value_,e)),this.value_=e;for(var o=this.getOptions_(),t=0;t<o.length;t++)if(o[t][1]==e)return void this.setText(o[t][0]);this.setText(e)}},Blockly.FieldDropdown.prototype.setText=function(e){this.sourceBlock_&&this.arrow_&&(this.arrow_.style.fill=this.sourceBlock_.getColour()),null!==e&&e!==this.text_&&(this.text_=e,this.updateTextNode_(),this.textElement_&&(this.sourceBlock_.RTL?this.textElement_.insertBefore(this.arrow_,this.textElement_.firstChild):this.textElement_.appendChild(this.arrow_)),this.sourceBlock_&&this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours_()))},Blockly.FieldDropdown.prototype.dispose=function(){Blockly.WidgetDiv.hideIfOwner(this),Blockly.FieldDropdown.superClass_.dispose.call(this)},Blockly.FieldImage=function(e,o,t,n){this.sourceBlock_=null,this.height_=Number(t),this.width_=Number(o),this.size_=new goog.math.Size(this.width_,this.height_+2*Blockly.BlockSvg.INLINE_PADDING_Y),this.text_=n||"",this.setValue(e)},goog.inherits(Blockly.FieldImage,Blockly.Field),Blockly.FieldImage.prototype.rectElement_=null,Blockly.FieldImage.prototype.EDITABLE=!1,Blockly.FieldImage.prototype.init=function(){if(!this.fieldGroup_){this.fieldGroup_=Blockly.createSvgElement("g",{},null),this.visible_||(this.fieldGroup_.style.display="none"),this.imageElement_=Blockly.createSvgElement("image",{height:this.height_+"px",width:this.width_+"px"},this.fieldGroup_),this.setValue(this.src_),goog.userAgent.GECKO&&(this.rectElement_=Blockly.createSvgElement("rect",{height:this.height_+"px",width:this.width_+"px","fill-opacity":0},this.fieldGroup_)),this.sourceBlock_.getSvgRoot().appendChild(this.fieldGroup_);var e=this.rectElement_||this.imageElement_;e.tooltip=this.sourceBlock_,Blockly.Tooltip.bindMouseEvents(e)}},Blockly.FieldImage.prototype.dispose=function(){goog.dom.removeNode(this.fieldGroup_),this.rectElement_=this.imageElement_=this.fieldGroup_=null},Blockly.FieldImage.prototype.setTooltip=function(e){(this.rectElement_||this.imageElement_).tooltip=e},Blockly.FieldImage.prototype.getValue=function(){return this.src_},Blockly.FieldImage.prototype.setValue=function(e){null!==e&&(this.src_=e,this.imageElement_&&this.imageElement_.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",goog.isString(e)?e:""))},Blockly.FieldImage.prototype.setText=function(e){null!==e&&(this.text_=e)},Blockly.FieldImage.prototype.render_=function(){},Blockly.FieldNumber=function(e,o,t,n,r){e=String(e),Blockly.FieldNumber.superClass_.constructor.call(this,e,r),this.setConstraints(o,t,n)},goog.inherits(Blockly.FieldNumber,Blockly.FieldTextInput),Blockly.FieldNumber.prototype.setConstraints=function(e,o,t){t=parseFloat(t),this.precision_=isNaN(t)?0:t,e=parseFloat(e),this.min_=isNaN(e)?-(1/0):e,o=parseFloat(o),this.max_=isNaN(o)?1/0:o,this.setValue(this.callValidator(this.getValue()))},Blockly.FieldNumber.prototype.classValidator=function(e){return null===e?null:(e=String(e),e=e.replace(/O/gi,"0"),e=e.replace(/,/g,""),e=parseFloat(e||0),isNaN(e)?null:(this.precision_&&isFinite(e)&&(e=Math.round(e/this.precision_)*this.precision_),e=goog.math.clamp(e,this.min_,this.max_),String(e)))},Blockly.FieldVariable=function(e,o){Blockly.FieldVariable.superClass_.constructor.call(this,Blockly.FieldVariable.dropdownCreate,o),this.setValue(e||"")},goog.inherits(Blockly.FieldVariable,Blockly.FieldDropdown),Blockly.FieldVariable.prototype.renameVarItemIndex_=-1,Blockly.FieldVariable.prototype.deleteVarItemIndex_=-1,Blockly.FieldVariable.prototype.init=function(){this.fieldGroup_||(Blockly.FieldVariable.superClass_.init.call(this),this.getValue()||this.setValue(Blockly.Variables.generateUniqueName(this.sourceBlock_.isInFlyout?this.sourceBlock_.workspace.targetWorkspace:this.sourceBlock_.workspace)),this.sourceBlock_.isInFlyout||this.sourceBlock_.workspace.createVariable(this.getValue()))},Blockly.FieldVariable.prototype.setSourceBlock=function(e){goog.asserts.assert(!e.isShadow(),"Variable fields are not allowed to exist on shadow blocks."),Blockly.FieldVariable.superClass_.setSourceBlock.call(this,e)},Blockly.FieldVariable.prototype.getValue=function(){return this.getText()},Blockly.FieldVariable.prototype.setValue=function(e){this.sourceBlock_&&Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.Change(this.sourceBlock_,"field",this.name,this.value_,e)),this.value_=e,this.setText(e)},Blockly.FieldVariable.dropdownCreate=function(){var e=this.sourceBlock_&&this.sourceBlock_.workspace?this.sourceBlock_.workspace.variableList.slice(0):[],o=this.getText();o&&-1==e.indexOf(o)&&e.push(o),e.sort(goog.string.caseInsensitiveCompare),this.renameVarItemIndex_=e.length,e.push(Blockly.Msg.RENAME_VARIABLE),this.deleteVarItemIndex_=e.length,e.push(Blockly.Msg.DELETE_VARIABLE.replace("%1",o));for(var o=[],t=0;t<e.length;t++)o[t]=[e[t],e[t]];return o},Blockly.FieldVariable.prototype.onItemSelected=function(e,o){e.getChildCount();var t=o.getValue();if(this.sourceBlock_){var n=this.sourceBlock_.workspace;if(0<=this.renameVarItemIndex_&&e.getChildAt(this.renameVarItemIndex_)===o){var r=this.getText();return Blockly.hideChaff(),void Blockly.Variables.promptName(Blockly.Msg.RENAME_VARIABLE_TITLE.replace("%1",r),r,function(e){e&&n.renameVariable(r,e)})}if(0<=this.deleteVarItemIndex_&&e.getChildAt(this.deleteVarItemIndex_)===o)return void n.deleteVariable(this.getText());t=this.callValidator(t)}null!==t&&this.setValue(t)},Blockly.FlyoutButton=function(e,o,t,n,r){this.workspace_=e,this.targetWorkspace_=o,this.text_=t,this.position_=new goog.math.Coordinate(0,0),this.callback_=Blockly.flyoutButtonCallbacks_[n],this.isLabel_=r},Blockly.FlyoutButton.MARGIN=5,Blockly.FlyoutButton.prototype.width=0,Blockly.FlyoutButton.prototype.height=0,Blockly.FlyoutButton.prototype.createDom=function(){if(this.svgGroup_=Blockly.createSvgElement("g",{"class":this.isLabel_?"blocklyFlyoutLabel":"blocklyFlyoutButton"},this.workspace_.getCanvas()),!this.isLabel_)var e=Blockly.createSvgElement("rect",{"class":"blocklyFlyoutButtonShadow",rx:4,ry:4,x:1,y:1},this.svgGroup_);var o=Blockly.createSvgElement("rect",{"class":this.isLabel_?"blocklyFlyoutLabelBackground":"blocklyFlyoutButtonBackground",rx:4,ry:4},this.svgGroup_),t=Blockly.createSvgElement("text",{"class":this.isLabel_?"blocklyFlyoutLabelText":"blocklyText",x:0,y:0,"text-anchor":"middle"},this.svgGroup_);return t.textContent=this.text_,this.width=t.getComputedTextLength()+2*Blockly.FlyoutButton.MARGIN,this.height=20,this.isLabel_||(e.setAttribute("width",this.width),e.setAttribute("height",this.height)),o.setAttribute("width",this.width),o.setAttribute("height",this.height),t.setAttribute("x",this.width/2),t.setAttribute("y",this.height-Blockly.FlyoutButton.MARGIN),this.updateTransform_(),this.svgGroup_},Blockly.FlyoutButton.prototype.show=function(){this.updateTransform_(),this.svgGroup_.setAttribute("display","block")},Blockly.FlyoutButton.prototype.updateTransform_=function(){this.svgGroup_.setAttribute("transform","translate("+this.position_.x+","+this.position_.y+")")},Blockly.FlyoutButton.prototype.moveTo=function(e,o){this.position_.x=e,this.position_.y=o,this.updateTransform_()},Blockly.FlyoutButton.prototype.getTargetWorkspace=function(){return this.targetWorkspace_},Blockly.FlyoutButton.prototype.dispose=function(){this.svgGroup_&&(goog.dom.removeNode(this.svgGroup_),this.svgGroup_=null),this.targetWorkspace_=this.workspace_=null},Blockly.FlyoutButton.prototype.onMouseUp=function(e){e.preventDefault(),e.stopPropagation(),Blockly.Flyout.terminateDrag_(),this.callback_&&this.callback_(this)},Blockly.Flyout=function(e){e.getMetrics=this.getMetrics_.bind(this),e.setMetrics=this.setMetrics_.bind(this),this.workspace_=new Blockly.WorkspaceSvg(e),this.workspace_.isFlyout=!0,this.RTL=!!e.RTL,this.horizontalLayout_=e.horizontalLayout,this.toolboxPosition_=e.toolboxPosition,this.eventWrappers_=[],this.backgroundButtons_=[],this.buttons_=[],this.listeners_=[],this.permanentlyDisabled_=[],this.startDragMouseX_=this.startDragMouseY_=0},Blockly.Flyout.startFlyout_=null,Blockly.Flyout.startDownEvent_=null,Blockly.Flyout.startBlock_=null,Blockly.Flyout.onMouseUpWrapper_=null,Blockly.Flyout.onMouseMoveWrapper_=null,Blockly.Flyout.onMouseMoveBlockWrapper_=null,Blockly.Flyout.prototype.autoClose=!0,Blockly.Flyout.prototype.CORNER_RADIUS=8,Blockly.Flyout.prototype.DRAG_RADIUS=10,Blockly.Flyout.prototype.MARGIN=Blockly.Flyout.prototype.CORNER_RADIUS,Blockly.Flyout.prototype.GAP_X=3*Blockly.Flyout.prototype.MARGIN,Blockly.Flyout.prototype.GAP_Y=3*Blockly.Flyout.prototype.MARGIN,Blockly.Flyout.prototype.SCROLLBAR_PADDING=2,Blockly.Flyout.prototype.width_=0,Blockly.Flyout.prototype.height_=0,Blockly.Flyout.prototype.dragMode_=Blockly.DRAG_NONE,Blockly.Flyout.prototype.dragAngleRange_=70,Blockly.Flyout.prototype.createDom=function(){return this.svgGroup_=Blockly.createSvgElement("g",{"class":"blocklyFlyout"},null),this.svgBackground_=Blockly.createSvgElement("path",{"class":"blocklyFlyoutBackground"},this.svgGroup_),this.svgGroup_.appendChild(this.workspace_.createDom()),this.svgGroup_},Blockly.Flyout.prototype.init=function(e){this.targetWorkspace_=e,this.workspace_.targetWorkspace=e,this.scrollbar_=new Blockly.Scrollbar(this.workspace_,this.horizontalLayout_,!1),this.hide(),Array.prototype.push.apply(this.eventWrappers_,Blockly.bindEventWithChecks_(this.svgGroup_,"wheel",this,this.wheel_)),this.autoClose||(this.filterWrapper_=this.filterForCapacity_.bind(this),this.targetWorkspace_.addChangeListener(this.filterWrapper_)),Array.prototype.push.apply(this.eventWrappers_,Blockly.bindEventWithChecks_(this.svgGroup_,"mousedown",this,this.onMouseDown_))},Blockly.Flyout.prototype.dispose=function(){this.hide(),Blockly.unbindEvent_(this.eventWrappers_),this.filterWrapper_&&(this.targetWorkspace_.removeChangeListener(this.filterWrapper_),this.filterWrapper_=null),this.scrollbar_&&(this.scrollbar_.dispose(),this.scrollbar_=null),this.workspace_&&(this.workspace_.targetWorkspace=null,this.workspace_.dispose(),this.workspace_=null),this.svgGroup_&&(goog.dom.removeNode(this.svgGroup_),this.svgGroup_=null),this.targetWorkspace_=this.svgBackground_=null},Blockly.Flyout.prototype.getWidth=function(){return this.width_},Blockly.Flyout.prototype.getHeight=function(){return this.height_},Blockly.Flyout.prototype.getMetrics_=function(){if(!this.isVisible())return null;try{var e=this.workspace_.getCanvas().getBBox()}catch(o){e={height:0,y:0,width:0,x:0}}var t=this.SCROLLBAR_PADDING,n=this.SCROLLBAR_PADDING;if(this.horizontalLayout_){this.toolboxPosition_==Blockly.TOOLBOX_AT_BOTTOM&&(t=0);var r=this.height_;this.toolboxPosition_==Blockly.TOOLBOX_AT_TOP&&(r-=this.SCROLLBAR_PADDING);var i=this.width_-2*this.SCROLLBAR_PADDING}else n=0,r=this.height_-2*this.SCROLLBAR_PADDING,i=this.width_,this.RTL||(i-=this.SCROLLBAR_PADDING);return{viewHeight:r,viewWidth:i,contentHeight:(e.height+2*this.MARGIN)*this.workspace_.scale,contentWidth:(e.width+2*this.MARGIN)*this.workspace_.scale,viewTop:-this.workspace_.scrollY,viewLeft:-this.workspace_.scrollX,contentTop:e.y,contentLeft:e.x,absoluteTop:t,absoluteLeft:n}},Blockly.Flyout.prototype.setMetrics_=function(e){var o=this.getMetrics_();o&&(!this.horizontalLayout_&&goog.isNumber(e.y)?this.workspace_.scrollY=-o.contentHeight*e.y:this.horizontalLayout_&&goog.isNumber(e.x)&&(this.workspace_.scrollX=-o.contentWidth*e.x),this.workspace_.translate(this.workspace_.scrollX+o.absoluteLeft,this.workspace_.scrollY+o.absoluteTop))},Blockly.Flyout.prototype.position=function(){if(this.isVisible()){var e=this.targetWorkspace_.getMetrics();if(e){this.setBackgroundPath_(this.horizontalLayout_?e.viewWidth-2*this.CORNER_RADIUS:this.width_-this.CORNER_RADIUS,this.horizontalLayout_?this.height_-this.CORNER_RADIUS:e.viewHeight-2*this.CORNER_RADIUS);var o=e.absoluteLeft;this.toolboxPosition_==Blockly.TOOLBOX_AT_RIGHT&&(o+=e.viewWidth,o-=this.width_);var t=e.absoluteTop;this.toolboxPosition_==Blockly.TOOLBOX_AT_BOTTOM&&(t+=e.viewHeight,t-=this.height_),this.svgGroup_.setAttribute("transform","translate("+o+","+t+")"),this.horizontalLayout_?this.width_=e.viewWidth:this.height_=e.viewHeight,this.scrollbar_&&this.scrollbar_.resize()}}},Blockly.Flyout.prototype.setBackgroundPath_=function(e,o){this.horizontalLayout_?this.setBackgroundPathHorizontal_(e,o):this.setBackgroundPathVertical_(e,o)},Blockly.Flyout.prototype.setBackgroundPathVertical_=function(e,o){var t=this.toolboxPosition_==Blockly.TOOLBOX_AT_RIGHT,n=e+this.CORNER_RADIUS,n=["M "+(t?n:0)+",0"];n.push("h",t?-e:e),n.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,t?0:1,t?-this.CORNER_RADIUS:this.CORNER_RADIUS,this.CORNER_RADIUS),n.push("v",Math.max(0,o)),n.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,t?0:1,t?this.CORNER_RADIUS:-this.CORNER_RADIUS,this.CORNER_RADIUS),n.push("h",t?e:-e),n.push("z"),this.svgBackground_.setAttribute("d",n.join(" "))},Blockly.Flyout.prototype.setBackgroundPathHorizontal_=function(e,o){var t=this.toolboxPosition_==Blockly.TOOLBOX_AT_TOP,n=["M 0,"+(t?0:this.CORNER_RADIUS)];t?(n.push("h",e+2*this.CORNER_RADIUS),n.push("v",o),n.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,-this.CORNER_RADIUS,this.CORNER_RADIUS),n.push("h",-1*e),n.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,-this.CORNER_RADIUS,-this.CORNER_RADIUS)):(n.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,this.CORNER_RADIUS,-this.CORNER_RADIUS),n.push("h",e),n.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,this.CORNER_RADIUS,this.CORNER_RADIUS),n.push("v",o),n.push("h",-e-2*this.CORNER_RADIUS)),n.push("z"),this.svgBackground_.setAttribute("d",n.join(" "))},Blockly.Flyout.prototype.scrollToStart=function(){this.scrollbar_.set(this.horizontalLayout_&&this.RTL?1/0:0)},Blockly.Flyout.prototype.wheel_=function(e){var o=this.horizontalLayout_?e.deltaX:e.deltaY;if(o){goog.userAgent.GECKO&&(o*=10);var t=this.getMetrics_(),o=this.horizontalLayout_?t.viewLeft+o:t.viewTop+o,o=Math.min(o,this.horizontalLayout_?t.contentWidth-t.viewWidth:t.contentHeight-t.viewHeight),o=Math.max(o,0);this.scrollbar_.set(o)}e.preventDefault(),e.stopPropagation()},Blockly.Flyout.prototype.isVisible=function(){return this.svgGroup_&&"block"==this.svgGroup_.style.display},Blockly.Flyout.prototype.hide=function(){if(this.isVisible()){this.svgGroup_.style.display="none";for(var e,o=0;e=this.listeners_[o];o++)Blockly.unbindEvent_(e);this.listeners_.length=0,this.reflowWrapper_&&(this.workspace_.removeChangeListener(this.reflowWrapper_),this.reflowWrapper_=null)}},Blockly.Flyout.prototype.flyoutCategory=function(e,o){return e},Blockly.Flyout.prototype.show=function(e){this.hide(),this.clearOldBlocks_(),e=this.flyoutCategory(e,this.workspace_.targetWorkspace),this.svgGroup_.style.display="block";for(var o,t=[],n=[],r=this.permanentlyDisabled_.length=0;o=e[r];r++)if(o.tagName){var i=o.tagName.toUpperCase(),s=this.horizontalLayout_?this.GAP_X:this.GAP_Y;if("BLOCK"==i)i=Blockly.Xml.domToBlock(o,this.workspace_),i.disabled&&this.permanentlyDisabled_.push(i),t.push({type:"block",block:i}),o=parseInt(o.getAttribute("gap"),10),n.push(isNaN(o)?s:o);else if("SEP"==o.tagName.toUpperCase())o=parseInt(o.getAttribute("gap"),10),!isNaN(o)&&0<n.length?n[n.length-1]=o:n.push(s);else if("BUTTON"==i||"LABEL"==i){var i="LABEL"==i,l=o.getAttribute("text");o=o.getAttribute("callbackKey"),o=new Blockly.FlyoutButton(this.workspace_,this.targetWorkspace_,l,o,i),t.push({type:"button",button:o}),n.push(s)}}this.layout_(t,n),this.listeners_.push(Blockly.bindEventWithChecks_(this.svgBackground_,"mouseover",this,function(){for(var e,o=this.workspace_.getTopBlocks(!1),t=0;e=o[t];t++)e.removeSelect()})),this.horizontalLayout_?this.height_=0:this.width_=0,this.reflow(),this.filterForCapacity_(),this.position(),this.reflowWrapper_=this.reflow.bind(this),this.workspace_.addChangeListener(this.reflowWrapper_)},Blockly.Flyout.prototype.layout_=function(e,o){this.workspace_.scale=this.targetWorkspace_.scale;var t=this.MARGIN,n=this.RTL?t:t+Blockly.BlockSvg.TAB_WIDTH;this.horizontalLayout_&&this.RTL&&(e=e.reverse());for(var r,i=0;r=e[i];i++)if("block"==r.type){r=r.block;for(var s,l=r.getDescendants(),g=0;s=l[g];g++)s.isInFlyout=!0;r.render(),l=r.getSvgRoot(),g=r.getHeightWidth(),s=r.outputConnection?Blockly.BlockSvg.TAB_WIDTH:0,this.horizontalLayout_&&(n+=s),r.moveBy(this.horizontalLayout_&&this.RTL?n+g.width-s:n,t),this.horizontalLayout_?n+=g.width+o[i]-s:t+=g.height+o[i],g=Blockly.createSvgElement("rect",{"fill-opacity":0},null),g.tooltip=r,Blockly.Tooltip.bindMouseEvents(g),this.workspace_.getCanvas().insertBefore(g,r.getSvgRoot()),r.flyoutRect_=g,this.backgroundButtons_[i]=g,this.addBlockListeners_(l,r,g)}else"button"==r.type&&(r=r.button,l=r.createDom(),r.moveTo(n,t),r.show(),Blockly.bindEventWithChecks_(l,"mouseup",r,r.onMouseUp),this.buttons_.push(r),this.horizontalLayout_?n+=r.width+o[i]:t+=r.height+o[i])},Blockly.Flyout.prototype.clearOldBlocks_=function(){for(var e,o=this.workspace_.getTopBlocks(!1),t=0;e=o[t];t++)e.workspace==this.workspace_&&e.dispose(!1,!1);for(t=0;o=this.backgroundButtons_[t];t++)goog.dom.removeNode(o);for(t=this.backgroundButtons_.length=0;o=this.buttons_[t];t++)o.dispose();this.buttons_.length=0},Blockly.Flyout.prototype.addBlockListeners_=function(e,o,t){this.listeners_.push(Blockly.bindEventWithChecks_(e,"mousedown",null,this.blockMouseDown_(o))),this.listeners_.push(Blockly.bindEventWithChecks_(t,"mousedown",null,this.blockMouseDown_(o))),this.listeners_.push(Blockly.bindEvent_(e,"mouseover",o,o.addSelect)),this.listeners_.push(Blockly.bindEvent_(e,"mouseout",o,o.removeSelect)),this.listeners_.push(Blockly.bindEvent_(t,"mouseover",o,o.addSelect)),this.listeners_.push(Blockly.bindEvent_(t,"mouseout",o,o.removeSelect))},Blockly.Flyout.blockRightClick_=function(e,o){Blockly.terminateDrag_(),Blockly.hideChaff(!0),o.showContextMenu_(e),Blockly.Touch.clearTouchIdentifier()},Blockly.Flyout.prototype.blockMouseDown_=function(e){var o=this;return function(t){Blockly.isRightButton(t)?Blockly.Flyout.blockRightClick_(t,e):(Blockly.terminateDrag_(),Blockly.hideChaff(!0),Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED),o.startDragMouseY_=t.clientY,o.startDragMouseX_=t.clientX,Blockly.Flyout.startDownEvent_=t,Blockly.Flyout.startBlock_=e,Blockly.Flyout.startFlyout_=o,Blockly.Flyout.onMouseUpWrapper_=Blockly.bindEventWithChecks_(document,"mouseup",o,o.onMouseUp_),Blockly.Flyout.onMouseMoveBlockWrapper_=Blockly.bindEventWithChecks_(document,"mousemove",o,o.onMouseMoveBlock_)),t.stopPropagation(),t.preventDefault()}},Blockly.Flyout.prototype.onMouseDown_=function(e){Blockly.isRightButton(e)?Blockly.Touch.clearTouchIdentifier():(Blockly.hideChaff(!0),this.dragMode_=Blockly.DRAG_FREE,this.startDragMouseY_=e.clientY,this.startDragMouseX_=e.clientX,Blockly.Flyout.startFlyout_=this,Blockly.Flyout.onMouseMoveWrapper_=Blockly.bindEventWithChecks_(document,"mousemove",this,this.onMouseMove_),Blockly.Flyout.onMouseUpWrapper_=Blockly.bindEventWithChecks_(document,"mouseup",this,Blockly.Flyout.terminateDrag_),e.preventDefault(),e.stopPropagation())},Blockly.Flyout.prototype.onMouseUp_=function(e){this.workspace_.isDragging()||(Blockly.Touch.clearTouchIdentifier(),this.autoClose?this.createBlockFunc_(Blockly.Flyout.startBlock_)(Blockly.Flyout.startDownEvent_):Blockly.WidgetDiv.isVisible()||Blockly.Events.fire(new Blockly.Events.Ui(Blockly.Flyout.startBlock_,"click",void 0,void 0))),Blockly.terminateDrag_()},Blockly.Flyout.prototype.onMouseMove_=function(e){var o=this.getMetrics_();if(this.horizontalLayout_){if(!(0>o.contentWidth-o.viewWidth)){var t=e.clientX-this.startDragMouseX_;this.startDragMouseX_=e.clientX,e=o.viewLeft-t,e=goog.math.clamp(e,0,o.contentWidth-o.viewWidth),this.scrollbar_.set(e)}}else 0>o.contentHeight-o.viewHeight||(t=e.clientY-this.startDragMouseY_,this.startDragMouseY_=e.clientY,e=o.viewTop-t,e=goog.math.clamp(e,0,o.contentHeight-o.viewHeight),this.scrollbar_.set(e))},Blockly.Flyout.prototype.onMouseMoveBlock_=function(e){"mousemove"==e.type&&1>=e.clientX&&0==e.clientY&&0==e.button||(this.determineDragIntention_(e.clientX-Blockly.Flyout.startDownEvent_.clientX,e.clientY-Blockly.Flyout.startDownEvent_.clientY)?(Blockly.longStop_(),this.createBlockFunc_(Blockly.Flyout.startBlock_)(Blockly.Flyout.startDownEvent_)):this.dragMode_==Blockly.DRAG_FREE&&(Blockly.longStop_(),this.onMouseMove_(e))),e.stopPropagation()},Blockly.Flyout.prototype.determineDragIntention_=function(e,o){return this.dragMode_==Blockly.DRAG_FREE?!1:Math.sqrt(e*e+o*o)<this.DRAG_RADIUS?(this.dragMode_=Blockly.DRAG_STICKY,!1):this.isDragTowardWorkspace_(e,o)||!this.scrollbar_.isVisible()?!0:(this.dragMode_=Blockly.DRAG_FREE,!1)},Blockly.Flyout.prototype.isDragTowardWorkspace_=function(e,o){var t=Math.atan2(o,e)/Math.PI*180,n=this.dragAngleRange_;if(this.horizontalLayout_){if(90+n>t&&t>90-n||t>-90-n&&-90+n>t)return!0}else if(n>t&&t>-n||-180+n>t||t>180-n)return!0;return!1},Blockly.Flyout.prototype.createBlockFunc_=function(e){var o=this;return function(t){if(!Blockly.isRightButton(t)&&!e.disabled){Blockly.Events.disable();try{var n=o.placeNewBlock_(e)}finally{Blockly.Events.enable()}Blockly.Events.isEnabled()&&(Blockly.Events.setGroup(!0),Blockly.Events.fire(new Blockly.Events.Create(n))),o.autoClose?o.hide():o.filterForCapacity_(),n.onMouseDown_(t),Blockly.dragMode_=Blockly.DRAG_FREE,n.setDragging_(!0),o.targetWorkspace_.setResizesEnabled(!1)}}},Blockly.Flyout.prototype.placeNewBlock_=function(e){var o=this.targetWorkspace_,t=e.getSvgRoot();if(!t)throw"originBlock is not rendered.";var t=Blockly.getSvgXY_(t,o),n=this.workspace_.scrollX,r=this.workspace_.scale;if(t.x+=n/r-n,this.toolboxPosition_==Blockly.TOOLBOX_AT_RIGHT&&(n=o.getMetrics().viewWidth-this.width_,r=o.scale,t.x+=n/r-n),n=this.workspace_.scrollY,r=this.workspace_.scale,t.y+=n/r-n,
+this.toolboxPosition_==Blockly.TOOLBOX_AT_BOTTOM&&(n=o.getMetrics().viewHeight-this.height_,r=o.scale,t.y+=n/r-n),e=Blockly.Xml.blockToDom(e),e=Blockly.Xml.domToBlock(e,o),r=e.getSvgRoot(),!r)throw"block is not rendered.";return r=Blockly.getSvgXY_(r,o),r.x+=o.scrollX/o.scale-o.scrollX,r.y+=o.scrollY/o.scale-o.scrollY,o.toolbox_&&!o.scrollbar&&(r.x+=o.toolbox_.getWidth()/o.scale,r.y+=o.toolbox_.getHeight()/o.scale),e.moveBy(t.x-r.x,t.y-r.y),e},Blockly.Flyout.prototype.filterForCapacity_=function(){for(var e,o=this.targetWorkspace_.remainingCapacity(),t=this.workspace_.getTopBlocks(!1),n=0;e=t[n];n++)if(-1==this.permanentlyDisabled_.indexOf(e)){var r=e.getDescendants();e.setDisabled(r.length>o)}},Blockly.Flyout.prototype.getClientRect=function(){if(!this.svgGroup_)return null;var e=this.svgGroup_.getBoundingClientRect(),o=e.left,t=e.top,n=e.width,e=e.height;return this.toolboxPosition_==Blockly.TOOLBOX_AT_TOP?new goog.math.Rect(-1e9,t-1e9,2e9,1e9+e):this.toolboxPosition_==Blockly.TOOLBOX_AT_BOTTOM?new goog.math.Rect(-1e9,t,2e9,1e9+e):this.toolboxPosition_==Blockly.TOOLBOX_AT_LEFT?new goog.math.Rect(o-1e9,-1e9,1e9+n,2e9):new goog.math.Rect(o,-1e9,1e9+n,2e9)},Blockly.Flyout.terminateDrag_=function(){Blockly.Flyout.startFlyout_&&(Blockly.Flyout.startFlyout_.dragMode_==Blockly.DRAG_FREE&&Blockly.Touch.clearTouchIdentifier(),Blockly.Flyout.startFlyout_.dragMode_=Blockly.DRAG_NONE,Blockly.Flyout.startFlyout_=null),Blockly.Flyout.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseUpWrapper_),Blockly.Flyout.onMouseUpWrapper_=null),Blockly.Flyout.onMouseMoveBlockWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseMoveBlockWrapper_),Blockly.Flyout.onMouseMoveBlockWrapper_=null),Blockly.Flyout.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseMoveWrapper_),Blockly.Flyout.onMouseMoveWrapper_=null),Blockly.Flyout.startDownEvent_=null,Blockly.Flyout.startBlock_=null},Blockly.Flyout.prototype.reflowHorizontal=function(e){this.workspace_.scale=this.targetWorkspace_.scale;for(var o,t=0,n=0;o=e[n];n++)t=Math.max(t,o.getHeightWidth().height);if(t+=1.5*this.MARGIN,t*=this.workspace_.scale,t+=Blockly.Scrollbar.scrollbarThickness,this.height_!=t){for(n=0;o=e[n];n++){var r=o.getHeightWidth();if(o.flyoutRect_){o.flyoutRect_.setAttribute("width",r.width),o.flyoutRect_.setAttribute("height",r.height);var i=o.outputConnection?Blockly.BlockSvg.TAB_WIDTH:0,s=o.getRelativeToSurfaceXY();o.flyoutRect_.setAttribute("y",s.y),o.flyoutRect_.setAttribute("x",this.RTL?s.x-r.width+i:s.x-i),(r=o.startHat_?Blockly.BlockSvg.START_HAT_HEIGHT:0)&&o.moveBy(0,r),o.flyoutRect_.setAttribute("y",s.y)}}this.height_=t,this.targetWorkspace_.resize()}},Blockly.Flyout.prototype.reflowVertical=function(e){this.workspace_.scale=this.targetWorkspace_.scale;for(var o,t=0,n=0;o=e[n];n++){var r=o.getHeightWidth().width;o.outputConnection&&(r-=Blockly.BlockSvg.TAB_WIDTH),t=Math.max(t,r)}for(n=0;o=this.buttons_[n];n++)t=Math.max(t,o.width);if(t+=1.5*this.MARGIN+Blockly.BlockSvg.TAB_WIDTH,t*=this.workspace_.scale,t+=Blockly.Scrollbar.scrollbarThickness,this.width_!=t){for(n=0;o=e[n];n++){if(r=o.getHeightWidth(),this.RTL){var i=o.getRelativeToSurfaceXY().x,s=t/this.workspace_.scale-this.MARGIN,s=s-Blockly.BlockSvg.TAB_WIDTH;o.moveBy(s-i,0)}o.flyoutRect_&&(o.flyoutRect_.setAttribute("width",r.width),o.flyoutRect_.setAttribute("height",r.height),s=o.outputConnection?Blockly.BlockSvg.TAB_WIDTH:0,i=o.getRelativeToSurfaceXY(),o.flyoutRect_.setAttribute("x",this.RTL?i.x-r.width+s:i.x-s),(r=o.startHat_?Blockly.BlockSvg.START_HAT_HEIGHT:0)&&o.moveBy(0,r),o.flyoutRect_.setAttribute("y",i.y))}this.width_=t,this.targetWorkspace_.resize()}},Blockly.Flyout.prototype.reflow=function(){this.reflowWrapper_&&this.workspace_.removeChangeListener(this.reflowWrapper_);var e=this.workspace_.getTopBlocks(!1);this.horizontalLayout_?this.reflowHorizontal(e):this.reflowVertical(e),this.reflowWrapper_&&this.workspace_.addChangeListener(this.reflowWrapper_)},Blockly.Toolbox=function(e){this.workspace_=e,this.RTL=e.options.RTL,this.horizontalLayout_=e.options.horizontalLayout,this.toolboxPosition=e.options.toolboxPosition,this.config_={indentWidth:19,cssRoot:"blocklyTreeRoot",cssHideRoot:"blocklyHidden",cssItem:"",cssTreeRow:"blocklyTreeRow",cssItemLabel:"blocklyTreeLabel",cssTreeIcon:"blocklyTreeIcon",cssExpandedFolderIcon:"blocklyTreeIconOpen",cssFileIcon:"blocklyTreeIconNone",cssSelectedRow:"blocklyTreeSelected"},this.treeSeparatorConfig_={cssTreeRow:"blocklyTreeSeparator"},this.horizontalLayout_&&(this.config_.cssTreeRow+=e.RTL?" blocklyHorizontalTreeRtl":" blocklyHorizontalTree",this.treeSeparatorConfig_.cssTreeRow="blocklyTreeSeparatorHorizontal "+(e.RTL?"blocklyHorizontalTreeRtl":"blocklyHorizontalTree"),this.config_.cssTreeIcon="")},Blockly.Toolbox.prototype.width=0,Blockly.Toolbox.prototype.height=0,Blockly.Toolbox.prototype.selectedOption_=null,Blockly.Toolbox.prototype.lastCategory_=null,Blockly.Toolbox.prototype.init=function(){var e=this.workspace_,o=this.workspace_.getParentSvg();this.HtmlDiv=goog.dom.createDom("DIV","blocklyToolboxDiv"),this.HtmlDiv.setAttribute("dir",e.RTL?"RTL":"LTR"),o.parentNode.insertBefore(this.HtmlDiv,o),Blockly.bindEventWithChecks_(this.HtmlDiv,"mousedown",this,function(e){Blockly.isRightButton(e)||e.target==this.HtmlDiv?Blockly.hideChaff(!1):Blockly.hideChaff(!0),Blockly.Touch.clearTouchIdentifier()}),this.flyout_=new Blockly.Flyout({disabledPatternId:e.options.disabledPatternId,parentWorkspace:e,RTL:e.RTL,oneBasedIndex:e.options.oneBasedIndex,horizontalLayout:e.horizontalLayout,toolboxPosition:e.options.toolboxPosition}),goog.dom.insertSiblingAfter(this.flyout_.createDom(),e.svgGroup_),this.flyout_.init(e),this.config_.cleardotPath=e.options.pathToMedia+"1x1.gif",this.config_.cssCollapsedFolderIcon="blocklyTreeIconClosed"+(e.RTL?"Rtl":"Ltr"),this.tree_=o=new Blockly.Toolbox.TreeControl(this,this.config_),o.setShowRootNode(!1),o.setShowLines(!1),o.setShowExpandIcons(!1),o.setSelectedItem(null),e=this.populate_(e.options.languageTree),o.render(this.HtmlDiv),e&&o.setSelectedItem(e),this.addColour_(),this.position()},Blockly.Toolbox.prototype.dispose=function(){this.flyout_.dispose(),this.tree_.dispose(),goog.dom.removeNode(this.HtmlDiv),this.lastCategory_=this.workspace_=null},Blockly.Toolbox.prototype.getWidth=function(){return this.width},Blockly.Toolbox.prototype.getHeight=function(){return this.height},Blockly.Toolbox.prototype.position=function(){var e=this.HtmlDiv;if(e){var o=this.workspace_.getParentSvg();goog.style.getPageOffset(o),o=Blockly.svgSize(o),this.horizontalLayout_?(e.style.left="0",e.style.height="auto",e.style.width=o.width+"px",this.height=e.offsetHeight,this.toolboxPosition==Blockly.TOOLBOX_AT_TOP?e.style.top="0":e.style.bottom="0"):(this.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT?e.style.right="0":e.style.left="0",e.style.height=o.height+"px",this.width=e.offsetWidth),this.flyout_.position()}},Blockly.Toolbox.prototype.populate_=function(e){if(this.tree_.removeChildren(),this.tree_.blocks=[],this.hasColours_=!1,e=this.syncTrees_(e,this.tree_,this.workspace_.options.pathToMedia),this.tree_.blocks.length)throw"Toolbox cannot have both blocks and categories in the root level.";return this.workspace_.resizeContents(),e},Blockly.Toolbox.prototype.syncTrees_=function(e,o,t){for(var n,r=null,i=null,s=0;n=e.childNodes[s];s++)if(n.tagName)switch(n.tagName.toUpperCase()){case"CATEGORY":i=this.tree_.createNode(n.getAttribute("name")),i.blocks=[],o.add(i);var l=n.getAttribute("custom");l?i.blocks=l:(l=this.syncTrees_(n,i,t))&&(r=l),l=n.getAttribute("colour"),goog.isString(l)?(l.match(/^#[0-9a-fA-F]{6}$/)?i.hexColour=l:i.hexColour=Blockly.hueToRgb(l),this.hasColours_=!0):i.hexColour="","true"==n.getAttribute("expanded")?(i.blocks.length&&(r=i),i.setExpanded(!0)):i.setExpanded(!1),i=n;break;case"SEP":i&&("CATEGORY"==i.tagName.toUpperCase()?o.add(new Blockly.Toolbox.TreeSeparator(this.treeSeparatorConfig_)):(n=parseFloat(n.getAttribute("gap")),!isNaN(n)&&i&&i.setAttribute("gap",n)));break;case"BLOCK":case"SHADOW":case"LABEL":case"BUTTON":o.blocks.push(n),i=n}return r},Blockly.Toolbox.prototype.addColour_=function(e){e=(e||this.tree_).getChildren();for(var o,t=0;o=e[t];t++){var n=o.getRowElement();if(n){var r=this.hasColours_?"8px solid "+(o.hexColour||"#ddd"):"none";this.workspace_.RTL?n.style.borderRight=r:n.style.borderLeft=r}this.addColour_(o)}},Blockly.Toolbox.prototype.clearSelection=function(){this.tree_.setSelectedItem(null)},Blockly.Toolbox.prototype.getClientRect=function(){if(!this.HtmlDiv)return null;var e=this.HtmlDiv.getBoundingClientRect(),o=e.left,t=e.top,n=e.width,e=e.height;return this.toolboxPosition==Blockly.TOOLBOX_AT_LEFT?new goog.math.Rect(-1e7,-1e7,1e7+o+n,2e7):this.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT?new goog.math.Rect(o,-1e7,1e7+n,2e7):this.toolboxPosition==Blockly.TOOLBOX_AT_TOP?new goog.math.Rect(-1e7,-1e7,2e7,1e7+t+e):new goog.math.Rect(0,t,2e7,1e7+n)},Blockly.Toolbox.prototype.refreshSelection=function(){var e=this.tree_.getSelectedItem();e&&e.blocks&&this.flyout_.show(e.blocks)},Blockly.Toolbox.TreeControl=function(e,o){this.toolbox_=e,goog.ui.tree.TreeControl.call(this,goog.html.SafeHtml.EMPTY,o)},goog.inherits(Blockly.Toolbox.TreeControl,goog.ui.tree.TreeControl),Blockly.Toolbox.TreeControl.prototype.enterDocument=function(){Blockly.Toolbox.TreeControl.superClass_.enterDocument.call(this);var e=this.getElement();goog.events.BrowserFeature.TOUCH_ENABLED&&Blockly.bindEventWithChecks_(e,goog.events.EventType.TOUCHSTART,this,this.handleTouchEvent_)},Blockly.Toolbox.TreeControl.prototype.handleTouchEvent_=function(e){e.preventDefault();var o=this.getNodeFromEvent_(e);o&&e.type===goog.events.EventType.TOUCHSTART&&setTimeout(function(){o.onMouseDown(e)},1)},Blockly.Toolbox.TreeControl.prototype.createNode=function(e){return new Blockly.Toolbox.TreeNode(this.toolbox_,e?goog.html.SafeHtml.htmlEscape(e):goog.html.SafeHtml.EMPTY,this.getConfig(),this.getDomHelper())},Blockly.Toolbox.TreeControl.prototype.setSelectedItem=function(e){var o=this.toolbox_;if(e!=this.selectedItem_&&e!=o.tree_){if(o.lastCategory_&&(o.lastCategory_.getRowElement().style.backgroundColor=""),e){var t=e.hexColour||"#57e";e.getRowElement().style.backgroundColor=t,o.addColour_(e)}t=this.getSelectedItem(),goog.ui.tree.TreeControl.prototype.setSelectedItem.call(this,e),e&&e.blocks&&e.blocks.length?(o.flyout_.show(e.blocks),o.lastCategory_!=e&&o.flyout_.scrollToStart()):o.flyout_.hide(),t!=e&&t!=this&&(t=new Blockly.Events.Ui(null,"category",t&&t.getHtml(),e&&e.getHtml()),t.workspaceId=o.workspace_.id,Blockly.Events.fire(t)),e&&(o.lastCategory_=e)}},Blockly.Toolbox.TreeNode=function(e,o,t,n){goog.ui.tree.TreeNode.call(this,o,t,n),e&&(o=function(){Blockly.svgResize(e.workspace_)},goog.events.listen(e.tree_,goog.ui.tree.BaseNode.EventType.EXPAND,o),goog.events.listen(e.tree_,goog.ui.tree.BaseNode.EventType.COLLAPSE,o))},goog.inherits(Blockly.Toolbox.TreeNode,goog.ui.tree.TreeNode),Blockly.Toolbox.TreeNode.prototype.getExpandIconSafeHtml=function(){return goog.html.SafeHtml.create("span")},Blockly.Toolbox.TreeNode.prototype.onMouseDown=function(e){this.hasChildren()&&this.isUserCollapsible_?(this.toggle(),this.select()):this.isSelected()?this.getTree().setSelectedItem(null):this.select(),this.updateRow()},Blockly.Toolbox.TreeNode.prototype.onDoubleClick_=function(e){},Blockly.Toolbox.TreeNode.prototype.onKeyDown=function(e){if(this.tree.toolbox_.horizontalLayout_){var o={},t=goog.events.KeyCodes.DOWN,n=goog.events.KeyCodes.UP;o[goog.events.KeyCodes.RIGHT]=this.rightToLeft_?n:t,o[goog.events.KeyCodes.LEFT]=this.rightToLeft_?t:n,o[goog.events.KeyCodes.UP]=goog.events.KeyCodes.LEFT,o[goog.events.KeyCodes.DOWN]=goog.events.KeyCodes.RIGHT,e.keyCode=o[e.keyCode]||e.keyCode}return Blockly.Toolbox.TreeNode.superClass_.onKeyDown.call(this,e)},Blockly.Toolbox.TreeSeparator=function(e){Blockly.Toolbox.TreeNode.call(this,null,"",e)},goog.inherits(Blockly.Toolbox.TreeSeparator,Blockly.Toolbox.TreeNode),Blockly.Css={},Blockly.Css.Cursor={OPEN:"handopen",CLOSED:"handclosed",DELETE:"handdelete"},Blockly.Css.currentCursor_="",Blockly.Css.styleSheet_=null,Blockly.Css.mediaPath_="",Blockly.Css.inject=function(e,o){if(!Blockly.Css.styleSheet_){var t=".blocklyDraggable {}\n";e&&(t+=Blockly.Css.CONTENT.join("\n"),Blockly.FieldDate&&(t+=Blockly.FieldDate.CSS.join("\n"))),Blockly.Css.mediaPath_=o.replace(/[\\\/]$/,"");var t=t.replace(/<<<PATH>>>/g,Blockly.Css.mediaPath_),n=document.createElement("style");document.head.insertBefore(n,document.head.firstChild),t=document.createTextNode(t),n.appendChild(t),Blockly.Css.styleSheet_=n.sheet,Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN)}},Blockly.Css.setCursor=function(e){if(Blockly.Css.currentCursor_!=e){Blockly.Css.currentCursor_=e;var o="url("+Blockly.Css.mediaPath_+"/"+e+".cur), auto",t=".blocklyDraggable {\n  cursor: "+o+";\n}\n";Blockly.Css.styleSheet_.deleteRule(0),Blockly.Css.styleSheet_.insertRule(t,0);for(var n,t=document.getElementsByClassName("blocklyToolboxDiv"),r=0;n=t[r];r++)n.style.cursor=e==Blockly.Css.Cursor.DELETE?o:"";document.body.parentNode.style.cursor=e==Blockly.Css.Cursor.OPEN?"":o}},Blockly.Css.CONTENT=[".blocklySvg {","background-color: #fff;","outline: none;","overflow: hidden;","display: block;","}",".blocklyWidgetDiv {","display: none;","position: absolute;","z-index: 99999;","}",".injectionDiv {","height: 100%;","position: relative;","}",".blocklyNonSelectable {","user-select: none;","-moz-user-select: none;","-webkit-user-select: none;","-ms-user-select: none;","}",".blocklyTooltipDiv {","background-color: #ffffc7;","border: 1px solid #ddc;","box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);","color: #000;","display: none;","font-family: sans-serif;","font-size: 9pt;","opacity: 0.9;","padding: 2px;","position: absolute;","z-index: 100000;","}",".blocklyResizeSE {","cursor: se-resize;","fill: #aaa;","}",".blocklyResizeSW {","cursor: sw-resize;","fill: #aaa;","}",".blocklyResizeLine {","stroke: #888;","stroke-width: 1;","}",".blocklyHighlightedConnectionPath {","fill: none;","stroke: #fc3;","stroke-width: 4px;","}",".blocklyPathLight {","fill: none;","stroke-linecap: round;","stroke-width: 1;","}",".blocklySelected>.blocklyPath {","stroke: #fc3;","stroke-width: 3px;","}",".blocklySelected>.blocklyPathLight {","display: none;","}",".blocklyDragging>.blocklyPath,",".blocklyDragging>.blocklyPathLight {","fill-opacity: .8;","stroke-opacity: .8;","}",".blocklyDragging>.blocklyPathDark {","display: none;","}",".blocklyDisabled>.blocklyPath {","fill-opacity: .5;","stroke-opacity: .5;","}",".blocklyDisabled>.blocklyPathLight,",".blocklyDisabled>.blocklyPathDark {","display: none;","}",".blocklyText {","cursor: default;","fill: #fff;","font-family: sans-serif;","font-size: 11pt;","}",".blocklyNonEditableText>text {","pointer-events: none;","}",".blocklyNonEditableText>rect,",".blocklyEditableText>rect {","fill: #fff;","fill-opacity: .6;","}",".blocklyNonEditableText>text,",".blocklyEditableText>text {","fill: #000;","}",".blocklyEditableText:hover>rect {","stroke: #fff;","stroke-width: 2;","}",".blocklyBubbleText {","fill: #000;","}",".blocklyFlyoutButton {","fill: #888;","cursor: default;","}",".blocklyFlyoutButtonShadow {","fill: #666;","}",".blocklyFlyoutButton:hover {","fill: #aaa;","}",".blocklyFlyoutLabel {","cursor: default;","}",".blocklyFlyoutLabelBackground {","opacity: 0;","}",".blocklyFlyoutLabelText {","fill: #000;","}",".blocklyFlyoutLabelText:hover {","fill: #aaa;","}",".blocklySvg text {","user-select: none;","-moz-user-select: none;","-webkit-user-select: none;","cursor: inherit;","}",".blocklyHidden {","display: none;","}",".blocklyFieldDropdown:not(.blocklyHidden) {","display: block;","}",".blocklyIconGroup {","cursor: default;","}",".blocklyIconGroup:not(:hover),",".blocklyIconGroupReadonly {","opacity: .6;","}",".blocklyIconShape {","fill: #00f;","stroke: #fff;","stroke-width: 1px;","}",".blocklyIconSymbol {","fill: #fff;","}",".blocklyMinimalBody {","margin: 0;","padding: 0;","}",".blocklyCommentTextarea {","background-color: #ffc;","border: 0;","margin: 0;","padding: 2px;","resize: none;","}",".blocklyHtmlInput {","border: none;","border-radius: 4px;","font-family: sans-serif;","height: 100%;","margin: 0;","outline: none;","padding: 0 1px;","width: 100%","}",".blocklyMainBackground {","stroke-width: 1;","stroke: #c6c6c6;","}",".blocklyMutatorBackground {","fill: #fff;","stroke: #ddd;","stroke-width: 1;","}",".blocklyFlyoutBackground {","fill: #ddd;","fill-opacity: .8;","}",".blocklyScrollbarBackground {","opacity: 0;","}",".blocklyScrollbarHandle {","fill: #ccc;","}",".blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,",".blocklyScrollbarHandle:hover {","fill: #bbb;","}",".blocklyZoom>image {","opacity: .4;","}",".blocklyZoom>image:hover {","opacity: .6;","}",".blocklyZoom>image:active {","opacity: .8;","}",".blocklyFlyout .blocklyScrollbarHandle {","fill: #bbb;","}",".blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,",".blocklyFlyout .blocklyScrollbarHandle:hover {","fill: #aaa;","}",".blocklyInvalidInput {","background: #faa;","}",".blocklyAngleCircle {","stroke: #444;","stroke-width: 1;","fill: #ddd;","fill-opacity: .8;","}",".blocklyAngleMarks {","stroke: #444;","stroke-width: 1;","}",".blocklyAngleGauge {","fill: #f88;","fill-opacity: .8;","}",".blocklyAngleLine {","stroke: #f00;","stroke-width: 2;","stroke-linecap: round;","}",".blocklyContextMenu {","border-radius: 4px;","}",".blocklyDropdownMenu {","padding: 0 !important;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {","background: url(<<<PATH>>>/sprites.png) no-repeat -48px -16px !important;","}",".blocklyToolboxDiv {","background-color: #ddd;","overflow-x: visible;","overflow-y: auto;","position: absolute;","}",".blocklyTreeRoot {","padding: 4px 0;","}",".blocklyTreeRoot:focus {","outline: none;","}",".blocklyTreeRow {","height: 22px;","line-height: 22px;","margin-bottom: 3px;","padding-right: 8px;","white-space: nowrap;","}",".blocklyHorizontalTree {","float: left;","margin: 1px 5px 8px 0;","}",".blocklyHorizontalTreeRtl {","float: right;","margin: 1px 0 8px 5px;","}",'.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {',"margin-left: 8px;","}",".blocklyTreeRow:not(.blocklyTreeSelected):hover {","background-color: #e4e4e4;","}",".blocklyTreeSeparator {","border-bottom: solid #e5e5e5 1px;","height: 0;","margin: 5px 0;","}",".blocklyTreeSeparatorHorizontal {","border-right: solid #e5e5e5 1px;","width: 0;","padding: 5px 0;","margin: 0 5px;","}",".blocklyTreeIcon {","background-image: url(<<<PATH>>>/sprites.png);","height: 16px;","vertical-align: middle;","width: 16px;","}",".blocklyTreeIconClosedLtr {","background-position: -32px -1px;","}",".blocklyTreeIconClosedRtl {","background-position: 0px -1px;","}",".blocklyTreeIconOpen {","background-position: -16px -1px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedLtr {","background-position: -32px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedRtl {","background-position: 0px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconOpen {","background-position: -16px -17px;","}",".blocklyTreeIconNone,",".blocklyTreeSelected>.blocklyTreeIconNone {","background-position: -48px -1px;","}",".blocklyTreeLabel {","cursor: default;","font-family: sans-serif;","font-size: 16px;","padding: 0 3px;","vertical-align: middle;","}",".blocklyTreeSelected .blocklyTreeLabel {","color: #fff;","}",".blocklyWidgetDiv .goog-palette {","outline: none;","cursor: default;","}",".blocklyWidgetDiv .goog-palette-table {","border: 1px solid #666;","border-collapse: collapse;","}",".blocklyWidgetDiv .goog-palette-cell {","height: 13px;","width: 15px;","margin: 0;","border: 0;","text-align: center;","vertical-align: middle;","border-right: 1px solid #666;","font-size: 1px;","}",".blocklyWidgetDiv .goog-palette-colorswatch {","position: relative;","height: 13px;","width: 15px;","border: 1px solid #666;","}",".blocklyWidgetDiv .goog-palette-cell-hover .goog-palette-colorswatch {","border: 1px solid #FFF;","}",".blocklyWidgetDiv .goog-palette-cell-selected .goog-palette-colorswatch {","border: 1px solid #000;","color: #fff;","}",".blocklyWidgetDiv .goog-menu {","background: #fff;","border-color: #ccc #666 #666 #ccc;","border-style: solid;","border-width: 1px;","cursor: default;","font: normal 13px Arial, sans-serif;","margin: 0;","outline: none;","padding: 4px 0;","position: absolute;","overflow-y: auto;","overflow-x: hidden;","max-height: 100%;","z-index: 20000;","}",".blocklyWidgetDiv .goog-menuitem {","color: #000;","font: normal 13px Arial, sans-serif;","list-style: none;","margin: 0;","padding: 4px 7em 4px 28px;","white-space: nowrap;","}",".blocklyWidgetDiv .goog-menuitem.goog-menuitem-rtl {","padding-left: 7em;","padding-right: 28px;","}",".blocklyWidgetDiv .goog-menu-nocheckbox .goog-menuitem,",".blocklyWidgetDiv .goog-menu-noicon .goog-menuitem {","padding-left: 12px;","}",".blocklyWidgetDiv .goog-menu-noaccel .goog-menuitem {","padding-right: 20px;","}",".blocklyWidgetDiv .goog-menuitem-content {","color: #000;","font: normal 13px Arial, sans-serif;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-accel,",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-content {","color: #ccc !important;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-icon {","opacity: 0.3;","-moz-opacity: 0.3;","filter: alpha(opacity=30);","}",".blocklyWidgetDiv .goog-menuitem-highlight,",".blocklyWidgetDiv .goog-menuitem-hover {","background-color: #d6e9f8;","border-color: #d6e9f8;","border-style: dotted;","border-width: 1px 0;","padding-bottom: 3px;","padding-top: 3px;","}",".blocklyWidgetDiv .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-icon {","background-repeat: no-repeat;","height: 16px;","left: 6px;","position: absolute;","right: auto;","vertical-align: middle;","width: 16px;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon {","left: auto;","right: 6px;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {","background: url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat -512px 0;","}",".blocklyWidgetDiv .goog-menuitem-accel {","color: #999;","direction: ltr;","left: auto;","padding: 0 6px;","position: absolute;","right: 0;","text-align: right;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-accel {","left: 0;","right: auto;","text-align: left;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-hint {","text-decoration: underline;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-separator {","color: #999;","font-size: 12px;","padding-left: 4px;","}",".blocklyWidgetDiv .goog-menuseparator {","border-top: 1px solid #ccc;","margin: 4px 0;","padding: 0;","}",""],Blockly.WidgetDiv={},Blockly.WidgetDiv.DIV=null,Blockly.WidgetDiv.owner_=null,Blockly.WidgetDiv.dispose_=null,Blockly.WidgetDiv.createDom=function(){Blockly.WidgetDiv.DIV||(Blockly.WidgetDiv.DIV=goog.dom.createDom("DIV","blocklyWidgetDiv"),document.body.appendChild(Blockly.WidgetDiv.DIV))},Blockly.WidgetDiv.show=function(e,o,t){Blockly.WidgetDiv.hide(),Blockly.WidgetDiv.owner_=e,Blockly.WidgetDiv.dispose_=t,e=goog.style.getViewportPageOffset(document),Blockly.WidgetDiv.DIV.style.top=e.y+"px",Blockly.WidgetDiv.DIV.style.direction=o?"rtl":"ltr",Blockly.WidgetDiv.DIV.style.display="block"},Blockly.WidgetDiv.hide=function(){Blockly.WidgetDiv.owner_&&(Blockly.WidgetDiv.owner_=null,Blockly.WidgetDiv.DIV.style.display="none",Blockly.WidgetDiv.DIV.style.left="",Blockly.WidgetDiv.DIV.style.top="",Blockly.WidgetDiv.dispose_&&Blockly.WidgetDiv.dispose_(),Blockly.WidgetDiv.dispose_=null,goog.dom.removeChildren(Blockly.WidgetDiv.DIV))},Blockly.WidgetDiv.isVisible=function(){return!!Blockly.WidgetDiv.owner_},Blockly.WidgetDiv.hideIfOwner=function(e){Blockly.WidgetDiv.owner_==e&&Blockly.WidgetDiv.hide()},Blockly.WidgetDiv.position=function(e,o,t,n,r){o<n.y&&(o=n.y),r?e>t.width+n.x&&(e=t.width+n.x):e<n.x&&(e=n.x),Blockly.WidgetDiv.DIV.style.left=e+"px",Blockly.WidgetDiv.DIV.style.top=o+"px",Blockly.WidgetDiv.DIV.style.height=t.height+"px"},Blockly.inject=function(e,o){if(goog.isString(e)&&(e=document.getElementById(e)||document.querySelector(e)),!goog.dom.contains(document,e))throw"Error: container is not in current document.";var t=new Blockly.Options(o||{}),n=goog.dom.createDom("div","injectionDiv");return e.appendChild(n),n=Blockly.createDom_(n,t),t=Blockly.createMainWorkspace_(n,t),Blockly.init_(t),t.markFocused(),Blockly.bindEventWithChecks_(n,"focus",t,t.markFocused),Blockly.svgResize(t),t},Blockly.createDom_=function(e,o){e.setAttribute("dir","LTR"),goog.ui.Component.setDefaultRightToLeft(o.RTL),Blockly.Css.inject(o.hasCss,o.pathToMedia);var t=Blockly.createSvgElement("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:html":"http://www.w3.org/1999/xhtml","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1","class":"blocklySvg"},e),n=Blockly.createSvgElement("defs",{},t),r=String(Math.random()).substring(2),i=Blockly.createSvgElement("filter",{id:"blocklyEmbossFilter"+r},n);Blockly.createSvgElement("feGaussianBlur",{"in":"SourceAlpha",stdDeviation:1,result:"blur"},i);var s=Blockly.createSvgElement("feSpecularLighting",{"in":"blur",surfaceScale:1,specularConstant:.5,specularExponent:10,"lighting-color":"white",result:"specOut"},i);return Blockly.createSvgElement("fePointLight",{x:-5e3,y:-1e4,z:2e4},s),Blockly.createSvgElement("feComposite",{"in":"specOut",in2:"SourceAlpha",operator:"in",result:"specOut"},i),Blockly.createSvgElement("feComposite",{"in":"SourceGraphic",in2:"specOut",operator:"arithmetic",k1:0,k2:1,k3:1,k4:0},i),o.embossFilterId=i.id,i=Blockly.createSvgElement("pattern",{id:"blocklyDisabledPattern"+r,patternUnits:"userSpaceOnUse",width:10,height:10},n),Blockly.createSvgElement("rect",{width:10,height:10,fill:"#aaa"},i),Blockly.createSvgElement("path",{d:"M 0 0 L 10 10 M 10 0 L 0 10",stroke:"#cc0"},i),o.disabledPatternId=i.id,n=Blockly.createSvgElement("pattern",{id:"blocklyGridPattern"+r,patternUnits:"userSpaceOnUse"},n),0<o.gridOptions.length&&0<o.gridOptions.spacing&&(Blockly.createSvgElement("line",{stroke:o.gridOptions.colour},n),1<o.gridOptions.length&&Blockly.createSvgElement("line",{stroke:o.gridOptions.colour},n)),o.gridPattern=n,t},Blockly.createMainWorkspace_=function(e,o){o.parentWorkspace=null;var t=new Blockly.WorkspaceSvg(o);return t.scale=o.zoomOptions.startScale,e.appendChild(t.createDom("blocklyMainBackground")),t.translate(0,0),t.markFocused(),o.readOnly||o.hasScrollbars||t.addChangeListener(function(){if(Blockly.dragMode_==Blockly.DRAG_NONE){var e=t.getMetrics(),n=e.viewLeft+e.absoluteLeft,r=e.viewTop+e.absoluteTop;if(e.contentTop<r||e.contentTop+e.contentHeight>e.viewHeight+r||e.contentLeft<(o.RTL?e.viewLeft:n)||e.contentLeft+e.contentWidth>(o.RTL?e.viewWidth:e.viewWidth+n))for(var i,s=t.getTopBlocks(!1),l=0;i=s[l];l++){var g=i.getRelativeToSurfaceXY(),a=i.getHeightWidth(),c=r+25-a.height-g.y;c>0&&i.moveBy(0,c),c=r+e.viewHeight-25-g.y,0>c&&i.moveBy(0,c),c=25+n-g.x-(o.RTL?0:a.width),c>0&&i.moveBy(c,0),g=n+e.viewWidth-25-g.x+(o.RTL?a.width:0),0>g&&i.moveBy(g,0)}}}),Blockly.svgResize(t),Blockly.WidgetDiv.createDom(),Blockly.Tooltip.createDom(),t},Blockly.init_=function(e){var o=e.options,t=e.getParentSvg();Blockly.bindEventWithChecks_(t,"contextmenu",null,function(e){Blockly.isTargetInput_(e)||e.preventDefault()}),t=Blockly.bindEventWithChecks_(window,"resize",null,function(){Blockly.hideChaff(!0),Blockly.svgResize(e)}),e.setResizeHandlerWrapper(t),Blockly.inject.bindDocumentEvents_(),o.languageTree&&(e.toolbox_?e.toolbox_.init(e):e.flyout_&&(e.flyout_.init(e),e.flyout_.show(o.languageTree.childNodes),e.flyout_.scrollToStart(),e.scrollX=e.flyout_.width_,o.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT&&(e.scrollX*=-1),e.translate(e.scrollX,0))),o.hasScrollbars&&(e.scrollbar=new Blockly.ScrollbarPair(e),e.scrollbar.resize()),o.hasSounds&&Blockly.inject.loadSounds_(o.pathToMedia,e)},Blockly.inject.bindDocumentEvents_=function(){Blockly.documentEventsBound_||(Blockly.bindEventWithChecks_(document,"keydown",null,Blockly.onKeyDown_),Blockly.bindEventWithChecks_(document,"touchend",null,Blockly.longStop_),Blockly.bindEventWithChecks_(document,"touchcancel",null,Blockly.longStop_),document.addEventListener("mouseup",Blockly.onMouseUp_,!1),goog.userAgent.IPAD&&Blockly.bindEventWithChecks_(window,"orientationchange",document,function(){Blockly.svgResize(Blockly.getMainWorkspace())})),Blockly.documentEventsBound_=!0},Blockly.inject.loadSounds_=function(e,o){o.loadAudio_([e+"click.mp3",e+"click.wav",e+"click.ogg"],"click"),o.loadAudio_([e+"disconnect.wav",e+"disconnect.mp3",e+"disconnect.ogg"],"disconnect"),o.loadAudio_([e+"delete.mp3",e+"delete.ogg",e+"delete.wav"],"delete");var t=[],n=function(){for(;t.length;)Blockly.unbindEvent_(t.pop());o.preloadAudio_()};t.push(Blockly.bindEventWithChecks_(document,"mousemove",null,n,!0)),t.push(Blockly.bindEventWithChecks_(document,"touchstart",null,n,!0))},Blockly.updateToolbox=function(e){console.warn("Deprecated call to Blockly.updateToolbox, use workspace.updateToolbox instead."),Blockly.getMainWorkspace().updateToolbox(e)},Blockly.utils={},Blockly.addClass_=function(e,o){var t=e.getAttribute("class")||"";-1==(" "+t+" ").indexOf(" "+o+" ")&&(t&&(t+=" "),e.setAttribute("class",t+o))},Blockly.removeClass_=function(e,o){var t=e.getAttribute("class");if(-1!=(" "+t+" ").indexOf(" "+o+" ")){for(var t=t.split(/\s+/),n=0;n<t.length;n++)t[n]&&t[n]!=o||(t.splice(n,1),n--);t.length?e.setAttribute("class",t.join(" ")):e.removeAttribute("class")}},Blockly.hasClass_=function(e,o){return-1!=(" "+e.getAttribute("class")+" ").indexOf(" "+o+" ")},Blockly.bindEventWithChecks_=function(e,o,t,n,r){var i=!1,s=function(e){var o=!r;e=Blockly.Touch.splitEventByTouches(e);for(var s,l=0;s=e[l];l++)(!o||Blockly.Touch.shouldHandleEvent(s))&&(Blockly.Touch.setClientFromTouch(s),t?n.call(t,s):n(s),i=!0)};e.addEventListener(o,s,!1);var l=[[e,o,s]];if(o in Blockly.Touch.TOUCH_MAP)for(var g,a=function(e){s(e),i&&e.preventDefault()},c=0;g=Blockly.Touch.TOUCH_MAP[o][c];c++)e.addEventListener(g,a,!1),l.push([e,g,a]);return l},Blockly.bindEvent_=function(e,o,t,n){var r=function(e){t?n.call(t,e):n(e)};e.addEventListener(o,r,!1);var i=[[e,o,r]];if(o in Blockly.Touch.TOUCH_MAP)for(var s,l=function(e){if(1==e.changedTouches.length){var o=e.changedTouches[0];e.clientX=o.clientX,e.clientY=o.clientY}r(e),e.preventDefault()},g=0;s=Blockly.Touch.TOUCH_MAP[o][g];g++)e.addEventListener(s,l,!1),i.push([e,s,l]);return i},Blockly.unbindEvent_=function(e){for(;e.length;){var o=e.pop(),t=o[2];o[0].removeEventListener(o[1],t,!1)}return t},Blockly.noEvent=function(e){e.preventDefault(),e.stopPropagation()},Blockly.isTargetInput_=function(e){return"textarea"==e.target.type||"text"==e.target.type||"number"==e.target.type||"email"==e.target.type||"password"==e.target.type||"search"==e.target.type||"tel"==e.target.type||"url"==e.target.type||e.target.isContentEditable},Blockly.getRelativeXY_=function(e){var o=new goog.math.Coordinate(0,0),t=e.getAttribute("x");return t&&(o.x=parseInt(t,10)),(t=e.getAttribute("y"))&&(o.y=parseInt(t,10)),(e=(e=e.getAttribute("transform"))&&e.match(Blockly.getRelativeXY_.XY_REGEXP_))&&(o.x+=parseFloat(e[1]),e[3]&&(o.y+=parseFloat(e[3]))),o},Blockly.getRelativeXY_.XY_REGEXP_=/translate\(\s*([-+\d.e]+)([ ,]\s*([-+\d.e]+)\s*\))?/,Blockly.getSvgXY_=function(e,o){var t=0,n=0,r=1;(goog.dom.contains(o.getCanvas(),e)||goog.dom.contains(o.getBubbleCanvas(),e))&&(r=o.scale);do{var i=Blockly.getRelativeXY_(e);(e==o.getCanvas()||e==o.getBubbleCanvas())&&(r=1),t+=i.x*r,n+=i.y*r,e=e.parentNode}while(e&&e!=o.getParentSvg());return new goog.math.Coordinate(t,n)},Blockly.createSvgElement=function(e,o,t,n){e=document.createElementNS(Blockly.SVG_NS,e);for(var r in o)e.setAttribute(r,o[r]);return document.body.runtimeStyle&&(e.runtimeStyle=e.currentStyle=e.style),
+t&&t.appendChild(e),e},Blockly.isRightButton=function(e){return e.ctrlKey&&goog.userAgent.MAC?!0:2==e.button},Blockly.mouseToSvg=function(e,o,t){var n=o.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,t||(t=o.getScreenCTM().inverse()),n.matrixTransform(t)},Blockly.shortestStringLength=function(e){if(!e.length)return 0;for(var o=e[0].length,t=1;t<e.length;t++)o=Math.min(o,e[t].length);return o},Blockly.commonWordPrefix=function(e,o){if(!e.length)return 0;if(1==e.length)return e[0].length;for(var t=0,n=o||Blockly.shortestStringLength(e),r=0;n>r;r++){for(var i=e[0][r],s=1;s<e.length;s++)if(i!=e[s][r])return t;" "==i&&(t=r+1)}for(s=1;s<e.length;s++)if((i=e[s][r])&&" "!=i)return t;return n},Blockly.commonWordSuffix=function(e,o){if(!e.length)return 0;if(1==e.length)return e[0].length;for(var t=0,n=o||Blockly.shortestStringLength(e),r=0;n>r;r++){for(var i=e[0].substr(-r-1,1),s=1;s<e.length;s++)if(i!=e[s].substr(-r-1,1))return t;" "==i&&(t=r+1)}for(s=1;s<e.length;s++)if((i=e[s].charAt(e[s].length-r-1))&&" "!=i)return t;return n},Blockly.isNumber=function(e){return!!e.match(/^\s*-?\d+(\.\d+)?\s*$/)},Blockly.utils.tokenizeInterpolation=function(e){var o=[];e=e.split(""),e.push("");for(var t=0,n=[],r=null,i=0;i<e.length;i++){var s=e[i];0==t?"%"==s?t=1:n.push(s):1==t?"%"==s?(n.push(s),t=0):s>="0"&&"9">=s?(t=2,r=s,(s=n.join(""))&&o.push(s),n.length=0):(n.push("%",s),t=0):2==t&&(s>="0"&&"9">=s?r+=s:(o.push(parseInt(r,10)),i--,t=0))}return(s=n.join(""))&&o.push(s),o},Blockly.genUid=function(){for(var e=Blockly.genUid.soup_.length,o=[],t=0;20>t;t++)o[t]=Blockly.genUid.soup_.charAt(Math.random()*e);return o.join("")},Blockly.genUid.soup_="!#$%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",Blockly.utils.wrap=function(e,o){for(var t=e.split("\n"),n=0;n<t.length;n++)t[n]=Blockly.utils.wrap_line_(t[n],o);return t.join("\n")},Blockly.utils.wrap_line_=function(e,o){if(e.length<=o)return e;for(var t=e.trim().split(/\s+/),n=0;n<t.length;n++)t[n].length>o&&(o=t[n].length);var r,i,n=-(1/0),s=1;do{r=n,i=e;for(var l=[],g=t.length/s,a=1,n=0;n<t.length-1;n++)(n+1.5)/g>a?(a++,l[n]=!0):l[n]=!1;l=Blockly.utils.wrapMutate_(t,l,o),n=Blockly.utils.wrapScore_(t,l,o),e=Blockly.utils.wrapToText_(t,l),s++}while(n>r);return i},Blockly.utils.wrapScore_=function(e,o,t){for(var n=[0],r=[],i=0;i<e.length;i++)n[n.length-1]+=e[i].length,!0===o[i]?(n.push(0),r.push(e[i].charAt(e[i].length-1))):!1===o[i]&&n[n.length-1]++;for(e=Math.max.apply(Math,n),i=o=0;i<n.length;i++)o-=2*Math.pow(Math.abs(t-n[i]),1.5),o-=Math.pow(e-n[i],1.5),-1!=".?!".indexOf(r[i])?o+=t/3:-1!=",;)]}".indexOf(r[i])&&(o+=t/4);return 1<n.length&&n[n.length-1]<=n[n.length-2]&&(o+=.5),o},Blockly.utils.wrapMutate_=function(e,o,t){for(var n,r=Blockly.utils.wrapScore_(e,o,t),i=0;i<o.length-1;i++)if(o[i]!=o[i+1]){var s=[].concat(o);s[i]=!s[i],s[i+1]=!s[i+1];var l=Blockly.utils.wrapScore_(e,s,t);l>r&&(r=l,n=s)}return n?Blockly.utils.wrapMutate_(e,n,t):o},Blockly.utils.wrapToText_=function(e,o){for(var t=[],n=0;n<e.length;n++)t.push(e[n]),void 0!==o[n]&&t.push(o[n]?"\n":" ");return t.join("")};var CLOSURE_DEFINES={"goog.DEBUG":!1};Blockly.mainWorkspace=null,Blockly.selected=null,Blockly.highlightedConnection_=null,Blockly.localConnection_=null,Blockly.draggingConnections_=[],Blockly.clipboardXml_=null,Blockly.clipboardSource_=null,Blockly.dragMode_=Blockly.DRAG_NONE,Blockly.flyoutButtonCallbacks_={},Blockly.registerButtonCallback=function(e,o){Blockly.flyoutButtonCallbacks_[e]=o},Blockly.hueToRgb=function(e){return goog.color.hsvToHex(e,Blockly.HSV_SATURATION,255*Blockly.HSV_VALUE)},Blockly.svgSize=function(e){return{width:e.cachedWidth_,height:e.cachedHeight_}},Blockly.resizeSvgContents=function(e){e.resizeContents()},Blockly.svgResize=function(e){for(;e.options.parentWorkspace;)e=e.options.parentWorkspace;var o=e.getParentSvg(),t=o.parentNode;if(t){var n=t.offsetWidth,t=t.offsetHeight;o.cachedWidth_!=n&&(o.setAttribute("width",n+"px"),o.cachedWidth_=n),o.cachedHeight_!=t&&(o.setAttribute("height",t+"px"),o.cachedHeight_=t),e.resize()}},Blockly.onKeyDown_=function(e){if(!Blockly.mainWorkspace.options.readOnly&&!Blockly.isTargetInput_(e)){var o=!1;27==e.keyCode?Blockly.hideChaff():8==e.keyCode||46==e.keyCode?(e.preventDefault(),Blockly.selected&&Blockly.selected.isDeletable()&&(o=!0)):(e.altKey||e.ctrlKey||e.metaKey)&&(Blockly.selected&&Blockly.selected.isDeletable()&&Blockly.selected.isMovable()&&(67==e.keyCode?(Blockly.hideChaff(),Blockly.copy_(Blockly.selected)):88==e.keyCode&&(Blockly.copy_(Blockly.selected),o=!0)),86==e.keyCode?Blockly.clipboardXml_&&(Blockly.Events.setGroup(!0),Blockly.clipboardSource_.paste(Blockly.clipboardXml_),Blockly.Events.setGroup(!1)):90==e.keyCode&&(Blockly.hideChaff(),Blockly.mainWorkspace.undo(e.shiftKey))),o&&(Blockly.Events.setGroup(!0),Blockly.hideChaff(),Blockly.selected.dispose(Blockly.dragMode_!=Blockly.DRAG_FREE,!0),Blockly.highlightedConnection_&&(Blockly.highlightedConnection_.unhighlight(),Blockly.highlightedConnection_=null),Blockly.Events.setGroup(!1))}},Blockly.terminateDrag_=function(){Blockly.BlockSvg.terminateDrag(),Blockly.Flyout.terminateDrag_()},Blockly.copy_=function(e){var o=Blockly.Xml.blockToDom(e);Blockly.dragMode_!=Blockly.DRAG_FREE&&Blockly.Xml.deleteNext(o);var t=e.getRelativeToSurfaceXY();o.setAttribute("x",e.RTL?-t.x:t.x),o.setAttribute("y",t.y),Blockly.clipboardXml_=o,Blockly.clipboardSource_=e.workspace},Blockly.duplicate_=function(e){var o=Blockly.clipboardXml_,t=Blockly.clipboardSource_;Blockly.copy_(e),e.workspace.paste(Blockly.clipboardXml_),Blockly.clipboardXml_=o,Blockly.clipboardSource_=t},Blockly.onContextMenu_=function(e){Blockly.isTargetInput_(e)||e.preventDefault()},Blockly.hideChaff=function(e){Blockly.Tooltip.hide(),Blockly.WidgetDiv.hide(),e||(e=Blockly.getMainWorkspace(),e.toolbox_&&e.toolbox_.flyout_&&e.toolbox_.flyout_.autoClose&&e.toolbox_.clearSelection())},Blockly.addChangeListener=function(e){return console.warn("Deprecated call to Blockly.addChangeListener, use workspace.addChangeListener instead."),Blockly.getMainWorkspace().addChangeListener(e)},Blockly.getMainWorkspace=function(){return Blockly.mainWorkspace},Blockly.alert=function(e,o){window.alert(e),o&&o()},Blockly.confirm=function(e,o){o(window.confirm(e))},Blockly.prompt=function(e,o,t){t(window.prompt(e,o))},Blockly.jsonInitFactory_=function(e){return function(){this.jsonInit(e)}},Blockly.defineBlocksWithJsonArray=function(e){for(var o,t=0;o=e[t];t++)Blockly.Blocks[o.type]={init:Blockly.jsonInitFactory_(o)}},goog.global.console||(goog.global.console={log:function(){},warn:function(){}}),goog.global.Blockly||(goog.global.Blockly={}),goog.global.Blockly.getMainWorkspace=Blockly.getMainWorkspace,goog.global.Blockly.addChangeListener=Blockly.addChangeListener;
Index: EcnlProtoTool/trunk/webapp/webmrbc/js/jquery-3.1.0.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/js/jquery-3.1.0.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/js/jquery-3.1.0.js	(revision 270)
@@ -0,0 +1,10074 @@
+/*eslint-disable no-unused-vars*/
+/*!
+ * jQuery JavaScript Library v3.1.0
+ * https://jquery.com/
+ *
+ * Includes Sizzle.js
+ * https://sizzlejs.com/
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license
+ * https://jquery.org/license
+ *
+ * Date: 2016-07-07T21:44Z
+ */
+( function( global, factory ) {
+
+	"use strict";
+
+	if ( typeof module === "object" && typeof module.exports === "object" ) {
+
+		// For CommonJS and CommonJS-like environments where a proper `window`
+		// is present, execute the factory and get jQuery.
+		// For environments that do not have a `window` with a `document`
+		// (such as Node.js), expose a factory as module.exports.
+		// This accentuates the need for the creation of a real `window`.
+		// e.g. var jQuery = require("jquery")(window);
+		// See ticket #14549 for more info.
+		module.exports = global.document ?
+			factory( global, true ) :
+			function( w ) {
+				if ( !w.document ) {
+					throw new Error( "jQuery requires a window with a document" );
+				}
+				return factory( w );
+			};
+	} else {
+		factory( global );
+	}
+
+// Pass this if window is not defined yet
+} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
+
+// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
+// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
+// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
+// enough that all such attempts are guarded in a try block.
+"use strict";
+
+var arr = [];
+
+var document = window.document;
+
+var getProto = Object.getPrototypeOf;
+
+var slice = arr.slice;
+
+var concat = arr.concat;
+
+var push = arr.push;
+
+var indexOf = arr.indexOf;
+
+var class2type = {};
+
+var toString = class2type.toString;
+
+var hasOwn = class2type.hasOwnProperty;
+
+var fnToString = hasOwn.toString;
+
+var ObjectFunctionString = fnToString.call( Object );
+
+var support = {};
+
+
+
+	function DOMEval( code, doc ) {
+		doc = doc || document;
+
+		var script = doc.createElement( "script" );
+
+		script.text = code;
+		doc.head.appendChild( script ).parentNode.removeChild( script );
+	}
+/* global Symbol */
+// Defining this global in .eslintrc would create a danger of using the global
+// unguarded in another place, it seems safer to define global only for this module
+
+
+
+var
+	version = "3.1.0",
+
+	// Define a local copy of jQuery
+	jQuery = function( selector, context ) {
+
+		// The jQuery object is actually just the init constructor 'enhanced'
+		// Need init if jQuery is called (just allow error to be thrown if not included)
+		return new jQuery.fn.init( selector, context );
+	},
+
+	// Support: Android <=4.0 only
+	// Make sure we trim BOM and NBSP
+	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+	// Matches dashed string for camelizing
+	rmsPrefix = /^-ms-/,
+	rdashAlpha = /-([a-z])/g,
+
+	// Used by jQuery.camelCase as callback to replace()
+	fcamelCase = function( all, letter ) {
+		return letter.toUpperCase();
+	};
+
+jQuery.fn = jQuery.prototype = {
+
+	// The current version of jQuery being used
+	jquery: version,
+
+	constructor: jQuery,
+
+	// The default length of a jQuery object is 0
+	length: 0,
+
+	toArray: function() {
+		return slice.call( this );
+	},
+
+	// Get the Nth element in the matched element set OR
+	// Get the whole matched element set as a clean array
+	get: function( num ) {
+		return num != null ?
+
+			// Return just the one element from the set
+			( num < 0 ? this[ num + this.length ] : this[ num ] ) :
+
+			// Return all the elements in a clean array
+			slice.call( this );
+	},
+
+	// Take an array of elements and push it onto the stack
+	// (returning the new matched element set)
+	pushStack: function( elems ) {
+
+		// Build a new jQuery matched element set
+		var ret = jQuery.merge( this.constructor(), elems );
+
+		// Add the old object onto the stack (as a reference)
+		ret.prevObject = this;
+
+		// Return the newly-formed element set
+		return ret;
+	},
+
+	// Execute a callback for every element in the matched set.
+	each: function( callback ) {
+		return jQuery.each( this, callback );
+	},
+
+	map: function( callback ) {
+		return this.pushStack( jQuery.map( this, function( elem, i ) {
+			return callback.call( elem, i, elem );
+		} ) );
+	},
+
+	slice: function() {
+		return this.pushStack( slice.apply( this, arguments ) );
+	},
+
+	first: function() {
+		return this.eq( 0 );
+	},
+
+	last: function() {
+		return this.eq( -1 );
+	},
+
+	eq: function( i ) {
+		var len = this.length,
+			j = +i + ( i < 0 ? len : 0 );
+		return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
+	},
+
+	end: function() {
+		return this.prevObject || this.constructor();
+	},
+
+	// For internal use only.
+	// Behaves like an Array's method, not like a jQuery method.
+	push: push,
+	sort: arr.sort,
+	splice: arr.splice
+};
+
+jQuery.extend = jQuery.fn.extend = function() {
+	var options, name, src, copy, copyIsArray, clone,
+		target = arguments[ 0 ] || {},
+		i = 1,
+		length = arguments.length,
+		deep = false;
+
+	// Handle a deep copy situation
+	if ( typeof target === "boolean" ) {
+		deep = target;
+
+		// Skip the boolean and the target
+		target = arguments[ i ] || {};
+		i++;
+	}
+
+	// Handle case when target is a string or something (possible in deep copy)
+	if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
+		target = {};
+	}
+
+	// Extend jQuery itself if only one argument is passed
+	if ( i === length ) {
+		target = this;
+		i--;
+	}
+
+	for ( ; i < length; i++ ) {
+
+		// Only deal with non-null/undefined values
+		if ( ( options = arguments[ i ] ) != null ) {
+
+			// Extend the base object
+			for ( name in options ) {
+				src = target[ name ];
+				copy = options[ name ];
+
+				// Prevent never-ending loop
+				if ( target === copy ) {
+					continue;
+				}
+
+				// Recurse if we're merging plain objects or arrays
+				if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
+					( copyIsArray = jQuery.isArray( copy ) ) ) ) {
+
+					if ( copyIsArray ) {
+						copyIsArray = false;
+						clone = src && jQuery.isArray( src ) ? src : [];
+
+					} else {
+						clone = src && jQuery.isPlainObject( src ) ? src : {};
+					}
+
+					// Never move original objects, clone them
+					target[ name ] = jQuery.extend( deep, clone, copy );
+
+				// Don't bring in undefined values
+				} else if ( copy !== undefined ) {
+					target[ name ] = copy;
+				}
+			}
+		}
+	}
+
+	// Return the modified object
+	return target;
+};
+
+jQuery.extend( {
+
+	// Unique for each copy of jQuery on the page
+	expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
+
+	// Assume jQuery is ready without the ready module
+	isReady: true,
+
+	error: function( msg ) {
+		throw new Error( msg );
+	},
+
+	noop: function() {},
+
+	isFunction: function( obj ) {
+		return jQuery.type( obj ) === "function";
+	},
+
+	isArray: Array.isArray,
+
+	isWindow: function( obj ) {
+		return obj != null && obj === obj.window;
+	},
+
+	isNumeric: function( obj ) {
+
+		// As of jQuery 3.0, isNumeric is limited to
+		// strings and numbers (primitives or objects)
+		// that can be coerced to finite numbers (gh-2662)
+		var type = jQuery.type( obj );
+		return ( type === "number" || type === "string" ) &&
+
+			// parseFloat NaNs numeric-cast false positives ("")
+			// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
+			// subtraction forces infinities to NaN
+			!isNaN( obj - parseFloat( obj ) );
+	},
+
+	isPlainObject: function( obj ) {
+		var proto, Ctor;
+
+		// Detect obvious negatives
+		// Use toString instead of jQuery.type to catch host objects
+		if ( !obj || toString.call( obj ) !== "[object Object]" ) {
+			return false;
+		}
+
+		proto = getProto( obj );
+
+		// Objects with no prototype (e.g., `Object.create( null )`) are plain
+		if ( !proto ) {
+			return true;
+		}
+
+		// Objects with prototype are plain iff they were constructed by a global Object function
+		Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
+		return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
+	},
+
+	isEmptyObject: function( obj ) {
+
+		/* eslint-disable no-unused-vars */
+		// See https://github.com/eslint/eslint/issues/6125
+		var name;
+
+		for ( name in obj ) {
+			return false;
+		}
+		return true;
+	},
+
+	type: function( obj ) {
+		if ( obj == null ) {
+			return obj + "";
+		}
+
+		// Support: Android <=2.3 only (functionish RegExp)
+		return typeof obj === "object" || typeof obj === "function" ?
+			class2type[ toString.call( obj ) ] || "object" :
+			typeof obj;
+	},
+
+	// Evaluates a script in a global context
+	globalEval: function( code ) {
+		DOMEval( code );
+	},
+
+	// Convert dashed to camelCase; used by the css and data modules
+	// Support: IE <=9 - 11, Edge 12 - 13
+	// Microsoft forgot to hump their vendor prefix (#9572)
+	camelCase: function( string ) {
+		return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+	},
+
+	nodeName: function( elem, name ) {
+		return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+	},
+
+	each: function( obj, callback ) {
+		var length, i = 0;
+
+		if ( isArrayLike( obj ) ) {
+			length = obj.length;
+			for ( ; i < length; i++ ) {
+				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
+					break;
+				}
+			}
+		} else {
+			for ( i in obj ) {
+				if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
+					break;
+				}
+			}
+		}
+
+		return obj;
+	},
+
+	// Support: Android <=4.0 only
+	trim: function( text ) {
+		return text == null ?
+			"" :
+			( text + "" ).replace( rtrim, "" );
+	},
+
+	// results is for internal usage only
+	makeArray: function( arr, results ) {
+		var ret = results || [];
+
+		if ( arr != null ) {
+			if ( isArrayLike( Object( arr ) ) ) {
+				jQuery.merge( ret,
+					typeof arr === "string" ?
+					[ arr ] : arr
+				);
+			} else {
+				push.call( ret, arr );
+			}
+		}
+
+		return ret;
+	},
+
+	inArray: function( elem, arr, i ) {
+		return arr == null ? -1 : indexOf.call( arr, elem, i );
+	},
+
+	// Support: Android <=4.0 only, PhantomJS 1 only
+	// push.apply(_, arraylike) throws on ancient WebKit
+	merge: function( first, second ) {
+		var len = +second.length,
+			j = 0,
+			i = first.length;
+
+		for ( ; j < len; j++ ) {
+			first[ i++ ] = second[ j ];
+		}
+
+		first.length = i;
+
+		return first;
+	},
+
+	grep: function( elems, callback, invert ) {
+		var callbackInverse,
+			matches = [],
+			i = 0,
+			length = elems.length,
+			callbackExpect = !invert;
+
+		// Go through the array, only saving the items
+		// that pass the validator function
+		for ( ; i < length; i++ ) {
+			callbackInverse = !callback( elems[ i ], i );
+			if ( callbackInverse !== callbackExpect ) {
+				matches.push( elems[ i ] );
+			}
+		}
+
+		return matches;
+	},
+
+	// arg is for internal usage only
+	map: function( elems, callback, arg ) {
+		var length, value,
+			i = 0,
+			ret = [];
+
+		// Go through the array, translating each of the items to their new values
+		if ( isArrayLike( elems ) ) {
+			length = elems.length;
+			for ( ; i < length; i++ ) {
+				value = callback( elems[ i ], i, arg );
+
+				if ( value != null ) {
+					ret.push( value );
+				}
+			}
+
+		// Go through every key on the object,
+		} else {
+			for ( i in elems ) {
+				value = callback( elems[ i ], i, arg );
+
+				if ( value != null ) {
+					ret.push( value );
+				}
+			}
+		}
+
+		// Flatten any nested arrays
+		return concat.apply( [], ret );
+	},
+
+	// A global GUID counter for objects
+	guid: 1,
+
+	// Bind a function to a context, optionally partially applying any
+	// arguments.
+	proxy: function( fn, context ) {
+		var tmp, args, proxy;
+
+		if ( typeof context === "string" ) {
+			tmp = fn[ context ];
+			context = fn;
+			fn = tmp;
+		}
+
+		// Quick check to determine if target is callable, in the spec
+		// this throws a TypeError, but we will just return undefined.
+		if ( !jQuery.isFunction( fn ) ) {
+			return undefined;
+		}
+
+		// Simulated bind
+		args = slice.call( arguments, 2 );
+		proxy = function() {
+			return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
+		};
+
+		// Set the guid of unique handler to the same of original handler, so it can be removed
+		proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+		return proxy;
+	},
+
+	now: Date.now,
+
+	// jQuery.support is not used in Core but other projects attach their
+	// properties to it so it needs to exist.
+	support: support
+} );
+
+if ( typeof Symbol === "function" ) {
+	jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
+}
+
+// Populate the class2type map
+jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
+function( i, name ) {
+	class2type[ "[object " + name + "]" ] = name.toLowerCase();
+} );
+
+function isArrayLike( obj ) {
+
+	// Support: real iOS 8.2 only (not reproducible in simulator)
+	// `in` check used to prevent JIT error (gh-2145)
+	// hasOwn isn't used here due to false negatives
+	// regarding Nodelist length in IE
+	var length = !!obj && "length" in obj && obj.length,
+		type = jQuery.type( obj );
+
+	if ( type === "function" || jQuery.isWindow( obj ) ) {
+		return false;
+	}
+
+	return type === "array" || length === 0 ||
+		typeof length === "number" && length > 0 && ( length - 1 ) in obj;
+}
+var Sizzle =
+/*!
+ * Sizzle CSS Selector Engine v2.3.0
+ * https://sizzlejs.com/
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2016-01-04
+ */
+(function( window ) {
+
+var i,
+	support,
+	Expr,
+	getText,
+	isXML,
+	tokenize,
+	compile,
+	select,
+	outermostContext,
+	sortInput,
+	hasDuplicate,
+
+	// Local document vars
+	setDocument,
+	document,
+	docElem,
+	documentIsHTML,
+	rbuggyQSA,
+	rbuggyMatches,
+	matches,
+	contains,
+
+	// Instance-specific data
+	expando = "sizzle" + 1 * new Date(),
+	preferredDoc = window.document,
+	dirruns = 0,
+	done = 0,
+	classCache = createCache(),
+	tokenCache = createCache(),
+	compilerCache = createCache(),
+	sortOrder = function( a, b ) {
+		if ( a === b ) {
+			hasDuplicate = true;
+		}
+		return 0;
+	},
+
+	// Instance methods
+	hasOwn = ({}).hasOwnProperty,
+	arr = [],
+	pop = arr.pop,
+	push_native = arr.push,
+	push = arr.push,
+	slice = arr.slice,
+	// Use a stripped-down indexOf as it's faster than native
+	// https://jsperf.com/thor-indexof-vs-for/5
+	indexOf = function( list, elem ) {
+		var i = 0,
+			len = list.length;
+		for ( ; i < len; i++ ) {
+			if ( list[i] === elem ) {
+				return i;
+			}
+		}
+		return -1;
+	},
+
+	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+	// Regular expressions
+
+	// http://www.w3.org/TR/css3-selectors/#whitespace
+	whitespace = "[\\x20\\t\\r\\n\\f]",
+
+	// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+	identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
+
+	// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
+	attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
+		// Operator (capture 2)
+		"*([*^$|!~]?=)" + whitespace +
+		// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
+		"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
+		"*\\]",
+
+	pseudos = ":(" + identifier + ")(?:\\((" +
+		// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
+		// 1. quoted (capture 3; capture 4 or capture 5)
+		"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
+		// 2. simple (capture 6)
+		"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
+		// 3. anything else (capture 2)
+		".*" +
+		")\\)|)",
+
+	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+	rwhitespace = new RegExp( whitespace + "+", "g" ),
+	rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+	rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+	rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
+
+	rpseudo = new RegExp( pseudos ),
+	ridentifier = new RegExp( "^" + identifier + "$" ),
+
+	matchExpr = {
+		"ID": new RegExp( "^#(" + identifier + ")" ),
+		"CLASS": new RegExp( "^\\.(" + identifier + ")" ),
+		"TAG": new RegExp( "^(" + identifier + "|[*])" ),
+		"ATTR": new RegExp( "^" + attributes ),
+		"PSEUDO": new RegExp( "^" + pseudos ),
+		"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+			"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+			"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+		"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+		// For use in libraries implementing .is()
+		// We use this for POS matching in `select`
+		"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+			whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+	},
+
+	rinputs = /^(?:input|select|textarea|button)$/i,
+	rheader = /^h\d$/i,
+
+	rnative = /^[^{]+\{\s*\[native \w/,
+
+	// Easily-parseable/retrievable ID or TAG or CLASS selectors
+	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+	rsibling = /[+~]/,
+
+	// CSS escapes
+	// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+	runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+	funescape = function( _, escaped, escapedWhitespace ) {
+		var high = "0x" + escaped - 0x10000;
+		// NaN means non-codepoint
+		// Support: Firefox<24
+		// Workaround erroneous numeric interpretation of +"0x"
+		return high !== high || escapedWhitespace ?
+			escaped :
+			high < 0 ?
+				// BMP codepoint
+				String.fromCharCode( high + 0x10000 ) :
+				// Supplemental Plane codepoint (surrogate pair)
+				String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+	},
+
+	// CSS string/identifier serialization
+	// https://drafts.csswg.org/cssom/#common-serializing-idioms
+	rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,
+	fcssescape = function( ch, asCodePoint ) {
+		if ( asCodePoint ) {
+
+			// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
+			if ( ch === "\0" ) {
+				return "\uFFFD";
+			}
+
+			// Control characters and (dependent upon position) numbers get escaped as code points
+			return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
+		}
+
+		// Other potentially-special ASCII characters get backslash-escaped
+		return "\\" + ch;
+	},
+
+	// Used for iframes
+	// See setDocument()
+	// Removing the function wrapper causes a "Permission Denied"
+	// error in IE
+	unloadHandler = function() {
+		setDocument();
+	},
+
+	disabledAncestor = addCombinator(
+		function( elem ) {
+			return elem.disabled === true;
+		},
+		{ dir: "parentNode", next: "legend" }
+	);
+
+// Optimize for push.apply( _, NodeList )
+try {
+	push.apply(
+		(arr = slice.call( preferredDoc.childNodes )),
+		preferredDoc.childNodes
+	);
+	// Support: Android<4.0
+	// Detect silently failing push.apply
+	arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+	push = { apply: arr.length ?
+
+		// Leverage slice if possible
+		function( target, els ) {
+			push_native.apply( target, slice.call(els) );
+		} :
+
+		// Support: IE<9
+		// Otherwise append directly
+		function( target, els ) {
+			var j = target.length,
+				i = 0;
+			// Can't trust NodeList.length
+			while ( (target[j++] = els[i++]) ) {}
+			target.length = j - 1;
+		}
+	};
+}
+
+function Sizzle( selector, context, results, seed ) {
+	var m, i, elem, nid, match, groups, newSelector,
+		newContext = context && context.ownerDocument,
+
+		// nodeType defaults to 9, since context defaults to document
+		nodeType = context ? context.nodeType : 9;
+
+	results = results || [];
+
+	// Return early from calls with invalid selector or context
+	if ( typeof selector !== "string" || !selector ||
+		nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
+
+		return results;
+	}
+
+	// Try to shortcut find operations (as opposed to filters) in HTML documents
+	if ( !seed ) {
+
+		if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+			setDocument( context );
+		}
+		context = context || document;
+
+		if ( documentIsHTML ) {
+
+			// If the selector is sufficiently simple, try using a "get*By*" DOM method
+			// (excepting DocumentFragment context, where the methods don't exist)
+			if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
+
+				// ID selector
+				if ( (m = match[1]) ) {
+
+					// Document context
+					if ( nodeType === 9 ) {
+						if ( (elem = context.getElementById( m )) ) {
+
+							// Support: IE, Opera, Webkit
+							// TODO: identify versions
+							// getElementById can match elements by name instead of ID
+							if ( elem.id === m ) {
+								results.push( elem );
+								return results;
+							}
+						} else {
+							return results;
+						}
+
+					// Element context
+					} else {
+
+						// Support: IE, Opera, Webkit
+						// TODO: identify versions
+						// getElementById can match elements by name instead of ID
+						if ( newContext && (elem = newContext.getElementById( m )) &&
+							contains( context, elem ) &&
+							elem.id === m ) {
+
+							results.push( elem );
+							return results;
+						}
+					}
+
+				// Type selector
+				} else if ( match[2] ) {
+					push.apply( results, context.getElementsByTagName( selector ) );
+					return results;
+
+				// Class selector
+				} else if ( (m = match[3]) && support.getElementsByClassName &&
+					context.getElementsByClassName ) {
+
+					push.apply( results, context.getElementsByClassName( m ) );
+					return results;
+				}
+			}
+
+			// Take advantage of querySelectorAll
+			if ( support.qsa &&
+				!compilerCache[ selector + " " ] &&
+				(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+
+				if ( nodeType !== 1 ) {
+					newContext = context;
+					newSelector = selector;
+
+				// qSA looks outside Element context, which is not what we want
+				// Thanks to Andrew Dupont for this workaround technique
+				// Support: IE <=8
+				// Exclude object elements
+				} else if ( context.nodeName.toLowerCase() !== "object" ) {
+
+					// Capture the context ID, setting it first if necessary
+					if ( (nid = context.getAttribute( "id" )) ) {
+						nid = nid.replace( rcssescape, fcssescape );
+					} else {
+						context.setAttribute( "id", (nid = expando) );
+					}
+
+					// Prefix every selector in the list
+					groups = tokenize( selector );
+					i = groups.length;
+					while ( i-- ) {
+						groups[i] = "#" + nid + " " + toSelector( groups[i] );
+					}
+					newSelector = groups.join( "," );
+
+					// Expand context for sibling selectors
+					newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
+						context;
+				}
+
+				if ( newSelector ) {
+					try {
+						push.apply( results,
+							newContext.querySelectorAll( newSelector )
+						);
+						return results;
+					} catch ( qsaError ) {
+					} finally {
+						if ( nid === expando ) {
+							context.removeAttribute( "id" );
+						}
+					}
+				}
+			}
+		}
+	}
+
+	// All others
+	return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {function(string, object)} Returns the Object data after storing it on itself with
+ *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ *	deleting the oldest entry
+ */
+function createCache() {
+	var keys = [];
+
+	function cache( key, value ) {
+		// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+		if ( keys.push( key + " " ) > Expr.cacheLength ) {
+			// Only keep the most recent entries
+			delete cache[ keys.shift() ];
+		}
+		return (cache[ key + " " ] = value);
+	}
+	return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+	fn[ expando ] = true;
+	return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created element and returns a boolean result
+ */
+function assert( fn ) {
+	var el = document.createElement("fieldset");
+
+	try {
+		return !!fn( el );
+	} catch (e) {
+		return false;
+	} finally {
+		// Remove from its parent by default
+		if ( el.parentNode ) {
+			el.parentNode.removeChild( el );
+		}
+		// release memory in IE
+		el = null;
+	}
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+	var arr = attrs.split("|"),
+		i = arr.length;
+
+	while ( i-- ) {
+		Expr.attrHandle[ arr[i] ] = handler;
+	}
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+	var cur = b && a,
+		diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+			a.sourceIndex - b.sourceIndex;
+
+	// Use IE sourceIndex if available on both nodes
+	if ( diff ) {
+		return diff;
+	}
+
+	// Check if b follows a
+	if ( cur ) {
+		while ( (cur = cur.nextSibling) ) {
+			if ( cur === b ) {
+				return -1;
+			}
+		}
+	}
+
+	return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+	return function( elem ) {
+		var name = elem.nodeName.toLowerCase();
+		return name === "input" && elem.type === type;
+	};
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+	return function( elem ) {
+		var name = elem.nodeName.toLowerCase();
+		return (name === "input" || name === "button") && elem.type === type;
+	};
+}
+
+/**
+ * Returns a function to use in pseudos for :enabled/:disabled
+ * @param {Boolean} disabled true for :disabled; false for :enabled
+ */
+function createDisabledPseudo( disabled ) {
+	// Known :disabled false positives:
+	// IE: *[disabled]:not(button, input, select, textarea, optgroup, option, menuitem, fieldset)
+	// not IE: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
+	return function( elem ) {
+
+		// Check form elements and option elements for explicit disabling
+		return "label" in elem && elem.disabled === disabled ||
+			"form" in elem && elem.disabled === disabled ||
+
+			// Check non-disabled form elements for fieldset[disabled] ancestors
+			"form" in elem && elem.disabled === false && (
+				// Support: IE6-11+
+				// Ancestry is covered for us
+				elem.isDisabled === disabled ||
+
+				// Otherwise, assume any non-<option> under fieldset[disabled] is disabled
+				/* jshint -W018 */
+				elem.isDisabled !== !disabled &&
+					("label" in elem || !disabledAncestor( elem )) !== disabled
+			);
+	};
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+	return markFunction(function( argument ) {
+		argument = +argument;
+		return markFunction(function( seed, matches ) {
+			var j,
+				matchIndexes = fn( [], seed.length, argument ),
+				i = matchIndexes.length;
+
+			// Match elements found at the specified indexes
+			while ( i-- ) {
+				if ( seed[ (j = matchIndexes[i]) ] ) {
+					seed[j] = !(matches[j] = seed[j]);
+				}
+			}
+		});
+	});
+}
+
+/**
+ * Checks a node for validity as a Sizzle context
+ * @param {Element|Object=} context
+ * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
+ */
+function testContext( context ) {
+	return context && typeof context.getElementsByTagName !== "undefined" && context;
+}
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Detects XML nodes
+ * @param {Element|Object} elem An element or a document
+ * @returns {Boolean} True iff elem is a non-HTML XML node
+ */
+isXML = Sizzle.isXML = function( elem ) {
+	// documentElement is verified for cases where it doesn't yet exist
+	// (such as loading iframes in IE - #4833)
+	var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+	return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+	var hasCompare, subWindow,
+		doc = node ? node.ownerDocument || node : preferredDoc;
+
+	// Return early if doc is invalid or already selected
+	if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+		return document;
+	}
+
+	// Update global variables
+	document = doc;
+	docElem = document.documentElement;
+	documentIsHTML = !isXML( document );
+
+	// Support: IE 9-11, Edge
+	// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
+	if ( preferredDoc !== document &&
+		(subWindow = document.defaultView) && subWindow.top !== subWindow ) {
+
+		// Support: IE 11, Edge
+		if ( subWindow.addEventListener ) {
+			subWindow.addEventListener( "unload", unloadHandler, false );
+
+		// Support: IE 9 - 10 only
+		} else if ( subWindow.attachEvent ) {
+			subWindow.attachEvent( "onunload", unloadHandler );
+		}
+	}
+
+	/* Attributes
+	---------------------------------------------------------------------- */
+
+	// Support: IE<8
+	// Verify that getAttribute really returns attributes and not properties
+	// (excepting IE8 booleans)
+	support.attributes = assert(function( el ) {
+		el.className = "i";
+		return !el.getAttribute("className");
+	});
+
+	/* getElement(s)By*
+	---------------------------------------------------------------------- */
+
+	// Check if getElementsByTagName("*") returns only elements
+	support.getElementsByTagName = assert(function( el ) {
+		el.appendChild( document.createComment("") );
+		return !el.getElementsByTagName("*").length;
+	});
+
+	// Support: IE<9
+	support.getElementsByClassName = rnative.test( document.getElementsByClassName );
+
+	// Support: IE<10
+	// Check if getElementById returns elements by name
+	// The broken getElementById methods don't pick up programmatically-set names,
+	// so use a roundabout getElementsByName test
+	support.getById = assert(function( el ) {
+		docElem.appendChild( el ).id = expando;
+		return !document.getElementsByName || !document.getElementsByName( expando ).length;
+	});
+
+	// ID find and filter
+	if ( support.getById ) {
+		Expr.find["ID"] = function( id, context ) {
+			if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
+				var m = context.getElementById( id );
+				return m ? [ m ] : [];
+			}
+		};
+		Expr.filter["ID"] = function( id ) {
+			var attrId = id.replace( runescape, funescape );
+			return function( elem ) {
+				return elem.getAttribute("id") === attrId;
+			};
+		};
+	} else {
+		// Support: IE6/7
+		// getElementById is not reliable as a find shortcut
+		delete Expr.find["ID"];
+
+		Expr.filter["ID"] =  function( id ) {
+			var attrId = id.replace( runescape, funescape );
+			return function( elem ) {
+				var node = typeof elem.getAttributeNode !== "undefined" &&
+					elem.getAttributeNode("id");
+				return node && node.value === attrId;
+			};
+		};
+	}
+
+	// Tag
+	Expr.find["TAG"] = support.getElementsByTagName ?
+		function( tag, context ) {
+			if ( typeof context.getElementsByTagName !== "undefined" ) {
+				return context.getElementsByTagName( tag );
+
+			// DocumentFragment nodes don't have gEBTN
+			} else if ( support.qsa ) {
+				return context.querySelectorAll( tag );
+			}
+		} :
+
+		function( tag, context ) {
+			var elem,
+				tmp = [],
+				i = 0,
+				// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
+				results = context.getElementsByTagName( tag );
+
+			// Filter out possible comments
+			if ( tag === "*" ) {
+				while ( (elem = results[i++]) ) {
+					if ( elem.nodeType === 1 ) {
+						tmp.push( elem );
+					}
+				}
+
+				return tmp;
+			}
+			return results;
+		};
+
+	// Class
+	Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+		if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
+			return context.getElementsByClassName( className );
+		}
+	};
+
+	/* QSA/matchesSelector
+	---------------------------------------------------------------------- */
+
+	// QSA and matchesSelector support
+
+	// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+	rbuggyMatches = [];
+
+	// qSa(:focus) reports false when true (Chrome 21)
+	// We allow this because of a bug in IE8/9 that throws an error
+	// whenever `document.activeElement` is accessed on an iframe
+	// So, we allow :focus to pass through QSA all the time to avoid the IE error
+	// See https://bugs.jquery.com/ticket/13378
+	rbuggyQSA = [];
+
+	if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
+		// Build QSA regex
+		// Regex strategy adopted from Diego Perini
+		assert(function( el ) {
+			// Select is set to empty string on purpose
+			// This is to test IE's treatment of not explicitly
+			// setting a boolean content attribute,
+			// since its presence should be enough
+			// https://bugs.jquery.com/ticket/12359
+			docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
+				"<select id='" + expando + "-\r\\' msallowcapture=''>" +
+				"<option selected=''></option></select>";
+
+			// Support: IE8, Opera 11-12.16
+			// Nothing should be selected when empty strings follow ^= or $= or *=
+			// The test attribute must be unknown in Opera but "safe" for WinRT
+			// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
+			if ( el.querySelectorAll("[msallowcapture^='']").length ) {
+				rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+			}
+
+			// Support: IE8
+			// Boolean attributes and "value" are not treated correctly
+			if ( !el.querySelectorAll("[selected]").length ) {
+				rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+			}
+
+			// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
+			if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
+				rbuggyQSA.push("~=");
+			}
+
+			// Webkit/Opera - :checked should return selected option elements
+			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+			// IE8 throws error here and will not see later tests
+			if ( !el.querySelectorAll(":checked").length ) {
+				rbuggyQSA.push(":checked");
+			}
+
+			// Support: Safari 8+, iOS 8+
+			// https://bugs.webkit.org/show_bug.cgi?id=136851
+			// In-page `selector#id sibling-combinator selector` fails
+			if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
+				rbuggyQSA.push(".#.+[+~]");
+			}
+		});
+
+		assert(function( el ) {
+			el.innerHTML = "<a href='' disabled='disabled'></a>" +
+				"<select disabled='disabled'><option/></select>";
+
+			// Support: Windows 8 Native Apps
+			// The type and name attributes are restricted during .innerHTML assignment
+			var input = document.createElement("input");
+			input.setAttribute( "type", "hidden" );
+			el.appendChild( input ).setAttribute( "name", "D" );
+
+			// Support: IE8
+			// Enforce case-sensitivity of name attribute
+			if ( el.querySelectorAll("[name=d]").length ) {
+				rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
+			}
+
+			// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+			// IE8 throws error here and will not see later tests
+			if ( el.querySelectorAll(":enabled").length !== 2 ) {
+				rbuggyQSA.push( ":enabled", ":disabled" );
+			}
+
+			// Support: IE9-11+
+			// IE's :disabled selector does not pick up the children of disabled fieldsets
+			docElem.appendChild( el ).disabled = true;
+			if ( el.querySelectorAll(":disabled").length !== 2 ) {
+				rbuggyQSA.push( ":enabled", ":disabled" );
+			}
+
+			// Opera 10-11 does not throw on post-comma invalid pseudos
+			el.querySelectorAll("*,:x");
+			rbuggyQSA.push(",.*:");
+		});
+	}
+
+	if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
+		docElem.webkitMatchesSelector ||
+		docElem.mozMatchesSelector ||
+		docElem.oMatchesSelector ||
+		docElem.msMatchesSelector) )) ) {
+
+		assert(function( el ) {
+			// Check to see if it's possible to do matchesSelector
+			// on a disconnected node (IE 9)
+			support.disconnectedMatch = matches.call( el, "*" );
+
+			// This should fail with an exception
+			// Gecko does not error, returns false instead
+			matches.call( el, "[s!='']:x" );
+			rbuggyMatches.push( "!=", pseudos );
+		});
+	}
+
+	rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+	rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+	/* Contains
+	---------------------------------------------------------------------- */
+	hasCompare = rnative.test( docElem.compareDocumentPosition );
+
+	// Element contains another
+	// Purposefully self-exclusive
+	// As in, an element does not contain itself
+	contains = hasCompare || rnative.test( docElem.contains ) ?
+		function( a, b ) {
+			var adown = a.nodeType === 9 ? a.documentElement : a,
+				bup = b && b.parentNode;
+			return a === bup || !!( bup && bup.nodeType === 1 && (
+				adown.contains ?
+					adown.contains( bup ) :
+					a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+			));
+		} :
+		function( a, b ) {
+			if ( b ) {
+				while ( (b = b.parentNode) ) {
+					if ( b === a ) {
+						return true;
+					}
+				}
+			}
+			return false;
+		};
+
+	/* Sorting
+	---------------------------------------------------------------------- */
+
+	// Document order sorting
+	sortOrder = hasCompare ?
+	function( a, b ) {
+
+		// Flag for duplicate removal
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+
+		// Sort on method existence if only one input has compareDocumentPosition
+		var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
+		if ( compare ) {
+			return compare;
+		}
+
+		// Calculate position if both inputs belong to the same document
+		compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
+			a.compareDocumentPosition( b ) :
+
+			// Otherwise we know they are disconnected
+			1;
+
+		// Disconnected nodes
+		if ( compare & 1 ||
+			(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+			// Choose the first element that is related to our preferred document
+			if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
+				return -1;
+			}
+			if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
+				return 1;
+			}
+
+			// Maintain original order
+			return sortInput ?
+				( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+				0;
+		}
+
+		return compare & 4 ? -1 : 1;
+	} :
+	function( a, b ) {
+		// Exit early if the nodes are identical
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+
+		var cur,
+			i = 0,
+			aup = a.parentNode,
+			bup = b.parentNode,
+			ap = [ a ],
+			bp = [ b ];
+
+		// Parentless nodes are either documents or disconnected
+		if ( !aup || !bup ) {
+			return a === document ? -1 :
+				b === document ? 1 :
+				aup ? -1 :
+				bup ? 1 :
+				sortInput ?
+				( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+				0;
+
+		// If the nodes are siblings, we can do a quick check
+		} else if ( aup === bup ) {
+			return siblingCheck( a, b );
+		}
+
+		// Otherwise we need full lists of their ancestors for comparison
+		cur = a;
+		while ( (cur = cur.parentNode) ) {
+			ap.unshift( cur );
+		}
+		cur = b;
+		while ( (cur = cur.parentNode) ) {
+			bp.unshift( cur );
+		}
+
+		// Walk down the tree looking for a discrepancy
+		while ( ap[i] === bp[i] ) {
+			i++;
+		}
+
+		return i ?
+			// Do a sibling check if the nodes have a common ancestor
+			siblingCheck( ap[i], bp[i] ) :
+
+			// Otherwise nodes in our document sort first
+			ap[i] === preferredDoc ? -1 :
+			bp[i] === preferredDoc ? 1 :
+			0;
+	};
+
+	return document;
+};
+
+Sizzle.matches = function( expr, elements ) {
+	return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+	// Set document vars if needed
+	if ( ( elem.ownerDocument || elem ) !== document ) {
+		setDocument( elem );
+	}
+
+	// Make sure that attribute selectors are quoted
+	expr = expr.replace( rattributeQuotes, "='$1']" );
+
+	if ( support.matchesSelector && documentIsHTML &&
+		!compilerCache[ expr + " " ] &&
+		( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+		( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
+
+		try {
+			var ret = matches.call( elem, expr );
+
+			// IE 9's matchesSelector returns false on disconnected nodes
+			if ( ret || support.disconnectedMatch ||
+					// As well, disconnected nodes are said to be in a document
+					// fragment in IE 9
+					elem.document && elem.document.nodeType !== 11 ) {
+				return ret;
+			}
+		} catch (e) {}
+	}
+
+	return Sizzle( expr, document, null, [ elem ] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+	// Set document vars if needed
+	if ( ( context.ownerDocument || context ) !== document ) {
+		setDocument( context );
+	}
+	return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+	// Set document vars if needed
+	if ( ( elem.ownerDocument || elem ) !== document ) {
+		setDocument( elem );
+	}
+
+	var fn = Expr.attrHandle[ name.toLowerCase() ],
+		// Don't get fooled by Object.prototype properties (jQuery #13807)
+		val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+			fn( elem, name, !documentIsHTML ) :
+			undefined;
+
+	return val !== undefined ?
+		val :
+		support.attributes || !documentIsHTML ?
+			elem.getAttribute( name ) :
+			(val = elem.getAttributeNode(name)) && val.specified ?
+				val.value :
+				null;
+};
+
+Sizzle.escape = function( sel ) {
+	return (sel + "").replace( rcssescape, fcssescape );
+};
+
+Sizzle.error = function( msg ) {
+	throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+	var elem,
+		duplicates = [],
+		j = 0,
+		i = 0;
+
+	// Unless we *know* we can detect duplicates, assume their presence
+	hasDuplicate = !support.detectDuplicates;
+	sortInput = !support.sortStable && results.slice( 0 );
+	results.sort( sortOrder );
+
+	if ( hasDuplicate ) {
+		while ( (elem = results[i++]) ) {
+			if ( elem === results[ i ] ) {
+				j = duplicates.push( i );
+			}
+		}
+		while ( j-- ) {
+			results.splice( duplicates[ j ], 1 );
+		}
+	}
+
+	// Clear input after sorting to release objects
+	// See https://github.com/jquery/sizzle/pull/225
+	sortInput = null;
+
+	return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+	var node,
+		ret = "",
+		i = 0,
+		nodeType = elem.nodeType;
+
+	if ( !nodeType ) {
+		// If no nodeType, this is expected to be an array
+		while ( (node = elem[i++]) ) {
+			// Do not traverse comment nodes
+			ret += getText( node );
+		}
+	} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+		// Use textContent for elements
+		// innerText usage removed for consistency of new lines (jQuery #11153)
+		if ( typeof elem.textContent === "string" ) {
+			return elem.textContent;
+		} else {
+			// Traverse its children
+			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+				ret += getText( elem );
+			}
+		}
+	} else if ( nodeType === 3 || nodeType === 4 ) {
+		return elem.nodeValue;
+	}
+	// Do not include comment or processing instruction nodes
+
+	return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+	// Can be adjusted by the user
+	cacheLength: 50,
+
+	createPseudo: markFunction,
+
+	match: matchExpr,
+
+	attrHandle: {},
+
+	find: {},
+
+	relative: {
+		">": { dir: "parentNode", first: true },
+		" ": { dir: "parentNode" },
+		"+": { dir: "previousSibling", first: true },
+		"~": { dir: "previousSibling" }
+	},
+
+	preFilter: {
+		"ATTR": function( match ) {
+			match[1] = match[1].replace( runescape, funescape );
+
+			// Move the given value to match[3] whether quoted or unquoted
+			match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
+
+			if ( match[2] === "~=" ) {
+				match[3] = " " + match[3] + " ";
+			}
+
+			return match.slice( 0, 4 );
+		},
+
+		"CHILD": function( match ) {
+			/* matches from matchExpr["CHILD"]
+				1 type (only|nth|...)
+				2 what (child|of-type)
+				3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+				4 xn-component of xn+y argument ([+-]?\d*n|)
+				5 sign of xn-component
+				6 x of xn-component
+				7 sign of y-component
+				8 y of y-component
+			*/
+			match[1] = match[1].toLowerCase();
+
+			if ( match[1].slice( 0, 3 ) === "nth" ) {
+				// nth-* requires argument
+				if ( !match[3] ) {
+					Sizzle.error( match[0] );
+				}
+
+				// numeric x and y parameters for Expr.filter.CHILD
+				// remember that false/true cast respectively to 0/1
+				match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+				match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+			// other types prohibit arguments
+			} else if ( match[3] ) {
+				Sizzle.error( match[0] );
+			}
+
+			return match;
+		},
+
+		"PSEUDO": function( match ) {
+			var excess,
+				unquoted = !match[6] && match[2];
+
+			if ( matchExpr["CHILD"].test( match[0] ) ) {
+				return null;
+			}
+
+			// Accept quoted arguments as-is
+			if ( match[3] ) {
+				match[2] = match[4] || match[5] || "";
+
+			// Strip excess characters from unquoted arguments
+			} else if ( unquoted && rpseudo.test( unquoted ) &&
+				// Get excess from tokenize (recursively)
+				(excess = tokenize( unquoted, true )) &&
+				// advance to the next closing parenthesis
+				(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+				// excess is a negative index
+				match[0] = match[0].slice( 0, excess );
+				match[2] = unquoted.slice( 0, excess );
+			}
+
+			// Return only captures needed by the pseudo filter method (type and argument)
+			return match.slice( 0, 3 );
+		}
+	},
+
+	filter: {
+
+		"TAG": function( nodeNameSelector ) {
+			var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+			return nodeNameSelector === "*" ?
+				function() { return true; } :
+				function( elem ) {
+					return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+				};
+		},
+
+		"CLASS": function( className ) {
+			var pattern = classCache[ className + " " ];
+
+			return pattern ||
+				(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+				classCache( className, function( elem ) {
+					return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
+				});
+		},
+
+		"ATTR": function( name, operator, check ) {
+			return function( elem ) {
+				var result = Sizzle.attr( elem, name );
+
+				if ( result == null ) {
+					return operator === "!=";
+				}
+				if ( !operator ) {
+					return true;
+				}
+
+				result += "";
+
+				return operator === "=" ? result === check :
+					operator === "!=" ? result !== check :
+					operator === "^=" ? check && result.indexOf( check ) === 0 :
+					operator === "*=" ? check && result.indexOf( check ) > -1 :
+					operator === "$=" ? check && result.slice( -check.length ) === check :
+					operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
+					operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+					false;
+			};
+		},
+
+		"CHILD": function( type, what, argument, first, last ) {
+			var simple = type.slice( 0, 3 ) !== "nth",
+				forward = type.slice( -4 ) !== "last",
+				ofType = what === "of-type";
+
+			return first === 1 && last === 0 ?
+
+				// Shortcut for :nth-*(n)
+				function( elem ) {
+					return !!elem.parentNode;
+				} :
+
+				function( elem, context, xml ) {
+					var cache, uniqueCache, outerCache, node, nodeIndex, start,
+						dir = simple !== forward ? "nextSibling" : "previousSibling",
+						parent = elem.parentNode,
+						name = ofType && elem.nodeName.toLowerCase(),
+						useCache = !xml && !ofType,
+						diff = false;
+
+					if ( parent ) {
+
+						// :(first|last|only)-(child|of-type)
+						if ( simple ) {
+							while ( dir ) {
+								node = elem;
+								while ( (node = node[ dir ]) ) {
+									if ( ofType ?
+										node.nodeName.toLowerCase() === name :
+										node.nodeType === 1 ) {
+
+										return false;
+									}
+								}
+								// Reverse direction for :only-* (if we haven't yet done so)
+								start = dir = type === "only" && !start && "nextSibling";
+							}
+							return true;
+						}
+
+						start = [ forward ? parent.firstChild : parent.lastChild ];
+
+						// non-xml :nth-child(...) stores cache data on `parent`
+						if ( forward && useCache ) {
+
+							// Seek `elem` from a previously-cached index
+
+							// ...in a gzip-friendly way
+							node = parent;
+							outerCache = node[ expando ] || (node[ expando ] = {});
+
+							// Support: IE <9 only
+							// Defend against cloned attroperties (jQuery gh-1709)
+							uniqueCache = outerCache[ node.uniqueID ] ||
+								(outerCache[ node.uniqueID ] = {});
+
+							cache = uniqueCache[ type ] || [];
+							nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
+							diff = nodeIndex && cache[ 2 ];
+							node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+							while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+								// Fallback to seeking `elem` from the start
+								(diff = nodeIndex = 0) || start.pop()) ) {
+
+								// When found, cache indexes on `parent` and break
+								if ( node.nodeType === 1 && ++diff && node === elem ) {
+									uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
+									break;
+								}
+							}
+
+						} else {
+							// Use previously-cached element index if available
+							if ( useCache ) {
+								// ...in a gzip-friendly way
+								node = elem;
+								outerCache = node[ expando ] || (node[ expando ] = {});
+
+								// Support: IE <9 only
+								// Defend against cloned attroperties (jQuery gh-1709)
+								uniqueCache = outerCache[ node.uniqueID ] ||
+									(outerCache[ node.uniqueID ] = {});
+
+								cache = uniqueCache[ type ] || [];
+								nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
+								diff = nodeIndex;
+							}
+
+							// xml :nth-child(...)
+							// or :nth-last-child(...) or :nth(-last)?-of-type(...)
+							if ( diff === false ) {
+								// Use the same loop as above to seek `elem` from the start
+								while ( (node = ++nodeIndex && node && node[ dir ] ||
+									(diff = nodeIndex = 0) || start.pop()) ) {
+
+									if ( ( ofType ?
+										node.nodeName.toLowerCase() === name :
+										node.nodeType === 1 ) &&
+										++diff ) {
+
+										// Cache the index of each encountered element
+										if ( useCache ) {
+											outerCache = node[ expando ] || (node[ expando ] = {});
+
+											// Support: IE <9 only
+											// Defend against cloned attroperties (jQuery gh-1709)
+											uniqueCache = outerCache[ node.uniqueID ] ||
+												(outerCache[ node.uniqueID ] = {});
+
+											uniqueCache[ type ] = [ dirruns, diff ];
+										}
+
+										if ( node === elem ) {
+											break;
+										}
+									}
+								}
+							}
+						}
+
+						// Incorporate the offset, then check against cycle size
+						diff -= last;
+						return diff === first || ( diff % first === 0 && diff / first >= 0 );
+					}
+				};
+		},
+
+		"PSEUDO": function( pseudo, argument ) {
+			// pseudo-class names are case-insensitive
+			// http://www.w3.org/TR/selectors/#pseudo-classes
+			// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+			// Remember that setFilters inherits from pseudos
+			var args,
+				fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+					Sizzle.error( "unsupported pseudo: " + pseudo );
+
+			// The user may use createPseudo to indicate that
+			// arguments are needed to create the filter function
+			// just as Sizzle does
+			if ( fn[ expando ] ) {
+				return fn( argument );
+			}
+
+			// But maintain support for old signatures
+			if ( fn.length > 1 ) {
+				args = [ pseudo, pseudo, "", argument ];
+				return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+					markFunction(function( seed, matches ) {
+						var idx,
+							matched = fn( seed, argument ),
+							i = matched.length;
+						while ( i-- ) {
+							idx = indexOf( seed, matched[i] );
+							seed[ idx ] = !( matches[ idx ] = matched[i] );
+						}
+					}) :
+					function( elem ) {
+						return fn( elem, 0, args );
+					};
+			}
+
+			return fn;
+		}
+	},
+
+	pseudos: {
+		// Potentially complex pseudos
+		"not": markFunction(function( selector ) {
+			// Trim the selector passed to compile
+			// to avoid treating leading and trailing
+			// spaces as combinators
+			var input = [],
+				results = [],
+				matcher = compile( selector.replace( rtrim, "$1" ) );
+
+			return matcher[ expando ] ?
+				markFunction(function( seed, matches, context, xml ) {
+					var elem,
+						unmatched = matcher( seed, null, xml, [] ),
+						i = seed.length;
+
+					// Match elements unmatched by `matcher`
+					while ( i-- ) {
+						if ( (elem = unmatched[i]) ) {
+							seed[i] = !(matches[i] = elem);
+						}
+					}
+				}) :
+				function( elem, context, xml ) {
+					input[0] = elem;
+					matcher( input, null, xml, results );
+					// Don't keep the element (issue #299)
+					input[0] = null;
+					return !results.pop();
+				};
+		}),
+
+		"has": markFunction(function( selector ) {
+			return function( elem ) {
+				return Sizzle( selector, elem ).length > 0;
+			};
+		}),
+
+		"contains": markFunction(function( text ) {
+			text = text.replace( runescape, funescape );
+			return function( elem ) {
+				return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+			};
+		}),
+
+		// "Whether an element is represented by a :lang() selector
+		// is based solely on the element's language value
+		// being equal to the identifier C,
+		// or beginning with the identifier C immediately followed by "-".
+		// The matching of C against the element's language value is performed case-insensitively.
+		// The identifier C does not have to be a valid language name."
+		// http://www.w3.org/TR/selectors/#lang-pseudo
+		"lang": markFunction( function( lang ) {
+			// lang value must be a valid identifier
+			if ( !ridentifier.test(lang || "") ) {
+				Sizzle.error( "unsupported lang: " + lang );
+			}
+			lang = lang.replace( runescape, funescape ).toLowerCase();
+			return function( elem ) {
+				var elemLang;
+				do {
+					if ( (elemLang = documentIsHTML ?
+						elem.lang :
+						elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+						elemLang = elemLang.toLowerCase();
+						return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+					}
+				} while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+				return false;
+			};
+		}),
+
+		// Miscellaneous
+		"target": function( elem ) {
+			var hash = window.location && window.location.hash;
+			return hash && hash.slice( 1 ) === elem.id;
+		},
+
+		"root": function( elem ) {
+			return elem === docElem;
+		},
+
+		"focus": function( elem ) {
+			return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+		},
+
+		// Boolean properties
+		"enabled": createDisabledPseudo( false ),
+		"disabled": createDisabledPseudo( true ),
+
+		"checked": function( elem ) {
+			// In CSS3, :checked should return both checked and selected elements
+			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+			var nodeName = elem.nodeName.toLowerCase();
+			return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+		},
+
+		"selected": function( elem ) {
+			// Accessing this property makes selected-by-default
+			// options in Safari work properly
+			if ( elem.parentNode ) {
+				elem.parentNode.selectedIndex;
+			}
+
+			return elem.selected === true;
+		},
+
+		// Contents
+		"empty": function( elem ) {
+			// http://www.w3.org/TR/selectors/#empty-pseudo
+			// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
+			//   but not by others (comment: 8; processing instruction: 7; etc.)
+			// nodeType < 6 works because attributes (2) do not appear as children
+			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+				if ( elem.nodeType < 6 ) {
+					return false;
+				}
+			}
+			return true;
+		},
+
+		"parent": function( elem ) {
+			return !Expr.pseudos["empty"]( elem );
+		},
+
+		// Element/input types
+		"header": function( elem ) {
+			return rheader.test( elem.nodeName );
+		},
+
+		"input": function( elem ) {
+			return rinputs.test( elem.nodeName );
+		},
+
+		"button": function( elem ) {
+			var name = elem.nodeName.toLowerCase();
+			return name === "input" && elem.type === "button" || name === "button";
+		},
+
+		"text": function( elem ) {
+			var attr;
+			return elem.nodeName.toLowerCase() === "input" &&
+				elem.type === "text" &&
+
+				// Support: IE<8
+				// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
+				( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
+		},
+
+		// Position-in-collection
+		"first": createPositionalPseudo(function() {
+			return [ 0 ];
+		}),
+
+		"last": createPositionalPseudo(function( matchIndexes, length ) {
+			return [ length - 1 ];
+		}),
+
+		"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			return [ argument < 0 ? argument + length : argument ];
+		}),
+
+		"even": createPositionalPseudo(function( matchIndexes, length ) {
+			var i = 0;
+			for ( ; i < length; i += 2 ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"odd": createPositionalPseudo(function( matchIndexes, length ) {
+			var i = 1;
+			for ( ; i < length; i += 2 ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			var i = argument < 0 ? argument + length : argument;
+			for ( ; --i >= 0; ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			var i = argument < 0 ? argument + length : argument;
+			for ( ; ++i < length; ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		})
+	}
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+	Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+	Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
+	var matched, match, tokens, type,
+		soFar, groups, preFilters,
+		cached = tokenCache[ selector + " " ];
+
+	if ( cached ) {
+		return parseOnly ? 0 : cached.slice( 0 );
+	}
+
+	soFar = selector;
+	groups = [];
+	preFilters = Expr.preFilter;
+
+	while ( soFar ) {
+
+		// Comma and first run
+		if ( !matched || (match = rcomma.exec( soFar )) ) {
+			if ( match ) {
+				// Don't consume trailing commas as valid
+				soFar = soFar.slice( match[0].length ) || soFar;
+			}
+			groups.push( (tokens = []) );
+		}
+
+		matched = false;
+
+		// Combinators
+		if ( (match = rcombinators.exec( soFar )) ) {
+			matched = match.shift();
+			tokens.push({
+				value: matched,
+				// Cast descendant combinators to space
+				type: match[0].replace( rtrim, " " )
+			});
+			soFar = soFar.slice( matched.length );
+		}
+
+		// Filters
+		for ( type in Expr.filter ) {
+			if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+				(match = preFilters[ type ]( match ))) ) {
+				matched = match.shift();
+				tokens.push({
+					value: matched,
+					type: type,
+					matches: match
+				});
+				soFar = soFar.slice( matched.length );
+			}
+		}
+
+		if ( !matched ) {
+			break;
+		}
+	}
+
+	// Return the length of the invalid excess
+	// if we're just parsing
+	// Otherwise, throw an error or return tokens
+	return parseOnly ?
+		soFar.length :
+		soFar ?
+			Sizzle.error( selector ) :
+			// Cache the tokens
+			tokenCache( selector, groups ).slice( 0 );
+};
+
+function toSelector( tokens ) {
+	var i = 0,
+		len = tokens.length,
+		selector = "";
+	for ( ; i < len; i++ ) {
+		selector += tokens[i].value;
+	}
+	return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+	var dir = combinator.dir,
+		skip = combinator.next,
+		key = skip || dir,
+		checkNonElements = base && key === "parentNode",
+		doneName = done++;
+
+	return combinator.first ?
+		// Check against closest ancestor/preceding element
+		function( elem, context, xml ) {
+			while ( (elem = elem[ dir ]) ) {
+				if ( elem.nodeType === 1 || checkNonElements ) {
+					return matcher( elem, context, xml );
+				}
+			}
+		} :
+
+		// Check against all ancestor/preceding elements
+		function( elem, context, xml ) {
+			var oldCache, uniqueCache, outerCache,
+				newCache = [ dirruns, doneName ];
+
+			// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
+			if ( xml ) {
+				while ( (elem = elem[ dir ]) ) {
+					if ( elem.nodeType === 1 || checkNonElements ) {
+						if ( matcher( elem, context, xml ) ) {
+							return true;
+						}
+					}
+				}
+			} else {
+				while ( (elem = elem[ dir ]) ) {
+					if ( elem.nodeType === 1 || checkNonElements ) {
+						outerCache = elem[ expando ] || (elem[ expando ] = {});
+
+						// Support: IE <9 only
+						// Defend against cloned attroperties (jQuery gh-1709)
+						uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
+
+						if ( skip && skip === elem.nodeName.toLowerCase() ) {
+							elem = elem[ dir ] || elem;
+						} else if ( (oldCache = uniqueCache[ key ]) &&
+							oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
+
+							// Assign to newCache so results back-propagate to previous elements
+							return (newCache[ 2 ] = oldCache[ 2 ]);
+						} else {
+							// Reuse newcache so results back-propagate to previous elements
+							uniqueCache[ key ] = newCache;
+
+							// A match means we're done; a fail means we have to keep checking
+							if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
+								return true;
+							}
+						}
+					}
+				}
+			}
+		};
+}
+
+function elementMatcher( matchers ) {
+	return matchers.length > 1 ?
+		function( elem, context, xml ) {
+			var i = matchers.length;
+			while ( i-- ) {
+				if ( !matchers[i]( elem, context, xml ) ) {
+					return false;
+				}
+			}
+			return true;
+		} :
+		matchers[0];
+}
+
+function multipleContexts( selector, contexts, results ) {
+	var i = 0,
+		len = contexts.length;
+	for ( ; i < len; i++ ) {
+		Sizzle( selector, contexts[i], results );
+	}
+	return results;
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+	var elem,
+		newUnmatched = [],
+		i = 0,
+		len = unmatched.length,
+		mapped = map != null;
+
+	for ( ; i < len; i++ ) {
+		if ( (elem = unmatched[i]) ) {
+			if ( !filter || filter( elem, context, xml ) ) {
+				newUnmatched.push( elem );
+				if ( mapped ) {
+					map.push( i );
+				}
+			}
+		}
+	}
+
+	return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+	if ( postFilter && !postFilter[ expando ] ) {
+		postFilter = setMatcher( postFilter );
+	}
+	if ( postFinder && !postFinder[ expando ] ) {
+		postFinder = setMatcher( postFinder, postSelector );
+	}
+	return markFunction(function( seed, results, context, xml ) {
+		var temp, i, elem,
+			preMap = [],
+			postMap = [],
+			preexisting = results.length,
+
+			// Get initial elements from seed or context
+			elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+			// Prefilter to get matcher input, preserving a map for seed-results synchronization
+			matcherIn = preFilter && ( seed || !selector ) ?
+				condense( elems, preMap, preFilter, context, xml ) :
+				elems,
+
+			matcherOut = matcher ?
+				// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+				postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+					// ...intermediate processing is necessary
+					[] :
+
+					// ...otherwise use results directly
+					results :
+				matcherIn;
+
+		// Find primary matches
+		if ( matcher ) {
+			matcher( matcherIn, matcherOut, context, xml );
+		}
+
+		// Apply postFilter
+		if ( postFilter ) {
+			temp = condense( matcherOut, postMap );
+			postFilter( temp, [], context, xml );
+
+			// Un-match failing elements by moving them back to matcherIn
+			i = temp.length;
+			while ( i-- ) {
+				if ( (elem = temp[i]) ) {
+					matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+				}
+			}
+		}
+
+		if ( seed ) {
+			if ( postFinder || preFilter ) {
+				if ( postFinder ) {
+					// Get the final matcherOut by condensing this intermediate into postFinder contexts
+					temp = [];
+					i = matcherOut.length;
+					while ( i-- ) {
+						if ( (elem = matcherOut[i]) ) {
+							// Restore matcherIn since elem is not yet a final match
+							temp.push( (matcherIn[i] = elem) );
+						}
+					}
+					postFinder( null, (matcherOut = []), temp, xml );
+				}
+
+				// Move matched elements from seed to results to keep them synchronized
+				i = matcherOut.length;
+				while ( i-- ) {
+					if ( (elem = matcherOut[i]) &&
+						(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
+
+						seed[temp] = !(results[temp] = elem);
+					}
+				}
+			}
+
+		// Add elements to results, through postFinder if defined
+		} else {
+			matcherOut = condense(
+				matcherOut === results ?
+					matcherOut.splice( preexisting, matcherOut.length ) :
+					matcherOut
+			);
+			if ( postFinder ) {
+				postFinder( null, results, matcherOut, xml );
+			} else {
+				push.apply( results, matcherOut );
+			}
+		}
+	});
+}
+
+function matcherFromTokens( tokens ) {
+	var checkContext, matcher, j,
+		len = tokens.length,
+		leadingRelative = Expr.relative[ tokens[0].type ],
+		implicitRelative = leadingRelative || Expr.relative[" "],
+		i = leadingRelative ? 1 : 0,
+
+		// The foundational matcher ensures that elements are reachable from top-level context(s)
+		matchContext = addCombinator( function( elem ) {
+			return elem === checkContext;
+		}, implicitRelative, true ),
+		matchAnyContext = addCombinator( function( elem ) {
+			return indexOf( checkContext, elem ) > -1;
+		}, implicitRelative, true ),
+		matchers = [ function( elem, context, xml ) {
+			var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+				(checkContext = context).nodeType ?
+					matchContext( elem, context, xml ) :
+					matchAnyContext( elem, context, xml ) );
+			// Avoid hanging onto element (issue #299)
+			checkContext = null;
+			return ret;
+		} ];
+
+	for ( ; i < len; i++ ) {
+		if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+			matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+		} else {
+			matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+			// Return special upon seeing a positional matcher
+			if ( matcher[ expando ] ) {
+				// Find the next relative operator (if any) for proper handling
+				j = ++i;
+				for ( ; j < len; j++ ) {
+					if ( Expr.relative[ tokens[j].type ] ) {
+						break;
+					}
+				}
+				return setMatcher(
+					i > 1 && elementMatcher( matchers ),
+					i > 1 && toSelector(
+						// If the preceding token was a descendant combinator, insert an implicit any-element `*`
+						tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+					).replace( rtrim, "$1" ),
+					matcher,
+					i < j && matcherFromTokens( tokens.slice( i, j ) ),
+					j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+					j < len && toSelector( tokens )
+				);
+			}
+			matchers.push( matcher );
+		}
+	}
+
+	return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+	var bySet = setMatchers.length > 0,
+		byElement = elementMatchers.length > 0,
+		superMatcher = function( seed, context, xml, results, outermost ) {
+			var elem, j, matcher,
+				matchedCount = 0,
+				i = "0",
+				unmatched = seed && [],
+				setMatched = [],
+				contextBackup = outermostContext,
+				// We must always have either seed elements or outermost context
+				elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
+				// Use integer dirruns iff this is the outermost matcher
+				dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
+				len = elems.length;
+
+			if ( outermost ) {
+				outermostContext = context === document || context || outermost;
+			}
+
+			// Add elements passing elementMatchers directly to results
+			// Support: IE<9, Safari
+			// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
+			for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
+				if ( byElement && elem ) {
+					j = 0;
+					if ( !context && elem.ownerDocument !== document ) {
+						setDocument( elem );
+						xml = !documentIsHTML;
+					}
+					while ( (matcher = elementMatchers[j++]) ) {
+						if ( matcher( elem, context || document, xml) ) {
+							results.push( elem );
+							break;
+						}
+					}
+					if ( outermost ) {
+						dirruns = dirrunsUnique;
+					}
+				}
+
+				// Track unmatched elements for set filters
+				if ( bySet ) {
+					// They will have gone through all possible matchers
+					if ( (elem = !matcher && elem) ) {
+						matchedCount--;
+					}
+
+					// Lengthen the array for every element, matched or not
+					if ( seed ) {
+						unmatched.push( elem );
+					}
+				}
+			}
+
+			// `i` is now the count of elements visited above, and adding it to `matchedCount`
+			// makes the latter nonnegative.
+			matchedCount += i;
+
+			// Apply set filters to unmatched elements
+			// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
+			// equals `i`), unless we didn't visit _any_ elements in the above loop because we have
+			// no element matchers and no seed.
+			// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
+			// case, which will result in a "00" `matchedCount` that differs from `i` but is also
+			// numerically zero.
+			if ( bySet && i !== matchedCount ) {
+				j = 0;
+				while ( (matcher = setMatchers[j++]) ) {
+					matcher( unmatched, setMatched, context, xml );
+				}
+
+				if ( seed ) {
+					// Reintegrate element matches to eliminate the need for sorting
+					if ( matchedCount > 0 ) {
+						while ( i-- ) {
+							if ( !(unmatched[i] || setMatched[i]) ) {
+								setMatched[i] = pop.call( results );
+							}
+						}
+					}
+
+					// Discard index placeholder values to get only actual matches
+					setMatched = condense( setMatched );
+				}
+
+				// Add matches to results
+				push.apply( results, setMatched );
+
+				// Seedless set matches succeeding multiple successful matchers stipulate sorting
+				if ( outermost && !seed && setMatched.length > 0 &&
+					( matchedCount + setMatchers.length ) > 1 ) {
+
+					Sizzle.uniqueSort( results );
+				}
+			}
+
+			// Override manipulation of globals by nested matchers
+			if ( outermost ) {
+				dirruns = dirrunsUnique;
+				outermostContext = contextBackup;
+			}
+
+			return unmatched;
+		};
+
+	return bySet ?
+		markFunction( superMatcher ) :
+		superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
+	var i,
+		setMatchers = [],
+		elementMatchers = [],
+		cached = compilerCache[ selector + " " ];
+
+	if ( !cached ) {
+		// Generate a function of recursive functions that can be used to check each element
+		if ( !match ) {
+			match = tokenize( selector );
+		}
+		i = match.length;
+		while ( i-- ) {
+			cached = matcherFromTokens( match[i] );
+			if ( cached[ expando ] ) {
+				setMatchers.push( cached );
+			} else {
+				elementMatchers.push( cached );
+			}
+		}
+
+		// Cache the compiled function
+		cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+
+		// Save selector and tokenization
+		cached.selector = selector;
+	}
+	return cached;
+};
+
+/**
+ * A low-level selection function that works with Sizzle's compiled
+ *  selector functions
+ * @param {String|Function} selector A selector or a pre-compiled
+ *  selector function built with Sizzle.compile
+ * @param {Element} context
+ * @param {Array} [results]
+ * @param {Array} [seed] A set of elements to match against
+ */
+select = Sizzle.select = function( selector, context, results, seed ) {
+	var i, tokens, token, type, find,
+		compiled = typeof selector === "function" && selector,
+		match = !seed && tokenize( (selector = compiled.selector || selector) );
+
+	results = results || [];
+
+	// Try to minimize operations if there is only one selector in the list and no seed
+	// (the latter of which guarantees us context)
+	if ( match.length === 1 ) {
+
+		// Reduce context if the leading compound selector is an ID
+		tokens = match[0] = match[0].slice( 0 );
+		if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+				support.getById && context.nodeType === 9 && documentIsHTML &&
+				Expr.relative[ tokens[1].type ] ) {
+
+			context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+			if ( !context ) {
+				return results;
+
+			// Precompiled matchers will still verify ancestry, so step up a level
+			} else if ( compiled ) {
+				context = context.parentNode;
+			}
+
+			selector = selector.slice( tokens.shift().value.length );
+		}
+
+		// Fetch a seed set for right-to-left matching
+		i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+		while ( i-- ) {
+			token = tokens[i];
+
+			// Abort if we hit a combinator
+			if ( Expr.relative[ (type = token.type) ] ) {
+				break;
+			}
+			if ( (find = Expr.find[ type ]) ) {
+				// Search, expanding context for leading sibling combinators
+				if ( (seed = find(
+					token.matches[0].replace( runescape, funescape ),
+					rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
+				)) ) {
+
+					// If seed is empty or no tokens remain, we can return early
+					tokens.splice( i, 1 );
+					selector = seed.length && toSelector( tokens );
+					if ( !selector ) {
+						push.apply( results, seed );
+						return results;
+					}
+
+					break;
+				}
+			}
+		}
+	}
+
+	// Compile and execute a filtering function if one is not provided
+	// Provide `match` to avoid retokenization if we modified the selector above
+	( compiled || compile( selector, match ) )(
+		seed,
+		context,
+		!documentIsHTML,
+		results,
+		!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
+	);
+	return results;
+};
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome 14-35+
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = !!hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( el ) {
+	// Should return 1, but returns 4 (following)
+	return el.compareDocumentPosition( document.createElement("fieldset") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( el ) {
+	el.innerHTML = "<a href='#'></a>";
+	return el.firstChild.getAttribute("href") === "#" ;
+}) ) {
+	addHandle( "type|href|height|width", function( elem, name, isXML ) {
+		if ( !isXML ) {
+			return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+		}
+	});
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( el ) {
+	el.innerHTML = "<input/>";
+	el.firstChild.setAttribute( "value", "" );
+	return el.firstChild.getAttribute( "value" ) === "";
+}) ) {
+	addHandle( "value", function( elem, name, isXML ) {
+		if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+			return elem.defaultValue;
+		}
+	});
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( el ) {
+	return el.getAttribute("disabled") == null;
+}) ) {
+	addHandle( booleans, function( elem, name, isXML ) {
+		var val;
+		if ( !isXML ) {
+			return elem[ name ] === true ? name.toLowerCase() :
+					(val = elem.getAttributeNode( name )) && val.specified ?
+					val.value :
+				null;
+		}
+	});
+}
+
+return Sizzle;
+
+})( window );
+
+
+
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+
+// Deprecated
+jQuery.expr[ ":" ] = jQuery.expr.pseudos;
+jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+jQuery.escapeSelector = Sizzle.escape;
+
+
+
+
+var dir = function( elem, dir, until ) {
+	var matched = [],
+		truncate = until !== undefined;
+
+	while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
+		if ( elem.nodeType === 1 ) {
+			if ( truncate && jQuery( elem ).is( until ) ) {
+				break;
+			}
+			matched.push( elem );
+		}
+	}
+	return matched;
+};
+
+
+var siblings = function( n, elem ) {
+	var matched = [];
+
+	for ( ; n; n = n.nextSibling ) {
+		if ( n.nodeType === 1 && n !== elem ) {
+			matched.push( n );
+		}
+	}
+
+	return matched;
+};
+
+
+var rneedsContext = jQuery.expr.match.needsContext;
+
+var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
+
+
+
+var risSimple = /^.[^:#\[\.,]*$/;
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, not ) {
+	if ( jQuery.isFunction( qualifier ) ) {
+		return jQuery.grep( elements, function( elem, i ) {
+			return !!qualifier.call( elem, i, elem ) !== not;
+		} );
+
+	}
+
+	if ( qualifier.nodeType ) {
+		return jQuery.grep( elements, function( elem ) {
+			return ( elem === qualifier ) !== not;
+		} );
+
+	}
+
+	if ( typeof qualifier === "string" ) {
+		if ( risSimple.test( qualifier ) ) {
+			return jQuery.filter( qualifier, elements, not );
+		}
+
+		qualifier = jQuery.filter( qualifier, elements );
+	}
+
+	return jQuery.grep( elements, function( elem ) {
+		return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;
+	} );
+}
+
+jQuery.filter = function( expr, elems, not ) {
+	var elem = elems[ 0 ];
+
+	if ( not ) {
+		expr = ":not(" + expr + ")";
+	}
+
+	return elems.length === 1 && elem.nodeType === 1 ?
+		jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
+		jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
+			return elem.nodeType === 1;
+		} ) );
+};
+
+jQuery.fn.extend( {
+	find: function( selector ) {
+		var i, ret,
+			len = this.length,
+			self = this;
+
+		if ( typeof selector !== "string" ) {
+			return this.pushStack( jQuery( selector ).filter( function() {
+				for ( i = 0; i < len; i++ ) {
+					if ( jQuery.contains( self[ i ], this ) ) {
+						return true;
+					}
+				}
+			} ) );
+		}
+
+		ret = this.pushStack( [] );
+
+		for ( i = 0; i < len; i++ ) {
+			jQuery.find( selector, self[ i ], ret );
+		}
+
+		return len > 1 ? jQuery.uniqueSort( ret ) : ret;
+	},
+	filter: function( selector ) {
+		return this.pushStack( winnow( this, selector || [], false ) );
+	},
+	not: function( selector ) {
+		return this.pushStack( winnow( this, selector || [], true ) );
+	},
+	is: function( selector ) {
+		return !!winnow(
+			this,
+
+			// If this is a positional/relative selector, check membership in the returned set
+			// so $("p:first").is("p:last") won't return true for a doc with two "p".
+			typeof selector === "string" && rneedsContext.test( selector ) ?
+				jQuery( selector ) :
+				selector || [],
+			false
+		).length;
+	}
+} );
+
+
+// Initialize a jQuery object
+
+
+// A central reference to the root jQuery(document)
+var rootjQuery,
+
+	// A simple way to check for HTML strings
+	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+	// Strict HTML recognition (#11290: must start with <)
+	// Shortcut simple #id case for speed
+	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
+
+	init = jQuery.fn.init = function( selector, context, root ) {
+		var match, elem;
+
+		// HANDLE: $(""), $(null), $(undefined), $(false)
+		if ( !selector ) {
+			return this;
+		}
+
+		// Method init() accepts an alternate rootjQuery
+		// so migrate can support jQuery.sub (gh-2101)
+		root = root || rootjQuery;
+
+		// Handle HTML strings
+		if ( typeof selector === "string" ) {
+			if ( selector[ 0 ] === "<" &&
+				selector[ selector.length - 1 ] === ">" &&
+				selector.length >= 3 ) {
+
+				// Assume that strings that start and end with <> are HTML and skip the regex check
+				match = [ null, selector, null ];
+
+			} else {
+				match = rquickExpr.exec( selector );
+			}
+
+			// Match html or make sure no context is specified for #id
+			if ( match && ( match[ 1 ] || !context ) ) {
+
+				// HANDLE: $(html) -> $(array)
+				if ( match[ 1 ] ) {
+					context = context instanceof jQuery ? context[ 0 ] : context;
+
+					// Option to run scripts is true for back-compat
+					// Intentionally let the error be thrown if parseHTML is not present
+					jQuery.merge( this, jQuery.parseHTML(
+						match[ 1 ],
+						context && context.nodeType ? context.ownerDocument || context : document,
+						true
+					) );
+
+					// HANDLE: $(html, props)
+					if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
+						for ( match in context ) {
+
+							// Properties of context are called as methods if possible
+							if ( jQuery.isFunction( this[ match ] ) ) {
+								this[ match ]( context[ match ] );
+
+							// ...and otherwise set as attributes
+							} else {
+								this.attr( match, context[ match ] );
+							}
+						}
+					}
+
+					return this;
+
+				// HANDLE: $(#id)
+				} else {
+					elem = document.getElementById( match[ 2 ] );
+
+					if ( elem ) {
+
+						// Inject the element directly into the jQuery object
+						this[ 0 ] = elem;
+						this.length = 1;
+					}
+					return this;
+				}
+
+			// HANDLE: $(expr, $(...))
+			} else if ( !context || context.jquery ) {
+				return ( context || root ).find( selector );
+
+			// HANDLE: $(expr, context)
+			// (which is just equivalent to: $(context).find(expr)
+			} else {
+				return this.constructor( context ).find( selector );
+			}
+
+		// HANDLE: $(DOMElement)
+		} else if ( selector.nodeType ) {
+			this[ 0 ] = selector;
+			this.length = 1;
+			return this;
+
+		// HANDLE: $(function)
+		// Shortcut for document ready
+		} else if ( jQuery.isFunction( selector ) ) {
+			return root.ready !== undefined ?
+				root.ready( selector ) :
+
+				// Execute immediately if ready is not present
+				selector( jQuery );
+		}
+
+		return jQuery.makeArray( selector, this );
+	};
+
+// Give the init function the jQuery prototype for later instantiation
+init.prototype = jQuery.fn;
+
+// Initialize central reference
+rootjQuery = jQuery( document );
+
+
+var rparentsprev = /^(?:parents|prev(?:Until|All))/,
+
+	// Methods guaranteed to produce a unique set when starting from a unique set
+	guaranteedUnique = {
+		children: true,
+		contents: true,
+		next: true,
+		prev: true
+	};
+
+jQuery.fn.extend( {
+	has: function( target ) {
+		var targets = jQuery( target, this ),
+			l = targets.length;
+
+		return this.filter( function() {
+			var i = 0;
+			for ( ; i < l; i++ ) {
+				if ( jQuery.contains( this, targets[ i ] ) ) {
+					return true;
+				}
+			}
+		} );
+	},
+
+	closest: function( selectors, context ) {
+		var cur,
+			i = 0,
+			l = this.length,
+			matched = [],
+			targets = typeof selectors !== "string" && jQuery( selectors );
+
+		// Positional selectors never match, since there's no _selection_ context
+		if ( !rneedsContext.test( selectors ) ) {
+			for ( ; i < l; i++ ) {
+				for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
+
+					// Always skip document fragments
+					if ( cur.nodeType < 11 && ( targets ?
+						targets.index( cur ) > -1 :
+
+						// Don't pass non-elements to Sizzle
+						cur.nodeType === 1 &&
+							jQuery.find.matchesSelector( cur, selectors ) ) ) {
+
+						matched.push( cur );
+						break;
+					}
+				}
+			}
+		}
+
+		return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
+	},
+
+	// Determine the position of an element within the set
+	index: function( elem ) {
+
+		// No argument, return index in parent
+		if ( !elem ) {
+			return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
+		}
+
+		// Index in selector
+		if ( typeof elem === "string" ) {
+			return indexOf.call( jQuery( elem ), this[ 0 ] );
+		}
+
+		// Locate the position of the desired element
+		return indexOf.call( this,
+
+			// If it receives a jQuery object, the first element is used
+			elem.jquery ? elem[ 0 ] : elem
+		);
+	},
+
+	add: function( selector, context ) {
+		return this.pushStack(
+			jQuery.uniqueSort(
+				jQuery.merge( this.get(), jQuery( selector, context ) )
+			)
+		);
+	},
+
+	addBack: function( selector ) {
+		return this.add( selector == null ?
+			this.prevObject : this.prevObject.filter( selector )
+		);
+	}
+} );
+
+function sibling( cur, dir ) {
+	while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
+	return cur;
+}
+
+jQuery.each( {
+	parent: function( elem ) {
+		var parent = elem.parentNode;
+		return parent && parent.nodeType !== 11 ? parent : null;
+	},
+	parents: function( elem ) {
+		return dir( elem, "parentNode" );
+	},
+	parentsUntil: function( elem, i, until ) {
+		return dir( elem, "parentNode", until );
+	},
+	next: function( elem ) {
+		return sibling( elem, "nextSibling" );
+	},
+	prev: function( elem ) {
+		return sibling( elem, "previousSibling" );
+	},
+	nextAll: function( elem ) {
+		return dir( elem, "nextSibling" );
+	},
+	prevAll: function( elem ) {
+		return dir( elem, "previousSibling" );
+	},
+	nextUntil: function( elem, i, until ) {
+		return dir( elem, "nextSibling", until );
+	},
+	prevUntil: function( elem, i, until ) {
+		return dir( elem, "previousSibling", until );
+	},
+	siblings: function( elem ) {
+		return siblings( ( elem.parentNode || {} ).firstChild, elem );
+	},
+	children: function( elem ) {
+		return siblings( elem.firstChild );
+	},
+	contents: function( elem ) {
+		return elem.contentDocument || jQuery.merge( [], elem.childNodes );
+	}
+}, function( name, fn ) {
+	jQuery.fn[ name ] = function( until, selector ) {
+		var matched = jQuery.map( this, fn, until );
+
+		if ( name.slice( -5 ) !== "Until" ) {
+			selector = until;
+		}
+
+		if ( selector && typeof selector === "string" ) {
+			matched = jQuery.filter( selector, matched );
+		}
+
+		if ( this.length > 1 ) {
+
+			// Remove duplicates
+			if ( !guaranteedUnique[ name ] ) {
+				jQuery.uniqueSort( matched );
+			}
+
+			// Reverse order for parents* and prev-derivatives
+			if ( rparentsprev.test( name ) ) {
+				matched.reverse();
+			}
+		}
+
+		return this.pushStack( matched );
+	};
+} );
+var rnotwhite = ( /\S+/g );
+
+
+
+// Convert String-formatted options into Object-formatted ones
+function createOptions( options ) {
+	var object = {};
+	jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
+		object[ flag ] = true;
+	} );
+	return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ *	options: an optional list of space-separated options that will change how
+ *			the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ *	once:			will ensure the callback list can only be fired once (like a Deferred)
+ *
+ *	memory:			will keep track of previous values and will call any callback added
+ *					after the list has been fired right away with the latest "memorized"
+ *					values (like a Deferred)
+ *
+ *	unique:			will ensure a callback can only be added once (no duplicate in the list)
+ *
+ *	stopOnFalse:	interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+	// Convert options from String-formatted to Object-formatted if needed
+	// (we check in cache first)
+	options = typeof options === "string" ?
+		createOptions( options ) :
+		jQuery.extend( {}, options );
+
+	var // Flag to know if list is currently firing
+		firing,
+
+		// Last fire value for non-forgettable lists
+		memory,
+
+		// Flag to know if list was already fired
+		fired,
+
+		// Flag to prevent firing
+		locked,
+
+		// Actual callback list
+		list = [],
+
+		// Queue of execution data for repeatable lists
+		queue = [],
+
+		// Index of currently firing callback (modified by add/remove as needed)
+		firingIndex = -1,
+
+		// Fire callbacks
+		fire = function() {
+
+			// Enforce single-firing
+			locked = options.once;
+
+			// Execute callbacks for all pending executions,
+			// respecting firingIndex overrides and runtime changes
+			fired = firing = true;
+			for ( ; queue.length; firingIndex = -1 ) {
+				memory = queue.shift();
+				while ( ++firingIndex < list.length ) {
+
+					// Run callback and check for early termination
+					if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
+						options.stopOnFalse ) {
+
+						// Jump to end and forget the data so .add doesn't re-fire
+						firingIndex = list.length;
+						memory = false;
+					}
+				}
+			}
+
+			// Forget the data if we're done with it
+			if ( !options.memory ) {
+				memory = false;
+			}
+
+			firing = false;
+
+			// Clean up if we're done firing for good
+			if ( locked ) {
+
+				// Keep an empty list if we have data for future add calls
+				if ( memory ) {
+					list = [];
+
+				// Otherwise, this object is spent
+				} else {
+					list = "";
+				}
+			}
+		},
+
+		// Actual Callbacks object
+		self = {
+
+			// Add a callback or a collection of callbacks to the list
+			add: function() {
+				if ( list ) {
+
+					// If we have memory from a past run, we should fire after adding
+					if ( memory && !firing ) {
+						firingIndex = list.length - 1;
+						queue.push( memory );
+					}
+
+					( function add( args ) {
+						jQuery.each( args, function( _, arg ) {
+							if ( jQuery.isFunction( arg ) ) {
+								if ( !options.unique || !self.has( arg ) ) {
+									list.push( arg );
+								}
+							} else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {
+
+								// Inspect recursively
+								add( arg );
+							}
+						} );
+					} )( arguments );
+
+					if ( memory && !firing ) {
+						fire();
+					}
+				}
+				return this;
+			},
+
+			// Remove a callback from the list
+			remove: function() {
+				jQuery.each( arguments, function( _, arg ) {
+					var index;
+					while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+						list.splice( index, 1 );
+
+						// Handle firing indexes
+						if ( index <= firingIndex ) {
+							firingIndex--;
+						}
+					}
+				} );
+				return this;
+			},
+
+			// Check if a given callback is in the list.
+			// If no argument is given, return whether or not list has callbacks attached.
+			has: function( fn ) {
+				return fn ?
+					jQuery.inArray( fn, list ) > -1 :
+					list.length > 0;
+			},
+
+			// Remove all callbacks from the list
+			empty: function() {
+				if ( list ) {
+					list = [];
+				}
+				return this;
+			},
+
+			// Disable .fire and .add
+			// Abort any current/pending executions
+			// Clear all callbacks and values
+			disable: function() {
+				locked = queue = [];
+				list = memory = "";
+				return this;
+			},
+			disabled: function() {
+				return !list;
+			},
+
+			// Disable .fire
+			// Also disable .add unless we have memory (since it would have no effect)
+			// Abort any pending executions
+			lock: function() {
+				locked = queue = [];
+				if ( !memory && !firing ) {
+					list = memory = "";
+				}
+				return this;
+			},
+			locked: function() {
+				return !!locked;
+			},
+
+			// Call all callbacks with the given context and arguments
+			fireWith: function( context, args ) {
+				if ( !locked ) {
+					args = args || [];
+					args = [ context, args.slice ? args.slice() : args ];
+					queue.push( args );
+					if ( !firing ) {
+						fire();
+					}
+				}
+				return this;
+			},
+
+			// Call all the callbacks with the given arguments
+			fire: function() {
+				self.fireWith( this, arguments );
+				return this;
+			},
+
+			// To know if the callbacks have already been called at least once
+			fired: function() {
+				return !!fired;
+			}
+		};
+
+	return self;
+};
+
+
+function Identity( v ) {
+	return v;
+}
+function Thrower( ex ) {
+	throw ex;
+}
+
+function adoptValue( value, resolve, reject ) {
+	var method;
+
+	try {
+
+		// Check for promise aspect first to privilege synchronous behavior
+		if ( value && jQuery.isFunction( ( method = value.promise ) ) ) {
+			method.call( value ).done( resolve ).fail( reject );
+
+		// Other thenables
+		} else if ( value && jQuery.isFunction( ( method = value.then ) ) ) {
+			method.call( value, resolve, reject );
+
+		// Other non-thenables
+		} else {
+
+			// Support: Android 4.0 only
+			// Strict mode functions invoked without .call/.apply get global-object context
+			resolve.call( undefined, value );
+		}
+
+	// For Promises/A+, convert exceptions into rejections
+	// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
+	// Deferred#then to conditionally suppress rejection.
+	} catch ( value ) {
+
+		// Support: Android 4.0 only
+		// Strict mode functions invoked without .call/.apply get global-object context
+		reject.call( undefined, value );
+	}
+}
+
+jQuery.extend( {
+
+	Deferred: function( func ) {
+		var tuples = [
+
+				// action, add listener, callbacks,
+				// ... .then handlers, argument index, [final state]
+				[ "notify", "progress", jQuery.Callbacks( "memory" ),
+					jQuery.Callbacks( "memory" ), 2 ],
+				[ "resolve", "done", jQuery.Callbacks( "once memory" ),
+					jQuery.Callbacks( "once memory" ), 0, "resolved" ],
+				[ "reject", "fail", jQuery.Callbacks( "once memory" ),
+					jQuery.Callbacks( "once memory" ), 1, "rejected" ]
+			],
+			state = "pending",
+			promise = {
+				state: function() {
+					return state;
+				},
+				always: function() {
+					deferred.done( arguments ).fail( arguments );
+					return this;
+				},
+				"catch": function( fn ) {
+					return promise.then( null, fn );
+				},
+
+				// Keep pipe for back-compat
+				pipe: function( /* fnDone, fnFail, fnProgress */ ) {
+					var fns = arguments;
+
+					return jQuery.Deferred( function( newDefer ) {
+						jQuery.each( tuples, function( i, tuple ) {
+
+							// Map tuples (progress, done, fail) to arguments (done, fail, progress)
+							var fn = jQuery.isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];
+
+							// deferred.progress(function() { bind to newDefer or newDefer.notify })
+							// deferred.done(function() { bind to newDefer or newDefer.resolve })
+							// deferred.fail(function() { bind to newDefer or newDefer.reject })
+							deferred[ tuple[ 1 ] ]( function() {
+								var returned = fn && fn.apply( this, arguments );
+								if ( returned && jQuery.isFunction( returned.promise ) ) {
+									returned.promise()
+										.progress( newDefer.notify )
+										.done( newDefer.resolve )
+										.fail( newDefer.reject );
+								} else {
+									newDefer[ tuple[ 0 ] + "With" ](
+										this,
+										fn ? [ returned ] : arguments
+									);
+								}
+							} );
+						} );
+						fns = null;
+					} ).promise();
+				},
+				then: function( onFulfilled, onRejected, onProgress ) {
+					var maxDepth = 0;
+					function resolve( depth, deferred, handler, special ) {
+						return function() {
+							var that = this,
+								args = arguments,
+								mightThrow = function() {
+									var returned, then;
+
+									// Support: Promises/A+ section 2.3.3.3.3
+									// https://promisesaplus.com/#point-59
+									// Ignore double-resolution attempts
+									if ( depth < maxDepth ) {
+										return;
+									}
+
+									returned = handler.apply( that, args );
+
+									// Support: Promises/A+ section 2.3.1
+									// https://promisesaplus.com/#point-48
+									if ( returned === deferred.promise() ) {
+										throw new TypeError( "Thenable self-resolution" );
+									}
+
+									// Support: Promises/A+ sections 2.3.3.1, 3.5
+									// https://promisesaplus.com/#point-54
+									// https://promisesaplus.com/#point-75
+									// Retrieve `then` only once
+									then = returned &&
+
+										// Support: Promises/A+ section 2.3.4
+										// https://promisesaplus.com/#point-64
+										// Only check objects and functions for thenability
+										( typeof returned === "object" ||
+											typeof returned === "function" ) &&
+										returned.then;
+
+									// Handle a returned thenable
+									if ( jQuery.isFunction( then ) ) {
+
+										// Special processors (notify) just wait for resolution
+										if ( special ) {
+											then.call(
+												returned,
+												resolve( maxDepth, deferred, Identity, special ),
+												resolve( maxDepth, deferred, Thrower, special )
+											);
+
+										// Normal processors (resolve) also hook into progress
+										} else {
+
+											// ...and disregard older resolution values
+											maxDepth++;
+
+											then.call(
+												returned,
+												resolve( maxDepth, deferred, Identity, special ),
+												resolve( maxDepth, deferred, Thrower, special ),
+												resolve( maxDepth, deferred, Identity,
+													deferred.notifyWith )
+											);
+										}
+
+									// Handle all other returned values
+									} else {
+
+										// Only substitute handlers pass on context
+										// and multiple values (non-spec behavior)
+										if ( handler !== Identity ) {
+											that = undefined;
+											args = [ returned ];
+										}
+
+										// Process the value(s)
+										// Default process is resolve
+										( special || deferred.resolveWith )( that, args );
+									}
+								},
+
+								// Only normal processors (resolve) catch and reject exceptions
+								process = special ?
+									mightThrow :
+									function() {
+										try {
+											mightThrow();
+										} catch ( e ) {
+
+											if ( jQuery.Deferred.exceptionHook ) {
+												jQuery.Deferred.exceptionHook( e,
+													process.stackTrace );
+											}
+
+											// Support: Promises/A+ section 2.3.3.3.4.1
+											// https://promisesaplus.com/#point-61
+											// Ignore post-resolution exceptions
+											if ( depth + 1 >= maxDepth ) {
+
+												// Only substitute handlers pass on context
+												// and multiple values (non-spec behavior)
+												if ( handler !== Thrower ) {
+													that = undefined;
+													args = [ e ];
+												}
+
+												deferred.rejectWith( that, args );
+											}
+										}
+									};
+
+							// Support: Promises/A+ section 2.3.3.3.1
+							// https://promisesaplus.com/#point-57
+							// Re-resolve promises immediately to dodge false rejection from
+							// subsequent errors
+							if ( depth ) {
+								process();
+							} else {
+
+								// Call an optional hook to record the stack, in case of exception
+								// since it's otherwise lost when execution goes async
+								if ( jQuery.Deferred.getStackHook ) {
+									process.stackTrace = jQuery.Deferred.getStackHook();
+								}
+								window.setTimeout( process );
+							}
+						};
+					}
+
+					return jQuery.Deferred( function( newDefer ) {
+
+						// progress_handlers.add( ... )
+						tuples[ 0 ][ 3 ].add(
+							resolve(
+								0,
+								newDefer,
+								jQuery.isFunction( onProgress ) ?
+									onProgress :
+									Identity,
+								newDefer.notifyWith
+							)
+						);
+
+						// fulfilled_handlers.add( ... )
+						tuples[ 1 ][ 3 ].add(
+							resolve(
+								0,
+								newDefer,
+								jQuery.isFunction( onFulfilled ) ?
+									onFulfilled :
+									Identity
+							)
+						);
+
+						// rejected_handlers.add( ... )
+						tuples[ 2 ][ 3 ].add(
+							resolve(
+								0,
+								newDefer,
+								jQuery.isFunction( onRejected ) ?
+									onRejected :
+									Thrower
+							)
+						);
+					} ).promise();
+				},
+
+				// Get a promise for this deferred
+				// If obj is provided, the promise aspect is added to the object
+				promise: function( obj ) {
+					return obj != null ? jQuery.extend( obj, promise ) : promise;
+				}
+			},
+			deferred = {};
+
+		// Add list-specific methods
+		jQuery.each( tuples, function( i, tuple ) {
+			var list = tuple[ 2 ],
+				stateString = tuple[ 5 ];
+
+			// promise.progress = list.add
+			// promise.done = list.add
+			// promise.fail = list.add
+			promise[ tuple[ 1 ] ] = list.add;
+
+			// Handle state
+			if ( stateString ) {
+				list.add(
+					function() {
+
+						// state = "resolved" (i.e., fulfilled)
+						// state = "rejected"
+						state = stateString;
+					},
+
+					// rejected_callbacks.disable
+					// fulfilled_callbacks.disable
+					tuples[ 3 - i ][ 2 ].disable,
+
+					// progress_callbacks.lock
+					tuples[ 0 ][ 2 ].lock
+				);
+			}
+
+			// progress_handlers.fire
+			// fulfilled_handlers.fire
+			// rejected_handlers.fire
+			list.add( tuple[ 3 ].fire );
+
+			// deferred.notify = function() { deferred.notifyWith(...) }
+			// deferred.resolve = function() { deferred.resolveWith(...) }
+			// deferred.reject = function() { deferred.rejectWith(...) }
+			deferred[ tuple[ 0 ] ] = function() {
+				deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
+				return this;
+			};
+
+			// deferred.notifyWith = list.fireWith
+			// deferred.resolveWith = list.fireWith
+			// deferred.rejectWith = list.fireWith
+			deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
+		} );
+
+		// Make the deferred a promise
+		promise.promise( deferred );
+
+		// Call given func if any
+		if ( func ) {
+			func.call( deferred, deferred );
+		}
+
+		// All done!
+		return deferred;
+	},
+
+	// Deferred helper
+	when: function( singleValue ) {
+		var
+
+			// count of uncompleted subordinates
+			remaining = arguments.length,
+
+			// count of unprocessed arguments
+			i = remaining,
+
+			// subordinate fulfillment data
+			resolveContexts = Array( i ),
+			resolveValues = slice.call( arguments ),
+
+			// the master Deferred
+			master = jQuery.Deferred(),
+
+			// subordinate callback factory
+			updateFunc = function( i ) {
+				return function( value ) {
+					resolveContexts[ i ] = this;
+					resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
+					if ( !( --remaining ) ) {
+						master.resolveWith( resolveContexts, resolveValues );
+					}
+				};
+			};
+
+		// Single- and empty arguments are adopted like Promise.resolve
+		if ( remaining <= 1 ) {
+			adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject );
+
+			// Use .then() to unwrap secondary thenables (cf. gh-3000)
+			if ( master.state() === "pending" ||
+				jQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
+
+				return master.then();
+			}
+		}
+
+		// Multiple arguments are aggregated like Promise.all array elements
+		while ( i-- ) {
+			adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );
+		}
+
+		return master.promise();
+	}
+} );
+
+
+// These usually indicate a programmer mistake during development,
+// warn about them ASAP rather than swallowing them by default.
+var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
+
+jQuery.Deferred.exceptionHook = function( error, stack ) {
+
+	// Support: IE 8 - 9 only
+	// Console exists when dev tools are open, which can happen at any time
+	if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
+		window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );
+	}
+};
+
+
+
+
+jQuery.readyException = function( error ) {
+	window.setTimeout( function() {
+		throw error;
+	} );
+};
+
+
+
+
+// The deferred used on DOM ready
+var readyList = jQuery.Deferred();
+
+jQuery.fn.ready = function( fn ) {
+
+	readyList
+		.then( fn )
+
+		// Wrap jQuery.readyException in a function so that the lookup
+		// happens at the time of error handling instead of callback
+		// registration.
+		.catch( function( error ) {
+			jQuery.readyException( error );
+		} );
+
+	return this;
+};
+
+jQuery.extend( {
+
+	// Is the DOM ready to be used? Set to true once it occurs.
+	isReady: false,
+
+	// A counter to track how many items to wait for before
+	// the ready event fires. See #6781
+	readyWait: 1,
+
+	// Hold (or release) the ready event
+	holdReady: function( hold ) {
+		if ( hold ) {
+			jQuery.readyWait++;
+		} else {
+			jQuery.ready( true );
+		}
+	},
+
+	// Handle when the DOM is ready
+	ready: function( wait ) {
+
+		// Abort if there are pending holds or we're already ready
+		if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+			return;
+		}
+
+		// Remember that the DOM is ready
+		jQuery.isReady = true;
+
+		// If a normal DOM Ready event fired, decrement, and wait if need be
+		if ( wait !== true && --jQuery.readyWait > 0 ) {
+			return;
+		}
+
+		// If there are functions bound, to execute
+		readyList.resolveWith( document, [ jQuery ] );
+	}
+} );
+
+jQuery.ready.then = readyList.then;
+
+// The ready event handler and self cleanup method
+function completed() {
+	document.removeEventListener( "DOMContentLoaded", completed );
+	window.removeEventListener( "load", completed );
+	jQuery.ready();
+}
+
+// Catch cases where $(document).ready() is called
+// after the browser event has already occurred.
+// Support: IE <=9 - 10 only
+// Older IE sometimes signals "interactive" too soon
+if ( document.readyState === "complete" ||
+	( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
+
+	// Handle it asynchronously to allow scripts the opportunity to delay ready
+	window.setTimeout( jQuery.ready );
+
+} else {
+
+	// Use the handy event callback
+	document.addEventListener( "DOMContentLoaded", completed );
+
+	// A fallback to window.onload, that will always work
+	window.addEventListener( "load", completed );
+}
+
+
+
+
+// Multifunctional method to get and set values of a collection
+// The value/s can optionally be executed if it's a function
+var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
+	var i = 0,
+		len = elems.length,
+		bulk = key == null;
+
+	// Sets many values
+	if ( jQuery.type( key ) === "object" ) {
+		chainable = true;
+		for ( i in key ) {
+			access( elems, fn, i, key[ i ], true, emptyGet, raw );
+		}
+
+	// Sets one value
+	} else if ( value !== undefined ) {
+		chainable = true;
+
+		if ( !jQuery.isFunction( value ) ) {
+			raw = true;
+		}
+
+		if ( bulk ) {
+
+			// Bulk operations run against the entire set
+			if ( raw ) {
+				fn.call( elems, value );
+				fn = null;
+
+			// ...except when executing function values
+			} else {
+				bulk = fn;
+				fn = function( elem, key, value ) {
+					return bulk.call( jQuery( elem ), value );
+				};
+			}
+		}
+
+		if ( fn ) {
+			for ( ; i < len; i++ ) {
+				fn(
+					elems[ i ], key, raw ?
+					value :
+					value.call( elems[ i ], i, fn( elems[ i ], key ) )
+				);
+			}
+		}
+	}
+
+	return chainable ?
+		elems :
+
+		// Gets
+		bulk ?
+			fn.call( elems ) :
+			len ? fn( elems[ 0 ], key ) : emptyGet;
+};
+var acceptData = function( owner ) {
+
+	// Accepts only:
+	//  - Node
+	//    - Node.ELEMENT_NODE
+	//    - Node.DOCUMENT_NODE
+	//  - Object
+	//    - Any
+	return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
+};
+
+
+
+
+function Data() {
+	this.expando = jQuery.expando + Data.uid++;
+}
+
+Data.uid = 1;
+
+Data.prototype = {
+
+	cache: function( owner ) {
+
+		// Check if the owner object already has a cache
+		var value = owner[ this.expando ];
+
+		// If not, create one
+		if ( !value ) {
+			value = {};
+
+			// We can accept data for non-element nodes in modern browsers,
+			// but we should not, see #8335.
+			// Always return an empty object.
+			if ( acceptData( owner ) ) {
+
+				// If it is a node unlikely to be stringify-ed or looped over
+				// use plain assignment
+				if ( owner.nodeType ) {
+					owner[ this.expando ] = value;
+
+				// Otherwise secure it in a non-enumerable property
+				// configurable must be true to allow the property to be
+				// deleted when data is removed
+				} else {
+					Object.defineProperty( owner, this.expando, {
+						value: value,
+						configurable: true
+					} );
+				}
+			}
+		}
+
+		return value;
+	},
+	set: function( owner, data, value ) {
+		var prop,
+			cache = this.cache( owner );
+
+		// Handle: [ owner, key, value ] args
+		// Always use camelCase key (gh-2257)
+		if ( typeof data === "string" ) {
+			cache[ jQuery.camelCase( data ) ] = value;
+
+		// Handle: [ owner, { properties } ] args
+		} else {
+
+			// Copy the properties one-by-one to the cache object
+			for ( prop in data ) {
+				cache[ jQuery.camelCase( prop ) ] = data[ prop ];
+			}
+		}
+		return cache;
+	},
+	get: function( owner, key ) {
+		return key === undefined ?
+			this.cache( owner ) :
+
+			// Always use camelCase key (gh-2257)
+			owner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase( key ) ];
+	},
+	access: function( owner, key, value ) {
+
+		// In cases where either:
+		//
+		//   1. No key was specified
+		//   2. A string key was specified, but no value provided
+		//
+		// Take the "read" path and allow the get method to determine
+		// which value to return, respectively either:
+		//
+		//   1. The entire cache object
+		//   2. The data stored at the key
+		//
+		if ( key === undefined ||
+				( ( key && typeof key === "string" ) && value === undefined ) ) {
+
+			return this.get( owner, key );
+		}
+
+		// When the key is not a string, or both a key and value
+		// are specified, set or extend (existing objects) with either:
+		//
+		//   1. An object of properties
+		//   2. A key and value
+		//
+		this.set( owner, key, value );
+
+		// Since the "set" path can have two possible entry points
+		// return the expected data based on which path was taken[*]
+		return value !== undefined ? value : key;
+	},
+	remove: function( owner, key ) {
+		var i,
+			cache = owner[ this.expando ];
+
+		if ( cache === undefined ) {
+			return;
+		}
+
+		if ( key !== undefined ) {
+
+			// Support array or space separated string of keys
+			if ( jQuery.isArray( key ) ) {
+
+				// If key is an array of keys...
+				// We always set camelCase keys, so remove that.
+				key = key.map( jQuery.camelCase );
+			} else {
+				key = jQuery.camelCase( key );
+
+				// If a key with the spaces exists, use it.
+				// Otherwise, create an array by matching non-whitespace
+				key = key in cache ?
+					[ key ] :
+					( key.match( rnotwhite ) || [] );
+			}
+
+			i = key.length;
+
+			while ( i-- ) {
+				delete cache[ key[ i ] ];
+			}
+		}
+
+		// Remove the expando if there's no more data
+		if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
+
+			// Support: Chrome <=35 - 45
+			// Webkit & Blink performance suffers when deleting properties
+			// from DOM nodes, so set to undefined instead
+			// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
+			if ( owner.nodeType ) {
+				owner[ this.expando ] = undefined;
+			} else {
+				delete owner[ this.expando ];
+			}
+		}
+	},
+	hasData: function( owner ) {
+		var cache = owner[ this.expando ];
+		return cache !== undefined && !jQuery.isEmptyObject( cache );
+	}
+};
+var dataPriv = new Data();
+
+var dataUser = new Data();
+
+
+
+//	Implementation Summary
+//
+//	1. Enforce API surface and semantic compatibility with 1.9.x branch
+//	2. Improve the module's maintainability by reducing the storage
+//		paths to a single mechanism.
+//	3. Use the same single mechanism to support "private" and "user" data.
+//	4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
+//	5. Avoid exposing implementation details on user objects (eg. expando properties)
+//	6. Provide a clear path for implementation upgrade to WeakMap in 2014
+
+var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
+	rmultiDash = /[A-Z]/g;
+
+function dataAttr( elem, key, data ) {
+	var name;
+
+	// If nothing was found internally, try to fetch any
+	// data from the HTML5 data-* attribute
+	if ( data === undefined && elem.nodeType === 1 ) {
+		name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
+		data = elem.getAttribute( name );
+
+		if ( typeof data === "string" ) {
+			try {
+				data = data === "true" ? true :
+					data === "false" ? false :
+					data === "null" ? null :
+
+					// Only convert to a number if it doesn't change the string
+					+data + "" === data ? +data :
+					rbrace.test( data ) ? JSON.parse( data ) :
+					data;
+			} catch ( e ) {}
+
+			// Make sure we set the data so it isn't changed later
+			dataUser.set( elem, key, data );
+		} else {
+			data = undefined;
+		}
+	}
+	return data;
+}
+
+jQuery.extend( {
+	hasData: function( elem ) {
+		return dataUser.hasData( elem ) || dataPriv.hasData( elem );
+	},
+
+	data: function( elem, name, data ) {
+		return dataUser.access( elem, name, data );
+	},
+
+	removeData: function( elem, name ) {
+		dataUser.remove( elem, name );
+	},
+
+	// TODO: Now that all calls to _data and _removeData have been replaced
+	// with direct calls to dataPriv methods, these can be deprecated.
+	_data: function( elem, name, data ) {
+		return dataPriv.access( elem, name, data );
+	},
+
+	_removeData: function( elem, name ) {
+		dataPriv.remove( elem, name );
+	}
+} );
+
+jQuery.fn.extend( {
+	data: function( key, value ) {
+		var i, name, data,
+			elem = this[ 0 ],
+			attrs = elem && elem.attributes;
+
+		// Gets all values
+		if ( key === undefined ) {
+			if ( this.length ) {
+				data = dataUser.get( elem );
+
+				if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
+					i = attrs.length;
+					while ( i-- ) {
+
+						// Support: IE 11 only
+						// The attrs elements can be null (#14894)
+						if ( attrs[ i ] ) {
+							name = attrs[ i ].name;
+							if ( name.indexOf( "data-" ) === 0 ) {
+								name = jQuery.camelCase( name.slice( 5 ) );
+								dataAttr( elem, name, data[ name ] );
+							}
+						}
+					}
+					dataPriv.set( elem, "hasDataAttrs", true );
+				}
+			}
+
+			return data;
+		}
+
+		// Sets multiple values
+		if ( typeof key === "object" ) {
+			return this.each( function() {
+				dataUser.set( this, key );
+			} );
+		}
+
+		return access( this, function( value ) {
+			var data;
+
+			// The calling jQuery object (element matches) is not empty
+			// (and therefore has an element appears at this[ 0 ]) and the
+			// `value` parameter was not undefined. An empty jQuery object
+			// will result in `undefined` for elem = this[ 0 ] which will
+			// throw an exception if an attempt to read a data cache is made.
+			if ( elem && value === undefined ) {
+
+				// Attempt to get data from the cache
+				// The key will always be camelCased in Data
+				data = dataUser.get( elem, key );
+				if ( data !== undefined ) {
+					return data;
+				}
+
+				// Attempt to "discover" the data in
+				// HTML5 custom data-* attrs
+				data = dataAttr( elem, key );
+				if ( data !== undefined ) {
+					return data;
+				}
+
+				// We tried really hard, but the data doesn't exist.
+				return;
+			}
+
+			// Set the data...
+			this.each( function() {
+
+				// We always store the camelCased key
+				dataUser.set( this, key, value );
+			} );
+		}, null, value, arguments.length > 1, null, true );
+	},
+
+	removeData: function( key ) {
+		return this.each( function() {
+			dataUser.remove( this, key );
+		} );
+	}
+} );
+
+
+jQuery.extend( {
+	queue: function( elem, type, data ) {
+		var queue;
+
+		if ( elem ) {
+			type = ( type || "fx" ) + "queue";
+			queue = dataPriv.get( elem, type );
+
+			// Speed up dequeue by getting out quickly if this is just a lookup
+			if ( data ) {
+				if ( !queue || jQuery.isArray( data ) ) {
+					queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
+				} else {
+					queue.push( data );
+				}
+			}
+			return queue || [];
+		}
+	},
+
+	dequeue: function( elem, type ) {
+		type = type || "fx";
+
+		var queue = jQuery.queue( elem, type ),
+			startLength = queue.length,
+			fn = queue.shift(),
+			hooks = jQuery._queueHooks( elem, type ),
+			next = function() {
+				jQuery.dequeue( elem, type );
+			};
+
+		// If the fx queue is dequeued, always remove the progress sentinel
+		if ( fn === "inprogress" ) {
+			fn = queue.shift();
+			startLength--;
+		}
+
+		if ( fn ) {
+
+			// Add a progress sentinel to prevent the fx queue from being
+			// automatically dequeued
+			if ( type === "fx" ) {
+				queue.unshift( "inprogress" );
+			}
+
+			// Clear up the last queue stop function
+			delete hooks.stop;
+			fn.call( elem, next, hooks );
+		}
+
+		if ( !startLength && hooks ) {
+			hooks.empty.fire();
+		}
+	},
+
+	// Not public - generate a queueHooks object, or return the current one
+	_queueHooks: function( elem, type ) {
+		var key = type + "queueHooks";
+		return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
+			empty: jQuery.Callbacks( "once memory" ).add( function() {
+				dataPriv.remove( elem, [ type + "queue", key ] );
+			} )
+		} );
+	}
+} );
+
+jQuery.fn.extend( {
+	queue: function( type, data ) {
+		var setter = 2;
+
+		if ( typeof type !== "string" ) {
+			data = type;
+			type = "fx";
+			setter--;
+		}
+
+		if ( arguments.length < setter ) {
+			return jQuery.queue( this[ 0 ], type );
+		}
+
+		return data === undefined ?
+			this :
+			this.each( function() {
+				var queue = jQuery.queue( this, type, data );
+
+				// Ensure a hooks for this queue
+				jQuery._queueHooks( this, type );
+
+				if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
+					jQuery.dequeue( this, type );
+				}
+			} );
+	},
+	dequeue: function( type ) {
+		return this.each( function() {
+			jQuery.dequeue( this, type );
+		} );
+	},
+	clearQueue: function( type ) {
+		return this.queue( type || "fx", [] );
+	},
+
+	// Get a promise resolved when queues of a certain type
+	// are emptied (fx is the type by default)
+	promise: function( type, obj ) {
+		var tmp,
+			count = 1,
+			defer = jQuery.Deferred(),
+			elements = this,
+			i = this.length,
+			resolve = function() {
+				if ( !( --count ) ) {
+					defer.resolveWith( elements, [ elements ] );
+				}
+			};
+
+		if ( typeof type !== "string" ) {
+			obj = type;
+			type = undefined;
+		}
+		type = type || "fx";
+
+		while ( i-- ) {
+			tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
+			if ( tmp && tmp.empty ) {
+				count++;
+				tmp.empty.add( resolve );
+			}
+		}
+		resolve();
+		return defer.promise( obj );
+	}
+} );
+var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
+
+var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
+
+
+var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
+
+var isHiddenWithinTree = function( elem, el ) {
+
+		// isHiddenWithinTree might be called from jQuery#filter function;
+		// in that case, element will be second argument
+		elem = el || elem;
+
+		// Inline style trumps all
+		return elem.style.display === "none" ||
+			elem.style.display === "" &&
+
+			// Otherwise, check computed style
+			// Support: Firefox <=43 - 45
+			// Disconnected elements can have computed display: none, so first confirm that elem is
+			// in the document.
+			jQuery.contains( elem.ownerDocument, elem ) &&
+
+			jQuery.css( elem, "display" ) === "none";
+	};
+
+var swap = function( elem, options, callback, args ) {
+	var ret, name,
+		old = {};
+
+	// Remember the old values, and insert the new ones
+	for ( name in options ) {
+		old[ name ] = elem.style[ name ];
+		elem.style[ name ] = options[ name ];
+	}
+
+	ret = callback.apply( elem, args || [] );
+
+	// Revert the old values
+	for ( name in options ) {
+		elem.style[ name ] = old[ name ];
+	}
+
+	return ret;
+};
+
+
+
+
+function adjustCSS( elem, prop, valueParts, tween ) {
+	var adjusted,
+		scale = 1,
+		maxIterations = 20,
+		currentValue = tween ?
+			function() {
+				return tween.cur();
+			} :
+			function() {
+				return jQuery.css( elem, prop, "" );
+			},
+		initial = currentValue(),
+		unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
+
+		// Starting value computation is required for potential unit mismatches
+		initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
+			rcssNum.exec( jQuery.css( elem, prop ) );
+
+	if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
+
+		// Trust units reported by jQuery.css
+		unit = unit || initialInUnit[ 3 ];
+
+		// Make sure we update the tween properties later on
+		valueParts = valueParts || [];
+
+		// Iteratively approximate from a nonzero starting point
+		initialInUnit = +initial || 1;
+
+		do {
+
+			// If previous iteration zeroed out, double until we get *something*.
+			// Use string for doubling so we don't accidentally see scale as unchanged below
+			scale = scale || ".5";
+
+			// Adjust and apply
+			initialInUnit = initialInUnit / scale;
+			jQuery.style( elem, prop, initialInUnit + unit );
+
+		// Update scale, tolerating zero or NaN from tween.cur()
+		// Break the loop if scale is unchanged or perfect, or if we've just had enough.
+		} while (
+			scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
+		);
+	}
+
+	if ( valueParts ) {
+		initialInUnit = +initialInUnit || +initial || 0;
+
+		// Apply relative offset (+=/-=) if specified
+		adjusted = valueParts[ 1 ] ?
+			initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
+			+valueParts[ 2 ];
+		if ( tween ) {
+			tween.unit = unit;
+			tween.start = initialInUnit;
+			tween.end = adjusted;
+		}
+	}
+	return adjusted;
+}
+
+
+var defaultDisplayMap = {};
+
+function getDefaultDisplay( elem ) {
+	var temp,
+		doc = elem.ownerDocument,
+		nodeName = elem.nodeName,
+		display = defaultDisplayMap[ nodeName ];
+
+	if ( display ) {
+		return display;
+	}
+
+	temp = doc.body.appendChild( doc.createElement( nodeName ) ),
+	display = jQuery.css( temp, "display" );
+
+	temp.parentNode.removeChild( temp );
+
+	if ( display === "none" ) {
+		display = "block";
+	}
+	defaultDisplayMap[ nodeName ] = display;
+
+	return display;
+}
+
+function showHide( elements, show ) {
+	var display, elem,
+		values = [],
+		index = 0,
+		length = elements.length;
+
+	// Determine new display value for elements that need to change
+	for ( ; index < length; index++ ) {
+		elem = elements[ index ];
+		if ( !elem.style ) {
+			continue;
+		}
+
+		display = elem.style.display;
+		if ( show ) {
+
+			// Since we force visibility upon cascade-hidden elements, an immediate (and slow)
+			// check is required in this first loop unless we have a nonempty display value (either
+			// inline or about-to-be-restored)
+			if ( display === "none" ) {
+				values[ index ] = dataPriv.get( elem, "display" ) || null;
+				if ( !values[ index ] ) {
+					elem.style.display = "";
+				}
+			}
+			if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
+				values[ index ] = getDefaultDisplay( elem );
+			}
+		} else {
+			if ( display !== "none" ) {
+				values[ index ] = "none";
+
+				// Remember what we're overwriting
+				dataPriv.set( elem, "display", display );
+			}
+		}
+	}
+
+	// Set the display of the elements in a second loop to avoid constant reflow
+	for ( index = 0; index < length; index++ ) {
+		if ( values[ index ] != null ) {
+			elements[ index ].style.display = values[ index ];
+		}
+	}
+
+	return elements;
+}
+
+jQuery.fn.extend( {
+	show: function() {
+		return showHide( this, true );
+	},
+	hide: function() {
+		return showHide( this );
+	},
+	toggle: function( state ) {
+		if ( typeof state === "boolean" ) {
+			return state ? this.show() : this.hide();
+		}
+
+		return this.each( function() {
+			if ( isHiddenWithinTree( this ) ) {
+				jQuery( this ).show();
+			} else {
+				jQuery( this ).hide();
+			}
+		} );
+	}
+} );
+var rcheckableType = ( /^(?:checkbox|radio)$/i );
+
+var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i );
+
+var rscriptType = ( /^$|\/(?:java|ecma)script/i );
+
+
+
+// We have to close these tags to support XHTML (#13200)
+var wrapMap = {
+
+	// Support: IE <=9 only
+	option: [ 1, "<select multiple='multiple'>", "</select>" ],
+
+	// XHTML parsers do not magically insert elements in the
+	// same way that tag soup parsers do. So we cannot shorten
+	// this by omitting <tbody> or other required elements.
+	thead: [ 1, "<table>", "</table>" ],
+	col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
+	tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+	td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+
+	_default: [ 0, "", "" ]
+};
+
+// Support: IE <=9 only
+wrapMap.optgroup = wrapMap.option;
+
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+
+function getAll( context, tag ) {
+
+	// Support: IE <=9 - 11 only
+	// Use typeof to avoid zero-argument method invocation on host objects (#15151)
+	var ret = typeof context.getElementsByTagName !== "undefined" ?
+			context.getElementsByTagName( tag || "*" ) :
+			typeof context.querySelectorAll !== "undefined" ?
+				context.querySelectorAll( tag || "*" ) :
+			[];
+
+	return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+		jQuery.merge( [ context ], ret ) :
+		ret;
+}
+
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+	var i = 0,
+		l = elems.length;
+
+	for ( ; i < l; i++ ) {
+		dataPriv.set(
+			elems[ i ],
+			"globalEval",
+			!refElements || dataPriv.get( refElements[ i ], "globalEval" )
+		);
+	}
+}
+
+
+var rhtml = /<|&#?\w+;/;
+
+function buildFragment( elems, context, scripts, selection, ignored ) {
+	var elem, tmp, tag, wrap, contains, j,
+		fragment = context.createDocumentFragment(),
+		nodes = [],
+		i = 0,
+		l = elems.length;
+
+	for ( ; i < l; i++ ) {
+		elem = elems[ i ];
+
+		if ( elem || elem === 0 ) {
+
+			// Add nodes directly
+			if ( jQuery.type( elem ) === "object" ) {
+
+				// Support: Android <=4.0 only, PhantomJS 1 only
+				// push.apply(_, arraylike) throws on ancient WebKit
+				jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+			// Convert non-html into a text node
+			} else if ( !rhtml.test( elem ) ) {
+				nodes.push( context.createTextNode( elem ) );
+
+			// Convert html into DOM nodes
+			} else {
+				tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
+
+				// Deserialize a standard representation
+				tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
+				wrap = wrapMap[ tag ] || wrapMap._default;
+				tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
+
+				// Descend through wrappers to the right content
+				j = wrap[ 0 ];
+				while ( j-- ) {
+					tmp = tmp.lastChild;
+				}
+
+				// Support: Android <=4.0 only, PhantomJS 1 only
+				// push.apply(_, arraylike) throws on ancient WebKit
+				jQuery.merge( nodes, tmp.childNodes );
+
+				// Remember the top-level container
+				tmp = fragment.firstChild;
+
+				// Ensure the created nodes are orphaned (#12392)
+				tmp.textContent = "";
+			}
+		}
+	}
+
+	// Remove wrapper from fragment
+	fragment.textContent = "";
+
+	i = 0;
+	while ( ( elem = nodes[ i++ ] ) ) {
+
+		// Skip elements already in the context collection (trac-4087)
+		if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
+			if ( ignored ) {
+				ignored.push( elem );
+			}
+			continue;
+		}
+
+		contains = jQuery.contains( elem.ownerDocument, elem );
+
+		// Append to fragment
+		tmp = getAll( fragment.appendChild( elem ), "script" );
+
+		// Preserve script evaluation history
+		if ( contains ) {
+			setGlobalEval( tmp );
+		}
+
+		// Capture executables
+		if ( scripts ) {
+			j = 0;
+			while ( ( elem = tmp[ j++ ] ) ) {
+				if ( rscriptType.test( elem.type || "" ) ) {
+					scripts.push( elem );
+				}
+			}
+		}
+	}
+
+	return fragment;
+}
+
+
+( function() {
+	var fragment = document.createDocumentFragment(),
+		div = fragment.appendChild( document.createElement( "div" ) ),
+		input = document.createElement( "input" );
+
+	// Support: Android 4.0 - 4.3 only
+	// Check state lost if the name is set (#11217)
+	// Support: Windows Web Apps (WWA)
+	// `name` and `type` must use .setAttribute for WWA (#14901)
+	input.setAttribute( "type", "radio" );
+	input.setAttribute( "checked", "checked" );
+	input.setAttribute( "name", "t" );
+
+	div.appendChild( input );
+
+	// Support: Android <=4.1 only
+	// Older WebKit doesn't clone checked state correctly in fragments
+	support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+	// Support: IE <=11 only
+	// Make sure textarea (and checkbox) defaultValue is properly cloned
+	div.innerHTML = "<textarea>x</textarea>";
+	support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
+} )();
+var documentElement = document.documentElement;
+
+
+
+var
+	rkeyEvent = /^key/,
+	rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
+	rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
+
+function returnTrue() {
+	return true;
+}
+
+function returnFalse() {
+	return false;
+}
+
+// Support: IE <=9 only
+// See #13393 for more info
+function safeActiveElement() {
+	try {
+		return document.activeElement;
+	} catch ( err ) { }
+}
+
+function on( elem, types, selector, data, fn, one ) {
+	var origFn, type;
+
+	// Types can be a map of types/handlers
+	if ( typeof types === "object" ) {
+
+		// ( types-Object, selector, data )
+		if ( typeof selector !== "string" ) {
+
+			// ( types-Object, data )
+			data = data || selector;
+			selector = undefined;
+		}
+		for ( type in types ) {
+			on( elem, type, selector, data, types[ type ], one );
+		}
+		return elem;
+	}
+
+	if ( data == null && fn == null ) {
+
+		// ( types, fn )
+		fn = selector;
+		data = selector = undefined;
+	} else if ( fn == null ) {
+		if ( typeof selector === "string" ) {
+
+			// ( types, selector, fn )
+			fn = data;
+			data = undefined;
+		} else {
+
+			// ( types, data, fn )
+			fn = data;
+			data = selector;
+			selector = undefined;
+		}
+	}
+	if ( fn === false ) {
+		fn = returnFalse;
+	} else if ( !fn ) {
+		return elem;
+	}
+
+	if ( one === 1 ) {
+		origFn = fn;
+		fn = function( event ) {
+
+			// Can use an empty set, since event contains the info
+			jQuery().off( event );
+			return origFn.apply( this, arguments );
+		};
+
+		// Use same guid so caller can remove using origFn
+		fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+	}
+	return elem.each( function() {
+		jQuery.event.add( this, types, fn, data, selector );
+	} );
+}
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+	global: {},
+
+	add: function( elem, types, handler, data, selector ) {
+
+		var handleObjIn, eventHandle, tmp,
+			events, t, handleObj,
+			special, handlers, type, namespaces, origType,
+			elemData = dataPriv.get( elem );
+
+		// Don't attach events to noData or text/comment nodes (but allow plain objects)
+		if ( !elemData ) {
+			return;
+		}
+
+		// Caller can pass in an object of custom data in lieu of the handler
+		if ( handler.handler ) {
+			handleObjIn = handler;
+			handler = handleObjIn.handler;
+			selector = handleObjIn.selector;
+		}
+
+		// Ensure that invalid selectors throw exceptions at attach time
+		// Evaluate against documentElement in case elem is a non-element node (e.g., document)
+		if ( selector ) {
+			jQuery.find.matchesSelector( documentElement, selector );
+		}
+
+		// Make sure that the handler has a unique ID, used to find/remove it later
+		if ( !handler.guid ) {
+			handler.guid = jQuery.guid++;
+		}
+
+		// Init the element's event structure and main handler, if this is the first
+		if ( !( events = elemData.events ) ) {
+			events = elemData.events = {};
+		}
+		if ( !( eventHandle = elemData.handle ) ) {
+			eventHandle = elemData.handle = function( e ) {
+
+				// Discard the second event of a jQuery.event.trigger() and
+				// when an event is called after a page has unloaded
+				return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
+					jQuery.event.dispatch.apply( elem, arguments ) : undefined;
+			};
+		}
+
+		// Handle multiple events separated by a space
+		types = ( types || "" ).match( rnotwhite ) || [ "" ];
+		t = types.length;
+		while ( t-- ) {
+			tmp = rtypenamespace.exec( types[ t ] ) || [];
+			type = origType = tmp[ 1 ];
+			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
+
+			// There *must* be a type, no attaching namespace-only handlers
+			if ( !type ) {
+				continue;
+			}
+
+			// If event changes its type, use the special event handlers for the changed type
+			special = jQuery.event.special[ type ] || {};
+
+			// If selector defined, determine special event api type, otherwise given type
+			type = ( selector ? special.delegateType : special.bindType ) || type;
+
+			// Update special based on newly reset type
+			special = jQuery.event.special[ type ] || {};
+
+			// handleObj is passed to all event handlers
+			handleObj = jQuery.extend( {
+				type: type,
+				origType: origType,
+				data: data,
+				handler: handler,
+				guid: handler.guid,
+				selector: selector,
+				needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+				namespace: namespaces.join( "." )
+			}, handleObjIn );
+
+			// Init the event handler queue if we're the first
+			if ( !( handlers = events[ type ] ) ) {
+				handlers = events[ type ] = [];
+				handlers.delegateCount = 0;
+
+				// Only use addEventListener if the special events handler returns false
+				if ( !special.setup ||
+					special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+
+					if ( elem.addEventListener ) {
+						elem.addEventListener( type, eventHandle );
+					}
+				}
+			}
+
+			if ( special.add ) {
+				special.add.call( elem, handleObj );
+
+				if ( !handleObj.handler.guid ) {
+					handleObj.handler.guid = handler.guid;
+				}
+			}
+
+			// Add to the element's handler list, delegates in front
+			if ( selector ) {
+				handlers.splice( handlers.delegateCount++, 0, handleObj );
+			} else {
+				handlers.push( handleObj );
+			}
+
+			// Keep track of which events have ever been used, for event optimization
+			jQuery.event.global[ type ] = true;
+		}
+
+	},
+
+	// Detach an event or set of events from an element
+	remove: function( elem, types, handler, selector, mappedTypes ) {
+
+		var j, origCount, tmp,
+			events, t, handleObj,
+			special, handlers, type, namespaces, origType,
+			elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
+
+		if ( !elemData || !( events = elemData.events ) ) {
+			return;
+		}
+
+		// Once for each type.namespace in types; type may be omitted
+		types = ( types || "" ).match( rnotwhite ) || [ "" ];
+		t = types.length;
+		while ( t-- ) {
+			tmp = rtypenamespace.exec( types[ t ] ) || [];
+			type = origType = tmp[ 1 ];
+			namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
+
+			// Unbind all events (on this namespace, if provided) for the element
+			if ( !type ) {
+				for ( type in events ) {
+					jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+				}
+				continue;
+			}
+
+			special = jQuery.event.special[ type ] || {};
+			type = ( selector ? special.delegateType : special.bindType ) || type;
+			handlers = events[ type ] || [];
+			tmp = tmp[ 2 ] &&
+				new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
+
+			// Remove matching events
+			origCount = j = handlers.length;
+			while ( j-- ) {
+				handleObj = handlers[ j ];
+
+				if ( ( mappedTypes || origType === handleObj.origType ) &&
+					( !handler || handler.guid === handleObj.guid ) &&
+					( !tmp || tmp.test( handleObj.namespace ) ) &&
+					( !selector || selector === handleObj.selector ||
+						selector === "**" && handleObj.selector ) ) {
+					handlers.splice( j, 1 );
+
+					if ( handleObj.selector ) {
+						handlers.delegateCount--;
+					}
+					if ( special.remove ) {
+						special.remove.call( elem, handleObj );
+					}
+				}
+			}
+
+			// Remove generic event handler if we removed something and no more handlers exist
+			// (avoids potential for endless recursion during removal of special event handlers)
+			if ( origCount && !handlers.length ) {
+				if ( !special.teardown ||
+					special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+
+					jQuery.removeEvent( elem, type, elemData.handle );
+				}
+
+				delete events[ type ];
+			}
+		}
+
+		// Remove data and the expando if it's no longer used
+		if ( jQuery.isEmptyObject( events ) ) {
+			dataPriv.remove( elem, "handle events" );
+		}
+	},
+
+	dispatch: function( nativeEvent ) {
+
+		// Make a writable jQuery.Event from the native event object
+		var event = jQuery.event.fix( nativeEvent );
+
+		var i, j, ret, matched, handleObj, handlerQueue,
+			args = new Array( arguments.length ),
+			handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
+			special = jQuery.event.special[ event.type ] || {};
+
+		// Use the fix-ed jQuery.Event rather than the (read-only) native event
+		args[ 0 ] = event;
+
+		for ( i = 1; i < arguments.length; i++ ) {
+			args[ i ] = arguments[ i ];
+		}
+
+		event.delegateTarget = this;
+
+		// Call the preDispatch hook for the mapped type, and let it bail if desired
+		if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+			return;
+		}
+
+		// Determine handlers
+		handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+		// Run delegates first; they may want to stop propagation beneath us
+		i = 0;
+		while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
+			event.currentTarget = matched.elem;
+
+			j = 0;
+			while ( ( handleObj = matched.handlers[ j++ ] ) &&
+				!event.isImmediatePropagationStopped() ) {
+
+				// Triggered event must either 1) have no namespace, or 2) have namespace(s)
+				// a subset or equal to those in the bound event (both can have no namespace).
+				if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
+
+					event.handleObj = handleObj;
+					event.data = handleObj.data;
+
+					ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
+						handleObj.handler ).apply( matched.elem, args );
+
+					if ( ret !== undefined ) {
+						if ( ( event.result = ret ) === false ) {
+							event.preventDefault();
+							event.stopPropagation();
+						}
+					}
+				}
+			}
+		}
+
+		// Call the postDispatch hook for the mapped type
+		if ( special.postDispatch ) {
+			special.postDispatch.call( this, event );
+		}
+
+		return event.result;
+	},
+
+	handlers: function( event, handlers ) {
+		var i, matches, sel, handleObj,
+			handlerQueue = [],
+			delegateCount = handlers.delegateCount,
+			cur = event.target;
+
+		// Support: IE <=9
+		// Find delegate handlers
+		// Black-hole SVG <use> instance trees (#13180)
+		//
+		// Support: Firefox <=42
+		// Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)
+		if ( delegateCount && cur.nodeType &&
+			( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) {
+
+			for ( ; cur !== this; cur = cur.parentNode || this ) {
+
+				// Don't check non-elements (#13208)
+				// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
+				if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) {
+					matches = [];
+					for ( i = 0; i < delegateCount; i++ ) {
+						handleObj = handlers[ i ];
+
+						// Don't conflict with Object.prototype properties (#13203)
+						sel = handleObj.selector + " ";
+
+						if ( matches[ sel ] === undefined ) {
+							matches[ sel ] = handleObj.needsContext ?
+								jQuery( sel, this ).index( cur ) > -1 :
+								jQuery.find( sel, this, null, [ cur ] ).length;
+						}
+						if ( matches[ sel ] ) {
+							matches.push( handleObj );
+						}
+					}
+					if ( matches.length ) {
+						handlerQueue.push( { elem: cur, handlers: matches } );
+					}
+				}
+			}
+		}
+
+		// Add the remaining (directly-bound) handlers
+		if ( delegateCount < handlers.length ) {
+			handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );
+		}
+
+		return handlerQueue;
+	},
+
+	addProp: function( name, hook ) {
+		Object.defineProperty( jQuery.Event.prototype, name, {
+			enumerable: true,
+			configurable: true,
+
+			get: jQuery.isFunction( hook ) ?
+				function() {
+					if ( this.originalEvent ) {
+							return hook( this.originalEvent );
+					}
+				} :
+				function() {
+					if ( this.originalEvent ) {
+							return this.originalEvent[ name ];
+					}
+				},
+
+			set: function( value ) {
+				Object.defineProperty( this, name, {
+					enumerable: true,
+					configurable: true,
+					writable: true,
+					value: value
+				} );
+			}
+		} );
+	},
+
+	fix: function( originalEvent ) {
+		return originalEvent[ jQuery.expando ] ?
+			originalEvent :
+			new jQuery.Event( originalEvent );
+	},
+
+	special: {
+		load: {
+
+			// Prevent triggered image.load events from bubbling to window.load
+			noBubble: true
+		},
+		focus: {
+
+			// Fire native event if possible so blur/focus sequence is correct
+			trigger: function() {
+				if ( this !== safeActiveElement() && this.focus ) {
+					this.focus();
+					return false;
+				}
+			},
+			delegateType: "focusin"
+		},
+		blur: {
+			trigger: function() {
+				if ( this === safeActiveElement() && this.blur ) {
+					this.blur();
+					return false;
+				}
+			},
+			delegateType: "focusout"
+		},
+		click: {
+
+			// For checkbox, fire native event so checked state will be right
+			trigger: function() {
+				if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
+					this.click();
+					return false;
+				}
+			},
+
+			// For cross-browser consistency, don't fire native .click() on links
+			_default: function( event ) {
+				return jQuery.nodeName( event.target, "a" );
+			}
+		},
+
+		beforeunload: {
+			postDispatch: function( event ) {
+
+				// Support: Firefox 20+
+				// Firefox doesn't alert if the returnValue field is not set.
+				if ( event.result !== undefined && event.originalEvent ) {
+					event.originalEvent.returnValue = event.result;
+				}
+			}
+		}
+	}
+};
+
+jQuery.removeEvent = function( elem, type, handle ) {
+
+	// This "if" is needed for plain objects
+	if ( elem.removeEventListener ) {
+		elem.removeEventListener( type, handle );
+	}
+};
+
+jQuery.Event = function( src, props ) {
+
+	// Allow instantiation without the 'new' keyword
+	if ( !( this instanceof jQuery.Event ) ) {
+		return new jQuery.Event( src, props );
+	}
+
+	// Event object
+	if ( src && src.type ) {
+		this.originalEvent = src;
+		this.type = src.type;
+
+		// Events bubbling up the document may have been marked as prevented
+		// by a handler lower down the tree; reflect the correct value.
+		this.isDefaultPrevented = src.defaultPrevented ||
+				src.defaultPrevented === undefined &&
+
+				// Support: Android <=2.3 only
+				src.returnValue === false ?
+			returnTrue :
+			returnFalse;
+
+		// Create target properties
+		// Support: Safari <=6 - 7 only
+		// Target should not be a text node (#504, #13143)
+		this.target = ( src.target && src.target.nodeType === 3 ) ?
+			src.target.parentNode :
+			src.target;
+
+		this.currentTarget = src.currentTarget;
+		this.relatedTarget = src.relatedTarget;
+
+	// Event type
+	} else {
+		this.type = src;
+	}
+
+	// Put explicitly provided properties onto the event object
+	if ( props ) {
+		jQuery.extend( this, props );
+	}
+
+	// Create a timestamp if incoming event doesn't have one
+	this.timeStamp = src && src.timeStamp || jQuery.now();
+
+	// Mark it as fixed
+	this[ jQuery.expando ] = true;
+};
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+	constructor: jQuery.Event,
+	isDefaultPrevented: returnFalse,
+	isPropagationStopped: returnFalse,
+	isImmediatePropagationStopped: returnFalse,
+	isSimulated: false,
+
+	preventDefault: function() {
+		var e = this.originalEvent;
+
+		this.isDefaultPrevented = returnTrue;
+
+		if ( e && !this.isSimulated ) {
+			e.preventDefault();
+		}
+	},
+	stopPropagation: function() {
+		var e = this.originalEvent;
+
+		this.isPropagationStopped = returnTrue;
+
+		if ( e && !this.isSimulated ) {
+			e.stopPropagation();
+		}
+	},
+	stopImmediatePropagation: function() {
+		var e = this.originalEvent;
+
+		this.isImmediatePropagationStopped = returnTrue;
+
+		if ( e && !this.isSimulated ) {
+			e.stopImmediatePropagation();
+		}
+
+		this.stopPropagation();
+	}
+};
+
+// Includes all common event props including KeyEvent and MouseEvent specific props
+jQuery.each( {
+	altKey: true,
+	bubbles: true,
+	cancelable: true,
+	changedTouches: true,
+	ctrlKey: true,
+	detail: true,
+	eventPhase: true,
+	metaKey: true,
+	pageX: true,
+	pageY: true,
+	shiftKey: true,
+	view: true,
+	"char": true,
+	charCode: true,
+	key: true,
+	keyCode: true,
+	button: true,
+	buttons: true,
+	clientX: true,
+	clientY: true,
+	offsetX: true,
+	offsetY: true,
+	pointerId: true,
+	pointerType: true,
+	screenX: true,
+	screenY: true,
+	targetTouches: true,
+	toElement: true,
+	touches: true,
+
+	which: function( event ) {
+		var button = event.button;
+
+		// Add which for key events
+		if ( event.which == null && rkeyEvent.test( event.type ) ) {
+			return event.charCode != null ? event.charCode : event.keyCode;
+		}
+
+		// Add which for click: 1 === left; 2 === middle; 3 === right
+		if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
+			return ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+		}
+
+		return event.which;
+	}
+}, jQuery.event.addProp );
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+// so that event delegation works in jQuery.
+// Do the same for pointerenter/pointerleave and pointerover/pointerout
+//
+// Support: Safari 7 only
+// Safari sends mouseenter too often; see:
+// https://bugs.chromium.org/p/chromium/issues/detail?id=470258
+// for the description of the bug (it existed in older Chrome versions as well).
+jQuery.each( {
+	mouseenter: "mouseover",
+	mouseleave: "mouseout",
+	pointerenter: "pointerover",
+	pointerleave: "pointerout"
+}, function( orig, fix ) {
+	jQuery.event.special[ orig ] = {
+		delegateType: fix,
+		bindType: fix,
+
+		handle: function( event ) {
+			var ret,
+				target = this,
+				related = event.relatedTarget,
+				handleObj = event.handleObj;
+
+			// For mouseenter/leave call the handler if related is outside the target.
+			// NB: No relatedTarget if the mouse left/entered the browser window
+			if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
+				event.type = handleObj.origType;
+				ret = handleObj.handler.apply( this, arguments );
+				event.type = fix;
+			}
+			return ret;
+		}
+	};
+} );
+
+jQuery.fn.extend( {
+
+	on: function( types, selector, data, fn ) {
+		return on( this, types, selector, data, fn );
+	},
+	one: function( types, selector, data, fn ) {
+		return on( this, types, selector, data, fn, 1 );
+	},
+	off: function( types, selector, fn ) {
+		var handleObj, type;
+		if ( types && types.preventDefault && types.handleObj ) {
+
+			// ( event )  dispatched jQuery.Event
+			handleObj = types.handleObj;
+			jQuery( types.delegateTarget ).off(
+				handleObj.namespace ?
+					handleObj.origType + "." + handleObj.namespace :
+					handleObj.origType,
+				handleObj.selector,
+				handleObj.handler
+			);
+			return this;
+		}
+		if ( typeof types === "object" ) {
+
+			// ( types-object [, selector] )
+			for ( type in types ) {
+				this.off( type, selector, types[ type ] );
+			}
+			return this;
+		}
+		if ( selector === false || typeof selector === "function" ) {
+
+			// ( types [, fn] )
+			fn = selector;
+			selector = undefined;
+		}
+		if ( fn === false ) {
+			fn = returnFalse;
+		}
+		return this.each( function() {
+			jQuery.event.remove( this, types, fn, selector );
+		} );
+	}
+} );
+
+
+var
+
+	/* eslint-disable max-len */
+
+	// See https://github.com/eslint/eslint/issues/3229
+	rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
+
+	/* eslint-enable */
+
+	// Support: IE <=10 - 11, Edge 12 - 13
+	// In IE/Edge using regex groups here causes severe slowdowns.
+	// See https://connect.microsoft.com/IE/feedback/details/1736512/
+	rnoInnerhtml = /<script|<style|<link/i,
+
+	// checked="checked" or checked
+	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+	rscriptTypeMasked = /^true\/(.*)/,
+	rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
+
+function manipulationTarget( elem, content ) {
+	if ( jQuery.nodeName( elem, "table" ) &&
+		jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
+
+		return elem.getElementsByTagName( "tbody" )[ 0 ] || elem;
+	}
+
+	return elem;
+}
+
+// Replace/restore the type attribute of script elements for safe DOM manipulation
+function disableScript( elem ) {
+	elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
+	return elem;
+}
+function restoreScript( elem ) {
+	var match = rscriptTypeMasked.exec( elem.type );
+
+	if ( match ) {
+		elem.type = match[ 1 ];
+	} else {
+		elem.removeAttribute( "type" );
+	}
+
+	return elem;
+}
+
+function cloneCopyEvent( src, dest ) {
+	var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
+
+	if ( dest.nodeType !== 1 ) {
+		return;
+	}
+
+	// 1. Copy private data: events, handlers, etc.
+	if ( dataPriv.hasData( src ) ) {
+		pdataOld = dataPriv.access( src );
+		pdataCur = dataPriv.set( dest, pdataOld );
+		events = pdataOld.events;
+
+		if ( events ) {
+			delete pdataCur.handle;
+			pdataCur.events = {};
+
+			for ( type in events ) {
+				for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+					jQuery.event.add( dest, type, events[ type ][ i ] );
+				}
+			}
+		}
+	}
+
+	// 2. Copy user data
+	if ( dataUser.hasData( src ) ) {
+		udataOld = dataUser.access( src );
+		udataCur = jQuery.extend( {}, udataOld );
+
+		dataUser.set( dest, udataCur );
+	}
+}
+
+// Fix IE bugs, see support tests
+function fixInput( src, dest ) {
+	var nodeName = dest.nodeName.toLowerCase();
+
+	// Fails to persist the checked state of a cloned checkbox or radio button.
+	if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
+		dest.checked = src.checked;
+
+	// Fails to return the selected option to the default selected state when cloning options
+	} else if ( nodeName === "input" || nodeName === "textarea" ) {
+		dest.defaultValue = src.defaultValue;
+	}
+}
+
+function domManip( collection, args, callback, ignored ) {
+
+	// Flatten any nested arrays
+	args = concat.apply( [], args );
+
+	var fragment, first, scripts, hasScripts, node, doc,
+		i = 0,
+		l = collection.length,
+		iNoClone = l - 1,
+		value = args[ 0 ],
+		isFunction = jQuery.isFunction( value );
+
+	// We can't cloneNode fragments that contain checked, in WebKit
+	if ( isFunction ||
+			( l > 1 && typeof value === "string" &&
+				!support.checkClone && rchecked.test( value ) ) ) {
+		return collection.each( function( index ) {
+			var self = collection.eq( index );
+			if ( isFunction ) {
+				args[ 0 ] = value.call( this, index, self.html() );
+			}
+			domManip( self, args, callback, ignored );
+		} );
+	}
+
+	if ( l ) {
+		fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
+		first = fragment.firstChild;
+
+		if ( fragment.childNodes.length === 1 ) {
+			fragment = first;
+		}
+
+		// Require either new content or an interest in ignored elements to invoke the callback
+		if ( first || ignored ) {
+			scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
+			hasScripts = scripts.length;
+
+			// Use the original fragment for the last item
+			// instead of the first because it can end up
+			// being emptied incorrectly in certain situations (#8070).
+			for ( ; i < l; i++ ) {
+				node = fragment;
+
+				if ( i !== iNoClone ) {
+					node = jQuery.clone( node, true, true );
+
+					// Keep references to cloned scripts for later restoration
+					if ( hasScripts ) {
+
+						// Support: Android <=4.0 only, PhantomJS 1 only
+						// push.apply(_, arraylike) throws on ancient WebKit
+						jQuery.merge( scripts, getAll( node, "script" ) );
+					}
+				}
+
+				callback.call( collection[ i ], node, i );
+			}
+
+			if ( hasScripts ) {
+				doc = scripts[ scripts.length - 1 ].ownerDocument;
+
+				// Reenable scripts
+				jQuery.map( scripts, restoreScript );
+
+				// Evaluate executable scripts on first document insertion
+				for ( i = 0; i < hasScripts; i++ ) {
+					node = scripts[ i ];
+					if ( rscriptType.test( node.type || "" ) &&
+						!dataPriv.access( node, "globalEval" ) &&
+						jQuery.contains( doc, node ) ) {
+
+						if ( node.src ) {
+
+							// Optional AJAX dependency, but won't run scripts if not present
+							if ( jQuery._evalUrl ) {
+								jQuery._evalUrl( node.src );
+							}
+						} else {
+							DOMEval( node.textContent.replace( rcleanScript, "" ), doc );
+						}
+					}
+				}
+			}
+		}
+	}
+
+	return collection;
+}
+
+function remove( elem, selector, keepData ) {
+	var node,
+		nodes = selector ? jQuery.filter( selector, elem ) : elem,
+		i = 0;
+
+	for ( ; ( node = nodes[ i ] ) != null; i++ ) {
+		if ( !keepData && node.nodeType === 1 ) {
+			jQuery.cleanData( getAll( node ) );
+		}
+
+		if ( node.parentNode ) {
+			if ( keepData && jQuery.contains( node.ownerDocument, node ) ) {
+				setGlobalEval( getAll( node, "script" ) );
+			}
+			node.parentNode.removeChild( node );
+		}
+	}
+
+	return elem;
+}
+
+jQuery.extend( {
+	htmlPrefilter: function( html ) {
+		return html.replace( rxhtmlTag, "<$1></$2>" );
+	},
+
+	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+		var i, l, srcElements, destElements,
+			clone = elem.cloneNode( true ),
+			inPage = jQuery.contains( elem.ownerDocument, elem );
+
+		// Fix IE cloning issues
+		if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
+				!jQuery.isXMLDoc( elem ) ) {
+
+			// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2
+			destElements = getAll( clone );
+			srcElements = getAll( elem );
+
+			for ( i = 0, l = srcElements.length; i < l; i++ ) {
+				fixInput( srcElements[ i ], destElements[ i ] );
+			}
+		}
+
+		// Copy the events from the original to the clone
+		if ( dataAndEvents ) {
+			if ( deepDataAndEvents ) {
+				srcElements = srcElements || getAll( elem );
+				destElements = destElements || getAll( clone );
+
+				for ( i = 0, l = srcElements.length; i < l; i++ ) {
+					cloneCopyEvent( srcElements[ i ], destElements[ i ] );
+				}
+			} else {
+				cloneCopyEvent( elem, clone );
+			}
+		}
+
+		// Preserve script evaluation history
+		destElements = getAll( clone, "script" );
+		if ( destElements.length > 0 ) {
+			setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
+		}
+
+		// Return the cloned set
+		return clone;
+	},
+
+	cleanData: function( elems ) {
+		var data, elem, type,
+			special = jQuery.event.special,
+			i = 0;
+
+		for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
+			if ( acceptData( elem ) ) {
+				if ( ( data = elem[ dataPriv.expando ] ) ) {
+					if ( data.events ) {
+						for ( type in data.events ) {
+							if ( special[ type ] ) {
+								jQuery.event.remove( elem, type );
+
+							// This is a shortcut to avoid jQuery.event.remove's overhead
+							} else {
+								jQuery.removeEvent( elem, type, data.handle );
+							}
+						}
+					}
+
+					// Support: Chrome <=35 - 45+
+					// Assign undefined instead of using delete, see Data#remove
+					elem[ dataPriv.expando ] = undefined;
+				}
+				if ( elem[ dataUser.expando ] ) {
+
+					// Support: Chrome <=35 - 45+
+					// Assign undefined instead of using delete, see Data#remove
+					elem[ dataUser.expando ] = undefined;
+				}
+			}
+		}
+	}
+} );
+
+jQuery.fn.extend( {
+	detach: function( selector ) {
+		return remove( this, selector, true );
+	},
+
+	remove: function( selector ) {
+		return remove( this, selector );
+	},
+
+	text: function( value ) {
+		return access( this, function( value ) {
+			return value === undefined ?
+				jQuery.text( this ) :
+				this.empty().each( function() {
+					if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+						this.textContent = value;
+					}
+				} );
+		}, null, value, arguments.length );
+	},
+
+	append: function() {
+		return domManip( this, arguments, function( elem ) {
+			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+				var target = manipulationTarget( this, elem );
+				target.appendChild( elem );
+			}
+		} );
+	},
+
+	prepend: function() {
+		return domManip( this, arguments, function( elem ) {
+			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+				var target = manipulationTarget( this, elem );
+				target.insertBefore( elem, target.firstChild );
+			}
+		} );
+	},
+
+	before: function() {
+		return domManip( this, arguments, function( elem ) {
+			if ( this.parentNode ) {
+				this.parentNode.insertBefore( elem, this );
+			}
+		} );
+	},
+
+	after: function() {
+		return domManip( this, arguments, function( elem ) {
+			if ( this.parentNode ) {
+				this.parentNode.insertBefore( elem, this.nextSibling );
+			}
+		} );
+	},
+
+	empty: function() {
+		var elem,
+			i = 0;
+
+		for ( ; ( elem = this[ i ] ) != null; i++ ) {
+			if ( elem.nodeType === 1 ) {
+
+				// Prevent memory leaks
+				jQuery.cleanData( getAll( elem, false ) );
+
+				// Remove any remaining nodes
+				elem.textContent = "";
+			}
+		}
+
+		return this;
+	},
+
+	clone: function( dataAndEvents, deepDataAndEvents ) {
+		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+		return this.map( function() {
+			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+		} );
+	},
+
+	html: function( value ) {
+		return access( this, function( value ) {
+			var elem = this[ 0 ] || {},
+				i = 0,
+				l = this.length;
+
+			if ( value === undefined && elem.nodeType === 1 ) {
+				return elem.innerHTML;
+			}
+
+			// See if we can take a shortcut and just use innerHTML
+			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+				!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
+
+				value = jQuery.htmlPrefilter( value );
+
+				try {
+					for ( ; i < l; i++ ) {
+						elem = this[ i ] || {};
+
+						// Remove element nodes and prevent memory leaks
+						if ( elem.nodeType === 1 ) {
+							jQuery.cleanData( getAll( elem, false ) );
+							elem.innerHTML = value;
+						}
+					}
+
+					elem = 0;
+
+				// If using innerHTML throws an exception, use the fallback method
+				} catch ( e ) {}
+			}
+
+			if ( elem ) {
+				this.empty().append( value );
+			}
+		}, null, value, arguments.length );
+	},
+
+	replaceWith: function() {
+		var ignored = [];
+
+		// Make the changes, replacing each non-ignored context element with the new content
+		return domManip( this, arguments, function( elem ) {
+			var parent = this.parentNode;
+
+			if ( jQuery.inArray( this, ignored ) < 0 ) {
+				jQuery.cleanData( getAll( this ) );
+				if ( parent ) {
+					parent.replaceChild( elem, this );
+				}
+			}
+
+		// Force callback invocation
+		}, ignored );
+	}
+} );
+
+jQuery.each( {
+	appendTo: "append",
+	prependTo: "prepend",
+	insertBefore: "before",
+	insertAfter: "after",
+	replaceAll: "replaceWith"
+}, function( name, original ) {
+	jQuery.fn[ name ] = function( selector ) {
+		var elems,
+			ret = [],
+			insert = jQuery( selector ),
+			last = insert.length - 1,
+			i = 0;
+
+		for ( ; i <= last; i++ ) {
+			elems = i === last ? this : this.clone( true );
+			jQuery( insert[ i ] )[ original ]( elems );
+
+			// Support: Android <=4.0 only, PhantomJS 1 only
+			// .get() because push.apply(_, arraylike) throws on ancient WebKit
+			push.apply( ret, elems.get() );
+		}
+
+		return this.pushStack( ret );
+	};
+} );
+var rmargin = ( /^margin/ );
+
+var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
+
+var getStyles = function( elem ) {
+
+		// Support: IE <=11 only, Firefox <=30 (#15098, #14150)
+		// IE throws on elements created in popups
+		// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
+		var view = elem.ownerDocument.defaultView;
+
+		if ( !view || !view.opener ) {
+			view = window;
+		}
+
+		return view.getComputedStyle( elem );
+	};
+
+
+
+( function() {
+
+	// Executing both pixelPosition & boxSizingReliable tests require only one layout
+	// so they're executed at the same time to save the second computation.
+	function computeStyleTests() {
+
+		// This is a singleton, we need to execute it only once
+		if ( !div ) {
+			return;
+		}
+
+		div.style.cssText =
+			"box-sizing:border-box;" +
+			"position:relative;display:block;" +
+			"margin:auto;border:1px;padding:1px;" +
+			"top:1%;width:50%";
+		div.innerHTML = "";
+		documentElement.appendChild( container );
+
+		var divStyle = window.getComputedStyle( div );
+		pixelPositionVal = divStyle.top !== "1%";
+
+		// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
+		reliableMarginLeftVal = divStyle.marginLeft === "2px";
+		boxSizingReliableVal = divStyle.width === "4px";
+
+		// Support: Android 4.0 - 4.3 only
+		// Some styles come back with percentage values, even though they shouldn't
+		div.style.marginRight = "50%";
+		pixelMarginRightVal = divStyle.marginRight === "4px";
+
+		documentElement.removeChild( container );
+
+		// Nullify the div so it wouldn't be stored in the memory and
+		// it will also be a sign that checks already performed
+		div = null;
+	}
+
+	var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,
+		container = document.createElement( "div" ),
+		div = document.createElement( "div" );
+
+	// Finish early in limited (non-browser) environments
+	if ( !div.style ) {
+		return;
+	}
+
+	// Support: IE <=9 - 11 only
+	// Style of cloned element affects source element cloned (#8908)
+	div.style.backgroundClip = "content-box";
+	div.cloneNode( true ).style.backgroundClip = "";
+	support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
+	container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
+		"padding:0;margin-top:1px;position:absolute";
+	container.appendChild( div );
+
+	jQuery.extend( support, {
+		pixelPosition: function() {
+			computeStyleTests();
+			return pixelPositionVal;
+		},
+		boxSizingReliable: function() {
+			computeStyleTests();
+			return boxSizingReliableVal;
+		},
+		pixelMarginRight: function() {
+			computeStyleTests();
+			return pixelMarginRightVal;
+		},
+		reliableMarginLeft: function() {
+			computeStyleTests();
+			return reliableMarginLeftVal;
+		}
+	} );
+} )();
+
+
+function curCSS( elem, name, computed ) {
+	var width, minWidth, maxWidth, ret,
+		style = elem.style;
+
+	computed = computed || getStyles( elem );
+
+	// Support: IE <=9 only
+	// getPropertyValue is only needed for .css('filter') (#12537)
+	if ( computed ) {
+		ret = computed.getPropertyValue( name ) || computed[ name ];
+
+		if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+			ret = jQuery.style( elem, name );
+		}
+
+		// A tribute to the "awesome hack by Dean Edwards"
+		// Android Browser returns percentage for some values,
+		// but width seems to be reliably pixels.
+		// This is against the CSSOM draft spec:
+		// https://drafts.csswg.org/cssom/#resolved-values
+		if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+
+			// Remember the original values
+			width = style.width;
+			minWidth = style.minWidth;
+			maxWidth = style.maxWidth;
+
+			// Put in the new values to get a computed value out
+			style.minWidth = style.maxWidth = style.width = ret;
+			ret = computed.width;
+
+			// Revert the changed values
+			style.width = width;
+			style.minWidth = minWidth;
+			style.maxWidth = maxWidth;
+		}
+	}
+
+	return ret !== undefined ?
+
+		// Support: IE <=9 - 11 only
+		// IE returns zIndex value as an integer.
+		ret + "" :
+		ret;
+}
+
+
+function addGetHookIf( conditionFn, hookFn ) {
+
+	// Define the hook, we'll check on the first run if it's really needed.
+	return {
+		get: function() {
+			if ( conditionFn() ) {
+
+				// Hook not needed (or it's not possible to use it due
+				// to missing dependency), remove it.
+				delete this.get;
+				return;
+			}
+
+			// Hook needed; redefine it so that the support test is not executed again.
+			return ( this.get = hookFn ).apply( this, arguments );
+		}
+	};
+}
+
+
+var
+
+	// Swappable if display is none or starts with table
+	// except "table", "table-cell", or "table-caption"
+	// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+	rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+	cssNormalTransform = {
+		letterSpacing: "0",
+		fontWeight: "400"
+	},
+
+	cssPrefixes = [ "Webkit", "Moz", "ms" ],
+	emptyStyle = document.createElement( "div" ).style;
+
+// Return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( name ) {
+
+	// Shortcut for names that are not vendor prefixed
+	if ( name in emptyStyle ) {
+		return name;
+	}
+
+	// Check for vendor prefixed names
+	var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
+		i = cssPrefixes.length;
+
+	while ( i-- ) {
+		name = cssPrefixes[ i ] + capName;
+		if ( name in emptyStyle ) {
+			return name;
+		}
+	}
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+
+	// Any relative (+/-) values have already been
+	// normalized at this point
+	var matches = rcssNum.exec( value );
+	return matches ?
+
+		// Guard against undefined "subtract", e.g., when used as in cssHooks
+		Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
+		value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
+	var i = extra === ( isBorderBox ? "border" : "content" ) ?
+
+		// If we already have the right measurement, avoid augmentation
+		4 :
+
+		// Otherwise initialize for horizontal or vertical properties
+		name === "width" ? 1 : 0,
+
+		val = 0;
+
+	for ( ; i < 4; i += 2 ) {
+
+		// Both box models exclude margin, so add it if we want it
+		if ( extra === "margin" ) {
+			val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
+		}
+
+		if ( isBorderBox ) {
+
+			// border-box includes padding, so remove it if we want content
+			if ( extra === "content" ) {
+				val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+			}
+
+			// At this point, extra isn't border nor margin, so remove border
+			if ( extra !== "margin" ) {
+				val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+			}
+		} else {
+
+			// At this point, extra isn't content, so add padding
+			val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+
+			// At this point, extra isn't content nor padding, so add border
+			if ( extra !== "padding" ) {
+				val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+			}
+		}
+	}
+
+	return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+	// Start with offset property, which is equivalent to the border-box value
+	var val,
+		valueIsBorderBox = true,
+		styles = getStyles( elem ),
+		isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
+
+	// Support: IE <=11 only
+	// Running getBoundingClientRect on a disconnected node
+	// in IE throws an error.
+	if ( elem.getClientRects().length ) {
+		val = elem.getBoundingClientRect()[ name ];
+	}
+
+	// Some non-html elements return undefined for offsetWidth, so check for null/undefined
+	// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+	// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+	if ( val <= 0 || val == null ) {
+
+		// Fall back to computed then uncomputed css if necessary
+		val = curCSS( elem, name, styles );
+		if ( val < 0 || val == null ) {
+			val = elem.style[ name ];
+		}
+
+		// Computed unit is not pixels. Stop here and return.
+		if ( rnumnonpx.test( val ) ) {
+			return val;
+		}
+
+		// Check for style in case a browser which returns unreliable values
+		// for getComputedStyle silently falls back to the reliable elem.style
+		valueIsBorderBox = isBorderBox &&
+			( support.boxSizingReliable() || val === elem.style[ name ] );
+
+		// Normalize "", auto, and prepare for extra
+		val = parseFloat( val ) || 0;
+	}
+
+	// Use the active box-sizing model to add/subtract irrelevant styles
+	return ( val +
+		augmentWidthOrHeight(
+			elem,
+			name,
+			extra || ( isBorderBox ? "border" : "content" ),
+			valueIsBorderBox,
+			styles
+		)
+	) + "px";
+}
+
+jQuery.extend( {
+
+	// Add in style property hooks for overriding the default
+	// behavior of getting and setting a style property
+	cssHooks: {
+		opacity: {
+			get: function( elem, computed ) {
+				if ( computed ) {
+
+					// We should always get a number back from opacity
+					var ret = curCSS( elem, "opacity" );
+					return ret === "" ? "1" : ret;
+				}
+			}
+		}
+	},
+
+	// Don't automatically add "px" to these possibly-unitless properties
+	cssNumber: {
+		"animationIterationCount": true,
+		"columnCount": true,
+		"fillOpacity": true,
+		"flexGrow": true,
+		"flexShrink": true,
+		"fontWeight": true,
+		"lineHeight": true,
+		"opacity": true,
+		"order": true,
+		"orphans": true,
+		"widows": true,
+		"zIndex": true,
+		"zoom": true
+	},
+
+	// Add in properties whose names you wish to fix before
+	// setting or getting the value
+	cssProps: {
+		"float": "cssFloat"
+	},
+
+	// Get and set the style property on a DOM Node
+	style: function( elem, name, value, extra ) {
+
+		// Don't set styles on text and comment nodes
+		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+			return;
+		}
+
+		// Make sure that we're working with the right name
+		var ret, type, hooks,
+			origName = jQuery.camelCase( name ),
+			style = elem.style;
+
+		name = jQuery.cssProps[ origName ] ||
+			( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
+
+		// Gets hook for the prefixed version, then unprefixed version
+		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+		// Check if we're setting a value
+		if ( value !== undefined ) {
+			type = typeof value;
+
+			// Convert "+=" or "-=" to relative numbers (#7345)
+			if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
+				value = adjustCSS( elem, name, ret );
+
+				// Fixes bug #9237
+				type = "number";
+			}
+
+			// Make sure that null and NaN values aren't set (#7116)
+			if ( value == null || value !== value ) {
+				return;
+			}
+
+			// If a number was passed in, add the unit (except for certain CSS properties)
+			if ( type === "number" ) {
+				value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
+			}
+
+			// background-* props affect original clone's values
+			if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
+				style[ name ] = "inherit";
+			}
+
+			// If a hook was provided, use that value, otherwise just set the specified value
+			if ( !hooks || !( "set" in hooks ) ||
+				( value = hooks.set( elem, value, extra ) ) !== undefined ) {
+
+				style[ name ] = value;
+			}
+
+		} else {
+
+			// If a hook was provided get the non-computed value from there
+			if ( hooks && "get" in hooks &&
+				( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
+
+				return ret;
+			}
+
+			// Otherwise just get the value from the style object
+			return style[ name ];
+		}
+	},
+
+	css: function( elem, name, extra, styles ) {
+		var val, num, hooks,
+			origName = jQuery.camelCase( name );
+
+		// Make sure that we're working with the right name
+		name = jQuery.cssProps[ origName ] ||
+			( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
+
+		// Try prefixed name followed by the unprefixed name
+		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+		// If a hook was provided get the computed value from there
+		if ( hooks && "get" in hooks ) {
+			val = hooks.get( elem, true, extra );
+		}
+
+		// Otherwise, if a way to get the computed value exists, use that
+		if ( val === undefined ) {
+			val = curCSS( elem, name, styles );
+		}
+
+		// Convert "normal" to computed value
+		if ( val === "normal" && name in cssNormalTransform ) {
+			val = cssNormalTransform[ name ];
+		}
+
+		// Make numeric if forced or a qualifier was provided and val looks numeric
+		if ( extra === "" || extra ) {
+			num = parseFloat( val );
+			return extra === true || isFinite( num ) ? num || 0 : val;
+		}
+		return val;
+	}
+} );
+
+jQuery.each( [ "height", "width" ], function( i, name ) {
+	jQuery.cssHooks[ name ] = {
+		get: function( elem, computed, extra ) {
+			if ( computed ) {
+
+				// Certain elements can have dimension info if we invisibly show them
+				// but it must have a current display style that would benefit
+				return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
+
+					// Support: Safari 8+
+					// Table columns in Safari have non-zero offsetWidth & zero
+					// getBoundingClientRect().width unless display is changed.
+					// Support: IE <=11 only
+					// Running getBoundingClientRect on a disconnected node
+					// in IE throws an error.
+					( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
+						swap( elem, cssShow, function() {
+							return getWidthOrHeight( elem, name, extra );
+						} ) :
+						getWidthOrHeight( elem, name, extra );
+			}
+		},
+
+		set: function( elem, value, extra ) {
+			var matches,
+				styles = extra && getStyles( elem ),
+				subtract = extra && augmentWidthOrHeight(
+					elem,
+					name,
+					extra,
+					jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
+					styles
+				);
+
+			// Convert to pixels if value adjustment is needed
+			if ( subtract && ( matches = rcssNum.exec( value ) ) &&
+				( matches[ 3 ] || "px" ) !== "px" ) {
+
+				elem.style[ name ] = value;
+				value = jQuery.css( elem, name );
+			}
+
+			return setPositiveNumber( elem, value, subtract );
+		}
+	};
+} );
+
+jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
+	function( elem, computed ) {
+		if ( computed ) {
+			return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
+				elem.getBoundingClientRect().left -
+					swap( elem, { marginLeft: 0 }, function() {
+						return elem.getBoundingClientRect().left;
+					} )
+				) + "px";
+		}
+	}
+);
+
+// These hooks are used by animate to expand properties
+jQuery.each( {
+	margin: "",
+	padding: "",
+	border: "Width"
+}, function( prefix, suffix ) {
+	jQuery.cssHooks[ prefix + suffix ] = {
+		expand: function( value ) {
+			var i = 0,
+				expanded = {},
+
+				// Assumes a single number if not a string
+				parts = typeof value === "string" ? value.split( " " ) : [ value ];
+
+			for ( ; i < 4; i++ ) {
+				expanded[ prefix + cssExpand[ i ] + suffix ] =
+					parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+			}
+
+			return expanded;
+		}
+	};
+
+	if ( !rmargin.test( prefix ) ) {
+		jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+	}
+} );
+
+jQuery.fn.extend( {
+	css: function( name, value ) {
+		return access( this, function( elem, name, value ) {
+			var styles, len,
+				map = {},
+				i = 0;
+
+			if ( jQuery.isArray( name ) ) {
+				styles = getStyles( elem );
+				len = name.length;
+
+				for ( ; i < len; i++ ) {
+					map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
+				}
+
+				return map;
+			}
+
+			return value !== undefined ?
+				jQuery.style( elem, name, value ) :
+				jQuery.css( elem, name );
+		}, name, value, arguments.length > 1 );
+	}
+} );
+
+
+function Tween( elem, options, prop, end, easing ) {
+	return new Tween.prototype.init( elem, options, prop, end, easing );
+}
+jQuery.Tween = Tween;
+
+Tween.prototype = {
+	constructor: Tween,
+	init: function( elem, options, prop, end, easing, unit ) {
+		this.elem = elem;
+		this.prop = prop;
+		this.easing = easing || jQuery.easing._default;
+		this.options = options;
+		this.start = this.now = this.cur();
+		this.end = end;
+		this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+	},
+	cur: function() {
+		var hooks = Tween.propHooks[ this.prop ];
+
+		return hooks && hooks.get ?
+			hooks.get( this ) :
+			Tween.propHooks._default.get( this );
+	},
+	run: function( percent ) {
+		var eased,
+			hooks = Tween.propHooks[ this.prop ];
+
+		if ( this.options.duration ) {
+			this.pos = eased = jQuery.easing[ this.easing ](
+				percent, this.options.duration * percent, 0, 1, this.options.duration
+			);
+		} else {
+			this.pos = eased = percent;
+		}
+		this.now = ( this.end - this.start ) * eased + this.start;
+
+		if ( this.options.step ) {
+			this.options.step.call( this.elem, this.now, this );
+		}
+
+		if ( hooks && hooks.set ) {
+			hooks.set( this );
+		} else {
+			Tween.propHooks._default.set( this );
+		}
+		return this;
+	}
+};
+
+Tween.prototype.init.prototype = Tween.prototype;
+
+Tween.propHooks = {
+	_default: {
+		get: function( tween ) {
+			var result;
+
+			// Use a property on the element directly when it is not a DOM element,
+			// or when there is no matching style property that exists.
+			if ( tween.elem.nodeType !== 1 ||
+				tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
+				return tween.elem[ tween.prop ];
+			}
+
+			// Passing an empty string as a 3rd parameter to .css will automatically
+			// attempt a parseFloat and fallback to a string if the parse fails.
+			// Simple values such as "10px" are parsed to Float;
+			// complex values such as "rotate(1rad)" are returned as-is.
+			result = jQuery.css( tween.elem, tween.prop, "" );
+
+			// Empty strings, null, undefined and "auto" are converted to 0.
+			return !result || result === "auto" ? 0 : result;
+		},
+		set: function( tween ) {
+
+			// Use step hook for back compat.
+			// Use cssHook if its there.
+			// Use .style if available and use plain properties where available.
+			if ( jQuery.fx.step[ tween.prop ] ) {
+				jQuery.fx.step[ tween.prop ]( tween );
+			} else if ( tween.elem.nodeType === 1 &&
+				( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
+					jQuery.cssHooks[ tween.prop ] ) ) {
+				jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
+			} else {
+				tween.elem[ tween.prop ] = tween.now;
+			}
+		}
+	}
+};
+
+// Support: IE <=9 only
+// Panic based approach to setting things on disconnected nodes
+Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
+	set: function( tween ) {
+		if ( tween.elem.nodeType && tween.elem.parentNode ) {
+			tween.elem[ tween.prop ] = tween.now;
+		}
+	}
+};
+
+jQuery.easing = {
+	linear: function( p ) {
+		return p;
+	},
+	swing: function( p ) {
+		return 0.5 - Math.cos( p * Math.PI ) / 2;
+	},
+	_default: "swing"
+};
+
+jQuery.fx = Tween.prototype.init;
+
+// Back compat <1.8 extension point
+jQuery.fx.step = {};
+
+
+
+
+var
+	fxNow, timerId,
+	rfxtypes = /^(?:toggle|show|hide)$/,
+	rrun = /queueHooks$/;
+
+function raf() {
+	if ( timerId ) {
+		window.requestAnimationFrame( raf );
+		jQuery.fx.tick();
+	}
+}
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+	window.setTimeout( function() {
+		fxNow = undefined;
+	} );
+	return ( fxNow = jQuery.now() );
+}
+
+// Generate parameters to create a standard animation
+function genFx( type, includeWidth ) {
+	var which,
+		i = 0,
+		attrs = { height: type };
+
+	// If we include width, step value is 1 to do all cssExpand values,
+	// otherwise step value is 2 to skip over Left and Right
+	includeWidth = includeWidth ? 1 : 0;
+	for ( ; i < 4; i += 2 - includeWidth ) {
+		which = cssExpand[ i ];
+		attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
+	}
+
+	if ( includeWidth ) {
+		attrs.opacity = attrs.width = type;
+	}
+
+	return attrs;
+}
+
+function createTween( value, prop, animation ) {
+	var tween,
+		collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
+		index = 0,
+		length = collection.length;
+	for ( ; index < length; index++ ) {
+		if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {
+
+			// We're done with this property
+			return tween;
+		}
+	}
+}
+
+function defaultPrefilter( elem, props, opts ) {
+	var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
+		isBox = "width" in props || "height" in props,
+		anim = this,
+		orig = {},
+		style = elem.style,
+		hidden = elem.nodeType && isHiddenWithinTree( elem ),
+		dataShow = dataPriv.get( elem, "fxshow" );
+
+	// Queue-skipping animations hijack the fx hooks
+	if ( !opts.queue ) {
+		hooks = jQuery._queueHooks( elem, "fx" );
+		if ( hooks.unqueued == null ) {
+			hooks.unqueued = 0;
+			oldfire = hooks.empty.fire;
+			hooks.empty.fire = function() {
+				if ( !hooks.unqueued ) {
+					oldfire();
+				}
+			};
+		}
+		hooks.unqueued++;
+
+		anim.always( function() {
+
+			// Ensure the complete handler is called before this completes
+			anim.always( function() {
+				hooks.unqueued--;
+				if ( !jQuery.queue( elem, "fx" ).length ) {
+					hooks.empty.fire();
+				}
+			} );
+		} );
+	}
+
+	// Detect show/hide animations
+	for ( prop in props ) {
+		value = props[ prop ];
+		if ( rfxtypes.test( value ) ) {
+			delete props[ prop ];
+			toggle = toggle || value === "toggle";
+			if ( value === ( hidden ? "hide" : "show" ) ) {
+
+				// Pretend to be hidden if this is a "show" and
+				// there is still data from a stopped show/hide
+				if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
+					hidden = true;
+
+				// Ignore all other no-op show/hide data
+				} else {
+					continue;
+				}
+			}
+			orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
+		}
+	}
+
+	// Bail out if this is a no-op like .hide().hide()
+	propTween = !jQuery.isEmptyObject( props );
+	if ( !propTween && jQuery.isEmptyObject( orig ) ) {
+		return;
+	}
+
+	// Restrict "overflow" and "display" styles during box animations
+	if ( isBox && elem.nodeType === 1 ) {
+
+		// Support: IE <=9 - 11, Edge 12 - 13
+		// Record all 3 overflow attributes because IE does not infer the shorthand
+		// from identically-valued overflowX and overflowY
+		opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
+
+		// Identify a display type, preferring old show/hide data over the CSS cascade
+		restoreDisplay = dataShow && dataShow.display;
+		if ( restoreDisplay == null ) {
+			restoreDisplay = dataPriv.get( elem, "display" );
+		}
+		display = jQuery.css( elem, "display" );
+		if ( display === "none" ) {
+			if ( restoreDisplay ) {
+				display = restoreDisplay;
+			} else {
+
+				// Get nonempty value(s) by temporarily forcing visibility
+				showHide( [ elem ], true );
+				restoreDisplay = elem.style.display || restoreDisplay;
+				display = jQuery.css( elem, "display" );
+				showHide( [ elem ] );
+			}
+		}
+
+		// Animate inline elements as inline-block
+		if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) {
+			if ( jQuery.css( elem, "float" ) === "none" ) {
+
+				// Restore the original display value at the end of pure show/hide animations
+				if ( !propTween ) {
+					anim.done( function() {
+						style.display = restoreDisplay;
+					} );
+					if ( restoreDisplay == null ) {
+						display = style.display;
+						restoreDisplay = display === "none" ? "" : display;
+					}
+				}
+				style.display = "inline-block";
+			}
+		}
+	}
+
+	if ( opts.overflow ) {
+		style.overflow = "hidden";
+		anim.always( function() {
+			style.overflow = opts.overflow[ 0 ];
+			style.overflowX = opts.overflow[ 1 ];
+			style.overflowY = opts.overflow[ 2 ];
+		} );
+	}
+
+	// Implement show/hide animations
+	propTween = false;
+	for ( prop in orig ) {
+
+		// General show/hide setup for this element animation
+		if ( !propTween ) {
+			if ( dataShow ) {
+				if ( "hidden" in dataShow ) {
+					hidden = dataShow.hidden;
+				}
+			} else {
+				dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } );
+			}
+
+			// Store hidden/visible for toggle so `.stop().toggle()` "reverses"
+			if ( toggle ) {
+				dataShow.hidden = !hidden;
+			}
+
+			// Show elements before animating them
+			if ( hidden ) {
+				showHide( [ elem ], true );
+			}
+
+			/* eslint-disable no-loop-func */
+
+			anim.done( function() {
+
+			/* eslint-enable no-loop-func */
+
+				// The final step of a "hide" animation is actually hiding the element
+				if ( !hidden ) {
+					showHide( [ elem ] );
+				}
+				dataPriv.remove( elem, "fxshow" );
+				for ( prop in orig ) {
+					jQuery.style( elem, prop, orig[ prop ] );
+				}
+			} );
+		}
+
+		// Per-property setup
+		propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
+		if ( !( prop in dataShow ) ) {
+			dataShow[ prop ] = propTween.start;
+			if ( hidden ) {
+				propTween.end = propTween.start;
+				propTween.start = 0;
+			}
+		}
+	}
+}
+
+function propFilter( props, specialEasing ) {
+	var index, name, easing, value, hooks;
+
+	// camelCase, specialEasing and expand cssHook pass
+	for ( index in props ) {
+		name = jQuery.camelCase( index );
+		easing = specialEasing[ name ];
+		value = props[ index ];
+		if ( jQuery.isArray( value ) ) {
+			easing = value[ 1 ];
+			value = props[ index ] = value[ 0 ];
+		}
+
+		if ( index !== name ) {
+			props[ name ] = value;
+			delete props[ index ];
+		}
+
+		hooks = jQuery.cssHooks[ name ];
+		if ( hooks && "expand" in hooks ) {
+			value = hooks.expand( value );
+			delete props[ name ];
+
+			// Not quite $.extend, this won't overwrite existing keys.
+			// Reusing 'index' because we have the correct "name"
+			for ( index in value ) {
+				if ( !( index in props ) ) {
+					props[ index ] = value[ index ];
+					specialEasing[ index ] = easing;
+				}
+			}
+		} else {
+			specialEasing[ name ] = easing;
+		}
+	}
+}
+
+function Animation( elem, properties, options ) {
+	var result,
+		stopped,
+		index = 0,
+		length = Animation.prefilters.length,
+		deferred = jQuery.Deferred().always( function() {
+
+			// Don't match elem in the :animated selector
+			delete tick.elem;
+		} ),
+		tick = function() {
+			if ( stopped ) {
+				return false;
+			}
+			var currentTime = fxNow || createFxNow(),
+				remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
+
+				// Support: Android 2.3 only
+				// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
+				temp = remaining / animation.duration || 0,
+				percent = 1 - temp,
+				index = 0,
+				length = animation.tweens.length;
+
+			for ( ; index < length; index++ ) {
+				animation.tweens[ index ].run( percent );
+			}
+
+			deferred.notifyWith( elem, [ animation, percent, remaining ] );
+
+			if ( percent < 1 && length ) {
+				return remaining;
+			} else {
+				deferred.resolveWith( elem, [ animation ] );
+				return false;
+			}
+		},
+		animation = deferred.promise( {
+			elem: elem,
+			props: jQuery.extend( {}, properties ),
+			opts: jQuery.extend( true, {
+				specialEasing: {},
+				easing: jQuery.easing._default
+			}, options ),
+			originalProperties: properties,
+			originalOptions: options,
+			startTime: fxNow || createFxNow(),
+			duration: options.duration,
+			tweens: [],
+			createTween: function( prop, end ) {
+				var tween = jQuery.Tween( elem, animation.opts, prop, end,
+						animation.opts.specialEasing[ prop ] || animation.opts.easing );
+				animation.tweens.push( tween );
+				return tween;
+			},
+			stop: function( gotoEnd ) {
+				var index = 0,
+
+					// If we are going to the end, we want to run all the tweens
+					// otherwise we skip this part
+					length = gotoEnd ? animation.tweens.length : 0;
+				if ( stopped ) {
+					return this;
+				}
+				stopped = true;
+				for ( ; index < length; index++ ) {
+					animation.tweens[ index ].run( 1 );
+				}
+
+				// Resolve when we played the last frame; otherwise, reject
+				if ( gotoEnd ) {
+					deferred.notifyWith( elem, [ animation, 1, 0 ] );
+					deferred.resolveWith( elem, [ animation, gotoEnd ] );
+				} else {
+					deferred.rejectWith( elem, [ animation, gotoEnd ] );
+				}
+				return this;
+			}
+		} ),
+		props = animation.props;
+
+	propFilter( props, animation.opts.specialEasing );
+
+	for ( ; index < length; index++ ) {
+		result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
+		if ( result ) {
+			if ( jQuery.isFunction( result.stop ) ) {
+				jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
+					jQuery.proxy( result.stop, result );
+			}
+			return result;
+		}
+	}
+
+	jQuery.map( props, createTween, animation );
+
+	if ( jQuery.isFunction( animation.opts.start ) ) {
+		animation.opts.start.call( elem, animation );
+	}
+
+	jQuery.fx.timer(
+		jQuery.extend( tick, {
+			elem: elem,
+			anim: animation,
+			queue: animation.opts.queue
+		} )
+	);
+
+	// attach callbacks from options
+	return animation.progress( animation.opts.progress )
+		.done( animation.opts.done, animation.opts.complete )
+		.fail( animation.opts.fail )
+		.always( animation.opts.always );
+}
+
+jQuery.Animation = jQuery.extend( Animation, {
+
+	tweeners: {
+		"*": [ function( prop, value ) {
+			var tween = this.createTween( prop, value );
+			adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
+			return tween;
+		} ]
+	},
+
+	tweener: function( props, callback ) {
+		if ( jQuery.isFunction( props ) ) {
+			callback = props;
+			props = [ "*" ];
+		} else {
+			props = props.match( rnotwhite );
+		}
+
+		var prop,
+			index = 0,
+			length = props.length;
+
+		for ( ; index < length; index++ ) {
+			prop = props[ index ];
+			Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
+			Animation.tweeners[ prop ].unshift( callback );
+		}
+	},
+
+	prefilters: [ defaultPrefilter ],
+
+	prefilter: function( callback, prepend ) {
+		if ( prepend ) {
+			Animation.prefilters.unshift( callback );
+		} else {
+			Animation.prefilters.push( callback );
+		}
+	}
+} );
+
+jQuery.speed = function( speed, easing, fn ) {
+	var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+		complete: fn || !fn && easing ||
+			jQuery.isFunction( speed ) && speed,
+		duration: speed,
+		easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+	};
+
+	// Go to the end state if fx are off or if document is hidden
+	if ( jQuery.fx.off || document.hidden ) {
+		opt.duration = 0;
+
+	} else {
+		opt.duration = typeof opt.duration === "number" ?
+			opt.duration : opt.duration in jQuery.fx.speeds ?
+				jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+	}
+
+	// Normalize opt.queue - true/undefined/null -> "fx"
+	if ( opt.queue == null || opt.queue === true ) {
+		opt.queue = "fx";
+	}
+
+	// Queueing
+	opt.old = opt.complete;
+
+	opt.complete = function() {
+		if ( jQuery.isFunction( opt.old ) ) {
+			opt.old.call( this );
+		}
+
+		if ( opt.queue ) {
+			jQuery.dequeue( this, opt.queue );
+		}
+	};
+
+	return opt;
+};
+
+jQuery.fn.extend( {
+	fadeTo: function( speed, to, easing, callback ) {
+
+		// Show any hidden elements after setting opacity to 0
+		return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()
+
+			// Animate to the value specified
+			.end().animate( { opacity: to }, speed, easing, callback );
+	},
+	animate: function( prop, speed, easing, callback ) {
+		var empty = jQuery.isEmptyObject( prop ),
+			optall = jQuery.speed( speed, easing, callback ),
+			doAnimation = function() {
+
+				// Operate on a copy of prop so per-property easing won't be lost
+				var anim = Animation( this, jQuery.extend( {}, prop ), optall );
+
+				// Empty animations, or finishing resolves immediately
+				if ( empty || dataPriv.get( this, "finish" ) ) {
+					anim.stop( true );
+				}
+			};
+			doAnimation.finish = doAnimation;
+
+		return empty || optall.queue === false ?
+			this.each( doAnimation ) :
+			this.queue( optall.queue, doAnimation );
+	},
+	stop: function( type, clearQueue, gotoEnd ) {
+		var stopQueue = function( hooks ) {
+			var stop = hooks.stop;
+			delete hooks.stop;
+			stop( gotoEnd );
+		};
+
+		if ( typeof type !== "string" ) {
+			gotoEnd = clearQueue;
+			clearQueue = type;
+			type = undefined;
+		}
+		if ( clearQueue && type !== false ) {
+			this.queue( type || "fx", [] );
+		}
+
+		return this.each( function() {
+			var dequeue = true,
+				index = type != null && type + "queueHooks",
+				timers = jQuery.timers,
+				data = dataPriv.get( this );
+
+			if ( index ) {
+				if ( data[ index ] && data[ index ].stop ) {
+					stopQueue( data[ index ] );
+				}
+			} else {
+				for ( index in data ) {
+					if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
+						stopQueue( data[ index ] );
+					}
+				}
+			}
+
+			for ( index = timers.length; index--; ) {
+				if ( timers[ index ].elem === this &&
+					( type == null || timers[ index ].queue === type ) ) {
+
+					timers[ index ].anim.stop( gotoEnd );
+					dequeue = false;
+					timers.splice( index, 1 );
+				}
+			}
+
+			// Start the next in the queue if the last step wasn't forced.
+			// Timers currently will call their complete callbacks, which
+			// will dequeue but only if they were gotoEnd.
+			if ( dequeue || !gotoEnd ) {
+				jQuery.dequeue( this, type );
+			}
+		} );
+	},
+	finish: function( type ) {
+		if ( type !== false ) {
+			type = type || "fx";
+		}
+		return this.each( function() {
+			var index,
+				data = dataPriv.get( this ),
+				queue = data[ type + "queue" ],
+				hooks = data[ type + "queueHooks" ],
+				timers = jQuery.timers,
+				length = queue ? queue.length : 0;
+
+			// Enable finishing flag on private data
+			data.finish = true;
+
+			// Empty the queue first
+			jQuery.queue( this, type, [] );
+
+			if ( hooks && hooks.stop ) {
+				hooks.stop.call( this, true );
+			}
+
+			// Look for any active animations, and finish them
+			for ( index = timers.length; index--; ) {
+				if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
+					timers[ index ].anim.stop( true );
+					timers.splice( index, 1 );
+				}
+			}
+
+			// Look for any animations in the old queue and finish them
+			for ( index = 0; index < length; index++ ) {
+				if ( queue[ index ] && queue[ index ].finish ) {
+					queue[ index ].finish.call( this );
+				}
+			}
+
+			// Turn off finishing flag
+			delete data.finish;
+		} );
+	}
+} );
+
+jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) {
+	var cssFn = jQuery.fn[ name ];
+	jQuery.fn[ name ] = function( speed, easing, callback ) {
+		return speed == null || typeof speed === "boolean" ?
+			cssFn.apply( this, arguments ) :
+			this.animate( genFx( name, true ), speed, easing, callback );
+	};
+} );
+
+// Generate shortcuts for custom animations
+jQuery.each( {
+	slideDown: genFx( "show" ),
+	slideUp: genFx( "hide" ),
+	slideToggle: genFx( "toggle" ),
+	fadeIn: { opacity: "show" },
+	fadeOut: { opacity: "hide" },
+	fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+	jQuery.fn[ name ] = function( speed, easing, callback ) {
+		return this.animate( props, speed, easing, callback );
+	};
+} );
+
+jQuery.timers = [];
+jQuery.fx.tick = function() {
+	var timer,
+		i = 0,
+		timers = jQuery.timers;
+
+	fxNow = jQuery.now();
+
+	for ( ; i < timers.length; i++ ) {
+		timer = timers[ i ];
+
+		// Checks the timer has not already been removed
+		if ( !timer() && timers[ i ] === timer ) {
+			timers.splice( i--, 1 );
+		}
+	}
+
+	if ( !timers.length ) {
+		jQuery.fx.stop();
+	}
+	fxNow = undefined;
+};
+
+jQuery.fx.timer = function( timer ) {
+	jQuery.timers.push( timer );
+	if ( timer() ) {
+		jQuery.fx.start();
+	} else {
+		jQuery.timers.pop();
+	}
+};
+
+jQuery.fx.interval = 13;
+jQuery.fx.start = function() {
+	if ( !timerId ) {
+		timerId = window.requestAnimationFrame ?
+			window.requestAnimationFrame( raf ) :
+			window.setInterval( jQuery.fx.tick, jQuery.fx.interval );
+	}
+};
+
+jQuery.fx.stop = function() {
+	if ( window.cancelAnimationFrame ) {
+		window.cancelAnimationFrame( timerId );
+	} else {
+		window.clearInterval( timerId );
+	}
+
+	timerId = null;
+};
+
+jQuery.fx.speeds = {
+	slow: 600,
+	fast: 200,
+
+	// Default speed
+	_default: 400
+};
+
+
+// Based off of the plugin by Clint Helfers, with permission.
+// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
+jQuery.fn.delay = function( time, type ) {
+	time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+	type = type || "fx";
+
+	return this.queue( type, function( next, hooks ) {
+		var timeout = window.setTimeout( next, time );
+		hooks.stop = function() {
+			window.clearTimeout( timeout );
+		};
+	} );
+};
+
+
+( function() {
+	var input = document.createElement( "input" ),
+		select = document.createElement( "select" ),
+		opt = select.appendChild( document.createElement( "option" ) );
+
+	input.type = "checkbox";
+
+	// Support: Android <=4.3 only
+	// Default value for a checkbox should be "on"
+	support.checkOn = input.value !== "";
+
+	// Support: IE <=11 only
+	// Must access selectedIndex to make default options select
+	support.optSelected = opt.selected;
+
+	// Support: IE <=11 only
+	// An input loses its value after becoming a radio
+	input = document.createElement( "input" );
+	input.value = "t";
+	input.type = "radio";
+	support.radioValue = input.value === "t";
+} )();
+
+
+var boolHook,
+	attrHandle = jQuery.expr.attrHandle;
+
+jQuery.fn.extend( {
+	attr: function( name, value ) {
+		return access( this, jQuery.attr, name, value, arguments.length > 1 );
+	},
+
+	removeAttr: function( name ) {
+		return this.each( function() {
+			jQuery.removeAttr( this, name );
+		} );
+	}
+} );
+
+jQuery.extend( {
+	attr: function( elem, name, value ) {
+		var ret, hooks,
+			nType = elem.nodeType;
+
+		// Don't get/set attributes on text, comment and attribute nodes
+		if ( nType === 3 || nType === 8 || nType === 2 ) {
+			return;
+		}
+
+		// Fallback to prop when attributes are not supported
+		if ( typeof elem.getAttribute === "undefined" ) {
+			return jQuery.prop( elem, name, value );
+		}
+
+		// Attribute hooks are determined by the lowercase version
+		// Grab necessary hook if one is defined
+		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
+			hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
+				( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
+		}
+
+		if ( value !== undefined ) {
+			if ( value === null ) {
+				jQuery.removeAttr( elem, name );
+				return;
+			}
+
+			if ( hooks && "set" in hooks &&
+				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
+				return ret;
+			}
+
+			elem.setAttribute( name, value + "" );
+			return value;
+		}
+
+		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
+			return ret;
+		}
+
+		ret = jQuery.find.attr( elem, name );
+
+		// Non-existent attributes return null, we normalize to undefined
+		return ret == null ? undefined : ret;
+	},
+
+	attrHooks: {
+		type: {
+			set: function( elem, value ) {
+				if ( !support.radioValue && value === "radio" &&
+					jQuery.nodeName( elem, "input" ) ) {
+					var val = elem.value;
+					elem.setAttribute( "type", value );
+					if ( val ) {
+						elem.value = val;
+					}
+					return value;
+				}
+			}
+		}
+	},
+
+	removeAttr: function( elem, value ) {
+		var name,
+			i = 0,
+			attrNames = value && value.match( rnotwhite );
+
+		if ( attrNames && elem.nodeType === 1 ) {
+			while ( ( name = attrNames[ i++ ] ) ) {
+				elem.removeAttribute( name );
+			}
+		}
+	}
+} );
+
+// Hooks for boolean attributes
+boolHook = {
+	set: function( elem, value, name ) {
+		if ( value === false ) {
+
+			// Remove boolean attributes when set to false
+			jQuery.removeAttr( elem, name );
+		} else {
+			elem.setAttribute( name, name );
+		}
+		return name;
+	}
+};
+
+jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
+	var getter = attrHandle[ name ] || jQuery.find.attr;
+
+	attrHandle[ name ] = function( elem, name, isXML ) {
+		var ret, handle,
+			lowercaseName = name.toLowerCase();
+
+		if ( !isXML ) {
+
+			// Avoid an infinite loop by temporarily removing this function from the getter
+			handle = attrHandle[ lowercaseName ];
+			attrHandle[ lowercaseName ] = ret;
+			ret = getter( elem, name, isXML ) != null ?
+				lowercaseName :
+				null;
+			attrHandle[ lowercaseName ] = handle;
+		}
+		return ret;
+	};
+} );
+
+
+
+
+var rfocusable = /^(?:input|select|textarea|button)$/i,
+	rclickable = /^(?:a|area)$/i;
+
+jQuery.fn.extend( {
+	prop: function( name, value ) {
+		return access( this, jQuery.prop, name, value, arguments.length > 1 );
+	},
+
+	removeProp: function( name ) {
+		return this.each( function() {
+			delete this[ jQuery.propFix[ name ] || name ];
+		} );
+	}
+} );
+
+jQuery.extend( {
+	prop: function( elem, name, value ) {
+		var ret, hooks,
+			nType = elem.nodeType;
+
+		// Don't get/set properties on text, comment and attribute nodes
+		if ( nType === 3 || nType === 8 || nType === 2 ) {
+			return;
+		}
+
+		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
+
+			// Fix name and attach hooks
+			name = jQuery.propFix[ name ] || name;
+			hooks = jQuery.propHooks[ name ];
+		}
+
+		if ( value !== undefined ) {
+			if ( hooks && "set" in hooks &&
+				( ret = hooks.set( elem, value, name ) ) !== undefined ) {
+				return ret;
+			}
+
+			return ( elem[ name ] = value );
+		}
+
+		if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
+			return ret;
+		}
+
+		return elem[ name ];
+	},
+
+	propHooks: {
+		tabIndex: {
+			get: function( elem ) {
+
+				// Support: IE <=9 - 11 only
+				// elem.tabIndex doesn't always return the
+				// correct value when it hasn't been explicitly set
+				// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+				// Use proper attribute retrieval(#12072)
+				var tabindex = jQuery.find.attr( elem, "tabindex" );
+
+				return tabindex ?
+					parseInt( tabindex, 10 ) :
+					rfocusable.test( elem.nodeName ) ||
+						rclickable.test( elem.nodeName ) && elem.href ?
+							0 :
+							-1;
+			}
+		}
+	},
+
+	propFix: {
+		"for": "htmlFor",
+		"class": "className"
+	}
+} );
+
+// Support: IE <=11 only
+// Accessing the selectedIndex property
+// forces the browser to respect setting selected
+// on the option
+// The getter ensures a default option is selected
+// when in an optgroup
+if ( !support.optSelected ) {
+	jQuery.propHooks.selected = {
+		get: function( elem ) {
+			var parent = elem.parentNode;
+			if ( parent && parent.parentNode ) {
+				parent.parentNode.selectedIndex;
+			}
+			return null;
+		},
+		set: function( elem ) {
+			var parent = elem.parentNode;
+			if ( parent ) {
+				parent.selectedIndex;
+
+				if ( parent.parentNode ) {
+					parent.parentNode.selectedIndex;
+				}
+			}
+		}
+	};
+}
+
+jQuery.each( [
+	"tabIndex",
+	"readOnly",
+	"maxLength",
+	"cellSpacing",
+	"cellPadding",
+	"rowSpan",
+	"colSpan",
+	"useMap",
+	"frameBorder",
+	"contentEditable"
+], function() {
+	jQuery.propFix[ this.toLowerCase() ] = this;
+} );
+
+
+
+
+var rclass = /[\t\r\n\f]/g;
+
+function getClass( elem ) {
+	return elem.getAttribute && elem.getAttribute( "class" ) || "";
+}
+
+jQuery.fn.extend( {
+	addClass: function( value ) {
+		var classes, elem, cur, curValue, clazz, j, finalValue,
+			i = 0;
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each( function( j ) {
+				jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
+			} );
+		}
+
+		if ( typeof value === "string" && value ) {
+			classes = value.match( rnotwhite ) || [];
+
+			while ( ( elem = this[ i++ ] ) ) {
+				curValue = getClass( elem );
+				cur = elem.nodeType === 1 &&
+					( " " + curValue + " " ).replace( rclass, " " );
+
+				if ( cur ) {
+					j = 0;
+					while ( ( clazz = classes[ j++ ] ) ) {
+						if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
+							cur += clazz + " ";
+						}
+					}
+
+					// Only assign if different to avoid unneeded rendering.
+					finalValue = jQuery.trim( cur );
+					if ( curValue !== finalValue ) {
+						elem.setAttribute( "class", finalValue );
+					}
+				}
+			}
+		}
+
+		return this;
+	},
+
+	removeClass: function( value ) {
+		var classes, elem, cur, curValue, clazz, j, finalValue,
+			i = 0;
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each( function( j ) {
+				jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
+			} );
+		}
+
+		if ( !arguments.length ) {
+			return this.attr( "class", "" );
+		}
+
+		if ( typeof value === "string" && value ) {
+			classes = value.match( rnotwhite ) || [];
+
+			while ( ( elem = this[ i++ ] ) ) {
+				curValue = getClass( elem );
+
+				// This expression is here for better compressibility (see addClass)
+				cur = elem.nodeType === 1 &&
+					( " " + curValue + " " ).replace( rclass, " " );
+
+				if ( cur ) {
+					j = 0;
+					while ( ( clazz = classes[ j++ ] ) ) {
+
+						// Remove *all* instances
+						while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
+							cur = cur.replace( " " + clazz + " ", " " );
+						}
+					}
+
+					// Only assign if different to avoid unneeded rendering.
+					finalValue = jQuery.trim( cur );
+					if ( curValue !== finalValue ) {
+						elem.setAttribute( "class", finalValue );
+					}
+				}
+			}
+		}
+
+		return this;
+	},
+
+	toggleClass: function( value, stateVal ) {
+		var type = typeof value;
+
+		if ( typeof stateVal === "boolean" && type === "string" ) {
+			return stateVal ? this.addClass( value ) : this.removeClass( value );
+		}
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each( function( i ) {
+				jQuery( this ).toggleClass(
+					value.call( this, i, getClass( this ), stateVal ),
+					stateVal
+				);
+			} );
+		}
+
+		return this.each( function() {
+			var className, i, self, classNames;
+
+			if ( type === "string" ) {
+
+				// Toggle individual class names
+				i = 0;
+				self = jQuery( this );
+				classNames = value.match( rnotwhite ) || [];
+
+				while ( ( className = classNames[ i++ ] ) ) {
+
+					// Check each className given, space separated list
+					if ( self.hasClass( className ) ) {
+						self.removeClass( className );
+					} else {
+						self.addClass( className );
+					}
+				}
+
+			// Toggle whole class name
+			} else if ( value === undefined || type === "boolean" ) {
+				className = getClass( this );
+				if ( className ) {
+
+					// Store className if set
+					dataPriv.set( this, "__className__", className );
+				}
+
+				// If the element has a class name or if we're passed `false`,
+				// then remove the whole classname (if there was one, the above saved it).
+				// Otherwise bring back whatever was previously saved (if anything),
+				// falling back to the empty string if nothing was stored.
+				if ( this.setAttribute ) {
+					this.setAttribute( "class",
+						className || value === false ?
+						"" :
+						dataPriv.get( this, "__className__" ) || ""
+					);
+				}
+			}
+		} );
+	},
+
+	hasClass: function( selector ) {
+		var className, elem,
+			i = 0;
+
+		className = " " + selector + " ";
+		while ( ( elem = this[ i++ ] ) ) {
+			if ( elem.nodeType === 1 &&
+				( " " + getClass( elem ) + " " ).replace( rclass, " " )
+					.indexOf( className ) > -1
+			) {
+				return true;
+			}
+		}
+
+		return false;
+	}
+} );
+
+
+
+
+var rreturn = /\r/g,
+	rspaces = /[\x20\t\r\n\f]+/g;
+
+jQuery.fn.extend( {
+	val: function( value ) {
+		var hooks, ret, isFunction,
+			elem = this[ 0 ];
+
+		if ( !arguments.length ) {
+			if ( elem ) {
+				hooks = jQuery.valHooks[ elem.type ] ||
+					jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+				if ( hooks &&
+					"get" in hooks &&
+					( ret = hooks.get( elem, "value" ) ) !== undefined
+				) {
+					return ret;
+				}
+
+				ret = elem.value;
+
+				return typeof ret === "string" ?
+
+					// Handle most common string cases
+					ret.replace( rreturn, "" ) :
+
+					// Handle cases where value is null/undef or number
+					ret == null ? "" : ret;
+			}
+
+			return;
+		}
+
+		isFunction = jQuery.isFunction( value );
+
+		return this.each( function( i ) {
+			var val;
+
+			if ( this.nodeType !== 1 ) {
+				return;
+			}
+
+			if ( isFunction ) {
+				val = value.call( this, i, jQuery( this ).val() );
+			} else {
+				val = value;
+			}
+
+			// Treat null/undefined as ""; convert numbers to string
+			if ( val == null ) {
+				val = "";
+
+			} else if ( typeof val === "number" ) {
+				val += "";
+
+			} else if ( jQuery.isArray( val ) ) {
+				val = jQuery.map( val, function( value ) {
+					return value == null ? "" : value + "";
+				} );
+			}
+
+			hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+			// If set returns undefined, fall back to normal setting
+			if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
+				this.value = val;
+			}
+		} );
+	}
+} );
+
+jQuery.extend( {
+	valHooks: {
+		option: {
+			get: function( elem ) {
+
+				var val = jQuery.find.attr( elem, "value" );
+				return val != null ?
+					val :
+
+					// Support: IE <=10 - 11 only
+					// option.text throws exceptions (#14686, #14858)
+					// Strip and collapse whitespace
+					// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
+					jQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " );
+			}
+		},
+		select: {
+			get: function( elem ) {
+				var value, option,
+					options = elem.options,
+					index = elem.selectedIndex,
+					one = elem.type === "select-one",
+					values = one ? null : [],
+					max = one ? index + 1 : options.length,
+					i = index < 0 ?
+						max :
+						one ? index : 0;
+
+				// Loop through all the selected options
+				for ( ; i < max; i++ ) {
+					option = options[ i ];
+
+					// Support: IE <=9 only
+					// IE8-9 doesn't update selected after form reset (#2551)
+					if ( ( option.selected || i === index ) &&
+
+							// Don't return options that are disabled or in a disabled optgroup
+							!option.disabled &&
+							( !option.parentNode.disabled ||
+								!jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+						// Get the specific value for the option
+						value = jQuery( option ).val();
+
+						// We don't need an array for one selects
+						if ( one ) {
+							return value;
+						}
+
+						// Multi-Selects return an array
+						values.push( value );
+					}
+				}
+
+				return values;
+			},
+
+			set: function( elem, value ) {
+				var optionSet, option,
+					options = elem.options,
+					values = jQuery.makeArray( value ),
+					i = options.length;
+
+				while ( i-- ) {
+					option = options[ i ];
+
+					/* eslint-disable no-cond-assign */
+
+					if ( option.selected =
+						jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
+					) {
+						optionSet = true;
+					}
+
+					/* eslint-enable no-cond-assign */
+				}
+
+				// Force browsers to behave consistently when non-matching value is set
+				if ( !optionSet ) {
+					elem.selectedIndex = -1;
+				}
+				return values;
+			}
+		}
+	}
+} );
+
+// Radios and checkboxes getter/setter
+jQuery.each( [ "radio", "checkbox" ], function() {
+	jQuery.valHooks[ this ] = {
+		set: function( elem, value ) {
+			if ( jQuery.isArray( value ) ) {
+				return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
+			}
+		}
+	};
+	if ( !support.checkOn ) {
+		jQuery.valHooks[ this ].get = function( elem ) {
+			return elem.getAttribute( "value" ) === null ? "on" : elem.value;
+		};
+	}
+} );
+
+
+
+
+// Return jQuery for attributes-only inclusion
+
+
+var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;
+
+jQuery.extend( jQuery.event, {
+
+	trigger: function( event, data, elem, onlyHandlers ) {
+
+		var i, cur, tmp, bubbleType, ontype, handle, special,
+			eventPath = [ elem || document ],
+			type = hasOwn.call( event, "type" ) ? event.type : event,
+			namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
+
+		cur = tmp = elem = elem || document;
+
+		// Don't do events on text and comment nodes
+		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+			return;
+		}
+
+		// focus/blur morphs to focusin/out; ensure we're not firing them right now
+		if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+			return;
+		}
+
+		if ( type.indexOf( "." ) > -1 ) {
+
+			// Namespaced trigger; create a regexp to match event type in handle()
+			namespaces = type.split( "." );
+			type = namespaces.shift();
+			namespaces.sort();
+		}
+		ontype = type.indexOf( ":" ) < 0 && "on" + type;
+
+		// Caller can pass in a jQuery.Event object, Object, or just an event type string
+		event = event[ jQuery.expando ] ?
+			event :
+			new jQuery.Event( type, typeof event === "object" && event );
+
+		// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
+		event.isTrigger = onlyHandlers ? 2 : 3;
+		event.namespace = namespaces.join( "." );
+		event.rnamespace = event.namespace ?
+			new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
+			null;
+
+		// Clean up the event in case it is being reused
+		event.result = undefined;
+		if ( !event.target ) {
+			event.target = elem;
+		}
+
+		// Clone any incoming data and prepend the event, creating the handler arg list
+		data = data == null ?
+			[ event ] :
+			jQuery.makeArray( data, [ event ] );
+
+		// Allow special events to draw outside the lines
+		special = jQuery.event.special[ type ] || {};
+		if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
+			return;
+		}
+
+		// Determine event propagation path in advance, per W3C events spec (#9951)
+		// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+		if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+			bubbleType = special.delegateType || type;
+			if ( !rfocusMorph.test( bubbleType + type ) ) {
+				cur = cur.parentNode;
+			}
+			for ( ; cur; cur = cur.parentNode ) {
+				eventPath.push( cur );
+				tmp = cur;
+			}
+
+			// Only add window if we got to document (e.g., not plain obj or detached DOM)
+			if ( tmp === ( elem.ownerDocument || document ) ) {
+				eventPath.push( tmp.defaultView || tmp.parentWindow || window );
+			}
+		}
+
+		// Fire handlers on the event path
+		i = 0;
+		while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
+
+			event.type = i > 1 ?
+				bubbleType :
+				special.bindType || type;
+
+			// jQuery handler
+			handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&
+				dataPriv.get( cur, "handle" );
+			if ( handle ) {
+				handle.apply( cur, data );
+			}
+
+			// Native handler
+			handle = ontype && cur[ ontype ];
+			if ( handle && handle.apply && acceptData( cur ) ) {
+				event.result = handle.apply( cur, data );
+				if ( event.result === false ) {
+					event.preventDefault();
+				}
+			}
+		}
+		event.type = type;
+
+		// If nobody prevented the default action, do it now
+		if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+			if ( ( !special._default ||
+				special._default.apply( eventPath.pop(), data ) === false ) &&
+				acceptData( elem ) ) {
+
+				// Call a native DOM method on the target with the same name as the event.
+				// Don't do default actions on window, that's where global variables be (#6170)
+				if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
+
+					// Don't re-trigger an onFOO event when we call its FOO() method
+					tmp = elem[ ontype ];
+
+					if ( tmp ) {
+						elem[ ontype ] = null;
+					}
+
+					// Prevent re-triggering of the same event, since we already bubbled it above
+					jQuery.event.triggered = type;
+					elem[ type ]();
+					jQuery.event.triggered = undefined;
+
+					if ( tmp ) {
+						elem[ ontype ] = tmp;
+					}
+				}
+			}
+		}
+
+		return event.result;
+	},
+
+	// Piggyback on a donor event to simulate a different one
+	// Used only for `focus(in | out)` events
+	simulate: function( type, elem, event ) {
+		var e = jQuery.extend(
+			new jQuery.Event(),
+			event,
+			{
+				type: type,
+				isSimulated: true
+			}
+		);
+
+		jQuery.event.trigger( e, null, elem );
+	}
+
+} );
+
+jQuery.fn.extend( {
+
+	trigger: function( type, data ) {
+		return this.each( function() {
+			jQuery.event.trigger( type, data, this );
+		} );
+	},
+	triggerHandler: function( type, data ) {
+		var elem = this[ 0 ];
+		if ( elem ) {
+			return jQuery.event.trigger( type, data, elem, true );
+		}
+	}
+} );
+
+
+jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
+	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+	"change select submit keydown keypress keyup contextmenu" ).split( " " ),
+	function( i, name ) {
+
+	// Handle event binding
+	jQuery.fn[ name ] = function( data, fn ) {
+		return arguments.length > 0 ?
+			this.on( name, null, data, fn ) :
+			this.trigger( name );
+	};
+} );
+
+jQuery.fn.extend( {
+	hover: function( fnOver, fnOut ) {
+		return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+	}
+} );
+
+
+
+
+support.focusin = "onfocusin" in window;
+
+
+// Support: Firefox <=44
+// Firefox doesn't have focus(in | out) events
+// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
+//
+// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
+// focus(in | out) events fire after focus & blur events,
+// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
+// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
+if ( !support.focusin ) {
+	jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+		// Attach a single capturing handler on the document while someone wants focusin/focusout
+		var handler = function( event ) {
+			jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
+		};
+
+		jQuery.event.special[ fix ] = {
+			setup: function() {
+				var doc = this.ownerDocument || this,
+					attaches = dataPriv.access( doc, fix );
+
+				if ( !attaches ) {
+					doc.addEventListener( orig, handler, true );
+				}
+				dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
+			},
+			teardown: function() {
+				var doc = this.ownerDocument || this,
+					attaches = dataPriv.access( doc, fix ) - 1;
+
+				if ( !attaches ) {
+					doc.removeEventListener( orig, handler, true );
+					dataPriv.remove( doc, fix );
+
+				} else {
+					dataPriv.access( doc, fix, attaches );
+				}
+			}
+		};
+	} );
+}
+var location = window.location;
+
+var nonce = jQuery.now();
+
+var rquery = ( /\?/ );
+
+
+
+// Cross-browser xml parsing
+jQuery.parseXML = function( data ) {
+	var xml;
+	if ( !data || typeof data !== "string" ) {
+		return null;
+	}
+
+	// Support: IE 9 - 11 only
+	// IE throws on parseFromString with invalid input.
+	try {
+		xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
+	} catch ( e ) {
+		xml = undefined;
+	}
+
+	if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
+		jQuery.error( "Invalid XML: " + data );
+	}
+	return xml;
+};
+
+
+var
+	rbracket = /\[\]$/,
+	rCRLF = /\r?\n/g,
+	rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
+	rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+function buildParams( prefix, obj, traditional, add ) {
+	var name;
+
+	if ( jQuery.isArray( obj ) ) {
+
+		// Serialize array item.
+		jQuery.each( obj, function( i, v ) {
+			if ( traditional || rbracket.test( prefix ) ) {
+
+				// Treat each array item as a scalar.
+				add( prefix, v );
+
+			} else {
+
+				// Item is non-scalar (array or object), encode its numeric index.
+				buildParams(
+					prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
+					v,
+					traditional,
+					add
+				);
+			}
+		} );
+
+	} else if ( !traditional && jQuery.type( obj ) === "object" ) {
+
+		// Serialize object item.
+		for ( name in obj ) {
+			buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+		}
+
+	} else {
+
+		// Serialize scalar item.
+		add( prefix, obj );
+	}
+}
+
+// Serialize an array of form elements or a set of
+// key/values into a query string
+jQuery.param = function( a, traditional ) {
+	var prefix,
+		s = [],
+		add = function( key, valueOrFunction ) {
+
+			// If value is a function, invoke it and use its return value
+			var value = jQuery.isFunction( valueOrFunction ) ?
+				valueOrFunction() :
+				valueOrFunction;
+
+			s[ s.length ] = encodeURIComponent( key ) + "=" +
+				encodeURIComponent( value == null ? "" : value );
+		};
+
+	// If an array was passed in, assume that it is an array of form elements.
+	if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+
+		// Serialize the form elements
+		jQuery.each( a, function() {
+			add( this.name, this.value );
+		} );
+
+	} else {
+
+		// If traditional, encode the "old" way (the way 1.3.2 or older
+		// did it), otherwise encode params recursively.
+		for ( prefix in a ) {
+			buildParams( prefix, a[ prefix ], traditional, add );
+		}
+	}
+
+	// Return the resulting serialization
+	return s.join( "&" );
+};
+
+jQuery.fn.extend( {
+	serialize: function() {
+		return jQuery.param( this.serializeArray() );
+	},
+	serializeArray: function() {
+		return this.map( function() {
+
+			// Can add propHook for "elements" to filter or add form elements
+			var elements = jQuery.prop( this, "elements" );
+			return elements ? jQuery.makeArray( elements ) : this;
+		} )
+		.filter( function() {
+			var type = this.type;
+
+			// Use .is( ":disabled" ) so that fieldset[disabled] works
+			return this.name && !jQuery( this ).is( ":disabled" ) &&
+				rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
+				( this.checked || !rcheckableType.test( type ) );
+		} )
+		.map( function( i, elem ) {
+			var val = jQuery( this ).val();
+
+			return val == null ?
+				null :
+				jQuery.isArray( val ) ?
+					jQuery.map( val, function( val ) {
+						return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+					} ) :
+					{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+		} ).get();
+	}
+} );
+
+
+var
+	r20 = /%20/g,
+	rhash = /#.*$/,
+	rts = /([?&])_=[^&]*/,
+	rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
+
+	// #7653, #8125, #8152: local protocol detection
+	rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
+	rnoContent = /^(?:GET|HEAD)$/,
+	rprotocol = /^\/\//,
+
+	/* Prefilters
+	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+	 * 2) These are called:
+	 *    - BEFORE asking for a transport
+	 *    - AFTER param serialization (s.data is a string if s.processData is true)
+	 * 3) key is the dataType
+	 * 4) the catchall symbol "*" can be used
+	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+	 */
+	prefilters = {},
+
+	/* Transports bindings
+	 * 1) key is the dataType
+	 * 2) the catchall symbol "*" can be used
+	 * 3) selection will start with transport dataType and THEN go to "*" if needed
+	 */
+	transports = {},
+
+	// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+	allTypes = "*/".concat( "*" ),
+
+	// Anchor tag for parsing the document origin
+	originAnchor = document.createElement( "a" );
+	originAnchor.href = location.href;
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+	// dataTypeExpression is optional and defaults to "*"
+	return function( dataTypeExpression, func ) {
+
+		if ( typeof dataTypeExpression !== "string" ) {
+			func = dataTypeExpression;
+			dataTypeExpression = "*";
+		}
+
+		var dataType,
+			i = 0,
+			dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
+
+		if ( jQuery.isFunction( func ) ) {
+
+			// For each dataType in the dataTypeExpression
+			while ( ( dataType = dataTypes[ i++ ] ) ) {
+
+				// Prepend if requested
+				if ( dataType[ 0 ] === "+" ) {
+					dataType = dataType.slice( 1 ) || "*";
+					( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
+
+				// Otherwise append
+				} else {
+					( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
+				}
+			}
+		}
+	};
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
+
+	var inspected = {},
+		seekingTransport = ( structure === transports );
+
+	function inspect( dataType ) {
+		var selected;
+		inspected[ dataType ] = true;
+		jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
+			var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
+			if ( typeof dataTypeOrTransport === "string" &&
+				!seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+
+				options.dataTypes.unshift( dataTypeOrTransport );
+				inspect( dataTypeOrTransport );
+				return false;
+			} else if ( seekingTransport ) {
+				return !( selected = dataTypeOrTransport );
+			}
+		} );
+		return selected;
+	}
+
+	return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+	var key, deep,
+		flatOptions = jQuery.ajaxSettings.flatOptions || {};
+
+	for ( key in src ) {
+		if ( src[ key ] !== undefined ) {
+			( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
+		}
+	}
+	if ( deep ) {
+		jQuery.extend( true, target, deep );
+	}
+
+	return target;
+}
+
+/* Handles responses to an ajax request:
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+
+	var ct, type, finalDataType, firstDataType,
+		contents = s.contents,
+		dataTypes = s.dataTypes;
+
+	// Remove auto dataType and get content-type in the process
+	while ( dataTypes[ 0 ] === "*" ) {
+		dataTypes.shift();
+		if ( ct === undefined ) {
+			ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
+		}
+	}
+
+	// Check if we're dealing with a known content-type
+	if ( ct ) {
+		for ( type in contents ) {
+			if ( contents[ type ] && contents[ type ].test( ct ) ) {
+				dataTypes.unshift( type );
+				break;
+			}
+		}
+	}
+
+	// Check to see if we have a response for the expected dataType
+	if ( dataTypes[ 0 ] in responses ) {
+		finalDataType = dataTypes[ 0 ];
+	} else {
+
+		// Try convertible dataTypes
+		for ( type in responses ) {
+			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
+				finalDataType = type;
+				break;
+			}
+			if ( !firstDataType ) {
+				firstDataType = type;
+			}
+		}
+
+		// Or just use first one
+		finalDataType = finalDataType || firstDataType;
+	}
+
+	// If we found a dataType
+	// We add the dataType to the list if needed
+	// and return the corresponding response
+	if ( finalDataType ) {
+		if ( finalDataType !== dataTypes[ 0 ] ) {
+			dataTypes.unshift( finalDataType );
+		}
+		return responses[ finalDataType ];
+	}
+}
+
+/* Chain conversions given the request and the original response
+ * Also sets the responseXXX fields on the jqXHR instance
+ */
+function ajaxConvert( s, response, jqXHR, isSuccess ) {
+	var conv2, current, conv, tmp, prev,
+		converters = {},
+
+		// Work with a copy of dataTypes in case we need to modify it for conversion
+		dataTypes = s.dataTypes.slice();
+
+	// Create converters map with lowercased keys
+	if ( dataTypes[ 1 ] ) {
+		for ( conv in s.converters ) {
+			converters[ conv.toLowerCase() ] = s.converters[ conv ];
+		}
+	}
+
+	current = dataTypes.shift();
+
+	// Convert to each sequential dataType
+	while ( current ) {
+
+		if ( s.responseFields[ current ] ) {
+			jqXHR[ s.responseFields[ current ] ] = response;
+		}
+
+		// Apply the dataFilter if provided
+		if ( !prev && isSuccess && s.dataFilter ) {
+			response = s.dataFilter( response, s.dataType );
+		}
+
+		prev = current;
+		current = dataTypes.shift();
+
+		if ( current ) {
+
+			// There's only work to do if current dataType is non-auto
+			if ( current === "*" ) {
+
+				current = prev;
+
+			// Convert response if prev dataType is non-auto and differs from current
+			} else if ( prev !== "*" && prev !== current ) {
+
+				// Seek a direct converter
+				conv = converters[ prev + " " + current ] || converters[ "* " + current ];
+
+				// If none found, seek a pair
+				if ( !conv ) {
+					for ( conv2 in converters ) {
+
+						// If conv2 outputs current
+						tmp = conv2.split( " " );
+						if ( tmp[ 1 ] === current ) {
+
+							// If prev can be converted to accepted input
+							conv = converters[ prev + " " + tmp[ 0 ] ] ||
+								converters[ "* " + tmp[ 0 ] ];
+							if ( conv ) {
+
+								// Condense equivalence converters
+								if ( conv === true ) {
+									conv = converters[ conv2 ];
+
+								// Otherwise, insert the intermediate dataType
+								} else if ( converters[ conv2 ] !== true ) {
+									current = tmp[ 0 ];
+									dataTypes.unshift( tmp[ 1 ] );
+								}
+								break;
+							}
+						}
+					}
+				}
+
+				// Apply converter (if not an equivalence)
+				if ( conv !== true ) {
+
+					// Unless errors are allowed to bubble, catch and return them
+					if ( conv && s.throws ) {
+						response = conv( response );
+					} else {
+						try {
+							response = conv( response );
+						} catch ( e ) {
+							return {
+								state: "parsererror",
+								error: conv ? e : "No conversion from " + prev + " to " + current
+							};
+						}
+					}
+				}
+			}
+		}
+	}
+
+	return { state: "success", data: response };
+}
+
+jQuery.extend( {
+
+	// Counter for holding the number of active queries
+	active: 0,
+
+	// Last-Modified header cache for next request
+	lastModified: {},
+	etag: {},
+
+	ajaxSettings: {
+		url: location.href,
+		type: "GET",
+		isLocal: rlocalProtocol.test( location.protocol ),
+		global: true,
+		processData: true,
+		async: true,
+		contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+
+		/*
+		timeout: 0,
+		data: null,
+		dataType: null,
+		username: null,
+		password: null,
+		cache: null,
+		throws: false,
+		traditional: false,
+		headers: {},
+		*/
+
+		accepts: {
+			"*": allTypes,
+			text: "text/plain",
+			html: "text/html",
+			xml: "application/xml, text/xml",
+			json: "application/json, text/javascript"
+		},
+
+		contents: {
+			xml: /\bxml\b/,
+			html: /\bhtml/,
+			json: /\bjson\b/
+		},
+
+		responseFields: {
+			xml: "responseXML",
+			text: "responseText",
+			json: "responseJSON"
+		},
+
+		// Data converters
+		// Keys separate source (or catchall "*") and destination types with a single space
+		converters: {
+
+			// Convert anything to text
+			"* text": String,
+
+			// Text to html (true = no transformation)
+			"text html": true,
+
+			// Evaluate text as a json expression
+			"text json": JSON.parse,
+
+			// Parse text as xml
+			"text xml": jQuery.parseXML
+		},
+
+		// For options that shouldn't be deep extended:
+		// you can add your own custom options here if
+		// and when you create one that shouldn't be
+		// deep extended (see ajaxExtend)
+		flatOptions: {
+			url: true,
+			context: true
+		}
+	},
+
+	// Creates a full fledged settings object into target
+	// with both ajaxSettings and settings fields.
+	// If target is omitted, writes into ajaxSettings.
+	ajaxSetup: function( target, settings ) {
+		return settings ?
+
+			// Building a settings object
+			ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
+
+			// Extending ajaxSettings
+			ajaxExtend( jQuery.ajaxSettings, target );
+	},
+
+	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+	ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+	// Main method
+	ajax: function( url, options ) {
+
+		// If url is an object, simulate pre-1.5 signature
+		if ( typeof url === "object" ) {
+			options = url;
+			url = undefined;
+		}
+
+		// Force options to be an object
+		options = options || {};
+
+		var transport,
+
+			// URL without anti-cache param
+			cacheURL,
+
+			// Response headers
+			responseHeadersString,
+			responseHeaders,
+
+			// timeout handle
+			timeoutTimer,
+
+			// Url cleanup var
+			urlAnchor,
+
+			// Request state (becomes false upon send and true upon completion)
+			completed,
+
+			// To know if global events are to be dispatched
+			fireGlobals,
+
+			// Loop variable
+			i,
+
+			// uncached part of the url
+			uncached,
+
+			// Create the final options object
+			s = jQuery.ajaxSetup( {}, options ),
+
+			// Callbacks context
+			callbackContext = s.context || s,
+
+			// Context for global events is callbackContext if it is a DOM node or jQuery collection
+			globalEventContext = s.context &&
+				( callbackContext.nodeType || callbackContext.jquery ) ?
+					jQuery( callbackContext ) :
+					jQuery.event,
+
+			// Deferreds
+			deferred = jQuery.Deferred(),
+			completeDeferred = jQuery.Callbacks( "once memory" ),
+
+			// Status-dependent callbacks
+			statusCode = s.statusCode || {},
+
+			// Headers (they are sent all at once)
+			requestHeaders = {},
+			requestHeadersNames = {},
+
+			// Default abort message
+			strAbort = "canceled",
+
+			// Fake xhr
+			jqXHR = {
+				readyState: 0,
+
+				// Builds headers hashtable if needed
+				getResponseHeader: function( key ) {
+					var match;
+					if ( completed ) {
+						if ( !responseHeaders ) {
+							responseHeaders = {};
+							while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
+								responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];
+							}
+						}
+						match = responseHeaders[ key.toLowerCase() ];
+					}
+					return match == null ? null : match;
+				},
+
+				// Raw string
+				getAllResponseHeaders: function() {
+					return completed ? responseHeadersString : null;
+				},
+
+				// Caches the header
+				setRequestHeader: function( name, value ) {
+					if ( completed == null ) {
+						name = requestHeadersNames[ name.toLowerCase() ] =
+							requestHeadersNames[ name.toLowerCase() ] || name;
+						requestHeaders[ name ] = value;
+					}
+					return this;
+				},
+
+				// Overrides response content-type header
+				overrideMimeType: function( type ) {
+					if ( completed == null ) {
+						s.mimeType = type;
+					}
+					return this;
+				},
+
+				// Status-dependent callbacks
+				statusCode: function( map ) {
+					var code;
+					if ( map ) {
+						if ( completed ) {
+
+							// Execute the appropriate callbacks
+							jqXHR.always( map[ jqXHR.status ] );
+						} else {
+
+							// Lazy-add the new callbacks in a way that preserves old ones
+							for ( code in map ) {
+								statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
+							}
+						}
+					}
+					return this;
+				},
+
+				// Cancel the request
+				abort: function( statusText ) {
+					var finalText = statusText || strAbort;
+					if ( transport ) {
+						transport.abort( finalText );
+					}
+					done( 0, finalText );
+					return this;
+				}
+			};
+
+		// Attach deferreds
+		deferred.promise( jqXHR );
+
+		// Add protocol if not provided (prefilters might expect it)
+		// Handle falsy url in the settings object (#10093: consistency with old signature)
+		// We also use the url parameter if available
+		s.url = ( ( url || s.url || location.href ) + "" )
+			.replace( rprotocol, location.protocol + "//" );
+
+		// Alias method option to type as per ticket #12004
+		s.type = options.method || options.type || s.method || s.type;
+
+		// Extract dataTypes list
+		s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
+
+		// A cross-domain request is in order when the origin doesn't match the current origin.
+		if ( s.crossDomain == null ) {
+			urlAnchor = document.createElement( "a" );
+
+			// Support: IE <=8 - 11, Edge 12 - 13
+			// IE throws exception on accessing the href property if url is malformed,
+			// e.g. http://example.com:80x/
+			try {
+				urlAnchor.href = s.url;
+
+				// Support: IE <=8 - 11 only
+				// Anchor's host property isn't correctly set when s.url is relative
+				urlAnchor.href = urlAnchor.href;
+				s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
+					urlAnchor.protocol + "//" + urlAnchor.host;
+			} catch ( e ) {
+
+				// If there is an error parsing the URL, assume it is crossDomain,
+				// it can be rejected by the transport if it is invalid
+				s.crossDomain = true;
+			}
+		}
+
+		// Convert data if not already a string
+		if ( s.data && s.processData && typeof s.data !== "string" ) {
+			s.data = jQuery.param( s.data, s.traditional );
+		}
+
+		// Apply prefilters
+		inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+		// If request was aborted inside a prefilter, stop there
+		if ( completed ) {
+			return jqXHR;
+		}
+
+		// We can fire global events as of now if asked to
+		// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
+		fireGlobals = jQuery.event && s.global;
+
+		// Watch for a new set of requests
+		if ( fireGlobals && jQuery.active++ === 0 ) {
+			jQuery.event.trigger( "ajaxStart" );
+		}
+
+		// Uppercase the type
+		s.type = s.type.toUpperCase();
+
+		// Determine if request has content
+		s.hasContent = !rnoContent.test( s.type );
+
+		// Save the URL in case we're toying with the If-Modified-Since
+		// and/or If-None-Match header later on
+		// Remove hash to simplify url manipulation
+		cacheURL = s.url.replace( rhash, "" );
+
+		// More options handling for requests with no content
+		if ( !s.hasContent ) {
+
+			// Remember the hash so we can put it back
+			uncached = s.url.slice( cacheURL.length );
+
+			// If data is available, append data to url
+			if ( s.data ) {
+				cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;
+
+				// #9682: remove data so that it's not used in an eventual retry
+				delete s.data;
+			}
+
+			// Add anti-cache in uncached url if needed
+			if ( s.cache === false ) {
+				cacheURL = cacheURL.replace( rts, "" );
+				uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached;
+			}
+
+			// Put hash and anti-cache on the URL that will be requested (gh-1732)
+			s.url = cacheURL + uncached;
+
+		// Change '%20' to '+' if this is encoded form body content (gh-2658)
+		} else if ( s.data && s.processData &&
+			( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
+			s.data = s.data.replace( r20, "+" );
+		}
+
+		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+		if ( s.ifModified ) {
+			if ( jQuery.lastModified[ cacheURL ] ) {
+				jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
+			}
+			if ( jQuery.etag[ cacheURL ] ) {
+				jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
+			}
+		}
+
+		// Set the correct header, if data is being sent
+		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+			jqXHR.setRequestHeader( "Content-Type", s.contentType );
+		}
+
+		// Set the Accepts header for the server, depending on the dataType
+		jqXHR.setRequestHeader(
+			"Accept",
+			s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
+				s.accepts[ s.dataTypes[ 0 ] ] +
+					( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+				s.accepts[ "*" ]
+		);
+
+		// Check for headers option
+		for ( i in s.headers ) {
+			jqXHR.setRequestHeader( i, s.headers[ i ] );
+		}
+
+		// Allow custom headers/mimetypes and early abort
+		if ( s.beforeSend &&
+			( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {
+
+			// Abort if not done already and return
+			return jqXHR.abort();
+		}
+
+		// Aborting is no longer a cancellation
+		strAbort = "abort";
+
+		// Install callbacks on deferreds
+		completeDeferred.add( s.complete );
+		jqXHR.done( s.success );
+		jqXHR.fail( s.error );
+
+		// Get transport
+		transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+		// If no transport, we auto-abort
+		if ( !transport ) {
+			done( -1, "No Transport" );
+		} else {
+			jqXHR.readyState = 1;
+
+			// Send global event
+			if ( fireGlobals ) {
+				globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+			}
+
+			// If request was aborted inside ajaxSend, stop there
+			if ( completed ) {
+				return jqXHR;
+			}
+
+			// Timeout
+			if ( s.async && s.timeout > 0 ) {
+				timeoutTimer = window.setTimeout( function() {
+					jqXHR.abort( "timeout" );
+				}, s.timeout );
+			}
+
+			try {
+				completed = false;
+				transport.send( requestHeaders, done );
+			} catch ( e ) {
+
+				// Rethrow post-completion exceptions
+				if ( completed ) {
+					throw e;
+				}
+
+				// Propagate others as results
+				done( -1, e );
+			}
+		}
+
+		// Callback for when everything is done
+		function done( status, nativeStatusText, responses, headers ) {
+			var isSuccess, success, error, response, modified,
+				statusText = nativeStatusText;
+
+			// Ignore repeat invocations
+			if ( completed ) {
+				return;
+			}
+
+			completed = true;
+
+			// Clear timeout if it exists
+			if ( timeoutTimer ) {
+				window.clearTimeout( timeoutTimer );
+			}
+
+			// Dereference transport for early garbage collection
+			// (no matter how long the jqXHR object will be used)
+			transport = undefined;
+
+			// Cache response headers
+			responseHeadersString = headers || "";
+
+			// Set readyState
+			jqXHR.readyState = status > 0 ? 4 : 0;
+
+			// Determine if successful
+			isSuccess = status >= 200 && status < 300 || status === 304;
+
+			// Get response data
+			if ( responses ) {
+				response = ajaxHandleResponses( s, jqXHR, responses );
+			}
+
+			// Convert no matter what (that way responseXXX fields are always set)
+			response = ajaxConvert( s, response, jqXHR, isSuccess );
+
+			// If successful, handle type chaining
+			if ( isSuccess ) {
+
+				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+				if ( s.ifModified ) {
+					modified = jqXHR.getResponseHeader( "Last-Modified" );
+					if ( modified ) {
+						jQuery.lastModified[ cacheURL ] = modified;
+					}
+					modified = jqXHR.getResponseHeader( "etag" );
+					if ( modified ) {
+						jQuery.etag[ cacheURL ] = modified;
+					}
+				}
+
+				// if no content
+				if ( status === 204 || s.type === "HEAD" ) {
+					statusText = "nocontent";
+
+				// if not modified
+				} else if ( status === 304 ) {
+					statusText = "notmodified";
+
+				// If we have data, let's convert it
+				} else {
+					statusText = response.state;
+					success = response.data;
+					error = response.error;
+					isSuccess = !error;
+				}
+			} else {
+
+				// Extract error from statusText and normalize for non-aborts
+				error = statusText;
+				if ( status || !statusText ) {
+					statusText = "error";
+					if ( status < 0 ) {
+						status = 0;
+					}
+				}
+			}
+
+			// Set data for the fake xhr object
+			jqXHR.status = status;
+			jqXHR.statusText = ( nativeStatusText || statusText ) + "";
+
+			// Success/Error
+			if ( isSuccess ) {
+				deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+			} else {
+				deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+			}
+
+			// Status-dependent callbacks
+			jqXHR.statusCode( statusCode );
+			statusCode = undefined;
+
+			if ( fireGlobals ) {
+				globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
+					[ jqXHR, s, isSuccess ? success : error ] );
+			}
+
+			// Complete
+			completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+			if ( fireGlobals ) {
+				globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+
+				// Handle the global AJAX counter
+				if ( !( --jQuery.active ) ) {
+					jQuery.event.trigger( "ajaxStop" );
+				}
+			}
+		}
+
+		return jqXHR;
+	},
+
+	getJSON: function( url, data, callback ) {
+		return jQuery.get( url, data, callback, "json" );
+	},
+
+	getScript: function( url, callback ) {
+		return jQuery.get( url, undefined, callback, "script" );
+	}
+} );
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+	jQuery[ method ] = function( url, data, callback, type ) {
+
+		// Shift arguments if data argument was omitted
+		if ( jQuery.isFunction( data ) ) {
+			type = type || callback;
+			callback = data;
+			data = undefined;
+		}
+
+		// The url can be an options object (which then must have .url)
+		return jQuery.ajax( jQuery.extend( {
+			url: url,
+			type: method,
+			dataType: type,
+			data: data,
+			success: callback
+		}, jQuery.isPlainObject( url ) && url ) );
+	};
+} );
+
+
+jQuery._evalUrl = function( url ) {
+	return jQuery.ajax( {
+		url: url,
+
+		// Make this explicit, since user can override this through ajaxSetup (#11264)
+		type: "GET",
+		dataType: "script",
+		cache: true,
+		async: false,
+		global: false,
+		"throws": true
+	} );
+};
+
+
+jQuery.fn.extend( {
+	wrapAll: function( html ) {
+		var wrap;
+
+		if ( this[ 0 ] ) {
+			if ( jQuery.isFunction( html ) ) {
+				html = html.call( this[ 0 ] );
+			}
+
+			// The elements to wrap the target around
+			wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
+
+			if ( this[ 0 ].parentNode ) {
+				wrap.insertBefore( this[ 0 ] );
+			}
+
+			wrap.map( function() {
+				var elem = this;
+
+				while ( elem.firstElementChild ) {
+					elem = elem.firstElementChild;
+				}
+
+				return elem;
+			} ).append( this );
+		}
+
+		return this;
+	},
+
+	wrapInner: function( html ) {
+		if ( jQuery.isFunction( html ) ) {
+			return this.each( function( i ) {
+				jQuery( this ).wrapInner( html.call( this, i ) );
+			} );
+		}
+
+		return this.each( function() {
+			var self = jQuery( this ),
+				contents = self.contents();
+
+			if ( contents.length ) {
+				contents.wrapAll( html );
+
+			} else {
+				self.append( html );
+			}
+		} );
+	},
+
+	wrap: function( html ) {
+		var isFunction = jQuery.isFunction( html );
+
+		return this.each( function( i ) {
+			jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );
+		} );
+	},
+
+	unwrap: function( selector ) {
+		this.parent( selector ).not( "body" ).each( function() {
+			jQuery( this ).replaceWith( this.childNodes );
+		} );
+		return this;
+	}
+} );
+
+
+jQuery.expr.pseudos.hidden = function( elem ) {
+	return !jQuery.expr.pseudos.visible( elem );
+};
+jQuery.expr.pseudos.visible = function( elem ) {
+	return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
+};
+
+
+
+
+jQuery.ajaxSettings.xhr = function() {
+	try {
+		return new window.XMLHttpRequest();
+	} catch ( e ) {}
+};
+
+var xhrSuccessStatus = {
+
+		// File protocol always yields status code 0, assume 200
+		0: 200,
+
+		// Support: IE <=9 only
+		// #1450: sometimes IE returns 1223 when it should be 204
+		1223: 204
+	},
+	xhrSupported = jQuery.ajaxSettings.xhr();
+
+support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
+support.ajax = xhrSupported = !!xhrSupported;
+
+jQuery.ajaxTransport( function( options ) {
+	var callback, errorCallback;
+
+	// Cross domain only allowed if supported through XMLHttpRequest
+	if ( support.cors || xhrSupported && !options.crossDomain ) {
+		return {
+			send: function( headers, complete ) {
+				var i,
+					xhr = options.xhr();
+
+				xhr.open(
+					options.type,
+					options.url,
+					options.async,
+					options.username,
+					options.password
+				);
+
+				// Apply custom fields if provided
+				if ( options.xhrFields ) {
+					for ( i in options.xhrFields ) {
+						xhr[ i ] = options.xhrFields[ i ];
+					}
+				}
+
+				// Override mime type if needed
+				if ( options.mimeType && xhr.overrideMimeType ) {
+					xhr.overrideMimeType( options.mimeType );
+				}
+
+				// X-Requested-With header
+				// For cross-domain requests, seeing as conditions for a preflight are
+				// akin to a jigsaw puzzle, we simply never set it to be sure.
+				// (it can always be set on a per-request basis or even using ajaxSetup)
+				// For same-domain requests, won't change header if already provided.
+				if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
+					headers[ "X-Requested-With" ] = "XMLHttpRequest";
+				}
+
+				// Set headers
+				for ( i in headers ) {
+					xhr.setRequestHeader( i, headers[ i ] );
+				}
+
+				// Callback
+				callback = function( type ) {
+					return function() {
+						if ( callback ) {
+							callback = errorCallback = xhr.onload =
+								xhr.onerror = xhr.onabort = xhr.onreadystatechange = null;
+
+							if ( type === "abort" ) {
+								xhr.abort();
+							} else if ( type === "error" ) {
+
+								// Support: IE <=9 only
+								// On a manual native abort, IE9 throws
+								// errors on any property access that is not readyState
+								if ( typeof xhr.status !== "number" ) {
+									complete( 0, "error" );
+								} else {
+									complete(
+
+										// File: protocol always yields status 0; see #8605, #14207
+										xhr.status,
+										xhr.statusText
+									);
+								}
+							} else {
+								complete(
+									xhrSuccessStatus[ xhr.status ] || xhr.status,
+									xhr.statusText,
+
+									// Support: IE <=9 only
+									// IE9 has no XHR2 but throws on binary (trac-11426)
+									// For XHR2 non-text, let the caller handle it (gh-2498)
+									( xhr.responseType || "text" ) !== "text"  ||
+									typeof xhr.responseText !== "string" ?
+										{ binary: xhr.response } :
+										{ text: xhr.responseText },
+									xhr.getAllResponseHeaders()
+								);
+							}
+						}
+					};
+				};
+
+				// Listen to events
+				xhr.onload = callback();
+				errorCallback = xhr.onerror = callback( "error" );
+
+				// Support: IE 9 only
+				// Use onreadystatechange to replace onabort
+				// to handle uncaught aborts
+				if ( xhr.onabort !== undefined ) {
+					xhr.onabort = errorCallback;
+				} else {
+					xhr.onreadystatechange = function() {
+
+						// Check readyState before timeout as it changes
+						if ( xhr.readyState === 4 ) {
+
+							// Allow onerror to be called first,
+							// but that will not handle a native abort
+							// Also, save errorCallback to a variable
+							// as xhr.onerror cannot be accessed
+							window.setTimeout( function() {
+								if ( callback ) {
+									errorCallback();
+								}
+							} );
+						}
+					};
+				}
+
+				// Create the abort callback
+				callback = callback( "abort" );
+
+				try {
+
+					// Do send the request (this may raise an exception)
+					xhr.send( options.hasContent && options.data || null );
+				} catch ( e ) {
+
+					// #14683: Only rethrow if this hasn't been notified as an error yet
+					if ( callback ) {
+						throw e;
+					}
+				}
+			},
+
+			abort: function() {
+				if ( callback ) {
+					callback();
+				}
+			}
+		};
+	}
+} );
+
+
+
+
+// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
+jQuery.ajaxPrefilter( function( s ) {
+	if ( s.crossDomain ) {
+		s.contents.script = false;
+	}
+} );
+
+// Install script dataType
+jQuery.ajaxSetup( {
+	accepts: {
+		script: "text/javascript, application/javascript, " +
+			"application/ecmascript, application/x-ecmascript"
+	},
+	contents: {
+		script: /\b(?:java|ecma)script\b/
+	},
+	converters: {
+		"text script": function( text ) {
+			jQuery.globalEval( text );
+			return text;
+		}
+	}
+} );
+
+// Handle cache's special case and crossDomain
+jQuery.ajaxPrefilter( "script", function( s ) {
+	if ( s.cache === undefined ) {
+		s.cache = false;
+	}
+	if ( s.crossDomain ) {
+		s.type = "GET";
+	}
+} );
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function( s ) {
+
+	// This transport only deals with cross domain requests
+	if ( s.crossDomain ) {
+		var script, callback;
+		return {
+			send: function( _, complete ) {
+				script = jQuery( "<script>" ).prop( {
+					charset: s.scriptCharset,
+					src: s.url
+				} ).on(
+					"load error",
+					callback = function( evt ) {
+						script.remove();
+						callback = null;
+						if ( evt ) {
+							complete( evt.type === "error" ? 404 : 200, evt.type );
+						}
+					}
+				);
+
+				// Use native DOM manipulation to avoid our domManip AJAX trickery
+				document.head.appendChild( script[ 0 ] );
+			},
+			abort: function() {
+				if ( callback ) {
+					callback();
+				}
+			}
+		};
+	}
+} );
+
+
+
+
+var oldCallbacks = [],
+	rjsonp = /(=)\?(?=&|$)|\?\?/;
+
+// Default jsonp settings
+jQuery.ajaxSetup( {
+	jsonp: "callback",
+	jsonpCallback: function() {
+		var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
+		this[ callback ] = true;
+		return callback;
+	}
+} );
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+	var callbackName, overwritten, responseContainer,
+		jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
+			"url" :
+			typeof s.data === "string" &&
+				( s.contentType || "" )
+					.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
+				rjsonp.test( s.data ) && "data"
+		);
+
+	// Handle iff the expected data type is "jsonp" or we have a parameter to set
+	if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
+
+		// Get callback name, remembering preexisting value associated with it
+		callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
+			s.jsonpCallback() :
+			s.jsonpCallback;
+
+		// Insert callback into url or form data
+		if ( jsonProp ) {
+			s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
+		} else if ( s.jsonp !== false ) {
+			s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
+		}
+
+		// Use data converter to retrieve json after script execution
+		s.converters[ "script json" ] = function() {
+			if ( !responseContainer ) {
+				jQuery.error( callbackName + " was not called" );
+			}
+			return responseContainer[ 0 ];
+		};
+
+		// Force json dataType
+		s.dataTypes[ 0 ] = "json";
+
+		// Install callback
+		overwritten = window[ callbackName ];
+		window[ callbackName ] = function() {
+			responseContainer = arguments;
+		};
+
+		// Clean-up function (fires after converters)
+		jqXHR.always( function() {
+
+			// If previous value didn't exist - remove it
+			if ( overwritten === undefined ) {
+				jQuery( window ).removeProp( callbackName );
+
+			// Otherwise restore preexisting value
+			} else {
+				window[ callbackName ] = overwritten;
+			}
+
+			// Save back as free
+			if ( s[ callbackName ] ) {
+
+				// Make sure that re-using the options doesn't screw things around
+				s.jsonpCallback = originalSettings.jsonpCallback;
+
+				// Save the callback name for future use
+				oldCallbacks.push( callbackName );
+			}
+
+			// Call if it was a function and we have a response
+			if ( responseContainer && jQuery.isFunction( overwritten ) ) {
+				overwritten( responseContainer[ 0 ] );
+			}
+
+			responseContainer = overwritten = undefined;
+		} );
+
+		// Delegate to script
+		return "script";
+	}
+} );
+
+
+
+
+// Support: Safari 8 only
+// In Safari 8 documents created via document.implementation.createHTMLDocument
+// collapse sibling forms: the second one becomes a child of the first one.
+// Because of that, this security measure has to be disabled in Safari 8.
+// https://bugs.webkit.org/show_bug.cgi?id=137337
+support.createHTMLDocument = ( function() {
+	var body = document.implementation.createHTMLDocument( "" ).body;
+	body.innerHTML = "<form></form><form></form>";
+	return body.childNodes.length === 2;
+} )();
+
+
+// Argument "data" should be string of html
+// context (optional): If specified, the fragment will be created in this context,
+// defaults to document
+// keepScripts (optional): If true, will include scripts passed in the html string
+jQuery.parseHTML = function( data, context, keepScripts ) {
+	if ( typeof data !== "string" ) {
+		return [];
+	}
+	if ( typeof context === "boolean" ) {
+		keepScripts = context;
+		context = false;
+	}
+
+	var base, parsed, scripts;
+
+	if ( !context ) {
+
+		// Stop scripts or inline event handlers from being executed immediately
+		// by using document.implementation
+		if ( support.createHTMLDocument ) {
+			context = document.implementation.createHTMLDocument( "" );
+
+			// Set the base href for the created document
+			// so any parsed elements with URLs
+			// are based on the document's URL (gh-2965)
+			base = context.createElement( "base" );
+			base.href = document.location.href;
+			context.head.appendChild( base );
+		} else {
+			context = document;
+		}
+	}
+
+	parsed = rsingleTag.exec( data );
+	scripts = !keepScripts && [];
+
+	// Single tag
+	if ( parsed ) {
+		return [ context.createElement( parsed[ 1 ] ) ];
+	}
+
+	parsed = buildFragment( [ data ], context, scripts );
+
+	if ( scripts && scripts.length ) {
+		jQuery( scripts ).remove();
+	}
+
+	return jQuery.merge( [], parsed.childNodes );
+};
+
+
+/**
+ * Load a url into a page
+ */
+jQuery.fn.load = function( url, params, callback ) {
+	var selector, type, response,
+		self = this,
+		off = url.indexOf( " " );
+
+	if ( off > -1 ) {
+		selector = jQuery.trim( url.slice( off ) );
+		url = url.slice( 0, off );
+	}
+
+	// If it's a function
+	if ( jQuery.isFunction( params ) ) {
+
+		// We assume that it's the callback
+		callback = params;
+		params = undefined;
+
+	// Otherwise, build a param string
+	} else if ( params && typeof params === "object" ) {
+		type = "POST";
+	}
+
+	// If we have elements to modify, make the request
+	if ( self.length > 0 ) {
+		jQuery.ajax( {
+			url: url,
+
+			// If "type" variable is undefined, then "GET" method will be used.
+			// Make value of this field explicit since
+			// user can override it through ajaxSetup method
+			type: type || "GET",
+			dataType: "html",
+			data: params
+		} ).done( function( responseText ) {
+
+			// Save response for use in complete callback
+			response = arguments;
+
+			self.html( selector ?
+
+				// If a selector was specified, locate the right elements in a dummy div
+				// Exclude scripts to avoid IE 'Permission Denied' errors
+				jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :
+
+				// Otherwise use the full result
+				responseText );
+
+		// If the request succeeds, this function gets "data", "status", "jqXHR"
+		// but they are ignored because response was set above.
+		// If it fails, this function gets "jqXHR", "status", "error"
+		} ).always( callback && function( jqXHR, status ) {
+			self.each( function() {
+				callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
+			} );
+		} );
+	}
+
+	return this;
+};
+
+
+
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( [
+	"ajaxStart",
+	"ajaxStop",
+	"ajaxComplete",
+	"ajaxError",
+	"ajaxSuccess",
+	"ajaxSend"
+], function( i, type ) {
+	jQuery.fn[ type ] = function( fn ) {
+		return this.on( type, fn );
+	};
+} );
+
+
+
+
+jQuery.expr.pseudos.animated = function( elem ) {
+	return jQuery.grep( jQuery.timers, function( fn ) {
+		return elem === fn.elem;
+	} ).length;
+};
+
+
+
+
+/**
+ * Gets a window from an element
+ */
+function getWindow( elem ) {
+	return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;
+}
+
+jQuery.offset = {
+	setOffset: function( elem, options, i ) {
+		var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
+			position = jQuery.css( elem, "position" ),
+			curElem = jQuery( elem ),
+			props = {};
+
+		// Set position first, in-case top/left are set even on static elem
+		if ( position === "static" ) {
+			elem.style.position = "relative";
+		}
+
+		curOffset = curElem.offset();
+		curCSSTop = jQuery.css( elem, "top" );
+		curCSSLeft = jQuery.css( elem, "left" );
+		calculatePosition = ( position === "absolute" || position === "fixed" ) &&
+			( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;
+
+		// Need to be able to calculate position if either
+		// top or left is auto and position is either absolute or fixed
+		if ( calculatePosition ) {
+			curPosition = curElem.position();
+			curTop = curPosition.top;
+			curLeft = curPosition.left;
+
+		} else {
+			curTop = parseFloat( curCSSTop ) || 0;
+			curLeft = parseFloat( curCSSLeft ) || 0;
+		}
+
+		if ( jQuery.isFunction( options ) ) {
+
+			// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
+			options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
+		}
+
+		if ( options.top != null ) {
+			props.top = ( options.top - curOffset.top ) + curTop;
+		}
+		if ( options.left != null ) {
+			props.left = ( options.left - curOffset.left ) + curLeft;
+		}
+
+		if ( "using" in options ) {
+			options.using.call( elem, props );
+
+		} else {
+			curElem.css( props );
+		}
+	}
+};
+
+jQuery.fn.extend( {
+	offset: function( options ) {
+
+		// Preserve chaining for setter
+		if ( arguments.length ) {
+			return options === undefined ?
+				this :
+				this.each( function( i ) {
+					jQuery.offset.setOffset( this, options, i );
+				} );
+		}
+
+		var docElem, win, rect, doc,
+			elem = this[ 0 ];
+
+		if ( !elem ) {
+			return;
+		}
+
+		// Support: IE <=11 only
+		// Running getBoundingClientRect on a
+		// disconnected node in IE throws an error
+		if ( !elem.getClientRects().length ) {
+			return { top: 0, left: 0 };
+		}
+
+		rect = elem.getBoundingClientRect();
+
+		// Make sure element is not hidden (display: none)
+		if ( rect.width || rect.height ) {
+			doc = elem.ownerDocument;
+			win = getWindow( doc );
+			docElem = doc.documentElement;
+
+			return {
+				top: rect.top + win.pageYOffset - docElem.clientTop,
+				left: rect.left + win.pageXOffset - docElem.clientLeft
+			};
+		}
+
+		// Return zeros for disconnected and hidden elements (gh-2310)
+		return rect;
+	},
+
+	position: function() {
+		if ( !this[ 0 ] ) {
+			return;
+		}
+
+		var offsetParent, offset,
+			elem = this[ 0 ],
+			parentOffset = { top: 0, left: 0 };
+
+		// Fixed elements are offset from window (parentOffset = {top:0, left: 0},
+		// because it is its only offset parent
+		if ( jQuery.css( elem, "position" ) === "fixed" ) {
+
+			// Assume getBoundingClientRect is there when computed position is fixed
+			offset = elem.getBoundingClientRect();
+
+		} else {
+
+			// Get *real* offsetParent
+			offsetParent = this.offsetParent();
+
+			// Get correct offsets
+			offset = this.offset();
+			if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
+				parentOffset = offsetParent.offset();
+			}
+
+			// Add offsetParent borders
+			parentOffset = {
+				top: parentOffset.top + jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ),
+				left: parentOffset.left + jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true )
+			};
+		}
+
+		// Subtract parent offsets and element margins
+		return {
+			top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
+			left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
+		};
+	},
+
+	// This method will return documentElement in the following cases:
+	// 1) For the element inside the iframe without offsetParent, this method will return
+	//    documentElement of the parent window
+	// 2) For the hidden or detached element
+	// 3) For body or html element, i.e. in case of the html node - it will return itself
+	//
+	// but those exceptions were never presented as a real life use-cases
+	// and might be considered as more preferable results.
+	//
+	// This logic, however, is not guaranteed and can change at any point in the future
+	offsetParent: function() {
+		return this.map( function() {
+			var offsetParent = this.offsetParent;
+
+			while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
+				offsetParent = offsetParent.offsetParent;
+			}
+
+			return offsetParent || documentElement;
+		} );
+	}
+} );
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
+	var top = "pageYOffset" === prop;
+
+	jQuery.fn[ method ] = function( val ) {
+		return access( this, function( elem, method, val ) {
+			var win = getWindow( elem );
+
+			if ( val === undefined ) {
+				return win ? win[ prop ] : elem[ method ];
+			}
+
+			if ( win ) {
+				win.scrollTo(
+					!top ? val : win.pageXOffset,
+					top ? val : win.pageYOffset
+				);
+
+			} else {
+				elem[ method ] = val;
+			}
+		}, method, val, arguments.length );
+	};
+} );
+
+// Support: Safari <=7 - 9.1, Chrome <=37 - 49
+// Add the top/left cssHooks using jQuery.fn.position
+// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
+// getComputedStyle returns percent when specified for top/left/bottom/right;
+// rather than make the css module depend on the offset module, just check for it here
+jQuery.each( [ "top", "left" ], function( i, prop ) {
+	jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
+		function( elem, computed ) {
+			if ( computed ) {
+				computed = curCSS( elem, prop );
+
+				// If curCSS returns percentage, fallback to offset
+				return rnumnonpx.test( computed ) ?
+					jQuery( elem ).position()[ prop ] + "px" :
+					computed;
+			}
+		}
+	);
+} );
+
+
+// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
+jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
+	jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
+		function( defaultExtra, funcName ) {
+
+		// Margin is only for outerHeight, outerWidth
+		jQuery.fn[ funcName ] = function( margin, value ) {
+			var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
+				extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
+
+			return access( this, function( elem, type, value ) {
+				var doc;
+
+				if ( jQuery.isWindow( elem ) ) {
+
+					// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
+					return funcName.indexOf( "outer" ) === 0 ?
+						elem[ "inner" + name ] :
+						elem.document.documentElement[ "client" + name ];
+				}
+
+				// Get document width or height
+				if ( elem.nodeType === 9 ) {
+					doc = elem.documentElement;
+
+					// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
+					// whichever is greatest
+					return Math.max(
+						elem.body[ "scroll" + name ], doc[ "scroll" + name ],
+						elem.body[ "offset" + name ], doc[ "offset" + name ],
+						doc[ "client" + name ]
+					);
+				}
+
+				return value === undefined ?
+
+					// Get width or height on the element, requesting but not forcing parseFloat
+					jQuery.css( elem, type, extra ) :
+
+					// Set width or height on the element
+					jQuery.style( elem, type, value, extra );
+			}, type, chainable ? margin : undefined, chainable );
+		};
+	} );
+} );
+
+
+jQuery.fn.extend( {
+
+	bind: function( types, data, fn ) {
+		return this.on( types, null, data, fn );
+	},
+	unbind: function( types, fn ) {
+		return this.off( types, null, fn );
+	},
+
+	delegate: function( selector, types, data, fn ) {
+		return this.on( types, selector, data, fn );
+	},
+	undelegate: function( selector, types, fn ) {
+
+		// ( namespace ) or ( selector, types [, fn] )
+		return arguments.length === 1 ?
+			this.off( selector, "**" ) :
+			this.off( types, selector || "**", fn );
+	}
+} );
+
+jQuery.parseJSON = JSON.parse;
+
+
+
+
+// Register as a named AMD module, since jQuery can be concatenated with other
+// files that may use define, but not via a proper concatenation script that
+// understands anonymous AMD modules. A named AMD is safest and most robust
+// way to register. Lowercase jquery is used because AMD module names are
+// derived from file names, and jQuery is normally delivered in a lowercase
+// file name. Do this after creating the global so that if an AMD module wants
+// to call noConflict to hide this version of jQuery, it will work.
+
+// Note that for maximum portability, libraries that are not jQuery should
+// declare themselves as anonymous modules, and avoid setting a global if an
+// AMD loader is present. jQuery is a special case. For more information, see
+// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
+
+if ( typeof define === "function" && define.amd ) {
+	define( "jquery", [], function() {
+		return jQuery;
+	} );
+}
+
+
+
+
+
+var
+
+	// Map over jQuery in case of overwrite
+	_jQuery = window.jQuery,
+
+	// Map over the $ in case of overwrite
+	_$ = window.$;
+
+jQuery.noConflict = function( deep ) {
+	if ( window.$ === jQuery ) {
+		window.$ = _$;
+	}
+
+	if ( deep && window.jQuery === jQuery ) {
+		window.jQuery = _jQuery;
+	}
+
+	return jQuery;
+};
+
+// Expose jQuery and $ identifiers, even in AMD
+// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
+// and CommonJS for browser emulators (#13566)
+if ( !noGlobal ) {
+	window.jQuery = window.$ = jQuery;
+}
+
+
+return jQuery;
+} );
Index: EcnlProtoTool/trunk/webapp/webmrbc/js/jquery-3.1.0.min.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/js/jquery-3.1.0.min.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/js/jquery-3.1.0.min.js	(revision 270)
@@ -0,0 +1,4 @@
+/*! jQuery v3.1.0 | (c) jQuery Foundation | jquery.org/license */
+!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.1.0",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null!=a?a<0?this[a+this.length]:this[a]:f.call(this)},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=r.isArray(d)))?(e?(e=!1,f=c&&r.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return!(!a||"[object Object]"!==k.call(a))&&(!(b=e(a))||(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;d<c;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;f<d;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a))return d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"!==c&&!r.isWindow(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"label"in b&&b.disabled===a||"form"in b&&b.disabled===a||"form"in b&&b.disabled===!1&&(b.isDisabled===a||b.isDisabled!==!a&&("label"in b||!ea(b))!==a)}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:pa(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:pa(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function ra(){}ra.prototype=d.filters=d.pseudos,d.setFilters=new ra,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=Q.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function sa(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function ta(a,b,c){var d=b.dir,e=b.next,f=e||d,g=c&&"parentNode"===f,h=x++;return b.first?function(b,c,e){while(b=b[d])if(1===b.nodeType||g)return a(b,c,e)}:function(b,c,i){var j,k,l,m=[w,h];if(i){while(b=b[d])if((1===b.nodeType||g)&&a(b,c,i))return!0}else while(b=b[d])if(1===b.nodeType||g)if(l=b[u]||(b[u]={}),k=l[b.uniqueID]||(l[b.uniqueID]={}),e&&e===b.nodeName.toLowerCase())b=b[d]||b;else{if((j=k[f])&&j[0]===w&&j[1]===h)return m[2]=j[2];if(k[f]=m,m[2]=a(b,c,i))return!0}}}function ua(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d<e;d++)ga(a,b[d],c);return c}function wa(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h<i;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function xa(a,b,c,d,e,f){return d&&!d[u]&&(d=xa(d)),e&&!e[u]&&(e=xa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||va(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:wa(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=wa(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i<f;i++)if(c=d.relative[a[i].type])m=[ta(ua(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;e<f;e++)if(d.relative[a[e].type])break;return xa(i>1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i<e&&ya(a.slice(i,e)),e<f&&ya(a=a.slice(e)),e<f&&sa(a))}m.push(c)}return ua(m)}function za(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(_,aa),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=V.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(_,aa),$.test(j[0].type)&&qa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&sa(j),!a)return G.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||$.test(a)&&qa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext,B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,C=/^.[^:#\[\.,]*$/;function D(a,b,c){if(r.isFunction(b))return r.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return r.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(C.test(b))return r.filter(b,a,c);b=r.filter(b,a)}return r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType})}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b<d;b++)if(r.contains(e[b],this))return!0}));for(c=this.pushStack([]),b=0;b<d;b++)r.find(a,e[b],c);return d>1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(D(this,a||[],!1))},not:function(a){return this.pushStack(D(this,a||[],!0))},is:function(a){return!!D(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var E,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,G=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||E,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:F.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),B.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};G.prototype=r.fn,E=r(d);var H=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a<c;a++)if(r.contains(this,b[a]))return!0})},closest:function(a,b){var c,d=0,e=this.length,f=[],g="string"!=typeof a&&r(a);if(!A.test(a))for(;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function J(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return J(a,"nextSibling")},prev:function(a){return J(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return a.contentDocument||r.merge([],a.childNodes)}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(I[a]||r.uniqueSort(e),H.test(a)&&e.reverse()),this.pushStack(e)}});var K=/\S+/g;function L(a){var b={};return r.each(a.match(K)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?L(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){r.each(b,function(b,c){r.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==r.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return r.each(arguments,function(a,b){var c;while((c=r.inArray(b,f,c))>-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function M(a){return a}function N(a){throw a}function O(a,b,c){var d;try{a&&r.isFunction(d=a.promise)?d.call(a).done(b).fail(c):a&&r.isFunction(d=a.then)?d.call(a,b,c):b.call(void 0,a)}catch(a){c.call(void 0,a)}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b<f)){if(a=d.apply(h,i),a===c.promise())throw new TypeError("Thenable self-resolution");j=a&&("object"==typeof a||"function"==typeof a)&&a.then,r.isFunction(j)?e?j.call(a,g(f,c,M,e),g(f,c,N,e)):(f++,j.call(a,g(f,c,M,e),g(f,c,N,e),g(f,c,M,c.notifyWith))):(d!==M&&(h=void 0,i=[a]),(e||c.resolveWith)(h,i))}},k=e?j:function(){try{j()}catch(a){r.Deferred.exceptionHook&&r.Deferred.exceptionHook(a,k.stackTrace),b+1>=f&&(d!==N&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:M,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:M)),c[2][3].add(g(0,a,r.isFunction(d)?d:N))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(O(a,g.done(h(c)).resolve,g.reject),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)O(e[c],h(c),g.reject);return g.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&P.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var Q=r.Deferred();r.fn.ready=function(a){return Q.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,holdReady:function(a){a?r.readyWait++:r.ready(!0)},ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||Q.resolveWith(d,[r]))}}),r.ready.then=Q.then;function R(){d.removeEventListener("DOMContentLoaded",R),a.removeEventListener("load",R),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",R),a.addEventListener("load",R));var S=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)S(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,
+r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},T=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function U(){this.expando=r.expando+U.uid++}U.uid=1,U.prototype={cache:function(a){var b=a[this.expando];return b||(b={},T(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){r.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(K)||[]),c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var V=new U,W=new U,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Y=/[A-Z]/g;function Z(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Y,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c||"false"!==c&&("null"===c?null:+c+""===c?+c:X.test(c)?JSON.parse(c):c)}catch(e){}W.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return W.hasData(a)||V.hasData(a)},data:function(a,b,c){return W.access(a,b,c)},removeData:function(a,b){W.remove(a,b)},_data:function(a,b,c){return V.access(a,b,c)},_removeData:function(a,b){V.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=W.get(f),1===f.nodeType&&!V.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=r.camelCase(d.slice(5)),Z(f,d,e[d])));V.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){W.set(this,a)}):S(this,function(b){var c;if(f&&void 0===b){if(c=W.get(f,a),void 0!==c)return c;if(c=Z(f,a),void 0!==c)return c}else this.each(function(){W.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=V.get(a,b),c&&(!d||r.isArray(c)?d=V.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return V.get(a,c)||V.access(a,c,{empty:r.Callbacks("once memory").add(function(){V.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?r.queue(this[0],a):void 0===b?this:this.each(function(){var c=r.queue(this,a,b);r._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&r.dequeue(this,a)})},dequeue:function(a){return this.each(function(){r.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=r.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=V.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var $=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,_=new RegExp("^(?:([+-])=|)("+$+")([a-z%]*)$","i"),aa=["Top","Right","Bottom","Left"],ba=function(a,b){return a=b||a,"none"===a.style.display||""===a.style.display&&r.contains(a.ownerDocument,a)&&"none"===r.css(a,"display")},ca=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};function da(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return r.css(a,b,"")},i=h(),j=c&&c[3]||(r.cssNumber[b]?"":"px"),k=(r.cssNumber[b]||"px"!==j&&+i)&&_.exec(r.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,r.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var ea={};function fa(a){var b,c=a.ownerDocument,d=a.nodeName,e=ea[d];return e?e:(b=c.body.appendChild(c.createElement(d)),e=r.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e="block"),ea[d]=e,e)}function ga(a,b){for(var c,d,e=[],f=0,g=a.length;f<g;f++)d=a[f],d.style&&(c=d.style.display,b?("none"===c&&(e[f]=V.get(d,"display")||null,e[f]||(d.style.display="")),""===d.style.display&&ba(d)&&(e[f]=fa(d))):"none"!==c&&(e[f]="none",V.set(d,"display",c)));for(f=0;f<g;f++)null!=e[f]&&(a[f].style.display=e[f]);return a}r.fn.extend({show:function(){return ga(this,!0)},hide:function(){return ga(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){ba(this)?r(this).show():r(this).hide()})}});var ha=/^(?:checkbox|radio)$/i,ia=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ja=/^$|\/(?:java|ecma)script/i,ka={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ka.optgroup=ka.option,ka.tbody=ka.tfoot=ka.colgroup=ka.caption=ka.thead,ka.th=ka.td;function la(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function ma(a,b){for(var c=0,d=a.length;c<d;c++)V.set(a[c],"globalEval",!b||V.get(b[c],"globalEval"))}var na=/<|&#?\w+;/;function oa(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],n=0,o=a.length;n<o;n++)if(f=a[n],f||0===f)if("object"===r.type(f))r.merge(m,f.nodeType?[f]:f);else if(na.test(f)){g=g||l.appendChild(b.createElement("div")),h=(ia.exec(f)||["",""])[1].toLowerCase(),i=ka[h]||ka._default,g.innerHTML=i[1]+r.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;r.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",n=0;while(f=m[n++])if(d&&r.inArray(f,d)>-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=la(l.appendChild(f),"script"),j&&ma(g),c){k=0;while(f=g[k++])ja.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var pa=d.documentElement,qa=/^key/,ra=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,sa=/^([^.]*)(?:\.(.+)|)/;function ta(){return!0}function ua(){return!1}function va(){try{return d.activeElement}catch(a){}}function wa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)wa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ua;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(pa,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(K)||[""],j=b.length;while(j--)h=sa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.hasData(a)&&V.get(a);if(q&&(i=q.events)){b=(b||"").match(K)||[""],j=b.length;while(j--)if(h=sa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&V.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(V.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c<arguments.length;c++)i[c]=arguments[c];if(b.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,b)!==!1){h=r.event.handlers.call(this,b,j),c=0;while((f=h[c++])&&!b.isPropagationStopped()){b.currentTarget=f.elem,d=0;while((g=f.handlers[d++])&&!b.isImmediatePropagationStopped())b.rnamespace&&!b.rnamespace.test(g.namespace)||(b.handleObj=g,b.data=g.data,e=((r.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(b.result=e)===!1&&(b.preventDefault(),b.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,b),b.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;c<h;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?r(e,this).index(i)>-1:r.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},addProp:function(a,b){Object.defineProperty(r.Event.prototype,a,{enumerable:!0,configurable:!0,get:r.isFunction(b)?function(){if(this.originalEvent)return b(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[a]},set:function(b){Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:b})}})},fix:function(a){return a[r.expando]?a:new r.Event(a)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==va()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===va()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&r.nodeName(this,"input"))return this.click(),!1},_default:function(a){return r.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},r.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},r.Event=function(a,b){return this instanceof r.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ta:ua,this.target=a.target&&3===a.target.nodeType?a.target.parentNode:a.target,this.currentTarget=a.currentTarget,this.relatedTarget=a.relatedTarget):this.type=a,b&&r.extend(this,b),this.timeStamp=a&&a.timeStamp||r.now(),void(this[r.expando]=!0)):new r.Event(a,b)},r.Event.prototype={constructor:r.Event,isDefaultPrevented:ua,isPropagationStopped:ua,isImmediatePropagationStopped:ua,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ta,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ta,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ta,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},r.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(a){var b=a.button;return null==a.which&&qa.test(a.type)?null!=a.charCode?a.charCode:a.keyCode:!a.which&&void 0!==b&&ra.test(a.type)?1&b?1:2&b?3:4&b?2:0:a.which}},r.event.addProp),r.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){r.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||r.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),r.fn.extend({on:function(a,b,c,d){return wa(this,a,b,c,d)},one:function(a,b,c,d){return wa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,r(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=ua),this.each(function(){r.event.remove(this,a,c,b)})}});var xa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,ya=/<script|<style|<link/i,za=/checked\s*(?:[^=]|=\s*.checked.)/i,Aa=/^true\/(.*)/,Ba=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ca(a,b){return r.nodeName(a,"table")&&r.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function Da(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ea(a){var b=Aa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(V.hasData(a)&&(f=V.access(a),g=V.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c<d;c++)r.event.add(b,e,j[e][c])}W.hasData(a)&&(h=W.access(a),i=r.extend({},h),W.set(b,i))}}function Ga(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ha.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function Ha(a,b,c,d){b=g.apply([],b);var e,f,h,i,j,k,l=0,m=a.length,n=m-1,q=b[0],s=r.isFunction(q);if(s||m>1&&"string"==typeof q&&!o.checkClone&&za.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(m&&(e=oa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(la(e,"script"),Da),i=h.length;l<m;l++)j=e,l!==n&&(j=r.clone(j,!0,!0),i&&r.merge(h,la(j,"script"))),c.call(a[l],j,l);if(i)for(k=h[h.length-1].ownerDocument,r.map(h,Ea),l=0;l<i;l++)j=h[l],ja.test(j.type||"")&&!V.access(j,"globalEval")&&r.contains(k,j)&&(j.src?r._evalUrl&&r._evalUrl(j.src):p(j.textContent.replace(Ba,""),k))}return a}function Ia(a,b,c){for(var d,e=b?r.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||r.cleanData(la(d)),d.parentNode&&(c&&r.contains(d.ownerDocument,d)&&ma(la(d,"script")),d.parentNode.removeChild(d));return a}r.extend({htmlPrefilter:function(a){return a.replace(xa,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=la(h),f=la(a),d=0,e=f.length;d<e;d++)Ga(f[d],g[d]);if(b)if(c)for(f=f||la(a),g=g||la(h),d=0,e=f.length;d<e;d++)Fa(f[d],g[d]);else Fa(a,h);return g=la(h,"script"),g.length>0&&ma(g,!i&&la(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(T(c)){if(b=c[V.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[V.expando]=void 0}c[W.expando]&&(c[W.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return S(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(la(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return S(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!ya.test(a)&&!ka[(ia.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c<d;c++)b=this[c]||{},1===b.nodeType&&(r.cleanData(la(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;r.inArray(this,a)<0&&(r.cleanData(la(this)),c&&c.replaceChild(b,this))},a)}}),r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){r.fn[a]=function(a){for(var c,d=[],e=r(a),f=e.length-1,g=0;g<=f;g++)c=g===f?this:this.clone(!0),r(e[g])[b](c),h.apply(d,c.get());return this.pushStack(d)}});var Ja=/^margin/,Ka=new RegExp("^("+$+")(?!px)[a-z%]+$","i"),La=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)};!function(){function b(){if(i){i.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",i.innerHTML="",pa.appendChild(h);var b=a.getComputedStyle(i);c="1%"!==b.top,g="2px"===b.marginLeft,e="4px"===b.width,i.style.marginRight="50%",f="4px"===b.marginRight,pa.removeChild(h),i=null}}var c,e,f,g,h=d.createElement("div"),i=d.createElement("div");i.style&&(i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===i.style.backgroundClip,h.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",h.appendChild(i),r.extend(o,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return b(),e},pixelMarginRight:function(){return b(),f},reliableMarginLeft:function(){return b(),g}}))}();function Ma(a,b,c){var d,e,f,g,h=a.style;return c=c||La(a),c&&(g=c.getPropertyValue(b)||c[b],""!==g||r.contains(a.ownerDocument,a)||(g=r.style(a,b)),!o.pixelMarginRight()&&Ka.test(g)&&Ja.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function Na(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Oa=/^(none|table(?!-c[ea]).+)/,Pa={position:"absolute",visibility:"hidden",display:"block"},Qa={letterSpacing:"0",fontWeight:"400"},Ra=["Webkit","Moz","ms"],Sa=d.createElement("div").style;function Ta(a){if(a in Sa)return a;var b=a[0].toUpperCase()+a.slice(1),c=Ra.length;while(c--)if(a=Ra[c]+b,a in Sa)return a}function Ua(a,b,c){var d=_.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Va(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;f<4;f+=2)"margin"===c&&(g+=r.css(a,c+aa[f],!0,e)),d?("content"===c&&(g-=r.css(a,"padding"+aa[f],!0,e)),"margin"!==c&&(g-=r.css(a,"border"+aa[f]+"Width",!0,e))):(g+=r.css(a,"padding"+aa[f],!0,e),"padding"!==c&&(g+=r.css(a,"border"+aa[f]+"Width",!0,e)));return g}function Wa(a,b,c){var d,e=!0,f=La(a),g="border-box"===r.css(a,"boxSizing",!1,f);if(a.getClientRects().length&&(d=a.getBoundingClientRect()[b]),d<=0||null==d){if(d=Ma(a,b,f),(d<0||null==d)&&(d=a.style[b]),Ka.test(d))return d;e=g&&(o.boxSizingReliable()||d===a.style[b]),d=parseFloat(d)||0}return d+Va(a,b,c||(g?"border":"content"),e,f)+"px"}r.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ma(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=r.camelCase(b),i=a.style;return b=r.cssProps[h]||(r.cssProps[h]=Ta(h)||h),g=r.cssHooks[b]||r.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=_.exec(c))&&e[1]&&(c=da(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(r.cssNumber[h]?"":"px")),o.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=r.camelCase(b);return b=r.cssProps[h]||(r.cssProps[h]=Ta(h)||h),g=r.cssHooks[b]||r.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Ma(a,b,d)),"normal"===e&&b in Qa&&(e=Qa[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),r.each(["height","width"],function(a,b){r.cssHooks[b]={get:function(a,c,d){if(c)return!Oa.test(r.css(a,"display"))||a.getClientRects().length&&a.getBoundingClientRect().width?Wa(a,b,d):ca(a,Pa,function(){return Wa(a,b,d)})},set:function(a,c,d){var e,f=d&&La(a),g=d&&Va(a,b,d,"border-box"===r.css(a,"boxSizing",!1,f),f);return g&&(e=_.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=r.css(a,b)),Ua(a,c,g)}}}),r.cssHooks.marginLeft=Na(o.reliableMarginLeft,function(a,b){if(b)return(parseFloat(Ma(a,"marginLeft"))||a.getBoundingClientRect().left-ca(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px"}),r.each({margin:"",padding:"",border:"Width"},function(a,b){r.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+aa[d]+b]=f[d]||f[d-2]||f[0];return e}},Ja.test(a)||(r.cssHooks[a+b].set=Ua)}),r.fn.extend({css:function(a,b){return S(this,function(a,b,c){var d,e,f={},g=0;if(r.isArray(b)){for(d=La(a),e=b.length;g<e;g++)f[b[g]]=r.css(a,b[g],!1,d);return f}return void 0!==c?r.style(a,b,c):r.css(a,b)},a,b,arguments.length>1)}});function Xa(a,b,c,d,e){return new Xa.prototype.init(a,b,c,d,e)}r.Tween=Xa,Xa.prototype={constructor:Xa,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=Xa.propHooks[this.prop];return a&&a.get?a.get(this):Xa.propHooks._default.get(this)},run:function(a){var b,c=Xa.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Xa.propHooks._default.set(this),this}},Xa.prototype.init.prototype=Xa.prototype,Xa.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},Xa.propHooks.scrollTop=Xa.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=Xa.prototype.init,r.fx.step={};var Ya,Za,$a=/^(?:toggle|show|hide)$/,_a=/queueHooks$/;function ab(){Za&&(a.requestAnimationFrame(ab),r.fx.tick())}function bb(){return a.setTimeout(function(){Ya=void 0}),Ya=r.now()}function cb(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=aa[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function db(a,b,c){for(var d,e=(gb.tweeners[b]||[]).concat(gb.tweeners["*"]),f=0,g=e.length;f<g;f++)if(d=e[f].call(c,b,a))return d}function eb(a,b,c){var d,e,f,g,h,i,j,k,l="width"in b||"height"in b,m=this,n={},o=a.style,p=a.nodeType&&ba(a),q=V.get(a,"fxshow");c.queue||(g=r._queueHooks(a,"fx"),null==g.unqueued&&(g.unqueued=0,h=g.empty.fire,g.empty.fire=function(){g.unqueued||h()}),g.unqueued++,m.always(function(){m.always(function(){g.unqueued--,r.queue(a,"fx").length||g.empty.fire()})}));for(d in b)if(e=b[d],$a.test(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}n[d]=q&&q[d]||r.style(a,d)}if(i=!r.isEmptyObject(b),i||!r.isEmptyObject(n)){l&&1===a.nodeType&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=q&&q.display,null==j&&(j=V.get(a,"display")),k=r.css(a,"display"),"none"===k&&(j?k=j:(ga([a],!0),j=a.style.display||j,k=r.css(a,"display"),ga([a]))),("inline"===k||"inline-block"===k&&null!=j)&&"none"===r.css(a,"float")&&(i||(m.done(function(){o.display=j}),null==j&&(k=o.display,j="none"===k?"":k)),o.display="inline-block")),c.overflow&&(o.overflow="hidden",m.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]})),i=!1;for(d in n)i||(q?"hidden"in q&&(p=q.hidden):q=V.access(a,"fxshow",{display:j}),f&&(q.hidden=!p),p&&ga([a],!0),m.done(function(){p||ga([a]),V.remove(a,"fxshow");for(d in n)r.style(a,d,n[d])})),i=db(p?q[d]:0,d,m),d in q||(q[d]=i.start,p&&(i.end=i.start,i.start=0))}}function fb(a,b){var c,d,e,f,g;for(c in a)if(d=r.camelCase(c),e=b[d],f=a[c],r.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=r.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function gb(a,b,c){var d,e,f=0,g=gb.prefilters.length,h=r.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Ya||bb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;g<i;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),f<1&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:r.extend({},b),opts:r.extend(!0,{specialEasing:{},easing:r.easing._default},c),originalProperties:b,originalOptions:c,startTime:Ya||bb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=r.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;c<d;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(fb(k,j.opts.specialEasing);f<g;f++)if(d=gb.prefilters[f].call(j,a,k,j.opts))return r.isFunction(d.stop)&&(r._queueHooks(j.elem,j.opts.queue).stop=r.proxy(d.stop,d)),d;return r.map(k,db,j),r.isFunction(j.opts.start)&&j.opts.start.call(a,j),r.fx.timer(r.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}r.Animation=r.extend(gb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return da(c.elem,a,_.exec(b),c),c}]},tweener:function(a,b){r.isFunction(a)?(b=a,a=["*"]):a=a.match(K);for(var c,d=0,e=a.length;d<e;d++)c=a[d],gb.tweeners[c]=gb.tweeners[c]||[],gb.tweeners[c].unshift(b)},prefilters:[eb],prefilter:function(a,b){b?gb.prefilters.unshift(a):gb.prefilters.push(a)}}),r.speed=function(a,b,c){var e=a&&"object"==typeof a?r.extend({},a):{complete:c||!c&&b||r.isFunction(a)&&a,duration:a,easing:c&&b||b&&!r.isFunction(b)&&b};return r.fx.off||d.hidden?e.duration=0:e.duration="number"==typeof e.duration?e.duration:e.duration in r.fx.speeds?r.fx.speeds[e.duration]:r.fx.speeds._default,null!=e.queue&&e.queue!==!0||(e.queue="fx"),e.old=e.complete,e.complete=function(){r.isFunction(e.old)&&e.old.call(this),e.queue&&r.dequeue(this,e.queue)},e},r.fn.extend({fadeTo:function(a,b,c,d){return this.filter(ba).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=r.isEmptyObject(a),f=r.speed(b,c,d),g=function(){var b=gb(this,r.extend({},a),f);(e||V.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=r.timers,g=V.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&_a.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||r.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=V.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=r.timers,g=d?d.length:0;for(c.finish=!0,r.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;b<g;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),r.each(["toggle","show","hide"],function(a,b){var c=r.fn[b];r.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(cb(b,!0),a,d,e)}}),r.each({slideDown:cb("show"),slideUp:cb("hide"),slideToggle:cb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){r.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),r.timers=[],r.fx.tick=function(){var a,b=0,c=r.timers;for(Ya=r.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||r.fx.stop(),Ya=void 0},r.fx.timer=function(a){r.timers.push(a),a()?r.fx.start():r.timers.pop()},r.fx.interval=13,r.fx.start=function(){Za||(Za=a.requestAnimationFrame?a.requestAnimationFrame(ab):a.setInterval(r.fx.tick,r.fx.interval))},r.fx.stop=function(){a.cancelAnimationFrame?a.cancelAnimationFrame(Za):a.clearInterval(Za),Za=null},r.fx.speeds={slow:600,fast:200,_default:400},r.fn.delay=function(b,c){return b=r.fx?r.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",o.checkOn=""!==a.value,o.optSelected=c.selected,a=d.createElement("input"),a.value="t",a.type="radio",o.radioValue="t"===a.value}();var hb,ib=r.expr.attrHandle;r.fn.extend({attr:function(a,b){return S(this,r.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?hb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&r.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(K);
+if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),hb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ib[b]||r.find.attr;ib[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=ib[g],ib[g]=e,e=null!=c(a,b,d)?g:null,ib[g]=f),e}});var jb=/^(?:input|select|textarea|button)$/i,kb=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return S(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):jb.test(a.nodeName)||kb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});var lb=/[\t\r\n\f]/g;function mb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,mb(this)))});if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=mb(c),d=1===c.nodeType&&(" "+e+" ").replace(lb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=r.trim(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,mb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=mb(c),d=1===c.nodeType&&(" "+e+" ").replace(lb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=r.trim(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,mb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(K)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=mb(this),b&&V.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":V.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+mb(c)+" ").replace(lb," ").indexOf(b)>-1)return!0;return!1}});var nb=/\r/g,ob=/[\x20\t\r\n\f]+/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":r.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(nb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:r.trim(r.text(a)).replace(ob," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i<h;i++)if(c=d[i],(c.selected||i===e)&&!c.disabled&&(!c.parentNode.disabled||!r.nodeName(c.parentNode,"optgroup"))){if(b=r(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(r.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var pb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!pb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,pb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(V.get(h,"events")||{})[b.type]&&V.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&T(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!T(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=V.access(d,b);e||d.addEventListener(a,c,!0),V.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=V.access(d,b)-1;e?V.access(d,b,e):(d.removeEventListener(a,c,!0),V.remove(d,b))}}});var qb=a.location,rb=r.now(),sb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var tb=/\[\]$/,ub=/\r?\n/g,vb=/^(?:submit|button|image|reset|file)$/i,wb=/^(?:input|select|textarea|keygen)/i;function xb(a,b,c,d){var e;if(r.isArray(b))r.each(b,function(b,e){c||tb.test(a)?d(a,e):xb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)xb(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(r.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)xb(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&wb.test(this.nodeName)&&!vb.test(a)&&(this.checked||!ha.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:r.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(ub,"\r\n")}}):{name:b.name,value:c.replace(ub,"\r\n")}}).get()}});var yb=/%20/g,zb=/#.*$/,Ab=/([?&])_=[^&]*/,Bb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Cb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Db=/^(?:GET|HEAD)$/,Eb=/^\/\//,Fb={},Gb={},Hb="*/".concat("*"),Ib=d.createElement("a");Ib.href=qb.href;function Jb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(K)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Kb(a,b,c,d){var e={},f=a===Gb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Lb(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Mb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Nb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qb.href,type:"GET",isLocal:Cb.test(qb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Hb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Lb(Lb(a,r.ajaxSettings),b):Lb(r.ajaxSettings,a)},ajaxPrefilter:Jb(Fb),ajaxTransport:Jb(Gb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Bb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||qb.href)+"").replace(Eb,qb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(K)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Ib.protocol+"//"+Ib.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Kb(Fb,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Db.test(o.type),f=o.url.replace(zb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(yb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(sb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Ab,""),n=(sb.test(f)?"&":"?")+"_="+rb++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Hb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Kb(Gb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Mb(o,y,d)),v=Nb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Ob={0:200,1223:204},Pb=r.ajaxSettings.xhr();o.cors=!!Pb&&"withCredentials"in Pb,o.ajax=Pb=!!Pb,r.ajaxTransport(function(b){var c,d;if(o.cors||Pb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Ob[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Qb=[],Rb=/(=)\?(?=&|$)|\?\?/;r.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Qb.pop()||r.expando+"_"+rb++;return this[a]=!0,a}}),r.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Rb.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Rb.test(b.data)&&"data");if(h||"jsonp"===b.dataTypes[0])return e=b.jsonpCallback=r.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Rb,"$1"+e):b.jsonp!==!1&&(b.url+=(sb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||r.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?r(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Qb.push(e)),g&&r.isFunction(f)&&f(g[0]),g=f=void 0}),"script"}),o.createHTMLDocument=function(){var a=d.implementation.createHTMLDocument("").body;return a.innerHTML="<form></form><form></form>",2===a.childNodes.length}(),r.parseHTML=function(a,b,c){if("string"!=typeof a)return[];"boolean"==typeof b&&(c=b,b=!1);var e,f,g;return b||(o.createHTMLDocument?(b=d.implementation.createHTMLDocument(""),e=b.createElement("base"),e.href=d.location.href,b.head.appendChild(e)):b=d),f=B.exec(a),g=!c&&[],f?[b.createElement(f[1])]:(f=oa([a],b,g),g&&g.length&&r(g).remove(),r.merge([],f.childNodes))},r.fn.load=function(a,b,c){var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=r.trim(a.slice(h)),a=a.slice(0,h)),r.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&r.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?r("<div>").append(r.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},r.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){r.fn[b]=function(a){return this.on(b,a)}}),r.expr.pseudos.animated=function(a){return r.grep(r.timers,function(b){return a===b.elem}).length};function Sb(a){return r.isWindow(a)?a:9===a.nodeType&&a.defaultView}r.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=r.css(a,"position"),l=r(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=r.css(a,"top"),i=r.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),r.isFunction(b)&&(b=b.call(a,c,r.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},r.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){r.offset.setOffset(this,a,b)});var b,c,d,e,f=this[0];if(f)return f.getClientRects().length?(d=f.getBoundingClientRect(),d.width||d.height?(e=f.ownerDocument,c=Sb(e),b=e.documentElement,{top:d.top+c.pageYOffset-b.clientTop,left:d.left+c.pageXOffset-b.clientLeft}):d):{top:0,left:0}},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===r.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),r.nodeName(a[0],"html")||(d=a.offset()),d={top:d.top+r.css(a[0],"borderTopWidth",!0),left:d.left+r.css(a[0],"borderLeftWidth",!0)}),{top:b.top-d.top-r.css(c,"marginTop",!0),left:b.left-d.left-r.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===r.css(a,"position"))a=a.offsetParent;return a||pa})}}),r.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;r.fn[a]=function(d){return S(this,function(a,d,e){var f=Sb(a);return void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),r.each(["top","left"],function(a,b){r.cssHooks[b]=Na(o.pixelPosition,function(a,c){if(c)return c=Ma(a,b),Ka.test(c)?r(a).position()[b]+"px":c})}),r.each({Height:"height",Width:"width"},function(a,b){r.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){r.fn[d]=function(e,f){var g=arguments.length&&(c||"boolean"!=typeof e),h=c||(e===!0||f===!0?"margin":"border");return S(this,function(b,c,e){var f;return r.isWindow(b)?0===d.indexOf("outer")?b["inner"+a]:b.document.documentElement["client"+a]:9===b.nodeType?(f=b.documentElement,Math.max(b.body["scroll"+a],f["scroll"+a],b.body["offset"+a],f["offset"+a],f["client"+a])):void 0===e?r.css(b,c,h):r.style(b,c,e,h)},b,g?e:void 0,g)}})}),r.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),r.parseJSON=JSON.parse,"function"==typeof define&&define.amd&&define("jquery",[],function(){return r});var Tb=a.jQuery,Ub=a.$;return r.noConflict=function(b){return a.$===r&&(a.$=Ub),b&&a.jQuery===r&&(a.jQuery=Tb),r},b||(a.jQuery=a.$=r),r});
Index: EcnlProtoTool/trunk/webapp/webmrbc/js/jquery-3.1.0.min.map
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/js/jquery-3.1.0.min.map	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/js/jquery-3.1.0.min.map	(revision 270)
@@ -0,0 +1,1 @@
+{"version":3,"sources":["jquery.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","arr","getProto","Object","getPrototypeOf","slice","concat","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","call","support","DOMEval","code","doc","script","createElement","text","head","appendChild","parentNode","removeChild","version","jQuery","selector","context","fn","init","rtrim","rmsPrefix","rdashAlpha","fcamelCase","all","letter","toUpperCase","prototype","jquery","constructor","length","toArray","get","num","pushStack","elems","ret","merge","prevObject","each","callback","map","elem","i","apply","arguments","first","eq","last","len","j","end","sort","splice","extend","options","name","src","copy","copyIsArray","clone","target","deep","isFunction","isPlainObject","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","obj","type","Array","isWindow","isNumeric","isNaN","parseFloat","proto","Ctor","isEmptyObject","globalEval","camelCase","string","nodeName","toLowerCase","isArrayLike","trim","makeArray","results","inArray","second","grep","invert","callbackInverse","matches","callbackExpect","arg","value","guid","proxy","tmp","args","now","Date","Symbol","iterator","split","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","sortOrder","a","b","pop","push_native","list","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","RegExp","rcomma","rcombinators","rattributeQuotes","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","_","escaped","escapedWhitespace","high","String","fromCharCode","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","disabledAncestor","addCombinator","disabled","dir","next","childNodes","nodeType","e","els","seed","m","nid","match","groups","newSelector","newContext","ownerDocument","exec","getElementById","id","getElementsByTagName","getElementsByClassName","qsa","test","getAttribute","setAttribute","toSelector","join","testContext","querySelectorAll","qsaError","removeAttribute","keys","cache","key","cacheLength","shift","markFunction","assert","el","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","documentElement","node","hasCompare","subWindow","defaultView","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","find","filter","attrId","getAttributeNode","tag","innerHTML","input","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","val","specified","escape","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","simple","forward","ofType","xml","uniqueCache","outerCache","nodeIndex","start","parent","useCache","lastChild","uniqueID","pseudo","setFilters","idx","matched","not","matcher","unmatched","has","innerText","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","checked","selected","selectedIndex","empty","header","button","even","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","filters","parseOnly","tokens","soFar","preFilters","cached","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","multipleContexts","contexts","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","matcherFromGroupMatchers","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","is","siblings","n","rneedsContext","rsingleTag","risSimple","winnow","qualifier","self","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","targets","l","closest","index","prevAll","add","addBack","sibling","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","reverse","rnotwhite","createOptions","object","flag","Callbacks","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","remove","disable","lock","fireWith","Identity","v","Thrower","ex","adoptValue","resolve","reject","method","promise","fail","then","Deferred","func","tuples","state","always","deferred","catch","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","special","that","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","setTimeout","stateString","when","singleValue","remaining","resolveContexts","resolveValues","master","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","readyWait","holdReady","hold","wait","completed","removeEventListener","readyState","doScroll","access","chainable","emptyGet","raw","bulk","acceptData","owner","Data","uid","defineProperty","configurable","set","data","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","JSON","parse","removeData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","rcssNum","cssExpand","isHiddenWithinTree","style","display","css","swap","old","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","getDefaultDisplay","body","showHide","show","values","hide","toggle","rcheckableType","rtagName","rscriptType","wrapMap","option","thead","col","tr","td","_default","optgroup","tbody","tfoot","colgroup","caption","th","getAll","setGlobalEval","refElements","rhtml","buildFragment","scripts","selection","ignored","wrap","fragment","createDocumentFragment","nodes","htmlPrefilter","createTextNode","div","checkClone","cloneNode","noCloneChecked","rkeyEvent","rmouseEvent","rtypenamespace","returnTrue","returnFalse","safeActiveElement","err","on","types","one","origFn","event","off","handleObjIn","eventHandle","events","t","handleObj","handlers","namespaces","origType","elemData","handle","triggered","dispatch","delegateType","bindType","namespace","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","fix","handlerQueue","delegateTarget","preDispatch","isPropagationStopped","currentTarget","isImmediatePropagationStopped","rnamespace","preventDefault","stopPropagation","postDispatch","addProp","hook","Event","enumerable","originalEvent","writable","load","noBubble","trigger","blur","click","beforeunload","returnValue","props","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","isSimulated","stopImmediatePropagation","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","view","char","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","which","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rxhtmlTag","rnoInnerhtml","rchecked","rscriptTypeMasked","rcleanScript","manipulationTarget","content","disableScript","restoreScript","cloneCopyEvent","dest","pdataOld","pdataCur","udataOld","udataCur","fixInput","domManip","collection","hasScripts","iNoClone","html","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","rmargin","rnumnonpx","getStyles","opener","getComputedStyle","computeStyleTests","cssText","container","divStyle","pixelPositionVal","reliableMarginLeftVal","marginLeft","boxSizingReliableVal","width","marginRight","pixelMarginRightVal","backgroundClip","clearCloneStyle","pixelPosition","boxSizingReliable","pixelMarginRight","reliableMarginLeft","curCSS","computed","minWidth","maxWidth","getPropertyValue","addGetHookIf","conditionFn","hookFn","rdisplayswap","cssShow","position","visibility","cssNormalTransform","letterSpacing","fontWeight","cssPrefixes","emptyStyle","vendorPropName","capName","setPositiveNumber","subtract","max","augmentWidthOrHeight","extra","isBorderBox","styles","getWidthOrHeight","valueIsBorderBox","getClientRects","getBoundingClientRect","cssHooks","opacity","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","lineHeight","order","orphans","widows","zIndex","zoom","cssProps","float","origName","isFinite","left","margin","padding","border","prefix","suffix","expand","expanded","parts","Tween","easing","propHooks","run","percent","eased","duration","pos","step","fx","scrollTop","scrollLeft","linear","p","swing","cos","PI","fxNow","timerId","rfxtypes","rrun","raf","requestAnimationFrame","tick","createFxNow","genFx","includeWidth","height","createTween","animation","Animation","tweeners","defaultPrefilter","opts","oldfire","propTween","restoreDisplay","isBox","anim","hidden","dataShow","unqueued","overflow","overflowX","overflowY","propFilter","specialEasing","properties","stopped","prefilters","currentTime","startTime","tweens","originalProperties","originalOptions","gotoEnd","timer","complete","*","tweener","prefilter","speed","opt","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","interval","setInterval","cancelAnimationFrame","clearInterval","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","radioValue","boolHook","removeAttr","nType","attrHooks","attrNames","getter","lowercaseName","rfocusable","rclickable","removeProp","propFix","tabindex","parseInt","for","class","rclass","getClass","addClass","classes","curValue","clazz","finalValue","removeClass","toggleClass","stateVal","classNames","hasClass","rreturn","rspaces","valHooks","optionSet","rfocusMorph","onlyHandlers","bubbleType","ontype","eventPath","isTrigger","parentWindow","simulate","triggerHandler","hover","fnOver","fnOut","focusin","attaches","nonce","rquery","parseXML","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","s","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rts","rheaders","rlocalProtocol","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","ajaxHandleResponses","responses","ct","finalDataType","firstDataType","mimeType","getResponseHeader","converters","ajaxConvert","response","isSuccess","conv2","current","conv","responseFields","dataFilter","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getAllResponseHeaders","setRequestHeader","overrideMimeType","status","abort","statusText","finalText","crossDomain","host","hasContent","ifModified","headers","beforeSend","success","send","nativeStatusText","modified","getJSON","getScript","throws","wrapAll","firstElementChild","wrapInner","unwrap","visible","offsetWidth","offsetHeight","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","onreadystatechange","responseType","responseText","binary","text script","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","parsed","params","animated","getWindow","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","calculatePosition","curElem","using","win","rect","pageYOffset","clientTop","pageXOffset","clientLeft","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","bind","unbind","delegate","undelegate","parseJSON","define","amd","_jQuery","_$","$","noConflict"],"mappings":";CAcA,SAAYA,EAAQC,GAEnB,YAEuB,iBAAXC,SAAiD,gBAAnBA,QAAOC,QAShDD,OAAOC,QAAUH,EAAOI,SACvBH,EAASD,GAAQ,GACjB,SAAUK,GACT,IAAMA,EAAED,SACP,KAAM,IAAIE,OAAO,2CAElB,OAAOL,GAASI,IAGlBJ,EAASD,IAIY,mBAAXO,QAAyBA,OAASC,KAAM,SAAUD,EAAQE,GAMtE,YAEA,IAAIC,MAEAN,EAAWG,EAAOH,SAElBO,EAAWC,OAAOC,eAElBC,EAAQJ,EAAII,MAEZC,EAASL,EAAIK,OAEbC,EAAON,EAAIM,KAEXC,EAAUP,EAAIO,QAEdC,KAEAC,EAAWD,EAAWC,SAEtBC,EAASF,EAAWG,eAEpBC,EAAaF,EAAOD,SAEpBI,EAAuBD,EAAWE,KAAMZ,QAExCa,IAIH,SAASC,GAASC,EAAMC,GACvBA,EAAMA,GAAOxB,CAEb,IAAIyB,GAASD,EAAIE,cAAe,SAEhCD,GAAOE,KAAOJ,EACdC,EAAII,KAAKC,YAAaJ,GAASK,WAAWC,YAAaN,GAQzD,GACCO,GAAU,QAGVC,EAAS,SAAUC,EAAUC,GAI5B,MAAO,IAAIF,GAAOG,GAAGC,KAAMH,EAAUC,IAKtCG,EAAQ,qCAGRC,EAAY,QACZC,EAAa,YAGbC,EAAa,SAAUC,EAAKC,GAC3B,MAAOA,GAAOC,cAGhBX,GAAOG,GAAKH,EAAOY,WAGlBC,OAAQd,EAERe,YAAad,EAGbe,OAAQ,EAERC,QAAS,WACR,MAAOvC,GAAMU,KAAMhB,OAKpB8C,IAAK,SAAUC,GACd,MAAc,OAAPA,EAGJA,EAAM,EAAI/C,KAAM+C,EAAM/C,KAAK4C,QAAW5C,KAAM+C,GAG9CzC,EAAMU,KAAMhB,OAKdgD,UAAW,SAAUC,GAGpB,GAAIC,GAAMrB,EAAOsB,MAAOnD,KAAK2C,cAAeM,EAM5C,OAHAC,GAAIE,WAAapD,KAGVkD,GAIRG,KAAM,SAAUC,GACf,MAAOzB,GAAOwB,KAAMrD,KAAMsD,IAG3BC,IAAK,SAAUD,GACd,MAAOtD,MAAKgD,UAAWnB,EAAO0B,IAAKvD,KAAM,SAAUwD,EAAMC,GACxD,MAAOH,GAAStC,KAAMwC,EAAMC,EAAGD,OAIjClD,MAAO,WACN,MAAON,MAAKgD,UAAW1C,EAAMoD,MAAO1D,KAAM2D,aAG3CC,MAAO,WACN,MAAO5D,MAAK6D,GAAI,IAGjBC,KAAM,WACL,MAAO9D,MAAK6D,QAGbA,GAAI,SAAUJ,GACb,GAAIM,GAAM/D,KAAK4C,OACdoB,GAAKP,GAAMA,EAAI,EAAIM,EAAM,EAC1B,OAAO/D,MAAKgD,UAAWgB,GAAK,GAAKA,EAAID,GAAQ/D,KAAMgE,SAGpDC,IAAK,WACJ,MAAOjE,MAAKoD,YAAcpD,KAAK2C,eAKhCnC,KAAMA,EACN0D,KAAMhE,EAAIgE,KACVC,OAAQjE,EAAIiE,QAGbtC,EAAOuC,OAASvC,EAAOG,GAAGoC,OAAS,WAClC,GAAIC,GAASC,EAAMC,EAAKC,EAAMC,EAAaC,EAC1CC,EAAShB,UAAW,OACpBF,EAAI,EACJb,EAASe,UAAUf,OACnBgC,GAAO,CAsBR,KAnBuB,iBAAXD,KACXC,EAAOD,EAGPA,EAAShB,UAAWF,OACpBA,KAIsB,gBAAXkB,IAAwB9C,EAAOgD,WAAYF,KACtDA,MAIIlB,IAAMb,IACV+B,EAAS3E,KACTyD,KAGOA,EAAIb,EAAQa,IAGnB,GAAqC,OAA9BY,EAAUV,UAAWF,IAG3B,IAAMa,IAAQD,GACbE,EAAMI,EAAQL,GACdE,EAAOH,EAASC,GAGXK,IAAWH,IAKXI,GAAQJ,IAAU3C,EAAOiD,cAAeN,KAC1CC,EAAc5C,EAAOkD,QAASP,MAE3BC,GACJA,GAAc,EACdC,EAAQH,GAAO1C,EAAOkD,QAASR,GAAQA,MAGvCG,EAAQH,GAAO1C,EAAOiD,cAAeP,GAAQA,KAI9CI,EAAQL,GAASzC,EAAOuC,OAAQQ,EAAMF,EAAOF,IAGzBQ,SAATR,IACXG,EAAQL,GAASE,GAOrB,OAAOG,IAGR9C,EAAOuC,QAGNa,QAAS,UAAarD,EAAUsD,KAAKC,UAAWC,QAAS,MAAO,IAGhEC,SAAS,EAETC,MAAO,SAAUC,GAChB,KAAM,IAAIzF,OAAOyF,IAGlBC,KAAM,aAENX,WAAY,SAAUY,GACrB,MAA8B,aAAvB5D,EAAO6D,KAAMD,IAGrBV,QAASY,MAAMZ,QAEfa,SAAU,SAAUH,GACnB,MAAc,OAAPA,GAAeA,IAAQA,EAAI1F,QAGnC8F,UAAW,SAAUJ,GAKpB,GAAIC,GAAO7D,EAAO6D,KAAMD,EACxB,QAAkB,WAATC,GAA8B,WAATA,KAK5BI,MAAOL,EAAMM,WAAYN,KAG5BX,cAAe,SAAUW,GACxB,GAAIO,GAAOC,CAIX,UAAMR,GAAgC,oBAAzB9E,EAASK,KAAMyE,QAI5BO,EAAQ7F,EAAUsF,MAQlBQ,EAAOrF,EAAOI,KAAMgF,EAAO,gBAAmBA,EAAMrD,YAC7B,kBAATsD,IAAuBnF,EAAWE,KAAMiF,KAAWlF,KAGlEmF,cAAe,SAAUT,GAIxB,GAAInB,EAEJ,KAAMA,IAAQmB,GACb,OAAO,CAER,QAAO,GAGRC,KAAM,SAAUD,GACf,MAAY,OAAPA,EACGA,EAAM,GAIQ,gBAARA,IAAmC,kBAARA,GACxC/E,EAAYC,EAASK,KAAMyE,KAAW,eAC/BA,IAITU,WAAY,SAAUhF,GACrBD,EAASC,IAMViF,UAAW,SAAUC,GACpB,MAAOA,GAAOjB,QAASjD,EAAW,OAAQiD,QAAShD,EAAYC,IAGhEiE,SAAU,SAAU9C,EAAMc,GACzB,MAAOd,GAAK8C,UAAY9C,EAAK8C,SAASC,gBAAkBjC,EAAKiC,eAG9DlD,KAAM,SAAUoC,EAAKnC,GACpB,GAAIV,GAAQa,EAAI,CAEhB,IAAK+C,EAAaf,IAEjB,IADA7C,EAAS6C,EAAI7C,OACLa,EAAIb,EAAQa,IACnB,GAAKH,EAAStC,KAAMyE,EAAKhC,GAAKA,EAAGgC,EAAKhC,OAAU,EAC/C,UAIF,KAAMA,IAAKgC,GACV,GAAKnC,EAAStC,KAAMyE,EAAKhC,GAAKA,EAAGgC,EAAKhC,OAAU,EAC/C,KAKH,OAAOgC,IAIRgB,KAAM,SAAUlF,GACf,MAAe,OAARA,EACN,IACEA,EAAO,IAAK6D,QAASlD,EAAO,KAIhCwE,UAAW,SAAUxG,EAAKyG,GACzB,GAAIzD,GAAMyD,KAaV,OAXY,OAAPzG,IACCsG,EAAapG,OAAQF,IACzB2B,EAAOsB,MAAOD,EACE,gBAARhD,IACLA,GAAQA,GAGXM,EAAKQ,KAAMkC,EAAKhD,IAIXgD,GAGR0D,QAAS,SAAUpD,EAAMtD,EAAKuD,GAC7B,MAAc,OAAPvD,KAAmBO,EAAQO,KAAMd,EAAKsD,EAAMC,IAKpDN,MAAO,SAAUS,EAAOiD,GAKvB,IAJA,GAAI9C,IAAO8C,EAAOjE,OACjBoB,EAAI,EACJP,EAAIG,EAAMhB,OAEHoB,EAAID,EAAKC,IAChBJ,EAAOH,KAAQoD,EAAQ7C,EAKxB,OAFAJ,GAAMhB,OAASa,EAERG,GAGRkD,KAAM,SAAU7D,EAAOK,EAAUyD,GAShC,IARA,GAAIC,GACHC,KACAxD,EAAI,EACJb,EAASK,EAAML,OACfsE,GAAkBH,EAIXtD,EAAIb,EAAQa,IACnBuD,GAAmB1D,EAAUL,EAAOQ,GAAKA,GACpCuD,IAAoBE,GACxBD,EAAQzG,KAAMyC,EAAOQ,GAIvB,OAAOwD,IAIR1D,IAAK,SAAUN,EAAOK,EAAU6D,GAC/B,GAAIvE,GAAQwE,EACX3D,EAAI,EACJP,IAGD,IAAKsD,EAAavD,GAEjB,IADAL,EAASK,EAAML,OACPa,EAAIb,EAAQa,IACnB2D,EAAQ9D,EAAUL,EAAOQ,GAAKA,EAAG0D,GAEnB,MAATC,GACJlE,EAAI1C,KAAM4G,OAMZ,KAAM3D,IAAKR,GACVmE,EAAQ9D,EAAUL,EAAOQ,GAAKA,EAAG0D,GAEnB,MAATC,GACJlE,EAAI1C,KAAM4G,EAMb,OAAO7G,GAAOmD,SAAWR,IAI1BmE,KAAM,EAINC,MAAO,SAAUtF,EAAID,GACpB,GAAIwF,GAAKC,EAAMF,CAUf,IARwB,gBAAZvF,KACXwF,EAAMvF,EAAID,GACVA,EAAUC,EACVA,EAAKuF,GAKA1F,EAAOgD,WAAY7C,GAazB,MARAwF,GAAOlH,EAAMU,KAAM2C,UAAW,GAC9B2D,EAAQ,WACP,MAAOtF,GAAG0B,MAAO3B,GAAW/B,KAAMwH,EAAKjH,OAAQD,EAAMU,KAAM2C,cAI5D2D,EAAMD,KAAOrF,EAAGqF,KAAOrF,EAAGqF,MAAQxF,EAAOwF,OAElCC,GAGRG,IAAKC,KAAKD,IAIVxG,QAASA,IAGa,kBAAX0G,UACX9F,EAAOG,GAAI2F,OAAOC,UAAa1H,EAAKyH,OAAOC,WAI5C/F,EAAOwB,KAAM,uEAAuEwE,MAAO,KAC3F,SAAUpE,EAAGa,GACZ5D,EAAY,WAAa4D,EAAO,KAAQA,EAAKiC,eAG9C,SAASC,GAAaf,GAMrB,GAAI7C,KAAW6C,GAAO,UAAYA,IAAOA,EAAI7C,OAC5C8C,EAAO7D,EAAO6D,KAAMD,EAErB,OAAc,aAATC,IAAuB7D,EAAO+D,SAAUH,KAI7B,UAATC,GAA+B,IAAX9C,GACR,gBAAXA,IAAuBA,EAAS,GAAOA,EAAS,IAAO6C,IAEhE,GAAIqC,GAWJ,SAAW/H,GAEX,GAAI0D,GACHxC,EACA8G,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAGAC,EACA5I,EACA6I,EACAC,EACAC,EACAC,EACA3B,EACA4B,EAGA5D,EAAU,SAAW,EAAI,GAAIyC,MAC7BoB,EAAe/I,EAAOH,SACtBmJ,EAAU,EACVC,EAAO,EACPC,EAAaC,KACbC,EAAaD,KACbE,EAAgBF,KAChBG,EAAY,SAAUC,EAAGC,GAIxB,MAHKD,KAAMC,IACVhB,GAAe,GAET,GAIR3H,KAAcC,eACdX,KACAsJ,EAAMtJ,EAAIsJ,IACVC,EAAcvJ,EAAIM,KAClBA,EAAON,EAAIM,KACXF,EAAQJ,EAAII,MAGZG,EAAU,SAAUiJ,EAAMlG,GAGzB,IAFA,GAAIC,GAAI,EACPM,EAAM2F,EAAK9G,OACJa,EAAIM,EAAKN,IAChB,GAAKiG,EAAKjG,KAAOD,EAChB,MAAOC,EAGT,WAGDkG,EAAW,6HAKXC,EAAa,sBAGbC,EAAa,gCAGbC,EAAa,MAAQF,EAAa,KAAOC,EAAa,OAASD,EAE9D,gBAAkBA,EAElB,2DAA6DC,EAAa,OAASD,EACnF,OAEDG,EAAU,KAAOF,EAAa,wFAKAC,EAAa,eAM3CE,EAAc,GAAIC,QAAQL,EAAa,IAAK,KAC5C1H,EAAQ,GAAI+H,QAAQ,IAAML,EAAa,8BAAgCA,EAAa,KAAM,KAE1FM,EAAS,GAAID,QAAQ,IAAML,EAAa,KAAOA,EAAa,KAC5DO,EAAe,GAAIF,QAAQ,IAAML,EAAa,WAAaA,EAAa,IAAMA,EAAa,KAE3FQ,EAAmB,GAAIH,QAAQ,IAAML,EAAa,iBAAmBA,EAAa,OAAQ,KAE1FS,EAAU,GAAIJ,QAAQF,GACtBO,EAAc,GAAIL,QAAQ,IAAMJ,EAAa,KAE7CU,GACCC,GAAM,GAAIP,QAAQ,MAAQJ,EAAa,KACvCY,MAAS,GAAIR,QAAQ,QAAUJ,EAAa,KAC5Ca,IAAO,GAAIT,QAAQ,KAAOJ,EAAa,SACvCc,KAAQ,GAAIV,QAAQ,IAAMH,GAC1Bc,OAAU,GAAIX,QAAQ,IAAMF,GAC5Bc,MAAS,GAAIZ,QAAQ,yDAA2DL,EAC/E,+BAAiCA,EAAa,cAAgBA,EAC9D,aAAeA,EAAa,SAAU,KACvCkB,KAAQ,GAAIb,QAAQ,OAASN,EAAW,KAAM,KAG9CoB,aAAgB,GAAId,QAAQ,IAAML,EAAa,mDAC9CA,EAAa,mBAAqBA,EAAa,mBAAoB,MAGrEoB,EAAU,sCACVC,EAAU,SAEVC,EAAU,yBAGVC,EAAa,mCAEbC,EAAW,OAIXC,EAAY,GAAIpB,QAAQ,qBAAuBL,EAAa,MAAQA,EAAa,OAAQ,MACzF0B,GAAY,SAAUC,EAAGC,EAASC,GACjC,GAAIC,GAAO,KAAOF,EAAU,KAI5B,OAAOE,KAASA,GAAQD,EACvBD,EACAE,EAAO,EAENC,OAAOC,aAAcF,EAAO,OAE5BC,OAAOC,aAAcF,GAAQ,GAAK,MAAe,KAAPA,EAAe,QAK5DG,GAAa,+CACbC,GAAa,SAAUC,EAAIC,GAC1B,MAAKA,GAGQ,OAAPD,EACG,SAIDA,EAAGzL,MAAO,MAAU,KAAOyL,EAAGE,WAAYF,EAAGnJ,OAAS,GAAIjC,SAAU,IAAO,IAI5E,KAAOoL,GAOfG,GAAgB,WACf1D,KAGD2D,GAAmBC,GAClB,SAAU5I,GACT,MAAOA,GAAK6I,YAAa,IAExBC,IAAK,aAAcC,KAAM,UAI7B,KACC/L,EAAKkD,MACHxD,EAAMI,EAAMU,KAAM8H,EAAa0D,YAChC1D,EAAa0D,YAIdtM,EAAK4I,EAAa0D,WAAW5J,QAAS6J,SACrC,MAAQC,IACTlM,GAASkD,MAAOxD,EAAI0C,OAGnB,SAAU+B,EAAQgI,GACjBlD,EAAY/F,MAAOiB,EAAQrE,EAAMU,KAAK2L,KAKvC,SAAUhI,EAAQgI,GACjB,GAAI3I,GAAIW,EAAO/B,OACda,EAAI,CAEL,OAASkB,EAAOX,KAAO2I,EAAIlJ,MAC3BkB,EAAO/B,OAASoB,EAAI,IAKvB,QAAS8D,IAAQhG,EAAUC,EAAS4E,EAASiG,GAC5C,GAAIC,GAAGpJ,EAAGD,EAAMsJ,EAAKC,EAAOC,EAAQC,EACnCC,EAAanL,GAAWA,EAAQoL,cAGhCV,EAAW1K,EAAUA,EAAQ0K,SAAW,CAKzC,IAHA9F,EAAUA,MAGe,gBAAb7E,KAA0BA,GACxB,IAAb2K,GAA+B,IAAbA,GAA+B,KAAbA,EAEpC,MAAO9F,EAIR,KAAMiG,KAEE7K,EAAUA,EAAQoL,eAAiBpL,EAAU+G,KAAmBlJ,GACtE4I,EAAazG,GAEdA,EAAUA,GAAWnC,EAEhB8I,GAAiB,CAIrB,GAAkB,KAAb+D,IAAoBM,EAAQ5B,EAAWiC,KAAMtL,IAGjD,GAAM+K,EAAIE,EAAM,IAGf,GAAkB,IAAbN,EAAiB,CACrB,KAAMjJ,EAAOzB,EAAQsL,eAAgBR,IAUpC,MAAOlG,EALP,IAAKnD,EAAK8J,KAAOT,EAEhB,MADAlG,GAAQnG,KAAMgD,GACPmD,MAYT,IAAKuG,IAAe1J,EAAO0J,EAAWG,eAAgBR,KACrDhE,EAAU9G,EAASyB,IACnBA,EAAK8J,KAAOT,EAGZ,MADAlG,GAAQnG,KAAMgD,GACPmD,MAKH,CAAA,GAAKoG,EAAM,GAEjB,MADAvM,GAAKkD,MAAOiD,EAAS5E,EAAQwL,qBAAsBzL,IAC5C6E,CAGD,KAAMkG,EAAIE,EAAM,KAAO9L,EAAQuM,wBACrCzL,EAAQyL,uBAGR,MADAhN,GAAKkD,MAAOiD,EAAS5E,EAAQyL,uBAAwBX,IAC9ClG,EAKT,GAAK1F,EAAQwM,MACXrE,EAAetH,EAAW,QACzB6G,IAAcA,EAAU+E,KAAM5L,IAAc,CAE9C,GAAkB,IAAb2K,EACJS,EAAanL,EACbkL,EAAcnL,MAMR,IAAwC,WAAnCC,EAAQuE,SAASC,cAA6B,EAGnDuG,EAAM/K,EAAQ4L,aAAc,OACjCb,EAAMA,EAAI1H,QAASyG,GAAYC,IAE/B/J,EAAQ6L,aAAc,KAAOd,EAAM7H,GAIpC+H,EAAS9E,EAAUpG,GACnB2B,EAAIuJ,EAAOpK,MACX,OAAQa,IACPuJ,EAAOvJ,GAAK,IAAMqJ,EAAM,IAAMe,GAAYb,EAAOvJ,GAElDwJ,GAAcD,EAAOc,KAAM,KAG3BZ,EAAa9B,EAASsC,KAAM5L,IAAciM,GAAahM,EAAQL,aAC9DK,EAGF,GAAKkL,EACJ,IAIC,MAHAzM,GAAKkD,MAAOiD,EACXuG,EAAWc,iBAAkBf,IAEvBtG,EACN,MAAQsH,IACR,QACInB,IAAQ7H,GACZlD,EAAQmM,gBAAiB,QAS/B,MAAO9F,GAAQtG,EAASsD,QAASlD,EAAO,MAAQH,EAAS4E,EAASiG,GASnE,QAAS1D,MACR,GAAIiF,KAEJ,SAASC,GAAOC,EAAKjH,GAMpB,MAJK+G,GAAK3N,KAAM6N,EAAM,KAAQtG,EAAKuG,mBAE3BF,GAAOD,EAAKI,SAEZH,EAAOC,EAAM,KAAQjH,EAE9B,MAAOgH,GAOR,QAASI,IAAcxM,GAEtB,MADAA,GAAIiD,IAAY,EACTjD,EAOR,QAASyM,IAAQzM,GAChB,GAAI0M,GAAK9O,EAAS0B,cAAc,WAEhC,KACC,QAASU,EAAI0M,GACZ,MAAOhC,GACR,OAAO,EACN,QAEIgC,EAAGhN,YACPgN,EAAGhN,WAAWC,YAAa+M,GAG5BA,EAAK,MASP,QAASC,IAAWC,EAAOC,GAC1B,GAAI3O,GAAM0O,EAAM/G,MAAM,KACrBpE,EAAIvD,EAAI0C,MAET,OAAQa,IACPsE,EAAK+G,WAAY5O,EAAIuD,IAAOoL,EAU9B,QAASE,IAAczF,EAAGC,GACzB,GAAIyF,GAAMzF,GAAKD,EACd2F,EAAOD,GAAsB,IAAf1F,EAAEmD,UAAiC,IAAflD,EAAEkD,UACnCnD,EAAE4F,YAAc3F,EAAE2F,WAGpB,IAAKD,EACJ,MAAOA,EAIR,IAAKD,EACJ,MAASA,EAAMA,EAAIG,YAClB,GAAKH,IAAQzF,EACZ,QAKH,OAAOD,GAAI,KAOZ,QAAS8F,IAAmB1J,GAC3B,MAAO,UAAUlC,GAChB,GAAIc,GAAOd,EAAK8C,SAASC,aACzB,OAAgB,UAATjC,GAAoBd,EAAKkC,OAASA,GAQ3C,QAAS2J,IAAoB3J,GAC5B,MAAO,UAAUlC,GAChB,GAAIc,GAAOd,EAAK8C,SAASC,aACzB,QAAiB,UAATjC,GAA6B,WAATA,IAAsBd,EAAKkC,OAASA,GAQlE,QAAS4J,IAAsBjD,GAI9B,MAAO,UAAU7I,GAGhB,MAAO,SAAWA,IAAQA,EAAK6I,WAAaA,GAC3C,QAAU7I,IAAQA,EAAK6I,WAAaA,GAGpC,QAAU7I,IAAQA,EAAK6I,YAAa,IAGnC7I,EAAK+L,aAAelD,GAIpB7I,EAAK+L,cAAgBlD,IACnB,SAAW7I,KAAS2I,GAAkB3I,MAAY6I,IASxD,QAASmD,IAAwBxN,GAChC,MAAOwM,IAAa,SAAUiB,GAE7B,MADAA,IAAYA,EACLjB,GAAa,SAAU5B,EAAM3F,GACnC,GAAIjD,GACH0L,EAAe1N,KAAQ4K,EAAKhK,OAAQ6M,GACpChM,EAAIiM,EAAa9M,MAGlB,OAAQa,IACFmJ,EAAO5I,EAAI0L,EAAajM,MAC5BmJ,EAAK5I,KAAOiD,EAAQjD,GAAK4I,EAAK5I,SAYnC,QAAS+J,IAAahM,GACrB,MAAOA,IAAmD,mBAAjCA,GAAQwL,sBAAwCxL,EAI1Ed,EAAU6G,GAAO7G,WAOjBgH,EAAQH,GAAOG,MAAQ,SAAUzE,GAGhC,GAAImM,GAAkBnM,IAASA,EAAK2J,eAAiB3J,GAAMmM,eAC3D,SAAOA,GAA+C,SAA7BA,EAAgBrJ,UAQ1CkC,EAAcV,GAAOU,YAAc,SAAUoH,GAC5C,GAAIC,GAAYC,EACf1O,EAAMwO,EAAOA,EAAKzC,eAAiByC,EAAO9G,CAG3C,OAAK1H,KAAQxB,GAA6B,IAAjBwB,EAAIqL,UAAmBrL,EAAIuO,iBAKpD/P,EAAWwB,EACXqH,EAAU7I,EAAS+P,gBACnBjH,GAAkBT,EAAOrI,GAIpBkJ,IAAiBlJ,IACpBkQ,EAAYlQ,EAASmQ,cAAgBD,EAAUE,MAAQF,IAGnDA,EAAUG,iBACdH,EAAUG,iBAAkB,SAAU/D,IAAe,GAG1C4D,EAAUI,aACrBJ,EAAUI,YAAa,WAAYhE,KAUrCjL,EAAQ6I,WAAa2E,GAAO,SAAUC,GAErC,MADAA,GAAGyB,UAAY,KACPzB,EAAGf,aAAa,eAOzB1M,EAAQsM,qBAAuBkB,GAAO,SAAUC,GAE/C,MADAA,GAAGjN,YAAa7B,EAASwQ,cAAc,MAC/B1B,EAAGnB,qBAAqB,KAAK3K,SAItC3B,EAAQuM,uBAAyBtC,EAAQwC,KAAM9N,EAAS4N,wBAMxDvM,EAAQoP,QAAU5B,GAAO,SAAUC,GAElC,MADAjG,GAAQhH,YAAaiN,GAAKpB,GAAKrI,GACvBrF,EAAS0Q,oBAAsB1Q,EAAS0Q,kBAAmBrL,GAAUrC,SAIzE3B,EAAQoP,SACZtI,EAAKwI,KAAS,GAAI,SAAUjD,EAAIvL,GAC/B,GAAuC,mBAA3BA,GAAQsL,gBAAkC3E,EAAiB,CACtE,GAAImE,GAAI9K,EAAQsL,eAAgBC,EAChC,OAAOT,IAAMA,QAGf9E,EAAKyI,OAAW,GAAI,SAAUlD,GAC7B,GAAImD,GAASnD,EAAGlI,QAASiG,EAAWC,GACpC,OAAO,UAAU9H,GAChB,MAAOA,GAAKmK,aAAa,QAAU8C,YAM9B1I,GAAKwI,KAAS,GAErBxI,EAAKyI,OAAW,GAAK,SAAUlD,GAC9B,GAAImD,GAASnD,EAAGlI,QAASiG,EAAWC,GACpC,OAAO,UAAU9H,GAChB,GAAIoM,GAAwC,mBAA1BpM,GAAKkN,kBACtBlN,EAAKkN,iBAAiB,KACvB,OAAOd,IAAQA,EAAKxI,QAAUqJ,KAMjC1I,EAAKwI,KAAU,IAAItP,EAAQsM,qBAC1B,SAAUoD,EAAK5O,GACd,MAA6C,mBAAjCA,GAAQwL,qBACZxL,EAAQwL,qBAAsBoD,GAG1B1P,EAAQwM,IACZ1L,EAAQiM,iBAAkB2C,GAD3B,QAKR,SAAUA,EAAK5O,GACd,GAAIyB,GACH+D,KACA9D,EAAI,EAEJkD,EAAU5E,EAAQwL,qBAAsBoD,EAGzC,IAAa,MAARA,EAAc,CAClB,MAASnN,EAAOmD,EAAQlD,KACA,IAAlBD,EAAKiJ,UACTlF,EAAI/G,KAAMgD,EAIZ,OAAO+D,GAER,MAAOZ,IAIToB,EAAKwI,KAAY,MAAItP,EAAQuM,wBAA0B,SAAU2C,EAAWpO,GAC3E,GAA+C,mBAAnCA,GAAQyL,wBAA0C9E,EAC7D,MAAO3G,GAAQyL,uBAAwB2C,IAUzCvH,KAOAD,MAEM1H,EAAQwM,IAAMvC,EAAQwC,KAAM9N,EAASoO,qBAG1CS,GAAO,SAAUC,GAMhBjG,EAAQhH,YAAaiN,GAAKkC,UAAY,UAAY3L,EAAU,qBAC1CA,EAAU,kEAOvByJ,EAAGV,iBAAiB,wBAAwBpL,QAChD+F,EAAUnI,KAAM,SAAWoJ,EAAa,gBAKnC8E,EAAGV,iBAAiB,cAAcpL,QACvC+F,EAAUnI,KAAM,MAAQoJ,EAAa,aAAeD,EAAW,KAI1D+E,EAAGV,iBAAkB,QAAU/I,EAAU,MAAOrC,QACrD+F,EAAUnI,KAAK,MAMVkO,EAAGV,iBAAiB,YAAYpL,QACrC+F,EAAUnI,KAAK,YAMVkO,EAAGV,iBAAkB,KAAO/I,EAAU,MAAOrC,QAClD+F,EAAUnI,KAAK,cAIjBiO,GAAO,SAAUC,GAChBA,EAAGkC,UAAY,mFAKf,IAAIC,GAAQjR,EAAS0B,cAAc,QACnCuP,GAAMjD,aAAc,OAAQ,UAC5Bc,EAAGjN,YAAaoP,GAAQjD,aAAc,OAAQ,KAIzCc,EAAGV,iBAAiB,YAAYpL,QACpC+F,EAAUnI,KAAM,OAASoJ,EAAa,eAKS,IAA3C8E,EAAGV,iBAAiB,YAAYpL,QACpC+F,EAAUnI,KAAM,WAAY,aAK7BiI,EAAQhH,YAAaiN,GAAKrC,UAAW,EACY,IAA5CqC,EAAGV,iBAAiB,aAAapL,QACrC+F,EAAUnI,KAAM,WAAY,aAI7BkO,EAAGV,iBAAiB,QACpBrF,EAAUnI,KAAK,YAIXS,EAAQ6P,gBAAkB5F,EAAQwC,KAAOzG,EAAUwB,EAAQxB,SAChEwB,EAAQsI,uBACRtI,EAAQuI,oBACRvI,EAAQwI,kBACRxI,EAAQyI,qBAERzC,GAAO,SAAUC,GAGhBzN,EAAQkQ,kBAAoBlK,EAAQjG,KAAM0N,EAAI,KAI9CzH,EAAQjG,KAAM0N,EAAI,aAClB9F,EAAcpI,KAAM,KAAMuJ,KAI5BpB,EAAYA,EAAU/F,QAAU,GAAIqH,QAAQtB,EAAUmF,KAAK,MAC3DlF,EAAgBA,EAAchG,QAAU,GAAIqH,QAAQrB,EAAckF,KAAK,MAIvE+B,EAAa3E,EAAQwC,KAAMjF,EAAQ2I,yBAKnCvI,EAAWgH,GAAc3E,EAAQwC,KAAMjF,EAAQI,UAC9C,SAAUS,EAAGC,GACZ,GAAI8H,GAAuB,IAAf/H,EAAEmD,SAAiBnD,EAAEqG,gBAAkBrG,EAClDgI,EAAM/H,GAAKA,EAAE7H,UACd,OAAO4H,KAAMgI,MAAWA,GAAwB,IAAjBA,EAAI7E,YAClC4E,EAAMxI,SACLwI,EAAMxI,SAAUyI,GAChBhI,EAAE8H,yBAA8D,GAAnC9H,EAAE8H,wBAAyBE,MAG3D,SAAUhI,EAAGC,GACZ,GAAKA,EACJ,MAASA,EAAIA,EAAE7H,WACd,GAAK6H,IAAMD,EACV,OAAO,CAIV,QAAO,GAOTD,EAAYwG,EACZ,SAAUvG,EAAGC,GAGZ,GAAKD,IAAMC,EAEV,MADAhB,IAAe,EACR,CAIR,IAAIgJ,IAAWjI,EAAE8H,yBAA2B7H,EAAE6H,uBAC9C,OAAKG,GACGA,GAIRA,GAAYjI,EAAE6D,eAAiB7D,MAAUC,EAAE4D,eAAiB5D,GAC3DD,EAAE8H,wBAAyB7H,GAG3B,EAGc,EAAVgI,IACFtQ,EAAQuQ,cAAgBjI,EAAE6H,wBAAyB9H,KAAQiI,EAGxDjI,IAAM1J,GAAY0J,EAAE6D,gBAAkBrE,GAAgBD,EAASC,EAAcQ,MAG7EC,IAAM3J,GAAY2J,EAAE4D,gBAAkBrE,GAAgBD,EAASC,EAAcS,GAC1E,EAIDjB,EACJ7H,EAAS6H,EAAWgB,GAAM7I,EAAS6H,EAAWiB,GAChD,EAGe,EAAVgI,KAAmB,IAE3B,SAAUjI,EAAGC,GAEZ,GAAKD,IAAMC,EAEV,MADAhB,IAAe,EACR,CAGR,IAAIyG,GACHvL,EAAI,EACJgO,EAAMnI,EAAE5H,WACR4P,EAAM/H,EAAE7H,WACRgQ,GAAOpI,GACPqI,GAAOpI,EAGR,KAAMkI,IAAQH,EACb,MAAOhI,KAAM1J,KACZ2J,IAAM3J,EAAW,EACjB6R,KACAH,EAAM,EACNhJ,EACE7H,EAAS6H,EAAWgB,GAAM7I,EAAS6H,EAAWiB,GAChD,CAGK,IAAKkI,IAAQH,EACnB,MAAOvC,IAAczF,EAAGC,EAIzByF,GAAM1F,CACN,OAAS0F,EAAMA,EAAItN,WAClBgQ,EAAGE,QAAS5C,EAEbA,GAAMzF,CACN,OAASyF,EAAMA,EAAItN,WAClBiQ,EAAGC,QAAS5C,EAIb,OAAQ0C,EAAGjO,KAAOkO,EAAGlO,GACpBA,GAGD,OAAOA,GAENsL,GAAc2C,EAAGjO,GAAIkO,EAAGlO,IAGxBiO,EAAGjO,KAAOqF,KACV6I,EAAGlO,KAAOqF,EAAe,EACzB,GAGKlJ,GAjXCA,GAoXTkI,GAAOb,QAAU,SAAU4K,EAAMC,GAChC,MAAOhK,IAAQ+J,EAAM,KAAM,KAAMC,IAGlChK,GAAOgJ,gBAAkB,SAAUtN,EAAMqO,GASxC,IAPOrO,EAAK2J,eAAiB3J,KAAW5D,GACvC4I,EAAahF,GAIdqO,EAAOA,EAAKzM,QAASgF,EAAkB,UAElCnJ,EAAQ6P,iBAAmBpI,IAC9BU,EAAeyI,EAAO,QACpBjJ,IAAkBA,EAAc8E,KAAMmE,OACtClJ,IAAkBA,EAAU+E,KAAMmE,IAErC,IACC,GAAI3O,GAAM+D,EAAQjG,KAAMwC,EAAMqO,EAG9B,IAAK3O,GAAOjC,EAAQkQ,mBAGlB3N,EAAK5D,UAAuC,KAA3B4D,EAAK5D,SAAS6M,SAChC,MAAOvJ,GAEP,MAAOwJ,IAGV,MAAO5E,IAAQ+J,EAAMjS,EAAU,MAAQ4D,IAASZ,OAAS,GAG1DkF,GAAOe,SAAW,SAAU9G,EAASyB,GAKpC,OAHOzB,EAAQoL,eAAiBpL,KAAcnC,GAC7C4I,EAAazG,GAEP8G,EAAU9G,EAASyB,IAG3BsE,GAAOiK,KAAO,SAAUvO,EAAMc,IAEtBd,EAAK2J,eAAiB3J,KAAW5D,GACvC4I,EAAahF,EAGd,IAAIxB,GAAK+F,EAAK+G,WAAYxK,EAAKiC,eAE9ByL,EAAMhQ,GAAMpB,EAAOI,KAAM+G,EAAK+G,WAAYxK,EAAKiC,eAC9CvE,EAAIwB,EAAMc,GAAOoE,GACjB1D,MAEF,OAAeA,UAARgN,EACNA,EACA/Q,EAAQ6I,aAAepB,EACtBlF,EAAKmK,aAAcrJ,IAClB0N,EAAMxO,EAAKkN,iBAAiBpM,KAAU0N,EAAIC,UAC1CD,EAAI5K,MACJ,MAGJU,GAAOoK,OAAS,SAAUC,GACzB,OAAQA,EAAM,IAAI/M,QAASyG,GAAYC,KAGxChE,GAAOxC,MAAQ,SAAUC,GACxB,KAAM,IAAIzF,OAAO,0CAA4CyF,IAO9DuC,GAAOsK,WAAa,SAAUzL,GAC7B,GAAInD,GACH6O,KACArO,EAAI,EACJP,EAAI,CAOL,IAJA8E,GAAgBtH,EAAQqR,iBACxBhK,GAAarH,EAAQsR,YAAc5L,EAAQrG,MAAO,GAClDqG,EAAQzC,KAAMmF,GAETd,EAAe,CACnB,MAAS/E,EAAOmD,EAAQlD,KAClBD,IAASmD,EAASlD,KACtBO,EAAIqO,EAAW7R,KAAMiD,GAGvB,OAAQO,IACP2C,EAAQxC,OAAQkO,EAAYrO,GAAK,GAQnC,MAFAsE,GAAY,KAEL3B,GAORqB,EAAUF,GAAOE,QAAU,SAAUxE,GACpC,GAAIoM,GACH1M,EAAM,GACNO,EAAI,EACJgJ,EAAWjJ,EAAKiJ,QAEjB,IAAMA,GAMC,GAAkB,IAAbA,GAA+B,IAAbA,GAA+B,KAAbA,EAAkB,CAGjE,GAAiC,gBAArBjJ,GAAKgP,YAChB,MAAOhP,GAAKgP,WAGZ,KAAMhP,EAAOA,EAAKiP,WAAYjP,EAAMA,EAAOA,EAAK2L,YAC/CjM,GAAO8E,EAASxE,OAGZ,IAAkB,IAAbiJ,GAA+B,IAAbA,EAC7B,MAAOjJ,GAAKkP,cAhBZ,OAAS9C,EAAOpM,EAAKC,KAEpBP,GAAO8E,EAAS4H,EAkBlB,OAAO1M,IAGR6E,EAAOD,GAAO6K,WAGbrE,YAAa,GAEbsE,aAAcpE,GAEdzB,MAAOxC,EAEPuE,cAEAyB,QAEAsC,UACCC,KAAOxG,IAAK,aAAc1I,OAAO,GACjCmP,KAAOzG,IAAK,cACZ0G,KAAO1G,IAAK,kBAAmB1I,OAAO,GACtCqP,KAAO3G,IAAK,oBAGb4G,WACCvI,KAAQ,SAAUoC,GAUjB,MATAA,GAAM,GAAKA,EAAM,GAAG3H,QAASiG,EAAWC,IAGxCyB,EAAM,IAAOA,EAAM,IAAMA,EAAM,IAAMA,EAAM,IAAM,IAAK3H,QAASiG,EAAWC,IAExD,OAAbyB,EAAM,KACVA,EAAM,GAAK,IAAMA,EAAM,GAAK,KAGtBA,EAAMzM,MAAO,EAAG,IAGxBuK,MAAS,SAAUkC,GA6BlB,MAlBAA,GAAM,GAAKA,EAAM,GAAGxG,cAEY,QAA3BwG,EAAM,GAAGzM,MAAO,EAAG,IAEjByM,EAAM,IACXjF,GAAOxC,MAAOyH,EAAM,IAKrBA,EAAM,KAAQA,EAAM,GAAKA,EAAM,IAAMA,EAAM,IAAM,GAAK,GAAmB,SAAbA,EAAM,IAA8B,QAAbA,EAAM,KACzFA,EAAM,KAAUA,EAAM,GAAKA,EAAM,IAAqB,QAAbA,EAAM,KAGpCA,EAAM,IACjBjF,GAAOxC,MAAOyH,EAAM,IAGdA,GAGRnC,OAAU,SAAUmC,GACnB,GAAIoG,GACHC,GAAYrG,EAAM,IAAMA,EAAM,EAE/B,OAAKxC,GAAiB,MAAEmD,KAAMX,EAAM,IAC5B,MAIHA,EAAM,GACVA,EAAM,GAAKA,EAAM,IAAMA,EAAM,IAAM,GAGxBqG,GAAY/I,EAAQqD,KAAM0F,KAEpCD,EAASjL,EAAUkL,GAAU,MAE7BD,EAASC,EAAS3S,QAAS,IAAK2S,EAASxQ,OAASuQ,GAAWC,EAASxQ,UAGvEmK,EAAM,GAAKA,EAAM,GAAGzM,MAAO,EAAG6S,GAC9BpG,EAAM,GAAKqG,EAAS9S,MAAO,EAAG6S,IAIxBpG,EAAMzM,MAAO,EAAG,MAIzBkQ,QAEC9F,IAAO,SAAU2I,GAChB,GAAI/M,GAAW+M,EAAiBjO,QAASiG,EAAWC,IAAY/E,aAChE,OAA4B,MAArB8M,EACN,WAAa,OAAO,GACpB,SAAU7P,GACT,MAAOA,GAAK8C,UAAY9C,EAAK8C,SAASC,gBAAkBD,IAI3DmE,MAAS,SAAU0F,GAClB,GAAImD,GAAUrK,EAAYkH,EAAY,IAEtC,OAAOmD,KACLA,EAAU,GAAIrJ,QAAQ,MAAQL,EAAa,IAAMuG,EAAY,IAAMvG,EAAa,SACjFX,EAAYkH,EAAW,SAAU3M,GAChC,MAAO8P,GAAQ5F,KAAgC,gBAAnBlK,GAAK2M,WAA0B3M,EAAK2M,WAA0C,mBAAtB3M,GAAKmK,cAAgCnK,EAAKmK,aAAa,UAAY,OAI1JhD,KAAQ,SAAUrG,EAAMiP,EAAUC,GACjC,MAAO,UAAUhQ,GAChB,GAAIiQ,GAAS3L,GAAOiK,KAAMvO,EAAMc,EAEhC,OAAe,OAAVmP,EACgB,OAAbF,GAEFA,IAINE,GAAU,GAEU,MAAbF,EAAmBE,IAAWD,EACvB,OAAbD,EAAoBE,IAAWD,EAClB,OAAbD,EAAoBC,GAAqC,IAA5BC,EAAOhT,QAAS+S,GAChC,OAAbD,EAAoBC,GAASC,EAAOhT,QAAS+S,MAChC,OAAbD,EAAoBC,GAASC,EAAOnT,OAAQkT,EAAM5Q,UAAa4Q,EAClD,OAAbD,GAAsB,IAAME,EAAOrO,QAAS4E,EAAa,KAAQ,KAAMvJ,QAAS+S,MACnE,OAAbD,IAAoBE,IAAWD,GAASC,EAAOnT,MAAO,EAAGkT,EAAM5Q,OAAS,KAAQ4Q,EAAQ,QAK3F3I,MAAS,SAAUnF,EAAMgO,EAAMjE,EAAU7L,EAAOE,GAC/C,GAAI6P,GAAgC,QAAvBjO,EAAKpF,MAAO,EAAG,GAC3BsT,EAA+B,SAArBlO,EAAKpF,UACfuT,EAAkB,YAATH,CAEV,OAAiB,KAAV9P,GAAwB,IAATE,EAGrB,SAAUN,GACT,QAASA,EAAK9B,YAGf,SAAU8B,EAAMzB,EAAS+R,GACxB,GAAI1F,GAAO2F,EAAaC,EAAYpE,EAAMqE,EAAWC,EACpD5H,EAAMqH,IAAWC,EAAU,cAAgB,kBAC3CO,EAAS3Q,EAAK9B,WACd4C,EAAOuP,GAAUrQ,EAAK8C,SAASC,cAC/B6N,GAAYN,IAAQD,EACpB5E,GAAO,CAER,IAAKkF,EAAS,CAGb,GAAKR,EAAS,CACb,MAAQrH,EAAM,CACbsD,EAAOpM,CACP,OAASoM,EAAOA,EAAMtD,GACrB,GAAKuH,EACJjE,EAAKtJ,SAASC,gBAAkBjC,EACd,IAAlBsL,EAAKnD,SAEL,OAAO,CAITyH,GAAQ5H,EAAe,SAAT5G,IAAoBwO,GAAS,cAE5C,OAAO,EAMR,GAHAA,GAAUN,EAAUO,EAAO1B,WAAa0B,EAAOE,WAG1CT,GAAWQ,EAAW,CAK1BxE,EAAOuE,EACPH,EAAapE,EAAM3K,KAAc2K,EAAM3K,OAIvC8O,EAAcC,EAAYpE,EAAK0E,YAC7BN,EAAYpE,EAAK0E,cAEnBlG,EAAQ2F,EAAarO,OACrBuO,EAAY7F,EAAO,KAAQrF,GAAWqF,EAAO,GAC7Ca,EAAOgF,GAAa7F,EAAO,GAC3BwB,EAAOqE,GAAaE,EAAO3H,WAAYyH,EAEvC,OAASrE,IAASqE,GAAarE,GAAQA,EAAMtD,KAG3C2C,EAAOgF,EAAY,IAAMC,EAAM1K,MAGhC,GAAuB,IAAlBoG,EAAKnD,YAAoBwC,GAAQW,IAASpM,EAAO,CACrDuQ,EAAarO,IAAWqD,EAASkL,EAAWhF,EAC5C,YAuBF,IAjBKmF,IAEJxE,EAAOpM,EACPwQ,EAAapE,EAAM3K,KAAc2K,EAAM3K,OAIvC8O,EAAcC,EAAYpE,EAAK0E,YAC7BN,EAAYpE,EAAK0E,cAEnBlG,EAAQ2F,EAAarO,OACrBuO,EAAY7F,EAAO,KAAQrF,GAAWqF,EAAO,GAC7Ca,EAAOgF,GAKHhF,KAAS,EAEb,MAASW,IAASqE,GAAarE,GAAQA,EAAMtD,KAC3C2C,EAAOgF,EAAY,IAAMC,EAAM1K,MAEhC,IAAOqK,EACNjE,EAAKtJ,SAASC,gBAAkBjC,EACd,IAAlBsL,EAAKnD,aACHwC,IAGGmF,IACJJ,EAAapE,EAAM3K,KAAc2K,EAAM3K,OAIvC8O,EAAcC,EAAYpE,EAAK0E,YAC7BN,EAAYpE,EAAK0E,cAEnBP,EAAarO,IAAWqD,EAASkG,IAG7BW,IAASpM,GACb,KASL,OADAyL,IAAQnL,EACDmL,IAASrL,GAAWqL,EAAOrL,IAAU,GAAKqL,EAAOrL,GAAS,KAKrEgH,OAAU,SAAU2J,EAAQ9E,GAK3B,GAAIjI,GACHxF,EAAK+F,EAAKgC,QAASwK,IAAYxM,EAAKyM,WAAYD,EAAOhO,gBACtDuB,GAAOxC,MAAO,uBAAyBiP,EAKzC,OAAKvS,GAAIiD,GACDjD,EAAIyN,GAIPzN,EAAGY,OAAS,GAChB4E,GAAS+M,EAAQA,EAAQ,GAAI9E,GACtB1H,EAAKyM,WAAW3T,eAAgB0T,EAAOhO,eAC7CiI,GAAa,SAAU5B,EAAM3F,GAC5B,GAAIwN,GACHC,EAAU1S,EAAI4K,EAAM6C,GACpBhM,EAAIiR,EAAQ9R,MACb,OAAQa,IACPgR,EAAMhU,EAASmM,EAAM8H,EAAQjR,IAC7BmJ,EAAM6H,KAAWxN,EAASwN,GAAQC,EAAQjR,MAG5C,SAAUD,GACT,MAAOxB,GAAIwB,EAAM,EAAGgE,KAIhBxF,IAIT+H,SAEC4K,IAAOnG,GAAa,SAAU1M,GAI7B,GAAI+O,MACHlK,KACAiO,EAAUzM,EAASrG,EAASsD,QAASlD,EAAO,MAE7C,OAAO0S,GAAS3P,GACfuJ,GAAa,SAAU5B,EAAM3F,EAASlF,EAAS+R,GAC9C,GAAItQ,GACHqR,EAAYD,EAAShI,EAAM,KAAMkH,MACjCrQ,EAAImJ,EAAKhK,MAGV,OAAQa,KACDD,EAAOqR,EAAUpR,MACtBmJ,EAAKnJ,KAAOwD,EAAQxD,GAAKD,MAI5B,SAAUA,EAAMzB,EAAS+R,GAKxB,MAJAjD,GAAM,GAAKrN,EACXoR,EAAS/D,EAAO,KAAMiD,EAAKnN,GAE3BkK,EAAM,GAAK,MACHlK,EAAQ6C,SAInBsL,IAAOtG,GAAa,SAAU1M,GAC7B,MAAO,UAAU0B,GAChB,MAAOsE,IAAQhG,EAAU0B,GAAOZ,OAAS,KAI3CiG,SAAY2F,GAAa,SAAUjN,GAElC,MADAA,GAAOA,EAAK6D,QAASiG,EAAWC,IACzB,SAAU9H,GAChB,OAASA,EAAKgP,aAAehP,EAAKuR,WAAa/M,EAASxE,IAAS/C,QAASc,SAW5EyT,KAAQxG,GAAc,SAAUwG,GAM/B,MAJM1K,GAAYoD,KAAKsH,GAAQ,KAC9BlN,GAAOxC,MAAO,qBAAuB0P,GAEtCA,EAAOA,EAAK5P,QAASiG,EAAWC,IAAY/E,cACrC,SAAU/C,GAChB,GAAIyR,EACJ,GACC,IAAMA,EAAWvM,EAChBlF,EAAKwR,KACLxR,EAAKmK,aAAa,aAAenK,EAAKmK,aAAa,QAGnD,MADAsH,GAAWA,EAAS1O,cACb0O,IAAaD,GAA2C,IAAnCC,EAASxU,QAASuU,EAAO,YAE5CxR,EAAOA,EAAK9B,aAAiC,IAAlB8B,EAAKiJ,SAC3C,QAAO,KAKT9H,OAAU,SAAUnB,GACnB,GAAI0R,GAAOnV,EAAOoV,UAAYpV,EAAOoV,SAASD,IAC9C,OAAOA,IAAQA,EAAK5U,MAAO,KAAQkD,EAAK8J,IAGzC8H,KAAQ,SAAU5R,GACjB,MAAOA,KAASiF,GAGjB4M,MAAS,SAAU7R,GAClB,MAAOA,KAAS5D,EAAS0V,iBAAmB1V,EAAS2V,UAAY3V,EAAS2V,gBAAkB/R,EAAKkC,MAAQlC,EAAKgS,OAAShS,EAAKiS,WAI7HC,QAAWpG,IAAsB,GACjCjD,SAAYiD,IAAsB,GAElCqG,QAAW,SAAUnS,GAGpB,GAAI8C,GAAW9C,EAAK8C,SAASC,aAC7B,OAAqB,UAAbD,KAA0B9C,EAAKmS,SAA0B,WAAbrP,KAA2B9C,EAAKoS,UAGrFA,SAAY,SAAUpS,GAOrB,MAJKA,GAAK9B,YACT8B,EAAK9B,WAAWmU,cAGVrS,EAAKoS,YAAa,GAI1BE,MAAS,SAAUtS,GAKlB,IAAMA,EAAOA,EAAKiP,WAAYjP,EAAMA,EAAOA,EAAK2L,YAC/C,GAAK3L,EAAKiJ,SAAW,EACpB,OAAO,CAGT,QAAO,GAGR0H,OAAU,SAAU3Q,GACnB,OAAQuE,EAAKgC,QAAe,MAAGvG,IAIhCuS,OAAU,SAAUvS,GACnB,MAAOyH,GAAQyC,KAAMlK,EAAK8C,WAG3BuK,MAAS,SAAUrN,GAClB,MAAOwH,GAAQ0C,KAAMlK,EAAK8C,WAG3B0P,OAAU,SAAUxS,GACnB,GAAIc,GAAOd,EAAK8C,SAASC,aACzB,OAAgB,UAATjC,GAAkC,WAAdd,EAAKkC,MAA8B,WAATpB,GAGtD/C,KAAQ,SAAUiC,GACjB,GAAIuO,EACJ,OAAuC,UAAhCvO,EAAK8C,SAASC,eACN,SAAd/C,EAAKkC,OAImC,OAArCqM,EAAOvO,EAAKmK,aAAa,UAA2C,SAAvBoE,EAAKxL,gBAIvD3C,MAAS4L,GAAuB,WAC/B,OAAS,KAGV1L,KAAQ0L,GAAuB,SAAUE,EAAc9M,GACtD,OAASA,EAAS,KAGnBiB,GAAM2L,GAAuB,SAAUE,EAAc9M,EAAQ6M,GAC5D,OAASA,EAAW,EAAIA,EAAW7M,EAAS6M,KAG7CwG,KAAQzG,GAAuB,SAAUE,EAAc9M,GAEtD,IADA,GAAIa,GAAI,EACAA,EAAIb,EAAQa,GAAK,EACxBiM,EAAalP,KAAMiD,EAEpB,OAAOiM,KAGRwG,IAAO1G,GAAuB,SAAUE,EAAc9M,GAErD,IADA,GAAIa,GAAI,EACAA,EAAIb,EAAQa,GAAK,EACxBiM,EAAalP,KAAMiD,EAEpB,OAAOiM,KAGRyG,GAAM3G,GAAuB,SAAUE,EAAc9M,EAAQ6M,GAE5D,IADA,GAAIhM,GAAIgM,EAAW,EAAIA,EAAW7M,EAAS6M,IACjChM,GAAK,GACdiM,EAAalP,KAAMiD,EAEpB,OAAOiM,KAGR0G,GAAM5G,GAAuB,SAAUE,EAAc9M,EAAQ6M,GAE5D,IADA,GAAIhM,GAAIgM,EAAW,EAAIA,EAAW7M,EAAS6M,IACjChM,EAAIb,GACb8M,EAAalP,KAAMiD,EAEpB,OAAOiM,OAKV3H,EAAKgC,QAAa,IAAIhC,EAAKgC,QAAY,EAGvC,KAAMtG,KAAO4S,OAAO,EAAMC,UAAU,EAAMC,MAAM,EAAMC,UAAU,EAAMC,OAAO,GAC5E1O,EAAKgC,QAAStG,GAAM2L,GAAmB3L,EAExC,KAAMA,KAAOiT,QAAQ,EAAMC,OAAO,GACjC5O,EAAKgC,QAAStG,GAAM4L,GAAoB5L,EAIzC,SAAS+Q,OACTA,GAAW/R,UAAYsF,EAAK6O,QAAU7O,EAAKgC,QAC3ChC,EAAKyM,WAAa,GAAIA,IAEtBtM,EAAWJ,GAAOI,SAAW,SAAUpG,EAAU+U,GAChD,GAAInC,GAAS3H,EAAO+J,EAAQpR,EAC3BqR,EAAO/J,EAAQgK,EACfC,EAAS9N,EAAYrH,EAAW,IAEjC,IAAKmV,EACJ,MAAOJ,GAAY,EAAII,EAAO3W,MAAO,EAGtCyW,GAAQjV,EACRkL,KACAgK,EAAajP,EAAKmL,SAElB,OAAQ6D,EAAQ,CAGTrC,KAAY3H,EAAQ7C,EAAOkD,KAAM2J,MACjChK,IAEJgK,EAAQA,EAAMzW,MAAOyM,EAAM,GAAGnK,SAAYmU,GAE3C/J,EAAOxM,KAAOsW,OAGfpC,GAAU,GAGJ3H,EAAQ5C,EAAaiD,KAAM2J,MAChCrC,EAAU3H,EAAMwB,QAChBuI,EAAOtW,MACN4G,MAAOsN,EAEPhP,KAAMqH,EAAM,GAAG3H,QAASlD,EAAO,OAEhC6U,EAAQA,EAAMzW,MAAOoU,EAAQ9R,QAI9B,KAAM8C,IAAQqC,GAAKyI,SACZzD,EAAQxC,EAAW7E,GAAO0H,KAAM2J,KAAcC,EAAYtR,MAC9DqH,EAAQiK,EAAYtR,GAAQqH,MAC7B2H,EAAU3H,EAAMwB,QAChBuI,EAAOtW,MACN4G,MAAOsN,EACPhP,KAAMA,EACNuB,QAAS8F,IAEVgK,EAAQA,EAAMzW,MAAOoU,EAAQ9R,QAI/B,KAAM8R,EACL,MAOF,MAAOmC,GACNE,EAAMnU,OACNmU,EACCjP,GAAOxC,MAAOxD,GAEdqH,EAAYrH,EAAUkL,GAAS1M,MAAO,GAGzC,SAASuN,IAAYiJ,GAIpB,IAHA,GAAIrT,GAAI,EACPM,EAAM+S,EAAOlU,OACbd,EAAW,GACJ2B,EAAIM,EAAKN,IAChB3B,GAAYgV,EAAOrT,GAAG2D,KAEvB,OAAOtF,GAGR,QAASsK,IAAewI,EAASsC,EAAYC,GAC5C,GAAI7K,GAAM4K,EAAW5K,IACpB8K,EAAOF,EAAW3K,KAClB8B,EAAM+I,GAAQ9K,EACd+K,EAAmBF,GAAgB,eAAR9I,EAC3BiJ,EAAWtO,GAEZ,OAAOkO,GAAWtT,MAEjB,SAAUJ,EAAMzB,EAAS+R,GACxB,MAAStQ,EAAOA,EAAM8I,GACrB,GAAuB,IAAlB9I,EAAKiJ,UAAkB4K,EAC3B,MAAOzC,GAASpR,EAAMzB,EAAS+R,IAMlC,SAAUtQ,EAAMzB,EAAS+R,GACxB,GAAIyD,GAAUxD,EAAaC,EAC1BwD,GAAazO,EAASuO,EAGvB,IAAKxD,GACJ,MAAStQ,EAAOA,EAAM8I,GACrB,IAAuB,IAAlB9I,EAAKiJ,UAAkB4K,IACtBzC,EAASpR,EAAMzB,EAAS+R,GAC5B,OAAO,MAKV,OAAStQ,EAAOA,EAAM8I,GACrB,GAAuB,IAAlB9I,EAAKiJ,UAAkB4K,EAO3B,GANArD,EAAaxQ,EAAMyB,KAAczB,EAAMyB,OAIvC8O,EAAcC,EAAYxQ,EAAK8Q,YAAeN,EAAYxQ,EAAK8Q,cAE1D8C,GAAQA,IAAS5T,EAAK8C,SAASC,cACnC/C,EAAOA,EAAM8I,IAAS9I,MAChB,CAAA,IAAM+T,EAAWxD,EAAa1F,KACpCkJ,EAAU,KAAQxO,GAAWwO,EAAU,KAAQD,EAG/C,MAAQE,GAAU,GAAMD,EAAU,EAMlC,IAHAxD,EAAa1F,GAAQmJ,EAGfA,EAAU,GAAM5C,EAASpR,EAAMzB,EAAS+R,GAC7C,OAAO,IASf,QAAS2D,IAAgBC,GACxB,MAAOA,GAAS9U,OAAS,EACxB,SAAUY,EAAMzB,EAAS+R,GACxB,GAAIrQ,GAAIiU,EAAS9U,MACjB,OAAQa,IACP,IAAMiU,EAASjU,GAAID,EAAMzB,EAAS+R,GACjC,OAAO,CAGT,QAAO,GAER4D,EAAS,GAGX,QAASC,IAAkB7V,EAAU8V,EAAUjR,GAG9C,IAFA,GAAIlD,GAAI,EACPM,EAAM6T,EAAShV,OACRa,EAAIM,EAAKN,IAChBqE,GAAQhG,EAAU8V,EAASnU,GAAIkD,EAEhC,OAAOA,GAGR,QAASkR,IAAUhD,EAAWtR,EAAKiN,EAAQzO,EAAS+R,GAOnD,IANA,GAAItQ,GACHsU,KACArU,EAAI,EACJM,EAAM8Q,EAAUjS,OAChBmV,EAAgB,MAAPxU,EAEFE,EAAIM,EAAKN,KACVD,EAAOqR,EAAUpR,MAChB+M,IAAUA,EAAQhN,EAAMzB,EAAS+R,KACtCgE,EAAatX,KAAMgD,GACduU,GACJxU,EAAI/C,KAAMiD,IAMd,OAAOqU,GAGR,QAASE,IAAY9E,EAAWpR,EAAU8S,EAASqD,EAAYC,EAAYC,GAO1E,MANKF,KAAeA,EAAYhT,KAC/BgT,EAAaD,GAAYC,IAErBC,IAAeA,EAAYjT,KAC/BiT,EAAaF,GAAYE,EAAYC,IAE/B3J,GAAa,SAAU5B,EAAMjG,EAAS5E,EAAS+R,GACrD,GAAIsE,GAAM3U,EAAGD,EACZ6U,KACAC,KACAC,EAAc5R,EAAQ/D,OAGtBK,EAAQ2J,GAAQ+K,GAAkB7V,GAAY,IAAKC,EAAQ0K,UAAa1K,GAAYA,MAGpFyW,GAAYtF,IAAetG,GAAS9K,EAEnCmB,EADA4U,GAAU5U,EAAOoV,EAAQnF,EAAWnR,EAAS+R,GAG9C2E,EAAa7D,EAEZsD,IAAgBtL,EAAOsG,EAAYqF,GAAeN,MAMjDtR,EACD6R,CAQF,IALK5D,GACJA,EAAS4D,EAAWC,EAAY1W,EAAS+R,GAIrCmE,EAAa,CACjBG,EAAOP,GAAUY,EAAYH,GAC7BL,EAAYG,KAAUrW,EAAS+R,GAG/BrQ,EAAI2U,EAAKxV,MACT,OAAQa,KACDD,EAAO4U,EAAK3U,MACjBgV,EAAYH,EAAQ7U,MAAS+U,EAAWF,EAAQ7U,IAAOD,IAK1D,GAAKoJ,GACJ,GAAKsL,GAAchF,EAAY,CAC9B,GAAKgF,EAAa,CAEjBE,KACA3U,EAAIgV,EAAW7V,MACf,OAAQa,KACDD,EAAOiV,EAAWhV,KAEvB2U,EAAK5X,KAAOgY,EAAU/U,GAAKD,EAG7B0U,GAAY,KAAOO,KAAkBL,EAAMtE,GAI5CrQ,EAAIgV,EAAW7V,MACf,OAAQa,KACDD,EAAOiV,EAAWhV,MACtB2U,EAAOF,EAAazX,EAASmM,EAAMpJ,GAAS6U,EAAO5U,SAEpDmJ,EAAKwL,KAAUzR,EAAQyR,GAAQ5U,SAOlCiV,GAAaZ,GACZY,IAAe9R,EACd8R,EAAWtU,OAAQoU,EAAaE,EAAW7V,QAC3C6V,GAEGP,EACJA,EAAY,KAAMvR,EAAS8R,EAAY3E,GAEvCtT,EAAKkD,MAAOiD,EAAS8R,KAMzB,QAASC,IAAmB5B,GAwB3B,IAvBA,GAAI6B,GAAc/D,EAAS5Q,EAC1BD,EAAM+S,EAAOlU,OACbgW,EAAkB7Q,EAAK8K,SAAUiE,EAAO,GAAGpR,MAC3CmT,EAAmBD,GAAmB7Q,EAAK8K,SAAS,KACpDpP,EAAImV,EAAkB,EAAI,EAG1BE,EAAe1M,GAAe,SAAU5I,GACvC,MAAOA,KAASmV,GACdE,GAAkB,GACrBE,EAAkB3M,GAAe,SAAU5I,GAC1C,MAAO/C,GAASkY,EAAcnV,OAC5BqV,GAAkB,GACrBnB,GAAa,SAAUlU,EAAMzB,EAAS+R,GACrC,GAAI5Q,IAAS0V,IAAqB9E,GAAO/R,IAAYsG,MACnDsQ,EAAe5W,GAAS0K,SACxBqM,EAActV,EAAMzB,EAAS+R,GAC7BiF,EAAiBvV,EAAMzB,EAAS+R,GAGlC,OADA6E,GAAe,KACRzV,IAGDO,EAAIM,EAAKN,IAChB,GAAMmR,EAAU7M,EAAK8K,SAAUiE,EAAOrT,GAAGiC,MACxCgS,GAAatL,GAAcqL,GAAgBC,GAAY9C,QACjD,CAIN,GAHAA,EAAU7M,EAAKyI,OAAQsG,EAAOrT,GAAGiC,MAAOhC,MAAO,KAAMoT,EAAOrT,GAAGwD,SAG1D2N,EAAS3P,GAAY,CAGzB,IADAjB,IAAMP,EACEO,EAAID,EAAKC,IAChB,GAAK+D,EAAK8K,SAAUiE,EAAO9S,GAAG0B,MAC7B,KAGF,OAAOsS,IACNvU,EAAI,GAAKgU,GAAgBC,GACzBjU,EAAI,GAAKoK,GAERiJ,EAAOxW,MAAO,EAAGmD,EAAI,GAAIlD,QAAS6G,MAAgC,MAAzB0P,EAAQrT,EAAI,GAAIiC,KAAe,IAAM,MAC7EN,QAASlD,EAAO,MAClB0S,EACAnR,EAAIO,GAAK0U,GAAmB5B,EAAOxW,MAAOmD,EAAGO,IAC7CA,EAAID,GAAO2U,GAAoB5B,EAASA,EAAOxW,MAAO0D,IACtDA,EAAID,GAAO8J,GAAYiJ,IAGzBY,EAASlX,KAAMoU,GAIjB,MAAO6C,IAAgBC,GAGxB,QAASsB,IAA0BC,EAAiBC,GACnD,GAAIC,GAAQD,EAAYtW,OAAS,EAChCwW,EAAYH,EAAgBrW,OAAS,EACrCyW,EAAe,SAAUzM,EAAM7K,EAAS+R,EAAKnN,EAAS2S,GACrD,GAAI9V,GAAMQ,EAAG4Q,EACZ2E,EAAe,EACf9V,EAAI,IACJoR,EAAYjI,MACZ4M,KACAC,EAAgBpR,EAEhBpF,EAAQ2J,GAAQwM,GAAarR,EAAKwI,KAAU,IAAG,IAAK+I,GAEpDI,EAAiB3Q,GAA4B,MAAjB0Q,EAAwB,EAAIvU,KAAKC,UAAY,GACzEpB,EAAMd,EAAML,MASb,KAPK0W,IACJjR,EAAmBtG,IAAYnC,GAAYmC,GAAWuX,GAM/C7V,IAAMM,GAA4B,OAApBP,EAAOP,EAAMQ,IAAaA,IAAM,CACrD,GAAK2V,GAAa5V,EAAO,CACxBQ,EAAI,EACEjC,GAAWyB,EAAK2J,gBAAkBvN,IACvC4I,EAAahF,GACbsQ,GAAOpL,EAER,OAASkM,EAAUqE,EAAgBjV,KAClC,GAAK4Q,EAASpR,EAAMzB,GAAWnC,EAAUkU,GAAO,CAC/CnN,EAAQnG,KAAMgD,EACd,OAGG8V,IACJvQ,EAAU2Q,GAKPP,KAEE3V,GAAQoR,GAAWpR,IACxB+V,IAII3M,GACJiI,EAAUrU,KAAMgD,IAgBnB,GATA+V,GAAgB9V,EASX0V,GAAS1V,IAAM8V,EAAe,CAClCvV,EAAI,CACJ,OAAS4Q,EAAUsE,EAAYlV,KAC9B4Q,EAASC,EAAW2E,EAAYzX,EAAS+R,EAG1C,IAAKlH,EAAO,CAEX,GAAK2M,EAAe,EACnB,MAAQ9V,IACAoR,EAAUpR,IAAM+V,EAAW/V,KACjC+V,EAAW/V,GAAK+F,EAAIxI,KAAM2F,GAM7B6S,GAAa3B,GAAU2B,GAIxBhZ,EAAKkD,MAAOiD,EAAS6S,GAGhBF,IAAc1M,GAAQ4M,EAAW5W,OAAS,GAC5C2W,EAAeL,EAAYtW,OAAW,GAExCkF,GAAOsK,WAAYzL,GAUrB,MALK2S,KACJvQ,EAAU2Q,EACVrR,EAAmBoR,GAGb5E,EAGT,OAAOsE,GACN3K,GAAc6K,GACdA,EAgLF,MA7KAlR,GAAUL,GAAOK,QAAU,SAAUrG,EAAUiL,GAC9C,GAAItJ,GACHyV,KACAD,KACAhC,EAAS7N,EAAetH,EAAW,IAEpC,KAAMmV,EAAS,CAERlK,IACLA,EAAQ7E,EAAUpG,IAEnB2B,EAAIsJ,EAAMnK,MACV,OAAQa,IACPwT,EAASyB,GAAmB3L,EAAMtJ,IAC7BwT,EAAQhS,GACZiU,EAAY1Y,KAAMyW,GAElBgC,EAAgBzY,KAAMyW,EAKxBA,GAAS7N,EAAetH,EAAUkX,GAA0BC,EAAiBC,IAG7EjC,EAAOnV,SAAWA,EAEnB,MAAOmV,IAYR7O,EAASN,GAAOM,OAAS,SAAUtG,EAAUC,EAAS4E,EAASiG,GAC9D,GAAInJ,GAAGqT,EAAQ6C,EAAOjU,EAAM6K,EAC3BqJ,EAA+B,kBAAb9X,IAA2BA,EAC7CiL,GAASH,GAAQ1E,EAAWpG,EAAW8X,EAAS9X,UAAYA,EAM7D,IAJA6E,EAAUA,MAIY,IAAjBoG,EAAMnK,OAAe,CAIzB,GADAkU,EAAS/J,EAAM,GAAKA,EAAM,GAAGzM,MAAO,GAC/BwW,EAAOlU,OAAS,GAAkC,QAA5B+W,EAAQ7C,EAAO,IAAIpR,MAC5CzE,EAAQoP,SAAgC,IAArBtO,EAAQ0K,UAAkB/D,GAC7CX,EAAK8K,SAAUiE,EAAO,GAAGpR,MAAS,CAGnC,GADA3D,GAAYgG,EAAKwI,KAAS,GAAGoJ,EAAM1S,QAAQ,GAAG7B,QAAQiG,EAAWC,IAAYvJ,QAAkB,IACzFA,EACL,MAAO4E,EAGIiT,KACX7X,EAAUA,EAAQL,YAGnBI,EAAWA,EAASxB,MAAOwW,EAAOvI,QAAQnH,MAAMxE,QAIjDa,EAAI8G,EAAwB,aAAEmD,KAAM5L,GAAa,EAAIgV,EAAOlU,MAC5D,OAAQa,IAAM,CAIb,GAHAkW,EAAQ7C,EAAOrT,GAGVsE,EAAK8K,SAAWnN,EAAOiU,EAAMjU,MACjC,KAED,KAAM6K,EAAOxI,EAAKwI,KAAM7K,MAEjBkH,EAAO2D,EACZoJ,EAAM1S,QAAQ,GAAG7B,QAASiG,EAAWC,IACrCF,EAASsC,KAAMoJ,EAAO,GAAGpR,OAAUqI,GAAahM,EAAQL,aAAgBK,IACpE,CAKJ,GAFA+U,EAAO3S,OAAQV,EAAG,GAClB3B,EAAW8K,EAAKhK,QAAUiL,GAAYiJ,IAChChV,EAEL,MADAtB,GAAKkD,MAAOiD,EAASiG,GACdjG,CAGR,SAeJ,OAPEiT,GAAYzR,EAASrG,EAAUiL,IAChCH,EACA7K,GACC2G,EACD/B,GACC5E,GAAWqJ,EAASsC,KAAM5L,IAAciM,GAAahM,EAAQL,aAAgBK,GAExE4E,GAMR1F,EAAQsR,WAAatN,EAAQ4C,MAAM,IAAI3D,KAAMmF,GAAYyE,KAAK,MAAQ7I,EAItEhE,EAAQqR,mBAAqB/J,EAG7BC,IAIAvH,EAAQuQ,aAAe/C,GAAO,SAAUC,GAEvC,MAA0E,GAAnEA,EAAG0C,wBAAyBxR,EAAS0B,cAAc,eAMrDmN,GAAO,SAAUC,GAEtB,MADAA,GAAGkC,UAAY,mBAC+B,MAAvClC,EAAG+D,WAAW9E,aAAa,WAElCgB,GAAW,yBAA0B,SAAUnL,EAAMc,EAAM2D,GAC1D,IAAMA,EACL,MAAOzE,GAAKmK,aAAcrJ,EAA6B,SAAvBA,EAAKiC,cAA2B,EAAI,KAOjEtF,EAAQ6I,YAAe2E,GAAO,SAAUC,GAG7C,MAFAA,GAAGkC,UAAY,WACflC,EAAG+D,WAAW7E,aAAc,QAAS,IACY,KAA1Cc,EAAG+D,WAAW9E,aAAc,YAEnCgB,GAAW,QAAS,SAAUnL,EAAMc,EAAM2D,GACzC,IAAMA,GAAyC,UAAhCzE,EAAK8C,SAASC,cAC5B,MAAO/C,GAAKqW,eAOTpL,GAAO,SAAUC,GACtB,MAAsC,OAA/BA,EAAGf,aAAa,eAEvBgB,GAAWhF,EAAU,SAAUnG,EAAMc,EAAM2D,GAC1C,GAAI+J,EACJ,KAAM/J,EACL,MAAOzE,GAAMc,MAAW,EAAOA,EAAKiC,eACjCyL,EAAMxO,EAAKkN,iBAAkBpM,KAAW0N,EAAIC,UAC7CD,EAAI5K,MACL,OAKGU,IAEH/H,EAIJ8B,GAAO0O,KAAOzI,EACdjG,EAAOgQ,KAAO/J,EAAO6K,UAGrB9Q,EAAOgQ,KAAM,KAAQhQ,EAAOgQ,KAAK9H,QACjClI,EAAOuQ,WAAavQ,EAAOiY,OAAShS,EAAOsK,WAC3CvQ,EAAON,KAAOuG,EAAOE,QACrBnG,EAAOkY,SAAWjS,EAAOG,MACzBpG,EAAOgH,SAAWf,EAAOe,SACzBhH,EAAOmY,eAAiBlS,EAAOoK,MAK/B,IAAI5F,GAAM,SAAU9I,EAAM8I,EAAK2N,GAC9B,GAAIvF,MACHwF,EAAqBlV,SAAViV,CAEZ,QAAUzW,EAAOA,EAAM8I,KAA6B,IAAlB9I,EAAKiJ,SACtC,GAAuB,IAAlBjJ,EAAKiJ,SAAiB,CAC1B,GAAKyN,GAAYrY,EAAQ2B,GAAO2W,GAAIF,GACnC,KAEDvF,GAAQlU,KAAMgD,GAGhB,MAAOkR,IAIJ0F,EAAW,SAAUC,EAAG7W,GAG3B,IAFA,GAAIkR,MAEI2F,EAAGA,EAAIA,EAAElL,YACI,IAAfkL,EAAE5N,UAAkB4N,IAAM7W,GAC9BkR,EAAQlU,KAAM6Z,EAIhB,OAAO3F,IAIJ4F,EAAgBzY,EAAOgQ,KAAK9E,MAAMhC,aAElCwP,EAAa,kEAIbC,EAAY,gBAGhB,SAASC,GAAQ3I,EAAU4I,EAAW/F,GACrC,GAAK9S,EAAOgD,WAAY6V,GACvB,MAAO7Y,GAAOiF,KAAMgL,EAAU,SAAUtO,EAAMC,GAC7C,QAASiX,EAAU1Z,KAAMwC,EAAMC,EAAGD,KAAWmR,GAK/C,IAAK+F,EAAUjO,SACd,MAAO5K,GAAOiF,KAAMgL,EAAU,SAAUtO,GACvC,MAASA,KAASkX,IAAgB/F,GAKpC,IAA0B,gBAAd+F,GAAyB,CACpC,GAAKF,EAAU9M,KAAMgN,GACpB,MAAO7Y,GAAO2O,OAAQkK,EAAW5I,EAAU6C,EAG5C+F,GAAY7Y,EAAO2O,OAAQkK,EAAW5I,GAGvC,MAAOjQ,GAAOiF,KAAMgL,EAAU,SAAUtO,GACvC,MAAS/C,GAAQO,KAAM0Z,EAAWlX,QAAkBmR,GAAyB,IAAlBnR,EAAKiJ,WAIlE5K,EAAO2O,OAAS,SAAUqB,EAAM5O,EAAO0R,GACtC,GAAInR,GAAOP,EAAO,EAMlB,OAJK0R,KACJ9C,EAAO,QAAUA,EAAO,KAGD,IAAjB5O,EAAML,QAAkC,IAAlBY,EAAKiJ,SACjC5K,EAAO0O,KAAKO,gBAAiBtN,EAAMqO,IAAWrO,MAC9C3B,EAAO0O,KAAKtJ,QAAS4K,EAAMhQ,EAAOiF,KAAM7D,EAAO,SAAUO,GACxD,MAAyB,KAAlBA,EAAKiJ,aAIf5K,EAAOG,GAAGoC,QACTmM,KAAM,SAAUzO,GACf,GAAI2B,GAAGP,EACNa,EAAM/D,KAAK4C,OACX+X,EAAO3a,IAER,IAAyB,gBAAb8B,GACX,MAAO9B,MAAKgD,UAAWnB,EAAQC,GAAW0O,OAAQ,WACjD,IAAM/M,EAAI,EAAGA,EAAIM,EAAKN,IACrB,GAAK5B,EAAOgH,SAAU8R,EAAMlX,GAAKzD,MAChC,OAAO,IAQX,KAFAkD,EAAMlD,KAAKgD,cAELS,EAAI,EAAGA,EAAIM,EAAKN,IACrB5B,EAAO0O,KAAMzO,EAAU6Y,EAAMlX,GAAKP,EAGnC,OAAOa,GAAM,EAAIlC,EAAOuQ,WAAYlP,GAAQA,GAE7CsN,OAAQ,SAAU1O,GACjB,MAAO9B,MAAKgD,UAAWyX,EAAQza,KAAM8B,OAAgB,KAEtD6S,IAAK,SAAU7S,GACd,MAAO9B,MAAKgD,UAAWyX,EAAQza,KAAM8B,OAAgB,KAEtDqY,GAAI,SAAUrY,GACb,QAAS2Y,EACRza,KAIoB,gBAAb8B,IAAyBwY,EAAc5M,KAAM5L,GACnDD,EAAQC,GACRA,OACD,GACCc,SASJ,IAAIgY,GAMHzP,EAAa,sCAEblJ,EAAOJ,EAAOG,GAAGC,KAAO,SAAUH,EAAUC,EAASqT,GACpD,GAAIrI,GAAOvJ,CAGX,KAAM1B,EACL,MAAO9B,KAQR,IAHAoV,EAAOA,GAAQwF,EAGU,gBAAb9Y,GAAwB,CAanC,GAPCiL,EALsB,MAAlBjL,EAAU,IACsB,MAApCA,EAAUA,EAASc,OAAS,IAC5Bd,EAASc,QAAU,GAGT,KAAMd,EAAU,MAGlBqJ,EAAWiC,KAAMtL,IAIrBiL,IAAWA,EAAO,IAAQhL,EA6CxB,OAAMA,GAAWA,EAAQW,QACtBX,GAAWqT,GAAO7E,KAAMzO,GAK1B9B,KAAK2C,YAAaZ,GAAUwO,KAAMzO,EAhDzC,IAAKiL,EAAO,GAAM,CAYjB,GAXAhL,EAAUA,YAAmBF,GAASE,EAAS,GAAMA,EAIrDF,EAAOsB,MAAOnD,KAAM6B,EAAOgZ,UAC1B9N,EAAO,GACPhL,GAAWA,EAAQ0K,SAAW1K,EAAQoL,eAAiBpL,EAAUnC,GACjE,IAII2a,EAAW7M,KAAMX,EAAO,KAASlL,EAAOiD,cAAe/C,GAC3D,IAAMgL,IAAShL,GAGTF,EAAOgD,WAAY7E,KAAM+M,IAC7B/M,KAAM+M,GAAShL,EAASgL,IAIxB/M,KAAK+R,KAAMhF,EAAOhL,EAASgL,GAK9B,OAAO/M,MAYP,MARAwD,GAAO5D,EAASyN,eAAgBN,EAAO,IAElCvJ,IAGJxD,KAAM,GAAMwD,EACZxD,KAAK4C,OAAS,GAER5C,KAcH,MAAK8B,GAAS2K,UACpBzM,KAAM,GAAM8B,EACZ9B,KAAK4C,OAAS,EACP5C,MAII6B,EAAOgD,WAAY/C,GACRkD,SAAfoQ,EAAK0F,MACX1F,EAAK0F,MAAOhZ,GAGZA,EAAUD,GAGLA,EAAO6E,UAAW5E,EAAU9B,MAIrCiC,GAAKQ,UAAYZ,EAAOG,GAGxB4Y,EAAa/Y,EAAQjC,EAGrB,IAAImb,GAAe,iCAGlBC,GACCC,UAAU,EACVC,UAAU,EACV3O,MAAM,EACN4O,MAAM,EAGRtZ,GAAOG,GAAGoC,QACT0Q,IAAK,SAAUnQ,GACd,GAAIyW,GAAUvZ,EAAQ8C,EAAQ3E,MAC7Bqb,EAAID,EAAQxY,MAEb,OAAO5C,MAAKwQ,OAAQ,WAEnB,IADA,GAAI/M,GAAI,EACAA,EAAI4X,EAAG5X,IACd,GAAK5B,EAAOgH,SAAU7I,KAAMob,EAAS3X,IACpC,OAAO,KAMX6X,QAAS,SAAU3I,EAAW5Q,GAC7B,GAAIiN,GACHvL,EAAI,EACJ4X,EAAIrb,KAAK4C,OACT8R,KACA0G,EAA+B,gBAAdzI,IAA0B9Q,EAAQ8Q,EAGpD,KAAM2H,EAAc5M,KAAMiF,GACzB,KAAQlP,EAAI4X,EAAG5X,IACd,IAAMuL,EAAMhP,KAAMyD,GAAKuL,GAAOA,IAAQjN,EAASiN,EAAMA,EAAItN,WAGxD,GAAKsN,EAAIvC,SAAW,KAAQ2O,EAC3BA,EAAQG,MAAOvM,MAGE,IAAjBA,EAAIvC,UACH5K,EAAO0O,KAAKO,gBAAiB9B,EAAK2D,IAAgB,CAEnD+B,EAAQlU,KAAMwO,EACd,OAMJ,MAAOhP,MAAKgD,UAAW0R,EAAQ9R,OAAS,EAAIf,EAAOuQ,WAAYsC,GAAYA,IAI5E6G,MAAO,SAAU/X,GAGhB,MAAMA,GAKe,gBAATA,GACJ/C,EAAQO,KAAMa,EAAQ2B,GAAQxD,KAAM,IAIrCS,EAAQO,KAAMhB,KAGpBwD,EAAKd,OAASc,EAAM,GAAMA,GAZjBxD,KAAM,IAAOA,KAAM,GAAI0B,WAAe1B,KAAK4D,QAAQ4X,UAAU5Y,WAgBxE6Y,IAAK,SAAU3Z,EAAUC,GACxB,MAAO/B,MAAKgD,UACXnB,EAAOuQ,WACNvQ,EAAOsB,MAAOnD,KAAK8C,MAAOjB,EAAQC,EAAUC,OAK/C2Z,QAAS,SAAU5Z,GAClB,MAAO9B,MAAKyb,IAAiB,MAAZ3Z,EAChB9B,KAAKoD,WAAapD,KAAKoD,WAAWoN,OAAQ1O,MAK7C,SAAS6Z,GAAS3M,EAAK1C,GACtB,OAAU0C,EAAMA,EAAK1C,KAA4B,IAAjB0C,EAAIvC,UACpC,MAAOuC,GAGRnN,EAAOwB,MACN8Q,OAAQ,SAAU3Q,GACjB,GAAI2Q,GAAS3Q,EAAK9B,UAClB,OAAOyS,IAA8B,KAApBA,EAAO1H,SAAkB0H,EAAS,MAEpDyH,QAAS,SAAUpY,GAClB,MAAO8I,GAAK9I,EAAM,eAEnBqY,aAAc,SAAUrY,EAAMC,EAAGwW,GAChC,MAAO3N,GAAK9I,EAAM,aAAcyW,IAEjC1N,KAAM,SAAU/I,GACf,MAAOmY,GAASnY,EAAM,gBAEvB2X,KAAM,SAAU3X,GACf,MAAOmY,GAASnY,EAAM,oBAEvBsY,QAAS,SAAUtY,GAClB,MAAO8I,GAAK9I,EAAM,gBAEnBgY,QAAS,SAAUhY,GAClB,MAAO8I,GAAK9I,EAAM,oBAEnBuY,UAAW,SAAUvY,EAAMC,EAAGwW,GAC7B,MAAO3N,GAAK9I,EAAM,cAAeyW,IAElC+B,UAAW,SAAUxY,EAAMC,EAAGwW,GAC7B,MAAO3N,GAAK9I,EAAM,kBAAmByW,IAEtCG,SAAU,SAAU5W,GACnB,MAAO4W,IAAY5W,EAAK9B,gBAAmB+Q,WAAYjP,IAExDyX,SAAU,SAAUzX,GACnB,MAAO4W,GAAU5W,EAAKiP,aAEvByI,SAAU,SAAU1X,GACnB,MAAOA,GAAKyY,iBAAmBpa,EAAOsB,SAAWK,EAAKgJ,cAErD,SAAUlI,EAAMtC,GAClBH,EAAOG,GAAIsC,GAAS,SAAU2V,EAAOnY,GACpC,GAAI4S,GAAU7S,EAAO0B,IAAKvD,KAAMgC,EAAIiY,EAuBpC,OArB0B,UAArB3V,EAAKhE,YACTwB,EAAWmY,GAGPnY,GAAgC,gBAAbA,KACvB4S,EAAU7S,EAAO2O,OAAQ1O,EAAU4S,IAG/B1U,KAAK4C,OAAS,IAGZoY,EAAkB1W,IACvBzC,EAAOuQ,WAAYsC,GAIfqG,EAAarN,KAAMpJ,IACvBoQ,EAAQwH,WAIHlc,KAAKgD,UAAW0R,KAGzB,IAAIyH,GAAY,MAKhB,SAASC,GAAe/X,GACvB,GAAIgY,KAIJ,OAHAxa,GAAOwB,KAAMgB,EAAQ0I,MAAOoP,OAAmB,SAAU5Q,EAAG+Q,GAC3DD,EAAQC,IAAS,IAEXD,EAyBRxa,EAAO0a,UAAY,SAAUlY,GAI5BA,EAA6B,gBAAZA,GAChB+X,EAAe/X,GACfxC,EAAOuC,UAAYC,EAEpB,IACCmY,GAGAC,EAGAC,EAGAC,EAGAjT,KAGAkT,KAGAC,KAGAC,EAAO,WAQN,IALAH,EAAStY,EAAQ0Y,KAIjBL,EAAQF,GAAS,EACTI,EAAMha,OAAQia,KAAmB,CACxCJ,EAASG,EAAMrO,OACf,SAAUsO,EAAcnT,EAAK9G,OAGvB8G,EAAMmT,GAAcnZ,MAAO+Y,EAAQ,GAAKA,EAAQ,OAAU,GAC9DpY,EAAQ2Y,cAGRH,EAAcnT,EAAK9G,OACnB6Z,GAAS,GAMNpY,EAAQoY,SACbA,GAAS,GAGVD,GAAS,EAGJG,IAIHjT,EADI+S,KAKG,KAMV9B,GAGCc,IAAK,WA2BJ,MA1BK/R,KAGC+S,IAAWD,IACfK,EAAcnT,EAAK9G,OAAS,EAC5Bga,EAAMpc,KAAMic,IAGb,QAAWhB,GAAKjU,GACf3F,EAAOwB,KAAMmE,EAAM,SAAU+D,EAAGpE,GAC1BtF,EAAOgD,WAAYsC,GACjB9C,EAAQyV,QAAWa,EAAK7F,IAAK3N,IAClCuC,EAAKlJ,KAAM2G,GAEDA,GAAOA,EAAIvE,QAAiC,WAAvBf,EAAO6D,KAAMyB,IAG7CsU,EAAKtU,MAGHxD,WAEA8Y,IAAWD,GACfM,KAGK9c,MAIRid,OAAQ,WAYP,MAXApb,GAAOwB,KAAMM,UAAW,SAAU4H,EAAGpE,GACpC,GAAIoU,EACJ,QAAUA,EAAQ1Z,EAAO+E,QAASO,EAAKuC,EAAM6R,OAC5C7R,EAAKvF,OAAQoX,EAAO,GAGfA,GAASsB,GACbA,MAII7c,MAKR8U,IAAK,SAAU9S,GACd,MAAOA,GACNH,EAAO+E,QAAS5E,EAAI0H,MACpBA,EAAK9G,OAAS,GAIhBkT,MAAO,WAIN,MAHKpM,KACJA,MAEM1J,MAMRkd,QAAS,WAGR,MAFAP,GAASC,KACTlT,EAAO+S,EAAS,GACTzc,MAERqM,SAAU,WACT,OAAQ3C,GAMTyT,KAAM,WAKL,MAJAR,GAASC,KACHH,GAAWD,IAChB9S,EAAO+S,EAAS,IAEVzc,MAER2c,OAAQ,WACP,QAASA,GAIVS,SAAU,SAAUrb,EAASyF,GAS5B,MARMmV,KACLnV,EAAOA,MACPA,GAASzF,EAASyF,EAAKlH,MAAQkH,EAAKlH,QAAUkH,GAC9CoV,EAAMpc,KAAMgH,GACNgV,GACLM,KAGK9c,MAIR8c,KAAM,WAEL,MADAnC,GAAKyC,SAAUpd,KAAM2D,WACd3D,MAIR0c,MAAO,WACN,QAASA,GAIZ,OAAO/B,GAIR,SAAS0C,GAAUC,GAClB,MAAOA,GAER,QAASC,GAASC,GACjB,KAAMA,GAGP,QAASC,GAAYrW,EAAOsW,EAASC,GACpC,GAAIC,EAEJ,KAGMxW,GAASvF,EAAOgD,WAAc+Y,EAASxW,EAAMyW,SACjDD,EAAO5c,KAAMoG,GAAQ4B,KAAM0U,GAAUI,KAAMH,GAGhCvW,GAASvF,EAAOgD,WAAc+Y,EAASxW,EAAM2W,MACxDH,EAAO5c,KAAMoG,EAAOsW,EAASC,GAO7BD,EAAQ1c,KAAMgE,OAAWoC,GAMzB,MAAQA,GAITuW,EAAO3c,KAAMgE,OAAWoC,IAI1BvF,EAAOuC,QAEN4Z,SAAU,SAAUC,GACnB,GAAIC,KAIA,SAAU,WAAYrc,EAAO0a,UAAW,UACzC1a,EAAO0a,UAAW,UAAY,IAC7B,UAAW,OAAQ1a,EAAO0a,UAAW,eACtC1a,EAAO0a,UAAW,eAAiB,EAAG,aACrC,SAAU,OAAQ1a,EAAO0a,UAAW,eACrC1a,EAAO0a,UAAW,eAAiB,EAAG,aAExC4B,EAAQ,UACRN,GACCM,MAAO,WACN,MAAOA,IAERC,OAAQ,WAEP,MADAC,GAASrV,KAAMrF,WAAYma,KAAMna,WAC1B3D,MAERse,QAAS,SAAUtc,GAClB,MAAO6b,GAAQE,KAAM,KAAM/b,IAI5Buc,KAAM,WACL,GAAIC,GAAM7a,SAEV,OAAO9B,GAAOmc,SAAU,SAAUS,GACjC5c,EAAOwB,KAAM6a,EAAQ,SAAUza,EAAGib,GAGjC,GAAI1c,GAAKH,EAAOgD,WAAY2Z,EAAKE,EAAO,MAAWF,EAAKE,EAAO,GAK/DL,GAAUK,EAAO,IAAO,WACvB,GAAIC,GAAW3c,GAAMA,EAAG0B,MAAO1D,KAAM2D,UAChCgb,IAAY9c,EAAOgD,WAAY8Z,EAASd,SAC5Cc,EAASd,UACPe,SAAUH,EAASI,QACnB7V,KAAMyV,EAASf,SACfI,KAAMW,EAASd,QAEjBc,EAAUC,EAAO,GAAM,QACtB1e,KACAgC,GAAO2c,GAAahb,eAKxB6a,EAAM,OACHX,WAELE,KAAM,SAAUe,EAAaC,EAAYC,GACxC,GAAIC,GAAW,CACf,SAASvB,GAASwB,EAAOb,EAAUxP,EAASsQ,GAC3C,MAAO,YACN,GAAIC,GAAOpf,KACVwH,EAAO7D,UACP0b,EAAa,WACZ,GAAIV,GAAUZ,CAKd,MAAKmB,EAAQD,GAAb,CAQA,GAJAN,EAAW9P,EAAQnL,MAAO0b,EAAM5X,GAI3BmX,IAAaN,EAASR,UAC1B,KAAM,IAAIyB,WAAW,2BAOtBvB,GAAOY,IAKgB,gBAAbA,IACY,kBAAbA,KACRA,EAASZ,KAGLlc,EAAOgD,WAAYkZ,GAGlBoB,EACJpB,EAAK/c,KACJ2d,EACAjB,EAASuB,EAAUZ,EAAUhB,EAAU8B,GACvCzB,EAASuB,EAAUZ,EAAUd,EAAS4B,KAOvCF,IAEAlB,EAAK/c,KACJ2d,EACAjB,EAASuB,EAAUZ,EAAUhB,EAAU8B,GACvCzB,EAASuB,EAAUZ,EAAUd,EAAS4B,GACtCzB,EAASuB,EAAUZ,EAAUhB,EAC5BgB,EAASkB,eASP1Q,IAAYwO,IAChB+B,EAAOpa,OACPwC,GAASmX,KAKRQ,GAAWd,EAASmB,aAAeJ,EAAM5X,MAK7CiY,EAAUN,EACTE,EACA,WACC,IACCA,IACC,MAAQ3S,GAEJ7K,EAAOmc,SAAS0B,eACpB7d,EAAOmc,SAAS0B,cAAehT,EAC9B+S,EAAQE,YAMLT,EAAQ,GAAKD,IAIZpQ,IAAY0O,IAChB6B,EAAOpa,OACPwC,GAASkF,IAGV2R,EAASuB,WAAYR,EAAM5X,KAS3B0X,GACJO,KAKK5d,EAAOmc,SAAS6B,eACpBJ,EAAQE,WAAa9d,EAAOmc,SAAS6B,gBAEtC9f,EAAO+f,WAAYL,KAKtB,MAAO5d,GAAOmc,SAAU,SAAUS,GAGjCP,EAAQ,GAAK,GAAIzC,IAChBiC,EACC,EACAe,EACA5c,EAAOgD,WAAYma,GAClBA,EACA3B,EACDoB,EAASc,aAKXrB,EAAQ,GAAK,GAAIzC,IAChBiC,EACC,EACAe,EACA5c,EAAOgD,WAAYia,GAClBA,EACAzB,IAKHa,EAAQ,GAAK,GAAIzC,IAChBiC,EACC,EACAe,EACA5c,EAAOgD,WAAYka,GAClBA,EACAxB,MAGAM,WAKLA,QAAS,SAAUpY,GAClB,MAAc,OAAPA,EAAc5D,EAAOuC,OAAQqB,EAAKoY,GAAYA,IAGvDQ,IA2DD,OAxDAxc,GAAOwB,KAAM6a,EAAQ,SAAUza,EAAGib,GACjC,GAAIhV,GAAOgV,EAAO,GACjBqB,EAAcrB,EAAO,EAKtBb,GAASa,EAAO,IAAQhV,EAAK+R,IAGxBsE,GACJrW,EAAK+R,IACJ,WAIC0C,EAAQ4B,GAKT7B,EAAQ,EAAIza,GAAK,GAAIyZ,QAGrBgB,EAAQ,GAAK,GAAIf,MAOnBzT,EAAK+R,IAAKiD,EAAO,GAAI5B,MAKrBuB,EAAUK,EAAO,IAAQ,WAExB,MADAL,GAAUK,EAAO,GAAM,QAAU1e,OAASqe,EAAWrZ,OAAYhF,KAAM2D,WAChE3D,MAMRqe,EAAUK,EAAO,GAAM,QAAWhV,EAAK0T,WAIxCS,EAAQA,QAASQ,GAGZJ,GACJA,EAAKjd,KAAMqd,EAAUA,GAIfA,GAIR2B,KAAM,SAAUC,GACf,GAGCC,GAAYvc,UAAUf,OAGtBa,EAAIyc,EAGJC,EAAkBxa,MAAOlC,GACzB2c,EAAgB9f,EAAMU,KAAM2C,WAG5B0c,EAASxe,EAAOmc,WAGhBsC,EAAa,SAAU7c,GACtB,MAAO,UAAU2D,GAChB+Y,EAAiB1c,GAAMzD,KACvBogB,EAAe3c,GAAME,UAAUf,OAAS,EAAItC,EAAMU,KAAM2C,WAAcyD,IAC5D8Y,GACTG,EAAOb,YAAaW,EAAiBC,IAMzC,IAAKF,GAAa,IACjBzC,EAAYwC,EAAaI,EAAOrX,KAAMsX,EAAY7c,IAAMia,QAAS2C,EAAO1C,QAGhD,YAAnB0C,EAAOlC,SACXtc,EAAOgD,WAAYub,EAAe3c,IAAO2c,EAAe3c,GAAIsa,OAE5D,MAAOsC,GAAOtC,MAKhB,OAAQta,IACPga,EAAY2C,EAAe3c,GAAK6c,EAAY7c,GAAK4c,EAAO1C,OAGzD,OAAO0C,GAAOxC,YAOhB,IAAI0C,GAAc,wDAElB1e,GAAOmc,SAAS0B,cAAgB,SAAUpa,EAAOkb,GAI3CzgB,EAAO0gB,SAAW1gB,EAAO0gB,QAAQC,MAAQpb,GAASib,EAAY7S,KAAMpI,EAAMhB,OAC9EvE,EAAO0gB,QAAQC,KAAM,8BAAgCpb,EAAMqb,QAASrb,EAAMkb,MAAOA,IAOnF3e,EAAO+e,eAAiB,SAAUtb,GACjCvF,EAAO+f,WAAY,WAClB,KAAMxa,KAQR,IAAIub,GAAYhf,EAAOmc,UAEvBnc,GAAOG,GAAG8Y,MAAQ,SAAU9Y,GAY3B,MAVA6e,GACE9C,KAAM/b,GADR6e,SAMS,SAAUvb,GACjBzD,EAAO+e,eAAgBtb,KAGlBtF,MAGR6B,EAAOuC,QAGNiB,SAAS,EAITyb,UAAW,EAGXC,UAAW,SAAUC,GACfA,EACJnf,EAAOif,YAEPjf,EAAOiZ,OAAO,IAKhBA,MAAO,SAAUmG,IAGXA,KAAS,IAASpf,EAAOif,UAAYjf,EAAOwD,WAKjDxD,EAAOwD,SAAU,EAGZ4b,KAAS,KAAUpf,EAAOif,UAAY,GAK3CD,EAAUrB,YAAa5f,GAAYiC,QAIrCA,EAAOiZ,MAAMiD,KAAO8C,EAAU9C,IAG9B,SAASmD,KACRthB,EAASuhB,oBAAqB,mBAAoBD,GAClDnhB,EAAOohB,oBAAqB,OAAQD,GACpCrf,EAAOiZ,QAOqB,aAAxBlb,EAASwhB,YACa,YAAxBxhB,EAASwhB,aAA6BxhB,EAAS+P,gBAAgB0R,SAGjEthB,EAAO+f,WAAYje,EAAOiZ,QAK1Blb,EAASqQ,iBAAkB,mBAAoBiR,GAG/CnhB,EAAOkQ,iBAAkB,OAAQiR,GAQlC,IAAII,GAAS,SAAUre,EAAOjB,EAAIqM,EAAKjH,EAAOma,EAAWC,EAAUC,GAClE,GAAIhe,GAAI,EACPM,EAAMd,EAAML,OACZ8e,EAAc,MAAPrT,CAGR,IAA4B,WAAvBxM,EAAO6D,KAAM2I,GAAqB,CACtCkT,GAAY,CACZ,KAAM9d,IAAK4K,GACViT,EAAQre,EAAOjB,EAAIyB,EAAG4K,EAAK5K,IAAK,EAAM+d,EAAUC,OAI3C,IAAezc,SAAVoC,IACXma,GAAY;AAEN1f,EAAOgD,WAAYuC,KACxBqa,GAAM,GAGFC,IAGCD,GACJzf,EAAGhB,KAAMiC,EAAOmE,GAChBpF,EAAK,OAIL0f,EAAO1f,EACPA,EAAK,SAAUwB,EAAM6K,EAAKjH,GACzB,MAAOsa,GAAK1gB,KAAMa,EAAQ2B,GAAQ4D,MAKhCpF,GACJ,KAAQyB,EAAIM,EAAKN,IAChBzB,EACCiB,EAAOQ,GAAK4K,EAAKoT,EACjBra,EACAA,EAAMpG,KAAMiC,EAAOQ,GAAKA,EAAGzB,EAAIiB,EAAOQ,GAAK4K,IAM/C,OAAOkT,GACNte,EAGAye,EACC1f,EAAGhB,KAAMiC,GACTc,EAAM/B,EAAIiB,EAAO,GAAKoL,GAAQmT,GAE7BG,EAAa,SAAUC,GAQ1B,MAA0B,KAAnBA,EAAMnV,UAAqC,IAAnBmV,EAAMnV,YAAsBmV,EAAMnV,SAMlE,SAASoV,KACR7hB,KAAKiF,QAAUpD,EAAOoD,QAAU4c,EAAKC,MAGtCD,EAAKC,IAAM,EAEXD,EAAKpf,WAEJ2L,MAAO,SAAUwT,GAGhB,GAAIxa,GAAQwa,EAAO5hB,KAAKiF,QA4BxB,OAzBMmC,KACLA,KAKKua,EAAYC,KAIXA,EAAMnV,SACVmV,EAAO5hB,KAAKiF,SAAYmC,EAMxBhH,OAAO2hB,eAAgBH,EAAO5hB,KAAKiF,SAClCmC,MAAOA,EACP4a,cAAc,MAMX5a,GAER6a,IAAK,SAAUL,EAAOM,EAAM9a,GAC3B,GAAI+a,GACH/T,EAAQpO,KAAKoO,MAAOwT,EAIrB,IAAqB,gBAATM,GACX9T,EAAOvM,EAAOuE,UAAW8b,IAAW9a,MAMpC,KAAM+a,IAAQD,GACb9T,EAAOvM,EAAOuE,UAAW+b,IAAWD,EAAMC,EAG5C,OAAO/T,IAERtL,IAAK,SAAU8e,EAAOvT,GACrB,MAAerJ,UAARqJ,EACNrO,KAAKoO,MAAOwT,GAGZA,EAAO5hB,KAAKiF,UAAa2c,EAAO5hB,KAAKiF,SAAWpD,EAAOuE,UAAWiI,KAEpEiT,OAAQ,SAAUM,EAAOvT,EAAKjH,GAa7B,MAAapC,UAARqJ,GACCA,GAAsB,gBAARA,IAAgCrJ,SAAVoC,EAElCpH,KAAK8C,IAAK8e,EAAOvT,IASzBrO,KAAKiiB,IAAKL,EAAOvT,EAAKjH,GAILpC,SAAVoC,EAAsBA,EAAQiH,IAEtC4O,OAAQ,SAAU2E,EAAOvT,GACxB,GAAI5K,GACH2K,EAAQwT,EAAO5hB,KAAKiF,QAErB,IAAeD,SAAVoJ,EAAL,CAIA,GAAapJ,SAARqJ,EAAoB,CAGnBxM,EAAOkD,QAASsJ,GAIpBA,EAAMA,EAAI9K,IAAK1B,EAAOuE,YAEtBiI,EAAMxM,EAAOuE,UAAWiI,GAIxBA,EAAMA,IAAOD,IACVC,GACAA,EAAItB,MAAOoP,QAGf1Y,EAAI4K,EAAIzL,MAER,OAAQa,UACA2K,GAAOC,EAAK5K,KAKRuB,SAARqJ,GAAqBxM,EAAOqE,cAAekI,MAM1CwT,EAAMnV,SACVmV,EAAO5hB,KAAKiF,SAAYD,aAEjB4c,GAAO5hB,KAAKiF,YAItBmd,QAAS,SAAUR,GAClB,GAAIxT,GAAQwT,EAAO5hB,KAAKiF,QACxB,OAAiBD,UAAVoJ,IAAwBvM,EAAOqE,cAAekI,IAGvD,IAAIiU,GAAW,GAAIR,GAEfS,EAAW,GAAIT,GAcfU,EAAS,gCACZC,EAAa,QAEd,SAASC,GAAUjf,EAAM6K,EAAK6T,GAC7B,GAAI5d,EAIJ,IAAcU,SAATkd,GAAwC,IAAlB1e,EAAKiJ,SAI/B,GAHAnI,EAAO,QAAU+J,EAAIjJ,QAASod,EAAY,OAAQjc,cAClD2b,EAAO1e,EAAKmK,aAAcrJ,GAEL,gBAAT4d,GAAoB,CAC/B,IACCA,EAAgB,SAATA,GACG,UAATA,IACS,SAATA,EAAkB,MAGjBA,EAAO,KAAOA,GAAQA,EACvBK,EAAO7U,KAAMwU,GAASQ,KAAKC,MAAOT,GAClCA,GACA,MAAQxV,IAGV4V,EAASL,IAAKze,EAAM6K,EAAK6T,OAEzBA,GAAOld,MAGT,OAAOkd,GAGRrgB,EAAOuC,QACNge,QAAS,SAAU5e,GAClB,MAAO8e,GAASF,QAAS5e,IAAU6e,EAASD,QAAS5e,IAGtD0e,KAAM,SAAU1e,EAAMc,EAAM4d,GAC3B,MAAOI,GAAShB,OAAQ9d,EAAMc,EAAM4d,IAGrCU,WAAY,SAAUpf,EAAMc,GAC3Bge,EAASrF,OAAQzZ,EAAMc,IAKxBue,MAAO,SAAUrf,EAAMc,EAAM4d,GAC5B,MAAOG,GAASf,OAAQ9d,EAAMc,EAAM4d,IAGrCY,YAAa,SAAUtf,EAAMc,GAC5B+d,EAASpF,OAAQzZ,EAAMc,MAIzBzC,EAAOG,GAAGoC,QACT8d,KAAM,SAAU7T,EAAKjH,GACpB,GAAI3D,GAAGa,EAAM4d,EACZ1e,EAAOxD,KAAM,GACb4O,EAAQpL,GAAQA,EAAKsG,UAGtB,IAAa9E,SAARqJ,EAAoB,CACxB,GAAKrO,KAAK4C,SACTsf,EAAOI,EAASxf,IAAKU,GAEE,IAAlBA,EAAKiJ,WAAmB4V,EAASvf,IAAKU,EAAM,iBAAmB,CACnEC,EAAImL,EAAMhM,MACV,OAAQa,IAIFmL,EAAOnL,KACXa,EAAOsK,EAAOnL,GAAIa,KACe,IAA5BA,EAAK7D,QAAS,WAClB6D,EAAOzC,EAAOuE,UAAW9B,EAAKhE,MAAO,IACrCmiB,EAAUjf,EAAMc,EAAM4d,EAAM5d,KAI/B+d,GAASJ,IAAKze,EAAM,gBAAgB,GAItC,MAAO0e,GAIR,MAAoB,gBAAR7T,GACJrO,KAAKqD,KAAM,WACjBif,EAASL,IAAKjiB,KAAMqO,KAIfiT,EAAQthB,KAAM,SAAUoH,GAC9B,GAAI8a,EAOJ,IAAK1e,GAAkBwB,SAAVoC,EAAb,CAKC,GADA8a,EAAOI,EAASxf,IAAKU,EAAM6K,GACbrJ,SAATkd,EACJ,MAAOA,EAMR,IADAA,EAAOO,EAAUjf,EAAM6K,GACTrJ,SAATkd,EACJ,MAAOA,OAQTliB,MAAKqD,KAAM,WAGVif,EAASL,IAAKjiB,KAAMqO,EAAKjH,MAExB,KAAMA,EAAOzD,UAAUf,OAAS,EAAG,MAAM,IAG7CggB,WAAY,SAAUvU,GACrB,MAAOrO,MAAKqD,KAAM,WACjBif,EAASrF,OAAQjd,KAAMqO,QAM1BxM,EAAOuC,QACNwY,MAAO,SAAUpZ,EAAMkC,EAAMwc,GAC5B,GAAItF,EAEJ,IAAKpZ,EAYJ,MAXAkC,IAASA,GAAQ,MAAS,QAC1BkX,EAAQyF,EAASvf,IAAKU,EAAMkC,GAGvBwc,KACEtF,GAAS/a,EAAOkD,QAASmd,GAC9BtF,EAAQyF,EAASf,OAAQ9d,EAAMkC,EAAM7D,EAAO6E,UAAWwb,IAEvDtF,EAAMpc,KAAM0hB,IAGPtF,OAITmG,QAAS,SAAUvf,EAAMkC,GACxBA,EAAOA,GAAQ,IAEf,IAAIkX,GAAQ/a,EAAO+a,MAAOpZ,EAAMkC,GAC/Bsd,EAAcpG,EAAMha,OACpBZ,EAAK4a,EAAMrO,QACX0U,EAAQphB,EAAOqhB,YAAa1f,EAAMkC,GAClC6G,EAAO,WACN1K,EAAOkhB,QAASvf,EAAMkC,GAIZ,gBAAP1D,IACJA,EAAK4a,EAAMrO,QACXyU,KAGIhhB,IAIU,OAAT0D,GACJkX,EAAMhL,QAAS,oBAITqR,GAAME,KACbnhB,EAAGhB,KAAMwC,EAAM+I,EAAM0W,KAGhBD,GAAeC,GACpBA,EAAMnN,MAAMgH,QAKdoG,YAAa,SAAU1f,EAAMkC,GAC5B,GAAI2I,GAAM3I,EAAO,YACjB,OAAO2c,GAASvf,IAAKU,EAAM6K,IAASgU,EAASf,OAAQ9d,EAAM6K,GAC1DyH,MAAOjU,EAAO0a,UAAW,eAAgBd,IAAK,WAC7C4G,EAASpF,OAAQzZ,GAAQkC,EAAO,QAAS2I,WAM7CxM,EAAOG,GAAGoC,QACTwY,MAAO,SAAUlX,EAAMwc,GACtB,GAAIkB,GAAS,CAQb,OANqB,gBAAT1d,KACXwc,EAAOxc,EACPA,EAAO,KACP0d,KAGIzf,UAAUf,OAASwgB,EAChBvhB,EAAO+a,MAAO5c,KAAM,GAAK0F,GAGjBV,SAATkd,EACNliB,KACAA,KAAKqD,KAAM,WACV,GAAIuZ,GAAQ/a,EAAO+a,MAAO5c,KAAM0F,EAAMwc,EAGtCrgB,GAAOqhB,YAAaljB,KAAM0F,GAEZ,OAATA,GAAgC,eAAfkX,EAAO,IAC5B/a,EAAOkhB,QAAS/iB,KAAM0F,MAI1Bqd,QAAS,SAAUrd,GAClB,MAAO1F,MAAKqD,KAAM,WACjBxB,EAAOkhB,QAAS/iB,KAAM0F,MAGxB2d,WAAY,SAAU3d,GACrB,MAAO1F,MAAK4c,MAAOlX,GAAQ,UAK5BmY,QAAS,SAAUnY,EAAMD,GACxB,GAAI8B,GACH+b,EAAQ,EACRC,EAAQ1hB,EAAOmc,WACflM,EAAW9R,KACXyD,EAAIzD,KAAK4C,OACT8a,EAAU,aACC4F,GACTC,EAAM/D,YAAa1N,GAAYA,IAIb,iBAATpM,KACXD,EAAMC,EACNA,EAAOV,QAERU,EAAOA,GAAQ,IAEf,OAAQjC,IACP8D,EAAM8a,EAASvf,IAAKgP,EAAUrO,GAAKiC,EAAO,cACrC6B,GAAOA,EAAIuO,QACfwN,IACA/b,EAAIuO,MAAM2F,IAAKiC,GAIjB,OADAA,KACO6F,EAAM1F,QAASpY,KAGxB,IAAI+d,GAAO,sCAA0CC,OAEjDC,EAAU,GAAIzZ,QAAQ,iBAAmBuZ,EAAO,cAAe,KAG/DG,IAAc,MAAO,QAAS,SAAU,QAExCC,GAAqB,SAAUpgB,EAAMkL,GAOvC,MAHAlL,GAAOkL,GAAMlL,EAGiB,SAAvBA,EAAKqgB,MAAMC,SACM,KAAvBtgB,EAAKqgB,MAAMC,SAMXjiB,EAAOgH,SAAUrF,EAAK2J,cAAe3J,IAEH,SAAlC3B,EAAOkiB,IAAKvgB,EAAM,YAGjBwgB,GAAO,SAAUxgB,EAAMa,EAASf,EAAUkE,GAC7C,GAAItE,GAAKoB,EACR2f,IAGD,KAAM3f,IAAQD,GACb4f,EAAK3f,GAASd,EAAKqgB,MAAOvf,GAC1Bd,EAAKqgB,MAAOvf,GAASD,EAASC,EAG/BpB,GAAMI,EAASI,MAAOF,EAAMgE,MAG5B,KAAMlD,IAAQD,GACbb,EAAKqgB,MAAOvf,GAAS2f,EAAK3f,EAG3B,OAAOpB,GAMR,SAASghB,IAAW1gB,EAAM2e,EAAMgC,EAAYC,GAC3C,GAAIC,GACHC,EAAQ,EACRC,EAAgB,GAChBC,EAAeJ,EACd,WACC,MAAOA,GAAMpV,OAEd,WACC,MAAOnN,GAAOkiB,IAAKvgB,EAAM2e,EAAM,KAEjCsC,EAAUD,IACVE,EAAOP,GAAcA,EAAY,KAAStiB,EAAO8iB,UAAWxC,GAAS,GAAK,MAG1EyC,GAAkB/iB,EAAO8iB,UAAWxC,IAAmB,OAATuC,IAAkBD,IAC/Df,EAAQtW,KAAMvL,EAAOkiB,IAAKvgB,EAAM2e,GAElC,IAAKyC,GAAiBA,EAAe,KAAQF,EAAO,CAGnDA,EAAOA,GAAQE,EAAe,GAG9BT,EAAaA,MAGbS,GAAiBH,GAAW,CAE5B,GAICH,GAAQA,GAAS,KAGjBM,GAAgCN,EAChCziB,EAAOgiB,MAAOrgB,EAAM2e,EAAMyC,EAAgBF,SAK1CJ,KAAYA,EAAQE,IAAiBC,IAAuB,IAAVH,KAAiBC,GAiBrE,MAbKJ,KACJS,GAAiBA,IAAkBH,GAAW,EAG9CJ,EAAWF,EAAY,GACtBS,GAAkBT,EAAY,GAAM,GAAMA,EAAY,IACrDA,EAAY,GACTC,IACJA,EAAMM,KAAOA,EACbN,EAAMlQ,MAAQ0Q,EACdR,EAAMngB,IAAMogB,IAGPA,EAIR,GAAIQ,MAEJ,SAASC,IAAmBthB,GAC3B,GAAI4U,GACHhX,EAAMoC,EAAK2J,cACX7G,EAAW9C,EAAK8C,SAChBwd,EAAUe,GAAmBve,EAE9B,OAAKwd,GACGA,GAGR1L,EAAOhX,EAAI2jB,KAAKtjB,YAAaL,EAAIE,cAAegF,IAChDwd,EAAUjiB,EAAOkiB,IAAK3L,EAAM,WAE5BA,EAAK1W,WAAWC,YAAayW,GAEZ,SAAZ0L,IACJA,EAAU,SAEXe,GAAmBve,GAAawd,EAEzBA,GAGR,QAASkB,IAAUlT,EAAUmT,GAO5B,IANA,GAAInB,GAAStgB,EACZ0hB,KACA3J,EAAQ,EACR3Y,EAASkP,EAASlP,OAGX2Y,EAAQ3Y,EAAQ2Y,IACvB/X,EAAOsO,EAAUyJ,GACX/X,EAAKqgB,QAIXC,EAAUtgB,EAAKqgB,MAAMC,QAChBmB,GAKa,SAAZnB,IACJoB,EAAQ3J,GAAU8G,EAASvf,IAAKU,EAAM,YAAe,KAC/C0hB,EAAQ3J,KACb/X,EAAKqgB,MAAMC,QAAU,KAGK,KAAvBtgB,EAAKqgB,MAAMC,SAAkBF,GAAoBpgB,KACrD0hB,EAAQ3J,GAAUuJ,GAAmBthB,KAGrB,SAAZsgB,IACJoB,EAAQ3J,GAAU,OAGlB8G,EAASJ,IAAKze,EAAM,UAAWsgB,IAMlC,KAAMvI,EAAQ,EAAGA,EAAQ3Y,EAAQ2Y,IACR,MAAnB2J,EAAQ3J,KACZzJ,EAAUyJ,GAAQsI,MAAMC,QAAUoB,EAAQ3J,GAI5C,OAAOzJ,GAGRjQ,EAAOG,GAAGoC,QACT6gB,KAAM,WACL,MAAOD,IAAUhlB,MAAM,IAExBmlB,KAAM,WACL,MAAOH,IAAUhlB,OAElBolB,OAAQ,SAAUjH,GACjB,MAAsB,iBAAVA,GACJA,EAAQne,KAAKilB,OAASjlB,KAAKmlB,OAG5BnlB,KAAKqD,KAAM,WACZugB,GAAoB5jB,MACxB6B,EAAQ7B,MAAOilB,OAEfpjB,EAAQ7B,MAAOmlB,WAKnB,IAAIE,IAAiB,wBAEjBC,GAAW,iCAEXC,GAAc,4BAKdC,IAGHC,QAAU,EAAG,+BAAgC,aAK7CC,OAAS,EAAG,UAAW,YACvBC,KAAO,EAAG,oBAAqB,uBAC/BC,IAAM,EAAG,iBAAkB,oBAC3BC,IAAM,EAAG,qBAAsB,yBAE/BC,UAAY,EAAG,GAAI,IAIpBN,IAAQO,SAAWP,GAAQC,OAE3BD,GAAQQ,MAAQR,GAAQS,MAAQT,GAAQU,SAAWV,GAAQW,QAAUX,GAAQE,MAC7EF,GAAQY,GAAKZ,GAAQK,EAGrB,SAASQ,IAAQtkB,EAAS4O,GAIzB,GAAIzN,GAA8C,mBAAjCnB,GAAQwL,qBACvBxL,EAAQwL,qBAAsBoD,GAAO,KACD,mBAA7B5O,GAAQiM,iBACdjM,EAAQiM,iBAAkB2C,GAAO,OAGpC,OAAe3L,UAAR2L,GAAqBA,GAAO9O,EAAOyE,SAAUvE,EAAS4O,GAC5D9O,EAAOsB,OAASpB,GAAWmB,GAC3BA,EAKF,QAASojB,IAAerjB,EAAOsjB,GAI9B,IAHA,GAAI9iB,GAAI,EACP4X,EAAIpY,EAAML,OAEHa,EAAI4X,EAAG5X,IACd4e,EAASJ,IACRhf,EAAOQ,GACP,cACC8iB,GAAelE,EAASvf,IAAKyjB,EAAa9iB,GAAK,eAMnD,GAAI+iB,IAAQ,WAEZ,SAASC,IAAexjB,EAAOlB,EAAS2kB,EAASC,EAAWC,GAO3D,IANA,GAAIpjB,GAAM+D,EAAKoJ,EAAKkW,EAAMhe,EAAU7E,EACnC8iB,EAAW/kB,EAAQglB,yBACnBC,KACAvjB,EAAI,EACJ4X,EAAIpY,EAAML,OAEHa,EAAI4X,EAAG5X,IAGd,GAFAD,EAAOP,EAAOQ,GAETD,GAAiB,IAATA,EAGZ,GAA6B,WAAxB3B,EAAO6D,KAAMlC,GAIjB3B,EAAOsB,MAAO6jB,EAAOxjB,EAAKiJ,UAAajJ,GAASA,OAG1C,IAAMgjB,GAAM9Y,KAAMlK,GAIlB,CACN+D,EAAMA,GAAOuf,EAASrlB,YAAaM,EAAQT,cAAe,QAG1DqP,GAAQ2U,GAASlY,KAAM5J,KAAY,GAAI,KAAQ,GAAI+C,cACnDsgB,EAAOrB,GAAS7U,IAAS6U,GAAQM,SACjCve,EAAIqJ,UAAYiW,EAAM,GAAMhlB,EAAOolB,cAAezjB,GAASqjB,EAAM,GAGjE7iB,EAAI6iB,EAAM,EACV,OAAQ7iB,IACPuD,EAAMA,EAAI8M,SAKXxS,GAAOsB,MAAO6jB,EAAOzf,EAAIiF,YAGzBjF,EAAMuf,EAASrU,WAGflL,EAAIiL,YAAc,OAzBlBwU,GAAMxmB,KAAMuB,EAAQmlB,eAAgB1jB,GA+BvCsjB,GAAStU,YAAc,GAEvB/O,EAAI,CACJ,OAAUD,EAAOwjB,EAAOvjB,KAGvB,GAAKkjB,GAAa9kB,EAAO+E,QAASpD,EAAMmjB,MAClCC,GACJA,EAAQpmB,KAAMgD,OAgBhB,IAXAqF,EAAWhH,EAAOgH,SAAUrF,EAAK2J,cAAe3J,GAGhD+D,EAAM8e,GAAQS,EAASrlB,YAAa+B,GAAQ,UAGvCqF,GACJyd,GAAe/e,GAIXmf,EAAU,CACd1iB,EAAI,CACJ,OAAUR,EAAO+D,EAAKvD,KAChBuhB,GAAY7X,KAAMlK,EAAKkC,MAAQ,KACnCghB,EAAQlmB,KAAMgD,GAMlB,MAAOsjB,IAIR,WACC,GAAIA,GAAWlnB,EAASmnB,yBACvBI,EAAML,EAASrlB,YAAa7B,EAAS0B,cAAe,QACpDuP,EAAQjR,EAAS0B,cAAe,QAMjCuP,GAAMjD,aAAc,OAAQ,SAC5BiD,EAAMjD,aAAc,UAAW,WAC/BiD,EAAMjD,aAAc,OAAQ,KAE5BuZ,EAAI1lB,YAAaoP,GAIjB5P,EAAQmmB,WAAaD,EAAIE,WAAW,GAAOA,WAAW,GAAOhT,UAAUsB,QAIvEwR,EAAIvW,UAAY,yBAChB3P,EAAQqmB,iBAAmBH,EAAIE,WAAW,GAAOhT,UAAUwF,eAE5D,IAAIlK,IAAkB/P,EAAS+P,gBAK9B4X,GAAY,OACZC,GAAc,iDACdC,GAAiB,qBAElB,SAASC,MACR,OAAO,EAGR,QAASC,MACR,OAAO,EAKR,QAASC,MACR,IACC,MAAOhoB,GAAS0V,cACf,MAAQuS,KAGX,QAASC,IAAItkB,EAAMukB,EAAOjmB,EAAUogB,EAAMlgB,EAAIgmB,GAC7C,GAAIC,GAAQviB,CAGZ,IAAsB,gBAAVqiB,GAAqB,CAGP,gBAAbjmB,KAGXogB,EAAOA,GAAQpgB,EACfA,EAAWkD,OAEZ,KAAMU,IAAQqiB,GACbD,GAAItkB,EAAMkC,EAAM5D,EAAUogB,EAAM6F,EAAOriB,GAAQsiB,EAEhD,OAAOxkB,GAsBR,GAnBa,MAAR0e,GAAsB,MAANlgB,GAGpBA,EAAKF,EACLogB,EAAOpgB,EAAWkD,QACD,MAANhD,IACc,gBAAbF,IAGXE,EAAKkgB,EACLA,EAAOld,SAIPhD,EAAKkgB,EACLA,EAAOpgB,EACPA,EAAWkD,SAGRhD,KAAO,EACXA,EAAK2lB,OACC,KAAM3lB,EACZ,MAAOwB,EAeR,OAZa,KAARwkB,IACJC,EAASjmB,EACTA,EAAK,SAAUkmB,GAId,MADArmB,KAASsmB,IAAKD,GACPD,EAAOvkB,MAAO1D,KAAM2D,YAI5B3B,EAAGqF,KAAO4gB,EAAO5gB,OAAU4gB,EAAO5gB,KAAOxF,EAAOwF,SAE1C7D,EAAKH,KAAM,WACjBxB,EAAOqmB,MAAMzM,IAAKzb,KAAM+nB,EAAO/lB,EAAIkgB,EAAMpgB,KAQ3CD,EAAOqmB,OAEN1oB,UAEAic,IAAK,SAAUjY,EAAMukB,EAAOlZ,EAASqT,EAAMpgB,GAE1C,GAAIsmB,GAAaC,EAAa9gB,EAC7B+gB,EAAQC,EAAGC,EACXrJ,EAASsJ,EAAU/iB,EAAMgjB,EAAYC,EACrCC,EAAWvG,EAASvf,IAAKU,EAG1B,IAAMolB,EAAN,CAKK/Z,EAAQA,UACZuZ,EAAcvZ,EACdA,EAAUuZ,EAAYvZ,QACtB/M,EAAWsmB,EAAYtmB,UAKnBA,GACJD,EAAO0O,KAAKO,gBAAiBnB,GAAiB7N,GAIzC+M,EAAQxH,OACbwH,EAAQxH,KAAOxF,EAAOwF,SAIfihB,EAASM,EAASN,UACzBA,EAASM,EAASN,YAEXD,EAAcO,EAASC,UAC9BR,EAAcO,EAASC,OAAS,SAAUnc,GAIzC,MAAyB,mBAAX7K,IAA0BA,EAAOqmB,MAAMY,YAAcpc,EAAEhH,KACpE7D,EAAOqmB,MAAMa,SAASrlB,MAAOF,EAAMG,WAAcqB,SAKpD+iB,GAAUA,GAAS,IAAKhb,MAAOoP,KAAiB,IAChDoM,EAAIR,EAAMnlB,MACV,OAAQ2lB,IACPhhB,EAAMkgB,GAAera,KAAM2a,EAAOQ,QAClC7iB,EAAOijB,EAAWphB,EAAK,GACvBmhB,GAAenhB,EAAK,IAAO,IAAKM,MAAO,KAAM3D,OAGvCwB,IAKNyZ,EAAUtd,EAAOqmB,MAAM/I,QAASzZ,OAGhCA,GAAS5D,EAAWqd,EAAQ6J,aAAe7J,EAAQ8J,WAAcvjB,EAGjEyZ,EAAUtd,EAAOqmB,MAAM/I,QAASzZ,OAGhC8iB,EAAY3mB,EAAOuC,QAClBsB,KAAMA,EACNijB,SAAUA,EACVzG,KAAMA,EACNrT,QAASA,EACTxH,KAAMwH,EAAQxH,KACdvF,SAAUA,EACViJ,aAAcjJ,GAAYD,EAAOgQ,KAAK9E,MAAMhC,aAAa2C,KAAM5L,GAC/DonB,UAAWR,EAAW5a,KAAM,MAC1Bsa,IAGKK,EAAWH,EAAQ5iB,MAC1B+iB,EAAWH,EAAQ5iB,MACnB+iB,EAASU,cAAgB,EAGnBhK,EAAQiK,OACbjK,EAAQiK,MAAMpoB,KAAMwC,EAAM0e,EAAMwG,EAAYL,MAAkB,GAEzD7kB,EAAKyM,kBACTzM,EAAKyM,iBAAkBvK,EAAM2iB,IAK3BlJ,EAAQ1D,MACZ0D,EAAQ1D,IAAIza,KAAMwC,EAAMglB,GAElBA,EAAU3Z,QAAQxH,OACvBmhB,EAAU3Z,QAAQxH,KAAOwH,EAAQxH,OAK9BvF,EACJ2mB,EAAStkB,OAAQskB,EAASU,gBAAiB,EAAGX,GAE9CC,EAASjoB,KAAMgoB,GAIhB3mB,EAAOqmB,MAAM1oB,OAAQkG,IAAS,KAMhCuX,OAAQ,SAAUzZ,EAAMukB,EAAOlZ,EAAS/M,EAAUunB,GAEjD,GAAIrlB,GAAGslB,EAAW/hB,EACjB+gB,EAAQC,EAAGC,EACXrJ,EAASsJ,EAAU/iB,EAAMgjB,EAAYC,EACrCC,EAAWvG,EAASD,QAAS5e,IAAU6e,EAASvf,IAAKU,EAEtD,IAAMolB,IAAeN,EAASM,EAASN,QAAvC,CAKAP,GAAUA,GAAS,IAAKhb,MAAOoP,KAAiB,IAChDoM,EAAIR,EAAMnlB,MACV,OAAQ2lB,IAMP,GALAhhB,EAAMkgB,GAAera,KAAM2a,EAAOQ,QAClC7iB,EAAOijB,EAAWphB,EAAK,GACvBmhB,GAAenhB,EAAK,IAAO,IAAKM,MAAO,KAAM3D,OAGvCwB,EAAN,CAOAyZ,EAAUtd,EAAOqmB,MAAM/I,QAASzZ,OAChCA,GAAS5D,EAAWqd,EAAQ6J,aAAe7J,EAAQ8J,WAAcvjB,EACjE+iB,EAAWH,EAAQ5iB,OACnB6B,EAAMA,EAAK,IACV,GAAI0C,QAAQ,UAAYye,EAAW5a,KAAM,iBAAoB,WAG9Dwb,EAAYtlB,EAAIykB,EAAS7lB,MACzB,OAAQoB,IACPwkB,EAAYC,EAAUzkB,IAEfqlB,GAAeV,IAAaH,EAAUG,UACzC9Z,GAAWA,EAAQxH,OAASmhB,EAAUnhB,MACtCE,IAAOA,EAAImG,KAAM8a,EAAUU,YAC3BpnB,GAAYA,IAAa0mB,EAAU1mB,WACxB,OAAbA,IAAqB0mB,EAAU1mB,YAChC2mB,EAAStkB,OAAQH,EAAG,GAEfwkB,EAAU1mB,UACd2mB,EAASU,gBAELhK,EAAQlC,QACZkC,EAAQlC,OAAOjc,KAAMwC,EAAMglB,GAOzBc,KAAcb,EAAS7lB,SACrBuc,EAAQoK,UACbpK,EAAQoK,SAASvoB,KAAMwC,EAAMklB,EAAYE,EAASC,WAAa,GAE/DhnB,EAAO2nB,YAAahmB,EAAMkC,EAAMkjB,EAASC,cAGnCP,GAAQ5iB,QA1Cf,KAAMA,IAAQ4iB,GACbzmB,EAAOqmB,MAAMjL,OAAQzZ,EAAMkC,EAAOqiB,EAAOQ,GAAK1Z,EAAS/M,GAAU,EA8C/DD,GAAOqE,cAAeoiB,IAC1BjG,EAASpF,OAAQzZ,EAAM,mBAIzBulB,SAAU,SAAUU,GAGnB,GAAIvB,GAAQrmB,EAAOqmB,MAAMwB,IAAKD,GAE1BhmB,EAAGO,EAAGd,EAAKwR,EAAS8T,EAAWmB,EAClCniB,EAAO,GAAI7B,OAAOhC,UAAUf,QAC5B6lB,GAAapG,EAASvf,IAAK9C,KAAM,eAAoBkoB,EAAMxiB,UAC3DyZ,EAAUtd,EAAOqmB,MAAM/I,QAAS+I,EAAMxiB,SAKvC,KAFA8B,EAAM,GAAM0gB,EAENzkB,EAAI,EAAGA,EAAIE,UAAUf,OAAQa,IAClC+D,EAAM/D,GAAME,UAAWF,EAMxB,IAHAykB,EAAM0B,eAAiB5pB,MAGlBmf,EAAQ0K,aAAe1K,EAAQ0K,YAAY7oB,KAAMhB,KAAMkoB,MAAY,EAAxE,CAKAyB,EAAe9nB,EAAOqmB,MAAMO,SAASznB,KAAMhB,KAAMkoB,EAAOO,GAGxDhlB,EAAI,CACJ,QAAUiR,EAAUiV,EAAclmB,QAAYykB,EAAM4B,uBAAyB,CAC5E5B,EAAM6B,cAAgBrV,EAAQlR,KAE9BQ,EAAI,CACJ,QAAUwkB,EAAY9T,EAAQ+T,SAAUzkB,QACtCkkB,EAAM8B,gCAID9B,EAAM+B,aAAc/B,EAAM+B,WAAWvc,KAAM8a,EAAUU,aAE1DhB,EAAMM,UAAYA,EAClBN,EAAMhG,KAAOsG,EAAUtG,KAEvBhf,IAAUrB,EAAOqmB,MAAM/I,QAASqJ,EAAUG,eAAmBE,QAC5DL,EAAU3Z,SAAUnL,MAAOgR,EAAQlR,KAAMgE,GAE7BxC,SAAR9B,IACGglB,EAAMzU,OAASvQ,MAAU,IAC/BglB,EAAMgC,iBACNhC,EAAMiC,oBAYX,MAJKhL,GAAQiL,cACZjL,EAAQiL,aAAappB,KAAMhB,KAAMkoB,GAG3BA,EAAMzU,SAGdgV,SAAU,SAAUP,EAAOO,GAC1B,GAAIhlB,GAAGwD,EAASkL,EAAKqW,EACpBmB,KACAR,EAAgBV,EAASU,cACzBna,EAAMkZ,EAAMvjB,MAQb,IAAKwkB,GAAiBna,EAAIvC,WACR,UAAfyb,EAAMxiB,MAAoBI,MAAOoiB,EAAMlS,SAAYkS,EAAMlS,OAAS,GAEpE,KAAQhH,IAAQhP,KAAMgP,EAAMA,EAAItN,YAAc1B,KAI7C,GAAsB,IAAjBgP,EAAIvC,WAAoBuC,EAAI3C,YAAa,GAAuB,UAAf6b,EAAMxiB,MAAqB,CAEhF,IADAuB,KACMxD,EAAI,EAAGA,EAAI0lB,EAAe1lB,IAC/B+kB,EAAYC,EAAUhlB,GAGtB0O,EAAMqW,EAAU1mB,SAAW,IAEHkD,SAAnBiC,EAASkL,KACblL,EAASkL,GAAQqW,EAAUzd,aAC1BlJ,EAAQsQ,EAAKnS,MAAOub,MAAOvM,MAC3BnN,EAAO0O,KAAM4B,EAAKnS,KAAM,MAAQgP,IAAQpM,QAErCqE,EAASkL,IACblL,EAAQzG,KAAMgoB,EAGXvhB,GAAQrE,QACZ+mB,EAAanpB,MAAQgD,KAAMwL,EAAKyZ,SAAUxhB,IAW9C,MAJKkiB,GAAgBV,EAAS7lB,QAC7B+mB,EAAanpB,MAAQgD,KAAMxD,KAAMyoB,SAAUA,EAASnoB,MAAO6oB,KAGrDQ,GAGRU,QAAS,SAAU/lB,EAAMgmB,GACxBlqB,OAAO2hB,eAAgBlgB,EAAO0oB,MAAM9nB,UAAW6B,GAC9CkmB,YAAY,EACZxI,cAAc,EAEdlf,IAAKjB,EAAOgD,WAAYylB,GACvB,WACC,GAAKtqB,KAAKyqB,cACR,MAAOH,GAAMtqB,KAAKyqB,gBAGrB,WACC,GAAKzqB,KAAKyqB,cACR,MAAOzqB,MAAKyqB,cAAenmB,IAI/B2d,IAAK,SAAU7a,GACdhH,OAAO2hB,eAAgB/hB,KAAMsE,GAC5BkmB,YAAY,EACZxI,cAAc,EACd0I,UAAU,EACVtjB,MAAOA,QAMXsiB,IAAK,SAAUe,GACd,MAAOA,GAAe5oB,EAAOoD,SAC5BwlB,EACA,GAAI5oB,GAAO0oB,MAAOE,IAGpBtL,SACCwL,MAGCC,UAAU,GAEXvV,OAGCwV,QAAS,WACR,GAAK7qB,OAAS4nB,MAAuB5nB,KAAKqV,MAEzC,MADArV,MAAKqV,SACE,GAGT2T,aAAc,WAEf8B,MACCD,QAAS,WACR,GAAK7qB,OAAS4nB,MAAuB5nB,KAAK8qB,KAEzC,MADA9qB,MAAK8qB,QACE,GAGT9B,aAAc,YAEf+B,OAGCF,QAAS,WACR,GAAmB,aAAd7qB,KAAK0F,MAAuB1F,KAAK+qB,OAASlpB,EAAOyE,SAAUtG,KAAM,SAErE,MADAA,MAAK+qB,SACE,GAKTjF,SAAU,SAAUoC,GACnB,MAAOrmB,GAAOyE,SAAU4hB,EAAMvjB,OAAQ,OAIxCqmB,cACCZ,aAAc,SAAUlC,GAIDljB,SAAjBkjB,EAAMzU,QAAwByU,EAAMuC,gBACxCvC,EAAMuC,cAAcQ,YAAc/C,EAAMzU,YAO7C5R,EAAO2nB,YAAc,SAAUhmB,EAAMkC,EAAMmjB,GAGrCrlB,EAAK2d,qBACT3d,EAAK2d,oBAAqBzb,EAAMmjB,IAIlChnB,EAAO0oB,MAAQ,SAAUhmB,EAAK2mB,GAG7B,MAAQlrB,gBAAgB6B,GAAO0oB,OAK1BhmB,GAAOA,EAAImB,MACf1F,KAAKyqB,cAAgBlmB,EACrBvE,KAAK0F,KAAOnB,EAAImB,KAIhB1F,KAAKmrB,mBAAqB5mB,EAAI6mB,kBACHpmB,SAAzBT,EAAI6mB,kBAGJ7mB,EAAI0mB,eAAgB,EACrBvD,GACAC,GAKD3nB,KAAK2E,OAAWJ,EAAII,QAAkC,IAAxBJ,EAAII,OAAO8H,SACxClI,EAAII,OAAOjD,WACX6C,EAAII,OAEL3E,KAAK+pB,cAAgBxlB,EAAIwlB,cACzB/pB,KAAKqrB,cAAgB9mB,EAAI8mB,eAIzBrrB,KAAK0F,KAAOnB,EAIR2mB,GACJrpB,EAAOuC,OAAQpE,KAAMkrB,GAItBlrB,KAAKsrB,UAAY/mB,GAAOA,EAAI+mB,WAAazpB,EAAO4F,WAGhDzH,KAAM6B,EAAOoD,UAAY,IA1CjB,GAAIpD,GAAO0oB,MAAOhmB,EAAK2mB,IA+ChCrpB,EAAO0oB,MAAM9nB,WACZE,YAAad,EAAO0oB,MACpBY,mBAAoBxD,GACpBmC,qBAAsBnC,GACtBqC,8BAA+BrC,GAC/B4D,aAAa,EAEbrB,eAAgB,WACf,GAAIxd,GAAI1M,KAAKyqB,aAEbzqB,MAAKmrB,mBAAqBzD,GAErBhb,IAAM1M,KAAKurB,aACf7e,EAAEwd,kBAGJC,gBAAiB,WAChB,GAAIzd,GAAI1M,KAAKyqB,aAEbzqB,MAAK8pB,qBAAuBpC,GAEvBhb,IAAM1M,KAAKurB,aACf7e,EAAEyd,mBAGJqB,yBAA0B,WACzB,GAAI9e,GAAI1M,KAAKyqB,aAEbzqB,MAAKgqB,8BAAgCtC,GAEhChb,IAAM1M,KAAKurB,aACf7e,EAAE8e,2BAGHxrB,KAAKmqB,oBAKPtoB,EAAOwB,MACNooB,QAAQ,EACRC,SAAS,EACTC,YAAY,EACZC,gBAAgB,EAChBC,SAAS,EACTC,QAAQ,EACRC,YAAY,EACZC,SAAS,EACTC,OAAO,EACPC,OAAO,EACPC,UAAU,EACVC,MAAM,EACNC,QAAQ,EACRC,UAAU,EACVje,KAAK,EACLke,SAAS,EACTvW,QAAQ,EACRwW,SAAS,EACTC,SAAS,EACTC,SAAS,EACTC,SAAS,EACTC,SAAS,EACTC,WAAW,EACXC,aAAa,EACbC,SAAS,EACTC,SAAS,EACTC,eAAe,EACfC,WAAW,EACXC,SAAS,EAETC,MAAO,SAAUlF,GAChB,GAAIlS,GAASkS,EAAMlS,MAGnB,OAAoB,OAAfkS,EAAMkF,OAAiB7F,GAAU7Z,KAAMwa,EAAMxiB,MACxB,MAAlBwiB,EAAMoE,SAAmBpE,EAAMoE,SAAWpE,EAAMqE,SAIlDrE,EAAMkF,OAAoBpoB,SAAXgR,GAAwBwR,GAAY9Z,KAAMwa,EAAMxiB,MAClD,EAATsQ,EAAa,EAAe,EAATA,EAAa,EAAe,EAATA,EAAa,EAAI,EAG1DkS,EAAMkF,QAEZvrB,EAAOqmB,MAAMmC,SAUhBxoB,EAAOwB,MACNgqB,WAAY,YACZC,WAAY,WACZC,aAAc,cACdC,aAAc,cACZ,SAAUC,EAAM/D,GAClB7nB,EAAOqmB,MAAM/I,QAASsO,IACrBzE,aAAcU,EACdT,SAAUS,EAEVb,OAAQ,SAAUX,GACjB,GAAIhlB,GACHyB,EAAS3E,KACT0tB,EAAUxF,EAAMmD,cAChB7C,EAAYN,EAAMM,SASnB,OALMkF,KAAaA,IAAY/oB,GAAW9C,EAAOgH,SAAUlE,EAAQ+oB,MAClExF,EAAMxiB,KAAO8iB,EAAUG,SACvBzlB,EAAMslB,EAAU3Z,QAAQnL,MAAO1D,KAAM2D,WACrCukB,EAAMxiB,KAAOgkB,GAEPxmB,MAKVrB,EAAOG,GAAGoC,QAET0jB,GAAI,SAAUC,EAAOjmB,EAAUogB,EAAMlgB,GACpC,MAAO8lB,IAAI9nB,KAAM+nB,EAAOjmB,EAAUogB,EAAMlgB,IAEzCgmB,IAAK,SAAUD,EAAOjmB,EAAUogB,EAAMlgB,GACrC,MAAO8lB,IAAI9nB,KAAM+nB,EAAOjmB,EAAUogB,EAAMlgB,EAAI,IAE7CmmB,IAAK,SAAUJ,EAAOjmB,EAAUE,GAC/B,GAAIwmB,GAAW9iB,CACf,IAAKqiB,GAASA,EAAMmC,gBAAkBnC,EAAMS,UAW3C,MARAA,GAAYT,EAAMS,UAClB3mB,EAAQkmB,EAAM6B,gBAAiBzB,IAC9BK,EAAUU,UACTV,EAAUG,SAAW,IAAMH,EAAUU,UACrCV,EAAUG,SACXH,EAAU1mB,SACV0mB,EAAU3Z,SAEJ7O,IAER,IAAsB,gBAAV+nB,GAAqB,CAGhC,IAAMriB,IAAQqiB,GACb/nB,KAAKmoB,IAAKziB,EAAM5D,EAAUimB,EAAOriB,GAElC,OAAO1F,MAWR,MATK8B,MAAa,GAA6B,kBAAbA,KAGjCE,EAAKF,EACLA,EAAWkD,QAEPhD,KAAO,IACXA,EAAK2lB,IAEC3nB,KAAKqD,KAAM,WACjBxB,EAAOqmB,MAAMjL,OAAQjd,KAAM+nB,EAAO/lB,EAAIF,OAMzC,IAKC6rB,IAAY,8FAOZC,GAAe,wBAGfC,GAAW,oCACXC,GAAoB,cACpBC,GAAe,0CAEhB,SAASC,IAAoBxqB,EAAMyqB,GAClC,MAAKpsB,GAAOyE,SAAU9C,EAAM,UAC3B3B,EAAOyE,SAA+B,KAArB2nB,EAAQxhB,SAAkBwhB,EAAUA,EAAQxb,WAAY,MAElEjP,EAAK+J,qBAAsB,SAAW,IAAO/J,EAG9CA,EAIR,QAAS0qB,IAAe1qB,GAEvB,MADAA,GAAKkC,MAAyC,OAAhClC,EAAKmK,aAAc,SAAsB,IAAMnK,EAAKkC,KAC3DlC,EAER,QAAS2qB,IAAe3qB,GACvB,GAAIuJ,GAAQ+gB,GAAkB1gB,KAAM5J,EAAKkC,KAQzC,OANKqH,GACJvJ,EAAKkC,KAAOqH,EAAO,GAEnBvJ,EAAK0K,gBAAiB,QAGhB1K,EAGR,QAAS4qB,IAAgB7pB,EAAK8pB,GAC7B,GAAI5qB,GAAG4X,EAAG3V,EAAM4oB,EAAUC,EAAUC,EAAUC,EAAUnG,CAExD,IAAuB,IAAlB+F,EAAK5hB,SAAV,CAKA,GAAK4V,EAASD,QAAS7d,KACtB+pB,EAAWjM,EAASf,OAAQ/c,GAC5BgqB,EAAWlM,EAASJ,IAAKoM,EAAMC,GAC/BhG,EAASgG,EAAShG,QAEJ,OACNiG,GAAS1F,OAChB0F,EAASjG,SAET,KAAM5iB,IAAQ4iB,GACb,IAAM7kB,EAAI,EAAG4X,EAAIiN,EAAQ5iB,GAAO9C,OAAQa,EAAI4X,EAAG5X,IAC9C5B,EAAOqmB,MAAMzM,IAAK4S,EAAM3oB,EAAM4iB,EAAQ5iB,GAAQjC,IAO7C6e,EAASF,QAAS7d,KACtBiqB,EAAWlM,EAAShB,OAAQ/c,GAC5BkqB,EAAW5sB,EAAOuC,UAAYoqB,GAE9BlM,EAASL,IAAKoM,EAAMI,KAKtB,QAASC,IAAUnqB,EAAK8pB,GACvB,GAAI/nB,GAAW+nB,EAAK/nB,SAASC,aAGX,WAAbD,GAAwB+e,GAAe3X,KAAMnJ,EAAImB,MACrD2oB,EAAK1Y,QAAUpR,EAAIoR,QAGK,UAAbrP,GAAqC,aAAbA,IACnC+nB,EAAKxU,aAAetV,EAAIsV,cAI1B,QAAS8U,IAAUC,EAAYpnB,EAAMlE,EAAUsjB,GAG9Cpf,EAAOjH,EAAOmD,SAAW8D,EAEzB,IAAIsf,GAAUljB,EAAO8iB,EAASmI,EAAYjf,EAAMxO,EAC/CqC,EAAI,EACJ4X,EAAIuT,EAAWhsB,OACfksB,EAAWzT,EAAI,EACfjU,EAAQI,EAAM,GACd3C,EAAahD,EAAOgD,WAAYuC,EAGjC,IAAKvC,GACDwW,EAAI,GAAsB,gBAAVjU,KAChBnG,EAAQmmB,YAAcyG,GAASngB,KAAMtG,GACxC,MAAOwnB,GAAWvrB,KAAM,SAAUkY,GACjC,GAAIZ,GAAOiU,EAAW/qB,GAAI0X,EACrB1W,KACJ2C,EAAM,GAAMJ,EAAMpG,KAAMhB,KAAMub,EAAOZ,EAAKoU,SAE3CJ,GAAUhU,EAAMnT,EAAMlE,EAAUsjB,IAIlC,IAAKvL,IACJyL,EAAWL,GAAejf,EAAMonB,EAAY,GAAIzhB,eAAe,EAAOyhB,EAAYhI,GAClFhjB,EAAQkjB,EAASrU,WAEmB,IAA/BqU,EAASta,WAAW5J,SACxBkkB,EAAWljB,GAIPA,GAASgjB,GAAU,CAOvB,IANAF,EAAU7kB,EAAO0B,IAAK8iB,GAAQS,EAAU,UAAYoH,IACpDW,EAAanI,EAAQ9jB,OAKba,EAAI4X,EAAG5X,IACdmM,EAAOkX,EAEFrjB,IAAMqrB,IACVlf,EAAO/N,EAAO6C,MAAOkL,GAAM,GAAM,GAG5Bif,GAIJhtB,EAAOsB,MAAOujB,EAASL,GAAQzW,EAAM,YAIvCtM,EAAStC,KAAM4tB,EAAYnrB,GAAKmM,EAAMnM,EAGvC,IAAKorB,EAOJ,IANAztB,EAAMslB,EAASA,EAAQ9jB,OAAS,GAAIuK,cAGpCtL,EAAO0B,IAAKmjB,EAASyH,IAGf1qB,EAAI,EAAGA,EAAIorB,EAAYprB,IAC5BmM,EAAO8W,EAASjjB,GACX8hB,GAAY7X,KAAMkC,EAAKlK,MAAQ,MAClC2c,EAASf,OAAQ1R,EAAM,eACxB/N,EAAOgH,SAAUzH,EAAKwO,KAEjBA,EAAKrL,IAGJ1C,EAAOmtB,UACXntB,EAAOmtB,SAAUpf,EAAKrL,KAGvBrD,EAAS0O,EAAK4C,YAAYpN,QAAS2oB,GAAc,IAAM3sB,IAQ7D,MAAOwtB,GAGR,QAAS3R,IAAQzZ,EAAM1B,EAAUmtB,GAKhC,IAJA,GAAIrf,GACHoX,EAAQllB,EAAWD,EAAO2O,OAAQ1O,EAAU0B,GAASA,EACrDC,EAAI,EAE4B,OAAvBmM,EAAOoX,EAAOvjB,IAAeA,IAChCwrB,GAA8B,IAAlBrf,EAAKnD,UACtB5K,EAAOqtB,UAAW7I,GAAQzW,IAGtBA,EAAKlO,aACJutB,GAAYptB,EAAOgH,SAAU+G,EAAKzC,cAAeyC,IACrD0W,GAAeD,GAAQzW,EAAM,WAE9BA,EAAKlO,WAAWC,YAAaiO,GAI/B,OAAOpM,GAGR3B,EAAOuC,QACN6iB,cAAe,SAAU8H,GACxB,MAAOA,GAAK3pB,QAASuoB,GAAW,cAGjCjpB,MAAO,SAAUlB,EAAM2rB,EAAeC,GACrC,GAAI3rB,GAAG4X,EAAGgU,EAAaC,EACtB5qB,EAAQlB,EAAK6jB,WAAW,GACxBkI,EAAS1tB,EAAOgH,SAAUrF,EAAK2J,cAAe3J,EAG/C,MAAMvC,EAAQqmB,gBAAsC,IAAlB9jB,EAAKiJ,UAAoC,KAAlBjJ,EAAKiJ,UAC3D5K,EAAOkY,SAAUvW,IAMnB,IAHA8rB,EAAejJ,GAAQ3hB,GACvB2qB,EAAchJ,GAAQ7iB,GAEhBC,EAAI,EAAG4X,EAAIgU,EAAYzsB,OAAQa,EAAI4X,EAAG5X,IAC3CirB,GAAUW,EAAa5rB,GAAK6rB,EAAc7rB,GAK5C,IAAK0rB,EACJ,GAAKC,EAIJ,IAHAC,EAAcA,GAAehJ,GAAQ7iB,GACrC8rB,EAAeA,GAAgBjJ,GAAQ3hB,GAEjCjB,EAAI,EAAG4X,EAAIgU,EAAYzsB,OAAQa,EAAI4X,EAAG5X,IAC3C2qB,GAAgBiB,EAAa5rB,GAAK6rB,EAAc7rB,QAGjD2qB,IAAgB5qB,EAAMkB,EAWxB,OANA4qB,GAAejJ,GAAQ3hB,EAAO,UACzB4qB,EAAa1sB,OAAS,GAC1B0jB,GAAegJ,GAAeC,GAAUlJ,GAAQ7iB,EAAM,WAIhDkB,GAGRwqB,UAAW,SAAUjsB,GAKpB,IAJA,GAAIif,GAAM1e,EAAMkC,EACfyZ,EAAUtd,EAAOqmB,MAAM/I,QACvB1b,EAAI,EAE6BuB,UAAxBxB,EAAOP,EAAOQ,IAAqBA,IAC5C,GAAKke,EAAYne,GAAS,CACzB,GAAO0e,EAAO1e,EAAM6e,EAASpd,SAAc,CAC1C,GAAKid,EAAKoG,OACT,IAAM5iB,IAAQwc,GAAKoG,OACbnJ,EAASzZ,GACb7D,EAAOqmB,MAAMjL,OAAQzZ,EAAMkC,GAI3B7D,EAAO2nB,YAAahmB,EAAMkC,EAAMwc,EAAK2G,OAOxCrlB,GAAM6e,EAASpd,SAAYD,OAEvBxB,EAAM8e,EAASrd,WAInBzB,EAAM8e,EAASrd,SAAYD,YAOhCnD,EAAOG,GAAGoC,QACTorB,OAAQ,SAAU1tB,GACjB,MAAOmb,IAAQjd,KAAM8B,GAAU,IAGhCmb,OAAQ,SAAUnb,GACjB,MAAOmb,IAAQjd,KAAM8B,IAGtBP,KAAM,SAAU6F,GACf,MAAOka,GAAQthB,KAAM,SAAUoH,GAC9B,MAAiBpC,UAAVoC,EACNvF,EAAON,KAAMvB,MACbA,KAAK8V,QAAQzS,KAAM,WACK,IAAlBrD,KAAKyM,UAAoC,KAAlBzM,KAAKyM,UAAqC,IAAlBzM,KAAKyM,WACxDzM,KAAKwS,YAAcpL,MAGpB,KAAMA,EAAOzD,UAAUf,SAG3B6sB,OAAQ,WACP,MAAOd,IAAU3uB,KAAM2D,UAAW,SAAUH,GAC3C,GAAuB,IAAlBxD,KAAKyM,UAAoC,KAAlBzM,KAAKyM,UAAqC,IAAlBzM,KAAKyM,SAAiB,CACzE,GAAI9H,GAASqpB,GAAoBhuB,KAAMwD,EACvCmB,GAAOlD,YAAa+B,OAKvBksB,QAAS,WACR,MAAOf,IAAU3uB,KAAM2D,UAAW,SAAUH,GAC3C,GAAuB,IAAlBxD,KAAKyM,UAAoC,KAAlBzM,KAAKyM,UAAqC,IAAlBzM,KAAKyM,SAAiB,CACzE,GAAI9H,GAASqpB,GAAoBhuB,KAAMwD,EACvCmB,GAAOgrB,aAAcnsB,EAAMmB,EAAO8N,gBAKrCmd,OAAQ,WACP,MAAOjB,IAAU3uB,KAAM2D,UAAW,SAAUH,GACtCxD,KAAK0B,YACT1B,KAAK0B,WAAWiuB,aAAcnsB,EAAMxD,SAKvC6vB,MAAO,WACN,MAAOlB,IAAU3uB,KAAM2D,UAAW,SAAUH,GACtCxD,KAAK0B,YACT1B,KAAK0B,WAAWiuB,aAAcnsB,EAAMxD,KAAKmP,gBAK5C2G,MAAO,WAIN,IAHA,GAAItS,GACHC,EAAI,EAE2B,OAAtBD,EAAOxD,KAAMyD,IAAeA,IACd,IAAlBD,EAAKiJ,WAGT5K,EAAOqtB,UAAW7I,GAAQ7iB,GAAM,IAGhCA,EAAKgP,YAAc,GAIrB,OAAOxS,OAGR0E,MAAO,SAAUyqB,EAAeC,GAI/B,MAHAD,GAAiC,MAAjBA,GAAgCA,EAChDC,EAAyC,MAArBA,EAA4BD,EAAgBC,EAEzDpvB,KAAKuD,IAAK,WAChB,MAAO1B,GAAO6C,MAAO1E,KAAMmvB,EAAeC,MAI5CL,KAAM,SAAU3nB,GACf,MAAOka,GAAQthB,KAAM,SAAUoH,GAC9B,GAAI5D,GAAOxD,KAAM,OAChByD,EAAI,EACJ4X,EAAIrb,KAAK4C,MAEV,IAAeoC,SAAVoC,GAAyC,IAAlB5D,EAAKiJ,SAChC,MAAOjJ,GAAKoN,SAIb,IAAsB,gBAAVxJ,KAAuBwmB,GAAalgB,KAAMtG,KACpDoe,IAAWF,GAASlY,KAAMhG,KAAa,GAAI,KAAQ,GAAIb,eAAkB,CAE1Ea,EAAQvF,EAAOolB,cAAe7f,EAE9B,KACC,KAAQ3D,EAAI4X,EAAG5X,IACdD,EAAOxD,KAAMyD,OAGU,IAAlBD,EAAKiJ,WACT5K,EAAOqtB,UAAW7I,GAAQ7iB,GAAM,IAChCA,EAAKoN,UAAYxJ,EAInB5D,GAAO,EAGN,MAAQkJ,KAGNlJ,GACJxD,KAAK8V,QAAQ2Z,OAAQroB,IAEpB,KAAMA,EAAOzD,UAAUf,SAG3BktB,YAAa,WACZ,GAAIlJ,KAGJ,OAAO+H,IAAU3uB,KAAM2D,UAAW,SAAUH,GAC3C,GAAI2Q,GAASnU,KAAK0B,UAEbG,GAAO+E,QAAS5G,KAAM4mB,GAAY,IACtC/kB,EAAOqtB,UAAW7I,GAAQrmB,OACrBmU,GACJA,EAAO4b,aAAcvsB,EAAMxD,QAK3B4mB,MAIL/kB,EAAOwB,MACN2sB,SAAU,SACVC,UAAW,UACXN,aAAc,SACdO,YAAa,QACbC,WAAY,eACV,SAAU7rB,EAAM8rB,GAClBvuB,EAAOG,GAAIsC,GAAS,SAAUxC,GAO7B,IANA,GAAImB,GACHC,KACAmtB,EAASxuB,EAAQC,GACjBgC,EAAOusB,EAAOztB,OAAS,EACvBa,EAAI,EAEGA,GAAKK,EAAML,IAClBR,EAAQQ,IAAMK,EAAO9D,KAAOA,KAAK0E,OAAO,GACxC7C,EAAQwuB,EAAQ5sB,IAAO2sB,GAAYntB,GAInCzC,EAAKkD,MAAOR,EAAKD,EAAMH,MAGxB,OAAO9C,MAAKgD,UAAWE,KAGzB,IAAIotB,IAAU,UAEVC,GAAY,GAAItmB,QAAQ,KAAOuZ,EAAO,kBAAmB,KAEzDgN,GAAY,SAAUhtB,GAKxB,GAAI4oB,GAAO5oB,EAAK2J,cAAc4C,WAM9B,OAJMqc,IAASA,EAAKqE,SACnBrE,EAAOrsB,GAGDqsB,EAAKsE,iBAAkBltB,KAKhC,WAIC,QAASmtB,KAGR,GAAMxJ,EAAN,CAIAA,EAAItD,MAAM+M,QACT,4GAIDzJ,EAAIvW,UAAY,GAChBjB,GAAgBlO,YAAaovB,EAE7B,IAAIC,GAAW/wB,EAAO2wB,iBAAkBvJ,EACxC4J,GAAoC,OAAjBD,EAAS9gB,IAG5BghB,EAAgD,QAAxBF,EAASG,WACjCC,EAA0C,QAAnBJ,EAASK,MAIhChK,EAAItD,MAAMuN,YAAc,MACxBC,EAA+C,QAAzBP,EAASM,YAE/BzhB,GAAgBhO,YAAakvB,GAI7B1J,EAAM,MAGP,GAAI4J,GAAkBG,EAAsBG,EAAqBL,EAChEH,EAAYjxB,EAAS0B,cAAe,OACpC6lB,EAAMvnB,EAAS0B,cAAe,MAGzB6lB,GAAItD,QAMVsD,EAAItD,MAAMyN,eAAiB,cAC3BnK,EAAIE,WAAW,GAAOxD,MAAMyN,eAAiB,GAC7CrwB,EAAQswB,gBAA+C,gBAA7BpK,EAAItD,MAAMyN,eAEpCT,EAAUhN,MAAM+M,QAAU,4FAE1BC,EAAUpvB,YAAa0lB,GAEvBtlB,EAAOuC,OAAQnD,GACduwB,cAAe,WAEd,MADAb,KACOI,GAERU,kBAAmB,WAElB,MADAd,KACOO,GAERQ,iBAAkB,WAEjB,MADAf,KACOU,GAERM,mBAAoB,WAEnB,MADAhB,KACOK,QAMV,SAASY,IAAQpuB,EAAMc,EAAMutB,GAC5B,GAAIV,GAAOW,EAAUC,EAAU7uB,EAC9B2gB,EAAQrgB,EAAKqgB,KAoCd,OAlCAgO,GAAWA,GAAYrB,GAAWhtB,GAI7BquB,IACJ3uB,EAAM2uB,EAASG,iBAAkB1tB,IAAUutB,EAAUvtB,GAExC,KAARpB,GAAerB,EAAOgH,SAAUrF,EAAK2J,cAAe3J,KACxDN,EAAMrB,EAAOgiB,MAAOrgB,EAAMc,KAQrBrD,EAAQywB,oBAAsBnB,GAAU7iB,KAAMxK,IAASotB,GAAQ5iB,KAAMpJ,KAG1E6sB,EAAQtN,EAAMsN,MACdW,EAAWjO,EAAMiO,SACjBC,EAAWlO,EAAMkO,SAGjBlO,EAAMiO,SAAWjO,EAAMkO,SAAWlO,EAAMsN,MAAQjuB,EAChDA,EAAM2uB,EAASV,MAGftN,EAAMsN,MAAQA,EACdtN,EAAMiO,SAAWA,EACjBjO,EAAMkO,SAAWA,IAIJ/sB,SAAR9B,EAINA,EAAM,GACNA,EAIF,QAAS+uB,IAAcC,EAAaC,GAGnC,OACCrvB,IAAK,WACJ,MAAKovB,gBAIGlyB,MAAK8C,KAKJ9C,KAAK8C,IAAMqvB,GAASzuB,MAAO1D,KAAM2D,aAM7C,GAKCyuB,IAAe,4BACfC,IAAYC,SAAU,WAAYC,WAAY,SAAUzO,QAAS,SACjE0O,IACCC,cAAe,IACfC,WAAY,OAGbC,IAAgB,SAAU,MAAO,MACjCC,GAAahzB,EAAS0B,cAAe,OAAQuiB,KAG9C,SAASgP,IAAgBvuB,GAGxB,GAAKA,IAAQsuB,IACZ,MAAOtuB,EAIR,IAAIwuB,GAAUxuB,EAAM,GAAI9B,cAAgB8B,EAAKhE,MAAO,GACnDmD,EAAIkvB,GAAY/vB,MAEjB,OAAQa,IAEP,GADAa,EAAOquB,GAAalvB,GAAMqvB,EACrBxuB,IAAQsuB,IACZ,MAAOtuB,GAKV,QAASyuB,IAAmBvvB,EAAM4D,EAAO4rB,GAIxC,GAAI/rB,GAAUyc,EAAQtW,KAAMhG,EAC5B,OAAOH,GAGN/B,KAAK+tB,IAAK,EAAGhsB,EAAS,IAAQ+rB,GAAY,KAAU/rB,EAAS,IAAO,MACpEG,EAGF,QAAS8rB,IAAsB1vB,EAAMc,EAAM6uB,EAAOC,EAAaC,GAW9D,IAVA,GAAI5vB,GAAI0vB,KAAYC,EAAc,SAAW,WAG5C,EAGS,UAAT9uB,EAAmB,EAAI,EAEvB0N,EAAM,EAECvO,EAAI,EAAGA,GAAK,EAGJ,WAAV0vB,IACJnhB,GAAOnQ,EAAOkiB,IAAKvgB,EAAM2vB,EAAQxP,GAAWlgB,IAAK,EAAM4vB,IAGnDD,GAGW,YAAVD,IACJnhB,GAAOnQ,EAAOkiB,IAAKvgB,EAAM,UAAYmgB,GAAWlgB,IAAK,EAAM4vB,IAI7C,WAAVF,IACJnhB,GAAOnQ,EAAOkiB,IAAKvgB,EAAM,SAAWmgB,GAAWlgB,GAAM,SAAS,EAAM4vB,MAKrErhB,GAAOnQ,EAAOkiB,IAAKvgB,EAAM,UAAYmgB,GAAWlgB,IAAK,EAAM4vB,GAG5C,YAAVF,IACJnhB,GAAOnQ,EAAOkiB,IAAKvgB,EAAM,SAAWmgB,GAAWlgB,GAAM,SAAS,EAAM4vB,IAKvE,OAAOrhB,GAGR,QAASshB,IAAkB9vB,EAAMc,EAAM6uB,GAGtC,GAAInhB,GACHuhB,GAAmB,EACnBF,EAAS7C,GAAWhtB,GACpB4vB,EAAiE,eAAnDvxB,EAAOkiB,IAAKvgB,EAAM,aAAa,EAAO6vB,EAYrD,IAPK7vB,EAAKgwB,iBAAiB5wB,SAC1BoP,EAAMxO,EAAKiwB,wBAAyBnvB,IAMhC0N,GAAO,GAAY,MAAPA,EAAc,CAS9B,GANAA,EAAM4f,GAAQpuB,EAAMc,EAAM+uB,IACrBrhB,EAAM,GAAY,MAAPA,KACfA,EAAMxO,EAAKqgB,MAAOvf,IAIdisB,GAAU7iB,KAAMsE,GACpB,MAAOA,EAKRuhB,GAAmBH,IAChBnyB,EAAQwwB,qBAAuBzf,IAAQxO,EAAKqgB,MAAOvf,IAGtD0N,EAAMjM,WAAYiM,IAAS,EAI5B,MAASA,GACRkhB,GACC1vB,EACAc,EACA6uB,IAAWC,EAAc,SAAW,WACpCG,EACAF,GAEE,KAGLxxB,EAAOuC,QAINsvB,UACCC,SACC7wB,IAAK,SAAUU,EAAMquB,GACpB,GAAKA,EAAW,CAGf,GAAI3uB,GAAM0uB,GAAQpuB,EAAM,UACxB,OAAe,KAARN,EAAa,IAAMA,MAO9ByhB,WACCiP,yBAA2B,EAC3BC,aAAe,EACfC,aAAe,EACfC,UAAY,EACZC,YAAc,EACdtB,YAAc,EACduB,YAAc,EACdN,SAAW,EACXO,OAAS,EACTC,SAAW,EACXC,QAAU,EACVC,QAAU,EACVC,MAAQ,GAKTC,UACCC,QAAS,YAIV3Q,MAAO,SAAUrgB,EAAMc,EAAM8C,EAAO+rB,GAGnC,GAAM3vB,GAA0B,IAAlBA,EAAKiJ,UAAoC,IAAlBjJ,EAAKiJ,UAAmBjJ,EAAKqgB,MAAlE,CAKA,GAAI3gB,GAAKwC,EAAMud,EACdwR,EAAW5yB,EAAOuE,UAAW9B,GAC7Buf,EAAQrgB,EAAKqgB,KASd,OAPAvf,GAAOzC,EAAO0yB,SAAUE,KACrB5yB,EAAO0yB,SAAUE,GAAa5B,GAAgB4B,IAAcA,GAG/DxR,EAAQphB,EAAO6xB,SAAUpvB,IAAUzC,EAAO6xB,SAAUe,GAGrCzvB,SAAVoC,EAoCC6b,GAAS,OAASA,IACwBje,UAA5C9B,EAAM+f,EAAMngB,IAAKU,GAAM,EAAO2vB,IAEzBjwB,EAID2gB,EAAOvf,IA1CdoB,QAAc0B,GAGA,WAAT1B,IAAuBxC,EAAMwgB,EAAQtW,KAAMhG,KAAalE,EAAK,KACjEkE,EAAQ8c,GAAW1gB,EAAMc,EAAMpB,GAG/BwC,EAAO,UAIM,MAAT0B,GAAiBA,IAAUA,IAKlB,WAAT1B,IACJ0B,GAASlE,GAAOA,EAAK,KAASrB,EAAO8iB,UAAW8P,GAAa,GAAK,OAI7DxzB,EAAQswB,iBAA6B,KAAVnqB,GAAiD,IAAjC9C,EAAK7D,QAAS,gBAC9DojB,EAAOvf,GAAS,WAIX2e,GAAY,OAASA,IACsBje,UAA9CoC,EAAQ6b,EAAMhB,IAAKze,EAAM4D,EAAO+rB,MAElCtP,EAAOvf,GAAS8C,IAlBjB,UAmCF2c,IAAK,SAAUvgB,EAAMc,EAAM6uB,EAAOE,GACjC,GAAIrhB,GAAKjP,EAAKkgB,EACbwR,EAAW5yB,EAAOuE,UAAW9B,EAyB9B,OAtBAA,GAAOzC,EAAO0yB,SAAUE,KACrB5yB,EAAO0yB,SAAUE,GAAa5B,GAAgB4B,IAAcA,GAG/DxR,EAAQphB,EAAO6xB,SAAUpvB,IAAUzC,EAAO6xB,SAAUe,GAG/CxR,GAAS,OAASA,KACtBjR,EAAMiR,EAAMngB,IAAKU,GAAM,EAAM2vB,IAIjBnuB,SAARgN,IACJA,EAAM4f,GAAQpuB,EAAMc,EAAM+uB,IAId,WAARrhB,GAAoB1N,IAAQkuB,MAChCxgB,EAAMwgB,GAAoBluB,IAIZ,KAAV6uB,GAAgBA,GACpBpwB,EAAMgD,WAAYiM,GACXmhB,KAAU,GAAQuB,SAAU3xB,GAAQA,GAAO,EAAIiP,GAEhDA,KAITnQ,EAAOwB,MAAQ,SAAU,SAAW,SAAUI,EAAGa,GAChDzC,EAAO6xB,SAAUpvB,IAChBxB,IAAK,SAAUU,EAAMquB,EAAUsB,GAC9B,GAAKtB,EAIJ,OAAOO,GAAa1kB,KAAM7L,EAAOkiB,IAAKvgB,EAAM,aAQxCA,EAAKgwB,iBAAiB5wB,QAAWY,EAAKiwB,wBAAwBtC,MAIhEmC,GAAkB9vB,EAAMc,EAAM6uB,GAH9BnP,GAAMxgB,EAAM6uB,GAAS,WACpB,MAAOiB,IAAkB9vB,EAAMc,EAAM6uB,MAM1ClR,IAAK,SAAUze,EAAM4D,EAAO+rB,GAC3B,GAAIlsB,GACHosB,EAASF,GAAS3C,GAAWhtB,GAC7BwvB,EAAWG,GAASD,GACnB1vB,EACAc,EACA6uB,EACmD,eAAnDtxB,EAAOkiB,IAAKvgB,EAAM,aAAa,EAAO6vB,GACtCA,EAWF,OAPKL,KAAc/rB,EAAUyc,EAAQtW,KAAMhG,KACb,QAA3BH,EAAS,IAAO,QAElBzD,EAAKqgB,MAAOvf,GAAS8C,EACrBA,EAAQvF,EAAOkiB,IAAKvgB,EAAMc,IAGpByuB,GAAmBvvB,EAAM4D,EAAO4rB,OAK1CnxB,EAAO6xB,SAASzC,WAAagB,GAAchxB,EAAQ0wB,mBAClD,SAAUnuB,EAAMquB,GACf,GAAKA,EACJ,OAAS9rB,WAAY6rB,GAAQpuB,EAAM,gBAClCA,EAAKiwB,wBAAwBkB,KAC5B3Q,GAAMxgB,GAAQytB,WAAY,GAAK,WAC9B,MAAOztB,GAAKiwB,wBAAwBkB,QAElC,OAMR9yB,EAAOwB,MACNuxB,OAAQ,GACRC,QAAS,GACTC,OAAQ,SACN,SAAUC,EAAQC,GACpBnzB,EAAO6xB,SAAUqB,EAASC,IACzBC,OAAQ,SAAU7tB,GAOjB,IANA,GAAI3D,GAAI,EACPyxB,KAGAC,EAAyB,gBAAV/tB,GAAqBA,EAAMS,MAAO,MAAUT,GAEpD3D,EAAI,EAAGA,IACdyxB,EAAUH,EAASpR,GAAWlgB,GAAMuxB,GACnCG,EAAO1xB,IAAO0xB,EAAO1xB,EAAI,IAAO0xB,EAAO,EAGzC,OAAOD,KAIH5E,GAAQ5iB,KAAMqnB,KACnBlzB,EAAO6xB,SAAUqB,EAASC,GAAS/S,IAAM8Q,MAI3ClxB,EAAOG,GAAGoC,QACT2f,IAAK,SAAUzf,EAAM8C,GACpB,MAAOka,GAAQthB,KAAM,SAAUwD,EAAMc,EAAM8C,GAC1C,GAAIisB,GAAQtvB,EACXR,KACAE,EAAI,CAEL,IAAK5B,EAAOkD,QAAST,GAAS,CAI7B,IAHA+uB,EAAS7C,GAAWhtB,GACpBO,EAAMO,EAAK1B,OAEHa,EAAIM,EAAKN,IAChBF,EAAKe,EAAMb,IAAQ5B,EAAOkiB,IAAKvgB,EAAMc,EAAMb,IAAK,EAAO4vB,EAGxD,OAAO9vB,GAGR,MAAiByB,UAAVoC,EACNvF,EAAOgiB,MAAOrgB,EAAMc,EAAM8C,GAC1BvF,EAAOkiB,IAAKvgB,EAAMc,IACjBA,EAAM8C,EAAOzD,UAAUf,OAAS,KAKrC,SAASwyB,IAAO5xB,EAAMa,EAAS8d,EAAMle,EAAKoxB,GACzC,MAAO,IAAID,IAAM3yB,UAAUR,KAAMuB,EAAMa,EAAS8d,EAAMle,EAAKoxB,GAE5DxzB,EAAOuzB,MAAQA,GAEfA,GAAM3yB,WACLE,YAAayyB,GACbnzB,KAAM,SAAUuB,EAAMa,EAAS8d,EAAMle,EAAKoxB,EAAQ3Q,GACjD1kB,KAAKwD,KAAOA,EACZxD,KAAKmiB,KAAOA,EACZniB,KAAKq1B,OAASA,GAAUxzB,EAAOwzB,OAAOvP,SACtC9lB,KAAKqE,QAAUA,EACfrE,KAAKkU,MAAQlU,KAAKyH,IAAMzH,KAAKgP,MAC7BhP,KAAKiE,IAAMA,EACXjE,KAAK0kB,KAAOA,IAAU7iB,EAAO8iB,UAAWxC,GAAS,GAAK,OAEvDnT,IAAK,WACJ,GAAIiU,GAAQmS,GAAME,UAAWt1B,KAAKmiB,KAElC,OAAOc,IAASA,EAAMngB,IACrBmgB,EAAMngB,IAAK9C,MACXo1B,GAAME,UAAUxP,SAAShjB,IAAK9C,OAEhCu1B,IAAK,SAAUC,GACd,GAAIC,GACHxS,EAAQmS,GAAME,UAAWt1B,KAAKmiB,KAoB/B,OAlBKniB,MAAKqE,QAAQqxB,SACjB11B,KAAK21B,IAAMF,EAAQ5zB,EAAOwzB,OAAQr1B,KAAKq1B,QACtCG,EAASx1B,KAAKqE,QAAQqxB,SAAWF,EAAS,EAAG,EAAGx1B,KAAKqE,QAAQqxB,UAG9D11B,KAAK21B,IAAMF,EAAQD,EAEpBx1B,KAAKyH,KAAQzH,KAAKiE,IAAMjE,KAAKkU,OAAUuhB,EAAQz1B,KAAKkU,MAE/ClU,KAAKqE,QAAQuxB,MACjB51B,KAAKqE,QAAQuxB,KAAK50B,KAAMhB,KAAKwD,KAAMxD,KAAKyH,IAAKzH,MAGzCijB,GAASA,EAAMhB,IACnBgB,EAAMhB,IAAKjiB,MAEXo1B,GAAME,UAAUxP,SAAS7D,IAAKjiB,MAExBA,OAITo1B,GAAM3yB,UAAUR,KAAKQ,UAAY2yB,GAAM3yB,UAEvC2yB,GAAME,WACLxP,UACChjB,IAAK,SAAUshB,GACd,GAAI3Q,EAIJ,OAA6B,KAAxB2Q,EAAM5gB,KAAKiJ,UACa,MAA5B2X,EAAM5gB,KAAM4gB,EAAMjC,OAAoD,MAAlCiC,EAAM5gB,KAAKqgB,MAAOO,EAAMjC,MACrDiC,EAAM5gB,KAAM4gB,EAAMjC,OAO1B1O,EAAS5R,EAAOkiB,IAAKK,EAAM5gB,KAAM4gB,EAAMjC,KAAM,IAGrC1O,GAAqB,SAAXA,EAAwBA,EAAJ,IAEvCwO,IAAK,SAAUmC,GAKTviB,EAAOg0B,GAAGD,KAAMxR,EAAMjC,MAC1BtgB,EAAOg0B,GAAGD,KAAMxR,EAAMjC,MAAQiC,GACK,IAAxBA,EAAM5gB,KAAKiJ,UACiC,MAArD2X,EAAM5gB,KAAKqgB,MAAOhiB,EAAO0yB,SAAUnQ,EAAMjC,SAC1CtgB,EAAO6xB,SAAUtP,EAAMjC,MAGxBiC,EAAM5gB,KAAM4gB,EAAMjC,MAASiC,EAAM3c,IAFjC5F,EAAOgiB,MAAOO,EAAM5gB,KAAM4gB,EAAMjC,KAAMiC,EAAM3c,IAAM2c,EAAMM,SAU5D0Q,GAAME,UAAUQ,UAAYV,GAAME,UAAUS,YAC3C9T,IAAK,SAAUmC,GACTA,EAAM5gB,KAAKiJ,UAAY2X,EAAM5gB,KAAK9B,aACtC0iB,EAAM5gB,KAAM4gB,EAAMjC,MAASiC,EAAM3c,OAKpC5F,EAAOwzB,QACNW,OAAQ,SAAUC,GACjB,MAAOA,IAERC,MAAO,SAAUD,GAChB,MAAO,GAAM/wB,KAAKixB,IAAKF,EAAI/wB,KAAKkxB,IAAO,GAExCtQ,SAAU,SAGXjkB,EAAOg0B,GAAKT,GAAM3yB,UAAUR,KAG5BJ,EAAOg0B,GAAGD,OAKV,IACCS,IAAOC,GACPC,GAAW,yBACXC,GAAO,aAER,SAASC,MACHH,KACJv2B,EAAO22B,sBAAuBD,IAC9B50B,EAAOg0B,GAAGc,QAKZ,QAASC,MAIR,MAHA72B,GAAO+f,WAAY,WAClBuW,GAAQrxB,SAEAqxB,GAAQx0B,EAAO4F,MAIzB,QAASovB,IAAOnxB,EAAMoxB,GACrB,GAAI1J,GACH3pB,EAAI,EACJmL,GAAUmoB,OAAQrxB,EAKnB,KADAoxB,EAAeA,EAAe,EAAI,EAC1BrzB,EAAI,EAAGA,GAAK,EAAIqzB,EACvB1J,EAAQzJ,GAAWlgB,GACnBmL,EAAO,SAAWwe,GAAUxe,EAAO,UAAYwe,GAAU1nB,CAO1D,OAJKoxB,KACJloB,EAAM+kB,QAAU/kB,EAAMuiB,MAAQzrB,GAGxBkJ,EAGR,QAASooB,IAAa5vB,EAAO+a,EAAM8U,GAKlC,IAJA,GAAI7S,GACHwK,GAAesI,GAAUC,SAAUhV,QAAe5hB,OAAQ22B,GAAUC,SAAU,MAC9E5b,EAAQ,EACR3Y,EAASgsB,EAAWhsB,OACb2Y,EAAQ3Y,EAAQ2Y,IACvB,GAAO6I,EAAQwK,EAAYrT,GAAQva,KAAMi2B,EAAW9U,EAAM/a,GAGzD,MAAOgd,GAKV,QAASgT,IAAkB5zB,EAAM0nB,EAAOmM,GACvC,GAAIlV,GAAM/a,EAAOge,EAAQnC,EAAOqU,EAASC,EAAWC,EAAgB1T,EACnE2T,EAAQ,SAAWvM,IAAS,UAAYA,GACxCwM,EAAO13B,KACPytB,KACA5J,EAAQrgB,EAAKqgB,MACb8T,EAASn0B,EAAKiJ,UAAYmX,GAAoBpgB,GAC9Co0B,EAAWvV,EAASvf,IAAKU,EAAM,SAG1B6zB,GAAKza,QACVqG,EAAQphB,EAAOqhB,YAAa1f,EAAM,MACX,MAAlByf,EAAM4U,WACV5U,EAAM4U,SAAW,EACjBP,EAAUrU,EAAMnN,MAAMgH,KACtBmG,EAAMnN,MAAMgH,KAAO,WACZmG,EAAM4U,UACXP,MAIHrU,EAAM4U,WAENH,EAAKtZ,OAAQ,WAGZsZ,EAAKtZ,OAAQ,WACZ6E,EAAM4U,WACAh2B,EAAO+a,MAAOpZ,EAAM,MAAOZ,QAChCqgB,EAAMnN,MAAMgH,WAOhB,KAAMqF,IAAQ+I,GAEb,GADA9jB,EAAQ8jB,EAAO/I,GACVoU,GAAS7oB,KAAMtG,GAAU,CAG7B,SAFO8jB,GAAO/I,GACdiD,EAASA,GAAoB,WAAVhe,EACdA,KAAYuwB,EAAS,OAAS,QAAW,CAI7C,GAAe,SAAVvwB,IAAoBwwB,GAAiC5yB,SAArB4yB,EAAUzV,GAK9C,QAJAwV,IAAS,EAOXlK,EAAMtL,GAASyV,GAAYA,EAAUzV,IAAUtgB,EAAOgiB,MAAOrgB,EAAM2e,GAMrE,GADAoV,GAAa11B,EAAOqE,cAAeglB,GAC7BqM,IAAa11B,EAAOqE,cAAeunB,GAAzC,CAKKgK,GAA2B,IAAlBj0B,EAAKiJ,WAKlB4qB,EAAKS,UAAajU,EAAMiU,SAAUjU,EAAMkU,UAAWlU,EAAMmU,WAGzDR,EAAiBI,GAAYA,EAAS9T,QACf,MAAlB0T,IACJA,EAAiBnV,EAASvf,IAAKU,EAAM,YAEtCsgB,EAAUjiB,EAAOkiB,IAAKvgB,EAAM,WACX,SAAZsgB,IACC0T,EACJ1T,EAAU0T,GAIVxS,IAAYxhB,IAAQ,GACpBg0B,EAAiBh0B,EAAKqgB,MAAMC,SAAW0T,EACvC1T,EAAUjiB,EAAOkiB,IAAKvgB,EAAM,WAC5BwhB,IAAYxhB,OAKG,WAAZsgB,GAAoC,iBAAZA,GAAgD,MAAlB0T,IACrB,SAAhC31B,EAAOkiB,IAAKvgB,EAAM,WAGhB+zB,IACLG,EAAK1uB,KAAM,WACV6a,EAAMC,QAAU0T,IAEM,MAAlBA,IACJ1T,EAAUD,EAAMC,QAChB0T,EAA6B,SAAZ1T,EAAqB,GAAKA,IAG7CD,EAAMC,QAAU,iBAKduT,EAAKS,WACTjU,EAAMiU,SAAW,SACjBJ,EAAKtZ,OAAQ,WACZyF,EAAMiU,SAAWT,EAAKS,SAAU,GAChCjU,EAAMkU,UAAYV,EAAKS,SAAU,GACjCjU,EAAMmU,UAAYX,EAAKS,SAAU,MAKnCP,GAAY,CACZ,KAAMpV,IAAQsL,GAGP8J,IACAK,EACC,UAAYA,KAChBD,EAASC,EAASD,QAGnBC,EAAWvV,EAASf,OAAQ9d,EAAM,UAAYsgB,QAAS0T,IAInDpS,IACJwS,EAASD,QAAUA,GAIfA,GACJ3S,IAAYxhB,IAAQ,GAKrBk0B,EAAK1uB,KAAM,WAKJ2uB,GACL3S,IAAYxhB,IAEb6e,EAASpF,OAAQzZ,EAAM,SACvB,KAAM2e,IAAQsL,GACb5rB,EAAOgiB,MAAOrgB,EAAM2e,EAAMsL,EAAMtL,OAMnCoV,EAAYP,GAAaW,EAASC,EAAUzV,GAAS,EAAGA,EAAMuV,GACtDvV,IAAQyV,KACfA,EAAUzV,GAASoV,EAAUrjB,MACxByjB,IACJJ,EAAUtzB,IAAMszB,EAAUrjB,MAC1BqjB,EAAUrjB,MAAQ,KAMtB,QAAS+jB,IAAY/M,EAAOgN,GAC3B,GAAI3c,GAAOjX,EAAM+wB,EAAQjuB,EAAO6b,CAGhC,KAAM1H,IAAS2P,GAed,GAdA5mB,EAAOzC,EAAOuE,UAAWmV,GACzB8Z,EAAS6C,EAAe5zB,GACxB8C,EAAQ8jB,EAAO3P,GACV1Z,EAAOkD,QAASqC,KACpBiuB,EAASjuB,EAAO,GAChBA,EAAQ8jB,EAAO3P,GAAUnU,EAAO,IAG5BmU,IAAUjX,IACd4mB,EAAO5mB,GAAS8C,QACT8jB,GAAO3P,IAGf0H,EAAQphB,EAAO6xB,SAAUpvB,GACpB2e,GAAS,UAAYA,GAAQ,CACjC7b,EAAQ6b,EAAMgS,OAAQ7tB,SACf8jB,GAAO5mB,EAId,KAAMiX,IAASnU,GACNmU,IAAS2P,KAChBA,EAAO3P,GAAUnU,EAAOmU,GACxB2c,EAAe3c,GAAU8Z,OAI3B6C,GAAe5zB,GAAS+wB,EAK3B,QAAS6B,IAAW1zB,EAAM20B,EAAY9zB,GACrC,GAAIoP,GACH2kB,EACA7c,EAAQ,EACR3Y,EAASs0B,GAAUmB,WAAWz1B,OAC9Byb,EAAWxc,EAAOmc,WAAWI,OAAQ,iBAG7BuY,GAAKnzB,OAEbmzB,EAAO,WACN,GAAKyB,EACJ,OAAO,CAYR,KAVA,GAAIE,GAAcjC,IAASO,KAC1B1W,EAAYhb,KAAK+tB,IAAK,EAAGgE,EAAUsB,UAAYtB,EAAUvB,SAAW4C,GAIpElgB,EAAO8H,EAAY+W,EAAUvB,UAAY,EACzCF,EAAU,EAAIpd,EACdmD,EAAQ,EACR3Y,EAASq0B,EAAUuB,OAAO51B,OAEnB2Y,EAAQ3Y,EAAQ2Y,IACvB0b,EAAUuB,OAAQjd,GAAQga,IAAKC,EAKhC,OAFAnX,GAASkB,WAAY/b,GAAQyzB,EAAWzB,EAAStV,IAE5CsV,EAAU,GAAK5yB,EACZsd,GAEP7B,EAASmB,YAAahc,GAAQyzB,KACvB,IAGTA,EAAY5Y,EAASR,SACpBra,KAAMA,EACN0nB,MAAOrpB,EAAOuC,UAAY+zB,GAC1Bd,KAAMx1B,EAAOuC,QAAQ,GACpB8zB,iBACA7C,OAAQxzB,EAAOwzB,OAAOvP,UACpBzhB,GACHo0B,mBAAoBN,EACpBO,gBAAiBr0B,EACjBk0B,UAAWlC,IAASO,KACpBlB,SAAUrxB,EAAQqxB,SAClB8C,UACAxB,YAAa,SAAU7U,EAAMle,GAC5B,GAAImgB,GAAQviB,EAAOuzB,MAAO5xB,EAAMyzB,EAAUI,KAAMlV,EAAMle,EACpDgzB,EAAUI,KAAKa,cAAe/V,IAAU8U,EAAUI,KAAKhC,OAEzD,OADA4B,GAAUuB,OAAOh4B,KAAM4jB,GAChBA,GAERjB,KAAM,SAAUwV,GACf,GAAIpd,GAAQ,EAIX3Y,EAAS+1B,EAAU1B,EAAUuB,OAAO51B,OAAS,CAC9C,IAAKw1B,EACJ,MAAOp4B,KAGR,KADAo4B,GAAU,EACF7c,EAAQ3Y,EAAQ2Y,IACvB0b,EAAUuB,OAAQjd,GAAQga,IAAK,EAUhC,OANKoD,IACJta,EAASkB,WAAY/b,GAAQyzB,EAAW,EAAG,IAC3C5Y,EAASmB,YAAahc,GAAQyzB,EAAW0B,KAEzCta,EAASuB,WAAYpc,GAAQyzB,EAAW0B,IAElC34B,QAGTkrB,EAAQ+L,EAAU/L,KAInB,KAFA+M,GAAY/M,EAAO+L,EAAUI,KAAKa,eAE1B3c,EAAQ3Y,EAAQ2Y,IAEvB,GADA9H,EAASyjB,GAAUmB,WAAY9c,GAAQva,KAAMi2B,EAAWzzB,EAAM0nB,EAAO+L,EAAUI,MAM9E,MAJKx1B,GAAOgD,WAAY4O,EAAO0P,QAC9BthB,EAAOqhB,YAAa+T,EAAUzzB,KAAMyzB,EAAUI,KAAKza,OAAQuG,KAC1DthB,EAAOyF,MAAOmM,EAAO0P,KAAM1P,IAEtBA,CAmBT,OAfA5R,GAAO0B,IAAK2nB,EAAO8L,GAAaC,GAE3Bp1B,EAAOgD,WAAYoyB,EAAUI,KAAKnjB,QACtC+iB,EAAUI,KAAKnjB,MAAMlT,KAAMwC,EAAMyzB,GAGlCp1B,EAAOg0B,GAAG+C,MACT/2B,EAAOuC,OAAQuyB,GACdnzB,KAAMA,EACNk0B,KAAMT,EACNra,MAAOqa,EAAUI,KAAKza,SAKjBqa,EAAUrY,SAAUqY,EAAUI,KAAKzY,UACxC5V,KAAMiuB,EAAUI,KAAKruB,KAAMiuB,EAAUI,KAAKwB,UAC1C/a,KAAMmZ,EAAUI,KAAKvZ,MACrBM,OAAQ6Y,EAAUI,KAAKjZ,QAG1Bvc,EAAOq1B,UAAYr1B,EAAOuC,OAAQ8yB,IAEjCC,UACC2B,KAAO,SAAU3W,EAAM/a,GACtB,GAAIgd,GAAQpkB,KAAKg3B,YAAa7U,EAAM/a,EAEpC,OADA8c,IAAWE,EAAM5gB,KAAM2e,EAAMuB,EAAQtW,KAAMhG,GAASgd,GAC7CA,KAIT2U,QAAS,SAAU7N,EAAO5nB,GACpBzB,EAAOgD,WAAYqmB,IACvB5nB,EAAW4nB,EACXA,GAAU,MAEVA,EAAQA,EAAMne,MAAOoP,EAOtB,KAJA,GAAIgG,GACH5G,EAAQ,EACR3Y,EAASsoB,EAAMtoB,OAER2Y,EAAQ3Y,EAAQ2Y,IACvB4G,EAAO+I,EAAO3P,GACd2b,GAAUC,SAAUhV,GAAS+U,GAAUC,SAAUhV,OACjD+U,GAAUC,SAAUhV,GAAOvQ,QAAStO,IAItC+0B,YAAcjB,IAEd4B,UAAW,SAAU11B,EAAUosB,GACzBA,EACJwH,GAAUmB,WAAWzmB,QAAStO,GAE9B4zB,GAAUmB,WAAW73B,KAAM8C,MAK9BzB,EAAOo3B,MAAQ,SAAUA,EAAO5D,EAAQrzB,GACvC,GAAIk3B,GAAMD,GAA0B,gBAAVA,GAAqBp3B,EAAOuC,UAAY60B,IACjEJ,SAAU72B,IAAOA,GAAMqzB,GACtBxzB,EAAOgD,WAAYo0B,IAAWA,EAC/BvD,SAAUuD,EACV5D,OAAQrzB,GAAMqzB,GAAUA,IAAWxzB,EAAOgD,WAAYwwB,IAAYA,EA+BnE,OA3BKxzB,GAAOg0B,GAAG1N,KAAOvoB,EAAS+3B,OAC9BuB,EAAIxD,SAAW,EAGfwD,EAAIxD,SAAmC,gBAAjBwD,GAAIxD,SACzBwD,EAAIxD,SAAWwD,EAAIxD,WAAY7zB,GAAOg0B,GAAGsD,OACxCt3B,EAAOg0B,GAAGsD,OAAQD,EAAIxD,UAAa7zB,EAAOg0B,GAAGsD,OAAOrT,SAIrC,MAAboT,EAAItc,OAAiBsc,EAAItc,SAAU,IACvCsc,EAAItc,MAAQ,MAIbsc,EAAIjV,IAAMiV,EAAIL,SAEdK,EAAIL,SAAW,WACTh3B,EAAOgD,WAAYq0B,EAAIjV,MAC3BiV,EAAIjV,IAAIjjB,KAAMhB,MAGVk5B,EAAItc,OACR/a,EAAOkhB,QAAS/iB,KAAMk5B,EAAItc,QAIrBsc,GAGRr3B,EAAOG,GAAGoC,QACTg1B,OAAQ,SAAUH,EAAOI,EAAIhE,EAAQ/xB,GAGpC,MAAOtD,MAAKwQ,OAAQoT,IAAqBG,IAAK,UAAW,GAAIkB,OAG3DhhB,MAAMq1B,SAAW3F,QAAS0F,GAAMJ,EAAO5D,EAAQ/xB,IAElDg2B,QAAS,SAAUnX,EAAM8W,EAAO5D,EAAQ/xB,GACvC,GAAIwS,GAAQjU,EAAOqE,cAAeic,GACjCoX,EAAS13B,EAAOo3B,MAAOA,EAAO5D,EAAQ/xB,GACtCk2B,EAAc,WAGb,GAAI9B,GAAOR,GAAWl3B,KAAM6B,EAAOuC,UAAY+d,GAAQoX,IAGlDzjB,GAASuM,EAASvf,IAAK9C,KAAM,YACjC03B,EAAKvU,MAAM,GAKd,OAFCqW,GAAYC,OAASD,EAEf1jB,GAASyjB,EAAO3c,SAAU,EAChC5c,KAAKqD,KAAMm2B,GACXx5B,KAAK4c,MAAO2c,EAAO3c,MAAO4c,IAE5BrW,KAAM,SAAUzd,EAAM2d,EAAYsV,GACjC,GAAIe,GAAY,SAAUzW,GACzB,GAAIE,GAAOF,EAAME,WACVF,GAAME,KACbA,EAAMwV,GAYP,OATqB,gBAATjzB,KACXizB,EAAUtV,EACVA,EAAa3d,EACbA,EAAOV,QAEHqe,GAAc3d,KAAS,GAC3B1F,KAAK4c,MAAOlX,GAAQ,SAGd1F,KAAKqD,KAAM,WACjB,GAAI0f,IAAU,EACbxH,EAAgB,MAAR7V,GAAgBA,EAAO,aAC/Bi0B,EAAS93B,EAAO83B,OAChBzX,EAAOG,EAASvf,IAAK9C,KAEtB,IAAKub,EACC2G,EAAM3G,IAAW2G,EAAM3G,GAAQ4H,MACnCuW,EAAWxX,EAAM3G,QAGlB,KAAMA,IAAS2G,GACTA,EAAM3G,IAAW2G,EAAM3G,GAAQ4H,MAAQqT,GAAK9oB,KAAM6N,IACtDme,EAAWxX,EAAM3G,GAKpB,KAAMA,EAAQoe,EAAO/2B,OAAQ2Y,KACvBoe,EAAQpe,GAAQ/X,OAASxD,MACnB,MAAR0F,GAAgBi0B,EAAQpe,GAAQqB,QAAUlX,IAE5Ci0B,EAAQpe,GAAQmc,KAAKvU,KAAMwV,GAC3B5V,GAAU,EACV4W,EAAOx1B,OAAQoX,EAAO,KAOnBwH,GAAY4V,GAChB92B,EAAOkhB,QAAS/iB,KAAM0F,MAIzB+zB,OAAQ,SAAU/zB,GAIjB,MAHKA,MAAS,IACbA,EAAOA,GAAQ,MAET1F,KAAKqD,KAAM,WACjB,GAAIkY,GACH2G,EAAOG,EAASvf,IAAK9C,MACrB4c,EAAQsF,EAAMxc,EAAO,SACrBud,EAAQf,EAAMxc,EAAO,cACrBi0B,EAAS93B,EAAO83B,OAChB/2B,EAASga,EAAQA,EAAMha,OAAS,CAajC,KAVAsf,EAAKuX,QAAS,EAGd53B,EAAO+a,MAAO5c,KAAM0F,MAEfud,GAASA,EAAME,MACnBF,EAAME,KAAKniB,KAAMhB,MAAM,GAIlBub,EAAQoe,EAAO/2B,OAAQ2Y,KACvBoe,EAAQpe,GAAQ/X,OAASxD,MAAQ25B,EAAQpe,GAAQqB,QAAUlX,IAC/Di0B,EAAQpe,GAAQmc,KAAKvU,MAAM,GAC3BwW,EAAOx1B,OAAQoX,EAAO,GAKxB,KAAMA,EAAQ,EAAGA,EAAQ3Y,EAAQ2Y,IAC3BqB,EAAOrB,IAAWqB,EAAOrB,GAAQke,QACrC7c,EAAOrB,GAAQke,OAAOz4B,KAAMhB,YAKvBkiB,GAAKuX,YAKf53B,EAAOwB,MAAQ,SAAU,OAAQ,QAAU,SAAUI,EAAGa,GACvD,GAAIs1B,GAAQ/3B,EAAOG,GAAIsC,EACvBzC,GAAOG,GAAIsC,GAAS,SAAU20B,EAAO5D,EAAQ/xB,GAC5C,MAAgB,OAAT21B,GAAkC,iBAAVA,GAC9BW,EAAMl2B,MAAO1D,KAAM2D,WACnB3D,KAAKs5B,QAASzC,GAAOvyB,GAAM,GAAQ20B,EAAO5D,EAAQ/xB,MAKrDzB,EAAOwB,MACNw2B,UAAWhD,GAAO,QAClBiD,QAASjD,GAAO,QAChBkD,YAAalD,GAAO,UACpBmD,QAAUrG,QAAS,QACnBsG,SAAWtG,QAAS,QACpBuG,YAAcvG,QAAS,WACrB,SAAUrvB,EAAM4mB,GAClBrpB,EAAOG,GAAIsC,GAAS,SAAU20B,EAAO5D,EAAQ/xB,GAC5C,MAAOtD,MAAKs5B,QAASpO,EAAO+N,EAAO5D,EAAQ/xB,MAI7CzB,EAAO83B,UACP93B,EAAOg0B,GAAGc,KAAO,WAChB,GAAIiC,GACHn1B,EAAI,EACJk2B,EAAS93B,EAAO83B,MAIjB,KAFAtD,GAAQx0B,EAAO4F,MAEPhE,EAAIk2B,EAAO/2B,OAAQa,IAC1Bm1B,EAAQe,EAAQl2B,GAGVm1B,KAAWe,EAAQl2B,KAAQm1B,GAChCe,EAAOx1B,OAAQV,IAAK,EAIhBk2B,GAAO/2B,QACZf,EAAOg0B,GAAG1S,OAEXkT,GAAQrxB,QAGTnD,EAAOg0B,GAAG+C,MAAQ,SAAUA,GAC3B/2B,EAAO83B,OAAOn5B,KAAMo4B,GACfA,IACJ/2B,EAAOg0B,GAAG3hB,QAEVrS,EAAO83B,OAAOnwB,OAIhB3H,EAAOg0B,GAAGsE,SAAW,GACrBt4B,EAAOg0B,GAAG3hB,MAAQ,WACXoiB,KACLA,GAAUv2B,EAAO22B,sBAChB32B,EAAO22B,sBAAuBD,IAC9B12B,EAAOq6B,YAAav4B,EAAOg0B,GAAGc,KAAM90B,EAAOg0B,GAAGsE,YAIjDt4B,EAAOg0B,GAAG1S,KAAO,WACXpjB,EAAOs6B,qBACXt6B,EAAOs6B,qBAAsB/D,IAE7Bv2B,EAAOu6B,cAAehE,IAGvBA,GAAU,MAGXz0B,EAAOg0B,GAAGsD,QACToB,KAAM,IACNC,KAAM,IAGN1U,SAAU,KAMXjkB,EAAOG,GAAGy4B,MAAQ,SAAUC,EAAMh1B,GAIjC,MAHAg1B,GAAO74B,EAAOg0B,GAAKh0B,EAAOg0B,GAAGsD,OAAQuB,IAAUA,EAAOA,EACtDh1B,EAAOA,GAAQ,KAER1F,KAAK4c,MAAOlX,EAAM,SAAU6G,EAAM0W,GACxC,GAAI0X,GAAU56B,EAAO+f,WAAYvT,EAAMmuB,EACvCzX,GAAME,KAAO,WACZpjB,EAAO66B,aAAcD,OAMxB,WACC,GAAI9pB,GAAQjR,EAAS0B,cAAe,SACnC8G,EAASxI,EAAS0B,cAAe,UACjC43B,EAAM9wB,EAAO3G,YAAa7B,EAAS0B,cAAe,UAEnDuP,GAAMnL,KAAO,WAIbzE,EAAQ45B,QAA0B,KAAhBhqB,EAAMzJ,MAIxBnG,EAAQ65B,YAAc5B,EAAItjB,SAI1B/E,EAAQjR,EAAS0B,cAAe,SAChCuP,EAAMzJ,MAAQ,IACdyJ,EAAMnL,KAAO,QACbzE,EAAQ85B,WAA6B,MAAhBlqB,EAAMzJ,QAI5B,IAAI4zB,IACHlsB,GAAajN,EAAOgQ,KAAK/C,UAE1BjN,GAAOG,GAAGoC,QACT2N,KAAM,SAAUzN,EAAM8C,GACrB,MAAOka,GAAQthB,KAAM6B,EAAOkQ,KAAMzN,EAAM8C,EAAOzD,UAAUf,OAAS,IAGnEq4B,WAAY,SAAU32B,GACrB,MAAOtE,MAAKqD,KAAM,WACjBxB,EAAOo5B,WAAYj7B,KAAMsE,QAK5BzC,EAAOuC,QACN2N,KAAM,SAAUvO,EAAMc,EAAM8C,GAC3B,GAAIlE,GAAK+f,EACRiY,EAAQ13B,EAAKiJ,QAGd,IAAe,IAAVyuB,GAAyB,IAAVA,GAAyB,IAAVA,EAKnC,MAAkC,mBAAtB13B,GAAKmK,aACT9L,EAAOsgB,KAAM3e,EAAMc,EAAM8C,IAKlB,IAAV8zB,GAAgBr5B,EAAOkY,SAAUvW,KACrCyf,EAAQphB,EAAOs5B,UAAW72B,EAAKiC,iBAC5B1E,EAAOgQ,KAAK9E,MAAMjC,KAAK4C,KAAMpJ,GAAS02B,GAAWh2B,SAGtCA,SAAVoC,EACW,OAAVA,MACJvF,GAAOo5B,WAAYz3B,EAAMc,GAIrB2e,GAAS,OAASA,IACuBje,UAA3C9B,EAAM+f,EAAMhB,IAAKze,EAAM4D,EAAO9C,IACzBpB,GAGRM,EAAKoK,aAActJ,EAAM8C,EAAQ,IAC1BA,GAGH6b,GAAS,OAASA,IAA+C,QAApC/f,EAAM+f,EAAMngB,IAAKU,EAAMc,IACjDpB,GAGRA,EAAMrB,EAAO0O,KAAKwB,KAAMvO,EAAMc,GAGhB,MAAPpB,EAAc8B,OAAY9B,KAGlCi4B,WACCz1B,MACCuc,IAAK,SAAUze,EAAM4D,GACpB,IAAMnG,EAAQ85B,YAAwB,UAAV3zB,GAC3BvF,EAAOyE,SAAU9C,EAAM,SAAY,CACnC,GAAIwO,GAAMxO,EAAK4D,KAKf,OAJA5D,GAAKoK,aAAc,OAAQxG,GACtB4K,IACJxO,EAAK4D,MAAQ4K,GAEP5K,MAMX6zB,WAAY,SAAUz3B,EAAM4D,GAC3B,GAAI9C,GACHb,EAAI,EACJ23B,EAAYh0B,GAASA,EAAM2F,MAAOoP;AAEnC,GAAKif,GAA+B,IAAlB53B,EAAKiJ,SACtB,MAAUnI,EAAO82B,EAAW33B,KAC3BD,EAAK0K,gBAAiB5J,MAO1B02B,IACC/Y,IAAK,SAAUze,EAAM4D,EAAO9C,GAQ3B,MAPK8C,MAAU,EAGdvF,EAAOo5B,WAAYz3B,EAAMc,GAEzBd,EAAKoK,aAActJ,EAAMA,GAEnBA,IAITzC,EAAOwB,KAAMxB,EAAOgQ,KAAK9E,MAAMjC,KAAK2Y,OAAO1W,MAAO,QAAU,SAAUtJ,EAAGa,GACxE,GAAI+2B,GAASvsB,GAAYxK,IAAUzC,EAAO0O,KAAKwB,IAE/CjD,IAAYxK,GAAS,SAAUd,EAAMc,EAAM2D,GAC1C,GAAI/E,GAAK2lB,EACRyS,EAAgBh3B,EAAKiC,aAYtB,OAVM0B,KAGL4gB,EAAS/Z,GAAYwsB,GACrBxsB,GAAYwsB,GAAkBp4B,EAC9BA,EAAqC,MAA/Bm4B,EAAQ73B,EAAMc,EAAM2D,GACzBqzB,EACA,KACDxsB,GAAYwsB,GAAkBzS,GAExB3lB,IAOT,IAAIq4B,IAAa,sCAChBC,GAAa,eAEd35B,GAAOG,GAAGoC,QACT+d,KAAM,SAAU7d,EAAM8C,GACrB,MAAOka,GAAQthB,KAAM6B,EAAOsgB,KAAM7d,EAAM8C,EAAOzD,UAAUf,OAAS,IAGnE64B,WAAY,SAAUn3B,GACrB,MAAOtE,MAAKqD,KAAM,iBACVrD,MAAM6B,EAAO65B,QAASp3B,IAAUA,QAK1CzC,EAAOuC,QACN+d,KAAM,SAAU3e,EAAMc,EAAM8C,GAC3B,GAAIlE,GAAK+f,EACRiY,EAAQ13B,EAAKiJ,QAGd,IAAe,IAAVyuB,GAAyB,IAAVA,GAAyB,IAAVA,EAWnC,MAPe,KAAVA,GAAgBr5B,EAAOkY,SAAUvW,KAGrCc,EAAOzC,EAAO65B,QAASp3B,IAAUA,EACjC2e,EAAQphB,EAAOyzB,UAAWhxB,IAGZU,SAAVoC,EACC6b,GAAS,OAASA,IACuBje,UAA3C9B,EAAM+f,EAAMhB,IAAKze,EAAM4D,EAAO9C,IACzBpB,EAGCM,EAAMc,GAAS8C,EAGpB6b,GAAS,OAASA,IAA+C,QAApC/f,EAAM+f,EAAMngB,IAAKU,EAAMc,IACjDpB,EAGDM,EAAMc,IAGdgxB,WACC7f,UACC3S,IAAK,SAAUU,GAOd,GAAIm4B,GAAW95B,EAAO0O,KAAKwB,KAAMvO,EAAM,WAEvC,OAAOm4B,GACNC,SAAUD,EAAU,IACpBJ,GAAW7tB,KAAMlK,EAAK8C,WACrBk1B,GAAW9tB,KAAMlK,EAAK8C,WAAc9C,EAAKgS,KACxC,QAMNkmB,SACCG,MAAO,UACPC,QAAS,eAUL76B,EAAQ65B,cACbj5B,EAAOyzB,UAAU1f,UAChB9S,IAAK,SAAUU,GACd,GAAI2Q,GAAS3Q,EAAK9B,UAIlB,OAHKyS,IAAUA,EAAOzS,YACrByS,EAAOzS,WAAWmU,cAEZ,MAERoM,IAAK,SAAUze,GACd,GAAI2Q,GAAS3Q,EAAK9B,UACbyS,KACJA,EAAO0B,cAEF1B,EAAOzS,YACXyS,EAAOzS,WAAWmU,kBAOvBhU,EAAOwB,MACN,WACA,WACA,YACA,cACA,cACA,UACA,UACA,SACA,cACA,mBACE,WACFxB,EAAO65B,QAAS17B,KAAKuG,eAAkBvG,MAMxC,IAAI+7B,IAAS,aAEb,SAASC,IAAUx4B,GAClB,MAAOA,GAAKmK,cAAgBnK,EAAKmK,aAAc,UAAa,GAG7D9L,EAAOG,GAAGoC,QACT63B,SAAU,SAAU70B,GACnB,GAAI80B,GAAS14B,EAAMwL,EAAKmtB,EAAUC,EAAOp4B,EAAGq4B,EAC3C54B,EAAI,CAEL,IAAK5B,EAAOgD,WAAYuC,GACvB,MAAOpH,MAAKqD,KAAM,SAAUW,GAC3BnC,EAAQ7B,MAAOi8B,SAAU70B,EAAMpG,KAAMhB,KAAMgE,EAAGg4B,GAAUh8B,SAI1D,IAAsB,gBAAVoH,IAAsBA,EAAQ,CACzC80B,EAAU90B,EAAM2F,MAAOoP,MAEvB,OAAU3Y,EAAOxD,KAAMyD,KAKtB,GAJA04B,EAAWH,GAAUx4B,GACrBwL,EAAwB,IAAlBxL,EAAKiJ,WACR,IAAM0vB,EAAW,KAAM/2B,QAAS22B,GAAQ,KAEhC,CACV/3B,EAAI,CACJ,OAAUo4B,EAAQF,EAASl4B,KACrBgL,EAAIvO,QAAS,IAAM27B,EAAQ,KAAQ,IACvCptB,GAAOotB,EAAQ,IAKjBC,GAAax6B,EAAO4E,KAAMuI,GACrBmtB,IAAaE,GACjB74B,EAAKoK,aAAc,QAASyuB,IAMhC,MAAOr8B,OAGRs8B,YAAa,SAAUl1B,GACtB,GAAI80B,GAAS14B,EAAMwL,EAAKmtB,EAAUC,EAAOp4B,EAAGq4B,EAC3C54B,EAAI,CAEL,IAAK5B,EAAOgD,WAAYuC,GACvB,MAAOpH,MAAKqD,KAAM,SAAUW,GAC3BnC,EAAQ7B,MAAOs8B,YAAal1B,EAAMpG,KAAMhB,KAAMgE,EAAGg4B,GAAUh8B,SAI7D,KAAM2D,UAAUf,OACf,MAAO5C,MAAK+R,KAAM,QAAS,GAG5B,IAAsB,gBAAV3K,IAAsBA,EAAQ,CACzC80B,EAAU90B,EAAM2F,MAAOoP,MAEvB,OAAU3Y,EAAOxD,KAAMyD,KAOtB,GANA04B,EAAWH,GAAUx4B,GAGrBwL,EAAwB,IAAlBxL,EAAKiJ,WACR,IAAM0vB,EAAW,KAAM/2B,QAAS22B,GAAQ,KAEhC,CACV/3B,EAAI,CACJ,OAAUo4B,EAAQF,EAASl4B,KAG1B,MAAQgL,EAAIvO,QAAS,IAAM27B,EAAQ,QAClCptB,EAAMA,EAAI5J,QAAS,IAAMg3B,EAAQ,IAAK,IAKxCC,GAAax6B,EAAO4E,KAAMuI,GACrBmtB,IAAaE,GACjB74B,EAAKoK,aAAc,QAASyuB,IAMhC,MAAOr8B,OAGRu8B,YAAa,SAAUn1B,EAAOo1B,GAC7B,GAAI92B,SAAc0B,EAElB,OAAyB,iBAAbo1B,IAAmC,WAAT92B,EAC9B82B,EAAWx8B,KAAKi8B,SAAU70B,GAAUpH,KAAKs8B,YAAal1B,GAGzDvF,EAAOgD,WAAYuC,GAChBpH,KAAKqD,KAAM,SAAUI,GAC3B5B,EAAQ7B,MAAOu8B,YACdn1B,EAAMpG,KAAMhB,KAAMyD,EAAGu4B,GAAUh8B,MAAQw8B,GACvCA,KAKIx8B,KAAKqD,KAAM,WACjB,GAAI8M,GAAW1M,EAAGkX,EAAM8hB,CAExB,IAAc,WAAT/2B,EAAoB,CAGxBjC,EAAI,EACJkX,EAAO9Y,EAAQ7B,MACfy8B,EAAar1B,EAAM2F,MAAOoP,MAE1B,OAAUhM,EAAYssB,EAAYh5B,KAG5BkX,EAAK+hB,SAAUvsB,GACnBwK,EAAK2hB,YAAansB,GAElBwK,EAAKshB,SAAU9rB,OAKInL,UAAVoC,GAAgC,YAAT1B,IAClCyK,EAAY6rB,GAAUh8B,MACjBmQ,GAGJkS,EAASJ,IAAKjiB,KAAM,gBAAiBmQ,GAOjCnQ,KAAK4N,cACT5N,KAAK4N,aAAc,QAClBuC,GAAa/I,KAAU,EACvB,GACAib,EAASvf,IAAK9C,KAAM,kBAAqB,QAO9C08B,SAAU,SAAU56B,GACnB,GAAIqO,GAAW3M,EACdC,EAAI,CAEL0M,GAAY,IAAMrO,EAAW,GAC7B,OAAU0B,EAAOxD,KAAMyD,KACtB,GAAuB,IAAlBD,EAAKiJ,WACP,IAAMuvB,GAAUx4B,GAAS,KAAM4B,QAAS22B,GAAQ,KAChDt7B,QAAS0P,MAEX,OAAO,CAIT,QAAO,IAOT,IAAIwsB,IAAU,MACbC,GAAU,kBAEX/6B,GAAOG,GAAGoC,QACT4N,IAAK,SAAU5K,GACd,GAAI6b,GAAO/f,EAAK2B,EACfrB,EAAOxD,KAAM,EAEd,EAAA,GAAM2D,UAAUf,OA4BhB,MAFAiC,GAAahD,EAAOgD,WAAYuC,GAEzBpH,KAAKqD,KAAM,SAAUI,GAC3B,GAAIuO,EAEmB,KAAlBhS,KAAKyM,WAKTuF,EADInN,EACEuC,EAAMpG,KAAMhB,KAAMyD,EAAG5B,EAAQ7B,MAAOgS,OAEpC5K,EAIK,MAAP4K,EACJA,EAAM,GAEoB,gBAARA,GAClBA,GAAO,GAEInQ,EAAOkD,QAASiN,KAC3BA,EAAMnQ,EAAO0B,IAAKyO,EAAK,SAAU5K,GAChC,MAAgB,OAATA,EAAgB,GAAKA,EAAQ,MAItC6b,EAAQphB,EAAOg7B,SAAU78B,KAAK0F,OAAU7D,EAAOg7B,SAAU78B,KAAKsG,SAASC,eAGjE0c,GAAY,OAASA,IAA+Cje,SAApCie,EAAMhB,IAAKjiB,KAAMgS,EAAK,WAC3DhS,KAAKoH,MAAQ4K,KAzDd,IAAKxO,EAIJ,MAHAyf,GAAQphB,EAAOg7B,SAAUr5B,EAAKkC,OAC7B7D,EAAOg7B,SAAUr5B,EAAK8C,SAASC,eAE3B0c,GACJ,OAASA,IACgCje,UAAvC9B,EAAM+f,EAAMngB,IAAKU,EAAM,UAElBN,GAGRA,EAAMM,EAAK4D,MAEW,gBAARlE,GAGbA,EAAIkC,QAASu3B,GAAS,IAGf,MAAPz5B,EAAc,GAAKA,OA4CxBrB,EAAOuC,QACNy4B,UACCpX,QACC3iB,IAAK,SAAUU,GAEd,GAAIwO,GAAMnQ,EAAO0O,KAAKwB,KAAMvO,EAAM,QAClC,OAAc,OAAPwO,EACNA,EAMAnQ,EAAO4E,KAAM5E,EAAON,KAAMiC,IAAS4B,QAASw3B,GAAS,OAGxDx0B,QACCtF,IAAK,SAAUU,GAYd,IAXA,GAAI4D,GAAOqe,EACVphB,EAAUb,EAAKa,QACfkX,EAAQ/X,EAAKqS,cACbmS,EAAoB,eAAdxkB,EAAKkC,KACXwf,EAAS8C,EAAM,QACfiL,EAAMjL,EAAMzM,EAAQ,EAAIlX,EAAQzB,OAChCa,EAAI8X,EAAQ,EACX0X,EACAjL,EAAMzM,EAAQ,EAGR9X,EAAIwvB,EAAKxvB,IAKhB,GAJAgiB,EAASphB,EAASZ,IAIXgiB,EAAO7P,UAAYnS,IAAM8X,KAG7BkK,EAAOpZ,YACLoZ,EAAO/jB,WAAW2K,WACnBxK,EAAOyE,SAAUmf,EAAO/jB,WAAY,aAAiB,CAMxD,GAHA0F,EAAQvF,EAAQ4jB,GAASzT,MAGpBgW,EACJ,MAAO5gB,EAIR8d,GAAO1kB,KAAM4G,GAIf,MAAO8d,IAGRjD,IAAK,SAAUze,EAAM4D,GACpB,GAAI01B,GAAWrX,EACdphB,EAAUb,EAAKa,QACf6gB,EAASrjB,EAAO6E,UAAWU,GAC3B3D,EAAIY,EAAQzB,MAEb,OAAQa,IACPgiB,EAASphB,EAASZ,IAIbgiB,EAAO7P,SACX/T,EAAO+E,QAAS/E,EAAOg7B,SAASpX,OAAO3iB,IAAK2iB,GAAUP,SAEtD4X,GAAY,EAUd,OAHMA,KACLt5B,EAAKqS,kBAECqP,OAOXrjB,EAAOwB,MAAQ,QAAS,YAAc,WACrCxB,EAAOg7B,SAAU78B,OAChBiiB,IAAK,SAAUze,EAAM4D,GACpB,GAAKvF,EAAOkD,QAASqC,GACpB,MAAS5D,GAAKmS,QAAU9T,EAAO+E,QAAS/E,EAAQ2B,GAAOwO,MAAO5K,QAI3DnG,EAAQ45B,UACbh5B,EAAOg7B,SAAU78B,MAAO8C,IAAM,SAAUU,GACvC,MAAwC,QAAjCA,EAAKmK,aAAc,SAAqB,KAAOnK,EAAK4D,SAW9D,IAAI21B,IAAc,iCAElBl7B,GAAOuC,OAAQvC,EAAOqmB,OAErB2C,QAAS,SAAU3C,EAAOhG,EAAM1e,EAAMw5B,GAErC,GAAIv5B,GAAGuL,EAAKzH,EAAK01B,EAAYC,EAAQrU,EAAQ1J,EAC5Cge,GAAc35B,GAAQ5D,GACtB8F,EAAO9E,EAAOI,KAAMknB,EAAO,QAAWA,EAAMxiB,KAAOwiB,EACnDQ,EAAa9nB,EAAOI,KAAMknB,EAAO,aAAgBA,EAAMgB,UAAUrhB,MAAO,OAKzE,IAHAmH,EAAMzH,EAAM/D,EAAOA,GAAQ5D,EAGJ,IAAlB4D,EAAKiJ,UAAoC,IAAlBjJ,EAAKiJ,WAK5BswB,GAAYrvB,KAAMhI,EAAO7D,EAAOqmB,MAAMY,aAItCpjB,EAAKjF,QAAS,UAGlBioB,EAAahjB,EAAKmC,MAAO,KACzBnC,EAAOgjB,EAAWna,QAClBma,EAAWxkB,QAEZg5B,EAASx3B,EAAKjF,QAAS,KAAQ,GAAK,KAAOiF,EAG3CwiB,EAAQA,EAAOrmB,EAAOoD,SACrBijB,EACA,GAAIrmB,GAAO0oB,MAAO7kB,EAAuB,gBAAVwiB,IAAsBA,GAGtDA,EAAMkV,UAAYJ,EAAe,EAAI,EACrC9U,EAAMgB,UAAYR,EAAW5a,KAAM,KACnCoa,EAAM+B,WAAa/B,EAAMgB,UACxB,GAAIjf,QAAQ,UAAYye,EAAW5a,KAAM,iBAAoB,WAC7D,KAGDoa,EAAMzU,OAASzO,OACTkjB,EAAMvjB,SACXujB,EAAMvjB,OAASnB,GAIhB0e,EAAe,MAARA,GACJgG,GACFrmB,EAAO6E,UAAWwb,GAAQgG,IAG3B/I,EAAUtd,EAAOqmB,MAAM/I,QAASzZ,OAC1Bs3B,IAAgB7d,EAAQ0L,SAAW1L,EAAQ0L,QAAQnnB,MAAOF,EAAM0e,MAAW,GAAjF,CAMA,IAAM8a,IAAiB7d,EAAQyL,WAAa/oB,EAAO+D,SAAUpC,GAAS,CAMrE,IAJAy5B,EAAa9d,EAAQ6J,cAAgBtjB,EAC/Bq3B,GAAYrvB,KAAMuvB,EAAav3B,KACpCsJ,EAAMA,EAAItN,YAEHsN,EAAKA,EAAMA,EAAItN,WACtBy7B,EAAU38B,KAAMwO,GAChBzH,EAAMyH,CAIFzH,MAAU/D,EAAK2J,eAAiBvN,IACpCu9B,EAAU38B,KAAM+G,EAAIwI,aAAexI,EAAI81B,cAAgBt9B,GAKzD0D,EAAI,CACJ,QAAUuL,EAAMmuB,EAAW15B,QAAYykB,EAAM4B,uBAE5C5B,EAAMxiB,KAAOjC,EAAI,EAChBw5B,EACA9d,EAAQ8J,UAAYvjB,EAGrBmjB,GAAWxG,EAASvf,IAAKkM,EAAK,eAAoBkZ,EAAMxiB,OACvD2c,EAASvf,IAAKkM,EAAK,UACf6Z,GACJA,EAAOnlB,MAAOsL,EAAKkT,GAIpB2G,EAASqU,GAAUluB,EAAKkuB,GACnBrU,GAAUA,EAAOnlB,OAASie,EAAY3S,KAC1CkZ,EAAMzU,OAASoV,EAAOnlB,MAAOsL,EAAKkT,GAC7BgG,EAAMzU,UAAW,GACrByU,EAAMgC,iBAoCT,OAhCAhC,GAAMxiB,KAAOA,EAGPs3B,GAAiB9U,EAAMiD,sBAEpBhM,EAAQ2G,UACf3G,EAAQ2G,SAASpiB,MAAOy5B,EAAU3zB,MAAO0Y,MAAW,IACpDP,EAAYne,IAIP05B,GAAUr7B,EAAOgD,WAAYrB,EAAMkC,MAAa7D,EAAO+D,SAAUpC,KAGrE+D,EAAM/D,EAAM05B,GAEP31B,IACJ/D,EAAM05B,GAAW,MAIlBr7B,EAAOqmB,MAAMY,UAAYpjB,EACzBlC,EAAMkC,KACN7D,EAAOqmB,MAAMY,UAAY9jB,OAEpBuC,IACJ/D,EAAM05B,GAAW31B,IAMd2gB,EAAMzU,SAKd6pB,SAAU,SAAU53B,EAAMlC,EAAM0kB,GAC/B,GAAIxb,GAAI7K,EAAOuC,OACd,GAAIvC,GAAO0oB,MACXrC,GAECxiB,KAAMA,EACN6lB,aAAa,GAIf1pB,GAAOqmB,MAAM2C,QAASne,EAAG,KAAMlJ,MAKjC3B,EAAOG,GAAGoC,QAETymB,QAAS,SAAUnlB,EAAMwc,GACxB,MAAOliB,MAAKqD,KAAM,WACjBxB,EAAOqmB,MAAM2C,QAASnlB,EAAMwc,EAAMliB,SAGpCu9B,eAAgB,SAAU73B,EAAMwc,GAC/B,GAAI1e,GAAOxD,KAAM,EACjB,IAAKwD,EACJ,MAAO3B,GAAOqmB,MAAM2C,QAASnlB,EAAMwc,EAAM1e,GAAM,MAMlD3B,EAAOwB,KAAM,wLAEgDwE,MAAO,KACnE,SAAUpE,EAAGa,GAGbzC,EAAOG,GAAIsC,GAAS,SAAU4d,EAAMlgB,GACnC,MAAO2B,WAAUf,OAAS,EACzB5C,KAAK8nB,GAAIxjB,EAAM,KAAM4d,EAAMlgB,GAC3BhC,KAAK6qB,QAASvmB,MAIjBzC,EAAOG,GAAGoC,QACTo5B,MAAO,SAAUC,EAAQC,GACxB,MAAO19B,MAAKqtB,WAAYoQ,GAASnQ,WAAYoQ,GAASD,MAOxDx8B,EAAQ08B,QAAU,aAAe59B,GAW3BkB,EAAQ08B,SACb97B,EAAOwB,MAAQgS,MAAO,UAAWyV,KAAM,YAAc,SAAU2C,EAAM/D,GAGpE,GAAI7a,GAAU,SAAUqZ,GACvBrmB,EAAOqmB,MAAMoV,SAAU5T,EAAKxB,EAAMvjB,OAAQ9C,EAAOqmB,MAAMwB,IAAKxB,IAG7DrmB,GAAOqmB,MAAM/I,QAASuK,IACrBN,MAAO,WACN,GAAIhoB,GAAMpB,KAAKmN,eAAiBnN,KAC/B49B,EAAWvb,EAASf,OAAQlgB,EAAKsoB,EAE5BkU,IACLx8B,EAAI6O,iBAAkBwd,EAAM5e,GAAS,GAEtCwT,EAASf,OAAQlgB,EAAKsoB,GAAOkU,GAAY,GAAM,IAEhDrU,SAAU,WACT,GAAInoB,GAAMpB,KAAKmN,eAAiBnN,KAC/B49B,EAAWvb,EAASf,OAAQlgB,EAAKsoB,GAAQ,CAEpCkU,GAKLvb,EAASf,OAAQlgB,EAAKsoB,EAAKkU,IAJ3Bx8B,EAAI+f,oBAAqBsM,EAAM5e,GAAS,GACxCwT,EAASpF,OAAQ7b,EAAKsoB,OAS3B,IAAIvU,IAAWpV,EAAOoV,SAElB0oB,GAAQh8B,EAAO4F,MAEfq2B,GAAS,IAKbj8B,GAAOk8B,SAAW,SAAU7b,GAC3B,GAAIpO,EACJ,KAAMoO,GAAwB,gBAATA,GACpB,MAAO,KAKR,KACCpO,GAAM,GAAM/T,GAAOi+B,WAAcC,gBAAiB/b,EAAM,YACvD,MAAQxV,GACToH,EAAM9O,OAMP,MAHM8O,KAAOA,EAAIvG,qBAAsB,eAAgB3K,QACtDf,EAAOyD,MAAO,gBAAkB4c,GAE1BpO,EAIR,IACCoqB,IAAW,QACXC,GAAQ,SACRC,GAAkB,wCAClBC,GAAe,oCAEhB,SAASC,IAAavJ,EAAQtvB,EAAK84B,EAAa9iB,GAC/C,GAAInX,EAEJ,IAAKzC,EAAOkD,QAASU,GAGpB5D,EAAOwB,KAAMoC,EAAK,SAAUhC,EAAG6Z,GACzBihB,GAAeL,GAASxwB,KAAMqnB,GAGlCtZ,EAAKsZ,EAAQzX,GAKbghB,GACCvJ,EAAS,KAAqB,gBAANzX,IAAuB,MAALA,EAAY7Z,EAAI,IAAO,IACjE6Z,EACAihB,EACA9iB,SAKG,IAAM8iB,GAAsC,WAAvB18B,EAAO6D,KAAMD,GAUxCgW,EAAKsZ,EAAQtvB,OAPb,KAAMnB,IAAQmB,GACb64B,GAAavJ,EAAS,IAAMzwB,EAAO,IAAKmB,EAAKnB,GAAQi6B,EAAa9iB,GAYrE5Z,EAAO28B,MAAQ,SAAUl1B,EAAGi1B,GAC3B,GAAIxJ,GACH0J,KACAhjB,EAAM,SAAUpN,EAAKqwB,GAGpB,GAAIt3B,GAAQvF,EAAOgD,WAAY65B,GAC9BA,IACAA,CAEDD,GAAGA,EAAE77B,QAAW+7B,mBAAoBtwB,GAAQ,IAC3CswB,mBAA6B,MAATv3B,EAAgB,GAAKA,GAI5C,IAAKvF,EAAOkD,QAASuE,IAASA,EAAE5G,SAAWb,EAAOiD,cAAewE,GAGhEzH,EAAOwB,KAAMiG,EAAG,WACfmS,EAAKzb,KAAKsE,KAAMtE,KAAKoH,aAOtB,KAAM2tB,IAAUzrB,GACfg1B,GAAavJ,EAAQzrB,EAAGyrB,GAAUwJ,EAAa9iB,EAKjD,OAAOgjB,GAAE3wB,KAAM,MAGhBjM,EAAOG,GAAGoC,QACTw6B,UAAW,WACV,MAAO/8B,GAAO28B,MAAOx+B,KAAK6+B,mBAE3BA,eAAgB,WACf,MAAO7+B,MAAKuD,IAAK,WAGhB,GAAIuO,GAAWjQ,EAAOsgB,KAAMniB,KAAM,WAClC,OAAO8R,GAAWjQ,EAAO6E,UAAWoL,GAAa9R,OAEjDwQ,OAAQ,WACR,GAAI9K,GAAO1F,KAAK0F,IAGhB,OAAO1F,MAAKsE,OAASzC,EAAQ7B,MAAOma,GAAI,cACvCkkB,GAAa3wB,KAAM1N,KAAKsG,YAAe83B,GAAgB1wB,KAAMhI,KAC3D1F,KAAK2V,UAAY0P,GAAe3X,KAAMhI,MAEzCnC,IAAK,SAAUE,EAAGD,GAClB,GAAIwO,GAAMnQ,EAAQ7B,MAAOgS,KAEzB,OAAc,OAAPA,EACN,KACAnQ,EAAOkD,QAASiN,GACfnQ,EAAO0B,IAAKyO,EAAK,SAAUA,GAC1B,OAAS1N,KAAMd,EAAKc,KAAM8C,MAAO4K,EAAI5M,QAAS+4B,GAAO,YAEpD75B,KAAMd,EAAKc,KAAM8C,MAAO4K,EAAI5M,QAAS+4B,GAAO,WAC7Cr7B,QAKN,IACCg8B,IAAM,OACNC,GAAQ,OACRC,GAAM,gBACNC,GAAW,6BAGXC,GAAiB,4DACjBC,GAAa,iBACbC,GAAY,QAWZ/G,MAOAgH,MAGAC,GAAW,KAAK/+B,OAAQ,KAGxBg/B,GAAe3/B,EAAS0B,cAAe,IACvCi+B,IAAa/pB,KAAOL,GAASK,IAG9B,SAASgqB,IAA6BC,GAGrC,MAAO,UAAUC,EAAoBzhB,GAED,gBAAvByhB,KACXzhB,EAAOyhB,EACPA,EAAqB,IAGtB,IAAIC,GACHl8B,EAAI,EACJm8B,EAAYF,EAAmBn5B,cAAcwG,MAAOoP,MAErD,IAAKta,EAAOgD,WAAYoZ,GAGvB,MAAU0hB,EAAWC,EAAWn8B,KAGR,MAAlBk8B,EAAU,IACdA,EAAWA,EAASr/B,MAAO,IAAO,KAChCm/B,EAAWE,GAAaF,EAAWE,QAAmB/tB,QAASqM,KAI/DwhB,EAAWE,GAAaF,EAAWE,QAAmBn/B,KAAMyd,IAQnE,QAAS4hB,IAA+BJ,EAAWp7B,EAASq0B,EAAiBoH,GAE5E,GAAIC,MACHC,EAAqBP,IAAcJ,EAEpC,SAASY,GAASN,GACjB,GAAI/pB,EAcJ,OAbAmqB,GAAWJ,IAAa,EACxB99B,EAAOwB,KAAMo8B,EAAWE,OAAkB,SAAUp0B,EAAG20B,GACtD,GAAIC,GAAsBD,EAAoB77B,EAASq0B,EAAiBoH,EACxE,OAAoC,gBAAxBK,IACVH,GAAqBD,EAAWI,GAKtBH,IACDpqB,EAAWuqB,GADf,QAHN97B,EAAQu7B,UAAUhuB,QAASuuB,GAC3BF,EAASE,IACF,KAKFvqB,EAGR,MAAOqqB,GAAS57B,EAAQu7B,UAAW,MAAUG,EAAW,MAASE,EAAS,KAM3E,QAASG,IAAYz7B,EAAQJ,GAC5B,GAAI8J,GAAKzJ,EACRy7B,EAAcx+B,EAAOy+B,aAAaD,eAEnC,KAAMhyB,IAAO9J,GACQS,SAAfT,EAAK8J,MACPgyB,EAAahyB,GAAQ1J,EAAWC,IAAUA,OAAiByJ,GAAQ9J,EAAK8J,GAO5E,OAJKzJ,IACJ/C,EAAOuC,QAAQ,EAAMO,EAAQC,GAGvBD,EAOR,QAAS47B,IAAqB9B,EAAGqB,EAAOU,GAEvC,GAAIC,GAAI/6B,EAAMg7B,EAAeC,EAC5BzlB,EAAWujB,EAAEvjB,SACb0kB,EAAYnB,EAAEmB,SAGf,OAA2B,MAAnBA,EAAW,GAClBA,EAAUrxB,QACEvJ,SAAPy7B,IACJA,EAAKhC,EAAEmC,UAAYd,EAAMe,kBAAmB,gBAK9C,IAAKJ,EACJ,IAAM/6B,IAAQwV,GACb,GAAKA,EAAUxV,IAAUwV,EAAUxV,GAAOgI,KAAM+yB,GAAO,CACtDb,EAAUhuB,QAASlM,EACnB,OAMH,GAAKk6B,EAAW,IAAOY,GACtBE,EAAgBd,EAAW,OACrB,CAGN,IAAMl6B,IAAQ86B,GAAY,CACzB,IAAMZ,EAAW,IAAOnB,EAAEqC,WAAYp7B,EAAO,IAAMk6B,EAAW,IAAQ,CACrEc,EAAgBh7B,CAChB,OAEKi7B,IACLA,EAAgBj7B,GAKlBg7B,EAAgBA,GAAiBC,EAMlC,GAAKD,EAIJ,MAHKA,KAAkBd,EAAW,IACjCA,EAAUhuB,QAAS8uB,GAEbF,EAAWE,GAOpB,QAASK,IAAatC,EAAGuC,EAAUlB,EAAOmB,GACzC,GAAIC,GAAOC,EAASC,EAAM75B,EAAK4T,EAC9B2lB,KAGAlB,EAAYnB,EAAEmB,UAAUt/B,OAGzB,IAAKs/B,EAAW,GACf,IAAMwB,IAAQ3C,GAAEqC,WACfA,EAAYM,EAAK76B,eAAkBk4B,EAAEqC,WAAYM,EAInDD,GAAUvB,EAAUrxB,OAGpB,OAAQ4yB,EAcP,GAZK1C,EAAE4C,eAAgBF,KACtBrB,EAAOrB,EAAE4C,eAAgBF,IAAcH,IAIlC7lB,GAAQ8lB,GAAaxC,EAAE6C,aAC5BN,EAAWvC,EAAE6C,WAAYN,EAAUvC,EAAEkB,WAGtCxkB,EAAOgmB,EACPA,EAAUvB,EAAUrxB,QAKnB,GAAiB,MAAZ4yB,EAEJA,EAAUhmB,MAGJ,IAAc,MAATA,GAAgBA,IAASgmB,EAAU,CAM9C,GAHAC,EAAON,EAAY3lB,EAAO,IAAMgmB,IAAaL,EAAY,KAAOK,IAG1DC,EACL,IAAMF,IAASJ,GAId,GADAv5B,EAAM25B,EAAMr5B,MAAO,KACdN,EAAK,KAAQ45B,IAGjBC,EAAON,EAAY3lB,EAAO,IAAM5T,EAAK,KACpCu5B,EAAY,KAAOv5B,EAAK,KACb,CAGN65B,KAAS,EACbA,EAAON,EAAYI,GAGRJ,EAAYI,MAAY,IACnCC,EAAU55B,EAAK,GACfq4B,EAAUhuB,QAASrK,EAAK,IAEzB,OAOJ,GAAK65B,KAAS,EAGb,GAAKA,GAAQ3C,EAAAA,UACZuC,EAAWI,EAAMJ,OAEjB,KACCA,EAAWI,EAAMJ,GAChB,MAAQt0B,GACT,OACCyR,MAAO,cACP7Y,MAAO87B,EAAO10B,EAAI,sBAAwByO,EAAO,OAASgmB,IASjE,OAAShjB,MAAO,UAAW+D,KAAM8e,GAGlCn/B,EAAOuC,QAGNm9B,OAAQ,EAGRC,gBACAC,QAEAnB,cACCoB,IAAKvsB,GAASK,KACd9P,KAAM,MACNi8B,QAASzC,GAAexxB,KAAMyH,GAASysB,UACvCpiC,QAAQ,EACRqiC,aAAa,EACbC,OAAO,EACPC,YAAa,mDAcbC,SACClJ,IAAKwG,GACL/9B,KAAM,aACNwtB,KAAM,YACNjb,IAAK,4BACLmuB,KAAM,qCAGP/mB,UACCpH,IAAK,UACLib,KAAM,SACNkT,KAAM,YAGPZ,gBACCvtB,IAAK,cACLvS,KAAM,eACN0gC,KAAM,gBAKPnB,YAGCoB,SAAUv2B,OAGVw2B,aAAa,EAGbC,YAAa1f,KAAKC,MAGlB0f,WAAYxgC,EAAOk8B,UAOpBsC,aACCqB,KAAK,EACL3/B,SAAS,IAOXugC,UAAW,SAAU39B,EAAQ49B,GAC5B,MAAOA,GAGNnC,GAAYA,GAAYz7B,EAAQ9C,EAAOy+B,cAAgBiC,GAGvDnC,GAAYv+B,EAAOy+B,aAAc37B,IAGnC69B,cAAehD,GAA6BnH,IAC5CoK,cAAejD,GAA6BH,IAG5CqD,KAAM,SAAUhB,EAAKr9B,GAGA,gBAARq9B,KACXr9B,EAAUq9B,EACVA,EAAM18B,QAIPX,EAAUA,KAEV,IAAIs+B,GAGHC,EAGAC,EACAC,EAGAC,EAGAC,EAGA9hB,EAGA+hB,EAGAx/B,EAGAy/B,EAGAzE,EAAI58B,EAAOygC,aAAej+B,GAG1B8+B,EAAkB1E,EAAE18B,SAAW08B,EAG/B2E,EAAqB3E,EAAE18B,UACpBohC,EAAgB12B,UAAY02B,EAAgBzgC,QAC7Cb,EAAQshC,GACRthC,EAAOqmB,MAGT7J,EAAWxc,EAAOmc,WAClBqlB,EAAmBxhC,EAAO0a,UAAW,eAGrC+mB,EAAa7E,EAAE6E,eAGfC,KACAC,KAGAC,EAAW,WAGX3D,GACC1e,WAAY,EAGZyf,kBAAmB,SAAUxyB,GAC5B,GAAItB,EACJ,IAAKmU,EAAY,CAChB,IAAM4hB,EAAkB,CACvBA,IACA,OAAU/1B,EAAQkyB,GAAS7xB,KAAMy1B,GAChCC,EAAiB/1B,EAAO,GAAIxG,eAAkBwG,EAAO,GAGvDA,EAAQ+1B,EAAiBz0B,EAAI9H,eAE9B,MAAgB,OAATwG,EAAgB,KAAOA,GAI/B22B,sBAAuB,WACtB,MAAOxiB,GAAY2hB,EAAwB,MAI5Cc,iBAAkB,SAAUr/B,EAAM8C,GAMjC,MALkB,OAAb8Z,IACJ5c,EAAOk/B,EAAqBl/B,EAAKiC,eAChCi9B,EAAqBl/B,EAAKiC,gBAAmBjC,EAC9Ci/B,EAAgBj/B,GAAS8C,GAEnBpH,MAIR4jC,iBAAkB,SAAUl+B,GAI3B,MAHkB,OAAbwb,IACJud,EAAEmC,SAAWl7B,GAEP1F,MAIRsjC,WAAY,SAAU//B,GACrB,GAAIpC,EACJ,IAAKoC,EACJ,GAAK2d,EAGJ4e,EAAM1hB,OAAQ7a,EAAKu8B,EAAM+D,aAIzB,KAAM1iC,IAAQoC,GACb+/B,EAAYniC,IAAWmiC,EAAYniC,GAAQoC,EAAKpC,GAInD,OAAOnB,OAIR8jC,MAAO,SAAUC,GAChB,GAAIC,GAAYD,GAAcN,CAK9B,OAJKd,IACJA,EAAUmB,MAAOE,GAElBh7B,EAAM,EAAGg7B,GACFhkC,MAoBV,IAfAqe,EAASR,QAASiiB,GAKlBrB,EAAEiD,MAAUA,GAAOjD,EAAEiD,KAAOvsB,GAASK,MAAS,IAC5CpQ,QAASg6B,GAAWjqB,GAASysB,SAAW,MAG1CnD,EAAE/4B,KAAOrB,EAAQuZ,QAAUvZ,EAAQqB,MAAQ+4B,EAAE7gB,QAAU6gB,EAAE/4B,KAGzD+4B,EAAEmB,WAAcnB,EAAEkB,UAAY,KAAMp5B,cAAcwG,MAAOoP,KAAiB,IAGpD,MAAjBsiB,EAAEwF,YAAsB,CAC5BjB,EAAYpjC,EAAS0B,cAAe,IAKpC,KACC0hC,EAAUxtB,KAAOipB,EAAEiD,IAInBsB,EAAUxtB,KAAOwtB,EAAUxtB,KAC3BipB,EAAEwF,YAAc1E,GAAaqC,SAAW,KAAOrC,GAAa2E,MAC3DlB,EAAUpB,SAAW,KAAOoB,EAAUkB,KACtC,MAAQx3B,GAIT+xB,EAAEwF,aAAc,GAalB,GARKxF,EAAEvc,MAAQuc,EAAEoD,aAAiC,gBAAXpD,GAAEvc,OACxCuc,EAAEvc,KAAOrgB,EAAO28B,MAAOC,EAAEvc,KAAMuc,EAAEF,cAIlCsB,GAA+BxH,GAAYoG,EAAGp6B,EAASy7B,GAGlD5e,EACJ,MAAO4e,EAKRmD,GAAcphC,EAAOqmB,OAASuW,EAAEj/B,OAG3ByjC,GAAmC,IAApBphC,EAAO0/B,UAC1B1/B,EAAOqmB,MAAM2C,QAAS,aAIvB4T,EAAE/4B,KAAO+4B,EAAE/4B,KAAKlD,cAGhBi8B,EAAE0F,YAAchF,GAAWzxB,KAAM+wB,EAAE/4B,MAKnCk9B,EAAWnE,EAAEiD,IAAIt8B,QAAS25B,GAAO,IAG3BN,EAAE0F,WAuBI1F,EAAEvc,MAAQuc,EAAEoD,aACoD,KAAzEpD,EAAEsD,aAAe,IAAKthC,QAAS,uCACjCg+B,EAAEvc,KAAOuc,EAAEvc,KAAK9c,QAAS05B,GAAK,OAtB9BoE,EAAWzE,EAAEiD,IAAIphC,MAAOsiC,EAAShgC,QAG5B67B,EAAEvc,OACN0gB,IAAc9E,GAAOpwB,KAAMk1B,GAAa,IAAM,KAAQnE,EAAEvc,WAGjDuc,GAAEvc,MAILuc,EAAErwB,SAAU,IAChBw0B,EAAWA,EAASx9B,QAAS45B,GAAK,IAClCkE,GAAapF,GAAOpwB,KAAMk1B,GAAa,IAAM,KAAQ,KAAS/E,MAAYqF,GAI3EzE,EAAEiD,IAAMkB,EAAWM,GASfzE,EAAE2F,aACDviC,EAAO2/B,aAAcoB,IACzB9C,EAAM6D,iBAAkB,oBAAqB9hC,EAAO2/B,aAAcoB,IAE9D/gC,EAAO4/B,KAAMmB,IACjB9C,EAAM6D,iBAAkB,gBAAiB9hC,EAAO4/B,KAAMmB,MAKnDnE,EAAEvc,MAAQuc,EAAE0F,YAAc1F,EAAEsD,eAAgB,GAAS19B,EAAQ09B,cACjEjC,EAAM6D,iBAAkB,eAAgBlF,EAAEsD,aAI3CjC,EAAM6D,iBACL,SACAlF,EAAEmB,UAAW,IAAOnB,EAAEuD,QAASvD,EAAEmB,UAAW,IAC3CnB,EAAEuD,QAASvD,EAAEmB,UAAW,KACA,MAArBnB,EAAEmB,UAAW,GAAc,KAAON,GAAW,WAAa,IAC7Db,EAAEuD,QAAS,KAIb,KAAMv+B,IAAKg7B,GAAE4F,QACZvE,EAAM6D,iBAAkBlgC,EAAGg7B,EAAE4F,QAAS5gC,GAIvC,IAAKg7B,EAAE6F,aACJ7F,EAAE6F,WAAWtjC,KAAMmiC,EAAiBrD,EAAOrB,MAAQ,GAASvd,GAG9D,MAAO4e,GAAMgE,OAed,IAXAL,EAAW,QAGXJ,EAAiB5nB,IAAKgjB,EAAE5F,UACxBiH,EAAM92B,KAAMy1B,EAAE8F,SACdzE,EAAMhiB,KAAM2gB,EAAEn5B,OAGdq9B,EAAY9C,GAA+BR,GAAYZ,EAAGp6B,EAASy7B,GAK5D,CASN,GARAA,EAAM1e,WAAa,EAGd6hB,GACJG,EAAmBvY,QAAS,YAAciV,EAAOrB,IAI7Cvd,EACJ,MAAO4e,EAIHrB,GAAEqD,OAASrD,EAAE9D,QAAU,IAC3BoI,EAAehjC,EAAO+f,WAAY,WACjCggB,EAAMgE,MAAO,YACXrF,EAAE9D,SAGN,KACCzZ,GAAY,EACZyhB,EAAU6B,KAAMjB,EAAgBv6B,GAC/B,MAAQ0D,GAGT,GAAKwU,EACJ,KAAMxU,EAIP1D,MAAU0D,QAhCX1D,MAAU,eAqCX,SAASA,GAAM66B,EAAQY,EAAkBjE,EAAW6D,GACnD,GAAIpD,GAAWsD,EAASj/B,EAAO07B,EAAU0D,EACxCX,EAAaU,CAGTvjB,KAILA,GAAY,EAGP6hB,GACJhjC,EAAO66B,aAAcmI,GAKtBJ,EAAY39B,OAGZ69B,EAAwBwB,GAAW,GAGnCvE,EAAM1e,WAAayiB,EAAS,EAAI,EAAI,EAGpC5C,EAAY4C,GAAU,KAAOA,EAAS,KAAkB,MAAXA,EAGxCrD,IACJQ,EAAWT,GAAqB9B,EAAGqB,EAAOU,IAI3CQ,EAAWD,GAAatC,EAAGuC,EAAUlB,EAAOmB,GAGvCA,GAGCxC,EAAE2F,aACNM,EAAW5E,EAAMe,kBAAmB,iBAC/B6D,IACJ7iC,EAAO2/B,aAAcoB,GAAa8B,GAEnCA,EAAW5E,EAAMe,kBAAmB,QAC/B6D,IACJ7iC,EAAO4/B,KAAMmB,GAAa8B,IAKZ,MAAXb,GAA6B,SAAXpF,EAAE/4B,KACxBq+B,EAAa,YAGS,MAAXF,EACXE,EAAa,eAIbA,EAAa/C,EAAS7iB,MACtBomB,EAAUvD,EAAS9e,KACnB5c,EAAQ07B,EAAS17B,MACjB27B,GAAa37B,KAKdA,EAAQy+B,GACHF,GAAWE,IACfA,EAAa,QACRF,EAAS,IACbA,EAAS,KAMZ/D,EAAM+D,OAASA,EACf/D,EAAMiE,YAAeU,GAAoBV,GAAe,GAGnD9C,EACJ5iB,EAASmB,YAAa2jB,GAAmBoB,EAASR,EAAYjE,IAE9DzhB,EAASuB,WAAYujB,GAAmBrD,EAAOiE,EAAYz+B,IAI5Dw6B,EAAMwD,WAAYA,GAClBA,EAAat+B,OAERi+B,GACJG,EAAmBvY,QAASoW,EAAY,cAAgB,aACrDnB,EAAOrB,EAAGwC,EAAYsD,EAAUj/B,IAIpC+9B,EAAiBjmB,SAAU+lB,GAAmBrD,EAAOiE,IAEhDd,IACJG,EAAmBvY,QAAS,gBAAkBiV,EAAOrB,MAG3C58B,EAAO0/B,QAChB1/B,EAAOqmB,MAAM2C,QAAS,cAKzB,MAAOiV,IAGR6E,QAAS,SAAUjD,EAAKxf,EAAM5e,GAC7B,MAAOzB,GAAOiB,IAAK4+B,EAAKxf,EAAM5e,EAAU,SAGzCshC,UAAW,SAAUlD,EAAKp+B,GACzB,MAAOzB,GAAOiB,IAAK4+B,EAAK18B,OAAW1B,EAAU,aAI/CzB,EAAOwB,MAAQ,MAAO,QAAU,SAAUI,EAAGma,GAC5C/b,EAAQ+b,GAAW,SAAU8jB,EAAKxf,EAAM5e,EAAUoC,GAUjD,MAPK7D,GAAOgD,WAAYqd,KACvBxc,EAAOA,GAAQpC,EACfA,EAAW4e,EACXA,EAAOld,QAIDnD,EAAO6gC,KAAM7gC,EAAOuC,QAC1Bs9B,IAAKA,EACLh8B,KAAMkY,EACN+hB,SAAUj6B,EACVwc,KAAMA,EACNqiB,QAASjhC,GACPzB,EAAOiD,cAAe48B,IAASA,OAKpC7/B,EAAOmtB,SAAW,SAAU0S,GAC3B,MAAO7/B,GAAO6gC,MACbhB,IAAKA,EAGLh8B,KAAM,MACNi6B,SAAU,SACVvxB,OAAO,EACP0zB,OAAO,EACPtiC,QAAQ,EACRqlC,UAAU,KAKZhjC,EAAOG,GAAGoC,QACT0gC,QAAS,SAAU/V,GAClB,GAAIlI,EAyBJ,OAvBK7mB,MAAM,KACL6B,EAAOgD,WAAYkqB,KACvBA,EAAOA,EAAK/tB,KAAMhB,KAAM,KAIzB6mB,EAAOhlB,EAAQktB,EAAM/uB,KAAM,GAAImN,eAAgBtJ,GAAI,GAAIa,OAAO,GAEzD1E,KAAM,GAAI0B,YACdmlB,EAAK8I,aAAc3vB,KAAM,IAG1B6mB,EAAKtjB,IAAK,WACT,GAAIC,GAAOxD,IAEX,OAAQwD,EAAKuhC,kBACZvhC,EAAOA,EAAKuhC,iBAGb,OAAOvhC,KACJisB,OAAQzvB,OAGNA,MAGRglC,UAAW,SAAUjW,GACpB,MAAKltB,GAAOgD,WAAYkqB,GAChB/uB,KAAKqD,KAAM,SAAUI,GAC3B5B,EAAQ7B,MAAOglC,UAAWjW,EAAK/tB,KAAMhB,KAAMyD,MAItCzD,KAAKqD,KAAM,WACjB,GAAIsX,GAAO9Y,EAAQ7B,MAClBkb,EAAWP,EAAKO,UAEZA,GAAStY,OACbsY,EAAS4pB,QAAS/V,GAGlBpU,EAAK8U,OAAQV,MAKhBlI,KAAM,SAAUkI,GACf,GAAIlqB,GAAahD,EAAOgD,WAAYkqB,EAEpC,OAAO/uB,MAAKqD,KAAM,SAAUI,GAC3B5B,EAAQ7B,MAAO8kC,QAASjgC,EAAakqB,EAAK/tB,KAAMhB,KAAMyD,GAAMsrB,MAI9DkW,OAAQ,SAAUnjC,GAIjB,MAHA9B,MAAKmU,OAAQrS,GAAW6S,IAAK,QAAStR,KAAM,WAC3CxB,EAAQ7B,MAAO8vB,YAAa9vB,KAAKwM,cAE3BxM,QAKT6B,EAAOgQ,KAAK9H,QAAQ4tB,OAAS,SAAUn0B,GACtC,OAAQ3B,EAAOgQ,KAAK9H,QAAQm7B,QAAS1hC,IAEtC3B,EAAOgQ,KAAK9H,QAAQm7B,QAAU,SAAU1hC,GACvC,SAAWA,EAAK2hC,aAAe3hC,EAAK4hC,cAAgB5hC,EAAKgwB,iBAAiB5wB,SAM3Ef,EAAOy+B,aAAa+E,IAAM,WACzB,IACC,MAAO,IAAItlC,GAAOulC,eACjB,MAAQ54B,KAGX,IAAI64B,KAGFC,EAAG,IAIHC,KAAM,KAEPC,GAAe7jC,EAAOy+B,aAAa+E,KAEpCpkC,GAAQ0kC,OAASD,IAAkB,mBAAqBA,IACxDzkC,EAAQyhC,KAAOgD,KAAiBA,GAEhC7jC,EAAO4gC,cAAe,SAAUp+B,GAC/B,GAAIf,GAAUsiC,CAGd,IAAK3kC,EAAQ0kC,MAAQD,KAAiBrhC,EAAQ4/B,YAC7C,OACCO,KAAM,SAAUH,EAASxL,GACxB,GAAIp1B,GACH4hC,EAAMhhC,EAAQghC,KAWf,IATAA,EAAIQ,KACHxhC,EAAQqB,KACRrB,EAAQq9B,IACRr9B,EAAQy9B,MACRz9B,EAAQyhC,SACRzhC,EAAQmS,UAIJnS,EAAQ0hC,UACZ,IAAMtiC,IAAKY,GAAQ0hC,UAClBV,EAAK5hC,GAAMY,EAAQ0hC,UAAWtiC,EAK3BY,GAAQu8B,UAAYyE,EAAIzB,kBAC5ByB,EAAIzB,iBAAkBv/B,EAAQu8B,UAQzBv8B,EAAQ4/B,aAAgBI,EAAS,sBACtCA,EAAS,oBAAuB,iBAIjC,KAAM5gC,IAAK4gC,GACVgB,EAAI1B,iBAAkBlgC,EAAG4gC,EAAS5gC,GAInCH,GAAW,SAAUoC,GACpB,MAAO,YACDpC,IACJA,EAAWsiC,EAAgBP,EAAIW,OAC9BX,EAAIY,QAAUZ,EAAIa,QAAUb,EAAIc,mBAAqB,KAExC,UAATzgC,EACJ2/B,EAAIvB,QACgB,UAATp+B,EAKgB,gBAAf2/B,GAAIxB,OACfhL,EAAU,EAAG,SAEbA,EAGCwM,EAAIxB,OACJwB,EAAItB,YAINlL,EACC0M,GAAkBF,EAAIxB,SAAYwB,EAAIxB,OACtCwB,EAAItB,WAK+B,UAAjCsB,EAAIe,cAAgB,SACM,gBAArBf,GAAIgB,cACRC,OAAQjB,EAAIrE,WACZz/B,KAAM8jC,EAAIgB,cACbhB,EAAI3B,4BAQT2B,EAAIW,OAAS1iC,IACbsiC,EAAgBP,EAAIY,QAAU3iC,EAAU,SAKnB0B,SAAhBqgC,EAAIa,QACRb,EAAIa,QAAUN,EAEdP,EAAIc,mBAAqB,WAGA,IAAnBd,EAAIjkB,YAMRrhB,EAAO+f,WAAY,WACbxc,GACJsiC,OAQLtiC,EAAWA,EAAU,QAErB,KAGC+hC,EAAIb,KAAMngC,EAAQ8/B,YAAc9/B,EAAQ6d,MAAQ,MAC/C,MAAQxV,GAGT,GAAKpJ,EACJ,KAAMoJ,KAKTo3B,MAAO,WACDxgC,GACJA,QAWLzB,EAAO2gC,cAAe,SAAU/D,GAC1BA,EAAEwF,cACNxF,EAAEvjB,SAAS7Z,QAAS,KAKtBQ,EAAOygC,WACNN,SACC3gC,OAAQ,6FAGT6Z,UACC7Z,OAAQ,2BAETy/B,YACCyF,cAAe,SAAUhlC,GAExB,MADAM,GAAOsE,WAAY5E,GACZA,MAMVM,EAAO2gC,cAAe,SAAU,SAAU/D,GACxBz5B,SAAZy5B,EAAErwB,QACNqwB,EAAErwB,OAAQ,GAENqwB,EAAEwF,cACNxF,EAAE/4B,KAAO,SAKX7D,EAAO4gC,cAAe,SAAU,SAAUhE,GAGzC,GAAKA,EAAEwF,YAAc,CACpB,GAAI5iC,GAAQiC,CACZ,QACCkhC,KAAM,SAAUj5B,EAAGstB,GAClBx3B,EAASQ,EAAQ,YAAasgB,MAC7BqkB,QAAS/H,EAAEgI,cACXliC,IAAKk6B,EAAEiD,MACJ5Z,GACH,aACAxkB,EAAW,SAAUojC,GACpBrlC,EAAO4b,SACP3Z,EAAW,KACNojC,GACJ7N,EAAuB,UAAb6N,EAAIhhC,KAAmB,IAAM,IAAKghC,EAAIhhC,QAMnD9F,EAAS4B,KAAKC,YAAaJ,EAAQ,KAEpCyiC,MAAO,WACDxgC,GACJA,QAUL,IAAIqjC,OACHC,GAAS,mBAGV/kC,GAAOygC,WACNuE,MAAO,WACPC,cAAe,WACd,GAAIxjC,GAAWqjC,GAAan9B,OAAW3H,EAAOoD,QAAU,IAAQ44B,IAEhE,OADA79B,MAAMsD,IAAa,EACZA,KAKTzB,EAAO2gC,cAAe,aAAc,SAAU/D,EAAGsI,EAAkBjH,GAElE,GAAIkH,GAAcC,EAAaC,EAC9BC,EAAW1I,EAAEoI,SAAU,IAAWD,GAAOl5B,KAAM+wB,EAAEiD,KAChD,MACkB,gBAAXjD,GAAEvc,MAE6C,KADnDuc,EAAEsD,aAAe,IACjBthC,QAAS,sCACXmmC,GAAOl5B,KAAM+wB,EAAEvc,OAAU,OAI5B,IAAKilB,GAAiC,UAArB1I,EAAEmB,UAAW,GA8D7B,MA3DAoH,GAAevI,EAAEqI,cAAgBjlC,EAAOgD,WAAY45B,EAAEqI,eACrDrI,EAAEqI,gBACFrI,EAAEqI,cAGEK,EACJ1I,EAAG0I,GAAa1I,EAAG0I,GAAW/hC,QAASwhC,GAAQ,KAAOI,GAC3CvI,EAAEoI,SAAU,IACvBpI,EAAEiD,MAAS5D,GAAOpwB,KAAM+wB,EAAEiD,KAAQ,IAAM,KAAQjD,EAAEoI,MAAQ,IAAMG,GAIjEvI,EAAEqC,WAAY,eAAkB,WAI/B,MAHMoG,IACLrlC,EAAOyD,MAAO0hC,EAAe,mBAEvBE,EAAmB,IAI3BzI,EAAEmB,UAAW,GAAM,OAGnBqH,EAAclnC,EAAQinC,GACtBjnC,EAAQinC,GAAiB,WACxBE,EAAoBvjC,WAIrBm8B,EAAM1hB,OAAQ,WAGQpZ,SAAhBiiC,EACJplC,EAAQ9B,GAAS07B,WAAYuL,GAI7BjnC,EAAQinC,GAAiBC,EAIrBxI,EAAGuI,KAGPvI,EAAEqI,cAAgBC,EAAiBD,cAGnCH,GAAanmC,KAAMwmC,IAIfE,GAAqBrlC,EAAOgD,WAAYoiC,IAC5CA,EAAaC,EAAmB,IAGjCA,EAAoBD,EAAcjiC,SAI5B,WAYT/D,EAAQmmC,mBAAqB,WAC5B,GAAIriB,GAAOnlB,EAASynC,eAAeD,mBAAoB,IAAKriB,IAE5D,OADAA,GAAKnU,UAAY,6BACiB,IAA3BmU,EAAKvY,WAAW5J,UAQxBf,EAAOgZ,UAAY,SAAUqH,EAAMngB,EAASulC,GAC3C,GAAqB,gBAATplB,GACX,QAEuB,kBAAZngB,KACXulC,EAAcvlC,EACdA,GAAU,EAGX,IAAIoV,GAAMowB,EAAQ7gB,CAwBlB,OAtBM3kB,KAIAd,EAAQmmC,oBACZrlC,EAAUnC,EAASynC,eAAeD,mBAAoB,IAKtDjwB,EAAOpV,EAAQT,cAAe,QAC9B6V,EAAK3B,KAAO5V,EAASuV,SAASK,KAC9BzT,EAAQP,KAAKC,YAAa0V,IAE1BpV,EAAUnC,GAIZ2nC,EAAShtB,EAAWnN,KAAM8U,GAC1BwE,GAAW4gB,MAGNC,GACKxlC,EAAQT,cAAeimC,EAAQ,MAGzCA,EAAS9gB,IAAiBvE,GAAQngB,EAAS2kB,GAEtCA,GAAWA,EAAQ9jB,QACvBf,EAAQ6kB,GAAUzJ,SAGZpb,EAAOsB,SAAWokC,EAAO/6B,cAOjC3K,EAAOG,GAAG2oB,KAAO,SAAU+W,EAAK8F,EAAQlkC,GACvC,GAAIxB,GAAU4D,EAAMs7B,EACnBrmB,EAAO3a,KACPmoB,EAAMuZ,EAAIjhC,QAAS,IAsDpB,OApDK0nB,QACJrmB,EAAWD,EAAO4E,KAAMi7B,EAAIphC,MAAO6nB,IACnCuZ,EAAMA,EAAIphC,MAAO,EAAG6nB,IAIhBtmB,EAAOgD,WAAY2iC,IAGvBlkC,EAAWkkC,EACXA,EAASxiC,QAGEwiC,GAA4B,gBAAXA,KAC5B9hC,EAAO,QAIHiV,EAAK/X,OAAS,GAClBf,EAAO6gC,MACNhB,IAAKA,EAKLh8B,KAAMA,GAAQ,MACdi6B,SAAU,OACVzd,KAAMslB,IACHx+B,KAAM,SAAUq9B,GAGnBrF,EAAWr9B,UAEXgX,EAAKoU,KAAMjtB,EAIVD,EAAQ,SAAU4tB,OAAQ5tB,EAAOgZ,UAAWwrB,IAAiB91B,KAAMzO,GAGnEukC,KAKEjoB,OAAQ9a,GAAY,SAAUw8B,EAAO+D,GACxClpB,EAAKtX,KAAM,WACVC,EAASI,MAAO1D,KAAMghC,IAAclB,EAAMuG,aAAcxC,EAAQ/D,QAK5D9/B,MAOR6B,EAAOwB,MACN,YACA,WACA,eACA,YACA,cACA,YACE,SAAUI,EAAGiC,GACf7D,EAAOG,GAAI0D,GAAS,SAAU1D,GAC7B,MAAOhC,MAAK8nB,GAAIpiB,EAAM1D,MAOxBH,EAAOgQ,KAAK9H,QAAQ09B,SAAW,SAAUjkC,GACxC,MAAO3B,GAAOiF,KAAMjF,EAAO83B,OAAQ,SAAU33B,GAC5C,MAAOwB,KAASxB,EAAGwB,OAChBZ,OASL,SAAS8kC,IAAWlkC,GACnB,MAAO3B,GAAO+D,SAAUpC,GAASA,EAAyB,IAAlBA,EAAKiJ,UAAkBjJ,EAAKuM,YAGrElO,EAAO8lC,QACNC,UAAW,SAAUpkC,EAAMa,EAASZ,GACnC,GAAIokC,GAAaC,EAASC,EAAWC,EAAQC,EAAWC,EAAYC,EACnE7V,EAAWzwB,EAAOkiB,IAAKvgB,EAAM,YAC7B4kC,EAAUvmC,EAAQ2B,GAClB0nB,IAGiB,YAAboH,IACJ9uB,EAAKqgB,MAAMyO,SAAW,YAGvB2V,EAAYG,EAAQT,SACpBI,EAAYlmC,EAAOkiB,IAAKvgB,EAAM,OAC9B0kC,EAAarmC,EAAOkiB,IAAKvgB,EAAM,QAC/B2kC,GAAmC,aAAb7V,GAAwC,UAAbA,KAC9CyV,EAAYG,GAAaznC,QAAS,WAIhC0nC,GACJN,EAAcO,EAAQ9V,WACtB0V,EAASH,EAAY73B,IACrB83B,EAAUD,EAAYlT,OAGtBqT,EAASjiC,WAAYgiC,IAAe,EACpCD,EAAU/hC,WAAYmiC,IAAgB,GAGlCrmC,EAAOgD,WAAYR,KAGvBA,EAAUA,EAAQrD,KAAMwC,EAAMC,EAAG5B,EAAOuC,UAAY6jC,KAGjC,MAAf5jC,EAAQ2L,MACZkb,EAAMlb,IAAQ3L,EAAQ2L,IAAMi4B,EAAUj4B,IAAQg4B,GAE1B,MAAhB3jC,EAAQswB,OACZzJ,EAAMyJ,KAAStwB,EAAQswB,KAAOsT,EAAUtT,KAASmT,GAG7C,SAAWzjC,GACfA,EAAQgkC,MAAMrnC,KAAMwC,EAAM0nB,GAG1Bkd,EAAQrkB,IAAKmH,KAKhBrpB,EAAOG,GAAGoC,QACTujC,OAAQ,SAAUtjC,GAGjB,GAAKV,UAAUf,OACd,MAAmBoC,UAAZX,EACNrE,KACAA,KAAKqD,KAAM,SAAUI,GACpB5B,EAAO8lC,OAAOC,UAAW5nC,KAAMqE,EAASZ,IAI3C,IAAIgF,GAAS6/B,EAAKC,EAAMnnC,EACvBoC,EAAOxD,KAAM,EAEd,IAAMwD,EAON,MAAMA,GAAKgwB,iBAAiB5wB,QAI5B2lC,EAAO/kC,EAAKiwB,wBAGP8U,EAAKpX,OAASoX,EAAKxR,QACvB31B,EAAMoC,EAAK2J,cACXm7B,EAAMZ,GAAWtmC,GACjBqH,EAAUrH,EAAIuO,iBAGbK,IAAKu4B,EAAKv4B,IAAMs4B,EAAIE,YAAc//B,EAAQggC,UAC1C9T,KAAM4T,EAAK5T,KAAO2T,EAAII,YAAcjgC,EAAQkgC,aAKvCJ,IAlBGv4B,IAAK,EAAG2kB,KAAM,IAqBzBrC,SAAU,WACT,GAAMtyB,KAAM,GAAZ,CAIA,GAAI4oC,GAAcjB,EACjBnkC,EAAOxD,KAAM,GACb6oC,GAAiB74B,IAAK,EAAG2kB,KAAM,EA4BhC,OAxBwC,UAAnC9yB,EAAOkiB,IAAKvgB,EAAM,YAGtBmkC,EAASnkC,EAAKiwB,yBAKdmV,EAAe5oC,KAAK4oC,eAGpBjB,EAAS3nC,KAAK2nC,SACR9lC,EAAOyE,SAAUsiC,EAAc,GAAK,UACzCC,EAAeD,EAAajB,UAI7BkB,GACC74B,IAAK64B,EAAa74B,IAAMnO,EAAOkiB,IAAK6kB,EAAc,GAAK,kBAAkB,GACzEjU,KAAMkU,EAAalU,KAAO9yB,EAAOkiB,IAAK6kB,EAAc,GAAK,mBAAmB,MAM7E54B,IAAK23B,EAAO33B,IAAM64B,EAAa74B,IAAMnO,EAAOkiB,IAAKvgB,EAAM,aAAa,GACpEmxB,KAAMgT,EAAOhT,KAAOkU,EAAalU,KAAO9yB,EAAOkiB,IAAKvgB,EAAM,cAAc,MAc1EolC,aAAc,WACb,MAAO5oC,MAAKuD,IAAK,WAChB,GAAIqlC,GAAe5oC,KAAK4oC,YAExB,OAAQA,GAA2D,WAA3C/mC,EAAOkiB,IAAK6kB,EAAc,YACjDA,EAAeA,EAAaA,YAG7B,OAAOA,IAAgBj5B,QAM1B9N,EAAOwB,MAAQ0yB,WAAY,cAAeD,UAAW,eAAiB,SAAUlY,EAAQuE,GACvF,GAAInS,GAAM,gBAAkBmS,CAE5BtgB,GAAOG,GAAI4b,GAAW,SAAU5L,GAC/B,MAAOsP,GAAQthB,KAAM,SAAUwD,EAAMoa,EAAQ5L,GAC5C,GAAIs2B,GAAMZ,GAAWlkC,EAErB,OAAawB,UAARgN,EACGs2B,EAAMA,EAAKnmB,GAAS3e,EAAMoa,QAG7B0qB,EACJA,EAAIQ,SACF94B,EAAYs4B,EAAII,YAAV12B,EACPhC,EAAMgC,EAAMs2B,EAAIE,aAIjBhlC,EAAMoa,GAAW5L,IAEhB4L,EAAQ5L,EAAKrO,UAAUf,WAU5Bf,EAAOwB,MAAQ,MAAO,QAAU,SAAUI,EAAG0e,GAC5CtgB,EAAO6xB,SAAUvR,GAAS8P,GAAchxB,EAAQuwB,cAC/C,SAAUhuB,EAAMquB,GACf,GAAKA,EAIJ,MAHAA,GAAWD,GAAQpuB,EAAM2e,GAGlBoO,GAAU7iB,KAAMmkB,GACtBhwB,EAAQ2B,GAAO8uB,WAAYnQ,GAAS,KACpC0P,MAQLhwB,EAAOwB,MAAQ0lC,OAAQ,SAAUC,MAAO,SAAW,SAAU1kC,EAAMoB,GAClE7D,EAAOwB,MAAQwxB,QAAS,QAAUvwB,EAAM2pB,QAASvoB,EAAMujC,GAAI,QAAU3kC,GACpE,SAAU4kC,EAAcC,GAGxBtnC,EAAOG,GAAImnC,GAAa,SAAUvU,EAAQxtB,GACzC,GAAIma,GAAY5d,UAAUf,SAAYsmC,GAAkC,iBAAXtU,IAC5DzB,EAAQ+V,IAAkBtU,KAAW,GAAQxtB,KAAU,EAAO,SAAW,SAE1E,OAAOka,GAAQthB,KAAM,SAAUwD,EAAMkC,EAAM0B,GAC1C,GAAIhG,EAEJ,OAAKS,GAAO+D,SAAUpC,GAGkB,IAAhC2lC,EAAS1oC,QAAS,SACxB+C,EAAM,QAAUc,GAChBd,EAAK5D,SAAS+P,gBAAiB,SAAWrL,GAIrB,IAAlBd,EAAKiJ,UACTrL,EAAMoC,EAAKmM,gBAIJzK,KAAK+tB,IACXzvB,EAAKuhB,KAAM,SAAWzgB,GAAQlD,EAAK,SAAWkD,GAC9Cd,EAAKuhB,KAAM,SAAWzgB,GAAQlD,EAAK,SAAWkD,GAC9ClD,EAAK,SAAWkD,KAIDU,SAAVoC,EAGNvF,EAAOkiB,IAAKvgB,EAAMkC,EAAMytB,GAGxBtxB,EAAOgiB,MAAOrgB,EAAMkC,EAAM0B,EAAO+rB,IAChCztB,EAAM6b,EAAYqT,EAAS5vB,OAAWuc,QAM5C1f,EAAOG,GAAGoC,QAETglC,KAAM,SAAUrhB,EAAO7F,EAAMlgB,GAC5B,MAAOhC,MAAK8nB,GAAIC,EAAO,KAAM7F,EAAMlgB,IAEpCqnC,OAAQ,SAAUthB,EAAO/lB,GACxB,MAAOhC,MAAKmoB,IAAKJ,EAAO,KAAM/lB,IAG/BsnC,SAAU,SAAUxnC,EAAUimB,EAAO7F,EAAMlgB,GAC1C,MAAOhC,MAAK8nB,GAAIC,EAAOjmB,EAAUogB,EAAMlgB,IAExCunC,WAAY,SAAUznC,EAAUimB,EAAO/lB,GAGtC,MAA4B,KAArB2B,UAAUf,OAChB5C,KAAKmoB,IAAKrmB,EAAU,MACpB9B,KAAKmoB,IAAKJ,EAAOjmB,GAAY,KAAME,MAItCH,EAAO2nC,UAAY9mB,KAAKC,MAkBD,kBAAX8mB,SAAyBA,OAAOC,KAC3CD,OAAQ,YAAc,WACrB,MAAO5nC,IAQT,IAGC8nC,IAAU5pC,EAAO8B,OAGjB+nC,GAAK7pC,EAAO8pC,CAsBb,OApBAhoC,GAAOioC,WAAa,SAAUllC,GAS7B,MARK7E,GAAO8pC,IAAMhoC,IACjB9B,EAAO8pC,EAAID,IAGPhlC,GAAQ7E,EAAO8B,SAAWA,IAC9B9B,EAAO8B,OAAS8nC,IAGV9nC,GAMF5B,IACLF,EAAO8B,OAAS9B,EAAO8pC,EAAIhoC,GAIrBA","file":"jquery.min.js"}
Index: EcnlProtoTool/trunk/webapp/webmrbc/js/jszip.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/js/jszip.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/js/jszip.js	(revision 270)
@@ -0,0 +1,8982 @@
+/*!
+
+JSZip - A Javascript class for generating and reading zip files
+<http://stuartk.com/jszip>
+
+(c) 2009-2014 Stuart Knightley <stuart [at] stuartk.com>
+Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown.
+
+JSZip uses the library pako released under the MIT license :
+https://github.com/nodeca/pako/blob/master/LICENSE
+*/
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.JSZip=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
+'use strict';
+// private property
+var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
+
+
+// public method for encoding
+exports.encode = function(input, utf8) {
+    var output = "";
+    var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
+    var i = 0;
+
+    while (i < input.length) {
+
+        chr1 = input.charCodeAt(i++);
+        chr2 = input.charCodeAt(i++);
+        chr3 = input.charCodeAt(i++);
+
+        enc1 = chr1 >> 2;
+        enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
+        enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
+        enc4 = chr3 & 63;
+
+        if (isNaN(chr2)) {
+            enc3 = enc4 = 64;
+        }
+        else if (isNaN(chr3)) {
+            enc4 = 64;
+        }
+
+        output = output + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4);
+
+    }
+
+    return output;
+};
+
+// public method for decoding
+exports.decode = function(input, utf8) {
+    var output = "";
+    var chr1, chr2, chr3;
+    var enc1, enc2, enc3, enc4;
+    var i = 0;
+
+    input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
+
+    while (i < input.length) {
+
+        enc1 = _keyStr.indexOf(input.charAt(i++));
+        enc2 = _keyStr.indexOf(input.charAt(i++));
+        enc3 = _keyStr.indexOf(input.charAt(i++));
+        enc4 = _keyStr.indexOf(input.charAt(i++));
+
+        chr1 = (enc1 << 2) | (enc2 >> 4);
+        chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
+        chr3 = ((enc3 & 3) << 6) | enc4;
+
+        output = output + String.fromCharCode(chr1);
+
+        if (enc3 != 64) {
+            output = output + String.fromCharCode(chr2);
+        }
+        if (enc4 != 64) {
+            output = output + String.fromCharCode(chr3);
+        }
+
+    }
+
+    return output;
+
+};
+
+},{}],2:[function(_dereq_,module,exports){
+'use strict';
+function CompressedObject() {
+    this.compressedSize = 0;
+    this.uncompressedSize = 0;
+    this.crc32 = 0;
+    this.compressionMethod = null;
+    this.compressedContent = null;
+}
+
+CompressedObject.prototype = {
+    /**
+     * Return the decompressed content in an unspecified format.
+     * The format will depend on the decompressor.
+     * @return {Object} the decompressed content.
+     */
+    getContent: function() {
+        return null; // see implementation
+    },
+    /**
+     * Return the compressed content in an unspecified format.
+     * The format will depend on the compressed conten source.
+     * @return {Object} the compressed content.
+     */
+    getCompressedContent: function() {
+        return null; // see implementation
+    }
+};
+module.exports = CompressedObject;
+
+},{}],3:[function(_dereq_,module,exports){
+'use strict';
+exports.STORE = {
+    magic: "\x00\x00",
+    compress: function(content) {
+        return content; // no compression
+    },
+    uncompress: function(content) {
+        return content; // no compression
+    },
+    compressInputType: null,
+    uncompressInputType: null
+};
+exports.DEFLATE = _dereq_('./flate');
+
+},{"./flate":8}],4:[function(_dereq_,module,exports){
+'use strict';
+
+var utils = _dereq_('./utils');
+
+var table = [
+    0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
+    0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
+    0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
+    0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
+    0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
+    0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
+    0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
+    0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
+    0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
+    0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
+    0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
+    0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
+    0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
+    0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
+    0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
+    0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
+    0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
+    0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
+    0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
+    0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
+    0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
+    0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
+    0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
+    0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
+    0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
+    0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
+    0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
+    0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
+    0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
+    0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
+    0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
+    0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
+    0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
+    0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
+    0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
+    0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
+    0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
+    0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
+    0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
+    0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
+    0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
+    0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
+    0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
+    0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
+    0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
+    0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
+    0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
+    0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
+    0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
+    0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
+    0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
+    0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
+    0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
+    0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
+    0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
+    0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
+    0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
+    0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
+    0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
+    0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
+    0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
+    0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
+    0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
+    0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
+];
+
+/**
+ *
+ *  Javascript crc32
+ *  http://www.webtoolkit.info/
+ *
+ */
+module.exports = function crc32(input, crc) {
+    if (typeof input === "undefined" || !input.length) {
+        return 0;
+    }
+
+    var isArray = utils.getTypeOf(input) !== "string";
+
+    if (typeof(crc) == "undefined") {
+        crc = 0;
+    }
+    var x = 0;
+    var y = 0;
+    var b = 0;
+
+    crc = crc ^ (-1);
+    for (var i = 0, iTop = input.length; i < iTop; i++) {
+        b = isArray ? input[i] : input.charCodeAt(i);
+        y = (crc ^ b) & 0xFF;
+        x = table[y];
+        crc = (crc >>> 8) ^ x;
+    }
+
+    return crc ^ (-1);
+};
+// vim: set shiftwidth=4 softtabstop=4:
+
+},{"./utils":21}],5:[function(_dereq_,module,exports){
+'use strict';
+var utils = _dereq_('./utils');
+
+function DataReader(data) {
+    this.data = null; // type : see implementation
+    this.length = 0;
+    this.index = 0;
+}
+DataReader.prototype = {
+    /**
+     * Check that the offset will not go too far.
+     * @param {string} offset the additional offset to check.
+     * @throws {Error} an Error if the offset is out of bounds.
+     */
+    checkOffset: function(offset) {
+        this.checkIndex(this.index + offset);
+    },
+    /**
+     * Check that the specifed index will not be too far.
+     * @param {string} newIndex the index to check.
+     * @throws {Error} an Error if the index is out of bounds.
+     */
+    checkIndex: function(newIndex) {
+        if (this.length < newIndex || newIndex < 0) {
+            throw new Error("End of data reached (data length = " + this.length + ", asked index = " + (newIndex) + "). Corrupted zip ?");
+        }
+    },
+    /**
+     * Change the index.
+     * @param {number} newIndex The new index.
+     * @throws {Error} if the new index is out of the data.
+     */
+    setIndex: function(newIndex) {
+        this.checkIndex(newIndex);
+        this.index = newIndex;
+    },
+    /**
+     * Skip the next n bytes.
+     * @param {number} n the number of bytes to skip.
+     * @throws {Error} if the new index is out of the data.
+     */
+    skip: function(n) {
+        this.setIndex(this.index + n);
+    },
+    /**
+     * Get the byte at the specified index.
+     * @param {number} i the index to use.
+     * @return {number} a byte.
+     */
+    byteAt: function(i) {
+        // see implementations
+    },
+    /**
+     * Get the next number with a given byte size.
+     * @param {number} size the number of bytes to read.
+     * @return {number} the corresponding number.
+     */
+    readInt: function(size) {
+        var result = 0,
+            i;
+        this.checkOffset(size);
+        for (i = this.index + size - 1; i >= this.index; i--) {
+            result = (result << 8) + this.byteAt(i);
+        }
+        this.index += size;
+        return result;
+    },
+    /**
+     * Get the next string with a given byte size.
+     * @param {number} size the number of bytes to read.
+     * @return {string} the corresponding string.
+     */
+    readString: function(size) {
+        return utils.transformTo("string", this.readData(size));
+    },
+    /**
+     * Get raw data without conversion, <size> bytes.
+     * @param {number} size the number of bytes to read.
+     * @return {Object} the raw data, implementation specific.
+     */
+    readData: function(size) {
+        // see implementations
+    },
+    /**
+     * Find the last occurence of a zip signature (4 bytes).
+     * @param {string} sig the signature to find.
+     * @return {number} the index of the last occurence, -1 if not found.
+     */
+    lastIndexOfSignature: function(sig) {
+        // see implementations
+    },
+    /**
+     * Get the next date.
+     * @return {Date} the date.
+     */
+    readDate: function() {
+        var dostime = this.readInt(4);
+        return new Date(
+        ((dostime >> 25) & 0x7f) + 1980, // year
+        ((dostime >> 21) & 0x0f) - 1, // month
+        (dostime >> 16) & 0x1f, // day
+        (dostime >> 11) & 0x1f, // hour
+        (dostime >> 5) & 0x3f, // minute
+        (dostime & 0x1f) << 1); // second
+    }
+};
+module.exports = DataReader;
+
+},{"./utils":21}],6:[function(_dereq_,module,exports){
+'use strict';
+exports.base64 = false;
+exports.binary = false;
+exports.dir = false;
+exports.createFolders = false;
+exports.date = null;
+exports.compression = null;
+exports.comment = null;
+
+},{}],7:[function(_dereq_,module,exports){
+'use strict';
+var utils = _dereq_('./utils');
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.string2binary = function(str) {
+    return utils.string2binary(str);
+};
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.string2Uint8Array = function(str) {
+    return utils.transformTo("uint8array", str);
+};
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.uint8Array2String = function(array) {
+    return utils.transformTo("string", array);
+};
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.string2Blob = function(str) {
+    var buffer = utils.transformTo("arraybuffer", str);
+    return utils.arrayBuffer2Blob(buffer);
+};
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.arrayBuffer2Blob = function(buffer) {
+    return utils.arrayBuffer2Blob(buffer);
+};
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.transformTo = function(outputType, input) {
+    return utils.transformTo(outputType, input);
+};
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.getTypeOf = function(input) {
+    return utils.getTypeOf(input);
+};
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.checkSupport = function(type) {
+    return utils.checkSupport(type);
+};
+
+/**
+ * @deprecated
+ * This value will be removed in a future version without replacement.
+ */
+exports.MAX_VALUE_16BITS = utils.MAX_VALUE_16BITS;
+
+/**
+ * @deprecated
+ * This value will be removed in a future version without replacement.
+ */
+exports.MAX_VALUE_32BITS = utils.MAX_VALUE_32BITS;
+
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.pretty = function(str) {
+    return utils.pretty(str);
+};
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.findCompression = function(compressionMethod) {
+    return utils.findCompression(compressionMethod);
+};
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.isRegExp = function (object) {
+    return utils.isRegExp(object);
+};
+
+
+},{"./utils":21}],8:[function(_dereq_,module,exports){
+'use strict';
+var USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined');
+
+var pako = _dereq_("pako");
+exports.uncompressInputType = USE_TYPEDARRAY ? "uint8array" : "array";
+exports.compressInputType = USE_TYPEDARRAY ? "uint8array" : "array";
+
+exports.magic = "\x08\x00";
+exports.compress = function(input) {
+    return pako.deflateRaw(input);
+};
+exports.uncompress =  function(input) {
+    return pako.inflateRaw(input);
+};
+
+},{"pako":24}],9:[function(_dereq_,module,exports){
+'use strict';
+
+var base64 = _dereq_('./base64');
+
+/**
+Usage:
+   zip = new JSZip();
+   zip.file("hello.txt", "Hello, World!").file("tempfile", "nothing");
+   zip.folder("images").file("smile.gif", base64Data, {base64: true});
+   zip.file("Xmas.txt", "Ho ho ho !", {date : new Date("December 25, 2007 00:00:01")});
+   zip.remove("tempfile");
+
+   base64zip = zip.generate();
+
+**/
+
+/**
+ * Representation a of zip file in js
+ * @constructor
+ * @param {String=|ArrayBuffer=|Uint8Array=} data the data to load, if any (optional).
+ * @param {Object=} options the options for creating this objects (optional).
+ */
+function JSZip(data, options) {
+    // if this constructor isÂ used withoutÂ `new`, itÂ adds `new` beforeÂ itself:
+    if(!(this instanceof JSZip)) return new JSZip(data, options);
+
+    // object containing the files :
+    // {
+    //   "folder/" : {...},
+    //   "folder/data.txt" : {...}
+    // }
+    this.files = {};
+
+    this.comment = null;
+
+    // Where we are in the hierarchy
+    this.root = "";
+    if (data) {
+        this.load(data, options);
+    }
+    this.clone = function() {
+        var newObj = new JSZip();
+        for (var i in this) {
+            if (typeof this[i] !== "function") {
+                newObj[i] = this[i];
+            }
+        }
+        return newObj;
+    };
+}
+JSZip.prototype = _dereq_('./object');
+JSZip.prototype.load = _dereq_('./load');
+JSZip.support = _dereq_('./support');
+JSZip.defaults = _dereq_('./defaults');
+
+/**
+ * @deprecated
+ * This namespace will be removed in a future version without replacement.
+ */
+JSZip.utils = _dereq_('./deprecatedPublicUtils');
+
+JSZip.base64 = {
+    /**
+     * @deprecated
+     * This method will be removed in a future version without replacement.
+     */
+    encode : function(input) {
+        return base64.encode(input);
+    },
+    /**
+     * @deprecated
+     * This method will be removed in a future version without replacement.
+     */
+    decode : function(input) {
+        return base64.decode(input);
+    }
+};
+JSZip.compressions = _dereq_('./compressions');
+module.exports = JSZip;
+
+},{"./base64":1,"./compressions":3,"./defaults":6,"./deprecatedPublicUtils":7,"./load":10,"./object":13,"./support":17}],10:[function(_dereq_,module,exports){
+'use strict';
+var base64 = _dereq_('./base64');
+var ZipEntries = _dereq_('./zipEntries');
+module.exports = function(data, options) {
+    var files, zipEntries, i, input;
+    options = options || {};
+    if (options.base64) {
+        data = base64.decode(data);
+    }
+
+    zipEntries = new ZipEntries(data, options);
+    files = zipEntries.files;
+    for (i = 0; i < files.length; i++) {
+        input = files[i];
+        this.file(input.fileName, input.decompressed, {
+            binary: true,
+            optimizedBinaryString: true,
+            date: input.date,
+            dir: input.dir,
+            comment : input.fileComment.length ? input.fileComment : null,
+            createFolders: options.createFolders
+        });
+    }
+    if (zipEntries.zipComment.length) {
+        this.comment = zipEntries.zipComment;
+    }
+
+    return this;
+};
+
+},{"./base64":1,"./zipEntries":22}],11:[function(_dereq_,module,exports){
+(function (Buffer){
+'use strict';
+module.exports = function(data, encoding){
+    return new Buffer(data, encoding);
+};
+module.exports.test = function(b){
+    return Buffer.isBuffer(b);
+};
+}).call(this,(typeof Buffer !== "undefined" ? Buffer : undefined))
+},{}],12:[function(_dereq_,module,exports){
+'use strict';
+var Uint8ArrayReader = _dereq_('./uint8ArrayReader');
+
+function NodeBufferReader(data) {
+    this.data = data;
+    this.length = this.data.length;
+    this.index = 0;
+}
+NodeBufferReader.prototype = new Uint8ArrayReader();
+
+/**
+ * @see DataReader.readData
+ */
+NodeBufferReader.prototype.readData = function(size) {
+    this.checkOffset(size);
+    var result = this.data.slice(this.index, this.index + size);
+    this.index += size;
+    return result;
+};
+module.exports = NodeBufferReader;
+
+},{"./uint8ArrayReader":18}],13:[function(_dereq_,module,exports){
+'use strict';
+var support = _dereq_('./support');
+var utils = _dereq_('./utils');
+var crc32 = _dereq_('./crc32');
+var signature = _dereq_('./signature');
+var defaults = _dereq_('./defaults');
+var base64 = _dereq_('./base64');
+var compressions = _dereq_('./compressions');
+var CompressedObject = _dereq_('./compressedObject');
+var nodeBuffer = _dereq_('./nodeBuffer');
+var utf8 = _dereq_('./utf8');
+var StringWriter = _dereq_('./stringWriter');
+var Uint8ArrayWriter = _dereq_('./uint8ArrayWriter');
+
+/**
+ * Returns the raw data of a ZipObject, decompress the content if necessary.
+ * @param {ZipObject} file the file to use.
+ * @return {String|ArrayBuffer|Uint8Array|Buffer} the data.
+ */
+var getRawData = function(file) {
+    if (file._data instanceof CompressedObject) {
+        file._data = file._data.getContent();
+        file.options.binary = true;
+        file.options.base64 = false;
+
+        if (utils.getTypeOf(file._data) === "uint8array") {
+            var copy = file._data;
+            // when reading an arraybuffer, the CompressedObject mechanism will keep it and subarray() a Uint8Array.
+            // if we request a file in the same format, we might get the same Uint8Array or its ArrayBuffer (the original zip file).
+            file._data = new Uint8Array(copy.length);
+            // with an empty Uint8Array, Opera fails with a "Offset larger than array size"
+            if (copy.length !== 0) {
+                file._data.set(copy, 0);
+            }
+        }
+    }
+    return file._data;
+};
+
+/**
+ * Returns the data of a ZipObject in a binary form. If the content is an unicode string, encode it.
+ * @param {ZipObject} file the file to use.
+ * @return {String|ArrayBuffer|Uint8Array|Buffer} the data.
+ */
+var getBinaryData = function(file) {
+    var result = getRawData(file),
+        type = utils.getTypeOf(result);
+    if (type === "string") {
+        if (!file.options.binary) {
+            // unicode text !
+            // unicode string => binary string is a painful process, check if we can avoid it.
+            if (support.nodebuffer) {
+                return nodeBuffer(result, "utf-8");
+            }
+        }
+        return file.asBinary();
+    }
+    return result;
+};
+
+/**
+ * Transform this._data into a string.
+ * @param {function} filter a function String -> String, applied if not null on the result.
+ * @return {String} the string representing this._data.
+ */
+var dataToString = function(asUTF8) {
+    var result = getRawData(this);
+    if (result === null || typeof result === "undefined") {
+        return "";
+    }
+    // if the data is a base64 string, we decode it before checking the encoding !
+    if (this.options.base64) {
+        result = base64.decode(result);
+    }
+    if (asUTF8 && this.options.binary) {
+        // JSZip.prototype.utf8decode supports arrays as input
+        // skip to array => string step, utf8decode will do it.
+        result = out.utf8decode(result);
+    }
+    else {
+        // no utf8 transformation, do the array => string step.
+        result = utils.transformTo("string", result);
+    }
+
+    if (!asUTF8 && !this.options.binary) {
+        result = utils.transformTo("string", out.utf8encode(result));
+    }
+    return result;
+};
+/**
+ * A simple object representing a file in the zip file.
+ * @constructor
+ * @param {string} name the name of the file
+ * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data
+ * @param {Object} options the options of the file
+ */
+var ZipObject = function(name, data, options) {
+    this.name = name;
+    this.dir = options.dir;
+    this.date = options.date;
+    this.comment = options.comment;
+
+    this._data = data;
+    this.options = options;
+
+    /*
+     * This object contains initial values for dir and date.
+     * With them, we can check if the user changed the deprecated metadata in
+     * `ZipObject#options` or not.
+     */
+    this._initialMetadata = {
+      dir : options.dir,
+      date : options.date
+    };
+};
+
+ZipObject.prototype = {
+    /**
+     * Return the content as UTF8 string.
+     * @return {string} the UTF8 string.
+     */
+    asText: function() {
+        return dataToString.call(this, true);
+    },
+    /**
+     * Returns the binary content.
+     * @return {string} the content as binary.
+     */
+    asBinary: function() {
+        return dataToString.call(this, false);
+    },
+    /**
+     * Returns the content as a nodejs Buffer.
+     * @return {Buffer} the content as a Buffer.
+     */
+    asNodeBuffer: function() {
+        var result = getBinaryData(this);
+        return utils.transformTo("nodebuffer", result);
+    },
+    /**
+     * Returns the content as an Uint8Array.
+     * @return {Uint8Array} the content as an Uint8Array.
+     */
+    asUint8Array: function() {
+        var result = getBinaryData(this);
+        return utils.transformTo("uint8array", result);
+    },
+    /**
+     * Returns the content as an ArrayBuffer.
+     * @return {ArrayBuffer} the content as an ArrayBufer.
+     */
+    asArrayBuffer: function() {
+        return this.asUint8Array().buffer;
+    }
+};
+
+/**
+ * Transform an integer into a string in hexadecimal.
+ * @private
+ * @param {number} dec the number to convert.
+ * @param {number} bytes the number of bytes to generate.
+ * @returns {string} the result.
+ */
+var decToHex = function(dec, bytes) {
+    var hex = "",
+        i;
+    for (i = 0; i < bytes; i++) {
+        hex += String.fromCharCode(dec & 0xff);
+        dec = dec >>> 8;
+    }
+    return hex;
+};
+
+/**
+ * Merge the objects passed as parameters into a new one.
+ * @private
+ * @param {...Object} var_args All objects to merge.
+ * @return {Object} a new object with the data of the others.
+ */
+var extend = function() {
+    var result = {}, i, attr;
+    for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers
+        for (attr in arguments[i]) {
+            if (arguments[i].hasOwnProperty(attr) && typeof result[attr] === "undefined") {
+                result[attr] = arguments[i][attr];
+            }
+        }
+    }
+    return result;
+};
+
+/**
+ * Transforms the (incomplete) options from the user into the complete
+ * set of options to create a file.
+ * @private
+ * @param {Object} o the options from the user.
+ * @return {Object} the complete set of options.
+ */
+var prepareFileAttrs = function(o) {
+    o = o || {};
+    if (o.base64 === true && (o.binary === null || o.binary === undefined)) {
+        o.binary = true;
+    }
+    o = extend(o, defaults);
+    o.date = o.date || new Date();
+    if (o.compression !== null) o.compression = o.compression.toUpperCase();
+
+    return o;
+};
+
+/**
+ * Add a file in the current folder.
+ * @private
+ * @param {string} name the name of the file
+ * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file
+ * @param {Object} o the options of the file
+ * @return {Object} the new file.
+ */
+var fileAdd = function(name, data, o) {
+    // be sure sub folders exist
+    var dataType = utils.getTypeOf(data),
+        parent;
+
+    o = prepareFileAttrs(o);
+
+    if (o.createFolders && (parent = parentFolder(name))) {
+        folderAdd.call(this, parent, true);
+    }
+
+    if (o.dir || data === null || typeof data === "undefined") {
+        o.base64 = false;
+        o.binary = false;
+        data = null;
+    }
+    else if (dataType === "string") {
+        if (o.binary && !o.base64) {
+            // optimizedBinaryString == true means that the file has already been filtered with a 0xFF mask
+            if (o.optimizedBinaryString !== true) {
+                // this is a string, not in a base64 format.
+                // Be sure that this is a correct "binary string"
+                data = utils.string2binary(data);
+            }
+        }
+    }
+    else { // arraybuffer, uint8array, ...
+        o.base64 = false;
+        o.binary = true;
+
+        if (!dataType && !(data instanceof CompressedObject)) {
+            throw new Error("The data of '" + name + "' is in an unsupported format !");
+        }
+
+        // special case : it's way easier to work with Uint8Array than with ArrayBuffer
+        if (dataType === "arraybuffer") {
+            data = utils.transformTo("uint8array", data);
+        }
+    }
+
+    var object = new ZipObject(name, data, o);
+    this.files[name] = object;
+    return object;
+};
+
+/**
+ * Find the parent folder of the path.
+ * @private
+ * @param {string} path the path to use
+ * @return {string} the parent folder, or ""
+ */
+var parentFolder = function (path) {
+    if (path.slice(-1) == '/') {
+        path = path.substring(0, path.length - 1);
+    }
+    var lastSlash = path.lastIndexOf('/');
+    return (lastSlash > 0) ? path.substring(0, lastSlash) : "";
+};
+
+/**
+ * Add a (sub) folder in the current folder.
+ * @private
+ * @param {string} name the folder's name
+ * @param {boolean=} [createFolders] If true, automatically create sub
+ *  folders. Defaults to false.
+ * @return {Object} the new folder.
+ */
+var folderAdd = function(name, createFolders) {
+    // Check the name ends with a /
+    if (name.slice(-1) != "/") {
+        name += "/"; // IE doesn't like substr(-1)
+    }
+
+    createFolders = (typeof createFolders !== 'undefined') ? createFolders : false;
+
+    // Does this folder already exist?
+    if (!this.files[name]) {
+        fileAdd.call(this, name, null, {
+            dir: true,
+            createFolders: createFolders
+        });
+    }
+    return this.files[name];
+};
+
+/**
+ * Generate a JSZip.CompressedObject for a given zipOject.
+ * @param {ZipObject} file the object to read.
+ * @param {JSZip.compression} compression the compression to use.
+ * @return {JSZip.CompressedObject} the compressed result.
+ */
+var generateCompressedObjectFrom = function(file, compression) {
+    var result = new CompressedObject(),
+        content;
+
+    // the data has not been decompressed, we might reuse things !
+    if (file._data instanceof CompressedObject) {
+        result.uncompressedSize = file._data.uncompressedSize;
+        result.crc32 = file._data.crc32;
+
+        if (result.uncompressedSize === 0 || file.dir) {
+            compression = compressions['STORE'];
+            result.compressedContent = "";
+            result.crc32 = 0;
+        }
+        else if (file._data.compressionMethod === compression.magic) {
+            result.compressedContent = file._data.getCompressedContent();
+        }
+        else {
+            content = file._data.getContent();
+            // need to decompress / recompress
+            result.compressedContent = compression.compress(utils.transformTo(compression.compressInputType, content));
+        }
+    }
+    else {
+        // have uncompressed data
+        content = getBinaryData(file);
+        if (!content || content.length === 0 || file.dir) {
+            compression = compressions['STORE'];
+            content = "";
+        }
+        result.uncompressedSize = content.length;
+        result.crc32 = crc32(content);
+        result.compressedContent = compression.compress(utils.transformTo(compression.compressInputType, content));
+    }
+
+    result.compressedSize = result.compressedContent.length;
+    result.compressionMethod = compression.magic;
+
+    return result;
+};
+
+/**
+ * Generate the various parts used in the construction of the final zip file.
+ * @param {string} name the file name.
+ * @param {ZipObject} file the file content.
+ * @param {JSZip.CompressedObject} compressedObject the compressed object.
+ * @param {number} offset the current offset from the start of the zip file.
+ * @return {object} the zip parts.
+ */
+var generateZipParts = function(name, file, compressedObject, offset) {
+    var data = compressedObject.compressedContent,
+        utfEncodedFileName = utils.transformTo("string", utf8.utf8encode(file.name)),
+        comment = file.comment || "",
+        utfEncodedComment = utils.transformTo("string", utf8.utf8encode(comment)),
+        useUTF8ForFileName = utfEncodedFileName.length !== file.name.length,
+        useUTF8ForComment = utfEncodedComment.length !== comment.length,
+        o = file.options,
+        dosTime,
+        dosDate,
+        extraFields = "",
+        unicodePathExtraField = "",
+        unicodeCommentExtraField = "",
+        dir, date;
+
+
+    // handle the deprecated options.dir
+    if (file._initialMetadata.dir !== file.dir) {
+        dir = file.dir;
+    } else {
+        dir = o.dir;
+    }
+
+    // handle the deprecated options.date
+    if(file._initialMetadata.date !== file.date) {
+        date = file.date;
+    } else {
+        date = o.date;
+    }
+
+    // date
+    // @see http://www.delorie.com/djgpp/doc/rbinter/it/52/13.html
+    // @see http://www.delorie.com/djgpp/doc/rbinter/it/65/16.html
+    // @see http://www.delorie.com/djgpp/doc/rbinter/it/66/16.html
+
+    dosTime = date.getHours();
+    dosTime = dosTime << 6;
+    dosTime = dosTime | date.getMinutes();
+    dosTime = dosTime << 5;
+    dosTime = dosTime | date.getSeconds() / 2;
+
+    dosDate = date.getFullYear() - 1980;
+    dosDate = dosDate << 4;
+    dosDate = dosDate | (date.getMonth() + 1);
+    dosDate = dosDate << 5;
+    dosDate = dosDate | date.getDate();
+
+    if (useUTF8ForFileName) {
+        // set the unicode path extra field. unzip needs at least one extra
+        // field to correctly handle unicode path, so using the path is as good
+        // as any other information. This could improve the situation with
+        // other archive managers too.
+        // This field is usually used without the utf8 flag, with a non
+        // unicode path in the header (winrar, winzip). This helps (a bit)
+        // with the messy Windows' default compressed folders feature but
+        // breaks on p7zip which doesn't seek the unicode path extra field.
+        // So for now, UTF-8 everywhere !
+        unicodePathExtraField =
+            // Version
+            decToHex(1, 1) +
+            // NameCRC32
+            decToHex(crc32(utfEncodedFileName), 4) +
+            // UnicodeName
+            utfEncodedFileName;
+
+        extraFields +=
+            // Info-ZIP Unicode Path Extra Field
+            "\x75\x70" +
+            // size
+            decToHex(unicodePathExtraField.length, 2) +
+            // content
+            unicodePathExtraField;
+    }
+
+    if(useUTF8ForComment) {
+
+        unicodeCommentExtraField =
+            // Version
+            decToHex(1, 1) +
+            // CommentCRC32
+            decToHex(this.crc32(utfEncodedComment), 4) +
+            // UnicodeName
+            utfEncodedComment;
+
+        extraFields +=
+            // Info-ZIP Unicode Path Extra Field
+            "\x75\x63" +
+            // size
+            decToHex(unicodeCommentExtraField.length, 2) +
+            // content
+            unicodeCommentExtraField;
+    }
+
+    var header = "";
+
+    // version needed to extract
+    header += "\x0A\x00";
+    // general purpose bit flag
+    // set bit 11 if utf8
+    header += (useUTF8ForFileName || useUTF8ForComment) ? "\x00\x08" : "\x00\x00";
+    // compression method
+    header += compressedObject.compressionMethod;
+    // last mod file time
+    header += decToHex(dosTime, 2);
+    // last mod file date
+    header += decToHex(dosDate, 2);
+    // crc-32
+    header += decToHex(compressedObject.crc32, 4);
+    // compressed size
+    header += decToHex(compressedObject.compressedSize, 4);
+    // uncompressed size
+    header += decToHex(compressedObject.uncompressedSize, 4);
+    // file name length
+    header += decToHex(utfEncodedFileName.length, 2);
+    // extra field length
+    header += decToHex(extraFields.length, 2);
+
+
+    var fileRecord = signature.LOCAL_FILE_HEADER + header + utfEncodedFileName + extraFields;
+
+    var dirRecord = signature.CENTRAL_FILE_HEADER +
+    // version made by (00: DOS)
+    "\x14\x00" +
+    // file header (common to file and central directory)
+    header +
+    // file comment length
+    decToHex(utfEncodedComment.length, 2) +
+    // disk number start
+    "\x00\x00" +
+    // internal file attributes TODO
+    "\x00\x00" +
+    // external file attributes
+    (dir === true ? "\x10\x00\x00\x00" : "\x00\x00\x00\x00") +
+    // relative offset of local header
+    decToHex(offset, 4) +
+    // file name
+    utfEncodedFileName +
+    // extra field
+    extraFields +
+    // file comment
+    utfEncodedComment;
+
+    return {
+        fileRecord: fileRecord,
+        dirRecord: dirRecord,
+        compressedObject: compressedObject
+    };
+};
+
+
+// return the actual prototype of JSZip
+var out = {
+    /**
+     * Read an existing zip and merge the data in the current JSZip object.
+     * The implementation is in jszip-load.js, don't forget to include it.
+     * @param {String|ArrayBuffer|Uint8Array|Buffer} stream  The stream to load
+     * @param {Object} options Options for loading the stream.
+     *  options.base64 : is the stream in base64 ? default : false
+     * @return {JSZip} the current JSZip object
+     */
+    load: function(stream, options) {
+        throw new Error("Load method is not defined. Is the file jszip-load.js included ?");
+    },
+
+    /**
+     * Filter nested files/folders with the specified function.
+     * @param {Function} search the predicate to use :
+     * function (relativePath, file) {...}
+     * It takes 2 arguments : the relative path and the file.
+     * @return {Array} An array of matching elements.
+     */
+    filter: function(search) {
+        var result = [],
+            filename, relativePath, file, fileClone;
+        for (filename in this.files) {
+            if (!this.files.hasOwnProperty(filename)) {
+                continue;
+            }
+            file = this.files[filename];
+            // return a new object, don't let the user mess with our internal objects :)
+            fileClone = new ZipObject(file.name, file._data, extend(file.options));
+            relativePath = filename.slice(this.root.length, filename.length);
+            if (filename.slice(0, this.root.length) === this.root && // the file is in the current root
+            search(relativePath, fileClone)) { // and the file matches the function
+                result.push(fileClone);
+            }
+        }
+        return result;
+    },
+
+    /**
+     * Add a file to the zip file, or search a file.
+     * @param   {string|RegExp} name The name of the file to add (if data is defined),
+     * the name of the file to find (if no data) or a regex to match files.
+     * @param   {String|ArrayBuffer|Uint8Array|Buffer} data  The file data, either raw or base64 encoded
+     * @param   {Object} o     File options
+     * @return  {JSZip|Object|Array} this JSZip object (when adding a file),
+     * a file (when searching by string) or an array of files (when searching by regex).
+     */
+    file: function(name, data, o) {
+        if (arguments.length === 1) {
+            if (utils.isRegExp(name)) {
+                var regexp = name;
+                return this.filter(function(relativePath, file) {
+                    return !file.dir && regexp.test(relativePath);
+                });
+            }
+            else { // text
+                return this.filter(function(relativePath, file) {
+                    return !file.dir && relativePath === name;
+                })[0] || null;
+            }
+        }
+        else { // more than one argument : we have data !
+            name = this.root + name;
+            fileAdd.call(this, name, data, o);
+        }
+        return this;
+    },
+
+    /**
+     * Add a directory to the zip file, or search.
+     * @param   {String|RegExp} arg The name of the directory to add, or a regex to search folders.
+     * @return  {JSZip} an object with the new directory as the root, or an array containing matching folders.
+     */
+    folder: function(arg) {
+        if (!arg) {
+            return this;
+        }
+
+        if (utils.isRegExp(arg)) {
+            return this.filter(function(relativePath, file) {
+                return file.dir && arg.test(relativePath);
+            });
+        }
+
+        // else, name is a new folder
+        var name = this.root + arg;
+        var newFolder = folderAdd.call(this, name);
+
+        // Allow chaining by returning a new object with this folder as the root
+        var ret = this.clone();
+        ret.root = newFolder.name;
+        return ret;
+    },
+
+    /**
+     * Delete a file, or a directory and all sub-files, from the zip
+     * @param {string} name the name of the file to delete
+     * @return {JSZip} this JSZip object
+     */
+    remove: function(name) {
+        name = this.root + name;
+        var file = this.files[name];
+        if (!file) {
+            // Look for any folders
+            if (name.slice(-1) != "/") {
+                name += "/";
+            }
+            file = this.files[name];
+        }
+
+        if (file && !file.dir) {
+            // file
+            delete this.files[name];
+        } else {
+            // maybe a folder, delete recursively
+            var kids = this.filter(function(relativePath, file) {
+                return file.name.slice(0, name.length) === name;
+            });
+            for (var i = 0; i < kids.length; i++) {
+                delete this.files[kids[i].name];
+            }
+        }
+
+        return this;
+    },
+
+    /**
+     * Generate the complete zip file
+     * @param {Object} options the options to generate the zip file :
+     * - base64, (deprecated, use type instead) true to generate base64.
+     * - compression, "STORE" by default.
+     * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob.
+     * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file
+     */
+    generate: function(options) {
+        options = extend(options || {}, {
+            base64: true,
+            compression: "STORE",
+            type: "base64",
+            comment: null
+        });
+
+        utils.checkSupport(options.type);
+
+        var zipData = [],
+            localDirLength = 0,
+            centralDirLength = 0,
+            writer, i,
+            utfEncodedComment = utils.transformTo("string", this.utf8encode(options.comment || this.comment || ""));
+
+        // first, generate all the zip parts.
+        for (var name in this.files) {
+            if (!this.files.hasOwnProperty(name)) {
+                continue;
+            }
+            var file = this.files[name];
+
+            var compressionName = file.options.compression || options.compression.toUpperCase();
+            var compression = compressions[compressionName];
+            if (!compression) {
+                throw new Error(compressionName + " is not a valid compression method !");
+            }
+
+            var compressedObject = generateCompressedObjectFrom.call(this, file, compression);
+
+            var zipPart = generateZipParts.call(this, name, file, compressedObject, localDirLength);
+            localDirLength += zipPart.fileRecord.length + compressedObject.compressedSize;
+            centralDirLength += zipPart.dirRecord.length;
+            zipData.push(zipPart);
+        }
+
+        var dirEnd = "";
+
+        // end of central dir signature
+        dirEnd = signature.CENTRAL_DIRECTORY_END +
+        // number of this disk
+        "\x00\x00" +
+        // number of the disk with the start of the central directory
+        "\x00\x00" +
+        // total number of entries in the central directory on this disk
+        decToHex(zipData.length, 2) +
+        // total number of entries in the central directory
+        decToHex(zipData.length, 2) +
+        // size of the central directory   4 bytes
+        decToHex(centralDirLength, 4) +
+        // offset of start of central directory with respect to the starting disk number
+        decToHex(localDirLength, 4) +
+        // .ZIP file comment length
+        decToHex(utfEncodedComment.length, 2) +
+        // .ZIP file comment
+        utfEncodedComment;
+
+
+        // we have all the parts (and the total length)
+        // time to create a writer !
+        var typeName = options.type.toLowerCase();
+        if(typeName==="uint8array"||typeName==="arraybuffer"||typeName==="blob"||typeName==="nodebuffer") {
+            writer = new Uint8ArrayWriter(localDirLength + centralDirLength + dirEnd.length);
+        }else{
+            writer = new StringWriter(localDirLength + centralDirLength + dirEnd.length);
+        }
+
+        for (i = 0; i < zipData.length; i++) {
+            writer.append(zipData[i].fileRecord);
+            writer.append(zipData[i].compressedObject.compressedContent);
+        }
+        for (i = 0; i < zipData.length; i++) {
+            writer.append(zipData[i].dirRecord);
+        }
+
+        writer.append(dirEnd);
+
+        var zip = writer.finalize();
+
+
+
+        switch(options.type.toLowerCase()) {
+            // case "zip is an Uint8Array"
+            case "uint8array" :
+            case "arraybuffer" :
+            case "nodebuffer" :
+               return utils.transformTo(options.type.toLowerCase(), zip);
+            case "blob" :
+               return utils.arrayBuffer2Blob(utils.transformTo("arraybuffer", zip));
+            // case "zip is a string"
+            case "base64" :
+               return (options.base64) ? base64.encode(zip) : zip;
+            default : // case "string" :
+               return zip;
+         }
+
+    },
+
+    /**
+     * @deprecated
+     * This method will be removed in a future version without replacement.
+     */
+    crc32: function (input, crc) {
+        return crc32(input, crc);
+    },
+
+    /**
+     * @deprecated
+     * This method will be removed in a future version without replacement.
+     */
+    utf8encode: function (string) {
+        return utils.transformTo("string", utf8.utf8encode(string));
+    },
+
+    /**
+     * @deprecated
+     * This method will be removed in a future version without replacement.
+     */
+    utf8decode: function (input) {
+        return utf8.utf8decode(input);
+    }
+};
+module.exports = out;
+
+},{"./base64":1,"./compressedObject":2,"./compressions":3,"./crc32":4,"./defaults":6,"./nodeBuffer":11,"./signature":14,"./stringWriter":16,"./support":17,"./uint8ArrayWriter":19,"./utf8":20,"./utils":21}],14:[function(_dereq_,module,exports){
+'use strict';
+exports.LOCAL_FILE_HEADER = "PK\x03\x04";
+exports.CENTRAL_FILE_HEADER = "PK\x01\x02";
+exports.CENTRAL_DIRECTORY_END = "PK\x05\x06";
+exports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x06\x07";
+exports.ZIP64_CENTRAL_DIRECTORY_END = "PK\x06\x06";
+exports.DATA_DESCRIPTOR = "PK\x07\x08";
+
+},{}],15:[function(_dereq_,module,exports){
+'use strict';
+var DataReader = _dereq_('./dataReader');
+var utils = _dereq_('./utils');
+
+function StringReader(data, optimizedBinaryString) {
+    this.data = data;
+    if (!optimizedBinaryString) {
+        this.data = utils.string2binary(this.data);
+    }
+    this.length = this.data.length;
+    this.index = 0;
+}
+StringReader.prototype = new DataReader();
+/**
+ * @see DataReader.byteAt
+ */
+StringReader.prototype.byteAt = function(i) {
+    return this.data.charCodeAt(i);
+};
+/**
+ * @see DataReader.lastIndexOfSignature
+ */
+StringReader.prototype.lastIndexOfSignature = function(sig) {
+    return this.data.lastIndexOf(sig);
+};
+/**
+ * @see DataReader.readData
+ */
+StringReader.prototype.readData = function(size) {
+    this.checkOffset(size);
+    // this will work because the constructor applied the "& 0xff" mask.
+    var result = this.data.slice(this.index, this.index + size);
+    this.index += size;
+    return result;
+};
+module.exports = StringReader;
+
+},{"./dataReader":5,"./utils":21}],16:[function(_dereq_,module,exports){
+'use strict';
+
+var utils = _dereq_('./utils');
+
+/**
+ * An object to write any content to a string.
+ * @constructor
+ */
+var StringWriter = function() {
+    this.data = [];
+};
+StringWriter.prototype = {
+    /**
+     * Append any content to the current string.
+     * @param {Object} input the content to add.
+     */
+    append: function(input) {
+        input = utils.transformTo("string", input);
+        this.data.push(input);
+    },
+    /**
+     * Finalize the construction an return the result.
+     * @return {string} the generated string.
+     */
+    finalize: function() {
+        return this.data.join("");
+    }
+};
+
+module.exports = StringWriter;
+
+},{"./utils":21}],17:[function(_dereq_,module,exports){
+(function (Buffer){
+'use strict';
+exports.base64 = true;
+exports.array = true;
+exports.string = true;
+exports.arraybuffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined";
+// contains true if JSZip can read/generate nodejs Buffer, false otherwise.
+// Browserify will provide a Buffer implementation for browsers, which is
+// an augmented Uint8Array (i.e., can be used as either Buffer or U8).
+exports.nodebuffer = typeof Buffer !== "undefined";
+// contains true if JSZip can read/generate Uint8Array, false otherwise.
+exports.uint8array = typeof Uint8Array !== "undefined";
+
+if (typeof ArrayBuffer === "undefined") {
+    exports.blob = false;
+}
+else {
+    var buffer = new ArrayBuffer(0);
+    try {
+        exports.blob = new Blob([buffer], {
+            type: "application/zip"
+        }).size === 0;
+    }
+    catch (e) {
+        try {
+            var Builder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;
+            var builder = new Builder();
+            builder.append(buffer);
+            exports.blob = builder.getBlob('application/zip').size === 0;
+        }
+        catch (e) {
+            exports.blob = false;
+        }
+    }
+}
+
+}).call(this,(typeof Buffer !== "undefined" ? Buffer : undefined))
+},{}],18:[function(_dereq_,module,exports){
+'use strict';
+var DataReader = _dereq_('./dataReader');
+
+function Uint8ArrayReader(data) {
+    if (data) {
+        this.data = data;
+        this.length = this.data.length;
+        this.index = 0;
+    }
+}
+Uint8ArrayReader.prototype = new DataReader();
+/**
+ * @see DataReader.byteAt
+ */
+Uint8ArrayReader.prototype.byteAt = function(i) {
+    return this.data[i];
+};
+/**
+ * @see DataReader.lastIndexOfSignature
+ */
+Uint8ArrayReader.prototype.lastIndexOfSignature = function(sig) {
+    var sig0 = sig.charCodeAt(0),
+        sig1 = sig.charCodeAt(1),
+        sig2 = sig.charCodeAt(2),
+        sig3 = sig.charCodeAt(3);
+    for (var i = this.length - 4; i >= 0; --i) {
+        if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) {
+            return i;
+        }
+    }
+
+    return -1;
+};
+/**
+ * @see DataReader.readData
+ */
+Uint8ArrayReader.prototype.readData = function(size) {
+    this.checkOffset(size);
+    if(size === 0) {
+        // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of [].
+        return new Uint8Array(0);
+    }
+    var result = this.data.subarray(this.index, this.index + size);
+    this.index += size;
+    return result;
+};
+module.exports = Uint8ArrayReader;
+
+},{"./dataReader":5}],19:[function(_dereq_,module,exports){
+'use strict';
+
+var utils = _dereq_('./utils');
+
+/**
+ * An object to write any content to an Uint8Array.
+ * @constructor
+ * @param {number} length The length of the array.
+ */
+var Uint8ArrayWriter = function(length) {
+    this.data = new Uint8Array(length);
+    this.index = 0;
+};
+Uint8ArrayWriter.prototype = {
+    /**
+     * Append any content to the current array.
+     * @param {Object} input the content to add.
+     */
+    append: function(input) {
+        if (input.length !== 0) {
+            // with an empty Uint8Array, Opera fails with a "Offset larger than array size"
+            input = utils.transformTo("uint8array", input);
+            this.data.set(input, this.index);
+            this.index += input.length;
+        }
+    },
+    /**
+     * Finalize the construction an return the result.
+     * @return {Uint8Array} the generated array.
+     */
+    finalize: function() {
+        return this.data;
+    }
+};
+
+module.exports = Uint8ArrayWriter;
+
+},{"./utils":21}],20:[function(_dereq_,module,exports){
+'use strict';
+
+var utils = _dereq_('./utils');
+var support = _dereq_('./support');
+var nodeBuffer = _dereq_('./nodeBuffer');
+
+/**
+ * The following functions come from pako, from pako/lib/utils/strings
+ * released under the MIT license, see pako https://github.com/nodeca/pako/
+ */
+
+// Table with utf8 lengths (calculated by first byte of sequence)
+// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,
+// because max possible codepoint is 0x10ffff
+var _utf8len = new Array(256);
+for (var i=0; i<256; i++) {
+  _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);
+}
+_utf8len[254]=_utf8len[254]=1; // Invalid sequence start
+
+// convert string to array (typed, when possible)
+var string2buf = function (str) {
+    var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;
+
+    // count binary size
+    for (m_pos = 0; m_pos < str_len; m_pos++) {
+        c = str.charCodeAt(m_pos);
+        if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {
+            c2 = str.charCodeAt(m_pos+1);
+            if ((c2 & 0xfc00) === 0xdc00) {
+                c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
+                m_pos++;
+            }
+        }
+        buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;
+    }
+
+    // allocate buffer
+    if (support.uint8array) {
+        buf = new Uint8Array(buf_len);
+    } else {
+        buf = new Array(buf_len);
+    }
+
+    // convert
+    for (i=0, m_pos = 0; i < buf_len; m_pos++) {
+        c = str.charCodeAt(m_pos);
+        if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {
+            c2 = str.charCodeAt(m_pos+1);
+            if ((c2 & 0xfc00) === 0xdc00) {
+                c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
+                m_pos++;
+            }
+        }
+        if (c < 0x80) {
+            /* one byte */
+            buf[i++] = c;
+        } else if (c < 0x800) {
+            /* two bytes */
+            buf[i++] = 0xC0 | (c >>> 6);
+            buf[i++] = 0x80 | (c & 0x3f);
+        } else if (c < 0x10000) {
+            /* three bytes */
+            buf[i++] = 0xE0 | (c >>> 12);
+            buf[i++] = 0x80 | (c >>> 6 & 0x3f);
+            buf[i++] = 0x80 | (c & 0x3f);
+        } else {
+            /* four bytes */
+            buf[i++] = 0xf0 | (c >>> 18);
+            buf[i++] = 0x80 | (c >>> 12 & 0x3f);
+            buf[i++] = 0x80 | (c >>> 6 & 0x3f);
+            buf[i++] = 0x80 | (c & 0x3f);
+        }
+    }
+
+    return buf;
+};
+
+// Calculate max possible position in utf8 buffer,
+// that will not break sequence. If that's not possible
+// - (very small limits) return max size as is.
+//
+// buf[] - utf8 bytes array
+// max   - length limit (mandatory);
+var utf8border = function(buf, max) {
+    var pos;
+
+    max = max || buf.length;
+    if (max > buf.length) { max = buf.length; }
+
+    // go back from last position, until start of sequence found
+    pos = max-1;
+    while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }
+
+    // Fuckup - very small and broken sequence,
+    // return max, because we should return something anyway.
+    if (pos < 0) { return max; }
+
+    // If we came to start of buffer - that means vuffer is too small,
+    // return max too.
+    if (pos === 0) { return max; }
+
+    return (pos + _utf8len[buf[pos]] > max) ? pos : max;
+};
+
+// convert array to string
+var buf2string = function (buf) {
+    var str, i, out, c, c_len;
+    var len = buf.length;
+
+    // Reserve max possible length (2 words per char)
+    // NB: by unknown reasons, Array is significantly faster for
+    //     String.fromCharCode.apply than Uint16Array.
+    var utf16buf = new Array(len*2);
+
+    for (out=0, i=0; i<len;) {
+        c = buf[i++];
+        // quick process ascii
+        if (c < 0x80) { utf16buf[out++] = c; continue; }
+
+        c_len = _utf8len[c];
+        // skip 5 & 6 byte codes
+        if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; }
+
+        // apply mask on first byte
+        c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;
+        // join the rest
+        while (c_len > 1 && i < len) {
+            c = (c << 6) | (buf[i++] & 0x3f);
+            c_len--;
+        }
+
+        // terminated by end of string?
+        if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }
+
+        if (c < 0x10000) {
+            utf16buf[out++] = c;
+        } else {
+            c -= 0x10000;
+            utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);
+            utf16buf[out++] = 0xdc00 | (c & 0x3ff);
+        }
+    }
+
+    // shrinkBuf(utf16buf, out)
+    if (utf16buf.length !== out) {
+        if(utf16buf.subarray) {
+            utf16buf = utf16buf.subarray(0, out);
+        } else {
+            utf16buf.length = out;
+        }
+    }
+
+    // return String.fromCharCode.apply(null, utf16buf);
+    return utils.applyFromCharCode(utf16buf);
+};
+
+
+// That's all for the pako functions.
+
+
+/**
+ * Transform a javascript string into an array (typed if possible) of bytes,
+ * UTF-8 encoded.
+ * @param {String} str the string to encode
+ * @return {Array|Uint8Array|Buffer} the UTF-8 encoded string.
+ */
+exports.utf8encode = function utf8encode(str) {
+    if (support.nodebuffer) {
+        return nodeBuffer(str, "utf-8");
+    }
+
+    return string2buf(str);
+};
+
+
+/**
+ * Transform a bytes array (or a representation) representing an UTF-8 encoded
+ * string into a javascript string.
+ * @param {Array|Uint8Array|Buffer} buf the data de decode
+ * @return {String} the decoded string.
+ */
+exports.utf8decode = function utf8decode(buf) {
+    if (support.nodebuffer) {
+        return utils.transformTo("nodebuffer", buf).toString("utf-8");
+    }
+
+    buf = utils.transformTo(support.uint8array ? "uint8array" : "array", buf);
+
+    // return buf2string(buf);
+    // Chrome prefers to work with "small" chunks of data
+    // for the method buf2string.
+    // Firefox and Chrome has their own shortcut, IE doesn't seem to really care.
+    var result = [], k = 0, len = buf.length, chunk = 65536;
+    while (k < len) {
+        var nextBoundary = utf8border(buf, Math.min(k + chunk, len));
+        if (support.uint8array) {
+            result.push(buf2string(buf.subarray(k, nextBoundary)));
+        } else {
+            result.push(buf2string(buf.slice(k, nextBoundary)));
+        }
+        k = nextBoundary;
+    }
+    return result.join("");
+
+};
+// vim: set shiftwidth=4 softtabstop=4:
+
+},{"./nodeBuffer":11,"./support":17,"./utils":21}],21:[function(_dereq_,module,exports){
+'use strict';
+var support = _dereq_('./support');
+var compressions = _dereq_('./compressions');
+var nodeBuffer = _dereq_('./nodeBuffer');
+/**
+ * Convert a string to a "binary string" : a string containing only char codes between 0 and 255.
+ * @param {string} str the string to transform.
+ * @return {String} the binary string.
+ */
+exports.string2binary = function(str) {
+    var result = "";
+    for (var i = 0; i < str.length; i++) {
+        result += String.fromCharCode(str.charCodeAt(i) & 0xff);
+    }
+    return result;
+};
+exports.arrayBuffer2Blob = function(buffer) {
+    exports.checkSupport("blob");
+
+    try {
+        // Blob constructor
+        return new Blob([buffer], {
+            type: "application/zip"
+        });
+    }
+    catch (e) {
+
+        try {
+            // deprecated, browser only, old way
+            var Builder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;
+            var builder = new Builder();
+            builder.append(buffer);
+            return builder.getBlob('application/zip');
+        }
+        catch (e) {
+
+            // well, fuck ?!
+            throw new Error("Bug : can't construct the Blob.");
+        }
+    }
+
+
+};
+/**
+ * The identity function.
+ * @param {Object} input the input.
+ * @return {Object} the same input.
+ */
+function identity(input) {
+    return input;
+}
+
+/**
+ * Fill in an array with a string.
+ * @param {String} str the string to use.
+ * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated).
+ * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array.
+ */
+function stringToArrayLike(str, array) {
+    for (var i = 0; i < str.length; ++i) {
+        array[i] = str.charCodeAt(i) & 0xFF;
+    }
+    return array;
+}
+
+/**
+ * Transform an array-like object to a string.
+ * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.
+ * @return {String} the result.
+ */
+function arrayLikeToString(array) {
+    // Performances notes :
+    // --------------------
+    // String.fromCharCode.apply(null, array) is the fastest, see
+    // see http://jsperf.com/converting-a-uint8array-to-a-string/2
+    // but the stack is limited (and we can get huge arrays !).
+    //
+    // result += String.fromCharCode(array[i]); generate too many strings !
+    //
+    // This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2
+    var chunk = 65536;
+    var result = [],
+        len = array.length,
+        type = exports.getTypeOf(array),
+        k = 0,
+        canUseApply = true;
+      try {
+         switch(type) {
+            case "uint8array":
+               String.fromCharCode.apply(null, new Uint8Array(0));
+               break;
+            case "nodebuffer":
+               String.fromCharCode.apply(null, nodeBuffer(0));
+               break;
+         }
+      } catch(e) {
+         canUseApply = false;
+      }
+
+      // no apply : slow and painful algorithm
+      // default browser on android 4.*
+      if (!canUseApply) {
+         var resultStr = "";
+         for(var i = 0; i < array.length;i++) {
+            resultStr += String.fromCharCode(array[i]);
+         }
+    return resultStr;
+    }
+    while (k < len && chunk > 1) {
+        try {
+            if (type === "array" || type === "nodebuffer") {
+                result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len))));
+            }
+            else {
+                result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len))));
+            }
+            k += chunk;
+        }
+        catch (e) {
+            chunk = Math.floor(chunk / 2);
+        }
+    }
+    return result.join("");
+}
+
+exports.applyFromCharCode = arrayLikeToString;
+
+
+/**
+ * Copy the data from an array-like to an other array-like.
+ * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array.
+ * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated.
+ * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array.
+ */
+function arrayLikeToArrayLike(arrayFrom, arrayTo) {
+    for (var i = 0; i < arrayFrom.length; i++) {
+        arrayTo[i] = arrayFrom[i];
+    }
+    return arrayTo;
+}
+
+// a matrix containing functions to transform everything into everything.
+var transform = {};
+
+// string to ?
+transform["string"] = {
+    "string": identity,
+    "array": function(input) {
+        return stringToArrayLike(input, new Array(input.length));
+    },
+    "arraybuffer": function(input) {
+        return transform["string"]["uint8array"](input).buffer;
+    },
+    "uint8array": function(input) {
+        return stringToArrayLike(input, new Uint8Array(input.length));
+    },
+    "nodebuffer": function(input) {
+        return stringToArrayLike(input, nodeBuffer(input.length));
+    }
+};
+
+// array to ?
+transform["array"] = {
+    "string": arrayLikeToString,
+    "array": identity,
+    "arraybuffer": function(input) {
+        return (new Uint8Array(input)).buffer;
+    },
+    "uint8array": function(input) {
+        return new Uint8Array(input);
+    },
+    "nodebuffer": function(input) {
+        return nodeBuffer(input);
+    }
+};
+
+// arraybuffer to ?
+transform["arraybuffer"] = {
+    "string": function(input) {
+        return arrayLikeToString(new Uint8Array(input));
+    },
+    "array": function(input) {
+        return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength));
+    },
+    "arraybuffer": identity,
+    "uint8array": function(input) {
+        return new Uint8Array(input);
+    },
+    "nodebuffer": function(input) {
+        return nodeBuffer(new Uint8Array(input));
+    }
+};
+
+// uint8array to ?
+transform["uint8array"] = {
+    "string": arrayLikeToString,
+    "array": function(input) {
+        return arrayLikeToArrayLike(input, new Array(input.length));
+    },
+    "arraybuffer": function(input) {
+        return input.buffer;
+    },
+    "uint8array": identity,
+    "nodebuffer": function(input) {
+        return nodeBuffer(input);
+    }
+};
+
+// nodebuffer to ?
+transform["nodebuffer"] = {
+    "string": arrayLikeToString,
+    "array": function(input) {
+        return arrayLikeToArrayLike(input, new Array(input.length));
+    },
+    "arraybuffer": function(input) {
+        return transform["nodebuffer"]["uint8array"](input).buffer;
+    },
+    "uint8array": function(input) {
+        return arrayLikeToArrayLike(input, new Uint8Array(input.length));
+    },
+    "nodebuffer": identity
+};
+
+/**
+ * Transform an input into any type.
+ * The supported output type are : string, array, uint8array, arraybuffer, nodebuffer.
+ * If no output type is specified, the unmodified input will be returned.
+ * @param {String} outputType the output type.
+ * @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert.
+ * @throws {Error} an Error if the browser doesn't support the requested output type.
+ */
+exports.transformTo = function(outputType, input) {
+    if (!input) {
+        // undefined, null, etc
+        // an empty string won't harm.
+        input = "";
+    }
+    if (!outputType) {
+        return input;
+    }
+    exports.checkSupport(outputType);
+    var inputType = exports.getTypeOf(input);
+    var result = transform[inputType][outputType](input);
+    return result;
+};
+
+/**
+ * Return the type of the input.
+ * The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer.
+ * @param {Object} input the input to identify.
+ * @return {String} the (lowercase) type of the input.
+ */
+exports.getTypeOf = function(input) {
+    if (typeof input === "string") {
+        return "string";
+    }
+    if (Object.prototype.toString.call(input) === "[object Array]") {
+        return "array";
+    }
+    if (support.nodebuffer && nodeBuffer.test(input)) {
+        return "nodebuffer";
+    }
+    if (support.uint8array && input instanceof Uint8Array) {
+        return "uint8array";
+    }
+    if (support.arraybuffer && input instanceof ArrayBuffer) {
+        return "arraybuffer";
+    }
+};
+
+/**
+ * Throw an exception if the type is not supported.
+ * @param {String} type the type to check.
+ * @throws {Error} an Error if the browser doesn't support the requested type.
+ */
+exports.checkSupport = function(type) {
+    var supported = support[type.toLowerCase()];
+    if (!supported) {
+        throw new Error(type + " is not supported by this browser");
+    }
+};
+exports.MAX_VALUE_16BITS = 65535;
+exports.MAX_VALUE_32BITS = -1; // well, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" is parsed as -1
+
+/**
+ * Prettify a string read as binary.
+ * @param {string} str the string to prettify.
+ * @return {string} a pretty string.
+ */
+exports.pretty = function(str) {
+    var res = '',
+        code, i;
+    for (i = 0; i < (str || "").length; i++) {
+        code = str.charCodeAt(i);
+        res += '\\x' + (code < 16 ? "0" : "") + code.toString(16).toUpperCase();
+    }
+    return res;
+};
+
+/**
+ * Find a compression registered in JSZip.
+ * @param {string} compressionMethod the method magic to find.
+ * @return {Object|null} the JSZip compression object, null if none found.
+ */
+exports.findCompression = function(compressionMethod) {
+    for (var method in compressions) {
+        if (!compressions.hasOwnProperty(method)) {
+            continue;
+        }
+        if (compressions[method].magic === compressionMethod) {
+            return compressions[method];
+        }
+    }
+    return null;
+};
+/**
+* Cross-window, cross-Node-context regular expression detection
+* @param  {Object}  object Anything
+* @return {Boolean}        true if the object is a regular expression,
+* false otherwise
+*/
+exports.isRegExp = function (object) {
+    return Object.prototype.toString.call(object) === "[object RegExp]";
+};
+
+
+},{"./compressions":3,"./nodeBuffer":11,"./support":17}],22:[function(_dereq_,module,exports){
+'use strict';
+var StringReader = _dereq_('./stringReader');
+var NodeBufferReader = _dereq_('./nodeBufferReader');
+var Uint8ArrayReader = _dereq_('./uint8ArrayReader');
+var utils = _dereq_('./utils');
+var sig = _dereq_('./signature');
+var ZipEntry = _dereq_('./zipEntry');
+var support = _dereq_('./support');
+var jszipProto = _dereq_('./object');
+//  class ZipEntries {{{
+/**
+ * All the entries in the zip file.
+ * @constructor
+ * @param {String|ArrayBuffer|Uint8Array} data the binary stream to load.
+ * @param {Object} loadOptions Options for loading the stream.
+ */
+function ZipEntries(data, loadOptions) {
+    this.files = [];
+    this.loadOptions = loadOptions;
+    if (data) {
+        this.load(data);
+    }
+}
+ZipEntries.prototype = {
+    /**
+     * Check that the reader is on the speficied signature.
+     * @param {string} expectedSignature the expected signature.
+     * @throws {Error} if it is an other signature.
+     */
+    checkSignature: function(expectedSignature) {
+        var signature = this.reader.readString(4);
+        if (signature !== expectedSignature) {
+            throw new Error("Corrupted zip or bug : unexpected signature " + "(" + utils.pretty(signature) + ", expected " + utils.pretty(expectedSignature) + ")");
+        }
+    },
+    /**
+     * Read the end of the central directory.
+     */
+    readBlockEndOfCentral: function() {
+        this.diskNumber = this.reader.readInt(2);
+        this.diskWithCentralDirStart = this.reader.readInt(2);
+        this.centralDirRecordsOnThisDisk = this.reader.readInt(2);
+        this.centralDirRecords = this.reader.readInt(2);
+        this.centralDirSize = this.reader.readInt(4);
+        this.centralDirOffset = this.reader.readInt(4);
+
+        this.zipCommentLength = this.reader.readInt(2);
+        // warning : the encoding depends of the system locale
+        // On a linux machine with LANG=en_US.utf8, this field is utf8 encoded.
+        // On a windows machine, this field is encoded with the localized windows code page.
+        this.zipComment = this.reader.readString(this.zipCommentLength);
+        // To get consistent behavior with the generation part, we will assume that
+        // this is utf8 encoded.
+        this.zipComment = jszipProto.utf8decode(this.zipComment);
+    },
+    /**
+     * Read the end of the Zip 64 central directory.
+     * Not merged with the method readEndOfCentral :
+     * The end of central can coexist with its Zip64 brother,
+     * I don't want to read the wrong number of bytes !
+     */
+    readBlockZip64EndOfCentral: function() {
+        this.zip64EndOfCentralSize = this.reader.readInt(8);
+        this.versionMadeBy = this.reader.readString(2);
+        this.versionNeeded = this.reader.readInt(2);
+        this.diskNumber = this.reader.readInt(4);
+        this.diskWithCentralDirStart = this.reader.readInt(4);
+        this.centralDirRecordsOnThisDisk = this.reader.readInt(8);
+        this.centralDirRecords = this.reader.readInt(8);
+        this.centralDirSize = this.reader.readInt(8);
+        this.centralDirOffset = this.reader.readInt(8);
+
+        this.zip64ExtensibleData = {};
+        var extraDataSize = this.zip64EndOfCentralSize - 44,
+            index = 0,
+            extraFieldId,
+            extraFieldLength,
+            extraFieldValue;
+        while (index < extraDataSize) {
+            extraFieldId = this.reader.readInt(2);
+            extraFieldLength = this.reader.readInt(4);
+            extraFieldValue = this.reader.readString(extraFieldLength);
+            this.zip64ExtensibleData[extraFieldId] = {
+                id: extraFieldId,
+                length: extraFieldLength,
+                value: extraFieldValue
+            };
+        }
+    },
+    /**
+     * Read the end of the Zip 64 central directory locator.
+     */
+    readBlockZip64EndOfCentralLocator: function() {
+        this.diskWithZip64CentralDirStart = this.reader.readInt(4);
+        this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8);
+        this.disksCount = this.reader.readInt(4);
+        if (this.disksCount > 1) {
+            throw new Error("Multi-volumes zip are not supported");
+        }
+    },
+    /**
+     * Read the local files, based on the offset read in the central part.
+     */
+    readLocalFiles: function() {
+        var i, file;
+        for (i = 0; i < this.files.length; i++) {
+            file = this.files[i];
+            this.reader.setIndex(file.localHeaderOffset);
+            this.checkSignature(sig.LOCAL_FILE_HEADER);
+            file.readLocalPart(this.reader);
+            file.handleUTF8();
+        }
+    },
+    /**
+     * Read the central directory.
+     */
+    readCentralDir: function() {
+        var file;
+
+        this.reader.setIndex(this.centralDirOffset);
+        while (this.reader.readString(4) === sig.CENTRAL_FILE_HEADER) {
+            file = new ZipEntry({
+                zip64: this.zip64
+            }, this.loadOptions);
+            file.readCentralPart(this.reader);
+            this.files.push(file);
+        }
+    },
+    /**
+     * Read the end of central directory.
+     */
+    readEndOfCentral: function() {
+        var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END);
+        if (offset === -1) {
+            throw new Error("Corrupted zip : can't find end of central directory");
+        }
+        this.reader.setIndex(offset);
+        this.checkSignature(sig.CENTRAL_DIRECTORY_END);
+        this.readBlockEndOfCentral();
+
+
+        /* extract from the zip spec :
+            4)  If one of the fields in the end of central directory
+                record is too small to hold required data, the field
+                should be set to -1 (0xFFFF or 0xFFFFFFFF) and the
+                ZIP64 format record should be created.
+            5)  The end of central directory record and the
+                Zip64 end of central directory locator record must
+                reside on the same disk when splitting or spanning
+                an archive.
+         */
+        if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) {
+            this.zip64 = true;
+
+            /*
+            Warning : the zip64 extension is supported, but ONLY if the 64bits integer read from
+            the zip file can fit into a 32bits integer. This cannot be solved : Javascript represents
+            all numbers as 64-bit double precision IEEE 754 floating point numbers.
+            So, we have 53bits for integers and bitwise operations treat everything as 32bits.
+            see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators
+            and http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf section 8.5
+            */
+
+            // should look for a zip64 EOCD locator
+            offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);
+            if (offset === -1) {
+                throw new Error("Corrupted zip : can't find the ZIP64 end of central directory locator");
+            }
+            this.reader.setIndex(offset);
+            this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);
+            this.readBlockZip64EndOfCentralLocator();
+
+            // now the zip64 EOCD record
+            this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir);
+            this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);
+            this.readBlockZip64EndOfCentral();
+        }
+    },
+    prepareReader: function(data) {
+        var type = utils.getTypeOf(data);
+        if (type === "string" && !support.uint8array) {
+            this.reader = new StringReader(data, this.loadOptions.optimizedBinaryString);
+        }
+        else if (type === "nodebuffer") {
+            this.reader = new NodeBufferReader(data);
+        }
+        else {
+            this.reader = new Uint8ArrayReader(utils.transformTo("uint8array", data));
+        }
+    },
+    /**
+     * Read a zip file and create ZipEntries.
+     * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file.
+     */
+    load: function(data) {
+        this.prepareReader(data);
+        this.readEndOfCentral();
+        this.readCentralDir();
+        this.readLocalFiles();
+    }
+};
+// }}} end of ZipEntries
+module.exports = ZipEntries;
+
+},{"./nodeBufferReader":12,"./object":13,"./signature":14,"./stringReader":15,"./support":17,"./uint8ArrayReader":18,"./utils":21,"./zipEntry":23}],23:[function(_dereq_,module,exports){
+'use strict';
+var StringReader = _dereq_('./stringReader');
+var utils = _dereq_('./utils');
+var CompressedObject = _dereq_('./compressedObject');
+var jszipProto = _dereq_('./object');
+// class ZipEntry {{{
+/**
+ * An entry in the zip file.
+ * @constructor
+ * @param {Object} options Options of the current file.
+ * @param {Object} loadOptions Options for loading the stream.
+ */
+function ZipEntry(options, loadOptions) {
+    this.options = options;
+    this.loadOptions = loadOptions;
+}
+ZipEntry.prototype = {
+    /**
+     * say if the file is encrypted.
+     * @return {boolean} true if the file is encrypted, false otherwise.
+     */
+    isEncrypted: function() {
+        // bit 1 is set
+        return (this.bitFlag & 0x0001) === 0x0001;
+    },
+    /**
+     * say if the file has utf-8 filename/comment.
+     * @return {boolean} true if the filename/comment is in utf-8, false otherwise.
+     */
+    useUTF8: function() {
+        // bit 11 is set
+        return (this.bitFlag & 0x0800) === 0x0800;
+    },
+    /**
+     * Prepare the function used to generate the compressed content from this ZipFile.
+     * @param {DataReader} reader the reader to use.
+     * @param {number} from the offset from where we should read the data.
+     * @param {number} length the length of the data to read.
+     * @return {Function} the callback to get the compressed content (the type depends of the DataReader class).
+     */
+    prepareCompressedContent: function(reader, from, length) {
+        return function() {
+            var previousIndex = reader.index;
+            reader.setIndex(from);
+            var compressedFileData = reader.readData(length);
+            reader.setIndex(previousIndex);
+
+            return compressedFileData;
+        };
+    },
+    /**
+     * Prepare the function used to generate the uncompressed content from this ZipFile.
+     * @param {DataReader} reader the reader to use.
+     * @param {number} from the offset from where we should read the data.
+     * @param {number} length the length of the data to read.
+     * @param {JSZip.compression} compression the compression used on this file.
+     * @param {number} uncompressedSize the uncompressed size to expect.
+     * @return {Function} the callback to get the uncompressed content (the type depends of the DataReader class).
+     */
+    prepareContent: function(reader, from, length, compression, uncompressedSize) {
+        return function() {
+
+            var compressedFileData = utils.transformTo(compression.uncompressInputType, this.getCompressedContent());
+            var uncompressedFileData = compression.uncompress(compressedFileData);
+
+            if (uncompressedFileData.length !== uncompressedSize) {
+                throw new Error("Bug : uncompressed data size mismatch");
+            }
+
+            return uncompressedFileData;
+        };
+    },
+    /**
+     * Read the local part of a zip file and add the info in this object.
+     * @param {DataReader} reader the reader to use.
+     */
+    readLocalPart: function(reader) {
+        var compression, localExtraFieldsLength;
+
+        // we already know everything from the central dir !
+        // If the central dir data are false, we are doomed.
+        // On the bright side, the local part is scary  : zip64, data descriptors, both, etc.
+        // The less data we get here, the more reliable this should be.
+        // Let's skip the whole header and dash to the data !
+        reader.skip(22);
+        // in some zip created on windows, the filename stored in the central dir contains \ instead of /.
+        // Strangely, the filename here is OK.
+        // I would love to treat these zip files as corrupted (see http://www.info-zip.org/FAQ.html#backslashes
+        // or APPNOTE#4.4.17.1, "All slashes MUST be forward slashes '/'") but there are a lot of bad zip generators...
+        // Search "unzip mismatching "local" filename continuing with "central" filename version" on
+        // the internet.
+        //
+        // I think I see the logic here : the central directory is used to display
+        // content and the local directory is used to extract the files. Mixing / and \
+        // may be used to display \ to windows users and use / when extracting the files.
+        // Unfortunately, this lead also to some issues : http://seclists.org/fulldisclosure/2009/Sep/394
+        this.fileNameLength = reader.readInt(2);
+        localExtraFieldsLength = reader.readInt(2); // can't be sure this will be the same as the central dir
+        this.fileName = reader.readString(this.fileNameLength);
+        reader.skip(localExtraFieldsLength);
+
+        if (this.compressedSize == -1 || this.uncompressedSize == -1) {
+            throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory " + "(compressedSize == -1 || uncompressedSize == -1)");
+        }
+
+        compression = utils.findCompression(this.compressionMethod);
+        if (compression === null) { // no compression found
+            throw new Error("Corrupted zip : compression " + utils.pretty(this.compressionMethod) + " unknown (inner file : " + this.fileName + ")");
+        }
+        this.decompressed = new CompressedObject();
+        this.decompressed.compressedSize = this.compressedSize;
+        this.decompressed.uncompressedSize = this.uncompressedSize;
+        this.decompressed.crc32 = this.crc32;
+        this.decompressed.compressionMethod = this.compressionMethod;
+        this.decompressed.getCompressedContent = this.prepareCompressedContent(reader, reader.index, this.compressedSize, compression);
+        this.decompressed.getContent = this.prepareContent(reader, reader.index, this.compressedSize, compression, this.uncompressedSize);
+
+        // we need to compute the crc32...
+        if (this.loadOptions.checkCRC32) {
+            this.decompressed = utils.transformTo("string", this.decompressed.getContent());
+            if (jszipProto.crc32(this.decompressed) !== this.crc32) {
+                throw new Error("Corrupted zip : CRC32 mismatch");
+            }
+        }
+    },
+
+    /**
+     * Read the central part of a zip file and add the info in this object.
+     * @param {DataReader} reader the reader to use.
+     */
+    readCentralPart: function(reader) {
+        this.versionMadeBy = reader.readString(2);
+        this.versionNeeded = reader.readInt(2);
+        this.bitFlag = reader.readInt(2);
+        this.compressionMethod = reader.readString(2);
+        this.date = reader.readDate();
+        this.crc32 = reader.readInt(4);
+        this.compressedSize = reader.readInt(4);
+        this.uncompressedSize = reader.readInt(4);
+        this.fileNameLength = reader.readInt(2);
+        this.extraFieldsLength = reader.readInt(2);
+        this.fileCommentLength = reader.readInt(2);
+        this.diskNumberStart = reader.readInt(2);
+        this.internalFileAttributes = reader.readInt(2);
+        this.externalFileAttributes = reader.readInt(4);
+        this.localHeaderOffset = reader.readInt(4);
+
+        if (this.isEncrypted()) {
+            throw new Error("Encrypted zip are not supported");
+        }
+
+        this.fileName = reader.readString(this.fileNameLength);
+        this.readExtraFields(reader);
+        this.parseZIP64ExtraField(reader);
+        this.fileComment = reader.readString(this.fileCommentLength);
+
+        // warning, this is true only for zip with madeBy == DOS (plateform dependent feature)
+        this.dir = this.externalFileAttributes & 0x00000010 ? true : false;
+    },
+    /**
+     * Parse the ZIP64 extra field and merge the info in the current ZipEntry.
+     * @param {DataReader} reader the reader to use.
+     */
+    parseZIP64ExtraField: function(reader) {
+
+        if (!this.extraFields[0x0001]) {
+            return;
+        }
+
+        // should be something, preparing the extra reader
+        var extraReader = new StringReader(this.extraFields[0x0001].value);
+
+        // I really hope that these 64bits integer can fit in 32 bits integer, because js
+        // won't let us have more.
+        if (this.uncompressedSize === utils.MAX_VALUE_32BITS) {
+            this.uncompressedSize = extraReader.readInt(8);
+        }
+        if (this.compressedSize === utils.MAX_VALUE_32BITS) {
+            this.compressedSize = extraReader.readInt(8);
+        }
+        if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) {
+            this.localHeaderOffset = extraReader.readInt(8);
+        }
+        if (this.diskNumberStart === utils.MAX_VALUE_32BITS) {
+            this.diskNumberStart = extraReader.readInt(4);
+        }
+    },
+    /**
+     * Read the central part of a zip file and add the info in this object.
+     * @param {DataReader} reader the reader to use.
+     */
+    readExtraFields: function(reader) {
+        var start = reader.index,
+            extraFieldId,
+            extraFieldLength,
+            extraFieldValue;
+
+        this.extraFields = this.extraFields || {};
+
+        while (reader.index < start + this.extraFieldsLength) {
+            extraFieldId = reader.readInt(2);
+            extraFieldLength = reader.readInt(2);
+            extraFieldValue = reader.readString(extraFieldLength);
+
+            this.extraFields[extraFieldId] = {
+                id: extraFieldId,
+                length: extraFieldLength,
+                value: extraFieldValue
+            };
+        }
+    },
+    /**
+     * Apply an UTF8 transformation if needed.
+     */
+    handleUTF8: function() {
+        if (this.useUTF8()) {
+            this.fileName = jszipProto.utf8decode(this.fileName);
+            this.fileComment = jszipProto.utf8decode(this.fileComment);
+        } else {
+            var upath = this.findExtraFieldUnicodePath();
+            if (upath !== null) {
+                this.fileName = upath;
+            }
+            var ucomment = this.findExtraFieldUnicodeComment();
+            if (ucomment !== null) {
+                this.fileComment = ucomment;
+            }
+        }
+    },
+
+    /**
+     * Find the unicode path declared in the extra field, if any.
+     * @return {String} the unicode path, null otherwise.
+     */
+    findExtraFieldUnicodePath: function() {
+        var upathField = this.extraFields[0x7075];
+        if (upathField) {
+            var extraReader = new StringReader(upathField.value);
+
+            // wrong version
+            if (extraReader.readInt(1) !== 1) {
+                return null;
+            }
+
+            // the crc of the filename changed, this field is out of date.
+            if (jszipProto.crc32(this.fileName) !== extraReader.readInt(4)) {
+                return null;
+            }
+
+            return jszipProto.utf8decode(extraReader.readString(upathField.length - 5));
+        }
+        return null;
+    },
+
+    /**
+     * Find the unicode comment declared in the extra field, if any.
+     * @return {String} the unicode comment, null otherwise.
+     */
+    findExtraFieldUnicodeComment: function() {
+        var ucommentField = this.extraFields[0x6375];
+        if (ucommentField) {
+            var extraReader = new StringReader(ucommentField.value);
+
+            // wrong version
+            if (extraReader.readInt(1) !== 1) {
+                return null;
+            }
+
+            // the crc of the comment changed, this field is out of date.
+            if (jszipProto.crc32(this.fileComment) !== extraReader.readInt(4)) {
+                return null;
+            }
+
+            return jszipProto.utf8decode(extraReader.readString(ucommentField.length - 5));
+        }
+        return null;
+    }
+};
+module.exports = ZipEntry;
+
+},{"./compressedObject":2,"./object":13,"./stringReader":15,"./utils":21}],24:[function(_dereq_,module,exports){
+// Top level file is just a mixin of submodules & constants
+'use strict';
+
+var assign    = _dereq_('./lib/utils/common').assign;
+
+var deflate   = _dereq_('./lib/deflate');
+var inflate   = _dereq_('./lib/inflate');
+var constants = _dereq_('./lib/zlib/constants');
+
+var pako = {};
+
+assign(pako, deflate, inflate, constants);
+
+module.exports = pako;
+},{"./lib/deflate":25,"./lib/inflate":26,"./lib/utils/common":27,"./lib/zlib/constants":30}],25:[function(_dereq_,module,exports){
+'use strict';
+
+
+var zlib_deflate = _dereq_('./zlib/deflate.js');
+var utils = _dereq_('./utils/common');
+var strings = _dereq_('./utils/strings');
+var msg = _dereq_('./zlib/messages');
+var zstream = _dereq_('./zlib/zstream');
+
+
+/* Public constants ==========================================================*/
+/* ===========================================================================*/
+
+var Z_NO_FLUSH      = 0;
+var Z_FINISH        = 4;
+
+var Z_OK            = 0;
+var Z_STREAM_END    = 1;
+
+var Z_DEFAULT_COMPRESSION = -1;
+
+var Z_DEFAULT_STRATEGY    = 0;
+
+var Z_DEFLATED  = 8;
+
+/* ===========================================================================*/
+
+
+/**
+ * class Deflate
+ *
+ * Generic JS-style wrapper for zlib calls. If you don't need
+ * streaming behaviour - use more simple functions: [[deflate]],
+ * [[deflateRaw]] and [[gzip]].
+ **/
+
+/* internal
+ * Deflate.chunks -> Array
+ *
+ * Chunks of output data, if [[Deflate#onData]] not overriden.
+ **/
+
+/**
+ * Deflate.result -> Uint8Array|Array
+ *
+ * Compressed result, generated by default [[Deflate#onData]]
+ * and [[Deflate#onEnd]] handlers. Filled after you push last chunk
+ * (call [[Deflate#push]] with `Z_FINISH` / `true` param).
+ **/
+
+/**
+ * Deflate.err -> Number
+ *
+ * Error code after deflate finished. 0 (Z_OK) on success.
+ * You will not need it in real life, because deflate errors
+ * are possible only on wrong options or bad `onData` / `onEnd`
+ * custom handlers.
+ **/
+
+/**
+ * Deflate.msg -> String
+ *
+ * Error message, if [[Deflate.err]] != 0
+ **/
+
+
+/**
+ * new Deflate(options)
+ * - options (Object): zlib deflate options.
+ *
+ * Creates new deflator instance with specified params. Throws exception
+ * on bad params. Supported options:
+ *
+ * - `level`
+ * - `windowBits`
+ * - `memLevel`
+ * - `strategy`
+ *
+ * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
+ * for more information on these.
+ *
+ * Additional options, for internal needs:
+ *
+ * - `chunkSize` - size of generated data chunks (16K by default)
+ * - `raw` (Boolean) - do raw deflate
+ * - `gzip` (Boolean) - create gzip wrapper
+ * - `to` (String) - if equal to 'string', then result will be "binary string"
+ *    (each char code [0..255])
+ * - `header` (Object) - custom header for gzip
+ *   - `text` (Boolean) - true if compressed data believed to be text
+ *   - `time` (Number) - modification time, unix timestamp
+ *   - `os` (Number) - operation system code
+ *   - `extra` (Array) - array of bytes with extra data (max 65536)
+ *   - `name` (String) - file name (binary string)
+ *   - `comment` (String) - comment (binary string)
+ *   - `hcrc` (Boolean) - true if header crc should be added
+ *
+ * ##### Example:
+ *
+ * ```javascript
+ * var pako = require('pako')
+ *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])
+ *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);
+ *
+ * var deflate = new pako.Deflate({ level: 3});
+ *
+ * deflate.push(chunk1, false);
+ * deflate.push(chunk2, true);  // true -> last chunk
+ *
+ * if (deflate.err) { throw new Error(deflate.err); }
+ *
+ * console.log(deflate.result);
+ * ```
+ **/
+var Deflate = function(options) {
+
+  this.options = utils.assign({
+    level: Z_DEFAULT_COMPRESSION,
+    method: Z_DEFLATED,
+    chunkSize: 16384,
+    windowBits: 15,
+    memLevel: 8,
+    strategy: Z_DEFAULT_STRATEGY,
+    to: ''
+  }, options || {});
+
+  var opt = this.options;
+
+  if (opt.raw && (opt.windowBits > 0)) {
+    opt.windowBits = -opt.windowBits;
+  }
+
+  else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {
+    opt.windowBits += 16;
+  }
+
+  this.err    = 0;      // error code, if happens (0 = Z_OK)
+  this.msg    = '';     // error message
+  this.ended  = false;  // used to avoid multiple onEnd() calls
+  this.chunks = [];     // chunks of compressed data
+
+  this.strm = new zstream();
+  this.strm.avail_out = 0;
+
+  var status = zlib_deflate.deflateInit2(
+    this.strm,
+    opt.level,
+    opt.method,
+    opt.windowBits,
+    opt.memLevel,
+    opt.strategy
+  );
+
+  if (status !== Z_OK) {
+    throw new Error(msg[status]);
+  }
+
+  if (opt.header) {
+    zlib_deflate.deflateSetHeader(this.strm, opt.header);
+  }
+};
+
+/**
+ * Deflate#push(data[, mode]) -> Boolean
+ * - data (Uint8Array|Array|String): input data. Strings will be converted to
+ *   utf8 byte sequence.
+ * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.
+ *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH.
+ *
+ * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with
+ * new compressed chunks. Returns `true` on success. The last data block must have
+ * mode Z_FINISH (or `true`). That flush internal pending buffers and call
+ * [[Deflate#onEnd]].
+ *
+ * On fail call [[Deflate#onEnd]] with error code and return false.
+ *
+ * We strongly recommend to use `Uint8Array` on input for best speed (output
+ * array format is detected automatically). Also, don't skip last param and always
+ * use the same type in your code (boolean or number). That will improve JS speed.
+ *
+ * For regular `Array`-s make sure all elements are [0..255].
+ *
+ * ##### Example
+ *
+ * ```javascript
+ * push(chunk, false); // push one of data chunks
+ * ...
+ * push(chunk, true);  // push last chunk
+ * ```
+ **/
+Deflate.prototype.push = function(data, mode) {
+  var strm = this.strm;
+  var chunkSize = this.options.chunkSize;
+  var status, _mode;
+
+  if (this.ended) { return false; }
+
+  _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);
+
+  // Convert data if needed
+  if (typeof data === 'string') {
+    // If we need to compress text, change encoding to utf8.
+    strm.input = strings.string2buf(data);
+  } else {
+    strm.input = data;
+  }
+
+  strm.next_in = 0;
+  strm.avail_in = strm.input.length;
+
+  do {
+    if (strm.avail_out === 0) {
+      strm.output = new utils.Buf8(chunkSize);
+      strm.next_out = 0;
+      strm.avail_out = chunkSize;
+    }
+    status = zlib_deflate.deflate(strm, _mode);    /* no bad return value */
+
+    if (status !== Z_STREAM_END && status !== Z_OK) {
+      this.onEnd(status);
+      this.ended = true;
+      return false;
+    }
+    if (strm.avail_out === 0 || (strm.avail_in === 0 && _mode === Z_FINISH)) {
+      if (this.options.to === 'string') {
+        this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));
+      } else {
+        this.onData(utils.shrinkBuf(strm.output, strm.next_out));
+      }
+    }
+  } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);
+
+  // Finalize on the last chunk.
+  if (_mode === Z_FINISH) {
+    status = zlib_deflate.deflateEnd(this.strm);
+    this.onEnd(status);
+    this.ended = true;
+    return status === Z_OK;
+  }
+
+  return true;
+};
+
+
+/**
+ * Deflate#onData(chunk) -> Void
+ * - chunk (Uint8Array|Array|String): ouput data. Type of array depends
+ *   on js engine support. When string output requested, each chunk
+ *   will be string.
+ *
+ * By default, stores data blocks in `chunks[]` property and glue
+ * those in `onEnd`. Override this handler, if you need another behaviour.
+ **/
+Deflate.prototype.onData = function(chunk) {
+  this.chunks.push(chunk);
+};
+
+
+/**
+ * Deflate#onEnd(status) -> Void
+ * - status (Number): deflate status. 0 (Z_OK) on success,
+ *   other if not.
+ *
+ * Called once after you tell deflate that input stream complete
+ * or error happenned. By default - join collected chunks,
+ * free memory and fill `results` / `err` properties.
+ **/
+Deflate.prototype.onEnd = function(status) {
+  // On success - join
+  if (status === Z_OK) {
+    if (this.options.to === 'string') {
+      this.result = this.chunks.join('');
+    } else {
+      this.result = utils.flattenChunks(this.chunks);
+    }
+  }
+  this.chunks = [];
+  this.err = status;
+  this.msg = this.strm.msg;
+};
+
+
+/**
+ * deflate(data[, options]) -> Uint8Array|Array|String
+ * - data (Uint8Array|Array|String): input data to compress.
+ * - options (Object): zlib deflate options.
+ *
+ * Compress `data` with deflate alrorythm and `options`.
+ *
+ * Supported options are:
+ *
+ * - level
+ * - windowBits
+ * - memLevel
+ * - strategy
+ *
+ * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
+ * for more information on these.
+ *
+ * Sugar (options):
+ *
+ * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify
+ *   negative windowBits implicitly.
+ * - `to` (String) - if equal to 'string', then result will be "binary string"
+ *    (each char code [0..255])
+ *
+ * ##### Example:
+ *
+ * ```javascript
+ * var pako = require('pako')
+ *   , data = Uint8Array([1,2,3,4,5,6,7,8,9]);
+ *
+ * console.log(pako.deflate(data));
+ * ```
+ **/
+function deflate(input, options) {
+  var deflator = new Deflate(options);
+
+  deflator.push(input, true);
+
+  // That will never happens, if you don't cheat with options :)
+  if (deflator.err) { throw deflator.msg; }
+
+  return deflator.result;
+}
+
+
+/**
+ * deflateRaw(data[, options]) -> Uint8Array|Array|String
+ * - data (Uint8Array|Array|String): input data to compress.
+ * - options (Object): zlib deflate options.
+ *
+ * The same as [[deflate]], but creates raw data, without wrapper
+ * (header and adler32 crc).
+ **/
+function deflateRaw(input, options) {
+  options = options || {};
+  options.raw = true;
+  return deflate(input, options);
+}
+
+
+/**
+ * gzip(data[, options]) -> Uint8Array|Array|String
+ * - data (Uint8Array|Array|String): input data to compress.
+ * - options (Object): zlib deflate options.
+ *
+ * The same as [[deflate]], but create gzip wrapper instead of
+ * deflate one.
+ **/
+function gzip(input, options) {
+  options = options || {};
+  options.gzip = true;
+  return deflate(input, options);
+}
+
+
+exports.Deflate = Deflate;
+exports.deflate = deflate;
+exports.deflateRaw = deflateRaw;
+exports.gzip = gzip;
+},{"./utils/common":27,"./utils/strings":28,"./zlib/deflate.js":32,"./zlib/messages":37,"./zlib/zstream":39}],26:[function(_dereq_,module,exports){
+'use strict';
+
+
+var zlib_inflate = _dereq_('./zlib/inflate.js');
+var utils = _dereq_('./utils/common');
+var strings = _dereq_('./utils/strings');
+var c = _dereq_('./zlib/constants');
+var msg = _dereq_('./zlib/messages');
+var zstream = _dereq_('./zlib/zstream');
+var gzheader = _dereq_('./zlib/gzheader');
+
+
+/**
+ * class Inflate
+ *
+ * Generic JS-style wrapper for zlib calls. If you don't need
+ * streaming behaviour - use more simple functions: [[inflate]]
+ * and [[inflateRaw]].
+ **/
+
+/* internal
+ * inflate.chunks -> Array
+ *
+ * Chunks of output data, if [[Inflate#onData]] not overriden.
+ **/
+
+/**
+ * Inflate.result -> Uint8Array|Array|String
+ *
+ * Uncompressed result, generated by default [[Inflate#onData]]
+ * and [[Inflate#onEnd]] handlers. Filled after you push last chunk
+ * (call [[Inflate#push]] with `Z_FINISH` / `true` param).
+ **/
+
+/**
+ * Inflate.err -> Number
+ *
+ * Error code after inflate finished. 0 (Z_OK) on success.
+ * Should be checked if broken data possible.
+ **/
+
+/**
+ * Inflate.msg -> String
+ *
+ * Error message, if [[Inflate.err]] != 0
+ **/
+
+
+/**
+ * new Inflate(options)
+ * - options (Object): zlib inflate options.
+ *
+ * Creates new inflator instance with specified params. Throws exception
+ * on bad params. Supported options:
+ *
+ * - `windowBits`
+ *
+ * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
+ * for more information on these.
+ *
+ * Additional options, for internal needs:
+ *
+ * - `chunkSize` - size of generated data chunks (16K by default)
+ * - `raw` (Boolean) - do raw inflate
+ * - `to` (String) - if equal to 'string', then result will be converted
+ *   from utf8 to utf16 (javascript) string. When string output requested,
+ *   chunk length can differ from `chunkSize`, depending on content.
+ *
+ * By default, when no options set, autodetect deflate/gzip data format via
+ * wrapper header.
+ *
+ * ##### Example:
+ *
+ * ```javascript
+ * var pako = require('pako')
+ *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])
+ *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);
+ *
+ * var inflate = new pako.Inflate({ level: 3});
+ *
+ * inflate.push(chunk1, false);
+ * inflate.push(chunk2, true);  // true -> last chunk
+ *
+ * if (inflate.err) { throw new Error(inflate.err); }
+ *
+ * console.log(inflate.result);
+ * ```
+ **/
+var Inflate = function(options) {
+
+  this.options = utils.assign({
+    chunkSize: 16384,
+    windowBits: 0,
+    to: ''
+  }, options || {});
+
+  var opt = this.options;
+
+  // Force window size for `raw` data, if not set directly,
+  // because we have no header for autodetect.
+  if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {
+    opt.windowBits = -opt.windowBits;
+    if (opt.windowBits === 0) { opt.windowBits = -15; }
+  }
+
+  // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate
+  if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&
+      !(options && options.windowBits)) {
+    opt.windowBits += 32;
+  }
+
+  // Gzip header has no info about windows size, we can do autodetect only
+  // for deflate. So, if window size not set, force it to max when gzip possible
+  if ((opt.windowBits > 15) && (opt.windowBits < 48)) {
+    // bit 3 (16) -> gzipped data
+    // bit 4 (32) -> autodetect gzip/deflate
+    if ((opt.windowBits & 15) === 0) {
+      opt.windowBits |= 15;
+    }
+  }
+
+  this.err    = 0;      // error code, if happens (0 = Z_OK)
+  this.msg    = '';     // error message
+  this.ended  = false;  // used to avoid multiple onEnd() calls
+  this.chunks = [];     // chunks of compressed data
+
+  this.strm   = new zstream();
+  this.strm.avail_out = 0;
+
+  var status  = zlib_inflate.inflateInit2(
+    this.strm,
+    opt.windowBits
+  );
+
+  if (status !== c.Z_OK) {
+    throw new Error(msg[status]);
+  }
+
+  this.header = new gzheader();
+
+  zlib_inflate.inflateGetHeader(this.strm, this.header);
+};
+
+/**
+ * Inflate#push(data[, mode]) -> Boolean
+ * - data (Uint8Array|Array|String): input data
+ * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.
+ *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH.
+ *
+ * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with
+ * new output chunks. Returns `true` on success. The last data block must have
+ * mode Z_FINISH (or `true`). That flush internal pending buffers and call
+ * [[Inflate#onEnd]].
+ *
+ * On fail call [[Inflate#onEnd]] with error code and return false.
+ *
+ * We strongly recommend to use `Uint8Array` on input for best speed (output
+ * format is detected automatically). Also, don't skip last param and always
+ * use the same type in your code (boolean or number). That will improve JS speed.
+ *
+ * For regular `Array`-s make sure all elements are [0..255].
+ *
+ * ##### Example
+ *
+ * ```javascript
+ * push(chunk, false); // push one of data chunks
+ * ...
+ * push(chunk, true);  // push last chunk
+ * ```
+ **/
+Inflate.prototype.push = function(data, mode) {
+  var strm = this.strm;
+  var chunkSize = this.options.chunkSize;
+  var status, _mode;
+  var next_out_utf8, tail, utf8str;
+
+  if (this.ended) { return false; }
+  _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);
+
+  // Convert data if needed
+  if (typeof data === 'string') {
+    // Only binary strings can be decompressed on practice
+    strm.input = strings.binstring2buf(data);
+  } else {
+    strm.input = data;
+  }
+
+  strm.next_in = 0;
+  strm.avail_in = strm.input.length;
+
+  do {
+    if (strm.avail_out === 0) {
+      strm.output = new utils.Buf8(chunkSize);
+      strm.next_out = 0;
+      strm.avail_out = chunkSize;
+    }
+
+    status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH);    /* no bad return value */
+
+    if (status !== c.Z_STREAM_END && status !== c.Z_OK) {
+      this.onEnd(status);
+      this.ended = true;
+      return false;
+    }
+
+    if (strm.next_out) {
+      if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && _mode === c.Z_FINISH)) {
+
+        if (this.options.to === 'string') {
+
+          next_out_utf8 = strings.utf8border(strm.output, strm.next_out);
+
+          tail = strm.next_out - next_out_utf8;
+          utf8str = strings.buf2string(strm.output, next_out_utf8);
+
+          // move tail
+          strm.next_out = tail;
+          strm.avail_out = chunkSize - tail;
+          if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }
+
+          this.onData(utf8str);
+
+        } else {
+          this.onData(utils.shrinkBuf(strm.output, strm.next_out));
+        }
+      }
+    }
+  } while ((strm.avail_in > 0) && status !== c.Z_STREAM_END);
+
+  if (status === c.Z_STREAM_END) {
+    _mode = c.Z_FINISH;
+  }
+  // Finalize on the last chunk.
+  if (_mode === c.Z_FINISH) {
+    status = zlib_inflate.inflateEnd(this.strm);
+    this.onEnd(status);
+    this.ended = true;
+    return status === c.Z_OK;
+  }
+
+  return true;
+};
+
+
+/**
+ * Inflate#onData(chunk) -> Void
+ * - chunk (Uint8Array|Array|String): ouput data. Type of array depends
+ *   on js engine support. When string output requested, each chunk
+ *   will be string.
+ *
+ * By default, stores data blocks in `chunks[]` property and glue
+ * those in `onEnd`. Override this handler, if you need another behaviour.
+ **/
+Inflate.prototype.onData = function(chunk) {
+  this.chunks.push(chunk);
+};
+
+
+/**
+ * Inflate#onEnd(status) -> Void
+ * - status (Number): inflate status. 0 (Z_OK) on success,
+ *   other if not.
+ *
+ * Called once after you tell inflate that input stream complete
+ * or error happenned. By default - join collected chunks,
+ * free memory and fill `results` / `err` properties.
+ **/
+Inflate.prototype.onEnd = function(status) {
+  // On success - join
+  if (status === c.Z_OK) {
+    if (this.options.to === 'string') {
+      // Glue & convert here, until we teach pako to send
+      // utf8 alligned strings to onData
+      this.result = this.chunks.join('');
+    } else {
+      this.result = utils.flattenChunks(this.chunks);
+    }
+  }
+  this.chunks = [];
+  this.err = status;
+  this.msg = this.strm.msg;
+};
+
+
+/**
+ * inflate(data[, options]) -> Uint8Array|Array|String
+ * - data (Uint8Array|Array|String): input data to decompress.
+ * - options (Object): zlib inflate options.
+ *
+ * Decompress `data` with inflate/ungzip and `options`. Autodetect
+ * format via wrapper header by default. That's why we don't provide
+ * separate `ungzip` method.
+ *
+ * Supported options are:
+ *
+ * - windowBits
+ *
+ * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
+ * for more information.
+ *
+ * Sugar (options):
+ *
+ * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify
+ *   negative windowBits implicitly.
+ * - `to` (String) - if equal to 'string', then result will be converted
+ *   from utf8 to utf16 (javascript) string. When string output requested,
+ *   chunk length can differ from `chunkSize`, depending on content.
+ *
+ *
+ * ##### Example:
+ *
+ * ```javascript
+ * var pako = require('pako')
+ *   , input = pako.deflate([1,2,3,4,5,6,7,8,9])
+ *   , output;
+ *
+ * try {
+ *   output = pako.inflate(input);
+ * } catch (err)
+ *   console.log(err);
+ * }
+ * ```
+ **/
+function inflate(input, options) {
+  var inflator = new Inflate(options);
+
+  inflator.push(input, true);
+
+  // That will never happens, if you don't cheat with options :)
+  if (inflator.err) { throw inflator.msg; }
+
+  return inflator.result;
+}
+
+
+/**
+ * inflateRaw(data[, options]) -> Uint8Array|Array|String
+ * - data (Uint8Array|Array|String): input data to decompress.
+ * - options (Object): zlib inflate options.
+ *
+ * The same as [[inflate]], but creates raw data, without wrapper
+ * (header and adler32 crc).
+ **/
+function inflateRaw(input, options) {
+  options = options || {};
+  options.raw = true;
+  return inflate(input, options);
+}
+
+
+/**
+ * ungzip(data[, options]) -> Uint8Array|Array|String
+ * - data (Uint8Array|Array|String): input data to decompress.
+ * - options (Object): zlib inflate options.
+ *
+ * Just shortcut to [[inflate]], because it autodetects format
+ * by header.content. Done for convenience.
+ **/
+
+
+exports.Inflate = Inflate;
+exports.inflate = inflate;
+exports.inflateRaw = inflateRaw;
+exports.ungzip  = inflate;
+
+},{"./utils/common":27,"./utils/strings":28,"./zlib/constants":30,"./zlib/gzheader":33,"./zlib/inflate.js":35,"./zlib/messages":37,"./zlib/zstream":39}],27:[function(_dereq_,module,exports){
+'use strict';
+
+
+var TYPED_OK =  (typeof Uint8Array !== 'undefined') &&
+                (typeof Uint16Array !== 'undefined') &&
+                (typeof Int32Array !== 'undefined');
+
+
+exports.assign = function (obj /*from1, from2, from3, ...*/) {
+  var sources = Array.prototype.slice.call(arguments, 1);
+  while (sources.length) {
+    var source = sources.shift();
+    if (!source) { continue; }
+
+    if (typeof(source) !== 'object') {
+      throw new TypeError(source + 'must be non-object');
+    }
+
+    for (var p in source) {
+      if (source.hasOwnProperty(p)) {
+        obj[p] = source[p];
+      }
+    }
+  }
+
+  return obj;
+};
+
+
+// reduce buffer size, avoiding mem copy
+exports.shrinkBuf = function (buf, size) {
+  if (buf.length === size) { return buf; }
+  if (buf.subarray) { return buf.subarray(0, size); }
+  buf.length = size;
+  return buf;
+};
+
+
+var fnTyped = {
+  arraySet: function (dest, src, src_offs, len, dest_offs) {
+    if (src.subarray && dest.subarray) {
+      dest.set(src.subarray(src_offs, src_offs+len), dest_offs);
+      return;
+    }
+    // Fallback to ordinary array
+    for(var i=0; i<len; i++) {
+      dest[dest_offs + i] = src[src_offs + i];
+    }
+  },
+  // Join array of chunks to single array.
+  flattenChunks: function(chunks) {
+    var i, l, len, pos, chunk, result;
+
+    // calculate data length
+    len = 0;
+    for (i=0, l=chunks.length; i<l; i++) {
+      len += chunks[i].length;
+    }
+
+    // join chunks
+    result = new Uint8Array(len);
+    pos = 0;
+    for (i=0, l=chunks.length; i<l; i++) {
+      chunk = chunks[i];
+      result.set(chunk, pos);
+      pos += chunk.length;
+    }
+
+    return result;
+  }
+};
+
+var fnUntyped = {
+  arraySet: function (dest, src, src_offs, len, dest_offs) {
+    for(var i=0; i<len; i++) {
+      dest[dest_offs + i] = src[src_offs + i];
+    }
+  },
+  // Join array of chunks to single array.
+  flattenChunks: function(chunks) {
+    return [].concat.apply([], chunks);
+  }
+};
+
+
+// Enable/Disable typed arrays use, for testing
+//
+exports.setTyped = function (on) {
+  if (on) {
+    exports.Buf8  = Uint8Array;
+    exports.Buf16 = Uint16Array;
+    exports.Buf32 = Int32Array;
+    exports.assign(exports, fnTyped);
+  } else {
+    exports.Buf8  = Array;
+    exports.Buf16 = Array;
+    exports.Buf32 = Array;
+    exports.assign(exports, fnUntyped);
+  }
+};
+
+exports.setTyped(TYPED_OK);
+},{}],28:[function(_dereq_,module,exports){
+// String encode/decode helpers
+'use strict';
+
+
+var utils = _dereq_('./common');
+
+
+// Quick check if we can use fast array to bin string conversion
+//
+// - apply(Array) can fail on Android 2.2
+// - apply(Uint8Array) can fail on iOS 5.1 Safary
+//
+var STR_APPLY_OK = true;
+var STR_APPLY_UIA_OK = true;
+
+try { String.fromCharCode.apply(null, [0]); } catch(__) { STR_APPLY_OK = false; }
+try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch(__) { STR_APPLY_UIA_OK = false; }
+
+
+// Table with utf8 lengths (calculated by first byte of sequence)
+// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,
+// because max possible codepoint is 0x10ffff
+var _utf8len = new utils.Buf8(256);
+for (var i=0; i<256; i++) {
+  _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);
+}
+_utf8len[254]=_utf8len[254]=1; // Invalid sequence start
+
+
+// convert string to array (typed, when possible)
+exports.string2buf = function (str) {
+  var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;
+
+  // count binary size
+  for (m_pos = 0; m_pos < str_len; m_pos++) {
+    c = str.charCodeAt(m_pos);
+    if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {
+      c2 = str.charCodeAt(m_pos+1);
+      if ((c2 & 0xfc00) === 0xdc00) {
+        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
+        m_pos++;
+      }
+    }
+    buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;
+  }
+
+  // allocate buffer
+  buf = new utils.Buf8(buf_len);
+
+  // convert
+  for (i=0, m_pos = 0; i < buf_len; m_pos++) {
+    c = str.charCodeAt(m_pos);
+    if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {
+      c2 = str.charCodeAt(m_pos+1);
+      if ((c2 & 0xfc00) === 0xdc00) {
+        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
+        m_pos++;
+      }
+    }
+    if (c < 0x80) {
+      /* one byte */
+      buf[i++] = c;
+    } else if (c < 0x800) {
+      /* two bytes */
+      buf[i++] = 0xC0 | (c >>> 6);
+      buf[i++] = 0x80 | (c & 0x3f);
+    } else if (c < 0x10000) {
+      /* three bytes */
+      buf[i++] = 0xE0 | (c >>> 12);
+      buf[i++] = 0x80 | (c >>> 6 & 0x3f);
+      buf[i++] = 0x80 | (c & 0x3f);
+    } else {
+      /* four bytes */
+      buf[i++] = 0xf0 | (c >>> 18);
+      buf[i++] = 0x80 | (c >>> 12 & 0x3f);
+      buf[i++] = 0x80 | (c >>> 6 & 0x3f);
+      buf[i++] = 0x80 | (c & 0x3f);
+    }
+  }
+
+  return buf;
+};
+
+// Helper (used in 2 places)
+function buf2binstring(buf, len) {
+  // use fallback for big arrays to avoid stack overflow
+  if (len < 65537) {
+    if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {
+      return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));
+    }
+  }
+
+  var result = '';
+  for(var i=0; i < len; i++) {
+    result += String.fromCharCode(buf[i]);
+  }
+  return result;
+}
+
+
+// Convert byte array to binary string
+exports.buf2binstring = function(buf) {
+  return buf2binstring(buf, buf.length);
+};
+
+
+// Convert binary string (typed, when possible)
+exports.binstring2buf = function(str) {
+  var buf = new utils.Buf8(str.length);
+  for(var i=0, len=buf.length; i < len; i++) {
+    buf[i] = str.charCodeAt(i);
+  }
+  return buf;
+};
+
+
+// convert array to string
+exports.buf2string = function (buf, max) {
+  var i, out, c, c_len;
+  var len = max || buf.length;
+
+  // Reserve max possible length (2 words per char)
+  // NB: by unknown reasons, Array is significantly faster for
+  //     String.fromCharCode.apply than Uint16Array.
+  var utf16buf = new Array(len*2);
+
+  for (out=0, i=0; i<len;) {
+    c = buf[i++];
+    // quick process ascii
+    if (c < 0x80) { utf16buf[out++] = c; continue; }
+
+    c_len = _utf8len[c];
+    // skip 5 & 6 byte codes
+    if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; }
+
+    // apply mask on first byte
+    c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;
+    // join the rest
+    while (c_len > 1 && i < len) {
+      c = (c << 6) | (buf[i++] & 0x3f);
+      c_len--;
+    }
+
+    // terminated by end of string?
+    if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }
+
+    if (c < 0x10000) {
+      utf16buf[out++] = c;
+    } else {
+      c -= 0x10000;
+      utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);
+      utf16buf[out++] = 0xdc00 | (c & 0x3ff);
+    }
+  }
+
+  return buf2binstring(utf16buf, out);
+};
+
+
+// Calculate max possible position in utf8 buffer,
+// that will not break sequence. If that's not possible
+// - (very small limits) return max size as is.
+//
+// buf[] - utf8 bytes array
+// max   - length limit (mandatory);
+exports.utf8border = function(buf, max) {
+  var pos;
+
+  max = max || buf.length;
+  if (max > buf.length) { max = buf.length; }
+
+  // go back from last position, until start of sequence found
+  pos = max-1;
+  while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }
+
+  // Fuckup - very small and broken sequence,
+  // return max, because we should return something anyway.
+  if (pos < 0) { return max; }
+
+  // If we came to start of buffer - that means vuffer is too small,
+  // return max too.
+  if (pos === 0) { return max; }
+
+  return (pos + _utf8len[buf[pos]] > max) ? pos : max;
+};
+
+},{"./common":27}],29:[function(_dereq_,module,exports){
+'use strict';
+
+// Note: adler32 takes 12% for level 0 and 2% for level 6.
+// It doesn't worth to make additional optimizationa as in original.
+// Small size is preferable.
+
+function adler32(adler, buf, len, pos) {
+  var s1 = (adler & 0xffff) |0
+    , s2 = ((adler >>> 16) & 0xffff) |0
+    , n = 0;
+
+  while (len !== 0) {
+    // Set limit ~ twice less than 5552, to keep
+    // s2 in 31-bits, because we force signed ints.
+    // in other case %= will fail.
+    n = len > 2000 ? 2000 : len;
+    len -= n;
+
+    do {
+      s1 = (s1 + buf[pos++]) |0;
+      s2 = (s2 + s1) |0;
+    } while (--n);
+
+    s1 %= 65521;
+    s2 %= 65521;
+  }
+
+  return (s1 | (s2 << 16)) |0;
+}
+
+
+module.exports = adler32;
+},{}],30:[function(_dereq_,module,exports){
+module.exports = {
+
+  /* Allowed flush values; see deflate() and inflate() below for details */
+  Z_NO_FLUSH:         0,
+  Z_PARTIAL_FLUSH:    1,
+  Z_SYNC_FLUSH:       2,
+  Z_FULL_FLUSH:       3,
+  Z_FINISH:           4,
+  Z_BLOCK:            5,
+  Z_TREES:            6,
+
+  /* Return codes for the compression/decompression functions. Negative values
+  * are errors, positive values are used for special but normal events.
+  */
+  Z_OK:               0,
+  Z_STREAM_END:       1,
+  Z_NEED_DICT:        2,
+  Z_ERRNO:           -1,
+  Z_STREAM_ERROR:    -2,
+  Z_DATA_ERROR:      -3,
+  //Z_MEM_ERROR:     -4,
+  Z_BUF_ERROR:       -5,
+  //Z_VERSION_ERROR: -6,
+
+  /* compression levels */
+  Z_NO_COMPRESSION:         0,
+  Z_BEST_SPEED:             1,
+  Z_BEST_COMPRESSION:       9,
+  Z_DEFAULT_COMPRESSION:   -1,
+
+
+  Z_FILTERED:               1,
+  Z_HUFFMAN_ONLY:           2,
+  Z_RLE:                    3,
+  Z_FIXED:                  4,
+  Z_DEFAULT_STRATEGY:       0,
+
+  /* Possible values of the data_type field (though see inflate()) */
+  Z_BINARY:                 0,
+  Z_TEXT:                   1,
+  //Z_ASCII:                1, // = Z_TEXT (deprecated)
+  Z_UNKNOWN:                2,
+
+  /* The deflate compression method */
+  Z_DEFLATED:               8
+  //Z_NULL:                 null // Use -1 or null inline, depending on var type
+};
+},{}],31:[function(_dereq_,module,exports){
+'use strict';
+
+// Note: we can't get significant speed boost here.
+// So write code to minimize size - no pregenerated tables
+// and array tools dependencies.
+
+
+// Use ordinary array, since untyped makes no boost here
+function makeTable() {
+  var c, table = [];
+
+  for(var n =0; n < 256; n++){
+    c = n;
+    for(var k =0; k < 8; k++){
+      c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
+    }
+    table[n] = c;
+  }
+
+  return table;
+}
+
+// Create table on load. Just 255 signed longs. Not a problem.
+var crcTable = makeTable();
+
+
+function crc32(crc, buf, len, pos) {
+  var t = crcTable
+    , end = pos + len;
+
+  crc = crc ^ (-1);
+
+  for (var i = pos; i < end; i++ ) {
+    crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
+  }
+
+  return (crc ^ (-1)); // >>> 0;
+}
+
+
+module.exports = crc32;
+},{}],32:[function(_dereq_,module,exports){
+'use strict';
+
+var utils   = _dereq_('../utils/common');
+var trees   = _dereq_('./trees');
+var adler32 = _dereq_('./adler32');
+var crc32   = _dereq_('./crc32');
+var msg   = _dereq_('./messages');
+
+/* Public constants ==========================================================*/
+/* ===========================================================================*/
+
+
+/* Allowed flush values; see deflate() and inflate() below for details */
+var Z_NO_FLUSH      = 0;
+var Z_PARTIAL_FLUSH = 1;
+//var Z_SYNC_FLUSH    = 2;
+var Z_FULL_FLUSH    = 3;
+var Z_FINISH        = 4;
+var Z_BLOCK         = 5;
+//var Z_TREES         = 6;
+
+
+/* Return codes for the compression/decompression functions. Negative values
+ * are errors, positive values are used for special but normal events.
+ */
+var Z_OK            = 0;
+var Z_STREAM_END    = 1;
+//var Z_NEED_DICT     = 2;
+//var Z_ERRNO         = -1;
+var Z_STREAM_ERROR  = -2;
+var Z_DATA_ERROR    = -3;
+//var Z_MEM_ERROR     = -4;
+var Z_BUF_ERROR     = -5;
+//var Z_VERSION_ERROR = -6;
+
+
+/* compression levels */
+//var Z_NO_COMPRESSION      = 0;
+//var Z_BEST_SPEED          = 1;
+//var Z_BEST_COMPRESSION    = 9;
+var Z_DEFAULT_COMPRESSION = -1;
+
+
+var Z_FILTERED            = 1;
+var Z_HUFFMAN_ONLY        = 2;
+var Z_RLE                 = 3;
+var Z_FIXED               = 4;
+var Z_DEFAULT_STRATEGY    = 0;
+
+/* Possible values of the data_type field (though see inflate()) */
+//var Z_BINARY              = 0;
+//var Z_TEXT                = 1;
+//var Z_ASCII               = 1; // = Z_TEXT
+var Z_UNKNOWN             = 2;
+
+
+/* The deflate compression method */
+var Z_DEFLATED  = 8;
+
+/*============================================================================*/
+
+
+var MAX_MEM_LEVEL = 9;
+/* Maximum value for memLevel in deflateInit2 */
+var MAX_WBITS = 15;
+/* 32K LZ77 window */
+var DEF_MEM_LEVEL = 8;
+
+
+var LENGTH_CODES  = 29;
+/* number of length codes, not counting the special END_BLOCK code */
+var LITERALS      = 256;
+/* number of literal bytes 0..255 */
+var L_CODES       = LITERALS + 1 + LENGTH_CODES;
+/* number of Literal or Length codes, including the END_BLOCK code */
+var D_CODES       = 30;
+/* number of distance codes */
+var BL_CODES      = 19;
+/* number of codes used to transfer the bit lengths */
+var HEAP_SIZE     = 2*L_CODES + 1;
+/* maximum heap size */
+var MAX_BITS  = 15;
+/* All codes must not exceed MAX_BITS bits */
+
+var MIN_MATCH = 3;
+var MAX_MATCH = 258;
+var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);
+
+var PRESET_DICT = 0x20;
+
+var INIT_STATE = 42;
+var EXTRA_STATE = 69;
+var NAME_STATE = 73;
+var COMMENT_STATE = 91;
+var HCRC_STATE = 103;
+var BUSY_STATE = 113;
+var FINISH_STATE = 666;
+
+var BS_NEED_MORE      = 1; /* block not completed, need more input or more output */
+var BS_BLOCK_DONE     = 2; /* block flush performed */
+var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */
+var BS_FINISH_DONE    = 4; /* finish done, accept no more input or output */
+
+var OS_CODE = 0x03; // Unix :) . Don't detect, use this default.
+
+function err(strm, errorCode) {
+  strm.msg = msg[errorCode];
+  return errorCode;
+}
+
+function rank(f) {
+  return ((f) << 1) - ((f) > 4 ? 9 : 0);
+}
+
+function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }
+
+
+/* =========================================================================
+ * Flush as much pending output as possible. All deflate() output goes
+ * through this function so some applications may wish to modify it
+ * to avoid allocating a large strm->output buffer and copying into it.
+ * (See also read_buf()).
+ */
+function flush_pending(strm) {
+  var s = strm.state;
+
+  //_tr_flush_bits(s);
+  var len = s.pending;
+  if (len > strm.avail_out) {
+    len = strm.avail_out;
+  }
+  if (len === 0) { return; }
+
+  utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);
+  strm.next_out += len;
+  s.pending_out += len;
+  strm.total_out += len;
+  strm.avail_out -= len;
+  s.pending -= len;
+  if (s.pending === 0) {
+    s.pending_out = 0;
+  }
+}
+
+
+function flush_block_only (s, last) {
+  trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);
+  s.block_start = s.strstart;
+  flush_pending(s.strm);
+}
+
+
+function put_byte(s, b) {
+  s.pending_buf[s.pending++] = b;
+}
+
+
+/* =========================================================================
+ * Put a short in the pending buffer. The 16-bit value is put in MSB order.
+ * IN assertion: the stream state is correct and there is enough room in
+ * pending_buf.
+ */
+function putShortMSB(s, b) {
+//  put_byte(s, (Byte)(b >> 8));
+//  put_byte(s, (Byte)(b & 0xff));
+  s.pending_buf[s.pending++] = (b >>> 8) & 0xff;
+  s.pending_buf[s.pending++] = b & 0xff;
+}
+
+
+/* ===========================================================================
+ * Read a new buffer from the current input stream, update the adler32
+ * and total number of bytes read.  All deflate() input goes through
+ * this function so some applications may wish to modify it to avoid
+ * allocating a large strm->input buffer and copying from it.
+ * (See also flush_pending()).
+ */
+function read_buf(strm, buf, start, size) {
+  var len = strm.avail_in;
+
+  if (len > size) { len = size; }
+  if (len === 0) { return 0; }
+
+  strm.avail_in -= len;
+
+  utils.arraySet(buf, strm.input, strm.next_in, len, start);
+  if (strm.state.wrap === 1) {
+    strm.adler = adler32(strm.adler, buf, len, start);
+  }
+
+  else if (strm.state.wrap === 2) {
+    strm.adler = crc32(strm.adler, buf, len, start);
+  }
+
+  strm.next_in += len;
+  strm.total_in += len;
+
+  return len;
+}
+
+
+/* ===========================================================================
+ * Set match_start to the longest match starting at the given string and
+ * return its length. Matches shorter or equal to prev_length are discarded,
+ * in which case the result is equal to prev_length and match_start is
+ * garbage.
+ * IN assertions: cur_match is the head of the hash chain for the current
+ *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
+ * OUT assertion: the match length is not greater than s->lookahead.
+ */
+function longest_match(s, cur_match) {
+  var chain_length = s.max_chain_length;      /* max hash chain length */
+  var scan = s.strstart; /* current string */
+  var match;                       /* matched string */
+  var len;                           /* length of current match */
+  var best_len = s.prev_length;              /* best match length so far */
+  var nice_match = s.nice_match;             /* stop if match long enough */
+  var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?
+      s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;
+
+  var _win = s.window; // shortcut
+
+  var wmask = s.w_mask;
+  var prev  = s.prev;
+
+  /* Stop when cur_match becomes <= limit. To simplify the code,
+   * we prevent matches with the string of window index 0.
+   */
+
+  var strend = s.strstart + MAX_MATCH;
+  var scan_end1  = _win[scan + best_len - 1];
+  var scan_end   = _win[scan + best_len];
+
+  /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
+   * It is easy to get rid of this optimization if necessary.
+   */
+  // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
+
+  /* Do not waste too much time if we already have a good match: */
+  if (s.prev_length >= s.good_match) {
+    chain_length >>= 2;
+  }
+  /* Do not look for matches beyond the end of the input. This is necessary
+   * to make deflate deterministic.
+   */
+  if (nice_match > s.lookahead) { nice_match = s.lookahead; }
+
+  // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
+
+  do {
+    // Assert(cur_match < s->strstart, "no future");
+    match = cur_match;
+
+    /* Skip to next match if the match length cannot increase
+     * or if the match length is less than 2.  Note that the checks below
+     * for insufficient lookahead only occur occasionally for performance
+     * reasons.  Therefore uninitialized memory will be accessed, and
+     * conditional jumps will be made that depend on those values.
+     * However the length of the match is limited to the lookahead, so
+     * the output of deflate is not affected by the uninitialized values.
+     */
+
+    if (_win[match + best_len]     !== scan_end  ||
+        _win[match + best_len - 1] !== scan_end1 ||
+        _win[match]                !== _win[scan] ||
+        _win[++match]              !== _win[scan + 1]) {
+      continue;
+    }
+
+    /* The check at best_len-1 can be removed because it will be made
+     * again later. (This heuristic is not always a win.)
+     * It is not necessary to compare scan[2] and match[2] since they
+     * are always equal when the other bytes match, given that
+     * the hash keys are equal and that HASH_BITS >= 8.
+     */
+    scan += 2;
+    match++;
+    // Assert(*scan == *match, "match[2]?");
+
+    /* We check for insufficient lookahead only every 8th comparison;
+     * the 256th check will be made at strstart+258.
+     */
+    do {
+      /*jshint noempty:false*/
+    } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
+             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
+             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
+             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
+             scan < strend);
+
+    // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
+
+    len = MAX_MATCH - (strend - scan);
+    scan = strend - MAX_MATCH;
+
+    if (len > best_len) {
+      s.match_start = cur_match;
+      best_len = len;
+      if (len >= nice_match) {
+        break;
+      }
+      scan_end1  = _win[scan + best_len - 1];
+      scan_end   = _win[scan + best_len];
+    }
+  } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);
+
+  if (best_len <= s.lookahead) {
+    return best_len;
+  }
+  return s.lookahead;
+}
+
+
+/* ===========================================================================
+ * Fill the window when the lookahead becomes insufficient.
+ * Updates strstart and lookahead.
+ *
+ * IN assertion: lookahead < MIN_LOOKAHEAD
+ * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
+ *    At least one byte has been read, or avail_in == 0; reads are
+ *    performed for at least two bytes (required for the zip translate_eol
+ *    option -- not supported here).
+ */
+function fill_window(s) {
+  var _w_size = s.w_size;
+  var p, n, m, more, str;
+
+  //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead");
+
+  do {
+    more = s.window_size - s.lookahead - s.strstart;
+
+    // JS ints have 32 bit, block below not needed
+    /* Deal with !@#$% 64K limit: */
+    //if (sizeof(int) <= 2) {
+    //    if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
+    //        more = wsize;
+    //
+    //  } else if (more == (unsigned)(-1)) {
+    //        /* Very unlikely, but possible on 16 bit machine if
+    //         * strstart == 0 && lookahead == 1 (input done a byte at time)
+    //         */
+    //        more--;
+    //    }
+    //}
+
+
+    /* If the window is almost full and there is insufficient lookahead,
+     * move the upper half to the lower one to make room in the upper half.
+     */
+    if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {
+
+      utils.arraySet(s.window, s.window, _w_size, _w_size, 0);
+      s.match_start -= _w_size;
+      s.strstart -= _w_size;
+      /* we now have strstart >= MAX_DIST */
+      s.block_start -= _w_size;
+
+      /* Slide the hash table (could be avoided with 32 bit values
+       at the expense of memory usage). We slide even when level == 0
+       to keep the hash table consistent if we switch back to level > 0
+       later. (Using level 0 permanently is not an optimal usage of
+       zlib, so we don't care about this pathological case.)
+       */
+
+      n = s.hash_size;
+      p = n;
+      do {
+        m = s.head[--p];
+        s.head[p] = (m >= _w_size ? m - _w_size : 0);
+      } while (--n);
+
+      n = _w_size;
+      p = n;
+      do {
+        m = s.prev[--p];
+        s.prev[p] = (m >= _w_size ? m - _w_size : 0);
+        /* If n is not on any hash chain, prev[n] is garbage but
+         * its value will never be used.
+         */
+      } while (--n);
+
+      more += _w_size;
+    }
+    if (s.strm.avail_in === 0) {
+      break;
+    }
+
+    /* If there was no sliding:
+     *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
+     *    more == window_size - lookahead - strstart
+     * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
+     * => more >= window_size - 2*WSIZE + 2
+     * In the BIG_MEM or MMAP case (not yet supported),
+     *   window_size == input_size + MIN_LOOKAHEAD  &&
+     *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
+     * Otherwise, window_size == 2*WSIZE so more >= 2.
+     * If there was sliding, more >= WSIZE. So in all cases, more >= 2.
+     */
+    //Assert(more >= 2, "more < 2");
+    n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);
+    s.lookahead += n;
+
+    /* Initialize the hash value now that we have some input: */
+    if (s.lookahead + s.insert >= MIN_MATCH) {
+      str = s.strstart - s.insert;
+      s.ins_h = s.window[str];
+
+      /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */
+      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;
+//#if MIN_MATCH != 3
+//        Call update_hash() MIN_MATCH-3 more times
+//#endif
+      while (s.insert) {
+        /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
+        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH-1]) & s.hash_mask;
+
+        s.prev[str & s.w_mask] = s.head[s.ins_h];
+        s.head[s.ins_h] = str;
+        str++;
+        s.insert--;
+        if (s.lookahead + s.insert < MIN_MATCH) {
+          break;
+        }
+      }
+    }
+    /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
+     * but this is not important since only literal bytes will be emitted.
+     */
+
+  } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);
+
+  /* If the WIN_INIT bytes after the end of the current data have never been
+   * written, then zero those bytes in order to avoid memory check reports of
+   * the use of uninitialized (or uninitialised as Julian writes) bytes by
+   * the longest match routines.  Update the high water mark for the next
+   * time through here.  WIN_INIT is set to MAX_MATCH since the longest match
+   * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
+   */
+//  if (s.high_water < s.window_size) {
+//    var curr = s.strstart + s.lookahead;
+//    var init = 0;
+//
+//    if (s.high_water < curr) {
+//      /* Previous high water mark below current data -- zero WIN_INIT
+//       * bytes or up to end of window, whichever is less.
+//       */
+//      init = s.window_size - curr;
+//      if (init > WIN_INIT)
+//        init = WIN_INIT;
+//      zmemzero(s->window + curr, (unsigned)init);
+//      s->high_water = curr + init;
+//    }
+//    else if (s->high_water < (ulg)curr + WIN_INIT) {
+//      /* High water mark at or above current data, but below current data
+//       * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up
+//       * to end of window, whichever is less.
+//       */
+//      init = (ulg)curr + WIN_INIT - s->high_water;
+//      if (init > s->window_size - s->high_water)
+//        init = s->window_size - s->high_water;
+//      zmemzero(s->window + s->high_water, (unsigned)init);
+//      s->high_water += init;
+//    }
+//  }
+//
+//  Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
+//    "not enough room for search");
+}
+
+/* ===========================================================================
+ * Copy without compression as much as possible from the input stream, return
+ * the current block state.
+ * This function does not insert new strings in the dictionary since
+ * uncompressible data is probably not useful. This function is used
+ * only for the level=0 compression option.
+ * NOTE: this function should be optimized to avoid extra copying from
+ * window to pending_buf.
+ */
+function deflate_stored(s, flush) {
+  /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
+   * to pending_buf_size, and each stored block has a 5 byte header:
+   */
+  var max_block_size = 0xffff;
+
+  if (max_block_size > s.pending_buf_size - 5) {
+    max_block_size = s.pending_buf_size - 5;
+  }
+
+  /* Copy as much as possible from input to output: */
+  for (;;) {
+    /* Fill the window as much as possible: */
+    if (s.lookahead <= 1) {
+
+      //Assert(s->strstart < s->w_size+MAX_DIST(s) ||
+      //  s->block_start >= (long)s->w_size, "slide too late");
+//      if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||
+//        s.block_start >= s.w_size)) {
+//        throw  new Error("slide too late");
+//      }
+
+      fill_window(s);
+      if (s.lookahead === 0 && flush === Z_NO_FLUSH) {
+        return BS_NEED_MORE;
+      }
+
+      if (s.lookahead === 0) {
+        break;
+      }
+      /* flush the current block */
+    }
+    //Assert(s->block_start >= 0L, "block gone");
+//    if (s.block_start < 0) throw new Error("block gone");
+
+    s.strstart += s.lookahead;
+    s.lookahead = 0;
+
+    /* Emit a stored block if pending_buf will be full: */
+    var max_start = s.block_start + max_block_size;
+
+    if (s.strstart === 0 || s.strstart >= max_start) {
+      /* strstart == 0 is possible when wraparound on 16-bit machine */
+      s.lookahead = s.strstart - max_start;
+      s.strstart = max_start;
+      /*** FLUSH_BLOCK(s, 0); ***/
+      flush_block_only(s, false);
+      if (s.strm.avail_out === 0) {
+        return BS_NEED_MORE;
+      }
+      /***/
+
+
+    }
+    /* Flush if we may have to slide, otherwise block_start may become
+     * negative and the data will be gone:
+     */
+    if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {
+      /*** FLUSH_BLOCK(s, 0); ***/
+      flush_block_only(s, false);
+      if (s.strm.avail_out === 0) {
+        return BS_NEED_MORE;
+      }
+      /***/
+    }
+  }
+
+  s.insert = 0;
+
+  if (flush === Z_FINISH) {
+    /*** FLUSH_BLOCK(s, 1); ***/
+    flush_block_only(s, true);
+    if (s.strm.avail_out === 0) {
+      return BS_FINISH_STARTED;
+    }
+    /***/
+    return BS_FINISH_DONE;
+  }
+
+  if (s.strstart > s.block_start) {
+    /*** FLUSH_BLOCK(s, 0); ***/
+    flush_block_only(s, false);
+    if (s.strm.avail_out === 0) {
+      return BS_NEED_MORE;
+    }
+    /***/
+  }
+
+  return BS_NEED_MORE;
+}
+
+/* ===========================================================================
+ * Compress as much as possible from the input stream, return the current
+ * block state.
+ * This function does not perform lazy evaluation of matches and inserts
+ * new strings in the dictionary only for unmatched strings or for short
+ * matches. It is used only for the fast compression options.
+ */
+function deflate_fast(s, flush) {
+  var hash_head;        /* head of the hash chain */
+  var bflush;           /* set if current block must be flushed */
+
+  for (;;) {
+    /* Make sure that we always have enough lookahead, except
+     * at the end of the input file. We need MAX_MATCH bytes
+     * for the next match, plus MIN_MATCH bytes to insert the
+     * string following the next match.
+     */
+    if (s.lookahead < MIN_LOOKAHEAD) {
+      fill_window(s);
+      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {
+        return BS_NEED_MORE;
+      }
+      if (s.lookahead === 0) {
+        break; /* flush the current block */
+      }
+    }
+
+    /* Insert the string window[strstart .. strstart+2] in the
+     * dictionary, and set hash_head to the head of the hash chain:
+     */
+    hash_head = 0/*NIL*/;
+    if (s.lookahead >= MIN_MATCH) {
+      /*** INSERT_STRING(s, s.strstart, hash_head); ***/
+      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
+      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
+      s.head[s.ins_h] = s.strstart;
+      /***/
+    }
+
+    /* Find the longest match, discarding those <= prev_length.
+     * At this point we have always match_length < MIN_MATCH
+     */
+    if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {
+      /* To simplify the code, we prevent matches with the string
+       * of window index 0 (in particular we have to avoid a match
+       * of the string with itself at the start of the input file).
+       */
+      s.match_length = longest_match(s, hash_head);
+      /* longest_match() sets match_start */
+    }
+    if (s.match_length >= MIN_MATCH) {
+      // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only
+
+      /*** _tr_tally_dist(s, s.strstart - s.match_start,
+                     s.match_length - MIN_MATCH, bflush); ***/
+      bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);
+
+      s.lookahead -= s.match_length;
+
+      /* Insert new strings in the hash table only if the match length
+       * is not too large. This saves time but degrades compression.
+       */
+      if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {
+        s.match_length--; /* string at strstart already in table */
+        do {
+          s.strstart++;
+          /*** INSERT_STRING(s, s.strstart, hash_head); ***/
+          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
+          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
+          s.head[s.ins_h] = s.strstart;
+          /***/
+          /* strstart never exceeds WSIZE-MAX_MATCH, so there are
+           * always MIN_MATCH bytes ahead.
+           */
+        } while (--s.match_length !== 0);
+        s.strstart++;
+      } else
+      {
+        s.strstart += s.match_length;
+        s.match_length = 0;
+        s.ins_h = s.window[s.strstart];
+        /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */
+        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;
+
+//#if MIN_MATCH != 3
+//                Call UPDATE_HASH() MIN_MATCH-3 more times
+//#endif
+        /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
+         * matter since it will be recomputed at next deflate call.
+         */
+      }
+    } else {
+      /* No match, output a literal byte */
+      //Tracevv((stderr,"%c", s.window[s.strstart]));
+      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
+      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);
+
+      s.lookahead--;
+      s.strstart++;
+    }
+    if (bflush) {
+      /*** FLUSH_BLOCK(s, 0); ***/
+      flush_block_only(s, false);
+      if (s.strm.avail_out === 0) {
+        return BS_NEED_MORE;
+      }
+      /***/
+    }
+  }
+  s.insert = ((s.strstart < (MIN_MATCH-1)) ? s.strstart : MIN_MATCH-1);
+  if (flush === Z_FINISH) {
+    /*** FLUSH_BLOCK(s, 1); ***/
+    flush_block_only(s, true);
+    if (s.strm.avail_out === 0) {
+      return BS_FINISH_STARTED;
+    }
+    /***/
+    return BS_FINISH_DONE;
+  }
+  if (s.last_lit) {
+    /*** FLUSH_BLOCK(s, 0); ***/
+    flush_block_only(s, false);
+    if (s.strm.avail_out === 0) {
+      return BS_NEED_MORE;
+    }
+    /***/
+  }
+  return BS_BLOCK_DONE;
+}
+
+/* ===========================================================================
+ * Same as above, but achieves better compression. We use a lazy
+ * evaluation for matches: a match is finally adopted only if there is
+ * no better match at the next window position.
+ */
+function deflate_slow(s, flush) {
+  var hash_head;          /* head of hash chain */
+  var bflush;              /* set if current block must be flushed */
+
+  var max_insert;
+
+  /* Process the input block. */
+  for (;;) {
+    /* Make sure that we always have enough lookahead, except
+     * at the end of the input file. We need MAX_MATCH bytes
+     * for the next match, plus MIN_MATCH bytes to insert the
+     * string following the next match.
+     */
+    if (s.lookahead < MIN_LOOKAHEAD) {
+      fill_window(s);
+      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {
+        return BS_NEED_MORE;
+      }
+      if (s.lookahead === 0) { break; } /* flush the current block */
+    }
+
+    /* Insert the string window[strstart .. strstart+2] in the
+     * dictionary, and set hash_head to the head of the hash chain:
+     */
+    hash_head = 0/*NIL*/;
+    if (s.lookahead >= MIN_MATCH) {
+      /*** INSERT_STRING(s, s.strstart, hash_head); ***/
+      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
+      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
+      s.head[s.ins_h] = s.strstart;
+      /***/
+    }
+
+    /* Find the longest match, discarding those <= prev_length.
+     */
+    s.prev_length = s.match_length;
+    s.prev_match = s.match_start;
+    s.match_length = MIN_MATCH-1;
+
+    if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&
+        s.strstart - hash_head <= (s.w_size-MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {
+      /* To simplify the code, we prevent matches with the string
+       * of window index 0 (in particular we have to avoid a match
+       * of the string with itself at the start of the input file).
+       */
+      s.match_length = longest_match(s, hash_head);
+      /* longest_match() sets match_start */
+
+      if (s.match_length <= 5 &&
+         (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {
+
+        /* If prev_match is also MIN_MATCH, match_start is garbage
+         * but we will ignore the current match anyway.
+         */
+        s.match_length = MIN_MATCH-1;
+      }
+    }
+    /* If there was a match at the previous step and the current
+     * match is not better, output the previous match:
+     */
+    if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {
+      max_insert = s.strstart + s.lookahead - MIN_MATCH;
+      /* Do not insert strings in hash table beyond this. */
+
+      //check_match(s, s.strstart-1, s.prev_match, s.prev_length);
+
+      /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,
+                     s.prev_length - MIN_MATCH, bflush);***/
+      bflush = trees._tr_tally(s, s.strstart - 1- s.prev_match, s.prev_length - MIN_MATCH);
+      /* Insert in hash table all strings up to the end of the match.
+       * strstart-1 and strstart are already inserted. If there is not
+       * enough lookahead, the last two strings are not inserted in
+       * the hash table.
+       */
+      s.lookahead -= s.prev_length-1;
+      s.prev_length -= 2;
+      do {
+        if (++s.strstart <= max_insert) {
+          /*** INSERT_STRING(s, s.strstart, hash_head); ***/
+          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
+          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
+          s.head[s.ins_h] = s.strstart;
+          /***/
+        }
+      } while (--s.prev_length !== 0);
+      s.match_available = 0;
+      s.match_length = MIN_MATCH-1;
+      s.strstart++;
+
+      if (bflush) {
+        /*** FLUSH_BLOCK(s, 0); ***/
+        flush_block_only(s, false);
+        if (s.strm.avail_out === 0) {
+          return BS_NEED_MORE;
+        }
+        /***/
+      }
+
+    } else if (s.match_available) {
+      /* If there was no match at the previous position, output a
+       * single literal. If there was a match but the current match
+       * is longer, truncate the previous match to a single literal.
+       */
+      //Tracevv((stderr,"%c", s->window[s->strstart-1]));
+      /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/
+      bflush = trees._tr_tally(s, 0, s.window[s.strstart-1]);
+
+      if (bflush) {
+        /*** FLUSH_BLOCK_ONLY(s, 0) ***/
+        flush_block_only(s, false);
+        /***/
+      }
+      s.strstart++;
+      s.lookahead--;
+      if (s.strm.avail_out === 0) {
+        return BS_NEED_MORE;
+      }
+    } else {
+      /* There is no previous match to compare with, wait for
+       * the next step to decide.
+       */
+      s.match_available = 1;
+      s.strstart++;
+      s.lookahead--;
+    }
+  }
+  //Assert (flush != Z_NO_FLUSH, "no flush?");
+  if (s.match_available) {
+    //Tracevv((stderr,"%c", s->window[s->strstart-1]));
+    /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/
+    bflush = trees._tr_tally(s, 0, s.window[s.strstart-1]);
+
+    s.match_available = 0;
+  }
+  s.insert = s.strstart < MIN_MATCH-1 ? s.strstart : MIN_MATCH-1;
+  if (flush === Z_FINISH) {
+    /*** FLUSH_BLOCK(s, 1); ***/
+    flush_block_only(s, true);
+    if (s.strm.avail_out === 0) {
+      return BS_FINISH_STARTED;
+    }
+    /***/
+    return BS_FINISH_DONE;
+  }
+  if (s.last_lit) {
+    /*** FLUSH_BLOCK(s, 0); ***/
+    flush_block_only(s, false);
+    if (s.strm.avail_out === 0) {
+      return BS_NEED_MORE;
+    }
+    /***/
+  }
+
+  return BS_BLOCK_DONE;
+}
+
+
+/* ===========================================================================
+ * For Z_RLE, simply look for runs of bytes, generate matches only of distance
+ * one.  Do not maintain a hash table.  (It will be regenerated if this run of
+ * deflate switches away from Z_RLE.)
+ */
+function deflate_rle(s, flush) {
+  var bflush;            /* set if current block must be flushed */
+  var prev;              /* byte at distance one to match */
+  var scan, strend;      /* scan goes up to strend for length of run */
+
+  var _win = s.window;
+
+  for (;;) {
+    /* Make sure that we always have enough lookahead, except
+     * at the end of the input file. We need MAX_MATCH bytes
+     * for the longest run, plus one for the unrolled loop.
+     */
+    if (s.lookahead <= MAX_MATCH) {
+      fill_window(s);
+      if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {
+        return BS_NEED_MORE;
+      }
+      if (s.lookahead === 0) { break; } /* flush the current block */
+    }
+
+    /* See how many times the previous byte repeats */
+    s.match_length = 0;
+    if (s.lookahead >= MIN_MATCH && s.strstart > 0) {
+      scan = s.strstart - 1;
+      prev = _win[scan];
+      if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {
+        strend = s.strstart + MAX_MATCH;
+        do {
+          /*jshint noempty:false*/
+        } while (prev === _win[++scan] && prev === _win[++scan] &&
+                 prev === _win[++scan] && prev === _win[++scan] &&
+                 prev === _win[++scan] && prev === _win[++scan] &&
+                 prev === _win[++scan] && prev === _win[++scan] &&
+                 scan < strend);
+        s.match_length = MAX_MATCH - (strend - scan);
+        if (s.match_length > s.lookahead) {
+          s.match_length = s.lookahead;
+        }
+      }
+      //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan");
+    }
+
+    /* Emit match if have run of MIN_MATCH or longer, else emit literal */
+    if (s.match_length >= MIN_MATCH) {
+      //check_match(s, s.strstart, s.strstart - 1, s.match_length);
+
+      /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/
+      bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);
+
+      s.lookahead -= s.match_length;
+      s.strstart += s.match_length;
+      s.match_length = 0;
+    } else {
+      /* No match, output a literal byte */
+      //Tracevv((stderr,"%c", s->window[s->strstart]));
+      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
+      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);
+
+      s.lookahead--;
+      s.strstart++;
+    }
+    if (bflush) {
+      /*** FLUSH_BLOCK(s, 0); ***/
+      flush_block_only(s, false);
+      if (s.strm.avail_out === 0) {
+        return BS_NEED_MORE;
+      }
+      /***/
+    }
+  }
+  s.insert = 0;
+  if (flush === Z_FINISH) {
+    /*** FLUSH_BLOCK(s, 1); ***/
+    flush_block_only(s, true);
+    if (s.strm.avail_out === 0) {
+      return BS_FINISH_STARTED;
+    }
+    /***/
+    return BS_FINISH_DONE;
+  }
+  if (s.last_lit) {
+    /*** FLUSH_BLOCK(s, 0); ***/
+    flush_block_only(s, false);
+    if (s.strm.avail_out === 0) {
+      return BS_NEED_MORE;
+    }
+    /***/
+  }
+  return BS_BLOCK_DONE;
+}
+
+/* ===========================================================================
+ * For Z_HUFFMAN_ONLY, do not look for matches.  Do not maintain a hash table.
+ * (It will be regenerated if this run of deflate switches away from Huffman.)
+ */
+function deflate_huff(s, flush) {
+  var bflush;             /* set if current block must be flushed */
+
+  for (;;) {
+    /* Make sure that we have a literal to write. */
+    if (s.lookahead === 0) {
+      fill_window(s);
+      if (s.lookahead === 0) {
+        if (flush === Z_NO_FLUSH) {
+          return BS_NEED_MORE;
+        }
+        break;      /* flush the current block */
+      }
+    }
+
+    /* Output a literal byte */
+    s.match_length = 0;
+    //Tracevv((stderr,"%c", s->window[s->strstart]));
+    /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
+    bflush = trees._tr_tally(s, 0, s.window[s.strstart]);
+    s.lookahead--;
+    s.strstart++;
+    if (bflush) {
+      /*** FLUSH_BLOCK(s, 0); ***/
+      flush_block_only(s, false);
+      if (s.strm.avail_out === 0) {
+        return BS_NEED_MORE;
+      }
+      /***/
+    }
+  }
+  s.insert = 0;
+  if (flush === Z_FINISH) {
+    /*** FLUSH_BLOCK(s, 1); ***/
+    flush_block_only(s, true);
+    if (s.strm.avail_out === 0) {
+      return BS_FINISH_STARTED;
+    }
+    /***/
+    return BS_FINISH_DONE;
+  }
+  if (s.last_lit) {
+    /*** FLUSH_BLOCK(s, 0); ***/
+    flush_block_only(s, false);
+    if (s.strm.avail_out === 0) {
+      return BS_NEED_MORE;
+    }
+    /***/
+  }
+  return BS_BLOCK_DONE;
+}
+
+/* Values for max_lazy_match, good_match and max_chain_length, depending on
+ * the desired pack level (0..9). The values given below have been tuned to
+ * exclude worst case performance for pathological files. Better values may be
+ * found for specific files.
+ */
+var Config = function (good_length, max_lazy, nice_length, max_chain, func) {
+  this.good_length = good_length;
+  this.max_lazy = max_lazy;
+  this.nice_length = nice_length;
+  this.max_chain = max_chain;
+  this.func = func;
+};
+
+var configuration_table;
+
+configuration_table = [
+  /*      good lazy nice chain */
+  new Config(0, 0, 0, 0, deflate_stored),          /* 0 store only */
+  new Config(4, 4, 8, 4, deflate_fast),            /* 1 max speed, no lazy matches */
+  new Config(4, 5, 16, 8, deflate_fast),           /* 2 */
+  new Config(4, 6, 32, 32, deflate_fast),          /* 3 */
+
+  new Config(4, 4, 16, 16, deflate_slow),          /* 4 lazy matches */
+  new Config(8, 16, 32, 32, deflate_slow),         /* 5 */
+  new Config(8, 16, 128, 128, deflate_slow),       /* 6 */
+  new Config(8, 32, 128, 256, deflate_slow),       /* 7 */
+  new Config(32, 128, 258, 1024, deflate_slow),    /* 8 */
+  new Config(32, 258, 258, 4096, deflate_slow)     /* 9 max compression */
+];
+
+
+/* ===========================================================================
+ * Initialize the "longest match" routines for a new zlib stream
+ */
+function lm_init(s) {
+  s.window_size = 2 * s.w_size;
+
+  /*** CLEAR_HASH(s); ***/
+  zero(s.head); // Fill with NIL (= 0);
+
+  /* Set the default configuration parameters:
+   */
+  s.max_lazy_match = configuration_table[s.level].max_lazy;
+  s.good_match = configuration_table[s.level].good_length;
+  s.nice_match = configuration_table[s.level].nice_length;
+  s.max_chain_length = configuration_table[s.level].max_chain;
+
+  s.strstart = 0;
+  s.block_start = 0;
+  s.lookahead = 0;
+  s.insert = 0;
+  s.match_length = s.prev_length = MIN_MATCH - 1;
+  s.match_available = 0;
+  s.ins_h = 0;
+}
+
+
+function DeflateState() {
+  this.strm = null;            /* pointer back to this zlib stream */
+  this.status = 0;            /* as the name implies */
+  this.pending_buf = null;      /* output still pending */
+  this.pending_buf_size = 0;  /* size of pending_buf */
+  this.pending_out = 0;       /* next pending byte to output to the stream */
+  this.pending = 0;           /* nb of bytes in the pending buffer */
+  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */
+  this.gzhead = null;         /* gzip header information to write */
+  this.gzindex = 0;           /* where in extra, name, or comment */
+  this.method = Z_DEFLATED; /* can only be DEFLATED */
+  this.last_flush = -1;   /* value of flush param for previous deflate call */
+
+  this.w_size = 0;  /* LZ77 window size (32K by default) */
+  this.w_bits = 0;  /* log2(w_size)  (8..16) */
+  this.w_mask = 0;  /* w_size - 1 */
+
+  this.window = null;
+  /* Sliding window. Input bytes are read into the second half of the window,
+   * and move to the first half later to keep a dictionary of at least wSize
+   * bytes. With this organization, matches are limited to a distance of
+   * wSize-MAX_MATCH bytes, but this ensures that IO is always
+   * performed with a length multiple of the block size.
+   */
+
+  this.window_size = 0;
+  /* Actual size of window: 2*wSize, except when the user input buffer
+   * is directly used as sliding window.
+   */
+
+  this.prev = null;
+  /* Link to older string with same hash index. To limit the size of this
+   * array to 64K, this link is maintained only for the last 32K strings.
+   * An index in this array is thus a window index modulo 32K.
+   */
+
+  this.head = null;   /* Heads of the hash chains or NIL. */
+
+  this.ins_h = 0;       /* hash index of string to be inserted */
+  this.hash_size = 0;   /* number of elements in hash table */
+  this.hash_bits = 0;   /* log2(hash_size) */
+  this.hash_mask = 0;   /* hash_size-1 */
+
+  this.hash_shift = 0;
+  /* Number of bits by which ins_h must be shifted at each input
+   * step. It must be such that after MIN_MATCH steps, the oldest
+   * byte no longer takes part in the hash key, that is:
+   *   hash_shift * MIN_MATCH >= hash_bits
+   */
+
+  this.block_start = 0;
+  /* Window position at the beginning of the current output block. Gets
+   * negative when the window is moved backwards.
+   */
+
+  this.match_length = 0;      /* length of best match */
+  this.prev_match = 0;        /* previous match */
+  this.match_available = 0;   /* set if previous match exists */
+  this.strstart = 0;          /* start of string to insert */
+  this.match_start = 0;       /* start of matching string */
+  this.lookahead = 0;         /* number of valid bytes ahead in window */
+
+  this.prev_length = 0;
+  /* Length of the best match at previous step. Matches not greater than this
+   * are discarded. This is used in the lazy match evaluation.
+   */
+
+  this.max_chain_length = 0;
+  /* To speed up deflation, hash chains are never searched beyond this
+   * length.  A higher limit improves compression ratio but degrades the
+   * speed.
+   */
+
+  this.max_lazy_match = 0;
+  /* Attempt to find a better match only when the current match is strictly
+   * smaller than this value. This mechanism is used only for compression
+   * levels >= 4.
+   */
+  // That's alias to max_lazy_match, don't use directly
+  //this.max_insert_length = 0;
+  /* Insert new strings in the hash table only if the match length is not
+   * greater than this length. This saves time but degrades compression.
+   * max_insert_length is used only for compression levels <= 3.
+   */
+
+  this.level = 0;     /* compression level (1..9) */
+  this.strategy = 0;  /* favor or force Huffman coding*/
+
+  this.good_match = 0;
+  /* Use a faster search when the previous match is longer than this */
+
+  this.nice_match = 0; /* Stop searching when current match exceeds this */
+
+              /* used by trees.c: */
+
+  /* Didn't use ct_data typedef below to suppress compiler warning */
+
+  // struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */
+  // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
+  // struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */
+
+  // Use flat array of DOUBLE size, with interleaved fata,
+  // because JS does not support effective
+  this.dyn_ltree  = new utils.Buf16(HEAP_SIZE * 2);
+  this.dyn_dtree  = new utils.Buf16((2*D_CODES+1) * 2);
+  this.bl_tree    = new utils.Buf16((2*BL_CODES+1) * 2);
+  zero(this.dyn_ltree);
+  zero(this.dyn_dtree);
+  zero(this.bl_tree);
+
+  this.l_desc   = null;         /* desc. for literal tree */
+  this.d_desc   = null;         /* desc. for distance tree */
+  this.bl_desc  = null;         /* desc. for bit length tree */
+
+  //ush bl_count[MAX_BITS+1];
+  this.bl_count = new utils.Buf16(MAX_BITS+1);
+  /* number of codes at each bit length for an optimal tree */
+
+  //int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */
+  this.heap = new utils.Buf16(2*L_CODES+1);  /* heap used to build the Huffman trees */
+  zero(this.heap);
+
+  this.heap_len = 0;               /* number of elements in the heap */
+  this.heap_max = 0;               /* element of largest frequency */
+  /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
+   * The same heap array is used to build all trees.
+   */
+
+  this.depth = new utils.Buf16(2*L_CODES+1); //uch depth[2*L_CODES+1];
+  zero(this.depth);
+  /* Depth of each subtree used as tie breaker for trees of equal frequency
+   */
+
+  this.l_buf = 0;          /* buffer index for literals or lengths */
+
+  this.lit_bufsize = 0;
+  /* Size of match buffer for literals/lengths.  There are 4 reasons for
+   * limiting lit_bufsize to 64K:
+   *   - frequencies can be kept in 16 bit counters
+   *   - if compression is not successful for the first block, all input
+   *     data is still in the window so we can still emit a stored block even
+   *     when input comes from standard input.  (This can also be done for
+   *     all blocks if lit_bufsize is not greater than 32K.)
+   *   - if compression is not successful for a file smaller than 64K, we can
+   *     even emit a stored file instead of a stored block (saving 5 bytes).
+   *     This is applicable only for zip (not gzip or zlib).
+   *   - creating new Huffman trees less frequently may not provide fast
+   *     adaptation to changes in the input data statistics. (Take for
+   *     example a binary file with poorly compressible code followed by
+   *     a highly compressible string table.) Smaller buffer sizes give
+   *     fast adaptation but have of course the overhead of transmitting
+   *     trees more frequently.
+   *   - I can't count above 4
+   */
+
+  this.last_lit = 0;      /* running index in l_buf */
+
+  this.d_buf = 0;
+  /* Buffer index for distances. To simplify the code, d_buf and l_buf have
+   * the same number of elements. To use different lengths, an extra flag
+   * array would be necessary.
+   */
+
+  this.opt_len = 0;       /* bit length of current block with optimal trees */
+  this.static_len = 0;    /* bit length of current block with static trees */
+  this.matches = 0;       /* number of string matches in current block */
+  this.insert = 0;        /* bytes at end of window left to insert */
+
+
+  this.bi_buf = 0;
+  /* Output buffer. bits are inserted starting at the bottom (least
+   * significant bits).
+   */
+  this.bi_valid = 0;
+  /* Number of valid bits in bi_buf.  All bits above the last valid bit
+   * are always zero.
+   */
+
+  // Used for window memory init. We safely ignore it for JS. That makes
+  // sense only for pointers and memory check tools.
+  //this.high_water = 0;
+  /* High water mark offset in window for initialized bytes -- bytes above
+   * this are set to zero in order to avoid memory check warnings when
+   * longest match routines access bytes past the input.  This is then
+   * updated to the new high water mark.
+   */
+}
+
+
+function deflateResetKeep(strm) {
+  var s;
+
+  if (!strm || !strm.state) {
+    return err(strm, Z_STREAM_ERROR);
+  }
+
+  strm.total_in = strm.total_out = 0;
+  strm.data_type = Z_UNKNOWN;
+
+  s = strm.state;
+  s.pending = 0;
+  s.pending_out = 0;
+
+  if (s.wrap < 0) {
+    s.wrap = -s.wrap;
+    /* was made negative by deflate(..., Z_FINISH); */
+  }
+  s.status = (s.wrap ? INIT_STATE : BUSY_STATE);
+  strm.adler = (s.wrap === 2) ?
+    0  // crc32(0, Z_NULL, 0)
+  :
+    1; // adler32(0, Z_NULL, 0)
+  s.last_flush = Z_NO_FLUSH;
+  trees._tr_init(s);
+  return Z_OK;
+}
+
+
+function deflateReset(strm) {
+  var ret = deflateResetKeep(strm);
+  if (ret === Z_OK) {
+    lm_init(strm.state);
+  }
+  return ret;
+}
+
+
+function deflateSetHeader(strm, head) {
+  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
+  if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }
+  strm.state.gzhead = head;
+  return Z_OK;
+}
+
+
+function deflateInit2(strm, level, method, windowBits, memLevel, strategy) {
+  if (!strm) { // === Z_NULL
+    return Z_STREAM_ERROR;
+  }
+  var wrap = 1;
+
+  if (level === Z_DEFAULT_COMPRESSION) {
+    level = 6;
+  }
+
+  if (windowBits < 0) { /* suppress zlib wrapper */
+    wrap = 0;
+    windowBits = -windowBits;
+  }
+
+  else if (windowBits > 15) {
+    wrap = 2;           /* write gzip wrapper instead */
+    windowBits -= 16;
+  }
+
+
+  if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||
+    windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
+    strategy < 0 || strategy > Z_FIXED) {
+    return err(strm, Z_STREAM_ERROR);
+  }
+
+
+  if (windowBits === 8) {
+    windowBits = 9;
+  }
+  /* until 256-byte window bug fixed */
+
+  var s = new DeflateState();
+
+  strm.state = s;
+  s.strm = strm;
+
+  s.wrap = wrap;
+  s.gzhead = null;
+  s.w_bits = windowBits;
+  s.w_size = 1 << s.w_bits;
+  s.w_mask = s.w_size - 1;
+
+  s.hash_bits = memLevel + 7;
+  s.hash_size = 1 << s.hash_bits;
+  s.hash_mask = s.hash_size - 1;
+  s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);
+
+  s.window = new utils.Buf8(s.w_size * 2);
+  s.head = new utils.Buf16(s.hash_size);
+  s.prev = new utils.Buf16(s.w_size);
+
+  // Don't need mem init magic for JS.
+  //s.high_water = 0;  /* nothing written to s->window yet */
+
+  s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
+
+  s.pending_buf_size = s.lit_bufsize * 4;
+  s.pending_buf = new utils.Buf8(s.pending_buf_size);
+
+  s.d_buf = s.lit_bufsize >> 1;
+  s.l_buf = (1 + 2) * s.lit_bufsize;
+
+  s.level = level;
+  s.strategy = strategy;
+  s.method = method;
+
+  return deflateReset(strm);
+}
+
+function deflateInit(strm, level) {
+  return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);
+}
+
+
+function deflate(strm, flush) {
+  var old_flush, s;
+  var beg, val; // for gzip header write only
+
+  if (!strm || !strm.state ||
+    flush > Z_BLOCK || flush < 0) {
+    return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;
+  }
+
+  s = strm.state;
+
+  if (!strm.output ||
+      (!strm.input && strm.avail_in !== 0) ||
+      (s.status === FINISH_STATE && flush !== Z_FINISH)) {
+    return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);
+  }
+
+  s.strm = strm; /* just in case */
+  old_flush = s.last_flush;
+  s.last_flush = flush;
+
+  /* Write the header */
+  if (s.status === INIT_STATE) {
+
+    if (s.wrap === 2) { // GZIP header
+      strm.adler = 0;  //crc32(0L, Z_NULL, 0);
+      put_byte(s, 31);
+      put_byte(s, 139);
+      put_byte(s, 8);
+      if (!s.gzhead) { // s->gzhead == Z_NULL
+        put_byte(s, 0);
+        put_byte(s, 0);
+        put_byte(s, 0);
+        put_byte(s, 0);
+        put_byte(s, 0);
+        put_byte(s, s.level === 9 ? 2 :
+                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?
+                     4 : 0));
+        put_byte(s, OS_CODE);
+        s.status = BUSY_STATE;
+      }
+      else {
+        put_byte(s, (s.gzhead.text ? 1 : 0) +
+                    (s.gzhead.hcrc ? 2 : 0) +
+                    (!s.gzhead.extra ? 0 : 4) +
+                    (!s.gzhead.name ? 0 : 8) +
+                    (!s.gzhead.comment ? 0 : 16)
+                );
+        put_byte(s, s.gzhead.time & 0xff);
+        put_byte(s, (s.gzhead.time >> 8) & 0xff);
+        put_byte(s, (s.gzhead.time >> 16) & 0xff);
+        put_byte(s, (s.gzhead.time >> 24) & 0xff);
+        put_byte(s, s.level === 9 ? 2 :
+                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?
+                     4 : 0));
+        put_byte(s, s.gzhead.os & 0xff);
+        if (s.gzhead.extra && s.gzhead.extra.length) {
+          put_byte(s, s.gzhead.extra.length & 0xff);
+          put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);
+        }
+        if (s.gzhead.hcrc) {
+          strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);
+        }
+        s.gzindex = 0;
+        s.status = EXTRA_STATE;
+      }
+    }
+    else // DEFLATE header
+    {
+      var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;
+      var level_flags = -1;
+
+      if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {
+        level_flags = 0;
+      } else if (s.level < 6) {
+        level_flags = 1;
+      } else if (s.level === 6) {
+        level_flags = 2;
+      } else {
+        level_flags = 3;
+      }
+      header |= (level_flags << 6);
+      if (s.strstart !== 0) { header |= PRESET_DICT; }
+      header += 31 - (header % 31);
+
+      s.status = BUSY_STATE;
+      putShortMSB(s, header);
+
+      /* Save the adler32 of the preset dictionary: */
+      if (s.strstart !== 0) {
+        putShortMSB(s, strm.adler >>> 16);
+        putShortMSB(s, strm.adler & 0xffff);
+      }
+      strm.adler = 1; // adler32(0L, Z_NULL, 0);
+    }
+  }
+
+//#ifdef GZIP
+  if (s.status === EXTRA_STATE) {
+    if (s.gzhead.extra/* != Z_NULL*/) {
+      beg = s.pending;  /* start of bytes to update crc */
+
+      while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {
+        if (s.pending === s.pending_buf_size) {
+          if (s.gzhead.hcrc && s.pending > beg) {
+            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
+          }
+          flush_pending(strm);
+          beg = s.pending;
+          if (s.pending === s.pending_buf_size) {
+            break;
+          }
+        }
+        put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);
+        s.gzindex++;
+      }
+      if (s.gzhead.hcrc && s.pending > beg) {
+        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
+      }
+      if (s.gzindex === s.gzhead.extra.length) {
+        s.gzindex = 0;
+        s.status = NAME_STATE;
+      }
+    }
+    else {
+      s.status = NAME_STATE;
+    }
+  }
+  if (s.status === NAME_STATE) {
+    if (s.gzhead.name/* != Z_NULL*/) {
+      beg = s.pending;  /* start of bytes to update crc */
+      //int val;
+
+      do {
+        if (s.pending === s.pending_buf_size) {
+          if (s.gzhead.hcrc && s.pending > beg) {
+            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
+          }
+          flush_pending(strm);
+          beg = s.pending;
+          if (s.pending === s.pending_buf_size) {
+            val = 1;
+            break;
+          }
+        }
+        // JS specific: little magic to add zero terminator to end of string
+        if (s.gzindex < s.gzhead.name.length) {
+          val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;
+        } else {
+          val = 0;
+        }
+        put_byte(s, val);
+      } while (val !== 0);
+
+      if (s.gzhead.hcrc && s.pending > beg){
+        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
+      }
+      if (val === 0) {
+        s.gzindex = 0;
+        s.status = COMMENT_STATE;
+      }
+    }
+    else {
+      s.status = COMMENT_STATE;
+    }
+  }
+  if (s.status === COMMENT_STATE) {
+    if (s.gzhead.comment/* != Z_NULL*/) {
+      beg = s.pending;  /* start of bytes to update crc */
+      //int val;
+
+      do {
+        if (s.pending === s.pending_buf_size) {
+          if (s.gzhead.hcrc && s.pending > beg) {
+            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
+          }
+          flush_pending(strm);
+          beg = s.pending;
+          if (s.pending === s.pending_buf_size) {
+            val = 1;
+            break;
+          }
+        }
+        // JS specific: little magic to add zero terminator to end of string
+        if (s.gzindex < s.gzhead.comment.length) {
+          val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;
+        } else {
+          val = 0;
+        }
+        put_byte(s, val);
+      } while (val !== 0);
+
+      if (s.gzhead.hcrc && s.pending > beg) {
+        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
+      }
+      if (val === 0) {
+        s.status = HCRC_STATE;
+      }
+    }
+    else {
+      s.status = HCRC_STATE;
+    }
+  }
+  if (s.status === HCRC_STATE) {
+    if (s.gzhead.hcrc) {
+      if (s.pending + 2 > s.pending_buf_size) {
+        flush_pending(strm);
+      }
+      if (s.pending + 2 <= s.pending_buf_size) {
+        put_byte(s, strm.adler & 0xff);
+        put_byte(s, (strm.adler >> 8) & 0xff);
+        strm.adler = 0; //crc32(0L, Z_NULL, 0);
+        s.status = BUSY_STATE;
+      }
+    }
+    else {
+      s.status = BUSY_STATE;
+    }
+  }
+//#endif
+
+  /* Flush as much pending output as possible */
+  if (s.pending !== 0) {
+    flush_pending(strm);
+    if (strm.avail_out === 0) {
+      /* Since avail_out is 0, deflate will be called again with
+       * more output space, but possibly with both pending and
+       * avail_in equal to zero. There won't be anything to do,
+       * but this is not an error situation so make sure we
+       * return OK instead of BUF_ERROR at next call of deflate:
+       */
+      s.last_flush = -1;
+      return Z_OK;
+    }
+
+    /* Make sure there is something to do and avoid duplicate consecutive
+     * flushes. For repeated and useless calls with Z_FINISH, we keep
+     * returning Z_STREAM_END instead of Z_BUF_ERROR.
+     */
+  } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&
+    flush !== Z_FINISH) {
+    return err(strm, Z_BUF_ERROR);
+  }
+
+  /* User must not provide more input after the first FINISH: */
+  if (s.status === FINISH_STATE && strm.avail_in !== 0) {
+    return err(strm, Z_BUF_ERROR);
+  }
+
+  /* Start a new block or continue the current one.
+   */
+  if (strm.avail_in !== 0 || s.lookahead !== 0 ||
+    (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {
+    var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :
+      (s.strategy === Z_RLE ? deflate_rle(s, flush) :
+        configuration_table[s.level].func(s, flush));
+
+    if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {
+      s.status = FINISH_STATE;
+    }
+    if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {
+      if (strm.avail_out === 0) {
+        s.last_flush = -1;
+        /* avoid BUF_ERROR next call, see above */
+      }
+      return Z_OK;
+      /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
+       * of deflate should use the same flush parameter to make sure
+       * that the flush is complete. So we don't have to output an
+       * empty block here, this will be done at next call. This also
+       * ensures that for a very small output buffer, we emit at most
+       * one empty block.
+       */
+    }
+    if (bstate === BS_BLOCK_DONE) {
+      if (flush === Z_PARTIAL_FLUSH) {
+        trees._tr_align(s);
+      }
+      else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */
+
+        trees._tr_stored_block(s, 0, 0, false);
+        /* For a full flush, this empty block will be recognized
+         * as a special marker by inflate_sync().
+         */
+        if (flush === Z_FULL_FLUSH) {
+          /*** CLEAR_HASH(s); ***/             /* forget history */
+          zero(s.head); // Fill with NIL (= 0);
+
+          if (s.lookahead === 0) {
+            s.strstart = 0;
+            s.block_start = 0;
+            s.insert = 0;
+          }
+        }
+      }
+      flush_pending(strm);
+      if (strm.avail_out === 0) {
+        s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */
+        return Z_OK;
+      }
+    }
+  }
+  //Assert(strm->avail_out > 0, "bug2");
+  //if (strm.avail_out <= 0) { throw new Error("bug2");}
+
+  if (flush !== Z_FINISH) { return Z_OK; }
+  if (s.wrap <= 0) { return Z_STREAM_END; }
+
+  /* Write the trailer */
+  if (s.wrap === 2) {
+    put_byte(s, strm.adler & 0xff);
+    put_byte(s, (strm.adler >> 8) & 0xff);
+    put_byte(s, (strm.adler >> 16) & 0xff);
+    put_byte(s, (strm.adler >> 24) & 0xff);
+    put_byte(s, strm.total_in & 0xff);
+    put_byte(s, (strm.total_in >> 8) & 0xff);
+    put_byte(s, (strm.total_in >> 16) & 0xff);
+    put_byte(s, (strm.total_in >> 24) & 0xff);
+  }
+  else
+  {
+    putShortMSB(s, strm.adler >>> 16);
+    putShortMSB(s, strm.adler & 0xffff);
+  }
+
+  flush_pending(strm);
+  /* If avail_out is zero, the application will call deflate again
+   * to flush the rest.
+   */
+  if (s.wrap > 0) { s.wrap = -s.wrap; }
+  /* write the trailer only once! */
+  return s.pending !== 0 ? Z_OK : Z_STREAM_END;
+}
+
+function deflateEnd(strm) {
+  var status;
+
+  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {
+    return Z_STREAM_ERROR;
+  }
+
+  status = strm.state.status;
+  if (status !== INIT_STATE &&
+    status !== EXTRA_STATE &&
+    status !== NAME_STATE &&
+    status !== COMMENT_STATE &&
+    status !== HCRC_STATE &&
+    status !== BUSY_STATE &&
+    status !== FINISH_STATE
+  ) {
+    return err(strm, Z_STREAM_ERROR);
+  }
+
+  strm.state = null;
+
+  return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;
+}
+
+/* =========================================================================
+ * Copy the source state to the destination state
+ */
+//function deflateCopy(dest, source) {
+//
+//}
+
+exports.deflateInit = deflateInit;
+exports.deflateInit2 = deflateInit2;
+exports.deflateReset = deflateReset;
+exports.deflateResetKeep = deflateResetKeep;
+exports.deflateSetHeader = deflateSetHeader;
+exports.deflate = deflate;
+exports.deflateEnd = deflateEnd;
+exports.deflateInfo = 'pako deflate (from Nodeca project)';
+
+/* Not implemented
+exports.deflateBound = deflateBound;
+exports.deflateCopy = deflateCopy;
+exports.deflateSetDictionary = deflateSetDictionary;
+exports.deflateParams = deflateParams;
+exports.deflatePending = deflatePending;
+exports.deflatePrime = deflatePrime;
+exports.deflateTune = deflateTune;
+*/
+},{"../utils/common":27,"./adler32":29,"./crc32":31,"./messages":37,"./trees":38}],33:[function(_dereq_,module,exports){
+'use strict';
+
+
+function GZheader() {
+  /* true if compressed data believed to be text */
+  this.text       = 0;
+  /* modification time */
+  this.time       = 0;
+  /* extra flags (not used when writing a gzip file) */
+  this.xflags     = 0;
+  /* operating system */
+  this.os         = 0;
+  /* pointer to extra field or Z_NULL if none */
+  this.extra      = null;
+  /* extra field length (valid if extra != Z_NULL) */
+  this.extra_len  = 0; // Actually, we don't need it in JS,
+                       // but leave for few code modifications
+
+  //
+  // Setup limits is not necessary because in js we should not preallocate memory
+  // for inflate use constant limit in 65536 bytes
+  //
+
+  /* space at extra (only when reading header) */
+  // this.extra_max  = 0;
+  /* pointer to zero-terminated file name or Z_NULL */
+  this.name       = '';
+  /* space at name (only when reading header) */
+  // this.name_max   = 0;
+  /* pointer to zero-terminated comment or Z_NULL */
+  this.comment    = '';
+  /* space at comment (only when reading header) */
+  // this.comm_max   = 0;
+  /* true if there was or will be a header crc */
+  this.hcrc       = 0;
+  /* true when done reading gzip header (not used when writing a gzip file) */
+  this.done       = false;
+}
+
+module.exports = GZheader;
+},{}],34:[function(_dereq_,module,exports){
+'use strict';
+
+// See state defs from inflate.js
+var BAD = 30;       /* got a data error -- remain here until reset */
+var TYPE = 12;      /* i: waiting for type bits, including last-flag bit */
+
+/*
+   Decode literal, length, and distance codes and write out the resulting
+   literal and match bytes until either not enough input or output is
+   available, an end-of-block is encountered, or a data error is encountered.
+   When large enough input and output buffers are supplied to inflate(), for
+   example, a 16K input buffer and a 64K output buffer, more than 95% of the
+   inflate execution time is spent in this routine.
+
+   Entry assumptions:
+
+        state.mode === LEN
+        strm.avail_in >= 6
+        strm.avail_out >= 258
+        start >= strm.avail_out
+        state.bits < 8
+
+   On return, state.mode is one of:
+
+        LEN -- ran out of enough output space or enough available input
+        TYPE -- reached end of block code, inflate() to interpret next block
+        BAD -- error in block data
+
+   Notes:
+
+    - The maximum input bits used by a length/distance pair is 15 bits for the
+      length code, 5 bits for the length extra, 15 bits for the distance code,
+      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.
+      Therefore if strm.avail_in >= 6, then there is enough input to avoid
+      checking for available input while decoding.
+
+    - The maximum bytes that a single length/distance pair can output is 258
+      bytes, which is the maximum length that can be coded.  inflate_fast()
+      requires strm.avail_out >= 258 for each loop to avoid checking for
+      output space.
+ */
+module.exports = function inflate_fast(strm, start) {
+  var state;
+  var _in;                    /* local strm.input */
+  var last;                   /* have enough input while in < last */
+  var _out;                   /* local strm.output */
+  var beg;                    /* inflate()'s initial strm.output */
+  var end;                    /* while out < end, enough space available */
+//#ifdef INFLATE_STRICT
+  var dmax;                   /* maximum distance from zlib header */
+//#endif
+  var wsize;                  /* window size or zero if not using window */
+  var whave;                  /* valid bytes in the window */
+  var wnext;                  /* window write index */
+  var window;                 /* allocated sliding window, if wsize != 0 */
+  var hold;                   /* local strm.hold */
+  var bits;                   /* local strm.bits */
+  var lcode;                  /* local strm.lencode */
+  var dcode;                  /* local strm.distcode */
+  var lmask;                  /* mask for first level of length codes */
+  var dmask;                  /* mask for first level of distance codes */
+  var here;                   /* retrieved table entry */
+  var op;                     /* code bits, operation, extra bits, or */
+                              /*  window position, window bytes to copy */
+  var len;                    /* match length, unused bytes */
+  var dist;                   /* match distance */
+  var from;                   /* where to copy match from */
+  var from_source;
+
+
+  var input, output; // JS specific, because we have no pointers
+
+  /* copy state to local variables */
+  state = strm.state;
+  //here = state.here;
+  _in = strm.next_in;
+  input = strm.input;
+  last = _in + (strm.avail_in - 5);
+  _out = strm.next_out;
+  output = strm.output;
+  beg = _out - (start - strm.avail_out);
+  end = _out + (strm.avail_out - 257);
+//#ifdef INFLATE_STRICT
+  dmax = state.dmax;
+//#endif
+  wsize = state.wsize;
+  whave = state.whave;
+  wnext = state.wnext;
+  window = state.window;
+  hold = state.hold;
+  bits = state.bits;
+  lcode = state.lencode;
+  dcode = state.distcode;
+  lmask = (1 << state.lenbits) - 1;
+  dmask = (1 << state.distbits) - 1;
+
+
+  /* decode literals and length/distances until end-of-block or not enough
+     input data or output space */
+
+  top:
+  do {
+    if (bits < 15) {
+      hold += input[_in++] << bits;
+      bits += 8;
+      hold += input[_in++] << bits;
+      bits += 8;
+    }
+
+    here = lcode[hold & lmask];
+
+    dolen:
+    for (;;) { // Goto emulation
+      op = here >>> 24/*here.bits*/;
+      hold >>>= op;
+      bits -= op;
+      op = (here >>> 16) & 0xff/*here.op*/;
+      if (op === 0) {                          /* literal */
+        //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
+        //        "inflate:         literal '%c'\n" :
+        //        "inflate:         literal 0x%02x\n", here.val));
+        output[_out++] = here & 0xffff/*here.val*/;
+      }
+      else if (op & 16) {                     /* length base */
+        len = here & 0xffff/*here.val*/;
+        op &= 15;                           /* number of extra bits */
+        if (op) {
+          if (bits < op) {
+            hold += input[_in++] << bits;
+            bits += 8;
+          }
+          len += hold & ((1 << op) - 1);
+          hold >>>= op;
+          bits -= op;
+        }
+        //Tracevv((stderr, "inflate:         length %u\n", len));
+        if (bits < 15) {
+          hold += input[_in++] << bits;
+          bits += 8;
+          hold += input[_in++] << bits;
+          bits += 8;
+        }
+        here = dcode[hold & dmask];
+
+        dodist:
+        for (;;) { // goto emulation
+          op = here >>> 24/*here.bits*/;
+          hold >>>= op;
+          bits -= op;
+          op = (here >>> 16) & 0xff/*here.op*/;
+
+          if (op & 16) {                      /* distance base */
+            dist = here & 0xffff/*here.val*/;
+            op &= 15;                       /* number of extra bits */
+            if (bits < op) {
+              hold += input[_in++] << bits;
+              bits += 8;
+              if (bits < op) {
+                hold += input[_in++] << bits;
+                bits += 8;
+              }
+            }
+            dist += hold & ((1 << op) - 1);
+//#ifdef INFLATE_STRICT
+            if (dist > dmax) {
+              strm.msg = 'invalid distance too far back';
+              state.mode = BAD;
+              break top;
+            }
+//#endif
+            hold >>>= op;
+            bits -= op;
+            //Tracevv((stderr, "inflate:         distance %u\n", dist));
+            op = _out - beg;                /* max distance in output */
+            if (dist > op) {                /* see if copy from window */
+              op = dist - op;               /* distance back in window */
+              if (op > whave) {
+                if (state.sane) {
+                  strm.msg = 'invalid distance too far back';
+                  state.mode = BAD;
+                  break top;
+                }
+
+// (!) This block is disabled in zlib defailts,
+// don't enable it for binary compatibility
+//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+//                if (len <= op - whave) {
+//                  do {
+//                    output[_out++] = 0;
+//                  } while (--len);
+//                  continue top;
+//                }
+//                len -= op - whave;
+//                do {
+//                  output[_out++] = 0;
+//                } while (--op > whave);
+//                if (op === 0) {
+//                  from = _out - dist;
+//                  do {
+//                    output[_out++] = output[from++];
+//                  } while (--len);
+//                  continue top;
+//                }
+//#endif
+              }
+              from = 0; // window index
+              from_source = window;
+              if (wnext === 0) {           /* very common case */
+                from += wsize - op;
+                if (op < len) {         /* some from window */
+                  len -= op;
+                  do {
+                    output[_out++] = window[from++];
+                  } while (--op);
+                  from = _out - dist;  /* rest from output */
+                  from_source = output;
+                }
+              }
+              else if (wnext < op) {      /* wrap around window */
+                from += wsize + wnext - op;
+                op -= wnext;
+                if (op < len) {         /* some from end of window */
+                  len -= op;
+                  do {
+                    output[_out++] = window[from++];
+                  } while (--op);
+                  from = 0;
+                  if (wnext < len) {  /* some from start of window */
+                    op = wnext;
+                    len -= op;
+                    do {
+                      output[_out++] = window[from++];
+                    } while (--op);
+                    from = _out - dist;      /* rest from output */
+                    from_source = output;
+                  }
+                }
+              }
+              else {                      /* contiguous in window */
+                from += wnext - op;
+                if (op < len) {         /* some from window */
+                  len -= op;
+                  do {
+                    output[_out++] = window[from++];
+                  } while (--op);
+                  from = _out - dist;  /* rest from output */
+                  from_source = output;
+                }
+              }
+              while (len > 2) {
+                output[_out++] = from_source[from++];
+                output[_out++] = from_source[from++];
+                output[_out++] = from_source[from++];
+                len -= 3;
+              }
+              if (len) {
+                output[_out++] = from_source[from++];
+                if (len > 1) {
+                  output[_out++] = from_source[from++];
+                }
+              }
+            }
+            else {
+              from = _out - dist;          /* copy direct from output */
+              do {                        /* minimum length is three */
+                output[_out++] = output[from++];
+                output[_out++] = output[from++];
+                output[_out++] = output[from++];
+                len -= 3;
+              } while (len > 2);
+              if (len) {
+                output[_out++] = output[from++];
+                if (len > 1) {
+                  output[_out++] = output[from++];
+                }
+              }
+            }
+          }
+          else if ((op & 64) === 0) {          /* 2nd level distance code */
+            here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
+            continue dodist;
+          }
+          else {
+            strm.msg = 'invalid distance code';
+            state.mode = BAD;
+            break top;
+          }
+
+          break; // need to emulate goto via "continue"
+        }
+      }
+      else if ((op & 64) === 0) {              /* 2nd level length code */
+        here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
+        continue dolen;
+      }
+      else if (op & 32) {                     /* end-of-block */
+        //Tracevv((stderr, "inflate:         end of block\n"));
+        state.mode = TYPE;
+        break top;
+      }
+      else {
+        strm.msg = 'invalid literal/length code';
+        state.mode = BAD;
+        break top;
+      }
+
+      break; // need to emulate goto via "continue"
+    }
+  } while (_in < last && _out < end);
+
+  /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
+  len = bits >> 3;
+  _in -= len;
+  bits -= len << 3;
+  hold &= (1 << bits) - 1;
+
+  /* update state and return */
+  strm.next_in = _in;
+  strm.next_out = _out;
+  strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));
+  strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));
+  state.hold = hold;
+  state.bits = bits;
+  return;
+};
+
+},{}],35:[function(_dereq_,module,exports){
+'use strict';
+
+
+var utils = _dereq_('../utils/common');
+var adler32 = _dereq_('./adler32');
+var crc32   = _dereq_('./crc32');
+var inflate_fast = _dereq_('./inffast');
+var inflate_table = _dereq_('./inftrees');
+
+var CODES = 0;
+var LENS = 1;
+var DISTS = 2;
+
+/* Public constants ==========================================================*/
+/* ===========================================================================*/
+
+
+/* Allowed flush values; see deflate() and inflate() below for details */
+//var Z_NO_FLUSH      = 0;
+//var Z_PARTIAL_FLUSH = 1;
+//var Z_SYNC_FLUSH    = 2;
+//var Z_FULL_FLUSH    = 3;
+var Z_FINISH        = 4;
+var Z_BLOCK         = 5;
+var Z_TREES         = 6;
+
+
+/* Return codes for the compression/decompression functions. Negative values
+ * are errors, positive values are used for special but normal events.
+ */
+var Z_OK            = 0;
+var Z_STREAM_END    = 1;
+var Z_NEED_DICT     = 2;
+//var Z_ERRNO         = -1;
+var Z_STREAM_ERROR  = -2;
+var Z_DATA_ERROR    = -3;
+var Z_MEM_ERROR     = -4;
+var Z_BUF_ERROR     = -5;
+//var Z_VERSION_ERROR = -6;
+
+/* The deflate compression method */
+var Z_DEFLATED  = 8;
+
+
+/* STATES ====================================================================*/
+/* ===========================================================================*/
+
+
+var    HEAD = 1;       /* i: waiting for magic header */
+var    FLAGS = 2;      /* i: waiting for method and flags (gzip) */
+var    TIME = 3;       /* i: waiting for modification time (gzip) */
+var    OS = 4;         /* i: waiting for extra flags and operating system (gzip) */
+var    EXLEN = 5;      /* i: waiting for extra length (gzip) */
+var    EXTRA = 6;      /* i: waiting for extra bytes (gzip) */
+var    NAME = 7;       /* i: waiting for end of file name (gzip) */
+var    COMMENT = 8;    /* i: waiting for end of comment (gzip) */
+var    HCRC = 9;       /* i: waiting for header crc (gzip) */
+var    DICTID = 10;    /* i: waiting for dictionary check value */
+var    DICT = 11;      /* waiting for inflateSetDictionary() call */
+var        TYPE = 12;      /* i: waiting for type bits, including last-flag bit */
+var        TYPEDO = 13;    /* i: same, but skip check to exit inflate on new block */
+var        STORED = 14;    /* i: waiting for stored size (length and complement) */
+var        COPY_ = 15;     /* i/o: same as COPY below, but only first time in */
+var        COPY = 16;      /* i/o: waiting for input or output to copy stored block */
+var        TABLE = 17;     /* i: waiting for dynamic block table lengths */
+var        LENLENS = 18;   /* i: waiting for code length code lengths */
+var        CODELENS = 19;  /* i: waiting for length/lit and distance code lengths */
+var            LEN_ = 20;      /* i: same as LEN below, but only first time in */
+var            LEN = 21;       /* i: waiting for length/lit/eob code */
+var            LENEXT = 22;    /* i: waiting for length extra bits */
+var            DIST = 23;      /* i: waiting for distance code */
+var            DISTEXT = 24;   /* i: waiting for distance extra bits */
+var            MATCH = 25;     /* o: waiting for output space to copy string */
+var            LIT = 26;       /* o: waiting for output space to write literal */
+var    CHECK = 27;     /* i: waiting for 32-bit check value */
+var    LENGTH = 28;    /* i: waiting for 32-bit length (gzip) */
+var    DONE = 29;      /* finished check, done -- remain here until reset */
+var    BAD = 30;       /* got a data error -- remain here until reset */
+var    MEM = 31;       /* got an inflate() memory error -- remain here until reset */
+var    SYNC = 32;      /* looking for synchronization bytes to restart inflate() */
+
+/* ===========================================================================*/
+
+
+
+var ENOUGH_LENS = 852;
+var ENOUGH_DISTS = 592;
+//var ENOUGH =  (ENOUGH_LENS+ENOUGH_DISTS);
+
+var MAX_WBITS = 15;
+/* 32K LZ77 window */
+var DEF_WBITS = MAX_WBITS;
+
+
+function ZSWAP32(q) {
+  return  (((q >>> 24) & 0xff) +
+          ((q >>> 8) & 0xff00) +
+          ((q & 0xff00) << 8) +
+          ((q & 0xff) << 24));
+}
+
+
+function InflateState() {
+  this.mode = 0;             /* current inflate mode */
+  this.last = false;          /* true if processing last block */
+  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */
+  this.havedict = false;      /* true if dictionary provided */
+  this.flags = 0;             /* gzip header method and flags (0 if zlib) */
+  this.dmax = 0;              /* zlib header max distance (INFLATE_STRICT) */
+  this.check = 0;             /* protected copy of check value */
+  this.total = 0;             /* protected copy of output count */
+  // TODO: may be {}
+  this.head = null;           /* where to save gzip header information */
+
+  /* sliding window */
+  this.wbits = 0;             /* log base 2 of requested window size */
+  this.wsize = 0;             /* window size or zero if not using window */
+  this.whave = 0;             /* valid bytes in the window */
+  this.wnext = 0;             /* window write index */
+  this.window = null;         /* allocated sliding window, if needed */
+
+  /* bit accumulator */
+  this.hold = 0;              /* input bit accumulator */
+  this.bits = 0;              /* number of bits in "in" */
+
+  /* for string and stored block copying */
+  this.length = 0;            /* literal or length of data to copy */
+  this.offset = 0;            /* distance back to copy string from */
+
+  /* for table and code decoding */
+  this.extra = 0;             /* extra bits needed */
+
+  /* fixed and dynamic code tables */
+  this.lencode = null;          /* starting table for length/literal codes */
+  this.distcode = null;         /* starting table for distance codes */
+  this.lenbits = 0;           /* index bits for lencode */
+  this.distbits = 0;          /* index bits for distcode */
+
+  /* dynamic table building */
+  this.ncode = 0;             /* number of code length code lengths */
+  this.nlen = 0;              /* number of length code lengths */
+  this.ndist = 0;             /* number of distance code lengths */
+  this.have = 0;              /* number of code lengths in lens[] */
+  this.next = null;              /* next available space in codes[] */
+
+  this.lens = new utils.Buf16(320); /* temporary storage for code lengths */
+  this.work = new utils.Buf16(288); /* work area for code table building */
+
+  /*
+   because we don't have pointers in js, we use lencode and distcode directly
+   as buffers so we don't need codes
+  */
+  //this.codes = new utils.Buf32(ENOUGH);       /* space for code tables */
+  this.lendyn = null;              /* dynamic table for length/literal codes (JS specific) */
+  this.distdyn = null;             /* dynamic table for distance codes (JS specific) */
+  this.sane = 0;                   /* if false, allow invalid distance too far */
+  this.back = 0;                   /* bits back of last unprocessed length/lit */
+  this.was = 0;                    /* initial length of match */
+}
+
+function inflateResetKeep(strm) {
+  var state;
+
+  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
+  state = strm.state;
+  strm.total_in = strm.total_out = state.total = 0;
+  strm.msg = ''; /*Z_NULL*/
+  if (state.wrap) {       /* to support ill-conceived Java test suite */
+    strm.adler = state.wrap & 1;
+  }
+  state.mode = HEAD;
+  state.last = 0;
+  state.havedict = 0;
+  state.dmax = 32768;
+  state.head = null/*Z_NULL*/;
+  state.hold = 0;
+  state.bits = 0;
+  //state.lencode = state.distcode = state.next = state.codes;
+  state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);
+  state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);
+
+  state.sane = 1;
+  state.back = -1;
+  //Tracev((stderr, "inflate: reset\n"));
+  return Z_OK;
+}
+
+function inflateReset(strm) {
+  var state;
+
+  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
+  state = strm.state;
+  state.wsize = 0;
+  state.whave = 0;
+  state.wnext = 0;
+  return inflateResetKeep(strm);
+
+}
+
+function inflateReset2(strm, windowBits) {
+  var wrap;
+  var state;
+
+  /* get the state */
+  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
+  state = strm.state;
+
+  /* extract wrap request from windowBits parameter */
+  if (windowBits < 0) {
+    wrap = 0;
+    windowBits = -windowBits;
+  }
+  else {
+    wrap = (windowBits >> 4) + 1;
+    if (windowBits < 48) {
+      windowBits &= 15;
+    }
+  }
+
+  /* set number of window bits, free window if different */
+  if (windowBits && (windowBits < 8 || windowBits > 15)) {
+    return Z_STREAM_ERROR;
+  }
+  if (state.window !== null && state.wbits !== windowBits) {
+    state.window = null;
+  }
+
+  /* update state and reset the rest of it */
+  state.wrap = wrap;
+  state.wbits = windowBits;
+  return inflateReset(strm);
+}
+
+function inflateInit2(strm, windowBits) {
+  var ret;
+  var state;
+
+  if (!strm) { return Z_STREAM_ERROR; }
+  //strm.msg = Z_NULL;                 /* in case we return an error */
+
+  state = new InflateState();
+
+  //if (state === Z_NULL) return Z_MEM_ERROR;
+  //Tracev((stderr, "inflate: allocated\n"));
+  strm.state = state;
+  state.window = null/*Z_NULL*/;
+  ret = inflateReset2(strm, windowBits);
+  if (ret !== Z_OK) {
+    strm.state = null/*Z_NULL*/;
+  }
+  return ret;
+}
+
+function inflateInit(strm) {
+  return inflateInit2(strm, DEF_WBITS);
+}
+
+
+/*
+ Return state with length and distance decoding tables and index sizes set to
+ fixed code decoding.  Normally this returns fixed tables from inffixed.h.
+ If BUILDFIXED is defined, then instead this routine builds the tables the
+ first time it's called, and returns those tables the first time and
+ thereafter.  This reduces the size of the code by about 2K bytes, in
+ exchange for a little execution time.  However, BUILDFIXED should not be
+ used for threaded applications, since the rewriting of the tables and virgin
+ may not be thread-safe.
+ */
+var virgin = true;
+
+var lenfix, distfix; // We have no pointers in JS, so keep tables separate
+
+function fixedtables(state) {
+  /* build fixed huffman tables if first call (may not be thread safe) */
+  if (virgin) {
+    var sym;
+
+    lenfix = new utils.Buf32(512);
+    distfix = new utils.Buf32(32);
+
+    /* literal/length table */
+    sym = 0;
+    while (sym < 144) { state.lens[sym++] = 8; }
+    while (sym < 256) { state.lens[sym++] = 9; }
+    while (sym < 280) { state.lens[sym++] = 7; }
+    while (sym < 288) { state.lens[sym++] = 8; }
+
+    inflate_table(LENS,  state.lens, 0, 288, lenfix,   0, state.work, {bits: 9});
+
+    /* distance table */
+    sym = 0;
+    while (sym < 32) { state.lens[sym++] = 5; }
+
+    inflate_table(DISTS, state.lens, 0, 32,   distfix, 0, state.work, {bits: 5});
+
+    /* do this just once */
+    virgin = false;
+  }
+
+  state.lencode = lenfix;
+  state.lenbits = 9;
+  state.distcode = distfix;
+  state.distbits = 5;
+}
+
+
+/*
+ Update the window with the last wsize (normally 32K) bytes written before
+ returning.  If window does not exist yet, create it.  This is only called
+ when a window is already in use, or when output has been written during this
+ inflate call, but the end of the deflate stream has not been reached yet.
+ It is also called to create a window for dictionary data when a dictionary
+ is loaded.
+
+ Providing output buffers larger than 32K to inflate() should provide a speed
+ advantage, since only the last 32K of output is copied to the sliding window
+ upon return from inflate(), and since all distances after the first 32K of
+ output will fall in the output data, making match copies simpler and faster.
+ The advantage may be dependent on the size of the processor's data caches.
+ */
+function updatewindow(strm, src, end, copy) {
+  var dist;
+  var state = strm.state;
+
+  /* if it hasn't been done already, allocate space for the window */
+  if (state.window === null) {
+    state.wsize = 1 << state.wbits;
+    state.wnext = 0;
+    state.whave = 0;
+
+    state.window = new utils.Buf8(state.wsize);
+  }
+
+  /* copy state->wsize or less output bytes into the circular window */
+  if (copy >= state.wsize) {
+    utils.arraySet(state.window,src, end - state.wsize, state.wsize, 0);
+    state.wnext = 0;
+    state.whave = state.wsize;
+  }
+  else {
+    dist = state.wsize - state.wnext;
+    if (dist > copy) {
+      dist = copy;
+    }
+    //zmemcpy(state->window + state->wnext, end - copy, dist);
+    utils.arraySet(state.window,src, end - copy, dist, state.wnext);
+    copy -= dist;
+    if (copy) {
+      //zmemcpy(state->window, end - copy, copy);
+      utils.arraySet(state.window,src, end - copy, copy, 0);
+      state.wnext = copy;
+      state.whave = state.wsize;
+    }
+    else {
+      state.wnext += dist;
+      if (state.wnext === state.wsize) { state.wnext = 0; }
+      if (state.whave < state.wsize) { state.whave += dist; }
+    }
+  }
+  return 0;
+}
+
+function inflate(strm, flush) {
+  var state;
+  var input, output;          // input/output buffers
+  var next;                   /* next input INDEX */
+  var put;                    /* next output INDEX */
+  var have, left;             /* available input and output */
+  var hold;                   /* bit buffer */
+  var bits;                   /* bits in bit buffer */
+  var _in, _out;              /* save starting available input and output */
+  var copy;                   /* number of stored or match bytes to copy */
+  var from;                   /* where to copy match bytes from */
+  var from_source;
+  var here = 0;               /* current decoding table entry */
+  var here_bits, here_op, here_val; // paked "here" denormalized (JS specific)
+  //var last;                   /* parent table entry */
+  var last_bits, last_op, last_val; // paked "last" denormalized (JS specific)
+  var len;                    /* length to copy for repeats, bits to drop */
+  var ret;                    /* return code */
+  var hbuf = new utils.Buf8(4);    /* buffer for gzip header crc calculation */
+  var opts;
+
+  var n; // temporary var for NEED_BITS
+
+  var order = /* permutation of code lengths */
+    [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
+
+
+  if (!strm || !strm.state || !strm.output ||
+      (!strm.input && strm.avail_in !== 0)) {
+    return Z_STREAM_ERROR;
+  }
+
+  state = strm.state;
+  if (state.mode === TYPE) { state.mode = TYPEDO; }    /* skip check */
+
+
+  //--- LOAD() ---
+  put = strm.next_out;
+  output = strm.output;
+  left = strm.avail_out;
+  next = strm.next_in;
+  input = strm.input;
+  have = strm.avail_in;
+  hold = state.hold;
+  bits = state.bits;
+  //---
+
+  _in = have;
+  _out = left;
+  ret = Z_OK;
+
+  inf_leave: // goto emulation
+  for (;;) {
+    switch (state.mode) {
+    case HEAD:
+      if (state.wrap === 0) {
+        state.mode = TYPEDO;
+        break;
+      }
+      //=== NEEDBITS(16);
+      while (bits < 16) {
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+      }
+      //===//
+      if ((state.wrap & 2) && hold === 0x8b1f) {  /* gzip header */
+        state.check = 0/*crc32(0L, Z_NULL, 0)*/;
+        //=== CRC2(state.check, hold);
+        hbuf[0] = hold & 0xff;
+        hbuf[1] = (hold >>> 8) & 0xff;
+        state.check = crc32(state.check, hbuf, 2, 0);
+        //===//
+
+        //=== INITBITS();
+        hold = 0;
+        bits = 0;
+        //===//
+        state.mode = FLAGS;
+        break;
+      }
+      state.flags = 0;           /* expect zlib header */
+      if (state.head) {
+        state.head.done = false;
+      }
+      if (!(state.wrap & 1) ||   /* check if zlib header allowed */
+        (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {
+        strm.msg = 'incorrect header check';
+        state.mode = BAD;
+        break;
+      }
+      if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {
+        strm.msg = 'unknown compression method';
+        state.mode = BAD;
+        break;
+      }
+      //--- DROPBITS(4) ---//
+      hold >>>= 4;
+      bits -= 4;
+      //---//
+      len = (hold & 0x0f)/*BITS(4)*/ + 8;
+      if (state.wbits === 0) {
+        state.wbits = len;
+      }
+      else if (len > state.wbits) {
+        strm.msg = 'invalid window size';
+        state.mode = BAD;
+        break;
+      }
+      state.dmax = 1 << len;
+      //Tracev((stderr, "inflate:   zlib header ok\n"));
+      strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
+      state.mode = hold & 0x200 ? DICTID : TYPE;
+      //=== INITBITS();
+      hold = 0;
+      bits = 0;
+      //===//
+      break;
+    case FLAGS:
+      //=== NEEDBITS(16); */
+      while (bits < 16) {
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+      }
+      //===//
+      state.flags = hold;
+      if ((state.flags & 0xff) !== Z_DEFLATED) {
+        strm.msg = 'unknown compression method';
+        state.mode = BAD;
+        break;
+      }
+      if (state.flags & 0xe000) {
+        strm.msg = 'unknown header flags set';
+        state.mode = BAD;
+        break;
+      }
+      if (state.head) {
+        state.head.text = ((hold >> 8) & 1);
+      }
+      if (state.flags & 0x0200) {
+        //=== CRC2(state.check, hold);
+        hbuf[0] = hold & 0xff;
+        hbuf[1] = (hold >>> 8) & 0xff;
+        state.check = crc32(state.check, hbuf, 2, 0);
+        //===//
+      }
+      //=== INITBITS();
+      hold = 0;
+      bits = 0;
+      //===//
+      state.mode = TIME;
+      /* falls through */
+    case TIME:
+      //=== NEEDBITS(32); */
+      while (bits < 32) {
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+      }
+      //===//
+      if (state.head) {
+        state.head.time = hold;
+      }
+      if (state.flags & 0x0200) {
+        //=== CRC4(state.check, hold)
+        hbuf[0] = hold & 0xff;
+        hbuf[1] = (hold >>> 8) & 0xff;
+        hbuf[2] = (hold >>> 16) & 0xff;
+        hbuf[3] = (hold >>> 24) & 0xff;
+        state.check = crc32(state.check, hbuf, 4, 0);
+        //===
+      }
+      //=== INITBITS();
+      hold = 0;
+      bits = 0;
+      //===//
+      state.mode = OS;
+      /* falls through */
+    case OS:
+      //=== NEEDBITS(16); */
+      while (bits < 16) {
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+      }
+      //===//
+      if (state.head) {
+        state.head.xflags = (hold & 0xff);
+        state.head.os = (hold >> 8);
+      }
+      if (state.flags & 0x0200) {
+        //=== CRC2(state.check, hold);
+        hbuf[0] = hold & 0xff;
+        hbuf[1] = (hold >>> 8) & 0xff;
+        state.check = crc32(state.check, hbuf, 2, 0);
+        //===//
+      }
+      //=== INITBITS();
+      hold = 0;
+      bits = 0;
+      //===//
+      state.mode = EXLEN;
+      /* falls through */
+    case EXLEN:
+      if (state.flags & 0x0400) {
+        //=== NEEDBITS(16); */
+        while (bits < 16) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        state.length = hold;
+        if (state.head) {
+          state.head.extra_len = hold;
+        }
+        if (state.flags & 0x0200) {
+          //=== CRC2(state.check, hold);
+          hbuf[0] = hold & 0xff;
+          hbuf[1] = (hold >>> 8) & 0xff;
+          state.check = crc32(state.check, hbuf, 2, 0);
+          //===//
+        }
+        //=== INITBITS();
+        hold = 0;
+        bits = 0;
+        //===//
+      }
+      else if (state.head) {
+        state.head.extra = null/*Z_NULL*/;
+      }
+      state.mode = EXTRA;
+      /* falls through */
+    case EXTRA:
+      if (state.flags & 0x0400) {
+        copy = state.length;
+        if (copy > have) { copy = have; }
+        if (copy) {
+          if (state.head) {
+            len = state.head.extra_len - state.length;
+            if (!state.head.extra) {
+              // Use untyped array for more conveniend processing later
+              state.head.extra = new Array(state.head.extra_len);
+            }
+            utils.arraySet(
+              state.head.extra,
+              input,
+              next,
+              // extra field is limited to 65536 bytes
+              // - no need for additional size check
+              copy,
+              /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
+              len
+            );
+            //zmemcpy(state.head.extra + len, next,
+            //        len + copy > state.head.extra_max ?
+            //        state.head.extra_max - len : copy);
+          }
+          if (state.flags & 0x0200) {
+            state.check = crc32(state.check, input, copy, next);
+          }
+          have -= copy;
+          next += copy;
+          state.length -= copy;
+        }
+        if (state.length) { break inf_leave; }
+      }
+      state.length = 0;
+      state.mode = NAME;
+      /* falls through */
+    case NAME:
+      if (state.flags & 0x0800) {
+        if (have === 0) { break inf_leave; }
+        copy = 0;
+        do {
+          // TODO: 2 or 1 bytes?
+          len = input[next + copy++];
+          /* use constant limit because in js we should not preallocate memory */
+          if (state.head && len &&
+              (state.length < 65536 /*state.head.name_max*/)) {
+            state.head.name += String.fromCharCode(len);
+          }
+        } while (len && copy < have);
+
+        if (state.flags & 0x0200) {
+          state.check = crc32(state.check, input, copy, next);
+        }
+        have -= copy;
+        next += copy;
+        if (len) { break inf_leave; }
+      }
+      else if (state.head) {
+        state.head.name = null;
+      }
+      state.length = 0;
+      state.mode = COMMENT;
+      /* falls through */
+    case COMMENT:
+      if (state.flags & 0x1000) {
+        if (have === 0) { break inf_leave; }
+        copy = 0;
+        do {
+          len = input[next + copy++];
+          /* use constant limit because in js we should not preallocate memory */
+          if (state.head && len &&
+              (state.length < 65536 /*state.head.comm_max*/)) {
+            state.head.comment += String.fromCharCode(len);
+          }
+        } while (len && copy < have);
+        if (state.flags & 0x0200) {
+          state.check = crc32(state.check, input, copy, next);
+        }
+        have -= copy;
+        next += copy;
+        if (len) { break inf_leave; }
+      }
+      else if (state.head) {
+        state.head.comment = null;
+      }
+      state.mode = HCRC;
+      /* falls through */
+    case HCRC:
+      if (state.flags & 0x0200) {
+        //=== NEEDBITS(16); */
+        while (bits < 16) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        if (hold !== (state.check & 0xffff)) {
+          strm.msg = 'header crc mismatch';
+          state.mode = BAD;
+          break;
+        }
+        //=== INITBITS();
+        hold = 0;
+        bits = 0;
+        //===//
+      }
+      if (state.head) {
+        state.head.hcrc = ((state.flags >> 9) & 1);
+        state.head.done = true;
+      }
+      strm.adler = state.check = 0 /*crc32(0L, Z_NULL, 0)*/;
+      state.mode = TYPE;
+      break;
+    case DICTID:
+      //=== NEEDBITS(32); */
+      while (bits < 32) {
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+      }
+      //===//
+      strm.adler = state.check = ZSWAP32(hold);
+      //=== INITBITS();
+      hold = 0;
+      bits = 0;
+      //===//
+      state.mode = DICT;
+      /* falls through */
+    case DICT:
+      if (state.havedict === 0) {
+        //--- RESTORE() ---
+        strm.next_out = put;
+        strm.avail_out = left;
+        strm.next_in = next;
+        strm.avail_in = have;
+        state.hold = hold;
+        state.bits = bits;
+        //---
+        return Z_NEED_DICT;
+      }
+      strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
+      state.mode = TYPE;
+      /* falls through */
+    case TYPE:
+      if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }
+      /* falls through */
+    case TYPEDO:
+      if (state.last) {
+        //--- BYTEBITS() ---//
+        hold >>>= bits & 7;
+        bits -= bits & 7;
+        //---//
+        state.mode = CHECK;
+        break;
+      }
+      //=== NEEDBITS(3); */
+      while (bits < 3) {
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+      }
+      //===//
+      state.last = (hold & 0x01)/*BITS(1)*/;
+      //--- DROPBITS(1) ---//
+      hold >>>= 1;
+      bits -= 1;
+      //---//
+
+      switch ((hold & 0x03)/*BITS(2)*/) {
+      case 0:                             /* stored block */
+        //Tracev((stderr, "inflate:     stored block%s\n",
+        //        state.last ? " (last)" : ""));
+        state.mode = STORED;
+        break;
+      case 1:                             /* fixed block */
+        fixedtables(state);
+        //Tracev((stderr, "inflate:     fixed codes block%s\n",
+        //        state.last ? " (last)" : ""));
+        state.mode = LEN_;             /* decode codes */
+        if (flush === Z_TREES) {
+          //--- DROPBITS(2) ---//
+          hold >>>= 2;
+          bits -= 2;
+          //---//
+          break inf_leave;
+        }
+        break;
+      case 2:                             /* dynamic block */
+        //Tracev((stderr, "inflate:     dynamic codes block%s\n",
+        //        state.last ? " (last)" : ""));
+        state.mode = TABLE;
+        break;
+      case 3:
+        strm.msg = 'invalid block type';
+        state.mode = BAD;
+      }
+      //--- DROPBITS(2) ---//
+      hold >>>= 2;
+      bits -= 2;
+      //---//
+      break;
+    case STORED:
+      //--- BYTEBITS() ---// /* go to byte boundary */
+      hold >>>= bits & 7;
+      bits -= bits & 7;
+      //---//
+      //=== NEEDBITS(32); */
+      while (bits < 32) {
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+      }
+      //===//
+      if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {
+        strm.msg = 'invalid stored block lengths';
+        state.mode = BAD;
+        break;
+      }
+      state.length = hold & 0xffff;
+      //Tracev((stderr, "inflate:       stored length %u\n",
+      //        state.length));
+      //=== INITBITS();
+      hold = 0;
+      bits = 0;
+      //===//
+      state.mode = COPY_;
+      if (flush === Z_TREES) { break inf_leave; }
+      /* falls through */
+    case COPY_:
+      state.mode = COPY;
+      /* falls through */
+    case COPY:
+      copy = state.length;
+      if (copy) {
+        if (copy > have) { copy = have; }
+        if (copy > left) { copy = left; }
+        if (copy === 0) { break inf_leave; }
+        //--- zmemcpy(put, next, copy); ---
+        utils.arraySet(output, input, next, copy, put);
+        //---//
+        have -= copy;
+        next += copy;
+        left -= copy;
+        put += copy;
+        state.length -= copy;
+        break;
+      }
+      //Tracev((stderr, "inflate:       stored end\n"));
+      state.mode = TYPE;
+      break;
+    case TABLE:
+      //=== NEEDBITS(14); */
+      while (bits < 14) {
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+      }
+      //===//
+      state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;
+      //--- DROPBITS(5) ---//
+      hold >>>= 5;
+      bits -= 5;
+      //---//
+      state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;
+      //--- DROPBITS(5) ---//
+      hold >>>= 5;
+      bits -= 5;
+      //---//
+      state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;
+      //--- DROPBITS(4) ---//
+      hold >>>= 4;
+      bits -= 4;
+      //---//
+//#ifndef PKZIP_BUG_WORKAROUND
+      if (state.nlen > 286 || state.ndist > 30) {
+        strm.msg = 'too many length or distance symbols';
+        state.mode = BAD;
+        break;
+      }
+//#endif
+      //Tracev((stderr, "inflate:       table sizes ok\n"));
+      state.have = 0;
+      state.mode = LENLENS;
+      /* falls through */
+    case LENLENS:
+      while (state.have < state.ncode) {
+        //=== NEEDBITS(3);
+        while (bits < 3) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);
+        //--- DROPBITS(3) ---//
+        hold >>>= 3;
+        bits -= 3;
+        //---//
+      }
+      while (state.have < 19) {
+        state.lens[order[state.have++]] = 0;
+      }
+      // We have separate tables & no pointers. 2 commented lines below not needed.
+      //state.next = state.codes;
+      //state.lencode = state.next;
+      // Switch to use dynamic table
+      state.lencode = state.lendyn;
+      state.lenbits = 7;
+
+      opts = {bits: state.lenbits};
+      ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);
+      state.lenbits = opts.bits;
+
+      if (ret) {
+        strm.msg = 'invalid code lengths set';
+        state.mode = BAD;
+        break;
+      }
+      //Tracev((stderr, "inflate:       code lengths ok\n"));
+      state.have = 0;
+      state.mode = CODELENS;
+      /* falls through */
+    case CODELENS:
+      while (state.have < state.nlen + state.ndist) {
+        for (;;) {
+          here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/
+          here_bits = here >>> 24;
+          here_op = (here >>> 16) & 0xff;
+          here_val = here & 0xffff;
+
+          if ((here_bits) <= bits) { break; }
+          //--- PULLBYTE() ---//
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+          //---//
+        }
+        if (here_val < 16) {
+          //--- DROPBITS(here.bits) ---//
+          hold >>>= here_bits;
+          bits -= here_bits;
+          //---//
+          state.lens[state.have++] = here_val;
+        }
+        else {
+          if (here_val === 16) {
+            //=== NEEDBITS(here.bits + 2);
+            n = here_bits + 2;
+            while (bits < n) {
+              if (have === 0) { break inf_leave; }
+              have--;
+              hold += input[next++] << bits;
+              bits += 8;
+            }
+            //===//
+            //--- DROPBITS(here.bits) ---//
+            hold >>>= here_bits;
+            bits -= here_bits;
+            //---//
+            if (state.have === 0) {
+              strm.msg = 'invalid bit length repeat';
+              state.mode = BAD;
+              break;
+            }
+            len = state.lens[state.have - 1];
+            copy = 3 + (hold & 0x03);//BITS(2);
+            //--- DROPBITS(2) ---//
+            hold >>>= 2;
+            bits -= 2;
+            //---//
+          }
+          else if (here_val === 17) {
+            //=== NEEDBITS(here.bits + 3);
+            n = here_bits + 3;
+            while (bits < n) {
+              if (have === 0) { break inf_leave; }
+              have--;
+              hold += input[next++] << bits;
+              bits += 8;
+            }
+            //===//
+            //--- DROPBITS(here.bits) ---//
+            hold >>>= here_bits;
+            bits -= here_bits;
+            //---//
+            len = 0;
+            copy = 3 + (hold & 0x07);//BITS(3);
+            //--- DROPBITS(3) ---//
+            hold >>>= 3;
+            bits -= 3;
+            //---//
+          }
+          else {
+            //=== NEEDBITS(here.bits + 7);
+            n = here_bits + 7;
+            while (bits < n) {
+              if (have === 0) { break inf_leave; }
+              have--;
+              hold += input[next++] << bits;
+              bits += 8;
+            }
+            //===//
+            //--- DROPBITS(here.bits) ---//
+            hold >>>= here_bits;
+            bits -= here_bits;
+            //---//
+            len = 0;
+            copy = 11 + (hold & 0x7f);//BITS(7);
+            //--- DROPBITS(7) ---//
+            hold >>>= 7;
+            bits -= 7;
+            //---//
+          }
+          if (state.have + copy > state.nlen + state.ndist) {
+            strm.msg = 'invalid bit length repeat';
+            state.mode = BAD;
+            break;
+          }
+          while (copy--) {
+            state.lens[state.have++] = len;
+          }
+        }
+      }
+
+      /* handle error breaks in while */
+      if (state.mode === BAD) { break; }
+
+      /* check for end-of-block code (better have one) */
+      if (state.lens[256] === 0) {
+        strm.msg = 'invalid code -- missing end-of-block';
+        state.mode = BAD;
+        break;
+      }
+
+      /* build code tables -- note: do not change the lenbits or distbits
+         values here (9 and 6) without reading the comments in inftrees.h
+         concerning the ENOUGH constants, which depend on those values */
+      state.lenbits = 9;
+
+      opts = {bits: state.lenbits};
+      ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);
+      // We have separate tables & no pointers. 2 commented lines below not needed.
+      // state.next_index = opts.table_index;
+      state.lenbits = opts.bits;
+      // state.lencode = state.next;
+
+      if (ret) {
+        strm.msg = 'invalid literal/lengths set';
+        state.mode = BAD;
+        break;
+      }
+
+      state.distbits = 6;
+      //state.distcode.copy(state.codes);
+      // Switch to use dynamic table
+      state.distcode = state.distdyn;
+      opts = {bits: state.distbits};
+      ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);
+      // We have separate tables & no pointers. 2 commented lines below not needed.
+      // state.next_index = opts.table_index;
+      state.distbits = opts.bits;
+      // state.distcode = state.next;
+
+      if (ret) {
+        strm.msg = 'invalid distances set';
+        state.mode = BAD;
+        break;
+      }
+      //Tracev((stderr, 'inflate:       codes ok\n'));
+      state.mode = LEN_;
+      if (flush === Z_TREES) { break inf_leave; }
+      /* falls through */
+    case LEN_:
+      state.mode = LEN;
+      /* falls through */
+    case LEN:
+      if (have >= 6 && left >= 258) {
+        //--- RESTORE() ---
+        strm.next_out = put;
+        strm.avail_out = left;
+        strm.next_in = next;
+        strm.avail_in = have;
+        state.hold = hold;
+        state.bits = bits;
+        //---
+        inflate_fast(strm, _out);
+        //--- LOAD() ---
+        put = strm.next_out;
+        output = strm.output;
+        left = strm.avail_out;
+        next = strm.next_in;
+        input = strm.input;
+        have = strm.avail_in;
+        hold = state.hold;
+        bits = state.bits;
+        //---
+
+        if (state.mode === TYPE) {
+          state.back = -1;
+        }
+        break;
+      }
+      state.back = 0;
+      for (;;) {
+        here = state.lencode[hold & ((1 << state.lenbits) -1)];  /*BITS(state.lenbits)*/
+        here_bits = here >>> 24;
+        here_op = (here >>> 16) & 0xff;
+        here_val = here & 0xffff;
+
+        if (here_bits <= bits) { break; }
+        //--- PULLBYTE() ---//
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+        //---//
+      }
+      if (here_op && (here_op & 0xf0) === 0) {
+        last_bits = here_bits;
+        last_op = here_op;
+        last_val = here_val;
+        for (;;) {
+          here = state.lencode[last_val +
+                  ((hold & ((1 << (last_bits + last_op)) -1))/*BITS(last.bits + last.op)*/ >> last_bits)];
+          here_bits = here >>> 24;
+          here_op = (here >>> 16) & 0xff;
+          here_val = here & 0xffff;
+
+          if ((last_bits + here_bits) <= bits) { break; }
+          //--- PULLBYTE() ---//
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+          //---//
+        }
+        //--- DROPBITS(last.bits) ---//
+        hold >>>= last_bits;
+        bits -= last_bits;
+        //---//
+        state.back += last_bits;
+      }
+      //--- DROPBITS(here.bits) ---//
+      hold >>>= here_bits;
+      bits -= here_bits;
+      //---//
+      state.back += here_bits;
+      state.length = here_val;
+      if (here_op === 0) {
+        //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
+        //        "inflate:         literal '%c'\n" :
+        //        "inflate:         literal 0x%02x\n", here.val));
+        state.mode = LIT;
+        break;
+      }
+      if (here_op & 32) {
+        //Tracevv((stderr, "inflate:         end of block\n"));
+        state.back = -1;
+        state.mode = TYPE;
+        break;
+      }
+      if (here_op & 64) {
+        strm.msg = 'invalid literal/length code';
+        state.mode = BAD;
+        break;
+      }
+      state.extra = here_op & 15;
+      state.mode = LENEXT;
+      /* falls through */
+    case LENEXT:
+      if (state.extra) {
+        //=== NEEDBITS(state.extra);
+        n = state.extra;
+        while (bits < n) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        state.length += hold & ((1 << state.extra) -1)/*BITS(state.extra)*/;
+        //--- DROPBITS(state.extra) ---//
+        hold >>>= state.extra;
+        bits -= state.extra;
+        //---//
+        state.back += state.extra;
+      }
+      //Tracevv((stderr, "inflate:         length %u\n", state.length));
+      state.was = state.length;
+      state.mode = DIST;
+      /* falls through */
+    case DIST:
+      for (;;) {
+        here = state.distcode[hold & ((1 << state.distbits) -1)];/*BITS(state.distbits)*/
+        here_bits = here >>> 24;
+        here_op = (here >>> 16) & 0xff;
+        here_val = here & 0xffff;
+
+        if ((here_bits) <= bits) { break; }
+        //--- PULLBYTE() ---//
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+        //---//
+      }
+      if ((here_op & 0xf0) === 0) {
+        last_bits = here_bits;
+        last_op = here_op;
+        last_val = here_val;
+        for (;;) {
+          here = state.distcode[last_val +
+                  ((hold & ((1 << (last_bits + last_op)) -1))/*BITS(last.bits + last.op)*/ >> last_bits)];
+          here_bits = here >>> 24;
+          here_op = (here >>> 16) & 0xff;
+          here_val = here & 0xffff;
+
+          if ((last_bits + here_bits) <= bits) { break; }
+          //--- PULLBYTE() ---//
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+          //---//
+        }
+        //--- DROPBITS(last.bits) ---//
+        hold >>>= last_bits;
+        bits -= last_bits;
+        //---//
+        state.back += last_bits;
+      }
+      //--- DROPBITS(here.bits) ---//
+      hold >>>= here_bits;
+      bits -= here_bits;
+      //---//
+      state.back += here_bits;
+      if (here_op & 64) {
+        strm.msg = 'invalid distance code';
+        state.mode = BAD;
+        break;
+      }
+      state.offset = here_val;
+      state.extra = (here_op) & 15;
+      state.mode = DISTEXT;
+      /* falls through */
+    case DISTEXT:
+      if (state.extra) {
+        //=== NEEDBITS(state.extra);
+        n = state.extra;
+        while (bits < n) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        state.offset += hold & ((1 << state.extra) -1)/*BITS(state.extra)*/;
+        //--- DROPBITS(state.extra) ---//
+        hold >>>= state.extra;
+        bits -= state.extra;
+        //---//
+        state.back += state.extra;
+      }
+//#ifdef INFLATE_STRICT
+      if (state.offset > state.dmax) {
+        strm.msg = 'invalid distance too far back';
+        state.mode = BAD;
+        break;
+      }
+//#endif
+      //Tracevv((stderr, "inflate:         distance %u\n", state.offset));
+      state.mode = MATCH;
+      /* falls through */
+    case MATCH:
+      if (left === 0) { break inf_leave; }
+      copy = _out - left;
+      if (state.offset > copy) {         /* copy from window */
+        copy = state.offset - copy;
+        if (copy > state.whave) {
+          if (state.sane) {
+            strm.msg = 'invalid distance too far back';
+            state.mode = BAD;
+            break;
+          }
+// (!) This block is disabled in zlib defailts,
+// don't enable it for binary compatibility
+//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+//          Trace((stderr, "inflate.c too far\n"));
+//          copy -= state.whave;
+//          if (copy > state.length) { copy = state.length; }
+//          if (copy > left) { copy = left; }
+//          left -= copy;
+//          state.length -= copy;
+//          do {
+//            output[put++] = 0;
+//          } while (--copy);
+//          if (state.length === 0) { state.mode = LEN; }
+//          break;
+//#endif
+        }
+        if (copy > state.wnext) {
+          copy -= state.wnext;
+          from = state.wsize - copy;
+        }
+        else {
+          from = state.wnext - copy;
+        }
+        if (copy > state.length) { copy = state.length; }
+        from_source = state.window;
+      }
+      else {                              /* copy from output */
+        from_source = output;
+        from = put - state.offset;
+        copy = state.length;
+      }
+      if (copy > left) { copy = left; }
+      left -= copy;
+      state.length -= copy;
+      do {
+        output[put++] = from_source[from++];
+      } while (--copy);
+      if (state.length === 0) { state.mode = LEN; }
+      break;
+    case LIT:
+      if (left === 0) { break inf_leave; }
+      output[put++] = state.length;
+      left--;
+      state.mode = LEN;
+      break;
+    case CHECK:
+      if (state.wrap) {
+        //=== NEEDBITS(32);
+        while (bits < 32) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          // Use '|' insdead of '+' to make sure that result is signed
+          hold |= input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        _out -= left;
+        strm.total_out += _out;
+        state.total += _out;
+        if (_out) {
+          strm.adler = state.check =
+              /*UPDATE(state.check, put - _out, _out);*/
+              (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));
+
+        }
+        _out = left;
+        // NB: crc32 stored as signed 32-bit int, ZSWAP32 returns signed too
+        if ((state.flags ? hold : ZSWAP32(hold)) !== state.check) {
+          strm.msg = 'incorrect data check';
+          state.mode = BAD;
+          break;
+        }
+        //=== INITBITS();
+        hold = 0;
+        bits = 0;
+        //===//
+        //Tracev((stderr, "inflate:   check matches trailer\n"));
+      }
+      state.mode = LENGTH;
+      /* falls through */
+    case LENGTH:
+      if (state.wrap && state.flags) {
+        //=== NEEDBITS(32);
+        while (bits < 32) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        if (hold !== (state.total & 0xffffffff)) {
+          strm.msg = 'incorrect length check';
+          state.mode = BAD;
+          break;
+        }
+        //=== INITBITS();
+        hold = 0;
+        bits = 0;
+        //===//
+        //Tracev((stderr, "inflate:   length matches trailer\n"));
+      }
+      state.mode = DONE;
+      /* falls through */
+    case DONE:
+      ret = Z_STREAM_END;
+      break inf_leave;
+    case BAD:
+      ret = Z_DATA_ERROR;
+      break inf_leave;
+    case MEM:
+      return Z_MEM_ERROR;
+    case SYNC:
+      /* falls through */
+    default:
+      return Z_STREAM_ERROR;
+    }
+  }
+
+  // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave"
+
+  /*
+     Return from inflate(), updating the total counts and the check value.
+     If there was no progress during the inflate() call, return a buffer
+     error.  Call updatewindow() to create and/or update the window state.
+     Note: a memory error from inflate() is non-recoverable.
+   */
+
+  //--- RESTORE() ---
+  strm.next_out = put;
+  strm.avail_out = left;
+  strm.next_in = next;
+  strm.avail_in = have;
+  state.hold = hold;
+  state.bits = bits;
+  //---
+
+  if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&
+                      (state.mode < CHECK || flush !== Z_FINISH))) {
+    if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {
+      state.mode = MEM;
+      return Z_MEM_ERROR;
+    }
+  }
+  _in -= strm.avail_in;
+  _out -= strm.avail_out;
+  strm.total_in += _in;
+  strm.total_out += _out;
+  state.total += _out;
+  if (state.wrap && _out) {
+    strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
+      (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));
+  }
+  strm.data_type = state.bits + (state.last ? 64 : 0) +
+                    (state.mode === TYPE ? 128 : 0) +
+                    (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
+  if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {
+    ret = Z_BUF_ERROR;
+  }
+  return ret;
+}
+
+function inflateEnd(strm) {
+
+  if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {
+    return Z_STREAM_ERROR;
+  }
+
+  var state = strm.state;
+  if (state.window) {
+    state.window = null;
+  }
+  strm.state = null;
+  return Z_OK;
+}
+
+function inflateGetHeader(strm, head) {
+  var state;
+
+  /* check state */
+  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
+  state = strm.state;
+  if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }
+
+  /* save header structure */
+  state.head = head;
+  head.done = false;
+  return Z_OK;
+}
+
+
+exports.inflateReset = inflateReset;
+exports.inflateReset2 = inflateReset2;
+exports.inflateResetKeep = inflateResetKeep;
+exports.inflateInit = inflateInit;
+exports.inflateInit2 = inflateInit2;
+exports.inflate = inflate;
+exports.inflateEnd = inflateEnd;
+exports.inflateGetHeader = inflateGetHeader;
+exports.inflateInfo = 'pako inflate (from Nodeca project)';
+
+/* Not implemented
+exports.inflateCopy = inflateCopy;
+exports.inflateGetDictionary = inflateGetDictionary;
+exports.inflateMark = inflateMark;
+exports.inflatePrime = inflatePrime;
+exports.inflateSetDictionary = inflateSetDictionary;
+exports.inflateSync = inflateSync;
+exports.inflateSyncPoint = inflateSyncPoint;
+exports.inflateUndermine = inflateUndermine;
+*/
+},{"../utils/common":27,"./adler32":29,"./crc32":31,"./inffast":34,"./inftrees":36}],36:[function(_dereq_,module,exports){
+'use strict';
+
+
+var utils = _dereq_('../utils/common');
+
+var MAXBITS = 15;
+var ENOUGH_LENS = 852;
+var ENOUGH_DISTS = 592;
+//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);
+
+var CODES = 0;
+var LENS = 1;
+var DISTS = 2;
+
+var lbase = [ /* Length codes 257..285 base */
+  3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
+  35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
+];
+
+var lext = [ /* Length codes 257..285 extra */
+  16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
+  19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78
+];
+
+var dbase = [ /* Distance codes 0..29 base */
+  1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
+  257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
+  8193, 12289, 16385, 24577, 0, 0
+];
+
+var dext = [ /* Distance codes 0..29 extra */
+  16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
+  23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
+  28, 28, 29, 29, 64, 64
+];
+
+module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)
+{
+  var bits = opts.bits;
+      //here = opts.here; /* table entry for duplication */
+
+  var len = 0;               /* a code's length in bits */
+  var sym = 0;               /* index of code symbols */
+  var min = 0, max = 0;          /* minimum and maximum code lengths */
+  var root = 0;              /* number of index bits for root table */
+  var curr = 0;              /* number of index bits for current table */
+  var drop = 0;              /* code bits to drop for sub-table */
+  var left = 0;                   /* number of prefix codes available */
+  var used = 0;              /* code entries in table used */
+  var huff = 0;              /* Huffman code */
+  var incr;              /* for incrementing code, index */
+  var fill;              /* index for replicating entries */
+  var low;               /* low bits for current root entry */
+  var mask;              /* mask for low root bits */
+  var next;             /* next available space in table */
+  var base = null;     /* base value table to use */
+  var base_index = 0;
+//  var shoextra;    /* extra bits table to use */
+  var end;                    /* use base and extra for symbol > end */
+  var count = new utils.Buf16(MAXBITS+1); //[MAXBITS+1];    /* number of codes of each length */
+  var offs = new utils.Buf16(MAXBITS+1); //[MAXBITS+1];     /* offsets in table for each length */
+  var extra = null;
+  var extra_index = 0;
+
+  var here_bits, here_op, here_val;
+
+  /*
+   Process a set of code lengths to create a canonical Huffman code.  The
+   code lengths are lens[0..codes-1].  Each length corresponds to the
+   symbols 0..codes-1.  The Huffman code is generated by first sorting the
+   symbols by length from short to long, and retaining the symbol order
+   for codes with equal lengths.  Then the code starts with all zero bits
+   for the first code of the shortest length, and the codes are integer
+   increments for the same length, and zeros are appended as the length
+   increases.  For the deflate format, these bits are stored backwards
+   from their more natural integer increment ordering, and so when the
+   decoding tables are built in the large loop below, the integer codes
+   are incremented backwards.
+
+   This routine assumes, but does not check, that all of the entries in
+   lens[] are in the range 0..MAXBITS.  The caller must assure this.
+   1..MAXBITS is interpreted as that code length.  zero means that that
+   symbol does not occur in this code.
+
+   The codes are sorted by computing a count of codes for each length,
+   creating from that a table of starting indices for each length in the
+   sorted table, and then entering the symbols in order in the sorted
+   table.  The sorted table is work[], with that space being provided by
+   the caller.
+
+   The length counts are used for other purposes as well, i.e. finding
+   the minimum and maximum length codes, determining if there are any
+   codes at all, checking for a valid set of lengths, and looking ahead
+   at length counts to determine sub-table sizes when building the
+   decoding tables.
+   */
+
+  /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
+  for (len = 0; len <= MAXBITS; len++) {
+    count[len] = 0;
+  }
+  for (sym = 0; sym < codes; sym++) {
+    count[lens[lens_index + sym]]++;
+  }
+
+  /* bound code lengths, force root to be within code lengths */
+  root = bits;
+  for (max = MAXBITS; max >= 1; max--) {
+    if (count[max] !== 0) { break; }
+  }
+  if (root > max) {
+    root = max;
+  }
+  if (max === 0) {                     /* no symbols to code at all */
+    //table.op[opts.table_index] = 64;  //here.op = (var char)64;    /* invalid code marker */
+    //table.bits[opts.table_index] = 1;   //here.bits = (var char)1;
+    //table.val[opts.table_index++] = 0;   //here.val = (var short)0;
+    table[table_index++] = (1 << 24) | (64 << 16) | 0;
+
+
+    //table.op[opts.table_index] = 64;
+    //table.bits[opts.table_index] = 1;
+    //table.val[opts.table_index++] = 0;
+    table[table_index++] = (1 << 24) | (64 << 16) | 0;
+
+    opts.bits = 1;
+    return 0;     /* no symbols, but wait for decoding to report error */
+  }
+  for (min = 1; min < max; min++) {
+    if (count[min] !== 0) { break; }
+  }
+  if (root < min) {
+    root = min;
+  }
+
+  /* check for an over-subscribed or incomplete set of lengths */
+  left = 1;
+  for (len = 1; len <= MAXBITS; len++) {
+    left <<= 1;
+    left -= count[len];
+    if (left < 0) {
+      return -1;
+    }        /* over-subscribed */
+  }
+  if (left > 0 && (type === CODES || max !== 1)) {
+    return -1;                      /* incomplete set */
+  }
+
+  /* generate offsets into symbol table for each length for sorting */
+  offs[1] = 0;
+  for (len = 1; len < MAXBITS; len++) {
+    offs[len + 1] = offs[len] + count[len];
+  }
+
+  /* sort symbols by length, by symbol order within each length */
+  for (sym = 0; sym < codes; sym++) {
+    if (lens[lens_index + sym] !== 0) {
+      work[offs[lens[lens_index + sym]]++] = sym;
+    }
+  }
+
+  /*
+   Create and fill in decoding tables.  In this loop, the table being
+   filled is at next and has curr index bits.  The code being used is huff
+   with length len.  That code is converted to an index by dropping drop
+   bits off of the bottom.  For codes where len is less than drop + curr,
+   those top drop + curr - len bits are incremented through all values to
+   fill the table with replicated entries.
+
+   root is the number of index bits for the root table.  When len exceeds
+   root, sub-tables are created pointed to by the root entry with an index
+   of the low root bits of huff.  This is saved in low to check for when a
+   new sub-table should be started.  drop is zero when the root table is
+   being filled, and drop is root when sub-tables are being filled.
+
+   When a new sub-table is needed, it is necessary to look ahead in the
+   code lengths to determine what size sub-table is needed.  The length
+   counts are used for this, and so count[] is decremented as codes are
+   entered in the tables.
+
+   used keeps track of how many table entries have been allocated from the
+   provided *table space.  It is checked for LENS and DIST tables against
+   the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
+   the initial root table size constants.  See the comments in inftrees.h
+   for more information.
+
+   sym increments through all symbols, and the loop terminates when
+   all codes of length max, i.e. all codes, have been processed.  This
+   routine permits incomplete codes, so another loop after this one fills
+   in the rest of the decoding tables with invalid code markers.
+   */
+
+  /* set up for code type */
+  // poor man optimization - use if-else instead of switch,
+  // to avoid deopts in old v8
+  if (type === CODES) {
+      base = extra = work;    /* dummy value--not used */
+      end = 19;
+  } else if (type === LENS) {
+      base = lbase;
+      base_index -= 257;
+      extra = lext;
+      extra_index -= 257;
+      end = 256;
+  } else {                    /* DISTS */
+      base = dbase;
+      extra = dext;
+      end = -1;
+  }
+
+  /* initialize opts for loop */
+  huff = 0;                   /* starting code */
+  sym = 0;                    /* starting code symbol */
+  len = min;                  /* starting code length */
+  next = table_index;              /* current table to fill in */
+  curr = root;                /* current table index bits */
+  drop = 0;                   /* current bits to drop from code for index */
+  low = -1;                   /* trigger new sub-table when len > root */
+  used = 1 << root;          /* use root table entries */
+  mask = used - 1;            /* mask for comparing low */
+
+  /* check available table space */
+  if ((type === LENS && used > ENOUGH_LENS) ||
+    (type === DISTS && used > ENOUGH_DISTS)) {
+    return 1;
+  }
+
+  var i=0;
+  /* process all codes and make table entries */
+  for (;;) {
+    i++;
+    /* create table entry */
+    here_bits = len - drop;
+    if (work[sym] < end) {
+      here_op = 0;
+      here_val = work[sym];
+    }
+    else if (work[sym] > end) {
+      here_op = extra[extra_index + work[sym]];
+      here_val = base[base_index + work[sym]];
+    }
+    else {
+      here_op = 32 + 64;         /* end of block */
+      here_val = 0;
+    }
+
+    /* replicate for those indices with low len bits equal to huff */
+    incr = 1 << (len - drop);
+    fill = 1 << curr;
+    min = fill;                 /* save offset to next table */
+    do {
+      fill -= incr;
+      table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;
+    } while (fill !== 0);
+
+    /* backwards increment the len-bit code huff */
+    incr = 1 << (len - 1);
+    while (huff & incr) {
+      incr >>= 1;
+    }
+    if (incr !== 0) {
+      huff &= incr - 1;
+      huff += incr;
+    } else {
+      huff = 0;
+    }
+
+    /* go to next symbol, update count, len */
+    sym++;
+    if (--count[len] === 0) {
+      if (len === max) { break; }
+      len = lens[lens_index + work[sym]];
+    }
+
+    /* create new sub-table if needed */
+    if (len > root && (huff & mask) !== low) {
+      /* if first time, transition to sub-tables */
+      if (drop === 0) {
+        drop = root;
+      }
+
+      /* increment past last table */
+      next += min;            /* here min is 1 << curr */
+
+      /* determine length of next table */
+      curr = len - drop;
+      left = 1 << curr;
+      while (curr + drop < max) {
+        left -= count[curr + drop];
+        if (left <= 0) { break; }
+        curr++;
+        left <<= 1;
+      }
+
+      /* check for enough space */
+      used += 1 << curr;
+      if ((type === LENS && used > ENOUGH_LENS) ||
+        (type === DISTS && used > ENOUGH_DISTS)) {
+        return 1;
+      }
+
+      /* point entry in root table to sub-table */
+      low = huff & mask;
+      /*table.op[low] = curr;
+      table.bits[low] = root;
+      table.val[low] = next - opts.table_index;*/
+      table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;
+    }
+  }
+
+  /* fill in remaining table entry if code is incomplete (guaranteed to have
+   at most one remaining entry, since if the code is incomplete, the
+   maximum code length that was allowed to get this far is one bit) */
+  if (huff !== 0) {
+    //table.op[next + huff] = 64;            /* invalid code marker */
+    //table.bits[next + huff] = len - drop;
+    //table.val[next + huff] = 0;
+    table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;
+  }
+
+  /* set return parameters */
+  //opts.table_index += used;
+  opts.bits = root;
+  return 0;
+};
+
+},{"../utils/common":27}],37:[function(_dereq_,module,exports){
+'use strict';
+
+module.exports = {
+  '2':    'need dictionary',     /* Z_NEED_DICT       2  */
+  '1':    'stream end',          /* Z_STREAM_END      1  */
+  '0':    '',                    /* Z_OK              0  */
+  '-1':   'file error',          /* Z_ERRNO         (-1) */
+  '-2':   'stream error',        /* Z_STREAM_ERROR  (-2) */
+  '-3':   'data error',          /* Z_DATA_ERROR    (-3) */
+  '-4':   'insufficient memory', /* Z_MEM_ERROR     (-4) */
+  '-5':   'buffer error',        /* Z_BUF_ERROR     (-5) */
+  '-6':   'incompatible version' /* Z_VERSION_ERROR (-6) */
+};
+},{}],38:[function(_dereq_,module,exports){
+'use strict';
+
+
+var utils = _dereq_('../utils/common');
+
+/* Public constants ==========================================================*/
+/* ===========================================================================*/
+
+
+//var Z_FILTERED          = 1;
+//var Z_HUFFMAN_ONLY      = 2;
+//var Z_RLE               = 3;
+var Z_FIXED               = 4;
+//var Z_DEFAULT_STRATEGY  = 0;
+
+/* Possible values of the data_type field (though see inflate()) */
+var Z_BINARY              = 0;
+var Z_TEXT                = 1;
+//var Z_ASCII             = 1; // = Z_TEXT
+var Z_UNKNOWN             = 2;
+
+/*============================================================================*/
+
+
+function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }
+
+// From zutil.h
+
+var STORED_BLOCK = 0;
+var STATIC_TREES = 1;
+var DYN_TREES    = 2;
+/* The three kinds of block type */
+
+var MIN_MATCH    = 3;
+var MAX_MATCH    = 258;
+/* The minimum and maximum match lengths */
+
+// From deflate.h
+/* ===========================================================================
+ * Internal compression state.
+ */
+
+var LENGTH_CODES  = 29;
+/* number of length codes, not counting the special END_BLOCK code */
+
+var LITERALS      = 256;
+/* number of literal bytes 0..255 */
+
+var L_CODES       = LITERALS + 1 + LENGTH_CODES;
+/* number of Literal or Length codes, including the END_BLOCK code */
+
+var D_CODES       = 30;
+/* number of distance codes */
+
+var BL_CODES      = 19;
+/* number of codes used to transfer the bit lengths */
+
+var HEAP_SIZE     = 2*L_CODES + 1;
+/* maximum heap size */
+
+var MAX_BITS      = 15;
+/* All codes must not exceed MAX_BITS bits */
+
+var Buf_size      = 16;
+/* size of bit buffer in bi_buf */
+
+
+/* ===========================================================================
+ * Constants
+ */
+
+var MAX_BL_BITS = 7;
+/* Bit length codes must not exceed MAX_BL_BITS bits */
+
+var END_BLOCK   = 256;
+/* end of block literal code */
+
+var REP_3_6     = 16;
+/* repeat previous bit length 3-6 times (2 bits of repeat count) */
+
+var REPZ_3_10   = 17;
+/* repeat a zero length 3-10 times  (3 bits of repeat count) */
+
+var REPZ_11_138 = 18;
+/* repeat a zero length 11-138 times  (7 bits of repeat count) */
+
+var extra_lbits =   /* extra bits for each length code */
+  [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];
+
+var extra_dbits =   /* extra bits for each distance code */
+  [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];
+
+var extra_blbits =  /* extra bits for each bit length code */
+  [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];
+
+var bl_order =
+  [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];
+/* The lengths of the bit length codes are sent in order of decreasing
+ * probability, to avoid transmitting the lengths for unused bit length codes.
+ */
+
+/* ===========================================================================
+ * Local data. These are initialized only once.
+ */
+
+// We pre-fill arrays with 0 to avoid uninitialized gaps
+
+var DIST_CODE_LEN = 512; /* see definition of array dist_code below */
+
+// !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1
+var static_ltree  = new Array((L_CODES+2) * 2);
+zero(static_ltree);
+/* The static literal tree. Since the bit lengths are imposed, there is no
+ * need for the L_CODES extra codes used during heap construction. However
+ * The codes 286 and 287 are needed to build a canonical tree (see _tr_init
+ * below).
+ */
+
+var static_dtree  = new Array(D_CODES * 2);
+zero(static_dtree);
+/* The static distance tree. (Actually a trivial tree since all codes use
+ * 5 bits.)
+ */
+
+var _dist_code    = new Array(DIST_CODE_LEN);
+zero(_dist_code);
+/* Distance codes. The first 256 values correspond to the distances
+ * 3 .. 258, the last 256 values correspond to the top 8 bits of
+ * the 15 bit distances.
+ */
+
+var _length_code  = new Array(MAX_MATCH-MIN_MATCH+1);
+zero(_length_code);
+/* length code for each normalized match length (0 == MIN_MATCH) */
+
+var base_length   = new Array(LENGTH_CODES);
+zero(base_length);
+/* First normalized length for each code (0 = MIN_MATCH) */
+
+var base_dist     = new Array(D_CODES);
+zero(base_dist);
+/* First normalized distance for each code (0 = distance of 1) */
+
+
+var StaticTreeDesc = function (static_tree, extra_bits, extra_base, elems, max_length) {
+
+  this.static_tree  = static_tree;  /* static tree or NULL */
+  this.extra_bits   = extra_bits;   /* extra bits for each code or NULL */
+  this.extra_base   = extra_base;   /* base index for extra_bits */
+  this.elems        = elems;        /* max number of elements in the tree */
+  this.max_length   = max_length;   /* max bit length for the codes */
+
+  // show if `static_tree` has data or dummy - needed for monomorphic objects
+  this.has_stree    = static_tree && static_tree.length;
+};
+
+
+var static_l_desc;
+var static_d_desc;
+var static_bl_desc;
+
+
+var TreeDesc = function(dyn_tree, stat_desc) {
+  this.dyn_tree = dyn_tree;     /* the dynamic tree */
+  this.max_code = 0;            /* largest code with non zero frequency */
+  this.stat_desc = stat_desc;   /* the corresponding static tree */
+};
+
+
+
+function d_code(dist) {
+  return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];
+}
+
+
+/* ===========================================================================
+ * Output a short LSB first on the stream.
+ * IN assertion: there is enough room in pendingBuf.
+ */
+function put_short (s, w) {
+//    put_byte(s, (uch)((w) & 0xff));
+//    put_byte(s, (uch)((ush)(w) >> 8));
+  s.pending_buf[s.pending++] = (w) & 0xff;
+  s.pending_buf[s.pending++] = (w >>> 8) & 0xff;
+}
+
+
+/* ===========================================================================
+ * Send a value on a given number of bits.
+ * IN assertion: length <= 16 and value fits in length bits.
+ */
+function send_bits(s, value, length) {
+  if (s.bi_valid > (Buf_size - length)) {
+    s.bi_buf |= (value << s.bi_valid) & 0xffff;
+    put_short(s, s.bi_buf);
+    s.bi_buf = value >> (Buf_size - s.bi_valid);
+    s.bi_valid += length - Buf_size;
+  } else {
+    s.bi_buf |= (value << s.bi_valid) & 0xffff;
+    s.bi_valid += length;
+  }
+}
+
+
+function send_code(s, c, tree) {
+  send_bits(s, tree[c*2]/*.Code*/, tree[c*2 + 1]/*.Len*/);
+}
+
+
+/* ===========================================================================
+ * Reverse the first len bits of a code, using straightforward code (a faster
+ * method would use a table)
+ * IN assertion: 1 <= len <= 15
+ */
+function bi_reverse(code, len) {
+  var res = 0;
+  do {
+    res |= code & 1;
+    code >>>= 1;
+    res <<= 1;
+  } while (--len > 0);
+  return res >>> 1;
+}
+
+
+/* ===========================================================================
+ * Flush the bit buffer, keeping at most 7 bits in it.
+ */
+function bi_flush(s) {
+  if (s.bi_valid === 16) {
+    put_short(s, s.bi_buf);
+    s.bi_buf = 0;
+    s.bi_valid = 0;
+
+  } else if (s.bi_valid >= 8) {
+    s.pending_buf[s.pending++] = s.bi_buf & 0xff;
+    s.bi_buf >>= 8;
+    s.bi_valid -= 8;
+  }
+}
+
+
+/* ===========================================================================
+ * Compute the optimal bit lengths for a tree and update the total bit length
+ * for the current block.
+ * IN assertion: the fields freq and dad are set, heap[heap_max] and
+ *    above are the tree nodes sorted by increasing frequency.
+ * OUT assertions: the field len is set to the optimal bit length, the
+ *     array bl_count contains the frequencies for each bit length.
+ *     The length opt_len is updated; static_len is also updated if stree is
+ *     not null.
+ */
+function gen_bitlen(s, desc)
+//    deflate_state *s;
+//    tree_desc *desc;    /* the tree descriptor */
+{
+  var tree            = desc.dyn_tree;
+  var max_code        = desc.max_code;
+  var stree           = desc.stat_desc.static_tree;
+  var has_stree       = desc.stat_desc.has_stree;
+  var extra           = desc.stat_desc.extra_bits;
+  var base            = desc.stat_desc.extra_base;
+  var max_length      = desc.stat_desc.max_length;
+  var h;              /* heap index */
+  var n, m;           /* iterate over the tree elements */
+  var bits;           /* bit length */
+  var xbits;          /* extra bits */
+  var f;              /* frequency */
+  var overflow = 0;   /* number of elements with bit length too large */
+
+  for (bits = 0; bits <= MAX_BITS; bits++) {
+    s.bl_count[bits] = 0;
+  }
+
+  /* In a first pass, compute the optimal bit lengths (which may
+   * overflow in the case of the bit length tree).
+   */
+  tree[s.heap[s.heap_max]*2 + 1]/*.Len*/ = 0; /* root of the heap */
+
+  for (h = s.heap_max+1; h < HEAP_SIZE; h++) {
+    n = s.heap[h];
+    bits = tree[tree[n*2 +1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;
+    if (bits > max_length) {
+      bits = max_length;
+      overflow++;
+    }
+    tree[n*2 + 1]/*.Len*/ = bits;
+    /* We overwrite tree[n].Dad which is no longer needed */
+
+    if (n > max_code) { continue; } /* not a leaf node */
+
+    s.bl_count[bits]++;
+    xbits = 0;
+    if (n >= base) {
+      xbits = extra[n-base];
+    }
+    f = tree[n * 2]/*.Freq*/;
+    s.opt_len += f * (bits + xbits);
+    if (has_stree) {
+      s.static_len += f * (stree[n*2 + 1]/*.Len*/ + xbits);
+    }
+  }
+  if (overflow === 0) { return; }
+
+  // Trace((stderr,"\nbit length overflow\n"));
+  /* This happens for example on obj2 and pic of the Calgary corpus */
+
+  /* Find the first bit length which could increase: */
+  do {
+    bits = max_length-1;
+    while (s.bl_count[bits] === 0) { bits--; }
+    s.bl_count[bits]--;      /* move one leaf down the tree */
+    s.bl_count[bits+1] += 2; /* move one overflow item as its brother */
+    s.bl_count[max_length]--;
+    /* The brother of the overflow item also moves one step up,
+     * but this does not affect bl_count[max_length]
+     */
+    overflow -= 2;
+  } while (overflow > 0);
+
+  /* Now recompute all bit lengths, scanning in increasing frequency.
+   * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
+   * lengths instead of fixing only the wrong ones. This idea is taken
+   * from 'ar' written by Haruhiko Okumura.)
+   */
+  for (bits = max_length; bits !== 0; bits--) {
+    n = s.bl_count[bits];
+    while (n !== 0) {
+      m = s.heap[--h];
+      if (m > max_code) { continue; }
+      if (tree[m*2 + 1]/*.Len*/ !== bits) {
+        // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
+        s.opt_len += (bits - tree[m*2 + 1]/*.Len*/)*tree[m*2]/*.Freq*/;
+        tree[m*2 + 1]/*.Len*/ = bits;
+      }
+      n--;
+    }
+  }
+}
+
+
+/* ===========================================================================
+ * Generate the codes for a given tree and bit counts (which need not be
+ * optimal).
+ * IN assertion: the array bl_count contains the bit length statistics for
+ * the given tree and the field len is set for all tree elements.
+ * OUT assertion: the field code is set for all tree elements of non
+ *     zero code length.
+ */
+function gen_codes(tree, max_code, bl_count)
+//    ct_data *tree;             /* the tree to decorate */
+//    int max_code;              /* largest code with non zero frequency */
+//    ushf *bl_count;            /* number of codes at each bit length */
+{
+  var next_code = new Array(MAX_BITS+1); /* next code value for each bit length */
+  var code = 0;              /* running code value */
+  var bits;                  /* bit index */
+  var n;                     /* code index */
+
+  /* The distribution counts are first used to generate the code values
+   * without bit reversal.
+   */
+  for (bits = 1; bits <= MAX_BITS; bits++) {
+    next_code[bits] = code = (code + bl_count[bits-1]) << 1;
+  }
+  /* Check that the bit counts in bl_count are consistent. The last code
+   * must be all ones.
+   */
+  //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
+  //        "inconsistent bit counts");
+  //Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
+
+  for (n = 0;  n <= max_code; n++) {
+    var len = tree[n*2 + 1]/*.Len*/;
+    if (len === 0) { continue; }
+    /* Now reverse the bits */
+    tree[n*2]/*.Code*/ = bi_reverse(next_code[len]++, len);
+
+    //Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
+    //     n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
+  }
+}
+
+
+/* ===========================================================================
+ * Initialize the various 'constant' tables.
+ */
+function tr_static_init() {
+  var n;        /* iterates over tree elements */
+  var bits;     /* bit counter */
+  var length;   /* length value */
+  var code;     /* code value */
+  var dist;     /* distance index */
+  var bl_count = new Array(MAX_BITS+1);
+  /* number of codes at each bit length for an optimal tree */
+
+  // do check in _tr_init()
+  //if (static_init_done) return;
+
+  /* For some embedded targets, global variables are not initialized: */
+/*#ifdef NO_INIT_GLOBAL_POINTERS
+  static_l_desc.static_tree = static_ltree;
+  static_l_desc.extra_bits = extra_lbits;
+  static_d_desc.static_tree = static_dtree;
+  static_d_desc.extra_bits = extra_dbits;
+  static_bl_desc.extra_bits = extra_blbits;
+#endif*/
+
+  /* Initialize the mapping length (0..255) -> length code (0..28) */
+  length = 0;
+  for (code = 0; code < LENGTH_CODES-1; code++) {
+    base_length[code] = length;
+    for (n = 0; n < (1<<extra_lbits[code]); n++) {
+      _length_code[length++] = code;
+    }
+  }
+  //Assert (length == 256, "tr_static_init: length != 256");
+  /* Note that the length 255 (match length 258) can be represented
+   * in two different ways: code 284 + 5 bits or code 285, so we
+   * overwrite length_code[255] to use the best encoding:
+   */
+  _length_code[length-1] = code;
+
+  /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
+  dist = 0;
+  for (code = 0 ; code < 16; code++) {
+    base_dist[code] = dist;
+    for (n = 0; n < (1<<extra_dbits[code]); n++) {
+      _dist_code[dist++] = code;
+    }
+  }
+  //Assert (dist == 256, "tr_static_init: dist != 256");
+  dist >>= 7; /* from now on, all distances are divided by 128 */
+  for ( ; code < D_CODES; code++) {
+    base_dist[code] = dist << 7;
+    for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {
+      _dist_code[256 + dist++] = code;
+    }
+  }
+  //Assert (dist == 256, "tr_static_init: 256+dist != 512");
+
+  /* Construct the codes of the static literal tree */
+  for (bits = 0; bits <= MAX_BITS; bits++) {
+    bl_count[bits] = 0;
+  }
+
+  n = 0;
+  while (n <= 143) {
+    static_ltree[n*2 + 1]/*.Len*/ = 8;
+    n++;
+    bl_count[8]++;
+  }
+  while (n <= 255) {
+    static_ltree[n*2 + 1]/*.Len*/ = 9;
+    n++;
+    bl_count[9]++;
+  }
+  while (n <= 279) {
+    static_ltree[n*2 + 1]/*.Len*/ = 7;
+    n++;
+    bl_count[7]++;
+  }
+  while (n <= 287) {
+    static_ltree[n*2 + 1]/*.Len*/ = 8;
+    n++;
+    bl_count[8]++;
+  }
+  /* Codes 286 and 287 do not exist, but we must include them in the
+   * tree construction to get a canonical Huffman tree (longest code
+   * all ones)
+   */
+  gen_codes(static_ltree, L_CODES+1, bl_count);
+
+  /* The static distance tree is trivial: */
+  for (n = 0; n < D_CODES; n++) {
+    static_dtree[n*2 + 1]/*.Len*/ = 5;
+    static_dtree[n*2]/*.Code*/ = bi_reverse(n, 5);
+  }
+
+  // Now data ready and we can init static trees
+  static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS);
+  static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS);
+  static_bl_desc =new StaticTreeDesc(new Array(0), extra_blbits, 0,         BL_CODES, MAX_BL_BITS);
+
+  //static_init_done = true;
+}
+
+
+/* ===========================================================================
+ * Initialize a new block.
+ */
+function init_block(s) {
+  var n; /* iterates over tree elements */
+
+  /* Initialize the trees. */
+  for (n = 0; n < L_CODES;  n++) { s.dyn_ltree[n*2]/*.Freq*/ = 0; }
+  for (n = 0; n < D_CODES;  n++) { s.dyn_dtree[n*2]/*.Freq*/ = 0; }
+  for (n = 0; n < BL_CODES; n++) { s.bl_tree[n*2]/*.Freq*/ = 0; }
+
+  s.dyn_ltree[END_BLOCK*2]/*.Freq*/ = 1;
+  s.opt_len = s.static_len = 0;
+  s.last_lit = s.matches = 0;
+}
+
+
+/* ===========================================================================
+ * Flush the bit buffer and align the output on a byte boundary
+ */
+function bi_windup(s)
+{
+  if (s.bi_valid > 8) {
+    put_short(s, s.bi_buf);
+  } else if (s.bi_valid > 0) {
+    //put_byte(s, (Byte)s->bi_buf);
+    s.pending_buf[s.pending++] = s.bi_buf;
+  }
+  s.bi_buf = 0;
+  s.bi_valid = 0;
+}
+
+/* ===========================================================================
+ * Copy a stored block, storing first the length and its
+ * one's complement if requested.
+ */
+function copy_block(s, buf, len, header)
+//DeflateState *s;
+//charf    *buf;    /* the input data */
+//unsigned len;     /* its length */
+//int      header;  /* true if block header must be written */
+{
+  bi_windup(s);        /* align on byte boundary */
+
+  if (header) {
+    put_short(s, len);
+    put_short(s, ~len);
+  }
+//  while (len--) {
+//    put_byte(s, *buf++);
+//  }
+  utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);
+  s.pending += len;
+}
+
+/* ===========================================================================
+ * Compares to subtrees, using the tree depth as tie breaker when
+ * the subtrees have equal frequency. This minimizes the worst case length.
+ */
+function smaller(tree, n, m, depth) {
+  var _n2 = n*2;
+  var _m2 = m*2;
+  return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||
+         (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));
+}
+
+/* ===========================================================================
+ * Restore the heap property by moving down the tree starting at node k,
+ * exchanging a node with the smallest of its two sons if necessary, stopping
+ * when the heap property is re-established (each father smaller than its
+ * two sons).
+ */
+function pqdownheap(s, tree, k)
+//    deflate_state *s;
+//    ct_data *tree;  /* the tree to restore */
+//    int k;               /* node to move down */
+{
+  var v = s.heap[k];
+  var j = k << 1;  /* left son of k */
+  while (j <= s.heap_len) {
+    /* Set j to the smallest of the two sons: */
+    if (j < s.heap_len &&
+      smaller(tree, s.heap[j+1], s.heap[j], s.depth)) {
+      j++;
+    }
+    /* Exit if v is smaller than both sons */
+    if (smaller(tree, v, s.heap[j], s.depth)) { break; }
+
+    /* Exchange v with the smallest son */
+    s.heap[k] = s.heap[j];
+    k = j;
+
+    /* And continue down the tree, setting j to the left son of k */
+    j <<= 1;
+  }
+  s.heap[k] = v;
+}
+
+
+// inlined manually
+// var SMALLEST = 1;
+
+/* ===========================================================================
+ * Send the block data compressed using the given Huffman trees
+ */
+function compress_block(s, ltree, dtree)
+//    deflate_state *s;
+//    const ct_data *ltree; /* literal tree */
+//    const ct_data *dtree; /* distance tree */
+{
+  var dist;           /* distance of matched string */
+  var lc;             /* match length or unmatched char (if dist == 0) */
+  var lx = 0;         /* running index in l_buf */
+  var code;           /* the code to send */
+  var extra;          /* number of extra bits to send */
+
+  if (s.last_lit !== 0) {
+    do {
+      dist = (s.pending_buf[s.d_buf + lx*2] << 8) | (s.pending_buf[s.d_buf + lx*2 + 1]);
+      lc = s.pending_buf[s.l_buf + lx];
+      lx++;
+
+      if (dist === 0) {
+        send_code(s, lc, ltree); /* send a literal byte */
+        //Tracecv(isgraph(lc), (stderr," '%c' ", lc));
+      } else {
+        /* Here, lc is the match length - MIN_MATCH */
+        code = _length_code[lc];
+        send_code(s, code+LITERALS+1, ltree); /* send the length code */
+        extra = extra_lbits[code];
+        if (extra !== 0) {
+          lc -= base_length[code];
+          send_bits(s, lc, extra);       /* send the extra length bits */
+        }
+        dist--; /* dist is now the match distance - 1 */
+        code = d_code(dist);
+        //Assert (code < D_CODES, "bad d_code");
+
+        send_code(s, code, dtree);       /* send the distance code */
+        extra = extra_dbits[code];
+        if (extra !== 0) {
+          dist -= base_dist[code];
+          send_bits(s, dist, extra);   /* send the extra distance bits */
+        }
+      } /* literal or match pair ? */
+
+      /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
+      //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,
+      //       "pendingBuf overflow");
+
+    } while (lx < s.last_lit);
+  }
+
+  send_code(s, END_BLOCK, ltree);
+}
+
+
+/* ===========================================================================
+ * Construct one Huffman tree and assigns the code bit strings and lengths.
+ * Update the total bit length for the current block.
+ * IN assertion: the field freq is set for all tree elements.
+ * OUT assertions: the fields len and code are set to the optimal bit length
+ *     and corresponding code. The length opt_len is updated; static_len is
+ *     also updated if stree is not null. The field max_code is set.
+ */
+function build_tree(s, desc)
+//    deflate_state *s;
+//    tree_desc *desc; /* the tree descriptor */
+{
+  var tree     = desc.dyn_tree;
+  var stree    = desc.stat_desc.static_tree;
+  var has_stree = desc.stat_desc.has_stree;
+  var elems    = desc.stat_desc.elems;
+  var n, m;          /* iterate over heap elements */
+  var max_code = -1; /* largest code with non zero frequency */
+  var node;          /* new node being created */
+
+  /* Construct the initial heap, with least frequent element in
+   * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
+   * heap[0] is not used.
+   */
+  s.heap_len = 0;
+  s.heap_max = HEAP_SIZE;
+
+  for (n = 0; n < elems; n++) {
+    if (tree[n * 2]/*.Freq*/ !== 0) {
+      s.heap[++s.heap_len] = max_code = n;
+      s.depth[n] = 0;
+
+    } else {
+      tree[n*2 + 1]/*.Len*/ = 0;
+    }
+  }
+
+  /* The pkzip format requires that at least one distance code exists,
+   * and that at least one bit should be sent even if there is only one
+   * possible code. So to avoid special checks later on we force at least
+   * two codes of non zero frequency.
+   */
+  while (s.heap_len < 2) {
+    node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);
+    tree[node * 2]/*.Freq*/ = 1;
+    s.depth[node] = 0;
+    s.opt_len--;
+
+    if (has_stree) {
+      s.static_len -= stree[node*2 + 1]/*.Len*/;
+    }
+    /* node is 0 or 1 so it does not have extra bits */
+  }
+  desc.max_code = max_code;
+
+  /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
+   * establish sub-heaps of increasing lengths:
+   */
+  for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }
+
+  /* Construct the Huffman tree by repeatedly combining the least two
+   * frequent nodes.
+   */
+  node = elems;              /* next internal node of the tree */
+  do {
+    //pqremove(s, tree, n);  /* n = node of least frequency */
+    /*** pqremove ***/
+    n = s.heap[1/*SMALLEST*/];
+    s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];
+    pqdownheap(s, tree, 1/*SMALLEST*/);
+    /***/
+
+    m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */
+
+    s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */
+    s.heap[--s.heap_max] = m;
+
+    /* Create a new node father of n and m */
+    tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;
+    s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;
+    tree[n*2 + 1]/*.Dad*/ = tree[m*2 + 1]/*.Dad*/ = node;
+
+    /* and insert the new node in the heap */
+    s.heap[1/*SMALLEST*/] = node++;
+    pqdownheap(s, tree, 1/*SMALLEST*/);
+
+  } while (s.heap_len >= 2);
+
+  s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];
+
+  /* At this point, the fields freq and dad are set. We can now
+   * generate the bit lengths.
+   */
+  gen_bitlen(s, desc);
+
+  /* The field len is now set, we can generate the bit codes */
+  gen_codes(tree, max_code, s.bl_count);
+}
+
+
+/* ===========================================================================
+ * Scan a literal or distance tree to determine the frequencies of the codes
+ * in the bit length tree.
+ */
+function scan_tree(s, tree, max_code)
+//    deflate_state *s;
+//    ct_data *tree;   /* the tree to be scanned */
+//    int max_code;    /* and its largest code of non zero frequency */
+{
+  var n;                     /* iterates over all tree elements */
+  var prevlen = -1;          /* last emitted length */
+  var curlen;                /* length of current code */
+
+  var nextlen = tree[0*2 + 1]/*.Len*/; /* length of next code */
+
+  var count = 0;             /* repeat count of the current code */
+  var max_count = 7;         /* max repeat count */
+  var min_count = 4;         /* min repeat count */
+
+  if (nextlen === 0) {
+    max_count = 138;
+    min_count = 3;
+  }
+  tree[(max_code+1)*2 + 1]/*.Len*/ = 0xffff; /* guard */
+
+  for (n = 0; n <= max_code; n++) {
+    curlen = nextlen;
+    nextlen = tree[(n+1)*2 + 1]/*.Len*/;
+
+    if (++count < max_count && curlen === nextlen) {
+      continue;
+
+    } else if (count < min_count) {
+      s.bl_tree[curlen * 2]/*.Freq*/ += count;
+
+    } else if (curlen !== 0) {
+
+      if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }
+      s.bl_tree[REP_3_6*2]/*.Freq*/++;
+
+    } else if (count <= 10) {
+      s.bl_tree[REPZ_3_10*2]/*.Freq*/++;
+
+    } else {
+      s.bl_tree[REPZ_11_138*2]/*.Freq*/++;
+    }
+
+    count = 0;
+    prevlen = curlen;
+
+    if (nextlen === 0) {
+      max_count = 138;
+      min_count = 3;
+
+    } else if (curlen === nextlen) {
+      max_count = 6;
+      min_count = 3;
+
+    } else {
+      max_count = 7;
+      min_count = 4;
+    }
+  }
+}
+
+
+/* ===========================================================================
+ * Send a literal or distance tree in compressed form, using the codes in
+ * bl_tree.
+ */
+function send_tree(s, tree, max_code)
+//    deflate_state *s;
+//    ct_data *tree; /* the tree to be scanned */
+//    int max_code;       /* and its largest code of non zero frequency */
+{
+  var n;                     /* iterates over all tree elements */
+  var prevlen = -1;          /* last emitted length */
+  var curlen;                /* length of current code */
+
+  var nextlen = tree[0*2 + 1]/*.Len*/; /* length of next code */
+
+  var count = 0;             /* repeat count of the current code */
+  var max_count = 7;         /* max repeat count */
+  var min_count = 4;         /* min repeat count */
+
+  /* tree[max_code+1].Len = -1; */  /* guard already set */
+  if (nextlen === 0) {
+    max_count = 138;
+    min_count = 3;
+  }
+
+  for (n = 0; n <= max_code; n++) {
+    curlen = nextlen;
+    nextlen = tree[(n+1)*2 + 1]/*.Len*/;
+
+    if (++count < max_count && curlen === nextlen) {
+      continue;
+
+    } else if (count < min_count) {
+      do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);
+
+    } else if (curlen !== 0) {
+      if (curlen !== prevlen) {
+        send_code(s, curlen, s.bl_tree);
+        count--;
+      }
+      //Assert(count >= 3 && count <= 6, " 3_6?");
+      send_code(s, REP_3_6, s.bl_tree);
+      send_bits(s, count-3, 2);
+
+    } else if (count <= 10) {
+      send_code(s, REPZ_3_10, s.bl_tree);
+      send_bits(s, count-3, 3);
+
+    } else {
+      send_code(s, REPZ_11_138, s.bl_tree);
+      send_bits(s, count-11, 7);
+    }
+
+    count = 0;
+    prevlen = curlen;
+    if (nextlen === 0) {
+      max_count = 138;
+      min_count = 3;
+
+    } else if (curlen === nextlen) {
+      max_count = 6;
+      min_count = 3;
+
+    } else {
+      max_count = 7;
+      min_count = 4;
+    }
+  }
+}
+
+
+/* ===========================================================================
+ * Construct the Huffman tree for the bit lengths and return the index in
+ * bl_order of the last bit length code to send.
+ */
+function build_bl_tree(s) {
+  var max_blindex;  /* index of last bit length code of non zero freq */
+
+  /* Determine the bit length frequencies for literal and distance trees */
+  scan_tree(s, s.dyn_ltree, s.l_desc.max_code);
+  scan_tree(s, s.dyn_dtree, s.d_desc.max_code);
+
+  /* Build the bit length tree: */
+  build_tree(s, s.bl_desc);
+  /* opt_len now includes the length of the tree representations, except
+   * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
+   */
+
+  /* Determine the number of bit length codes to send. The pkzip format
+   * requires that at least 4 bit length codes be sent. (appnote.txt says
+   * 3 but the actual value used is 4.)
+   */
+  for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
+    if (s.bl_tree[bl_order[max_blindex]*2 + 1]/*.Len*/ !== 0) {
+      break;
+    }
+  }
+  /* Update opt_len to include the bit length tree and counts */
+  s.opt_len += 3*(max_blindex+1) + 5+5+4;
+  //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
+  //        s->opt_len, s->static_len));
+
+  return max_blindex;
+}
+
+
+/* ===========================================================================
+ * Send the header for a block using dynamic Huffman trees: the counts, the
+ * lengths of the bit length codes, the literal tree and the distance tree.
+ * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
+ */
+function send_all_trees(s, lcodes, dcodes, blcodes)
+//    deflate_state *s;
+//    int lcodes, dcodes, blcodes; /* number of codes for each tree */
+{
+  var rank;                    /* index in bl_order */
+
+  //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
+  //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
+  //        "too many codes");
+  //Tracev((stderr, "\nbl counts: "));
+  send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */
+  send_bits(s, dcodes-1,   5);
+  send_bits(s, blcodes-4,  4); /* not -3 as stated in appnote.txt */
+  for (rank = 0; rank < blcodes; rank++) {
+    //Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
+    send_bits(s, s.bl_tree[bl_order[rank]*2 + 1]/*.Len*/, 3);
+  }
+  //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
+
+  send_tree(s, s.dyn_ltree, lcodes-1); /* literal tree */
+  //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
+
+  send_tree(s, s.dyn_dtree, dcodes-1); /* distance tree */
+  //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
+}
+
+
+/* ===========================================================================
+ * Check if the data type is TEXT or BINARY, using the following algorithm:
+ * - TEXT if the two conditions below are satisfied:
+ *    a) There are no non-portable control characters belonging to the
+ *       "black list" (0..6, 14..25, 28..31).
+ *    b) There is at least one printable character belonging to the
+ *       "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).
+ * - BINARY otherwise.
+ * - The following partially-portable control characters form a
+ *   "gray list" that is ignored in this detection algorithm:
+ *   (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).
+ * IN assertion: the fields Freq of dyn_ltree are set.
+ */
+function detect_data_type(s) {
+  /* black_mask is the bit mask of black-listed bytes
+   * set bits 0..6, 14..25, and 28..31
+   * 0xf3ffc07f = binary 11110011111111111100000001111111
+   */
+  var black_mask = 0xf3ffc07f;
+  var n;
+
+  /* Check for non-textual ("black-listed") bytes. */
+  for (n = 0; n <= 31; n++, black_mask >>>= 1) {
+    if ((black_mask & 1) && (s.dyn_ltree[n*2]/*.Freq*/ !== 0)) {
+      return Z_BINARY;
+    }
+  }
+
+  /* Check for textual ("white-listed") bytes. */
+  if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||
+      s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {
+    return Z_TEXT;
+  }
+  for (n = 32; n < LITERALS; n++) {
+    if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {
+      return Z_TEXT;
+    }
+  }
+
+  /* There are no "black-listed" or "white-listed" bytes:
+   * this stream either is empty or has tolerated ("gray-listed") bytes only.
+   */
+  return Z_BINARY;
+}
+
+
+var static_init_done = false;
+
+/* ===========================================================================
+ * Initialize the tree data structures for a new zlib stream.
+ */
+function _tr_init(s)
+{
+
+  if (!static_init_done) {
+    tr_static_init();
+    static_init_done = true;
+  }
+
+  s.l_desc  = new TreeDesc(s.dyn_ltree, static_l_desc);
+  s.d_desc  = new TreeDesc(s.dyn_dtree, static_d_desc);
+  s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);
+
+  s.bi_buf = 0;
+  s.bi_valid = 0;
+
+  /* Initialize the first block of the first file: */
+  init_block(s);
+}
+
+
+/* ===========================================================================
+ * Send a stored block
+ */
+function _tr_stored_block(s, buf, stored_len, last)
+//DeflateState *s;
+//charf *buf;       /* input block */
+//ulg stored_len;   /* length of input block */
+//int last;         /* one if this is the last block for a file */
+{
+  send_bits(s, (STORED_BLOCK<<1)+(last ? 1 : 0), 3);    /* send block type */
+  copy_block(s, buf, stored_len, true); /* with header */
+}
+
+
+/* ===========================================================================
+ * Send one empty static block to give enough lookahead for inflate.
+ * This takes 10 bits, of which 7 may remain in the bit buffer.
+ */
+function _tr_align(s) {
+  send_bits(s, STATIC_TREES<<1, 3);
+  send_code(s, END_BLOCK, static_ltree);
+  bi_flush(s);
+}
+
+
+/* ===========================================================================
+ * Determine the best encoding for the current block: dynamic trees, static
+ * trees or store, and output the encoded block to the zip file.
+ */
+function _tr_flush_block(s, buf, stored_len, last)
+//DeflateState *s;
+//charf *buf;       /* input block, or NULL if too old */
+//ulg stored_len;   /* length of input block */
+//int last;         /* one if this is the last block for a file */
+{
+  var opt_lenb, static_lenb;  /* opt_len and static_len in bytes */
+  var max_blindex = 0;        /* index of last bit length code of non zero freq */
+
+  /* Build the Huffman trees unless a stored block is forced */
+  if (s.level > 0) {
+
+    /* Check if the file is binary or text */
+    if (s.strm.data_type === Z_UNKNOWN) {
+      s.strm.data_type = detect_data_type(s);
+    }
+
+    /* Construct the literal and distance trees */
+    build_tree(s, s.l_desc);
+    // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
+    //        s->static_len));
+
+    build_tree(s, s.d_desc);
+    // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
+    //        s->static_len));
+    /* At this point, opt_len and static_len are the total bit lengths of
+     * the compressed block data, excluding the tree representations.
+     */
+
+    /* Build the bit length tree for the above two trees, and get the index
+     * in bl_order of the last bit length code to send.
+     */
+    max_blindex = build_bl_tree(s);
+
+    /* Determine the best encoding. Compute the block lengths in bytes. */
+    opt_lenb = (s.opt_len+3+7) >>> 3;
+    static_lenb = (s.static_len+3+7) >>> 3;
+
+    // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
+    //        opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
+    //        s->last_lit));
+
+    if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }
+
+  } else {
+    // Assert(buf != (char*)0, "lost buf");
+    opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
+  }
+
+  if ((stored_len+4 <= opt_lenb) && (buf !== -1)) {
+    /* 4: two words for the lengths */
+
+    /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
+     * Otherwise we can't have processed more than WSIZE input bytes since
+     * the last block flush, because compression would have been
+     * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
+     * transform a block into a stored block.
+     */
+    _tr_stored_block(s, buf, stored_len, last);
+
+  } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {
+
+    send_bits(s, (STATIC_TREES<<1) + (last ? 1 : 0), 3);
+    compress_block(s, static_ltree, static_dtree);
+
+  } else {
+    send_bits(s, (DYN_TREES<<1) + (last ? 1 : 0), 3);
+    send_all_trees(s, s.l_desc.max_code+1, s.d_desc.max_code+1, max_blindex+1);
+    compress_block(s, s.dyn_ltree, s.dyn_dtree);
+  }
+  // Assert (s->compressed_len == s->bits_sent, "bad compressed size");
+  /* The above check is made mod 2^32, for files larger than 512 MB
+   * and uLong implemented on 32 bits.
+   */
+  init_block(s);
+
+  if (last) {
+    bi_windup(s);
+  }
+  // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
+  //       s->compressed_len-7*last));
+}
+
+/* ===========================================================================
+ * Save the match info and tally the frequency counts. Return true if
+ * the current block must be flushed.
+ */
+function _tr_tally(s, dist, lc)
+//    deflate_state *s;
+//    unsigned dist;  /* distance of matched string */
+//    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */
+{
+  //var out_length, in_length, dcode;
+
+  s.pending_buf[s.d_buf + s.last_lit * 2]     = (dist >>> 8) & 0xff;
+  s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;
+
+  s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;
+  s.last_lit++;
+
+  if (dist === 0) {
+    /* lc is the unmatched char */
+    s.dyn_ltree[lc*2]/*.Freq*/++;
+  } else {
+    s.matches++;
+    /* Here, lc is the match length - MIN_MATCH */
+    dist--;             /* dist = match distance - 1 */
+    //Assert((ush)dist < (ush)MAX_DIST(s) &&
+    //       (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
+    //       (ush)d_code(dist) < (ush)D_CODES,  "_tr_tally: bad match");
+
+    s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;
+    s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;
+  }
+
+// (!) This block is disabled in zlib defailts,
+// don't enable it for binary compatibility
+
+//#ifdef TRUNCATE_BLOCK
+//  /* Try to guess if it is profitable to stop the current block here */
+//  if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {
+//    /* Compute an upper bound for the compressed length */
+//    out_length = s.last_lit*8;
+//    in_length = s.strstart - s.block_start;
+//
+//    for (dcode = 0; dcode < D_CODES; dcode++) {
+//      out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);
+//    }
+//    out_length >>>= 3;
+//    //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
+//    //       s->last_lit, in_length, out_length,
+//    //       100L - out_length*100L/in_length));
+//    if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {
+//      return true;
+//    }
+//  }
+//#endif
+
+  return (s.last_lit === s.lit_bufsize-1);
+  /* We avoid equality with lit_bufsize because of wraparound at 64K
+   * on 16 bit machines and because stored blocks are restricted to
+   * 64K-1 bytes.
+   */
+}
+
+exports._tr_init  = _tr_init;
+exports._tr_stored_block = _tr_stored_block;
+exports._tr_flush_block  = _tr_flush_block;
+exports._tr_tally = _tr_tally;
+exports._tr_align = _tr_align;
+},{"../utils/common":27}],39:[function(_dereq_,module,exports){
+'use strict';
+
+
+function ZStream() {
+  /* next input byte */
+  this.input = null; // JS specific, because we have no pointers
+  this.next_in = 0;
+  /* number of bytes available at input */
+  this.avail_in = 0;
+  /* total number of input bytes read so far */
+  this.total_in = 0;
+  /* next output byte should be put there */
+  this.output = null; // JS specific, because we have no pointers
+  this.next_out = 0;
+  /* remaining free space at output */
+  this.avail_out = 0;
+  /* total number of bytes output so far */
+  this.total_out = 0;
+  /* last error message, NULL if no error */
+  this.msg = ''/*Z_NULL*/;
+  /* not visible by applications */
+  this.state = null;
+  /* best guess about the data type: binary or text */
+  this.data_type = 2/*Z_UNKNOWN*/;
+  /* adler32 value of the uncompressed data */
+  this.adler = 0;
+}
+
+module.exports = ZStream;
+},{}]},{},[9])
+(9)
+});
Index: EcnlProtoTool/trunk/webapp/webmrbc/js/jszip.min.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/js/jszip.min.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/js/jszip.min.js	(revision 270)
@@ -0,0 +1,14 @@
+/*!
+
+JSZip - A Javascript class for generating and reading zip files
+<http://stuartk.com/jszip>
+
+(c) 2009-2014 Stuart Knightley <stuart [at] stuartk.com>
+Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown.
+
+JSZip uses the library pako released under the MIT license :
+https://github.com/nodeca/pako/blob/master/LICENSE
+*/
+!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.JSZip=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";c.encode=function(a){for(var b,c,e,f,g,h,i,j="",k=0;k<a.length;)b=a.charCodeAt(k++),c=a.charCodeAt(k++),e=a.charCodeAt(k++),f=b>>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k<a.length;)f=d.indexOf(a.charAt(k++)),g=d.indexOf(a.charAt(k++)),h=d.indexOf(a.charAt(k++)),i=d.indexOf(a.charAt(k++)),b=f<<2|g>>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){"use strict";function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":8}],4:[function(a,b){"use strict";var c=a("./utils"),d=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];b.exports=function(a,b){if("undefined"==typeof a||!a.length)return 0;var e="string"!==c.getTypeOf(a);"undefined"==typeof b&&(b=0);var f=0,g=0,h=0;b=-1^b;for(var i=0,j=a.length;j>i;i++)h=e?a[i]:a.charCodeAt(i),g=255&(b^h),f=d[g],b=b>>>8^f;return-1^b}},{"./utils":21}],5:[function(a,b){"use strict";function c(){this.data=null,this.length=0,this.index=0}var d=a("./utils");c.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<a||0>a)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return d.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=c},{"./utils":21}],6:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!1,c.date=null,c.compression=null,c.comment=null},{}],7:[function(a,b,c){"use strict";var d=a("./utils");c.string2binary=function(a){return d.string2binary(a)},c.string2Uint8Array=function(a){return d.transformTo("uint8array",a)},c.uint8Array2String=function(a){return d.transformTo("string",a)},c.string2Blob=function(a){var b=d.transformTo("arraybuffer",a);return d.arrayBuffer2Blob(b)},c.arrayBuffer2Blob=function(a){return d.arrayBuffer2Blob(a)},c.transformTo=function(a,b){return d.transformTo(a,b)},c.getTypeOf=function(a){return d.getTypeOf(a)},c.checkSupport=function(a){return d.checkSupport(a)},c.MAX_VALUE_16BITS=d.MAX_VALUE_16BITS,c.MAX_VALUE_32BITS=d.MAX_VALUE_32BITS,c.pretty=function(a){return d.pretty(a)},c.findCompression=function(a){return d.findCompression(a)},c.isRegExp=function(a){return d.isRegExp(a)}},{"./utils":21}],8:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("pako");c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){return e.deflateRaw(a)},c.uncompress=function(a){return e.inflateRaw(a)}},{pako:24}],9:[function(a,b){"use strict";function c(a,b){return this instanceof c?(this.files={},this.comment=null,this.root="",a&&this.load(a,b),void(this.clone=function(){var a=new c;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a})):new c(a,b)}var d=a("./base64");c.prototype=a("./object"),c.prototype.load=a("./load"),c.support=a("./support"),c.defaults=a("./defaults"),c.utils=a("./deprecatedPublicUtils"),c.base64={encode:function(a){return d.encode(a)},decode:function(a){return d.decode(a)}},c.compressions=a("./compressions"),b.exports=c},{"./base64":1,"./compressions":3,"./defaults":6,"./deprecatedPublicUtils":7,"./load":10,"./object":13,"./support":17}],10:[function(a,b){"use strict";var c=a("./base64"),d=a("./zipEntries");b.exports=function(a,b){var e,f,g,h;for(b=b||{},b.base64&&(a=c.decode(a)),f=new d(a,b),e=f.files,g=0;g<e.length;g++)h=e[g],this.file(h.fileName,h.decompressed,{binary:!0,optimizedBinaryString:!0,date:h.date,dir:h.dir,comment:h.fileComment.length?h.fileComment:null,createFolders:b.createFolders});return f.zipComment.length&&(this.comment=f.zipComment),this}},{"./base64":1,"./zipEntries":22}],11:[function(a,b){(function(a){"use strict";b.exports=function(b,c){return new a(b,c)},b.exports.test=function(b){return a.isBuffer(b)}}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{}],12:[function(a,b){"use strict";function c(a){this.data=a,this.length=this.data.length,this.index=0}var d=a("./uint8ArrayReader");c.prototype=new d,c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./uint8ArrayReader":18}],13:[function(a,b){"use strict";var c=a("./support"),d=a("./utils"),e=a("./crc32"),f=a("./signature"),g=a("./defaults"),h=a("./base64"),i=a("./compressions"),j=a("./compressedObject"),k=a("./nodeBuffer"),l=a("./utf8"),m=a("./stringWriter"),n=a("./uint8ArrayWriter"),o=function(a){if(a._data instanceof j&&(a._data=a._data.getContent(),a.options.binary=!0,a.options.base64=!1,"uint8array"===d.getTypeOf(a._data))){var b=a._data;a._data=new Uint8Array(b.length),0!==b.length&&a._data.set(b,0)}return a._data},p=function(a){var b=o(a),e=d.getTypeOf(b);return"string"===e?!a.options.binary&&c.nodebuffer?k(b,"utf-8"):a.asBinary():b},q=function(a){var b=o(this);return null===b||"undefined"==typeof b?"":(this.options.base64&&(b=h.decode(b)),b=a&&this.options.binary?A.utf8decode(b):d.transformTo("string",b),a||this.options.binary||(b=d.transformTo("string",A.utf8encode(b))),b)},r=function(a,b,c){this.name=a,this.dir=c.dir,this.date=c.date,this.comment=c.comment,this._data=b,this.options=c,this._initialMetadata={dir:c.dir,date:c.date}};r.prototype={asText:function(){return q.call(this,!0)},asBinary:function(){return q.call(this,!1)},asNodeBuffer:function(){var a=p(this);return d.transformTo("nodebuffer",a)},asUint8Array:function(){var a=p(this);return d.transformTo("uint8array",a)},asArrayBuffer:function(){return this.asUint8Array().buffer}};var s=function(a,b){var c,d="";for(c=0;b>c;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},t=function(){var a,b,c={};for(a=0;a<arguments.length;a++)for(b in arguments[a])arguments[a].hasOwnProperty(b)&&"undefined"==typeof c[b]&&(c[b]=arguments[a][b]);return c},u=function(a){return a=a||{},a.base64!==!0||null!==a.binary&&void 0!==a.binary||(a.binary=!0),a=t(a,g),a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),a},v=function(a,b,c){var e,f=d.getTypeOf(b);if(c=u(c),c.createFolders&&(e=w(a))&&x.call(this,e,!0),c.dir||null===b||"undefined"==typeof b)c.base64=!1,c.binary=!1,b=null;else if("string"===f)c.binary&&!c.base64&&c.optimizedBinaryString!==!0&&(b=d.string2binary(b));else{if(c.base64=!1,c.binary=!0,!(f||b instanceof j))throw new Error("The data of '"+a+"' is in an unsupported format !");"arraybuffer"===f&&(b=d.transformTo("uint8array",b))}var g=new r(a,b,c);return this.files[a]=g,g},w=function(a){"/"==a.slice(-1)&&(a=a.substring(0,a.length-1));var b=a.lastIndexOf("/");return b>0?a.substring(0,b):""},x=function(a,b){return"/"!=a.slice(-1)&&(a+="/"),b="undefined"!=typeof b?b:!1,this.files[a]||v.call(this,a,null,{dir:!0,createFolders:b}),this.files[a]},y=function(a,b){var c,f=new j;return a._data instanceof j?(f.uncompressedSize=a._data.uncompressedSize,f.crc32=a._data.crc32,0===f.uncompressedSize||a.dir?(b=i.STORE,f.compressedContent="",f.crc32=0):a._data.compressionMethod===b.magic?f.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),f.compressedContent=b.compress(d.transformTo(b.compressInputType,c)))):(c=p(a),(!c||0===c.length||a.dir)&&(b=i.STORE,c=""),f.uncompressedSize=c.length,f.crc32=e(c),f.compressedContent=b.compress(d.transformTo(b.compressInputType,c))),f.compressedSize=f.compressedContent.length,f.compressionMethod=b.magic,f},z=function(a,b,c,g){var h,i,j,k,m=(c.compressedContent,d.transformTo("string",l.utf8encode(b.name))),n=b.comment||"",o=d.transformTo("string",l.utf8encode(n)),p=m.length!==b.name.length,q=o.length!==n.length,r=b.options,t="",u="",v="";j=b._initialMetadata.dir!==b.dir?b.dir:r.dir,k=b._initialMetadata.date!==b.date?b.date:r.date,h=k.getHours(),h<<=6,h|=k.getMinutes(),h<<=5,h|=k.getSeconds()/2,i=k.getFullYear()-1980,i<<=4,i|=k.getMonth()+1,i<<=5,i|=k.getDate(),p&&(u=s(1,1)+s(e(m),4)+m,t+="up"+s(u.length,2)+u),q&&(v=s(1,1)+s(this.crc32(o),4)+o,t+="uc"+s(v.length,2)+v);var w="";w+="\n\x00",w+=p||q?"\x00\b":"\x00\x00",w+=c.compressionMethod,w+=s(h,2),w+=s(i,2),w+=s(c.crc32,4),w+=s(c.compressedSize,4),w+=s(c.uncompressedSize,4),w+=s(m.length,2),w+=s(t.length,2);var x=f.LOCAL_FILE_HEADER+w+m+t,y=f.CENTRAL_FILE_HEADER+"\x00"+w+s(o.length,2)+"\x00\x00\x00\x00"+(j===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+s(g,4)+m+t+o;return{fileRecord:x,dirRecord:y,compressedObject:c}},A={load:function(){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new r(d.name,d._data,t(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(d.isRegExp(a)){var e=a;return this.filter(function(a,b){return!b.dir&&e.test(a)})}return this.filter(function(b,c){return!c.dir&&b===a})[0]||null}return a=this.root+a,v.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(d.isRegExp(a))return this.filter(function(b,c){return c.dir&&a.test(b)});var b=this.root+a,c=x.call(this,b),e=this.clone();return e.root=c.name,e},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b&&!b.dir)delete this.files[a];else for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;d<c.length;d++)delete this.files[c[d].name];return this},generate:function(a){a=t(a||{},{base64:!0,compression:"STORE",type:"base64",comment:null}),d.checkSupport(a.type);var b,c,e=[],g=0,j=0,k=d.transformTo("string",this.utf8encode(a.comment||this.comment||""));for(var l in this.files)if(this.files.hasOwnProperty(l)){var o=this.files[l],p=o.options.compression||a.compression.toUpperCase(),q=i[p];if(!q)throw new Error(p+" is not a valid compression method !");var r=y.call(this,o,q),u=z.call(this,l,o,r,g);g+=u.fileRecord.length+r.compressedSize,j+=u.dirRecord.length,e.push(u)}var v="";v=f.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+s(e.length,2)+s(e.length,2)+s(j,4)+s(g,4)+s(k.length,2)+k;var w=a.type.toLowerCase();for(b="uint8array"===w||"arraybuffer"===w||"blob"===w||"nodebuffer"===w?new n(g+j+v.length):new m(g+j+v.length),c=0;c<e.length;c++)b.append(e[c].fileRecord),b.append(e[c].compressedObject.compressedContent);for(c=0;c<e.length;c++)b.append(e[c].dirRecord);b.append(v);var x=b.finalize();switch(a.type.toLowerCase()){case"uint8array":case"arraybuffer":case"nodebuffer":return d.transformTo(a.type.toLowerCase(),x);case"blob":return d.arrayBuffer2Blob(d.transformTo("arraybuffer",x));case"base64":return a.base64?h.encode(x):x;default:return x}},crc32:function(a,b){return e(a,b)},utf8encode:function(a){return d.transformTo("string",l.utf8encode(a))},utf8decode:function(a){return l.utf8decode(a)}};b.exports=A},{"./base64":1,"./compressedObject":2,"./compressions":3,"./crc32":4,"./defaults":6,"./nodeBuffer":11,"./signature":14,"./stringWriter":16,"./support":17,"./uint8ArrayWriter":19,"./utf8":20,"./utils":21}],14:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],15:[function(a,b){"use strict";function c(a,b){this.data=a,b||(this.data=e.string2binary(this.data)),this.length=this.data.length,this.index=0}var d=a("./dataReader"),e=a("./utils");c.prototype=new d,c.prototype.byteAt=function(a){return this.data.charCodeAt(a)},c.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":5,"./utils":21}],16:[function(a,b){"use strict";var c=a("./utils"),d=function(){this.data=[]};d.prototype={append:function(a){a=c.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}},b.exports=d},{"./utils":21}],17:[function(a,b,c){(function(a){"use strict";if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer="undefined"!=typeof a,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var b=new ArrayBuffer(0);try{c.blob=0===new Blob([b],{type:"application/zip"}).size}catch(d){try{var e=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,f=new e;f.append(b),c.blob=0===f.getBlob("application/zip").size}catch(d){c.blob=!1}}}}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{}],18:[function(a,b){"use strict";function c(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var d=a("./dataReader");c.prototype=new d,c.prototype.byteAt=function(a){return this.data[a]},c.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},c.prototype.readData=function(a){if(this.checkOffset(a),0===a)return new Uint8Array(0);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":5}],19:[function(a,b){"use strict";var c=a("./utils"),d=function(a){this.data=new Uint8Array(a),this.index=0};d.prototype={append:function(a){0!==a.length&&(a=c.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}},b.exports=d},{"./utils":21}],20:[function(a,b,c){"use strict";for(var d=a("./utils"),e=a("./support"),f=a("./nodeBuffer"),g=new Array(256),h=0;256>h;h++)g[h]=h>=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;g[254]=g[254]=1;var i=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=e.uint8array?new Uint8Array(i):new Array(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},j=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+g[a[c]]>b?c:b},k=function(a){var b,c,e,f,h=a.length,i=new Array(2*h);for(c=0,b=0;h>b;)if(e=a[b++],128>e)i[c++]=e;else if(f=g[e],f>4)i[c++]=65533,b+=f-1;else{for(e&=2===f?31:3===f?15:7;f>1&&h>b;)e=e<<6|63&a[b++],f--;f>1?i[c++]=65533:65536>e?i[c++]=e:(e-=65536,i[c++]=55296|e>>10&1023,i[c++]=56320|1023&e)}return i.length!==c&&(i.subarray?i=i.subarray(0,c):i.length=c),d.applyFromCharCode(i)};c.utf8encode=function(a){return e.nodebuffer?f(a,"utf-8"):i(a)},c.utf8decode=function(a){if(e.nodebuffer)return d.transformTo("nodebuffer",a).toString("utf-8");a=d.transformTo(e.uint8array?"uint8array":"array",a);for(var b=[],c=0,f=a.length,g=65536;f>c;){var h=j(a,Math.min(c+g,f));b.push(e.uint8array?k(a.subarray(c,h)):k(a.slice(c,h))),c=h}return b.join("")}},{"./nodeBuffer":11,"./support":17,"./utils":21}],21:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;c<a.length;++c)b[c]=255&a.charCodeAt(c);return b}function f(a){var b=65536,d=[],e=a.length,f=c.getTypeOf(a),g=0,h=!0;try{switch(f){case"uint8array":String.fromCharCode.apply(null,new Uint8Array(0));break;case"nodebuffer":String.fromCharCode.apply(null,j(0))}}catch(i){h=!1}if(!h){for(var k="",l=0;l<a.length;l++)k+=String.fromCharCode(a[l]);return k}for(;e>g&&b>1;)try{d.push("array"===f||"nodebuffer"===f?String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e))):String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;c<a.length;c++)b[c]=a[c];return b}var h=a("./support"),i=a("./compressions"),j=a("./nodeBuffer");c.string2binary=function(a){for(var b="",c=0;c<a.length;c++)b+=String.fromCharCode(255&a.charCodeAt(c));return b},c.arrayBuffer2Blob=function(a){c.checkSupport("blob");try{return new Blob([a],{type:"application/zip"})}catch(b){try{var d=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,e=new d;return e.append(a),e.getBlob("application/zip")}catch(b){throw new Error("Bug : can't construct the Blob.")}}},c.applyFromCharCode=f;var k={};k.string={string:d,array:function(a){return e(a,new Array(a.length))},arraybuffer:function(a){return k.string.uint8array(a).buffer},uint8array:function(a){return e(a,new Uint8Array(a.length))},nodebuffer:function(a){return e(a,j(a.length))}},k.array={string:f,array:d,arraybuffer:function(a){return new Uint8Array(a).buffer},uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return j(a)}},k.arraybuffer={string:function(a){return f(new Uint8Array(a))},array:function(a){return g(new Uint8Array(a),new Array(a.byteLength))},arraybuffer:d,uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return j(new Uint8Array(a))}},k.uint8array={string:f,array:function(a){return g(a,new Array(a.length))},arraybuffer:function(a){return a.buffer},uint8array:d,nodebuffer:function(a){return j(a)}},k.nodebuffer={string:f,array:function(a){return g(a,new Array(a.length))},arraybuffer:function(a){return k.nodebuffer.uint8array(a).buffer},uint8array:function(a){return g(a,new Uint8Array(a.length))},nodebuffer:d},c.transformTo=function(a,b){if(b||(b=""),!a)return b;c.checkSupport(a);var d=c.getTypeOf(b),e=k[d][a](b);return e},c.getTypeOf=function(a){return"string"==typeof a?"string":"[object Array]"===Object.prototype.toString.call(a)?"array":h.nodebuffer&&j.test(a)?"nodebuffer":h.uint8array&&a instanceof Uint8Array?"uint8array":h.arraybuffer&&a instanceof ArrayBuffer?"arraybuffer":void 0},c.checkSupport=function(a){var b=h[a.toLowerCase()];if(!b)throw new Error(a+" is not supported by this browser")},c.MAX_VALUE_16BITS=65535,c.MAX_VALUE_32BITS=-1,c.pretty=function(a){var b,c,d="";for(c=0;c<(a||"").length;c++)b=a.charCodeAt(c),d+="\\x"+(16>b?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":11,"./support":17}],22:[function(a,b){"use strict";function c(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var d=a("./stringReader"),e=a("./nodeBufferReader"),f=a("./uint8ArrayReader"),g=a("./utils"),h=a("./signature"),i=a("./zipEntry"),j=a("./support"),k=a("./object");c.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+g.pretty(b)+", expected "+g.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength),this.zipComment=k.utf8decode(this.zipComment)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a<this.files.length;a++)b=this.files[a],this.reader.setIndex(b.localHeaderOffset),this.checkSignature(h.LOCAL_FILE_HEADER),b.readLocalPart(this.reader),b.handleUTF8()},readCentralDir:function(){var a;for(this.reader.setIndex(this.centralDirOffset);this.reader.readString(4)===h.CENTRAL_FILE_HEADER;)a=new i({zip64:this.zip64},this.loadOptions),a.readCentralPart(this.reader),this.files.push(a)},readEndOfCentral:function(){var a=this.reader.lastIndexOfSignature(h.CENTRAL_DIRECTORY_END);if(-1===a)throw new Error("Corrupted zip : can't find end of central directory");if(this.reader.setIndex(a),this.checkSignature(h.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===g.MAX_VALUE_16BITS||this.diskWithCentralDirStart===g.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===g.MAX_VALUE_16BITS||this.centralDirRecords===g.MAX_VALUE_16BITS||this.centralDirSize===g.MAX_VALUE_32BITS||this.centralDirOffset===g.MAX_VALUE_32BITS){if(this.zip64=!0,a=this.reader.lastIndexOfSignature(h.ZIP64_CENTRAL_DIRECTORY_LOCATOR),-1===a)throw new Error("Corrupted zip : can't find the ZIP64 end of central directory locator");this.reader.setIndex(a),this.checkSignature(h.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(h.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}},prepareReader:function(a){var b=g.getTypeOf(a);this.reader="string"!==b||j.uint8array?"nodebuffer"===b?new e(a):new f(g.transformTo("uint8array",a)):new d(a,this.loadOptions.optimizedBinaryString)},load:function(a){this.prepareReader(a),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},b.exports=c},{"./nodeBufferReader":12,"./object":13,"./signature":14,"./stringReader":15,"./support":17,"./uint8ArrayReader":18,"./utils":21,"./zipEntry":23}],23:[function(a,b){"use strict";function c(a,b){this.options=a,this.loadOptions=b}var d=a("./stringReader"),e=a("./utils"),f=a("./compressedObject"),g=a("./object");c.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},prepareCompressedContent:function(a,b,c){return function(){var d=a.index;a.setIndex(b);var e=a.readData(c);return a.setIndex(d),e}},prepareContent:function(a,b,c,d,f){return function(){var a=e.transformTo(d.uncompressInputType,this.getCompressedContent()),b=d.uncompress(a);if(b.length!==f)throw new Error("Bug : uncompressed data size mismatch");return b}},readLocalPart:function(a){var b,c;if(a.skip(22),this.fileNameLength=a.readInt(2),c=a.readInt(2),this.fileName=a.readString(this.fileNameLength),a.skip(c),-1==this.compressedSize||-1==this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize == -1 || uncompressedSize == -1)");if(b=e.findCompression(this.compressionMethod),null===b)throw new Error("Corrupted zip : compression "+e.pretty(this.compressionMethod)+" unknown (inner file : "+this.fileName+")");if(this.decompressed=new f,this.decompressed.compressedSize=this.compressedSize,this.decompressed.uncompressedSize=this.uncompressedSize,this.decompressed.crc32=this.crc32,this.decompressed.compressionMethod=this.compressionMethod,this.decompressed.getCompressedContent=this.prepareCompressedContent(a,a.index,this.compressedSize,b),this.decompressed.getContent=this.prepareContent(a,a.index,this.compressedSize,b,this.uncompressedSize),this.loadOptions.checkCRC32&&(this.decompressed=e.transformTo("string",this.decompressed.getContent()),g.crc32(this.decompressed)!==this.crc32))throw new Error("Corrupted zip : CRC32 mismatch")},readCentralPart:function(a){if(this.versionMadeBy=a.readString(2),this.versionNeeded=a.readInt(2),this.bitFlag=a.readInt(2),this.compressionMethod=a.readString(2),this.date=a.readDate(),this.crc32=a.readInt(4),this.compressedSize=a.readInt(4),this.uncompressedSize=a.readInt(4),this.fileNameLength=a.readInt(2),this.extraFieldsLength=a.readInt(2),this.fileCommentLength=a.readInt(2),this.diskNumberStart=a.readInt(2),this.internalFileAttributes=a.readInt(2),this.externalFileAttributes=a.readInt(4),this.localHeaderOffset=a.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");this.fileName=a.readString(this.fileNameLength),this.readExtraFields(a),this.parseZIP64ExtraField(a),this.fileComment=a.readString(this.fileCommentLength),this.dir=16&this.externalFileAttributes?!0:!1},parseZIP64ExtraField:function(){if(this.extraFields[1]){var a=new d(this.extraFields[1].value);this.uncompressedSize===e.MAX_VALUE_32BITS&&(this.uncompressedSize=a.readInt(8)),this.compressedSize===e.MAX_VALUE_32BITS&&(this.compressedSize=a.readInt(8)),this.localHeaderOffset===e.MAX_VALUE_32BITS&&(this.localHeaderOffset=a.readInt(8)),this.diskNumberStart===e.MAX_VALUE_32BITS&&(this.diskNumberStart=a.readInt(4))}},readExtraFields:function(a){var b,c,d,e=a.index;for(this.extraFields=this.extraFields||{};a.index<e+this.extraFieldsLength;)b=a.readInt(2),c=a.readInt(2),d=a.readString(c),this.extraFields[b]={id:b,length:c,value:d}},handleUTF8:function(){if(this.useUTF8())this.fileName=g.utf8decode(this.fileName),this.fileComment=g.utf8decode(this.fileComment);else{var a=this.findExtraFieldUnicodePath();null!==a&&(this.fileName=a);var b=this.findExtraFieldUnicodeComment();null!==b&&(this.fileComment=b)}},findExtraFieldUnicodePath:function(){var a=this.extraFields[28789];if(a){var b=new d(a.value);return 1!==b.readInt(1)?null:g.crc32(this.fileName)!==b.readInt(4)?null:g.utf8decode(b.readString(a.length-5))}return null},findExtraFieldUnicodeComment:function(){var a=this.extraFields[25461];if(a){var b=new d(a.value);return 1!==b.readInt(1)?null:g.crc32(this.fileComment)!==b.readInt(4)?null:g.utf8decode(b.readString(a.length-5))}return null}},b.exports=c},{"./compressedObject":2,"./object":13,"./stringReader":15,"./utils":21}],24:[function(a,b){"use strict";var c=a("./lib/utils/common").assign,d=a("./lib/deflate"),e=a("./lib/inflate"),f=a("./lib/zlib/constants"),g={};c(g,d,e,f),b.exports=g},{"./lib/deflate":25,"./lib/inflate":26,"./lib/utils/common":27,"./lib/zlib/constants":30}],25:[function(a,b,c){"use strict";function d(a,b){var c=new s(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function e(a,b){return b=b||{},b.raw=!0,d(a,b)}function f(a,b){return b=b||{},b.gzip=!0,d(a,b)}var g=a("./zlib/deflate.js"),h=a("./utils/common"),i=a("./utils/strings"),j=a("./zlib/messages"),k=a("./zlib/zstream"),l=0,m=4,n=0,o=1,p=-1,q=0,r=8,s=function(a){this.options=h.assign({level:p,method:r,chunkSize:16384,windowBits:15,memLevel:8,strategy:q,to:""},a||{});var b=this.options;b.raw&&b.windowBits>0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=g.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==n)throw new Error(j[c]);b.header&&g.deflateSetHeader(this.strm,b.header)
+};s.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?m:l,e.input="string"==typeof a?i.string2buf(a):a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new h.Buf8(f),e.next_out=0,e.avail_out=f),c=g.deflate(e,d),c!==o&&c!==n)return this.onEnd(c),this.ended=!0,!1;(0===e.avail_out||0===e.avail_in&&d===m)&&this.onData("string"===this.options.to?i.buf2binstring(h.shrinkBuf(e.output,e.next_out)):h.shrinkBuf(e.output,e.next_out))}while((e.avail_in>0||0===e.avail_out)&&c!==o);return d===m?(c=g.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===n):!0},s.prototype.onData=function(a){this.chunks.push(a)},s.prototype.onEnd=function(a){a===n&&(this.result="string"===this.options.to?this.chunks.join(""):h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=s,c.deflate=d,c.deflateRaw=e,c.gzip=f},{"./utils/common":27,"./utils/strings":28,"./zlib/deflate.js":32,"./zlib/messages":37,"./zlib/zstream":39}],26:[function(a,b,c){"use strict";function d(a,b){var c=new m(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function e(a,b){return b=b||{},b.raw=!0,d(a,b)}var f=a("./zlib/inflate.js"),g=a("./utils/common"),h=a("./utils/strings"),i=a("./zlib/constants"),j=a("./zlib/messages"),k=a("./zlib/zstream"),l=a("./zlib/gzheader"),m=function(a){this.options=g.assign({chunkSize:16384,windowBits:0,to:""},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=f.inflateInit2(this.strm,b.windowBits);if(c!==i.Z_OK)throw new Error(j[c]);this.header=new l,f.inflateGetHeader(this.strm,this.header)};m.prototype.push=function(a,b){var c,d,e,j,k,l=this.strm,m=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?i.Z_FINISH:i.Z_NO_FLUSH,l.input="string"==typeof a?h.binstring2buf(a):a,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new g.Buf8(m),l.next_out=0,l.avail_out=m),c=f.inflate(l,i.Z_NO_FLUSH),c!==i.Z_STREAM_END&&c!==i.Z_OK)return this.onEnd(c),this.ended=!0,!1;l.next_out&&(0===l.avail_out||c===i.Z_STREAM_END||0===l.avail_in&&d===i.Z_FINISH)&&("string"===this.options.to?(e=h.utf8border(l.output,l.next_out),j=l.next_out-e,k=h.buf2string(l.output,e),l.next_out=j,l.avail_out=m-j,j&&g.arraySet(l.output,l.output,e,j,0),this.onData(k)):this.onData(g.shrinkBuf(l.output,l.next_out)))}while(l.avail_in>0&&c!==i.Z_STREAM_END);return c===i.Z_STREAM_END&&(d=i.Z_FINISH),d===i.Z_FINISH?(c=f.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===i.Z_OK):!0},m.prototype.onData=function(a){this.chunks.push(a)},m.prototype.onEnd=function(a){a===i.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):g.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=m,c.inflate=d,c.inflateRaw=e,c.ungzip=d},{"./utils/common":27,"./utils/strings":28,"./zlib/constants":30,"./zlib/gzheader":33,"./zlib/inflate.js":35,"./zlib/messages":37,"./zlib/zstream":39}],27:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],28:[function(a,b,c){"use strict";function d(a,b){if(65537>b&&(a.subarray&&g||!a.subarray&&f))return String.fromCharCode.apply(null,e.shrinkBuf(a,b));for(var c="",d=0;b>d;d++)c+=String.fromCharCode(a[d]);return c}var e=a("./common"),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch(h){f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){g=!1}for(var i=new e.Buf8(256),j=0;256>j;j++)i[j]=j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1;i[254]=i[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=new e.Buf8(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},c.buf2binstring=function(a){return d(a,a.length)},c.binstring2buf=function(a){for(var b=new e.Buf8(a.length),c=0,d=b.length;d>c;c++)b[c]=a.charCodeAt(c);return b},c.buf2string=function(a,b){var c,e,f,g,h=b||a.length,j=new Array(2*h);for(e=0,c=0;h>c;)if(f=a[c++],128>f)j[e++]=f;else if(g=i[f],g>4)j[e++]=65533,c+=g-1;else{for(f&=2===g?31:3===g?15:7;g>1&&h>c;)f=f<<6|63&a[c++],g--;g>1?j[e++]=65533:65536>f?j[e++]=f:(f-=65536,j[e++]=55296|f>>10&1023,j[e++]=56320|1023&f)}return d(j,e)},c.utf8border=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+i[a[c]]>b?c:b}},{"./common":27}],29:[function(a,b){"use strict";function c(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}b.exports=c},{}],30:[function(a,b){b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],31:[function(a,b){"use strict";function c(){for(var a,b=[],c=0;256>c;c++){a=c;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function d(a,b,c,d){var f=e,g=d+c;a=-1^a;for(var h=d;g>h;h++)a=a>>>8^f[255&(a^b[h])];return-1^a}var e=c();b.exports=d},{}],32:[function(a,b,c){"use strict";function d(a,b){return a.msg=G[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(C.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){D._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,C.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=E(a.adler,b,e,c):2===a.state.wrap&&(a.adler=F(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-jb?a.strstart-(a.w_size-jb):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ib,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&m>f);if(d=ib-(m-f),f=m-ib,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-jb)){C.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=hb)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+1])&a.hash_mask;a.insert&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+hb-1])&a.hash_mask,a.prev[f&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=f,f++,a.insert--,!(a.lookahead+a.insert<hb)););}while(a.lookahead<jb&&0!==a.strm.avail_in)}function n(a,b){var c=65535;for(c>a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===H)return sb;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return sb;if(a.strstart-a.block_start>=a.w_size-jb&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?sb:sb}function o(a,b){for(var c,d;;){if(a.lookahead<jb){if(m(a),a.lookahead<jb&&b===H)return sb;if(0===a.lookahead)break}if(c=0,a.lookahead>=hb&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),0!==c&&a.strstart-c<=a.w_size-jb&&(a.match_length=l(a,c)),a.match_length>=hb)if(d=D._tr_tally(a,a.strstart-a.match_start,a.match_length-hb),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=hb){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart;while(0!==--a.match_length);a.strstart++}else a.strstart+=a.match_length,a.match_length=0,a.ins_h=a.window[a.strstart],a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+1])&a.hash_mask;else d=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++;if(d&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=a.strstart<hb-1?a.strstart:hb-1,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function p(a,b){for(var c,d,e;;){if(a.lookahead<jb){if(m(a),a.lookahead<jb&&b===H)return sb;if(0===a.lookahead)break}if(c=0,a.lookahead>=hb&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),a.prev_length=a.match_length,a.prev_match=a.match_start,a.match_length=hb-1,0!==c&&a.prev_length<a.max_lazy_match&&a.strstart-c<=a.w_size-jb&&(a.match_length=l(a,c),a.match_length<=5&&(a.strategy===S||a.match_length===hb&&a.strstart-a.match_start>4096)&&(a.match_length=hb-1)),a.prev_length>=hb&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-hb,d=D._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-hb),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart);while(0!==--a.prev_length);if(a.match_available=0,a.match_length=hb-1,a.strstart++,d&&(h(a,!1),0===a.strm.avail_out))return sb}else if(a.match_available){if(d=D._tr_tally(a,0,a.window[a.strstart-1]),d&&h(a,!1),a.strstart++,a.lookahead--,0===a.strm.avail_out)return sb}else a.match_available=1,a.strstart++,a.lookahead--}return a.match_available&&(d=D._tr_tally(a,0,a.window[a.strstart-1]),a.match_available=0),a.insert=a.strstart<hb-1?a.strstart:hb-1,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function q(a,b){for(var c,d,e,f,g=a.window;;){if(a.lookahead<=ib){if(m(a),a.lookahead<=ib&&b===H)return sb;if(0===a.lookahead)break}if(a.match_length=0,a.lookahead>=hb&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ib;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&f>e);a.match_length=ib-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=hb?(c=D._tr_tally(a,1,a.match_length-hb),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===H)return sb;break}if(a.match_length=0,c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function s(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=B[a.level].max_lazy,a.good_match=B[a.level].good_length,a.nice_match=B[a.level].nice_length,a.max_chain_length=B[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=hb-1,a.match_available=0,a.ins_h=0}function t(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new C.Buf16(2*fb),this.dyn_dtree=new C.Buf16(2*(2*db+1)),this.bl_tree=new C.Buf16(2*(2*eb+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new C.Buf16(gb+1),this.heap=new C.Buf16(2*cb+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new C.Buf16(2*cb+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function u(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=X,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?lb:qb,a.adler=2===b.wrap?0:1,b.last_flush=H,D._tr_init(b),M):d(a,O)}function v(a){var b=u(a);return b===M&&s(a.state),b}function w(a,b){return a&&a.state?2!==a.state.wrap?O:(a.state.gzhead=b,M):O}function x(a,b,c,e,f,g){if(!a)return O;var h=1;if(b===R&&(b=6),0>e?(h=0,e=-e):e>15&&(h=2,e-=16),1>f||f>Z||c!==Y||8>e||e>15||0>b||b>9||0>g||g>V)return d(a,O);8===e&&(e=9);var i=new t;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<<i.w_bits,i.w_mask=i.w_size-1,i.hash_bits=f+7,i.hash_size=1<<i.hash_bits,i.hash_mask=i.hash_size-1,i.hash_shift=~~((i.hash_bits+hb-1)/hb),i.window=new C.Buf8(2*i.w_size),i.head=new C.Buf16(i.hash_size),i.prev=new C.Buf16(i.w_size),i.lit_bufsize=1<<f+6,i.pending_buf_size=4*i.lit_bufsize,i.pending_buf=new C.Buf8(i.pending_buf_size),i.d_buf=i.lit_bufsize>>1,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,v(a)}function y(a,b){return x(a,b,Y,$,_,W)}function z(a,b){var c,h,k,l;if(!a||!a.state||b>L||0>b)return a?d(a,O):O;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===rb&&b!==K)return d(a,0===a.avail_out?Q:O);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===lb)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=F(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=mb):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,wb),h.status=qb);else{var m=Y+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=T||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=kb),m+=31-m%31,h.status=qb,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===mb)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=nb)}else h.status=nb;if(h.status===nb)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.name.length?255&h.gzhead.name.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=ob)}else h.status=ob;if(h.status===ob)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.comment.length?255&h.gzhead.comment.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=pb)}else h.status=pb;if(h.status===pb&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=qb)):h.status=qb),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,M}else if(0===a.avail_in&&e(b)<=e(c)&&b!==K)return d(a,Q);if(h.status===rb&&0!==a.avail_in)return d(a,Q);if(0!==a.avail_in||0!==h.lookahead||b!==H&&h.status!==rb){var o=h.strategy===T?r(h,b):h.strategy===U?q(h,b):B[h.level].func(h,b);if((o===ub||o===vb)&&(h.status=rb),o===sb||o===ub)return 0===a.avail_out&&(h.last_flush=-1),M;if(o===tb&&(b===I?D._tr_align(h):b!==L&&(D._tr_stored_block(h,0,0,!1),b===J&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,M}return b!==K?M:h.wrap<=0?N:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?M:N)}function A(a){var b;return a&&a.state?(b=a.state.status,b!==lb&&b!==mb&&b!==nb&&b!==ob&&b!==pb&&b!==qb&&b!==rb?d(a,O):(a.state=null,b===qb?d(a,P):M)):O}var B,C=a("../utils/common"),D=a("./trees"),E=a("./adler32"),F=a("./crc32"),G=a("./messages"),H=0,I=1,J=3,K=4,L=5,M=0,N=1,O=-2,P=-3,Q=-5,R=-1,S=1,T=2,U=3,V=4,W=0,X=2,Y=8,Z=9,$=15,_=8,ab=29,bb=256,cb=bb+1+ab,db=30,eb=19,fb=2*cb+1,gb=15,hb=3,ib=258,jb=ib+hb+1,kb=32,lb=42,mb=69,nb=73,ob=91,pb=103,qb=113,rb=666,sb=1,tb=2,ub=3,vb=4,wb=3,xb=function(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e};B=[new xb(0,0,0,0,n),new xb(4,4,8,4,o),new xb(4,5,16,8,o),new xb(4,6,32,32,o),new xb(4,4,16,16,p),new xb(8,16,32,32,p),new xb(8,16,128,128,p),new xb(8,32,128,256,p),new xb(32,128,258,1024,p),new xb(32,258,258,4096,p)],c.deflateInit=y,c.deflateInit2=x,c.deflateReset=v,c.deflateResetKeep=u,c.deflateSetHeader=w,c.deflate=z,c.deflateEnd=A,c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":27,"./adler32":29,"./crc32":31,"./messages":37,"./trees":38}],33:[function(a,b){"use strict";function c(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}b.exports=c},{}],34:[function(a,b){"use strict";var c=30,d=12;b.exports=function(a,b){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;e=a.state,f=a.next_in,B=a.input,g=f+(a.avail_in-5),h=a.next_out,C=a.output,i=h-(b-a.avail_out),j=h+(a.avail_out-257),k=e.dmax,l=e.wsize,m=e.whave,n=e.wnext,o=e.window,p=e.hold,q=e.bits,r=e.lencode,s=e.distcode,t=(1<<e.lenbits)-1,u=(1<<e.distbits)-1;a:do{15>q&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=r[p&t];b:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<<w)-1)];continue b}if(32&w){e.mode=d;break a}a.msg="invalid literal/length code",e.mode=c;break a}x=65535&v,w&=15,w&&(w>q&&(p+=B[f++]<<q,q+=8),x+=p&(1<<w)-1,p>>>=w,q-=w),15>q&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=s[p&u];c:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<<w)-1)];continue c}a.msg="invalid distance code",e.mode=c;break a}if(y=65535&v,w&=15,w>q&&(p+=B[f++]<<q,q+=8,w>q&&(p+=B[f++]<<q,q+=8)),y+=p&(1<<w)-1,y>k){a.msg="invalid distance too far back",e.mode=c;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&e.sane){a.msg="invalid distance too far back",e.mode=c;break a}if(z=0,A=o,0===n){if(z+=l-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(w>n){if(z+=l+n-w,w-=n,x>w){x-=w;do C[h++]=o[z++];while(--w);if(z=0,x>n){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(g>f&&j>h);x=q>>3,f-=x,q-=x<<3,p&=(1<<q)-1,a.next_in=f,a.next_out=h,a.avail_in=g>f?5+(g-f):5-(f-g),a.avail_out=j>h?257+(j-h):257-(h-j),e.hold=p,e.bits=q}},{}],35:[function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=K,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new r.Buf32(ob),b.distcode=b.distdyn=new r.Buf32(pb),b.sane=1,b.back=-1,C):F}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):F}function h(a,b){var c,d;return a&&a.state?(d=a.state,0>b?(c=0,b=-b):(c=(b>>4)+1,48>b&&(b&=15)),b&&(8>b||b>15)?F:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):F}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==C&&(a.state=null),c):F}function j(a){return i(a,rb)}function k(a){if(sb){var b;for(p=new r.Buf32(512),q=new r.Buf32(32),b=0;144>b;)a.lens[b++]=8;for(;256>b;)a.lens[b++]=9;for(;280>b;)a.lens[b++]=7;for(;288>b;)a.lens[b++]=8;for(v(x,a.lens,0,288,p,0,a.work,{bits:9}),b=0;32>b;)a.lens[b++]=5;v(y,a.lens,0,32,q,0,a.work,{bits:5}),sb=!1}a.lencode=p,a.lenbits=9,a.distcode=q,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new r.Buf8(f.wsize)),d>=f.wsize?(r.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),r.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(r.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=e))),0}function m(a,b){var c,e,f,g,h,i,j,m,n,o,p,q,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab=0,Bb=new r.Buf8(4),Cb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!a||!a.state||!a.output||!a.input&&0!==a.avail_in)return F;c=a.state,c.mode===V&&(c.mode=W),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,o=i,p=j,xb=C;a:for(;;)switch(c.mode){case K:if(0===c.wrap){c.mode=W;break}for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(2&c.wrap&&35615===m){c.check=0,Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0),m=0,n=0,c.mode=L;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=lb;break}if((15&m)!==J){a.msg="unknown compression method",c.mode=lb;break}if(m>>>=4,n-=4,wb=(15&m)+8,0===c.wbits)c.wbits=wb;else if(wb>c.wbits){a.msg="invalid window size",c.mode=lb;break}c.dmax=1<<wb,a.adler=c.check=1,c.mode=512&m?T:V,m=0,n=0;break;case L:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.flags=m,(255&c.flags)!==J){a.msg="unknown compression method",c.mode=lb;break}if(57344&c.flags){a.msg="unknown header flags set",c.mode=lb;break}c.head&&(c.head.text=m>>8&1),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=M;case M:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.time=m),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,Bb[2]=m>>>16&255,Bb[3]=m>>>24&255,c.check=t(c.check,Bb,4,0)),m=0,n=0,c.mode=N;case N:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.xflags=255&m,c.head.os=m>>8),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=O;case O:if(1024&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length=m,c.head&&(c.head.extra_len=m),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=P;case P:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wb=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,e,g,q,wb)),512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=Q;case Q:if(2048&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.name+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=R;case R:if(4096&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.comment+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.comment=null);c.mode=S;case S:if(512&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(65535&c.check)){a.msg="header crc mismatch",c.mode=lb;break}m=0,n=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;case T:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}a.adler=c.check=d(m),m=0,n=0,c.mode=U;case U:if(0===c.havedict)return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,E;a.adler=c.check=1,c.mode=V;case V:if(b===A||b===B)break a;case W:if(c.last){m>>>=7&n,n-=7&n,c.mode=ib;break}for(;3>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}switch(c.last=1&m,m>>>=1,n-=1,3&m){case 0:c.mode=X;break;case 1:if(k(c),c.mode=bb,b===B){m>>>=2,n-=2;break a}break;case 2:c.mode=$;break;case 3:a.msg="invalid block type",c.mode=lb}m>>>=2,n-=2;break;case X:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if((65535&m)!==(m>>>16^65535)){a.msg="invalid stored block lengths",c.mode=lb;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)break a;case Y:c.mode=Z;case Z:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case $:for(;14>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.nlen=(31&m)+257,m>>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=lb;break}c.have=0,c.mode=_;case _:for(;c.have<c.ncode;){for(;3>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.lens[Cb[c.have++]]=7&m,m>>>=3,n-=3}for(;c.have<19;)c.lens[Cb[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,yb={bits:c.lenbits},xb=v(w,c.lens,0,19,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg="invalid code lengths set",c.mode=lb;break}c.have=0,c.mode=ab;case ab:for(;c.have<c.nlen+c.ndist;){for(;Ab=c.lencode[m&(1<<c.lenbits)-1],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(16>sb)m>>>=qb,n-=qb,c.lens[c.have++]=sb;else{if(16===sb){for(zb=qb+2;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m>>>=qb,n-=qb,0===c.have){a.msg="invalid bit length repeat",c.mode=lb;break}wb=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sb){for(zb=qb+3;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qb,n-=qb,wb=0,q=3+(7&m),m>>>=3,n-=3}else{for(zb=qb+7;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qb,n-=qb,wb=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=lb;break}for(;q--;)c.lens[c.have++]=wb}}if(c.mode===lb)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=lb;break}if(c.lenbits=9,yb={bits:c.lenbits},xb=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg="invalid literal/lengths set",c.mode=lb;break}if(c.distbits=6,c.distcode=c.distdyn,yb={bits:c.distbits},xb=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,yb),c.distbits=yb.bits,xb){a.msg="invalid distances set",c.mode=lb;break}if(c.mode=bb,b===B)break a;case bb:c.mode=cb;case cb:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1);break}for(c.back=0;Ab=c.lencode[m&(1<<c.lenbits)-1],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(rb&&0===(240&rb)){for(tb=qb,ub=rb,vb=sb;Ab=c.lencode[vb+((m&(1<<tb+ub)-1)>>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,c.length=sb,0===rb){c.mode=hb;break}if(32&rb){c.back=-1,c.mode=V;break}if(64&rb){a.msg="invalid literal/length code",c.mode=lb;break}c.extra=15&rb,c.mode=db;case db:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=eb;case eb:for(;Ab=c.distcode[m&(1<<c.distbits)-1],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(0===(240&rb)){for(tb=qb,ub=rb,vb=sb;Ab=c.distcode[vb+((m&(1<<tb+ub)-1)>>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,64&rb){a.msg="invalid distance code",c.mode=lb;break}c.offset=sb,c.extra=15&rb,c.mode=fb;case fb:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.offset+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=lb;break}c.mode=gb;case gb:if(0===j)break a;
+if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=lb;break}q>c.wnext?(q-=c.wnext,ob=c.wsize-q):ob=c.wnext-q,q>c.length&&(q=c.length),pb=c.window}else pb=f,ob=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pb[ob++];while(--q);0===c.length&&(c.mode=cb);break;case hb:if(0===j)break a;f[h++]=c.length,j--,c.mode=cb;break;case ib:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<<n,n+=8}if(p-=j,a.total_out+=p,c.total+=p,p&&(a.adler=c.check=c.flags?t(c.check,f,p,h-p):s(c.check,f,p,h-p)),p=j,(c.flags?m:d(m))!==c.check){a.msg="incorrect data check",c.mode=lb;break}m=0,n=0}c.mode=jb;case jb:if(c.wrap&&c.flags){for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(4294967295&c.total)){a.msg="incorrect length check",c.mode=lb;break}m=0,n=0}c.mode=kb;case kb:xb=D;break a;case lb:xb=G;break a;case mb:return H;case nb:default:return F}return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,(c.wsize||p!==a.avail_out&&c.mode<lb&&(c.mode<ib||b!==z))&&l(a,a.output,a.next_out,p-a.avail_out)?(c.mode=mb,H):(o-=a.avail_in,p-=a.avail_out,a.total_in+=o,a.total_out+=p,c.total+=p,c.wrap&&p&&(a.adler=c.check=c.flags?t(c.check,f,p,a.next_out-p):s(c.check,f,p,a.next_out-p)),a.data_type=c.bits+(c.last?64:0)+(c.mode===V?128:0)+(c.mode===bb||c.mode===Y?256:0),(0===o&&0===p||b===z)&&xb===C&&(xb=I),xb)}function n(a){if(!a||!a.state)return F;var b=a.state;return b.window&&(b.window=null),a.state=null,C}function o(a,b){var c;return a&&a.state?(c=a.state,0===(2&c.wrap)?F:(c.head=b,b.done=!1,C)):F}var p,q,r=a("../utils/common"),s=a("./adler32"),t=a("./crc32"),u=a("./inffast"),v=a("./inftrees"),w=0,x=1,y=2,z=4,A=5,B=6,C=0,D=1,E=2,F=-2,G=-3,H=-4,I=-5,J=8,K=1,L=2,M=3,N=4,O=5,P=6,Q=7,R=8,S=9,T=10,U=11,V=12,W=13,X=14,Y=15,Z=16,$=17,_=18,ab=19,bb=20,cb=21,db=22,eb=23,fb=24,gb=25,hb=26,ib=27,jb=28,kb=29,lb=30,mb=31,nb=32,ob=852,pb=592,qb=15,rb=qb,sb=!0;c.inflateReset=g,c.inflateReset2=h,c.inflateResetKeep=f,c.inflateInit=j,c.inflateInit2=i,c.inflate=m,c.inflateEnd=n,c.inflateGetHeader=o,c.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":27,"./adler32":29,"./crc32":31,"./inffast":34,"./inftrees":36}],36:[function(a,b){"use strict";var c=a("../utils/common"),d=15,e=852,f=592,g=0,h=1,i=2,j=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],k=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],m=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];b.exports=function(a,b,n,o,p,q,r,s){var t,u,v,w,x,y,z,A,B,C=s.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new c.Buf16(d+1),Q=new c.Buf16(d+1),R=null,S=0;for(D=0;d>=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[n+E]]++;for(H=C,G=d;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;d>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===g||1!==G))return-1;for(Q[1]=0,D=1;d>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[n+E]&&(r[Q[b[n+E]]++]=E);if(a===g?(N=R=r,y=19):a===h?(N=j,O-=257,R=k,S-=257,y=256):(N=l,R=m,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<<H,w=L-1,a===h&&L>e||a===i&&L>f)return 1;for(var T=0;;){T++,z=D-J,r[E]<y?(A=0,B=r[E]):r[E]>y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<<D-J,u=1<<I,F=u;do u-=t,p[x+(M>>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<<D-1;M&t;)t>>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[n+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<<I;G>I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<<I,a===h&&L>e||a===i&&L>f)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":27}],37:[function(a,b){"use strict";b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],38:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a){return 256>a?gb[a]:gb[256+(a>>>7)]}function f(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function g(a,b,c){a.bi_valid>V-c?(a.bi_buf|=b<<a.bi_valid&65535,f(a,a.bi_buf),a.bi_buf=b>>V-a.bi_valid,a.bi_valid+=c-V):(a.bi_buf|=b<<a.bi_valid&65535,a.bi_valid+=c)}function h(a,b,c){g(a,c[2*b],c[2*b+1])}function i(a,b){var c=0;do c|=1&a,a>>>=1,c<<=1;while(--b>0);return c>>>1}function j(a){16===a.bi_valid?(f(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function k(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;U>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;T>c;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function l(a,b,c){var d,e,f=new Array(U+1),g=0;for(d=1;U>=d;d++)f[d]=g=g+c[d-1]<<1;for(e=0;b>=e;e++){var h=a[2*e+1];0!==h&&(a[2*e]=i(f[h]++,h))}}function m(){var a,b,c,d,e,f=new Array(U+1);for(c=0,d=0;O-1>d;d++)for(ib[d]=c,a=0;a<1<<_[d];a++)hb[c++]=d;for(hb[c-1]=d,e=0,d=0;16>d;d++)for(jb[d]=e,a=0;a<1<<ab[d];a++)gb[e++]=d;for(e>>=7;R>d;d++)for(jb[d]=e<<7,a=0;a<1<<ab[d]-7;a++)gb[256+e++]=d;for(b=0;U>=b;b++)f[b]=0;for(a=0;143>=a;)eb[2*a+1]=8,a++,f[8]++;for(;255>=a;)eb[2*a+1]=9,a++,f[9]++;for(;279>=a;)eb[2*a+1]=7,a++,f[7]++;for(;287>=a;)eb[2*a+1]=8,a++,f[8]++;for(l(eb,Q+1,f),a=0;R>a;a++)fb[2*a+1]=5,fb[2*a]=i(a,5);kb=new nb(eb,_,P+1,Q,U),lb=new nb(fb,ab,0,R,U),mb=new nb(new Array(0),bb,0,S,W)}function n(a){var b;for(b=0;Q>b;b++)a.dyn_ltree[2*b]=0;for(b=0;R>b;b++)a.dyn_dtree[2*b]=0;for(b=0;S>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*X]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function o(a){a.bi_valid>8?f(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function p(a,b,c,d){o(a),d&&(f(a,c),f(a,~c)),E.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function q(a,b,c,d){var e=2*b,f=2*c;return a[e]<a[f]||a[e]===a[f]&&d[b]<=d[c]}function r(a,b,c){for(var d=a.heap[c],e=c<<1;e<=a.heap_len&&(e<a.heap_len&&q(b,a.heap[e+1],a.heap[e],a.depth)&&e++,!q(b,d,a.heap[e],a.depth));)a.heap[c]=a.heap[e],c=e,e<<=1;a.heap[c]=d}function s(a,b,c){var d,f,i,j,k=0;if(0!==a.last_lit)do d=a.pending_buf[a.d_buf+2*k]<<8|a.pending_buf[a.d_buf+2*k+1],f=a.pending_buf[a.l_buf+k],k++,0===d?h(a,f,b):(i=hb[f],h(a,i+P+1,b),j=_[i],0!==j&&(f-=ib[i],g(a,f,j)),d--,i=e(d),h(a,i,c),j=ab[i],0!==j&&(d-=jb[i],g(a,d,j)));while(k<a.last_lit);h(a,X,b)}function t(a,b){var c,d,e,f=b.dyn_tree,g=b.stat_desc.static_tree,h=b.stat_desc.has_stree,i=b.stat_desc.elems,j=-1;for(a.heap_len=0,a.heap_max=T,c=0;i>c;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=2>j?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)r(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],r(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,r(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],k(a,b),l(f,j,a.bl_count)}function u(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;c>=d;d++)e=g,g=b[2*(d+1)+1],++h<i&&e===g||(j>h?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*Y]++):10>=h?a.bl_tree[2*Z]++:a.bl_tree[2*$]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function v(a,b,c){var d,e,f=-1,i=b[1],j=0,k=7,l=4;for(0===i&&(k=138,l=3),d=0;c>=d;d++)if(e=i,i=b[2*(d+1)+1],!(++j<k&&e===i)){if(l>j){do h(a,e,a.bl_tree);while(0!==--j)}else 0!==e?(e!==f&&(h(a,e,a.bl_tree),j--),h(a,Y,a.bl_tree),g(a,j-3,2)):10>=j?(h(a,Z,a.bl_tree),g(a,j-3,3)):(h(a,$,a.bl_tree),g(a,j-11,7));j=0,f=e,0===i?(k=138,l=3):e===i?(k=6,l=3):(k=7,l=4)}}function w(a){var b;for(u(a,a.dyn_ltree,a.l_desc.max_code),u(a,a.dyn_dtree,a.d_desc.max_code),t(a,a.bl_desc),b=S-1;b>=3&&0===a.bl_tree[2*cb[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function x(a,b,c,d){var e;for(g(a,b-257,5),g(a,c-1,5),g(a,d-4,4),e=0;d>e;e++)g(a,a.bl_tree[2*cb[e]+1],3);v(a,a.dyn_ltree,b-1),v(a,a.dyn_dtree,c-1)}function y(a){var b,c=4093624447;for(b=0;31>=b;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return G;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return H;for(b=32;P>b;b++)if(0!==a.dyn_ltree[2*b])return H;return G}function z(a){pb||(m(),pb=!0),a.l_desc=new ob(a.dyn_ltree,kb),a.d_desc=new ob(a.dyn_dtree,lb),a.bl_desc=new ob(a.bl_tree,mb),a.bi_buf=0,a.bi_valid=0,n(a)}function A(a,b,c,d){g(a,(J<<1)+(d?1:0),3),p(a,b,c,!0)}function B(a){g(a,K<<1,3),h(a,X,eb),j(a)}function C(a,b,c,d){var e,f,h=0;a.level>0?(a.strm.data_type===I&&(a.strm.data_type=y(a)),t(a,a.l_desc),t(a,a.d_desc),h=w(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,e>=f&&(e=f)):e=f=c+5,e>=c+4&&-1!==b?A(a,b,c,d):a.strategy===F||f===e?(g(a,(K<<1)+(d?1:0),3),s(a,eb,fb)):(g(a,(L<<1)+(d?1:0),3),x(a,a.l_desc.max_code+1,a.d_desc.max_code+1,h+1),s(a,a.dyn_ltree,a.dyn_dtree)),n(a),d&&o(a)}function D(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(hb[c]+P+1)]++,a.dyn_dtree[2*e(b)]++),a.last_lit===a.lit_bufsize-1}var E=a("../utils/common"),F=4,G=0,H=1,I=2,J=0,K=1,L=2,M=3,N=258,O=29,P=256,Q=P+1+O,R=30,S=19,T=2*Q+1,U=15,V=16,W=7,X=256,Y=16,Z=17,$=18,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ab=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],bb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],cb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],db=512,eb=new Array(2*(Q+2));d(eb);var fb=new Array(2*R);d(fb);var gb=new Array(db);d(gb);var hb=new Array(N-M+1);d(hb);var ib=new Array(O);d(ib);var jb=new Array(R);d(jb);var kb,lb,mb,nb=function(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length},ob=function(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b},pb=!1;c._tr_init=z,c._tr_stored_block=A,c._tr_flush_block=C,c._tr_tally=D,c._tr_align=B},{"../utils/common":27}],39:[function(a,b){"use strict";function c(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}b.exports=c},{}]},{},[9])(9)});
Index: EcnlProtoTool/trunk/webapp/webmrbc/mrb_parse.jay
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/mrb_parse.jay	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/mrb_parse.jay	(revision 270)
@@ -0,0 +1,2328 @@
+/*
+** parse.y - mruby parser
+**
+** See Copyright Notice in mruby.h
+*/
+
+%{
+// can first specify namespace
+// could specify using directives
+// [this has not been done here to stress-test the skeleton]
+using System;
+using Bridge;
+using Bridge.Html5;
+
+namespace WebMrbc
+{
+	public enum MrbTokens
+	{
+%}
+
+%token <int>
+        keyword_class
+        keyword_module
+        keyword_def
+        keyword_begin
+        keyword_if
+        keyword_unless
+        keyword_while
+        keyword_until
+        keyword_for
+
+%token
+        keyword_undef
+        keyword_rescue
+        keyword_ensure
+        keyword_end
+        keyword_then
+        keyword_elsif
+        keyword_else
+        keyword_case
+        keyword_when
+        keyword_break
+        keyword_next
+        keyword_redo
+        keyword_retry
+        keyword_in
+        keyword_do
+        keyword_do_cond
+        keyword_do_block
+        keyword_do_LAMBDA
+        keyword_return
+        keyword_yield
+        keyword_super
+        keyword_self
+        keyword_nil
+        keyword_true
+        keyword_false
+        keyword_and
+        keyword_or
+        keyword_not
+        modifier_if
+        modifier_unless
+        modifier_while
+        modifier_until
+        modifier_rescue
+        keyword_alias
+        keyword_BEGIN
+        keyword_END
+        keyword__LINE__
+        keyword__FILE__
+        keyword__ENCODING__
+
+%token <mrb_sym>  tIDENTIFIER tFID tGVAR tIVAR tCONSTANT tCVAR tLABEL
+%token <node>  tINTEGER tFLOAT tCHAR tXSTRING tREGEXP
+%token <node>  tSTRING tSTRING_PART tSTRING_MID tLABEL_END
+%token <node>  tNTH_REF tBACK_REF
+%token <int> tREGEXP_END
+
+%type <node> singleton string string_rep string_interp xstring regexp
+%type <node> literal numeric cpath symbol
+%type <node> top_compstmt top_stmts top_stmt
+%type <node> bodystmt compstmt stmts stmt expr arg primary command command_call method_call
+%type <node> expr_value arg_rhs primary_value
+%type <node> if_tail opt_else case_body cases opt_rescue exc_list exc_var opt_ensure
+%type <node> args call_args opt_call_args
+%type <node> paren_args opt_paren_args variable
+%type <node> command_args aref_args opt_block_arg block_arg var_ref var_lhs
+%type <node> command_asgn command_rhs mrhs superclass block_call block_command
+%type <node> f_block_optarg f_block_opt
+%type <node> f_arglist f_args f_arg f_arg_item f_optarg f_marg f_marg_list f_margs
+%type <node> assoc_list assocs assoc undef_list backref for_var
+%type <node> block_param opt_block_param block_param_def f_opt
+%type <node> bv_decls opt_bv_decl bvar f_larglist lambda_body
+%type <node> brace_block cmd_brace_block do_block lhs none f_bad_arg
+%type <node> mlhs mlhs_list mlhs_post mlhs_basic mlhs_item mlhs_node mlhs_inner
+%type <mrb_sym> fsym sym basic_symbol operation operation2 operation3
+%type <mrb_sym> cname fname op f_rest_arg f_block_arg opt_f_block_arg f_norm_arg f_opt_asgn
+%type <node> heredoc words symbols
+%type <MrbTokens> call_op call_op2     /* 0:'&.', 1:'.', 2:'::' */
+
+%token tUPLUS             /* unary+ */
+%token tUMINUS            /* unary- */
+%token tPOW               /* ** */
+%token tCMP               /* <=> */
+%token tEQ                /* == */
+%token tEQQ               /* === */
+%token tNEQ               /* != */
+%token tGEQ               /* >= */
+%token tLEQ               /* <= */
+%token tANDOP tOROP       /* && and || */
+%token tMATCH tNMATCH     /* =~ and !~ */
+%token tDOT2 tDOT3        /* .. and ... */
+%token tAREF tASET        /* [] and []= */
+%token tLSHFT tRSHFT      /* << and >> */
+%token tCOLON2            /* :: */
+%token tCOLON3            /* :: at EXPR_BEG */
+%token <mrb_sym> tOP_ASGN      /* +=, -=  etc. */
+%token tASSOC             /* => */
+%token tLPAREN            /* ( */
+%token tLPAREN_ARG        /* ( */
+%token tRPAREN            /* ) */
+%token tLBRACK            /* [ */
+%token tLBRACE            /* { */
+%token tLBRACE_ARG        /* { */
+%token tSTAR              /* * */
+%token tAMPER             /* & */
+%token tLAMBDA            /* -> */
+%token tANDDOT            /* &. */
+%token tSYMBEG tREGEXP_BEG tWORDS_BEG tSYMBOLS_BEG
+%token tSTRING_BEG tXSTRING_BEG tSTRING_DVAR tLAMBEG
+%token <node> tHEREDOC_BEG  /* <<, <<- */
+%token tHEREDOC_END tLITERAL_DELIM tHD_LITERAL_DELIM
+%token <node> tHD_STRING_PART tHD_STRING_MID
+
+/*
+ * precedence table
+ */
+
+%nonassoc tLOWEST
+%nonassoc tLBRACE_ARG
+
+%nonassoc  modifier_if modifier_unless modifier_while modifier_until
+%left  keyword_or keyword_and
+%right keyword_not
+%right '=' tOP_ASGN
+%left modifier_rescue
+%right '?' ':'
+%nonassoc tDOT2 tDOT3
+%left  tOROP
+%left  tANDOP
+%nonassoc  tCMP tEQ tEQQ tNEQ tMATCH tNMATCH
+%left  '>' tGEQ '<' tLEQ
+%left  '|' '^'
+%left  '&'
+%left  tLSHFT tRSHFT
+%left  '+' '-'
+%left  '*' '/' '%'
+%right tUMINUS_NUM tUMINUS
+%right tPOW
+%right '!' '~' tUPLUS
+
+%token tLAST_TOKEN
+
+%%
+
+%{
+	}
+
+	/// <summary>
+	///   start with an argument to trace
+	/// </summary>
+	public partial class MrbParser
+	{
+		// must specify class header
+		// must not use yy[A-Z].* as identifiers
+		// could overwrite some methods named yy[A-Z].* in subclass
+
+		const int yyErrorCode = (int)MrbTokens.yyErrorCode;
+%}
+
+program         :   {
+                      this.lstate = mrb_lex_state_enum.EXPR_BEG;
+                      if (this.locals == null) this.locals = new locals_node(null);
+                    }
+                  top_compstmt
+                    {
+                      this.tree = new_scope($2);
+                      this.tree.NODE_LINENO($2);
+                    }
+                ;
+
+top_compstmt    : top_stmts opt_terms
+                    {
+                      $$ = $1;
+                    }
+                ;
+
+top_stmts       : none
+                    {
+                      $$ = new_begin(null);
+                    }
+                | top_stmt
+                    {
+                      $$ = new_begin($1);
+                      $<node>$.NODE_LINENO($1);
+                    }
+                | top_stmts terms top_stmt
+                    {
+                      $$ = push($1, newline_node($3));
+                    }
+                | error top_stmt
+                    {
+                      $$ = new_begin(null);
+                    }
+                ;
+
+top_stmt        : stmt
+                | keyword_BEGIN
+                    {
+                      $$ = local_switch();
+                    }
+                  '{' top_compstmt '}'
+                    {
+                      yyError("BEGIN not supported");
+                      local_resume($<locals_node>2);
+                      $$ = null;
+                    }
+                ;
+
+bodystmt        : compstmt
+                  opt_rescue
+                  opt_else
+                  opt_ensure
+                    {
+                      if ($2 != null) {
+                        $$ = new_rescue($1, $2, $3);
+                        $<node>$.NODE_LINENO($1);
+                      }
+                      else if ($3 != null) {
+                        yyWarning("else without rescue is useless");
+                        $$ = push($1, $3);
+                      }
+                      else {
+                        $$ = $1;
+                      }
+                      if ($4 != null) {
+                        if ($$ != null) {
+                          $$ = new_ensure($<node>$, $4);
+                        }
+                        else {
+                          $$ = push($4, new_nil());
+                        }
+                      }
+                    }
+                ;
+
+compstmt        : stmts opt_terms
+                    {
+                      $$ = $1;
+                    }
+                ;
+
+stmts           : none
+                    {
+                      $$ = new_begin(null);
+                    }
+                | stmt
+                    {
+                      $$ = new_begin($1);
+                      $<node>$.NODE_LINENO($1);
+                    }
+                | stmts terms stmt
+                    {
+                      $$ = push($1, newline_node($3));
+                    }
+                | error stmt
+                    {
+                      $$ = new_begin($2);
+                    }
+                ;
+
+stmt            : keyword_alias fsym {this.lstate = mrb_lex_state_enum.EXPR_FNAME;} fsym
+                    {
+                      $$ = new_alias($2, $4);
+                    }
+                | keyword_undef undef_list
+                    {
+                      $$ = $2;
+                    }
+                | stmt modifier_if expr_value
+                    {
+                      $$ = new_if(cond($3), $1, null);
+                    }
+                | stmt modifier_unless expr_value
+                    {
+                      $$ = new_unless(cond($3), $1, null);
+                    }
+                | stmt modifier_while expr_value
+                    {
+                      $$ = new_while(cond($3), $1);
+                    }
+                | stmt modifier_until expr_value
+                    {
+                      $$ = new_until(cond($3), $1);
+                    }
+                | stmt modifier_rescue stmt
+                    {
+                      $$ = new_mod_rescue($1, $3);
+                    }
+                | keyword_END '{' compstmt '}'
+                    {
+                      yyError("END not supported");
+                      $$ = new_postexe($3);
+                    }
+                | command_asgn
+                | mlhs '=' command_call
+                    {
+                      $$ = new_masgn($1, $3);
+                    }
+                | lhs '=' mrhs
+                    {
+                      $$ = new_asgn($1, new_array($3));
+                    }
+                | mlhs '=' arg
+                    {
+                      $$ = new_masgn($1, $3);
+                    }
+                | mlhs '=' mrhs
+                    {
+                      $$ = new_masgn($1, new_array($3));
+                    }
+                | expr
+                ;
+
+command_asgn    : lhs '=' command_rhs
+                    {
+                      $$ = new_asgn($1, $3);
+                    }
+                | var_lhs tOP_ASGN command_rhs
+                    {
+                      $$ = new_op_asgn($1, $2, $3);
+                    }
+                | primary_value '[' opt_call_args rbracket tOP_ASGN command_rhs
+                    {
+                      $$ = new_op_asgn(new_call($1, intern("[]",2), $3, (MrbTokens)'.'), $5, $6);
+                    }
+                | primary_value call_op tIDENTIFIER tOP_ASGN command_rhs
+                    {
+                      $$ = new_op_asgn(new_call($1, $3, null, $2), $4, $5);
+                    }
+                | primary_value call_op tCONSTANT tOP_ASGN command_rhs
+                    {
+                      $$ = new_op_asgn(new_call($1, $3, null, $2), $4, $5);
+                    }
+                | primary_value tCOLON2 tCONSTANT tOP_ASGN command_call
+                    {
+                      yyError("constant re-assignment");
+                      $$ = null;
+                    }
+                | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_rhs
+                    {
+                      $$ = new_op_asgn(new_call($1, $3, null, MrbTokens.tCOLON2), $4, $5);
+                    }
+                | backref tOP_ASGN command_rhs
+                    {
+                      backref_error($1);
+                      $$ = new_begin(null);
+                    }
+                ;
+
+command_rhs     : command_call   %prec tOP_ASGN
+                | command_call modifier_rescue stmt
+                    {
+                      $$ = new_mod_rescue($1, $3);
+                    }
+                | command_asgn
+                ;
+
+
+expr            : command_call
+                | expr keyword_and expr
+                    {
+                      $$ = new_and($1, $3);
+                    }
+                | expr keyword_or expr
+                    {
+                      $$ = new_or($1, $3);
+                    }
+                | keyword_not opt_nl expr
+                    {
+                      $$ = call_uni_op(cond($3), "!");
+                    }
+                | '!' command_call
+                    {
+                      $$ = call_uni_op(cond($2), "!");
+                    }
+                | arg
+                ;
+
+expr_value      : expr
+                    {
+                      if ($1 == null) $$ = new_nil();
+                      else{
+                        void_expr_error($1);
+                        $$ = $1;
+                      }
+                    }
+                ;
+
+command_call    : command
+                | block_command
+                ;
+
+block_command   : block_call
+                | block_call call_op2 operation2 command_args
+                ;
+
+cmd_brace_block : tLBRACE_ARG
+                    {
+                      local_nest();
+                    }
+                  opt_block_param
+                  compstmt
+                  '}'
+                    {
+                      $$ = new_block($3, $4, true);
+                      local_unnest();
+                    }
+                ;
+
+command         : operation command_args       %prec tLOWEST
+                    {
+                      $$ = new_fcall($1, $2);
+                    }
+                | operation command_args cmd_brace_block
+                    {
+                      args_with_block($2, $3);
+                      $$ = new_fcall($1, $2);
+                    }
+                | primary_value call_op operation2 command_args     %prec tLOWEST
+                    {
+                      $$ = new_call($1, $3, $4, $2);
+                    }
+                | primary_value call_op operation2 command_args cmd_brace_block
+                    {
+                      args_with_block($4, $5);
+                      $$ = new_call($1, $3, $4, $2);
+                   }
+                | primary_value tCOLON2 operation2 command_args %prec tLOWEST
+                    {
+                      $$ = new_call($1, $3, $4, MrbTokens.tCOLON2);
+                    }
+                | primary_value tCOLON2 operation2 command_args cmd_brace_block
+                    {
+                      args_with_block($4, $5);
+                      $$ = new_call($1, $3, $4, MrbTokens.tCOLON2);
+                    }
+                | keyword_super command_args
+                    {
+                      $$ = new_super($2);
+                    }
+                | keyword_yield command_args
+                    {
+                      $$ = new_yield($2);
+                    }
+                | keyword_return call_args
+                    {
+                      $$ = new_return(ret_args($2));
+                    }
+                | keyword_break call_args
+                    {
+                      $$ = new_break(ret_args($2));
+                    }
+                | keyword_next call_args
+                    {
+                      $$ = new_next(ret_args($2));
+                    }
+                ;
+
+mlhs            : mlhs_basic
+                    {
+                      $$ = $1;
+                    }
+                | tLPAREN mlhs_inner rparen
+                    {
+                      $$ = $2;
+                    }
+                ;
+
+mlhs_inner      : mlhs_basic
+                | tLPAREN mlhs_inner rparen
+                    {
+                      $$ = $2;
+                    }
+                ;
+
+mlhs_basic      : mlhs_list
+                    {
+                      $$ = list1($1);
+                    }
+                | mlhs_list mlhs_item
+                    {
+                      $$ = list1(push($1, $2));
+                    }
+                | mlhs_list tSTAR mlhs_node
+                    {
+                      $$ = list2($1, $3);
+                    }
+                | mlhs_list tSTAR mlhs_node ',' mlhs_post
+                    {
+                      $$ = list3($1, $3, $5);
+                    }
+                | mlhs_list tSTAR
+                    {
+                      $$ = list2($1, new_nil());
+                    }
+                | mlhs_list tSTAR ',' mlhs_post
+                    {
+                      $$ = list3($1, new_nil(), $4);
+                    }
+                | tSTAR mlhs_node
+                    {
+                      $$ = list2(null, $2);
+                    }
+                | tSTAR mlhs_node ',' mlhs_post
+                    {
+                      $$ = list3(null, $2, $4);
+                    }
+                | tSTAR
+                    {
+                      $$ = list2(null, new_nil());
+                    }
+                | tSTAR ',' mlhs_post
+                    {
+                      $$ = list3(null, new_nil(), $3);
+                    }
+                ;
+
+mlhs_item       : mlhs_node
+                | tLPAREN mlhs_inner rparen
+                    {
+                      $$ = new_masgn($2, null);
+                    }
+                ;
+
+mlhs_list       : mlhs_item ','
+                    {
+                      $$ = list1($1);
+                    }
+                | mlhs_list mlhs_item ','
+                    {
+                      $$ = push($1, $2);
+                    }
+                ;
+
+mlhs_post       : mlhs_item
+                    {
+                      $$ = list1($1);
+                    }
+                | mlhs_list mlhs_item
+                    {
+                      $$ = push($1, $2);
+                    }
+                ;
+
+mlhs_node       : variable
+                    {
+                      assignable($1);
+                    }
+                | primary_value '[' opt_call_args rbracket
+                    {
+                      $$ = new_call($1, intern("[]",2), $3, (MrbTokens)'.');
+                    }
+                | primary_value call_op tIDENTIFIER
+                    {
+                      $$ = new_call($1, $3, null, $2);
+                    }
+                | primary_value tCOLON2 tIDENTIFIER
+                    {
+                      $$ = new_call($1, $3, null, MrbTokens.tCOLON2);
+                    }
+                | primary_value call_op tCONSTANT
+                    {
+                      $$ = new_call($1, $3, null, $2);
+                    }
+                | primary_value tCOLON2 tCONSTANT
+                    {
+                      if (this.in_def != 0 || this.in_single != 0)
+                        yyError("dynamic constant assignment");
+                      $$ = new_colon2($1, $3);
+                    }
+                | tCOLON3 tCONSTANT
+                    {
+                      if (this.in_def != 0 || this.in_single != 0)
+                        yyError("dynamic constant assignment");
+                      $$ = new_colon3($2);
+                    }
+                | backref
+                    {
+                      backref_error($1);
+                      $$ = null;
+                    }
+                ;
+
+lhs             : variable
+                    {
+                      assignable($1);
+                    }
+                | primary_value '[' opt_call_args rbracket
+                    {
+                      $$ = new_call($1, intern("[]",2), $3, (MrbTokens)'.');
+                    }
+                | primary_value call_op tIDENTIFIER
+                    {
+                      $$ = new_call($1, $3, null, $2);
+                    }
+                | primary_value tCOLON2 tIDENTIFIER
+                    {
+                      $$ = new_call($1, $3, null, MrbTokens.tCOLON2);
+                    }
+                | primary_value call_op tCONSTANT
+                    {
+                      $$ = new_call($1, $3, null, $2);
+                    }
+                | primary_value tCOLON2 tCONSTANT
+                    {
+                      if (this.in_def != 0 || this.in_single != 0)
+                        yyError("dynamic constant assignment");
+                      $$ = new_colon2($1, $3);
+                    }
+                | tCOLON3 tCONSTANT
+                    {
+                      if (this.in_def != 0 || this.in_single != 0)
+                        yyError("dynamic constant assignment");
+                      $$ = new_colon3($2);
+                    }
+                | backref
+                    {
+                      backref_error($1);
+                      $$ = null;
+                    }
+                ;
+
+cname           : tIDENTIFIER
+                    {
+                      yyError("class/module name must be CONSTANT");
+                    }
+                | tCONSTANT
+                ;
+
+cpath           : tCOLON3 cname
+                    {
+                      $$ = cons(1, $2);
+                    }
+                | cname
+                    {
+                      $$ = cons(0, $1);
+                    }
+                | primary_value tCOLON2 cname
+                    {
+                      $$ = cons($1, $3);
+                    }
+                ;
+
+fname           : tIDENTIFIER
+                | tCONSTANT
+                | tFID
+                | op
+                    {
+                      this.lstate = mrb_lex_state_enum.EXPR_ENDFN;
+                      $$ = $1;
+                    }
+                | reswords
+                    {
+                      this.lstate = mrb_lex_state_enum.EXPR_ENDFN;
+                      $$ = $<mrb_sym>1;
+                    }
+                ;
+
+fsym            : fname
+                | basic_symbol
+                ;
+
+undef_list      : fsym
+                    {
+                      $$ = new_undef($1);
+                    }
+                | undef_list ',' {this.lstate = mrb_lex_state_enum.EXPR_FNAME;} fsym
+                    {
+                      $$ = push($1, $4);
+                    }
+                ;
+
+op              : '|'           { $$ = intern_c('|');   }
+                | '^'           { $$ = intern_c('^');   }
+                | '&'           { $$ = intern_c('&');   }
+                | tCMP          { $$ = intern("<=>",3); }
+                | tEQ           { $$ = intern("==",2);  }
+                | tEQQ          { $$ = intern("===",3); }
+                | tMATCH        { $$ = intern("=~",2);  }
+                | tNMATCH       { $$ = intern("!~",2);  }
+                | '>'           { $$ = intern_c('>');   }
+                | tGEQ          { $$ = intern(">=",2);  }
+                | '<'           { $$ = intern_c('<');   }
+                | tLEQ          { $$ = intern("<=",2);  }
+                | tNEQ          { $$ = intern("!=",2);  }
+                | tLSHFT        { $$ = intern("<<",2);  }
+                | tRSHFT        { $$ = intern(">>",2);  }
+                | '+'           { $$ = intern_c('+');   }
+                | '-'           { $$ = intern_c('-');   }
+                | '*'           { $$ = intern_c('*');   }
+                | tSTAR         { $$ = intern_c('*');   }
+                | '/'           { $$ = intern_c('/');   }
+                | '%'           { $$ = intern_c('%');   }
+                | tPOW          { $$ = intern("**",2);  }
+                | '!'           { $$ = intern_c('!');   }
+                | '~'           { $$ = intern_c('~');   }
+                | tUPLUS        { $$ = intern("+@",2);  }
+                | tUMINUS       { $$ = intern("-@",2);  }
+                | tAREF         { $$ = intern("[]",2);  }
+                | tASET         { $$ = intern("[]=",3); }
+                | '`'           { $$ = intern_c('`');   }
+                ;
+
+reswords        : keyword__LINE__ | keyword__FILE__ | keyword__ENCODING__
+                | keyword_BEGIN | keyword_END
+                | keyword_alias | keyword_and | keyword_begin
+                | keyword_break | keyword_case | keyword_class | keyword_def
+                | keyword_do | keyword_else | keyword_elsif
+                | keyword_end | keyword_ensure | keyword_false
+                | keyword_for | keyword_in | keyword_module | keyword_next
+                | keyword_nil | keyword_not | keyword_or | keyword_redo
+                | keyword_rescue | keyword_retry | keyword_return | keyword_self
+                | keyword_super | keyword_then | keyword_true | keyword_undef
+                | keyword_when | keyword_yield | keyword_if | keyword_unless
+                | keyword_while | keyword_until
+                ;
+
+arg             : lhs '=' arg_rhs
+                    {
+                      $$ = new_asgn($1, $3);
+                    }
+                | var_lhs tOP_ASGN arg_rhs
+                    {
+                      $$ = new_op_asgn($1, $2, $3);
+                    }
+                | primary_value '[' opt_call_args rbracket tOP_ASGN arg_rhs
+                    {
+                      $$ = new_op_asgn(new_call($1, intern("[]",2), $3, (MrbTokens)'.'), $5, $6);
+                    }
+                | primary_value call_op tIDENTIFIER tOP_ASGN arg_rhs
+                    {
+                      $$ = new_op_asgn(new_call($1, $3, null, $2), $4, $5);
+                    }
+                | primary_value call_op tCONSTANT tOP_ASGN arg_rhs
+                    {
+                      $$ = new_op_asgn(new_call($1, $3, null, $2), $4, $5);
+                    }
+                | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg_rhs
+                    {
+                      $$ = new_op_asgn(new_call($1, $3, null, MrbTokens.tCOLON2), $4, $5);
+                    }
+                | primary_value tCOLON2 tCONSTANT tOP_ASGN arg_rhs
+                    {
+                      yyError("constant re-assignment");
+                      $$ = new_begin(null);
+                    }
+                | tCOLON3 tCONSTANT tOP_ASGN arg_rhs
+                    {
+                      yyError("constant re-assignment");
+                      $$ = new_begin(null);
+                    }
+                | backref tOP_ASGN arg_rhs
+                    {
+                      backref_error($1);
+                      $$ = new_begin(null);
+                    }
+                | arg tDOT2 arg
+                    {
+                      $$ = new_dot2($1, $3);
+                    }
+                | arg tDOT3 arg
+                    {
+                      $$ = new_dot3($1, $3);
+                    }
+                | arg '+' arg
+                    {
+                      $$ = call_bin_op($1, "+", $3);
+                    }
+                | arg '-' arg
+                    {
+                      $$ = call_bin_op($1, "-", $3);
+                    }
+                | arg '*' arg
+                    {
+                      $$ = call_bin_op($1, "*", $3);
+                    }
+                | arg '/' arg
+                    {
+                      $$ = call_bin_op($1, "/", $3);
+                    }
+                | arg '%' arg
+                    {
+                      $$ = call_bin_op($1, "%", $3);
+                    }
+                | arg tPOW arg
+                    {
+                      $$ = call_bin_op($1, "**", $3);
+                    }
+                | tUMINUS_NUM tINTEGER tPOW arg
+                    {
+                      $$ = call_uni_op(call_bin_op($2, "**", $4), "-@");
+                    }
+                | tUMINUS_NUM tFLOAT tPOW arg
+                    {
+                      $$ = call_uni_op(call_bin_op($2, "**", $4), "-@");
+                    }
+                | tUPLUS arg
+                    {
+                      $$ = call_uni_op($2, "+@");
+                    }
+                | tUMINUS arg
+                    {
+                      $$ = call_uni_op($2, "-@");
+                    }
+                | arg '|' arg
+                    {
+                      $$ = call_bin_op($1, "|", $3);
+                    }
+                | arg '^' arg
+                    {
+                      $$ = call_bin_op($1, "^", $3);
+                    }
+                | arg '&' arg
+                    {
+                      $$ = call_bin_op($1, "&", $3);
+                    }
+                | arg tCMP arg
+                    {
+                      $$ = call_bin_op($1, "<=>", $3);
+                    }
+                | arg '>' arg
+                    {
+                      $$ = call_bin_op($1, ">", $3);
+                    }
+                | arg tGEQ arg
+                    {
+                      $$ = call_bin_op($1, ">=", $3);
+                    }
+                | arg '<' arg
+                    {
+                      $$ = call_bin_op($1, "<", $3);
+                    }
+                | arg tLEQ arg
+                    {
+                      $$ = call_bin_op($1, "<=", $3);
+                    }
+                | arg tEQ arg
+                    {
+                      $$ = call_bin_op($1, "==", $3);
+                    }
+                | arg tEQQ arg
+                    {
+                      $$ = call_bin_op($1, "===", $3);
+                    }
+                | arg tNEQ arg
+                    {
+                      $$ = call_bin_op($1, "!=", $3);
+                    }
+                | arg tMATCH arg
+                    {
+                      $$ = call_bin_op($1, "=~", $3);
+                    }
+                | arg tNMATCH arg
+                    {
+                      $$ = call_bin_op($1, "!~", $3);
+                    }
+                | '!' arg
+                    {
+                      $$ = call_uni_op(cond($2), "!");
+                    }
+                | '~' arg
+                    {
+                      $$ = call_uni_op(cond($2), "~");
+                    }
+                | arg tLSHFT arg
+                    {
+                      $$ = call_bin_op($1, "<<", $3);
+                    }
+                | arg tRSHFT arg
+                    {
+                      $$ = call_bin_op($1, ">>", $3);
+                    }
+                | arg tANDOP arg
+                    {
+                      $$ = new_and($1, $3);
+                    }
+                | arg tOROP arg
+                    {
+                      $$ = new_or($1, $3);
+                    }
+                | arg '?' arg opt_nl ':' arg
+                    {
+                      $$ = new_if(cond($1), $3, $6, true);
+                    }
+                | primary
+                    {
+                      $$ = $1;
+                    }
+                ;
+
+aref_args       : none
+                | args trailer
+                    {
+                      $$ = $1;
+                      $<node>$.NODE_LINENO($1);
+                    }
+                | args comma assocs trailer
+                    {
+                      $$ = push($1, new_hash($3));
+                    }
+                | assocs trailer
+                    {
+                      $$ = cons(new_hash($1), null);
+                      $<node>$.NODE_LINENO($1);
+                    }
+                ;
+
+arg_rhs         : arg   %prec tOP_ASGN
+                    {
+                      void_expr_error($1);
+                      $$ = $1;
+                    }
+                | arg modifier_rescue arg
+                    {
+                      void_expr_error($1);
+                      $$ = new_mod_rescue($1, $3);
+                    }
+                ;
+
+paren_args      : '(' opt_call_args rparen
+                    {
+                      $$ = $2;
+                    }
+                ;
+
+opt_paren_args  : none
+                | paren_args
+                ;
+
+opt_call_args   : none
+                | call_args
+                | args ','
+                    {
+                      $$ = cons($1, null);
+                      $<node>$.NODE_LINENO($1);
+                    }
+                | args comma assocs ','
+                    {
+                      $$ = cons(push($1, new_hash($3)), null);
+                      $<node>$.NODE_LINENO($1);
+                    }
+                | assocs ','
+                    {
+                      $$ = cons(list1(new_hash($1)), null);
+                      $<node>$.NODE_LINENO($1);
+                    }
+                ;
+
+call_args       : command
+                    {
+                      $$ = cons(list1($1), null);
+                      $<node>$.NODE_LINENO($1);
+                    }
+                | args opt_block_arg
+                    {
+                      $$ = cons($1, $2);
+                      $<node>$.NODE_LINENO($1);
+                    }
+                | assocs opt_block_arg
+                    {
+                      $$ = cons(list1(new_hash($1)), $2);
+                      $<node>$.NODE_LINENO($1);
+                    }
+                | args comma assocs opt_block_arg
+                    {
+                      $$ = cons(push($1, new_hash($3)), $4);
+                      $<node>$.NODE_LINENO($1);
+                    }
+                | block_arg
+                    {
+                      $$ = cons(null, $1);
+                      $<node>$.NODE_LINENO($1);
+                    }
+                ;
+
+command_args    :  {
+                      $$ = (stack_type)this.cmdarg_stack;
+                      CMDARG_PUSH(1);
+                    }
+                  call_args
+                    {
+                      this.cmdarg_stack = $<stack_type>1;
+                      $$ = $2;
+                    }
+                ;
+
+block_arg       : tAMPER arg
+                    {
+                      $$ = new_block_arg((node)$2);
+                    }
+                ;
+
+opt_block_arg   : comma block_arg
+                    {
+                      $$ = $2;
+                    }
+                | none
+                    {
+                      $$ = null;
+                    }
+                ;
+
+comma           : ','
+                | ','  heredoc_bodies
+                ;
+
+args            : arg
+                    {
+                      void_expr_error($1);
+                      $$ = cons($1, null);
+                      $<node>$.NODE_LINENO($1);
+                    }
+                | tSTAR arg
+                    {
+                      void_expr_error($2);
+                      $$ = cons(new_splat($2), null);
+                      $<node>$.NODE_LINENO($2);
+                    }
+                | args comma arg
+                    {
+                      void_expr_error($3);
+                      $$ = push($1, $3);
+                    }
+                | args comma tSTAR arg
+                    {
+                      void_expr_error($4);
+                      $$ = push($1, new_splat($4));
+                    }
+                ;
+
+mrhs            : args comma arg
+                    {
+                      void_expr_error($3);
+                      $$ = push($1, $3);
+                    }
+                | args comma tSTAR arg
+                    {
+                      void_expr_error($4);
+                      $$ = push($1, new_splat($4));
+                    }
+                | tSTAR arg
+                    {
+                      void_expr_error($2);
+                      $$ = list1(new_splat($2));
+                    }
+                ;
+
+primary         : literal
+                | string
+                | xstring
+                | regexp
+                | heredoc
+                | var_ref
+                | backref
+                | tFID
+                    {
+                      $$ = new_fcall($1, null);
+                    }
+                | keyword_begin
+                    {
+                      $$ = (stack_type)this.cmdarg_stack;
+                      this.cmdarg_stack = 0;
+                    }
+                  bodystmt
+                  keyword_end
+                    {
+                      this.cmdarg_stack = $<stack_type>2;
+                      $$ = $3;
+                    }
+                | tLPAREN_ARG
+                    {
+                      $$ = (stack_type)this.cmdarg_stack;
+                      this.cmdarg_stack = 0;
+                    }
+                  stmt {this.lstate = mrb_lex_state_enum.EXPR_ENDARG;} rparen
+                    {
+                      this.cmdarg_stack = $<stack_type>2;
+                      $$ = $3;
+                    }
+                | tLPAREN_ARG {this.lstate = mrb_lex_state_enum.EXPR_ENDARG;} rparen
+                    {
+                      $$ = new_nil();
+                    }
+                | tLPAREN compstmt ')'
+                    {
+                      $$ = $2;
+                    }
+                | primary_value tCOLON2 tCONSTANT
+                    {
+                      $$ = new_colon2($1, $3);
+                    }
+                | tCOLON3 tCONSTANT
+                    {
+                      $$ = new_colon3($2);
+                    }
+                | tLBRACK aref_args ']'
+                    {
+                      $$ = new_array($2);
+                      $<node>$.NODE_LINENO($2);
+                    }
+                | tLBRACE assoc_list '}'
+                    {
+                      $$ = new_hash($2);
+                      $<node>$.NODE_LINENO($2);
+                    }
+                | keyword_return
+                    {
+                      $$ = new_return(null);
+                    }
+                | keyword_yield opt_paren_args
+                    {
+                      $$ = new_yield($2);
+                    }
+                | keyword_not '(' expr rparen
+                    {
+                      $$ = call_uni_op(cond($3), "!");
+                    }
+                | keyword_not '(' rparen
+                    {
+                      $$ = call_uni_op(new_nil(), "!");
+                    }
+                | operation brace_block
+                    {
+                      $$ = new_fcall($1, cons(null, $2));
+                    }
+                | method_call
+                | method_call brace_block
+                    {
+                      call_with_block($1, $2);
+                      $$ = $1;
+                    }
+                | tLAMBDA
+                    {
+                      local_nest();
+                      $$ = (int)this.lpar_beg;
+                      this.lpar_beg = ++this.paren_nest;
+                    }
+                  f_larglist
+                    {
+                      $$ = (stack_type)this.cmdarg_stack;
+                      this.cmdarg_stack = 0;
+                    }
+                  lambda_body
+                    {
+                      this.lpar_beg = $<int>2;
+                      $$ = new_lambda($3, $5);
+                      local_unnest();
+                      this.cmdarg_stack = $<stack_type>4;
+                      CMDARG_LEXPOP();
+                    }
+                | keyword_if expr_value then
+                  compstmt
+                  if_tail
+                  keyword_end
+                    {
+                      $$ = new_if(cond($2), $4, $5);
+                      $<node>$.SET_LINENO($1);
+                    }
+                | keyword_unless expr_value then
+                  compstmt
+                  opt_else
+                  keyword_end
+                    {
+                      $$ = new_unless(cond($2), $4, $5);
+                      $<node>$.SET_LINENO($1);
+                    }
+                | keyword_while {COND_PUSH(1);} expr_value do {COND_POP();}
+                  compstmt
+                  keyword_end
+                    {
+                      $$ = new_while(cond($3), $6);
+                      $<node>$.SET_LINENO($1);
+                    }
+                | keyword_until {COND_PUSH(1);} expr_value do {COND_POP();}
+                  compstmt
+                  keyword_end
+                    {
+                      $$ = new_until(cond($3), $6);
+                      $<node>$.SET_LINENO($1);
+                    }
+                | keyword_case expr_value opt_terms
+                  case_body
+                  keyword_end
+                    {
+                      $$ = new_case($2, $4);
+                    }
+                | keyword_case opt_terms case_body keyword_end
+                    {
+                      $$ = new_case(null, $3);
+                    }
+                | keyword_for for_var keyword_in
+                  {COND_PUSH(1);}
+                  expr_value do
+                  {COND_POP();}
+                  compstmt
+                  keyword_end
+                    {
+                      $$ = new_for($2, $5, $8);
+                      $<node>$.SET_LINENO($1);
+                    }
+                | keyword_class
+                  cpath superclass
+                    {
+                      if (this.in_def != 0 || this.in_single != 0)
+                        yyError("class definition in method body");
+                      $$ = local_switch();
+                    }
+                  bodystmt
+                  keyword_end
+                    {
+                      $$ = new_class($2, $3, $5);
+                      $<node>$.SET_LINENO($1);
+                      local_resume($<locals_node>4);
+                    }
+                | keyword_class
+                  tLSHFT expr
+                    {
+                      $$ = (int)this.in_def;
+                      this.in_def = 0;
+                    }
+                  term
+                    {
+                      $$ = cons(local_switch(), this.in_single);
+                      this.in_single = 0;
+                    }
+                  bodystmt
+                  keyword_end
+                    {
+                      $$ = new_sclass($3, $7);
+                      $<node>$.SET_LINENO($1);
+                      local_resume((locals_node)$<node>6.car);
+                      this.in_def = $<int>4;
+                      this.in_single = (int)($<node>6.cdr);
+                    }
+                | keyword_module
+                  cpath
+                    {
+                      if (this.in_def != 0 || this.in_single != 0)
+                        yyError("module definition in method body");
+                      $$ = local_switch();
+                    }
+                  bodystmt
+                  keyword_end
+                    {
+                      $$ = new_module($2, $4);
+                      $<node>$.SET_LINENO($1);
+                      local_resume($<locals_node>3);
+                    }
+                | keyword_def fname
+                    {
+                      $$ = (stack_type)this.cmdarg_stack;
+                      this.cmdarg_stack = 0;
+                    }
+                    {
+                      this.in_def++;
+                      $$ = local_switch();
+                    }
+                  f_arglist
+                  bodystmt
+                  keyword_end
+                    {
+                      $$ = new_def($2, $5, $6);
+                      $<node>$.SET_LINENO($1);
+                      local_resume($<locals_node>4);
+                      this.in_def--;
+                      this.cmdarg_stack = $<stack_type>3;
+                    }
+                | keyword_def singleton dot_or_colon
+                    {
+                      this.lstate = mrb_lex_state_enum.EXPR_FNAME;
+                      $$ = (stack_type)this.cmdarg_stack;
+                      this.cmdarg_stack = 0;
+                    }
+                    fname
+                    {
+                      this.in_single++;
+                      this.lstate = mrb_lex_state_enum.EXPR_ENDFN; /* force for args */
+                      $$ = local_switch();
+                    }
+                  f_arglist
+                  bodystmt
+                  keyword_end
+                    {
+                      $$ = new_sdef($2, $5, $7, $8);
+                      $<node>$.SET_LINENO($1);
+                      local_resume($<locals_node>6);
+                      this.in_single--;
+                      this.cmdarg_stack = $<stack_type>4;
+                    }
+                | keyword_break
+                    {
+                      $$ = new_break(null);
+                    }
+                | keyword_next
+                    {
+                      $$ = new_next(null);
+                    }
+                | keyword_redo
+                    {
+                      $$ = new_redo();
+                    }
+                | keyword_retry
+                    {
+                      $$ = new_retry();
+                    }
+                ;
+
+primary_value   : primary
+                    {
+                      $$ = $1;
+                      if ($$ == null) $$ = new_nil();
+                    }
+                ;
+
+then            : term
+                | keyword_then
+                | term keyword_then
+                ;
+
+do              : term
+                | keyword_do_cond
+                ;
+
+if_tail         : opt_else
+                | keyword_elsif expr_value then
+                  compstmt
+                  if_tail
+                    {
+                      $$ = new_if(cond($2), $4, $5);
+                    }
+                ;
+
+opt_else        : none
+                | keyword_else compstmt
+                    {
+                      $$ = $2;
+                    }
+                ;
+
+for_var         : lhs
+                    {
+                      $$ = list1(list1($1));
+                    }
+                | mlhs
+                ;
+
+f_marg          : f_norm_arg
+                    {
+                      $$ = new_arg($1);
+                    }
+                | tLPAREN f_margs rparen
+                    {
+                      $$ = new_masgn($2, null);
+                    }
+                ;
+
+f_marg_list     : f_marg
+                    {
+                      $$ = list1($1);
+                    }
+                | f_marg_list ',' f_marg
+                    {
+                      $$ = push($1, $3);
+                    }
+                ;
+
+f_margs         : f_marg_list
+                    {
+                      $$ = list3($1, null, null);
+                    }
+                | f_marg_list ',' tSTAR f_norm_arg
+                    {
+                      $$ = list3($1, new_arg($4), null);
+                    }
+                | f_marg_list ',' tSTAR f_norm_arg ',' f_marg_list
+                    {
+                      $$ = list3($1, new_arg($4), $6);
+                    }
+                | f_marg_list ',' tSTAR
+                    {
+                      $$ = list3($1, -1, null);
+                    }
+                | f_marg_list ',' tSTAR ',' f_marg_list
+                    {
+                      $$ = list3($1, -1, $5);
+                    }
+                | tSTAR f_norm_arg
+                    {
+                      $$ = list3(null, new_arg($2), null);
+                    }
+                | tSTAR f_norm_arg ',' f_marg_list
+                    {
+                      $$ = list3(null, new_arg($2), $4);
+                    }
+                | tSTAR
+                    {
+                      $$ = list3(null, -1, null);
+                    }
+                | tSTAR ',' f_marg_list
+                    {
+                      $$ = list3(null, -1, $3);
+                    }
+                ;
+
+block_param     : f_arg ',' f_block_optarg ',' f_rest_arg opt_f_block_arg
+                    {
+                      $$ = new_args($1, $3, $5, null, $6);
+                    }
+                | f_arg ',' f_block_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args($1, $3, $5, $7, $8);
+                    }
+                | f_arg ',' f_block_optarg opt_f_block_arg
+                    {
+                      $$ = new_args($1, $3, 0, null, $4);
+                    }
+                | f_arg ',' f_block_optarg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args($1, $3, 0, $5, $6);
+                    }
+                | f_arg ',' f_rest_arg opt_f_block_arg
+                    {
+                      $$ = new_args($1, null, $3, null, $4);
+                    }
+                | f_arg ','
+                    {
+                      $$ = new_args($1, null, (mrb_sym)0, null, 0);
+                    }
+                | f_arg ',' f_rest_arg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args($1, null, $3, $5, $6);
+                    }
+                | f_arg opt_f_block_arg
+                    {
+                      $$ = new_args($1, null, 0, null, $2);
+                    }
+                | f_block_optarg ',' f_rest_arg opt_f_block_arg
+                    {
+                      $$ = new_args(null, $1, $3, null, $4);
+                    }
+                | f_block_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(null, $1, $3, $5, $6);
+                    }
+                | f_block_optarg opt_f_block_arg
+                    {
+                      $$ = new_args(null, $1, 0, null, $2);
+                    }
+                | f_block_optarg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(null, $1, 0, $3, $4);
+                    }
+                | f_rest_arg opt_f_block_arg
+                    {
+                      $$ = new_args(null, null, $1, null, $2);
+                    }
+                | f_rest_arg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(null, null, $1, $3, $4);
+                    }
+                | f_block_arg
+                    {
+                      $$ = new_args(null, null, 0, null, $1);
+                    }
+                ;
+
+opt_block_param : none
+                | block_param_def
+                    {
+                      this.cmd_start = true;
+                      $$ = $1;
+                    }
+                ;
+
+block_param_def : '|' opt_bv_decl '|'
+                    {
+                      $$ = null;
+                    }
+                | tOROP
+                    {
+                      $$ = null;
+                    }
+                | '|' block_param opt_bv_decl '|'
+                    {
+                      $$ = $2;
+                    }
+                ;
+
+
+opt_bv_decl     : opt_nl
+                    {
+                      $$ = null;
+                    }
+                | opt_nl ';' bv_decls opt_nl
+                    {
+                      $$ = null;
+                    }
+                ;
+
+bv_decls        : bvar
+                | bv_decls ',' bvar
+                ;
+
+bvar            : tIDENTIFIER
+                    {
+                      local_add_f($1);
+                      new_bv($1);
+                    }
+                | f_bad_arg
+                ;
+
+f_larglist      : '(' f_args opt_bv_decl ')'
+                    {
+                      $$ = $2;
+                    }
+                | f_args
+                    {
+                      $$ = $1;
+                    }
+                ;
+
+lambda_body     : tLAMBEG compstmt '}'
+                    {
+                      $$ = $2;
+                    }
+                | keyword_do_LAMBDA compstmt keyword_end
+                    {
+                      $$ = $2;
+                    }
+                ;
+
+do_block        : keyword_do_block
+                    {
+                      local_nest();
+                    }
+                  opt_block_param
+                  compstmt
+                  keyword_end
+                    {
+                      $$ = new_block($3, $4, false);
+                      local_unnest();
+                    }
+                ;
+
+block_call      : command do_block
+                    {
+                      if ((node_type)$1.car == node_type.NODE_YIELD) {
+                        yyError("block given to yield");
+                      }
+                      else {
+                        call_with_block($1, $2);
+                      }
+                      $$ = $1;
+                    }
+                | block_call call_op2 operation2 opt_paren_args
+                    {
+                      $$ = new_call($1, $3, $4, $2);
+                    }
+                | block_call call_op2 operation2 opt_paren_args brace_block
+                    {
+                      $$ = new_call($1, $3, $4, $2);
+                      call_with_block((node)$$, $5);
+                    }
+                | block_call call_op2 operation2 command_args do_block
+                    {
+                      $$ = new_call($1, $3, $4, $2);
+                      call_with_block((node)$$, $5);
+                    }
+                ;
+
+method_call     : operation paren_args
+                    {
+                      $$ = new_fcall($1, $2);
+                    }
+                | primary_value call_op operation2 opt_paren_args
+                    {
+                      $$ = new_call($1, $3, $4, $2);
+                    }
+                | primary_value tCOLON2 operation2 paren_args
+                    {
+                      $$ = new_call($1, $3, $4, MrbTokens.tCOLON2);
+                    }
+                | primary_value tCOLON2 operation3
+                    {
+                      $$ = new_call($1, $3, null, MrbTokens.tCOLON2);
+                    }
+                | primary_value call_op paren_args
+                    {
+                      $$ = new_call($1, intern("call",4), $3, $2);
+                    }
+                | primary_value tCOLON2 paren_args
+                    {
+                      $$ = new_call($1, intern("call",4), $3, MrbTokens.tCOLON2);
+                    }
+                | keyword_super paren_args
+                    {
+                      $$ = new_super($2);
+                    }
+                | keyword_super
+                    {
+                      $$ = new_zsuper();
+                    }
+                | primary_value '[' opt_call_args rbracket
+                    {
+                      $$ = new_call($1, intern("[]",2), $3, (MrbTokens)'.');
+                    }
+                ;
+
+brace_block     : '{'
+                    {
+                      local_nest();
+                      $$ = (int)this.lineno;
+                    }
+                  opt_block_param
+                  compstmt '}'
+                    {
+                      $$ = new_block($3, $4, true);
+                      $<node>$.SET_LINENO($<int>2);
+                      local_unnest();
+                    }
+                | keyword_do
+                    {
+                      local_nest();
+                      $$ = (int)this.lineno;
+                    }
+                  opt_block_param
+                  compstmt keyword_end
+                    {
+                      $$ = new_block($3, $4, false);
+                      $<node>$.SET_LINENO($<int>2);
+                      local_unnest();
+                    }
+                ;
+
+case_body       : keyword_when args then
+                  compstmt
+                  cases
+                    {
+                      $$ = cons(cons($2, $4), $5);
+                    }
+                ;
+
+cases           : opt_else
+                    {
+                      if ($1 != null) {
+                        $$ = cons(cons(null, $1), null);
+                      }
+                      else {
+                        $$ = null;
+                      }
+                    }
+                | case_body
+                ;
+
+opt_rescue      : keyword_rescue exc_list exc_var then
+                  compstmt
+                  opt_rescue
+                    {
+                      $$ = list1(list3($2, $3, $5));
+                      if ($6 != null) $$ = append($<node>$, $6);
+                    }
+                | none
+                ;
+
+exc_list        : arg
+                    {
+                        $$ = list1($1);
+                    }
+                | mrhs
+                | none
+                ;
+
+exc_var         : tASSOC lhs
+                    {
+                      $$ = $2;
+                    }
+                | none
+                ;
+
+opt_ensure      : keyword_ensure compstmt
+                    {
+                      $$ = $2;
+                    }
+                | none
+                ;
+
+literal         : numeric
+                | symbol
+                | words
+                | symbols
+                ;
+
+string          : tCHAR
+                | tSTRING
+                | tSTRING_BEG tSTRING
+                    {
+                      $$ = $2;
+                    }
+                | tSTRING_BEG string_rep tSTRING
+                    {
+                      $$ = new_dstr(push($2, $3));
+                    }
+                ;
+
+string_rep      : string_interp
+                | string_rep string_interp
+                    {
+                      $$ = append($1, $2);
+                    }
+                ;
+
+string_interp   : tSTRING_MID
+                    {
+                      $$ = list1($1);
+                    }
+                | tSTRING_PART
+                    {
+                      $$ = (node)this.lex_strterm;
+                      this.lex_strterm = null;
+                    }
+                  compstmt
+                  '}'
+                    {
+                      this.lex_strterm = $<node>2;
+                      $$ = list2($1, $3);
+                    }
+                | tLITERAL_DELIM
+                    {
+                      $$ = list1(new_literal_delim());
+                    }
+                | tHD_LITERAL_DELIM heredoc_bodies
+                    {
+                      $$ = list1(new_literal_delim());
+                    }
+                ;
+
+xstring         : tXSTRING_BEG tXSTRING
+                    {
+                        $$ = $2;
+                    }
+                | tXSTRING_BEG string_rep tXSTRING
+                    {
+                      $$ = new_dxstr(push($2, $3));
+                    }
+                ;
+
+regexp          : tREGEXP_BEG tREGEXP
+                    {
+                        $$ = $2;
+                    }
+                | tREGEXP_BEG string_rep tREGEXP
+                    {
+                      $$ = new_dregx($2, $3);
+                    }
+                ;
+
+heredoc         : tHEREDOC_BEG
+                ;
+
+heredoc_bodies  : heredoc_body
+                | heredoc_bodies heredoc_body
+                ;
+
+heredoc_body    : tHEREDOC_END
+                    {
+                      parser_heredoc_info inf = parsing_heredoc_inf();
+                      inf.push_doc(new_str(new Uint8Array(0), 0));
+                      heredoc_end();
+                    }
+                | heredoc_string_rep tHEREDOC_END
+                    {
+                      heredoc_end();
+                    }
+                ;
+
+heredoc_string_rep : heredoc_string_interp
+                   | heredoc_string_rep heredoc_string_interp
+                   ;
+
+heredoc_string_interp : tHD_STRING_MID
+                    {
+                      parser_heredoc_info inf = parsing_heredoc_inf();
+                      inf.push_doc($1);
+                      heredoc_treat_nextline();
+                    }
+                | tHD_STRING_PART
+                    {
+                      $$ = (node)this.lex_strterm;
+                      this.lex_strterm = null;
+                    }
+                  compstmt
+                  '}'
+                    {
+                      parser_heredoc_info inf = parsing_heredoc_inf();
+                      this.lex_strterm = $<node>2;
+                      inf.push_doc($1);
+                      inf.push_doc($3);
+                    }
+                ;
+
+words           : tWORDS_BEG tSTRING
+                    {
+                      $$ = new_words(list1($2));
+                    }
+                | tWORDS_BEG string_rep tSTRING
+                    {
+                      $$ = new_words(push($2, $3));
+                    }
+                ;
+
+
+symbol          : basic_symbol
+                    {
+                      $$ = new_sym($1);
+                    }
+                | tSYMBEG tSTRING_BEG string_rep tSTRING
+                    {
+                      this.lstate = mrb_lex_state_enum.EXPR_END;
+                      $$ = new_dsym(push($3, $4));
+                    }
+                ;
+
+basic_symbol    : tSYMBEG sym
+                    {
+                      this.lstate = mrb_lex_state_enum.EXPR_END;
+                      $$ = $2;
+                    }
+                ;
+
+sym             : fname
+                | tIVAR
+                | tGVAR
+                | tCVAR
+                | tSTRING
+                    {
+                      $$ = new_strsym($1);
+                    }
+                | tSTRING_BEG tSTRING
+                    {
+                      $$ = new_strsym($2);
+                    }
+                ;
+
+symbols         : tSYMBOLS_BEG tSTRING
+                    {
+                      $$ = new_symbols(list1($2));
+                    }
+                | tSYMBOLS_BEG string_rep tSTRING
+                    {
+                      $$ = new_symbols(push($2, $3));
+                    }
+                ;
+
+numeric         : tINTEGER
+                | tFLOAT
+                | tUMINUS_NUM tINTEGER          %prec tLOWEST
+                    {
+                      $$ = negate_lit($2);
+                    }
+                | tUMINUS_NUM tFLOAT            %prec tLOWEST
+                    {
+                      $$ = negate_lit($2);
+                    }
+                ;
+
+variable        : tIDENTIFIER
+                    {
+                      $$ = new_lvar($1);
+                    }
+                | tIVAR
+                    {
+                      $$ = new_ivar($1);
+                    }
+                | tGVAR
+                    {
+                      $$ = new_gvar($1);
+                    }
+                | tCVAR
+                    {
+                      $$ = new_cvar($1);
+                    }
+                | tCONSTANT
+                    {
+                      $$ = new_const($1);
+                    }
+                ;
+
+var_lhs         : variable
+                    {
+                      assignable($1);
+                    }
+                ;
+
+var_ref         : variable
+                    {
+                      $$ = var_reference($1);
+                    }
+                | keyword_nil
+                    {
+                      $$ = new_nil();
+                    }
+                | keyword_self
+                    {
+                      $$ = new_self();
+                    }
+                | keyword_true
+                    {
+                      $$ = new_true();
+                    }
+                | keyword_false
+                    {
+                      $$ = new_false();
+                    }
+                | keyword__FILE__
+                    {
+                      if (this.filename == null) {
+                        this.mrb_parser_set_filename("(null)");
+                      }
+                      $$ = new_filename(this.filename);
+                    }
+                | keyword__LINE__
+                    {
+                      $$ = new_lineno(this.lineno);
+                    }
+                ;
+
+backref         : tNTH_REF
+                | tBACK_REF
+                ;
+
+superclass      : /* term */
+                    {
+                      $$ = null;
+                    }
+                | '<'
+                    {
+                      this.lstate = mrb_lex_state_enum.EXPR_BEG;
+                      this.cmd_start = true;
+                    }
+                  expr_value term
+                    {
+                      $$ = $3;
+                    } /*
+                | error term
+                    {
+                      yyErrorFlag = 0;
+                      $$ = null;
+                    } */
+                ;
+
+f_arglist       : '(' f_args rparen
+                    {
+                      $$ = $2;
+                      this.lstate = mrb_lex_state_enum.EXPR_BEG;
+                      this.cmd_start = true;
+                    }
+                | f_args term
+                    {
+                      $$ = $1;
+                    }
+                ;
+
+f_args          : f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg
+                    {
+                      $$ = new_args($1, $3, $5, null, $6);
+                    }
+                | f_arg ',' f_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args($1, $3, $5, $7, $8);
+                    }
+                | f_arg ',' f_optarg opt_f_block_arg
+                    {
+                      $$ = new_args($1, $3, 0, null, $4);
+                    }
+                | f_arg ',' f_optarg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args($1, $3, 0, $5, $6);
+                    }
+                | f_arg ',' f_rest_arg opt_f_block_arg
+                    {
+                      $$ = new_args($1, null, $3, null, $4);
+                    }
+                | f_arg ',' f_rest_arg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args($1, null, $3, $5, $6);
+                    }
+                | f_arg opt_f_block_arg
+                    {
+                      $$ = new_args($1, null, 0, null, $2);
+                    }
+                | f_optarg ',' f_rest_arg opt_f_block_arg
+                    {
+                      $$ = new_args(null, $1, $3, null, $4);
+                    }
+                | f_optarg ',' f_rest_arg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(null, $1, $3, $5, $6);
+                    }
+                | f_optarg opt_f_block_arg
+                    {
+                      $$ = new_args(null, $1, 0, null, $2);
+                    }
+                | f_optarg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(null, $1, 0, $3, $4);
+                    }
+                | f_rest_arg opt_f_block_arg
+                    {
+                      $$ = new_args(null, null, $1, null, $2);
+                    }
+                | f_rest_arg ',' f_arg opt_f_block_arg
+                    {
+                      $$ = new_args(null, null, $1, $3, $4);
+                    }
+                | f_block_arg
+                    {
+                      $$ = new_args(null, null, 0, null, $1);
+                    }
+                | /* none */
+                    {
+                      local_add_f(0);
+                      $$ = new_args(null, null, 0, null, 0);
+                    }
+                ;
+
+f_bad_arg       : tCONSTANT
+                    {
+                      yyError("formal argument cannot be a constant");
+                      $$ = null;
+                    }
+                | tIVAR
+                    {
+                      yyError("formal argument cannot be an instance variable");
+                      $$ = null;
+                    }
+                | tGVAR
+                    {
+                      yyError("formal argument cannot be a global variable");
+                      $$ = null;
+                    }
+                | tCVAR
+                    {
+                      yyError("formal argument cannot be a class variable");
+                      $$ = null;
+                    }
+                ;
+
+f_norm_arg      : f_bad_arg
+                    {
+                      $$ = null;
+                    }
+                | tIDENTIFIER
+                    {
+                      local_add_f($1);
+                      $$ = $1;
+                    }
+                ;
+
+f_arg_item      : f_norm_arg
+                    {
+                      $$ = new_arg($1);
+                    }
+                | tLPAREN f_margs rparen
+                    {
+                      $$ = new_masgn($2, null);
+                    }
+                ;
+
+f_arg           : f_arg_item
+                    {
+                      $$ = list1($1);
+                    }
+                | f_arg ',' f_arg_item
+                    {
+                      $$ = push($1, $3);
+                    }
+                ;
+
+f_opt_asgn      : tIDENTIFIER '='
+                    {
+                      local_add_f($1);
+                      $$ = $1;
+                    }
+                ;
+
+f_opt           : f_opt_asgn arg
+                    {
+                      $$ = cons($1, $2);
+                    }
+                ;
+
+f_block_opt     : f_opt_asgn primary_value
+                    {
+                      $$ = cons($1, $2);
+                    }
+                ;
+
+f_block_optarg  : f_block_opt
+                    {
+                      $$ = list1($1);
+                    }
+                | f_block_optarg ',' f_block_opt
+                    {
+                      $$ = push($1, $3);
+                    }
+                ;
+
+f_optarg        : f_opt
+                    {
+                      $$ = list1($1);
+                    }
+                | f_optarg ',' f_opt
+                    {
+                      $$ = push($1, $3);
+                    }
+                ;
+
+restarg_mark    : '*'
+                | tSTAR
+                ;
+
+f_rest_arg      : restarg_mark tIDENTIFIER
+                    {
+                      local_add_f($2);
+                      $$ = $2;
+                    }
+                | restarg_mark
+                    {
+                      local_add_f(0);
+                      $$ = -1;
+                    }
+                ;
+
+blkarg_mark     : '&'
+                | tAMPER
+                ;
+
+f_block_arg     : blkarg_mark tIDENTIFIER
+                    {
+                      local_add_f($2);
+                      $$ = $2;
+                    }
+                ;
+
+opt_f_block_arg : ',' f_block_arg
+                    {
+                      $$ = $2;
+                    }
+                | none
+                    {
+                      local_add_f(0);
+                      $$ = 0;
+                    }
+                ;
+
+singleton       : var_ref
+                    {
+                      $$ = $1;
+                      if ($$ == null) $$ = new_nil();
+                    }
+                | '(' {this.lstate = mrb_lex_state_enum.EXPR_BEG;} expr rparen
+                    {
+                      if ($<int>3 == 0) {
+                        yyError("can't define singleton method for ().");
+                      }
+                      else {
+                        switch ((node_type)($3.car)) {
+                        case node_type.NODE_STR:
+                        case node_type.NODE_DSTR:
+                        case node_type.NODE_XSTR:
+                        case node_type.NODE_DXSTR:
+                        case node_type.NODE_DREGX:
+                        case node_type.NODE_MATCH:
+                        case node_type.NODE_FLOAT:
+                        case node_type.NODE_ARRAY:
+                        case node_type.NODE_HEREDOC:
+                          yyError("can't define singleton method for literals");
+                          break;
+                        default:
+                          break;
+                        }
+                      }
+                      $$ = $3;
+                    }
+                ;
+
+assoc_list      : none
+                | assocs trailer
+                    {
+                      $$ = $1;
+                    }
+                ;
+
+assocs          : assoc
+                    {
+                      $$ = list1($1);
+                      $<node>$.NODE_LINENO($1);
+                    }
+                | assocs ',' assoc
+                    {
+                      $$ = push($1, $3);
+                    }
+                ;
+
+assoc           : arg tASSOC arg
+                    {
+                      $$ = cons($1, $3);
+                    }
+                | tLABEL arg
+                    {
+                      $$ = cons(new_sym($1), $2);
+                    }
+                | tLABEL_END arg
+                    {
+                      $$ = cons(new_sym(new_strsym($1)), $2);
+                    }
+                | tSTRING_BEG tLABEL_END arg
+                    {
+                      $$ = cons(new_sym(new_strsym($2)), $3);
+                    }
+                | tSTRING_BEG string_rep tLABEL_END arg
+                    {
+                      $$ = cons(new_dsym(push($2, $3)), $4);
+                    }
+                ;
+
+operation       : tIDENTIFIER
+                | tCONSTANT
+                | tFID
+                ;
+
+operation2      : tIDENTIFIER
+                | tCONSTANT
+                | tFID
+                | op
+                ;
+
+operation3      : tIDENTIFIER
+                | tFID
+                | op
+                ;
+
+dot_or_colon    : '.'
+                | tCOLON2
+                ;
+
+call_op         : '.'
+                    {
+                      $$ = (MrbTokens)'.';
+                    }
+                | tANDDOT
+                    {
+                      $$ = (MrbTokens)0;
+                    }
+                ;
+
+call_op2        : call_op
+                | tCOLON2
+                    {
+                      $$ = MrbTokens.tCOLON2;
+                    }
+                ;
+
+opt_terms       : /* none */
+                | terms
+                ;
+
+opt_nl          : /* none */
+                | nl
+                ;
+
+rparen          : opt_nl ')'
+                ;
+
+rbracket        : opt_nl ']'
+                ;
+
+trailer         : /* none */
+                | nl
+                | comma
+                ;
+
+term            : ';' {yyErrorFlag = 0;}
+                | nl
+                | heredoc_body
+                ;
+
+nl              : '\n'
+                    {
+                      this.lineno++;
+                      this.column = 0;
+                    }
+                ;
+
+terms           : term
+                | terms term
+                ;
+
+none            : /* none */
+                    {
+                      $$ = null;
+                    }
+                ;
+%%
+
+	} // must specify trailing } for parser class
+} // must specify trailing } for namespace, if any
Index: EcnlProtoTool/trunk/webapp/webmrbc/mrbc.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/mrbc.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/mrbc.js	(revision 270)
@@ -0,0 +1,111370 @@
+var mrbc = function(Module) {
+  Module['preRun'].push(function () {
+    Module['FS'] = FS;
+  });
+
+// The Module object: Our interface to the outside world. We import
+// and export values on it, and do the work to get that through
+// closure compiler if necessary. There are various ways Module can be used:
+// 1. Not defined. We create it here
+// 2. A function parameter, function(Module) { ..generated code.. }
+// 3. pre-run appended it, var Module = {}; ..generated code..
+// 4. External script tag defines var Module.
+// We need to do an eval in order to handle the closure compiler
+// case, where this code here is minified but Module was defined
+// elsewhere (e.g. case 4 above). We also need to check if Module
+// already exists (e.g. case 3 above).
+// Note that if you want to run closure, and also to use Module
+// after the generated code, you will need to define   var Module = {};
+// before the code. Then that object will be used in the code, and you
+// can continue to use Module afterwards as well.
+var Module;
+if (!Module) Module = (typeof Module !== 'undefined' ? Module : null) || {};
+
+// Sometimes an existing Module object exists with properties
+// meant to overwrite the default module functionality. Here
+// we collect those properties and reapply _after_ we configure
+// the current environment's defaults to avoid having to be so
+// defensive during initialization.
+var moduleOverrides = {};
+for (var key in Module) {
+  if (Module.hasOwnProperty(key)) {
+    moduleOverrides[key] = Module[key];
+  }
+}
+
+// The environment setup code below is customized to use Module.
+// *** Environment setup code ***
+var ENVIRONMENT_IS_WEB = false;
+var ENVIRONMENT_IS_WORKER = false;
+var ENVIRONMENT_IS_NODE = false;
+var ENVIRONMENT_IS_SHELL = false;
+
+// Three configurations we can be running in:
+// 1) We could be the application main() thread running in the main JS UI thread. (ENVIRONMENT_IS_WORKER == false and ENVIRONMENT_IS_PTHREAD == false)
+// 2) We could be the application main() thread proxied to worker. (with Emscripten -s PROXY_TO_WORKER=1) (ENVIRONMENT_IS_WORKER == true, ENVIRONMENT_IS_PTHREAD == false)
+// 3) We could be an application pthread running in a worker. (ENVIRONMENT_IS_WORKER == true and ENVIRONMENT_IS_PTHREAD == true)
+
+if (Module['ENVIRONMENT']) {
+  if (Module['ENVIRONMENT'] === 'WEB') {
+    ENVIRONMENT_IS_WEB = true;
+  } else if (Module['ENVIRONMENT'] === 'WORKER') {
+    ENVIRONMENT_IS_WORKER = true;
+  } else if (Module['ENVIRONMENT'] === 'NODE') {
+    ENVIRONMENT_IS_NODE = true;
+  } else if (Module['ENVIRONMENT'] === 'SHELL') {
+    ENVIRONMENT_IS_SHELL = true;
+  } else {
+    throw new Error('The provided Module[\'ENVIRONMENT\'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.');
+  }
+} else {
+  ENVIRONMENT_IS_WEB = typeof window === 'object';
+  ENVIRONMENT_IS_WORKER = typeof importScripts === 'function';
+  ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function' && !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_WORKER;
+  ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;
+}
+
+
+if (ENVIRONMENT_IS_NODE) {
+  // Expose functionality in the same simple way that the shells work
+  // Note that we pollute the global namespace here, otherwise we break in node
+  if (!Module['print']) Module['print'] = console.log;
+  if (!Module['printErr']) Module['printErr'] = console.warn;
+
+  var nodeFS;
+  var nodePath;
+
+  Module['read'] = function read(filename, binary) {
+    if (!nodeFS) nodeFS = require('fs');
+    if (!nodePath) nodePath = require('path');
+    filename = nodePath['normalize'](filename);
+    var ret = nodeFS['readFileSync'](filename);
+    return binary ? ret : ret.toString();
+  };
+
+  Module['readBinary'] = function readBinary(filename) {
+    var ret = Module['read'](filename, true);
+    if (!ret.buffer) {
+      ret = new Uint8Array(ret);
+    }
+    assert(ret.buffer);
+    return ret;
+  };
+
+  Module['load'] = function load(f) {
+    globalEval(read(f));
+  };
+
+  if (!Module['thisProgram']) {
+    if (process['argv'].length > 1) {
+      Module['thisProgram'] = process['argv'][1].replace(/\\/g, '/');
+    } else {
+      Module['thisProgram'] = 'unknown-program';
+    }
+  }
+
+  Module['arguments'] = process['argv'].slice(2);
+
+  if (typeof module !== 'undefined') {
+    module['exports'] = Module;
+  }
+
+  process['on']('uncaughtException', function(ex) {
+    // suppress ExitStatus exceptions from showing an error
+    if (!(ex instanceof ExitStatus)) {
+      throw ex;
+    }
+  });
+
+  Module['inspect'] = function () { return '[Emscripten Module object]'; };
+}
+else if (ENVIRONMENT_IS_SHELL) {
+  if (!Module['print']) Module['print'] = print;
+  if (typeof printErr != 'undefined') Module['printErr'] = printErr; // not present in v8 or older sm
+
+  if (typeof read != 'undefined') {
+    Module['read'] = read;
+  } else {
+    Module['read'] = function read() { throw 'no read() available (jsc?)' };
+  }
+
+  Module['readBinary'] = function readBinary(f) {
+    if (typeof readbuffer === 'function') {
+      return new Uint8Array(readbuffer(f));
+    }
+    var data = read(f, 'binary');
+    assert(typeof data === 'object');
+    return data;
+  };
+
+  if (typeof scriptArgs != 'undefined') {
+    Module['arguments'] = scriptArgs;
+  } else if (typeof arguments != 'undefined') {
+    Module['arguments'] = arguments;
+  }
+
+}
+else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
+  Module['read'] = function read(url) {
+    var xhr = new XMLHttpRequest();
+    xhr.open('GET', url, false);
+    xhr.send(null);
+    return xhr.responseText;
+  };
+
+  Module['readAsync'] = function readAsync(url, onload, onerror) {
+    var xhr = new XMLHttpRequest();
+    xhr.open('GET', url, true);
+    xhr.responseType = 'arraybuffer';
+    xhr.onload = function xhr_onload() {
+      if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0
+        onload(xhr.response);
+      } else {
+        onerror();
+      }
+    };
+    xhr.onerror = onerror;
+    xhr.send(null);
+  };
+
+  if (typeof arguments != 'undefined') {
+    Module['arguments'] = arguments;
+  }
+
+  if (typeof console !== 'undefined') {
+    if (!Module['print']) Module['print'] = function print(x) {
+      console.log(x);
+    };
+    if (!Module['printErr']) Module['printErr'] = function printErr(x) {
+      console.warn(x);
+    };
+  } else {
+    // Probably a worker, and without console.log. We can do very little here...
+    var TRY_USE_DUMP = false;
+    if (!Module['print']) Module['print'] = (TRY_USE_DUMP && (typeof(dump) !== "undefined") ? (function(x) {
+      dump(x);
+    }) : (function(x) {
+      // self.postMessage(x); // enable this if you want stdout to be sent as messages
+    }));
+  }
+
+  if (ENVIRONMENT_IS_WORKER) {
+    Module['load'] = importScripts;
+  }
+
+  if (typeof Module['setWindowTitle'] === 'undefined') {
+    Module['setWindowTitle'] = function(title) { document.title = title };
+  }
+}
+else {
+  // Unreachable because SHELL is dependant on the others
+  throw 'Unknown runtime environment. Where are we?';
+}
+
+function globalEval(x) {
+  eval.call(null, x);
+}
+if (!Module['load'] && Module['read']) {
+  Module['load'] = function load(f) {
+    globalEval(Module['read'](f));
+  };
+}
+if (!Module['print']) {
+  Module['print'] = function(){};
+}
+if (!Module['printErr']) {
+  Module['printErr'] = Module['print'];
+}
+if (!Module['arguments']) {
+  Module['arguments'] = [];
+}
+if (!Module['thisProgram']) {
+  Module['thisProgram'] = './this.program';
+}
+
+// *** Environment setup code ***
+
+// Closure helpers
+Module.print = Module['print'];
+Module.printErr = Module['printErr'];
+
+// Callbacks
+Module['preRun'] = [];
+Module['postRun'] = [];
+
+// Merge back in the overrides
+for (var key in moduleOverrides) {
+  if (moduleOverrides.hasOwnProperty(key)) {
+    Module[key] = moduleOverrides[key];
+  }
+}
+// Free the object hierarchy contained in the overrides, this lets the GC
+// reclaim data used e.g. in memoryInitializerRequest, which is a large typed array.
+moduleOverrides = undefined;
+
+
+
+// {{PREAMBLE_ADDITIONS}}
+
+// === Preamble library stuff ===
+
+// Documentation for the public APIs defined in this file must be updated in:
+//    site/source/docs/api_reference/preamble.js.rst
+// A prebuilt local version of the documentation is available at:
+//    site/build/text/docs/api_reference/preamble.js.txt
+// You can also build docs locally as HTML or other formats in site/
+// An online HTML version (which may be of a different version of Emscripten)
+//    is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html
+
+//========================================
+// Runtime code shared with compiler
+//========================================
+
+var Runtime = {
+  setTempRet0: function (value) {
+    tempRet0 = value;
+  },
+  getTempRet0: function () {
+    return tempRet0;
+  },
+  stackSave: function () {
+    return STACKTOP;
+  },
+  stackRestore: function (stackTop) {
+    STACKTOP = stackTop;
+  },
+  getNativeTypeSize: function (type) {
+    switch (type) {
+      case 'i1': case 'i8': return 1;
+      case 'i16': return 2;
+      case 'i32': return 4;
+      case 'i64': return 8;
+      case 'float': return 4;
+      case 'double': return 8;
+      default: {
+        if (type[type.length-1] === '*') {
+          return Runtime.QUANTUM_SIZE; // A pointer
+        } else if (type[0] === 'i') {
+          var bits = parseInt(type.substr(1));
+          assert(bits % 8 === 0);
+          return bits/8;
+        } else {
+          return 0;
+        }
+      }
+    }
+  },
+  getNativeFieldSize: function (type) {
+    return Math.max(Runtime.getNativeTypeSize(type), Runtime.QUANTUM_SIZE);
+  },
+  STACK_ALIGN: 16,
+  prepVararg: function (ptr, type) {
+    if (type === 'double' || type === 'i64') {
+      // move so the load is aligned
+      if (ptr & 7) {
+        assert((ptr & 7) === 4);
+        ptr += 4;
+      }
+    } else {
+      assert((ptr & 3) === 0);
+    }
+    return ptr;
+  },
+  getAlignSize: function (type, size, vararg) {
+    // we align i64s and doubles on 64-bit boundaries, unlike x86
+    if (!vararg && (type == 'i64' || type == 'double')) return 8;
+    if (!type) return Math.min(size, 8); // align structures internally to 64 bits
+    return Math.min(size || (type ? Runtime.getNativeFieldSize(type) : 0), Runtime.QUANTUM_SIZE);
+  },
+  dynCall: function (sig, ptr, args) {
+    if (args && args.length) {
+      assert(args.length == sig.length-1);
+      assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\'');
+      return Module['dynCall_' + sig].apply(null, [ptr].concat(args));
+    } else {
+      assert(sig.length == 1);
+      assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\'');
+      return Module['dynCall_' + sig].call(null, ptr);
+    }
+  },
+  functionPointers: [],
+  addFunction: function (func) {
+    for (var i = 0; i < Runtime.functionPointers.length; i++) {
+      if (!Runtime.functionPointers[i]) {
+        Runtime.functionPointers[i] = func;
+        return 2*(1 + i);
+      }
+    }
+    throw 'Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.';
+  },
+  removeFunction: function (index) {
+    Runtime.functionPointers[(index-2)/2] = null;
+  },
+  warnOnce: function (text) {
+    if (!Runtime.warnOnce.shown) Runtime.warnOnce.shown = {};
+    if (!Runtime.warnOnce.shown[text]) {
+      Runtime.warnOnce.shown[text] = 1;
+      Module.printErr(text);
+    }
+  },
+  funcWrappers: {},
+  getFuncWrapper: function (func, sig) {
+    assert(sig);
+    if (!Runtime.funcWrappers[sig]) {
+      Runtime.funcWrappers[sig] = {};
+    }
+    var sigCache = Runtime.funcWrappers[sig];
+    if (!sigCache[func]) {
+      // optimize away arguments usage in common cases
+      if (sig.length === 1) {
+        sigCache[func] = function dynCall_wrapper() {
+          return Runtime.dynCall(sig, func);
+        };
+      } else if (sig.length === 2) {
+        sigCache[func] = function dynCall_wrapper(arg) {
+          return Runtime.dynCall(sig, func, [arg]);
+        };
+      } else {
+        // general case
+        sigCache[func] = function dynCall_wrapper() {
+          return Runtime.dynCall(sig, func, Array.prototype.slice.call(arguments));
+        };
+      }
+    }
+    return sigCache[func];
+  },
+  getCompilerSetting: function (name) {
+    throw 'You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work';
+  },
+  stackAlloc: function (size) { var ret = STACKTOP;STACKTOP = (STACKTOP + size)|0;STACKTOP = (((STACKTOP)+15)&-16);(assert((((STACKTOP|0) < (STACK_MAX|0))|0))|0); return ret; },
+  staticAlloc: function (size) { var ret = STATICTOP;STATICTOP = (STATICTOP + (assert(!staticSealed),size))|0;STATICTOP = (((STATICTOP)+15)&-16); return ret; },
+  dynamicAlloc: function (size) { var ret = DYNAMICTOP;DYNAMICTOP = (DYNAMICTOP + (assert(DYNAMICTOP > 0),size))|0;DYNAMICTOP = (((DYNAMICTOP)+15)&-16); if (DYNAMICTOP >= TOTAL_MEMORY) { var success = enlargeMemory(); if (!success) { DYNAMICTOP = ret;  return 0; } }; return ret; },
+  alignMemory: function (size,quantum) { var ret = size = Math.ceil((size)/(quantum ? quantum : 16))*(quantum ? quantum : 16); return ret; },
+  makeBigInt: function (low,high,unsigned) { var ret = (unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0))); return ret; },
+  GLOBAL_BASE: 8,
+  QUANTUM_SIZE: 4,
+  __dummy__: 0
+}
+
+
+
+Module["Runtime"] = Runtime;
+
+
+
+//========================================
+// Runtime essentials
+//========================================
+
+var ABORT = false; // whether we are quitting the application. no code should run after this. set in exit() and abort()
+var EXITSTATUS = 0;
+
+function assert(condition, text) {
+  if (!condition) {
+    abort('Assertion failed: ' + text);
+  }
+}
+
+var globalScope = this;
+
+// Returns the C function with a specified identifier (for C++, you need to do manual name mangling)
+function getCFunc(ident) {
+  var func = Module['_' + ident]; // closure exported function
+  if (!func) {
+    try { func = eval('_' + ident); } catch(e) {}
+  }
+  assert(func, 'Cannot call unknown function ' + ident + ' (perhaps LLVM optimizations or closure removed it?)');
+  return func;
+}
+
+var cwrap, ccall;
+(function(){
+  var JSfuncs = {
+    // Helpers for cwrap -- it can't refer to Runtime directly because it might
+    // be renamed by closure, instead it calls JSfuncs['stackSave'].body to find
+    // out what the minified function name is.
+    'stackSave': function() {
+      Runtime.stackSave()
+    },
+    'stackRestore': function() {
+      Runtime.stackRestore()
+    },
+    // type conversion from js to c
+    'arrayToC' : function(arr) {
+      var ret = Runtime.stackAlloc(arr.length);
+      writeArrayToMemory(arr, ret);
+      return ret;
+    },
+    'stringToC' : function(str) {
+      var ret = 0;
+      if (str !== null && str !== undefined && str !== 0) { // null string
+        // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0'
+        ret = Runtime.stackAlloc((str.length << 2) + 1);
+        writeStringToMemory(str, ret);
+      }
+      return ret;
+    }
+  };
+  // For fast lookup of conversion functions
+  var toC = {'string' : JSfuncs['stringToC'], 'array' : JSfuncs['arrayToC']};
+
+  // C calling interface.
+  ccall = function ccallFunc(ident, returnType, argTypes, args, opts) {
+    var func = getCFunc(ident);
+    var cArgs = [];
+    var stack = 0;
+    assert(returnType !== 'array', 'Return type should not be "array".');
+    if (args) {
+      for (var i = 0; i < args.length; i++) {
+        var converter = toC[argTypes[i]];
+        if (converter) {
+          if (stack === 0) stack = Runtime.stackSave();
+          cArgs[i] = converter(args[i]);
+        } else {
+          cArgs[i] = args[i];
+        }
+      }
+    }
+    var ret = func.apply(null, cArgs);
+    if ((!opts || !opts.async) && typeof EmterpreterAsync === 'object') {
+      assert(!EmterpreterAsync.state, 'cannot start async op with normal JS calling ccall');
+    }
+    if (opts && opts.async) assert(!returnType, 'async ccalls cannot return values');
+    if (returnType === 'string') ret = Pointer_stringify(ret);
+    if (stack !== 0) {
+      if (opts && opts.async) {
+        EmterpreterAsync.asyncFinalizers.push(function() {
+          Runtime.stackRestore(stack);
+        });
+        return;
+      }
+      Runtime.stackRestore(stack);
+    }
+    return ret;
+  }
+
+  var sourceRegex = /^function\s*[a-zA-Z$_0-9]*\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;
+  function parseJSFunc(jsfunc) {
+    // Match the body and the return value of a javascript function source
+    var parsed = jsfunc.toString().match(sourceRegex).slice(1);
+    return {arguments : parsed[0], body : parsed[1], returnValue: parsed[2]}
+  }
+
+  // sources of useful functions. we create this lazily as it can trigger a source decompression on this entire file
+  var JSsource = null;
+  function ensureJSsource() {
+    if (!JSsource) {
+      JSsource = {};
+      for (var fun in JSfuncs) {
+        if (JSfuncs.hasOwnProperty(fun)) {
+          // Elements of toCsource are arrays of three items:
+          // the code, and the return value
+          JSsource[fun] = parseJSFunc(JSfuncs[fun]);
+        }
+      }
+    }
+  }
+
+  cwrap = function cwrap(ident, returnType, argTypes) {
+    argTypes = argTypes || [];
+    var cfunc = getCFunc(ident);
+    // When the function takes numbers and returns a number, we can just return
+    // the original function
+    var numericArgs = argTypes.every(function(type){ return type === 'number'});
+    var numericRet = (returnType !== 'string');
+    if ( numericRet && numericArgs) {
+      return cfunc;
+    }
+    // Creation of the arguments list (["$1","$2",...,"$nargs"])
+    var argNames = argTypes.map(function(x,i){return '$'+i});
+    var funcstr = "(function(" + argNames.join(',') + ") {";
+    var nargs = argTypes.length;
+    if (!numericArgs) {
+      // Generate the code needed to convert the arguments from javascript
+      // values to pointers
+      ensureJSsource();
+      funcstr += 'var stack = ' + JSsource['stackSave'].body + ';';
+      for (var i = 0; i < nargs; i++) {
+        var arg = argNames[i], type = argTypes[i];
+        if (type === 'number') continue;
+        var convertCode = JSsource[type + 'ToC']; // [code, return]
+        funcstr += 'var ' + convertCode.arguments + ' = ' + arg + ';';
+        funcstr += convertCode.body + ';';
+        funcstr += arg + '=(' + convertCode.returnValue + ');';
+      }
+    }
+
+    // When the code is compressed, the name of cfunc is not literally 'cfunc' anymore
+    var cfuncname = parseJSFunc(function(){return cfunc}).returnValue;
+    // Call the function
+    funcstr += 'var ret = ' + cfuncname + '(' + argNames.join(',') + ');';
+    if (!numericRet) { // Return type can only by 'string' or 'number'
+      // Convert the result to a string
+      var strgfy = parseJSFunc(function(){return Pointer_stringify}).returnValue;
+      funcstr += 'ret = ' + strgfy + '(ret);';
+    }
+    funcstr += "if (typeof EmterpreterAsync === 'object') { assert(!EmterpreterAsync.state, 'cannot start async op with normal JS calling cwrap') }";
+    if (!numericArgs) {
+      // If we had a stack, restore it
+      ensureJSsource();
+      funcstr += JSsource['stackRestore'].body.replace('()', '(stack)') + ';';
+    }
+    funcstr += 'return ret})';
+    return eval(funcstr);
+  };
+})();
+Module["ccall"] = ccall;
+Module["cwrap"] = cwrap;
+
+function setValue(ptr, value, type, noSafe) {
+  type = type || 'i8';
+  if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit
+    switch(type) {
+      case 'i1': HEAP8[((ptr)>>0)]=value; break;
+      case 'i8': HEAP8[((ptr)>>0)]=value; break;
+      case 'i16': HEAP16[((ptr)>>1)]=value; break;
+      case 'i32': HEAP32[((ptr)>>2)]=value; break;
+      case 'i64': (tempI64 = [value>>>0,(tempDouble=value,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((ptr)>>2)]=tempI64[0],HEAP32[(((ptr)+(4))>>2)]=tempI64[1]); break;
+      case 'float': HEAPF32[((ptr)>>2)]=value; break;
+      case 'double': HEAPF64[((ptr)>>3)]=value; break;
+      default: abort('invalid type for setValue: ' + type);
+    }
+}
+Module["setValue"] = setValue;
+
+
+function getValue(ptr, type, noSafe) {
+  type = type || 'i8';
+  if (type.charAt(type.length-1) === '*') type = 'i32'; // pointers are 32-bit
+    switch(type) {
+      case 'i1': return HEAP8[((ptr)>>0)];
+      case 'i8': return HEAP8[((ptr)>>0)];
+      case 'i16': return HEAP16[((ptr)>>1)];
+      case 'i32': return HEAP32[((ptr)>>2)];
+      case 'i64': return HEAP32[((ptr)>>2)];
+      case 'float': return HEAPF32[((ptr)>>2)];
+      case 'double': return HEAPF64[((ptr)>>3)];
+      default: abort('invalid type for setValue: ' + type);
+    }
+  return null;
+}
+Module["getValue"] = getValue;
+
+var ALLOC_NORMAL = 0; // Tries to use _malloc()
+var ALLOC_STACK = 1; // Lives for the duration of the current function call
+var ALLOC_STATIC = 2; // Cannot be freed
+var ALLOC_DYNAMIC = 3; // Cannot be freed except through sbrk
+var ALLOC_NONE = 4; // Do not allocate
+Module["ALLOC_NORMAL"] = ALLOC_NORMAL;
+Module["ALLOC_STACK"] = ALLOC_STACK;
+Module["ALLOC_STATIC"] = ALLOC_STATIC;
+Module["ALLOC_DYNAMIC"] = ALLOC_DYNAMIC;
+Module["ALLOC_NONE"] = ALLOC_NONE;
+
+// allocate(): This is for internal use. You can use it yourself as well, but the interface
+//             is a little tricky (see docs right below). The reason is that it is optimized
+//             for multiple syntaxes to save space in generated code. So you should
+//             normally not use allocate(), and instead allocate memory using _malloc(),
+//             initialize it with setValue(), and so forth.
+// @slab: An array of data, or a number. If a number, then the size of the block to allocate,
+//        in *bytes* (note that this is sometimes confusing: the next parameter does not
+//        affect this!)
+// @types: Either an array of types, one for each byte (or 0 if no type at that position),
+//         or a single type which is used for the entire block. This only matters if there
+//         is initial data - if @slab is a number, then this does not matter at all and is
+//         ignored.
+// @allocator: How to allocate memory, see ALLOC_*
+function allocate(slab, types, allocator, ptr) {
+  var zeroinit, size;
+  if (typeof slab === 'number') {
+    zeroinit = true;
+    size = slab;
+  } else {
+    zeroinit = false;
+    size = slab.length;
+  }
+
+  var singleType = typeof types === 'string' ? types : null;
+
+  var ret;
+  if (allocator == ALLOC_NONE) {
+    ret = ptr;
+  } else {
+    ret = [typeof _malloc === 'function' ? _malloc : Runtime.staticAlloc, Runtime.stackAlloc, Runtime.staticAlloc, Runtime.dynamicAlloc][allocator === undefined ? ALLOC_STATIC : allocator](Math.max(size, singleType ? 1 : types.length));
+  }
+
+  if (zeroinit) {
+    var ptr = ret, stop;
+    assert((ret & 3) == 0);
+    stop = ret + (size & ~3);
+    for (; ptr < stop; ptr += 4) {
+      HEAP32[((ptr)>>2)]=0;
+    }
+    stop = ret + size;
+    while (ptr < stop) {
+      HEAP8[((ptr++)>>0)]=0;
+    }
+    return ret;
+  }
+
+  if (singleType === 'i8') {
+    if (slab.subarray || slab.slice) {
+      HEAPU8.set(slab, ret);
+    } else {
+      HEAPU8.set(new Uint8Array(slab), ret);
+    }
+    return ret;
+  }
+
+  var i = 0, type, typeSize, previousType;
+  while (i < size) {
+    var curr = slab[i];
+
+    if (typeof curr === 'function') {
+      curr = Runtime.getFunctionIndex(curr);
+    }
+
+    type = singleType || types[i];
+    if (type === 0) {
+      i++;
+      continue;
+    }
+    assert(type, 'Must know what type to store in allocate!');
+
+    if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later
+
+    setValue(ret+i, curr, type);
+
+    // no need to look up size unless type changes, so cache it
+    if (previousType !== type) {
+      typeSize = Runtime.getNativeTypeSize(type);
+      previousType = type;
+    }
+    i += typeSize;
+  }
+
+  return ret;
+}
+Module["allocate"] = allocate;
+
+// Allocate memory during any stage of startup - static memory early on, dynamic memory later, malloc when ready
+function getMemory(size) {
+  if (!staticSealed) return Runtime.staticAlloc(size);
+  if ((typeof _sbrk !== 'undefined' && !_sbrk.called) || !runtimeInitialized) return Runtime.dynamicAlloc(size);
+  return _malloc(size);
+}
+Module["getMemory"] = getMemory;
+
+function Pointer_stringify(ptr, /* optional */ length) {
+  if (length === 0 || !ptr) return '';
+  // TODO: use TextDecoder
+  // Find the length, and check for UTF while doing so
+  var hasUtf = 0;
+  var t;
+  var i = 0;
+  while (1) {
+    assert(ptr + i < TOTAL_MEMORY);
+    t = HEAPU8[(((ptr)+(i))>>0)];
+    hasUtf |= t;
+    if (t == 0 && !length) break;
+    i++;
+    if (length && i == length) break;
+  }
+  if (!length) length = i;
+
+  var ret = '';
+
+  if (hasUtf < 128) {
+    var MAX_CHUNK = 1024; // split up into chunks, because .apply on a huge string can overflow the stack
+    var curr;
+    while (length > 0) {
+      curr = String.fromCharCode.apply(String, HEAPU8.subarray(ptr, ptr + Math.min(length, MAX_CHUNK)));
+      ret = ret ? ret + curr : curr;
+      ptr += MAX_CHUNK;
+      length -= MAX_CHUNK;
+    }
+    return ret;
+  }
+  return Module['UTF8ToString'](ptr);
+}
+Module["Pointer_stringify"] = Pointer_stringify;
+
+// Given a pointer 'ptr' to a null-terminated ASCII-encoded string in the emscripten HEAP, returns
+// a copy of that string as a Javascript String object.
+
+function AsciiToString(ptr) {
+  var str = '';
+  while (1) {
+    var ch = HEAP8[((ptr++)>>0)];
+    if (!ch) return str;
+    str += String.fromCharCode(ch);
+  }
+}
+Module["AsciiToString"] = AsciiToString;
+
+// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr',
+// null-terminated and encoded in ASCII form. The copy will require at most str.length+1 bytes of space in the HEAP.
+
+function stringToAscii(str, outPtr) {
+  return writeAsciiToMemory(str, outPtr, false);
+}
+Module["stringToAscii"] = stringToAscii;
+
+// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the given array that contains uint8 values, returns
+// a copy of that string as a Javascript String object.
+
+function UTF8ArrayToString(u8Array, idx) {
+  var u0, u1, u2, u3, u4, u5;
+
+  var str = '';
+  while (1) {
+    // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629
+    u0 = u8Array[idx++];
+    if (!u0) return str;
+    if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; }
+    u1 = u8Array[idx++] & 63;
+    if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; }
+    u2 = u8Array[idx++] & 63;
+    if ((u0 & 0xF0) == 0xE0) {
+      u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;
+    } else {
+      u3 = u8Array[idx++] & 63;
+      if ((u0 & 0xF8) == 0xF0) {
+        u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | u3;
+      } else {
+        u4 = u8Array[idx++] & 63;
+        if ((u0 & 0xFC) == 0xF8) {
+          u0 = ((u0 & 3) << 24) | (u1 << 18) | (u2 << 12) | (u3 << 6) | u4;
+        } else {
+          u5 = u8Array[idx++] & 63;
+          u0 = ((u0 & 1) << 30) | (u1 << 24) | (u2 << 18) | (u3 << 12) | (u4 << 6) | u5;
+        }
+      }
+    }
+    if (u0 < 0x10000) {
+      str += String.fromCharCode(u0);
+    } else {
+      var ch = u0 - 0x10000;
+      str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));
+    }
+  }
+}
+Module["UTF8ArrayToString"] = UTF8ArrayToString;
+
+// Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the emscripten HEAP, returns
+// a copy of that string as a Javascript String object.
+
+function UTF8ToString(ptr) {
+  return UTF8ArrayToString(HEAPU8,ptr);
+}
+Module["UTF8ToString"] = UTF8ToString;
+
+// Copies the given Javascript String object 'str' to the given byte array at address 'outIdx',
+// encoded in UTF8 form and null-terminated. The copy will require at most str.length*4+1 bytes of space in the HEAP.
+// Use the function lengthBytesUTF8() to compute the exact number of bytes (excluding null terminator) that this function will write.
+// Parameters:
+//   str: the Javascript string to copy.
+//   outU8Array: the array to copy to. Each index in this array is assumed to be one 8-byte element.
+//   outIdx: The starting offset in the array to begin the copying.
+//   maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null
+//                    terminator, i.e. if maxBytesToWrite=1, only the null terminator will be written and nothing else.
+//                    maxBytesToWrite=0 does not write any bytes to the output, not even the null terminator.
+// Returns the number of bytes written, EXCLUDING the null terminator.
+
+function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) {
+  if (!(maxBytesToWrite > 0)) // Parameter maxBytesToWrite is not optional. Negative values, 0, null, undefined and false each don't write out any bytes.
+    return 0;
+
+  var startIdx = outIdx;
+  var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator.
+  for (var i = 0; i < str.length; ++i) {
+    // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8.
+    // See http://unicode.org/faq/utf_bom.html#utf16-3
+    // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description and https://www.ietf.org/rfc/rfc2279.txt and https://tools.ietf.org/html/rfc3629
+    var u = str.charCodeAt(i); // possibly a lead surrogate
+    if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF);
+    if (u <= 0x7F) {
+      if (outIdx >= endIdx) break;
+      outU8Array[outIdx++] = u;
+    } else if (u <= 0x7FF) {
+      if (outIdx + 1 >= endIdx) break;
+      outU8Array[outIdx++] = 0xC0 | (u >> 6);
+      outU8Array[outIdx++] = 0x80 | (u & 63);
+    } else if (u <= 0xFFFF) {
+      if (outIdx + 2 >= endIdx) break;
+      outU8Array[outIdx++] = 0xE0 | (u >> 12);
+      outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63);
+      outU8Array[outIdx++] = 0x80 | (u & 63);
+    } else if (u <= 0x1FFFFF) {
+      if (outIdx + 3 >= endIdx) break;
+      outU8Array[outIdx++] = 0xF0 | (u >> 18);
+      outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63);
+      outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63);
+      outU8Array[outIdx++] = 0x80 | (u & 63);
+    } else if (u <= 0x3FFFFFF) {
+      if (outIdx + 4 >= endIdx) break;
+      outU8Array[outIdx++] = 0xF8 | (u >> 24);
+      outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63);
+      outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63);
+      outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63);
+      outU8Array[outIdx++] = 0x80 | (u & 63);
+    } else {
+      if (outIdx + 5 >= endIdx) break;
+      outU8Array[outIdx++] = 0xFC | (u >> 30);
+      outU8Array[outIdx++] = 0x80 | ((u >> 24) & 63);
+      outU8Array[outIdx++] = 0x80 | ((u >> 18) & 63);
+      outU8Array[outIdx++] = 0x80 | ((u >> 12) & 63);
+      outU8Array[outIdx++] = 0x80 | ((u >> 6) & 63);
+      outU8Array[outIdx++] = 0x80 | (u & 63);
+    }
+  }
+  // Null-terminate the pointer to the buffer.
+  outU8Array[outIdx] = 0;
+  return outIdx - startIdx;
+}
+Module["stringToUTF8Array"] = stringToUTF8Array;
+
+// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr',
+// null-terminated and encoded in UTF8 form. The copy will require at most str.length*4+1 bytes of space in the HEAP.
+// Use the function lengthBytesUTF8() to compute the exact number of bytes (excluding null terminator) that this function will write.
+// Returns the number of bytes written, EXCLUDING the null terminator.
+
+function stringToUTF8(str, outPtr, maxBytesToWrite) {
+  assert(typeof maxBytesToWrite == 'number', 'stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!');
+  return stringToUTF8Array(str, HEAPU8,outPtr, maxBytesToWrite);
+}
+Module["stringToUTF8"] = stringToUTF8;
+
+// Returns the number of bytes the given Javascript string takes if encoded as a UTF8 byte array, EXCLUDING the null terminator byte.
+
+function lengthBytesUTF8(str) {
+  var len = 0;
+  for (var i = 0; i < str.length; ++i) {
+    // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! So decode UTF16->UTF32->UTF8.
+    // See http://unicode.org/faq/utf_bom.html#utf16-3
+    var u = str.charCodeAt(i); // possibly a lead surrogate
+    if (u >= 0xD800 && u <= 0xDFFF) u = 0x10000 + ((u & 0x3FF) << 10) | (str.charCodeAt(++i) & 0x3FF);
+    if (u <= 0x7F) {
+      ++len;
+    } else if (u <= 0x7FF) {
+      len += 2;
+    } else if (u <= 0xFFFF) {
+      len += 3;
+    } else if (u <= 0x1FFFFF) {
+      len += 4;
+    } else if (u <= 0x3FFFFFF) {
+      len += 5;
+    } else {
+      len += 6;
+    }
+  }
+  return len;
+}
+Module["lengthBytesUTF8"] = lengthBytesUTF8;
+
+// Given a pointer 'ptr' to a null-terminated UTF16LE-encoded string in the emscripten HEAP, returns
+// a copy of that string as a Javascript String object.
+
+function UTF16ToString(ptr) {
+  var i = 0;
+
+  var str = '';
+  while (1) {
+    var codeUnit = HEAP16[(((ptr)+(i*2))>>1)];
+    if (codeUnit == 0)
+      return str;
+    ++i;
+    // fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through.
+    str += String.fromCharCode(codeUnit);
+  }
+}
+
+
+// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr',
+// null-terminated and encoded in UTF16 form. The copy will require at most str.length*4+2 bytes of space in the HEAP.
+// Use the function lengthBytesUTF16() to compute the exact number of bytes (excluding null terminator) that this function will write.
+// Parameters:
+//   str: the Javascript string to copy.
+//   outPtr: Byte address in Emscripten HEAP where to write the string to.
+//   maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null
+//                    terminator, i.e. if maxBytesToWrite=2, only the null terminator will be written and nothing else.
+//                    maxBytesToWrite<2 does not write any bytes to the output, not even the null terminator.
+// Returns the number of bytes written, EXCLUDING the null terminator.
+
+function stringToUTF16(str, outPtr, maxBytesToWrite) {
+  assert(typeof maxBytesToWrite == 'number', 'stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!');
+  // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed.
+  if (maxBytesToWrite === undefined) {
+    maxBytesToWrite = 0x7FFFFFFF;
+  }
+  if (maxBytesToWrite < 2) return 0;
+  maxBytesToWrite -= 2; // Null terminator.
+  var startPtr = outPtr;
+  var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length;
+  for (var i = 0; i < numCharsToWrite; ++i) {
+    // charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP.
+    var codeUnit = str.charCodeAt(i); // possibly a lead surrogate
+    HEAP16[((outPtr)>>1)]=codeUnit;
+    outPtr += 2;
+  }
+  // Null-terminate the pointer to the HEAP.
+  HEAP16[((outPtr)>>1)]=0;
+  return outPtr - startPtr;
+}
+
+
+// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte.
+
+function lengthBytesUTF16(str) {
+  return str.length*2;
+}
+
+
+function UTF32ToString(ptr) {
+  var i = 0;
+
+  var str = '';
+  while (1) {
+    var utf32 = HEAP32[(((ptr)+(i*4))>>2)];
+    if (utf32 == 0)
+      return str;
+    ++i;
+    // Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing.
+    // See http://unicode.org/faq/utf_bom.html#utf16-3
+    if (utf32 >= 0x10000) {
+      var ch = utf32 - 0x10000;
+      str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));
+    } else {
+      str += String.fromCharCode(utf32);
+    }
+  }
+}
+
+
+// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr',
+// null-terminated and encoded in UTF32 form. The copy will require at most str.length*4+4 bytes of space in the HEAP.
+// Use the function lengthBytesUTF32() to compute the exact number of bytes (excluding null terminator) that this function will write.
+// Parameters:
+//   str: the Javascript string to copy.
+//   outPtr: Byte address in Emscripten HEAP where to write the string to.
+//   maxBytesToWrite: The maximum number of bytes this function can write to the array. This count should include the null
+//                    terminator, i.e. if maxBytesToWrite=4, only the null terminator will be written and nothing else.
+//                    maxBytesToWrite<4 does not write any bytes to the output, not even the null terminator.
+// Returns the number of bytes written, EXCLUDING the null terminator.
+
+function stringToUTF32(str, outPtr, maxBytesToWrite) {
+  assert(typeof maxBytesToWrite == 'number', 'stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!');
+  // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed.
+  if (maxBytesToWrite === undefined) {
+    maxBytesToWrite = 0x7FFFFFFF;
+  }
+  if (maxBytesToWrite < 4) return 0;
+  var startPtr = outPtr;
+  var endPtr = startPtr + maxBytesToWrite - 4;
+  for (var i = 0; i < str.length; ++i) {
+    // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap.
+    // See http://unicode.org/faq/utf_bom.html#utf16-3
+    var codeUnit = str.charCodeAt(i); // possibly a lead surrogate
+    if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) {
+      var trailSurrogate = str.charCodeAt(++i);
+      codeUnit = 0x10000 + ((codeUnit & 0x3FF) << 10) | (trailSurrogate & 0x3FF);
+    }
+    HEAP32[((outPtr)>>2)]=codeUnit;
+    outPtr += 4;
+    if (outPtr + 4 > endPtr) break;
+  }
+  // Null-terminate the pointer to the HEAP.
+  HEAP32[((outPtr)>>2)]=0;
+  return outPtr - startPtr;
+}
+
+
+// Returns the number of bytes the given Javascript string takes if encoded as a UTF16 byte array, EXCLUDING the null terminator byte.
+
+function lengthBytesUTF32(str) {
+  var len = 0;
+  for (var i = 0; i < str.length; ++i) {
+    // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap.
+    // See http://unicode.org/faq/utf_bom.html#utf16-3
+    var codeUnit = str.charCodeAt(i);
+    if (codeUnit >= 0xD800 && codeUnit <= 0xDFFF) ++i; // possibly a lead surrogate, so skip over the tail surrogate.
+    len += 4;
+  }
+
+  return len;
+}
+
+
+function demangle(func) {
+  var hasLibcxxabi = !!Module['___cxa_demangle'];
+  if (hasLibcxxabi) {
+    try {
+      var buf = _malloc(func.length);
+      writeStringToMemory(func.substr(1), buf);
+      var status = _malloc(4);
+      var ret = Module['___cxa_demangle'](buf, 0, 0, status);
+      if (getValue(status, 'i32') === 0 && ret) {
+        return Pointer_stringify(ret);
+      }
+      // otherwise, libcxxabi failed
+    } catch(e) {
+      // ignore problems here
+    } finally {
+      if (buf) _free(buf);
+      if (status) _free(status);
+      if (ret) _free(ret);
+    }
+    // failure when using libcxxabi, don't demangle
+    return func;
+  }
+  Runtime.warnOnce('warning: build with  -s DEMANGLE_SUPPORT=1  to link in libcxxabi demangling');
+  return func;
+}
+
+function demangleAll(text) {
+  return text.replace(/__Z[\w\d_]+/g, function(x) { var y = demangle(x); return x === y ? x : (x + ' [' + y + ']') });
+}
+
+function jsStackTrace() {
+  var err = new Error();
+  if (!err.stack) {
+    // IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown,
+    // so try that as a special-case.
+    try {
+      throw new Error(0);
+    } catch(e) {
+      err = e;
+    }
+    if (!err.stack) {
+      return '(no stack trace available)';
+    }
+  }
+  return err.stack.toString();
+}
+
+function stackTrace() {
+  var js = jsStackTrace();
+  if (Module['extraStackTrace']) js += '\n' + Module['extraStackTrace']();
+  return demangleAll(js);
+}
+Module["stackTrace"] = stackTrace;
+
+// Memory management
+
+var PAGE_SIZE = 4096;
+
+function alignMemoryPage(x) {
+  if (x % 4096 > 0) {
+    x += (4096 - (x % 4096));
+  }
+  return x;
+}
+
+var HEAP;
+var buffer;
+var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;
+
+function updateGlobalBuffer(buf) {
+  Module['buffer'] = buffer = buf;
+}
+
+function updateGlobalBufferViews() {
+  Module['HEAP8'] = HEAP8 = new Int8Array(buffer);
+  Module['HEAP16'] = HEAP16 = new Int16Array(buffer);
+  Module['HEAP32'] = HEAP32 = new Int32Array(buffer);
+  Module['HEAPU8'] = HEAPU8 = new Uint8Array(buffer);
+  Module['HEAPU16'] = HEAPU16 = new Uint16Array(buffer);
+  Module['HEAPU32'] = HEAPU32 = new Uint32Array(buffer);
+  Module['HEAPF32'] = HEAPF32 = new Float32Array(buffer);
+  Module['HEAPF64'] = HEAPF64 = new Float64Array(buffer);
+}
+
+var STATIC_BASE = 0, STATICTOP = 0, staticSealed = false; // static area
+var STACK_BASE = 0, STACKTOP = 0, STACK_MAX = 0; // stack area
+var DYNAMIC_BASE = 0, DYNAMICTOP = 0; // dynamic area handled by sbrk
+
+
+// Initializes the stack cookie. Called at the startup of main and at the startup of each thread in pthreads mode.
+function writeStackCookie() {
+  assert((STACK_MAX & 3) == 0);
+  HEAPU32[(STACK_MAX >> 2)-1] = 0x02135467;
+  HEAPU32[(STACK_MAX >> 2)-2] = 0x89BACDFE;
+}
+
+function checkStackCookie() {
+  if (HEAPU32[(STACK_MAX >> 2)-1] != 0x02135467 || HEAPU32[(STACK_MAX >> 2)-2] != 0x89BACDFE) {
+    abort('Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x' + HEAPU32[(STACK_MAX >> 2)-2].toString(16) + ' ' + HEAPU32[(STACK_MAX >> 2)-1].toString(16));
+  }
+}
+
+function abortStackOverflow(allocSize) {
+  abort('Stack overflow! Attempted to allocate ' + allocSize + ' bytes on the stack, but stack has only ' + (STACK_MAX - asm.stackSave() + allocSize) + ' bytes available!');
+}
+
+function abortOnCannotGrowMemory() {
+  abort('Cannot enlarge memory arrays. Either (1) compile with  -s TOTAL_MEMORY=X  with X higher than the current value ' + TOTAL_MEMORY + ', (2) compile with  -s ALLOW_MEMORY_GROWTH=1  which adjusts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of this abort, compile with  -s ABORTING_MALLOC=0 ');
+}
+
+function enlargeMemory() {
+  abortOnCannotGrowMemory();
+}
+
+
+var TOTAL_STACK = Module['TOTAL_STACK'] || 5242880;
+var TOTAL_MEMORY = Module['TOTAL_MEMORY'] || 16777216;
+
+var totalMemory = 64*1024;
+while (totalMemory < TOTAL_MEMORY || totalMemory < 2*TOTAL_STACK) {
+  if (totalMemory < 16*1024*1024) {
+    totalMemory *= 2;
+  } else {
+    totalMemory += 16*1024*1024
+  }
+}
+if (totalMemory !== TOTAL_MEMORY) {
+  Module.printErr('increasing TOTAL_MEMORY to ' + totalMemory + ' to be compliant with the asm.js spec (and given that TOTAL_STACK=' + TOTAL_STACK + ')');
+  TOTAL_MEMORY = totalMemory;
+}
+
+// Initialize the runtime's memory
+// check for full engine support (use string 'subarray' to avoid closure compiler confusion)
+assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined' && !!(new Int32Array(1)['subarray']) && !!(new Int32Array(1)['set']),
+       'JS engine does not provide full typed array support');
+
+
+
+// Use a provided buffer, if there is one, or else allocate a new one
+if (Module['buffer']) {
+  buffer = Module['buffer'];
+  assert(buffer.byteLength === TOTAL_MEMORY, 'provided buffer should be ' + TOTAL_MEMORY + ' bytes, but it is ' + buffer.byteLength);
+} else {
+  buffer = new ArrayBuffer(TOTAL_MEMORY);
+}
+updateGlobalBufferViews();
+
+
+// Endianness check (note: assumes compiler arch was little-endian)
+HEAP32[0] = 255;
+if (HEAPU8[0] !== 255 || HEAPU8[3] !== 0) throw 'Typed arrays 2 must be run on a little-endian system';
+
+Module['HEAP'] = HEAP;
+Module['buffer'] = buffer;
+Module['HEAP8'] = HEAP8;
+Module['HEAP16'] = HEAP16;
+Module['HEAP32'] = HEAP32;
+Module['HEAPU8'] = HEAPU8;
+Module['HEAPU16'] = HEAPU16;
+Module['HEAPU32'] = HEAPU32;
+Module['HEAPF32'] = HEAPF32;
+Module['HEAPF64'] = HEAPF64;
+
+function callRuntimeCallbacks(callbacks) {
+  while(callbacks.length > 0) {
+    var callback = callbacks.shift();
+    if (typeof callback == 'function') {
+      callback();
+      continue;
+    }
+    var func = callback.func;
+    if (typeof func === 'number') {
+      if (callback.arg === undefined) {
+        Runtime.dynCall('v', func);
+      } else {
+        Runtime.dynCall('vi', func, [callback.arg]);
+      }
+    } else {
+      func(callback.arg === undefined ? null : callback.arg);
+    }
+  }
+}
+
+var __ATPRERUN__  = []; // functions called before the runtime is initialized
+var __ATINIT__    = []; // functions called during startup
+var __ATMAIN__    = []; // functions called when main() is to be run
+var __ATEXIT__    = []; // functions called during shutdown
+var __ATPOSTRUN__ = []; // functions called after the runtime has exited
+
+var runtimeInitialized = false;
+var runtimeExited = false;
+
+
+function preRun() {
+  // compatibility - merge in anything from Module['preRun'] at this time
+  if (Module['preRun']) {
+    if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];
+    while (Module['preRun'].length) {
+      addOnPreRun(Module['preRun'].shift());
+    }
+  }
+  callRuntimeCallbacks(__ATPRERUN__);
+}
+
+function ensureInitRuntime() {
+  checkStackCookie();
+  if (runtimeInitialized) return;
+  runtimeInitialized = true;
+  callRuntimeCallbacks(__ATINIT__);
+}
+
+function preMain() {
+  checkStackCookie();
+  callRuntimeCallbacks(__ATMAIN__);
+}
+
+function exitRuntime() {
+  checkStackCookie();
+  callRuntimeCallbacks(__ATEXIT__);
+  runtimeExited = true;
+}
+
+function postRun() {
+  checkStackCookie();
+  // compatibility - merge in anything from Module['postRun'] at this time
+  if (Module['postRun']) {
+    if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']];
+    while (Module['postRun'].length) {
+      addOnPostRun(Module['postRun'].shift());
+    }
+  }
+  callRuntimeCallbacks(__ATPOSTRUN__);
+}
+
+function addOnPreRun(cb) {
+  __ATPRERUN__.unshift(cb);
+}
+Module["addOnPreRun"] = addOnPreRun;
+
+function addOnInit(cb) {
+  __ATINIT__.unshift(cb);
+}
+Module["addOnInit"] = addOnInit;
+
+function addOnPreMain(cb) {
+  __ATMAIN__.unshift(cb);
+}
+Module["addOnPreMain"] = addOnPreMain;
+
+function addOnExit(cb) {
+  __ATEXIT__.unshift(cb);
+}
+Module["addOnExit"] = addOnExit;
+
+function addOnPostRun(cb) {
+  __ATPOSTRUN__.unshift(cb);
+}
+Module["addOnPostRun"] = addOnPostRun;
+
+// Tools
+
+
+function intArrayFromString(stringy, dontAddNull, length /* optional */) {
+  var len = length > 0 ? length : lengthBytesUTF8(stringy)+1;
+  var u8array = new Array(len);
+  var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length);
+  if (dontAddNull) u8array.length = numBytesWritten;
+  return u8array;
+}
+Module["intArrayFromString"] = intArrayFromString;
+
+function intArrayToString(array) {
+  var ret = [];
+  for (var i = 0; i < array.length; i++) {
+    var chr = array[i];
+    if (chr > 0xFF) {
+      assert(false, 'Character code ' + chr + ' (' + String.fromCharCode(chr) + ')  at offset ' + i + ' not in 0x00-0xFF.');
+      chr &= 0xFF;
+    }
+    ret.push(String.fromCharCode(chr));
+  }
+  return ret.join('');
+}
+Module["intArrayToString"] = intArrayToString;
+
+function writeStringToMemory(string, buffer, dontAddNull) {
+  var array = intArrayFromString(string, dontAddNull);
+  var i = 0;
+  while (i < array.length) {
+    var chr = array[i];
+    HEAP8[(((buffer)+(i))>>0)]=chr;
+    i = i + 1;
+  }
+}
+Module["writeStringToMemory"] = writeStringToMemory;
+
+function writeArrayToMemory(array, buffer) {
+  for (var i = 0; i < array.length; i++) {
+    HEAP8[((buffer++)>>0)]=array[i];
+  }
+}
+Module["writeArrayToMemory"] = writeArrayToMemory;
+
+function writeAsciiToMemory(str, buffer, dontAddNull) {
+  for (var i = 0; i < str.length; ++i) {
+    assert(str.charCodeAt(i) === str.charCodeAt(i)&0xff);
+    HEAP8[((buffer++)>>0)]=str.charCodeAt(i);
+  }
+  // Null-terminate the pointer to the HEAP.
+  if (!dontAddNull) HEAP8[((buffer)>>0)]=0;
+}
+Module["writeAsciiToMemory"] = writeAsciiToMemory;
+
+function unSign(value, bits, ignore) {
+  if (value >= 0) {
+    return value;
+  }
+  return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts
+                    : Math.pow(2, bits)         + value;
+}
+function reSign(value, bits, ignore) {
+  if (value <= 0) {
+    return value;
+  }
+  var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32
+                        : Math.pow(2, bits-1);
+  if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that
+                                                       // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors
+                                                       // TODO: In i64 mode 1, resign the two parts separately and safely
+    value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts
+  }
+  return value;
+}
+
+
+// check for imul support, and also for correctness ( https://bugs.webkit.org/show_bug.cgi?id=126345 )
+if (!Math['imul'] || Math['imul'](0xffffffff, 5) !== -5) Math['imul'] = function imul(a, b) {
+  var ah  = a >>> 16;
+  var al = a & 0xffff;
+  var bh  = b >>> 16;
+  var bl = b & 0xffff;
+  return (al*bl + ((ah*bl + al*bh) << 16))|0;
+};
+Math.imul = Math['imul'];
+
+
+if (!Math['clz32']) Math['clz32'] = function(x) {
+  x = x >>> 0;
+  for (var i = 0; i < 32; i++) {
+    if (x & (1 << (31 - i))) return i;
+  }
+  return 32;
+};
+Math.clz32 = Math['clz32']
+
+if (!Math['trunc']) Math['trunc'] = function(x) {
+  return x < 0 ? Math.ceil(x) : Math.floor(x);
+};
+Math.trunc = Math['trunc'];
+
+var Math_abs = Math.abs;
+var Math_cos = Math.cos;
+var Math_sin = Math.sin;
+var Math_tan = Math.tan;
+var Math_acos = Math.acos;
+var Math_asin = Math.asin;
+var Math_atan = Math.atan;
+var Math_atan2 = Math.atan2;
+var Math_exp = Math.exp;
+var Math_log = Math.log;
+var Math_sqrt = Math.sqrt;
+var Math_ceil = Math.ceil;
+var Math_floor = Math.floor;
+var Math_pow = Math.pow;
+var Math_imul = Math.imul;
+var Math_fround = Math.fround;
+var Math_min = Math.min;
+var Math_clz32 = Math.clz32;
+var Math_trunc = Math.trunc;
+
+// A counter of dependencies for calling run(). If we need to
+// do asynchronous work before running, increment this and
+// decrement it. Incrementing must happen in a place like
+// PRE_RUN_ADDITIONS (used by emcc to add file preloading).
+// Note that you can add dependencies in preRun, even though
+// it happens right before run - run will be postponed until
+// the dependencies are met.
+var runDependencies = 0;
+var runDependencyWatcher = null;
+var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled
+var runDependencyTracking = {};
+
+function getUniqueRunDependency(id) {
+  var orig = id;
+  while (1) {
+    if (!runDependencyTracking[id]) return id;
+    id = orig + Math.random();
+  }
+  return id;
+}
+
+function addRunDependency(id) {
+  runDependencies++;
+  if (Module['monitorRunDependencies']) {
+    Module['monitorRunDependencies'](runDependencies);
+  }
+  if (id) {
+    assert(!runDependencyTracking[id]);
+    runDependencyTracking[id] = 1;
+    if (runDependencyWatcher === null && typeof setInterval !== 'undefined') {
+      // Check for missing dependencies every few seconds
+      runDependencyWatcher = setInterval(function() {
+        if (ABORT) {
+          clearInterval(runDependencyWatcher);
+          runDependencyWatcher = null;
+          return;
+        }
+        var shown = false;
+        for (var dep in runDependencyTracking) {
+          if (!shown) {
+            shown = true;
+            Module.printErr('still waiting on run dependencies:');
+          }
+          Module.printErr('dependency: ' + dep);
+        }
+        if (shown) {
+          Module.printErr('(end of list)');
+        }
+      }, 10000);
+    }
+  } else {
+    Module.printErr('warning: run dependency added without ID');
+  }
+}
+Module["addRunDependency"] = addRunDependency;
+
+function removeRunDependency(id) {
+  runDependencies--;
+  if (Module['monitorRunDependencies']) {
+    Module['monitorRunDependencies'](runDependencies);
+  }
+  if (id) {
+    assert(runDependencyTracking[id]);
+    delete runDependencyTracking[id];
+  } else {
+    Module.printErr('warning: run dependency removed without ID');
+  }
+  if (runDependencies == 0) {
+    if (runDependencyWatcher !== null) {
+      clearInterval(runDependencyWatcher);
+      runDependencyWatcher = null;
+    }
+    if (dependenciesFulfilled) {
+      var callback = dependenciesFulfilled;
+      dependenciesFulfilled = null;
+      callback(); // can add another dependenciesFulfilled
+    }
+  }
+}
+Module["removeRunDependency"] = removeRunDependency;
+
+Module["preloadedImages"] = {}; // maps url to image data
+Module["preloadedAudios"] = {}; // maps url to audio data
+
+
+
+var memoryInitializer = null;
+
+
+
+
+
+// === Body ===
+
+var ASM_CONSTS = [];
+
+
+
+
+STATIC_BASE = 8;
+
+STATICTOP = STATIC_BASE + 77520;
+  /* global initializers */  __ATINIT__.push();
+  
+
+/* memory initializer */ allocate([64,209,0,0,74,209,0,0,105,209,0,0,150,209,0,0,211,209,0,0,254,209,0,0,55,210,0,0,101,210,0,0,144,210,0,0,177,210,0,0,208,210,0,0,0,0,0,0,0,0,0,0,70,227,0,0,2,0,0,0,94,227,0,0,3,0,0,0,89,215,0,0,4,0,0,0,120,219,0,0,10,0,0,0,22,255,0,0,8,0,0,0,15,255,0,0,9,0,0,0,29,255,0,0,11,0,0,0,96,215,0,0,12,0,0,0,103,215,0,0,13,0,0,0,35,255,0,0,6,0,0,0,110,215,0,0,14,0,0,0,136,253,0,0,15,0,0,0,149,253,0,0,16,0,0,0,110,253,0,0,17,0,0,0,25,13,1,0,19,0,0,0,116,215,0,0,21,0,0,0,121,215,0,0,255,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,20,0,0,0,21,0,0,0,22,0,0,0,23,0,0,0,24,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,30,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,33,0,0,0,35,0,0,0,36,0,0,0,37,0,0,0,38,0,0,0,39,0,0,0,40,0,0,0,41,0,0,0,42,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,47,0,0,0,48,0,0,0,49,0,0,0,50,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,57,0,0,0,58,0,0,0,59,0,0,0,60,0,0,0,61,0,0,0,62,0,0,0,63,0,0,0,64,0,0,0,65,0,0,0,66,0,0,0,67,0,0,0,68,0,0,0,69,0,0,0,70,0,0,0,71,0,0,0,72,0,0,0,73,0,0,0,74,0,0,0,75,0,0,0,34,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,39,227,0,0,20,1,0,0,20,1,0,0,6,0,0,0,45,227,0,0,17,1,0,0,17,1,0,0,0,0,0,0,50,227,0,0,33,1,0,0,33,1,0,0,1,0,0,0,54,227,0,0,13,1,0,0,13,1,0,0,0,0,0,0,57,13,1,0,14,1,0,0,14,1,0,0,1,0,0,0,61,227,0,0,15,1,0,0,15,1,0,0,0,0,0,0,66,227,0,0,38,1,0,0,38,1,0,0,4,0,0,0,70,227,0,0,35,1,0,0,35,1,0,0,1,0,0,0,76,227,0,0,32,1,0,0,32,1,0,0,1,0,0,0,81,227,0,0,16,1,0,0,16,1,0,0,10,0,0,0,87,227,0,0,12,1,0,0,43,1,0,0,6,0,0,0,94,227,0,0,34,1,0,0,34,1,0,0,1,0,0,0,99,227,0,0,9,1,0,0,42,1,0,0,10,0,0,0,105,227,0,0,7,1,0,0,40,1,0,0,10,0,0,0,112,227,0,0,29,1,0,0,29,1,0,0,6,0,0,0,119,227,0,0,4,1,0,0,4,1,0,0,7,0,0,0,123,227,0,0,36,1,0,0,36,1,0,0,10,0,0,0,127,227,0,0,25,1,0,0,25,1,0,0,0,0,0,0,130,227,0,0,30,1,0,0,30,1,0,0,4,0,0,0,136,227,0,0,10,1,0,0,10,1,0,0,10,0,0,0,140,227,0,0,11,1,0,0,11,1,0,0,7,0,0,0,146,227,0,0,37,1,0,0,37,1,0,0,10,0,0,0,149,227,0,0,24,1,0,0,24,1,0,0,10,0,0,0,152,227,0,0,19,1,0,0,19,1,0,0,10,0,0,0,157,227,0,0,23,1,0,0,23,1,0,0,1,0,0,0,163,227,0,0,6,1,0,0,39,1,0,0,10,0,0,0,166,227,0,0,18,1,0,0,18,1,0,0,10,0,0,0,171,227,0,0,22,1,0,0,22,1,0,0,1,0,0,0,176,227,0,0,21,1,0,0,21,1,0,0,6,0,0,0,181,227,0,0,31,1,0,0,31,1,0,0,4,0,0,0,187,227,0,0,3,1,0,0,3,1,0,0,10,0,0,0,51,13,1,0,5,1,0,0,5,1,0,0,0,0,0,0,194,227,0,0,47,1,0,0,47,1,0,0,1,0,0,0,203,227,0,0,48,1,0,0,48,1,0,0,1,0,0,0,212,227,0,0,49,1,0,0,49,1,0,0,1,0,0,0,225,227,0,0,46,1,0,0,46,1,0,0,1,0,0,0,229,227,0,0,44,1,0,0,44,1,0,0,7,0,0,0,235,227,0,0,45,1,0,0,45,1,0,0,1,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,244,9,1,0,2,1,0,0,2,1,0,0,9,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,241,227,0,0,8,1,0,0,41,1,0,0,10,0,0,0,77,234,0,0,82,234,0,0,88,234,0,0,99,234,0,0,113,234,0,0,128,234,0,0,140,234,0,0,154,234,0,0,165,234,0,0,180,234,0,0,194,234,0,0,208,234,0,0,220,234,0,0,234,234,0,0,249,234,0,0,8,235,0,0,20,235,0,0,33,235,0,0,47,235,0,0,60,235,0,0,73,235,0,0,86,235,0,0,100,235,0,0,113,235,0,0,126,235,0,0,140,235,0,0,151,235,0,0,162,235,0,0,178,235,0,0,195,235,0,0,213,235,0,0,228,235,0,0,242,235,0,0,0,236,0,0,13,236,0,0,25,236,0,0,38,236,0,0,52,236,0,0,64,236,0,0,75,236,0,0,87,236,0,0,99,236,0,0,115,236,0,0,130,236,0,0,145,236,0,0,161,236,0,0,175,236,0,0,189,236,0,0,201,236,0,0,217,236,0,0,233,236,0,0,253,236,0,0,9,237,0,0,14,237,0,0,20,237,0,0,26,237,0,0,36,237,0,0,42,237,0,0,49,237,0,0,58,237,0,0,65,237,0,0,71,237,0,0,80,237,0,0,88,237,0,0,96,237,0,0,109,237,0,0,121,237,0,0,130,237,0,0,140,237,0,0,152,237,0,0,159,237,0,0,167,237,0,0,172,237,0,0,177,237,0,0,181,237,0,0,186,237,0,0,191,237,0,0,196,237,0,0,201,237,0,0,208,237,0,0,214,237,0,0,221,237,0,0,229,237,0,0,235,237,0,0,241,237,0,0,247,237,0,0,253,237,0,0,4,238,0,0,11,238,0,0,19,238,0,0,27,238,0,0,36,238,0,0,43,238,0,0,51,238,0,0,63,238,0,0,71,238,0,0,79,238,0,0,87,238,0,0,99,238,0,0,105,238,0,0,112,238,0,0,120,238,0,0,128,238,0,0,140,238,0,0,151,238,0,0,164,238,0,0,176,238,0,0,189,238,0,0,202,238,0,0,210,238,0,0,223,238,0,0,236,238,0,0,251,238,0,0,13,239,0,0,29,239,0,0,44,239,0,0,52,239,0,0,56,239,0,0,60,239,0,0,64,239,0,0,68,239,0,0,72,239,0,0,76,239,0,0,80,239,0,0,84,239,0,0,88,239,0,0,92,239,0,0,96,239,0,0,100,239,0,0,104,239,0,0,116,239,0,0,120,239,0,0,124,239,0,0,136,239,0,0,140,239,0,0,144,239,0,0,148,239,0,0,152,239,0,0,156,239,0,0,160,239,0,0,164,239,0,0,168,239,0,0,172,239,0,0,176,239,0,0,181,239,0,0,189,239,0,0,197,239,0,0,201,239,0,0,214,239,0,0,224,239,0,0,233,239,0,0,236,239,0,0,245,239,0,0,254,239,0,0,4,240,0,0,9,240,0,0,13,240,0,0,26,240,0,0,31,240,0,0,42,240,0,0,55,240,0,0,69,240,0,0,85,240,0,0,89,240,0,0,97,240,0,0,102,240,0,0,113,240,0,0,124,240,0,0,134,240,0,0,144,240,0,0,154,240,0,0,164,240,0,0,168,240,0,0,174,240,0,0,180,240,0,0,186,240,0,0,191,240,0,0,202,240,0,0,206,240,0,0,209,240,0,0,218,240,0,0,222,240,0,0,232,240,0,0,242,240,0,0,253,240,0,0,12,241,0,0,26,241,0,0,36,241,0,0,49,241,0,0,52,241,0,0,62,241,0,0,76,241,0,0,81,241,0,0,86,241,0,0,94,241,0,0,97,241,0,0,100,241,0,0,104,241,0,0,109,241,0,0,113,241,0,0,117,241,0,0,122,241,0,0,127,241,0,0,132,241,0,0,137,241,0,0,142,241,0,0,147,241,0,0,151,241,0,0,155,241,0,0,159,241,0,0,163,241,0,0,167,241,0,0,171,241,0,0,175,241,0,0,179,241,0,0,61,227,0,0,127,227,0,0,193,241,0,0,201,241,0,0,210,241,0,0,218,241,0,0,225,241,0,0,237,241,0,0,245,241,0,0,1,242,0,0,17,242,0,0,33,242,0,0,45,242,0,0,54,242,0,0,59,242,0,0,70,242,0,0,82,242,0,0,91,242,0,0,96,242,0,0,107,242,0,0,119,242,0,0,131,242,0,0,135,242,0,0,139,242,0,0,149,242,0,0,155,242,0,0,166,242,0,0,175,242,0,0,183,242,0,0,194,242,0,0,202,242,0,0,209,242,0,0,220,242,0,0,234,242,0,0,238,242,0,0,246,242,0,0,253,242,0,0,5,243,0,0,24,243,0,0,39,243,0,0,52,243,0,0,71,243,0,0,93,243,0,0,97,243,0,0,103,243,0,0,110,243,0,0,123,243,0,0,127,243,0,0,135,243,0,0,143,243,0,0,152,243,0,0,160,243,0,0,168,243,0,0,64,255,0,0,176,243,0,0,181,243,0,0,191,243,0,0,198,243,0,0,208,243,0,0,219,243,0,0,230,243,0,0,236,243,0,0,247,243,0,0,253,243,0,0,9,244,0,0,24,244,0,0,33,244,0,0,46,244,0,0,57,244,0,0,69,244,0,0,81,244,0,0,97,244,0,0,107,244,0,0,112,244,0,0,123,244,0,0,130,244,0,0,136,244,0,0,146,244,0,0,157,244,0,0,168,244,0,0,181,244,0,0,191,244,0,0,198,244,0,0,205,244,0,0,214,244,0,0,222,244,0,0,227,244,0,0,230,244,0,0,235,244,0,0,241,244,0,0,0,0,0,0,35,0,0,0,248,9,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,185,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,108,10,0,0,9,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,3,0,0,0,193,38,1,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,10,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,3,0,0,0,201,42,1,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,100,0,0,0,232,3,0,0,16,39,0,0,160,134,1,0,64,66,15,0,128,150,152,0,0,225,245,5,253,252,126,0,160,9,253,252,84,27,100,34,171,35,250,20,253,252,17,33,17,33,253,252,253,252,209,34,249,24,25,19,250,29,250,29,253,252,253,252,250,29,13,12,132,10,253,252,253,252,253,252,253,252,181,0,249,24,253,252,230,255,253,252,253,252,131,21,7,11,253,252,253,252,12,22,253,252,253,252,253,252,253,252,253,252,253,252,253,252,130,33,130,33,90,0,194,16,215,255,107,30,77,31,9,26,253,252,233,23,115,2,98,3,105,3,115,3,193,1,253,252,235,0,243,33,130,33,253,252,246,0,253,252,185,4,253,252,123,1,253,252,253,252,101,0,37,0,253,252,36,0,62,35,253,252,117,0,117,11,7,0,87,0,13,0,66,0,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,14,0,92,0,253,252,49,0,51,0,253,252,253,252,253,252,253,252,253,252,31,0,53,0,141,0,133,1,144,1,17,33,75,1,52,17,115,1,253,252,175,0,253,252,213,0,253,252,253,252,51,0,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,45,0,74,0,83,0,100,0,253,252,253,252,253,252,253,252,253,252,253,252,129,0,187,0,253,252,204,0,253,252,214,0,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,13,0,162,13,26,1,123,1,109,0,20,1,139,1,25,0,48,1,50,0,109,0,17,33,17,33,86,1,253,252,253,252,167,1,121,1,54,0,95,0,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,113,24,253,252,253,252,19,1,253,252,253,252,253,252,246,0,151,1,253,252,253,252,43,1,130,33,130,33,130,33,130,33,253,252,117,11,110,1,253,252,253,252,68,1,70,1,253,252,253,252,253,252,167,18,253,252,250,29,250,29,253,252,253,252,139,19,17,33,253,252,253,252,79,1,166,17,253,252,26,2,146,1,106,1,54,28,194,16,83,1,246,0,185,4,72,1,103,1,253,252,17,33,72,1,89,1,94,0,106,0,253,252,110,1,100,1,106,0,253,252,186,1,24,36,99,1,39,2,133,2,137,2,246,2,253,252,253,252,253,252,253,252,169,3,253,252,253,252,253,252,253,252,253,252,253,252,125,1,44,3,253,252,253,252,179,3,253,252,187,3,253,252,201,3,253,252,78,2,174,1,178,1,253,252,253,252,253,252,253,252,253,19,17,33,17,33,17,33,17,33,54,28,17,33,17,33,253,252,253,252,190,31,253,252,194,16,118,26,113,1,190,31,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,235,8,250,29,47,37,253,252,253,252,251,40,253,252,253,252,253,252,243,33,243,33,253,252,156,1,253,252,123,1,253,252,9,3,253,252,253,252,253,252,253,252,253,252,128,37,250,29,209,37,162,13,17,33,253,252,253,252,245,1,250,1,67,0,253,252,49,14,249,1,130,33,34,38,250,29,115,38,130,33,130,33,79,15,55,0,55,0,103,0,196,38,250,29,21,39,253,252,204,1,253,252,125,1,151,1,47,32,2,2,253,252,253,252,253,252,253,252,130,33,227,26,253,252,253,252,220,30,253,252,72,1,136,1,253,252,253,252,72,1,253,252,162,1,163,1,253,252,71,0,253,252,253,252,249,24,193,15,184,1,34,38,115,38,130,33,185,4,72,1,253,252,253,252,110,20,171,1,123,1,253,252,253,252,197,27,253,252,253,252,77,31,253,252,253,252,253,252,9,3,36,0,24,36,253,252,24,36,102,39,250,29,183,39,194,1,253,252,253,252,253,252,253,252,132,4,253,252,253,252,253,252,253,252,50,4,253,252,253,252,253,252,253,252,253,252,182,1,130,33,253,252,190,1,23,2,195,1,28,2,253,252,253,252,14,2,166,17,253,252,253,252,253,252,125,1,253,252,181,1,253,252,253,252,253,252,253,252,253,252,253,252,253,252,130,33,130,33,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,33,0,130,33,253,252,199,1,202,1,253,252,72,1,24,36,203,1,253,252,253,252,253,252,226,1,111,10,253,252,253,252,146,1,240,36,240,36,240,36,240,36,40,4,40,4,15,41,249,12,240,36,240,36,248,11,248,11,85,2,85,2,119,12,40,4,40,4,224,2,224,2,158,2,52,0,52,0,146,1,146,1,146,1,144,12,239,22,19,13,96,23,253,252,53,0,253,252,72,1,208,1,253,252,44,2,253,252,253,252,138,11,253,252,253,252,160,8,33,0,33,0,253,252,236,9,253,252,117,11,253,252,253,252,246,0,17,33,162,13,176,1,229,0,253,252,53,0,72,1,53,0,77,2,71,0,148,3,129,25,253,252,160,32,104,2,253,252,150,0,253,252,242,10,125,22,1,10,72,1,244,0,13,1,104,2,253,252,253,252,253,252,253,252,139,0,152,0,72,1,107,0,123,0,17,33,249,24,253,252,125,1,122,2,69,0,253,252,253,252,130,33,110,1,253,252,167,28,70,1,253,252,253,252,253,252,253,252,227,26,220,30,253,252,253,252,4,2,253,252,117,11,18,1,185,4,72,1,106,0,113,1,253,252,176,1,229,0,72,1,66,1,71,1,253,252,253,252,132,4,231,1,253,252,8,2,72,1,253,252,72,1,61,0,50,4,253,252,253,252,253,252,50,4,253,252,253,252,142,2,253,252,253,252,253,252,13,2,166,17,253,252,253,252,253,252,146,1,146,1,253,252,68,3,53,18,253,252,253,252,21,2,24,29,253,252,253,252,24,36,243,33,130,33,49,2,243,33,243,33,253,252,156,1,32,2,50,2,243,33,243,33,253,252,253,252,156,1,253,252,66,0,101,0,53,18,166,17,130,33,33,0,253,252,246,0,149,2,253,252,253,252,253,252,50,4,162,13,246,0,253,252,199,1,253,252,93,2,253,252,80,16,155,2,253,252,17,33,161,2,253,252,130,33,130,33,21,1,130,33,130,33,179,2,53,18,53,18,130,0,55,0,253,252,253,252,137,29,192,14,253,252,130,33,253,252,253,252,62,2,253,252,253,252,253,252,200,0,72,1,182,2,65,2,146,4,253,252,63,2,66,2,53,18,166,17,253,252,253,252,67,2,68,2,253,252,81,2,253,252,82,2,81,2,253,252,86,2,72,1,103,2,102,2,133,36,253,252,110,2,112,2,253,252,200,2,130,33,117,2,253,252,117,11,130,33,253,252,117,11,253,252,117,11,253,252,253,252,243,33,253,252,117,11,253,252,117,11,253,252,253,252,253,252,237,2,121,2,117,11,166,17,162,13,253,252,253,252,72,1,243,2,253,252,148,3,242,36,109,0,253,252,253,252,53,18,253,252,253,252,109,0,253,252,130,33,253,252,248,2,249,2,253,252,253,252,138,0,253,252,220,30,253,252,129,2,182,2,46,2,253,252,253,252,236,2,4,3,145,2,50,4,253,252,142,2,253,252,142,2,253,252,142,2,253,252,253,252,253,252,167,2,253,252,50,4,253,252,238,2,22,3,50,4,253,252,142,2,253,252,253,252,159,2,117,11,253,252,117,11,253,252,253,252,164,2,32,3,253,252,253,252,162,13,250,2,253,252,40,3,133,2,137,2,162,13,253,252,49,14,253,252,253,252,53,18,253,252,253,252,253,252,182,2,129,2,182,2,171,2,253,252,237,0,253,252,253,252,253,252,253,252,81,2,175,2,81,2,81,2,253,252,177,2,178,2,253,252,8,40,81,2,253,252,181,2,81,2,253,252,253,252,33,3,9,3,89,40,250,29,170,40,250,1,150,0,49,3,129,2,182,2,236,2,253,252,253,252,142,2,253,252,253,252,253,252,50,4,253,252,142,2,253,252,183,2,185,2,253,252,142,2,253,252,253,252,253,252,82,0,229,0,72,1,119,0,121,0,253,252,253,252,253,252,129,2,253,252,81,2,81,2,188,2,81,2,81,2,128,0,253,252,253,252,142,2,253,252,253,252,253,252,81,2,253,252,2,0,170,1,27,0,16,0,17,0,62,0,83,0,20,0,132,1,248,0,15,0,7,0,36,1,28,0,14,0,5,0,6,0,80,1,76,0,150,1,36,1,16,0,17,0,13,0,4,0,20,0,208,0,48,0,28,0,82,2,108,1,159,1,65,0,202,1,22,0,24,1,52,0,31,1,110,0,28,1,107,1,90,2,109,1,80,1,97,2,112,1,16,0,17,0,50,0,51,0,20,0,100,2,130,1,159,2,107,2,50,0,51,0,210,1,54,0,2,0,65,0,4,0,52,0,15,0,131,1,155,2,144,1,65,0,244,1,248,2,167,1,67,2,68,2,170,1,250,2,153,1,143,1,26,0,145,1,25,0,50,0,174,2,27,0,174,2,219,1,16,0,76,0,154,1,74,3,142,2,29,0,93,3,26,0,16,0,17,0,88,0,13,1,20,0,16,0,140,0,22,0,88,0,143,0,48,1,90,0,9,0,10,0,133,0,37,0,38,0,98,0,15,0,79,0,65,0,107,1,90,0,109,1,105,0,15,2,112,1,25,0,188,1,10,0,71,0,48,0,16,0,0,0,15,0,25,0,28,0,116,0,119,0,25,0,88,0,212,1,16,0,129,1,16,0,131,1,90,0,90,0,116,0,135,0,136,0,16,0,55,0,213,1,70,3,25,0,136,0,143,1,137,0,145,1,116,0,121,0,25,0,18,0,90,0,20,0,152,1,77,1,154,1,88,0,165,3,25,0,116,0,116,0,17,0,18,0,108,0,139,0,88,0,158,3,137,0,11,3,88,0,98,0,25,0,126,0,127,0,128,0,136,0,90,0,116,0,133,0,155,2,137,0,111,0,88,0,159,2,139,0,137,0,139,0,113,2,187,1,188,1,179,1,142,0,143,0,133,0,224,1,121,2,125,3,123,3,174,2,109,0,137,0,203,2,224,1,77,2,136,0,142,0,143,0,158,1,143,0,128,2,210,1,88,0,211,1,136,0,213,1,139,0,135,0,136,0,142,0,143,0,26,0,77,3,233,0,31,1,226,0,137,0,137,0,116,0,157,3,233,0,136,0,143,0,15,1,252,0,137,0,254,0,255,0,137,0,137,0,247,0,248,0,81,3,13,1,143,0,202,0,142,0,143,0,255,0,89,3,89,3,208,0,252,0,93,3,254,0,137,0,142,0,143,0,142,0,143,0,136,0,15,1,137,0,147,2,148,2,142,0,143,0,65,3,15,1,75,1,88,0,137,0,15,2,139,0,80,1,139,0,233,0,252,0,189,2,254,0,182,2,127,2,128,2,88,0,137,0,196,2,139,0,88,0,58,0,59,0,120,0,2,0,31,1,4,0,5,0,6,0,88,0,88,0,9,0,10,0,209,0,210,0,13,0,89,2,15,0,16,0,17,0,77,1,129,1,20,0,116,1,117,1,88,0,78,1,15,1,139,0,209,0,210,0,136,0,143,0,12,1,86,2,23,1,24,1,252,0,165,3,254,0,28,1,133,0,90,0,135,0,136,0,55,0,2,1,7,1,136,0,65,1,48,0,211,2,78,1,13,1,52,0,25,0,135,0,136,0,136,0,108,1,25,0,17,1,2,1,3,1,62,0,21,1,233,2,90,0,116,0,75,1,108,1,77,3,135,0,136,0,80,1,90,0,139,0,248,2,76,0,250,2,20,1,130,1,137,0,89,3,183,2,109,1,65,1,93,3,143,0,178,3,51,0,70,1,130,1,116,0,55,0,144,1,142,0,143,0,116,0,137,1,116,0,116,0,90,0,122,2,153,1,55,0,144,1,131,1,149,1,150,1,25,0,109,0,137,2,111,0,208,1,153,1,210,1,77,1,67,3,137,0,137,0,145,1,174,2,26,0,37,0,38,0,66,1,67,1,68,1,69,1,154,1,71,1,72,1,184,1,26,0,20,0,167,1,58,0,59,0,43,3,178,1,179,1,66,1,67,1,68,1,69,1,116,0,185,1,184,1,142,0,210,2,116,0,182,2,115,2,160,1,70,3,71,3,65,3,210,2,165,3,90,0,149,1,150,1,212,1,188,1,91,0,26,0,137,0,199,1,137,0,140,0,137,0,137,0,143,0,212,1,140,0,133,0,15,2,143,0,143,0,140,1,71,0,208,1,116,0,210,1,88,0,116,0,140,0,148,1,213,1,67,3,88,0,230,1,133,1,141,0,233,1,88,0,235,1,134,0,110,0,137,0,199,0,113,0,114,0,108,3,55,0,185,1,137,0,123,3,71,0,125,3,209,0,210,0,71,0,137,0,194,1,172,1,97,0,61,0,88,0,176,1,64,0,65,0,242,2,15,0,181,1,8,2,13,0,88,0,16,0,133,0,63,0,135,0,136,0,39,2,191,1,139,0,15,0,135,0,136,0,140,0,133,0,157,3,135,0,136,0,15,2,51,0,139,0,53,0,54,0,55,0,56,0,57,2,49,3,252,0,110,0,254,0,255,0,113,0,114,0,2,1,3,1,90,0,137,0,137,0,7,1,135,0,136,0,111,0,112,0,12,1,13,1,137,0,133,0,116,0,135,0,136,0,82,2,20,1,139,0,240,1,63,2,134,0,137,0,66,2,67,2,68,2,55,2,116,0,31,1,75,2,137,0,97,2,151,3,51,0,63,2,137,0,63,0,66,2,51,0,137,0,83,2,107,2,137,0,137,0,152,3,116,0,89,2,90,2,137,0,92,2,87,2,15,0,81,2,14,2,83,2,111,2,51,0,100,2,53,0,54,0,55,0,56,0,65,1,66,1,67,1,68,1,69,1,70,1,71,1,72,1,111,2,137,0,75,1,88,0,77,1,78,1,142,2,80,1,89,2,122,2,198,2,18,0,75,2,182,2,51,3,183,2,88,0,153,2,186,2,187,2,57,3,127,2,55,2,90,0,192,2,193,2,15,0,134,0,61,0,90,0,63,2,64,0,65,0,66,2,137,0,108,1,134,0,141,3,174,2,56,0,57,0,58,0,59,0,116,1,117,1,71,0,150,3,137,0,152,3,116,0,135,0,136,0,115,2,15,0,85,2,116,0,118,0,130,1,14,0,132,1,133,1,76,2,141,0,135,0,136,0,15,0,62,0,140,1,64,0,65,0,137,0,144,1,137,0,91,0,137,2,148,1,137,0,76,2,111,0,112,0,153,1,182,2,51,0,15,0,53,0,54,0,55,0,56,0,137,0,205,2,203,2,137,0,140,0,137,0,137,0,110,2,212,2,142,0,124,0,125,0,126,0,127,0,128,0,216,2,15,0,136,2,219,2,137,0,137,0,134,0,88,0,110,2,185,1,121,0,88,0,111,0,112,0,233,2,71,0,31,3,151,2,194,1,51,0,92,0,53,0,54,0,55,0,56,0,137,0,242,2,99,0,11,3,167,2,86,0,87,0,208,1,137,0,210,1,137,0,212,1,175,2,15,0,205,2,137,0,134,0,2,3,3,3,15,0,5,3,212,2,7,3,8,3,15,0,15,0,123,0,137,0,13,3,135,0,136,0,16,3,17,3,135,0,136,0,92,0,15,0,200,2,201,2,240,1,134,0,14,3,233,2,124,0,125,0,126,0,127,0,128,0,51,0,121,0,53,0,54,0,55,0,56,0,55,0,218,2,71,0,137,0,51,0,134,0,53,0,54,0,55,0,56,0,15,0,15,0,55,0,230,2,231,2,137,0,15,2,86,0,87,0,137,0,237,2,137,0,137,0,50,3,221,2,137,0,65,3,15,0,2,0,139,0,4,0,139,0,137,0,185,1,247,2,9,0,10,0,254,2,255,2,6,0,221,2,15,0,16,0,17,0,66,2,92,0,20,0,233,1,13,0,235,1,159,2,98,0,99,0,162,2,123,0,124,0,125,0,126,0,127,0,128,0,88,0,154,3,51,3,147,2,199,2,174,2,128,3,158,3,57,3,62,0,153,3,64,0,65,0,88,0,48,0,246,1,123,0,76,2,77,2,126,0,7,0,42,3,51,0,155,2,53,0,54,0,55,0,56,0,62,0,46,3,89,3,88,0,139,0,54,3,133,3,134,3,135,3,136,3,49,3,138,3,139,3,151,3,198,0,142,3,255,255,144,3,145,3,135,0,136,0,255,255,255,255,110,2,151,3,255,255,153,3,154,3,178,3,255,255,111,0,112,0,135,0,136,0,255,255,92,0,63,0,64,0,65,0,152,3,255,255,98,0,99,0,63,0,64,0,65,0,255,255,109,0,255,255,111,0,135,0,136,0,255,255,63,0,64,0,65,0,255,255,255,255,255,255,186,3,187,3,188,3,189,3,190,3,255,255,114,3,123,0,116,3,255,255,126,0,119,3,198,3,255,255,255,255,51,0,255,255,53,0,54,0,55,0,56,0,167,2,255,255,255,255,255,255,111,0,112,0,143,0,255,255,175,2,255,255,255,255,111,0,112,0,255,255,255,255,182,2,183,2,255,255,255,255,186,2,187,2,111,0,112,0,255,255,255,255,192,2,193,2,63,0,64,0,65,0,255,255,255,255,255,255,200,2,201,2,92,0,255,255,63,0,64,0,65,0,255,255,98,0,99,0,255,255,211,2,63,0,64,0,65,0,255,255,16,0,17,0,218,2,255,255,20,0,221,2,255,255,77,3,199,0,79,3,63,0,64,0,65,0,83,3,230,2,231,2,255,255,123,0,209,0,210,0,126,0,237,2,255,255,93,3,255,255,95,3,111,0,112,0,255,255,45,0,46,0,255,255,255,255,139,0,50,0,51,0,111,0,112,0,254,2,255,2,41,1,255,255,255,255,255,255,111,0,112,0,62,0,63,0,49,1,255,255,255,255,52,1,255,255,54,1,14,3,56,1,255,255,58,1,111,0,112,0,255,255,252,0,255,255,254,0,255,0,255,255,255,255,2,1,3,1,255,255,255,255,31,3,7,1,255,255,255,255,255,255,255,255,12,1,13,1,255,255,255,255,255,255,42,3,43,3,255,255,20,1,255,255,255,255,255,255,255,255,50,3,161,3,255,255,255,255,54,3,165,3,255,255,167,3,255,255,255,255,255,255,255,255,172,3,51,0,255,255,53,0,54,0,55,0,56,0,255,255,255,255,2,3,3,3,71,0,5,3,255,255,7,3,8,3,255,255,255,255,255,255,255,255,13,3,255,255,194,3,16,3,17,3,255,255,86,0,87,0,65,1,66,1,67,1,68,1,69,1,70,1,71,1,72,1,255,255,255,255,75,1,255,255,77,1,255,255,92,0,80,1,255,255,255,255,108,3,255,255,98,0,99,0,255,255,255,255,114,3,255,255,116,3,255,255,255,255,119,3,255,255,255,255,255,255,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,108,1,255,255,123,0,255,255,255,255,126,0,255,255,255,255,116,1,117,1,255,255,255,255,51,0,255,255,53,0,54,0,55,0,56,0,151,3,255,255,255,255,255,255,130,1,255,255,132,1,133,1,51,0,255,255,53,0,54,0,55,0,56,0,140,1,255,255,255,255,255,255,144,1,255,255,255,255,255,255,148,1,255,255,255,255,255,255,255,255,153,1,255,255,255,255,255,255,238,0,239,0,240,0,241,0,92,0,40,0,41,0,42,0,43,0,44,0,98,0,255,255,255,255,255,255,252,0,255,255,254,0,255,0,92,0,255,255,133,3,134,3,135,3,136,3,98,0,138,3,139,3,255,255,185,1,142,3,255,255,144,3,145,3,255,255,255,255,255,255,255,255,194,1,255,255,255,255,255,255,2,0,255,255,4,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,13,0,255,255,255,255,212,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,186,3,187,3,188,3,189,3,190,3,255,255,255,255,255,255,255,255,255,255,240,1,255,255,198,3,255,255,48,0,255,255,255,255,255,255,255,255,255,255,75,1,255,255,255,255,255,255,255,255,80,1,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,89,1,90,1,91,1,92,1,93,1,94,1,95,1,96,1,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,255,255,108,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,116,1,117,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,130,1,255,255,111,0,255,255,255,255,2,0,255,255,4,0,255,255,255,255,255,255,255,255,142,1,255,255,144,1,255,255,146,1,147,1,255,255,255,255,255,255,255,255,255,255,153,1,255,255,255,255,255,255,76,2,77,2,255,255,160,1,255,255,255,255,255,255,255,255,255,255,166,1,167,1,255,255,255,255,170,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,189,1,255,255,110,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,199,1,255,255,255,255,202,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,212,1,255,255,255,255,255,255,255,255,255,255,255,255,51,0,199,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,2,0,231,1,4,0,5,0,6,0,7,0,255,255,255,255,255,255,255,255,255,255,13,0,255,255,255,255,111,0,255,255,255,255,255,255,167,2,255,255,255,255,255,255,255,255,255,255,254,1,255,1,175,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,183,2,9,2,255,255,186,2,187,2,255,255,255,255,255,255,255,255,192,2,193,2,255,255,48,0,255,255,255,255,255,255,52,0,200,2,201,2,255,255,7,1,255,255,255,255,255,255,255,255,12,1,13,1,255,255,211,2,255,255,255,255,255,255,255,255,255,255,255,255,218,2,255,255,255,255,221,2,255,255,76,0,255,255,255,255,255,255,255,255,255,255,255,255,230,2,231,2,255,255,255,255,255,255,255,255,255,255,237,2,2,0,255,255,4,0,5,0,6,0,255,255,255,255,255,255,255,255,255,255,255,255,13,0,255,255,199,0,255,255,255,255,254,2,255,2,255,255,255,255,111,0,255,255,255,255,65,1,255,255,255,255,89,2,255,255,70,1,255,255,255,255,255,255,255,255,255,255,255,255,77,1,255,255,255,255,80,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,255,255,255,255,31,3,52,0,255,255,255,255,255,255,255,255,118,2,255,255,255,255,121,2,255,255,42,3,43,3,255,255,255,255,127,2,128,2,255,255,255,255,255,255,255,255,255,255,255,255,54,3,255,255,76,0,255,255,255,255,7,1,255,255,255,255,255,255,255,255,12,1,13,1,255,255,255,255,255,255,238,0,239,0,240,0,132,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,140,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,148,1,255,255,199,0,111,0,255,255,255,255,255,255,255,255,255,255,255,255,179,2,255,255,255,255,255,255,183,2,184,2,255,255,186,2,187,2,255,255,108,3,255,255,255,255,192,2,193,2,255,255,114,3,255,255,116,3,65,1,255,255,119,3,255,255,202,2,70,1,255,255,255,255,185,1,255,255,255,255,255,255,77,1,255,255,255,255,255,255,255,255,194,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,224,2,225,2,255,255,227,2,228,2,255,255,255,255,255,255,151,3,255,255,255,255,7,1,236,2,255,255,255,255,239,2,12,1,13,1,255,255,75,1,255,255,255,255,255,255,255,255,80,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,1,199,0,240,1,255,255,255,255,255,255,132,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,140,1,255,255,255,255,20,3,255,255,255,255,255,255,24,3,148,1,255,255,255,255,255,255,255,255,255,255,31,3,255,255,255,255,255,255,255,255,255,255,65,1,255,255,255,255,255,255,255,255,70,1,255,255,255,255,255,255,255,255,255,255,255,255,77,1,78,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,59,3,255,255,255,255,185,1,255,255,255,255,255,255,255,255,67,3,7,1,255,255,255,255,194,1,160,1,12,1,13,1,255,255,255,255,255,255,166,1,167,1,255,255,255,255,170,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,1,255,255,255,255,255,255,255,255,255,255,77,2,255,255,255,255,255,255,255,255,255,255,132,1,255,255,255,255,255,255,255,255,255,255,255,255,199,1,140,1,255,255,202,1,255,255,255,255,240,1,255,255,255,255,148,1,255,255,255,255,255,255,255,255,255,255,65,1,255,255,255,255,255,255,255,255,70,1,255,255,255,255,255,255,255,255,255,255,255,255,77,1,78,1,255,255,255,255,255,255,231,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,151,3,255,255,255,255,255,255,255,255,255,255,185,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,194,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,9,2,255,255,255,255,208,1,255,255,210,1,255,255,255,255,255,255,255,255,255,255,167,2,255,255,255,255,255,255,255,255,132,1,255,255,255,255,175,2,255,255,255,255,255,255,255,255,140,1,255,255,255,255,183,2,255,255,255,255,255,255,255,255,148,1,77,2,255,255,240,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,200,2,201,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,211,2,255,255,255,255,255,255,255,255,255,255,255,255,218,2,255,255,255,255,255,255,15,2,255,255,255,255,185,1,255,255,255,255,255,255,255,255,230,2,231,2,255,255,255,255,194,1,255,255,89,2,237,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,208,1,255,255,210,1,255,255,255,255,255,255,254,2,255,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,118,2,255,255,255,255,121,2,255,255,255,255,255,255,255,255,255,255,127,2,128,2,255,255,255,255,255,255,167,2,240,1,255,255,255,255,255,255,77,2,255,255,255,255,175,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,42,3,43,3,255,255,255,255,255,255,255,255,255,255,255,255,50,3,255,255,255,255,255,255,54,3,15,2,200,2,201,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,211,2,255,255,255,255,179,2,255,255,255,255,255,255,218,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,230,2,231,2,255,255,255,255,255,255,255,255,255,255,237,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,108,3,255,255,254,2,255,2,255,255,255,255,114,3,255,255,116,3,77,2,167,2,119,3,255,255,255,255,255,255,255,255,255,255,255,255,175,2,236,2,255,255,255,255,239,2,255,255,255,255,182,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,200,2,201,2,255,255,42,3,43,3,255,255,0,0,255,255,255,255,255,255,255,255,211,2,255,255,255,255,255,255,54,3,20,3,255,255,218,2,13,0,14,0,15,0,16,0,17,0,18,0,255,255,20,0,255,255,255,255,255,255,230,2,231,2,26,0,27,0,255,255,255,255,255,255,237,2,255,255,255,255,255,255,255,255,255,255,37,0,38,0,255,255,40,0,41,0,42,0,43,0,44,0,255,255,255,255,255,255,254,2,255,2,167,2,255,255,255,255,255,255,255,255,255,255,255,255,67,3,175,2,255,255,255,255,255,255,255,255,108,3,14,3,182,2,255,255,255,255,255,255,114,3,255,255,116,3,255,255,255,255,119,3,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,200,2,201,2,255,255,255,255,255,255,88,0,255,255,255,255,255,255,42,3,43,3,211,2,255,255,255,255,255,255,255,255,255,255,50,3,218,2,255,255,255,255,54,3,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,230,2,231,2,255,255,255,255,255,255,255,255,255,255,237,2,255,255,255,255,255,255,255,255,255,255,51,0,52,0,255,255,255,255,55,0,255,255,255,255,133,0,134,0,255,255,136,0,254,2,255,2,139,0,140,0,255,255,142,0,143,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,14,3,255,255,80,0,81,0,255,255,108,3,84,0,85,0,86,0,87,0,255,255,114,3,255,255,116,3,255,255,255,255,119,3,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,42,3,43,3,255,255,255,255,255,255,255,255,255,255,255,255,50,3,255,255,255,255,255,255,54,3,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,108,3,255,255,255,255,255,255,255,255,255,255,114,3,255,255,116,3,0,0,1,0,119,3,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,255,255,255,255,255,255,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,46,0,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,0,0,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,13,0,14,0,15,0,16,0,17,0,18,0,255,255,20,0,255,255,255,255,44,0,255,255,255,255,255,255,27,0,28,0,29,0,255,255,255,255,129,0,130,0,131,0,255,255,255,255,37,0,38,0,255,255,40,0,41,0,42,0,43,0,44,0,142,0,143,0,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,255,255,255,255,255,255,255,255,71,0,72], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE);
+/* memory initializer */ allocate([73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,88,0,255,255,90,0,91,0,255,255,255,255,255,255,255,255,117,0,97,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,108,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,116,0,117,0,118,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,0,0,255,255,255,255,134,0,135,0,136,0,137,0,255,255,255,255,140,0,141,0,142,0,143,0,13,0,14,0,15,0,16,0,17,0,18,0,255,255,20,0,255,255,255,255,44,0,255,255,255,255,26,0,27,0,28,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,37,0,38,0,255,255,40,0,41,0,42,0,43,0,44,0,255,255,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,88,0,255,255,255,255,91,0,255,255,255,255,255,255,255,255,117,0,97,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,137,0,117,0,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,0,0,255,255,133,0,134,0,135,0,136,0,137,0,255,255,139,0,140,0,141,0,142,0,143,0,13,0,14,0,15,0,16,0,17,0,18,0,255,255,20,0,255,255,255,255,44,0,255,255,255,255,255,255,27,0,28,0,29,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,37,0,38,0,255,255,40,0,41,0,42,0,43,0,44,0,255,255,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,88,0,255,255,255,255,91,0,255,255,255,255,255,255,255,255,117,0,97,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,108,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,117,0,118,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,0,0,255,255,255,255,134,0,135,0,136,0,137,0,255,255,255,255,140,0,141,0,142,0,143,0,13,0,14,0,15,0,16,0,17,0,18,0,255,255,20,0,255,255,255,255,255,255,255,255,255,255,26,0,27,0,28,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,37,0,38,0,255,255,40,0,41,0,42,0,43,0,44,0,255,255,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,88,0,255,255,255,255,91,0,255,255,255,255,255,255,255,255,117,0,97,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,117,0,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,0,0,255,255,133,0,134,0,135,0,136,0,137,0,255,255,139,0,140,0,141,0,142,0,143,0,13,0,14,0,15,0,16,0,17,0,18,0,255,255,20,0,255,255,255,255,255,255,255,255,255,255,255,255,27,0,28,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,37,0,38,0,255,255,40,0,41,0,42,0,43,0,44,0,255,255,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,88,0,255,255,255,255,91,0,255,255,255,255,255,255,255,255,255,255,97,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,117,0,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,0,0,255,255,255,255,134,0,135,0,136,0,137,0,255,255,139,0,140,0,141,0,142,0,143,0,13,0,14,0,15,0,255,255,17,0,18,0,255,255,20,0,255,255,255,255,255,255,255,255,255,255,26,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,37,0,38,0,255,255,40,0,41,0,42,0,43,0,44,0,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,88,0,255,255,90,0,255,255,117,0,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,116,0,117,0,143,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,0,0,255,255,133,0,134,0,135,0,136,0,137,0,255,255,255,255,140,0,255,255,142,0,143,0,13,0,14,0,15,0,255,255,17,0,18,0,255,255,20,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,37,0,38,0,255,255,40,0,41,0,42,0,43,0,44,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,255,255,80,0,81,0,255,255,255,255,255,255,255,255,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,88,0,255,255,90,0,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,116,0,117,0,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,255,255,255,255,255,255,134,0,135,0,136,0,137,0,255,255,255,255,140,0,255,255,142,0,143,0,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,255,255,255,255,18,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,129,0,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,142,0,143,0,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,15,0,255,255,17,0,18,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,129,0,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,142,0,143,0,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,15,0,255,255,255,255,18,0,19,0,20,0,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,129,0,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,142,0,143,0,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,15,0,255,255,255,255,18,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,129,0,130,0,131,0,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,142,0,143,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,46,0,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,129,0,130,0,131,0,255,255,255,255,134,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,142,0,143,0,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,14,0,15,0,255,255,255,255,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,129,0,130,0,131,0,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,142,0,143,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,129,0,130,0,131,0,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,140,0,255,255,142,0,143,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,129,0,130,0,131,0,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,140,0,255,255,142,0,143,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,129,0,130,0,131,0,255,255,255,255,134,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,142,0,143,0,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,15,0,255,255,255,255,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,129,0,130,0,131,0,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,142,0,143,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,129,0,130,0,131,0,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,143,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,129,0,130,0,131,0,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,142,0,143,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,129,0,130,0,131,0,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,143,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,46,0,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,142,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,129,0,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,142,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,255,255,255,255,255,255,255,255,255,255,45,0,46,0,47,0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,138,0,139,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,26,0,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,129,0,130,0,131,0,255,255,133,0,255,255,255,255,255,255,255,255,255,255,139,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,26,0,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,133,0,21,0,22,0,23,0,24,0,255,255,139,0,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,90,0,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,116,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,129,0,130,0,131,0,255,255,19,0,255,255,21,0,22,0,23,0,24,0,139,0,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,139,0,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,129,0,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,139,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,255,255,255,255,255,255,255,255,255,255,45,0,46,0,47,0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,255,255,255,255,255,255,255,255,255,255,255,255,63,0,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,105,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,138,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,255,255,255,255,255,255,255,255,255,255,45,0,46,0,47,0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,255,255,255,255,255,255,255,255,255,255,255,255,63,0,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,105,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,138,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,255,255,255,255,255,255,255,255,255,255,45,0,46,0,47,0,48,0,49,0,50,0,51,0,52,0,255,255,255,255,55,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,101,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,138,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,255,255,255,255,255,255,255,255,255,255,45,0,46,0,47,0,48,0,49,0,50,0,51,0,52,0,255,255,255,255,55,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,138,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,129,0,21,0,22,0,23,0,24,0,255,255,255,255,255,255,137,0,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,129,0,21,0,22,0,23,0,24,0,255,255,255,255,255,255,137,0,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,110,0,255,255,255,255,113,0,114,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,46,0,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,110,0,255,255,255,255,113,0,114,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,110,0,255,255,255,255,113,0,114,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,110,0,255,255,255,255,113,0,114,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,110,0,255,255,255,255,113,0,114,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+10240);
+/* memory initializer */ allocate([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,99,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,86,0,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,129,0,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,129,0,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,129,0,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,129,0,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,129,0,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,129,0,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,255,255,255,255,86,0,87,0,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,51,0,52,0,255,255,255,255,55,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,129,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,98,0,255,255,80,0,81,0,255,255,255,255,255,255,255,255,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,138,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,99,0,123,2,3,1,242,0,242,0,61,1,115,1,242,0,84,2,171,1,235,0,194,0,226,1,5,1,230,0,115,0,115,0,18,2,79,1,104,2,237,1,248,0,248,0,115,0,100,0,248,0,148,1,18,1,230,0,207,2,57,2,114,2,65,1,123,2,0,1,203,1,32,1,208,1,124,1,205,1,55,2,219,2,63,2,23,2,226,2,66,2,247,0,247,0,25,1,29,1,247,0,229,2,82,2,6,3,232,2,24,1,28,1,139,2,42,1,67,0,235,0,67,0,115,0,236,0,83,2,1,3,97,2,64,1,168,2,69,3,120,2,200,2,201,2,120,2,72,3,107,2,55,2,113,1,63,2,162,255,23,1,12,3,101,2,14,3,152,2,139,1,115,0,83,2,130,3,246,2,254,2,143,3,113,1,245,0,250,0,188,254,191,1,251,0,159,255,237,254,1,1,110,1,237,254,244,1,49,254,201,0,201,0,7,1,71,1,72,1,118,1,201,0,173,2,236,0,53,2,49,254,61,2,0,1,181,2,61,2,155,255,83,2,208,0,81,1,14,1,139,1,3,0,233,0,156,255,73,1,162,255,118,1,160,255,46,254,142,2,160,255,53,2,158,255,61,2,117,1,147,1,162,255,188,254,188,254,161,255,11,1,83,2,124,3,158,255,111,1,53,2,170,255,61,2,75,1,174,2,161,255,218,2,189,1,160,1,53,2,14,2,61,2,47,254,143,3,159,255,155,255,155,255,221,2,218,2,255,2,252,0,45,254,130,3,76,1,87,3,107,1,119,1,157,255,104,1,105,1,106,1,46,254,116,1,156,255,114,1,3,3,163,255,14,1,44,254,7,3,255,0,170,255,255,0,168,2,53,2,61,2,171,1,231,0,232,0,114,1,153,2,168,2,156,3,72,3,17,3,121,1,236,2,42,3,237,1,206,2,47,254,231,0,232,0,113,2,232,0,123,2,208,1,42,254,53,2,45,254,61,2,237,253,108,1,109,1,159,255,159,255,119,254,6,3,235,0,207,1,42,1,199,1,163,255,80,1,184,3,159,1,44,254,232,0,194,1,242,0,164,255,242,0,242,0,202,1,168,255,169,1,169,1,1,3,18,1,232,0,236,0,231,0,232,0,180,1,14,3,1,3,236,0,248,0,14,3,248,0,166,255,160,255,160,255,158,255,158,255,42,254,235,0,169,255,152,2,249,2,161,255,161,255,120,3,193,1,10,2,43,254,167,255,208,1,237,253,19,2,2,1,236,0,247,0,29,3,247,0,22,3,120,2,120,2,119,254,165,255,36,3,236,253,54,254,59,1,60,1,127,1,81,0,115,0,81,0,116,0,116,0,129,1,50,254,204,0,204,0,201,0,201,0,214,0,215,2,204,0,204,0,204,0,18,1,80,2,204,0,69,2,71,2,234,254,16,2,236,0,2,1,149,1,150,1,43,254,232,0,190,1,237,1,201,1,201,1,172,1,14,3,175,1,201,1,119,254,227,2,119,254,119,254,138,1,182,1,186,1,54,254,0,2,81,0,47,3,115,0,14,1,33,1,168,255,130,1,131,1,50,254,242,0,166,255,195,1,181,1,183,1,204,0,197,1,63,3,228,2,160,255,12,2,180,1,134,3,234,254,234,254,12,2,59,3,236,253,152,2,33,1,152,2,196,1,242,0,158,3,139,3,18,2,62,2,67,0,144,3,232,0,191,3,122,1,5,2,180,1,158,255,123,1,242,0,231,0,232,0,189,255,91,2,142,1,161,255,146,1,241,2,242,0,151,1,180,1,62,2,103,2,103,2,155,1,204,0,245,2,81,0,138,2,180,1,207,1,14,1,123,2,175,255,157,1,62,2,18,3,240,253,71,1,72,1,201,0,201,0,201,0,201,0,62,2,6,2,7,2,130,2,239,253,160,1,122,2,125,1,126,1,105,3,169,1,169,1,1,2,2,2,3,2,4,2,168,255,99,0,230,0,162,1,46,3,166,255,208,1,237,2,115,2,152,2,126,3,121,3,237,1,188,3,189,1,236,0,236,0,242,0,62,2,166,1,233,253,168,255,137,2,167,1,168,255,170,1,166,255,168,255,180,1,166,255,185,1,207,1,166,255,232,0,92,2,81,1,115,0,190,255,115,0,54,254,156,255,192,1,100,2,62,2,120,2,143,1,157,2,85,2,198,1,157,2,50,254,157,2,204,1,241,1,210,1,81,0,242,1,243,1,148,3,206,1,67,0,164,255,152,2,254,1,152,2,204,0,204,0,255,1,17,2,135,2,124,2,73,2,57,1,152,1,126,2,45,1,46,1,241,2,88,2,129,2,177,2,89,2,233,253,93,2,240,253,238,1,54,254,54,254,185,2,134,2,240,253,116,2,144,1,145,1,125,2,239,253,152,2,50,254,50,254,115,0,146,2,239,253,215,1,216,1,217,1,218,1,190,2,237,1,204,0,169,2,204,0,204,0,242,1,243,1,204,0,204,0,192,2,127,2,128,2,81,0,153,1,154,1,47,1,48,1,81,0,81,0,175,255,233,253,145,2,233,253,233,253,190,2,204,0,237,253,166,2,197,2,132,2,155,2,197,2,177,2,177,2,188,2,160,255,33,1,204,2,159,2,190,2,178,3,161,2,194,2,162,2,165,2,194,2,164,2,3,255,197,2,190,2,179,2,182,2,83,2,183,2,217,2,220,2,168,255,220,2,213,2,208,2,188,2,180,2,194,2,234,2,146,2,220,2,215,1,216,1,217,1,218,1,81,0,204,0,204,0,204,0,204,0,81,0,204,0,204,0,230,0,248,2,204,0,187,1,81,0,33,1,190,2,204,0,12,2,169,1,37,3,218,2,236,0,207,1,114,3,19,2,211,1,253,2,25,3,27,3,116,3,242,2,189,2,193,2,32,3,34,3,235,2,243,2,253,1,31,3,196,2,45,1,46,1,199,2,250,2,204,0,9,3,53,2,253,2,52,1,54,1,56,1,58,1,204,0,204,0,81,1,53,2,2,255,61,2,158,255,144,1,188,1,236,0,45,3,209,2,161,255,24,3,204,0,54,3,81,0,204,0,201,0,30,3,212,1,213,1,58,3,44,1,81,0,45,1,46,1,166,255,204,0,125,3,50,3,201,1,81,0,169,255,205,2,47,1,48,1,204,0,115,0,146,2,60,3,215,1,216,1,217,1,218,1,67,3,44,3,177,2,70,3,73,3,77,3,79,3,201,0,48,3,74,3,102,1,103,1,104,1,105,1,106,1,52,3,97,3,244,2,56,3,81,3,83,3,86,3,48,254,233,2,81,0,88,3,244,254,47,1,48,1,103,2,81,1,100,3,251,2,81,0,146,2,219,1,215,1,216,1,217,1,218,1,89,3,169,1,221,1,253,2,10,3,94,1,95,1,33,1,93,3,33,1,95,3,204,0,19,3,102,3,236,0,1,255,103,3,157,2,157,2,107,3,157,2,236,0,157,2,157,2,117,3,118,3,222,1,123,3,157,2,48,254,48,254,157,2,157,2,244,254,244,254,147,2,131,3,39,3,40,3,81,0,132,3,115,0,236,0,102,1,103,1,104,1,105,1,106,1,127,3,137,3,215,1,216,1,217,1,218,1,140,3,53,3,81,1,0,255,214,1,146,3,215,1,216,1,217,1,218,1,147,3,175,3,149,3,61,3,62,3,157,3,33,1,94,1,95,1,161,3,65,3,165,3,167,3,115,0,201,0,172,3,220,2,183,3,98,0,237,253,98,0,236,253,194,3,131,2,68,3,98,0,98,0,75,3,76,3,120,0,57,3,98,0,98,0,98,0,198,2,219,1,98,0,160,2,212,0,163,2,5,3,220,1,221,1,8,3,101,1,102,1,103,1,104,1,105,1,106,1,233,254,182,3,236,0,247,2,38,3,13,3,159,3,185,3,236,0,248,1,181,3,45,1,46,1,141,3,98,0,170,2,222,1,204,0,81,0,223,1,197,0,104,3,214,1,2,3,215,1,216,1,217,1,218,1,98,0,106,3,138,3,150,3,224,1,115,3,157,2,157,2,157,2,157,2,108,3,157,2,157,2,242,0,135,1,157,2,0,0,157,2,157,2,233,254,233,254,0,0,0,0,204,0,180,1,0,0,91,2,220,2,190,2,0,0,47,1,48,1,130,1,131,1,0,0,219,1,51,1,45,1,46,1,62,2,0,0,220,1,221,1,53,1,45,1,46,1,0,0,98,0,0,0,98,0,151,3,152,3,0,0,55,1,45,1,46,1,0,0,0,0,0,0,157,2,157,2,157,2,157,2,157,2,0,0,153,3,222,1,154,3,0,0,223,1,155,3,157,2,0,0,0,0,214,1,0,0,215,1,216,1,217,1,218,1,81,0,0,0,0,0,0,0,47,1,48,1,232,0,0,0,81,0,0,0,0,0,47,1,48,1,0,0,0,0,33,1,204,0,0,0,0,0,204,0,204,0,47,1,48,1,0,0,0,0,204,0,204,0,238,1,45,1,46,1,0,0,0,0,0,0,81,0,81,0,219,1,0,0,250,1,45,1,46,1,0,0,220,1,221,1,0,0,81,0,251,1,45,1,46,1,0,0,243,0,243,0,81,0,0,0,243,0,204,0,0,0,133,3,98,0,135,3,252,1,45,1,46,1,136,3,81,0,81,0,0,0,222,1,98,0,98,0,223,1,81,0,0,0,142,3,0,0,145,3,47,1,48,1,0,0,8,1,10,1,0,0,0,0,210,2,243,0,243,0,47,1,48,1,81,0,81,0,239,1,0,0,0,0,0,0,47,1,48,1,62,1,63,1,249,1,0,0,0,0,249,1,0,0,249,1,92,3,249,1,0,0,249,1,47,1,48,1,0,0,98,0,0,0,98,0,98,0,0,0,0,0,98,0,98,0,0,0,0,0,204,0,98,0,0,0,0,0,0,0,0,0,98,0,98,0,0,0,0,0,0,0,81,0,81,0,0,0,98,0,0,0,0,0,0,0,0,0,111,3,186,3,0,0,0,0,81,0,187,3,0,0,189,3,0,0,0,0,0,0,0,0,190,3,214,1,0,0,215,1,216,1,217,1,218,1,0,0,0,0,78,3,80,3,81,1,82,3,0,0,84,3,85,3,0,0,0,0,0,0,0,0,90,3,0,0,198,3,94,3,96,3,0,0,94,1,95,1,98,0,98,0,98,0,98,0,98,0,98,0,98,0,98,0,0,0,0,0,98,0,0,0,98,0,0,0,219,1,98,0,0,0,0,0,81,0,0,0,220,1,221,1,0,0,0,0,81,0,0,0,81,0,0,0,0,0,81,0,0,0,0,0,0,0,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,0,0,0,0,98,0,0,0,222,1,0,0,0,0,223,1,0,0,0,0,98,0,98,0,0,0,0,0,146,2,0,0,215,1,216,1,217,1,218,1,204,0,0,0,0,0,0,0,98,0,0,0,98,0,98,0,146,2,0,0,215,1,216,1,217,1,218,1,98,0,0,0,0,0,0,0,98,0,0,0,0,0,0,0,98,0,0,0,0,0,0,0,0,0,98,0,0,0,0,0,0,0,243,0,243,0,243,0,62,1,147,2,66,1,67,1,68,1,69,1,70,1,148,2,0,0,0,0,0,0,243,0,0,0,243,0,243,0,147,2,0,0,160,3,162,3,163,3,164,3,71,3,166,3,168,3,0,0,98,0,171,3,0,0,173,3,174,3,0,0,0,0,0,0,0,0,98,0,0,0,0,0,0,0,78,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,213,0,0,0,0,0,98,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,3,193,3,195,3,196,3,197,3,0,0,0,0,0,0,0,0,0,0,98,0,0,0,199,3,0,0,78,0,0,0,0,0,0,0,0,0,0,0,243,0,0,0,0,0,0,0,0,0,21,2,24,2,25,2,26,2,27,2,28,2,29,2,30,2,31,2,32,2,33,2,34,2,35,2,36,2,37,2,38,2,39,2,40,2,41,2,42,2,43,2,44,2,45,2,46,2,47,2,48,2,49,2,0,0,243,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,70,2,72,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,0,0,0,78,0,0,0,0,0,95,0,0,0,95,0,0,0,0,0,0,0,0,0,94,2,0,0,243,0,0,0,70,2,72,2,0,0,0,0,0,0,0,0,0,0,243,0,0,0,0,0,0,0,98,0,98,0,0,0,243,0,0,0,0,0,0,0,0,0,0,0,243,0,243,0,0,0,0,0,243,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133,2,0,0,98,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,0,0,0,0,0,243,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,0,0,0,0,0,0,0,0,0,0,0,0,0,26,1,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,243,0,94,0,117,0,117,0,117,0,0,0,0,0,0,0,0,0,0,0,216,0,0,0,0,0,95,0,0,0,0,0,0,0,98,0,0,0,0,0,0,0,0,0,0,0,171,2,172,2,98,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,98,0,243,0,0,0,98,0,98,0,0,0,0,0,0,0,0,0,98,0,98,0,0,0,94,0,0,0,0,0,0,0,34,1,98,0,98,0,0,0,78,0,0,0,0,0,0,0,0,0,78,0,78,0,0,0,98,0,0,0,0,0,0,0,0,0,0,0,0,0,98,0,0,0,0,0,98,0,0,0,34,1,0,0,0,0,0,0,0,0,0,0,0,0,98,0,98,0,0,0,0,0,0,0,0,0,0,0,98,0,97,0,0,0,97,0,118,0,118,0,0,0,0,0,0,0,0,0,0,0,0,0,217,0,0,0,95,0,0,0,0,0,98,0,98,0,0,0,0,0,94,0,0,0,0,0,78,0,0,0,0,0,243,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,0,0,0,0,20,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,0,0,0,0,98,0,35,1,0,0,0,0,0,0,0,0,243,0,0,0,0,0,243,0,0,0,98,0,98,0,0,0,0,0,243,0,243,0,0,0,0,0,0,0,0,0,0,0,0,0,98,0,0,0,35,1,0,0,0,0,95,0,0,0,0,0,0,0,0,0,95,0,95,0,0,0,0,0,0,0,163,1,164,1,165,1,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,0,0,94,0,97,0,0,0,0,0,0,0,0,0,0,0,0,0,243,0,0,0,0,0,0,0,94,2,23,3,0,0,26,3,28,3,0,0,98,0,0,0,0,0,33,3,35,3,0,0,98,0,0,0,98,0,95,0,0,0,98,0,0,0,41,3,95,0,0,0,0,0,78,0,0,0,0,0,0,0,95,0,0,0,0,0,0,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,3,28,3,0,0,33,3,35,3,0,0,0,0,0,0,98,0,0,0,0,0,94,0,243,0,0,0,0,0,243,0,94,0,94,0,0,0,11,2,0,0,0,0,0,0,0,0,22,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,1,97,0,78,0,0,0,0,0,0,0,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,95,0,0,0,0,0,243,0,0,0,0,0,0,0,99,3,95,0,0,0,0,0,0,0,0,0,0,0,101,3,0,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,34,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,101,3,0,0,0,0,95,0,0,0,0,0,0,0,0,0,243,0,97,0,0,0,0,0,95,0,22,2,97,0,97,0,0,0,0,0,0,0,117,2,119,2,0,0,0,0,26,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,1,0,0,0,0,0,0,0,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,119,2,94,0,0,0,26,1,0,0,0,0,95,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,97,0,0,0,0,0,0,0,0,0,97,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,35,1,0,0,0,0,0,0,158,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,0,0,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,2,0,0,0,0,34,1,0,0,34,1,0,0,0,0,0,0,0,0,0,0,78,0,0,0,0,0,0,0,0,0,97,0,0,0,0,0,78,0,0,0,0,0,0,0,0,0,97,0,0,0,0,0,20,2,0,0,0,0,0,0,0,0,97,0,95,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,0,0,0,0,0,0,34,1,0,0,0,0,97,0,0,0,0,0,0,0,0,0,78,0,78,0,0,0,0,0,97,0,0,0,214,2,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,1,0,0,35,1,0,0,0,0,0,0,78,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,238,2,0,0,0,0,240,2,0,0,0,0,0,0,0,0,0,0,119,2,26,1,0,0,0,0,0,0,95,0,97,0,0,0,0,0,0,0,94,0,0,0,0,0,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,110,3,0,0,0,0,0,0,78,0,35,1,95,0,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,95,0,0,0,0,0,21,3,0,0,0,0,0,0,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,95,0,95,0,0,0,0,0,0,0,0,0,0,0,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,0,0,95,0,95,0,0,0,0,0,78,0,0,0,78,0,97,0,94,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,64,3,0,0,0,0,66,3,0,0,0,0,34,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,94,0,0,0,95,0,95,0,0,0,213,253,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,95,0,98,3,0,0,94,0,213,253,213,253,213,253,213,253,213,253,213,253,0,0,213,253,0,0,0,0,0,0,94,0,94], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+20480);
+/* memory initializer */ allocate([213,253,213,253,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,213,253,213,253,0,0,213,253,213,253,213,253,213,253,213,253,0,0,0,0,0,0,94,0,94,0,97,0,0,0,0,0,0,0,0,0,0,0,0,0,26,1,97,0,0,0,0,0,0,0,0,0,95,0,117,0,35,1,0,0,0,0,0,0,95,0,0,0,95,0,0,0,0,0,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,97,0,0,0,0,0,0,0,213,253,0,0,0,0,0,0,94,0,94,0,97,0,0,0,0,0,0,0,0,0,0,0,112,3,97,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,97,0,0,0,0,0,0,0,0,0,0,0,97,0,0,0,0,0,0,0,0,0,0,0,50,2,51,2,0,0,0,0,52,2,0,0,0,0,213,253,213,253,0,0,213,253,97,0,97,0,255,0,213,253,0,0,213,253,213,253,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,118,0,0,0,173,0,174,0,0,0,94,0,175,0,176,0,177,0,178,0,0,0,94,0,0,0,94,0,0,0,0,0,94,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,97,0,0,0,0,0,0,0,0,0,0,0,0,0,113,3,0,0,0,0,0,0,97,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,0,0,0,0,0,0,0,0,0,0,97,0,0,0,97,0,213,253,4,0,97,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,29,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,234,254,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,234,254,234,254,234,254,234,254,234,254,234,254,0,0,234,254,0,0,0,0,202,2,0,0,0,0,0,0,234,254,234,254,234,254,0,0,0,0,61,0,62,0,63,0,0,0,0,0,234,254,234,254,0,0,234,254,234,254,234,254,234,254,234,254,213,253,213,253,0,0,0,0,0,0,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,89,1,90,1,91,1,92,1,93,1,0,0,0,0,94,1,95,1,0,0,0,0,0,0,0,0,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,0,0,0,0,234,254,234,254,234,254,0,0,225,2,234,254,0,0,0,0,0,0,0,0,96,1,234,254,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,234,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,157,255,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,0,0,0,0,120,254,0,0,0,0,234,254,234,254,234,254,234,254,0,0,0,0,234,254,234,254,234,254,234,254,120,254,120,254,120,254,120,254,120,254,120,254,0,0,120,254,0,0,0,0,184,2,0,0,0,0,120,254,120,254,120,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,120,254,120,254,0,0,120,254,120,254,120,254,120,254,120,254,0,0,0,0,0,0,0,0,0,0,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,89,1,90,1,91,1,92,1,93,1,0,0,0,0,94,1,95,1,0,0,0,0,0,0,0,0,120,254,120,254,120,254,120,254,120,254,120,254,120,254,120,254,120,254,120,254,120,254,120,254,120,254,0,0,0,0,120,254,120,254,120,254,0,0,0,0,120,254,0,0,0,0,0,0,0,0,96,1,120,254,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,255,120,254,0,0,120,254,120,254,120,254,120,254,120,254,120,254,120,254,120,254,120,254,120,254,0,0,0,0,243,254,0,0,120,254,120,254,120,254,120,254,120,254,0,0,255,0,120,254,120,254,120,254,120,254,243,254,243,254,243,254,243,254,243,254,243,254,0,0,243,254,0,0,0,0,184,2,0,0,0,0,0,0,243,254,243,254,243,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,254,243,254,0,0,243,254,243,254,243,254,243,254,243,254,0,0,0,0,0,0,0,0,0,0,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,89,1,90,1,91,1,92,1,93,1,0,0,0,0,94,1,95,1,0,0,0,0,0,0,0,0,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,0,0,0,0,243,254,243,254,243,254,0,0,0,0,243,254,0,0,0,0,0,0,0,0,96,1,243,254,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,243,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,0,0,0,0,213,253,0,0,0,0,243,254,243,254,243,254,243,254,0,0,0,0,243,254,243,254,243,254,243,254,213,253,213,253,213,253,213,253,213,253,213,253,0,0,213,253,0,0,0,0,0,0,0,0,0,0,213,253,213,253,213,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,213,253,213,253,0,0,213,253,213,253,213,253,213,253,213,253,0,0,0,0,0,0,0,0,0,0,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,89,1,90,1,91,1,92,1,93,1,0,0,0,0,94,1,95,1,0,0,0,0,0,0,0,0,213,253,213,253,213,253,213,253,213,253,213,253,213,253,213,253,213,253,213,253,213,253,213,253,213,253,0,0,0,0,213,253,213,253,213,253,0,0,0,0,213,253,0,0,0,0,0,0,0,0,96,1,213,253,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,213,253,0,0,213,253,213,253,213,253,213,253,213,253,213,253,213,253,213,253,213,253,213,253,0,0,0,0,227,254,0,0,213,253,213,253,213,253,213,253,213,253,0,0,255,0,213,253,213,253,213,253,213,253,227,254,227,254,227,254,227,254,227,254,227,254,0,0,227,254,0,0,0,0,0,0,0,0,0,0,0,0,227,254,227,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,254,227,254,0,0,227,254,227,254,227,254,227,254,227,254,0,0,0,0,0,0,0,0,0,0,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,89,1,90,1,91,1,212,253,212,253,0,0,0,0,94,1,95,1,0,0,0,0,0,0,0,0,227,254,227,254,227,254,227,254,227,254,227,254,227,254,227,254,227,254,227,254,227,254,227,254,227,254,0,0,0,0,227,254,227,254,227,254,0,0,0,0,227,254,0,0,0,0,0,0,0,0,0,0,227,254,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,254,0,0,227,254,227,254,227,254,227,254,227,254,227,254,227,254,227,254,227,254,227,254,0,0,0,0,233,253,0,0,0,0,227,254,227,254,227,254,227,254,0,0,252,0,227,254,227,254,227,254,227,254,233,253,233,253,233,253,0,0,233,253,233,253,0,0,233,253,0,0,0,0,0,0,0,0,0,0,233,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,253,233,253,0,0,233,253,233,253,233,253,233,253,233,253,0,0,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,89,1,90,1,91,1,92,1,93,1,0,0,0,0,94,1,95,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,253,233,253,233,253,233,253,233,253,233,253,233,253,233,253,233,253,233,253,233,253,233,253,233,253,0,0,0,0,233,253,233,253,233,253,0,0,186,2,0,0,96,1,0,0,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,159,255,233,253,232,0,233,253,233,253,233,253,233,253,233,253,233,253,233,253,233,253,233,253,233,253,0,0,0,0,234,254,0,0,233,253,233,253,233,253,233,253,167,255,0,0,0,0,233,253,0,0,233,253,233,253,234,254,234,254,234,254,0,0,234,254,234,254,0,0,234,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,234,254,234,254,0,0,234,254,234,254,234,254,234,254,234,254,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,0,0,90,1,91,1,0,0,0,0,0,0,0,0,94,1,95,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,0,0,0,0,234,254,234,254,234,254,0,0,187,2,0,0,0,0,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,157,255,234,254,0,0,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,0,0,0,0,0,0,0,0,0,0,234,254,234,254,234,254,165,255,0,0,0,0,234,254,0,0,234,254,234,254,12,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,213,253,213,253,213,253,0,0,0,0,213,253,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,61,0,62,0,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,213,253,213,253,12,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,213,253,0,0,213,253,213,253,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,61,0,62,0,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,213,253,213,253,12,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,213,253,0,0,0,0,213,253,15,0,213,253,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,61,0,62,0,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,213,253,213,253,12,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,213,253,0,0,0,0,213,253,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,61,0,62,0,63,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,213,253,213,253,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,29,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,61,0,62,0,63,0,0,0,0,0,213,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,213,253,213,253,12,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,213,253,213,253,0,0,0,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,12,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,61,0,62,0,63,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,213,253,213,253,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,13,1,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,12,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,61,0,62,0,63,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,213,253,0,0,213,253,213,253,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,12,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,61,0,62,0,63,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,213,253,0,0,213,253,213,253,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,61,0,62,0,63,0,0,0,0,0,213,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,213,253,213,253,12,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,213,253,0,0,0,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,61,0,62,0,63,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,213,253,213,253,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,238,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,239,0,240,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,61,0,241,0,63,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,232,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,61,0,62,0,63,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,231,0,232,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,61,0,62,0,63,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,232,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,29,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,0,0,61,0,62,0,63,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,162,1,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,61,0,62,0,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,162,1,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0,131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143,0,144,0,0,0,0,0,0,0,145,0,146,0,147,0,148,0,149,0,150,0,151,0,152,0,153,0,154,0,0,0,0,0,0,0,0,0,0,0,155,0,156,0,157,0,158,0,159,0,160,0,161,0,162,0,35,0,36,0,163,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,193,0,240,253,240,253,240,253,240,253,240,253,240,253,240,253,240,253,240,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,253,0,0,240,253,240,253,240,253,240,253,0,0,240,253,0,0,0,0,0,0,240,253,240,253,240,253,240,253,240,253,240,253,240,253,0,0,0,0,240,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,253,240,253,0,0,240,253,240,253,240,253,240,253,240,253,240,253,240,253,240,253,240,253,240,253,0,0,0,0,240,253,0,0,0,0,240,253,240,253,0,0,240,253,240,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,253,0,0,0,0,240,253,240,253,0,0,240,253,240,253,0,0,240,253,240,253,240,253,240,253,240,253,240,253,240,253,240,253,240,253,0,0,0,0,240,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,253,240,253,240,253,0,0,240,253,0,0,0,0,0,0,0,0,0,0,240,253,239,253,239,253,239,253,239,253,239,253,239,253,239,253,239,253,239,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,239,253,0,0,239,253,239,253,239,253,239,253,0,0,239,253,0,0,0,0,0,0,239,253,239,253,239,253,239,253,239,253,239,253,239,253,0,0,0,0,239,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,239,253,239,253,0,0,239,253,239,253,239,253,239,253,239,253,239,253,239,253,239,253,239,253,239,253,0,0,0,0,239,253,0,0,0,0,239,253,239,253,0,0,239,253,239,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,239,253,0,0,0,0,239,253,239,253,0,0,239,253,239,253,0,0,239,253,239,253,239,253,239,253,239,253,239,253,239,253,239,253,239,253,0,0,0,0,239,253,0,0,0,0,0,0,0,0,0,0,0,0,237,253,237,253,237,253,237,253,237,253,237,253,237,253,237,253,237,253,0,0,0,0,0,0,0,0,239,253,239,253,239,253,237,253,239,253,237,253,237,253,237,253,237,253,0,0,239,253,0,0,0,0,0,0,237,253,237,253,237,253,237,253,237,253,237,253,237,253,0,0,0,0,237,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,237,253,237,253,0,0,237,253,237,253,237,253,237,253,237,253,237,253,237,253,237,253,237,253,237,253,0,0,0,0,237,253,0,0,0,0,237,253,237,253,0,0,237,253,237,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,237,253,224,2,0,0,237,253,237,253,0,0,237,253,237,253,0,0,237,253,237,253,237,253,237,253,237,253,237,253,237,253,237,253,237,253,0,0,0,0,237,253,0,0,0,0,0,0,0,0,0,0,0,0,159,255,235,253,235,253,235,253,235,253,235,253,235,253,235,253,235,253,235,253,0,0,0,0,0,0,237,253,237,253,237,253,0,0,235,253,0,0,235,253,235,253,235,253,235,253,237,253,0,0,0,0,0,0,0,0,235,253,235,253,235,253,235,253,235,253,235,253,235,253,0,0,0,0,235,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,235,253,235,253,0,0,235,253,235,253,235,253,235,253,235,253,235,253,235,253,235,253,235,253,235,253,0,0,0,0,235,253,0,0,0,0,235,253,235,253,0,0,235,253,235,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,235,253,0,0,0,0,235,253,235,253,0,0,235,253,235,253,0,0,235,253,235,253,235,253,235,253,235,253,235,253,235,253,235,253,235,253,0,0,0,0,235,253,0,0,0,0,0,0,0,0,0,0,0,0,234,253,234,253,234,253,234,253,234,253,234,253,234,253,234,253,234,253,0,0,0,0,0,0,0,0,235,253,235,253,235,253,234,253,0,0,234,253,234,253,234,253,234,253,0,0,235,253,0,0,0,0,0,0,234,253,234,253,234,253,234,253,234,253,234,253,234,253,0,0,0,0,234,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,234,253,234,253,0,0,234,253,234,253,234,253,234,253,234,253,234,253,234,253,234,253,234,253,234,253,0,0,0,0,234,253,0,0,0,0,234,253,234,253,0,0,234,253,234,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,234,253,0,0,0,0,234,253,234,253,0,0,234,253,234,253,0,0,234,253,234,253,234,253,234,253,234,253,234,253,234,253,234,253,234,253,0,0,0,0,234,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,234,253,234,253,234,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,234,253,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0,131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143,0,144,0,0,0,0,0,0,0,145,0,146,0,147,0,218,0,219,0,220,0,221,0,152,0,153,0,154,0,0,0,0,0,0,0,0,0,0,0,155,0,156,0,157,0,222,0,223,0,160,0,224,0,162,0,37,1,38,1,225,0,39,1,0,0,0,0,0,0,0,0,0,0,0,0,40,1,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,41,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0,131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143,0,144,0,0,0,0,0,0,0,145,0,146,0,147,0,218,0,219,0,220,0,221,0,152,0,153,0,154,0,0,0,0,0,0,0,0,0,0,0,155,0,156,0,157,0,222,0,223,0,160,0,224,0,162,0,37,1,38,1,225,0,39,1,0,0,0,0,0,0,0,0,0,0,0,0,40,1,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,156,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0,131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143,0,144,0,0,0,0,0,0,0,145,0,146,0,147,0,218,0,219,0,220,0,221,0,152,0,153,0,154,0,0,0,0,0,0,0,0,0,0,0,155,0,156,0,157,0,222,0,223,0,160,0,224,0,162,0,0,0,0,0,225,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0,131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143,0,144,0,0,0,0,0,0,0,145,0,146,0,147,0,218,0,219,0,220,0,221,0,152,0,153,0,154,0,0,0,0,0,0,0,0,0,0,0,155,0,156,0,157,0,222,0,223,0,160,0,224,0,162,0,0,0,0,0,225,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,1,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,112,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,31,1,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,1,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,112,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,15,2,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,238,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,118,2,240,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,241,1,0,0,0,0,242,1,243,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,29,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,62,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,238,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,118,2,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,241,1,0,0,0,0,242,1,243,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,62,0,63], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+30720);
+/* memory initializer */ allocate([15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,239,2,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,241,1,0,0,0,0,242,1,243,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,20,3,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,241,1,0,0,0,0,242,1,243,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,118,2,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,241,1,0,0,0,0,242,1,243,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,238,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,239,0,240,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,238,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,239,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,238,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,240,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,238,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,9,2,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,239,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,9,2,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,62,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,107,0,34,0,35,0,36,0,108,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,109,0,0,0,0,0,110,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,112,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,211,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,112,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,1,0,0,0,0,77,1,49,0,0,0,50,0,51,0,0,0,78,1,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,112,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,107,0,34,0,35,0,36,0,108,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,110,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,112,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,1,0,0,0,0,77,1,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,112,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,91,3,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,112,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,81,1,212,253,212,253,212,253,212,253,86,1,87,1,0,0,0,0,212,253,212,253,0,0,0,0,0,0,0,0,94,1,95,1,0,0,0,0,0,0,109,3,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,58,2,59,2,0,0,0,0,60,2,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,0,0,0,0,112,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,78,2,51,2,0,0,0,0,79,2,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,64,2,59,2,0,0,0,0,65,2,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,95,2,51,2,0,0,0,0,96,2,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,98,2,59,2,0,0,0,0,99,2,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,105,2,51,2,0,0,0,0,106,2,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,108,2,59,2,0,0,0,0,109,2,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,140,2,51,2,0,0,0,0,141,2,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,143,2,59,2,0,0,0,0,144,2,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,169,3,51,2,0,0,0,0,170,3,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,176,3,51,2,0,0,0,0,177,3,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,179,3,59,2,0,0,0,0,180,3,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,64,2,59,2,0,0,0,0,65,2,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,81,1,82,1,83,1,84,1,85,1,86,1,87,1,179,0,0,0,90,1,91,1,0,0,0,0,0,0,0,0,94,1,95,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,14,1,0,0,0,0,40,1,43,1,0,0,0,0,28,2,64,1,65,1,66,1,67,1,26,1,248,0,248,0,210,1,209,1,211,1,212,1,30,2,0,0,10,0,0,0,214,1,213,1,202,1,18,2,204,1,203,1,206,1,205,1,198,1,199,1,158,1,159,1,215,1,216,1,0,0,0,0,0,0,0,0,16,1,43,2,43,2,78,0,35,1,0,0,0,0,0,0,0,0,0,0,0,0,173,1,0,0,0,0,0,0,3,0,28,2,6,0,9,0,27,0,39,0,42,0,50,0,49,0,0,0,66,0,0,0,70,0,80,0,0,0,47,0,229,0,0,0,51,0,33,1,6,1,7,1,8,1,9,1,10,1,156,1,155,1,187,1,157,1,154,1,208,1,0,0,11,1,12,1,248,0,5,0,8,0,64,1,65,1,26,1,29,1,136,1,0,0,102,0,103,0,0,0,0,0,0,0,0,0,105,0,217,1,68,1,0,0,208,1,12,1,0,0,56,1,156,0,166,0,157,0,153,0,182,0,183,0,184,0,185,0,164,0,179,0,172,0,162,0,161,0,177,0,160,0,159,0,155,0,180,0,154,0,167,0,171,0,173,0,165,0,158,0,174,0,181,0,176,0,175,0,168,0,178,0,163,0,152,0,170,0,169,0,151,0,149,0,150,0,146,0,147,0,148,0,107,0,109,0,108,0,141,0,142,0,138,0,120,0,121,0,122,0,129,0,126,0,128,0,123,0,124,0,143,0,144,0,130,0,131,0,135,0,125,0,127,0,117,0,118,0,119,0,132,0,133,0,134,0,136,0,137,0,139,0,140,0,145,0,8,2,58,1,110,0,111,0,7,2,0,0,0,0,0,0,48,0,0,0,0,0,0,0,208,1,0,0,12,1,0,0,0,0,0,0,0,0,79,1,78,1,0,0,0,0,208,1,12,1,175,0,168,0,178,0,163,0,146,0,147,0,107,0,108,0,0,0,112,0,114,0,20,0,113,0,37,2,39,2,28,2,0,0,41,2,38,2,29,2,0,0,0,0,0,0,0,0,243,0,230,0,253,0,64,0,247,0,43,2,43,2,12,2,65,0,63,0,30,2,62,0,0,0,43,2,135,1,61,0,30,2,0,0,31,2,18,0,0,0,0,0,207,0,0,0,208,0,23,1,0,0,0,0,0,0,28,2,15,0,30,2,68,0,14,0,0,0,30,2,0,0,34,2,34,2,231,0,0,0,0,0,34,2,10,2,0,0,0,0,76,0,0,0,86,0,93,0,236,1,192,1,191,1,193,1,194,1,0,0,190,1,189,1,171,1,165,1,164,1,167,1,0,0,0,0,162,1,185,1,0,0,196,1,0,0,160,1,0,0,169,1,0,0,200,1,201,1,46,0,222,0,223,0,4,0,29,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,123,1,125,1,0,0,82,0,0,0,74,0,71,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,2,0,0,27,2,26,2,0,0,140,1,138,1,34,1,0,0,0,0,129,1,55,0,32,1,53,1,102,0,103,0,104,0,200,1,201,1,218,1,51,1,0,0,43,2,0,0,0,0,0,0,59,1,61,1,0,0,43,2,23,1,70,1,0,0,69,1,0,0,0,0,43,2,0,0,0,0,0,0,0,0,0,0,0,0,23,1,0,0,43,2,0,0,48,1,0,0,115,0,174,1,0,0,0,0,0,0,42,2,15,2,254,0,250,0,0,0,0,0,244,0,252,0,0,0,245,0,30,2,0,0,28,1,249,0,30,2,239,0,43,2,43,2,238,0,30,2,31,1,45,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,30,2,21,1,13,0,29,2,67,0,17,1,20,1,24,1,36,2,232,0,35,2,36,2,234,0,25,1,11,2,92,0,84,0,0,0,79,0,0,0,0,0,43,2,0,0,242,1,239,1,238,1,237,1,240,1,0,0,255,1,3,2,2,2,254,1,236,1,36,1,120,1,241,1,243,1,245,1,43,2,0,0,252,1,43,2,1,2,43,2,0,0,235,1,195,1,0,0,0,0,178,1,183,1,182,1,168,1,176,1,0,0,180,1,172,1,163,1,186,1,197,1,161,1,170,1,0,0,0,0,7,0,21,0,22,0,23,0,24,0,25,0,43,0,44,0,43,2,0,0,28,0,37,0,0,0,38,0,30,2,0,0,72,0,83,0,41,0,40,0,0,0,186,0,253,0,36,0,204,0,212,0,217,0,218,0,219,0,214,0,216,0,226,0,227,0,220,0,221,0,197,0,198,0,224,0,225,0,30,2,213,0,215,0,209,0,210,0,211,0,199,0,200,0,201,0,202,0,203,0,19,2,24,2,20,2,25,2,134,1,248,0,132,1,30,2,19,2,21,2,20,2,22,2,133,1,248,0,19,2,20,2,248,0,43,2,43,2,29,0,188,0,35,0,196,0,53,0,56,0,0,0,0,0,0,0,102,0,103,0,106,0,0,0,30,2,43,2,0,0,30,2,236,1,0,0,15,1,43,2,43,2,146,1,43,2,71,1,186,0,23,2,20,2,30,2,19,2,20,2,43,2,73,1,41,1,72,1,44,1,23,2,22,1,30,2,19,2,20,2,0,0,0,0,40,2,175,1,0,0,0,0,47,1,14,2,0,0,255,0,251,0,0,0,43,2,13,2,27,1,32,2,235,0,240,0,242,0,30,1,19,0,0,0,26,0,195,0,69,0,16,0,30,2,34,2,85,0,77,0,89,0,91,0,30,2,19,2,20,2,247,1,242,1,0,0,91,1,82,1,84,1,30,2,80,1,30,2,0,0,0,0,228,1,6,2,248,1,0,0,231,1,0,2,0,0,233,1,4,2,188,1,0,0,0,0,177,1,179,1,181,1,205,0,206,0,111,1,30,2,0,0,109,1,108,1,5,1,0,0,81,0,75,0,0,0,0,0,0,0,0,0,0,0,0,0,131,1,59,0,0,0,137,1,0,0,0,0,237,0,130,1,57,0,236,0,126,1,52,0,0,0,0,0,0,0,43,2,54,1,0,0,0,0,137,1,57,1,9,2,236,1,0,0,0,0,62,1,147,1,148,1,43,2,149,1,0,0,43,2,76,1,0,0,0,0,74,1,0,0,0,0,137,1,0,0,0,0,0,0,0,0,0,0,137,1,0,0,116,0,46,1,0,0,0,0,0,1,0,0,1,1,246,0,43,2,11,0,18,1,233,0,87,0,30,2,0,0,89,1,0,0,244,1,0,0,113,1,0,0,0,0,37,1,246,1,43,2,43,2,5,2,43,2,253,1,43,2,43,2,166,1,0,0,30,2,0,0,43,2,0,0,250,1,43,2,43,2,107,1,0,0,0,0,3,1,73,0,187,0,0,0,34,0,193,0,33,0,194,0,60,0,33,2,0,0,31,0,191,0,32,0,192,0,58,0,127,1,128,1,0,0,0,0,189,0,0,0,0,0,219,1,52,1,30,2,0,0,221,1,236,1,0,0,0,0,151,1,77,1,0,0,12,0,153,1,0,0,38,1,0,0,39,1,0,0,0,0,49,1,255,0,43,2,2,1,241,0,81,1,92,1,0,0,87,1,83,1,119,1,0,0,0,0,0,0,0,0,224,1,0,0,226,1,0,0,232,1,0,0,229,1,234,1,184,1,0,0,110,1,98,1,100,1,0,0,249,1,0,0,103,1,0,0,105,1,124,1,4,1,228,0,30,0,190,0,141,1,139,1,0,0,0,0,220,1,60,1,0,0,0,0,150,1,0,0,94,0,101,0,0,0,152,1,0,0,42,1,45,1,0,0,143,1,144,1,142,1,0,0,90,1,0,0,85,1,117,1,30,2,115,1,118,1,122,1,121,1,43,2,43,2,43,2,43,2,112,1,43,2,43,2,23,1,0,0,43,2,251,1,43,2,43,2,54,0,55,1,0,0,100,0,0,0,43,2,0,0,43,2,43,2,0,0,88,1,0,0,0,0,114,1,225,1,0,0,222,1,227,1,230,1,0,0,95,1,0,0,97,1,23,2,22,1,104,1,0,0,101,1,106,1,63,1,23,2,99,0,30,2,19,2,20,2,145,1,75,1,50,1,86,1,116,1,43,2,43,2,43,2,43,2,43,2,137,1,223,1,96,1,0,0,93,1,99,1,102,1,43,2,94,1,0,0,144,0,146,0,145,0,147,0,148,0,148,0,148,0,148,0,149,0,150,0,149,0,151,0,152,0,153,0,153,0,153,0,153,0,155,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,156,0,156,0,157,0,157,0,157,0,157,0,157,0,157,0,158,0,159,0,159,0,160,0,160,0,162,0,161,0,163,0,163,0,163,0,163,0,163,0,163,0,163,0,163,0,163,0,163,0,163,0,164,0,164,0,165,0,165,0,166,0,166,0,166,0,166,0,166,0,166,0,166,0,166,0,166,0,166,0,167,0,167,0,168,0,168,0,169,0,169,0,170,0,170,0,170,0,170,0,170,0,170,0,170,0,170,0,171,0,171,0,171,0,171,0,171,0,171,0,171,0,171,0,172,0,172,0,173,0,173,0,173,0,174,0,174,0,174,0,174,0,174,0,175,0,175,0,176,0,177,0,176,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,181,0,182,0,182,0,182,0,182,0,183,0,184,0,184,0,185,0,185,0,185,0,185,0,185,0,186,0,186,0,186,0,186,0,186,0,188,0,187,0,189,0,190,0,190,0,191,0,191,0,191,0,191,0,191,0,191,0,192,0,192,0,192,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,194,0,193,0,195,0,196,0,193,0,197,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,198,0,199,0,193,0,193,0,193,0,200,0,201,0,193,0,202,0,203,0,193,0,193,0,193,0,204,0,205,0,193,0,206,0,193,0,207,0,208,0,193,0,209,0,193,0,210,0,211,0,193,0,212,0,213,0,193,0,193,0,193,0,193,0,193,0,214,0,215,0,215,0,215,0,216,0,216,0,217,0,217,0,218,0,218,0,219,0,219,0,220,0,220,0,221,0,221,0,222,0,222,0,222,0,222,0,222,0,222,0,222,0,222,0,222,0,223,0,223,0,223,0,223,0,223,0,223,0,223,0,223,0,223,0,223,0,223,0,223,0,223,0,223,0,223,0,224,0,224,0,225,0,225,0,225,0,226,0,226,0,227,0,227,0,228,0,228,0,229,0,229,0,230,0,230,0,232,0,231,0,233,0,233,0,233,0,233,0,234,0,234,0,234,0,234,0,234,0,234,0,234,0,234,0,234,0,236,0,235,0,237,0,235,0,238,0,239,0,239,0,240,0,240,0,241,0,241,0,241,0,242,0,242,0,243,0,243,0,244,0,244,0,244,0,244,0,245,0,245,0,245,0,245,0,246,0,246,0,247,0,248,0,247,0,247,0,247,0,249,0,249,0,250,0,250,0,251,0,252,0,252,0,253,0,253,0,254,0,254,0,255,0,255,0,0,1,1,1,0,1,2,1,2,1,3,1,3,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,12,1,13,1,12,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,17,1,17,1,18,1,18,1,19,1,19,1,20,1,21,1,22,1,23,1,23,1,24,1,24,1,25,1,25,1,26,1,26,1,27,1,27,1,28,1,29,1,29,1,30,1,31,1,30,1,32,1,32,1,33,1,33,1,34,1,34,1,35,1,35,1,35,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,38,1,38,1,39,1,39,1,40,1,40,1,41,1,42,1,43,1,43,1,43,1,44,1,44,1,46,1,45,1,47,1,47,1,48,1,253,252,253,252,253,252,141,1,253,252,20,0,253,252,132,254,76,0,253,252,57,0,253,252,193,254,96,0,112,0,199,255,253,252,94,254,253,252,243,255,72,3,83,255,235,255,198,255,6,255,103,254,240,255,3,5,184,255,70,3,4,0,241,255,253,252,253,252,7,255,253,252,238,3,150,5,253,252,12,0,15,1,178,254,77,0,78,0,253,252,159,254,17,255,30,0,219,254,10,0,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,38,1,74,255,125,254,200,255,207,253,253,252,80,253,77,253,209,0,253,252,4,254,253,252,163,253,253,252,202,255,253,252,253,252,158,0,253,252,253,252,253,252,179,255,253,252,253,252,128,254,253,252,210,255,253,252,253,252,253,252,253,252,253,252,94,2,253,2,253,252,253,252,253,252,253,252,253,252,55,255,80,254,253,252,122,1,253,252,253,252,253,252,0,0,253,252,253,252,253,252,210,5,115,5,110,3,43,6,253,252,253,252,86,0,232,254,14,253,121,254,166,253,184,0,165,253,150,253,254,252,38,0,221,0,253,252,30,254,253,252,240,254,107,1,253,252,253,252,253,252,5,0,87,254,63,3,189,254,253,252,197,2,2,0,231,255,80,0,203,253,11,255,251,255,48,0,253,252,223,255,254,255,255,255,1,0,2,0,64,0,65,0,66,0,6,1,136,1,137,1,15,1,16,1,184,1,68,0,69,0,202,0,70,0,71,0,74,2,203,2,72,0,73,0,17,1,74,0,75,0,76,0,209,1,77,0,203,0,113,0,114,0,227,0,228,0,229,0,111,2,195,0,196,0,79,0,244,0,22,1,54,2,195,2,176,1,177,1,253,0,254,0,246,0,168,1,178,1,13,2,80,0,199,0,20,1,136,2,21,1,36,1,154,2,209,0,230,2,210,0,231,2,110,2,119,3,77,2,75,2,43,3,132,1,134,1,86,2,87,2,49,3,9,1,140,1,102,2,222,2,223,2,215,0,149,2,150,2,151,2,11,3,175,2,176,2,252,2,128,3,129,3,225,1,0,3,74,1,8,2,82,0,83,0,120,1,68,2,67,2,161,1,122,3,90,2,216,2,51,3,55,3,84,0,85,0,49,1,50,1,240,1,86,0,87,0,88,0,112,2,121,2,245,1,246,1,247,1,167,2,89,0,90,0,91,0,43,1,92,0,93,0,205,0,206,0,96,0,207,0,128,1,76,2,211,2,212,2,227,1,228,1,229,1,230,1,231,1,232,1,15,3,16,3,233,1,234,1,235,1,236,1,4,3,156,2,198,0,133,1,27,1,179,1,249,0,119,0,81,2], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+40960);
+/* memory initializer */ allocate([56,2,112,1,234,0,173,1,174,1,191,2,200,1,141,1,4,1,158,1,237,0,19,1,0,0,145,0,146,0,0,0,1,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,19,0,21,0,22,0,23,0,24,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,39,0,45,0,46,0,47,0,48,0,49,0,51,0,52,0,53,0,54,0,55,0,56,0,58,0,59,0,60,0,63,0,66,0,67,0,69,0,70,0,89,0,92,0,93,0,95,0,96,0,98,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,109,0,129,0,130,0,131,0,147,0,148,0,149,0,154,0,156,0,157,0,159,0,160,0,163,0,164,0,166,0,167,0,168,0,170,0,171,0,180,0,193,0,214,0,233,0,234,0,244,0,245,0,249,0,250,0,251,0,2,1,3,1,4,1,6,1,7,1,8,1,9,1,10,1,11,1,35,1,48,1,149,0,21,0,22,0,30,0,31,0,32,0,39,0,51,0,55,0,86,0,89,0,92,0,129,0,172,0,173,0,193,0,214,0,8,1,11,1,35,1,173,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,45,0,46,0,47,0,48,0,49,0,50,0,51,0,52,0,55,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,80,0,81,0,84,0,85,0,86,0,87,0,98,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,130,0,131,0,138,0,139,0,174,0,178,0,179,0,10,1,30,1,194,0,89,0,157,0,158,0,171,0,214,0,8,1,9,1,11,1,158,0,200,0,202,0,89,0,164,0,171,0,214,0,219,0,8,1,11,1,33,0,34,0,35,0,36,0,48,0,49,0,51,0,55,0,101,0,174,0,175,0,176,0,4,1,142,0,143,0,158,0,39,1,44,1,45,1,47,1,57,0,98,0,99,0,130,0,163,0,180,0,181,0,186,0,189,0,191,0,33,1,34,1,186,0,186,0,139,0,187,0,188,0,139,0,183,0,187,0,139,0,40,1,45,1,175,0,150,0,133,0,180,0,214,0,180,0,55,0,1,0,92,0,152,0,153,0,154,0,165,0,166,0,48,1,195,0,197,0,182,0,191,0,33,1,48,1,181,0,32,1,33,1,48,1,89,0,137,0,170,0,214,0,8,1,11,1,198,0,53,0,54,0,56,0,63,0,105,0,174,0,5,1,62,0,64,0,65,0,111,0,112,0,246,0,247,0,63,0,246,0,63,0,246,0,63,0,246,0,61,0,246,0,58,0,59,0,159,0,180,0,180,0,39,1,47,1,40,0,41,0,42,0,43,0,44,0,37,0,38,0,28,0,231,0,116,0,137,0,92,0,98,0,167,0,116,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,86,0,87,0,117,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,88,0,135,0,136,0,88,0,136,0,38,1,26,0,133,0,235,0,90,0,90,0,183,0,187,0,235,0,157,0,51,0,55,0,172,0,58,0,59,0,120,0,12,1,88,0,135,0,136,0,209,0,31,1,210,0,38,1,151,0,152,0,55,0,16,0,215,0,44,1,116,0,88,0,135,0,136,0,90,0,90,0,215,0,158,0,158,0,55,0,88,0,135,0,136,0,25,0,105,0,137,0,46,1,39,1,20,0,238,0,142,0,181,0,181,0,181,0,91,0,137,0,190,0,48,1,137,0,190,0,186,0,40,1,41,1,186,0,185,0,186,0,191,0,33,1,48,1,157,0,41,1,157,0,155,0,133,0,152,0,88,0,136,0,90,0,154,0,165,0,140,0,39,1,47,1,41,1,157,0,41,1,141,0,137,0,43,1,45,1,137,0,43,1,134,0,43,1,55,0,167,0,168,0,169,0,137,0,88,0,135,0,136,0,51,0,53,0,54,0,55,0,56,0,92,0,98,0,99,0,123,0,126,0,139,0,229,0,15,1,16,1,17,1,18,1,19,1,20,1,21,1,24,1,25,1,26,1,27,1,28,1,63,0,247,0,248,0,110,0,113,0,114,0,253,0,254,0,255,0,0,1,62,0,247,0,63,0,63,0,63,0,61,0,71,0,71,0,149,0,158,0,158,0,158,0,158,0,154,0,157,0,157,0,232,0,98,0,159,0,181,0,191,0,192,0,165,0,137,0,170,0,137,0,156,0,159,0,171,0,180,0,181,0,192,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,51,0,52,0,55,0,178,0,183,0,36,1,37,1,185,0,51,0,52,0,55,0,178,0,183,0,36,1,51,0,55,0,36,1,237,0,236,0,159,0,180,0,159,0,180,0,97,0,161,0,207,0,13,1,206,0,51,0,55,0,172,0,36,1,185,0,36,1,151,0,157,0,211,0,212,0,15,0,13,0,240,0,48,1,152,0,16,0,180,0,51,0,55,0,185,0,51,0,55,0,152,0,27,0,216,0,44,1,216,0,51,0,55,0,185,0,51,0,55,0,204,0,177,0,252,0,253,0,238,0,191,0,15,0,181,0,98,0,181,0,189,0,253,0,33,1,34,1,41,1,140,0,41,1,137,0,137,0,41,1,175,0,147,0,134,0,180,0,41,1,154,0,196,0,33,1,167,0,169,0,51,0,55,0,185,0,51,0,55,0,116,0,51,0,92,0,98,0,220,0,221,0,222,0,17,1,15,1,199,0,137,0,29,1,48,1,181,0,137,0,29,1,51,0,137,0,29,1,51,0,63,0,152,0,1,1,254,0,110,0,0,1,180,0,180,0,79,0,121,0,224,0,225,0,48,1,181,0,137,0,41,1,169,0,137,0,116,0,44,0,40,1,90,0,90,0,183,0,187,0,40,1,42,1,90,0,90,0,183,0,184,0,187,0,48,1,184,0,187,0,224,0,224,0,44,0,162,0,44,1,158,0,151,0,42,1,15,0,41,1,139,0,14,1,15,1,174,0,181,0,192,0,241,0,48,1,18,0,218,0,48,1,17,0,217,0,218,0,90,0,90,0,42,1,90,0,90,0,218,0,201,0,203,0,42,1,158,0,175,0,15,0,137,0,215,0,181,0,98,0,181,0,190,0,33,1,134,0,41,1,43,1,42,1,222,0,137,0,17,1,137,0,41,1,226,0,40,1,29,0,108,0,230,0,18,1,24,1,26,1,28,1,19,1,21,1,26,1,19,1,134,0,152,0,223,0,226,0,19,1,20,1,22,1,23,1,26,1,28,1,152,0,98,0,181,0,169,0,180,0,118,0,159,0,180,0,159,0,180,0,161,0,141,0,90,0,159,0,180,0,159,0,180,0,161,0,235,0,231,0,152,0,152,0,180,0,224,0,208,0,44,1,15,0,15,1,151,0,44,1,213,0,91,0,242,0,48,1,152,0,14,0,243,0,48,1,158,0,15,0,90,0,15,0,152,0,152,0,216,0,181,0,152,0,181,0,137,0,41,1,221,0,137,0,98,0,220,0,140,0,142,0,152,0,152,0,137,0,29,1,137,0,29,1,137,0,29,1,137,0,29,1,29,1,134,0,226,0,121,0,137,0,29,1,89,0,214,0,137,0,29,1,137,0,29,1,15,0,181,0,180,0,159,0,180,0,15,0,134,0,152,0,151,0,41,1,15,0,14,1,89,0,171,0,214,0,8,1,11,1,215,0,152,0,215,0,15,0,15,0,205,0,218,0,238,0,239,0,137,0,221,0,137,0,17,1,51,0,227,0,228,0,16,1,15,0,134,0,19,1,26,1,19,1,19,1,121,0,23,1,26,1,55,0,88,0,19,1,22,1,26,1,19,1,134,0,15,0,151,0,55,0,88,0,135,0,136,0,152,0,152,0,152,0,221,0,137,0,137,0,40,1,29,1,137,0,29,1,29,1,29,1,137,0,29,1,137,0,29,1,51,0,55,0,29,1,137,0,29,1,29,1,15,0,51,0,55,0,185,0,51,0,55,0,240,0,217,0,15,0,221,0,228,0,19,1,19,1,26,1,19,1,19,1,42,1,29,1,29,1,137,0,29,1,29,1,29,1,19,1,29,1,73,110,118,97,108,105,100,32,109,114,98,95,115,116,97,116,101,44,32,101,120,105,116,105,110,103,32,109,114,98,99,10,0,37,115,58,32,110,111,32,112,114,111,103,114,97,109,32,102,105,108,101,32,103,105,118,101,110,10,0,46,99,0,46,109,114,98,0,37,115,58,32,111,117,116,112,117,116,32,102,105,108,101,32,115,104,111,117,108,100,32,98,101,32,115,112,101,99,105,102,105,101,100,32,116,111,32,99,111,109,112,105,108,101,32,109,117,108,116,105,112,108,101,32,102,105,108,101,115,10,0,37,115,58,37,115,58,83,121,110,116,97,120,32,79,75,10,0,119,98,0,37,115,58,32,99,97,110,110,111,116,32,111,112,101,110,32,111,117,116,112,117,116,32,102,105,108,101,58,40,37,115,41,10,0,79,117,116,112,117,116,32,102,105,108,101,32,105,115,32,114,101,113,117,105,114,101,100,10,0,37,115,58,32,97,110,32,111,117,116,112,117,116,32,102,105,108,101,32,105,115,32,97,108,114,101,97,100,121,32,115,112,101,99,105,102,105,101,100,46,32,40,37,115,41,10,0,37,115,58,32,102,117,110,99,116,105,111,110,32,110,97,109,101,32,105,115,32,110,111,116,32,115,112,101,99,105,102,105,101,100,46,10,0,118,101,114,115,105,111,110,0,118,101,114,98,111,115,101,0,99,111,112,121,114,105,103,104,116,0,37,115,58,32,103,101,110,101,114,97,116,105,110,103,32,37,115,32,101,110,100,105,97,110,32,67,32,102,105,108,101,46,32,115,112,101,99,105,102,121,32,45,101,47,45,69,32,102,111,114,32,99,114,111,115,115,32,99,111,109,112,105,108,105,110,103,46,10,0,98,105,103,0,108,105,116,116,108,101,0,115,119,105,116,99,104,101,115,58,0,45,99,32,32,32,32,32,32,32,32,32,32,32,99,104,101,99,107,32,115,121,110,116,97,120,32,111,110,108,121,0,45,111,60,111,117,116,102,105,108,101,62,32,32,112,108,97,99,101,32,116,104,101,32,111,117,116,112,117,116,32,105,110,116,111,32,60,111,117,116,102,105,108,101,62,0,45,118,32,32,32,32,32,32,32,32,32,32,32,112,114,105,110,116,32,118,101,114,115,105,111,110,32,110,117,109,98,101,114,44,32,116,104,101,110,32,116,117,114,110,32,111,110,32,118,101,114,98,111,115,101,32,109,111,100,101,0,45,103,32,32,32,32,32,32,32,32,32,32,32,112,114,111,100,117,99,101,32,100,101,98,117,103,103,105,110,103,32,105,110,102,111,114,109,97,116,105,111,110,0,45,66,60,115,121,109,98,111,108,62,32,32,32,98,105,110,97,114,121,32,60,115,121,109,98,111,108,62,32,111,117,116,112,117,116,32,105,110,32,67,32,108,97,110,103,117,97,103,101,32,102,111,114,109,97,116,0,45,101,32,32,32,32,32,32,32,32,32,32,32,103,101,110,101,114,97,116,101,32,108,105,116,116,108,101,32,101,110,100,105,97,110,32,105,115,101,113,32,100,97,116,97,0,45,69,32,32,32,32,32,32,32,32,32,32,32,103,101,110,101,114,97,116,101,32,98,105,103,32,101,110,100,105,97,110,32,105,115,101,113,32,100,97,116,97,0,45,45,118,101,114,98,111,115,101,32,32,32,32,114,117,110,32,97,116,32,118,101,114,98,111,115,101,32,109,111,100,101,0,45,45,118,101,114,115,105,111,110,32,32,32,32,112,114,105,110,116,32,116,104,101,32,118,101,114,115,105,111,110,0,45,45,99,111,112,121,114,105,103,104,116,32,32,112,114,105,110,116,32,116,104,101,32,99,111,112,121,114,105,103,104,116,0,85,115,97,103,101,58,32,37,115,32,91,115,119,105,116,99,104,101,115,93,32,112,114,111,103,114,97,109,102,105,108,101,10,0,32,32,37,115,10,0,114,0,37,115,58,32,99,97,110,110,111,116,32,111,112,101,110,32,112,114,111,103,114,97,109,32,102,105,108,101,46,32,40,37,115,41,10,0,37,115,58,32,105,110,118,97,108,105,100,32,67,32,108,97,110,103,117,97,103,101,32,115,121,109,98,111,108,32,110,97,109,101,10,0,37,115,58,32,101,114,114,111,114,32,105,110,32,109,114,98,32,100,117,109,112,32,40,37,115,41,32,37,100,10,0,37,46,56,101,0,73,82,69,80,0,48,48,48,48,0,68,66,71,0,0,76,73,78,69,0,76,86,65,82,0,69,78,68,0,0,82,73,84,69,0,69,84,73,82,0,48,48,48,51,0,77,65,84,90,0,47,42,32,100,117,109,112,101,100,32,105,110,32,108,105,116,116,108,101,32,101,110,100,105,97,110,32,111,114,100,101,114,46,10,32,32,32,117,115,101,32,96,109,114,98,99,32,45,69,96,32,111,112,116,105,111,110,32,102,111,114,32,98,105,103,32,101,110,100,105,97,110,32,67,80,85,46,32,42,47,10,0,47,42,32,100,117,109,112,101,100,32,105,110,32,98,105,103,32,101,110,100,105,97,110,32,111,114,100,101,114,46,10,32,32,32,117,115,101,32,96,109,114,98,99,32,45,101,96,32,111,112,116,105,111,110,32,102,111,114,32,98,101,116,116,101,114,32,112,101,114,102,111,114,109,97,110,99,101,32,111,110,32,108,105,116,116,108,101,32,101,110,100,105,97,110,32,67,80,85,46,32,42,47,10,0,35,105,110,99,108,117,100,101,32,60,115,116,100,105,110,116,46,104,62,10,0,99,111,110,115,116,32,117,105,110,116,56,95,116,10,35,105,102,32,100,101,102,105,110,101,100,32,95,95,71,78,85,67,95,95,10,95,95,97,116,116,114,105,98,117,116,101,95,95,40,40,97,108,105,103,110,101,100,40,37,117,41,41,41,10,35,101,108,105,102,32,100,101,102,105,110,101,100,32,95,77,83,67,95,86,69,82,10,95,95,100,101,99,108,115,112,101,99,40,97,108,105,103,110,40,37,117,41,41,10,35,101,110,100,105,102,10,37,115,91,93,32,61,32,123,0,48,120,37,48,50,120,44,0,10,125,59,10,0,105,110,118,97,108,105,100,32,102,111,114,109,97,116,32,115,116,114,105,110,103,0,97,114,101,110,97,32,111,118,101,114,102,108,111,119,32,101,114,114,111,114,0,71,67,0,115,116,97,114,116,0,101,110,97,98,108,101,0,100,105,115,97,98,108,101,0,105,110,116,101,114,118,97,108,95,114,97,116,105,111,0,105,110,116,101,114,118,97,108,95,114,97,116,105,111,61,0,115,116,101,112,95,114,97,116,105,111,0,115,116,101,112,95,114,97,116,105,111,61,0,103,101,110,101,114,97,116,105,111,110,97,108,95,109,111,100,101,61,0,103,101,110,101,114,97,116,105,111,110,97,108,95,109,111,100,101,0,2,8,32,128,1,4,16,64,3,12,48,192,105,102,110,111,110,101,0,111,111,0,100,101,102,97,117,108,116,0,124,111,63,0,100,101,102,97,117,108,116,61,0,100,101,102,97,117,108,116,95,112,114,111,99,0,100,101,102,97,117,108,116,95,112,114,111,99,61,0,95,95,100,101,108,101,116,101,0,104,97,115,95,107,101,121,63,0,104,97,115,95,118,97,108,117,101,63,0,38,124,111,63,0,107,101,121,63,0,107,101,121,115,0,115,116,111,114,101,0,118,97,108,117,101,63,0,118,97,108,117,101,115,0,110,111,110,32,102,108,111,97,116,32,118,97,108,117,101,0,70,108,111,97,116,68,111,109,97,105,110,69,114,114,111,114,0,45,73,110,102,105,110,105,116,121,0,73,110,102,105,110,105,116,121,0,78,97,78,0,105,110,118,97,108,105,100,32,114,97,100,105,120,32,37,83,0,78,117,109,101,114,105,99,0,102,0,113,117,111,0,99,97,110,39,116,32,99,111,110,118,101,114,116,32,70,108,111,97,116,32,105,110,116,111,32,73,110,116,101,103,101,114,0,100,105,118,109,111,100,0,99,101,105,108,0,102,105,110,105,116,101,63,0,102,108,111,111,114,0,105,110,102,105,110,105,116,101,63,0,114,111,117,110,100,0,116,114,117,110,99,97,116,101,0,37,46,55,103,0,110,97,110,63,0,73,78,70,73,78,73,84,89,0,78,105,108,67,108,97,115,115,0,98,0,84,114,117,101,67,108,97,115,115,0,70,97,108,115,101,67,108,97,115,115,0,73,110,116,101,103,101,114,0,99,97,110,39,116,32,99,111,110,118,101,114,116,32,37,83,32,105,110,116,111,32,37,83,0,37,83,32,99,97,110,110,111,116,32,98,101,32,99,111,110,118,101,114,116,101,100,32,116,111,32,37,83,32,98,121,32,35,37,83,0,70,105,120,110,117,109,0,105,67,108,97,115,115,0,83,67,108,97,115,115,0,70,108,111,97,116,0,70,105,108,101,0,68,97,116,97,0,117,110,107,110,111,119,110,32,116,121,112,101,32,37,83,32,40,37,83,32,103,105,118,101,110,41,0,35,60,0,99,108,97,115,115,32,111,114,32,109,111,100,117,108,101,32,114,101,113,117,105,114,101,100,0,116,111,95,105,110,116,0,99,97,110,39,116,32,99,111,110,118,101,114,116,32,37,83,32,116,111,32,73,110,116,101,103,101,114,32,40,37,83,35,37,83,32,103,105,118,101,115,32,37,83,41,0,99,97,110,39,116,32,99,111,110,118,101,114,116,32,110,105,108,32,105,110,116,111,32,73,110,116,101,103,101,114,0,98,97,115,101,32,115,112,101,99,105,102,105,101,100,32,102,111,114,32,110,111,110,32,115,116,114,105,110,103,32,118,97,108,117,101,0,109,97,105,110,0,48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,0,115,116,114,105,110,103,32,99,97,112,97,99,105,116,121,32,115,105,122,101,32,116,111,111,32,98,105,103,0,115,116,114,105,110,103,32,115,105,122,101,32,116,111,111,32,98,105,103,0,115,116,114,105,110,103,32,99,111,110,116,97,105,110,115,32,110,117,108,108,32,98,121,116,101,0,99,97,110,39,116,32,109,111,100,105,102,121,32,102,114,111,122,101,110,32,115,116,114,105,110,103,0,82,101,103,101,120,112,32,99,108,97,115,115,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,105,108,108,101,103,97,108,32,114,97,100,105,120,32,37,83,0,115,116,114,105,110,103,32,40,37,83,41,32,116,111,111,32,98,105,103,32,102,111,114,32,105,110,116,101,103,101,114,0,105,110,118,97,108,105,100,32,115,116,114,105,110,103,32,102,111,114,32,110,117,109,98,101,114,40,37,83,41,0,105,110,118,97,108,105,100,32,115,116,114,105,110,103,32,102,111,114,32,102,108,111,97,116,40,37,83,41,0,115,116,114,105,110,103,32,102,111,114,32,70,108,111,97,116,32,99,111,110,116,97,105,110,115,32,110,117,108,108,32,98,121,116,101,0,34,0,98,121,116,101,115,105,122,101,0,83,0,97,114,103,117,109,101,110,116,32,116,111,111,32,98,105,103,0,111,124,111,0,119,114,111,110,103,32,110,117,109,98,101,114,32,111,102,32,97,114,103,117,109,101,110,116,115,32,40,37,83,32,102,111,114,32,49,41,0,99,97,110,39,116,32,99,111,110,118,101,114,116,32,116,111,32,70,105,120,110,117,109,0,99,97,112,105,116,97,108,105,122,101,0,99,97,112,105,116,97,108,105,122,101,33,0,99,104,111,109,112,0,124,83,0,99,104,111,109,112,33,0,99,104,111,112,0,99,104,111,112,33,0,100,111,119,110,99,97,115,101,0,100,111,119,110,99,97,115,101,33,0,116,121,112,101,32,109,105,115,109,97,116,99,104,58,32,37,83,32,103,105,118,101,110,0,115,112,108,105,116,0,124,111,105,0,116,111,95,102,0,116,111,95,105,0,117,112,99,97,115,101,0,117,112,99,97,115,101,33,0,98,121,116,101,115,0,102,114,101,101,122,101,0,2,8,32,128,1,4,16,64,3,12,48,192,115,121,109,98,111,108,32,108,101,110,103,116,104,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,0,105,100,50,110,97,109,101,0,116,111,95,115,121,109,0,99,97,110,110,111,116,32,115,101,116,32,105,110,115,116,97,110,99,101,32,118,97,114,105,97,98,108,101,0,39,37,83,39,32,105,115,32,110,111,116,32,97,108,108,111,119,101,100,32,97,115,32,97,110,32,105,110,115,116,97,110,99,101,32,118,97,114,105,97,98,108,101,32,110,97,109,101,0,45,60,0,117,110,105,110,105,116,105,97,108,105,122,101,100,32,99,108,97,115,115,32,118,97,114,105,97,98,108,101,32,37,83,32,105,110,32,37,83,0,99,111,110,115,116,97,110,116,32,108,111,111,107,45,117,112,32,102,111,114,32,110,111,110,32,99,108,97,115,115,47,109,111,100,117,108,101,0,84,111,111,32,108,111,110,103,32,97,114,103,117,109,101,110,116,115,46,32,40,108,105,109,105,116,61,56,41,0,110,101,103,97,116,105,118,101,32,97,114,103,99,32,102,111,114,32,102,117,110,99,97,108,108,32,40,37,83,41,0,115,116,97,99,107,32,108,101,118,101,108,32,116,111,111,32,100,101,101,112,46,32,40,108,105,109,105,116,61,40,48,120,52,48,48,48,48,32,45,32,49,50,56,41,41,0,115,117,112,101,114,32,99,97,108,108,101,100,32,111,117,116,115,105,100,101,32,111,102,32,109,101,116,104,111,100,0,116,111,95,112,114,111,99,0,39,37,83,39,58,32,119,114,111,110,103,32,110,117,109,98,101,114,32,111,102,32,97,114,103,117,109,101,110,116,115,32,40,37,83,32,102,111,114,32,37,83,41,0,119,114,111,110,103,32,110,117,109,98,101,114,32,111,102,32,97,114,103,117,109,101,110,116,115,32,40,37,83,32,102,111,114,32,37,83,41,0,114,101,116,117,114,110,0,98,114,101,97,107,0,0,121,105,101,108,100,0,0,6,5,5,117,110,101,120,112,101,99,116,101,100,32,0,76,111,99,97,108,74,117,109,112,69,114,114,111,114,0,70,105,98,101,114,69,114,114,111,114,0,100,111,117,98,108,101,32,114,101,115,117,109,101,0,110,111,32,116,97,114,103,101,116,32,99,108,97,115,115,32,111,114,32,109,111,100,117,108,101,0,79,80,95,68,69,66,85,71,32,37,100,32,37,100,32,37,100,10,0,110,42,38,0,124,83,38,0,109,111,100,117,108,101,95,101,118,97,108,47,99,108,97,115,115,95,101,118,97,108,32,119,105,116,104,32,115,116,114,105,110,103,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,105,110,115,116,97,110,99,101,95,101,118,97,108,32,119,105,116,104,32,115,116,114,105,110,103,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,115,116,114,105,110,103,32,116,111,111,32,108,111,110,103,32,40,116,114,117,110,99,97,116,101,100,41,0,37,115,40,37,100,44,37,100,41,58,32,37,115,10,0,108,105,110,101,32,37,100,58,37,100,58,32,37,115,10,0,99,97,110,39,116,32,102,105,110,100,32,104,101,114,101,100,111,99,32,100,101,108,105,109,105,116,101,114,32,34,37,115,34,32,97,110,121,119,104,101,114,101,32,98,101,102,111,114,101,32,69,79,70,0,117,110,116,101,114,109,105,110,97,116,101,100,32,115,116,114,105,110,103,32,109,101,101,116,115,32,101,110,100,32,111,102,32,102,105,108,101,0,48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,0,73,110,118,97,108,105,100,32,101,115,99,97,112,101,32,99,104,97,114,97,99,116,101,114,32,115,121,110,116,97,120,0,73,110,118,97,108,105,100,32,85,110,105,99,111,100,101,32,99,111,100,101,32,112,111,105,110,116,0,115,0,117,110,107,110,111,119,110,32,114,101,103,101,120,112,32,111,112,116,105,111,110,37,115,32,45,32,37,115,0,42,42,0,39,42,39,32,105,110,116,101,114,112,114,101,116,101,100,32,97,115,32,97,114,103,117,109,101,110,116,32,112,114,101,102,105,120,0,10,61,101,110,100,0,101,109,98,101,100,100,101,100,32,100,111,99,117,109,101,110,116,32,109,101,101,116,115,32,101,110,100,32,111,102,32,102,105,108,101,0,117,110,116,101,114,109,105,110,97,116,101,100,32,104,101,114,101,32,100,111,99,117,109,101,110,116,32,105,100,101,110,116,105,102,105,101,114,0,62,62,0,105,110,99,111,109,112,108,101,116,101,32,99,104,97,114,97,99,116,101,114,32,115,121,110,116,97,120,0,105,110,118,97,108,105,100,32,99,104,97,114,97,99,116,101,114,32,115,121,110,116,97,120,59,32,117,115,101,32,63,92,37,99,0,38,38,0,39,38,39,32,105,110,116,101,114,112,114,101,116,101,100,32,97,115,32,97,114,103,117,109,101,110,116,32,112,114,101,102,105,120,0,124,124,0,97,109,98,105,103,117,111,117,115,32,102,105,114,115,116,32,97,114,103,117,109,101,110,116,59,32,112,117,116,32,112,97,114,101,110,116,104,101,115,101,115,32,111,114,32,101,118,101,110,32,115,112,97,99,101,115,0,110,111,32,46,60,100,105,103,105,116,62,32,102,108,111,97,116,105,110,103,32,108,105,116,101,114,97,108,32,97,110,121,109,111,114,101,59,32,112,117,116,32,48,32,98,101,102,111,114,101,32,100,111,116,0,110,117,109,101,114,105,99,32,108,105,116,101,114,97,108,32,119,105,116,104,111,117,116,32,100,105,103,105,116,115,0,73,110,118,97,108,105,100,32,111,99,116,97,108,32,100,105,103,105,116,0,48,0,116,114,97,105,108,105,110,103,32,39,37,99,39,32,105,110,32,110,117,109,98,101,114,0,99,111,114,114,117,112,116,101,100,32,102,108,111,97,116,32,118,97,108,117,101,32,37,115,0,102,108,111,97,116,32,37,115,32,111,117,116,32,111,102,32,114,97,110,103,101,0,117,110,107,110,111,119,110,32,116,121,112,101,32,111,102,32,37,115,116,114,105,110,103,0,117,110,116,101,114,109,105,110,97,116,101,100,32,113,117,111,116,101,100,32,115,116,114,105,110,103,32,109,101,101,116,115,32,101,110,100,32,111,102,32,102,105,108,101,0,105,110,99,111,109,112,108,101,116,101,32,103,108,111,98,97,108,32,118,97,114,105,97,98,108,101,32,115,121,110,116,97,120,0,99,97,112,116,117,114,101,32,103,114,111,117,112,32,105,110,100,101,120,32,109,117,115,116,32,98,101,32,60,61,32,37,100,0,105,110,99,111,109,112,108,101,116,101,32,105,110,115,116,97,110,99,101,32,118,97,114,105,97,98,108,101,32,115,121,110,116,97,120,0,105,110,99,111,109,112,108,101,116,101,32,99,108,97,115,115,32,118,97,114,105,97,98,108,101,32,115,121,110,116,97,120,0,39,64,37,99,39,32,105,115,32,110,111,116,32,97,108,108,111,119,101,100,32,97,115,32,97,110,32,105,110,115,116,97,110,99,101,32,118,97,114,105,97,98,108,101,32,110,97,109,101,0,39,64,64,37,99,39,32,105,115,32,110,111,116,32,97,108,108,111,119,101,100,32,97,115,32,97,32,99,108,97,115,115,32,118,97,114,105,97,98,108,101,32,110,97,109,101,0,73,110,118,97,108,105,100,32,99,104,97,114,32,39,92,120,37,48,50,88,39,32,105,110,32,101,120,112,114,101,115,115,105,111,110,0,95,95,69,78,68,95,95,0,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,14,51,16,8,11,13,51,51,51,51,10,51,13,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,11,51,13,1,26,4,1,8,28,51,23,51,1,1,27,5,19,21,51,8,3,3,11,51,21,24,16,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,98,114,101,97,107,0,101,108,115,101,0,110,105,108,0,101,110,115,117,114,101,0,116,104,101,110,0,110,111,116,0,102,97,108,115,101,0,115,101,108,102,0,101,108,115,105,102,0,114,101,115,99,117,101,0,116,114,117,101,0,117,110,116,105,108,0,117,110,108,101,115,115,0,114,101,116,117,114,110,0,100,101,102,0,97,110,100,0,100,111,0,121,105,101,108,100,0,102,111,114,0,117,110,100,101,102,0,111,114,0,105,110,0,119,104,101,110,0,114,101,116,114,121,0,105,102,0,99,97,115,101,0,114,101,100,111,0,110,101,120,116,0,115,117,112,101,114,0,109,111,100,117,108,101,0,95,95,76,73,78,69,95,95,0,95,95,70,73,76,69,95,95,0,95,95,69,78,67,79,68,73,78,71,95,95,0,69,78,68,0,97,108,105,97,115,0,66,69,71,73,78,0,119,104,105,108,101,0,0,2,2,2,2,2,2,2,2,2,143,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,130,2,2,2,128,123,2,139,140,126,124,137,125,136,127,2,2,2,2,2,2,2,2,2,2,118,142,120,116,119,117,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,135,2,141,122,2,138,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,133,121,134,131,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,129,132,0,2,0,2,2,1,1,3,2,1,0,5,4,2,1,1,3,2,0,4,2,3,3,3,3,3,4,1,3,3,6,5,5,5,5,3,3,3,3,1,3,3,1,3,3,3,2,1,1,1,1,1,4,0,5,2,3,4,5,4,5,2,2,2,2,2,1,3,1,3,1,2,3,5,2,4,2,4,1,3,1,3,2,3,1,2,1,4,3,3,3,3,2,1,1,4,3,3,3,3,2,1,1,1,2,1,3,1,1,1,1,1,1,1,1,0,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,5,3,5,6,5,5,5,5,4,3,3,3,3,3,3,3,3,3,4,4,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,3,3,3,3,6,1,1,1,2,4,2,3,1,1,1,1,2,4,2,1,2,2,4,1,0,2,2,2,1,1,2,3,4,4,5,3,4,2,1,1,1,1,1,1,1,1,0,4,0,0,5,0,3,3,3,2,3,3,1,4,3,1,4,3,2,1,2,0,0,5,6,6,0,0,7,0,0,7,5,4,0,0,9,0,6,0,0,8,0,5,0,0,7,0,0,9,1,1,1,1,1,1,1,2,1,1,1,5,1,2,1,1,1,3,1,3,1,4,6,3,5,2,4,1,3,6,8,4,6,4,2,6,2,4,6,2,4,2,4,1,1,1,3,1,4,1,4,1,3,1,1,4,1,3,3,0,5,2,4,5,5,2,4,4,3,3,3,2,1,4,0,5,0,5,5,1,1,6,1,1,1,1,2,1,2,1,1,1,1,1,1,1,2,3,1,2,1,0,4,1,2,2,3,2,3,1,0,1,1,2,1,2,1,2,1,0,4,2,3,1,4,2,1,1,1,1,1,2,2,3,1,1,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,4,3,2,6,8,4,6,4,6,2,4,6,2,4,2,4,1,0,1,1,1,1,1,1,1,3,1,3,2,2,2,1,3,1,3,1,1,2,1,1,1,2,2,1,1,0,4,1,2,1,3,3,2,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,2,2,0,1,1,1,1,0,3,1,2,0,66,69,71,73,78,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,101,108,115,101,32,119,105,116,104,111,117,116,32,114,101,115,99,117,101,32,105,115,32,117,115,101,108,101,115,115,0,69,78,68,32,110,111,116,32,115,117,112,111,114,116,101,100,0,99,111,110,115,116,97,110,116,32,114,101,45,97,115,115,105,103,110,109,101,110,116,0,99,97,110,39,116,32,115,101,116,32,118,97,114,105,97,98,108,101,32,36,37,100,0,99,97,110,39,116,32,115,101,116,32,118,97,114,105,97,98,108,101,32,36,37,99,0,73,110,116,101,114,110,97,108,32,101,114,114,111,114,32,105,110,32,98,97,99,107,114,101,102,95,101,114,114,111,114,40,41,32,58,32,110,61,62,99,97,114,32,61,61,32,37,83,0,98,111,116,104,32,98,108,111,99,107,32,97,114,103,32,97,110,100,32,97,99,116,117,97,108,32,98,108,111,99,107,32,103,105,118,101,110,0,98,108,111,99,107,32,97,114,103,117,109,101,110,116,32,115,104,111,117,108,100,32,110,111,116,32,98,101,32,103,105,118,101,110,0,100,121,110,97,109,105,99,32,99,111,110,115,116,97,110,116,32,97,115,115,105,103,110,109,101,110,116,0,99,108,97,115,115,47,109,111,100,117,108,101,32,110,97,109,101,32,109,117,115,116,32,98,101,32,67,79,78,83,84,65,78,84,0,61,126,0,33,126,0,62,61,0,60,61,0,43,64,0,45,64,0,47,0,37,0,124,0,94,0,60,0,126,0,99,108,97,115,115,32,100,101,102,105,110,105,116,105,111,110,32,105,110,32,109,101,116,104,111,100,32,98,111,100,121,0,109,111,100,117,108,101,32,100,101,102,105,110,105,116,105,111,110,32,105,110,32,109,101,116,104,111,100,32,98,111,100,121,0,98,108,111,99,107,32,103,105,118,101,110,32,116,111,32,121,105,101,108,100,0,37,100,0,102,111,114,109,97,108,32,97,114,103,117,109,101,110,116,32,99,97,110,110,111,116,32,98,101,32,97,32,99,111,110,115,116,97,110,116,0,102,111,114,109,97,108,32,97,114,103,117,109,101,110,116,32,99,97,110,110,111,116,32,98,101,32,97,110,32,105,110,115,116,97,110,99,101,32,118,97,114,105,97,98,108,101,0,102,111,114,109,97,108,32,97,114,103,117,109,101,110,116,32,99,97,110,110,111,116,32,98,101,32,97,32,103,108,111,98,97,108,32,118,97,114,105,97,98,108,101,0,102,111,114,109,97,108,32,97,114,103,117,109,101,110,116,32,99,97,110,110,111,116,32,98,101,32,97,32,99,108,97,115,115,32,118,97,114,105,97,98,108,101,0,99,97,110,39,116,32,100,101,102,105,110,101,32,115,105,110,103,108,101,116,111,110,32,109,101,116,104,111,100,32,102,111,114,32,40,41,46,0,99,97,110,39,116,32,100,101,102,105,110,101,32,115,105,110,103,108,101,116,111,110,32,109,101,116,104,111,100,32,102,111,114,32,108,105,116,101,114,97,108,115,0,36,101,110,100,0,101,114,114,111,114,0,36,117,110,100,101,102,105,110,101,100,0,107,101,121,119,111,114,100,95,99,108,97,115,115,0,107,101,121,119,111,114,100,95,109,111,100,117,108,101,0,107,101,121,119,111,114,100,95,100,101,102,0,107,101,121,119,111,114,100,95,98,101,103,105,110,0,107,101,121,119,111,114,100,95,105,102,0,107,101,121,119,111,114,100,95,117,110,108,101,115,115,0,107,101,121,119,111,114,100,95,119,104,105,108,101,0,107,101,121,119,111,114,100,95,117,110,116,105,108,0,107,101,121,119,111,114,100,95,102,111,114,0,107,101,121,119,111,114,100,95,117,110,100,101,102,0,107,101,121,119,111,114,100,95,114,101,115,99,117,101,0,107,101,121,119,111,114,100,95,101,110,115,117,114,101,0,107,101,121,119,111,114,100,95,101,110,100,0,107,101,121,119,111,114,100,95,116,104,101,110,0,107,101,121,119,111,114,100,95,101,108,115,105,102,0,107,101,121,119,111,114,100,95,101,108,115,101,0,107,101,121,119,111,114,100,95,99,97,115,101,0,107,101,121,119,111,114,100,95,119,104,101,110,0,107,101,121,119,111,114,100,95,98,114,101,97,107,0,107,101,121,119,111,114,100,95,110,101,120,116,0,107,101,121,119,111,114,100,95,114,101,100,111,0,107,101,121,119,111,114,100,95,114,101,116,114,121,0,107,101,121,119,111,114,100,95,105,110,0,107,101,121,119,111,114,100,95,100,111,0,107,101,121,119,111,114,100,95,100,111,95,99,111,110,100,0,107,101,121,119,111,114,100,95,100,111,95,98,108,111,99,107,0,107,101,121,119,111,114,100,95,100,111,95,76,65,77,66,68,65,0,107,101,121,119,111,114,100,95,114,101,116,117,114,110,0,107,101,121,119,111,114,100,95,121,105,101,108,100,0,107,101,121,119,111,114,100,95,115,117,112,101,114,0,107,101,121,119,111,114,100,95,115,101,108,102,0,107,101,121,119,111,114,100,95,110,105,108,0,107,101,121,119,111,114,100,95,116,114,117,101,0,107,101,121,119,111,114,100,95,102,97,108,115,101,0,107,101,121,119,111,114,100,95,97,110,100,0,107,101,121,119,111,114,100,95,111,114,0,107,101,121,119,111,114,100,95,110,111,116,0,109,111,100,105,102,105,101,114,95,105,102,0,109,111,100,105,102,105,101,114,95,117,110,108,101,115,115,0,109,111,100,105,102,105,101,114,95,119,104,105,108,101,0,109,111,100,105,102,105,101,114,95,117,110,116,105,108,0,109,111,100,105,102,105,101,114,95,114,101,115,99,117,101,0,107,101,121,119,111,114,100,95,97,108,105,97,115,0,107,101,121,119,111,114,100,95,66,69,71,73,78,0,107,101,121,119,111,114,100,95,69,78,68,0,107,101,121,119,111,114,100,95,95,76,73,78,69,95,95,0,107,101,121,119,111,114,100,95,95,70,73,76,69,95,95,0,107,101,121,119,111,114,100,95,95,69,78,67,79,68,73,78,71,95,95,0,116,73,68,69,78,84,73,70,73,69,82,0,116,70,73,68,0,116,71,86,65,82,0,116,73,86,65,82,0,116,67,79,78,83,84,65,78,84,0,116,67,86,65,82,0,116,76,65,66,69,76,0,116,73,78,84,69,71,69,82,0,116,70,76,79,65,84,0,116,67,72,65,82,0,116,88,83,84,82,73,78,71,0,116,82,69,71,69,88,80,0,116,83,84,82,73,78,71,0,116,83,84,82,73,78,71,95,80,65,82,84,0,116,83,84,82,73,78,71,95,77,73,68,0,116,78,84,72,95,82,69,70,0,116,66,65,67,75,95,82,69,70,0,116,82,69,71,69,88,80,95,69,78,68,0,116,85,80,76,85,83,0,116,85,77,73,78,85,83,0,116,80,79,87,0,116,67,77,80,0,116,69,81,0,116,69,81,81,0,116,78,69,81,0,116,71,69,81,0,116,76,69,81,0,116,65,78,68,79,80,0,116,79,82,79,80,0,116,77,65,84,67,72,0,116,78,77,65,84,67,72,0,116,68,79,84,50,0,116,68,79,84,51,0,116,65,82,69,70,0,116,65,83,69,84,0,116,76,83,72,70,84,0,116,82,83,72,70,84,0,116,67,79,76,79,78,50,0,116,67,79,76,79,78,51,0,116,79,80,95,65,83,71,78,0,116,65,83,83,79,67,0,116,76,80,65,82,69,78,0,116,76,80,65,82,69,78,95,65,82,71,0,116,82,80,65,82,69,78,0,116,76,66,82,65,67,75,0,116,76,66,82,65,67,69,0,116,76,66,82,65,67,69,95,65,82,71,0,116,83,84,65,82,0,116,65,77,80,69,82,0,116,76,65,77,66,68,65,0,116,83,89,77,66,69,71,0,116,82,69,71,69,88,80,95,66,69,71,0,116,87,79,82,68,83,95,66,69,71,0,116,83,89,77,66,79,76,83,95,66,69,71,0,116,83,84,82,73,78,71,95,66,69,71,0,116,88,83,84,82,73,78,71,95,66,69,71,0,116,83,84,82,73,78,71,95,68,86,65,82,0,116,76,65,77,66,69,71,0,116,72,69,82,69,68,79,67,95,66,69,71,0,116,72,69,82,69,68,79,67,95,69,78,68,0,116,76,73,84,69,82,65,76,95,68,69,76,73,77,0,116,72,68,95,76,73,84,69,82,65,76,95,68,69,76,73,77,0,116,72,68,95,83,84,82,73,78,71,95,80,65,82,84,0,116,72,68,95,83,84,82,73,78,71,95,77,73,68,0,116,76,79,87,69,83,84,0,39,61,39,0,39,63,39,0,39,58,39,0,39,62,39,0,39,60,39,0,39,124,39,0,39,94,39,0,39,38,39,0,39,43,39,0,39,45,39,0,39,42,39,0,39,47,39,0,39,37,39,0,116,85,77,73,78,85,83,95,78,85,77,0,39,33,39,0,39,126,39,0,116,76,65,83,84,95,84,79,75,69,78,0,39,123,39,0,39,125,39,0,39,91,39,0,39,46,39,0,39,44,39,0,39,96,39,0,39,40,39,0,39,41,39,0,39,93,39,0,39,59,39,0,39,92,110,39,0,36,97,99,99,101,112,116,0,112,114,111,103,114,97,109,0,36,64,49,0,116,111,112,95,99,111,109,112,115,116,109,116,0,116,111,112,95,115,116,109,116,115,0,116,111,112,95,115,116,109,116,0,64,50,0,98,111,100,121,115,116,109,116,0,99,111,109,112,115,116,109,116,0,115,116,109,116,115,0,115,116,109,116], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+51200);
+/* memory initializer */ allocate([0,36,64,51,0,99,111,109,109,97,110,100,95,97,115,103,110,0,101,120,112,114,0,101,120,112,114,95,118,97,108,117,101,0,99,111,109,109,97,110,100,95,99,97,108,108,0,98,108,111,99,107,95,99,111,109,109,97,110,100,0,99,109,100,95,98,114,97,99,101,95,98,108,111,99,107,0,36,64,52,0,99,111,109,109,97,110,100,0,109,108,104,115,0,109,108,104,115,95,105,110,110,101,114,0,109,108,104,115,95,98,97,115,105,99,0,109,108,104,115,95,105,116,101,109,0,109,108,104,115,95,108,105,115,116,0,109,108,104,115,95,112,111,115,116,0,109,108,104,115,95,110,111,100,101,0,108,104,115,0,99,110,97,109,101,0,99,112,97,116,104,0,102,110,97,109,101,0,102,115,121,109,0,117,110,100,101,102,95,108,105,115,116,0,36,64,53,0,111,112,0,114,101,115,119,111,114,100,115,0,97,114,103,0,97,114,103,95,118,97,108,117,101,0,97,114,101,102,95,97,114,103,115,0,112,97,114,101,110,95,97,114,103,115,0,111,112,116,95,112,97,114,101,110,95,97,114,103,115,0,111,112,116,95,99,97,108,108,95,97,114,103,115,0,99,97,108,108,95,97,114,103,115,0,99,111,109,109,97,110,100,95,97,114,103,115,0,64,54,0,98,108,111,99,107,95,97,114,103,0,111,112,116,95,98,108,111,99,107,95,97,114,103,0,97,114,103,115,0,109,114,104,115,0,112,114,105,109,97,114,121,0,64,55,0,64,56,0,36,64,57,0,36,64,49,48,0,64,49,49,0,64,49,50,0,36,64,49,51,0,36,64,49,52,0,36,64,49,53,0,36,64,49,54,0,36,64,49,55,0,36,64,49,56,0,64,49,57,0,64,50,48,0,64,50,49,0,64,50,50,0,64,50,51,0,64,50,52,0,64,50,53,0,64,50,54,0,112,114,105,109,97,114,121,95,118,97,108,117,101,0,105,102,95,116,97,105,108,0,111,112,116,95,101,108,115,101,0,102,111,114,95,118,97,114,0,102,95,109,97,114,103,0,102,95,109,97,114,103,95,108,105,115,116,0,102,95,109,97,114,103,115,0,98,108,111,99,107,95,112,97,114,97,109,0,111,112,116,95,98,108,111,99,107,95,112,97,114,97,109,0,98,108,111,99,107,95,112,97,114,97,109,95,100,101,102,0,111,112,116,95,98,118,95,100,101,99,108,0,98,118,95,100,101,99,108,115,0,98,118,97,114,0,102,95,108,97,114,103,108,105,115,116,0,108,97,109,98,100,97,95,98,111,100,121,0,100,111,95,98,108,111,99,107,0,36,64,50,55,0,98,108,111,99,107,95,99,97,108,108,0,109,101,116,104,111,100,95,99,97,108,108,0,98,114,97,99,101,95,98,108,111,99,107,0,64,50,56,0,64,50,57,0,99,97,115,101,95,98,111,100,121,0,99,97,115,101,115,0,111,112,116,95,114,101,115,99,117,101,0,101,120,99,95,108,105,115,116,0,101,120,99,95,118,97,114,0,111,112,116,95,101,110,115,117,114,101,0,108,105,116,101,114,97,108,0,115,116,114,105,110,103,0,115,116,114,105,110,103,95,114,101,112,0,115,116,114,105,110,103,95,105,110,116,101,114,112,0,64,51,48,0,120,115,116,114,105,110,103,0,114,101,103,101,120,112,0,104,101,114,101,100,111,99,0,111,112,116,95,104,101,114,101,100,111,99,95,98,111,100,105,101,115,0,104,101,114,101,100,111,99,95,98,111,100,105,101,115,0,104,101,114,101,100,111,99,95,98,111,100,121,0,104,101,114,101,100,111,99,95,115,116,114,105,110,103,95,114,101,112,0,104,101,114,101,100,111,99,95,115,116,114,105,110,103,95,105,110,116,101,114,112,0,64,51,49,0,119,111,114,100,115,0,115,121,109,98,111,108,0,98,97,115,105,99,95,115,121,109,98,111,108,0,115,121,109,0,115,121,109,98,111,108,115,0,110,117,109,101,114,105,99,0,118,97,114,105,97,98,108,101,0,118,97,114,95,108,104,115,0,118,97,114,95,114,101,102,0,98,97,99,107,114,101,102,0,36,64,51,50,0,102,95,97,114,103,108,105,115,116,0,102,95,97,114,103,115,0,102,95,98,97,100,95,97,114,103,0,102,95,110,111,114,109,95,97,114,103,0,102,95,97,114,103,95,105,116,101,109,0,102,95,97,114,103,0,102,95,111,112,116,95,97,115,103,110,0,102,95,111,112,116,0,102,95,98,108,111,99,107,95,111,112,116,0,102,95,98,108,111,99,107,95,111,112,116,97,114,103,0,102,95,111,112,116,97,114,103,0,114,101,115,116,97,114,103,95,109,97,114,107,0,102,95,114,101,115,116,95,97,114,103,0,98,108,107,97,114,103,95,109,97,114,107,0,102,95,98,108,111,99,107,95,97,114,103,0,111,112,116,95,102,95,98,108,111,99,107,95,97,114,103,0,115,105,110,103,108,101,116,111,110,0,36,64,51,51,0,97,115,115,111,99,95,108,105,115,116,0,97,115,115,111,99,115,0,97,115,115,111,99,0,111,112,101,114,97,116,105,111,110,0,111,112,101,114,97,116,105,111,110,50,0,111,112,101,114,97,116,105,111,110,51,0,100,111,116,95,111,114,95,99,111,108,111,110,0,111,112,116,95,116,101,114,109,115,0,111,112,116,95,110,108,0,114,112,97,114,101,110,0,114,98,114,97,99,107,101,116,0,116,114,97,105,108,101,114,0,116,101,114,109,0,110,108,0,36,64,51,52,0,116,101,114,109,115,0,110,111,110,101,0,44,32,101,120,112,101,99,116,105,110,103,32,37,115,0,115,121,110,116,97,120,32,101,114,114,111,114,44,32,117,110,101,120,112,101,99,116,101,100,32,37,115,0,32,111,114,32,37,115,0,115,121,110,116,97,120,32,101,114,114,111,114,0,69,114,114,111,114,58,32,100,105,115,99,97,114,100,105,110,103,0,68,101,108,101,116,105,110,103,0,69,114,114,111,114,58,32,112,111,112,112,105,110,103,0,109,101,109,111,114,121,32,101,120,104,97,117,115,116,101,100,0,67,108,101,97,110,117,112,58,32,100,105,115,99,97,114,100,105,110,103,32,108,111,111,107,97,104,101,97,100,0,67,108,101,97,110,117,112,58,32,112,111,112,112,105,110,103,0,37,48,53,100,32,0,78,79,68,69,95,66,69,71,73,78,58,10,0,78,79,68,69,95,82,69,83,67,85,69,58,10,0,98,111,100,121,58,10,0,114,101,115,99,117,101,58,10,0,104,97,110,100,108,101,32,99,108,97,115,115,101,115,58,10,0,101,120,99,95,118,97,114,58,10,0,114,101,115,99,117,101,32,98,111,100,121,58,10,0,101,108,115,101,58,10,0,78,79,68,69,95,69,78,83,85,82,69,58,10,0,101,110,115,117,114,101,58,10,0,78,79,68,69,95,66,76,79,67,75,58,10,0,109,97,110,100,97,116,111,114,121,32,97,114,103,115,58,10,0,111,112,116,105,111,110,97,108,32,97,114,103,115,58,10,0,37,115,61,0,114,101,115,116,61,42,37,115,10,0,112,111,115,116,32,109,97,110,100,97,116,111,114,121,32,97,114,103,115,58,10,0,98,108,107,61,38,37,115,10,0,78,79,68,69,95,73,70,58,10,0,99,111,110,100,58,10,0,116,104,101,110,58,10,0,78,79,68,69,95,65,78,68,58,10,0,78,79,68,69,95,79,82,58,10,0,78,79,68,69,95,67,65,83,69,58,10,0,99,97,115,101,58,10,0,78,79,68,69,95,87,72,73,76,69,58,10,0,78,79,68,69,95,85,78,84,73,76,58,10,0,78,79,68,69,95,70,79,82,58,10,0,118,97,114,58,10,0,112,114,101,58,10,0,114,101,115,116,58,10,0,112,111,115,116,58,10,0,105,110,58,10,0,100,111,58,10,0,78,79,68,69,95,83,67,79,80,69,58,10,0,108,111,99,97,108,32,118,97,114,105,97,98,108,101,115,58,10,0,44,32,0,37,115,0,78,79,68,69,95,67,65,76,76,58,10,0,109,101,116,104,111,100,61,39,37,115,39,32,40,37,100,41,10,0,97,114,103,115,58,10,0,98,108,111,99,107,58,10,0,78,79,68,69,95,68,79,84,50,58,10,0,78,79,68,69,95,68,79,84,51,58,10,0,78,79,68,69,95,67,79,76,79,78,50,58,10,0,58,58,37,115,10,0,78,79,68,69,95,67,79,76,79,78,51,58,32,58,58,37,115,10,0,78,79,68,69,95,65,82,82,65,89,58,10,0,78,79,68,69,95,72,65,83,72,58,10,0,107,101,121,58,10,0,118,97,108,117,101,58,10,0,78,79,68,69,95,83,80,76,65,84,58,10,0,78,79,68,69,95,65,83,71,78,58,10,0,108,104,115,58,10,0,114,104,115,58,10,0,78,79,68,69,95,77,65,83,71,78,58,10,0,109,108,104,115,58,10,0,40,101,109,112,116,121,41,10,0,78,79,68,69,95,79,80,95,65,83,71,78,58,10,0,111,112,61,39,37,115,39,32,40,37,100,41,10,0,78,79,68,69,95,83,85,80,69,82,58,10,0,78,79,68,69,95,90,83,85,80,69,82,10,0,78,79,68,69,95,82,69,84,85,82,78,58,10,0,78,79,68,69,95,89,73,69,76,68,58,10,0,78,79,68,69,95,66,82,69,65,75,58,10,0,78,79,68,69,95,78,69,88,84,58,10,0,78,79,68,69,95,82,69,68,79,10,0,78,79,68,69,95,82,69,84,82,89,10,0,78,79,68,69,95,76,86,65,82,32,37,115,10,0,78,79,68,69,95,71,86,65,82,32,37,115,10,0,78,79,68,69,95,73,86,65,82,32,37,115,10,0,78,79,68,69,95,67,86,65,82,32,37,115,10,0,78,79,68,69,95,67,79,78,83,84,32,37,115,10,0,78,79,68,69,95,77,65,84,67,72,58,10,0,78,79,68,69,95,66,65,67,75,95,82,69,70,58,32,36,37,99,10,0,78,79,68,69,95,78,84,72,95,82,69,70,58,32,36,37,100,10,0,78,79,68,69,95,65,82,71,32,37,115,10,0,78,79,68,69,95,66,76,79,67,75,95,65,82,71,58,10,0,78,79,68,69,95,73,78,84,32,37,115,32,98,97,115,101,32,37,100,10,0,78,79,68,69,95,70,76,79,65,84,32,37,115,10,0,78,79,68,69,95,78,69,71,65,84,69,10,0,78,79,68,69,95,83,84,82,32,34,37,115,34,32,108,101,110,32,37,100,10,0,78,79,68,69,95,68,83,84,82,10,0,78,79,68,69,95,88,83,84,82,32,34,37,115,34,32,108,101,110,32,37,100,10,0,78,79,68,69,95,68,88,83,84,82,10,0,78,79,68,69,95,82,69,71,88,32,47,37,115,47,37,115,10,0,78,79,68,69,95,68,82,69,71,88,10,0,116,97,105,108,58,32,37,115,10,0,111,112,116,58,32,37,115,10,0,78,79,68,69,95,83,89,77,32,58,37,115,10,0,78,79,68,69,95,83,69,76,70,10,0,78,79,68,69,95,78,73,76,10,0,78,79,68,69,95,84,82,85,69,10,0,78,79,68,69,95,70,65,76,83,69,10,0,78,79,68,69,95,65,76,73,65,83,32,37,115,32,37,115,58,10,0,78,79,68,69,95,85,78,68,69,70,0,32,37,115,0,58,10,0,78,79,68,69,95,67,76,65,83,83,58,10,0,58,37,115,10,0,115,117,112,101,114,58,10,0,78,79,68,69,95,77,79,68,85,76,69,58,10,0,78,79,68,69,95,83,67,76,65,83,83,58,10,0,78,79,68,69,95,68,69,70,58,10,0,37,115,10,0,78,79,68,69,95,83,68,69,70,58,10,0,78,79,68,69,95,80,79,83,84,69,88,69,58,10,0,78,79,68,69,95,72,69,82,69,68,79,67,58,10,0,110,111,100,101,32,116,121,112,101,58,32,37,100,32,40,48,120,37,120,41,10,0,109,101,109,111,114,121,32,97,108,108,111,99,97,116,105,111,110,32,101,114,114,111,114,0,108,105,110,101,32,37,100,58,32,37,115,10,0,99,111,100,101,103,101,110,32,101,114,114,111,114,0,97,114,114,97,121,32,115,105,122,101,32,116,111,111,32,98,105,103,0,105,110,100,101,120,32,37,83,32,111,117,116,32,111,102,32,97,114,114,97,121,0,110,101,103,97,116,105,118,101,32,108,101,110,103,116,104,32,40,37,83,41,0,105,110,100,101,120,32,105,115,32,111,117,116,32,111,102,32,97,114,114,97,121,0,116,111,95,97,0,114,101,99,117,114,115,105,118,101,32,97,114,114,97,121,32,106,111,105,110,0,43,0,97,0,105,0,110,101,103,97,116,105,118,101,32,97,114,103,117,109,101,110,116,0,60,60,0,111,124,105,0,105,42,0,91,93,61,0,111,111,124,111,0,99,108,101,97,114,0,99,111,110,99,97,116,0,100,101,108,101,116,101,95,97,116,0,101,109,112,116,121,63,0,124,105,0,110,101,103,97,116,105,118,101,32,97,114,114,97,121,32,115,105,122,101,0,105,110,100,101,120,0,65,0,106,111,105,110,0,124,83,33,0,108,101,110,103,116,104,0,112,111,112,0,112,117,115,104,0,114,101,112,108,97,99,101,0,114,101,118,101,114,115,101,0,114,101,118,101,114,115,101,33,0,114,105,110,100,101,120,0,115,104,105,102,116,0,115,105,122,101,0,115,108,105,99,101,0,117,110,115,104,105,102,116,0,95,95,97,114,121,95,101,113,0,95,95,97,114,121,95,99,109,112,0,95,95,97,114,121,95,105,110,100,101,120,0,35,0,40,117,110,107,110,111,119,110,41,0,58,105,110,32,0,2,8,32,128,1,4,16,64,3,12,48,192,95,95,111,117,116,101,114,95,95,0,95,95,99,108,97,115,115,105,100,95,95,0,37,83,32,105,115,32,110,111,116,32,97,32,99,108,97,115,115,47,109,111,100,117,108,101,0,110,111,32,115,117,112,101,114,32,99,108,97,115,115,32,102,111,114,32,39,37,83,39,44,32,79,98,106,101,99,116,32,97,115,115,117,109,101,100,0,115,117,112,101,114,99,108,97,115,115,32,109,105,115,109,97,116,99,104,32,102,111,114,32,67,108,97,115,115,32,37,83,32,40,37,83,32,110,111,116,32,37,83,41,0,115,117,112,101,114,99,108,97,115,115,32,109,117,115,116,32,98,101,32,97,32,67,108,97,115,115,32,40,37,83,32,103,105,118,101,110,41,0,99,97,110,39,116,32,109,97,107,101,32,115,117,98,99,108,97,115,115,32,111,102,32,115,105,110,103,108,101,116,111,110,32,99,108,97,115,115,0,99,97,110,39,116,32,109,97,107,101,32,115,117,98,99,108,97,115,115,32,111,102,32,67,108,97,115,115,0,105,110,104,101,114,105,116,101,100,0,78,111,116,73,109,112,108,101,109,101,110,116,101,100,69,114,114,111,114,0,119,114,111,110,103,32,110,117,109,98,101,114,32,111,102,32,97,114,103,117,109,101,110,116,115,0,37,83,32,105,115,32,110,111,116,32,99,108,97,115,115,47,109,111,100,117,108,101,0,83,116,114,105,110,103,0,116,111,95,115,116,114,0,101,120,112,101,99,116,101,100,32,37,83,0,65,114,114,97,121,0,116,111,95,97,114,121,0,72,97,115,104,0,116,111,95,104,97,115,104,0,82,97,110,103,101,69,114,114,111,114,0,102,108,111,97,116,32,116,111,111,32,98,105,103,32,102,111,114,32,105,110,116,0,110,111,32,105,109,112,108,105,99,105,116,32,99,111,110,118,101,114,115,105,111,110,32,111,102,32,83,116,114,105,110,103,32,105,110,116,111,32,73,110,116,101,103,101,114,0,105,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,32,115,112,101,99,105,102,105,101,114,32,37,83,0,99,121,99,108,105,99,32,105,110,99,108,117,100,101,32,100,101,116,101,99,116,101,100,0,99,121,99,108,105,99,32,112,114,101,112,101,110,100,32,100,101,116,101,99,116,101,100,0,99,97,110,39,116,32,100,101,102,105,110,101,32,115,105,110,103,108,101,116,111,110,0,117,110,100,101,102,105,110,101,100,32,109,101,116,104,111,100,32,39,37,83,39,32,102,111,114,32,99,108,97,115,115,32,37,83,0,42,38,0,99,97,110,39,116,32,99,114,101,97,116,101,32,105,110,115,116,97,110,99,101,32,111,102,32,115,105,110,103,108,101,116,111,110,32,99,108,97,115,115,0,117,110,100,101,102,105,110,101,100,32,109,101,116,104,111,100,32,39,37,83,39,32,102,111,114,32,37,83,0,95,95,99,108,97,115,115,112,97,116,104,95,95,0,35,60,67,108,97,115,115,58,0,62,0,58,58,0,117,110,100,101,102,105,110,101,100,32,109,101,116,104,111,100,32,39,37,83,39,32,102,111,114,32,99,108,97,115,115,32,39,37,83,39,0,66,97,115,105,99,79,98,106,101,99,116,0,79,98,106,101,99,116,0,77,111,100,117,108,101,0,67,108,97,115,115,0,80,114,111,99,0,33,0,109,101,116,104,111,100,95,109,105,115,115,105,110,103,0,110,42,0,124,67,38,0,115,117,112,101,114,99,108,97,115,115,0,99,108,97,115,115,95,118,97,114,105,97,98,108,101,95,100,101,102,105,110,101,100,63,0,39,37,83,39,32,105,115,32,110,111,116,32,97,108,108,111,119,101,100,32,97,115,32,97,32,99,108,97,115,115,32,118,97,114,105,97,98,108,101,32,110,97,109,101,0,99,108,97,115,115,95,118,97,114,105,97,98,108,101,95,103,101,116,0,99,108,97,115,115,95,118,97,114,105,97,98,108,101,95,115,101,116,0,112,114,101,112,101,110,100,0,112,114,101,112,101,110,100,95,102,101,97,116,117,114,101,115,0,112,114,101,112,101,110,100,101,100,0,105,110,99,108,117,100,101,0,97,112,112,101,110,100,95,102,101,97,116,117,114,101,115,0,105,110,99,108,117,100,101,100,0,99,108,97,115,115,95,101,118,97,108,0,105,110,99,108,117,100,101,100,95,109,111,100,117,108,101,115,0,124,38,0,105,110,115,116,97,110,99,101,95,109,101,116,104,111,100,115,0,109,101,116,104,111,100,95,100,101,102,105,110,101,100,63,0,109,111,100,117,108,101,95,101,118,97,108,0,109,111,100,117,108,101,95,102,117,110,99,116,105,111,110,0,112,114,105,118,97,116,101,0,112,114,111,116,101,99,116,101,100,0,112,117,98,108,105,99,0,114,101,109,111,118,101,95,99,108,97,115,115,95,118,97,114,105,97,98,108,101,0,99,97,110,110,111,116,32,114,101,109,111,118,101,32,37,83,32,102,111,114,32,37,83,0,99,108,97,115,115,32,118,97,114,105,97,98,108,101,32,37,83,32,110,111,116,32,100,101,102,105,110,101,100,32,102,111,114,32,37,83,0,114,101,109,111,118,101,95,109,101,116,104,111,100,0,109,101,116,104,111,100,95,114,101,109,111,118,101,100,0,109,101,116,104,111,100,32,39,37,83,39,32,110,111,116,32,100,101,102,105,110,101,100,32,105,110,32,37,83,0,97,116,116,114,95,114,101,97,100,101,114,0,64,0,97,116,116,114,95,119,114,105,116,101,114,0,61,0,35,60,77,111,100,117,108,101,58,0,35,60,63,63,63,63,63,63,58,0,110,110,0,97,110,99,101,115,116,111,114,115,0,99,111,110,115,116,95,100,101,102,105,110,101,100,63,0,110,124,98,0,119,114,111,110,103,32,99,111,110,115,116,97,110,116,32,110,97,109,101,32,37,83,0,99,111,110,115,116,95,103,101,116,0,99,111,110,115,116,95,115,101,116,0,99,111,110,115,116,97,110,116,115,0,114,101,109,111,118,101,95,99,111,110,115,116,0,99,111,110,115,116,97,110,116,32,37,83,32,110,111,116,32,100,101,102,105,110,101,100,0,99,111,110,115,116,95,109,105,115,115,105,110,103,0,117,110,105,110,105,116,105,97,108,105,122,101,100,32,99,111,110,115,116,97,110,116,32,37,83,58,58,37,83,0,117,110,105,110,105,116,105,97,108,105,122,101,100,32,99,111,110,115,116,97,110,116,32,37,83,0,100,101,102,105,110,101,95,109,101,116,104,111,100,0,99,108,97,115,115,95,118,97,114,105,97,98,108,101,115,0,77,111,100,117,108,101,46,99,111,110,115,116,97,110,116,115,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,105,114,101,112,32,37,112,32,110,114,101,103,115,61,37,100,32,110,108,111,99,97,108,115,61,37,100,32,112,111,111,108,115,61,37,100,32,115,121,109,115,61,37,100,32,114,101,112,115,61,37,100,10,0,102,105,108,101,58,32,37,115,10,0,32,32,32,32,32,32,0,37,53,100,32,0,37,48,51,100,32,0,79,80,95,78,79,80,10,0,79,80,95,77,79,86,69,9,82,37,100,9,82,37,100,9,0,10,0,9,59,32,0,32,0,82,37,100,58,37,115,0,79,80,95,76,79,65,68,76,9,82,37,100,9,76,40,37,100,41,9,59,32,37,115,0,79,80,95,76,79,65,68,73,9,82,37,100,9,37,100,9,0,79,80,95,76,79,65,68,83,89,77,9,82,37,100,9,58,37,115,0,79,80,95,76,79,65,68,78,73,76,9,82,37,100,9,9,0,79,80,95,76,79,65,68,83,69,76,70,9,82,37,100,9,9,0,79,80,95,76,79,65,68,84,9,82,37,100,9,9,0,79,80,95,76,79,65,68,70,9,82,37,100,9,9,0,79,80,95,71,69,84,71,76,79,66,65,76,9,82,37,100,9,58,37,115,0,79,80,95,83,69,84,71,76,79,66,65,76,9,58,37,115,9,82,37,100,9,0,79,80,95,71,69,84,67,79,78,83,84,9,82,37,100,9,58,37,115,0,79,80,95,83,69,84,67,79,78,83,84,9,58,37,115,9,82,37,100,9,0,79,80,95,71,69,84,77,67,78,83,84,9,82,37,100,9,82,37,100,58,58,37,115,0,79,80,95,83,69,84,77,67,78,83,84,9,82,37,100,58,58,37,115,9,82,37,100,0,79,80,95,71,69,84,73,86,9,82,37,100,9,37,115,0,79,80,95,83,69,84,73,86,9,37,115,9,82,37,100,0,79,80,95,71,69,84,85,80,86,65,82,9,82,37,100,9,37,100,9,37,100,0,79,80,95,83,69,84,85,80,86,65,82,9,82,37,100,9,37,100,9,37,100,0,79,80,95,71,69,84,67,86,9,82,37,100,9,37,115,0,79,80,95,83,69,84,67,86,9,37,115,9,82,37,100,0,79,80,95,74,77,80,9,37,48,51,100,10,0,79,80,95,74,77,80,73,70,9,82,37,100,9,37,48,51,100,10,0,79,80,95,74,77,80,78,79,84,9,82,37,100,9,37,48,51,100,10,0,79,80,95,83,69,78,68,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,83,69,78,68,66,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,84,65,73,76,67,65,76,76,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,83,85,80,69,82,9,82,37,100,9,37,100,10,0,79,80,95,65,82,71,65,82,89,9,82,37,100,9,37,100,58,37,100,58,37,100,58,37,100,0,79,80,95,69,78,84,69,82,9,37,100,58,37,100,58,37,100,58,37,100,58,37,100,58,37,100,58,37,100,10,0,79,80,95,82,69,84,85,82,78,9,82,37,100,0,9,114,101,116,117,114,110,9,0,9,98,114,101,97,107,9,0,9,98,114,111,107,101,110,9,0,79,80,95,66,76,75,80,85,83,72,9,82,37,100,9,37,100,58,37,100,58,37,100,58,37,100,0,79,80,95,76,65,77,66,68,65,9,82,37,100,9,73,40,37,43,100,41,9,37,100,0,79,80,95,82,65,78,71,69,9,82,37,100,9,82,37,100,9,37,100,0,79,80,95,77,69,84,72,79,68,9,82,37,100,9,58,37,115,0,79,80,95,65,68,68,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,65,68,68,73,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,83,85,66,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,83,85,66,73,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,77,85,76,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,68,73,86,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,76,84,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,76,69,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,71,84,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,71,69,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,69,81,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,83,84,79,80,10,0,79,80,95,65,82,82,65,89,9,82,37,100,9,82,37,100,9,37,100,0,79,80,95,65,82,89,67,65,84,9,82,37,100,9,82,37,100,9,0,79,80,95,65,82,89,80,85,83,72,9,82,37,100,9,82,37,100,9,0,79,80,95,65,82,69,70,9,82,37,100,9,82,37,100,9,37,100,0,79,80,95,65,80,79,83,84,9,82,37,100,9,37,100,9,37,100,0,79,80,95,83,84,82,73,78,71,9,82,37,100,9,76,40,37,100,41,9,59,32,37,115,0,79,80,95,83,84,82,67,65,84,9,82,37,100,9,82,37,100,9,0,79,80,95,72,65,83,72,9,82,37,100,9,82,37,100,9,37,100,0,79,80,95,79,67,76,65,83,83,9,82,37,100,9,9,0,79,80,95,67,76,65,83,83,9,82,37,100,9,58,37,115,0,79,80,95,77,79,68,85,76,69,9,82,37,100,9,58,37,115,0,79,80,95,69,88,69,67,9,82,37,100,9,73,40,37,43,100,41,0,79,80,95,83,67,76,65,83,83,9,82,37,100,9,82,37,100,9,0,79,80,95,84,67,76,65,83,83,9,82,37,100,9,9,0,79,80,95,69,82,82,9,37,115,10,0,79,80,95,69,80,85,83,72,9,58,73,40,37,43,100,41,10,0,79,80,95,79,78,69,82,82,9,37,48,51,100,10,0,79,80,95,82,69,83,67,85,69,9,82,37,100,9,9,0,79,80,95,82,65,73,83,69,9,82,37,100,9,9,0,79,80,95,80,79,80,69,82,82,9,37,100,9,9,0,79,80,95,69,80,79,80,9,37,100,10,0,79,80,95,117,110,107,110,111,119,110,32,37,100,9,37,100,9,37,100,9,37,100,10,0,99,105,105,100,120,0,102,105,108,101,0,108,105,110,101,0,78,97,109,101,69,114,114,111,114,0,119,97,114,110,105,110,103,58,32,0,98,117,103,58,32,0,101,120,99,101,112,116,105,111,110,0,101,120,99,101,112,116,105,111,110,32,99,108,97,115,115,47,111,98,106,101,99,116,32,101,120,112,101,99,116,101,100,0,119,114,111,110,103,32,110,117,109,98,101,114,32,111,102,32,97,114,103,117,109,101,110,116,115,32,40,37,83,32,102,111,114,32,48,46,46,51,41,0,101,120,99,101,112,116,105,111,110,32,111,98,106,101,99,116,32,101,120,112,101,99,116,101,100,0,115,101,116,95,98,97,99,107,116,114,97,99,101,0,78,111,77,101,116,104,111,100,69,114,114,111,114,0,110,101,119,0,69,120,99,101,112,116,105,111,110,0,124,111,0,109,101,115,103,0,109,101,115,115,97,103,101,0,58,0,58,32,0,32,40,0,41,0,98,97,99,107,116,114,97,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,83,99,114,105,112,116,69,114,114,111,114,0,83,121,110,116,97,120,69,114,114,111,114,0,83,121,115,116,101,109,83,116,97,99,107,69,114,114,111,114,0,119,114,111,110,103,32,97,114,103,117,109,101,110,116,32,116,121,112,101,32,37,83,32,40,101,120,112,101,99,116,101,100,32,37,83,41,0,117,110,105,110,105,116,105,97,108,105,122,101,100,32,37,83,32,40,101,120,112,101,99,116,101,100,32,37,83,41,0,99,97,110,39,116,32,99,108,111,110,101,32,37,83,0,99,97,110,39,116,32,99,108,111,110,101,32,115,105,110,103,108,101,116,111,110,32,99,108,97,115,115,0,95,95,97,116,116,97,99,104,101,100,95,95,0,99,97,110,39,116,32,100,117,112,32,37,83,0,99,97,110,39,116,32,100,117,112,32,115,105,110,103,108,101,116,111,110,32,99,108,97,115,115,0,2,8,32,128,1,4,16,64,3,12,48,192,124,111,111,0,82,117,110,116,105,109,101,69,114,114,111,114,0,108,97,115,116,112,99,0,98,108,111,99,107,95,103,105,118,101,110,63,0,103,108,111,98,97,108,95,118,97,114,105,97,98,108,101,115,0,105,116,101,114,97,116,111,114,63,0,108,111,99,97,108,95,118,97,114,105,97,98,108,101,115,0,114,97,105,115,101,0,115,105,110,103,108,101,116,111,110,95,99,108,97,115,115,0,33,61,0,95,95,105,100,95,95,0,95,95,115,101,110,100,95,95,0,99,108,97,115,115,0,99,108,111,110,101,0,100,117,112,0,101,113,117,97,108,63,0,101,120,116,101,110,100,0,42,0,119,114,111,110,103,32,110,117,109,98,101,114,32,111,102,32,97,114,103,117,109,101,110,116,115,32,40,97,116,32,108,101,97,115,116,32,49,41,0,101,120,116,101,110,100,95,111,98,106,101,99,116,0,101,120,116,101,110,100,101,100,0,104,97,115,104,0,105,110,105,116,105,97,108,105,122,101,95,99,111,112,121,32,115,104,111,117,108,100,32,116,97,107,101,32,115,97,109,101,32,99,108,97,115,115,32,111,98,106,101,99,116,0,105,110,115,116,97,110,99,101,95,101,118,97,108,0,105,110,115,116,97,110,99,101,95,111,102,63,0,67,0,105,110,115,116,97,110,99,101,95,118,97,114,105,97,98,108,101,95,100,101,102,105,110,101,100,63,0,110,0,105,110,115,116,97,110,99,101,95,118,97,114,105,97,98,108,101,95,103,101,116,0,105,110,115,116,97,110,99,101,95,118,97,114,105,97,98,108,101,95,115,101,116,0,110,111,0,105,110,115,116,97,110,99,101,95,118,97,114,105,97,98,108,101,115,0,105,115,95,97,63,0,107,105,110,100,95,111,102,63,0,109,101,116,104,111,100,115,0,124,98,0,110,105,108,63,0,111,98,106,101,99,116,95,105,100,0,112,114,105,118,97,116,101,95,109,101,116,104,111,100,115,0,112,114,111,116,101,99,116,101,100,95,109,101,116,104,111,100,115,0,112,117,98,108,105,99,95,109,101,116,104,111,100,115,0,114,101,109,111,118,101,95,105,110,115,116,97,110,99,101,95,118,97,114,105,97,98,108,101,0,105,110,115,116,97,110,99,101,32,118,97,114,105,97,98,108,101,32,37,83,32,110,111,116,32,100,101,102,105,110,101,100,0,114,101,115,112,111,110,100,95,116,111,63,0,111,124,98,0,37,83,32,105,115,32,110,111,116,32,97,32,115,121,109,98,111,108,0,114,101,115,112,111,110,100,95,116,111,95,109,105,115,115,105,110,103,63,0,115,101,110,100,0,115,105,110,103,108,101,116,111,110,95,109,101,116,104,111,100,115,0,100,101,102,105,110,101,95,115,105,110,103,108,101,116,111,110,95,109,101,116,104,111,100,0,110,38,0,110,111,32,98,108,111,99,107,32,103,105,118,101,110,0,67,97,110,39,116,32,103,101,116,32,99,102,117,110,99,32,101,110,118,32,102,114,111,109,32,110,111,110,45,99,102,117,110,99,32,112,114,111,99,46,0,67,97,110,39,116,32,103,101,116,32,99,102,117,110,99,32,101,110,118,32,102,114,111,109,32,99,102,117,110,99,32,80,114,111,99,32,119,105,116,104,111,117,116,32,82,69,110,118,46,0,73,110,100,101,120,69,114,114,111,114,0,69,110,118,32,105,110,100,101,120,32,111,117,116,32,111,102,32,114,97,110,103,101,58,32,37,83,32,40,101,120,112,101,99,116,101,100,58,32,48,32,60,61,32,105,110,100,101,120,32,60,32,37,83,41,0,38,0,116,114,105,101,100,32,116,111,32,99,114,101,97,116,101,32,80,114,111,99,32,111,98,106,101,99,116,32,119,105,116,104,111,117,116,32,97,32,98,108,111,99,107,0,110,111,116,32,97,32,112,114,111,99,0,97,114,105,116,121,0,91,93,0,108,97,109,98,100,97,0,60,61,62,0,65,114,103,117,109,101,110,116,69,114,114,111,114,0,98,97,100,32,118,97,108,117,101,32,102,111,114,32,114,97,110,103,101,0,82,97,110,103,101,0,111,111,124,98,0,111,0,61,61,0,84,121,112,101,69,114,114,111,114,0,98,101,103,105,110,0,101,110,100,0,101,120,99,108,117,100,101,95,101,110,100,63,0,102,105,114,115,116,0,105,110,99,108,117,100,101,63,0,105,110,105,116,105,97,108,105,122,101,0,108,97,115,116,0,109,101,109,98,101,114,63,0,116,111,95,115,0,46,46,46,0,105,110,115,112,101,99,116,0,101,113,108,63,0,105,110,105,116,105,97,108,105,122,101,95,99,111,112,121,0,119,114,111,110,103,32,97,114,103,117,109,101,110,116,32,99,108,97,115,115,0,49,46,50,46,48,0,49,46,57,0,82,85,66,89,95,86,69,82,83,73,79,78,0,109,114,117,98,121,0,82,85,66,89,95,69,78,71,73,78,69,0,82,85,66,89,95,69,78,71,73,78,69,95,86,69,82,83,73,79,78,0,77,82,85,66,89,95,86,69,82,83,73,79,78,0,77,82,85,66,89,95,82,69,76,69,65,83,69,95,78,79,0,50,48,49,53,45,49,49,45,49,55,0,77,82,85,66,89,95,82,69,76,69,65,83,69,95,68,65,84,69,0,109,114,117,98,121,32,49,46,50,46,48,32,40,50,48,49,53,45,49,49,45,49,55,41,32,0,77,82,85,66,89,95,68,69,83,67,82,73,80,84,73,79,78,0,109,114,117,98,121,32,45,32,67,111,112,121,114,105,103,104,116,32,40,99,41,32,50,48,49,48,45,50,48,49,53,32,109,114,117,98,121,32,100,101,118,101,108,111,112,101,114,115,0,77,82,85,66,89,95,67,79,80,89,82,73,71,72,84,0,109,114,98,95,114,101,97,108,108,111,99,0,99,111,100,101,103,101,110,32,101,114,114,111,114,58,37,115,58,37,100,58,32,37,115,10,0,99,111,100,101,103,101,110,32,101,114,114,111,114,58,32,37,115,10,0,116,111,111,32,99,111,109,112,108,101,120,32,101,120,112,114,101,115,115,105,111,110,0,112,111,111,108,32,109,101,109,111,114,121,32,97,108,108,111,99,97,116,105,111,110,0,98,117,103,58,32,100,105,115,112,97,116,99,104,32,111,110,32,110,111,110,32,74,77,80,32,111,112,10,0,83,116,97,110,100,97,114,100,69,114,114,111,114,0,116,111,111,32,109,97,110,121,32,115,121,109,98,111,108,115,32,40,109,97,120,32,50,53,54,41,0,95,95,99,97,115,101,95,101,113,113,0,61,61,61,0,117,110,107,110,111,119,110,32,108,104,115,32,37,100,10,0,117,110,101,120,112,101,99,116,101,100,32,115,99,111,112,101,0,109,114,98,95,109,97,108,108,111,99,0,101,97,99,104,0,95,95,117,112,100,97,116,101,0,99,97,108,108,0,117,110,101,120,112,101,99,116,101,100,32,98,114,101,97,107,0,117,110,101,120,112,101,99,116,101,100,32,110,101,120,116,0,117,110,101,120,112,101,99,116,101,100,32,114,101,100,111,0,117,110,101,120,112,101,99,116,101,100,32,114,101,116,114,121,0,36,0,109,97,108,102,111,114,109,101,100,32,114,101,97,100,105,110,116,32,105,110,112,117,116,0,45,0,105,110,116,101,114,110,0,75,101,114,110,101,108,0,96,0,82,101,103,101,120,112,0,99,111,109,112,105,108,101,0,97,108,105,97,115,95,109,101,116,104,111,100,0,117,110,100,101,102,95,109,101,116,104,111,100,0,67,111,109,112,97,114,97,98,108,101,0,69,110,117,109,101,114,97,98,108,101,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,255,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,4,7,3,6,5,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,45,43,32,32,32,48,88,48,120,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+61440);
+/* memory initializer */ allocate([32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,78,65,78,0,46,0,105,110,102,105,110,105,116,121,0,110,97,110,0,114,119,97,0], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+71680);
+
+
+
+
+
+/* no memory initializer */
+var tempDoublePtr = STATICTOP; STATICTOP += 16;
+
+assert(tempDoublePtr % 8 == 0);
+
+function copyTempFloat(ptr) { // functions, because inlining this code increases code size too much
+
+  HEAP8[tempDoublePtr] = HEAP8[ptr];
+
+  HEAP8[tempDoublePtr+1] = HEAP8[ptr+1];
+
+  HEAP8[tempDoublePtr+2] = HEAP8[ptr+2];
+
+  HEAP8[tempDoublePtr+3] = HEAP8[ptr+3];
+
+}
+
+function copyTempDouble(ptr) {
+
+  HEAP8[tempDoublePtr] = HEAP8[ptr];
+
+  HEAP8[tempDoublePtr+1] = HEAP8[ptr+1];
+
+  HEAP8[tempDoublePtr+2] = HEAP8[ptr+2];
+
+  HEAP8[tempDoublePtr+3] = HEAP8[ptr+3];
+
+  HEAP8[tempDoublePtr+4] = HEAP8[ptr+4];
+
+  HEAP8[tempDoublePtr+5] = HEAP8[ptr+5];
+
+  HEAP8[tempDoublePtr+6] = HEAP8[ptr+6];
+
+  HEAP8[tempDoublePtr+7] = HEAP8[ptr+7];
+
+}
+
+// {{PRE_LIBRARY}}
+
+
+   
+  Module["_i64Subtract"] = _i64Subtract;
+
+   
+  Module["_i64Add"] = _i64Add;
+
+   
+  Module["_memset"] = _memset;
+
+   
+  Module["_bitshift64Shl"] = _bitshift64Shl;
+
+  function _abort() {
+      Module['abort']();
+    }
+
+  function ___lock() {}
+
+  function ___unlock() {}
+
+  var _llvm_fabs_f64=Math_abs;
+
+  
+  function _realloc() { throw 'bad' }
+  Module["_realloc"] = _realloc; 
+  Module["_saveSetjmp"] = _saveSetjmp;
+
+  
+  function __exit(status) {
+      // void _exit(int status);
+      // http://pubs.opengroup.org/onlinepubs/000095399/functions/exit.html
+      Module['exit'](status);
+    }function _exit(status) {
+      __exit(status);
+    }
+
+  
+  
+  function _emscripten_set_main_loop_timing(mode, value) {
+      Browser.mainLoop.timingMode = mode;
+      Browser.mainLoop.timingValue = value;
+  
+      if (!Browser.mainLoop.func) {
+        console.error('emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up.');
+        return 1; // Return non-zero on failure, can't set timing mode when there is no main loop.
+      }
+  
+      if (mode == 0 /*EM_TIMING_SETTIMEOUT*/) {
+        Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setTimeout() {
+          var timeUntilNextTick = Math.max(0, Browser.mainLoop.tickStartTime + value - _emscripten_get_now())|0;
+          setTimeout(Browser.mainLoop.runner, timeUntilNextTick); // doing this each time means that on exception, we stop
+        };
+        Browser.mainLoop.method = 'timeout';
+      } else if (mode == 1 /*EM_TIMING_RAF*/) {
+        Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_rAF() {
+          Browser.requestAnimationFrame(Browser.mainLoop.runner);
+        };
+        Browser.mainLoop.method = 'rAF';
+      } else if (mode == 2 /*EM_TIMING_SETIMMEDIATE*/) {
+        if (!window['setImmediate']) {
+          // Emulate setImmediate. (note: not a complete polyfill, we don't emulate clearImmediate() to keep code size to minimum, since not needed)
+          var setImmediates = [];
+          var emscriptenMainLoopMessageId = '__emcc';
+          function Browser_setImmediate_messageHandler(event) {
+            if (event.source === window && event.data === emscriptenMainLoopMessageId) {
+              event.stopPropagation();
+              setImmediates.shift()();
+            }
+          }
+          window.addEventListener("message", Browser_setImmediate_messageHandler, true);
+          window['setImmediate'] = function Browser_emulated_setImmediate(func) {
+            setImmediates.push(func);
+            window.postMessage(emscriptenMainLoopMessageId, "*");
+          }
+        }
+        Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setImmediate() {
+          window['setImmediate'](Browser.mainLoop.runner);
+        };
+        Browser.mainLoop.method = 'immediate';
+      }
+      return 0;
+    }
+  
+  function _emscripten_get_now() { abort() }function _emscripten_set_main_loop(func, fps, simulateInfiniteLoop, arg, noSetTiming) {
+      Module['noExitRuntime'] = true;
+  
+      assert(!Browser.mainLoop.func, 'emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.');
+  
+      Browser.mainLoop.func = func;
+      Browser.mainLoop.arg = arg;
+  
+      var browserIterationFunc;
+      if (typeof arg !== 'undefined') {
+        var argArray = [arg];
+        browserIterationFunc = function() {
+          Runtime.dynCall('vi', func, argArray);
+        };
+      } else {
+        browserIterationFunc = function() {
+          Runtime.dynCall('v', func);
+        };
+      }
+  
+      var thisMainLoopId = Browser.mainLoop.currentlyRunningMainloop;
+  
+      Browser.mainLoop.runner = function Browser_mainLoop_runner() {
+        if (ABORT) return;
+        if (Browser.mainLoop.queue.length > 0) {
+          var start = Date.now();
+          var blocker = Browser.mainLoop.queue.shift();
+          blocker.func(blocker.arg);
+          if (Browser.mainLoop.remainingBlockers) {
+            var remaining = Browser.mainLoop.remainingBlockers;
+            var next = remaining%1 == 0 ? remaining-1 : Math.floor(remaining);
+            if (blocker.counted) {
+              Browser.mainLoop.remainingBlockers = next;
+            } else {
+              // not counted, but move the progress along a tiny bit
+              next = next + 0.5; // do not steal all the next one's progress
+              Browser.mainLoop.remainingBlockers = (8*remaining + next)/9;
+            }
+          }
+          console.log('main loop blocker "' + blocker.name + '" took ' + (Date.now() - start) + ' ms'); //, left: ' + Browser.mainLoop.remainingBlockers);
+          Browser.mainLoop.updateStatus();
+          
+          // catches pause/resume main loop from blocker execution
+          if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return;
+          
+          setTimeout(Browser.mainLoop.runner, 0);
+          return;
+        }
+  
+        // catch pauses from non-main loop sources
+        if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return;
+  
+        // Implement very basic swap interval control
+        Browser.mainLoop.currentFrameNumber = Browser.mainLoop.currentFrameNumber + 1 | 0;
+        if (Browser.mainLoop.timingMode == 1/*EM_TIMING_RAF*/ && Browser.mainLoop.timingValue > 1 && Browser.mainLoop.currentFrameNumber % Browser.mainLoop.timingValue != 0) {
+          // Not the scheduled time to render this frame - skip.
+          Browser.mainLoop.scheduler();
+          return;
+        } else if (Browser.mainLoop.timingMode == 0/*EM_TIMING_SETTIMEOUT*/) {
+          Browser.mainLoop.tickStartTime = _emscripten_get_now();
+        }
+  
+        // Signal GL rendering layer that processing of a new frame is about to start. This helps it optimize
+        // VBO double-buffering and reduce GPU stalls.
+  
+        if (Browser.mainLoop.method === 'timeout' && Module.ctx) {
+          Module.printErr('Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!');
+          Browser.mainLoop.method = ''; // just warn once per call to set main loop
+        }
+  
+        Browser.mainLoop.runIter(browserIterationFunc);
+  
+        checkStackCookie();
+  
+        // catch pauses from the main loop itself
+        if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) return;
+  
+        // Queue new audio data. This is important to be right after the main loop invocation, so that we will immediately be able
+        // to queue the newest produced audio samples.
+        // TODO: Consider adding pre- and post- rAF callbacks so that GL.newRenderingFrameStarted() and SDL.audio.queueNewAudioData()
+        //       do not need to be hardcoded into this function, but can be more generic.
+        if (typeof SDL === 'object' && SDL.audio && SDL.audio.queueNewAudioData) SDL.audio.queueNewAudioData();
+  
+        Browser.mainLoop.scheduler();
+      }
+  
+      if (!noSetTiming) {
+        if (fps && fps > 0) _emscripten_set_main_loop_timing(0/*EM_TIMING_SETTIMEOUT*/, 1000.0 / fps);
+        else _emscripten_set_main_loop_timing(1/*EM_TIMING_RAF*/, 1); // Do rAF by rendering each frame (no decimating)
+  
+        Browser.mainLoop.scheduler();
+      }
+  
+      if (simulateInfiniteLoop) {
+        throw 'SimulateInfiniteLoop';
+      }
+    }var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function () {
+          Browser.mainLoop.scheduler = null;
+          Browser.mainLoop.currentlyRunningMainloop++; // Incrementing this signals the previous main loop that it's now become old, and it must return.
+        },resume:function () {
+          Browser.mainLoop.currentlyRunningMainloop++;
+          var timingMode = Browser.mainLoop.timingMode;
+          var timingValue = Browser.mainLoop.timingValue;
+          var func = Browser.mainLoop.func;
+          Browser.mainLoop.func = null;
+          _emscripten_set_main_loop(func, 0, false, Browser.mainLoop.arg, true /* do not set timing and call scheduler, we will do it on the next lines */);
+          _emscripten_set_main_loop_timing(timingMode, timingValue);
+          Browser.mainLoop.scheduler();
+        },updateStatus:function () {
+          if (Module['setStatus']) {
+            var message = Module['statusMessage'] || 'Please wait...';
+            var remaining = Browser.mainLoop.remainingBlockers;
+            var expected = Browser.mainLoop.expectedBlockers;
+            if (remaining) {
+              if (remaining < expected) {
+                Module['setStatus'](message + ' (' + (expected - remaining) + '/' + expected + ')');
+              } else {
+                Module['setStatus'](message);
+              }
+            } else {
+              Module['setStatus']('');
+            }
+          }
+        },runIter:function (func) {
+          if (ABORT) return;
+          if (Module['preMainLoop']) {
+            var preRet = Module['preMainLoop']();
+            if (preRet === false) {
+              return; // |return false| skips a frame
+            }
+          }
+          try {
+            func();
+          } catch (e) {
+            if (e instanceof ExitStatus) {
+              return;
+            } else {
+              if (e && typeof e === 'object' && e.stack) Module.printErr('exception thrown: ' + [e, e.stack]);
+              throw e;
+            }
+          }
+          if (Module['postMainLoop']) Module['postMainLoop']();
+        }},isFullScreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:function () {
+        if (!Module["preloadPlugins"]) Module["preloadPlugins"] = []; // needs to exist even in workers
+  
+        if (Browser.initted) return;
+        Browser.initted = true;
+  
+        try {
+          new Blob();
+          Browser.hasBlobConstructor = true;
+        } catch(e) {
+          Browser.hasBlobConstructor = false;
+          console.log("warning: no blob constructor, cannot create blobs with mimetypes");
+        }
+        Browser.BlobBuilder = typeof MozBlobBuilder != "undefined" ? MozBlobBuilder : (typeof WebKitBlobBuilder != "undefined" ? WebKitBlobBuilder : (!Browser.hasBlobConstructor ? console.log("warning: no BlobBuilder") : null));
+        Browser.URLObject = typeof window != "undefined" ? (window.URL ? window.URL : window.webkitURL) : undefined;
+        if (!Module.noImageDecoding && typeof Browser.URLObject === 'undefined') {
+          console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available.");
+          Module.noImageDecoding = true;
+        }
+  
+        // Support for plugins that can process preloaded files. You can add more of these to
+        // your app by creating and appending to Module.preloadPlugins.
+        //
+        // Each plugin is asked if it can handle a file based on the file's name. If it can,
+        // it is given the file's raw data. When it is done, it calls a callback with the file's
+        // (possibly modified) data. For example, a plugin might decompress a file, or it
+        // might create some side data structure for use later (like an Image element, etc.).
+  
+        var imagePlugin = {};
+        imagePlugin['canHandle'] = function imagePlugin_canHandle(name) {
+          return !Module.noImageDecoding && /\.(jpg|jpeg|png|bmp)$/i.test(name);
+        };
+        imagePlugin['handle'] = function imagePlugin_handle(byteArray, name, onload, onerror) {
+          var b = null;
+          if (Browser.hasBlobConstructor) {
+            try {
+              b = new Blob([byteArray], { type: Browser.getMimetype(name) });
+              if (b.size !== byteArray.length) { // Safari bug #118630
+                // Safari's Blob can only take an ArrayBuffer
+                b = new Blob([(new Uint8Array(byteArray)).buffer], { type: Browser.getMimetype(name) });
+              }
+            } catch(e) {
+              Runtime.warnOnce('Blob constructor present but fails: ' + e + '; falling back to blob builder');
+            }
+          }
+          if (!b) {
+            var bb = new Browser.BlobBuilder();
+            bb.append((new Uint8Array(byteArray)).buffer); // we need to pass a buffer, and must copy the array to get the right data range
+            b = bb.getBlob();
+          }
+          var url = Browser.URLObject.createObjectURL(b);
+          assert(typeof url == 'string', 'createObjectURL must return a url as a string');
+          var img = new Image();
+          img.onload = function img_onload() {
+            assert(img.complete, 'Image ' + name + ' could not be decoded');
+            var canvas = document.createElement('canvas');
+            canvas.width = img.width;
+            canvas.height = img.height;
+            var ctx = canvas.getContext('2d');
+            ctx.drawImage(img, 0, 0);
+            Module["preloadedImages"][name] = canvas;
+            Browser.URLObject.revokeObjectURL(url);
+            if (onload) onload(byteArray);
+          };
+          img.onerror = function img_onerror(event) {
+            console.log('Image ' + url + ' could not be decoded');
+            if (onerror) onerror();
+          };
+          img.src = url;
+        };
+        Module['preloadPlugins'].push(imagePlugin);
+  
+        var audioPlugin = {};
+        audioPlugin['canHandle'] = function audioPlugin_canHandle(name) {
+          return !Module.noAudioDecoding && name.substr(-4) in { '.ogg': 1, '.wav': 1, '.mp3': 1 };
+        };
+        audioPlugin['handle'] = function audioPlugin_handle(byteArray, name, onload, onerror) {
+          var done = false;
+          function finish(audio) {
+            if (done) return;
+            done = true;
+            Module["preloadedAudios"][name] = audio;
+            if (onload) onload(byteArray);
+          }
+          function fail() {
+            if (done) return;
+            done = true;
+            Module["preloadedAudios"][name] = new Audio(); // empty shim
+            if (onerror) onerror();
+          }
+          if (Browser.hasBlobConstructor) {
+            try {
+              var b = new Blob([byteArray], { type: Browser.getMimetype(name) });
+            } catch(e) {
+              return fail();
+            }
+            var url = Browser.URLObject.createObjectURL(b); // XXX we never revoke this!
+            assert(typeof url == 'string', 'createObjectURL must return a url as a string');
+            var audio = new Audio();
+            audio.addEventListener('canplaythrough', function() { finish(audio) }, false); // use addEventListener due to chromium bug 124926
+            audio.onerror = function audio_onerror(event) {
+              if (done) return;
+              console.log('warning: browser could not fully decode audio ' + name + ', trying slower base64 approach');
+              function encode64(data) {
+                var BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+                var PAD = '=';
+                var ret = '';
+                var leftchar = 0;
+                var leftbits = 0;
+                for (var i = 0; i < data.length; i++) {
+                  leftchar = (leftchar << 8) | data[i];
+                  leftbits += 8;
+                  while (leftbits >= 6) {
+                    var curr = (leftchar >> (leftbits-6)) & 0x3f;
+                    leftbits -= 6;
+                    ret += BASE[curr];
+                  }
+                }
+                if (leftbits == 2) {
+                  ret += BASE[(leftchar&3) << 4];
+                  ret += PAD + PAD;
+                } else if (leftbits == 4) {
+                  ret += BASE[(leftchar&0xf) << 2];
+                  ret += PAD;
+                }
+                return ret;
+              }
+              audio.src = 'data:audio/x-' + name.substr(-3) + ';base64,' + encode64(byteArray);
+              finish(audio); // we don't wait for confirmation this worked - but it's worth trying
+            };
+            audio.src = url;
+            // workaround for chrome bug 124926 - we do not always get oncanplaythrough or onerror
+            Browser.safeSetTimeout(function() {
+              finish(audio); // try to use it even though it is not necessarily ready to play
+            }, 10000);
+          } else {
+            return fail();
+          }
+        };
+        Module['preloadPlugins'].push(audioPlugin);
+  
+        // Canvas event setup
+  
+        var canvas = Module['canvas'];
+        function pointerLockChange() {
+          Browser.pointerLock = document['pointerLockElement'] === canvas ||
+                                document['mozPointerLockElement'] === canvas ||
+                                document['webkitPointerLockElement'] === canvas ||
+                                document['msPointerLockElement'] === canvas;
+        }
+        if (canvas) {
+          // forced aspect ratio can be enabled by defining 'forcedAspectRatio' on Module
+          // Module['forcedAspectRatio'] = 4 / 3;
+          
+          canvas.requestPointerLock = canvas['requestPointerLock'] ||
+                                      canvas['mozRequestPointerLock'] ||
+                                      canvas['webkitRequestPointerLock'] ||
+                                      canvas['msRequestPointerLock'] ||
+                                      function(){};
+          canvas.exitPointerLock = document['exitPointerLock'] ||
+                                   document['mozExitPointerLock'] ||
+                                   document['webkitExitPointerLock'] ||
+                                   document['msExitPointerLock'] ||
+                                   function(){}; // no-op if function does not exist
+          canvas.exitPointerLock = canvas.exitPointerLock.bind(document);
+  
+  
+          document.addEventListener('pointerlockchange', pointerLockChange, false);
+          document.addEventListener('mozpointerlockchange', pointerLockChange, false);
+          document.addEventListener('webkitpointerlockchange', pointerLockChange, false);
+          document.addEventListener('mspointerlockchange', pointerLockChange, false);
+  
+          if (Module['elementPointerLock']) {
+            canvas.addEventListener("click", function(ev) {
+              if (!Browser.pointerLock && canvas.requestPointerLock) {
+                canvas.requestPointerLock();
+                ev.preventDefault();
+              }
+            }, false);
+          }
+        }
+      },createContext:function (canvas, useWebGL, setInModule, webGLContextAttributes) {
+        if (useWebGL && Module.ctx && canvas == Module.canvas) return Module.ctx; // no need to recreate GL context if it's already been created for this canvas.
+  
+        var ctx;
+        var contextHandle;
+        if (useWebGL) {
+          // For GLES2/desktop GL compatibility, adjust a few defaults to be different to WebGL defaults, so that they align better with the desktop defaults.
+          var contextAttributes = {
+            antialias: false,
+            alpha: false
+          };
+  
+          if (webGLContextAttributes) {
+            for (var attribute in webGLContextAttributes) {
+              contextAttributes[attribute] = webGLContextAttributes[attribute];
+            }
+          }
+  
+          contextHandle = GL.createContext(canvas, contextAttributes);
+          if (contextHandle) {
+            ctx = GL.getContext(contextHandle).GLctx;
+          }
+          // Set the background of the WebGL canvas to black
+          canvas.style.backgroundColor = "black";
+        } else {
+          ctx = canvas.getContext('2d');
+        }
+  
+        if (!ctx) return null;
+  
+        if (setInModule) {
+          if (!useWebGL) assert(typeof GLctx === 'undefined', 'cannot set in module if GLctx is used, but we are a non-GL context that would replace it');
+  
+          Module.ctx = ctx;
+          if (useWebGL) GL.makeContextCurrent(contextHandle);
+          Module.useWebGL = useWebGL;
+          Browser.moduleContextCreatedCallbacks.forEach(function(callback) { callback() });
+          Browser.init();
+        }
+        return ctx;
+      },destroyContext:function (canvas, useWebGL, setInModule) {},fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:function (lockPointer, resizeCanvas, vrDevice) {
+        Browser.lockPointer = lockPointer;
+        Browser.resizeCanvas = resizeCanvas;
+        Browser.vrDevice = vrDevice;
+        if (typeof Browser.lockPointer === 'undefined') Browser.lockPointer = true;
+        if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false;
+        if (typeof Browser.vrDevice === 'undefined') Browser.vrDevice = null;
+  
+        var canvas = Module['canvas'];
+        function fullScreenChange() {
+          Browser.isFullScreen = false;
+          var canvasContainer = canvas.parentNode;
+          if ((document['webkitFullScreenElement'] || document['webkitFullscreenElement'] ||
+               document['mozFullScreenElement'] || document['mozFullscreenElement'] ||
+               document['fullScreenElement'] || document['fullscreenElement'] ||
+               document['msFullScreenElement'] || document['msFullscreenElement'] ||
+               document['webkitCurrentFullScreenElement']) === canvasContainer) {
+            canvas.cancelFullScreen = document['cancelFullScreen'] ||
+                                      document['mozCancelFullScreen'] ||
+                                      document['webkitCancelFullScreen'] ||
+                                      document['msExitFullscreen'] ||
+                                      document['exitFullscreen'] ||
+                                      function() {};
+            canvas.cancelFullScreen = canvas.cancelFullScreen.bind(document);
+            if (Browser.lockPointer) canvas.requestPointerLock();
+            Browser.isFullScreen = true;
+            if (Browser.resizeCanvas) Browser.setFullScreenCanvasSize();
+          } else {
+            
+            // remove the full screen specific parent of the canvas again to restore the HTML structure from before going full screen
+            canvasContainer.parentNode.insertBefore(canvas, canvasContainer);
+            canvasContainer.parentNode.removeChild(canvasContainer);
+            
+            if (Browser.resizeCanvas) Browser.setWindowedCanvasSize();
+          }
+          if (Module['onFullScreen']) Module['onFullScreen'](Browser.isFullScreen);
+          Browser.updateCanvasDimensions(canvas);
+        }
+  
+        if (!Browser.fullScreenHandlersInstalled) {
+          Browser.fullScreenHandlersInstalled = true;
+          document.addEventListener('fullscreenchange', fullScreenChange, false);
+          document.addEventListener('mozfullscreenchange', fullScreenChange, false);
+          document.addEventListener('webkitfullscreenchange', fullScreenChange, false);
+          document.addEventListener('MSFullscreenChange', fullScreenChange, false);
+        }
+  
+        // create a new parent to ensure the canvas has no siblings. this allows browsers to optimize full screen performance when its parent is the full screen root
+        var canvasContainer = document.createElement("div");
+        canvas.parentNode.insertBefore(canvasContainer, canvas);
+        canvasContainer.appendChild(canvas);
+  
+        // use parent of canvas as full screen root to allow aspect ratio correction (Firefox stretches the root to screen size)
+        canvasContainer.requestFullScreen = canvasContainer['requestFullScreen'] ||
+                                            canvasContainer['mozRequestFullScreen'] ||
+                                            canvasContainer['msRequestFullscreen'] ||
+                                           (canvasContainer['webkitRequestFullScreen'] ? function() { canvasContainer['webkitRequestFullScreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null) ||
+                                           (canvasContainer['webkitRequestFullscreen'] ? function() { canvasContainer['webkitRequestFullscreen'](Element['ALLOW_KEYBOARD_INPUT']) } : null);
+  
+        if (vrDevice) {
+          canvasContainer.requestFullScreen({ vrDisplay: vrDevice });
+        } else {
+          canvasContainer.requestFullScreen();
+        }
+      },nextRAF:0,fakeRequestAnimationFrame:function (func) {
+        // try to keep 60fps between calls to here
+        var now = Date.now();
+        if (Browser.nextRAF === 0) {
+          Browser.nextRAF = now + 1000/60;
+        } else {
+          while (now + 2 >= Browser.nextRAF) { // fudge a little, to avoid timer jitter causing us to do lots of delay:0
+            Browser.nextRAF += 1000/60;
+          }
+        }
+        var delay = Math.max(Browser.nextRAF - now, 0);
+        setTimeout(func, delay);
+      },requestAnimationFrame:function requestAnimationFrame(func) {
+        if (typeof window === 'undefined') { // Provide fallback to setTimeout if window is undefined (e.g. in Node.js)
+          Browser.fakeRequestAnimationFrame(func);
+        } else {
+          if (!window.requestAnimationFrame) {
+            window.requestAnimationFrame = window['requestAnimationFrame'] ||
+                                           window['mozRequestAnimationFrame'] ||
+                                           window['webkitRequestAnimationFrame'] ||
+                                           window['msRequestAnimationFrame'] ||
+                                           window['oRequestAnimationFrame'] ||
+                                           Browser.fakeRequestAnimationFrame;
+          }
+          window.requestAnimationFrame(func);
+        }
+      },safeCallback:function (func) {
+        return function() {
+          if (!ABORT) return func.apply(null, arguments);
+        };
+      },allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function () {
+        Browser.allowAsyncCallbacks = false;
+      },resumeAsyncCallbacks:function () { // marks future callbacks as ok to execute, and synchronously runs any remaining ones right now
+        Browser.allowAsyncCallbacks = true;
+        if (Browser.queuedAsyncCallbacks.length > 0) {
+          var callbacks = Browser.queuedAsyncCallbacks;
+          Browser.queuedAsyncCallbacks = [];
+          callbacks.forEach(function(func) {
+            func();
+          });
+        }
+      },safeRequestAnimationFrame:function (func) {
+        return Browser.requestAnimationFrame(function() {
+          if (ABORT) return;
+          if (Browser.allowAsyncCallbacks) {
+            func();
+          } else {
+            Browser.queuedAsyncCallbacks.push(func);
+          }
+        });
+      },safeSetTimeout:function (func, timeout) {
+        Module['noExitRuntime'] = true;
+        return setTimeout(function() {
+          if (ABORT) return;
+          if (Browser.allowAsyncCallbacks) {
+            func();
+          } else {
+            Browser.queuedAsyncCallbacks.push(func);
+          }
+        }, timeout);
+      },safeSetInterval:function (func, timeout) {
+        Module['noExitRuntime'] = true;
+        return setInterval(function() {
+          if (ABORT) return;
+          if (Browser.allowAsyncCallbacks) {
+            func();
+          } // drop it on the floor otherwise, next interval will kick in
+        }, timeout);
+      },getMimetype:function (name) {
+        return {
+          'jpg': 'image/jpeg',
+          'jpeg': 'image/jpeg',
+          'png': 'image/png',
+          'bmp': 'image/bmp',
+          'ogg': 'audio/ogg',
+          'wav': 'audio/wav',
+          'mp3': 'audio/mpeg'
+        }[name.substr(name.lastIndexOf('.')+1)];
+      },getUserMedia:function (func) {
+        if(!window.getUserMedia) {
+          window.getUserMedia = navigator['getUserMedia'] ||
+                                navigator['mozGetUserMedia'];
+        }
+        window.getUserMedia(func);
+      },getMovementX:function (event) {
+        return event['movementX'] ||
+               event['mozMovementX'] ||
+               event['webkitMovementX'] ||
+               0;
+      },getMovementY:function (event) {
+        return event['movementY'] ||
+               event['mozMovementY'] ||
+               event['webkitMovementY'] ||
+               0;
+      },getMouseWheelDelta:function (event) {
+        var delta = 0;
+        switch (event.type) {
+          case 'DOMMouseScroll': 
+            delta = event.detail;
+            break;
+          case 'mousewheel': 
+            delta = event.wheelDelta;
+            break;
+          case 'wheel': 
+            delta = event['deltaY'];
+            break;
+          default:
+            throw 'unrecognized mouse wheel event: ' + event.type;
+        }
+        return delta;
+      },mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function (event) { // event should be mousemove, mousedown or mouseup
+        if (Browser.pointerLock) {
+          // When the pointer is locked, calculate the coordinates
+          // based on the movement of the mouse.
+          // Workaround for Firefox bug 764498
+          if (event.type != 'mousemove' &&
+              ('mozMovementX' in event)) {
+            Browser.mouseMovementX = Browser.mouseMovementY = 0;
+          } else {
+            Browser.mouseMovementX = Browser.getMovementX(event);
+            Browser.mouseMovementY = Browser.getMovementY(event);
+          }
+          
+          // check if SDL is available
+          if (typeof SDL != "undefined") {
+          	Browser.mouseX = SDL.mouseX + Browser.mouseMovementX;
+          	Browser.mouseY = SDL.mouseY + Browser.mouseMovementY;
+          } else {
+          	// just add the mouse delta to the current absolut mouse position
+          	// FIXME: ideally this should be clamped against the canvas size and zero
+          	Browser.mouseX += Browser.mouseMovementX;
+          	Browser.mouseY += Browser.mouseMovementY;
+          }        
+        } else {
+          // Otherwise, calculate the movement based on the changes
+          // in the coordinates.
+          var rect = Module["canvas"].getBoundingClientRect();
+          var cw = Module["canvas"].width;
+          var ch = Module["canvas"].height;
+  
+          // Neither .scrollX or .pageXOffset are defined in a spec, but
+          // we prefer .scrollX because it is currently in a spec draft.
+          // (see: http://www.w3.org/TR/2013/WD-cssom-view-20131217/)
+          var scrollX = ((typeof window.scrollX !== 'undefined') ? window.scrollX : window.pageXOffset);
+          var scrollY = ((typeof window.scrollY !== 'undefined') ? window.scrollY : window.pageYOffset);
+          // If this assert lands, it's likely because the browser doesn't support scrollX or pageXOffset
+          // and we have no viable fallback.
+          assert((typeof scrollX !== 'undefined') && (typeof scrollY !== 'undefined'), 'Unable to retrieve scroll position, mouse positions likely broken.');
+  
+          if (event.type === 'touchstart' || event.type === 'touchend' || event.type === 'touchmove') {
+            var touch = event.touch;
+            if (touch === undefined) {
+              return; // the "touch" property is only defined in SDL
+  
+            }
+            var adjustedX = touch.pageX - (scrollX + rect.left);
+            var adjustedY = touch.pageY - (scrollY + rect.top);
+  
+            adjustedX = adjustedX * (cw / rect.width);
+            adjustedY = adjustedY * (ch / rect.height);
+  
+            var coords = { x: adjustedX, y: adjustedY };
+            
+            if (event.type === 'touchstart') {
+              Browser.lastTouches[touch.identifier] = coords;
+              Browser.touches[touch.identifier] = coords;
+            } else if (event.type === 'touchend' || event.type === 'touchmove') {
+              var last = Browser.touches[touch.identifier];
+              if (!last) last = coords;
+              Browser.lastTouches[touch.identifier] = last;
+              Browser.touches[touch.identifier] = coords;
+            } 
+            return;
+          }
+  
+          var x = event.pageX - (scrollX + rect.left);
+          var y = event.pageY - (scrollY + rect.top);
+  
+          // the canvas might be CSS-scaled compared to its backbuffer;
+          // SDL-using content will want mouse coordinates in terms
+          // of backbuffer units.
+          x = x * (cw / rect.width);
+          y = y * (ch / rect.height);
+  
+          Browser.mouseMovementX = x - Browser.mouseX;
+          Browser.mouseMovementY = y - Browser.mouseY;
+          Browser.mouseX = x;
+          Browser.mouseY = y;
+        }
+      },asyncLoad:function (url, onload, onerror, noRunDep) {
+        Module['readAsync'](url, function(arrayBuffer) {
+          assert(arrayBuffer, 'Loading data file "' + url + '" failed (no arrayBuffer).');
+          onload(new Uint8Array(arrayBuffer));
+          if (!noRunDep) removeRunDependency('al ' + url);
+        }, function(event) {
+          if (onerror) {
+            onerror();
+          } else {
+            throw 'Loading data file "' + url + '" failed.';
+          }
+        });
+        if (!noRunDep) addRunDependency('al ' + url);
+      },resizeListeners:[],updateResizeListeners:function () {
+        var canvas = Module['canvas'];
+        Browser.resizeListeners.forEach(function(listener) {
+          listener(canvas.width, canvas.height);
+        });
+      },setCanvasSize:function (width, height, noUpdates) {
+        var canvas = Module['canvas'];
+        Browser.updateCanvasDimensions(canvas, width, height);
+        if (!noUpdates) Browser.updateResizeListeners();
+      },windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:function () {
+        // check if SDL is available   
+        if (typeof SDL != "undefined") {
+        	var flags = HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)];
+        	flags = flags | 0x00800000; // set SDL_FULLSCREEN flag
+        	HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=flags
+        }
+        Browser.updateResizeListeners();
+      },setWindowedCanvasSize:function () {
+        // check if SDL is available       
+        if (typeof SDL != "undefined") {
+        	var flags = HEAPU32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)];
+        	flags = flags & ~0x00800000; // clear SDL_FULLSCREEN flag
+        	HEAP32[((SDL.screen+Runtime.QUANTUM_SIZE*0)>>2)]=flags
+        }
+        Browser.updateResizeListeners();
+      },updateCanvasDimensions:function (canvas, wNative, hNative) {
+        if (wNative && hNative) {
+          canvas.widthNative = wNative;
+          canvas.heightNative = hNative;
+        } else {
+          wNative = canvas.widthNative;
+          hNative = canvas.heightNative;
+        }
+        var w = wNative;
+        var h = hNative;
+        if (Module['forcedAspectRatio'] && Module['forcedAspectRatio'] > 0) {
+          if (w/h < Module['forcedAspectRatio']) {
+            w = Math.round(h * Module['forcedAspectRatio']);
+          } else {
+            h = Math.round(w / Module['forcedAspectRatio']);
+          }
+        }
+        if (((document['webkitFullScreenElement'] || document['webkitFullscreenElement'] ||
+             document['mozFullScreenElement'] || document['mozFullscreenElement'] ||
+             document['fullScreenElement'] || document['fullscreenElement'] ||
+             document['msFullScreenElement'] || document['msFullscreenElement'] ||
+             document['webkitCurrentFullScreenElement']) === canvas.parentNode) && (typeof screen != 'undefined')) {
+           var factor = Math.min(screen.width / w, screen.height / h);
+           w = Math.round(w * factor);
+           h = Math.round(h * factor);
+        }
+        if (Browser.resizeCanvas) {
+          if (canvas.width  != w) canvas.width  = w;
+          if (canvas.height != h) canvas.height = h;
+          if (typeof canvas.style != 'undefined') {
+            canvas.style.removeProperty( "width");
+            canvas.style.removeProperty("height");
+          }
+        } else {
+          if (canvas.width  != wNative) canvas.width  = wNative;
+          if (canvas.height != hNative) canvas.height = hNative;
+          if (typeof canvas.style != 'undefined') {
+            if (w != wNative || h != hNative) {
+              canvas.style.setProperty( "width", w + "px", "important");
+              canvas.style.setProperty("height", h + "px", "important");
+            } else {
+              canvas.style.removeProperty( "width");
+              canvas.style.removeProperty("height");
+            }
+          }
+        }
+      },wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function () {
+        var handle = Browser.nextWgetRequestHandle;
+        Browser.nextWgetRequestHandle++;
+        return handle;
+      }};
+
+  
+  
+  
+  var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};
+  
+  var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can   access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"};
+  
+  function ___setErrNo(value) {
+      if (Module['___errno_location']) HEAP32[((Module['___errno_location']())>>2)]=value;
+      else Module.printErr('failed to set errno from JS');
+      return value;
+    }
+  
+  var PATH={splitPath:function (filename) {
+        var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
+        return splitPathRe.exec(filename).slice(1);
+      },normalizeArray:function (parts, allowAboveRoot) {
+        // if the path tries to go above the root, `up` ends up > 0
+        var up = 0;
+        for (var i = parts.length - 1; i >= 0; i--) {
+          var last = parts[i];
+          if (last === '.') {
+            parts.splice(i, 1);
+          } else if (last === '..') {
+            parts.splice(i, 1);
+            up++;
+          } else if (up) {
+            parts.splice(i, 1);
+            up--;
+          }
+        }
+        // if the path is allowed to go above the root, restore leading ..s
+        if (allowAboveRoot) {
+          for (; up--; up) {
+            parts.unshift('..');
+          }
+        }
+        return parts;
+      },normalize:function (path) {
+        var isAbsolute = path.charAt(0) === '/',
+            trailingSlash = path.substr(-1) === '/';
+        // Normalize the path
+        path = PATH.normalizeArray(path.split('/').filter(function(p) {
+          return !!p;
+        }), !isAbsolute).join('/');
+        if (!path && !isAbsolute) {
+          path = '.';
+        }
+        if (path && trailingSlash) {
+          path += '/';
+        }
+        return (isAbsolute ? '/' : '') + path;
+      },dirname:function (path) {
+        var result = PATH.splitPath(path),
+            root = result[0],
+            dir = result[1];
+        if (!root && !dir) {
+          // No dirname whatsoever
+          return '.';
+        }
+        if (dir) {
+          // It has a dirname, strip trailing slash
+          dir = dir.substr(0, dir.length - 1);
+        }
+        return root + dir;
+      },basename:function (path) {
+        // EMSCRIPTEN return '/'' for '/', not an empty string
+        if (path === '/') return '/';
+        var lastSlash = path.lastIndexOf('/');
+        if (lastSlash === -1) return path;
+        return path.substr(lastSlash+1);
+      },extname:function (path) {
+        return PATH.splitPath(path)[3];
+      },join:function () {
+        var paths = Array.prototype.slice.call(arguments, 0);
+        return PATH.normalize(paths.join('/'));
+      },join2:function (l, r) {
+        return PATH.normalize(l + '/' + r);
+      },resolve:function () {
+        var resolvedPath = '',
+          resolvedAbsolute = false;
+        for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
+          var path = (i >= 0) ? arguments[i] : FS.cwd();
+          // Skip empty and invalid entries
+          if (typeof path !== 'string') {
+            throw new TypeError('Arguments to path.resolve must be strings');
+          } else if (!path) {
+            return ''; // an invalid portion invalidates the whole thing
+          }
+          resolvedPath = path + '/' + resolvedPath;
+          resolvedAbsolute = path.charAt(0) === '/';
+        }
+        // At this point the path should be resolved to a full absolute path, but
+        // handle relative paths to be safe (might happen when process.cwd() fails)
+        resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter(function(p) {
+          return !!p;
+        }), !resolvedAbsolute).join('/');
+        return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
+      },relative:function (from, to) {
+        from = PATH.resolve(from).substr(1);
+        to = PATH.resolve(to).substr(1);
+        function trim(arr) {
+          var start = 0;
+          for (; start < arr.length; start++) {
+            if (arr[start] !== '') break;
+          }
+          var end = arr.length - 1;
+          for (; end >= 0; end--) {
+            if (arr[end] !== '') break;
+          }
+          if (start > end) return [];
+          return arr.slice(start, end - start + 1);
+        }
+        var fromParts = trim(from.split('/'));
+        var toParts = trim(to.split('/'));
+        var length = Math.min(fromParts.length, toParts.length);
+        var samePartsLength = length;
+        for (var i = 0; i < length; i++) {
+          if (fromParts[i] !== toParts[i]) {
+            samePartsLength = i;
+            break;
+          }
+        }
+        var outputParts = [];
+        for (var i = samePartsLength; i < fromParts.length; i++) {
+          outputParts.push('..');
+        }
+        outputParts = outputParts.concat(toParts.slice(samePartsLength));
+        return outputParts.join('/');
+      }};
+  
+  var TTY={ttys:[],init:function () {
+        // https://github.com/kripken/emscripten/pull/1555
+        // if (ENVIRONMENT_IS_NODE) {
+        //   // currently, FS.init does not distinguish if process.stdin is a file or TTY
+        //   // device, it always assumes it's a TTY device. because of this, we're forcing
+        //   // process.stdin to UTF8 encoding to at least make stdin reading compatible
+        //   // with text files until FS.init can be refactored.
+        //   process['stdin']['setEncoding']('utf8');
+        // }
+      },shutdown:function () {
+        // https://github.com/kripken/emscripten/pull/1555
+        // if (ENVIRONMENT_IS_NODE) {
+        //   // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)?
+        //   // isaacs: because now it's reading from the stream, you've expressed interest in it, so that read() kicks off a _read() which creates a ReadReq operation
+        //   // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists?
+        //   // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle
+        //   // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call
+        //   process['stdin']['pause']();
+        // }
+      },register:function (dev, ops) {
+        TTY.ttys[dev] = { input: [], output: [], ops: ops };
+        FS.registerDevice(dev, TTY.stream_ops);
+      },stream_ops:{open:function (stream) {
+          var tty = TTY.ttys[stream.node.rdev];
+          if (!tty) {
+            throw new FS.ErrnoError(ERRNO_CODES.ENODEV);
+          }
+          stream.tty = tty;
+          stream.seekable = false;
+        },close:function (stream) {
+          // flush any pending line data
+          stream.tty.ops.flush(stream.tty);
+        },flush:function (stream) {
+          stream.tty.ops.flush(stream.tty);
+        },read:function (stream, buffer, offset, length, pos /* ignored */) {
+          if (!stream.tty || !stream.tty.ops.get_char) {
+            throw new FS.ErrnoError(ERRNO_CODES.ENXIO);
+          }
+          var bytesRead = 0;
+          for (var i = 0; i < length; i++) {
+            var result;
+            try {
+              result = stream.tty.ops.get_char(stream.tty);
+            } catch (e) {
+              throw new FS.ErrnoError(ERRNO_CODES.EIO);
+            }
+            if (result === undefined && bytesRead === 0) {
+              throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);
+            }
+            if (result === null || result === undefined) break;
+            bytesRead++;
+            buffer[offset+i] = result;
+          }
+          if (bytesRead) {
+            stream.node.timestamp = Date.now();
+          }
+          return bytesRead;
+        },write:function (stream, buffer, offset, length, pos) {
+          if (!stream.tty || !stream.tty.ops.put_char) {
+            throw new FS.ErrnoError(ERRNO_CODES.ENXIO);
+          }
+          for (var i = 0; i < length; i++) {
+            try {
+              stream.tty.ops.put_char(stream.tty, buffer[offset+i]);
+            } catch (e) {
+              throw new FS.ErrnoError(ERRNO_CODES.EIO);
+            }
+          }
+          if (length) {
+            stream.node.timestamp = Date.now();
+          }
+          return i;
+        }},default_tty_ops:{get_char:function (tty) {
+          if (!tty.input.length) {
+            var result = null;
+            if (ENVIRONMENT_IS_NODE) {
+              // we will read data by chunks of BUFSIZE
+              var BUFSIZE = 256;
+              var buf = new Buffer(BUFSIZE);
+              var bytesRead = 0;
+  
+              var fd = process.stdin.fd;
+              // Linux and Mac cannot use process.stdin.fd (which isn't set up as sync)
+              var usingDevice = false;
+              try {
+                fd = fs.openSync('/dev/stdin', 'r');
+                usingDevice = true;
+              } catch (e) {}
+  
+              bytesRead = fs.readSync(fd, buf, 0, BUFSIZE, null);
+  
+              if (usingDevice) { fs.closeSync(fd); }
+              if (bytesRead > 0) {
+                result = buf.slice(0, bytesRead).toString('utf-8');
+              } else {
+                result = null;
+              }
+  
+            } else if (typeof window != 'undefined' &&
+              typeof window.prompt == 'function') {
+              // Browser.
+              result = window.prompt('Input: ');  // returns null on cancel
+              if (result !== null) {
+                result += '\n';
+              }
+            } else if (typeof readline == 'function') {
+              // Command line.
+              result = readline();
+              if (result !== null) {
+                result += '\n';
+              }
+            }
+            if (!result) {
+              return null;
+            }
+            tty.input = intArrayFromString(result, true);
+          }
+          return tty.input.shift();
+        },put_char:function (tty, val) {
+          if (val === null || val === 10) {
+            Module['print'](UTF8ArrayToString(tty.output, 0));
+            tty.output = [];
+          } else {
+            if (val != 0) tty.output.push(val); // val == 0 would cut text output off in the middle.
+          }
+        },flush:function (tty) {
+          if (tty.output && tty.output.length > 0) {
+            Module['print'](UTF8ArrayToString(tty.output, 0));
+            tty.output = [];
+          }
+        }},default_tty1_ops:{put_char:function (tty, val) {
+          if (val === null || val === 10) {
+            Module['printErr'](UTF8ArrayToString(tty.output, 0));
+            tty.output = [];
+          } else {
+            if (val != 0) tty.output.push(val);
+          }
+        },flush:function (tty) {
+          if (tty.output && tty.output.length > 0) {
+            Module['printErr'](UTF8ArrayToString(tty.output, 0));
+            tty.output = [];
+          }
+        }}};
+  
+  var MEMFS={ops_table:null,mount:function (mount) {
+        return MEMFS.createNode(null, '/', 16384 | 511 /* 0777 */, 0);
+      },createNode:function (parent, name, mode, dev) {
+        if (FS.isBlkdev(mode) || FS.isFIFO(mode)) {
+          // no supported
+          throw new FS.ErrnoError(ERRNO_CODES.EPERM);
+        }
+        if (!MEMFS.ops_table) {
+          MEMFS.ops_table = {
+            dir: {
+              node: {
+                getattr: MEMFS.node_ops.getattr,
+                setattr: MEMFS.node_ops.setattr,
+                lookup: MEMFS.node_ops.lookup,
+                mknod: MEMFS.node_ops.mknod,
+                rename: MEMFS.node_ops.rename,
+                unlink: MEMFS.node_ops.unlink,
+                rmdir: MEMFS.node_ops.rmdir,
+                readdir: MEMFS.node_ops.readdir,
+                symlink: MEMFS.node_ops.symlink
+              },
+              stream: {
+                llseek: MEMFS.stream_ops.llseek
+              }
+            },
+            file: {
+              node: {
+                getattr: MEMFS.node_ops.getattr,
+                setattr: MEMFS.node_ops.setattr
+              },
+              stream: {
+                llseek: MEMFS.stream_ops.llseek,
+                read: MEMFS.stream_ops.read,
+                write: MEMFS.stream_ops.write,
+                allocate: MEMFS.stream_ops.allocate,
+                mmap: MEMFS.stream_ops.mmap,
+                msync: MEMFS.stream_ops.msync
+              }
+            },
+            link: {
+              node: {
+                getattr: MEMFS.node_ops.getattr,
+                setattr: MEMFS.node_ops.setattr,
+                readlink: MEMFS.node_ops.readlink
+              },
+              stream: {}
+            },
+            chrdev: {
+              node: {
+                getattr: MEMFS.node_ops.getattr,
+                setattr: MEMFS.node_ops.setattr
+              },
+              stream: FS.chrdev_stream_ops
+            }
+          };
+        }
+        var node = FS.createNode(parent, name, mode, dev);
+        if (FS.isDir(node.mode)) {
+          node.node_ops = MEMFS.ops_table.dir.node;
+          node.stream_ops = MEMFS.ops_table.dir.stream;
+          node.contents = {};
+        } else if (FS.isFile(node.mode)) {
+          node.node_ops = MEMFS.ops_table.file.node;
+          node.stream_ops = MEMFS.ops_table.file.stream;
+          node.usedBytes = 0; // The actual number of bytes used in the typed array, as opposed to contents.buffer.byteLength which gives the whole capacity.
+          // When the byte data of the file is populated, this will point to either a typed array, or a normal JS array. Typed arrays are preferred
+          // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size
+          // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme.
+          node.contents = null; 
+        } else if (FS.isLink(node.mode)) {
+          node.node_ops = MEMFS.ops_table.link.node;
+          node.stream_ops = MEMFS.ops_table.link.stream;
+        } else if (FS.isChrdev(node.mode)) {
+          node.node_ops = MEMFS.ops_table.chrdev.node;
+          node.stream_ops = MEMFS.ops_table.chrdev.stream;
+        }
+        node.timestamp = Date.now();
+        // add the new node to the parent
+        if (parent) {
+          parent.contents[name] = node;
+        }
+        return node;
+      },getFileDataAsRegularArray:function (node) {
+        if (node.contents && node.contents.subarray) {
+          var arr = [];
+          for (var i = 0; i < node.usedBytes; ++i) arr.push(node.contents[i]);
+          return arr; // Returns a copy of the original data.
+        }
+        return node.contents; // No-op, the file contents are already in a JS array. Return as-is.
+      },getFileDataAsTypedArray:function (node) {
+        if (!node.contents) return new Uint8Array;
+        if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes.
+        return new Uint8Array(node.contents);
+      },expandFileStorage:function (node, newCapacity) {
+        // If we are asked to expand the size of a file that already exists, revert to using a standard JS array to store the file
+        // instead of a typed array. This makes resizing the array more flexible because we can just .push() elements at the back to
+        // increase the size.
+        if (node.contents && node.contents.subarray && newCapacity > node.contents.length) {
+          node.contents = MEMFS.getFileDataAsRegularArray(node);
+          node.usedBytes = node.contents.length; // We might be writing to a lazy-loaded file which had overridden this property, so force-reset it.
+        }
+  
+        if (!node.contents || node.contents.subarray) { // Keep using a typed array if creating a new storage, or if old one was a typed array as well.
+          var prevCapacity = node.contents ? node.contents.buffer.byteLength : 0;
+          if (prevCapacity >= newCapacity) return; // No need to expand, the storage was already large enough.
+          // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity.
+          // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to
+          // avoid overshooting the allocation cap by a very large margin.
+          var CAPACITY_DOUBLING_MAX = 1024 * 1024;
+          newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2.0 : 1.125)) | 0);
+          if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); // At minimum allocate 256b for each file when expanding.
+          var oldContents = node.contents;
+          node.contents = new Uint8Array(newCapacity); // Allocate new storage.
+          if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); // Copy old data over to the new storage.
+          return;
+        }
+        // Not using a typed array to back the file storage. Use a standard JS array instead.
+        if (!node.contents && newCapacity > 0) node.contents = [];
+        while (node.contents.length < newCapacity) node.contents.push(0);
+      },resizeFileStorage:function (node, newSize) {
+        if (node.usedBytes == newSize) return;
+        if (newSize == 0) {
+          node.contents = null; // Fully decommit when requesting a resize to zero.
+          node.usedBytes = 0;
+          return;
+        }
+        if (!node.contents || node.contents.subarray) { // Resize a typed array if that is being used as the backing store.
+          var oldContents = node.contents;
+          node.contents = new Uint8Array(new ArrayBuffer(newSize)); // Allocate new storage.
+          if (oldContents) {
+            node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); // Copy old data over to the new storage.
+          }
+          node.usedBytes = newSize;
+          return;
+        }
+        // Backing with a JS array.
+        if (!node.contents) node.contents = [];
+        if (node.contents.length > newSize) node.contents.length = newSize;
+        else while (node.contents.length < newSize) node.contents.push(0);
+        node.usedBytes = newSize;
+      },node_ops:{getattr:function (node) {
+          var attr = {};
+          // device numbers reuse inode numbers.
+          attr.dev = FS.isChrdev(node.mode) ? node.id : 1;
+          attr.ino = node.id;
+          attr.mode = node.mode;
+          attr.nlink = 1;
+          attr.uid = 0;
+          attr.gid = 0;
+          attr.rdev = node.rdev;
+          if (FS.isDir(node.mode)) {
+            attr.size = 4096;
+          } else if (FS.isFile(node.mode)) {
+            attr.size = node.usedBytes;
+          } else if (FS.isLink(node.mode)) {
+            attr.size = node.link.length;
+          } else {
+            attr.size = 0;
+          }
+          attr.atime = new Date(node.timestamp);
+          attr.mtime = new Date(node.timestamp);
+          attr.ctime = new Date(node.timestamp);
+          // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize),
+          //       but this is not required by the standard.
+          attr.blksize = 4096;
+          attr.blocks = Math.ceil(attr.size / attr.blksize);
+          return attr;
+        },setattr:function (node, attr) {
+          if (attr.mode !== undefined) {
+            node.mode = attr.mode;
+          }
+          if (attr.timestamp !== undefined) {
+            node.timestamp = attr.timestamp;
+          }
+          if (attr.size !== undefined) {
+            MEMFS.resizeFileStorage(node, attr.size);
+          }
+        },lookup:function (parent, name) {
+          throw FS.genericErrors[ERRNO_CODES.ENOENT];
+        },mknod:function (parent, name, mode, dev) {
+          return MEMFS.createNode(parent, name, mode, dev);
+        },rename:function (old_node, new_dir, new_name) {
+          // if we're overwriting a directory at new_name, make sure it's empty.
+          if (FS.isDir(old_node.mode)) {
+            var new_node;
+            try {
+              new_node = FS.lookupNode(new_dir, new_name);
+            } catch (e) {
+            }
+            if (new_node) {
+              for (var i in new_node.contents) {
+                throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);
+              }
+            }
+          }
+          // do the internal rewiring
+          delete old_node.parent.contents[old_node.name];
+          old_node.name = new_name;
+          new_dir.contents[new_name] = old_node;
+          old_node.parent = new_dir;
+        },unlink:function (parent, name) {
+          delete parent.contents[name];
+        },rmdir:function (parent, name) {
+          var node = FS.lookupNode(parent, name);
+          for (var i in node.contents) {
+            throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);
+          }
+          delete parent.contents[name];
+        },readdir:function (node) {
+          var entries = ['.', '..']
+          for (var key in node.contents) {
+            if (!node.contents.hasOwnProperty(key)) {
+              continue;
+            }
+            entries.push(key);
+          }
+          return entries;
+        },symlink:function (parent, newname, oldpath) {
+          var node = MEMFS.createNode(parent, newname, 511 /* 0777 */ | 40960, 0);
+          node.link = oldpath;
+          return node;
+        },readlink:function (node) {
+          if (!FS.isLink(node.mode)) {
+            throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+          }
+          return node.link;
+        }},stream_ops:{read:function (stream, buffer, offset, length, position) {
+          var contents = stream.node.contents;
+          if (position >= stream.node.usedBytes) return 0;
+          var size = Math.min(stream.node.usedBytes - position, length);
+          assert(size >= 0);
+          if (size > 8 && contents.subarray) { // non-trivial, and typed array
+            buffer.set(contents.subarray(position, position + size), offset);
+          } else {
+            for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i];
+          }
+          return size;
+        },write:function (stream, buffer, offset, length, position, canOwn) {
+          if (!length) return 0;
+          var node = stream.node;
+          node.timestamp = Date.now();
+  
+          if (buffer.subarray && (!node.contents || node.contents.subarray)) { // This write is from a typed array to a typed array?
+            if (canOwn) { // Can we just reuse the buffer we are given?
+              assert(position === 0, 'canOwn must imply no weird position inside the file');
+              node.contents = buffer.subarray(offset, offset + length);
+              node.usedBytes = length;
+              return length;
+            } else if (node.usedBytes === 0 && position === 0) { // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data.
+              node.contents = new Uint8Array(buffer.subarray(offset, offset + length));
+              node.usedBytes = length;
+              return length;
+            } else if (position + length <= node.usedBytes) { // Writing to an already allocated and used subrange of the file?
+              node.contents.set(buffer.subarray(offset, offset + length), position);
+              return length;
+            }
+          }
+  
+          // Appending to an existing file and we need to reallocate, or source data did not come as a typed array.
+          MEMFS.expandFileStorage(node, position+length);
+          if (node.contents.subarray && buffer.subarray) node.contents.set(buffer.subarray(offset, offset + length), position); // Use typed array write if available.
+          else {
+            for (var i = 0; i < length; i++) {
+             node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not.
+            }
+          }
+          node.usedBytes = Math.max(node.usedBytes, position+length);
+          return length;
+        },llseek:function (stream, offset, whence) {
+          var position = offset;
+          if (whence === 1) {  // SEEK_CUR.
+            position += stream.position;
+          } else if (whence === 2) {  // SEEK_END.
+            if (FS.isFile(stream.node.mode)) {
+              position += stream.node.usedBytes;
+            }
+          }
+          if (position < 0) {
+            throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+          }
+          return position;
+        },allocate:function (stream, offset, length) {
+          MEMFS.expandFileStorage(stream.node, offset + length);
+          stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length);
+        },mmap:function (stream, buffer, offset, length, position, prot, flags) {
+          if (!FS.isFile(stream.node.mode)) {
+            throw new FS.ErrnoError(ERRNO_CODES.ENODEV);
+          }
+          var ptr;
+          var allocated;
+          var contents = stream.node.contents;
+          // Only make a new copy when MAP_PRIVATE is specified.
+          if ( !(flags & 2) &&
+                (contents.buffer === buffer || contents.buffer === buffer.buffer) ) {
+            // We can't emulate MAP_SHARED when the file is not backed by the buffer
+            // we're mapping to (e.g. the HEAP buffer).
+            allocated = false;
+            ptr = contents.byteOffset;
+          } else {
+            // Try to avoid unnecessary slices.
+            if (position > 0 || position + length < stream.node.usedBytes) {
+              if (contents.subarray) {
+                contents = contents.subarray(position, position + length);
+              } else {
+                contents = Array.prototype.slice.call(contents, position, position + length);
+              }
+            }
+            allocated = true;
+            ptr = _malloc(length);
+            if (!ptr) {
+              throw new FS.ErrnoError(ERRNO_CODES.ENOMEM);
+            }
+            buffer.set(contents, ptr);
+          }
+          return { ptr: ptr, allocated: allocated };
+        },msync:function (stream, buffer, offset, length, mmapFlags) {
+          if (!FS.isFile(stream.node.mode)) {
+            throw new FS.ErrnoError(ERRNO_CODES.ENODEV);
+          }
+          if (mmapFlags & 2) {
+            // MAP_PRIVATE calls need not to be synced back to underlying fs
+            return 0;
+          }
+  
+          var bytesWritten = MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false);
+          // should we check if bytesWritten and length are the same?
+          return 0;
+        }}};
+  
+  var IDBFS={dbs:{},indexedDB:function () {
+        if (typeof indexedDB !== 'undefined') return indexedDB;
+        var ret = null;
+        if (typeof window === 'object') ret = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
+        assert(ret, 'IDBFS used, but indexedDB not supported');
+        return ret;
+      },DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function (mount) {
+        // reuse all of the core MEMFS functionality
+        return MEMFS.mount.apply(null, arguments);
+      },syncfs:function (mount, populate, callback) {
+        IDBFS.getLocalSet(mount, function(err, local) {
+          if (err) return callback(err);
+  
+          IDBFS.getRemoteSet(mount, function(err, remote) {
+            if (err) return callback(err);
+  
+            var src = populate ? remote : local;
+            var dst = populate ? local : remote;
+  
+            IDBFS.reconcile(src, dst, callback);
+          });
+        });
+      },getDB:function (name, callback) {
+        // check the cache first
+        var db = IDBFS.dbs[name];
+        if (db) {
+          return callback(null, db);
+        }
+  
+        var req;
+        try {
+          req = IDBFS.indexedDB().open(name, IDBFS.DB_VERSION);
+        } catch (e) {
+          return callback(e);
+        }
+        req.onupgradeneeded = function(e) {
+          var db = e.target.result;
+          var transaction = e.target.transaction;
+  
+          var fileStore;
+  
+          if (db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)) {
+            fileStore = transaction.objectStore(IDBFS.DB_STORE_NAME);
+          } else {
+            fileStore = db.createObjectStore(IDBFS.DB_STORE_NAME);
+          }
+  
+          if (!fileStore.indexNames.contains('timestamp')) {
+            fileStore.createIndex('timestamp', 'timestamp', { unique: false });
+          }
+        };
+        req.onsuccess = function() {
+          db = req.result;
+  
+          // add to the cache
+          IDBFS.dbs[name] = db;
+          callback(null, db);
+        };
+        req.onerror = function(e) {
+          callback(this.error);
+          e.preventDefault();
+        };
+      },getLocalSet:function (mount, callback) {
+        var entries = {};
+  
+        function isRealDir(p) {
+          return p !== '.' && p !== '..';
+        };
+        function toAbsolute(root) {
+          return function(p) {
+            return PATH.join2(root, p);
+          }
+        };
+  
+        var check = FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint));
+  
+        while (check.length) {
+          var path = check.pop();
+          var stat;
+  
+          try {
+            stat = FS.stat(path);
+          } catch (e) {
+            return callback(e);
+          }
+  
+          if (FS.isDir(stat.mode)) {
+            check.push.apply(check, FS.readdir(path).filter(isRealDir).map(toAbsolute(path)));
+          }
+  
+          entries[path] = { timestamp: stat.mtime };
+        }
+  
+        return callback(null, { type: 'local', entries: entries });
+      },getRemoteSet:function (mount, callback) {
+        var entries = {};
+  
+        IDBFS.getDB(mount.mountpoint, function(err, db) {
+          if (err) return callback(err);
+  
+          var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readonly');
+          transaction.onerror = function(e) {
+            callback(this.error);
+            e.preventDefault();
+          };
+  
+          var store = transaction.objectStore(IDBFS.DB_STORE_NAME);
+          var index = store.index('timestamp');
+  
+          index.openKeyCursor().onsuccess = function(event) {
+            var cursor = event.target.result;
+  
+            if (!cursor) {
+              return callback(null, { type: 'remote', db: db, entries: entries });
+            }
+  
+            entries[cursor.primaryKey] = { timestamp: cursor.key };
+  
+            cursor.continue();
+          };
+        });
+      },loadLocalEntry:function (path, callback) {
+        var stat, node;
+  
+        try {
+          var lookup = FS.lookupPath(path);
+          node = lookup.node;
+          stat = FS.stat(path);
+        } catch (e) {
+          return callback(e);
+        }
+  
+        if (FS.isDir(stat.mode)) {
+          return callback(null, { timestamp: stat.mtime, mode: stat.mode });
+        } else if (FS.isFile(stat.mode)) {
+          // Performance consideration: storing a normal JavaScript array to a IndexedDB is much slower than storing a typed array.
+          // Therefore always convert the file contents to a typed array first before writing the data to IndexedDB.
+          node.contents = MEMFS.getFileDataAsTypedArray(node);
+          return callback(null, { timestamp: stat.mtime, mode: stat.mode, contents: node.contents });
+        } else {
+          return callback(new Error('node type not supported'));
+        }
+      },storeLocalEntry:function (path, entry, callback) {
+        try {
+          if (FS.isDir(entry.mode)) {
+            FS.mkdir(path, entry.mode);
+          } else if (FS.isFile(entry.mode)) {
+            FS.writeFile(path, entry.contents, { encoding: 'binary', canOwn: true });
+          } else {
+            return callback(new Error('node type not supported'));
+          }
+  
+          FS.chmod(path, entry.mode);
+          FS.utime(path, entry.timestamp, entry.timestamp);
+        } catch (e) {
+          return callback(e);
+        }
+  
+        callback(null);
+      },removeLocalEntry:function (path, callback) {
+        try {
+          var lookup = FS.lookupPath(path);
+          var stat = FS.stat(path);
+  
+          if (FS.isDir(stat.mode)) {
+            FS.rmdir(path);
+          } else if (FS.isFile(stat.mode)) {
+            FS.unlink(path);
+          }
+        } catch (e) {
+          return callback(e);
+        }
+  
+        callback(null);
+      },loadRemoteEntry:function (store, path, callback) {
+        var req = store.get(path);
+        req.onsuccess = function(event) { callback(null, event.target.result); };
+        req.onerror = function(e) {
+          callback(this.error);
+          e.preventDefault();
+        };
+      },storeRemoteEntry:function (store, path, entry, callback) {
+        var req = store.put(entry, path);
+        req.onsuccess = function() { callback(null); };
+        req.onerror = function(e) {
+          callback(this.error);
+          e.preventDefault();
+        };
+      },removeRemoteEntry:function (store, path, callback) {
+        var req = store.delete(path);
+        req.onsuccess = function() { callback(null); };
+        req.onerror = function(e) {
+          callback(this.error);
+          e.preventDefault();
+        };
+      },reconcile:function (src, dst, callback) {
+        var total = 0;
+  
+        var create = [];
+        Object.keys(src.entries).forEach(function (key) {
+          var e = src.entries[key];
+          var e2 = dst.entries[key];
+          if (!e2 || e.timestamp > e2.timestamp) {
+            create.push(key);
+            total++;
+          }
+        });
+  
+        var remove = [];
+        Object.keys(dst.entries).forEach(function (key) {
+          var e = dst.entries[key];
+          var e2 = src.entries[key];
+          if (!e2) {
+            remove.push(key);
+            total++;
+          }
+        });
+  
+        if (!total) {
+          return callback(null);
+        }
+  
+        var errored = false;
+        var completed = 0;
+        var db = src.type === 'remote' ? src.db : dst.db;
+        var transaction = db.transaction([IDBFS.DB_STORE_NAME], 'readwrite');
+        var store = transaction.objectStore(IDBFS.DB_STORE_NAME);
+  
+        function done(err) {
+          if (err) {
+            if (!done.errored) {
+              done.errored = true;
+              return callback(err);
+            }
+            return;
+          }
+          if (++completed >= total) {
+            return callback(null);
+          }
+        };
+  
+        transaction.onerror = function(e) {
+          done(this.error);
+          e.preventDefault();
+        };
+  
+        // sort paths in ascending order so directory entries are created
+        // before the files inside them
+        create.sort().forEach(function (path) {
+          if (dst.type === 'local') {
+            IDBFS.loadRemoteEntry(store, path, function (err, entry) {
+              if (err) return done(err);
+              IDBFS.storeLocalEntry(path, entry, done);
+            });
+          } else {
+            IDBFS.loadLocalEntry(path, function (err, entry) {
+              if (err) return done(err);
+              IDBFS.storeRemoteEntry(store, path, entry, done);
+            });
+          }
+        });
+  
+        // sort paths in descending order so files are deleted before their
+        // parent directories
+        remove.sort().reverse().forEach(function(path) {
+          if (dst.type === 'local') {
+            IDBFS.removeLocalEntry(path, done);
+          } else {
+            IDBFS.removeRemoteEntry(store, path, done);
+          }
+        });
+      }};
+  
+  var NODEFS={isWindows:false,staticInit:function () {
+        NODEFS.isWindows = !!process.platform.match(/^win/);
+      },mount:function (mount) {
+        assert(ENVIRONMENT_IS_NODE);
+        return NODEFS.createNode(null, '/', NODEFS.getMode(mount.opts.root), 0);
+      },createNode:function (parent, name, mode, dev) {
+        if (!FS.isDir(mode) && !FS.isFile(mode) && !FS.isLink(mode)) {
+          throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+        }
+        var node = FS.createNode(parent, name, mode);
+        node.node_ops = NODEFS.node_ops;
+        node.stream_ops = NODEFS.stream_ops;
+        return node;
+      },getMode:function (path) {
+        var stat;
+        try {
+          stat = fs.lstatSync(path);
+          if (NODEFS.isWindows) {
+            // On Windows, directories return permission bits 'rw-rw-rw-', even though they have 'rwxrwxrwx', so
+            // propagate write bits to execute bits.
+            stat.mode = stat.mode | ((stat.mode & 146) >> 1);
+          }
+        } catch (e) {
+          if (!e.code) throw e;
+          throw new FS.ErrnoError(ERRNO_CODES[e.code]);
+        }
+        return stat.mode;
+      },realPath:function (node) {
+        var parts = [];
+        while (node.parent !== node) {
+          parts.push(node.name);
+          node = node.parent;
+        }
+        parts.push(node.mount.opts.root);
+        parts.reverse();
+        return PATH.join.apply(null, parts);
+      },flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:function (flags) {
+        flags &= ~0100000 /*O_LARGEFILE*/; // Ignore this flag from musl, otherwise node.js fails to open the file.
+        flags &= ~02000000 /*O_CLOEXEC*/; // Some applications may pass it; it makes no sense for a single process.
+        if (flags in NODEFS.flagsToPermissionStringMap) {
+          return NODEFS.flagsToPermissionStringMap[flags];
+        } else {
+          throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+        }
+      },node_ops:{getattr:function (node) {
+          var path = NODEFS.realPath(node);
+          var stat;
+          try {
+            stat = fs.lstatSync(path);
+          } catch (e) {
+            if (!e.code) throw e;
+            throw new FS.ErrnoError(ERRNO_CODES[e.code]);
+          }
+          // node.js v0.10.20 doesn't report blksize and blocks on Windows. Fake them with default blksize of 4096.
+          // See http://support.microsoft.com/kb/140365
+          if (NODEFS.isWindows && !stat.blksize) {
+            stat.blksize = 4096;
+          }
+          if (NODEFS.isWindows && !stat.blocks) {
+            stat.blocks = (stat.size+stat.blksize-1)/stat.blksize|0;
+          }
+          return {
+            dev: stat.dev,
+            ino: stat.ino,
+            mode: stat.mode,
+            nlink: stat.nlink,
+            uid: stat.uid,
+            gid: stat.gid,
+            rdev: stat.rdev,
+            size: stat.size,
+            atime: stat.atime,
+            mtime: stat.mtime,
+            ctime: stat.ctime,
+            blksize: stat.blksize,
+            blocks: stat.blocks
+          };
+        },setattr:function (node, attr) {
+          var path = NODEFS.realPath(node);
+          try {
+            if (attr.mode !== undefined) {
+              fs.chmodSync(path, attr.mode);
+              // update the common node structure mode as well
+              node.mode = attr.mode;
+            }
+            if (attr.timestamp !== undefined) {
+              var date = new Date(attr.timestamp);
+              fs.utimesSync(path, date, date);
+            }
+            if (attr.size !== undefined) {
+              fs.truncateSync(path, attr.size);
+            }
+          } catch (e) {
+            if (!e.code) throw e;
+            throw new FS.ErrnoError(ERRNO_CODES[e.code]);
+          }
+        },lookup:function (parent, name) {
+          var path = PATH.join2(NODEFS.realPath(parent), name);
+          var mode = NODEFS.getMode(path);
+          return NODEFS.createNode(parent, name, mode);
+        },mknod:function (parent, name, mode, dev) {
+          var node = NODEFS.createNode(parent, name, mode, dev);
+          // create the backing node for this in the fs root as well
+          var path = NODEFS.realPath(node);
+          try {
+            if (FS.isDir(node.mode)) {
+              fs.mkdirSync(path, node.mode);
+            } else {
+              fs.writeFileSync(path, '', { mode: node.mode });
+            }
+          } catch (e) {
+            if (!e.code) throw e;
+            throw new FS.ErrnoError(ERRNO_CODES[e.code]);
+          }
+          return node;
+        },rename:function (oldNode, newDir, newName) {
+          var oldPath = NODEFS.realPath(oldNode);
+          var newPath = PATH.join2(NODEFS.realPath(newDir), newName);
+          try {
+            fs.renameSync(oldPath, newPath);
+          } catch (e) {
+            if (!e.code) throw e;
+            throw new FS.ErrnoError(ERRNO_CODES[e.code]);
+          }
+        },unlink:function (parent, name) {
+          var path = PATH.join2(NODEFS.realPath(parent), name);
+          try {
+            fs.unlinkSync(path);
+          } catch (e) {
+            if (!e.code) throw e;
+            throw new FS.ErrnoError(ERRNO_CODES[e.code]);
+          }
+        },rmdir:function (parent, name) {
+          var path = PATH.join2(NODEFS.realPath(parent), name);
+          try {
+            fs.rmdirSync(path);
+          } catch (e) {
+            if (!e.code) throw e;
+            throw new FS.ErrnoError(ERRNO_CODES[e.code]);
+          }
+        },readdir:function (node) {
+          var path = NODEFS.realPath(node);
+          try {
+            return fs.readdirSync(path);
+          } catch (e) {
+            if (!e.code) throw e;
+            throw new FS.ErrnoError(ERRNO_CODES[e.code]);
+          }
+        },symlink:function (parent, newName, oldPath) {
+          var newPath = PATH.join2(NODEFS.realPath(parent), newName);
+          try {
+            fs.symlinkSync(oldPath, newPath);
+          } catch (e) {
+            if (!e.code) throw e;
+            throw new FS.ErrnoError(ERRNO_CODES[e.code]);
+          }
+        },readlink:function (node) {
+          var path = NODEFS.realPath(node);
+          try {
+            path = fs.readlinkSync(path);
+            path = NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root), path);
+            return path;
+          } catch (e) {
+            if (!e.code) throw e;
+            throw new FS.ErrnoError(ERRNO_CODES[e.code]);
+          }
+        }},stream_ops:{open:function (stream) {
+          var path = NODEFS.realPath(stream.node);
+          try {
+            if (FS.isFile(stream.node.mode)) {
+              stream.nfd = fs.openSync(path, NODEFS.flagsToPermissionString(stream.flags));
+            }
+          } catch (e) {
+            if (!e.code) throw e;
+            throw new FS.ErrnoError(ERRNO_CODES[e.code]);
+          }
+        },close:function (stream) {
+          try {
+            if (FS.isFile(stream.node.mode) && stream.nfd) {
+              fs.closeSync(stream.nfd);
+            }
+          } catch (e) {
+            if (!e.code) throw e;
+            throw new FS.ErrnoError(ERRNO_CODES[e.code]);
+          }
+        },read:function (stream, buffer, offset, length, position) {
+          if (length === 0) return 0; // node errors on 0 length reads
+          // FIXME this is terrible.
+          var nbuffer = new Buffer(length);
+          var res;
+          try {
+            res = fs.readSync(stream.nfd, nbuffer, 0, length, position);
+          } catch (e) {
+            throw new FS.ErrnoError(ERRNO_CODES[e.code]);
+          }
+          if (res > 0) {
+            for (var i = 0; i < res; i++) {
+              buffer[offset + i] = nbuffer[i];
+            }
+          }
+          return res;
+        },write:function (stream, buffer, offset, length, position) {
+          // FIXME this is terrible.
+          var nbuffer = new Buffer(buffer.subarray(offset, offset + length));
+          var res;
+          try {
+            res = fs.writeSync(stream.nfd, nbuffer, 0, length, position);
+          } catch (e) {
+            throw new FS.ErrnoError(ERRNO_CODES[e.code]);
+          }
+          return res;
+        },llseek:function (stream, offset, whence) {
+          var position = offset;
+          if (whence === 1) {  // SEEK_CUR.
+            position += stream.position;
+          } else if (whence === 2) {  // SEEK_END.
+            if (FS.isFile(stream.node.mode)) {
+              try {
+                var stat = fs.fstatSync(stream.nfd);
+                position += stat.size;
+              } catch (e) {
+                throw new FS.ErrnoError(ERRNO_CODES[e.code]);
+              }
+            }
+          }
+  
+          if (position < 0) {
+            throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+          }
+  
+          return position;
+        }}};
+  
+  var WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function (mount) {
+        assert(ENVIRONMENT_IS_WORKER);
+        if (!WORKERFS.reader) WORKERFS.reader = new FileReaderSync();
+        var root = WORKERFS.createNode(null, '/', WORKERFS.DIR_MODE, 0);
+        var createdParents = {};
+        function ensureParent(path) {
+          // return the parent node, creating subdirs as necessary
+          var parts = path.split('/');
+          var parent = root;
+          for (var i = 0; i < parts.length-1; i++) {
+            var curr = parts.slice(0, i+1).join('/');
+            // Issue 4254: Using curr as a node name will prevent the node
+            // from being found in FS.nameTable when FS.open is called on
+            // a path which holds a child of this node,
+            // given that all FS functions assume node names
+            // are just their corresponding parts within their given path,
+            // rather than incremental aggregates which include their parent's
+            // directories.
+            if (!createdParents[curr]) {
+              createdParents[curr] = WORKERFS.createNode(parent, parts[i], WORKERFS.DIR_MODE, 0);
+            }
+            parent = createdParents[curr];
+          }
+          return parent;
+        }
+        function base(path) {
+          var parts = path.split('/');
+          return parts[parts.length-1];
+        }
+        // We also accept FileList here, by using Array.prototype
+        Array.prototype.forEach.call(mount.opts["files"] || [], function(file) {
+          WORKERFS.createNode(ensureParent(file.name), base(file.name), WORKERFS.FILE_MODE, 0, file, file.lastModifiedDate);
+        });
+        (mount.opts["blobs"] || []).forEach(function(obj) {
+          WORKERFS.createNode(ensureParent(obj["name"]), base(obj["name"]), WORKERFS.FILE_MODE, 0, obj["data"]);
+        });
+        (mount.opts["packages"] || []).forEach(function(pack) {
+          pack['metadata'].files.forEach(function(file) {
+            var name = file.filename.substr(1); // remove initial slash
+            WORKERFS.createNode(ensureParent(name), base(name), WORKERFS.FILE_MODE, 0, pack['blob'].slice(file.start, file.end));
+          });
+        });
+        return root;
+      },createNode:function (parent, name, mode, dev, contents, mtime) {
+        var node = FS.createNode(parent, name, mode);
+        node.mode = mode;
+        node.node_ops = WORKERFS.node_ops;
+        node.stream_ops = WORKERFS.stream_ops;
+        node.timestamp = (mtime || new Date).getTime();
+        assert(WORKERFS.FILE_MODE !== WORKERFS.DIR_MODE);
+        if (mode === WORKERFS.FILE_MODE) {
+          node.size = contents.size;
+          node.contents = contents;
+        } else {
+          node.size = 4096;
+          node.contents = {};
+        }
+        if (parent) {
+          parent.contents[name] = node;
+        }
+        return node;
+      },node_ops:{getattr:function (node) {
+          return {
+            dev: 1,
+            ino: undefined,
+            mode: node.mode,
+            nlink: 1,
+            uid: 0,
+            gid: 0,
+            rdev: undefined,
+            size: node.size,
+            atime: new Date(node.timestamp),
+            mtime: new Date(node.timestamp),
+            ctime: new Date(node.timestamp),
+            blksize: 4096,
+            blocks: Math.ceil(node.size / 4096),
+          };
+        },setattr:function (node, attr) {
+          if (attr.mode !== undefined) {
+            node.mode = attr.mode;
+          }
+          if (attr.timestamp !== undefined) {
+            node.timestamp = attr.timestamp;
+          }
+        },lookup:function (parent, name) {
+          throw new FS.ErrnoError(ERRNO_CODES.ENOENT);
+        },mknod:function (parent, name, mode, dev) {
+          throw new FS.ErrnoError(ERRNO_CODES.EPERM);
+        },rename:function (oldNode, newDir, newName) {
+          throw new FS.ErrnoError(ERRNO_CODES.EPERM);
+        },unlink:function (parent, name) {
+          throw new FS.ErrnoError(ERRNO_CODES.EPERM);
+        },rmdir:function (parent, name) {
+          throw new FS.ErrnoError(ERRNO_CODES.EPERM);
+        },readdir:function (node) {
+          throw new FS.ErrnoError(ERRNO_CODES.EPERM);
+        },symlink:function (parent, newName, oldPath) {
+          throw new FS.ErrnoError(ERRNO_CODES.EPERM);
+        },readlink:function (node) {
+          throw new FS.ErrnoError(ERRNO_CODES.EPERM);
+        }},stream_ops:{read:function (stream, buffer, offset, length, position) {
+          if (position >= stream.node.size) return 0;
+          var chunk = stream.node.contents.slice(position, position + length);
+          var ab = WORKERFS.reader.readAsArrayBuffer(chunk);
+          buffer.set(new Uint8Array(ab), offset);
+          return chunk.size;
+        },write:function (stream, buffer, offset, length, position) {
+          throw new FS.ErrnoError(ERRNO_CODES.EIO);
+        },llseek:function (stream, offset, whence) {
+          var position = offset;
+          if (whence === 1) {  // SEEK_CUR.
+            position += stream.position;
+          } else if (whence === 2) {  // SEEK_END.
+            if (FS.isFile(stream.node.mode)) {
+              position += stream.node.size;
+            }
+          }
+          if (position < 0) {
+            throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+          }
+          return position;
+        }}};
+  
+  var _stdin=STATICTOP; STATICTOP += 16;;
+  
+  var _stdout=STATICTOP; STATICTOP += 16;;
+  
+  var _stderr=STATICTOP; STATICTOP += 16;;var FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function (e) {
+        if (!(e instanceof FS.ErrnoError)) throw e + ' : ' + stackTrace();
+        return ___setErrNo(e.errno);
+      },lookupPath:function (path, opts) {
+        path = PATH.resolve(FS.cwd(), path);
+        opts = opts || {};
+  
+        if (!path) return { path: '', node: null };
+  
+        var defaults = {
+          follow_mount: true,
+          recurse_count: 0
+        };
+        for (var key in defaults) {
+          if (opts[key] === undefined) {
+            opts[key] = defaults[key];
+          }
+        }
+  
+        if (opts.recurse_count > 8) {  // max recursive lookup of 8
+          throw new FS.ErrnoError(ERRNO_CODES.ELOOP);
+        }
+  
+        // split the path
+        var parts = PATH.normalizeArray(path.split('/').filter(function(p) {
+          return !!p;
+        }), false);
+  
+        // start at the root
+        var current = FS.root;
+        var current_path = '/';
+  
+        for (var i = 0; i < parts.length; i++) {
+          var islast = (i === parts.length-1);
+          if (islast && opts.parent) {
+            // stop resolving
+            break;
+          }
+  
+          current = FS.lookupNode(current, parts[i]);
+          current_path = PATH.join2(current_path, parts[i]);
+  
+          // jump to the mount's root node if this is a mountpoint
+          if (FS.isMountpoint(current)) {
+            if (!islast || (islast && opts.follow_mount)) {
+              current = current.mounted.root;
+            }
+          }
+  
+          // by default, lookupPath will not follow a symlink if it is the final path component.
+          // setting opts.follow = true will override this behavior.
+          if (!islast || opts.follow) {
+            var count = 0;
+            while (FS.isLink(current.mode)) {
+              var link = FS.readlink(current_path);
+              current_path = PATH.resolve(PATH.dirname(current_path), link);
+  
+              var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count });
+              current = lookup.node;
+  
+              if (count++ > 40) {  // limit max consecutive symlinks to 40 (SYMLOOP_MAX).
+                throw new FS.ErrnoError(ERRNO_CODES.ELOOP);
+              }
+            }
+          }
+        }
+  
+        return { path: current_path, node: current };
+      },getPath:function (node) {
+        var path;
+        while (true) {
+          if (FS.isRoot(node)) {
+            var mount = node.mount.mountpoint;
+            if (!path) return mount;
+            return mount[mount.length-1] !== '/' ? mount + '/' + path : mount + path;
+          }
+          path = path ? node.name + '/' + path : node.name;
+          node = node.parent;
+        }
+      },hashName:function (parentid, name) {
+        var hash = 0;
+  
+  
+        for (var i = 0; i < name.length; i++) {
+          hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0;
+        }
+        return ((parentid + hash) >>> 0) % FS.nameTable.length;
+      },hashAddNode:function (node) {
+        var hash = FS.hashName(node.parent.id, node.name);
+        node.name_next = FS.nameTable[hash];
+        FS.nameTable[hash] = node;
+      },hashRemoveNode:function (node) {
+        var hash = FS.hashName(node.parent.id, node.name);
+        if (FS.nameTable[hash] === node) {
+          FS.nameTable[hash] = node.name_next;
+        } else {
+          var current = FS.nameTable[hash];
+          while (current) {
+            if (current.name_next === node) {
+              current.name_next = node.name_next;
+              break;
+            }
+            current = current.name_next;
+          }
+        }
+      },lookupNode:function (parent, name) {
+        var err = FS.mayLookup(parent);
+        if (err) {
+          throw new FS.ErrnoError(err, parent);
+        }
+        var hash = FS.hashName(parent.id, name);
+        for (var node = FS.nameTable[hash]; node; node = node.name_next) {
+          var nodeName = node.name;
+          if (node.parent.id === parent.id && nodeName === name) {
+            return node;
+          }
+        }
+        // if we failed to find it in the cache, call into the VFS
+        return FS.lookup(parent, name);
+      },createNode:function (parent, name, mode, rdev) {
+        if (!FS.FSNode) {
+          FS.FSNode = function(parent, name, mode, rdev) {
+            if (!parent) {
+              parent = this;  // root node sets parent to itself
+            }
+            this.parent = parent;
+            this.mount = parent.mount;
+            this.mounted = null;
+            this.id = FS.nextInode++;
+            this.name = name;
+            this.mode = mode;
+            this.node_ops = {};
+            this.stream_ops = {};
+            this.rdev = rdev;
+          };
+  
+          FS.FSNode.prototype = {};
+  
+          // compatibility
+          var readMode = 292 | 73;
+          var writeMode = 146;
+  
+          // NOTE we must use Object.defineProperties instead of individual calls to
+          // Object.defineProperty in order to make closure compiler happy
+          Object.defineProperties(FS.FSNode.prototype, {
+            read: {
+              get: function() { return (this.mode & readMode) === readMode; },
+              set: function(val) { val ? this.mode |= readMode : this.mode &= ~readMode; }
+            },
+            write: {
+              get: function() { return (this.mode & writeMode) === writeMode; },
+              set: function(val) { val ? this.mode |= writeMode : this.mode &= ~writeMode; }
+            },
+            isFolder: {
+              get: function() { return FS.isDir(this.mode); }
+            },
+            isDevice: {
+              get: function() { return FS.isChrdev(this.mode); }
+            }
+          });
+        }
+  
+        var node = new FS.FSNode(parent, name, mode, rdev);
+  
+        FS.hashAddNode(node);
+  
+        return node;
+      },destroyNode:function (node) {
+        FS.hashRemoveNode(node);
+      },isRoot:function (node) {
+        return node === node.parent;
+      },isMountpoint:function (node) {
+        return !!node.mounted;
+      },isFile:function (mode) {
+        return (mode & 61440) === 32768;
+      },isDir:function (mode) {
+        return (mode & 61440) === 16384;
+      },isLink:function (mode) {
+        return (mode & 61440) === 40960;
+      },isChrdev:function (mode) {
+        return (mode & 61440) === 8192;
+      },isBlkdev:function (mode) {
+        return (mode & 61440) === 24576;
+      },isFIFO:function (mode) {
+        return (mode & 61440) === 4096;
+      },isSocket:function (mode) {
+        return (mode & 49152) === 49152;
+      },flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function (str) {
+        var flags = FS.flagModes[str];
+        if (typeof flags === 'undefined') {
+          throw new Error('Unknown file open mode: ' + str);
+        }
+        return flags;
+      },flagsToPermissionString:function (flag) {
+        var perms = ['r', 'w', 'rw'][flag & 3];
+        if ((flag & 512)) {
+          perms += 'w';
+        }
+        return perms;
+      },nodePermissions:function (node, perms) {
+        if (FS.ignorePermissions) {
+          return 0;
+        }
+        // return 0 if any user, group or owner bits are set.
+        if (perms.indexOf('r') !== -1 && !(node.mode & 292)) {
+          return ERRNO_CODES.EACCES;
+        } else if (perms.indexOf('w') !== -1 && !(node.mode & 146)) {
+          return ERRNO_CODES.EACCES;
+        } else if (perms.indexOf('x') !== -1 && !(node.mode & 73)) {
+          return ERRNO_CODES.EACCES;
+        }
+        return 0;
+      },mayLookup:function (dir) {
+        var err = FS.nodePermissions(dir, 'x');
+        if (err) return err;
+        if (!dir.node_ops.lookup) return ERRNO_CODES.EACCES;
+        return 0;
+      },mayCreate:function (dir, name) {
+        try {
+          var node = FS.lookupNode(dir, name);
+          return ERRNO_CODES.EEXIST;
+        } catch (e) {
+        }
+        return FS.nodePermissions(dir, 'wx');
+      },mayDelete:function (dir, name, isdir) {
+        var node;
+        try {
+          node = FS.lookupNode(dir, name);
+        } catch (e) {
+          return e.errno;
+        }
+        var err = FS.nodePermissions(dir, 'wx');
+        if (err) {
+          return err;
+        }
+        if (isdir) {
+          if (!FS.isDir(node.mode)) {
+            return ERRNO_CODES.ENOTDIR;
+          }
+          if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) {
+            return ERRNO_CODES.EBUSY;
+          }
+        } else {
+          if (FS.isDir(node.mode)) {
+            return ERRNO_CODES.EISDIR;
+          }
+        }
+        return 0;
+      },mayOpen:function (node, flags) {
+        if (!node) {
+          return ERRNO_CODES.ENOENT;
+        }
+        if (FS.isLink(node.mode)) {
+          return ERRNO_CODES.ELOOP;
+        } else if (FS.isDir(node.mode)) {
+          if (FS.flagsToPermissionString(flags) !== 'r' || // opening for write
+              (flags & 512)) { // TODO: check for O_SEARCH? (== search for dir only)
+            return ERRNO_CODES.EISDIR;
+          }
+        }
+        return FS.nodePermissions(node, FS.flagsToPermissionString(flags));
+      },MAX_OPEN_FDS:4096,nextfd:function (fd_start, fd_end) {
+        fd_start = fd_start || 0;
+        fd_end = fd_end || FS.MAX_OPEN_FDS;
+        for (var fd = fd_start; fd <= fd_end; fd++) {
+          if (!FS.streams[fd]) {
+            return fd;
+          }
+        }
+        throw new FS.ErrnoError(ERRNO_CODES.EMFILE);
+      },getStream:function (fd) {
+        return FS.streams[fd];
+      },createStream:function (stream, fd_start, fd_end) {
+        if (!FS.FSStream) {
+          FS.FSStream = function(){};
+          FS.FSStream.prototype = {};
+          // compatibility
+          Object.defineProperties(FS.FSStream.prototype, {
+            object: {
+              get: function() { return this.node; },
+              set: function(val) { this.node = val; }
+            },
+            isRead: {
+              get: function() { return (this.flags & 2097155) !== 1; }
+            },
+            isWrite: {
+              get: function() { return (this.flags & 2097155) !== 0; }
+            },
+            isAppend: {
+              get: function() { return (this.flags & 1024); }
+            }
+          });
+        }
+        // clone it, so we can return an instance of FSStream
+        var newStream = new FS.FSStream();
+        for (var p in stream) {
+          newStream[p] = stream[p];
+        }
+        stream = newStream;
+        var fd = FS.nextfd(fd_start, fd_end);
+        stream.fd = fd;
+        FS.streams[fd] = stream;
+        return stream;
+      },closeStream:function (fd) {
+        FS.streams[fd] = null;
+      },chrdev_stream_ops:{open:function (stream) {
+          var device = FS.getDevice(stream.node.rdev);
+          // override node's stream ops with the device's
+          stream.stream_ops = device.stream_ops;
+          // forward the open call
+          if (stream.stream_ops.open) {
+            stream.stream_ops.open(stream);
+          }
+        },llseek:function () {
+          throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);
+        }},major:function (dev) {
+        return ((dev) >> 8);
+      },minor:function (dev) {
+        return ((dev) & 0xff);
+      },makedev:function (ma, mi) {
+        return ((ma) << 8 | (mi));
+      },registerDevice:function (dev, ops) {
+        FS.devices[dev] = { stream_ops: ops };
+      },getDevice:function (dev) {
+        return FS.devices[dev];
+      },getMounts:function (mount) {
+        var mounts = [];
+        var check = [mount];
+  
+        while (check.length) {
+          var m = check.pop();
+  
+          mounts.push(m);
+  
+          check.push.apply(check, m.mounts);
+        }
+  
+        return mounts;
+      },syncfs:function (populate, callback) {
+        if (typeof(populate) === 'function') {
+          callback = populate;
+          populate = false;
+        }
+  
+        FS.syncFSRequests++;
+  
+        if (FS.syncFSRequests > 1) {
+          console.log('warning: ' + FS.syncFSRequests + ' FS.syncfs operations in flight at once, probably just doing extra work');
+        }
+  
+        var mounts = FS.getMounts(FS.root.mount);
+        var completed = 0;
+  
+        function doCallback(err) {
+          assert(FS.syncFSRequests > 0);
+          FS.syncFSRequests--;
+          return callback(err);
+        }
+  
+        function done(err) {
+          if (err) {
+            if (!done.errored) {
+              done.errored = true;
+              return doCallback(err);
+            }
+            return;
+          }
+          if (++completed >= mounts.length) {
+            doCallback(null);
+          }
+        };
+  
+        // sync all mounts
+        mounts.forEach(function (mount) {
+          if (!mount.type.syncfs) {
+            return done(null);
+          }
+          mount.type.syncfs(mount, populate, done);
+        });
+      },mount:function (type, opts, mountpoint) {
+        var root = mountpoint === '/';
+        var pseudo = !mountpoint;
+        var node;
+  
+        if (root && FS.root) {
+          throw new FS.ErrnoError(ERRNO_CODES.EBUSY);
+        } else if (!root && !pseudo) {
+          var lookup = FS.lookupPath(mountpoint, { follow_mount: false });
+  
+          mountpoint = lookup.path;  // use the absolute path
+          node = lookup.node;
+  
+          if (FS.isMountpoint(node)) {
+            throw new FS.ErrnoError(ERRNO_CODES.EBUSY);
+          }
+  
+          if (!FS.isDir(node.mode)) {
+            throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);
+          }
+        }
+  
+        var mount = {
+          type: type,
+          opts: opts,
+          mountpoint: mountpoint,
+          mounts: []
+        };
+  
+        // create a root node for the fs
+        var mountRoot = type.mount(mount);
+        mountRoot.mount = mount;
+        mount.root = mountRoot;
+  
+        if (root) {
+          FS.root = mountRoot;
+        } else if (node) {
+          // set as a mountpoint
+          node.mounted = mount;
+  
+          // add the new mount to the current mount's children
+          if (node.mount) {
+            node.mount.mounts.push(mount);
+          }
+        }
+  
+        return mountRoot;
+      },unmount:function (mountpoint) {
+        var lookup = FS.lookupPath(mountpoint, { follow_mount: false });
+  
+        if (!FS.isMountpoint(lookup.node)) {
+          throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+        }
+  
+        // destroy the nodes for this mount, and all its child mounts
+        var node = lookup.node;
+        var mount = node.mounted;
+        var mounts = FS.getMounts(mount);
+  
+        Object.keys(FS.nameTable).forEach(function (hash) {
+          var current = FS.nameTable[hash];
+  
+          while (current) {
+            var next = current.name_next;
+  
+            if (mounts.indexOf(current.mount) !== -1) {
+              FS.destroyNode(current);
+            }
+  
+            current = next;
+          }
+        });
+  
+        // no longer a mountpoint
+        node.mounted = null;
+  
+        // remove this mount from the child mounts
+        var idx = node.mount.mounts.indexOf(mount);
+        assert(idx !== -1);
+        node.mount.mounts.splice(idx, 1);
+      },lookup:function (parent, name) {
+        return parent.node_ops.lookup(parent, name);
+      },mknod:function (path, mode, dev) {
+        var lookup = FS.lookupPath(path, { parent: true });
+        var parent = lookup.node;
+        var name = PATH.basename(path);
+        if (!name || name === '.' || name === '..') {
+          throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+        }
+        var err = FS.mayCreate(parent, name);
+        if (err) {
+          throw new FS.ErrnoError(err);
+        }
+        if (!parent.node_ops.mknod) {
+          throw new FS.ErrnoError(ERRNO_CODES.EPERM);
+        }
+        return parent.node_ops.mknod(parent, name, mode, dev);
+      },create:function (path, mode) {
+        mode = mode !== undefined ? mode : 438 /* 0666 */;
+        mode &= 4095;
+        mode |= 32768;
+        return FS.mknod(path, mode, 0);
+      },mkdir:function (path, mode) {
+        mode = mode !== undefined ? mode : 511 /* 0777 */;
+        mode &= 511 | 512;
+        mode |= 16384;
+        return FS.mknod(path, mode, 0);
+      },mkdev:function (path, mode, dev) {
+        if (typeof(dev) === 'undefined') {
+          dev = mode;
+          mode = 438 /* 0666 */;
+        }
+        mode |= 8192;
+        return FS.mknod(path, mode, dev);
+      },symlink:function (oldpath, newpath) {
+        if (!PATH.resolve(oldpath)) {
+          throw new FS.ErrnoError(ERRNO_CODES.ENOENT);
+        }
+        var lookup = FS.lookupPath(newpath, { parent: true });
+        var parent = lookup.node;
+        if (!parent) {
+          throw new FS.ErrnoError(ERRNO_CODES.ENOENT);
+        }
+        var newname = PATH.basename(newpath);
+        var err = FS.mayCreate(parent, newname);
+        if (err) {
+          throw new FS.ErrnoError(err);
+        }
+        if (!parent.node_ops.symlink) {
+          throw new FS.ErrnoError(ERRNO_CODES.EPERM);
+        }
+        return parent.node_ops.symlink(parent, newname, oldpath);
+      },rename:function (old_path, new_path) {
+        var old_dirname = PATH.dirname(old_path);
+        var new_dirname = PATH.dirname(new_path);
+        var old_name = PATH.basename(old_path);
+        var new_name = PATH.basename(new_path);
+        // parents must exist
+        var lookup, old_dir, new_dir;
+        try {
+          lookup = FS.lookupPath(old_path, { parent: true });
+          old_dir = lookup.node;
+          lookup = FS.lookupPath(new_path, { parent: true });
+          new_dir = lookup.node;
+        } catch (e) {
+          throw new FS.ErrnoError(ERRNO_CODES.EBUSY);
+        }
+        if (!old_dir || !new_dir) throw new FS.ErrnoError(ERRNO_CODES.ENOENT);
+        // need to be part of the same mount
+        if (old_dir.mount !== new_dir.mount) {
+          throw new FS.ErrnoError(ERRNO_CODES.EXDEV);
+        }
+        // source must exist
+        var old_node = FS.lookupNode(old_dir, old_name);
+        // old path should not be an ancestor of the new path
+        var relative = PATH.relative(old_path, new_dirname);
+        if (relative.charAt(0) !== '.') {
+          throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+        }
+        // new path should not be an ancestor of the old path
+        relative = PATH.relative(new_path, old_dirname);
+        if (relative.charAt(0) !== '.') {
+          throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);
+        }
+        // see if the new path already exists
+        var new_node;
+        try {
+          new_node = FS.lookupNode(new_dir, new_name);
+        } catch (e) {
+          // not fatal
+        }
+        // early out if nothing needs to change
+        if (old_node === new_node) {
+          return;
+        }
+        // we'll need to delete the old entry
+        var isdir = FS.isDir(old_node.mode);
+        var err = FS.mayDelete(old_dir, old_name, isdir);
+        if (err) {
+          throw new FS.ErrnoError(err);
+        }
+        // need delete permissions if we'll be overwriting.
+        // need create permissions if new doesn't already exist.
+        err = new_node ?
+          FS.mayDelete(new_dir, new_name, isdir) :
+          FS.mayCreate(new_dir, new_name);
+        if (err) {
+          throw new FS.ErrnoError(err);
+        }
+        if (!old_dir.node_ops.rename) {
+          throw new FS.ErrnoError(ERRNO_CODES.EPERM);
+        }
+        if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) {
+          throw new FS.ErrnoError(ERRNO_CODES.EBUSY);
+        }
+        // if we are going to change the parent, check write permissions
+        if (new_dir !== old_dir) {
+          err = FS.nodePermissions(old_dir, 'w');
+          if (err) {
+            throw new FS.ErrnoError(err);
+          }
+        }
+        try {
+          if (FS.trackingDelegate['willMovePath']) {
+            FS.trackingDelegate['willMovePath'](old_path, new_path);
+          }
+        } catch(e) {
+          console.log("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message);
+        }
+        // remove the node from the lookup hash
+        FS.hashRemoveNode(old_node);
+        // do the underlying fs rename
+        try {
+          old_dir.node_ops.rename(old_node, new_dir, new_name);
+        } catch (e) {
+          throw e;
+        } finally {
+          // add the node back to the hash (in case node_ops.rename
+          // changed its name)
+          FS.hashAddNode(old_node);
+        }
+        try {
+          if (FS.trackingDelegate['onMovePath']) FS.trackingDelegate['onMovePath'](old_path, new_path);
+        } catch(e) {
+          console.log("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: " + e.message);
+        }
+      },rmdir:function (path) {
+        var lookup = FS.lookupPath(path, { parent: true });
+        var parent = lookup.node;
+        var name = PATH.basename(path);
+        var node = FS.lookupNode(parent, name);
+        var err = FS.mayDelete(parent, name, true);
+        if (err) {
+          throw new FS.ErrnoError(err);
+        }
+        if (!parent.node_ops.rmdir) {
+          throw new FS.ErrnoError(ERRNO_CODES.EPERM);
+        }
+        if (FS.isMountpoint(node)) {
+          throw new FS.ErrnoError(ERRNO_CODES.EBUSY);
+        }
+        try {
+          if (FS.trackingDelegate['willDeletePath']) {
+            FS.trackingDelegate['willDeletePath'](path);
+          }
+        } catch(e) {
+          console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message);
+        }
+        parent.node_ops.rmdir(parent, name);
+        FS.destroyNode(node);
+        try {
+          if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path);
+        } catch(e) {
+          console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message);
+        }
+      },readdir:function (path) {
+        var lookup = FS.lookupPath(path, { follow: true });
+        var node = lookup.node;
+        if (!node.node_ops.readdir) {
+          throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);
+        }
+        return node.node_ops.readdir(node);
+      },unlink:function (path) {
+        var lookup = FS.lookupPath(path, { parent: true });
+        var parent = lookup.node;
+        var name = PATH.basename(path);
+        var node = FS.lookupNode(parent, name);
+        var err = FS.mayDelete(parent, name, false);
+        if (err) {
+          // POSIX says unlink should set EPERM, not EISDIR
+          if (err === ERRNO_CODES.EISDIR) err = ERRNO_CODES.EPERM;
+          throw new FS.ErrnoError(err);
+        }
+        if (!parent.node_ops.unlink) {
+          throw new FS.ErrnoError(ERRNO_CODES.EPERM);
+        }
+        if (FS.isMountpoint(node)) {
+          throw new FS.ErrnoError(ERRNO_CODES.EBUSY);
+        }
+        try {
+          if (FS.trackingDelegate['willDeletePath']) {
+            FS.trackingDelegate['willDeletePath'](path);
+          }
+        } catch(e) {
+          console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: " + e.message);
+        }
+        parent.node_ops.unlink(parent, name);
+        FS.destroyNode(node);
+        try {
+          if (FS.trackingDelegate['onDeletePath']) FS.trackingDelegate['onDeletePath'](path);
+        } catch(e) {
+          console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: " + e.message);
+        }
+      },readlink:function (path) {
+        var lookup = FS.lookupPath(path);
+        var link = lookup.node;
+        if (!link) {
+          throw new FS.ErrnoError(ERRNO_CODES.ENOENT);
+        }
+        if (!link.node_ops.readlink) {
+          throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+        }
+        return PATH.resolve(FS.getPath(link.parent), link.node_ops.readlink(link));
+      },stat:function (path, dontFollow) {
+        var lookup = FS.lookupPath(path, { follow: !dontFollow });
+        var node = lookup.node;
+        if (!node) {
+          throw new FS.ErrnoError(ERRNO_CODES.ENOENT);
+        }
+        if (!node.node_ops.getattr) {
+          throw new FS.ErrnoError(ERRNO_CODES.EPERM);
+        }
+        return node.node_ops.getattr(node);
+      },lstat:function (path) {
+        return FS.stat(path, true);
+      },chmod:function (path, mode, dontFollow) {
+        var node;
+        if (typeof path === 'string') {
+          var lookup = FS.lookupPath(path, { follow: !dontFollow });
+          node = lookup.node;
+        } else {
+          node = path;
+        }
+        if (!node.node_ops.setattr) {
+          throw new FS.ErrnoError(ERRNO_CODES.EPERM);
+        }
+        node.node_ops.setattr(node, {
+          mode: (mode & 4095) | (node.mode & ~4095),
+          timestamp: Date.now()
+        });
+      },lchmod:function (path, mode) {
+        FS.chmod(path, mode, true);
+      },fchmod:function (fd, mode) {
+        var stream = FS.getStream(fd);
+        if (!stream) {
+          throw new FS.ErrnoError(ERRNO_CODES.EBADF);
+        }
+        FS.chmod(stream.node, mode);
+      },chown:function (path, uid, gid, dontFollow) {
+        var node;
+        if (typeof path === 'string') {
+          var lookup = FS.lookupPath(path, { follow: !dontFollow });
+          node = lookup.node;
+        } else {
+          node = path;
+        }
+        if (!node.node_ops.setattr) {
+          throw new FS.ErrnoError(ERRNO_CODES.EPERM);
+        }
+        node.node_ops.setattr(node, {
+          timestamp: Date.now()
+          // we ignore the uid / gid for now
+        });
+      },lchown:function (path, uid, gid) {
+        FS.chown(path, uid, gid, true);
+      },fchown:function (fd, uid, gid) {
+        var stream = FS.getStream(fd);
+        if (!stream) {
+          throw new FS.ErrnoError(ERRNO_CODES.EBADF);
+        }
+        FS.chown(stream.node, uid, gid);
+      },truncate:function (path, len) {
+        if (len < 0) {
+          throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+        }
+        var node;
+        if (typeof path === 'string') {
+          var lookup = FS.lookupPath(path, { follow: true });
+          node = lookup.node;
+        } else {
+          node = path;
+        }
+        if (!node.node_ops.setattr) {
+          throw new FS.ErrnoError(ERRNO_CODES.EPERM);
+        }
+        if (FS.isDir(node.mode)) {
+          throw new FS.ErrnoError(ERRNO_CODES.EISDIR);
+        }
+        if (!FS.isFile(node.mode)) {
+          throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+        }
+        var err = FS.nodePermissions(node, 'w');
+        if (err) {
+          throw new FS.ErrnoError(err);
+        }
+        node.node_ops.setattr(node, {
+          size: len,
+          timestamp: Date.now()
+        });
+      },ftruncate:function (fd, len) {
+        var stream = FS.getStream(fd);
+        if (!stream) {
+          throw new FS.ErrnoError(ERRNO_CODES.EBADF);
+        }
+        if ((stream.flags & 2097155) === 0) {
+          throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+        }
+        FS.truncate(stream.node, len);
+      },utime:function (path, atime, mtime) {
+        var lookup = FS.lookupPath(path, { follow: true });
+        var node = lookup.node;
+        node.node_ops.setattr(node, {
+          timestamp: Math.max(atime, mtime)
+        });
+      },open:function (path, flags, mode, fd_start, fd_end) {
+        if (path === "") {
+          throw new FS.ErrnoError(ERRNO_CODES.ENOENT);
+        }
+        flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags;
+        mode = typeof mode === 'undefined' ? 438 /* 0666 */ : mode;
+        if ((flags & 64)) {
+          mode = (mode & 4095) | 32768;
+        } else {
+          mode = 0;
+        }
+        var node;
+        if (typeof path === 'object') {
+          node = path;
+        } else {
+          path = PATH.normalize(path);
+          try {
+            var lookup = FS.lookupPath(path, {
+              follow: !(flags & 131072)
+            });
+            node = lookup.node;
+          } catch (e) {
+            // ignore
+          }
+        }
+        // perhaps we need to create the node
+        var created = false;
+        if ((flags & 64)) {
+          if (node) {
+            // if O_CREAT and O_EXCL are set, error out if the node already exists
+            if ((flags & 128)) {
+              throw new FS.ErrnoError(ERRNO_CODES.EEXIST);
+            }
+          } else {
+            // node doesn't exist, try to create it
+            node = FS.mknod(path, mode, 0);
+            created = true;
+          }
+        }
+        if (!node) {
+          throw new FS.ErrnoError(ERRNO_CODES.ENOENT);
+        }
+        // can't truncate a device
+        if (FS.isChrdev(node.mode)) {
+          flags &= ~512;
+        }
+        // if asked only for a directory, then this must be one
+        if ((flags & 65536) && !FS.isDir(node.mode)) {
+          throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);
+        }
+        // check permissions, if this is not a file we just created now (it is ok to
+        // create and write to a file with read-only permissions; it is read-only
+        // for later use)
+        if (!created) {
+          var err = FS.mayOpen(node, flags);
+          if (err) {
+            throw new FS.ErrnoError(err);
+          }
+        }
+        // do truncation if necessary
+        if ((flags & 512)) {
+          FS.truncate(node, 0);
+        }
+        // we've already handled these, don't pass down to the underlying vfs
+        flags &= ~(128 | 512);
+  
+        // register the stream with the filesystem
+        var stream = FS.createStream({
+          node: node,
+          path: FS.getPath(node),  // we want the absolute path to the node
+          flags: flags,
+          seekable: true,
+          position: 0,
+          stream_ops: node.stream_ops,
+          // used by the file family libc calls (fopen, fwrite, ferror, etc.)
+          ungotten: [],
+          error: false
+        }, fd_start, fd_end);
+        // call the new stream's open function
+        if (stream.stream_ops.open) {
+          stream.stream_ops.open(stream);
+        }
+        if (Module['logReadFiles'] && !(flags & 1)) {
+          if (!FS.readFiles) FS.readFiles = {};
+          if (!(path in FS.readFiles)) {
+            FS.readFiles[path] = 1;
+            Module['printErr']('read file: ' + path);
+          }
+        }
+        try {
+          if (FS.trackingDelegate['onOpenFile']) {
+            var trackingFlags = 0;
+            if ((flags & 2097155) !== 1) {
+              trackingFlags |= FS.tracking.openFlags.READ;
+            }
+            if ((flags & 2097155) !== 0) {
+              trackingFlags |= FS.tracking.openFlags.WRITE;
+            }
+            FS.trackingDelegate['onOpenFile'](path, trackingFlags);
+          }
+        } catch(e) {
+          console.log("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: " + e.message);
+        }
+        return stream;
+      },close:function (stream) {
+        if (stream.getdents) stream.getdents = null; // free readdir state
+        try {
+          if (stream.stream_ops.close) {
+            stream.stream_ops.close(stream);
+          }
+        } catch (e) {
+          throw e;
+        } finally {
+          FS.closeStream(stream.fd);
+        }
+      },llseek:function (stream, offset, whence) {
+        if (!stream.seekable || !stream.stream_ops.llseek) {
+          throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);
+        }
+        stream.position = stream.stream_ops.llseek(stream, offset, whence);
+        stream.ungotten = [];
+        return stream.position;
+      },read:function (stream, buffer, offset, length, position) {
+        if (length < 0 || position < 0) {
+          throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+        }
+        if ((stream.flags & 2097155) === 1) {
+          throw new FS.ErrnoError(ERRNO_CODES.EBADF);
+        }
+        if (FS.isDir(stream.node.mode)) {
+          throw new FS.ErrnoError(ERRNO_CODES.EISDIR);
+        }
+        if (!stream.stream_ops.read) {
+          throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+        }
+        var seeking = true;
+        if (typeof position === 'undefined') {
+          position = stream.position;
+          seeking = false;
+        } else if (!stream.seekable) {
+          throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);
+        }
+        var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position);
+        if (!seeking) stream.position += bytesRead;
+        return bytesRead;
+      },write:function (stream, buffer, offset, length, position, canOwn) {
+        if (length < 0 || position < 0) {
+          throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+        }
+        if ((stream.flags & 2097155) === 0) {
+          throw new FS.ErrnoError(ERRNO_CODES.EBADF);
+        }
+        if (FS.isDir(stream.node.mode)) {
+          throw new FS.ErrnoError(ERRNO_CODES.EISDIR);
+        }
+        if (!stream.stream_ops.write) {
+          throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+        }
+        if (stream.flags & 1024) {
+          // seek to the end before writing in append mode
+          FS.llseek(stream, 0, 2);
+        }
+        var seeking = true;
+        if (typeof position === 'undefined') {
+          position = stream.position;
+          seeking = false;
+        } else if (!stream.seekable) {
+          throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);
+        }
+        var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn);
+        if (!seeking) stream.position += bytesWritten;
+        try {
+          if (stream.path && FS.trackingDelegate['onWriteToFile']) FS.trackingDelegate['onWriteToFile'](stream.path);
+        } catch(e) {
+          console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: " + e.message);
+        }
+        return bytesWritten;
+      },allocate:function (stream, offset, length) {
+        if (offset < 0 || length <= 0) {
+          throw new FS.ErrnoError(ERRNO_CODES.EINVAL);
+        }
+        if ((stream.flags & 2097155) === 0) {
+          throw new FS.ErrnoError(ERRNO_CODES.EBADF);
+        }
+        if (!FS.isFile(stream.node.mode) && !FS.isDir(node.mode)) {
+          throw new FS.ErrnoError(ERRNO_CODES.ENODEV);
+        }
+        if (!stream.stream_ops.allocate) {
+          throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP);
+        }
+        stream.stream_ops.allocate(stream, offset, length);
+      },mmap:function (stream, buffer, offset, length, position, prot, flags) {
+        // TODO if PROT is PROT_WRITE, make sure we have write access
+        if ((stream.flags & 2097155) === 1) {
+          throw new FS.ErrnoError(ERRNO_CODES.EACCES);
+        }
+        if (!stream.stream_ops.mmap) {
+          throw new FS.ErrnoError(ERRNO_CODES.ENODEV);
+        }
+        return stream.stream_ops.mmap(stream, buffer, offset, length, position, prot, flags);
+      },msync:function (stream, buffer, offset, length, mmapFlags) {
+        if (!stream || !stream.stream_ops.msync) {
+          return 0;
+        }
+        return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags);
+      },munmap:function (stream) {
+        return 0;
+      },ioctl:function (stream, cmd, arg) {
+        if (!stream.stream_ops.ioctl) {
+          throw new FS.ErrnoError(ERRNO_CODES.ENOTTY);
+        }
+        return stream.stream_ops.ioctl(stream, cmd, arg);
+      },readFile:function (path, opts) {
+        opts = opts || {};
+        opts.flags = opts.flags || 'r';
+        opts.encoding = opts.encoding || 'binary';
+        if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') {
+          throw new Error('Invalid encoding type "' + opts.encoding + '"');
+        }
+        var ret;
+        var stream = FS.open(path, opts.flags);
+        var stat = FS.stat(path);
+        var length = stat.size;
+        var buf = new Uint8Array(length);
+        FS.read(stream, buf, 0, length, 0);
+        if (opts.encoding === 'utf8') {
+          ret = UTF8ArrayToString(buf, 0);
+        } else if (opts.encoding === 'binary') {
+          ret = buf;
+        }
+        FS.close(stream);
+        return ret;
+      },writeFile:function (path, data, opts) {
+        opts = opts || {};
+        opts.flags = opts.flags || 'w';
+        opts.encoding = opts.encoding || 'utf8';
+        if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') {
+          throw new Error('Invalid encoding type "' + opts.encoding + '"');
+        }
+        var stream = FS.open(path, opts.flags, opts.mode);
+        if (opts.encoding === 'utf8') {
+          var buf = new Uint8Array(lengthBytesUTF8(data)+1);
+          var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length);
+          FS.write(stream, buf, 0, actualNumBytes, 0, opts.canOwn);
+        } else if (opts.encoding === 'binary') {
+          FS.write(stream, data, 0, data.length, 0, opts.canOwn);
+        }
+        FS.close(stream);
+      },cwd:function () {
+        return FS.currentPath;
+      },chdir:function (path) {
+        var lookup = FS.lookupPath(path, { follow: true });
+        if (!FS.isDir(lookup.node.mode)) {
+          throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);
+        }
+        var err = FS.nodePermissions(lookup.node, 'x');
+        if (err) {
+          throw new FS.ErrnoError(err);
+        }
+        FS.currentPath = lookup.path;
+      },createDefaultDirectories:function () {
+        FS.mkdir('/tmp');
+        FS.mkdir('/home');
+        FS.mkdir('/home/web_user');
+      },createDefaultDevices:function () {
+        // create /dev
+        FS.mkdir('/dev');
+        // setup /dev/null
+        FS.registerDevice(FS.makedev(1, 3), {
+          read: function() { return 0; },
+          write: function(stream, buffer, offset, length, pos) { return length; }
+        });
+        FS.mkdev('/dev/null', FS.makedev(1, 3));
+        // setup /dev/tty and /dev/tty1
+        // stderr needs to print output using Module['printErr']
+        // so we register a second tty just for it.
+        TTY.register(FS.makedev(5, 0), TTY.default_tty_ops);
+        TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops);
+        FS.mkdev('/dev/tty', FS.makedev(5, 0));
+        FS.mkdev('/dev/tty1', FS.makedev(6, 0));
+        // setup /dev/[u]random
+        var random_device;
+        if (typeof crypto !== 'undefined') {
+          // for modern web browsers
+          var randomBuffer = new Uint8Array(1);
+          random_device = function() { crypto.getRandomValues(randomBuffer); return randomBuffer[0]; };
+        } else if (ENVIRONMENT_IS_NODE) {
+          // for nodejs
+          random_device = function() { return require('crypto').randomBytes(1)[0]; };
+        } else {
+          // default for ES5 platforms
+          random_device = function() { return (Math.random()*256)|0; };
+        }
+        FS.createDevice('/dev', 'random', random_device);
+        FS.createDevice('/dev', 'urandom', random_device);
+        // we're not going to emulate the actual shm device,
+        // just create the tmp dirs that reside in it commonly
+        FS.mkdir('/dev/shm');
+        FS.mkdir('/dev/shm/tmp');
+      },createSpecialDirectories:function () {
+        // create /proc/self/fd which allows /proc/self/fd/6 => readlink gives the name of the stream for fd 6 (see test_unistd_ttyname)
+        FS.mkdir('/proc');
+        FS.mkdir('/proc/self');
+        FS.mkdir('/proc/self/fd');
+        FS.mount({
+          mount: function() {
+            var node = FS.createNode('/proc/self', 'fd', 16384 | 0777, 73);
+            node.node_ops = {
+              lookup: function(parent, name) {
+                var fd = +name;
+                var stream = FS.getStream(fd);
+                if (!stream) throw new FS.ErrnoError(ERRNO_CODES.EBADF);
+                var ret = {
+                  parent: null,
+                  mount: { mountpoint: 'fake' },
+                  node_ops: { readlink: function() { return stream.path } }
+                };
+                ret.parent = ret; // make it look like a simple root node
+                return ret;
+              }
+            };
+            return node;
+          }
+        }, {}, '/proc/self/fd');
+      },createStandardStreams:function () {
+        // TODO deprecate the old functionality of a single
+        // input / output callback and that utilizes FS.createDevice
+        // and instead require a unique set of stream ops
+  
+        // by default, we symlink the standard streams to the
+        // default tty devices. however, if the standard streams
+        // have been overwritten we create a unique device for
+        // them instead.
+        if (Module['stdin']) {
+          FS.createDevice('/dev', 'stdin', Module['stdin']);
+        } else {
+          FS.symlink('/dev/tty', '/dev/stdin');
+        }
+        if (Module['stdout']) {
+          FS.createDevice('/dev', 'stdout', null, Module['stdout']);
+        } else {
+          FS.symlink('/dev/tty', '/dev/stdout');
+        }
+        if (Module['stderr']) {
+          FS.createDevice('/dev', 'stderr', null, Module['stderr']);
+        } else {
+          FS.symlink('/dev/tty1', '/dev/stderr');
+        }
+  
+        // open default streams for the stdin, stdout and stderr devices
+        var stdin = FS.open('/dev/stdin', 'r');
+        assert(stdin.fd === 0, 'invalid handle for stdin (' + stdin.fd + ')');
+  
+        var stdout = FS.open('/dev/stdout', 'w');
+        assert(stdout.fd === 1, 'invalid handle for stdout (' + stdout.fd + ')');
+  
+        var stderr = FS.open('/dev/stderr', 'w');
+        assert(stderr.fd === 2, 'invalid handle for stderr (' + stderr.fd + ')');
+      },ensureErrnoError:function () {
+        if (FS.ErrnoError) return;
+        FS.ErrnoError = function ErrnoError(errno, node) {
+          //Module.printErr(stackTrace()); // useful for debugging
+          this.node = node;
+          this.setErrno = function(errno) {
+            this.errno = errno;
+            for (var key in ERRNO_CODES) {
+              if (ERRNO_CODES[key] === errno) {
+                this.code = key;
+                break;
+              }
+            }
+          };
+          this.setErrno(errno);
+          this.message = ERRNO_MESSAGES[errno];
+          if (this.stack) this.stack = demangleAll(this.stack);
+        };
+        FS.ErrnoError.prototype = new Error();
+        FS.ErrnoError.prototype.constructor = FS.ErrnoError;
+        // Some errors may happen quite a bit, to avoid overhead we reuse them (and suffer a lack of stack info)
+        [ERRNO_CODES.ENOENT].forEach(function(code) {
+          FS.genericErrors[code] = new FS.ErrnoError(code);
+          FS.genericErrors[code].stack = '<generic error, no stack>';
+        });
+      },staticInit:function () {
+        FS.ensureErrnoError();
+  
+        FS.nameTable = new Array(4096);
+  
+        FS.mount(MEMFS, {}, '/');
+  
+        FS.createDefaultDirectories();
+        FS.createDefaultDevices();
+        FS.createSpecialDirectories();
+  
+        FS.filesystems = {
+          'MEMFS': MEMFS,
+          'IDBFS': IDBFS,
+          'NODEFS': NODEFS,
+          'WORKERFS': WORKERFS,
+        };
+      },init:function (input, output, error) {
+        assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)');
+        FS.init.initialized = true;
+  
+        FS.ensureErrnoError();
+  
+        // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here
+        Module['stdin'] = input || Module['stdin'];
+        Module['stdout'] = output || Module['stdout'];
+        Module['stderr'] = error || Module['stderr'];
+  
+        FS.createStandardStreams();
+      },quit:function () {
+        FS.init.initialized = false;
+        // force-flush all streams, so we get musl std streams printed out
+        var fflush = Module['_fflush'];
+        if (fflush) fflush(0);
+        // close all of our streams
+        for (var i = 0; i < FS.streams.length; i++) {
+          var stream = FS.streams[i];
+          if (!stream) {
+            continue;
+          }
+          FS.close(stream);
+        }
+      },getMode:function (canRead, canWrite) {
+        var mode = 0;
+        if (canRead) mode |= 292 | 73;
+        if (canWrite) mode |= 146;
+        return mode;
+      },joinPath:function (parts, forceRelative) {
+        var path = PATH.join.apply(null, parts);
+        if (forceRelative && path[0] == '/') path = path.substr(1);
+        return path;
+      },absolutePath:function (relative, base) {
+        return PATH.resolve(base, relative);
+      },standardizePath:function (path) {
+        return PATH.normalize(path);
+      },findObject:function (path, dontResolveLastLink) {
+        var ret = FS.analyzePath(path, dontResolveLastLink);
+        if (ret.exists) {
+          return ret.object;
+        } else {
+          ___setErrNo(ret.error);
+          return null;
+        }
+      },analyzePath:function (path, dontResolveLastLink) {
+        // operate from within the context of the symlink's target
+        try {
+          var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink });
+          path = lookup.path;
+        } catch (e) {
+        }
+        var ret = {
+          isRoot: false, exists: false, error: 0, name: null, path: null, object: null,
+          parentExists: false, parentPath: null, parentObject: null
+        };
+        try {
+          var lookup = FS.lookupPath(path, { parent: true });
+          ret.parentExists = true;
+          ret.parentPath = lookup.path;
+          ret.parentObject = lookup.node;
+          ret.name = PATH.basename(path);
+          lookup = FS.lookupPath(path, { follow: !dontResolveLastLink });
+          ret.exists = true;
+          ret.path = lookup.path;
+          ret.object = lookup.node;
+          ret.name = lookup.node.name;
+          ret.isRoot = lookup.path === '/';
+        } catch (e) {
+          ret.error = e.errno;
+        };
+        return ret;
+      },createFolder:function (parent, name, canRead, canWrite) {
+        var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name);
+        var mode = FS.getMode(canRead, canWrite);
+        return FS.mkdir(path, mode);
+      },createPath:function (parent, path, canRead, canWrite) {
+        parent = typeof parent === 'string' ? parent : FS.getPath(parent);
+        var parts = path.split('/').reverse();
+        while (parts.length) {
+          var part = parts.pop();
+          if (!part) continue;
+          var current = PATH.join2(parent, part);
+          try {
+            FS.mkdir(current);
+          } catch (e) {
+            // ignore EEXIST
+          }
+          parent = current;
+        }
+        return current;
+      },createFile:function (parent, name, properties, canRead, canWrite) {
+        var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name);
+        var mode = FS.getMode(canRead, canWrite);
+        return FS.create(path, mode);
+      },createDataFile:function (parent, name, data, canRead, canWrite, canOwn) {
+        var path = name ? PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name) : parent;
+        var mode = FS.getMode(canRead, canWrite);
+        var node = FS.create(path, mode);
+        if (data) {
+          if (typeof data === 'string') {
+            var arr = new Array(data.length);
+            for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i);
+            data = arr;
+          }
+          // make sure we can write to the file
+          FS.chmod(node, mode | 146);
+          var stream = FS.open(node, 'w');
+          FS.write(stream, data, 0, data.length, 0, canOwn);
+          FS.close(stream);
+          FS.chmod(node, mode);
+        }
+        return node;
+      },createDevice:function (parent, name, input, output) {
+        var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name);
+        var mode = FS.getMode(!!input, !!output);
+        if (!FS.createDevice.major) FS.createDevice.major = 64;
+        var dev = FS.makedev(FS.createDevice.major++, 0);
+        // Create a fake device that a set of stream ops to emulate
+        // the old behavior.
+        FS.registerDevice(dev, {
+          open: function(stream) {
+            stream.seekable = false;
+          },
+          close: function(stream) {
+            // flush any pending line data
+            if (output && output.buffer && output.buffer.length) {
+              output(10);
+            }
+          },
+          read: function(stream, buffer, offset, length, pos /* ignored */) {
+            var bytesRead = 0;
+            for (var i = 0; i < length; i++) {
+              var result;
+              try {
+                result = input();
+              } catch (e) {
+                throw new FS.ErrnoError(ERRNO_CODES.EIO);
+              }
+              if (result === undefined && bytesRead === 0) {
+                throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);
+              }
+              if (result === null || result === undefined) break;
+              bytesRead++;
+              buffer[offset+i] = result;
+            }
+            if (bytesRead) {
+              stream.node.timestamp = Date.now();
+            }
+            return bytesRead;
+          },
+          write: function(stream, buffer, offset, length, pos) {
+            for (var i = 0; i < length; i++) {
+              try {
+                output(buffer[offset+i]);
+              } catch (e) {
+                throw new FS.ErrnoError(ERRNO_CODES.EIO);
+              }
+            }
+            if (length) {
+              stream.node.timestamp = Date.now();
+            }
+            return i;
+          }
+        });
+        return FS.mkdev(path, mode, dev);
+      },createLink:function (parent, name, target, canRead, canWrite) {
+        var path = PATH.join2(typeof parent === 'string' ? parent : FS.getPath(parent), name);
+        return FS.symlink(target, path);
+      },forceLoadFile:function (obj) {
+        if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true;
+        var success = true;
+        if (typeof XMLHttpRequest !== 'undefined') {
+          throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");
+        } else if (Module['read']) {
+          // Command-line.
+          try {
+            // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as
+            //          read() will try to parse UTF8.
+            obj.contents = intArrayFromString(Module['read'](obj.url), true);
+            obj.usedBytes = obj.contents.length;
+          } catch (e) {
+            success = false;
+          }
+        } else {
+          throw new Error('Cannot load without read() or XMLHttpRequest.');
+        }
+        if (!success) ___setErrNo(ERRNO_CODES.EIO);
+        return success;
+      },createLazyFile:function (parent, name, url, canRead, canWrite) {
+        // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse.
+        function LazyUint8Array() {
+          this.lengthKnown = false;
+          this.chunks = []; // Loaded chunks. Index is the chunk number
+        }
+        LazyUint8Array.prototype.get = function LazyUint8Array_get(idx) {
+          if (idx > this.length-1 || idx < 0) {
+            return undefined;
+          }
+          var chunkOffset = idx % this.chunkSize;
+          var chunkNum = (idx / this.chunkSize)|0;
+          return this.getter(chunkNum)[chunkOffset];
+        }
+        LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) {
+          this.getter = getter;
+        }
+        LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() {
+          // Find length
+          var xhr = new XMLHttpRequest();
+          xhr.open('HEAD', url, false);
+          xhr.send(null);
+          if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status);
+          var datalength = Number(xhr.getResponseHeader("Content-length"));
+          var header;
+          var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes";
+          var usesGzip = (header = xhr.getResponseHeader("Content-Encoding")) && header === "gzip";
+  
+          var chunkSize = 1024*1024; // Chunk size in bytes
+  
+          if (!hasByteServing) chunkSize = datalength;
+  
+          // Function to get a range from the remote URL.
+          var doXHR = (function(from, to) {
+            if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!");
+            if (to > datalength-1) throw new Error("only " + datalength + " bytes available! programmer error!");
+  
+            // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available.
+            var xhr = new XMLHttpRequest();
+            xhr.open('GET', url, false);
+            if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to);
+  
+            // Some hints to the browser that we want binary data.
+            if (typeof Uint8Array != 'undefined') xhr.responseType = 'arraybuffer';
+            if (xhr.overrideMimeType) {
+              xhr.overrideMimeType('text/plain; charset=x-user-defined');
+            }
+  
+            xhr.send(null);
+            if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status);
+            if (xhr.response !== undefined) {
+              return new Uint8Array(xhr.response || []);
+            } else {
+              return intArrayFromString(xhr.responseText || '', true);
+            }
+          });
+          var lazyArray = this;
+          lazyArray.setDataGetter(function(chunkNum) {
+            var start = chunkNum * chunkSize;
+            var end = (chunkNum+1) * chunkSize - 1; // including this byte
+            end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block
+            if (typeof(lazyArray.chunks[chunkNum]) === "undefined") {
+              lazyArray.chunks[chunkNum] = doXHR(start, end);
+            }
+            if (typeof(lazyArray.chunks[chunkNum]) === "undefined") throw new Error("doXHR failed!");
+            return lazyArray.chunks[chunkNum];
+          });
+  
+          if (usesGzip || !datalength) {
+            // if the server uses gzip or doesn't supply the length, we have to download the whole file to get the (uncompressed) length
+            chunkSize = datalength = 1; // this will force getter(0)/doXHR do download the whole file
+            datalength = this.getter(0).length;
+            chunkSize = datalength;
+            console.log("LazyFiles on gzip forces download of the whole file when length is accessed");
+          }
+  
+          this._length = datalength;
+          this._chunkSize = chunkSize;
+          this.lengthKnown = true;
+        }
+        if (typeof XMLHttpRequest !== 'undefined') {
+          if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc';
+          var lazyArray = new LazyUint8Array();
+          Object.defineProperties(lazyArray, {
+            length: {
+              get: function() {
+                if(!this.lengthKnown) {
+                  this.cacheLength();
+                }
+                return this._length;
+              }
+            },
+            chunkSize: {
+              get: function() {
+                if(!this.lengthKnown) {
+                  this.cacheLength();
+                }
+                return this._chunkSize;
+              }
+            }
+          });
+  
+          var properties = { isDevice: false, contents: lazyArray };
+        } else {
+          var properties = { isDevice: false, url: url };
+        }
+  
+        var node = FS.createFile(parent, name, properties, canRead, canWrite);
+        // This is a total hack, but I want to get this lazy file code out of the
+        // core of MEMFS. If we want to keep this lazy file concept I feel it should
+        // be its own thin LAZYFS proxying calls to MEMFS.
+        if (properties.contents) {
+          node.contents = properties.contents;
+        } else if (properties.url) {
+          node.contents = null;
+          node.url = properties.url;
+        }
+        // Add a function that defers querying the file size until it is asked the first time.
+        Object.defineProperties(node, {
+          usedBytes: {
+            get: function() { return this.contents.length; }
+          }
+        });
+        // override each stream op with one that tries to force load the lazy file first
+        var stream_ops = {};
+        var keys = Object.keys(node.stream_ops);
+        keys.forEach(function(key) {
+          var fn = node.stream_ops[key];
+          stream_ops[key] = function forceLoadLazyFile() {
+            if (!FS.forceLoadFile(node)) {
+              throw new FS.ErrnoError(ERRNO_CODES.EIO);
+            }
+            return fn.apply(null, arguments);
+          };
+        });
+        // use a custom read function
+        stream_ops.read = function stream_ops_read(stream, buffer, offset, length, position) {
+          if (!FS.forceLoadFile(node)) {
+            throw new FS.ErrnoError(ERRNO_CODES.EIO);
+          }
+          var contents = stream.node.contents;
+          if (position >= contents.length)
+            return 0;
+          var size = Math.min(contents.length - position, length);
+          assert(size >= 0);
+          if (contents.slice) { // normal array
+            for (var i = 0; i < size; i++) {
+              buffer[offset + i] = contents[position + i];
+            }
+          } else {
+            for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR
+              buffer[offset + i] = contents.get(position + i);
+            }
+          }
+          return size;
+        };
+        node.stream_ops = stream_ops;
+        return node;
+      },createPreloadedFile:function (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) {
+        Browser.init(); // XXX perhaps this method should move onto Browser?
+        // TODO we should allow people to just pass in a complete filename instead
+        // of parent and name being that we just join them anyways
+        var fullname = name ? PATH.resolve(PATH.join2(parent, name)) : parent;
+        var dep = getUniqueRunDependency('cp ' + fullname); // might have several active requests for the same fullname
+        function processData(byteArray) {
+          function finish(byteArray) {
+            if (preFinish) preFinish();
+            if (!dontCreateFile) {
+              FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn);
+            }
+            if (onload) onload();
+            removeRunDependency(dep);
+          }
+          var handled = false;
+          Module['preloadPlugins'].forEach(function(plugin) {
+            if (handled) return;
+            if (plugin['canHandle'](fullname)) {
+              plugin['handle'](byteArray, fullname, finish, function() {
+                if (onerror) onerror();
+                removeRunDependency(dep);
+              });
+              handled = true;
+            }
+          });
+          if (!handled) finish(byteArray);
+        }
+        addRunDependency(dep);
+        if (typeof url == 'string') {
+          Browser.asyncLoad(url, function(byteArray) {
+            processData(byteArray);
+          }, onerror);
+        } else {
+          processData(url);
+        }
+      },indexedDB:function () {
+        return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
+      },DB_NAME:function () {
+        return 'EM_FS_' + window.location.pathname;
+      },DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function (paths, onload, onerror) {
+        onload = onload || function(){};
+        onerror = onerror || function(){};
+        var indexedDB = FS.indexedDB();
+        try {
+          var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION);
+        } catch (e) {
+          return onerror(e);
+        }
+        openRequest.onupgradeneeded = function openRequest_onupgradeneeded() {
+          console.log('creating db');
+          var db = openRequest.result;
+          db.createObjectStore(FS.DB_STORE_NAME);
+        };
+        openRequest.onsuccess = function openRequest_onsuccess() {
+          var db = openRequest.result;
+          var transaction = db.transaction([FS.DB_STORE_NAME], 'readwrite');
+          var files = transaction.objectStore(FS.DB_STORE_NAME);
+          var ok = 0, fail = 0, total = paths.length;
+          function finish() {
+            if (fail == 0) onload(); else onerror();
+          }
+          paths.forEach(function(path) {
+            var putRequest = files.put(FS.analyzePath(path).object.contents, path);
+            putRequest.onsuccess = function putRequest_onsuccess() { ok++; if (ok + fail == total) finish() };
+            putRequest.onerror = function putRequest_onerror() { fail++; if (ok + fail == total) finish() };
+          });
+          transaction.onerror = onerror;
+        };
+        openRequest.onerror = onerror;
+      },loadFilesFromDB:function (paths, onload, onerror) {
+        onload = onload || function(){};
+        onerror = onerror || function(){};
+        var indexedDB = FS.indexedDB();
+        try {
+          var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION);
+        } catch (e) {
+          return onerror(e);
+        }
+        openRequest.onupgradeneeded = onerror; // no database to load from
+        openRequest.onsuccess = function openRequest_onsuccess() {
+          var db = openRequest.result;
+          try {
+            var transaction = db.transaction([FS.DB_STORE_NAME], 'readonly');
+          } catch(e) {
+            onerror(e);
+            return;
+          }
+          var files = transaction.objectStore(FS.DB_STORE_NAME);
+          var ok = 0, fail = 0, total = paths.length;
+          function finish() {
+            if (fail == 0) onload(); else onerror();
+          }
+          paths.forEach(function(path) {
+            var getRequest = files.get(path);
+            getRequest.onsuccess = function getRequest_onsuccess() {
+              if (FS.analyzePath(path).exists) {
+                FS.unlink(path);
+              }
+              FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true);
+              ok++;
+              if (ok + fail == total) finish();
+            };
+            getRequest.onerror = function getRequest_onerror() { fail++; if (ok + fail == total) finish() };
+          });
+          transaction.onerror = onerror;
+        };
+        openRequest.onerror = onerror;
+      }};var SYSCALLS={DEFAULT_POLLMASK:5,mappings:{},umask:511,calculateAt:function (dirfd, path) {
+        if (path[0] !== '/') {
+          // relative path
+          var dir;
+          if (dirfd === -100) {
+            dir = FS.cwd();
+          } else {
+            var dirstream = FS.getStream(dirfd);
+            if (!dirstream) throw new FS.ErrnoError(ERRNO_CODES.EBADF);
+            dir = dirstream.path;
+          }
+          path = PATH.join2(dir, path);
+        }
+        return path;
+      },doStat:function (func, path, buf) {
+        try {
+          var stat = func(path);
+        } catch (e) {
+          if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) {
+            // an error occurred while trying to look up the path; we should just report ENOTDIR
+            return -ERRNO_CODES.ENOTDIR;
+          }
+          throw e;
+        }
+        HEAP32[((buf)>>2)]=stat.dev;
+        HEAP32[(((buf)+(4))>>2)]=0;
+        HEAP32[(((buf)+(8))>>2)]=stat.ino;
+        HEAP32[(((buf)+(12))>>2)]=stat.mode;
+        HEAP32[(((buf)+(16))>>2)]=stat.nlink;
+        HEAP32[(((buf)+(20))>>2)]=stat.uid;
+        HEAP32[(((buf)+(24))>>2)]=stat.gid;
+        HEAP32[(((buf)+(28))>>2)]=stat.rdev;
+        HEAP32[(((buf)+(32))>>2)]=0;
+        HEAP32[(((buf)+(36))>>2)]=stat.size;
+        HEAP32[(((buf)+(40))>>2)]=4096;
+        HEAP32[(((buf)+(44))>>2)]=stat.blocks;
+        HEAP32[(((buf)+(48))>>2)]=(stat.atime.getTime() / 1000)|0;
+        HEAP32[(((buf)+(52))>>2)]=0;
+        HEAP32[(((buf)+(56))>>2)]=(stat.mtime.getTime() / 1000)|0;
+        HEAP32[(((buf)+(60))>>2)]=0;
+        HEAP32[(((buf)+(64))>>2)]=(stat.ctime.getTime() / 1000)|0;
+        HEAP32[(((buf)+(68))>>2)]=0;
+        HEAP32[(((buf)+(72))>>2)]=stat.ino;
+        return 0;
+      },doMsync:function (addr, stream, len, flags) {
+        var buffer = new Uint8Array(HEAPU8.subarray(addr, addr + len));
+        FS.msync(stream, buffer, 0, len, flags);
+      },doMkdir:function (path, mode) {
+        // remove a trailing slash, if one - /a/b/ has basename of '', but
+        // we want to create b in the context of this function
+        path = PATH.normalize(path);
+        if (path[path.length-1] === '/') path = path.substr(0, path.length-1);
+        FS.mkdir(path, mode, 0);
+        return 0;
+      },doMknod:function (path, mode, dev) {
+        // we don't want this in the JS API as it uses mknod to create all nodes.
+        switch (mode & 61440) {
+          case 32768:
+          case 8192:
+          case 24576:
+          case 4096:
+          case 49152:
+            break;
+          default: return -ERRNO_CODES.EINVAL;
+        }
+        FS.mknod(path, mode, dev);
+        return 0;
+      },doReadlink:function (path, buf, bufsize) {
+        if (bufsize <= 0) return -ERRNO_CODES.EINVAL;
+        var ret = FS.readlink(path);
+        ret = ret.slice(0, Math.max(0, bufsize));
+        writeStringToMemory(ret, buf, true);
+        return ret.length;
+      },doAccess:function (path, amode) {
+        if (amode & ~7) {
+          // need a valid mode
+          return -ERRNO_CODES.EINVAL;
+        }
+        var node;
+        var lookup = FS.lookupPath(path, { follow: true });
+        node = lookup.node;
+        var perms = '';
+        if (amode & 4) perms += 'r';
+        if (amode & 2) perms += 'w';
+        if (amode & 1) perms += 'x';
+        if (perms /* otherwise, they've just passed F_OK */ && FS.nodePermissions(node, perms)) {
+          return -ERRNO_CODES.EACCES;
+        }
+        return 0;
+      },doDup:function (path, flags, suggestFD) {
+        var suggest = FS.getStream(suggestFD);
+        if (suggest) FS.close(suggest);
+        return FS.open(path, flags, 0, suggestFD, suggestFD).fd;
+      },doReadv:function (stream, iov, iovcnt, offset) {
+        var ret = 0;
+        for (var i = 0; i < iovcnt; i++) {
+          var ptr = HEAP32[(((iov)+(i*8))>>2)];
+          var len = HEAP32[(((iov)+(i*8 + 4))>>2)];
+          var curr = FS.read(stream, HEAP8,ptr, len, offset);
+          if (curr < 0) return -1;
+          ret += curr;
+          if (curr < len) break; // nothing more to read
+        }
+        return ret;
+      },doWritev:function (stream, iov, iovcnt, offset) {
+        var ret = 0;
+        for (var i = 0; i < iovcnt; i++) {
+          var ptr = HEAP32[(((iov)+(i*8))>>2)];
+          var len = HEAP32[(((iov)+(i*8 + 4))>>2)];
+          var curr = FS.write(stream, HEAP8,ptr, len, offset);
+          if (curr < 0) return -1;
+          ret += curr;
+        }
+        return ret;
+      },varargs:0,get:function (varargs) {
+        SYSCALLS.varargs += 4;
+        var ret = HEAP32[(((SYSCALLS.varargs)-(4))>>2)];
+        return ret;
+      },getStr:function () {
+        var ret = Pointer_stringify(SYSCALLS.get());
+        return ret;
+      },getStreamFromFD:function () {
+        var stream = FS.getStream(SYSCALLS.get());
+        if (!stream) throw new FS.ErrnoError(ERRNO_CODES.EBADF);
+        return stream;
+      },getSocketFromFD:function () {
+        var socket = SOCKFS.getSocket(SYSCALLS.get());
+        if (!socket) throw new FS.ErrnoError(ERRNO_CODES.EBADF);
+        return socket;
+      },getSocketAddress:function (allowNull) {
+        var addrp = SYSCALLS.get(), addrlen = SYSCALLS.get();
+        if (allowNull && addrp === 0) return null;
+        var info = __read_sockaddr(addrp, addrlen);
+        if (info.errno) throw new FS.ErrnoError(info.errno);
+        info.addr = DNS.lookup_addr(info.addr) || info.addr;
+        return info;
+      },get64:function () {
+        var low = SYSCALLS.get(), high = SYSCALLS.get();
+        if (low >= 0) assert(high === 0);
+        else assert(high === -1);
+        return low;
+      },getZero:function () {
+        assert(SYSCALLS.get() === 0);
+      }};function ___syscall54(which, varargs) {SYSCALLS.varargs = varargs;
+  try {
+   // ioctl
+      var stream = SYSCALLS.getStreamFromFD(), op = SYSCALLS.get();
+      switch (op) {
+        case 21505: {
+          if (!stream.tty) return -ERRNO_CODES.ENOTTY;
+          return 0;
+        }
+        case 21506: {
+          if (!stream.tty) return -ERRNO_CODES.ENOTTY;
+          return 0; // no-op, not actually adjusting terminal settings
+        }
+        case 21519: {
+          if (!stream.tty) return -ERRNO_CODES.ENOTTY;
+          var argp = SYSCALLS.get();
+          HEAP32[((argp)>>2)]=0;
+          return 0;
+        }
+        case 21520: {
+          if (!stream.tty) return -ERRNO_CODES.ENOTTY;
+          return -ERRNO_CODES.EINVAL; // not supported
+        }
+        case 21531: {
+          var argp = SYSCALLS.get();
+          return FS.ioctl(stream, op, argp);
+        }
+        default: abort('bad ioctl syscall ' + op);
+      }
+    } catch (e) {
+    if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);
+    return -e.errno;
+  }
+  }
+
+   
+  Module["_bitshift64Lshr"] = _bitshift64Lshr;
+
+  
+   
+  Module["_testSetjmp"] = _testSetjmp;function _longjmp(env, value) {
+      asm['setThrew'](env, value || 1);
+      throw 'longjmp';
+    }
+
+  function _pthread_cleanup_push(routine, arg) {
+      __ATEXIT__.push(function() { Runtime.dynCall('vi', routine, [arg]) })
+      _pthread_cleanup_push.level = __ATEXIT__.length;
+    }
+
+  function _pthread_cleanup_pop() {
+      assert(_pthread_cleanup_push.level == __ATEXIT__.length, 'cannot pop if something else added meanwhile!');
+      __ATEXIT__.pop();
+      _pthread_cleanup_push.level = __ATEXIT__.length;
+    }
+
+  function _emscripten_longjmp(env, value) {
+      _longjmp(env, value);
+    }
+
+  function ___syscall5(which, varargs) {SYSCALLS.varargs = varargs;
+  try {
+   // open
+      var pathname = SYSCALLS.getStr(), flags = SYSCALLS.get(), mode = SYSCALLS.get() // optional TODO
+      var stream = FS.open(pathname, flags, mode);
+      return stream.fd;
+    } catch (e) {
+    if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);
+    return -e.errno;
+  }
+  }
+
+  
+  function _emscripten_memcpy_big(dest, src, num) {
+      HEAPU8.set(HEAPU8.subarray(src, src+num), dest);
+      return dest;
+    } 
+  Module["_memcpy"] = _memcpy;
+
+  function ___syscall6(which, varargs) {SYSCALLS.varargs = varargs;
+  try {
+   // close
+      var stream = SYSCALLS.getStreamFromFD();
+      FS.close(stream);
+      return 0;
+    } catch (e) {
+    if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);
+    return -e.errno;
+  }
+  }
+
+  
+  
+  var cttz_i8 = allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0], "i8", ALLOC_STATIC); 
+  Module["_llvm_cttz_i32"] = _llvm_cttz_i32; 
+  Module["___udivmoddi4"] = ___udivmoddi4; 
+  Module["___udivdi3"] = ___udivdi3;
+
+  
+   
+  Module["___muldsi3"] = ___muldsi3; 
+  Module["___muldi3"] = ___muldi3;
+
+  var _llvm_pow_f64=Math_pow;
+
+  function _sbrk(bytes) {
+      // Implement a Linux-like 'memory area' for our 'process'.
+      // Changes the size of the memory area by |bytes|; returns the
+      // address of the previous top ('break') of the memory area
+      // We control the "dynamic" memory - DYNAMIC_BASE to DYNAMICTOP
+      var self = _sbrk;
+      if (!self.called) {
+        DYNAMICTOP = alignMemoryPage(DYNAMICTOP); // make sure we start out aligned
+        self.called = true;
+        assert(Runtime.dynamicAlloc);
+        self.alloc = Runtime.dynamicAlloc;
+        Runtime.dynamicAlloc = function() { abort('cannot dynamically allocate, sbrk now has control') };
+      }
+      var ret = DYNAMICTOP;
+      if (bytes != 0) {
+        var success = self.alloc(bytes);
+        if (!success) return -1 >>> 0; // sbrk failure code
+      }
+      return ret;  // Previous break location.
+    }
+
+   
+  Module["_memmove"] = _memmove;
+
+   
+  Module["___uremdi3"] = ___uremdi3;
+
+  var _llvm_fabs_f32=Math_abs;
+
+   
+  Module["_pthread_self"] = _pthread_self;
+
+  function ___syscall140(which, varargs) {SYSCALLS.varargs = varargs;
+  try {
+   // llseek
+      var stream = SYSCALLS.getStreamFromFD(), offset_high = SYSCALLS.get(), offset_low = SYSCALLS.get(), result = SYSCALLS.get(), whence = SYSCALLS.get();
+      var offset = offset_low;
+      assert(offset_high === 0);
+      FS.llseek(stream, offset, whence);
+      HEAP32[((result)>>2)]=stream.position;
+      if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state
+      return 0;
+    } catch (e) {
+    if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);
+    return -e.errno;
+  }
+  }
+
+  function ___syscall146(which, varargs) {SYSCALLS.varargs = varargs;
+  try {
+   // writev
+      var stream = SYSCALLS.getStreamFromFD(), iov = SYSCALLS.get(), iovcnt = SYSCALLS.get();
+      return SYSCALLS.doWritev(stream, iov, iovcnt);
+    } catch (e) {
+    if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);
+    return -e.errno;
+  }
+  }
+
+  function ___syscall221(which, varargs) {SYSCALLS.varargs = varargs;
+  try {
+   // fcntl64
+      var stream = SYSCALLS.getStreamFromFD(), cmd = SYSCALLS.get();
+      switch (cmd) {
+        case 0: {
+          var arg = SYSCALLS.get();
+          if (arg < 0) {
+            return -ERRNO_CODES.EINVAL;
+          }
+          var newStream;
+          newStream = FS.open(stream.path, stream.flags, 0, arg);
+          return newStream.fd;
+        }
+        case 1:
+        case 2:
+          return 0;  // FD_CLOEXEC makes no sense for a single process.
+        case 3:
+          return stream.flags;
+        case 4: {
+          var arg = SYSCALLS.get();
+          stream.flags |= arg;
+          return 0;
+        }
+        case 12:
+        case 12: {
+          var arg = SYSCALLS.get();
+          var offset = 0;
+          // We're always unlocked.
+          HEAP16[(((arg)+(offset))>>1)]=2;
+          return 0;
+        }
+        case 13:
+        case 14:
+        case 13:
+        case 14:
+          return 0; // Pretend that the locking is successful.
+        case 16:
+        case 8:
+          return -ERRNO_CODES.EINVAL; // These are for sockets. We don't have them fully implemented yet.
+        case 9:
+          // musl trusts getown return values, due to a bug where they must be, as they overlap with errors. just return -1 here, so fnctl() returns that, and we set errno ourselves.
+          ___setErrNo(ERRNO_CODES.EINVAL);
+          return -1;
+        default: {
+          return -ERRNO_CODES.EINVAL;
+        }
+      }
+    } catch (e) {
+    if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);
+    return -e.errno;
+  }
+  }
+
+  function ___syscall145(which, varargs) {SYSCALLS.varargs = varargs;
+  try {
+   // readv
+      var stream = SYSCALLS.getStreamFromFD(), iov = SYSCALLS.get(), iovcnt = SYSCALLS.get();
+      return SYSCALLS.doReadv(stream, iov, iovcnt);
+    } catch (e) {
+    if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);
+    return -e.errno;
+  }
+  }
+Module["requestFullScreen"] = function Module_requestFullScreen(lockPointer, resizeCanvas, vrDevice) { Browser.requestFullScreen(lockPointer, resizeCanvas, vrDevice) };
+  Module["requestAnimationFrame"] = function Module_requestAnimationFrame(func) { Browser.requestAnimationFrame(func) };
+  Module["setCanvasSize"] = function Module_setCanvasSize(width, height, noUpdates) { Browser.setCanvasSize(width, height, noUpdates) };
+  Module["pauseMainLoop"] = function Module_pauseMainLoop() { Browser.mainLoop.pause() };
+  Module["resumeMainLoop"] = function Module_resumeMainLoop() { Browser.mainLoop.resume() };
+  Module["getUserMedia"] = function Module_getUserMedia() { Browser.getUserMedia() }
+  Module["createContext"] = function Module_createContext(canvas, useWebGL, setInModule, webGLContextAttributes) { return Browser.createContext(canvas, useWebGL, setInModule, webGLContextAttributes) };
+if (ENVIRONMENT_IS_NODE) {
+    _emscripten_get_now = function _emscripten_get_now_actual() {
+      var t = process['hrtime']();
+      return t[0] * 1e3 + t[1] / 1e6;
+    };
+  } else if (typeof dateNow !== 'undefined') {
+    _emscripten_get_now = dateNow;
+  } else if (typeof self === 'object' && self['performance'] && typeof self['performance']['now'] === 'function') {
+    _emscripten_get_now = function() { return self['performance']['now'](); };
+  } else if (typeof performance === 'object' && typeof performance['now'] === 'function') {
+    _emscripten_get_now = function() { return performance['now'](); };
+  } else {
+    _emscripten_get_now = Date.now;
+  };
+FS.staticInit();__ATINIT__.unshift(function() { if (!Module["noFSInit"] && !FS.init.initialized) FS.init() });__ATMAIN__.push(function() { FS.ignorePermissions = false });__ATEXIT__.push(function() { FS.quit() });Module["FS_createFolder"] = FS.createFolder;Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPreloadedFile"] = FS.createPreloadedFile;Module["FS_createLazyFile"] = FS.createLazyFile;Module["FS_createLink"] = FS.createLink;Module["FS_createDevice"] = FS.createDevice;Module["FS_unlink"] = FS.unlink;;
+__ATINIT__.unshift(function() { TTY.init() });__ATEXIT__.push(function() { TTY.shutdown() });;
+if (ENVIRONMENT_IS_NODE) { var fs = require("fs"); var NODEJS_PATH = require("path"); NODEFS.staticInit(); };
+STACK_BASE = STACKTOP = Runtime.alignMemory(STATICTOP);
+
+staticSealed = true; // seal the static portion of memory
+
+STACK_MAX = STACK_BASE + TOTAL_STACK;
+
+DYNAMIC_BASE = DYNAMICTOP = Runtime.alignMemory(STACK_MAX);
+
+assert(DYNAMIC_BASE < TOTAL_MEMORY, "TOTAL_MEMORY not big enough for stack");
+
+
+
+function nullFunc_iiii(x) { Module["printErr"]("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");  Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
+
+function nullFunc_viiiiiii(x) { Module["printErr"]("Invalid function pointer called with signature 'viiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");  Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
+
+function nullFunc_viiiii(x) { Module["printErr"]("Invalid function pointer called with signature 'viiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");  Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
+
+function nullFunc_vi(x) { Module["printErr"]("Invalid function pointer called with signature 'vi'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");  Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
+
+function nullFunc_vii(x) { Module["printErr"]("Invalid function pointer called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");  Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
+
+function nullFunc_ii(x) { Module["printErr"]("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");  Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
+
+function nullFunc_viii(x) { Module["printErr"]("Invalid function pointer called with signature 'viii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");  Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
+
+function nullFunc_iiiii(x) { Module["printErr"]("Invalid function pointer called with signature 'iiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");  Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
+
+function nullFunc_viiiiii(x) { Module["printErr"]("Invalid function pointer called with signature 'viiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");  Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
+
+function nullFunc_iii(x) { Module["printErr"]("Invalid function pointer called with signature 'iii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");  Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
+
+function nullFunc_viiii(x) { Module["printErr"]("Invalid function pointer called with signature 'viiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)");  Module["printErr"]("Build with ASSERTIONS=2 for more info.");abort(x) }
+
+function invoke_iiii(index,a1,a2,a3) {
+  try {
+    return Module["dynCall_iiii"](index,a1,a2,a3);
+  } catch(e) {
+    if (typeof e !== 'number' && e !== 'longjmp') throw e;
+    asm["setThrew"](1, 0);
+  }
+}
+
+function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7) {
+  try {
+    Module["dynCall_viiiiiii"](index,a1,a2,a3,a4,a5,a6,a7);
+  } catch(e) {
+    if (typeof e !== 'number' && e !== 'longjmp') throw e;
+    asm["setThrew"](1, 0);
+  }
+}
+
+function invoke_viiiii(index,a1,a2,a3,a4,a5) {
+  try {
+    Module["dynCall_viiiii"](index,a1,a2,a3,a4,a5);
+  } catch(e) {
+    if (typeof e !== 'number' && e !== 'longjmp') throw e;
+    asm["setThrew"](1, 0);
+  }
+}
+
+function invoke_vi(index,a1) {
+  try {
+    Module["dynCall_vi"](index,a1);
+  } catch(e) {
+    if (typeof e !== 'number' && e !== 'longjmp') throw e;
+    asm["setThrew"](1, 0);
+  }
+}
+
+function invoke_vii(index,a1,a2) {
+  try {
+    Module["dynCall_vii"](index,a1,a2);
+  } catch(e) {
+    if (typeof e !== 'number' && e !== 'longjmp') throw e;
+    asm["setThrew"](1, 0);
+  }
+}
+
+function invoke_ii(index,a1) {
+  try {
+    return Module["dynCall_ii"](index,a1);
+  } catch(e) {
+    if (typeof e !== 'number' && e !== 'longjmp') throw e;
+    asm["setThrew"](1, 0);
+  }
+}
+
+function invoke_viii(index,a1,a2,a3) {
+  try {
+    Module["dynCall_viii"](index,a1,a2,a3);
+  } catch(e) {
+    if (typeof e !== 'number' && e !== 'longjmp') throw e;
+    asm["setThrew"](1, 0);
+  }
+}
+
+function invoke_iiiii(index,a1,a2,a3,a4) {
+  try {
+    return Module["dynCall_iiiii"](index,a1,a2,a3,a4);
+  } catch(e) {
+    if (typeof e !== 'number' && e !== 'longjmp') throw e;
+    asm["setThrew"](1, 0);
+  }
+}
+
+function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6) {
+  try {
+    Module["dynCall_viiiiii"](index,a1,a2,a3,a4,a5,a6);
+  } catch(e) {
+    if (typeof e !== 'number' && e !== 'longjmp') throw e;
+    asm["setThrew"](1, 0);
+  }
+}
+
+function invoke_iii(index,a1,a2) {
+  try {
+    return Module["dynCall_iii"](index,a1,a2);
+  } catch(e) {
+    if (typeof e !== 'number' && e !== 'longjmp') throw e;
+    asm["setThrew"](1, 0);
+  }
+}
+
+function invoke_viiii(index,a1,a2,a3,a4) {
+  try {
+    Module["dynCall_viiii"](index,a1,a2,a3,a4);
+  } catch(e) {
+    if (typeof e !== 'number' && e !== 'longjmp') throw e;
+    asm["setThrew"](1, 0);
+  }
+}
+
+Module.asmGlobalArg = { "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "NaN": NaN, "Infinity": Infinity };
+
+Module.asmLibraryArg = { "abort": abort, "assert": assert, "abortStackOverflow": abortStackOverflow, "nullFunc_iiii": nullFunc_iiii, "nullFunc_viiiiiii": nullFunc_viiiiiii, "nullFunc_viiiii": nullFunc_viiiii, "nullFunc_vi": nullFunc_vi, "nullFunc_vii": nullFunc_vii, "nullFunc_ii": nullFunc_ii, "nullFunc_viii": nullFunc_viii, "nullFunc_iiiii": nullFunc_iiiii, "nullFunc_viiiiii": nullFunc_viiiiii, "nullFunc_iii": nullFunc_iii, "nullFunc_viiii": nullFunc_viiii, "invoke_iiii": invoke_iiii, "invoke_viiiiiii": invoke_viiiiiii, "invoke_viiiii": invoke_viiiii, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_ii": invoke_ii, "invoke_viii": invoke_viii, "invoke_iiiii": invoke_iiiii, "invoke_viiiiii": invoke_viiiiii, "invoke_iii": invoke_iii, "invoke_viiii": invoke_viiii, "_pthread_cleanup_pop": _pthread_cleanup_pop, "___syscall221": ___syscall221, "_llvm_pow_f64": _llvm_pow_f64, "_abort": _abort, "_llvm_fabs_f64": _llvm_fabs_f64, "_pthread_cleanup_push": _pthread_cleanup_push, "_longjmp": _longjmp, "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, "_sbrk": _sbrk, "_emscripten_memcpy_big": _emscripten_memcpy_big, "__exit": __exit, "___setErrNo": ___setErrNo, "_llvm_fabs_f32": _llvm_fabs_f32, "___syscall54": ___syscall54, "___unlock": ___unlock, "_emscripten_set_main_loop": _emscripten_set_main_loop, "_emscripten_get_now": _emscripten_get_now, "___lock": ___lock, "___syscall6": ___syscall6, "___syscall5": ___syscall5, "_emscripten_longjmp": _emscripten_longjmp, "___syscall140": ___syscall140, "_exit": _exit, "___syscall145": ___syscall145, "___syscall146": ___syscall146, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "cttz_i8": cttz_i8 };
+// EMSCRIPTEN_START_ASM
+var asm = (function(global, env, buffer) {
+  'almost asm';
+  
+  
+  var HEAP8 = new global.Int8Array(buffer);
+  var HEAP16 = new global.Int16Array(buffer);
+  var HEAP32 = new global.Int32Array(buffer);
+  var HEAPU8 = new global.Uint8Array(buffer);
+  var HEAPU16 = new global.Uint16Array(buffer);
+  var HEAPU32 = new global.Uint32Array(buffer);
+  var HEAPF32 = new global.Float32Array(buffer);
+  var HEAPF64 = new global.Float64Array(buffer);
+
+
+  var STACKTOP=env.STACKTOP|0;
+  var STACK_MAX=env.STACK_MAX|0;
+  var tempDoublePtr=env.tempDoublePtr|0;
+  var ABORT=env.ABORT|0;
+  var cttz_i8=env.cttz_i8|0;
+
+  var __THREW__ = 0;
+  var threwValue = 0;
+  var setjmpId = 0;
+  var undef = 0;
+  var nan = global.NaN, inf = global.Infinity;
+  var tempInt = 0, tempBigInt = 0, tempBigIntP = 0, tempBigIntS = 0, tempBigIntR = 0.0, tempBigIntI = 0, tempBigIntD = 0, tempValue = 0, tempDouble = 0.0;
+  var tempRet0 = 0;
+
+  var Math_floor=global.Math.floor;
+  var Math_abs=global.Math.abs;
+  var Math_sqrt=global.Math.sqrt;
+  var Math_pow=global.Math.pow;
+  var Math_cos=global.Math.cos;
+  var Math_sin=global.Math.sin;
+  var Math_tan=global.Math.tan;
+  var Math_acos=global.Math.acos;
+  var Math_asin=global.Math.asin;
+  var Math_atan=global.Math.atan;
+  var Math_atan2=global.Math.atan2;
+  var Math_exp=global.Math.exp;
+  var Math_log=global.Math.log;
+  var Math_ceil=global.Math.ceil;
+  var Math_imul=global.Math.imul;
+  var Math_min=global.Math.min;
+  var Math_clz32=global.Math.clz32;
+  var abort=env.abort;
+  var assert=env.assert;
+  var abortStackOverflow=env.abortStackOverflow;
+  var nullFunc_iiii=env.nullFunc_iiii;
+  var nullFunc_viiiiiii=env.nullFunc_viiiiiii;
+  var nullFunc_viiiii=env.nullFunc_viiiii;
+  var nullFunc_vi=env.nullFunc_vi;
+  var nullFunc_vii=env.nullFunc_vii;
+  var nullFunc_ii=env.nullFunc_ii;
+  var nullFunc_viii=env.nullFunc_viii;
+  var nullFunc_iiiii=env.nullFunc_iiiii;
+  var nullFunc_viiiiii=env.nullFunc_viiiiii;
+  var nullFunc_iii=env.nullFunc_iii;
+  var nullFunc_viiii=env.nullFunc_viiii;
+  var invoke_iiii=env.invoke_iiii;
+  var invoke_viiiiiii=env.invoke_viiiiiii;
+  var invoke_viiiii=env.invoke_viiiii;
+  var invoke_vi=env.invoke_vi;
+  var invoke_vii=env.invoke_vii;
+  var invoke_ii=env.invoke_ii;
+  var invoke_viii=env.invoke_viii;
+  var invoke_iiiii=env.invoke_iiiii;
+  var invoke_viiiiii=env.invoke_viiiiii;
+  var invoke_iii=env.invoke_iii;
+  var invoke_viiii=env.invoke_viiii;
+  var _pthread_cleanup_pop=env._pthread_cleanup_pop;
+  var ___syscall221=env.___syscall221;
+  var _llvm_pow_f64=env._llvm_pow_f64;
+  var _abort=env._abort;
+  var _llvm_fabs_f64=env._llvm_fabs_f64;
+  var _pthread_cleanup_push=env._pthread_cleanup_push;
+  var _longjmp=env._longjmp;
+  var _emscripten_set_main_loop_timing=env._emscripten_set_main_loop_timing;
+  var _sbrk=env._sbrk;
+  var _emscripten_memcpy_big=env._emscripten_memcpy_big;
+  var __exit=env.__exit;
+  var ___setErrNo=env.___setErrNo;
+  var _llvm_fabs_f32=env._llvm_fabs_f32;
+  var ___syscall54=env.___syscall54;
+  var ___unlock=env.___unlock;
+  var _emscripten_set_main_loop=env._emscripten_set_main_loop;
+  var _emscripten_get_now=env._emscripten_get_now;
+  var ___lock=env.___lock;
+  var ___syscall6=env.___syscall6;
+  var ___syscall5=env.___syscall5;
+  var _emscripten_longjmp=env._emscripten_longjmp;
+  var ___syscall140=env.___syscall140;
+  var _exit=env._exit;
+  var ___syscall145=env.___syscall145;
+  var ___syscall146=env.___syscall146;
+  var tempFloat = 0.0;
+
+// EMSCRIPTEN_START_FUNCS
+
+function stackAlloc(size) {
+  size = size|0;
+  var ret = 0;
+  ret = STACKTOP;
+  STACKTOP = (STACKTOP + size)|0;
+  STACKTOP = (STACKTOP + 15)&-16;
+  if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(size|0);
+
+  return ret|0;
+}
+function stackSave() {
+  return STACKTOP|0;
+}
+function stackRestore(top) {
+  top = top|0;
+  STACKTOP = top;
+}
+function establishStackSpace(stackBase, stackMax) {
+  stackBase = stackBase|0;
+  stackMax = stackMax|0;
+  STACKTOP = stackBase;
+  STACK_MAX = stackMax;
+}
+
+function setThrew(threw, value) {
+  threw = threw|0;
+  value = value|0;
+  if ((__THREW__|0) == 0) {
+    __THREW__ = threw;
+    threwValue = value;
+  }
+}
+
+function setTempRet0(value) {
+  value = value|0;
+  tempRet0 = value;
+}
+function getTempRet0() {
+  return tempRet0|0;
+}
+
+function _main($argc,$argv) {
+ $argc = $argc|0;
+ $argv = $argv|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
+ var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0;
+ var $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0;
+ var $99 = 0, $args = 0, $load = 0, $mrb = 0, $n = 0, $result = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer12 = 0, $vararg_buffer4 = 0, $vararg_buffer8 = 0, $vararg_ptr11 = 0, $vararg_ptr7 = 0, $wfp = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer12 = sp + 32|0;
+ $vararg_buffer8 = sp + 24|0;
+ $vararg_buffer4 = sp + 16|0;
+ $vararg_buffer1 = sp + 8|0;
+ $vararg_buffer = sp;
+ $args = sp + 60|0;
+ $load = sp + 48|0;
+ $3 = sp + 40|0;
+ $0 = 0;
+ $1 = $argc;
+ $2 = $argv;
+ $4 = (_mrb_open()|0);
+ $mrb = $4;
+ $5 = $mrb;
+ $6 = ($5|0)==(0|0);
+ if ($6) {
+  $7 = HEAP32[637]|0;
+  (_fputs(53168,$7)|0);
+  $0 = 1;
+  $100 = $0;
+  STACKTOP = sp;return ($100|0);
+ }
+ $8 = $mrb;
+ $9 = $1;
+ $10 = $2;
+ $11 = (_parse_args($8,$9,$10,$args)|0);
+ $n = $11;
+ $12 = $n;
+ $13 = ($12|0)<(0);
+ if ($13) {
+  $14 = $mrb;
+  _cleanup($14,$args);
+  $15 = $2;
+  $16 = HEAP32[$15>>2]|0;
+  _usage($16);
+  $0 = 1;
+  $100 = $0;
+  STACKTOP = sp;return ($100|0);
+ }
+ $17 = $n;
+ $18 = $1;
+ $19 = ($17|0)==($18|0);
+ if ($19) {
+  $20 = HEAP32[637]|0;
+  $21 = ((($args)) + 12|0);
+  $22 = HEAP32[$21>>2]|0;
+  HEAP32[$vararg_buffer>>2] = $22;
+  (_fprintf($20,53201,$vararg_buffer)|0);
+  $0 = 1;
+  $100 = $0;
+  STACKTOP = sp;return ($100|0);
+ }
+ $23 = ((($args)) + 16|0);
+ $24 = HEAP32[$23>>2]|0;
+ $25 = ($24|0)==(0|0);
+ do {
+  if ($25) {
+   $26 = ((($args)) + 24|0);
+   $27 = HEAP8[$26>>0]|0;
+   $28 = $27 & 1;
+   $29 = ($28<<24>>24)!=(0);
+   if (!($29)) {
+    $30 = $n;
+    $31 = (($30) + 1)|0;
+    $32 = $1;
+    $33 = ($31|0)==($32|0);
+    if ($33) {
+     $34 = $mrb;
+     $35 = $n;
+     $36 = $2;
+     $37 = (($36) + ($35<<2)|0);
+     $38 = HEAP32[$37>>2]|0;
+     $39 = ((($args)) + 20|0);
+     $40 = HEAP32[$39>>2]|0;
+     $41 = ($40|0)!=(0|0);
+     $42 = $41 ? 53228 : 53231;
+     $43 = (_get_outfilename($34,$38,$42)|0);
+     $44 = ((($args)) + 16|0);
+     HEAP32[$44>>2] = $43;
+     break;
+    }
+    $45 = HEAP32[637]|0;
+    $46 = ((($args)) + 12|0);
+    $47 = HEAP32[$46>>2]|0;
+    HEAP32[$vararg_buffer1>>2] = $47;
+    (_fprintf($45,53236,$vararg_buffer1)|0);
+    $0 = 1;
+    $100 = $0;
+    STACKTOP = sp;return ($100|0);
+   }
+  }
+ } while(0);
+ $48 = $n;
+ $49 = ((($args)) + 8|0);
+ HEAP32[$49>>2] = $48;
+ $50 = $mrb;
+ _load_file($3,$50,$args);
+ ;HEAP32[$load>>2]=HEAP32[$3>>2]|0;HEAP32[$load+4>>2]=HEAP32[$3+4>>2]|0;
+ $51 = ((($load)) + 4|0);
+ $52 = HEAP32[$51>>2]|0;
+ $53 = ($52|0)==(0);
+ if ($53) {
+  $54 = HEAP32[$load>>2]|0;
+  $55 = ($54|0)!=(0);
+  if (!($55)) {
+   $56 = $mrb;
+   _cleanup($56,$args);
+   $0 = 1;
+   $100 = $0;
+   STACKTOP = sp;return ($100|0);
+  }
+ }
+ $57 = ((($args)) + 24|0);
+ $58 = HEAP8[$57>>0]|0;
+ $59 = $58 & 1;
+ $60 = ($59<<24>>24)!=(0);
+ if ($60) {
+  $61 = ((($args)) + 12|0);
+  $62 = HEAP32[$61>>2]|0;
+  $63 = $n;
+  $64 = $2;
+  $65 = (($64) + ($63<<2)|0);
+  $66 = HEAP32[$65>>2]|0;
+  HEAP32[$vararg_buffer4>>2] = $62;
+  $vararg_ptr7 = ((($vararg_buffer4)) + 4|0);
+  HEAP32[$vararg_ptr7>>2] = $66;
+  (_printf(53299,$vararg_buffer4)|0);
+ }
+ $67 = ((($args)) + 24|0);
+ $68 = HEAP8[$67>>0]|0;
+ $69 = $68 & 1;
+ $70 = ($69<<24>>24)!=(0);
+ if ($70) {
+  $71 = $mrb;
+  _cleanup($71,$args);
+  $0 = 0;
+  $100 = $0;
+  STACKTOP = sp;return ($100|0);
+ }
+ $72 = ((($args)) + 16|0);
+ $73 = HEAP32[$72>>2]|0;
+ $74 = ($73|0)!=(0|0);
+ if (!($74)) {
+  $89 = HEAP32[637]|0;
+  (_fprintf($89,53353,$vararg_buffer12)|0);
+  $0 = 1;
+  $100 = $0;
+  STACKTOP = sp;return ($100|0);
+ }
+ $75 = ((($args)) + 16|0);
+ $76 = HEAP32[$75>>2]|0;
+ $77 = (_strcmp(69609,$76)|0);
+ $78 = ($77|0)==(0);
+ if ($78) {
+  $79 = HEAP32[695]|0;
+  $wfp = $79;
+ } else {
+  $80 = ((($args)) + 16|0);
+  $81 = HEAP32[$80>>2]|0;
+  $82 = (_fopen($81,53316)|0);
+  $wfp = $82;
+  $83 = ($82|0)==(0|0);
+  if ($83) {
+   $84 = HEAP32[637]|0;
+   $85 = ((($args)) + 12|0);
+   $86 = HEAP32[$85>>2]|0;
+   $87 = ((($args)) + 16|0);
+   $88 = HEAP32[$87>>2]|0;
+   HEAP32[$vararg_buffer8>>2] = $86;
+   $vararg_ptr11 = ((($vararg_buffer8)) + 4|0);
+   HEAP32[$vararg_ptr11>>2] = $88;
+   (_fprintf($84,53319,$vararg_buffer8)|0);
+   $0 = 1;
+   $100 = $0;
+   STACKTOP = sp;return ($100|0);
+  }
+ }
+ $90 = $mrb;
+ $91 = $wfp;
+ $92 = ((($args)) + 16|0);
+ $93 = HEAP32[$92>>2]|0;
+ $94 = HEAP32[$load>>2]|0;
+ $95 = (_dump_file($90,$91,$93,$94,$args)|0);
+ $result = $95;
+ $96 = $wfp;
+ (_fclose($96)|0);
+ $97 = $mrb;
+ _cleanup($97,$args);
+ $98 = $result;
+ $99 = ($98|0)!=(0);
+ if ($99) {
+  $0 = 1;
+  $100 = $0;
+  STACKTOP = sp;return ($100|0);
+ } else {
+  $0 = 0;
+  $100 = $0;
+  STACKTOP = sp;return ($100|0);
+ }
+ return (0)|0;
+}
+function _parse_args($mrb,$argc,$argv,$args) {
+ $mrb = $mrb|0;
+ $argc = $argc|0;
+ $argv = $argv|0;
+ $args = $args|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
+ var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
+ var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0;
+ var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0;
+ var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0;
+ var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
+ var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0;
+ var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0;
+ var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0;
+ var $98 = 0, $99 = 0, $i = 0, $outfile = 0, $vararg_buffer = 0, $vararg_buffer2 = 0, $vararg_buffer5 = 0, $vararg_ptr1 = 0, $vararg_ptr8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer5 = sp + 16|0;
+ $vararg_buffer2 = sp + 8|0;
+ $vararg_buffer = sp;
+ $1 = $mrb;
+ $2 = $argc;
+ $3 = $argv;
+ $4 = $args;
+ $outfile = 0;
+ $5 = $4;
+ ;HEAP32[$5>>2]=HEAP32[72396>>2]|0;HEAP32[$5+4>>2]=HEAP32[72396+4>>2]|0;HEAP32[$5+8>>2]=HEAP32[72396+8>>2]|0;HEAP32[$5+12>>2]=HEAP32[72396+12>>2]|0;HEAP32[$5+16>>2]=HEAP32[72396+16>>2]|0;HEAP32[$5+20>>2]=HEAP32[72396+20>>2]|0;HEAP32[$5+24>>2]=HEAP32[72396+24>>2]|0;
+ $6 = $2;
+ $7 = $4;
+ HEAP32[$7>>2] = $6;
+ $8 = $3;
+ $9 = $4;
+ $10 = ((($9)) + 4|0);
+ HEAP32[$10>>2] = $8;
+ $11 = $3;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $4;
+ $14 = ((($13)) + 12|0);
+ HEAP32[$14>>2] = $12;
+ $i = 1;
+ L1: while(1) {
+  $15 = $i;
+  $16 = $2;
+  $17 = ($15|0)<($16|0);
+  if (!($17)) {
+   label = 36;
+   break;
+  }
+  $18 = $i;
+  $19 = $3;
+  $20 = (($19) + ($18<<2)|0);
+  $21 = HEAP32[$20>>2]|0;
+  $22 = HEAP8[$21>>0]|0;
+  $23 = $22 << 24 >> 24;
+  $24 = ($23|0)==(45);
+  if (!($24)) {
+   label = 36;
+   break;
+  }
+  $25 = $i;
+  $26 = $3;
+  $27 = (($26) + ($25<<2)|0);
+  $28 = HEAP32[$27>>2]|0;
+  $29 = ((($28)) + 1|0);
+  $30 = HEAP8[$29>>0]|0;
+  $31 = $30 << 24 >> 24;
+  L5: do {
+   switch ($31|0) {
+   case 104:  {
+    label = 24;
+    break L1;
+    break;
+   }
+   case 111:  {
+    $32 = $4;
+    $33 = ((($32)) + 16|0);
+    $34 = HEAP32[$33>>2]|0;
+    $35 = ($34|0)!=(0|0);
+    if ($35) {
+     label = 6;
+     break L1;
+    }
+    $41 = $i;
+    $42 = $3;
+    $43 = (($42) + ($41<<2)|0);
+    $44 = HEAP32[$43>>2]|0;
+    $45 = ((($44)) + 2|0);
+    $46 = HEAP8[$45>>0]|0;
+    $47 = $46 << 24 >> 24;
+    $48 = ($47|0)==(0);
+    if ($48) {
+     $49 = $i;
+     $50 = (($49) + 1)|0;
+     $51 = $3;
+     $52 = (($51) + ($50<<2)|0);
+     $53 = HEAP32[$52>>2]|0;
+     $54 = ($53|0)!=(0|0);
+     if ($54) {
+      $55 = $i;
+      $56 = (($55) + 1)|0;
+      $i = $56;
+      $57 = $1;
+      $58 = $i;
+      $59 = $3;
+      $60 = (($59) + ($58<<2)|0);
+      $61 = HEAP32[$60>>2]|0;
+      $62 = (_get_outfilename($57,$61,75440)|0);
+      $63 = $4;
+      $64 = ((($63)) + 16|0);
+      HEAP32[$64>>2] = $62;
+      break L5;
+     }
+    }
+    $65 = $1;
+    $66 = $i;
+    $67 = $3;
+    $68 = (($67) + ($66<<2)|0);
+    $69 = HEAP32[$68>>2]|0;
+    $70 = ((($69)) + 2|0);
+    $71 = (_get_outfilename($65,$70,75440)|0);
+    $72 = $4;
+    $73 = ((($72)) + 16|0);
+    HEAP32[$73>>2] = $71;
+    break;
+   }
+   case 66:  {
+    $74 = $i;
+    $75 = $3;
+    $76 = (($75) + ($74<<2)|0);
+    $77 = HEAP32[$76>>2]|0;
+    $78 = ((($77)) + 2|0);
+    $79 = HEAP8[$78>>0]|0;
+    $80 = $79 << 24 >> 24;
+    $81 = ($80|0)==(0);
+    if ($81) {
+     $82 = $i;
+     $83 = (($82) + 1)|0;
+     $84 = $3;
+     $85 = (($84) + ($83<<2)|0);
+     $86 = HEAP32[$85>>2]|0;
+     $87 = ($86|0)!=(0|0);
+     if ($87) {
+      $88 = $i;
+      $89 = (($88) + 1)|0;
+      $i = $89;
+      $90 = $i;
+      $91 = $3;
+      $92 = (($91) + ($90<<2)|0);
+      $93 = HEAP32[$92>>2]|0;
+      $94 = $4;
+      $95 = ((($94)) + 20|0);
+      HEAP32[$95>>2] = $93;
+     } else {
+      label = 14;
+     }
+    } else {
+     label = 14;
+    }
+    if ((label|0) == 14) {
+     label = 0;
+     $96 = $i;
+     $97 = $3;
+     $98 = (($97) + ($96<<2)|0);
+     $99 = HEAP32[$98>>2]|0;
+     $100 = ((($99)) + 2|0);
+     $101 = $4;
+     $102 = ((($101)) + 20|0);
+     HEAP32[$102>>2] = $100;
+    }
+    $103 = $4;
+    $104 = ((($103)) + 20|0);
+    $105 = HEAP32[$104>>2]|0;
+    $106 = HEAP8[$105>>0]|0;
+    $107 = $106 << 24 >> 24;
+    $108 = ($107|0)==(0);
+    if ($108) {
+     label = 16;
+     break L1;
+    }
+    break;
+   }
+   case 99:  {
+    $113 = $4;
+    $114 = ((($113)) + 24|0);
+    $115 = HEAP8[$114>>0]|0;
+    $116 = $115 & -2;
+    $117 = $116 | 1;
+    HEAP8[$114>>0] = $117;
+    break;
+   }
+   case 118:  {
+    $118 = $4;
+    $119 = ((($118)) + 24|0);
+    $120 = HEAP8[$119>>0]|0;
+    $121 = ($120&255) >>> 1;
+    $122 = $121 & 1;
+    $123 = ($122<<24>>24)!=(0);
+    if (!($123)) {
+     $124 = $1;
+     _mrb_show_version($124);
+    }
+    $125 = $4;
+    $126 = ((($125)) + 24|0);
+    $127 = HEAP8[$126>>0]|0;
+    $128 = $127 & -3;
+    $129 = $128 | 2;
+    HEAP8[$126>>0] = $129;
+    break;
+   }
+   case 103:  {
+    $130 = $4;
+    $131 = ((($130)) + 24|0);
+    $132 = HEAP8[$131>>0]|0;
+    $133 = ($132&255) >>> 2;
+    $134 = $133 & 15;
+    $135 = $134&255;
+    $136 = $135 | 1;
+    $137 = $136&255;
+    $138 = HEAP8[$131>>0]|0;
+    $139 = $137 & 15;
+    $140 = ($139 << 2)&255;
+    $141 = $138 & -61;
+    $142 = $141 | $140;
+    HEAP8[$131>>0] = $142;
+    break;
+   }
+   case 69:  {
+    $143 = $4;
+    $144 = ((($143)) + 24|0);
+    $145 = HEAP8[$144>>0]|0;
+    $146 = ($145&255) >>> 2;
+    $147 = $146 & 15;
+    $148 = $147&255;
+    $149 = $148 & -7;
+    $150 = 2 | $149;
+    $151 = $4;
+    $152 = ((($151)) + 24|0);
+    $153 = $150&255;
+    $154 = HEAP8[$152>>0]|0;
+    $155 = $153 & 15;
+    $156 = ($155 << 2)&255;
+    $157 = $154 & -61;
+    $158 = $157 | $156;
+    HEAP8[$152>>0] = $158;
+    break;
+   }
+   case 101:  {
+    $159 = $4;
+    $160 = ((($159)) + 24|0);
+    $161 = HEAP8[$160>>0]|0;
+    $162 = ($161&255) >>> 2;
+    $163 = $162 & 15;
+    $164 = $163&255;
+    $165 = $164 & -7;
+    $166 = 4 | $165;
+    $167 = $4;
+    $168 = ((($167)) + 24|0);
+    $169 = $166&255;
+    $170 = HEAP8[$168>>0]|0;
+    $171 = $169 & 15;
+    $172 = ($171 << 2)&255;
+    $173 = $170 & -61;
+    $174 = $173 | $172;
+    HEAP8[$168>>0] = $174;
+    break;
+   }
+   case 45:  {
+    $175 = $i;
+    $176 = $3;
+    $177 = (($176) + ($175<<2)|0);
+    $178 = HEAP32[$177>>2]|0;
+    $179 = ((($178)) + 1|0);
+    $180 = HEAP8[$179>>0]|0;
+    $181 = $180 << 24 >> 24;
+    $182 = ($181|0)==(10);
+    $183 = $i;
+    if ($182) {
+     label = 26;
+     break L1;
+    }
+    $184 = $3;
+    $185 = (($184) + ($183<<2)|0);
+    $186 = HEAP32[$185>>2]|0;
+    $187 = ((($186)) + 2|0);
+    $188 = (_strcmp($187,53462)|0);
+    $189 = ($188|0)==(0);
+    if ($189) {
+     label = 28;
+     break L1;
+    }
+    $191 = $i;
+    $192 = $3;
+    $193 = (($192) + ($191<<2)|0);
+    $194 = HEAP32[$193>>2]|0;
+    $195 = ((($194)) + 2|0);
+    $196 = (_strcmp($195,53470)|0);
+    $197 = ($196|0)==(0);
+    if (!($197)) {
+     label = 31;
+     break L1;
+    }
+    $198 = $4;
+    $199 = ((($198)) + 24|0);
+    $200 = HEAP8[$199>>0]|0;
+    $201 = $200 & -3;
+    $202 = $201 | 2;
+    HEAP8[$199>>0] = $202;
+    break;
+   }
+   default: {
+    label = 34;
+    break L1;
+   }
+   }
+  } while(0);
+  $212 = $i;
+  $213 = (($212) + 1)|0;
+  $i = $213;
+ }
+ if ((label|0) == 6) {
+  $36 = HEAP32[637]|0;
+  $37 = $4;
+  $38 = ((($37)) + 12|0);
+  $39 = HEAP32[$38>>2]|0;
+  $40 = $outfile;
+  HEAP32[$vararg_buffer>>2] = $39;
+  $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+  HEAP32[$vararg_ptr1>>2] = $40;
+  (_fprintf($36,53378,$vararg_buffer)|0);
+  $0 = -1;
+  $241 = $0;
+  STACKTOP = sp;return ($241|0);
+ }
+ else if ((label|0) == 16) {
+  $109 = HEAP32[637]|0;
+  $110 = $4;
+  $111 = ((($110)) + 12|0);
+  $112 = HEAP32[$111>>2]|0;
+  HEAP32[$vararg_buffer2>>2] = $112;
+  (_fprintf($109,53425,$vararg_buffer2)|0);
+  $0 = -1;
+  $241 = $0;
+  STACKTOP = sp;return ($241|0);
+ }
+ else if ((label|0) == 24) {
+  $0 = -1;
+  $241 = $0;
+  STACKTOP = sp;return ($241|0);
+ }
+ else if ((label|0) == 26) {
+  $0 = $183;
+  $241 = $0;
+  STACKTOP = sp;return ($241|0);
+ }
+ else if ((label|0) == 28) {
+  $190 = $1;
+  _mrb_show_version($190);
+  _exit(0);
+  // unreachable;
+ }
+ else if ((label|0) == 31) {
+  $203 = $i;
+  $204 = $3;
+  $205 = (($204) + ($203<<2)|0);
+  $206 = HEAP32[$205>>2]|0;
+  $207 = ((($206)) + 2|0);
+  $208 = (_strcmp($207,53478)|0);
+  $209 = ($208|0)==(0);
+  if ($209) {
+   $210 = $1;
+   _mrb_show_copyright($210);
+   _exit(0);
+   // unreachable;
+  }
+  $0 = -1;
+  $241 = $0;
+  STACKTOP = sp;return ($241|0);
+ }
+ else if ((label|0) == 34) {
+  $211 = $i;
+  $0 = $211;
+  $241 = $0;
+  STACKTOP = sp;return ($241|0);
+ }
+ else if ((label|0) == 36) {
+  $214 = $4;
+  $215 = ((($214)) + 24|0);
+  $216 = HEAP8[$215>>0]|0;
+  $217 = ($216&255) >>> 1;
+  $218 = $217 & 1;
+  $219 = $218&255;
+  $220 = ($219|0)!=(0);
+  if ($220) {
+   $221 = $4;
+   $222 = ((($221)) + 20|0);
+   $223 = HEAP32[$222>>2]|0;
+   $224 = ($223|0)!=(0|0);
+   if ($224) {
+    $225 = $4;
+    $226 = ((($225)) + 24|0);
+    $227 = HEAP8[$226>>0]|0;
+    $228 = ($227&255) >>> 2;
+    $229 = $228 & 15;
+    $230 = $229&255;
+    $231 = $230 & 6;
+    $232 = ($231|0)==(0);
+    if ($232) {
+     $233 = HEAP32[637]|0;
+     $234 = $4;
+     $235 = ((($234)) + 12|0);
+     $236 = HEAP32[$235>>2]|0;
+     $237 = (_bigendian_p()|0);
+     $238 = ($237|0)!=(0);
+     $239 = $238 ? 53557 : 53561;
+     HEAP32[$vararg_buffer5>>2] = $236;
+     $vararg_ptr8 = ((($vararg_buffer5)) + 4|0);
+     HEAP32[$vararg_ptr8>>2] = $239;
+     (_fprintf($233,53488,$vararg_buffer5)|0);
+    }
+   }
+  }
+  $240 = $i;
+  $0 = $240;
+  $241 = $0;
+  STACKTOP = sp;return ($241|0);
+ }
+ return (0)|0;
+}
+function _cleanup($mrb,$args) {
+ $mrb = $mrb|0;
+ $args = $args|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $args;
+ $2 = $0;
+ $3 = $1;
+ $4 = ((($3)) + 16|0);
+ $5 = HEAP32[$4>>2]|0;
+ _mrb_free($2,$5);
+ $6 = $0;
+ _mrb_close($6);
+ STACKTOP = sp;return;
+}
+function _usage($name) {
+ $name = $name|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $p = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer1 = sp + 8|0;
+ $vararg_buffer = sp;
+ $0 = $name;
+ $p = 8;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $1;
+ (_printf(54001,$vararg_buffer)|0);
+ while(1) {
+  $2 = $p;
+  $3 = HEAP32[$2>>2]|0;
+  $4 = ($3|0)!=(0|0);
+  if (!($4)) {
+   break;
+  }
+  $5 = $p;
+  $6 = ((($5)) + 4|0);
+  $p = $6;
+  $7 = HEAP32[$5>>2]|0;
+  HEAP32[$vararg_buffer1>>2] = $7;
+  (_printf(54035,$vararg_buffer1)|0);
+ }
+ STACKTOP = sp;return;
+}
+function _get_outfilename($mrb,$infile,$ext) {
+ $mrb = $mrb|0;
+ $infile = $infile|0;
+ $ext = $ext|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $extlen = 0, $infilelen = 0, $outfile = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $infile;
+ $2 = $ext;
+ $3 = $1;
+ $4 = (_strlen($3)|0);
+ $infilelen = $4;
+ $5 = $2;
+ $6 = (_strlen($5)|0);
+ $extlen = $6;
+ $7 = $0;
+ $8 = $infilelen;
+ $9 = $extlen;
+ $10 = (($8) + ($9))|0;
+ $11 = (($10) + 1)|0;
+ $12 = (_mrb_malloc($7,$11)|0);
+ $outfile = $12;
+ $13 = $outfile;
+ $14 = $1;
+ $15 = $infilelen;
+ $16 = (($15) + 1)|0;
+ _memcpy(($13|0),($14|0),($16|0))|0;
+ $17 = $2;
+ $18 = HEAP8[$17>>0]|0;
+ $19 = ($18<<24>>24)!=(0);
+ if (!($19)) {
+  $30 = $outfile;
+  STACKTOP = sp;return ($30|0);
+ }
+ $20 = $outfile;
+ $21 = (_strrchr($20,46)|0);
+ $p = $21;
+ $22 = ($21|0)==(0|0);
+ if ($22) {
+  $23 = $outfile;
+  $24 = $infilelen;
+  $25 = (($23) + ($24)|0);
+  $p = $25;
+ }
+ $26 = $p;
+ $27 = $2;
+ $28 = $extlen;
+ $29 = (($28) + 1)|0;
+ _memcpy(($26|0),($27|0),($29|0))|0;
+ $30 = $outfile;
+ STACKTOP = sp;return ($30|0);
+}
+function _load_file($agg$result,$mrb,$args) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $args = $args|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $8 = 0, $9 = 0, $c = 0, $infile = 0, $input = 0, $need_close = 0, $result = 0, $vararg_buffer = 0;
+ var $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $result = sp + 24|0;
+ $2 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $args;
+ $3 = $1;
+ $4 = ((($3)) + 8|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $1;
+ $7 = ((($6)) + 4|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = (($8) + ($5<<2)|0);
+ $10 = HEAP32[$9>>2]|0;
+ $input = $10;
+ $need_close = 0;
+ $11 = $0;
+ $12 = (_mrbc_context_new($11)|0);
+ $c = $12;
+ $13 = $1;
+ $14 = ((($13)) + 24|0);
+ $15 = HEAP8[$14>>0]|0;
+ $16 = ($15&255) >>> 1;
+ $17 = $16 & 1;
+ $18 = ($17<<24>>24)!=(0);
+ if ($18) {
+  $19 = $c;
+  $20 = ((($19)) + 28|0);
+  $21 = HEAP8[$20>>0]|0;
+  $22 = $21 & -3;
+  $23 = $22 | 2;
+  HEAP8[$20>>0] = $23;
+ }
+ $24 = $c;
+ $25 = ((($24)) + 28|0);
+ $26 = HEAP8[$25>>0]|0;
+ $27 = $26 & -5;
+ $28 = $27 | 4;
+ HEAP8[$25>>0] = $28;
+ $29 = $input;
+ $30 = HEAP8[$29>>0]|0;
+ $31 = $30 << 24 >> 24;
+ $32 = ($31|0)==(45);
+ if ($32) {
+  $33 = $input;
+  $34 = ((($33)) + 1|0);
+  $35 = HEAP8[$34>>0]|0;
+  $36 = $35 << 24 >> 24;
+  $37 = ($36|0)==(0);
+  if ($37) {
+   $38 = HEAP32[666]|0;
+   $infile = $38;
+  } else {
+   label = 6;
+  }
+ } else {
+  label = 6;
+ }
+ if ((label|0) == 6) {
+  $need_close = 1;
+  $39 = $input;
+  $40 = (_fopen($39,54041)|0);
+  $infile = $40;
+  $41 = ($40|0)==(0|0);
+  if ($41) {
+   $42 = HEAP32[637]|0;
+   $43 = $1;
+   $44 = ((($43)) + 12|0);
+   $45 = HEAP32[$44>>2]|0;
+   $46 = $input;
+   HEAP32[$vararg_buffer>>2] = $45;
+   $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+   HEAP32[$vararg_ptr1>>2] = $46;
+   (_fprintf($42,54043,$vararg_buffer)|0);
+   _mrb_nil_value($agg$result);
+   STACKTOP = sp;return;
+  }
+ }
+ $47 = $0;
+ $48 = $c;
+ $49 = $input;
+ (_mrbc_filename($47,$48,$49)|0);
+ $50 = $1;
+ $51 = ((($50)) + 8|0);
+ $52 = HEAP32[$51>>2]|0;
+ $53 = (($52) + 1)|0;
+ HEAP32[$51>>2] = $53;
+ $54 = $1;
+ $55 = ((($54)) + 8|0);
+ $56 = HEAP32[$55>>2]|0;
+ $57 = $1;
+ $58 = HEAP32[$57>>2]|0;
+ $59 = ($56|0)<($58|0);
+ if ($59) {
+  $need_close = 0;
+  $60 = $0;
+  $61 = $c;
+  $62 = $1;
+  _mrbc_partial_hook($60,$61,7,$62);
+ }
+ $63 = $0;
+ $64 = $infile;
+ $65 = $c;
+ _mrb_load_file_cxt($2,$63,$64,$65);
+ ;HEAP32[$result>>2]=HEAP32[$2>>2]|0;HEAP32[$result+4>>2]=HEAP32[$2+4>>2]|0;
+ $66 = $need_close;
+ $67 = ($66<<24>>24)!=(0);
+ if ($67) {
+  $68 = $infile;
+  (_fclose($68)|0);
+ }
+ $69 = $0;
+ $70 = $c;
+ _mrbc_context_free($69,$70);
+ $71 = ((($result)) + 4|0);
+ $72 = HEAP32[$71>>2]|0;
+ $73 = ($72|0)==(5);
+ if ($73) {
+  _mrb_nil_value($agg$result);
+  STACKTOP = sp;return;
+ } else {
+  ;HEAP32[$agg$result>>2]=HEAP32[$result>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$result+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+}
+function _dump_file($mrb,$wfp,$outfile,$proc,$args) {
+ $mrb = $mrb|0;
+ $wfp = $wfp|0;
+ $outfile = $outfile|0;
+ $proc = $proc|0;
+ $args = $args|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $irep = 0, $n = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_ptr4 = 0, $vararg_ptr5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer1 = sp + 8|0;
+ $vararg_buffer = sp;
+ $0 = $mrb;
+ $1 = $wfp;
+ $2 = $outfile;
+ $3 = $proc;
+ $4 = $args;
+ $n = 0;
+ $5 = $3;
+ $6 = ((($5)) + 12|0);
+ $7 = HEAP32[$6>>2]|0;
+ $irep = $7;
+ $8 = $4;
+ $9 = ((($8)) + 20|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = ($10|0)!=(0|0);
+ $12 = $0;
+ $13 = $irep;
+ $14 = $4;
+ $15 = ((($14)) + 24|0);
+ $16 = HEAP8[$15>>0]|0;
+ $17 = ($16&255) >>> 2;
+ $18 = $17 & 15;
+ $19 = $18&255;
+ $20 = $19&255;
+ $21 = $1;
+ if ($11) {
+  $22 = $4;
+  $23 = ((($22)) + 20|0);
+  $24 = HEAP32[$23>>2]|0;
+  $25 = (_mrb_dump_irep_cfunc($12,$13,$20,$21,$24)|0);
+  $n = $25;
+  $26 = $n;
+  $27 = ($26|0)==(-7);
+  if ($27) {
+   $28 = HEAP32[637]|0;
+   $29 = $4;
+   $30 = ((($29)) + 20|0);
+   $31 = HEAP32[$30>>2]|0;
+   HEAP32[$vararg_buffer>>2] = $31;
+   (_fprintf($28,54079,$vararg_buffer)|0);
+  }
+ } else {
+  $32 = (_mrb_dump_irep_binary($12,$13,$20,$21)|0);
+  $n = $32;
+ }
+ $33 = $n;
+ $34 = ($33|0)!=(0);
+ if (!($34)) {
+  $41 = $n;
+  STACKTOP = sp;return ($41|0);
+ }
+ $35 = HEAP32[637]|0;
+ $36 = $4;
+ $37 = ((($36)) + 12|0);
+ $38 = HEAP32[$37>>2]|0;
+ $39 = $2;
+ $40 = $n;
+ HEAP32[$vararg_buffer1>>2] = $38;
+ $vararg_ptr4 = ((($vararg_buffer1)) + 4|0);
+ HEAP32[$vararg_ptr4>>2] = $39;
+ $vararg_ptr5 = ((($vararg_buffer1)) + 8|0);
+ HEAP32[$vararg_ptr5>>2] = $40;
+ (_fprintf($35,54115,$vararg_buffer1)|0);
+ $41 = $n;
+ STACKTOP = sp;return ($41|0);
+}
+function _mrb_init_mrblib($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ STACKTOP = sp;return;
+}
+function _mrb_init_mrbgems($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ STACKTOP = sp;return;
+}
+function _bigendian_p() {
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $i = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $i = sp + 4|0;
+ HEAP32[$i>>2] = 1;
+ $p = $i;
+ $0 = $p;
+ $1 = HEAP8[$0>>0]|0;
+ $2 = $1 << 24 >> 24;
+ $3 = ($2|0)!=(0);
+ $4 = $3 ? 0 : 1;
+ STACKTOP = sp;return ($4|0);
+}
+function _mrb_nil_value($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _partial_hook($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $args = 0, $c = 0, $fn = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $1 = $p;
+ $2 = $1;
+ $3 = ((($2)) + 24|0);
+ $4 = HEAP32[$3>>2]|0;
+ $c = $4;
+ $5 = $c;
+ $6 = ((($5)) + 20|0);
+ $7 = HEAP32[$6>>2]|0;
+ $args = $7;
+ $8 = $1;
+ $9 = ((($8)) + 20|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = ($10|0)!=(0|0);
+ if ($11) {
+  $12 = $1;
+  $13 = ((($12)) + 20|0);
+  $14 = HEAP32[$13>>2]|0;
+  (_fclose($14)|0);
+ }
+ $15 = $args;
+ $16 = ((($15)) + 8|0);
+ $17 = HEAP32[$16>>2]|0;
+ $18 = $args;
+ $19 = HEAP32[$18>>2]|0;
+ $20 = ($17|0)>=($19|0);
+ if ($20) {
+  $21 = $1;
+  $22 = ((($21)) + 20|0);
+  HEAP32[$22>>2] = 0;
+  $0 = -1;
+  $47 = $0;
+  STACKTOP = sp;return ($47|0);
+ }
+ $23 = $args;
+ $24 = ((($23)) + 8|0);
+ $25 = HEAP32[$24>>2]|0;
+ $26 = (($25) + 1)|0;
+ HEAP32[$24>>2] = $26;
+ $27 = $args;
+ $28 = ((($27)) + 4|0);
+ $29 = HEAP32[$28>>2]|0;
+ $30 = (($29) + ($25<<2)|0);
+ $31 = HEAP32[$30>>2]|0;
+ $fn = $31;
+ $32 = $fn;
+ $33 = (_fopen($32,54041)|0);
+ $34 = $1;
+ $35 = ((($34)) + 20|0);
+ HEAP32[$35>>2] = $33;
+ $36 = $1;
+ $37 = ((($36)) + 20|0);
+ $38 = HEAP32[$37>>2]|0;
+ $39 = ($38|0)==(0|0);
+ if ($39) {
+  $40 = HEAP32[637]|0;
+  $41 = $args;
+  $42 = ((($41)) + 12|0);
+  $43 = HEAP32[$42>>2]|0;
+  $44 = $fn;
+  HEAP32[$vararg_buffer>>2] = $43;
+  $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+  HEAP32[$vararg_ptr1>>2] = $44;
+  (_fprintf($40,54043,$vararg_buffer)|0);
+  $0 = -1;
+  $47 = $0;
+  STACKTOP = sp;return ($47|0);
+ } else {
+  $45 = $1;
+  $46 = $fn;
+  _mrb_parser_set_filename($45,$46);
+  $0 = 0;
+  $47 = $0;
+  STACKTOP = sp;return ($47|0);
+ }
+ return (0)|0;
+}
+function _dump_flags($flags,$native) {
+ $flags = $flags|0;
+ $native = $native|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $flags;
+ $2 = $native;
+ $3 = $2;
+ $4 = $3&255;
+ $5 = ($4|0)==(2);
+ $6 = $1;
+ $7 = $6&255;
+ $8 = $7 & 6;
+ $9 = ($8|0)==(0);
+ $10 = $1;
+ do {
+  if ($5) {
+   if ($9) {
+    $11 = $10&255;
+    $12 = $11 & 1;
+    $13 = $12 | 6;
+    $14 = $13&255;
+    $0 = $14;
+    break;
+   } else {
+    $0 = $10;
+    break;
+   }
+  } else {
+   if ($9) {
+    $15 = $10&255;
+    $16 = $15 & 1;
+    $17 = $16 | 2;
+    $18 = $17&255;
+    $0 = $18;
+    break;
+   } else {
+    $0 = $10;
+    break;
+   }
+  }
+ } while(0);
+ $19 = $0;
+ STACKTOP = sp;return ($19|0);
+}
+function _dump_irep($mrb,$irep,$flags,$bin,$bin_size) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $flags = $flags|0;
+ $bin = $bin|0;
+ $bin_size = $bin_size|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0;
+ var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0;
+ var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0;
+ var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0;
+ var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $cur = 0;
+ var $debug_info_defined = 0, $filenames = 0, $filenames_len = 0, $lv_defined = 0, $lv_syms = 0, $lv_syms_len = 0, $malloc_size = 0, $result = 0, $section_irep_size = 0, $section_lineno_size = 0, $section_lv_size = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $section_irep_size = sp + 24|0;
+ $lv_syms = sp + 8|0;
+ $lv_syms_len = sp + 4|0;
+ $filenames = sp;
+ $filenames_len = sp + 56|0;
+ $1 = $mrb;
+ $2 = $irep;
+ $3 = $flags;
+ $4 = $bin;
+ $5 = $bin_size;
+ $result = -1;
+ $section_lineno_size = 0;
+ $section_lv_size = 0;
+ $cur = 0;
+ $6 = $2;
+ $7 = (_is_debug_info_defined($6)|0);
+ $debug_info_defined = $7;
+ $8 = $2;
+ $9 = (_is_lv_defined($8)|0);
+ $lv_defined = $9;
+ HEAP32[$lv_syms>>2] = 0;
+ HEAP32[$lv_syms_len>>2] = 0;
+ HEAP32[$filenames>>2] = 0;
+ HEAP16[$filenames_len>>1] = 0;
+ $10 = $1;
+ $11 = ($10|0)==(0|0);
+ if ($11) {
+  $12 = $4;
+  HEAP32[$12>>2] = 0;
+  $0 = -1;
+  $138 = $0;
+  STACKTOP = sp;return ($138|0);
+ }
+ HEAP32[$section_irep_size>>2] = 12;
+ $13 = $1;
+ $14 = $2;
+ $15 = (_get_irep_record_size($13,$14)|0);
+ $16 = HEAP32[$section_irep_size>>2]|0;
+ $17 = (($16) + ($15))|0;
+ HEAP32[$section_irep_size>>2] = $17;
+ $18 = $3;
+ $19 = $18&255;
+ $20 = $19 & 1;
+ $21 = ($20|0)!=(0);
+ do {
+  if ($21) {
+   $22 = $debug_info_defined;
+   $23 = ($22<<24>>24)!=(0);
+   $24 = $section_lineno_size;
+   $25 = (($24) + 8)|0;
+   $section_lineno_size = $25;
+   $26 = $1;
+   if ($23) {
+    $27 = (_mrb_malloc($26,5)|0);
+    HEAP32[$filenames>>2] = $27;
+    $28 = $section_lineno_size;
+    $29 = (($28) + 2)|0;
+    $section_lineno_size = $29;
+    $30 = $1;
+    $31 = $2;
+    $32 = (_get_filename_table_size($30,$31,$filenames,$filenames_len)|0);
+    $33 = $section_lineno_size;
+    $34 = (($33) + ($32))|0;
+    $section_lineno_size = $34;
+    $35 = $1;
+    $36 = $2;
+    $37 = (_get_debug_record_size($35,$36)|0);
+    $38 = $section_lineno_size;
+    $39 = (($38) + ($37))|0;
+    $section_lineno_size = $39;
+    break;
+   } else {
+    $40 = $2;
+    $41 = (_get_lineno_record_size($26,$40)|0);
+    $42 = $section_lineno_size;
+    $43 = (($42) + ($41))|0;
+    $section_lineno_size = $43;
+    break;
+   }
+  }
+ } while(0);
+ $44 = $lv_defined;
+ $45 = ($44<<24>>24)!=(0);
+ if ($45) {
+  $46 = $section_lv_size;
+  $47 = (($46) + 8)|0;
+  $section_lv_size = $47;
+  $48 = $1;
+  $49 = $2;
+  _create_lv_sym_table($48,$49,$lv_syms,$lv_syms_len);
+  $50 = $1;
+  $51 = $2;
+  $52 = HEAP32[$lv_syms>>2]|0;
+  $53 = HEAP32[$lv_syms_len>>2]|0;
+  $54 = (_get_lv_section_size($50,$51,$52,$53)|0);
+  $55 = $section_lv_size;
+  $56 = (($55) + ($54))|0;
+  $section_lv_size = $56;
+ }
+ $57 = HEAP32[$section_irep_size>>2]|0;
+ $58 = (22 + ($57))|0;
+ $59 = $section_lineno_size;
+ $60 = (($58) + ($59))|0;
+ $61 = $section_lv_size;
+ $62 = (($60) + ($61))|0;
+ $63 = (($62) + 8)|0;
+ $malloc_size = $63;
+ $64 = $1;
+ $65 = $malloc_size;
+ $66 = (_mrb_malloc($64,$65)|0);
+ $67 = $4;
+ HEAP32[$67>>2] = $66;
+ $cur = $66;
+ $68 = $cur;
+ $69 = ((($68)) + 22|0);
+ $cur = $69;
+ $70 = $1;
+ $71 = $2;
+ $72 = $cur;
+ $73 = $3;
+ $74 = (_write_section_irep($70,$71,$72,$section_irep_size,$73)|0);
+ $result = $74;
+ $75 = $result;
+ $76 = ($75|0)!=(0);
+ do {
+  if (!($76)) {
+   $77 = HEAP32[$section_irep_size>>2]|0;
+   $78 = $cur;
+   $79 = (($78) + ($77)|0);
+   $cur = $79;
+   $80 = HEAP32[$section_irep_size>>2]|0;
+   $81 = (22 + ($80))|0;
+   $82 = $section_lineno_size;
+   $83 = (($81) + ($82))|0;
+   $84 = $section_lv_size;
+   $85 = (($83) + ($84))|0;
+   $86 = (($85) + 8)|0;
+   $87 = $5;
+   HEAP32[$87>>2] = $86;
+   $88 = $3;
+   $89 = $88&255;
+   $90 = $89 & 1;
+   $91 = ($90|0)!=(0);
+   if ($91) {
+    $92 = $debug_info_defined;
+    $93 = ($92<<24>>24)!=(0);
+    $94 = $1;
+    $95 = $2;
+    $96 = $cur;
+    if ($93) {
+     $97 = HEAP32[$filenames>>2]|0;
+     $98 = HEAP16[$filenames_len>>1]|0;
+     $99 = (_write_section_debug($94,$95,$96,$97,$98)|0);
+     $result = $99;
+    } else {
+     $100 = (_write_section_lineno($94,$95,$96)|0);
+     $result = $100;
+    }
+    $101 = $result;
+    $102 = ($101|0)!=(0);
+    if ($102) {
+     break;
+    }
+    $103 = $section_lineno_size;
+    $104 = $cur;
+    $105 = (($104) + ($103)|0);
+    $cur = $105;
+   }
+   $106 = $lv_defined;
+   $107 = ($106<<24>>24)!=(0);
+   if ($107) {
+    $108 = $1;
+    $109 = $2;
+    $110 = $cur;
+    $111 = HEAP32[$lv_syms>>2]|0;
+    $112 = HEAP32[$lv_syms_len>>2]|0;
+    $113 = (_write_section_lv($108,$109,$110,$111,$112)|0);
+    $result = $113;
+    $114 = $result;
+    $115 = ($114|0)!=(0);
+    if ($115) {
+     break;
+    }
+    $116 = $section_lv_size;
+    $117 = $cur;
+    $118 = (($117) + ($116)|0);
+    $cur = $118;
+   }
+   $119 = $1;
+   $120 = $cur;
+   (_write_footer($119,$120)|0);
+   $121 = $1;
+   $122 = $5;
+   $123 = HEAP32[$122>>2]|0;
+   $124 = $4;
+   $125 = HEAP32[$124>>2]|0;
+   $126 = $3;
+   (_write_rite_binary_header($121,$123,$125,$126)|0);
+  }
+ } while(0);
+ $127 = $result;
+ $128 = ($127|0)!=(0);
+ if ($128) {
+  $129 = $1;
+  $130 = $4;
+  $131 = HEAP32[$130>>2]|0;
+  _mrb_free($129,$131);
+  $132 = $4;
+  HEAP32[$132>>2] = 0;
+ }
+ $133 = $1;
+ $134 = HEAP32[$lv_syms>>2]|0;
+ _mrb_free($133,$134);
+ $135 = $1;
+ $136 = HEAP32[$filenames>>2]|0;
+ _mrb_free($135,$136);
+ $137 = $result;
+ $0 = $137;
+ $138 = $0;
+ STACKTOP = sp;return ($138|0);
+}
+function _is_debug_info_defined($irep) {
+ $irep = $irep|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $i = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $irep;
+ $2 = $1;
+ $3 = ((($2)) + 36|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)!=(0|0);
+ if (!($5)) {
+  $0 = 0;
+  $21 = $0;
+  STACKTOP = sp;return ($21|0);
+ }
+ $i = 0;
+ while(1) {
+  $6 = $i;
+  $7 = $1;
+  $8 = ((($7)) + 52|0);
+  $9 = HEAP32[$8>>2]|0;
+  $10 = ($6>>>0)<($9>>>0);
+  if (!($10)) {
+   label = 8;
+   break;
+  }
+  $11 = $i;
+  $12 = $1;
+  $13 = ((($12)) + 20|0);
+  $14 = HEAP32[$13>>2]|0;
+  $15 = (($14) + ($11<<2)|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = (_is_debug_info_defined($16)|0);
+  $18 = ($17<<24>>24)!=(0);
+  if (!($18)) {
+   label = 6;
+   break;
+  }
+  $19 = $i;
+  $20 = (($19) + 1)|0;
+  $i = $20;
+ }
+ if ((label|0) == 6) {
+  $0 = 0;
+  $21 = $0;
+  STACKTOP = sp;return ($21|0);
+ }
+ else if ((label|0) == 8) {
+  $0 = 1;
+  $21 = $0;
+  STACKTOP = sp;return ($21|0);
+ }
+ return (0)|0;
+}
+function _is_lv_defined($irep) {
+ $irep = $irep|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $i = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $irep;
+ $2 = $1;
+ $3 = ((($2)) + 24|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)!=(0|0);
+ if ($5) {
+  $0 = 1;
+  $21 = $0;
+  STACKTOP = sp;return ($21|0);
+ }
+ $i = 0;
+ while(1) {
+  $6 = $i;
+  $7 = $1;
+  $8 = ((($7)) + 52|0);
+  $9 = HEAP32[$8>>2]|0;
+  $10 = ($6>>>0)<($9>>>0);
+  if (!($10)) {
+   label = 8;
+   break;
+  }
+  $11 = $i;
+  $12 = $1;
+  $13 = ((($12)) + 20|0);
+  $14 = HEAP32[$13>>2]|0;
+  $15 = (($14) + ($11<<2)|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = (_is_lv_defined($16)|0);
+  $18 = ($17<<24>>24)!=(0);
+  if ($18) {
+   label = 6;
+   break;
+  }
+  $19 = $i;
+  $20 = (($19) + 1)|0;
+  $i = $20;
+ }
+ if ((label|0) == 6) {
+  $0 = 1;
+  $21 = $0;
+  STACKTOP = sp;return ($21|0);
+ }
+ else if ((label|0) == 8) {
+  $0 = 0;
+  $21 = $0;
+  STACKTOP = sp;return ($21|0);
+ }
+ return (0)|0;
+}
+function _get_irep_record_size($mrb,$irep) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, $irep_no = 0, $size = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $size = 0;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_get_irep_record_size_1($2,$3)|0);
+ $size = $4;
+ $irep_no = 0;
+ while(1) {
+  $5 = $irep_no;
+  $6 = $1;
+  $7 = ((($6)) + 52|0);
+  $8 = HEAP32[$7>>2]|0;
+  $9 = ($5>>>0)<($8>>>0);
+  if (!($9)) {
+   break;
+  }
+  $10 = $0;
+  $11 = $irep_no;
+  $12 = $1;
+  $13 = ((($12)) + 20|0);
+  $14 = HEAP32[$13>>2]|0;
+  $15 = (($14) + ($11<<2)|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = (_get_irep_record_size($10,$16)|0);
+  $18 = $size;
+  $19 = (($18) + ($17))|0;
+  $size = $19;
+  $20 = $irep_no;
+  $21 = (($20) + 1)|0;
+  $irep_no = $21;
+ }
+ $22 = $size;
+ STACKTOP = sp;return ($22|0);
+}
+function _get_irep_record_size_1($mrb,$irep) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $size = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $size = 0;
+ $2 = $0;
+ $3 = (_get_irep_header_size($2)|0);
+ $4 = $size;
+ $5 = (($4) + ($3))|0;
+ $size = $5;
+ $6 = $0;
+ $7 = $1;
+ $8 = (_get_iseq_block_size($6,$7)|0);
+ $9 = $size;
+ $10 = (($9) + ($8))|0;
+ $size = $10;
+ $11 = $0;
+ $12 = $1;
+ $13 = (_get_pool_block_size($11,$12)|0);
+ $14 = $size;
+ $15 = (($14) + ($13))|0;
+ $size = $15;
+ $16 = $0;
+ $17 = $1;
+ $18 = (_get_syms_block_size($16,$17)|0);
+ $19 = $size;
+ $20 = (($19) + ($18))|0;
+ $size = $20;
+ $21 = $size;
+ STACKTOP = sp;return ($21|0);
+}
+function _get_irep_header_size($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $size = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $size = 0;
+ $1 = $size;
+ $2 = (($1) + 4)|0;
+ $size = $2;
+ $3 = $size;
+ $4 = (($3) + 6)|0;
+ $size = $4;
+ $5 = $size;
+ STACKTOP = sp;return ($5|0);
+}
+function _get_iseq_block_size($mrb,$irep) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $size = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $size = 0;
+ $2 = $size;
+ $3 = (($2) + 4)|0;
+ $size = $3;
+ $4 = $size;
+ $5 = (($4) + 4)|0;
+ $size = $5;
+ $6 = $1;
+ $7 = ((($6)) + 40|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = $8<<2;
+ $10 = $size;
+ $11 = (($10) + ($9))|0;
+ $size = $11;
+ $12 = $size;
+ STACKTOP = sp;return ($12|0);
+}
+function _get_pool_block_size($mrb,$irep) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ var $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
+ var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0;
+ var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0;
+ var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0;
+ var $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0;
+ var $97 = 0, $98 = 0, $99 = 0, $ai = 0, $len = 0, $len1 = 0, $len2 = 0, $pool_no = 0, $size = 0, $str = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy1 = sp + 72|0;
+ $$byval_copy = sp + 64|0;
+ $str = sp + 40|0;
+ $2 = sp + 24|0;
+ $3 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $irep;
+ $size = 0;
+ $4 = $size;
+ $5 = (($4) + 4)|0;
+ $size = $5;
+ $6 = $1;
+ $7 = ((($6)) + 44|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ($8*3)|0;
+ $10 = $size;
+ $11 = (($10) + ($9))|0;
+ $size = $11;
+ $pool_no = 0;
+ while(1) {
+  $12 = $pool_no;
+  $13 = $1;
+  $14 = ((($13)) + 44|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = ($12>>>0)<($15>>>0);
+  if (!($16)) {
+   break;
+  }
+  $17 = $0;
+  $18 = (_mrb_gc_arena_save($17)|0);
+  $ai = $18;
+  $19 = $pool_no;
+  $20 = $1;
+  $21 = ((($20)) + 12|0);
+  $22 = HEAP32[$21>>2]|0;
+  $23 = (($22) + ($19<<3)|0);
+  $24 = ((($23)) + 4|0);
+  $25 = HEAP32[$24>>2]|0;
+  switch ($25|0) {
+  case 3:  {
+   $26 = $0;
+   $27 = $pool_no;
+   $28 = $1;
+   $29 = ((($28)) + 12|0);
+   $30 = HEAP32[$29>>2]|0;
+   $31 = (($30) + ($27<<3)|0);
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$31>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$31+4>>2]|0;
+   _mrb_fixnum_to_str($2,$26,$$byval_copy,10);
+   ;HEAP32[$str>>2]=HEAP32[$2>>2]|0;HEAP32[$str+4>>2]=HEAP32[$2+4>>2]|0;
+   $32 = HEAP32[$str>>2]|0;
+   $33 = HEAP32[$32>>2]|0;
+   $34 = $33 >>> 11;
+   $35 = $34 & 8;
+   $36 = ($35|0)!=(0);
+   $37 = HEAP32[$str>>2]|0;
+   if ($36) {
+    $38 = HEAP32[$37>>2]|0;
+    $39 = $38 >>> 11;
+    $40 = $39 & 496;
+    $41 = $40 >> 4;
+    $44 = $41;
+   } else {
+    $42 = ((($37)) + 12|0);
+    $43 = HEAP32[$42>>2]|0;
+    $44 = $43;
+   }
+   $len = $44;
+   $45 = $len;
+   $46 = $size;
+   $47 = (($46) + ($45))|0;
+   $size = $47;
+   break;
+  }
+  case 6:  {
+   $48 = $0;
+   $49 = $pool_no;
+   $50 = $1;
+   $51 = ((($50)) + 12|0);
+   $52 = HEAP32[$51>>2]|0;
+   $53 = (($52) + ($49<<3)|0);
+   ;HEAP32[$$byval_copy1>>2]=HEAP32[$53>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$53+4>>2]|0;
+   _mrb_float_to_str($3,$48,$$byval_copy1,54146);
+   ;HEAP32[$str>>2]=HEAP32[$3>>2]|0;HEAP32[$str+4>>2]=HEAP32[$3+4>>2]|0;
+   $54 = HEAP32[$str>>2]|0;
+   $55 = HEAP32[$54>>2]|0;
+   $56 = $55 >>> 11;
+   $57 = $56 & 8;
+   $58 = ($57|0)!=(0);
+   $59 = HEAP32[$str>>2]|0;
+   if ($58) {
+    $60 = HEAP32[$59>>2]|0;
+    $61 = $60 >>> 11;
+    $62 = $61 & 496;
+    $63 = $62 >> 4;
+    $66 = $63;
+   } else {
+    $64 = ((($59)) + 12|0);
+    $65 = HEAP32[$64>>2]|0;
+    $66 = $65;
+   }
+   $len1 = $66;
+   $67 = $len1;
+   $68 = $size;
+   $69 = (($68) + ($67))|0;
+   $size = $69;
+   break;
+  }
+  case 16:  {
+   $70 = $pool_no;
+   $71 = $1;
+   $72 = ((($71)) + 12|0);
+   $73 = HEAP32[$72>>2]|0;
+   $74 = (($73) + ($70<<3)|0);
+   $75 = HEAP32[$74>>2]|0;
+   $76 = HEAP32[$75>>2]|0;
+   $77 = $76 >>> 11;
+   $78 = $77 & 8;
+   $79 = ($78|0)!=(0);
+   $80 = $pool_no;
+   $81 = $1;
+   $82 = ((($81)) + 12|0);
+   $83 = HEAP32[$82>>2]|0;
+   $84 = (($83) + ($80<<3)|0);
+   $85 = HEAP32[$84>>2]|0;
+   if ($79) {
+    $86 = HEAP32[$85>>2]|0;
+    $87 = $86 >>> 11;
+    $88 = $87 & 496;
+    $89 = $88 >> 4;
+    $92 = $89;
+   } else {
+    $90 = ((($85)) + 12|0);
+    $91 = HEAP32[$90>>2]|0;
+    $92 = $91;
+   }
+   $len2 = $92;
+   $93 = $len2;
+   $94 = $size;
+   $95 = (($94) + ($93))|0;
+   $size = $95;
+   break;
+  }
+  default: {
+  }
+  }
+  $96 = $0;
+  $97 = $ai;
+  _mrb_gc_arena_restore($96,$97);
+  $98 = $pool_no;
+  $99 = (($98) + 1)|0;
+  $pool_no = $99;
+ }
+ $100 = $size;
+ STACKTOP = sp;return ($100|0);
+}
+function _get_syms_block_size($mrb,$irep) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $len = 0, $size = 0, $sym_no = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $len = sp;
+ $0 = $mrb;
+ $1 = $irep;
+ $size = 0;
+ $2 = $size;
+ $3 = (($2) + 4)|0;
+ $size = $3;
+ $sym_no = 0;
+ while(1) {
+  $4 = $sym_no;
+  $5 = $1;
+  $6 = ((($5)) + 48|0);
+  $7 = HEAP32[$6>>2]|0;
+  $8 = ($4>>>0)<($7>>>0);
+  $9 = $size;
+  if (!($8)) {
+   break;
+  }
+  $10 = (($9) + 2)|0;
+  $size = $10;
+  $11 = $sym_no;
+  $12 = $1;
+  $13 = ((($12)) + 16|0);
+  $14 = HEAP32[$13>>2]|0;
+  $15 = (($14) + ($11<<2)|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = ($16|0)!=(0);
+  if ($17) {
+   $18 = $0;
+   $19 = $sym_no;
+   $20 = $1;
+   $21 = ((($20)) + 16|0);
+   $22 = HEAP32[$21>>2]|0;
+   $23 = (($22) + ($19<<2)|0);
+   $24 = HEAP32[$23>>2]|0;
+   (_mrb_sym2name_len($18,$24,$len)|0);
+   $25 = HEAP32[$len>>2]|0;
+   $26 = (($25) + 1)|0;
+   $27 = $size;
+   $28 = (($27) + ($26))|0;
+   $size = $28;
+  }
+  $29 = $sym_no;
+  $30 = (($29) + 1)|0;
+  $sym_no = $30;
+ }
+ STACKTOP = sp;return ($9|0);
+}
+function _get_filename_table_size($mrb,$irep,$fp,$lp) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $fp = $fp|0;
+ $lp = $lp|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
+ var $81 = 0, $9 = 0, $di = 0, $file = 0, $filename_len = 0, $filenames = 0, $i = 0, $size = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $filename_len = sp;
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $fp;
+ $3 = $lp;
+ $4 = $2;
+ $5 = HEAP32[$4>>2]|0;
+ $filenames = $5;
+ $size = 0;
+ $6 = $1;
+ $7 = ((($6)) + 36|0);
+ $8 = HEAP32[$7>>2]|0;
+ $di = $8;
+ $i = 0;
+ while(1) {
+  $9 = $i;
+  $10 = $di;
+  $11 = ((($10)) + 4|0);
+  $12 = HEAP16[$11>>1]|0;
+  $13 = $12&65535;
+  $14 = ($9>>>0)<($13>>>0);
+  if (!($14)) {
+   break;
+  }
+  $15 = $i;
+  $16 = $di;
+  $17 = ((($16)) + 8|0);
+  $18 = HEAP32[$17>>2]|0;
+  $19 = (($18) + ($15<<2)|0);
+  $20 = HEAP32[$19>>2]|0;
+  $file = $20;
+  $21 = $filenames;
+  $22 = $3;
+  $23 = HEAP16[$22>>1]|0;
+  $24 = $23&65535;
+  $25 = $file;
+  $26 = ((($25)) + 8|0);
+  $27 = HEAP32[$26>>2]|0;
+  $28 = (_find_filename_index($21,$24,$27)|0);
+  $29 = ($28|0)==(-1);
+  if ($29) {
+   $30 = $3;
+   $31 = HEAP16[$30>>1]|0;
+   $32 = $31&65535;
+   $33 = (($32) + 1)|0;
+   $34 = $33&65535;
+   HEAP16[$30>>1] = $34;
+   $35 = $0;
+   $36 = $filenames;
+   $37 = $3;
+   $38 = HEAP16[$37>>1]|0;
+   $39 = $38&65535;
+   $40 = $39<<2;
+   $41 = (_mrb_realloc($35,$36,$40)|0);
+   $filenames = $41;
+   $42 = $2;
+   HEAP32[$42>>2] = $41;
+   $43 = $file;
+   $44 = ((($43)) + 8|0);
+   $45 = HEAP32[$44>>2]|0;
+   $46 = $3;
+   $47 = HEAP16[$46>>1]|0;
+   $48 = $47&65535;
+   $49 = (($48) - 1)|0;
+   $50 = $filenames;
+   $51 = (($50) + ($49<<2)|0);
+   HEAP32[$51>>2] = $45;
+   $52 = $0;
+   $53 = $file;
+   $54 = ((($53)) + 8|0);
+   $55 = HEAP32[$54>>2]|0;
+   (_mrb_sym2name_len($52,$55,$filename_len)|0);
+   $56 = HEAP32[$filename_len>>2]|0;
+   $57 = (2 + ($56))|0;
+   $58 = $size;
+   $59 = (($58) + ($57))|0;
+   $size = $59;
+  }
+  $60 = $i;
+  $61 = (($60) + 1)|0;
+  $i = $61;
+ }
+ $i = 0;
+ while(1) {
+  $62 = $i;
+  $63 = $1;
+  $64 = ((($63)) + 52|0);
+  $65 = HEAP32[$64>>2]|0;
+  $66 = ($62>>>0)<($65>>>0);
+  if (!($66)) {
+   break;
+  }
+  $67 = $0;
+  $68 = $i;
+  $69 = $1;
+  $70 = ((($69)) + 20|0);
+  $71 = HEAP32[$70>>2]|0;
+  $72 = (($71) + ($68<<2)|0);
+  $73 = HEAP32[$72>>2]|0;
+  $74 = $2;
+  $75 = $3;
+  $76 = (_get_filename_table_size($67,$73,$74,$75)|0);
+  $77 = $size;
+  $78 = (($77) + ($76))|0;
+  $size = $78;
+  $79 = $i;
+  $80 = (($79) + 1)|0;
+  $i = $80;
+ }
+ $81 = $size;
+ STACKTOP = sp;return ($81|0);
+}
+function _find_filename_index($ary,$ary_len,$s) {
+ $ary = $ary|0;
+ $ary_len = $ary_len|0;
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $ary;
+ $2 = $ary_len;
+ $3 = $s;
+ $i = 0;
+ while(1) {
+  $4 = $i;
+  $5 = $2;
+  $6 = ($4|0)<($5|0);
+  if (!($6)) {
+   label = 6;
+   break;
+  }
+  $7 = $i;
+  $8 = $1;
+  $9 = (($8) + ($7<<2)|0);
+  $10 = HEAP32[$9>>2]|0;
+  $11 = $3;
+  $12 = ($10|0)==($11|0);
+  $13 = $i;
+  if ($12) {
+   label = 4;
+   break;
+  }
+  $14 = (($13) + 1)|0;
+  $i = $14;
+ }
+ if ((label|0) == 4) {
+  $0 = $13;
+  $15 = $0;
+  STACKTOP = sp;return ($15|0);
+ }
+ else if ((label|0) == 6) {
+  $0 = -1;
+  $15 = $0;
+  STACKTOP = sp;return ($15|0);
+ }
+ return (0)|0;
+}
+function _get_debug_record_size($mrb,$irep) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $7 = 0, $8 = 0, $9 = 0, $f_idx = 0, $file = 0, $i = 0, $ret = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $ret = 0;
+ $2 = $ret;
+ $3 = (($2) + 4)|0;
+ $ret = $3;
+ $4 = $ret;
+ $5 = (($4) + 2)|0;
+ $ret = $5;
+ $f_idx = 0;
+ while(1) {
+  $6 = $f_idx;
+  $7 = $6&65535;
+  $8 = $1;
+  $9 = ((($8)) + 36|0);
+  $10 = HEAP32[$9>>2]|0;
+  $11 = ((($10)) + 4|0);
+  $12 = HEAP16[$11>>1]|0;
+  $13 = $12&65535;
+  $14 = ($7|0)<($13|0);
+  if (!($14)) {
+   break;
+  }
+  $15 = $f_idx;
+  $16 = $15&65535;
+  $17 = $1;
+  $18 = ((($17)) + 36|0);
+  $19 = HEAP32[$18>>2]|0;
+  $20 = ((($19)) + 8|0);
+  $21 = HEAP32[$20>>2]|0;
+  $22 = (($21) + ($16<<2)|0);
+  $23 = HEAP32[$22>>2]|0;
+  $file = $23;
+  $24 = $ret;
+  $25 = (($24) + 4)|0;
+  $ret = $25;
+  $26 = $ret;
+  $27 = (($26) + 2)|0;
+  $ret = $27;
+  $28 = $ret;
+  $29 = (($28) + 4)|0;
+  $ret = $29;
+  $30 = $ret;
+  $31 = (($30) + 1)|0;
+  $ret = $31;
+  $32 = $file;
+  $33 = ((($32)) + 16|0);
+  $34 = HEAP32[$33>>2]|0;
+  switch ($34|0) {
+  case 0:  {
+   $35 = $file;
+   $36 = ((($35)) + 12|0);
+   $37 = HEAP32[$36>>2]|0;
+   $38 = $37<<1;
+   $39 = $ret;
+   $40 = (($39) + ($38))|0;
+   $ret = $40;
+   break;
+  }
+  case 1:  {
+   $41 = $file;
+   $42 = ((($41)) + 12|0);
+   $43 = HEAP32[$42>>2]|0;
+   $44 = ($43*6)|0;
+   $45 = $ret;
+   $46 = (($45) + ($44))|0;
+   $ret = $46;
+   break;
+  }
+  default: {
+  }
+  }
+  $47 = $f_idx;
+  $48 = (($47) + 1)<<16>>16;
+  $f_idx = $48;
+ }
+ $i = 0;
+ while(1) {
+  $49 = $i;
+  $50 = $1;
+  $51 = ((($50)) + 52|0);
+  $52 = HEAP32[$51>>2]|0;
+  $53 = ($49>>>0)<($52>>>0);
+  if (!($53)) {
+   break;
+  }
+  $54 = $0;
+  $55 = $i;
+  $56 = $1;
+  $57 = ((($56)) + 20|0);
+  $58 = HEAP32[$57>>2]|0;
+  $59 = (($58) + ($55<<2)|0);
+  $60 = HEAP32[$59>>2]|0;
+  $61 = (_get_debug_record_size($54,$60)|0);
+  $62 = $ret;
+  $63 = (($62) + ($61))|0;
+  $ret = $63;
+  $64 = $i;
+  $65 = (($64) + 1)|0;
+  $i = $65;
+ }
+ $66 = $ret;
+ STACKTOP = sp;return ($66|0);
+}
+function _get_lineno_record_size($mrb,$irep) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $size = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $size = 0;
+ $2 = $size;
+ $3 = (($2) + 4)|0;
+ $size = $3;
+ $4 = $size;
+ $5 = (($4) + 2)|0;
+ $size = $5;
+ $6 = $1;
+ $7 = ((($6)) + 28|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ($8|0)!=(0|0);
+ if ($9) {
+  $10 = $1;
+  $11 = ((($10)) + 28|0);
+  $12 = HEAP32[$11>>2]|0;
+  $13 = (_strlen($12)|0);
+  $14 = $size;
+  $15 = (($14) + ($13))|0;
+  $size = $15;
+ }
+ $16 = $size;
+ $17 = (($16) + 4)|0;
+ $size = $17;
+ $18 = $1;
+ $19 = ((($18)) + 32|0);
+ $20 = HEAP32[$19>>2]|0;
+ $21 = ($20|0)!=(0|0);
+ if (!($21)) {
+  $28 = $size;
+  STACKTOP = sp;return ($28|0);
+ }
+ $22 = $1;
+ $23 = ((($22)) + 40|0);
+ $24 = HEAP32[$23>>2]|0;
+ $25 = $24<<1;
+ $26 = $size;
+ $27 = (($26) + ($25))|0;
+ $size = $27;
+ $28 = $size;
+ STACKTOP = sp;return ($28|0);
+}
+function _create_lv_sym_table($mrb,$irep,$syms,$syms_len) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $syms = $syms|0;
+ $syms_len = $syms_len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $name = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $syms;
+ $3 = $syms_len;
+ $4 = $2;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ($5|0)==(0|0);
+ if ($6) {
+  $7 = $0;
+  $8 = (_mrb_malloc($7,4)|0);
+  $9 = $2;
+  HEAP32[$9>>2] = $8;
+ }
+ $i = 0;
+ while(1) {
+  $10 = $i;
+  $11 = (($10) + 1)|0;
+  $12 = $1;
+  $13 = HEAP16[$12>>1]|0;
+  $14 = $13&65535;
+  $15 = ($11>>>0)<($14>>>0);
+  if (!($15)) {
+   break;
+  }
+  $16 = $i;
+  $17 = $1;
+  $18 = ((($17)) + 24|0);
+  $19 = HEAP32[$18>>2]|0;
+  $20 = (($19) + ($16<<3)|0);
+  $21 = HEAP32[$20>>2]|0;
+  $name = $21;
+  $22 = $name;
+  $23 = ($22|0)==(0);
+  if (!($23)) {
+   $24 = $2;
+   $25 = HEAP32[$24>>2]|0;
+   $26 = $3;
+   $27 = HEAP32[$26>>2]|0;
+   $28 = $name;
+   $29 = (_find_filename_index($25,$27,$28)|0);
+   $30 = ($29|0)!=(-1);
+   if (!($30)) {
+    $31 = $3;
+    $32 = HEAP32[$31>>2]|0;
+    $33 = (($32) + 1)|0;
+    HEAP32[$31>>2] = $33;
+    $34 = $0;
+    $35 = $2;
+    $36 = HEAP32[$35>>2]|0;
+    $37 = $3;
+    $38 = HEAP32[$37>>2]|0;
+    $39 = $38<<2;
+    $40 = (_mrb_realloc($34,$36,$39)|0);
+    $41 = $2;
+    HEAP32[$41>>2] = $40;
+    $42 = $name;
+    $43 = $3;
+    $44 = HEAP32[$43>>2]|0;
+    $45 = (($44) - 1)|0;
+    $46 = $2;
+    $47 = HEAP32[$46>>2]|0;
+    $48 = (($47) + ($45<<2)|0);
+    HEAP32[$48>>2] = $42;
+   }
+  }
+  $49 = $i;
+  $50 = (($49) + 1)|0;
+  $i = $50;
+ }
+ $i = 0;
+ while(1) {
+  $51 = $i;
+  $52 = $1;
+  $53 = ((($52)) + 52|0);
+  $54 = HEAP32[$53>>2]|0;
+  $55 = ($51>>>0)<($54>>>0);
+  if (!($55)) {
+   break;
+  }
+  $56 = $0;
+  $57 = $i;
+  $58 = $1;
+  $59 = ((($58)) + 20|0);
+  $60 = HEAP32[$59>>2]|0;
+  $61 = (($60) + ($57<<2)|0);
+  $62 = HEAP32[$61>>2]|0;
+  $63 = $2;
+  $64 = $3;
+  _create_lv_sym_table($56,$62,$63,$64);
+  $65 = $i;
+  $66 = (($65) + 1)|0;
+  $i = $66;
+ }
+ STACKTOP = sp;return;
+}
+function _get_lv_section_size($mrb,$irep,$syms,$syms_len) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $syms = $syms|0;
+ $syms_len = $syms_len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $ret = 0, $str_len = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str_len = sp;
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $syms;
+ $3 = $syms_len;
+ $ret = 0;
+ $4 = $ret;
+ $5 = (($4) + 4)|0;
+ $ret = $5;
+ $6 = $3;
+ $7 = $6<<1;
+ $8 = $ret;
+ $9 = (($8) + ($7))|0;
+ $ret = $9;
+ $i = 0;
+ while(1) {
+  $10 = $i;
+  $11 = $3;
+  $12 = ($10>>>0)<($11>>>0);
+  $13 = $0;
+  if (!($12)) {
+   break;
+  }
+  $14 = $i;
+  $15 = $2;
+  $16 = (($15) + ($14<<2)|0);
+  $17 = HEAP32[$16>>2]|0;
+  (_mrb_sym2name_len($13,$17,$str_len)|0);
+  $18 = HEAP32[$str_len>>2]|0;
+  $19 = $ret;
+  $20 = (($19) + ($18))|0;
+  $ret = $20;
+  $21 = $i;
+  $22 = (($21) + 1)|0;
+  $i = $22;
+ }
+ $23 = $1;
+ $24 = (_get_lv_record_size($13,$23)|0);
+ $25 = $ret;
+ $26 = (($25) + ($24))|0;
+ $ret = $26;
+ $27 = $ret;
+ STACKTOP = sp;return ($27|0);
+}
+function _get_lv_record_size($mrb,$irep) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $ret = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $ret = 0;
+ $2 = $1;
+ $3 = HEAP16[$2>>1]|0;
+ $4 = $3&65535;
+ $5 = (($4) - 1)|0;
+ $6 = $5<<2;
+ $7 = $ret;
+ $8 = (($7) + ($6))|0;
+ $ret = $8;
+ $i = 0;
+ while(1) {
+  $9 = $i;
+  $10 = $1;
+  $11 = ((($10)) + 52|0);
+  $12 = HEAP32[$11>>2]|0;
+  $13 = ($9>>>0)<($12>>>0);
+  if (!($13)) {
+   break;
+  }
+  $14 = $0;
+  $15 = $i;
+  $16 = $1;
+  $17 = ((($16)) + 20|0);
+  $18 = HEAP32[$17>>2]|0;
+  $19 = (($18) + ($15<<2)|0);
+  $20 = HEAP32[$19>>2]|0;
+  $21 = (_get_lv_record_size($14,$20)|0);
+  $22 = $ret;
+  $23 = (($22) + ($21))|0;
+  $ret = $23;
+  $24 = $i;
+  $25 = (($24) + 1)|0;
+  $i = $25;
+ }
+ $26 = $ret;
+ STACKTOP = sp;return ($26|0);
+}
+function _write_section_irep($mrb,$irep,$bin,$len_p,$flags) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $bin = $bin|0;
+ $len_p = $len_p|0;
+ $flags = $flags|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cur = 0, $or$cond = 0, $result = 0, $rsize = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $rsize = sp + 4|0;
+ $1 = $mrb;
+ $2 = $irep;
+ $3 = $bin;
+ $4 = $len_p;
+ $5 = $flags;
+ HEAP32[$rsize>>2] = 0;
+ $6 = $3;
+ $cur = $6;
+ $7 = $1;
+ $8 = ($7|0)==(0|0);
+ $9 = $3;
+ $10 = ($9|0)==(0|0);
+ $or$cond = $8 | $10;
+ if ($or$cond) {
+  $0 = -7;
+  $33 = $0;
+  STACKTOP = sp;return ($33|0);
+ }
+ $11 = $cur;
+ $12 = ((($11)) + 12|0);
+ $cur = $12;
+ $13 = $1;
+ $14 = $2;
+ $15 = $cur;
+ $16 = $5;
+ $17 = (_write_irep_record($13,$14,$15,$rsize,$16)|0);
+ $result = $17;
+ $18 = $result;
+ $19 = ($18|0)!=(0);
+ if ($19) {
+  $20 = $result;
+  $0 = $20;
+  $33 = $0;
+  STACKTOP = sp;return ($33|0);
+ } else {
+  $21 = $cur;
+  $22 = $3;
+  $23 = $21;
+  $24 = $22;
+  $25 = (($23) - ($24))|0;
+  $26 = HEAP32[$rsize>>2]|0;
+  $27 = (($25) + ($26))|0;
+  $28 = $4;
+  HEAP32[$28>>2] = $27;
+  $29 = $1;
+  $30 = $4;
+  $31 = HEAP32[$30>>2]|0;
+  $32 = $3;
+  (_write_section_irep_header($29,$31,$32)|0);
+  $0 = 0;
+  $33 = $0;
+  STACKTOP = sp;return ($33|0);
+ }
+ return (0)|0;
+}
+function _write_irep_record($mrb,$irep,$bin,$irep_record_size,$flags) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $bin = $bin|0;
+ $irep_record_size = $irep_record_size|0;
+ $flags = $flags|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $8 = 0, $9 = 0, $i = 0, $result = 0, $rsize = 0, $src = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $rsize = sp;
+ $1 = $mrb;
+ $2 = $irep;
+ $3 = $bin;
+ $4 = $irep_record_size;
+ $5 = $flags;
+ $6 = $3;
+ $src = $6;
+ $7 = $2;
+ $8 = ($7|0)==(0|0);
+ if ($8) {
+  $0 = -6;
+  $70 = $0;
+  STACKTOP = sp;return ($70|0);
+ }
+ $9 = $1;
+ $10 = $2;
+ $11 = (_get_irep_record_size_1($9,$10)|0);
+ $12 = $4;
+ HEAP32[$12>>2] = $11;
+ $13 = $4;
+ $14 = HEAP32[$13>>2]|0;
+ $15 = ($14|0)==(0);
+ if ($15) {
+  $0 = -1;
+  $70 = $0;
+  STACKTOP = sp;return ($70|0);
+ }
+ $16 = $1;
+ $17 = $2;
+ $18 = $3;
+ $19 = (_write_irep_header($16,$17,$18)|0);
+ $20 = $3;
+ $21 = (($20) + ($19)|0);
+ $3 = $21;
+ $22 = $1;
+ $23 = $2;
+ $24 = $3;
+ $25 = $5;
+ $26 = (_write_iseq_block($22,$23,$24,$25)|0);
+ $27 = $3;
+ $28 = (($27) + ($26)|0);
+ $3 = $28;
+ $29 = $1;
+ $30 = $2;
+ $31 = $3;
+ $32 = (_write_pool_block($29,$30,$31)|0);
+ $33 = $3;
+ $34 = (($33) + ($32)|0);
+ $3 = $34;
+ $35 = $1;
+ $36 = $2;
+ $37 = $3;
+ $38 = (_write_syms_block($35,$36,$37)|0);
+ $39 = $3;
+ $40 = (($39) + ($38)|0);
+ $3 = $40;
+ $i = 0;
+ while(1) {
+  $41 = $i;
+  $42 = $2;
+  $43 = ((($42)) + 52|0);
+  $44 = HEAP32[$43>>2]|0;
+  $45 = ($41>>>0)<($44>>>0);
+  if (!($45)) {
+   label = 10;
+   break;
+  }
+  $46 = $1;
+  $47 = $i;
+  $48 = $2;
+  $49 = ((($48)) + 20|0);
+  $50 = HEAP32[$49>>2]|0;
+  $51 = (($50) + ($47<<2)|0);
+  $52 = HEAP32[$51>>2]|0;
+  $53 = $3;
+  $54 = $5;
+  $55 = (_write_irep_record($46,$52,$53,$rsize,$54)|0);
+  $result = $55;
+  $56 = $result;
+  $57 = ($56|0)!=(0);
+  if ($57) {
+   label = 8;
+   break;
+  }
+  $59 = HEAP32[$rsize>>2]|0;
+  $60 = $3;
+  $61 = (($60) + ($59)|0);
+  $3 = $61;
+  $62 = $i;
+  $63 = (($62) + 1)|0;
+  $i = $63;
+ }
+ if ((label|0) == 8) {
+  $58 = $result;
+  $0 = $58;
+  $70 = $0;
+  STACKTOP = sp;return ($70|0);
+ }
+ else if ((label|0) == 10) {
+  $64 = $3;
+  $65 = $src;
+  $66 = $64;
+  $67 = $65;
+  $68 = (($66) - ($67))|0;
+  $69 = $4;
+  HEAP32[$69>>2] = $68;
+  $0 = 0;
+  $70 = $0;
+  STACKTOP = sp;return ($70|0);
+ }
+ return (0)|0;
+}
+function _write_irep_header($mrb,$irep,$buf) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $buf = $buf|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cur = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $buf;
+ $3 = $2;
+ $cur = $3;
+ $4 = $0;
+ $5 = $1;
+ $6 = (_get_irep_record_size_1($4,$5)|0);
+ $7 = $cur;
+ $8 = (_uint32_to_bin($6,$7)|0);
+ $9 = $cur;
+ $10 = (($9) + ($8)|0);
+ $cur = $10;
+ $11 = $1;
+ $12 = HEAP16[$11>>1]|0;
+ $13 = $cur;
+ $14 = (_uint16_to_bin($12,$13)|0);
+ $15 = $cur;
+ $16 = (($15) + ($14)|0);
+ $cur = $16;
+ $17 = $1;
+ $18 = ((($17)) + 2|0);
+ $19 = HEAP16[$18>>1]|0;
+ $20 = $cur;
+ $21 = (_uint16_to_bin($19,$20)|0);
+ $22 = $cur;
+ $23 = (($22) + ($21)|0);
+ $cur = $23;
+ $24 = $1;
+ $25 = ((($24)) + 52|0);
+ $26 = HEAP32[$25>>2]|0;
+ $27 = $26&65535;
+ $28 = $cur;
+ $29 = (_uint16_to_bin($27,$28)|0);
+ $30 = $cur;
+ $31 = (($30) + ($29)|0);
+ $cur = $31;
+ $32 = $cur;
+ $33 = $2;
+ $34 = $32;
+ $35 = $33;
+ $36 = (($34) - ($35))|0;
+ STACKTOP = sp;return ($36|0);
+}
+function _uint32_to_bin($l,$bin) {
+ $l = $l|0;
+ $bin = $bin|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0;
+ var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $l;
+ $1 = $bin;
+ $2 = $0;
+ $3 = $2 >>> 24;
+ $4 = $3 & 255;
+ $5 = $4&255;
+ $6 = $1;
+ $7 = ((($6)) + 1|0);
+ $1 = $7;
+ HEAP8[$6>>0] = $5;
+ $8 = $0;
+ $9 = $8 >>> 16;
+ $10 = $9 & 255;
+ $11 = $10&255;
+ $12 = $1;
+ $13 = ((($12)) + 1|0);
+ $1 = $13;
+ HEAP8[$12>>0] = $11;
+ $14 = $0;
+ $15 = $14 >>> 8;
+ $16 = $15 & 255;
+ $17 = $16&255;
+ $18 = $1;
+ $19 = ((($18)) + 1|0);
+ $1 = $19;
+ HEAP8[$18>>0] = $17;
+ $20 = $0;
+ $21 = $20 & 255;
+ $22 = $21&255;
+ $23 = $1;
+ HEAP8[$23>>0] = $22;
+ STACKTOP = sp;return 4;
+}
+function _uint16_to_bin($s,$bin) {
+ $s = $s|0;
+ $bin = $bin|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $bin;
+ $2 = $0;
+ $3 = $2&65535;
+ $4 = $3 >> 8;
+ $5 = $4 & 255;
+ $6 = $5&255;
+ $7 = $1;
+ $8 = ((($7)) + 1|0);
+ $1 = $8;
+ HEAP8[$7>>0] = $6;
+ $9 = $0;
+ $10 = $9&65535;
+ $11 = $10 & 255;
+ $12 = $11&255;
+ $13 = $1;
+ HEAP8[$13>>0] = $12;
+ STACKTOP = sp;return 2;
+}
+function _write_iseq_block($mrb,$irep,$buf,$flags) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $buf = $buf|0;
+ $flags = $flags|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $8 = 0, $9 = 0, $cur = 0, $iseq_no = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $buf;
+ $3 = $flags;
+ $4 = $2;
+ $cur = $4;
+ $5 = $1;
+ $6 = ((($5)) + 40|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $cur;
+ $9 = (_uint32_to_bin($7,$8)|0);
+ $10 = $cur;
+ $11 = (($10) + ($9)|0);
+ $cur = $11;
+ $12 = $cur;
+ $13 = (_write_padding($12)|0);
+ $14 = $cur;
+ $15 = (($14) + ($13)|0);
+ $cur = $15;
+ $16 = $3;
+ $17 = $16&255;
+ $18 = $17 & 6;
+ switch ($18|0) {
+ case 2:  {
+  $19 = (_bigendian_p_2()|0);
+  $20 = ($19|0)!=(0);
+  if (!($20)) {
+   $iseq_no = 0;
+   while(1) {
+    $21 = $iseq_no;
+    $22 = $1;
+    $23 = ((($22)) + 40|0);
+    $24 = HEAP32[$23>>2]|0;
+    $25 = ($21>>>0)<($24>>>0);
+    if (!($25)) {
+     break;
+    }
+    $26 = $iseq_no;
+    $27 = $1;
+    $28 = ((($27)) + 8|0);
+    $29 = HEAP32[$28>>2]|0;
+    $30 = (($29) + ($26<<2)|0);
+    $31 = HEAP32[$30>>2]|0;
+    $32 = $cur;
+    $33 = (_uint32_to_bin($31,$32)|0);
+    $34 = $cur;
+    $35 = (($34) + ($33)|0);
+    $cur = $35;
+    $36 = $iseq_no;
+    $37 = (($36) + 1)|0;
+    $iseq_no = $37;
+   }
+   $71 = $cur;
+   $72 = $2;
+   $73 = $71;
+   $74 = $72;
+   $75 = (($73) - ($74))|0;
+   STACKTOP = sp;return ($75|0);
+  }
+  break;
+ }
+ case 4:  {
+  $38 = (_bigendian_p_2()|0);
+  $39 = ($38|0)!=(0);
+  if ($39) {
+   $iseq_no = 0;
+   while(1) {
+    $40 = $iseq_no;
+    $41 = $1;
+    $42 = ((($41)) + 40|0);
+    $43 = HEAP32[$42>>2]|0;
+    $44 = ($40>>>0)<($43>>>0);
+    if (!($44)) {
+     break;
+    }
+    $45 = $iseq_no;
+    $46 = $1;
+    $47 = ((($46)) + 8|0);
+    $48 = HEAP32[$47>>2]|0;
+    $49 = (($48) + ($45<<2)|0);
+    $50 = HEAP32[$49>>2]|0;
+    $51 = $cur;
+    $52 = (_uint32l_to_bin($50,$51)|0);
+    $53 = $cur;
+    $54 = (($53) + ($52)|0);
+    $cur = $54;
+    $55 = $iseq_no;
+    $56 = (($55) + 1)|0;
+    $iseq_no = $56;
+   }
+   $71 = $cur;
+   $72 = $2;
+   $73 = $71;
+   $74 = $72;
+   $75 = (($73) - ($74))|0;
+   STACKTOP = sp;return ($75|0);
+  }
+  break;
+ }
+ case 6:  {
+  break;
+ }
+ default: {
+  $71 = $cur;
+  $72 = $2;
+  $73 = $71;
+  $74 = $72;
+  $75 = (($73) - ($74))|0;
+  STACKTOP = sp;return ($75|0);
+ }
+ }
+ $57 = $cur;
+ $58 = $1;
+ $59 = ((($58)) + 8|0);
+ $60 = HEAP32[$59>>2]|0;
+ $61 = $1;
+ $62 = ((($61)) + 40|0);
+ $63 = HEAP32[$62>>2]|0;
+ $64 = $63<<2;
+ _memcpy(($57|0),($60|0),($64|0))|0;
+ $65 = $1;
+ $66 = ((($65)) + 40|0);
+ $67 = HEAP32[$66>>2]|0;
+ $68 = $67<<2;
+ $69 = $cur;
+ $70 = (($69) + ($68)|0);
+ $cur = $70;
+ $71 = $cur;
+ $72 = $2;
+ $73 = $71;
+ $74 = $72;
+ $75 = (($73) - ($74))|0;
+ STACKTOP = sp;return ($75|0);
+}
+function _write_padding($buf) {
+ $buf = $buf|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $align = 0, $pad_len = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $buf;
+ $align = 4;
+ $1 = $0;
+ $2 = $1;
+ $3 = (0 - ($2))|0;
+ $4 = $3 & 3;
+ $pad_len = $4;
+ $5 = $pad_len;
+ $6 = ($5>>>0)>(0);
+ if ($6) {
+  $7 = $0;
+  $8 = $pad_len;
+  _memset(($7|0),0,($8|0))|0;
+ }
+ $9 = $pad_len;
+ STACKTOP = sp;return ($9|0);
+}
+function _bigendian_p_2() {
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $i = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $i = sp + 4|0;
+ HEAP32[$i>>2] = 1;
+ $p = $i;
+ $0 = $p;
+ $1 = HEAP8[$0>>0]|0;
+ $2 = $1 << 24 >> 24;
+ $3 = ($2|0)!=(0);
+ $4 = $3 ? 0 : 1;
+ STACKTOP = sp;return ($4|0);
+}
+function _uint32l_to_bin($l,$bin) {
+ $l = $l|0;
+ $bin = $bin|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0;
+ var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $l;
+ $1 = $bin;
+ $2 = $0;
+ $3 = $2 >>> 24;
+ $4 = $3 & 255;
+ $5 = $4&255;
+ $6 = $1;
+ $7 = ((($6)) + 3|0);
+ HEAP8[$7>>0] = $5;
+ $8 = $0;
+ $9 = $8 >>> 16;
+ $10 = $9 & 255;
+ $11 = $10&255;
+ $12 = $1;
+ $13 = ((($12)) + 2|0);
+ HEAP8[$13>>0] = $11;
+ $14 = $0;
+ $15 = $14 >>> 8;
+ $16 = $15 & 255;
+ $17 = $16&255;
+ $18 = $1;
+ $19 = ((($18)) + 1|0);
+ HEAP8[$19>>0] = $17;
+ $20 = $0;
+ $21 = $20 & 255;
+ $22 = $21&255;
+ $23 = $1;
+ HEAP8[$23>>0] = $22;
+ STACKTOP = sp;return 4;
+}
+function _write_pool_block($mrb,$irep,$buf) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $buf = $buf|0;
+ var $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0;
+ var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0;
+ var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0;
+ var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0;
+ var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0;
+ var $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $ai = 0, $char_ptr = 0, $cur = 0, $len = 0, $pool_no = 0, $str = 0, $tlen = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy1 = sp + 72|0;
+ $$byval_copy = sp + 64|0;
+ $str = sp + 32|0;
+ $3 = sp + 16|0;
+ $4 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $buf;
+ $5 = $2;
+ $cur = $5;
+ $6 = $1;
+ $7 = ((($6)) + 44|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = $cur;
+ $10 = (_uint32_to_bin($8,$9)|0);
+ $11 = $cur;
+ $12 = (($11) + ($10)|0);
+ $cur = $12;
+ $pool_no = 0;
+ while(1) {
+  $13 = $pool_no;
+  $14 = $1;
+  $15 = ((($14)) + 44|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = ($13>>>0)<($16>>>0);
+  if (!($17)) {
+   break;
+  }
+  $18 = $0;
+  $19 = (_mrb_gc_arena_save($18)|0);
+  $ai = $19;
+  $20 = $pool_no;
+  $21 = $1;
+  $22 = ((($21)) + 12|0);
+  $23 = HEAP32[$22>>2]|0;
+  $24 = (($23) + ($20<<3)|0);
+  $25 = ((($24)) + 4|0);
+  $26 = HEAP32[$25>>2]|0;
+  switch ($26|0) {
+  case 3:  {
+   $27 = $cur;
+   $28 = (_uint8_to_bin(1,$27)|0);
+   $29 = $cur;
+   $30 = (($29) + ($28)|0);
+   $cur = $30;
+   $31 = $0;
+   $32 = $pool_no;
+   $33 = $1;
+   $34 = ((($33)) + 12|0);
+   $35 = HEAP32[$34>>2]|0;
+   $36 = (($35) + ($32<<3)|0);
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$36>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$36+4>>2]|0;
+   _mrb_fixnum_to_str($3,$31,$$byval_copy,10);
+   ;HEAP32[$str>>2]=HEAP32[$3>>2]|0;HEAP32[$str+4>>2]=HEAP32[$3+4>>2]|0;
+   label = 7;
+   break;
+  }
+  case 6:  {
+   $37 = $cur;
+   $38 = (_uint8_to_bin(2,$37)|0);
+   $39 = $cur;
+   $40 = (($39) + ($38)|0);
+   $cur = $40;
+   $41 = $0;
+   $42 = $pool_no;
+   $43 = $1;
+   $44 = ((($43)) + 12|0);
+   $45 = HEAP32[$44>>2]|0;
+   $46 = (($45) + ($42<<3)|0);
+   ;HEAP32[$$byval_copy1>>2]=HEAP32[$46>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$46+4>>2]|0;
+   _mrb_float_to_str($4,$41,$$byval_copy1,54146);
+   ;HEAP32[$str>>2]=HEAP32[$4>>2]|0;HEAP32[$str+4>>2]=HEAP32[$4+4>>2]|0;
+   label = 7;
+   break;
+  }
+  case 16:  {
+   $47 = $cur;
+   $48 = (_uint8_to_bin(0,$47)|0);
+   $49 = $cur;
+   $50 = (($49) + ($48)|0);
+   $cur = $50;
+   $51 = $pool_no;
+   $52 = $1;
+   $53 = ((($52)) + 12|0);
+   $54 = HEAP32[$53>>2]|0;
+   $55 = (($54) + ($51<<3)|0);
+   ;HEAP32[$str>>2]=HEAP32[$55>>2]|0;HEAP32[$str+4>>2]=HEAP32[$55+4>>2]|0;
+   label = 7;
+   break;
+  }
+  default: {
+  }
+  }
+  if ((label|0) == 7) {
+   label = 0;
+   $56 = HEAP32[$str>>2]|0;
+   $57 = HEAP32[$56>>2]|0;
+   $58 = $57 >>> 11;
+   $59 = $58 & 8;
+   $60 = ($59|0)!=(0);
+   $61 = HEAP32[$str>>2]|0;
+   $62 = ((($61)) + 12|0);
+   if ($60) {
+    $65 = $62;
+   } else {
+    $63 = ((($62)) + 8|0);
+    $64 = HEAP32[$63>>2]|0;
+    $65 = $64;
+   }
+   $char_ptr = $65;
+   $66 = HEAP32[$str>>2]|0;
+   $67 = HEAP32[$66>>2]|0;
+   $68 = $67 >>> 11;
+   $69 = $68 & 8;
+   $70 = ($69|0)!=(0);
+   $71 = HEAP32[$str>>2]|0;
+   if ($70) {
+    $72 = HEAP32[$71>>2]|0;
+    $73 = $72 >>> 11;
+    $74 = $73 & 496;
+    $75 = $74 >> 4;
+    $78 = $75;
+   } else {
+    $76 = ((($71)) + 12|0);
+    $77 = HEAP32[$76>>2]|0;
+    $78 = $77;
+   }
+   $tlen = $78;
+   $79 = $tlen;
+   $80 = $79&65535;
+   $len = $80;
+   $81 = $len;
+   $82 = $cur;
+   $83 = (_uint16_to_bin($81,$82)|0);
+   $84 = $cur;
+   $85 = (($84) + ($83)|0);
+   $cur = $85;
+   $86 = $cur;
+   $87 = $char_ptr;
+   $88 = $len;
+   $89 = $88&65535;
+   _memcpy(($86|0),($87|0),($89|0))|0;
+   $90 = $len;
+   $91 = $90&65535;
+   $92 = $cur;
+   $93 = (($92) + ($91)|0);
+   $cur = $93;
+   $94 = $0;
+   $95 = $ai;
+   _mrb_gc_arena_restore($94,$95);
+  }
+  $96 = $pool_no;
+  $97 = (($96) + 1)|0;
+  $pool_no = $97;
+ }
+ $98 = $cur;
+ $99 = $2;
+ $100 = $98;
+ $101 = $99;
+ $102 = (($100) - ($101))|0;
+ STACKTOP = sp;return ($102|0);
+}
+function _uint8_to_bin($s,$bin) {
+ $s = $s|0;
+ $bin = $bin|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $bin;
+ $2 = $0;
+ $3 = $1;
+ HEAP8[$3>>0] = $2;
+ STACKTOP = sp;return 1;
+}
+function _write_syms_block($mrb,$irep,$buf) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $buf = $buf|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cur = 0, $len = 0;
+ var $name = 0, $sym_no = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $len = sp;
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $buf;
+ $3 = $2;
+ $cur = $3;
+ $4 = $1;
+ $5 = ((($4)) + 48|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = $cur;
+ $8 = (_uint32_to_bin($6,$7)|0);
+ $9 = $cur;
+ $10 = (($9) + ($8)|0);
+ $cur = $10;
+ $sym_no = 0;
+ while(1) {
+  $11 = $sym_no;
+  $12 = $1;
+  $13 = ((($12)) + 48|0);
+  $14 = HEAP32[$13>>2]|0;
+  $15 = ($11>>>0)<($14>>>0);
+  if (!($15)) {
+   break;
+  }
+  $16 = $sym_no;
+  $17 = $1;
+  $18 = ((($17)) + 16|0);
+  $19 = HEAP32[$18>>2]|0;
+  $20 = (($19) + ($16<<2)|0);
+  $21 = HEAP32[$20>>2]|0;
+  $22 = ($21|0)!=(0);
+  if ($22) {
+   $23 = $0;
+   $24 = $sym_no;
+   $25 = $1;
+   $26 = ((($25)) + 16|0);
+   $27 = HEAP32[$26>>2]|0;
+   $28 = (($27) + ($24<<2)|0);
+   $29 = HEAP32[$28>>2]|0;
+   $30 = (_mrb_sym2name_len($23,$29,$len)|0);
+   $name = $30;
+   $31 = HEAP32[$len>>2]|0;
+   $32 = $31&65535;
+   $33 = $cur;
+   $34 = (_uint16_to_bin($32,$33)|0);
+   $35 = $cur;
+   $36 = (($35) + ($34)|0);
+   $cur = $36;
+   $37 = $cur;
+   $38 = $name;
+   $39 = HEAP32[$len>>2]|0;
+   _memcpy(($37|0),($38|0),($39|0))|0;
+   $40 = HEAP32[$len>>2]|0;
+   $41 = $40&65535;
+   $42 = $41&65535;
+   $43 = $cur;
+   $44 = (($43) + ($42)|0);
+   $cur = $44;
+   $45 = $cur;
+   $46 = ((($45)) + 1|0);
+   $cur = $46;
+   HEAP8[$45>>0] = 0;
+  } else {
+   $47 = $cur;
+   $48 = (_uint16_to_bin(-1,$47)|0);
+   $49 = $cur;
+   $50 = (($49) + ($48)|0);
+   $cur = $50;
+  }
+  $51 = $sym_no;
+  $52 = (($51) + 1)|0;
+  $sym_no = $52;
+ }
+ $53 = $cur;
+ $54 = $2;
+ $55 = $53;
+ $56 = $54;
+ $57 = (($55) - ($56))|0;
+ STACKTOP = sp;return ($57|0);
+}
+function _write_section_irep_header($mrb,$section_size,$bin) {
+ $mrb = $mrb|0;
+ $section_size = $section_size|0;
+ $bin = $bin|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $header = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $section_size;
+ $2 = $bin;
+ $3 = $2;
+ $header = $3;
+ $4 = $header;
+ ;HEAP8[$4>>0]=HEAP8[54151>>0]|0;HEAP8[$4+1>>0]=HEAP8[54151+1>>0]|0;HEAP8[$4+2>>0]=HEAP8[54151+2>>0]|0;HEAP8[$4+3>>0]=HEAP8[54151+3>>0]|0;
+ $5 = $1;
+ $6 = $header;
+ $7 = ((($6)) + 4|0);
+ (_uint32_to_bin($5,$7)|0);
+ $8 = $header;
+ $9 = ((($8)) + 8|0);
+ ;HEAP8[$9>>0]=HEAP8[54156>>0]|0;HEAP8[$9+1>>0]=HEAP8[54156+1>>0]|0;HEAP8[$9+2>>0]=HEAP8[54156+2>>0]|0;HEAP8[$9+3>>0]=HEAP8[54156+3>>0]|0;
+ STACKTOP = sp;return 0;
+}
+function _write_section_debug($mrb,$irep,$cur,$filenames,$filenames_len) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $cur = $cur|0;
+ $filenames = $filenames|0;
+ $filenames_len = $filenames_len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $7 = 0, $8 = 0, $9 = 0, $bin = 0, $dlen = 0, $header = 0, $i = 0, $or$cond = 0, $section_size = 0, $sym = 0, $sym_len = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $sym_len = sp;
+ $1 = $mrb;
+ $2 = $irep;
+ $3 = $cur;
+ $4 = $filenames;
+ $5 = $filenames_len;
+ $section_size = 0;
+ $6 = $3;
+ $bin = $6;
+ $7 = $1;
+ $8 = ($7|0)==(0|0);
+ $9 = $3;
+ $10 = ($9|0)==(0|0);
+ $or$cond = $8 | $10;
+ if ($or$cond) {
+  $0 = -7;
+  $65 = $0;
+  STACKTOP = sp;return ($65|0);
+ }
+ $11 = $bin;
+ $header = $11;
+ $12 = $3;
+ $13 = ((($12)) + 8|0);
+ $3 = $13;
+ $14 = $section_size;
+ $15 = (($14) + 8)|0;
+ $section_size = $15;
+ $16 = $5;
+ $17 = $3;
+ $18 = (_uint16_to_bin($16,$17)|0);
+ $19 = $3;
+ $20 = (($19) + ($18)|0);
+ $3 = $20;
+ $21 = $section_size;
+ $22 = (($21) + 2)|0;
+ $section_size = $22;
+ $i = 0;
+ while(1) {
+  $23 = $i;
+  $24 = $23&65535;
+  $25 = $5;
+  $26 = $25&65535;
+  $27 = ($24|0)<($26|0);
+  $28 = $1;
+  if (!($27)) {
+   break;
+  }
+  $29 = $i;
+  $30 = $29&65535;
+  $31 = $4;
+  $32 = (($31) + ($30<<2)|0);
+  $33 = HEAP32[$32>>2]|0;
+  $34 = (_mrb_sym2name_len($28,$33,$sym_len)|0);
+  $sym = $34;
+  $35 = HEAP32[$sym_len>>2]|0;
+  $36 = $35&65535;
+  $37 = $3;
+  $38 = (_uint16_to_bin($36,$37)|0);
+  $39 = $3;
+  $40 = (($39) + ($38)|0);
+  $3 = $40;
+  $41 = $3;
+  $42 = $sym;
+  $43 = HEAP32[$sym_len>>2]|0;
+  _memcpy(($41|0),($42|0),($43|0))|0;
+  $44 = HEAP32[$sym_len>>2]|0;
+  $45 = $3;
+  $46 = (($45) + ($44)|0);
+  $3 = $46;
+  $47 = HEAP32[$sym_len>>2]|0;
+  $48 = (2 + ($47))|0;
+  $49 = $section_size;
+  $50 = (($49) + ($48))|0;
+  $section_size = $50;
+  $51 = $i;
+  $52 = (($51) + 1)<<16>>16;
+  $i = $52;
+ }
+ $53 = $2;
+ $54 = $3;
+ $55 = $4;
+ $56 = $5;
+ $57 = (_write_debug_record($28,$53,$54,$55,$56)|0);
+ $dlen = $57;
+ $58 = $dlen;
+ $59 = $section_size;
+ $60 = (($59) + ($58))|0;
+ $section_size = $60;
+ $61 = $header;
+ ;HEAP8[$61>>0]=HEAP8[54161>>0]|0;HEAP8[$61+1>>0]=HEAP8[54161+1>>0]|0;HEAP8[$61+2>>0]=HEAP8[54161+2>>0]|0;HEAP8[$61+3>>0]=HEAP8[54161+3>>0]|0;
+ $62 = $section_size;
+ $63 = $header;
+ $64 = ((($63)) + 4|0);
+ (_uint32_to_bin($62,$64)|0);
+ $0 = 0;
+ $65 = $0;
+ STACKTOP = sp;return ($65|0);
+}
+function _write_debug_record($mrb,$irep,$bin,$filenames,$filenames_len) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $bin = $bin|0;
+ $filenames = $filenames|0;
+ $filenames_len = $filenames_len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $irep_no = 0;
+ var $len = 0, $size = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $bin;
+ $3 = $filenames;
+ $4 = $filenames_len;
+ $5 = $0;
+ $6 = $1;
+ $7 = $2;
+ $8 = $3;
+ $9 = $4;
+ $10 = (_write_debug_record_1($5,$6,$7,$8,$9)|0);
+ $len = $10;
+ $size = $10;
+ $11 = $len;
+ $12 = $2;
+ $13 = (($12) + ($11)|0);
+ $2 = $13;
+ $irep_no = 0;
+ while(1) {
+  $14 = $irep_no;
+  $15 = $1;
+  $16 = ((($15)) + 52|0);
+  $17 = HEAP32[$16>>2]|0;
+  $18 = ($14>>>0)<($17>>>0);
+  if (!($18)) {
+   break;
+  }
+  $19 = $0;
+  $20 = $irep_no;
+  $21 = $1;
+  $22 = ((($21)) + 20|0);
+  $23 = HEAP32[$22>>2]|0;
+  $24 = (($23) + ($20<<2)|0);
+  $25 = HEAP32[$24>>2]|0;
+  $26 = $2;
+  $27 = $3;
+  $28 = $4;
+  $29 = (_write_debug_record($19,$25,$26,$27,$28)|0);
+  $len = $29;
+  $30 = $len;
+  $31 = $2;
+  $32 = (($31) + ($30)|0);
+  $2 = $32;
+  $33 = $len;
+  $34 = $size;
+  $35 = (($34) + ($33))|0;
+  $size = $35;
+  $36 = $irep_no;
+  $37 = (($36) + 1)|0;
+  $irep_no = $37;
+ }
+ $38 = $size;
+ STACKTOP = sp;return ($38|0);
+}
+function _write_debug_record_1($mrb,$irep,$bin,$filenames,$filenames_len) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $bin = $bin|0;
+ $filenames = $filenames|0;
+ $filenames_len = $filenames_len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0;
+ var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0;
+ var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0;
+ var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0;
+ var $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0;
+ var $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $cur = 0, $f_idx = 0, $file = 0, $filename_idx = 0, $l = 0, $line = 0, $ret = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $bin;
+ $3 = $filenames;
+ $4 = $filenames_len;
+ $5 = $2;
+ $6 = ((($5)) + 4|0);
+ $cur = $6;
+ $7 = $1;
+ $8 = ((($7)) + 36|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ((($9)) + 4|0);
+ $11 = HEAP16[$10>>1]|0;
+ $12 = $cur;
+ $13 = (_uint16_to_bin($11,$12)|0);
+ $14 = $cur;
+ $15 = (($14) + ($13)|0);
+ $cur = $15;
+ $f_idx = 0;
+ while(1) {
+  $16 = $f_idx;
+  $17 = $16&65535;
+  $18 = $1;
+  $19 = ((($18)) + 36|0);
+  $20 = HEAP32[$19>>2]|0;
+  $21 = ((($20)) + 4|0);
+  $22 = HEAP16[$21>>1]|0;
+  $23 = $22&65535;
+  $24 = ($17|0)<($23|0);
+  if (!($24)) {
+   break;
+  }
+  $25 = $f_idx;
+  $26 = $25&65535;
+  $27 = $1;
+  $28 = ((($27)) + 36|0);
+  $29 = HEAP32[$28>>2]|0;
+  $30 = ((($29)) + 8|0);
+  $31 = HEAP32[$30>>2]|0;
+  $32 = (($31) + ($26<<2)|0);
+  $33 = HEAP32[$32>>2]|0;
+  $file = $33;
+  $34 = $file;
+  $35 = HEAP32[$34>>2]|0;
+  $36 = $cur;
+  $37 = (_uint32_to_bin($35,$36)|0);
+  $38 = $cur;
+  $39 = (($38) + ($37)|0);
+  $cur = $39;
+  $40 = $3;
+  $41 = $4;
+  $42 = $41&65535;
+  $43 = $file;
+  $44 = ((($43)) + 8|0);
+  $45 = HEAP32[$44>>2]|0;
+  $46 = (_find_filename_index($40,$42,$45)|0);
+  $filename_idx = $46;
+  $47 = $filename_idx;
+  $48 = $47&65535;
+  $49 = $cur;
+  $50 = (_uint16_to_bin($48,$49)|0);
+  $51 = $cur;
+  $52 = (($51) + ($50)|0);
+  $cur = $52;
+  $53 = $file;
+  $54 = ((($53)) + 12|0);
+  $55 = HEAP32[$54>>2]|0;
+  $56 = $cur;
+  $57 = (_uint32_to_bin($55,$56)|0);
+  $58 = $cur;
+  $59 = (($58) + ($57)|0);
+  $cur = $59;
+  $60 = $file;
+  $61 = ((($60)) + 16|0);
+  $62 = HEAP32[$61>>2]|0;
+  $63 = $62&255;
+  $64 = $cur;
+  $65 = (_uint8_to_bin($63,$64)|0);
+  $66 = $cur;
+  $67 = (($66) + ($65)|0);
+  $cur = $67;
+  $68 = $file;
+  $69 = ((($68)) + 16|0);
+  $70 = HEAP32[$69>>2]|0;
+  L4: do {
+   switch ($70|0) {
+   case 0:  {
+    $l = 0;
+    while(1) {
+     $71 = $l;
+     $72 = $file;
+     $73 = ((($72)) + 12|0);
+     $74 = HEAP32[$73>>2]|0;
+     $75 = ($71>>>0)<($74>>>0);
+     if (!($75)) {
+      break L4;
+     }
+     $76 = $l;
+     $77 = $file;
+     $78 = ((($77)) + 20|0);
+     $79 = HEAP32[$78>>2]|0;
+     $80 = (($79) + ($76<<1)|0);
+     $81 = HEAP16[$80>>1]|0;
+     $82 = $cur;
+     $83 = (_uint16_to_bin($81,$82)|0);
+     $84 = $cur;
+     $85 = (($84) + ($83)|0);
+     $cur = $85;
+     $86 = $l;
+     $87 = (($86) + 1)|0;
+     $l = $87;
+    }
+    break;
+   }
+   case 1:  {
+    $line = 0;
+    while(1) {
+     $88 = $line;
+     $89 = $file;
+     $90 = ((($89)) + 12|0);
+     $91 = HEAP32[$90>>2]|0;
+     $92 = ($88>>>0)<($91>>>0);
+     if (!($92)) {
+      break L4;
+     }
+     $93 = $line;
+     $94 = $file;
+     $95 = ((($94)) + 20|0);
+     $96 = HEAP32[$95>>2]|0;
+     $97 = (($96) + ($93<<3)|0);
+     $98 = HEAP32[$97>>2]|0;
+     $99 = $cur;
+     $100 = (_uint32_to_bin($98,$99)|0);
+     $101 = $cur;
+     $102 = (($101) + ($100)|0);
+     $cur = $102;
+     $103 = $line;
+     $104 = $file;
+     $105 = ((($104)) + 20|0);
+     $106 = HEAP32[$105>>2]|0;
+     $107 = (($106) + ($103<<3)|0);
+     $108 = ((($107)) + 4|0);
+     $109 = HEAP16[$108>>1]|0;
+     $110 = $cur;
+     $111 = (_uint16_to_bin($109,$110)|0);
+     $112 = $cur;
+     $113 = (($112) + ($111)|0);
+     $cur = $113;
+     $114 = $line;
+     $115 = (($114) + 1)|0;
+     $line = $115;
+    }
+    break;
+   }
+   default: {
+   }
+   }
+  } while(0);
+  $116 = $f_idx;
+  $117 = (($116) + 1)<<16>>16;
+  $f_idx = $117;
+ }
+ $118 = $cur;
+ $119 = $2;
+ $120 = $118;
+ $121 = $119;
+ $122 = (($120) - ($121))|0;
+ $ret = $122;
+ $123 = $ret;
+ $124 = $2;
+ (_uint32_to_bin($123,$124)|0);
+ $125 = $ret;
+ STACKTOP = sp;return ($125|0);
+}
+function _write_section_lineno($mrb,$irep,$bin) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $bin = $bin|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0;
+ var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cur = 0, $or$cond = 0, $rlen = 0, $section_size = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $irep;
+ $3 = $bin;
+ $section_size = 0;
+ $rlen = 0;
+ $4 = $3;
+ $cur = $4;
+ $5 = $1;
+ $6 = ($5|0)==(0|0);
+ $7 = $3;
+ $8 = ($7|0)==(0|0);
+ $or$cond = $6 | $8;
+ if ($or$cond) {
+  $0 = -7;
+  $23 = $0;
+  STACKTOP = sp;return ($23|0);
+ } else {
+  $9 = $cur;
+  $10 = ((($9)) + 8|0);
+  $cur = $10;
+  $11 = $section_size;
+  $12 = (($11) + 8)|0;
+  $section_size = $12;
+  $13 = $1;
+  $14 = $2;
+  $15 = $cur;
+  $16 = (_write_lineno_record($13,$14,$15)|0);
+  $rlen = $16;
+  $17 = $rlen;
+  $18 = $section_size;
+  $19 = (($18) + ($17))|0;
+  $section_size = $19;
+  $20 = $1;
+  $21 = $section_size;
+  $22 = $3;
+  (_write_section_lineno_header($20,$21,$22)|0);
+  $0 = 0;
+  $23 = $0;
+  STACKTOP = sp;return ($23|0);
+ }
+ return (0)|0;
+}
+function _write_lineno_record($mrb,$irep,$bin) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $bin = $bin|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $rlen = 0, $size = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $bin;
+ $size = 0;
+ $3 = $0;
+ $4 = $1;
+ $5 = $2;
+ $6 = (_write_lineno_record_1($3,$4,$5)|0);
+ $rlen = $6;
+ $7 = $rlen;
+ $8 = $2;
+ $9 = (($8) + ($7)|0);
+ $2 = $9;
+ $10 = $rlen;
+ $11 = $size;
+ $12 = (($11) + ($10))|0;
+ $size = $12;
+ $i = 0;
+ while(1) {
+  $13 = $i;
+  $14 = $1;
+  $15 = ((($14)) + 52|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = ($13>>>0)<($16>>>0);
+  if (!($17)) {
+   break;
+  }
+  $18 = $0;
+  $19 = $1;
+  $20 = $2;
+  $21 = (_write_lineno_record($18,$19,$20)|0);
+  $rlen = $21;
+  $22 = $rlen;
+  $23 = $2;
+  $24 = (($23) + ($22)|0);
+  $2 = $24;
+  $25 = $rlen;
+  $26 = $size;
+  $27 = (($26) + ($25))|0;
+  $size = $27;
+  $28 = $i;
+  $29 = (($28) + 1)|0;
+  $i = $29;
+ }
+ $30 = $size;
+ STACKTOP = sp;return ($30|0);
+}
+function _write_lineno_record_1($mrb,$irep,$bin) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $bin = $bin|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $8 = 0, $9 = 0, $cur = 0, $diff = 0, $filename_len = 0, $iseq_no = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $bin;
+ $3 = $2;
+ $cur = $3;
+ $4 = $cur;
+ $5 = ((($4)) + 4|0);
+ $cur = $5;
+ $6 = $1;
+ $7 = ((($6)) + 28|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ($8|0)!=(0|0);
+ if ($9) {
+  $10 = $1;
+  $11 = ((($10)) + 28|0);
+  $12 = HEAP32[$11>>2]|0;
+  $13 = (_strlen($12)|0);
+  $filename_len = $13;
+ } else {
+  $filename_len = 0;
+ }
+ $14 = $filename_len;
+ $15 = $14&65535;
+ $16 = $cur;
+ $17 = (_uint16_to_bin($15,$16)|0);
+ $18 = $cur;
+ $19 = (($18) + ($17)|0);
+ $cur = $19;
+ $20 = $filename_len;
+ $21 = ($20|0)!=(0);
+ if ($21) {
+  $22 = $cur;
+  $23 = $1;
+  $24 = ((($23)) + 28|0);
+  $25 = HEAP32[$24>>2]|0;
+  $26 = $filename_len;
+  _memcpy(($22|0),($25|0),($26|0))|0;
+  $27 = $filename_len;
+  $28 = $cur;
+  $29 = (($28) + ($27)|0);
+  $cur = $29;
+ }
+ $30 = $1;
+ $31 = ((($30)) + 32|0);
+ $32 = HEAP32[$31>>2]|0;
+ $33 = ($32|0)!=(0|0);
+ if (!($33)) {
+  $58 = $cur;
+  $59 = (_uint32_to_bin(0,$58)|0);
+  $60 = $cur;
+  $61 = (($60) + ($59)|0);
+  $cur = $61;
+  $62 = $cur;
+  $63 = $2;
+  $64 = $62;
+  $65 = $63;
+  $66 = (($64) - ($65))|0;
+  $diff = $66;
+  $67 = $diff;
+  $68 = $2;
+  (_uint32_to_bin($67,$68)|0);
+  $69 = $diff;
+  STACKTOP = sp;return ($69|0);
+ }
+ $34 = $1;
+ $35 = ((($34)) + 40|0);
+ $36 = HEAP32[$35>>2]|0;
+ $37 = $cur;
+ $38 = (_uint32_to_bin($36,$37)|0);
+ $39 = $cur;
+ $40 = (($39) + ($38)|0);
+ $cur = $40;
+ $iseq_no = 0;
+ while(1) {
+  $41 = $iseq_no;
+  $42 = $1;
+  $43 = ((($42)) + 40|0);
+  $44 = HEAP32[$43>>2]|0;
+  $45 = ($41>>>0)<($44>>>0);
+  if (!($45)) {
+   break;
+  }
+  $46 = $iseq_no;
+  $47 = $1;
+  $48 = ((($47)) + 32|0);
+  $49 = HEAP32[$48>>2]|0;
+  $50 = (($49) + ($46<<1)|0);
+  $51 = HEAP16[$50>>1]|0;
+  $52 = $cur;
+  $53 = (_uint16_to_bin($51,$52)|0);
+  $54 = $cur;
+  $55 = (($54) + ($53)|0);
+  $cur = $55;
+  $56 = $iseq_no;
+  $57 = (($56) + 1)|0;
+  $iseq_no = $57;
+ }
+ $62 = $cur;
+ $63 = $2;
+ $64 = $62;
+ $65 = $63;
+ $66 = (($64) - ($65))|0;
+ $diff = $66;
+ $67 = $diff;
+ $68 = $2;
+ (_uint32_to_bin($67,$68)|0);
+ $69 = $diff;
+ STACKTOP = sp;return ($69|0);
+}
+function _write_section_lineno_header($mrb,$section_size,$bin) {
+ $mrb = $mrb|0;
+ $section_size = $section_size|0;
+ $bin = $bin|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $header = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $section_size;
+ $2 = $bin;
+ $3 = $2;
+ $header = $3;
+ $4 = $header;
+ ;HEAP8[$4>>0]=HEAP8[54166>>0]|0;HEAP8[$4+1>>0]=HEAP8[54166+1>>0]|0;HEAP8[$4+2>>0]=HEAP8[54166+2>>0]|0;HEAP8[$4+3>>0]=HEAP8[54166+3>>0]|0;
+ $5 = $1;
+ $6 = $header;
+ $7 = ((($6)) + 4|0);
+ (_uint32_to_bin($5,$7)|0);
+ STACKTOP = sp;return 0;
+}
+function _write_section_lv($mrb,$irep,$start,$syms,$syms_len) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $start = $start|0;
+ $syms = $syms|0;
+ $syms_len = $syms_len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cur = 0, $diff = 0;
+ var $header = 0, $or$cond = 0, $result = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $cur = sp + 12|0;
+ $1 = $mrb;
+ $2 = $irep;
+ $3 = $start;
+ $4 = $syms;
+ $5 = $syms_len;
+ $6 = $3;
+ HEAP32[$cur>>2] = $6;
+ $result = 0;
+ $7 = $1;
+ $8 = ($7|0)==(0|0);
+ $9 = HEAP32[$cur>>2]|0;
+ $10 = ($9|0)==(0|0);
+ $or$cond = $8 | $10;
+ if ($or$cond) {
+  $0 = -7;
+  $37 = $0;
+  STACKTOP = sp;return ($37|0);
+ }
+ $11 = HEAP32[$cur>>2]|0;
+ $header = $11;
+ $12 = HEAP32[$cur>>2]|0;
+ $13 = ((($12)) + 8|0);
+ HEAP32[$cur>>2] = $13;
+ $14 = $1;
+ $15 = $4;
+ $16 = $5;
+ $17 = (_write_lv_sym_table($14,$cur,$15,$16)|0);
+ $result = $17;
+ $18 = $result;
+ $19 = ($18|0)!=(0);
+ if (!($19)) {
+  $20 = $1;
+  $21 = $2;
+  $22 = $4;
+  $23 = $5;
+  $24 = (_write_lv_record($20,$21,$cur,$22,$23)|0);
+  $result = $24;
+  $25 = $result;
+  $26 = ($25|0)!=(0);
+  if (!($26)) {
+   $27 = $header;
+   ;HEAP8[$27>>0]=HEAP8[54171>>0]|0;HEAP8[$27+1>>0]=HEAP8[54171+1>>0]|0;HEAP8[$27+2>>0]=HEAP8[54171+2>>0]|0;HEAP8[$27+3>>0]=HEAP8[54171+3>>0]|0;
+   $28 = HEAP32[$cur>>2]|0;
+   $29 = $3;
+   $30 = $28;
+   $31 = $29;
+   $32 = (($30) - ($31))|0;
+   $diff = $32;
+   $33 = $diff;
+   $34 = $header;
+   $35 = ((($34)) + 4|0);
+   (_uint32_to_bin($33,$35)|0);
+  }
+ }
+ $36 = $result;
+ $0 = $36;
+ $37 = $0;
+ STACKTOP = sp;return ($37|0);
+}
+function _write_lv_sym_table($mrb,$start,$syms,$syms_len) {
+ $mrb = $mrb|0;
+ $start = $start|0;
+ $syms = $syms|0;
+ $syms_len = $syms_len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cur = 0, $i = 0, $str = 0, $str_len = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str_len = sp;
+ $0 = $mrb;
+ $1 = $start;
+ $2 = $syms;
+ $3 = $syms_len;
+ $4 = $1;
+ $5 = HEAP32[$4>>2]|0;
+ $cur = $5;
+ $6 = $3;
+ $7 = $cur;
+ $8 = (_uint32_to_bin($6,$7)|0);
+ $9 = $cur;
+ $10 = (($9) + ($8)|0);
+ $cur = $10;
+ $i = 0;
+ while(1) {
+  $11 = $i;
+  $12 = $3;
+  $13 = ($11>>>0)<($12>>>0);
+  if (!($13)) {
+   break;
+  }
+  $14 = $0;
+  $15 = $i;
+  $16 = $2;
+  $17 = (($16) + ($15<<2)|0);
+  $18 = HEAP32[$17>>2]|0;
+  $19 = (_mrb_sym2name_len($14,$18,$str_len)|0);
+  $str = $19;
+  $20 = HEAP32[$str_len>>2]|0;
+  $21 = $20&65535;
+  $22 = $cur;
+  $23 = (_uint16_to_bin($21,$22)|0);
+  $24 = $cur;
+  $25 = (($24) + ($23)|0);
+  $cur = $25;
+  $26 = $cur;
+  $27 = $str;
+  $28 = HEAP32[$str_len>>2]|0;
+  _memcpy(($26|0),($27|0),($28|0))|0;
+  $29 = HEAP32[$str_len>>2]|0;
+  $30 = $cur;
+  $31 = (($30) + ($29)|0);
+  $cur = $31;
+  $32 = $i;
+  $33 = (($32) + 1)|0;
+  $i = $33;
+ }
+ $34 = $cur;
+ $35 = $1;
+ HEAP32[$35>>2] = $34;
+ STACKTOP = sp;return 0;
+}
+function _write_lv_record($mrb,$irep,$start,$syms,$syms_len) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $start = $start|0;
+ $syms = $syms|0;
+ $syms_len = $syms_len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $8 = 0, $9 = 0, $cur = 0, $i = 0, $sym_idx = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $cur = sp + 8|0;
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $start;
+ $3 = $syms;
+ $4 = $syms_len;
+ $5 = $2;
+ $6 = HEAP32[$5>>2]|0;
+ HEAP32[$cur>>2] = $6;
+ $i = 0;
+ while(1) {
+  $7 = $i;
+  $8 = (($7) + 1)|0;
+  $9 = $1;
+  $10 = HEAP16[$9>>1]|0;
+  $11 = $10&65535;
+  $12 = ($8>>>0)<($11>>>0);
+  if (!($12)) {
+   break;
+  }
+  $13 = $i;
+  $14 = $1;
+  $15 = ((($14)) + 24|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = (($16) + ($13<<3)|0);
+  $18 = HEAP32[$17>>2]|0;
+  $19 = ($18|0)==(0);
+  if ($19) {
+   $20 = HEAP32[$cur>>2]|0;
+   $21 = (_uint16_to_bin(-1,$20)|0);
+   $22 = HEAP32[$cur>>2]|0;
+   $23 = (($22) + ($21)|0);
+   HEAP32[$cur>>2] = $23;
+   $24 = HEAP32[$cur>>2]|0;
+   $25 = (_uint16_to_bin(0,$24)|0);
+   $26 = HEAP32[$cur>>2]|0;
+   $27 = (($26) + ($25)|0);
+   HEAP32[$cur>>2] = $27;
+  } else {
+   $28 = $3;
+   $29 = $4;
+   $30 = $i;
+   $31 = $1;
+   $32 = ((($31)) + 24|0);
+   $33 = HEAP32[$32>>2]|0;
+   $34 = (($33) + ($30<<3)|0);
+   $35 = HEAP32[$34>>2]|0;
+   $36 = (_find_filename_index($28,$29,$35)|0);
+   $sym_idx = $36;
+   $37 = $sym_idx;
+   $38 = $37&65535;
+   $39 = HEAP32[$cur>>2]|0;
+   $40 = (_uint16_to_bin($38,$39)|0);
+   $41 = HEAP32[$cur>>2]|0;
+   $42 = (($41) + ($40)|0);
+   HEAP32[$cur>>2] = $42;
+   $43 = $i;
+   $44 = $1;
+   $45 = ((($44)) + 24|0);
+   $46 = HEAP32[$45>>2]|0;
+   $47 = (($46) + ($43<<3)|0);
+   $48 = ((($47)) + 4|0);
+   $49 = HEAP16[$48>>1]|0;
+   $50 = HEAP32[$cur>>2]|0;
+   $51 = (_uint16_to_bin($49,$50)|0);
+   $52 = HEAP32[$cur>>2]|0;
+   $53 = (($52) + ($51)|0);
+   HEAP32[$cur>>2] = $53;
+  }
+  $54 = $i;
+  $55 = (($54) + 1)|0;
+  $i = $55;
+ }
+ $i = 0;
+ while(1) {
+  $56 = $i;
+  $57 = $1;
+  $58 = ((($57)) + 52|0);
+  $59 = HEAP32[$58>>2]|0;
+  $60 = ($56>>>0)<($59>>>0);
+  if (!($60)) {
+   break;
+  }
+  $61 = $0;
+  $62 = $i;
+  $63 = $1;
+  $64 = ((($63)) + 20|0);
+  $65 = HEAP32[$64>>2]|0;
+  $66 = (($65) + ($62<<2)|0);
+  $67 = HEAP32[$66>>2]|0;
+  $68 = $3;
+  $69 = $4;
+  (_write_lv_record($61,$67,$cur,$68,$69)|0);
+  $70 = $i;
+  $71 = (($70) + 1)|0;
+  $i = $71;
+ }
+ $72 = HEAP32[$cur>>2]|0;
+ $73 = $2;
+ HEAP32[$73>>2] = $72;
+ STACKTOP = sp;return 0;
+}
+function _write_footer($mrb,$bin) {
+ $mrb = $mrb|0;
+ $bin = $bin|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $footer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $footer = sp + 8|0;
+ $0 = $mrb;
+ $1 = $bin;
+ ;HEAP8[$footer>>0]=HEAP8[54176>>0]|0;HEAP8[$footer+1>>0]=HEAP8[54176+1>>0]|0;HEAP8[$footer+2>>0]=HEAP8[54176+2>>0]|0;HEAP8[$footer+3>>0]=HEAP8[54176+3>>0]|0;
+ $2 = ((($footer)) + 4|0);
+ (_uint32_to_bin(8,$2)|0);
+ $3 = $1;
+ ;HEAP8[$3>>0]=HEAP8[$footer>>0]|0;HEAP8[$3+1>>0]=HEAP8[$footer+1>>0]|0;HEAP8[$3+2>>0]=HEAP8[$footer+2>>0]|0;HEAP8[$3+3>>0]=HEAP8[$footer+3>>0]|0;HEAP8[$3+4>>0]=HEAP8[$footer+4>>0]|0;HEAP8[$3+5>>0]=HEAP8[$footer+5>>0]|0;HEAP8[$3+6>>0]=HEAP8[$footer+6>>0]|0;HEAP8[$3+7>>0]=HEAP8[$footer+7>>0]|0;
+ STACKTOP = sp;return 8;
+}
+function _write_rite_binary_header($mrb,$binary_size,$bin,$flags) {
+ $mrb = $mrb|0;
+ $binary_size = $binary_size|0;
+ $bin = $bin|0;
+ $flags = $flags|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $crc = 0, $header = 0;
+ var $offset = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $binary_size;
+ $2 = $bin;
+ $3 = $flags;
+ $4 = $2;
+ $header = $4;
+ $5 = $3;
+ $6 = $5&255;
+ $7 = $6 & 6;
+ switch ($7|0) {
+ case 2:  {
+  label = 2;
+  break;
+ }
+ case 4:  {
+  label = 3;
+  break;
+ }
+ case 6:  {
+  $10 = (_bigendian_p_2()|0);
+  $11 = ($10|0)!=(0);
+  if ($11) {
+   label = 2;
+  } else {
+   label = 3;
+  }
+  break;
+ }
+ default: {
+ }
+ }
+ if ((label|0) == 2) {
+  $8 = $header;
+  ;HEAP8[$8>>0]=HEAP8[54181>>0]|0;HEAP8[$8+1>>0]=HEAP8[54181+1>>0]|0;HEAP8[$8+2>>0]=HEAP8[54181+2>>0]|0;HEAP8[$8+3>>0]=HEAP8[54181+3>>0]|0;
+ }
+ else if ((label|0) == 3) {
+  $9 = $header;
+  ;HEAP8[$9>>0]=HEAP8[54186>>0]|0;HEAP8[$9+1>>0]=HEAP8[54186+1>>0]|0;HEAP8[$9+2>>0]=HEAP8[54186+2>>0]|0;HEAP8[$9+3>>0]=HEAP8[54186+3>>0]|0;
+ }
+ $12 = $header;
+ $13 = ((($12)) + 4|0);
+ ;HEAP8[$13>>0]=HEAP8[54191>>0]|0;HEAP8[$13+1>>0]=HEAP8[54191+1>>0]|0;HEAP8[$13+2>>0]=HEAP8[54191+2>>0]|0;HEAP8[$13+3>>0]=HEAP8[54191+3>>0]|0;
+ $14 = $header;
+ $15 = ((($14)) + 14|0);
+ ;HEAP8[$15>>0]=HEAP8[54196>>0]|0;HEAP8[$15+1>>0]=HEAP8[54196+1>>0]|0;HEAP8[$15+2>>0]=HEAP8[54196+2>>0]|0;HEAP8[$15+3>>0]=HEAP8[54196+3>>0]|0;
+ $16 = $header;
+ $17 = ((($16)) + 18|0);
+ ;HEAP8[$17>>0]=HEAP8[54156>>0]|0;HEAP8[$17+1>>0]=HEAP8[54156+1>>0]|0;HEAP8[$17+2>>0]=HEAP8[54156+2>>0]|0;HEAP8[$17+3>>0]=HEAP8[54156+3>>0]|0;
+ $18 = $1;
+ $19 = $header;
+ $20 = ((($19)) + 10|0);
+ (_uint32_to_bin($18,$20)|0);
+ $21 = $header;
+ $22 = ((($21)) + 8|0);
+ $23 = $2;
+ $24 = $22;
+ $25 = $23;
+ $26 = (($24) - ($25))|0;
+ $27 = (($26) + 2)|0;
+ $offset = $27;
+ $28 = $2;
+ $29 = $offset;
+ $30 = (($28) + ($29)|0);
+ $31 = $1;
+ $32 = $offset;
+ $33 = (($31) - ($32))|0;
+ $34 = (_calc_crc_16_ccitt($30,$33,0)|0);
+ $crc = $34;
+ $35 = $crc;
+ $36 = $header;
+ $37 = ((($36)) + 8|0);
+ (_uint16_to_bin($35,$37)|0);
+ STACKTOP = sp;return 0;
+}
+function _mrb_dump_irep_binary($mrb,$irep,$flags,$fp) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $flags = $flags|0;
+ $fp = $fp|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0;
+ var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $bin = 0, $bin_size = 0, $result = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $bin = sp + 8|0;
+ $bin_size = sp + 4|0;
+ $1 = $mrb;
+ $2 = $irep;
+ $3 = $flags;
+ $4 = $fp;
+ HEAP32[$bin>>2] = 0;
+ HEAP32[$bin_size>>2] = 0;
+ $5 = $4;
+ $6 = ($5|0)==(0|0);
+ if ($6) {
+  $0 = -7;
+  $23 = $0;
+  STACKTOP = sp;return ($23|0);
+ }
+ $7 = $1;
+ $8 = $2;
+ $9 = $3;
+ $10 = (_dump_flags($9,0)|0);
+ $11 = (_dump_irep($7,$8,$10,$bin,$bin_size)|0);
+ $result = $11;
+ $12 = $result;
+ $13 = ($12|0)==(0);
+ if ($13) {
+  $14 = HEAP32[$bin>>2]|0;
+  $15 = HEAP32[$bin_size>>2]|0;
+  $16 = $4;
+  $17 = (_fwrite($14,1,$15,$16)|0);
+  $18 = HEAP32[$bin_size>>2]|0;
+  $19 = ($17|0)!=($18|0);
+  if ($19) {
+   $result = -2;
+  }
+ }
+ $20 = $1;
+ $21 = HEAP32[$bin>>2]|0;
+ _mrb_free($20,$21);
+ $22 = $result;
+ $0 = $22;
+ $23 = $0;
+ STACKTOP = sp;return ($23|0);
+}
+function _mrb_dump_irep_cfunc($mrb,$irep,$flags,$fp,$initname) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $flags = $flags|0;
+ $fp = $fp|0;
+ $initname = $initname|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $8 = 0, $9 = 0, $bin = 0, $bin_idx = 0, $bin_size = 0, $or$cond = 0;
+ var $result = 0, $vararg_buffer = 0, $vararg_buffer10 = 0, $vararg_buffer2 = 0, $vararg_buffer4 = 0, $vararg_buffer6 = 0, $vararg_ptr8 = 0, $vararg_ptr9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer10 = sp + 40|0;
+ $vararg_buffer6 = sp + 24|0;
+ $vararg_buffer4 = sp + 16|0;
+ $vararg_buffer2 = sp + 8|0;
+ $vararg_buffer = sp;
+ $bin = sp + 56|0;
+ $bin_size = sp + 52|0;
+ $1 = $mrb;
+ $2 = $irep;
+ $3 = $flags;
+ $4 = $fp;
+ $5 = $initname;
+ HEAP32[$bin>>2] = 0;
+ HEAP32[$bin_size>>2] = 0;
+ $bin_idx = 0;
+ $6 = $4;
+ $7 = ($6|0)==(0|0);
+ $8 = $5;
+ $9 = ($8|0)==(0|0);
+ $or$cond = $7 | $9;
+ if (!($or$cond)) {
+  $10 = $5;
+  $11 = HEAP8[$10>>0]|0;
+  $12 = $11 << 24 >> 24;
+  $13 = ($12|0)==(0);
+  if (!($13)) {
+   $14 = $3;
+   $15 = (_dump_flags($14,2)|0);
+   $3 = $15;
+   $16 = $1;
+   $17 = $2;
+   $18 = $3;
+   $19 = (_dump_irep($16,$17,$18,$bin,$bin_size)|0);
+   $result = $19;
+   $20 = $result;
+   $21 = ($20|0)==(0);
+   do {
+    if ($21) {
+     $22 = $3;
+     $23 = (_dump_bigendian_p($22)|0);
+     $24 = ($23<<24>>24)!=(0);
+     $25 = $4;
+     if ($24) {
+      $30 = (_fprintf($25,54283,$vararg_buffer2)|0);
+      $31 = ($30|0)<(0);
+      if ($31) {
+       $32 = $1;
+       $33 = HEAP32[$bin>>2]|0;
+       _mrb_free($32,$33);
+       $0 = -2;
+       $75 = $0;
+       STACKTOP = sp;return ($75|0);
+      }
+     } else {
+      $26 = (_fprintf($25,54201,$vararg_buffer)|0);
+      $27 = ($26|0)<(0);
+      if ($27) {
+       $28 = $1;
+       $29 = HEAP32[$bin>>2]|0;
+       _mrb_free($28,$29);
+       $0 = -2;
+       $75 = $0;
+       STACKTOP = sp;return ($75|0);
+      }
+     }
+     $34 = $4;
+     $35 = (_fprintf($34,54387,$vararg_buffer4)|0);
+     $36 = ($35|0)<(0);
+     if ($36) {
+      $37 = $1;
+      $38 = HEAP32[$bin>>2]|0;
+      _mrb_free($37,$38);
+      $0 = -2;
+      $75 = $0;
+      STACKTOP = sp;return ($75|0);
+     }
+     $39 = $4;
+     $40 = $5;
+     HEAP32[$vararg_buffer6>>2] = 4;
+     $vararg_ptr8 = ((($vararg_buffer6)) + 4|0);
+     HEAP32[$vararg_ptr8>>2] = 4;
+     $vararg_ptr9 = ((($vararg_buffer6)) + 8|0);
+     HEAP32[$vararg_ptr9>>2] = $40;
+     $41 = (_fprintf($39,54408,$vararg_buffer6)|0);
+     $42 = ($41|0)<(0);
+     if ($42) {
+      $43 = $1;
+      $44 = HEAP32[$bin>>2]|0;
+      _mrb_free($43,$44);
+      $0 = -2;
+      $75 = $0;
+      STACKTOP = sp;return ($75|0);
+     }
+     while(1) {
+      $45 = $bin_idx;
+      $46 = HEAP32[$bin_size>>2]|0;
+      $47 = ($45>>>0)<($46>>>0);
+      if (!($47)) {
+       label = 20;
+       break;
+      }
+      $48 = $bin_idx;
+      $49 = (($48>>>0) % 16)&-1;
+      $50 = ($49|0)==(0);
+      if ($50) {
+       $51 = $4;
+       $52 = (_fputs(66199,$51)|0);
+       $53 = ($52|0)==(-1);
+       if ($53) {
+        label = 17;
+        break;
+       }
+      }
+      $56 = $4;
+      $57 = $bin_idx;
+      $58 = (($57) + 1)|0;
+      $bin_idx = $58;
+      $59 = HEAP32[$bin>>2]|0;
+      $60 = (($59) + ($57)|0);
+      $61 = HEAP8[$60>>0]|0;
+      $62 = $61&255;
+      HEAP32[$vararg_buffer10>>2] = $62;
+      $63 = (_fprintf($56,54533,$vararg_buffer10)|0);
+      $64 = ($63|0)<(0);
+      if ($64) {
+       label = 19;
+       break;
+      }
+     }
+     if ((label|0) == 17) {
+      $54 = $1;
+      $55 = HEAP32[$bin>>2]|0;
+      _mrb_free($54,$55);
+      $0 = -2;
+      $75 = $0;
+      STACKTOP = sp;return ($75|0);
+     }
+     else if ((label|0) == 19) {
+      $65 = $1;
+      $66 = HEAP32[$bin>>2]|0;
+      _mrb_free($65,$66);
+      $0 = -2;
+      $75 = $0;
+      STACKTOP = sp;return ($75|0);
+     }
+     else if ((label|0) == 20) {
+      $67 = $4;
+      $68 = (_fputs(54541,$67)|0);
+      $69 = ($68|0)==(-1);
+      if (!($69)) {
+       break;
+      }
+      $70 = $1;
+      $71 = HEAP32[$bin>>2]|0;
+      _mrb_free($70,$71);
+      $0 = -2;
+      $75 = $0;
+      STACKTOP = sp;return ($75|0);
+     }
+    }
+   } while(0);
+   $72 = $1;
+   $73 = HEAP32[$bin>>2]|0;
+   _mrb_free($72,$73);
+   $74 = $result;
+   $0 = $74;
+   $75 = $0;
+   STACKTOP = sp;return ($75|0);
+  }
+ }
+ $0 = -7;
+ $75 = $0;
+ STACKTOP = sp;return ($75|0);
+}
+function _dump_bigendian_p($flags) {
+ $flags = $flags|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $flags;
+ $2 = $1;
+ $3 = $2&255;
+ $4 = $3 & 6;
+ switch ($4|0) {
+ case 2:  {
+  $0 = 1;
+  break;
+ }
+ case 4:  {
+  $0 = 0;
+  break;
+ }
+ default: {
+  $5 = (_bigendian_p_2()|0);
+  $6 = $5&255;
+  $0 = $6;
+ }
+ }
+ $7 = $0;
+ STACKTOP = sp;return ($7|0);
+}
+function _mrb_float_to_str($agg$result,$mrb,$flo,$fmt) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $flo = $flo|0;
+ $fmt = $fmt|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0, $f = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $f = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $1 = $fmt;
+ $3 = $0;
+ HEAP32[$f>>2] = $3;
+ $4 = ((($f)) + 4|0);
+ $5 = $0;
+ _mrb_str_buf_new($2,$5,24);
+ ;HEAP32[$4>>2]=HEAP32[$2>>2]|0;HEAP32[$4+4>>2]=HEAP32[$2+4>>2]|0;
+ $6 = $1;
+ $7 = +HEAPF32[$flo>>2];
+ $8 = (_fmt_core($f,$6,$7)|0);
+ $9 = ($8|0)<(0);
+ if ($9) {
+  $10 = $0;
+  $11 = $0;
+  $12 = (_mrb_class_get($11,68855)|0);
+  _mrb_raise($10,$12,54546);
+  // unreachable;
+ } else {
+  $13 = ((($f)) + 4|0);
+  ;HEAP32[$agg$result>>2]=HEAP32[$13>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$13+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+}
+function _fmt_core($f,$fmt,$flo) {
+ $f = $f|0;
+ $fmt = $fmt|0;
+ $flo = +$flo;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0.0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $f;
+ $2 = $fmt;
+ $3 = $flo;
+ $4 = $2;
+ $5 = HEAP8[$4>>0]|0;
+ $6 = $5 << 24 >> 24;
+ $7 = ($6|0)!=(37);
+ if ($7) {
+  $0 = -1;
+  $41 = $0;
+  STACKTOP = sp;return ($41|0);
+ }
+ $8 = $2;
+ $9 = ((($8)) + 1|0);
+ $2 = $9;
+ $10 = $2;
+ $11 = HEAP8[$10>>0]|0;
+ $12 = $11 << 24 >> 24;
+ $13 = ($12|0)==(46);
+ L5: do {
+  if ($13) {
+   $14 = $2;
+   $15 = ((($14)) + 1|0);
+   $2 = $15;
+   $p = 0;
+   while(1) {
+    $16 = $2;
+    $17 = HEAP8[$16>>0]|0;
+    $18 = $17 << 24 >> 24;
+    $19 = (($18) - 48)|0;
+    $20 = ($19>>>0)<(10);
+    if (!($20)) {
+     break L5;
+    }
+    $21 = $p;
+    $22 = ($21*10)|0;
+    $23 = $2;
+    $24 = HEAP8[$23>>0]|0;
+    $25 = $24 << 24 >> 24;
+    $26 = (($25) - 48)|0;
+    $27 = (($22) + ($26))|0;
+    $p = $27;
+    $28 = $2;
+    $29 = ((($28)) + 1|0);
+    $2 = $29;
+   }
+  } else {
+   $p = -1;
+  }
+ } while(0);
+ $30 = $2;
+ $31 = HEAP8[$30>>0]|0;
+ $32 = $31 << 24 >> 24;
+ switch ($32|0) {
+ case 65: case 71: case 70: case 69: case 97: case 103: case 102: case 101:  {
+  $33 = $1;
+  $34 = $3;
+  $35 = $34;
+  $36 = $p;
+  $37 = $2;
+  $38 = HEAP8[$37>>0]|0;
+  $39 = $38 << 24 >> 24;
+  $40 = (_fmt_fp($33,$35,0,$36,0,$39)|0);
+  $0 = $40;
+  $41 = $0;
+  STACKTOP = sp;return ($41|0);
+  break;
+ }
+ default: {
+  $0 = -1;
+  $41 = $0;
+  STACKTOP = sp;return ($41|0);
+ }
+ }
+ return (0)|0;
+}
+function _fmt_fp($f,$y,$w,$p,$fl,$t) {
+ $f = $f|0;
+ $y = +$y;
+ $w = $w|0;
+ $p = $p|0;
+ $fl = $fl|0;
+ $t = $t|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0.0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0, $110 = 0.0, $111 = 0.0, $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0;
+ var $116 = 0.0, $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0.0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0.0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0.0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0.0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0.0, $158 = 0, $159 = 0.0, $16 = 0, $160 = 0.0, $161 = 0.0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0.0, $168 = 0, $169 = 0, $17 = 0;
+ var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0.0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
+ var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0.0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0;
+ var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0;
+ var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0;
+ var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0;
+ var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0.0, $266 = 0, $267 = 0.0, $268 = 0.0, $269 = 0, $27 = 0.0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0.0, $277 = 0, $278 = 0;
+ var $279 = 0.0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0.0, $284 = 0.0, $285 = 0.0, $286 = 0.0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0;
+ var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0;
+ var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0;
+ var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0;
+ var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0;
+ var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0;
+ var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0.0, $400 = 0, $401 = 0, $402 = 0, $403 = 0;
+ var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0.0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0;
+ var $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0;
+ var $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0;
+ var $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0;
+ var $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0.0, $494 = 0.0;
+ var $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0;
+ var $512 = 0, $513 = 0.0, $514 = 0.0, $515 = 0.0, $516 = 0.0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0.0, $522 = 0.0, $523 = 0.0, $524 = 0.0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0;
+ var $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0;
+ var $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0;
+ var $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0;
+ var $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0;
+ var $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0;
+ var $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0;
+ var $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0;
+ var $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0;
+ var $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0;
+ var $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0;
+ var $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0.0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0;
+ var $729 = 0, $73 = 0.0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0.0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0;
+ var $747 = 0, $748 = 0, $749 = 0, $75 = 0.0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0;
+ var $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0;
+ var $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0.0, $80 = 0;
+ var $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0;
+ var $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0;
+ var $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0;
+ var $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0;
+ var $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0;
+ var $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0;
+ var $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0;
+ var $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $a = 0, $b = 0, $big = 0, $buf = 0;
+ var $carry = 0, $carry2 = 0, $d = 0, $e = 0, $e2 = 0, $ebuf = 0, $ebuf0 = 0, $estr = 0, $i = 0, $j = 0, $l = 0, $need = 0, $or$cond = 0, $or$cond3 = 0, $or$cond6 = 0, $pl = 0, $prefix = 0, $r = 0, $re = 0, $rm = 0;
+ var $round = 0.0, $round5 = 0.0, $s = 0, $sh = 0, $sh3 = 0, $small = 0.0, $ss = 0, $ss6 = 0, $ss7 = 0, $ss8 = 0, $x = 0, $x1 = 0, $x4 = 0, $z = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 720|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $big = sp + 152|0;
+ $e2 = sp + 128|0;
+ $buf = sp + 692|0;
+ $ebuf0 = sp + 680|0;
+ $x1 = sp + 16|0;
+ $1 = $f;
+ $2 = $y;
+ $3 = $w;
+ $4 = $p;
+ $5 = $fl;
+ $6 = $t;
+ HEAP32[$e2>>2] = 0;
+ $prefix = 72345;
+ $7 = ((($ebuf0)) + 12|0);
+ $ebuf = $7;
+ $pl = 1;
+ $8 = $2;
+ $9 = (___DOUBLE_BITS($8)|0);
+ $10 = tempRet0;
+ $11 = (_bitshift64Lshr(($9|0),($10|0),63)|0);
+ $12 = tempRet0;
+ $13 = ($11|0)!=(0);
+ do {
+  if ($13) {
+   $14 = $2;
+   $15 = -$14;
+   $2 = $15;
+  } else {
+   $16 = $5;
+   $17 = $16 & 2048;
+   $18 = ($17|0)!=(0);
+   if ($18) {
+    $19 = $prefix;
+    $20 = ((($19)) + 3|0);
+    $prefix = $20;
+    break;
+   }
+   $21 = $5;
+   $22 = $21 & 1;
+   $23 = ($22|0)!=(0);
+   $24 = $prefix;
+   if ($23) {
+    $25 = ((($24)) + 6|0);
+    $prefix = $25;
+    break;
+   } else {
+    $26 = ((($24)) + 1|0);
+    $prefix = $26;
+    $pl = 0;
+    break;
+   }
+  }
+ } while(0);
+ $27 = $2;
+ $28 = (___DOUBLE_BITS($27)|0);
+ $29 = tempRet0;
+ $30 = $29 & 2147483647;
+ $31 = ($30>>>0)<(2146435072);
+ $32 = ($28>>>0)<(0);
+ $33 = ($30|0)==(2146435072);
+ $34 = $33 & $32;
+ $35 = $31 | $34;
+ if (!($35)) {
+  $36 = $6;
+  $37 = $36 & 32;
+  $38 = ($37|0)!=(0);
+  $39 = $38 ? 72364 : 72368;
+  $ss = $39;
+  $40 = $2;
+  $41 = $2;
+  $42 = $40 != $41;
+  if ($42) {
+   $43 = $6;
+   $44 = $43 & 32;
+   $45 = ($44|0)!=(0);
+   $46 = $45 ? 72387 : 72372;
+   $ss = $46;
+  }
+  $47 = $1;
+  $48 = $3;
+  $49 = $pl;
+  $50 = (3 + ($49))|0;
+  $51 = $5;
+  $52 = $51 & -65537;
+  _pad($47,32,$48,$50,$52);
+  $53 = $1;
+  $54 = $prefix;
+  $55 = $pl;
+  _out($53,$54,$55);
+  $56 = $1;
+  $57 = $ss;
+  _out($56,$57,3);
+  $58 = $1;
+  $59 = $3;
+  $60 = $pl;
+  $61 = (3 + ($60))|0;
+  $62 = $5;
+  $63 = $62 ^ 8192;
+  _pad($58,32,$59,$61,$63);
+  $64 = $3;
+  $65 = $pl;
+  $66 = (3 + ($65))|0;
+  $67 = ($64|0)>($66|0);
+  $68 = $3;
+  $69 = $pl;
+  $70 = (3 + ($69))|0;
+  $71 = $67 ? $68 : $70;
+  $0 = $71;
+  $935 = $0;
+  STACKTOP = sp;return ($935|0);
+ }
+ $72 = $2;
+ $73 = (+_frexp($72,$e2));
+ $74 = $73 * 2.0;
+ $2 = $74;
+ $75 = $2;
+ $76 = $75 != 0.0;
+ if ($76) {
+  $77 = HEAP32[$e2>>2]|0;
+  $78 = (($77) + -1)|0;
+  HEAP32[$e2>>2] = $78;
+ }
+ $79 = $6;
+ $80 = $79 | 32;
+ $81 = ($80|0)==(97);
+ if ($81) {
+  $round = 8.0;
+  $82 = $6;
+  $83 = $82 & 32;
+  $84 = ($83|0)!=(0);
+  if ($84) {
+   $85 = $prefix;
+   $86 = ((($85)) + 9|0);
+   $prefix = $86;
+  }
+  $87 = $pl;
+  $88 = (($87) + 2)|0;
+  $pl = $88;
+  $89 = $4;
+  $90 = ($89|0)<(0);
+  $91 = $4;
+  $92 = ($91|0)>=(12);
+  $or$cond = $90 | $92;
+  if ($or$cond) {
+   $re = 0;
+  } else {
+   $93 = $4;
+   $94 = (12 - ($93))|0;
+   $re = $94;
+  }
+  $95 = $re;
+  $96 = ($95|0)!=(0);
+  do {
+   if ($96) {
+    while(1) {
+     $97 = $re;
+     $98 = (($97) + -1)|0;
+     $re = $98;
+     $99 = ($97|0)!=(0);
+     if (!($99)) {
+      break;
+     }
+     $100 = $round;
+     $101 = $100 * 16.0;
+     $round = $101;
+    }
+    $102 = $prefix;
+    $103 = HEAP8[$102>>0]|0;
+    $104 = $103 << 24 >> 24;
+    $105 = ($104|0)==(45);
+    if ($105) {
+     $106 = $2;
+     $107 = -$106;
+     $2 = $107;
+     $108 = $round;
+     $109 = $2;
+     $110 = $109 - $108;
+     $2 = $110;
+     $111 = $round;
+     $112 = $2;
+     $113 = $112 + $111;
+     $2 = $113;
+     $114 = $2;
+     $115 = -$114;
+     $2 = $115;
+     break;
+    } else {
+     $116 = $round;
+     $117 = $2;
+     $118 = $117 + $116;
+     $2 = $118;
+     $119 = $round;
+     $120 = $2;
+     $121 = $120 - $119;
+     $2 = $121;
+     break;
+    }
+   }
+  } while(0);
+  $122 = HEAP32[$e2>>2]|0;
+  $123 = ($122|0)<(0);
+  $124 = HEAP32[$e2>>2]|0;
+  $125 = (0 - ($124))|0;
+  $126 = $123 ? $125 : $124;
+  $127 = $ebuf;
+  $128 = (_fmt_u($126,$127)|0);
+  $estr = $128;
+  $129 = $estr;
+  $130 = $ebuf;
+  $131 = ($129|0)==($130|0);
+  if ($131) {
+   $132 = $estr;
+   $133 = ((($132)) + -1|0);
+   $estr = $133;
+   HEAP8[$133>>0] = 48;
+  }
+  $134 = HEAP32[$e2>>2]|0;
+  $135 = ($134|0)<(0);
+  $136 = $135 ? 45 : 43;
+  $137 = $136&255;
+  $138 = $estr;
+  $139 = ((($138)) + -1|0);
+  $estr = $139;
+  HEAP8[$139>>0] = $137;
+  $140 = $6;
+  $141 = (($140) + 15)|0;
+  $142 = $141&255;
+  $143 = $estr;
+  $144 = ((($143)) + -1|0);
+  $estr = $144;
+  HEAP8[$144>>0] = $142;
+  $s = $buf;
+  while(1) {
+   $145 = $2;
+   $146 = (~~(($145)));
+   $x = $146;
+   $147 = $x;
+   $148 = (70420 + ($147)|0);
+   $149 = HEAP8[$148>>0]|0;
+   $150 = $149 << 24 >> 24;
+   $151 = $6;
+   $152 = $151 & 32;
+   $153 = $150 | $152;
+   $154 = $153&255;
+   $155 = $s;
+   $156 = ((($155)) + 1|0);
+   $s = $156;
+   HEAP8[$155>>0] = $154;
+   $157 = $2;
+   $158 = $x;
+   $159 = (+($158|0));
+   $160 = $157 - $159;
+   $161 = 16.0 * $160;
+   $2 = $161;
+   $162 = $s;
+   $163 = $162;
+   $164 = $buf;
+   $165 = (($163) - ($164))|0;
+   $166 = ($165|0)==(1);
+   do {
+    if ($166) {
+     $167 = $2;
+     $168 = $167 != 0.0;
+     $169 = $4;
+     $170 = ($169|0)>(0);
+     $or$cond3 = $168 | $170;
+     if (!($or$cond3)) {
+      $171 = $5;
+      $172 = $171 & 8;
+      $173 = ($172|0)!=(0);
+      if (!($173)) {
+       break;
+      }
+     }
+     $174 = $s;
+     $175 = ((($174)) + 1|0);
+     $s = $175;
+     HEAP8[$174>>0] = 46;
+    }
+   } while(0);
+   $176 = $2;
+   $177 = $176 != 0.0;
+   if (!($177)) {
+    break;
+   }
+  }
+  $178 = $4;
+  $179 = ($178|0)!=(0);
+  if ($179) {
+   $180 = $s;
+   $181 = $180;
+   $182 = $buf;
+   $183 = (($181) - ($182))|0;
+   $184 = (($183) - 2)|0;
+   $185 = $4;
+   $186 = ($184|0)<($185|0);
+   if ($186) {
+    $187 = $4;
+    $188 = (($187) + 2)|0;
+    $189 = $ebuf;
+    $190 = $estr;
+    $191 = $189;
+    $192 = $190;
+    $193 = (($191) - ($192))|0;
+    $194 = (($188) + ($193))|0;
+    $l = $194;
+   } else {
+    label = 37;
+   }
+  } else {
+   label = 37;
+  }
+  if ((label|0) == 37) {
+   $195 = $s;
+   $196 = $195;
+   $197 = $buf;
+   $198 = (($196) - ($197))|0;
+   $199 = $ebuf;
+   $200 = $estr;
+   $201 = $199;
+   $202 = $200;
+   $203 = (($201) - ($202))|0;
+   $204 = (($198) + ($203))|0;
+   $l = $204;
+  }
+  $205 = $1;
+  $206 = $3;
+  $207 = $pl;
+  $208 = $l;
+  $209 = (($207) + ($208))|0;
+  $210 = $5;
+  _pad($205,32,$206,$209,$210);
+  $211 = $1;
+  $212 = $prefix;
+  $213 = $pl;
+  _out($211,$212,$213);
+  $214 = $1;
+  $215 = $3;
+  $216 = $pl;
+  $217 = $l;
+  $218 = (($216) + ($217))|0;
+  $219 = $5;
+  $220 = $219 ^ 65536;
+  _pad($214,48,$215,$218,$220);
+  $221 = $1;
+  $222 = $s;
+  $223 = $222;
+  $224 = $buf;
+  $225 = (($223) - ($224))|0;
+  _out($221,$buf,$225);
+  $226 = $1;
+  $227 = $l;
+  $228 = $ebuf;
+  $229 = $estr;
+  $230 = $228;
+  $231 = $229;
+  $232 = (($230) - ($231))|0;
+  $233 = (($227) - ($232))|0;
+  $234 = $s;
+  $235 = $234;
+  $236 = $buf;
+  $237 = (($235) - ($236))|0;
+  $238 = (($233) - ($237))|0;
+  _pad($226,48,$238,0,0);
+  $239 = $1;
+  $240 = $estr;
+  $241 = $ebuf;
+  $242 = $estr;
+  $243 = $241;
+  $244 = $242;
+  $245 = (($243) - ($244))|0;
+  _out($239,$240,$245);
+  $246 = $1;
+  $247 = $3;
+  $248 = $pl;
+  $249 = $l;
+  $250 = (($248) + ($249))|0;
+  $251 = $5;
+  $252 = $251 ^ 8192;
+  _pad($246,32,$247,$250,$252);
+  $253 = $3;
+  $254 = $pl;
+  $255 = $l;
+  $256 = (($254) + ($255))|0;
+  $257 = ($253|0)>($256|0);
+  if ($257) {
+   $258 = $3;
+   $262 = $258;
+  } else {
+   $259 = $pl;
+   $260 = $l;
+   $261 = (($259) + ($260))|0;
+   $262 = $261;
+  }
+  $0 = $262;
+  $935 = $0;
+  STACKTOP = sp;return ($935|0);
+ }
+ $263 = $4;
+ $264 = ($263|0)<(0);
+ if ($264) {
+  $4 = 6;
+ }
+ $265 = $2;
+ $266 = $265 != 0.0;
+ if ($266) {
+  $267 = $2;
+  $268 = $267 * 268435456.0;
+  $2 = $268;
+  $269 = HEAP32[$e2>>2]|0;
+  $270 = (($269) - 28)|0;
+  HEAP32[$e2>>2] = $270;
+ }
+ $271 = HEAP32[$e2>>2]|0;
+ $272 = ($271|0)<(0);
+ if ($272) {
+  $z = $big;
+  $r = $big;
+  $a = $big;
+ } else {
+  $273 = ((($big)) + 504|0);
+  $274 = ((($273)) + -212|0);
+  $275 = ((($274)) + -4|0);
+  $z = $275;
+  $r = $275;
+  $a = $275;
+ }
+ while(1) {
+  $276 = $2;
+  $277 = (~~(($276))>>>0);
+  $278 = $z;
+  HEAP32[$278>>2] = $277;
+  $279 = $2;
+  $280 = $z;
+  $281 = ((($280)) + 4|0);
+  $z = $281;
+  $282 = HEAP32[$280>>2]|0;
+  $283 = (+($282>>>0));
+  $284 = $279 - $283;
+  $285 = 1.0E+9 * $284;
+  $2 = $285;
+  $286 = $2;
+  $287 = $286 != 0.0;
+  if (!($287)) {
+   break;
+  }
+ }
+ while(1) {
+  $288 = HEAP32[$e2>>2]|0;
+  $289 = ($288|0)>(0);
+  if (!($289)) {
+   break;
+  }
+  $carry = 0;
+  $290 = HEAP32[$e2>>2]|0;
+  $291 = (29)<($290|0);
+  $292 = HEAP32[$e2>>2]|0;
+  $293 = $291 ? 29 : $292;
+  $sh = $293;
+  $294 = $z;
+  $295 = ((($294)) + -4|0);
+  $d = $295;
+  while(1) {
+   $296 = $d;
+   $297 = $a;
+   $298 = ($296>>>0)>=($297>>>0);
+   if (!($298)) {
+    break;
+   }
+   $299 = $d;
+   $300 = HEAP32[$299>>2]|0;
+   $301 = $sh;
+   $302 = (_bitshift64Shl(($300|0),0,($301|0))|0);
+   $303 = tempRet0;
+   $304 = $carry;
+   $305 = (_i64Add(($302|0),($303|0),($304|0),0)|0);
+   $306 = tempRet0;
+   $307 = $x1;
+   $308 = $307;
+   HEAP32[$308>>2] = $305;
+   $309 = (($307) + 4)|0;
+   $310 = $309;
+   HEAP32[$310>>2] = $306;
+   $311 = $x1;
+   $312 = $311;
+   $313 = HEAP32[$312>>2]|0;
+   $314 = (($311) + 4)|0;
+   $315 = $314;
+   $316 = HEAP32[$315>>2]|0;
+   $317 = (___uremdi3(($313|0),($316|0),1000000000,0)|0);
+   $318 = tempRet0;
+   $319 = $d;
+   HEAP32[$319>>2] = $317;
+   $320 = $x1;
+   $321 = $320;
+   $322 = HEAP32[$321>>2]|0;
+   $323 = (($320) + 4)|0;
+   $324 = $323;
+   $325 = HEAP32[$324>>2]|0;
+   $326 = (___udivdi3(($322|0),($325|0),1000000000,0)|0);
+   $327 = tempRet0;
+   $carry = $326;
+   $328 = $d;
+   $329 = ((($328)) + -4|0);
+   $d = $329;
+  }
+  $330 = $carry;
+  $331 = ($330|0)!=(0);
+  if ($331) {
+   $332 = $carry;
+   $333 = $a;
+   $334 = ((($333)) + -4|0);
+   $a = $334;
+   HEAP32[$334>>2] = $332;
+  }
+  while(1) {
+   $335 = $z;
+   $336 = $a;
+   $337 = ($335>>>0)>($336>>>0);
+   if (!($337)) {
+    break;
+   }
+   $338 = $z;
+   $339 = ((($338)) + -4|0);
+   $340 = HEAP32[$339>>2]|0;
+   $341 = ($340|0)!=(0);
+   $342 = $341 ^ 1;
+   if (!($342)) {
+    break;
+   }
+   $343 = $z;
+   $344 = ((($343)) + -4|0);
+   $z = $344;
+  }
+  $345 = $sh;
+  $346 = HEAP32[$e2>>2]|0;
+  $347 = (($346) - ($345))|0;
+  HEAP32[$e2>>2] = $347;
+ }
+ while(1) {
+  $348 = HEAP32[$e2>>2]|0;
+  $349 = ($348|0)<(0);
+  if (!($349)) {
+   break;
+  }
+  $carry2 = 0;
+  $350 = HEAP32[$e2>>2]|0;
+  $351 = (0 - ($350))|0;
+  $352 = (9)<($351|0);
+  $353 = HEAP32[$e2>>2]|0;
+  $354 = (0 - ($353))|0;
+  $355 = $352 ? 9 : $354;
+  $sh3 = $355;
+  $356 = $4;
+  $357 = (($356) + 17)|0;
+  $358 = (($357) + 8)|0;
+  $359 = (($358|0) / 9)&-1;
+  $360 = (1 + ($359))|0;
+  $need = $360;
+  $361 = $a;
+  $d = $361;
+  while(1) {
+   $362 = $d;
+   $363 = $z;
+   $364 = ($362>>>0)<($363>>>0);
+   if (!($364)) {
+    break;
+   }
+   $365 = $d;
+   $366 = HEAP32[$365>>2]|0;
+   $367 = $sh3;
+   $368 = 1 << $367;
+   $369 = (($368) - 1)|0;
+   $370 = $366 & $369;
+   $rm = $370;
+   $371 = $d;
+   $372 = HEAP32[$371>>2]|0;
+   $373 = $sh3;
+   $374 = $372 >>> $373;
+   $375 = $carry2;
+   $376 = (($374) + ($375))|0;
+   $377 = $d;
+   HEAP32[$377>>2] = $376;
+   $378 = $sh3;
+   $379 = 1000000000 >> $378;
+   $380 = $rm;
+   $381 = Math_imul($379, $380)|0;
+   $carry2 = $381;
+   $382 = $d;
+   $383 = ((($382)) + 4|0);
+   $d = $383;
+  }
+  $384 = $a;
+  $385 = HEAP32[$384>>2]|0;
+  $386 = ($385|0)!=(0);
+  if (!($386)) {
+   $387 = $a;
+   $388 = ((($387)) + 4|0);
+   $a = $388;
+  }
+  $389 = $carry2;
+  $390 = ($389|0)!=(0);
+  if ($390) {
+   $391 = $carry2;
+   $392 = $z;
+   $393 = ((($392)) + 4|0);
+   $z = $393;
+   HEAP32[$392>>2] = $391;
+  }
+  $394 = $6;
+  $395 = $394 | 32;
+  $396 = ($395|0)==(102);
+  $397 = $r;
+  $398 = $a;
+  $399 = $396 ? $397 : $398;
+  $b = $399;
+  $400 = $z;
+  $401 = $b;
+  $402 = $400;
+  $403 = $401;
+  $404 = (($402) - ($403))|0;
+  $405 = (($404|0) / 4)&-1;
+  $406 = $need;
+  $407 = ($405|0)>($406|0);
+  if ($407) {
+   $408 = $b;
+   $409 = $need;
+   $410 = (($408) + ($409<<2)|0);
+   $z = $410;
+  }
+  $411 = $sh3;
+  $412 = HEAP32[$e2>>2]|0;
+  $413 = (($412) + ($411))|0;
+  HEAP32[$e2>>2] = $413;
+ }
+ $414 = $a;
+ $415 = $z;
+ $416 = ($414>>>0)<($415>>>0);
+ L105: do {
+  if ($416) {
+   $i = 10;
+   $417 = $r;
+   $418 = $a;
+   $419 = $417;
+   $420 = $418;
+   $421 = (($419) - ($420))|0;
+   $422 = (($421|0) / 4)&-1;
+   $423 = ($422*9)|0;
+   $e = $423;
+   while(1) {
+    $424 = $a;
+    $425 = HEAP32[$424>>2]|0;
+    $426 = $i;
+    $427 = ($425>>>0)>=($426>>>0);
+    if (!($427)) {
+     break L105;
+    }
+    $428 = $i;
+    $429 = ($428*10)|0;
+    $i = $429;
+    $430 = $e;
+    $431 = (($430) + 1)|0;
+    $e = $431;
+   }
+  } else {
+   $e = 0;
+  }
+ } while(0);
+ $432 = $4;
+ $433 = $6;
+ $434 = $433 | 32;
+ $435 = ($434|0)!=(102);
+ $436 = $435&1;
+ $437 = $e;
+ $438 = Math_imul($436, $437)|0;
+ $439 = (($432) - ($438))|0;
+ $440 = $6;
+ $441 = $440 | 32;
+ $442 = ($441|0)==(103);
+ $443 = $4;
+ $444 = ($443|0)!=(0);
+ $445 = $442 ? $444 : 0;
+ $446 = $445&1;
+ $447 = (($439) - ($446))|0;
+ $j = $447;
+ $448 = $j;
+ $449 = $z;
+ $450 = $r;
+ $451 = $449;
+ $452 = $450;
+ $453 = (($451) - ($452))|0;
+ $454 = (($453|0) / 4)&-1;
+ $455 = (($454) - 1)|0;
+ $456 = ($455*9)|0;
+ $457 = ($448|0)<($456|0);
+ if ($457) {
+  $458 = $r;
+  $459 = ((($458)) + 4|0);
+  $460 = $j;
+  $461 = (($460) + 9216)|0;
+  $462 = (($461|0) / 9)&-1;
+  $463 = (($462) - 1024)|0;
+  $464 = (($459) + ($463<<2)|0);
+  $d = $464;
+  $465 = $j;
+  $466 = (($465) + 9216)|0;
+  $j = $466;
+  $467 = $j;
+  $468 = (($467|0) % 9)&-1;
+  $j = $468;
+  $i = 10;
+  $469 = $j;
+  $470 = (($469) + 1)|0;
+  $j = $470;
+  while(1) {
+   $471 = $j;
+   $472 = ($471|0)<(9);
+   if (!($472)) {
+    break;
+   }
+   $473 = $i;
+   $474 = ($473*10)|0;
+   $i = $474;
+   $475 = $j;
+   $476 = (($475) + 1)|0;
+   $j = $476;
+  }
+  $477 = $d;
+  $478 = HEAP32[$477>>2]|0;
+  $479 = $i;
+  $480 = (($478>>>0) % ($479>>>0))&-1;
+  $x4 = $480;
+  $481 = $x4;
+  $482 = ($481|0)!=(0);
+  if ($482) {
+   label = 82;
+  } else {
+   $483 = $d;
+   $484 = ((($483)) + 4|0);
+   $485 = $z;
+   $486 = ($484|0)!=($485|0);
+   if ($486) {
+    label = 82;
+   }
+  }
+  L120: do {
+   if ((label|0) == 82) {
+    $round5 = 9007199254740992.0;
+    $487 = $d;
+    $488 = HEAP32[$487>>2]|0;
+    $489 = $i;
+    $490 = (($488>>>0) / ($489>>>0))&-1;
+    $491 = $490 & 1;
+    $492 = ($491|0)!=(0);
+    if ($492) {
+     $493 = $round5;
+     $494 = $493 + 2.0;
+     $round5 = $494;
+    }
+    $495 = $x4;
+    $496 = $i;
+    $497 = (($496>>>0) / 2)&-1;
+    $498 = ($495>>>0)<($497>>>0);
+    do {
+     if ($498) {
+      $small = 0.5;
+     } else {
+      $499 = $x4;
+      $500 = $i;
+      $501 = (($500>>>0) / 2)&-1;
+      $502 = ($499|0)==($501|0);
+      if ($502) {
+       $503 = $d;
+       $504 = ((($503)) + 4|0);
+       $505 = $z;
+       $506 = ($504|0)==($505|0);
+       if ($506) {
+        $small = 1.0;
+        break;
+       }
+      }
+      $small = 1.5;
+     }
+    } while(0);
+    $507 = $pl;
+    $508 = ($507|0)!=(0);
+    if ($508) {
+     $509 = $prefix;
+     $510 = HEAP8[$509>>0]|0;
+     $511 = $510 << 24 >> 24;
+     $512 = ($511|0)==(45);
+     if ($512) {
+      $513 = $round5;
+      $514 = $513 * -1.0;
+      $round5 = $514;
+      $515 = $small;
+      $516 = $515 * -1.0;
+      $small = $516;
+     }
+    }
+    $517 = $x4;
+    $518 = $d;
+    $519 = HEAP32[$518>>2]|0;
+    $520 = (($519) - ($517))|0;
+    HEAP32[$518>>2] = $520;
+    $521 = $round5;
+    $522 = $small;
+    $523 = $521 + $522;
+    $524 = $round5;
+    $525 = $523 != $524;
+    if ($525) {
+     $526 = $d;
+     $527 = HEAP32[$526>>2]|0;
+     $528 = $i;
+     $529 = (($527) + ($528))|0;
+     $530 = $d;
+     HEAP32[$530>>2] = $529;
+     while(1) {
+      $531 = $d;
+      $532 = HEAP32[$531>>2]|0;
+      $533 = ($532>>>0)>(999999999);
+      if (!($533)) {
+       break;
+      }
+      $534 = $d;
+      $535 = ((($534)) + -4|0);
+      $d = $535;
+      HEAP32[$534>>2] = 0;
+      $536 = $d;
+      $537 = $a;
+      $538 = ($536>>>0)<($537>>>0);
+      if ($538) {
+       $539 = $a;
+       $540 = ((($539)) + -4|0);
+       $a = $540;
+       HEAP32[$540>>2] = 0;
+      }
+      $541 = $d;
+      $542 = HEAP32[$541>>2]|0;
+      $543 = (($542) + 1)|0;
+      HEAP32[$541>>2] = $543;
+     }
+     $i = 10;
+     $544 = $r;
+     $545 = $a;
+     $546 = $544;
+     $547 = $545;
+     $548 = (($546) - ($547))|0;
+     $549 = (($548|0) / 4)&-1;
+     $550 = ($549*9)|0;
+     $e = $550;
+     while(1) {
+      $551 = $a;
+      $552 = HEAP32[$551>>2]|0;
+      $553 = $i;
+      $554 = ($552>>>0)>=($553>>>0);
+      if (!($554)) {
+       break L120;
+      }
+      $555 = $i;
+      $556 = ($555*10)|0;
+      $i = $556;
+      $557 = $e;
+      $558 = (($557) + 1)|0;
+      $e = $558;
+     }
+    }
+   }
+  } while(0);
+  $559 = $z;
+  $560 = $d;
+  $561 = ((($560)) + 4|0);
+  $562 = ($559>>>0)>($561>>>0);
+  if ($562) {
+   $563 = $d;
+   $564 = ((($563)) + 4|0);
+   $z = $564;
+  }
+ }
+ while(1) {
+  $565 = $z;
+  $566 = $a;
+  $567 = ($565>>>0)>($566>>>0);
+  if (!($567)) {
+   break;
+  }
+  $568 = $z;
+  $569 = ((($568)) + -4|0);
+  $570 = HEAP32[$569>>2]|0;
+  $571 = ($570|0)!=(0);
+  $572 = $571 ^ 1;
+  if (!($572)) {
+   break;
+  }
+  $573 = $z;
+  $574 = ((($573)) + -4|0);
+  $z = $574;
+ }
+ $575 = $6;
+ $576 = $575 | 32;
+ $577 = ($576|0)==(103);
+ do {
+  if ($577) {
+   $578 = $4;
+   $579 = ($578|0)!=(0);
+   if (!($579)) {
+    $580 = $4;
+    $581 = (($580) + 1)|0;
+    $4 = $581;
+   }
+   $582 = $4;
+   $583 = $e;
+   $584 = ($582|0)>($583|0);
+   $585 = $e;
+   $586 = ($585|0)>=(-4);
+   $or$cond6 = $584 & $586;
+   $587 = $6;
+   if ($or$cond6) {
+    $588 = (($587) + -1)|0;
+    $6 = $588;
+    $589 = $e;
+    $590 = (($589) + 1)|0;
+    $591 = $4;
+    $592 = (($591) - ($590))|0;
+    $4 = $592;
+   } else {
+    $593 = (($587) - 2)|0;
+    $6 = $593;
+    $594 = $4;
+    $595 = (($594) + -1)|0;
+    $4 = $595;
+   }
+   $596 = $5;
+   $597 = $596 & 8;
+   $598 = ($597|0)!=(0);
+   if (!($598)) {
+    $599 = $z;
+    $600 = $a;
+    $601 = ($599>>>0)>($600>>>0);
+    L165: do {
+     if ($601) {
+      $602 = $z;
+      $603 = ((($602)) + -4|0);
+      $604 = HEAP32[$603>>2]|0;
+      $605 = ($604|0)!=(0);
+      if ($605) {
+       $i = 10;
+       $j = 0;
+       while(1) {
+        $606 = $z;
+        $607 = ((($606)) + -4|0);
+        $608 = HEAP32[$607>>2]|0;
+        $609 = $i;
+        $610 = (($608>>>0) % ($609>>>0))&-1;
+        $611 = ($610|0)==(0);
+        if (!($611)) {
+         break L165;
+        }
+        $612 = $i;
+        $613 = ($612*10)|0;
+        $i = $613;
+        $614 = $j;
+        $615 = (($614) + 1)|0;
+        $j = $615;
+       }
+      } else {
+       label = 119;
+      }
+     } else {
+      label = 119;
+     }
+    } while(0);
+    if ((label|0) == 119) {
+     $j = 9;
+    }
+    $616 = $6;
+    $617 = $616 | 32;
+    $618 = ($617|0)==(102);
+    $619 = $4;
+    $620 = $z;
+    $621 = $r;
+    $622 = $620;
+    $623 = $621;
+    $624 = (($622) - ($623))|0;
+    $625 = (($624|0) / 4)&-1;
+    $626 = (($625) - 1)|0;
+    $627 = ($626*9)|0;
+    if ($618) {
+     $628 = $j;
+     $629 = (($627) - ($628))|0;
+     $630 = (0)>($629|0);
+     if ($630) {
+      $642 = 0;
+     } else {
+      $631 = $z;
+      $632 = $r;
+      $633 = $631;
+      $634 = $632;
+      $635 = (($633) - ($634))|0;
+      $636 = (($635|0) / 4)&-1;
+      $637 = (($636) - 1)|0;
+      $638 = ($637*9)|0;
+      $639 = $j;
+      $640 = (($638) - ($639))|0;
+      $642 = $640;
+     }
+     $641 = ($619|0)<($642|0);
+     do {
+      if ($641) {
+       $643 = $4;
+       $665 = $643;
+      } else {
+       $644 = $z;
+       $645 = $r;
+       $646 = $644;
+       $647 = $645;
+       $648 = (($646) - ($647))|0;
+       $649 = (($648|0) / 4)&-1;
+       $650 = (($649) - 1)|0;
+       $651 = ($650*9)|0;
+       $652 = $j;
+       $653 = (($651) - ($652))|0;
+       $654 = (0)>($653|0);
+       if ($654) {
+        $665 = 0;
+        break;
+       }
+       $655 = $z;
+       $656 = $r;
+       $657 = $655;
+       $658 = $656;
+       $659 = (($657) - ($658))|0;
+       $660 = (($659|0) / 4)&-1;
+       $661 = (($660) - 1)|0;
+       $662 = ($661*9)|0;
+       $663 = $j;
+       $664 = (($662) - ($663))|0;
+       $665 = $664;
+      }
+     } while(0);
+     $4 = $665;
+     break;
+    } else {
+     $666 = $e;
+     $667 = (($627) + ($666))|0;
+     $668 = $j;
+     $669 = (($667) - ($668))|0;
+     $670 = (0)>($669|0);
+     if ($670) {
+      $684 = 0;
+     } else {
+      $671 = $z;
+      $672 = $r;
+      $673 = $671;
+      $674 = $672;
+      $675 = (($673) - ($674))|0;
+      $676 = (($675|0) / 4)&-1;
+      $677 = (($676) - 1)|0;
+      $678 = ($677*9)|0;
+      $679 = $e;
+      $680 = (($678) + ($679))|0;
+      $681 = $j;
+      $682 = (($680) - ($681))|0;
+      $684 = $682;
+     }
+     $683 = ($619|0)<($684|0);
+     do {
+      if ($683) {
+       $685 = $4;
+       $711 = $685;
+      } else {
+       $686 = $z;
+       $687 = $r;
+       $688 = $686;
+       $689 = $687;
+       $690 = (($688) - ($689))|0;
+       $691 = (($690|0) / 4)&-1;
+       $692 = (($691) - 1)|0;
+       $693 = ($692*9)|0;
+       $694 = $e;
+       $695 = (($693) + ($694))|0;
+       $696 = $j;
+       $697 = (($695) - ($696))|0;
+       $698 = (0)>($697|0);
+       if ($698) {
+        $711 = 0;
+        break;
+       }
+       $699 = $z;
+       $700 = $r;
+       $701 = $699;
+       $702 = $700;
+       $703 = (($701) - ($702))|0;
+       $704 = (($703|0) / 4)&-1;
+       $705 = (($704) - 1)|0;
+       $706 = ($705*9)|0;
+       $707 = $e;
+       $708 = (($706) + ($707))|0;
+       $709 = $j;
+       $710 = (($708) - ($709))|0;
+       $711 = $710;
+      }
+     } while(0);
+     $4 = $711;
+     break;
+    }
+   }
+  }
+ } while(0);
+ $712 = $4;
+ $713 = (1 + ($712))|0;
+ $714 = $4;
+ $715 = ($714|0)!=(0);
+ if ($715) {
+  $720 = 1;
+ } else {
+  $716 = $5;
+  $717 = $716 & 8;
+  $718 = ($717|0)!=(0);
+  $720 = $718;
+ }
+ $719 = $720&1;
+ $721 = (($713) + ($719))|0;
+ $l = $721;
+ $722 = $6;
+ $723 = $722 | 32;
+ $724 = ($723|0)==(102);
+ $725 = $e;
+ if ($724) {
+  $726 = ($725|0)>(0);
+  if ($726) {
+   $727 = $e;
+   $728 = $l;
+   $729 = (($728) + ($727))|0;
+   $l = $729;
+  }
+ } else {
+  $730 = ($725|0)<(0);
+  $731 = $e;
+  $732 = (0 - ($731))|0;
+  $733 = $730 ? $732 : $731;
+  $734 = $ebuf;
+  $735 = (_fmt_u($733,$734)|0);
+  $estr = $735;
+  while(1) {
+   $736 = $ebuf;
+   $737 = $estr;
+   $738 = $736;
+   $739 = $737;
+   $740 = (($738) - ($739))|0;
+   $741 = ($740|0)<(2);
+   if (!($741)) {
+    break;
+   }
+   $742 = $estr;
+   $743 = ((($742)) + -1|0);
+   $estr = $743;
+   HEAP8[$743>>0] = 48;
+  }
+  $744 = $e;
+  $745 = ($744|0)<(0);
+  $746 = $745 ? 45 : 43;
+  $747 = $746&255;
+  $748 = $estr;
+  $749 = ((($748)) + -1|0);
+  $estr = $749;
+  HEAP8[$749>>0] = $747;
+  $750 = $6;
+  $751 = $750&255;
+  $752 = $estr;
+  $753 = ((($752)) + -1|0);
+  $estr = $753;
+  HEAP8[$753>>0] = $751;
+  $754 = $ebuf;
+  $755 = $estr;
+  $756 = $754;
+  $757 = $755;
+  $758 = (($756) - ($757))|0;
+  $759 = $l;
+  $760 = (($759) + ($758))|0;
+  $l = $760;
+ }
+ $761 = $1;
+ $762 = $3;
+ $763 = $pl;
+ $764 = $l;
+ $765 = (($763) + ($764))|0;
+ $766 = $5;
+ _pad($761,32,$762,$765,$766);
+ $767 = $1;
+ $768 = $prefix;
+ $769 = $pl;
+ _out($767,$768,$769);
+ $770 = $1;
+ $771 = $3;
+ $772 = $pl;
+ $773 = $l;
+ $774 = (($772) + ($773))|0;
+ $775 = $5;
+ $776 = $775 ^ 65536;
+ _pad($770,48,$771,$774,$776);
+ $777 = $6;
+ $778 = $777 | 32;
+ $779 = ($778|0)==(102);
+ if ($779) {
+  $780 = $a;
+  $781 = $r;
+  $782 = ($780>>>0)>($781>>>0);
+  if ($782) {
+   $783 = $r;
+   $a = $783;
+  }
+  $784 = $a;
+  $d = $784;
+  while(1) {
+   $785 = $d;
+   $786 = $r;
+   $787 = ($785>>>0)<=($786>>>0);
+   if (!($787)) {
+    break;
+   }
+   $788 = $d;
+   $789 = HEAP32[$788>>2]|0;
+   $790 = ((($buf)) + 9|0);
+   $791 = (_fmt_u($789,$790)|0);
+   $ss6 = $791;
+   $792 = $d;
+   $793 = $a;
+   $794 = ($792|0)!=($793|0);
+   L214: do {
+    if ($794) {
+     while(1) {
+      $795 = $ss6;
+      $796 = ($795>>>0)>($buf>>>0);
+      if (!($796)) {
+       break L214;
+      }
+      $797 = $ss6;
+      $798 = ((($797)) + -1|0);
+      $ss6 = $798;
+      HEAP8[$798>>0] = 48;
+     }
+    } else {
+     $799 = $ss6;
+     $800 = ((($buf)) + 9|0);
+     $801 = ($799|0)==($800|0);
+     if ($801) {
+      $802 = $ss6;
+      $803 = ((($802)) + -1|0);
+      $ss6 = $803;
+      HEAP8[$803>>0] = 48;
+     }
+    }
+   } while(0);
+   $804 = $1;
+   $805 = $ss6;
+   $806 = ((($buf)) + 9|0);
+   $807 = $ss6;
+   $808 = $806;
+   $809 = $807;
+   $810 = (($808) - ($809))|0;
+   _out($804,$805,$810);
+   $811 = $d;
+   $812 = ((($811)) + 4|0);
+   $d = $812;
+  }
+  $813 = $4;
+  $814 = ($813|0)!=(0);
+  if ($814) {
+   label = 157;
+  } else {
+   $815 = $5;
+   $816 = $815 & 8;
+   $817 = ($816|0)!=(0);
+   if ($817) {
+    label = 157;
+   }
+  }
+  if ((label|0) == 157) {
+   $818 = $1;
+   _out($818,72376,1);
+  }
+  while(1) {
+   $819 = $d;
+   $820 = $z;
+   $821 = ($819>>>0)<($820>>>0);
+   $822 = $4;
+   $823 = ($822|0)>(0);
+   $824 = $821 ? $823 : 0;
+   if (!($824)) {
+    break;
+   }
+   $825 = $d;
+   $826 = HEAP32[$825>>2]|0;
+   $827 = ((($buf)) + 9|0);
+   $828 = (_fmt_u($826,$827)|0);
+   $ss7 = $828;
+   while(1) {
+    $829 = $ss7;
+    $830 = ($829>>>0)>($buf>>>0);
+    if (!($830)) {
+     break;
+    }
+    $831 = $ss7;
+    $832 = ((($831)) + -1|0);
+    $ss7 = $832;
+    HEAP8[$832>>0] = 48;
+   }
+   $833 = $1;
+   $834 = $ss7;
+   $835 = $4;
+   $836 = (9)<($835|0);
+   $837 = $4;
+   $838 = $836 ? 9 : $837;
+   _out($833,$834,$838);
+   $839 = $d;
+   $840 = ((($839)) + 4|0);
+   $d = $840;
+   $841 = $4;
+   $842 = (($841) - 9)|0;
+   $4 = $842;
+  }
+  $843 = $1;
+  $844 = $4;
+  $845 = (($844) + 9)|0;
+  _pad($843,48,$845,9,0);
+ } else {
+  $846 = $z;
+  $847 = $a;
+  $848 = ($846>>>0)<=($847>>>0);
+  if ($848) {
+   $849 = $a;
+   $850 = ((($849)) + 4|0);
+   $z = $850;
+  }
+  $851 = $a;
+  $d = $851;
+  while(1) {
+   $852 = $d;
+   $853 = $z;
+   $854 = ($852>>>0)<($853>>>0);
+   $855 = $4;
+   $856 = ($855|0)>=(0);
+   $857 = $854 ? $856 : 0;
+   if (!($857)) {
+    break;
+   }
+   $858 = $d;
+   $859 = HEAP32[$858>>2]|0;
+   $860 = ((($buf)) + 9|0);
+   $861 = (_fmt_u($859,$860)|0);
+   $ss8 = $861;
+   $862 = $ss8;
+   $863 = ((($buf)) + 9|0);
+   $864 = ($862|0)==($863|0);
+   if ($864) {
+    $865 = $ss8;
+    $866 = ((($865)) + -1|0);
+    $ss8 = $866;
+    HEAP8[$866>>0] = 48;
+   }
+   $867 = $d;
+   $868 = $a;
+   $869 = ($867|0)!=($868|0);
+   L244: do {
+    if ($869) {
+     while(1) {
+      $870 = $ss8;
+      $871 = ($870>>>0)>($buf>>>0);
+      if (!($871)) {
+       break L244;
+      }
+      $872 = $ss8;
+      $873 = ((($872)) + -1|0);
+      $ss8 = $873;
+      HEAP8[$873>>0] = 48;
+     }
+    } else {
+     $874 = $1;
+     $875 = $ss8;
+     $876 = ((($875)) + 1|0);
+     $ss8 = $876;
+     _out($874,$875,1);
+     $877 = $4;
+     $878 = ($877|0)>(0);
+     if (!($878)) {
+      $879 = $5;
+      $880 = $879 & 8;
+      $881 = ($880|0)!=(0);
+      if (!($881)) {
+       break;
+      }
+     }
+     $882 = $1;
+     _out($882,72376,1);
+    }
+   } while(0);
+   $883 = $1;
+   $884 = $ss8;
+   $885 = ((($buf)) + 9|0);
+   $886 = $ss8;
+   $887 = $885;
+   $888 = $886;
+   $889 = (($887) - ($888))|0;
+   $890 = $4;
+   $891 = ($889|0)<($890|0);
+   if ($891) {
+    $892 = ((($buf)) + 9|0);
+    $893 = $ss8;
+    $894 = $892;
+    $895 = $893;
+    $896 = (($894) - ($895))|0;
+    $898 = $896;
+   } else {
+    $897 = $4;
+    $898 = $897;
+   }
+   _out($883,$884,$898);
+   $899 = ((($buf)) + 9|0);
+   $900 = $ss8;
+   $901 = $899;
+   $902 = $900;
+   $903 = (($901) - ($902))|0;
+   $904 = $4;
+   $905 = (($904) - ($903))|0;
+   $4 = $905;
+   $906 = $d;
+   $907 = ((($906)) + 4|0);
+   $d = $907;
+  }
+  $908 = $1;
+  $909 = $4;
+  $910 = (($909) + 18)|0;
+  _pad($908,48,$910,18,0);
+  $911 = $1;
+  $912 = $estr;
+  $913 = $ebuf;
+  $914 = $estr;
+  $915 = $913;
+  $916 = $914;
+  $917 = (($915) - ($916))|0;
+  _out($911,$912,$917);
+ }
+ $918 = $1;
+ $919 = $3;
+ $920 = $pl;
+ $921 = $l;
+ $922 = (($920) + ($921))|0;
+ $923 = $5;
+ $924 = $923 ^ 8192;
+ _pad($918,32,$919,$922,$924);
+ $925 = $3;
+ $926 = $pl;
+ $927 = $l;
+ $928 = (($926) + ($927))|0;
+ $929 = ($925|0)>($928|0);
+ if ($929) {
+  $930 = $3;
+  $934 = $930;
+ } else {
+  $931 = $pl;
+  $932 = $l;
+  $933 = (($931) + ($932))|0;
+  $934 = $933;
+ }
+ $0 = $934;
+ $935 = $0;
+ STACKTOP = sp;return ($935|0);
+}
+function ___FLOAT_BITS($__f) {
+ $__f = +$__f;
+ var $0 = 0.0, $1 = 0.0, $2 = 0, $__u = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $__u = sp;
+ $0 = $__f;
+ $1 = $0;
+ HEAPF32[$__u>>2] = $1;
+ $2 = HEAP32[$__u>>2]|0;
+ STACKTOP = sp;return ($2|0);
+}
+function ___DOUBLE_BITS($__f) {
+ $__f = +$__f;
+ var $0 = 0.0, $1 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $__u = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $__u = sp;
+ $0 = $__f;
+ $1 = $0;
+ HEAPF64[$__u>>3] = $1;
+ $2 = $__u;
+ $3 = $2;
+ $4 = HEAP32[$3>>2]|0;
+ $5 = (($2) + 4)|0;
+ $6 = $5;
+ $7 = HEAP32[$6>>2]|0;
+ tempRet0 = ($7);
+ STACKTOP = sp;return ($4|0);
+}
+function _pad($f,$c,$w,$l,$fl) {
+ $f = $f|0;
+ $c = $c|0;
+ $w = $w|0;
+ $l = $l|0;
+ $fl = $fl|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $pad = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 288|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $pad = sp + 16|0;
+ $0 = $f;
+ $1 = $c;
+ $2 = $w;
+ $3 = $l;
+ $4 = $fl;
+ $5 = $4;
+ $6 = $5 & 73728;
+ $7 = ($6|0)!=(0);
+ if ($7) {
+  STACKTOP = sp;return;
+ }
+ $8 = $3;
+ $9 = $2;
+ $10 = ($8|0)>=($9|0);
+ if ($10) {
+  STACKTOP = sp;return;
+ }
+ $11 = $2;
+ $12 = $3;
+ $13 = (($11) - ($12))|0;
+ $3 = $13;
+ $14 = $1;
+ $15 = $14 << 24 >> 24;
+ $16 = $15&255;
+ $17 = $3;
+ $18 = ($17|0)>(256);
+ $19 = $3;
+ $20 = $18 ? 256 : $19;
+ _memset(($pad|0),($16|0),($20|0))|0;
+ while(1) {
+  $21 = $3;
+  $22 = ($21|0)>=(256);
+  $23 = $0;
+  if (!($22)) {
+   break;
+  }
+  _out($23,$pad,256);
+  $24 = $3;
+  $25 = (($24) - 256)|0;
+  $3 = $25;
+ }
+ $26 = $3;
+ _out($23,$pad,$26);
+ STACKTOP = sp;return;
+}
+function _out($f,$s,$l) {
+ $f = $f|0;
+ $s = $s|0;
+ $l = $l|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 24|0;
+ $3 = sp;
+ $0 = $f;
+ $1 = $s;
+ $2 = $l;
+ $4 = $0;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $0;
+ $7 = ((($6)) + 4|0);
+ $8 = $1;
+ $9 = $2;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$7+4>>2]|0;
+ _mrb_str_cat($3,$5,$$byval_copy,$8,$9);
+ STACKTOP = sp;return;
+}
+function _fmt_u($x,$s) {
+ $x = $x|0;
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $x;
+ $1 = $s;
+ while(1) {
+  $2 = $0;
+  $3 = ($2|0)!=(0);
+  if (!($3)) {
+   break;
+  }
+  $4 = $0;
+  $5 = (($4>>>0) % 10)&-1;
+  $6 = (48 + ($5))|0;
+  $7 = $6&255;
+  $8 = $1;
+  $9 = ((($8)) + -1|0);
+  $1 = $9;
+  HEAP8[$9>>0] = $7;
+  $10 = $0;
+  $11 = (($10>>>0) / 10)&-1;
+  $0 = $11;
+ }
+ $12 = $1;
+ STACKTOP = sp;return ($12|0);
+}
+function _mrb_realloc_simple($mrb,$p,$len) {
+ $mrb = $mrb|0;
+ $p = $p|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $or$cond = 0, $p2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $p;
+ $2 = $len;
+ $3 = $0;
+ $4 = ((($3)) + 4|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $0;
+ $7 = $1;
+ $8 = $2;
+ $9 = $0;
+ $10 = ((($9)) + 8|0);
+ $11 = HEAP32[$10>>2]|0;
+ $12 = (FUNCTION_TABLE_iiiii[$5 & 255]($6,$7,$8,$11)|0);
+ $p2 = $12;
+ $13 = $p2;
+ $14 = ($13|0)==(0|0);
+ $15 = $2;
+ $16 = ($15>>>0)>(0);
+ $or$cond = $14 & $16;
+ if (!($or$cond)) {
+  $40 = $p2;
+  STACKTOP = sp;return ($40|0);
+ }
+ $17 = $0;
+ $18 = ((($17)) + 92|0);
+ $19 = HEAP32[$18>>2]|0;
+ $20 = ($19|0)!=(0|0);
+ if (!($20)) {
+  $40 = $p2;
+  STACKTOP = sp;return ($40|0);
+ }
+ $21 = $0;
+ _mrb_full_gc($21);
+ $22 = $0;
+ $23 = ((($22)) + 4|0);
+ $24 = HEAP32[$23>>2]|0;
+ $25 = $0;
+ $26 = $1;
+ $27 = $2;
+ $28 = $0;
+ $29 = ((($28)) + 8|0);
+ $30 = HEAP32[$29>>2]|0;
+ $31 = (FUNCTION_TABLE_iiiii[$24 & 255]($25,$26,$27,$30)|0);
+ $p2 = $31;
+ $32 = $p2;
+ $33 = ($32|0)!=(0|0);
+ if ($33) {
+  $40 = $p2;
+  STACKTOP = sp;return ($40|0);
+ }
+ $34 = $0;
+ $35 = ((($34)) + 92|0);
+ $36 = ((($35)) + 452|0);
+ $37 = HEAP8[$36>>0]|0;
+ $38 = $37 & -9;
+ $39 = $38 | 8;
+ HEAP8[$36>>0] = $39;
+ $40 = $p2;
+ STACKTOP = sp;return ($40|0);
+}
+function _mrb_full_gc($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $gc = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = ((($1)) + 92|0);
+ $gc = $2;
+ $3 = $gc;
+ $4 = ((($3)) + 452|0);
+ $5 = HEAP8[$4>>0]|0;
+ $6 = $5 & 1;
+ $7 = ($6<<24>>24)!=(0);
+ if ($7) {
+  STACKTOP = sp;return;
+ }
+ $8 = $gc;
+ $9 = ((($8)) + 452|0);
+ $10 = HEAP8[$9>>0]|0;
+ $11 = ($10&255) >>> 2;
+ $12 = $11 & 1;
+ $13 = ($12<<24>>24)!=(0);
+ if ($13) {
+  $14 = $0;
+  $15 = $gc;
+  _clear_all_old($14,$15);
+  $16 = $gc;
+  $17 = ((($16)) + 452|0);
+  $18 = HEAP8[$17>>0]|0;
+  $19 = $18 & -3;
+  $20 = $19 | 2;
+  HEAP8[$17>>0] = $20;
+ } else {
+  $21 = $gc;
+  $22 = ((($21)) + 420|0);
+  $23 = HEAP32[$22>>2]|0;
+  $24 = ($23|0)!=(0);
+  if ($24) {
+   $25 = $0;
+   $26 = $gc;
+   _incremental_gc_until($25,$26,0);
+  }
+ }
+ $27 = $0;
+ $28 = $gc;
+ _incremental_gc_until($27,$28,0);
+ $29 = $gc;
+ $30 = ((($29)) + 436|0);
+ $31 = HEAP32[$30>>2]|0;
+ $32 = (($31>>>0) / 100)&-1;
+ $33 = $gc;
+ $34 = ((($33)) + 444|0);
+ $35 = HEAP32[$34>>2]|0;
+ $36 = Math_imul($32, $35)|0;
+ $37 = $gc;
+ $38 = ((($37)) + 440|0);
+ HEAP32[$38>>2] = $36;
+ $39 = $gc;
+ $40 = ((($39)) + 452|0);
+ $41 = HEAP8[$40>>0]|0;
+ $42 = ($41&255) >>> 2;
+ $43 = $42 & 1;
+ $44 = ($43<<24>>24)!=(0);
+ if (!($44)) {
+  STACKTOP = sp;return;
+ }
+ $45 = $gc;
+ $46 = ((($45)) + 436|0);
+ $47 = HEAP32[$46>>2]|0;
+ $48 = (($47>>>0) / 100)&-1;
+ $49 = ($48*200)|0;
+ $50 = $gc;
+ $51 = ((($50)) + 456|0);
+ HEAP32[$51>>2] = $49;
+ $52 = $gc;
+ $53 = ((($52)) + 452|0);
+ $54 = HEAP8[$53>>0]|0;
+ $55 = $54 & -3;
+ HEAP8[$53>>0] = $55;
+ STACKTOP = sp;return;
+}
+function _clear_all_old($mrb,$gc) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, $origin_mode = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $gc;
+ $2 = $1;
+ $3 = ((($2)) + 452|0);
+ $4 = HEAP8[$3>>0]|0;
+ $5 = ($4&255) >>> 2;
+ $6 = $5 & 1;
+ $origin_mode = $6;
+ $7 = $1;
+ $8 = ((($7)) + 452|0);
+ $9 = HEAP8[$8>>0]|0;
+ $10 = ($9&255) >>> 2;
+ $11 = $10 & 1;
+ $12 = $11&255;
+ $13 = ($12|0)!=(0);
+ if ($13) {
+  $14 = $1;
+  $15 = ((($14)) + 452|0);
+  $16 = HEAP8[$15>>0]|0;
+  $17 = ($16&255) >>> 1;
+  $18 = $17 & 1;
+  $19 = $18&255;
+  $20 = ($19|0)!=(0);
+  if ($20) {
+   $21 = $0;
+   $22 = $1;
+   _incremental_gc_until($21,$22,0);
+  }
+ }
+ $23 = $1;
+ $24 = ((($23)) + 452|0);
+ $25 = HEAP8[$24>>0]|0;
+ $26 = $25 & -5;
+ HEAP8[$24>>0] = $26;
+ $27 = $0;
+ $28 = $1;
+ _prepare_incremental_sweep($27,$28);
+ $29 = $0;
+ $30 = $1;
+ _incremental_gc_until($29,$30,0);
+ $31 = $origin_mode;
+ $32 = $1;
+ $33 = ((($32)) + 452|0);
+ $34 = HEAP8[$33>>0]|0;
+ $35 = $31 & 1;
+ $36 = ($35 << 2)&255;
+ $37 = $34 & -5;
+ $38 = $37 | $36;
+ HEAP8[$33>>0] = $38;
+ $39 = $1;
+ $40 = ((($39)) + 428|0);
+ HEAP32[$40>>2] = 0;
+ $41 = $1;
+ $42 = ((($41)) + 432|0);
+ HEAP32[$42>>2] = 0;
+ STACKTOP = sp;return;
+}
+function _incremental_gc_until($mrb,$gc,$to_state) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ $to_state = $to_state|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $gc;
+ $2 = $to_state;
+ while(1) {
+  $3 = $0;
+  $4 = $1;
+  (_incremental_gc($3,$4,-1)|0);
+  $5 = $1;
+  $6 = ((($5)) + 420|0);
+  $7 = HEAP32[$6>>2]|0;
+  $8 = $2;
+  $9 = ($7|0)!=($8|0);
+  if (!($9)) {
+   break;
+  }
+ }
+ STACKTOP = sp;return;
+}
+function _incremental_gc($mrb,$gc,$limit) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ $limit = $limit|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $tried_sweep = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $gc;
+ $3 = $limit;
+ $4 = $2;
+ $5 = ((($4)) + 420|0);
+ $6 = HEAP32[$5>>2]|0;
+ switch ($6|0) {
+ case 0:  {
+  $7 = $1;
+  $8 = $2;
+  _root_scan_phase($7,$8);
+  $9 = $2;
+  $10 = ((($9)) + 420|0);
+  HEAP32[$10>>2] = 1;
+  $11 = $2;
+  $12 = ((($11)) + 424|0);
+  $13 = HEAP32[$12>>2]|0;
+  $14 = $13 ^ 3;
+  $15 = $2;
+  $16 = ((($15)) + 424|0);
+  HEAP32[$16>>2] = $14;
+  $0 = 0;
+  $36 = $0;
+  STACKTOP = sp;return ($36|0);
+  break;
+ }
+ case 1:  {
+  $17 = $2;
+  $18 = ((($17)) + 428|0);
+  $19 = HEAP32[$18>>2]|0;
+  $20 = ($19|0)!=(0|0);
+  $21 = $1;
+  $22 = $2;
+  if ($20) {
+   $23 = $3;
+   $24 = (_incremental_marking_phase($21,$22,$23)|0);
+   $0 = $24;
+   $36 = $0;
+   STACKTOP = sp;return ($36|0);
+  } else {
+   _final_marking_phase($21,$22);
+   $25 = $1;
+   $26 = $2;
+   _prepare_incremental_sweep($25,$26);
+   $0 = 0;
+   $36 = $0;
+   STACKTOP = sp;return ($36|0);
+  }
+  break;
+ }
+ case 2:  {
+  $tried_sweep = 0;
+  $27 = $1;
+  $28 = $2;
+  $29 = $3;
+  $30 = (_incremental_sweep_phase($27,$28,$29)|0);
+  $tried_sweep = $30;
+  $31 = $tried_sweep;
+  $32 = ($31|0)==(0);
+  if ($32) {
+   $33 = $2;
+   $34 = ((($33)) + 420|0);
+   HEAP32[$34>>2] = 0;
+  }
+  $35 = $tried_sweep;
+  $0 = $35;
+  $36 = $0;
+  STACKTOP = sp;return ($36|0);
+  break;
+ }
+ default: {
+  $0 = 0;
+  $36 = $0;
+  STACKTOP = sp;return ($36|0);
+ }
+ }
+ return (0)|0;
+}
+function _root_scan_phase($mrb,$gc) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $8 = 0, $9 = 0, $e = 0, $i = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $gc;
+ $2 = $1;
+ $3 = ((($2)) + 452|0);
+ $4 = HEAP8[$3>>0]|0;
+ $5 = ($4&255) >>> 2;
+ $6 = $5 & 1;
+ $7 = $6&255;
+ $8 = ($7|0)!=(0);
+ if ($8) {
+  $9 = $1;
+  $10 = ((($9)) + 452|0);
+  $11 = HEAP8[$10>>0]|0;
+  $12 = ($11&255) >>> 1;
+  $13 = $12 & 1;
+  $14 = ($13<<24>>24)!=(0);
+  if ($14) {
+   label = 3;
+  }
+ } else {
+  label = 3;
+ }
+ if ((label|0) == 3) {
+  $15 = $1;
+  $16 = ((($15)) + 428|0);
+  HEAP32[$16>>2] = 0;
+  $17 = $1;
+  $18 = ((($17)) + 432|0);
+  HEAP32[$18>>2] = 0;
+ }
+ $19 = $0;
+ _mrb_gc_mark_gv($19);
+ $i = 0;
+ $20 = $1;
+ $21 = ((($20)) + 416|0);
+ $22 = HEAP32[$21>>2]|0;
+ $e = $22;
+ while(1) {
+  $23 = $i;
+  $24 = $e;
+  $25 = ($23>>>0)<($24>>>0);
+  $26 = $0;
+  if (!($25)) {
+   break;
+  }
+  $27 = $i;
+  $28 = $1;
+  $29 = ((($28)) + 16|0);
+  $30 = (($29) + ($27<<2)|0);
+  $31 = HEAP32[$30>>2]|0;
+  _mrb_gc_mark($26,$31);
+  $32 = $i;
+  $33 = (($32) + 1)|0;
+  $i = $33;
+ }
+ $34 = $0;
+ $35 = ((($34)) + 32|0);
+ $36 = HEAP32[$35>>2]|0;
+ _mrb_gc_mark($26,$36);
+ $37 = $0;
+ $38 = $0;
+ $39 = ((($38)) + 28|0);
+ $40 = HEAP32[$39>>2]|0;
+ _mrb_gc_mark($37,$40);
+ $41 = $0;
+ $42 = $0;
+ $43 = ((($42)) + 20|0);
+ $44 = HEAP32[$43>>2]|0;
+ _mrb_gc_mark($41,$44);
+ $45 = $0;
+ $46 = $0;
+ $47 = ((($46)) + 576|0);
+ $48 = HEAP32[$47>>2]|0;
+ _mrb_gc_mark($45,$48);
+ $49 = $0;
+ $50 = $0;
+ $51 = ((($50)) + 16|0);
+ $52 = HEAP32[$51>>2]|0;
+ _mark_context($49,$52);
+ $53 = $0;
+ $54 = ((($53)) + 16|0);
+ $55 = HEAP32[$54>>2]|0;
+ $56 = ((($55)) + 48|0);
+ $57 = HEAP32[$56>>2]|0;
+ $58 = ($57|0)!=(0|0);
+ if ($58) {
+  $59 = $0;
+  $60 = $0;
+  $61 = ((($60)) + 16|0);
+  $62 = HEAP32[$61>>2]|0;
+  $63 = ((($62)) + 48|0);
+  $64 = HEAP32[$63>>2]|0;
+  _mrb_gc_mark($59,$64);
+ }
+ $65 = $0;
+ $66 = ((($65)) + 16|0);
+ $67 = HEAP32[$66>>2]|0;
+ $68 = $0;
+ $69 = ((($68)) + 12|0);
+ $70 = HEAP32[$69>>2]|0;
+ $71 = ($67|0)!=($70|0);
+ if (!($71)) {
+  STACKTOP = sp;return;
+ }
+ $72 = $0;
+ $73 = $0;
+ $74 = ((($73)) + 12|0);
+ $75 = HEAP32[$74>>2]|0;
+ _mark_context($72,$75);
+ STACKTOP = sp;return;
+}
+function _mrb_gc_mark($mrb,$obj) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $obj;
+ $2 = $1;
+ $3 = ($2|0)==(0|0);
+ if ($3) {
+  STACKTOP = sp;return;
+ }
+ $4 = $1;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5 >>> 8;
+ $7 = $6 & 7;
+ $8 = $7 & 3;
+ $9 = ($8|0)!=(0);
+ if (!($9)) {
+  STACKTOP = sp;return;
+ }
+ $10 = $0;
+ $11 = $0;
+ $12 = ((($11)) + 92|0);
+ $13 = $1;
+ _add_gray_list($10,$12,$13);
+ STACKTOP = sp;return;
+}
+function _add_gray_list($mrb,$gc,$obj) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $gc;
+ $2 = $obj;
+ $3 = $2;
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $4 & -1793;
+ HEAP32[$3>>2] = $5;
+ $6 = $1;
+ $7 = ((($6)) + 428|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = $2;
+ $10 = ((($9)) + 8|0);
+ HEAP32[$10>>2] = $8;
+ $11 = $2;
+ $12 = $1;
+ $13 = ((($12)) + 428|0);
+ HEAP32[$13>>2] = $11;
+ STACKTOP = sp;return;
+}
+function _mark_context($mrb,$c) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, $ci = 0, $e = 0, $i = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $c;
+ $e = 0;
+ $2 = $0;
+ $3 = $1;
+ _mark_context_stack($2,$3);
+ $4 = $1;
+ $5 = ((($4)) + 20|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = ($6|0)!=(0|0);
+ L1: do {
+  if ($7) {
+   $8 = $1;
+   $9 = ((($8)) + 20|0);
+   $10 = HEAP32[$9>>2]|0;
+   $ci = $10;
+   while(1) {
+    $11 = $ci;
+    $12 = $1;
+    $13 = ((($12)) + 16|0);
+    $14 = HEAP32[$13>>2]|0;
+    $15 = ($11>>>0)<=($14>>>0);
+    if (!($15)) {
+     break L1;
+    }
+    $16 = $ci;
+    $17 = ((($16)) + 20|0);
+    $18 = HEAP32[$17>>2]|0;
+    $19 = $e;
+    $20 = ($18|0)>($19|0);
+    if ($20) {
+     $21 = $ci;
+     $22 = ((($21)) + 20|0);
+     $23 = HEAP32[$22>>2]|0;
+     $e = $23;
+    }
+    $24 = $0;
+    $25 = $ci;
+    $26 = ((($25)) + 24|0);
+    $27 = HEAP32[$26>>2]|0;
+    _mrb_gc_mark($24,$27);
+    $28 = $0;
+    $29 = $ci;
+    $30 = ((($29)) + 4|0);
+    $31 = HEAP32[$30>>2]|0;
+    _mrb_gc_mark($28,$31);
+    $32 = $0;
+    $33 = $ci;
+    $34 = ((($33)) + 44|0);
+    $35 = HEAP32[$34>>2]|0;
+    _mrb_gc_mark($32,$35);
+    $36 = $ci;
+    $37 = ((($36)) + 48|0);
+    $ci = $37;
+   }
+  }
+ } while(0);
+ $i = 0;
+ while(1) {
+  $38 = $i;
+  $39 = $e;
+  $40 = ($38|0)<($39|0);
+  if (!($40)) {
+   break;
+  }
+  $41 = $0;
+  $42 = $i;
+  $43 = $1;
+  $44 = ((($43)) + 36|0);
+  $45 = HEAP32[$44>>2]|0;
+  $46 = (($45) + ($42<<2)|0);
+  $47 = HEAP32[$46>>2]|0;
+  _mrb_gc_mark($41,$47);
+  $48 = $i;
+  $49 = (($48) + 1)|0;
+  $i = $49;
+ }
+ $50 = $1;
+ $51 = HEAP32[$50>>2]|0;
+ $52 = ($51|0)!=(0|0);
+ if (!($52)) {
+  STACKTOP = sp;return;
+ }
+ $53 = $1;
+ $54 = HEAP32[$53>>2]|0;
+ $55 = ((($54)) + 48|0);
+ $56 = HEAP32[$55>>2]|0;
+ $57 = ($56|0)!=(0|0);
+ if (!($57)) {
+  STACKTOP = sp;return;
+ }
+ $58 = $0;
+ $59 = $1;
+ $60 = HEAP32[$59>>2]|0;
+ $61 = ((($60)) + 48|0);
+ $62 = HEAP32[$61>>2]|0;
+ _mrb_gc_mark($58,$62);
+ STACKTOP = sp;return;
+}
+function _mark_context_stack($mrb,$c) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $7 = 0, $8 = 0, $9 = 0, $e = 0, $i = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $1 = $c;
+ $3 = $1;
+ $4 = ((($3)) + 4|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $1;
+ $7 = ((($6)) + 8|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = $5;
+ $10 = $8;
+ $11 = (($9) - ($10))|0;
+ $12 = (($11|0) / 8)&-1;
+ $e = $12;
+ $13 = $1;
+ $14 = ((($13)) + 16|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = ($15|0)!=(0|0);
+ if ($16) {
+  $17 = $1;
+  $18 = ((($17)) + 16|0);
+  $19 = HEAP32[$18>>2]|0;
+  $20 = ((($19)) + 12|0);
+  $21 = HEAP32[$20>>2]|0;
+  $22 = $e;
+  $23 = (($22) + ($21))|0;
+  $e = $23;
+ }
+ $24 = $1;
+ $25 = ((($24)) + 8|0);
+ $26 = HEAP32[$25>>2]|0;
+ $27 = $e;
+ $28 = (($26) + ($27<<3)|0);
+ $29 = $1;
+ $30 = ((($29)) + 12|0);
+ $31 = HEAP32[$30>>2]|0;
+ $32 = ($28>>>0)>($31>>>0);
+ if ($32) {
+  $33 = $1;
+  $34 = ((($33)) + 12|0);
+  $35 = HEAP32[$34>>2]|0;
+  $36 = $1;
+  $37 = ((($36)) + 8|0);
+  $38 = HEAP32[$37>>2]|0;
+  $39 = $35;
+  $40 = $38;
+  $41 = (($39) - ($40))|0;
+  $42 = (($41|0) / 8)&-1;
+  $e = $42;
+ }
+ $i = 0;
+ while(1) {
+  $43 = $i;
+  $44 = $e;
+  $45 = ($43>>>0)<($44>>>0);
+  if (!($45)) {
+   break;
+  }
+  $46 = $i;
+  $47 = $1;
+  $48 = ((($47)) + 8|0);
+  $49 = HEAP32[$48>>2]|0;
+  $50 = (($49) + ($46<<3)|0);
+  ;HEAP32[$v>>2]=HEAP32[$50>>2]|0;HEAP32[$v+4>>2]=HEAP32[$50+4>>2]|0;
+  $51 = ((($v)) + 4|0);
+  $52 = HEAP32[$51>>2]|0;
+  $53 = ($52>>>0)<(8);
+  do {
+   if (!($53)) {
+    $54 = HEAP32[$v>>2]|0;
+    $55 = HEAP32[$54>>2]|0;
+    $56 = $55 & 255;
+    $57 = ($56|0)==(1);
+    if ($57) {
+     $58 = $i;
+     $59 = $1;
+     $60 = ((($59)) + 8|0);
+     $61 = HEAP32[$60>>2]|0;
+     $62 = (($61) + ($58<<3)|0);
+     _mrb_nil_value_53($2);
+     ;HEAP32[$62>>2]=HEAP32[$2>>2]|0;HEAP32[$62+4>>2]=HEAP32[$2+4>>2]|0;
+     break;
+    } else {
+     $63 = $0;
+     $64 = HEAP32[$v>>2]|0;
+     _mrb_gc_mark($63,$64);
+     break;
+    }
+   }
+  } while(0);
+  $65 = $i;
+  $66 = (($65) + 1)|0;
+  $i = $66;
+ }
+ STACKTOP = sp;return;
+}
+function _mrb_nil_value_53($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _incremental_marking_phase($mrb,$gc,$limit) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ $limit = $limit|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $tried_marks = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $gc;
+ $2 = $limit;
+ $tried_marks = 0;
+ while(1) {
+  $3 = $1;
+  $4 = ((($3)) + 428|0);
+  $5 = HEAP32[$4>>2]|0;
+  $6 = ($5|0)!=(0|0);
+  if (!($6)) {
+   label = 5;
+   break;
+  }
+  $7 = $tried_marks;
+  $8 = $2;
+  $9 = ($7>>>0)<($8>>>0);
+  if (!($9)) {
+   label = 5;
+   break;
+  }
+  $10 = $0;
+  $11 = $1;
+  $12 = $1;
+  $13 = ((($12)) + 428|0);
+  $14 = HEAP32[$13>>2]|0;
+  $15 = (_gc_gray_mark($10,$11,$14)|0);
+  $16 = $tried_marks;
+  $17 = (($16) + ($15))|0;
+  $tried_marks = $17;
+ }
+ if ((label|0) == 5) {
+  $18 = $tried_marks;
+  STACKTOP = sp;return ($18|0);
+ }
+ return (0)|0;
+}
+function _gc_gray_mark($mrb,$gc,$obj) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $14 = 0, $15 = 0;
+ var $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0;
+ var $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0;
+ var $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0;
+ var $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0;
+ var $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $a = 0, $c = 0, $c1 = 0, $children = 0, $ci = 0, $i = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $gc;
+ $2 = $obj;
+ $children = 0;
+ $3 = $0;
+ $4 = $1;
+ $5 = $2;
+ _gc_mark_children($3,$4,$5);
+ $6 = $2;
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $7 & 255;
+ switch ($8|0) {
+ case 11:  {
+  $9 = $children;
+  $10 = (($9) + 1)|0;
+  $children = $10;
+  $131 = $children;
+  STACKTOP = sp;return ($131|0);
+  break;
+ }
+ case 10: case 12: case 9:  {
+  $11 = $2;
+  $c = $11;
+  $12 = $0;
+  $13 = $2;
+  $14 = (_mrb_gc_mark_iv_size($12,$13)|0);
+  $15 = $children;
+  $16 = (($15) + ($14))|0;
+  $children = $16;
+  $17 = $0;
+  $18 = $c;
+  $19 = (_mrb_gc_mark_mt_size($17,$18)|0);
+  $20 = $children;
+  $21 = (($20) + ($19))|0;
+  $children = $21;
+  $22 = $children;
+  $23 = (($22) + 1)|0;
+  $children = $23;
+  $131 = $children;
+  STACKTOP = sp;return ($131|0);
+  break;
+ }
+ case 18: case 21: case 8:  {
+  $24 = $0;
+  $25 = $2;
+  $26 = (_mrb_gc_mark_iv_size($24,$25)|0);
+  $27 = $children;
+  $28 = (($27) + ($26))|0;
+  $children = $28;
+  $131 = $children;
+  STACKTOP = sp;return ($131|0);
+  break;
+ }
+ case 20:  {
+  $29 = $2;
+  $30 = HEAP32[$29>>2]|0;
+  $31 = $30 >>> 11;
+  $32 = $children;
+  $33 = (($32) + ($31))|0;
+  $children = $33;
+  $131 = $children;
+  STACKTOP = sp;return ($131|0);
+  break;
+ }
+ case 22:  {
+  $34 = $2;
+  $35 = ((($34)) + 12|0);
+  $36 = HEAP32[$35>>2]|0;
+  $c1 = $36;
+  $37 = $c1;
+  $38 = ($37|0)!=(0|0);
+  if (!($38)) {
+   $131 = $children;
+   STACKTOP = sp;return ($131|0);
+  }
+  $39 = $c1;
+  $40 = ((($39)) + 4|0);
+  $41 = HEAP32[$40>>2]|0;
+  $42 = $c1;
+  $43 = ((($42)) + 8|0);
+  $44 = HEAP32[$43>>2]|0;
+  $45 = $41;
+  $46 = $44;
+  $47 = (($45) - ($46))|0;
+  $48 = (($47|0) / 8)&-1;
+  $i = $48;
+  $49 = $c1;
+  $50 = ((($49)) + 16|0);
+  $51 = HEAP32[$50>>2]|0;
+  $52 = ($51|0)!=(0|0);
+  if ($52) {
+   $53 = $c1;
+   $54 = ((($53)) + 16|0);
+   $55 = HEAP32[$54>>2]|0;
+   $56 = ((($55)) + 12|0);
+   $57 = HEAP32[$56>>2]|0;
+   $58 = $i;
+   $59 = (($58) + ($57))|0;
+   $i = $59;
+  }
+  $60 = $c1;
+  $61 = ((($60)) + 8|0);
+  $62 = HEAP32[$61>>2]|0;
+  $63 = $i;
+  $64 = (($62) + ($63<<3)|0);
+  $65 = $c1;
+  $66 = ((($65)) + 12|0);
+  $67 = HEAP32[$66>>2]|0;
+  $68 = ($64>>>0)>($67>>>0);
+  if ($68) {
+   $69 = $c1;
+   $70 = ((($69)) + 12|0);
+   $71 = HEAP32[$70>>2]|0;
+   $72 = $c1;
+   $73 = ((($72)) + 8|0);
+   $74 = HEAP32[$73>>2]|0;
+   $75 = $71;
+   $76 = $74;
+   $77 = (($75) - ($76))|0;
+   $78 = (($77|0) / 8)&-1;
+   $i = $78;
+  }
+  $79 = $i;
+  $80 = $children;
+  $81 = (($80) + ($79))|0;
+  $children = $81;
+  $82 = $c1;
+  $83 = ((($82)) + 16|0);
+  $84 = HEAP32[$83>>2]|0;
+  $85 = ($84|0)!=(0|0);
+  if ($85) {
+   $86 = $c1;
+   $87 = ((($86)) + 16|0);
+   $88 = HEAP32[$87>>2]|0;
+   $89 = ((($88)) + 20|0);
+   $90 = HEAP32[$89>>2]|0;
+   $93 = $90;
+  } else {
+   $93 = 0;
+  }
+  $91 = $children;
+  $92 = (($91) + ($93))|0;
+  $children = $92;
+  $94 = $c1;
+  $95 = ((($94)) + 20|0);
+  $96 = HEAP32[$95>>2]|0;
+  $97 = ($96|0)!=(0|0);
+  L23: do {
+   if ($97) {
+    $i = 0;
+    $98 = $c1;
+    $99 = ((($98)) + 20|0);
+    $100 = HEAP32[$99>>2]|0;
+    $ci = $100;
+    while(1) {
+     $101 = $ci;
+     $102 = $c1;
+     $103 = ((($102)) + 16|0);
+     $104 = HEAP32[$103>>2]|0;
+     $105 = ($101>>>0)<=($104>>>0);
+     if (!($105)) {
+      break L23;
+     }
+     $106 = $i;
+     $107 = (($106) + 1)|0;
+     $i = $107;
+     $108 = $ci;
+     $109 = ((($108)) + 48|0);
+     $ci = $109;
+    }
+   }
+  } while(0);
+  $110 = $i;
+  $111 = $children;
+  $112 = (($111) + ($110))|0;
+  $children = $112;
+  $131 = $children;
+  STACKTOP = sp;return ($131|0);
+  break;
+ }
+ case 14:  {
+  $113 = $2;
+  $a = $113;
+  $114 = $a;
+  $115 = ((($114)) + 12|0);
+  $116 = HEAP32[$115>>2]|0;
+  $117 = $children;
+  $118 = (($117) + ($116))|0;
+  $children = $118;
+  $131 = $children;
+  STACKTOP = sp;return ($131|0);
+  break;
+ }
+ case 15:  {
+  $119 = $0;
+  $120 = $2;
+  $121 = (_mrb_gc_mark_iv_size($119,$120)|0);
+  $122 = $children;
+  $123 = (($122) + ($121))|0;
+  $children = $123;
+  $124 = $0;
+  $125 = $2;
+  $126 = (_mrb_gc_mark_hash_size($124,$125)|0);
+  $127 = $children;
+  $128 = (($127) + ($126))|0;
+  $children = $128;
+  $131 = $children;
+  STACKTOP = sp;return ($131|0);
+  break;
+ }
+ case 17: case 13:  {
+  $129 = $children;
+  $130 = (($129) + 2)|0;
+  $children = $130;
+  $131 = $children;
+  STACKTOP = sp;return ($131|0);
+  break;
+ }
+ default: {
+  $131 = $children;
+  STACKTOP = sp;return ($131|0);
+ }
+ }
+ return (0)|0;
+}
+function _gc_mark_children($mrb,$gc,$obj) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
+ var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0;
+ var $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0;
+ var $99 = 0, $a = 0, $c = 0, $c1 = 0, $c2 = 0, $e = 0, $e4 = 0, $i = 0, $i3 = 0, $len = 0, $p = 0, $r = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $gc;
+ $2 = $obj;
+ $3 = $2;
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $4 & -1793;
+ $6 = $5 | 1024;
+ HEAP32[$3>>2] = $6;
+ $7 = $2;
+ $8 = ((($7)) + 8|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = $1;
+ $11 = ((($10)) + 428|0);
+ HEAP32[$11>>2] = $9;
+ $12 = $0;
+ $13 = $2;
+ $14 = ((($13)) + 4|0);
+ $15 = HEAP32[$14>>2]|0;
+ _mrb_gc_mark($12,$15);
+ $16 = $2;
+ $17 = HEAP32[$16>>2]|0;
+ $18 = $17 & 255;
+ switch ($18|0) {
+ case 11:  {
+  $19 = $2;
+  $c = $19;
+  $20 = $c;
+  $21 = HEAP32[$20>>2]|0;
+  $22 = $21 >>> 11;
+  $23 = $22 & 1048576;
+  $24 = ($23|0)!=(0);
+  if ($24) {
+   $25 = $0;
+   $26 = $c;
+   _mrb_gc_mark_mt($25,$26);
+  }
+  $27 = $0;
+  $28 = $2;
+  $29 = ((($28)) + 20|0);
+  $30 = HEAP32[$29>>2]|0;
+  _mrb_gc_mark($27,$30);
+  STACKTOP = sp;return;
+  break;
+ }
+ case 12: case 10: case 9:  {
+  $31 = $2;
+  $c1 = $31;
+  $32 = $0;
+  $33 = $c1;
+  _mrb_gc_mark_mt($32,$33);
+  $34 = $0;
+  $35 = $c1;
+  $36 = ((($35)) + 20|0);
+  $37 = HEAP32[$36>>2]|0;
+  _mrb_gc_mark($34,$37);
+  break;
+ }
+ case 18: case 21: case 8:  {
+  break;
+ }
+ case 13:  {
+  $40 = $2;
+  $p = $40;
+  $41 = $0;
+  $42 = $p;
+  $43 = ((($42)) + 20|0);
+  $44 = HEAP32[$43>>2]|0;
+  _mrb_gc_mark($41,$44);
+  $45 = $0;
+  $46 = $p;
+  $47 = ((($46)) + 16|0);
+  $48 = HEAP32[$47>>2]|0;
+  _mrb_gc_mark($45,$48);
+  STACKTOP = sp;return;
+  break;
+ }
+ case 20:  {
+  $49 = $2;
+  $e = $49;
+  $50 = $e;
+  $51 = ((($50)) + 20|0);
+  $52 = HEAP32[$51>>2]|0;
+  $53 = ($52|0)>=(0);
+  if ($53) {
+   STACKTOP = sp;return;
+  }
+  $54 = $e;
+  $55 = HEAP32[$54>>2]|0;
+  $56 = $55 >>> 11;
+  $len = $56;
+  $i = 0;
+  while(1) {
+   $57 = $i;
+   $58 = $len;
+   $59 = ($57|0)<($58|0);
+   if (!($59)) {
+    break;
+   }
+   $60 = $i;
+   $61 = $e;
+   $62 = ((($61)) + 12|0);
+   $63 = HEAP32[$62>>2]|0;
+   $64 = (($63) + ($60<<3)|0);
+   $65 = ((($64)) + 4|0);
+   $66 = HEAP32[$65>>2]|0;
+   $67 = ($66>>>0)<(8);
+   if (!($67)) {
+    $68 = $0;
+    $69 = $i;
+    $70 = $e;
+    $71 = ((($70)) + 12|0);
+    $72 = HEAP32[$71>>2]|0;
+    $73 = (($72) + ($69<<3)|0);
+    $74 = HEAP32[$73>>2]|0;
+    _mrb_gc_mark($68,$74);
+   }
+   $75 = $i;
+   $76 = (($75) + 1)|0;
+   $i = $76;
+  }
+  STACKTOP = sp;return;
+  break;
+ }
+ case 22:  {
+  $77 = $2;
+  $78 = ((($77)) + 12|0);
+  $79 = HEAP32[$78>>2]|0;
+  $c2 = $79;
+  $80 = $c2;
+  $81 = ($80|0)!=(0|0);
+  if (!($81)) {
+   STACKTOP = sp;return;
+  }
+  $82 = $0;
+  $83 = $c2;
+  _mark_context($82,$83);
+  STACKTOP = sp;return;
+  break;
+ }
+ case 14:  {
+  $84 = $2;
+  $a = $84;
+  $i3 = 0;
+  $85 = $a;
+  $86 = ((($85)) + 12|0);
+  $87 = HEAP32[$86>>2]|0;
+  $e4 = $87;
+  while(1) {
+   $88 = $i3;
+   $89 = $e4;
+   $90 = ($88>>>0)<($89>>>0);
+   if (!($90)) {
+    break;
+   }
+   $91 = $i3;
+   $92 = $a;
+   $93 = ((($92)) + 20|0);
+   $94 = HEAP32[$93>>2]|0;
+   $95 = (($94) + ($91<<3)|0);
+   $96 = ((($95)) + 4|0);
+   $97 = HEAP32[$96>>2]|0;
+   $98 = ($97>>>0)<(8);
+   if (!($98)) {
+    $99 = $0;
+    $100 = $i3;
+    $101 = $a;
+    $102 = ((($101)) + 20|0);
+    $103 = HEAP32[$102>>2]|0;
+    $104 = (($103) + ($100<<3)|0);
+    $105 = HEAP32[$104>>2]|0;
+    _mrb_gc_mark($99,$105);
+   }
+   $106 = $i3;
+   $107 = (($106) + 1)|0;
+   $i3 = $107;
+  }
+  STACKTOP = sp;return;
+  break;
+ }
+ case 15:  {
+  $108 = $0;
+  $109 = $2;
+  _mrb_gc_mark_iv($108,$109);
+  $110 = $0;
+  $111 = $2;
+  _mrb_gc_mark_hash($110,$111);
+  STACKTOP = sp;return;
+  break;
+ }
+ case 17:  {
+  $112 = $2;
+  $r = $112;
+  $113 = $r;
+  $114 = ((($113)) + 12|0);
+  $115 = HEAP32[$114>>2]|0;
+  $116 = ($115|0)!=(0|0);
+  if (!($116)) {
+   STACKTOP = sp;return;
+  }
+  $117 = $r;
+  $118 = ((($117)) + 12|0);
+  $119 = HEAP32[$118>>2]|0;
+  $120 = ((($119)) + 4|0);
+  $121 = HEAP32[$120>>2]|0;
+  $122 = ($121>>>0)<(8);
+  if (!($122)) {
+   $123 = $0;
+   $124 = $r;
+   $125 = ((($124)) + 12|0);
+   $126 = HEAP32[$125>>2]|0;
+   $127 = HEAP32[$126>>2]|0;
+   _mrb_gc_mark($123,$127);
+  }
+  $128 = $r;
+  $129 = ((($128)) + 12|0);
+  $130 = HEAP32[$129>>2]|0;
+  $131 = ((($130)) + 8|0);
+  $132 = ((($131)) + 4|0);
+  $133 = HEAP32[$132>>2]|0;
+  $134 = ($133>>>0)<(8);
+  if ($134) {
+   STACKTOP = sp;return;
+  }
+  $135 = $0;
+  $136 = $r;
+  $137 = ((($136)) + 12|0);
+  $138 = HEAP32[$137>>2]|0;
+  $139 = ((($138)) + 8|0);
+  $140 = HEAP32[$139>>2]|0;
+  _mrb_gc_mark($135,$140);
+  STACKTOP = sp;return;
+  break;
+ }
+ default: {
+  STACKTOP = sp;return;
+ }
+ }
+ $38 = $0;
+ $39 = $2;
+ _mrb_gc_mark_iv($38,$39);
+ STACKTOP = sp;return;
+}
+function _final_marking_phase($mrb,$gc) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $gc;
+ $2 = $0;
+ $3 = $0;
+ $4 = ((($3)) + 16|0);
+ $5 = HEAP32[$4>>2]|0;
+ _mark_context_stack($2,$5);
+ $6 = $0;
+ $7 = $1;
+ _gc_mark_gray_list($6,$7);
+ $8 = $1;
+ $9 = ((($8)) + 432|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = $1;
+ $12 = ((($11)) + 428|0);
+ HEAP32[$12>>2] = $10;
+ $13 = $1;
+ $14 = ((($13)) + 432|0);
+ HEAP32[$14>>2] = 0;
+ $15 = $0;
+ $16 = $1;
+ _gc_mark_gray_list($15,$16);
+ STACKTOP = sp;return;
+}
+function _gc_mark_gray_list($mrb,$gc) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $gc;
+ while(1) {
+  $2 = $1;
+  $3 = ((($2)) + 428|0);
+  $4 = HEAP32[$3>>2]|0;
+  $5 = ($4|0)!=(0|0);
+  if (!($5)) {
+   break;
+  }
+  $6 = $1;
+  $7 = ((($6)) + 428|0);
+  $8 = HEAP32[$7>>2]|0;
+  $9 = HEAP32[$8>>2]|0;
+  $10 = $9 >>> 8;
+  $11 = $10 & 7;
+  $12 = ($11|0)==(0);
+  if ($12) {
+   $13 = $0;
+   $14 = $1;
+   $15 = $1;
+   $16 = ((($15)) + 428|0);
+   $17 = HEAP32[$16>>2]|0;
+   _gc_mark_children($13,$14,$17);
+   continue;
+  } else {
+   $18 = $1;
+   $19 = ((($18)) + 428|0);
+   $20 = HEAP32[$19>>2]|0;
+   $21 = ((($20)) + 8|0);
+   $22 = HEAP32[$21>>2]|0;
+   $23 = $1;
+   $24 = ((($23)) + 428|0);
+   HEAP32[$24>>2] = $22;
+   continue;
+  }
+ }
+ STACKTOP = sp;return;
+}
+function _prepare_incremental_sweep($mrb,$gc) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $gc;
+ $2 = $1;
+ $3 = ((($2)) + 420|0);
+ HEAP32[$3>>2] = 2;
+ $4 = $1;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $1;
+ $7 = ((($6)) + 4|0);
+ HEAP32[$7>>2] = $5;
+ $8 = $1;
+ $9 = ((($8)) + 12|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = $1;
+ $12 = ((($11)) + 436|0);
+ HEAP32[$12>>2] = $10;
+ STACKTOP = sp;return;
+}
+function _incremental_sweep_phase($mrb,$gc,$limit) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ $limit = $limit|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0;
+ var $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0;
+ var $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0;
+ var $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0;
+ var $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $dead_slot = 0, $e = 0, $freed = 0, $full = 0, $next = 0;
+ var $or$cond = 0, $or$cond3 = 0, $p = 0, $page = 0, $tried_sweep = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $gc;
+ $2 = $limit;
+ $3 = $1;
+ $4 = ((($3)) + 4|0);
+ $5 = HEAP32[$4>>2]|0;
+ $page = $5;
+ $tried_sweep = 0;
+ while(1) {
+  $6 = $page;
+  $7 = ($6|0)!=(0|0);
+  if ($7) {
+   $8 = $tried_sweep;
+   $9 = $2;
+   $10 = ($8>>>0)<($9>>>0);
+   $154 = $10;
+  } else {
+   $154 = 0;
+  }
+  $11 = $page;
+  if (!($154)) {
+   break;
+  }
+  $12 = ((($11)) + 24|0);
+  $p = $12;
+  $13 = $p;
+  $14 = ((($13)) + 1536|0);
+  $e = $14;
+  $freed = 0;
+  $dead_slot = 1;
+  $15 = $page;
+  $16 = HEAP32[$15>>2]|0;
+  $17 = ($16|0)==(0|0);
+  $18 = $17&1;
+  $19 = $18&255;
+  $full = $19;
+  $20 = $1;
+  $21 = ((($20)) + 452|0);
+  $22 = HEAP8[$21>>0]|0;
+  $23 = ($22&255) >>> 2;
+  $24 = $23 & 1;
+  $25 = $24&255;
+  $26 = ($25|0)!=(0);
+  if ($26) {
+   $27 = $1;
+   $28 = ((($27)) + 452|0);
+   $29 = HEAP8[$28>>0]|0;
+   $30 = ($29&255) >>> 1;
+   $31 = $30 & 1;
+   $32 = ($31<<24>>24)!=(0);
+   if (!($32)) {
+    $33 = $page;
+    $34 = ((($33)) + 20|0);
+    $35 = HEAP8[$34>>0]|0;
+    $36 = $35 & 1;
+    $37 = $36&255;
+    $38 = ($37|0)!=(0);
+    if ($38) {
+     $39 = $e;
+     $p = $39;
+     $dead_slot = 0;
+    }
+   }
+  }
+  while(1) {
+   $40 = $p;
+   $41 = $e;
+   $42 = ($40>>>0)<($41>>>0);
+   if (!($42)) {
+    break;
+   }
+   $43 = $p;
+   $44 = HEAP32[$43>>2]|0;
+   $45 = $44 >>> 8;
+   $46 = $45 & 7;
+   $47 = $1;
+   $48 = ((($47)) + 424|0);
+   $49 = HEAP32[$48>>2]|0;
+   $50 = $49 ^ 3;
+   $51 = $46 & $50;
+   $52 = $51 & 3;
+   $53 = ($52|0)!=(0);
+   if ($53) {
+    label = 12;
+   } else {
+    $54 = $p;
+    $55 = HEAP32[$54>>2]|0;
+    $56 = $55 & 255;
+    $57 = ($56|0)==(1);
+    if ($57) {
+     label = 12;
+    } else {
+     $72 = $1;
+     $73 = ((($72)) + 452|0);
+     $74 = HEAP8[$73>>0]|0;
+     $75 = ($74&255) >>> 2;
+     $76 = $75 & 1;
+     $77 = ($76<<24>>24)!=(0);
+     if (!($77)) {
+      $78 = $1;
+      $79 = ((($78)) + 424|0);
+      $80 = HEAP32[$79>>2]|0;
+      $81 = $p;
+      $82 = HEAP32[$81>>2]|0;
+      $83 = $80 & 7;
+      $84 = $83 << 8;
+      $85 = $82 & -1793;
+      $86 = $85 | $84;
+      HEAP32[$81>>2] = $86;
+     }
+     $dead_slot = 0;
+    }
+   }
+   if ((label|0) == 12) {
+    label = 0;
+    $58 = $p;
+    $59 = HEAP32[$58>>2]|0;
+    $60 = $59 & 255;
+    $61 = ($60|0)!=(1);
+    if ($61) {
+     $62 = $0;
+     $63 = $p;
+     _obj_free($62,$63);
+     $64 = $page;
+     $65 = HEAP32[$64>>2]|0;
+     $66 = $p;
+     $67 = ((($66)) + 12|0);
+     HEAP32[$67>>2] = $65;
+     $68 = $p;
+     $69 = $page;
+     HEAP32[$69>>2] = $68;
+     $70 = $freed;
+     $71 = (($70) + 1)|0;
+     $freed = $71;
+    }
+   }
+   $87 = $p;
+   $88 = ((($87)) + 24|0);
+   $p = $88;
+  }
+  $89 = $dead_slot;
+  $90 = $89&255;
+  $91 = ($90|0)!=(0);
+  $92 = $freed;
+  $93 = ($92>>>0)<(64);
+  $or$cond = $91 & $93;
+  if ($or$cond) {
+   $94 = $page;
+   $95 = ((($94)) + 8|0);
+   $96 = HEAP32[$95>>2]|0;
+   $next = $96;
+   $97 = $1;
+   $98 = $page;
+   _unlink_heap_page($97,$98);
+   $99 = $1;
+   $100 = $page;
+   _unlink_free_heap_page($99,$100);
+   $101 = $0;
+   $102 = $page;
+   _mrb_free($101,$102);
+   $103 = $next;
+   $page = $103;
+  } else {
+   $104 = $full;
+   $105 = $104&255;
+   $106 = ($105|0)!=(0);
+   $107 = $freed;
+   $108 = ($107>>>0)>(0);
+   $or$cond3 = $106 & $108;
+   if ($or$cond3) {
+    $109 = $1;
+    $110 = $page;
+    _link_free_heap_page($109,$110);
+   }
+   $111 = $page;
+   $112 = HEAP32[$111>>2]|0;
+   $113 = ($112|0)==(0|0);
+   if ($113) {
+    $114 = $1;
+    $115 = ((($114)) + 452|0);
+    $116 = HEAP8[$115>>0]|0;
+    $117 = ($116&255) >>> 2;
+    $118 = $117 & 1;
+    $119 = $118&255;
+    $120 = ($119|0)!=(0);
+    if ($120) {
+     $121 = $1;
+     $122 = ((($121)) + 452|0);
+     $123 = HEAP8[$122>>0]|0;
+     $124 = ($123&255) >>> 1;
+     $125 = $124 & 1;
+     $126 = ($125<<24>>24)!=(0);
+     if ($126) {
+      label = 26;
+     } else {
+      $127 = $page;
+      $128 = ((($127)) + 20|0);
+      $129 = HEAP8[$128>>0]|0;
+      $130 = $129 & -2;
+      $131 = $130 | 1;
+      HEAP8[$128>>0] = $131;
+     }
+    } else {
+     label = 26;
+    }
+   } else {
+    label = 26;
+   }
+   if ((label|0) == 26) {
+    label = 0;
+    $132 = $page;
+    $133 = ((($132)) + 20|0);
+    $134 = HEAP8[$133>>0]|0;
+    $135 = $134 & -2;
+    HEAP8[$133>>0] = $135;
+   }
+   $136 = $page;
+   $137 = ((($136)) + 8|0);
+   $138 = HEAP32[$137>>2]|0;
+   $page = $138;
+  }
+  $139 = $tried_sweep;
+  $140 = (($139) + 64)|0;
+  $tried_sweep = $140;
+  $141 = $freed;
+  $142 = $1;
+  $143 = ((($142)) + 12|0);
+  $144 = HEAP32[$143>>2]|0;
+  $145 = (($144) - ($141))|0;
+  HEAP32[$143>>2] = $145;
+  $146 = $freed;
+  $147 = $1;
+  $148 = ((($147)) + 436|0);
+  $149 = HEAP32[$148>>2]|0;
+  $150 = (($149) - ($146))|0;
+  HEAP32[$148>>2] = $150;
+ }
+ $151 = $1;
+ $152 = ((($151)) + 4|0);
+ HEAP32[$152>>2] = $11;
+ $153 = $tried_sweep;
+ STACKTOP = sp;return ($153|0);
+}
+function _obj_free($mrb,$obj) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
+ var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0;
+ var $c = 0, $d = 0, $e = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $obj;
+ $2 = $1;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 & 255;
+ L1: do {
+  switch ($4|0) {
+  case 18: case 8:  {
+   $5 = $0;
+   $6 = $1;
+   _mrb_gc_free_iv($5,$6);
+   break;
+  }
+  case 12: case 10: case 9:  {
+   $7 = $0;
+   $8 = $1;
+   _mrb_gc_free_mt($7,$8);
+   $9 = $0;
+   $10 = $1;
+   _mrb_gc_free_iv($9,$10);
+   break;
+  }
+  case 11:  {
+   $11 = $1;
+   $12 = HEAP32[$11>>2]|0;
+   $13 = $12 >>> 11;
+   $14 = $13 & 1048576;
+   $15 = ($14|0)!=(0);
+   if ($15) {
+    $16 = $0;
+    $17 = $1;
+    _mrb_gc_free_mt($16,$17);
+   }
+   break;
+  }
+  case 20:  {
+   $18 = $1;
+   $e = $18;
+   $19 = $e;
+   $20 = ((($19)) + 20|0);
+   $21 = HEAP32[$20>>2]|0;
+   $22 = ($21|0)>=(0);
+   if (!($22)) {
+    $23 = $0;
+    $24 = $e;
+    $25 = ((($24)) + 12|0);
+    $26 = HEAP32[$25>>2]|0;
+    _mrb_free($23,$26);
+    $27 = $e;
+    $28 = ((($27)) + 12|0);
+    HEAP32[$28>>2] = 0;
+   }
+   break;
+  }
+  case 22:  {
+   $29 = $1;
+   $30 = ((($29)) + 12|0);
+   $31 = HEAP32[$30>>2]|0;
+   $c = $31;
+   $32 = $c;
+   $33 = $0;
+   $34 = ((($33)) + 16|0);
+   $35 = HEAP32[$34>>2]|0;
+   $36 = ($32|0)!=($35|0);
+   if ($36) {
+    $37 = $0;
+    $38 = $c;
+    _mrb_free_context($37,$38);
+   }
+   break;
+  }
+  case 14:  {
+   $39 = $1;
+   $40 = HEAP32[$39>>2]|0;
+   $41 = $40 >>> 11;
+   $42 = $41 & 256;
+   $43 = ($42|0)!=(0);
+   $44 = $0;
+   $45 = $1;
+   if ($43) {
+    $46 = ((($45)) + 16|0);
+    $47 = HEAP32[$46>>2]|0;
+    _mrb_ary_decref($44,$47);
+    break L1;
+   } else {
+    $48 = ((($45)) + 20|0);
+    $49 = HEAP32[$48>>2]|0;
+    _mrb_free($44,$49);
+    break L1;
+   }
+   break;
+  }
+  case 15:  {
+   $50 = $0;
+   $51 = $1;
+   _mrb_gc_free_iv($50,$51);
+   $52 = $0;
+   $53 = $1;
+   _mrb_gc_free_hash($52,$53);
+   break;
+  }
+  case 16:  {
+   $54 = $0;
+   $55 = $1;
+   _mrb_gc_free_str($54,$55);
+   break;
+  }
+  case 13:  {
+   $56 = $1;
+   $p = $56;
+   $57 = $p;
+   $58 = HEAP32[$57>>2]|0;
+   $59 = $58 >>> 11;
+   $60 = $59 & 128;
+   $61 = ($60|0)!=(0);
+   if (!($61)) {
+    $62 = $p;
+    $63 = ((($62)) + 12|0);
+    $64 = HEAP32[$63>>2]|0;
+    $65 = ($64|0)!=(0|0);
+    if ($65) {
+     $66 = $0;
+     $67 = $p;
+     $68 = ((($67)) + 12|0);
+     $69 = HEAP32[$68>>2]|0;
+     _mrb_irep_decref($66,$69);
+    }
+   }
+   break;
+  }
+  case 17:  {
+   $70 = $0;
+   $71 = $1;
+   $72 = ((($71)) + 12|0);
+   $73 = HEAP32[$72>>2]|0;
+   _mrb_free($70,$73);
+   break;
+  }
+  case 21:  {
+   $74 = $1;
+   $d = $74;
+   $75 = $d;
+   $76 = ((($75)) + 16|0);
+   $77 = HEAP32[$76>>2]|0;
+   $78 = ($77|0)!=(0|0);
+   if ($78) {
+    $79 = $d;
+    $80 = ((($79)) + 16|0);
+    $81 = HEAP32[$80>>2]|0;
+    $82 = ((($81)) + 4|0);
+    $83 = HEAP32[$82>>2]|0;
+    $84 = ($83|0)!=(0|0);
+    if ($84) {
+     $85 = $d;
+     $86 = ((($85)) + 16|0);
+     $87 = HEAP32[$86>>2]|0;
+     $88 = ((($87)) + 4|0);
+     $89 = HEAP32[$88>>2]|0;
+     $90 = $0;
+     $91 = $d;
+     $92 = ((($91)) + 20|0);
+     $93 = HEAP32[$92>>2]|0;
+     FUNCTION_TABLE_vii[$89 & 511]($90,$93);
+    }
+   }
+   $94 = $0;
+   $95 = $1;
+   _mrb_gc_free_iv($94,$95);
+   break;
+  }
+  case 6: case 4: case 3: case 2:  {
+   STACKTOP = sp;return;
+   break;
+  }
+  default: {
+  }
+  }
+ } while(0);
+ $96 = $1;
+ $97 = HEAP32[$96>>2]|0;
+ $98 = $97 & -256;
+ $99 = $98 | 1;
+ HEAP32[$96>>2] = $99;
+ STACKTOP = sp;return;
+}
+function _mrb_free($mrb,$p) {
+ $mrb = $mrb|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $p;
+ $2 = $0;
+ $3 = ((($2)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $0;
+ $6 = $1;
+ $7 = $0;
+ $8 = ((($7)) + 8|0);
+ $9 = HEAP32[$8>>2]|0;
+ (FUNCTION_TABLE_iiiii[$4 & 255]($5,$6,0,$9)|0);
+ STACKTOP = sp;return;
+}
+function _unlink_heap_page($gc,$page) {
+ $gc = $gc|0;
+ $page = $page|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $gc;
+ $1 = $page;
+ $2 = $1;
+ $3 = ((($2)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)!=(0|0);
+ if ($5) {
+  $6 = $1;
+  $7 = ((($6)) + 8|0);
+  $8 = HEAP32[$7>>2]|0;
+  $9 = $1;
+  $10 = ((($9)) + 4|0);
+  $11 = HEAP32[$10>>2]|0;
+  $12 = ((($11)) + 8|0);
+  HEAP32[$12>>2] = $8;
+ }
+ $13 = $1;
+ $14 = ((($13)) + 8|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = ($15|0)!=(0|0);
+ if ($16) {
+  $17 = $1;
+  $18 = ((($17)) + 4|0);
+  $19 = HEAP32[$18>>2]|0;
+  $20 = $1;
+  $21 = ((($20)) + 8|0);
+  $22 = HEAP32[$21>>2]|0;
+  $23 = ((($22)) + 4|0);
+  HEAP32[$23>>2] = $19;
+ }
+ $24 = $0;
+ $25 = HEAP32[$24>>2]|0;
+ $26 = $1;
+ $27 = ($25|0)==($26|0);
+ if (!($27)) {
+  $32 = $1;
+  $33 = ((($32)) + 4|0);
+  HEAP32[$33>>2] = 0;
+  $34 = $1;
+  $35 = ((($34)) + 8|0);
+  HEAP32[$35>>2] = 0;
+  STACKTOP = sp;return;
+ }
+ $28 = $1;
+ $29 = ((($28)) + 8|0);
+ $30 = HEAP32[$29>>2]|0;
+ $31 = $0;
+ HEAP32[$31>>2] = $30;
+ $32 = $1;
+ $33 = ((($32)) + 4|0);
+ HEAP32[$33>>2] = 0;
+ $34 = $1;
+ $35 = ((($34)) + 8|0);
+ HEAP32[$35>>2] = 0;
+ STACKTOP = sp;return;
+}
+function _unlink_free_heap_page($gc,$page) {
+ $gc = $gc|0;
+ $page = $page|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $gc;
+ $1 = $page;
+ $2 = $1;
+ $3 = ((($2)) + 16|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)!=(0|0);
+ if ($5) {
+  $6 = $1;
+  $7 = ((($6)) + 12|0);
+  $8 = HEAP32[$7>>2]|0;
+  $9 = $1;
+  $10 = ((($9)) + 16|0);
+  $11 = HEAP32[$10>>2]|0;
+  $12 = ((($11)) + 12|0);
+  HEAP32[$12>>2] = $8;
+ }
+ $13 = $1;
+ $14 = ((($13)) + 12|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = ($15|0)!=(0|0);
+ if ($16) {
+  $17 = $1;
+  $18 = ((($17)) + 16|0);
+  $19 = HEAP32[$18>>2]|0;
+  $20 = $1;
+  $21 = ((($20)) + 12|0);
+  $22 = HEAP32[$21>>2]|0;
+  $23 = ((($22)) + 16|0);
+  HEAP32[$23>>2] = $19;
+ }
+ $24 = $0;
+ $25 = ((($24)) + 8|0);
+ $26 = HEAP32[$25>>2]|0;
+ $27 = $1;
+ $28 = ($26|0)==($27|0);
+ if (!($28)) {
+  $34 = $1;
+  $35 = ((($34)) + 16|0);
+  HEAP32[$35>>2] = 0;
+  $36 = $1;
+  $37 = ((($36)) + 12|0);
+  HEAP32[$37>>2] = 0;
+  STACKTOP = sp;return;
+ }
+ $29 = $1;
+ $30 = ((($29)) + 12|0);
+ $31 = HEAP32[$30>>2]|0;
+ $32 = $0;
+ $33 = ((($32)) + 8|0);
+ HEAP32[$33>>2] = $31;
+ $34 = $1;
+ $35 = ((($34)) + 16|0);
+ HEAP32[$35>>2] = 0;
+ $36 = $1;
+ $37 = ((($36)) + 12|0);
+ HEAP32[$37>>2] = 0;
+ STACKTOP = sp;return;
+}
+function _link_free_heap_page($gc,$page) {
+ $gc = $gc|0;
+ $page = $page|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $gc;
+ $1 = $page;
+ $2 = $0;
+ $3 = ((($2)) + 8|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $1;
+ $6 = ((($5)) + 12|0);
+ HEAP32[$6>>2] = $4;
+ $7 = $0;
+ $8 = ((($7)) + 8|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ($9|0)!=(0|0);
+ if ($10) {
+  $11 = $1;
+  $12 = $0;
+  $13 = ((($12)) + 8|0);
+  $14 = HEAP32[$13>>2]|0;
+  $15 = ((($14)) + 16|0);
+  HEAP32[$15>>2] = $11;
+ }
+ $16 = $1;
+ $17 = $0;
+ $18 = ((($17)) + 8|0);
+ HEAP32[$18>>2] = $16;
+ STACKTOP = sp;return;
+}
+function _mrb_realloc($mrb,$p,$len) {
+ $mrb = $mrb|0;
+ $p = $p|0;
+ $len = $len|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $p2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 24|0;
+ $3 = sp;
+ $0 = $mrb;
+ $1 = $p;
+ $2 = $len;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = (_mrb_realloc_simple($4,$5,$6)|0);
+ $p2 = $7;
+ $8 = $p2;
+ $9 = ($8|0)==(0|0);
+ $10 = $2;
+ $11 = ($10|0)!=(0);
+ $or$cond = $9 & $11;
+ $12 = $0;
+ $13 = ((($12)) + 92|0);
+ $14 = ((($13)) + 452|0);
+ $15 = HEAP8[$14>>0]|0;
+ if (!($or$cond)) {
+  $29 = $15 & -9;
+  HEAP8[$14>>0] = $29;
+  $30 = $p2;
+  STACKTOP = sp;return ($30|0);
+ }
+ $16 = ($15&255) >>> 3;
+ $17 = $16 & 1;
+ $18 = ($17<<24>>24)!=(0);
+ if ($18) {
+  $30 = $p2;
+  STACKTOP = sp;return ($30|0);
+ } else {
+  $19 = $0;
+  $20 = ((($19)) + 92|0);
+  $21 = ((($20)) + 452|0);
+  $22 = HEAP8[$21>>0]|0;
+  $23 = $22 & -9;
+  $24 = $23 | 8;
+  HEAP8[$21>>0] = $24;
+  $25 = $0;
+  $26 = $0;
+  $27 = ((($26)) + 576|0);
+  $28 = HEAP32[$27>>2]|0;
+  _mrb_obj_value($3,$28);
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
+  _mrb_exc_raise($25,$$byval_copy);
+  // unreachable;
+ }
+ return (0)|0;
+}
+function _mrb_obj_value($agg$result,$p) {
+ $agg$result = $agg$result|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $p;
+ $1 = $0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 & 255;
+ $4 = ((($v)) + 4|0);
+ HEAP32[$4>>2] = $3;
+ $5 = $0;
+ HEAP32[$v>>2] = $5;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_malloc($mrb,$len) {
+ $mrb = $mrb|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $len;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_mrb_realloc($2,0,$3)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _mrb_malloc_simple($mrb,$len) {
+ $mrb = $mrb|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $len;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_mrb_realloc_simple($2,0,$3)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _mrb_calloc($mrb,$nelem,$len) {
+ $mrb = $mrb|0;
+ $nelem = $nelem|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var $or$cond = 0, $p = 0, $size = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $nelem;
+ $2 = $len;
+ $3 = $1;
+ $4 = ($3>>>0)>(0);
+ $5 = $2;
+ $6 = ($5>>>0)>(0);
+ $or$cond = $4 & $6;
+ if ($or$cond) {
+  $7 = $1;
+  $8 = $2;
+  $9 = (4294967295 / ($8>>>0))&-1;
+  $10 = ($7>>>0)<=($9>>>0);
+  if ($10) {
+   $11 = $1;
+   $12 = $2;
+   $13 = Math_imul($11, $12)|0;
+   $size = $13;
+   $14 = $0;
+   $15 = $size;
+   $16 = (_mrb_malloc($14,$15)|0);
+   $p = $16;
+   $17 = $p;
+   $18 = $size;
+   _memset(($17|0),0,($18|0))|0;
+   $19 = $p;
+   STACKTOP = sp;return ($19|0);
+  }
+ }
+ $p = 0;
+ $19 = $p;
+ STACKTOP = sp;return ($19|0);
+}
+function _mrb_gc_init($mrb,$gc) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $gc;
+ $2 = $1;
+ $3 = ((($2)) + 424|0);
+ HEAP32[$3>>2] = 1;
+ $4 = $1;
+ HEAP32[$4>>2] = 0;
+ $5 = $1;
+ $6 = ((($5)) + 8|0);
+ HEAP32[$6>>2] = 0;
+ $7 = $0;
+ $8 = $1;
+ _add_heap($7,$8);
+ $9 = $1;
+ $10 = ((($9)) + 444|0);
+ HEAP32[$10>>2] = 200;
+ $11 = $1;
+ $12 = ((($11)) + 448|0);
+ HEAP32[$12>>2] = 200;
+ $13 = $1;
+ $14 = ((($13)) + 452|0);
+ $15 = HEAP8[$14>>0]|0;
+ $16 = $15 & -5;
+ $17 = $16 | 4;
+ HEAP8[$14>>0] = $17;
+ $18 = $1;
+ $19 = ((($18)) + 452|0);
+ $20 = HEAP8[$19>>0]|0;
+ $21 = $20 & -3;
+ $22 = $21 | 2;
+ HEAP8[$19>>0] = $22;
+ STACKTOP = sp;return;
+}
+function _add_heap($mrb,$gc) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $e = 0, $p = 0, $page = 0, $prev = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $gc;
+ $2 = $0;
+ $3 = (_mrb_calloc($2,1,1564)|0);
+ $page = $3;
+ $prev = 0;
+ $4 = $page;
+ $5 = ((($4)) + 24|0);
+ $p = $5;
+ $6 = $p;
+ $7 = ((($6)) + 1536|0);
+ $e = $7;
+ while(1) {
+  $8 = $p;
+  $9 = $e;
+  $10 = ($8>>>0)<($9>>>0);
+  if (!($10)) {
+   break;
+  }
+  $11 = $p;
+  $12 = HEAP32[$11>>2]|0;
+  $13 = $12 & -256;
+  $14 = $13 | 1;
+  HEAP32[$11>>2] = $14;
+  $15 = $prev;
+  $16 = $p;
+  $17 = ((($16)) + 12|0);
+  HEAP32[$17>>2] = $15;
+  $18 = $p;
+  $prev = $18;
+  $19 = $p;
+  $20 = ((($19)) + 24|0);
+  $p = $20;
+ }
+ $21 = $prev;
+ $22 = $page;
+ HEAP32[$22>>2] = $21;
+ $23 = $1;
+ $24 = $page;
+ _link_heap_page($23,$24);
+ $25 = $1;
+ $26 = $page;
+ _link_free_heap_page($25,$26);
+ STACKTOP = sp;return;
+}
+function _link_heap_page($gc,$page) {
+ $gc = $gc|0;
+ $page = $page|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $gc;
+ $1 = $page;
+ $2 = $0;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $1;
+ $5 = ((($4)) + 8|0);
+ HEAP32[$5>>2] = $3;
+ $6 = $0;
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ($7|0)!=(0|0);
+ if ($8) {
+  $9 = $1;
+  $10 = $0;
+  $11 = HEAP32[$10>>2]|0;
+  $12 = ((($11)) + 4|0);
+  HEAP32[$12>>2] = $9;
+ }
+ $13 = $1;
+ $14 = $0;
+ HEAP32[$14>>2] = $13;
+ STACKTOP = sp;return;
+}
+function _free_heap($mrb,$gc) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $e = 0, $p = 0, $page = 0, $tmp = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $gc;
+ $2 = $1;
+ $3 = HEAP32[$2>>2]|0;
+ $page = $3;
+ while(1) {
+  $4 = $page;
+  $5 = ($4|0)!=(0|0);
+  if (!($5)) {
+   break;
+  }
+  $6 = $page;
+  $tmp = $6;
+  $7 = $page;
+  $8 = ((($7)) + 8|0);
+  $9 = HEAP32[$8>>2]|0;
+  $page = $9;
+  $10 = $tmp;
+  $11 = ((($10)) + 24|0);
+  $p = $11;
+  $12 = $p;
+  $13 = ((($12)) + 1536|0);
+  $e = $13;
+  while(1) {
+   $14 = $p;
+   $15 = $e;
+   $16 = ($14>>>0)<($15>>>0);
+   if (!($16)) {
+    break;
+   }
+   $17 = $p;
+   $18 = HEAP32[$17>>2]|0;
+   $19 = $18 & 255;
+   $20 = ($19|0)!=(1);
+   if ($20) {
+    $21 = $0;
+    $22 = $p;
+    _obj_free($21,$22);
+   }
+   $23 = $p;
+   $24 = ((($23)) + 24|0);
+   $p = $24;
+  }
+  $25 = $0;
+  $26 = $tmp;
+  _mrb_free($25,$26);
+ }
+ STACKTOP = sp;return;
+}
+function _mrb_gc_destroy($mrb,$gc) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $gc;
+ $2 = $0;
+ $3 = $1;
+ _free_heap($2,$3);
+ STACKTOP = sp;return;
+}
+function _mrb_gc_protect($mrb,$obj) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = ((($obj)) + 4|0);
+ $2 = HEAP32[$1>>2]|0;
+ $3 = ($2>>>0)<(8);
+ if ($3) {
+  STACKTOP = sp;return;
+ }
+ $4 = $0;
+ $5 = $0;
+ $6 = ((($5)) + 92|0);
+ $7 = HEAP32[$obj>>2]|0;
+ _gc_protect($4,$6,$7);
+ STACKTOP = sp;return;
+}
+function _gc_protect($mrb,$gc,$p) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $gc;
+ $2 = $p;
+ $3 = $1;
+ $4 = ((($3)) + 416|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ($5|0)>=(100);
+ if ($6) {
+  $7 = $1;
+  $8 = ((($7)) + 416|0);
+  HEAP32[$8>>2] = 96;
+  $9 = $0;
+  $10 = $0;
+  $11 = (_mrb_class_get($10,67967)|0);
+  _mrb_raise($9,$11,54568);
+  // unreachable;
+ } else {
+  $12 = $2;
+  $13 = $1;
+  $14 = ((($13)) + 416|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = (($15) + 1)|0;
+  HEAP32[$14>>2] = $16;
+  $17 = $1;
+  $18 = ((($17)) + 16|0);
+  $19 = (($18) + ($15<<2)|0);
+  HEAP32[$19>>2] = $12;
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_obj_alloc($mrb,$ttype,$cls) {
+ $mrb = $mrb|0;
+ $ttype = $ttype|0;
+ $cls = $cls|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $7 = 0, $8 = 0, $9 = 0, $gc = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $ttype;
+ $2 = $cls;
+ $3 = $0;
+ $4 = ((($3)) + 92|0);
+ $gc = $4;
+ $5 = $gc;
+ $6 = ((($5)) + 440|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $gc;
+ $9 = ((($8)) + 12|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = ($7>>>0)<($10>>>0);
+ if ($11) {
+  $12 = $0;
+  _mrb_incremental_gc($12);
+ }
+ $13 = $gc;
+ $14 = ((($13)) + 8|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = ($15|0)==(0|0);
+ if ($16) {
+  $17 = $0;
+  $18 = $gc;
+  _add_heap($17,$18);
+ }
+ $19 = $gc;
+ $20 = ((($19)) + 8|0);
+ $21 = HEAP32[$20>>2]|0;
+ $22 = HEAP32[$21>>2]|0;
+ $p = $22;
+ $23 = $p;
+ $24 = ((($23)) + 12|0);
+ $25 = HEAP32[$24>>2]|0;
+ $26 = $gc;
+ $27 = ((($26)) + 8|0);
+ $28 = HEAP32[$27>>2]|0;
+ HEAP32[$28>>2] = $25;
+ $29 = $gc;
+ $30 = ((($29)) + 8|0);
+ $31 = HEAP32[$30>>2]|0;
+ $32 = HEAP32[$31>>2]|0;
+ $33 = ($32|0)==(0|0);
+ if ($33) {
+  $34 = $gc;
+  $35 = $gc;
+  $36 = ((($35)) + 8|0);
+  $37 = HEAP32[$36>>2]|0;
+  _unlink_free_heap_page($34,$37);
+ }
+ $38 = $gc;
+ $39 = ((($38)) + 12|0);
+ $40 = HEAP32[$39>>2]|0;
+ $41 = (($40) + 1)|0;
+ HEAP32[$39>>2] = $41;
+ $42 = $0;
+ $43 = $gc;
+ $44 = $p;
+ _gc_protect($42,$43,$44);
+ $45 = $p;
+ ;HEAP32[$45>>2]=HEAP32[72424>>2]|0;HEAP32[$45+4>>2]=HEAP32[72424+4>>2]|0;HEAP32[$45+8>>2]=HEAP32[72424+8>>2]|0;HEAP32[$45+12>>2]=HEAP32[72424+12>>2]|0;HEAP32[$45+16>>2]=HEAP32[72424+16>>2]|0;HEAP32[$45+20>>2]=HEAP32[72424+20>>2]|0;
+ $46 = $1;
+ $47 = $p;
+ $48 = HEAP32[$47>>2]|0;
+ $49 = $46 & 255;
+ $50 = $48 & -256;
+ $51 = $50 | $49;
+ HEAP32[$47>>2] = $51;
+ $52 = $2;
+ $53 = $p;
+ $54 = ((($53)) + 4|0);
+ HEAP32[$54>>2] = $52;
+ $55 = $gc;
+ $56 = ((($55)) + 424|0);
+ $57 = HEAP32[$56>>2]|0;
+ $58 = $p;
+ $59 = HEAP32[$58>>2]|0;
+ $60 = $57 & 7;
+ $61 = $60 << 8;
+ $62 = $59 & -1793;
+ $63 = $62 | $61;
+ HEAP32[$58>>2] = $63;
+ $64 = $p;
+ STACKTOP = sp;return ($64|0);
+}
+function _mrb_incremental_gc($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
+ var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $gc = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = ((($1)) + 92|0);
+ $gc = $2;
+ $3 = $gc;
+ $4 = ((($3)) + 452|0);
+ $5 = HEAP8[$4>>0]|0;
+ $6 = $5 & 1;
+ $7 = ($6<<24>>24)!=(0);
+ if ($7) {
+  STACKTOP = sp;return;
+ }
+ $8 = $gc;
+ $9 = ((($8)) + 452|0);
+ $10 = HEAP8[$9>>0]|0;
+ $11 = ($10&255) >>> 2;
+ $12 = $11 & 1;
+ $13 = $12&255;
+ $14 = ($13|0)!=(0);
+ if ($14) {
+  $15 = $gc;
+  $16 = ((($15)) + 452|0);
+  $17 = HEAP8[$16>>0]|0;
+  $18 = ($17&255) >>> 1;
+  $19 = $18 & 1;
+  $20 = ($19<<24>>24)!=(0);
+  if ($20) {
+   label = 5;
+  } else {
+   $21 = $0;
+   $22 = $gc;
+   _incremental_gc_until($21,$22,0);
+  }
+ } else {
+  label = 5;
+ }
+ if ((label|0) == 5) {
+  $23 = $0;
+  $24 = $gc;
+  _incremental_gc_step($23,$24);
+ }
+ $25 = $gc;
+ $26 = ((($25)) + 420|0);
+ $27 = HEAP32[$26>>2]|0;
+ $28 = ($27|0)==(0);
+ if (!($28)) {
+  STACKTOP = sp;return;
+ }
+ $29 = $gc;
+ $30 = ((($29)) + 436|0);
+ $31 = HEAP32[$30>>2]|0;
+ $32 = (($31>>>0) / 100)&-1;
+ $33 = $gc;
+ $34 = ((($33)) + 444|0);
+ $35 = HEAP32[$34>>2]|0;
+ $36 = Math_imul($32, $35)|0;
+ $37 = $gc;
+ $38 = ((($37)) + 440|0);
+ HEAP32[$38>>2] = $36;
+ $39 = $gc;
+ $40 = ((($39)) + 440|0);
+ $41 = HEAP32[$40>>2]|0;
+ $42 = ($41>>>0)<(1024);
+ if ($42) {
+  $43 = $gc;
+  $44 = ((($43)) + 440|0);
+  HEAP32[$44>>2] = 1024;
+ }
+ $45 = $gc;
+ $46 = ((($45)) + 452|0);
+ $47 = HEAP8[$46>>0]|0;
+ $48 = ($47&255) >>> 2;
+ $49 = $48 & 1;
+ $50 = $49&255;
+ $51 = ($50|0)!=(0);
+ if ($51) {
+  $52 = $gc;
+  $53 = ((($52)) + 452|0);
+  $54 = HEAP8[$53>>0]|0;
+  $55 = ($54&255) >>> 1;
+  $56 = $55 & 1;
+  $57 = $56&255;
+  $58 = ($57|0)!=(0);
+  if ($58) {
+   $59 = $gc;
+   $60 = ((($59)) + 436|0);
+   $61 = HEAP32[$60>>2]|0;
+   $62 = (($61>>>0) / 100)&-1;
+   $63 = ($62*200)|0;
+   $64 = $gc;
+   $65 = ((($64)) + 456|0);
+   HEAP32[$65>>2] = $63;
+   $66 = $gc;
+   $67 = ((($66)) + 452|0);
+   $68 = HEAP8[$67>>0]|0;
+   $69 = $68 & -3;
+   HEAP8[$67>>0] = $69;
+   STACKTOP = sp;return;
+  }
+ }
+ $70 = $gc;
+ $71 = ((($70)) + 452|0);
+ $72 = HEAP8[$71>>0]|0;
+ $73 = ($72&255) >>> 2;
+ $74 = $73 & 1;
+ $75 = $74&255;
+ $76 = ($75|0)!=(0);
+ if (!($76)) {
+  STACKTOP = sp;return;
+ }
+ $77 = $gc;
+ $78 = ((($77)) + 452|0);
+ $79 = HEAP8[$78>>0]|0;
+ $80 = ($79&255) >>> 1;
+ $81 = $80 & 1;
+ $82 = ($81<<24>>24)!=(0);
+ if ($82) {
+  STACKTOP = sp;return;
+ }
+ $83 = $gc;
+ $84 = ((($83)) + 12|0);
+ $85 = HEAP32[$84>>2]|0;
+ $86 = $gc;
+ $87 = ((($86)) + 456|0);
+ $88 = HEAP32[$87>>2]|0;
+ $89 = ($85>>>0)>($88>>>0);
+ if (!($89)) {
+  STACKTOP = sp;return;
+ }
+ $90 = $0;
+ $91 = $gc;
+ _clear_all_old($90,$91);
+ $92 = $gc;
+ $93 = ((($92)) + 452|0);
+ $94 = HEAP8[$93>>0]|0;
+ $95 = $94 & -3;
+ $96 = $95 | 2;
+ HEAP8[$93>>0] = $96;
+ STACKTOP = sp;return;
+}
+function _incremental_gc_step($mrb,$gc) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $limit = 0, $result = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $gc;
+ $limit = 0;
+ $result = 0;
+ $2 = $1;
+ $3 = ((($2)) + 448|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4*10)|0;
+ $limit = $5;
+ while(1) {
+  $6 = $result;
+  $7 = $limit;
+  $8 = ($6>>>0)<($7>>>0);
+  if (!($8)) {
+   break;
+  }
+  $9 = $0;
+  $10 = $1;
+  $11 = $limit;
+  $12 = (_incremental_gc($9,$10,$11)|0);
+  $13 = $result;
+  $14 = (($13) + ($12))|0;
+  $result = $14;
+  $15 = $1;
+  $16 = ((($15)) + 420|0);
+  $17 = HEAP32[$16>>2]|0;
+  $18 = ($17|0)==(0);
+  if ($18) {
+   break;
+  }
+ }
+ $19 = $1;
+ $20 = ((($19)) + 12|0);
+ $21 = HEAP32[$20>>2]|0;
+ $22 = (($21) + 1024)|0;
+ $23 = $1;
+ $24 = ((($23)) + 440|0);
+ HEAP32[$24>>2] = $22;
+ STACKTOP = sp;return;
+}
+function _mrb_gc_arena_save($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = ((($1)) + 92|0);
+ $3 = ((($2)) + 416|0);
+ $4 = HEAP32[$3>>2]|0;
+ STACKTOP = sp;return ($4|0);
+}
+function _mrb_gc_arena_restore($mrb,$idx) {
+ $mrb = $mrb|0;
+ $idx = $idx|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $gc = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $idx;
+ $2 = $0;
+ $3 = ((($2)) + 92|0);
+ $gc = $3;
+ $4 = $1;
+ $5 = $gc;
+ $6 = ((($5)) + 416|0);
+ HEAP32[$6>>2] = $4;
+ STACKTOP = sp;return;
+}
+function _mrb_field_write_barrier($mrb,$obj,$value) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ $value = $value|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var $gc = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $obj;
+ $2 = $value;
+ $3 = $0;
+ $4 = ((($3)) + 92|0);
+ $gc = $4;
+ $5 = $1;
+ $6 = HEAP32[$5>>2]|0;
+ $7 = $6 >>> 8;
+ $8 = $7 & 7;
+ $9 = $8 & 4;
+ $10 = ($9|0)!=(0);
+ if (!($10)) {
+  STACKTOP = sp;return;
+ }
+ $11 = $2;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $12 >>> 8;
+ $14 = $13 & 7;
+ $15 = $14 & 3;
+ $16 = ($15|0)!=(0);
+ if (!($16)) {
+  STACKTOP = sp;return;
+ }
+ $17 = $gc;
+ $18 = ((($17)) + 452|0);
+ $19 = HEAP8[$18>>0]|0;
+ $20 = ($19&255) >>> 2;
+ $21 = $20 & 1;
+ $22 = $21&255;
+ $23 = ($22|0)!=(0);
+ if (!($23)) {
+  $24 = $gc;
+  $25 = ((($24)) + 420|0);
+  $26 = HEAP32[$25>>2]|0;
+  $27 = ($26|0)==(1);
+  if (!($27)) {
+   $31 = $gc;
+   $32 = ((($31)) + 424|0);
+   $33 = HEAP32[$32>>2]|0;
+   $34 = $1;
+   $35 = HEAP32[$34>>2]|0;
+   $36 = $33 & 7;
+   $37 = $36 << 8;
+   $38 = $35 & -1793;
+   $39 = $38 | $37;
+   HEAP32[$34>>2] = $39;
+   STACKTOP = sp;return;
+  }
+ }
+ $28 = $0;
+ $29 = $gc;
+ $30 = $2;
+ _add_gray_list($28,$29,$30);
+ STACKTOP = sp;return;
+}
+function _mrb_write_barrier($mrb,$obj) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $gc = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $obj;
+ $2 = $0;
+ $3 = ((($2)) + 92|0);
+ $gc = $3;
+ $4 = $1;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5 >>> 8;
+ $7 = $6 & 7;
+ $8 = $7 & 4;
+ $9 = ($8|0)!=(0);
+ if (!($9)) {
+  STACKTOP = sp;return;
+ }
+ $10 = $1;
+ $11 = HEAP32[$10>>2]|0;
+ $12 = $11 & -1793;
+ HEAP32[$10>>2] = $12;
+ $13 = $gc;
+ $14 = ((($13)) + 432|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = $1;
+ $17 = ((($16)) + 8|0);
+ HEAP32[$17>>2] = $15;
+ $18 = $1;
+ $19 = $gc;
+ $20 = ((($19)) + 432|0);
+ HEAP32[$20>>2] = $18;
+ STACKTOP = sp;return;
+}
+function _mrb_init_gc($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $gc = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = (_mrb_define_module($1,54589)|0);
+ $gc = $2;
+ $3 = $0;
+ $4 = $gc;
+ _mrb_define_class_method($3,$4,54592,8,0);
+ $5 = $0;
+ $6 = $gc;
+ _mrb_define_class_method($5,$6,54598,9,0);
+ $7 = $0;
+ $8 = $gc;
+ _mrb_define_class_method($7,$8,54605,10,0);
+ $9 = $0;
+ $10 = $gc;
+ _mrb_define_class_method($9,$10,54613,11,0);
+ $11 = $0;
+ $12 = $gc;
+ _mrb_define_class_method($11,$12,54628,12,262144);
+ $13 = $0;
+ $14 = $gc;
+ _mrb_define_class_method($13,$14,54644,13,0);
+ $15 = $0;
+ $16 = $gc;
+ _mrb_define_class_method($15,$16,54655,14,262144);
+ $17 = $0;
+ $18 = $gc;
+ _mrb_define_class_method($17,$18,54667,15,262144);
+ $19 = $0;
+ $20 = $gc;
+ _mrb_define_class_method($19,$20,54686,16,0);
+ STACKTOP = sp;return;
+}
+function _gc_start($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ _mrb_full_gc($1);
+ _mrb_nil_value_53($agg$result);
+ STACKTOP = sp;return;
+}
+function _gc_enable($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $old = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = ((($1)) + 92|0);
+ $3 = ((($2)) + 452|0);
+ $4 = HEAP8[$3>>0]|0;
+ $5 = $4 & 1;
+ $old = $5;
+ $6 = $0;
+ $7 = ((($6)) + 92|0);
+ $8 = ((($7)) + 452|0);
+ $9 = HEAP8[$8>>0]|0;
+ $10 = $9 & -2;
+ HEAP8[$8>>0] = $10;
+ $11 = $old;
+ _mrb_bool_value($agg$result,$11);
+ STACKTOP = sp;return;
+}
+function _mrb_bool_value($agg$result,$boolean) {
+ $agg$result = $agg$result|0;
+ $boolean = $boolean|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $boolean;
+ $1 = $0;
+ $2 = $1&255;
+ $3 = ($2|0)!=(0);
+ $4 = $3 ? 2 : 0;
+ $5 = ((($v)) + 4|0);
+ HEAP32[$5>>2] = $4;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _gc_disable($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $old = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = ((($1)) + 92|0);
+ $3 = ((($2)) + 452|0);
+ $4 = HEAP8[$3>>0]|0;
+ $5 = $4 & 1;
+ $old = $5;
+ $6 = $0;
+ $7 = ((($6)) + 92|0);
+ $8 = ((($7)) + 452|0);
+ $9 = HEAP8[$8>>0]|0;
+ $10 = $9 & -2;
+ $11 = $10 | 1;
+ HEAP8[$8>>0] = $11;
+ $12 = $old;
+ _mrb_bool_value($agg$result,$12);
+ STACKTOP = sp;return;
+}
+function _gc_interval_ratio_get($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = ((($1)) + 92|0);
+ $3 = ((($2)) + 444|0);
+ $4 = HEAP32[$3>>2]|0;
+ _mrb_fixnum_value($agg$result,$4);
+ STACKTOP = sp;return;
+}
+function _mrb_fixnum_value($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 3;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _gc_interval_ratio_set($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $ratio = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $ratio = sp + 4|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $ratio;
+ (_mrb_get_args($1,64319,$vararg_buffer)|0);
+ $2 = HEAP32[$ratio>>2]|0;
+ $3 = $0;
+ $4 = ((($3)) + 92|0);
+ $5 = ((($4)) + 444|0);
+ HEAP32[$5>>2] = $2;
+ _mrb_nil_value_53($agg$result);
+ STACKTOP = sp;return;
+}
+function _gc_step_ratio_get($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = ((($1)) + 92|0);
+ $3 = ((($2)) + 448|0);
+ $4 = HEAP32[$3>>2]|0;
+ _mrb_fixnum_value($agg$result,$4);
+ STACKTOP = sp;return;
+}
+function _gc_step_ratio_set($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $ratio = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $ratio = sp + 4|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $ratio;
+ (_mrb_get_args($1,64319,$vararg_buffer)|0);
+ $2 = HEAP32[$ratio>>2]|0;
+ $3 = $0;
+ $4 = ((($3)) + 92|0);
+ $5 = ((($4)) + 448|0);
+ HEAP32[$5>>2] = $2;
+ _mrb_nil_value_53($agg$result);
+ STACKTOP = sp;return;
+}
+function _gc_generational_mode_set($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $enable = 0, $vararg_buffer = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $enable = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $enable;
+ (_mrb_get_args($1,55037,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = ((($2)) + 92|0);
+ $4 = ((($3)) + 452|0);
+ $5 = HEAP8[$4>>0]|0;
+ $6 = ($5&255) >>> 2;
+ $7 = $6 & 1;
+ $8 = $7&255;
+ $9 = HEAP8[$enable>>0]|0;
+ $10 = $9&255;
+ $11 = ($8|0)!=($10|0);
+ if (!($11)) {
+  $16 = HEAP8[$enable>>0]|0;
+  _mrb_bool_value($agg$result,$16);
+  STACKTOP = sp;return;
+ }
+ $12 = $0;
+ $13 = $0;
+ $14 = ((($13)) + 92|0);
+ $15 = HEAP8[$enable>>0]|0;
+ _change_gen_gc_mode($12,$14,$15);
+ $16 = HEAP8[$enable>>0]|0;
+ _mrb_bool_value($agg$result,$16);
+ STACKTOP = sp;return;
+}
+function _change_gen_gc_mode($mrb,$gc,$enable) {
+ $mrb = $mrb|0;
+ $gc = $gc|0;
+ $enable = $enable|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $gc;
+ $2 = $enable;
+ $3 = $1;
+ $4 = ((($3)) + 452|0);
+ $5 = HEAP8[$4>>0]|0;
+ $6 = ($5&255) >>> 2;
+ $7 = $6 & 1;
+ $8 = $7&255;
+ $9 = ($8|0)==(0);
+ $10 = $2;
+ $11 = ($10<<24>>24)!=(0);
+ $or$cond = $9 | $11;
+ if ($or$cond) {
+  $18 = $1;
+  $19 = ((($18)) + 452|0);
+  $20 = HEAP8[$19>>0]|0;
+  $21 = ($20&255) >>> 2;
+  $22 = $21 & 1;
+  $23 = ($22<<24>>24)!=(0);
+  if (!($23)) {
+   $24 = $2;
+   $25 = $24&255;
+   $26 = ($25|0)!=(0);
+   if ($26) {
+    $27 = $0;
+    $28 = $1;
+    _incremental_gc_until($27,$28,0);
+    $29 = $1;
+    $30 = ((($29)) + 436|0);
+    $31 = HEAP32[$30>>2]|0;
+    $32 = (($31>>>0) / 100)&-1;
+    $33 = ($32*200)|0;
+    $34 = $1;
+    $35 = ((($34)) + 456|0);
+    HEAP32[$35>>2] = $33;
+    $36 = $1;
+    $37 = ((($36)) + 452|0);
+    $38 = HEAP8[$37>>0]|0;
+    $39 = $38 & -3;
+    HEAP8[$37>>0] = $39;
+   }
+  }
+ } else {
+  $12 = $0;
+  $13 = $1;
+  _clear_all_old($12,$13);
+  $14 = $1;
+  $15 = ((($14)) + 452|0);
+  $16 = HEAP8[$15>>0]|0;
+  $17 = $16 & -3;
+  HEAP8[$15>>0] = $17;
+ }
+ $40 = $2;
+ $41 = $1;
+ $42 = ((($41)) + 452|0);
+ $43 = HEAP8[$42>>0]|0;
+ $44 = $40 & 1;
+ $45 = ($44 << 2)&255;
+ $46 = $43 & -5;
+ $47 = $46 | $45;
+ HEAP8[$42>>0] = $47;
+ STACKTOP = sp;return;
+}
+function _gc_generational_mode_get($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = ((($1)) + 92|0);
+ $3 = ((($2)) + 452|0);
+ $4 = HEAP8[$3>>0]|0;
+ $5 = ($4&255) >>> 2;
+ $6 = $5 & 1;
+ _mrb_bool_value($agg$result,$6);
+ STACKTOP = sp;return;
+}
+function _kh_alloc_ht($mrb,$h) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $len = 0, $p = 0;
+ var $sz = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $h;
+ $2 = $1;
+ $3 = HEAP32[$2>>2]|0;
+ $sz = $3;
+ $len = 20;
+ $4 = $0;
+ $5 = $sz;
+ $6 = $5;
+ $7 = (($6>>>0) / 4)&-1;
+ $8 = $len;
+ $9 = $sz;
+ $10 = Math_imul($8, $9)|0;
+ $11 = (($7) + ($10))|0;
+ $12 = (_mrb_malloc($4,$11)|0);
+ $p = $12;
+ $13 = $1;
+ $14 = ((($13)) + 8|0);
+ HEAP32[$14>>2] = 0;
+ $15 = $1;
+ $16 = ((($15)) + 4|0);
+ HEAP32[$16>>2] = 0;
+ $17 = $p;
+ $18 = $1;
+ $19 = ((($18)) + 16|0);
+ HEAP32[$19>>2] = $17;
+ $20 = $p;
+ $21 = $sz;
+ $22 = $21<<3;
+ $23 = (($20) + ($22)|0);
+ $24 = $1;
+ $25 = ((($24)) + 20|0);
+ HEAP32[$25>>2] = $23;
+ $26 = $p;
+ $27 = $len;
+ $28 = $sz;
+ $29 = Math_imul($27, $28)|0;
+ $30 = (($26) + ($29)|0);
+ $31 = $1;
+ $32 = ((($31)) + 12|0);
+ HEAP32[$32>>2] = $30;
+ $33 = $1;
+ $34 = ((($33)) + 12|0);
+ $35 = HEAP32[$34>>2]|0;
+ $36 = $sz;
+ $37 = (($36>>>0) / 4)&-1;
+ _kh_fill_flags($35,-86,$37);
+ STACKTOP = sp;return;
+}
+function _kh_fill_flags($p,$c,$len) {
+ $p = $p|0;
+ $c = $c|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $c;
+ $2 = $len;
+ while(1) {
+  $3 = $2;
+  $4 = (($3) + -1)|0;
+  $2 = $4;
+  $5 = ($3>>>0)>(0);
+  if (!($5)) {
+   break;
+  }
+  $6 = $1;
+  $7 = $0;
+  $8 = ((($7)) + 1|0);
+  $0 = $8;
+  HEAP8[$7>>0] = $6;
+ }
+ STACKTOP = sp;return;
+}
+function _kh_init_ht_size($mrb,$size) {
+ $mrb = $mrb|0;
+ $size = $size|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $h = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $size;
+ $2 = $0;
+ $3 = (_mrb_calloc($2,1,24)|0);
+ $h = $3;
+ $4 = $1;
+ $5 = ($4>>>0)<(8);
+ if ($5) {
+  $1 = 8;
+ }
+ $6 = $1;
+ $7 = (($6) + -1)|0;
+ $1 = $7;
+ $8 = $1;
+ $9 = $8 >>> 1;
+ $10 = $1;
+ $11 = $10 | $9;
+ $1 = $11;
+ $12 = $1;
+ $13 = $12 >>> 2;
+ $14 = $1;
+ $15 = $14 | $13;
+ $1 = $15;
+ $16 = $1;
+ $17 = $16 >>> 4;
+ $18 = $1;
+ $19 = $18 | $17;
+ $1 = $19;
+ $20 = $1;
+ $21 = $20 >>> 8;
+ $22 = $1;
+ $23 = $22 | $21;
+ $1 = $23;
+ $24 = $1;
+ $25 = $24 >>> 16;
+ $26 = $1;
+ $27 = $26 | $25;
+ $1 = $27;
+ $28 = $1;
+ $29 = (($28) + 1)|0;
+ $1 = $29;
+ $30 = $1;
+ $31 = $h;
+ HEAP32[$31>>2] = $30;
+ $32 = $0;
+ $33 = $h;
+ _kh_alloc_ht($32,$33);
+ $34 = $h;
+ STACKTOP = sp;return ($34|0);
+}
+function _kh_init_ht($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = (_kh_init_ht_size($1,8)|0);
+ STACKTOP = sp;return ($2|0);
+}
+function _kh_destroy_ht($mrb,$h) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $h;
+ $2 = $1;
+ $3 = ($2|0)!=(0|0);
+ if (!($3)) {
+  STACKTOP = sp;return;
+ }
+ $4 = $0;
+ $5 = $1;
+ $6 = ((($5)) + 16|0);
+ $7 = HEAP32[$6>>2]|0;
+ _mrb_free($4,$7);
+ $8 = $0;
+ $9 = $1;
+ _mrb_free($8,$9);
+ STACKTOP = sp;return;
+}
+function _kh_clear_ht($mrb,$h) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $h;
+ $2 = $1;
+ $3 = ($2|0)!=(0|0);
+ if (!($3)) {
+  STACKTOP = sp;return;
+ }
+ $4 = $1;
+ $5 = ((($4)) + 12|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = ($6|0)!=(0|0);
+ if (!($7)) {
+  STACKTOP = sp;return;
+ }
+ $8 = $1;
+ $9 = ((($8)) + 12|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = $1;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = (($12>>>0) / 4)&-1;
+ _kh_fill_flags($10,-86,$13);
+ $14 = $1;
+ $15 = ((($14)) + 8|0);
+ HEAP32[$15>>2] = 0;
+ $16 = $1;
+ $17 = ((($16)) + 4|0);
+ HEAP32[$17>>2] = 0;
+ STACKTOP = sp;return;
+}
+function _kh_get_ht($mrb,$h,$key) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ $key = $key|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $k = 0, $key$byval_copy = 0, $key$byval_copy1 = 0, $step = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $key$byval_copy1 = sp + 40|0;
+ $$byval_copy = sp + 32|0;
+ $key$byval_copy = sp + 24|0;
+ $1 = $mrb;
+ $2 = $h;
+ $3 = $1;
+ ;HEAP32[$key$byval_copy>>2]=HEAP32[$key>>2]|0;HEAP32[$key$byval_copy+4>>2]=HEAP32[$key+4>>2]|0;
+ $4 = (_mrb_hash_ht_hash_func($3,$key$byval_copy)|0);
+ $5 = $2;
+ $6 = HEAP32[$5>>2]|0;
+ $7 = (($6) - 1)|0;
+ $8 = $4 & $7;
+ $k = $8;
+ $step = 0;
+ while(1) {
+  $9 = $k;
+  $10 = (($9>>>0) / 4)&-1;
+  $11 = $2;
+  $12 = ((($11)) + 12|0);
+  $13 = HEAP32[$12>>2]|0;
+  $14 = (($13) + ($10)|0);
+  $15 = HEAP8[$14>>0]|0;
+  $16 = $15&255;
+  $17 = $k;
+  $18 = (($17>>>0) % 4)&-1;
+  $19 = (54704 + ($18)|0);
+  $20 = HEAP8[$19>>0]|0;
+  $21 = $20&255;
+  $22 = $16 & $21;
+  $23 = ($22|0)!=(0);
+  $24 = $23 ^ 1;
+  if (!($24)) {
+   label = 7;
+   break;
+  }
+  $25 = $k;
+  $26 = (($25>>>0) / 4)&-1;
+  $27 = $2;
+  $28 = ((($27)) + 12|0);
+  $29 = HEAP32[$28>>2]|0;
+  $30 = (($29) + ($26)|0);
+  $31 = HEAP8[$30>>0]|0;
+  $32 = $31&255;
+  $33 = $k;
+  $34 = (($33>>>0) % 4)&-1;
+  $35 = (54708 + ($34)|0);
+  $36 = HEAP8[$35>>0]|0;
+  $37 = $36&255;
+  $38 = $32 & $37;
+  $39 = ($38|0)!=(0);
+  if (!($39)) {
+   $40 = $1;
+   $41 = $k;
+   $42 = $2;
+   $43 = ((($42)) + 16|0);
+   $44 = HEAP32[$43>>2]|0;
+   $45 = (($44) + ($41<<3)|0);
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$45>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$45+4>>2]|0;
+   ;HEAP32[$key$byval_copy1>>2]=HEAP32[$key>>2]|0;HEAP32[$key$byval_copy1+4>>2]=HEAP32[$key+4>>2]|0;
+   $46 = (_mrb_hash_ht_hash_equal($40,$$byval_copy,$key$byval_copy1)|0);
+   $47 = ($46|0)!=(0);
+   if ($47) {
+    label = 5;
+    break;
+   }
+  }
+  $49 = $k;
+  $50 = $step;
+  $51 = (($50) + 1)|0;
+  $step = $51;
+  $52 = (($49) + ($51))|0;
+  $53 = $2;
+  $54 = HEAP32[$53>>2]|0;
+  $55 = (($54) - 1)|0;
+  $56 = $52 & $55;
+  $k = $56;
+ }
+ if ((label|0) == 5) {
+  $48 = $k;
+  $0 = $48;
+  $59 = $0;
+  STACKTOP = sp;return ($59|0);
+ }
+ else if ((label|0) == 7) {
+  $57 = $2;
+  $58 = HEAP32[$57>>2]|0;
+  $0 = $58;
+  $59 = $0;
+  STACKTOP = sp;return ($59|0);
+ }
+ return (0)|0;
+}
+function _mrb_hash_ht_hash_func($mrb,$key) {
+ $mrb = $mrb|0;
+ $key = $key|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0.0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0.0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
+ var $81 = 0, $9 = 0, $h = 0, $hv = 0, $i = 0, $key$byval_copy = 0, $len = 0, $p = 0, $t = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $key$byval_copy = sp + 56|0;
+ $vararg_buffer = sp;
+ $hv = sp + 32|0;
+ $2 = sp + 8|0;
+ $1 = $mrb;
+ $3 = ((($key)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $t = $4;
+ $5 = $t;
+ switch ($5|0) {
+ case 16:  {
+  $6 = HEAP32[$key>>2]|0;
+  $7 = HEAP32[$6>>2]|0;
+  $8 = $7 >>> 11;
+  $9 = $8 & 8;
+  $10 = ($9|0)!=(0);
+  $11 = HEAP32[$key>>2]|0;
+  $12 = ((($11)) + 12|0);
+  if ($10) {
+   $15 = $12;
+  } else {
+   $13 = ((($12)) + 8|0);
+   $14 = HEAP32[$13>>2]|0;
+   $15 = $14;
+  }
+  $p = $15;
+  $16 = HEAP32[$key>>2]|0;
+  $17 = HEAP32[$16>>2]|0;
+  $18 = $17 >>> 11;
+  $19 = $18 & 8;
+  $20 = ($19|0)!=(0);
+  $21 = HEAP32[$key>>2]|0;
+  if ($20) {
+   $22 = HEAP32[$21>>2]|0;
+   $23 = $22 >>> 11;
+   $24 = $23 & 496;
+   $25 = $24 >> 4;
+   $28 = $25;
+  } else {
+   $26 = ((($21)) + 12|0);
+   $27 = HEAP32[$26>>2]|0;
+   $28 = $27;
+  }
+  $len = $28;
+  $h = 0;
+  $i = 0;
+  while(1) {
+   $29 = $i;
+   $30 = $len;
+   $31 = ($29|0)<($30|0);
+   $32 = $h;
+   if (!($31)) {
+    break;
+   }
+   $33 = $32 << 5;
+   $34 = $h;
+   $35 = (($33) - ($34))|0;
+   $36 = $p;
+   $37 = ((($36)) + 1|0);
+   $p = $37;
+   $38 = HEAP8[$36>>0]|0;
+   $39 = $38 << 24 >> 24;
+   $40 = (($35) + ($39))|0;
+   $h = $40;
+   $41 = $i;
+   $42 = (($41) + 1)|0;
+   $i = $42;
+  }
+  $0 = $32;
+  $81 = $0;
+  STACKTOP = sp;return ($81|0);
+  break;
+ }
+ case 4:  {
+  $43 = HEAP32[$key>>2]|0;
+  $h = $43;
+  $44 = $h;
+  $45 = $h;
+  $46 = $45 << 2;
+  $47 = $44 ^ $46;
+  $48 = $h;
+  $49 = $48 >>> 2;
+  $50 = $47 ^ $49;
+  $0 = $50;
+  $81 = $0;
+  STACKTOP = sp;return ($81|0);
+  break;
+ }
+ case 3:  {
+  $51 = HEAP32[$key>>2]|0;
+  $52 = (+($51|0));
+  $53 = (_mrb_float_id($52)|0);
+  $h = $53;
+  $54 = $h;
+  $55 = $h;
+  $56 = $55 << 2;
+  $57 = $54 ^ $56;
+  $58 = $h;
+  $59 = $58 >>> 2;
+  $60 = $57 ^ $59;
+  $0 = $60;
+  $81 = $0;
+  STACKTOP = sp;return ($81|0);
+  break;
+ }
+ case 6:  {
+  $61 = +HEAPF32[$key>>2];
+  $62 = (_mrb_float_id($61)|0);
+  $h = $62;
+  $63 = $h;
+  $64 = $h;
+  $65 = $64 << 2;
+  $66 = $63 ^ $65;
+  $67 = $h;
+  $68 = $67 >>> 2;
+  $69 = $66 ^ $68;
+  $0 = $69;
+  $81 = $0;
+  STACKTOP = sp;return ($81|0);
+  break;
+ }
+ default: {
+  $70 = $1;
+  ;HEAP32[$key$byval_copy>>2]=HEAP32[$key>>2]|0;HEAP32[$key$byval_copy+4>>2]=HEAP32[$key+4>>2]|0;
+  _mrb_funcall($2,$70,$key$byval_copy,68178,0,$vararg_buffer);
+  ;HEAP32[$hv>>2]=HEAP32[$2>>2]|0;HEAP32[$hv+4>>2]=HEAP32[$2+4>>2]|0;
+  $71 = $t;
+  $72 = HEAP32[$hv>>2]|0;
+  $73 = $71 ^ $72;
+  $h = $73;
+  $74 = $h;
+  $75 = $h;
+  $76 = $75 << 2;
+  $77 = $74 ^ $76;
+  $78 = $h;
+  $79 = $78 >>> 2;
+  $80 = $77 ^ $79;
+  $0 = $80;
+  $81 = $0;
+  STACKTOP = sp;return ($81|0);
+ }
+ }
+ return (0)|0;
+}
+function _mrb_hash_ht_hash_equal($mrb,$a,$b) {
+ $mrb = $mrb|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $a$byval_copy = 0, $a$byval_copy1 = 0, $b$byval_copy = 0, $b$byval_copy2 = 0, $t = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $b$byval_copy2 = sp + 40|0;
+ $a$byval_copy1 = sp + 32|0;
+ $b$byval_copy = sp + 24|0;
+ $a$byval_copy = sp + 16|0;
+ $1 = $mrb;
+ $2 = ((($a)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $t = $3;
+ $4 = $t;
+ L1: do {
+  switch ($4|0) {
+  case 16:  {
+   $5 = $1;
+   ;HEAP32[$a$byval_copy>>2]=HEAP32[$a>>2]|0;HEAP32[$a$byval_copy+4>>2]=HEAP32[$a+4>>2]|0;
+   ;HEAP32[$b$byval_copy>>2]=HEAP32[$b>>2]|0;HEAP32[$b$byval_copy+4>>2]=HEAP32[$b+4>>2]|0;
+   $6 = (_mrb_str_equal($5,$a$byval_copy,$b$byval_copy)|0);
+   $7 = $6&255;
+   $0 = $7;
+   break;
+  }
+  case 4:  {
+   $8 = ((($b)) + 4|0);
+   $9 = HEAP32[$8>>2]|0;
+   $10 = ($9|0)!=(4);
+   if ($10) {
+    $0 = 0;
+    break L1;
+   } else {
+    $11 = HEAP32[$a>>2]|0;
+    $12 = HEAP32[$b>>2]|0;
+    $13 = ($11|0)==($12|0);
+    $14 = $13&1;
+    $0 = $14;
+    break L1;
+   }
+   break;
+  }
+  case 3:  {
+   $15 = ((($b)) + 4|0);
+   $16 = HEAP32[$15>>2]|0;
+   switch ($16|0) {
+   case 3:  {
+    $17 = HEAP32[$a>>2]|0;
+    $18 = HEAP32[$b>>2]|0;
+    $19 = ($17|0)==($18|0);
+    $20 = $19&1;
+    $0 = $20;
+    break L1;
+    break;
+   }
+   case 6:  {
+    $21 = HEAP32[$a>>2]|0;
+    $22 = (+($21|0));
+    $23 = +HEAPF32[$b>>2];
+    $24 = $22 == $23;
+    $25 = $24&1;
+    $0 = $25;
+    break L1;
+    break;
+   }
+   default: {
+    $0 = 0;
+    break L1;
+   }
+   }
+   break;
+  }
+  case 6:  {
+   $26 = ((($b)) + 4|0);
+   $27 = HEAP32[$26>>2]|0;
+   switch ($27|0) {
+   case 3:  {
+    $28 = +HEAPF32[$a>>2];
+    $29 = HEAP32[$b>>2]|0;
+    $30 = (+($29|0));
+    $31 = $28 == $30;
+    $32 = $31&1;
+    $0 = $32;
+    break L1;
+    break;
+   }
+   case 6:  {
+    $33 = +HEAPF32[$a>>2];
+    $34 = +HEAPF32[$b>>2];
+    $35 = $33 == $34;
+    $36 = $35&1;
+    $0 = $36;
+    break L1;
+    break;
+   }
+   default: {
+    $0 = 0;
+    break L1;
+   }
+   }
+   break;
+  }
+  default: {
+   $37 = $1;
+   ;HEAP32[$a$byval_copy1>>2]=HEAP32[$a>>2]|0;HEAP32[$a$byval_copy1+4>>2]=HEAP32[$a+4>>2]|0;
+   ;HEAP32[$b$byval_copy2>>2]=HEAP32[$b>>2]|0;HEAP32[$b$byval_copy2+4>>2]=HEAP32[$b+4>>2]|0;
+   $38 = (_mrb_eql($37,$a$byval_copy1,$b$byval_copy2)|0);
+   $39 = $38&255;
+   $0 = $39;
+  }
+  }
+ } while(0);
+ $40 = $0;
+ STACKTOP = sp;return ($40|0);
+}
+function _kh_resize_ht($mrb,$h,$new_n_buckets) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ $new_n_buckets = $new_n_buckets|0;
+ var $$byval_copy = 0, $$new_n_buckets = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
+ var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0;
+ var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $8 = 0, $9 = 0, $hh = 0, $i = 0, $k = 0;
+ var $old_ed_flags = 0, $old_keys = 0, $old_n_buckets = 0, $old_vals = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 64|0;
+ $hh = sp + 24|0;
+ $0 = $mrb;
+ $1 = $h;
+ $2 = $new_n_buckets;
+ $3 = $2;
+ $4 = ($3>>>0)<(8);
+ $$new_n_buckets = $4 ? 8 : $new_n_buckets;
+ $2 = $$new_n_buckets;
+ $5 = $2;
+ $6 = (($5) + -1)|0;
+ $2 = $6;
+ $7 = $2;
+ $8 = $7 >>> 1;
+ $9 = $2;
+ $10 = $9 | $8;
+ $2 = $10;
+ $11 = $2;
+ $12 = $11 >>> 2;
+ $13 = $2;
+ $14 = $13 | $12;
+ $2 = $14;
+ $15 = $2;
+ $16 = $15 >>> 4;
+ $17 = $2;
+ $18 = $17 | $16;
+ $2 = $18;
+ $19 = $2;
+ $20 = $19 >>> 8;
+ $21 = $2;
+ $22 = $21 | $20;
+ $2 = $22;
+ $23 = $2;
+ $24 = $23 >>> 16;
+ $25 = $2;
+ $26 = $25 | $24;
+ $2 = $26;
+ $27 = $2;
+ $28 = (($27) + 1)|0;
+ $2 = $28;
+ $29 = $1;
+ $30 = ((($29)) + 12|0);
+ $31 = HEAP32[$30>>2]|0;
+ $old_ed_flags = $31;
+ $32 = $1;
+ $33 = ((($32)) + 16|0);
+ $34 = HEAP32[$33>>2]|0;
+ $old_keys = $34;
+ $35 = $1;
+ $36 = ((($35)) + 20|0);
+ $37 = HEAP32[$36>>2]|0;
+ $old_vals = $37;
+ $38 = $1;
+ $39 = HEAP32[$38>>2]|0;
+ $old_n_buckets = $39;
+ $40 = $2;
+ HEAP32[$hh>>2] = $40;
+ $41 = $0;
+ _kh_alloc_ht($41,$hh);
+ $i = 0;
+ while(1) {
+  $42 = $i;
+  $43 = $old_n_buckets;
+  $44 = ($42>>>0)<($43>>>0);
+  if (!($44)) {
+   break;
+  }
+  $45 = $i;
+  $46 = (($45>>>0) / 4)&-1;
+  $47 = $old_ed_flags;
+  $48 = (($47) + ($46)|0);
+  $49 = HEAP8[$48>>0]|0;
+  $50 = $49&255;
+  $51 = $i;
+  $52 = (($51>>>0) % 4)&-1;
+  $53 = (54712 + ($52)|0);
+  $54 = HEAP8[$53>>0]|0;
+  $55 = $54&255;
+  $56 = $50 & $55;
+  $57 = ($56|0)!=(0);
+  if (!($57)) {
+   $58 = $0;
+   $59 = $i;
+   $60 = $old_keys;
+   $61 = (($60) + ($59<<3)|0);
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$61>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$61+4>>2]|0;
+   $62 = (_kh_put_ht($58,$hh,$$byval_copy,0)|0);
+   $k = $62;
+   $63 = $k;
+   $64 = ((($hh)) + 20|0);
+   $65 = HEAP32[$64>>2]|0;
+   $66 = (($65) + (($63*12)|0)|0);
+   $67 = $i;
+   $68 = $old_vals;
+   $69 = (($68) + (($67*12)|0)|0);
+   ;HEAP32[$66>>2]=HEAP32[$69>>2]|0;HEAP32[$66+4>>2]=HEAP32[$69+4>>2]|0;HEAP32[$66+8>>2]=HEAP32[$69+8>>2]|0;
+  }
+  $70 = $i;
+  $71 = (($70) + 1)|0;
+  $i = $71;
+ }
+ $72 = $1;
+ ;HEAP32[$72>>2]=HEAP32[$hh>>2]|0;HEAP32[$72+4>>2]=HEAP32[$hh+4>>2]|0;HEAP32[$72+8>>2]=HEAP32[$hh+8>>2]|0;HEAP32[$72+12>>2]=HEAP32[$hh+12>>2]|0;HEAP32[$72+16>>2]=HEAP32[$hh+16>>2]|0;HEAP32[$72+20>>2]=HEAP32[$hh+20>>2]|0;
+ $73 = $0;
+ $74 = $old_keys;
+ _mrb_free($73,$74);
+ STACKTOP = sp;return;
+}
+function _kh_put_ht($mrb,$h,$key,$ret) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ $key = $key|0;
+ $ret = $ret|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0;
+ var $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0;
+ var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0;
+ var $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0;
+ var $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0;
+ var $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0;
+ var $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0;
+ var $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $del_k = 0, $k = 0, $key$byval_copy = 0, $key$byval_copy1 = 0, $step = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $key$byval_copy1 = sp + 48|0;
+ $$byval_copy = sp + 40|0;
+ $key$byval_copy = sp + 32|0;
+ $1 = $mrb;
+ $2 = $h;
+ $3 = $ret;
+ $step = 0;
+ $4 = $2;
+ $5 = ((($4)) + 8|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = $2;
+ $8 = HEAP32[$7>>2]|0;
+ $9 = $8 >>> 2;
+ $10 = $2;
+ $11 = HEAP32[$10>>2]|0;
+ $12 = $11 >>> 1;
+ $13 = $9 | $12;
+ $14 = ($6>>>0)>=($13>>>0);
+ if ($14) {
+  $15 = $1;
+  $16 = $2;
+  $17 = $2;
+  $18 = HEAP32[$17>>2]|0;
+  $19 = $18<<1;
+  _kh_resize_ht($15,$16,$19);
+ }
+ $20 = $1;
+ ;HEAP32[$key$byval_copy>>2]=HEAP32[$key>>2]|0;HEAP32[$key$byval_copy+4>>2]=HEAP32[$key+4>>2]|0;
+ $21 = (_mrb_hash_ht_hash_func($20,$key$byval_copy)|0);
+ $22 = $2;
+ $23 = HEAP32[$22>>2]|0;
+ $24 = (($23) - 1)|0;
+ $25 = $21 & $24;
+ $k = $25;
+ $26 = $2;
+ $27 = HEAP32[$26>>2]|0;
+ $del_k = $27;
+ while(1) {
+  $28 = $k;
+  $29 = (($28>>>0) / 4)&-1;
+  $30 = $2;
+  $31 = ((($30)) + 12|0);
+  $32 = HEAP32[$31>>2]|0;
+  $33 = (($32) + ($29)|0);
+  $34 = HEAP8[$33>>0]|0;
+  $35 = $34&255;
+  $36 = $k;
+  $37 = (($36>>>0) % 4)&-1;
+  $38 = (54704 + ($37)|0);
+  $39 = HEAP8[$38>>0]|0;
+  $40 = $39&255;
+  $41 = $35 & $40;
+  $42 = ($41|0)!=(0);
+  $43 = $42 ^ 1;
+  if (!($43)) {
+   break;
+  }
+  $44 = $k;
+  $45 = (($44>>>0) / 4)&-1;
+  $46 = $2;
+  $47 = ((($46)) + 12|0);
+  $48 = HEAP32[$47>>2]|0;
+  $49 = (($48) + ($45)|0);
+  $50 = HEAP8[$49>>0]|0;
+  $51 = $50&255;
+  $52 = $k;
+  $53 = (($52>>>0) % 4)&-1;
+  $54 = (54708 + ($53)|0);
+  $55 = HEAP8[$54>>0]|0;
+  $56 = $55&255;
+  $57 = $51 & $56;
+  $58 = ($57|0)!=(0);
+  if ($58) {
+   $71 = $del_k;
+   $72 = $2;
+   $73 = HEAP32[$72>>2]|0;
+   $74 = ($71|0)==($73|0);
+   if ($74) {
+    $75 = $k;
+    $del_k = $75;
+   }
+  } else {
+   $59 = $1;
+   $60 = $k;
+   $61 = $2;
+   $62 = ((($61)) + 16|0);
+   $63 = HEAP32[$62>>2]|0;
+   $64 = (($63) + ($60<<3)|0);
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$64>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$64+4>>2]|0;
+   ;HEAP32[$key$byval_copy1>>2]=HEAP32[$key>>2]|0;HEAP32[$key$byval_copy1+4>>2]=HEAP32[$key+4>>2]|0;
+   $65 = (_mrb_hash_ht_hash_equal($59,$$byval_copy,$key$byval_copy1)|0);
+   $66 = ($65|0)!=(0);
+   if ($66) {
+    label = 7;
+    break;
+   }
+  }
+  $76 = $k;
+  $77 = $step;
+  $78 = (($77) + 1)|0;
+  $step = $78;
+  $79 = (($76) + ($78))|0;
+  $80 = $2;
+  $81 = HEAP32[$80>>2]|0;
+  $82 = (($81) - 1)|0;
+  $83 = $79 & $82;
+  $k = $83;
+ }
+ if ((label|0) == 7) {
+  $67 = $3;
+  $68 = ($67|0)!=(0|0);
+  if ($68) {
+   $69 = $3;
+   HEAP32[$69>>2] = 0;
+  }
+  $70 = $k;
+  $0 = $70;
+  $150 = $0;
+  STACKTOP = sp;return ($150|0);
+ }
+ $84 = $del_k;
+ $85 = $2;
+ $86 = HEAP32[$85>>2]|0;
+ $87 = ($84|0)!=($86|0);
+ if ($87) {
+  $88 = $del_k;
+  $89 = $2;
+  $90 = ((($89)) + 16|0);
+  $91 = HEAP32[$90>>2]|0;
+  $92 = (($91) + ($88<<3)|0);
+  ;HEAP32[$92>>2]=HEAP32[$key>>2]|0;HEAP32[$92+4>>2]=HEAP32[$key+4>>2]|0;
+  $93 = $del_k;
+  $94 = (($93>>>0) % 4)&-1;
+  $95 = (54708 + ($94)|0);
+  $96 = HEAP8[$95>>0]|0;
+  $97 = $96&255;
+  $98 = $97 ^ -1;
+  $99 = $del_k;
+  $100 = (($99>>>0) / 4)&-1;
+  $101 = $2;
+  $102 = ((($101)) + 12|0);
+  $103 = HEAP32[$102>>2]|0;
+  $104 = (($103) + ($100)|0);
+  $105 = HEAP8[$104>>0]|0;
+  $106 = $105&255;
+  $107 = $106 & $98;
+  $108 = $107&255;
+  HEAP8[$104>>0] = $108;
+  $109 = $2;
+  $110 = ((($109)) + 4|0);
+  $111 = HEAP32[$110>>2]|0;
+  $112 = (($111) + 1)|0;
+  HEAP32[$110>>2] = $112;
+  $113 = $3;
+  $114 = ($113|0)!=(0|0);
+  if ($114) {
+   $115 = $3;
+   HEAP32[$115>>2] = 2;
+  }
+  $116 = $del_k;
+  $0 = $116;
+  $150 = $0;
+  STACKTOP = sp;return ($150|0);
+ } else {
+  $117 = $k;
+  $118 = $2;
+  $119 = ((($118)) + 16|0);
+  $120 = HEAP32[$119>>2]|0;
+  $121 = (($120) + ($117<<3)|0);
+  ;HEAP32[$121>>2]=HEAP32[$key>>2]|0;HEAP32[$121+4>>2]=HEAP32[$key+4>>2]|0;
+  $122 = $k;
+  $123 = (($122>>>0) % 4)&-1;
+  $124 = (54704 + ($123)|0);
+  $125 = HEAP8[$124>>0]|0;
+  $126 = $125&255;
+  $127 = $126 ^ -1;
+  $128 = $k;
+  $129 = (($128>>>0) / 4)&-1;
+  $130 = $2;
+  $131 = ((($130)) + 12|0);
+  $132 = HEAP32[$131>>2]|0;
+  $133 = (($132) + ($129)|0);
+  $134 = HEAP8[$133>>0]|0;
+  $135 = $134&255;
+  $136 = $135 & $127;
+  $137 = $136&255;
+  HEAP8[$133>>0] = $137;
+  $138 = $2;
+  $139 = ((($138)) + 4|0);
+  $140 = HEAP32[$139>>2]|0;
+  $141 = (($140) + 1)|0;
+  HEAP32[$139>>2] = $141;
+  $142 = $2;
+  $143 = ((($142)) + 8|0);
+  $144 = HEAP32[$143>>2]|0;
+  $145 = (($144) + 1)|0;
+  HEAP32[$143>>2] = $145;
+  $146 = $3;
+  $147 = ($146|0)!=(0|0);
+  if ($147) {
+   $148 = $3;
+   HEAP32[$148>>2] = 1;
+  }
+  $149 = $k;
+  $0 = $149;
+  $150 = $0;
+  STACKTOP = sp;return ($150|0);
+ }
+ return (0)|0;
+}
+function _kh_del_ht($mrb,$h,$x) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $h;
+ $2 = $x;
+ $3 = $2;
+ $4 = (($3>>>0) % 4)&-1;
+ $5 = (54708 + ($4)|0);
+ $6 = HEAP8[$5>>0]|0;
+ $7 = $6&255;
+ $8 = $2;
+ $9 = (($8>>>0) / 4)&-1;
+ $10 = $1;
+ $11 = ((($10)) + 12|0);
+ $12 = HEAP32[$11>>2]|0;
+ $13 = (($12) + ($9)|0);
+ $14 = HEAP8[$13>>0]|0;
+ $15 = $14&255;
+ $16 = $15 | $7;
+ $17 = $16&255;
+ HEAP8[$13>>0] = $17;
+ $18 = $1;
+ $19 = ((($18)) + 4|0);
+ $20 = HEAP32[$19>>2]|0;
+ $21 = (($20) + -1)|0;
+ HEAP32[$19>>2] = $21;
+ STACKTOP = sp;return;
+}
+function _mrb_gc_mark_hash($mrb,$hash) {
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $h = 0, $k = 0, $key = 0, $val = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $key = sp + 8|0;
+ $val = sp;
+ $0 = $mrb;
+ $1 = $hash;
+ $2 = $1;
+ $3 = ((($2)) + 16|0);
+ $4 = HEAP32[$3>>2]|0;
+ $h = $4;
+ $5 = $h;
+ $6 = ($5|0)!=(0|0);
+ if (!($6)) {
+  STACKTOP = sp;return;
+ }
+ $k = 0;
+ while(1) {
+  $7 = $k;
+  $8 = $h;
+  $9 = HEAP32[$8>>2]|0;
+  $10 = ($7|0)!=($9|0);
+  if (!($10)) {
+   break;
+  }
+  $11 = $k;
+  $12 = (($11>>>0) / 4)&-1;
+  $13 = $h;
+  $14 = ((($13)) + 12|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = (($15) + ($12)|0);
+  $17 = HEAP8[$16>>0]|0;
+  $18 = $17&255;
+  $19 = $k;
+  $20 = (($19>>>0) % 4)&-1;
+  $21 = (54712 + ($20)|0);
+  $22 = HEAP8[$21>>0]|0;
+  $23 = $22&255;
+  $24 = $18 & $23;
+  $25 = ($24|0)!=(0);
+  if (!($25)) {
+   $26 = $k;
+   $27 = $h;
+   $28 = ((($27)) + 16|0);
+   $29 = HEAP32[$28>>2]|0;
+   $30 = (($29) + ($26<<3)|0);
+   ;HEAP32[$key>>2]=HEAP32[$30>>2]|0;HEAP32[$key+4>>2]=HEAP32[$30+4>>2]|0;
+   $31 = $k;
+   $32 = $h;
+   $33 = ((($32)) + 20|0);
+   $34 = HEAP32[$33>>2]|0;
+   $35 = (($34) + (($31*12)|0)|0);
+   ;HEAP32[$val>>2]=HEAP32[$35>>2]|0;HEAP32[$val+4>>2]=HEAP32[$35+4>>2]|0;
+   $36 = ((($key)) + 4|0);
+   $37 = HEAP32[$36>>2]|0;
+   $38 = ($37>>>0)<(8);
+   if (!($38)) {
+    $39 = $0;
+    $40 = HEAP32[$key>>2]|0;
+    _mrb_gc_mark($39,$40);
+   }
+   $41 = ((($val)) + 4|0);
+   $42 = HEAP32[$41>>2]|0;
+   $43 = ($42>>>0)<(8);
+   if (!($43)) {
+    $44 = $0;
+    $45 = HEAP32[$val>>2]|0;
+    _mrb_gc_mark($44,$45);
+   }
+  }
+  $46 = $k;
+  $47 = (($46) + 1)|0;
+  $k = $47;
+ }
+ STACKTOP = sp;return;
+}
+function _mrb_gc_mark_hash_size($mrb,$hash) {
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $hash;
+ $3 = $2;
+ $4 = ((($3)) + 16|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ($5|0)!=(0|0);
+ if ($6) {
+  $7 = $2;
+  $8 = ((($7)) + 16|0);
+  $9 = HEAP32[$8>>2]|0;
+  $10 = ((($9)) + 4|0);
+  $11 = HEAP32[$10>>2]|0;
+  $12 = $11<<1;
+  $0 = $12;
+  $13 = $0;
+  STACKTOP = sp;return ($13|0);
+ } else {
+  $0 = 0;
+  $13 = $0;
+  STACKTOP = sp;return ($13|0);
+ }
+ return (0)|0;
+}
+function _mrb_gc_free_hash($mrb,$hash) {
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $hash;
+ $2 = $1;
+ $3 = ((($2)) + 16|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)!=(0|0);
+ if (!($5)) {
+  STACKTOP = sp;return;
+ }
+ $6 = $0;
+ $7 = $1;
+ $8 = ((($7)) + 16|0);
+ $9 = HEAP32[$8>>2]|0;
+ _kh_destroy_ht($6,$9);
+ STACKTOP = sp;return;
+}
+function _mrb_hash_new_capa($agg$result,$mrb,$capa) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $capa = $capa|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $h = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $capa;
+ $2 = $0;
+ $3 = $0;
+ $4 = ((($3)) + 56|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = (_mrb_obj_alloc($2,15,$5)|0);
+ $h = $6;
+ $7 = $0;
+ $8 = (_kh_init_ht($7)|0);
+ $9 = $h;
+ $10 = ((($9)) + 16|0);
+ HEAP32[$10>>2] = $8;
+ $11 = $1;
+ $12 = ($11|0)>(0);
+ if ($12) {
+  $13 = $0;
+  $14 = $h;
+  $15 = ((($14)) + 16|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = $1;
+  _kh_resize_ht($13,$16,$17);
+ }
+ $18 = $h;
+ $19 = ((($18)) + 12|0);
+ HEAP32[$19>>2] = 0;
+ $20 = $h;
+ _mrb_obj_value_86($agg$result,$20);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_value_86($agg$result,$p) {
+ $agg$result = $agg$result|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $p;
+ $1 = $0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 & 255;
+ $4 = ((($v)) + 4|0);
+ HEAP32[$4>>2] = $3;
+ $5 = $0;
+ HEAP32[$v>>2] = $5;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_hash_get($agg$result,$mrb,$hash,$key) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ $key = $key|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $h = 0, $hash$byval_copy = 0, $hash$byval_copy2 = 0, $k = 0, $key$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $hash$byval_copy2 = sp + 64|0;
+ $$byval_copy = sp + 56|0;
+ $hash$byval_copy = sp + 48|0;
+ $key$byval_copy = sp + 40|0;
+ $vararg_buffer = sp;
+ $1 = sp + 16|0;
+ $0 = $mrb;
+ $2 = HEAP32[$hash>>2]|0;
+ $3 = ((($2)) + 16|0);
+ $4 = HEAP32[$3>>2]|0;
+ $h = $4;
+ $5 = $h;
+ $6 = ($5|0)!=(0|0);
+ if ($6) {
+  $7 = $0;
+  $8 = $h;
+  ;HEAP32[$key$byval_copy>>2]=HEAP32[$key>>2]|0;HEAP32[$key$byval_copy+4>>2]=HEAP32[$key+4>>2]|0;
+  $9 = (_kh_get_ht($7,$8,$key$byval_copy)|0);
+  $k = $9;
+  $10 = $k;
+  $11 = $h;
+  $12 = HEAP32[$11>>2]|0;
+  $13 = ($10|0)!=($12|0);
+  if ($13) {
+   $14 = $k;
+   $15 = $h;
+   $16 = ((($15)) + 20|0);
+   $17 = HEAP32[$16>>2]|0;
+   $18 = (($17) + (($14*12)|0)|0);
+   ;HEAP32[$agg$result>>2]=HEAP32[$18>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$18+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+ }
+ $19 = HEAP32[$hash>>2]|0;
+ $20 = HEAP32[$19>>2]|0;
+ $21 = $20 >>> 11;
+ $22 = $21 & 256;
+ $23 = ($22|0)!=(0);
+ $24 = $0;
+ $25 = $0;
+ if ($23) {
+  $26 = $0;
+  $27 = (_mrb_intern_static($26,54716,6)|0);
+  ;HEAP32[$hash$byval_copy>>2]=HEAP32[$hash>>2]|0;HEAP32[$hash$byval_copy+4>>2]=HEAP32[$hash+4>>2]|0;
+  _mrb_iv_get($1,$25,$hash$byval_copy,$27);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$hash>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$hash+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$hash+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$hash+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$hash+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$hash+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$hash+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$hash+7>>0]|0;
+  $vararg_ptr1 = ((($vararg_buffer)) + 8|0);
+  ;HEAP8[$vararg_ptr1>>0]=HEAP8[$key>>0]|0;HEAP8[$vararg_ptr1+1>>0]=HEAP8[$key+1>>0]|0;HEAP8[$vararg_ptr1+2>>0]=HEAP8[$key+2>>0]|0;HEAP8[$vararg_ptr1+3>>0]=HEAP8[$key+3>>0]|0;HEAP8[$vararg_ptr1+4>>0]=HEAP8[$key+4>>0]|0;HEAP8[$vararg_ptr1+5>>0]=HEAP8[$key+5>>0]|0;HEAP8[$vararg_ptr1+6>>0]=HEAP8[$key+6>>0]|0;HEAP8[$vararg_ptr1+7>>0]=HEAP8[$key+7>>0]|0;
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;
+  _mrb_funcall($agg$result,$24,$$byval_copy,69512,2,$vararg_buffer);
+  STACKTOP = sp;return;
+ } else {
+  $28 = (_mrb_intern_static($25,54716,6)|0);
+  ;HEAP32[$hash$byval_copy2>>2]=HEAP32[$hash>>2]|0;HEAP32[$hash$byval_copy2+4>>2]=HEAP32[$hash+4>>2]|0;
+  _mrb_iv_get($agg$result,$24,$hash$byval_copy2,$28);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_hash_set($mrb,$hash,$key,$val) {
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ $key = $key|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ai = 0, $h = 0, $hash$byval_copy = 0, $k = 0, $key$byval_copy = 0, $key$byval_copy1 = 0;
+ var $r = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $key$byval_copy1 = sp + 48|0;
+ $key$byval_copy = sp + 40|0;
+ $hash$byval_copy = sp + 32|0;
+ $r = sp + 12|0;
+ $1 = sp;
+ $0 = $mrb;
+ $2 = $0;
+ ;HEAP32[$hash$byval_copy>>2]=HEAP32[$hash>>2]|0;HEAP32[$hash$byval_copy+4>>2]=HEAP32[$hash+4>>2]|0;
+ _mrb_hash_modify($2,$hash$byval_copy);
+ $3 = HEAP32[$hash>>2]|0;
+ $4 = ((($3)) + 16|0);
+ $5 = HEAP32[$4>>2]|0;
+ $h = $5;
+ $6 = $h;
+ $7 = ($6|0)!=(0|0);
+ if (!($7)) {
+  $8 = $0;
+  $9 = (_kh_init_ht($8)|0);
+  $10 = HEAP32[$hash>>2]|0;
+  $11 = ((($10)) + 16|0);
+  HEAP32[$11>>2] = $9;
+  $h = $9;
+ }
+ $12 = $0;
+ $13 = $h;
+ ;HEAP32[$key$byval_copy>>2]=HEAP32[$key>>2]|0;HEAP32[$key$byval_copy+4>>2]=HEAP32[$key+4>>2]|0;
+ $14 = (_kh_put_ht($12,$13,$key$byval_copy,$r)|0);
+ $k = $14;
+ $15 = $k;
+ $16 = $h;
+ $17 = ((($16)) + 20|0);
+ $18 = HEAP32[$17>>2]|0;
+ $19 = (($18) + (($15*12)|0)|0);
+ ;HEAP32[$19>>2]=HEAP32[$val>>2]|0;HEAP32[$19+4>>2]=HEAP32[$val+4>>2]|0;
+ $20 = HEAP32[$r>>2]|0;
+ $21 = ($20|0)!=(0);
+ if ($21) {
+  $22 = $0;
+  $23 = (_mrb_gc_arena_save($22)|0);
+  $ai = $23;
+  $24 = $k;
+  $25 = $h;
+  $26 = ((($25)) + 16|0);
+  $27 = HEAP32[$26>>2]|0;
+  $28 = (($27) + ($24<<3)|0);
+  $29 = $0;
+  ;HEAP32[$key$byval_copy1>>2]=HEAP32[$key>>2]|0;HEAP32[$key$byval_copy1+4>>2]=HEAP32[$key+4>>2]|0;
+  _mrb_hash_ht_key($1,$29,$key$byval_copy1);
+  ;HEAP32[$28>>2]=HEAP32[$1>>2]|0;HEAP32[$28+4>>2]=HEAP32[$1+4>>2]|0;
+  ;HEAP32[$key>>2]=HEAP32[$28>>2]|0;HEAP32[$key+4>>2]=HEAP32[$28+4>>2]|0;
+  $30 = $0;
+  $31 = $ai;
+  _mrb_gc_arena_restore($30,$31);
+  $32 = $h;
+  $33 = ((($32)) + 4|0);
+  $34 = HEAP32[$33>>2]|0;
+  $35 = (($34) - 1)|0;
+  $36 = $k;
+  $37 = $h;
+  $38 = ((($37)) + 20|0);
+  $39 = HEAP32[$38>>2]|0;
+  $40 = (($39) + (($36*12)|0)|0);
+  $41 = ((($40)) + 8|0);
+  HEAP32[$41>>2] = $35;
+ }
+ $42 = ((($key)) + 4|0);
+ $43 = HEAP32[$42>>2]|0;
+ $44 = ($43>>>0)<(8);
+ if (!($44)) {
+  $45 = $0;
+  $46 = HEAP32[$hash>>2]|0;
+  $47 = HEAP32[$key>>2]|0;
+  _mrb_field_write_barrier($45,$46,$47);
+ }
+ $48 = ((($val)) + 4|0);
+ $49 = HEAP32[$48>>2]|0;
+ $50 = ($49>>>0)<(8);
+ if ($50) {
+  STACKTOP = sp;return;
+ }
+ $51 = $0;
+ $52 = HEAP32[$hash>>2]|0;
+ $53 = HEAP32[$val>>2]|0;
+ _mrb_field_write_barrier($51,$52,$53);
+ STACKTOP = sp;return;
+}
+function _mrb_hash_modify($mrb,$hash) {
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ var $0 = 0, $1 = 0, $hash$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $hash$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$hash$byval_copy>>2]=HEAP32[$hash>>2]|0;HEAP32[$hash$byval_copy+4>>2]=HEAP32[$hash+4>>2]|0;
+ (_mrb_hash_tbl($1,$hash$byval_copy)|0);
+ STACKTOP = sp;return;
+}
+function _mrb_hash_tbl($mrb,$hash) {
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $h = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = HEAP32[$hash>>2]|0;
+ $3 = ((($2)) + 16|0);
+ $4 = HEAP32[$3>>2]|0;
+ $h = $4;
+ $5 = $h;
+ $6 = ($5|0)!=(0|0);
+ if ($6) {
+  $11 = $h;
+  $0 = $11;
+  $12 = $0;
+  STACKTOP = sp;return ($12|0);
+ } else {
+  $7 = $1;
+  $8 = (_kh_init_ht($7)|0);
+  $9 = HEAP32[$hash>>2]|0;
+  $10 = ((($9)) + 16|0);
+  HEAP32[$10>>2] = $8;
+  $0 = $8;
+  $12 = $0;
+  STACKTOP = sp;return ($12|0);
+ }
+ return (0)|0;
+}
+function _mrb_hash_ht_key($agg$result,$mrb,$key) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $key = $key|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var $key$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $key$byval_copy = sp + 16|0;
+ $1 = sp;
+ $0 = $mrb;
+ $2 = ((($key)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)==(16);
+ if ($4) {
+  $5 = HEAP32[$key>>2]|0;
+  $6 = HEAP32[$5>>2]|0;
+  $7 = $6 >>> 11;
+  $8 = $7 & 4;
+  $9 = ($8|0)!=(0);
+  if (!($9)) {
+   $10 = $0;
+   ;HEAP32[$key$byval_copy>>2]=HEAP32[$key>>2]|0;HEAP32[$key$byval_copy+4>>2]=HEAP32[$key+4>>2]|0;
+   _mrb_str_dup($1,$10,$key$byval_copy);
+   ;HEAP32[$key>>2]=HEAP32[$1>>2]|0;HEAP32[$key+4>>2]=HEAP32[$1+4>>2]|0;
+   $11 = HEAP32[$key>>2]|0;
+   $12 = HEAP32[$11>>2]|0;
+   $13 = $12 >>> 11;
+   $14 = $13 | 4;
+   $15 = HEAP32[$11>>2]|0;
+   $16 = $14 & 2097151;
+   $17 = $16 << 11;
+   $18 = $15 & 2047;
+   $19 = $18 | $17;
+   HEAP32[$11>>2] = $19;
+  }
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$key>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$key+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_hash_delete_key($agg$result,$mrb,$hash,$key) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ $key = $key|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $7 = 0, $8 = 0, $9 = 0, $delVal = 0, $h = 0, $k = 0, $key$byval_copy = 0, $n = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $key$byval_copy = sp + 32|0;
+ $delVal = sp + 8|0;
+ $0 = $mrb;
+ $1 = HEAP32[$hash>>2]|0;
+ $2 = ((($1)) + 16|0);
+ $3 = HEAP32[$2>>2]|0;
+ $h = $3;
+ $4 = $h;
+ $5 = ($4|0)!=(0|0);
+ if ($5) {
+  $6 = $0;
+  $7 = $h;
+  ;HEAP32[$key$byval_copy>>2]=HEAP32[$key>>2]|0;HEAP32[$key$byval_copy+4>>2]=HEAP32[$key+4>>2]|0;
+  $8 = (_kh_get_ht($6,$7,$key$byval_copy)|0);
+  $k = $8;
+  $9 = $k;
+  $10 = $h;
+  $11 = HEAP32[$10>>2]|0;
+  $12 = ($9|0)!=($11|0);
+  if ($12) {
+   $13 = $k;
+   $14 = $h;
+   $15 = ((($14)) + 20|0);
+   $16 = HEAP32[$15>>2]|0;
+   $17 = (($16) + (($13*12)|0)|0);
+   ;HEAP32[$delVal>>2]=HEAP32[$17>>2]|0;HEAP32[$delVal+4>>2]=HEAP32[$17+4>>2]|0;
+   $18 = $k;
+   $19 = $h;
+   $20 = ((($19)) + 20|0);
+   $21 = HEAP32[$20>>2]|0;
+   $22 = (($21) + (($18*12)|0)|0);
+   $23 = ((($22)) + 8|0);
+   $24 = HEAP32[$23>>2]|0;
+   $n = $24;
+   $25 = $0;
+   $26 = $h;
+   $27 = $k;
+   _kh_del_ht($25,$26,$27);
+   $k = 0;
+   while(1) {
+    $28 = $k;
+    $29 = $h;
+    $30 = HEAP32[$29>>2]|0;
+    $31 = ($28|0)!=($30|0);
+    if (!($31)) {
+     break;
+    }
+    $32 = $k;
+    $33 = (($32>>>0) / 4)&-1;
+    $34 = $h;
+    $35 = ((($34)) + 12|0);
+    $36 = HEAP32[$35>>2]|0;
+    $37 = (($36) + ($33)|0);
+    $38 = HEAP8[$37>>0]|0;
+    $39 = $38&255;
+    $40 = $k;
+    $41 = (($40>>>0) % 4)&-1;
+    $42 = (54712 + ($41)|0);
+    $43 = HEAP8[$42>>0]|0;
+    $44 = $43&255;
+    $45 = $39 & $44;
+    $46 = ($45|0)!=(0);
+    if (!($46)) {
+     $47 = $k;
+     $48 = $h;
+     $49 = ((($48)) + 20|0);
+     $50 = HEAP32[$49>>2]|0;
+     $51 = (($50) + (($47*12)|0)|0);
+     $52 = ((($51)) + 8|0);
+     $53 = HEAP32[$52>>2]|0;
+     $54 = $n;
+     $55 = ($53|0)>($54|0);
+     if ($55) {
+      $56 = $k;
+      $57 = $h;
+      $58 = ((($57)) + 20|0);
+      $59 = HEAP32[$58>>2]|0;
+      $60 = (($59) + (($56*12)|0)|0);
+      $61 = ((($60)) + 8|0);
+      $62 = HEAP32[$61>>2]|0;
+      $63 = (($62) + -1)|0;
+      HEAP32[$61>>2] = $63;
+     }
+    }
+    $64 = $k;
+    $65 = (($64) + 1)|0;
+    $k = $65;
+   }
+   ;HEAP32[$agg$result>>2]=HEAP32[$delVal>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$delVal+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+ }
+ _mrb_nil_value_91($agg$result);
+ STACKTOP = sp;return;
+}
+function _mrb_nil_value_91($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_hash_clear($agg$result,$mrb,$hash) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $h = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$hash>>2]|0;
+ $2 = ((($1)) + 16|0);
+ $3 = HEAP32[$2>>2]|0;
+ $h = $3;
+ $4 = $h;
+ $5 = ($4|0)!=(0|0);
+ if ($5) {
+  $6 = $0;
+  $7 = $h;
+  _kh_clear_ht($6,$7);
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$hash>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$hash+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_hash_empty_p($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $h = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $2 = ((($1)) + 16|0);
+ $3 = HEAP32[$2>>2]|0;
+ $h = $3;
+ $4 = $h;
+ $5 = ($4|0)!=(0|0);
+ if ($5) {
+  $6 = $h;
+  $7 = ((($6)) + 4|0);
+  $8 = HEAP32[$7>>2]|0;
+  $9 = ($8|0)==(0);
+  $10 = $9&1;
+  $11 = $10&255;
+  _mrb_bool_value_92($agg$result,$11);
+  STACKTOP = sp;return;
+ } else {
+  _mrb_true_value($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_bool_value_92($agg$result,$boolean) {
+ $agg$result = $agg$result|0;
+ $boolean = $boolean|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $boolean;
+ $1 = $0;
+ $2 = $1&255;
+ $3 = ($2|0)!=(0);
+ $4 = $3 ? 2 : 0;
+ $5 = ((($v)) + 4|0);
+ HEAP32[$5>>2] = $4;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_true_value($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 2;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_hash_keys($agg$result,$mrb,$hash) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $ary = 0, $ary$byval_copy = 0, $h = 0, $hv = 0, $k = 0, $kv = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 80|0;
+ $ary$byval_copy = sp + 72|0;
+ $ary = sp + 48|0;
+ $1 = sp + 32|0;
+ $2 = sp + 24|0;
+ $kv = sp + 16|0;
+ $hv = sp;
+ $0 = $mrb;
+ $3 = HEAP32[$hash>>2]|0;
+ $4 = ((($3)) + 16|0);
+ $5 = HEAP32[$4>>2]|0;
+ $h = $5;
+ $6 = $h;
+ $7 = ($6|0)!=(0|0);
+ if ($7) {
+  $8 = $h;
+  $9 = ((($8)) + 4|0);
+  $10 = HEAP32[$9>>2]|0;
+  $11 = ($10|0)==(0);
+  if (!($11)) {
+   $13 = $0;
+   $14 = $h;
+   $15 = ((($14)) + 4|0);
+   $16 = HEAP32[$15>>2]|0;
+   _mrb_ary_new_capa($1,$13,$16);
+   ;HEAP32[$ary>>2]=HEAP32[$1>>2]|0;HEAP32[$ary+4>>2]=HEAP32[$1+4>>2]|0;
+   $17 = $0;
+   $18 = $h;
+   $19 = ((($18)) + 4|0);
+   $20 = HEAP32[$19>>2]|0;
+   $21 = (($20) - 1)|0;
+   _mrb_nil_value_91($2);
+   ;HEAP32[$ary$byval_copy>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy+4>>2]=HEAP32[$ary+4>>2]|0;
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+   _mrb_ary_set($17,$ary$byval_copy,$21,$$byval_copy);
+   $22 = HEAP32[$ary>>2]|0;
+   $23 = ((($22)) + 20|0);
+   $24 = HEAP32[$23>>2]|0;
+   $p = $24;
+   $k = 0;
+   while(1) {
+    $25 = $k;
+    $26 = $h;
+    $27 = HEAP32[$26>>2]|0;
+    $28 = ($25|0)!=($27|0);
+    if (!($28)) {
+     break;
+    }
+    $29 = $k;
+    $30 = (($29>>>0) / 4)&-1;
+    $31 = $h;
+    $32 = ((($31)) + 12|0);
+    $33 = HEAP32[$32>>2]|0;
+    $34 = (($33) + ($30)|0);
+    $35 = HEAP8[$34>>0]|0;
+    $36 = $35&255;
+    $37 = $k;
+    $38 = (($37>>>0) % 4)&-1;
+    $39 = (54712 + ($38)|0);
+    $40 = HEAP8[$39>>0]|0;
+    $41 = $40&255;
+    $42 = $36 & $41;
+    $43 = ($42|0)!=(0);
+    if (!($43)) {
+     $44 = $k;
+     $45 = $h;
+     $46 = ((($45)) + 16|0);
+     $47 = HEAP32[$46>>2]|0;
+     $48 = (($47) + ($44<<3)|0);
+     ;HEAP32[$kv>>2]=HEAP32[$48>>2]|0;HEAP32[$kv+4>>2]=HEAP32[$48+4>>2]|0;
+     $49 = $k;
+     $50 = $h;
+     $51 = ((($50)) + 20|0);
+     $52 = HEAP32[$51>>2]|0;
+     $53 = (($52) + (($49*12)|0)|0);
+     ;HEAP32[$hv>>2]=HEAP32[$53>>2]|0;HEAP32[$hv+4>>2]=HEAP32[$53+4>>2]|0;HEAP32[$hv+8>>2]=HEAP32[$53+8>>2]|0;
+     $54 = ((($hv)) + 8|0);
+     $55 = HEAP32[$54>>2]|0;
+     $56 = $p;
+     $57 = (($56) + ($55<<3)|0);
+     ;HEAP32[$57>>2]=HEAP32[$kv>>2]|0;HEAP32[$57+4>>2]=HEAP32[$kv+4>>2]|0;
+    }
+    $58 = $k;
+    $59 = (($58) + 1)|0;
+    $k = $59;
+   }
+   ;HEAP32[$agg$result>>2]=HEAP32[$ary>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$ary+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+ }
+ $12 = $0;
+ _mrb_ary_new($agg$result,$12);
+ STACKTOP = sp;return;
+}
+function _mrb_init_hash($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $7 = 0, $8 = 0, $9 = 0, $h = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = $0;
+ $3 = ((($2)) + 32|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = (_mrb_define_class($1,64917,$4)|0);
+ $h = $5;
+ $6 = $0;
+ $7 = ((($6)) + 56|0);
+ HEAP32[$7>>2] = $5;
+ $8 = $h;
+ $9 = HEAP32[$8>>2]|0;
+ $10 = $9 >>> 11;
+ $11 = $10 & -256;
+ $12 = $11 | 15;
+ $13 = $h;
+ $14 = HEAP32[$13>>2]|0;
+ $15 = $12 & 2097151;
+ $16 = $15 << 11;
+ $17 = $14 & 2047;
+ $18 = $17 | $16;
+ HEAP32[$13>>2] = $18;
+ $19 = $0;
+ $20 = $h;
+ _mrb_define_method($19,$20,68841,17,262144);
+ $21 = $0;
+ $22 = $h;
+ _mrb_define_method($21,$22,64349,18,524288);
+ $23 = $0;
+ $24 = $h;
+ _mrb_define_method($23,$24,64358,19,0);
+ $25 = $0;
+ $26 = $h;
+ _mrb_define_method($25,$26,54726,20,4096);
+ $27 = $0;
+ $28 = $h;
+ _mrb_define_method($27,$28,54738,21,262144);
+ $29 = $0;
+ $30 = $h;
+ _mrb_define_method($29,$30,54747,22,0);
+ $31 = $0;
+ $32 = $h;
+ _mrb_define_method($31,$32,54760,23,262144);
+ $33 = $0;
+ $34 = $h;
+ _mrb_define_method($33,$34,54774,24,262144);
+ $35 = $0;
+ $36 = $h;
+ _mrb_define_method($35,$36,64381,25,0);
+ $37 = $0;
+ $38 = $h;
+ _mrb_define_method($37,$38,54783,26,262144);
+ $39 = $0;
+ $40 = $h;
+ _mrb_define_method($39,$40,54792,27,262144);
+ $41 = $0;
+ $42 = $h;
+ _mrb_define_method($41,$42,68944,26,262144);
+ $43 = $0;
+ $44 = $h;
+ _mrb_define_method($43,$44,68953,28,8192);
+ $45 = $0;
+ $46 = $h;
+ _mrb_define_method($45,$46,54808,26,262144);
+ $47 = $0;
+ $48 = $h;
+ _mrb_define_method($47,$48,54813,29,0);
+ $49 = $0;
+ $50 = $h;
+ _mrb_define_method($49,$50,64428,30,0);
+ $51 = $0;
+ $52 = $h;
+ _mrb_define_method($51,$52,68969,26,262144);
+ $53 = $0;
+ $54 = $h;
+ _mrb_define_method($53,$54,64476,31,0);
+ $55 = $0;
+ $56 = $h;
+ _mrb_define_method($55,$56,68096,32,0);
+ $57 = $0;
+ $58 = $h;
+ _mrb_define_method($57,$58,64482,30,0);
+ $59 = $0;
+ $60 = $h;
+ _mrb_define_method($59,$60,54818,18,524288);
+ $61 = $0;
+ $62 = $h;
+ _mrb_define_method($61,$62,54824,27,262144);
+ $63 = $0;
+ $64 = $h;
+ _mrb_define_method($63,$64,54831,33,0);
+ $65 = $0;
+ $66 = $h;
+ _mrb_define_method($65,$66,64922,34,0);
+ STACKTOP = sp;return;
+}
+function _mrb_hash_aget($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $key = 0, $key$byval_copy = 0, $self$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $key$byval_copy = sp + 32|0;
+ $self$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $key = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $key;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ ;HEAP32[$key$byval_copy>>2]=HEAP32[$key>>2]|0;HEAP32[$key$byval_copy+4>>2]=HEAP32[$key+4>>2]|0;
+ _mrb_hash_get($agg$result,$2,$self$byval_copy,$key$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_hash_aset($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $key = 0, $key$byval_copy = 0, $self$byval_copy = 0, $val = 0, $val$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy = sp + 48|0;
+ $key$byval_copy = sp + 40|0;
+ $self$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $key = sp + 16|0;
+ $val = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $key;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $val;
+ (_mrb_get_args($1,54723,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ ;HEAP32[$key$byval_copy>>2]=HEAP32[$key>>2]|0;HEAP32[$key$byval_copy+4>>2]=HEAP32[$key+4>>2]|0;
+ ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+ _mrb_hash_set($2,$self$byval_copy,$key$byval_copy,$val$byval_copy);
+ ;HEAP32[$agg$result>>2]=HEAP32[$val>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$val+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_hash_default($agg$result,$mrb,$hash) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $given = 0, $hash$byval_copy = 0;
+ var $hash$byval_copy6 = 0, $key = 0, $vararg_buffer = 0, $vararg_buffer2 = 0, $vararg_ptr1 = 0, $vararg_ptr5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $hash$byval_copy6 = sp + 64|0;
+ $$byval_copy = sp + 56|0;
+ $hash$byval_copy = sp + 48|0;
+ $vararg_buffer2 = sp + 8|0;
+ $vararg_buffer = sp;
+ $key = sp + 32|0;
+ $given = sp + 72|0;
+ $1 = sp + 24|0;
+ $0 = $mrb;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $key;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $given;
+ (_mrb_get_args($2,54734,$vararg_buffer)|0);
+ $3 = HEAP32[$hash>>2]|0;
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $4 >>> 11;
+ $6 = $5 & 256;
+ $7 = ($6|0)!=(0);
+ if (!($7)) {
+  $14 = $0;
+  $15 = $0;
+  $16 = (_mrb_intern_static($15,54716,6)|0);
+  ;HEAP32[$hash$byval_copy6>>2]=HEAP32[$hash>>2]|0;HEAP32[$hash$byval_copy6+4>>2]=HEAP32[$hash+4>>2]|0;
+  _mrb_iv_get($agg$result,$14,$hash$byval_copy6,$16);
+  STACKTOP = sp;return;
+ }
+ $8 = HEAP8[$given>>0]|0;
+ $9 = ($8<<24>>24)!=(0);
+ if ($9) {
+  $10 = $0;
+  $11 = $0;
+  $12 = $0;
+  $13 = (_mrb_intern_static($12,54716,6)|0);
+  ;HEAP32[$hash$byval_copy>>2]=HEAP32[$hash>>2]|0;HEAP32[$hash$byval_copy+4>>2]=HEAP32[$hash+4>>2]|0;
+  _mrb_iv_get($1,$11,$hash$byval_copy,$13);
+  ;HEAP8[$vararg_buffer2>>0]=HEAP8[$hash>>0]|0;HEAP8[$vararg_buffer2+1>>0]=HEAP8[$hash+1>>0]|0;HEAP8[$vararg_buffer2+2>>0]=HEAP8[$hash+2>>0]|0;HEAP8[$vararg_buffer2+3>>0]=HEAP8[$hash+3>>0]|0;HEAP8[$vararg_buffer2+4>>0]=HEAP8[$hash+4>>0]|0;HEAP8[$vararg_buffer2+5>>0]=HEAP8[$hash+5>>0]|0;HEAP8[$vararg_buffer2+6>>0]=HEAP8[$hash+6>>0]|0;HEAP8[$vararg_buffer2+7>>0]=HEAP8[$hash+7>>0]|0;
+  $vararg_ptr5 = ((($vararg_buffer2)) + 8|0);
+  ;HEAP8[$vararg_ptr5>>0]=HEAP8[$key>>0]|0;HEAP8[$vararg_ptr5+1>>0]=HEAP8[$key+1>>0]|0;HEAP8[$vararg_ptr5+2>>0]=HEAP8[$key+2>>0]|0;HEAP8[$vararg_ptr5+3>>0]=HEAP8[$key+3>>0]|0;HEAP8[$vararg_ptr5+4>>0]=HEAP8[$key+4>>0]|0;HEAP8[$vararg_ptr5+5>>0]=HEAP8[$key+5>>0]|0;HEAP8[$vararg_ptr5+6>>0]=HEAP8[$key+6>>0]|0;HEAP8[$vararg_ptr5+7>>0]=HEAP8[$key+7>>0]|0;
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;
+  _mrb_funcall($agg$result,$10,$$byval_copy,69512,2,$vararg_buffer2);
+  STACKTOP = sp;return;
+ } else {
+  _mrb_nil_value_91($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_hash_set_default($agg$result,$mrb,$hash) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $hash$byval_copy = 0, $hash$byval_copy1 = 0, $ifnone = 0, $ifnone$byval_copy = 0, $vararg_buffer = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $ifnone$byval_copy = sp + 40|0;
+ $hash$byval_copy1 = sp + 32|0;
+ $hash$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $ifnone = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $ifnone;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$hash$byval_copy>>2]=HEAP32[$hash>>2]|0;HEAP32[$hash$byval_copy+4>>2]=HEAP32[$hash+4>>2]|0;
+ _mrb_hash_modify($2,$hash$byval_copy);
+ $3 = $0;
+ $4 = $0;
+ $5 = (_mrb_intern_static($4,54716,6)|0);
+ ;HEAP32[$hash$byval_copy1>>2]=HEAP32[$hash>>2]|0;HEAP32[$hash$byval_copy1+4>>2]=HEAP32[$hash+4>>2]|0;
+ ;HEAP32[$ifnone$byval_copy>>2]=HEAP32[$ifnone>>2]|0;HEAP32[$ifnone$byval_copy+4>>2]=HEAP32[$ifnone+4>>2]|0;
+ _mrb_iv_set($3,$hash$byval_copy1,$5,$ifnone$byval_copy);
+ $6 = HEAP32[$hash>>2]|0;
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $7 >>> 11;
+ $9 = $8 & -257;
+ $10 = HEAP32[$6>>2]|0;
+ $11 = $9 & 2097151;
+ $12 = $11 << 11;
+ $13 = $10 & 2047;
+ $14 = $13 | $12;
+ HEAP32[$6>>2] = $14;
+ ;HEAP32[$agg$result>>2]=HEAP32[$ifnone>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$ifnone+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_hash_default_proc($agg$result,$mrb,$hash) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $hash$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $hash$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = HEAP32[$hash>>2]|0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 >>> 11;
+ $4 = $3 & 256;
+ $5 = ($4|0)!=(0);
+ if ($5) {
+  $6 = $0;
+  $7 = $0;
+  $8 = (_mrb_intern_static($7,54716,6)|0);
+  ;HEAP32[$hash$byval_copy>>2]=HEAP32[$hash>>2]|0;HEAP32[$hash$byval_copy+4>>2]=HEAP32[$hash+4>>2]|0;
+  _mrb_iv_get($agg$result,$6,$hash$byval_copy,$8);
+  STACKTOP = sp;return;
+ } else {
+  _mrb_nil_value_91($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_hash_set_default_proc($agg$result,$mrb,$hash) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $hash$byval_copy = 0, $hash$byval_copy1 = 0, $ifnone = 0, $ifnone$byval_copy = 0, $vararg_buffer = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $ifnone$byval_copy = sp + 40|0;
+ $hash$byval_copy1 = sp + 32|0;
+ $hash$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $ifnone = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $ifnone;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$hash$byval_copy>>2]=HEAP32[$hash>>2]|0;HEAP32[$hash$byval_copy+4>>2]=HEAP32[$hash+4>>2]|0;
+ _mrb_hash_modify($2,$hash$byval_copy);
+ $3 = $0;
+ $4 = $0;
+ $5 = (_mrb_intern_static($4,54716,6)|0);
+ ;HEAP32[$hash$byval_copy1>>2]=HEAP32[$hash>>2]|0;HEAP32[$hash$byval_copy1+4>>2]=HEAP32[$hash+4>>2]|0;
+ ;HEAP32[$ifnone$byval_copy>>2]=HEAP32[$ifnone>>2]|0;HEAP32[$ifnone$byval_copy+4>>2]=HEAP32[$ifnone+4>>2]|0;
+ _mrb_iv_set($3,$hash$byval_copy1,$5,$ifnone$byval_copy);
+ $6 = HEAP32[$hash>>2]|0;
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $7 >>> 11;
+ $9 = $8 | 256;
+ $10 = HEAP32[$6>>2]|0;
+ $11 = $9 & 2097151;
+ $12 = $11 << 11;
+ $13 = $10 & 2047;
+ $14 = $13 | $12;
+ HEAP32[$6>>2] = $14;
+ ;HEAP32[$agg$result>>2]=HEAP32[$ifnone>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$ifnone+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_hash_delete($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $key = 0, $key$byval_copy = 0, $self$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $key$byval_copy = sp + 32|0;
+ $self$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $key = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $key;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ ;HEAP32[$key$byval_copy>>2]=HEAP32[$key>>2]|0;HEAP32[$key$byval_copy+4>>2]=HEAP32[$key+4>>2]|0;
+ _mrb_hash_delete_key($agg$result,$2,$self$byval_copy,$key$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_hash_has_key($agg$result,$mrb,$hash) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $h = 0, $k = 0, $key = 0, $key$byval_copy = 0;
+ var $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $key$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $key = sp + 16|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $key;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = HEAP32[$hash>>2]|0;
+ $3 = ((($2)) + 16|0);
+ $4 = HEAP32[$3>>2]|0;
+ $h = $4;
+ $5 = $h;
+ $6 = ($5|0)!=(0|0);
+ if ($6) {
+  $7 = $0;
+  $8 = $h;
+  ;HEAP32[$key$byval_copy>>2]=HEAP32[$key>>2]|0;HEAP32[$key$byval_copy+4>>2]=HEAP32[$key+4>>2]|0;
+  $9 = (_kh_get_ht($7,$8,$key$byval_copy)|0);
+  $k = $9;
+  $10 = $k;
+  $11 = $h;
+  $12 = HEAP32[$11>>2]|0;
+  $13 = ($10|0)!=($12|0);
+  $14 = $13&1;
+  $15 = $14&255;
+  _mrb_bool_value_92($agg$result,$15);
+  STACKTOP = sp;return;
+ } else {
+  _mrb_false_value($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_false_value($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_hash_has_value($agg$result,$mrb,$hash) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $h = 0, $k = 0, $val = 0;
+ var $val$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy = sp + 40|0;
+ $$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $val = sp + 16|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $val;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = HEAP32[$hash>>2]|0;
+ $3 = ((($2)) + 16|0);
+ $4 = HEAP32[$3>>2]|0;
+ $h = $4;
+ $5 = $h;
+ $6 = ($5|0)!=(0|0);
+ L1: do {
+  if ($6) {
+   $k = 0;
+   while(1) {
+    $7 = $k;
+    $8 = $h;
+    $9 = HEAP32[$8>>2]|0;
+    $10 = ($7|0)!=($9|0);
+    if (!($10)) {
+     break L1;
+    }
+    $11 = $k;
+    $12 = (($11>>>0) / 4)&-1;
+    $13 = $h;
+    $14 = ((($13)) + 12|0);
+    $15 = HEAP32[$14>>2]|0;
+    $16 = (($15) + ($12)|0);
+    $17 = HEAP8[$16>>0]|0;
+    $18 = $17&255;
+    $19 = $k;
+    $20 = (($19>>>0) % 4)&-1;
+    $21 = (54712 + ($20)|0);
+    $22 = HEAP8[$21>>0]|0;
+    $23 = $22&255;
+    $24 = $18 & $23;
+    $25 = ($24|0)!=(0);
+    if (!($25)) {
+     $26 = $0;
+     $27 = $k;
+     $28 = $h;
+     $29 = ((($28)) + 20|0);
+     $30 = HEAP32[$29>>2]|0;
+     $31 = (($30) + (($27*12)|0)|0);
+     ;HEAP32[$$byval_copy>>2]=HEAP32[$31>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$31+4>>2]|0;
+     ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+     $32 = (_mrb_equal($26,$$byval_copy,$val$byval_copy)|0);
+     $33 = ($32<<24>>24)!=(0);
+     if ($33) {
+      break;
+     }
+    }
+    $34 = $k;
+    $35 = (($34) + 1)|0;
+    $k = $35;
+   }
+   _mrb_true_value($agg$result);
+   STACKTOP = sp;return;
+  }
+ } while(0);
+ _mrb_false_value($agg$result);
+ STACKTOP = sp;return;
+}
+function _mrb_hash_init($agg$result,$mrb,$hash) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0;
+ var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $block = 0, $hash$byval_copy = 0, $hash$byval_copy3 = 0, $ifnone = 0, $ifnone$byval_copy = 0, $ifnone_p = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $ifnone$byval_copy = sp + 64|0;
+ $hash$byval_copy3 = sp + 56|0;
+ $hash$byval_copy = sp + 48|0;
+ $vararg_buffer = sp;
+ $block = sp + 32|0;
+ $ifnone = sp + 24|0;
+ $ifnone_p = sp + 72|0;
+ $1 = sp + 16|0;
+ $0 = $mrb;
+ _mrb_nil_value_91($1);
+ ;HEAP32[$ifnone>>2]=HEAP32[$1>>2]|0;HEAP32[$ifnone+4>>2]=HEAP32[$1+4>>2]|0;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $block;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $ifnone;
+ $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+ HEAP32[$vararg_ptr2>>2] = $ifnone_p;
+ (_mrb_get_args($2,54803,$vararg_buffer)|0);
+ $3 = $0;
+ ;HEAP32[$hash$byval_copy>>2]=HEAP32[$hash>>2]|0;HEAP32[$hash$byval_copy+4>>2]=HEAP32[$hash+4>>2]|0;
+ _mrb_hash_modify($3,$hash$byval_copy);
+ $4 = ((($block)) + 4|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ($5|0)==(0);
+ if ($6) {
+  $7 = HEAP32[$block>>2]|0;
+  $8 = ($7|0)!=(0);
+  if ($8) {
+   label = 3;
+  }
+ } else {
+  label = 3;
+ }
+ do {
+  if ((label|0) == 3) {
+   $9 = HEAP8[$ifnone_p>>0]|0;
+   $10 = ($9<<24>>24)!=(0);
+   if ($10) {
+    $11 = $0;
+    $12 = $0;
+    $13 = (_mrb_class_get($12,68855)|0);
+    _mrb_raise($11,$13,64829);
+    // unreachable;
+   } else {
+    $14 = HEAP32[$hash>>2]|0;
+    $15 = HEAP32[$14>>2]|0;
+    $16 = $15 >>> 11;
+    $17 = $16 | 256;
+    $18 = HEAP32[$14>>2]|0;
+    $19 = $17 & 2097151;
+    $20 = $19 << 11;
+    $21 = $18 & 2047;
+    $22 = $21 | $20;
+    HEAP32[$14>>2] = $22;
+    ;HEAP32[$ifnone>>2]=HEAP32[$block>>2]|0;HEAP32[$ifnone+4>>2]=HEAP32[$block+4>>2]|0;
+    break;
+   }
+  }
+ } while(0);
+ $23 = $0;
+ $24 = $0;
+ $25 = (_mrb_intern_static($24,54716,6)|0);
+ ;HEAP32[$hash$byval_copy3>>2]=HEAP32[$hash>>2]|0;HEAP32[$hash$byval_copy3+4>>2]=HEAP32[$hash+4>>2]|0;
+ ;HEAP32[$ifnone$byval_copy>>2]=HEAP32[$ifnone>>2]|0;HEAP32[$ifnone$byval_copy+4>>2]=HEAP32[$ifnone+4>>2]|0;
+ _mrb_iv_set($23,$hash$byval_copy3,$25,$ifnone$byval_copy);
+ ;HEAP32[$agg$result>>2]=HEAP32[$hash>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$hash+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_hash_size_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $h = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $2 = ((($1)) + 16|0);
+ $3 = HEAP32[$2>>2]|0;
+ $h = $3;
+ $4 = $h;
+ $5 = ($4|0)!=(0|0);
+ if ($5) {
+  $6 = $h;
+  $7 = ((($6)) + 4|0);
+  $8 = HEAP32[$7>>2]|0;
+  _mrb_fixnum_value_115($agg$result,$8);
+  STACKTOP = sp;return;
+ } else {
+  _mrb_fixnum_value_115($agg$result,0);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_fixnum_value_115($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 3;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_hash_shift($agg$result,$mrb,$hash) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $delKey = 0, $delKey$byval_copy = 0, $delKey$byval_copy3 = 0, $delKey$byval_copy4 = 0, $delVal = 0, $delVal$byval_copy = 0;
+ var $delVal$byval_copy5 = 0, $h = 0, $hash$byval_copy = 0, $hash$byval_copy2 = 0, $hash$byval_copy6 = 0, $hash$byval_copy7 = 0, $k = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $hash$byval_copy7 = sp + 144|0;
+ $$byval_copy = sp + 136|0;
+ $hash$byval_copy6 = sp + 128|0;
+ $delVal$byval_copy5 = sp + 120|0;
+ $delKey$byval_copy4 = sp + 112|0;
+ $delVal$byval_copy = sp + 104|0;
+ $delKey$byval_copy3 = sp + 96|0;
+ $hash$byval_copy2 = sp + 88|0;
+ $delKey$byval_copy = sp + 80|0;
+ $hash$byval_copy = sp + 72|0;
+ $vararg_buffer = sp;
+ $delKey = sp + 48|0;
+ $delVal = sp + 40|0;
+ $1 = sp + 32|0;
+ $2 = sp + 24|0;
+ $3 = sp + 16|0;
+ $0 = $mrb;
+ $4 = HEAP32[$hash>>2]|0;
+ $5 = ((($4)) + 16|0);
+ $6 = HEAP32[$5>>2]|0;
+ $h = $6;
+ $7 = $0;
+ ;HEAP32[$hash$byval_copy>>2]=HEAP32[$hash>>2]|0;HEAP32[$hash$byval_copy+4>>2]=HEAP32[$hash+4>>2]|0;
+ _mrb_hash_modify($7,$hash$byval_copy);
+ $8 = $h;
+ $9 = ($8|0)!=(0|0);
+ L1: do {
+  if ($9) {
+   $10 = $h;
+   $11 = ((($10)) + 4|0);
+   $12 = HEAP32[$11>>2]|0;
+   $13 = ($12>>>0)>(0);
+   if ($13) {
+    $k = 0;
+    while(1) {
+     $14 = $k;
+     $15 = $h;
+     $16 = HEAP32[$15>>2]|0;
+     $17 = ($14|0)!=($16|0);
+     if (!($17)) {
+      break L1;
+     }
+     $18 = $k;
+     $19 = (($18>>>0) / 4)&-1;
+     $20 = $h;
+     $21 = ((($20)) + 12|0);
+     $22 = HEAP32[$21>>2]|0;
+     $23 = (($22) + ($19)|0);
+     $24 = HEAP8[$23>>0]|0;
+     $25 = $24&255;
+     $26 = $k;
+     $27 = (($26>>>0) % 4)&-1;
+     $28 = (54712 + ($27)|0);
+     $29 = HEAP8[$28>>0]|0;
+     $30 = $29&255;
+     $31 = $25 & $30;
+     $32 = ($31|0)!=(0);
+     $33 = $k;
+     if (!($32)) {
+      break;
+     }
+     $42 = (($33) + 1)|0;
+     $k = $42;
+    }
+    $34 = $h;
+    $35 = ((($34)) + 16|0);
+    $36 = HEAP32[$35>>2]|0;
+    $37 = (($36) + ($33<<3)|0);
+    ;HEAP32[$delKey>>2]=HEAP32[$37>>2]|0;HEAP32[$delKey+4>>2]=HEAP32[$37+4>>2]|0;
+    $38 = $0;
+    ;HEAP32[$delKey$byval_copy>>2]=HEAP32[$delKey>>2]|0;HEAP32[$delKey$byval_copy+4>>2]=HEAP32[$delKey+4>>2]|0;
+    _mrb_gc_protect($38,$delKey$byval_copy);
+    $39 = $0;
+    ;HEAP32[$hash$byval_copy2>>2]=HEAP32[$hash>>2]|0;HEAP32[$hash$byval_copy2+4>>2]=HEAP32[$hash+4>>2]|0;
+    ;HEAP32[$delKey$byval_copy3>>2]=HEAP32[$delKey>>2]|0;HEAP32[$delKey$byval_copy3+4>>2]=HEAP32[$delKey+4>>2]|0;
+    _mrb_hash_delete_key($1,$39,$hash$byval_copy2,$delKey$byval_copy3);
+    ;HEAP32[$delVal>>2]=HEAP32[$1>>2]|0;HEAP32[$delVal+4>>2]=HEAP32[$1+4>>2]|0;
+    $40 = $0;
+    ;HEAP32[$delVal$byval_copy>>2]=HEAP32[$delVal>>2]|0;HEAP32[$delVal$byval_copy+4>>2]=HEAP32[$delVal+4>>2]|0;
+    _mrb_gc_protect($40,$delVal$byval_copy);
+    $41 = $0;
+    ;HEAP32[$delKey$byval_copy4>>2]=HEAP32[$delKey>>2]|0;HEAP32[$delKey$byval_copy4+4>>2]=HEAP32[$delKey+4>>2]|0;
+    ;HEAP32[$delVal$byval_copy5>>2]=HEAP32[$delVal>>2]|0;HEAP32[$delVal$byval_copy5+4>>2]=HEAP32[$delVal+4>>2]|0;
+    _mrb_assoc_new($agg$result,$41,$delKey$byval_copy4,$delVal$byval_copy5);
+    STACKTOP = sp;return;
+   }
+  }
+ } while(0);
+ $43 = HEAP32[$hash>>2]|0;
+ $44 = HEAP32[$43>>2]|0;
+ $45 = $44 >>> 11;
+ $46 = $45 & 256;
+ $47 = ($46|0)!=(0);
+ $48 = $0;
+ $49 = $0;
+ if ($47) {
+  $50 = $0;
+  $51 = (_mrb_intern_static($50,54716,6)|0);
+  ;HEAP32[$hash$byval_copy6>>2]=HEAP32[$hash>>2]|0;HEAP32[$hash$byval_copy6+4>>2]=HEAP32[$hash+4>>2]|0;
+  _mrb_iv_get($2,$49,$hash$byval_copy6,$51);
+  _mrb_nil_value_91($3);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$hash>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$hash+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$hash+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$hash+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$hash+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$hash+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$hash+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$hash+7>>0]|0;
+  $vararg_ptr1 = ((($vararg_buffer)) + 8|0);
+  ;HEAP8[$vararg_ptr1>>0]=HEAP8[$3>>0]|0;HEAP8[$vararg_ptr1+1>>0]=HEAP8[$3+1>>0]|0;HEAP8[$vararg_ptr1+2>>0]=HEAP8[$3+2>>0]|0;HEAP8[$vararg_ptr1+3>>0]=HEAP8[$3+3>>0]|0;HEAP8[$vararg_ptr1+4>>0]=HEAP8[$3+4>>0]|0;HEAP8[$vararg_ptr1+5>>0]=HEAP8[$3+5>>0]|0;HEAP8[$vararg_ptr1+6>>0]=HEAP8[$3+6>>0]|0;HEAP8[$vararg_ptr1+7>>0]=HEAP8[$3+7>>0]|0;
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+  _mrb_funcall($agg$result,$48,$$byval_copy,69512,2,$vararg_buffer);
+  STACKTOP = sp;return;
+ } else {
+  $52 = (_mrb_intern_static($49,54716,6)|0);
+  ;HEAP32[$hash$byval_copy7>>2]=HEAP32[$hash>>2]|0;HEAP32[$hash$byval_copy7+4>>2]=HEAP32[$hash+4>>2]|0;
+  _mrb_iv_get($agg$result,$48,$hash$byval_copy7,$52);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_hash_dup($agg$result,$mrb,$hash) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ var $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
+ var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0;
+ var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $7 = 0, $8 = 0, $9 = 0, $ai = 0, $h = 0, $k = 0, $ret = 0, $ret_h = 0, $ret_k = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy1 = sp + 48|0;
+ $$byval_copy = sp + 40|0;
+ $1 = sp;
+ $0 = $mrb;
+ $2 = HEAP32[$hash>>2]|0;
+ $3 = ((($2)) + 16|0);
+ $4 = HEAP32[$3>>2]|0;
+ $h = $4;
+ $5 = $0;
+ $6 = $0;
+ $7 = ((($6)) + 56|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = (_mrb_obj_alloc($5,15,$8)|0);
+ $ret = $9;
+ $10 = $0;
+ $11 = (_kh_init_ht($10)|0);
+ $12 = $ret;
+ $13 = ((($12)) + 16|0);
+ HEAP32[$13>>2] = $11;
+ $14 = $h;
+ $15 = ((($14)) + 4|0);
+ $16 = HEAP32[$15>>2]|0;
+ $17 = ($16>>>0)>(0);
+ if (!($17)) {
+  $65 = $ret;
+  _mrb_obj_value_86($agg$result,$65);
+  STACKTOP = sp;return;
+ }
+ $18 = $ret;
+ $19 = ((($18)) + 16|0);
+ $20 = HEAP32[$19>>2]|0;
+ $ret_h = $20;
+ $k = 0;
+ while(1) {
+  $21 = $k;
+  $22 = $h;
+  $23 = HEAP32[$22>>2]|0;
+  $24 = ($21|0)!=($23|0);
+  if (!($24)) {
+   break;
+  }
+  $25 = $k;
+  $26 = (($25>>>0) / 4)&-1;
+  $27 = $h;
+  $28 = ((($27)) + 12|0);
+  $29 = HEAP32[$28>>2]|0;
+  $30 = (($29) + ($26)|0);
+  $31 = HEAP8[$30>>0]|0;
+  $32 = $31&255;
+  $33 = $k;
+  $34 = (($33>>>0) % 4)&-1;
+  $35 = (54712 + ($34)|0);
+  $36 = HEAP8[$35>>0]|0;
+  $37 = $36&255;
+  $38 = $32 & $37;
+  $39 = ($38|0)!=(0);
+  if (!($39)) {
+   $40 = $0;
+   $41 = (_mrb_gc_arena_save($40)|0);
+   $ai = $41;
+   $42 = $0;
+   $43 = $ret_h;
+   $44 = $0;
+   $45 = $k;
+   $46 = $h;
+   $47 = ((($46)) + 16|0);
+   $48 = HEAP32[$47>>2]|0;
+   $49 = (($48) + ($45<<3)|0);
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$49>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$49+4>>2]|0;
+   _mrb_hash_ht_key($1,$44,$$byval_copy);
+   ;HEAP32[$$byval_copy1>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$1+4>>2]|0;
+   $50 = (_kh_put_ht($42,$43,$$byval_copy1,0)|0);
+   $ret_k = $50;
+   $51 = $0;
+   $52 = $ai;
+   _mrb_gc_arena_restore($51,$52);
+   $53 = $ret_k;
+   $54 = $ret_h;
+   $55 = ((($54)) + 20|0);
+   $56 = HEAP32[$55>>2]|0;
+   $57 = (($56) + (($53*12)|0)|0);
+   $58 = $k;
+   $59 = $h;
+   $60 = ((($59)) + 20|0);
+   $61 = HEAP32[$60>>2]|0;
+   $62 = (($61) + (($58*12)|0)|0);
+   ;HEAP32[$57>>2]=HEAP32[$62>>2]|0;HEAP32[$57+4>>2]=HEAP32[$62+4>>2]|0;HEAP32[$57+8>>2]=HEAP32[$62+8>>2]|0;
+  }
+  $63 = $k;
+  $64 = (($63) + 1)|0;
+  $k = $64;
+ }
+ $65 = $ret;
+ _mrb_obj_value_86($agg$result,$65);
+ STACKTOP = sp;return;
+}
+function _mrb_hash_values($agg$result,$mrb,$hash) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $ary = 0, $ary$byval_copy = 0, $h = 0, $hv = 0, $k = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 56|0;
+ $ary$byval_copy = sp + 48|0;
+ $ary = sp + 24|0;
+ $1 = sp + 16|0;
+ $hv = sp;
+ $0 = $mrb;
+ $2 = HEAP32[$hash>>2]|0;
+ $3 = ((($2)) + 16|0);
+ $4 = HEAP32[$3>>2]|0;
+ $h = $4;
+ $5 = $h;
+ $6 = ($5|0)!=(0|0);
+ $7 = $0;
+ if (!($6)) {
+  _mrb_ary_new($agg$result,$7);
+  STACKTOP = sp;return;
+ }
+ $8 = $h;
+ $9 = ((($8)) + 4|0);
+ $10 = HEAP32[$9>>2]|0;
+ _mrb_ary_new_capa($1,$7,$10);
+ ;HEAP32[$ary>>2]=HEAP32[$1>>2]|0;HEAP32[$ary+4>>2]=HEAP32[$1+4>>2]|0;
+ $k = 0;
+ while(1) {
+  $11 = $k;
+  $12 = $h;
+  $13 = HEAP32[$12>>2]|0;
+  $14 = ($11|0)!=($13|0);
+  if (!($14)) {
+   break;
+  }
+  $15 = $k;
+  $16 = (($15>>>0) / 4)&-1;
+  $17 = $h;
+  $18 = ((($17)) + 12|0);
+  $19 = HEAP32[$18>>2]|0;
+  $20 = (($19) + ($16)|0);
+  $21 = HEAP8[$20>>0]|0;
+  $22 = $21&255;
+  $23 = $k;
+  $24 = (($23>>>0) % 4)&-1;
+  $25 = (54712 + ($24)|0);
+  $26 = HEAP8[$25>>0]|0;
+  $27 = $26&255;
+  $28 = $22 & $27;
+  $29 = ($28|0)!=(0);
+  if (!($29)) {
+   $30 = $k;
+   $31 = $h;
+   $32 = ((($31)) + 20|0);
+   $33 = HEAP32[$32>>2]|0;
+   $34 = (($33) + (($30*12)|0)|0);
+   ;HEAP32[$hv>>2]=HEAP32[$34>>2]|0;HEAP32[$hv+4>>2]=HEAP32[$34+4>>2]|0;HEAP32[$hv+8>>2]=HEAP32[$34+8>>2]|0;
+   $35 = $0;
+   $36 = ((($hv)) + 8|0);
+   $37 = HEAP32[$36>>2]|0;
+   ;HEAP32[$ary$byval_copy>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy+4>>2]=HEAP32[$ary+4>>2]|0;
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$hv>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$hv+4>>2]|0;
+   _mrb_ary_set($35,$ary$byval_copy,$37,$$byval_copy);
+  }
+  $38 = $k;
+  $39 = (($38) + 1)|0;
+  $k = $39;
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$ary>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$ary+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_hash_to_hash($agg$result,$mrb,$hash) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $hash = $hash|0;
+ var $0 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ ;HEAP32[$agg$result>>2]=HEAP32[$hash>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$hash+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_to_flo($mrb,$val) {
+ $mrb = $mrb|0;
+ $val = $val|0;
+ var $0 = 0.0, $1 = 0, $10 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = ((($val)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ switch ($3|0) {
+ case 3:  {
+  $4 = HEAP32[$val>>2]|0;
+  $5 = (+($4|0));
+  $0 = $5;
+  $10 = $0;
+  STACKTOP = sp;return (+$10);
+  break;
+ }
+ case 6:  {
+  $9 = +HEAPF32[$val>>2];
+  $0 = $9;
+  $10 = $0;
+  STACKTOP = sp;return (+$10);
+  break;
+ }
+ default: {
+  $6 = $1;
+  $7 = $1;
+  $8 = (_mrb_class_get($7,68905)|0);
+  _mrb_raise($6,$8,54838);
+  // unreachable;
+ }
+ }
+ return +(0.0);
+}
+function _mrb_float_value($agg$result,$mrb,$f) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $f = +$f;
+ var $0 = 0, $1 = 0.0, $2 = 0, $3 = 0.0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $mrb;
+ $1 = $f;
+ $2 = ((($v)) + 4|0);
+ HEAP32[$2>>2] = 6;
+ $3 = $1;
+ HEAPF32[$v>>2] = $3;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_fixnum_mul($agg$result,$mrb,$x,$y) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ $y = $y|0;
+ var $$old6 = 0, $$old8 = 0.0, $$old9 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0;
+ var $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0.0, $36 = 0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0;
+ var $42 = 0, $43 = 0.0, $44 = 0, $45 = 0.0, $46 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, $b = 0, $c = 0.0, $or$cond = 0, $or$cond10 = 0, $or$cond12 = 0, $or$cond3 = 0, $or$cond5 = 0, $or$cond7 = 0, $y$byval_copy = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $y$byval_copy = sp + 16|0;
+ $0 = $mrb;
+ $1 = HEAP32[$x>>2]|0;
+ $a = $1;
+ $2 = ((($y)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)==(3);
+ if (!($4)) {
+  $41 = $0;
+  $42 = $a;
+  $43 = (+($42|0));
+  $44 = $0;
+  ;HEAP32[$y$byval_copy>>2]=HEAP32[$y>>2]|0;HEAP32[$y$byval_copy+4>>2]=HEAP32[$y+4>>2]|0;
+  $45 = (+_mrb_to_flo($44,$y$byval_copy));
+  $46 = $43 * $45;
+  _mrb_float_value($agg$result,$41,$46);
+  STACKTOP = sp;return;
+ }
+ $5 = $a;
+ $6 = ($5|0)==(0);
+ if ($6) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$x>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$x+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $7 = HEAP32[$y>>2]|0;
+ $b = $7;
+ $8 = $a;
+ $9 = ($8|0)<(32768);
+ $10 = $a;
+ $11 = ($10|0)>=(-32768);
+ $or$cond = $9 & $11;
+ $12 = $b;
+ $13 = ($12|0)<(32768);
+ $or$cond3 = $or$cond & $13;
+ $14 = $b;
+ $15 = ($14|0)>=(-32768);
+ $or$cond5 = $or$cond3 & $15;
+ $16 = $a;
+ $17 = $b;
+ $18 = Math_imul($16, $17)|0;
+ if ($or$cond5) {
+  _mrb_fixnum_value_125($agg$result,$18);
+  STACKTOP = sp;return;
+ }
+ $19 = (+($18|0));
+ $c = $19;
+ $20 = $a;
+ $21 = ($20|0)!=(0);
+ $22 = $c;
+ if ($21) {
+  $23 = $a;
+  $24 = (+($23|0));
+  $25 = $22 / $24;
+  $26 = $b;
+  $27 = (+($26|0));
+  $28 = $25 == $27;
+  $29 = $c;
+  $30 = $29 <= 2147483648.0;
+  $or$cond7 = $28 & $30;
+  $31 = $c;
+  $32 = $31 >= -2147483648.0;
+  $or$cond10 = $or$cond7 & $32;
+  if ($or$cond10) {
+   label = 10;
+  } else {
+   label = 9;
+  }
+ } else {
+  $$old6 = $22 <= 2147483648.0;
+  $$old8 = $c;
+  $$old9 = $$old8 >= -2147483648.0;
+  $or$cond12 = $$old6 & $$old9;
+  if ($or$cond12) {
+   label = 10;
+  } else {
+   label = 9;
+  }
+ }
+ if ((label|0) == 9) {
+  $33 = $0;
+  $34 = $a;
+  $35 = (+($34|0));
+  $36 = $b;
+  $37 = (+($36|0));
+  $38 = $35 * $37;
+  _mrb_float_value($agg$result,$33,$38);
+  STACKTOP = sp;return;
+ }
+ else if ((label|0) == 10) {
+  $39 = $c;
+  $40 = (~~(($39)));
+  _mrb_fixnum_value_125($agg$result,$40);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_fixnum_value_125($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 3;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_flo_to_fixnum($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0.0, $26 = 0;
+ var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, $d = 0.0, $z = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = ((($x)) + 4|0);
+ $2 = HEAP32[$1>>2]|0;
+ $3 = ($2|0)==(6);
+ if (!($3)) {
+  $4 = $0;
+  $5 = $0;
+  $6 = (_mrb_class_get($5,68905)|0);
+  _mrb_raise($4,$6,54838);
+  // unreachable;
+ }
+ $7 = +HEAPF32[$x>>2];
+ $d = $7;
+ $8 = $d;
+ $9 = (___FLOAT_BITS_126($8)|0);
+ $10 = $9 & 2147483647;
+ $11 = ($10|0)==(2139095040);
+ if ($11) {
+  $12 = $0;
+  $13 = $0;
+  $14 = (_mrb_class_get($13,54854)|0);
+  $15 = $d;
+  $16 = $15 < 0.0;
+  $17 = $16 ? 54871 : 54881;
+  _mrb_raise($12,$14,$17);
+  // unreachable;
+ }
+ $18 = $d;
+ $19 = (___FLOAT_BITS_126($18)|0);
+ $20 = $19 & 2147483647;
+ $21 = ($20>>>0)>(2139095040);
+ if ($21) {
+  $22 = $0;
+  $23 = $0;
+  $24 = (_mrb_class_get($23,54854)|0);
+  _mrb_raise($22,$24,54890);
+  // unreachable;
+ } else {
+  $25 = $d;
+  $26 = (~~(($25)));
+  $z = $26;
+  $27 = $z;
+  _mrb_fixnum_value_125($agg$result,$27);
+  STACKTOP = sp;return;
+ }
+}
+function ___FLOAT_BITS_126($__f) {
+ $__f = +$__f;
+ var $0 = 0.0, $1 = 0.0, $2 = 0, $__u = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $__u = sp;
+ $0 = $__f;
+ $1 = $0;
+ HEAPF32[$__u>>2] = $1;
+ $2 = HEAP32[$__u>>2]|0;
+ STACKTOP = sp;return ($2|0);
+}
+function ___DOUBLE_BITS_127($__f) {
+ $__f = +$__f;
+ var $0 = 0.0, $1 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $__u = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $__u = sp;
+ $0 = $__f;
+ $1 = $0;
+ HEAPF64[$__u>>3] = $1;
+ $2 = $__u;
+ $3 = $2;
+ $4 = HEAP32[$3>>2]|0;
+ $5 = (($2) + 4)|0;
+ $6 = $5;
+ $7 = HEAP32[$6>>2]|0;
+ tempRet0 = ($7);
+ STACKTOP = sp;return ($4|0);
+}
+function _mrb_fixnum_plus($agg$result,$mrb,$x,$y) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ $y = $y|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0.0, $3 = 0, $4 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, $b = 0, $c = 0, $y$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $y$byval_copy = sp + 16|0;
+ $c = sp;
+ $0 = $mrb;
+ $1 = HEAP32[$x>>2]|0;
+ $a = $1;
+ $2 = ((($y)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)==(3);
+ if (!($4)) {
+  $19 = $0;
+  $20 = $a;
+  $21 = (+($20|0));
+  $22 = $0;
+  ;HEAP32[$y$byval_copy>>2]=HEAP32[$y>>2]|0;HEAP32[$y$byval_copy+4>>2]=HEAP32[$y+4>>2]|0;
+  $23 = (+_mrb_to_flo($22,$y$byval_copy));
+  $24 = $21 + $23;
+  _mrb_float_value($agg$result,$19,$24);
+  STACKTOP = sp;return;
+ }
+ $5 = $a;
+ $6 = ($5|0)==(0);
+ if ($6) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$y>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$y+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $7 = HEAP32[$y>>2]|0;
+ $b = $7;
+ $8 = $a;
+ $9 = $b;
+ $10 = (_mrb_int_add_overflow($8,$9,$c)|0);
+ $11 = ($10<<24>>24)!=(0);
+ if ($11) {
+  $12 = $0;
+  $13 = $a;
+  $14 = (+($13|0));
+  $15 = $b;
+  $16 = (+($15|0));
+  $17 = $14 + $16;
+  _mrb_float_value($agg$result,$12,$17);
+  STACKTOP = sp;return;
+ } else {
+  $18 = HEAP32[$c>>2]|0;
+  _mrb_fixnum_value_125($agg$result,$18);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_int_add_overflow($augend,$addend,$sum) {
+ $augend = $augend|0;
+ $addend = $addend|0;
+ $sum = $sum|0;
+ var $$arith = 0, $$ispos = 0, $$negcheck = 0, $$negtemp = 0, $$poscheck = 0, $$postemp = 0, $$select = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $of = 0, $or$cond = 0, $val = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $augend;
+ $1 = $addend;
+ $2 = $sum;
+ $3 = $0;
+ $4 = $1;
+ $$arith = (($3) + ($4))|0;
+ $$postemp = (($3) + -2147483648)|0;
+ $$negtemp = (($3) + 2147483647)|0;
+ $$poscheck = ($$arith|0)<($$postemp|0);
+ $$negcheck = ($$arith|0)>($$negtemp|0);
+ $$ispos = ($3|0)>=(0);
+ $$select = $$ispos ? $$poscheck : $$negcheck;
+ $val = $$arith;
+ $5 = $val;
+ $6 = ($5|0)>(2147483647);
+ $or$cond = $$select | $6;
+ if ($or$cond) {
+  $10 = 1;
+ } else {
+  $7 = $val;
+  $8 = ($7|0)<(-2147483648);
+  $10 = $8;
+ }
+ $9 = $10&1;
+ $11 = $9&255;
+ $of = $11;
+ $12 = $val;
+ $13 = $2;
+ HEAP32[$13>>2] = $12;
+ $14 = $of;
+ STACKTOP = sp;return ($14|0);
+}
+function _mrb_fixnum_minus($agg$result,$mrb,$x,$y) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ $y = $y|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0.0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, $a = 0, $b = 0, $c = 0, $y$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $y$byval_copy = sp + 16|0;
+ $c = sp;
+ $0 = $mrb;
+ $1 = HEAP32[$x>>2]|0;
+ $a = $1;
+ $2 = ((($y)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)==(3);
+ if (!($4)) {
+  $17 = $0;
+  $18 = $a;
+  $19 = (+($18|0));
+  $20 = $0;
+  ;HEAP32[$y$byval_copy>>2]=HEAP32[$y>>2]|0;HEAP32[$y$byval_copy+4>>2]=HEAP32[$y+4>>2]|0;
+  $21 = (+_mrb_to_flo($20,$y$byval_copy));
+  $22 = $19 - $21;
+  _mrb_float_value($agg$result,$17,$22);
+  STACKTOP = sp;return;
+ }
+ $5 = HEAP32[$y>>2]|0;
+ $b = $5;
+ $6 = $a;
+ $7 = $b;
+ $8 = (_mrb_int_sub_overflow($6,$7,$c)|0);
+ $9 = ($8<<24>>24)!=(0);
+ if ($9) {
+  $10 = $0;
+  $11 = $a;
+  $12 = (+($11|0));
+  $13 = $b;
+  $14 = (+($13|0));
+  $15 = $12 - $14;
+  _mrb_float_value($agg$result,$10,$15);
+  STACKTOP = sp;return;
+ } else {
+  $16 = HEAP32[$c>>2]|0;
+  _mrb_fixnum_value_125($agg$result,$16);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_int_sub_overflow($minuend,$subtrahend,$difference) {
+ $minuend = $minuend|0;
+ $subtrahend = $subtrahend|0;
+ $difference = $difference|0;
+ var $$arith = 0, $$ispos = 0, $$negcheck = 0, $$negtemp = 0, $$poscheck = 0, $$postemp = 0, $$select = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $of = 0, $or$cond = 0, $val = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $minuend;
+ $1 = $subtrahend;
+ $2 = $difference;
+ $3 = $0;
+ $4 = $1;
+ $$arith = (($3) - ($4))|0;
+ $$postemp = (($3) + -2147483647)|0;
+ $$negtemp = (($3) + -2147483648)|0;
+ $$poscheck = ($$arith|0)<($$postemp|0);
+ $$negcheck = ($$arith|0)>($$negtemp|0);
+ $$ispos = ($3|0)>=(0);
+ $$select = $$ispos ? $$poscheck : $$negcheck;
+ $val = $$arith;
+ $5 = $val;
+ $6 = ($5|0)>(2147483647);
+ $or$cond = $$select | $6;
+ if ($or$cond) {
+  $10 = 1;
+ } else {
+  $7 = $val;
+  $8 = ($7|0)<(-2147483648);
+  $10 = $8;
+ }
+ $9 = $10&1;
+ $11 = $9&255;
+ $of = $11;
+ $12 = $val;
+ $13 = $2;
+ HEAP32[$13>>2] = $12;
+ $14 = $of;
+ STACKTOP = sp;return ($14|0);
+}
+function _mrb_fixnum_to_str($agg$result,$mrb,$x,$base) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ $base = $base|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $b = 0, $buf = 0, $or$cond = 0, $val = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $buf = sp + 32|0;
+ $2 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $base;
+ $3 = ((($buf)) + 33|0);
+ $b = $3;
+ $4 = HEAP32[$x>>2]|0;
+ $val = $4;
+ $5 = $1;
+ $6 = ($5|0)<(2);
+ $7 = $1;
+ $8 = (36)<($7|0);
+ $or$cond = $6 | $8;
+ if ($or$cond) {
+  $9 = $0;
+  $10 = $0;
+  $11 = (_mrb_class_get($10,68855)|0);
+  $12 = $1;
+  _mrb_fixnum_value_125($2,$12);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$2>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$2+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$2+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$2+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$2+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$2+7>>0]|0;
+  _mrb_raisef($9,$11,54894,$vararg_buffer);
+  // unreachable;
+ }
+ $13 = $val;
+ $14 = ($13|0)==(0);
+ L4: do {
+  if ($14) {
+   $15 = $b;
+   $16 = ((($15)) + -1|0);
+   $b = $16;
+   HEAP8[$16>>0] = 48;
+  } else {
+   $17 = $val;
+   $18 = ($17|0)<(0);
+   if (!($18)) {
+    while(1) {
+     $33 = $val;
+     $34 = $1;
+     $35 = (($33|0) % ($34|0))&-1;
+     $36 = (55345 + ($35)|0);
+     $37 = HEAP8[$36>>0]|0;
+     $38 = $b;
+     $39 = ((($38)) + -1|0);
+     $b = $39;
+     HEAP8[$39>>0] = $37;
+     $40 = $1;
+     $41 = $val;
+     $42 = (($41|0) / ($40|0))&-1;
+     $val = $42;
+     $43 = ($42|0)!=(0);
+     if (!($43)) {
+      break L4;
+     }
+    }
+   }
+   while(1) {
+    $19 = $val;
+    $20 = $1;
+    $21 = (($19|0) % ($20|0))&-1;
+    $22 = (0 - ($21))|0;
+    $23 = (55345 + ($22)|0);
+    $24 = HEAP8[$23>>0]|0;
+    $25 = $b;
+    $26 = ((($25)) + -1|0);
+    $b = $26;
+    HEAP8[$26>>0] = $24;
+    $27 = $1;
+    $28 = $val;
+    $29 = (($28|0) / ($27|0))&-1;
+    $val = $29;
+    $30 = ($29|0)!=(0);
+    if (!($30)) {
+     break;
+    }
+   }
+   $31 = $b;
+   $32 = ((($31)) + -1|0);
+   $b = $32;
+   HEAP8[$32>>0] = 45;
+  }
+ } while(0);
+ $44 = $0;
+ $45 = $b;
+ $46 = ((($buf)) + 33|0);
+ $47 = $b;
+ $48 = $46;
+ $49 = $47;
+ $50 = (($48) - ($49))|0;
+ _mrb_str_new($agg$result,$44,$45,$50);
+ STACKTOP = sp;return;
+}
+function _mrb_init_numeric($mrb) {
+ $mrb = $mrb|0;
+ var $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0;
+ var $114 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0;
+ var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0;
+ var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0;
+ var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0;
+ var $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $fixnum = 0, $fl = 0, $integer = 0;
+ var $numeric = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy1 = sp + 48|0;
+ $$byval_copy = sp + 40|0;
+ $1 = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $3 = $0;
+ $4 = $0;
+ $5 = ((($4)) + 32|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = (_mrb_define_class($3,54911,$6)|0);
+ $numeric = $7;
+ $8 = $0;
+ $9 = $numeric;
+ _mrb_define_method($8,$9,57087,35,262144);
+ $10 = $0;
+ $11 = $numeric;
+ _mrb_define_method($10,$11,59628,36,262144);
+ $12 = $0;
+ $13 = $numeric;
+ _mrb_define_method($12,$13,54921,36,262144);
+ $14 = $0;
+ $15 = $numeric;
+ _mrb_define_method($14,$15,68851,37,262144);
+ $16 = $0;
+ $17 = $numeric;
+ $18 = (_mrb_define_class($16,55060,$17)|0);
+ $integer = $18;
+ $19 = $0;
+ $20 = $integer;
+ _mrb_undef_class_method($19,$20,67683);
+ $21 = $0;
+ $22 = $integer;
+ _mrb_define_method($21,$22,56116,38,0);
+ $23 = $0;
+ $24 = $integer;
+ _mrb_define_method($23,$24,55221,38,0);
+ $25 = $0;
+ $26 = $integer;
+ $27 = (_mrb_define_class($25,55129,$26)|0);
+ $fixnum = $27;
+ $28 = $0;
+ $29 = ((($28)) + 64|0);
+ HEAP32[$29>>2] = $27;
+ $30 = $0;
+ $31 = $fixnum;
+ _mrb_define_method($30,$31,64315,39,262144);
+ $32 = $0;
+ $33 = $fixnum;
+ _mrb_define_method($32,$33,69609,40,262144);
+ $34 = $0;
+ $35 = $fixnum;
+ _mrb_define_method($34,$35,68114,41,262144);
+ $36 = $0;
+ $37 = $fixnum;
+ _mrb_define_method($36,$37,59630,42,262144);
+ $38 = $0;
+ $39 = $fixnum;
+ _mrb_define_method($38,$39,68902,43,262144);
+ $40 = $0;
+ $41 = $fixnum;
+ _mrb_define_method($40,$41,59638,44,0);
+ $42 = $0;
+ $43 = $fixnum;
+ _mrb_define_method($42,$43,68778,45,262144);
+ $44 = $0;
+ $45 = $fixnum;
+ _mrb_define_method($44,$45,59632,46,262144);
+ $46 = $0;
+ $47 = $fixnum;
+ _mrb_define_method($46,$47,59634,47,262144);
+ $48 = $0;
+ $49 = $fixnum;
+ _mrb_define_method($48,$49,64339,48,262144);
+ $50 = $0;
+ $51 = $fixnum;
+ _mrb_define_method($50,$51,57205,49,262144);
+ $52 = $0;
+ $53 = $fixnum;
+ _mrb_define_method($52,$53,68994,50,262144);
+ $54 = $0;
+ $55 = $fixnum;
+ _mrb_define_method($54,$55,68178,51,0);
+ $56 = $0;
+ $57 = $fixnum;
+ _mrb_define_method($56,$57,56111,52,0);
+ $58 = $0;
+ $59 = $fixnum;
+ _mrb_define_method($58,$59,68977,53,0);
+ $60 = $0;
+ $61 = $fixnum;
+ _mrb_define_method($60,$61,68986,53,0);
+ $62 = $0;
+ $63 = $fixnum;
+ _mrb_define_method($62,$63,54958,54,262144);
+ $64 = $0;
+ $65 = $numeric;
+ $66 = (_mrb_define_class($64,55150,$65)|0);
+ $fl = $66;
+ $67 = $0;
+ $68 = ((($67)) + 60|0);
+ HEAP32[$68>>2] = $66;
+ $69 = $0;
+ $70 = $fl;
+ _mrb_undef_class_method($69,$70,67683);
+ $71 = $0;
+ $72 = $fl;
+ _mrb_define_method($71,$72,64315,55,262144);
+ $73 = $0;
+ $74 = $fl;
+ _mrb_define_method($73,$74,69609,56,262144);
+ $75 = $0;
+ $76 = $fl;
+ _mrb_define_method($75,$76,68114,57,262144);
+ $77 = $0;
+ $78 = $fl;
+ _mrb_define_method($77,$78,59630,58,262144);
+ $79 = $0;
+ $80 = $fl;
+ _mrb_define_method($79,$80,68902,59,262144);
+ $81 = $0;
+ $82 = $fl;
+ _mrb_define_method($81,$82,54965,60,0);
+ $83 = $0;
+ $84 = $fl;
+ _mrb_define_method($83,$84,54970,61,0);
+ $85 = $0;
+ $86 = $fl;
+ _mrb_define_method($85,$86,54978,62,0);
+ $87 = $0;
+ $88 = $fl;
+ _mrb_define_method($87,$88,54984,63,0);
+ $89 = $0;
+ $90 = $fl;
+ _mrb_define_method($89,$90,54994,64,8192);
+ $91 = $0;
+ $92 = $fl;
+ _mrb_define_method($91,$92,56111,65,0);
+ $93 = $0;
+ $94 = $fl;
+ _mrb_define_method($93,$94,56116,66,0);
+ $95 = $0;
+ $96 = $fl;
+ _mrb_define_method($95,$96,55221,66,0);
+ $97 = $0;
+ $98 = $fl;
+ _mrb_define_method($97,$98,55000,66,0);
+ $99 = $0;
+ $100 = $fl;
+ _mrb_define_method($99,$100,54958,67,262144);
+ $101 = $0;
+ $102 = $fl;
+ _mrb_define_method($101,$102,68994,68,262144);
+ $103 = $0;
+ $104 = $fl;
+ _mrb_define_method($103,$104,68977,69,0);
+ $105 = $0;
+ $106 = $fl;
+ _mrb_define_method($105,$106,68986,69,0);
+ $107 = $0;
+ $108 = $fl;
+ _mrb_define_method($107,$108,55014,70,0);
+ $109 = $0;
+ $110 = $fl;
+ $111 = $0;
+ _mrb_float_value($1,$111,inf);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;
+ _mrb_define_const($109,$110,55019,$$byval_copy);
+ $112 = $0;
+ $113 = $fl;
+ $114 = $0;
+ _mrb_float_value($2,$114,nan);
+ ;HEAP32[$$byval_copy1>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$2+4>>2]|0;
+ _mrb_define_const($112,$113,72372,$$byval_copy1);
+ STACKTOP = sp;return;
+}
+function _num_pow($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0;
+ var $27 = 0.0, $28 = 0, $29 = 0, $3 = 0.0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, $d = 0.0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $vararg_buffer = 0, $x$byval_copy = 0;
+ var $y = 0, $y$byval_copy = 0, $yv = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $x$byval_copy = sp + 40|0;
+ $y$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $y = sp + 16|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $y;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$y$byval_copy>>2]=HEAP32[$y>>2]|0;HEAP32[$y$byval_copy+4>>2]=HEAP32[$y+4>>2]|0;
+ $3 = (+_mrb_to_flo($2,$y$byval_copy));
+ $yv = $3;
+ $4 = $0;
+ ;HEAP32[$x$byval_copy>>2]=HEAP32[$x>>2]|0;HEAP32[$x$byval_copy+4>>2]=HEAP32[$x+4>>2]|0;
+ $5 = (+_mrb_to_flo($4,$x$byval_copy));
+ $6 = $5;
+ $7 = $yv;
+ $8 = $7;
+ $9 = (+Math_pow((+$6),(+$8)));
+ $10 = $9;
+ $d = $10;
+ $11 = ((($x)) + 4|0);
+ $12 = HEAP32[$11>>2]|0;
+ $13 = ($12|0)==(3);
+ do {
+  if ($13) {
+   $14 = ((($y)) + 4|0);
+   $15 = HEAP32[$14>>2]|0;
+   $16 = ($15|0)==(3);
+   $17 = $d;
+   $18 = $17 <= 2147483648.0;
+   $or$cond = $16 & $18;
+   $19 = $d;
+   $20 = $19 >= -2147483648.0;
+   $or$cond3 = $or$cond & $20;
+   $21 = $yv;
+   $22 = $21 > 0.0;
+   $or$cond5 = $or$cond3 & $22;
+   if ($or$cond5) {
+    $23 = $d;
+    $24 = $23 < 0.0;
+    if (!($24)) {
+     $25 = $d;
+     $26 = $25 > 0.0;
+     if (!($26)) {
+      break;
+     }
+     $27 = $d;
+     $28 = (~~(($27)));
+     $29 = ($28|0)>(0);
+     if (!($29)) {
+      break;
+     }
+    }
+    $30 = $d;
+    $31 = (~~(($30)));
+    _mrb_fixnum_value_125($agg$result,$31);
+    STACKTOP = sp;return;
+   }
+  }
+ } while(0);
+ $32 = $0;
+ $33 = $d;
+ _mrb_float_value($agg$result,$32,$33);
+ STACKTOP = sp;return;
+}
+function _num_div($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $vararg_buffer = 0, $x$byval_copy = 0, $y = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $x$byval_copy = sp + 16|0;
+ $vararg_buffer = sp;
+ $y = sp + 4|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $y;
+ (_mrb_get_args($1,54919,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = $0;
+ ;HEAP32[$x$byval_copy>>2]=HEAP32[$x>>2]|0;HEAP32[$x$byval_copy+4>>2]=HEAP32[$x+4>>2]|0;
+ $4 = (+_mrb_to_flo($3,$x$byval_copy));
+ $5 = +HEAPF32[$y>>2];
+ $6 = $4 / $5;
+ _mrb_float_value($agg$result,$2,$6);
+ STACKTOP = sp;return;
+}
+function _num_cmp($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, $other = 0, $self$byval_copy = 0, $vararg_buffer = 0, $x = 0.0, $y = 0.0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $other = sp + 16|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $other;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ $3 = (+_mrb_to_flo($2,$self$byval_copy));
+ $x = $3;
+ $4 = ((($other)) + 4|0);
+ $5 = HEAP32[$4>>2]|0;
+ switch ($5|0) {
+ case 3:  {
+  $6 = HEAP32[$other>>2]|0;
+  $7 = (+($6|0));
+  $y = $7;
+  break;
+ }
+ case 6:  {
+  $8 = +HEAPF32[$other>>2];
+  $y = $8;
+  break;
+ }
+ default: {
+  _mrb_nil_value_141($agg$result);
+  STACKTOP = sp;return;
+ }
+ }
+ $9 = $x;
+ $10 = $y;
+ $11 = $9 > $10;
+ if ($11) {
+  _mrb_fixnum_value_125($agg$result,1);
+  STACKTOP = sp;return;
+ }
+ $12 = $x;
+ $13 = $y;
+ $14 = $12 < $13;
+ if ($14) {
+  _mrb_fixnum_value_125($agg$result,-1);
+  STACKTOP = sp;return;
+ } else {
+  _mrb_fixnum_value_125($agg$result,0);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_nil_value_141($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _int_to_i($agg$result,$mrb,$num) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $num = $num|0;
+ var $0 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ ;HEAP32[$agg$result>>2]=HEAP32[$num>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$num+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _fix_plus($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $other = 0, $other$byval_copy = 0, $self$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $other$byval_copy = sp + 32|0;
+ $self$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $other = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $other;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ ;HEAP32[$other$byval_copy>>2]=HEAP32[$other>>2]|0;HEAP32[$other$byval_copy+4>>2]=HEAP32[$other+4>>2]|0;
+ _mrb_fixnum_plus($agg$result,$2,$self$byval_copy,$other$byval_copy);
+ STACKTOP = sp;return;
+}
+function _fix_minus($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $other = 0, $other$byval_copy = 0, $self$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $other$byval_copy = sp + 32|0;
+ $self$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $other = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $other;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ ;HEAP32[$other$byval_copy>>2]=HEAP32[$other>>2]|0;HEAP32[$other$byval_copy+4>>2]=HEAP32[$other+4>>2]|0;
+ _mrb_fixnum_minus($agg$result,$2,$self$byval_copy,$other$byval_copy);
+ STACKTOP = sp;return;
+}
+function _fix_mul($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $2 = 0, $vararg_buffer = 0, $x$byval_copy = 0, $y = 0, $y$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $y$byval_copy = sp + 32|0;
+ $x$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $y = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $y;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$x$byval_copy>>2]=HEAP32[$x>>2]|0;HEAP32[$x$byval_copy+4>>2]=HEAP32[$x+4>>2]|0;
+ ;HEAP32[$y$byval_copy>>2]=HEAP32[$y>>2]|0;HEAP32[$y$byval_copy+4>>2]=HEAP32[$y+4>>2]|0;
+ _mrb_fixnum_mul($agg$result,$2,$x$byval_copy,$y$byval_copy);
+ STACKTOP = sp;return;
+}
+function _fix_mod($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0;
+ var $b = 0, $mod = 0, $mod1 = 0, $vararg_buffer = 0, $y = 0, $y$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $y$byval_copy = sp + 40|0;
+ $vararg_buffer = sp;
+ $y = sp + 24|0;
+ $mod = sp + 8|0;
+ $mod1 = sp + 4|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $y;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = HEAP32[$x>>2]|0;
+ $a = $2;
+ $3 = ((($y)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)==(3);
+ if (!($5)) {
+  $12 = $0;
+  $13 = $a;
+  $14 = (+($13|0));
+  $15 = $0;
+  ;HEAP32[$y$byval_copy>>2]=HEAP32[$y>>2]|0;HEAP32[$y$byval_copy+4>>2]=HEAP32[$y+4>>2]|0;
+  $16 = (+_mrb_to_flo($15,$y$byval_copy));
+  _flodivmod($12,$14,$16,0,$mod1);
+  $17 = $0;
+  $18 = +HEAPF32[$mod1>>2];
+  _mrb_float_value($agg$result,$17,$18);
+  STACKTOP = sp;return;
+ }
+ $6 = HEAP32[$y>>2]|0;
+ $b = $6;
+ $7 = ($6|0)==(0);
+ $8 = $0;
+ if ($7) {
+  _mrb_float_value($agg$result,$8,nan);
+  STACKTOP = sp;return;
+ } else {
+  $9 = $a;
+  $10 = $b;
+  _fixdivmod($8,$9,$10,0,$mod);
+  $11 = HEAP32[$mod>>2]|0;
+  _mrb_fixnum_value_125($agg$result,$11);
+  STACKTOP = sp;return;
+ }
+}
+function _fixdivmod($mrb,$x,$y,$divp,$modp) {
+ $mrb = $mrb|0;
+ $x = $x|0;
+ $y = $y|0;
+ $divp = $divp|0;
+ $modp = $modp|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $div = 0, $mod = 0, $or$cond = 0, $or$cond3 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $x;
+ $2 = $y;
+ $3 = $divp;
+ $4 = $modp;
+ $5 = $2;
+ $6 = ($5|0)<(0);
+ $7 = $1;
+ $8 = ($7|0)<(0);
+ $9 = $1;
+ do {
+  if ($6) {
+   if ($8) {
+    $10 = (0 - ($9))|0;
+    $11 = $2;
+    $12 = (0 - ($11))|0;
+    $13 = (($10|0) / ($12|0))&-1;
+    $div = $13;
+    break;
+   } else {
+    $14 = $2;
+    $15 = (0 - ($14))|0;
+    $16 = (($9|0) / ($15|0))&-1;
+    $17 = (0 - ($16))|0;
+    $div = $17;
+    break;
+   }
+  } else {
+   if ($8) {
+    $18 = (0 - ($9))|0;
+    $19 = $2;
+    $20 = (($18|0) / ($19|0))&-1;
+    $21 = (0 - ($20))|0;
+    $div = $21;
+    break;
+   } else {
+    $22 = $2;
+    $23 = (($9|0) / ($22|0))&-1;
+    $div = $23;
+    break;
+   }
+  }
+ } while(0);
+ $24 = $1;
+ $25 = $div;
+ $26 = $2;
+ $27 = Math_imul($25, $26)|0;
+ $28 = (($24) - ($27))|0;
+ $mod = $28;
+ $29 = $mod;
+ $30 = ($29|0)<(0);
+ $31 = $2;
+ $32 = ($31|0)>(0);
+ $or$cond = $30 & $32;
+ if ($or$cond) {
+  label = 10;
+ } else {
+  $33 = $mod;
+  $34 = ($33|0)>(0);
+  $35 = $2;
+  $36 = ($35|0)<(0);
+  $or$cond3 = $34 & $36;
+  if ($or$cond3) {
+   label = 10;
+  }
+ }
+ if ((label|0) == 10) {
+  $37 = $2;
+  $38 = $mod;
+  $39 = (($38) + ($37))|0;
+  $mod = $39;
+  $40 = $div;
+  $41 = (($40) - 1)|0;
+  $div = $41;
+ }
+ $42 = $3;
+ $43 = ($42|0)!=(0|0);
+ if ($43) {
+  $44 = $div;
+  $45 = $3;
+  HEAP32[$45>>2] = $44;
+ }
+ $46 = $4;
+ $47 = ($46|0)!=(0|0);
+ if (!($47)) {
+  STACKTOP = sp;return;
+ }
+ $48 = $mod;
+ $49 = $4;
+ HEAP32[$49>>2] = $48;
+ STACKTOP = sp;return;
+}
+function _flodivmod($mrb,$x,$y,$divp,$modp) {
+ $mrb = $mrb|0;
+ $x = +$x;
+ $y = +$y;
+ $divp = $divp|0;
+ $modp = $modp|0;
+ var $0 = 0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0;
+ var $27 = 0.0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0.0, $43 = 0, $5 = 0.0;
+ var $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $div = 0.0, $mod = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $x;
+ $2 = $y;
+ $3 = $divp;
+ $4 = $modp;
+ $5 = $2;
+ $6 = $5;
+ $7 = $6 == 0.0;
+ if ($7) {
+  $div = inf;
+  $mod = nan;
+ } else {
+  $8 = $1;
+  $9 = $2;
+  $10 = (+_fmodf($8,$9));
+  $mod = $10;
+  $11 = $1;
+  $12 = (___FLOAT_BITS_126($11)|0);
+  $13 = $12 & 2147483647;
+  $14 = ($13|0)==(2139095040);
+  if ($14) {
+   $15 = $2;
+   $16 = (___FLOAT_BITS_126($15)|0);
+   $17 = $16 & 2147483647;
+   $18 = ($17>>>0)<(2139095040);
+   if ($18) {
+    $19 = $1;
+    $div = $19;
+   } else {
+    label = 6;
+   }
+  } else {
+   label = 6;
+  }
+  if ((label|0) == 6) {
+   $20 = $1;
+   $21 = $mod;
+   $22 = $20 - $21;
+   $23 = $2;
+   $24 = $22 / $23;
+   $div = $24;
+  }
+  $25 = $2;
+  $26 = $mod;
+  $27 = $25 * $26;
+  $28 = $27 < 0.0;
+  if ($28) {
+   $29 = $2;
+   $30 = $mod;
+   $31 = $30 + $29;
+   $mod = $31;
+   $32 = $div;
+   $33 = $32;
+   $34 = $33 - 1.0;
+   $35 = $34;
+   $div = $35;
+  }
+ }
+ $36 = $4;
+ $37 = ($36|0)!=(0|0);
+ if ($37) {
+  $38 = $mod;
+  $39 = $4;
+  HEAPF32[$39>>2] = $38;
+ }
+ $40 = $3;
+ $41 = ($40|0)!=(0|0);
+ if (!($41)) {
+  STACKTOP = sp;return;
+ }
+ $42 = $div;
+ $43 = $3;
+ HEAPF32[$43>>2] = $42;
+ STACKTOP = sp;return;
+}
+function _fix_equal($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $y = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $y = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $y;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = ((($y)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ switch ($3|0) {
+ case 3:  {
+  $4 = HEAP32[$x>>2]|0;
+  $5 = HEAP32[$y>>2]|0;
+  $6 = ($4|0)==($5|0);
+  $7 = $6&1;
+  $8 = $7&255;
+  _mrb_bool_value_152($agg$result,$8);
+  STACKTOP = sp;return;
+  break;
+ }
+ case 6:  {
+  $9 = HEAP32[$x>>2]|0;
+  $10 = (+($9|0));
+  $11 = +HEAPF32[$y>>2];
+  $12 = $10 == $11;
+  $13 = $12&1;
+  $14 = $13&255;
+  _mrb_bool_value_152($agg$result,$14);
+  STACKTOP = sp;return;
+  break;
+ }
+ default: {
+  _mrb_false_value_153($agg$result);
+  STACKTOP = sp;return;
+ }
+ }
+}
+function _mrb_bool_value_152($agg$result,$boolean) {
+ $agg$result = $agg$result|0;
+ $boolean = $boolean|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $boolean;
+ $1 = $0;
+ $2 = $1&255;
+ $3 = ($2|0)!=(0);
+ $4 = $3 ? 2 : 0;
+ $5 = ((($v)) + 4|0);
+ HEAP32[$5>>2] = $4;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_false_value_153($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _fix_rev($agg$result,$mrb,$num) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $num = $num|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $val = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$num>>2]|0;
+ $val = $1;
+ $2 = $val;
+ $3 = $2 ^ -1;
+ _mrb_fixnum_value_125($agg$result,$3);
+ STACKTOP = sp;return;
+}
+function _fix_and($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $vararg_buffer = 0, $y = 0, $y$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $y$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $y = sp + 16|0;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $y;
+ (_mrb_get_args($2,68900,$vararg_buffer)|0);
+ $3 = $0;
+ ;HEAP32[$y$byval_copy>>2]=HEAP32[$y>>2]|0;HEAP32[$y$byval_copy+4>>2]=HEAP32[$y+4>>2]|0;
+ _bit_coerce($1,$3,$y$byval_copy);
+ ;HEAP32[$y>>2]=HEAP32[$1>>2]|0;HEAP32[$y+4>>2]=HEAP32[$1+4>>2]|0;
+ $4 = HEAP32[$x>>2]|0;
+ $5 = HEAP32[$y>>2]|0;
+ $6 = $4 & $5;
+ _mrb_fixnum_value_125($agg$result,$6);
+ STACKTOP = sp;return;
+}
+function _bit_coerce($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $x$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $x$byval_copy = sp + 16|0;
+ $1 = sp;
+ $0 = $mrb;
+ while(1) {
+  $2 = ((($x)) + 4|0);
+  $3 = HEAP32[$2>>2]|0;
+  $4 = ($3|0)==(3);
+  $5 = $4 ^ 1;
+  if (!($5)) {
+   label = 6;
+   break;
+  }
+  $6 = ((($x)) + 4|0);
+  $7 = HEAP32[$6>>2]|0;
+  $8 = ($7|0)==(6);
+  $9 = $0;
+  if ($8) {
+   label = 4;
+   break;
+  }
+  ;HEAP32[$x$byval_copy>>2]=HEAP32[$x>>2]|0;HEAP32[$x$byval_copy+4>>2]=HEAP32[$x+4>>2]|0;
+  _mrb_to_int($1,$9,$x$byval_copy);
+  ;HEAP32[$x>>2]=HEAP32[$1>>2]|0;HEAP32[$x+4>>2]=HEAP32[$1+4>>2]|0;
+ }
+ if ((label|0) == 4) {
+  $10 = $0;
+  $11 = (_mrb_class_get($10,68905)|0);
+  _mrb_raise($9,$11,54925);
+  // unreachable;
+ }
+ else if ((label|0) == 6) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$x>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$x+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+}
+function _fix_or($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $vararg_buffer = 0, $y = 0, $y$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $y$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $y = sp + 16|0;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $y;
+ (_mrb_get_args($2,68900,$vararg_buffer)|0);
+ $3 = $0;
+ ;HEAP32[$y$byval_copy>>2]=HEAP32[$y>>2]|0;HEAP32[$y$byval_copy+4>>2]=HEAP32[$y+4>>2]|0;
+ _bit_coerce($1,$3,$y$byval_copy);
+ ;HEAP32[$y>>2]=HEAP32[$1>>2]|0;HEAP32[$y+4>>2]=HEAP32[$1+4>>2]|0;
+ $4 = HEAP32[$x>>2]|0;
+ $5 = HEAP32[$y>>2]|0;
+ $6 = $4 | $5;
+ _mrb_fixnum_value_125($agg$result,$6);
+ STACKTOP = sp;return;
+}
+function _fix_xor($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $vararg_buffer = 0, $y = 0, $y$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $y$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $y = sp + 16|0;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $y;
+ (_mrb_get_args($2,68900,$vararg_buffer)|0);
+ $3 = $0;
+ ;HEAP32[$y$byval_copy>>2]=HEAP32[$y>>2]|0;HEAP32[$y$byval_copy+4>>2]=HEAP32[$y+4>>2]|0;
+ _bit_coerce($1,$3,$y$byval_copy);
+ ;HEAP32[$y>>2]=HEAP32[$1>>2]|0;HEAP32[$y+4>>2]=HEAP32[$1+4>>2]|0;
+ $4 = HEAP32[$x>>2]|0;
+ $5 = HEAP32[$y>>2]|0;
+ $6 = $4 ^ $5;
+ _mrb_fixnum_value_125($agg$result,$6);
+ STACKTOP = sp;return;
+}
+function _fix_lshift($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $val = 0, $width = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $width = sp + 4|0;
+ $0 = $mrb;
+ $1 = $0;
+ _fix_shift_get_width($1,$width);
+ $2 = HEAP32[$width>>2]|0;
+ $3 = ($2|0)==(0);
+ if ($3) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$x>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$x+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $4 = HEAP32[$x>>2]|0;
+ $val = $4;
+ $5 = HEAP32[$width>>2]|0;
+ $6 = ($5|0)<(0);
+ if ($6) {
+  $7 = $val;
+  $8 = HEAP32[$width>>2]|0;
+  $9 = (0 - ($8))|0;
+  _rshift($agg$result,$7,$9);
+  STACKTOP = sp;return;
+ } else {
+  $10 = $0;
+  $11 = $val;
+  $12 = HEAP32[$width>>2]|0;
+  _lshift($agg$result,$10,$11,$12);
+  STACKTOP = sp;return;
+ }
+}
+function _fix_shift_get_width($mrb,$width) {
+ $mrb = $mrb|0;
+ $width = $width|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $vararg_buffer = 0, $y = 0, $y$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $y$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $y = sp + 16|0;
+ $2 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $width;
+ $3 = $0;
+ HEAP32[$vararg_buffer>>2] = $y;
+ (_mrb_get_args($3,68900,$vararg_buffer)|0);
+ $4 = $0;
+ ;HEAP32[$y$byval_copy>>2]=HEAP32[$y>>2]|0;HEAP32[$y$byval_copy+4>>2]=HEAP32[$y+4>>2]|0;
+ _bit_coerce($2,$4,$y$byval_copy);
+ $5 = HEAP32[$2>>2]|0;
+ $6 = $1;
+ HEAP32[$6>>2] = $5;
+ STACKTOP = sp;return;
+}
+function _rshift($agg$result,$val,$width) {
+ $agg$result = $agg$result|0;
+ $val = $val|0;
+ $width = $width|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $val;
+ $1 = $width;
+ $2 = $1;
+ $3 = ($2|0)>=(31);
+ $4 = $0;
+ if (!($3)) {
+  $6 = $1;
+  $7 = $4 >> $6;
+  _mrb_fixnum_value_125($agg$result,$7);
+  STACKTOP = sp;return;
+ }
+ $5 = ($4|0)<(0);
+ if ($5) {
+  _mrb_fixnum_value_125($agg$result,-1);
+  STACKTOP = sp;return;
+ } else {
+  _mrb_fixnum_value_125($agg$result,0);
+  STACKTOP = sp;return;
+ }
+}
+function _lshift($agg$result,$mrb,$val,$width) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $val = $val|0;
+ $width = $width|0;
+ var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0, $f = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $val;
+ $2 = $width;
+ $3 = $2;
+ $4 = ($3|0)>(31);
+ $5 = $1;
+ if (!($4)) {
+  $14 = $2;
+  $15 = $5 << $14;
+  _mrb_fixnum_value_125($agg$result,$15);
+  STACKTOP = sp;return;
+ }
+ $6 = (+($5|0));
+ $f = $6;
+ while(1) {
+  $7 = $2;
+  $8 = (($7) + -1)|0;
+  $2 = $8;
+  $9 = ($7|0)!=(0);
+  if (!($9)) {
+   break;
+  }
+  $10 = $f;
+  $11 = $10 * 2.0;
+  $f = $11;
+ }
+ $12 = $0;
+ $13 = $f;
+ _mrb_float_value($agg$result,$12,$13);
+ STACKTOP = sp;return;
+}
+function _fix_rshift($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $val = 0, $width = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $width = sp + 4|0;
+ $0 = $mrb;
+ $1 = $0;
+ _fix_shift_get_width($1,$width);
+ $2 = HEAP32[$width>>2]|0;
+ $3 = ($2|0)==(0);
+ if ($3) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$x>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$x+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $4 = HEAP32[$x>>2]|0;
+ $val = $4;
+ $5 = HEAP32[$width>>2]|0;
+ $6 = ($5|0)<(0);
+ if ($6) {
+  $7 = $0;
+  $8 = $val;
+  $9 = HEAP32[$width>>2]|0;
+  $10 = (0 - ($9))|0;
+  _lshift($agg$result,$7,$8,$10);
+  STACKTOP = sp;return;
+ } else {
+  $11 = $val;
+  $12 = HEAP32[$width>>2]|0;
+  _rshift($agg$result,$11,$12);
+  STACKTOP = sp;return;
+ }
+}
+function _fix_eql($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $y = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $y = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $y;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = ((($y)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)==(3);
+ if ($4) {
+  $5 = HEAP32[$x>>2]|0;
+  $6 = HEAP32[$y>>2]|0;
+  $7 = ($5|0)==($6|0);
+  $8 = $7&1;
+  $9 = $8&255;
+  _mrb_bool_value_152($agg$result,$9);
+  STACKTOP = sp;return;
+ } else {
+  _mrb_false_value_153($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _flo_hash($agg$result,$mrb,$num) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $num = $num|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0.0, $20 = 0, $3 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $c = 0, $d = 0, $hash = 0, $i = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $d = sp + 12|0;
+ $0 = $mrb;
+ $1 = HEAP32[$num>>2]|0;
+ $2 = (+($1|0));
+ HEAPF32[$d>>2] = $2;
+ $3 = +HEAPF32[$d>>2];
+ $4 = $3 == 0.0;
+ if ($4) {
+  HEAPF32[$d>>2] = 0.0;
+ }
+ $c = $d;
+ $hash = 0;
+ $i = 0;
+ while(1) {
+  $5 = $i;
+  $6 = ($5>>>0)<(4);
+  $7 = $hash;
+  if (!($6)) {
+   break;
+  }
+  $8 = ($7*971)|0;
+  $9 = $i;
+  $10 = $c;
+  $11 = (($10) + ($9)|0);
+  $12 = HEAP8[$11>>0]|0;
+  $13 = $12&255;
+  $14 = $8 ^ $13;
+  $hash = $14;
+  $15 = $i;
+  $16 = (($15) + 1)|0;
+  $i = $16;
+ }
+ $17 = ($7|0)<(0);
+ if (!($17)) {
+  $20 = $hash;
+  _mrb_fixnum_value_125($agg$result,$20);
+  STACKTOP = sp;return;
+ }
+ $18 = $hash;
+ $19 = (0 - ($18))|0;
+ $hash = $19;
+ $20 = $hash;
+ _mrb_fixnum_value_125($agg$result,$20);
+ STACKTOP = sp;return;
+}
+function _fix_to_f($agg$result,$mrb,$num) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $num = $num|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = HEAP32[$num>>2]|0;
+ $3 = (+($2|0));
+ _mrb_float_value($agg$result,$1,$3);
+ STACKTOP = sp;return;
+}
+function _fix_to_s($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $base = 0, $self$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 16|0;
+ $vararg_buffer = sp;
+ $base = sp + 4|0;
+ $0 = $mrb;
+ HEAP32[$base>>2] = 10;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $base;
+ (_mrb_get_args($1,64388,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP32[$base>>2]|0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _mrb_fixnum_to_str($agg$result,$2,$self$byval_copy,$3);
+ STACKTOP = sp;return;
+}
+function _fix_divmod($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0;
+ var $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, $a$byval_copy = 0, $b = 0;
+ var $b$byval_copy = 0, $div = 0, $div1 = 0, $mod = 0, $mod2 = 0, $vararg_buffer = 0, $y = 0, $y$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $b$byval_copy = sp + 152|0;
+ $a$byval_copy = sp + 144|0;
+ $y$byval_copy = sp + 136|0;
+ $$byval_copy3 = sp + 128|0;
+ $$byval_copy2 = sp + 120|0;
+ $$byval_copy1 = sp + 112|0;
+ $$byval_copy = sp + 104|0;
+ $vararg_buffer = sp;
+ $y = sp + 88|0;
+ $div = sp + 84|0;
+ $mod = sp + 80|0;
+ $1 = sp + 72|0;
+ $2 = sp + 64|0;
+ $3 = sp + 56|0;
+ $4 = sp + 48|0;
+ $div1 = sp + 44|0;
+ $mod2 = sp + 40|0;
+ $a = sp + 32|0;
+ $b = sp + 24|0;
+ $5 = sp + 16|0;
+ $6 = sp + 8|0;
+ $0 = $mrb;
+ $7 = $0;
+ HEAP32[$vararg_buffer>>2] = $y;
+ (_mrb_get_args($7,68900,$vararg_buffer)|0);
+ $8 = ((($y)) + 4|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ($9|0)==(3);
+ if (!($10)) {
+  $21 = $0;
+  $22 = HEAP32[$x>>2]|0;
+  $23 = (+($22|0));
+  $24 = $0;
+  ;HEAP32[$y$byval_copy>>2]=HEAP32[$y>>2]|0;HEAP32[$y$byval_copy+4>>2]=HEAP32[$y+4>>2]|0;
+  $25 = (+_mrb_to_flo($24,$y$byval_copy));
+  _flodivmod($21,$23,$25,$div1,$mod2);
+  $26 = $0;
+  $27 = +HEAPF32[$div1>>2];
+  $28 = (~~(($27)));
+  $29 = (+($28|0));
+  _mrb_float_value($5,$26,$29);
+  ;HEAP32[$a>>2]=HEAP32[$5>>2]|0;HEAP32[$a+4>>2]=HEAP32[$5+4>>2]|0;
+  $30 = $0;
+  $31 = +HEAPF32[$mod2>>2];
+  _mrb_float_value($6,$30,$31);
+  ;HEAP32[$b>>2]=HEAP32[$6>>2]|0;HEAP32[$b+4>>2]=HEAP32[$6+4>>2]|0;
+  $32 = $0;
+  ;HEAP32[$a$byval_copy>>2]=HEAP32[$a>>2]|0;HEAP32[$a$byval_copy+4>>2]=HEAP32[$a+4>>2]|0;
+  ;HEAP32[$b$byval_copy>>2]=HEAP32[$b>>2]|0;HEAP32[$b$byval_copy+4>>2]=HEAP32[$b+4>>2]|0;
+  _mrb_assoc_new($agg$result,$32,$a$byval_copy,$b$byval_copy);
+  STACKTOP = sp;return;
+ }
+ $11 = HEAP32[$y>>2]|0;
+ $12 = ($11|0)==(0);
+ $13 = $0;
+ if ($12) {
+  $14 = $0;
+  _mrb_float_value($1,$14,inf);
+  $15 = $0;
+  _mrb_float_value($2,$15,nan);
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;
+  ;HEAP32[$$byval_copy1>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$2+4>>2]|0;
+  _mrb_assoc_new($agg$result,$13,$$byval_copy,$$byval_copy1);
+  STACKTOP = sp;return;
+ } else {
+  $16 = HEAP32[$x>>2]|0;
+  $17 = HEAP32[$y>>2]|0;
+  _fixdivmod($13,$16,$17,$div,$mod);
+  $18 = $0;
+  $19 = HEAP32[$div>>2]|0;
+  _mrb_fixnum_value_125($3,$19);
+  $20 = HEAP32[$mod>>2]|0;
+  _mrb_fixnum_value_125($4,$20);
+  ;HEAP32[$$byval_copy2>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$3+4>>2]|0;
+  ;HEAP32[$$byval_copy3>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$4+4>>2]|0;
+  _mrb_assoc_new($agg$result,$18,$$byval_copy2,$$byval_copy3);
+  STACKTOP = sp;return;
+ }
+}
+function _flo_plus($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $vararg_buffer = 0, $y = 0, $y$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $y$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $y = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $y;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = +HEAPF32[$x>>2];
+ $4 = $0;
+ ;HEAP32[$y$byval_copy>>2]=HEAP32[$y>>2]|0;HEAP32[$y$byval_copy+4>>2]=HEAP32[$y+4>>2]|0;
+ $5 = (+_mrb_to_flo($4,$y$byval_copy));
+ $6 = $3 + $5;
+ _mrb_float_value($agg$result,$2,$6);
+ STACKTOP = sp;return;
+}
+function _flo_minus($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $vararg_buffer = 0, $y = 0, $y$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $y$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $y = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $y;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = +HEAPF32[$x>>2];
+ $4 = $0;
+ ;HEAP32[$y$byval_copy>>2]=HEAP32[$y>>2]|0;HEAP32[$y$byval_copy+4>>2]=HEAP32[$y+4>>2]|0;
+ $5 = (+_mrb_to_flo($4,$y$byval_copy));
+ $6 = $3 - $5;
+ _mrb_float_value($agg$result,$2,$6);
+ STACKTOP = sp;return;
+}
+function _flo_mul($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $vararg_buffer = 0, $y = 0, $y$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $y$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $y = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $y;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = +HEAPF32[$x>>2];
+ $4 = $0;
+ ;HEAP32[$y$byval_copy>>2]=HEAP32[$y>>2]|0;HEAP32[$y$byval_copy+4>>2]=HEAP32[$y+4>>2]|0;
+ $5 = (+_mrb_to_flo($4,$y$byval_copy));
+ $6 = $3 * $5;
+ _mrb_float_value($agg$result,$2,$6);
+ STACKTOP = sp;return;
+}
+function _flo_mod($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $mod = 0, $vararg_buffer = 0, $y = 0, $y$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $y$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $y = sp + 8|0;
+ $mod = sp + 4|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $y;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = +HEAPF32[$x>>2];
+ $4 = $0;
+ ;HEAP32[$y$byval_copy>>2]=HEAP32[$y>>2]|0;HEAP32[$y$byval_copy+4>>2]=HEAP32[$y+4>>2]|0;
+ $5 = (+_mrb_to_flo($4,$y$byval_copy));
+ _flodivmod($2,$3,$5,0,$mod);
+ $6 = $0;
+ $7 = +HEAPF32[$mod>>2];
+ _mrb_float_value($agg$result,$6,$7);
+ STACKTOP = sp;return;
+}
+function _flo_eq($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $y = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $y = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $y;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = ((($y)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ switch ($3|0) {
+ case 3:  {
+  $4 = +HEAPF32[$x>>2];
+  $5 = HEAP32[$y>>2]|0;
+  $6 = (+($5|0));
+  $7 = $4 == $6;
+  $8 = $7&1;
+  $9 = $8&255;
+  _mrb_bool_value_152($agg$result,$9);
+  STACKTOP = sp;return;
+  break;
+ }
+ case 6:  {
+  $10 = +HEAPF32[$x>>2];
+  $11 = +HEAPF32[$y>>2];
+  $12 = $10 == $11;
+  $13 = $12&1;
+  $14 = $13&255;
+  _mrb_bool_value_152($agg$result,$14);
+  STACKTOP = sp;return;
+  break;
+ }
+ default: {
+  _mrb_false_value_153($agg$result);
+  STACKTOP = sp;return;
+ }
+ }
+}
+function _flo_ceil($agg$result,$mrb,$num) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $num = $num|0;
+ var $0 = 0, $1 = 0.0, $10 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, $f = 0.0, $or$cond = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = +HEAPF32[$num>>2];
+ $2 = (+Math_ceil((+$1)));
+ $f = $2;
+ $3 = $f;
+ $4 = $3 <= 2147483648.0;
+ $5 = $f;
+ $6 = $5 >= -2147483648.0;
+ $or$cond = $4 & $6;
+ if ($or$cond) {
+  $9 = $f;
+  $10 = (~~(($9)));
+  _mrb_fixnum_value_125($agg$result,$10);
+  STACKTOP = sp;return;
+ } else {
+  $7 = $0;
+  $8 = $f;
+  _mrb_float_value($agg$result,$7,$8);
+  STACKTOP = sp;return;
+ }
+}
+function _flo_finite_p($agg$result,$mrb,$num) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $num = $num|0;
+ var $0 = 0, $1 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = +HEAPF32[$num>>2];
+ $2 = (___FLOAT_BITS_126($1)|0);
+ $3 = $2 & 2147483647;
+ $4 = ($3>>>0)<(2139095040);
+ $5 = $4&1;
+ $6 = $5&255;
+ _mrb_bool_value_152($agg$result,$6);
+ STACKTOP = sp;return;
+}
+function _flo_floor($agg$result,$mrb,$num) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $num = $num|0;
+ var $0 = 0, $1 = 0.0, $10 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0.0, $f = 0.0, $or$cond = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = +HEAPF32[$num>>2];
+ $2 = (+Math_floor((+$1)));
+ $f = $2;
+ $3 = $f;
+ $4 = $3 <= 2147483648.0;
+ $5 = $f;
+ $6 = $5 >= -2147483648.0;
+ $or$cond = $4 & $6;
+ if ($or$cond) {
+  $9 = $f;
+  $10 = (~~(($9)));
+  _mrb_fixnum_value_125($agg$result,$10);
+  STACKTOP = sp;return;
+ } else {
+  $7 = $0;
+  $8 = $f;
+  _mrb_float_value($agg$result,$7,$8);
+  STACKTOP = sp;return;
+ }
+}
+function _flo_infinite_p($agg$result,$mrb,$num) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $num = $num|0;
+ var $0 = 0, $1 = 0.0, $2 = 0.0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0, $value = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = +HEAPF32[$num>>2];
+ $value = $1;
+ $2 = $value;
+ $3 = (___FLOAT_BITS_126($2)|0);
+ $4 = $3 & 2147483647;
+ $5 = ($4|0)==(2139095040);
+ if ($5) {
+  $6 = $value;
+  $7 = $6 < 0.0;
+  $8 = $7 ? -1 : 1;
+  _mrb_fixnum_value_125($agg$result,$8);
+  STACKTOP = sp;return;
+ } else {
+  _mrb_nil_value_141($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _flo_round($agg$result,$mrb,$num) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $num = $num|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
+ var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0.0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0, $41 = 0.0;
+ var $42 = 0.0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0;
+ var $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0, $67 = 0.0, $68 = 0.0, $69 = 0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0;
+ var $79 = 0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0, $83 = 0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0, $89 = 0, $9 = 0, $90 = 0.0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0;
+ var $97 = 0, $98 = 0, $99 = 0, $d = 0.0, $f = 0.0, $i = 0, $ndigits = 0, $number = 0.0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp + 24|0;
+ $ndigits = sp + 32|0;
+ $0 = $mrb;
+ HEAP32[$ndigits>>2] = 0;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $ndigits;
+ (_mrb_get_args($1,64388,$vararg_buffer)|0);
+ $2 = +HEAPF32[$num>>2];
+ $3 = $2;
+ $number = $3;
+ $4 = $number;
+ $5 = (___DOUBLE_BITS_127($4)|0);
+ $6 = tempRet0;
+ $7 = $6 & 2147483647;
+ $8 = ($5|0)==(0);
+ $9 = ($7|0)==(2146435072);
+ $10 = $8 & $9;
+ if ($10) {
+  $11 = HEAP32[$ndigits>>2]|0;
+  $12 = (0)<($11|0);
+  if (!($12)) {
+   $13 = $0;
+   $14 = $0;
+   $15 = (_mrb_class_get($14,54854)|0);
+   $16 = $number;
+   $17 = $16 < 0.0;
+   $18 = $17 ? 54871 : 54881;
+   _mrb_raise($13,$15,$18);
+   // unreachable;
+  }
+  ;HEAP32[$agg$result>>2]=HEAP32[$num>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$num+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $19 = $number;
+ $20 = (___DOUBLE_BITS_127($19)|0);
+ $21 = tempRet0;
+ $22 = $21 & 2147483647;
+ $23 = ($22>>>0)>(2146435072);
+ $24 = ($20>>>0)>(0);
+ $25 = ($22|0)==(2146435072);
+ $26 = $25 & $24;
+ $27 = $23 | $26;
+ if ($27) {
+  $28 = HEAP32[$ndigits>>2]|0;
+  $29 = (0)<($28|0);
+  if (!($29)) {
+   $30 = $0;
+   $31 = $0;
+   $32 = (_mrb_class_get($31,54854)|0);
+   _mrb_raise($30,$32,54890);
+   // unreachable;
+  }
+  ;HEAP32[$agg$result>>2]=HEAP32[$num>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$num+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $f = 1.0;
+ $33 = HEAP32[$ndigits>>2]|0;
+ $34 = ($33|0)>=(0);
+ $35 = HEAP32[$ndigits>>2]|0;
+ $36 = (0 - ($35))|0;
+ $37 = $34 ? $35 : $36;
+ $i = $37;
+ while(1) {
+  $38 = $i;
+  $39 = (($38) + -1)|0;
+  $i = $39;
+  $40 = ($39|0)>=(0);
+  $41 = $f;
+  if (!($40)) {
+   break;
+  }
+  $42 = $41 * 10.0;
+  $f = $42;
+ }
+ $43 = (___DOUBLE_BITS_127($41)|0);
+ $44 = tempRet0;
+ $45 = $44 & 2147483647;
+ $46 = ($43|0)==(0);
+ $47 = ($45|0)==(2146435072);
+ $48 = $46 & $47;
+ $49 = HEAP32[$ndigits>>2]|0;
+ $50 = ($49|0)<(0);
+ do {
+  if ($48) {
+   if ($50) {
+    $number = 0.0;
+   }
+  } else {
+   $51 = $f;
+   $52 = $number;
+   if ($50) {
+    $53 = $52 / $51;
+    $number = $53;
+   } else {
+    $54 = $52 * $51;
+    $number = $54;
+   }
+   $55 = $number;
+   $56 = $55 > 0.0;
+   $57 = $number;
+   if ($56) {
+    $58 = $57;
+    $59 = (+Math_floor((+$58)));
+    $60 = $59;
+    $d = $60;
+    $61 = $d;
+    $62 = $number;
+    $63 = $d;
+    $64 = $62 - $63;
+    $65 = $64 >= 0.5;
+    $66 = $65&1;
+    $67 = (+($66|0));
+    $68 = $61 + $67;
+    $number = $68;
+   } else {
+    $69 = $57 < 0.0;
+    if ($69) {
+     $70 = $number;
+     $71 = $70;
+     $72 = (+Math_ceil((+$71)));
+     $73 = $72;
+     $d = $73;
+     $74 = $d;
+     $75 = $d;
+     $76 = $number;
+     $77 = $75 - $76;
+     $78 = $77 >= 0.5;
+     $79 = $78&1;
+     $80 = (+($79|0));
+     $81 = $74 - $80;
+     $number = $81;
+    }
+   }
+   $82 = HEAP32[$ndigits>>2]|0;
+   $83 = ($82|0)<(0);
+   $84 = $f;
+   $85 = $number;
+   if ($83) {
+    $86 = $85 * $84;
+    $number = $86;
+    break;
+   } else {
+    $87 = $85 / $84;
+    $number = $87;
+    break;
+   }
+  }
+ } while(0);
+ $88 = HEAP32[$ndigits>>2]|0;
+ $89 = ($88|0)>(0);
+ $90 = $number;
+ if (!($89)) {
+  $102 = (~~(($90)));
+  _mrb_fixnum_value_125($agg$result,$102);
+  STACKTOP = sp;return;
+ }
+ $91 = (___DOUBLE_BITS_127($90)|0);
+ $92 = tempRet0;
+ $93 = $92 & 2147483647;
+ $94 = ($93>>>0)<(2146435072);
+ $95 = ($91>>>0)<(0);
+ $96 = ($93|0)==(2146435072);
+ $97 = $96 & $95;
+ $98 = $94 | $97;
+ if ($98) {
+  $99 = $0;
+  $100 = $number;
+  $101 = $100;
+  _mrb_float_value($agg$result,$99,$101);
+  STACKTOP = sp;return;
+ } else {
+  ;HEAP32[$agg$result>>2]=HEAP32[$num>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$num+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+}
+function _flo_to_f($agg$result,$mrb,$num) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $num = $num|0;
+ var $0 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ ;HEAP32[$agg$result>>2]=HEAP32[$num>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$num+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _flo_truncate($agg$result,$mrb,$num) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $num = $num|0;
+ var $0 = 0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0;
+ var $f = 0.0, $or$cond = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = +HEAPF32[$num>>2];
+ $f = $1;
+ $2 = $f;
+ $3 = $2;
+ $4 = $3 > 0.0;
+ if ($4) {
+  $5 = $f;
+  $6 = (+Math_floor((+$5)));
+  $f = $6;
+ }
+ $7 = $f;
+ $8 = $7;
+ $9 = $8 < 0.0;
+ if ($9) {
+  $10 = $f;
+  $11 = (+Math_ceil((+$10)));
+  $f = $11;
+ }
+ $12 = $f;
+ $13 = $12 <= 2147483648.0;
+ $14 = $f;
+ $15 = $14 >= -2147483648.0;
+ $or$cond = $13 & $15;
+ if ($or$cond) {
+  $18 = $f;
+  $19 = (~~(($18)));
+  _mrb_fixnum_value_125($agg$result,$19);
+  STACKTOP = sp;return;
+ } else {
+  $16 = $0;
+  $17 = $f;
+  _mrb_float_value($agg$result,$16,$17);
+  STACKTOP = sp;return;
+ }
+}
+function _flo_divmod($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0.0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, $a = 0, $a$byval_copy = 0, $b = 0, $b$byval_copy = 0, $div = 0;
+ var $mod = 0, $vararg_buffer = 0, $y = 0, $y$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $b$byval_copy = sp + 80|0;
+ $a$byval_copy = sp + 72|0;
+ $y$byval_copy = sp + 64|0;
+ $vararg_buffer = sp;
+ $y = sp + 48|0;
+ $div = sp + 44|0;
+ $mod = sp + 40|0;
+ $a = sp + 32|0;
+ $b = sp + 24|0;
+ $1 = sp + 16|0;
+ $2 = sp + 8|0;
+ $0 = $mrb;
+ $3 = $0;
+ HEAP32[$vararg_buffer>>2] = $y;
+ (_mrb_get_args($3,68900,$vararg_buffer)|0);
+ $4 = $0;
+ $5 = +HEAPF32[$x>>2];
+ $6 = $0;
+ ;HEAP32[$y$byval_copy>>2]=HEAP32[$y>>2]|0;HEAP32[$y$byval_copy+4>>2]=HEAP32[$y+4>>2]|0;
+ $7 = (+_mrb_to_flo($6,$y$byval_copy));
+ _flodivmod($4,$5,$7,$div,$mod);
+ $8 = $0;
+ $9 = +HEAPF32[$div>>2];
+ $10 = (~~(($9)));
+ $11 = (+($10|0));
+ _mrb_float_value($1,$8,$11);
+ ;HEAP32[$a>>2]=HEAP32[$1>>2]|0;HEAP32[$a+4>>2]=HEAP32[$1+4>>2]|0;
+ $12 = $0;
+ $13 = +HEAPF32[$mod>>2];
+ _mrb_float_value($2,$12,$13);
+ ;HEAP32[$b>>2]=HEAP32[$2>>2]|0;HEAP32[$b+4>>2]=HEAP32[$2+4>>2]|0;
+ $14 = $0;
+ ;HEAP32[$a$byval_copy>>2]=HEAP32[$a>>2]|0;HEAP32[$a$byval_copy+4>>2]=HEAP32[$a+4>>2]|0;
+ ;HEAP32[$b$byval_copy>>2]=HEAP32[$b>>2]|0;HEAP32[$b$byval_copy+4>>2]=HEAP32[$b+4>>2]|0;
+ _mrb_assoc_new($agg$result,$14,$a$byval_copy,$b$byval_copy);
+ STACKTOP = sp;return;
+}
+function _flo_eql($agg$result,$mrb,$x) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0, $vararg_buffer = 0, $y = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $y = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $y;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = ((($y)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)==(6);
+ if ($4) {
+  $5 = +HEAPF32[$x>>2];
+  $6 = HEAP32[$y>>2]|0;
+  $7 = (+($6|0));
+  $8 = $5 == $7;
+  $9 = $8&1;
+  $10 = $9&255;
+  _mrb_bool_value_152($agg$result,$10);
+  STACKTOP = sp;return;
+ } else {
+  _mrb_false_value_153($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _flo_to_s($agg$result,$mrb,$flt) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $flt = $flt|0;
+ var $0 = 0, $1 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $flt$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $flt$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = +HEAPF32[$flt>>2];
+ $2 = (___FLOAT_BITS_126($1)|0);
+ $3 = $2 & 2147483647;
+ $4 = ($3>>>0)>(2139095040);
+ $5 = $0;
+ if ($4) {
+  _mrb_str_new_static($agg$result,$5,54890,3);
+  STACKTOP = sp;return;
+ } else {
+  ;HEAP32[$flt$byval_copy>>2]=HEAP32[$flt>>2]|0;HEAP32[$flt$byval_copy+4>>2]=HEAP32[$flt+4>>2]|0;
+  _mrb_float_to_str($agg$result,$5,$flt$byval_copy,55009);
+  STACKTOP = sp;return;
+ }
+}
+function _flo_nan_p($agg$result,$mrb,$num) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $num = $num|0;
+ var $0 = 0, $1 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = +HEAPF32[$num>>2];
+ $2 = (___FLOAT_BITS_126($1)|0);
+ $3 = $2 & 2147483647;
+ $4 = ($3>>>0)>(2139095040);
+ $5 = $4&1;
+ $6 = $5&255;
+ _mrb_bool_value_152($agg$result,$6);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_eq($mrb,$v1,$v2) {
+ $mrb = $mrb|0;
+ $v1 = $v1|0;
+ $v2 = $v2|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = ((($v1)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ((($v2)) + 4|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ($3|0)!=($5|0);
+ L1: do {
+  if ($6) {
+   $0 = 0;
+  } else {
+   $7 = ((($v1)) + 4|0);
+   $8 = HEAP32[$7>>2]|0;
+   switch ($8|0) {
+   case 2:  {
+    $0 = 1;
+    break L1;
+    break;
+   }
+   case 3: case 0:  {
+    $9 = HEAP32[$v1>>2]|0;
+    $10 = HEAP32[$v2>>2]|0;
+    $11 = ($9|0)==($10|0);
+    $12 = $11&1;
+    $13 = $12&255;
+    $0 = $13;
+    break L1;
+    break;
+   }
+   case 4:  {
+    $14 = HEAP32[$v1>>2]|0;
+    $15 = HEAP32[$v2>>2]|0;
+    $16 = ($14|0)==($15|0);
+    $17 = $16&1;
+    $18 = $17&255;
+    $0 = $18;
+    break L1;
+    break;
+   }
+   case 6:  {
+    $19 = +HEAPF32[$v1>>2];
+    $20 = +HEAPF32[$v2>>2];
+    $21 = $19 == $20;
+    $22 = $21&1;
+    $23 = $22&255;
+    $0 = $23;
+    break L1;
+    break;
+   }
+   default: {
+    $24 = HEAP32[$v1>>2]|0;
+    $25 = HEAP32[$v2>>2]|0;
+    $26 = ($24|0)==($25|0);
+    $27 = $26&1;
+    $28 = $27&255;
+    $0 = $28;
+    break L1;
+   }
+   }
+  }
+ } while(0);
+ $29 = $0;
+ STACKTOP = sp;return ($29|0);
+}
+function _mrb_obj_equal($mrb,$v1,$v2) {
+ $mrb = $mrb|0;
+ $v1 = $v1|0;
+ $v2 = $v2|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v1$byval_copy = 0, $v2$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v2$byval_copy = sp + 16|0;
+ $v1$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$v1$byval_copy>>2]=HEAP32[$v1>>2]|0;HEAP32[$v1$byval_copy+4>>2]=HEAP32[$v1+4>>2]|0;
+ ;HEAP32[$v2$byval_copy>>2]=HEAP32[$v2>>2]|0;HEAP32[$v2$byval_copy+4>>2]=HEAP32[$v2+4>>2]|0;
+ $2 = (_mrb_obj_eq($1,$v1$byval_copy,$v2$byval_copy)|0);
+ STACKTOP = sp;return ($2|0);
+}
+function _mrb_equal($mrb,$obj1,$obj2) {
+ $mrb = $mrb|0;
+ $obj1 = $obj1|0;
+ $obj2 = $obj2|0;
+ var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $obj1$byval_copy = 0, $obj1$byval_copy1 = 0, $obj2$byval_copy = 0, $result = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj1$byval_copy1 = sp + 48|0;
+ $obj2$byval_copy = sp + 40|0;
+ $obj1$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $result = sp + 16|0;
+ $2 = sp + 8|0;
+ $1 = $mrb;
+ $3 = $1;
+ ;HEAP32[$obj1$byval_copy>>2]=HEAP32[$obj1>>2]|0;HEAP32[$obj1$byval_copy+4>>2]=HEAP32[$obj1+4>>2]|0;
+ ;HEAP32[$obj2$byval_copy>>2]=HEAP32[$obj2>>2]|0;HEAP32[$obj2$byval_copy+4>>2]=HEAP32[$obj2+4>>2]|0;
+ $4 = (_mrb_obj_eq($3,$obj1$byval_copy,$obj2$byval_copy)|0);
+ $5 = ($4<<24>>24)!=(0);
+ if ($5) {
+  $0 = 1;
+  $10 = $0;
+  STACKTOP = sp;return ($10|0);
+ }
+ $6 = $1;
+ ;HEAP8[$vararg_buffer>>0]=HEAP8[$obj2>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$obj2+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$obj2+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$obj2+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$obj2+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$obj2+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$obj2+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$obj2+7>>0]|0;
+ ;HEAP32[$obj1$byval_copy1>>2]=HEAP32[$obj1>>2]|0;HEAP32[$obj1$byval_copy1+4>>2]=HEAP32[$obj1+4>>2]|0;
+ _mrb_funcall($2,$6,$obj1$byval_copy1,68902,1,$vararg_buffer);
+ ;HEAP32[$result>>2]=HEAP32[$2>>2]|0;HEAP32[$result+4>>2]=HEAP32[$2+4>>2]|0;
+ $7 = ((($result)) + 4|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ($8|0)!=(0);
+ if ($9) {
+  $0 = 1;
+  $10 = $0;
+  STACKTOP = sp;return ($10|0);
+ } else {
+  $0 = 0;
+  $10 = $0;
+  STACKTOP = sp;return ($10|0);
+ }
+ return (0)|0;
+}
+function _mrb_init_object($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var $f = 0, $n = 0, $t = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = $0;
+ $3 = ((($2)) + 32|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = (_mrb_define_class($1,55028,$4)|0);
+ $n = $5;
+ $6 = $0;
+ $7 = ((($6)) + 76|0);
+ HEAP32[$7>>2] = $5;
+ $8 = $0;
+ $9 = $n;
+ _mrb_undef_class_method($8,$9,67683);
+ $10 = $0;
+ $11 = $n;
+ _mrb_define_method($10,$11,68778,71,262144);
+ $12 = $0;
+ $13 = $n;
+ _mrb_define_method($12,$13,59634,72,262144);
+ $14 = $0;
+ $15 = $n;
+ _mrb_define_method($14,$15,59632,73,262144);
+ $16 = $0;
+ $17 = $n;
+ _mrb_define_method($16,$17,68379,74,0);
+ $18 = $0;
+ $19 = $n;
+ _mrb_define_method($18,$19,68977,75,0);
+ $20 = $0;
+ $21 = $n;
+ _mrb_define_method($20,$21,68986,76,0);
+ $22 = $0;
+ $23 = $0;
+ $24 = ((($23)) + 32|0);
+ $25 = HEAP32[$24>>2]|0;
+ $26 = (_mrb_define_class($22,55039,$25)|0);
+ $t = $26;
+ $27 = $0;
+ $28 = ((($27)) + 68|0);
+ HEAP32[$28>>2] = $26;
+ $29 = $0;
+ $30 = $t;
+ _mrb_undef_class_method($29,$30,67683);
+ $31 = $0;
+ $32 = $t;
+ _mrb_define_method($31,$32,68778,77,262144);
+ $33 = $0;
+ $34 = $t;
+ _mrb_define_method($33,$34,59634,78,262144);
+ $35 = $0;
+ $36 = $t;
+ _mrb_define_method($35,$36,68977,79,0);
+ $37 = $0;
+ $38 = $t;
+ _mrb_define_method($37,$38,59632,80,262144);
+ $39 = $0;
+ $40 = $t;
+ _mrb_define_method($39,$40,68986,79,0);
+ $41 = $0;
+ $42 = $0;
+ $43 = ((($42)) + 32|0);
+ $44 = HEAP32[$43>>2]|0;
+ $45 = (_mrb_define_class($41,55049,$44)|0);
+ $f = $45;
+ $46 = $0;
+ $47 = ((($46)) + 72|0);
+ HEAP32[$47>>2] = $45;
+ $48 = $0;
+ $49 = $f;
+ _mrb_undef_class_method($48,$49,67683);
+ $50 = $0;
+ $51 = $f;
+ _mrb_define_method($50,$51,68778,71,262144);
+ $52 = $0;
+ $53 = $f;
+ _mrb_define_method($52,$53,59634,72,262144);
+ $54 = $0;
+ $55 = $f;
+ _mrb_define_method($54,$55,68977,81,0);
+ $56 = $0;
+ $57 = $f;
+ _mrb_define_method($56,$57,59632,73,262144);
+ $58 = $0;
+ $59 = $f;
+ _mrb_define_method($58,$59,68986,81,0);
+ STACKTOP = sp;return;
+}
+function _false_and($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ _mrb_false_value_176($agg$result);
+ STACKTOP = sp;return;
+}
+function _mrb_false_value_176($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _false_xor($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $obj2 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $obj2 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $obj2;
+ (_mrb_get_args($1,55037,$vararg_buffer)|0);
+ $2 = HEAP8[$obj2>>0]|0;
+ _mrb_bool_value_179($agg$result,$2);
+ STACKTOP = sp;return;
+}
+function _mrb_bool_value_179($agg$result,$boolean) {
+ $agg$result = $agg$result|0;
+ $boolean = $boolean|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $boolean;
+ $1 = $0;
+ $2 = $1&255;
+ $3 = ($2|0)!=(0);
+ $4 = $3 ? 2 : 0;
+ $5 = ((($v)) + 4|0);
+ HEAP32[$5>>2] = $4;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _false_or($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $obj2 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $obj2 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $obj2;
+ (_mrb_get_args($1,55037,$vararg_buffer)|0);
+ $2 = HEAP8[$obj2>>0]|0;
+ _mrb_bool_value_179($agg$result,$2);
+ STACKTOP = sp;return;
+}
+function _mrb_true($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ _mrb_true_value_182($agg$result);
+ STACKTOP = sp;return;
+}
+function _mrb_true_value_182($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 2;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _nil_to_s($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ _mrb_str_new($agg$result,$1,0,0);
+ STACKTOP = sp;return;
+}
+function _nil_inspect($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ _mrb_str_new_static($agg$result,$1,58162,3);
+ STACKTOP = sp;return;
+}
+function _true_and($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $obj2 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $obj2 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $obj2;
+ (_mrb_get_args($1,55037,$vararg_buffer)|0);
+ $2 = HEAP8[$obj2>>0]|0;
+ _mrb_bool_value_179($agg$result,$2);
+ STACKTOP = sp;return;
+}
+function _true_xor($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $obj2 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $obj2 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $obj2;
+ (_mrb_get_args($1,55037,$vararg_buffer)|0);
+ $2 = HEAP8[$obj2>>0]|0;
+ $3 = ($2<<24>>24)!=(0);
+ $4 = $3 ^ 1;
+ $5 = $4&1;
+ $6 = $5&255;
+ _mrb_bool_value_179($agg$result,$6);
+ STACKTOP = sp;return;
+}
+function _true_to_s($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ _mrb_str_new_static($agg$result,$1,58206,4);
+ STACKTOP = sp;return;
+}
+function _true_or($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ _mrb_true_value_182($agg$result);
+ STACKTOP = sp;return;
+}
+function _false_to_s($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ _mrb_str_new_static($agg$result,$1,58182,5);
+ STACKTOP = sp;return;
+}
+function _convert_type($agg$result,$mrb,$val,$tname,$method,$raise) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $val = $val|0;
+ $tname = $tname|0;
+ $method = $method|0;
+ $raise = $raise|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, $m = 0, $val$byval_copy = 0, $val$byval_copy2 = 0, $val$byval_copy3 = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy3 = sp + 64|0;
+ $val$byval_copy2 = sp + 56|0;
+ $val$byval_copy = sp + 48|0;
+ $vararg_buffer = sp;
+ $4 = sp + 24|0;
+ $5 = sp + 16|0;
+ $0 = $mrb;
+ $1 = $tname;
+ $2 = $method;
+ $3 = $raise;
+ $m = 0;
+ $6 = $0;
+ $7 = $2;
+ $8 = (_mrb_intern_cstr($6,$7)|0);
+ $m = $8;
+ $9 = $0;
+ $10 = $m;
+ ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+ $11 = (_mrb_respond_to($9,$val$byval_copy,$10)|0);
+ $12 = ($11<<24>>24)!=(0);
+ if ($12) {
+  $21 = $0;
+  $22 = $m;
+  ;HEAP32[$val$byval_copy3>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy3+4>>2]=HEAP32[$val+4>>2]|0;
+  _mrb_funcall_argv($agg$result,$21,$val$byval_copy3,$22,0,0);
+  STACKTOP = sp;return;
+ }
+ $13 = $3;
+ $14 = ($13<<24>>24)!=(0);
+ if ($14) {
+  $15 = $0;
+  $16 = $0;
+  $17 = (_mrb_class_get($16,68905)|0);
+  $18 = $0;
+  ;HEAP32[$val$byval_copy2>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy2+4>>2]=HEAP32[$val+4>>2]|0;
+  _inspect_type($4,$18,$val$byval_copy2);
+  $19 = $0;
+  $20 = $1;
+  _mrb_str_new_cstr($5,$19,$20);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$4>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$4+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$4+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$4+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$4+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$4+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$4+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$4+7>>0]|0;
+  $vararg_ptr1 = ((($vararg_buffer)) + 8|0);
+  ;HEAP8[$vararg_ptr1>>0]=HEAP8[$5>>0]|0;HEAP8[$vararg_ptr1+1>>0]=HEAP8[$5+1>>0]|0;HEAP8[$vararg_ptr1+2>>0]=HEAP8[$5+2>>0]|0;HEAP8[$vararg_ptr1+3>>0]=HEAP8[$5+3>>0]|0;HEAP8[$vararg_ptr1+4>>0]=HEAP8[$5+4>>0]|0;HEAP8[$vararg_ptr1+5>>0]=HEAP8[$5+5>>0]|0;HEAP8[$vararg_ptr1+6>>0]=HEAP8[$5+6>>0]|0;HEAP8[$vararg_ptr1+7>>0]=HEAP8[$5+7>>0]|0;
+  _mrb_raisef($15,$17,55068,$vararg_buffer);
+  // unreachable;
+ }
+ _mrb_nil_value_193($agg$result);
+ STACKTOP = sp;return;
+}
+function _inspect_type($agg$result,$mrb,$val) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $val$byval_copy = 0, $val$byval_copy1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy1 = sp + 16|0;
+ $val$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = ((($val)) + 4|0);
+ $2 = HEAP32[$1>>2]|0;
+ $3 = ($2|0)==(0);
+ if (!($3)) {
+  $4 = ((($val)) + 4|0);
+  $5 = HEAP32[$4>>2]|0;
+  $6 = ($5|0)==(2);
+  if (!($6)) {
+   $8 = $0;
+   $9 = $0;
+   ;HEAP32[$val$byval_copy1>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy1+4>>2]=HEAP32[$val+4>>2]|0;
+   $10 = (_mrb_obj_classname($9,$val$byval_copy1)|0);
+   _mrb_str_new_cstr($agg$result,$8,$10);
+   STACKTOP = sp;return;
+  }
+ }
+ $7 = $0;
+ ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+ _mrb_inspect($agg$result,$7,$val$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_inspect($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $obj$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 32|0;
+ $obj$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = $0;
+ $3 = $0;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ _mrb_funcall($1,$3,$obj$byval_copy,68986,0,$vararg_buffer);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;
+ _mrb_obj_as_string($agg$result,$2,$$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_nil_value_193($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_convert_type($agg$result,$mrb,$val,$type,$tname,$method) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $val = $val|0;
+ $type = $type|0;
+ $tname = $tname|0;
+ $method = $method|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $v = 0, $val$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy = sp + 72|0;
+ $vararg_buffer = sp;
+ $v = sp + 48|0;
+ $4 = sp + 40|0;
+ $5 = sp + 32|0;
+ $6 = sp + 24|0;
+ $0 = $mrb;
+ $1 = $type;
+ $2 = $tname;
+ $3 = $method;
+ $7 = ((($val)) + 4|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = $1;
+ $10 = ($8|0)==($9|0);
+ if ($10) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$val>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$val+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $11 = $0;
+ $12 = $2;
+ $13 = $3;
+ ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+ _convert_type($4,$11,$val$byval_copy,$12,$13,1);
+ ;HEAP32[$v>>2]=HEAP32[$4>>2]|0;HEAP32[$v+4>>2]=HEAP32[$4+4>>2]|0;
+ $14 = ((($v)) + 4|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = $1;
+ $17 = ($15|0)!=($16|0);
+ if ($17) {
+  $18 = $0;
+  $19 = $0;
+  $20 = (_mrb_class_get($19,68905)|0);
+  $21 = $0;
+  $22 = $2;
+  _mrb_str_new_cstr($5,$21,$22);
+  $23 = $0;
+  $24 = $3;
+  _mrb_str_new_cstr($6,$23,$24);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$val>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$val+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$val+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$val+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$val+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$val+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$val+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$val+7>>0]|0;
+  $vararg_ptr1 = ((($vararg_buffer)) + 8|0);
+  ;HEAP8[$vararg_ptr1>>0]=HEAP8[$5>>0]|0;HEAP8[$vararg_ptr1+1>>0]=HEAP8[$5+1>>0]|0;HEAP8[$vararg_ptr1+2>>0]=HEAP8[$5+2>>0]|0;HEAP8[$vararg_ptr1+3>>0]=HEAP8[$5+3>>0]|0;HEAP8[$vararg_ptr1+4>>0]=HEAP8[$5+4>>0]|0;HEAP8[$vararg_ptr1+5>>0]=HEAP8[$5+5>>0]|0;HEAP8[$vararg_ptr1+6>>0]=HEAP8[$5+6>>0]|0;HEAP8[$vararg_ptr1+7>>0]=HEAP8[$5+7>>0]|0;
+  $vararg_ptr2 = ((($vararg_buffer)) + 16|0);
+  ;HEAP8[$vararg_ptr2>>0]=HEAP8[$6>>0]|0;HEAP8[$vararg_ptr2+1>>0]=HEAP8[$6+1>>0]|0;HEAP8[$vararg_ptr2+2>>0]=HEAP8[$6+2>>0]|0;HEAP8[$vararg_ptr2+3>>0]=HEAP8[$6+3>>0]|0;HEAP8[$vararg_ptr2+4>>0]=HEAP8[$6+4>>0]|0;HEAP8[$vararg_ptr2+5>>0]=HEAP8[$6+5>>0]|0;HEAP8[$vararg_ptr2+6>>0]=HEAP8[$6+6>>0]|0;HEAP8[$vararg_ptr2+7>>0]=HEAP8[$6+7>>0]|0;
+  _mrb_raisef($18,$20,55093,$vararg_buffer);
+  // unreachable;
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_check_convert_type($agg$result,$mrb,$val,$type,$tname,$method) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $val = $val|0;
+ $type = $type|0;
+ $tname = $tname|0;
+ $method = $method|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $v = 0, $val$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy = sp + 32|0;
+ $v = sp + 8|0;
+ $4 = sp;
+ $0 = $mrb;
+ $1 = $type;
+ $2 = $tname;
+ $3 = $method;
+ $5 = ((($val)) + 4|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = $1;
+ $8 = ($6|0)==($7|0);
+ $9 = $1;
+ $10 = ($9|0)!=(21);
+ $or$cond = $8 & $10;
+ if ($or$cond) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$val>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$val+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $11 = $0;
+ $12 = $2;
+ $13 = $3;
+ ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+ _convert_type($4,$11,$val$byval_copy,$12,$13,0);
+ ;HEAP32[$v>>2]=HEAP32[$4>>2]|0;HEAP32[$v+4>>2]=HEAP32[$4+4>>2]|0;
+ $14 = ((($v)) + 4|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = ($15|0)==(0);
+ if ($16) {
+  $17 = HEAP32[$v>>2]|0;
+  $18 = ($17|0)!=(0);
+  if ($18) {
+   label = 5;
+  }
+ } else {
+  label = 5;
+ }
+ if ((label|0) == 5) {
+  $19 = ((($v)) + 4|0);
+  $20 = HEAP32[$19>>2]|0;
+  $21 = $1;
+  $22 = ($20|0)!=($21|0);
+  if (!($22)) {
+   ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+ }
+ _mrb_nil_value_193($agg$result);
+ STACKTOP = sp;return;
+}
+function _mrb_check_type($mrb,$x,$t) {
+ $mrb = $mrb|0;
+ $x = $x|0;
+ $t = $t|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $8 = 0, $9 = 0, $etype = 0, $or$cond = 0, $type = 0, $vararg_buffer = 0, $vararg_buffer3 = 0, $vararg_ptr2 = 0, $vararg_ptr6 = 0, $x$byval_copy = 0, $x$byval_copy7 = 0;
+ var $x$byval_copy8 = 0, $x$byval_copy9 = 0, $xt = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $x$byval_copy9 = sp + 136|0;
+ $x$byval_copy8 = sp + 128|0;
+ $x$byval_copy7 = sp + 120|0;
+ $x$byval_copy = sp + 112|0;
+ $vararg_buffer3 = sp + 16|0;
+ $vararg_buffer = sp;
+ $2 = sp + 80|0;
+ $3 = sp + 72|0;
+ $4 = sp + 64|0;
+ $5 = sp + 56|0;
+ $6 = sp + 48|0;
+ $7 = sp + 40|0;
+ $8 = sp + 32|0;
+ $0 = $mrb;
+ $1 = $t;
+ $type = 56;
+ $9 = ((($x)) + 4|0);
+ $10 = HEAP32[$9>>2]|0;
+ $xt = $10;
+ $11 = $xt;
+ $12 = $1;
+ $13 = ($11|0)!=($12|0);
+ $14 = $xt;
+ $15 = ($14|0)==(21);
+ $or$cond = $13 | $15;
+ if (!($or$cond)) {
+  STACKTOP = sp;return;
+ }
+ while(1) {
+  $16 = $type;
+  $17 = HEAP8[$16>>0]|0;
+  $18 = $17&255;
+  $19 = ($18|0)<(23);
+  if (!($19)) {
+   label = 19;
+   break;
+  }
+  $20 = $type;
+  $21 = HEAP8[$20>>0]|0;
+  $22 = $21&255;
+  $23 = $1;
+  $24 = ($22|0)==($23|0);
+  if ($24) {
+   break;
+  }
+  $63 = $type;
+  $64 = ((($63)) + 8|0);
+  $type = $64;
+ }
+ if ((label|0) == 19) {
+  $65 = $0;
+  $66 = $0;
+  $67 = (_mrb_class_get($66,68905)|0);
+  $68 = $1;
+  _mrb_fixnum_value_213($7,$68);
+  $69 = ((($x)) + 4|0);
+  $70 = HEAP32[$69>>2]|0;
+  _mrb_fixnum_value_213($8,$70);
+  ;HEAP8[$vararg_buffer3>>0]=HEAP8[$7>>0]|0;HEAP8[$vararg_buffer3+1>>0]=HEAP8[$7+1>>0]|0;HEAP8[$vararg_buffer3+2>>0]=HEAP8[$7+2>>0]|0;HEAP8[$vararg_buffer3+3>>0]=HEAP8[$7+3>>0]|0;HEAP8[$vararg_buffer3+4>>0]=HEAP8[$7+4>>0]|0;HEAP8[$vararg_buffer3+5>>0]=HEAP8[$7+5>>0]|0;HEAP8[$vararg_buffer3+6>>0]=HEAP8[$7+6>>0]|0;HEAP8[$vararg_buffer3+7>>0]=HEAP8[$7+7>>0]|0;
+  $vararg_ptr6 = ((($vararg_buffer3)) + 8|0);
+  ;HEAP8[$vararg_ptr6>>0]=HEAP8[$8>>0]|0;HEAP8[$vararg_ptr6+1>>0]=HEAP8[$8+1>>0]|0;HEAP8[$vararg_ptr6+2>>0]=HEAP8[$8+2>>0]|0;HEAP8[$vararg_ptr6+3>>0]=HEAP8[$8+3>>0]|0;HEAP8[$vararg_ptr6+4>>0]=HEAP8[$8+4>>0]|0;HEAP8[$vararg_ptr6+5>>0]=HEAP8[$8+5>>0]|0;HEAP8[$vararg_ptr6+6>>0]=HEAP8[$8+6>>0]|0;HEAP8[$vararg_ptr6+7>>0]=HEAP8[$8+7>>0]|0;
+  _mrb_raisef($65,$67,55166,$vararg_buffer3);
+  // unreachable;
+ }
+ $25 = ((($x)) + 4|0);
+ $26 = HEAP32[$25>>2]|0;
+ $27 = ($26|0)==(0);
+ if ($27) {
+  $28 = HEAP32[$x>>2]|0;
+  $29 = ($28|0)!=(0);
+  if ($29) {
+   label = 7;
+  } else {
+   $etype = 58162;
+  }
+ } else {
+  label = 7;
+ }
+ do {
+  if ((label|0) == 7) {
+   $30 = ((($x)) + 4|0);
+   $31 = HEAP32[$30>>2]|0;
+   $32 = ($31|0)==(3);
+   if ($32) {
+    $etype = 55129;
+    break;
+   }
+   $33 = ((($x)) + 4|0);
+   $34 = HEAP32[$33>>2]|0;
+   $35 = ($34|0)==(4);
+   if ($35) {
+    $etype = 56184;
+    break;
+   }
+   $36 = ((($x)) + 4|0);
+   $37 = HEAP32[$36>>2]|0;
+   $38 = ($37>>>0)<(8);
+   $39 = $0;
+   if (!($38)) {
+    ;HEAP32[$x$byval_copy9>>2]=HEAP32[$x>>2]|0;HEAP32[$x$byval_copy9+4>>2]=HEAP32[$x+4>>2]|0;
+    $53 = (_mrb_obj_classname($39,$x$byval_copy9)|0);
+    $etype = $53;
+    break;
+   }
+   ;HEAP32[$x$byval_copy>>2]=HEAP32[$x>>2]|0;HEAP32[$x$byval_copy+4>>2]=HEAP32[$x+4>>2]|0;
+   _mrb_obj_as_string($2,$39,$x$byval_copy);
+   $40 = HEAP32[$2>>2]|0;
+   $41 = HEAP32[$40>>2]|0;
+   $42 = $41 >>> 11;
+   $43 = $42 & 8;
+   $44 = ($43|0)!=(0);
+   $45 = $0;
+   if ($44) {
+    ;HEAP32[$x$byval_copy7>>2]=HEAP32[$x>>2]|0;HEAP32[$x$byval_copy7+4>>2]=HEAP32[$x+4>>2]|0;
+    _mrb_obj_as_string($3,$45,$x$byval_copy7);
+    $46 = HEAP32[$3>>2]|0;
+    $47 = ((($46)) + 12|0);
+    $52 = $47;
+   } else {
+    ;HEAP32[$x$byval_copy8>>2]=HEAP32[$x>>2]|0;HEAP32[$x$byval_copy8+4>>2]=HEAP32[$x+4>>2]|0;
+    _mrb_obj_as_string($4,$45,$x$byval_copy8);
+    $48 = HEAP32[$4>>2]|0;
+    $49 = ((($48)) + 12|0);
+    $50 = ((($49)) + 8|0);
+    $51 = HEAP32[$50>>2]|0;
+    $52 = $51;
+   }
+   $etype = $52;
+  }
+ } while(0);
+ $54 = $0;
+ $55 = $0;
+ $56 = (_mrb_class_get($55,68905)|0);
+ $57 = $0;
+ $58 = $etype;
+ _mrb_str_new_cstr($5,$57,$58);
+ $59 = $0;
+ $60 = $type;
+ $61 = ((($60)) + 4|0);
+ $62 = HEAP32[$61>>2]|0;
+ _mrb_str_new_cstr($6,$59,$62);
+ ;HEAP8[$vararg_buffer>>0]=HEAP8[$5>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$5+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$5+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$5+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$5+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$5+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$5+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$5+7>>0]|0;
+ $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+ ;HEAP8[$vararg_ptr2>>0]=HEAP8[$6>>0]|0;HEAP8[$vararg_ptr2+1>>0]=HEAP8[$6+1>>0]|0;HEAP8[$vararg_ptr2+2>>0]=HEAP8[$6+2>>0]|0;HEAP8[$vararg_ptr2+3>>0]=HEAP8[$6+3>>0]|0;HEAP8[$vararg_ptr2+4>>0]=HEAP8[$6+4>>0]|0;HEAP8[$vararg_ptr2+5>>0]=HEAP8[$6+5>>0]|0;HEAP8[$vararg_ptr2+6>>0]=HEAP8[$6+6>>0]|0;HEAP8[$vararg_ptr2+7>>0]=HEAP8[$6+7>>0]|0;
+ _mrb_raisef($54,$56,67788,$vararg_buffer);
+ // unreachable;
+}
+function _mrb_fixnum_value_213($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 3;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_any_to_s($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cname = 0, $obj$byval_copy = 0;
+ var $str = 0, $str$byval_copy = 0, $str$byval_copy1 = 0, $str$byval_copy2 = 0, $str$byval_copy3 = 0, $str$byval_copy4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy4 = sp + 112|0;
+ $$byval_copy = sp + 104|0;
+ $str$byval_copy3 = sp + 96|0;
+ $str$byval_copy2 = sp + 88|0;
+ $str$byval_copy1 = sp + 80|0;
+ $str$byval_copy = sp + 72|0;
+ $obj$byval_copy = sp + 64|0;
+ $str = sp + 48|0;
+ $1 = sp + 32|0;
+ $2 = sp + 24|0;
+ $3 = sp + 16|0;
+ $4 = sp + 8|0;
+ $5 = sp;
+ $0 = $mrb;
+ $6 = $0;
+ _mrb_str_buf_new($str,$6,20);
+ $7 = $0;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ $8 = (_mrb_obj_classname($7,$obj$byval_copy)|0);
+ $cname = $8;
+ $9 = $0;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_cat($1,$9,$str$byval_copy,55193,2);
+ $10 = $0;
+ $11 = $cname;
+ ;HEAP32[$str$byval_copy1>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy1+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_cat_cstr($2,$10,$str$byval_copy1,$11);
+ $12 = $0;
+ ;HEAP32[$str$byval_copy2>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy2+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_cat($3,$12,$str$byval_copy2,67713,1);
+ $13 = $0;
+ $14 = $0;
+ $15 = HEAP32[$obj>>2]|0;
+ _mrb_ptr_to_str($4,$14,$15);
+ ;HEAP32[$str$byval_copy3>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy3+4>>2]=HEAP32[$str+4>>2]|0;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$4+4>>2]|0;
+ _mrb_str_concat($13,$str$byval_copy3,$$byval_copy);
+ $16 = $0;
+ ;HEAP32[$str$byval_copy4>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy4+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_cat($5,$16,$str$byval_copy4,65241,1);
+ ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_obj_is_kind_of($mrb,$obj,$c) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ $c = $c|0;
+ var $$off = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cl = 0, $obj$byval_copy = 0, $switch = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 16|0;
+ $1 = $mrb;
+ $2 = $c;
+ $3 = $1;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ $4 = (_mrb_class($3,$obj$byval_copy)|0);
+ $cl = $4;
+ $5 = $2;
+ $6 = HEAP32[$5>>2]|0;
+ $7 = $6 & 255;
+ $$off = (($7) + -9)|0;
+ $switch = ($$off>>>0)<(3);
+ if (!($switch)) {
+  $8 = $1;
+  $9 = $1;
+  $10 = (_mrb_class_get($9,68905)|0);
+  _mrb_raise($8,$10,55196);
+  // unreachable;
+ }
+ $11 = $2;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $12 >>> 11;
+ $14 = $13 & 524288;
+ $15 = ($14|0)!=(0);
+ L4: do {
+  if ($15) {
+   $16 = $2;
+   $17 = ((($16)) + 20|0);
+   $18 = HEAP32[$17>>2]|0;
+   $2 = $18;
+   while(1) {
+    $19 = $2;
+    $20 = HEAP32[$19>>2]|0;
+    $21 = $20 >>> 11;
+    $22 = $21 & 1048576;
+    $23 = ($22|0)!=(0);
+    $24 = $23 ^ 1;
+    if (!($24)) {
+     break L4;
+    }
+    $25 = $2;
+    $26 = ((($25)) + 20|0);
+    $27 = HEAP32[$26>>2]|0;
+    $2 = $27;
+   }
+  }
+ } while(0);
+ while(1) {
+  $28 = $cl;
+  $29 = ($28|0)!=(0|0);
+  if (!($29)) {
+   label = 12;
+   break;
+  }
+  $30 = $cl;
+  $31 = $2;
+  $32 = ($30|0)==($31|0);
+  if ($32) {
+   label = 10;
+   break;
+  }
+  $33 = $cl;
+  $34 = ((($33)) + 16|0);
+  $35 = HEAP32[$34>>2]|0;
+  $36 = $2;
+  $37 = ((($36)) + 16|0);
+  $38 = HEAP32[$37>>2]|0;
+  $39 = ($35|0)==($38|0);
+  if ($39) {
+   label = 10;
+   break;
+  }
+  $40 = $cl;
+  $41 = ((($40)) + 20|0);
+  $42 = HEAP32[$41>>2]|0;
+  $cl = $42;
+ }
+ if ((label|0) == 10) {
+  $0 = 1;
+  $43 = $0;
+  STACKTOP = sp;return ($43|0);
+ }
+ else if ((label|0) == 12) {
+  $0 = 0;
+  $43 = $0;
+  STACKTOP = sp;return ($43|0);
+ }
+ return (0)|0;
+}
+function _mrb_class($mrb,$v) {
+ $mrb = $mrb|0;
+ $v = $v|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = ((($v)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ L1: do {
+  switch ($3|0) {
+  case 0:  {
+   $4 = HEAP32[$v>>2]|0;
+   $5 = ($4|0)!=(0);
+   $6 = $1;
+   if ($5) {
+    $7 = ((($6)) + 72|0);
+    $8 = HEAP32[$7>>2]|0;
+    $0 = $8;
+    break L1;
+   } else {
+    $9 = ((($6)) + 76|0);
+    $10 = HEAP32[$9>>2]|0;
+    $0 = $10;
+    break L1;
+   }
+   break;
+  }
+  case 2:  {
+   $11 = $1;
+   $12 = ((($11)) + 68|0);
+   $13 = HEAP32[$12>>2]|0;
+   $0 = $13;
+   break;
+  }
+  case 4:  {
+   $14 = $1;
+   $15 = ((($14)) + 80|0);
+   $16 = HEAP32[$15>>2]|0;
+   $0 = $16;
+   break;
+  }
+  case 3:  {
+   $17 = $1;
+   $18 = ((($17)) + 64|0);
+   $19 = HEAP32[$18>>2]|0;
+   $0 = $19;
+   break;
+  }
+  case 6:  {
+   $20 = $1;
+   $21 = ((($20)) + 60|0);
+   $22 = HEAP32[$21>>2]|0;
+   $0 = $22;
+   break;
+  }
+  case 7:  {
+   $23 = $1;
+   $24 = ((($23)) + 32|0);
+   $25 = HEAP32[$24>>2]|0;
+   $0 = $25;
+   break;
+  }
+  case 20:  {
+   $0 = 0;
+   break;
+  }
+  default: {
+   $26 = HEAP32[$v>>2]|0;
+   $27 = ((($26)) + 4|0);
+   $28 = HEAP32[$27>>2]|0;
+   $0 = $28;
+  }
+  }
+ } while(0);
+ $29 = $0;
+ STACKTOP = sp;return ($29|0);
+}
+function _mrb_to_int($agg$result,$mrb,$val) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $val$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+ _mrb_to_integer($agg$result,$1,$val$byval_copy,55221);
+ STACKTOP = sp;return;
+}
+function _mrb_to_integer($agg$result,$mrb,$val,$method) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $val = $val|0;
+ $method = $method|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, $type = 0, $v = 0, $v$byval_copy = 0, $v$byval_copy5 = 0, $val$byval_copy = 0, $val$byval_copy4 = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr3 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v$byval_copy5 = sp + 104|0;
+ $val$byval_copy4 = sp + 96|0;
+ $v$byval_copy = sp + 88|0;
+ $val$byval_copy = sp + 80|0;
+ $vararg_buffer = sp;
+ $v = sp + 64|0;
+ $2 = sp + 56|0;
+ $type = sp + 48|0;
+ $3 = sp + 40|0;
+ $4 = sp + 32|0;
+ $0 = $mrb;
+ $1 = $method;
+ $5 = ((($val)) + 4|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = ($6|0)==(3);
+ if ($7) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$val>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$val+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $8 = $0;
+ $9 = $1;
+ ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+ _convert_type($2,$8,$val$byval_copy,55060,$9,1);
+ ;HEAP32[$v>>2]=HEAP32[$2>>2]|0;HEAP32[$v+4>>2]=HEAP32[$2+4>>2]|0;
+ $10 = $0;
+ $11 = $0;
+ $12 = ((($11)) + 64|0);
+ $13 = HEAP32[$12>>2]|0;
+ ;HEAP32[$v$byval_copy>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy+4>>2]=HEAP32[$v+4>>2]|0;
+ $14 = (_mrb_obj_is_kind_of($10,$v$byval_copy,$13)|0);
+ $15 = ($14<<24>>24)!=(0);
+ if (!($15)) {
+  $16 = $0;
+  ;HEAP32[$val$byval_copy4>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy4+4>>2]=HEAP32[$val+4>>2]|0;
+  _inspect_type($type,$16,$val$byval_copy4);
+  $17 = $0;
+  $18 = $0;
+  $19 = (_mrb_class_get($18,68905)|0);
+  $20 = $0;
+  $21 = $1;
+  _mrb_str_new_cstr($3,$20,$21);
+  $22 = $0;
+  ;HEAP32[$v$byval_copy5>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy5+4>>2]=HEAP32[$v+4>>2]|0;
+  _inspect_type($4,$22,$v$byval_copy5);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$type>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$type+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$type+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$type+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$type+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$type+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$type+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$type+7>>0]|0;
+  $vararg_ptr1 = ((($vararg_buffer)) + 8|0);
+  ;HEAP8[$vararg_ptr1>>0]=HEAP8[$type>>0]|0;HEAP8[$vararg_ptr1+1>>0]=HEAP8[$type+1>>0]|0;HEAP8[$vararg_ptr1+2>>0]=HEAP8[$type+2>>0]|0;HEAP8[$vararg_ptr1+3>>0]=HEAP8[$type+3>>0]|0;HEAP8[$vararg_ptr1+4>>0]=HEAP8[$type+4>>0]|0;HEAP8[$vararg_ptr1+5>>0]=HEAP8[$type+5>>0]|0;HEAP8[$vararg_ptr1+6>>0]=HEAP8[$type+6>>0]|0;HEAP8[$vararg_ptr1+7>>0]=HEAP8[$type+7>>0]|0;
+  $vararg_ptr2 = ((($vararg_buffer)) + 16|0);
+  ;HEAP8[$vararg_ptr2>>0]=HEAP8[$3>>0]|0;HEAP8[$vararg_ptr2+1>>0]=HEAP8[$3+1>>0]|0;HEAP8[$vararg_ptr2+2>>0]=HEAP8[$3+2>>0]|0;HEAP8[$vararg_ptr2+3>>0]=HEAP8[$3+3>>0]|0;HEAP8[$vararg_ptr2+4>>0]=HEAP8[$3+4>>0]|0;HEAP8[$vararg_ptr2+5>>0]=HEAP8[$3+5>>0]|0;HEAP8[$vararg_ptr2+6>>0]=HEAP8[$3+6>>0]|0;HEAP8[$vararg_ptr2+7>>0]=HEAP8[$3+7>>0]|0;
+  $vararg_ptr3 = ((($vararg_buffer)) + 24|0);
+  ;HEAP8[$vararg_ptr3>>0]=HEAP8[$4>>0]|0;HEAP8[$vararg_ptr3+1>>0]=HEAP8[$4+1>>0]|0;HEAP8[$vararg_ptr3+2>>0]=HEAP8[$4+2>>0]|0;HEAP8[$vararg_ptr3+3>>0]=HEAP8[$4+3>>0]|0;HEAP8[$vararg_ptr3+4>>0]=HEAP8[$4+4>>0]|0;HEAP8[$vararg_ptr3+5>>0]=HEAP8[$4+5>>0]|0;HEAP8[$vararg_ptr3+6>>0]=HEAP8[$4+6>>0]|0;HEAP8[$vararg_ptr3+7>>0]=HEAP8[$4+7>>0]|0;
+  _mrb_raisef($17,$19,55228,$vararg_buffer);
+  // unreachable;
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_convert_to_integer($agg$result,$mrb,$val,$base) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $val = $val|0;
+ $base = $base|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $5 = 0;
+ var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $tmp = 0, $val$byval_copy = 0, $val$byval_copy1 = 0, $val$byval_copy2 = 0, $val$byval_copy3 = 0, $val$byval_copy4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy4 = sp + 64|0;
+ $val$byval_copy3 = sp + 56|0;
+ $val$byval_copy2 = sp + 48|0;
+ $val$byval_copy1 = sp + 40|0;
+ $val$byval_copy = sp + 32|0;
+ $tmp = sp + 16|0;
+ $2 = sp + 8|0;
+ $3 = sp;
+ $0 = $mrb;
+ $1 = $base;
+ $4 = ((($val)) + 4|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ($5|0)==(0);
+ if ($6) {
+  $7 = HEAP32[$val>>2]|0;
+  $8 = ($7|0)!=(0);
+  if (!($8)) {
+   $9 = $1;
+   $10 = ($9|0)!=(0);
+   if ($10) {
+    $35 = $0;
+    $36 = $0;
+    $37 = (_mrb_class_get($36,68855)|0);
+    _mrb_raise($35,$37,55304);
+    // unreachable;
+   } else {
+    $11 = $0;
+    $12 = $0;
+    $13 = (_mrb_class_get($12,68905)|0);
+    _mrb_raise($11,$13,55273);
+    // unreachable;
+   }
+  }
+ }
+ $14 = ((($val)) + 4|0);
+ $15 = HEAP32[$14>>2]|0;
+ switch ($15|0) {
+ case 6:  {
+  label = 6;
+  break;
+ }
+ case 3:  {
+  $23 = $1;
+  $24 = ($23|0)!=(0);
+  if ($24) {
+   $35 = $0;
+   $36 = $0;
+   $37 = (_mrb_class_get($36,68855)|0);
+   _mrb_raise($35,$37,55304);
+   // unreachable;
+  }
+  ;HEAP32[$agg$result>>2]=HEAP32[$val>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$val+4>>2]|0;
+  STACKTOP = sp;return;
+  break;
+ }
+ case 16:  {
+  break;
+ }
+ default: {
+  label = 13;
+ }
+ }
+ do {
+  if ((label|0) == 6) {
+   $16 = $1;
+   $17 = ($16|0)!=(0);
+   if ($17) {
+    $35 = $0;
+    $36 = $0;
+    $37 = (_mrb_class_get($36,68855)|0);
+    _mrb_raise($35,$37,55304);
+    // unreachable;
+   }
+   $18 = +HEAPF32[$val>>2];
+   $19 = $18 <= 2147483648.0;
+   if ($19) {
+    $20 = +HEAPF32[$val>>2];
+    $21 = $20 >= -2147483648.0;
+    if ($21) {
+     label = 13;
+     break;
+    }
+   }
+   $22 = $0;
+   ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+   _mrb_flo_to_fixnum($agg$result,$22,$val$byval_copy);
+   STACKTOP = sp;return;
+  }
+ } while(0);
+ do {
+  if ((label|0) == 13) {
+   $27 = $1;
+   $28 = ($27|0)!=(0);
+   $29 = $0;
+   if ($28) {
+    ;HEAP32[$val$byval_copy2>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy2+4>>2]=HEAP32[$val+4>>2]|0;
+    _mrb_check_string_type($2,$29,$val$byval_copy2);
+    ;HEAP32[$tmp>>2]=HEAP32[$2>>2]|0;HEAP32[$tmp+4>>2]=HEAP32[$2+4>>2]|0;
+    $30 = ((($tmp)) + 4|0);
+    $31 = HEAP32[$30>>2]|0;
+    $32 = ($31|0)==(0);
+    if (!($32)) {
+     break;
+    }
+    $33 = HEAP32[$tmp>>2]|0;
+    $34 = ($33|0)!=(0);
+    if ($34) {
+     break;
+    }
+    $35 = $0;
+    $36 = $0;
+    $37 = (_mrb_class_get($36,68855)|0);
+    _mrb_raise($35,$37,55304);
+    // unreachable;
+   }
+   ;HEAP32[$val$byval_copy3>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy3+4>>2]=HEAP32[$val+4>>2]|0;
+   _convert_type($3,$29,$val$byval_copy3,55060,55221,0);
+   ;HEAP32[$tmp>>2]=HEAP32[$3>>2]|0;HEAP32[$tmp+4>>2]=HEAP32[$3+4>>2]|0;
+   $38 = ((($tmp)) + 4|0);
+   $39 = HEAP32[$38>>2]|0;
+   $40 = ($39|0)==(0);
+   if ($40) {
+    $41 = HEAP32[$tmp>>2]|0;
+    $42 = ($41|0)!=(0);
+    if (!($42)) {
+     $43 = $0;
+     ;HEAP32[$val$byval_copy4>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy4+4>>2]=HEAP32[$val+4>>2]|0;
+     _mrb_to_integer($agg$result,$43,$val$byval_copy4,56116);
+     STACKTOP = sp;return;
+    }
+   }
+   ;HEAP32[$agg$result>>2]=HEAP32[$tmp>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$tmp+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+ } while(0);
+ $25 = $0;
+ $26 = $1;
+ ;HEAP32[$val$byval_copy1>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy1+4>>2]=HEAP32[$val+4>>2]|0;
+ _mrb_str_to_inum($agg$result,$25,$val$byval_copy1,$26,1);
+ STACKTOP = sp;return;
+}
+function _mrb_Integer($agg$result,$mrb,$val) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $val$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+ _mrb_convert_to_integer($agg$result,$1,$val$byval_copy,0);
+ STACKTOP = sp;return;
+}
+function _mrb_eql($mrb,$obj1,$obj2) {
+ $mrb = $mrb|0;
+ $obj1 = $obj1|0;
+ $obj2 = $obj2|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $obj1$byval_copy = 0, $obj1$byval_copy1 = 0, $obj2$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj1$byval_copy1 = sp + 40|0;
+ $obj2$byval_copy = sp + 32|0;
+ $obj1$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $2 = sp + 8|0;
+ $1 = $mrb;
+ $3 = $1;
+ ;HEAP32[$obj1$byval_copy>>2]=HEAP32[$obj1>>2]|0;HEAP32[$obj1$byval_copy+4>>2]=HEAP32[$obj1+4>>2]|0;
+ ;HEAP32[$obj2$byval_copy>>2]=HEAP32[$obj2>>2]|0;HEAP32[$obj2$byval_copy+4>>2]=HEAP32[$obj2+4>>2]|0;
+ $4 = (_mrb_obj_eq($3,$obj1$byval_copy,$obj2$byval_copy)|0);
+ $5 = ($4<<24>>24)!=(0);
+ if ($5) {
+  $0 = 1;
+  $12 = $0;
+  STACKTOP = sp;return ($12|0);
+ } else {
+  $6 = $1;
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$obj2>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$obj2+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$obj2+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$obj2+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$obj2+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$obj2+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$obj2+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$obj2+7>>0]|0;
+  ;HEAP32[$obj1$byval_copy1>>2]=HEAP32[$obj1>>2]|0;HEAP32[$obj1$byval_copy1+4>>2]=HEAP32[$obj1+4>>2]|0;
+  _mrb_funcall($2,$6,$obj1$byval_copy1,68994,1,$vararg_buffer);
+  $7 = ((($2)) + 4|0);
+  $8 = HEAP32[$7>>2]|0;
+  $9 = ($8|0)!=(0);
+  $10 = $9&1;
+  $11 = $10&255;
+  $0 = $11;
+  $12 = $0;
+  STACKTOP = sp;return ($12|0);
+ }
+ return (0)|0;
+}
+function _mrb_p($mrb,$obj) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $obj$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 24|0;
+ $obj$byval_copy = sp + 16|0;
+ $1 = sp;
+ $0 = $mrb;
+ $2 = $0;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ _mrb_inspect($1,$2,$obj$byval_copy);
+ $3 = HEAP32[695]|0;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;
+ _printstr($$byval_copy,$3);
+ STACKTOP = sp;return;
+}
+function _printstr($obj,$stream) {
+ $obj = $obj|0;
+ $stream = $stream|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $stream;
+ $1 = ((($obj)) + 4|0);
+ $2 = HEAP32[$1>>2]|0;
+ $3 = ($2|0)==(16);
+ if (!($3)) {
+  STACKTOP = sp;return;
+ }
+ $4 = HEAP32[$obj>>2]|0;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5 >>> 11;
+ $7 = $6 & 8;
+ $8 = ($7|0)!=(0);
+ $9 = HEAP32[$obj>>2]|0;
+ $10 = ((($9)) + 12|0);
+ if ($8) {
+  $26 = $10;
+ } else {
+  $11 = ((($10)) + 8|0);
+  $12 = HEAP32[$11>>2]|0;
+  $26 = $12;
+ }
+ $13 = HEAP32[$obj>>2]|0;
+ $14 = HEAP32[$13>>2]|0;
+ $15 = $14 >>> 11;
+ $16 = $15 & 8;
+ $17 = ($16|0)!=(0);
+ $18 = HEAP32[$obj>>2]|0;
+ if ($17) {
+  $19 = HEAP32[$18>>2]|0;
+  $20 = $19 >>> 11;
+  $21 = $20 & 496;
+  $22 = $21 >> 4;
+  $27 = $22;
+ } else {
+  $23 = ((($18)) + 12|0);
+  $24 = HEAP32[$23>>2]|0;
+  $27 = $24;
+ }
+ $25 = $0;
+ (_fwrite($26,$27,1,$25)|0);
+ $28 = $0;
+ (_putc(10,$28)|0);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_value_233($agg$result,$p) {
+ $agg$result = $agg$result|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $p;
+ $1 = $0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 & 255;
+ $4 = ((($v)) + 4|0);
+ HEAP32[$4>>2] = $3;
+ $5 = $0;
+ HEAP32[$v>>2] = $5;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_show_version($mrb) {
+ $mrb = $mrb|0;
+ var $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy1 = sp + 32|0;
+ $$byval_copy = sp + 24|0;
+ $1 = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $3 = $0;
+ $4 = $0;
+ $5 = ((($4)) + 32|0);
+ $6 = HEAP32[$5>>2]|0;
+ _mrb_obj_value_233($2,$6);
+ $7 = $0;
+ $8 = (_mrb_intern_static($7,69184,17)|0);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+ _mrb_const_get($1,$3,$$byval_copy,$8);
+ $9 = HEAP32[695]|0;
+ ;HEAP32[$$byval_copy1>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$1+4>>2]|0;
+ _printstr($$byval_copy1,$9);
+ STACKTOP = sp;return;
+}
+function _mrb_show_copyright($mrb) {
+ $mrb = $mrb|0;
+ var $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy1 = sp + 32|0;
+ $$byval_copy = sp + 24|0;
+ $1 = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $3 = $0;
+ $4 = $0;
+ $5 = ((($4)) + 32|0);
+ $6 = HEAP32[$5>>2]|0;
+ _mrb_obj_value_233($2,$6);
+ $7 = $0;
+ $8 = (_mrb_intern_static($7,69251,15)|0);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+ _mrb_const_get($1,$3,$$byval_copy,$8);
+ $9 = HEAP32[695]|0;
+ ;HEAP32[$$byval_copy1>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$1+4>>2]|0;
+ _printstr($$byval_copy1,$9);
+ STACKTOP = sp;return;
+}
+function _mrb_open_core($f,$ud) {
+ $f = $f|0;
+ $ud = $ud|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $mrb = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $f;
+ $2 = $ud;
+ $3 = $1;
+ $4 = $2;
+ $5 = (FUNCTION_TABLE_iiiii[$3 & 255](0,0,592,$4)|0);
+ $mrb = $5;
+ $6 = $mrb;
+ $7 = ($6|0)==(0|0);
+ if ($7) {
+  $0 = 0;
+  $12 = $0;
+  STACKTOP = sp;return ($12|0);
+ } else {
+  $8 = $mrb;
+  $9 = $1;
+  $10 = $2;
+  _mrb_init($8,$9,$10);
+  $11 = $mrb;
+  $0 = $11;
+  $12 = $0;
+  STACKTOP = sp;return ($12|0);
+ }
+ return (0)|0;
+}
+function _mrb_init($mrb,$f,$ud) {
+ $mrb = $mrb|0;
+ $f = $f|0;
+ $ud = $ud|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $f;
+ $2 = $ud;
+ $3 = $0;
+ _memcpy(($3|0),(72448|0),592)|0;
+ $4 = $2;
+ $5 = $0;
+ $6 = ((($5)) + 8|0);
+ HEAP32[$6>>2] = $4;
+ $7 = $1;
+ $8 = $0;
+ $9 = ((($8)) + 4|0);
+ HEAP32[$9>>2] = $7;
+ $10 = $0;
+ $11 = ((($10)) + 588|0);
+ HEAP32[$11>>2] = 0;
+ $12 = $0;
+ $13 = $0;
+ $14 = ((($13)) + 92|0);
+ _mrb_gc_init($12,$14);
+ $15 = $0;
+ $16 = (_mrb_malloc($15,52)|0);
+ $17 = $0;
+ $18 = ((($17)) + 12|0);
+ HEAP32[$18>>2] = $16;
+ $19 = $0;
+ $20 = ((($19)) + 12|0);
+ $21 = HEAP32[$20>>2]|0;
+ dest=$21; src=73040; stop=dest+52|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0));
+ $22 = $0;
+ $23 = ((($22)) + 12|0);
+ $24 = HEAP32[$23>>2]|0;
+ $25 = $0;
+ $26 = ((($25)) + 16|0);
+ HEAP32[$26>>2] = $24;
+ $27 = $0;
+ _mrb_init_core($27);
+ STACKTOP = sp;return;
+}
+function _mrb_default_allocf($mrb,$p,$size,$ud) {
+ $mrb = $mrb|0;
+ $p = $p|0;
+ $size = $size|0;
+ $ud = $ud|0;
+ var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $p;
+ $3 = $size;
+ $4 = $ud;
+ $5 = $3;
+ $6 = ($5|0)==(0);
+ $7 = $2;
+ if ($6) {
+  _free($7);
+  $0 = 0;
+ } else {
+  $8 = $3;
+  $9 = (_realloc($7,$8)|0);
+  $0 = $9;
+ }
+ $10 = $0;
+ STACKTOP = sp;return ($10|0);
+}
+function _mrb_alloca($mrb,$size) {
+ $mrb = $mrb|0;
+ $size = $size|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $size;
+ $2 = $0;
+ $3 = $1;
+ $4 = (8 + ($3))|0;
+ $5 = (_mrb_malloc($2,$4)|0);
+ $p = $5;
+ $6 = $0;
+ $7 = ((($6)) + 88|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = $p;
+ HEAP32[$9>>2] = $8;
+ $10 = $p;
+ $11 = $0;
+ $12 = ((($11)) + 88|0);
+ HEAP32[$12>>2] = $10;
+ $13 = $p;
+ $14 = ((($13)) + 4|0);
+ STACKTOP = sp;return ($14|0);
+}
+function _mrb_open() {
+ var $0 = 0, $1 = 0, $mrb = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = (_mrb_open_allocf(82,0)|0);
+ $mrb = $0;
+ $1 = $mrb;
+ STACKTOP = sp;return ($1|0);
+}
+function _mrb_open_allocf($f,$ud) {
+ $f = $f|0;
+ $ud = $ud|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $mrb = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $f;
+ $2 = $ud;
+ $3 = $1;
+ $4 = $2;
+ $5 = (_mrb_open_core($3,$4)|0);
+ $mrb = $5;
+ $6 = $mrb;
+ $7 = ($6|0)==(0|0);
+ if ($7) {
+  $0 = 0;
+  $11 = $0;
+  STACKTOP = sp;return ($11|0);
+ } else {
+  $8 = $mrb;
+  _mrb_init_mrbgems($8);
+  $9 = $mrb;
+  _mrb_gc_arena_restore($9,0);
+  $10 = $mrb;
+  $0 = $10;
+  $11 = $0;
+  STACKTOP = sp;return ($11|0);
+ }
+ return (0)|0;
+}
+function _mrb_irep_incref($mrb,$irep) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $1;
+ $3 = ((($2)) + 56|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = (($4) + 1)|0;
+ HEAP32[$3>>2] = $5;
+ STACKTOP = sp;return;
+}
+function _mrb_irep_decref($mrb,$irep) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $1;
+ $3 = ((($2)) + 56|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = (($4) + -1)|0;
+ HEAP32[$3>>2] = $5;
+ $6 = $1;
+ $7 = ((($6)) + 56|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ($8|0)==(0);
+ if (!($9)) {
+  STACKTOP = sp;return;
+ }
+ $10 = $0;
+ $11 = $1;
+ _mrb_irep_free($10,$11);
+ STACKTOP = sp;return;
+}
+function _mrb_irep_free($mrb,$irep) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
+ var $81 = 0, $82 = 0, $83 = 0, $9 = 0, $i = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $1;
+ $3 = ((($2)) + 4|0);
+ $4 = HEAP8[$3>>0]|0;
+ $5 = $4&255;
+ $6 = $5 & 1;
+ $7 = ($6|0)!=(0);
+ if (!($7)) {
+  $8 = $0;
+  $9 = $1;
+  $10 = ((($9)) + 8|0);
+  $11 = HEAP32[$10>>2]|0;
+  _mrb_free($8,$11);
+ }
+ $i = 0;
+ while(1) {
+  $12 = $i;
+  $13 = $1;
+  $14 = ((($13)) + 44|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = ($12>>>0)<($15>>>0);
+  if (!($16)) {
+   break;
+  }
+  $17 = $i;
+  $18 = $1;
+  $19 = ((($18)) + 12|0);
+  $20 = HEAP32[$19>>2]|0;
+  $21 = (($20) + ($17<<3)|0);
+  $22 = ((($21)) + 4|0);
+  $23 = HEAP32[$22>>2]|0;
+  $24 = ($23|0)==(16);
+  if ($24) {
+   $25 = $0;
+   $26 = $i;
+   $27 = $1;
+   $28 = ((($27)) + 12|0);
+   $29 = HEAP32[$28>>2]|0;
+   $30 = (($29) + ($26<<3)|0);
+   $31 = HEAP32[$30>>2]|0;
+   _mrb_gc_free_str($25,$31);
+   $32 = $0;
+   $33 = $i;
+   $34 = $1;
+   $35 = ((($34)) + 12|0);
+   $36 = HEAP32[$35>>2]|0;
+   $37 = (($36) + ($33<<3)|0);
+   $38 = HEAP32[$37>>2]|0;
+   _mrb_free($32,$38);
+  }
+  $39 = $i;
+  $40 = (($39) + 1)|0;
+  $i = $40;
+ }
+ $41 = $0;
+ $42 = $1;
+ $43 = ((($42)) + 12|0);
+ $44 = HEAP32[$43>>2]|0;
+ _mrb_free($41,$44);
+ $45 = $0;
+ $46 = $1;
+ $47 = ((($46)) + 16|0);
+ $48 = HEAP32[$47>>2]|0;
+ _mrb_free($45,$48);
+ $i = 0;
+ while(1) {
+  $49 = $i;
+  $50 = $1;
+  $51 = ((($50)) + 52|0);
+  $52 = HEAP32[$51>>2]|0;
+  $53 = ($49>>>0)<($52>>>0);
+  $54 = $0;
+  if (!($53)) {
+   break;
+  }
+  $55 = $i;
+  $56 = $1;
+  $57 = ((($56)) + 20|0);
+  $58 = HEAP32[$57>>2]|0;
+  $59 = (($58) + ($55<<2)|0);
+  $60 = HEAP32[$59>>2]|0;
+  _mrb_irep_decref($54,$60);
+  $61 = $i;
+  $62 = (($61) + 1)|0;
+  $i = $62;
+ }
+ $63 = $1;
+ $64 = ((($63)) + 20|0);
+ $65 = HEAP32[$64>>2]|0;
+ _mrb_free($54,$65);
+ $66 = $0;
+ $67 = $1;
+ $68 = ((($67)) + 24|0);
+ $69 = HEAP32[$68>>2]|0;
+ _mrb_free($66,$69);
+ $70 = $0;
+ $71 = $1;
+ $72 = ((($71)) + 28|0);
+ $73 = HEAP32[$72>>2]|0;
+ _mrb_free($70,$73);
+ $74 = $0;
+ $75 = $1;
+ $76 = ((($75)) + 32|0);
+ $77 = HEAP32[$76>>2]|0;
+ _mrb_free($74,$77);
+ $78 = $0;
+ $79 = $1;
+ $80 = ((($79)) + 36|0);
+ $81 = HEAP32[$80>>2]|0;
+ _mrb_debug_info_free($78,$81);
+ $82 = $0;
+ $83 = $1;
+ _mrb_free($82,$83);
+ STACKTOP = sp;return;
+}
+function _mrb_str_pool($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0;
+ var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0;
+ var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0;
+ var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0;
+ var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0;
+ var $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $len = 0, $ns = 0, $ptr = 0, $s = 0, $tmp_n = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$str>>2]|0;
+ $s = $1;
+ $2 = $0;
+ $3 = (_mrb_malloc($2,24)|0);
+ $ns = $3;
+ $4 = $ns;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5 & -256;
+ $7 = $6 | 16;
+ HEAP32[$4>>2] = $7;
+ $8 = $0;
+ $9 = ((($8)) + 48|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = $ns;
+ $12 = ((($11)) + 4|0);
+ HEAP32[$12>>2] = $10;
+ $13 = $s;
+ $14 = HEAP32[$13>>2]|0;
+ $15 = $14 >>> 11;
+ $16 = $15 & 2;
+ $17 = ($16|0)!=(0);
+ $18 = $ns;
+ $19 = HEAP32[$18>>2]|0;
+ $20 = $19 & 2047;
+ if ($17) {
+  $21 = $20 | 4096;
+  HEAP32[$18>>2] = $21;
+  $22 = $s;
+  $23 = ((($22)) + 12|0);
+  $24 = ((($23)) + 8|0);
+  $25 = HEAP32[$24>>2]|0;
+  $26 = $ns;
+  $27 = ((($26)) + 12|0);
+  $28 = ((($27)) + 8|0);
+  HEAP32[$28>>2] = $25;
+  $29 = $s;
+  $30 = ((($29)) + 12|0);
+  $31 = HEAP32[$30>>2]|0;
+  $32 = $ns;
+  $33 = ((($32)) + 12|0);
+  HEAP32[$33>>2] = $31;
+  $34 = $ns;
+  $35 = ((($34)) + 12|0);
+  $36 = ((($35)) + 4|0);
+  HEAP32[$36>>2] = 0;
+  $124 = $ns;
+  _mrb_obj_value_245($agg$result,$124);
+  STACKTOP = sp;return;
+ }
+ HEAP32[$18>>2] = $20;
+ $37 = $s;
+ $38 = HEAP32[$37>>2]|0;
+ $39 = $38 >>> 11;
+ $40 = $39 & 8;
+ $41 = ($40|0)!=(0);
+ $42 = $s;
+ $43 = ((($42)) + 12|0);
+ if ($41) {
+  $ptr = $43;
+  $44 = $s;
+  $45 = HEAP32[$44>>2]|0;
+  $46 = $45 >>> 11;
+  $47 = $46 & 496;
+  $48 = $47 >> 4;
+  $len = $48;
+ } else {
+  $49 = ((($43)) + 8|0);
+  $50 = HEAP32[$49>>2]|0;
+  $ptr = $50;
+  $51 = $s;
+  $52 = ((($51)) + 12|0);
+  $53 = HEAP32[$52>>2]|0;
+  $len = $53;
+ }
+ $54 = $len;
+ $55 = ($54|0)<(11);
+ if ($55) {
+  $56 = $ns;
+  $57 = HEAP32[$56>>2]|0;
+  $58 = $57 >>> 11;
+  $59 = $58 | 8;
+  $60 = HEAP32[$56>>2]|0;
+  $61 = $59 & 2097151;
+  $62 = $61 << 11;
+  $63 = $60 & 2047;
+  $64 = $63 | $62;
+  HEAP32[$56>>2] = $64;
+  $65 = $len;
+  $tmp_n = $65;
+  $66 = $ns;
+  $67 = HEAP32[$66>>2]|0;
+  $68 = $67 >>> 11;
+  $69 = $68 & -497;
+  $70 = HEAP32[$66>>2]|0;
+  $71 = $69 & 2097151;
+  $72 = $71 << 11;
+  $73 = $70 & 2047;
+  $74 = $73 | $72;
+  HEAP32[$66>>2] = $74;
+  $75 = $tmp_n;
+  $76 = $75 << 4;
+  $77 = $ns;
+  $78 = HEAP32[$77>>2]|0;
+  $79 = $78 >>> 11;
+  $80 = $79 | $76;
+  $81 = HEAP32[$77>>2]|0;
+  $82 = $80 & 2097151;
+  $83 = $82 << 11;
+  $84 = $81 & 2047;
+  $85 = $84 | $83;
+  HEAP32[$77>>2] = $85;
+  $86 = $ptr;
+  $87 = ($86|0)!=(0|0);
+  if ($87) {
+   $88 = $ns;
+   $89 = ((($88)) + 12|0);
+   $90 = $ptr;
+   $91 = $len;
+   _memcpy(($89|0),($90|0),($91|0))|0;
+  }
+  $92 = $len;
+  $93 = $ns;
+  $94 = ((($93)) + 12|0);
+  $95 = (($94) + ($92)|0);
+  HEAP8[$95>>0] = 0;
+  $124 = $ns;
+  _mrb_obj_value_245($agg$result,$124);
+  STACKTOP = sp;return;
+ } else {
+  $96 = $0;
+  $97 = $len;
+  $98 = (($97) + 1)|0;
+  $99 = (_mrb_malloc($96,$98)|0);
+  $100 = $ns;
+  $101 = ((($100)) + 12|0);
+  $102 = ((($101)) + 8|0);
+  HEAP32[$102>>2] = $99;
+  $103 = $len;
+  $104 = $ns;
+  $105 = ((($104)) + 12|0);
+  HEAP32[$105>>2] = $103;
+  $106 = $len;
+  $107 = $ns;
+  $108 = ((($107)) + 12|0);
+  $109 = ((($108)) + 4|0);
+  HEAP32[$109>>2] = $106;
+  $110 = $ptr;
+  $111 = ($110|0)!=(0|0);
+  if ($111) {
+   $112 = $ns;
+   $113 = ((($112)) + 12|0);
+   $114 = ((($113)) + 8|0);
+   $115 = HEAP32[$114>>2]|0;
+   $116 = $ptr;
+   $117 = $len;
+   _memcpy(($115|0),($116|0),($117|0))|0;
+  }
+  $118 = $len;
+  $119 = $ns;
+  $120 = ((($119)) + 12|0);
+  $121 = ((($120)) + 8|0);
+  $122 = HEAP32[$121>>2]|0;
+  $123 = (($122) + ($118)|0);
+  HEAP8[$123>>0] = 0;
+  $124 = $ns;
+  _mrb_obj_value_245($agg$result,$124);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_obj_value_245($agg$result,$p) {
+ $agg$result = $agg$result|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $p;
+ $1 = $0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 & 255;
+ $4 = ((($v)) + 4|0);
+ HEAP32[$4>>2] = $3;
+ $5 = $0;
+ HEAP32[$v>>2] = $5;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_free_context($mrb,$c) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $1;
+ $3 = ($2|0)!=(0|0);
+ if (!($3)) {
+  STACKTOP = sp;return;
+ }
+ $4 = $0;
+ $5 = $1;
+ $6 = ((($5)) + 8|0);
+ $7 = HEAP32[$6>>2]|0;
+ _mrb_free($4,$7);
+ $8 = $0;
+ $9 = $1;
+ $10 = ((($9)) + 20|0);
+ $11 = HEAP32[$10>>2]|0;
+ _mrb_free($8,$11);
+ $12 = $0;
+ $13 = $1;
+ $14 = ((($13)) + 28|0);
+ $15 = HEAP32[$14>>2]|0;
+ _mrb_free($12,$15);
+ $16 = $0;
+ $17 = $1;
+ $18 = ((($17)) + 36|0);
+ $19 = HEAP32[$18>>2]|0;
+ _mrb_free($16,$19);
+ $20 = $0;
+ $21 = $1;
+ _mrb_free($20,$21);
+ STACKTOP = sp;return;
+}
+function _mrb_close($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = ($1|0)!=(0|0);
+ if (!($2)) {
+  STACKTOP = sp;return;
+ }
+ $3 = $0;
+ $4 = ((($3)) + 588|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ($5|0)>(0);
+ if ($6) {
+  $7 = $0;
+  $8 = ((($7)) + 588|0);
+  $9 = HEAP32[$8>>2]|0;
+  $i = $9;
+  while(1) {
+   $10 = $i;
+   $11 = ($10|0)>(0);
+   if (!($11)) {
+    break;
+   }
+   $12 = $i;
+   $13 = (($12) - 1)|0;
+   $14 = $0;
+   $15 = ((($14)) + 584|0);
+   $16 = HEAP32[$15>>2]|0;
+   $17 = (($16) + ($13<<2)|0);
+   $18 = HEAP32[$17>>2]|0;
+   $19 = $0;
+   FUNCTION_TABLE_vi[$18 & 511]($19);
+   $20 = $i;
+   $21 = (($20) + -1)|0;
+   $i = $21;
+  }
+  $22 = $0;
+  $23 = $0;
+  $24 = ((($23)) + 584|0);
+  $25 = HEAP32[$24>>2]|0;
+  _mrb_free($22,$25);
+ }
+ $26 = $0;
+ _mrb_gc_free_gv($26);
+ $27 = $0;
+ $28 = $0;
+ $29 = ((($28)) + 16|0);
+ $30 = HEAP32[$29>>2]|0;
+ _mrb_free_context($27,$30);
+ $31 = $0;
+ _mrb_free_symtbl($31);
+ $32 = $0;
+ _mrb_alloca_free($32);
+ $33 = $0;
+ $34 = $0;
+ $35 = ((($34)) + 92|0);
+ _mrb_gc_destroy($33,$35);
+ $36 = $0;
+ $37 = $0;
+ _mrb_free($36,$37);
+ STACKTOP = sp;return;
+}
+function _mrb_alloca_free($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $p = 0, $tmp = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = ($1|0)==(0|0);
+ if ($2) {
+  STACKTOP = sp;return;
+ }
+ $3 = $0;
+ $4 = ((($3)) + 88|0);
+ $5 = HEAP32[$4>>2]|0;
+ $p = $5;
+ while(1) {
+  $6 = $p;
+  $7 = ($6|0)!=(0|0);
+  if (!($7)) {
+   break;
+  }
+  $8 = $p;
+  $tmp = $8;
+  $9 = $p;
+  $10 = HEAP32[$9>>2]|0;
+  $p = $10;
+  $11 = $0;
+  $12 = $tmp;
+  _mrb_free($11,$12);
+ }
+ STACKTOP = sp;return;
+}
+function _mrb_add_irep($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $irep = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = (_mrb_malloc($1,60)|0);
+ $irep = $2;
+ $3 = $irep;
+ dest=$3; src=73092; stop=dest+60|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0));
+ $4 = $irep;
+ $5 = ((($4)) + 56|0);
+ HEAP32[$5>>2] = 1;
+ $6 = $irep;
+ STACKTOP = sp;return ($6|0);
+}
+function _mrb_top_self($agg$result,$mrb) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = ((($1)) + 28|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)!=(0|0);
+ if ($4) {
+  $20 = $0;
+  $21 = ((($20)) + 28|0);
+  $22 = HEAP32[$21>>2]|0;
+  _mrb_obj_value_245($agg$result,$22);
+  STACKTOP = sp;return;
+ }
+ $5 = $0;
+ $6 = $0;
+ $7 = ((($6)) + 32|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = (_mrb_obj_alloc($5,8,$8)|0);
+ $10 = $0;
+ $11 = ((($10)) + 28|0);
+ HEAP32[$11>>2] = $9;
+ $12 = $0;
+ $13 = $0;
+ $14 = ((($13)) + 28|0);
+ $15 = HEAP32[$14>>2]|0;
+ _mrb_define_singleton_method($12,$15,68986,83,0);
+ $16 = $0;
+ $17 = $0;
+ $18 = ((($17)) + 28|0);
+ $19 = HEAP32[$18>>2]|0;
+ _mrb_define_singleton_method($16,$19,68977,83,0);
+ $20 = $0;
+ $21 = ((($20)) + 28|0);
+ $22 = HEAP32[$21>>2]|0;
+ _mrb_obj_value_245($agg$result,$22);
+ STACKTOP = sp;return;
+}
+function _inspect_main($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ _mrb_str_new_static($agg$result,$1,55340,4);
+ STACKTOP = sp;return;
+}
+function _mrb_str_buf_new($agg$result,$mrb,$capa) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $capa = $capa|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $s = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $capa;
+ $2 = $0;
+ $3 = $0;
+ $4 = ((($3)) + 48|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = (_mrb_obj_alloc($2,16,$5)|0);
+ $s = $6;
+ $7 = $1;
+ $8 = ($7>>>0)>=(2147483647);
+ if ($8) {
+  $9 = $0;
+  $10 = $0;
+  $11 = (_mrb_class_get($10,68855)|0);
+  _mrb_raise($9,$11,55382);
+  // unreachable;
+ }
+ $12 = $1;
+ $13 = ($12>>>0)<(20);
+ if ($13) {
+  $1 = 20;
+ }
+ $14 = $s;
+ $15 = ((($14)) + 12|0);
+ HEAP32[$15>>2] = 0;
+ $16 = $1;
+ $17 = $s;
+ $18 = ((($17)) + 12|0);
+ $19 = ((($18)) + 4|0);
+ HEAP32[$19>>2] = $16;
+ $20 = $0;
+ $21 = $1;
+ $22 = (($21) + 1)|0;
+ $23 = (_mrb_malloc($20,$22)|0);
+ $24 = $s;
+ $25 = ((($24)) + 12|0);
+ $26 = ((($25)) + 8|0);
+ HEAP32[$26>>2] = $23;
+ $27 = $s;
+ $28 = HEAP32[$27>>2]|0;
+ $29 = $28 >>> 11;
+ $30 = $29 & 8;
+ $31 = ($30|0)!=(0);
+ $32 = $s;
+ $33 = ((($32)) + 12|0);
+ if ($31) {
+  $36 = $33;
+  HEAP8[$36>>0] = 0;
+  $37 = $s;
+  _mrb_obj_value_259($agg$result,$37);
+  STACKTOP = sp;return;
+ } else {
+  $34 = ((($33)) + 8|0);
+  $35 = HEAP32[$34>>2]|0;
+  $36 = $35;
+  HEAP8[$36>>0] = 0;
+  $37 = $s;
+  _mrb_obj_value_259($agg$result,$37);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_obj_value_259($agg$result,$p) {
+ $agg$result = $agg$result|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $p;
+ $1 = $0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 & 255;
+ $4 = ((($v)) + 4|0);
+ HEAP32[$4>>2] = $3;
+ $5 = $0;
+ HEAP32[$v>>2] = $5;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_str_new($agg$result,$mrb,$p,$len) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $p = $p|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $p;
+ $2 = $len;
+ $3 = $0;
+ $4 = $1;
+ $5 = $2;
+ $6 = (_str_new($3,$4,$5)|0);
+ _mrb_obj_value_259($agg$result,$6);
+ STACKTOP = sp;return;
+}
+function _str_new($mrb,$p,$len) {
+ $mrb = $mrb|0;
+ $p = $p|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
+ var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $9 = 0, $s = 0, $tmp_n = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $p;
+ $3 = $len;
+ $4 = $1;
+ $5 = $1;
+ $6 = ((($5)) + 48|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = (_mrb_obj_alloc($4,16,$7)|0);
+ $s = $8;
+ $9 = $3;
+ $10 = ($9>>>0)<(11);
+ if ($10) {
+  $11 = $s;
+  $12 = HEAP32[$11>>2]|0;
+  $13 = $12 >>> 11;
+  $14 = $13 | 8;
+  $15 = HEAP32[$11>>2]|0;
+  $16 = $14 & 2097151;
+  $17 = $16 << 11;
+  $18 = $15 & 2047;
+  $19 = $18 | $17;
+  HEAP32[$11>>2] = $19;
+  $20 = $3;
+  $tmp_n = $20;
+  $21 = $s;
+  $22 = HEAP32[$21>>2]|0;
+  $23 = $22 >>> 11;
+  $24 = $23 & -497;
+  $25 = HEAP32[$21>>2]|0;
+  $26 = $24 & 2097151;
+  $27 = $26 << 11;
+  $28 = $25 & 2047;
+  $29 = $28 | $27;
+  HEAP32[$21>>2] = $29;
+  $30 = $tmp_n;
+  $31 = $30 << 4;
+  $32 = $s;
+  $33 = HEAP32[$32>>2]|0;
+  $34 = $33 >>> 11;
+  $35 = $34 | $31;
+  $36 = HEAP32[$32>>2]|0;
+  $37 = $35 & 2097151;
+  $38 = $37 << 11;
+  $39 = $36 & 2047;
+  $40 = $39 | $38;
+  HEAP32[$32>>2] = $40;
+  $41 = $2;
+  $42 = ($41|0)!=(0|0);
+  if ($42) {
+   $43 = $s;
+   $44 = ((($43)) + 12|0);
+   $45 = $2;
+   $46 = $3;
+   _memcpy(($44|0),($45|0),($46|0))|0;
+  }
+ } else {
+  $47 = $3;
+  $48 = ($47>>>0)>=(2147483647);
+  if ($48) {
+   $49 = $1;
+   $50 = $1;
+   $51 = (_mrb_class_get($50,68855)|0);
+   _mrb_raise($49,$51,55411);
+   // unreachable;
+  }
+  $52 = $3;
+  $53 = $s;
+  $54 = ((($53)) + 12|0);
+  HEAP32[$54>>2] = $52;
+  $55 = $3;
+  $56 = $s;
+  $57 = ((($56)) + 12|0);
+  $58 = ((($57)) + 4|0);
+  HEAP32[$58>>2] = $55;
+  $59 = $1;
+  $60 = $3;
+  $61 = (($60) + 1)|0;
+  $62 = (_mrb_malloc($59,$61)|0);
+  $63 = $s;
+  $64 = ((($63)) + 12|0);
+  $65 = ((($64)) + 8|0);
+  HEAP32[$65>>2] = $62;
+  $66 = $2;
+  $67 = ($66|0)!=(0|0);
+  if ($67) {
+   $68 = $s;
+   $69 = ((($68)) + 12|0);
+   $70 = ((($69)) + 8|0);
+   $71 = HEAP32[$70>>2]|0;
+   $72 = $2;
+   $73 = $3;
+   _memcpy(($71|0),($72|0),($73|0))|0;
+  }
+ }
+ $74 = $3;
+ $75 = $s;
+ $76 = HEAP32[$75>>2]|0;
+ $77 = $76 >>> 11;
+ $78 = $77 & 8;
+ $79 = ($78|0)!=(0);
+ $80 = $s;
+ $81 = ((($80)) + 12|0);
+ if ($79) {
+  $85 = $81;
+  $84 = (($85) + ($74)|0);
+  HEAP8[$84>>0] = 0;
+  $86 = $s;
+  $0 = $86;
+  $87 = $0;
+  STACKTOP = sp;return ($87|0);
+ } else {
+  $82 = ((($81)) + 8|0);
+  $83 = HEAP32[$82>>2]|0;
+  $85 = $83;
+  $84 = (($85) + ($74)|0);
+  HEAP8[$84>>0] = 0;
+  $86 = $s;
+  $0 = $86;
+  $87 = $0;
+  STACKTOP = sp;return ($87|0);
+ }
+ return (0)|0;
+}
+function _str_new_static($mrb,$p,$len) {
+ $mrb = $mrb|0;
+ $p = $p|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0;
+ var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $s = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $p;
+ $2 = $len;
+ $3 = $2;
+ $4 = ($3>>>0)>=(2147483647);
+ $5 = $0;
+ $6 = $0;
+ if ($4) {
+  $7 = (_mrb_class_get($6,68855)|0);
+  _mrb_raise($5,$7,55411);
+  // unreachable;
+ } else {
+  $8 = ((($6)) + 48|0);
+  $9 = HEAP32[$8>>2]|0;
+  $10 = (_mrb_obj_alloc($5,16,$9)|0);
+  $s = $10;
+  $11 = $2;
+  $12 = $s;
+  $13 = ((($12)) + 12|0);
+  HEAP32[$13>>2] = $11;
+  $14 = $s;
+  $15 = ((($14)) + 12|0);
+  $16 = ((($15)) + 4|0);
+  HEAP32[$16>>2] = 0;
+  $17 = $1;
+  $18 = $s;
+  $19 = ((($18)) + 12|0);
+  $20 = ((($19)) + 8|0);
+  HEAP32[$20>>2] = $17;
+  $21 = $s;
+  $22 = HEAP32[$21>>2]|0;
+  $23 = $22 & 2047;
+  $24 = $23 | 4096;
+  HEAP32[$21>>2] = $24;
+  $25 = $s;
+  STACKTOP = sp;return ($25|0);
+ }
+ return (0)|0;
+}
+function _mrb_str_new_cstr($agg$result,$mrb,$p) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $len = 0, $s = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $p;
+ $2 = $1;
+ $3 = ($2|0)!=(0|0);
+ if ($3) {
+  $4 = $1;
+  $5 = (_strlen($4)|0);
+  $len = $5;
+ } else {
+  $len = 0;
+ }
+ $6 = $0;
+ $7 = $1;
+ $8 = $len;
+ $9 = (_str_new($6,$7,$8)|0);
+ $s = $9;
+ $10 = $s;
+ _mrb_obj_value_259($agg$result,$10);
+ STACKTOP = sp;return;
+}
+function _mrb_str_new_static($agg$result,$mrb,$p,$len) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $p = $p|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $s = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $p;
+ $2 = $len;
+ $3 = $0;
+ $4 = $1;
+ $5 = $2;
+ $6 = (_str_new_static($3,$4,$5)|0);
+ $s = $6;
+ $7 = $s;
+ _mrb_obj_value_259($agg$result,$7);
+ STACKTOP = sp;return;
+}
+function _mrb_gc_free_str($mrb,$str) {
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $str;
+ $2 = $1;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $4 & 8;
+ $6 = ($5|0)!=(0);
+ if ($6) {
+  STACKTOP = sp;return;
+ }
+ $7 = $1;
+ $8 = HEAP32[$7>>2]|0;
+ $9 = $8 >>> 11;
+ $10 = $9 & 1;
+ $11 = ($10|0)!=(0);
+ if ($11) {
+  $12 = $0;
+  $13 = $1;
+  $14 = ((($13)) + 12|0);
+  $15 = ((($14)) + 4|0);
+  $16 = HEAP32[$15>>2]|0;
+  _str_decref($12,$16);
+  STACKTOP = sp;return;
+ }
+ $17 = $1;
+ $18 = HEAP32[$17>>2]|0;
+ $19 = $18 >>> 11;
+ $20 = $19 & 2;
+ $21 = ($20|0)!=(0);
+ if ($21) {
+  STACKTOP = sp;return;
+ }
+ $22 = $0;
+ $23 = $1;
+ $24 = ((($23)) + 12|0);
+ $25 = ((($24)) + 8|0);
+ $26 = HEAP32[$25>>2]|0;
+ _mrb_free($22,$26);
+ STACKTOP = sp;return;
+}
+function _str_decref($mrb,$shared) {
+ $mrb = $mrb|0;
+ $shared = $shared|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $shared;
+ $2 = $1;
+ $3 = ((($2)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = (($4) + -1)|0;
+ HEAP32[$3>>2] = $5;
+ $6 = $1;
+ $7 = ((($6)) + 4|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ($8|0)==(0);
+ if (!($9)) {
+  STACKTOP = sp;return;
+ }
+ $10 = $1;
+ $11 = HEAP8[$10>>0]|0;
+ $12 = $11 & 1;
+ $13 = ($12<<24>>24)!=(0);
+ if (!($13)) {
+  $14 = $0;
+  $15 = $1;
+  $16 = ((($15)) + 8|0);
+  $17 = HEAP32[$16>>2]|0;
+  _mrb_free($14,$17);
+ }
+ $18 = $0;
+ $19 = $1;
+ _mrb_free($18,$19);
+ STACKTOP = sp;return;
+}
+function _mrb_str_strlen($mrb,$s) {
+ $mrb = $mrb|0;
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $5 = 0;
+ var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $max = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $s;
+ $3 = $2;
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $4 >>> 11;
+ $6 = $5 & 8;
+ $7 = ($6|0)!=(0);
+ $8 = $2;
+ if ($7) {
+  $9 = HEAP32[$8>>2]|0;
+  $10 = $9 >>> 11;
+  $11 = $10 & 496;
+  $12 = $11 >> 4;
+  $15 = $12;
+ } else {
+  $13 = ((($8)) + 12|0);
+  $14 = HEAP32[$13>>2]|0;
+  $15 = $14;
+ }
+ $max = $15;
+ $16 = $2;
+ $17 = HEAP32[$16>>2]|0;
+ $18 = $17 >>> 11;
+ $19 = $18 & 8;
+ $20 = ($19|0)!=(0);
+ $21 = $2;
+ $22 = ((($21)) + 12|0);
+ if ($20) {
+  $25 = $22;
+ } else {
+  $23 = ((($22)) + 8|0);
+  $24 = HEAP32[$23>>2]|0;
+  $25 = $24;
+ }
+ $p = $25;
+ $26 = $p;
+ $27 = ($26|0)!=(0|0);
+ if (!($27)) {
+  $0 = 0;
+  $43 = $0;
+  STACKTOP = sp;return ($43|0);
+ }
+ $i = 0;
+ while(1) {
+  $28 = $i;
+  $29 = $max;
+  $30 = ($28|0)<($29|0);
+  if (!($30)) {
+   break;
+  }
+  $31 = $i;
+  $32 = $p;
+  $33 = (($32) + ($31)|0);
+  $34 = HEAP8[$33>>0]|0;
+  $35 = $34 << 24 >> 24;
+  $36 = ($35|0)==(0);
+  if ($36) {
+   label = 12;
+   break;
+  }
+  $40 = $i;
+  $41 = (($40) + 1)|0;
+  $i = $41;
+ }
+ if ((label|0) == 12) {
+  $37 = $1;
+  $38 = $1;
+  $39 = (_mrb_class_get($38,68855)|0);
+  _mrb_raise($37,$39,55431);
+  // unreachable;
+ }
+ $42 = $max;
+ $0 = $42;
+ $43 = $0;
+ STACKTOP = sp;return ($43|0);
+}
+function _mrb_str_modify($mrb,$s) {
+ $mrb = $mrb|0;
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0;
+ var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0;
+ var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0;
+ var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0;
+ var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $len = 0;
+ var $p = 0, $p1 = 0, $ptr = 0, $shared = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $s;
+ $2 = $0;
+ $3 = $1;
+ _check_frozen($2,$3);
+ $4 = $1;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5 >>> 11;
+ $7 = $6 & 1;
+ $8 = ($7|0)!=(0);
+ $9 = $1;
+ if (!($8)) {
+  $97 = HEAP32[$9>>2]|0;
+  $98 = $97 >>> 11;
+  $99 = $98 & 2;
+  $100 = ($99|0)!=(0);
+  if (!($100)) {
+   STACKTOP = sp;return;
+  }
+  $101 = $1;
+  $102 = ((($101)) + 12|0);
+  $103 = ((($102)) + 8|0);
+  $104 = HEAP32[$103>>2]|0;
+  $p1 = $104;
+  $105 = $0;
+  $106 = $1;
+  $107 = ((($106)) + 12|0);
+  $108 = HEAP32[$107>>2]|0;
+  $109 = (($108) + 1)|0;
+  $110 = (_mrb_malloc($105,$109)|0);
+  $111 = $1;
+  $112 = ((($111)) + 12|0);
+  $113 = ((($112)) + 8|0);
+  HEAP32[$113>>2] = $110;
+  $114 = $p1;
+  $115 = ($114|0)!=(0|0);
+  if ($115) {
+   $116 = $1;
+   $117 = HEAP32[$116>>2]|0;
+   $118 = $117 >>> 11;
+   $119 = $118 & 8;
+   $120 = ($119|0)!=(0);
+   $121 = $1;
+   $122 = ((($121)) + 12|0);
+   if ($120) {
+    $129 = $122;
+   } else {
+    $123 = ((($122)) + 8|0);
+    $124 = HEAP32[$123>>2]|0;
+    $129 = $124;
+   }
+   $125 = $p1;
+   $126 = $1;
+   $127 = ((($126)) + 12|0);
+   $128 = HEAP32[$127>>2]|0;
+   _memcpy(($129|0),($125|0),($128|0))|0;
+  }
+  $130 = $1;
+  $131 = ((($130)) + 12|0);
+  $132 = HEAP32[$131>>2]|0;
+  $133 = $1;
+  $134 = HEAP32[$133>>2]|0;
+  $135 = $134 >>> 11;
+  $136 = $135 & 8;
+  $137 = ($136|0)!=(0);
+  $138 = $1;
+  $139 = ((($138)) + 12|0);
+  if ($137) {
+   $143 = $139;
+  } else {
+   $140 = ((($139)) + 8|0);
+   $141 = HEAP32[$140>>2]|0;
+   $143 = $141;
+  }
+  $142 = (($143) + ($132)|0);
+  HEAP8[$142>>0] = 0;
+  $144 = $1;
+  $145 = ((($144)) + 12|0);
+  $146 = HEAP32[$145>>2]|0;
+  $147 = $1;
+  $148 = ((($147)) + 12|0);
+  $149 = ((($148)) + 4|0);
+  HEAP32[$149>>2] = $146;
+  $150 = $1;
+  $151 = HEAP32[$150>>2]|0;
+  $152 = $151 >>> 11;
+  $153 = $152 & -3;
+  $154 = HEAP32[$150>>2]|0;
+  $155 = $153 & 2097151;
+  $156 = $155 << 11;
+  $157 = $154 & 2047;
+  $158 = $157 | $156;
+  HEAP32[$150>>2] = $158;
+  STACKTOP = sp;return;
+ }
+ $10 = ((($9)) + 12|0);
+ $11 = ((($10)) + 4|0);
+ $12 = HEAP32[$11>>2]|0;
+ $shared = $12;
+ $13 = $shared;
+ $14 = ((($13)) + 4|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = ($15|0)==(1);
+ if ($16) {
+  $17 = $1;
+  $18 = ((($17)) + 12|0);
+  $19 = ((($18)) + 8|0);
+  $20 = HEAP32[$19>>2]|0;
+  $21 = $shared;
+  $22 = ((($21)) + 8|0);
+  $23 = HEAP32[$22>>2]|0;
+  $24 = ($20|0)==($23|0);
+  if ($24) {
+   $25 = $shared;
+   $26 = ((($25)) + 8|0);
+   $27 = HEAP32[$26>>2]|0;
+   $28 = $1;
+   $29 = ((($28)) + 12|0);
+   $30 = ((($29)) + 8|0);
+   HEAP32[$30>>2] = $27;
+   $31 = $shared;
+   $32 = ((($31)) + 12|0);
+   $33 = HEAP32[$32>>2]|0;
+   $34 = $1;
+   $35 = ((($34)) + 12|0);
+   $36 = ((($35)) + 4|0);
+   HEAP32[$36>>2] = $33;
+   $37 = $1;
+   $38 = ((($37)) + 12|0);
+   $39 = HEAP32[$38>>2]|0;
+   $40 = $1;
+   $41 = HEAP32[$40>>2]|0;
+   $42 = $41 >>> 11;
+   $43 = $42 & 8;
+   $44 = ($43|0)!=(0);
+   $45 = $1;
+   $46 = ((($45)) + 12|0);
+   if ($44) {
+    $50 = $46;
+   } else {
+    $47 = ((($46)) + 8|0);
+    $48 = HEAP32[$47>>2]|0;
+    $50 = $48;
+   }
+   $49 = (($50) + ($39)|0);
+   HEAP8[$49>>0] = 0;
+   $51 = $0;
+   $52 = $shared;
+   _mrb_free($51,$52);
+  } else {
+   label = 8;
+  }
+ } else {
+  label = 8;
+ }
+ if ((label|0) == 8) {
+  $53 = $1;
+  $54 = HEAP32[$53>>2]|0;
+  $55 = $54 >>> 11;
+  $56 = $55 & 8;
+  $57 = ($56|0)!=(0);
+  $58 = $1;
+  $59 = ((($58)) + 12|0);
+  if ($57) {
+   $62 = $59;
+  } else {
+   $60 = ((($59)) + 8|0);
+   $61 = HEAP32[$60>>2]|0;
+   $62 = $61;
+  }
+  $p = $62;
+  $63 = $1;
+  $64 = ((($63)) + 12|0);
+  $65 = HEAP32[$64>>2]|0;
+  $len = $65;
+  $66 = $0;
+  $67 = $len;
+  $68 = (($67) + 1)|0;
+  $69 = (_mrb_malloc($66,$68)|0);
+  $ptr = $69;
+  $70 = $p;
+  $71 = ($70|0)!=(0|0);
+  if ($71) {
+   $72 = $ptr;
+   $73 = $p;
+   $74 = $len;
+   _memcpy(($72|0),($73|0),($74|0))|0;
+  }
+  $75 = $len;
+  $76 = $ptr;
+  $77 = (($76) + ($75)|0);
+  HEAP8[$77>>0] = 0;
+  $78 = $ptr;
+  $79 = $1;
+  $80 = ((($79)) + 12|0);
+  $81 = ((($80)) + 8|0);
+  HEAP32[$81>>2] = $78;
+  $82 = $len;
+  $83 = $1;
+  $84 = ((($83)) + 12|0);
+  $85 = ((($84)) + 4|0);
+  HEAP32[$85>>2] = $82;
+  $86 = $0;
+  $87 = $shared;
+  _str_decref($86,$87);
+ }
+ $88 = $1;
+ $89 = HEAP32[$88>>2]|0;
+ $90 = $89 >>> 11;
+ $91 = $90 & -2;
+ $92 = HEAP32[$88>>2]|0;
+ $93 = $91 & 2097151;
+ $94 = $93 << 11;
+ $95 = $92 & 2047;
+ $96 = $95 | $94;
+ HEAP32[$88>>2] = $96;
+ STACKTOP = sp;return;
+}
+function _check_frozen($mrb,$s) {
+ $mrb = $mrb|0;
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $s;
+ $2 = $1;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $4 & 4;
+ $6 = ($5|0)!=(0);
+ if ($6) {
+  $7 = $0;
+  $8 = $0;
+  $9 = (_mrb_class_get($8,67967)|0);
+  _mrb_raise($7,$9,55457);
+  // unreachable;
+ } else {
+  STACKTOP = sp;return;
+ }
+}
+function _resize_capa($mrb,$s,$capacity) {
+ $mrb = $mrb|0;
+ $s = $s|0;
+ $capacity = $capacity|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $7 = 0, $8 = 0, $9 = 0, $len = 0, $tmp = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $s;
+ $2 = $capacity;
+ $3 = $1;
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $4 >>> 11;
+ $6 = $5 & 8;
+ $7 = ($6|0)!=(0);
+ if ($7) {
+  $8 = $2;
+  $9 = (11)<($8|0);
+  if (!($9)) {
+   STACKTOP = sp;return;
+  }
+  $10 = $0;
+  $11 = $2;
+  $12 = (($11) + 1)|0;
+  $13 = (_mrb_malloc($10,$12)|0);
+  $tmp = $13;
+  $14 = $1;
+  $15 = HEAP32[$14>>2]|0;
+  $16 = $15 >>> 11;
+  $17 = $16 & 496;
+  $18 = $17 >> 4;
+  $len = $18;
+  $19 = $tmp;
+  $20 = $1;
+  $21 = ((($20)) + 12|0);
+  $22 = $len;
+  _memcpy(($19|0),($21|0),($22|0))|0;
+  $23 = $1;
+  $24 = HEAP32[$23>>2]|0;
+  $25 = $24 >>> 11;
+  $26 = $25 & -505;
+  $27 = HEAP32[$23>>2]|0;
+  $28 = $26 & 2097151;
+  $29 = $28 << 11;
+  $30 = $27 & 2047;
+  $31 = $30 | $29;
+  HEAP32[$23>>2] = $31;
+  $32 = $tmp;
+  $33 = $1;
+  $34 = ((($33)) + 12|0);
+  $35 = ((($34)) + 8|0);
+  HEAP32[$35>>2] = $32;
+  $36 = $len;
+  $37 = $1;
+  $38 = ((($37)) + 12|0);
+  HEAP32[$38>>2] = $36;
+  $39 = $2;
+  $40 = $1;
+  $41 = ((($40)) + 12|0);
+  $42 = ((($41)) + 4|0);
+  HEAP32[$42>>2] = $39;
+  STACKTOP = sp;return;
+ }
+ $43 = $0;
+ $44 = $1;
+ $45 = HEAP32[$44>>2]|0;
+ $46 = $45 >>> 11;
+ $47 = $46 & 8;
+ $48 = ($47|0)!=(0);
+ $49 = $1;
+ $50 = ((($49)) + 12|0);
+ if ($48) {
+  $55 = $50;
+ } else {
+  $51 = ((($50)) + 8|0);
+  $52 = HEAP32[$51>>2]|0;
+  $55 = $52;
+ }
+ $53 = $2;
+ $54 = (($53) + 1)|0;
+ $56 = (_mrb_realloc($43,$55,$54)|0);
+ $57 = $1;
+ $58 = ((($57)) + 12|0);
+ $59 = ((($58)) + 8|0);
+ HEAP32[$59>>2] = $56;
+ $60 = $2;
+ $61 = $1;
+ $62 = ((($61)) + 12|0);
+ $63 = ((($62)) + 4|0);
+ HEAP32[$63>>2] = $60;
+ STACKTOP = sp;return;
+}
+function _mrb_str_concat($mrb,$self,$other) {
+ $mrb = $mrb|0;
+ $self = $self|0;
+ $other = $other|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0;
+ var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0;
+ var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0;
+ var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0;
+ var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $len = 0;
+ var $other$byval_copy = 0, $s1 = 0, $s2 = 0, $tmp_n = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $other$byval_copy = sp + 32|0;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = HEAP32[$self>>2]|0;
+ $s1 = $2;
+ $3 = $0;
+ $4 = $s1;
+ _mrb_str_modify($3,$4);
+ $5 = ((($other)) + 4|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = ($6|0)==(16);
+ if (!($7)) {
+  $8 = $0;
+  ;HEAP32[$other$byval_copy>>2]=HEAP32[$other>>2]|0;HEAP32[$other$byval_copy+4>>2]=HEAP32[$other+4>>2]|0;
+  _mrb_str_to_str($1,$8,$other$byval_copy);
+  ;HEAP32[$other>>2]=HEAP32[$1>>2]|0;HEAP32[$other+4>>2]=HEAP32[$1+4>>2]|0;
+ }
+ $9 = HEAP32[$other>>2]|0;
+ $s2 = $9;
+ $10 = $s1;
+ $11 = HEAP32[$10>>2]|0;
+ $12 = $11 >>> 11;
+ $13 = $12 & 8;
+ $14 = ($13|0)!=(0);
+ $15 = $s1;
+ if ($14) {
+  $16 = HEAP32[$15>>2]|0;
+  $17 = $16 >>> 11;
+  $18 = $17 & 496;
+  $19 = $18 >> 4;
+  $35 = $19;
+ } else {
+  $20 = ((($15)) + 12|0);
+  $21 = HEAP32[$20>>2]|0;
+  $35 = $21;
+ }
+ $22 = $s2;
+ $23 = HEAP32[$22>>2]|0;
+ $24 = $23 >>> 11;
+ $25 = $24 & 8;
+ $26 = ($25|0)!=(0);
+ $27 = $s2;
+ if ($26) {
+  $28 = HEAP32[$27>>2]|0;
+  $29 = $28 >>> 11;
+  $30 = $29 & 496;
+  $31 = $30 >> 4;
+  $36 = $31;
+ } else {
+  $32 = ((($27)) + 12|0);
+  $33 = HEAP32[$32>>2]|0;
+  $36 = $33;
+ }
+ $34 = (($35) + ($36))|0;
+ $len = $34;
+ $37 = HEAP32[$self>>2]|0;
+ $38 = HEAP32[$37>>2]|0;
+ $39 = $38 >>> 11;
+ $40 = $39 & 8;
+ $41 = ($40|0)!=(0);
+ if ($41) {
+  $47 = 11;
+ } else {
+  $42 = HEAP32[$self>>2]|0;
+  $43 = ((($42)) + 12|0);
+  $44 = ((($43)) + 4|0);
+  $45 = HEAP32[$44>>2]|0;
+  $47 = $45;
+ }
+ $46 = $len;
+ $48 = ($47|0)<($46|0);
+ if ($48) {
+  $49 = $0;
+  $50 = $s1;
+  $51 = $len;
+  _resize_capa($49,$50,$51);
+ }
+ $52 = $s1;
+ $53 = HEAP32[$52>>2]|0;
+ $54 = $53 >>> 11;
+ $55 = $54 & 8;
+ $56 = ($55|0)!=(0);
+ $57 = $s1;
+ $58 = ((($57)) + 12|0);
+ if ($56) {
+  $74 = $58;
+ } else {
+  $59 = ((($58)) + 8|0);
+  $60 = HEAP32[$59>>2]|0;
+  $74 = $60;
+ }
+ $61 = $s1;
+ $62 = HEAP32[$61>>2]|0;
+ $63 = $62 >>> 11;
+ $64 = $63 & 8;
+ $65 = ($64|0)!=(0);
+ $66 = $s1;
+ if ($65) {
+  $67 = HEAP32[$66>>2]|0;
+  $68 = $67 >>> 11;
+  $69 = $68 & 496;
+  $70 = $69 >> 4;
+  $75 = $70;
+ } else {
+  $71 = ((($66)) + 12|0);
+  $72 = HEAP32[$71>>2]|0;
+  $75 = $72;
+ }
+ $73 = (($74) + ($75)|0);
+ $76 = $s2;
+ $77 = HEAP32[$76>>2]|0;
+ $78 = $77 >>> 11;
+ $79 = $78 & 8;
+ $80 = ($79|0)!=(0);
+ $81 = $s2;
+ $82 = ((($81)) + 12|0);
+ if ($80) {
+  $97 = $82;
+ } else {
+  $83 = ((($82)) + 8|0);
+  $84 = HEAP32[$83>>2]|0;
+  $97 = $84;
+ }
+ $85 = $s2;
+ $86 = HEAP32[$85>>2]|0;
+ $87 = $86 >>> 11;
+ $88 = $87 & 8;
+ $89 = ($88|0)!=(0);
+ $90 = $s2;
+ if ($89) {
+  $91 = HEAP32[$90>>2]|0;
+  $92 = $91 >>> 11;
+  $93 = $92 & 496;
+  $94 = $93 >> 4;
+  $98 = $94;
+ } else {
+  $95 = ((($90)) + 12|0);
+  $96 = HEAP32[$95>>2]|0;
+  $98 = $96;
+ }
+ _memcpy(($73|0),($97|0),($98|0))|0;
+ $99 = $s1;
+ $100 = HEAP32[$99>>2]|0;
+ $101 = $100 >>> 11;
+ $102 = $101 & 8;
+ $103 = ($102|0)!=(0);
+ $104 = $len;
+ if ($103) {
+  $tmp_n = $104;
+  $105 = $s1;
+  $106 = HEAP32[$105>>2]|0;
+  $107 = $106 >>> 11;
+  $108 = $107 & -497;
+  $109 = HEAP32[$105>>2]|0;
+  $110 = $108 & 2097151;
+  $111 = $110 << 11;
+  $112 = $109 & 2047;
+  $113 = $112 | $111;
+  HEAP32[$105>>2] = $113;
+  $114 = $tmp_n;
+  $115 = $114 << 4;
+  $116 = $s1;
+  $117 = HEAP32[$116>>2]|0;
+  $118 = $117 >>> 11;
+  $119 = $118 | $115;
+  $120 = HEAP32[$116>>2]|0;
+  $121 = $119 & 2097151;
+  $122 = $121 << 11;
+  $123 = $120 & 2047;
+  $124 = $123 | $122;
+  HEAP32[$116>>2] = $124;
+ } else {
+  $125 = $s1;
+  $126 = ((($125)) + 12|0);
+  HEAP32[$126>>2] = $104;
+ }
+ $127 = $len;
+ $128 = $s1;
+ $129 = HEAP32[$128>>2]|0;
+ $130 = $129 >>> 11;
+ $131 = $130 & 8;
+ $132 = ($131|0)!=(0);
+ $133 = $s1;
+ $134 = ((($133)) + 12|0);
+ if ($132) {
+  $138 = $134;
+  $137 = (($138) + ($127)|0);
+  HEAP8[$137>>0] = 0;
+  STACKTOP = sp;return;
+ } else {
+  $135 = ((($134)) + 8|0);
+  $136 = HEAP32[$135>>2]|0;
+  $138 = $136;
+  $137 = (($138) + ($127)|0);
+  HEAP8[$137>>0] = 0;
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_str_to_str($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $s = 0, $str$byval_copy = 0, $str$byval_copy1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy1 = sp + 40|0;
+ $str$byval_copy = sp + 32|0;
+ $s = sp + 16|0;
+ $1 = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $3 = ((($str)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)==(16);
+ if ($5) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $6 = $0;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_check_convert_type($1,$6,$str$byval_copy,16,64878,64885);
+ ;HEAP32[$s>>2]=HEAP32[$1>>2]|0;HEAP32[$s+4>>2]=HEAP32[$1+4>>2]|0;
+ $7 = ((($s)) + 4|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ($8|0)==(0);
+ if ($9) {
+  $10 = HEAP32[$s>>2]|0;
+  $11 = ($10|0)!=(0);
+  if (!($11)) {
+   $12 = $0;
+   ;HEAP32[$str$byval_copy1>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy1+4>>2]=HEAP32[$str+4>>2]|0;
+   _mrb_convert_type($2,$12,$str$byval_copy1,16,64878,68977);
+   ;HEAP32[$s>>2]=HEAP32[$2>>2]|0;HEAP32[$s+4>>2]=HEAP32[$2+4>>2]|0;
+  }
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$s>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$s+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_str_plus($agg$result,$mrb,$a,$b) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $12 = 0, $13 = 0, $14 = 0;
+ var $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0;
+ var $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0;
+ var $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0;
+ var $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0;
+ var $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $s = 0, $s2 = 0, $t = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$a>>2]|0;
+ $s = $1;
+ $2 = HEAP32[$b>>2]|0;
+ $s2 = $2;
+ $3 = $0;
+ $4 = $s;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5 >>> 11;
+ $7 = $6 & 8;
+ $8 = ($7|0)!=(0);
+ $9 = $s;
+ if ($8) {
+  $10 = HEAP32[$9>>2]|0;
+  $11 = $10 >>> 11;
+  $12 = $11 & 496;
+  $13 = $12 >> 4;
+  $29 = $13;
+ } else {
+  $14 = ((($9)) + 12|0);
+  $15 = HEAP32[$14>>2]|0;
+  $29 = $15;
+ }
+ $16 = $s2;
+ $17 = HEAP32[$16>>2]|0;
+ $18 = $17 >>> 11;
+ $19 = $18 & 8;
+ $20 = ($19|0)!=(0);
+ $21 = $s2;
+ if ($20) {
+  $22 = HEAP32[$21>>2]|0;
+  $23 = $22 >>> 11;
+  $24 = $23 & 496;
+  $25 = $24 >> 4;
+  $30 = $25;
+ } else {
+  $26 = ((($21)) + 12|0);
+  $27 = HEAP32[$26>>2]|0;
+  $30 = $27;
+ }
+ $28 = (($29) + ($30))|0;
+ $31 = (_str_new($3,0,$28)|0);
+ $t = $31;
+ $32 = $t;
+ $33 = HEAP32[$32>>2]|0;
+ $34 = $33 >>> 11;
+ $35 = $34 & 8;
+ $36 = ($35|0)!=(0);
+ $37 = $t;
+ $38 = ((($37)) + 12|0);
+ if ($36) {
+  $62 = $38;
+ } else {
+  $39 = ((($38)) + 8|0);
+  $40 = HEAP32[$39>>2]|0;
+  $62 = $40;
+ }
+ $41 = $s;
+ $42 = HEAP32[$41>>2]|0;
+ $43 = $42 >>> 11;
+ $44 = $43 & 8;
+ $45 = ($44|0)!=(0);
+ $46 = $s;
+ $47 = ((($46)) + 12|0);
+ if ($45) {
+  $63 = $47;
+ } else {
+  $48 = ((($47)) + 8|0);
+  $49 = HEAP32[$48>>2]|0;
+  $63 = $49;
+ }
+ $50 = $s;
+ $51 = HEAP32[$50>>2]|0;
+ $52 = $51 >>> 11;
+ $53 = $52 & 8;
+ $54 = ($53|0)!=(0);
+ $55 = $s;
+ if ($54) {
+  $56 = HEAP32[$55>>2]|0;
+  $57 = $56 >>> 11;
+  $58 = $57 & 496;
+  $59 = $58 >> 4;
+  $64 = $59;
+ } else {
+  $60 = ((($55)) + 12|0);
+  $61 = HEAP32[$60>>2]|0;
+  $64 = $61;
+ }
+ _memcpy(($62|0),($63|0),($64|0))|0;
+ $65 = $t;
+ $66 = HEAP32[$65>>2]|0;
+ $67 = $66 >>> 11;
+ $68 = $67 & 8;
+ $69 = ($68|0)!=(0);
+ $70 = $t;
+ $71 = ((($70)) + 12|0);
+ if ($69) {
+  $87 = $71;
+ } else {
+  $72 = ((($71)) + 8|0);
+  $73 = HEAP32[$72>>2]|0;
+  $87 = $73;
+ }
+ $74 = $s;
+ $75 = HEAP32[$74>>2]|0;
+ $76 = $75 >>> 11;
+ $77 = $76 & 8;
+ $78 = ($77|0)!=(0);
+ $79 = $s;
+ if ($78) {
+  $80 = HEAP32[$79>>2]|0;
+  $81 = $80 >>> 11;
+  $82 = $81 & 496;
+  $83 = $82 >> 4;
+  $88 = $83;
+ } else {
+  $84 = ((($79)) + 12|0);
+  $85 = HEAP32[$84>>2]|0;
+  $88 = $85;
+ }
+ $86 = (($87) + ($88)|0);
+ $89 = $s2;
+ $90 = HEAP32[$89>>2]|0;
+ $91 = $90 >>> 11;
+ $92 = $91 & 8;
+ $93 = ($92|0)!=(0);
+ $94 = $s2;
+ $95 = ((($94)) + 12|0);
+ if ($93) {
+  $110 = $95;
+ } else {
+  $96 = ((($95)) + 8|0);
+  $97 = HEAP32[$96>>2]|0;
+  $110 = $97;
+ }
+ $98 = $s2;
+ $99 = HEAP32[$98>>2]|0;
+ $100 = $99 >>> 11;
+ $101 = $100 & 8;
+ $102 = ($101|0)!=(0);
+ $103 = $s2;
+ if ($102) {
+  $104 = HEAP32[$103>>2]|0;
+  $105 = $104 >>> 11;
+  $106 = $105 & 496;
+  $107 = $106 >> 4;
+  $111 = $107;
+  _memcpy(($86|0),($110|0),($111|0))|0;
+  $112 = $t;
+  _mrb_obj_value_259($agg$result,$112);
+  STACKTOP = sp;return;
+ } else {
+  $108 = ((($103)) + 12|0);
+  $109 = HEAP32[$108>>2]|0;
+  $111 = $109;
+  _memcpy(($86|0),($110|0),($111|0))|0;
+  $112 = $t;
+  _mrb_obj_value_259($agg$result,$112);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_str_cmp($mrb,$str1,$str2) {
+ $mrb = $mrb|0;
+ $str1 = $str1|0;
+ $str2 = $str2|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0;
+ var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0;
+ var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0;
+ var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0;
+ var $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $len = 0, $retval = 0, $s1 = 0;
+ var $s2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = HEAP32[$str1>>2]|0;
+ $s1 = $2;
+ $3 = HEAP32[$str2>>2]|0;
+ $s2 = $3;
+ $4 = $s1;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5 >>> 11;
+ $7 = $6 & 8;
+ $8 = ($7|0)!=(0);
+ $9 = $s1;
+ if ($8) {
+  $10 = HEAP32[$9>>2]|0;
+  $11 = $10 >>> 11;
+  $12 = $11 & 496;
+  $13 = $12 >> 4;
+  $28 = $13;
+ } else {
+  $14 = ((($9)) + 12|0);
+  $15 = HEAP32[$14>>2]|0;
+  $28 = $15;
+ }
+ $16 = $s2;
+ $17 = HEAP32[$16>>2]|0;
+ $18 = $17 >>> 11;
+ $19 = $18 & 8;
+ $20 = ($19|0)!=(0);
+ $21 = $s2;
+ if ($20) {
+  $22 = HEAP32[$21>>2]|0;
+  $23 = $22 >>> 11;
+  $24 = $23 & 496;
+  $25 = $24 >> 4;
+  $30 = $25;
+ } else {
+  $26 = ((($21)) + 12|0);
+  $27 = HEAP32[$26>>2]|0;
+  $30 = $27;
+ }
+ $29 = ($28|0)>($30|0);
+ do {
+  if ($29) {
+   $31 = $s2;
+   $32 = HEAP32[$31>>2]|0;
+   $33 = $32 >>> 11;
+   $34 = $33 & 8;
+   $35 = ($34|0)!=(0);
+   $36 = $s2;
+   if ($35) {
+    $37 = HEAP32[$36>>2]|0;
+    $38 = $37 >>> 11;
+    $39 = $38 & 496;
+    $40 = $39 >> 4;
+    $55 = $40;
+    break;
+   } else {
+    $41 = ((($36)) + 12|0);
+    $42 = HEAP32[$41>>2]|0;
+    $55 = $42;
+    break;
+   }
+  } else {
+   $43 = $s1;
+   $44 = HEAP32[$43>>2]|0;
+   $45 = $44 >>> 11;
+   $46 = $45 & 8;
+   $47 = ($46|0)!=(0);
+   $48 = $s1;
+   if ($47) {
+    $49 = HEAP32[$48>>2]|0;
+    $50 = $49 >>> 11;
+    $51 = $50 & 496;
+    $52 = $51 >> 4;
+    $55 = $52;
+    break;
+   } else {
+    $53 = ((($48)) + 12|0);
+    $54 = HEAP32[$53>>2]|0;
+    $55 = $54;
+    break;
+   }
+  }
+ } while(0);
+ $len = $55;
+ $56 = $s1;
+ $57 = HEAP32[$56>>2]|0;
+ $58 = $57 >>> 11;
+ $59 = $58 & 8;
+ $60 = ($59|0)!=(0);
+ $61 = $s1;
+ $62 = ((($61)) + 12|0);
+ if ($60) {
+  $75 = $62;
+ } else {
+  $63 = ((($62)) + 8|0);
+  $64 = HEAP32[$63>>2]|0;
+  $75 = $64;
+ }
+ $65 = $s2;
+ $66 = HEAP32[$65>>2]|0;
+ $67 = $66 >>> 11;
+ $68 = $67 & 8;
+ $69 = ($68|0)!=(0);
+ $70 = $s2;
+ $71 = ((($70)) + 12|0);
+ if ($69) {
+  $76 = $71;
+ } else {
+  $72 = ((($71)) + 8|0);
+  $73 = HEAP32[$72>>2]|0;
+  $76 = $73;
+ }
+ $74 = $len;
+ $77 = (_memcmp($75,$76,$74)|0);
+ $retval = $77;
+ $78 = $retval;
+ $79 = ($78|0)==(0);
+ if (!($79)) {
+  $134 = $retval;
+  $135 = ($134|0)>(0);
+  if ($135) {
+   $0 = 1;
+   $136 = $0;
+   STACKTOP = sp;return ($136|0);
+  } else {
+   $0 = -1;
+   $136 = $0;
+   STACKTOP = sp;return ($136|0);
+  }
+ }
+ $80 = $s1;
+ $81 = HEAP32[$80>>2]|0;
+ $82 = $81 >>> 11;
+ $83 = $82 & 8;
+ $84 = ($83|0)!=(0);
+ $85 = $s1;
+ if ($84) {
+  $86 = HEAP32[$85>>2]|0;
+  $87 = $86 >>> 11;
+  $88 = $87 & 496;
+  $89 = $88 >> 4;
+  $104 = $89;
+ } else {
+  $90 = ((($85)) + 12|0);
+  $91 = HEAP32[$90>>2]|0;
+  $104 = $91;
+ }
+ $92 = $s2;
+ $93 = HEAP32[$92>>2]|0;
+ $94 = $93 >>> 11;
+ $95 = $94 & 8;
+ $96 = ($95|0)!=(0);
+ $97 = $s2;
+ if ($96) {
+  $98 = HEAP32[$97>>2]|0;
+  $99 = $98 >>> 11;
+  $100 = $99 & 496;
+  $101 = $100 >> 4;
+  $106 = $101;
+ } else {
+  $102 = ((($97)) + 12|0);
+  $103 = HEAP32[$102>>2]|0;
+  $106 = $103;
+ }
+ $105 = ($104|0)==($106|0);
+ if ($105) {
+  $0 = 0;
+  $136 = $0;
+  STACKTOP = sp;return ($136|0);
+ }
+ $107 = $s1;
+ $108 = HEAP32[$107>>2]|0;
+ $109 = $108 >>> 11;
+ $110 = $109 & 8;
+ $111 = ($110|0)!=(0);
+ $112 = $s1;
+ if ($111) {
+  $113 = HEAP32[$112>>2]|0;
+  $114 = $113 >>> 11;
+  $115 = $114 & 496;
+  $116 = $115 >> 4;
+  $131 = $116;
+ } else {
+  $117 = ((($112)) + 12|0);
+  $118 = HEAP32[$117>>2]|0;
+  $131 = $118;
+ }
+ $119 = $s2;
+ $120 = HEAP32[$119>>2]|0;
+ $121 = $120 >>> 11;
+ $122 = $121 & 8;
+ $123 = ($122|0)!=(0);
+ $124 = $s2;
+ if ($123) {
+  $125 = HEAP32[$124>>2]|0;
+  $126 = $125 >>> 11;
+  $127 = $126 & 496;
+  $128 = $127 >> 4;
+  $133 = $128;
+ } else {
+  $129 = ((($124)) + 12|0);
+  $130 = HEAP32[$129>>2]|0;
+  $133 = $130;
+ }
+ $132 = ($131|0)>($133|0);
+ if ($132) {
+  $0 = 1;
+  $136 = $0;
+  STACKTOP = sp;return ($136|0);
+ } else {
+  $0 = -1;
+  $136 = $0;
+  STACKTOP = sp;return ($136|0);
+ }
+ return (0)|0;
+}
+function _mrb_str_equal($mrb,$str1,$str2) {
+ $mrb = $mrb|0;
+ $str1 = $str1|0;
+ $str2 = $str2|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $str1$byval_copy = 0, $str1$byval_copy3 = 0, $str2$byval_copy = 0, $str2$byval_copy1 = 0, $str2$byval_copy2 = 0, $str2$byval_copy4 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str2$byval_copy4 = sp + 64|0;
+ $str1$byval_copy3 = sp + 56|0;
+ $str1$byval_copy = sp + 48|0;
+ $str2$byval_copy2 = sp + 40|0;
+ $str2$byval_copy1 = sp + 32|0;
+ $str2$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $2 = sp + 8|0;
+ $1 = $mrb;
+ $3 = ((($str2)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4>>>0)<(8);
+ if ($5) {
+  $0 = 0;
+  $24 = $0;
+  STACKTOP = sp;return ($24|0);
+ }
+ $6 = ((($str2)) + 4|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ($7|0)==(16);
+ if ($8) {
+  $22 = $1;
+  ;HEAP32[$str1$byval_copy3>>2]=HEAP32[$str1>>2]|0;HEAP32[$str1$byval_copy3+4>>2]=HEAP32[$str1+4>>2]|0;
+  ;HEAP32[$str2$byval_copy4>>2]=HEAP32[$str2>>2]|0;HEAP32[$str2$byval_copy4+4>>2]=HEAP32[$str2+4>>2]|0;
+  $23 = (_str_eql($22,$str1$byval_copy3,$str2$byval_copy4)|0);
+  $0 = $23;
+  $24 = $0;
+  STACKTOP = sp;return ($24|0);
+ }
+ $9 = ((($str2)) + 4|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = ($10|0)==(0);
+ if ($11) {
+  $12 = HEAP32[$str2>>2]|0;
+  $13 = ($12|0)!=(0);
+  if (!($13)) {
+   $0 = 0;
+   $24 = $0;
+   STACKTOP = sp;return ($24|0);
+  }
+ }
+ $14 = $1;
+ $15 = $1;
+ $16 = (_mrb_intern_static($15,64885,6)|0);
+ ;HEAP32[$str2$byval_copy>>2]=HEAP32[$str2>>2]|0;HEAP32[$str2$byval_copy+4>>2]=HEAP32[$str2+4>>2]|0;
+ $17 = (_mrb_respond_to($14,$str2$byval_copy,$16)|0);
+ $18 = ($17<<24>>24)!=(0);
+ if ($18) {
+  $19 = $1;
+  ;HEAP32[$str2$byval_copy1>>2]=HEAP32[$str2>>2]|0;HEAP32[$str2$byval_copy1+4>>2]=HEAP32[$str2+4>>2]|0;
+  _mrb_funcall($2,$19,$str2$byval_copy1,64885,0,$vararg_buffer);
+  ;HEAP32[$str2>>2]=HEAP32[$2>>2]|0;HEAP32[$str2+4>>2]=HEAP32[$2+4>>2]|0;
+  $20 = $1;
+  ;HEAP32[$str2$byval_copy2>>2]=HEAP32[$str2>>2]|0;HEAP32[$str2$byval_copy2+4>>2]=HEAP32[$str2+4>>2]|0;
+  ;HEAP32[$str1$byval_copy>>2]=HEAP32[$str1>>2]|0;HEAP32[$str1$byval_copy+4>>2]=HEAP32[$str1+4>>2]|0;
+  $21 = (_mrb_equal($20,$str2$byval_copy2,$str1$byval_copy)|0);
+  $0 = $21;
+  $24 = $0;
+  STACKTOP = sp;return ($24|0);
+ } else {
+  $0 = 0;
+  $24 = $0;
+  STACKTOP = sp;return ($24|0);
+ }
+ return (0)|0;
+}
+function _str_eql($mrb,$str1,$str2) {
+ $mrb = $mrb|0;
+ $str1 = $str1|0;
+ $str2 = $str2|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $len = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = HEAP32[$str1>>2]|0;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $4 & 8;
+ $6 = ($5|0)!=(0);
+ $7 = HEAP32[$str1>>2]|0;
+ if ($6) {
+  $8 = HEAP32[$7>>2]|0;
+  $9 = $8 >>> 11;
+  $10 = $9 & 496;
+  $11 = $10 >> 4;
+  $14 = $11;
+ } else {
+  $12 = ((($7)) + 12|0);
+  $13 = HEAP32[$12>>2]|0;
+  $14 = $13;
+ }
+ $len = $14;
+ $15 = $len;
+ $16 = HEAP32[$str2>>2]|0;
+ $17 = HEAP32[$16>>2]|0;
+ $18 = $17 >>> 11;
+ $19 = $18 & 8;
+ $20 = ($19|0)!=(0);
+ $21 = HEAP32[$str2>>2]|0;
+ if ($20) {
+  $22 = HEAP32[$21>>2]|0;
+  $23 = $22 >>> 11;
+  $24 = $23 & 496;
+  $25 = $24 >> 4;
+  $29 = $25;
+ } else {
+  $26 = ((($21)) + 12|0);
+  $27 = HEAP32[$26>>2]|0;
+  $29 = $27;
+ }
+ $28 = ($15|0)!=($29|0);
+ if ($28) {
+  $0 = 0;
+  $53 = $0;
+  STACKTOP = sp;return ($53|0);
+ }
+ $30 = HEAP32[$str1>>2]|0;
+ $31 = HEAP32[$30>>2]|0;
+ $32 = $31 >>> 11;
+ $33 = $32 & 8;
+ $34 = ($33|0)!=(0);
+ $35 = HEAP32[$str1>>2]|0;
+ $36 = ((($35)) + 12|0);
+ if ($34) {
+  $49 = $36;
+ } else {
+  $37 = ((($36)) + 8|0);
+  $38 = HEAP32[$37>>2]|0;
+  $49 = $38;
+ }
+ $39 = HEAP32[$str2>>2]|0;
+ $40 = HEAP32[$39>>2]|0;
+ $41 = $40 >>> 11;
+ $42 = $41 & 8;
+ $43 = ($42|0)!=(0);
+ $44 = HEAP32[$str2>>2]|0;
+ $45 = ((($44)) + 12|0);
+ if ($43) {
+  $50 = $45;
+ } else {
+  $46 = ((($45)) + 8|0);
+  $47 = HEAP32[$46>>2]|0;
+  $50 = $47;
+ }
+ $48 = $len;
+ $51 = (_memcmp($49,$50,$48)|0);
+ $52 = ($51|0)==(0);
+ if ($52) {
+  $0 = 1;
+  $53 = $0;
+  STACKTOP = sp;return ($53|0);
+ } else {
+  $0 = 0;
+  $53 = $0;
+  STACKTOP = sp;return ($53|0);
+ }
+ return (0)|0;
+}
+function _mrb_string_value_ptr($mrb,$ptr) {
+ $mrb = $mrb|0;
+ $ptr = $ptr|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ptr$byval_copy = 0, $str = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $ptr$byval_copy = sp + 16|0;
+ $str = sp;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$ptr$byval_copy>>2]=HEAP32[$ptr>>2]|0;HEAP32[$ptr$byval_copy+4>>2]=HEAP32[$ptr+4>>2]|0;
+ _mrb_str_to_str($str,$1,$ptr$byval_copy);
+ $2 = HEAP32[$str>>2]|0;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $4 & 8;
+ $6 = ($5|0)!=(0);
+ $7 = HEAP32[$str>>2]|0;
+ $8 = ((($7)) + 12|0);
+ if ($6) {
+  $11 = $8;
+  STACKTOP = sp;return ($11|0);
+ } else {
+  $9 = ((($8)) + 8|0);
+  $10 = HEAP32[$9>>2]|0;
+  $11 = $10;
+  STACKTOP = sp;return ($11|0);
+ }
+ return (0)|0;
+}
+function _mrb_noregexp($mrb,$self) {
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = $0;
+ $3 = (_mrb_class_get($2,64809)|0);
+ _mrb_raise($1,$3,55484);
+ // unreachable;
+}
+function _mrb_regexp_check($mrb,$obj) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $obj$byval_copy = 0, $obj$byval_copy1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy1 = sp + 16|0;
+ $obj$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ $2 = (_mrb_regexp_p($1,$obj$byval_copy)|0);
+ $3 = ($2<<24>>24)!=(0);
+ if (!($3)) {
+  STACKTOP = sp;return;
+ }
+ $4 = $0;
+ ;HEAP32[$obj$byval_copy1>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy1+4>>2]=HEAP32[$obj+4>>2]|0;
+ _mrb_noregexp($4,$obj$byval_copy1);
+ STACKTOP = sp;return;
+}
+function _mrb_str_dup($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $dup = 0, $s = 0, $str$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 16|0;
+ $0 = $mrb;
+ $1 = HEAP32[$str>>2]|0;
+ $s = $1;
+ $2 = $0;
+ $3 = (_str_new($2,0,0)|0);
+ $dup = $3;
+ $4 = $0;
+ $5 = $dup;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _str_with_class($4,$5,$str$byval_copy);
+ $6 = $0;
+ $7 = $dup;
+ $8 = $s;
+ _str_replace($agg$result,$6,$7,$8);
+ STACKTOP = sp;return;
+}
+function _str_with_class($mrb,$s,$obj) {
+ $mrb = $mrb|0;
+ $s = $s|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $s;
+ $2 = HEAP32[$obj>>2]|0;
+ $3 = ((($2)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $1;
+ $6 = ((($5)) + 4|0);
+ HEAP32[$6>>2] = $4;
+ STACKTOP = sp;return;
+}
+function _str_replace($agg$result,$mrb,$s1,$s2) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $s1 = $s1|0;
+ $s2 = $s2|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0;
+ var $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0;
+ var $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0;
+ var $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0;
+ var $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $len = 0, $tmp_n = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $s1;
+ $2 = $s2;
+ $3 = $0;
+ $4 = $1;
+ _check_frozen($3,$4);
+ $5 = $2;
+ $6 = HEAP32[$5>>2]|0;
+ $7 = $6 >>> 11;
+ $8 = $7 & 8;
+ $9 = ($8|0)!=(0);
+ $10 = $2;
+ if ($9) {
+  $11 = HEAP32[$10>>2]|0;
+  $12 = $11 >>> 11;
+  $13 = $12 & 496;
+  $14 = $13 >> 4;
+  $17 = $14;
+ } else {
+  $15 = ((($10)) + 12|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = $16;
+ }
+ $len = $17;
+ $18 = $1;
+ $19 = HEAP32[$18>>2]|0;
+ $20 = $19 >>> 11;
+ $21 = $20 & 1;
+ $22 = ($21|0)!=(0);
+ if ($22) {
+  $23 = $0;
+  $24 = $1;
+  $25 = ((($24)) + 12|0);
+  $26 = ((($25)) + 4|0);
+  $27 = HEAP32[$26>>2]|0;
+  _str_decref($23,$27);
+ } else {
+  $28 = $1;
+  $29 = HEAP32[$28>>2]|0;
+  $30 = $29 >>> 11;
+  $31 = $30 & 8;
+  $32 = ($31|0)!=(0);
+  if (!($32)) {
+   $33 = $1;
+   $34 = HEAP32[$33>>2]|0;
+   $35 = $34 >>> 11;
+   $36 = $35 & 2;
+   $37 = ($36|0)!=(0);
+   if (!($37)) {
+    $38 = $0;
+    $39 = $1;
+    $40 = ((($39)) + 12|0);
+    $41 = ((($40)) + 8|0);
+    $42 = HEAP32[$41>>2]|0;
+    _mrb_free($38,$42);
+   }
+  }
+ }
+ $43 = $1;
+ $44 = HEAP32[$43>>2]|0;
+ $45 = $44 >>> 11;
+ $46 = $45 & -3;
+ $47 = HEAP32[$43>>2]|0;
+ $48 = $46 & 2097151;
+ $49 = $48 << 11;
+ $50 = $47 & 2047;
+ $51 = $50 | $49;
+ HEAP32[$43>>2] = $51;
+ $52 = $2;
+ $53 = HEAP32[$52>>2]|0;
+ $54 = $53 >>> 11;
+ $55 = $54 & 1;
+ $56 = ($55|0)!=(0);
+ do {
+  if (!($56)) {
+   $99 = $len;
+   $100 = ($99|0)<=(11);
+   if (!($100)) {
+    $153 = $0;
+    $154 = $2;
+    _str_make_shared($153,$154);
+    break;
+   }
+   $101 = $1;
+   $102 = HEAP32[$101>>2]|0;
+   $103 = $102 >>> 11;
+   $104 = $103 & -2;
+   $105 = HEAP32[$101>>2]|0;
+   $106 = $104 & 2097151;
+   $107 = $106 << 11;
+   $108 = $105 & 2047;
+   $109 = $108 | $107;
+   HEAP32[$101>>2] = $109;
+   $110 = $1;
+   $111 = HEAP32[$110>>2]|0;
+   $112 = $111 >>> 11;
+   $113 = $112 | 8;
+   $114 = HEAP32[$110>>2]|0;
+   $115 = $113 & 2097151;
+   $116 = $115 << 11;
+   $117 = $114 & 2047;
+   $118 = $117 | $116;
+   HEAP32[$110>>2] = $118;
+   $119 = $1;
+   $120 = ((($119)) + 12|0);
+   $121 = $2;
+   $122 = HEAP32[$121>>2]|0;
+   $123 = $122 >>> 11;
+   $124 = $123 & 8;
+   $125 = ($124|0)!=(0);
+   $126 = $2;
+   $127 = ((($126)) + 12|0);
+   if ($125) {
+    $131 = $127;
+   } else {
+    $128 = ((($127)) + 8|0);
+    $129 = HEAP32[$128>>2]|0;
+    $131 = $129;
+   }
+   $130 = $len;
+   _memcpy(($120|0),($131|0),($130|0))|0;
+   $132 = $len;
+   $tmp_n = $132;
+   $133 = $1;
+   $134 = HEAP32[$133>>2]|0;
+   $135 = $134 >>> 11;
+   $136 = $135 & -497;
+   $137 = HEAP32[$133>>2]|0;
+   $138 = $136 & 2097151;
+   $139 = $138 << 11;
+   $140 = $137 & 2047;
+   $141 = $140 | $139;
+   HEAP32[$133>>2] = $141;
+   $142 = $tmp_n;
+   $143 = $142 << 4;
+   $144 = $1;
+   $145 = HEAP32[$144>>2]|0;
+   $146 = $145 >>> 11;
+   $147 = $146 | $143;
+   $148 = HEAP32[$144>>2]|0;
+   $149 = $147 & 2097151;
+   $150 = $149 << 11;
+   $151 = $148 & 2047;
+   $152 = $151 | $150;
+   HEAP32[$144>>2] = $152;
+   $155 = $1;
+   _mrb_obj_value_259($agg$result,$155);
+   STACKTOP = sp;return;
+  }
+ } while(0);
+ $57 = $1;
+ $58 = HEAP32[$57>>2]|0;
+ $59 = $58 >>> 11;
+ $60 = $59 & -505;
+ $61 = HEAP32[$57>>2]|0;
+ $62 = $60 & 2097151;
+ $63 = $62 << 11;
+ $64 = $61 & 2047;
+ $65 = $64 | $63;
+ HEAP32[$57>>2] = $65;
+ $66 = $2;
+ $67 = ((($66)) + 12|0);
+ $68 = ((($67)) + 8|0);
+ $69 = HEAP32[$68>>2]|0;
+ $70 = $1;
+ $71 = ((($70)) + 12|0);
+ $72 = ((($71)) + 8|0);
+ HEAP32[$72>>2] = $69;
+ $73 = $len;
+ $74 = $1;
+ $75 = ((($74)) + 12|0);
+ HEAP32[$75>>2] = $73;
+ $76 = $2;
+ $77 = ((($76)) + 12|0);
+ $78 = ((($77)) + 4|0);
+ $79 = HEAP32[$78>>2]|0;
+ $80 = $1;
+ $81 = ((($80)) + 12|0);
+ $82 = ((($81)) + 4|0);
+ HEAP32[$82>>2] = $79;
+ $83 = $1;
+ $84 = HEAP32[$83>>2]|0;
+ $85 = $84 >>> 11;
+ $86 = $85 | 1;
+ $87 = HEAP32[$83>>2]|0;
+ $88 = $86 & 2097151;
+ $89 = $88 << 11;
+ $90 = $87 & 2047;
+ $91 = $90 | $89;
+ HEAP32[$83>>2] = $91;
+ $92 = $1;
+ $93 = ((($92)) + 12|0);
+ $94 = ((($93)) + 4|0);
+ $95 = HEAP32[$94>>2]|0;
+ $96 = ((($95)) + 4|0);
+ $97 = HEAP32[$96>>2]|0;
+ $98 = (($97) + 1)|0;
+ HEAP32[$96>>2] = $98;
+ $155 = $1;
+ _mrb_obj_value_259($agg$result,$155);
+ STACKTOP = sp;return;
+}
+function _str_make_shared($mrb,$s) {
+ $mrb = $mrb|0;
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0;
+ var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0;
+ var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0;
+ var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0;
+ var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0;
+ var $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $len = 0, $shared = 0, $tmp = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $s;
+ $2 = $1;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $4 & 1;
+ $6 = ($5|0)!=(0);
+ if ($6) {
+  STACKTOP = sp;return;
+ }
+ $7 = $0;
+ $8 = (_mrb_malloc($7,16)|0);
+ $shared = $8;
+ $9 = $shared;
+ $10 = ((($9)) + 4|0);
+ HEAP32[$10>>2] = 1;
+ $11 = $1;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $12 >>> 11;
+ $14 = $13 & 8;
+ $15 = ($14|0)!=(0);
+ $16 = $1;
+ $17 = HEAP32[$16>>2]|0;
+ $18 = $17 >>> 11;
+ do {
+  if ($15) {
+   $19 = $18 & 496;
+   $20 = $19 >> 4;
+   $len = $20;
+   $21 = $0;
+   $22 = $len;
+   $23 = (($22) + 1)|0;
+   $24 = (_mrb_malloc($21,$23)|0);
+   $tmp = $24;
+   $25 = $tmp;
+   $26 = $1;
+   $27 = ((($26)) + 12|0);
+   $28 = $len;
+   _memcpy(($25|0),($27|0),($28|0))|0;
+   $29 = $len;
+   $30 = $tmp;
+   $31 = (($30) + ($29)|0);
+   HEAP8[$31>>0] = 0;
+   $32 = $1;
+   $33 = HEAP32[$32>>2]|0;
+   $34 = $33 >>> 11;
+   $35 = $34 & -505;
+   $36 = HEAP32[$32>>2]|0;
+   $37 = $35 & 2097151;
+   $38 = $37 << 11;
+   $39 = $36 & 2047;
+   $40 = $39 | $38;
+   HEAP32[$32>>2] = $40;
+   $41 = $tmp;
+   $42 = $1;
+   $43 = ((($42)) + 12|0);
+   $44 = ((($43)) + 8|0);
+   HEAP32[$44>>2] = $41;
+   $45 = $len;
+   $46 = $1;
+   $47 = ((($46)) + 12|0);
+   HEAP32[$47>>2] = $45;
+   $48 = $shared;
+   $49 = HEAP8[$48>>0]|0;
+   $50 = $49 & -2;
+   HEAP8[$48>>0] = $50;
+   $51 = $1;
+   $52 = ((($51)) + 12|0);
+   $53 = ((($52)) + 8|0);
+   $54 = HEAP32[$53>>2]|0;
+   $55 = $shared;
+   $56 = ((($55)) + 8|0);
+   HEAP32[$56>>2] = $54;
+  } else {
+   $57 = $18 & 2;
+   $58 = ($57|0)!=(0);
+   $59 = $shared;
+   $60 = HEAP8[$59>>0]|0;
+   $61 = $60 & -2;
+   if ($58) {
+    $62 = $61 | 1;
+    HEAP8[$59>>0] = $62;
+    $63 = $1;
+    $64 = ((($63)) + 12|0);
+    $65 = ((($64)) + 8|0);
+    $66 = HEAP32[$65>>2]|0;
+    $67 = $shared;
+    $68 = ((($67)) + 8|0);
+    HEAP32[$68>>2] = $66;
+    $69 = $1;
+    $70 = HEAP32[$69>>2]|0;
+    $71 = $70 >>> 11;
+    $72 = $71 & -3;
+    $73 = HEAP32[$69>>2]|0;
+    $74 = $72 & 2097151;
+    $75 = $74 << 11;
+    $76 = $73 & 2047;
+    $77 = $76 | $75;
+    HEAP32[$69>>2] = $77;
+    break;
+   }
+   HEAP8[$59>>0] = $61;
+   $78 = $1;
+   $79 = ((($78)) + 12|0);
+   $80 = ((($79)) + 4|0);
+   $81 = HEAP32[$80>>2]|0;
+   $82 = $1;
+   $83 = ((($82)) + 12|0);
+   $84 = HEAP32[$83>>2]|0;
+   $85 = ($81|0)>($84|0);
+   if ($85) {
+    $86 = $0;
+    $87 = $1;
+    $88 = ((($87)) + 12|0);
+    $89 = ((($88)) + 8|0);
+    $90 = HEAP32[$89>>2]|0;
+    $91 = $1;
+    $92 = ((($91)) + 12|0);
+    $93 = HEAP32[$92>>2]|0;
+    $94 = (($93) + 1)|0;
+    $95 = (_mrb_realloc($86,$90,$94)|0);
+    $96 = $shared;
+    $97 = ((($96)) + 8|0);
+    HEAP32[$97>>2] = $95;
+    $98 = $1;
+    $99 = ((($98)) + 12|0);
+    $100 = ((($99)) + 8|0);
+    HEAP32[$100>>2] = $95;
+    break;
+   } else {
+    $101 = $1;
+    $102 = ((($101)) + 12|0);
+    $103 = ((($102)) + 8|0);
+    $104 = HEAP32[$103>>2]|0;
+    $105 = $shared;
+    $106 = ((($105)) + 8|0);
+    HEAP32[$106>>2] = $104;
+    break;
+   }
+  }
+ } while(0);
+ $107 = $1;
+ $108 = ((($107)) + 12|0);
+ $109 = HEAP32[$108>>2]|0;
+ $110 = $shared;
+ $111 = ((($110)) + 12|0);
+ HEAP32[$111>>2] = $109;
+ $112 = $shared;
+ $113 = $1;
+ $114 = ((($113)) + 12|0);
+ $115 = ((($114)) + 4|0);
+ HEAP32[$115>>2] = $112;
+ $116 = $1;
+ $117 = HEAP32[$116>>2]|0;
+ $118 = $117 >>> 11;
+ $119 = $118 | 1;
+ $120 = HEAP32[$116>>2]|0;
+ $121 = $119 & 2097151;
+ $122 = $121 << 11;
+ $123 = $120 & 2047;
+ $124 = $123 | $122;
+ HEAP32[$116>>2] = $124;
+ STACKTOP = sp;return;
+}
+function _str_substr($agg$result,$mrb,$str,$beg,$len) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ $beg = $beg|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $clen = 0, $str$byval_copy = 0, $str$byval_copy1 = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy1 = sp + 24|0;
+ $str$byval_copy = sp + 16|0;
+ $0 = $mrb;
+ $1 = $beg;
+ $2 = $len;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ $3 = (_utf8_strlen($str$byval_copy,-1)|0);
+ $clen = $3;
+ $4 = $2;
+ $5 = ($4|0)<(0);
+ if ($5) {
+  _mrb_nil_value_282($agg$result);
+  STACKTOP = sp;return;
+ }
+ $6 = $clen;
+ $7 = ($6|0)==(0);
+ if ($7) {
+  $2 = 0;
+ } else {
+  $8 = $1;
+  $9 = ($8|0)<(0);
+  if ($9) {
+   $10 = $clen;
+   $11 = $1;
+   $12 = (($10) + ($11))|0;
+   $1 = $12;
+  }
+ }
+ $13 = $1;
+ $14 = $clen;
+ $15 = ($13|0)>($14|0);
+ if ($15) {
+  _mrb_nil_value_282($agg$result);
+  STACKTOP = sp;return;
+ }
+ $16 = $1;
+ $17 = ($16|0)<(0);
+ if ($17) {
+  $18 = $clen;
+  $19 = $1;
+  $20 = (($19) + ($18))|0;
+  $1 = $20;
+  $21 = $1;
+  $22 = ($21|0)<(0);
+  if ($22) {
+   _mrb_nil_value_282($agg$result);
+   STACKTOP = sp;return;
+  }
+ }
+ $23 = $1;
+ $24 = $2;
+ $25 = (($23) + ($24))|0;
+ $26 = $clen;
+ $27 = ($25|0)>($26|0);
+ if ($27) {
+  $28 = $clen;
+  $29 = $1;
+  $30 = (($28) - ($29))|0;
+  $2 = $30;
+ }
+ $31 = $2;
+ $32 = ($31|0)<=(0);
+ if ($32) {
+  $2 = 0;
+ }
+ $33 = $0;
+ $34 = $1;
+ $35 = $2;
+ ;HEAP32[$str$byval_copy1>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy1+4>>2]=HEAP32[$str+4>>2]|0;
+ _str_subseq($agg$result,$33,$str$byval_copy1,$34,$35);
+ STACKTOP = sp;return;
+}
+function _utf8_strlen($str,$len) {
+ $str = $str|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $e = 0, $p = 0, $total = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $len;
+ $total = 0;
+ $1 = HEAP32[$str>>2]|0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 >>> 11;
+ $4 = $3 & 8;
+ $5 = ($4|0)!=(0);
+ $6 = HEAP32[$str>>2]|0;
+ $7 = ((($6)) + 12|0);
+ if ($5) {
+  $10 = $7;
+ } else {
+  $8 = ((($7)) + 8|0);
+  $9 = HEAP32[$8>>2]|0;
+  $10 = $9;
+ }
+ $p = $10;
+ $11 = $p;
+ $e = $11;
+ $12 = $0;
+ $13 = ($12|0)<(0);
+ do {
+  if ($13) {
+   $14 = HEAP32[$str>>2]|0;
+   $15 = HEAP32[$14>>2]|0;
+   $16 = $15 >>> 11;
+   $17 = $16 & 8;
+   $18 = ($17|0)!=(0);
+   $19 = HEAP32[$str>>2]|0;
+   if ($18) {
+    $20 = HEAP32[$19>>2]|0;
+    $21 = $20 >>> 11;
+    $22 = $21 & 496;
+    $23 = $22 >> 4;
+    $29 = $23;
+    break;
+   } else {
+    $24 = ((($19)) + 12|0);
+    $25 = HEAP32[$24>>2]|0;
+    $29 = $25;
+    break;
+   }
+  } else {
+   $26 = $0;
+   $29 = $26;
+  }
+ } while(0);
+ $27 = $e;
+ $28 = (($27) + ($29)|0);
+ $e = $28;
+ while(1) {
+  $30 = $p;
+  $31 = $e;
+  $32 = ($30>>>0)<($31>>>0);
+  if (!($32)) {
+   break;
+  }
+  $33 = $p;
+  $34 = $e;
+  $35 = (_utf8len($33,$34)|0);
+  $36 = $p;
+  $37 = (($36) + ($35)|0);
+  $p = $37;
+  $38 = $total;
+  $39 = (($38) + 1)|0;
+  $total = $39;
+ }
+ $40 = $total;
+ STACKTOP = sp;return ($40|0);
+}
+function _utf8len($p,$e) {
+ $p = $p|0;
+ $e = $e|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $len = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $p;
+ $2 = $e;
+ $3 = $1;
+ $4 = HEAP8[$3>>0]|0;
+ $5 = $4&255;
+ $6 = (55513 + ($5)|0);
+ $7 = HEAP8[$6>>0]|0;
+ $8 = $7 << 24 >> 24;
+ $len = $8;
+ $9 = $1;
+ $10 = $len;
+ $11 = (($9) + ($10)|0);
+ $12 = $2;
+ $13 = ($11>>>0)>($12>>>0);
+ if ($13) {
+  $0 = 1;
+  $27 = $0;
+  STACKTOP = sp;return ($27|0);
+ }
+ $i = 1;
+ while(1) {
+  $14 = $i;
+  $15 = $len;
+  $16 = ($14|0)<($15|0);
+  if (!($16)) {
+   label = 8;
+   break;
+  }
+  $17 = $i;
+  $18 = $1;
+  $19 = (($18) + ($17)|0);
+  $20 = HEAP8[$19>>0]|0;
+  $21 = $20 << 24 >> 24;
+  $22 = $21 & 192;
+  $23 = ($22|0)!=(128);
+  if ($23) {
+   label = 6;
+   break;
+  }
+  $24 = $i;
+  $25 = (($24) + 1)|0;
+  $i = $25;
+ }
+ if ((label|0) == 6) {
+  $0 = 1;
+  $27 = $0;
+  STACKTOP = sp;return ($27|0);
+ }
+ else if ((label|0) == 8) {
+  $26 = $len;
+  $0 = $26;
+  $27 = $0;
+  STACKTOP = sp;return ($27|0);
+ }
+ return (0)|0;
+}
+function _mrb_nil_value_282($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _str_subseq($agg$result,$mrb,$str,$beg,$len) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ $beg = $beg|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $str$byval_copy = 0, $str$byval_copy1 = 0, $str$byval_copy2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy2 = sp + 32|0;
+ $str$byval_copy1 = sp + 24|0;
+ $str$byval_copy = sp + 16|0;
+ $0 = $mrb;
+ $1 = $beg;
+ $2 = $len;
+ $3 = $1;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ $4 = (_chars2bytes($str$byval_copy,0,$3)|0);
+ $1 = $4;
+ $5 = $1;
+ $6 = $2;
+ ;HEAP32[$str$byval_copy1>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy1+4>>2]=HEAP32[$str+4>>2]|0;
+ $7 = (_chars2bytes($str$byval_copy1,$5,$6)|0);
+ $2 = $7;
+ $8 = $0;
+ $9 = $1;
+ $10 = $2;
+ ;HEAP32[$str$byval_copy2>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy2+4>>2]=HEAP32[$str+4>>2]|0;
+ _byte_subseq($agg$result,$8,$str$byval_copy2,$9,$10);
+ STACKTOP = sp;return;
+}
+function _chars2bytes($s,$off,$idx) {
+ $s = $s|0;
+ $off = $off|0;
+ $idx = $idx|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $b = 0, $e = 0, $i = 0, $n = 0;
+ var $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $off;
+ $1 = $idx;
+ $2 = HEAP32[$s>>2]|0;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $4 & 8;
+ $6 = ($5|0)!=(0);
+ $7 = HEAP32[$s>>2]|0;
+ $8 = ((($7)) + 12|0);
+ if ($6) {
+  $13 = $8;
+ } else {
+  $9 = ((($8)) + 8|0);
+  $10 = HEAP32[$9>>2]|0;
+  $13 = $10;
+ }
+ $11 = $0;
+ $12 = (($13) + ($11)|0);
+ $p = $12;
+ $14 = HEAP32[$s>>2]|0;
+ $15 = HEAP32[$14>>2]|0;
+ $16 = $15 >>> 11;
+ $17 = $16 & 8;
+ $18 = ($17|0)!=(0);
+ $19 = HEAP32[$s>>2]|0;
+ $20 = ((($19)) + 12|0);
+ if ($18) {
+  $36 = $20;
+ } else {
+  $21 = ((($20)) + 8|0);
+  $22 = HEAP32[$21>>2]|0;
+  $36 = $22;
+ }
+ $23 = HEAP32[$s>>2]|0;
+ $24 = HEAP32[$23>>2]|0;
+ $25 = $24 >>> 11;
+ $26 = $25 & 8;
+ $27 = ($26|0)!=(0);
+ $28 = HEAP32[$s>>2]|0;
+ if ($27) {
+  $29 = HEAP32[$28>>2]|0;
+  $30 = $29 >>> 11;
+  $31 = $30 & 496;
+  $32 = $31 >> 4;
+  $37 = $32;
+ } else {
+  $33 = ((($28)) + 12|0);
+  $34 = HEAP32[$33>>2]|0;
+  $37 = $34;
+ }
+ $35 = (($36) + ($37)|0);
+ $e = $35;
+ $i = 0;
+ $b = 0;
+ while(1) {
+  $38 = $p;
+  $39 = $e;
+  $40 = ($38>>>0)<($39>>>0);
+  if (!($40)) {
+   label = 14;
+   break;
+  }
+  $41 = $i;
+  $42 = $1;
+  $43 = ($41|0)<($42|0);
+  if (!($43)) {
+   label = 14;
+   break;
+  }
+  $44 = $p;
+  $45 = $e;
+  $46 = (_utf8len($44,$45)|0);
+  $n = $46;
+  $47 = $n;
+  $48 = $b;
+  $49 = (($48) + ($47))|0;
+  $b = $49;
+  $50 = $n;
+  $51 = $p;
+  $52 = (($51) + ($50)|0);
+  $p = $52;
+  $53 = $i;
+  $54 = (($53) + 1)|0;
+  $i = $54;
+ }
+ if ((label|0) == 14) {
+  $55 = $b;
+  STACKTOP = sp;return ($55|0);
+ }
+ return (0)|0;
+}
+function _byte_subseq($agg$result,$mrb,$str,$beg,$len) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ $beg = $beg|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $orig = 0, $s = 0, $shared = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $beg;
+ $2 = $len;
+ $3 = HEAP32[$str>>2]|0;
+ $orig = $3;
+ $4 = $orig;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5 >>> 11;
+ $7 = $6 & 8;
+ $8 = ($7|0)!=(0);
+ $9 = $0;
+ $10 = $orig;
+ if ($8) {
+  $11 = ((($10)) + 12|0);
+  $12 = $1;
+  $13 = (($11) + ($12)|0);
+  $14 = $2;
+  $15 = (_str_new($9,$13,$14)|0);
+  $s = $15;
+  $54 = $s;
+  _mrb_obj_value_259($agg$result,$54);
+  STACKTOP = sp;return;
+ } else {
+  _str_make_shared($9,$10);
+  $16 = $orig;
+  $17 = ((($16)) + 12|0);
+  $18 = ((($17)) + 4|0);
+  $19 = HEAP32[$18>>2]|0;
+  $shared = $19;
+  $20 = $0;
+  $21 = $0;
+  $22 = ((($21)) + 48|0);
+  $23 = HEAP32[$22>>2]|0;
+  $24 = (_mrb_obj_alloc($20,16,$23)|0);
+  $s = $24;
+  $25 = $orig;
+  $26 = ((($25)) + 12|0);
+  $27 = ((($26)) + 8|0);
+  $28 = HEAP32[$27>>2]|0;
+  $29 = $1;
+  $30 = (($28) + ($29)|0);
+  $31 = $s;
+  $32 = ((($31)) + 12|0);
+  $33 = ((($32)) + 8|0);
+  HEAP32[$33>>2] = $30;
+  $34 = $2;
+  $35 = $s;
+  $36 = ((($35)) + 12|0);
+  HEAP32[$36>>2] = $34;
+  $37 = $shared;
+  $38 = $s;
+  $39 = ((($38)) + 12|0);
+  $40 = ((($39)) + 4|0);
+  HEAP32[$40>>2] = $37;
+  $41 = $s;
+  $42 = HEAP32[$41>>2]|0;
+  $43 = $42 >>> 11;
+  $44 = $43 | 1;
+  $45 = HEAP32[$41>>2]|0;
+  $46 = $44 & 2097151;
+  $47 = $46 << 11;
+  $48 = $45 & 2047;
+  $49 = $48 | $47;
+  HEAP32[$41>>2] = $49;
+  $50 = $shared;
+  $51 = ((($50)) + 4|0);
+  $52 = HEAP32[$51>>2]|0;
+  $53 = (($52) + 1)|0;
+  HEAP32[$51>>2] = $53;
+  $54 = $s;
+  _mrb_obj_value_259($agg$result,$54);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_str_hash($mrb,$str) {
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $key = 0;
+ var $len = 0, $p = 0, $s = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$str>>2]|0;
+ $s = $1;
+ $2 = $s;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $4 & 8;
+ $6 = ($5|0)!=(0);
+ $7 = $s;
+ if ($6) {
+  $8 = HEAP32[$7>>2]|0;
+  $9 = $8 >>> 11;
+  $10 = $9 & 496;
+  $11 = $10 >> 4;
+  $14 = $11;
+ } else {
+  $12 = ((($7)) + 12|0);
+  $13 = HEAP32[$12>>2]|0;
+  $14 = $13;
+ }
+ $len = $14;
+ $15 = $s;
+ $16 = HEAP32[$15>>2]|0;
+ $17 = $16 >>> 11;
+ $18 = $17 & 8;
+ $19 = ($18|0)!=(0);
+ $20 = $s;
+ $21 = ((($20)) + 12|0);
+ if ($19) {
+  $24 = $21;
+ } else {
+  $22 = ((($21)) + 8|0);
+  $23 = HEAP32[$22>>2]|0;
+  $24 = $23;
+ }
+ $p = $24;
+ $key = 0;
+ while(1) {
+  $25 = $len;
+  $26 = (($25) + -1)|0;
+  $len = $26;
+  $27 = ($25|0)!=(0);
+  $28 = $key;
+  if (!($27)) {
+   break;
+  }
+  $29 = ($28*65599)|0;
+  $30 = $p;
+  $31 = HEAP8[$30>>0]|0;
+  $32 = $31 << 24 >> 24;
+  $33 = (($29) + ($32))|0;
+  $key = $33;
+  $34 = $p;
+  $35 = ((($34)) + 1|0);
+  $p = $35;
+ }
+ $36 = $key;
+ $37 = $36 >> 5;
+ $38 = (($28) + ($37))|0;
+ STACKTOP = sp;return ($38|0);
+}
+function _mrb_str_intern($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $self$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ $2 = (_mrb_intern_str($1,$self$byval_copy)|0);
+ _mrb_symbol_value($agg$result,$2);
+ STACKTOP = sp;return;
+}
+function _mrb_symbol_value($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 4;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_obj_as_string($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $obj$byval_copy = 0, $obj$byval_copy1 = 0, $str = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy1 = sp + 40|0;
+ $obj$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $str = sp + 16|0;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = ((($obj)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)==(16);
+ if ($4) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$obj>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$obj+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $5 = $0;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ _mrb_funcall($1,$5,$obj$byval_copy,68977,0,$vararg_buffer);
+ ;HEAP32[$str>>2]=HEAP32[$1>>2]|0;HEAP32[$str+4>>2]=HEAP32[$1+4>>2]|0;
+ $6 = ((($str)) + 4|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ($7|0)==(16);
+ if ($8) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+  STACKTOP = sp;return;
+ } else {
+  $9 = $0;
+  ;HEAP32[$obj$byval_copy1>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy1+4>>2]=HEAP32[$obj+4>>2]|0;
+  _mrb_any_to_s($agg$result,$9,$obj$byval_copy1);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_ptr_to_str($agg$result,$mrb,$p) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
+ var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $c = 0, $n = 0, $p1 = 0, $p2 = 0, $p_str = 0, $tmp_n = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $p;
+ $2 = $1;
+ $3 = $2;
+ $n = $3;
+ $4 = $0;
+ $5 = (_str_new($4,0,10)|0);
+ $p_str = $5;
+ $6 = $p_str;
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $7 >>> 11;
+ $9 = $8 & 8;
+ $10 = ($9|0)!=(0);
+ $11 = $p_str;
+ $12 = ((($11)) + 12|0);
+ if ($10) {
+  $15 = $12;
+ } else {
+  $13 = ((($12)) + 8|0);
+  $14 = HEAP32[$13>>2]|0;
+  $15 = $14;
+ }
+ $p1 = $15;
+ $16 = $p1;
+ $17 = ((($16)) + 1|0);
+ $p1 = $17;
+ HEAP8[$16>>0] = 48;
+ $18 = $p1;
+ $19 = ((($18)) + 1|0);
+ $p1 = $19;
+ HEAP8[$18>>0] = 120;
+ $20 = $p1;
+ $p2 = $20;
+ while(1) {
+  $21 = $n;
+  $22 = (($21>>>0) % 16)&-1;
+  $23 = (55345 + ($22)|0);
+  $24 = HEAP8[$23>>0]|0;
+  $25 = $p2;
+  $26 = ((($25)) + 1|0);
+  $p2 = $26;
+  HEAP8[$25>>0] = $24;
+  $27 = $n;
+  $28 = (($27>>>0) / 16)&-1;
+  $n = $28;
+  $29 = $n;
+  $30 = ($29>>>0)>(0);
+  if (!($30)) {
+   break;
+  }
+ }
+ $31 = $p2;
+ HEAP8[$31>>0] = 0;
+ $32 = $p_str;
+ $33 = HEAP32[$32>>2]|0;
+ $34 = $33 >>> 11;
+ $35 = $34 & 8;
+ $36 = ($35|0)!=(0);
+ $37 = $p2;
+ $38 = $p_str;
+ $39 = HEAP32[$38>>2]|0;
+ $40 = $39 >>> 11;
+ $41 = $40 & 8;
+ $42 = ($41|0)!=(0);
+ $43 = $p_str;
+ $44 = ((($43)) + 12|0);
+ if ($36) {
+  if ($42) {
+   $48 = $44;
+  } else {
+   $45 = ((($44)) + 8|0);
+   $46 = HEAP32[$45>>2]|0;
+   $48 = $46;
+  }
+  $47 = $37;
+  $49 = $48;
+  $50 = (($47) - ($49))|0;
+  $tmp_n = $50;
+  $51 = $p_str;
+  $52 = HEAP32[$51>>2]|0;
+  $53 = $52 >>> 11;
+  $54 = $53 & -497;
+  $55 = HEAP32[$51>>2]|0;
+  $56 = $54 & 2097151;
+  $57 = $56 << 11;
+  $58 = $55 & 2047;
+  $59 = $58 | $57;
+  HEAP32[$51>>2] = $59;
+  $60 = $tmp_n;
+  $61 = $60 << 4;
+  $62 = $p_str;
+  $63 = HEAP32[$62>>2]|0;
+  $64 = $63 >>> 11;
+  $65 = $64 | $61;
+  $66 = HEAP32[$62>>2]|0;
+  $67 = $65 & 2097151;
+  $68 = $67 << 11;
+  $69 = $66 & 2047;
+  $70 = $69 | $68;
+  HEAP32[$62>>2] = $70;
+ } else {
+  if ($42) {
+   $74 = $44;
+  } else {
+   $71 = ((($44)) + 8|0);
+   $72 = HEAP32[$71>>2]|0;
+   $74 = $72;
+  }
+  $73 = $37;
+  $75 = $74;
+  $76 = (($73) - ($75))|0;
+  $77 = $p_str;
+  $78 = ((($77)) + 12|0);
+  HEAP32[$78>>2] = $76;
+ }
+ while(1) {
+  $79 = $p1;
+  $80 = $p2;
+  $81 = ($79>>>0)<($80>>>0);
+  if (!($81)) {
+   break;
+  }
+  $82 = $p1;
+  $83 = HEAP8[$82>>0]|0;
+  $c = $83;
+  $84 = $p2;
+  $85 = ((($84)) + -1|0);
+  $p2 = $85;
+  $86 = HEAP8[$85>>0]|0;
+  $87 = $p1;
+  $88 = ((($87)) + 1|0);
+  $p1 = $88;
+  HEAP8[$87>>0] = $86;
+  $89 = $c;
+  $90 = $p2;
+  HEAP8[$90>>0] = $89;
+ }
+ $91 = $p_str;
+ _mrb_obj_value_259($agg$result,$91);
+ STACKTOP = sp;return;
+}
+function _mrb_check_string_type($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $str$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_check_convert_type($agg$result,$1,$str$byval_copy,16,64878,64885);
+ STACKTOP = sp;return;
+}
+function _mrb_cstr_to_inum($agg$result,$mrb,$str,$base,$badcheck) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ $base = $base|0;
+ $badcheck = $badcheck|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
+ var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
+ var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0;
+ var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0;
+ var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0;
+ var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0;
+ var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0;
+ var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0;
+ var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0;
+ var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
+ var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0;
+ var $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0;
+ var $99 = 0, $c = 0, $n = 0, $or$cond = 0, $or$cond3 = 0, $p = 0, $sign = 0, $uscore = 0, $val = 0, $vararg_buffer = 0, $vararg_buffer4 = 0, $vararg_buffer7 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer7 = sp + 24|0;
+ $vararg_buffer4 = sp + 16|0;
+ $vararg_buffer = sp + 8|0;
+ $n = sp;
+ $4 = sp + 48|0;
+ $5 = sp + 40|0;
+ $6 = sp + 32|0;
+ $0 = $mrb;
+ $1 = $str;
+ $2 = $base;
+ $3 = $badcheck;
+ $sign = 1;
+ $7 = $n;
+ $8 = $7;
+ HEAP32[$8>>2] = 0;
+ $9 = (($7) + 4)|0;
+ $10 = $9;
+ HEAP32[$10>>2] = 0;
+ $11 = $1;
+ $12 = ($11|0)!=(0|0);
+ do {
+  if ($12) {
+   while(1) {
+    $15 = $1;
+    $16 = HEAP8[$15>>0]|0;
+    $17 = $16 << 24 >> 24;
+    $18 = ($17|0)==(32);
+    if ($18) {
+     $319 = 1;
+    } else {
+     $19 = $1;
+     $20 = HEAP8[$19>>0]|0;
+     $21 = $20 << 24 >> 24;
+     $22 = (($21) - 9)|0;
+     $23 = ($22>>>0)<(5);
+     $319 = $23;
+    }
+    $24 = $1;
+    if (!($319)) {
+     break;
+    }
+    $25 = ((($24)) + 1|0);
+    $1 = $25;
+   }
+   $26 = HEAP8[$24>>0]|0;
+   $27 = $26 << 24 >> 24;
+   $28 = ($27|0)==(43);
+   $29 = $1;
+   if ($28) {
+    $30 = ((($29)) + 1|0);
+    $1 = $30;
+   } else {
+    $31 = HEAP8[$29>>0]|0;
+    $32 = $31 << 24 >> 24;
+    $33 = ($32|0)==(45);
+    if ($33) {
+     $34 = $1;
+     $35 = ((($34)) + 1|0);
+     $1 = $35;
+     $sign = 0;
+    }
+   }
+   $36 = $1;
+   $37 = HEAP8[$36>>0]|0;
+   $38 = $37 << 24 >> 24;
+   $39 = ($38|0)==(43);
+   if (!($39)) {
+    $40 = $1;
+    $41 = HEAP8[$40>>0]|0;
+    $42 = $41 << 24 >> 24;
+    $43 = ($42|0)==(45);
+    if (!($43)) {
+     $46 = $2;
+     $47 = ($46|0)<=(0);
+     L17: do {
+      if ($47) {
+       $48 = $1;
+       $49 = HEAP8[$48>>0]|0;
+       $50 = $49 << 24 >> 24;
+       $51 = ($50|0)==(48);
+       if (!($51)) {
+        $56 = $2;
+        $57 = ($56|0)<(-1);
+        if ($57) {
+         $58 = $2;
+         $59 = (0 - ($58))|0;
+         $2 = $59;
+         break;
+        } else {
+         $2 = 10;
+         break;
+        }
+       }
+       $52 = $1;
+       $53 = ((($52)) + 1|0);
+       $54 = HEAP8[$53>>0]|0;
+       $55 = $54 << 24 >> 24;
+       switch ($55|0) {
+       case 88: case 120:  {
+        $2 = 16;
+        break L17;
+        break;
+       }
+       case 66: case 98:  {
+        $2 = 2;
+        break L17;
+        break;
+       }
+       case 79: case 111:  {
+        $2 = 8;
+        break L17;
+        break;
+       }
+       case 68: case 100:  {
+        $2 = 10;
+        break L17;
+        break;
+       }
+       default: {
+        $2 = 8;
+        break L17;
+       }
+       }
+      }
+     } while(0);
+     $60 = $2;
+     L32: do {
+      switch ($60|0) {
+      case 2:  {
+       $61 = $1;
+       $62 = HEAP8[$61>>0]|0;
+       $63 = $62 << 24 >> 24;
+       $64 = ($63|0)==(48);
+       if ($64) {
+        $65 = $1;
+        $66 = ((($65)) + 1|0);
+        $67 = HEAP8[$66>>0]|0;
+        $68 = $67 << 24 >> 24;
+        $69 = ($68|0)==(98);
+        if (!($69)) {
+         $70 = $1;
+         $71 = ((($70)) + 1|0);
+         $72 = HEAP8[$71>>0]|0;
+         $73 = $72 << 24 >> 24;
+         $74 = ($73|0)==(66);
+         if (!($74)) {
+          break L32;
+         }
+        }
+        $75 = $1;
+        $76 = ((($75)) + 2|0);
+        $1 = $76;
+       }
+       break;
+      }
+      case 15: case 14: case 13: case 12: case 11: case 9: case 7: case 6: case 5: case 4: case 3:  {
+       break;
+      }
+      case 8:  {
+       $77 = $1;
+       $78 = HEAP8[$77>>0]|0;
+       $79 = $78 << 24 >> 24;
+       $80 = ($79|0)==(48);
+       if ($80) {
+        $81 = $1;
+        $82 = ((($81)) + 1|0);
+        $83 = HEAP8[$82>>0]|0;
+        $84 = $83 << 24 >> 24;
+        $85 = ($84|0)==(111);
+        if (!($85)) {
+         $86 = $1;
+         $87 = ((($86)) + 1|0);
+         $88 = HEAP8[$87>>0]|0;
+         $89 = $88 << 24 >> 24;
+         $90 = ($89|0)==(79);
+         if (!($90)) {
+          break L32;
+         }
+        }
+        $91 = $1;
+        $92 = ((($91)) + 2|0);
+        $1 = $92;
+       }
+       break;
+      }
+      case 10:  {
+       $93 = $1;
+       $94 = HEAP8[$93>>0]|0;
+       $95 = $94 << 24 >> 24;
+       $96 = ($95|0)==(48);
+       if ($96) {
+        $97 = $1;
+        $98 = ((($97)) + 1|0);
+        $99 = HEAP8[$98>>0]|0;
+        $100 = $99 << 24 >> 24;
+        $101 = ($100|0)==(100);
+        if (!($101)) {
+         $102 = $1;
+         $103 = ((($102)) + 1|0);
+         $104 = HEAP8[$103>>0]|0;
+         $105 = $104 << 24 >> 24;
+         $106 = ($105|0)==(68);
+         if (!($106)) {
+          break L32;
+         }
+        }
+        $107 = $1;
+        $108 = ((($107)) + 2|0);
+        $1 = $108;
+       }
+       break;
+      }
+      case 16:  {
+       $109 = $1;
+       $110 = HEAP8[$109>>0]|0;
+       $111 = $110 << 24 >> 24;
+       $112 = ($111|0)==(48);
+       if ($112) {
+        $113 = $1;
+        $114 = ((($113)) + 1|0);
+        $115 = HEAP8[$114>>0]|0;
+        $116 = $115 << 24 >> 24;
+        $117 = ($116|0)==(120);
+        if (!($117)) {
+         $118 = $1;
+         $119 = ((($118)) + 1|0);
+         $120 = HEAP8[$119>>0]|0;
+         $121 = $120 << 24 >> 24;
+         $122 = ($121|0)==(88);
+         if (!($122)) {
+          break L32;
+         }
+        }
+        $123 = $1;
+        $124 = ((($123)) + 2|0);
+        $1 = $124;
+       }
+       break;
+      }
+      default: {
+       $125 = $2;
+       $126 = ($125|0)<(2);
+       $127 = $2;
+       $128 = (36)<($127|0);
+       $or$cond = $126 | $128;
+       if ($or$cond) {
+        $129 = $0;
+        $130 = $0;
+        $131 = (_mrb_class_get($130,68855)|0);
+        $132 = $2;
+        _mrb_fixnum_value_289($4,$132);
+        ;HEAP8[$vararg_buffer>>0]=HEAP8[$4>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$4+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$4+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$4+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$4+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$4+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$4+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$4+7>>0]|0;
+        _mrb_raisef($129,$131,55769,$vararg_buffer);
+        // unreachable;
+       }
+      }
+      }
+     } while(0);
+     $133 = $1;
+     $134 = HEAP8[$133>>0]|0;
+     $135 = $134 << 24 >> 24;
+     $136 = ($135|0)==(48);
+     do {
+      if ($136) {
+       $uscore = 0;
+       while(1) {
+        $137 = $1;
+        $138 = ((($137)) + 1|0);
+        $1 = $138;
+        $139 = HEAP8[$138>>0]|0;
+        $140 = $139 << 24 >> 24;
+        $c = $140;
+        $141 = ($140|0)==(48);
+        $142 = $c;
+        $143 = ($142|0)==(95);
+        $144 = $141 ? 1 : $143;
+        if (!($144)) {
+         break;
+        }
+        $145 = $c;
+        $146 = ($145|0)==(95);
+        if ($146) {
+         $147 = $uscore;
+         $148 = (($147) + 1)|0;
+         $uscore = $148;
+         $149 = ($148|0)>=(2);
+         if ($149) {
+          break;
+         } else {
+          continue;
+         }
+        } else {
+         $uscore = 0;
+         continue;
+        }
+       }
+       $150 = $1;
+       $151 = HEAP8[$150>>0]|0;
+       $152 = $151 << 24 >> 24;
+       $c = $152;
+       $153 = ($152|0)==(0);
+       $154 = $c;
+       $155 = ($154|0)==(32);
+       $or$cond3 = $153 | $155;
+       if (!($or$cond3)) {
+        $156 = $c;
+        $157 = (($156) - 9)|0;
+        $158 = ($157>>>0)<(5);
+        if (!($158)) {
+         break;
+        }
+       }
+       $159 = $1;
+       $160 = ((($159)) + -1|0);
+       $1 = $160;
+      }
+     } while(0);
+     $161 = $1;
+     $162 = HEAP8[$161>>0]|0;
+     $163 = $162 << 24 >> 24;
+     $c = $163;
+     $164 = $c;
+     $165 = (($164) - 48)|0;
+     $166 = ($165>>>0)<(10);
+     $167 = $c;
+     do {
+      if ($166) {
+       $168 = (($167) - 48)|0;
+       $179 = $168;
+      } else {
+       $169 = (($167) - 97)|0;
+       $170 = ($169>>>0)<(26);
+       $171 = $c;
+       if ($170) {
+        $172 = (($171) - 97)|0;
+        $173 = (($172) + 10)|0;
+        $179 = $173;
+        break;
+       }
+       $174 = (($171) - 65)|0;
+       $175 = ($174>>>0)<(26);
+       if ($175) {
+        $176 = $c;
+        $177 = (($176) - 65)|0;
+        $178 = (($177) + 10)|0;
+        $179 = $178;
+       } else {
+        $179 = -1;
+       }
+      }
+     } while(0);
+     $c = $179;
+     $180 = $c;
+     $181 = ($180|0)<(0);
+     if (!($181)) {
+      $182 = $c;
+      $183 = $2;
+      $184 = ($182|0)>=($183|0);
+      if (!($184)) {
+       $uscore = 0;
+       $187 = $1;
+       $p = $187;
+       while(1) {
+        $188 = $p;
+        $189 = HEAP8[$188>>0]|0;
+        $190 = ($189<<24>>24)!=(0);
+        if (!($190)) {
+         break;
+        }
+        $191 = $p;
+        $192 = HEAP8[$191>>0]|0;
+        $193 = $192 << 24 >> 24;
+        $194 = ($193|0)==(95);
+        if ($194) {
+         $195 = $uscore;
+         $196 = ($195|0)==(0);
+         if (!($196)) {
+          label = 70;
+          break;
+         }
+         $197 = $uscore;
+         $198 = (($197) + 1)|0;
+         $uscore = $198;
+        } else {
+         $uscore = 0;
+         $201 = $p;
+         $202 = HEAP8[$201>>0]|0;
+         $203 = $202 << 24 >> 24;
+         $204 = (($203) - 48)|0;
+         $205 = ($204>>>0)<(10);
+         $206 = $p;
+         $207 = HEAP8[$206>>0]|0;
+         $208 = $207 << 24 >> 24;
+         do {
+          if ($205) {
+           $209 = (($208) - 48)|0;
+           $224 = $209;
+          } else {
+           $210 = (($208) - 97)|0;
+           $211 = ($210>>>0)<(26);
+           $212 = $p;
+           $213 = HEAP8[$212>>0]|0;
+           $214 = $213 << 24 >> 24;
+           if ($211) {
+            $215 = (($214) - 97)|0;
+            $216 = (($215) + 10)|0;
+            $224 = $216;
+            break;
+           }
+           $217 = (($214) - 65)|0;
+           $218 = ($217>>>0)<(26);
+           if ($218) {
+            $219 = $p;
+            $220 = HEAP8[$219>>0]|0;
+            $221 = $220 << 24 >> 24;
+            $222 = (($221) - 65)|0;
+            $223 = (($222) + 10)|0;
+            $224 = $223;
+           } else {
+            $224 = -1;
+           }
+          }
+         } while(0);
+         $c = $224;
+         $225 = $c;
+         $226 = ($225|0)<(0);
+         if ($226) {
+          label = 79;
+          break;
+         }
+         $227 = $c;
+         $228 = $2;
+         $229 = ($227|0)>=($228|0);
+         if ($229) {
+          label = 79;
+          break;
+         }
+         $232 = $2;
+         $233 = ($232|0)<(0);
+         $234 = $233 << 31 >> 31;
+         $235 = $n;
+         $236 = $235;
+         $237 = HEAP32[$236>>2]|0;
+         $238 = (($235) + 4)|0;
+         $239 = $238;
+         $240 = HEAP32[$239>>2]|0;
+         $241 = (___muldi3(($237|0),($240|0),($232|0),($234|0))|0);
+         $242 = tempRet0;
+         $243 = $n;
+         $244 = $243;
+         HEAP32[$244>>2] = $241;
+         $245 = (($243) + 4)|0;
+         $246 = $245;
+         HEAP32[$246>>2] = $242;
+         $247 = $c;
+         $248 = ($247|0)<(0);
+         $249 = $248 << 31 >> 31;
+         $250 = $n;
+         $251 = $250;
+         $252 = HEAP32[$251>>2]|0;
+         $253 = (($250) + 4)|0;
+         $254 = $253;
+         $255 = HEAP32[$254>>2]|0;
+         $256 = (_i64Add(($252|0),($255|0),($247|0),($249|0))|0);
+         $257 = tempRet0;
+         $258 = $n;
+         $259 = $258;
+         HEAP32[$259>>2] = $256;
+         $260 = (($258) + 4)|0;
+         $261 = $260;
+         HEAP32[$261>>2] = $257;
+         $262 = $n;
+         $263 = $262;
+         $264 = HEAP32[$263>>2]|0;
+         $265 = (($262) + 4)|0;
+         $266 = $265;
+         $267 = HEAP32[$266>>2]|0;
+         $268 = ($267>>>0)>(0);
+         $269 = ($264>>>0)>(2147483647);
+         $270 = ($267|0)==(0);
+         $271 = $270 & $269;
+         $272 = $268 | $271;
+         if ($272) {
+          label = 81;
+          break;
+         }
+        }
+        $278 = $p;
+        $279 = ((($278)) + 1|0);
+        $p = $279;
+       }
+       if ((label|0) == 70) {
+        $199 = $3;
+        $200 = ($199|0)!=(0);
+        if ($200) {
+         break;
+        }
+       }
+       else if ((label|0) == 79) {
+        $230 = $3;
+        $231 = ($230|0)!=(0);
+        if ($231) {
+         break;
+        }
+       }
+       else if ((label|0) == 81) {
+        $273 = $0;
+        $274 = $0;
+        $275 = (_mrb_class_get($274,68855)|0);
+        $276 = $0;
+        $277 = $1;
+        _mrb_str_new_cstr($5,$276,$277);
+        ;HEAP8[$vararg_buffer4>>0]=HEAP8[$5>>0]|0;HEAP8[$vararg_buffer4+1>>0]=HEAP8[$5+1>>0]|0;HEAP8[$vararg_buffer4+2>>0]=HEAP8[$5+2>>0]|0;HEAP8[$vararg_buffer4+3>>0]=HEAP8[$5+3>>0]|0;HEAP8[$vararg_buffer4+4>>0]=HEAP8[$5+4>>0]|0;HEAP8[$vararg_buffer4+5>>0]=HEAP8[$5+5>>0]|0;HEAP8[$vararg_buffer4+6>>0]=HEAP8[$5+6>>0]|0;HEAP8[$vararg_buffer4+7>>0]=HEAP8[$5+7>>0]|0;
+        _mrb_raisef($273,$275,55786,$vararg_buffer4);
+        // unreachable;
+       }
+       $280 = $n;
+       $281 = $280;
+       $282 = HEAP32[$281>>2]|0;
+       $283 = (($280) + 4)|0;
+       $284 = $283;
+       $285 = HEAP32[$284>>2]|0;
+       $val = $282;
+       $286 = $3;
+       $287 = ($286|0)!=(0);
+       if ($287) {
+        $288 = $p;
+        $289 = $1;
+        $290 = ($288|0)==($289|0);
+        if ($290) {
+         break;
+        }
+        while(1) {
+         $291 = $p;
+         $292 = HEAP8[$291>>0]|0;
+         $293 = $292 << 24 >> 24;
+         $294 = ($293|0)!=(0);
+         if ($294) {
+          $295 = $p;
+          $296 = HEAP8[$295>>0]|0;
+          $297 = $296 << 24 >> 24;
+          $298 = ($297|0)==(32);
+          if ($298) {
+           $320 = 1;
+          } else {
+           $299 = $p;
+           $300 = HEAP8[$299>>0]|0;
+           $301 = $300 << 24 >> 24;
+           $302 = (($301) - 9)|0;
+           $303 = ($302>>>0)<(5);
+           $320 = $303;
+          }
+         } else {
+          $320 = 0;
+         }
+         $304 = $p;
+         if (!($320)) {
+          break;
+         }
+         $305 = ((($304)) + 1|0);
+         $p = $305;
+        }
+        $306 = HEAP8[$304>>0]|0;
+        $307 = ($306<<24>>24)!=(0);
+        if ($307) {
+         break;
+        }
+       }
+       $308 = $sign;
+       $309 = $308 << 24 >> 24;
+       $310 = ($309|0)!=(0);
+       $311 = $val;
+       $312 = (0 - ($311))|0;
+       $313 = $310 ? $311 : $312;
+       _mrb_fixnum_value_289($agg$result,$313);
+       STACKTOP = sp;return;
+      }
+     }
+     $185 = $3;
+     $186 = ($185|0)!=(0);
+     if ($186) {
+      break;
+     }
+     _mrb_fixnum_value_289($agg$result,0);
+     STACKTOP = sp;return;
+    }
+   }
+   $44 = $3;
+   $45 = ($44|0)!=(0);
+   if (!($45)) {
+    _mrb_fixnum_value_289($agg$result,0);
+    STACKTOP = sp;return;
+   }
+  } else {
+   $13 = $3;
+   $14 = ($13|0)!=(0);
+   if (!($14)) {
+    _mrb_fixnum_value_289($agg$result,0);
+    STACKTOP = sp;return;
+   }
+  }
+ } while(0);
+ $314 = $0;
+ $315 = $0;
+ $316 = (_mrb_class_get($315,68855)|0);
+ $317 = $0;
+ $318 = $1;
+ _mrb_str_new_cstr($6,$317,$318);
+ ;HEAP8[$vararg_buffer7>>0]=HEAP8[$6>>0]|0;HEAP8[$vararg_buffer7+1>>0]=HEAP8[$6+1>>0]|0;HEAP8[$vararg_buffer7+2>>0]=HEAP8[$6+2>>0]|0;HEAP8[$vararg_buffer7+3>>0]=HEAP8[$6+3>>0]|0;HEAP8[$vararg_buffer7+4>>0]=HEAP8[$6+4>>0]|0;HEAP8[$vararg_buffer7+5>>0]=HEAP8[$6+5>>0]|0;HEAP8[$vararg_buffer7+6>>0]=HEAP8[$6+6>>0]|0;HEAP8[$vararg_buffer7+7>>0]=HEAP8[$6+7>>0]|0;
+ _mrb_raisef($314,$316,55818,$vararg_buffer7);
+ // unreachable;
+}
+function _mrb_fixnum_value_289($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 3;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_string_value_cstr($mrb,$ptr) {
+ $mrb = $mrb|0;
+ $ptr = $ptr|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $len = 0, $p = 0, $ps = 0, $str = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 40|0;
+ $str = sp + 16|0;
+ $1 = $mrb;
+ $2 = $ptr;
+ $3 = $1;
+ $4 = $2;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$4+4>>2]|0;
+ _mrb_str_to_str($str,$3,$$byval_copy);
+ $5 = HEAP32[$str>>2]|0;
+ $ps = $5;
+ $6 = $1;
+ $7 = $ps;
+ $8 = (_mrb_str_strlen($6,$7)|0);
+ $len = $8;
+ $9 = $ps;
+ $10 = HEAP32[$9>>2]|0;
+ $11 = $10 >>> 11;
+ $12 = $11 & 8;
+ $13 = ($12|0)!=(0);
+ $14 = $ps;
+ $15 = ((($14)) + 12|0);
+ if ($13) {
+  $18 = $15;
+ } else {
+  $16 = ((($15)) + 8|0);
+  $17 = HEAP32[$16>>2]|0;
+  $18 = $17;
+ }
+ $p = $18;
+ $19 = $p;
+ $20 = ($19|0)!=(0|0);
+ if ($20) {
+  $21 = $len;
+  $22 = $p;
+  $23 = (($22) + ($21)|0);
+  $24 = HEAP8[$23>>0]|0;
+  $25 = $24 << 24 >> 24;
+  $26 = ($25|0)!=(0);
+  if (!($26)) {
+   $39 = $p;
+   $0 = $39;
+   $40 = $0;
+   STACKTOP = sp;return ($40|0);
+  }
+ }
+ $27 = $1;
+ $28 = $ps;
+ _mrb_str_modify($27,$28);
+ $29 = $ps;
+ $30 = HEAP32[$29>>2]|0;
+ $31 = $30 >>> 11;
+ $32 = $31 & 8;
+ $33 = ($32|0)!=(0);
+ $34 = $ps;
+ $35 = ((($34)) + 12|0);
+ if ($33) {
+  $38 = $35;
+ } else {
+  $36 = ((($35)) + 8|0);
+  $37 = HEAP32[$36>>2]|0;
+  $38 = $37;
+ }
+ $0 = $38;
+ $40 = $0;
+ STACKTOP = sp;return ($40|0);
+}
+function _mrb_str_to_inum($agg$result,$mrb,$str,$base,$badcheck) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ $base = $base|0;
+ $badcheck = $badcheck|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $len = 0, $s = 0, $str$byval_copy = 0, $temp_str = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 24|0;
+ $0 = $mrb;
+ $1 = $base;
+ $2 = $badcheck;
+ $3 = $2;
+ $4 = ($3<<24>>24)!=(0);
+ $5 = $0;
+ if ($4) {
+  $6 = (_mrb_string_value_cstr($5,$str)|0);
+  $s = $6;
+ } else {
+  ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+  $7 = (_mrb_string_value_ptr($5,$str$byval_copy)|0);
+  $s = $7;
+ }
+ $8 = $s;
+ $9 = ($8|0)!=(0|0);
+ if ($9) {
+  $10 = HEAP32[$str>>2]|0;
+  $11 = HEAP32[$10>>2]|0;
+  $12 = $11 >>> 11;
+  $13 = $12 & 8;
+  $14 = ($13|0)!=(0);
+  $15 = HEAP32[$str>>2]|0;
+  if ($14) {
+   $16 = HEAP32[$15>>2]|0;
+   $17 = $16 >>> 11;
+   $18 = $17 & 496;
+   $19 = $18 >> 4;
+   $22 = $19;
+  } else {
+   $20 = ((($15)) + 12|0);
+   $21 = HEAP32[$20>>2]|0;
+   $22 = $21;
+  }
+  $len = $22;
+  $23 = $len;
+  $24 = $s;
+  $25 = (($24) + ($23)|0);
+  $26 = HEAP8[$25>>0]|0;
+  $27 = ($26<<24>>24)!=(0);
+  if ($27) {
+   $28 = $0;
+   $29 = $s;
+   $30 = $len;
+   $31 = (_str_new($28,$29,$30)|0);
+   $temp_str = $31;
+   $32 = $temp_str;
+   $33 = HEAP32[$32>>2]|0;
+   $34 = $33 >>> 11;
+   $35 = $34 & 8;
+   $36 = ($35|0)!=(0);
+   $37 = $temp_str;
+   $38 = ((($37)) + 12|0);
+   if ($36) {
+    $41 = $38;
+   } else {
+    $39 = ((($38)) + 8|0);
+    $40 = HEAP32[$39>>2]|0;
+    $41 = $40;
+   }
+   $s = $41;
+  }
+ }
+ $42 = $0;
+ $43 = $s;
+ $44 = $1;
+ $45 = $2;
+ $46 = $45&255;
+ _mrb_cstr_to_inum($agg$result,$42,$43,$44,$46);
+ STACKTOP = sp;return;
+}
+function _mrb_cstr_to_dbl($mrb,$p,$badcheck) {
+ $mrb = $mrb|0;
+ $p = $p|0;
+ $badcheck = $badcheck|0;
+ var $0 = 0.0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0.0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0.0, $143 = 0.0, $144 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0;
+ var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0.0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0;
+ var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0;
+ var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0;
+ var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0;
+ var $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $buf = 0, $d = 0.0, $e = 0, $end = 0, $n = 0, $prev = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp + 16|0;
+ $end = sp + 40|0;
+ $buf = sp + 54|0;
+ $4 = sp + 32|0;
+ $1 = $mrb;
+ $2 = $p;
+ $3 = $badcheck;
+ $5 = $2;
+ $6 = ($5|0)!=(0|0);
+ if (!($6)) {
+  $0 = 0.0;
+  $143 = $0;
+  STACKTOP = sp;return (+$143);
+ }
+ while(1) {
+  $7 = $2;
+  $8 = HEAP8[$7>>0]|0;
+  $9 = $8 << 24 >> 24;
+  $10 = ($9|0)==(32);
+  if (!($10)) {
+   $11 = $2;
+   $12 = HEAP8[$11>>0]|0;
+   $13 = $12 << 24 >> 24;
+   $14 = (($13) - 9)|0;
+   $15 = ($14>>>0)<(5);
+   if (!($15)) {
+    break;
+   }
+  }
+  $16 = $2;
+  $17 = ((($16)) + 1|0);
+  $2 = $17;
+ }
+ $18 = $3;
+ $19 = ($18<<24>>24)!=(0);
+ do {
+  if (!($19)) {
+   $20 = $2;
+   $21 = HEAP8[$20>>0]|0;
+   $22 = $21 << 24 >> 24;
+   $23 = ($22|0)==(48);
+   if ($23) {
+    $24 = $2;
+    $25 = ((($24)) + 1|0);
+    $26 = HEAP8[$25>>0]|0;
+    $27 = $26 << 24 >> 24;
+    $28 = ($27|0)==(120);
+    if (!($28)) {
+     $29 = $2;
+     $30 = ((($29)) + 1|0);
+     $31 = HEAP8[$30>>0]|0;
+     $32 = $31 << 24 >> 24;
+     $33 = ($32|0)==(88);
+     if (!($33)) {
+      break;
+     }
+    }
+    $0 = 0.0;
+    $143 = $0;
+    STACKTOP = sp;return (+$143);
+   }
+  }
+ } while(0);
+ $34 = $2;
+ $35 = (+_strtod($34,$end));
+ $d = $35;
+ $36 = $2;
+ $37 = HEAP32[$end>>2]|0;
+ $38 = ($36|0)==($37|0);
+ L18: do {
+  if ($38) {
+   $39 = $3;
+   $40 = ($39<<24>>24)!=(0);
+   if (!($40)) {
+    $46 = $d;
+    $0 = $46;
+    $143 = $0;
+    STACKTOP = sp;return (+$143);
+   }
+  } else {
+   $47 = HEAP32[$end>>2]|0;
+   $48 = HEAP8[$47>>0]|0;
+   $49 = ($48<<24>>24)!=(0);
+   if ($49) {
+    $n = $buf;
+    $50 = ((($buf)) + 70|0);
+    $51 = ((($50)) + -1|0);
+    $e = $51;
+    $prev = 0;
+    while(1) {
+     $52 = $2;
+     $53 = HEAP32[$end>>2]|0;
+     $54 = ($52>>>0)<($53>>>0);
+     if (!($54)) {
+      break;
+     }
+     $55 = $n;
+     $56 = $e;
+     $57 = ($55>>>0)<($56>>>0);
+     if (!($57)) {
+      break;
+     }
+     $58 = $2;
+     $59 = ((($58)) + 1|0);
+     $2 = $59;
+     $60 = HEAP8[$58>>0]|0;
+     $61 = $n;
+     $62 = ((($61)) + 1|0);
+     $n = $62;
+     HEAP8[$61>>0] = $60;
+     $prev = $60;
+    }
+    L29: while(1) {
+     $63 = $2;
+     $64 = HEAP8[$63>>0]|0;
+     $65 = ($64<<24>>24)!=(0);
+     if (!($65)) {
+      break;
+     }
+     $66 = $2;
+     $67 = HEAP8[$66>>0]|0;
+     $68 = $67 << 24 >> 24;
+     $69 = ($68|0)==(95);
+     if ($69) {
+      $70 = $3;
+      $71 = ($70<<24>>24)!=(0);
+      if (!($71)) {
+       while(1) {
+        $85 = $2;
+        $86 = ((($85)) + 1|0);
+        $2 = $86;
+        $87 = HEAP8[$86>>0]|0;
+        $88 = $87 << 24 >> 24;
+        $89 = ($88|0)==(95);
+        if (!($89)) {
+         continue L29;
+        }
+       }
+      }
+      $72 = $n;
+      $73 = ($72|0)==($buf|0);
+      if ($73) {
+       break L18;
+      }
+      $74 = $prev;
+      $75 = $74 << 24 >> 24;
+      $76 = (($75) - 48)|0;
+      $77 = ($76>>>0)<(10);
+      if (!($77)) {
+       break L18;
+      }
+      $78 = $2;
+      $79 = ((($78)) + 1|0);
+      $2 = $79;
+      $80 = $2;
+      $81 = HEAP8[$80>>0]|0;
+      $82 = $81 << 24 >> 24;
+      $83 = (($82) - 48)|0;
+      $84 = ($83>>>0)<(10);
+      if (!($84)) {
+       break L18;
+      }
+     }
+     $90 = $2;
+     $91 = ((($90)) + 1|0);
+     $2 = $91;
+     $92 = HEAP8[$90>>0]|0;
+     $prev = $92;
+     $93 = $n;
+     $94 = $e;
+     $95 = ($93>>>0)<($94>>>0);
+     if (!($95)) {
+      continue;
+     }
+     $96 = $prev;
+     $97 = $n;
+     $98 = ((($97)) + 1|0);
+     $n = $98;
+     HEAP8[$97>>0] = $96;
+    }
+    $99 = $n;
+    HEAP8[$99>>0] = 0;
+    $2 = $buf;
+    $100 = $3;
+    $101 = ($100<<24>>24)!=(0);
+    do {
+     if (!($101)) {
+      $102 = $2;
+      $103 = HEAP8[$102>>0]|0;
+      $104 = $103 << 24 >> 24;
+      $105 = ($104|0)==(48);
+      if ($105) {
+       $106 = $2;
+       $107 = ((($106)) + 1|0);
+       $108 = HEAP8[$107>>0]|0;
+       $109 = $108 << 24 >> 24;
+       $110 = ($109|0)==(120);
+       if (!($110)) {
+        $111 = $2;
+        $112 = ((($111)) + 1|0);
+        $113 = HEAP8[$112>>0]|0;
+        $114 = $113 << 24 >> 24;
+        $115 = ($114|0)==(88);
+        if (!($115)) {
+         break;
+        }
+       }
+       $0 = 0.0;
+       $143 = $0;
+       STACKTOP = sp;return (+$143);
+      }
+     }
+    } while(0);
+    $116 = $2;
+    $117 = (+_strtod($116,$end));
+    $d = $117;
+    $118 = $3;
+    $119 = ($118<<24>>24)!=(0);
+    if ($119) {
+     $120 = HEAP32[$end>>2]|0;
+     $121 = ($120|0)!=(0|0);
+     if (!($121)) {
+      break;
+     }
+     $122 = $2;
+     $123 = HEAP32[$end>>2]|0;
+     $124 = ($122|0)==($123|0);
+     if ($124) {
+      break;
+     }
+     while(1) {
+      $125 = HEAP32[$end>>2]|0;
+      $126 = HEAP8[$125>>0]|0;
+      $127 = $126 << 24 >> 24;
+      $128 = ($127|0)!=(0);
+      if ($128) {
+       $129 = HEAP32[$end>>2]|0;
+       $130 = HEAP8[$129>>0]|0;
+       $131 = $130 << 24 >> 24;
+       $132 = ($131|0)==(32);
+       if ($132) {
+        $144 = 1;
+       } else {
+        $133 = HEAP32[$end>>2]|0;
+        $134 = HEAP8[$133>>0]|0;
+        $135 = $134 << 24 >> 24;
+        $136 = (($135) - 9)|0;
+        $137 = ($136>>>0)<(5);
+        $144 = $137;
+       }
+      } else {
+       $144 = 0;
+      }
+      $138 = HEAP32[$end>>2]|0;
+      if (!($144)) {
+       break;
+      }
+      $139 = ((($138)) + 1|0);
+      HEAP32[$end>>2] = $139;
+     }
+     $140 = HEAP8[$138>>0]|0;
+     $141 = ($140<<24>>24)!=(0);
+     if ($141) {
+      break;
+     }
+    }
+   }
+   $142 = $d;
+   $0 = $142;
+   $143 = $0;
+   STACKTOP = sp;return (+$143);
+  }
+ } while(0);
+ $41 = $1;
+ $42 = $1;
+ $43 = (_mrb_class_get($42,68855)|0);
+ $44 = $1;
+ $45 = $2;
+ _mrb_str_new_cstr($4,$44,$45);
+ ;HEAP8[$vararg_buffer>>0]=HEAP8[$4>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$4+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$4+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$4+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$4+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$4+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$4+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$4+7>>0]|0;
+ _mrb_raisef($41,$43,55848,$vararg_buffer);
+ // unreachable;
+ return +(0.0);
+}
+function _mrb_str_to_dbl($mrb,$str,$badcheck) {
+ $mrb = $mrb|0;
+ $str = $str|0;
+ $badcheck = $badcheck|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0.0, $7 = 0;
+ var $8 = 0, $9 = 0, $len = 0, $s = 0, $str$byval_copy = 0, $temp_str = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 32|0;
+ $2 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $badcheck;
+ $3 = $0;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_to_str($2,$3,$str$byval_copy);
+ ;HEAP32[$str>>2]=HEAP32[$2>>2]|0;HEAP32[$str+4>>2]=HEAP32[$2+4>>2]|0;
+ $4 = HEAP32[$str>>2]|0;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5 >>> 11;
+ $7 = $6 & 8;
+ $8 = ($7|0)!=(0);
+ $9 = HEAP32[$str>>2]|0;
+ $10 = ((($9)) + 12|0);
+ if ($8) {
+  $13 = $10;
+ } else {
+  $11 = ((($10)) + 8|0);
+  $12 = HEAP32[$11>>2]|0;
+  $13 = $12;
+ }
+ $s = $13;
+ $14 = HEAP32[$str>>2]|0;
+ $15 = HEAP32[$14>>2]|0;
+ $16 = $15 >>> 11;
+ $17 = $16 & 8;
+ $18 = ($17|0)!=(0);
+ $19 = HEAP32[$str>>2]|0;
+ if ($18) {
+  $20 = HEAP32[$19>>2]|0;
+  $21 = $20 >>> 11;
+  $22 = $21 & 496;
+  $23 = $22 >> 4;
+  $26 = $23;
+ } else {
+  $24 = ((($19)) + 12|0);
+  $25 = HEAP32[$24>>2]|0;
+  $26 = $25;
+ }
+ $len = $26;
+ $27 = $s;
+ $28 = ($27|0)!=(0|0);
+ if (!($28)) {
+  $58 = $0;
+  $59 = $s;
+  $60 = $1;
+  $61 = (+_mrb_cstr_to_dbl($58,$59,$60));
+  STACKTOP = sp;return (+$61);
+ }
+ $29 = $1;
+ $30 = $29&255;
+ $31 = ($30|0)!=(0);
+ if ($31) {
+  $32 = $s;
+  $33 = $len;
+  $34 = (_memchr($32,0,$33)|0);
+  $35 = ($34|0)!=(0|0);
+  if ($35) {
+   $36 = $0;
+   $37 = $0;
+   $38 = (_mrb_class_get($37,68855)|0);
+   _mrb_raise($36,$38,55877);
+   // unreachable;
+  }
+ }
+ $39 = $len;
+ $40 = $s;
+ $41 = (($40) + ($39)|0);
+ $42 = HEAP8[$41>>0]|0;
+ $43 = ($42<<24>>24)!=(0);
+ if (!($43)) {
+  $58 = $0;
+  $59 = $s;
+  $60 = $1;
+  $61 = (+_mrb_cstr_to_dbl($58,$59,$60));
+  STACKTOP = sp;return (+$61);
+ }
+ $44 = $0;
+ $45 = $s;
+ $46 = $len;
+ $47 = (_str_new($44,$45,$46)|0);
+ $temp_str = $47;
+ $48 = $temp_str;
+ $49 = HEAP32[$48>>2]|0;
+ $50 = $49 >>> 11;
+ $51 = $50 & 8;
+ $52 = ($51|0)!=(0);
+ $53 = $temp_str;
+ $54 = ((($53)) + 12|0);
+ if ($52) {
+  $57 = $54;
+ } else {
+  $55 = ((($54)) + 8|0);
+  $56 = HEAP32[$55>>2]|0;
+  $57 = $56;
+ }
+ $s = $57;
+ $58 = $0;
+ $59 = $s;
+ $60 = $1;
+ $61 = (+_mrb_cstr_to_dbl($58,$59,$60));
+ STACKTOP = sp;return (+$61);
+}
+function _mrb_str_dump($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
+ var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
+ var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0;
+ var $206 = 0, $207 = 0, $208 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0;
+ var $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0;
+ var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0;
+ var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0;
+ var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $c = 0, $c1 = 0, $len = 0, $p = 0, $pend = 0, $q = 0, $result = 0, $str$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 24|0;
+ $0 = $mrb;
+ $len = 2;
+ $1 = HEAP32[$str>>2]|0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 >>> 11;
+ $4 = $3 & 8;
+ $5 = ($4|0)!=(0);
+ $6 = HEAP32[$str>>2]|0;
+ $7 = ((($6)) + 12|0);
+ if ($5) {
+  $10 = $7;
+ } else {
+  $8 = ((($7)) + 8|0);
+  $9 = HEAP32[$8>>2]|0;
+  $10 = $9;
+ }
+ $p = $10;
+ $11 = $p;
+ $12 = HEAP32[$str>>2]|0;
+ $13 = HEAP32[$12>>2]|0;
+ $14 = $13 >>> 11;
+ $15 = $14 & 8;
+ $16 = ($15|0)!=(0);
+ $17 = HEAP32[$str>>2]|0;
+ if ($16) {
+  $18 = HEAP32[$17>>2]|0;
+  $19 = $18 >>> 11;
+  $20 = $19 & 496;
+  $21 = $20 >> 4;
+  $25 = $21;
+ } else {
+  $22 = ((($17)) + 12|0);
+  $23 = HEAP32[$22>>2]|0;
+  $25 = $23;
+ }
+ $24 = (($11) + ($25)|0);
+ $pend = $24;
+ L9: while(1) {
+  $26 = $p;
+  $27 = $pend;
+  $28 = ($26>>>0)<($27>>>0);
+  if (!($28)) {
+   break;
+  }
+  $29 = $p;
+  $30 = ((($29)) + 1|0);
+  $p = $30;
+  $31 = HEAP8[$29>>0]|0;
+  $c = $31;
+  $32 = $c;
+  $33 = $32&255;
+  switch ($33|0) {
+  case 27: case 7: case 8: case 11: case 12: case 9: case 13: case 10: case 92: case 34:  {
+   $34 = $len;
+   $35 = (($34) + 2)|0;
+   $len = $35;
+   continue L9;
+   break;
+  }
+  case 35:  {
+   $36 = $p;
+   $37 = $pend;
+   $38 = ($36>>>0)<($37>>>0);
+   if ($38) {
+    $39 = $p;
+    $40 = HEAP8[$39>>0]|0;
+    $41 = $40 << 24 >> 24;
+    $42 = ($41|0)==(36);
+    if ($42) {
+     $51 = 1;
+    } else {
+     $43 = $p;
+     $44 = HEAP8[$43>>0]|0;
+     $45 = $44 << 24 >> 24;
+     $46 = ($45|0)==(64);
+     if ($46) {
+      $51 = 1;
+     } else {
+      $47 = $p;
+      $48 = HEAP8[$47>>0]|0;
+      $49 = $48 << 24 >> 24;
+      $50 = ($49|0)==(123);
+      $51 = $50;
+     }
+    }
+   } else {
+    $51 = 0;
+   }
+   $52 = $51 ? 2 : 1;
+   $53 = $len;
+   $54 = (($53) + ($52))|0;
+   $len = $54;
+   continue L9;
+   break;
+  }
+  default: {
+   $55 = $c;
+   $56 = $55&255;
+   $57 = (($56) - 32)|0;
+   $58 = ($57>>>0)<(95);
+   $59 = $len;
+   if ($58) {
+    $60 = (($59) + 1)|0;
+    $len = $60;
+    continue L9;
+   } else {
+    $61 = (($59) + 4)|0;
+    $len = $61;
+    continue L9;
+   }
+  }
+  }
+ }
+ $62 = $0;
+ $63 = $len;
+ $64 = (_str_new($62,0,$63)|0);
+ $result = $64;
+ $65 = $0;
+ $66 = $result;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _str_with_class($65,$66,$str$byval_copy);
+ $67 = HEAP32[$str>>2]|0;
+ $68 = HEAP32[$67>>2]|0;
+ $69 = $68 >>> 11;
+ $70 = $69 & 8;
+ $71 = ($70|0)!=(0);
+ $72 = HEAP32[$str>>2]|0;
+ $73 = ((($72)) + 12|0);
+ if ($71) {
+  $76 = $73;
+ } else {
+  $74 = ((($73)) + 8|0);
+  $75 = HEAP32[$74>>2]|0;
+  $76 = $75;
+ }
+ $p = $76;
+ $77 = $p;
+ $78 = HEAP32[$str>>2]|0;
+ $79 = HEAP32[$78>>2]|0;
+ $80 = $79 >>> 11;
+ $81 = $80 & 8;
+ $82 = ($81|0)!=(0);
+ $83 = HEAP32[$str>>2]|0;
+ if ($82) {
+  $84 = HEAP32[$83>>2]|0;
+  $85 = $84 >>> 11;
+  $86 = $85 & 496;
+  $87 = $86 >> 4;
+  $91 = $87;
+ } else {
+  $88 = ((($83)) + 12|0);
+  $89 = HEAP32[$88>>2]|0;
+  $91 = $89;
+ }
+ $90 = (($77) + ($91)|0);
+ $pend = $90;
+ $92 = $result;
+ $93 = HEAP32[$92>>2]|0;
+ $94 = $93 >>> 11;
+ $95 = $94 & 8;
+ $96 = ($95|0)!=(0);
+ $97 = $result;
+ $98 = ((($97)) + 12|0);
+ if ($96) {
+  $101 = $98;
+ } else {
+  $99 = ((($98)) + 8|0);
+  $100 = HEAP32[$99>>2]|0;
+  $101 = $100;
+ }
+ $q = $101;
+ $102 = $q;
+ $103 = ((($102)) + 1|0);
+ $q = $103;
+ HEAP8[$102>>0] = 34;
+ L37: while(1) {
+  $104 = $p;
+  $105 = $pend;
+  $106 = ($104>>>0)<($105>>>0);
+  if (!($106)) {
+   break;
+  }
+  $107 = $p;
+  $108 = ((($107)) + 1|0);
+  $p = $108;
+  $109 = HEAP8[$107>>0]|0;
+  $c1 = $109;
+  $110 = $c1;
+  $111 = $110&255;
+  do {
+   switch ($111|0) {
+   case 92: case 34:  {
+    $112 = $q;
+    $113 = ((($112)) + 1|0);
+    $q = $113;
+    HEAP8[$112>>0] = 92;
+    $114 = $c1;
+    $115 = $q;
+    $116 = ((($115)) + 1|0);
+    $q = $116;
+    HEAP8[$115>>0] = $114;
+    continue L37;
+    break;
+   }
+   case 10:  {
+    $117 = $q;
+    $118 = ((($117)) + 1|0);
+    $q = $118;
+    HEAP8[$117>>0] = 92;
+    $119 = $q;
+    $120 = ((($119)) + 1|0);
+    $q = $120;
+    HEAP8[$119>>0] = 110;
+    continue L37;
+    break;
+   }
+   case 13:  {
+    $121 = $q;
+    $122 = ((($121)) + 1|0);
+    $q = $122;
+    HEAP8[$121>>0] = 92;
+    $123 = $q;
+    $124 = ((($123)) + 1|0);
+    $q = $124;
+    HEAP8[$123>>0] = 114;
+    continue L37;
+    break;
+   }
+   case 9:  {
+    $125 = $q;
+    $126 = ((($125)) + 1|0);
+    $q = $126;
+    HEAP8[$125>>0] = 92;
+    $127 = $q;
+    $128 = ((($127)) + 1|0);
+    $q = $128;
+    HEAP8[$127>>0] = 116;
+    continue L37;
+    break;
+   }
+   case 12:  {
+    $129 = $q;
+    $130 = ((($129)) + 1|0);
+    $q = $130;
+    HEAP8[$129>>0] = 92;
+    $131 = $q;
+    $132 = ((($131)) + 1|0);
+    $q = $132;
+    HEAP8[$131>>0] = 102;
+    continue L37;
+    break;
+   }
+   case 11:  {
+    $133 = $q;
+    $134 = ((($133)) + 1|0);
+    $q = $134;
+    HEAP8[$133>>0] = 92;
+    $135 = $q;
+    $136 = ((($135)) + 1|0);
+    $q = $136;
+    HEAP8[$135>>0] = 118;
+    continue L37;
+    break;
+   }
+   case 8:  {
+    $137 = $q;
+    $138 = ((($137)) + 1|0);
+    $q = $138;
+    HEAP8[$137>>0] = 92;
+    $139 = $q;
+    $140 = ((($139)) + 1|0);
+    $q = $140;
+    HEAP8[$139>>0] = 98;
+    continue L37;
+    break;
+   }
+   case 7:  {
+    $141 = $q;
+    $142 = ((($141)) + 1|0);
+    $q = $142;
+    HEAP8[$141>>0] = 92;
+    $143 = $q;
+    $144 = ((($143)) + 1|0);
+    $q = $144;
+    HEAP8[$143>>0] = 97;
+    continue L37;
+    break;
+   }
+   case 27:  {
+    $145 = $q;
+    $146 = ((($145)) + 1|0);
+    $q = $146;
+    HEAP8[$145>>0] = 92;
+    $147 = $q;
+    $148 = ((($147)) + 1|0);
+    $q = $148;
+    HEAP8[$147>>0] = 101;
+    continue L37;
+    break;
+   }
+   case 35:  {
+    $149 = $p;
+    $150 = $pend;
+    $151 = ($149>>>0)<($150>>>0);
+    do {
+     if ($151) {
+      $152 = $p;
+      $153 = HEAP8[$152>>0]|0;
+      $154 = $153 << 24 >> 24;
+      $155 = ($154|0)==(36);
+      if (!($155)) {
+       $156 = $p;
+       $157 = HEAP8[$156>>0]|0;
+       $158 = $157 << 24 >> 24;
+       $159 = ($158|0)==(64);
+       if (!($159)) {
+        $160 = $p;
+        $161 = HEAP8[$160>>0]|0;
+        $162 = $161 << 24 >> 24;
+        $163 = ($162|0)==(123);
+        if (!($163)) {
+         break;
+        }
+       }
+      }
+      $164 = $q;
+      $165 = ((($164)) + 1|0);
+      $q = $165;
+      HEAP8[$164>>0] = 92;
+     }
+    } while(0);
+    $166 = $q;
+    $167 = ((($166)) + 1|0);
+    $q = $167;
+    HEAP8[$166>>0] = 35;
+    continue L37;
+    break;
+   }
+   default: {
+    $168 = $c1;
+    $169 = $168&255;
+    $170 = (($169) - 32)|0;
+    $171 = ($170>>>0)<(95);
+    if ($171) {
+     $172 = $c1;
+     $173 = $q;
+     $174 = ((($173)) + 1|0);
+     $q = $174;
+     HEAP8[$173>>0] = $172;
+     continue L37;
+    } else {
+     $175 = $q;
+     $176 = ((($175)) + 1|0);
+     $q = $176;
+     HEAP8[$175>>0] = 92;
+     $177 = $c1;
+     $178 = $177&255;
+     $179 = (($178|0) % 8)&-1;
+     $180 = (48 + ($179))|0;
+     $181 = $180&255;
+     $182 = $q;
+     $183 = ((($182)) + 2|0);
+     HEAP8[$183>>0] = $181;
+     $184 = $c1;
+     $185 = $184&255;
+     $186 = (($185|0) / 8)&-1;
+     $187 = $186&255;
+     $c1 = $187;
+     $188 = $c1;
+     $189 = $188&255;
+     $190 = (($189|0) % 8)&-1;
+     $191 = (48 + ($190))|0;
+     $192 = $191&255;
+     $193 = $q;
+     $194 = ((($193)) + 1|0);
+     HEAP8[$194>>0] = $192;
+     $195 = $c1;
+     $196 = $195&255;
+     $197 = (($196|0) / 8)&-1;
+     $198 = $197&255;
+     $c1 = $198;
+     $199 = $c1;
+     $200 = $199&255;
+     $201 = (($200|0) % 8)&-1;
+     $202 = (48 + ($201))|0;
+     $203 = $202&255;
+     $204 = $q;
+     HEAP8[$204>>0] = $203;
+     $205 = $q;
+     $206 = ((($205)) + 3|0);
+     $q = $206;
+     continue L37;
+    }
+   }
+   }
+  } while(0);
+ }
+ $207 = $q;
+ HEAP8[$207>>0] = 34;
+ $208 = $result;
+ _mrb_obj_value_259($agg$result,$208);
+ STACKTOP = sp;return;
+}
+function _mrb_str_cat($agg$result,$mrb,$str,$ptr,$len) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ $ptr = $ptr|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $ptr;
+ $2 = $len;
+ $3 = $0;
+ $4 = HEAP32[$str>>2]|0;
+ $5 = $1;
+ $6 = $2;
+ _str_buf_cat($3,$4,$5,$6);
+ ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _str_buf_cat($mrb,$s,$ptr,$len) {
+ $mrb = $mrb|0;
+ $s = $s|0;
+ $ptr = $ptr|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
+ var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
+ var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
+ var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0;
+ var $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0;
+ var $99 = 0, $capa = 0, $off = 0, $tmp_n = 0, $total = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $s;
+ $2 = $ptr;
+ $3 = $len;
+ $off = -1;
+ $4 = $3;
+ $5 = ($4|0)==(0);
+ if ($5) {
+  STACKTOP = sp;return;
+ }
+ $6 = $0;
+ $7 = $1;
+ _mrb_str_modify($6,$7);
+ $8 = $2;
+ $9 = $1;
+ $10 = HEAP32[$9>>2]|0;
+ $11 = $10 >>> 11;
+ $12 = $11 & 8;
+ $13 = ($12|0)!=(0);
+ $14 = $1;
+ $15 = ((($14)) + 12|0);
+ if ($13) {
+  $19 = $15;
+ } else {
+  $16 = ((($15)) + 8|0);
+  $17 = HEAP32[$16>>2]|0;
+  $19 = $17;
+ }
+ $18 = ($8>>>0)>=($19>>>0);
+ if ($18) {
+  $20 = $2;
+  $21 = $1;
+  $22 = HEAP32[$21>>2]|0;
+  $23 = $22 >>> 11;
+  $24 = $23 & 8;
+  $25 = ($24|0)!=(0);
+  $26 = $1;
+  $27 = ((($26)) + 12|0);
+  if ($25) {
+   $43 = $27;
+  } else {
+   $28 = ((($27)) + 8|0);
+   $29 = HEAP32[$28>>2]|0;
+   $43 = $29;
+  }
+  $30 = $1;
+  $31 = HEAP32[$30>>2]|0;
+  $32 = $31 >>> 11;
+  $33 = $32 & 8;
+  $34 = ($33|0)!=(0);
+  $35 = $1;
+  if ($34) {
+   $36 = HEAP32[$35>>2]|0;
+   $37 = $36 >>> 11;
+   $38 = $37 & 496;
+   $39 = $38 >> 4;
+   $44 = $39;
+  } else {
+   $40 = ((($35)) + 12|0);
+   $41 = HEAP32[$40>>2]|0;
+   $44 = $41;
+  }
+  $42 = (($43) + ($44)|0);
+  $45 = ($20>>>0)<=($42>>>0);
+  if ($45) {
+   $46 = $2;
+   $47 = $1;
+   $48 = HEAP32[$47>>2]|0;
+   $49 = $48 >>> 11;
+   $50 = $49 & 8;
+   $51 = ($50|0)!=(0);
+   $52 = $1;
+   $53 = ((($52)) + 12|0);
+   if ($51) {
+    $57 = $53;
+   } else {
+    $54 = ((($53)) + 8|0);
+    $55 = HEAP32[$54>>2]|0;
+    $57 = $55;
+   }
+   $56 = $46;
+   $58 = $57;
+   $59 = (($56) - ($58))|0;
+   $off = $59;
+  }
+ }
+ $60 = $1;
+ $61 = HEAP32[$60>>2]|0;
+ $62 = $61 >>> 11;
+ $63 = $62 & 8;
+ $64 = ($63|0)!=(0);
+ if ($64) {
+  $capa = 11;
+ } else {
+  $65 = $1;
+  $66 = ((($65)) + 12|0);
+  $67 = ((($66)) + 4|0);
+  $68 = HEAP32[$67>>2]|0;
+  $capa = $68;
+ }
+ $69 = $1;
+ $70 = HEAP32[$69>>2]|0;
+ $71 = $70 >>> 11;
+ $72 = $71 & 8;
+ $73 = ($72|0)!=(0);
+ $74 = $1;
+ if ($73) {
+  $75 = HEAP32[$74>>2]|0;
+  $76 = $75 >>> 11;
+  $77 = $76 & 496;
+  $78 = $77 >> 4;
+  $83 = $78;
+ } else {
+  $79 = ((($74)) + 12|0);
+  $80 = HEAP32[$79>>2]|0;
+  $83 = $80;
+ }
+ $81 = $3;
+ $82 = (2147483647 - ($81))|0;
+ $84 = ($83|0)>=($82|0);
+ if ($84) {
+  $85 = $0;
+  $86 = $0;
+  $87 = (_mrb_class_get($86,68855)|0);
+  _mrb_raise($85,$87,55411);
+  // unreachable;
+ }
+ $88 = $1;
+ $89 = HEAP32[$88>>2]|0;
+ $90 = $89 >>> 11;
+ $91 = $90 & 8;
+ $92 = ($91|0)!=(0);
+ $93 = $1;
+ if ($92) {
+  $94 = HEAP32[$93>>2]|0;
+  $95 = $94 >>> 11;
+  $96 = $95 & 496;
+  $97 = $96 >> 4;
+  $102 = $97;
+ } else {
+  $98 = ((($93)) + 12|0);
+  $99 = HEAP32[$98>>2]|0;
+  $102 = $99;
+ }
+ $100 = $3;
+ $101 = (($102) + ($100))|0;
+ $total = $101;
+ $103 = $capa;
+ $104 = $total;
+ $105 = ($103>>>0)<=($104>>>0);
+ if ($105) {
+  while(1) {
+   $106 = $total;
+   $107 = $capa;
+   $108 = ($106>>>0)>($107>>>0);
+   if (!($108)) {
+    break;
+   }
+   $109 = $capa;
+   $110 = (($109) + 1)|0;
+   $111 = ($110>>>0)>=(1073741823);
+   if ($111) {
+    label = 31;
+    break;
+   }
+   $115 = $capa;
+   $116 = (($115) + 1)|0;
+   $117 = $116<<1;
+   $capa = $117;
+  }
+  if ((label|0) == 31) {
+   $112 = $total;
+   $113 = (($112) + 4095)|0;
+   $114 = (($113>>>0) / 4096)&-1;
+   $capa = $114;
+  }
+  $118 = $0;
+  $119 = $1;
+  $120 = $capa;
+  _resize_capa($118,$119,$120);
+ }
+ $121 = $off;
+ $122 = ($121|0)!=(-1);
+ if ($122) {
+  $123 = $1;
+  $124 = HEAP32[$123>>2]|0;
+  $125 = $124 >>> 11;
+  $126 = $125 & 8;
+  $127 = ($126|0)!=(0);
+  $128 = $1;
+  $129 = ((($128)) + 12|0);
+  if ($127) {
+   $134 = $129;
+  } else {
+   $130 = ((($129)) + 8|0);
+   $131 = HEAP32[$130>>2]|0;
+   $134 = $131;
+  }
+  $132 = $off;
+  $133 = (($134) + ($132)|0);
+  $2 = $133;
+ }
+ $135 = $1;
+ $136 = HEAP32[$135>>2]|0;
+ $137 = $136 >>> 11;
+ $138 = $137 & 8;
+ $139 = ($138|0)!=(0);
+ $140 = $1;
+ $141 = ((($140)) + 12|0);
+ if ($139) {
+  $157 = $141;
+ } else {
+  $142 = ((($141)) + 8|0);
+  $143 = HEAP32[$142>>2]|0;
+  $157 = $143;
+ }
+ $144 = $1;
+ $145 = HEAP32[$144>>2]|0;
+ $146 = $145 >>> 11;
+ $147 = $146 & 8;
+ $148 = ($147|0)!=(0);
+ $149 = $1;
+ if ($148) {
+  $150 = HEAP32[$149>>2]|0;
+  $151 = $150 >>> 11;
+  $152 = $151 & 496;
+  $153 = $152 >> 4;
+  $158 = $153;
+ } else {
+  $154 = ((($149)) + 12|0);
+  $155 = HEAP32[$154>>2]|0;
+  $158 = $155;
+ }
+ $156 = (($157) + ($158)|0);
+ $159 = $2;
+ $160 = $3;
+ _memcpy(($156|0),($159|0),($160|0))|0;
+ $161 = $1;
+ $162 = HEAP32[$161>>2]|0;
+ $163 = $162 >>> 11;
+ $164 = $163 & 8;
+ $165 = ($164|0)!=(0);
+ $166 = $total;
+ if ($165) {
+  $tmp_n = $166;
+  $167 = $1;
+  $168 = HEAP32[$167>>2]|0;
+  $169 = $168 >>> 11;
+  $170 = $169 & -497;
+  $171 = HEAP32[$167>>2]|0;
+  $172 = $170 & 2097151;
+  $173 = $172 << 11;
+  $174 = $171 & 2047;
+  $175 = $174 | $173;
+  HEAP32[$167>>2] = $175;
+  $176 = $tmp_n;
+  $177 = $176 << 4;
+  $178 = $1;
+  $179 = HEAP32[$178>>2]|0;
+  $180 = $179 >>> 11;
+  $181 = $180 | $177;
+  $182 = HEAP32[$178>>2]|0;
+  $183 = $181 & 2097151;
+  $184 = $183 << 11;
+  $185 = $182 & 2047;
+  $186 = $185 | $184;
+  HEAP32[$178>>2] = $186;
+ } else {
+  $187 = $1;
+  $188 = ((($187)) + 12|0);
+  HEAP32[$188>>2] = $166;
+ }
+ $189 = $total;
+ $190 = $1;
+ $191 = HEAP32[$190>>2]|0;
+ $192 = $191 >>> 11;
+ $193 = $192 & 8;
+ $194 = ($193|0)!=(0);
+ $195 = $1;
+ $196 = ((($195)) + 12|0);
+ if ($194) {
+  $200 = $196;
+ } else {
+  $197 = ((($196)) + 8|0);
+  $198 = HEAP32[$197>>2]|0;
+  $200 = $198;
+ }
+ $199 = (($200) + ($189)|0);
+ HEAP8[$199>>0] = 0;
+ STACKTOP = sp;return;
+}
+function _mrb_str_cat_cstr($agg$result,$mrb,$str,$ptr) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ $ptr = $ptr|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $str$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $ptr;
+ $2 = $0;
+ $3 = $1;
+ $4 = $1;
+ $5 = (_strlen($4)|0);
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_cat($agg$result,$2,$str$byval_copy,$3,$5);
+ STACKTOP = sp;return;
+}
+function _mrb_str_cat_str($agg$result,$mrb,$str,$str2) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ $str2 = $str2|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $str$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ $2 = HEAP32[$str2>>2]|0;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $4 & 8;
+ $6 = ($5|0)!=(0);
+ $7 = HEAP32[$str2>>2]|0;
+ $8 = ((($7)) + 12|0);
+ if ($6) {
+  $23 = $8;
+ } else {
+  $9 = ((($8)) + 8|0);
+  $10 = HEAP32[$9>>2]|0;
+  $23 = $10;
+ }
+ $11 = HEAP32[$str2>>2]|0;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $12 >>> 11;
+ $14 = $13 & 8;
+ $15 = ($14|0)!=(0);
+ $16 = HEAP32[$str2>>2]|0;
+ if ($15) {
+  $17 = HEAP32[$16>>2]|0;
+  $18 = $17 >>> 11;
+  $19 = $18 & 496;
+  $20 = $19 >> 4;
+  $24 = $20;
+ } else {
+  $21 = ((($16)) + 12|0);
+  $22 = HEAP32[$21>>2]|0;
+  $24 = $22;
+ }
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_cat($agg$result,$1,$str$byval_copy,$23,$24);
+ STACKTOP = sp;return;
+}
+function _mrb_str_append($agg$result,$mrb,$str1,$str2) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str1 = $str1|0;
+ $str2 = $str2|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $str1$byval_copy = 0, $str2$byval_copy = 0, $str2$byval_copy1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str2$byval_copy1 = sp + 32|0;
+ $str1$byval_copy = sp + 24|0;
+ $str2$byval_copy = sp + 16|0;
+ $1 = sp;
+ $0 = $mrb;
+ $2 = $0;
+ ;HEAP32[$str2$byval_copy>>2]=HEAP32[$str2>>2]|0;HEAP32[$str2$byval_copy+4>>2]=HEAP32[$str2+4>>2]|0;
+ _mrb_str_to_str($1,$2,$str2$byval_copy);
+ ;HEAP32[$str2>>2]=HEAP32[$1>>2]|0;HEAP32[$str2+4>>2]=HEAP32[$1+4>>2]|0;
+ $3 = $0;
+ ;HEAP32[$str1$byval_copy>>2]=HEAP32[$str1>>2]|0;HEAP32[$str1$byval_copy+4>>2]=HEAP32[$str1+4>>2]|0;
+ ;HEAP32[$str2$byval_copy1>>2]=HEAP32[$str2>>2]|0;HEAP32[$str2$byval_copy1+4>>2]=HEAP32[$str2+4>>2]|0;
+ _mrb_str_cat_str($agg$result,$3,$str1$byval_copy,$str2$byval_copy1);
+ STACKTOP = sp;return;
+}
+function _mrb_str_inspect($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0;
+ var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0;
+ var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0;
+ var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0;
+ var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $buf = 0, $c = 0;
+ var $cc = 0, $clen = 0, $i = 0, $p = 0, $pend = 0, $result = 0, $result$byval_copy = 0, $result$byval_copy1 = 0, $result$byval_copy2 = 0, $result$byval_copy3 = 0, $result$byval_copy4 = 0, $result$byval_copy5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $result$byval_copy5 = sp + 120|0;
+ $result$byval_copy4 = sp + 112|0;
+ $result$byval_copy3 = sp + 104|0;
+ $result$byval_copy2 = sp + 96|0;
+ $result$byval_copy1 = sp + 88|0;
+ $result$byval_copy = sp + 80|0;
+ $buf = sp + 130|0;
+ $result = sp + 56|0;
+ $1 = sp + 40|0;
+ $2 = sp + 32|0;
+ $3 = sp + 24|0;
+ $4 = sp + 16|0;
+ $5 = sp + 8|0;
+ $6 = sp;
+ $0 = $mrb;
+ $7 = $0;
+ _mrb_str_new_static($result,$7,55913,1);
+ $8 = HEAP32[$str>>2]|0;
+ $9 = HEAP32[$8>>2]|0;
+ $10 = $9 >>> 11;
+ $11 = $10 & 8;
+ $12 = ($11|0)!=(0);
+ $13 = HEAP32[$str>>2]|0;
+ $14 = ((($13)) + 12|0);
+ if ($12) {
+  $17 = $14;
+ } else {
+  $15 = ((($14)) + 8|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = $16;
+ }
+ $p = $17;
+ $18 = HEAP32[$str>>2]|0;
+ $19 = HEAP32[$18>>2]|0;
+ $20 = $19 >>> 11;
+ $21 = $20 & 8;
+ $22 = ($21|0)!=(0);
+ $23 = HEAP32[$str>>2]|0;
+ $24 = ((($23)) + 12|0);
+ if ($22) {
+  $40 = $24;
+ } else {
+  $25 = ((($24)) + 8|0);
+  $26 = HEAP32[$25>>2]|0;
+  $40 = $26;
+ }
+ $27 = HEAP32[$str>>2]|0;
+ $28 = HEAP32[$27>>2]|0;
+ $29 = $28 >>> 11;
+ $30 = $29 & 8;
+ $31 = ($30|0)!=(0);
+ $32 = HEAP32[$str>>2]|0;
+ if ($31) {
+  $33 = HEAP32[$32>>2]|0;
+  $34 = $33 >>> 11;
+  $35 = $34 & 496;
+  $36 = $35 >> 4;
+  $41 = $36;
+ } else {
+  $37 = ((($32)) + 12|0);
+  $38 = HEAP32[$37>>2]|0;
+  $41 = $38;
+ }
+ $39 = (($40) + ($41)|0);
+ $pend = $39;
+ while(1) {
+  $42 = $p;
+  $43 = $pend;
+  $44 = ($42>>>0)<($43>>>0);
+  if (!($44)) {
+   break;
+  }
+  $45 = $p;
+  $46 = $pend;
+  $47 = (_utf8len($45,$46)|0);
+  $clen = $47;
+  $48 = $clen;
+  $49 = ($48|0)>(1);
+  L16: do {
+   if ($49) {
+    $i = 0;
+    while(1) {
+     $50 = $i;
+     $51 = $clen;
+     $52 = ($50|0)<($51|0);
+     if (!($52)) {
+      break;
+     }
+     $53 = $i;
+     $54 = $p;
+     $55 = (($54) + ($53)|0);
+     $56 = HEAP8[$55>>0]|0;
+     $57 = $i;
+     $58 = (($buf) + ($57)|0);
+     HEAP8[$58>>0] = $56;
+     $59 = $i;
+     $60 = (($59) + 1)|0;
+     $i = $60;
+    }
+    $61 = $0;
+    $62 = $clen;
+    ;HEAP32[$result$byval_copy>>2]=HEAP32[$result>>2]|0;HEAP32[$result$byval_copy+4>>2]=HEAP32[$result+4>>2]|0;
+    _mrb_str_cat($1,$61,$result$byval_copy,$buf,$62);
+    $63 = $clen;
+    $64 = (($63) - 1)|0;
+    $65 = $p;
+    $66 = (($65) + ($64)|0);
+    $p = $66;
+   } else {
+    $67 = $p;
+    $68 = HEAP8[$67>>0]|0;
+    $c = $68;
+    $69 = $c;
+    $70 = $69&255;
+    $71 = ($70|0)==(34);
+    do {
+     if (!($71)) {
+      $72 = $c;
+      $73 = $72&255;
+      $74 = ($73|0)==(92);
+      if (!($74)) {
+       $75 = $c;
+       $76 = $75&255;
+       $77 = ($76|0)==(35);
+       if ($77) {
+        $78 = $p;
+        $79 = $pend;
+        $80 = ($78>>>0)<($79>>>0);
+        if ($80) {
+         $81 = $p;
+         $82 = HEAP8[$81>>0]|0;
+         $83 = $82 << 24 >> 24;
+         $84 = ($83|0)==(36);
+         if ($84) {
+          break;
+         }
+         $85 = $p;
+         $86 = HEAP8[$85>>0]|0;
+         $87 = $86 << 24 >> 24;
+         $88 = ($87|0)==(64);
+         if ($88) {
+          break;
+         }
+         $89 = $p;
+         $90 = HEAP8[$89>>0]|0;
+         $91 = $90 << 24 >> 24;
+         $92 = ($91|0)==(123);
+         if ($92) {
+          break;
+         }
+        }
+       }
+       $96 = $c;
+       $97 = $96&255;
+       $98 = (($97) - 32)|0;
+       $99 = ($98>>>0)<(95);
+       $100 = $c;
+       if ($99) {
+        HEAP8[$buf>>0] = $100;
+        $101 = $0;
+        ;HEAP32[$result$byval_copy2>>2]=HEAP32[$result>>2]|0;HEAP32[$result$byval_copy2+4>>2]=HEAP32[$result+4>>2]|0;
+        _mrb_str_cat($3,$101,$result$byval_copy2,$buf,1);
+        break L16;
+       }
+       $102 = $100&255;
+       switch ($102|0) {
+       case 10:  {
+        $cc = 110;
+        break;
+       }
+       case 13:  {
+        $cc = 114;
+        break;
+       }
+       case 9:  {
+        $cc = 116;
+        break;
+       }
+       case 12:  {
+        $cc = 102;
+        break;
+       }
+       case 11:  {
+        $cc = 118;
+        break;
+       }
+       case 8:  {
+        $cc = 98;
+        break;
+       }
+       case 7:  {
+        $cc = 97;
+        break;
+       }
+       case 27:  {
+        $cc = 101;
+        break;
+       }
+       default: {
+        $cc = 0;
+       }
+       }
+       $103 = $cc;
+       $104 = ($103<<24>>24)!=(0);
+       HEAP8[$buf>>0] = 92;
+       if ($104) {
+        $105 = $cc;
+        $106 = ((($buf)) + 1|0);
+        HEAP8[$106>>0] = $105;
+        $107 = $0;
+        ;HEAP32[$result$byval_copy3>>2]=HEAP32[$result>>2]|0;HEAP32[$result$byval_copy3+4>>2]=HEAP32[$result+4>>2]|0;
+        _mrb_str_cat($4,$107,$result$byval_copy3,$buf,2);
+        break L16;
+       } else {
+        $108 = $c;
+        $109 = $108&255;
+        $110 = (($109|0) % 8)&-1;
+        $111 = (48 + ($110))|0;
+        $112 = $111&255;
+        $113 = ((($buf)) + 3|0);
+        HEAP8[$113>>0] = $112;
+        $114 = $c;
+        $115 = $114&255;
+        $116 = (($115|0) / 8)&-1;
+        $117 = $116&255;
+        $c = $117;
+        $118 = $c;
+        $119 = $118&255;
+        $120 = (($119|0) % 8)&-1;
+        $121 = (48 + ($120))|0;
+        $122 = $121&255;
+        $123 = ((($buf)) + 2|0);
+        HEAP8[$123>>0] = $122;
+        $124 = $c;
+        $125 = $124&255;
+        $126 = (($125|0) / 8)&-1;
+        $127 = $126&255;
+        $c = $127;
+        $128 = $c;
+        $129 = $128&255;
+        $130 = (($129|0) % 8)&-1;
+        $131 = (48 + ($130))|0;
+        $132 = $131&255;
+        $133 = ((($buf)) + 1|0);
+        HEAP8[$133>>0] = $132;
+        $134 = $0;
+        ;HEAP32[$result$byval_copy4>>2]=HEAP32[$result>>2]|0;HEAP32[$result$byval_copy4+4>>2]=HEAP32[$result+4>>2]|0;
+        _mrb_str_cat($5,$134,$result$byval_copy4,$buf,4);
+        break L16;
+       }
+      }
+     }
+    } while(0);
+    HEAP8[$buf>>0] = 92;
+    $93 = $c;
+    $94 = ((($buf)) + 1|0);
+    HEAP8[$94>>0] = $93;
+    $95 = $0;
+    ;HEAP32[$result$byval_copy1>>2]=HEAP32[$result>>2]|0;HEAP32[$result$byval_copy1+4>>2]=HEAP32[$result+4>>2]|0;
+    _mrb_str_cat($2,$95,$result$byval_copy1,$buf,2);
+   }
+  } while(0);
+  $135 = $p;
+  $136 = ((($135)) + 1|0);
+  $p = $136;
+ }
+ $137 = $0;
+ ;HEAP32[$result$byval_copy5>>2]=HEAP32[$result>>2]|0;HEAP32[$result$byval_copy5+4>>2]=HEAP32[$result+4>>2]|0;
+ _mrb_str_cat($6,$137,$result$byval_copy5,55913,1);
+ ;HEAP32[$agg$result>>2]=HEAP32[$result>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$result+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_init_string($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
+ var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $s = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = $0;
+ $3 = ((($2)) + 32|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = (_mrb_define_class($1,64878,$4)|0);
+ $s = $5;
+ $6 = $0;
+ $7 = ((($6)) + 48|0);
+ HEAP32[$7>>2] = $5;
+ $8 = $s;
+ $9 = HEAP32[$8>>2]|0;
+ $10 = $9 >>> 11;
+ $11 = $10 & -256;
+ $12 = $11 | 16;
+ $13 = $s;
+ $14 = HEAP32[$13>>2]|0;
+ $15 = $12 & 2097151;
+ $16 = $15 << 11;
+ $17 = $14 & 2047;
+ $18 = $17 | $16;
+ HEAP32[$13>>2] = $18;
+ $19 = $0;
+ $20 = $s;
+ _mrb_define_method($19,$20,55915,84,0);
+ $21 = $0;
+ $22 = $s;
+ _mrb_define_method($21,$22,68851,85,262144);
+ $23 = $0;
+ $24 = $s;
+ _mrb_define_method($23,$24,68902,86,262144);
+ $25 = $0;
+ $26 = $s;
+ _mrb_define_method($25,$26,64315,87,262144);
+ $27 = $0;
+ $28 = $s;
+ _mrb_define_method($27,$28,68114,88,262144);
+ $29 = $0;
+ $30 = $s;
+ _mrb_define_method($29,$30,68841,89,4096);
+ $31 = $0;
+ $32 = $s;
+ _mrb_define_method($31,$32,56008,90,0);
+ $33 = $0;
+ $34 = $s;
+ _mrb_define_method($33,$34,56019,91,0);
+ $35 = $0;
+ $36 = $s;
+ _mrb_define_method($35,$36,56031,92,4096);
+ $37 = $0;
+ $38 = $s;
+ _mrb_define_method($37,$38,56040,93,4096);
+ $39 = $0;
+ $40 = $s;
+ _mrb_define_method($39,$40,56047,94,262144);
+ $41 = $0;
+ $42 = $s;
+ _mrb_define_method($41,$42,56052,95,262144);
+ $43 = $0;
+ $44 = $s;
+ _mrb_define_method($43,$44,56058,96,0);
+ $45 = $0;
+ $46 = $s;
+ _mrb_define_method($45,$46,56067,97,0);
+ $47 = $0;
+ $48 = $s;
+ _mrb_define_method($47,$48,64381,98,0);
+ $49 = $0;
+ $50 = $s;
+ _mrb_define_method($49,$50,68994,99,262144);
+ $51 = $0;
+ $52 = $s;
+ _mrb_define_method($51,$52,68178,100,0);
+ $53 = $0;
+ $54 = $s;
+ _mrb_define_method($53,$54,68944,101,262144);
+ $55 = $0;
+ $56 = $s;
+ _mrb_define_method($55,$56,64411,102,4096);
+ $57 = $0;
+ $58 = $s;
+ _mrb_define_method($57,$58,68953,103,262144);
+ $59 = $0;
+ $60 = $s;
+ _mrb_define_method($59,$60,68999,104,262144);
+ $61 = $0;
+ $62 = $s;
+ _mrb_define_method($61,$62,69611,105,0);
+ $63 = $0;
+ $64 = $s;
+ _mrb_define_method($63,$64,64428,106,0);
+ $65 = $0;
+ $66 = $s;
+ _mrb_define_method($65,$66,64444,104,262144);
+ $67 = $0;
+ $68 = $s;
+ _mrb_define_method($67,$68,64452,107,0);
+ $69 = $0;
+ $70 = $s;
+ _mrb_define_method($69,$70,64460,108,0);
+ $71 = $0;
+ $72 = $s;
+ _mrb_define_method($71,$72,64469,109,4096);
+ $73 = $0;
+ $74 = $s;
+ _mrb_define_method($73,$74,64482,106,0);
+ $75 = $0;
+ $76 = $s;
+ _mrb_define_method($75,$76,64487,89,4096);
+ $77 = $0;
+ $78 = $s;
+ _mrb_define_method($77,$78,56101,110,4096);
+ $79 = $0;
+ $80 = $s;
+ _mrb_define_method($79,$80,56111,111,0);
+ $81 = $0;
+ $82 = $s;
+ _mrb_define_method($81,$82,56116,112,4096);
+ $83 = $0;
+ $84 = $s;
+ _mrb_define_method($83,$84,68977,113,0);
+ $85 = $0;
+ $86 = $s;
+ _mrb_define_method($85,$86,64885,113,0);
+ $87 = $0;
+ $88 = $s;
+ _mrb_define_method($87,$88,56199,105,0);
+ $89 = $0;
+ $90 = $s;
+ _mrb_define_method($89,$90,56121,114,0);
+ $91 = $0;
+ $92 = $s;
+ _mrb_define_method($91,$92,56128,115,0);
+ $93 = $0;
+ $94 = $s;
+ _mrb_define_method($93,$94,68986,116,0);
+ $95 = $0;
+ $96 = $s;
+ _mrb_define_method($95,$96,56136,117,0);
+ $97 = $0;
+ $98 = $s;
+ _mrb_define_method($97,$98,56142,118,0);
+ STACKTOP = sp;return;
+}
+function _mrb_str_bytesize($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $len = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 >>> 11;
+ $4 = $3 & 8;
+ $5 = ($4|0)!=(0);
+ $6 = HEAP32[$self>>2]|0;
+ if ($5) {
+  $7 = HEAP32[$6>>2]|0;
+  $8 = $7 >>> 11;
+  $9 = $8 & 496;
+  $10 = $9 >> 4;
+  $13 = $10;
+ } else {
+  $11 = ((($6)) + 12|0);
+  $12 = HEAP32[$11>>2]|0;
+  $13 = $12;
+ }
+ $len = $13;
+ $14 = $len;
+ _mrb_fixnum_value_289($agg$result,$14);
+ STACKTOP = sp;return;
+}
+function _mrb_str_cmp_m($agg$result,$mrb,$str1) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str1 = $str1|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $result = 0, $str1$byval_copy = 0, $str2 = 0, $str2$byval_copy = 0, $str2$byval_copy7 = 0, $str2$byval_copy8 = 0, $str2$byval_copy9 = 0, $tmp = 0, $vararg_buffer = 0, $vararg_buffer1 = 0;
+ var $vararg_buffer4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str2$byval_copy9 = sp + 104|0;
+ $str1$byval_copy = sp + 96|0;
+ $$byval_copy = sp + 88|0;
+ $str2$byval_copy8 = sp + 80|0;
+ $str2$byval_copy7 = sp + 72|0;
+ $str2$byval_copy = sp + 64|0;
+ $vararg_buffer4 = sp + 16|0;
+ $vararg_buffer1 = sp + 8|0;
+ $vararg_buffer = sp;
+ $str2 = sp + 48|0;
+ $tmp = sp + 32|0;
+ $1 = sp + 24|0;
+ $0 = $mrb;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $str2;
+ (_mrb_get_args($2,68900,$vararg_buffer)|0);
+ $3 = ((($str2)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)==(16);
+ $6 = $0;
+ do {
+  if ($5) {
+   ;HEAP32[$str1$byval_copy>>2]=HEAP32[$str1>>2]|0;HEAP32[$str1$byval_copy+4>>2]=HEAP32[$str1+4>>2]|0;
+   ;HEAP32[$str2$byval_copy9>>2]=HEAP32[$str2>>2]|0;HEAP32[$str2$byval_copy9+4>>2]=HEAP32[$str2+4>>2]|0;
+   $27 = (_mrb_str_cmp($6,$str1$byval_copy,$str2$byval_copy9)|0);
+   $result = $27;
+  } else {
+   $7 = $0;
+   $8 = (_mrb_intern_static($7,68977,4)|0);
+   ;HEAP32[$str2$byval_copy>>2]=HEAP32[$str2>>2]|0;HEAP32[$str2$byval_copy+4>>2]=HEAP32[$str2+4>>2]|0;
+   $9 = (_mrb_respond_to($6,$str2$byval_copy,$8)|0);
+   $10 = ($9<<24>>24)!=(0);
+   if (!($10)) {
+    _mrb_nil_value_282($agg$result);
+    STACKTOP = sp;return;
+   }
+   $11 = $0;
+   $12 = $0;
+   $13 = (_mrb_intern_static($12,68851,3)|0);
+   ;HEAP32[$str2$byval_copy7>>2]=HEAP32[$str2>>2]|0;HEAP32[$str2$byval_copy7+4>>2]=HEAP32[$str2+4>>2]|0;
+   $14 = (_mrb_respond_to($11,$str2$byval_copy7,$13)|0);
+   $15 = ($14<<24>>24)!=(0);
+   if (!($15)) {
+    _mrb_nil_value_282($agg$result);
+    STACKTOP = sp;return;
+   }
+   $16 = $0;
+   ;HEAP8[$vararg_buffer1>>0]=HEAP8[$str1>>0]|0;HEAP8[$vararg_buffer1+1>>0]=HEAP8[$str1+1>>0]|0;HEAP8[$vararg_buffer1+2>>0]=HEAP8[$str1+2>>0]|0;HEAP8[$vararg_buffer1+3>>0]=HEAP8[$str1+3>>0]|0;HEAP8[$vararg_buffer1+4>>0]=HEAP8[$str1+4>>0]|0;HEAP8[$vararg_buffer1+5>>0]=HEAP8[$str1+5>>0]|0;HEAP8[$vararg_buffer1+6>>0]=HEAP8[$str1+6>>0]|0;HEAP8[$vararg_buffer1+7>>0]=HEAP8[$str1+7>>0]|0;
+   ;HEAP32[$str2$byval_copy8>>2]=HEAP32[$str2>>2]|0;HEAP32[$str2$byval_copy8+4>>2]=HEAP32[$str2+4>>2]|0;
+   _mrb_funcall($tmp,$16,$str2$byval_copy8,68851,1,$vararg_buffer1);
+   $17 = ((($tmp)) + 4|0);
+   $18 = HEAP32[$17>>2]|0;
+   $19 = ($18|0)==(0);
+   if ($19) {
+    $20 = HEAP32[$tmp>>2]|0;
+    $21 = ($20|0)!=(0);
+    if (!($21)) {
+     _mrb_nil_value_282($agg$result);
+     STACKTOP = sp;return;
+    }
+   }
+   $22 = HEAP32[$tmp>>2]|0;
+   $23 = ($22|0)!=(0);
+   if ($23) {
+    $25 = HEAP32[$tmp>>2]|0;
+    $26 = (0 - ($25))|0;
+    $result = $26;
+    break;
+   }
+   $24 = $0;
+   _mrb_fixnum_value_289($1,0);
+   ;HEAP8[$vararg_buffer4>>0]=HEAP8[$tmp>>0]|0;HEAP8[$vararg_buffer4+1>>0]=HEAP8[$tmp+1>>0]|0;HEAP8[$vararg_buffer4+2>>0]=HEAP8[$tmp+2>>0]|0;HEAP8[$vararg_buffer4+3>>0]=HEAP8[$tmp+3>>0]|0;HEAP8[$vararg_buffer4+4>>0]=HEAP8[$tmp+4>>0]|0;HEAP8[$vararg_buffer4+5>>0]=HEAP8[$tmp+5>>0]|0;HEAP8[$vararg_buffer4+6>>0]=HEAP8[$tmp+6>>0]|0;HEAP8[$vararg_buffer4+7>>0]=HEAP8[$tmp+7>>0]|0;
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;
+   _mrb_funcall($agg$result,$24,$$byval_copy,69609,1,$vararg_buffer4);
+   STACKTOP = sp;return;
+  }
+ } while(0);
+ $28 = $result;
+ _mrb_fixnum_value_289($agg$result,$28);
+ STACKTOP = sp;return;
+}
+function _mrb_str_equal_m($agg$result,$mrb,$str1) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str1 = $str1|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $str1$byval_copy = 0, $str2 = 0, $str2$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str2$byval_copy = sp + 32|0;
+ $str1$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $str2 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $str2;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$str1$byval_copy>>2]=HEAP32[$str1>>2]|0;HEAP32[$str1$byval_copy+4>>2]=HEAP32[$str1+4>>2]|0;
+ ;HEAP32[$str2$byval_copy>>2]=HEAP32[$str2>>2]|0;HEAP32[$str2$byval_copy+4>>2]=HEAP32[$str2+4>>2]|0;
+ $3 = (_mrb_str_equal($2,$str1$byval_copy,$str2$byval_copy)|0);
+ _mrb_bool_value_307($agg$result,$3);
+ STACKTOP = sp;return;
+}
+function _mrb_bool_value_307($agg$result,$boolean) {
+ $agg$result = $agg$result|0;
+ $boolean = $boolean|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $boolean;
+ $1 = $0;
+ $2 = $1&255;
+ $3 = ($2|0)!=(0);
+ $4 = $3 ? 2 : 0;
+ $5 = ((($v)) + 4|0);
+ HEAP32[$5>>2] = $4;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_str_plus_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $self$byval_copy = 0, $str = 0, $str$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 32|0;
+ $self$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $str = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $str;
+ (_mrb_get_args($1,55924,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_plus($agg$result,$2,$self$byval_copy,$str$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_str_times($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $12 = 0;
+ var $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0;
+ var $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0;
+ var $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0;
+ var $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0;
+ var $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $len = 0, $n = 0, $p = 0, $self$byval_copy = 0, $str2 = 0;
+ var $times = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $times = sp + 12|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $times;
+ (_mrb_get_args($1,64319,$vararg_buffer)|0);
+ $2 = HEAP32[$times>>2]|0;
+ $3 = ($2|0)<(0);
+ if ($3) {
+  $4 = $0;
+  $5 = $0;
+  $6 = (_mrb_class_get($5,68855)|0);
+  _mrb_raise($4,$6,64321);
+  // unreachable;
+ }
+ $7 = HEAP32[$times>>2]|0;
+ $8 = ($7|0)!=(0);
+ if ($8) {
+  $9 = HEAP32[$times>>2]|0;
+  $10 = (2147483647 / ($9|0))&-1;
+  $11 = HEAP32[$self>>2]|0;
+  $12 = HEAP32[$11>>2]|0;
+  $13 = $12 >>> 11;
+  $14 = $13 & 8;
+  $15 = ($14|0)!=(0);
+  $16 = HEAP32[$self>>2]|0;
+  if ($15) {
+   $17 = HEAP32[$16>>2]|0;
+   $18 = $17 >>> 11;
+   $19 = $18 & 496;
+   $20 = $19 >> 4;
+   $24 = $20;
+  } else {
+   $21 = ((($16)) + 12|0);
+   $22 = HEAP32[$21>>2]|0;
+   $24 = $22;
+  }
+  $23 = ($10|0)<($24|0);
+  if ($23) {
+   $25 = $0;
+   $26 = $0;
+   $27 = (_mrb_class_get($26,68855)|0);
+   _mrb_raise($25,$27,55926);
+   // unreachable;
+  }
+ }
+ $28 = HEAP32[$self>>2]|0;
+ $29 = HEAP32[$28>>2]|0;
+ $30 = $29 >>> 11;
+ $31 = $30 & 8;
+ $32 = ($31|0)!=(0);
+ $33 = HEAP32[$self>>2]|0;
+ if ($32) {
+  $34 = HEAP32[$33>>2]|0;
+  $35 = $34 >>> 11;
+  $36 = $35 & 496;
+  $37 = $36 >> 4;
+  $42 = $37;
+ } else {
+  $38 = ((($33)) + 12|0);
+  $39 = HEAP32[$38>>2]|0;
+  $42 = $39;
+ }
+ $40 = HEAP32[$times>>2]|0;
+ $41 = Math_imul($42, $40)|0;
+ $len = $41;
+ $43 = $0;
+ $44 = $len;
+ $45 = (_str_new($43,0,$44)|0);
+ $str2 = $45;
+ $46 = $0;
+ $47 = $str2;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _str_with_class($46,$47,$self$byval_copy);
+ $48 = $str2;
+ $49 = HEAP32[$48>>2]|0;
+ $50 = $49 >>> 11;
+ $51 = $50 & 8;
+ $52 = ($51|0)!=(0);
+ $53 = $str2;
+ $54 = ((($53)) + 12|0);
+ if ($52) {
+  $57 = $54;
+ } else {
+  $55 = ((($54)) + 8|0);
+  $56 = HEAP32[$55>>2]|0;
+  $57 = $56;
+ }
+ $p = $57;
+ $58 = $len;
+ $59 = ($58|0)>(0);
+ if ($59) {
+  $60 = HEAP32[$self>>2]|0;
+  $61 = HEAP32[$60>>2]|0;
+  $62 = $61 >>> 11;
+  $63 = $62 & 8;
+  $64 = ($63|0)!=(0);
+  $65 = HEAP32[$self>>2]|0;
+  if ($64) {
+   $66 = HEAP32[$65>>2]|0;
+   $67 = $66 >>> 11;
+   $68 = $67 & 496;
+   $69 = $68 >> 4;
+   $72 = $69;
+  } else {
+   $70 = ((($65)) + 12|0);
+   $71 = HEAP32[$70>>2]|0;
+   $72 = $71;
+  }
+  $n = $72;
+  $73 = $p;
+  $74 = HEAP32[$self>>2]|0;
+  $75 = HEAP32[$74>>2]|0;
+  $76 = $75 >>> 11;
+  $77 = $76 & 8;
+  $78 = ($77|0)!=(0);
+  $79 = HEAP32[$self>>2]|0;
+  $80 = ((($79)) + 12|0);
+  if ($78) {
+   $84 = $80;
+  } else {
+   $81 = ((($80)) + 8|0);
+   $82 = HEAP32[$81>>2]|0;
+   $84 = $82;
+  }
+  $83 = $n;
+  _memcpy(($73|0),($84|0),($83|0))|0;
+  while(1) {
+   $85 = $n;
+   $86 = $len;
+   $87 = (($86|0) / 2)&-1;
+   $88 = ($85|0)<=($87|0);
+   $89 = $p;
+   $90 = $n;
+   $91 = (($89) + ($90)|0);
+   $92 = $p;
+   if (!($88)) {
+    break;
+   }
+   $93 = $n;
+   _memcpy(($91|0),($92|0),($93|0))|0;
+   $94 = $n;
+   $95 = $94<<1;
+   $n = $95;
+  }
+  $96 = $len;
+  $97 = $n;
+  $98 = (($96) - ($97))|0;
+  _memcpy(($91|0),($92|0),($98|0))|0;
+ }
+ $99 = $str2;
+ $100 = HEAP32[$99>>2]|0;
+ $101 = $100 >>> 11;
+ $102 = $101 & 8;
+ $103 = ($102|0)!=(0);
+ $104 = $str2;
+ if ($103) {
+  $105 = HEAP32[$104>>2]|0;
+  $106 = $105 >>> 11;
+  $107 = $106 & 496;
+  $108 = $107 >> 4;
+  $113 = $108;
+  $111 = $p;
+  $112 = (($111) + ($113)|0);
+  HEAP8[$112>>0] = 0;
+  $114 = $str2;
+  _mrb_obj_value_259($agg$result,$114);
+  STACKTOP = sp;return;
+ } else {
+  $109 = ((($104)) + 12|0);
+  $110 = HEAP32[$109>>2]|0;
+  $113 = $110;
+  $111 = $p;
+  $112 = (($111) + ($113)|0);
+  HEAP8[$112>>0] = 0;
+  $114 = $str2;
+  _mrb_obj_value_259($agg$result,$114);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_str_aref_m($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a1 = 0, $a1$byval_copy = 0, $a1$byval_copy6 = 0, $a2 = 0;
+ var $argc = 0, $str$byval_copy = 0, $str$byval_copy5 = 0, $vararg_buffer = 0, $vararg_buffer2 = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $a1$byval_copy6 = sp + 80|0;
+ $str$byval_copy5 = sp + 72|0;
+ $str$byval_copy = sp + 64|0;
+ $a1$byval_copy = sp + 56|0;
+ $vararg_buffer2 = sp + 8|0;
+ $vararg_buffer = sp;
+ $a1 = sp + 40|0;
+ $a2 = sp + 32|0;
+ $1 = sp + 16|0;
+ $0 = $mrb;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $a1;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $a2;
+ $3 = (_mrb_get_args($2,55943,$vararg_buffer)|0);
+ $argc = $3;
+ $4 = $argc;
+ $5 = ($4|0)==(2);
+ if ($5) {
+  $6 = $0;
+  ;HEAP32[$a1$byval_copy>>2]=HEAP32[$a1>>2]|0;HEAP32[$a1$byval_copy+4>>2]=HEAP32[$a1+4>>2]|0;
+  _mrb_regexp_check($6,$a1$byval_copy);
+  $7 = $0;
+  $8 = HEAP32[$a1>>2]|0;
+  $9 = HEAP32[$a2>>2]|0;
+  ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+  _str_substr($agg$result,$7,$str$byval_copy,$8,$9);
+  STACKTOP = sp;return;
+ }
+ $10 = $argc;
+ $11 = ($10|0)!=(1);
+ $12 = $0;
+ if ($11) {
+  $13 = $0;
+  $14 = (_mrb_class_get($13,68855)|0);
+  $15 = $argc;
+  _mrb_fixnum_value_289($1,$15);
+  ;HEAP8[$vararg_buffer2>>0]=HEAP8[$1>>0]|0;HEAP8[$vararg_buffer2+1>>0]=HEAP8[$1+1>>0]|0;HEAP8[$vararg_buffer2+2>>0]=HEAP8[$1+2>>0]|0;HEAP8[$vararg_buffer2+3>>0]=HEAP8[$1+3>>0]|0;HEAP8[$vararg_buffer2+4>>0]=HEAP8[$1+4>>0]|0;HEAP8[$vararg_buffer2+5>>0]=HEAP8[$1+5>>0]|0;HEAP8[$vararg_buffer2+6>>0]=HEAP8[$1+6>>0]|0;HEAP8[$vararg_buffer2+7>>0]=HEAP8[$1+7>>0]|0;
+  _mrb_raisef($12,$14,55947,$vararg_buffer2);
+  // unreachable;
+ }
+ ;HEAP32[$str$byval_copy5>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy5+4>>2]=HEAP32[$str+4>>2]|0;
+ ;HEAP32[$a1$byval_copy6>>2]=HEAP32[$a1>>2]|0;HEAP32[$a1$byval_copy6+4>>2]=HEAP32[$a1+4>>2]|0;
+ _mrb_str_aref($agg$result,$12,$str$byval_copy5,$a1$byval_copy6);
+ STACKTOP = sp;return;
+}
+function _mrb_str_aref($agg$result,$mrb,$str,$indx) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ $indx = $indx|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $beg = 0, $idx = 0, $indx$byval_copy = 0, $indx$byval_copy2 = 0, $indx$byval_copy3 = 0, $indx$byval_copy5 = 0, $indx$byval_copy7 = 0, $len = 0, $str$byval_copy = 0, $str$byval_copy1 = 0;
+ var $str$byval_copy4 = 0, $str$byval_copy6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $indx$byval_copy7 = sp + 96|0;
+ $str$byval_copy6 = sp + 88|0;
+ $indx$byval_copy5 = sp + 80|0;
+ $str$byval_copy4 = sp + 72|0;
+ $indx$byval_copy3 = sp + 64|0;
+ $indx$byval_copy2 = sp + 56|0;
+ $str$byval_copy1 = sp + 48|0;
+ $str$byval_copy = sp + 40|0;
+ $indx$byval_copy = sp + 32|0;
+ $1 = sp + 16|0;
+ $beg = sp + 12|0;
+ $len = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $3 = $0;
+ ;HEAP32[$indx$byval_copy>>2]=HEAP32[$indx>>2]|0;HEAP32[$indx$byval_copy+4>>2]=HEAP32[$indx+4>>2]|0;
+ _mrb_regexp_check($3,$indx$byval_copy);
+ $4 = ((($indx)) + 4|0);
+ $5 = HEAP32[$4>>2]|0;
+ switch ($5|0) {
+ case 3:  {
+  $6 = HEAP32[$indx>>2]|0;
+  $idx = $6;
+  break;
+ }
+ case 16:  {
+  $28 = $0;
+  ;HEAP32[$str$byval_copy1>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy1+4>>2]=HEAP32[$str+4>>2]|0;
+  ;HEAP32[$indx$byval_copy2>>2]=HEAP32[$indx>>2]|0;HEAP32[$indx$byval_copy2+4>>2]=HEAP32[$indx+4>>2]|0;
+  $29 = (_str_index($28,$str$byval_copy1,$indx$byval_copy2,0)|0);
+  $30 = ($29|0)!=(-1);
+  if ($30) {
+   $31 = $0;
+   ;HEAP32[$indx$byval_copy3>>2]=HEAP32[$indx>>2]|0;HEAP32[$indx$byval_copy3+4>>2]=HEAP32[$indx+4>>2]|0;
+   _mrb_str_dup($agg$result,$31,$indx$byval_copy3);
+   STACKTOP = sp;return;
+  } else {
+   _mrb_nil_value_282($agg$result);
+   STACKTOP = sp;return;
+  }
+  break;
+ }
+ case 17:  {
+  ;HEAP32[$str$byval_copy4>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy4+4>>2]=HEAP32[$str+4>>2]|0;
+  $32 = (_utf8_strlen($str$byval_copy4,-1)|0);
+  HEAP32[$len>>2] = $32;
+  $33 = $0;
+  $34 = HEAP32[$len>>2]|0;
+  ;HEAP32[$indx$byval_copy5>>2]=HEAP32[$indx>>2]|0;HEAP32[$indx$byval_copy5+4>>2]=HEAP32[$indx+4>>2]|0;
+  $35 = (_mrb_range_beg_len($33,$indx$byval_copy5,$beg,$len,$34)|0);
+  $36 = ($35<<24>>24)!=(0);
+  if ($36) {
+   $37 = $0;
+   $38 = HEAP32[$beg>>2]|0;
+   $39 = HEAP32[$len>>2]|0;
+   ;HEAP32[$str$byval_copy6>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy6+4>>2]=HEAP32[$str+4>>2]|0;
+   _str_subseq($agg$result,$37,$str$byval_copy6,$38,$39);
+   STACKTOP = sp;return;
+  } else {
+   _mrb_nil_value_282($agg$result);
+   STACKTOP = sp;return;
+  }
+  break;
+ }
+ default: {
+  $40 = $0;
+  ;HEAP32[$indx$byval_copy7>>2]=HEAP32[$indx>>2]|0;HEAP32[$indx$byval_copy7+4>>2]=HEAP32[$indx+4>>2]|0;
+  _mrb_Integer($2,$40,$indx$byval_copy7);
+  ;HEAP32[$indx>>2]=HEAP32[$2>>2]|0;HEAP32[$indx+4>>2]=HEAP32[$2+4>>2]|0;
+  $41 = ((($indx)) + 4|0);
+  $42 = HEAP32[$41>>2]|0;
+  $43 = ($42|0)==(0);
+  if ($43) {
+   $44 = HEAP32[$indx>>2]|0;
+   $45 = ($44|0)!=(0);
+   if (!($45)) {
+    $46 = $0;
+    $47 = $0;
+    $48 = (_mrb_class_get($47,68905)|0);
+    _mrb_raise($46,$48,55984);
+    // unreachable;
+   }
+  }
+  $49 = HEAP32[$indx>>2]|0;
+  $idx = $49;
+ }
+ }
+ $7 = $0;
+ $8 = $idx;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _str_substr($1,$7,$str$byval_copy,$8,1);
+ ;HEAP32[$str>>2]=HEAP32[$1>>2]|0;HEAP32[$str+4>>2]=HEAP32[$1+4>>2]|0;
+ $9 = ((($str)) + 4|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = ($10|0)==(0);
+ if ($11) {
+  $12 = HEAP32[$str>>2]|0;
+  $13 = ($12|0)!=(0);
+  if ($13) {
+   label = 5;
+  }
+ } else {
+  label = 5;
+ }
+ if ((label|0) == 5) {
+  $14 = HEAP32[$str>>2]|0;
+  $15 = HEAP32[$14>>2]|0;
+  $16 = $15 >>> 11;
+  $17 = $16 & 8;
+  $18 = ($17|0)!=(0);
+  $19 = HEAP32[$str>>2]|0;
+  if ($18) {
+   $20 = HEAP32[$19>>2]|0;
+   $21 = $20 >>> 11;
+   $22 = $21 & 496;
+   $23 = $22 >> 4;
+   $26 = $23;
+  } else {
+   $24 = ((($19)) + 12|0);
+   $25 = HEAP32[$24>>2]|0;
+   $26 = $25;
+  }
+  $27 = ($26|0)==(0);
+  if ($27) {
+   _mrb_nil_value_282($agg$result);
+   STACKTOP = sp;return;
+  }
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _str_index($mrb,$str,$sub,$offset) {
+ $mrb = $mrb|0;
+ $str = $str|0;
+ $sub = $sub|0;
+ $offset = $offset|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0;
+ var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0;
+ var $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0;
+ var $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0;
+ var $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0;
+ var $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $len = 0, $pos = 0, $s = 0, $slen = 0, $sptr = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $offset;
+ $3 = HEAP32[$str>>2]|0;
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $4 >>> 11;
+ $6 = $5 & 8;
+ $7 = ($6|0)!=(0);
+ $8 = HEAP32[$str>>2]|0;
+ if ($7) {
+  $9 = HEAP32[$8>>2]|0;
+  $10 = $9 >>> 11;
+  $11 = $10 & 496;
+  $12 = $11 >> 4;
+  $15 = $12;
+ } else {
+  $13 = ((($8)) + 12|0);
+  $14 = HEAP32[$13>>2]|0;
+  $15 = $14;
+ }
+ $len = $15;
+ $16 = HEAP32[$sub>>2]|0;
+ $17 = HEAP32[$16>>2]|0;
+ $18 = $17 >>> 11;
+ $19 = $18 & 8;
+ $20 = ($19|0)!=(0);
+ $21 = HEAP32[$sub>>2]|0;
+ if ($20) {
+  $22 = HEAP32[$21>>2]|0;
+  $23 = $22 >>> 11;
+  $24 = $23 & 496;
+  $25 = $24 >> 4;
+  $28 = $25;
+ } else {
+  $26 = ((($21)) + 12|0);
+  $27 = HEAP32[$26>>2]|0;
+  $28 = $27;
+ }
+ $slen = $28;
+ $29 = $2;
+ $30 = ($29|0)<(0);
+ if ($30) {
+  $31 = $len;
+  $32 = $2;
+  $33 = (($32) + ($31))|0;
+  $2 = $33;
+  $34 = $2;
+  $35 = ($34|0)<(0);
+  if ($35) {
+   $0 = -1;
+   $107 = $0;
+   STACKTOP = sp;return ($107|0);
+  }
+ }
+ $36 = $len;
+ $37 = $2;
+ $38 = (($36) - ($37))|0;
+ $39 = $slen;
+ $40 = ($38|0)<($39|0);
+ if ($40) {
+  $0 = -1;
+  $107 = $0;
+  STACKTOP = sp;return ($107|0);
+ }
+ $41 = HEAP32[$str>>2]|0;
+ $42 = HEAP32[$41>>2]|0;
+ $43 = $42 >>> 11;
+ $44 = $43 & 8;
+ $45 = ($44|0)!=(0);
+ $46 = HEAP32[$str>>2]|0;
+ $47 = ((($46)) + 12|0);
+ if ($45) {
+  $50 = $47;
+ } else {
+  $48 = ((($47)) + 8|0);
+  $49 = HEAP32[$48>>2]|0;
+  $50 = $49;
+ }
+ $s = $50;
+ $51 = $2;
+ $52 = ($51|0)!=(0);
+ if ($52) {
+  $53 = $2;
+  $54 = $s;
+  $55 = (($54) + ($53)|0);
+  $s = $55;
+ }
+ $56 = $slen;
+ $57 = ($56|0)==(0);
+ if ($57) {
+  $58 = $2;
+  $0 = $58;
+  $107 = $0;
+  STACKTOP = sp;return ($107|0);
+ }
+ $59 = HEAP32[$sub>>2]|0;
+ $60 = HEAP32[$59>>2]|0;
+ $61 = $60 >>> 11;
+ $62 = $61 & 8;
+ $63 = ($62|0)!=(0);
+ $64 = HEAP32[$sub>>2]|0;
+ $65 = ((($64)) + 12|0);
+ if ($63) {
+  $68 = $65;
+ } else {
+  $66 = ((($65)) + 8|0);
+  $67 = HEAP32[$66>>2]|0;
+  $68 = $67;
+ }
+ $sptr = $68;
+ $69 = HEAP32[$sub>>2]|0;
+ $70 = HEAP32[$69>>2]|0;
+ $71 = $70 >>> 11;
+ $72 = $71 & 8;
+ $73 = ($72|0)!=(0);
+ $74 = HEAP32[$sub>>2]|0;
+ if ($73) {
+  $75 = HEAP32[$74>>2]|0;
+  $76 = $75 >>> 11;
+  $77 = $76 & 496;
+  $78 = $77 >> 4;
+  $81 = $78;
+ } else {
+  $79 = ((($74)) + 12|0);
+  $80 = HEAP32[$79>>2]|0;
+  $81 = $80;
+ }
+ $slen = $81;
+ $82 = HEAP32[$str>>2]|0;
+ $83 = HEAP32[$82>>2]|0;
+ $84 = $83 >>> 11;
+ $85 = $84 & 8;
+ $86 = ($85|0)!=(0);
+ $87 = HEAP32[$str>>2]|0;
+ if ($86) {
+  $88 = HEAP32[$87>>2]|0;
+  $89 = $88 >>> 11;
+  $90 = $89 & 496;
+  $91 = $90 >> 4;
+  $96 = $91;
+ } else {
+  $92 = ((($87)) + 12|0);
+  $93 = HEAP32[$92>>2]|0;
+  $96 = $93;
+ }
+ $94 = $2;
+ $95 = (($96) - ($94))|0;
+ $len = $95;
+ $97 = $sptr;
+ $98 = $slen;
+ $99 = $s;
+ $100 = $len;
+ $101 = (_mrb_memsearch($97,$98,$99,$100)|0);
+ $pos = $101;
+ $102 = $pos;
+ $103 = ($102|0)<(0);
+ $104 = $pos;
+ if ($103) {
+  $0 = $104;
+  $107 = $0;
+  STACKTOP = sp;return ($107|0);
+ } else {
+  $105 = $2;
+  $106 = (($104) + ($105))|0;
+  $0 = $106;
+  $107 = $0;
+  STACKTOP = sp;return ($107|0);
+ }
+ return (0)|0;
+}
+function _mrb_memsearch($x0,$m,$y0,$n) {
+ $x0 = $x0|0;
+ $m = $m|0;
+ $y0 = $y0|0;
+ $n = $n|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $x = 0, $y = 0, $ye = 0, $ys = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $x0;
+ $2 = $m;
+ $3 = $y0;
+ $4 = $n;
+ $5 = $1;
+ $x = $5;
+ $6 = $3;
+ $y = $6;
+ $7 = $2;
+ $8 = $4;
+ $9 = ($7|0)>($8|0);
+ do {
+  if ($9) {
+   $0 = -1;
+  } else {
+   $10 = $2;
+   $11 = $4;
+   $12 = ($10|0)==($11|0);
+   if ($12) {
+    $13 = $1;
+    $14 = $3;
+    $15 = $2;
+    $16 = (_memcmp($13,$14,$15)|0);
+    $17 = ($16|0)==(0);
+    $18 = $17 ? 0 : -1;
+    $0 = $18;
+    break;
+   }
+   $19 = $2;
+   $20 = ($19|0)<(1);
+   if ($20) {
+    $0 = 0;
+    break;
+   }
+   $21 = $2;
+   $22 = ($21|0)==(1);
+   if (!($22)) {
+    $43 = $1;
+    $44 = $2;
+    $45 = $3;
+    $46 = $4;
+    $47 = (_mrb_memsearch_qs($43,$44,$45,$46)|0);
+    $0 = $47;
+    break;
+   }
+   $23 = $y;
+   $ys = $23;
+   $24 = $ys;
+   $25 = $4;
+   $26 = (($24) + ($25)|0);
+   $ye = $26;
+   while(1) {
+    $27 = $y;
+    $28 = $ye;
+    $29 = ($27>>>0)<($28>>>0);
+    if (!($29)) {
+     label = 13;
+     break;
+    }
+    $30 = $x;
+    $31 = HEAP8[$30>>0]|0;
+    $32 = $31&255;
+    $33 = $y;
+    $34 = HEAP8[$33>>0]|0;
+    $35 = $34&255;
+    $36 = ($32|0)==($35|0);
+    $37 = $y;
+    if ($36) {
+     label = 11;
+     break;
+    }
+    $42 = ((($37)) + 1|0);
+    $y = $42;
+   }
+   if ((label|0) == 11) {
+    $38 = $ys;
+    $39 = $37;
+    $40 = $38;
+    $41 = (($39) - ($40))|0;
+    $0 = $41;
+    break;
+   }
+   else if ((label|0) == 13) {
+    $0 = -1;
+    break;
+   }
+  }
+ } while(0);
+ $48 = $0;
+ STACKTOP = sp;return ($48|0);
+}
+function _mrb_memsearch_qs($xs,$m,$ys,$n) {
+ $xs = $xs|0;
+ $m = $m|0;
+ $ys = $ys|0;
+ $n = $n|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $qstable = 0, $x = 0, $xe = 0, $y = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 1072|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $qstable = sp;
+ $1 = $xs;
+ $2 = $m;
+ $3 = $ys;
+ $4 = $n;
+ $5 = $1;
+ $x = $5;
+ $6 = $1;
+ $7 = $2;
+ $8 = (($6) + ($7)|0);
+ $xe = $8;
+ $9 = $3;
+ $y = $9;
+ $i = 0;
+ while(1) {
+  $10 = $i;
+  $11 = ($10|0)<(256);
+  if (!($11)) {
+   break;
+  }
+  $12 = $2;
+  $13 = (($12) + 1)|0;
+  $14 = $i;
+  $15 = (($qstable) + ($14<<2)|0);
+  HEAP32[$15>>2] = $13;
+  $16 = $i;
+  $17 = (($16) + 1)|0;
+  $i = $17;
+ }
+ while(1) {
+  $18 = $x;
+  $19 = $xe;
+  $20 = ($18>>>0)<($19>>>0);
+  if (!($20)) {
+   break;
+  }
+  $21 = $xe;
+  $22 = $x;
+  $23 = $21;
+  $24 = $22;
+  $25 = (($23) - ($24))|0;
+  $26 = $x;
+  $27 = HEAP8[$26>>0]|0;
+  $28 = $27&255;
+  $29 = (($qstable) + ($28<<2)|0);
+  HEAP32[$29>>2] = $25;
+  $30 = $x;
+  $31 = ((($30)) + 1|0);
+  $x = $31;
+ }
+ while(1) {
+  $32 = $y;
+  $33 = $2;
+  $34 = (($32) + ($33)|0);
+  $35 = $3;
+  $36 = $4;
+  $37 = (($35) + ($36)|0);
+  $38 = ($34>>>0)<=($37>>>0);
+  if (!($38)) {
+   label = 11;
+   break;
+  }
+  $39 = $1;
+  $40 = HEAP8[$39>>0]|0;
+  $41 = $40&255;
+  $42 = $y;
+  $43 = HEAP8[$42>>0]|0;
+  $44 = $43&255;
+  $45 = ($41|0)==($44|0);
+  if ($45) {
+   $46 = $1;
+   $47 = $y;
+   $48 = $2;
+   $49 = (_memcmp($46,$47,$48)|0);
+   $50 = ($49|0)==(0);
+   if ($50) {
+    label = 9;
+    break;
+   }
+  }
+  $56 = $2;
+  $57 = $y;
+  $58 = (($57) + ($56)|0);
+  $59 = HEAP8[$58>>0]|0;
+  $60 = $59&255;
+  $61 = (($qstable) + ($60<<2)|0);
+  $62 = HEAP32[$61>>2]|0;
+  $63 = $y;
+  $64 = (($63) + ($62)|0);
+  $y = $64;
+ }
+ if ((label|0) == 9) {
+  $51 = $y;
+  $52 = $3;
+  $53 = $51;
+  $54 = $52;
+  $55 = (($53) - ($54))|0;
+  $0 = $55;
+  $65 = $0;
+  STACKTOP = sp;return ($65|0);
+ }
+ else if ((label|0) == 11) {
+  $0 = -1;
+  $65 = $0;
+  STACKTOP = sp;return ($65|0);
+ }
+ return (0)|0;
+}
+function _mrb_str_capitalize($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $self$byval_copy = 0, $str = 0, $str$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 40|0;
+ $self$byval_copy = sp + 32|0;
+ $str = sp + 16|0;
+ $1 = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $3 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _mrb_str_dup($1,$3,$self$byval_copy);
+ ;HEAP32[$str>>2]=HEAP32[$1>>2]|0;HEAP32[$str+4>>2]=HEAP32[$1+4>>2]|0;
+ $4 = $0;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_capitalize_bang($2,$4,$str$byval_copy);
+ ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_str_capitalize_bang($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
+ var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0;
+ var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0;
+ var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0;
+ var $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0;
+ var $97 = 0, $98 = 0, $99 = 0, $modify = 0, $p = 0, $pend = 0, $s = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $modify = 0;
+ $1 = HEAP32[$str>>2]|0;
+ $s = $1;
+ $2 = $0;
+ $3 = $s;
+ _mrb_str_modify($2,$3);
+ $4 = $s;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5 >>> 11;
+ $7 = $6 & 8;
+ $8 = ($7|0)!=(0);
+ $9 = $s;
+ if ($8) {
+  $10 = HEAP32[$9>>2]|0;
+  $11 = $10 >>> 11;
+  $12 = $11 & 496;
+  $13 = $12 >> 4;
+  $16 = $13;
+ } else {
+  $14 = ((($9)) + 12|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = $15;
+ }
+ $17 = ($16|0)==(0);
+ do {
+  if (!($17)) {
+   $18 = $s;
+   $19 = HEAP32[$18>>2]|0;
+   $20 = $19 >>> 11;
+   $21 = $20 & 8;
+   $22 = ($21|0)!=(0);
+   $23 = $s;
+   $24 = ((($23)) + 12|0);
+   if ($22) {
+    $25 = ($24|0)!=(0|0);
+    if (!($25)) {
+     break;
+    }
+   } else {
+    $26 = ((($24)) + 8|0);
+    $27 = HEAP32[$26>>2]|0;
+    $28 = ($27|0)!=(0|0);
+    if (!($28)) {
+     break;
+    }
+   }
+   $29 = $s;
+   $30 = HEAP32[$29>>2]|0;
+   $31 = $30 >>> 11;
+   $32 = $31 & 8;
+   $33 = ($32|0)!=(0);
+   $34 = $s;
+   $35 = ((($34)) + 12|0);
+   if ($33) {
+    $38 = $35;
+   } else {
+    $36 = ((($35)) + 8|0);
+    $37 = HEAP32[$36>>2]|0;
+    $38 = $37;
+   }
+   $p = $38;
+   $39 = $s;
+   $40 = HEAP32[$39>>2]|0;
+   $41 = $40 >>> 11;
+   $42 = $41 & 8;
+   $43 = ($42|0)!=(0);
+   $44 = $s;
+   $45 = ((($44)) + 12|0);
+   if ($43) {
+    $61 = $45;
+   } else {
+    $46 = ((($45)) + 8|0);
+    $47 = HEAP32[$46>>2]|0;
+    $61 = $47;
+   }
+   $48 = $s;
+   $49 = HEAP32[$48>>2]|0;
+   $50 = $49 >>> 11;
+   $51 = $50 & 8;
+   $52 = ($51|0)!=(0);
+   $53 = $s;
+   if ($52) {
+    $54 = HEAP32[$53>>2]|0;
+    $55 = $54 >>> 11;
+    $56 = $55 & 496;
+    $57 = $56 >> 4;
+    $62 = $57;
+   } else {
+    $58 = ((($53)) + 12|0);
+    $59 = HEAP32[$58>>2]|0;
+    $62 = $59;
+   }
+   $60 = (($61) + ($62)|0);
+   $pend = $60;
+   $63 = $p;
+   $64 = HEAP8[$63>>0]|0;
+   $65 = $64 << 24 >> 24;
+   $66 = (($65) - 97)|0;
+   $67 = ($66>>>0)<(26);
+   if ($67) {
+    $68 = $p;
+    $69 = HEAP8[$68>>0]|0;
+    $70 = $69 << 24 >> 24;
+    $71 = (($70) - 97)|0;
+    $72 = ($71>>>0)<(26);
+    $73 = $p;
+    $74 = HEAP8[$73>>0]|0;
+    $75 = $74 << 24 >> 24;
+    $76 = $75 & 95;
+    $77 = $72 ? $76 : $75;
+    $78 = $77&255;
+    $79 = $p;
+    HEAP8[$79>>0] = $78;
+    $modify = 1;
+   }
+   while(1) {
+    $80 = $p;
+    $81 = ((($80)) + 1|0);
+    $p = $81;
+    $82 = $pend;
+    $83 = ($81>>>0)<($82>>>0);
+    if (!($83)) {
+     break;
+    }
+    $84 = $p;
+    $85 = HEAP8[$84>>0]|0;
+    $86 = $85 << 24 >> 24;
+    $87 = (($86) - 65)|0;
+    $88 = ($87>>>0)<(26);
+    if (!($88)) {
+     continue;
+    }
+    $89 = $p;
+    $90 = HEAP8[$89>>0]|0;
+    $91 = $90 << 24 >> 24;
+    $92 = (($91) - 65)|0;
+    $93 = ($92>>>0)<(26);
+    $94 = $p;
+    $95 = HEAP8[$94>>0]|0;
+    $96 = $95 << 24 >> 24;
+    $97 = $96 | 32;
+    $98 = $93 ? $97 : $96;
+    $99 = $98&255;
+    $100 = $p;
+    HEAP8[$100>>0] = $99;
+    $modify = 1;
+   }
+   $101 = $modify;
+   $102 = ($101<<24>>24)!=(0);
+   if ($102) {
+    ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+    STACKTOP = sp;return;
+   } else {
+    _mrb_nil_value_282($agg$result);
+    STACKTOP = sp;return;
+   }
+  }
+ } while(0);
+ _mrb_nil_value_282($agg$result);
+ STACKTOP = sp;return;
+}
+function _mrb_str_chomp($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $self$byval_copy = 0, $str = 0, $str$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 40|0;
+ $self$byval_copy = sp + 32|0;
+ $str = sp + 16|0;
+ $1 = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $3 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _mrb_str_dup($1,$3,$self$byval_copy);
+ ;HEAP32[$str>>2]=HEAP32[$1>>2]|0;HEAP32[$str+4>>2]=HEAP32[$1+4>>2]|0;
+ $4 = $0;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_chomp_bang($2,$4,$str$byval_copy);
+ ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_str_chomp_bang($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
+ var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
+ var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0;
+ var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0;
+ var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0;
+ var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0;
+ var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0;
+ var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0;
+ var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0;
+ var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0;
+ var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0;
+ var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0;
+ var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0;
+ var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0;
+ var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0;
+ var $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0;
+ var $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0;
+ var $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0;
+ var $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
+ var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0;
+ var $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0;
+ var $99 = 0, $len = 0, $newline = 0, $or$cond = 0, $or$cond3 = 0, $p = 0, $pp = 0, $rs = 0, $rslen = 0, $s = 0, $tmp_n = 0, $tmp_n1 = 0, $tmp_n2 = 0, $tmp_n3 = 0, $tmp_n4 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $rs = sp + 48|0;
+ $0 = $mrb;
+ $1 = HEAP32[$str>>2]|0;
+ $s = $1;
+ $2 = $0;
+ $3 = $s;
+ _mrb_str_modify($2,$3);
+ $4 = $s;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5 >>> 11;
+ $7 = $6 & 8;
+ $8 = ($7|0)!=(0);
+ $9 = $s;
+ if ($8) {
+  $10 = HEAP32[$9>>2]|0;
+  $11 = $10 >>> 11;
+  $12 = $11 & 496;
+  $13 = $12 >> 4;
+  $16 = $13;
+ } else {
+  $14 = ((($9)) + 12|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = $15;
+ }
+ $len = $16;
+ $17 = $0;
+ HEAP32[$vararg_buffer>>2] = $rs;
+ $18 = (_mrb_get_args($17,56037,$vararg_buffer)|0);
+ $19 = ($18|0)==(0);
+ $20 = $len;
+ $21 = ($20|0)==(0);
+ L5: do {
+  if ($19) {
+   if ($21) {
+    _mrb_nil_value_282($agg$result);
+    STACKTOP = sp;return;
+   }
+  } else {
+   do {
+    if (!($21)) {
+     $267 = ((($rs)) + 4|0);
+     $268 = HEAP32[$267>>2]|0;
+     $269 = ($268|0)==(0);
+     if ($269) {
+      $270 = HEAP32[$rs>>2]|0;
+      $271 = ($270|0)!=(0);
+      if (!($271)) {
+       break;
+      }
+     }
+     $272 = $s;
+     $273 = HEAP32[$272>>2]|0;
+     $274 = $273 >>> 11;
+     $275 = $274 & 8;
+     $276 = ($275|0)!=(0);
+     $277 = $s;
+     $278 = ((($277)) + 12|0);
+     if ($276) {
+      $281 = $278;
+     } else {
+      $279 = ((($278)) + 8|0);
+      $280 = HEAP32[$279>>2]|0;
+      $281 = $280;
+     }
+     $p = $281;
+     $282 = HEAP32[$rs>>2]|0;
+     $283 = HEAP32[$282>>2]|0;
+     $284 = $283 >>> 11;
+     $285 = $284 & 8;
+     $286 = ($285|0)!=(0);
+     $287 = HEAP32[$rs>>2]|0;
+     if ($286) {
+      $288 = HEAP32[$287>>2]|0;
+      $289 = $288 >>> 11;
+      $290 = $289 & 496;
+      $291 = $290 >> 4;
+      $294 = $291;
+     } else {
+      $292 = ((($287)) + 12|0);
+      $293 = HEAP32[$292>>2]|0;
+      $294 = $293;
+     }
+     $rslen = $294;
+     $295 = $rslen;
+     $296 = ($295|0)==(0);
+     if ($296) {
+      while(1) {
+       $297 = $len;
+       $298 = ($297|0)>(0);
+       if ($298) {
+        $299 = $len;
+        $300 = (($299) - 1)|0;
+        $301 = $p;
+        $302 = (($301) + ($300)|0);
+        $303 = HEAP8[$302>>0]|0;
+        $304 = $303 << 24 >> 24;
+        $305 = ($304|0)==(10);
+        $480 = $305;
+       } else {
+        $480 = 0;
+       }
+       $306 = $len;
+       if (!($480)) {
+        break;
+       }
+       $307 = (($306) + -1)|0;
+       $len = $307;
+       $308 = $len;
+       $309 = ($308|0)>(0);
+       if (!($309)) {
+        continue;
+       }
+       $310 = $len;
+       $311 = (($310) - 1)|0;
+       $312 = $p;
+       $313 = (($312) + ($311)|0);
+       $314 = HEAP8[$313>>0]|0;
+       $315 = $314 << 24 >> 24;
+       $316 = ($315|0)==(13);
+       if (!($316)) {
+        continue;
+       }
+       $317 = $len;
+       $318 = (($317) + -1)|0;
+       $len = $318;
+      }
+      $319 = $s;
+      $320 = HEAP32[$319>>2]|0;
+      $321 = $320 >>> 11;
+      $322 = $321 & 8;
+      $323 = ($322|0)!=(0);
+      $324 = $s;
+      if ($323) {
+       $325 = HEAP32[$324>>2]|0;
+       $326 = $325 >>> 11;
+       $327 = $326 & 496;
+       $328 = $327 >> 4;
+       $332 = $328;
+      } else {
+       $329 = ((($324)) + 12|0);
+       $330 = HEAP32[$329>>2]|0;
+       $332 = $330;
+      }
+      $331 = ($306|0)<($332|0);
+      if (!($331)) {
+       _mrb_nil_value_282($agg$result);
+       STACKTOP = sp;return;
+      }
+      $333 = $s;
+      $334 = HEAP32[$333>>2]|0;
+      $335 = $334 >>> 11;
+      $336 = $335 & 8;
+      $337 = ($336|0)!=(0);
+      $338 = $len;
+      if ($337) {
+       $tmp_n3 = $338;
+       $339 = $s;
+       $340 = HEAP32[$339>>2]|0;
+       $341 = $340 >>> 11;
+       $342 = $341 & -497;
+       $343 = HEAP32[$339>>2]|0;
+       $344 = $342 & 2097151;
+       $345 = $344 << 11;
+       $346 = $343 & 2047;
+       $347 = $346 | $345;
+       HEAP32[$339>>2] = $347;
+       $348 = $tmp_n3;
+       $349 = $348 << 4;
+       $350 = $s;
+       $351 = HEAP32[$350>>2]|0;
+       $352 = $351 >>> 11;
+       $353 = $352 | $349;
+       $354 = HEAP32[$350>>2]|0;
+       $355 = $353 & 2097151;
+       $356 = $355 << 11;
+       $357 = $354 & 2047;
+       $358 = $357 | $356;
+       HEAP32[$350>>2] = $358;
+      } else {
+       $359 = $s;
+       $360 = ((($359)) + 12|0);
+       HEAP32[$360>>2] = $338;
+      }
+      $361 = $len;
+      $362 = $p;
+      $363 = (($362) + ($361)|0);
+      HEAP8[$363>>0] = 0;
+      ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+      STACKTOP = sp;return;
+     }
+     $364 = $rslen;
+     $365 = $len;
+     $366 = ($364|0)>($365|0);
+     if ($366) {
+      _mrb_nil_value_282($agg$result);
+      STACKTOP = sp;return;
+     }
+     $367 = $rslen;
+     $368 = (($367) - 1)|0;
+     $369 = HEAP32[$rs>>2]|0;
+     $370 = HEAP32[$369>>2]|0;
+     $371 = $370 >>> 11;
+     $372 = $371 & 8;
+     $373 = ($372|0)!=(0);
+     $374 = HEAP32[$rs>>2]|0;
+     $375 = ((($374)) + 12|0);
+     if ($373) {
+      $379 = $375;
+     } else {
+      $376 = ((($375)) + 8|0);
+      $377 = HEAP32[$376>>2]|0;
+      $379 = $377;
+     }
+     $378 = (($379) + ($368)|0);
+     $380 = HEAP8[$378>>0]|0;
+     $381 = $380 << 24 >> 24;
+     $newline = $381;
+     $382 = $rslen;
+     $383 = ($382|0)==(1);
+     $384 = $newline;
+     $385 = ($384|0)==(10);
+     $or$cond = $383 & $385;
+     if ($or$cond) {
+      $386 = $rslen;
+      $387 = (($386) - 1)|0;
+      $388 = HEAP32[$rs>>2]|0;
+      $389 = HEAP32[$388>>2]|0;
+      $390 = $389 >>> 11;
+      $391 = $390 & 8;
+      $392 = ($391|0)!=(0);
+      $393 = HEAP32[$rs>>2]|0;
+      $394 = ((($393)) + 12|0);
+      if ($392) {
+       $398 = $394;
+      } else {
+       $395 = ((($394)) + 8|0);
+       $396 = HEAP32[$395>>2]|0;
+       $398 = $396;
+      }
+      $397 = (($398) + ($387)|0);
+      $399 = HEAP8[$397>>0]|0;
+      $400 = $399 << 24 >> 24;
+      $newline = $400;
+     }
+     $401 = $rslen;
+     $402 = ($401|0)==(1);
+     $403 = $newline;
+     $404 = ($403|0)==(10);
+     $or$cond3 = $402 & $404;
+     if ($or$cond3) {
+      break L5;
+     }
+     $405 = $p;
+     $406 = $len;
+     $407 = (($405) + ($406)|0);
+     $408 = $rslen;
+     $409 = (0 - ($408))|0;
+     $410 = (($407) + ($409)|0);
+     $pp = $410;
+     $411 = $len;
+     $412 = (($411) - 1)|0;
+     $413 = $p;
+     $414 = (($413) + ($412)|0);
+     $415 = HEAP8[$414>>0]|0;
+     $416 = $415 << 24 >> 24;
+     $417 = $newline;
+     $418 = ($416|0)==($417|0);
+     do {
+      if ($418) {
+       $419 = $rslen;
+       $420 = ($419|0)<=(1);
+       if (!($420)) {
+        $421 = HEAP32[$rs>>2]|0;
+        $422 = HEAP32[$421>>2]|0;
+        $423 = $422 >>> 11;
+        $424 = $423 & 8;
+        $425 = ($424|0)!=(0);
+        $426 = HEAP32[$rs>>2]|0;
+        $427 = ((($426)) + 12|0);
+        if ($425) {
+         $432 = $427;
+        } else {
+         $428 = ((($427)) + 8|0);
+         $429 = HEAP32[$428>>2]|0;
+         $432 = $429;
+        }
+        $430 = $pp;
+        $431 = $rslen;
+        $433 = (_memcmp($432,$430,$431)|0);
+        $434 = ($433|0)==(0);
+        if (!($434)) {
+         break;
+        }
+       }
+       $435 = $s;
+       $436 = HEAP32[$435>>2]|0;
+       $437 = $436 >>> 11;
+       $438 = $437 & 8;
+       $439 = ($438|0)!=(0);
+       $440 = $len;
+       $441 = $rslen;
+       $442 = (($440) - ($441))|0;
+       if ($439) {
+        $tmp_n4 = $442;
+        $443 = $s;
+        $444 = HEAP32[$443>>2]|0;
+        $445 = $444 >>> 11;
+        $446 = $445 & -497;
+        $447 = HEAP32[$443>>2]|0;
+        $448 = $446 & 2097151;
+        $449 = $448 << 11;
+        $450 = $447 & 2047;
+        $451 = $450 | $449;
+        HEAP32[$443>>2] = $451;
+        $452 = $tmp_n4;
+        $453 = $452 << 4;
+        $454 = $s;
+        $455 = HEAP32[$454>>2]|0;
+        $456 = $455 >>> 11;
+        $457 = $456 | $453;
+        $458 = HEAP32[$454>>2]|0;
+        $459 = $457 & 2097151;
+        $460 = $459 << 11;
+        $461 = $458 & 2047;
+        $462 = $461 | $460;
+        HEAP32[$454>>2] = $462;
+       } else {
+        $463 = $s;
+        $464 = ((($463)) + 12|0);
+        HEAP32[$464>>2] = $442;
+       }
+       $465 = $s;
+       $466 = HEAP32[$465>>2]|0;
+       $467 = $466 >>> 11;
+       $468 = $467 & 8;
+       $469 = ($468|0)!=(0);
+       $470 = $s;
+       if ($469) {
+        $471 = HEAP32[$470>>2]|0;
+        $472 = $471 >>> 11;
+        $473 = $472 & 496;
+        $474 = $473 >> 4;
+        $479 = $474;
+       } else {
+        $475 = ((($470)) + 12|0);
+        $476 = HEAP32[$475>>2]|0;
+        $479 = $476;
+       }
+       $477 = $p;
+       $478 = (($477) + ($479)|0);
+       HEAP8[$478>>0] = 0;
+       ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+       STACKTOP = sp;return;
+      }
+     } while(0);
+     _mrb_nil_value_282($agg$result);
+     STACKTOP = sp;return;
+    }
+   } while(0);
+   _mrb_nil_value_282($agg$result);
+   STACKTOP = sp;return;
+  }
+ } while(0);
+ $22 = $len;
+ $23 = (($22) - 1)|0;
+ $24 = $s;
+ $25 = HEAP32[$24>>2]|0;
+ $26 = $25 >>> 11;
+ $27 = $26 & 8;
+ $28 = ($27|0)!=(0);
+ $29 = $s;
+ $30 = ((($29)) + 12|0);
+ if ($28) {
+  $34 = $30;
+ } else {
+  $31 = ((($30)) + 8|0);
+  $32 = HEAP32[$31>>2]|0;
+  $34 = $32;
+ }
+ $33 = (($34) + ($23)|0);
+ $35 = HEAP8[$33>>0]|0;
+ $36 = $35 << 24 >> 24;
+ $37 = ($36|0)==(10);
+ do {
+  if ($37) {
+   $38 = $s;
+   $39 = HEAP32[$38>>2]|0;
+   $40 = $39 >>> 11;
+   $41 = $40 & 8;
+   $42 = ($41|0)!=(0);
+   $43 = $s;
+   $44 = HEAP32[$43>>2]|0;
+   $45 = $44 >>> 11;
+   $46 = $45 & 8;
+   $47 = ($46|0)!=(0);
+   $48 = $s;
+   if ($42) {
+    if ($47) {
+     $49 = HEAP32[$48>>2]|0;
+     $50 = $49 >>> 11;
+     $51 = $50 & 496;
+     $52 = $51 >> 4;
+     $56 = $52;
+    } else {
+     $53 = ((($48)) + 12|0);
+     $54 = HEAP32[$53>>2]|0;
+     $56 = $54;
+    }
+    $55 = (($56) - 1)|0;
+    $tmp_n = $55;
+    $57 = $s;
+    $58 = HEAP32[$57>>2]|0;
+    $59 = $58 >>> 11;
+    $60 = $59 & -497;
+    $61 = HEAP32[$57>>2]|0;
+    $62 = $60 & 2097151;
+    $63 = $62 << 11;
+    $64 = $61 & 2047;
+    $65 = $64 | $63;
+    HEAP32[$57>>2] = $65;
+    $66 = $tmp_n;
+    $67 = $66 << 4;
+    $68 = $s;
+    $69 = HEAP32[$68>>2]|0;
+    $70 = $69 >>> 11;
+    $71 = $70 | $67;
+    $72 = HEAP32[$68>>2]|0;
+    $73 = $71 & 2097151;
+    $74 = $73 << 11;
+    $75 = $72 & 2047;
+    $76 = $75 | $74;
+    HEAP32[$68>>2] = $76;
+   } else {
+    if ($47) {
+     $77 = HEAP32[$48>>2]|0;
+     $78 = $77 >>> 11;
+     $79 = $78 & 496;
+     $80 = $79 >> 4;
+     $84 = $80;
+    } else {
+     $81 = ((($48)) + 12|0);
+     $82 = HEAP32[$81>>2]|0;
+     $84 = $82;
+    }
+    $83 = (($84) - 1)|0;
+    $85 = $s;
+    $86 = ((($85)) + 12|0);
+    HEAP32[$86>>2] = $83;
+   }
+   $87 = $s;
+   $88 = HEAP32[$87>>2]|0;
+   $89 = $88 >>> 11;
+   $90 = $89 & 8;
+   $91 = ($90|0)!=(0);
+   $92 = $s;
+   if ($91) {
+    $93 = HEAP32[$92>>2]|0;
+    $94 = $93 >>> 11;
+    $95 = $94 & 496;
+    $96 = $95 >> 4;
+    $99 = $96;
+   } else {
+    $97 = ((($92)) + 12|0);
+    $98 = HEAP32[$97>>2]|0;
+    $99 = $98;
+   }
+   $100 = ($99|0)>(0);
+   if ($100) {
+    $101 = $s;
+    $102 = HEAP32[$101>>2]|0;
+    $103 = $102 >>> 11;
+    $104 = $103 & 8;
+    $105 = ($104|0)!=(0);
+    $106 = $s;
+    if ($105) {
+     $107 = HEAP32[$106>>2]|0;
+     $108 = $107 >>> 11;
+     $109 = $108 & 496;
+     $110 = $109 >> 4;
+     $114 = $110;
+    } else {
+     $111 = ((($106)) + 12|0);
+     $112 = HEAP32[$111>>2]|0;
+     $114 = $112;
+    }
+    $113 = (($114) - 1)|0;
+    $115 = $s;
+    $116 = HEAP32[$115>>2]|0;
+    $117 = $116 >>> 11;
+    $118 = $117 & 8;
+    $119 = ($118|0)!=(0);
+    $120 = $s;
+    $121 = ((($120)) + 12|0);
+    if ($119) {
+     $125 = $121;
+    } else {
+     $122 = ((($121)) + 8|0);
+     $123 = HEAP32[$122>>2]|0;
+     $125 = $123;
+    }
+    $124 = (($125) + ($113)|0);
+    $126 = HEAP8[$124>>0]|0;
+    $127 = $126 << 24 >> 24;
+    $128 = ($127|0)==(13);
+    if ($128) {
+     $129 = $s;
+     $130 = HEAP32[$129>>2]|0;
+     $131 = $130 >>> 11;
+     $132 = $131 & 8;
+     $133 = ($132|0)!=(0);
+     $134 = $s;
+     $135 = HEAP32[$134>>2]|0;
+     $136 = $135 >>> 11;
+     $137 = $136 & 8;
+     $138 = ($137|0)!=(0);
+     $139 = $s;
+     if ($133) {
+      if ($138) {
+       $140 = HEAP32[$139>>2]|0;
+       $141 = $140 >>> 11;
+       $142 = $141 & 496;
+       $143 = $142 >> 4;
+       $147 = $143;
+      } else {
+       $144 = ((($139)) + 12|0);
+       $145 = HEAP32[$144>>2]|0;
+       $147 = $145;
+      }
+      $146 = (($147) - 1)|0;
+      $tmp_n1 = $146;
+      $148 = $s;
+      $149 = HEAP32[$148>>2]|0;
+      $150 = $149 >>> 11;
+      $151 = $150 & -497;
+      $152 = HEAP32[$148>>2]|0;
+      $153 = $151 & 2097151;
+      $154 = $153 << 11;
+      $155 = $152 & 2047;
+      $156 = $155 | $154;
+      HEAP32[$148>>2] = $156;
+      $157 = $tmp_n1;
+      $158 = $157 << 4;
+      $159 = $s;
+      $160 = HEAP32[$159>>2]|0;
+      $161 = $160 >>> 11;
+      $162 = $161 | $158;
+      $163 = HEAP32[$159>>2]|0;
+      $164 = $162 & 2097151;
+      $165 = $164 << 11;
+      $166 = $163 & 2047;
+      $167 = $166 | $165;
+      HEAP32[$159>>2] = $167;
+      break;
+     } else {
+      if ($138) {
+       $168 = HEAP32[$139>>2]|0;
+       $169 = $168 >>> 11;
+       $170 = $169 & 496;
+       $171 = $170 >> 4;
+       $175 = $171;
+      } else {
+       $172 = ((($139)) + 12|0);
+       $173 = HEAP32[$172>>2]|0;
+       $175 = $173;
+      }
+      $174 = (($175) - 1)|0;
+      $176 = $s;
+      $177 = ((($176)) + 12|0);
+      HEAP32[$177>>2] = $174;
+      break;
+     }
+    }
+   }
+  } else {
+   $178 = $len;
+   $179 = (($178) - 1)|0;
+   $180 = $s;
+   $181 = HEAP32[$180>>2]|0;
+   $182 = $181 >>> 11;
+   $183 = $182 & 8;
+   $184 = ($183|0)!=(0);
+   $185 = $s;
+   $186 = ((($185)) + 12|0);
+   if ($184) {
+    $190 = $186;
+   } else {
+    $187 = ((($186)) + 8|0);
+    $188 = HEAP32[$187>>2]|0;
+    $190 = $188;
+   }
+   $189 = (($190) + ($179)|0);
+   $191 = HEAP8[$189>>0]|0;
+   $192 = $191 << 24 >> 24;
+   $193 = ($192|0)==(13);
+   if (!($193)) {
+    _mrb_nil_value_282($agg$result);
+    STACKTOP = sp;return;
+   }
+   $194 = $s;
+   $195 = HEAP32[$194>>2]|0;
+   $196 = $195 >>> 11;
+   $197 = $196 & 8;
+   $198 = ($197|0)!=(0);
+   $199 = $s;
+   $200 = HEAP32[$199>>2]|0;
+   $201 = $200 >>> 11;
+   $202 = $201 & 8;
+   $203 = ($202|0)!=(0);
+   $204 = $s;
+   if ($198) {
+    if ($203) {
+     $205 = HEAP32[$204>>2]|0;
+     $206 = $205 >>> 11;
+     $207 = $206 & 496;
+     $208 = $207 >> 4;
+     $212 = $208;
+    } else {
+     $209 = ((($204)) + 12|0);
+     $210 = HEAP32[$209>>2]|0;
+     $212 = $210;
+    }
+    $211 = (($212) - 1)|0;
+    $tmp_n2 = $211;
+    $213 = $s;
+    $214 = HEAP32[$213>>2]|0;
+    $215 = $214 >>> 11;
+    $216 = $215 & -497;
+    $217 = HEAP32[$213>>2]|0;
+    $218 = $216 & 2097151;
+    $219 = $218 << 11;
+    $220 = $217 & 2047;
+    $221 = $220 | $219;
+    HEAP32[$213>>2] = $221;
+    $222 = $tmp_n2;
+    $223 = $222 << 4;
+    $224 = $s;
+    $225 = HEAP32[$224>>2]|0;
+    $226 = $225 >>> 11;
+    $227 = $226 | $223;
+    $228 = HEAP32[$224>>2]|0;
+    $229 = $227 & 2097151;
+    $230 = $229 << 11;
+    $231 = $228 & 2047;
+    $232 = $231 | $230;
+    HEAP32[$224>>2] = $232;
+    break;
+   } else {
+    if ($203) {
+     $233 = HEAP32[$204>>2]|0;
+     $234 = $233 >>> 11;
+     $235 = $234 & 496;
+     $236 = $235 >> 4;
+     $240 = $236;
+    } else {
+     $237 = ((($204)) + 12|0);
+     $238 = HEAP32[$237>>2]|0;
+     $240 = $238;
+    }
+    $239 = (($240) - 1)|0;
+    $241 = $s;
+    $242 = ((($241)) + 12|0);
+    HEAP32[$242>>2] = $239;
+    break;
+   }
+  }
+ } while(0);
+ $243 = $s;
+ $244 = HEAP32[$243>>2]|0;
+ $245 = $244 >>> 11;
+ $246 = $245 & 8;
+ $247 = ($246|0)!=(0);
+ $248 = $s;
+ if ($247) {
+  $249 = HEAP32[$248>>2]|0;
+  $250 = $249 >>> 11;
+  $251 = $250 & 496;
+  $252 = $251 >> 4;
+  $266 = $252;
+ } else {
+  $253 = ((($248)) + 12|0);
+  $254 = HEAP32[$253>>2]|0;
+  $266 = $254;
+ }
+ $255 = $s;
+ $256 = HEAP32[$255>>2]|0;
+ $257 = $256 >>> 11;
+ $258 = $257 & 8;
+ $259 = ($258|0)!=(0);
+ $260 = $s;
+ $261 = ((($260)) + 12|0);
+ if ($259) {
+  $265 = $261;
+ } else {
+  $262 = ((($261)) + 8|0);
+  $263 = HEAP32[$262>>2]|0;
+  $265 = $263;
+ }
+ $264 = (($265) + ($266)|0);
+ HEAP8[$264>>0] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_str_chop($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $self$byval_copy = 0, $str = 0, $str$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 40|0;
+ $self$byval_copy = sp + 32|0;
+ $str = sp + 16|0;
+ $1 = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $3 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _mrb_str_dup($1,$3,$self$byval_copy);
+ ;HEAP32[$str>>2]=HEAP32[$1>>2]|0;HEAP32[$str+4>>2]=HEAP32[$1+4>>2]|0;
+ $4 = $0;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_chop_bang($2,$4,$str$byval_copy);
+ ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_str_chop_bang($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0;
+ var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0;
+ var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0;
+ var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0;
+ var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $clen = 0, $e = 0;
+ var $len = 0, $or$cond = 0, $p = 0, $s = 0, $t = 0, $tmp_n = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$str>>2]|0;
+ $s = $1;
+ $2 = $0;
+ $3 = $s;
+ _mrb_str_modify($2,$3);
+ $4 = $s;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5 >>> 11;
+ $7 = $6 & 8;
+ $8 = ($7|0)!=(0);
+ $9 = $s;
+ if ($8) {
+  $10 = HEAP32[$9>>2]|0;
+  $11 = $10 >>> 11;
+  $12 = $11 & 496;
+  $13 = $12 >> 4;
+  $16 = $13;
+ } else {
+  $14 = ((($9)) + 12|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = $15;
+ }
+ $17 = ($16|0)>(0);
+ if (!($17)) {
+  _mrb_nil_value_282($agg$result);
+  STACKTOP = sp;return;
+ }
+ $18 = $s;
+ $19 = HEAP32[$18>>2]|0;
+ $20 = $19 >>> 11;
+ $21 = $20 & 8;
+ $22 = ($21|0)!=(0);
+ $23 = $s;
+ $24 = ((($23)) + 12|0);
+ if ($22) {
+  $27 = $24;
+ } else {
+  $25 = ((($24)) + 8|0);
+  $26 = HEAP32[$25>>2]|0;
+  $27 = $26;
+ }
+ $t = $27;
+ $28 = $t;
+ $p = $28;
+ $29 = $p;
+ $30 = $s;
+ $31 = HEAP32[$30>>2]|0;
+ $32 = $31 >>> 11;
+ $33 = $32 & 8;
+ $34 = ($33|0)!=(0);
+ $35 = $s;
+ if ($34) {
+  $36 = HEAP32[$35>>2]|0;
+  $37 = $36 >>> 11;
+  $38 = $37 & 496;
+  $39 = $38 >> 4;
+  $43 = $39;
+ } else {
+  $40 = ((($35)) + 12|0);
+  $41 = HEAP32[$40>>2]|0;
+  $43 = $41;
+ }
+ $42 = (($29) + ($43)|0);
+ $e = $42;
+ while(1) {
+  $44 = $p;
+  $45 = $e;
+  $46 = ($44>>>0)<($45>>>0);
+  if (!($46)) {
+   break;
+  }
+  $47 = $p;
+  $48 = $e;
+  $49 = (_utf8len($47,$48)|0);
+  $clen = $49;
+  $50 = $p;
+  $51 = $clen;
+  $52 = (($50) + ($51)|0);
+  $53 = $e;
+  $54 = ($52>>>0)>=($53>>>0);
+  if ($54) {
+   break;
+  }
+  $55 = $clen;
+  $56 = $p;
+  $57 = (($56) + ($55)|0);
+  $p = $57;
+ }
+ $58 = $p;
+ $59 = $t;
+ $60 = $58;
+ $61 = $59;
+ $62 = (($60) - ($61))|0;
+ $len = $62;
+ $63 = $len;
+ $64 = $s;
+ $65 = HEAP32[$64>>2]|0;
+ $66 = $65 >>> 11;
+ $67 = $66 & 8;
+ $68 = ($67|0)!=(0);
+ $69 = $s;
+ $70 = ((($69)) + 12|0);
+ if ($68) {
+  $74 = $70;
+ } else {
+  $71 = ((($70)) + 8|0);
+  $72 = HEAP32[$71>>2]|0;
+  $74 = $72;
+ }
+ $73 = (($74) + ($63)|0);
+ $75 = HEAP8[$73>>0]|0;
+ $76 = $75 << 24 >> 24;
+ $77 = ($76|0)==(10);
+ $78 = $len;
+ $79 = ($78|0)>(0);
+ $or$cond = $77 & $79;
+ if ($or$cond) {
+  $80 = $len;
+  $81 = (($80) - 1)|0;
+  $82 = $s;
+  $83 = HEAP32[$82>>2]|0;
+  $84 = $83 >>> 11;
+  $85 = $84 & 8;
+  $86 = ($85|0)!=(0);
+  $87 = $s;
+  $88 = ((($87)) + 12|0);
+  if ($86) {
+   $92 = $88;
+  } else {
+   $89 = ((($88)) + 8|0);
+   $90 = HEAP32[$89>>2]|0;
+   $92 = $90;
+  }
+  $91 = (($92) + ($81)|0);
+  $93 = HEAP8[$91>>0]|0;
+  $94 = $93 << 24 >> 24;
+  $95 = ($94|0)==(13);
+  if ($95) {
+   $96 = $len;
+   $97 = (($96) + -1)|0;
+   $len = $97;
+  }
+ }
+ $98 = $s;
+ $99 = HEAP32[$98>>2]|0;
+ $100 = $99 >>> 11;
+ $101 = $100 & 8;
+ $102 = ($101|0)!=(0);
+ $103 = $len;
+ if ($102) {
+  $tmp_n = $103;
+  $104 = $s;
+  $105 = HEAP32[$104>>2]|0;
+  $106 = $105 >>> 11;
+  $107 = $106 & -497;
+  $108 = HEAP32[$104>>2]|0;
+  $109 = $107 & 2097151;
+  $110 = $109 << 11;
+  $111 = $108 & 2047;
+  $112 = $111 | $110;
+  HEAP32[$104>>2] = $112;
+  $113 = $tmp_n;
+  $114 = $113 << 4;
+  $115 = $s;
+  $116 = HEAP32[$115>>2]|0;
+  $117 = $116 >>> 11;
+  $118 = $117 | $114;
+  $119 = HEAP32[$115>>2]|0;
+  $120 = $118 & 2097151;
+  $121 = $120 << 11;
+  $122 = $119 & 2047;
+  $123 = $122 | $121;
+  HEAP32[$115>>2] = $123;
+ } else {
+  $124 = $s;
+  $125 = ((($124)) + 12|0);
+  HEAP32[$125>>2] = $103;
+ }
+ $126 = $len;
+ $127 = $s;
+ $128 = HEAP32[$127>>2]|0;
+ $129 = $128 >>> 11;
+ $130 = $129 & 8;
+ $131 = ($130|0)!=(0);
+ $132 = $s;
+ $133 = ((($132)) + 12|0);
+ if ($131) {
+  $137 = $133;
+ } else {
+  $134 = ((($133)) + 8|0);
+  $135 = HEAP32[$134>>2]|0;
+  $137 = $135;
+ }
+ $136 = (($137) + ($126)|0);
+ HEAP8[$136>>0] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_str_downcase($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $self$byval_copy = 0, $str = 0, $str$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 40|0;
+ $self$byval_copy = sp + 32|0;
+ $str = sp + 16|0;
+ $1 = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $3 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _mrb_str_dup($1,$3,$self$byval_copy);
+ ;HEAP32[$str>>2]=HEAP32[$1>>2]|0;HEAP32[$str+4>>2]=HEAP32[$1+4>>2]|0;
+ $4 = $0;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_downcase_bang($2,$4,$str$byval_copy);
+ ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_str_downcase_bang($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $modify = 0, $p = 0, $pend = 0, $s = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $modify = 0;
+ $1 = HEAP32[$str>>2]|0;
+ $s = $1;
+ $2 = $0;
+ $3 = $s;
+ _mrb_str_modify($2,$3);
+ $4 = $s;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5 >>> 11;
+ $7 = $6 & 8;
+ $8 = ($7|0)!=(0);
+ $9 = $s;
+ $10 = ((($9)) + 12|0);
+ if ($8) {
+  $13 = $10;
+ } else {
+  $11 = ((($10)) + 8|0);
+  $12 = HEAP32[$11>>2]|0;
+  $13 = $12;
+ }
+ $p = $13;
+ $14 = $s;
+ $15 = HEAP32[$14>>2]|0;
+ $16 = $15 >>> 11;
+ $17 = $16 & 8;
+ $18 = ($17|0)!=(0);
+ $19 = $s;
+ $20 = ((($19)) + 12|0);
+ if ($18) {
+  $36 = $20;
+ } else {
+  $21 = ((($20)) + 8|0);
+  $22 = HEAP32[$21>>2]|0;
+  $36 = $22;
+ }
+ $23 = $s;
+ $24 = HEAP32[$23>>2]|0;
+ $25 = $24 >>> 11;
+ $26 = $25 & 8;
+ $27 = ($26|0)!=(0);
+ $28 = $s;
+ if ($27) {
+  $29 = HEAP32[$28>>2]|0;
+  $30 = $29 >>> 11;
+  $31 = $30 & 496;
+  $32 = $31 >> 4;
+  $37 = $32;
+ } else {
+  $33 = ((($28)) + 12|0);
+  $34 = HEAP32[$33>>2]|0;
+  $37 = $34;
+ }
+ $35 = (($36) + ($37)|0);
+ $pend = $35;
+ while(1) {
+  $38 = $p;
+  $39 = $pend;
+  $40 = ($38>>>0)<($39>>>0);
+  if (!($40)) {
+   break;
+  }
+  $41 = $p;
+  $42 = HEAP8[$41>>0]|0;
+  $43 = $42 << 24 >> 24;
+  $44 = (($43) - 65)|0;
+  $45 = ($44>>>0)<(26);
+  if ($45) {
+   $46 = $p;
+   $47 = HEAP8[$46>>0]|0;
+   $48 = $47 << 24 >> 24;
+   $49 = (($48) - 65)|0;
+   $50 = ($49>>>0)<(26);
+   $51 = $p;
+   $52 = HEAP8[$51>>0]|0;
+   $53 = $52 << 24 >> 24;
+   $54 = $53 | 32;
+   $55 = $50 ? $54 : $53;
+   $56 = $55&255;
+   $57 = $p;
+   HEAP8[$57>>0] = $56;
+   $modify = 1;
+  }
+  $58 = $p;
+  $59 = ((($58)) + 1|0);
+  $p = $59;
+ }
+ $60 = $modify;
+ $61 = ($60<<24>>24)!=(0);
+ if ($61) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+  STACKTOP = sp;return;
+ } else {
+  _mrb_nil_value_282($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_str_empty_p($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $s = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $s = $1;
+ $2 = $s;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $4 & 8;
+ $6 = ($5|0)!=(0);
+ $7 = $s;
+ if ($6) {
+  $8 = HEAP32[$7>>2]|0;
+  $9 = $8 >>> 11;
+  $10 = $9 & 496;
+  $11 = $10 >> 4;
+  $14 = $11;
+ } else {
+  $12 = ((($7)) + 12|0);
+  $13 = HEAP32[$12>>2]|0;
+  $14 = $13;
+ }
+ $15 = ($14|0)==(0);
+ $16 = $15&1;
+ $17 = $16&255;
+ _mrb_bool_value_307($agg$result,$17);
+ STACKTOP = sp;return;
+}
+function _mrb_str_eql($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $eql_p = 0, $self$byval_copy = 0, $str2 = 0, $str2$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str2$byval_copy = sp + 32|0;
+ $self$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $str2 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $str2;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = ((($str2)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)==(16);
+ if (!($4)) {
+  $10 = 0;
+  $9 = $10&1;
+  $11 = $9&255;
+  $eql_p = $11;
+  $12 = $eql_p;
+  _mrb_bool_value_307($agg$result,$12);
+  STACKTOP = sp;return;
+ }
+ $5 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ ;HEAP32[$str2$byval_copy>>2]=HEAP32[$str2>>2]|0;HEAP32[$str2$byval_copy+4>>2]=HEAP32[$str2+4>>2]|0;
+ $6 = (_str_eql($5,$self$byval_copy,$str2$byval_copy)|0);
+ $7 = $6&255;
+ $8 = ($7|0)!=(0);
+ $10 = $8;
+ $9 = $10&1;
+ $11 = $9&255;
+ $eql_p = $11;
+ $12 = $eql_p;
+ _mrb_bool_value_307($agg$result,$12);
+ STACKTOP = sp;return;
+}
+function _mrb_str_hash_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $key = 0, $self$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ $2 = (_mrb_str_hash($1,$self$byval_copy)|0);
+ $key = $2;
+ $3 = $key;
+ _mrb_fixnum_value_289($agg$result,$3);
+ STACKTOP = sp;return;
+}
+function _mrb_str_include($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $i = 0, $include_p = 0, $self$byval_copy = 0, $str2 = 0, $str2$byval_copy = 0, $str2$byval_copy1 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str2$byval_copy1 = sp + 48|0;
+ $self$byval_copy = sp + 40|0;
+ $str2$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $str2 = sp + 16|0;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $str2;
+ (_mrb_get_args($2,68900,$vararg_buffer)|0);
+ $3 = ((($str2)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)==(3);
+ if (!($5)) {
+  $34 = $0;
+  ;HEAP32[$str2$byval_copy>>2]=HEAP32[$str2>>2]|0;HEAP32[$str2$byval_copy+4>>2]=HEAP32[$str2+4>>2]|0;
+  _mrb_str_to_str($1,$34,$str2$byval_copy);
+  ;HEAP32[$str2>>2]=HEAP32[$1>>2]|0;HEAP32[$str2+4>>2]=HEAP32[$1+4>>2]|0;
+  $35 = $0;
+  ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+  ;HEAP32[$str2$byval_copy1>>2]=HEAP32[$str2>>2]|0;HEAP32[$str2$byval_copy1+4>>2]=HEAP32[$str2+4>>2]|0;
+  $36 = (_str_index($35,$self$byval_copy,$str2$byval_copy1,0)|0);
+  $i = $36;
+  $37 = $i;
+  $38 = ($37|0)!=(-1);
+  $39 = $38&1;
+  $40 = $39&255;
+  $include_p = $40;
+  $41 = $include_p;
+  _mrb_bool_value_307($agg$result,$41);
+  STACKTOP = sp;return;
+ }
+ $6 = HEAP32[$self>>2]|0;
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $7 >>> 11;
+ $9 = $8 & 8;
+ $10 = ($9|0)!=(0);
+ $11 = HEAP32[$self>>2]|0;
+ $12 = ((($11)) + 12|0);
+ if ($10) {
+  $28 = $12;
+ } else {
+  $13 = ((($12)) + 8|0);
+  $14 = HEAP32[$13>>2]|0;
+  $28 = $14;
+ }
+ $15 = HEAP32[$str2>>2]|0;
+ $16 = HEAP32[$self>>2]|0;
+ $17 = HEAP32[$16>>2]|0;
+ $18 = $17 >>> 11;
+ $19 = $18 & 8;
+ $20 = ($19|0)!=(0);
+ $21 = HEAP32[$self>>2]|0;
+ if ($20) {
+  $22 = HEAP32[$21>>2]|0;
+  $23 = $22 >>> 11;
+  $24 = $23 & 496;
+  $25 = $24 >> 4;
+  $29 = $25;
+ } else {
+  $26 = ((($21)) + 12|0);
+  $27 = HEAP32[$26>>2]|0;
+  $29 = $27;
+ }
+ $30 = (_memchr($28,$15,$29)|0);
+ $31 = ($30|0)!=(0|0);
+ $32 = $31&1;
+ $33 = $32&255;
+ $include_p = $33;
+ $41 = $include_p;
+ _mrb_bool_value_307($agg$result,$41);
+ STACKTOP = sp;return;
+}
+function _mrb_str_index($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $argc = 0, $argv = 0, $clen = 0, $cond = 0;
+ var $pos = 0, $str$byval_copy = 0, $str$byval_copy5 = 0, $str$byval_copy7 = 0, $sub = 0, $sub$byval_copy = 0, $sub$byval_copy6 = 0, $sub$byval_copy8 = 0, $tmp = 0, $vararg_buffer = 0, $vararg_buffer2 = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $sub$byval_copy8 = sp + 112|0;
+ $str$byval_copy7 = sp + 104|0;
+ $sub$byval_copy6 = sp + 96|0;
+ $str$byval_copy5 = sp + 88|0;
+ $str$byval_copy = sp + 80|0;
+ $sub$byval_copy = sp + 72|0;
+ $vararg_buffer2 = sp + 8|0;
+ $vararg_buffer = sp;
+ $argv = sp + 60|0;
+ $argc = sp + 56|0;
+ $sub = sp + 48|0;
+ $1 = sp + 32|0;
+ $tmp = sp + 24|0;
+ $2 = sp + 16|0;
+ $0 = $mrb;
+ $3 = $0;
+ HEAP32[$vararg_buffer>>2] = $argv;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $argc;
+ (_mrb_get_args($3,68114,$vararg_buffer)|0);
+ $4 = HEAP32[$argc>>2]|0;
+ $5 = ($4|0)==(2);
+ do {
+  if ($5) {
+   $6 = HEAP32[$argv>>2]|0;
+   $7 = ((($6)) + 8|0);
+   $8 = HEAP32[$7>>2]|0;
+   $pos = $8;
+   $9 = HEAP32[$argv>>2]|0;
+   ;HEAP32[$sub>>2]=HEAP32[$9>>2]|0;HEAP32[$sub+4>>2]=HEAP32[$9+4>>2]|0;
+  } else {
+   $pos = 0;
+   $10 = HEAP32[$argc>>2]|0;
+   $11 = ($10|0)>(0);
+   if ($11) {
+    $12 = HEAP32[$argv>>2]|0;
+    ;HEAP32[$sub>>2]=HEAP32[$12>>2]|0;HEAP32[$sub+4>>2]=HEAP32[$12+4>>2]|0;
+    break;
+   } else {
+    _mrb_nil_value_282($1);
+    ;HEAP32[$sub>>2]=HEAP32[$1>>2]|0;HEAP32[$sub+4>>2]=HEAP32[$1+4>>2]|0;
+    break;
+   }
+  }
+ } while(0);
+ $13 = $0;
+ ;HEAP32[$sub$byval_copy>>2]=HEAP32[$sub>>2]|0;HEAP32[$sub$byval_copy+4>>2]=HEAP32[$sub+4>>2]|0;
+ _mrb_regexp_check($13,$sub$byval_copy);
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ $14 = (_utf8_strlen($str$byval_copy,-1)|0);
+ $clen = $14;
+ $15 = $pos;
+ $16 = ($15|0)<(0);
+ if ($16) {
+  $17 = $clen;
+  $18 = $pos;
+  $19 = (($18) + ($17))|0;
+  $pos = $19;
+  $20 = $pos;
+  $21 = ($20|0)<(0);
+  if ($21) {
+   _mrb_nil_value_282($agg$result);
+   STACKTOP = sp;return;
+  }
+ }
+ $22 = $pos;
+ $23 = $clen;
+ $24 = ($22|0)>=($23|0);
+ if ($24) {
+  _mrb_nil_value_282($agg$result);
+  STACKTOP = sp;return;
+ }
+ $25 = $pos;
+ ;HEAP32[$str$byval_copy5>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy5+4>>2]=HEAP32[$str+4>>2]|0;
+ $26 = (_chars2bytes($str$byval_copy5,0,$25)|0);
+ $pos = $26;
+ $27 = ((($sub)) + 4|0);
+ $28 = HEAP32[$27>>2]|0;
+ $cond = ($28|0)==(16);
+ if (!($cond)) {
+  $29 = $0;
+  ;HEAP32[$sub$byval_copy6>>2]=HEAP32[$sub>>2]|0;HEAP32[$sub$byval_copy6+4>>2]=HEAP32[$sub+4>>2]|0;
+  _mrb_check_string_type($2,$29,$sub$byval_copy6);
+  ;HEAP32[$tmp>>2]=HEAP32[$2>>2]|0;HEAP32[$tmp+4>>2]=HEAP32[$2+4>>2]|0;
+  $30 = ((($tmp)) + 4|0);
+  $31 = HEAP32[$30>>2]|0;
+  $32 = ($31|0)==(0);
+  if ($32) {
+   $33 = HEAP32[$tmp>>2]|0;
+   $34 = ($33|0)!=(0);
+   if (!($34)) {
+    $35 = $0;
+    $36 = $0;
+    $37 = (_mrb_class_get($36,68905)|0);
+    ;HEAP8[$vararg_buffer2>>0]=HEAP8[$sub>>0]|0;HEAP8[$vararg_buffer2+1>>0]=HEAP8[$sub+1>>0]|0;HEAP8[$vararg_buffer2+2>>0]=HEAP8[$sub+2>>0]|0;HEAP8[$vararg_buffer2+3>>0]=HEAP8[$sub+3>>0]|0;HEAP8[$vararg_buffer2+4>>0]=HEAP8[$sub+4>>0]|0;HEAP8[$vararg_buffer2+5>>0]=HEAP8[$sub+5>>0]|0;HEAP8[$vararg_buffer2+6>>0]=HEAP8[$sub+6>>0]|0;HEAP8[$vararg_buffer2+7>>0]=HEAP8[$sub+7>>0]|0;
+    _mrb_raisef($35,$37,56077,$vararg_buffer2);
+    // unreachable;
+   }
+  }
+  ;HEAP32[$sub>>2]=HEAP32[$tmp>>2]|0;HEAP32[$sub+4>>2]=HEAP32[$tmp+4>>2]|0;
+ }
+ $38 = $0;
+ $39 = $pos;
+ ;HEAP32[$str$byval_copy7>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy7+4>>2]=HEAP32[$str+4>>2]|0;
+ ;HEAP32[$sub$byval_copy8>>2]=HEAP32[$sub>>2]|0;HEAP32[$sub$byval_copy8+4>>2]=HEAP32[$sub+4>>2]|0;
+ $40 = (_str_index($38,$str$byval_copy7,$sub$byval_copy8,$39)|0);
+ $pos = $40;
+ $41 = $pos;
+ $42 = ($41|0)==(-1);
+ if ($42) {
+  _mrb_nil_value_282($agg$result);
+  STACKTOP = sp;return;
+ }
+ $43 = HEAP32[$str>>2]|0;
+ $44 = HEAP32[$43>>2]|0;
+ $45 = $44 >>> 11;
+ $46 = $45 & 8;
+ $47 = ($46|0)!=(0);
+ $48 = HEAP32[$str>>2]|0;
+ $49 = ((($48)) + 12|0);
+ if ($47) {
+  $53 = $49;
+ } else {
+  $50 = ((($49)) + 8|0);
+  $51 = HEAP32[$50>>2]|0;
+  $53 = $51;
+ }
+ $52 = $pos;
+ $54 = (_bytes2chars($53,$52)|0);
+ $pos = $54;
+ $55 = $pos;
+ _mrb_fixnum_value_289($agg$result,$55);
+ STACKTOP = sp;return;
+}
+function _bytes2chars($p,$bi) {
+ $p = $p|0;
+ $bi = $bi|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $b = 0;
+ var $i = 0, $n = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $bi;
+ $i = 0;
+ $b = 0;
+ while(1) {
+  $2 = $b;
+  $3 = $1;
+  $4 = ($2|0)<($3|0);
+  if (!($4)) {
+   break;
+  }
+  $5 = $0;
+  $6 = $0;
+  $7 = $1;
+  $8 = (($6) + ($7)|0);
+  $9 = (_utf8len($5,$8)|0);
+  $n = $9;
+  $10 = $n;
+  $11 = $b;
+  $12 = (($11) + ($10))|0;
+  $b = $12;
+  $13 = $n;
+  $14 = $0;
+  $15 = (($14) + ($13)|0);
+  $0 = $15;
+  $16 = $i;
+  $17 = (($16) + 1)|0;
+  $i = $17;
+ }
+ $18 = $i;
+ STACKTOP = sp;return ($18|0);
+}
+function _mrb_str_init($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $str2 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $str2 = sp + 16|0;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $str2;
+ $3 = (_mrb_get_args($2,56037,$vararg_buffer)|0);
+ $4 = ($3|0)==(1);
+ if ($4) {
+  $5 = $0;
+  $6 = HEAP32[$self>>2]|0;
+  $7 = HEAP32[$str2>>2]|0;
+  _str_replace($1,$5,$6,$7);
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_str_replace($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $str2 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $str2 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $str2;
+ (_mrb_get_args($1,55924,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP32[$str>>2]|0;
+ $4 = HEAP32[$str2>>2]|0;
+ _str_replace($agg$result,$2,$3,$4);
+ STACKTOP = sp;return;
+}
+function _mrb_str_size($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $len = 0, $self$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ $1 = (_utf8_strlen($self$byval_copy,-1)|0);
+ $len = $1;
+ $2 = $len;
+ _mrb_fixnum_value_289($agg$result,$2);
+ STACKTOP = sp;return;
+}
+function _mrb_str_reverse($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $str$byval_copy = 0, $str2 = 0, $str2$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str2$byval_copy = sp + 32|0;
+ $str$byval_copy = sp + 24|0;
+ $str2 = sp + 8|0;
+ $1 = sp;
+ $0 = $mrb;
+ $2 = $0;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_dup($str2,$2,$str$byval_copy);
+ $3 = $0;
+ ;HEAP32[$str2$byval_copy>>2]=HEAP32[$str2>>2]|0;HEAP32[$str2$byval_copy+4>>2]=HEAP32[$str2+4>>2]|0;
+ _mrb_str_reverse_bang($1,$3,$str2$byval_copy);
+ ;HEAP32[$agg$result>>2]=HEAP32[$str2>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str2+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_str_reverse_bang($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0;
+ var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0;
+ var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0;
+ var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0;
+ var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $buf = 0;
+ var $c = 0, $clen = 0, $e = 0, $e2 = 0, $len = 0, $p = 0, $p1 = 0, $r = 0, $s = 0, $str$byval_copy = 0, $utf8_len = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 48|0;
+ $0 = $mrb;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ $1 = (_utf8_strlen($str$byval_copy,-1)|0);
+ $utf8_len = $1;
+ $2 = HEAP32[$str>>2]|0;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $4 & 8;
+ $6 = ($5|0)!=(0);
+ $7 = HEAP32[$str>>2]|0;
+ if ($6) {
+  $8 = HEAP32[$7>>2]|0;
+  $9 = $8 >>> 11;
+  $10 = $9 & 496;
+  $11 = $10 >> 4;
+  $14 = $11;
+ } else {
+  $12 = ((($7)) + 12|0);
+  $13 = HEAP32[$12>>2]|0;
+  $14 = $13;
+ }
+ $len = $14;
+ $15 = $utf8_len;
+ $16 = $len;
+ $17 = ($15|0)==($16|0);
+ if ($17) {
+  $84 = HEAP32[$str>>2]|0;
+  $s = $84;
+  $85 = $0;
+  $86 = $s;
+  _mrb_str_modify($85,$86);
+  $87 = $s;
+  $88 = HEAP32[$87>>2]|0;
+  $89 = $88 >>> 11;
+  $90 = $89 & 8;
+  $91 = ($90|0)!=(0);
+  $92 = $s;
+  if ($91) {
+   $93 = HEAP32[$92>>2]|0;
+   $94 = $93 >>> 11;
+   $95 = $94 & 496;
+   $96 = $95 >> 4;
+   $99 = $96;
+  } else {
+   $97 = ((($92)) + 12|0);
+   $98 = HEAP32[$97>>2]|0;
+   $99 = $98;
+  }
+  $100 = ($99|0)>(1);
+  L11: do {
+   if ($100) {
+    $101 = $s;
+    $102 = HEAP32[$101>>2]|0;
+    $103 = $102 >>> 11;
+    $104 = $103 & 8;
+    $105 = ($104|0)!=(0);
+    $106 = $s;
+    $107 = ((($106)) + 12|0);
+    if ($105) {
+     $110 = $107;
+    } else {
+     $108 = ((($107)) + 8|0);
+     $109 = HEAP32[$108>>2]|0;
+     $110 = $109;
+    }
+    $p1 = $110;
+    $111 = $p1;
+    $112 = $s;
+    $113 = HEAP32[$112>>2]|0;
+    $114 = $113 >>> 11;
+    $115 = $114 & 8;
+    $116 = ($115|0)!=(0);
+    $117 = $s;
+    if ($116) {
+     $118 = HEAP32[$117>>2]|0;
+     $119 = $118 >>> 11;
+     $120 = $119 & 496;
+     $121 = $120 >> 4;
+     $125 = $121;
+    } else {
+     $122 = ((($117)) + 12|0);
+     $123 = HEAP32[$122>>2]|0;
+     $125 = $123;
+    }
+    $124 = (($111) + ($125)|0);
+    $126 = ((($124)) + -1|0);
+    $e2 = $126;
+    while(1) {
+     $127 = $p1;
+     $128 = $e2;
+     $129 = ($127>>>0)<($128>>>0);
+     if (!($129)) {
+      break L11;
+     }
+     $130 = $p1;
+     $131 = HEAP8[$130>>0]|0;
+     $c = $131;
+     $132 = $e2;
+     $133 = HEAP8[$132>>0]|0;
+     $134 = $p1;
+     $135 = ((($134)) + 1|0);
+     $p1 = $135;
+     HEAP8[$134>>0] = $133;
+     $136 = $c;
+     $137 = $e2;
+     $138 = ((($137)) + -1|0);
+     $e2 = $138;
+     HEAP8[$137>>0] = $136;
+    }
+   }
+  } while(0);
+  ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $18 = $utf8_len;
+ $19 = ($18|0)>(1);
+ if ($19) {
+  $20 = $0;
+  $21 = HEAP32[$str>>2]|0;
+  _mrb_str_modify($20,$21);
+  $22 = HEAP32[$str>>2]|0;
+  $23 = HEAP32[$22>>2]|0;
+  $24 = $23 >>> 11;
+  $25 = $24 & 8;
+  $26 = ($25|0)!=(0);
+  $27 = HEAP32[$str>>2]|0;
+  if ($26) {
+   $28 = HEAP32[$27>>2]|0;
+   $29 = $28 >>> 11;
+   $30 = $29 & 496;
+   $31 = $30 >> 4;
+   $34 = $31;
+  } else {
+   $32 = ((($27)) + 12|0);
+   $33 = HEAP32[$32>>2]|0;
+   $34 = $33;
+  }
+  $len = $34;
+  $35 = $0;
+  $36 = $len;
+  $37 = (_mrb_malloc($35,$36)|0);
+  $buf = $37;
+  $38 = $buf;
+  $p = $38;
+  $39 = $buf;
+  $40 = $len;
+  $41 = (($39) + ($40)|0);
+  $e = $41;
+  $42 = $buf;
+  $43 = HEAP32[$str>>2]|0;
+  $44 = HEAP32[$43>>2]|0;
+  $45 = $44 >>> 11;
+  $46 = $45 & 8;
+  $47 = ($46|0)!=(0);
+  $48 = HEAP32[$str>>2]|0;
+  $49 = ((($48)) + 12|0);
+  if ($47) {
+   $53 = $49;
+  } else {
+   $50 = ((($49)) + 8|0);
+   $51 = HEAP32[$50>>2]|0;
+   $53 = $51;
+  }
+  $52 = $len;
+  _memcpy(($42|0),($53|0),($52|0))|0;
+  $54 = HEAP32[$str>>2]|0;
+  $55 = HEAP32[$54>>2]|0;
+  $56 = $55 >>> 11;
+  $57 = $56 & 8;
+  $58 = ($57|0)!=(0);
+  $59 = HEAP32[$str>>2]|0;
+  $60 = ((($59)) + 12|0);
+  if ($58) {
+   $65 = $60;
+  } else {
+   $61 = ((($60)) + 8|0);
+   $62 = HEAP32[$61>>2]|0;
+   $65 = $62;
+  }
+  $63 = $len;
+  $64 = (($65) + ($63)|0);
+  $r = $64;
+  while(1) {
+   $66 = $p;
+   $67 = $e;
+   $68 = ($66>>>0)<($67>>>0);
+   if (!($68)) {
+    break;
+   }
+   $69 = $p;
+   $70 = $e;
+   $71 = (_utf8len($69,$70)|0);
+   $clen = $71;
+   $72 = $clen;
+   $73 = $r;
+   $74 = (0 - ($72))|0;
+   $75 = (($73) + ($74)|0);
+   $r = $75;
+   $76 = $r;
+   $77 = $p;
+   $78 = $clen;
+   _memcpy(($76|0),($77|0),($78|0))|0;
+   $79 = $clen;
+   $80 = $p;
+   $81 = (($80) + ($79)|0);
+   $p = $81;
+  }
+  $82 = $0;
+  $83 = $buf;
+  _mrb_free($82,$83);
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_str_rindex($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $argc = 0, $argv = 0, $cond = 0, $len = 0, $pos = 0, $str$byval_copy = 0, $str$byval_copy5 = 0, $str$byval_copy6 = 0, $str$byval_copy9 = 0, $sub = 0, $sub$byval_copy = 0, $sub$byval_copy10 = 0, $sub$byval_copy7 = 0, $sub$byval_copy8 = 0, $tmp = 0, $vararg_buffer = 0, $vararg_buffer2 = 0, $vararg_ptr1 = 0;
+ var $vpos = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $sub$byval_copy10 = sp + 136|0;
+ $str$byval_copy9 = sp + 128|0;
+ $sub$byval_copy8 = sp + 120|0;
+ $sub$byval_copy7 = sp + 112|0;
+ $str$byval_copy6 = sp + 104|0;
+ $str$byval_copy5 = sp + 96|0;
+ $sub$byval_copy = sp + 88|0;
+ $str$byval_copy = sp + 80|0;
+ $vararg_buffer2 = sp + 8|0;
+ $vararg_buffer = sp;
+ $argv = sp + 68|0;
+ $argc = sp + 64|0;
+ $sub = sp + 56|0;
+ $vpos = sp + 48|0;
+ $1 = sp + 32|0;
+ $tmp = sp + 24|0;
+ $2 = sp + 16|0;
+ $0 = $mrb;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ $3 = (_utf8_strlen($str$byval_copy,-1)|0);
+ $len = $3;
+ $4 = $0;
+ HEAP32[$vararg_buffer>>2] = $argv;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $argc;
+ (_mrb_get_args($4,68114,$vararg_buffer)|0);
+ $5 = HEAP32[$argc>>2]|0;
+ $6 = ($5|0)==(2);
+ do {
+  if ($6) {
+   $7 = HEAP32[$argv>>2]|0;
+   ;HEAP32[$sub>>2]=HEAP32[$7>>2]|0;HEAP32[$sub+4>>2]=HEAP32[$7+4>>2]|0;
+   $8 = HEAP32[$argv>>2]|0;
+   $9 = ((($8)) + 8|0);
+   ;HEAP32[$vpos>>2]=HEAP32[$9>>2]|0;HEAP32[$vpos+4>>2]=HEAP32[$9+4>>2]|0;
+   $10 = HEAP32[$vpos>>2]|0;
+   $pos = $10;
+   $11 = $pos;
+   $12 = ($11|0)<(0);
+   if ($12) {
+    $13 = $len;
+    $14 = $pos;
+    $15 = (($14) + ($13))|0;
+    $pos = $15;
+    $16 = $pos;
+    $17 = ($16|0)<(0);
+    if ($17) {
+     $18 = $0;
+     ;HEAP32[$sub$byval_copy>>2]=HEAP32[$sub>>2]|0;HEAP32[$sub$byval_copy+4>>2]=HEAP32[$sub+4>>2]|0;
+     _mrb_regexp_check($18,$sub$byval_copy);
+     _mrb_nil_value_282($agg$result);
+     STACKTOP = sp;return;
+    }
+   }
+   $19 = $pos;
+   $20 = $len;
+   $21 = ($19|0)>($20|0);
+   if ($21) {
+    $22 = $len;
+    $pos = $22;
+   }
+  } else {
+   $23 = $len;
+   $pos = $23;
+   $24 = HEAP32[$argc>>2]|0;
+   $25 = ($24|0)>(0);
+   if ($25) {
+    $26 = HEAP32[$argv>>2]|0;
+    ;HEAP32[$sub>>2]=HEAP32[$26>>2]|0;HEAP32[$sub+4>>2]=HEAP32[$26+4>>2]|0;
+    break;
+   } else {
+    _mrb_nil_value_282($1);
+    ;HEAP32[$sub>>2]=HEAP32[$1>>2]|0;HEAP32[$sub+4>>2]=HEAP32[$1+4>>2]|0;
+    break;
+   }
+  }
+ } while(0);
+ $27 = $pos;
+ ;HEAP32[$str$byval_copy5>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy5+4>>2]=HEAP32[$str+4>>2]|0;
+ $28 = (_chars2bytes($str$byval_copy5,0,$27)|0);
+ $pos = $28;
+ $29 = $pos;
+ $30 = $len;
+ ;HEAP32[$str$byval_copy6>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy6+4>>2]=HEAP32[$str+4>>2]|0;
+ $31 = (_chars2bytes($str$byval_copy6,$29,$30)|0);
+ $len = $31;
+ $32 = $0;
+ ;HEAP32[$sub$byval_copy7>>2]=HEAP32[$sub>>2]|0;HEAP32[$sub$byval_copy7+4>>2]=HEAP32[$sub+4>>2]|0;
+ _mrb_regexp_check($32,$sub$byval_copy7);
+ $33 = ((($sub)) + 4|0);
+ $34 = HEAP32[$33>>2]|0;
+ $cond = ($34|0)==(16);
+ if (!($cond)) {
+  $35 = $0;
+  ;HEAP32[$sub$byval_copy8>>2]=HEAP32[$sub>>2]|0;HEAP32[$sub$byval_copy8+4>>2]=HEAP32[$sub+4>>2]|0;
+  _mrb_check_string_type($2,$35,$sub$byval_copy8);
+  ;HEAP32[$tmp>>2]=HEAP32[$2>>2]|0;HEAP32[$tmp+4>>2]=HEAP32[$2+4>>2]|0;
+  $36 = ((($tmp)) + 4|0);
+  $37 = HEAP32[$36>>2]|0;
+  $38 = ($37|0)==(0);
+  if ($38) {
+   $39 = HEAP32[$tmp>>2]|0;
+   $40 = ($39|0)!=(0);
+   if (!($40)) {
+    $41 = $0;
+    $42 = $0;
+    $43 = (_mrb_class_get($42,68905)|0);
+    ;HEAP8[$vararg_buffer2>>0]=HEAP8[$sub>>0]|0;HEAP8[$vararg_buffer2+1>>0]=HEAP8[$sub+1>>0]|0;HEAP8[$vararg_buffer2+2>>0]=HEAP8[$sub+2>>0]|0;HEAP8[$vararg_buffer2+3>>0]=HEAP8[$sub+3>>0]|0;HEAP8[$vararg_buffer2+4>>0]=HEAP8[$sub+4>>0]|0;HEAP8[$vararg_buffer2+5>>0]=HEAP8[$sub+5>>0]|0;HEAP8[$vararg_buffer2+6>>0]=HEAP8[$sub+6>>0]|0;HEAP8[$vararg_buffer2+7>>0]=HEAP8[$sub+7>>0]|0;
+    _mrb_raisef($41,$43,56077,$vararg_buffer2);
+    // unreachable;
+   }
+  }
+  ;HEAP32[$sub>>2]=HEAP32[$tmp>>2]|0;HEAP32[$sub+4>>2]=HEAP32[$tmp+4>>2]|0;
+ }
+ $44 = $0;
+ $45 = $pos;
+ ;HEAP32[$str$byval_copy9>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy9+4>>2]=HEAP32[$str+4>>2]|0;
+ ;HEAP32[$sub$byval_copy10>>2]=HEAP32[$sub>>2]|0;HEAP32[$sub$byval_copy10+4>>2]=HEAP32[$sub+4>>2]|0;
+ $46 = (_str_rindex($44,$str$byval_copy9,$sub$byval_copy10,$45)|0);
+ $pos = $46;
+ $47 = $pos;
+ $48 = ($47|0)>=(0);
+ if (!($48)) {
+  _mrb_nil_value_282($agg$result);
+  STACKTOP = sp;return;
+ }
+ $49 = HEAP32[$str>>2]|0;
+ $50 = HEAP32[$49>>2]|0;
+ $51 = $50 >>> 11;
+ $52 = $51 & 8;
+ $53 = ($52|0)!=(0);
+ $54 = HEAP32[$str>>2]|0;
+ $55 = ((($54)) + 12|0);
+ if ($53) {
+  $59 = $55;
+ } else {
+  $56 = ((($55)) + 8|0);
+  $57 = HEAP32[$56>>2]|0;
+  $59 = $57;
+ }
+ $58 = $pos;
+ $60 = (_bytes2chars($59,$58)|0);
+ $pos = $60;
+ $61 = $pos;
+ _mrb_fixnum_value_289($agg$result,$61);
+ STACKTOP = sp;return;
+}
+function _str_rindex($mrb,$str,$sub,$pos) {
+ $mrb = $mrb|0;
+ $str = $str|0;
+ $sub = $sub|0;
+ $pos = $pos|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
+ var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0;
+ var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0;
+ var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0;
+ var $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0;
+ var $97 = 0, $98 = 0, $99 = 0, $len = 0, $ps = 0, $s = 0, $sbeg = 0, $t = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $pos;
+ $3 = HEAP32[$str>>2]|0;
+ $ps = $3;
+ $4 = HEAP32[$sub>>2]|0;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5 >>> 11;
+ $7 = $6 & 8;
+ $8 = ($7|0)!=(0);
+ $9 = HEAP32[$sub>>2]|0;
+ if ($8) {
+  $10 = HEAP32[$9>>2]|0;
+  $11 = $10 >>> 11;
+  $12 = $11 & 496;
+  $13 = $12 >> 4;
+  $16 = $13;
+ } else {
+  $14 = ((($9)) + 12|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = $15;
+ }
+ $len = $16;
+ $17 = $ps;
+ $18 = HEAP32[$17>>2]|0;
+ $19 = $18 >>> 11;
+ $20 = $19 & 8;
+ $21 = ($20|0)!=(0);
+ $22 = $ps;
+ if ($21) {
+  $23 = HEAP32[$22>>2]|0;
+  $24 = $23 >>> 11;
+  $25 = $24 & 496;
+  $26 = $25 >> 4;
+  $30 = $26;
+ } else {
+  $27 = ((($22)) + 12|0);
+  $28 = HEAP32[$27>>2]|0;
+  $30 = $28;
+ }
+ $29 = $len;
+ $31 = ($30|0)<($29|0);
+ if ($31) {
+  $0 = -1;
+  $122 = $0;
+  STACKTOP = sp;return ($122|0);
+ }
+ $32 = $ps;
+ $33 = HEAP32[$32>>2]|0;
+ $34 = $33 >>> 11;
+ $35 = $34 & 8;
+ $36 = ($35|0)!=(0);
+ $37 = $ps;
+ if ($36) {
+  $38 = HEAP32[$37>>2]|0;
+  $39 = $38 >>> 11;
+  $40 = $39 & 496;
+  $41 = $40 >> 4;
+  $46 = $41;
+ } else {
+  $42 = ((($37)) + 12|0);
+  $43 = HEAP32[$42>>2]|0;
+  $46 = $43;
+ }
+ $44 = $2;
+ $45 = (($46) - ($44))|0;
+ $47 = $len;
+ $48 = ($45|0)<($47|0);
+ if ($48) {
+  $49 = $ps;
+  $50 = HEAP32[$49>>2]|0;
+  $51 = $50 >>> 11;
+  $52 = $51 & 8;
+  $53 = ($52|0)!=(0);
+  $54 = $ps;
+  if ($53) {
+   $55 = HEAP32[$54>>2]|0;
+   $56 = $55 >>> 11;
+   $57 = $56 & 496;
+   $58 = $57 >> 4;
+   $63 = $58;
+  } else {
+   $59 = ((($54)) + 12|0);
+   $60 = HEAP32[$59>>2]|0;
+   $63 = $60;
+  }
+  $61 = $len;
+  $62 = (($63) - ($61))|0;
+  $2 = $62;
+ }
+ $64 = $ps;
+ $65 = HEAP32[$64>>2]|0;
+ $66 = $65 >>> 11;
+ $67 = $66 & 8;
+ $68 = ($67|0)!=(0);
+ $69 = $ps;
+ $70 = ((($69)) + 12|0);
+ if ($68) {
+  $73 = $70;
+ } else {
+  $71 = ((($70)) + 8|0);
+  $72 = HEAP32[$71>>2]|0;
+  $73 = $72;
+ }
+ $sbeg = $73;
+ $74 = $ps;
+ $75 = HEAP32[$74>>2]|0;
+ $76 = $75 >>> 11;
+ $77 = $76 & 8;
+ $78 = ($77|0)!=(0);
+ $79 = $ps;
+ $80 = ((($79)) + 12|0);
+ if ($78) {
+  $85 = $80;
+ } else {
+  $81 = ((($80)) + 8|0);
+  $82 = HEAP32[$81>>2]|0;
+  $85 = $82;
+ }
+ $83 = $2;
+ $84 = (($85) + ($83)|0);
+ $s = $84;
+ $86 = HEAP32[$sub>>2]|0;
+ $87 = HEAP32[$86>>2]|0;
+ $88 = $87 >>> 11;
+ $89 = $88 & 8;
+ $90 = ($89|0)!=(0);
+ $91 = HEAP32[$sub>>2]|0;
+ $92 = ((($91)) + 12|0);
+ if ($90) {
+  $95 = $92;
+ } else {
+  $93 = ((($92)) + 8|0);
+  $94 = HEAP32[$93>>2]|0;
+  $95 = $94;
+ }
+ $t = $95;
+ $96 = $len;
+ $97 = ($96|0)!=(0);
+ if (!($97)) {
+  $121 = $2;
+  $0 = $121;
+  $122 = $0;
+  STACKTOP = sp;return ($122|0);
+ }
+ while(1) {
+  $98 = $sbeg;
+  $99 = $s;
+  $100 = ($98>>>0)<=($99>>>0);
+  if (!($100)) {
+   label = 34;
+   break;
+  }
+  $101 = $s;
+  $102 = $t;
+  $103 = $len;
+  $104 = (_memcmp($101,$102,$103)|0);
+  $105 = ($104|0)==(0);
+  $106 = $s;
+  if ($105) {
+   break;
+  }
+  $120 = ((($106)) + -1|0);
+  $s = $120;
+ }
+ if ((label|0) == 34) {
+  $0 = -1;
+  $122 = $0;
+  STACKTOP = sp;return ($122|0);
+ }
+ $107 = $ps;
+ $108 = HEAP32[$107>>2]|0;
+ $109 = $108 >>> 11;
+ $110 = $109 & 8;
+ $111 = ($110|0)!=(0);
+ $112 = $ps;
+ $113 = ((($112)) + 12|0);
+ if ($111) {
+  $117 = $113;
+ } else {
+  $114 = ((($113)) + 8|0);
+  $115 = HEAP32[$114>>2]|0;
+  $117 = $115;
+ }
+ $116 = $106;
+ $118 = $117;
+ $119 = (($116) - ($118))|0;
+ $0 = $119;
+ $122 = $0;
+ STACKTOP = sp;return ($122|0);
+}
+function _mrb_str_split_m($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $$byval_copy = 0, $$byval_copy9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0;
+ var $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0;
+ var $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0;
+ var $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0;
+ var $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0;
+ var $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0;
+ var $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0;
+ var $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0;
+ var $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0;
+ var $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0;
+ var $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0;
+ var $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0;
+ var $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
+ var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0;
+ var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0;
+ var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0;
+ var $98 = 0, $99 = 0, $ai = 0, $ai3 = 0, $argc = 0, $beg = 0, $c = 0, $end = 0, $i = 0, $idx = 0, $idx2 = 0, $len = 0, $lim = 0, $lim_p = 0, $or$cond = 0, $or$cond3 = 0, $pat_len = 0, $result = 0, $result$byval_copy = 0, $result$byval_copy13 = 0;
+ var $result$byval_copy14 = 0, $result$byval_copy8 = 0, $skip = 0, $spat = 0, $split_type = 0, $str$byval_copy = 0, $str$byval_copy10 = 0, $str$byval_copy11 = 0, $str$byval_copy12 = 0, $str$byval_copy5 = 0, $str$byval_copy6 = 0, $str$byval_copy7 = 0, $str_len = 0, $str_len1 = 0, $tmp = 0, $tmp$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 272|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $result$byval_copy14 = sp + 256|0;
+ $tmp$byval_copy = sp + 248|0;
+ $result$byval_copy13 = sp + 240|0;
+ $str$byval_copy12 = sp + 232|0;
+ $str$byval_copy11 = sp + 224|0;
+ $str$byval_copy10 = sp + 216|0;
+ $$byval_copy9 = sp + 208|0;
+ $result$byval_copy8 = sp + 200|0;
+ $str$byval_copy7 = sp + 192|0;
+ $str$byval_copy6 = sp + 184|0;
+ $$byval_copy = sp + 176|0;
+ $result$byval_copy = sp + 168|0;
+ $str$byval_copy5 = sp + 160|0;
+ $str$byval_copy = sp + 152|0;
+ $vararg_buffer = sp;
+ $spat = sp + 136|0;
+ $lim = sp + 112|0;
+ $result = sp + 104|0;
+ $tmp = sp + 96|0;
+ $1 = sp + 88|0;
+ $2 = sp + 64|0;
+ $3 = sp + 40|0;
+ $4 = sp + 32|0;
+ $5 = sp + 24|0;
+ $6 = sp + 8|0;
+ $0 = $mrb;
+ _mrb_nil_value_282($spat);
+ $split_type = 1;
+ $i = 0;
+ HEAP32[$lim>>2] = 0;
+ $7 = $0;
+ HEAP32[$vararg_buffer>>2] = $spat;
+ $vararg_ptr4 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr4>>2] = $lim;
+ $8 = (_mrb_get_args($7,56107,$vararg_buffer)|0);
+ $argc = $8;
+ $9 = HEAP32[$lim>>2]|0;
+ $10 = ($9|0)>(0);
+ $11 = $argc;
+ $12 = ($11|0)==(2);
+ $13 = $10 ? $12 : 0;
+ $14 = $13&1;
+ $lim_p = $14;
+ $15 = $argc;
+ $16 = ($15|0)==(2);
+ do {
+  if ($16) {
+   $17 = HEAP32[$lim>>2]|0;
+   $18 = ($17|0)==(1);
+   if (!($18)) {
+    $i = 1;
+    break;
+   }
+   $19 = HEAP32[$str>>2]|0;
+   $20 = HEAP32[$19>>2]|0;
+   $21 = $20 >>> 11;
+   $22 = $21 & 8;
+   $23 = ($22|0)!=(0);
+   $24 = HEAP32[$str>>2]|0;
+   if ($23) {
+    $25 = HEAP32[$24>>2]|0;
+    $26 = $25 >>> 11;
+    $27 = $26 & 496;
+    $28 = $27 >> 4;
+    $31 = $28;
+   } else {
+    $29 = ((($24)) + 12|0);
+    $30 = HEAP32[$29>>2]|0;
+    $31 = $30;
+   }
+   $32 = ($31|0)==(0);
+   $33 = $0;
+   if ($32) {
+    _mrb_ary_new_capa($agg$result,$33,0);
+    STACKTOP = sp;return;
+   } else {
+    _mrb_ary_new_from_values($agg$result,$33,1,$str);
+    STACKTOP = sp;return;
+   }
+  }
+ } while(0);
+ $34 = $argc;
+ $35 = ($34|0)==(0);
+ do {
+  if ($35) {
+   label = 13;
+  } else {
+   $36 = ((($spat)) + 4|0);
+   $37 = HEAP32[$36>>2]|0;
+   $38 = ($37|0)==(0);
+   if ($38) {
+    $39 = HEAP32[$spat>>2]|0;
+    $40 = ($39|0)!=(0);
+    if (!($40)) {
+     label = 13;
+     break;
+    }
+   }
+   $41 = ((($spat)) + 4|0);
+   $42 = HEAP32[$41>>2]|0;
+   $43 = ($42|0)==(16);
+   if (!($43)) {
+    $71 = $0;
+    ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+    _mrb_noregexp($71,$str$byval_copy);
+    break;
+   }
+   $split_type = 1;
+   $44 = HEAP32[$spat>>2]|0;
+   $45 = HEAP32[$44>>2]|0;
+   $46 = $45 >>> 11;
+   $47 = $46 & 8;
+   $48 = ($47|0)!=(0);
+   $49 = HEAP32[$spat>>2]|0;
+   if ($48) {
+    $50 = HEAP32[$49>>2]|0;
+    $51 = $50 >>> 11;
+    $52 = $51 & 496;
+    $53 = $52 >> 4;
+    $56 = $53;
+   } else {
+    $54 = ((($49)) + 12|0);
+    $55 = HEAP32[$54>>2]|0;
+    $56 = $55;
+   }
+   $57 = ($56|0)==(1);
+   if ($57) {
+    $58 = HEAP32[$spat>>2]|0;
+    $59 = HEAP32[$58>>2]|0;
+    $60 = $59 >>> 11;
+    $61 = $60 & 8;
+    $62 = ($61|0)!=(0);
+    $63 = HEAP32[$spat>>2]|0;
+    $64 = ((($63)) + 12|0);
+    if ($62) {
+     $68 = $64;
+    } else {
+     $65 = ((($64)) + 8|0);
+     $66 = HEAP32[$65>>2]|0;
+     $68 = $66;
+    }
+    $67 = HEAP8[$68>>0]|0;
+    $69 = $67 << 24 >> 24;
+    $70 = ($69|0)==(32);
+    if ($70) {
+     $split_type = 0;
+    }
+   }
+  }
+ } while(0);
+ if ((label|0) == 13) {
+  $split_type = 0;
+ }
+ $72 = $0;
+ _mrb_ary_new($1,$72);
+ ;HEAP32[$result>>2]=HEAP32[$1>>2]|0;HEAP32[$result+4>>2]=HEAP32[$1+4>>2]|0;
+ $beg = 0;
+ $73 = $split_type;
+ $74 = ($73|0)==(0);
+ L37: do {
+  if ($74) {
+   $skip = 1;
+   $idx = 0;
+   $75 = HEAP32[$str>>2]|0;
+   $76 = HEAP32[$75>>2]|0;
+   $77 = $76 >>> 11;
+   $78 = $77 & 8;
+   $79 = ($78|0)!=(0);
+   $80 = HEAP32[$str>>2]|0;
+   if ($79) {
+    $81 = HEAP32[$80>>2]|0;
+    $82 = $81 >>> 11;
+    $83 = $82 & 496;
+    $84 = $83 >> 4;
+    $87 = $84;
+   } else {
+    $85 = ((($80)) + 12|0);
+    $86 = HEAP32[$85>>2]|0;
+    $87 = $86;
+   }
+   $str_len = $87;
+   $88 = $0;
+   $89 = (_mrb_gc_arena_save($88)|0);
+   $ai = $89;
+   $90 = $beg;
+   $end = $90;
+   $idx = $90;
+   while(1) {
+    $91 = $idx;
+    $92 = $str_len;
+    $93 = ($91|0)<($92|0);
+    if (!($93)) {
+     break L37;
+    }
+    $94 = $idx;
+    $95 = (($94) + 1)|0;
+    $idx = $95;
+    $96 = HEAP32[$str>>2]|0;
+    $97 = HEAP32[$96>>2]|0;
+    $98 = $97 >>> 11;
+    $99 = $98 & 8;
+    $100 = ($99|0)!=(0);
+    $101 = HEAP32[$str>>2]|0;
+    $102 = ((($101)) + 12|0);
+    if ($100) {
+     $106 = $102;
+    } else {
+     $103 = ((($102)) + 8|0);
+     $104 = HEAP32[$103>>2]|0;
+     $106 = $104;
+    }
+    $105 = (($106) + ($94)|0);
+    $107 = HEAP8[$105>>0]|0;
+    $108 = $107&255;
+    $c = $108;
+    $109 = $skip;
+    $110 = ($109<<24>>24)!=(0);
+    $111 = $c;
+    $112 = ($111|0)==(32);
+    if ($110) {
+     if (!($112)) {
+      $113 = $c;
+      $114 = (($113) - 9)|0;
+      $115 = ($114>>>0)<(5);
+      if (!($115)) {
+       $117 = $idx;
+       $end = $117;
+       $skip = 0;
+       $118 = $lim_p;
+       $119 = ($118|0)!=(0);
+       if (!($119)) {
+        continue;
+       }
+       $120 = HEAP32[$lim>>2]|0;
+       $121 = $i;
+       $122 = ($120|0)<=($121|0);
+       if ($122) {
+        break L37;
+       } else {
+        continue;
+       }
+      }
+     }
+     $116 = $idx;
+     $beg = $116;
+     continue;
+    } else {
+     if (!($112)) {
+      $123 = $c;
+      $124 = (($123) - 9)|0;
+      $125 = ($124>>>0)<(5);
+      if (!($125)) {
+       $139 = $idx;
+       $end = $139;
+       continue;
+      }
+     }
+     $126 = $0;
+     $127 = $0;
+     $128 = $beg;
+     $129 = $end;
+     $130 = $beg;
+     $131 = (($129) - ($130))|0;
+     ;HEAP32[$str$byval_copy5>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy5+4>>2]=HEAP32[$str+4>>2]|0;
+     _byte_subseq($2,$127,$str$byval_copy5,$128,$131);
+     ;HEAP32[$result$byval_copy>>2]=HEAP32[$result>>2]|0;HEAP32[$result$byval_copy+4>>2]=HEAP32[$result+4>>2]|0;
+     ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+     _mrb_ary_push($126,$result$byval_copy,$$byval_copy);
+     $132 = $0;
+     $133 = $ai;
+     _mrb_gc_arena_restore($132,$133);
+     $skip = 1;
+     $134 = $idx;
+     $beg = $134;
+     $135 = $lim_p;
+     $136 = ($135|0)!=(0);
+     if (!($136)) {
+      continue;
+     }
+     $137 = $i;
+     $138 = (($137) + 1)|0;
+     $i = $138;
+     continue;
+    }
+   }
+  } else {
+   $140 = $split_type;
+   $141 = ($140|0)==(1);
+   if (!($141)) {
+    $224 = $0;
+    ;HEAP32[$str$byval_copy10>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy10+4>>2]=HEAP32[$str+4>>2]|0;
+    _mrb_noregexp($224,$str$byval_copy10);
+    break;
+   }
+   $142 = HEAP32[$str>>2]|0;
+   $143 = HEAP32[$142>>2]|0;
+   $144 = $143 >>> 11;
+   $145 = $144 & 8;
+   $146 = ($145|0)!=(0);
+   $147 = HEAP32[$str>>2]|0;
+   if ($146) {
+    $148 = HEAP32[$147>>2]|0;
+    $149 = $148 >>> 11;
+    $150 = $149 & 496;
+    $151 = $150 >> 4;
+    $154 = $151;
+   } else {
+    $152 = ((($147)) + 12|0);
+    $153 = HEAP32[$152>>2]|0;
+    $154 = $153;
+   }
+   $str_len1 = $154;
+   $155 = HEAP32[$spat>>2]|0;
+   $156 = HEAP32[$155>>2]|0;
+   $157 = $156 >>> 11;
+   $158 = $157 & 8;
+   $159 = ($158|0)!=(0);
+   $160 = HEAP32[$spat>>2]|0;
+   if ($159) {
+    $161 = HEAP32[$160>>2]|0;
+    $162 = $161 >>> 11;
+    $163 = $162 & 496;
+    $164 = $163 >> 4;
+    $167 = $164;
+   } else {
+    $165 = ((($160)) + 12|0);
+    $166 = HEAP32[$165>>2]|0;
+    $167 = $166;
+   }
+   $pat_len = $167;
+   $idx2 = 0;
+   $168 = $0;
+   $169 = (_mrb_gc_arena_save($168)|0);
+   $ai3 = $169;
+   while(1) {
+    $170 = $idx2;
+    $171 = $str_len1;
+    $172 = ($170|0)<($171|0);
+    if (!($172)) {
+     break;
+    }
+    $173 = $pat_len;
+    $174 = ($173|0)>(0);
+    if ($174) {
+     $175 = HEAP32[$spat>>2]|0;
+     $176 = HEAP32[$175>>2]|0;
+     $177 = $176 >>> 11;
+     $178 = $177 & 8;
+     $179 = ($178|0)!=(0);
+     $180 = HEAP32[$spat>>2]|0;
+     $181 = ((($180)) + 12|0);
+     if ($179) {
+      $200 = $181;
+     } else {
+      $182 = ((($181)) + 8|0);
+      $183 = HEAP32[$182>>2]|0;
+      $200 = $183;
+     }
+     $184 = $pat_len;
+     $185 = HEAP32[$str>>2]|0;
+     $186 = HEAP32[$185>>2]|0;
+     $187 = $186 >>> 11;
+     $188 = $187 & 8;
+     $189 = ($188|0)!=(0);
+     $190 = HEAP32[$str>>2]|0;
+     $191 = ((($190)) + 12|0);
+     if ($189) {
+      $196 = $191;
+     } else {
+      $192 = ((($191)) + 8|0);
+      $193 = HEAP32[$192>>2]|0;
+      $196 = $193;
+     }
+     $194 = $idx2;
+     $195 = (($196) + ($194)|0);
+     $197 = $str_len1;
+     $198 = $idx2;
+     $199 = (($197) - ($198))|0;
+     $201 = (_mrb_memsearch($200,$184,$195,$199)|0);
+     $end = $201;
+     $202 = $end;
+     $203 = ($202|0)<(0);
+     if ($203) {
+      break;
+     }
+    } else {
+     $204 = $idx2;
+     ;HEAP32[$str$byval_copy6>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy6+4>>2]=HEAP32[$str+4>>2]|0;
+     $205 = (_chars2bytes($str$byval_copy6,$204,1)|0);
+     $end = $205;
+    }
+    $206 = $0;
+    $207 = $0;
+    $208 = $idx2;
+    $209 = $end;
+    ;HEAP32[$str$byval_copy7>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy7+4>>2]=HEAP32[$str+4>>2]|0;
+    _byte_subseq($3,$207,$str$byval_copy7,$208,$209);
+    ;HEAP32[$result$byval_copy8>>2]=HEAP32[$result>>2]|0;HEAP32[$result$byval_copy8+4>>2]=HEAP32[$result+4>>2]|0;
+    ;HEAP32[$$byval_copy9>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy9+4>>2]=HEAP32[$3+4>>2]|0;
+    _mrb_ary_push($206,$result$byval_copy8,$$byval_copy9);
+    $210 = $0;
+    $211 = $ai3;
+    _mrb_gc_arena_restore($210,$211);
+    $212 = $end;
+    $213 = $pat_len;
+    $214 = (($212) + ($213))|0;
+    $215 = $idx2;
+    $216 = (($215) + ($214))|0;
+    $idx2 = $216;
+    $217 = $lim_p;
+    $218 = ($217|0)!=(0);
+    if (!($218)) {
+     continue;
+    }
+    $219 = HEAP32[$lim>>2]|0;
+    $220 = $i;
+    $221 = (($220) + 1)|0;
+    $i = $221;
+    $222 = ($219|0)<=($221|0);
+    if ($222) {
+     break;
+    }
+   }
+   $223 = $idx2;
+   $beg = $223;
+  }
+ } while(0);
+ $225 = HEAP32[$str>>2]|0;
+ $226 = HEAP32[$225>>2]|0;
+ $227 = $226 >>> 11;
+ $228 = $227 & 8;
+ $229 = ($228|0)!=(0);
+ $230 = HEAP32[$str>>2]|0;
+ if ($229) {
+  $231 = HEAP32[$230>>2]|0;
+  $232 = $231 >>> 11;
+  $233 = $232 & 496;
+  $234 = $233 >> 4;
+  $237 = $234;
+ } else {
+  $235 = ((($230)) + 12|0);
+  $236 = HEAP32[$235>>2]|0;
+  $237 = $236;
+ }
+ $238 = ($237|0)>(0);
+ do {
+  if ($238) {
+   $239 = $lim_p;
+   $240 = ($239|0)!=(0);
+   if (!($240)) {
+    $241 = HEAP32[$str>>2]|0;
+    $242 = HEAP32[$241>>2]|0;
+    $243 = $242 >>> 11;
+    $244 = $243 & 8;
+    $245 = ($244|0)!=(0);
+    $246 = HEAP32[$str>>2]|0;
+    if ($245) {
+     $247 = HEAP32[$246>>2]|0;
+     $248 = $247 >>> 11;
+     $249 = $248 & 496;
+     $250 = $249 >> 4;
+     $254 = $250;
+    } else {
+     $251 = ((($246)) + 12|0);
+     $252 = HEAP32[$251>>2]|0;
+     $254 = $252;
+    }
+    $253 = $beg;
+    $255 = ($254|0)>($253|0);
+    $256 = HEAP32[$lim>>2]|0;
+    $257 = ($256|0)<(0);
+    $or$cond = $255 | $257;
+    if (!($or$cond)) {
+     break;
+    }
+   }
+   $258 = HEAP32[$str>>2]|0;
+   $259 = HEAP32[$258>>2]|0;
+   $260 = $259 >>> 11;
+   $261 = $260 & 8;
+   $262 = ($261|0)!=(0);
+   $263 = HEAP32[$str>>2]|0;
+   if ($262) {
+    $264 = HEAP32[$263>>2]|0;
+    $265 = $264 >>> 11;
+    $266 = $265 & 496;
+    $267 = $266 >> 4;
+    $271 = $267;
+   } else {
+    $268 = ((($263)) + 12|0);
+    $269 = HEAP32[$268>>2]|0;
+    $271 = $269;
+   }
+   $270 = $beg;
+   $272 = ($271|0)==($270|0);
+   $273 = $0;
+   if ($272) {
+    ;HEAP32[$str$byval_copy11>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy11+4>>2]=HEAP32[$str+4>>2]|0;
+    _mrb_str_new_empty($4,$273,$str$byval_copy11);
+    ;HEAP32[$tmp>>2]=HEAP32[$4>>2]|0;HEAP32[$tmp+4>>2]=HEAP32[$4+4>>2]|0;
+   } else {
+    $274 = $beg;
+    $275 = HEAP32[$str>>2]|0;
+    $276 = HEAP32[$275>>2]|0;
+    $277 = $276 >>> 11;
+    $278 = $277 & 8;
+    $279 = ($278|0)!=(0);
+    $280 = HEAP32[$str>>2]|0;
+    if ($279) {
+     $281 = HEAP32[$280>>2]|0;
+     $282 = $281 >>> 11;
+     $283 = $282 & 496;
+     $284 = $283 >> 4;
+     $289 = $284;
+    } else {
+     $285 = ((($280)) + 12|0);
+     $286 = HEAP32[$285>>2]|0;
+     $289 = $286;
+    }
+    $287 = $beg;
+    $288 = (($289) - ($287))|0;
+    ;HEAP32[$str$byval_copy12>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy12+4>>2]=HEAP32[$str+4>>2]|0;
+    _byte_subseq($5,$273,$str$byval_copy12,$274,$288);
+    ;HEAP32[$tmp>>2]=HEAP32[$5>>2]|0;HEAP32[$tmp+4>>2]=HEAP32[$5+4>>2]|0;
+   }
+   $290 = $0;
+   ;HEAP32[$result$byval_copy13>>2]=HEAP32[$result>>2]|0;HEAP32[$result$byval_copy13+4>>2]=HEAP32[$result+4>>2]|0;
+   ;HEAP32[$tmp$byval_copy>>2]=HEAP32[$tmp>>2]|0;HEAP32[$tmp$byval_copy+4>>2]=HEAP32[$tmp+4>>2]|0;
+   _mrb_ary_push($290,$result$byval_copy13,$tmp$byval_copy);
+  }
+ } while(0);
+ $291 = $lim_p;
+ $292 = ($291|0)==(0);
+ $293 = HEAP32[$lim>>2]|0;
+ $294 = ($293|0)==(0);
+ $or$cond3 = $292 & $294;
+ L119: do {
+  if ($or$cond3) {
+   while(1) {
+    $295 = HEAP32[$result>>2]|0;
+    $296 = ((($295)) + 12|0);
+    $297 = HEAP32[$296>>2]|0;
+    $len = $297;
+    $298 = ($297|0)>(0);
+    if (!($298)) {
+     break L119;
+    }
+    $299 = $len;
+    $300 = (($299) - 1)|0;
+    $301 = HEAP32[$result>>2]|0;
+    $302 = ((($301)) + 20|0);
+    $303 = HEAP32[$302>>2]|0;
+    $304 = (($303) + ($300<<3)|0);
+    ;HEAP32[$tmp>>2]=HEAP32[$304>>2]|0;HEAP32[$tmp+4>>2]=HEAP32[$304+4>>2]|0;
+    $305 = HEAP32[$tmp>>2]|0;
+    $306 = HEAP32[$305>>2]|0;
+    $307 = $306 >>> 11;
+    $308 = $307 & 8;
+    $309 = ($308|0)!=(0);
+    $310 = HEAP32[$tmp>>2]|0;
+    if ($309) {
+     $311 = HEAP32[$310>>2]|0;
+     $312 = $311 >>> 11;
+     $313 = $312 & 496;
+     $314 = $313 >> 4;
+     $317 = $314;
+    } else {
+     $315 = ((($310)) + 12|0);
+     $316 = HEAP32[$315>>2]|0;
+     $317 = $316;
+    }
+    $318 = ($317|0)==(0);
+    if (!($318)) {
+     break L119;
+    }
+    $319 = $0;
+    ;HEAP32[$result$byval_copy14>>2]=HEAP32[$result>>2]|0;HEAP32[$result$byval_copy14+4>>2]=HEAP32[$result+4>>2]|0;
+    _mrb_ary_pop($6,$319,$result$byval_copy14);
+   }
+  }
+ } while(0);
+ ;HEAP32[$agg$result>>2]=HEAP32[$result>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$result+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_str_new_empty($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $s = 0, $str$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ $2 = (_str_new($1,0,0)|0);
+ $s = $2;
+ $3 = $0;
+ $4 = $s;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _str_with_class($3,$4,$str$byval_copy);
+ $5 = $s;
+ _mrb_obj_value_259($agg$result,$5);
+ STACKTOP = sp;return;
+}
+function _mrb_str_to_f($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $self$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ $2 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ $3 = (+_mrb_str_to_dbl($2,$self$byval_copy,0));
+ $4 = $3;
+ _mrb_float_value_337($agg$result,$1,$4);
+ STACKTOP = sp;return;
+}
+function _mrb_float_value_337($agg$result,$mrb,$f) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $f = +$f;
+ var $0 = 0, $1 = 0.0, $2 = 0, $3 = 0.0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $mrb;
+ $1 = $f;
+ $2 = ((($v)) + 4|0);
+ HEAP32[$2>>2] = 6;
+ $3 = $1;
+ HEAPF32[$v>>2] = $3;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_str_to_i($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $base = 0, $self$byval_copy = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 32|0;
+ $vararg_buffer1 = sp + 8|0;
+ $vararg_buffer = sp;
+ $base = sp + 24|0;
+ $1 = sp + 16|0;
+ $0 = $mrb;
+ HEAP32[$base>>2] = 10;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $base;
+ (_mrb_get_args($2,64388,$vararg_buffer)|0);
+ $3 = HEAP32[$base>>2]|0;
+ $4 = ($3|0)<(0);
+ $5 = $0;
+ if ($4) {
+  $6 = $0;
+  $7 = (_mrb_class_get($6,68855)|0);
+  $8 = HEAP32[$base>>2]|0;
+  _mrb_fixnum_value_289($1,$8);
+  ;HEAP8[$vararg_buffer1>>0]=HEAP8[$1>>0]|0;HEAP8[$vararg_buffer1+1>>0]=HEAP8[$1+1>>0]|0;HEAP8[$vararg_buffer1+2>>0]=HEAP8[$1+2>>0]|0;HEAP8[$vararg_buffer1+3>>0]=HEAP8[$1+3>>0]|0;HEAP8[$vararg_buffer1+4>>0]=HEAP8[$1+4>>0]|0;HEAP8[$vararg_buffer1+5>>0]=HEAP8[$1+5>>0]|0;HEAP8[$vararg_buffer1+6>>0]=HEAP8[$1+6>>0]|0;HEAP8[$vararg_buffer1+7>>0]=HEAP8[$1+7>>0]|0;
+  _mrb_raisef($5,$7,55769,$vararg_buffer1);
+  // unreachable;
+ } else {
+  $9 = HEAP32[$base>>2]|0;
+  ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+  _mrb_str_to_inum($agg$result,$5,$self$byval_copy,$9,0);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_str_to_s($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $self$byval_copy = 0, $self$byval_copy1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy1 = sp + 16|0;
+ $self$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ $2 = (_mrb_obj_class($1,$self$byval_copy)|0);
+ $3 = $0;
+ $4 = ((($3)) + 48|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ($2|0)!=($5|0);
+ if ($6) {
+  $7 = $0;
+  ;HEAP32[$self$byval_copy1>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy1+4>>2]=HEAP32[$self+4>>2]|0;
+  _mrb_str_dup($agg$result,$7,$self$byval_copy1);
+  STACKTOP = sp;return;
+ } else {
+  ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_str_upcase($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $self$byval_copy = 0, $str = 0, $str$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 40|0;
+ $self$byval_copy = sp + 32|0;
+ $str = sp + 16|0;
+ $1 = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $3 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _mrb_str_dup($1,$3,$self$byval_copy);
+ ;HEAP32[$str>>2]=HEAP32[$1>>2]|0;HEAP32[$str+4>>2]=HEAP32[$1+4>>2]|0;
+ $4 = $0;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_upcase_bang($2,$4,$str$byval_copy);
+ ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_str_upcase_bang($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $modify = 0, $p = 0, $pend = 0, $s = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$str>>2]|0;
+ $s = $1;
+ $modify = 0;
+ $2 = $0;
+ $3 = $s;
+ _mrb_str_modify($2,$3);
+ $4 = HEAP32[$str>>2]|0;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5 >>> 11;
+ $7 = $6 & 8;
+ $8 = ($7|0)!=(0);
+ $9 = HEAP32[$str>>2]|0;
+ $10 = ((($9)) + 12|0);
+ if ($8) {
+  $13 = $10;
+ } else {
+  $11 = ((($10)) + 8|0);
+  $12 = HEAP32[$11>>2]|0;
+  $13 = $12;
+ }
+ $p = $13;
+ $14 = HEAP32[$str>>2]|0;
+ $15 = HEAP32[$14>>2]|0;
+ $16 = $15 >>> 11;
+ $17 = $16 & 8;
+ $18 = ($17|0)!=(0);
+ $19 = HEAP32[$str>>2]|0;
+ $20 = ((($19)) + 12|0);
+ if ($18) {
+  $36 = $20;
+ } else {
+  $21 = ((($20)) + 8|0);
+  $22 = HEAP32[$21>>2]|0;
+  $36 = $22;
+ }
+ $23 = HEAP32[$str>>2]|0;
+ $24 = HEAP32[$23>>2]|0;
+ $25 = $24 >>> 11;
+ $26 = $25 & 8;
+ $27 = ($26|0)!=(0);
+ $28 = HEAP32[$str>>2]|0;
+ if ($27) {
+  $29 = HEAP32[$28>>2]|0;
+  $30 = $29 >>> 11;
+  $31 = $30 & 496;
+  $32 = $31 >> 4;
+  $37 = $32;
+ } else {
+  $33 = ((($28)) + 12|0);
+  $34 = HEAP32[$33>>2]|0;
+  $37 = $34;
+ }
+ $35 = (($36) + ($37)|0);
+ $pend = $35;
+ while(1) {
+  $38 = $p;
+  $39 = $pend;
+  $40 = ($38>>>0)<($39>>>0);
+  if (!($40)) {
+   break;
+  }
+  $41 = $p;
+  $42 = HEAP8[$41>>0]|0;
+  $43 = $42 << 24 >> 24;
+  $44 = (($43) - 97)|0;
+  $45 = ($44>>>0)<(26);
+  if ($45) {
+   $46 = $p;
+   $47 = HEAP8[$46>>0]|0;
+   $48 = $47 << 24 >> 24;
+   $49 = (($48) - 97)|0;
+   $50 = ($49>>>0)<(26);
+   $51 = $p;
+   $52 = HEAP8[$51>>0]|0;
+   $53 = $52 << 24 >> 24;
+   $54 = $53 & 95;
+   $55 = $50 ? $54 : $53;
+   $56 = $55&255;
+   $57 = $p;
+   HEAP8[$57>>0] = $56;
+   $modify = 1;
+  }
+  $58 = $p;
+  $59 = ((($58)) + 1|0);
+  $p = $59;
+ }
+ $60 = $modify;
+ $61 = ($60<<24>>24)!=(0);
+ if ($61) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+  STACKTOP = sp;return;
+ } else {
+  _mrb_nil_value_282($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_str_bytes($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, $a$byval_copy = 0, $p = 0, $pend = 0, $s = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 40|0;
+ $a$byval_copy = sp + 32|0;
+ $a = sp + 16|0;
+ $1 = sp;
+ $0 = $mrb;
+ $2 = HEAP32[$str>>2]|0;
+ $s = $2;
+ $3 = $0;
+ $4 = $s;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5 >>> 11;
+ $7 = $6 & 8;
+ $8 = ($7|0)!=(0);
+ $9 = $s;
+ if ($8) {
+  $10 = HEAP32[$9>>2]|0;
+  $11 = $10 >>> 11;
+  $12 = $11 & 496;
+  $13 = $12 >> 4;
+  $16 = $13;
+ } else {
+  $14 = ((($9)) + 12|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = $15;
+ }
+ _mrb_ary_new_capa($a,$3,$16);
+ $17 = $s;
+ $18 = HEAP32[$17>>2]|0;
+ $19 = $18 >>> 11;
+ $20 = $19 & 8;
+ $21 = ($20|0)!=(0);
+ $22 = $s;
+ $23 = ((($22)) + 12|0);
+ if ($21) {
+  $26 = $23;
+ } else {
+  $24 = ((($23)) + 8|0);
+  $25 = HEAP32[$24>>2]|0;
+  $26 = $25;
+ }
+ $p = $26;
+ $27 = $p;
+ $28 = $s;
+ $29 = HEAP32[$28>>2]|0;
+ $30 = $29 >>> 11;
+ $31 = $30 & 8;
+ $32 = ($31|0)!=(0);
+ $33 = $s;
+ if ($32) {
+  $34 = HEAP32[$33>>2]|0;
+  $35 = $34 >>> 11;
+  $36 = $35 & 496;
+  $37 = $36 >> 4;
+  $41 = $37;
+ } else {
+  $38 = ((($33)) + 12|0);
+  $39 = HEAP32[$38>>2]|0;
+  $41 = $39;
+ }
+ $40 = (($27) + ($41)|0);
+ $pend = $40;
+ while(1) {
+  $42 = $p;
+  $43 = $pend;
+  $44 = ($42>>>0)<($43>>>0);
+  if (!($44)) {
+   break;
+  }
+  $45 = $0;
+  $46 = $p;
+  $47 = HEAP8[$46>>0]|0;
+  $48 = $47&255;
+  _mrb_fixnum_value_289($1,$48);
+  ;HEAP32[$a$byval_copy>>2]=HEAP32[$a>>2]|0;HEAP32[$a$byval_copy+4>>2]=HEAP32[$a+4>>2]|0;
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;
+  _mrb_ary_push($45,$a$byval_copy,$$byval_copy);
+  $49 = $p;
+  $50 = ((($49)) + 1|0);
+  $p = $50;
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$a>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$a+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_str_freeze($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $s = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$str>>2]|0;
+ $s = $1;
+ $2 = $s;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $4 | 4;
+ $6 = HEAP32[$2>>2]|0;
+ $7 = $5 & 2097151;
+ $8 = $7 << 11;
+ $9 = $6 & 2047;
+ $10 = $9 | $8;
+ HEAP32[$2>>2] = $10;
+ ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _kh_alloc_n2s($mrb,$h) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $len = 0, $p = 0, $sz = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $h;
+ $2 = $1;
+ $3 = HEAP32[$2>>2]|0;
+ $sz = $3;
+ $len = 4;
+ $4 = $0;
+ $5 = $sz;
+ $6 = $5;
+ $7 = (($6>>>0) / 4)&-1;
+ $8 = $len;
+ $9 = $sz;
+ $10 = Math_imul($8, $9)|0;
+ $11 = (($7) + ($10))|0;
+ $12 = (_mrb_malloc($4,$11)|0);
+ $p = $12;
+ $13 = $1;
+ $14 = ((($13)) + 8|0);
+ HEAP32[$14>>2] = 0;
+ $15 = $1;
+ $16 = ((($15)) + 4|0);
+ HEAP32[$16>>2] = 0;
+ $17 = $p;
+ $18 = $1;
+ $19 = ((($18)) + 16|0);
+ HEAP32[$19>>2] = $17;
+ $20 = $1;
+ $21 = ((($20)) + 20|0);
+ HEAP32[$21>>2] = 0;
+ $22 = $p;
+ $23 = $len;
+ $24 = $sz;
+ $25 = Math_imul($23, $24)|0;
+ $26 = (($22) + ($25)|0);
+ $27 = $1;
+ $28 = ((($27)) + 12|0);
+ HEAP32[$28>>2] = $26;
+ $29 = $1;
+ $30 = ((($29)) + 12|0);
+ $31 = HEAP32[$30>>2]|0;
+ $32 = $sz;
+ $33 = (($32>>>0) / 4)&-1;
+ _kh_fill_flags_342($31,-86,$33);
+ STACKTOP = sp;return;
+}
+function _kh_fill_flags_342($p,$c,$len) {
+ $p = $p|0;
+ $c = $c|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $c;
+ $2 = $len;
+ while(1) {
+  $3 = $2;
+  $4 = (($3) + -1)|0;
+  $2 = $4;
+  $5 = ($3>>>0)>(0);
+  if (!($5)) {
+   break;
+  }
+  $6 = $1;
+  $7 = $0;
+  $8 = ((($7)) + 1|0);
+  $0 = $8;
+  HEAP8[$7>>0] = $6;
+ }
+ STACKTOP = sp;return;
+}
+function _kh_init_n2s_size($mrb,$size) {
+ $mrb = $mrb|0;
+ $size = $size|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $h = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $size;
+ $2 = $0;
+ $3 = (_mrb_calloc($2,1,24)|0);
+ $h = $3;
+ $4 = $1;
+ $5 = ($4>>>0)<(8);
+ if ($5) {
+  $1 = 8;
+ }
+ $6 = $1;
+ $7 = (($6) + -1)|0;
+ $1 = $7;
+ $8 = $1;
+ $9 = $8 >>> 1;
+ $10 = $1;
+ $11 = $10 | $9;
+ $1 = $11;
+ $12 = $1;
+ $13 = $12 >>> 2;
+ $14 = $1;
+ $15 = $14 | $13;
+ $1 = $15;
+ $16 = $1;
+ $17 = $16 >>> 4;
+ $18 = $1;
+ $19 = $18 | $17;
+ $1 = $19;
+ $20 = $1;
+ $21 = $20 >>> 8;
+ $22 = $1;
+ $23 = $22 | $21;
+ $1 = $23;
+ $24 = $1;
+ $25 = $24 >>> 16;
+ $26 = $1;
+ $27 = $26 | $25;
+ $1 = $27;
+ $28 = $1;
+ $29 = (($28) + 1)|0;
+ $1 = $29;
+ $30 = $1;
+ $31 = $h;
+ HEAP32[$31>>2] = $30;
+ $32 = $0;
+ $33 = $h;
+ _kh_alloc_n2s($32,$33);
+ $34 = $h;
+ STACKTOP = sp;return ($34|0);
+}
+function _kh_init_n2s($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = (_kh_init_n2s_size($1,8)|0);
+ STACKTOP = sp;return ($2|0);
+}
+function _kh_destroy_n2s($mrb,$h) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $h;
+ $2 = $1;
+ $3 = ($2|0)!=(0|0);
+ if (!($3)) {
+  STACKTOP = sp;return;
+ }
+ $4 = $0;
+ $5 = $1;
+ $6 = ((($5)) + 16|0);
+ $7 = HEAP32[$6>>2]|0;
+ _mrb_free($4,$7);
+ $8 = $0;
+ $9 = $1;
+ _mrb_free($8,$9);
+ STACKTOP = sp;return;
+}
+function _kh_get_n2s($mrb,$h,$key) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ $key = $key|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0;
+ var $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0;
+ var $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0;
+ var $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0;
+ var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0;
+ var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $k = 0, $step = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $h;
+ $3 = $key;
+ $4 = $1;
+ $5 = $3;
+ $6 = (_sym_hash_func($4,$5)|0);
+ $7 = $2;
+ $8 = HEAP32[$7>>2]|0;
+ $9 = (($8) - 1)|0;
+ $10 = $6 & $9;
+ $k = $10;
+ $step = 0;
+ while(1) {
+  $11 = $k;
+  $12 = (($11>>>0) / 4)&-1;
+  $13 = $2;
+  $14 = ((($13)) + 12|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = (($15) + ($12)|0);
+  $17 = HEAP8[$16>>0]|0;
+  $18 = $17&255;
+  $19 = $k;
+  $20 = (($19>>>0) % 4)&-1;
+  $21 = (56149 + ($20)|0);
+  $22 = HEAP8[$21>>0]|0;
+  $23 = $22&255;
+  $24 = $18 & $23;
+  $25 = ($24|0)!=(0);
+  $26 = $25 ^ 1;
+  if (!($26)) {
+   label = 8;
+   break;
+  }
+  $27 = $k;
+  $28 = (($27>>>0) / 4)&-1;
+  $29 = $2;
+  $30 = ((($29)) + 12|0);
+  $31 = HEAP32[$30>>2]|0;
+  $32 = (($31) + ($28)|0);
+  $33 = HEAP8[$32>>0]|0;
+  $34 = $33&255;
+  $35 = $k;
+  $36 = (($35>>>0) % 4)&-1;
+  $37 = (56153 + ($36)|0);
+  $38 = HEAP8[$37>>0]|0;
+  $39 = $38&255;
+  $40 = $34 & $39;
+  $41 = ($40|0)!=(0);
+  if (!($41)) {
+   $42 = $k;
+   $43 = $2;
+   $44 = ((($43)) + 16|0);
+   $45 = HEAP32[$44>>2]|0;
+   $46 = (($45) + ($42<<2)|0);
+   $47 = HEAP32[$46>>2]|0;
+   $48 = $1;
+   $49 = ((($48)) + 560|0);
+   $50 = HEAP32[$49>>2]|0;
+   $51 = (($50) + (($47*6)|0)|0);
+   $52 = HEAPU8[$51>>0]|(HEAPU8[$51+1>>0]<<8);
+   $53 = ($52&65535) >>> 1;
+   $54 = $53&65535;
+   $55 = $3;
+   $56 = $1;
+   $57 = ((($56)) + 560|0);
+   $58 = HEAP32[$57>>2]|0;
+   $59 = (($58) + (($55*6)|0)|0);
+   $60 = HEAPU8[$59>>0]|(HEAPU8[$59+1>>0]<<8);
+   $61 = ($60&65535) >>> 1;
+   $62 = $61&65535;
+   $63 = ($54|0)==($62|0);
+   if ($63) {
+    $64 = $k;
+    $65 = $2;
+    $66 = ((($65)) + 16|0);
+    $67 = HEAP32[$66>>2]|0;
+    $68 = (($67) + ($64<<2)|0);
+    $69 = HEAP32[$68>>2]|0;
+    $70 = $1;
+    $71 = ((($70)) + 560|0);
+    $72 = HEAP32[$71>>2]|0;
+    $73 = (($72) + (($69*6)|0)|0);
+    $74 = ((($73)) + 2|0);
+    $75 = HEAPU8[$74>>0]|(HEAPU8[$74+1>>0]<<8)|(HEAPU8[$74+2>>0]<<16)|(HEAPU8[$74+3>>0]<<24);
+    $76 = $3;
+    $77 = $1;
+    $78 = ((($77)) + 560|0);
+    $79 = HEAP32[$78>>2]|0;
+    $80 = (($79) + (($76*6)|0)|0);
+    $81 = ((($80)) + 2|0);
+    $82 = HEAPU8[$81>>0]|(HEAPU8[$81+1>>0]<<8)|(HEAPU8[$81+2>>0]<<16)|(HEAPU8[$81+3>>0]<<24);
+    $83 = $k;
+    $84 = $2;
+    $85 = ((($84)) + 16|0);
+    $86 = HEAP32[$85>>2]|0;
+    $87 = (($86) + ($83<<2)|0);
+    $88 = HEAP32[$87>>2]|0;
+    $89 = $1;
+    $90 = ((($89)) + 560|0);
+    $91 = HEAP32[$90>>2]|0;
+    $92 = (($91) + (($88*6)|0)|0);
+    $93 = HEAPU8[$92>>0]|(HEAPU8[$92+1>>0]<<8);
+    $94 = ($93&65535) >>> 1;
+    $95 = $94&65535;
+    $96 = (_memcmp($75,$82,$95)|0);
+    $97 = ($96|0)==(0);
+    if ($97) {
+     label = 6;
+     break;
+    }
+   }
+  }
+  $99 = $k;
+  $100 = $step;
+  $101 = (($100) + 1)|0;
+  $step = $101;
+  $102 = (($99) + ($101))|0;
+  $103 = $2;
+  $104 = HEAP32[$103>>2]|0;
+  $105 = (($104) - 1)|0;
+  $106 = $102 & $105;
+  $k = $106;
+ }
+ if ((label|0) == 6) {
+  $98 = $k;
+  $0 = $98;
+  $109 = $0;
+  STACKTOP = sp;return ($109|0);
+ }
+ else if ((label|0) == 8) {
+  $107 = $2;
+  $108 = HEAP32[$107>>2]|0;
+  $0 = $108;
+  $109 = $0;
+  STACKTOP = sp;return ($109|0);
+ }
+ return (0)|0;
+}
+function _sym_hash_func($mrb,$s) {
+ $mrb = $mrb|0;
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $h = 0, $i = 0, $len = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $s;
+ $h = 0;
+ $2 = $1;
+ $3 = $0;
+ $4 = ((($3)) + 560|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = (($5) + (($2*6)|0)|0);
+ $7 = HEAPU8[$6>>0]|(HEAPU8[$6+1>>0]<<8);
+ $8 = ($7&65535) >>> 1;
+ $9 = $8&65535;
+ $len = $9;
+ $10 = $1;
+ $11 = $0;
+ $12 = ((($11)) + 560|0);
+ $13 = HEAP32[$12>>2]|0;
+ $14 = (($13) + (($10*6)|0)|0);
+ $15 = ((($14)) + 2|0);
+ $16 = HEAPU8[$15>>0]|(HEAPU8[$15+1>>0]<<8)|(HEAPU8[$15+2>>0]<<16)|(HEAPU8[$15+3>>0]<<24);
+ $p = $16;
+ $i = 0;
+ while(1) {
+  $17 = $i;
+  $18 = $len;
+  $19 = ($17>>>0)<($18>>>0);
+  $20 = $h;
+  if (!($19)) {
+   break;
+  }
+  $21 = $20 << 5;
+  $22 = $h;
+  $23 = (($21) - ($22))|0;
+  $24 = $p;
+  $25 = ((($24)) + 1|0);
+  $p = $25;
+  $26 = HEAP8[$24>>0]|0;
+  $27 = $26 << 24 >> 24;
+  $28 = (($23) + ($27))|0;
+  $h = $28;
+  $29 = $i;
+  $30 = (($29) + 1)|0;
+  $i = $30;
+ }
+ STACKTOP = sp;return ($20|0);
+}
+function _kh_resize_n2s($mrb,$h,$new_n_buckets) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ $new_n_buckets = $new_n_buckets|0;
+ var $$new_n_buckets = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
+ var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $7 = 0, $8 = 0, $9 = 0, $hh = 0, $i = 0, $k = 0, $old_ed_flags = 0, $old_keys = 0, $old_n_buckets = 0, $old_vals = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $hh = sp + 24|0;
+ $0 = $mrb;
+ $1 = $h;
+ $2 = $new_n_buckets;
+ $3 = $2;
+ $4 = ($3>>>0)<(8);
+ $$new_n_buckets = $4 ? 8 : $new_n_buckets;
+ $2 = $$new_n_buckets;
+ $5 = $2;
+ $6 = (($5) + -1)|0;
+ $2 = $6;
+ $7 = $2;
+ $8 = $7 >>> 1;
+ $9 = $2;
+ $10 = $9 | $8;
+ $2 = $10;
+ $11 = $2;
+ $12 = $11 >>> 2;
+ $13 = $2;
+ $14 = $13 | $12;
+ $2 = $14;
+ $15 = $2;
+ $16 = $15 >>> 4;
+ $17 = $2;
+ $18 = $17 | $16;
+ $2 = $18;
+ $19 = $2;
+ $20 = $19 >>> 8;
+ $21 = $2;
+ $22 = $21 | $20;
+ $2 = $22;
+ $23 = $2;
+ $24 = $23 >>> 16;
+ $25 = $2;
+ $26 = $25 | $24;
+ $2 = $26;
+ $27 = $2;
+ $28 = (($27) + 1)|0;
+ $2 = $28;
+ $29 = $1;
+ $30 = ((($29)) + 12|0);
+ $31 = HEAP32[$30>>2]|0;
+ $old_ed_flags = $31;
+ $32 = $1;
+ $33 = ((($32)) + 16|0);
+ $34 = HEAP32[$33>>2]|0;
+ $old_keys = $34;
+ $35 = $1;
+ $36 = ((($35)) + 20|0);
+ $37 = HEAP32[$36>>2]|0;
+ $old_vals = $37;
+ $38 = $1;
+ $39 = HEAP32[$38>>2]|0;
+ $old_n_buckets = $39;
+ $40 = $2;
+ HEAP32[$hh>>2] = $40;
+ $41 = $0;
+ _kh_alloc_n2s($41,$hh);
+ $i = 0;
+ while(1) {
+  $42 = $i;
+  $43 = $old_n_buckets;
+  $44 = ($42>>>0)<($43>>>0);
+  if (!($44)) {
+   break;
+  }
+  $45 = $i;
+  $46 = (($45>>>0) / 4)&-1;
+  $47 = $old_ed_flags;
+  $48 = (($47) + ($46)|0);
+  $49 = HEAP8[$48>>0]|0;
+  $50 = $49&255;
+  $51 = $i;
+  $52 = (($51>>>0) % 4)&-1;
+  $53 = (56157 + ($52)|0);
+  $54 = HEAP8[$53>>0]|0;
+  $55 = $54&255;
+  $56 = $50 & $55;
+  $57 = ($56|0)!=(0);
+  if (!($57)) {
+   $58 = $0;
+   $59 = $i;
+   $60 = $old_keys;
+   $61 = (($60) + ($59<<2)|0);
+   $62 = HEAP32[$61>>2]|0;
+   $63 = (_kh_put_n2s($58,$hh,$62,0)|0);
+   $k = $63;
+  }
+  $64 = $i;
+  $65 = (($64) + 1)|0;
+  $i = $65;
+ }
+ $66 = $1;
+ ;HEAP32[$66>>2]=HEAP32[$hh>>2]|0;HEAP32[$66+4>>2]=HEAP32[$hh+4>>2]|0;HEAP32[$66+8>>2]=HEAP32[$hh+8>>2]|0;HEAP32[$66+12>>2]=HEAP32[$hh+12>>2]|0;HEAP32[$66+16>>2]=HEAP32[$hh+16>>2]|0;HEAP32[$66+20>>2]=HEAP32[$hh+20>>2]|0;
+ $67 = $0;
+ $68 = $old_keys;
+ _mrb_free($67,$68);
+ STACKTOP = sp;return;
+}
+function _kh_put_n2s($mrb,$h,$key,$ret) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ $key = $key|0;
+ $ret = $ret|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
+ var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
+ var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
+ var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0;
+ var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0;
+ var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0;
+ var $98 = 0, $99 = 0, $del_k = 0, $k = 0, $step = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $h;
+ $3 = $key;
+ $4 = $ret;
+ $step = 0;
+ $5 = $2;
+ $6 = ((($5)) + 8|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $2;
+ $9 = HEAP32[$8>>2]|0;
+ $10 = $9 >>> 2;
+ $11 = $2;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $12 >>> 1;
+ $14 = $10 | $13;
+ $15 = ($7>>>0)>=($14>>>0);
+ if ($15) {
+  $16 = $1;
+  $17 = $2;
+  $18 = $2;
+  $19 = HEAP32[$18>>2]|0;
+  $20 = $19<<1;
+  _kh_resize_n2s($16,$17,$20);
+ }
+ $21 = $1;
+ $22 = $3;
+ $23 = (_sym_hash_func($21,$22)|0);
+ $24 = $2;
+ $25 = HEAP32[$24>>2]|0;
+ $26 = (($25) - 1)|0;
+ $27 = $23 & $26;
+ $k = $27;
+ $28 = $2;
+ $29 = HEAP32[$28>>2]|0;
+ $del_k = $29;
+ while(1) {
+  $30 = $k;
+  $31 = (($30>>>0) / 4)&-1;
+  $32 = $2;
+  $33 = ((($32)) + 12|0);
+  $34 = HEAP32[$33>>2]|0;
+  $35 = (($34) + ($31)|0);
+  $36 = HEAP8[$35>>0]|0;
+  $37 = $36&255;
+  $38 = $k;
+  $39 = (($38>>>0) % 4)&-1;
+  $40 = (56149 + ($39)|0);
+  $41 = HEAP8[$40>>0]|0;
+  $42 = $41&255;
+  $43 = $37 & $42;
+  $44 = ($43|0)!=(0);
+  $45 = $44 ^ 1;
+  if (!($45)) {
+   break;
+  }
+  $46 = $k;
+  $47 = (($46>>>0) / 4)&-1;
+  $48 = $2;
+  $49 = ((($48)) + 12|0);
+  $50 = HEAP32[$49>>2]|0;
+  $51 = (($50) + ($47)|0);
+  $52 = HEAP8[$51>>0]|0;
+  $53 = $52&255;
+  $54 = $k;
+  $55 = (($54>>>0) % 4)&-1;
+  $56 = (56153 + ($55)|0);
+  $57 = HEAP8[$56>>0]|0;
+  $58 = $57&255;
+  $59 = $53 & $58;
+  $60 = ($59|0)!=(0);
+  if ($60) {
+   $121 = $del_k;
+   $122 = $2;
+   $123 = HEAP32[$122>>2]|0;
+   $124 = ($121|0)==($123|0);
+   if ($124) {
+    $125 = $k;
+    $del_k = $125;
+   }
+  } else {
+   $61 = $k;
+   $62 = $2;
+   $63 = ((($62)) + 16|0);
+   $64 = HEAP32[$63>>2]|0;
+   $65 = (($64) + ($61<<2)|0);
+   $66 = HEAP32[$65>>2]|0;
+   $67 = $1;
+   $68 = ((($67)) + 560|0);
+   $69 = HEAP32[$68>>2]|0;
+   $70 = (($69) + (($66*6)|0)|0);
+   $71 = HEAPU8[$70>>0]|(HEAPU8[$70+1>>0]<<8);
+   $72 = ($71&65535) >>> 1;
+   $73 = $72&65535;
+   $74 = $3;
+   $75 = $1;
+   $76 = ((($75)) + 560|0);
+   $77 = HEAP32[$76>>2]|0;
+   $78 = (($77) + (($74*6)|0)|0);
+   $79 = HEAPU8[$78>>0]|(HEAPU8[$78+1>>0]<<8);
+   $80 = ($79&65535) >>> 1;
+   $81 = $80&65535;
+   $82 = ($73|0)==($81|0);
+   if ($82) {
+    $83 = $k;
+    $84 = $2;
+    $85 = ((($84)) + 16|0);
+    $86 = HEAP32[$85>>2]|0;
+    $87 = (($86) + ($83<<2)|0);
+    $88 = HEAP32[$87>>2]|0;
+    $89 = $1;
+    $90 = ((($89)) + 560|0);
+    $91 = HEAP32[$90>>2]|0;
+    $92 = (($91) + (($88*6)|0)|0);
+    $93 = ((($92)) + 2|0);
+    $94 = HEAPU8[$93>>0]|(HEAPU8[$93+1>>0]<<8)|(HEAPU8[$93+2>>0]<<16)|(HEAPU8[$93+3>>0]<<24);
+    $95 = $3;
+    $96 = $1;
+    $97 = ((($96)) + 560|0);
+    $98 = HEAP32[$97>>2]|0;
+    $99 = (($98) + (($95*6)|0)|0);
+    $100 = ((($99)) + 2|0);
+    $101 = HEAPU8[$100>>0]|(HEAPU8[$100+1>>0]<<8)|(HEAPU8[$100+2>>0]<<16)|(HEAPU8[$100+3>>0]<<24);
+    $102 = $k;
+    $103 = $2;
+    $104 = ((($103)) + 16|0);
+    $105 = HEAP32[$104>>2]|0;
+    $106 = (($105) + ($102<<2)|0);
+    $107 = HEAP32[$106>>2]|0;
+    $108 = $1;
+    $109 = ((($108)) + 560|0);
+    $110 = HEAP32[$109>>2]|0;
+    $111 = (($110) + (($107*6)|0)|0);
+    $112 = HEAPU8[$111>>0]|(HEAPU8[$111+1>>0]<<8);
+    $113 = ($112&65535) >>> 1;
+    $114 = $113&65535;
+    $115 = (_memcmp($94,$101,$114)|0);
+    $116 = ($115|0)==(0);
+    if ($116) {
+     label = 8;
+     break;
+    }
+   }
+  }
+  $126 = $k;
+  $127 = $step;
+  $128 = (($127) + 1)|0;
+  $step = $128;
+  $129 = (($126) + ($128))|0;
+  $130 = $2;
+  $131 = HEAP32[$130>>2]|0;
+  $132 = (($131) - 1)|0;
+  $133 = $129 & $132;
+  $k = $133;
+ }
+ if ((label|0) == 8) {
+  $117 = $4;
+  $118 = ($117|0)!=(0|0);
+  if ($118) {
+   $119 = $4;
+   HEAP32[$119>>2] = 0;
+  }
+  $120 = $k;
+  $0 = $120;
+  $201 = $0;
+  STACKTOP = sp;return ($201|0);
+ }
+ $134 = $del_k;
+ $135 = $2;
+ $136 = HEAP32[$135>>2]|0;
+ $137 = ($134|0)!=($136|0);
+ $138 = $3;
+ if ($137) {
+  $139 = $del_k;
+  $140 = $2;
+  $141 = ((($140)) + 16|0);
+  $142 = HEAP32[$141>>2]|0;
+  $143 = (($142) + ($139<<2)|0);
+  HEAP32[$143>>2] = $138;
+  $144 = $del_k;
+  $145 = (($144>>>0) % 4)&-1;
+  $146 = (56153 + ($145)|0);
+  $147 = HEAP8[$146>>0]|0;
+  $148 = $147&255;
+  $149 = $148 ^ -1;
+  $150 = $del_k;
+  $151 = (($150>>>0) / 4)&-1;
+  $152 = $2;
+  $153 = ((($152)) + 12|0);
+  $154 = HEAP32[$153>>2]|0;
+  $155 = (($154) + ($151)|0);
+  $156 = HEAP8[$155>>0]|0;
+  $157 = $156&255;
+  $158 = $157 & $149;
+  $159 = $158&255;
+  HEAP8[$155>>0] = $159;
+  $160 = $2;
+  $161 = ((($160)) + 4|0);
+  $162 = HEAP32[$161>>2]|0;
+  $163 = (($162) + 1)|0;
+  HEAP32[$161>>2] = $163;
+  $164 = $4;
+  $165 = ($164|0)!=(0|0);
+  if ($165) {
+   $166 = $4;
+   HEAP32[$166>>2] = 2;
+  }
+  $167 = $del_k;
+  $0 = $167;
+  $201 = $0;
+  STACKTOP = sp;return ($201|0);
+ } else {
+  $168 = $k;
+  $169 = $2;
+  $170 = ((($169)) + 16|0);
+  $171 = HEAP32[$170>>2]|0;
+  $172 = (($171) + ($168<<2)|0);
+  HEAP32[$172>>2] = $138;
+  $173 = $k;
+  $174 = (($173>>>0) % 4)&-1;
+  $175 = (56149 + ($174)|0);
+  $176 = HEAP8[$175>>0]|0;
+  $177 = $176&255;
+  $178 = $177 ^ -1;
+  $179 = $k;
+  $180 = (($179>>>0) / 4)&-1;
+  $181 = $2;
+  $182 = ((($181)) + 12|0);
+  $183 = HEAP32[$182>>2]|0;
+  $184 = (($183) + ($180)|0);
+  $185 = HEAP8[$184>>0]|0;
+  $186 = $185&255;
+  $187 = $186 & $178;
+  $188 = $187&255;
+  HEAP8[$184>>0] = $188;
+  $189 = $2;
+  $190 = ((($189)) + 4|0);
+  $191 = HEAP32[$190>>2]|0;
+  $192 = (($191) + 1)|0;
+  HEAP32[$190>>2] = $192;
+  $193 = $2;
+  $194 = ((($193)) + 8|0);
+  $195 = HEAP32[$194>>2]|0;
+  $196 = (($195) + 1)|0;
+  HEAP32[$194>>2] = $196;
+  $197 = $4;
+  $198 = ($197|0)!=(0|0);
+  if ($198) {
+   $199 = $4;
+   HEAP32[$199>>2] = 1;
+  }
+  $200 = $k;
+  $0 = $200;
+  $201 = $0;
+  STACKTOP = sp;return ($201|0);
+ }
+ return (0)|0;
+}
+function _mrb_intern($mrb,$name,$len) {
+ $mrb = $mrb|0;
+ $name = $name|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $name;
+ $2 = $len;
+ $3 = $0;
+ $4 = $1;
+ $5 = $2;
+ $6 = (_sym_intern($3,$4,$5,0)|0);
+ STACKTOP = sp;return ($6|0);
+}
+function _sym_intern($mrb,$name,$len,$lit) {
+ $mrb = $mrb|0;
+ $name = $name|0;
+ $len = $len|0;
+ $lit = $lit|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
+ var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0;
+ var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0;
+ var $60 = 0, $61 = 0, $62 = 0.0, $63 = 0.0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0;
+ var $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0;
+ var $97 = 0, $98 = 0, $99 = 0, $h = 0, $k = 0, $p = 0, $sname = 0, $sym = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $name;
+ $3 = $len;
+ $4 = $lit;
+ $5 = $1;
+ $6 = ((($5)) + 556|0);
+ $7 = HEAP32[$6>>2]|0;
+ $h = $7;
+ $8 = $1;
+ $9 = ((($8)) + 560|0);
+ $10 = HEAP32[$9>>2]|0;
+ $sname = $10;
+ $11 = $1;
+ $12 = $3;
+ _sym_validate_len($11,$12);
+ $13 = $sname;
+ $14 = ($13|0)!=(0|0);
+ if ($14) {
+  $15 = $4;
+  $16 = $15&255;
+  $17 = $sname;
+  $18 = HEAPU8[$17>>0]|(HEAPU8[$17+1>>0]<<8);
+  $19 = $16 & 1;
+  $20 = $18 & -2;
+  $21 = $20 | $19;
+  HEAP8[$17>>0]=$21&255;HEAP8[$17+1>>0]=$21>>8;
+  $22 = $3;
+  $23 = $22&65535;
+  $24 = $sname;
+  $25 = HEAPU8[$24>>0]|(HEAPU8[$24+1>>0]<<8);
+  $26 = $23 & 32767;
+  $27 = ($26 << 1)&65535;
+  $28 = $25 & 1;
+  $29 = $28 | $27;
+  HEAP8[$24>>0]=$29&255;HEAP8[$24+1>>0]=$29>>8;
+  $30 = $2;
+  $31 = $sname;
+  $32 = ((($31)) + 2|0);
+  HEAP8[$32>>0]=$30&255;HEAP8[$32+1>>0]=($30>>8)&255;HEAP8[$32+2>>0]=($30>>16)&255;HEAP8[$32+3>>0]=$30>>24;
+  $33 = $1;
+  $34 = $h;
+  $35 = (_kh_get_n2s($33,$34,0)|0);
+  $k = $35;
+  $36 = $k;
+  $37 = $h;
+  $38 = HEAP32[$37>>2]|0;
+  $39 = ($36|0)!=($38|0);
+  if ($39) {
+   $40 = $k;
+   $41 = $h;
+   $42 = ((($41)) + 16|0);
+   $43 = HEAP32[$42>>2]|0;
+   $44 = (($43) + ($40<<2)|0);
+   $45 = HEAP32[$44>>2]|0;
+   $0 = $45;
+   $122 = $0;
+   STACKTOP = sp;return ($122|0);
+  }
+ }
+ $46 = $1;
+ $47 = ((($46)) + 552|0);
+ $48 = HEAP32[$47>>2]|0;
+ $49 = (($48) + 1)|0;
+ HEAP32[$47>>2] = $49;
+ $sym = $49;
+ $50 = $1;
+ $51 = ((($50)) + 564|0);
+ $52 = HEAP32[$51>>2]|0;
+ $53 = $sym;
+ $54 = ($52>>>0)<($53>>>0);
+ if ($54) {
+  $55 = $1;
+  $56 = ((($55)) + 564|0);
+  $57 = HEAP32[$56>>2]|0;
+  $58 = ($57|0)==(0);
+  $59 = $1;
+  $60 = ((($59)) + 564|0);
+  if ($58) {
+   HEAP32[$60>>2] = 100;
+  } else {
+   $61 = HEAP32[$60>>2]|0;
+   $62 = (+($61>>>0));
+   $63 = $62 * 1.2;
+   $64 = (~~(($63))>>>0);
+   $65 = $1;
+   $66 = ((($65)) + 564|0);
+   HEAP32[$66>>2] = $64;
+  }
+  $67 = $1;
+  $68 = $1;
+  $69 = ((($68)) + 560|0);
+  $70 = HEAP32[$69>>2]|0;
+  $71 = $1;
+  $72 = ((($71)) + 564|0);
+  $73 = HEAP32[$72>>2]|0;
+  $74 = (($73) + 1)|0;
+  $75 = ($74*6)|0;
+  $76 = (_mrb_realloc($67,$70,$75)|0);
+  $77 = $1;
+  $78 = ((($77)) + 560|0);
+  HEAP32[$78>>2] = $76;
+ }
+ $79 = $sym;
+ $80 = $1;
+ $81 = ((($80)) + 560|0);
+ $82 = HEAP32[$81>>2]|0;
+ $83 = (($82) + (($79*6)|0)|0);
+ $sname = $83;
+ $84 = $3;
+ $85 = $84&65535;
+ $86 = $sname;
+ $87 = HEAPU8[$86>>0]|(HEAPU8[$86+1>>0]<<8);
+ $88 = $85 & 32767;
+ $89 = ($88 << 1)&65535;
+ $90 = $87 & 1;
+ $91 = $90 | $89;
+ HEAP8[$86>>0]=$91&255;HEAP8[$86+1>>0]=$91>>8;
+ $92 = $4;
+ $93 = $92&255;
+ $94 = ($93|0)!=(0);
+ if ($94) {
+  $95 = $2;
+  $96 = $sname;
+  $97 = ((($96)) + 2|0);
+  HEAP8[$97>>0]=$95&255;HEAP8[$97+1>>0]=($95>>8)&255;HEAP8[$97+2>>0]=($95>>16)&255;HEAP8[$97+3>>0]=$95>>24;
+  $98 = $sname;
+  $99 = HEAPU8[$98>>0]|(HEAPU8[$98+1>>0]<<8);
+  $100 = $99 & -2;
+  $101 = $100 | 1;
+  HEAP8[$98>>0]=$101&255;HEAP8[$98+1>>0]=$101>>8;
+ } else {
+  $102 = $1;
+  $103 = $3;
+  $104 = (($103) + 1)|0;
+  $105 = (_mrb_malloc($102,$104)|0);
+  $p = $105;
+  $106 = $p;
+  $107 = $2;
+  $108 = $3;
+  _memcpy(($106|0),($107|0),($108|0))|0;
+  $109 = $3;
+  $110 = $p;
+  $111 = (($110) + ($109)|0);
+  HEAP8[$111>>0] = 0;
+  $112 = $p;
+  $113 = $sname;
+  $114 = ((($113)) + 2|0);
+  HEAP8[$114>>0]=$112&255;HEAP8[$114+1>>0]=($112>>8)&255;HEAP8[$114+2>>0]=($112>>16)&255;HEAP8[$114+3>>0]=$112>>24;
+  $115 = $sname;
+  $116 = HEAPU8[$115>>0]|(HEAPU8[$115+1>>0]<<8);
+  $117 = $116 & -2;
+  HEAP8[$115>>0]=$117&255;HEAP8[$115+1>>0]=$117>>8;
+ }
+ $118 = $1;
+ $119 = $h;
+ $120 = $sym;
+ (_kh_put_n2s($118,$119,$120,0)|0);
+ $121 = $sym;
+ $0 = $121;
+ $122 = $0;
+ STACKTOP = sp;return ($122|0);
+}
+function _sym_validate_len($mrb,$len) {
+ $mrb = $mrb|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $len;
+ $2 = $1;
+ $3 = ($2>>>0)>=(65535);
+ if ($3) {
+  $4 = $0;
+  $5 = $0;
+  $6 = (_mrb_class_get($5,68855)|0);
+  _mrb_raise($4,$6,56161);
+  // unreachable;
+ } else {
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_intern_static($mrb,$name,$len) {
+ $mrb = $mrb|0;
+ $name = $name|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $name;
+ $2 = $len;
+ $3 = $0;
+ $4 = $1;
+ $5 = $2;
+ $6 = (_sym_intern($3,$4,$5,1)|0);
+ STACKTOP = sp;return ($6|0);
+}
+function _mrb_intern_cstr($mrb,$name) {
+ $mrb = $mrb|0;
+ $name = $name|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $name;
+ $2 = $0;
+ $3 = $1;
+ $4 = $1;
+ $5 = (_strlen($4)|0);
+ $6 = (_mrb_intern($2,$3,$5)|0);
+ STACKTOP = sp;return ($6|0);
+}
+function _mrb_intern_str($mrb,$str) {
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0;
+ var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = HEAP32[$str>>2]|0;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $4 & 8;
+ $6 = ($5|0)!=(0);
+ $7 = HEAP32[$str>>2]|0;
+ $8 = ((($7)) + 12|0);
+ if ($6) {
+  $23 = $8;
+ } else {
+  $9 = ((($8)) + 8|0);
+  $10 = HEAP32[$9>>2]|0;
+  $23 = $10;
+ }
+ $11 = HEAP32[$str>>2]|0;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $12 >>> 11;
+ $14 = $13 & 8;
+ $15 = ($14|0)!=(0);
+ $16 = HEAP32[$str>>2]|0;
+ if ($15) {
+  $17 = HEAP32[$16>>2]|0;
+  $18 = $17 >>> 11;
+  $19 = $18 & 496;
+  $20 = $19 >> 4;
+  $24 = $20;
+  $25 = (_mrb_intern($1,$23,$24)|0);
+  STACKTOP = sp;return ($25|0);
+ } else {
+  $21 = ((($16)) + 12|0);
+  $22 = HEAP32[$21>>2]|0;
+  $24 = $22;
+  $25 = (_mrb_intern($1,$23,$24)|0);
+  STACKTOP = sp;return ($25|0);
+ }
+ return (0)|0;
+}
+function _mrb_check_intern($agg$result,$mrb,$name,$len) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $name = $name|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $h = 0, $k = 0, $sname = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $name;
+ $2 = $len;
+ $3 = $0;
+ $4 = ((($3)) + 556|0);
+ $5 = HEAP32[$4>>2]|0;
+ $h = $5;
+ $6 = $0;
+ $7 = ((($6)) + 560|0);
+ $8 = HEAP32[$7>>2]|0;
+ $sname = $8;
+ $9 = $0;
+ $10 = $2;
+ _sym_validate_len($9,$10);
+ $11 = $2;
+ $12 = $11&65535;
+ $13 = $sname;
+ $14 = HEAPU8[$13>>0]|(HEAPU8[$13+1>>0]<<8);
+ $15 = $12 & 32767;
+ $16 = ($15 << 1)&65535;
+ $17 = $14 & 1;
+ $18 = $17 | $16;
+ HEAP8[$13>>0]=$18&255;HEAP8[$13+1>>0]=$18>>8;
+ $19 = $1;
+ $20 = $sname;
+ $21 = ((($20)) + 2|0);
+ HEAP8[$21>>0]=$19&255;HEAP8[$21+1>>0]=($19>>8)&255;HEAP8[$21+2>>0]=($19>>16)&255;HEAP8[$21+3>>0]=$19>>24;
+ $22 = $0;
+ $23 = $h;
+ $24 = (_kh_get_n2s($22,$23,0)|0);
+ $k = $24;
+ $25 = $k;
+ $26 = $h;
+ $27 = HEAP32[$26>>2]|0;
+ $28 = ($25|0)!=($27|0);
+ if ($28) {
+  $29 = $k;
+  $30 = $h;
+  $31 = ((($30)) + 16|0);
+  $32 = HEAP32[$31>>2]|0;
+  $33 = (($32) + ($29<<2)|0);
+  $34 = HEAP32[$33>>2]|0;
+  _mrb_symbol_value_354($agg$result,$34);
+  STACKTOP = sp;return;
+ } else {
+  _mrb_nil_value_355($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_symbol_value_354($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 4;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_nil_value_355($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_check_intern_cstr($agg$result,$mrb,$name) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $name = $name|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $name;
+ $2 = $0;
+ $3 = $1;
+ $4 = $1;
+ $5 = (_strlen($4)|0);
+ _mrb_check_intern($agg$result,$2,$3,$5);
+ STACKTOP = sp;return;
+}
+function _mrb_check_intern_str($agg$result,$mrb,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = HEAP32[$str>>2]|0;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $4 & 8;
+ $6 = ($5|0)!=(0);
+ $7 = HEAP32[$str>>2]|0;
+ $8 = ((($7)) + 12|0);
+ if ($6) {
+  $23 = $8;
+ } else {
+  $9 = ((($8)) + 8|0);
+  $10 = HEAP32[$9>>2]|0;
+  $23 = $10;
+ }
+ $11 = HEAP32[$str>>2]|0;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $12 >>> 11;
+ $14 = $13 & 8;
+ $15 = ($14|0)!=(0);
+ $16 = HEAP32[$str>>2]|0;
+ if ($15) {
+  $17 = HEAP32[$16>>2]|0;
+  $18 = $17 >>> 11;
+  $19 = $18 & 496;
+  $20 = $19 >> 4;
+  $24 = $20;
+  _mrb_check_intern($agg$result,$1,$23,$24);
+  STACKTOP = sp;return;
+ } else {
+  $21 = ((($16)) + 12|0);
+  $22 = HEAP32[$21>>2]|0;
+  $24 = $22;
+  _mrb_check_intern($agg$result,$1,$23,$24);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_sym2name_len($mrb,$sym,$lenp) {
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ $lenp = $lenp|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $sym;
+ $3 = $lenp;
+ $4 = $2;
+ $5 = ($4|0)==(0);
+ if (!($5)) {
+  $6 = $1;
+  $7 = ((($6)) + 552|0);
+  $8 = HEAP32[$7>>2]|0;
+  $9 = $2;
+  $10 = ($8>>>0)<($9>>>0);
+  if (!($10)) {
+   $14 = $3;
+   $15 = ($14|0)!=(0|0);
+   if ($15) {
+    $16 = $2;
+    $17 = $1;
+    $18 = ((($17)) + 560|0);
+    $19 = HEAP32[$18>>2]|0;
+    $20 = (($19) + (($16*6)|0)|0);
+    $21 = HEAPU8[$20>>0]|(HEAPU8[$20+1>>0]<<8);
+    $22 = ($21&65535) >>> 1;
+    $23 = $22&65535;
+    $24 = $3;
+    HEAP32[$24>>2] = $23;
+   }
+   $25 = $2;
+   $26 = $1;
+   $27 = ((($26)) + 560|0);
+   $28 = HEAP32[$27>>2]|0;
+   $29 = (($28) + (($25*6)|0)|0);
+   $30 = ((($29)) + 2|0);
+   $31 = HEAPU8[$30>>0]|(HEAPU8[$30+1>>0]<<8)|(HEAPU8[$30+2>>0]<<16)|(HEAPU8[$30+3>>0]<<24);
+   $0 = $31;
+   $32 = $0;
+   STACKTOP = sp;return ($32|0);
+  }
+ }
+ $11 = $3;
+ $12 = ($11|0)!=(0|0);
+ if ($12) {
+  $13 = $3;
+  HEAP32[$13>>2] = 0;
+ }
+ $0 = 0;
+ $32 = $0;
+ STACKTOP = sp;return ($32|0);
+}
+function _mrb_free_symtbl($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $lim = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $i = 1;
+ $1 = $0;
+ $2 = ((($1)) + 552|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = (($3) + 1)|0;
+ $lim = $4;
+ while(1) {
+  $5 = $i;
+  $6 = $lim;
+  $7 = ($5>>>0)<($6>>>0);
+  if (!($7)) {
+   break;
+  }
+  $8 = $i;
+  $9 = $0;
+  $10 = ((($9)) + 560|0);
+  $11 = HEAP32[$10>>2]|0;
+  $12 = (($11) + (($8*6)|0)|0);
+  $13 = HEAPU8[$12>>0]|(HEAPU8[$12+1>>0]<<8);
+  $14 = $13 & 1;
+  $15 = ($14<<16>>16)!=(0);
+  if (!($15)) {
+   $16 = $0;
+   $17 = $i;
+   $18 = $0;
+   $19 = ((($18)) + 560|0);
+   $20 = HEAP32[$19>>2]|0;
+   $21 = (($20) + (($17*6)|0)|0);
+   $22 = ((($21)) + 2|0);
+   $23 = HEAPU8[$22>>0]|(HEAPU8[$22+1>>0]<<8)|(HEAPU8[$22+2>>0]<<16)|(HEAPU8[$22+3>>0]<<24);
+   _mrb_free($16,$23);
+  }
+  $24 = $i;
+  $25 = (($24) + 1)|0;
+  $i = $25;
+ }
+ $26 = $0;
+ $27 = $0;
+ $28 = ((($27)) + 560|0);
+ $29 = HEAP32[$28>>2]|0;
+ _mrb_free($26,$29);
+ $30 = $0;
+ $31 = $0;
+ $32 = ((($31)) + 556|0);
+ $33 = HEAP32[$32>>2]|0;
+ _kh_destroy_n2s($30,$33);
+ STACKTOP = sp;return;
+}
+function _mrb_init_symtbl($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = (_kh_init_n2s($1)|0);
+ $3 = $0;
+ $4 = ((($3)) + 556|0);
+ HEAP32[$4>>2] = $2;
+ STACKTOP = sp;return;
+}
+function _mrb_sym2str($agg$result,$mrb,$sym) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $len = 0, $name = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $len = sp + 4|0;
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_mrb_sym2name_len($2,$3,$len)|0);
+ $name = $4;
+ $5 = $name;
+ $6 = ($5|0)!=(0|0);
+ if ($6) {
+  $7 = $0;
+  $8 = $name;
+  $9 = HEAP32[$len>>2]|0;
+  _mrb_str_new_static($agg$result,$7,$8,$9);
+  STACKTOP = sp;return;
+ } else {
+  _mrb_undef_value($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_undef_value($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 5;
+ HEAP32[$v>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_sym2name($mrb,$sym) {
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $len = 0, $name = 0, $str = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 40|0;
+ $len = sp + 20|0;
+ $str = sp + 8|0;
+ $3 = sp;
+ $1 = $mrb;
+ $2 = $sym;
+ $4 = $1;
+ $5 = $2;
+ $6 = (_mrb_sym2name_len($4,$5,$len)|0);
+ $name = $6;
+ $7 = $name;
+ $8 = ($7|0)!=(0|0);
+ if (!($8)) {
+  $0 = 0;
+  $32 = $0;
+  STACKTOP = sp;return ($32|0);
+ }
+ $9 = $name;
+ $10 = (_symname_p($9)|0);
+ $11 = $10&255;
+ $12 = ($11|0)!=(0);
+ if ($12) {
+  $13 = $name;
+  $14 = (_strlen($13)|0);
+  $15 = HEAP32[$len>>2]|0;
+  $16 = ($14|0)==($15|0);
+  if ($16) {
+   $17 = $name;
+   $0 = $17;
+   $32 = $0;
+   STACKTOP = sp;return ($32|0);
+  }
+ }
+ $18 = $1;
+ $19 = $1;
+ $20 = $name;
+ $21 = HEAP32[$len>>2]|0;
+ _mrb_str_new_static($3,$19,$20,$21);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
+ _mrb_str_dump($str,$18,$$byval_copy);
+ $22 = HEAP32[$str>>2]|0;
+ $23 = HEAP32[$22>>2]|0;
+ $24 = $23 >>> 11;
+ $25 = $24 & 8;
+ $26 = ($25|0)!=(0);
+ $27 = HEAP32[$str>>2]|0;
+ $28 = ((($27)) + 12|0);
+ if ($26) {
+  $31 = $28;
+ } else {
+  $29 = ((($28)) + 8|0);
+  $30 = HEAP32[$29>>2]|0;
+  $31 = $30;
+ }
+ $0 = $31;
+ $32 = $0;
+ STACKTOP = sp;return ($32|0);
+}
+function _symname_p($name) {
+ $name = $name|0;
+ var $$off = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0;
+ var $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0;
+ var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0;
+ var $151 = 0, $152 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0;
+ var $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0;
+ var $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0;
+ var $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0;
+ var $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $localid = 0, $m = 0, $switch = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $name;
+ $2 = $1;
+ $m = $2;
+ $localid = 0;
+ $3 = $m;
+ $4 = ($3|0)!=(0|0);
+ if (!($4)) {
+  $0 = 0;
+  $152 = $0;
+  STACKTOP = sp;return ($152|0);
+ }
+ $5 = $m;
+ $6 = HEAP8[$5>>0]|0;
+ $7 = $6 << 24 >> 24;
+ L5: do {
+  switch ($7|0) {
+  case 0:  {
+   $0 = 0;
+   $152 = $0;
+   STACKTOP = sp;return ($152|0);
+   break;
+  }
+  case 36:  {
+   $8 = $m;
+   $9 = ((($8)) + 1|0);
+   $m = $9;
+   $10 = (_is_special_global_name($9)|0);
+   $11 = ($10<<24>>24)!=(0);
+   if ($11) {
+    $0 = 1;
+    $152 = $0;
+    STACKTOP = sp;return ($152|0);
+   } else {
+    label = 36;
+   }
+   break;
+  }
+  case 64:  {
+   $12 = $m;
+   $13 = ((($12)) + 1|0);
+   $m = $13;
+   $14 = HEAP8[$13>>0]|0;
+   $15 = $14 << 24 >> 24;
+   $16 = ($15|0)==(64);
+   if ($16) {
+    $17 = $m;
+    $18 = ((($17)) + 1|0);
+    $m = $18;
+    label = 36;
+   } else {
+    label = 36;
+   }
+   break;
+  }
+  case 60:  {
+   $19 = $m;
+   $20 = ((($19)) + 1|0);
+   $m = $20;
+   $21 = HEAP8[$20>>0]|0;
+   $22 = $21 << 24 >> 24;
+   switch ($22|0) {
+   case 60:  {
+    $23 = $m;
+    $24 = ((($23)) + 1|0);
+    $m = $24;
+    break L5;
+    break;
+   }
+   case 61:  {
+    break;
+   }
+   default: {
+    break L5;
+   }
+   }
+   $25 = $m;
+   $26 = ((($25)) + 1|0);
+   $m = $26;
+   $27 = HEAP8[$26>>0]|0;
+   $28 = $27 << 24 >> 24;
+   $29 = ($28|0)==(62);
+   if ($29) {
+    $30 = $m;
+    $31 = ((($30)) + 1|0);
+    $m = $31;
+   }
+   break;
+  }
+  case 62:  {
+   $32 = $m;
+   $33 = ((($32)) + 1|0);
+   $m = $33;
+   $34 = HEAP8[$33>>0]|0;
+   $35 = $34 << 24 >> 24;
+   $$off = (($35) + -61)|0;
+   $switch = ($$off>>>0)<(2);
+   if ($switch) {
+    $36 = $m;
+    $37 = ((($36)) + 1|0);
+    $m = $37;
+   }
+   break;
+  }
+  case 61:  {
+   $38 = $m;
+   $39 = ((($38)) + 1|0);
+   $m = $39;
+   $40 = HEAP8[$39>>0]|0;
+   $41 = $40 << 24 >> 24;
+   switch ($41|0) {
+   case 126:  {
+    $42 = $m;
+    $43 = ((($42)) + 1|0);
+    $m = $43;
+    break L5;
+    break;
+   }
+   case 61:  {
+    $44 = $m;
+    $45 = ((($44)) + 1|0);
+    $m = $45;
+    $46 = HEAP8[$45>>0]|0;
+    $47 = $46 << 24 >> 24;
+    $48 = ($47|0)==(61);
+    if (!($48)) {
+     break L5;
+    }
+    $49 = $m;
+    $50 = ((($49)) + 1|0);
+    $m = $50;
+    break L5;
+    break;
+   }
+   default: {
+    $0 = 0;
+    $152 = $0;
+    STACKTOP = sp;return ($152|0);
+   }
+   }
+   break;
+  }
+  case 42:  {
+   $51 = $m;
+   $52 = ((($51)) + 1|0);
+   $m = $52;
+   $53 = HEAP8[$52>>0]|0;
+   $54 = $53 << 24 >> 24;
+   $55 = ($54|0)==(42);
+   if ($55) {
+    $56 = $m;
+    $57 = ((($56)) + 1|0);
+    $m = $57;
+   }
+   break;
+  }
+  case 33:  {
+   $58 = $m;
+   $59 = ((($58)) + 1|0);
+   $m = $59;
+   $60 = HEAP8[$59>>0]|0;
+   $61 = $60 << 24 >> 24;
+   $62 = ($61|0)==(61);
+   if ($62) {
+    $63 = $m;
+    $64 = ((($63)) + 1|0);
+    $m = $64;
+   }
+   break;
+  }
+  case 45: case 43:  {
+   $65 = $m;
+   $66 = ((($65)) + 1|0);
+   $m = $66;
+   $67 = HEAP8[$66>>0]|0;
+   $68 = $67 << 24 >> 24;
+   $69 = ($68|0)==(64);
+   if ($69) {
+    $70 = $m;
+    $71 = ((($70)) + 1|0);
+    $m = $71;
+   }
+   break;
+  }
+  case 124:  {
+   $72 = $m;
+   $73 = ((($72)) + 1|0);
+   $m = $73;
+   $74 = HEAP8[$73>>0]|0;
+   $75 = $74 << 24 >> 24;
+   $76 = ($75|0)==(124);
+   if ($76) {
+    $77 = $m;
+    $78 = ((($77)) + 1|0);
+    $m = $78;
+   }
+   break;
+  }
+  case 38:  {
+   $79 = $m;
+   $80 = ((($79)) + 1|0);
+   $m = $80;
+   $81 = HEAP8[$80>>0]|0;
+   $82 = $81 << 24 >> 24;
+   $83 = ($82|0)==(38);
+   if ($83) {
+    $84 = $m;
+    $85 = ((($84)) + 1|0);
+    $m = $85;
+   }
+   break;
+  }
+  case 96: case 126: case 37: case 47: case 94:  {
+   $86 = $m;
+   $87 = ((($86)) + 1|0);
+   $m = $87;
+   break;
+  }
+  case 91:  {
+   $88 = $m;
+   $89 = ((($88)) + 1|0);
+   $m = $89;
+   $90 = HEAP8[$89>>0]|0;
+   $91 = $90 << 24 >> 24;
+   $92 = ($91|0)!=(93);
+   if ($92) {
+    $0 = 0;
+    $152 = $0;
+    STACKTOP = sp;return ($152|0);
+   } else {
+    $93 = $m;
+    $94 = ((($93)) + 1|0);
+    $m = $94;
+    $95 = HEAP8[$94>>0]|0;
+    $96 = $95 << 24 >> 24;
+    $97 = ($96|0)==(61);
+    if (!($97)) {
+     break L5;
+    }
+    $98 = $m;
+    $99 = ((($98)) + 1|0);
+    $m = $99;
+    break L5;
+   }
+   break;
+  }
+  default: {
+   $100 = $m;
+   $101 = HEAP8[$100>>0]|0;
+   $102 = $101 << 24 >> 24;
+   $103 = (($102) - 65)|0;
+   $104 = ($103>>>0)<(26);
+   $105 = $104 ^ 1;
+   $106 = $105&1;
+   $107 = $106&255;
+   $localid = $107;
+   label = 36;
+  }
+  }
+ } while(0);
+ L45: do {
+  if ((label|0) == 36) {
+   $108 = $m;
+   $109 = HEAP8[$108>>0]|0;
+   $110 = $109 << 24 >> 24;
+   $111 = ($110|0)!=(95);
+   if ($111) {
+    $112 = $m;
+    $113 = HEAP8[$112>>0]|0;
+    $114 = $113 << 24 >> 24;
+    $115 = $114 | 32;
+    $116 = (($115) - 97)|0;
+    $117 = ($116>>>0)<(26);
+    if (!($117)) {
+     $0 = 0;
+     $152 = $0;
+     STACKTOP = sp;return ($152|0);
+    }
+   }
+   while(1) {
+    $118 = $m;
+    $119 = HEAP8[$118>>0]|0;
+    $120 = $119 << 24 >> 24;
+    $121 = ($120|0)!=(-1);
+    if (!($121)) {
+     break;
+    }
+    $122 = $m;
+    $123 = HEAP8[$122>>0]|0;
+    $124 = $123 << 24 >> 24;
+    $125 = $124 | 32;
+    $126 = (($125) - 97)|0;
+    $127 = ($126>>>0)<(26);
+    if (!($127)) {
+     $128 = $m;
+     $129 = HEAP8[$128>>0]|0;
+     $130 = $129 << 24 >> 24;
+     $131 = (($130) - 48)|0;
+     $132 = ($131>>>0)<(10);
+     if (!($132)) {
+      $133 = $m;
+      $134 = HEAP8[$133>>0]|0;
+      $135 = $134 << 24 >> 24;
+      $136 = ($135|0)==(95);
+      if (!($136)) {
+       break;
+      }
+     }
+    }
+    $137 = $m;
+    $138 = ((($137)) + 1|0);
+    $m = $138;
+   }
+   $139 = $localid;
+   $140 = ($139<<24>>24)!=(0);
+   if ($140) {
+    $141 = $m;
+    $142 = HEAP8[$141>>0]|0;
+    $143 = $142 << 24 >> 24;
+    switch ($143|0) {
+    case 61: case 63: case 33:  {
+     break;
+    }
+    default: {
+     break L45;
+    }
+    }
+    $144 = $m;
+    $145 = ((($144)) + 1|0);
+    $m = $145;
+   }
+  }
+ } while(0);
+ $146 = $m;
+ $147 = HEAP8[$146>>0]|0;
+ $148 = $147 << 24 >> 24;
+ $149 = ($148|0)!=(0);
+ $150 = $149 ? 0 : 1;
+ $151 = $150&255;
+ $0 = $151;
+ $152 = $0;
+ STACKTOP = sp;return ($152|0);
+}
+function _is_special_global_name($m) {
+ $m = $m|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $m;
+ $2 = $1;
+ $3 = HEAP8[$2>>0]|0;
+ $4 = $3 << 24 >> 24;
+ L1: do {
+  switch ($4|0) {
+  case 48: case 43: case 39: case 96: case 38: case 34: case 62: case 60: case 58: case 61: case 46: case 44: case 59: case 92: case 47: case 64: case 33: case 63: case 36: case 42: case 126:  {
+   $5 = $1;
+   $6 = ((($5)) + 1|0);
+   $1 = $6;
+   break;
+  }
+  case 45:  {
+   $7 = $1;
+   $8 = ((($7)) + 1|0);
+   $1 = $8;
+   $9 = $1;
+   $10 = HEAP8[$9>>0]|0;
+   $11 = $10 << 24 >> 24;
+   $12 = ($11|0)!=(-1);
+   if ($12) {
+    $13 = $1;
+    $14 = HEAP8[$13>>0]|0;
+    $15 = $14 << 24 >> 24;
+    $16 = $15 | 32;
+    $17 = (($16) - 97)|0;
+    $18 = ($17>>>0)<(26);
+    if (!($18)) {
+     $19 = $1;
+     $20 = HEAP8[$19>>0]|0;
+     $21 = $20 << 24 >> 24;
+     $22 = (($21) - 48)|0;
+     $23 = ($22>>>0)<(10);
+     if (!($23)) {
+      $24 = $1;
+      $25 = HEAP8[$24>>0]|0;
+      $26 = $25 << 24 >> 24;
+      $27 = ($26|0)==(95);
+      if (!($27)) {
+       break L1;
+      }
+     }
+    }
+    $28 = $1;
+    $29 = ((($28)) + 1|0);
+    $1 = $29;
+   }
+   break;
+  }
+  default: {
+   $30 = $1;
+   $31 = HEAP8[$30>>0]|0;
+   $32 = $31 << 24 >> 24;
+   $33 = (($32) - 48)|0;
+   $34 = ($33>>>0)<(10);
+   if ($34) {
+    while(1) {
+     $35 = $1;
+     $36 = ((($35)) + 1|0);
+     $1 = $36;
+     $37 = $1;
+     $38 = HEAP8[$37>>0]|0;
+     $39 = $38 << 24 >> 24;
+     $40 = (($39) - 48)|0;
+     $41 = ($40>>>0)<(10);
+     if (!($41)) {
+      break L1;
+     }
+    }
+   }
+   $0 = 0;
+   $48 = $0;
+   STACKTOP = sp;return ($48|0);
+  }
+  }
+ } while(0);
+ $42 = $1;
+ $43 = HEAP8[$42>>0]|0;
+ $44 = ($43<<24>>24)!=(0);
+ $45 = $44 ^ 1;
+ $46 = $45&1;
+ $47 = $46&255;
+ $0 = $47;
+ $48 = $0;
+ STACKTOP = sp;return ($48|0);
+}
+function _mrb_init_symbol($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var $sym = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = $0;
+ $3 = ((($2)) + 32|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = (_mrb_define_class($1,56184,$4)|0);
+ $sym = $5;
+ $6 = $0;
+ $7 = ((($6)) + 80|0);
+ HEAP32[$7>>2] = $5;
+ $8 = $0;
+ $9 = $sym;
+ _mrb_define_method($8,$9,69450,119,262144);
+ $10 = $0;
+ $11 = $sym;
+ _mrb_define_method($10,$11,56191,120,0);
+ $12 = $0;
+ $13 = $sym;
+ _mrb_define_method($12,$13,68977,120,0);
+ $14 = $0;
+ $15 = $sym;
+ _mrb_define_method($14,$15,56199,121,0);
+ $16 = $0;
+ $17 = $sym;
+ _mrb_define_method($16,$17,68986,122,0);
+ $18 = $0;
+ $19 = $sym;
+ _mrb_define_method($18,$19,68851,123,262144);
+ STACKTOP = sp;return;
+}
+function _sym_equal($agg$result,$mrb,$sym1) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $sym1 = $sym1|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $sym1$byval_copy = 0, $sym2 = 0, $sym2$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $sym2$byval_copy = sp + 32|0;
+ $sym1$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $sym2 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $sym2;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$sym1$byval_copy>>2]=HEAP32[$sym1>>2]|0;HEAP32[$sym1$byval_copy+4>>2]=HEAP32[$sym1+4>>2]|0;
+ ;HEAP32[$sym2$byval_copy>>2]=HEAP32[$sym2>>2]|0;HEAP32[$sym2$byval_copy+4>>2]=HEAP32[$sym2+4>>2]|0;
+ $3 = (_mrb_obj_equal($2,$sym1$byval_copy,$sym2$byval_copy)|0);
+ _mrb_bool_value_363($agg$result,$3);
+ STACKTOP = sp;return;
+}
+function _mrb_bool_value_363($agg$result,$boolean) {
+ $agg$result = $agg$result|0;
+ $boolean = $boolean|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $boolean;
+ $1 = $0;
+ $2 = $1&255;
+ $3 = ($2|0)!=(0);
+ $4 = $3 ? 2 : 0;
+ $5 = ((($v)) + 4|0);
+ HEAP32[$5>>2] = $4;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_sym_to_s($agg$result,$mrb,$sym) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $id = 0, $len = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $len = sp;
+ $0 = $mrb;
+ $1 = HEAP32[$sym>>2]|0;
+ $id = $1;
+ $2 = $0;
+ $3 = $id;
+ $4 = (_mrb_sym2name_len($2,$3,$len)|0);
+ $p = $4;
+ $5 = $0;
+ $6 = $p;
+ $7 = HEAP32[$len>>2]|0;
+ _mrb_str_new_static($agg$result,$5,$6,$7);
+ STACKTOP = sp;return;
+}
+function _sym_to_sym($agg$result,$mrb,$sym) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ var $0 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ ;HEAP32[$agg$result>>2]=HEAP32[$sym>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$sym+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _sym_inspect($agg$result,$mrb,$sym) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $id = 0, $len = 0, $name = 0, $sp = 0, $str = 0;
+ var $str$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 48|0;
+ $str = sp + 32|0;
+ $len = sp + 24|0;
+ $1 = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $3 = HEAP32[$sym>>2]|0;
+ $id = $3;
+ $4 = $0;
+ $5 = $id;
+ $6 = (_mrb_sym2name_len($4,$5,$len)|0);
+ $name = $6;
+ $7 = $0;
+ $8 = HEAP32[$len>>2]|0;
+ $9 = (($8) + 1)|0;
+ _mrb_str_new($1,$7,0,$9);
+ ;HEAP32[$str>>2]=HEAP32[$1>>2]|0;HEAP32[$str+4>>2]=HEAP32[$1+4>>2]|0;
+ $10 = HEAP32[$str>>2]|0;
+ $11 = HEAP32[$10>>2]|0;
+ $12 = $11 >>> 11;
+ $13 = $12 & 8;
+ $14 = ($13|0)!=(0);
+ $15 = HEAP32[$str>>2]|0;
+ $16 = ((($15)) + 12|0);
+ if ($14) {
+  $19 = $16;
+ } else {
+  $17 = ((($16)) + 8|0);
+  $18 = HEAP32[$17>>2]|0;
+  $19 = $18;
+ }
+ $sp = $19;
+ $20 = HEAP32[$str>>2]|0;
+ $21 = HEAP32[$20>>2]|0;
+ $22 = $21 >>> 11;
+ $23 = $22 & 8;
+ $24 = ($23|0)!=(0);
+ $25 = HEAP32[$str>>2]|0;
+ $26 = ((($25)) + 12|0);
+ if ($24) {
+  $29 = $26;
+ } else {
+  $27 = ((($26)) + 8|0);
+  $28 = HEAP32[$27>>2]|0;
+  $29 = $28;
+ }
+ HEAP8[$29>>0] = 58;
+ $30 = $sp;
+ $31 = ((($30)) + 1|0);
+ $32 = $name;
+ $33 = HEAP32[$len>>2]|0;
+ _memcpy(($31|0),($32|0),($33|0))|0;
+ $34 = $name;
+ $35 = (_symname_p($34)|0);
+ $36 = ($35<<24>>24)!=(0);
+ if ($36) {
+  $37 = $name;
+  $38 = (_strlen($37)|0);
+  $39 = HEAP32[$len>>2]|0;
+  $40 = ($38|0)!=($39|0);
+  if (!($40)) {
+   ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+ }
+ $41 = $0;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_dump($2,$41,$str$byval_copy);
+ ;HEAP32[$str>>2]=HEAP32[$2>>2]|0;HEAP32[$str+4>>2]=HEAP32[$2+4>>2]|0;
+ $42 = HEAP32[$str>>2]|0;
+ $43 = HEAP32[$42>>2]|0;
+ $44 = $43 >>> 11;
+ $45 = $44 & 8;
+ $46 = ($45|0)!=(0);
+ $47 = HEAP32[$str>>2]|0;
+ $48 = ((($47)) + 12|0);
+ if ($46) {
+  $51 = $48;
+ } else {
+  $49 = ((($48)) + 8|0);
+  $50 = HEAP32[$49>>2]|0;
+  $51 = $50;
+ }
+ $sp = $51;
+ $52 = $sp;
+ HEAP8[$52>>0] = 58;
+ $53 = $sp;
+ $54 = ((($53)) + 1|0);
+ HEAP8[$54>>0] = 34;
+ ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _sym_cmp($agg$result,$mrb,$s1) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $s1 = $s1|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $len = 0, $len1 = 0, $len2 = 0, $p1 = 0;
+ var $p2 = 0, $retval = 0, $s2 = 0, $sym1 = 0, $sym2 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $s2 = sp + 40|0;
+ $len1 = sp + 8|0;
+ $len2 = sp + 4|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $s2;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = ((($s2)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)!=(4);
+ if ($4) {
+  _mrb_nil_value_355($agg$result);
+  STACKTOP = sp;return;
+ }
+ $5 = HEAP32[$s1>>2]|0;
+ $sym1 = $5;
+ $6 = HEAP32[$s2>>2]|0;
+ $sym2 = $6;
+ $7 = $sym1;
+ $8 = $sym2;
+ $9 = ($7|0)==($8|0);
+ if ($9) {
+  _mrb_fixnum_value_369($agg$result,0);
+  STACKTOP = sp;return;
+ }
+ $10 = $0;
+ $11 = $sym1;
+ $12 = (_mrb_sym2name_len($10,$11,$len1)|0);
+ $p1 = $12;
+ $13 = $0;
+ $14 = $sym2;
+ $15 = (_mrb_sym2name_len($13,$14,$len2)|0);
+ $p2 = $15;
+ $16 = HEAP32[$len1>>2]|0;
+ $17 = HEAP32[$len2>>2]|0;
+ $18 = ($16|0)>($17|0);
+ $19 = HEAP32[$len2>>2]|0;
+ $20 = HEAP32[$len1>>2]|0;
+ $21 = $18 ? $19 : $20;
+ $len = $21;
+ $22 = $p1;
+ $23 = $p2;
+ $24 = $len;
+ $25 = (_memcmp($22,$23,$24)|0);
+ $retval = $25;
+ $26 = $retval;
+ $27 = ($26|0)==(0);
+ if (!($27)) {
+  $34 = $retval;
+  $35 = ($34|0)>(0);
+  if ($35) {
+   _mrb_fixnum_value_369($agg$result,1);
+   STACKTOP = sp;return;
+  } else {
+   _mrb_fixnum_value_369($agg$result,-1);
+   STACKTOP = sp;return;
+  }
+ }
+ $28 = HEAP32[$len1>>2]|0;
+ $29 = HEAP32[$len2>>2]|0;
+ $30 = ($28|0)==($29|0);
+ if ($30) {
+  _mrb_fixnum_value_369($agg$result,0);
+  STACKTOP = sp;return;
+ }
+ $31 = HEAP32[$len1>>2]|0;
+ $32 = HEAP32[$len2>>2]|0;
+ $33 = ($31|0)>($32|0);
+ if ($33) {
+  _mrb_fixnum_value_369($agg$result,1);
+  STACKTOP = sp;return;
+ } else {
+  _mrb_fixnum_value_369($agg$result,-1);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_fixnum_value_369($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 3;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_gc_mark_gv($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = $0;
+ $3 = ((($2)) + 24|0);
+ $4 = HEAP32[$3>>2]|0;
+ _mark_tbl($1,$4);
+ STACKTOP = sp;return;
+}
+function _mark_tbl($mrb,$t) {
+ $mrb = $mrb|0;
+ $t = $t|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $t;
+ $2 = $1;
+ $3 = ($2|0)!=(0|0);
+ if (!($3)) {
+  STACKTOP = sp;return;
+ }
+ $4 = $0;
+ $5 = $1;
+ (_iv_foreach($4,$5,124,0)|0);
+ STACKTOP = sp;return;
+}
+function _iv_mark_i($mrb,$sym,$v,$p) {
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ $v = $v|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $p;
+ $3 = ((($v)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4>>>0)<(8);
+ if ($5) {
+  STACKTOP = sp;return 0;
+ }
+ $6 = $0;
+ $7 = HEAP32[$v>>2]|0;
+ _mrb_gc_mark($6,$7);
+ STACKTOP = sp;return 0;
+}
+function _iv_foreach($mrb,$t,$func,$p) {
+ $mrb = $mrb|0;
+ $t = $t|0;
+ $func = $func|0;
+ $p = $p|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $key = 0, $n = 0, $seg = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 32|0;
+ $1 = $mrb;
+ $2 = $t;
+ $3 = $func;
+ $4 = $p;
+ $5 = $2;
+ $6 = HEAP32[$5>>2]|0;
+ $seg = $6;
+ L1: while(1) {
+  $7 = $seg;
+  $8 = ($7|0)!=(0|0);
+  if (!($8)) {
+   label = 15;
+   break;
+  }
+  $i = 0;
+  while(1) {
+   $9 = $i;
+   $10 = ($9>>>0)<(4);
+   if (!($10)) {
+    break;
+   }
+   $11 = $i;
+   $12 = $seg;
+   $13 = (($12) + ($11<<2)|0);
+   $14 = HEAP32[$13>>2]|0;
+   $key = $14;
+   $15 = $seg;
+   $16 = ((($15)) + 48|0);
+   $17 = HEAP32[$16>>2]|0;
+   $18 = ($17|0)!=(0|0);
+   if (!($18)) {
+    $19 = $i;
+    $20 = $2;
+    $21 = ((($20)) + 8|0);
+    $22 = HEAP32[$21>>2]|0;
+    $23 = ($19>>>0)>=($22>>>0);
+    if ($23) {
+     label = 7;
+     break L1;
+    }
+   }
+   $24 = $key;
+   $25 = ($24|0)!=(0);
+   if ($25) {
+    $26 = $3;
+    $27 = $1;
+    $28 = $key;
+    $29 = $i;
+    $30 = $seg;
+    $31 = ((($30)) + 16|0);
+    $32 = (($31) + ($29<<3)|0);
+    $33 = $4;
+    ;HEAP32[$$byval_copy>>2]=HEAP32[$32>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$32+4>>2]|0;
+    $34 = (FUNCTION_TABLE_iiiii[$26 & 255]($27,$28,$$byval_copy,$33)|0);
+    $n = $34;
+    $35 = $n;
+    $36 = ($35|0)>(0);
+    if ($36) {
+     label = 10;
+     break L1;
+    }
+    $37 = $n;
+    $38 = ($37|0)<(0);
+    if ($38) {
+     $39 = $2;
+     $40 = ((($39)) + 4|0);
+     $41 = HEAP32[$40>>2]|0;
+     $42 = (($41) + -1)|0;
+     HEAP32[$40>>2] = $42;
+     $43 = $i;
+     $44 = $seg;
+     $45 = (($44) + ($43<<2)|0);
+     HEAP32[$45>>2] = 0;
+    }
+   }
+   $46 = $i;
+   $47 = (($46) + 1)|0;
+   $i = $47;
+  }
+  $48 = $seg;
+  $49 = ((($48)) + 48|0);
+  $50 = HEAP32[$49>>2]|0;
+  $seg = $50;
+ }
+ if ((label|0) == 7) {
+  $0 = 0;
+  $51 = $0;
+  STACKTOP = sp;return ($51|0);
+ }
+ else if ((label|0) == 10) {
+  $0 = 0;
+  $51 = $0;
+  STACKTOP = sp;return ($51|0);
+ }
+ else if ((label|0) == 15) {
+  $0 = 1;
+  $51 = $0;
+  STACKTOP = sp;return ($51|0);
+ }
+ return (0)|0;
+}
+function _mrb_gc_free_gv($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = ((($1)) + 24|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)!=(0|0);
+ if (!($4)) {
+  STACKTOP = sp;return;
+ }
+ $5 = $0;
+ $6 = $0;
+ $7 = ((($6)) + 24|0);
+ $8 = HEAP32[$7>>2]|0;
+ _iv_free($5,$8);
+ STACKTOP = sp;return;
+}
+function _iv_free($mrb,$t) {
+ $mrb = $mrb|0;
+ $t = $t|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $p = 0, $seg = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $t;
+ $2 = $1;
+ $3 = HEAP32[$2>>2]|0;
+ $seg = $3;
+ while(1) {
+  $4 = $seg;
+  $5 = ($4|0)!=(0|0);
+  if (!($5)) {
+   break;
+  }
+  $6 = $seg;
+  $p = $6;
+  $7 = $seg;
+  $8 = ((($7)) + 48|0);
+  $9 = HEAP32[$8>>2]|0;
+  $seg = $9;
+  $10 = $0;
+  $11 = $p;
+  _mrb_free($10,$11);
+ }
+ $12 = $0;
+ $13 = $1;
+ _mrb_free($12,$13);
+ STACKTOP = sp;return;
+}
+function _mrb_gc_mark_iv($mrb,$obj) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $obj;
+ $2 = $0;
+ $3 = $1;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ _mark_tbl($2,$5);
+ STACKTOP = sp;return;
+}
+function _mrb_gc_mark_iv_size($mrb,$obj) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $obj;
+ $2 = $0;
+ $3 = $1;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = (_iv_size($2,$5)|0);
+ STACKTOP = sp;return ($6|0);
+}
+function _iv_size($mrb,$t) {
+ $mrb = $mrb|0;
+ $t = $t|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $seg = 0, $size = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $t;
+ $size = 0;
+ $3 = $2;
+ $4 = ($3|0)!=(0|0);
+ if (!($4)) {
+  $0 = 0;
+  $30 = $0;
+  STACKTOP = sp;return ($30|0);
+ }
+ $5 = $2;
+ $6 = ((($5)) + 4|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ($7>>>0)>(0);
+ $9 = $2;
+ if ($8) {
+  $10 = ((($9)) + 4|0);
+  $11 = HEAP32[$10>>2]|0;
+  $0 = $11;
+  $30 = $0;
+  STACKTOP = sp;return ($30|0);
+ }
+ $12 = HEAP32[$9>>2]|0;
+ $seg = $12;
+ while(1) {
+  $13 = $seg;
+  $14 = ($13|0)!=(0|0);
+  if (!($14)) {
+   label = 10;
+   break;
+  }
+  $15 = $seg;
+  $16 = ((($15)) + 48|0);
+  $17 = HEAP32[$16>>2]|0;
+  $18 = ($17|0)==(0|0);
+  if ($18) {
+   label = 8;
+   break;
+  }
+  $25 = $seg;
+  $26 = ((($25)) + 48|0);
+  $27 = HEAP32[$26>>2]|0;
+  $seg = $27;
+  $28 = $size;
+  $29 = (($28) + 4)|0;
+  $size = $29;
+ }
+ if ((label|0) == 8) {
+  $19 = $2;
+  $20 = ((($19)) + 8|0);
+  $21 = HEAP32[$20>>2]|0;
+  $22 = $size;
+  $23 = (($22) + ($21))|0;
+  $size = $23;
+  $24 = $size;
+  $0 = $24;
+  $30 = $0;
+  STACKTOP = sp;return ($30|0);
+ }
+ else if ((label|0) == 10) {
+  $0 = 0;
+  $30 = $0;
+  STACKTOP = sp;return ($30|0);
+ }
+ return (0)|0;
+}
+function _mrb_gc_free_iv($mrb,$obj) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $obj;
+ $2 = $1;
+ $3 = ((($2)) + 12|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)!=(0|0);
+ if (!($5)) {
+  STACKTOP = sp;return;
+ }
+ $6 = $0;
+ $7 = $1;
+ $8 = ((($7)) + 12|0);
+ $9 = HEAP32[$8>>2]|0;
+ _iv_free($6,$9);
+ STACKTOP = sp;return;
+}
+function _mrb_vm_special_get($agg$result,$mrb,$i) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $i;
+ _mrb_fixnum_value_380($agg$result,0);
+ STACKTOP = sp;return;
+}
+function _mrb_fixnum_value_380($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 3;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_vm_special_set($mrb,$i,$v) {
+ $mrb = $mrb|0;
+ $i = $i|0;
+ $v = $v|0;
+ var $0 = 0, $1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $i;
+ STACKTOP = sp;return;
+}
+function _mrb_obj_iv_get($agg$result,$mrb,$obj,$sym) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $mrb;
+ $1 = $obj;
+ $2 = $sym;
+ $3 = $1;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ($5|0)!=(0|0);
+ if ($6) {
+  $7 = $0;
+  $8 = $1;
+  $9 = ((($8)) + 12|0);
+  $10 = HEAP32[$9>>2]|0;
+  $11 = $2;
+  $12 = (_iv_get($7,$10,$11,$v)|0);
+  $13 = $12&255;
+  $14 = ($13|0)!=(0);
+  if ($14) {
+   ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+ }
+ _mrb_nil_value_381($agg$result);
+ STACKTOP = sp;return;
+}
+function _iv_get($mrb,$t,$sym,$vp) {
+ $mrb = $mrb|0;
+ $t = $t|0;
+ $sym = $sym|0;
+ $vp = $vp|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var $i = 0, $key = 0, $seg = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $t;
+ $3 = $sym;
+ $4 = $vp;
+ $5 = $2;
+ $6 = HEAP32[$5>>2]|0;
+ $seg = $6;
+ L1: while(1) {
+  $7 = $seg;
+  $8 = ($7|0)!=(0|0);
+  if (!($8)) {
+   label = 14;
+   break;
+  }
+  $i = 0;
+  while(1) {
+   $9 = $i;
+   $10 = ($9>>>0)<(4);
+   if (!($10)) {
+    break;
+   }
+   $11 = $i;
+   $12 = $seg;
+   $13 = (($12) + ($11<<2)|0);
+   $14 = HEAP32[$13>>2]|0;
+   $key = $14;
+   $15 = $seg;
+   $16 = ((($15)) + 48|0);
+   $17 = HEAP32[$16>>2]|0;
+   $18 = ($17|0)!=(0|0);
+   if (!($18)) {
+    $19 = $i;
+    $20 = $2;
+    $21 = ((($20)) + 8|0);
+    $22 = HEAP32[$21>>2]|0;
+    $23 = ($19>>>0)>=($22>>>0);
+    if ($23) {
+     label = 7;
+     break L1;
+    }
+   }
+   $24 = $key;
+   $25 = $3;
+   $26 = ($24|0)==($25|0);
+   if ($26) {
+    label = 9;
+    break L1;
+   }
+   $34 = $i;
+   $35 = (($34) + 1)|0;
+   $i = $35;
+  }
+  $36 = $seg;
+  $37 = ((($36)) + 48|0);
+  $38 = HEAP32[$37>>2]|0;
+  $seg = $38;
+ }
+ if ((label|0) == 7) {
+  $0 = 0;
+  $39 = $0;
+  STACKTOP = sp;return ($39|0);
+ }
+ else if ((label|0) == 9) {
+  $27 = $4;
+  $28 = ($27|0)!=(0|0);
+  if ($28) {
+   $29 = $4;
+   $30 = $i;
+   $31 = $seg;
+   $32 = ((($31)) + 16|0);
+   $33 = (($32) + ($30<<3)|0);
+   ;HEAP32[$29>>2]=HEAP32[$33>>2]|0;HEAP32[$29+4>>2]=HEAP32[$33+4>>2]|0;
+  }
+  $0 = 1;
+  $39 = $0;
+  STACKTOP = sp;return ($39|0);
+ }
+ else if ((label|0) == 14) {
+  $0 = 0;
+  $39 = $0;
+  STACKTOP = sp;return ($39|0);
+ }
+ return (0)|0;
+}
+function _mrb_nil_value_381($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_iv_get($agg$result,$mrb,$obj,$sym) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $obj$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $sym;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ $2 = (_obj_iv_p($obj$byval_copy)|0);
+ $3 = ($2<<24>>24)!=(0);
+ if ($3) {
+  $4 = $0;
+  $5 = HEAP32[$obj>>2]|0;
+  $6 = $1;
+  _mrb_obj_iv_get($agg$result,$4,$5,$6);
+  STACKTOP = sp;return;
+ } else {
+  _mrb_nil_value_381($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _obj_iv_p($obj) {
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = ((($obj)) + 4|0);
+ $2 = HEAP32[$1>>2]|0;
+ switch ($2|0) {
+ case 18: case 21: case 15: case 12: case 10: case 9: case 8:  {
+  $0 = 1;
+  break;
+ }
+ default: {
+  $0 = 0;
+ }
+ }
+ $3 = $0;
+ STACKTOP = sp;return ($3|0);
+}
+function _mrb_obj_iv_set($mrb,$obj,$sym,$v) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ $sym = $sym|0;
+ $v = $v|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $t = 0, $v$byval_copy = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v$byval_copy = sp + 16|0;
+ $0 = $mrb;
+ $1 = $obj;
+ $2 = $sym;
+ $3 = $1;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ $t = $5;
+ $6 = $t;
+ $7 = ($6|0)!=(0|0);
+ if (!($7)) {
+  $8 = $0;
+  $9 = (_iv_new($8)|0);
+  $10 = $1;
+  $11 = ((($10)) + 12|0);
+  HEAP32[$11>>2] = $9;
+  $t = $9;
+ }
+ $12 = $0;
+ $13 = $1;
+ _mrb_write_barrier($12,$13);
+ $14 = $0;
+ $15 = $t;
+ $16 = $2;
+ ;HEAP32[$v$byval_copy>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy+4>>2]=HEAP32[$v+4>>2]|0;
+ _iv_put($14,$15,$16,$v$byval_copy);
+ STACKTOP = sp;return;
+}
+function _iv_new($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $t = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = (_mrb_malloc($1,12)|0);
+ $t = $2;
+ $3 = $t;
+ $4 = ((($3)) + 4|0);
+ HEAP32[$4>>2] = 0;
+ $5 = $t;
+ HEAP32[$5>>2] = 0;
+ $6 = $t;
+ $7 = ((($6)) + 8|0);
+ HEAP32[$7>>2] = 0;
+ $8 = $t;
+ STACKTOP = sp;return ($8|0);
+}
+function _iv_put($mrb,$t,$sym,$val) {
+ $mrb = $mrb|0;
+ $t = $t|0;
+ $sym = $sym|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
+ var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $9 = 0, $i = 0, $key = 0, $matched_idx = 0, $matched_seg = 0, $or$cond = 0, $prev = 0, $seg = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $t;
+ $2 = $sym;
+ $3 = $1;
+ $4 = HEAP32[$3>>2]|0;
+ $seg = $4;
+ $prev = 0;
+ $matched_seg = 0;
+ $matched_idx = 0;
+ L1: while(1) {
+  $5 = $seg;
+  $6 = ($5|0)!=(0|0);
+  if (!($6)) {
+   label = 14;
+   break;
+  }
+  $i = 0;
+  while(1) {
+   $7 = $i;
+   $8 = ($7>>>0)<(4);
+   if (!($8)) {
+    break;
+   }
+   $9 = $i;
+   $10 = $seg;
+   $11 = (($10) + ($9<<2)|0);
+   $12 = HEAP32[$11>>2]|0;
+   $key = $12;
+   $13 = $seg;
+   $14 = ((($13)) + 48|0);
+   $15 = HEAP32[$14>>2]|0;
+   $16 = ($15|0)!=(0|0);
+   if (!($16)) {
+    $17 = $i;
+    $18 = $1;
+    $19 = ((($18)) + 8|0);
+    $20 = HEAP32[$19>>2]|0;
+    $21 = ($17>>>0)>=($20>>>0);
+    if ($21) {
+     label = 7;
+     break L1;
+    }
+   }
+   $38 = $matched_seg;
+   $39 = ($38|0)==(0|0);
+   $40 = $key;
+   $41 = ($40|0)==(0);
+   $or$cond = $39 & $41;
+   if ($or$cond) {
+    $42 = $seg;
+    $matched_seg = $42;
+    $43 = $i;
+    $matched_idx = $43;
+   } else {
+    $44 = $key;
+    $45 = $2;
+    $46 = ($44|0)==($45|0);
+    if ($46) {
+     label = 11;
+     break L1;
+    }
+   }
+   $51 = $i;
+   $52 = (($51) + 1)|0;
+   $i = $52;
+  }
+  $53 = $seg;
+  $prev = $53;
+  $54 = $seg;
+  $55 = ((($54)) + 48|0);
+  $56 = HEAP32[$55>>2]|0;
+  $seg = $56;
+ }
+ if ((label|0) == 7) {
+  $22 = $2;
+  $23 = $i;
+  $24 = $seg;
+  $25 = (($24) + ($23<<2)|0);
+  HEAP32[$25>>2] = $22;
+  $26 = $i;
+  $27 = $seg;
+  $28 = ((($27)) + 16|0);
+  $29 = (($28) + ($26<<3)|0);
+  ;HEAP32[$29>>2]=HEAP32[$val>>2]|0;HEAP32[$29+4>>2]=HEAP32[$val+4>>2]|0;
+  $30 = $i;
+  $31 = (($30) + 1)|0;
+  $32 = $1;
+  $33 = ((($32)) + 8|0);
+  HEAP32[$33>>2] = $31;
+  $34 = $1;
+  $35 = ((($34)) + 4|0);
+  $36 = HEAP32[$35>>2]|0;
+  $37 = (($36) + 1)|0;
+  HEAP32[$35>>2] = $37;
+  STACKTOP = sp;return;
+ }
+ else if ((label|0) == 11) {
+  $47 = $i;
+  $48 = $seg;
+  $49 = ((($48)) + 16|0);
+  $50 = (($49) + ($47<<3)|0);
+  ;HEAP32[$50>>2]=HEAP32[$val>>2]|0;HEAP32[$50+4>>2]=HEAP32[$val+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ else if ((label|0) == 14) {
+  $57 = $1;
+  $58 = ((($57)) + 4|0);
+  $59 = HEAP32[$58>>2]|0;
+  $60 = (($59) + 1)|0;
+  HEAP32[$58>>2] = $60;
+  $61 = $matched_seg;
+  $62 = ($61|0)!=(0|0);
+  if ($62) {
+   $63 = $2;
+   $64 = $matched_idx;
+   $65 = $matched_seg;
+   $66 = (($65) + ($64<<2)|0);
+   HEAP32[$66>>2] = $63;
+   $67 = $matched_idx;
+   $68 = $matched_seg;
+   $69 = ((($68)) + 16|0);
+   $70 = (($69) + ($67<<3)|0);
+   ;HEAP32[$70>>2]=HEAP32[$val>>2]|0;HEAP32[$70+4>>2]=HEAP32[$val+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+  $71 = $0;
+  $72 = (_mrb_malloc($71,52)|0);
+  $seg = $72;
+  $73 = $seg;
+  $74 = ($73|0)!=(0|0);
+  if (!($74)) {
+   STACKTOP = sp;return;
+  }
+  $75 = $seg;
+  $76 = ((($75)) + 48|0);
+  HEAP32[$76>>2] = 0;
+  $77 = $2;
+  $78 = $seg;
+  HEAP32[$78>>2] = $77;
+  $79 = $seg;
+  $80 = ((($79)) + 16|0);
+  ;HEAP32[$80>>2]=HEAP32[$val>>2]|0;HEAP32[$80+4>>2]=HEAP32[$val+4>>2]|0;
+  $81 = $1;
+  $82 = ((($81)) + 8|0);
+  HEAP32[$82>>2] = 1;
+  $83 = $prev;
+  $84 = ($83|0)!=(0|0);
+  $85 = $seg;
+  if ($84) {
+   $86 = $prev;
+   $87 = ((($86)) + 48|0);
+   HEAP32[$87>>2] = $85;
+   STACKTOP = sp;return;
+  } else {
+   $88 = $1;
+   HEAP32[$88>>2] = $85;
+   STACKTOP = sp;return;
+  }
+ }
+}
+function _mrb_obj_iv_ifnone($mrb,$obj,$sym,$v) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ $sym = $sym|0;
+ $v = $v|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $t = 0, $v$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v$byval_copy = sp + 16|0;
+ $0 = $mrb;
+ $1 = $obj;
+ $2 = $sym;
+ $3 = $1;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ $t = $5;
+ $6 = $t;
+ $7 = ($6|0)!=(0|0);
+ $8 = $0;
+ if ($7) {
+  $12 = $t;
+  $13 = $2;
+  $14 = (_iv_get($8,$12,$13,$v)|0);
+  $15 = ($14<<24>>24)!=(0);
+  if ($15) {
+   STACKTOP = sp;return;
+  }
+ } else {
+  $9 = (_iv_new($8)|0);
+  $10 = $1;
+  $11 = ((($10)) + 12|0);
+  HEAP32[$11>>2] = $9;
+  $t = $9;
+ }
+ $16 = $0;
+ $17 = $1;
+ _mrb_write_barrier($16,$17);
+ $18 = $0;
+ $19 = $t;
+ $20 = $2;
+ ;HEAP32[$v$byval_copy>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy+4>>2]=HEAP32[$v+4>>2]|0;
+ _iv_put($18,$19,$20,$v$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_iv_set($mrb,$obj,$sym,$v) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ $sym = $sym|0;
+ $v = $v|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $obj$byval_copy = 0, $v$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v$byval_copy = sp + 16|0;
+ $obj$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $sym;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ $2 = (_obj_iv_p($obj$byval_copy)|0);
+ $3 = ($2<<24>>24)!=(0);
+ $4 = $0;
+ if ($3) {
+  $5 = HEAP32[$obj>>2]|0;
+  $6 = $1;
+  ;HEAP32[$v$byval_copy>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy+4>>2]=HEAP32[$v+4>>2]|0;
+  _mrb_obj_iv_set($4,$5,$6,$v$byval_copy);
+  STACKTOP = sp;return;
+ } else {
+  $7 = $0;
+  $8 = (_mrb_class_get($7,68855)|0);
+  _mrb_raise($4,$8,56206);
+  // unreachable;
+ }
+}
+function _mrb_obj_iv_defined($mrb,$obj,$sym) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $t = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $obj;
+ $3 = $sym;
+ $4 = $2;
+ $5 = ((($4)) + 12|0);
+ $6 = HEAP32[$5>>2]|0;
+ $t = $6;
+ $7 = $t;
+ $8 = ($7|0)!=(0|0);
+ if ($8) {
+  $9 = $1;
+  $10 = $t;
+  $11 = $3;
+  $12 = (_iv_get($9,$10,$11,0)|0);
+  $0 = $12;
+  $13 = $0;
+  STACKTOP = sp;return ($13|0);
+ } else {
+  $0 = 0;
+  $13 = $0;
+  STACKTOP = sp;return ($13|0);
+ }
+ return (0)|0;
+}
+function _mrb_iv_defined($mrb,$obj,$sym) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $obj$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 8|0;
+ $1 = $mrb;
+ $2 = $sym;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ $3 = (_obj_iv_p($obj$byval_copy)|0);
+ $4 = ($3<<24>>24)!=(0);
+ if ($4) {
+  $5 = $1;
+  $6 = HEAP32[$obj>>2]|0;
+  $7 = $2;
+  $8 = (_mrb_obj_iv_defined($5,$6,$7)|0);
+  $0 = $8;
+  $9 = $0;
+  STACKTOP = sp;return ($9|0);
+ } else {
+  $0 = 0;
+  $9 = $0;
+  STACKTOP = sp;return ($9|0);
+ }
+ return (0)|0;
+}
+function _mrb_iv_p($mrb,$iv_name) {
+ $mrb = $mrb|0;
+ $iv_name = $iv_name|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $len = 0, $s = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $len = sp;
+ $1 = $mrb;
+ $2 = $iv_name;
+ $3 = $1;
+ $4 = $2;
+ $5 = (_mrb_sym2name_len($3,$4,$len)|0);
+ $s = $5;
+ $6 = HEAP32[$len>>2]|0;
+ $7 = ($6|0)<(2);
+ if ($7) {
+  $0 = 0;
+  $49 = $0;
+  STACKTOP = sp;return ($49|0);
+ }
+ $8 = $s;
+ $9 = HEAP8[$8>>0]|0;
+ $10 = $9 << 24 >> 24;
+ $11 = ($10|0)!=(64);
+ if ($11) {
+  $0 = 0;
+  $49 = $0;
+  STACKTOP = sp;return ($49|0);
+ }
+ $12 = $s;
+ $13 = ((($12)) + 1|0);
+ $14 = HEAP8[$13>>0]|0;
+ $15 = $14 << 24 >> 24;
+ $16 = ($15|0)==(64);
+ if ($16) {
+  $0 = 0;
+  $49 = $0;
+  STACKTOP = sp;return ($49|0);
+ }
+ $i = 1;
+ while(1) {
+  $17 = $i;
+  $18 = HEAP32[$len>>2]|0;
+  $19 = ($17|0)<($18|0);
+  if (!($19)) {
+   label = 15;
+   break;
+  }
+  $20 = $i;
+  $21 = $s;
+  $22 = (($21) + ($20)|0);
+  $23 = HEAP8[$22>>0]|0;
+  $24 = $23 << 24 >> 24;
+  $25 = $24 | 32;
+  $26 = (($25) - 97)|0;
+  $27 = ($26>>>0)<(26);
+  if (!($27)) {
+   $28 = $i;
+   $29 = $s;
+   $30 = (($29) + ($28)|0);
+   $31 = HEAP8[$30>>0]|0;
+   $32 = $31 << 24 >> 24;
+   $33 = (($32) - 48)|0;
+   $34 = ($33>>>0)<(10);
+   if (!($34)) {
+    $35 = $i;
+    $36 = $s;
+    $37 = (($36) + ($35)|0);
+    $38 = HEAP8[$37>>0]|0;
+    $39 = $38 << 24 >> 24;
+    $40 = ($39|0)==(95);
+    if (!($40)) {
+     $41 = $i;
+     $42 = $s;
+     $43 = (($42) + ($41)|0);
+     $44 = HEAP8[$43>>0]|0;
+     $45 = $44 << 24 >> 24;
+     $46 = ($45>>>0)<=(127);
+     if ($46) {
+      label = 13;
+      break;
+     }
+    }
+   }
+  }
+  $47 = $i;
+  $48 = (($47) + 1)|0;
+  $i = $48;
+ }
+ if ((label|0) == 13) {
+  $0 = 0;
+  $49 = $0;
+  STACKTOP = sp;return ($49|0);
+ }
+ else if ((label|0) == 15) {
+  $0 = 1;
+  $49 = $0;
+  STACKTOP = sp;return ($49|0);
+ }
+ return (0)|0;
+}
+function _mrb_iv_check($mrb,$iv_name) {
+ $mrb = $mrb|0;
+ $iv_name = $iv_name|0;
+ var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $2 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $iv_name;
+ $3 = $0;
+ $4 = $1;
+ $5 = (_mrb_iv_p($3,$4)|0);
+ $6 = ($5<<24>>24)!=(0);
+ if ($6) {
+  STACKTOP = sp;return;
+ } else {
+  $7 = $0;
+  $8 = $1;
+  $9 = $0;
+  $10 = $1;
+  _mrb_sym2str($2,$9,$10);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$2>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$2+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$2+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$2+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$2+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$2+7>>0]|0;
+  _mrb_name_error($7,$8,56235,$vararg_buffer);
+  // unreachable;
+ }
+}
+function _mrb_iv_copy($mrb,$dest,$src) {
+ $mrb = $mrb|0;
+ $dest = $dest|0;
+ $src = $src|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0;
+ var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $d = 0, $s = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$dest>>2]|0;
+ $d = $1;
+ $2 = HEAP32[$src>>2]|0;
+ $s = $2;
+ $3 = $d;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ($5|0)!=(0|0);
+ if ($6) {
+  $7 = $0;
+  $8 = $d;
+  $9 = ((($8)) + 12|0);
+  $10 = HEAP32[$9>>2]|0;
+  _iv_free($7,$10);
+  $11 = $d;
+  $12 = ((($11)) + 12|0);
+  HEAP32[$12>>2] = 0;
+ }
+ $13 = $s;
+ $14 = ((($13)) + 12|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = ($15|0)!=(0|0);
+ if (!($16)) {
+  STACKTOP = sp;return;
+ }
+ $17 = $0;
+ $18 = $d;
+ _mrb_write_barrier($17,$18);
+ $19 = $0;
+ $20 = $s;
+ $21 = ((($20)) + 12|0);
+ $22 = HEAP32[$21>>2]|0;
+ $23 = (_iv_copy($19,$22)|0);
+ $24 = $d;
+ $25 = ((($24)) + 12|0);
+ HEAP32[$25>>2] = $23;
+ STACKTOP = sp;return;
+}
+function _iv_copy($mrb,$t) {
+ $mrb = $mrb|0;
+ $t = $t|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0;
+ var $key = 0, $seg = 0, $t2 = 0, $val = 0, $val$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy = sp + 40|0;
+ $val = sp;
+ $1 = $mrb;
+ $2 = $t;
+ $3 = $2;
+ $4 = HEAP32[$3>>2]|0;
+ $seg = $4;
+ $5 = $1;
+ $6 = (_iv_new($5)|0);
+ $t2 = $6;
+ L1: while(1) {
+  $7 = $seg;
+  $8 = ($7|0)!=(0|0);
+  if (!($8)) {
+   label = 10;
+   break;
+  }
+  $i = 0;
+  while(1) {
+   $9 = $i;
+   $10 = ($9>>>0)<(4);
+   if (!($10)) {
+    break;
+   }
+   $11 = $i;
+   $12 = $seg;
+   $13 = (($12) + ($11<<2)|0);
+   $14 = HEAP32[$13>>2]|0;
+   $key = $14;
+   $15 = $i;
+   $16 = $seg;
+   $17 = ((($16)) + 16|0);
+   $18 = (($17) + ($15<<3)|0);
+   ;HEAP32[$val>>2]=HEAP32[$18>>2]|0;HEAP32[$val+4>>2]=HEAP32[$18+4>>2]|0;
+   $19 = $seg;
+   $20 = ((($19)) + 48|0);
+   $21 = HEAP32[$20>>2]|0;
+   $22 = ($21|0)==(0|0);
+   if ($22) {
+    $23 = $i;
+    $24 = $2;
+    $25 = ((($24)) + 8|0);
+    $26 = HEAP32[$25>>2]|0;
+    $27 = ($23>>>0)>=($26>>>0);
+    if ($27) {
+     label = 7;
+     break L1;
+    }
+   }
+   $29 = $1;
+   $30 = $t2;
+   $31 = $key;
+   ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+   _iv_put($29,$30,$31,$val$byval_copy);
+   $32 = $i;
+   $33 = (($32) + 1)|0;
+   $i = $33;
+  }
+  $34 = $seg;
+  $35 = ((($34)) + 48|0);
+  $36 = HEAP32[$35>>2]|0;
+  $seg = $36;
+ }
+ if ((label|0) == 7) {
+  $28 = $t2;
+  $0 = $28;
+  $38 = $0;
+  STACKTOP = sp;return ($38|0);
+ }
+ else if ((label|0) == 10) {
+  $37 = $t2;
+  $0 = $37;
+  $38 = $0;
+  STACKTOP = sp;return ($38|0);
+ }
+ return (0)|0;
+}
+function _mrb_obj_iv_inspect($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $$byval_copy = 0, $$byval_copy4 = 0, $$byval_copy6 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
+ var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cn = 0, $len = 0, $str = 0, $str$byval_copy = 0, $str$byval_copy1 = 0, $str$byval_copy2 = 0;
+ var $str$byval_copy3 = 0, $str$byval_copy5 = 0, $t = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy6 = sp + 144|0;
+ $str$byval_copy5 = sp + 136|0;
+ $$byval_copy4 = sp + 128|0;
+ $str$byval_copy3 = sp + 120|0;
+ $str$byval_copy2 = sp + 112|0;
+ $str$byval_copy1 = sp + 104|0;
+ $str$byval_copy = sp + 96|0;
+ $$byval_copy = sp + 88|0;
+ $2 = sp + 56|0;
+ $str = sp + 48|0;
+ $3 = sp + 40|0;
+ $4 = sp + 32|0;
+ $5 = sp + 24|0;
+ $6 = sp + 16|0;
+ $7 = sp + 8|0;
+ $8 = sp;
+ $0 = $mrb;
+ $1 = $obj;
+ $9 = $1;
+ $10 = ((($9)) + 12|0);
+ $11 = HEAP32[$10>>2]|0;
+ $t = $11;
+ $12 = $0;
+ $13 = $t;
+ $14 = (_iv_size($12,$13)|0);
+ $len = $14;
+ $15 = $len;
+ $16 = ($15>>>0)>(0);
+ $17 = $0;
+ $18 = $1;
+ if ($16) {
+  _mrb_obj_value_389($2,$18);
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+  $19 = (_mrb_obj_classname($17,$$byval_copy)|0);
+  $cn = $19;
+  $20 = $0;
+  _mrb_str_buf_new($str,$20,30);
+  $21 = $0;
+  ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+  _mrb_str_cat($3,$21,$str$byval_copy,56284,2);
+  $22 = $0;
+  $23 = $cn;
+  ;HEAP32[$str$byval_copy1>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy1+4>>2]=HEAP32[$str+4>>2]|0;
+  _mrb_str_cat_cstr($4,$22,$str$byval_copy1,$23);
+  $24 = $0;
+  ;HEAP32[$str$byval_copy2>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy2+4>>2]=HEAP32[$str+4>>2]|0;
+  _mrb_str_cat($5,$24,$str$byval_copy2,67713,1);
+  $25 = $0;
+  $26 = $0;
+  $27 = $1;
+  _mrb_ptr_to_str($6,$26,$27);
+  ;HEAP32[$str$byval_copy3>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy3+4>>2]=HEAP32[$str+4>>2]|0;
+  ;HEAP32[$$byval_copy4>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$6+4>>2]|0;
+  _mrb_str_concat($25,$str$byval_copy3,$$byval_copy4);
+  $28 = $0;
+  $29 = $t;
+  (_iv_foreach($28,$29,125,$str)|0);
+  $30 = $0;
+  ;HEAP32[$str$byval_copy5>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy5+4>>2]=HEAP32[$str+4>>2]|0;
+  _mrb_str_cat($7,$30,$str$byval_copy5,65241,1);
+  ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+  STACKTOP = sp;return;
+ } else {
+  _mrb_obj_value_389($8,$18);
+  ;HEAP32[$$byval_copy6>>2]=HEAP32[$8>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$8+4>>2]|0;
+  _mrb_any_to_s($agg$result,$17,$$byval_copy6);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_obj_value_389($agg$result,$p) {
+ $agg$result = $agg$result|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $p;
+ $1 = $0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 & 255;
+ $4 = ((($v)) + 4|0);
+ HEAP32[$4>>2] = $3;
+ $5 = $0;
+ HEAP32[$v>>2] = $5;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _inspect_i($mrb,$sym,$v,$p) {
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ $v = $v|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var $ins = 0, $ins$byval_copy = 0, $len = 0, $s = 0, $sp = 0, $str = 0, $str$byval_copy = 0, $str$byval_copy1 = 0, $str$byval_copy2 = 0, $str$byval_copy3 = 0, $str$byval_copy5 = 0, $v$byval_copy = 0, $v$byval_copy4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 176|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $ins$byval_copy = sp + 160|0;
+ $str$byval_copy5 = sp + 152|0;
+ $v$byval_copy4 = sp + 144|0;
+ $v$byval_copy = sp + 136|0;
+ $str$byval_copy3 = sp + 128|0;
+ $str$byval_copy2 = sp + 120|0;
+ $str$byval_copy1 = sp + 112|0;
+ $str$byval_copy = sp + 104|0;
+ $str = sp + 80|0;
+ $len = sp + 72|0;
+ $ins = sp + 64|0;
+ $3 = sp + 48|0;
+ $4 = sp + 40|0;
+ $5 = sp + 32|0;
+ $6 = sp + 24|0;
+ $7 = sp + 16|0;
+ $8 = sp + 8|0;
+ $9 = sp;
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $p;
+ $10 = $2;
+ ;HEAP32[$str>>2]=HEAP32[$10>>2]|0;HEAP32[$str+4>>2]=HEAP32[$10+4>>2]|0;
+ $11 = HEAP32[$str>>2]|0;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $12 >>> 11;
+ $14 = $13 & 8;
+ $15 = ($14|0)!=(0);
+ $16 = HEAP32[$str>>2]|0;
+ $17 = ((($16)) + 12|0);
+ if ($15) {
+  $20 = $17;
+ } else {
+  $18 = ((($17)) + 8|0);
+  $19 = HEAP32[$18>>2]|0;
+  $20 = $19;
+ }
+ $sp = $20;
+ $21 = $sp;
+ $22 = HEAP8[$21>>0]|0;
+ $23 = $22 << 24 >> 24;
+ $24 = ($23|0)==(45);
+ if ($24) {
+  $25 = $sp;
+  HEAP8[$25>>0] = 35;
+  $26 = $0;
+  ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+  _mrb_str_cat($3,$26,$str$byval_copy,66205,1);
+ } else {
+  $27 = $0;
+  ;HEAP32[$str$byval_copy1>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy1+4>>2]=HEAP32[$str+4>>2]|0;
+  _mrb_str_cat($4,$27,$str$byval_copy1,63258,2);
+ }
+ $28 = $0;
+ $29 = $1;
+ $30 = (_mrb_sym2name_len($28,$29,$len)|0);
+ $s = $30;
+ $31 = $0;
+ $32 = $s;
+ $33 = HEAP32[$len>>2]|0;
+ ;HEAP32[$str$byval_copy2>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy2+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_cat($5,$31,$str$byval_copy2,$32,$33);
+ $34 = $0;
+ ;HEAP32[$str$byval_copy3>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy3+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_cat($6,$34,$str$byval_copy3,65815,1);
+ $35 = ((($v)) + 4|0);
+ $36 = HEAP32[$35>>2]|0;
+ $37 = ($36|0)==(8);
+ $38 = $0;
+ if ($37) {
+  ;HEAP32[$v$byval_copy>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy+4>>2]=HEAP32[$v+4>>2]|0;
+  _mrb_any_to_s($7,$38,$v$byval_copy);
+  ;HEAP32[$ins>>2]=HEAP32[$7>>2]|0;HEAP32[$ins+4>>2]=HEAP32[$7+4>>2]|0;
+  $39 = $0;
+  ;HEAP32[$str$byval_copy5>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy5+4>>2]=HEAP32[$str+4>>2]|0;
+  ;HEAP32[$ins$byval_copy>>2]=HEAP32[$ins>>2]|0;HEAP32[$ins$byval_copy+4>>2]=HEAP32[$ins+4>>2]|0;
+  _mrb_str_cat_str($9,$39,$str$byval_copy5,$ins$byval_copy);
+  STACKTOP = sp;return 0;
+ } else {
+  ;HEAP32[$v$byval_copy4>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy4+4>>2]=HEAP32[$v+4>>2]|0;
+  _mrb_inspect($8,$38,$v$byval_copy4);
+  ;HEAP32[$ins>>2]=HEAP32[$8>>2]|0;HEAP32[$ins+4>>2]=HEAP32[$8+4>>2]|0;
+  $39 = $0;
+  ;HEAP32[$str$byval_copy5>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy5+4>>2]=HEAP32[$str+4>>2]|0;
+  ;HEAP32[$ins$byval_copy>>2]=HEAP32[$ins>>2]|0;HEAP32[$ins$byval_copy+4>>2]=HEAP32[$ins+4>>2]|0;
+  _mrb_str_cat_str($9,$39,$str$byval_copy5,$ins$byval_copy);
+  STACKTOP = sp;return 0;
+ }
+ return (0)|0;
+}
+function _mrb_iv_remove($agg$result,$mrb,$obj,$sym) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $obj$byval_copy = 0, $t = 0, $val = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 24|0;
+ $val = sp;
+ $0 = $mrb;
+ $1 = $sym;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ $2 = (_obj_iv_p($obj$byval_copy)|0);
+ $3 = ($2<<24>>24)!=(0);
+ if ($3) {
+  $4 = HEAP32[$obj>>2]|0;
+  $5 = ((($4)) + 12|0);
+  $6 = HEAP32[$5>>2]|0;
+  $t = $6;
+  $7 = $t;
+  $8 = ($7|0)!=(0|0);
+  if ($8) {
+   $9 = $0;
+   $10 = $t;
+   $11 = $1;
+   $12 = (_iv_del($9,$10,$11,$val)|0);
+   $13 = $12&255;
+   $14 = ($13|0)!=(0);
+   if ($14) {
+    ;HEAP32[$agg$result>>2]=HEAP32[$val>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$val+4>>2]|0;
+    STACKTOP = sp;return;
+   }
+  }
+ }
+ _mrb_undef_value_396($agg$result);
+ STACKTOP = sp;return;
+}
+function _iv_del($mrb,$t,$sym,$vp) {
+ $mrb = $mrb|0;
+ $t = $t|0;
+ $sym = $sym|0;
+ $vp = $vp|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $key = 0, $seg = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $t;
+ $3 = $sym;
+ $4 = $vp;
+ $5 = $2;
+ $6 = HEAP32[$5>>2]|0;
+ $seg = $6;
+ L1: while(1) {
+  $7 = $seg;
+  $8 = ($7|0)!=(0|0);
+  if (!($8)) {
+   label = 14;
+   break;
+  }
+  $i = 0;
+  while(1) {
+   $9 = $i;
+   $10 = ($9>>>0)<(4);
+   if (!($10)) {
+    break;
+   }
+   $11 = $i;
+   $12 = $seg;
+   $13 = (($12) + ($11<<2)|0);
+   $14 = HEAP32[$13>>2]|0;
+   $key = $14;
+   $15 = $seg;
+   $16 = ((($15)) + 48|0);
+   $17 = HEAP32[$16>>2]|0;
+   $18 = ($17|0)!=(0|0);
+   if (!($18)) {
+    $19 = $i;
+    $20 = $2;
+    $21 = ((($20)) + 8|0);
+    $22 = HEAP32[$21>>2]|0;
+    $23 = ($19>>>0)>=($22>>>0);
+    if ($23) {
+     label = 7;
+     break L1;
+    }
+   }
+   $24 = $key;
+   $25 = $3;
+   $26 = ($24|0)==($25|0);
+   if ($26) {
+    label = 9;
+    break L1;
+   }
+   $41 = $i;
+   $42 = (($41) + 1)|0;
+   $i = $42;
+  }
+  $43 = $seg;
+  $44 = ((($43)) + 48|0);
+  $45 = HEAP32[$44>>2]|0;
+  $seg = $45;
+ }
+ if ((label|0) == 7) {
+  $0 = 0;
+  $46 = $0;
+  STACKTOP = sp;return ($46|0);
+ }
+ else if ((label|0) == 9) {
+  $27 = $2;
+  $28 = ((($27)) + 4|0);
+  $29 = HEAP32[$28>>2]|0;
+  $30 = (($29) + -1)|0;
+  HEAP32[$28>>2] = $30;
+  $31 = $i;
+  $32 = $seg;
+  $33 = (($32) + ($31<<2)|0);
+  HEAP32[$33>>2] = 0;
+  $34 = $4;
+  $35 = ($34|0)!=(0|0);
+  if ($35) {
+   $36 = $4;
+   $37 = $i;
+   $38 = $seg;
+   $39 = ((($38)) + 16|0);
+   $40 = (($39) + ($37<<3)|0);
+   ;HEAP32[$36>>2]=HEAP32[$40>>2]|0;HEAP32[$36+4>>2]=HEAP32[$40+4>>2]|0;
+  }
+  $0 = 1;
+  $46 = $0;
+  STACKTOP = sp;return ($46|0);
+ }
+ else if ((label|0) == 14) {
+  $0 = 0;
+  $46 = $0;
+  STACKTOP = sp;return ($46|0);
+ }
+ return (0)|0;
+}
+function _mrb_undef_value_396($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 5;
+ HEAP32[$v>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_vm_iv_get($agg$result,$mrb,$sym) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $0;
+ $3 = $0;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ((($5)) + 4|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $1;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$7+4>>2]|0;
+ _mrb_iv_get($agg$result,$2,$$byval_copy,$8);
+ STACKTOP = sp;return;
+}
+function _mrb_vm_iv_set($mrb,$sym,$v) {
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ $v = $v|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $v$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v$byval_copy = sp + 16|0;
+ $$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $0;
+ $3 = $0;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ((($5)) + 4|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $1;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$7+4>>2]|0;
+ ;HEAP32[$v$byval_copy>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy+4>>2]=HEAP32[$v+4>>2]|0;
+ _mrb_iv_set($2,$$byval_copy,$8,$v$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_instance_variables($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ary = 0, $self$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 24|0;
+ $ary = sp + 8|0;
+ $1 = sp;
+ $0 = $mrb;
+ $2 = $0;
+ _mrb_ary_new($1,$2);
+ ;HEAP32[$ary>>2]=HEAP32[$1>>2]|0;HEAP32[$ary+4>>2]=HEAP32[$1+4>>2]|0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ $3 = (_obj_iv_p($self$byval_copy)|0);
+ $4 = $3&255;
+ $5 = ($4|0)!=(0);
+ if ($5) {
+  $6 = HEAP32[$self>>2]|0;
+  $7 = ((($6)) + 12|0);
+  $8 = HEAP32[$7>>2]|0;
+  $9 = ($8|0)!=(0|0);
+  if ($9) {
+   $10 = $0;
+   $11 = HEAP32[$self>>2]|0;
+   $12 = ((($11)) + 12|0);
+   $13 = HEAP32[$12>>2]|0;
+   (_iv_foreach($10,$13,126,$ary)|0);
+  }
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$ary>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$ary+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _iv_i($mrb,$sym,$v,$p) {
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ $v = $v|0;
+ $p = $p|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $ary = 0, $ary$byval_copy = 0, $len = 0, $s = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 48|0;
+ $ary$byval_copy = sp + 40|0;
+ $ary = sp + 16|0;
+ $len = sp + 8|0;
+ $3 = sp;
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $p;
+ $4 = $2;
+ ;HEAP32[$ary>>2]=HEAP32[$4>>2]|0;HEAP32[$ary+4>>2]=HEAP32[$4+4>>2]|0;
+ $5 = $0;
+ $6 = $1;
+ $7 = (_mrb_sym2name_len($5,$6,$len)|0);
+ $s = $7;
+ $8 = HEAP32[$len>>2]|0;
+ $9 = ($8|0)>(1);
+ if (!($9)) {
+  STACKTOP = sp;return 0;
+ }
+ $10 = $s;
+ $11 = HEAP8[$10>>0]|0;
+ $12 = $11 << 24 >> 24;
+ $13 = ($12|0)==(64);
+ if (!($13)) {
+  STACKTOP = sp;return 0;
+ }
+ $14 = $s;
+ $15 = ((($14)) + 1|0);
+ $16 = HEAP8[$15>>0]|0;
+ $17 = $16 << 24 >> 24;
+ $18 = ($17|0)!=(64);
+ if (!($18)) {
+  STACKTOP = sp;return 0;
+ }
+ $19 = $0;
+ $20 = $1;
+ _mrb_symbol_value_397($3,$20);
+ ;HEAP32[$ary$byval_copy>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy+4>>2]=HEAP32[$ary+4>>2]|0;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
+ _mrb_ary_push($19,$ary$byval_copy,$$byval_copy);
+ STACKTOP = sp;return 0;
+}
+function _mrb_symbol_value_397($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 4;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_mod_class_variables($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ary = 0, $c = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $ary = sp + 16|0;
+ $1 = sp;
+ $0 = $mrb;
+ $2 = $0;
+ _mrb_ary_new($1,$2);
+ ;HEAP32[$ary>>2]=HEAP32[$1>>2]|0;HEAP32[$ary+4>>2]=HEAP32[$1+4>>2]|0;
+ $3 = HEAP32[$mod>>2]|0;
+ $c = $3;
+ while(1) {
+  $4 = $c;
+  $5 = ($4|0)!=(0|0);
+  if (!($5)) {
+   break;
+  }
+  $6 = $c;
+  $7 = ((($6)) + 12|0);
+  $8 = HEAP32[$7>>2]|0;
+  $9 = ($8|0)!=(0|0);
+  if ($9) {
+   $10 = $0;
+   $11 = $c;
+   $12 = ((($11)) + 12|0);
+   $13 = HEAP32[$12>>2]|0;
+   (_iv_foreach($10,$13,127,$ary)|0);
+  }
+  $14 = $c;
+  $15 = ((($14)) + 20|0);
+  $16 = HEAP32[$15>>2]|0;
+  $c = $16;
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$ary>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$ary+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _cv_i($mrb,$sym,$v,$p) {
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ $v = $v|0;
+ $p = $p|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $ary = 0, $ary$byval_copy = 0, $len = 0, $s = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 48|0;
+ $ary$byval_copy = sp + 40|0;
+ $ary = sp + 16|0;
+ $len = sp + 8|0;
+ $3 = sp;
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $p;
+ $4 = $2;
+ ;HEAP32[$ary>>2]=HEAP32[$4>>2]|0;HEAP32[$ary+4>>2]=HEAP32[$4+4>>2]|0;
+ $5 = $0;
+ $6 = $1;
+ $7 = (_mrb_sym2name_len($5,$6,$len)|0);
+ $s = $7;
+ $8 = HEAP32[$len>>2]|0;
+ $9 = ($8|0)>(2);
+ if (!($9)) {
+  STACKTOP = sp;return 0;
+ }
+ $10 = $s;
+ $11 = HEAP8[$10>>0]|0;
+ $12 = $11 << 24 >> 24;
+ $13 = ($12|0)==(64);
+ if (!($13)) {
+  STACKTOP = sp;return 0;
+ }
+ $14 = $s;
+ $15 = ((($14)) + 1|0);
+ $16 = HEAP8[$15>>0]|0;
+ $17 = $16 << 24 >> 24;
+ $18 = ($17|0)==(64);
+ if (!($18)) {
+  STACKTOP = sp;return 0;
+ }
+ $19 = $0;
+ $20 = $1;
+ _mrb_symbol_value_397($3,$20);
+ ;HEAP32[$ary$byval_copy>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy+4>>2]=HEAP32[$ary+4>>2]|0;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
+ _mrb_ary_push($19,$ary$byval_copy,$$byval_copy);
+ STACKTOP = sp;return 0;
+}
+function _mrb_mod_cv_get($agg$result,$mrb,$c,$sym) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $sym = $sym|0;
+ var $$old = 0, $$old1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
+ var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, $cls = 0, $klass = 0, $or$cond = 0, $v = 0, $vararg_buffer = 0, $vararg_ptr2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $v = sp + 48|0;
+ $klass = sp + 40|0;
+ $3 = sp + 32|0;
+ $4 = sp + 24|0;
+ $5 = sp + 16|0;
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $sym;
+ $6 = $1;
+ $cls = $6;
+ while(1) {
+  $7 = $1;
+  $8 = ($7|0)!=(0|0);
+  if (!($8)) {
+   break;
+  }
+  $9 = $1;
+  $10 = ((($9)) + 12|0);
+  $11 = HEAP32[$10>>2]|0;
+  $12 = ($11|0)!=(0|0);
+  if ($12) {
+   $13 = $0;
+   $14 = $1;
+   $15 = ((($14)) + 12|0);
+   $16 = HEAP32[$15>>2]|0;
+   $17 = $2;
+   $18 = (_iv_get($13,$16,$17,$v)|0);
+   $19 = $18&255;
+   $20 = ($19|0)!=(0);
+   if ($20) {
+    label = 5;
+    break;
+   }
+  }
+  $21 = $1;
+  $22 = ((($21)) + 20|0);
+  $23 = HEAP32[$22>>2]|0;
+  $1 = $23;
+ }
+ if ((label|0) == 5) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $24 = $cls;
+ $25 = ($24|0)!=(0|0);
+ L11: do {
+  if ($25) {
+   $26 = $cls;
+   $27 = HEAP32[$26>>2]|0;
+   $28 = $27 & 255;
+   $29 = ($28|0)==(12);
+   if ($29) {
+    $30 = $0;
+    $31 = $cls;
+    $32 = $0;
+    $33 = (_mrb_intern_static($32,67899,12)|0);
+    _mrb_obj_iv_get($3,$30,$31,$33);
+    ;HEAP32[$klass>>2]=HEAP32[$3>>2]|0;HEAP32[$klass+4>>2]=HEAP32[$3+4>>2]|0;
+    $34 = HEAP32[$klass>>2]|0;
+    $1 = $34;
+    $35 = $1;
+    $36 = HEAP32[$35>>2]|0;
+    $37 = $36 & 255;
+    $38 = ($37|0)==(9);
+    $39 = $1;
+    $40 = ($39|0)!=(0|0);
+    $or$cond = $38 & $40;
+    if ($or$cond) {
+     while(1) {
+      $41 = $1;
+      $42 = ((($41)) + 12|0);
+      $43 = HEAP32[$42>>2]|0;
+      $44 = ($43|0)!=(0|0);
+      if ($44) {
+       $45 = $0;
+       $46 = $1;
+       $47 = ((($46)) + 12|0);
+       $48 = HEAP32[$47>>2]|0;
+       $49 = $2;
+       $50 = (_iv_get($45,$48,$49,$v)|0);
+       $51 = $50&255;
+       $52 = ($51|0)!=(0);
+       if ($52) {
+        break;
+       }
+      }
+      $53 = $1;
+      $54 = ((($53)) + 20|0);
+      $55 = HEAP32[$54>>2]|0;
+      $1 = $55;
+      $$old = $1;
+      $$old1 = ($$old|0)!=(0|0);
+      if (!($$old1)) {
+       break L11;
+      }
+     }
+     ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+     STACKTOP = sp;return;
+    }
+   }
+  }
+ } while(0);
+ $56 = $0;
+ $57 = $2;
+ $58 = $0;
+ $59 = $2;
+ _mrb_sym2str($4,$58,$59);
+ $60 = $cls;
+ _mrb_obj_value_389($5,$60);
+ ;HEAP8[$vararg_buffer>>0]=HEAP8[$4>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$4+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$4+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$4+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$4+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$4+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$4+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$4+7>>0]|0;
+ $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+ ;HEAP8[$vararg_ptr2>>0]=HEAP8[$5>>0]|0;HEAP8[$vararg_ptr2+1>>0]=HEAP8[$5+1>>0]|0;HEAP8[$vararg_ptr2+2>>0]=HEAP8[$5+2>>0]|0;HEAP8[$vararg_ptr2+3>>0]=HEAP8[$5+3>>0]|0;HEAP8[$vararg_ptr2+4>>0]=HEAP8[$5+4>>0]|0;HEAP8[$vararg_ptr2+5>>0]=HEAP8[$5+5>>0]|0;HEAP8[$vararg_ptr2+6>>0]=HEAP8[$5+6>>0]|0;HEAP8[$vararg_ptr2+7>>0]=HEAP8[$5+7>>0]|0;
+ _mrb_name_error($56,$57,56287,$vararg_buffer);
+ // unreachable;
+}
+function _mrb_cv_get($agg$result,$mrb,$mod,$sym) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $0;
+ $3 = HEAP32[$mod>>2]|0;
+ $4 = $1;
+ _mrb_mod_cv_get($agg$result,$2,$3,$4);
+ STACKTOP = sp;return;
+}
+function _mrb_mod_cv_set($mrb,$c,$sym,$v) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $sym = $sym|0;
+ $v = $v|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $cls = 0, $t = 0, $v$byval_copy = 0, $v$byval_copy1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v$byval_copy1 = sp + 32|0;
+ $v$byval_copy = sp + 24|0;
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $sym;
+ $3 = $1;
+ $cls = $3;
+ while(1) {
+  $4 = $1;
+  $5 = ($4|0)!=(0|0);
+  if (!($5)) {
+   break;
+  }
+  $6 = $1;
+  $7 = ((($6)) + 12|0);
+  $8 = HEAP32[$7>>2]|0;
+  $9 = ($8|0)!=(0|0);
+  if ($9) {
+   $10 = $1;
+   $11 = ((($10)) + 12|0);
+   $12 = HEAP32[$11>>2]|0;
+   $t = $12;
+   $13 = $0;
+   $14 = $t;
+   $15 = $2;
+   $16 = (_iv_get($13,$14,$15,0)|0);
+   $17 = ($16<<24>>24)!=(0);
+   if ($17) {
+    label = 5;
+    break;
+   }
+  }
+  $23 = $1;
+  $24 = ((($23)) + 20|0);
+  $25 = HEAP32[$24>>2]|0;
+  $1 = $25;
+ }
+ if ((label|0) == 5) {
+  $18 = $0;
+  $19 = $1;
+  _mrb_write_barrier($18,$19);
+  $20 = $0;
+  $21 = $t;
+  $22 = $2;
+  ;HEAP32[$v$byval_copy>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy+4>>2]=HEAP32[$v+4>>2]|0;
+  _iv_put($20,$21,$22,$v$byval_copy);
+  STACKTOP = sp;return;
+ }
+ $26 = $cls;
+ $27 = ((($26)) + 12|0);
+ $28 = HEAP32[$27>>2]|0;
+ $29 = ($28|0)!=(0|0);
+ if (!($29)) {
+  $30 = $0;
+  $31 = (_iv_new($30)|0);
+  $32 = $cls;
+  $33 = ((($32)) + 12|0);
+  HEAP32[$33>>2] = $31;
+ }
+ $34 = $0;
+ $35 = $cls;
+ _mrb_write_barrier($34,$35);
+ $36 = $0;
+ $37 = $cls;
+ $38 = ((($37)) + 12|0);
+ $39 = HEAP32[$38>>2]|0;
+ $40 = $2;
+ ;HEAP32[$v$byval_copy1>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy1+4>>2]=HEAP32[$v+4>>2]|0;
+ _iv_put($36,$39,$40,$v$byval_copy1);
+ STACKTOP = sp;return;
+}
+function _mrb_cv_set($mrb,$mod,$sym,$v) {
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ $sym = $sym|0;
+ $v = $v|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $v$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $0;
+ $3 = HEAP32[$mod>>2]|0;
+ $4 = $1;
+ ;HEAP32[$v$byval_copy>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy+4>>2]=HEAP32[$v+4>>2]|0;
+ _mrb_mod_cv_set($2,$3,$4,$v$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_mod_cv_defined($mrb,$c,$sym) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $t = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $c;
+ $3 = $sym;
+ while(1) {
+  $4 = $2;
+  $5 = ($4|0)!=(0|0);
+  if (!($5)) {
+   label = 7;
+   break;
+  }
+  $6 = $2;
+  $7 = ((($6)) + 12|0);
+  $8 = HEAP32[$7>>2]|0;
+  $9 = ($8|0)!=(0|0);
+  if ($9) {
+   $10 = $2;
+   $11 = ((($10)) + 12|0);
+   $12 = HEAP32[$11>>2]|0;
+   $t = $12;
+   $13 = $1;
+   $14 = $t;
+   $15 = $3;
+   $16 = (_iv_get($13,$14,$15,0)|0);
+   $17 = ($16<<24>>24)!=(0);
+   if ($17) {
+    label = 5;
+    break;
+   }
+  }
+  $18 = $2;
+  $19 = ((($18)) + 20|0);
+  $20 = HEAP32[$19>>2]|0;
+  $2 = $20;
+ }
+ if ((label|0) == 5) {
+  $0 = 1;
+  $21 = $0;
+  STACKTOP = sp;return ($21|0);
+ }
+ else if ((label|0) == 7) {
+  $0 = 0;
+  $21 = $0;
+  STACKTOP = sp;return ($21|0);
+ }
+ return (0)|0;
+}
+function _mrb_cv_defined($mrb,$mod,$sym) {
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $0;
+ $3 = HEAP32[$mod>>2]|0;
+ $4 = $1;
+ $5 = (_mrb_mod_cv_defined($2,$3,$4)|0);
+ STACKTOP = sp;return ($5|0);
+}
+function _mrb_vm_cv_get($agg$result,$mrb,$sym) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, $c = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $0;
+ $3 = ((($2)) + 12|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ((($4)) + 16|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = ((($6)) + 4|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ((($8)) + 16|0);
+ $10 = HEAP32[$9>>2]|0;
+ $c = $10;
+ $11 = $c;
+ $12 = ($11|0)!=(0|0);
+ if ($12) {
+  $20 = $0;
+  $21 = $c;
+  $22 = $1;
+  _mrb_mod_cv_get($agg$result,$20,$21,$22);
+  STACKTOP = sp;return;
+ }
+ $13 = $0;
+ $14 = ((($13)) + 12|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = ((($15)) + 16|0);
+ $17 = HEAP32[$16>>2]|0;
+ $18 = ((($17)) + 44|0);
+ $19 = HEAP32[$18>>2]|0;
+ $c = $19;
+ $20 = $0;
+ $21 = $c;
+ $22 = $1;
+ _mrb_mod_cv_get($agg$result,$20,$21,$22);
+ STACKTOP = sp;return;
+}
+function _mrb_vm_cv_set($mrb,$sym,$v) {
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ $v = $v|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, $c = 0, $v$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v$byval_copy = sp + 16|0;
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $0;
+ $3 = ((($2)) + 12|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ((($4)) + 16|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = ((($6)) + 4|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ((($8)) + 16|0);
+ $10 = HEAP32[$9>>2]|0;
+ $c = $10;
+ $11 = $c;
+ $12 = ($11|0)!=(0|0);
+ if (!($12)) {
+  $13 = $0;
+  $14 = ((($13)) + 12|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = ((($15)) + 16|0);
+  $17 = HEAP32[$16>>2]|0;
+  $18 = ((($17)) + 44|0);
+  $19 = HEAP32[$18>>2]|0;
+  $c = $19;
+ }
+ $20 = $0;
+ $21 = $c;
+ $22 = $1;
+ ;HEAP32[$v$byval_copy>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy+4>>2]=HEAP32[$v+4>>2]|0;
+ _mrb_mod_cv_set($20,$21,$22,$v$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_const_get($agg$result,$mrb,$mod,$sym) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $mod$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $mod$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $0;
+ ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+ _mod_const_check($2,$mod$byval_copy);
+ $3 = $0;
+ $4 = HEAP32[$mod>>2]|0;
+ $5 = $1;
+ _const_get($agg$result,$3,$4,$5);
+ STACKTOP = sp;return;
+}
+function _mod_const_check($mrb,$mod) {
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = ((($mod)) + 4|0);
+ $2 = HEAP32[$1>>2]|0;
+ switch ($2|0) {
+ case 12: case 10: case 9:  {
+  STACKTOP = sp;return;
+  break;
+ }
+ default: {
+  $3 = $0;
+  $4 = $0;
+  $5 = (_mrb_class_get($4,68905)|0);
+  _mrb_raise($3,$5,56325);
+  // unreachable;
+ }
+ }
+}
+function _const_get($agg$result,$mrb,$base,$sym) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $base = $base|0;
+ $sym = $sym|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var $c = 0, $name = 0, $or$cond = 0, $retry = 0, $t = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 56|0;
+ $v = sp + 32|0;
+ $name = sp + 16|0;
+ $3 = sp + 8|0;
+ $4 = sp;
+ $0 = $mrb;
+ $1 = $base;
+ $2 = $sym;
+ $5 = $1;
+ $c = $5;
+ $retry = 0;
+ while(1) {
+  $6 = $c;
+  $7 = ($6|0)!=(0|0);
+  if ($7) {
+   $8 = $c;
+   $9 = ((($8)) + 12|0);
+   $10 = HEAP32[$9>>2]|0;
+   $11 = ($10|0)!=(0|0);
+   if ($11) {
+    $12 = $c;
+    $13 = ((($12)) + 12|0);
+    $14 = HEAP32[$13>>2]|0;
+    $t = $14;
+    $15 = $0;
+    $16 = $t;
+    $17 = $2;
+    $18 = (_iv_get($15,$16,$17,$v)|0);
+    $19 = ($18<<24>>24)!=(0);
+    if ($19) {
+     label = 5;
+     break;
+    }
+   }
+   $20 = $c;
+   $21 = ((($20)) + 20|0);
+   $22 = HEAP32[$21>>2]|0;
+   $c = $22;
+   continue;
+  } else {
+   $23 = $retry;
+   $24 = ($23<<24>>24)==(0);
+   $25 = $1;
+   $26 = ($25|0)!=(0|0);
+   $or$cond = $24 & $26;
+   if (!($or$cond)) {
+    label = 10;
+    break;
+   }
+   $27 = $1;
+   $28 = HEAP32[$27>>2]|0;
+   $29 = $28 & 255;
+   $30 = ($29|0)==(10);
+   if (!($30)) {
+    label = 10;
+    break;
+   }
+   $31 = $0;
+   $32 = ((($31)) + 32|0);
+   $33 = HEAP32[$32>>2]|0;
+   $c = $33;
+   $retry = 1;
+   continue;
+  }
+ }
+ if ((label|0) == 5) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ else if ((label|0) == 10) {
+  $34 = $2;
+  _mrb_symbol_value_397($3,$34);
+  ;HEAP32[$name>>2]=HEAP32[$3>>2]|0;HEAP32[$name+4>>2]=HEAP32[$3+4>>2]|0;
+  $35 = $0;
+  $36 = $1;
+  _mrb_obj_value_389($4,$36);
+  $37 = $0;
+  $38 = (_mrb_intern_static($37,65959,13)|0);
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$4+4>>2]|0;
+  _mrb_funcall_argv($agg$result,$35,$$byval_copy,$38,1,$name);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_vm_const_get($agg$result,$mrb,$sym) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, $c2 = 0, $klass = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp + 16|0;
+ $klass = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $1 = $sym;
+ $3 = $0;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ((($5)) + 16|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ((($7)) + 4|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ((($9)) + 16|0);
+ $11 = HEAP32[$10>>2]|0;
+ $c = $11;
+ $12 = $c;
+ $13 = ($12|0)!=(0|0);
+ if (!($13)) {
+  $14 = $0;
+  $15 = ((($14)) + 12|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = ((($16)) + 16|0);
+  $18 = HEAP32[$17>>2]|0;
+  $19 = ((($18)) + 44|0);
+  $20 = HEAP32[$19>>2]|0;
+  $c = $20;
+ }
+ $21 = $c;
+ $22 = ($21|0)!=(0|0);
+ L4: do {
+  if ($22) {
+   $23 = $c;
+   $24 = ((($23)) + 12|0);
+   $25 = HEAP32[$24>>2]|0;
+   $26 = ($25|0)!=(0|0);
+   if ($26) {
+    $27 = $0;
+    $28 = $c;
+    $29 = ((($28)) + 12|0);
+    $30 = HEAP32[$29>>2]|0;
+    $31 = $1;
+    $32 = (_iv_get($27,$30,$31,$v)|0);
+    $33 = $32&255;
+    $34 = ($33|0)!=(0);
+    if ($34) {
+     ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+     STACKTOP = sp;return;
+    }
+   }
+   $35 = $c;
+   $36 = HEAP32[$35>>2]|0;
+   $37 = $36 & 255;
+   $38 = ($37|0)==(12);
+   if ($38) {
+    $39 = $0;
+    $40 = $c;
+    $41 = $0;
+    $42 = (_mrb_intern_static($41,67899,12)|0);
+    _mrb_obj_iv_get($2,$39,$40,$42);
+    ;HEAP32[$klass>>2]=HEAP32[$2>>2]|0;HEAP32[$klass+4>>2]=HEAP32[$2+4>>2]|0;
+    $43 = HEAP32[$klass>>2]|0;
+    $c2 = $43;
+    $44 = $c2;
+    $45 = HEAP32[$44>>2]|0;
+    $46 = $45 & 255;
+    $47 = ($46|0)==(9);
+    if ($47) {
+     $48 = $c2;
+     $c = $48;
+    }
+   }
+   $49 = $c;
+   $c2 = $49;
+   while(1) {
+    $50 = $0;
+    $51 = $c2;
+    $52 = (_mrb_class_outer_module($50,$51)|0);
+    $c2 = $52;
+    $53 = $c2;
+    $54 = ($53|0)!=(0|0);
+    if (!($54)) {
+     break L4;
+    }
+    $55 = $c2;
+    $56 = ((($55)) + 12|0);
+    $57 = HEAP32[$56>>2]|0;
+    $58 = ($57|0)!=(0|0);
+    if (!($58)) {
+     continue;
+    }
+    $59 = $0;
+    $60 = $c2;
+    $61 = ((($60)) + 12|0);
+    $62 = HEAP32[$61>>2]|0;
+    $63 = $1;
+    $64 = (_iv_get($59,$62,$63,$v)|0);
+    $65 = $64&255;
+    $66 = ($65|0)!=(0);
+    if ($66) {
+     break;
+    }
+   }
+   ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+ } while(0);
+ $67 = $0;
+ $68 = $c;
+ $69 = $1;
+ _const_get($agg$result,$67,$68,$69);
+ STACKTOP = sp;return;
+}
+function _mrb_const_set($mrb,$mod,$sym,$v) {
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ $sym = $sym|0;
+ $v = $v|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $mod$byval_copy = 0, $mod$byval_copy1 = 0, $v$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v$byval_copy = sp + 24|0;
+ $mod$byval_copy1 = sp + 16|0;
+ $mod$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $0;
+ ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+ _mod_const_check($2,$mod$byval_copy);
+ $3 = $0;
+ $4 = $1;
+ ;HEAP32[$mod$byval_copy1>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy1+4>>2]=HEAP32[$mod+4>>2]|0;
+ ;HEAP32[$v$byval_copy>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy+4>>2]=HEAP32[$v+4>>2]|0;
+ _mrb_iv_set($3,$mod$byval_copy1,$4,$v$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_vm_const_set($mrb,$sym,$v) {
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ $v = $v|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, $c = 0, $v$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v$byval_copy = sp + 16|0;
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $0;
+ $3 = ((($2)) + 12|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ((($4)) + 16|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = ((($6)) + 4|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ((($8)) + 16|0);
+ $10 = HEAP32[$9>>2]|0;
+ $c = $10;
+ $11 = $c;
+ $12 = ($11|0)!=(0|0);
+ if (!($12)) {
+  $13 = $0;
+  $14 = ((($13)) + 12|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = ((($15)) + 16|0);
+  $17 = HEAP32[$16>>2]|0;
+  $18 = ((($17)) + 44|0);
+  $19 = HEAP32[$18>>2]|0;
+  $c = $19;
+ }
+ $20 = $0;
+ $21 = $c;
+ $22 = $1;
+ ;HEAP32[$v$byval_copy>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy+4>>2]=HEAP32[$v+4>>2]|0;
+ _mrb_obj_iv_set($20,$21,$22,$v$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_define_const($mrb,$mod,$name,$v) {
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ $name = $name|0;
+ $v = $v|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $v$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v$byval_copy = sp + 16|0;
+ $0 = $mrb;
+ $1 = $mod;
+ $2 = $name;
+ $3 = $0;
+ $4 = $1;
+ $5 = $0;
+ $6 = $2;
+ $7 = (_mrb_intern_cstr($5,$6)|0);
+ ;HEAP32[$v$byval_copy>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy+4>>2]=HEAP32[$v+4>>2]|0;
+ _mrb_obj_iv_set($3,$4,$7,$v$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_define_global_const($mrb,$name,$val) {
+ $mrb = $mrb|0;
+ $name = $name|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $val$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $name;
+ $2 = $0;
+ $3 = $0;
+ $4 = ((($3)) + 32|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $1;
+ ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+ _mrb_define_const($2,$5,$6,$val$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_mod_constants($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $$old = 0, $$old1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ary = 0, $c = 0, $inherit = 0, $or$cond = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $ary = sp + 24|0;
+ $inherit = sp + 36|0;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ HEAP8[$inherit>>0] = 1;
+ $2 = HEAP32[$mod>>2]|0;
+ $c = $2;
+ $3 = $0;
+ HEAP32[$vararg_buffer>>2] = $inherit;
+ (_mrb_get_args($3,68376,$vararg_buffer)|0);
+ $4 = $0;
+ _mrb_ary_new($1,$4);
+ ;HEAP32[$ary>>2]=HEAP32[$1>>2]|0;HEAP32[$ary+4>>2]=HEAP32[$1+4>>2]|0;
+ $$old = $c;
+ $$old1 = ($$old|0)!=(0|0);
+ L1: do {
+  if ($$old1) {
+   while(1) {
+    $5 = $c;
+    $6 = ((($5)) + 12|0);
+    $7 = HEAP32[$6>>2]|0;
+    $8 = ($7|0)!=(0|0);
+    if ($8) {
+     $9 = $0;
+     $10 = $c;
+     $11 = ((($10)) + 12|0);
+     $12 = HEAP32[$11>>2]|0;
+     (_iv_foreach($9,$12,128,$ary)|0);
+    }
+    $13 = HEAP8[$inherit>>0]|0;
+    $14 = ($13<<24>>24)!=(0);
+    if (!($14)) {
+     break L1;
+    }
+    $15 = $c;
+    $16 = ((($15)) + 20|0);
+    $17 = HEAP32[$16>>2]|0;
+    $c = $17;
+    $18 = $c;
+    $19 = $0;
+    $20 = ((($19)) + 32|0);
+    $21 = HEAP32[$20>>2]|0;
+    $22 = ($18|0)!=($21|0);
+    $23 = $c;
+    $24 = ($23|0)!=(0|0);
+    $or$cond = $22 & $24;
+    if (!($or$cond)) {
+     break;
+    }
+   }
+  }
+ } while(0);
+ ;HEAP32[$agg$result>>2]=HEAP32[$ary>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$ary+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _const_i($mrb,$sym,$v,$p) {
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ $v = $v|0;
+ $p = $p|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ary = 0, $ary$byval_copy = 0;
+ var $len = 0, $s = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 48|0;
+ $ary$byval_copy = sp + 40|0;
+ $ary = sp + 16|0;
+ $len = sp + 8|0;
+ $3 = sp;
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $p;
+ $4 = $2;
+ ;HEAP32[$ary>>2]=HEAP32[$4>>2]|0;HEAP32[$ary+4>>2]=HEAP32[$4+4>>2]|0;
+ $5 = $0;
+ $6 = $1;
+ $7 = (_mrb_sym2name_len($5,$6,$len)|0);
+ $s = $7;
+ $8 = HEAP32[$len>>2]|0;
+ $9 = ($8|0)>=(1);
+ if (!($9)) {
+  STACKTOP = sp;return 0;
+ }
+ $10 = $s;
+ $11 = HEAP8[$10>>0]|0;
+ $12 = $11 << 24 >> 24;
+ $13 = (($12) - 65)|0;
+ $14 = ($13>>>0)<(26);
+ if (!($14)) {
+  STACKTOP = sp;return 0;
+ }
+ $15 = $0;
+ $16 = $1;
+ _mrb_symbol_value_397($3,$16);
+ ;HEAP32[$ary$byval_copy>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy+4>>2]=HEAP32[$ary+4>>2]|0;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
+ _mrb_ary_push($15,$ary$byval_copy,$$byval_copy);
+ STACKTOP = sp;return 0;
+}
+function _mrb_gv_get($agg$result,$mrb,$sym) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $0;
+ $3 = ((($2)) + 24|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)!=(0|0);
+ if (!($5)) {
+  _mrb_nil_value_381($agg$result);
+  STACKTOP = sp;return;
+ }
+ $6 = $0;
+ $7 = $0;
+ $8 = ((($7)) + 24|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = $1;
+ $11 = (_iv_get($6,$9,$10,$v)|0);
+ $12 = ($11<<24>>24)!=(0);
+ if ($12) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+  STACKTOP = sp;return;
+ } else {
+  _mrb_nil_value_381($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_gv_set($mrb,$sym,$v) {
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ $v = $v|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $t = 0, $v$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v$byval_copy = sp + 16|0;
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $0;
+ $3 = ((($2)) + 24|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)!=(0|0);
+ $6 = $0;
+ if ($5) {
+  $10 = ((($6)) + 24|0);
+  $11 = HEAP32[$10>>2]|0;
+  $t = $11;
+ } else {
+  $7 = (_iv_new($6)|0);
+  $8 = $0;
+  $9 = ((($8)) + 24|0);
+  HEAP32[$9>>2] = $7;
+  $t = $7;
+ }
+ $12 = $0;
+ $13 = $t;
+ $14 = $1;
+ ;HEAP32[$v$byval_copy>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy+4>>2]=HEAP32[$v+4>>2]|0;
+ _iv_put($12,$13,$14,$v$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_f_global_variables($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, $ary = 0, $ary$byval_copy = 0, $buf = 0, $i = 0, $t = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 40|0;
+ $ary$byval_copy = sp + 32|0;
+ $ary = sp + 16|0;
+ $buf = sp + 48|0;
+ $1 = sp;
+ $0 = $mrb;
+ $2 = $0;
+ $3 = ((($2)) + 24|0);
+ $4 = HEAP32[$3>>2]|0;
+ $t = $4;
+ $5 = $0;
+ _mrb_ary_new($ary,$5);
+ $6 = $t;
+ $7 = ($6|0)!=(0|0);
+ if ($7) {
+  $8 = $0;
+  $9 = $t;
+  (_iv_foreach($8,$9,129,$ary)|0);
+ }
+ HEAP8[$buf>>0] = 36;
+ $10 = ((($buf)) + 2|0);
+ HEAP8[$10>>0] = 0;
+ $i = 1;
+ while(1) {
+  $11 = $i;
+  $12 = ($11>>>0)<=(9);
+  if (!($12)) {
+   break;
+  }
+  $13 = $i;
+  $14 = (($13) + 48)|0;
+  $15 = $14&255;
+  $16 = ((($buf)) + 1|0);
+  HEAP8[$16>>0] = $15;
+  $17 = $0;
+  $18 = $0;
+  $19 = (_mrb_intern($18,$buf,2)|0);
+  _mrb_symbol_value_397($1,$19);
+  ;HEAP32[$ary$byval_copy>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy+4>>2]=HEAP32[$ary+4>>2]|0;
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;
+  _mrb_ary_push($17,$ary$byval_copy,$$byval_copy);
+  $20 = $i;
+  $21 = (($20) + 1)|0;
+  $i = $21;
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$ary>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$ary+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _gv_i($mrb,$sym,$v,$p) {
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ $v = $v|0;
+ $p = $p|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $ary = 0, $ary$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 40|0;
+ $ary$byval_copy = sp + 32|0;
+ $ary = sp + 8|0;
+ $3 = sp;
+ $0 = $mrb;
+ $1 = $sym;
+ $2 = $p;
+ $4 = $2;
+ ;HEAP32[$ary>>2]=HEAP32[$4>>2]|0;HEAP32[$ary+4>>2]=HEAP32[$4+4>>2]|0;
+ $5 = $0;
+ $6 = $1;
+ _mrb_symbol_value_397($3,$6);
+ ;HEAP32[$ary$byval_copy>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy+4>>2]=HEAP32[$ary+4>>2]|0;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
+ _mrb_ary_push($5,$ary$byval_copy,$$byval_copy);
+ STACKTOP = sp;return 0;
+}
+function _mrb_const_defined($mrb,$mod,$id) {
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ $id = $id|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $mod$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $mod$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $id;
+ $2 = $0;
+ $3 = $1;
+ ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+ $4 = (_mrb_const_defined_0($2,$mod$byval_copy,$3,1,1)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _mrb_const_defined_0($mrb,$mod,$id,$exclude,$recurse) {
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ $id = $id|0;
+ $exclude = $exclude|0;
+ $recurse = $recurse|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, $klass = 0, $mod_retry = 0, $or$cond = 0, $tmp = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $id;
+ $3 = $exclude;
+ $4 = $recurse;
+ $5 = HEAP32[$mod>>2]|0;
+ $klass = $5;
+ $mod_retry = 0;
+ $6 = $klass;
+ $tmp = $6;
+ L1: while(1) {
+  $7 = $tmp;
+  $8 = ($7|0)!=(0|0);
+  do {
+   if ($8) {
+    $9 = $tmp;
+    $10 = ((($9)) + 12|0);
+    $11 = HEAP32[$10>>2]|0;
+    $12 = ($11|0)!=(0|0);
+    if ($12) {
+     $13 = $1;
+     $14 = $tmp;
+     $15 = ((($14)) + 12|0);
+     $16 = HEAP32[$15>>2]|0;
+     $17 = $2;
+     $18 = (_iv_get($13,$16,$17,0)|0);
+     $19 = $18&255;
+     $20 = ($19|0)!=(0);
+     if ($20) {
+      label = 5;
+      break L1;
+     }
+    }
+    $21 = $4;
+    $22 = ($21<<24>>24)!=(0);
+    if (!($22)) {
+     $23 = $klass;
+     $24 = $1;
+     $25 = ((($24)) + 32|0);
+     $26 = HEAP32[$25>>2]|0;
+     $27 = ($23|0)!=($26|0);
+     if ($27) {
+      break;
+     }
+    }
+    $28 = $tmp;
+    $29 = ((($28)) + 20|0);
+    $30 = HEAP32[$29>>2]|0;
+    $tmp = $30;
+    continue L1;
+   }
+  } while(0);
+  $31 = $3;
+  $32 = ($31<<24>>24)!=(0);
+  $33 = $mod_retry;
+  $34 = ($33<<24>>24)!=(0);
+  $or$cond = $32 | $34;
+  if ($or$cond) {
+   label = 12;
+   break;
+  }
+  $35 = $klass;
+  $36 = HEAP32[$35>>2]|0;
+  $37 = $36 & 255;
+  $38 = ($37|0)==(10);
+  if (!($38)) {
+   label = 12;
+   break;
+  }
+  $mod_retry = 1;
+  $39 = $1;
+  $40 = ((($39)) + 32|0);
+  $41 = HEAP32[$40>>2]|0;
+  $tmp = $41;
+ }
+ if ((label|0) == 5) {
+  $0 = 1;
+  $42 = $0;
+  STACKTOP = sp;return ($42|0);
+ }
+ else if ((label|0) == 12) {
+  $0 = 0;
+  $42 = $0;
+  STACKTOP = sp;return ($42|0);
+ }
+ return (0)|0;
+}
+function _mrb_const_defined_at($mrb,$mod,$id) {
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ $id = $id|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $mod$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $mod$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $id;
+ $2 = $0;
+ $3 = $1;
+ ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+ $4 = (_mrb_const_defined_0($2,$mod$byval_copy,$3,1,0)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _mrb_attr_get($agg$result,$mrb,$obj,$id) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ $id = $id|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $obj$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $id;
+ $2 = $0;
+ $3 = $1;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ _mrb_iv_get($agg$result,$2,$obj$byval_copy,$3);
+ STACKTOP = sp;return;
+}
+function _mrb_class_sym($mrb,$c,$outer) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $outer = $outer|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0;
+ var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $arg = 0, $name = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $name = sp + 16|0;
+ $4 = sp + 8|0;
+ $arg = sp;
+ $1 = $mrb;
+ $2 = $c;
+ $3 = $outer;
+ $5 = $1;
+ $6 = $2;
+ $7 = $1;
+ $8 = (_mrb_intern_static($7,64571,11)|0);
+ _mrb_obj_iv_get($4,$5,$6,$8);
+ ;HEAP32[$name>>2]=HEAP32[$4>>2]|0;HEAP32[$name+4>>2]=HEAP32[$4+4>>2]|0;
+ $9 = ((($name)) + 4|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = ($10|0)==(0);
+ if ($11) {
+  $12 = HEAP32[$name>>2]|0;
+  $13 = ($12|0)!=(0);
+  if (!($13)) {
+   $14 = $3;
+   $15 = ($14|0)!=(0|0);
+   if ($15) {
+    $16 = $2;
+    HEAP32[$arg>>2] = $16;
+    $17 = ((($arg)) + 4|0);
+    HEAP32[$17>>2] = 0;
+    $18 = $1;
+    $19 = $3;
+    $20 = ((($19)) + 12|0);
+    $21 = HEAP32[$20>>2]|0;
+    (_iv_foreach($18,$21,130,$arg)|0);
+    $22 = ((($arg)) + 4|0);
+    $23 = HEAP32[$22>>2]|0;
+    $0 = $23;
+    $25 = $0;
+    STACKTOP = sp;return ($25|0);
+   } else {
+    $0 = 0;
+    $25 = $0;
+    STACKTOP = sp;return ($25|0);
+   }
+  }
+ }
+ $24 = HEAP32[$name>>2]|0;
+ $0 = $24;
+ $25 = $0;
+ STACKTOP = sp;return ($25|0);
+}
+function _csym_i($mrb,$sym,$v,$p) {
+ $mrb = $mrb|0;
+ $sym = $sym|0;
+ $v = $v|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var $a = 0, $c = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $sym;
+ $3 = $p;
+ $4 = $3;
+ $a = $4;
+ $5 = $a;
+ $6 = HEAP32[$5>>2]|0;
+ $c = $6;
+ $7 = ((($v)) + 4|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = $c;
+ $10 = HEAP32[$9>>2]|0;
+ $11 = $10 & 255;
+ $12 = ($8|0)==($11|0);
+ if ($12) {
+  $13 = HEAP32[$v>>2]|0;
+  $14 = $c;
+  $15 = ($13|0)==($14|0);
+  if ($15) {
+   $16 = $2;
+   $17 = $a;
+   $18 = ((($17)) + 4|0);
+   HEAP32[$18>>2] = $16;
+   $0 = 1;
+   $19 = $0;
+   STACKTOP = sp;return ($19|0);
+  }
+ }
+ $0 = 0;
+ $19 = $0;
+ STACKTOP = sp;return ($19|0);
+}
+function _mrb_funcall($agg$result,$mrb,$self,$name,$argc,$varargs) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ $name = $name|0;
+ $argc = $argc|0;
+ $varargs = $varargs|0;
+ var $$field$field = 0.0, $$field3 = 0, $$index2 = 0, $$index6 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0;
+ var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ap = 0, $arglist_current = 0, $arglist_next = 0, $argv = 0, $expanded = 0, $expanded10 = 0, $expanded11 = 0, $expanded7 = 0, $expanded9 = 0;
+ var $i = 0, $mid = 0, $self$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 104|0;
+ $argv = sp + 24|0;
+ $ap = sp + 8|0;
+ $0 = $mrb;
+ $1 = $name;
+ $2 = $argc;
+ $3 = $0;
+ $4 = $1;
+ $5 = (_mrb_intern_cstr($3,$4)|0);
+ $mid = $5;
+ $6 = $2;
+ $7 = ($6|0)>(8);
+ if ($7) {
+  $8 = $0;
+  $9 = $0;
+  $10 = (_mrb_class_get($9,68855)|0);
+  _mrb_raise($8,$10,56363);
+  // unreachable;
+ }
+ HEAP32[$ap>>2] = $varargs;
+ $i = 0;
+ while(1) {
+  $11 = $i;
+  $12 = $2;
+  $13 = ($11|0)<($12|0);
+  if (!($13)) {
+   break;
+  }
+  $14 = $i;
+  $15 = (($argv) + ($14<<3)|0);
+  $arglist_current = HEAP32[$ap>>2]|0;
+  $16 = $arglist_current;
+  $17 = ((0) + 4|0);
+  $expanded7 = $17;
+  $expanded = (($expanded7) - 1)|0;
+  $18 = (($16) + ($expanded))|0;
+  $19 = ((0) + 4|0);
+  $expanded11 = $19;
+  $expanded10 = (($expanded11) - 1)|0;
+  $expanded9 = $expanded10 ^ -1;
+  $20 = $18 & $expanded9;
+  $21 = $20;
+  $$field$field = +HEAPF32[$21>>2];
+  $$index2 = ((($21)) + 4|0);
+  $$field3 = HEAP32[$$index2>>2]|0;
+  $arglist_next = ((($21)) + 8|0);
+  HEAP32[$ap>>2] = $arglist_next;
+  HEAPF32[$15>>2] = $$field$field;
+  $$index6 = ((($15)) + 4|0);
+  HEAP32[$$index6>>2] = $$field3;
+  $22 = $i;
+  $23 = (($22) + 1)|0;
+  $i = $23;
+ }
+ $24 = $0;
+ $25 = $mid;
+ $26 = $2;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _mrb_funcall_argv($agg$result,$24,$self$byval_copy,$25,$26,$argv);
+ STACKTOP = sp;return;
+}
+function _mrb_funcall_argv($agg$result,$mrb,$self,$mid,$argc,$argv) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ $mid = $mid|0;
+ $argc = $argc|0;
+ $argv = $argv|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $self$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 32|0;
+ $self$byval_copy = sp + 24|0;
+ $4 = sp;
+ $0 = $mrb;
+ $1 = $mid;
+ $2 = $argc;
+ $3 = $argv;
+ $5 = $0;
+ $6 = $1;
+ $7 = $2;
+ $8 = $3;
+ _mrb_nil_value_419($4);
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$4+4>>2]|0;
+ _mrb_funcall_with_block($agg$result,$5,$self$byval_copy,$6,$7,$8,$$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_nil_value_419($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_funcall_with_block($agg$result,$mrb,$self,$mid,$argc,$argv,$blk) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ $mid = $mid|0;
+ $argc = $argc|0;
+ $argv = $argv|0;
+ $blk = $blk|0;
+ var $$0 = 0, $$0$phi = 0, $$088 = 0, $$088$phi = 0, $$091 = 0, $$091$phi = 0, $$1 = 0, $$189 = 0, $$192 = 0, $$2 = 0, $$290 = 0, $$293 = 0, $$reg2mem86$0 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0;
+ var $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0;
+ var $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0;
+ var $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0;
+ var $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0;
+ var $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0;
+ var $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0;
+ var $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0;
+ var $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0;
+ var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0;
+ var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0;
+ var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0;
+ var $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $blk$byval_copy = 0, $c = 0, $c_jmp = 0;
+ var $cond = 0, $cond102 = 0, $cond103 = 0, $cond104 = 0, $cond105 = 0, $cond106 = 0, $cond107 = 0, $cond108 = 0, $cond109 = 0, $cond110 = 0, $cond111 = 0, $cond112 = 0, $cond113 = 0, $cond114 = 0, $cond115 = 0, $cond116 = 0, $cond117 = 0, $cond118 = 0, $cond119 = 0, $cond120 = 0;
+ var $cond121 = 0, $cond122 = 0, $cond123 = 0, $n$0 = 0, $nth_ci$0 = 0, $nth_ci$0$phi = 0, $nth_ci$1 = 0, $p$0 = 0, $self$byval_copy = 0, $self$byval_copy94 = 0, $self$byval_copy95 = 0, $self$byval_copy96 = 0, $undef$0 = 0, $val = 0, $val$byval_copy = 0, $vararg_buffer = 0, $voff$0 = 0, _setjmpTable = 0, _setjmpTableSize = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 288|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy = sp + 272|0;
+ $self$byval_copy96 = sp + 264|0;
+ $self$byval_copy95 = sp + 256|0;
+ $self$byval_copy94 = sp + 248|0;
+ $blk$byval_copy = sp + 240|0;
+ $self$byval_copy = sp + 232|0;
+ $vararg_buffer = sp;
+ _setjmpTableSize = 4;_setjmpTable = _malloc(40) | 0;HEAP32[_setjmpTable>>2]=0;
+ $val = sp + 224|0;
+ $c_jmp = sp + 64|0;
+ $0 = sp + 56|0;
+ $1 = sp + 48|0;
+ $c = sp + 40|0;
+ $2 = sp + 32|0;
+ $3 = sp + 24|0;
+ $4 = sp + 16|0;
+ $5 = sp + 8|0;
+ $6 = HEAP32[$mrb>>2]|0;
+ $7 = ($6|0)!=(0|0);
+ do {
+  if ($7) {
+   $57 = ((($mrb)) + 12|0);
+   $58 = HEAP32[$57>>2]|0;
+   $59 = ((($58)) + 4|0);
+   $60 = HEAP32[$59>>2]|0;
+   $61 = ($60|0)!=(0|0);
+   if (!($61)) {
+    __THREW__ = 0;
+    invoke_vi(134,($mrb|0));
+    $62 = __THREW__; __THREW__ = 0;
+    if ((($62|0) != 0) & ((threwValue|0) != 0)) { $63 = _testSetjmp(HEAP32[$62>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($63|0) == 0) { _longjmp($62|0, threwValue|0); } tempRet0 = (threwValue); } else { $63 = -1; };
+    $64 = tempRet0;
+    $cond106 = ($63|0)==(1);
+    if ($cond106) {
+     $$0 = $argv;$$088 = $argc;$$091 = $mid;$$reg2mem86$0 = $64;$nth_ci$0 = 0;
+     break;
+    }
+   }
+   $65 = ((($mrb)) + 12|0);
+   $66 = HEAP32[$65>>2]|0;
+   $67 = ((($66)) + 16|0);
+   $68 = HEAP32[$67>>2]|0;
+   $69 = ((($68)) + 12|0);
+   $70 = HEAP32[$69>>2]|0;
+   $71 = ($argc|0)<(0);
+   if ($71) {
+    __THREW__ = 0;
+    $72 = (invoke_iii(135,($mrb|0),(68855|0))|0);
+    $73 = __THREW__; __THREW__ = 0;
+    if ((($73|0) != 0) & ((threwValue|0) != 0)) { $74 = _testSetjmp(HEAP32[$73>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($74|0) == 0) { _longjmp($73|0, threwValue|0); } tempRet0 = (threwValue); } else { $74 = -1; };
+    $75 = tempRet0;
+    $cond122 = ($74|0)==(1);
+    if ($cond122) {
+     $$0 = $argv;$$088 = $argc;$$091 = $mid;$$reg2mem86$0 = $75;$nth_ci$0 = 0;
+     break;
+    }
+    __THREW__ = 0;
+    invoke_vii(136,($2|0),($argc|0));
+    $76 = __THREW__; __THREW__ = 0;
+    if ((($76|0) != 0) & ((threwValue|0) != 0)) { $77 = _testSetjmp(HEAP32[$76>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($77|0) == 0) { _longjmp($76|0, threwValue|0); } tempRet0 = (threwValue); } else { $77 = -1; };
+    $78 = tempRet0;
+    $cond123 = ($77|0)==(1);
+    if ($cond123) {
+     $$0 = $argv;$$088 = $argc;$$091 = $mid;$$reg2mem86$0 = $78;$nth_ci$0 = 0;
+     break;
+    }
+    __THREW__ = 0;
+    ;HEAP8[$vararg_buffer>>0]=HEAP8[$2>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$2+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$2+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$2+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$2+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$2+7>>0]|0;
+    invoke_viiii(137,($mrb|0),($72|0),(56393|0),($vararg_buffer|0));
+    $79 = __THREW__; __THREW__ = 0;
+    if ((($79|0) != 0) & ((threwValue|0) != 0)) { $80 = _testSetjmp(HEAP32[$79>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($80|0) == 0) { _longjmp($79|0, threwValue|0); } tempRet0 = (threwValue); } else { $80 = -1; };
+    $81 = tempRet0;
+    $$0 = $argv;$$088 = $argc;$$091 = $mid;$$reg2mem86$0 = $81;$nth_ci$0 = 0;
+    break;
+   }
+   __THREW__ = 0;
+   ;HEAP32[$self$byval_copy94>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy94+4>>2]=HEAP32[$self+4>>2]|0;
+   $82 = (invoke_iii(138,($mrb|0),($self$byval_copy94|0))|0);
+   $83 = __THREW__; __THREW__ = 0;
+   if ((($83|0) != 0) & ((threwValue|0) != 0)) { $84 = _testSetjmp(HEAP32[$83>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($84|0) == 0) { _longjmp($83|0, threwValue|0); } tempRet0 = (threwValue); } else { $84 = -1; };
+   $85 = tempRet0;
+   $cond107 = ($84|0)==(1);
+   if ($cond107) {
+    $$0 = $argv;$$088 = $argc;$$091 = $mid;$$reg2mem86$0 = $85;$nth_ci$0 = 0;
+   } else {
+    HEAP32[$c>>2] = $82;
+    __THREW__ = 0;
+    $86 = (invoke_iiii(139,($mrb|0),($c|0),($mid|0))|0);
+    $87 = __THREW__; __THREW__ = 0;
+    if ((($87|0) != 0) & ((threwValue|0) != 0)) { $88 = _testSetjmp(HEAP32[$87>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($88|0) == 0) { _longjmp($87|0, threwValue|0); } tempRet0 = (threwValue); } else { $88 = -1; };
+    $89 = tempRet0;
+    $cond108 = ($88|0)==(1);
+    if ($cond108) {
+     $$0 = $argv;$$088 = $argc;$$091 = $mid;$$reg2mem86$0 = $89;$nth_ci$0 = 0;
+    } else {
+     $90 = ($86|0)!=(0|0);
+     if ($90) {
+      $$189 = $argc;$$192 = $mid;$n$0 = $70;$p$0 = $86;$undef$0 = 0;
+     } else {
+      __THREW__ = 0;
+      $91 = (invoke_iiii(140,($mrb|0),(65322|0),14)|0);
+      $92 = __THREW__; __THREW__ = 0;
+      if ((($92|0) != 0) & ((threwValue|0) != 0)) { $93 = _testSetjmp(HEAP32[$92>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($93|0) == 0) { _longjmp($92|0, threwValue|0); } tempRet0 = (threwValue); } else { $93 = -1; };
+      $94 = tempRet0;
+      $cond109 = ($93|0)==(1);
+      if ($cond109) {
+       $$0 = $argv;$$088 = $argc;$$091 = $mid;$$reg2mem86$0 = $94;$nth_ci$0 = 0;
+       break;
+      }
+      __THREW__ = 0;
+      $95 = (invoke_iiii(139,($mrb|0),($c|0),($91|0))|0);
+      $96 = __THREW__; __THREW__ = 0;
+      if ((($96|0) != 0) & ((threwValue|0) != 0)) { $97 = _testSetjmp(HEAP32[$96>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($97|0) == 0) { _longjmp($96|0, threwValue|0); } tempRet0 = (threwValue); } else { $97 = -1; };
+      $98 = tempRet0;
+      $cond110 = ($97|0)==(1);
+      if ($cond110) {
+       $$0 = $argv;$$088 = $argc;$$091 = $91;$$reg2mem86$0 = $98;$nth_ci$0 = 0;
+       break;
+      }
+      $99 = (($70) + 1)|0;
+      $100 = (($argc) + 1)|0;
+      $$189 = $100;$$192 = $91;$n$0 = $99;$p$0 = $95;$undef$0 = $mid;
+     }
+     __THREW__ = 0;
+     $101 = (invoke_ii(141,($mrb|0))|0);
+     $102 = __THREW__; __THREW__ = 0;
+     if ((($102|0) != 0) & ((threwValue|0) != 0)) { $103 = _testSetjmp(HEAP32[$102>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($103|0) == 0) { _longjmp($102|0, threwValue|0); } tempRet0 = (threwValue); } else { $103 = -1; };
+     $104 = tempRet0;
+     $cond111 = ($103|0)==(1);
+     if ($cond111) {
+      $$0 = $argv;$$088 = $$189;$$091 = $$192;$$reg2mem86$0 = $104;$nth_ci$0 = 0;
+     } else {
+      HEAP32[$101>>2] = $$192;
+      $105 = ((($101)) + 4|0);
+      HEAP32[$105>>2] = $p$0;
+      $106 = ((($mrb)) + 12|0);
+      $107 = HEAP32[$106>>2]|0;
+      $108 = ((($107)) + 4|0);
+      $109 = HEAP32[$108>>2]|0;
+      $110 = ((($101)) + 8|0);
+      HEAP32[$110>>2] = $109;
+      $111 = ((($101)) + 36|0);
+      HEAP32[$111>>2] = $$189;
+      $112 = HEAP32[$c>>2]|0;
+      $113 = ((($101)) + 44|0);
+      HEAP32[$113>>2] = $112;
+      $114 = ((($mrb)) + 12|0);
+      $115 = HEAP32[$114>>2]|0;
+      $116 = ((($115)) + 4|0);
+      $117 = HEAP32[$116>>2]|0;
+      $118 = (($117) + ($n$0<<3)|0);
+      $119 = ((($mrb)) + 12|0);
+      $120 = HEAP32[$119>>2]|0;
+      $121 = ((($120)) + 4|0);
+      HEAP32[$121>>2] = $118;
+      $122 = ((($mrb)) + 12|0);
+      $123 = HEAP32[$122>>2]|0;
+      $124 = ((($123)) + 8|0);
+      $125 = HEAP32[$124>>2]|0;
+      $126 = ($125>>>0)<=($argv>>>0);
+      if ($126) {
+       $127 = ((($mrb)) + 12|0);
+       $128 = HEAP32[$127>>2]|0;
+       $129 = ((($128)) + 12|0);
+       $130 = HEAP32[$129>>2]|0;
+       $131 = ($argv>>>0)<($130>>>0);
+       if ($131) {
+        $132 = ((($mrb)) + 12|0);
+        $133 = HEAP32[$132>>2]|0;
+        $134 = ((($133)) + 8|0);
+        $135 = HEAP32[$134>>2]|0;
+        $136 = $argv;
+        $137 = $135;
+        $138 = (($136) - ($137))|0;
+        $139 = (($138|0) / 8)&-1;
+        $voff$0 = $139;
+       } else {
+        $voff$0 = -1;
+       }
+      } else {
+       $voff$0 = -1;
+      }
+      $140 = HEAP32[$p$0>>2]|0;
+      $141 = $140 >>> 11;
+      $142 = $141 & 128;
+      $143 = ($142|0)!=(0);
+      if ($143) {
+       $144 = (($$189) + 2)|0;
+       $145 = ((($101)) + 12|0);
+       HEAP32[$145>>2] = $144;
+       $146 = ((($101)) + 12|0);
+       $147 = HEAP32[$146>>2]|0;
+       __THREW__ = 0;
+       invoke_viii(142,($mrb|0),($147|0),0);
+       $148 = __THREW__; __THREW__ = 0;
+       if ((($148|0) != 0) & ((threwValue|0) != 0)) { $149 = _testSetjmp(HEAP32[$148>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($149|0) == 0) { _longjmp($148|0, threwValue|0); } tempRet0 = (threwValue); } else { $149 = -1; };
+       $150 = tempRet0;
+       $cond121 = ($149|0)==(1);
+       if ($cond121) {
+        $$0 = $argv;$$088 = $$189;$$091 = $$192;$$reg2mem86$0 = $150;$nth_ci$0 = 0;
+        break;
+       }
+      } else {
+       $151 = ((($p$0)) + 12|0);
+       $152 = HEAP32[$151>>2]|0;
+       $153 = ((($152)) + 2|0);
+       $154 = HEAP16[$153>>1]|0;
+       $155 = $154&65535;
+       $156 = (($155) + ($n$0))|0;
+       $157 = ((($101)) + 12|0);
+       HEAP32[$157>>2] = $156;
+       $158 = ((($101)) + 12|0);
+       $159 = HEAP32[$158>>2]|0;
+       $160 = (($$189) + 2)|0;
+       __THREW__ = 0;
+       invoke_viii(142,($mrb|0),($159|0),($160|0));
+       $161 = __THREW__; __THREW__ = 0;
+       if ((($161|0) != 0) & ((threwValue|0) != 0)) { $162 = _testSetjmp(HEAP32[$161>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($162|0) == 0) { _longjmp($161|0, threwValue|0); } tempRet0 = (threwValue); } else { $162 = -1; };
+       $163 = tempRet0;
+       $cond112 = ($162|0)==(1);
+       if ($cond112) {
+        $$0 = $argv;$$088 = $$189;$$091 = $$192;$$reg2mem86$0 = $163;$nth_ci$0 = 0;
+        break;
+       }
+      }
+      $164 = ($voff$0|0)>=(0);
+      if ($164) {
+       $165 = ((($mrb)) + 12|0);
+       $166 = HEAP32[$165>>2]|0;
+       $167 = ((($166)) + 8|0);
+       $168 = HEAP32[$167>>2]|0;
+       $169 = (($168) + ($voff$0<<3)|0);
+       $$1 = $169;
+      } else {
+       $$1 = $argv;
+      }
+      $170 = ((($mrb)) + 12|0);
+      $171 = HEAP32[$170>>2]|0;
+      $172 = ((($171)) + 4|0);
+      $173 = HEAP32[$172>>2]|0;
+      ;HEAP32[$173>>2]=HEAP32[$self>>2]|0;HEAP32[$173+4>>2]=HEAP32[$self+4>>2]|0;
+      $174 = ($undef$0|0)!=(0);
+      if ($174) {
+       $175 = ((($mrb)) + 12|0);
+       $176 = HEAP32[$175>>2]|0;
+       $177 = ((($176)) + 4|0);
+       $178 = HEAP32[$177>>2]|0;
+       $179 = ((($178)) + 8|0);
+       __THREW__ = 0;
+       invoke_vii(143,($3|0),($undef$0|0));
+       $180 = __THREW__; __THREW__ = 0;
+       if ((($180|0) != 0) & ((threwValue|0) != 0)) { $181 = _testSetjmp(HEAP32[$180>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($181|0) == 0) { _longjmp($180|0, threwValue|0); } tempRet0 = (threwValue); } else { $181 = -1; };
+       $182 = tempRet0;
+       $cond119 = ($181|0)==(1);
+       if ($cond119) {
+        $$0 = $$1;$$088 = $$189;$$091 = $$192;$$reg2mem86$0 = $182;$nth_ci$0 = 0;
+        break;
+       }
+       ;HEAP32[$179>>2]=HEAP32[$3>>2]|0;HEAP32[$179+4>>2]=HEAP32[$3+4>>2]|0;
+       $183 = ($$189|0)>(1);
+       if ($183) {
+        $184 = ((($mrb)) + 12|0);
+        $185 = HEAP32[$184>>2]|0;
+        $186 = ((($185)) + 4|0);
+        $187 = HEAP32[$186>>2]|0;
+        $188 = ((($187)) + 16|0);
+        $189 = (($$189) - 1)|0;
+        __THREW__ = 0;
+        invoke_viii(144,($188|0),($$1|0),($189|0));
+        $190 = __THREW__; __THREW__ = 0;
+        if ((($190|0) != 0) & ((threwValue|0) != 0)) { $191 = _testSetjmp(HEAP32[$190>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($191|0) == 0) { _longjmp($190|0, threwValue|0); } tempRet0 = (threwValue); } else { $191 = -1; };
+        $192 = tempRet0;
+        $cond120 = ($191|0)==(1);
+        if ($cond120) {
+         $$0 = $$1;$$088 = $$189;$$091 = $$192;$$reg2mem86$0 = $192;$nth_ci$0 = 0;
+         break;
+        }
+       }
+      } else {
+       $193 = ($$189|0)>(0);
+       if ($193) {
+        $194 = ((($mrb)) + 12|0);
+        $195 = HEAP32[$194>>2]|0;
+        $196 = ((($195)) + 4|0);
+        $197 = HEAP32[$196>>2]|0;
+        $198 = ((($197)) + 8|0);
+        __THREW__ = 0;
+        invoke_viii(144,($198|0),($$1|0),($$189|0));
+        $199 = __THREW__; __THREW__ = 0;
+        if ((($199|0) != 0) & ((threwValue|0) != 0)) { $200 = _testSetjmp(HEAP32[$199>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($200|0) == 0) { _longjmp($199|0, threwValue|0); } tempRet0 = (threwValue); } else { $200 = -1; };
+        $201 = tempRet0;
+        $cond118 = ($200|0)==(1);
+        if ($cond118) {
+         $$0 = $$1;$$088 = $$189;$$091 = $$192;$$reg2mem86$0 = $201;$nth_ci$0 = 0;
+         break;
+        }
+       }
+      }
+      $202 = (($$189) + 1)|0;
+      $203 = ((($mrb)) + 12|0);
+      $204 = HEAP32[$203>>2]|0;
+      $205 = ((($204)) + 4|0);
+      $206 = HEAP32[$205>>2]|0;
+      $207 = (($206) + ($202<<3)|0);
+      ;HEAP32[$207>>2]=HEAP32[$blk>>2]|0;HEAP32[$207+4>>2]=HEAP32[$blk+4>>2]|0;
+      $208 = HEAP32[$p$0>>2]|0;
+      $209 = $208 >>> 11;
+      $210 = $209 & 128;
+      $211 = ($210|0)!=(0);
+      if (!($211)) {
+       $237 = ((($101)) + 40|0);
+       HEAP32[$237>>2] = -1;
+       __THREW__ = 0;
+       ;HEAP32[$self$byval_copy96>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy96+4>>2]=HEAP32[$self+4>>2]|0;
+       invoke_viiii(147,($5|0),($mrb|0),($p$0|0),($self$byval_copy96|0));
+       $238 = __THREW__; __THREW__ = 0;
+       if ((($238|0) != 0) & ((threwValue|0) != 0)) { $239 = _testSetjmp(HEAP32[$238>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($239|0) == 0) { _longjmp($238|0, threwValue|0); } tempRet0 = (threwValue); } else { $239 = -1; };
+       $240 = tempRet0;
+       $cond113 = ($239|0)==(1);
+       if ($cond113) {
+        $$0 = $$1;$$088 = $$189;$$091 = $$192;$$reg2mem86$0 = $240;$nth_ci$0 = 0;
+        break;
+       }
+       ;HEAP32[$val>>2]=HEAP32[$5>>2]|0;HEAP32[$val+4>>2]=HEAP32[$5+4>>2]|0;
+       $$2 = $$1;$$290 = $$189;$$293 = $$192;$nth_ci$1 = 0;
+       label = 52;
+       break;
+      }
+      __THREW__ = 0;
+      $212 = (invoke_ii(145,($mrb|0))|0);
+      $213 = __THREW__; __THREW__ = 0;
+      if ((($213|0) != 0) & ((threwValue|0) != 0)) { $214 = _testSetjmp(HEAP32[$213>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($214|0) == 0) { _longjmp($213|0, threwValue|0); } tempRet0 = (threwValue); } else { $214 = -1; };
+      $215 = tempRet0;
+      $cond114 = ($214|0)==(1);
+      if ($cond114) {
+       $$0 = $$1;$$088 = $$189;$$091 = $$192;$$reg2mem86$0 = $215;$nth_ci$0 = 0;
+      } else {
+       $216 = ((($101)) + 40|0);
+       HEAP32[$216>>2] = -2;
+       $217 = ((($p$0)) + 12|0);
+       $218 = HEAP32[$217>>2]|0;
+       __THREW__ = 0;
+       ;HEAP32[$self$byval_copy95>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy95+4>>2]=HEAP32[$self+4>>2]|0;
+       invoke_viii($218|0,($4|0),($mrb|0),($self$byval_copy95|0));
+       $219 = __THREW__; __THREW__ = 0;
+       if ((($219|0) != 0) & ((threwValue|0) != 0)) { $220 = _testSetjmp(HEAP32[$219>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($220|0) == 0) { _longjmp($219|0, threwValue|0); } tempRet0 = (threwValue); } else { $220 = -1; };
+       $221 = tempRet0;
+       $cond115 = ($220|0)==(1);
+       if ($cond115) {
+        $$0 = $$1;$$088 = $$189;$$091 = $$192;$$reg2mem86$0 = $221;$nth_ci$0 = 0;
+       } else {
+        ;HEAP32[$val>>2]=HEAP32[$4>>2]|0;HEAP32[$val+4>>2]=HEAP32[$4+4>>2]|0;
+        $222 = ((($mrb)) + 12|0);
+        $223 = HEAP32[$222>>2]|0;
+        $224 = ((($223)) + 16|0);
+        $225 = HEAP32[$224>>2]|0;
+        $226 = ((($225)) + 8|0);
+        $227 = HEAP32[$226>>2]|0;
+        $228 = ((($mrb)) + 12|0);
+        $229 = HEAP32[$228>>2]|0;
+        $230 = ((($229)) + 4|0);
+        HEAP32[$230>>2] = $227;
+        __THREW__ = 0;
+        invoke_vi(132,($mrb|0));
+        $231 = __THREW__; __THREW__ = 0;
+        if ((($231|0) != 0) & ((threwValue|0) != 0)) { $232 = _testSetjmp(HEAP32[$231>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($232|0) == 0) { _longjmp($231|0, threwValue|0); } tempRet0 = (threwValue); } else { $232 = -1; };
+        $233 = tempRet0;
+        $cond116 = ($232|0)==(1);
+        if ($cond116) {
+         $$0 = $$1;$$088 = $$189;$$091 = $$192;$$reg2mem86$0 = $233;$nth_ci$0 = 0;
+        } else {
+         __THREW__ = 0;
+         invoke_vii(146,($mrb|0),($212|0));
+         $234 = __THREW__; __THREW__ = 0;
+         if ((($234|0) != 0) & ((threwValue|0) != 0)) { $235 = _testSetjmp(HEAP32[$234>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($235|0) == 0) { _longjmp($234|0, threwValue|0); } tempRet0 = (threwValue); } else { $235 = -1; };
+         $236 = tempRet0;
+         $cond117 = ($235|0)==(1);
+         if ($cond117) {
+          $$0 = $$1;$$088 = $$189;$$091 = $$192;$$reg2mem86$0 = $236;$nth_ci$0 = 0;
+         } else {
+          $$2 = $$1;$$290 = $$189;$$293 = $$192;$nth_ci$1 = 0;
+          label = 52;
+         }
+        }
+       }
+      }
+     }
+    }
+   }
+  } else {
+   $8 = ((($mrb)) + 12|0);
+   $9 = HEAP32[$8>>2]|0;
+   $10 = ((($9)) + 16|0);
+   $11 = HEAP32[$10>>2]|0;
+   $12 = ((($mrb)) + 12|0);
+   $13 = HEAP32[$12>>2]|0;
+   $14 = ((($13)) + 20|0);
+   $15 = HEAP32[$14>>2]|0;
+   $16 = $11;
+   $17 = $15;
+   $18 = (($16) - ($17))|0;
+   $19 = (($18|0) / 48)&-1;
+   _setjmpTable = _saveSetjmp($c_jmp,1,_setjmpTable|0,_setjmpTableSize|0)|0;_setjmpTableSize = tempRet0;
+   __THREW__ = 0;
+   $20 = __THREW__; __THREW__ = 0;
+   if ((($20|0) != 0) & ((threwValue|0) != 0)) { $21 = _testSetjmp(HEAP32[$20>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($21|0) == 0) { _longjmp($20|0, threwValue|0); } tempRet0 = (threwValue); } else { $21 = -1; };
+   $22 = tempRet0;
+   $cond = ($21|0)==(1);
+   if ($cond) {
+    $$0 = $argv;$$088 = $argc;$$091 = $mid;$$reg2mem86$0 = $22;$nth_ci$0 = $19;
+   } else {
+    $$0 = $argv;$$088 = $argc;$$091 = $mid;$$reg2mem86$0 = 0;$nth_ci$0 = $19;
+   }
+  }
+ } while(0);
+ L52: while(1) {
+  if ((label|0) == 52) {
+   label = 0;
+   __THREW__ = 0;
+   ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+   invoke_vii(148,($mrb|0),($val$byval_copy|0));
+   $241 = __THREW__; __THREW__ = 0;
+   if ((($241|0) != 0) & ((threwValue|0) != 0)) { $242 = _testSetjmp(HEAP32[$241>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($242|0) == 0) { _longjmp($241|0, threwValue|0); } tempRet0 = (threwValue); } else { $242 = -1; };
+   $243 = tempRet0;
+   $cond103 = ($242|0)==(1);
+   if ($cond103) {
+    $$0 = $$2;$$088 = $$290;$$091 = $$293;$$reg2mem86$0 = $243;$nth_ci$0 = $nth_ci$1;
+   } else {
+    break;
+   }
+  }
+  $23 = ($$reg2mem86$0|0)==(0);
+  if ($23) {
+   HEAP32[$mrb>>2] = $c_jmp;
+   __THREW__ = 0;
+   ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+   ;HEAP32[$blk$byval_copy>>2]=HEAP32[$blk>>2]|0;HEAP32[$blk$byval_copy+4>>2]=HEAP32[$blk+4>>2]|0;
+   invoke_viiiiiii(131,($0|0),($mrb|0),($self$byval_copy|0),($$091|0),($$088|0),($$0|0),($blk$byval_copy|0));
+   $24 = __THREW__; __THREW__ = 0;
+   if ((($24|0) != 0) & ((threwValue|0) != 0)) { $25 = _testSetjmp(HEAP32[$24>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($25|0) == 0) { _longjmp($24|0, threwValue|0); } tempRet0 = (threwValue); } else { $25 = -1; };
+   $26 = tempRet0;
+   $cond105 = ($25|0)==(1);
+   if ($cond105) {
+    $nth_ci$0$phi = $nth_ci$0;$$091$phi = $$091;$$088$phi = $$088;$$0$phi = $$0;$$reg2mem86$0 = $26;$nth_ci$0 = $nth_ci$0$phi;$$091 = $$091$phi;$$088 = $$088$phi;$$0 = $$0$phi;
+    continue;
+   }
+   ;HEAP32[$val>>2]=HEAP32[$0>>2]|0;HEAP32[$val+4>>2]=HEAP32[$0+4>>2]|0;
+   HEAP32[$mrb>>2] = 0;
+   $$2 = $$0;$$290 = $$088;$$293 = $$091;$nth_ci$1 = $nth_ci$0;
+   label = 52;
+   continue;
+  }
+  while(1) {
+   $27 = ((($mrb)) + 12|0);
+   $28 = HEAP32[$27>>2]|0;
+   $29 = ((($28)) + 16|0);
+   $30 = HEAP32[$29>>2]|0;
+   $31 = ((($mrb)) + 12|0);
+   $32 = HEAP32[$31>>2]|0;
+   $33 = ((($32)) + 20|0);
+   $34 = HEAP32[$33>>2]|0;
+   $35 = $30;
+   $36 = $34;
+   $37 = (($35) - ($36))|0;
+   $38 = (($37|0) / 48)&-1;
+   $39 = ($nth_ci$0|0)<($38|0);
+   if (!($39)) {
+    break;
+   }
+   $40 = ((($mrb)) + 12|0);
+   $41 = HEAP32[$40>>2]|0;
+   $42 = ((($41)) + 16|0);
+   $43 = HEAP32[$42>>2]|0;
+   $44 = ((($43)) + 8|0);
+   $45 = HEAP32[$44>>2]|0;
+   $46 = ((($mrb)) + 12|0);
+   $47 = HEAP32[$46>>2]|0;
+   $48 = ((($47)) + 4|0);
+   HEAP32[$48>>2] = $45;
+   __THREW__ = 0;
+   invoke_vi(132,($mrb|0));
+   $49 = __THREW__; __THREW__ = 0;
+   if ((($49|0) != 0) & ((threwValue|0) != 0)) { $50 = _testSetjmp(HEAP32[$49>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($50|0) == 0) { _longjmp($49|0, threwValue|0); } tempRet0 = (threwValue); } else { $50 = -1; };
+   $51 = tempRet0;
+   $cond104 = ($50|0)==(1);
+   if ($cond104) {
+    $nth_ci$0$phi = $nth_ci$0;$$091$phi = $$091;$$088$phi = $$088;$$0$phi = $$0;$$reg2mem86$0 = $51;$nth_ci$0 = $nth_ci$0$phi;$$091 = $$091$phi;$$088 = $$088$phi;$$0 = $$0$phi;
+    continue L52;
+   }
+  }
+  HEAP32[$mrb>>2] = 0;
+  $52 = ((($mrb)) + 20|0);
+  $53 = HEAP32[$52>>2]|0;
+  __THREW__ = 0;
+  invoke_vii(133,($1|0),($53|0));
+  $54 = __THREW__; __THREW__ = 0;
+  if ((($54|0) != 0) & ((threwValue|0) != 0)) { $55 = _testSetjmp(HEAP32[$54>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($55|0) == 0) { _longjmp($54|0, threwValue|0); } tempRet0 = (threwValue); } else { $55 = -1; };
+  $56 = tempRet0;
+  $cond102 = ($55|0)==(1);
+  if ($cond102) {
+   $nth_ci$0$phi = $nth_ci$0;$$091$phi = $$091;$$088$phi = $$088;$$0$phi = $$0;$$reg2mem86$0 = $56;$nth_ci$0 = $nth_ci$0$phi;$$091 = $$091$phi;$$088 = $$088$phi;$$0 = $$0$phi;
+   continue;
+  }
+  ;HEAP32[$val>>2]=HEAP32[$1>>2]|0;HEAP32[$val+4>>2]=HEAP32[$1+4>>2]|0;
+  $$2 = $$0;$$290 = $$088;$$293 = $$091;$nth_ci$1 = $nth_ci$0;
+  label = 52;
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$val>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$val+4>>2]|0;
+ _free(_setjmpTable|0);
+ STACKTOP = sp;return;
+}
+function _cipop($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var $c = 0, $e = 0, $len = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = ((($1)) + 12|0);
+ $3 = HEAP32[$2>>2]|0;
+ $c = $3;
+ $4 = $c;
+ $5 = ((($4)) + 16|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = ((($6)) + 24|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ($8|0)!=(0|0);
+ if (!($9)) {
+  $36 = $c;
+  $37 = ((($36)) + 16|0);
+  $38 = HEAP32[$37>>2]|0;
+  $39 = ((($38)) + -48|0);
+  HEAP32[$37>>2] = $39;
+  STACKTOP = sp;return;
+ }
+ $10 = $c;
+ $11 = ((($10)) + 16|0);
+ $12 = HEAP32[$11>>2]|0;
+ $13 = ((($12)) + 24|0);
+ $14 = HEAP32[$13>>2]|0;
+ $e = $14;
+ $15 = $e;
+ $16 = HEAP32[$15>>2]|0;
+ $17 = $16 >>> 11;
+ $len = $17;
+ $18 = $0;
+ $19 = $len;
+ $20 = $19<<3;
+ $21 = (_mrb_malloc($18,$20)|0);
+ $p = $21;
+ $22 = $e;
+ $23 = ((($22)) + 20|0);
+ HEAP32[$23>>2] = -1;
+ $24 = $len;
+ $25 = ($24>>>0)>(0);
+ if ($25) {
+  $26 = $p;
+  $27 = $e;
+  $28 = ((($27)) + 12|0);
+  $29 = HEAP32[$28>>2]|0;
+  $30 = $len;
+  _stack_copy($26,$29,$30);
+ }
+ $31 = $p;
+ $32 = $e;
+ $33 = ((($32)) + 12|0);
+ HEAP32[$33>>2] = $31;
+ $34 = $0;
+ $35 = $e;
+ _mrb_write_barrier($34,$35);
+ $36 = $c;
+ $37 = ((($36)) + 16|0);
+ $38 = HEAP32[$37>>2]|0;
+ $39 = ((($38)) + -48|0);
+ HEAP32[$37>>2] = $39;
+ STACKTOP = sp;return;
+}
+function _stack_copy($dst,$src,$size) {
+ $dst = $dst|0;
+ $src = $src|0;
+ $size = $size|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $dst;
+ $1 = $src;
+ $2 = $size;
+ while(1) {
+  $3 = $2;
+  $4 = (($3) + -1)|0;
+  $2 = $4;
+  $5 = ($3>>>0)>(0);
+  if (!($5)) {
+   break;
+  }
+  $6 = $0;
+  $7 = ((($6)) + 8|0);
+  $0 = $7;
+  $8 = $1;
+  $9 = ((($8)) + 8|0);
+  $1 = $9;
+  ;HEAP32[$6>>2]=HEAP32[$8>>2]|0;HEAP32[$6+4>>2]=HEAP32[$8+4>>2]|0;
+ }
+ STACKTOP = sp;return;
+}
+function _mrb_obj_value_420($agg$result,$p) {
+ $agg$result = $agg$result|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $p;
+ $1 = $0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 & 255;
+ $4 = ((($v)) + 4|0);
+ HEAP32[$4>>2] = $3;
+ $5 = $0;
+ HEAP32[$v>>2] = $5;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _stack_init($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = ((($1)) + 12|0);
+ $3 = HEAP32[$2>>2]|0;
+ $c = $3;
+ $4 = $0;
+ $5 = (_mrb_calloc($4,128,8)|0);
+ $6 = $c;
+ $7 = ((($6)) + 8|0);
+ HEAP32[$7>>2] = $5;
+ $8 = $c;
+ $9 = ((($8)) + 8|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = ((($10)) + 1024|0);
+ $12 = $c;
+ $13 = ((($12)) + 12|0);
+ HEAP32[$13>>2] = $11;
+ $14 = $c;
+ $15 = ((($14)) + 8|0);
+ $16 = HEAP32[$15>>2]|0;
+ $17 = $c;
+ $18 = ((($17)) + 4|0);
+ HEAP32[$18>>2] = $16;
+ $19 = $0;
+ $20 = (_mrb_calloc($19,32,48)|0);
+ $21 = $c;
+ $22 = ((($21)) + 20|0);
+ HEAP32[$22>>2] = $20;
+ $23 = $c;
+ $24 = ((($23)) + 20|0);
+ $25 = HEAP32[$24>>2]|0;
+ $26 = ((($25)) + 1536|0);
+ $27 = $c;
+ $28 = ((($27)) + 24|0);
+ HEAP32[$28>>2] = $26;
+ $29 = $c;
+ $30 = ((($29)) + 20|0);
+ $31 = HEAP32[$30>>2]|0;
+ $32 = $c;
+ $33 = ((($32)) + 16|0);
+ HEAP32[$33>>2] = $31;
+ $34 = $0;
+ $35 = ((($34)) + 32|0);
+ $36 = HEAP32[$35>>2]|0;
+ $37 = $c;
+ $38 = ((($37)) + 16|0);
+ $39 = HEAP32[$38>>2]|0;
+ $40 = ((($39)) + 44|0);
+ HEAP32[$40>>2] = $36;
+ $41 = $c;
+ $42 = ((($41)) + 4|0);
+ $43 = HEAP32[$42>>2]|0;
+ $44 = $c;
+ $45 = ((($44)) + 16|0);
+ $46 = HEAP32[$45>>2]|0;
+ $47 = ((($46)) + 8|0);
+ HEAP32[$47>>2] = $43;
+ STACKTOP = sp;return;
+}
+function _mrb_fixnum_value_421($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 3;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_class_423($mrb,$v) {
+ $mrb = $mrb|0;
+ $v = $v|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = ((($v)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ L1: do {
+  switch ($3|0) {
+  case 0:  {
+   $4 = HEAP32[$v>>2]|0;
+   $5 = ($4|0)!=(0);
+   $6 = $1;
+   if ($5) {
+    $7 = ((($6)) + 72|0);
+    $8 = HEAP32[$7>>2]|0;
+    $0 = $8;
+    break L1;
+   } else {
+    $9 = ((($6)) + 76|0);
+    $10 = HEAP32[$9>>2]|0;
+    $0 = $10;
+    break L1;
+   }
+   break;
+  }
+  case 2:  {
+   $11 = $1;
+   $12 = ((($11)) + 68|0);
+   $13 = HEAP32[$12>>2]|0;
+   $0 = $13;
+   break;
+  }
+  case 4:  {
+   $14 = $1;
+   $15 = ((($14)) + 80|0);
+   $16 = HEAP32[$15>>2]|0;
+   $0 = $16;
+   break;
+  }
+  case 3:  {
+   $17 = $1;
+   $18 = ((($17)) + 64|0);
+   $19 = HEAP32[$18>>2]|0;
+   $0 = $19;
+   break;
+  }
+  case 6:  {
+   $20 = $1;
+   $21 = ((($20)) + 60|0);
+   $22 = HEAP32[$21>>2]|0;
+   $0 = $22;
+   break;
+  }
+  case 7:  {
+   $23 = $1;
+   $24 = ((($23)) + 32|0);
+   $25 = HEAP32[$24>>2]|0;
+   $0 = $25;
+   break;
+  }
+  case 20:  {
+   $0 = 0;
+   break;
+  }
+  default: {
+   $26 = HEAP32[$v>>2]|0;
+   $27 = ((($26)) + 4|0);
+   $28 = HEAP32[$27>>2]|0;
+   $0 = $28;
+  }
+  }
+ } while(0);
+ $29 = $0;
+ STACKTOP = sp;return ($29|0);
+}
+function _cipush($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $8 = 0, $9 = 0, $c = 0, $ci = 0, $eidx = 0, $ridx = 0, $size = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = ((($1)) + 12|0);
+ $3 = HEAP32[$2>>2]|0;
+ $c = $3;
+ $4 = $c;
+ $5 = ((($4)) + 16|0);
+ $6 = HEAP32[$5>>2]|0;
+ $ci = $6;
+ $7 = $ci;
+ $8 = ((($7)) + 20|0);
+ $9 = HEAP32[$8>>2]|0;
+ $eidx = $9;
+ $10 = $ci;
+ $11 = ((($10)) + 16|0);
+ $12 = HEAP32[$11>>2]|0;
+ $ridx = $12;
+ $13 = $ci;
+ $14 = ((($13)) + 48|0);
+ $15 = $c;
+ $16 = ((($15)) + 24|0);
+ $17 = HEAP32[$16>>2]|0;
+ $18 = ($14|0)==($17|0);
+ if ($18) {
+  $19 = $ci;
+  $20 = $c;
+  $21 = ((($20)) + 20|0);
+  $22 = HEAP32[$21>>2]|0;
+  $23 = $19;
+  $24 = $22;
+  $25 = (($23) - ($24))|0;
+  $26 = (($25|0) / 48)&-1;
+  $size = $26;
+  $27 = $0;
+  $28 = $c;
+  $29 = ((($28)) + 20|0);
+  $30 = HEAP32[$29>>2]|0;
+  $31 = $size;
+  $32 = ($31*48)|0;
+  $33 = $32<<1;
+  $34 = (_mrb_realloc($27,$30,$33)|0);
+  $35 = $c;
+  $36 = ((($35)) + 20|0);
+  HEAP32[$36>>2] = $34;
+  $37 = $c;
+  $38 = ((($37)) + 20|0);
+  $39 = HEAP32[$38>>2]|0;
+  $40 = $size;
+  $41 = (($39) + (($40*48)|0)|0);
+  $42 = $c;
+  $43 = ((($42)) + 16|0);
+  HEAP32[$43>>2] = $41;
+  $44 = $c;
+  $45 = ((($44)) + 20|0);
+  $46 = HEAP32[$45>>2]|0;
+  $47 = $size;
+  $48 = $47<<1;
+  $49 = (($46) + (($48*48)|0)|0);
+  $50 = $c;
+  $51 = ((($50)) + 24|0);
+  HEAP32[$51>>2] = $49;
+ }
+ $52 = $c;
+ $53 = ((($52)) + 16|0);
+ $54 = HEAP32[$53>>2]|0;
+ $55 = ((($54)) + 48|0);
+ HEAP32[$53>>2] = $55;
+ $ci = $55;
+ $56 = $eidx;
+ $57 = $ci;
+ $58 = ((($57)) + 20|0);
+ HEAP32[$58>>2] = $56;
+ $59 = $ridx;
+ $60 = $ci;
+ $61 = ((($60)) + 16|0);
+ HEAP32[$61>>2] = $59;
+ $62 = $ci;
+ $63 = ((($62)) + 24|0);
+ HEAP32[$63>>2] = 0;
+ $64 = $ci;
+ $65 = ((($64)) + 28|0);
+ HEAP32[$65>>2] = 0;
+ $66 = $ci;
+ $67 = ((($66)) + 32|0);
+ HEAP32[$67>>2] = 0;
+ $68 = $ci;
+ $69 = ((($68)) + 4|0);
+ HEAP32[$69>>2] = 0;
+ $70 = $ci;
+ STACKTOP = sp;return ($70|0);
+}
+function _stack_extend($mrb,$room,$keep) {
+ $mrb = $mrb|0;
+ $room = $room|0;
+ $keep = $keep|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $room;
+ $2 = $keep;
+ $3 = $0;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ((($5)) + 4|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $1;
+ $9 = (($7) + ($8<<3)|0);
+ $10 = $0;
+ $11 = ((($10)) + 12|0);
+ $12 = HEAP32[$11>>2]|0;
+ $13 = ((($12)) + 12|0);
+ $14 = HEAP32[$13>>2]|0;
+ $15 = ($9>>>0)>=($14>>>0);
+ if (!($15)) {
+  $19 = $0;
+  $20 = $1;
+  $21 = $2;
+  _init_new_stack_space($19,$20,$21);
+  STACKTOP = sp;return;
+ }
+ $16 = $0;
+ $17 = $1;
+ $18 = $2;
+ _stack_extend_alloc($16,$17,$18);
+ $19 = $0;
+ $20 = $1;
+ $21 = $2;
+ _init_new_stack_space($19,$20,$21);
+ STACKTOP = sp;return;
+}
+function _stack_extend_alloc($mrb,$room,$keep) {
+ $mrb = $mrb|0;
+ $room = $room|0;
+ $keep = $keep|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
+ var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $off = 0, $oldbase = 0, $size = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $room;
+ $2 = $keep;
+ $3 = $0;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ((($5)) + 8|0);
+ $7 = HEAP32[$6>>2]|0;
+ $oldbase = $7;
+ $8 = $0;
+ $9 = ((($8)) + 12|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = ((($10)) + 12|0);
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $0;
+ $14 = ((($13)) + 12|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = ((($15)) + 8|0);
+ $17 = HEAP32[$16>>2]|0;
+ $18 = $12;
+ $19 = $17;
+ $20 = (($18) - ($19))|0;
+ $21 = (($20|0) / 8)&-1;
+ $size = $21;
+ $22 = $0;
+ $23 = ((($22)) + 12|0);
+ $24 = HEAP32[$23>>2]|0;
+ $25 = ((($24)) + 4|0);
+ $26 = HEAP32[$25>>2]|0;
+ $27 = $0;
+ $28 = ((($27)) + 12|0);
+ $29 = HEAP32[$28>>2]|0;
+ $30 = ((($29)) + 8|0);
+ $31 = HEAP32[$30>>2]|0;
+ $32 = $26;
+ $33 = $31;
+ $34 = (($32) - ($33))|0;
+ $35 = (($34|0) / 8)&-1;
+ $off = $35;
+ $36 = $1;
+ $37 = ($36|0)<=(128);
+ if ($37) {
+  $38 = $size;
+  $39 = (($38) + 128)|0;
+  $size = $39;
+ } else {
+  $40 = $1;
+  $41 = $size;
+  $42 = (($41) + ($40))|0;
+  $size = $42;
+ }
+ $43 = $0;
+ $44 = $0;
+ $45 = ((($44)) + 12|0);
+ $46 = HEAP32[$45>>2]|0;
+ $47 = ((($46)) + 8|0);
+ $48 = HEAP32[$47>>2]|0;
+ $49 = $size;
+ $50 = $49<<3;
+ $51 = (_mrb_realloc($43,$48,$50)|0);
+ $52 = $0;
+ $53 = ((($52)) + 12|0);
+ $54 = HEAP32[$53>>2]|0;
+ $55 = ((($54)) + 8|0);
+ HEAP32[$55>>2] = $51;
+ $56 = $0;
+ $57 = ((($56)) + 12|0);
+ $58 = HEAP32[$57>>2]|0;
+ $59 = ((($58)) + 8|0);
+ $60 = HEAP32[$59>>2]|0;
+ $61 = $off;
+ $62 = (($60) + ($61<<3)|0);
+ $63 = $0;
+ $64 = ((($63)) + 12|0);
+ $65 = HEAP32[$64>>2]|0;
+ $66 = ((($65)) + 4|0);
+ HEAP32[$66>>2] = $62;
+ $67 = $0;
+ $68 = ((($67)) + 12|0);
+ $69 = HEAP32[$68>>2]|0;
+ $70 = ((($69)) + 8|0);
+ $71 = HEAP32[$70>>2]|0;
+ $72 = $size;
+ $73 = (($71) + ($72<<3)|0);
+ $74 = $0;
+ $75 = ((($74)) + 12|0);
+ $76 = HEAP32[$75>>2]|0;
+ $77 = ((($76)) + 12|0);
+ HEAP32[$77>>2] = $73;
+ $78 = $0;
+ $79 = $oldbase;
+ $80 = $0;
+ $81 = ((($80)) + 12|0);
+ $82 = HEAP32[$81>>2]|0;
+ $83 = ((($82)) + 8|0);
+ $84 = HEAP32[$83>>2]|0;
+ _envadjust($78,$79,$84);
+ $85 = $size;
+ $86 = ($85|0)>(262016);
+ if ($86) {
+  $87 = $0;
+  $88 = $1;
+  $89 = $2;
+  _init_new_stack_space($87,$88,$89);
+  $90 = $0;
+  $91 = $0;
+  $92 = (_mrb_class_get($91,67771)|0);
+  _mrb_raise($90,$92,56424);
+  // unreachable;
+ } else {
+  STACKTOP = sp;return;
+ }
+}
+function _envadjust($mrb,$oldbase,$newbase) {
+ $mrb = $mrb|0;
+ $oldbase = $oldbase|0;
+ $newbase = $newbase|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ci = 0, $e = 0, $off = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $oldbase;
+ $2 = $newbase;
+ $3 = $0;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ((($5)) + 20|0);
+ $7 = HEAP32[$6>>2]|0;
+ $ci = $7;
+ $8 = $2;
+ $9 = $1;
+ $10 = ($8|0)==($9|0);
+ if ($10) {
+  STACKTOP = sp;return;
+ }
+ while(1) {
+  $11 = $ci;
+  $12 = $0;
+  $13 = ((($12)) + 12|0);
+  $14 = HEAP32[$13>>2]|0;
+  $15 = ((($14)) + 16|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = ($11>>>0)<=($16>>>0);
+  if (!($17)) {
+   break;
+  }
+  $18 = $ci;
+  $19 = ((($18)) + 24|0);
+  $20 = HEAP32[$19>>2]|0;
+  $e = $20;
+  $21 = $e;
+  $22 = ($21|0)!=(0|0);
+  if ($22) {
+   $23 = $e;
+   $24 = ((($23)) + 20|0);
+   $25 = HEAP32[$24>>2]|0;
+   $26 = ($25|0)>=(0);
+   if ($26) {
+    $27 = $e;
+    $28 = ((($27)) + 12|0);
+    $29 = HEAP32[$28>>2]|0;
+    $30 = $1;
+    $31 = $29;
+    $32 = $30;
+    $33 = (($31) - ($32))|0;
+    $34 = (($33|0) / 8)&-1;
+    $off = $34;
+    $35 = $2;
+    $36 = $off;
+    $37 = (($35) + ($36<<3)|0);
+    $38 = $e;
+    $39 = ((($38)) + 12|0);
+    HEAP32[$39>>2] = $37;
+   }
+  }
+  $40 = $2;
+  $41 = $ci;
+  $42 = ((($41)) + 8|0);
+  $43 = HEAP32[$42>>2]|0;
+  $44 = $1;
+  $45 = $43;
+  $46 = $44;
+  $47 = (($45) - ($46))|0;
+  $48 = (($47|0) / 8)&-1;
+  $49 = (($40) + ($48<<3)|0);
+  $50 = $ci;
+  $51 = ((($50)) + 8|0);
+  HEAP32[$51>>2] = $49;
+  $52 = $ci;
+  $53 = ((($52)) + 48|0);
+  $ci = $53;
+ }
+ STACKTOP = sp;return;
+}
+function _init_new_stack_space($mrb,$room,$keep) {
+ $mrb = $mrb|0;
+ $room = $room|0;
+ $keep = $keep|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $room;
+ $2 = $keep;
+ $3 = $1;
+ $4 = $2;
+ $5 = ($3|0)>($4|0);
+ if (!($5)) {
+  STACKTOP = sp;return;
+ }
+ $6 = $2;
+ $7 = $0;
+ $8 = ((($7)) + 12|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ((($9)) + 4|0);
+ $11 = HEAP32[$10>>2]|0;
+ $12 = (($11) + ($6<<3)|0);
+ $13 = $1;
+ $14 = $2;
+ $15 = (($13) - ($14))|0;
+ _stack_clear($12,$15);
+ STACKTOP = sp;return;
+}
+function _stack_clear($from,$count) {
+ $from = $from|0;
+ $count = $count|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $from;
+ $1 = $count;
+ while(1) {
+  $2 = $1;
+  $3 = (($2) + -1)|0;
+  $1 = $3;
+  $4 = ($2>>>0)>(0);
+  if (!($4)) {
+   break;
+  }
+  $5 = $0;
+  $6 = ((($5)) + 8|0);
+  $0 = $6;
+  ;HEAP32[$5>>2]=HEAP32[73152>>2]|0;HEAP32[$5+4>>2]=HEAP32[73152+4>>2]|0;
+ }
+ STACKTOP = sp;return;
+}
+function _mrb_symbol_value_427($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 4;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_run($agg$result,$mrb,$proc,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $proc = $proc|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $self$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $proc;
+ $2 = $0;
+ $3 = $1;
+ $4 = $0;
+ $5 = ((($4)) + 12|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = ((($6)) + 16|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ((($8)) + 36|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = (($10) + 2)|0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _mrb_context_run($agg$result,$2,$3,$self$byval_copy,$11);
+ STACKTOP = sp;return;
+}
+function _mrb_context_run($agg$result,$mrb,$proc,$self,$stack_keep) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $proc = $proc|0;
+ $self = $self|0;
+ $stack_keep = $stack_keep|0;
+ var $$0 = 0, $$1 = 0, $$1$phi = 0, $$2 = 0, $$3 = 0, $$4 = 0, $$5 = 0, $$5$phi = 0, $$6 = 0, $$7 = 0, $$8 = 0, $$8$phi = 0, $$byval_copy = 0, $$byval_copy903 = 0, $$byval_copy904 = 0, $$byval_copy905 = 0, $$byval_copy906 = 0, $$byval_copy907 = 0, $$byval_copy908 = 0, $$byval_copy909 = 0;
+ var $$byval_copy911 = 0, $$byval_copy913 = 0, $$byval_copy914 = 0, $$byval_copy915 = 0, $$byval_copy916 = 0, $$byval_copy917 = 0, $$byval_copy918 = 0, $$byval_copy919 = 0, $$byval_copy920 = 0, $$byval_copy921 = 0, $$byval_copy922 = 0, $$byval_copy923 = 0, $$byval_copy925 = 0, $$byval_copy926 = 0, $$byval_copy927 = 0, $$byval_copy928 = 0, $$byval_copy929 = 0, $$byval_copy930 = 0, $$byval_copy931 = 0, $$byval_copy932 = 0;
+ var $$byval_copy933 = 0, $$byval_copy934 = 0, $$byval_copy935 = 0, $$byval_copy936 = 0, $$byval_copy937 = 0, $$byval_copy938 = 0, $$byval_copy939 = 0, $$byval_copy940 = 0, $$byval_copy941 = 0, $$byval_copy942 = 0, $$byval_copy943 = 0, $$byval_copy944 = 0, $$byval_copy945 = 0, $$byval_copy946 = 0, $$byval_copy947 = 0, $$reg2mem887$0 = 0, $$reg2mem889$0 = 0, $$reg2mem891$0 = 0, $$reg2mem893$0 = 0, $$reg2mem895$0 = 0;
+ var $$reg2mem897$0 = 0, $$reg2mem899$0 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0;
+ var $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0;
+ var $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0;
+ var $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0;
+ var $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0;
+ var $1086 = 0, $1087 = 0, $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0;
+ var $1103 = 0, $1104 = 0, $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $1119 = 0, $112 = 0, $1120 = 0;
+ var $1121 = 0, $1122 = 0, $1123 = 0, $1124 = 0, $1125 = 0, $1126 = 0, $1127 = 0, $1128 = 0, $1129 = 0, $113 = 0, $1130 = 0, $1131 = 0, $1132 = 0, $1133 = 0, $1134 = 0, $1135 = 0, $1136 = 0, $1137 = 0, $1138 = 0, $1139 = 0;
+ var $114 = 0, $1140 = 0, $1141 = 0, $1142 = 0, $1143 = 0, $1144 = 0, $1145 = 0, $1146 = 0, $1147 = 0, $1148 = 0, $1149 = 0, $115 = 0, $1150 = 0, $1151 = 0, $1152 = 0, $1153 = 0, $1154 = 0, $1155 = 0, $1156 = 0, $1157 = 0;
+ var $1158 = 0, $1159 = 0, $116 = 0, $1160 = 0, $1161 = 0, $1162 = 0, $1163 = 0, $1164 = 0, $1165 = 0, $1166 = 0, $1167 = 0, $1168 = 0, $1169 = 0, $117 = 0, $1170 = 0, $1171 = 0, $1172 = 0, $1173 = 0, $1174 = 0, $1175 = 0;
+ var $1176 = 0, $1177 = 0, $1178 = 0, $1179 = 0, $118 = 0, $1180 = 0, $1181 = 0, $1182 = 0, $1183 = 0, $1184 = 0, $1185 = 0, $1186 = 0, $1187 = 0, $1188 = 0, $1189 = 0, $119 = 0, $1190 = 0, $1191 = 0, $1192 = 0, $1193 = 0;
+ var $1194 = 0, $1195 = 0, $1196 = 0, $1197 = 0, $1198 = 0, $1199 = 0, $12 = 0, $120 = 0, $1200 = 0, $1201 = 0, $1202 = 0, $1203 = 0, $1204 = 0, $1205 = 0, $1206 = 0, $1207 = 0, $1208 = 0, $1209 = 0, $121 = 0, $1210 = 0;
+ var $1211 = 0, $1212 = 0, $1213 = 0, $1214 = 0, $1215 = 0, $1216 = 0, $1217 = 0, $1218 = 0, $1219 = 0, $122 = 0, $1220 = 0, $1221 = 0, $1222 = 0, $1223 = 0, $1224 = 0, $1225 = 0, $1226 = 0, $1227 = 0, $1228 = 0, $1229 = 0;
+ var $123 = 0, $1230 = 0, $1231 = 0, $1232 = 0, $1233 = 0, $1234 = 0, $1235 = 0, $1236 = 0, $1237 = 0, $1238 = 0, $1239 = 0, $124 = 0, $1240 = 0, $1241 = 0, $1242 = 0, $1243 = 0, $1244 = 0, $1245 = 0, $1246 = 0, $1247 = 0;
+ var $1248 = 0, $1249 = 0, $125 = 0, $1250 = 0, $1251 = 0, $1252 = 0, $1253 = 0, $1254 = 0, $1255 = 0, $1256 = 0, $1257 = 0, $1258 = 0, $1259 = 0, $126 = 0, $1260 = 0, $1261 = 0, $1262 = 0, $1263 = 0, $1264 = 0, $1265 = 0;
+ var $1266 = 0, $1267 = 0, $1268 = 0, $1269 = 0, $127 = 0, $1270 = 0, $1271 = 0, $1272 = 0, $1273 = 0, $1274 = 0, $1275 = 0, $1276 = 0, $1277 = 0, $1278 = 0, $1279 = 0, $128 = 0, $1280 = 0, $1281 = 0, $1282 = 0, $1283 = 0;
+ var $1284 = 0, $1285 = 0, $1286 = 0, $1287 = 0, $1288 = 0, $1289 = 0, $129 = 0, $1290 = 0, $1291 = 0, $1292 = 0, $1293 = 0, $1294 = 0, $1295 = 0, $1296 = 0, $1297 = 0, $1298 = 0, $1299 = 0, $13 = 0, $130 = 0, $1300 = 0;
+ var $1301 = 0, $1302 = 0, $1303 = 0, $1304 = 0, $1305 = 0, $1306 = 0, $1307 = 0, $1308 = 0, $1309 = 0, $131 = 0, $1310 = 0, $1311 = 0, $1312 = 0, $1313 = 0, $1314 = 0, $1315 = 0, $1316 = 0, $1317 = 0, $1318 = 0, $1319 = 0;
+ var $132 = 0, $1320 = 0, $1321 = 0, $1322 = 0, $1323 = 0, $1324 = 0, $1325 = 0, $1326 = 0, $1327 = 0, $1328 = 0, $1329 = 0, $133 = 0, $1330 = 0, $1331 = 0, $1332 = 0, $1333 = 0, $1334 = 0, $1335 = 0, $1336 = 0, $1337 = 0;
+ var $1338 = 0, $1339 = 0, $134 = 0, $1340 = 0, $1341 = 0, $1342 = 0, $1343 = 0, $1344 = 0, $1345 = 0, $1346 = 0, $1347 = 0, $1348 = 0, $1349 = 0, $135 = 0, $1350 = 0, $1351 = 0, $1352 = 0, $1353 = 0, $1354 = 0, $1355 = 0;
+ var $1356 = 0, $1357 = 0, $1358 = 0, $1359 = 0, $136 = 0, $1360 = 0, $1361 = 0, $1362 = 0, $1363 = 0, $1364 = 0, $1365 = 0, $1366 = 0, $1367 = 0, $1368 = 0, $1369 = 0, $137 = 0, $1370 = 0, $1371 = 0, $1372 = 0, $1373 = 0;
+ var $1374 = 0, $1375 = 0, $1376 = 0, $1377 = 0, $1378 = 0, $1379 = 0, $138 = 0, $1380 = 0, $1381 = 0, $1382 = 0, $1383 = 0, $1384 = 0, $1385 = 0, $1386 = 0, $1387 = 0, $1388 = 0, $1389 = 0, $139 = 0, $1390 = 0, $1391 = 0;
+ var $1392 = 0, $1393 = 0, $1394 = 0, $1395 = 0, $1396 = 0, $1397 = 0, $1398 = 0, $1399 = 0, $14 = 0, $140 = 0, $1400 = 0, $1401 = 0, $1402 = 0, $1403 = 0, $1404 = 0, $1405 = 0, $1406 = 0, $1407 = 0, $1408 = 0, $1409 = 0;
+ var $141 = 0, $1410 = 0, $1411 = 0, $1412 = 0, $1413 = 0, $1414 = 0, $1415 = 0, $1416 = 0, $1417 = 0, $1418 = 0, $1419 = 0, $142 = 0, $1420 = 0, $1421 = 0, $1422 = 0, $1423 = 0, $1424 = 0, $1425 = 0, $1426 = 0, $1427 = 0;
+ var $1428 = 0, $1429 = 0, $143 = 0, $1430 = 0, $1431 = 0, $1432 = 0, $1433 = 0, $1434 = 0, $1435 = 0, $1436 = 0, $1437 = 0, $1438 = 0, $1439 = 0, $144 = 0, $1440 = 0, $1441 = 0, $1442 = 0, $1443 = 0, $1444 = 0, $1445 = 0;
+ var $1446 = 0, $1447 = 0, $1448 = 0, $1449 = 0, $145 = 0, $1450 = 0, $1451 = 0, $1452 = 0, $1453 = 0, $1454 = 0, $1455 = 0, $1456 = 0, $1457 = 0, $1458 = 0, $1459 = 0, $146 = 0, $1460 = 0, $1461 = 0, $1462 = 0, $1463 = 0;
+ var $1464 = 0, $1465 = 0, $1466 = 0, $1467 = 0, $1468 = 0, $1469 = 0, $147 = 0, $1470 = 0, $1471 = 0, $1472 = 0, $1473 = 0, $1474 = 0, $1475 = 0, $1476 = 0, $1477 = 0, $1478 = 0, $1479 = 0, $148 = 0, $1480 = 0, $1481 = 0;
+ var $1482 = 0, $1483 = 0, $1484 = 0, $1485 = 0, $1486 = 0, $1487 = 0, $1488 = 0, $1489 = 0, $149 = 0, $1490 = 0, $1491 = 0, $1492 = 0, $1493 = 0, $1494 = 0, $1495 = 0, $1496 = 0, $1497 = 0, $1498 = 0, $1499 = 0, $15 = 0;
+ var $150 = 0, $1500 = 0, $1501 = 0, $1502 = 0, $1503 = 0, $1504 = 0, $1505 = 0, $1506 = 0, $1507 = 0, $1508 = 0, $1509 = 0, $151 = 0, $1510 = 0, $1511 = 0, $1512 = 0, $1513 = 0, $1514 = 0, $1515 = 0, $1516 = 0, $1517 = 0;
+ var $1518 = 0, $1519 = 0, $152 = 0, $1520 = 0, $1521 = 0, $1522 = 0, $1523 = 0, $1524 = 0, $1525 = 0, $1526 = 0, $1527 = 0, $1528 = 0, $1529 = 0, $153 = 0, $1530 = 0, $1531 = 0, $1532 = 0, $1533 = 0, $1534 = 0, $1535 = 0;
+ var $1536 = 0, $1537 = 0, $1538 = 0, $1539 = 0, $154 = 0, $1540 = 0, $1541 = 0, $1542 = 0, $1543 = 0, $1544 = 0, $1545 = 0, $1546 = 0, $1547 = 0, $1548 = 0, $1549 = 0, $155 = 0, $1550 = 0, $1551 = 0, $1552 = 0, $1553 = 0;
+ var $1554 = 0, $1555 = 0, $1556 = 0, $1557 = 0, $1558 = 0, $1559 = 0, $156 = 0, $1560 = 0, $1561 = 0, $1562 = 0, $1563 = 0, $1564 = 0, $1565 = 0, $1566 = 0, $1567 = 0, $1568 = 0, $1569 = 0, $157 = 0, $1570 = 0, $1571 = 0;
+ var $1572 = 0, $1573 = 0, $1574 = 0, $1575 = 0, $1576 = 0, $1577 = 0, $1578 = 0, $1579 = 0, $158 = 0, $1580 = 0, $1581 = 0, $1582 = 0, $1583 = 0, $1584 = 0, $1585 = 0, $1586 = 0, $1587 = 0, $1588 = 0, $1589 = 0, $159 = 0;
+ var $1590 = 0, $1591 = 0, $1592 = 0, $1593 = 0, $1594 = 0, $1595 = 0, $1596 = 0, $1597 = 0, $1598 = 0, $1599 = 0, $16 = 0, $160 = 0, $1600 = 0, $1601 = 0, $1602 = 0, $1603 = 0, $1604 = 0, $1605 = 0, $1606 = 0, $1607 = 0;
+ var $1608 = 0, $1609 = 0, $161 = 0, $1610 = 0, $1611 = 0, $1612 = 0, $1613 = 0, $1614 = 0, $1615 = 0, $1616 = 0, $1617 = 0, $1618 = 0, $1619 = 0, $162 = 0, $1620 = 0, $1621 = 0, $1622 = 0, $1623 = 0, $1624 = 0, $1625 = 0;
+ var $1626 = 0, $1627 = 0, $1628 = 0, $1629 = 0, $163 = 0, $1630 = 0, $1631 = 0, $1632 = 0, $1633 = 0, $1634 = 0, $1635 = 0, $1636 = 0, $1637 = 0, $1638 = 0, $1639 = 0, $164 = 0, $1640 = 0, $1641 = 0, $1642 = 0, $1643 = 0;
+ var $1644 = 0, $1645 = 0, $1646 = 0, $1647 = 0, $1648 = 0, $1649 = 0, $165 = 0, $1650 = 0, $1651 = 0, $1652 = 0, $1653 = 0, $1654 = 0, $1655 = 0, $1656 = 0, $1657 = 0, $1658 = 0, $1659 = 0, $166 = 0, $1660 = 0, $1661 = 0;
+ var $1662 = 0, $1663 = 0, $1664 = 0, $1665 = 0, $1666 = 0, $1667 = 0, $1668 = 0, $1669 = 0, $167 = 0, $1670 = 0, $1671 = 0, $1672 = 0, $1673 = 0, $1674 = 0, $1675 = 0, $1676 = 0, $1677 = 0, $1678 = 0, $1679 = 0, $168 = 0;
+ var $1680 = 0, $1681 = 0, $1682 = 0, $1683 = 0, $1684 = 0, $1685 = 0, $1686 = 0, $1687 = 0, $1688 = 0, $1689 = 0, $169 = 0, $1690 = 0, $1691 = 0, $1692 = 0, $1693 = 0, $1694 = 0, $1695 = 0, $1696 = 0, $1697 = 0, $1698 = 0;
+ var $1699 = 0, $17 = 0, $170 = 0, $1700 = 0, $1701 = 0, $1702 = 0, $1703 = 0, $1704 = 0, $1705 = 0, $1706 = 0, $1707 = 0, $1708 = 0, $1709 = 0, $171 = 0, $1710 = 0, $1711 = 0, $1712 = 0, $1713 = 0, $1714 = 0, $1715 = 0;
+ var $1716 = 0, $1717 = 0, $1718 = 0, $1719 = 0, $172 = 0, $1720 = 0, $1721 = 0, $1722 = 0, $1723 = 0, $1724 = 0, $1725 = 0, $1726 = 0, $1727 = 0, $1728 = 0, $1729 = 0, $173 = 0, $1730 = 0, $1731 = 0, $1732 = 0, $1733 = 0;
+ var $1734 = 0, $1735 = 0, $1736 = 0, $1737 = 0, $1738 = 0, $1739 = 0, $174 = 0, $1740 = 0, $1741 = 0, $1742 = 0, $1743 = 0, $1744 = 0, $1745 = 0, $1746 = 0, $1747 = 0, $1748 = 0, $1749 = 0, $175 = 0, $1750 = 0, $1751 = 0;
+ var $1752 = 0, $1753 = 0, $1754 = 0, $1755 = 0, $1756 = 0, $1757 = 0, $1758 = 0, $1759 = 0, $176 = 0, $1760 = 0, $1761 = 0, $1762 = 0, $1763 = 0, $1764 = 0, $1765 = 0, $1766 = 0, $1767 = 0, $1768 = 0, $1769 = 0, $177 = 0;
+ var $1770 = 0, $1771 = 0, $1772 = 0, $1773 = 0, $1774 = 0, $1775 = 0, $1776 = 0, $1777 = 0, $1778 = 0, $1779 = 0, $178 = 0, $1780 = 0, $1781 = 0, $1782 = 0, $1783 = 0, $1784 = 0, $1785 = 0, $1786 = 0, $1787 = 0, $1788 = 0;
+ var $1789 = 0, $179 = 0, $1790 = 0, $1791 = 0, $1792 = 0, $1793 = 0, $1794 = 0, $1795 = 0, $1796 = 0, $1797 = 0, $1798 = 0, $1799 = 0, $18 = 0, $180 = 0, $1800 = 0, $1801 = 0, $1802 = 0, $1803 = 0, $1804 = 0, $1805 = 0;
+ var $1806 = 0, $1807 = 0, $1808 = 0, $1809 = 0, $181 = 0, $1810 = 0, $1811 = 0, $1812 = 0, $1813 = 0, $1814 = 0, $1815 = 0, $1816 = 0, $1817 = 0, $1818 = 0, $1819 = 0, $182 = 0, $1820 = 0, $1821 = 0, $1822 = 0, $1823 = 0;
+ var $1824 = 0, $1825 = 0, $1826 = 0, $1827 = 0, $1828 = 0, $1829 = 0, $183 = 0, $1830 = 0, $1831 = 0, $1832 = 0, $1833 = 0, $1834 = 0, $1835 = 0, $1836 = 0, $1837 = 0, $1838 = 0, $1839 = 0, $184 = 0, $1840 = 0, $1841 = 0;
+ var $1842 = 0, $1843 = 0, $1844 = 0, $1845 = 0, $1846 = 0, $1847 = 0, $1848 = 0, $1849 = 0, $185 = 0, $1850 = 0, $1851 = 0, $1852 = 0, $1853 = 0, $1854 = 0, $1855 = 0, $1856 = 0, $1857 = 0, $1858 = 0, $1859 = 0, $186 = 0;
+ var $1860 = 0, $1861 = 0, $1862 = 0, $1863 = 0, $1864 = 0, $1865 = 0, $1866 = 0, $1867 = 0, $1868 = 0, $1869 = 0, $187 = 0, $1870 = 0, $1871 = 0, $1872 = 0, $1873 = 0, $1874 = 0, $1875 = 0, $1876 = 0, $1877 = 0, $1878 = 0;
+ var $1879 = 0, $188 = 0, $1880 = 0, $1881 = 0, $1882 = 0, $1883 = 0, $1884 = 0, $1885 = 0, $1886 = 0, $1887 = 0, $1888 = 0, $1889 = 0, $189 = 0, $1890 = 0, $1891 = 0, $1892 = 0, $1893 = 0, $1894 = 0, $1895 = 0, $1896 = 0;
+ var $1897 = 0, $1898 = 0, $1899 = 0, $19 = 0, $190 = 0, $1900 = 0, $1901 = 0, $1902 = 0, $1903 = 0, $1904 = 0, $1905 = 0, $1906 = 0, $1907 = 0, $1908 = 0, $1909 = 0, $191 = 0, $1910 = 0, $1911 = 0, $1912 = 0, $1913 = 0;
+ var $1914 = 0, $1915 = 0, $1916 = 0, $1917 = 0, $1918 = 0, $1919 = 0, $192 = 0, $1920 = 0, $1921 = 0, $1922 = 0, $1923 = 0, $1924 = 0, $1925 = 0, $1926 = 0, $1927 = 0, $1928 = 0, $1929 = 0, $193 = 0, $1930 = 0, $1931 = 0;
+ var $1932 = 0, $1933 = 0, $1934 = 0, $1935 = 0, $1936 = 0, $1937 = 0, $1938 = 0, $1939 = 0, $194 = 0, $1940 = 0, $1941 = 0, $1942 = 0, $1943 = 0, $1944 = 0, $1945 = 0, $1946 = 0, $1947 = 0, $1948 = 0, $1949 = 0, $195 = 0;
+ var $1950 = 0, $1951 = 0, $1952 = 0, $1953 = 0, $1954 = 0, $1955 = 0, $1956 = 0, $1957 = 0, $1958 = 0, $1959 = 0, $196 = 0, $1960 = 0, $1961 = 0, $1962 = 0, $1963 = 0, $1964 = 0, $1965 = 0, $1966 = 0, $1967 = 0, $1968 = 0;
+ var $1969 = 0, $197 = 0, $1970 = 0, $1971 = 0, $1972 = 0, $1973 = 0, $1974 = 0, $1975 = 0, $1976 = 0, $1977 = 0, $1978 = 0, $1979 = 0, $198 = 0, $1980 = 0, $1981 = 0, $1982 = 0, $1983 = 0, $1984 = 0, $1985 = 0, $1986 = 0;
+ var $1987 = 0, $1988 = 0, $1989 = 0, $199 = 0, $1990 = 0, $1991 = 0, $1992 = 0, $1993 = 0, $1994 = 0, $1995 = 0, $1996 = 0, $1997 = 0, $1998 = 0, $1999 = 0, $2 = 0, $20 = 0, $200 = 0, $2000 = 0, $2001 = 0, $2002 = 0;
+ var $2003 = 0, $2004 = 0, $2005 = 0, $2006 = 0, $2007 = 0, $2008 = 0, $2009 = 0, $201 = 0, $2010 = 0, $2011 = 0, $2012 = 0, $2013 = 0, $2014 = 0, $2015 = 0, $2016 = 0, $2017 = 0, $2018 = 0, $2019 = 0, $202 = 0, $2020 = 0;
+ var $2021 = 0, $2022 = 0, $2023 = 0, $2024 = 0, $2025 = 0, $2026 = 0, $2027 = 0, $2028 = 0, $2029 = 0, $203 = 0, $2030 = 0, $2031 = 0, $2032 = 0, $2033 = 0, $2034 = 0, $2035 = 0, $2036 = 0, $2037 = 0, $2038 = 0, $2039 = 0;
+ var $204 = 0, $2040 = 0, $2041 = 0.0, $2042 = 0.0, $2043 = 0.0, $2044 = 0, $2045 = 0, $2046 = 0, $2047 = 0, $2048 = 0, $2049 = 0, $205 = 0, $2050 = 0, $2051 = 0, $2052 = 0.0, $2053 = 0, $2054 = 0, $2055 = 0.0, $2056 = 0.0, $2057 = 0;
+ var $2058 = 0, $2059 = 0.0, $206 = 0, $2060 = 0, $2061 = 0, $2062 = 0, $2063 = 0.0, $2064 = 0.0, $2065 = 0, $2066 = 0, $2067 = 0.0, $2068 = 0, $2069 = 0, $207 = 0, $2070 = 0.0, $2071 = 0.0, $2072 = 0, $2073 = 0, $2074 = 0, $2075 = 0;
+ var $2076 = 0, $2077 = 0, $2078 = 0, $2079 = 0, $208 = 0, $2080 = 0, $2081 = 0, $2082 = 0, $2083 = 0, $2084 = 0, $2085 = 0, $2086 = 0, $2087 = 0, $2088 = 0, $2089 = 0, $209 = 0, $2090 = 0, $2091 = 0, $2092 = 0, $2093 = 0;
+ var $2094 = 0, $2095 = 0, $2096 = 0, $2097 = 0, $2098 = 0, $2099 = 0, $21 = 0, $210 = 0, $2100 = 0, $2101 = 0, $2102 = 0, $2103 = 0, $2104 = 0, $2105 = 0, $2106 = 0, $2107 = 0, $2108 = 0, $2109 = 0, $211 = 0, $2110 = 0;
+ var $2111 = 0, $2112 = 0, $2113 = 0, $2114 = 0, $2115 = 0.0, $2116 = 0.0, $2117 = 0.0, $2118 = 0, $2119 = 0, $212 = 0, $2120 = 0, $2121 = 0, $2122 = 0, $2123 = 0, $2124 = 0, $2125 = 0.0, $2126 = 0, $2127 = 0, $2128 = 0.0, $2129 = 0.0;
+ var $213 = 0, $2130 = 0, $2131 = 0, $2132 = 0.0, $2133 = 0, $2134 = 0, $2135 = 0, $2136 = 0.0, $2137 = 0.0, $2138 = 0, $2139 = 0, $214 = 0, $2140 = 0.0, $2141 = 0, $2142 = 0, $2143 = 0.0, $2144 = 0.0, $2145 = 0, $2146 = 0, $2147 = 0;
+ var $2148 = 0, $2149 = 0, $215 = 0, $2150 = 0, $2151 = 0, $2152 = 0, $2153 = 0, $2154 = 0, $2155 = 0, $2156 = 0, $2157 = 0, $2158 = 0, $2159 = 0, $216 = 0, $2160 = 0, $2161 = 0, $2162 = 0, $2163 = 0, $2164 = 0, $2165 = 0;
+ var $2166 = 0, $2167 = 0, $2168 = 0, $2169 = 0, $217 = 0, $2170 = 0, $2171 = 0, $2172 = 0, $2173 = 0, $2174 = 0, $2175 = 0, $2176 = 0, $2177 = 0, $2178 = 0, $2179 = 0, $218 = 0, $2180 = 0, $2181 = 0.0, $2182 = 0, $2183 = 0;
+ var $2184 = 0, $2185 = 0, $2186 = 0, $2187 = 0.0, $2188 = 0, $2189 = 0, $219 = 0, $2190 = 0.0, $2191 = 0.0, $2192 = 0, $2193 = 0, $2194 = 0.0, $2195 = 0, $2196 = 0, $2197 = 0, $2198 = 0.0, $2199 = 0.0, $22 = 0, $220 = 0, $2200 = 0;
+ var $2201 = 0, $2202 = 0.0, $2203 = 0, $2204 = 0, $2205 = 0.0, $2206 = 0.0, $2207 = 0, $2208 = 0, $2209 = 0, $221 = 0, $2210 = 0, $2211 = 0, $2212 = 0, $2213 = 0, $2214 = 0, $2215 = 0, $2216 = 0, $2217 = 0, $2218 = 0, $2219 = 0;
+ var $222 = 0, $2220 = 0, $2221 = 0, $2222 = 0, $2223 = 0, $2224 = 0, $2225 = 0, $2226 = 0, $2227 = 0, $2228 = 0, $2229 = 0, $223 = 0, $2230 = 0, $2231 = 0, $2232 = 0, $2233 = 0, $2234 = 0, $2235 = 0, $2236 = 0.0, $2237 = 0.0;
+ var $2238 = 0.0, $2239 = 0, $224 = 0, $2240 = 0, $2241 = 0, $2242 = 0, $2243 = 0, $2244 = 0.0, $2245 = 0, $2246 = 0, $2247 = 0.0, $2248 = 0.0, $2249 = 0, $225 = 0, $2250 = 0, $2251 = 0.0, $2252 = 0, $2253 = 0, $2254 = 0, $2255 = 0.0;
+ var $2256 = 0.0, $2257 = 0, $2258 = 0, $2259 = 0.0, $226 = 0, $2260 = 0, $2261 = 0, $2262 = 0.0, $2263 = 0.0, $2264 = 0, $2265 = 0, $2266 = 0, $2267 = 0, $2268 = 0, $2269 = 0, $227 = 0, $2270 = 0, $2271 = 0, $2272 = 0, $2273 = 0;
+ var $2274 = 0, $2275 = 0, $2276 = 0, $2277 = 0, $2278 = 0, $2279 = 0, $228 = 0, $2280 = 0, $2281 = 0, $2282 = 0, $2283 = 0, $2284 = 0, $2285 = 0, $2286 = 0.0, $2287 = 0.0, $2288 = 0.0, $2289 = 0, $229 = 0, $2290 = 0, $2291 = 0;
+ var $2292 = 0, $2293 = 0, $2294 = 0.0, $2295 = 0, $2296 = 0.0, $2297 = 0.0, $2298 = 0, $2299 = 0, $23 = 0, $230 = 0, $2300 = 0, $2301 = 0, $2302 = 0, $2303 = 0, $2304 = 0, $2305 = 0, $2306 = 0, $2307 = 0, $2308 = 0, $2309 = 0;
+ var $231 = 0, $2310 = 0, $2311 = 0, $2312 = 0, $2313 = 0, $2314 = 0, $2315 = 0, $2316 = 0, $2317 = 0, $2318 = 0, $2319 = 0, $232 = 0, $2320 = 0, $2321 = 0, $2322 = 0, $2323 = 0, $2324 = 0, $2325 = 0, $2326 = 0, $2327 = 0;
+ var $2328 = 0, $2329 = 0, $233 = 0, $2330 = 0, $2331 = 0, $2332 = 0, $2333 = 0.0, $2334 = 0.0, $2335 = 0.0, $2336 = 0, $2337 = 0, $2338 = 0, $2339 = 0.0, $234 = 0, $2340 = 0.0, $2341 = 0.0, $2342 = 0, $2343 = 0, $2344 = 0, $2345 = 0;
+ var $2346 = 0, $2347 = 0, $2348 = 0, $2349 = 0, $235 = 0, $2350 = 0, $2351 = 0, $2352 = 0, $2353 = 0, $2354 = 0, $2355 = 0, $2356 = 0, $2357 = 0, $2358 = 0, $2359 = 0, $236 = 0, $2360 = 0, $2361 = 0, $2362 = 0, $2363 = 0;
+ var $2364 = 0, $2365 = 0, $2366 = 0, $2367 = 0, $2368 = 0, $2369 = 0, $237 = 0, $2370 = 0, $2371 = 0, $2372 = 0, $2373 = 0, $2374 = 0, $2375 = 0, $2376 = 0, $2377 = 0, $2378 = 0, $2379 = 0, $238 = 0, $2380 = 0, $2381 = 0;
+ var $2382 = 0, $2383 = 0, $2384 = 0, $2385 = 0, $2386 = 0, $2387 = 0, $2388 = 0, $2389 = 0, $239 = 0, $2390 = 0, $2391 = 0, $2392 = 0, $2393 = 0, $2394 = 0, $2395 = 0.0, $2396 = 0, $2397 = 0, $2398 = 0.0, $2399 = 0, $24 = 0;
+ var $240 = 0, $2400 = 0, $2401 = 0, $2402 = 0.0, $2403 = 0, $2404 = 0, $2405 = 0, $2406 = 0.0, $2407 = 0, $2408 = 0, $2409 = 0, $241 = 0, $2410 = 0.0, $2411 = 0, $2412 = 0, $2413 = 0.0, $2414 = 0, $2415 = 0, $2416 = 0, $2417 = 0;
+ var $2418 = 0, $2419 = 0, $242 = 0, $2420 = 0, $2421 = 0, $2422 = 0, $2423 = 0, $2424 = 0, $2425 = 0, $2426 = 0, $2427 = 0, $2428 = 0, $2429 = 0, $243 = 0, $2430 = 0, $2431 = 0, $2432 = 0, $2433 = 0, $2434 = 0, $2435 = 0;
+ var $2436 = 0, $2437 = 0, $2438 = 0, $2439 = 0, $244 = 0, $2440 = 0, $2441 = 0, $2442 = 0, $2443 = 0, $2444 = 0, $2445 = 0, $2446 = 0, $2447 = 0, $2448 = 0, $2449 = 0, $245 = 0, $2450 = 0, $2451 = 0.0, $2452 = 0, $2453 = 0;
+ var $2454 = 0.0, $2455 = 0, $2456 = 0, $2457 = 0, $2458 = 0.0, $2459 = 0, $246 = 0, $2460 = 0, $2461 = 0, $2462 = 0.0, $2463 = 0, $2464 = 0, $2465 = 0, $2466 = 0.0, $2467 = 0, $2468 = 0, $2469 = 0.0, $247 = 0, $2470 = 0, $2471 = 0;
+ var $2472 = 0, $2473 = 0, $2474 = 0, $2475 = 0, $2476 = 0, $2477 = 0, $2478 = 0, $2479 = 0, $248 = 0, $2480 = 0, $2481 = 0, $2482 = 0, $2483 = 0, $2484 = 0, $2485 = 0, $2486 = 0, $2487 = 0, $2488 = 0, $2489 = 0, $249 = 0;
+ var $2490 = 0, $2491 = 0, $2492 = 0, $2493 = 0, $2494 = 0, $2495 = 0, $2496 = 0, $2497 = 0, $2498 = 0, $2499 = 0, $25 = 0, $250 = 0, $2500 = 0, $2501 = 0, $2502 = 0, $2503 = 0, $2504 = 0, $2505 = 0, $2506 = 0, $2507 = 0.0;
+ var $2508 = 0, $2509 = 0, $251 = 0, $2510 = 0.0, $2511 = 0, $2512 = 0, $2513 = 0, $2514 = 0.0, $2515 = 0, $2516 = 0, $2517 = 0, $2518 = 0.0, $2519 = 0, $252 = 0, $2520 = 0, $2521 = 0, $2522 = 0.0, $2523 = 0, $2524 = 0, $2525 = 0.0;
+ var $2526 = 0, $2527 = 0, $2528 = 0, $2529 = 0, $253 = 0, $2530 = 0, $2531 = 0, $2532 = 0, $2533 = 0, $2534 = 0, $2535 = 0, $2536 = 0, $2537 = 0, $2538 = 0, $2539 = 0, $254 = 0, $2540 = 0, $2541 = 0, $2542 = 0, $2543 = 0;
+ var $2544 = 0, $2545 = 0, $2546 = 0, $2547 = 0, $2548 = 0, $2549 = 0, $255 = 0, $2550 = 0, $2551 = 0, $2552 = 0, $2553 = 0, $2554 = 0, $2555 = 0, $2556 = 0, $2557 = 0, $2558 = 0, $2559 = 0, $256 = 0, $2560 = 0, $2561 = 0;
+ var $2562 = 0, $2563 = 0.0, $2564 = 0, $2565 = 0, $2566 = 0.0, $2567 = 0, $2568 = 0, $2569 = 0, $257 = 0, $2570 = 0.0, $2571 = 0, $2572 = 0, $2573 = 0, $2574 = 0.0, $2575 = 0, $2576 = 0, $2577 = 0, $2578 = 0.0, $2579 = 0, $258 = 0;
+ var $2580 = 0, $2581 = 0.0, $2582 = 0, $2583 = 0, $2584 = 0, $2585 = 0, $2586 = 0, $2587 = 0, $2588 = 0, $2589 = 0, $259 = 0, $2590 = 0, $2591 = 0, $2592 = 0, $2593 = 0, $2594 = 0, $2595 = 0, $2596 = 0, $2597 = 0, $2598 = 0;
+ var $2599 = 0, $26 = 0, $260 = 0, $2600 = 0, $2601 = 0, $2602 = 0, $2603 = 0, $2604 = 0, $2605 = 0, $2606 = 0, $2607 = 0, $2608 = 0, $2609 = 0, $261 = 0, $2610 = 0, $2611 = 0, $2612 = 0, $2613 = 0, $2614 = 0, $2615 = 0;
+ var $2616 = 0, $2617 = 0, $2618 = 0, $2619 = 0.0, $262 = 0, $2620 = 0, $2621 = 0, $2622 = 0.0, $2623 = 0, $2624 = 0, $2625 = 0, $2626 = 0.0, $2627 = 0, $2628 = 0, $2629 = 0, $263 = 0, $2630 = 0.0, $2631 = 0, $2632 = 0, $2633 = 0;
+ var $2634 = 0.0, $2635 = 0, $2636 = 0, $2637 = 0.0, $2638 = 0, $2639 = 0, $264 = 0, $2640 = 0, $2641 = 0, $2642 = 0, $2643 = 0, $2644 = 0, $2645 = 0, $2646 = 0, $2647 = 0, $2648 = 0, $2649 = 0, $265 = 0, $2650 = 0, $2651 = 0;
+ var $2652 = 0, $2653 = 0, $2654 = 0, $2655 = 0, $2656 = 0, $2657 = 0, $2658 = 0, $2659 = 0, $266 = 0, $2660 = 0, $2661 = 0, $2662 = 0, $2663 = 0, $2664 = 0, $2665 = 0, $2666 = 0, $2667 = 0, $2668 = 0, $2669 = 0, $267 = 0;
+ var $2670 = 0, $2671 = 0, $2672 = 0, $2673 = 0, $2674 = 0, $2675 = 0, $2676 = 0, $2677 = 0, $2678 = 0, $2679 = 0, $268 = 0, $2680 = 0, $2681 = 0, $2682 = 0, $2683 = 0, $2684 = 0, $2685 = 0, $2686 = 0, $2687 = 0, $2688 = 0;
+ var $2689 = 0, $269 = 0, $2690 = 0, $2691 = 0, $2692 = 0, $2693 = 0, $2694 = 0, $2695 = 0, $2696 = 0, $2697 = 0, $2698 = 0, $2699 = 0, $27 = 0, $270 = 0, $2700 = 0, $2701 = 0, $2702 = 0, $2703 = 0, $2704 = 0, $2705 = 0;
+ var $2706 = 0, $2707 = 0, $2708 = 0, $2709 = 0, $271 = 0, $2710 = 0, $2711 = 0, $2712 = 0, $2713 = 0, $2714 = 0, $2715 = 0, $2716 = 0, $2717 = 0, $2718 = 0, $2719 = 0, $272 = 0, $2720 = 0, $2721 = 0, $2722 = 0, $2723 = 0;
+ var $2724 = 0, $2725 = 0, $2726 = 0, $2727 = 0, $2728 = 0, $2729 = 0, $273 = 0, $2730 = 0, $2731 = 0, $2732 = 0, $2733 = 0, $2734 = 0, $2735 = 0, $2736 = 0, $2737 = 0, $2738 = 0, $2739 = 0, $274 = 0, $2740 = 0, $2741 = 0;
+ var $2742 = 0, $2743 = 0, $2744 = 0, $2745 = 0, $2746 = 0, $2747 = 0, $2748 = 0, $2749 = 0, $275 = 0, $2750 = 0, $2751 = 0, $2752 = 0, $2753 = 0, $2754 = 0, $2755 = 0, $2756 = 0, $2757 = 0, $2758 = 0, $2759 = 0, $276 = 0;
+ var $2760 = 0, $2761 = 0, $2762 = 0, $2763 = 0, $2764 = 0, $2765 = 0, $2766 = 0, $2767 = 0, $2768 = 0, $2769 = 0, $277 = 0, $2770 = 0, $2771 = 0, $2772 = 0, $2773 = 0, $2774 = 0, $2775 = 0, $2776 = 0, $2777 = 0, $2778 = 0;
+ var $2779 = 0, $278 = 0, $2780 = 0, $2781 = 0, $2782 = 0, $2783 = 0, $2784 = 0, $2785 = 0, $2786 = 0, $2787 = 0, $2788 = 0, $2789 = 0, $279 = 0, $2790 = 0, $2791 = 0, $2792 = 0, $2793 = 0, $2794 = 0, $2795 = 0, $2796 = 0;
+ var $2797 = 0, $2798 = 0, $2799 = 0, $28 = 0, $280 = 0, $2800 = 0, $2801 = 0, $2802 = 0, $2803 = 0, $2804 = 0, $2805 = 0, $2806 = 0, $2807 = 0, $2808 = 0, $2809 = 0, $281 = 0, $2810 = 0, $2811 = 0, $2812 = 0, $2813 = 0;
+ var $2814 = 0, $2815 = 0, $2816 = 0, $2817 = 0, $2818 = 0, $2819 = 0, $282 = 0, $2820 = 0, $2821 = 0, $2822 = 0, $2823 = 0, $2824 = 0, $2825 = 0, $2826 = 0, $2827 = 0, $2828 = 0, $2829 = 0, $283 = 0, $2830 = 0, $2831 = 0;
+ var $2832 = 0, $2833 = 0, $2834 = 0, $2835 = 0, $2836 = 0, $2837 = 0, $2838 = 0, $2839 = 0, $284 = 0, $2840 = 0, $2841 = 0, $2842 = 0, $2843 = 0, $2844 = 0, $2845 = 0, $2846 = 0, $2847 = 0, $2848 = 0, $2849 = 0, $285 = 0;
+ var $2850 = 0, $2851 = 0, $2852 = 0, $2853 = 0, $2854 = 0, $2855 = 0, $2856 = 0, $2857 = 0, $2858 = 0, $2859 = 0, $286 = 0, $2860 = 0, $2861 = 0, $2862 = 0, $2863 = 0, $2864 = 0, $2865 = 0, $2866 = 0, $2867 = 0, $2868 = 0;
+ var $2869 = 0, $287 = 0, $2870 = 0, $2871 = 0, $2872 = 0, $2873 = 0, $2874 = 0, $2875 = 0, $2876 = 0, $2877 = 0, $2878 = 0, $2879 = 0, $288 = 0, $2880 = 0, $2881 = 0, $2882 = 0, $2883 = 0, $2884 = 0, $2885 = 0, $2886 = 0;
+ var $2887 = 0, $2888 = 0, $2889 = 0, $289 = 0, $2890 = 0, $2891 = 0, $2892 = 0, $2893 = 0, $2894 = 0, $2895 = 0, $2896 = 0, $2897 = 0, $2898 = 0, $2899 = 0, $29 = 0, $290 = 0, $2900 = 0, $2901 = 0, $2902 = 0, $2903 = 0;
+ var $2904 = 0, $2905 = 0, $2906 = 0, $2907 = 0, $2908 = 0, $2909 = 0, $291 = 0, $2910 = 0, $2911 = 0, $2912 = 0, $2913 = 0, $2914 = 0, $2915 = 0, $2916 = 0, $2917 = 0, $2918 = 0, $2919 = 0, $292 = 0, $2920 = 0, $2921 = 0;
+ var $2922 = 0, $2923 = 0, $2924 = 0, $2925 = 0, $2926 = 0, $2927 = 0, $2928 = 0, $2929 = 0, $293 = 0, $2930 = 0, $2931 = 0, $2932 = 0, $2933 = 0, $2934 = 0, $2935 = 0, $2936 = 0, $2937 = 0, $2938 = 0, $2939 = 0, $294 = 0;
+ var $2940 = 0, $2941 = 0, $2942 = 0, $2943 = 0, $2944 = 0, $2945 = 0, $2946 = 0, $2947 = 0, $2948 = 0, $2949 = 0, $295 = 0, $2950 = 0, $2951 = 0, $2952 = 0, $2953 = 0, $2954 = 0, $2955 = 0, $2956 = 0, $2957 = 0, $2958 = 0;
+ var $2959 = 0, $296 = 0, $2960 = 0, $2961 = 0, $2962 = 0, $2963 = 0, $2964 = 0, $2965 = 0, $2966 = 0, $2967 = 0, $2968 = 0, $2969 = 0, $297 = 0, $2970 = 0, $2971 = 0, $2972 = 0, $2973 = 0, $2974 = 0, $2975 = 0, $2976 = 0;
+ var $2977 = 0, $2978 = 0, $2979 = 0, $298 = 0, $2980 = 0, $2981 = 0, $2982 = 0, $2983 = 0, $2984 = 0, $2985 = 0, $2986 = 0, $2987 = 0, $2988 = 0, $2989 = 0, $299 = 0, $2990 = 0, $2991 = 0, $2992 = 0, $2993 = 0, $2994 = 0;
+ var $2995 = 0, $2996 = 0, $2997 = 0, $2998 = 0, $2999 = 0, $3 = 0, $30 = 0, $300 = 0, $3000 = 0, $3001 = 0, $3002 = 0, $3003 = 0, $3004 = 0, $3005 = 0, $3006 = 0, $3007 = 0, $3008 = 0, $3009 = 0, $301 = 0, $3010 = 0;
+ var $3011 = 0, $3012 = 0, $3013 = 0, $3014 = 0, $3015 = 0, $3016 = 0, $3017 = 0, $3018 = 0, $3019 = 0, $302 = 0, $3020 = 0, $3021 = 0, $3022 = 0, $3023 = 0, $3024 = 0, $3025 = 0, $3026 = 0, $3027 = 0, $3028 = 0, $3029 = 0;
+ var $303 = 0, $3030 = 0, $3031 = 0, $3032 = 0, $3033 = 0, $3034 = 0, $3035 = 0, $3036 = 0, $3037 = 0, $3038 = 0, $3039 = 0, $304 = 0, $3040 = 0, $3041 = 0, $3042 = 0, $3043 = 0, $3044 = 0, $3045 = 0, $3046 = 0, $3047 = 0;
+ var $3048 = 0, $3049 = 0, $305 = 0, $3050 = 0, $3051 = 0, $3052 = 0, $3053 = 0, $3054 = 0, $3055 = 0, $3056 = 0, $3057 = 0, $3058 = 0, $3059 = 0, $306 = 0, $3060 = 0, $3061 = 0, $3062 = 0, $3063 = 0, $3064 = 0, $3065 = 0;
+ var $3066 = 0, $3067 = 0, $3068 = 0, $3069 = 0, $307 = 0, $3070 = 0, $3071 = 0, $3072 = 0, $3073 = 0, $3074 = 0, $3075 = 0, $3076 = 0, $3077 = 0, $3078 = 0, $3079 = 0, $308 = 0, $3080 = 0, $3081 = 0, $3082 = 0, $3083 = 0;
+ var $3084 = 0, $3085 = 0, $3086 = 0, $3087 = 0, $3088 = 0, $3089 = 0, $309 = 0, $3090 = 0, $3091 = 0, $3092 = 0, $3093 = 0, $3094 = 0, $3095 = 0, $3096 = 0, $3097 = 0, $3098 = 0, $3099 = 0, $31 = 0, $310 = 0, $3100 = 0;
+ var $3101 = 0, $3102 = 0, $3103 = 0, $3104 = 0, $3105 = 0, $3106 = 0, $3107 = 0, $3108 = 0, $3109 = 0, $311 = 0, $3110 = 0, $3111 = 0, $3112 = 0, $3113 = 0, $3114 = 0, $3115 = 0, $3116 = 0, $3117 = 0, $3118 = 0, $3119 = 0;
+ var $312 = 0, $3120 = 0, $3121 = 0, $3122 = 0, $3123 = 0, $3124 = 0, $3125 = 0, $3126 = 0, $3127 = 0, $3128 = 0, $3129 = 0, $313 = 0, $3130 = 0, $3131 = 0, $3132 = 0, $3133 = 0, $3134 = 0, $3135 = 0, $3136 = 0, $3137 = 0;
+ var $3138 = 0, $3139 = 0, $314 = 0, $3140 = 0, $3141 = 0, $3142 = 0, $3143 = 0, $3144 = 0, $3145 = 0, $3146 = 0, $3147 = 0, $3148 = 0, $3149 = 0, $315 = 0, $3150 = 0, $3151 = 0, $3152 = 0, $3153 = 0, $3154 = 0, $3155 = 0;
+ var $3156 = 0, $3157 = 0, $3158 = 0, $3159 = 0, $316 = 0, $3160 = 0, $3161 = 0, $3162 = 0, $3163 = 0, $3164 = 0, $3165 = 0, $3166 = 0, $3167 = 0, $3168 = 0, $3169 = 0, $317 = 0, $3170 = 0, $3171 = 0, $3172 = 0, $3173 = 0;
+ var $3174 = 0, $3175 = 0, $3176 = 0, $3177 = 0, $3178 = 0, $3179 = 0, $318 = 0, $3180 = 0, $3181 = 0, $3182 = 0, $3183 = 0, $3184 = 0, $3185 = 0, $3186 = 0, $3187 = 0, $3188 = 0, $3189 = 0, $319 = 0, $3190 = 0, $3191 = 0;
+ var $3192 = 0, $3193 = 0, $3194 = 0, $3195 = 0, $3196 = 0, $3197 = 0, $3198 = 0, $3199 = 0, $32 = 0, $320 = 0, $3200 = 0, $3201 = 0, $3202 = 0, $3203 = 0, $3204 = 0, $3205 = 0, $3206 = 0, $3207 = 0, $3208 = 0, $3209 = 0;
+ var $321 = 0, $3210 = 0, $3211 = 0, $3212 = 0, $3213 = 0, $3214 = 0, $3215 = 0, $3216 = 0, $3217 = 0, $3218 = 0, $3219 = 0, $322 = 0, $3220 = 0, $3221 = 0, $3222 = 0, $3223 = 0, $3224 = 0, $3225 = 0, $3226 = 0, $3227 = 0;
+ var $3228 = 0, $3229 = 0, $323 = 0, $3230 = 0, $3231 = 0, $3232 = 0, $3233 = 0, $3234 = 0, $3235 = 0, $3236 = 0, $3237 = 0, $3238 = 0, $3239 = 0, $324 = 0, $3240 = 0, $3241 = 0, $3242 = 0, $3243 = 0, $3244 = 0, $3245 = 0;
+ var $3246 = 0, $3247 = 0, $3248 = 0, $3249 = 0, $325 = 0, $3250 = 0, $3251 = 0, $3252 = 0, $3253 = 0, $3254 = 0, $3255 = 0, $3256 = 0, $3257 = 0, $3258 = 0, $3259 = 0, $326 = 0, $3260 = 0, $3261 = 0, $3262 = 0, $3263 = 0;
+ var $3264 = 0, $3265 = 0, $3266 = 0, $3267 = 0, $3268 = 0, $3269 = 0, $327 = 0, $3270 = 0, $3271 = 0, $3272 = 0, $3273 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0;
+ var $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0;
+ var $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0;
+ var $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0;
+ var $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0;
+ var $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0;
+ var $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0;
+ var $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0;
+ var $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0;
+ var $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0;
+ var $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0;
+ var $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0;
+ var $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0;
+ var $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0;
+ var $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0;
+ var $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0;
+ var $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0;
+ var $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0;
+ var $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0;
+ var $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0;
+ var $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0;
+ var $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0;
+ var $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0;
+ var $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0;
+ var $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0;
+ var $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0;
+ var $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0;
+ var $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0;
+ var $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0;
+ var $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0;
+ var $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0;
+ var $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0;
+ var $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0;
+ var $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0;
+ var $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0;
+ var $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0;
+ var $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0;
+ var $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $a7$0 = 0, $a96$0 = 0, $ai$0 = 0, $ai$1 = 0;
+ var $ai$1$phi = 0, $argc$0 = 0, $argc$1 = 0, $args = 0, $args$byval_copy = 0, $argv$0 = 0, $argv$1 = 0, $b$0 = 0, $base = 0, $base$byval_copy = 0, $base108 = 0, $base108$byval_copy = 0, $c = 0, $c19 = 0, $c42 = 0, $c_jmp = 0, $ci31$0 = 0, $ci31$1 = 0, $ci34$0 = 0, $ci34$1 = 0;
+ var $ci34$1$phi = 0, $cond = 0, $cond1000 = 0, $cond1001 = 0, $cond1002 = 0, $cond1003 = 0, $cond1004 = 0, $cond1005 = 0, $cond1006 = 0, $cond1007 = 0, $cond1008 = 0, $cond1009 = 0, $cond1010 = 0, $cond1011 = 0, $cond1012 = 0, $cond1013 = 0, $cond1014 = 0, $cond1015 = 0, $cond1016 = 0, $cond1017 = 0;
+ var $cond1018 = 0, $cond1019 = 0, $cond1020 = 0, $cond1021 = 0, $cond1022 = 0, $cond1023 = 0, $cond1024 = 0, $cond1025 = 0, $cond1026 = 0, $cond1027 = 0, $cond1028 = 0, $cond1029 = 0, $cond1030 = 0, $cond1031 = 0, $cond1032 = 0, $cond1033 = 0, $cond1034 = 0, $cond1035 = 0, $cond1036 = 0, $cond1037 = 0;
+ var $cond1038 = 0, $cond1039 = 0, $cond1040 = 0, $cond1041 = 0, $cond1042 = 0, $cond1043 = 0, $cond1044 = 0, $cond1045 = 0, $cond1046 = 0, $cond1047 = 0, $cond1048 = 0, $cond1049 = 0, $cond1050 = 0, $cond1051 = 0, $cond1052 = 0, $cond1053 = 0, $cond1054 = 0, $cond1055 = 0, $cond1056 = 0, $cond1057 = 0;
+ var $cond1058 = 0, $cond1059 = 0, $cond1060 = 0, $cond1061 = 0, $cond1062 = 0, $cond1063 = 0, $cond1064 = 0, $cond1065 = 0, $cond1066 = 0, $cond1067 = 0, $cond1068 = 0, $cond1069 = 0, $cond1070 = 0, $cond1071 = 0, $cond1072 = 0, $cond1073 = 0, $cond1074 = 0, $cond1075 = 0, $cond1076 = 0, $cond1077 = 0;
+ var $cond1078 = 0, $cond1079 = 0, $cond1080 = 0, $cond1081 = 0, $cond1082 = 0, $cond1083 = 0, $cond1084 = 0, $cond1085 = 0, $cond1086 = 0, $cond1087 = 0, $cond1088 = 0, $cond1089 = 0, $cond1090 = 0, $cond1091 = 0, $cond1092 = 0, $cond1093 = 0, $cond1094 = 0, $cond1095 = 0, $cond1096 = 0, $cond1097 = 0;
+ var $cond1098 = 0, $cond1099 = 0, $cond1100 = 0, $cond1101 = 0, $cond1102 = 0, $cond1103 = 0, $cond1104 = 0, $cond1105 = 0, $cond1106 = 0, $cond1107 = 0, $cond1108 = 0, $cond1109 = 0, $cond1110 = 0, $cond1111 = 0, $cond1112 = 0, $cond1113 = 0, $cond1114 = 0, $cond1115 = 0, $cond1116 = 0, $cond1117 = 0;
+ var $cond1118 = 0, $cond1119 = 0, $cond1120 = 0, $cond1121 = 0, $cond1122 = 0, $cond1123 = 0, $cond1124 = 0, $cond1125 = 0, $cond1126 = 0, $cond1127 = 0, $cond1128 = 0, $cond1129 = 0, $cond1130 = 0, $cond1131 = 0, $cond1132 = 0, $cond1133 = 0, $cond1134 = 0, $cond1135 = 0, $cond1136 = 0, $cond1137 = 0;
+ var $cond1138 = 0, $cond1139 = 0, $cond1140 = 0, $cond1141 = 0, $cond1142 = 0, $cond1143 = 0, $cond1144 = 0, $cond1145 = 0, $cond1146 = 0, $cond1147 = 0, $cond1148 = 0, $cond1149 = 0, $cond1150 = 0, $cond1151 = 0, $cond1152 = 0, $cond1153 = 0, $cond1154 = 0, $cond1155 = 0, $cond1156 = 0, $cond1157 = 0;
+ var $cond1158 = 0, $cond1159 = 0, $cond1160 = 0, $cond999 = 0, $eidx$0 = 0, $eidx119$0 = 0, $eidx32$0 = 0, $eidx32$0$phi = 0, $eidx32$1 = 0, $eidx32$2 = 0, $eidx35$0 = 0, $exc = 0, $exc117 = 0, $exc120 = 0, $exc25 = 0, $exc37 = 0, $exc_catched$0 = 0, $exc_catched$1 = 0, $exc_catched$1$phi = 0, $exc_catched$2 = 0;
+ var $exc_catched$2$phi = 0, $exc_catched$3 = 0, $exc_catched$4 = 0, $exc_catched$5 = 0, $exc_catched$5$phi = 0, $hash = 0, $hash$byval_copy = 0, $i$0 = 0, $i$1 = 0, $i$2 = 0, $idx100$0 = 0, $idx100$1 = 0, $indirectbr_cast = 0, $irep$0 = 0, $irep$1 = 0, $irep$1$phi = 0, $irep$2 = 0, $irep$3 = 0, $irep$4 = 0, $irep$5 = 0;
+ var $irep$5$phi = 0, $irep$6 = 0, $irep$7 = 0, $irep$8 = 0, $irep$8$phi = 0, $len$0 = 0, $m$0 = 0, $m18$0 = 0, $m41$0 = 0, $mid$0 = 0, $mid20$0 = 0, $mid45$0 = 0, $mlen$0 = 0, $msg = 0, $msg$byval_copy = 0, $msg$byval_copy948 = 0, $n$0 = 0, $n11$0 = 0, $n22$0 = 0, $n40$0 = 0;
+ var $or$cond = 0, $or$cond4 = 0, $p102$0 = 0, $pc$0 = 0, $pc$1 = 0, $pc$1$phi = 0, $pc$2 = 0, $pc$3 = 0, $pc$3$phi = 0, $pc$4 = 0, $pc$5 = 0, $pc$6 = 0, $pool$0 = 0, $pool$1 = 0, $pool$1$phi = 0, $pool$2 = 0, $pool$3 = 0, $pool$3$phi = 0, $pool$4 = 0, $pool$5 = 0;
+ var $pool$6 = 0, $pool$6$phi = 0, $post$0 = 0, $pp$0 = 0, $prev_jmp$0 = 0, $prev_jmp$1 = 0, $prev_jmp$1$phi = 0, $recv = 0, $recv$byval_copy = 0, $recv$byval_copy910 = 0, $recv$byval_copy912 = 0, $recv112 = 0, $recv112$byval_copy = 0, $recv14 = 0, $recv14$byval_copy = 0, $recv16 = 0, $recv16$byval_copy = 0, $recv44 = 0, $recv44$byval_copy = 0, $recv44$byval_copy924 = 0;
+ var $regs$0 = 0, $regs$1 = 0, $regs$1$phi = 0, $regs$2 = 0, $regs$2$phi = 0, $regs$3 = 0, $regs$4 = 0, $regs$5 = 0, $regs$5$phi = 0, $result = 0, $result84$0 = 0, $result86$0 = 0, $result88$0 = 0, $result90$0 = 0, $result92$0 = 0, $rnum$0 = 0, $stack$0 = 0, $stack53$0 = 0, $super = 0, $super$byval_copy = 0;
+ var $sym = 0, $sym$byval_copy = 0, $sym46 = 0, $sym46$byval_copy = 0, $syms$0 = 0, $syms$1 = 0, $syms$1$phi = 0, $syms$2 = 0, $syms$3 = 0, $syms$3$phi = 0, $syms$4 = 0, $syms$5 = 0, $syms$6 = 0, $syms$6$phi = 0, $v = 0, $v95 = 0, $v95$byval_copy = 0, $v97 = 0, $val = 0, $val1 = 0;
+ var $vararg_buffer = 0, $vararg_ptr901 = 0, $vararg_ptr902 = 0, $z = 0, $z62 = 0, $z66 = 0, $z77 = 0, $z82 = 0, _setjmpTable = 0, _setjmpTableSize = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 1328|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $msg$byval_copy948 = sp + 1312|0;
+ $msg$byval_copy = sp + 1304|0;
+ $$byval_copy947 = sp + 1296|0;
+ $$byval_copy946 = sp + 1288|0;
+ $$byval_copy945 = sp + 1280|0;
+ $$byval_copy944 = sp + 1272|0;
+ $$byval_copy943 = sp + 1264|0;
+ $recv112$byval_copy = sp + 1256|0;
+ $base108$byval_copy = sp + 1248|0;
+ $super$byval_copy = sp + 1240|0;
+ $base$byval_copy = sp + 1232|0;
+ $$byval_copy942 = sp + 1224|0;
+ $$byval_copy941 = sp + 1216|0;
+ $hash$byval_copy = sp + 1208|0;
+ $$byval_copy940 = sp + 1200|0;
+ $$byval_copy939 = sp + 1192|0;
+ $$byval_copy938 = sp + 1184|0;
+ $$byval_copy937 = sp + 1176|0;
+ $$byval_copy936 = sp + 1168|0;
+ $v95$byval_copy = sp + 1160|0;
+ $$byval_copy935 = sp + 1152|0;
+ $$byval_copy934 = sp + 1144|0;
+ $$byval_copy933 = sp + 1136|0;
+ $$byval_copy932 = sp + 1128|0;
+ $$byval_copy931 = sp + 1120|0;
+ $$byval_copy930 = sp + 1112|0;
+ $$byval_copy929 = sp + 1104|0;
+ $$byval_copy928 = sp + 1096|0;
+ $$byval_copy927 = sp + 1088|0;
+ $$byval_copy926 = sp + 1080|0;
+ $$byval_copy925 = sp + 1072|0;
+ $recv44$byval_copy924 = sp + 1064|0;
+ $sym46$byval_copy = sp + 1056|0;
+ $$byval_copy923 = sp + 1048|0;
+ $recv44$byval_copy = sp + 1040|0;
+ $$byval_copy922 = sp + 1032|0;
+ $$byval_copy921 = sp + 1024|0;
+ $$byval_copy920 = sp + 1016|0;
+ $$byval_copy919 = sp + 1008|0;
+ $$byval_copy918 = sp + 1000|0;
+ $$byval_copy917 = sp + 992|0;
+ $$byval_copy916 = sp + 984|0;
+ $recv16$byval_copy = sp + 976|0;
+ $$byval_copy915 = sp + 968|0;
+ $$byval_copy914 = sp + 960|0;
+ $$byval_copy913 = sp + 952|0;
+ $recv14$byval_copy = sp + 944|0;
+ $recv$byval_copy912 = sp + 936|0;
+ $sym$byval_copy = sp + 928|0;
+ $$byval_copy911 = sp + 920|0;
+ $args$byval_copy = sp + 912|0;
+ $recv$byval_copy910 = sp + 904|0;
+ $recv$byval_copy = sp + 896|0;
+ $$byval_copy909 = sp + 888|0;
+ $$byval_copy908 = sp + 880|0;
+ $$byval_copy907 = sp + 872|0;
+ $$byval_copy906 = sp + 864|0;
+ $$byval_copy905 = sp + 856|0;
+ $$byval_copy904 = sp + 848|0;
+ $$byval_copy903 = sp + 840|0;
+ $$byval_copy = sp + 832|0;
+ $vararg_buffer = sp;
+ _setjmpTableSize = 4;_setjmpTable = _malloc(40) | 0;HEAP32[_setjmpTable>>2]=0;
+ $c_jmp = sp + 672|0;
+ $0 = sp + 664|0;
+ $1 = sp + 656|0;
+ $2 = sp + 648|0;
+ $3 = sp + 640|0;
+ $val = sp + 632|0;
+ $4 = sp + 624|0;
+ $val1 = sp + 616|0;
+ $5 = sp + 608|0;
+ $6 = sp + 600|0;
+ $c = sp + 592|0;
+ $recv = sp + 584|0;
+ $result = sp + 576|0;
+ $sym = sp + 568|0;
+ $args = sp + 560|0;
+ $7 = sp + 552|0;
+ $8 = sp + 544|0;
+ $9 = sp + 536|0;
+ $recv14 = sp + 528|0;
+ $10 = sp + 520|0;
+ $11 = sp + 512|0;
+ $recv16 = sp + 504|0;
+ $c19 = sp + 496|0;
+ $exc = sp + 488|0;
+ $12 = sp + 480|0;
+ $13 = sp + 472|0;
+ $14 = sp + 464|0;
+ $15 = sp + 456|0;
+ $16 = sp + 448|0;
+ $exc25 = sp + 440|0;
+ $17 = sp + 432|0;
+ $18 = sp + 424|0;
+ $19 = sp + 416|0;
+ $20 = sp + 408|0;
+ $21 = sp + 400|0;
+ $22 = sp + 392|0;
+ $23 = sp + 384|0;
+ $24 = sp + 376|0;
+ $25 = sp + 368|0;
+ $v = sp + 360|0;
+ $exc37 = sp + 352|0;
+ $26 = sp + 344|0;
+ $c42 = sp + 336|0;
+ $recv44 = sp + 328|0;
+ $sym46 = sp + 320|0;
+ $27 = sp + 312|0;
+ $28 = sp + 304|0;
+ $z = sp + 296|0;
+ $29 = sp + 288|0;
+ $z62 = sp + 280|0;
+ $z66 = sp + 272|0;
+ $30 = sp + 264|0;
+ $z77 = sp + 260|0;
+ $z82 = sp + 256|0;
+ $31 = sp + 248|0;
+ $32 = sp + 240|0;
+ $v95 = sp + 232|0;
+ $33 = sp + 224|0;
+ $v97 = sp + 216|0;
+ $34 = sp + 208|0;
+ $35 = sp + 200|0;
+ $36 = sp + 192|0;
+ $37 = sp + 184|0;
+ $hash = sp + 176|0;
+ $38 = sp + 168|0;
+ $39 = sp + 160|0;
+ $base = sp + 152|0;
+ $super = sp + 144|0;
+ $40 = sp + 136|0;
+ $41 = sp + 128|0;
+ $base108 = sp + 120|0;
+ $42 = sp + 112|0;
+ $43 = sp + 104|0;
+ $recv112 = sp + 96|0;
+ $44 = sp + 88|0;
+ $45 = sp + 80|0;
+ $exc117 = sp + 72|0;
+ $46 = sp + 64|0;
+ $47 = sp + 56|0;
+ $48 = sp + 48|0;
+ $msg = sp + 40|0;
+ $exc120 = sp + 32|0;
+ $49 = sp + 24|0;
+ $50 = sp + 16|0;
+ $51 = ((($proc)) + 12|0);
+ $52 = HEAP32[$51>>2]|0;
+ $53 = ((($52)) + 8|0);
+ $54 = HEAP32[$53>>2]|0;
+ $55 = ((($52)) + 12|0);
+ $56 = HEAP32[$55>>2]|0;
+ $57 = ((($52)) + 16|0);
+ $58 = HEAP32[$57>>2]|0;
+ __THREW__ = 0;
+ $59 = (invoke_ii(145,($mrb|0))|0);
+ $60 = __THREW__; __THREW__ = 0;
+ if ((($60|0) != 0) & ((threwValue|0) != 0)) { $61 = _testSetjmp(HEAP32[$60>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($61|0) == 0) { _longjmp($60|0, threwValue|0); } tempRet0 = (threwValue); } else { $61 = -1; };
+ $62 = tempRet0;
+ $cond = ($61|0)==(1);
+ if ($cond) {
+  $$1 = $proc;$$reg2mem899$0 = $62;$ai$1 = 0;$exc_catched$1 = 0;$irep$1 = $52;$pc$1 = $54;$pool$1 = $56;$prev_jmp$1 = 0;$regs$1 = 0;$syms$1 = $58;
+ } else {
+  $63 = HEAP32[$mrb>>2]|0;
+  $$0 = $proc;$ai$0 = $59;$exc_catched$0 = 0;$irep$0 = $52;$pc$0 = $54;$pool$0 = $56;$prev_jmp$0 = $63;$regs$0 = 0;$syms$0 = $58;
+  label = 3;
+ }
+ L3: while(1) {
+  if ((label|0) == 3) {
+   label = 0;
+   _setjmpTable = _saveSetjmp($c_jmp,1,_setjmpTable|0,_setjmpTableSize|0)|0;_setjmpTableSize = tempRet0;
+   __THREW__ = 0;
+   $64 = __THREW__; __THREW__ = 0;
+   if ((($64|0) != 0) & ((threwValue|0) != 0)) { $65 = _testSetjmp(HEAP32[$64>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($65|0) == 0) { _longjmp($64|0, threwValue|0); } tempRet0 = (threwValue); } else { $65 = -1; };
+   $66 = tempRet0;
+   $cond999 = ($65|0)==(1);
+   if ($cond999) {
+    $$1 = $$0;$$reg2mem899$0 = $66;$ai$1 = $ai$0;$exc_catched$1 = $exc_catched$0;$irep$1 = $irep$0;$pc$1 = $pc$0;$pool$1 = $pool$0;$prev_jmp$1 = $prev_jmp$0;$regs$1 = $regs$0;$syms$1 = $syms$0;
+    continue;
+   }
+   $$1 = $$0;$$reg2mem899$0 = 0;$ai$1 = $ai$0;$exc_catched$1 = $exc_catched$0;$irep$1 = $irep$0;$pc$1 = $pc$0;$pool$1 = $pool$0;$prev_jmp$1 = $prev_jmp$0;$regs$1 = $regs$0;$syms$1 = $syms$0;
+  }
+  $67 = ($$reg2mem899$0|0)==(0);
+  if (!($67)) {
+   $$0 = $$1;$ai$0 = $ai$1;$exc_catched$0 = 1;$irep$0 = $irep$1;$pc$0 = $pc$1;$pool$0 = $pool$1;$prev_jmp$0 = $prev_jmp$1;$regs$0 = $regs$1;$syms$0 = $syms$1;
+   label = 3;
+   continue;
+  }
+  $68 = ($exc_catched$1<<24>>24)!=(0);
+  if ($68) {
+   $$5 = $$1;$exc_catched$2 = 0;$irep$5 = $irep$1;$pc$3 = $pc$1;$pool$3 = $pool$1;$regs$2 = $regs$1;$syms$3 = $syms$1;
+   label = 276;
+  } else {
+   HEAP32[$mrb>>2] = $c_jmp;
+   $69 = ((($mrb)) + 12|0);
+   $70 = HEAP32[$69>>2]|0;
+   $71 = ((($70)) + 4|0);
+   $72 = HEAP32[$71>>2]|0;
+   $73 = ($72|0)!=(0|0);
+   if (!($73)) {
+    __THREW__ = 0;
+    invoke_vi(134,($mrb|0));
+    $74 = __THREW__; __THREW__ = 0;
+    if ((($74|0) != 0) & ((threwValue|0) != 0)) { $75 = _testSetjmp(HEAP32[$74>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($75|0) == 0) { _longjmp($74|0, threwValue|0); } tempRet0 = (threwValue); } else { $75 = -1; };
+    $76 = tempRet0;
+    $cond1000 = ($75|0)==(1);
+    if ($cond1000) {
+     $syms$1$phi = $syms$1;$regs$1$phi = $regs$1;$prev_jmp$1$phi = $prev_jmp$1;$pool$1$phi = $pool$1;$pc$1$phi = $pc$1;$irep$1$phi = $irep$1;$exc_catched$1$phi = $exc_catched$1;$ai$1$phi = $ai$1;$$1$phi = $$1;$$reg2mem899$0 = $76;$syms$1 = $syms$1$phi;$regs$1 = $regs$1$phi;$prev_jmp$1 = $prev_jmp$1$phi;$pool$1 = $pool$1$phi;$pc$1 = $pc$1$phi;$irep$1 = $irep$1$phi;$exc_catched$1 = $exc_catched$1$phi;$ai$1 = $ai$1$phi;$$1 = $$1$phi;
+     continue;
+    }
+   }
+   $77 = ((($irep$1)) + 2|0);
+   $78 = HEAP16[$77>>1]|0;
+   $79 = $78&65535;
+   __THREW__ = 0;
+   invoke_viii(142,($mrb|0),($79|0),($stack_keep|0));
+   $80 = __THREW__; __THREW__ = 0;
+   if ((($80|0) != 0) & ((threwValue|0) != 0)) { $81 = _testSetjmp(HEAP32[$80>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($81|0) == 0) { _longjmp($80|0, threwValue|0); } tempRet0 = (threwValue); } else { $81 = -1; };
+   $82 = tempRet0;
+   $cond1001 = ($81|0)==(1);
+   if ($cond1001) {
+    $syms$1$phi = $syms$1;$regs$1$phi = $regs$1;$prev_jmp$1$phi = $prev_jmp$1;$pool$1$phi = $pool$1;$pc$1$phi = $pc$1;$irep$1$phi = $irep$1;$exc_catched$1$phi = $exc_catched$1;$ai$1$phi = $ai$1;$$1$phi = $$1;$$reg2mem899$0 = $82;$syms$1 = $syms$1$phi;$regs$1 = $regs$1$phi;$prev_jmp$1 = $prev_jmp$1$phi;$pool$1 = $pool$1$phi;$pc$1 = $pc$1$phi;$irep$1 = $irep$1$phi;$exc_catched$1 = $exc_catched$1$phi;$ai$1 = $ai$1$phi;$$1 = $$1$phi;
+    continue;
+   }
+   $83 = ((($mrb)) + 12|0);
+   $84 = HEAP32[$83>>2]|0;
+   $85 = ((($84)) + 16|0);
+   $86 = HEAP32[$85>>2]|0;
+   $87 = ((($86)) + 4|0);
+   HEAP32[$87>>2] = $$1;
+   $88 = ((($irep$1)) + 2|0);
+   $89 = HEAP16[$88>>1]|0;
+   $90 = $89&65535;
+   $91 = ((($mrb)) + 12|0);
+   $92 = HEAP32[$91>>2]|0;
+   $93 = ((($92)) + 16|0);
+   $94 = HEAP32[$93>>2]|0;
+   $95 = ((($94)) + 12|0);
+   HEAP32[$95>>2] = $90;
+   $96 = ((($mrb)) + 12|0);
+   $97 = HEAP32[$96>>2]|0;
+   $98 = ((($97)) + 4|0);
+   $99 = HEAP32[$98>>2]|0;
+   ;HEAP32[$99>>2]=HEAP32[$self>>2]|0;HEAP32[$99+4>>2]=HEAP32[$self+4>>2]|0;
+   $100 = HEAP32[$pc$1>>2]|0;
+   $101 = $100 & 127;
+   $102 = (200 + ($101<<2)|0);
+   $103 = HEAP32[$102>>2]|0;
+   $$8 = $$1;$$reg2mem887$0 = $103;$exc_catched$5 = $exc_catched$1;$i$2 = $100;$irep$8 = $irep$1;$pc$6 = $pc$1;$pool$6 = $pool$1;$regs$5 = $99;$syms$6 = $syms$1;
+   label = 590;
+  }
+  L19: while(1) {
+   if ((label|0) == 276) {
+    label = 0;
+    $1508 = ((($mrb)) + 12|0);
+    $1509 = HEAP32[$1508>>2]|0;
+    $1510 = ((($1509)) + 16|0);
+    $1511 = HEAP32[$1510>>2]|0;
+    $1512 = ((($mrb)) + 20|0);
+    $1513 = HEAP32[$1512>>2]|0;
+    __THREW__ = 0;
+    $1514 = (invoke_iiii(140,($mrb|0),(67980|0),6)|0);
+    $1515 = __THREW__; __THREW__ = 0;
+    if ((($1515|0) != 0) & ((threwValue|0) != 0)) { $1516 = _testSetjmp(HEAP32[$1515>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1516|0) == 0) { _longjmp($1515|0, threwValue|0); } tempRet0 = (threwValue); } else { $1516 = -1; };
+    $1517 = tempRet0;
+    $cond1008 = ($1516|0)==(1);
+    if ($cond1008) {
+     $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$5;$$reg2mem899$0 = $1517;$exc_catched$1 = $exc_catched$2;$irep$1 = $irep$5;$pc$1 = $pc$3;$pool$1 = $pool$3;$regs$1 = $regs$2;$syms$1 = $syms$3;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+     continue L3;
+    }
+    __THREW__ = 0;
+    invoke_viii(176,($24|0),($mrb|0),($pc$3|0));
+    $1518 = __THREW__; __THREW__ = 0;
+    if ((($1518|0) != 0) & ((threwValue|0) != 0)) { $1519 = _testSetjmp(HEAP32[$1518>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1519|0) == 0) { _longjmp($1518|0, threwValue|0); } tempRet0 = (threwValue); } else { $1519 = -1; };
+    $1520 = tempRet0;
+    $cond1009 = ($1519|0)==(1);
+    if ($cond1009) {
+     $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$5;$$reg2mem899$0 = $1520;$exc_catched$1 = $exc_catched$2;$irep$1 = $irep$5;$pc$1 = $pc$3;$pool$1 = $pool$3;$regs$1 = $regs$2;$syms$1 = $syms$3;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+     continue L3;
+    }
+    __THREW__ = 0;
+    ;HEAP32[$$byval_copy920>>2]=HEAP32[$24>>2]|0;HEAP32[$$byval_copy920+4>>2]=HEAP32[$24+4>>2]|0;
+    invoke_viiii(177,($mrb|0),($1513|0),($1514|0),($$byval_copy920|0));
+    $1521 = __THREW__; __THREW__ = 0;
+    if ((($1521|0) != 0) & ((threwValue|0) != 0)) { $1522 = _testSetjmp(HEAP32[$1521>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1522|0) == 0) { _longjmp($1521|0, threwValue|0); } tempRet0 = (threwValue); } else { $1522 = -1; };
+    $1523 = tempRet0;
+    $cond1010 = ($1522|0)==(1);
+    if ($cond1010) {
+     $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$5;$$reg2mem899$0 = $1523;$exc_catched$1 = $exc_catched$2;$irep$1 = $irep$5;$pc$1 = $pc$3;$pool$1 = $pool$3;$regs$1 = $regs$2;$syms$1 = $syms$3;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+     continue L3;
+    }
+    $1524 = ((($mrb)) + 20|0);
+    $1525 = HEAP32[$1524>>2]|0;
+    __THREW__ = 0;
+    $1526 = (invoke_iiii(140,($mrb|0),(67505|0),5)|0);
+    $1527 = __THREW__; __THREW__ = 0;
+    if ((($1527|0) != 0) & ((threwValue|0) != 0)) { $1528 = _testSetjmp(HEAP32[$1527>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1528|0) == 0) { _longjmp($1527|0, threwValue|0); } tempRet0 = (threwValue); } else { $1528 = -1; };
+    $1529 = tempRet0;
+    $cond1011 = ($1528|0)==(1);
+    if ($cond1011) {
+     $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$5;$$reg2mem899$0 = $1529;$exc_catched$1 = $exc_catched$2;$irep$1 = $irep$5;$pc$1 = $pc$3;$pool$1 = $pool$3;$regs$1 = $regs$2;$syms$1 = $syms$3;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+     continue L3;
+    }
+    $1530 = ((($mrb)) + 12|0);
+    $1531 = HEAP32[$1530>>2]|0;
+    $1532 = ((($1531)) + 20|0);
+    $1533 = HEAP32[$1532>>2]|0;
+    $1534 = $1511;
+    $1535 = $1533;
+    $1536 = (($1534) - ($1535))|0;
+    $1537 = (($1536|0) / 48)&-1;
+    __THREW__ = 0;
+    invoke_vii(136,($25|0),($1537|0));
+    $1538 = __THREW__; __THREW__ = 0;
+    if ((($1538|0) != 0) & ((threwValue|0) != 0)) { $1539 = _testSetjmp(HEAP32[$1538>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1539|0) == 0) { _longjmp($1538|0, threwValue|0); } tempRet0 = (threwValue); } else { $1539 = -1; };
+    $1540 = tempRet0;
+    $cond1012 = ($1539|0)==(1);
+    if ($cond1012) {
+     $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$5;$$reg2mem899$0 = $1540;$exc_catched$1 = $exc_catched$2;$irep$1 = $irep$5;$pc$1 = $pc$3;$pool$1 = $pool$3;$regs$1 = $regs$2;$syms$1 = $syms$3;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+     continue L3;
+    }
+    __THREW__ = 0;
+    ;HEAP32[$$byval_copy921>>2]=HEAP32[$25>>2]|0;HEAP32[$$byval_copy921+4>>2]=HEAP32[$25+4>>2]|0;
+    invoke_viiii(177,($mrb|0),($1525|0),($1526|0),($$byval_copy921|0));
+    $1541 = __THREW__; __THREW__ = 0;
+    if ((($1541|0) != 0) & ((threwValue|0) != 0)) { $1542 = _testSetjmp(HEAP32[$1541>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1542|0) == 0) { _longjmp($1541|0, threwValue|0); } tempRet0 = (threwValue); } else { $1542 = -1; };
+    $1543 = tempRet0;
+    $cond1013 = ($1542|0)==(1);
+    if ($cond1013) {
+     $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$5;$$reg2mem899$0 = $1543;$exc_catched$1 = $exc_catched$2;$irep$1 = $irep$5;$pc$1 = $pc$3;$pool$1 = $pool$3;$regs$1 = $regs$2;$syms$1 = $syms$3;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+     continue L3;
+    }
+    $1544 = ((($1511)) + 20|0);
+    $1545 = HEAP32[$1544>>2]|0;
+    $1546 = ((($mrb)) + 12|0);
+    $1547 = HEAP32[$1546>>2]|0;
+    $1548 = ((($1547)) + 20|0);
+    $1549 = HEAP32[$1548>>2]|0;
+    $1550 = ($1511|0)==($1549|0);
+    L28: do {
+     if ($1550) {
+      $1551 = ((($1511)) + 16|0);
+      $1552 = HEAP32[$1551>>2]|0;
+      $1553 = ($1552|0)==(0);
+      if ($1553) {
+       $$7 = $$5;$exc_catched$4 = $exc_catched$2;$irep$7 = $irep$5;$pc$5 = $pc$3;$pool$5 = $pool$3;$regs$4 = $regs$2;$syms$5 = $syms$3;
+       break L19;
+      } else {
+       $ci31$1 = $1511;
+      }
+     } else {
+      $ci31$0 = $1511;$eidx32$0 = $1545;
+      L30: while(1) {
+       $1554 = ((($ci31$0)) + 16|0);
+       $1555 = HEAP32[$1554>>2]|0;
+       $1556 = ((($ci31$0)) + -48|0);
+       $1557 = ((($1556)) + 16|0);
+       $1558 = HEAP32[$1557>>2]|0;
+       $1559 = ($1555|0)==($1558|0);
+       if (!($1559)) {
+        $ci31$1 = $ci31$0;
+        break L28;
+       }
+       __THREW__ = 0;
+       invoke_vi(132,($mrb|0));
+       $1560 = __THREW__; __THREW__ = 0;
+       if ((($1560|0) != 0) & ((threwValue|0) != 0)) { $1561 = _testSetjmp(HEAP32[$1560>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1561|0) == 0) { _longjmp($1560|0, threwValue|0); } tempRet0 = (threwValue); } else { $1561 = -1; };
+       $1562 = tempRet0;
+       $cond1014 = ($1561|0)==(1);
+       if ($cond1014) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$5;$$reg2mem899$0 = $1562;$exc_catched$1 = $exc_catched$2;$irep$1 = $irep$5;$pc$1 = $pc$3;$pool$1 = $pool$3;$regs$1 = $regs$2;$syms$1 = $syms$3;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       $1563 = ((($mrb)) + 12|0);
+       $1564 = HEAP32[$1563>>2]|0;
+       $1565 = ((($1564)) + 16|0);
+       $1566 = HEAP32[$1565>>2]|0;
+       $1567 = ((($1566)) + 48|0);
+       $1568 = ((($1567)) + 8|0);
+       $1569 = HEAP32[$1568>>2]|0;
+       $1570 = ((($mrb)) + 12|0);
+       $1571 = HEAP32[$1570>>2]|0;
+       $1572 = ((($1571)) + 4|0);
+       HEAP32[$1572>>2] = $1569;
+       $1573 = ((($1566)) + 48|0);
+       $1574 = ((($1573)) + 40|0);
+       $1575 = HEAP32[$1574>>2]|0;
+       $1576 = ($1575|0)==(-1);
+       $1577 = ($prev_jmp$1|0)!=(0|0);
+       $or$cond4 = $1576 & $1577;
+       if ($or$cond4) {
+        label = 287;
+        break L19;
+       }
+       $1581 = ((($mrb)) + 12|0);
+       $1582 = HEAP32[$1581>>2]|0;
+       $1583 = ((($1582)) + 20|0);
+       $1584 = HEAP32[$1583>>2]|0;
+       $1585 = ($1566|0)==($1584|0);
+       if ($1585) {
+        $eidx32$1 = $eidx32$0;
+        break;
+       }
+       $1608 = ((($1566)) + 16|0);
+       $1609 = HEAP32[$1608>>2]|0;
+       $1610 = ((($1566)) + -48|0);
+       $1611 = ((($1610)) + 16|0);
+       $1612 = HEAP32[$1611>>2]|0;
+       $1613 = ($1609|0)==($1612|0);
+       if ($1613) {
+        $eidx32$2 = $eidx32$0;
+       } else {
+        $eidx32$0$phi = $eidx32$0;$ci31$0 = $1566;$eidx32$0 = $eidx32$0$phi;
+        continue;
+       }
+       while(1) {
+        $1614 = ((($1566)) + -48|0);
+        $1615 = ((($1614)) + 20|0);
+        $1616 = HEAP32[$1615>>2]|0;
+        $1617 = ($eidx32$2|0)>($1616|0);
+        if (!($1617)) {
+         $ci31$0 = $1566;$eidx32$0 = $eidx32$2;
+         continue L30;
+        }
+        $1618 = (($eidx32$2) + -1)|0;
+        __THREW__ = 0;
+        invoke_vii(166,($mrb|0),($1618|0));
+        $1619 = __THREW__; __THREW__ = 0;
+        if ((($1619|0) != 0) & ((threwValue|0) != 0)) { $1620 = _testSetjmp(HEAP32[$1619>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1620|0) == 0) { _longjmp($1619|0, threwValue|0); } tempRet0 = (threwValue); } else { $1620 = -1; };
+        $1621 = tempRet0;
+        $cond1015 = ($1620|0)==(1);
+        if ($cond1015) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$5;$$reg2mem899$0 = $1621;$exc_catched$1 = $exc_catched$2;$irep$1 = $irep$5;$pc$1 = $pc$3;$pool$1 = $pool$3;$regs$1 = $regs$2;$syms$1 = $syms$3;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        $eidx32$2 = $1618;
+       }
+      }
+      while(1) {
+       $1586 = ($eidx32$1|0)>(0);
+       if (!($1586)) {
+        break;
+       }
+       $1587 = (($eidx32$1) + -1)|0;
+       __THREW__ = 0;
+       invoke_vii(166,($mrb|0),($1587|0));
+       $1588 = __THREW__; __THREW__ = 0;
+       if ((($1588|0) != 0) & ((threwValue|0) != 0)) { $1589 = _testSetjmp(HEAP32[$1588>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1589|0) == 0) { _longjmp($1588|0, threwValue|0); } tempRet0 = (threwValue); } else { $1589 = -1; };
+       $1590 = tempRet0;
+       $cond1016 = ($1589|0)==(1);
+       if ($cond1016) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$5;$$reg2mem899$0 = $1590;$exc_catched$1 = $exc_catched$2;$irep$1 = $irep$5;$pc$1 = $pc$3;$pool$1 = $pool$3;$regs$1 = $regs$2;$syms$1 = $syms$3;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       $eidx32$1 = $1587;
+      }
+      $1591 = ((($1566)) + 16|0);
+      $1592 = HEAP32[$1591>>2]|0;
+      $1593 = ($1592|0)==(0);
+      if ($1593) {
+       $1594 = ((($mrb)) + 12|0);
+       $1595 = HEAP32[$1594>>2]|0;
+       $1596 = ((($mrb)) + 16|0);
+       $1597 = HEAP32[$1596>>2]|0;
+       $1598 = ($1595|0)==($1597|0);
+       $1599 = ((($mrb)) + 12|0);
+       $1600 = HEAP32[$1599>>2]|0;
+       if ($1598) {
+        label = 294;
+        break L19;
+       }
+       $1606 = HEAP32[$1600>>2]|0;
+       $1607 = ((($mrb)) + 12|0);
+       HEAP32[$1607>>2] = $1606;
+       HEAP32[$1600>>2] = 0;
+       $syms$3$phi = $syms$3;$regs$2$phi = $regs$2;$pool$3$phi = $pool$3;$pc$3$phi = $pc$3;$irep$5$phi = $irep$5;$exc_catched$2$phi = $exc_catched$2;$$5$phi = $$5;$syms$3 = $syms$3$phi;$regs$2 = $regs$2$phi;$pool$3 = $pool$3$phi;$pc$3 = $pc$3$phi;$irep$5 = $irep$5$phi;$exc_catched$2 = $exc_catched$2$phi;$$5 = $$5$phi;
+       label = 276;
+       continue L19;
+      } else {
+       $ci31$1 = $1566;
+      }
+     }
+    } while(0);
+    $1622 = ((($ci31$1)) + 16|0);
+    $1623 = HEAP32[$1622>>2]|0;
+    $1624 = ($1623|0)==(0);
+    if ($1624) {
+     $$7 = $$5;$exc_catched$4 = $exc_catched$2;$irep$7 = $irep$5;$pc$5 = $pc$3;$pool$5 = $pool$3;$regs$4 = $regs$2;$syms$5 = $syms$3;
+     break;
+    }
+    $1625 = ((($ci31$1)) + 4|0);
+    $1626 = HEAP32[$1625>>2]|0;
+    $1627 = ((($1626)) + 12|0);
+    $1628 = HEAP32[$1627>>2]|0;
+    $1629 = ((($1628)) + 12|0);
+    $1630 = HEAP32[$1629>>2]|0;
+    $1631 = ((($1628)) + 16|0);
+    $1632 = HEAP32[$1631>>2]|0;
+    $1633 = ((($ci31$1)) + 48|0);
+    $1634 = ((($1633)) + 8|0);
+    $1635 = HEAP32[$1634>>2]|0;
+    $1636 = ((($mrb)) + 12|0);
+    $1637 = HEAP32[$1636>>2]|0;
+    $1638 = ((($1637)) + 4|0);
+    HEAP32[$1638>>2] = $1635;
+    $1639 = ((($ci31$1)) + 16|0);
+    $1640 = HEAP32[$1639>>2]|0;
+    $1641 = (($1640) + -1)|0;
+    HEAP32[$1639>>2] = $1641;
+    $1642 = ((($mrb)) + 12|0);
+    $1643 = HEAP32[$1642>>2]|0;
+    $1644 = ((($1643)) + 28|0);
+    $1645 = HEAP32[$1644>>2]|0;
+    $1646 = (($1645) + ($1641<<2)|0);
+    $1647 = HEAP32[$1646>>2]|0;
+    $$6 = $1626;$exc_catched$3 = $exc_catched$2;$irep$6 = $1628;$pc$4 = $1647;$pool$4 = $1630;$regs$3 = $1635;$syms$4 = $1632;
+   }
+   else if ((label|0) == 590) {
+    label = 0;
+    $indirectbr_cast = $$reg2mem887$0;
+    L50: do {
+     switch ($indirectbr_cast|0) {
+     case 75:  {
+      $$7 = $$8;$exc_catched$4 = $exc_catched$5;$irep$7 = $irep$8;$pc$5 = $pc$6;$pool$5 = $pool$6;$regs$4 = $regs$5;$syms$5 = $syms$6;
+      break L19;
+      break;
+     }
+     case 1:  {
+      $104 = ((($pc$6)) + 4|0);
+      $105 = HEAP32[$104>>2]|0;
+      $106 = $105 & 127;
+      $107 = (200 + ($106<<2)|0);
+      $108 = HEAP32[$107>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $108;$i$2 = $105;$pc$6 = $104;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 2:  {
+      $109 = $i$2 >>> 23;
+      $110 = $109 & 511;
+      $111 = (($regs$5) + ($110<<3)|0);
+      $112 = $i$2 >>> 14;
+      $113 = $112 & 511;
+      $114 = (($regs$5) + ($113<<3)|0);
+      ;HEAP32[$111>>2]=HEAP32[$114>>2]|0;HEAP32[$111+4>>2]=HEAP32[$114+4>>2]|0;
+      $115 = ((($pc$6)) + 4|0);
+      $116 = HEAP32[$115>>2]|0;
+      $117 = $116 & 127;
+      $118 = (200 + ($117<<2)|0);
+      $119 = HEAP32[$118>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $119;$i$2 = $116;$pc$6 = $115;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 3:  {
+      $120 = $i$2 >>> 23;
+      $121 = $120 & 511;
+      $122 = (($regs$5) + ($121<<3)|0);
+      $123 = $i$2 >>> 7;
+      $124 = $123 & 65535;
+      $125 = (($pool$6) + ($124<<3)|0);
+      ;HEAP32[$122>>2]=HEAP32[$125>>2]|0;HEAP32[$122+4>>2]=HEAP32[$125+4>>2]|0;
+      $126 = ((($pc$6)) + 4|0);
+      $127 = HEAP32[$126>>2]|0;
+      $128 = $127 & 127;
+      $129 = (200 + ($128<<2)|0);
+      $130 = HEAP32[$129>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $130;$i$2 = $127;$pc$6 = $126;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 4:  {
+      $131 = $i$2 >>> 23;
+      $132 = $131 & 511;
+      $133 = (($regs$5) + ($132<<3)|0);
+      $134 = ((($133)) + 4|0);
+      HEAP32[$134>>2] = 3;
+      $135 = $i$2 >>> 7;
+      $136 = $135 & 65535;
+      $137 = (($136) - 32767)|0;
+      $138 = $i$2 >>> 23;
+      $139 = $138 & 511;
+      $140 = (($regs$5) + ($139<<3)|0);
+      HEAP32[$140>>2] = $137;
+      $141 = ((($pc$6)) + 4|0);
+      $142 = HEAP32[$141>>2]|0;
+      $143 = $142 & 127;
+      $144 = (200 + ($143<<2)|0);
+      $145 = HEAP32[$144>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $145;$i$2 = $142;$pc$6 = $141;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 5:  {
+      $146 = $i$2 >>> 23;
+      $147 = $146 & 511;
+      $148 = (($regs$5) + ($147<<3)|0);
+      $149 = ((($148)) + 4|0);
+      HEAP32[$149>>2] = 4;
+      $150 = $i$2 >>> 7;
+      $151 = $150 & 65535;
+      $152 = (($syms$6) + ($151<<2)|0);
+      $153 = HEAP32[$152>>2]|0;
+      $154 = $i$2 >>> 23;
+      $155 = $154 & 511;
+      $156 = (($regs$5) + ($155<<3)|0);
+      HEAP32[$156>>2] = $153;
+      $157 = ((($pc$6)) + 4|0);
+      $158 = HEAP32[$157>>2]|0;
+      $159 = $158 & 127;
+      $160 = (200 + ($159<<2)|0);
+      $161 = HEAP32[$160>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $161;$i$2 = $158;$pc$6 = $157;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 6:  {
+      $697 = $i$2 >>> 23;
+      $698 = $697 & 511;
+      $699 = (($regs$5) + ($698<<3)|0);
+      $700 = ((($699)) + 4|0);
+      HEAP32[$700>>2] = 0;
+      $701 = (($regs$5) + ($698<<3)|0);
+      HEAP32[$701>>2] = 0;
+      $702 = ((($pc$6)) + 4|0);
+      $703 = HEAP32[$702>>2]|0;
+      $704 = $703 & 127;
+      $705 = (200 + ($704<<2)|0);
+      $706 = HEAP32[$705>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $706;$i$2 = $703;$pc$6 = $702;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 7:  {
+      $162 = $i$2 >>> 23;
+      $163 = $162 & 511;
+      $164 = (($regs$5) + ($163<<3)|0);
+      ;HEAP32[$164>>2]=HEAP32[$regs$5>>2]|0;HEAP32[$164+4>>2]=HEAP32[$regs$5+4>>2]|0;
+      $165 = ((($pc$6)) + 4|0);
+      $166 = HEAP32[$165>>2]|0;
+      $167 = $166 & 127;
+      $168 = (200 + ($167<<2)|0);
+      $169 = HEAP32[$168>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $169;$i$2 = $166;$pc$6 = $165;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 8:  {
+      $170 = $i$2 >>> 23;
+      $171 = $170 & 511;
+      $172 = (($regs$5) + ($171<<3)|0);
+      $173 = ((($172)) + 4|0);
+      HEAP32[$173>>2] = 2;
+      $174 = $i$2 >>> 23;
+      $175 = $174 & 511;
+      $176 = (($regs$5) + ($175<<3)|0);
+      HEAP32[$176>>2] = 1;
+      $177 = ((($pc$6)) + 4|0);
+      $178 = HEAP32[$177>>2]|0;
+      $179 = $178 & 127;
+      $180 = (200 + ($179<<2)|0);
+      $181 = HEAP32[$180>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $181;$i$2 = $178;$pc$6 = $177;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 9:  {
+      $182 = $i$2 >>> 23;
+      $183 = $182 & 511;
+      $184 = (($regs$5) + ($183<<3)|0);
+      $185 = ((($184)) + 4|0);
+      HEAP32[$185>>2] = 0;
+      $186 = $i$2 >>> 23;
+      $187 = $186 & 511;
+      $188 = (($regs$5) + ($187<<3)|0);
+      HEAP32[$188>>2] = 1;
+      $189 = ((($pc$6)) + 4|0);
+      $190 = HEAP32[$189>>2]|0;
+      $191 = $190 & 127;
+      $192 = (200 + ($191<<2)|0);
+      $193 = HEAP32[$192>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $193;$i$2 = $190;$pc$6 = $189;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 10:  {
+      $194 = $i$2 >>> 23;
+      $195 = $194 & 511;
+      $196 = (($regs$5) + ($195<<3)|0);
+      $197 = $i$2 >>> 7;
+      $198 = $197 & 65535;
+      $199 = (($syms$6) + ($198<<2)|0);
+      $200 = HEAP32[$199>>2]|0;
+      __THREW__ = 0;
+      invoke_viii(149,($0|0),($mrb|0),($200|0));
+      $201 = __THREW__; __THREW__ = 0;
+      if ((($201|0) != 0) & ((threwValue|0) != 0)) { $202 = _testSetjmp(HEAP32[$201>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($202|0) == 0) { _longjmp($201|0, threwValue|0); } tempRet0 = (threwValue); } else { $202 = -1; };
+      $203 = tempRet0;
+      $cond1160 = ($202|0)==(1);
+      if ($cond1160) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $203;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      ;HEAP32[$196>>2]=HEAP32[$0>>2]|0;HEAP32[$196+4>>2]=HEAP32[$0+4>>2]|0;
+      $204 = ((($pc$6)) + 4|0);
+      $205 = HEAP32[$204>>2]|0;
+      $206 = $205 & 127;
+      $207 = (200 + ($206<<2)|0);
+      $208 = HEAP32[$207>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $208;$i$2 = $205;$pc$6 = $204;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 11:  {
+      $209 = $i$2 >>> 7;
+      $210 = $209 & 65535;
+      $211 = (($syms$6) + ($210<<2)|0);
+      $212 = HEAP32[$211>>2]|0;
+      $213 = $i$2 >>> 23;
+      $214 = $213 & 511;
+      $215 = (($regs$5) + ($214<<3)|0);
+      __THREW__ = 0;
+      ;HEAP32[$$byval_copy>>2]=HEAP32[$215>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$215+4>>2]|0;
+      invoke_viii(150,($mrb|0),($212|0),($$byval_copy|0));
+      $216 = __THREW__; __THREW__ = 0;
+      if ((($216|0) != 0) & ((threwValue|0) != 0)) { $217 = _testSetjmp(HEAP32[$216>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($217|0) == 0) { _longjmp($216|0, threwValue|0); } tempRet0 = (threwValue); } else { $217 = -1; };
+      $218 = tempRet0;
+      $cond1159 = ($217|0)==(1);
+      if ($cond1159) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $218;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $219 = ((($pc$6)) + 4|0);
+      $220 = HEAP32[$219>>2]|0;
+      $221 = $220 & 127;
+      $222 = (200 + ($221<<2)|0);
+      $223 = HEAP32[$222>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $223;$i$2 = $220;$pc$6 = $219;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 12:  {
+      $224 = $i$2 >>> 23;
+      $225 = $224 & 511;
+      $226 = (($regs$5) + ($225<<3)|0);
+      $227 = $i$2 >>> 7;
+      $228 = $227 & 65535;
+      __THREW__ = 0;
+      invoke_viii(151,($1|0),($mrb|0),($228|0));
+      $229 = __THREW__; __THREW__ = 0;
+      if ((($229|0) != 0) & ((threwValue|0) != 0)) { $230 = _testSetjmp(HEAP32[$229>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($230|0) == 0) { _longjmp($229|0, threwValue|0); } tempRet0 = (threwValue); } else { $230 = -1; };
+      $231 = tempRet0;
+      $cond1158 = ($230|0)==(1);
+      if ($cond1158) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $231;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      ;HEAP32[$226>>2]=HEAP32[$1>>2]|0;HEAP32[$226+4>>2]=HEAP32[$1+4>>2]|0;
+      $232 = ((($pc$6)) + 4|0);
+      $233 = HEAP32[$232>>2]|0;
+      $234 = $233 & 127;
+      $235 = (200 + ($234<<2)|0);
+      $236 = HEAP32[$235>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $236;$i$2 = $233;$pc$6 = $232;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 13:  {
+      $237 = $i$2 >>> 7;
+      $238 = $237 & 65535;
+      $239 = $i$2 >>> 23;
+      $240 = $239 & 511;
+      $241 = (($regs$5) + ($240<<3)|0);
+      __THREW__ = 0;
+      ;HEAP32[$$byval_copy903>>2]=HEAP32[$241>>2]|0;HEAP32[$$byval_copy903+4>>2]=HEAP32[$241+4>>2]|0;
+      invoke_viii(152,($mrb|0),($238|0),($$byval_copy903|0));
+      $242 = __THREW__; __THREW__ = 0;
+      if ((($242|0) != 0) & ((threwValue|0) != 0)) { $243 = _testSetjmp(HEAP32[$242>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($243|0) == 0) { _longjmp($242|0, threwValue|0); } tempRet0 = (threwValue); } else { $243 = -1; };
+      $244 = tempRet0;
+      $cond1157 = ($243|0)==(1);
+      if ($cond1157) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $244;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $245 = ((($pc$6)) + 4|0);
+      $246 = HEAP32[$245>>2]|0;
+      $247 = $246 & 127;
+      $248 = (200 + ($247<<2)|0);
+      $249 = HEAP32[$248>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $249;$i$2 = $246;$pc$6 = $245;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 14:  {
+      $250 = $i$2 >>> 23;
+      $251 = $250 & 511;
+      $252 = (($regs$5) + ($251<<3)|0);
+      $253 = $i$2 >>> 7;
+      $254 = $253 & 65535;
+      $255 = (($syms$6) + ($254<<2)|0);
+      $256 = HEAP32[$255>>2]|0;
+      __THREW__ = 0;
+      invoke_viii(153,($2|0),($mrb|0),($256|0));
+      $257 = __THREW__; __THREW__ = 0;
+      if ((($257|0) != 0) & ((threwValue|0) != 0)) { $258 = _testSetjmp(HEAP32[$257>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($258|0) == 0) { _longjmp($257|0, threwValue|0); } tempRet0 = (threwValue); } else { $258 = -1; };
+      $259 = tempRet0;
+      $cond1156 = ($258|0)==(1);
+      if ($cond1156) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $259;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      ;HEAP32[$252>>2]=HEAP32[$2>>2]|0;HEAP32[$252+4>>2]=HEAP32[$2+4>>2]|0;
+      $260 = ((($pc$6)) + 4|0);
+      $261 = HEAP32[$260>>2]|0;
+      $262 = $261 & 127;
+      $263 = (200 + ($262<<2)|0);
+      $264 = HEAP32[$263>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $264;$i$2 = $261;$pc$6 = $260;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 15:  {
+      $265 = $i$2 >>> 7;
+      $266 = $265 & 65535;
+      $267 = (($syms$6) + ($266<<2)|0);
+      $268 = HEAP32[$267>>2]|0;
+      $269 = $i$2 >>> 23;
+      $270 = $269 & 511;
+      $271 = (($regs$5) + ($270<<3)|0);
+      __THREW__ = 0;
+      ;HEAP32[$$byval_copy904>>2]=HEAP32[$271>>2]|0;HEAP32[$$byval_copy904+4>>2]=HEAP32[$271+4>>2]|0;
+      invoke_viii(154,($mrb|0),($268|0),($$byval_copy904|0));
+      $272 = __THREW__; __THREW__ = 0;
+      if ((($272|0) != 0) & ((threwValue|0) != 0)) { $273 = _testSetjmp(HEAP32[$272>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($273|0) == 0) { _longjmp($272|0, threwValue|0); } tempRet0 = (threwValue); } else { $273 = -1; };
+      $274 = tempRet0;
+      $cond1155 = ($273|0)==(1);
+      if ($cond1155) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $274;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $275 = ((($pc$6)) + 4|0);
+      $276 = HEAP32[$275>>2]|0;
+      $277 = $276 & 127;
+      $278 = (200 + ($277<<2)|0);
+      $279 = HEAP32[$278>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $279;$i$2 = $276;$pc$6 = $275;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 16:  {
+      $280 = ((($mrb)) + 12|0);
+      $281 = HEAP32[$280>>2]|0;
+      $282 = ((($281)) + 16|0);
+      $283 = HEAP32[$282>>2]|0;
+      $284 = ((($283)) + 32|0);
+      HEAP32[$284>>2] = $pc$6;
+      $285 = $i$2 >>> 23;
+      $286 = $285 & 511;
+      $287 = (($regs$5) + ($286<<3)|0);
+      $288 = $i$2 >>> 7;
+      $289 = $288 & 65535;
+      $290 = (($syms$6) + ($289<<2)|0);
+      $291 = HEAP32[$290>>2]|0;
+      __THREW__ = 0;
+      invoke_viii(155,($3|0),($mrb|0),($291|0));
+      $292 = __THREW__; __THREW__ = 0;
+      if ((($292|0) != 0) & ((threwValue|0) != 0)) { $293 = _testSetjmp(HEAP32[$292>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($293|0) == 0) { _longjmp($292|0, threwValue|0); } tempRet0 = (threwValue); } else { $293 = -1; };
+      $294 = tempRet0;
+      $cond1154 = ($293|0)==(1);
+      if ($cond1154) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $294;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      ;HEAP32[$287>>2]=HEAP32[$3>>2]|0;HEAP32[$287+4>>2]=HEAP32[$3+4>>2]|0;
+      $295 = ((($mrb)) + 12|0);
+      $296 = HEAP32[$295>>2]|0;
+      $297 = ((($296)) + 16|0);
+      $298 = HEAP32[$297>>2]|0;
+      $299 = ((($298)) + 32|0);
+      HEAP32[$299>>2] = 0;
+      $300 = ((($pc$6)) + 4|0);
+      $301 = HEAP32[$300>>2]|0;
+      $302 = $301 & 127;
+      $303 = (200 + ($302<<2)|0);
+      $304 = HEAP32[$303>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $304;$i$2 = $301;$pc$6 = $300;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 17:  {
+      $305 = $i$2 >>> 7;
+      $306 = $305 & 65535;
+      $307 = (($syms$6) + ($306<<2)|0);
+      $308 = HEAP32[$307>>2]|0;
+      $309 = $i$2 >>> 23;
+      $310 = $309 & 511;
+      $311 = (($regs$5) + ($310<<3)|0);
+      __THREW__ = 0;
+      ;HEAP32[$$byval_copy905>>2]=HEAP32[$311>>2]|0;HEAP32[$$byval_copy905+4>>2]=HEAP32[$311+4>>2]|0;
+      invoke_viii(156,($mrb|0),($308|0),($$byval_copy905|0));
+      $312 = __THREW__; __THREW__ = 0;
+      if ((($312|0) != 0) & ((threwValue|0) != 0)) { $313 = _testSetjmp(HEAP32[$312>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($313|0) == 0) { _longjmp($312|0, threwValue|0); } tempRet0 = (threwValue); } else { $313 = -1; };
+      $314 = tempRet0;
+      $cond1153 = ($313|0)==(1);
+      if ($cond1153) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $314;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $315 = ((($pc$6)) + 4|0);
+      $316 = HEAP32[$315>>2]|0;
+      $317 = $316 & 127;
+      $318 = (200 + ($317<<2)|0);
+      $319 = HEAP32[$318>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $319;$i$2 = $316;$pc$6 = $315;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 18:  {
+      $320 = ((($mrb)) + 12|0);
+      $321 = HEAP32[$320>>2]|0;
+      $322 = ((($321)) + 16|0);
+      $323 = HEAP32[$322>>2]|0;
+      $324 = ((($323)) + 32|0);
+      HEAP32[$324>>2] = $pc$6;
+      $325 = $i$2 >>> 7;
+      $326 = $325 & 65535;
+      $327 = (($syms$6) + ($326<<2)|0);
+      $328 = HEAP32[$327>>2]|0;
+      __THREW__ = 0;
+      invoke_viii(157,($4|0),($mrb|0),($328|0));
+      $329 = __THREW__; __THREW__ = 0;
+      if ((($329|0) != 0) & ((threwValue|0) != 0)) { $330 = _testSetjmp(HEAP32[$329>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($330|0) == 0) { _longjmp($329|0, threwValue|0); } tempRet0 = (threwValue); } else { $330 = -1; };
+      $331 = tempRet0;
+      $cond1152 = ($330|0)==(1);
+      if ($cond1152) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $331;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      ;HEAP32[$val>>2]=HEAP32[$4>>2]|0;HEAP32[$val+4>>2]=HEAP32[$4+4>>2]|0;
+      $332 = ((($mrb)) + 12|0);
+      $333 = HEAP32[$332>>2]|0;
+      $334 = ((($333)) + 16|0);
+      $335 = HEAP32[$334>>2]|0;
+      $336 = ((($335)) + 32|0);
+      HEAP32[$336>>2] = 0;
+      $337 = ((($mrb)) + 12|0);
+      $338 = HEAP32[$337>>2]|0;
+      $339 = ((($338)) + 4|0);
+      $340 = HEAP32[$339>>2]|0;
+      $341 = $i$2 >>> 23;
+      $342 = $341 & 511;
+      $343 = (($340) + ($342<<3)|0);
+      ;HEAP32[$343>>2]=HEAP32[$val>>2]|0;HEAP32[$343+4>>2]=HEAP32[$val+4>>2]|0;
+      $344 = ((($pc$6)) + 4|0);
+      $345 = HEAP32[$344>>2]|0;
+      $346 = $345 & 127;
+      $347 = (200 + ($346<<2)|0);
+      $348 = HEAP32[$347>>2]|0;
+      $syms$6$phi = $syms$6;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $348;$i$2 = $345;$pc$6 = $344;$regs$5 = $340;$syms$6 = $syms$6$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 19:  {
+      $349 = $i$2 >>> 7;
+      $350 = $349 & 65535;
+      $351 = (($syms$6) + ($350<<2)|0);
+      $352 = HEAP32[$351>>2]|0;
+      $353 = $i$2 >>> 23;
+      $354 = $353 & 511;
+      $355 = (($regs$5) + ($354<<3)|0);
+      __THREW__ = 0;
+      ;HEAP32[$$byval_copy906>>2]=HEAP32[$355>>2]|0;HEAP32[$$byval_copy906+4>>2]=HEAP32[$355+4>>2]|0;
+      invoke_viii(158,($mrb|0),($352|0),($$byval_copy906|0));
+      $356 = __THREW__; __THREW__ = 0;
+      if ((($356|0) != 0) & ((threwValue|0) != 0)) { $357 = _testSetjmp(HEAP32[$356>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($357|0) == 0) { _longjmp($356|0, threwValue|0); } tempRet0 = (threwValue); } else { $357 = -1; };
+      $358 = tempRet0;
+      $cond1151 = ($357|0)==(1);
+      if ($cond1151) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $358;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $359 = ((($pc$6)) + 4|0);
+      $360 = HEAP32[$359>>2]|0;
+      $361 = $360 & 127;
+      $362 = (200 + ($361<<2)|0);
+      $363 = HEAP32[$362>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $363;$i$2 = $360;$pc$6 = $359;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 20:  {
+      $364 = $i$2 >>> 23;
+      $365 = $364 & 511;
+      $366 = ((($mrb)) + 12|0);
+      $367 = HEAP32[$366>>2]|0;
+      $368 = ((($367)) + 16|0);
+      $369 = HEAP32[$368>>2]|0;
+      $370 = ((($369)) + 32|0);
+      HEAP32[$370>>2] = $pc$6;
+      $371 = (($regs$5) + ($365<<3)|0);
+      $372 = $i$2 >>> 7;
+      $373 = $372 & 65535;
+      $374 = (($syms$6) + ($373<<2)|0);
+      $375 = HEAP32[$374>>2]|0;
+      __THREW__ = 0;
+      ;HEAP32[$$byval_copy907>>2]=HEAP32[$371>>2]|0;HEAP32[$$byval_copy907+4>>2]=HEAP32[$371+4>>2]|0;
+      invoke_viiii(159,($5|0),($mrb|0),($$byval_copy907|0),($375|0));
+      $376 = __THREW__; __THREW__ = 0;
+      if ((($376|0) != 0) & ((threwValue|0) != 0)) { $377 = _testSetjmp(HEAP32[$376>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($377|0) == 0) { _longjmp($376|0, threwValue|0); } tempRet0 = (threwValue); } else { $377 = -1; };
+      $378 = tempRet0;
+      $cond1150 = ($377|0)==(1);
+      if ($cond1150) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $378;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      ;HEAP32[$val1>>2]=HEAP32[$5>>2]|0;HEAP32[$val1+4>>2]=HEAP32[$5+4>>2]|0;
+      $379 = ((($mrb)) + 12|0);
+      $380 = HEAP32[$379>>2]|0;
+      $381 = ((($380)) + 16|0);
+      $382 = HEAP32[$381>>2]|0;
+      $383 = ((($382)) + 32|0);
+      HEAP32[$383>>2] = 0;
+      $384 = ((($mrb)) + 12|0);
+      $385 = HEAP32[$384>>2]|0;
+      $386 = ((($385)) + 4|0);
+      $387 = HEAP32[$386>>2]|0;
+      $388 = (($387) + ($365<<3)|0);
+      ;HEAP32[$388>>2]=HEAP32[$val1>>2]|0;HEAP32[$388+4>>2]=HEAP32[$val1+4>>2]|0;
+      $389 = ((($pc$6)) + 4|0);
+      $390 = HEAP32[$389>>2]|0;
+      $391 = $390 & 127;
+      $392 = (200 + ($391<<2)|0);
+      $393 = HEAP32[$392>>2]|0;
+      $syms$6$phi = $syms$6;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $393;$i$2 = $390;$pc$6 = $389;$regs$5 = $387;$syms$6 = $syms$6$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 21:  {
+      $394 = $i$2 >>> 23;
+      $395 = $394 & 511;
+      $396 = (($395) + 1)|0;
+      $397 = (($regs$5) + ($396<<3)|0);
+      $398 = $i$2 >>> 7;
+      $399 = $398 & 65535;
+      $400 = (($syms$6) + ($399<<2)|0);
+      $401 = HEAP32[$400>>2]|0;
+      $402 = (($regs$5) + ($395<<3)|0);
+      __THREW__ = 0;
+      ;HEAP32[$$byval_copy908>>2]=HEAP32[$397>>2]|0;HEAP32[$$byval_copy908+4>>2]=HEAP32[$397+4>>2]|0;
+      ;HEAP32[$$byval_copy909>>2]=HEAP32[$402>>2]|0;HEAP32[$$byval_copy909+4>>2]=HEAP32[$402+4>>2]|0;
+      invoke_viiii(160,($mrb|0),($$byval_copy908|0),($401|0),($$byval_copy909|0));
+      $403 = __THREW__; __THREW__ = 0;
+      if ((($403|0) != 0) & ((threwValue|0) != 0)) { $404 = _testSetjmp(HEAP32[$403>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($404|0) == 0) { _longjmp($403|0, threwValue|0); } tempRet0 = (threwValue); } else { $404 = -1; };
+      $405 = tempRet0;
+      $cond1149 = ($404|0)==(1);
+      if ($cond1149) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $405;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $406 = ((($pc$6)) + 4|0);
+      $407 = HEAP32[$406>>2]|0;
+      $408 = $407 & 127;
+      $409 = (200 + ($408<<2)|0);
+      $410 = HEAP32[$409>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $410;$i$2 = $407;$pc$6 = $406;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 22:  {
+      $411 = $i$2 >>> 23;
+      $412 = $411 & 511;
+      $413 = (($regs$5) + ($412<<3)|0);
+      $414 = $i$2 >>> 7;
+      $415 = $414 & 127;
+      __THREW__ = 0;
+      $416 = (invoke_iii(161,($mrb|0),($415|0))|0);
+      $417 = __THREW__; __THREW__ = 0;
+      if ((($417|0) != 0) & ((threwValue|0) != 0)) { $418 = _testSetjmp(HEAP32[$417>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($418|0) == 0) { _longjmp($417|0, threwValue|0); } tempRet0 = (threwValue); } else { $418 = -1; };
+      $419 = tempRet0;
+      $cond1147 = ($418|0)==(1);
+      if ($cond1147) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $419;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $420 = ($416|0)!=(0|0);
+      if ($420) {
+       $424 = $i$2 >>> 14;
+       $425 = $424 & 511;
+       $426 = ((($416)) + 12|0);
+       $427 = HEAP32[$426>>2]|0;
+       $428 = (($427) + ($425<<3)|0);
+       ;HEAP32[$413>>2]=HEAP32[$428>>2]|0;HEAP32[$413+4>>2]=HEAP32[$428+4>>2]|0;
+      } else {
+       __THREW__ = 0;
+       invoke_vi(162,($6|0));
+       $421 = __THREW__; __THREW__ = 0;
+       if ((($421|0) != 0) & ((threwValue|0) != 0)) { $422 = _testSetjmp(HEAP32[$421>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($422|0) == 0) { _longjmp($421|0, threwValue|0); } tempRet0 = (threwValue); } else { $422 = -1; };
+       $423 = tempRet0;
+       $cond1148 = ($422|0)==(1);
+       if ($cond1148) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $423;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       ;HEAP32[$413>>2]=HEAP32[$6>>2]|0;HEAP32[$413+4>>2]=HEAP32[$6+4>>2]|0;
+      }
+      $429 = ((($pc$6)) + 4|0);
+      $430 = HEAP32[$429>>2]|0;
+      $431 = $430 & 127;
+      $432 = (200 + ($431<<2)|0);
+      $433 = HEAP32[$432>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $433;$i$2 = $430;$pc$6 = $429;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 23:  {
+      $434 = $i$2 >>> 7;
+      $435 = $434 & 127;
+      __THREW__ = 0;
+      $436 = (invoke_iii(161,($mrb|0),($435|0))|0);
+      $437 = __THREW__; __THREW__ = 0;
+      if ((($437|0) != 0) & ((threwValue|0) != 0)) { $438 = _testSetjmp(HEAP32[$437>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($438|0) == 0) { _longjmp($437|0, threwValue|0); } tempRet0 = (threwValue); } else { $438 = -1; };
+      $439 = tempRet0;
+      $cond1145 = ($438|0)==(1);
+      if ($cond1145) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $439;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $440 = ($436|0)!=(0|0);
+      if ($440) {
+       $441 = $i$2 >>> 23;
+       $442 = $441 & 511;
+       $443 = (($regs$5) + ($442<<3)|0);
+       $444 = $i$2 >>> 14;
+       $445 = $444 & 511;
+       $446 = ((($436)) + 12|0);
+       $447 = HEAP32[$446>>2]|0;
+       $448 = (($447) + ($445<<3)|0);
+       ;HEAP32[$448>>2]=HEAP32[$443>>2]|0;HEAP32[$448+4>>2]=HEAP32[$443+4>>2]|0;
+       __THREW__ = 0;
+       invoke_vii(163,($mrb|0),($436|0));
+       $449 = __THREW__; __THREW__ = 0;
+       if ((($449|0) != 0) & ((threwValue|0) != 0)) { $450 = _testSetjmp(HEAP32[$449>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($450|0) == 0) { _longjmp($449|0, threwValue|0); } tempRet0 = (threwValue); } else { $450 = -1; };
+       $451 = tempRet0;
+       $cond1146 = ($450|0)==(1);
+       if ($cond1146) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $451;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+      }
+      $452 = ((($pc$6)) + 4|0);
+      $453 = HEAP32[$452>>2]|0;
+      $454 = $453 & 127;
+      $455 = (200 + ($454<<2)|0);
+      $456 = HEAP32[$455>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $456;$i$2 = $453;$pc$6 = $452;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 24:  {
+      $457 = $i$2 >>> 7;
+      $458 = $457 & 65535;
+      $459 = (($458) - 32767)|0;
+      $460 = (($pc$6) + ($459<<2)|0);
+      $461 = HEAP32[$460>>2]|0;
+      $462 = $461 & 127;
+      $463 = (200 + ($462<<2)|0);
+      $464 = HEAP32[$463>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $464;$i$2 = $461;$pc$6 = $460;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 25:  {
+      $465 = $i$2 >>> 23;
+      $466 = $465 & 511;
+      $467 = (($regs$5) + ($466<<3)|0);
+      $468 = ((($467)) + 4|0);
+      $469 = HEAP32[$468>>2]|0;
+      $470 = ($469|0)!=(0);
+      if ($470) {
+       $471 = $i$2 >>> 7;
+       $472 = $471 & 65535;
+       $473 = (($472) - 32767)|0;
+       $474 = (($pc$6) + ($473<<2)|0);
+       $475 = HEAP32[$474>>2]|0;
+       $476 = $475 & 127;
+       $477 = (200 + ($476<<2)|0);
+       $478 = HEAP32[$477>>2]|0;
+       $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $478;$i$2 = $475;$pc$6 = $474;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+       label = 590;
+       continue L19;
+      } else {
+       $479 = ((($pc$6)) + 4|0);
+       $480 = HEAP32[$479>>2]|0;
+       $481 = $480 & 127;
+       $482 = (200 + ($481<<2)|0);
+       $483 = HEAP32[$482>>2]|0;
+       $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $483;$i$2 = $480;$pc$6 = $479;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+       label = 590;
+       continue L19;
+      }
+      break;
+     }
+     case 26:  {
+      $484 = $i$2 >>> 23;
+      $485 = $484 & 511;
+      $486 = (($regs$5) + ($485<<3)|0);
+      $487 = ((($486)) + 4|0);
+      $488 = HEAP32[$487>>2]|0;
+      $489 = ($488|0)!=(0);
+      if ($489) {
+       $498 = ((($pc$6)) + 4|0);
+       $499 = HEAP32[$498>>2]|0;
+       $500 = $499 & 127;
+       $501 = (200 + ($500<<2)|0);
+       $502 = HEAP32[$501>>2]|0;
+       $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $502;$i$2 = $499;$pc$6 = $498;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+       label = 590;
+       continue L19;
+      } else {
+       $490 = $i$2 >>> 7;
+       $491 = $490 & 65535;
+       $492 = (($491) - 32767)|0;
+       $493 = (($pc$6) + ($492<<2)|0);
+       $494 = HEAP32[$493>>2]|0;
+       $495 = $494 & 127;
+       $496 = (200 + ($495<<2)|0);
+       $497 = HEAP32[$496>>2]|0;
+       $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $497;$i$2 = $494;$pc$6 = $493;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+       label = 590;
+       continue L19;
+      }
+      break;
+     }
+     case 27:  {
+      $503 = ((($mrb)) + 12|0);
+      $504 = HEAP32[$503>>2]|0;
+      $505 = ((($504)) + 32|0);
+      $506 = HEAP32[$505>>2]|0;
+      $507 = ((($mrb)) + 12|0);
+      $508 = HEAP32[$507>>2]|0;
+      $509 = ((($508)) + 16|0);
+      $510 = HEAP32[$509>>2]|0;
+      $511 = ((($510)) + 16|0);
+      $512 = HEAP32[$511>>2]|0;
+      $513 = ($506|0)<=($512|0);
+      if ($513) {
+       $514 = ((($mrb)) + 12|0);
+       $515 = HEAP32[$514>>2]|0;
+       $516 = ((($515)) + 32|0);
+       $517 = HEAP32[$516>>2]|0;
+       $518 = ($517|0)==(0);
+       $519 = ((($mrb)) + 12|0);
+       $520 = HEAP32[$519>>2]|0;
+       $521 = ((($520)) + 32|0);
+       if ($518) {
+        HEAP32[$521>>2] = 16;
+       } else {
+        $522 = HEAP32[$521>>2]|0;
+        $523 = $522<<1;
+        HEAP32[$521>>2] = $523;
+       }
+       $524 = ((($mrb)) + 12|0);
+       $525 = HEAP32[$524>>2]|0;
+       $526 = ((($525)) + 28|0);
+       $527 = HEAP32[$526>>2]|0;
+       $528 = ((($mrb)) + 12|0);
+       $529 = HEAP32[$528>>2]|0;
+       $530 = ((($529)) + 32|0);
+       $531 = HEAP32[$530>>2]|0;
+       $532 = $531<<2;
+       __THREW__ = 0;
+       $533 = (invoke_iiii(164,($mrb|0),($527|0),($532|0))|0);
+       $534 = __THREW__; __THREW__ = 0;
+       if ((($534|0) != 0) & ((threwValue|0) != 0)) { $535 = _testSetjmp(HEAP32[$534>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($535|0) == 0) { _longjmp($534|0, threwValue|0); } tempRet0 = (threwValue); } else { $535 = -1; };
+       $536 = tempRet0;
+       $cond1144 = ($535|0)==(1);
+       if ($cond1144) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $536;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       $537 = ((($mrb)) + 12|0);
+       $538 = HEAP32[$537>>2]|0;
+       $539 = ((($538)) + 28|0);
+       HEAP32[$539>>2] = $533;
+      }
+      $540 = $i$2 >>> 7;
+      $541 = $540 & 65535;
+      $542 = (($541) - 32767)|0;
+      $543 = (($pc$6) + ($542<<2)|0);
+      $544 = ((($mrb)) + 12|0);
+      $545 = HEAP32[$544>>2]|0;
+      $546 = ((($545)) + 16|0);
+      $547 = HEAP32[$546>>2]|0;
+      $548 = ((($547)) + 16|0);
+      $549 = HEAP32[$548>>2]|0;
+      $550 = (($549) + 1)|0;
+      HEAP32[$548>>2] = $550;
+      $551 = ((($mrb)) + 12|0);
+      $552 = HEAP32[$551>>2]|0;
+      $553 = ((($552)) + 28|0);
+      $554 = HEAP32[$553>>2]|0;
+      $555 = (($554) + ($549<<2)|0);
+      HEAP32[$555>>2] = $543;
+      $556 = ((($pc$6)) + 4|0);
+      $557 = HEAP32[$556>>2]|0;
+      $558 = $557 & 127;
+      $559 = (200 + ($558<<2)|0);
+      $560 = HEAP32[$559>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $560;$i$2 = $557;$pc$6 = $556;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 28:  {
+      $561 = ((($mrb)) + 20|0);
+      $562 = HEAP32[$561>>2]|0;
+      $563 = HEAP32[$562>>2]|0;
+      $564 = $563 & 255;
+      $565 = $i$2 >>> 23;
+      $566 = $565 & 511;
+      $567 = (($regs$5) + ($566<<3)|0);
+      $568 = ((($567)) + 4|0);
+      HEAP32[$568>>2] = $564;
+      $569 = ((($mrb)) + 20|0);
+      $570 = HEAP32[$569>>2]|0;
+      $571 = $i$2 >>> 23;
+      $572 = $571 & 511;
+      $573 = (($regs$5) + ($572<<3)|0);
+      HEAP32[$573>>2] = $570;
+      $574 = ((($mrb)) + 20|0);
+      HEAP32[$574>>2] = 0;
+      $575 = ((($pc$6)) + 4|0);
+      $576 = HEAP32[$575>>2]|0;
+      $577 = $576 & 127;
+      $578 = (200 + ($577<<2)|0);
+      $579 = HEAP32[$578>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $579;$i$2 = $576;$pc$6 = $575;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 29:  {
+      $580 = $i$2 >>> 23;
+      $581 = $580 & 511;
+      $a7$0 = $581;
+      while(1) {
+       $582 = (($a7$0) + -1)|0;
+       $583 = ($a7$0|0)!=(0);
+       if (!($583)) {
+        break;
+       }
+       $584 = ((($mrb)) + 12|0);
+       $585 = HEAP32[$584>>2]|0;
+       $586 = ((($585)) + 16|0);
+       $587 = HEAP32[$586>>2]|0;
+       $588 = ((($587)) + 16|0);
+       $589 = HEAP32[$588>>2]|0;
+       $590 = (($589) + -1)|0;
+       HEAP32[$588>>2] = $590;
+       $a7$0 = $582;
+      }
+      $591 = ((($pc$6)) + 4|0);
+      $592 = HEAP32[$591>>2]|0;
+      $593 = $592 & 127;
+      $594 = (200 + ($593<<2)|0);
+      $595 = HEAP32[$594>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $595;$i$2 = $592;$pc$6 = $591;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 30:  {
+      $596 = $i$2 >>> 23;
+      $597 = $596 & 511;
+      $598 = (($regs$5) + ($597<<3)|0);
+      $599 = HEAP32[$598>>2]|0;
+      $600 = ((($mrb)) + 20|0);
+      HEAP32[$600>>2] = $599;
+      $$5 = $$8;$exc_catched$2 = $exc_catched$5;$irep$5 = $irep$8;$pc$3 = $pc$6;$pool$3 = $pool$6;$regs$2 = $regs$5;$syms$3 = $syms$6;
+      label = 276;
+      continue L19;
+      break;
+     }
+     case 31:  {
+      $601 = $i$2 >>> 7;
+      $602 = $601 & 65535;
+      $603 = ((($irep$8)) + 20|0);
+      $604 = HEAP32[$603>>2]|0;
+      $605 = (($604) + ($602<<2)|0);
+      $606 = HEAP32[$605>>2]|0;
+      __THREW__ = 0;
+      $607 = (invoke_iii(165,($mrb|0),($606|0))|0);
+      $608 = __THREW__; __THREW__ = 0;
+      if ((($608|0) != 0) & ((threwValue|0) != 0)) { $609 = _testSetjmp(HEAP32[$608>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($609|0) == 0) { _longjmp($608|0, threwValue|0); } tempRet0 = (threwValue); } else { $609 = -1; };
+      $610 = tempRet0;
+      $cond1142 = ($609|0)==(1);
+      if ($cond1142) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $610;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $611 = ((($mrb)) + 12|0);
+      $612 = HEAP32[$611>>2]|0;
+      $613 = ((($612)) + 40|0);
+      $614 = HEAP32[$613>>2]|0;
+      $615 = ((($mrb)) + 12|0);
+      $616 = HEAP32[$615>>2]|0;
+      $617 = ((($616)) + 16|0);
+      $618 = HEAP32[$617>>2]|0;
+      $619 = ((($618)) + 20|0);
+      $620 = HEAP32[$619>>2]|0;
+      $621 = ($614|0)<=($620|0);
+      if ($621) {
+       $622 = ((($mrb)) + 12|0);
+       $623 = HEAP32[$622>>2]|0;
+       $624 = ((($623)) + 40|0);
+       $625 = HEAP32[$624>>2]|0;
+       $626 = ($625|0)==(0);
+       $627 = ((($mrb)) + 12|0);
+       $628 = HEAP32[$627>>2]|0;
+       $629 = ((($628)) + 40|0);
+       if ($626) {
+        HEAP32[$629>>2] = 16;
+       } else {
+        $630 = HEAP32[$629>>2]|0;
+        $631 = $630<<1;
+        HEAP32[$629>>2] = $631;
+       }
+       $632 = ((($mrb)) + 12|0);
+       $633 = HEAP32[$632>>2]|0;
+       $634 = ((($633)) + 36|0);
+       $635 = HEAP32[$634>>2]|0;
+       $636 = ((($mrb)) + 12|0);
+       $637 = HEAP32[$636>>2]|0;
+       $638 = ((($637)) + 40|0);
+       $639 = HEAP32[$638>>2]|0;
+       $640 = $639<<2;
+       __THREW__ = 0;
+       $641 = (invoke_iiii(164,($mrb|0),($635|0),($640|0))|0);
+       $642 = __THREW__; __THREW__ = 0;
+       if ((($642|0) != 0) & ((threwValue|0) != 0)) { $643 = _testSetjmp(HEAP32[$642>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($643|0) == 0) { _longjmp($642|0, threwValue|0); } tempRet0 = (threwValue); } else { $643 = -1; };
+       $644 = tempRet0;
+       $cond1143 = ($643|0)==(1);
+       if ($cond1143) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $644;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       $645 = ((($mrb)) + 12|0);
+       $646 = HEAP32[$645>>2]|0;
+       $647 = ((($646)) + 36|0);
+       HEAP32[$647>>2] = $641;
+      }
+      $648 = ((($mrb)) + 12|0);
+      $649 = HEAP32[$648>>2]|0;
+      $650 = ((($649)) + 16|0);
+      $651 = HEAP32[$650>>2]|0;
+      $652 = ((($651)) + 20|0);
+      $653 = HEAP32[$652>>2]|0;
+      $654 = (($653) + 1)|0;
+      HEAP32[$652>>2] = $654;
+      $655 = ((($mrb)) + 12|0);
+      $656 = HEAP32[$655>>2]|0;
+      $657 = ((($656)) + 36|0);
+      $658 = HEAP32[$657>>2]|0;
+      $659 = (($658) + ($653<<2)|0);
+      HEAP32[$659>>2] = $607;
+      $660 = ((($mrb)) + 92|0);
+      $661 = ((($660)) + 416|0);
+      HEAP32[$661>>2] = $ai$1;
+      $662 = ((($pc$6)) + 4|0);
+      $663 = HEAP32[$662>>2]|0;
+      $664 = $663 & 127;
+      $665 = (200 + ($664<<2)|0);
+      $666 = HEAP32[$665>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $666;$i$2 = $663;$pc$6 = $662;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 32:  {
+      $667 = $i$2 >>> 23;
+      $668 = $667 & 511;
+      $669 = ((($mrb)) + 12|0);
+      $670 = HEAP32[$669>>2]|0;
+      $671 = ((($670)) + 16|0);
+      $672 = HEAP32[$671>>2]|0;
+      $673 = ((($672)) + 20|0);
+      $674 = HEAP32[$673>>2]|0;
+      $eidx$0 = $674;$n$0 = 0;
+      while(1) {
+       $675 = ($n$0|0)<($668|0);
+       if (!($675)) {
+        break;
+       }
+       $676 = ((($mrb)) + 12|0);
+       $677 = HEAP32[$676>>2]|0;
+       $678 = ((($677)) + 20|0);
+       $679 = HEAP32[$678>>2]|0;
+       $680 = ($672|0)==($679|0);
+       if (!($680)) {
+        $681 = ((($672)) + -48|0);
+        $682 = ((($681)) + 20|0);
+        $683 = HEAP32[$682>>2]|0;
+        $684 = ($eidx$0|0)>($683|0);
+        if (!($684)) {
+         break;
+        }
+       }
+       $685 = (($eidx$0) + -1)|0;
+       __THREW__ = 0;
+       invoke_vii(166,($mrb|0),($685|0));
+       $686 = __THREW__; __THREW__ = 0;
+       if ((($686|0) != 0) & ((threwValue|0) != 0)) { $687 = _testSetjmp(HEAP32[$686>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($687|0) == 0) { _longjmp($686|0, threwValue|0); } tempRet0 = (threwValue); } else { $687 = -1; };
+       $688 = tempRet0;
+       $cond1141 = ($687|0)==(1);
+       if ($cond1141) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $688;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       $689 = ((($mrb)) + 92|0);
+       $690 = ((($689)) + 416|0);
+       HEAP32[$690>>2] = $ai$1;
+       $691 = (($n$0) + 1)|0;
+       $eidx$0 = $685;$n$0 = $691;
+      }
+      $692 = ((($pc$6)) + 4|0);
+      $693 = HEAP32[$692>>2]|0;
+      $694 = $693 & 127;
+      $695 = (200 + ($694<<2)|0);
+      $696 = HEAP32[$695>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $696;$i$2 = $693;$pc$6 = $692;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 33:  {
+      $i$0 = $i$2;
+      label = 92;
+      break;
+     }
+     case 34:  {
+      $3249 = $i$2 >>> 7;
+      $3250 = $3249 & 65535;
+      $3251 = (($pool$6) + ($3250<<3)|0);
+      __THREW__ = 0;
+      ;HEAP32[$$byval_copy947>>2]=HEAP32[$3251>>2]|0;HEAP32[$$byval_copy947+4>>2]=HEAP32[$3251+4>>2]|0;
+      invoke_viii(191,($msg|0),($mrb|0),($$byval_copy947|0));
+      $3252 = __THREW__; __THREW__ = 0;
+      if ((($3252|0) != 0) & ((threwValue|0) != 0)) { $3253 = _testSetjmp(HEAP32[$3252>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3253|0) == 0) { _longjmp($3252|0, threwValue|0); } tempRet0 = (threwValue); } else { $3253 = -1; };
+      $3254 = tempRet0;
+      $cond1121 = ($3253|0)==(1);
+      if ($cond1121) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3254;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $3255 = $i$2 >>> 23;
+      $3256 = $3255 & 511;
+      $3257 = ($3256|0)==(0);
+      if ($3257) {
+       __THREW__ = 0;
+       $3258 = (invoke_iii(135,($mrb|0),(67967|0))|0);
+       $3259 = __THREW__; __THREW__ = 0;
+       if ((($3259|0) != 0) & ((threwValue|0) != 0)) { $3260 = _testSetjmp(HEAP32[$3259>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3260|0) == 0) { _longjmp($3259|0, threwValue|0); } tempRet0 = (threwValue); } else { $3260 = -1; };
+       $3261 = tempRet0;
+       $cond1124 = ($3260|0)==(1);
+       if ($cond1124) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3261;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       __THREW__ = 0;
+       ;HEAP32[$msg$byval_copy>>2]=HEAP32[$msg>>2]|0;HEAP32[$msg$byval_copy+4>>2]=HEAP32[$msg+4>>2]|0;
+       invoke_viiii(172,($49|0),($mrb|0),($3258|0),($msg$byval_copy|0));
+       $3262 = __THREW__; __THREW__ = 0;
+       if ((($3262|0) != 0) & ((threwValue|0) != 0)) { $3263 = _testSetjmp(HEAP32[$3262>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3263|0) == 0) { _longjmp($3262|0, threwValue|0); } tempRet0 = (threwValue); } else { $3263 = -1; };
+       $3264 = tempRet0;
+       $cond1125 = ($3263|0)==(1);
+       if ($cond1125) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3264;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       ;HEAP32[$exc120>>2]=HEAP32[$49>>2]|0;HEAP32[$exc120+4>>2]=HEAP32[$49+4>>2]|0;
+      } else {
+       __THREW__ = 0;
+       $3265 = (invoke_iii(135,($mrb|0),(56627|0))|0);
+       $3266 = __THREW__; __THREW__ = 0;
+       if ((($3266|0) != 0) & ((threwValue|0) != 0)) { $3267 = _testSetjmp(HEAP32[$3266>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3267|0) == 0) { _longjmp($3266|0, threwValue|0); } tempRet0 = (threwValue); } else { $3267 = -1; };
+       $3268 = tempRet0;
+       $cond1122 = ($3267|0)==(1);
+       if ($cond1122) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3268;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       __THREW__ = 0;
+       ;HEAP32[$msg$byval_copy948>>2]=HEAP32[$msg>>2]|0;HEAP32[$msg$byval_copy948+4>>2]=HEAP32[$msg+4>>2]|0;
+       invoke_viiii(172,($50|0),($mrb|0),($3265|0),($msg$byval_copy948|0));
+       $3269 = __THREW__; __THREW__ = 0;
+       if ((($3269|0) != 0) & ((threwValue|0) != 0)) { $3270 = _testSetjmp(HEAP32[$3269>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3270|0) == 0) { _longjmp($3269|0, threwValue|0); } tempRet0 = (threwValue); } else { $3270 = -1; };
+       $3271 = tempRet0;
+       $cond1123 = ($3270|0)==(1);
+       if ($cond1123) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3271;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       ;HEAP32[$exc120>>2]=HEAP32[$50>>2]|0;HEAP32[$exc120+4>>2]=HEAP32[$50+4>>2]|0;
+      }
+      $3272 = HEAP32[$exc120>>2]|0;
+      $3273 = ((($mrb)) + 20|0);
+      HEAP32[$3273>>2] = $3272;
+      $$5 = $$8;$exc_catched$2 = $exc_catched$5;$irep$5 = $irep$8;$pc$3 = $pc$6;$pool$3 = $pool$6;$regs$2 = $regs$5;$syms$3 = $syms$6;
+      label = 276;
+      continue L19;
+      break;
+     }
+     case 35:  {
+      $906 = ((($pc$6)) + 4|0);
+      $907 = HEAP32[$906>>2]|0;
+      $908 = $907 & 127;
+      $909 = (200 + ($908<<2)|0);
+      $910 = HEAP32[$909>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $910;$i$2 = $907;$pc$6 = $906;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 36:  {
+      $911 = ((($mrb)) + 12|0);
+      $912 = HEAP32[$911>>2]|0;
+      $913 = ((($912)) + 4|0);
+      $914 = HEAP32[$913>>2]|0;
+      ;HEAP32[$recv14>>2]=HEAP32[$914>>2]|0;HEAP32[$recv14+4>>2]=HEAP32[$914+4>>2]|0;
+      $915 = HEAP32[$recv14>>2]|0;
+      $916 = ((($mrb)) + 12|0);
+      $917 = HEAP32[$916>>2]|0;
+      $918 = ((($917)) + 16|0);
+      $919 = HEAP32[$918>>2]|0;
+      $920 = ((($915)) + 16|0);
+      $921 = HEAP32[$920>>2]|0;
+      $922 = ((($919)) + 44|0);
+      HEAP32[$922>>2] = $921;
+      $923 = ((($919)) + 4|0);
+      HEAP32[$923>>2] = $915;
+      $924 = ((($915)) + 20|0);
+      $925 = HEAP32[$924>>2]|0;
+      $926 = ($925|0)!=(0|0);
+      if ($926) {
+       $927 = ((($915)) + 20|0);
+       $928 = HEAP32[$927>>2]|0;
+       $929 = ((($928)) + 16|0);
+       $930 = HEAP32[$929>>2]|0;
+       $931 = ($930|0)!=(0);
+       if ($931) {
+        $932 = ((($915)) + 20|0);
+        $933 = HEAP32[$932>>2]|0;
+        $934 = ((($933)) + 16|0);
+        $935 = HEAP32[$934>>2]|0;
+        HEAP32[$919>>2] = $935;
+       }
+       $936 = ((($915)) + 20|0);
+       $937 = HEAP32[$936>>2]|0;
+       $938 = ((($937)) + 12|0);
+       $939 = HEAP32[$938>>2]|0;
+       $940 = ($939|0)!=(0|0);
+       if (!($940)) {
+        $941 = ((($mrb)) + 12|0);
+        $942 = HEAP32[$941>>2]|0;
+        $943 = ((($942)) + 4|0);
+        $944 = HEAP32[$943>>2]|0;
+        $945 = ((($915)) + 20|0);
+        $946 = HEAP32[$945>>2]|0;
+        $947 = ((($946)) + 12|0);
+        HEAP32[$947>>2] = $944;
+       }
+      }
+      $948 = HEAP32[$915>>2]|0;
+      $949 = $948 >>> 11;
+      $950 = $949 & 128;
+      $951 = ($950|0)!=(0);
+      if ($951) {
+       $952 = ((($915)) + 12|0);
+       $953 = HEAP32[$952>>2]|0;
+       __THREW__ = 0;
+       ;HEAP32[$recv14$byval_copy>>2]=HEAP32[$recv14>>2]|0;HEAP32[$recv14$byval_copy+4>>2]=HEAP32[$recv14+4>>2]|0;
+       invoke_viii($953|0,($10|0),($mrb|0),($recv14$byval_copy|0));
+       $954 = __THREW__; __THREW__ = 0;
+       if ((($954|0) != 0) & ((threwValue|0) != 0)) { $955 = _testSetjmp(HEAP32[$954>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($955|0) == 0) { _longjmp($954|0, threwValue|0); } tempRet0 = (threwValue); } else { $955 = -1; };
+       $956 = tempRet0;
+       $cond1118 = ($955|0)==(1);
+       if ($cond1118) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $956;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       ;HEAP32[$recv14>>2]=HEAP32[$10>>2]|0;HEAP32[$recv14+4>>2]=HEAP32[$10+4>>2]|0;
+       __THREW__ = 0;
+       invoke_vii(146,($mrb|0),($ai$1|0));
+       $957 = __THREW__; __THREW__ = 0;
+       if ((($957|0) != 0) & ((threwValue|0) != 0)) { $958 = _testSetjmp(HEAP32[$957>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($958|0) == 0) { _longjmp($957|0, threwValue|0); } tempRet0 = (threwValue); } else { $958 = -1; };
+       $959 = tempRet0;
+       $cond1119 = ($958|0)==(1);
+       if ($cond1119) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $959;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       $960 = ((($mrb)) + 20|0);
+       $961 = HEAP32[$960>>2]|0;
+       $962 = ($961|0)!=(0|0);
+       if ($962) {
+        $$5 = $$8;$exc_catched$2 = $exc_catched$5;$irep$5 = $irep$8;$pc$3 = $pc$6;$pool$3 = $pool$6;$regs$2 = $regs$5;$syms$3 = $syms$6;
+        label = 276;
+        continue L19;
+       }
+       $963 = ((($mrb)) + 12|0);
+       $964 = HEAP32[$963>>2]|0;
+       $965 = ((($964)) + 16|0);
+       $966 = HEAP32[$965>>2]|0;
+       $967 = ((($966)) + 8|0);
+       $968 = HEAP32[$967>>2]|0;
+       $969 = ((($mrb)) + 12|0);
+       $970 = HEAP32[$969>>2]|0;
+       $971 = ((($970)) + 4|0);
+       HEAP32[$971>>2] = $968;
+       $972 = ((($966)) + 40|0);
+       $973 = HEAP32[$972>>2]|0;
+       $974 = (($968) + ($973<<3)|0);
+       ;HEAP32[$974>>2]=HEAP32[$recv14>>2]|0;HEAP32[$974+4>>2]=HEAP32[$recv14+4>>2]|0;
+       $975 = ((($966)) + 28|0);
+       $976 = HEAP32[$975>>2]|0;
+       __THREW__ = 0;
+       invoke_vi(132,($mrb|0));
+       $977 = __THREW__; __THREW__ = 0;
+       if ((($977|0) != 0) & ((threwValue|0) != 0)) { $978 = _testSetjmp(HEAP32[$977>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($978|0) == 0) { _longjmp($977|0, threwValue|0); } tempRet0 = (threwValue); } else { $978 = -1; };
+       $979 = tempRet0;
+       $cond1120 = ($978|0)==(1);
+       if ($cond1120) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $979;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $976;$pool$1 = $pool$6;$regs$1 = $968;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       $980 = ((($mrb)) + 12|0);
+       $981 = HEAP32[$980>>2]|0;
+       $982 = ((($981)) + 16|0);
+       $983 = HEAP32[$982>>2]|0;
+       $984 = ((($983)) + 4|0);
+       $985 = HEAP32[$984>>2]|0;
+       $986 = ((($985)) + 12|0);
+       $987 = HEAP32[$986>>2]|0;
+       $988 = ((($987)) + 12|0);
+       $989 = HEAP32[$988>>2]|0;
+       $990 = ((($987)) + 16|0);
+       $991 = HEAP32[$990>>2]|0;
+       $992 = HEAP32[$976>>2]|0;
+       $993 = $992 & 127;
+       $994 = (200 + ($993<<2)|0);
+       $995 = HEAP32[$994>>2]|0;
+       $exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $995;$i$2 = $992;$irep$8 = $987;$pc$6 = $976;$pool$6 = $989;$regs$5 = $968;$syms$6 = $991;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+       label = 590;
+       continue L19;
+      }
+      $996 = ((($915)) + 12|0);
+      $997 = HEAP32[$996>>2]|0;
+      $998 = ($997|0)!=(0|0);
+      if (!($998)) {
+       $999 = ((($mrb)) + 12|0);
+       $1000 = HEAP32[$999>>2]|0;
+       $1001 = ((($1000)) + 4|0);
+       $1002 = HEAP32[$1001>>2]|0;
+       __THREW__ = 0;
+       invoke_vi(162,($11|0));
+       $1003 = __THREW__; __THREW__ = 0;
+       if ((($1003|0) != 0) & ((threwValue|0) != 0)) { $1004 = _testSetjmp(HEAP32[$1003>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1004|0) == 0) { _longjmp($1003|0, threwValue|0); } tempRet0 = (threwValue); } else { $1004 = -1; };
+       $1005 = tempRet0;
+       $cond1115 = ($1004|0)==(1);
+       if ($cond1115) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $915;$$reg2mem899$0 = $1005;$exc_catched$1 = $exc_catched$5;$irep$1 = $997;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       ;HEAP32[$1002>>2]=HEAP32[$11>>2]|0;HEAP32[$1002+4>>2]=HEAP32[$11+4>>2]|0;
+       $$3 = $915;$irep$3 = $997;
+       label = 274;
+       break L50;
+      }
+      $1006 = ((($997)) + 12|0);
+      $1007 = HEAP32[$1006>>2]|0;
+      $1008 = ((($997)) + 16|0);
+      $1009 = HEAP32[$1008>>2]|0;
+      $1010 = ((($997)) + 2|0);
+      $1011 = HEAP16[$1010>>1]|0;
+      $1012 = $1011&65535;
+      $1013 = ((($919)) + 12|0);
+      HEAP32[$1013>>2] = $1012;
+      $1014 = ((($919)) + 36|0);
+      $1015 = HEAP32[$1014>>2]|0;
+      $1016 = ($1015|0)<(0);
+      $1017 = ((($997)) + 2|0);
+      $1018 = HEAP16[$1017>>1]|0;
+      $1019 = $1018&65535;
+      if ($1016) {
+       $1020 = ($1019|0)<(3);
+       if ($1020) {
+        $$reg2mem895$0 = 3;
+       } else {
+        $1021 = ((($997)) + 2|0);
+        $1022 = HEAP16[$1021>>1]|0;
+        $1023 = $1022&65535;
+        $$reg2mem895$0 = $1023;
+       }
+       __THREW__ = 0;
+       invoke_viii(142,($mrb|0),($$reg2mem895$0|0),3);
+       $1024 = __THREW__; __THREW__ = 0;
+       if ((($1024|0) != 0) & ((threwValue|0) != 0)) { $1025 = _testSetjmp(HEAP32[$1024>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1025|0) == 0) { _longjmp($1024|0, threwValue|0); } tempRet0 = (threwValue); } else { $1025 = -1; };
+       $1026 = tempRet0;
+       $cond1117 = ($1025|0)==(1);
+       if ($cond1117) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $915;$$reg2mem899$0 = $1026;$exc_catched$1 = $exc_catched$5;$irep$1 = $997;$pc$1 = $pc$6;$pool$1 = $1007;$regs$1 = $regs$5;$syms$1 = $1009;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+      } else {
+       $1027 = ((($919)) + 36|0);
+       $1028 = HEAP32[$1027>>2]|0;
+       $1029 = (($1028) + 2)|0;
+       __THREW__ = 0;
+       invoke_viii(142,($mrb|0),($1019|0),($1029|0));
+       $1030 = __THREW__; __THREW__ = 0;
+       if ((($1030|0) != 0) & ((threwValue|0) != 0)) { $1031 = _testSetjmp(HEAP32[$1030>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1031|0) == 0) { _longjmp($1030|0, threwValue|0); } tempRet0 = (threwValue); } else { $1031 = -1; };
+       $1032 = tempRet0;
+       $cond1116 = ($1031|0)==(1);
+       if ($cond1116) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $915;$$reg2mem899$0 = $1032;$exc_catched$1 = $exc_catched$5;$irep$1 = $997;$pc$1 = $pc$6;$pool$1 = $1007;$regs$1 = $regs$5;$syms$1 = $1009;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+      }
+      $1033 = ((($mrb)) + 12|0);
+      $1034 = HEAP32[$1033>>2]|0;
+      $1035 = ((($1034)) + 4|0);
+      $1036 = HEAP32[$1035>>2]|0;
+      $1037 = ((($915)) + 20|0);
+      $1038 = HEAP32[$1037>>2]|0;
+      $1039 = ((($1038)) + 12|0);
+      $1040 = HEAP32[$1039>>2]|0;
+      ;HEAP32[$1036>>2]=HEAP32[$1040>>2]|0;HEAP32[$1036+4>>2]=HEAP32[$1040+4>>2]|0;
+      $1041 = ((($997)) + 8|0);
+      $1042 = HEAP32[$1041>>2]|0;
+      $1043 = HEAP32[$1042>>2]|0;
+      $1044 = $1043 & 127;
+      $1045 = (200 + ($1044<<2)|0);
+      $1046 = HEAP32[$1045>>2]|0;
+      $exc_catched$5$phi = $exc_catched$5;$$8 = $915;$$reg2mem887$0 = $1046;$i$2 = $1043;$irep$8 = $997;$pc$6 = $1042;$pool$6 = $1007;$regs$5 = $1036;$syms$6 = $1009;$exc_catched$5 = $exc_catched$5$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 37:  {
+      $1047 = ((($mrb)) + 12|0);
+      $1048 = HEAP32[$1047>>2]|0;
+      $1049 = ((($1048)) + 16|0);
+      $1050 = HEAP32[$1049>>2]|0;
+      $1051 = HEAP32[$1050>>2]|0;
+      $1052 = $i$2 >>> 23;
+      $1053 = $1052 & 511;
+      $1054 = $i$2 >>> 7;
+      $1055 = $1054 & 127;
+      $1056 = ($1051|0)==(0);
+      if ($1056) {
+       __THREW__ = 0;
+       $1057 = (invoke_iii(135,($mrb|0),(67669|0))|0);
+       $1058 = __THREW__; __THREW__ = 0;
+       if ((($1058|0) != 0) & ((threwValue|0) != 0)) { $1059 = _testSetjmp(HEAP32[$1058>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1059|0) == 0) { _longjmp($1058|0, threwValue|0); } tempRet0 = (threwValue); } else { $1059 = -1; };
+       $1060 = tempRet0;
+       $cond1112 = ($1059|0)==(1);
+       if ($cond1112) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1060;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       __THREW__ = 0;
+       invoke_viiii(171,($12|0),($mrb|0),(56470|0),30);
+       $1061 = __THREW__; __THREW__ = 0;
+       if ((($1061|0) != 0) & ((threwValue|0) != 0)) { $1062 = _testSetjmp(HEAP32[$1061>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1062|0) == 0) { _longjmp($1061|0, threwValue|0); } tempRet0 = (threwValue); } else { $1062 = -1; };
+       $1063 = tempRet0;
+       $cond1113 = ($1062|0)==(1);
+       if ($cond1113) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1063;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       __THREW__ = 0;
+       ;HEAP32[$$byval_copy913>>2]=HEAP32[$12>>2]|0;HEAP32[$$byval_copy913+4>>2]=HEAP32[$12+4>>2]|0;
+       invoke_viiii(172,($13|0),($mrb|0),($1057|0),($$byval_copy913|0));
+       $1064 = __THREW__; __THREW__ = 0;
+       if ((($1064|0) != 0) & ((threwValue|0) != 0)) { $1065 = _testSetjmp(HEAP32[$1064>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1065|0) == 0) { _longjmp($1064|0, threwValue|0); } tempRet0 = (threwValue); } else { $1065 = -1; };
+       $1066 = tempRet0;
+       $cond1114 = ($1065|0)==(1);
+       if ($cond1114) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1066;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       ;HEAP32[$exc>>2]=HEAP32[$13>>2]|0;HEAP32[$exc+4>>2]=HEAP32[$13+4>>2]|0;
+       $1067 = HEAP32[$exc>>2]|0;
+       $1068 = ((($mrb)) + 20|0);
+       HEAP32[$1068>>2] = $1067;
+       $$5 = $$8;$exc_catched$2 = $exc_catched$5;$irep$5 = $irep$8;$pc$3 = $pc$6;$pool$3 = $pool$6;$regs$2 = $regs$5;$syms$3 = $syms$6;
+       label = 276;
+       continue L19;
+      }
+      ;HEAP32[$recv16>>2]=HEAP32[$regs$5>>2]|0;HEAP32[$recv16+4>>2]=HEAP32[$regs$5+4>>2]|0;
+      $1069 = ((($mrb)) + 12|0);
+      $1070 = HEAP32[$1069>>2]|0;
+      $1071 = ((($1070)) + 16|0);
+      $1072 = HEAP32[$1071>>2]|0;
+      $1073 = ((($1072)) + 44|0);
+      $1074 = HEAP32[$1073>>2]|0;
+      $1075 = ((($1074)) + 20|0);
+      $1076 = HEAP32[$1075>>2]|0;
+      HEAP32[$c19>>2] = $1076;
+      __THREW__ = 0;
+      $1077 = (invoke_iiii(139,($mrb|0),($c19|0),($1051|0))|0);
+      $1078 = __THREW__; __THREW__ = 0;
+      if ((($1078|0) != 0) & ((threwValue|0) != 0)) { $1079 = _testSetjmp(HEAP32[$1078>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1079|0) == 0) { _longjmp($1078|0, threwValue|0); } tempRet0 = (threwValue); } else { $1079 = -1; };
+      $1080 = tempRet0;
+      $cond1100 = ($1079|0)==(1);
+      if ($cond1100) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1080;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $1081 = ($1077|0)!=(0|0);
+      do {
+       if ($1081) {
+        $m18$0 = $1077;$mid20$0 = $1051;$n22$0 = $1055;
+       } else {
+        __THREW__ = 0;
+        $1082 = (invoke_iiii(140,($mrb|0),(65322|0),14)|0);
+        $1083 = __THREW__; __THREW__ = 0;
+        if ((($1083|0) != 0) & ((threwValue|0) != 0)) { $1084 = _testSetjmp(HEAP32[$1083>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1084|0) == 0) { _longjmp($1083|0, threwValue|0); } tempRet0 = (threwValue); } else { $1084 = -1; };
+        $1085 = tempRet0;
+        $cond1101 = ($1084|0)==(1);
+        if ($cond1101) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1085;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        __THREW__ = 0;
+        $1086 = (invoke_iiii(139,($mrb|0),($c19|0),($1082|0))|0);
+        $1087 = __THREW__; __THREW__ = 0;
+        if ((($1087|0) != 0) & ((threwValue|0) != 0)) { $1088 = _testSetjmp(HEAP32[$1087>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1088|0) == 0) { _longjmp($1087|0, threwValue|0); } tempRet0 = (threwValue); } else { $1088 = -1; };
+        $1089 = tempRet0;
+        $cond1102 = ($1088|0)==(1);
+        if ($cond1102) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1089;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        $1090 = ($1055|0)==(127);
+        if (!($1090)) {
+         $1100 = (($regs$5) + ($1053<<3)|0);
+         $1101 = ((($1100)) + 16|0);
+         $1102 = (($regs$5) + ($1053<<3)|0);
+         $1103 = ((($1102)) + 8|0);
+         $1104 = (($1055) + 1)|0;
+         __THREW__ = 0;
+         invoke_viii(170,($1101|0),($1103|0),($1104|0));
+         $1105 = __THREW__; __THREW__ = 0;
+         if ((($1105|0) != 0) & ((threwValue|0) != 0)) { $1106 = _testSetjmp(HEAP32[$1105>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1106|0) == 0) { _longjmp($1105|0, threwValue|0); } tempRet0 = (threwValue); } else { $1106 = -1; };
+         $1107 = tempRet0;
+         $cond1103 = ($1106|0)==(1);
+         if ($cond1103) {
+          $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1107;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+          continue L3;
+         }
+         $1108 = (($1053) + 1)|0;
+         $1109 = (($regs$5) + ($1108<<3)|0);
+         $1110 = ((($1109)) + 4|0);
+         HEAP32[$1110>>2] = 4;
+         $1111 = HEAP32[$1050>>2]|0;
+         $1112 = (($1053) + 1)|0;
+         $1113 = (($regs$5) + ($1112<<3)|0);
+         HEAP32[$1113>>2] = $1111;
+         $m18$0 = $1086;$mid20$0 = $1082;$n22$0 = $1104;
+         break;
+        }
+        $1091 = (($1053) + 1)|0;
+        $1092 = (($regs$5) + ($1091<<3)|0);
+        $1093 = HEAP32[$1050>>2]|0;
+        __THREW__ = 0;
+        invoke_vii(143,($14|0),($1093|0));
+        $1094 = __THREW__; __THREW__ = 0;
+        if ((($1094|0) != 0) & ((threwValue|0) != 0)) { $1095 = _testSetjmp(HEAP32[$1094>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1095|0) == 0) { _longjmp($1094|0, threwValue|0); } tempRet0 = (threwValue); } else { $1095 = -1; };
+        $1096 = tempRet0;
+        $cond1104 = ($1095|0)==(1);
+        if ($cond1104) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1096;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        __THREW__ = 0;
+        ;HEAP32[$$byval_copy914>>2]=HEAP32[$1092>>2]|0;HEAP32[$$byval_copy914+4>>2]=HEAP32[$1092+4>>2]|0;
+        ;HEAP32[$$byval_copy915>>2]=HEAP32[$14>>2]|0;HEAP32[$$byval_copy915+4>>2]=HEAP32[$14+4>>2]|0;
+        invoke_viiii(169,($15|0),($mrb|0),($$byval_copy914|0),($$byval_copy915|0));
+        $1097 = __THREW__; __THREW__ = 0;
+        if ((($1097|0) != 0) & ((threwValue|0) != 0)) { $1098 = _testSetjmp(HEAP32[$1097>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1098|0) == 0) { _longjmp($1097|0, threwValue|0); } tempRet0 = (threwValue); } else { $1098 = -1; };
+        $1099 = tempRet0;
+        $cond1105 = ($1098|0)==(1);
+        if ($cond1105) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1099;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        $m18$0 = $1086;$mid20$0 = $1082;$n22$0 = $1055;
+       }
+      } while(0);
+      __THREW__ = 0;
+      $1114 = (invoke_ii(141,($mrb|0))|0);
+      $1115 = __THREW__; __THREW__ = 0;
+      if ((($1115|0) != 0) & ((threwValue|0) != 0)) { $1116 = _testSetjmp(HEAP32[$1115>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1116|0) == 0) { _longjmp($1115|0, threwValue|0); } tempRet0 = (threwValue); } else { $1116 = -1; };
+      $1117 = tempRet0;
+      $cond1106 = ($1116|0)==(1);
+      if ($cond1106) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1117;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      HEAP32[$1114>>2] = $mid20$0;
+      $1118 = ((($1114)) + 4|0);
+      HEAP32[$1118>>2] = $m18$0;
+      $1119 = ((($mrb)) + 12|0);
+      $1120 = HEAP32[$1119>>2]|0;
+      $1121 = ((($1120)) + 4|0);
+      $1122 = HEAP32[$1121>>2]|0;
+      $1123 = ((($1114)) + 8|0);
+      HEAP32[$1123>>2] = $1122;
+      $1124 = ($n22$0|0)==(127);
+      if ($1124) {
+       $1125 = ((($1114)) + 36|0);
+       HEAP32[$1125>>2] = -1;
+      } else {
+       $1126 = ((($1114)) + 36|0);
+       HEAP32[$1126>>2] = $n22$0;
+      }
+      $1127 = HEAP32[$c19>>2]|0;
+      $1128 = ((($1114)) + 44|0);
+      HEAP32[$1128>>2] = $1127;
+      $1129 = ((($pc$6)) + 4|0);
+      $1130 = ((($1114)) + 28|0);
+      HEAP32[$1130>>2] = $1129;
+      $1131 = ((($mrb)) + 12|0);
+      $1132 = HEAP32[$1131>>2]|0;
+      $1133 = ((($1132)) + 4|0);
+      $1134 = HEAP32[$1133>>2]|0;
+      $1135 = (($1134) + ($1053<<3)|0);
+      HEAP32[$1133>>2] = $1135;
+      $1136 = ((($mrb)) + 12|0);
+      $1137 = HEAP32[$1136>>2]|0;
+      $1138 = ((($1137)) + 4|0);
+      $1139 = HEAP32[$1138>>2]|0;
+      ;HEAP32[$1139>>2]=HEAP32[$recv16>>2]|0;HEAP32[$1139+4>>2]=HEAP32[$recv16+4>>2]|0;
+      $1140 = HEAP32[$m18$0>>2]|0;
+      $1141 = $1140 >>> 11;
+      $1142 = $1141 & 128;
+      $1143 = ($1142|0)!=(0);
+      if ($1143) {
+       $1144 = ($n22$0|0)==(127);
+       if ($1144) {
+        $1145 = ((($1114)) + 12|0);
+        HEAP32[$1145>>2] = 3;
+       } else {
+        $1146 = (($n22$0) + 2)|0;
+        $1147 = ((($1114)) + 12|0);
+        HEAP32[$1147>>2] = $1146;
+       }
+       $1148 = ((($mrb)) + 12|0);
+       $1149 = HEAP32[$1148>>2]|0;
+       $1150 = ((($1149)) + 4|0);
+       $1151 = HEAP32[$1150>>2]|0;
+       $1152 = ((($m18$0)) + 12|0);
+       $1153 = HEAP32[$1152>>2]|0;
+       __THREW__ = 0;
+       ;HEAP32[$recv16$byval_copy>>2]=HEAP32[$recv16>>2]|0;HEAP32[$recv16$byval_copy+4>>2]=HEAP32[$recv16+4>>2]|0;
+       invoke_viii($1153|0,($16|0),($mrb|0),($recv16$byval_copy|0));
+       $1154 = __THREW__; __THREW__ = 0;
+       if ((($1154|0) != 0) & ((threwValue|0) != 0)) { $1155 = _testSetjmp(HEAP32[$1154>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1155|0) == 0) { _longjmp($1154|0, threwValue|0); } tempRet0 = (threwValue); } else { $1155 = -1; };
+       $1156 = tempRet0;
+       $cond1109 = ($1155|0)==(1);
+       if ($cond1109) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1156;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       ;HEAP32[$1151>>2]=HEAP32[$16>>2]|0;HEAP32[$1151+4>>2]=HEAP32[$16+4>>2]|0;
+       __THREW__ = 0;
+       invoke_vii(146,($mrb|0),($ai$1|0));
+       $1157 = __THREW__; __THREW__ = 0;
+       if ((($1157|0) != 0) & ((threwValue|0) != 0)) { $1158 = _testSetjmp(HEAP32[$1157>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1158|0) == 0) { _longjmp($1157|0, threwValue|0); } tempRet0 = (threwValue); } else { $1158 = -1; };
+       $1159 = tempRet0;
+       $cond1110 = ($1158|0)==(1);
+       if ($cond1110) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1159;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       $1160 = ((($mrb)) + 20|0);
+       $1161 = HEAP32[$1160>>2]|0;
+       $1162 = ($1161|0)!=(0|0);
+       if ($1162) {
+        $$5 = $$8;$exc_catched$2 = $exc_catched$5;$irep$5 = $irep$8;$pc$3 = $pc$6;$pool$3 = $pool$6;$regs$2 = $regs$5;$syms$3 = $syms$6;
+        label = 276;
+        continue L19;
+       }
+       $1163 = ((($mrb)) + 12|0);
+       $1164 = HEAP32[$1163>>2]|0;
+       $1165 = ((($1164)) + 16|0);
+       $1166 = HEAP32[$1165>>2]|0;
+       $1167 = ((($1166)) + 8|0);
+       $1168 = HEAP32[$1167>>2]|0;
+       $1169 = ((($mrb)) + 12|0);
+       $1170 = HEAP32[$1169>>2]|0;
+       $1171 = ((($1170)) + 4|0);
+       HEAP32[$1171>>2] = $1168;
+       __THREW__ = 0;
+       invoke_vi(132,($mrb|0));
+       $1172 = __THREW__; __THREW__ = 0;
+       if ((($1172|0) != 0) & ((threwValue|0) != 0)) { $1173 = _testSetjmp(HEAP32[$1172>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1173|0) == 0) { _longjmp($1172|0, threwValue|0); } tempRet0 = (threwValue); } else { $1173 = -1; };
+       $1174 = tempRet0;
+       $cond1111 = ($1173|0)==(1);
+       if ($cond1111) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1174;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $1168;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       $1175 = ((($pc$6)) + 4|0);
+       $1176 = HEAP32[$1175>>2]|0;
+       $1177 = $1176 & 127;
+       $1178 = (200 + ($1177<<2)|0);
+       $1179 = HEAP32[$1178>>2]|0;
+       $syms$6$phi = $syms$6;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $1179;$i$2 = $1176;$pc$6 = $1175;$regs$5 = $1168;$syms$6 = $syms$6$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+       label = 590;
+       continue L19;
+      } else {
+       $1180 = ((($1114)) + 40|0);
+       HEAP32[$1180>>2] = $1053;
+       $1181 = ((($1114)) + 4|0);
+       HEAP32[$1181>>2] = $m18$0;
+       $1182 = ((($m18$0)) + 12|0);
+       $1183 = HEAP32[$1182>>2]|0;
+       $1184 = ((($1183)) + 12|0);
+       $1185 = HEAP32[$1184>>2]|0;
+       $1186 = ((($1183)) + 16|0);
+       $1187 = HEAP32[$1186>>2]|0;
+       $1188 = ((($1183)) + 2|0);
+       $1189 = HEAP16[$1188>>1]|0;
+       $1190 = $1189&65535;
+       $1191 = ((($1114)) + 12|0);
+       HEAP32[$1191>>2] = $1190;
+       $1192 = ($n22$0|0)==(127);
+       $1193 = ((($1183)) + 2|0);
+       $1194 = HEAP16[$1193>>1]|0;
+       $1195 = $1194&65535;
+       if ($1192) {
+        $1196 = ($1195|0)<(3);
+        if ($1196) {
+         $$reg2mem893$0 = 3;
+        } else {
+         $1197 = ((($1183)) + 2|0);
+         $1198 = HEAP16[$1197>>1]|0;
+         $1199 = $1198&65535;
+         $$reg2mem893$0 = $1199;
+        }
+        __THREW__ = 0;
+        invoke_viii(142,($mrb|0),($$reg2mem893$0|0),3);
+        $1200 = __THREW__; __THREW__ = 0;
+        if ((($1200|0) != 0) & ((threwValue|0) != 0)) { $1201 = _testSetjmp(HEAP32[$1200>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1201|0) == 0) { _longjmp($1200|0, threwValue|0); } tempRet0 = (threwValue); } else { $1201 = -1; };
+        $1202 = tempRet0;
+        $cond1108 = ($1201|0)==(1);
+        if ($cond1108) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1202;$exc_catched$1 = $exc_catched$5;$irep$1 = $1183;$pc$1 = $pc$6;$pool$1 = $1185;$regs$1 = $regs$5;$syms$1 = $1187;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+       } else {
+        $1203 = ((($1114)) + 36|0);
+        $1204 = HEAP32[$1203>>2]|0;
+        $1205 = (($1204) + 2)|0;
+        __THREW__ = 0;
+        invoke_viii(142,($mrb|0),($1195|0),($1205|0));
+        $1206 = __THREW__; __THREW__ = 0;
+        if ((($1206|0) != 0) & ((threwValue|0) != 0)) { $1207 = _testSetjmp(HEAP32[$1206>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1207|0) == 0) { _longjmp($1206|0, threwValue|0); } tempRet0 = (threwValue); } else { $1207 = -1; };
+        $1208 = tempRet0;
+        $cond1107 = ($1207|0)==(1);
+        if ($cond1107) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1208;$exc_catched$1 = $exc_catched$5;$irep$1 = $1183;$pc$1 = $pc$6;$pool$1 = $1185;$regs$1 = $regs$5;$syms$1 = $1187;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+       }
+       $1209 = ((($mrb)) + 12|0);
+       $1210 = HEAP32[$1209>>2]|0;
+       $1211 = ((($1210)) + 4|0);
+       $1212 = HEAP32[$1211>>2]|0;
+       $1213 = ((($1183)) + 8|0);
+       $1214 = HEAP32[$1213>>2]|0;
+       $1215 = HEAP32[$1214>>2]|0;
+       $1216 = $1215 & 127;
+       $1217 = (200 + ($1216<<2)|0);
+       $1218 = HEAP32[$1217>>2]|0;
+       $exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $1218;$i$2 = $1215;$irep$8 = $1183;$pc$6 = $1214;$pool$6 = $1185;$regs$5 = $1212;$syms$6 = $1187;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+       label = 590;
+       continue L19;
+      }
+      break;
+     }
+     case 38:  {
+      $1219 = $i$2 >>> 23;
+      $1220 = $1219 & 511;
+      $1221 = $i$2 >>> 7;
+      $1222 = $1221 & 65535;
+      $1223 = $1222 >> 10;
+      $1224 = $1223 & 63;
+      $1225 = $1222 >> 9;
+      $1226 = $1225 & 1;
+      $1227 = $1222 >> 4;
+      $1228 = $1227 & 31;
+      $1229 = $1222 >> 0;
+      $1230 = $1229 & 15;
+      $1231 = ($1230|0)==(0);
+      do {
+       if ($1231) {
+        $1232 = ((($regs$5)) + 8|0);
+        $stack$0 = $1232;
+       } else {
+        $1233 = (($1230) - 1)|0;
+        __THREW__ = 0;
+        $1234 = (invoke_iii(161,($mrb|0),($1233|0))|0);
+        $1235 = __THREW__; __THREW__ = 0;
+        if ((($1235|0) != 0) & ((threwValue|0) != 0)) { $1236 = _testSetjmp(HEAP32[$1235>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1236|0) == 0) { _longjmp($1235|0, threwValue|0); } tempRet0 = (threwValue); } else { $1236 = -1; };
+        $1237 = tempRet0;
+        $cond1091 = ($1236|0)==(1);
+        if ($cond1091) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1237;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        $1238 = ($1234|0)!=(0|0);
+        if ($1238) {
+         $1251 = ((($1234)) + 12|0);
+         $1252 = HEAP32[$1251>>2]|0;
+         $1253 = ((($1252)) + 8|0);
+         $stack$0 = $1253;
+         break;
+        }
+        __THREW__ = 0;
+        $1239 = (invoke_iii(135,($mrb|0),(67669|0))|0);
+        $1240 = __THREW__; __THREW__ = 0;
+        if ((($1240|0) != 0) & ((threwValue|0) != 0)) { $1241 = _testSetjmp(HEAP32[$1240>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1241|0) == 0) { _longjmp($1240|0, threwValue|0); } tempRet0 = (threwValue); } else { $1241 = -1; };
+        $1242 = tempRet0;
+        $cond1092 = ($1241|0)==(1);
+        if ($cond1092) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1242;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        __THREW__ = 0;
+        invoke_viiii(171,($17|0),($mrb|0),(56470|0),30);
+        $1243 = __THREW__; __THREW__ = 0;
+        if ((($1243|0) != 0) & ((threwValue|0) != 0)) { $1244 = _testSetjmp(HEAP32[$1243>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1244|0) == 0) { _longjmp($1243|0, threwValue|0); } tempRet0 = (threwValue); } else { $1244 = -1; };
+        $1245 = tempRet0;
+        $cond1093 = ($1244|0)==(1);
+        if ($cond1093) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1245;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        __THREW__ = 0;
+        ;HEAP32[$$byval_copy916>>2]=HEAP32[$17>>2]|0;HEAP32[$$byval_copy916+4>>2]=HEAP32[$17+4>>2]|0;
+        invoke_viiii(172,($18|0),($mrb|0),($1239|0),($$byval_copy916|0));
+        $1246 = __THREW__; __THREW__ = 0;
+        if ((($1246|0) != 0) & ((threwValue|0) != 0)) { $1247 = _testSetjmp(HEAP32[$1246>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1247|0) == 0) { _longjmp($1246|0, threwValue|0); } tempRet0 = (threwValue); } else { $1247 = -1; };
+        $1248 = tempRet0;
+        $cond1094 = ($1247|0)==(1);
+        if ($cond1094) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1248;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        ;HEAP32[$exc25>>2]=HEAP32[$18>>2]|0;HEAP32[$exc25+4>>2]=HEAP32[$18+4>>2]|0;
+        $1249 = HEAP32[$exc25>>2]|0;
+        $1250 = ((($mrb)) + 20|0);
+        HEAP32[$1250>>2] = $1249;
+        $$5 = $$8;$exc_catched$2 = $exc_catched$5;$irep$5 = $irep$8;$pc$3 = $pc$6;$pool$3 = $pool$6;$regs$2 = $regs$5;$syms$3 = $syms$6;
+        label = 276;
+        continue L19;
+       }
+      } while(0);
+      $1254 = ($1226|0)==(0);
+      if ($1254) {
+       $1255 = (($regs$5) + ($1220<<3)|0);
+       $1256 = (($1224) + ($1228))|0;
+       __THREW__ = 0;
+       invoke_viiii(167,($19|0),($mrb|0),($1256|0),($stack$0|0));
+       $1257 = __THREW__; __THREW__ = 0;
+       if ((($1257|0) != 0) & ((threwValue|0) != 0)) { $1258 = _testSetjmp(HEAP32[$1257>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1258|0) == 0) { _longjmp($1257|0, threwValue|0); } tempRet0 = (threwValue); } else { $1258 = -1; };
+       $1259 = tempRet0;
+       $cond1099 = ($1258|0)==(1);
+       if ($cond1099) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1259;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       ;HEAP32[$1255>>2]=HEAP32[$19>>2]|0;HEAP32[$1255+4>>2]=HEAP32[$19+4>>2]|0;
+      } else {
+       $1260 = (($stack$0) + ($1224<<3)|0);
+       $1261 = ((($1260)) + 4|0);
+       $1262 = HEAP32[$1261>>2]|0;
+       $1263 = ($1262|0)==(14);
+       if ($1263) {
+        $1264 = (($stack$0) + ($1224<<3)|0);
+        $1265 = HEAP32[$1264>>2]|0;
+        $1266 = ((($1265)) + 20|0);
+        $1267 = HEAP32[$1266>>2]|0;
+        $1268 = ((($1265)) + 12|0);
+        $1269 = HEAP32[$1268>>2]|0;
+        $len$0 = $1269;$pp$0 = $1267;
+       } else {
+        $len$0 = 0;$pp$0 = 0;
+       }
+       $1270 = (($regs$5) + ($1220<<3)|0);
+       $1271 = (($1224) + ($len$0))|0;
+       $1272 = (($1271) + ($1228))|0;
+       __THREW__ = 0;
+       invoke_viii(173,($20|0),($mrb|0),($1272|0));
+       $1273 = __THREW__; __THREW__ = 0;
+       if ((($1273|0) != 0) & ((threwValue|0) != 0)) { $1274 = _testSetjmp(HEAP32[$1273>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1274|0) == 0) { _longjmp($1273|0, threwValue|0); } tempRet0 = (threwValue); } else { $1274 = -1; };
+       $1275 = tempRet0;
+       $cond1095 = ($1274|0)==(1);
+       if ($cond1095) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1275;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       ;HEAP32[$1270>>2]=HEAP32[$20>>2]|0;HEAP32[$1270+4>>2]=HEAP32[$20+4>>2]|0;
+       $1276 = (($regs$5) + ($1220<<3)|0);
+       $1277 = HEAP32[$1276>>2]|0;
+       $1278 = ($1224|0)>(0);
+       if ($1278) {
+        $1279 = ((($1277)) + 20|0);
+        $1280 = HEAP32[$1279>>2]|0;
+        __THREW__ = 0;
+        invoke_viii(144,($1280|0),($stack$0|0),($1224|0));
+        $1281 = __THREW__; __THREW__ = 0;
+        if ((($1281|0) != 0) & ((threwValue|0) != 0)) { $1282 = _testSetjmp(HEAP32[$1281>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1282|0) == 0) { _longjmp($1281|0, threwValue|0); } tempRet0 = (threwValue); } else { $1282 = -1; };
+        $1283 = tempRet0;
+        $cond1098 = ($1282|0)==(1);
+        if ($cond1098) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1283;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+       }
+       $1284 = ($len$0|0)>(0);
+       if ($1284) {
+        $1285 = ((($1277)) + 20|0);
+        $1286 = HEAP32[$1285>>2]|0;
+        $1287 = (($1286) + ($1224<<3)|0);
+        __THREW__ = 0;
+        invoke_viii(144,($1287|0),($pp$0|0),($len$0|0));
+        $1288 = __THREW__; __THREW__ = 0;
+        if ((($1288|0) != 0) & ((threwValue|0) != 0)) { $1289 = _testSetjmp(HEAP32[$1288>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1289|0) == 0) { _longjmp($1288|0, threwValue|0); } tempRet0 = (threwValue); } else { $1289 = -1; };
+        $1290 = tempRet0;
+        $cond1097 = ($1289|0)==(1);
+        if ($cond1097) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1290;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+       }
+       $1291 = ($1228|0)>(0);
+       if ($1291) {
+        $1292 = ((($1277)) + 20|0);
+        $1293 = HEAP32[$1292>>2]|0;
+        $1294 = (($1293) + ($1224<<3)|0);
+        $1295 = (($1294) + ($len$0<<3)|0);
+        $1296 = (($stack$0) + ($1224<<3)|0);
+        $1297 = ((($1296)) + 8|0);
+        __THREW__ = 0;
+        invoke_viii(144,($1295|0),($1297|0),($1228|0));
+        $1298 = __THREW__; __THREW__ = 0;
+        if ((($1298|0) != 0) & ((threwValue|0) != 0)) { $1299 = _testSetjmp(HEAP32[$1298>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1299|0) == 0) { _longjmp($1298|0, threwValue|0); } tempRet0 = (threwValue); } else { $1299 = -1; };
+        $1300 = tempRet0;
+        $cond1096 = ($1299|0)==(1);
+        if ($cond1096) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1300;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+       }
+       $1301 = (($1224) + ($len$0))|0;
+       $1302 = (($1301) + ($1228))|0;
+       $1303 = ((($1277)) + 12|0);
+       HEAP32[$1303>>2] = $1302;
+      }
+      $1304 = (($1220) + 1)|0;
+      $1305 = (($regs$5) + ($1304<<3)|0);
+      $1306 = (($1224) + ($1226))|0;
+      $1307 = (($1306) + ($1228))|0;
+      $1308 = (($stack$0) + ($1307<<3)|0);
+      ;HEAP32[$1305>>2]=HEAP32[$1308>>2]|0;HEAP32[$1305+4>>2]=HEAP32[$1308+4>>2]|0;
+      $1309 = ((($mrb)) + 92|0);
+      $1310 = ((($1309)) + 416|0);
+      HEAP32[$1310>>2] = $ai$1;
+      $1311 = ((($pc$6)) + 4|0);
+      $1312 = HEAP32[$1311>>2]|0;
+      $1313 = $1312 & 127;
+      $1314 = (200 + ($1313<<2)|0);
+      $1315 = HEAP32[$1314>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $1315;$i$2 = $1312;$pc$6 = $1311;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 39:  {
+      $1316 = $i$2 >>> 7;
+      $1317 = $1316 & 33554431;
+      $1318 = $1317 >>> 18;
+      $1319 = $1318 & 31;
+      $1320 = $1317 >>> 13;
+      $1321 = $1320 & 31;
+      $1322 = $1317 >>> 12;
+      $1323 = $1322 & 1;
+      $1324 = $1317 >>> 7;
+      $1325 = $1324 & 31;
+      $1326 = ((($mrb)) + 12|0);
+      $1327 = HEAP32[$1326>>2]|0;
+      $1328 = ((($1327)) + 16|0);
+      $1329 = HEAP32[$1328>>2]|0;
+      $1330 = ((($1329)) + 36|0);
+      $1331 = HEAP32[$1330>>2]|0;
+      $1332 = ((($regs$5)) + 8|0);
+      $1333 = (($1319) + ($1321))|0;
+      $1334 = (($1333) + ($1323))|0;
+      $1335 = (($1334) + ($1325))|0;
+      $1336 = ($1331|0)<(0);
+      $1337 = $1336 ? 1 : $1331;
+      $1338 = (($1332) + ($1337<<3)|0);
+      $1339 = ((($1338)) + 4|0);
+      $1340 = HEAP32[$1339>>2]|0;
+      $1341 = ($1340|0)==(0);
+      if ($1341) {
+       $1342 = HEAP32[$1338>>2]|0;
+       $1343 = ($1342|0)!=(0);
+       if ($1343) {
+        label = 222;
+       }
+      } else {
+       label = 222;
+      }
+      if ((label|0) == 222) {
+       label = 0;
+       $1344 = ((($1338)) + 4|0);
+       $1345 = HEAP32[$1344>>2]|0;
+       $1346 = ($1345|0)!=(13);
+       if ($1346) {
+        __THREW__ = 0;
+        ;HEAP32[$$byval_copy917>>2]=HEAP32[$1338>>2]|0;HEAP32[$$byval_copy917+4>>2]=HEAP32[$1338+4>>2]|0;
+        invoke_viiiiii(174,($21|0),($mrb|0),($$byval_copy917|0),13,(65315|0),(56501|0));
+        $1347 = __THREW__; __THREW__ = 0;
+        if ((($1347|0) != 0) & ((threwValue|0) != 0)) { $1348 = _testSetjmp(HEAP32[$1347>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1348|0) == 0) { _longjmp($1347|0, threwValue|0); } tempRet0 = (threwValue); } else { $1348 = -1; };
+        $1349 = tempRet0;
+        $cond1090 = ($1348|0)==(1);
+        if ($cond1090) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1349;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        ;HEAP32[$1338>>2]=HEAP32[$21>>2]|0;HEAP32[$1338+4>>2]=HEAP32[$21+4>>2]|0;
+       }
+      }
+      $1350 = ($1331|0)<(0);
+      if ($1350) {
+       $1351 = ((($regs$5)) + 8|0);
+       $1352 = HEAP32[$1351>>2]|0;
+       $1353 = ((($1352)) + 20|0);
+       $1354 = HEAP32[$1353>>2]|0;
+       $1355 = ((($1352)) + 12|0);
+       $1356 = HEAP32[$1355>>2]|0;
+       $1357 = ((($regs$5)) + 8|0);
+       __THREW__ = 0;
+       ;HEAP32[$$byval_copy918>>2]=HEAP32[$1357>>2]|0;HEAP32[$$byval_copy918+4>>2]=HEAP32[$1357+4>>2]|0;
+       invoke_vii(148,($mrb|0),($$byval_copy918|0));
+       $1358 = __THREW__; __THREW__ = 0;
+       if ((($1358|0) != 0) & ((threwValue|0) != 0)) { $1359 = _testSetjmp(HEAP32[$1358>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1359|0) == 0) { _longjmp($1358|0, threwValue|0); } tempRet0 = (threwValue); } else { $1359 = -1; };
+       $1360 = tempRet0;
+       $cond1089 = ($1359|0)==(1);
+       if ($cond1089) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1360;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       $argc$0 = $1356;$argv$0 = $1354;
+      } else {
+       $argc$0 = $1331;$argv$0 = $1332;
+      }
+      $1361 = ((($mrb)) + 12|0);
+      $1362 = HEAP32[$1361>>2]|0;
+      $1363 = ((($1362)) + 16|0);
+      $1364 = HEAP32[$1363>>2]|0;
+      $1365 = ((($1364)) + 4|0);
+      $1366 = HEAP32[$1365>>2]|0;
+      $1367 = ($1366|0)!=(0|0);
+      do {
+       if ($1367) {
+        $1368 = ((($mrb)) + 12|0);
+        $1369 = HEAP32[$1368>>2]|0;
+        $1370 = ((($1369)) + 16|0);
+        $1371 = HEAP32[$1370>>2]|0;
+        $1372 = ((($1371)) + 4|0);
+        $1373 = HEAP32[$1372>>2]|0;
+        $1374 = HEAP32[$1373>>2]|0;
+        $1375 = $1374 >>> 11;
+        $1376 = $1375 & 256;
+        $1377 = ($1376|0)!=(0);
+        if ($1377) {
+         $1378 = ($argc$0|0)>=(0);
+         if ($1378) {
+          $1379 = (($1319) + ($1325))|0;
+          $1380 = ($argc$0|0)<($1379|0);
+          if (!($1380)) {
+           $1381 = ($1323|0)==(0);
+           if (!($1381)) {
+            $argc$1 = $argc$0;$argv$1 = $argv$0;
+            break;
+           }
+           $1382 = ($argc$0|0)>($1335|0);
+           if (!($1382)) {
+            $argc$1 = $argc$0;$argv$1 = $argv$0;
+            break;
+           }
+          }
+          $1383 = (($1319) + ($1325))|0;
+          __THREW__ = 0;
+          invoke_vii(175,($mrb|0),($1383|0));
+          $1384 = __THREW__; __THREW__ = 0;
+          if ((($1384|0) != 0) & ((threwValue|0) != 0)) { $1385 = _testSetjmp(HEAP32[$1384>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1385|0) == 0) { _longjmp($1384|0, threwValue|0); } tempRet0 = (threwValue); } else { $1385 = -1; };
+          $1386 = tempRet0;
+          $cond1088 = ($1385|0)==(1);
+          if ($cond1088) {
+           $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1386;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+           continue L3;
+          }
+          $$5 = $$8;$exc_catched$2 = $exc_catched$5;$irep$5 = $irep$8;$pc$3 = $pc$6;$pool$3 = $pool$6;$regs$2 = $regs$5;$syms$3 = $syms$6;
+          label = 276;
+          continue L19;
+         } else {
+          $argc$1 = $argc$0;$argv$1 = $argv$0;
+         }
+        } else {
+         label = 236;
+        }
+       } else {
+        label = 236;
+       }
+      } while(0);
+      if ((label|0) == 236) {
+       label = 0;
+       $1387 = ($1335|0)>(1);
+       $1388 = ($argc$0|0)==(1);
+       $or$cond = $1387 & $1388;
+       if ($or$cond) {
+        $1389 = ((($argv$0)) + 4|0);
+        $1390 = HEAP32[$1389>>2]|0;
+        $1391 = ($1390|0)==(14);
+        if ($1391) {
+         __THREW__ = 0;
+         ;HEAP32[$$byval_copy919>>2]=HEAP32[$argv$0>>2]|0;HEAP32[$$byval_copy919+4>>2]=HEAP32[$argv$0+4>>2]|0;
+         invoke_vii(148,($mrb|0),($$byval_copy919|0));
+         $1392 = __THREW__; __THREW__ = 0;
+         if ((($1392|0) != 0) & ((threwValue|0) != 0)) { $1393 = _testSetjmp(HEAP32[$1392>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1393|0) == 0) { _longjmp($1392|0, threwValue|0); } tempRet0 = (threwValue); } else { $1393 = -1; };
+         $1394 = tempRet0;
+         $cond1087 = ($1393|0)==(1);
+         if ($cond1087) {
+          $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1394;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+          continue L3;
+         }
+         $1395 = HEAP32[$argv$0>>2]|0;
+         $1396 = ((($1395)) + 12|0);
+         $1397 = HEAP32[$1396>>2]|0;
+         $1398 = HEAP32[$argv$0>>2]|0;
+         $1399 = ((($1398)) + 20|0);
+         $1400 = HEAP32[$1399>>2]|0;
+         $argc$1 = $1397;$argv$1 = $1400;
+        } else {
+         $argc$1 = $argc$0;$argv$1 = $argv$0;
+        }
+       } else {
+        $argc$1 = $argc$0;$argv$1 = $argv$0;
+       }
+      }
+      $1401 = ((($mrb)) + 12|0);
+      $1402 = HEAP32[$1401>>2]|0;
+      $1403 = ((($1402)) + 16|0);
+      $1404 = HEAP32[$1403>>2]|0;
+      $1405 = ((($1404)) + 36|0);
+      HEAP32[$1405>>2] = $1335;
+      $1406 = ($argc$1|0)<($1335|0);
+      do {
+       if ($1406) {
+        $1407 = (($1319) + ($1325))|0;
+        $1408 = ($argc$1|0)<($1407|0);
+        do {
+         if ($1408) {
+          $1409 = ($1319|0)<($argc$1|0);
+          if ($1409) {
+           $1410 = (($argc$1) - ($1319))|0;
+           $mlen$0 = $1410;
+           break;
+          } else {
+           $mlen$0 = 0;
+           break;
+          }
+         } else {
+          $mlen$0 = $1325;
+         }
+        } while(0);
+        $1411 = (($1335) + 1)|0;
+        $1412 = (($regs$5) + ($1411<<3)|0);
+        ;HEAP32[$1412>>2]=HEAP32[$1338>>2]|0;HEAP32[$1412+4>>2]=HEAP32[$1338+4>>2]|0;
+        $1413 = (($argc$1) + 1)|0;
+        $1414 = (($regs$5) + ($1413<<3)|0);
+        $1415 = ((($1414)) + 4|0);
+        HEAP32[$1415>>2] = 0;
+        $1416 = (($argc$1) + 1)|0;
+        $1417 = (($regs$5) + ($1416<<3)|0);
+        HEAP32[$1417>>2] = 0;
+        $1418 = ($1332|0)!=($argv$1|0);
+        if ($1418) {
+         $1419 = ((($regs$5)) + 8|0);
+         $1420 = (($argc$1) - ($mlen$0))|0;
+         __THREW__ = 0;
+         invoke_viii(170,($1419|0),($argv$1|0),($1420|0));
+         $1421 = __THREW__; __THREW__ = 0;
+         if ((($1421|0) != 0) & ((threwValue|0) != 0)) { $1422 = _testSetjmp(HEAP32[$1421>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1422|0) == 0) { _longjmp($1421|0, threwValue|0); } tempRet0 = (threwValue); } else { $1422 = -1; };
+         $1423 = tempRet0;
+         $cond1086 = ($1422|0)==(1);
+         if ($cond1086) {
+          $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1423;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+          continue L3;
+         }
+        }
+        $1424 = ($mlen$0|0)!=(0);
+        if ($1424) {
+         $1425 = (($1335) - ($1325))|0;
+         $1426 = (($1425) + 1)|0;
+         $1427 = (($regs$5) + ($1426<<3)|0);
+         $1428 = (($argc$1) - ($mlen$0))|0;
+         $1429 = (($argv$1) + ($1428<<3)|0);
+         __THREW__ = 0;
+         invoke_viii(170,($1427|0),($1429|0),($mlen$0|0));
+         $1430 = __THREW__; __THREW__ = 0;
+         if ((($1430|0) != 0) & ((threwValue|0) != 0)) { $1431 = _testSetjmp(HEAP32[$1430>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1431|0) == 0) { _longjmp($1430|0, threwValue|0); } tempRet0 = (threwValue); } else { $1431 = -1; };
+         $1432 = tempRet0;
+         $cond1085 = ($1431|0)==(1);
+         if ($cond1085) {
+          $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1432;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+          continue L3;
+         }
+        }
+        $1433 = ($1323|0)!=(0);
+        if ($1433) {
+         $1434 = (($1319) + ($1321))|0;
+         $1435 = (($1434) + 1)|0;
+         $1436 = (($regs$5) + ($1435<<3)|0);
+         __THREW__ = 0;
+         invoke_viii(173,($22|0),($mrb|0),0);
+         $1437 = __THREW__; __THREW__ = 0;
+         if ((($1437|0) != 0) & ((threwValue|0) != 0)) { $1438 = _testSetjmp(HEAP32[$1437>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1438|0) == 0) { _longjmp($1437|0, threwValue|0); } tempRet0 = (threwValue); } else { $1438 = -1; };
+         $1439 = tempRet0;
+         $cond1084 = ($1438|0)==(1);
+         if ($cond1084) {
+          $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1439;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+          continue L3;
+         }
+         ;HEAP32[$1436>>2]=HEAP32[$22>>2]|0;HEAP32[$1436+4>>2]=HEAP32[$22+4>>2]|0;
+        }
+        $1440 = ($1321|0)==(0);
+        if (!($1440)) {
+         $1441 = (($1319) + ($1325))|0;
+         $1442 = ($argc$1|0)<($1441|0);
+         if (!($1442)) {
+          $1444 = (($argc$1) - ($1319))|0;
+          $1445 = (($1444) - ($1325))|0;
+          $1446 = (($1445) + 1)|0;
+          $1447 = (($pc$6) + ($1446<<2)|0);
+          $pc$2 = $1447;
+          break;
+         }
+        }
+        $1443 = ((($pc$6)) + 4|0);
+        $pc$2 = $1443;
+       } else {
+        $1448 = ($1332|0)!=($argv$1|0);
+        if ($1448) {
+         $1449 = (($1335) + 1)|0;
+         $1450 = (($regs$5) + ($1449<<3)|0);
+         ;HEAP32[$1450>>2]=HEAP32[$1338>>2]|0;HEAP32[$1450+4>>2]=HEAP32[$1338+4>>2]|0;
+         $1451 = ((($regs$5)) + 8|0);
+         $1452 = (($1319) + ($1321))|0;
+         __THREW__ = 0;
+         invoke_viii(170,($1451|0),($argv$1|0),($1452|0));
+         $1453 = __THREW__; __THREW__ = 0;
+         if ((($1453|0) != 0) & ((threwValue|0) != 0)) { $1454 = _testSetjmp(HEAP32[$1453>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1454|0) == 0) { _longjmp($1453|0, threwValue|0); } tempRet0 = (threwValue); } else { $1454 = -1; };
+         $1455 = tempRet0;
+         $cond1083 = ($1454|0)==(1);
+         if ($cond1083) {
+          $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1455;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+          continue L3;
+         }
+        }
+        $1456 = ($1323|0)!=(0);
+        if ($1456) {
+         $1457 = (($argc$1) - ($1319))|0;
+         $1458 = (($1457) - ($1321))|0;
+         $1459 = (($1458) - ($1325))|0;
+         $1460 = (($1319) + ($1321))|0;
+         $1461 = (($1460) + 1)|0;
+         $1462 = (($regs$5) + ($1461<<3)|0);
+         $1463 = (($argv$1) + ($1319<<3)|0);
+         $1464 = (($1463) + ($1321<<3)|0);
+         __THREW__ = 0;
+         invoke_viiii(167,($23|0),($mrb|0),($1459|0),($1464|0));
+         $1465 = __THREW__; __THREW__ = 0;
+         if ((($1465|0) != 0) & ((threwValue|0) != 0)) { $1466 = _testSetjmp(HEAP32[$1465>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1466|0) == 0) { _longjmp($1465|0, threwValue|0); } tempRet0 = (threwValue); } else { $1466 = -1; };
+         $1467 = tempRet0;
+         $cond1082 = ($1466|0)==(1);
+         if ($cond1082) {
+          $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1467;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+          continue L3;
+         }
+         ;HEAP32[$1462>>2]=HEAP32[$23>>2]|0;HEAP32[$1462+4>>2]=HEAP32[$23+4>>2]|0;
+         $rnum$0 = $1459;
+        } else {
+         $rnum$0 = 0;
+        }
+        $1468 = ($1325|0)!=(0);
+        if ($1468) {
+         $1469 = (($argc$1) - ($1325))|0;
+         $1470 = ($1469|0)>($1319|0);
+         if ($1470) {
+          $1471 = (($1319) + ($1321))|0;
+          $1472 = (($1471) + ($1323))|0;
+          $1473 = (($1472) + 1)|0;
+          $1474 = (($regs$5) + ($1473<<3)|0);
+          $1475 = (($1319) + ($1321))|0;
+          $1476 = (($1475) + ($rnum$0))|0;
+          $1477 = (($argv$1) + ($1476<<3)|0);
+          __THREW__ = 0;
+          invoke_viii(170,($1474|0),($1477|0),($1325|0));
+          $1478 = __THREW__; __THREW__ = 0;
+          if ((($1478|0) != 0) & ((threwValue|0) != 0)) { $1479 = _testSetjmp(HEAP32[$1478>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1479|0) == 0) { _longjmp($1478|0, threwValue|0); } tempRet0 = (threwValue); } else { $1479 = -1; };
+          $1480 = tempRet0;
+          $cond1081 = ($1479|0)==(1);
+          if ($cond1081) {
+           $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1480;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+           continue L3;
+          }
+         }
+        }
+        $1481 = ($1332|0)==($argv$1|0);
+        if ($1481) {
+         $1482 = (($1335) + 1)|0;
+         $1483 = (($regs$5) + ($1482<<3)|0);
+         ;HEAP32[$1483>>2]=HEAP32[$1338>>2]|0;HEAP32[$1483+4>>2]=HEAP32[$1338+4>>2]|0;
+        }
+        $1484 = (($1321) + 1)|0;
+        $1485 = (($pc$6) + ($1484<<2)|0);
+        $pc$2 = $1485;
+       }
+      } while(0);
+      $1486 = HEAP32[$pc$2>>2]|0;
+      $1487 = $1486 & 127;
+      $1488 = (200 + ($1487<<2)|0);
+      $1489 = HEAP32[$1488>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $1489;$i$2 = $1486;$pc$6 = $pc$2;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 40:  {
+      $1490 = ((($pc$6)) + 4|0);
+      $1491 = HEAP32[$1490>>2]|0;
+      $1492 = $1491 & 127;
+      $1493 = (200 + ($1492<<2)|0);
+      $1494 = HEAP32[$1493>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $1494;$i$2 = $1491;$pc$6 = $1490;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 41:  {
+      $1495 = ((($pc$6)) + 4|0);
+      $1496 = HEAP32[$1495>>2]|0;
+      $1497 = $1496 & 127;
+      $1498 = (200 + ($1497<<2)|0);
+      $1499 = HEAP32[$1498>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $1499;$i$2 = $1496;$pc$6 = $1495;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 42:  {
+      $$4 = $$8;$i$1 = $i$2;$irep$4 = $irep$8;
+      break;
+     }
+     case 43:  {
+      $1864 = $i$2 >>> 23;
+      $1865 = $1864 & 511;
+      $1866 = $i$2 >>> 7;
+      $1867 = $1866 & 127;
+      $1868 = $i$2 >>> 14;
+      $1869 = $1868 & 511;
+      $1870 = (($syms$6) + ($1869<<2)|0);
+      $1871 = HEAP32[$1870>>2]|0;
+      $1872 = (($regs$5) + ($1865<<3)|0);
+      ;HEAP32[$recv44>>2]=HEAP32[$1872>>2]|0;HEAP32[$recv44+4>>2]=HEAP32[$1872+4>>2]|0;
+      __THREW__ = 0;
+      ;HEAP32[$recv44$byval_copy>>2]=HEAP32[$recv44>>2]|0;HEAP32[$recv44$byval_copy+4>>2]=HEAP32[$recv44+4>>2]|0;
+      $1873 = (invoke_iii(138,($mrb|0),($recv44$byval_copy|0))|0);
+      $1874 = __THREW__; __THREW__ = 0;
+      if ((($1874|0) != 0) & ((threwValue|0) != 0)) { $1875 = _testSetjmp(HEAP32[$1874>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1875|0) == 0) { _longjmp($1874|0, threwValue|0); } tempRet0 = (threwValue); } else { $1875 = -1; };
+      $1876 = tempRet0;
+      $cond1059 = ($1875|0)==(1);
+      if ($cond1059) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1876;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      HEAP32[$c42>>2] = $1873;
+      __THREW__ = 0;
+      $1877 = (invoke_iiii(139,($mrb|0),($c42|0),($1871|0))|0);
+      $1878 = __THREW__; __THREW__ = 0;
+      if ((($1878|0) != 0) & ((threwValue|0) != 0)) { $1879 = _testSetjmp(HEAP32[$1878>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1879|0) == 0) { _longjmp($1878|0, threwValue|0); } tempRet0 = (threwValue); } else { $1879 = -1; };
+      $1880 = tempRet0;
+      $cond1060 = ($1879|0)==(1);
+      if ($cond1060) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1880;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $1881 = ($1877|0)!=(0|0);
+      do {
+       if ($1881) {
+        $m41$0 = $1877;$mid45$0 = $1871;$n40$0 = $1867;
+       } else {
+        __THREW__ = 0;
+        invoke_vii(143,($sym46|0),($1871|0));
+        $1882 = __THREW__; __THREW__ = 0;
+        if ((($1882|0) != 0) & ((threwValue|0) != 0)) { $1883 = _testSetjmp(HEAP32[$1882>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1883|0) == 0) { _longjmp($1882|0, threwValue|0); } tempRet0 = (threwValue); } else { $1883 = -1; };
+        $1884 = tempRet0;
+        $cond1061 = ($1883|0)==(1);
+        if ($cond1061) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1884;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        __THREW__ = 0;
+        $1885 = (invoke_iiii(140,($mrb|0),(65322|0),14)|0);
+        $1886 = __THREW__; __THREW__ = 0;
+        if ((($1886|0) != 0) & ((threwValue|0) != 0)) { $1887 = _testSetjmp(HEAP32[$1886>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1887|0) == 0) { _longjmp($1886|0, threwValue|0); } tempRet0 = (threwValue); } else { $1887 = -1; };
+        $1888 = tempRet0;
+        $cond1062 = ($1887|0)==(1);
+        if ($cond1062) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1888;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        __THREW__ = 0;
+        $1889 = (invoke_iiii(139,($mrb|0),($c42|0),($1885|0))|0);
+        $1890 = __THREW__; __THREW__ = 0;
+        if ((($1890|0) != 0) & ((threwValue|0) != 0)) { $1891 = _testSetjmp(HEAP32[$1890>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1891|0) == 0) { _longjmp($1890|0, threwValue|0); } tempRet0 = (threwValue); } else { $1891 = -1; };
+        $1892 = tempRet0;
+        $cond1063 = ($1891|0)==(1);
+        if ($cond1063) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1892;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        $1893 = ($1867|0)==(127);
+        if ($1893) {
+         $1894 = (($1865) + 1)|0;
+         $1895 = (($regs$5) + ($1894<<3)|0);
+         __THREW__ = 0;
+         ;HEAP32[$$byval_copy923>>2]=HEAP32[$1895>>2]|0;HEAP32[$$byval_copy923+4>>2]=HEAP32[$1895+4>>2]|0;
+         ;HEAP32[$sym46$byval_copy>>2]=HEAP32[$sym46>>2]|0;HEAP32[$sym46$byval_copy+4>>2]=HEAP32[$sym46+4>>2]|0;
+         invoke_viiii(169,($27|0),($mrb|0),($$byval_copy923|0),($sym46$byval_copy|0));
+         $1896 = __THREW__; __THREW__ = 0;
+         if ((($1896|0) != 0) & ((threwValue|0) != 0)) { $1897 = _testSetjmp(HEAP32[$1896>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1897|0) == 0) { _longjmp($1896|0, threwValue|0); } tempRet0 = (threwValue); } else { $1897 = -1; };
+         $1898 = tempRet0;
+         $cond1065 = ($1897|0)==(1);
+         if ($cond1065) {
+          $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1898;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+          continue L3;
+         }
+         $m41$0 = $1889;$mid45$0 = $1885;$n40$0 = $1867;
+         break;
+        } else {
+         $1899 = (($regs$5) + ($1865<<3)|0);
+         $1900 = ((($1899)) + 16|0);
+         $1901 = (($regs$5) + ($1865<<3)|0);
+         $1902 = ((($1901)) + 8|0);
+         $1903 = (($1867) + 1)|0;
+         __THREW__ = 0;
+         invoke_viii(170,($1900|0),($1902|0),($1903|0));
+         $1904 = __THREW__; __THREW__ = 0;
+         if ((($1904|0) != 0) & ((threwValue|0) != 0)) { $1905 = _testSetjmp(HEAP32[$1904>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1905|0) == 0) { _longjmp($1904|0, threwValue|0); } tempRet0 = (threwValue); } else { $1905 = -1; };
+         $1906 = tempRet0;
+         $cond1064 = ($1905|0)==(1);
+         if ($cond1064) {
+          $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1906;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+          continue L3;
+         }
+         $1907 = (($1865) + 1)|0;
+         $1908 = (($regs$5) + ($1907<<3)|0);
+         ;HEAP32[$1908>>2]=HEAP32[$sym46>>2]|0;HEAP32[$1908+4>>2]=HEAP32[$sym46+4>>2]|0;
+         $m41$0 = $1889;$mid45$0 = $1885;$n40$0 = $1903;
+         break;
+        }
+       }
+      } while(0);
+      $1909 = ((($mrb)) + 12|0);
+      $1910 = HEAP32[$1909>>2]|0;
+      $1911 = ((($1910)) + 16|0);
+      $1912 = HEAP32[$1911>>2]|0;
+      HEAP32[$1912>>2] = $mid45$0;
+      $1913 = HEAP32[$c42>>2]|0;
+      $1914 = ((($1912)) + 44|0);
+      HEAP32[$1914>>2] = $1913;
+      $1915 = ($n40$0|0)==(127);
+      if ($1915) {
+       $1916 = ((($1912)) + 36|0);
+       HEAP32[$1916>>2] = -1;
+      } else {
+       $1917 = ((($1912)) + 36|0);
+       HEAP32[$1917>>2] = $n40$0;
+      }
+      $1918 = ((($mrb)) + 12|0);
+      $1919 = HEAP32[$1918>>2]|0;
+      $1920 = ((($1919)) + 4|0);
+      $1921 = HEAP32[$1920>>2]|0;
+      $1922 = (($regs$5) + ($1865<<3)|0);
+      $1923 = ((($1912)) + 36|0);
+      $1924 = HEAP32[$1923>>2]|0;
+      $1925 = (($1924) + 1)|0;
+      __THREW__ = 0;
+      invoke_viii(170,($1921|0),($1922|0),($1925|0));
+      $1926 = __THREW__; __THREW__ = 0;
+      if ((($1926|0) != 0) & ((threwValue|0) != 0)) { $1927 = _testSetjmp(HEAP32[$1926>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1927|0) == 0) { _longjmp($1926|0, threwValue|0); } tempRet0 = (threwValue); } else { $1927 = -1; };
+      $1928 = tempRet0;
+      $cond1066 = ($1927|0)==(1);
+      if ($cond1066) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1928;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $1929 = HEAP32[$m41$0>>2]|0;
+      $1930 = $1929 >>> 11;
+      $1931 = $1930 & 128;
+      $1932 = ($1931|0)!=(0);
+      if ($1932) {
+       $1933 = ((($mrb)) + 12|0);
+       $1934 = HEAP32[$1933>>2]|0;
+       $1935 = ((($1934)) + 4|0);
+       $1936 = HEAP32[$1935>>2]|0;
+       $1937 = ((($m41$0)) + 12|0);
+       $1938 = HEAP32[$1937>>2]|0;
+       __THREW__ = 0;
+       ;HEAP32[$recv44$byval_copy924>>2]=HEAP32[$recv44>>2]|0;HEAP32[$recv44$byval_copy924+4>>2]=HEAP32[$recv44+4>>2]|0;
+       invoke_viii($1938|0,($28|0),($mrb|0),($recv44$byval_copy924|0));
+       $1939 = __THREW__; __THREW__ = 0;
+       if ((($1939|0) != 0) & ((threwValue|0) != 0)) { $1940 = _testSetjmp(HEAP32[$1939>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1940|0) == 0) { _longjmp($1939|0, threwValue|0); } tempRet0 = (threwValue); } else { $1940 = -1; };
+       $1941 = tempRet0;
+       $cond1069 = ($1940|0)==(1);
+       if ($cond1069) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1941;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       ;HEAP32[$1936>>2]=HEAP32[$28>>2]|0;HEAP32[$1936+4>>2]=HEAP32[$28+4>>2]|0;
+       __THREW__ = 0;
+       invoke_vii(146,($mrb|0),($ai$1|0));
+       $1942 = __THREW__; __THREW__ = 0;
+       if ((($1942|0) != 0) & ((threwValue|0) != 0)) { $1943 = _testSetjmp(HEAP32[$1942>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1943|0) == 0) { _longjmp($1942|0, threwValue|0); } tempRet0 = (threwValue); } else { $1943 = -1; };
+       $1944 = tempRet0;
+       $cond1070 = ($1943|0)==(1);
+       if ($cond1070) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1944;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       $$3 = $$8;$irep$3 = $irep$8;
+       label = 274;
+       break L50;
+      }
+      $1945 = ((($m41$0)) + 12|0);
+      $1946 = HEAP32[$1945>>2]|0;
+      $1947 = ((($1946)) + 12|0);
+      $1948 = HEAP32[$1947>>2]|0;
+      $1949 = ((($1946)) + 16|0);
+      $1950 = HEAP32[$1949>>2]|0;
+      $1951 = ((($1912)) + 36|0);
+      $1952 = HEAP32[$1951>>2]|0;
+      $1953 = ($1952|0)<(0);
+      $1954 = ((($1946)) + 2|0);
+      $1955 = HEAP16[$1954>>1]|0;
+      $1956 = $1955&65535;
+      if ($1953) {
+       $1957 = ($1956|0)<(3);
+       if ($1957) {
+        $$reg2mem891$0 = 3;
+       } else {
+        $1958 = ((($1946)) + 2|0);
+        $1959 = HEAP16[$1958>>1]|0;
+        $1960 = $1959&65535;
+        $$reg2mem891$0 = $1960;
+       }
+       __THREW__ = 0;
+       invoke_viii(142,($mrb|0),($$reg2mem891$0|0),3);
+       $1961 = __THREW__; __THREW__ = 0;
+       if ((($1961|0) != 0) & ((threwValue|0) != 0)) { $1962 = _testSetjmp(HEAP32[$1961>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1962|0) == 0) { _longjmp($1961|0, threwValue|0); } tempRet0 = (threwValue); } else { $1962 = -1; };
+       $1963 = tempRet0;
+       $cond1068 = ($1962|0)==(1);
+       if ($cond1068) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1963;$exc_catched$1 = $exc_catched$5;$irep$1 = $1946;$pc$1 = $pc$6;$pool$1 = $1948;$regs$1 = $regs$5;$syms$1 = $1950;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+      } else {
+       $1964 = ((($1912)) + 36|0);
+       $1965 = HEAP32[$1964>>2]|0;
+       $1966 = (($1965) + 2)|0;
+       __THREW__ = 0;
+       invoke_viii(142,($mrb|0),($1956|0),($1966|0));
+       $1967 = __THREW__; __THREW__ = 0;
+       if ((($1967|0) != 0) & ((threwValue|0) != 0)) { $1968 = _testSetjmp(HEAP32[$1967>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1968|0) == 0) { _longjmp($1967|0, threwValue|0); } tempRet0 = (threwValue); } else { $1968 = -1; };
+       $1969 = tempRet0;
+       $cond1067 = ($1968|0)==(1);
+       if ($cond1067) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1969;$exc_catched$1 = $exc_catched$5;$irep$1 = $1946;$pc$1 = $pc$6;$pool$1 = $1948;$regs$1 = $regs$5;$syms$1 = $1950;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+      }
+      $1970 = ((($mrb)) + 12|0);
+      $1971 = HEAP32[$1970>>2]|0;
+      $1972 = ((($1971)) + 4|0);
+      $1973 = HEAP32[$1972>>2]|0;
+      $1974 = ((($1946)) + 8|0);
+      $1975 = HEAP32[$1974>>2]|0;
+      $1976 = HEAP32[$1975>>2]|0;
+      $1977 = $1976 & 127;
+      $1978 = (200 + ($1977<<2)|0);
+      $1979 = HEAP32[$1978>>2]|0;
+      $exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $1979;$i$2 = $1976;$irep$8 = $1946;$pc$6 = $1975;$pool$6 = $1948;$regs$5 = $1973;$syms$6 = $1950;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 44:  {
+      $1980 = $i$2 >>> 23;
+      $1981 = $1980 & 511;
+      $1982 = $i$2 >>> 7;
+      $1983 = $1982 & 65535;
+      $1984 = $1983 >> 10;
+      $1985 = $1984 & 63;
+      $1986 = $1983 >> 9;
+      $1987 = $1986 & 1;
+      $1988 = $1983 >> 4;
+      $1989 = $1988 & 31;
+      $1990 = $1983 >> 0;
+      $1991 = $1990 & 15;
+      $1992 = ($1991|0)==(0);
+      do {
+       if ($1992) {
+        $1993 = ((($regs$5)) + 8|0);
+        $stack53$0 = $1993;
+       } else {
+        $1994 = (($1991) - 1)|0;
+        __THREW__ = 0;
+        $1995 = (invoke_iii(161,($mrb|0),($1994|0))|0);
+        $1996 = __THREW__; __THREW__ = 0;
+        if ((($1996|0) != 0) & ((threwValue|0) != 0)) { $1997 = _testSetjmp(HEAP32[$1996>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1997|0) == 0) { _longjmp($1996|0, threwValue|0); } tempRet0 = (threwValue); } else { $1997 = -1; };
+        $1998 = tempRet0;
+        $cond1057 = ($1997|0)==(1);
+        if ($cond1057) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $1998;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        $1999 = ($1995|0)!=(0|0);
+        if ($1999) {
+         $2003 = ((($1995)) + 12|0);
+         $2004 = HEAP32[$2003>>2]|0;
+         $2005 = ((($2004)) + 8|0);
+         $stack53$0 = $2005;
+         break;
+        }
+        __THREW__ = 0;
+        invoke_vii(180,($mrb|0),2);
+        $2000 = __THREW__; __THREW__ = 0;
+        if ((($2000|0) != 0) & ((threwValue|0) != 0)) { $2001 = _testSetjmp(HEAP32[$2000>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2001|0) == 0) { _longjmp($2000|0, threwValue|0); } tempRet0 = (threwValue); } else { $2001 = -1; };
+        $2002 = tempRet0;
+        $cond1058 = ($2001|0)==(1);
+        if ($cond1058) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2002;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        $$5 = $$8;$exc_catched$2 = $exc_catched$5;$irep$5 = $irep$8;$pc$3 = $pc$6;$pool$3 = $pool$6;$regs$2 = $regs$5;$syms$3 = $syms$6;
+        label = 276;
+        continue L19;
+       }
+      } while(0);
+      $2006 = (($regs$5) + ($1981<<3)|0);
+      $2007 = (($1985) + ($1987))|0;
+      $2008 = (($2007) + ($1989))|0;
+      $2009 = (($stack53$0) + ($2008<<3)|0);
+      ;HEAP32[$2006>>2]=HEAP32[$2009>>2]|0;HEAP32[$2006+4>>2]=HEAP32[$2009+4>>2]|0;
+      $2010 = ((($pc$6)) + 4|0);
+      $2011 = HEAP32[$2010>>2]|0;
+      $2012 = $2011 & 127;
+      $2013 = (200 + ($2012<<2)|0);
+      $2014 = HEAP32[$2013>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2014;$i$2 = $2011;$pc$6 = $2010;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 45:  {
+      $2015 = $i$2 >>> 23;
+      $2016 = $2015 & 511;
+      $2017 = (($regs$5) + ($2016<<3)|0);
+      $2018 = ((($2017)) + 4|0);
+      $2019 = HEAP32[$2018>>2]|0;
+      $2020 = $2019&65535;
+      $2021 = $2020&65535;
+      $2022 = $2021 << 8;
+      $2023 = (($2016) + 1)|0;
+      $2024 = (($regs$5) + ($2023<<3)|0);
+      $2025 = ((($2024)) + 4|0);
+      $2026 = HEAP32[$2025>>2]|0;
+      $2027 = $2026&65535;
+      $2028 = $2027&65535;
+      $2029 = $2028 & 255;
+      $2030 = $2022 | $2029;
+      L372: do {
+       switch ($2030|0) {
+       case 771:  {
+        $2031 = (($regs$5) + ($2016<<3)|0);
+        $2032 = HEAP32[$2031>>2]|0;
+        $2033 = ((($2031)) + 8|0);
+        $2034 = HEAP32[$2033>>2]|0;
+        __THREW__ = 0;
+        $2035 = (invoke_iiii(181,($2032|0),($2034|0),($z|0))|0);
+        $2036 = __THREW__; __THREW__ = 0;
+        if ((($2036|0) != 0) & ((threwValue|0) != 0)) { $2037 = _testSetjmp(HEAP32[$2036>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2037|0) == 0) { _longjmp($2036|0, threwValue|0); } tempRet0 = (threwValue); } else { $2037 = -1; };
+        $2038 = tempRet0;
+        $cond1056 = ($2037|0)==(1);
+        if ($cond1056) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2038;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        $2039 = ($2035<<24>>24)!=(0);
+        if ($2039) {
+         $2040 = ((($2031)) + 4|0);
+         HEAP32[$2040>>2] = 6;
+         $2041 = (+($2032|0));
+         $2042 = (+($2034|0));
+         $2043 = $2041 + $2042;
+         HEAPF32[$2031>>2] = $2043;
+         break L372;
+        } else {
+         $2044 = (($regs$5) + ($2016<<3)|0);
+         $2045 = ((($2044)) + 4|0);
+         HEAP32[$2045>>2] = 3;
+         $2046 = HEAP32[$z>>2]|0;
+         $2047 = (($regs$5) + ($2016<<3)|0);
+         HEAP32[$2047>>2] = $2046;
+         break L372;
+        }
+        break;
+       }
+       case 774:  {
+        $2048 = (($regs$5) + ($2016<<3)|0);
+        $2049 = HEAP32[$2048>>2]|0;
+        $2050 = (($2016) + 1)|0;
+        $2051 = (($regs$5) + ($2050<<3)|0);
+        $2052 = +HEAPF32[$2051>>2];
+        $2053 = (($regs$5) + ($2016<<3)|0);
+        $2054 = ((($2053)) + 4|0);
+        HEAP32[$2054>>2] = 6;
+        $2055 = (+($2049|0));
+        $2056 = $2055 + $2052;
+        $2057 = (($regs$5) + ($2016<<3)|0);
+        HEAPF32[$2057>>2] = $2056;
+        break;
+       }
+       case 1539:  {
+        $2058 = (($regs$5) + ($2016<<3)|0);
+        $2059 = +HEAPF32[$2058>>2];
+        $2060 = (($2016) + 1)|0;
+        $2061 = (($regs$5) + ($2060<<3)|0);
+        $2062 = HEAP32[$2061>>2]|0;
+        $2063 = (+($2062|0));
+        $2064 = $2059 + $2063;
+        $2065 = (($regs$5) + ($2016<<3)|0);
+        HEAPF32[$2065>>2] = $2064;
+        break;
+       }
+       case 1542:  {
+        $2066 = (($regs$5) + ($2016<<3)|0);
+        $2067 = +HEAPF32[$2066>>2];
+        $2068 = (($2016) + 1)|0;
+        $2069 = (($regs$5) + ($2068<<3)|0);
+        $2070 = +HEAPF32[$2069>>2];
+        $2071 = $2067 + $2070;
+        $2072 = (($regs$5) + ($2016<<3)|0);
+        HEAPF32[$2072>>2] = $2071;
+        break;
+       }
+       case 4112:  {
+        $2073 = (($regs$5) + ($2016<<3)|0);
+        $2074 = (($regs$5) + ($2016<<3)|0);
+        $2075 = (($2016) + 1)|0;
+        $2076 = (($regs$5) + ($2075<<3)|0);
+        __THREW__ = 0;
+        ;HEAP32[$$byval_copy925>>2]=HEAP32[$2074>>2]|0;HEAP32[$$byval_copy925+4>>2]=HEAP32[$2074+4>>2]|0;
+        ;HEAP32[$$byval_copy926>>2]=HEAP32[$2076>>2]|0;HEAP32[$$byval_copy926+4>>2]=HEAP32[$2076+4>>2]|0;
+        invoke_viiii(182,($29|0),($mrb|0),($$byval_copy925|0),($$byval_copy926|0));
+        $2077 = __THREW__; __THREW__ = 0;
+        if ((($2077|0) != 0) & ((threwValue|0) != 0)) { $2078 = _testSetjmp(HEAP32[$2077>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2078|0) == 0) { _longjmp($2077|0, threwValue|0); } tempRet0 = (threwValue); } else { $2078 = -1; };
+        $2079 = tempRet0;
+        $cond1055 = ($2078|0)==(1);
+        if ($cond1055) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2079;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        ;HEAP32[$2073>>2]=HEAP32[$29>>2]|0;HEAP32[$2073+4>>2]=HEAP32[$29+4>>2]|0;
+        break;
+       }
+       default: {
+        $i$0 = $i$2;
+        label = 92;
+        break L50;
+       }
+       }
+      } while(0);
+      $2080 = ((($mrb)) + 92|0);
+      $2081 = ((($2080)) + 416|0);
+      HEAP32[$2081>>2] = $ai$1;
+      $2082 = ((($pc$6)) + 4|0);
+      $2083 = HEAP32[$2082>>2]|0;
+      $2084 = $2083 & 127;
+      $2085 = (200 + ($2084<<2)|0);
+      $2086 = HEAP32[$2085>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2086;$i$2 = $2083;$pc$6 = $2082;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 46:  {
+      $2270 = $i$2 >>> 23;
+      $2271 = $2270 & 511;
+      $2272 = (($regs$5) + ($2271<<3)|0);
+      $2273 = ((($2272)) + 4|0);
+      $2274 = HEAP32[$2273>>2]|0;
+      L385: do {
+       switch ($2274|0) {
+       case 3:  {
+        $2275 = (($regs$5) + ($2271<<3)|0);
+        $2276 = HEAP32[$2275>>2]|0;
+        $2277 = $i$2 >>> 7;
+        $2278 = $2277 & 127;
+        __THREW__ = 0;
+        $2279 = (invoke_iiii(181,($2276|0),($2278|0),($z77|0))|0);
+        $2280 = __THREW__; __THREW__ = 0;
+        if ((($2280|0) != 0) & ((threwValue|0) != 0)) { $2281 = _testSetjmp(HEAP32[$2280>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2281|0) == 0) { _longjmp($2280|0, threwValue|0); } tempRet0 = (threwValue); } else { $2281 = -1; };
+        $2282 = tempRet0;
+        $cond1054 = ($2281|0)==(1);
+        if ($cond1054) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2282;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        $2283 = ($2279<<24>>24)!=(0);
+        $2284 = (($regs$5) + ($2271<<3)|0);
+        $2285 = ((($2284)) + 4|0);
+        if ($2283) {
+         HEAP32[$2285>>2] = 6;
+         $2286 = (+($2276|0));
+         $2287 = (+($2278|0));
+         $2288 = $2286 + $2287;
+         $2289 = (($regs$5) + ($2271<<3)|0);
+         HEAPF32[$2289>>2] = $2288;
+         break L385;
+        } else {
+         HEAP32[$2285>>2] = 3;
+         $2290 = HEAP32[$z77>>2]|0;
+         $2291 = (($regs$5) + ($2271<<3)|0);
+         HEAP32[$2291>>2] = $2290;
+         break L385;
+        }
+        break;
+       }
+       case 6:  {
+        $2292 = $i$2 >>> 7;
+        $2293 = $2292 & 127;
+        $2294 = (+($2293|0));
+        $2295 = (($regs$5) + ($2271<<3)|0);
+        $2296 = +HEAPF32[$2295>>2];
+        $2297 = $2296 + $2294;
+        HEAPF32[$2295>>2] = $2297;
+        break;
+       }
+       default: {
+        $2298 = (($2271) + 1)|0;
+        $2299 = (($regs$5) + ($2298<<3)|0);
+        $2300 = ((($2299)) + 4|0);
+        HEAP32[$2300>>2] = 3;
+        $2301 = $i$2 >>> 7;
+        $2302 = $2301 & 127;
+        $2303 = (($2271) + 1)|0;
+        $2304 = (($regs$5) + ($2303<<3)|0);
+        HEAP32[$2304>>2] = $2302;
+        $2305 = $2271 & 511;
+        $2306 = $2305 << 23;
+        $2307 = 32 | $2306;
+        $2308 = $i$2 >>> 14;
+        $2309 = $2308 & 511;
+        $2310 = $2309 & 511;
+        $2311 = $2310 << 14;
+        $2312 = $2307 | $2311;
+        $2313 = $2312 | 128;
+        $i$0 = $2313;
+        label = 92;
+        break L50;
+       }
+       }
+      } while(0);
+      $2314 = ((($pc$6)) + 4|0);
+      $2315 = HEAP32[$2314>>2]|0;
+      $2316 = $2315 & 127;
+      $2317 = (200 + ($2316<<2)|0);
+      $2318 = HEAP32[$2317>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2318;$i$2 = $2315;$pc$6 = $2314;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 47:  {
+      $2087 = $i$2 >>> 23;
+      $2088 = $2087 & 511;
+      $2089 = (($regs$5) + ($2088<<3)|0);
+      $2090 = ((($2089)) + 4|0);
+      $2091 = HEAP32[$2090>>2]|0;
+      $2092 = $2091&65535;
+      $2093 = $2092&65535;
+      $2094 = $2093 << 8;
+      $2095 = (($2088) + 1)|0;
+      $2096 = (($regs$5) + ($2095<<3)|0);
+      $2097 = ((($2096)) + 4|0);
+      $2098 = HEAP32[$2097>>2]|0;
+      $2099 = $2098&65535;
+      $2100 = $2099&65535;
+      $2101 = $2100 & 255;
+      $2102 = $2094 | $2101;
+      L395: do {
+       switch ($2102|0) {
+       case 771:  {
+        $2103 = (($regs$5) + ($2088<<3)|0);
+        $2104 = HEAP32[$2103>>2]|0;
+        $2105 = (($2088) + 1)|0;
+        $2106 = (($regs$5) + ($2105<<3)|0);
+        $2107 = HEAP32[$2106>>2]|0;
+        __THREW__ = 0;
+        $2108 = (invoke_iiii(183,($2104|0),($2107|0),($z62|0))|0);
+        $2109 = __THREW__; __THREW__ = 0;
+        if ((($2109|0) != 0) & ((threwValue|0) != 0)) { $2110 = _testSetjmp(HEAP32[$2109>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2110|0) == 0) { _longjmp($2109|0, threwValue|0); } tempRet0 = (threwValue); } else { $2110 = -1; };
+        $2111 = tempRet0;
+        $cond1053 = ($2110|0)==(1);
+        if ($cond1053) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2111;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        $2112 = ($2108<<24>>24)!=(0);
+        $2113 = (($regs$5) + ($2088<<3)|0);
+        $2114 = ((($2113)) + 4|0);
+        if ($2112) {
+         HEAP32[$2114>>2] = 6;
+         $2115 = (+($2104|0));
+         $2116 = (+($2107|0));
+         $2117 = $2115 - $2116;
+         $2118 = (($regs$5) + ($2088<<3)|0);
+         HEAPF32[$2118>>2] = $2117;
+         break L395;
+        } else {
+         HEAP32[$2114>>2] = 3;
+         $2119 = HEAP32[$z62>>2]|0;
+         $2120 = (($regs$5) + ($2088<<3)|0);
+         HEAP32[$2120>>2] = $2119;
+         break L395;
+        }
+        break;
+       }
+       case 774:  {
+        $2121 = (($regs$5) + ($2088<<3)|0);
+        $2122 = HEAP32[$2121>>2]|0;
+        $2123 = (($2088) + 1)|0;
+        $2124 = (($regs$5) + ($2123<<3)|0);
+        $2125 = +HEAPF32[$2124>>2];
+        $2126 = (($regs$5) + ($2088<<3)|0);
+        $2127 = ((($2126)) + 4|0);
+        HEAP32[$2127>>2] = 6;
+        $2128 = (+($2122|0));
+        $2129 = $2128 - $2125;
+        $2130 = (($regs$5) + ($2088<<3)|0);
+        HEAPF32[$2130>>2] = $2129;
+        break;
+       }
+       case 1539:  {
+        $2131 = (($regs$5) + ($2088<<3)|0);
+        $2132 = +HEAPF32[$2131>>2];
+        $2133 = (($2088) + 1)|0;
+        $2134 = (($regs$5) + ($2133<<3)|0);
+        $2135 = HEAP32[$2134>>2]|0;
+        $2136 = (+($2135|0));
+        $2137 = $2132 - $2136;
+        $2138 = (($regs$5) + ($2088<<3)|0);
+        HEAPF32[$2138>>2] = $2137;
+        break;
+       }
+       case 1542:  {
+        $2139 = (($regs$5) + ($2088<<3)|0);
+        $2140 = +HEAPF32[$2139>>2];
+        $2141 = (($2088) + 1)|0;
+        $2142 = (($regs$5) + ($2141<<3)|0);
+        $2143 = +HEAPF32[$2142>>2];
+        $2144 = $2140 - $2143;
+        $2145 = (($regs$5) + ($2088<<3)|0);
+        HEAPF32[$2145>>2] = $2144;
+        break;
+       }
+       default: {
+        $i$0 = $i$2;
+        label = 92;
+        break L50;
+       }
+       }
+      } while(0);
+      $2146 = ((($pc$6)) + 4|0);
+      $2147 = HEAP32[$2146>>2]|0;
+      $2148 = $2147 & 127;
+      $2149 = (200 + ($2148<<2)|0);
+      $2150 = HEAP32[$2149>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2150;$i$2 = $2147;$pc$6 = $2146;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 48:  {
+      $2319 = $i$2 >>> 23;
+      $2320 = $2319 & 511;
+      $2321 = (($regs$5) + ($2320<<3)|0);
+      $2322 = ((($2321)) + 4|0);
+      $2323 = HEAP32[$2322>>2]|0;
+      L406: do {
+       switch ($2323|0) {
+       case 3:  {
+        $2324 = HEAP32[$2321>>2]|0;
+        $2325 = $i$2 >>> 7;
+        $2326 = $2325 & 127;
+        __THREW__ = 0;
+        $2327 = (invoke_iiii(183,($2324|0),($2326|0),($z82|0))|0);
+        $2328 = __THREW__; __THREW__ = 0;
+        if ((($2328|0) != 0) & ((threwValue|0) != 0)) { $2329 = _testSetjmp(HEAP32[$2328>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2329|0) == 0) { _longjmp($2328|0, threwValue|0); } tempRet0 = (threwValue); } else { $2329 = -1; };
+        $2330 = tempRet0;
+        $cond1052 = ($2329|0)==(1);
+        if ($cond1052) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2330;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        $2331 = ($2327<<24>>24)!=(0);
+        $2332 = ((($2321)) + 4|0);
+        if ($2331) {
+         HEAP32[$2332>>2] = 6;
+         $2333 = (+($2324|0));
+         $2334 = (+($2326|0));
+         $2335 = $2333 - $2334;
+         HEAPF32[$2321>>2] = $2335;
+         break L406;
+        } else {
+         HEAP32[$2332>>2] = 3;
+         $2336 = HEAP32[$z82>>2]|0;
+         HEAP32[$2321>>2] = $2336;
+         break L406;
+        }
+        break;
+       }
+       case 6:  {
+        $2337 = $i$2 >>> 7;
+        $2338 = $2337 & 127;
+        $2339 = (+($2338|0));
+        $2340 = +HEAPF32[$2321>>2];
+        $2341 = $2340 - $2339;
+        HEAPF32[$2321>>2] = $2341;
+        break;
+       }
+       default: {
+        $2342 = ((($2321)) + 8|0);
+        $2343 = ((($2342)) + 4|0);
+        HEAP32[$2343>>2] = 3;
+        $2344 = $i$2 >>> 7;
+        $2345 = $2344 & 127;
+        $2346 = ((($2321)) + 8|0);
+        HEAP32[$2346>>2] = $2345;
+        $2347 = $2320 & 511;
+        $2348 = $2347 << 23;
+        $2349 = 32 | $2348;
+        $2350 = $i$2 >>> 14;
+        $2351 = $2350 & 511;
+        $2352 = $2351 & 511;
+        $2353 = $2352 << 14;
+        $2354 = $2349 | $2353;
+        $2355 = $2354 | 128;
+        $i$0 = $2355;
+        label = 92;
+        break L50;
+       }
+       }
+      } while(0);
+      $2356 = ((($pc$6)) + 4|0);
+      $2357 = HEAP32[$2356>>2]|0;
+      $2358 = $2357 & 127;
+      $2359 = (200 + ($2358<<2)|0);
+      $2360 = HEAP32[$2359>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2360;$i$2 = $2357;$pc$6 = $2356;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 49:  {
+      $2151 = $i$2 >>> 23;
+      $2152 = $2151 & 511;
+      $2153 = (($regs$5) + ($2152<<3)|0);
+      $2154 = ((($2153)) + 4|0);
+      $2155 = HEAP32[$2154>>2]|0;
+      $2156 = $2155&65535;
+      $2157 = $2156&65535;
+      $2158 = $2157 << 8;
+      $2159 = (($2152) + 1)|0;
+      $2160 = (($regs$5) + ($2159<<3)|0);
+      $2161 = ((($2160)) + 4|0);
+      $2162 = HEAP32[$2161>>2]|0;
+      $2163 = $2162&65535;
+      $2164 = $2163&65535;
+      $2165 = $2164 & 255;
+      $2166 = $2158 | $2165;
+      L416: do {
+       switch ($2166|0) {
+       case 771:  {
+        $2167 = (($regs$5) + ($2152<<3)|0);
+        $2168 = (($2152) + 1)|0;
+        $2169 = (($regs$5) + ($2168<<3)|0);
+        __THREW__ = 0;
+        ;HEAP32[$$byval_copy927>>2]=HEAP32[$2167>>2]|0;HEAP32[$$byval_copy927+4>>2]=HEAP32[$2167+4>>2]|0;
+        ;HEAP32[$$byval_copy928>>2]=HEAP32[$2169>>2]|0;HEAP32[$$byval_copy928+4>>2]=HEAP32[$2169+4>>2]|0;
+        invoke_viiii(184,($30|0),($mrb|0),($$byval_copy927|0),($$byval_copy928|0));
+        $2170 = __THREW__; __THREW__ = 0;
+        if ((($2170|0) != 0) & ((threwValue|0) != 0)) { $2171 = _testSetjmp(HEAP32[$2170>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2171|0) == 0) { _longjmp($2170|0, threwValue|0); } tempRet0 = (threwValue); } else { $2171 = -1; };
+        $2172 = tempRet0;
+        $cond1051 = ($2171|0)==(1);
+        if ($cond1051) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2172;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        ;HEAP32[$z66>>2]=HEAP32[$30>>2]|0;HEAP32[$z66+4>>2]=HEAP32[$30+4>>2]|0;
+        $2173 = ((($z66)) + 4|0);
+        $2174 = HEAP32[$2173>>2]|0;
+        switch ($2174|0) {
+        case 3:  {
+         $2175 = (($regs$5) + ($2152<<3)|0);
+         $2176 = ((($2175)) + 4|0);
+         HEAP32[$2176>>2] = 3;
+         $2177 = HEAP32[$z66>>2]|0;
+         $2178 = (($regs$5) + ($2152<<3)|0);
+         HEAP32[$2178>>2] = $2177;
+         break L416;
+         break;
+        }
+        case 6:  {
+         $2179 = (($regs$5) + ($2152<<3)|0);
+         $2180 = ((($2179)) + 4|0);
+         HEAP32[$2180>>2] = 6;
+         $2181 = +HEAPF32[$z66>>2];
+         $2182 = (($regs$5) + ($2152<<3)|0);
+         HEAPF32[$2182>>2] = $2181;
+         break L416;
+         break;
+        }
+        default: {
+         break L416;
+        }
+        }
+        break;
+       }
+       case 774:  {
+        $2183 = (($regs$5) + ($2152<<3)|0);
+        $2184 = HEAP32[$2183>>2]|0;
+        $2185 = (($2152) + 1)|0;
+        $2186 = (($regs$5) + ($2185<<3)|0);
+        $2187 = +HEAPF32[$2186>>2];
+        $2188 = (($regs$5) + ($2152<<3)|0);
+        $2189 = ((($2188)) + 4|0);
+        HEAP32[$2189>>2] = 6;
+        $2190 = (+($2184|0));
+        $2191 = $2190 * $2187;
+        $2192 = (($regs$5) + ($2152<<3)|0);
+        HEAPF32[$2192>>2] = $2191;
+        break;
+       }
+       case 1539:  {
+        $2193 = (($regs$5) + ($2152<<3)|0);
+        $2194 = +HEAPF32[$2193>>2];
+        $2195 = (($2152) + 1)|0;
+        $2196 = (($regs$5) + ($2195<<3)|0);
+        $2197 = HEAP32[$2196>>2]|0;
+        $2198 = (+($2197|0));
+        $2199 = $2194 * $2198;
+        $2200 = (($regs$5) + ($2152<<3)|0);
+        HEAPF32[$2200>>2] = $2199;
+        break;
+       }
+       case 1542:  {
+        $2201 = (($regs$5) + ($2152<<3)|0);
+        $2202 = +HEAPF32[$2201>>2];
+        $2203 = (($2152) + 1)|0;
+        $2204 = (($regs$5) + ($2203<<3)|0);
+        $2205 = +HEAPF32[$2204>>2];
+        $2206 = $2202 * $2205;
+        $2207 = (($regs$5) + ($2152<<3)|0);
+        HEAPF32[$2207>>2] = $2206;
+        break;
+       }
+       default: {
+        $i$0 = $i$2;
+        label = 92;
+        break L50;
+       }
+       }
+      } while(0);
+      $2208 = ((($pc$6)) + 4|0);
+      $2209 = HEAP32[$2208>>2]|0;
+      $2210 = $2209 & 127;
+      $2211 = (200 + ($2210<<2)|0);
+      $2212 = HEAP32[$2211>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2212;$i$2 = $2209;$pc$6 = $2208;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 50:  {
+      $2213 = $i$2 >>> 23;
+      $2214 = $2213 & 511;
+      $2215 = (($regs$5) + ($2214<<3)|0);
+      $2216 = ((($2215)) + 4|0);
+      $2217 = HEAP32[$2216>>2]|0;
+      $2218 = $2217&65535;
+      $2219 = $2218&65535;
+      $2220 = $2219 << 8;
+      $2221 = (($2214) + 1)|0;
+      $2222 = (($regs$5) + ($2221<<3)|0);
+      $2223 = ((($2222)) + 4|0);
+      $2224 = HEAP32[$2223>>2]|0;
+      $2225 = $2224&65535;
+      $2226 = $2225&65535;
+      $2227 = $2226 & 255;
+      $2228 = $2220 | $2227;
+      switch ($2228|0) {
+      case 771:  {
+       $2229 = (($regs$5) + ($2214<<3)|0);
+       $2230 = HEAP32[$2229>>2]|0;
+       $2231 = (($2214) + 1)|0;
+       $2232 = (($regs$5) + ($2231<<3)|0);
+       $2233 = HEAP32[$2232>>2]|0;
+       $2234 = (($regs$5) + ($2214<<3)|0);
+       $2235 = ((($2234)) + 4|0);
+       HEAP32[$2235>>2] = 6;
+       $2236 = (+($2230|0));
+       $2237 = (+($2233|0));
+       $2238 = $2236 / $2237;
+       $2239 = (($regs$5) + ($2214<<3)|0);
+       HEAPF32[$2239>>2] = $2238;
+       break;
+      }
+      case 774:  {
+       $2240 = (($regs$5) + ($2214<<3)|0);
+       $2241 = HEAP32[$2240>>2]|0;
+       $2242 = (($2214) + 1)|0;
+       $2243 = (($regs$5) + ($2242<<3)|0);
+       $2244 = +HEAPF32[$2243>>2];
+       $2245 = (($regs$5) + ($2214<<3)|0);
+       $2246 = ((($2245)) + 4|0);
+       HEAP32[$2246>>2] = 6;
+       $2247 = (+($2241|0));
+       $2248 = $2247 / $2244;
+       $2249 = (($regs$5) + ($2214<<3)|0);
+       HEAPF32[$2249>>2] = $2248;
+       break;
+      }
+      case 1539:  {
+       $2250 = (($regs$5) + ($2214<<3)|0);
+       $2251 = +HEAPF32[$2250>>2];
+       $2252 = (($2214) + 1)|0;
+       $2253 = (($regs$5) + ($2252<<3)|0);
+       $2254 = HEAP32[$2253>>2]|0;
+       $2255 = (+($2254|0));
+       $2256 = $2251 / $2255;
+       $2257 = (($regs$5) + ($2214<<3)|0);
+       HEAPF32[$2257>>2] = $2256;
+       break;
+      }
+      case 1542:  {
+       $2258 = (($regs$5) + ($2214<<3)|0);
+       $2259 = +HEAPF32[$2258>>2];
+       $2260 = (($2214) + 1)|0;
+       $2261 = (($regs$5) + ($2260<<3)|0);
+       $2262 = +HEAPF32[$2261>>2];
+       $2263 = $2259 / $2262;
+       $2264 = (($regs$5) + ($2214<<3)|0);
+       HEAPF32[$2264>>2] = $2263;
+       break;
+      }
+      default: {
+       $i$0 = $i$2;
+       label = 92;
+       break L50;
+      }
+      }
+      $2265 = ((($pc$6)) + 4|0);
+      $2266 = HEAP32[$2265>>2]|0;
+      $2267 = $2266 & 127;
+      $2268 = (200 + ($2267<<2)|0);
+      $2269 = HEAP32[$2268>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2269;$i$2 = $2266;$pc$6 = $2265;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 51:  {
+      $2361 = $i$2 >>> 23;
+      $2362 = $2361 & 511;
+      $2363 = (($regs$5) + ($2362<<3)|0);
+      $2364 = (($2362) + 1)|0;
+      $2365 = (($regs$5) + ($2364<<3)|0);
+      __THREW__ = 0;
+      ;HEAP32[$$byval_copy929>>2]=HEAP32[$2363>>2]|0;HEAP32[$$byval_copy929+4>>2]=HEAP32[$2363+4>>2]|0;
+      ;HEAP32[$$byval_copy930>>2]=HEAP32[$2365>>2]|0;HEAP32[$$byval_copy930+4>>2]=HEAP32[$2365+4>>2]|0;
+      $2366 = (invoke_iiii(185,($mrb|0),($$byval_copy929|0),($$byval_copy930|0))|0);
+      $2367 = __THREW__; __THREW__ = 0;
+      if ((($2367|0) != 0) & ((threwValue|0) != 0)) { $2368 = _testSetjmp(HEAP32[$2367>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2368|0) == 0) { _longjmp($2367|0, threwValue|0); } tempRet0 = (threwValue); } else { $2368 = -1; };
+      $2369 = tempRet0;
+      $cond1050 = ($2368|0)==(1);
+      if ($cond1050) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2369;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $2370 = ($2366<<24>>24)!=(0);
+      $2371 = (($regs$5) + ($2362<<3)|0);
+      $2372 = ((($2371)) + 4|0);
+      do {
+       if ($2370) {
+        HEAP32[$2372>>2] = 2;
+        $2373 = (($regs$5) + ($2362<<3)|0);
+        HEAP32[$2373>>2] = 1;
+       } else {
+        $2374 = HEAP32[$2372>>2]|0;
+        $2375 = $2374&65535;
+        $2376 = $2375&65535;
+        $2377 = $2376 << 8;
+        $2378 = (($2362) + 1)|0;
+        $2379 = (($regs$5) + ($2378<<3)|0);
+        $2380 = ((($2379)) + 4|0);
+        $2381 = HEAP32[$2380>>2]|0;
+        $2382 = $2381&65535;
+        $2383 = $2382&65535;
+        $2384 = $2383 & 255;
+        $2385 = $2377 | $2384;
+        switch ($2385|0) {
+        case 771:  {
+         $2386 = (($regs$5) + ($2362<<3)|0);
+         $2387 = HEAP32[$2386>>2]|0;
+         $2388 = (($2362) + 1)|0;
+         $2389 = (($regs$5) + ($2388<<3)|0);
+         $2390 = HEAP32[$2389>>2]|0;
+         $2391 = ($2387|0)==($2390|0);
+         $2392 = $2391&1;
+         $result84$0 = $2392;
+         break;
+        }
+        case 774:  {
+         $2393 = (($regs$5) + ($2362<<3)|0);
+         $2394 = HEAP32[$2393>>2]|0;
+         $2395 = (+($2394|0));
+         $2396 = (($2362) + 1)|0;
+         $2397 = (($regs$5) + ($2396<<3)|0);
+         $2398 = +HEAPF32[$2397>>2];
+         $2399 = $2395 == $2398;
+         $2400 = $2399&1;
+         $result84$0 = $2400;
+         break;
+        }
+        case 1539:  {
+         $2401 = (($regs$5) + ($2362<<3)|0);
+         $2402 = +HEAPF32[$2401>>2];
+         $2403 = (($2362) + 1)|0;
+         $2404 = (($regs$5) + ($2403<<3)|0);
+         $2405 = HEAP32[$2404>>2]|0;
+         $2406 = (+($2405|0));
+         $2407 = $2402 == $2406;
+         $2408 = $2407&1;
+         $result84$0 = $2408;
+         break;
+        }
+        case 1542:  {
+         $2409 = (($regs$5) + ($2362<<3)|0);
+         $2410 = +HEAPF32[$2409>>2];
+         $2411 = (($2362) + 1)|0;
+         $2412 = (($regs$5) + ($2411<<3)|0);
+         $2413 = +HEAPF32[$2412>>2];
+         $2414 = $2410 == $2413;
+         $2415 = $2414&1;
+         $result84$0 = $2415;
+         break;
+        }
+        default: {
+         $i$0 = $i$2;
+         label = 92;
+         break L50;
+        }
+        }
+        $2416 = ($result84$0|0)!=(0);
+        $2417 = (($regs$5) + ($2362<<3)|0);
+        $2418 = ((($2417)) + 4|0);
+        if ($2416) {
+         HEAP32[$2418>>2] = 2;
+         $2419 = (($regs$5) + ($2362<<3)|0);
+         HEAP32[$2419>>2] = 1;
+         break;
+        } else {
+         HEAP32[$2418>>2] = 0;
+         $2420 = (($regs$5) + ($2362<<3)|0);
+         HEAP32[$2420>>2] = 1;
+         break;
+        }
+       }
+      } while(0);
+      $2421 = ((($pc$6)) + 4|0);
+      $2422 = HEAP32[$2421>>2]|0;
+      $2423 = $2422 & 127;
+      $2424 = (200 + ($2423<<2)|0);
+      $2425 = HEAP32[$2424>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2425;$i$2 = $2422;$pc$6 = $2421;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 52:  {
+      $2426 = $i$2 >>> 23;
+      $2427 = $2426 & 511;
+      $2428 = (($regs$5) + ($2427<<3)|0);
+      $2429 = ((($2428)) + 4|0);
+      $2430 = HEAP32[$2429>>2]|0;
+      $2431 = $2430&65535;
+      $2432 = $2431&65535;
+      $2433 = $2432 << 8;
+      $2434 = (($2427) + 1)|0;
+      $2435 = (($regs$5) + ($2434<<3)|0);
+      $2436 = ((($2435)) + 4|0);
+      $2437 = HEAP32[$2436>>2]|0;
+      $2438 = $2437&65535;
+      $2439 = $2438&65535;
+      $2440 = $2439 & 255;
+      $2441 = $2433 | $2440;
+      switch ($2441|0) {
+      case 771:  {
+       $2442 = (($regs$5) + ($2427<<3)|0);
+       $2443 = HEAP32[$2442>>2]|0;
+       $2444 = (($2427) + 1)|0;
+       $2445 = (($regs$5) + ($2444<<3)|0);
+       $2446 = HEAP32[$2445>>2]|0;
+       $2447 = ($2443|0)<($2446|0);
+       $2448 = $2447&1;
+       $result86$0 = $2448;
+       break;
+      }
+      case 774:  {
+       $2449 = (($regs$5) + ($2427<<3)|0);
+       $2450 = HEAP32[$2449>>2]|0;
+       $2451 = (+($2450|0));
+       $2452 = (($2427) + 1)|0;
+       $2453 = (($regs$5) + ($2452<<3)|0);
+       $2454 = +HEAPF32[$2453>>2];
+       $2455 = $2451 < $2454;
+       $2456 = $2455&1;
+       $result86$0 = $2456;
+       break;
+      }
+      case 1539:  {
+       $2457 = (($regs$5) + ($2427<<3)|0);
+       $2458 = +HEAPF32[$2457>>2];
+       $2459 = (($2427) + 1)|0;
+       $2460 = (($regs$5) + ($2459<<3)|0);
+       $2461 = HEAP32[$2460>>2]|0;
+       $2462 = (+($2461|0));
+       $2463 = $2458 < $2462;
+       $2464 = $2463&1;
+       $result86$0 = $2464;
+       break;
+      }
+      case 1542:  {
+       $2465 = (($regs$5) + ($2427<<3)|0);
+       $2466 = +HEAPF32[$2465>>2];
+       $2467 = (($2427) + 1)|0;
+       $2468 = (($regs$5) + ($2467<<3)|0);
+       $2469 = +HEAPF32[$2468>>2];
+       $2470 = $2466 < $2469;
+       $2471 = $2470&1;
+       $result86$0 = $2471;
+       break;
+      }
+      default: {
+       $i$0 = $i$2;
+       label = 92;
+       break L50;
+      }
+      }
+      $2472 = ($result86$0|0)!=(0);
+      $2473 = (($regs$5) + ($2427<<3)|0);
+      $2474 = ((($2473)) + 4|0);
+      if ($2472) {
+       HEAP32[$2474>>2] = 2;
+       $2475 = (($regs$5) + ($2427<<3)|0);
+       HEAP32[$2475>>2] = 1;
+      } else {
+       HEAP32[$2474>>2] = 0;
+       $2476 = (($regs$5) + ($2427<<3)|0);
+       HEAP32[$2476>>2] = 1;
+      }
+      $2477 = ((($pc$6)) + 4|0);
+      $2478 = HEAP32[$2477>>2]|0;
+      $2479 = $2478 & 127;
+      $2480 = (200 + ($2479<<2)|0);
+      $2481 = HEAP32[$2480>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2481;$i$2 = $2478;$pc$6 = $2477;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 53:  {
+      $2482 = $i$2 >>> 23;
+      $2483 = $2482 & 511;
+      $2484 = (($regs$5) + ($2483<<3)|0);
+      $2485 = ((($2484)) + 4|0);
+      $2486 = HEAP32[$2485>>2]|0;
+      $2487 = $2486&65535;
+      $2488 = $2487&65535;
+      $2489 = $2488 << 8;
+      $2490 = (($2483) + 1)|0;
+      $2491 = (($regs$5) + ($2490<<3)|0);
+      $2492 = ((($2491)) + 4|0);
+      $2493 = HEAP32[$2492>>2]|0;
+      $2494 = $2493&65535;
+      $2495 = $2494&65535;
+      $2496 = $2495 & 255;
+      $2497 = $2489 | $2496;
+      switch ($2497|0) {
+      case 771:  {
+       $2498 = (($regs$5) + ($2483<<3)|0);
+       $2499 = HEAP32[$2498>>2]|0;
+       $2500 = (($2483) + 1)|0;
+       $2501 = (($regs$5) + ($2500<<3)|0);
+       $2502 = HEAP32[$2501>>2]|0;
+       $2503 = ($2499|0)<=($2502|0);
+       $2504 = $2503&1;
+       $result88$0 = $2504;
+       break;
+      }
+      case 774:  {
+       $2505 = (($regs$5) + ($2483<<3)|0);
+       $2506 = HEAP32[$2505>>2]|0;
+       $2507 = (+($2506|0));
+       $2508 = (($2483) + 1)|0;
+       $2509 = (($regs$5) + ($2508<<3)|0);
+       $2510 = +HEAPF32[$2509>>2];
+       $2511 = $2507 <= $2510;
+       $2512 = $2511&1;
+       $result88$0 = $2512;
+       break;
+      }
+      case 1539:  {
+       $2513 = (($regs$5) + ($2483<<3)|0);
+       $2514 = +HEAPF32[$2513>>2];
+       $2515 = (($2483) + 1)|0;
+       $2516 = (($regs$5) + ($2515<<3)|0);
+       $2517 = HEAP32[$2516>>2]|0;
+       $2518 = (+($2517|0));
+       $2519 = $2514 <= $2518;
+       $2520 = $2519&1;
+       $result88$0 = $2520;
+       break;
+      }
+      case 1542:  {
+       $2521 = (($regs$5) + ($2483<<3)|0);
+       $2522 = +HEAPF32[$2521>>2];
+       $2523 = (($2483) + 1)|0;
+       $2524 = (($regs$5) + ($2523<<3)|0);
+       $2525 = +HEAPF32[$2524>>2];
+       $2526 = $2522 <= $2525;
+       $2527 = $2526&1;
+       $result88$0 = $2527;
+       break;
+      }
+      default: {
+       $i$0 = $i$2;
+       label = 92;
+       break L50;
+      }
+      }
+      $2528 = ($result88$0|0)!=(0);
+      $2529 = (($regs$5) + ($2483<<3)|0);
+      $2530 = ((($2529)) + 4|0);
+      if ($2528) {
+       HEAP32[$2530>>2] = 2;
+       $2531 = (($regs$5) + ($2483<<3)|0);
+       HEAP32[$2531>>2] = 1;
+      } else {
+       HEAP32[$2530>>2] = 0;
+       $2532 = (($regs$5) + ($2483<<3)|0);
+       HEAP32[$2532>>2] = 1;
+      }
+      $2533 = ((($pc$6)) + 4|0);
+      $2534 = HEAP32[$2533>>2]|0;
+      $2535 = $2534 & 127;
+      $2536 = (200 + ($2535<<2)|0);
+      $2537 = HEAP32[$2536>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2537;$i$2 = $2534;$pc$6 = $2533;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 54:  {
+      $2538 = $i$2 >>> 23;
+      $2539 = $2538 & 511;
+      $2540 = (($regs$5) + ($2539<<3)|0);
+      $2541 = ((($2540)) + 4|0);
+      $2542 = HEAP32[$2541>>2]|0;
+      $2543 = $2542&65535;
+      $2544 = $2543&65535;
+      $2545 = $2544 << 8;
+      $2546 = (($2539) + 1)|0;
+      $2547 = (($regs$5) + ($2546<<3)|0);
+      $2548 = ((($2547)) + 4|0);
+      $2549 = HEAP32[$2548>>2]|0;
+      $2550 = $2549&65535;
+      $2551 = $2550&65535;
+      $2552 = $2551 & 255;
+      $2553 = $2545 | $2552;
+      switch ($2553|0) {
+      case 771:  {
+       $2554 = (($regs$5) + ($2539<<3)|0);
+       $2555 = HEAP32[$2554>>2]|0;
+       $2556 = (($2539) + 1)|0;
+       $2557 = (($regs$5) + ($2556<<3)|0);
+       $2558 = HEAP32[$2557>>2]|0;
+       $2559 = ($2555|0)>($2558|0);
+       $2560 = $2559&1;
+       $result90$0 = $2560;
+       break;
+      }
+      case 774:  {
+       $2561 = (($regs$5) + ($2539<<3)|0);
+       $2562 = HEAP32[$2561>>2]|0;
+       $2563 = (+($2562|0));
+       $2564 = (($2539) + 1)|0;
+       $2565 = (($regs$5) + ($2564<<3)|0);
+       $2566 = +HEAPF32[$2565>>2];
+       $2567 = $2563 > $2566;
+       $2568 = $2567&1;
+       $result90$0 = $2568;
+       break;
+      }
+      case 1539:  {
+       $2569 = (($regs$5) + ($2539<<3)|0);
+       $2570 = +HEAPF32[$2569>>2];
+       $2571 = (($2539) + 1)|0;
+       $2572 = (($regs$5) + ($2571<<3)|0);
+       $2573 = HEAP32[$2572>>2]|0;
+       $2574 = (+($2573|0));
+       $2575 = $2570 > $2574;
+       $2576 = $2575&1;
+       $result90$0 = $2576;
+       break;
+      }
+      case 1542:  {
+       $2577 = (($regs$5) + ($2539<<3)|0);
+       $2578 = +HEAPF32[$2577>>2];
+       $2579 = (($2539) + 1)|0;
+       $2580 = (($regs$5) + ($2579<<3)|0);
+       $2581 = +HEAPF32[$2580>>2];
+       $2582 = $2578 > $2581;
+       $2583 = $2582&1;
+       $result90$0 = $2583;
+       break;
+      }
+      default: {
+       $i$0 = $i$2;
+       label = 92;
+       break L50;
+      }
+      }
+      $2584 = ($result90$0|0)!=(0);
+      $2585 = (($regs$5) + ($2539<<3)|0);
+      $2586 = ((($2585)) + 4|0);
+      if ($2584) {
+       HEAP32[$2586>>2] = 2;
+       $2587 = (($regs$5) + ($2539<<3)|0);
+       HEAP32[$2587>>2] = 1;
+      } else {
+       HEAP32[$2586>>2] = 0;
+       $2588 = (($regs$5) + ($2539<<3)|0);
+       HEAP32[$2588>>2] = 1;
+      }
+      $2589 = ((($pc$6)) + 4|0);
+      $2590 = HEAP32[$2589>>2]|0;
+      $2591 = $2590 & 127;
+      $2592 = (200 + ($2591<<2)|0);
+      $2593 = HEAP32[$2592>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2593;$i$2 = $2590;$pc$6 = $2589;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 55:  {
+      $2594 = $i$2 >>> 23;
+      $2595 = $2594 & 511;
+      $2596 = (($regs$5) + ($2595<<3)|0);
+      $2597 = ((($2596)) + 4|0);
+      $2598 = HEAP32[$2597>>2]|0;
+      $2599 = $2598&65535;
+      $2600 = $2599&65535;
+      $2601 = $2600 << 8;
+      $2602 = (($2595) + 1)|0;
+      $2603 = (($regs$5) + ($2602<<3)|0);
+      $2604 = ((($2603)) + 4|0);
+      $2605 = HEAP32[$2604>>2]|0;
+      $2606 = $2605&65535;
+      $2607 = $2606&65535;
+      $2608 = $2607 & 255;
+      $2609 = $2601 | $2608;
+      switch ($2609|0) {
+      case 771:  {
+       $2610 = (($regs$5) + ($2595<<3)|0);
+       $2611 = HEAP32[$2610>>2]|0;
+       $2612 = (($2595) + 1)|0;
+       $2613 = (($regs$5) + ($2612<<3)|0);
+       $2614 = HEAP32[$2613>>2]|0;
+       $2615 = ($2611|0)>=($2614|0);
+       $2616 = $2615&1;
+       $result92$0 = $2616;
+       break;
+      }
+      case 774:  {
+       $2617 = (($regs$5) + ($2595<<3)|0);
+       $2618 = HEAP32[$2617>>2]|0;
+       $2619 = (+($2618|0));
+       $2620 = (($2595) + 1)|0;
+       $2621 = (($regs$5) + ($2620<<3)|0);
+       $2622 = +HEAPF32[$2621>>2];
+       $2623 = $2619 >= $2622;
+       $2624 = $2623&1;
+       $result92$0 = $2624;
+       break;
+      }
+      case 1539:  {
+       $2625 = (($regs$5) + ($2595<<3)|0);
+       $2626 = +HEAPF32[$2625>>2];
+       $2627 = (($2595) + 1)|0;
+       $2628 = (($regs$5) + ($2627<<3)|0);
+       $2629 = HEAP32[$2628>>2]|0;
+       $2630 = (+($2629|0));
+       $2631 = $2626 >= $2630;
+       $2632 = $2631&1;
+       $result92$0 = $2632;
+       break;
+      }
+      case 1542:  {
+       $2633 = (($regs$5) + ($2595<<3)|0);
+       $2634 = +HEAPF32[$2633>>2];
+       $2635 = (($2595) + 1)|0;
+       $2636 = (($regs$5) + ($2635<<3)|0);
+       $2637 = +HEAPF32[$2636>>2];
+       $2638 = $2634 >= $2637;
+       $2639 = $2638&1;
+       $result92$0 = $2639;
+       break;
+      }
+      default: {
+       $i$0 = $i$2;
+       label = 92;
+       break L50;
+      }
+      }
+      $2640 = ($result92$0|0)!=(0);
+      $2641 = (($regs$5) + ($2595<<3)|0);
+      $2642 = ((($2641)) + 4|0);
+      if ($2640) {
+       HEAP32[$2642>>2] = 2;
+       $2643 = (($regs$5) + ($2595<<3)|0);
+       HEAP32[$2643>>2] = 1;
+      } else {
+       HEAP32[$2642>>2] = 0;
+       $2644 = (($regs$5) + ($2595<<3)|0);
+       HEAP32[$2644>>2] = 1;
+      }
+      $2645 = ((($pc$6)) + 4|0);
+      $2646 = HEAP32[$2645>>2]|0;
+      $2647 = $2646 & 127;
+      $2648 = (200 + ($2647<<2)|0);
+      $2649 = HEAP32[$2648>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2649;$i$2 = $2646;$pc$6 = $2645;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 56:  {
+      $2650 = $i$2 >>> 23;
+      $2651 = $2650 & 511;
+      $2652 = (($regs$5) + ($2651<<3)|0);
+      $2653 = $i$2 >>> 7;
+      $2654 = $2653 & 127;
+      $2655 = $i$2 >>> 14;
+      $2656 = $2655 & 511;
+      $2657 = (($regs$5) + ($2656<<3)|0);
+      __THREW__ = 0;
+      invoke_viiii(167,($31|0),($mrb|0),($2654|0),($2657|0));
+      $2658 = __THREW__; __THREW__ = 0;
+      if ((($2658|0) != 0) & ((threwValue|0) != 0)) { $2659 = _testSetjmp(HEAP32[$2658>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2659|0) == 0) { _longjmp($2658|0, threwValue|0); } tempRet0 = (threwValue); } else { $2659 = -1; };
+      $2660 = tempRet0;
+      $cond1049 = ($2659|0)==(1);
+      if ($cond1049) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2660;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      ;HEAP32[$2652>>2]=HEAP32[$31>>2]|0;HEAP32[$2652+4>>2]=HEAP32[$31+4>>2]|0;
+      $2661 = ((($mrb)) + 92|0);
+      $2662 = ((($2661)) + 416|0);
+      HEAP32[$2662>>2] = $ai$1;
+      $2663 = ((($pc$6)) + 4|0);
+      $2664 = HEAP32[$2663>>2]|0;
+      $2665 = $2664 & 127;
+      $2666 = (200 + ($2665<<2)|0);
+      $2667 = HEAP32[$2666>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2667;$i$2 = $2664;$pc$6 = $2663;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 57:  {
+      $2668 = $i$2 >>> 23;
+      $2669 = $2668 & 511;
+      $2670 = (($regs$5) + ($2669<<3)|0);
+      $2671 = $i$2 >>> 14;
+      $2672 = $2671 & 511;
+      $2673 = (($regs$5) + ($2672<<3)|0);
+      __THREW__ = 0;
+      ;HEAP32[$$byval_copy931>>2]=HEAP32[$2673>>2]|0;HEAP32[$$byval_copy931+4>>2]=HEAP32[$2673+4>>2]|0;
+      invoke_viii(186,($32|0),($mrb|0),($$byval_copy931|0));
+      $2674 = __THREW__; __THREW__ = 0;
+      if ((($2674|0) != 0) & ((threwValue|0) != 0)) { $2675 = _testSetjmp(HEAP32[$2674>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2675|0) == 0) { _longjmp($2674|0, threwValue|0); } tempRet0 = (threwValue); } else { $2675 = -1; };
+      $2676 = tempRet0;
+      $cond1047 = ($2675|0)==(1);
+      if ($cond1047) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2676;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      __THREW__ = 0;
+      ;HEAP32[$$byval_copy932>>2]=HEAP32[$2670>>2]|0;HEAP32[$$byval_copy932+4>>2]=HEAP32[$2670+4>>2]|0;
+      ;HEAP32[$$byval_copy933>>2]=HEAP32[$32>>2]|0;HEAP32[$$byval_copy933+4>>2]=HEAP32[$32+4>>2]|0;
+      invoke_viii(187,($mrb|0),($$byval_copy932|0),($$byval_copy933|0));
+      $2677 = __THREW__; __THREW__ = 0;
+      if ((($2677|0) != 0) & ((threwValue|0) != 0)) { $2678 = _testSetjmp(HEAP32[$2677>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2678|0) == 0) { _longjmp($2677|0, threwValue|0); } tempRet0 = (threwValue); } else { $2678 = -1; };
+      $2679 = tempRet0;
+      $cond1048 = ($2678|0)==(1);
+      if ($cond1048) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2679;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $2680 = ((($mrb)) + 92|0);
+      $2681 = ((($2680)) + 416|0);
+      HEAP32[$2681>>2] = $ai$1;
+      $2682 = ((($pc$6)) + 4|0);
+      $2683 = HEAP32[$2682>>2]|0;
+      $2684 = $2683 & 127;
+      $2685 = (200 + ($2684<<2)|0);
+      $2686 = HEAP32[$2685>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2686;$i$2 = $2683;$pc$6 = $2682;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 58:  {
+      $2687 = $i$2 >>> 23;
+      $2688 = $2687 & 511;
+      $2689 = (($regs$5) + ($2688<<3)|0);
+      $2690 = $i$2 >>> 14;
+      $2691 = $2690 & 511;
+      $2692 = (($regs$5) + ($2691<<3)|0);
+      __THREW__ = 0;
+      ;HEAP32[$$byval_copy934>>2]=HEAP32[$2689>>2]|0;HEAP32[$$byval_copy934+4>>2]=HEAP32[$2689+4>>2]|0;
+      ;HEAP32[$$byval_copy935>>2]=HEAP32[$2692>>2]|0;HEAP32[$$byval_copy935+4>>2]=HEAP32[$2692+4>>2]|0;
+      invoke_viii(188,($mrb|0),($$byval_copy934|0),($$byval_copy935|0));
+      $2693 = __THREW__; __THREW__ = 0;
+      if ((($2693|0) != 0) & ((threwValue|0) != 0)) { $2694 = _testSetjmp(HEAP32[$2693>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2694|0) == 0) { _longjmp($2693|0, threwValue|0); } tempRet0 = (threwValue); } else { $2694 = -1; };
+      $2695 = tempRet0;
+      $cond1046 = ($2694|0)==(1);
+      if ($cond1046) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2695;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $2696 = ((($pc$6)) + 4|0);
+      $2697 = HEAP32[$2696>>2]|0;
+      $2698 = $2697 & 127;
+      $2699 = (200 + ($2698<<2)|0);
+      $2700 = HEAP32[$2699>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2700;$i$2 = $2697;$pc$6 = $2696;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 59:  {
+      $2701 = $i$2 >>> 23;
+      $2702 = $2701 & 511;
+      $2703 = $i$2 >>> 7;
+      $2704 = $2703 & 127;
+      $2705 = $i$2 >>> 14;
+      $2706 = $2705 & 511;
+      $2707 = (($regs$5) + ($2706<<3)|0);
+      ;HEAP32[$v95>>2]=HEAP32[$2707>>2]|0;HEAP32[$v95+4>>2]=HEAP32[$2707+4>>2]|0;
+      $2708 = ((($v95)) + 4|0);
+      $2709 = HEAP32[$2708>>2]|0;
+      $2710 = ($2709|0)==(14);
+      do {
+       if ($2710) {
+        $2718 = $i$2 >>> 23;
+        $2719 = $2718 & 511;
+        $2720 = (($regs$5) + ($2719<<3)|0);
+        __THREW__ = 0;
+        ;HEAP32[$v95$byval_copy>>2]=HEAP32[$v95>>2]|0;HEAP32[$v95$byval_copy+4>>2]=HEAP32[$v95+4>>2]|0;
+        invoke_viiii(189,($33|0),($mrb|0),($v95$byval_copy|0),($2704|0));
+        $2721 = __THREW__; __THREW__ = 0;
+        if ((($2721|0) != 0) & ((threwValue|0) != 0)) { $2722 = _testSetjmp(HEAP32[$2721>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2722|0) == 0) { _longjmp($2721|0, threwValue|0); } tempRet0 = (threwValue); } else { $2722 = -1; };
+        $2723 = tempRet0;
+        $cond1045 = ($2722|0)==(1);
+        if ($cond1045) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2723;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        ;HEAP32[$2720>>2]=HEAP32[$33>>2]|0;HEAP32[$2720+4>>2]=HEAP32[$33+4>>2]|0;
+       } else {
+        $2711 = ($2704|0)==(0);
+        if ($2711) {
+         $2712 = $i$2 >>> 23;
+         $2713 = $2712 & 511;
+         $2714 = (($regs$5) + ($2713<<3)|0);
+         ;HEAP32[$2714>>2]=HEAP32[$v95>>2]|0;HEAP32[$2714+4>>2]=HEAP32[$v95+4>>2]|0;
+         break;
+        } else {
+         $2715 = (($regs$5) + ($2702<<3)|0);
+         $2716 = ((($2715)) + 4|0);
+         HEAP32[$2716>>2] = 0;
+         $2717 = (($regs$5) + ($2702<<3)|0);
+         HEAP32[$2717>>2] = 0;
+         break;
+        }
+       }
+      } while(0);
+      $2724 = ((($pc$6)) + 4|0);
+      $2725 = HEAP32[$2724>>2]|0;
+      $2726 = $2725 & 127;
+      $2727 = (200 + ($2726<<2)|0);
+      $2728 = HEAP32[$2727>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2728;$i$2 = $2725;$pc$6 = $2724;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 60:  {
+      $2729 = $i$2 >>> 14;
+      $2730 = $2729 & 511;
+      $2731 = (($regs$5) + ($2730<<3)|0);
+      $2732 = $i$2 >>> 7;
+      $2733 = $2732 & 127;
+      $2734 = $i$2 >>> 23;
+      $2735 = $2734 & 511;
+      $2736 = (($regs$5) + ($2735<<3)|0);
+      __THREW__ = 0;
+      ;HEAP32[$$byval_copy936>>2]=HEAP32[$2731>>2]|0;HEAP32[$$byval_copy936+4>>2]=HEAP32[$2731+4>>2]|0;
+      ;HEAP32[$$byval_copy937>>2]=HEAP32[$2736>>2]|0;HEAP32[$$byval_copy937+4>>2]=HEAP32[$2736+4>>2]|0;
+      invoke_viiii(190,($mrb|0),($$byval_copy936|0),($2733|0),($$byval_copy937|0));
+      $2737 = __THREW__; __THREW__ = 0;
+      if ((($2737|0) != 0) & ((threwValue|0) != 0)) { $2738 = _testSetjmp(HEAP32[$2737>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2738|0) == 0) { _longjmp($2737|0, threwValue|0); } tempRet0 = (threwValue); } else { $2738 = -1; };
+      $2739 = tempRet0;
+      $cond1044 = ($2738|0)==(1);
+      if ($cond1044) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2739;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $2740 = ((($pc$6)) + 4|0);
+      $2741 = HEAP32[$2740>>2]|0;
+      $2742 = $2741 & 127;
+      $2743 = (200 + ($2742<<2)|0);
+      $2744 = HEAP32[$2743>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2744;$i$2 = $2741;$pc$6 = $2740;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 61:  {
+      $2745 = $i$2 >>> 23;
+      $2746 = $2745 & 511;
+      $2747 = (($regs$5) + ($2746<<3)|0);
+      ;HEAP32[$v97>>2]=HEAP32[$2747>>2]|0;HEAP32[$v97+4>>2]=HEAP32[$2747+4>>2]|0;
+      $2748 = $i$2 >>> 14;
+      $2749 = $2748 & 511;
+      $2750 = $i$2 >>> 7;
+      $2751 = $2750 & 127;
+      $2752 = ((($v97)) + 4|0);
+      $2753 = HEAP32[$2752>>2]|0;
+      $2754 = ($2753|0)==(14);
+      if (!($2754)) {
+       $2755 = (($regs$5) + ($2746<<3)|0);
+       __THREW__ = 0;
+       invoke_viiii(167,($34|0),($mrb|0),1,($2755|0));
+       $2756 = __THREW__; __THREW__ = 0;
+       if ((($2756|0) != 0) & ((threwValue|0) != 0)) { $2757 = _testSetjmp(HEAP32[$2756>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2757|0) == 0) { _longjmp($2756|0, threwValue|0); } tempRet0 = (threwValue); } else { $2757 = -1; };
+       $2758 = tempRet0;
+       $cond1041 = ($2757|0)==(1);
+       if ($cond1041) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2758;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       ;HEAP32[$v97>>2]=HEAP32[$34>>2]|0;HEAP32[$v97+4>>2]=HEAP32[$34+4>>2]|0;
+      }
+      $2759 = HEAP32[$v97>>2]|0;
+      $2760 = ((($2759)) + 12|0);
+      $2761 = HEAP32[$2760>>2]|0;
+      $2762 = (($2749) + ($2751))|0;
+      $2763 = ($2761|0)>($2762|0);
+      $2764 = (($2746) + 1)|0;
+      $2765 = (($regs$5) + ($2746<<3)|0);
+      L515: do {
+       if ($2763) {
+        $2766 = (($2761) - ($2749))|0;
+        $2767 = (($2766) - ($2751))|0;
+        $2768 = ((($2759)) + 20|0);
+        $2769 = HEAP32[$2768>>2]|0;
+        $2770 = (($2769) + ($2749<<3)|0);
+        __THREW__ = 0;
+        invoke_viiii(167,($35|0),($mrb|0),($2767|0),($2770|0));
+        $2771 = __THREW__; __THREW__ = 0;
+        if ((($2771|0) != 0) & ((threwValue|0) != 0)) { $2772 = _testSetjmp(HEAP32[$2771>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2772|0) == 0) { _longjmp($2771|0, threwValue|0); } tempRet0 = (threwValue); } else { $2772 = -1; };
+        $2773 = tempRet0;
+        $cond1043 = ($2772|0)==(1);
+        if ($cond1043) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2773;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        ;HEAP32[$2765>>2]=HEAP32[$35>>2]|0;HEAP32[$2765+4>>2]=HEAP32[$35+4>>2]|0;
+        $a96$0 = $2764;$post$0 = $2751;
+        while(1) {
+         $2774 = (($post$0) + -1)|0;
+         $2775 = ($post$0|0)!=(0);
+         if (!($2775)) {
+          break L515;
+         }
+         $2776 = (($a96$0) + 1)|0;
+         $2777 = (($regs$5) + ($a96$0<<3)|0);
+         $2778 = (($2761) - ($2774))|0;
+         $2779 = (($2778) - 1)|0;
+         $2780 = ((($2759)) + 20|0);
+         $2781 = HEAP32[$2780>>2]|0;
+         $2782 = (($2781) + ($2779<<3)|0);
+         ;HEAP32[$2777>>2]=HEAP32[$2782>>2]|0;HEAP32[$2777+4>>2]=HEAP32[$2782+4>>2]|0;
+         $a96$0 = $2776;$post$0 = $2774;
+        }
+       } else {
+        __THREW__ = 0;
+        invoke_viii(173,($36|0),($mrb|0),0);
+        $2783 = __THREW__; __THREW__ = 0;
+        if ((($2783|0) != 0) & ((threwValue|0) != 0)) { $2784 = _testSetjmp(HEAP32[$2783>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2784|0) == 0) { _longjmp($2783|0, threwValue|0); } tempRet0 = (threwValue); } else { $2784 = -1; };
+        $2785 = tempRet0;
+        $cond1042 = ($2784|0)==(1);
+        if ($cond1042) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2785;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        ;HEAP32[$2765>>2]=HEAP32[$36>>2]|0;HEAP32[$2765+4>>2]=HEAP32[$36+4>>2]|0;
+        $idx100$0 = 0;
+        while(1) {
+         $2786 = (($idx100$0) + ($2749))|0;
+         $2787 = ($2786|0)<($2761|0);
+         if (!($2787)) {
+          $idx100$1 = $idx100$0;
+          break;
+         }
+         $2788 = (($2764) + ($idx100$0))|0;
+         $2789 = (($regs$5) + ($2788<<3)|0);
+         $2790 = (($2749) + ($idx100$0))|0;
+         $2791 = ((($2759)) + 20|0);
+         $2792 = HEAP32[$2791>>2]|0;
+         $2793 = (($2792) + ($2790<<3)|0);
+         ;HEAP32[$2789>>2]=HEAP32[$2793>>2]|0;HEAP32[$2789+4>>2]=HEAP32[$2793+4>>2]|0;
+         $2794 = (($idx100$0) + 1)|0;
+         $idx100$0 = $2794;
+        }
+        while(1) {
+         $2795 = ($idx100$1|0)<($2751|0);
+         if (!($2795)) {
+          break L515;
+         }
+         $2796 = (($2764) + ($idx100$1))|0;
+         $2797 = (($regs$5) + ($2796<<3)|0);
+         $2798 = ((($2797)) + 4|0);
+         HEAP32[$2798>>2] = 0;
+         $2799 = (($2764) + ($idx100$1))|0;
+         $2800 = (($regs$5) + ($2799<<3)|0);
+         HEAP32[$2800>>2] = 0;
+         $2801 = (($idx100$1) + 1)|0;
+         $idx100$1 = $2801;
+        }
+       }
+      } while(0);
+      $2802 = ((($mrb)) + 92|0);
+      $2803 = ((($2802)) + 416|0);
+      HEAP32[$2803>>2] = $ai$1;
+      $2804 = ((($pc$6)) + 4|0);
+      $2805 = HEAP32[$2804>>2]|0;
+      $2806 = $2805 & 127;
+      $2807 = (200 + ($2806<<2)|0);
+      $2808 = HEAP32[$2807>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2808;$i$2 = $2805;$pc$6 = $2804;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 62:  {
+      $2809 = $i$2 >>> 23;
+      $2810 = $2809 & 511;
+      $2811 = (($regs$5) + ($2810<<3)|0);
+      $2812 = $i$2 >>> 7;
+      $2813 = $2812 & 65535;
+      $2814 = (($pool$6) + ($2813<<3)|0);
+      __THREW__ = 0;
+      ;HEAP32[$$byval_copy938>>2]=HEAP32[$2814>>2]|0;HEAP32[$$byval_copy938+4>>2]=HEAP32[$2814+4>>2]|0;
+      invoke_viii(191,($37|0),($mrb|0),($$byval_copy938|0));
+      $2815 = __THREW__; __THREW__ = 0;
+      if ((($2815|0) != 0) & ((threwValue|0) != 0)) { $2816 = _testSetjmp(HEAP32[$2815>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2816|0) == 0) { _longjmp($2815|0, threwValue|0); } tempRet0 = (threwValue); } else { $2816 = -1; };
+      $2817 = tempRet0;
+      $cond1040 = ($2816|0)==(1);
+      if ($cond1040) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2817;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      ;HEAP32[$2811>>2]=HEAP32[$37>>2]|0;HEAP32[$2811+4>>2]=HEAP32[$37+4>>2]|0;
+      $2818 = ((($mrb)) + 92|0);
+      $2819 = ((($2818)) + 416|0);
+      HEAP32[$2819>>2] = $ai$1;
+      $2820 = ((($pc$6)) + 4|0);
+      $2821 = HEAP32[$2820>>2]|0;
+      $2822 = $2821 & 127;
+      $2823 = (200 + ($2822<<2)|0);
+      $2824 = HEAP32[$2823>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2824;$i$2 = $2821;$pc$6 = $2820;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 63:  {
+      $2825 = $i$2 >>> 23;
+      $2826 = $2825 & 511;
+      $2827 = (($regs$5) + ($2826<<3)|0);
+      $2828 = $i$2 >>> 14;
+      $2829 = $2828 & 511;
+      $2830 = (($regs$5) + ($2829<<3)|0);
+      __THREW__ = 0;
+      ;HEAP32[$$byval_copy939>>2]=HEAP32[$2827>>2]|0;HEAP32[$$byval_copy939+4>>2]=HEAP32[$2827+4>>2]|0;
+      ;HEAP32[$$byval_copy940>>2]=HEAP32[$2830>>2]|0;HEAP32[$$byval_copy940+4>>2]=HEAP32[$2830+4>>2]|0;
+      invoke_viii(192,($mrb|0),($$byval_copy939|0),($$byval_copy940|0));
+      $2831 = __THREW__; __THREW__ = 0;
+      if ((($2831|0) != 0) & ((threwValue|0) != 0)) { $2832 = _testSetjmp(HEAP32[$2831>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2832|0) == 0) { _longjmp($2831|0, threwValue|0); } tempRet0 = (threwValue); } else { $2832 = -1; };
+      $2833 = tempRet0;
+      $cond1039 = ($2832|0)==(1);
+      if ($cond1039) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2833;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $2834 = ((($mrb)) + 12|0);
+      $2835 = HEAP32[$2834>>2]|0;
+      $2836 = ((($2835)) + 4|0);
+      $2837 = HEAP32[$2836>>2]|0;
+      $2838 = ((($pc$6)) + 4|0);
+      $2839 = HEAP32[$2838>>2]|0;
+      $2840 = $2839 & 127;
+      $2841 = (200 + ($2840<<2)|0);
+      $2842 = HEAP32[$2841>>2]|0;
+      $syms$6$phi = $syms$6;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2842;$i$2 = $2839;$pc$6 = $2838;$regs$5 = $2837;$syms$6 = $syms$6$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 64:  {
+      $2843 = $i$2 >>> 14;
+      $2844 = $2843 & 511;
+      $2845 = $i$2 >>> 7;
+      $2846 = $2845 & 127;
+      $2847 = $2846<<1;
+      $2848 = (($2844) + ($2847))|0;
+      __THREW__ = 0;
+      invoke_viii(193,($hash|0),($mrb|0),($2846|0));
+      $2849 = __THREW__; __THREW__ = 0;
+      if ((($2849|0) != 0) & ((threwValue|0) != 0)) { $2850 = _testSetjmp(HEAP32[$2849>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2850|0) == 0) { _longjmp($2849|0, threwValue|0); } tempRet0 = (threwValue); } else { $2850 = -1; };
+      $2851 = tempRet0;
+      $cond1037 = ($2850|0)==(1);
+      if ($cond1037) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2851;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $b$0 = $2844;
+      while(1) {
+       $2852 = ($b$0|0)<($2848|0);
+       if (!($2852)) {
+        break;
+       }
+       $2853 = (($regs$5) + ($b$0<<3)|0);
+       $2854 = (($b$0) + 1)|0;
+       $2855 = (($regs$5) + ($2854<<3)|0);
+       __THREW__ = 0;
+       ;HEAP32[$hash$byval_copy>>2]=HEAP32[$hash>>2]|0;HEAP32[$hash$byval_copy+4>>2]=HEAP32[$hash+4>>2]|0;
+       ;HEAP32[$$byval_copy941>>2]=HEAP32[$2853>>2]|0;HEAP32[$$byval_copy941+4>>2]=HEAP32[$2853+4>>2]|0;
+       ;HEAP32[$$byval_copy942>>2]=HEAP32[$2855>>2]|0;HEAP32[$$byval_copy942+4>>2]=HEAP32[$2855+4>>2]|0;
+       invoke_viiii(194,($mrb|0),($hash$byval_copy|0),($$byval_copy941|0),($$byval_copy942|0));
+       $2856 = __THREW__; __THREW__ = 0;
+       if ((($2856|0) != 0) & ((threwValue|0) != 0)) { $2857 = _testSetjmp(HEAP32[$2856>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2857|0) == 0) { _longjmp($2856|0, threwValue|0); } tempRet0 = (threwValue); } else { $2857 = -1; };
+       $2858 = tempRet0;
+       $cond1038 = ($2857|0)==(1);
+       if ($cond1038) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2858;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       $2859 = (($b$0) + 2)|0;
+       $b$0 = $2859;
+      }
+      $2860 = $i$2 >>> 23;
+      $2861 = $2860 & 511;
+      $2862 = (($regs$5) + ($2861<<3)|0);
+      ;HEAP32[$2862>>2]=HEAP32[$hash>>2]|0;HEAP32[$2862+4>>2]=HEAP32[$hash+4>>2]|0;
+      $2863 = ((($mrb)) + 92|0);
+      $2864 = ((($2863)) + 416|0);
+      HEAP32[$2864>>2] = $ai$1;
+      $2865 = ((($pc$6)) + 4|0);
+      $2866 = HEAP32[$2865>>2]|0;
+      $2867 = $2866 & 127;
+      $2868 = (200 + ($2867<<2)|0);
+      $2869 = HEAP32[$2868>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2869;$i$2 = $2866;$pc$6 = $2865;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 65:  {
+      $2870 = $i$2 >>> 7;
+      $2871 = $2870 & 3;
+      $2872 = $2871 & 2;
+      $2873 = ($2872|0)!=(0);
+      $2874 = $i$2 >>> 9;
+      $2875 = $2874 & 16383;
+      $2876 = ((($irep$8)) + 20|0);
+      $2877 = HEAP32[$2876>>2]|0;
+      $2878 = (($2877) + ($2875<<2)|0);
+      $2879 = HEAP32[$2878>>2]|0;
+      if ($2873) {
+       __THREW__ = 0;
+       $2880 = (invoke_iii(165,($mrb|0),($2879|0))|0);
+       $2881 = __THREW__; __THREW__ = 0;
+       if ((($2881|0) != 0) & ((threwValue|0) != 0)) { $2882 = _testSetjmp(HEAP32[$2881>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2882|0) == 0) { _longjmp($2881|0, threwValue|0); } tempRet0 = (threwValue); } else { $2882 = -1; };
+       $2883 = tempRet0;
+       $cond1036 = ($2882|0)==(1);
+       if ($cond1036) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2883;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       $p102$0 = $2880;
+      } else {
+       __THREW__ = 0;
+       $2884 = (invoke_iii(195,($mrb|0),($2879|0))|0);
+       $2885 = __THREW__; __THREW__ = 0;
+       if ((($2885|0) != 0) & ((threwValue|0) != 0)) { $2886 = _testSetjmp(HEAP32[$2885>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2886|0) == 0) { _longjmp($2885|0, threwValue|0); } tempRet0 = (threwValue); } else { $2886 = -1; };
+       $2887 = tempRet0;
+       $cond1034 = ($2886|0)==(1);
+       if ($cond1034) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2887;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       $p102$0 = $2884;
+      }
+      $2888 = $2871 & 1;
+      $2889 = ($2888|0)!=(0);
+      if ($2889) {
+       $2890 = HEAP32[$p102$0>>2]|0;
+       $2891 = $2890 >>> 11;
+       $2892 = $2891 | 256;
+       $2893 = HEAP32[$p102$0>>2]|0;
+       $2894 = $2892 & 2097151;
+       $2895 = $2894 << 11;
+       $2896 = $2893 & 2047;
+       $2897 = $2896 | $2895;
+       HEAP32[$p102$0>>2] = $2897;
+      }
+      $2898 = $i$2 >>> 23;
+      $2899 = $2898 & 511;
+      $2900 = (($regs$5) + ($2899<<3)|0);
+      __THREW__ = 0;
+      invoke_vii(133,($38|0),($p102$0|0));
+      $2901 = __THREW__; __THREW__ = 0;
+      if ((($2901|0) != 0) & ((threwValue|0) != 0)) { $2902 = _testSetjmp(HEAP32[$2901>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2902|0) == 0) { _longjmp($2901|0, threwValue|0); } tempRet0 = (threwValue); } else { $2902 = -1; };
+      $2903 = tempRet0;
+      $cond1035 = ($2902|0)==(1);
+      if ($cond1035) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2903;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      ;HEAP32[$2900>>2]=HEAP32[$38>>2]|0;HEAP32[$2900+4>>2]=HEAP32[$38+4>>2]|0;
+      $2904 = ((($mrb)) + 92|0);
+      $2905 = ((($2904)) + 416|0);
+      HEAP32[$2905>>2] = $ai$1;
+      $2906 = ((($pc$6)) + 4|0);
+      $2907 = HEAP32[$2906>>2]|0;
+      $2908 = $2907 & 127;
+      $2909 = (200 + ($2908<<2)|0);
+      $2910 = HEAP32[$2909>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2910;$i$2 = $2907;$pc$6 = $2906;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 66:  {
+      $3171 = $i$2 >>> 14;
+      $3172 = $3171 & 511;
+      $3173 = $i$2 >>> 23;
+      $3174 = $3173 & 511;
+      $3175 = (($regs$5) + ($3174<<3)|0);
+      $3176 = (($regs$5) + ($3172<<3)|0);
+      $3177 = (($3172) + 1)|0;
+      $3178 = (($regs$5) + ($3177<<3)|0);
+      $3179 = $i$2 >>> 7;
+      $3180 = $3179 & 127;
+      $3181 = $3180&255;
+      __THREW__ = 0;
+      ;HEAP32[$$byval_copy945>>2]=HEAP32[$3176>>2]|0;HEAP32[$$byval_copy945+4>>2]=HEAP32[$3176+4>>2]|0;
+      ;HEAP32[$$byval_copy946>>2]=HEAP32[$3178>>2]|0;HEAP32[$$byval_copy946+4>>2]=HEAP32[$3178+4>>2]|0;
+      invoke_viiiii(200,($48|0),($mrb|0),($$byval_copy945|0),($$byval_copy946|0),($3181|0));
+      $3182 = __THREW__; __THREW__ = 0;
+      if ((($3182|0) != 0) & ((threwValue|0) != 0)) { $3183 = _testSetjmp(HEAP32[$3182>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3183|0) == 0) { _longjmp($3182|0, threwValue|0); } tempRet0 = (threwValue); } else { $3183 = -1; };
+      $3184 = tempRet0;
+      $cond1033 = ($3183|0)==(1);
+      if ($cond1033) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3184;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      ;HEAP32[$3175>>2]=HEAP32[$48>>2]|0;HEAP32[$3175+4>>2]=HEAP32[$48+4>>2]|0;
+      $3185 = ((($mrb)) + 92|0);
+      $3186 = ((($3185)) + 416|0);
+      HEAP32[$3186>>2] = $ai$1;
+      $3187 = ((($pc$6)) + 4|0);
+      $3188 = HEAP32[$3187>>2]|0;
+      $3189 = $3188 & 127;
+      $3190 = (200 + ($3189<<2)|0);
+      $3191 = HEAP32[$3190>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $3191;$i$2 = $3188;$pc$6 = $3187;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 67:  {
+      $2911 = $i$2 >>> 23;
+      $2912 = $2911 & 511;
+      $2913 = (($regs$5) + ($2912<<3)|0);
+      $2914 = ((($mrb)) + 32|0);
+      $2915 = HEAP32[$2914>>2]|0;
+      __THREW__ = 0;
+      invoke_vii(133,($39|0),($2915|0));
+      $2916 = __THREW__; __THREW__ = 0;
+      if ((($2916|0) != 0) & ((threwValue|0) != 0)) { $2917 = _testSetjmp(HEAP32[$2916>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2917|0) == 0) { _longjmp($2916|0, threwValue|0); } tempRet0 = (threwValue); } else { $2917 = -1; };
+      $2918 = tempRet0;
+      $cond1032 = ($2917|0)==(1);
+      if ($cond1032) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2918;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      ;HEAP32[$2913>>2]=HEAP32[$39>>2]|0;HEAP32[$2913+4>>2]=HEAP32[$39+4>>2]|0;
+      $2919 = ((($pc$6)) + 4|0);
+      $2920 = HEAP32[$2919>>2]|0;
+      $2921 = $2920 & 127;
+      $2922 = (200 + ($2921<<2)|0);
+      $2923 = HEAP32[$2922>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2923;$i$2 = $2920;$pc$6 = $2919;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 68:  {
+      $2924 = $i$2 >>> 23;
+      $2925 = $2924 & 511;
+      $2926 = $i$2 >>> 14;
+      $2927 = $2926 & 511;
+      $2928 = (($syms$6) + ($2927<<2)|0);
+      $2929 = HEAP32[$2928>>2]|0;
+      $2930 = (($regs$5) + ($2925<<3)|0);
+      ;HEAP32[$base>>2]=HEAP32[$2930>>2]|0;HEAP32[$base+4>>2]=HEAP32[$2930+4>>2]|0;
+      $2931 = (($2925) + 1)|0;
+      $2932 = (($regs$5) + ($2931<<3)|0);
+      ;HEAP32[$super>>2]=HEAP32[$2932>>2]|0;HEAP32[$super+4>>2]=HEAP32[$2932+4>>2]|0;
+      $2933 = ((($base)) + 4|0);
+      $2934 = HEAP32[$2933>>2]|0;
+      $2935 = ($2934|0)==(0);
+      if ($2935) {
+       $2936 = HEAP32[$base>>2]|0;
+       $2937 = ($2936|0)!=(0);
+       if (!($2937)) {
+        $2938 = ((($mrb)) + 12|0);
+        $2939 = HEAP32[$2938>>2]|0;
+        $2940 = ((($2939)) + 16|0);
+        $2941 = HEAP32[$2940>>2]|0;
+        $2942 = ((($2941)) + 44|0);
+        $2943 = HEAP32[$2942>>2]|0;
+        __THREW__ = 0;
+        invoke_vii(133,($40|0),($2943|0));
+        $2944 = __THREW__; __THREW__ = 0;
+        if ((($2944|0) != 0) & ((threwValue|0) != 0)) { $2945 = _testSetjmp(HEAP32[$2944>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2945|0) == 0) { _longjmp($2944|0, threwValue|0); } tempRet0 = (threwValue); } else { $2945 = -1; };
+        $2946 = tempRet0;
+        $cond1031 = ($2945|0)==(1);
+        if ($cond1031) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2946;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        ;HEAP32[$base>>2]=HEAP32[$40>>2]|0;HEAP32[$base+4>>2]=HEAP32[$40+4>>2]|0;
+       }
+      }
+      __THREW__ = 0;
+      ;HEAP32[$base$byval_copy>>2]=HEAP32[$base>>2]|0;HEAP32[$base$byval_copy+4>>2]=HEAP32[$base+4>>2]|0;
+      ;HEAP32[$super$byval_copy>>2]=HEAP32[$super>>2]|0;HEAP32[$super$byval_copy+4>>2]=HEAP32[$super+4>>2]|0;
+      $2947 = (invoke_iiiii(196,($mrb|0),($base$byval_copy|0),($super$byval_copy|0),($2929|0))|0);
+      $2948 = __THREW__; __THREW__ = 0;
+      if ((($2948|0) != 0) & ((threwValue|0) != 0)) { $2949 = _testSetjmp(HEAP32[$2948>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2949|0) == 0) { _longjmp($2948|0, threwValue|0); } tempRet0 = (threwValue); } else { $2949 = -1; };
+      $2950 = tempRet0;
+      $cond1029 = ($2949|0)==(1);
+      if ($cond1029) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2950;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $2951 = (($regs$5) + ($2925<<3)|0);
+      __THREW__ = 0;
+      invoke_vii(133,($41|0),($2947|0));
+      $2952 = __THREW__; __THREW__ = 0;
+      if ((($2952|0) != 0) & ((threwValue|0) != 0)) { $2953 = _testSetjmp(HEAP32[$2952>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2953|0) == 0) { _longjmp($2952|0, threwValue|0); } tempRet0 = (threwValue); } else { $2953 = -1; };
+      $2954 = tempRet0;
+      $cond1030 = ($2953|0)==(1);
+      if ($cond1030) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2954;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      ;HEAP32[$2951>>2]=HEAP32[$41>>2]|0;HEAP32[$2951+4>>2]=HEAP32[$41+4>>2]|0;
+      $2955 = ((($mrb)) + 92|0);
+      $2956 = ((($2955)) + 416|0);
+      HEAP32[$2956>>2] = $ai$1;
+      $2957 = ((($pc$6)) + 4|0);
+      $2958 = HEAP32[$2957>>2]|0;
+      $2959 = $2958 & 127;
+      $2960 = (200 + ($2959<<2)|0);
+      $2961 = HEAP32[$2960>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2961;$i$2 = $2958;$pc$6 = $2957;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 69:  {
+      $2962 = $i$2 >>> 23;
+      $2963 = $2962 & 511;
+      $2964 = $i$2 >>> 14;
+      $2965 = $2964 & 511;
+      $2966 = (($syms$6) + ($2965<<2)|0);
+      $2967 = HEAP32[$2966>>2]|0;
+      $2968 = (($regs$5) + ($2963<<3)|0);
+      ;HEAP32[$base108>>2]=HEAP32[$2968>>2]|0;HEAP32[$base108+4>>2]=HEAP32[$2968+4>>2]|0;
+      $2969 = ((($base108)) + 4|0);
+      $2970 = HEAP32[$2969>>2]|0;
+      $2971 = ($2970|0)==(0);
+      if ($2971) {
+       $2972 = HEAP32[$base108>>2]|0;
+       $2973 = ($2972|0)!=(0);
+       if (!($2973)) {
+        $2974 = ((($mrb)) + 12|0);
+        $2975 = HEAP32[$2974>>2]|0;
+        $2976 = ((($2975)) + 16|0);
+        $2977 = HEAP32[$2976>>2]|0;
+        $2978 = ((($2977)) + 44|0);
+        $2979 = HEAP32[$2978>>2]|0;
+        __THREW__ = 0;
+        invoke_vii(133,($42|0),($2979|0));
+        $2980 = __THREW__; __THREW__ = 0;
+        if ((($2980|0) != 0) & ((threwValue|0) != 0)) { $2981 = _testSetjmp(HEAP32[$2980>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2981|0) == 0) { _longjmp($2980|0, threwValue|0); } tempRet0 = (threwValue); } else { $2981 = -1; };
+        $2982 = tempRet0;
+        $cond1028 = ($2981|0)==(1);
+        if ($cond1028) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2982;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        ;HEAP32[$base108>>2]=HEAP32[$42>>2]|0;HEAP32[$base108+4>>2]=HEAP32[$42+4>>2]|0;
+       }
+      }
+      __THREW__ = 0;
+      ;HEAP32[$base108$byval_copy>>2]=HEAP32[$base108>>2]|0;HEAP32[$base108$byval_copy+4>>2]=HEAP32[$base108+4>>2]|0;
+      $2983 = (invoke_iiii(197,($mrb|0),($base108$byval_copy|0),($2967|0))|0);
+      $2984 = __THREW__; __THREW__ = 0;
+      if ((($2984|0) != 0) & ((threwValue|0) != 0)) { $2985 = _testSetjmp(HEAP32[$2984>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2985|0) == 0) { _longjmp($2984|0, threwValue|0); } tempRet0 = (threwValue); } else { $2985 = -1; };
+      $2986 = tempRet0;
+      $cond1026 = ($2985|0)==(1);
+      if ($cond1026) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2986;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $2987 = (($regs$5) + ($2963<<3)|0);
+      __THREW__ = 0;
+      invoke_vii(133,($43|0),($2983|0));
+      $2988 = __THREW__; __THREW__ = 0;
+      if ((($2988|0) != 0) & ((threwValue|0) != 0)) { $2989 = _testSetjmp(HEAP32[$2988>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2989|0) == 0) { _longjmp($2988|0, threwValue|0); } tempRet0 = (threwValue); } else { $2989 = -1; };
+      $2990 = tempRet0;
+      $cond1027 = ($2989|0)==(1);
+      if ($cond1027) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $2990;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      ;HEAP32[$2987>>2]=HEAP32[$43>>2]|0;HEAP32[$2987+4>>2]=HEAP32[$43+4>>2]|0;
+      $2991 = ((($mrb)) + 92|0);
+      $2992 = ((($2991)) + 416|0);
+      HEAP32[$2992>>2] = $ai$1;
+      $2993 = ((($pc$6)) + 4|0);
+      $2994 = HEAP32[$2993>>2]|0;
+      $2995 = $2994 & 127;
+      $2996 = (200 + ($2995<<2)|0);
+      $2997 = HEAP32[$2996>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $2997;$i$2 = $2994;$pc$6 = $2993;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 70:  {
+      $2998 = $i$2 >>> 23;
+      $2999 = $2998 & 511;
+      $3000 = (($regs$5) + ($2999<<3)|0);
+      ;HEAP32[$recv112>>2]=HEAP32[$3000>>2]|0;HEAP32[$recv112+4>>2]=HEAP32[$3000+4>>2]|0;
+      __THREW__ = 0;
+      $3001 = (invoke_ii(141,($mrb|0))|0);
+      $3002 = __THREW__; __THREW__ = 0;
+      if ((($3002|0) != 0) & ((threwValue|0) != 0)) { $3003 = _testSetjmp(HEAP32[$3002>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3003|0) == 0) { _longjmp($3002|0, threwValue|0); } tempRet0 = (threwValue); } else { $3003 = -1; };
+      $3004 = tempRet0;
+      $cond1020 = ($3003|0)==(1);
+      if ($cond1020) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3004;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $3005 = ((($pc$6)) + 4|0);
+      $3006 = ((($3001)) + 28|0);
+      HEAP32[$3006>>2] = $3005;
+      $3007 = ((($3001)) + 40|0);
+      HEAP32[$3007>>2] = $2999;
+      HEAP32[$3001>>2] = 0;
+      $3008 = ((($mrb)) + 12|0);
+      $3009 = HEAP32[$3008>>2]|0;
+      $3010 = ((($3009)) + 4|0);
+      $3011 = HEAP32[$3010>>2]|0;
+      $3012 = ((($3001)) + 8|0);
+      HEAP32[$3012>>2] = $3011;
+      $3013 = ((($3001)) + 36|0);
+      HEAP32[$3013>>2] = 0;
+      $3014 = HEAP32[$recv112>>2]|0;
+      $3015 = ((($3001)) + 44|0);
+      HEAP32[$3015>>2] = $3014;
+      $3016 = ((($mrb)) + 12|0);
+      $3017 = HEAP32[$3016>>2]|0;
+      $3018 = ((($3017)) + 4|0);
+      $3019 = HEAP32[$3018>>2]|0;
+      $3020 = (($3019) + ($2999<<3)|0);
+      HEAP32[$3018>>2] = $3020;
+      $3021 = $i$2 >>> 7;
+      $3022 = $3021 & 65535;
+      $3023 = ((($irep$8)) + 20|0);
+      $3024 = HEAP32[$3023>>2]|0;
+      $3025 = (($3024) + ($3022<<2)|0);
+      $3026 = HEAP32[$3025>>2]|0;
+      __THREW__ = 0;
+      $3027 = (invoke_iii(195,($mrb|0),($3026|0))|0);
+      $3028 = __THREW__; __THREW__ = 0;
+      if ((($3028|0) != 0) & ((threwValue|0) != 0)) { $3029 = _testSetjmp(HEAP32[$3028>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3029|0) == 0) { _longjmp($3028|0, threwValue|0); } tempRet0 = (threwValue); } else { $3029 = -1; };
+      $3030 = tempRet0;
+      $cond1021 = ($3029|0)==(1);
+      if ($cond1021) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3030;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $3031 = ((($3001)) + 44|0);
+      $3032 = HEAP32[$3031>>2]|0;
+      $3033 = ((($3027)) + 16|0);
+      HEAP32[$3033>>2] = $3032;
+      $3034 = ((($3001)) + 4|0);
+      HEAP32[$3034>>2] = $3027;
+      $3035 = HEAP32[$3027>>2]|0;
+      $3036 = $3035 >>> 11;
+      $3037 = $3036 & 128;
+      $3038 = ($3037|0)!=(0);
+      if (!($3038)) {
+       $3072 = ((($3027)) + 12|0);
+       $3073 = HEAP32[$3072>>2]|0;
+       $3074 = ((($3073)) + 12|0);
+       $3075 = HEAP32[$3074>>2]|0;
+       $3076 = ((($3073)) + 16|0);
+       $3077 = HEAP32[$3076>>2]|0;
+       $3078 = ((($3073)) + 2|0);
+       $3079 = HEAP16[$3078>>1]|0;
+       $3080 = $3079&65535;
+       __THREW__ = 0;
+       invoke_viii(142,($mrb|0),($3080|0),1);
+       $3081 = __THREW__; __THREW__ = 0;
+       if ((($3081|0) != 0) & ((threwValue|0) != 0)) { $3082 = _testSetjmp(HEAP32[$3081>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3082|0) == 0) { _longjmp($3081|0, threwValue|0); } tempRet0 = (threwValue); } else { $3082 = -1; };
+       $3083 = tempRet0;
+       $cond1022 = ($3082|0)==(1);
+       if ($cond1022) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3083;$exc_catched$1 = $exc_catched$5;$irep$1 = $3073;$pc$1 = $pc$6;$pool$1 = $3075;$regs$1 = $regs$5;$syms$1 = $3077;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       $3084 = ((($3073)) + 2|0);
+       $3085 = HEAP16[$3084>>1]|0;
+       $3086 = $3085&65535;
+       $3087 = ((($3001)) + 12|0);
+       HEAP32[$3087>>2] = $3086;
+       $3088 = ((($mrb)) + 12|0);
+       $3089 = HEAP32[$3088>>2]|0;
+       $3090 = ((($3089)) + 4|0);
+       $3091 = HEAP32[$3090>>2]|0;
+       $3092 = ((($3073)) + 8|0);
+       $3093 = HEAP32[$3092>>2]|0;
+       $3094 = HEAP32[$3093>>2]|0;
+       $3095 = $3094 & 127;
+       $3096 = (200 + ($3095<<2)|0);
+       $3097 = HEAP32[$3096>>2]|0;
+       $exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $3097;$i$2 = $3094;$irep$8 = $3073;$pc$6 = $3093;$pool$6 = $3075;$regs$5 = $3091;$syms$6 = $3077;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+       label = 590;
+       continue L19;
+      }
+      $3039 = ((($3001)) + 12|0);
+      HEAP32[$3039>>2] = 0;
+      $3040 = ((($mrb)) + 12|0);
+      $3041 = HEAP32[$3040>>2]|0;
+      $3042 = ((($3041)) + 4|0);
+      $3043 = HEAP32[$3042>>2]|0;
+      $3044 = ((($3027)) + 12|0);
+      $3045 = HEAP32[$3044>>2]|0;
+      __THREW__ = 0;
+      ;HEAP32[$recv112$byval_copy>>2]=HEAP32[$recv112>>2]|0;HEAP32[$recv112$byval_copy+4>>2]=HEAP32[$recv112+4>>2]|0;
+      invoke_viii($3045|0,($44|0),($mrb|0),($recv112$byval_copy|0));
+      $3046 = __THREW__; __THREW__ = 0;
+      if ((($3046|0) != 0) & ((threwValue|0) != 0)) { $3047 = _testSetjmp(HEAP32[$3046>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3047|0) == 0) { _longjmp($3046|0, threwValue|0); } tempRet0 = (threwValue); } else { $3047 = -1; };
+      $3048 = tempRet0;
+      $cond1023 = ($3047|0)==(1);
+      if ($cond1023) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3048;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      ;HEAP32[$3043>>2]=HEAP32[$44>>2]|0;HEAP32[$3043+4>>2]=HEAP32[$44+4>>2]|0;
+      __THREW__ = 0;
+      invoke_vii(146,($mrb|0),($ai$1|0));
+      $3049 = __THREW__; __THREW__ = 0;
+      if ((($3049|0) != 0) & ((threwValue|0) != 0)) { $3050 = _testSetjmp(HEAP32[$3049>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3050|0) == 0) { _longjmp($3049|0, threwValue|0); } tempRet0 = (threwValue); } else { $3050 = -1; };
+      $3051 = tempRet0;
+      $cond1024 = ($3050|0)==(1);
+      if ($cond1024) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3051;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $3052 = ((($mrb)) + 20|0);
+      $3053 = HEAP32[$3052>>2]|0;
+      $3054 = ($3053|0)!=(0|0);
+      if ($3054) {
+       $$5 = $$8;$exc_catched$2 = $exc_catched$5;$irep$5 = $irep$8;$pc$3 = $pc$6;$pool$3 = $pool$6;$regs$2 = $regs$5;$syms$3 = $syms$6;
+       label = 276;
+       continue L19;
+      }
+      $3055 = ((($mrb)) + 12|0);
+      $3056 = HEAP32[$3055>>2]|0;
+      $3057 = ((($3056)) + 16|0);
+      $3058 = HEAP32[$3057>>2]|0;
+      $3059 = ((($3058)) + 8|0);
+      $3060 = HEAP32[$3059>>2]|0;
+      $3061 = ((($mrb)) + 12|0);
+      $3062 = HEAP32[$3061>>2]|0;
+      $3063 = ((($3062)) + 4|0);
+      HEAP32[$3063>>2] = $3060;
+      __THREW__ = 0;
+      invoke_vi(132,($mrb|0));
+      $3064 = __THREW__; __THREW__ = 0;
+      if ((($3064|0) != 0) & ((threwValue|0) != 0)) { $3065 = _testSetjmp(HEAP32[$3064>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3065|0) == 0) { _longjmp($3064|0, threwValue|0); } tempRet0 = (threwValue); } else { $3065 = -1; };
+      $3066 = tempRet0;
+      $cond1025 = ($3065|0)==(1);
+      if ($cond1025) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3066;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $3060;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $3067 = ((($pc$6)) + 4|0);
+      $3068 = HEAP32[$3067>>2]|0;
+      $3069 = $3068 & 127;
+      $3070 = (200 + ($3069<<2)|0);
+      $3071 = HEAP32[$3070>>2]|0;
+      $syms$6$phi = $syms$6;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $3071;$i$2 = $3068;$pc$6 = $3067;$regs$5 = $3060;$syms$6 = $syms$6$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 71:  {
+      $3098 = $i$2 >>> 23;
+      $3099 = $3098 & 511;
+      $3100 = (($regs$5) + ($3099<<3)|0);
+      $3101 = HEAP32[$3100>>2]|0;
+      $3102 = (($3099) + 1)|0;
+      $3103 = (($regs$5) + ($3102<<3)|0);
+      $3104 = HEAP32[$3103>>2]|0;
+      $3105 = $i$2 >>> 14;
+      $3106 = $3105 & 511;
+      $3107 = (($syms$6) + ($3106<<2)|0);
+      $3108 = HEAP32[$3107>>2]|0;
+      __THREW__ = 0;
+      invoke_viiii(198,($mrb|0),($3101|0),($3108|0),($3104|0));
+      $3109 = __THREW__; __THREW__ = 0;
+      if ((($3109|0) != 0) & ((threwValue|0) != 0)) { $3110 = _testSetjmp(HEAP32[$3109>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3110|0) == 0) { _longjmp($3109|0, threwValue|0); } tempRet0 = (threwValue); } else { $3110 = -1; };
+      $3111 = tempRet0;
+      $cond1019 = ($3110|0)==(1);
+      if ($cond1019) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3111;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $3112 = ((($mrb)) + 92|0);
+      $3113 = ((($3112)) + 416|0);
+      HEAP32[$3113>>2] = $ai$1;
+      $3114 = ((($pc$6)) + 4|0);
+      $3115 = HEAP32[$3114>>2]|0;
+      $3116 = $3115 & 127;
+      $3117 = (200 + ($3116<<2)|0);
+      $3118 = HEAP32[$3117>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $3118;$i$2 = $3115;$pc$6 = $3114;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 72:  {
+      $3119 = $i$2 >>> 23;
+      $3120 = $3119 & 511;
+      $3121 = (($regs$5) + ($3120<<3)|0);
+      $3122 = $i$2 >>> 14;
+      $3123 = $3122 & 511;
+      $3124 = (($regs$5) + ($3123<<3)|0);
+      __THREW__ = 0;
+      ;HEAP32[$$byval_copy943>>2]=HEAP32[$3124>>2]|0;HEAP32[$$byval_copy943+4>>2]=HEAP32[$3124+4>>2]|0;
+      invoke_viii(199,($45|0),($mrb|0),($$byval_copy943|0));
+      $3125 = __THREW__; __THREW__ = 0;
+      if ((($3125|0) != 0) & ((threwValue|0) != 0)) { $3126 = _testSetjmp(HEAP32[$3125>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3126|0) == 0) { _longjmp($3125|0, threwValue|0); } tempRet0 = (threwValue); } else { $3126 = -1; };
+      $3127 = tempRet0;
+      $cond1018 = ($3126|0)==(1);
+      if ($cond1018) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3127;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      ;HEAP32[$3121>>2]=HEAP32[$45>>2]|0;HEAP32[$3121+4>>2]=HEAP32[$45+4>>2]|0;
+      $3128 = ((($mrb)) + 92|0);
+      $3129 = ((($3128)) + 416|0);
+      HEAP32[$3129>>2] = $ai$1;
+      $3130 = ((($pc$6)) + 4|0);
+      $3131 = HEAP32[$3130>>2]|0;
+      $3132 = $3131 & 127;
+      $3133 = (200 + ($3132<<2)|0);
+      $3134 = HEAP32[$3133>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $3134;$i$2 = $3131;$pc$6 = $3130;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     case 73:  {
+      $3135 = ((($mrb)) + 12|0);
+      $3136 = HEAP32[$3135>>2]|0;
+      $3137 = ((($3136)) + 16|0);
+      $3138 = HEAP32[$3137>>2]|0;
+      $3139 = ((($3138)) + 44|0);
+      $3140 = HEAP32[$3139>>2]|0;
+      $3141 = ($3140|0)!=(0|0);
+      if ($3141) {
+       $3154 = $i$2 >>> 23;
+       $3155 = $3154 & 511;
+       $3156 = (($regs$5) + ($3155<<3)|0);
+       $3157 = ((($mrb)) + 12|0);
+       $3158 = HEAP32[$3157>>2]|0;
+       $3159 = ((($3158)) + 16|0);
+       $3160 = HEAP32[$3159>>2]|0;
+       $3161 = ((($3160)) + 44|0);
+       $3162 = HEAP32[$3161>>2]|0;
+       __THREW__ = 0;
+       invoke_vii(133,($47|0),($3162|0));
+       $3163 = __THREW__; __THREW__ = 0;
+       if ((($3163|0) != 0) & ((threwValue|0) != 0)) { $3164 = _testSetjmp(HEAP32[$3163>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3164|0) == 0) { _longjmp($3163|0, threwValue|0); } tempRet0 = (threwValue); } else { $3164 = -1; };
+       $3165 = tempRet0;
+       $cond1017 = ($3164|0)==(1);
+       if ($cond1017) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3165;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       ;HEAP32[$3156>>2]=HEAP32[$47>>2]|0;HEAP32[$3156+4>>2]=HEAP32[$47+4>>2]|0;
+       $3166 = ((($pc$6)) + 4|0);
+       $3167 = HEAP32[$3166>>2]|0;
+       $3168 = $3167 & 127;
+       $3169 = (200 + ($3168<<2)|0);
+       $3170 = HEAP32[$3169>>2]|0;
+       $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $3170;$i$2 = $3167;$pc$6 = $3166;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+       label = 590;
+       continue L19;
+      }
+      __THREW__ = 0;
+      $3142 = (invoke_iii(135,($mrb|0),(68905|0))|0);
+      $3143 = __THREW__; __THREW__ = 0;
+      if ((($3143|0) != 0) & ((threwValue|0) != 0)) { $3144 = _testSetjmp(HEAP32[$3143>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3144|0) == 0) { _longjmp($3143|0, threwValue|0); } tempRet0 = (threwValue); } else { $3144 = -1; };
+      $3145 = tempRet0;
+      $cond1005 = ($3144|0)==(1);
+      if ($cond1005) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3145;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      __THREW__ = 0;
+      invoke_viiii(171,($46|0),($mrb|0),(56667|0),25);
+      $3146 = __THREW__; __THREW__ = 0;
+      if ((($3146|0) != 0) & ((threwValue|0) != 0)) { $3147 = _testSetjmp(HEAP32[$3146>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3147|0) == 0) { _longjmp($3146|0, threwValue|0); } tempRet0 = (threwValue); } else { $3147 = -1; };
+      $3148 = tempRet0;
+      $cond1006 = ($3147|0)==(1);
+      if ($cond1006) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3148;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      __THREW__ = 0;
+      ;HEAP32[$$byval_copy944>>2]=HEAP32[$46>>2]|0;HEAP32[$$byval_copy944+4>>2]=HEAP32[$46+4>>2]|0;
+      invoke_viiii(172,($exc117|0),($mrb|0),($3142|0),($$byval_copy944|0));
+      $3149 = __THREW__; __THREW__ = 0;
+      if ((($3149|0) != 0) & ((threwValue|0) != 0)) { $3150 = _testSetjmp(HEAP32[$3149>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3150|0) == 0) { _longjmp($3149|0, threwValue|0); } tempRet0 = (threwValue); } else { $3150 = -1; };
+      $3151 = tempRet0;
+      $cond1007 = ($3150|0)==(1);
+      if ($cond1007) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3151;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $3152 = HEAP32[$exc117>>2]|0;
+      $3153 = ((($mrb)) + 20|0);
+      HEAP32[$3153>>2] = $3152;
+      $$5 = $$8;$exc_catched$2 = $exc_catched$5;$irep$5 = $irep$8;$pc$3 = $pc$6;$pool$3 = $pool$6;$regs$2 = $regs$5;$syms$3 = $syms$6;
+      label = 276;
+      continue L19;
+      break;
+     }
+     case 74:  {
+      $3192 = $i$2 >>> 23;
+      $3193 = $3192 & 511;
+      $3194 = $i$2 >>> 14;
+      $3195 = $3194 & 511;
+      $3196 = $i$2 >>> 7;
+      $3197 = $3196 & 127;
+      __THREW__ = 0;
+      HEAP32[$vararg_buffer>>2] = $3193;
+      $vararg_ptr901 = ((($vararg_buffer)) + 4|0);
+      HEAP32[$vararg_ptr901>>2] = $3195;
+      $vararg_ptr902 = ((($vararg_buffer)) + 8|0);
+      HEAP32[$vararg_ptr902>>2] = $3197;
+      (invoke_iii(201,(56693|0),($vararg_buffer|0))|0);
+      $3198 = __THREW__; __THREW__ = 0;
+      if ((($3198|0) != 0) & ((threwValue|0) != 0)) { $3199 = _testSetjmp(HEAP32[$3198>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3199|0) == 0) { _longjmp($3198|0, threwValue|0); } tempRet0 = (threwValue); } else { $3199 = -1; };
+      $3200 = tempRet0;
+      $cond1004 = ($3199|0)==(1);
+      if ($cond1004) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $3200;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $3201 = ((($pc$6)) + 4|0);
+      $3202 = HEAP32[$3201>>2]|0;
+      $3203 = $3202 & 127;
+      $3204 = (200 + ($3203<<2)|0);
+      $3205 = HEAP32[$3204>>2]|0;
+      $syms$6$phi = $syms$6;$regs$5$phi = $regs$5;$pool$6$phi = $pool$6;$irep$8$phi = $irep$8;$exc_catched$5$phi = $exc_catched$5;$$8$phi = $$8;$$reg2mem887$0 = $3205;$i$2 = $3202;$pc$6 = $3201;$syms$6 = $syms$6$phi;$regs$5 = $regs$5$phi;$pool$6 = $pool$6$phi;$irep$8 = $irep$8$phi;$exc_catched$5 = $exc_catched$5$phi;$$8 = $$8$phi;
+      label = 590;
+      continue L19;
+      break;
+     }
+     default: {
+      label = 591;
+      break L3;
+     }
+     }
+    } while(0);
+    if ((label|0) == 92) {
+     label = 0;
+     $707 = $i$0 >>> 23;
+     $708 = $707 & 511;
+     $709 = $i$0 >>> 7;
+     $710 = $709 & 127;
+     $711 = $i$0 >>> 14;
+     $712 = $711 & 511;
+     $713 = (($syms$6) + ($712<<2)|0);
+     $714 = HEAP32[$713>>2]|0;
+     $715 = (($regs$5) + ($708<<3)|0);
+     ;HEAP32[$recv>>2]=HEAP32[$715>>2]|0;HEAP32[$recv+4>>2]=HEAP32[$715+4>>2]|0;
+     $716 = $i$0 & 127;
+     $717 = ($716|0)!=(33);
+     do {
+      if ($717) {
+       $718 = ($710|0)==(127);
+       if ($718) {
+        $719 = (($708) + 2)|0;
+        $720 = (($regs$5) + ($719<<3)|0);
+        $721 = ((($720)) + 4|0);
+        HEAP32[$721>>2] = 0;
+        $722 = (($708) + 2)|0;
+        $723 = (($regs$5) + ($722<<3)|0);
+        HEAP32[$723>>2] = 0;
+        break;
+       } else {
+        $724 = (($708) + ($710))|0;
+        $725 = (($724) + 1)|0;
+        $726 = (($regs$5) + ($725<<3)|0);
+        $727 = ((($726)) + 4|0);
+        HEAP32[$727>>2] = 0;
+        $728 = (($708) + ($710))|0;
+        $729 = (($728) + 1)|0;
+        $730 = (($regs$5) + ($729<<3)|0);
+        HEAP32[$730>>2] = 0;
+        break;
+       }
+      }
+     } while(0);
+     __THREW__ = 0;
+     ;HEAP32[$recv$byval_copy>>2]=HEAP32[$recv>>2]|0;HEAP32[$recv$byval_copy+4>>2]=HEAP32[$recv+4>>2]|0;
+     $731 = (invoke_iii(138,($mrb|0),($recv$byval_copy|0))|0);
+     $732 = __THREW__; __THREW__ = 0;
+     if ((($732|0) != 0) & ((threwValue|0) != 0)) { $733 = _testSetjmp(HEAP32[$732>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($733|0) == 0) { _longjmp($732|0, threwValue|0); } tempRet0 = (threwValue); } else { $733 = -1; };
+     $734 = tempRet0;
+     $cond1126 = ($733|0)==(1);
+     if ($cond1126) {
+      $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $734;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+      continue L3;
+     }
+     HEAP32[$c>>2] = $731;
+     __THREW__ = 0;
+     $735 = (invoke_iiii(139,($mrb|0),($c|0),($714|0))|0);
+     $736 = __THREW__; __THREW__ = 0;
+     if ((($736|0) != 0) & ((threwValue|0) != 0)) { $737 = _testSetjmp(HEAP32[$736>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($737|0) == 0) { _longjmp($736|0, threwValue|0); } tempRet0 = (threwValue); } else { $737 = -1; };
+     $738 = tempRet0;
+     $cond1127 = ($737|0)==(1);
+     if ($cond1127) {
+      $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $738;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+      continue L3;
+     }
+     $739 = ($735|0)!=(0|0);
+     do {
+      if ($739) {
+       $m$0 = $735;$mid$0 = $714;$n11$0 = $710;
+      } else {
+       __THREW__ = 0;
+       invoke_vii(143,($sym|0),($714|0));
+       $740 = __THREW__; __THREW__ = 0;
+       if ((($740|0) != 0) & ((threwValue|0) != 0)) { $741 = _testSetjmp(HEAP32[$740>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($741|0) == 0) { _longjmp($740|0, threwValue|0); } tempRet0 = (threwValue); } else { $741 = -1; };
+       $742 = tempRet0;
+       $cond1128 = ($741|0)==(1);
+       if ($cond1128) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $742;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       __THREW__ = 0;
+       $743 = (invoke_iiii(140,($mrb|0),(65322|0),14)|0);
+       $744 = __THREW__; __THREW__ = 0;
+       if ((($744|0) != 0) & ((threwValue|0) != 0)) { $745 = _testSetjmp(HEAP32[$744>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($745|0) == 0) { _longjmp($744|0, threwValue|0); } tempRet0 = (threwValue); } else { $745 = -1; };
+       $746 = tempRet0;
+       $cond1129 = ($745|0)==(1);
+       if ($cond1129) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $746;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       __THREW__ = 0;
+       $747 = (invoke_iiii(139,($mrb|0),($c|0),($743|0))|0);
+       $748 = __THREW__; __THREW__ = 0;
+       if ((($748|0) != 0) & ((threwValue|0) != 0)) { $749 = _testSetjmp(HEAP32[$748>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($749|0) == 0) { _longjmp($748|0, threwValue|0); } tempRet0 = (threwValue); } else { $749 = -1; };
+       $750 = tempRet0;
+       $cond1130 = ($749|0)==(1);
+       if ($cond1130) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $750;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       $751 = ($747|0)!=(0|0);
+       if (!($751)) {
+        $752 = ($710|0)==(127);
+        if ($752) {
+         $753 = (($708) + 1)|0;
+         $754 = (($regs$5) + ($753<<3)|0);
+         ;HEAP32[$args>>2]=HEAP32[$754>>2]|0;HEAP32[$args+4>>2]=HEAP32[$754+4>>2]|0;
+        } else {
+         $755 = (($regs$5) + ($708<<3)|0);
+         $756 = ((($755)) + 8|0);
+         __THREW__ = 0;
+         invoke_viiii(167,($7|0),($mrb|0),($710|0),($756|0));
+         $757 = __THREW__; __THREW__ = 0;
+         if ((($757|0) != 0) & ((threwValue|0) != 0)) { $758 = _testSetjmp(HEAP32[$757>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($758|0) == 0) { _longjmp($757|0, threwValue|0); } tempRet0 = (threwValue); } else { $758 = -1; };
+         $759 = tempRet0;
+         $cond1131 = ($758|0)==(1);
+         if ($cond1131) {
+          $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $759;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+          continue L3;
+         }
+         ;HEAP32[$args>>2]=HEAP32[$7>>2]|0;HEAP32[$args+4>>2]=HEAP32[$7+4>>2]|0;
+        }
+        __THREW__ = 0;
+        ;HEAP32[$recv$byval_copy910>>2]=HEAP32[$recv>>2]|0;HEAP32[$recv$byval_copy910+4>>2]=HEAP32[$recv+4>>2]|0;
+        ;HEAP32[$args$byval_copy>>2]=HEAP32[$args>>2]|0;HEAP32[$args$byval_copy+4>>2]=HEAP32[$args+4>>2]|0;
+        invoke_viiii(168,($mrb|0),($714|0),($recv$byval_copy910|0),($args$byval_copy|0));
+        $760 = __THREW__; __THREW__ = 0;
+        if ((($760|0) != 0) & ((threwValue|0) != 0)) { $761 = _testSetjmp(HEAP32[$760>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($761|0) == 0) { _longjmp($760|0, threwValue|0); } tempRet0 = (threwValue); } else { $761 = -1; };
+        $762 = tempRet0;
+        $cond1132 = ($761|0)==(1);
+        if ($cond1132) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $762;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+       }
+       $763 = ($710|0)==(127);
+       if ($763) {
+        $764 = (($708) + 1)|0;
+        $765 = (($regs$5) + ($764<<3)|0);
+        __THREW__ = 0;
+        ;HEAP32[$$byval_copy911>>2]=HEAP32[$765>>2]|0;HEAP32[$$byval_copy911+4>>2]=HEAP32[$765+4>>2]|0;
+        ;HEAP32[$sym$byval_copy>>2]=HEAP32[$sym>>2]|0;HEAP32[$sym$byval_copy+4>>2]=HEAP32[$sym+4>>2]|0;
+        invoke_viiii(169,($8|0),($mrb|0),($$byval_copy911|0),($sym$byval_copy|0));
+        $766 = __THREW__; __THREW__ = 0;
+        if ((($766|0) != 0) & ((threwValue|0) != 0)) { $767 = _testSetjmp(HEAP32[$766>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($767|0) == 0) { _longjmp($766|0, threwValue|0); } tempRet0 = (threwValue); } else { $767 = -1; };
+        $768 = tempRet0;
+        $cond1134 = ($767|0)==(1);
+        if ($cond1134) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $768;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        $m$0 = $747;$mid$0 = $743;$n11$0 = $710;
+        break;
+       } else {
+        $769 = (($regs$5) + ($708<<3)|0);
+        $770 = ((($769)) + 16|0);
+        $771 = (($regs$5) + ($708<<3)|0);
+        $772 = ((($771)) + 8|0);
+        $773 = (($710) + 1)|0;
+        __THREW__ = 0;
+        invoke_viii(170,($770|0),($772|0),($773|0));
+        $774 = __THREW__; __THREW__ = 0;
+        if ((($774|0) != 0) & ((threwValue|0) != 0)) { $775 = _testSetjmp(HEAP32[$774>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($775|0) == 0) { _longjmp($774|0, threwValue|0); } tempRet0 = (threwValue); } else { $775 = -1; };
+        $776 = tempRet0;
+        $cond1133 = ($775|0)==(1);
+        if ($cond1133) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $776;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        $777 = (($708) + 1)|0;
+        $778 = (($regs$5) + ($777<<3)|0);
+        ;HEAP32[$778>>2]=HEAP32[$sym>>2]|0;HEAP32[$778+4>>2]=HEAP32[$sym+4>>2]|0;
+        $m$0 = $747;$mid$0 = $743;$n11$0 = $773;
+        break;
+       }
+      }
+     } while(0);
+     __THREW__ = 0;
+     $779 = (invoke_ii(141,($mrb|0))|0);
+     $780 = __THREW__; __THREW__ = 0;
+     if ((($780|0) != 0) & ((threwValue|0) != 0)) { $781 = _testSetjmp(HEAP32[$780>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($781|0) == 0) { _longjmp($780|0, threwValue|0); } tempRet0 = (threwValue); } else { $781 = -1; };
+     $782 = tempRet0;
+     $cond1135 = ($781|0)==(1);
+     if ($cond1135) {
+      $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $782;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+      continue L3;
+     }
+     HEAP32[$779>>2] = $mid$0;
+     $783 = ((($779)) + 4|0);
+     HEAP32[$783>>2] = $m$0;
+     $784 = ((($mrb)) + 12|0);
+     $785 = HEAP32[$784>>2]|0;
+     $786 = ((($785)) + 4|0);
+     $787 = HEAP32[$786>>2]|0;
+     $788 = ((($779)) + 8|0);
+     HEAP32[$788>>2] = $787;
+     $789 = HEAP32[$c>>2]|0;
+     $790 = ((($779)) + 44|0);
+     HEAP32[$790>>2] = $789;
+     $791 = ((($pc$6)) + 4|0);
+     $792 = ((($779)) + 28|0);
+     HEAP32[$792>>2] = $791;
+     $793 = ((($779)) + 40|0);
+     HEAP32[$793>>2] = $708;
+     $794 = ((($mrb)) + 12|0);
+     $795 = HEAP32[$794>>2]|0;
+     $796 = ((($795)) + 4|0);
+     $797 = HEAP32[$796>>2]|0;
+     $798 = (($797) + ($708<<3)|0);
+     HEAP32[$796>>2] = $798;
+     $799 = HEAP32[$m$0>>2]|0;
+     $800 = $799 >>> 11;
+     $801 = $800 & 128;
+     $802 = ($801|0)!=(0);
+     if (!($802)) {
+      $861 = ((($mrb)) + 12|0);
+      $862 = HEAP32[$861>>2]|0;
+      $863 = ((($862)) + 16|0);
+      $864 = HEAP32[$863>>2]|0;
+      $865 = ((($864)) + 4|0);
+      HEAP32[$865>>2] = $m$0;
+      $866 = ((($m$0)) + 12|0);
+      $867 = HEAP32[$866>>2]|0;
+      $868 = ((($867)) + 12|0);
+      $869 = HEAP32[$868>>2]|0;
+      $870 = ((($867)) + 16|0);
+      $871 = HEAP32[$870>>2]|0;
+      $872 = ((($867)) + 2|0);
+      $873 = HEAP16[$872>>1]|0;
+      $874 = $873&65535;
+      $875 = ((($779)) + 12|0);
+      HEAP32[$875>>2] = $874;
+      $876 = ($n11$0|0)==(127);
+      if ($876) {
+       $877 = ((($779)) + 36|0);
+       HEAP32[$877>>2] = -1;
+       $878 = ((($867)) + 2|0);
+       $879 = HEAP16[$878>>1]|0;
+       $880 = $879&65535;
+       $881 = ($880|0)<(3);
+       if ($881) {
+        $$reg2mem897$0 = 3;
+       } else {
+        $882 = ((($867)) + 2|0);
+        $883 = HEAP16[$882>>1]|0;
+        $884 = $883&65535;
+        $$reg2mem897$0 = $884;
+       }
+       __THREW__ = 0;
+       invoke_viii(142,($mrb|0),($$reg2mem897$0|0),3);
+       $885 = __THREW__; __THREW__ = 0;
+       if ((($885|0) != 0) & ((threwValue|0) != 0)) { $886 = _testSetjmp(HEAP32[$885>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($886|0) == 0) { _longjmp($885|0, threwValue|0); } tempRet0 = (threwValue); } else { $886 = -1; };
+       $887 = tempRet0;
+       $cond1137 = ($886|0)==(1);
+       if ($cond1137) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $m$0;$$reg2mem899$0 = $887;$exc_catched$1 = $exc_catched$5;$irep$1 = $867;$pc$1 = $pc$6;$pool$1 = $869;$regs$1 = $regs$5;$syms$1 = $871;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+      } else {
+       $888 = ((($779)) + 36|0);
+       HEAP32[$888>>2] = $n11$0;
+       $889 = ((($867)) + 2|0);
+       $890 = HEAP16[$889>>1]|0;
+       $891 = $890&65535;
+       $892 = (($n11$0) + 2)|0;
+       __THREW__ = 0;
+       invoke_viii(142,($mrb|0),($891|0),($892|0));
+       $893 = __THREW__; __THREW__ = 0;
+       if ((($893|0) != 0) & ((threwValue|0) != 0)) { $894 = _testSetjmp(HEAP32[$893>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($894|0) == 0) { _longjmp($893|0, threwValue|0); } tempRet0 = (threwValue); } else { $894 = -1; };
+       $895 = tempRet0;
+       $cond1136 = ($894|0)==(1);
+       if ($cond1136) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $m$0;$$reg2mem899$0 = $895;$exc_catched$1 = $exc_catched$5;$irep$1 = $867;$pc$1 = $pc$6;$pool$1 = $869;$regs$1 = $regs$5;$syms$1 = $871;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+      }
+      $896 = ((($mrb)) + 12|0);
+      $897 = HEAP32[$896>>2]|0;
+      $898 = ((($897)) + 4|0);
+      $899 = HEAP32[$898>>2]|0;
+      $900 = ((($867)) + 8|0);
+      $901 = HEAP32[$900>>2]|0;
+      $902 = HEAP32[$901>>2]|0;
+      $903 = $902 & 127;
+      $904 = (200 + ($903<<2)|0);
+      $905 = HEAP32[$904>>2]|0;
+      $exc_catched$5$phi = $exc_catched$5;$$8 = $m$0;$$reg2mem887$0 = $905;$i$2 = $902;$irep$8 = $867;$pc$6 = $901;$pool$6 = $869;$regs$5 = $899;$syms$6 = $871;$exc_catched$5 = $exc_catched$5$phi;
+      label = 590;
+      continue;
+     }
+     $803 = ($n11$0|0)==(127);
+     if ($803) {
+      $804 = ((($779)) + 36|0);
+      HEAP32[$804>>2] = -1;
+      $805 = ((($779)) + 12|0);
+      HEAP32[$805>>2] = 3;
+     } else {
+      $806 = ((($779)) + 36|0);
+      HEAP32[$806>>2] = $n11$0;
+      $807 = (($n11$0) + 2)|0;
+      $808 = ((($779)) + 12|0);
+      HEAP32[$808>>2] = $807;
+     }
+     $809 = ((($m$0)) + 12|0);
+     $810 = HEAP32[$809>>2]|0;
+     __THREW__ = 0;
+     ;HEAP32[$recv$byval_copy912>>2]=HEAP32[$recv>>2]|0;HEAP32[$recv$byval_copy912+4>>2]=HEAP32[$recv+4>>2]|0;
+     invoke_viii($810|0,($9|0),($mrb|0),($recv$byval_copy912|0));
+     $811 = __THREW__; __THREW__ = 0;
+     if ((($811|0) != 0) & ((threwValue|0) != 0)) { $812 = _testSetjmp(HEAP32[$811>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($812|0) == 0) { _longjmp($811|0, threwValue|0); } tempRet0 = (threwValue); } else { $812 = -1; };
+     $813 = tempRet0;
+     $cond1138 = ($812|0)==(1);
+     if ($cond1138) {
+      $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $813;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+      continue L3;
+     }
+     ;HEAP32[$result>>2]=HEAP32[$9>>2]|0;HEAP32[$result+4>>2]=HEAP32[$9+4>>2]|0;
+     $814 = ((($mrb)) + 12|0);
+     $815 = HEAP32[$814>>2]|0;
+     $816 = ((($815)) + 4|0);
+     $817 = HEAP32[$816>>2]|0;
+     ;HEAP32[$817>>2]=HEAP32[$result>>2]|0;HEAP32[$817+4>>2]=HEAP32[$result+4>>2]|0;
+     __THREW__ = 0;
+     invoke_vii(146,($mrb|0),($ai$1|0));
+     $818 = __THREW__; __THREW__ = 0;
+     if ((($818|0) != 0) & ((threwValue|0) != 0)) { $819 = _testSetjmp(HEAP32[$818>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($819|0) == 0) { _longjmp($818|0, threwValue|0); } tempRet0 = (threwValue); } else { $819 = -1; };
+     $820 = tempRet0;
+     $cond1139 = ($819|0)==(1);
+     if ($cond1139) {
+      $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$8;$$reg2mem899$0 = $820;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$8;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+      continue L3;
+     }
+     $821 = ((($mrb)) + 20|0);
+     $822 = HEAP32[$821>>2]|0;
+     $823 = ($822|0)!=(0|0);
+     if ($823) {
+      $$5 = $$8;$exc_catched$2 = $exc_catched$5;$irep$5 = $irep$8;$pc$3 = $pc$6;$pool$3 = $pool$6;$regs$2 = $regs$5;$syms$3 = $syms$6;
+      label = 276;
+      continue;
+     }
+     $824 = ((($mrb)) + 12|0);
+     $825 = HEAP32[$824>>2]|0;
+     $826 = ((($825)) + 16|0);
+     $827 = HEAP32[$826>>2]|0;
+     $828 = ((($827)) + 44|0);
+     $829 = HEAP32[$828>>2]|0;
+     $830 = ($829|0)!=(0|0);
+     if ($830) {
+      $$2 = $$8;$irep$2 = $irep$8;$pool$2 = $pool$6;$syms$2 = $syms$6;
+     } else {
+      $831 = ((($827)) + -48|0);
+      $832 = ((($831)) + 4|0);
+      $833 = HEAP32[$832>>2]|0;
+      $834 = HEAP32[$833>>2]|0;
+      $835 = $834 >>> 11;
+      $836 = $835 & 128;
+      $837 = ($836|0)!=(0);
+      if ($837) {
+       $$2 = $$8;$irep$2 = $irep$8;$pool$2 = $pool$6;$syms$2 = $syms$6;
+      } else {
+       $838 = ((($827)) + -48|0);
+       $839 = ((($838)) + 4|0);
+       $840 = HEAP32[$839>>2]|0;
+       $841 = ((($840)) + 12|0);
+       $842 = HEAP32[$841>>2]|0;
+       $843 = ((($842)) + 12|0);
+       $844 = HEAP32[$843>>2]|0;
+       $845 = ((($842)) + 16|0);
+       $846 = HEAP32[$845>>2]|0;
+       $$2 = $840;$irep$2 = $842;$pool$2 = $844;$syms$2 = $846;
+      }
+     }
+     $847 = ((($827)) + 8|0);
+     $848 = HEAP32[$847>>2]|0;
+     $849 = ((($mrb)) + 12|0);
+     $850 = HEAP32[$849>>2]|0;
+     $851 = ((($850)) + 4|0);
+     HEAP32[$851>>2] = $848;
+     $852 = ((($827)) + 28|0);
+     $853 = HEAP32[$852>>2]|0;
+     __THREW__ = 0;
+     invoke_vi(132,($mrb|0));
+     $854 = __THREW__; __THREW__ = 0;
+     if ((($854|0) != 0) & ((threwValue|0) != 0)) { $855 = _testSetjmp(HEAP32[$854>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($855|0) == 0) { _longjmp($854|0, threwValue|0); } tempRet0 = (threwValue); } else { $855 = -1; };
+     $856 = tempRet0;
+     $cond1140 = ($855|0)==(1);
+     if ($cond1140) {
+      $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$2;$$reg2mem899$0 = $856;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$2;$pc$1 = $853;$pool$1 = $pool$2;$regs$1 = $848;$syms$1 = $syms$2;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+      continue L3;
+     }
+     $857 = HEAP32[$853>>2]|0;
+     $858 = $857 & 127;
+     $859 = (200 + ($858<<2)|0);
+     $860 = HEAP32[$859>>2]|0;
+     $exc_catched$5$phi = $exc_catched$5;$$8 = $$2;$$reg2mem887$0 = $860;$i$2 = $857;$irep$8 = $irep$2;$pc$6 = $853;$pool$6 = $pool$2;$regs$5 = $848;$syms$6 = $syms$2;$exc_catched$5 = $exc_catched$5$phi;
+     label = 590;
+     continue;
+    }
+    else if ((label|0) == 274) {
+     label = 0;
+     $1500 = $i$2 >>> 23;
+     $1501 = $1500 & 511;
+     $1502 = $1501 & 511;
+     $1503 = $1502 << 23;
+     $1504 = 41 | $1503;
+     $$4 = $$3;$i$1 = $1504;$irep$4 = $irep$3;
+    }
+    $1505 = ((($mrb)) + 20|0);
+    $1506 = HEAP32[$1505>>2]|0;
+    $1507 = ($1506|0)!=(0|0);
+    if ($1507) {
+     $$5 = $$4;$exc_catched$2 = $exc_catched$5;$irep$5 = $irep$4;$pc$3 = $pc$6;$pool$3 = $pool$6;$regs$2 = $regs$5;$syms$3 = $syms$6;
+     label = 276;
+     continue;
+    }
+    $1648 = ((($mrb)) + 12|0);
+    $1649 = HEAP32[$1648>>2]|0;
+    $1650 = ((($1649)) + 16|0);
+    $1651 = HEAP32[$1650>>2]|0;
+    $1652 = ((($mrb)) + 12|0);
+    $1653 = HEAP32[$1652>>2]|0;
+    $1654 = ((($1653)) + 16|0);
+    $1655 = HEAP32[$1654>>2]|0;
+    $1656 = ((($1655)) + 20|0);
+    $1657 = HEAP32[$1656>>2]|0;
+    $1658 = $i$1 >>> 23;
+    $1659 = $1658 & 511;
+    $1660 = (($regs$5) + ($1659<<3)|0);
+    ;HEAP32[$v>>2]=HEAP32[$1660>>2]|0;HEAP32[$v+4>>2]=HEAP32[$1660+4>>2]|0;
+    $1661 = $i$1 >>> 14;
+    $1662 = $1661 & 511;
+    L655: do {
+     switch ($1662|0) {
+     case 2:  {
+      $1663 = ((($$4)) + 20|0);
+      $1664 = HEAP32[$1663>>2]|0;
+      $1665 = ($1664|0)!=(0|0);
+      if ($1665) {
+       $1666 = HEAP32[$$4>>2]|0;
+       $1667 = $1666 >>> 11;
+       $1668 = $1667 & 256;
+       $1669 = ($1668|0)!=(0);
+       if ($1669) {
+        label = 313;
+       } else {
+        __THREW__ = 0;
+        $1670 = (invoke_iii(179,($mrb|0),($$4|0))|0);
+        $1671 = __THREW__; __THREW__ = 0;
+        if ((($1671|0) != 0) & ((threwValue|0) != 0)) { $1672 = _testSetjmp(HEAP32[$1671>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1672|0) == 0) { _longjmp($1671|0, threwValue|0); } tempRet0 = (threwValue); } else { $1672 = -1; };
+        $1673 = tempRet0;
+        $cond1076 = ($1672|0)==(1);
+        if ($cond1076) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$4;$$reg2mem899$0 = $1673;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$4;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        $1674 = ((($1670)) + 20|0);
+        $1675 = HEAP32[$1674>>2]|0;
+        $1676 = ($1675|0)>=(0);
+        if (!($1676)) {
+         __THREW__ = 0;
+         invoke_vii(180,($mrb|0),0);
+         $1677 = __THREW__; __THREW__ = 0;
+         if ((($1677|0) != 0) & ((threwValue|0) != 0)) { $1678 = _testSetjmp(HEAP32[$1677>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1678|0) == 0) { _longjmp($1677|0, threwValue|0); } tempRet0 = (threwValue); } else { $1678 = -1; };
+         $1679 = tempRet0;
+         $cond1077 = ($1678|0)==(1);
+         if ($cond1077) {
+          $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$4;$$reg2mem899$0 = $1679;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$4;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+          continue L3;
+         }
+         $$5 = $$4;$exc_catched$2 = $exc_catched$5;$irep$5 = $irep$4;$pc$3 = $pc$6;$pool$3 = $pool$6;$regs$2 = $regs$5;$syms$3 = $syms$6;
+         label = 276;
+         continue L19;
+        }
+        $1680 = ((($mrb)) + 12|0);
+        $1681 = HEAP32[$1680>>2]|0;
+        $1682 = ((($1681)) + 20|0);
+        $1683 = HEAP32[$1682>>2]|0;
+        $1684 = ((($1670)) + 20|0);
+        $1685 = HEAP32[$1684>>2]|0;
+        $1686 = (($1683) + (($1685*48)|0)|0);
+        $1687 = ((($mrb)) + 12|0);
+        $1688 = HEAP32[$1687>>2]|0;
+        $1689 = ((($1688)) + 20|0);
+        $1690 = HEAP32[$1689>>2]|0;
+        $1691 = ($1686|0)==($1690|0);
+        if (!($1691)) {
+         $1695 = ((($mrb)) + 12|0);
+         $1696 = HEAP32[$1695>>2]|0;
+         $1697 = ((($1696)) + 16|0);
+         $1698 = HEAP32[$1697>>2]|0;
+         $1699 = ((($1698)) + 8|0);
+         $1700 = HEAP32[$1699>>2]|0;
+         $1701 = ((($mrb)) + 12|0);
+         $1702 = HEAP32[$1701>>2]|0;
+         $1703 = ((($1702)) + 4|0);
+         HEAP32[$1703>>2] = $1700;
+         $1704 = ((($mrb)) + 12|0);
+         $1705 = HEAP32[$1704>>2]|0;
+         $1706 = ((($1705)) + 16|0);
+         HEAP32[$1706>>2] = $1686;
+         $ci34$1 = $1686;$eidx35$0 = $1657;
+         break L655;
+        }
+        __THREW__ = 0;
+        invoke_vii(180,($mrb|0),0);
+        $1692 = __THREW__; __THREW__ = 0;
+        if ((($1692|0) != 0) & ((threwValue|0) != 0)) { $1693 = _testSetjmp(HEAP32[$1692>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1693|0) == 0) { _longjmp($1692|0, threwValue|0); } tempRet0 = (threwValue); } else { $1693 = -1; };
+        $1694 = tempRet0;
+        $cond1078 = ($1693|0)==(1);
+        if ($cond1078) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$4;$$reg2mem899$0 = $1694;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$4;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        $$5 = $$4;$exc_catched$2 = $exc_catched$5;$irep$5 = $irep$4;$pc$3 = $pc$6;$pool$3 = $pool$6;$regs$2 = $regs$5;$syms$3 = $syms$6;
+        label = 276;
+        continue L19;
+       }
+      } else {
+       label = 313;
+      }
+      break;
+     }
+     case 0:  {
+      label = 313;
+      break;
+     }
+     case 1:  {
+      $1756 = ((($$4)) + 20|0);
+      $1757 = HEAP32[$1756>>2]|0;
+      $1758 = ($1757|0)!=(0|0);
+      if ($1758) {
+       $1759 = ((($$4)) + 20|0);
+       $1760 = HEAP32[$1759>>2]|0;
+       $1761 = ((($1760)) + 20|0);
+       $1762 = HEAP32[$1761>>2]|0;
+       $1763 = ($1762|0)>=(0);
+       if ($1763) {
+        $1767 = ((($mrb)) + 12|0);
+        $1768 = HEAP32[$1767>>2]|0;
+        $1769 = ((($1768)) + 16|0);
+        $1770 = HEAP32[$1769>>2]|0;
+        $1771 = ((($mrb)) + 12|0);
+        $1772 = HEAP32[$1771>>2]|0;
+        $1773 = ((($1772)) + 20|0);
+        $1774 = HEAP32[$1773>>2]|0;
+        $1775 = ($1770|0)==($1774|0);
+        if ($1775) {
+         $1776 = ((($mrb)) + 12|0);
+         $1777 = HEAP32[$1776>>2]|0;
+         $1778 = ((($1777)) + 16|0);
+         $1779 = HEAP32[$1778>>2]|0;
+         $1780 = ((($1779)) + 28|0);
+         $1781 = HEAP32[$1780>>2]|0;
+         $1782 = ($1781|0)!=(0|0);
+         if ($1782) {
+          $1783 = ((($mrb)) + 12|0);
+          $1784 = HEAP32[$1783>>2]|0;
+          $1785 = HEAP32[$1784>>2]|0;
+          $1786 = ((($mrb)) + 12|0);
+          HEAP32[$1786>>2] = $1785;
+          HEAP32[$1784>>2] = 0;
+         }
+        }
+        $1787 = ((($mrb)) + 12|0);
+        $1788 = HEAP32[$1787>>2]|0;
+        $1789 = ((($1788)) + 16|0);
+        $1790 = HEAP32[$1789>>2]|0;
+        $1791 = ((($1790)) + 8|0);
+        $1792 = HEAP32[$1791>>2]|0;
+        $1793 = ((($mrb)) + 12|0);
+        $1794 = HEAP32[$1793>>2]|0;
+        $1795 = ((($1794)) + 4|0);
+        HEAP32[$1795>>2] = $1792;
+        $1796 = ((($mrb)) + 12|0);
+        $1797 = HEAP32[$1796>>2]|0;
+        $1798 = ((($1797)) + 20|0);
+        $1799 = HEAP32[$1798>>2]|0;
+        $1800 = ((($$4)) + 20|0);
+        $1801 = HEAP32[$1800>>2]|0;
+        $1802 = ((($1801)) + 20|0);
+        $1803 = HEAP32[$1802>>2]|0;
+        $1804 = (($1799) + (($1803*48)|0)|0);
+        $1805 = ((($1804)) + 48|0);
+        $1806 = ((($mrb)) + 12|0);
+        $1807 = HEAP32[$1806>>2]|0;
+        $1808 = ((($1807)) + 16|0);
+        HEAP32[$1808>>2] = $1805;
+        $ci34$0 = $1790;
+        while(1) {
+         $1809 = ((($mrb)) + 12|0);
+         $1810 = HEAP32[$1809>>2]|0;
+         $1811 = ((($1810)) + 16|0);
+         $1812 = HEAP32[$1811>>2]|0;
+         $1813 = ($ci34$0>>>0)>($1812>>>0);
+         if (!($1813)) {
+          $ci34$1 = $ci34$0;$eidx35$0 = $1657;
+          break L655;
+         }
+         $1814 = ((($ci34$0)) + -48|0);
+         $1815 = ((($1814)) + 40|0);
+         $1816 = HEAP32[$1815>>2]|0;
+         $1817 = ($1816|0)==(-1);
+         if ($1817) {
+          break;
+         }
+         $1821 = ((($ci34$0)) + -48|0);
+         $ci34$0 = $1821;
+        }
+        $1818 = ((($mrb)) + 12|0);
+        $1819 = HEAP32[$1818>>2]|0;
+        $1820 = ((($1819)) + 16|0);
+        HEAP32[$1820>>2] = $ci34$0;
+        $ci34$1 = $ci34$0;$eidx35$0 = $1657;
+        break L655;
+       }
+      }
+      __THREW__ = 0;
+      invoke_vii(180,($mrb|0),1);
+      $1764 = __THREW__; __THREW__ = 0;
+      if ((($1764|0) != 0) & ((threwValue|0) != 0)) { $1765 = _testSetjmp(HEAP32[$1764>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1765|0) == 0) { _longjmp($1764|0, threwValue|0); } tempRet0 = (threwValue); } else { $1765 = -1; };
+      $1766 = tempRet0;
+      $cond1071 = ($1765|0)==(1);
+      if ($cond1071) {
+       $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$4;$$reg2mem899$0 = $1766;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$4;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+       continue L3;
+      }
+      $$5 = $$4;$exc_catched$2 = $exc_catched$5;$irep$5 = $irep$4;$pc$3 = $pc$6;$pool$3 = $pool$6;$regs$2 = $regs$5;$syms$3 = $syms$6;
+      label = 276;
+      continue L19;
+      break;
+     }
+     default: {
+      $ci34$1 = $1651;$eidx35$0 = $1657;
+     }
+     }
+    } while(0);
+    if ((label|0) == 313) {
+     label = 0;
+     $1707 = ((($mrb)) + 12|0);
+     $1708 = HEAP32[$1707>>2]|0;
+     $1709 = ((($1708)) + 20|0);
+     $1710 = HEAP32[$1709>>2]|0;
+     $1711 = ($1651|0)==($1710|0);
+     do {
+      if ($1711) {
+       $1712 = ((($mrb)) + 12|0);
+       $1713 = HEAP32[$1712>>2]|0;
+       $1714 = HEAP32[$1713>>2]|0;
+       $1715 = ($1714|0)!=(0|0);
+       if (!($1715)) {
+        __THREW__ = 0;
+        invoke_vii(180,($mrb|0),0);
+        $1716 = __THREW__; __THREW__ = 0;
+        if ((($1716|0) != 0) & ((threwValue|0) != 0)) { $1717 = _testSetjmp(HEAP32[$1716>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1717|0) == 0) { _longjmp($1716|0, threwValue|0); } tempRet0 = (threwValue); } else { $1717 = -1; };
+        $1718 = tempRet0;
+        $cond1072 = ($1717|0)==(1);
+        if ($cond1072) {
+         $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$4;$$reg2mem899$0 = $1718;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$4;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+         continue L3;
+        }
+        $$5 = $$4;$exc_catched$2 = $exc_catched$5;$irep$5 = $irep$4;$pc$3 = $pc$6;$pool$3 = $pool$6;$regs$2 = $regs$5;$syms$3 = $syms$6;
+        label = 276;
+        continue L19;
+       }
+       $1719 = ((($mrb)) + 12|0);
+       $1720 = HEAP32[$1719>>2]|0;
+       $1721 = HEAP32[$1720>>2]|0;
+       $1722 = ((($1721)) + 16|0);
+       $1723 = HEAP32[$1722>>2]|0;
+       $1724 = ((($mrb)) + 12|0);
+       $1725 = HEAP32[$1724>>2]|0;
+       $1726 = HEAP32[$1725>>2]|0;
+       $1727 = ((($1726)) + 20|0);
+       $1728 = HEAP32[$1727>>2]|0;
+       $1729 = ($1723|0)==($1728|0);
+       if (!($1729)) {
+        $1742 = ((($mrb)) + 12|0);
+        $1743 = HEAP32[$1742>>2]|0;
+        $1744 = ((($1743)) + 44|0);
+        HEAP32[$1744>>2] = 5;
+        $1745 = ((($mrb)) + 12|0);
+        $1746 = HEAP32[$1745>>2]|0;
+        $1747 = HEAP32[$1746>>2]|0;
+        $1748 = ((($mrb)) + 12|0);
+        HEAP32[$1748>>2] = $1747;
+        $1749 = ((($mrb)) + 12|0);
+        $1750 = HEAP32[$1749>>2]|0;
+        $1751 = ((($1750)) + 44|0);
+        HEAP32[$1751>>2] = 1;
+        break;
+       }
+       __THREW__ = 0;
+       $1730 = (invoke_iii(135,($mrb|0),(56642|0))|0);
+       $1731 = __THREW__; __THREW__ = 0;
+       if ((($1731|0) != 0) & ((threwValue|0) != 0)) { $1732 = _testSetjmp(HEAP32[$1731>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1732|0) == 0) { _longjmp($1731|0, threwValue|0); } tempRet0 = (threwValue); } else { $1732 = -1; };
+       $1733 = tempRet0;
+       $cond1073 = ($1732|0)==(1);
+       if ($cond1073) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$4;$$reg2mem899$0 = $1733;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$4;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       __THREW__ = 0;
+       invoke_viiii(171,($26|0),($mrb|0),(56653|0),13);
+       $1734 = __THREW__; __THREW__ = 0;
+       if ((($1734|0) != 0) & ((threwValue|0) != 0)) { $1735 = _testSetjmp(HEAP32[$1734>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1735|0) == 0) { _longjmp($1734|0, threwValue|0); } tempRet0 = (threwValue); } else { $1735 = -1; };
+       $1736 = tempRet0;
+       $cond1074 = ($1735|0)==(1);
+       if ($cond1074) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$4;$$reg2mem899$0 = $1736;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$4;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       __THREW__ = 0;
+       ;HEAP32[$$byval_copy922>>2]=HEAP32[$26>>2]|0;HEAP32[$$byval_copy922+4>>2]=HEAP32[$26+4>>2]|0;
+       invoke_viiii(172,($exc37|0),($mrb|0),($1730|0),($$byval_copy922|0));
+       $1737 = __THREW__; __THREW__ = 0;
+       if ((($1737|0) != 0) & ((threwValue|0) != 0)) { $1738 = _testSetjmp(HEAP32[$1737>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1738|0) == 0) { _longjmp($1737|0, threwValue|0); } tempRet0 = (threwValue); } else { $1738 = -1; };
+       $1739 = tempRet0;
+       $cond1075 = ($1738|0)==(1);
+       if ($cond1075) {
+        $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$4;$$reg2mem899$0 = $1739;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$4;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+        continue L3;
+       }
+       $1740 = HEAP32[$exc37>>2]|0;
+       $1741 = ((($mrb)) + 20|0);
+       HEAP32[$1741>>2] = $1740;
+       $$5 = $$4;$exc_catched$2 = $exc_catched$5;$irep$5 = $irep$4;$pc$3 = $pc$6;$pool$3 = $pool$6;$regs$2 = $regs$5;$syms$3 = $syms$6;
+       label = 276;
+       continue L19;
+      }
+     } while(0);
+     $1752 = ((($mrb)) + 12|0);
+     $1753 = HEAP32[$1752>>2]|0;
+     $1754 = ((($1753)) + 16|0);
+     $1755 = HEAP32[$1754>>2]|0;
+     $ci34$1 = $1755;$eidx35$0 = $1657;
+    }
+    while(1) {
+     $1822 = ((($mrb)) + 12|0);
+     $1823 = HEAP32[$1822>>2]|0;
+     $1824 = ((($1823)) + 16|0);
+     $1825 = HEAP32[$1824>>2]|0;
+     $1826 = ((($1825)) + -48|0);
+     $1827 = ((($1826)) + 20|0);
+     $1828 = HEAP32[$1827>>2]|0;
+     $1829 = ($eidx35$0|0)>($1828|0);
+     if (!($1829)) {
+      break;
+     }
+     $1830 = (($eidx35$0) + -1)|0;
+     __THREW__ = 0;
+     invoke_vii(166,($mrb|0),($1830|0));
+     $1831 = __THREW__; __THREW__ = 0;
+     if ((($1831|0) != 0) & ((threwValue|0) != 0)) { $1832 = _testSetjmp(HEAP32[$1831>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1832|0) == 0) { _longjmp($1831|0, threwValue|0); } tempRet0 = (threwValue); } else { $1832 = -1; };
+     $1833 = tempRet0;
+     $cond1080 = ($1832|0)==(1);
+     if ($cond1080) {
+      $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$4;$$reg2mem899$0 = $1833;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$4;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+      continue L3;
+     }
+     $ci34$1$phi = $ci34$1;$eidx35$0 = $1830;$ci34$1 = $ci34$1$phi;
+    }
+    __THREW__ = 0;
+    invoke_vi(132,($mrb|0));
+    $1834 = __THREW__; __THREW__ = 0;
+    if ((($1834|0) != 0) & ((threwValue|0) != 0)) { $1835 = _testSetjmp(HEAP32[$1834>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1835|0) == 0) { _longjmp($1834|0, threwValue|0); } tempRet0 = (threwValue); } else { $1835 = -1; };
+    $1836 = tempRet0;
+    $cond1079 = ($1835|0)==(1);
+    if ($cond1079) {
+     $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$4;$$reg2mem899$0 = $1836;$exc_catched$1 = $exc_catched$5;$irep$1 = $irep$4;$pc$1 = $pc$6;$pool$1 = $pool$6;$regs$1 = $regs$5;$syms$1 = $syms$6;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+     continue L3;
+    }
+    $1837 = ((($ci34$1)) + 40|0);
+    $1838 = HEAP32[$1837>>2]|0;
+    $1839 = ((($ci34$1)) + 28|0);
+    $1840 = HEAP32[$1839>>2]|0;
+    $1841 = ((($ci34$1)) + 8|0);
+    $1842 = HEAP32[$1841>>2]|0;
+    $1843 = ((($mrb)) + 12|0);
+    $1844 = HEAP32[$1843>>2]|0;
+    $1845 = ((($1844)) + 4|0);
+    HEAP32[$1845>>2] = $1842;
+    $1846 = ($1838|0)==(-1);
+    if ($1846) {
+     label = 341;
+     break L3;
+    }
+    $1847 = ((($mrb)) + 12|0);
+    $1848 = HEAP32[$1847>>2]|0;
+    $1849 = ((($1848)) + 16|0);
+    $1850 = HEAP32[$1849>>2]|0;
+    $1851 = ((($1850)) + 4|0);
+    $1852 = HEAP32[$1851>>2]|0;
+    $1853 = ((($1852)) + 12|0);
+    $1854 = HEAP32[$1853>>2]|0;
+    $1855 = ((($1854)) + 12|0);
+    $1856 = HEAP32[$1855>>2]|0;
+    $1857 = ((($1854)) + 16|0);
+    $1858 = HEAP32[$1857>>2]|0;
+    $1859 = (($1842) + ($1838<<3)|0);
+    ;HEAP32[$1859>>2]=HEAP32[$v>>2]|0;HEAP32[$1859+4>>2]=HEAP32[$v+4>>2]|0;
+    $$6 = $1852;$exc_catched$3 = $exc_catched$5;$irep$6 = $1854;$pc$4 = $1840;$pool$4 = $1856;$regs$3 = $1842;$syms$4 = $1858;
+   }
+   $1860 = HEAP32[$pc$4>>2]|0;
+   $1861 = $1860 & 127;
+   $1862 = (200 + ($1861<<2)|0);
+   $1863 = HEAP32[$1862>>2]|0;
+   $$8 = $$6;$$reg2mem887$0 = $1863;$exc_catched$5 = $exc_catched$3;$i$2 = $1860;$irep$8 = $irep$6;$pc$6 = $pc$4;$pool$6 = $pool$4;$regs$5 = $regs$3;$syms$6 = $syms$4;
+   label = 590;
+  }
+  if ((label|0) == 287) {
+   label = 0;
+   HEAP32[$mrb>>2] = $prev_jmp$1;
+   __THREW__ = 0;
+   invoke_vii(178,($prev_jmp$1|0),1);
+   $1578 = __THREW__; __THREW__ = 0;
+   if ((($1578|0) != 0) & ((threwValue|0) != 0)) { $1579 = _testSetjmp(HEAP32[$1578>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($1579|0) == 0) { _longjmp($1578|0, threwValue|0); } tempRet0 = (threwValue); } else { $1579 = -1; };
+   $1580 = tempRet0;
+   $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$5;$$reg2mem899$0 = $1580;$exc_catched$1 = $exc_catched$2;$irep$1 = $irep$5;$pc$1 = $pc$3;$pool$1 = $pool$3;$regs$1 = $regs$2;$syms$1 = $syms$3;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+   continue;
+  }
+  else if ((label|0) == 294) {
+   label = 0;
+   $1601 = ((($1600)) + 8|0);
+   $1602 = HEAP32[$1601>>2]|0;
+   $1603 = ((($mrb)) + 12|0);
+   $1604 = HEAP32[$1603>>2]|0;
+   $1605 = ((($1604)) + 4|0);
+   HEAP32[$1605>>2] = $1602;
+   $$7 = $$5;$exc_catched$4 = $exc_catched$2;$irep$7 = $irep$5;$pc$5 = $pc$3;$pool$5 = $pool$3;$regs$4 = $1602;$syms$5 = $syms$3;
+  }
+  $3206 = ((($mrb)) + 12|0);
+  $3207 = HEAP32[$3206>>2]|0;
+  $3208 = ((($3207)) + 16|0);
+  $3209 = HEAP32[$3208>>2]|0;
+  $3210 = ((($mrb)) + 12|0);
+  $3211 = HEAP32[$3210>>2]|0;
+  $3212 = ((($3211)) + 20|0);
+  $3213 = HEAP32[$3212>>2]|0;
+  $3214 = ($3209|0)==($3213|0);
+  if ($3214) {
+   $$reg2mem889$0 = 0;
+  } else {
+   $3215 = ((($mrb)) + 12|0);
+   $3216 = HEAP32[$3215>>2]|0;
+   $3217 = ((($3216)) + 16|0);
+   $3218 = HEAP32[$3217>>2]|0;
+   $3219 = ((($3218)) + -48|0);
+   $3220 = ((($3219)) + 20|0);
+   $3221 = HEAP32[$3220>>2]|0;
+   $$reg2mem889$0 = $3221;
+  }
+  $3222 = ((($mrb)) + 12|0);
+  $3223 = HEAP32[$3222>>2]|0;
+  $3224 = ((($3223)) + 16|0);
+  $3225 = HEAP32[$3224>>2]|0;
+  $3226 = ((($3225)) + 20|0);
+  $3227 = HEAP32[$3226>>2]|0;
+  $eidx119$0 = $3227;
+  while(1) {
+   $3228 = ($eidx119$0|0)>($$reg2mem889$0|0);
+   if (!($3228)) {
+    break;
+   }
+   $3229 = (($eidx119$0) + -1)|0;
+   __THREW__ = 0;
+   invoke_vii(166,($mrb|0),($3229|0));
+   $3230 = __THREW__; __THREW__ = 0;
+   if ((($3230|0) != 0) & ((threwValue|0) != 0)) { $3231 = _testSetjmp(HEAP32[$3230>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3231|0) == 0) { _longjmp($3230|0, threwValue|0); } tempRet0 = (threwValue); } else { $3231 = -1; };
+   $3232 = tempRet0;
+   $cond1003 = ($3231|0)==(1);
+   if ($cond1003) {
+    $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$7;$$reg2mem899$0 = $3232;$exc_catched$1 = $exc_catched$4;$irep$1 = $irep$7;$pc$1 = $pc$5;$pool$1 = $pool$5;$regs$1 = $regs$4;$syms$1 = $syms$5;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+    continue L3;
+   }
+   $eidx119$0 = $3229;
+  }
+  $3233 = ((($mrb)) + 12|0);
+  $3234 = HEAP32[$3233>>2]|0;
+  $3235 = ((($3234)) + 16|0);
+  $3236 = HEAP32[$3235>>2]|0;
+  $3237 = ((($3236)) + 32|0);
+  HEAP32[$3237>>2] = 0;
+  HEAP32[$mrb>>2] = $prev_jmp$1;
+  $3238 = ((($mrb)) + 20|0);
+  $3239 = HEAP32[$3238>>2]|0;
+  $3240 = ($3239|0)!=(0|0);
+  if (!($3240)) {
+   label = 578;
+   break;
+  }
+  $3241 = ((($mrb)) + 20|0);
+  $3242 = HEAP32[$3241>>2]|0;
+  __THREW__ = 0;
+  invoke_vii(133,($agg$result|0),($3242|0));
+  $3243 = __THREW__; __THREW__ = 0;
+  if ((($3243|0) != 0) & ((threwValue|0) != 0)) { $3244 = _testSetjmp(HEAP32[$3243>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($3244|0) == 0) { _longjmp($3243|0, threwValue|0); } tempRet0 = (threwValue); } else { $3244 = -1; };
+  $3245 = tempRet0;
+  $cond1002 = ($3244|0)==(1);
+  if ($cond1002) {
+   $prev_jmp$1$phi = $prev_jmp$1;$ai$1$phi = $ai$1;$$1 = $$7;$$reg2mem899$0 = $3245;$exc_catched$1 = $exc_catched$4;$irep$1 = $irep$7;$pc$1 = $pc$5;$pool$1 = $pool$5;$regs$1 = $regs$4;$syms$1 = $syms$5;$prev_jmp$1 = $prev_jmp$1$phi;$ai$1 = $ai$1$phi;
+  } else {
+   label = 577;
+   break;
+  }
+ }
+ if ((label|0) == 341) {
+  HEAP32[$mrb>>2] = $prev_jmp$1;
+  ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+  _free(_setjmpTable|0);
+  STACKTOP = sp;return;
+ }
+ else if ((label|0) == 577) {
+  _free(_setjmpTable|0);
+  STACKTOP = sp;return;
+ }
+ else if ((label|0) == 578) {
+  $3246 = HEAP16[$irep$7>>1]|0;
+  $3247 = $3246&65535;
+  $3248 = (($regs$4) + ($3247<<3)|0);
+  ;HEAP32[$agg$result>>2]=HEAP32[$3248>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$3248+4>>2]|0;
+  _free(_setjmpTable|0);
+  STACKTOP = sp;return;
+ }
+ else if ((label|0) == 591) {
+  // unreachable;
+ }
+}
+function _uvenv($mrb,$up) {
+ $mrb = $mrb|0;
+ $up = $up|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $e = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $up;
+ $3 = $1;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ((($5)) + 16|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ((($7)) + 4|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ((($9)) + 20|0);
+ $11 = HEAP32[$10>>2]|0;
+ $e = $11;
+ while(1) {
+  $12 = $2;
+  $13 = (($12) + -1)|0;
+  $2 = $13;
+  $14 = ($12|0)!=(0);
+  $15 = $e;
+  if (!($14)) {
+   label = 6;
+   break;
+  }
+  $16 = ($15|0)!=(0|0);
+  if (!($16)) {
+   label = 4;
+   break;
+  }
+  $17 = $e;
+  $18 = ((($17)) + 4|0);
+  $19 = HEAP32[$18>>2]|0;
+  $e = $19;
+ }
+ if ((label|0) == 4) {
+  $0 = 0;
+  $20 = $0;
+  STACKTOP = sp;return ($20|0);
+ }
+ else if ((label|0) == 6) {
+  $0 = $15;
+  $20 = $0;
+  STACKTOP = sp;return ($20|0);
+ }
+ return (0)|0;
+}
+function _ecall($mrb,$i) {
+ $mrb = $mrb|0;
+ $i = $i|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0;
+ var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0;
+ var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0;
+ var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0;
+ var $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0;
+ var $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $ci = 0, $exc = 0, $p = 0, $self = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 32|0;
+ $2 = sp;
+ $0 = $mrb;
+ $1 = $i;
+ $3 = $0;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ((($5)) + 4|0);
+ $7 = HEAP32[$6>>2]|0;
+ $self = $7;
+ $8 = $1;
+ $9 = ($8|0)<(0);
+ if ($9) {
+  STACKTOP = sp;return;
+ }
+ $10 = $1;
+ $11 = $0;
+ $12 = ((($11)) + 12|0);
+ $13 = HEAP32[$12>>2]|0;
+ $14 = ((($13)) + 36|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = (($15) + ($10<<2)|0);
+ $17 = HEAP32[$16>>2]|0;
+ $p = $17;
+ $18 = $p;
+ $19 = ($18|0)!=(0|0);
+ if (!($19)) {
+  STACKTOP = sp;return;
+ }
+ $20 = $0;
+ $21 = ((($20)) + 12|0);
+ $22 = HEAP32[$21>>2]|0;
+ $23 = ((($22)) + 16|0);
+ $24 = HEAP32[$23>>2]|0;
+ $25 = ((($24)) + 20|0);
+ $26 = HEAP32[$25>>2]|0;
+ $27 = $1;
+ $28 = ($26|0)>($27|0);
+ if ($28) {
+  $29 = $1;
+  $30 = $0;
+  $31 = ((($30)) + 12|0);
+  $32 = HEAP32[$31>>2]|0;
+  $33 = ((($32)) + 16|0);
+  $34 = HEAP32[$33>>2]|0;
+  $35 = ((($34)) + 20|0);
+  HEAP32[$35>>2] = $29;
+ }
+ $36 = $0;
+ $37 = (_cipush($36)|0);
+ $ci = $37;
+ $38 = $0;
+ $39 = ((($38)) + 12|0);
+ $40 = HEAP32[$39>>2]|0;
+ $41 = ((($40)) + 4|0);
+ $42 = HEAP32[$41>>2]|0;
+ $43 = $ci;
+ $44 = ((($43)) + 8|0);
+ HEAP32[$44>>2] = $42;
+ $45 = $ci;
+ $46 = ((($45)) + -48|0);
+ $47 = HEAP32[$46>>2]|0;
+ $48 = $ci;
+ HEAP32[$48>>2] = $47;
+ $49 = $ci;
+ $50 = ((($49)) + 40|0);
+ HEAP32[$50>>2] = -1;
+ $51 = $ci;
+ $52 = ((($51)) + 36|0);
+ HEAP32[$52>>2] = 0;
+ $53 = $p;
+ $54 = $ci;
+ $55 = ((($54)) + 4|0);
+ HEAP32[$55>>2] = $53;
+ $56 = $p;
+ $57 = ((($56)) + 12|0);
+ $58 = HEAP32[$57>>2]|0;
+ $59 = ((($58)) + 2|0);
+ $60 = HEAP16[$59>>1]|0;
+ $61 = $60&65535;
+ $62 = $ci;
+ $63 = ((($62)) + 12|0);
+ HEAP32[$63>>2] = $61;
+ $64 = $p;
+ $65 = ((($64)) + 16|0);
+ $66 = HEAP32[$65>>2]|0;
+ $67 = $ci;
+ $68 = ((($67)) + 44|0);
+ HEAP32[$68>>2] = $66;
+ $69 = $0;
+ $70 = ((($69)) + 12|0);
+ $71 = HEAP32[$70>>2]|0;
+ $72 = ((($71)) + 4|0);
+ $73 = HEAP32[$72>>2]|0;
+ $74 = $ci;
+ $75 = ((($74)) + -48|0);
+ $76 = ((($75)) + 12|0);
+ $77 = HEAP32[$76>>2]|0;
+ $78 = (($73) + ($77<<3)|0);
+ $79 = $0;
+ $80 = ((($79)) + 12|0);
+ $81 = HEAP32[$80>>2]|0;
+ $82 = ((($81)) + 4|0);
+ HEAP32[$82>>2] = $78;
+ $83 = $0;
+ $84 = ((($83)) + 20|0);
+ $85 = HEAP32[$84>>2]|0;
+ $exc = $85;
+ $86 = $0;
+ $87 = ((($86)) + 20|0);
+ HEAP32[$87>>2] = 0;
+ $88 = $0;
+ $89 = $p;
+ $90 = $self;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$90>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$90+4>>2]|0;
+ _mrb_run($2,$88,$89,$$byval_copy);
+ $91 = $1;
+ $92 = $0;
+ $93 = ((($92)) + 12|0);
+ $94 = HEAP32[$93>>2]|0;
+ $95 = ((($94)) + 36|0);
+ $96 = HEAP32[$95>>2]|0;
+ $97 = (($96) + ($91<<2)|0);
+ HEAP32[$97>>2] = 0;
+ $98 = $0;
+ $99 = ((($98)) + 20|0);
+ $100 = HEAP32[$99>>2]|0;
+ $101 = ($100|0)!=(0|0);
+ if ($101) {
+  STACKTOP = sp;return;
+ }
+ $102 = $exc;
+ $103 = $0;
+ $104 = ((($103)) + 20|0);
+ HEAP32[$104>>2] = $102;
+ STACKTOP = sp;return;
+}
+function _value_move($s1,$s2,$n) {
+ $s1 = $s1|0;
+ $s2 = $s2|0;
+ $n = $n|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s1;
+ $1 = $s2;
+ $2 = $n;
+ $3 = $0;
+ $4 = $1;
+ $5 = ($3>>>0)>($4>>>0);
+ if ($5) {
+  $6 = $0;
+  $7 = $1;
+  $8 = $2;
+  $9 = (($7) + ($8<<3)|0);
+  $10 = ($6>>>0)<($9>>>0);
+  if ($10) {
+   $11 = $2;
+   $12 = $0;
+   $13 = (($12) + ($11<<3)|0);
+   $0 = $13;
+   $14 = $2;
+   $15 = $1;
+   $16 = (($15) + ($14<<3)|0);
+   $1 = $16;
+   while(1) {
+    $17 = $2;
+    $18 = (($17) + -1)|0;
+    $2 = $18;
+    $19 = ($17>>>0)>(0);
+    if (!($19)) {
+     break;
+    }
+    $20 = $0;
+    $21 = ((($20)) + -8|0);
+    $0 = $21;
+    $22 = $1;
+    $23 = ((($22)) + -8|0);
+    $1 = $23;
+    ;HEAP32[$21>>2]=HEAP32[$23>>2]|0;HEAP32[$21+4>>2]=HEAP32[$23+4>>2]|0;
+   }
+   STACKTOP = sp;return;
+  }
+ }
+ $24 = $0;
+ $25 = $1;
+ $26 = ($24|0)!=($25|0);
+ if (!($26)) {
+  STACKTOP = sp;return;
+ }
+ while(1) {
+  $27 = $2;
+  $28 = (($27) + -1)|0;
+  $2 = $28;
+  $29 = ($27>>>0)>(0);
+  if (!($29)) {
+   break;
+  }
+  $30 = $0;
+  $31 = ((($30)) + 8|0);
+  $0 = $31;
+  $32 = $1;
+  $33 = ((($32)) + 8|0);
+  $1 = $33;
+  ;HEAP32[$30>>2]=HEAP32[$32>>2]|0;HEAP32[$30+4>>2]=HEAP32[$32+4>>2]|0;
+ }
+ STACKTOP = sp;return;
+}
+function _argnum_error($mrb,$num) {
+ $mrb = $mrb|0;
+ $num = $num|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exc = 0, $str = 0, $str$byval_copy = 0, $vararg_buffer = 0, $vararg_buffer3 = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 128|0;
+ $vararg_buffer3 = sp + 24|0;
+ $vararg_buffer = sp;
+ $exc = sp + 112|0;
+ $str = sp + 104|0;
+ $2 = sp + 96|0;
+ $3 = sp + 88|0;
+ $4 = sp + 80|0;
+ $5 = sp + 72|0;
+ $6 = sp + 64|0;
+ $7 = sp + 56|0;
+ $8 = sp + 48|0;
+ $9 = sp + 40|0;
+ $0 = $mrb;
+ $1 = $num;
+ $10 = $0;
+ $11 = ((($10)) + 12|0);
+ $12 = HEAP32[$11>>2]|0;
+ $13 = ((($12)) + 16|0);
+ $14 = HEAP32[$13>>2]|0;
+ $15 = HEAP32[$14>>2]|0;
+ $16 = ($15|0)!=(0);
+ $17 = $0;
+ $18 = $0;
+ if ($16) {
+  $19 = $0;
+  $20 = ((($19)) + 12|0);
+  $21 = HEAP32[$20>>2]|0;
+  $22 = ((($21)) + 16|0);
+  $23 = HEAP32[$22>>2]|0;
+  $24 = HEAP32[$23>>2]|0;
+  _mrb_sym2str($2,$18,$24);
+  $25 = $0;
+  $26 = ((($25)) + 12|0);
+  $27 = HEAP32[$26>>2]|0;
+  $28 = ((($27)) + 16|0);
+  $29 = HEAP32[$28>>2]|0;
+  $30 = ((($29)) + 36|0);
+  $31 = HEAP32[$30>>2]|0;
+  _mrb_fixnum_value_421($3,$31);
+  $32 = $1;
+  _mrb_fixnum_value_421($4,$32);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$2>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$2+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$2+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$2+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$2+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$2+7>>0]|0;
+  $vararg_ptr1 = ((($vararg_buffer)) + 8|0);
+  ;HEAP8[$vararg_ptr1>>0]=HEAP8[$3>>0]|0;HEAP8[$vararg_ptr1+1>>0]=HEAP8[$3+1>>0]|0;HEAP8[$vararg_ptr1+2>>0]=HEAP8[$3+2>>0]|0;HEAP8[$vararg_ptr1+3>>0]=HEAP8[$3+3>>0]|0;HEAP8[$vararg_ptr1+4>>0]=HEAP8[$3+4>>0]|0;HEAP8[$vararg_ptr1+5>>0]=HEAP8[$3+5>>0]|0;HEAP8[$vararg_ptr1+6>>0]=HEAP8[$3+6>>0]|0;HEAP8[$vararg_ptr1+7>>0]=HEAP8[$3+7>>0]|0;
+  $vararg_ptr2 = ((($vararg_buffer)) + 16|0);
+  ;HEAP8[$vararg_ptr2>>0]=HEAP8[$4>>0]|0;HEAP8[$vararg_ptr2+1>>0]=HEAP8[$4+1>>0]|0;HEAP8[$vararg_ptr2+2>>0]=HEAP8[$4+2>>0]|0;HEAP8[$vararg_ptr2+3>>0]=HEAP8[$4+3>>0]|0;HEAP8[$vararg_ptr2+4>>0]=HEAP8[$4+4>>0]|0;HEAP8[$vararg_ptr2+5>>0]=HEAP8[$4+5>>0]|0;HEAP8[$vararg_ptr2+6>>0]=HEAP8[$4+6>>0]|0;HEAP8[$vararg_ptr2+7>>0]=HEAP8[$4+7>>0]|0;
+  _mrb_format($5,$17,56509,$vararg_buffer);
+  ;HEAP32[$str>>2]=HEAP32[$5>>2]|0;HEAP32[$str+4>>2]=HEAP32[$5+4>>2]|0;
+  $40 = $0;
+  $41 = $0;
+  $42 = (_mrb_class_get($41,68855)|0);
+  ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+  _mrb_exc_new_str($9,$40,$42,$str$byval_copy);
+  ;HEAP32[$exc>>2]=HEAP32[$9>>2]|0;HEAP32[$exc+4>>2]=HEAP32[$9+4>>2]|0;
+  $43 = HEAP32[$exc>>2]|0;
+  $44 = $0;
+  $45 = ((($44)) + 20|0);
+  HEAP32[$45>>2] = $43;
+  STACKTOP = sp;return;
+ } else {
+  $33 = ((($18)) + 12|0);
+  $34 = HEAP32[$33>>2]|0;
+  $35 = ((($34)) + 16|0);
+  $36 = HEAP32[$35>>2]|0;
+  $37 = ((($36)) + 36|0);
+  $38 = HEAP32[$37>>2]|0;
+  _mrb_fixnum_value_421($6,$38);
+  $39 = $1;
+  _mrb_fixnum_value_421($7,$39);
+  ;HEAP8[$vararg_buffer3>>0]=HEAP8[$6>>0]|0;HEAP8[$vararg_buffer3+1>>0]=HEAP8[$6+1>>0]|0;HEAP8[$vararg_buffer3+2>>0]=HEAP8[$6+2>>0]|0;HEAP8[$vararg_buffer3+3>>0]=HEAP8[$6+3>>0]|0;HEAP8[$vararg_buffer3+4>>0]=HEAP8[$6+4>>0]|0;HEAP8[$vararg_buffer3+5>>0]=HEAP8[$6+5>>0]|0;HEAP8[$vararg_buffer3+6>>0]=HEAP8[$6+6>>0]|0;HEAP8[$vararg_buffer3+7>>0]=HEAP8[$6+7>>0]|0;
+  $vararg_ptr6 = ((($vararg_buffer3)) + 8|0);
+  ;HEAP8[$vararg_ptr6>>0]=HEAP8[$7>>0]|0;HEAP8[$vararg_ptr6+1>>0]=HEAP8[$7+1>>0]|0;HEAP8[$vararg_ptr6+2>>0]=HEAP8[$7+2>>0]|0;HEAP8[$vararg_ptr6+3>>0]=HEAP8[$7+3>>0]|0;HEAP8[$vararg_ptr6+4>>0]=HEAP8[$7+4>>0]|0;HEAP8[$vararg_ptr6+5>>0]=HEAP8[$7+5>>0]|0;HEAP8[$vararg_ptr6+6>>0]=HEAP8[$7+6>>0]|0;HEAP8[$vararg_ptr6+7>>0]=HEAP8[$7+7>>0]|0;
+  _mrb_format($8,$17,56553,$vararg_buffer3);
+  ;HEAP32[$str>>2]=HEAP32[$8>>2]|0;HEAP32[$str+4>>2]=HEAP32[$8+4>>2]|0;
+  $40 = $0;
+  $41 = $0;
+  $42 = (_mrb_class_get($41,68855)|0);
+  ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+  _mrb_exc_new_str($9,$40,$42,$str$byval_copy);
+  ;HEAP32[$exc>>2]=HEAP32[$9>>2]|0;HEAP32[$exc+4>>2]=HEAP32[$9+4>>2]|0;
+  $43 = HEAP32[$exc>>2]|0;
+  $44 = $0;
+  $45 = ((($44)) + 20|0);
+  HEAP32[$45>>2] = $43;
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_cptr_value($agg$result,$mrb,$p) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $mrb;
+ $1 = $p;
+ $2 = ((($v)) + 4|0);
+ HEAP32[$2>>2] = 7;
+ $3 = $1;
+ HEAP32[$v>>2] = $3;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _top_env($mrb,$proc) {
+ $mrb = $mrb|0;
+ $proc = $proc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0;
+ var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $e = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $proc;
+ $3 = $2;
+ $4 = ((($3)) + 20|0);
+ $5 = HEAP32[$4>>2]|0;
+ $e = $5;
+ $6 = $1;
+ $7 = $e;
+ $8 = (_is_strict($6,$7)|0);
+ $9 = ($8<<24>>24)!=(0);
+ if ($9) {
+  $10 = $e;
+  $0 = $10;
+  $23 = $0;
+  STACKTOP = sp;return ($23|0);
+ }
+ while(1) {
+  $11 = $e;
+  $12 = ((($11)) + 4|0);
+  $13 = HEAP32[$12>>2]|0;
+  $14 = ($13|0)!=(0|0);
+  $15 = $e;
+  if (!($14)) {
+   label = 6;
+   break;
+  }
+  $16 = ((($15)) + 4|0);
+  $17 = HEAP32[$16>>2]|0;
+  $e = $17;
+  $18 = $1;
+  $19 = $e;
+  $20 = (_is_strict($18,$19)|0);
+  $21 = ($20<<24>>24)!=(0);
+  if ($21) {
+   label = 5;
+   break;
+  }
+ }
+ if ((label|0) == 5) {
+  $22 = $e;
+  $0 = $22;
+  $23 = $0;
+  STACKTOP = sp;return ($23|0);
+ }
+ else if ((label|0) == 6) {
+  $0 = $15;
+  $23 = $0;
+  STACKTOP = sp;return ($23|0);
+ }
+ return (0)|0;
+}
+function _is_strict($mrb,$e) {
+ $mrb = $mrb|0;
+ $e = $e|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cioff = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $e;
+ $3 = $2;
+ $4 = ((($3)) + 20|0);
+ $5 = HEAP32[$4>>2]|0;
+ $cioff = $5;
+ $6 = $2;
+ $7 = ((($6)) + 20|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ($8|0)>=(0);
+ if ($9) {
+  $10 = $cioff;
+  $11 = $1;
+  $12 = ((($11)) + 12|0);
+  $13 = HEAP32[$12>>2]|0;
+  $14 = ((($13)) + 20|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = (($15) + (($10*48)|0)|0);
+  $17 = ((($16)) + 4|0);
+  $18 = HEAP32[$17>>2]|0;
+  $19 = ($18|0)!=(0|0);
+  if ($19) {
+   $20 = $cioff;
+   $21 = $1;
+   $22 = ((($21)) + 12|0);
+   $23 = HEAP32[$22>>2]|0;
+   $24 = ((($23)) + 20|0);
+   $25 = HEAP32[$24>>2]|0;
+   $26 = (($25) + (($20*48)|0)|0);
+   $27 = ((($26)) + 4|0);
+   $28 = HEAP32[$27>>2]|0;
+   $29 = HEAP32[$28>>2]|0;
+   $30 = $29 >>> 11;
+   $31 = $30 & 256;
+   $32 = ($31|0)!=(0);
+   if ($32) {
+    $0 = 1;
+    $33 = $0;
+    STACKTOP = sp;return ($33|0);
+   }
+  }
+ }
+ $0 = 0;
+ $33 = $0;
+ STACKTOP = sp;return ($33|0);
+}
+function _localjump_error($mrb,$kind) {
+ $mrb = $mrb|0;
+ $kind = $kind|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $exc = 0, $kind_str = 0, $kind_str_len = 0, $msg = 0, $msg$byval_copy = 0, $msg$byval_copy1 = 0, $msg$byval_copy2 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $msg$byval_copy2 = sp + 72|0;
+ $msg$byval_copy1 = sp + 64|0;
+ $msg$byval_copy = sp + 56|0;
+ $kind_str = sp + 83|0;
+ $kind_str_len = sp + 80|0;
+ $msg = sp + 40|0;
+ $exc = sp + 32|0;
+ $2 = sp + 24|0;
+ $3 = sp + 16|0;
+ $4 = sp + 8|0;
+ $5 = sp;
+ $0 = $mrb;
+ $1 = $kind;
+ dest=$kind_str; src=56591; stop=dest+21|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0));
+ ;HEAP8[$kind_str_len>>0]=HEAP8[56612>>0]|0;HEAP8[$kind_str_len+1>>0]=HEAP8[56612+1>>0]|0;HEAP8[$kind_str_len+2>>0]=HEAP8[56612+2>>0]|0;
+ $6 = $0;
+ _mrb_str_buf_new($2,$6,19);
+ ;HEAP32[$msg>>2]=HEAP32[$2>>2]|0;HEAP32[$msg+4>>2]=HEAP32[$2+4>>2]|0;
+ $7 = $0;
+ ;HEAP32[$msg$byval_copy>>2]=HEAP32[$msg>>2]|0;HEAP32[$msg$byval_copy+4>>2]=HEAP32[$msg+4>>2]|0;
+ _mrb_str_cat($3,$7,$msg$byval_copy,56615,11);
+ $8 = $0;
+ $9 = $1;
+ $10 = (($kind_str) + (($9*7)|0)|0);
+ $11 = $1;
+ $12 = (($kind_str_len) + ($11)|0);
+ $13 = HEAP8[$12>>0]|0;
+ $14 = $13 << 24 >> 24;
+ ;HEAP32[$msg$byval_copy1>>2]=HEAP32[$msg>>2]|0;HEAP32[$msg$byval_copy1+4>>2]=HEAP32[$msg+4>>2]|0;
+ _mrb_str_cat($4,$8,$msg$byval_copy1,$10,$14);
+ $15 = $0;
+ $16 = $0;
+ $17 = (_mrb_class_get($16,56627)|0);
+ ;HEAP32[$msg$byval_copy2>>2]=HEAP32[$msg>>2]|0;HEAP32[$msg$byval_copy2+4>>2]=HEAP32[$msg+4>>2]|0;
+ _mrb_exc_new_str($5,$15,$17,$msg$byval_copy2);
+ ;HEAP32[$exc>>2]=HEAP32[$5>>2]|0;HEAP32[$exc+4>>2]=HEAP32[$5+4>>2]|0;
+ $18 = HEAP32[$exc>>2]|0;
+ $19 = $0;
+ $20 = ((($19)) + 20|0);
+ HEAP32[$20>>2] = $18;
+ STACKTOP = sp;return;
+}
+function _mrb_int_add_overflow_439($augend,$addend,$sum) {
+ $augend = $augend|0;
+ $addend = $addend|0;
+ $sum = $sum|0;
+ var $$arith = 0, $$ispos = 0, $$negcheck = 0, $$negtemp = 0, $$poscheck = 0, $$postemp = 0, $$select = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $of = 0, $or$cond = 0, $val = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $augend;
+ $1 = $addend;
+ $2 = $sum;
+ $3 = $0;
+ $4 = $1;
+ $$arith = (($3) + ($4))|0;
+ $$postemp = (($3) + -2147483648)|0;
+ $$negtemp = (($3) + 2147483647)|0;
+ $$poscheck = ($$arith|0)<($$postemp|0);
+ $$negcheck = ($$arith|0)>($$negtemp|0);
+ $$ispos = ($3|0)>=(0);
+ $$select = $$ispos ? $$poscheck : $$negcheck;
+ $val = $$arith;
+ $5 = $val;
+ $6 = ($5|0)>(2147483647);
+ $or$cond = $$select | $6;
+ if ($or$cond) {
+  $10 = 1;
+ } else {
+  $7 = $val;
+  $8 = ($7|0)<(-2147483648);
+  $10 = $8;
+ }
+ $9 = $10&1;
+ $11 = $9&255;
+ $of = $11;
+ $12 = $val;
+ $13 = $2;
+ HEAP32[$13>>2] = $12;
+ $14 = $of;
+ STACKTOP = sp;return ($14|0);
+}
+function _mrb_int_sub_overflow_440($minuend,$subtrahend,$difference) {
+ $minuend = $minuend|0;
+ $subtrahend = $subtrahend|0;
+ $difference = $difference|0;
+ var $$arith = 0, $$ispos = 0, $$negcheck = 0, $$negtemp = 0, $$poscheck = 0, $$postemp = 0, $$select = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $of = 0, $or$cond = 0, $val = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $minuend;
+ $1 = $subtrahend;
+ $2 = $difference;
+ $3 = $0;
+ $4 = $1;
+ $$arith = (($3) - ($4))|0;
+ $$postemp = (($3) + -2147483647)|0;
+ $$negtemp = (($3) + -2147483648)|0;
+ $$poscheck = ($$arith|0)<($$postemp|0);
+ $$negcheck = ($$arith|0)>($$negtemp|0);
+ $$ispos = ($3|0)>=(0);
+ $$select = $$ispos ? $$poscheck : $$negcheck;
+ $val = $$arith;
+ $5 = $val;
+ $6 = ($5|0)>(2147483647);
+ $or$cond = $$select | $6;
+ if ($or$cond) {
+  $10 = 1;
+ } else {
+  $7 = $val;
+  $8 = ($7|0)<(-2147483648);
+  $10 = $8;
+ }
+ $9 = $10&1;
+ $11 = $9&255;
+ $of = $11;
+ $12 = $val;
+ $13 = $2;
+ HEAP32[$13>>2] = $12;
+ $14 = $of;
+ STACKTOP = sp;return ($14|0);
+}
+function _mrb_f_send($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0;
+ var $115 = 0, $116 = 0, $117 = 0, $118 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
+ var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0;
+ var $argc = 0, $argv = 0, $block = 0, $block$byval_copy = 0, $c = 0, $ci = 0, $i = 0, $len = 0, $name = 0, $p = 0, $regs = 0, $self$byval_copy = 0, $self$byval_copy4 = 0, $self$byval_copy5 = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr3 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy5 = sp + 104|0;
+ $$byval_copy = sp + 96|0;
+ $block$byval_copy = sp + 88|0;
+ $self$byval_copy4 = sp + 80|0;
+ $self$byval_copy = sp + 72|0;
+ $vararg_buffer = sp;
+ $name = sp + 64|0;
+ $block = sp + 56|0;
+ $argv = sp + 52|0;
+ $argc = sp + 44|0;
+ $c = sp + 28|0;
+ $1 = sp + 16|0;
+ $0 = $mrb;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $name;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $argv;
+ $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+ HEAP32[$vararg_ptr2>>2] = $argc;
+ $vararg_ptr3 = ((($vararg_buffer)) + 12|0);
+ HEAP32[$vararg_ptr3>>2] = $block;
+ (_mrb_get_args($2,56712,$vararg_buffer)|0);
+ $3 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ $4 = (_mrb_class_423($3,$self$byval_copy)|0);
+ HEAP32[$c>>2] = $4;
+ $5 = $0;
+ $6 = HEAP32[$name>>2]|0;
+ $7 = (_mrb_method_search_vm($5,$c,$6)|0);
+ $p = $7;
+ $8 = $p;
+ $9 = ($8|0)!=(0|0);
+ $10 = $0;
+ if (!($9)) {
+  $11 = HEAP32[$name>>2]|0;
+  $12 = HEAP32[$argc>>2]|0;
+  $13 = HEAP32[$argv>>2]|0;
+  ;HEAP32[$self$byval_copy4>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy4+4>>2]=HEAP32[$self+4>>2]|0;
+  ;HEAP32[$block$byval_copy>>2]=HEAP32[$block>>2]|0;HEAP32[$block$byval_copy+4>>2]=HEAP32[$block+4>>2]|0;
+  _mrb_funcall_with_block($agg$result,$10,$self$byval_copy4,$11,$12,$13,$block$byval_copy);
+  STACKTOP = sp;return;
+ }
+ $14 = ((($10)) + 12|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = ((($15)) + 16|0);
+ $17 = HEAP32[$16>>2]|0;
+ $ci = $17;
+ $18 = HEAP32[$name>>2]|0;
+ $19 = $ci;
+ HEAP32[$19>>2] = $18;
+ $20 = HEAP32[$c>>2]|0;
+ $21 = $ci;
+ $22 = ((($21)) + 44|0);
+ HEAP32[$22>>2] = $20;
+ $23 = $p;
+ $24 = $ci;
+ $25 = ((($24)) + 4|0);
+ HEAP32[$25>>2] = $23;
+ $26 = $0;
+ $27 = ((($26)) + 12|0);
+ $28 = HEAP32[$27>>2]|0;
+ $29 = ((($28)) + 4|0);
+ $30 = HEAP32[$29>>2]|0;
+ $31 = ((($30)) + 8|0);
+ $regs = $31;
+ $32 = $ci;
+ $33 = ((($32)) + 36|0);
+ $34 = HEAP32[$33>>2]|0;
+ $35 = ($34|0)>=(0);
+ if ($35) {
+  $i = 0;
+  $36 = $ci;
+  $37 = ((($36)) + 36|0);
+  $38 = HEAP32[$37>>2]|0;
+  $len = $38;
+  while(1) {
+   $39 = $i;
+   $40 = $len;
+   $41 = ($39|0)<($40|0);
+   if (!($41)) {
+    break;
+   }
+   $42 = $i;
+   $43 = $regs;
+   $44 = (($43) + ($42<<3)|0);
+   $45 = $i;
+   $46 = (($45) + 1)|0;
+   $47 = $regs;
+   $48 = (($47) + ($46<<3)|0);
+   ;HEAP32[$44>>2]=HEAP32[$48>>2]|0;HEAP32[$44+4>>2]=HEAP32[$48+4>>2]|0;
+   $49 = $i;
+   $50 = (($49) + 1)|0;
+   $i = $50;
+  }
+  $51 = $ci;
+  $52 = ((($51)) + 36|0);
+  $53 = HEAP32[$52>>2]|0;
+  $54 = (($53) + -1)|0;
+  HEAP32[$52>>2] = $54;
+ } else {
+  $55 = $0;
+  $56 = $regs;
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$56>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$56+4>>2]|0;
+  _mrb_ary_shift($1,$55,$$byval_copy);
+ }
+ $57 = $p;
+ $58 = HEAP32[$57>>2]|0;
+ $59 = $58 >>> 11;
+ $60 = $59 & 128;
+ $61 = ($60|0)!=(0);
+ if ($61) {
+  $62 = $p;
+  $63 = ((($62)) + 12|0);
+  $64 = HEAP32[$63>>2]|0;
+  $65 = $0;
+  ;HEAP32[$self$byval_copy5>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy5+4>>2]=HEAP32[$self+4>>2]|0;
+  FUNCTION_TABLE_viii[$64 & 511]($agg$result,$65,$self$byval_copy5);
+  STACKTOP = sp;return;
+ }
+ $66 = $ci;
+ $67 = ((($66)) + 36|0);
+ $68 = HEAP32[$67>>2]|0;
+ $69 = ($68|0)<(0);
+ $70 = $0;
+ $71 = $p;
+ $72 = ((($71)) + 12|0);
+ $73 = HEAP32[$72>>2]|0;
+ $74 = ((($73)) + 2|0);
+ $75 = HEAP16[$74>>1]|0;
+ $76 = $75&65535;
+ if ($69) {
+  $77 = ($76|0)<(3);
+  if ($77) {
+   $84 = 3;
+  } else {
+   $78 = $p;
+   $79 = ((($78)) + 12|0);
+   $80 = HEAP32[$79>>2]|0;
+   $81 = ((($80)) + 2|0);
+   $82 = HEAP16[$81>>1]|0;
+   $83 = $82&65535;
+   $84 = $83;
+  }
+  _stack_extend($70,$84,3);
+ } else {
+  $85 = $ci;
+  $86 = ((($85)) + 36|0);
+  $87 = HEAP32[$86>>2]|0;
+  $88 = (($87) + 2)|0;
+  _stack_extend($70,$76,$88);
+ }
+ $89 = $p;
+ $90 = ((($89)) + 12|0);
+ $91 = HEAP32[$90>>2]|0;
+ $92 = ((($91)) + 2|0);
+ $93 = HEAP16[$92>>1]|0;
+ $94 = $93&65535;
+ $95 = $ci;
+ $96 = ((($95)) + 12|0);
+ HEAP32[$96>>2] = $94;
+ $97 = $0;
+ $98 = (_cipush($97)|0);
+ $ci = $98;
+ $99 = $ci;
+ $100 = ((($99)) + 12|0);
+ HEAP32[$100>>2] = 0;
+ $101 = $ci;
+ $102 = ((($101)) + 44|0);
+ HEAP32[$102>>2] = 0;
+ $103 = $p;
+ $104 = ((($103)) + 12|0);
+ $105 = HEAP32[$104>>2]|0;
+ $106 = ((($105)) + 8|0);
+ $107 = HEAP32[$106>>2]|0;
+ $108 = $ci;
+ $109 = ((($108)) + 28|0);
+ HEAP32[$109>>2] = $107;
+ $110 = $0;
+ $111 = ((($110)) + 12|0);
+ $112 = HEAP32[$111>>2]|0;
+ $113 = ((($112)) + 4|0);
+ $114 = HEAP32[$113>>2]|0;
+ $115 = $ci;
+ $116 = ((($115)) + 8|0);
+ HEAP32[$116>>2] = $114;
+ $117 = $ci;
+ $118 = ((($117)) + 40|0);
+ HEAP32[$118>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_mod_module_eval($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $a = 0, $b = 0, $b$byval_copy = 0, $mod$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $b$byval_copy = sp + 40|0;
+ $mod$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $a = sp + 16|0;
+ $b = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $a;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $b;
+ $2 = (_mrb_get_args($1,56716,$vararg_buffer)|0);
+ $3 = ($2|0)==(1);
+ $4 = $0;
+ if ($3) {
+  $5 = $0;
+  $6 = (_mrb_class_get($5,64809)|0);
+  _mrb_raise($4,$6,56720);
+  // unreachable;
+ } else {
+  $7 = HEAP32[$mod>>2]|0;
+  ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+  ;HEAP32[$b$byval_copy>>2]=HEAP32[$b>>2]|0;HEAP32[$b$byval_copy+4>>2]=HEAP32[$b+4>>2]|0;
+  _eval_under($agg$result,$4,$mod$byval_copy,$b$byval_copy,$7);
+  STACKTOP = sp;return;
+ }
+}
+function _eval_under($agg$result,$mrb,$self,$blk,$c) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ $blk = $blk|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $7 = 0, $8 = 0, $9 = 0, $blk$byval_copy = 0, $ci = 0, $p = 0, $self$byval_copy = 0, $self$byval_copy1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy1 = sp + 32|0;
+ $self$byval_copy = sp + 24|0;
+ $blk$byval_copy = sp + 16|0;
+ $0 = $mrb;
+ $1 = $c;
+ $2 = ((($blk)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)==(0);
+ if ($4) {
+  $5 = HEAP32[$blk>>2]|0;
+  $6 = ($5|0)!=(0);
+  if (!($6)) {
+   $7 = $0;
+   $8 = $0;
+   $9 = (_mrb_class_get($8,68855)|0);
+   _mrb_raise($7,$9,68606);
+   // unreachable;
+  }
+ }
+ $10 = $0;
+ $11 = ((($10)) + 12|0);
+ $12 = HEAP32[$11>>2]|0;
+ $13 = ((($12)) + 16|0);
+ $14 = HEAP32[$13>>2]|0;
+ $ci = $14;
+ $15 = $ci;
+ $16 = ((($15)) + 40|0);
+ $17 = HEAP32[$16>>2]|0;
+ $18 = ($17|0)==(-2);
+ if ($18) {
+  $19 = $0;
+  $20 = $1;
+  ;HEAP32[$blk$byval_copy>>2]=HEAP32[$blk>>2]|0;HEAP32[$blk$byval_copy+4>>2]=HEAP32[$blk+4>>2]|0;
+  ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+  _mrb_yield_with_class($agg$result,$19,$blk$byval_copy,0,0,$self$byval_copy,$20);
+  STACKTOP = sp;return;
+ }
+ $21 = $1;
+ $22 = $ci;
+ $23 = ((($22)) + 44|0);
+ HEAP32[$23>>2] = $21;
+ $24 = HEAP32[$blk>>2]|0;
+ $p = $24;
+ $25 = $p;
+ $26 = $ci;
+ $27 = ((($26)) + 4|0);
+ HEAP32[$27>>2] = $25;
+ $28 = $p;
+ $29 = HEAP32[$28>>2]|0;
+ $30 = $29 >>> 11;
+ $31 = $30 & 128;
+ $32 = ($31|0)!=(0);
+ $33 = $p;
+ $34 = ((($33)) + 12|0);
+ if ($32) {
+  $35 = HEAP32[$34>>2]|0;
+  $36 = $0;
+  ;HEAP32[$self$byval_copy1>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy1+4>>2]=HEAP32[$self+4>>2]|0;
+  FUNCTION_TABLE_viii[$35 & 511]($agg$result,$36,$self$byval_copy1);
+  STACKTOP = sp;return;
+ } else {
+  $37 = HEAP32[$34>>2]|0;
+  $38 = ((($37)) + 2|0);
+  $39 = HEAP16[$38>>1]|0;
+  $40 = $39&65535;
+  $41 = $ci;
+  $42 = ((($41)) + 12|0);
+  HEAP32[$42>>2] = $40;
+  $43 = $0;
+  $44 = (_cipush($43)|0);
+  $ci = $44;
+  $45 = $ci;
+  $46 = ((($45)) + 12|0);
+  HEAP32[$46>>2] = 0;
+  $47 = $ci;
+  $48 = ((($47)) + 44|0);
+  HEAP32[$48>>2] = 0;
+  $49 = $p;
+  $50 = ((($49)) + 12|0);
+  $51 = HEAP32[$50>>2]|0;
+  $52 = ((($51)) + 8|0);
+  $53 = HEAP32[$52>>2]|0;
+  $54 = $ci;
+  $55 = ((($54)) + 28|0);
+  HEAP32[$55>>2] = $53;
+  $56 = $0;
+  $57 = ((($56)) + 12|0);
+  $58 = HEAP32[$57>>2]|0;
+  $59 = ((($58)) + 4|0);
+  $60 = HEAP32[$59>>2]|0;
+  $61 = $ci;
+  $62 = ((($61)) + 8|0);
+  HEAP32[$62>>2] = $60;
+  $63 = $ci;
+  $64 = ((($63)) + 40|0);
+  HEAP32[$64>>2] = 0;
+  ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_yield_with_class($agg$result,$mrb,$b,$argc,$argv,$self,$c) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $b = $b|0;
+ $argc = $argc|0;
+ $argv = $argv|0;
+ $self = $self|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0;
+ var $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0;
+ var $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0;
+ var $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0;
+ var $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $ci = 0, $mid = 0, $n = 0, $p = 0, $self$byval_copy = 0;
+ var $self$byval_copy1 = 0, $val = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy1 = sp + 72|0;
+ $self$byval_copy = sp + 64|0;
+ $val = sp + 24|0;
+ $4 = sp + 16|0;
+ $5 = sp + 8|0;
+ $6 = sp;
+ $0 = $mrb;
+ $1 = $argc;
+ $2 = $argv;
+ $3 = $c;
+ $7 = $0;
+ $8 = ((($7)) + 12|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ((($9)) + 16|0);
+ $11 = HEAP32[$10>>2]|0;
+ $12 = HEAP32[$11>>2]|0;
+ $mid = $12;
+ $13 = $0;
+ $14 = ((($13)) + 12|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = ((($15)) + 16|0);
+ $17 = HEAP32[$16>>2]|0;
+ $18 = ((($17)) + 12|0);
+ $19 = HEAP32[$18>>2]|0;
+ $n = $19;
+ $20 = ((($b)) + 4|0);
+ $21 = HEAP32[$20>>2]|0;
+ $22 = ($21|0)==(0);
+ if ($22) {
+  $23 = HEAP32[$b>>2]|0;
+  $24 = ($23|0)!=(0);
+  if (!($24)) {
+   $25 = $0;
+   $26 = $0;
+   $27 = (_mrb_class_get($26,68855)|0);
+   _mrb_raise($25,$27,68606);
+   // unreachable;
+  }
+ }
+ $28 = HEAP32[$b>>2]|0;
+ $p = $28;
+ $29 = $0;
+ $30 = (_cipush($29)|0);
+ $ci = $30;
+ $31 = $mid;
+ $32 = $ci;
+ HEAP32[$32>>2] = $31;
+ $33 = $p;
+ $34 = $ci;
+ $35 = ((($34)) + 4|0);
+ HEAP32[$35>>2] = $33;
+ $36 = $0;
+ $37 = ((($36)) + 12|0);
+ $38 = HEAP32[$37>>2]|0;
+ $39 = ((($38)) + 4|0);
+ $40 = HEAP32[$39>>2]|0;
+ $41 = $ci;
+ $42 = ((($41)) + 8|0);
+ HEAP32[$42>>2] = $40;
+ $43 = $1;
+ $44 = $ci;
+ $45 = ((($44)) + 36|0);
+ HEAP32[$45>>2] = $43;
+ $46 = $3;
+ $47 = $ci;
+ $48 = ((($47)) + 44|0);
+ HEAP32[$48>>2] = $46;
+ $49 = $ci;
+ $50 = ((($49)) + 40|0);
+ HEAP32[$50>>2] = -1;
+ $51 = $0;
+ $52 = ((($51)) + 12|0);
+ $53 = HEAP32[$52>>2]|0;
+ $54 = ((($53)) + 4|0);
+ $55 = HEAP32[$54>>2]|0;
+ $56 = $n;
+ $57 = (($55) + ($56<<3)|0);
+ $58 = $0;
+ $59 = ((($58)) + 12|0);
+ $60 = HEAP32[$59>>2]|0;
+ $61 = ((($60)) + 4|0);
+ HEAP32[$61>>2] = $57;
+ $62 = $p;
+ $63 = HEAP32[$62>>2]|0;
+ $64 = $63 >>> 11;
+ $65 = $64 & 128;
+ $66 = ($65|0)!=(0);
+ if ($66) {
+  $67 = $1;
+  $68 = (($67) + 2)|0;
+  $69 = $ci;
+  $70 = ((($69)) + 12|0);
+  HEAP32[$70>>2] = $68;
+  $71 = $0;
+  $72 = $ci;
+  $73 = ((($72)) + 12|0);
+  $74 = HEAP32[$73>>2]|0;
+  _stack_extend($71,$74,0);
+ } else {
+  $75 = $p;
+  $76 = ((($75)) + 12|0);
+  $77 = HEAP32[$76>>2]|0;
+  $78 = ((($77)) + 2|0);
+  $79 = HEAP16[$78>>1]|0;
+  $80 = $79&65535;
+  $81 = $ci;
+  $82 = ((($81)) + 12|0);
+  HEAP32[$82>>2] = $80;
+  $83 = $0;
+  $84 = $ci;
+  $85 = ((($84)) + 12|0);
+  $86 = HEAP32[$85>>2]|0;
+  $87 = $1;
+  $88 = (($87) + 2)|0;
+  _stack_extend($83,$86,$88);
+ }
+ $89 = $0;
+ $90 = ((($89)) + 12|0);
+ $91 = HEAP32[$90>>2]|0;
+ $92 = ((($91)) + 4|0);
+ $93 = HEAP32[$92>>2]|0;
+ ;HEAP32[$93>>2]=HEAP32[$self>>2]|0;HEAP32[$93+4>>2]=HEAP32[$self+4>>2]|0;
+ $94 = $1;
+ $95 = ($94|0)>(0);
+ if ($95) {
+  $96 = $0;
+  $97 = ((($96)) + 12|0);
+  $98 = HEAP32[$97>>2]|0;
+  $99 = ((($98)) + 4|0);
+  $100 = HEAP32[$99>>2]|0;
+  $101 = ((($100)) + 8|0);
+  $102 = $2;
+  $103 = $1;
+  _stack_copy($101,$102,$103);
+ }
+ $104 = $1;
+ $105 = (($104) + 1)|0;
+ $106 = $0;
+ $107 = ((($106)) + 12|0);
+ $108 = HEAP32[$107>>2]|0;
+ $109 = ((($108)) + 4|0);
+ $110 = HEAP32[$109>>2]|0;
+ $111 = (($110) + ($105<<3)|0);
+ _mrb_nil_value_419($4);
+ ;HEAP32[$111>>2]=HEAP32[$4>>2]|0;HEAP32[$111+4>>2]=HEAP32[$4+4>>2]|0;
+ $112 = $p;
+ $113 = HEAP32[$112>>2]|0;
+ $114 = $113 >>> 11;
+ $115 = $114 & 128;
+ $116 = ($115|0)!=(0);
+ if ($116) {
+  $117 = $p;
+  $118 = ((($117)) + 12|0);
+  $119 = HEAP32[$118>>2]|0;
+  $120 = $0;
+  ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+  FUNCTION_TABLE_viii[$119 & 511]($5,$120,$self$byval_copy);
+  ;HEAP32[$val>>2]=HEAP32[$5>>2]|0;HEAP32[$val+4>>2]=HEAP32[$5+4>>2]|0;
+  $121 = $0;
+  $122 = ((($121)) + 12|0);
+  $123 = HEAP32[$122>>2]|0;
+  $124 = ((($123)) + 16|0);
+  $125 = HEAP32[$124>>2]|0;
+  $126 = ((($125)) + 8|0);
+  $127 = HEAP32[$126>>2]|0;
+  $128 = $0;
+  $129 = ((($128)) + 12|0);
+  $130 = HEAP32[$129>>2]|0;
+  $131 = ((($130)) + 4|0);
+  HEAP32[$131>>2] = $127;
+  $132 = $0;
+  _cipop($132);
+  ;HEAP32[$agg$result>>2]=HEAP32[$val>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$val+4>>2]|0;
+  STACKTOP = sp;return;
+ } else {
+  $133 = $0;
+  $134 = $p;
+  ;HEAP32[$self$byval_copy1>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy1+4>>2]=HEAP32[$self+4>>2]|0;
+  _mrb_run($6,$133,$134,$self$byval_copy1);
+  ;HEAP32[$val>>2]=HEAP32[$6>>2]|0;HEAP32[$val+4>>2]=HEAP32[$6+4>>2]|0;
+  ;HEAP32[$agg$result>>2]=HEAP32[$val>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$val+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_obj_instance_eval($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, $b = 0, $b$byval_copy = 0, $c = 0, $cv = 0, $self$byval_copy = 0;
+ var $self$byval_copy2 = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $b$byval_copy = sp + 72|0;
+ $self$byval_copy2 = sp + 64|0;
+ $self$byval_copy = sp + 56|0;
+ $vararg_buffer = sp;
+ $a = sp + 40|0;
+ $b = sp + 32|0;
+ $cv = sp + 24|0;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $a;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $b;
+ $3 = (_mrb_get_args($2,56716,$vararg_buffer)|0);
+ $4 = ($3|0)==(1);
+ if ($4) {
+  $5 = $0;
+  $6 = $0;
+  $7 = (_mrb_class_get($6,64809)|0);
+  _mrb_raise($5,$7,56771);
+  // unreachable;
+ }
+ $8 = ((($self)) + 4|0);
+ $9 = HEAP32[$8>>2]|0;
+ switch ($9|0) {
+ case 6: case 3: case 4:  {
+  $c = 0;
+  break;
+ }
+ default: {
+  $10 = $0;
+  ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+  _mrb_singleton_class($1,$10,$self$byval_copy);
+  ;HEAP32[$cv>>2]=HEAP32[$1>>2]|0;HEAP32[$cv+4>>2]=HEAP32[$1+4>>2]|0;
+  $11 = HEAP32[$cv>>2]|0;
+  $c = $11;
+ }
+ }
+ $12 = $0;
+ $13 = $c;
+ ;HEAP32[$self$byval_copy2>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy2+4>>2]=HEAP32[$self+4>>2]|0;
+ ;HEAP32[$b$byval_copy>>2]=HEAP32[$b>>2]|0;HEAP32[$b$byval_copy+4>>2]=HEAP32[$b+4>>2]|0;
+ _eval_under($agg$result,$12,$self$byval_copy2,$b$byval_copy,$13);
+ STACKTOP = sp;return;
+}
+function _mrb_toplevel_run_keep($agg$result,$mrb,$proc,$stack_keep) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $proc = $proc|0;
+ $stack_keep = $stack_keep|0;
+ var $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ci = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy1 = sp + 56|0;
+ $$byval_copy = sp + 48|0;
+ $v = sp + 24|0;
+ $3 = sp + 16|0;
+ $4 = sp + 8|0;
+ $5 = sp;
+ $0 = $mrb;
+ $1 = $proc;
+ $2 = $stack_keep;
+ $6 = $0;
+ $7 = ((($6)) + 12|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ((($8)) + 20|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = ($10|0)!=(0|0);
+ if ($11) {
+  $12 = $0;
+  $13 = ((($12)) + 12|0);
+  $14 = HEAP32[$13>>2]|0;
+  $15 = ((($14)) + 16|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = $0;
+  $18 = ((($17)) + 12|0);
+  $19 = HEAP32[$18>>2]|0;
+  $20 = ((($19)) + 20|0);
+  $21 = HEAP32[$20>>2]|0;
+  $22 = ($16|0)==($21|0);
+  if (!($22)) {
+   $27 = $0;
+   $28 = (_cipush($27)|0);
+   $ci = $28;
+   $29 = $ci;
+   $30 = ((($29)) + 12|0);
+   HEAP32[$30>>2] = 1;
+   $31 = $ci;
+   $32 = ((($31)) + 40|0);
+   HEAP32[$32>>2] = -1;
+   $33 = $0;
+   $34 = ((($33)) + 32|0);
+   $35 = HEAP32[$34>>2]|0;
+   $36 = $ci;
+   $37 = ((($36)) + 44|0);
+   HEAP32[$37>>2] = $35;
+   $38 = $0;
+   $39 = $1;
+   $40 = $0;
+   _mrb_top_self($4,$40);
+   $41 = $2;
+   ;HEAP32[$$byval_copy1>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$4+4>>2]|0;
+   _mrb_context_run($5,$38,$39,$$byval_copy1,$41);
+   ;HEAP32[$v>>2]=HEAP32[$5>>2]|0;HEAP32[$v+4>>2]=HEAP32[$5+4>>2]|0;
+   $42 = $0;
+   _cipop($42);
+   ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+ }
+ $23 = $0;
+ $24 = $1;
+ $25 = $0;
+ _mrb_top_self($3,$25);
+ $26 = $2;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
+ _mrb_context_run($agg$result,$23,$24,$$byval_copy,$26);
+ STACKTOP = sp;return;
+}
+function _mrb_parser_parse($p,$c) {
+ $p = $p|0;
+ $c = $c|0;
+ var $$reg2mem24$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $buf = 0, $cond = 0, $cond26 = 0, $cond27 = 0, $cond28 = 0, $cond29 = 0;
+ var $cond30 = 0, $cond31 = 0, _setjmpTable = 0, _setjmpTableSize = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ _setjmpTableSize = 4;_setjmpTable = _malloc(40) | 0;HEAP32[_setjmpTable>>2]=0;
+ $buf = sp;
+ $0 = ((($p)) + 1404|0);
+ HEAP32[$0>>2] = $buf;
+ $1 = ((($p)) + 1404|0);
+ $2 = HEAP32[$1>>2]|0;
+ _setjmpTable = _saveSetjmp($2,1,_setjmpTable|0,_setjmpTableSize|0)|0;_setjmpTableSize = tempRet0;
+ __THREW__ = 0;
+ $3 = __THREW__; __THREW__ = 0;
+ if ((($3|0) != 0) & ((threwValue|0) != 0)) { $4 = _testSetjmp(HEAP32[$3>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($4|0) == 0) { _longjmp($3|0, threwValue|0); } tempRet0 = (threwValue); } else { $4 = -1; };
+ $5 = tempRet0;
+ $cond = ($4|0)==(1);
+ if ($cond) {
+  $$reg2mem24$0 = $5;
+ } else {
+  $$reg2mem24$0 = 0;
+ }
+ while(1) {
+  $6 = ($$reg2mem24$0|0)==(0);
+  if (!($6)) {
+   __THREW__ = 0;
+   invoke_vii(207,($p|0),(64154|0));
+   $46 = __THREW__; __THREW__ = 0;
+   if ((($46|0) != 0) & ((threwValue|0) != 0)) { $47 = _testSetjmp(HEAP32[$46>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($47|0) == 0) { _longjmp($46|0, threwValue|0); } tempRet0 = (threwValue); } else { $47 = -1; };
+   $48 = tempRet0;
+   $cond26 = ($47|0)==(1);
+   if ($cond26) {
+    $$reg2mem24$0 = $48;
+    continue;
+   } else {
+    label = 15;
+    break;
+   }
+  }
+  $7 = ((($p)) + 72|0);
+  $8 = HEAP8[$7>>0]|0;
+  $9 = $8 & -2;
+  $10 = $9 | 1;
+  HEAP8[$7>>0] = $10;
+  $11 = ((($p)) + 68|0);
+  HEAP32[$11>>2] = 0;
+  $12 = ((($p)) + 64|0);
+  HEAP32[$12>>2] = 0;
+  $13 = ((($p)) + 1140|0);
+  HEAP32[$13>>2] = 0;
+  $14 = ((($p)) + 1136|0);
+  HEAP32[$14>>2] = 0;
+  $15 = ((($p)) + 44|0);
+  HEAP32[$15>>2] = 0;
+  __THREW__ = 0;
+  invoke_vii(202,($p|0),($c|0));
+  $16 = __THREW__; __THREW__ = 0;
+  if ((($16|0) != 0) & ((threwValue|0) != 0)) { $17 = _testSetjmp(HEAP32[$16>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($17|0) == 0) { _longjmp($16|0, threwValue|0); } tempRet0 = (threwValue); } else { $17 = -1; };
+  $18 = tempRet0;
+  $cond27 = ($17|0)==(1);
+  if ($cond27) {
+   $$reg2mem24$0 = $18;
+   continue;
+  }
+  __THREW__ = 0;
+  (invoke_ii(203,($p|0))|0);
+  $19 = __THREW__; __THREW__ = 0;
+  if ((($19|0) != 0) & ((threwValue|0) != 0)) { $20 = _testSetjmp(HEAP32[$19>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($20|0) == 0) { _longjmp($19|0, threwValue|0); } tempRet0 = (threwValue); } else { $20 = -1; };
+  $21 = tempRet0;
+  $cond28 = ($20|0)==(1);
+  if ($cond28) {
+   $$reg2mem24$0 = $21;
+   continue;
+  }
+  $22 = ((($p)) + 1144|0);
+  $23 = HEAP32[$22>>2]|0;
+  $24 = ($23|0)!=(0|0);
+  if (!($24)) {
+   __THREW__ = 0;
+   $25 = (invoke_ii(204,($p|0))|0);
+   $26 = __THREW__; __THREW__ = 0;
+   if ((($26|0) != 0) & ((threwValue|0) != 0)) { $27 = _testSetjmp(HEAP32[$26>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($27|0) == 0) { _longjmp($26|0, threwValue|0); } tempRet0 = (threwValue); } else { $27 = -1; };
+   $28 = tempRet0;
+   $cond29 = ($27|0)==(1);
+   if ($cond29) {
+    $$reg2mem24$0 = $28;
+    continue;
+   }
+   $29 = ((($p)) + 1144|0);
+   HEAP32[$29>>2] = $25;
+  }
+  __THREW__ = 0;
+  invoke_vii(205,($p|0),($c|0));
+  $30 = __THREW__; __THREW__ = 0;
+  if ((($30|0) != 0) & ((threwValue|0) != 0)) { $31 = _testSetjmp(HEAP32[$30>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($31|0) == 0) { _longjmp($30|0, threwValue|0); } tempRet0 = (threwValue); } else { $31 = -1; };
+  $32 = tempRet0;
+  $cond30 = ($31|0)==(1);
+  if ($cond30) {
+   $$reg2mem24$0 = $32;
+   continue;
+  }
+  $33 = ($c|0)!=(0|0);
+  if (!($33)) {
+   label = 16;
+   break;
+  }
+  $34 = ((($c)) + 28|0);
+  $35 = HEAP8[$34>>0]|0;
+  $36 = ($35&255) >>> 1;
+  $37 = $36 & 1;
+  $38 = $37&255;
+  $39 = ($38|0)!=(0);
+  if (!($39)) {
+   label = 16;
+   break;
+  }
+  $40 = HEAP32[$p>>2]|0;
+  $41 = ((($p)) + 1144|0);
+  $42 = HEAP32[$41>>2]|0;
+  __THREW__ = 0;
+  invoke_viii(206,($40|0),($42|0),0);
+  $43 = __THREW__; __THREW__ = 0;
+  if ((($43|0) != 0) & ((threwValue|0) != 0)) { $44 = _testSetjmp(HEAP32[$43>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($44|0) == 0) { _longjmp($43|0, threwValue|0); } tempRet0 = (threwValue); } else { $44 = -1; };
+  $45 = tempRet0;
+  $cond31 = ($44|0)==(1);
+  if ($cond31) {
+   $$reg2mem24$0 = $45;
+  } else {
+   label = 13;
+   break;
+  }
+ }
+ if ((label|0) == 13) {
+  _free(_setjmpTable|0);
+  STACKTOP = sp;return;
+ }
+ else if ((label|0) == 15) {
+  $49 = ((($p)) + 1136|0);
+  $50 = HEAP32[$49>>2]|0;
+  $51 = (($50) + 1)|0;
+  HEAP32[$49>>2] = $51;
+  $52 = ((($p)) + 1144|0);
+  HEAP32[$52>>2] = 0;
+  _free(_setjmpTable|0);
+  STACKTOP = sp;return;
+ }
+ else if ((label|0) == 16) {
+  _free(_setjmpTable|0);
+  STACKTOP = sp;return;
+ }
+}
+function _parser_init_cxt($p,$cxt) {
+ $p = $p|0;
+ $cxt = $cxt|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $8 = 0, $9 = 0, $i = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $cxt;
+ $2 = $1;
+ $3 = ($2|0)!=(0|0);
+ if (!($3)) {
+  STACKTOP = sp;return;
+ }
+ $4 = $1;
+ $5 = ((($4)) + 8|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = ($6|0)!=(0|0);
+ if ($7) {
+  $8 = $0;
+  $9 = $1;
+  $10 = ((($9)) + 8|0);
+  $11 = HEAP32[$10>>2]|0;
+  _mrb_parser_set_filename($8,$11);
+ }
+ $12 = $1;
+ $13 = ((($12)) + 12|0);
+ $14 = HEAP16[$13>>1]|0;
+ $15 = ($14<<16>>16)!=(0);
+ if ($15) {
+  $16 = $1;
+  $17 = ((($16)) + 12|0);
+  $18 = HEAP16[$17>>1]|0;
+  $19 = $18 << 16 >> 16;
+  $20 = $0;
+  $21 = ((($20)) + 32|0);
+  HEAP32[$21>>2] = $19;
+ }
+ $22 = $1;
+ $23 = HEAP32[$22>>2]|0;
+ $24 = ($23|0)!=(0|0);
+ L10: do {
+  if ($24) {
+   $25 = $0;
+   $26 = (_cons_gen($25,0,0)|0);
+   $27 = $0;
+   $28 = ((($27)) + 76|0);
+   HEAP32[$28>>2] = $26;
+   $i = 0;
+   while(1) {
+    $29 = $i;
+    $30 = $1;
+    $31 = ((($30)) + 4|0);
+    $32 = HEAP32[$31>>2]|0;
+    $33 = ($29|0)<($32|0);
+    if (!($33)) {
+     break L10;
+    }
+    $34 = $0;
+    $35 = $i;
+    $36 = $1;
+    $37 = HEAP32[$36>>2]|0;
+    $38 = (($37) + ($35<<2)|0);
+    $39 = HEAP32[$38>>2]|0;
+    _local_add_f($34,$39);
+    $40 = $i;
+    $41 = (($40) + 1)|0;
+    $i = $41;
+   }
+  }
+ } while(0);
+ $42 = $1;
+ $43 = ((($42)) + 28|0);
+ $44 = HEAP8[$43>>0]|0;
+ $45 = $44 & 1;
+ $46 = $0;
+ $47 = ((($46)) + 1148|0);
+ $48 = HEAP8[$47>>0]|0;
+ $49 = $45 & 1;
+ $50 = ($49 << 1)&255;
+ $51 = $48 & -3;
+ $52 = $51 | $50;
+ HEAP8[$47>>0] = $52;
+ $53 = $1;
+ $54 = ((($53)) + 28|0);
+ $55 = HEAP8[$54>>0]|0;
+ $56 = ($55&255) >>> 4;
+ $57 = $56 & 1;
+ $58 = $0;
+ $59 = ((($58)) + 1148|0);
+ $60 = HEAP8[$59>>0]|0;
+ $61 = $57 & 1;
+ $62 = $60 & -2;
+ $63 = $62 | $61;
+ HEAP8[$59>>0] = $63;
+ $64 = $1;
+ $65 = ((($64)) + 16|0);
+ $66 = HEAP32[$65>>2]|0;
+ $67 = ($66|0)!=(0|0);
+ if (!($67)) {
+  STACKTOP = sp;return;
+ }
+ $68 = $1;
+ $69 = $0;
+ $70 = ((($69)) + 24|0);
+ HEAP32[$70>>2] = $68;
+ STACKTOP = sp;return;
+}
+function _mrb_parser_set_filename($p,$f) {
+ $p = $p|0;
+ $f = $f|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $8 = 0, $9 = 0, $i = 0, $new_table = 0, $sym = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $f;
+ $2 = $0;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $1;
+ $5 = (_mrb_intern_cstr($3,$4)|0);
+ $sym = $5;
+ $6 = $0;
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $sym;
+ $9 = (_mrb_sym2name_len($7,$8,0)|0);
+ $10 = $0;
+ $11 = ((($10)) + 28|0);
+ HEAP32[$11>>2] = $9;
+ $12 = $0;
+ $13 = ((($12)) + 1396|0);
+ $14 = HEAP32[$13>>2]|0;
+ $15 = ($14>>>0)>(0);
+ $16 = $15 ? 0 : 1;
+ $17 = $0;
+ $18 = ((($17)) + 32|0);
+ HEAP32[$18>>2] = $16;
+ $i = 0;
+ while(1) {
+  $19 = $i;
+  $20 = $0;
+  $21 = ((($20)) + 1396|0);
+  $22 = HEAP32[$21>>2]|0;
+  $23 = ($19>>>0)<($22>>>0);
+  if (!($23)) {
+   break;
+  }
+  $24 = $i;
+  $25 = $0;
+  $26 = ((($25)) + 1392|0);
+  $27 = HEAP32[$26>>2]|0;
+  $28 = (($27) + ($24<<2)|0);
+  $29 = HEAP32[$28>>2]|0;
+  $30 = $sym;
+  $31 = ($29|0)==($30|0);
+  $32 = $i;
+  if ($31) {
+   label = 4;
+   break;
+  }
+  $35 = (($32) + 1)|0;
+  $i = $35;
+ }
+ if ((label|0) == 4) {
+  $33 = $0;
+  $34 = ((($33)) + 1400|0);
+  HEAP32[$34>>2] = $32;
+  STACKTOP = sp;return;
+ }
+ $36 = $0;
+ $37 = ((($36)) + 1396|0);
+ $38 = HEAP32[$37>>2]|0;
+ $39 = (($38) + 1)|0;
+ HEAP32[$37>>2] = $39;
+ $40 = $0;
+ $41 = ((($40)) + 1400|0);
+ HEAP32[$41>>2] = $38;
+ $42 = $0;
+ $43 = $0;
+ $44 = ((($43)) + 1396|0);
+ $45 = HEAP32[$44>>2]|0;
+ $46 = $45<<2;
+ $47 = (_parser_palloc($42,$46)|0);
+ $new_table = $47;
+ $48 = $0;
+ $49 = ((($48)) + 1392|0);
+ $50 = HEAP32[$49>>2]|0;
+ $51 = ($50|0)!=(0|0);
+ if ($51) {
+  $52 = $new_table;
+  $53 = $0;
+  $54 = ((($53)) + 1392|0);
+  $55 = HEAP32[$54>>2]|0;
+  $56 = $0;
+  $57 = ((($56)) + 1396|0);
+  $58 = HEAP32[$57>>2]|0;
+  $59 = $58<<2;
+  _memmove(($52|0),($55|0),($59|0))|0;
+ }
+ $60 = $new_table;
+ $61 = $0;
+ $62 = ((($61)) + 1392|0);
+ HEAP32[$62>>2] = $60;
+ $63 = $sym;
+ $64 = $0;
+ $65 = ((($64)) + 1396|0);
+ $66 = HEAP32[$65>>2]|0;
+ $67 = (($66) - 1)|0;
+ $68 = $0;
+ $69 = ((($68)) + 1392|0);
+ $70 = HEAP32[$69>>2]|0;
+ $71 = (($70) + ($67<<2)|0);
+ HEAP32[$71>>2] = $63;
+ STACKTOP = sp;return;
+}
+function _parser_palloc($p,$size) {
+ $p = $p|0;
+ $size = $size|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $m = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $size;
+ $2 = $0;
+ $3 = ((($2)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $1;
+ $6 = (_mrb_pool_alloc($4,$5)|0);
+ $m = $6;
+ $7 = $m;
+ $8 = ($7|0)!=(0|0);
+ if ($8) {
+  $12 = $m;
+  STACKTOP = sp;return ($12|0);
+ } else {
+  $9 = $0;
+  $10 = ((($9)) + 1404|0);
+  $11 = HEAP32[$10>>2]|0;
+  _longjmp(($11|0),1);
+  // unreachable;
+ }
+ return (0)|0;
+}
+function _cons_gen($p,$car,$cdr) {
+ $p = $p|0;
+ $car = $car|0;
+ $cdr = $cdr|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $car;
+ $2 = $cdr;
+ $3 = $0;
+ $4 = ((($3)) + 8|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ($5|0)!=(0|0);
+ $7 = $0;
+ if ($6) {
+  $8 = ((($7)) + 8|0);
+  $9 = HEAP32[$8>>2]|0;
+  $c = $9;
+  $10 = $0;
+  $11 = ((($10)) + 8|0);
+  $12 = HEAP32[$11>>2]|0;
+  $13 = ((($12)) + 4|0);
+  $14 = HEAP32[$13>>2]|0;
+  $15 = $0;
+  $16 = ((($15)) + 8|0);
+  HEAP32[$16>>2] = $14;
+ } else {
+  $17 = (_parser_palloc($7,12)|0);
+  $c = $17;
+ }
+ $18 = $1;
+ $19 = $c;
+ HEAP32[$19>>2] = $18;
+ $20 = $2;
+ $21 = $c;
+ $22 = ((($21)) + 4|0);
+ HEAP32[$22>>2] = $20;
+ $23 = $0;
+ $24 = ((($23)) + 32|0);
+ $25 = HEAP32[$24>>2]|0;
+ $26 = $25&65535;
+ $27 = $c;
+ $28 = ((($27)) + 8|0);
+ HEAP16[$28>>1] = $26;
+ $29 = $0;
+ $30 = ((($29)) + 1400|0);
+ $31 = HEAP32[$30>>2]|0;
+ $32 = $31&65535;
+ $33 = $c;
+ $34 = ((($33)) + 10|0);
+ HEAP16[$34>>1] = $32;
+ $35 = $c;
+ STACKTOP = sp;return ($35|0);
+}
+function _local_add_f($p,$sym) {
+ $p = $p|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $sym;
+ $2 = $0;
+ $3 = ((($2)) + 76|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)!=(0|0);
+ if (!($5)) {
+  STACKTOP = sp;return;
+ }
+ $6 = $0;
+ $7 = $0;
+ $8 = ((($7)) + 76|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = HEAP32[$9>>2]|0;
+ $11 = $0;
+ $12 = $1;
+ $13 = $12;
+ $14 = (_list1_gen($11,$13)|0);
+ $15 = (_append_gen($6,$10,$14)|0);
+ $16 = $0;
+ $17 = ((($16)) + 76|0);
+ $18 = HEAP32[$17>>2]|0;
+ HEAP32[$18>>2] = $15;
+ STACKTOP = sp;return;
+}
+function _list1_gen($p,$a) {
+ $p = $p|0;
+ $a = $a|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_cons_gen($2,$3,0)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _append_gen($p,$a,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $c = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $p;
+ $2 = $a;
+ $3 = $b;
+ $4 = $2;
+ $c = $4;
+ $5 = $2;
+ $6 = ($5|0)!=(0|0);
+ if (!($6)) {
+  $7 = $3;
+  $0 = $7;
+  $21 = $0;
+  STACKTOP = sp;return ($21|0);
+ }
+ while(1) {
+  $8 = $c;
+  $9 = ((($8)) + 4|0);
+  $10 = HEAP32[$9>>2]|0;
+  $11 = ($10|0)!=(0|0);
+  if (!($11)) {
+   break;
+  }
+  $12 = $c;
+  $13 = ((($12)) + 4|0);
+  $14 = HEAP32[$13>>2]|0;
+  $c = $14;
+ }
+ $15 = $3;
+ $16 = ($15|0)!=(0|0);
+ if ($16) {
+  $17 = $3;
+  $18 = $c;
+  $19 = ((($18)) + 4|0);
+  HEAP32[$19>>2] = $17;
+ }
+ $20 = $2;
+ $0 = $20;
+ $21 = $0;
+ STACKTOP = sp;return ($21|0);
+}
+function _yyparse($p) {
+ $p = $p|0;
+ var $$ = 0, $$12 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0;
+ var $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0;
+ var $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0;
+ var $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0;
+ var $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0;
+ var $1086 = 0, $1087 = 0, $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0;
+ var $1103 = 0, $1104 = 0, $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $1119 = 0, $112 = 0, $1120 = 0;
+ var $1121 = 0, $1122 = 0, $1123 = 0, $1124 = 0, $1125 = 0, $1126 = 0, $1127 = 0, $1128 = 0, $1129 = 0, $113 = 0, $1130 = 0, $1131 = 0, $1132 = 0, $1133 = 0, $1134 = 0, $1135 = 0, $1136 = 0, $1137 = 0, $1138 = 0, $1139 = 0;
+ var $114 = 0, $1140 = 0, $1141 = 0, $1142 = 0, $1143 = 0, $1144 = 0, $1145 = 0, $1146 = 0, $1147 = 0, $1148 = 0, $1149 = 0, $115 = 0, $1150 = 0, $1151 = 0, $1152 = 0, $1153 = 0, $1154 = 0, $1155 = 0, $1156 = 0, $1157 = 0;
+ var $1158 = 0, $1159 = 0, $116 = 0, $1160 = 0, $1161 = 0, $1162 = 0, $1163 = 0, $1164 = 0, $1165 = 0, $1166 = 0, $1167 = 0, $1168 = 0, $1169 = 0, $117 = 0, $1170 = 0, $1171 = 0, $1172 = 0, $1173 = 0, $1174 = 0, $1175 = 0;
+ var $1176 = 0, $1177 = 0, $1178 = 0, $1179 = 0, $118 = 0, $1180 = 0, $1181 = 0, $1182 = 0, $1183 = 0, $1184 = 0, $1185 = 0, $1186 = 0, $1187 = 0, $1188 = 0, $1189 = 0, $119 = 0, $1190 = 0, $1191 = 0, $1192 = 0, $1193 = 0;
+ var $1194 = 0, $1195 = 0, $1196 = 0, $1197 = 0, $1198 = 0, $1199 = 0, $12 = 0, $120 = 0, $1200 = 0, $1201 = 0, $1202 = 0, $1203 = 0, $1204 = 0, $1205 = 0, $1206 = 0, $1207 = 0, $1208 = 0, $1209 = 0, $121 = 0, $1210 = 0;
+ var $1211 = 0, $1212 = 0, $1213 = 0, $1214 = 0, $1215 = 0, $1216 = 0, $1217 = 0, $1218 = 0, $1219 = 0, $122 = 0, $1220 = 0, $1221 = 0, $1222 = 0, $1223 = 0, $1224 = 0, $1225 = 0, $1226 = 0, $1227 = 0, $1228 = 0, $1229 = 0;
+ var $123 = 0, $1230 = 0, $1231 = 0, $1232 = 0, $1233 = 0, $1234 = 0, $1235 = 0, $1236 = 0, $1237 = 0, $1238 = 0, $1239 = 0, $124 = 0, $1240 = 0, $1241 = 0, $1242 = 0, $1243 = 0, $1244 = 0, $1245 = 0, $1246 = 0, $1247 = 0;
+ var $1248 = 0, $1249 = 0, $125 = 0, $1250 = 0, $1251 = 0, $1252 = 0, $1253 = 0, $1254 = 0, $1255 = 0, $1256 = 0, $1257 = 0, $1258 = 0, $1259 = 0, $126 = 0, $1260 = 0, $1261 = 0, $1262 = 0, $1263 = 0, $1264 = 0, $1265 = 0;
+ var $1266 = 0, $1267 = 0, $1268 = 0, $1269 = 0, $127 = 0, $1270 = 0, $1271 = 0, $1272 = 0, $1273 = 0, $1274 = 0, $1275 = 0, $1276 = 0, $1277 = 0, $1278 = 0, $1279 = 0, $128 = 0, $1280 = 0, $1281 = 0, $1282 = 0, $1283 = 0;
+ var $1284 = 0, $1285 = 0, $1286 = 0, $1287 = 0, $1288 = 0, $1289 = 0, $129 = 0, $1290 = 0, $1291 = 0, $1292 = 0, $1293 = 0, $1294 = 0, $1295 = 0, $1296 = 0, $1297 = 0, $1298 = 0, $1299 = 0, $13 = 0, $130 = 0, $1300 = 0;
+ var $1301 = 0, $1302 = 0, $1303 = 0, $1304 = 0, $1305 = 0, $1306 = 0, $1307 = 0, $1308 = 0, $1309 = 0, $131 = 0, $1310 = 0, $1311 = 0, $1312 = 0, $1313 = 0, $1314 = 0, $1315 = 0, $1316 = 0, $1317 = 0, $1318 = 0, $1319 = 0;
+ var $132 = 0, $1320 = 0, $1321 = 0, $1322 = 0, $1323 = 0, $1324 = 0, $1325 = 0, $1326 = 0, $1327 = 0, $1328 = 0, $1329 = 0, $133 = 0, $1330 = 0, $1331 = 0, $1332 = 0, $1333 = 0, $1334 = 0, $1335 = 0, $1336 = 0, $1337 = 0;
+ var $1338 = 0, $1339 = 0, $134 = 0, $1340 = 0, $1341 = 0, $1342 = 0, $1343 = 0, $1344 = 0, $1345 = 0, $1346 = 0, $1347 = 0, $1348 = 0, $1349 = 0, $135 = 0, $1350 = 0, $1351 = 0, $1352 = 0, $1353 = 0, $1354 = 0, $1355 = 0;
+ var $1356 = 0, $1357 = 0, $1358 = 0, $1359 = 0, $136 = 0, $1360 = 0, $1361 = 0, $1362 = 0, $1363 = 0, $1364 = 0, $1365 = 0, $1366 = 0, $1367 = 0, $1368 = 0, $1369 = 0, $137 = 0, $1370 = 0, $1371 = 0, $1372 = 0, $1373 = 0;
+ var $1374 = 0, $1375 = 0, $1376 = 0, $1377 = 0, $1378 = 0, $1379 = 0, $138 = 0, $1380 = 0, $1381 = 0, $1382 = 0, $1383 = 0, $1384 = 0, $1385 = 0, $1386 = 0, $1387 = 0, $1388 = 0, $1389 = 0, $139 = 0, $1390 = 0, $1391 = 0;
+ var $1392 = 0, $1393 = 0, $1394 = 0, $1395 = 0, $1396 = 0, $1397 = 0, $1398 = 0, $1399 = 0, $14 = 0, $140 = 0, $1400 = 0, $1401 = 0, $1402 = 0, $1403 = 0, $1404 = 0, $1405 = 0, $1406 = 0, $1407 = 0, $1408 = 0, $1409 = 0;
+ var $141 = 0, $1410 = 0, $1411 = 0, $1412 = 0, $1413 = 0, $1414 = 0, $1415 = 0, $1416 = 0, $1417 = 0, $1418 = 0, $1419 = 0, $142 = 0, $1420 = 0, $1421 = 0, $1422 = 0, $1423 = 0, $1424 = 0, $1425 = 0, $1426 = 0, $1427 = 0;
+ var $1428 = 0, $1429 = 0, $143 = 0, $1430 = 0, $1431 = 0, $1432 = 0, $1433 = 0, $1434 = 0, $1435 = 0, $1436 = 0, $1437 = 0, $1438 = 0, $1439 = 0, $144 = 0, $1440 = 0, $1441 = 0, $1442 = 0, $1443 = 0, $1444 = 0, $1445 = 0;
+ var $1446 = 0, $1447 = 0, $1448 = 0, $1449 = 0, $145 = 0, $1450 = 0, $1451 = 0, $1452 = 0, $1453 = 0, $1454 = 0, $1455 = 0, $1456 = 0, $1457 = 0, $1458 = 0, $1459 = 0, $146 = 0, $1460 = 0, $1461 = 0, $1462 = 0, $1463 = 0;
+ var $1464 = 0, $1465 = 0, $1466 = 0, $1467 = 0, $1468 = 0, $1469 = 0, $147 = 0, $1470 = 0, $1471 = 0, $1472 = 0, $1473 = 0, $1474 = 0, $1475 = 0, $1476 = 0, $1477 = 0, $1478 = 0, $1479 = 0, $148 = 0, $1480 = 0, $1481 = 0;
+ var $1482 = 0, $1483 = 0, $1484 = 0, $1485 = 0, $1486 = 0, $1487 = 0, $1488 = 0, $1489 = 0, $149 = 0, $1490 = 0, $1491 = 0, $1492 = 0, $1493 = 0, $1494 = 0, $1495 = 0, $1496 = 0, $1497 = 0, $1498 = 0, $1499 = 0, $15 = 0;
+ var $150 = 0, $1500 = 0, $1501 = 0, $1502 = 0, $1503 = 0, $1504 = 0, $1505 = 0, $1506 = 0, $1507 = 0, $1508 = 0, $1509 = 0, $151 = 0, $1510 = 0, $1511 = 0, $1512 = 0, $1513 = 0, $1514 = 0, $1515 = 0, $1516 = 0, $1517 = 0;
+ var $1518 = 0, $1519 = 0, $152 = 0, $1520 = 0, $1521 = 0, $1522 = 0, $1523 = 0, $1524 = 0, $1525 = 0, $1526 = 0, $1527 = 0, $1528 = 0, $1529 = 0, $153 = 0, $1530 = 0, $1531 = 0, $1532 = 0, $1533 = 0, $1534 = 0, $1535 = 0;
+ var $1536 = 0, $1537 = 0, $1538 = 0, $1539 = 0, $154 = 0, $1540 = 0, $1541 = 0, $1542 = 0, $1543 = 0, $1544 = 0, $1545 = 0, $1546 = 0, $1547 = 0, $1548 = 0, $1549 = 0, $155 = 0, $1550 = 0, $1551 = 0, $1552 = 0, $1553 = 0;
+ var $1554 = 0, $1555 = 0, $1556 = 0, $1557 = 0, $1558 = 0, $1559 = 0, $156 = 0, $1560 = 0, $1561 = 0, $1562 = 0, $1563 = 0, $1564 = 0, $1565 = 0, $1566 = 0, $1567 = 0, $1568 = 0, $1569 = 0, $157 = 0, $1570 = 0, $1571 = 0;
+ var $1572 = 0, $1573 = 0, $1574 = 0, $1575 = 0, $1576 = 0, $1577 = 0, $1578 = 0, $1579 = 0, $158 = 0, $1580 = 0, $1581 = 0, $1582 = 0, $1583 = 0, $1584 = 0, $1585 = 0, $1586 = 0, $1587 = 0, $1588 = 0, $1589 = 0, $159 = 0;
+ var $1590 = 0, $1591 = 0, $1592 = 0, $1593 = 0, $1594 = 0, $1595 = 0, $1596 = 0, $1597 = 0, $1598 = 0, $1599 = 0, $16 = 0, $160 = 0, $1600 = 0, $1601 = 0, $1602 = 0, $1603 = 0, $1604 = 0, $1605 = 0, $1606 = 0, $1607 = 0;
+ var $1608 = 0, $1609 = 0, $161 = 0, $1610 = 0, $1611 = 0, $1612 = 0, $1613 = 0, $1614 = 0, $1615 = 0, $1616 = 0, $1617 = 0, $1618 = 0, $1619 = 0, $162 = 0, $1620 = 0, $1621 = 0, $1622 = 0, $1623 = 0, $1624 = 0, $1625 = 0;
+ var $1626 = 0, $1627 = 0, $1628 = 0, $1629 = 0, $163 = 0, $1630 = 0, $1631 = 0, $1632 = 0, $1633 = 0, $1634 = 0, $1635 = 0, $1636 = 0, $1637 = 0, $1638 = 0, $1639 = 0, $164 = 0, $1640 = 0, $1641 = 0, $1642 = 0, $1643 = 0;
+ var $1644 = 0, $1645 = 0, $1646 = 0, $1647 = 0, $1648 = 0, $1649 = 0, $165 = 0, $1650 = 0, $1651 = 0, $1652 = 0, $1653 = 0, $1654 = 0, $1655 = 0, $1656 = 0, $1657 = 0, $1658 = 0, $1659 = 0, $166 = 0, $1660 = 0, $1661 = 0;
+ var $1662 = 0, $1663 = 0, $1664 = 0, $1665 = 0, $1666 = 0, $1667 = 0, $1668 = 0, $1669 = 0, $167 = 0, $1670 = 0, $1671 = 0, $1672 = 0, $1673 = 0, $1674 = 0, $1675 = 0, $1676 = 0, $1677 = 0, $1678 = 0, $1679 = 0, $168 = 0;
+ var $1680 = 0, $1681 = 0, $1682 = 0, $1683 = 0, $1684 = 0, $1685 = 0, $1686 = 0, $1687 = 0, $1688 = 0, $1689 = 0, $169 = 0, $1690 = 0, $1691 = 0, $1692 = 0, $1693 = 0, $1694 = 0, $1695 = 0, $1696 = 0, $1697 = 0, $1698 = 0;
+ var $1699 = 0, $17 = 0, $170 = 0, $1700 = 0, $1701 = 0, $1702 = 0, $1703 = 0, $1704 = 0, $1705 = 0, $1706 = 0, $1707 = 0, $1708 = 0, $1709 = 0, $171 = 0, $1710 = 0, $1711 = 0, $1712 = 0, $1713 = 0, $1714 = 0, $1715 = 0;
+ var $1716 = 0, $1717 = 0, $1718 = 0, $1719 = 0, $172 = 0, $1720 = 0, $1721 = 0, $1722 = 0, $1723 = 0, $1724 = 0, $1725 = 0, $1726 = 0, $1727 = 0, $1728 = 0, $1729 = 0, $173 = 0, $1730 = 0, $1731 = 0, $1732 = 0, $1733 = 0;
+ var $1734 = 0, $1735 = 0, $1736 = 0, $1737 = 0, $1738 = 0, $1739 = 0, $174 = 0, $1740 = 0, $1741 = 0, $1742 = 0, $1743 = 0, $1744 = 0, $1745 = 0, $1746 = 0, $1747 = 0, $1748 = 0, $1749 = 0, $175 = 0, $1750 = 0, $1751 = 0;
+ var $1752 = 0, $1753 = 0, $1754 = 0, $1755 = 0, $1756 = 0, $1757 = 0, $1758 = 0, $1759 = 0, $176 = 0, $1760 = 0, $1761 = 0, $1762 = 0, $1763 = 0, $1764 = 0, $1765 = 0, $1766 = 0, $1767 = 0, $1768 = 0, $1769 = 0, $177 = 0;
+ var $1770 = 0, $1771 = 0, $1772 = 0, $1773 = 0, $1774 = 0, $1775 = 0, $1776 = 0, $1777 = 0, $1778 = 0, $1779 = 0, $178 = 0, $1780 = 0, $1781 = 0, $1782 = 0, $1783 = 0, $1784 = 0, $1785 = 0, $1786 = 0, $1787 = 0, $1788 = 0;
+ var $1789 = 0, $179 = 0, $1790 = 0, $1791 = 0, $1792 = 0, $1793 = 0, $1794 = 0, $1795 = 0, $1796 = 0, $1797 = 0, $1798 = 0, $1799 = 0, $18 = 0, $180 = 0, $1800 = 0, $1801 = 0, $1802 = 0, $1803 = 0, $1804 = 0, $1805 = 0;
+ var $1806 = 0, $1807 = 0, $1808 = 0, $1809 = 0, $181 = 0, $1810 = 0, $1811 = 0, $1812 = 0, $1813 = 0, $1814 = 0, $1815 = 0, $1816 = 0, $1817 = 0, $1818 = 0, $1819 = 0, $182 = 0, $1820 = 0, $1821 = 0, $1822 = 0, $1823 = 0;
+ var $1824 = 0, $1825 = 0, $1826 = 0, $1827 = 0, $1828 = 0, $1829 = 0, $183 = 0, $1830 = 0, $1831 = 0, $1832 = 0, $1833 = 0, $1834 = 0, $1835 = 0, $1836 = 0, $1837 = 0, $1838 = 0, $1839 = 0, $184 = 0, $1840 = 0, $1841 = 0;
+ var $1842 = 0, $1843 = 0, $1844 = 0, $1845 = 0, $1846 = 0, $1847 = 0, $1848 = 0, $1849 = 0, $185 = 0, $1850 = 0, $1851 = 0, $1852 = 0, $1853 = 0, $1854 = 0, $1855 = 0, $1856 = 0, $1857 = 0, $1858 = 0, $1859 = 0, $186 = 0;
+ var $1860 = 0, $1861 = 0, $1862 = 0, $1863 = 0, $1864 = 0, $1865 = 0, $1866 = 0, $1867 = 0, $1868 = 0, $1869 = 0, $187 = 0, $1870 = 0, $1871 = 0, $1872 = 0, $1873 = 0, $1874 = 0, $1875 = 0, $1876 = 0, $1877 = 0, $1878 = 0;
+ var $1879 = 0, $188 = 0, $1880 = 0, $1881 = 0, $1882 = 0, $1883 = 0, $1884 = 0, $1885 = 0, $1886 = 0, $1887 = 0, $1888 = 0, $1889 = 0, $189 = 0, $1890 = 0, $1891 = 0, $1892 = 0, $1893 = 0, $1894 = 0, $1895 = 0, $1896 = 0;
+ var $1897 = 0, $1898 = 0, $1899 = 0, $19 = 0, $190 = 0, $1900 = 0, $1901 = 0, $1902 = 0, $1903 = 0, $1904 = 0, $1905 = 0, $1906 = 0, $1907 = 0, $1908 = 0, $1909 = 0, $191 = 0, $1910 = 0, $1911 = 0, $1912 = 0, $1913 = 0;
+ var $1914 = 0, $1915 = 0, $1916 = 0, $1917 = 0, $1918 = 0, $1919 = 0, $192 = 0, $1920 = 0, $1921 = 0, $1922 = 0, $1923 = 0, $1924 = 0, $1925 = 0, $1926 = 0, $1927 = 0, $1928 = 0, $1929 = 0, $193 = 0, $1930 = 0, $1931 = 0;
+ var $1932 = 0, $1933 = 0, $1934 = 0, $1935 = 0, $1936 = 0, $1937 = 0, $1938 = 0, $1939 = 0, $194 = 0, $1940 = 0, $1941 = 0, $1942 = 0, $1943 = 0, $1944 = 0, $1945 = 0, $1946 = 0, $1947 = 0, $1948 = 0, $1949 = 0, $195 = 0;
+ var $1950 = 0, $1951 = 0, $1952 = 0, $1953 = 0, $1954 = 0, $1955 = 0, $1956 = 0, $1957 = 0, $1958 = 0, $1959 = 0, $196 = 0, $1960 = 0, $1961 = 0, $1962 = 0, $1963 = 0, $1964 = 0, $1965 = 0, $1966 = 0, $1967 = 0, $1968 = 0;
+ var $1969 = 0, $197 = 0, $1970 = 0, $1971 = 0, $1972 = 0, $1973 = 0, $1974 = 0, $1975 = 0, $1976 = 0, $1977 = 0, $1978 = 0, $1979 = 0, $198 = 0, $1980 = 0, $1981 = 0, $1982 = 0, $1983 = 0, $1984 = 0, $1985 = 0, $1986 = 0;
+ var $1987 = 0, $1988 = 0, $1989 = 0, $199 = 0, $1990 = 0, $1991 = 0, $1992 = 0, $1993 = 0, $1994 = 0, $1995 = 0, $1996 = 0, $1997 = 0, $1998 = 0, $1999 = 0, $2 = 0, $20 = 0, $200 = 0, $2000 = 0, $2001 = 0, $2002 = 0;
+ var $2003 = 0, $2004 = 0, $2005 = 0, $2006 = 0, $2007 = 0, $2008 = 0, $2009 = 0, $201 = 0, $2010 = 0, $2011 = 0, $2012 = 0, $2013 = 0, $2014 = 0, $2015 = 0, $2016 = 0, $2017 = 0, $2018 = 0, $2019 = 0, $202 = 0, $2020 = 0;
+ var $2021 = 0, $2022 = 0, $2023 = 0, $2024 = 0, $2025 = 0, $2026 = 0, $2027 = 0, $2028 = 0, $2029 = 0, $203 = 0, $2030 = 0, $2031 = 0, $2032 = 0, $2033 = 0, $2034 = 0, $2035 = 0, $2036 = 0, $2037 = 0, $2038 = 0, $2039 = 0;
+ var $204 = 0, $2040 = 0, $2041 = 0, $2042 = 0, $2043 = 0, $2044 = 0, $2045 = 0, $2046 = 0, $2047 = 0, $2048 = 0, $2049 = 0, $205 = 0, $2050 = 0, $2051 = 0, $2052 = 0, $2053 = 0, $2054 = 0, $2055 = 0, $2056 = 0, $2057 = 0;
+ var $2058 = 0, $2059 = 0, $206 = 0, $2060 = 0, $2061 = 0, $2062 = 0, $2063 = 0, $2064 = 0, $2065 = 0, $2066 = 0, $2067 = 0, $2068 = 0, $2069 = 0, $207 = 0, $2070 = 0, $2071 = 0, $2072 = 0, $2073 = 0, $2074 = 0, $2075 = 0;
+ var $2076 = 0, $2077 = 0, $2078 = 0, $2079 = 0, $208 = 0, $2080 = 0, $2081 = 0, $2082 = 0, $2083 = 0, $2084 = 0, $2085 = 0, $2086 = 0, $2087 = 0, $2088 = 0, $2089 = 0, $209 = 0, $2090 = 0, $2091 = 0, $2092 = 0, $2093 = 0;
+ var $2094 = 0, $2095 = 0, $2096 = 0, $2097 = 0, $2098 = 0, $2099 = 0, $21 = 0, $210 = 0, $2100 = 0, $2101 = 0, $2102 = 0, $2103 = 0, $2104 = 0, $2105 = 0, $2106 = 0, $2107 = 0, $2108 = 0, $2109 = 0, $211 = 0, $2110 = 0;
+ var $2111 = 0, $2112 = 0, $2113 = 0, $2114 = 0, $2115 = 0, $2116 = 0, $2117 = 0, $2118 = 0, $2119 = 0, $212 = 0, $2120 = 0, $2121 = 0, $2122 = 0, $2123 = 0, $2124 = 0, $2125 = 0, $2126 = 0, $2127 = 0, $2128 = 0, $2129 = 0;
+ var $213 = 0, $2130 = 0, $2131 = 0, $2132 = 0, $2133 = 0, $2134 = 0, $2135 = 0, $2136 = 0, $2137 = 0, $2138 = 0, $2139 = 0, $214 = 0, $2140 = 0, $2141 = 0, $2142 = 0, $2143 = 0, $2144 = 0, $2145 = 0, $2146 = 0, $2147 = 0;
+ var $2148 = 0, $2149 = 0, $215 = 0, $2150 = 0, $2151 = 0, $2152 = 0, $2153 = 0, $2154 = 0, $2155 = 0, $2156 = 0, $2157 = 0, $2158 = 0, $2159 = 0, $216 = 0, $2160 = 0, $2161 = 0, $2162 = 0, $2163 = 0, $2164 = 0, $2165 = 0;
+ var $2166 = 0, $2167 = 0, $2168 = 0, $2169 = 0, $217 = 0, $2170 = 0, $2171 = 0, $2172 = 0, $2173 = 0, $2174 = 0, $2175 = 0, $2176 = 0, $2177 = 0, $2178 = 0, $2179 = 0, $218 = 0, $2180 = 0, $2181 = 0, $2182 = 0, $2183 = 0;
+ var $2184 = 0, $2185 = 0, $2186 = 0, $2187 = 0, $2188 = 0, $2189 = 0, $219 = 0, $2190 = 0, $2191 = 0, $2192 = 0, $2193 = 0, $2194 = 0, $2195 = 0, $2196 = 0, $2197 = 0, $2198 = 0, $2199 = 0, $22 = 0, $220 = 0, $2200 = 0;
+ var $2201 = 0, $2202 = 0, $2203 = 0, $2204 = 0, $2205 = 0, $2206 = 0, $2207 = 0, $2208 = 0, $2209 = 0, $221 = 0, $2210 = 0, $2211 = 0, $2212 = 0, $2213 = 0, $2214 = 0, $2215 = 0, $2216 = 0, $2217 = 0, $2218 = 0, $2219 = 0;
+ var $222 = 0, $2220 = 0, $2221 = 0, $2222 = 0, $2223 = 0, $2224 = 0, $2225 = 0, $2226 = 0, $2227 = 0, $2228 = 0, $2229 = 0, $223 = 0, $2230 = 0, $2231 = 0, $2232 = 0, $2233 = 0, $2234 = 0, $2235 = 0, $2236 = 0, $2237 = 0;
+ var $2238 = 0, $2239 = 0, $224 = 0, $2240 = 0, $2241 = 0, $2242 = 0, $2243 = 0, $2244 = 0, $2245 = 0, $2246 = 0, $2247 = 0, $2248 = 0, $2249 = 0, $225 = 0, $2250 = 0, $2251 = 0, $2252 = 0, $2253 = 0, $2254 = 0, $2255 = 0;
+ var $2256 = 0, $2257 = 0, $2258 = 0, $2259 = 0, $226 = 0, $2260 = 0, $2261 = 0, $2262 = 0, $2263 = 0, $2264 = 0, $2265 = 0, $2266 = 0, $2267 = 0, $2268 = 0, $2269 = 0, $227 = 0, $2270 = 0, $2271 = 0, $2272 = 0, $2273 = 0;
+ var $2274 = 0, $2275 = 0, $2276 = 0, $2277 = 0, $2278 = 0, $2279 = 0, $228 = 0, $2280 = 0, $2281 = 0, $2282 = 0, $2283 = 0, $2284 = 0, $2285 = 0, $2286 = 0, $2287 = 0, $2288 = 0, $2289 = 0, $229 = 0, $2290 = 0, $2291 = 0;
+ var $2292 = 0, $2293 = 0, $2294 = 0, $2295 = 0, $2296 = 0, $2297 = 0, $2298 = 0, $2299 = 0, $23 = 0, $230 = 0, $2300 = 0, $2301 = 0, $2302 = 0, $2303 = 0, $2304 = 0, $2305 = 0, $2306 = 0, $2307 = 0, $2308 = 0, $2309 = 0;
+ var $231 = 0, $2310 = 0, $2311 = 0, $2312 = 0, $2313 = 0, $2314 = 0, $2315 = 0, $2316 = 0, $2317 = 0, $2318 = 0, $2319 = 0, $232 = 0, $2320 = 0, $2321 = 0, $2322 = 0, $2323 = 0, $2324 = 0, $2325 = 0, $2326 = 0, $2327 = 0;
+ var $2328 = 0, $2329 = 0, $233 = 0, $2330 = 0, $2331 = 0, $2332 = 0, $2333 = 0, $2334 = 0, $2335 = 0, $2336 = 0, $2337 = 0, $2338 = 0, $2339 = 0, $234 = 0, $2340 = 0, $2341 = 0, $2342 = 0, $2343 = 0, $2344 = 0, $2345 = 0;
+ var $2346 = 0, $2347 = 0, $2348 = 0, $2349 = 0, $235 = 0, $2350 = 0, $2351 = 0, $2352 = 0, $2353 = 0, $2354 = 0, $2355 = 0, $2356 = 0, $2357 = 0, $2358 = 0, $2359 = 0, $236 = 0, $2360 = 0, $2361 = 0, $2362 = 0, $2363 = 0;
+ var $2364 = 0, $2365 = 0, $2366 = 0, $2367 = 0, $2368 = 0, $2369 = 0, $237 = 0, $2370 = 0, $2371 = 0, $2372 = 0, $2373 = 0, $2374 = 0, $2375 = 0, $2376 = 0, $2377 = 0, $2378 = 0, $2379 = 0, $238 = 0, $2380 = 0, $2381 = 0;
+ var $2382 = 0, $2383 = 0, $2384 = 0, $2385 = 0, $2386 = 0, $2387 = 0, $2388 = 0, $2389 = 0, $239 = 0, $2390 = 0, $2391 = 0, $2392 = 0, $2393 = 0, $2394 = 0, $2395 = 0, $2396 = 0, $2397 = 0, $2398 = 0, $2399 = 0, $24 = 0;
+ var $240 = 0, $2400 = 0, $2401 = 0, $2402 = 0, $2403 = 0, $2404 = 0, $2405 = 0, $2406 = 0, $2407 = 0, $2408 = 0, $2409 = 0, $241 = 0, $2410 = 0, $2411 = 0, $2412 = 0, $2413 = 0, $2414 = 0, $2415 = 0, $2416 = 0, $2417 = 0;
+ var $2418 = 0, $2419 = 0, $242 = 0, $2420 = 0, $2421 = 0, $2422 = 0, $2423 = 0, $2424 = 0, $2425 = 0, $2426 = 0, $2427 = 0, $2428 = 0, $2429 = 0, $243 = 0, $2430 = 0, $2431 = 0, $2432 = 0, $2433 = 0, $2434 = 0, $2435 = 0;
+ var $2436 = 0, $2437 = 0, $2438 = 0, $2439 = 0, $244 = 0, $2440 = 0, $2441 = 0, $2442 = 0, $2443 = 0, $2444 = 0, $2445 = 0, $2446 = 0, $2447 = 0, $2448 = 0, $2449 = 0, $245 = 0, $2450 = 0, $2451 = 0, $2452 = 0, $2453 = 0;
+ var $2454 = 0, $2455 = 0, $2456 = 0, $2457 = 0, $2458 = 0, $2459 = 0, $246 = 0, $2460 = 0, $2461 = 0, $2462 = 0, $2463 = 0, $2464 = 0, $2465 = 0, $2466 = 0, $2467 = 0, $2468 = 0, $2469 = 0, $247 = 0, $2470 = 0, $2471 = 0;
+ var $2472 = 0, $2473 = 0, $2474 = 0, $2475 = 0, $2476 = 0, $2477 = 0, $2478 = 0, $2479 = 0, $248 = 0, $2480 = 0, $2481 = 0, $2482 = 0, $2483 = 0, $2484 = 0, $2485 = 0, $2486 = 0, $2487 = 0, $2488 = 0, $2489 = 0, $249 = 0;
+ var $2490 = 0, $2491 = 0, $2492 = 0, $2493 = 0, $2494 = 0, $2495 = 0, $2496 = 0, $2497 = 0, $2498 = 0, $2499 = 0, $25 = 0, $250 = 0, $2500 = 0, $2501 = 0, $2502 = 0, $2503 = 0, $2504 = 0, $2505 = 0, $2506 = 0, $2507 = 0;
+ var $2508 = 0, $2509 = 0, $251 = 0, $2510 = 0, $2511 = 0, $2512 = 0, $2513 = 0, $2514 = 0, $2515 = 0, $2516 = 0, $2517 = 0, $2518 = 0, $2519 = 0, $252 = 0, $2520 = 0, $2521 = 0, $2522 = 0, $2523 = 0, $2524 = 0, $2525 = 0;
+ var $2526 = 0, $2527 = 0, $2528 = 0, $2529 = 0, $253 = 0, $2530 = 0, $2531 = 0, $2532 = 0, $2533 = 0, $2534 = 0, $2535 = 0, $2536 = 0, $2537 = 0, $2538 = 0, $2539 = 0, $254 = 0, $2540 = 0, $2541 = 0, $2542 = 0, $2543 = 0;
+ var $2544 = 0, $2545 = 0, $2546 = 0, $2547 = 0, $2548 = 0, $2549 = 0, $255 = 0, $2550 = 0, $2551 = 0, $2552 = 0, $2553 = 0, $2554 = 0, $2555 = 0, $2556 = 0, $2557 = 0, $2558 = 0, $2559 = 0, $256 = 0, $2560 = 0, $2561 = 0;
+ var $2562 = 0, $2563 = 0, $2564 = 0, $2565 = 0, $2566 = 0, $2567 = 0, $2568 = 0, $2569 = 0, $257 = 0, $2570 = 0, $2571 = 0, $2572 = 0, $2573 = 0, $2574 = 0, $2575 = 0, $2576 = 0, $2577 = 0, $2578 = 0, $2579 = 0, $258 = 0;
+ var $2580 = 0, $2581 = 0, $2582 = 0, $2583 = 0, $2584 = 0, $2585 = 0, $2586 = 0, $2587 = 0, $2588 = 0, $2589 = 0, $259 = 0, $2590 = 0, $2591 = 0, $2592 = 0, $2593 = 0, $2594 = 0, $2595 = 0, $2596 = 0, $2597 = 0, $2598 = 0;
+ var $2599 = 0, $26 = 0, $260 = 0, $2600 = 0, $2601 = 0, $2602 = 0, $2603 = 0, $2604 = 0, $2605 = 0, $2606 = 0, $2607 = 0, $2608 = 0, $2609 = 0, $261 = 0, $2610 = 0, $2611 = 0, $2612 = 0, $2613 = 0, $2614 = 0, $2615 = 0;
+ var $2616 = 0, $2617 = 0, $2618 = 0, $2619 = 0, $262 = 0, $2620 = 0, $2621 = 0, $2622 = 0, $2623 = 0, $2624 = 0, $2625 = 0, $2626 = 0, $2627 = 0, $2628 = 0, $2629 = 0, $263 = 0, $2630 = 0, $2631 = 0, $2632 = 0, $2633 = 0;
+ var $2634 = 0, $2635 = 0, $2636 = 0, $2637 = 0, $2638 = 0, $2639 = 0, $264 = 0, $2640 = 0, $2641 = 0, $2642 = 0, $2643 = 0, $2644 = 0, $2645 = 0, $2646 = 0, $2647 = 0, $2648 = 0, $2649 = 0, $265 = 0, $2650 = 0, $2651 = 0;
+ var $2652 = 0, $2653 = 0, $2654 = 0, $2655 = 0, $2656 = 0, $2657 = 0, $2658 = 0, $2659 = 0, $266 = 0, $2660 = 0, $2661 = 0, $2662 = 0, $2663 = 0, $2664 = 0, $2665 = 0, $2666 = 0, $2667 = 0, $2668 = 0, $2669 = 0, $267 = 0;
+ var $2670 = 0, $2671 = 0, $2672 = 0, $2673 = 0, $2674 = 0, $2675 = 0, $2676 = 0, $2677 = 0, $2678 = 0, $2679 = 0, $268 = 0, $2680 = 0, $2681 = 0, $2682 = 0, $2683 = 0, $2684 = 0, $2685 = 0, $2686 = 0, $2687 = 0, $2688 = 0;
+ var $2689 = 0, $269 = 0, $2690 = 0, $2691 = 0, $2692 = 0, $2693 = 0, $2694 = 0, $2695 = 0, $2696 = 0, $2697 = 0, $2698 = 0, $2699 = 0, $27 = 0, $270 = 0, $2700 = 0, $2701 = 0, $2702 = 0, $2703 = 0, $2704 = 0, $2705 = 0;
+ var $2706 = 0, $2707 = 0, $2708 = 0, $2709 = 0, $271 = 0, $2710 = 0, $2711 = 0, $2712 = 0, $2713 = 0, $2714 = 0, $2715 = 0, $2716 = 0, $2717 = 0, $2718 = 0, $2719 = 0, $272 = 0, $2720 = 0, $2721 = 0, $2722 = 0, $2723 = 0;
+ var $2724 = 0, $2725 = 0, $2726 = 0, $2727 = 0, $2728 = 0, $2729 = 0, $273 = 0, $2730 = 0, $2731 = 0, $2732 = 0, $2733 = 0, $2734 = 0, $2735 = 0, $2736 = 0, $2737 = 0, $2738 = 0, $2739 = 0, $274 = 0, $2740 = 0, $2741 = 0;
+ var $2742 = 0, $2743 = 0, $2744 = 0, $2745 = 0, $2746 = 0, $2747 = 0, $2748 = 0, $2749 = 0, $275 = 0, $2750 = 0, $2751 = 0, $2752 = 0, $2753 = 0, $2754 = 0, $2755 = 0, $2756 = 0, $2757 = 0, $2758 = 0, $2759 = 0, $276 = 0;
+ var $2760 = 0, $2761 = 0, $2762 = 0, $2763 = 0, $2764 = 0, $2765 = 0, $2766 = 0, $2767 = 0, $2768 = 0, $2769 = 0, $277 = 0, $2770 = 0, $2771 = 0, $2772 = 0, $2773 = 0, $2774 = 0, $2775 = 0, $2776 = 0, $2777 = 0, $2778 = 0;
+ var $2779 = 0, $278 = 0, $2780 = 0, $2781 = 0, $2782 = 0, $2783 = 0, $2784 = 0, $2785 = 0, $2786 = 0, $2787 = 0, $2788 = 0, $2789 = 0, $279 = 0, $2790 = 0, $2791 = 0, $2792 = 0, $2793 = 0, $2794 = 0, $2795 = 0, $2796 = 0;
+ var $2797 = 0, $2798 = 0, $2799 = 0, $28 = 0, $280 = 0, $2800 = 0, $2801 = 0, $2802 = 0, $2803 = 0, $2804 = 0, $2805 = 0, $2806 = 0, $2807 = 0, $2808 = 0, $2809 = 0, $281 = 0, $2810 = 0, $2811 = 0, $2812 = 0, $2813 = 0;
+ var $2814 = 0, $2815 = 0, $2816 = 0, $2817 = 0, $2818 = 0, $2819 = 0, $282 = 0, $2820 = 0, $2821 = 0, $2822 = 0, $2823 = 0, $2824 = 0, $2825 = 0, $2826 = 0, $2827 = 0, $2828 = 0, $2829 = 0, $283 = 0, $2830 = 0, $2831 = 0;
+ var $2832 = 0, $2833 = 0, $2834 = 0, $2835 = 0, $2836 = 0, $2837 = 0, $2838 = 0, $2839 = 0, $284 = 0, $2840 = 0, $2841 = 0, $2842 = 0, $2843 = 0, $2844 = 0, $2845 = 0, $2846 = 0, $2847 = 0, $2848 = 0, $2849 = 0, $285 = 0;
+ var $2850 = 0, $2851 = 0, $2852 = 0, $2853 = 0, $2854 = 0, $2855 = 0, $2856 = 0, $2857 = 0, $2858 = 0, $2859 = 0, $286 = 0, $2860 = 0, $2861 = 0, $2862 = 0, $2863 = 0, $2864 = 0, $2865 = 0, $2866 = 0, $2867 = 0, $2868 = 0;
+ var $2869 = 0, $287 = 0, $2870 = 0, $2871 = 0, $2872 = 0, $2873 = 0, $2874 = 0, $2875 = 0, $2876 = 0, $2877 = 0, $2878 = 0, $2879 = 0, $288 = 0, $2880 = 0, $2881 = 0, $2882 = 0, $2883 = 0, $2884 = 0, $2885 = 0, $2886 = 0;
+ var $2887 = 0, $2888 = 0, $2889 = 0, $289 = 0, $2890 = 0, $2891 = 0, $2892 = 0, $2893 = 0, $2894 = 0, $2895 = 0, $2896 = 0, $2897 = 0, $2898 = 0, $2899 = 0, $29 = 0, $290 = 0, $2900 = 0, $2901 = 0, $2902 = 0, $2903 = 0;
+ var $2904 = 0, $2905 = 0, $2906 = 0, $2907 = 0, $2908 = 0, $2909 = 0, $291 = 0, $2910 = 0, $2911 = 0, $2912 = 0, $2913 = 0, $2914 = 0, $2915 = 0, $2916 = 0, $2917 = 0, $2918 = 0, $2919 = 0, $292 = 0, $2920 = 0, $2921 = 0;
+ var $2922 = 0, $2923 = 0, $2924 = 0, $2925 = 0, $2926 = 0, $2927 = 0, $2928 = 0, $2929 = 0, $293 = 0, $2930 = 0, $2931 = 0, $2932 = 0, $2933 = 0, $2934 = 0, $2935 = 0, $2936 = 0, $2937 = 0, $2938 = 0, $2939 = 0, $294 = 0;
+ var $2940 = 0, $2941 = 0, $2942 = 0, $2943 = 0, $2944 = 0, $2945 = 0, $2946 = 0, $2947 = 0, $2948 = 0, $2949 = 0, $295 = 0, $2950 = 0, $2951 = 0, $2952 = 0, $2953 = 0, $2954 = 0, $2955 = 0, $2956 = 0, $2957 = 0, $2958 = 0;
+ var $2959 = 0, $296 = 0, $2960 = 0, $2961 = 0, $2962 = 0, $2963 = 0, $2964 = 0, $2965 = 0, $2966 = 0, $2967 = 0, $2968 = 0, $2969 = 0, $297 = 0, $2970 = 0, $2971 = 0, $2972 = 0, $2973 = 0, $2974 = 0, $2975 = 0, $2976 = 0;
+ var $2977 = 0, $2978 = 0, $2979 = 0, $298 = 0, $2980 = 0, $2981 = 0, $2982 = 0, $2983 = 0, $2984 = 0, $2985 = 0, $2986 = 0, $2987 = 0, $2988 = 0, $2989 = 0, $299 = 0, $2990 = 0, $2991 = 0, $2992 = 0, $2993 = 0, $2994 = 0;
+ var $2995 = 0, $2996 = 0, $2997 = 0, $2998 = 0, $2999 = 0, $3 = 0, $30 = 0, $300 = 0, $3000 = 0, $3001 = 0, $3002 = 0, $3003 = 0, $3004 = 0, $3005 = 0, $3006 = 0, $3007 = 0, $3008 = 0, $3009 = 0, $301 = 0, $3010 = 0;
+ var $3011 = 0, $3012 = 0, $3013 = 0, $3014 = 0, $3015 = 0, $3016 = 0, $3017 = 0, $3018 = 0, $3019 = 0, $302 = 0, $3020 = 0, $3021 = 0, $3022 = 0, $3023 = 0, $3024 = 0, $3025 = 0, $3026 = 0, $3027 = 0, $3028 = 0, $3029 = 0;
+ var $303 = 0, $3030 = 0, $3031 = 0, $3032 = 0, $3033 = 0, $3034 = 0, $3035 = 0, $3036 = 0, $3037 = 0, $3038 = 0, $3039 = 0, $304 = 0, $3040 = 0, $3041 = 0, $3042 = 0, $3043 = 0, $3044 = 0, $3045 = 0, $3046 = 0, $3047 = 0;
+ var $3048 = 0, $3049 = 0, $305 = 0, $3050 = 0, $3051 = 0, $3052 = 0, $3053 = 0, $3054 = 0, $3055 = 0, $3056 = 0, $3057 = 0, $3058 = 0, $3059 = 0, $306 = 0, $3060 = 0, $3061 = 0, $3062 = 0, $3063 = 0, $3064 = 0, $3065 = 0;
+ var $3066 = 0, $3067 = 0, $3068 = 0, $3069 = 0, $307 = 0, $3070 = 0, $3071 = 0, $3072 = 0, $3073 = 0, $3074 = 0, $3075 = 0, $3076 = 0, $3077 = 0, $3078 = 0, $3079 = 0, $308 = 0, $3080 = 0, $3081 = 0, $3082 = 0, $3083 = 0;
+ var $3084 = 0, $3085 = 0, $3086 = 0, $3087 = 0, $3088 = 0, $3089 = 0, $309 = 0, $3090 = 0, $3091 = 0, $3092 = 0, $3093 = 0, $3094 = 0, $3095 = 0, $3096 = 0, $3097 = 0, $3098 = 0, $3099 = 0, $31 = 0, $310 = 0, $3100 = 0;
+ var $3101 = 0, $3102 = 0, $3103 = 0, $3104 = 0, $3105 = 0, $3106 = 0, $3107 = 0, $3108 = 0, $3109 = 0, $311 = 0, $3110 = 0, $3111 = 0, $3112 = 0, $3113 = 0, $3114 = 0, $3115 = 0, $3116 = 0, $3117 = 0, $3118 = 0, $3119 = 0;
+ var $312 = 0, $3120 = 0, $3121 = 0, $3122 = 0, $3123 = 0, $3124 = 0, $3125 = 0, $3126 = 0, $3127 = 0, $3128 = 0, $3129 = 0, $313 = 0, $3130 = 0, $3131 = 0, $3132 = 0, $3133 = 0, $3134 = 0, $3135 = 0, $3136 = 0, $3137 = 0;
+ var $3138 = 0, $3139 = 0, $314 = 0, $3140 = 0, $3141 = 0, $3142 = 0, $3143 = 0, $3144 = 0, $3145 = 0, $3146 = 0, $3147 = 0, $3148 = 0, $3149 = 0, $315 = 0, $3150 = 0, $3151 = 0, $3152 = 0, $3153 = 0, $3154 = 0, $3155 = 0;
+ var $3156 = 0, $3157 = 0, $3158 = 0, $3159 = 0, $316 = 0, $3160 = 0, $3161 = 0, $3162 = 0, $3163 = 0, $3164 = 0, $3165 = 0, $3166 = 0, $3167 = 0, $3168 = 0, $3169 = 0, $317 = 0, $3170 = 0, $3171 = 0, $3172 = 0, $3173 = 0;
+ var $3174 = 0, $3175 = 0, $3176 = 0, $3177 = 0, $3178 = 0, $3179 = 0, $318 = 0, $3180 = 0, $3181 = 0, $3182 = 0, $3183 = 0, $3184 = 0, $3185 = 0, $3186 = 0, $3187 = 0, $3188 = 0, $3189 = 0, $319 = 0, $3190 = 0, $3191 = 0;
+ var $3192 = 0, $3193 = 0, $3194 = 0, $3195 = 0, $3196 = 0, $3197 = 0, $3198 = 0, $3199 = 0, $32 = 0, $320 = 0, $3200 = 0, $3201 = 0, $3202 = 0, $3203 = 0, $3204 = 0, $3205 = 0, $3206 = 0, $3207 = 0, $3208 = 0, $3209 = 0;
+ var $321 = 0, $3210 = 0, $3211 = 0, $3212 = 0, $3213 = 0, $3214 = 0, $3215 = 0, $3216 = 0, $3217 = 0, $3218 = 0, $3219 = 0, $322 = 0, $3220 = 0, $3221 = 0, $3222 = 0, $3223 = 0, $3224 = 0, $3225 = 0, $3226 = 0, $3227 = 0;
+ var $3228 = 0, $3229 = 0, $323 = 0, $3230 = 0, $3231 = 0, $3232 = 0, $3233 = 0, $3234 = 0, $3235 = 0, $3236 = 0, $3237 = 0, $3238 = 0, $3239 = 0, $324 = 0, $3240 = 0, $3241 = 0, $3242 = 0, $3243 = 0, $3244 = 0, $3245 = 0;
+ var $3246 = 0, $3247 = 0, $3248 = 0, $3249 = 0, $325 = 0, $3250 = 0, $3251 = 0, $3252 = 0, $3253 = 0, $3254 = 0, $3255 = 0, $3256 = 0, $3257 = 0, $3258 = 0, $3259 = 0, $326 = 0, $3260 = 0, $3261 = 0, $3262 = 0, $3263 = 0;
+ var $3264 = 0, $3265 = 0, $3266 = 0, $3267 = 0, $3268 = 0, $3269 = 0, $327 = 0, $3270 = 0, $3271 = 0, $3272 = 0, $3273 = 0, $3274 = 0, $3275 = 0, $3276 = 0, $3277 = 0, $3278 = 0, $3279 = 0, $328 = 0, $3280 = 0, $3281 = 0;
+ var $3282 = 0, $3283 = 0, $3284 = 0, $3285 = 0, $3286 = 0, $3287 = 0, $3288 = 0, $3289 = 0, $329 = 0, $3290 = 0, $3291 = 0, $3292 = 0, $3293 = 0, $3294 = 0, $3295 = 0, $3296 = 0, $3297 = 0, $3298 = 0, $3299 = 0, $33 = 0;
+ var $330 = 0, $3300 = 0, $3301 = 0, $3302 = 0, $3303 = 0, $3304 = 0, $3305 = 0, $3306 = 0, $3307 = 0, $3308 = 0, $3309 = 0, $331 = 0, $3310 = 0, $3311 = 0, $3312 = 0, $3313 = 0, $3314 = 0, $3315 = 0, $3316 = 0, $3317 = 0;
+ var $3318 = 0, $3319 = 0, $332 = 0, $3320 = 0, $3321 = 0, $3322 = 0, $3323 = 0, $3324 = 0, $3325 = 0, $3326 = 0, $3327 = 0, $3328 = 0, $3329 = 0, $333 = 0, $3330 = 0, $3331 = 0, $3332 = 0, $3333 = 0, $3334 = 0, $3335 = 0;
+ var $3336 = 0, $3337 = 0, $3338 = 0, $3339 = 0, $334 = 0, $3340 = 0, $3341 = 0, $3342 = 0, $3343 = 0, $3344 = 0, $3345 = 0, $3346 = 0, $3347 = 0, $3348 = 0, $3349 = 0, $335 = 0, $3350 = 0, $3351 = 0, $3352 = 0, $3353 = 0;
+ var $3354 = 0, $3355 = 0, $3356 = 0, $3357 = 0, $3358 = 0, $3359 = 0, $336 = 0, $3360 = 0, $3361 = 0, $3362 = 0, $3363 = 0, $3364 = 0, $3365 = 0, $3366 = 0, $3367 = 0, $3368 = 0, $3369 = 0, $337 = 0, $3370 = 0, $3371 = 0;
+ var $3372 = 0, $3373 = 0, $3374 = 0, $3375 = 0, $3376 = 0, $3377 = 0, $3378 = 0, $3379 = 0, $338 = 0, $3380 = 0, $3381 = 0, $3382 = 0, $3383 = 0, $3384 = 0, $3385 = 0, $3386 = 0, $3387 = 0, $3388 = 0, $3389 = 0, $339 = 0;
+ var $3390 = 0, $3391 = 0, $3392 = 0, $3393 = 0, $3394 = 0, $3395 = 0, $3396 = 0, $3397 = 0, $3398 = 0, $3399 = 0, $34 = 0, $340 = 0, $3400 = 0, $3401 = 0, $3402 = 0, $3403 = 0, $3404 = 0, $3405 = 0, $3406 = 0, $3407 = 0;
+ var $3408 = 0, $3409 = 0, $341 = 0, $3410 = 0, $3411 = 0, $3412 = 0, $3413 = 0, $3414 = 0, $3415 = 0, $3416 = 0, $3417 = 0, $3418 = 0, $3419 = 0, $342 = 0, $3420 = 0, $3421 = 0, $3422 = 0, $3423 = 0, $3424 = 0, $3425 = 0;
+ var $3426 = 0, $3427 = 0, $3428 = 0, $3429 = 0, $343 = 0, $3430 = 0, $3431 = 0, $3432 = 0, $3433 = 0, $3434 = 0, $3435 = 0, $3436 = 0, $3437 = 0, $3438 = 0, $3439 = 0, $344 = 0, $3440 = 0, $3441 = 0, $3442 = 0, $3443 = 0;
+ var $3444 = 0, $3445 = 0, $3446 = 0, $3447 = 0, $3448 = 0, $3449 = 0, $345 = 0, $3450 = 0, $3451 = 0, $3452 = 0, $3453 = 0, $3454 = 0, $3455 = 0, $3456 = 0, $3457 = 0, $3458 = 0, $3459 = 0, $346 = 0, $3460 = 0, $3461 = 0;
+ var $3462 = 0, $3463 = 0, $3464 = 0, $3465 = 0, $3466 = 0, $3467 = 0, $3468 = 0, $3469 = 0, $347 = 0, $3470 = 0, $3471 = 0, $3472 = 0, $3473 = 0, $3474 = 0, $3475 = 0, $3476 = 0, $3477 = 0, $3478 = 0, $3479 = 0, $348 = 0;
+ var $3480 = 0, $3481 = 0, $3482 = 0, $3483 = 0, $3484 = 0, $3485 = 0, $3486 = 0, $3487 = 0, $3488 = 0, $3489 = 0, $349 = 0, $3490 = 0, $3491 = 0, $3492 = 0, $3493 = 0, $3494 = 0, $3495 = 0, $3496 = 0, $3497 = 0, $3498 = 0;
+ var $3499 = 0, $35 = 0, $350 = 0, $3500 = 0, $3501 = 0, $3502 = 0, $3503 = 0, $3504 = 0, $3505 = 0, $3506 = 0, $3507 = 0, $3508 = 0, $3509 = 0, $351 = 0, $3510 = 0, $3511 = 0, $3512 = 0, $3513 = 0, $3514 = 0, $3515 = 0;
+ var $3516 = 0, $3517 = 0, $3518 = 0, $3519 = 0, $352 = 0, $3520 = 0, $3521 = 0, $3522 = 0, $3523 = 0, $3524 = 0, $3525 = 0, $3526 = 0, $3527 = 0, $3528 = 0, $3529 = 0, $353 = 0, $3530 = 0, $3531 = 0, $3532 = 0, $3533 = 0;
+ var $3534 = 0, $3535 = 0, $3536 = 0, $3537 = 0, $3538 = 0, $3539 = 0, $354 = 0, $3540 = 0, $3541 = 0, $3542 = 0, $3543 = 0, $3544 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0;
+ var $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0;
+ var $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0;
+ var $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0;
+ var $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0;
+ var $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0;
+ var $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0;
+ var $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0;
+ var $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0;
+ var $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0;
+ var $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0;
+ var $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0;
+ var $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0;
+ var $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0;
+ var $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0;
+ var $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0;
+ var $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0;
+ var $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0;
+ var $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0;
+ var $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0;
+ var $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0;
+ var $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0;
+ var $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0;
+ var $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0;
+ var $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0;
+ var $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0;
+ var $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0;
+ var $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0;
+ var $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0;
+ var $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0;
+ var $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0;
+ var $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0;
+ var $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0;
+ var $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0;
+ var $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0;
+ var $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0;
+ var $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $buf = 0, $inf = 0, $inf2 = 0, $inf3 = 0, $or$cond = 0, $or$cond11 = 0, $or$cond3 = 0, $or$cond5 = 0, $or$cond7 = 0, $or$cond9 = 0, $vararg_buffer = 0, $yyalloc = 0, $yychar = 0;
+ var $yyerrstatus = 0, $yylen = 0, $yylval = 0, $yymsg = 0, $yymsg_alloc = 0, $yymsgbuf = 0, $yyn = 0, $yynerrs = 0, $yynewbytes = 0, $yynewbytes1 = 0, $yyptr = 0, $yyresult = 0, $yysize = 0, $yysize4 = 0, $yyss = 0, $yyss1 = 0, $yyssa = 0, $yyssp = 0, $yystacksize = 0, $yystate = 0;
+ var $yytoken = 0, $yyval = 0, $yyvs = 0, $yyvsa = 0, $yyvsp = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 1472|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $yylval = sp + 908|0;
+ $yyssa = sp + 920|0;
+ $yyvsa = sp + 88|0;
+ $yyval = sp + 56|0;
+ $yymsgbuf = sp + 1336|0;
+ $buf = sp + 1320|0;
+ $0 = $p;
+ $yymsg = $yymsgbuf;
+ $yymsg_alloc = 128;
+ $yylen = 0;
+ $yytoken = 0;
+ $yyss = $yyssa;
+ $yyvs = $yyvsa;
+ $yystacksize = 200;
+ $yystate = 0;
+ $yyerrstatus = 0;
+ $yynerrs = 0;
+ $yychar = -2;
+ $1 = $yyss;
+ $yyssp = $1;
+ $2 = $yyvs;
+ $yyvsp = $2;
+ L1: while(1) {
+  $5 = $yystate;
+  $6 = $5&65535;
+  $7 = $yyssp;
+  HEAP16[$7>>1] = $6;
+  $8 = $yyss;
+  $9 = $yystacksize;
+  $10 = (($8) + ($9<<1)|0);
+  $11 = ((($10)) + -2|0);
+  $12 = $yyssp;
+  $13 = ($11>>>0)<=($12>>>0);
+  if ($13) {
+   $14 = $yyssp;
+   $15 = $yyss;
+   $16 = $14;
+   $17 = $15;
+   $18 = (($16) - ($17))|0;
+   $19 = (($18|0) / 2)&-1;
+   $20 = (($19) + 1)|0;
+   $yysize = $20;
+   $21 = $yystacksize;
+   $22 = (10000)<=($21>>>0);
+   if ($22) {
+    label = 535;
+    break;
+   }
+   $23 = $yystacksize;
+   $24 = $23<<1;
+   $yystacksize = $24;
+   $25 = $yystacksize;
+   $26 = (10000)<($25>>>0);
+   $$ = $26 ? 10000 : $24;
+   $yystacksize = $$;
+   $27 = $yyss;
+   $yyss1 = $27;
+   $28 = $0;
+   $29 = HEAP32[$28>>2]|0;
+   $30 = $yystacksize;
+   $31 = ($30*6)|0;
+   $32 = (($31) + 3)|0;
+   $33 = (_mrb_malloc($29,$32)|0);
+   $yyptr = $33;
+   $34 = $yyptr;
+   $35 = ($34|0)!=(0|0);
+   if (!($35)) {
+    label = 535;
+    break;
+   }
+   $36 = $yyptr;
+   $37 = $yyss;
+   $38 = $yysize;
+   $39 = $38<<1;
+   _memcpy(($36|0),($37|0),($39|0))|0;
+   $40 = $yyptr;
+   $yyss = $40;
+   $41 = $yystacksize;
+   $42 = $41<<1;
+   $43 = (($42) + 3)|0;
+   $yynewbytes = $43;
+   $44 = $yynewbytes;
+   $45 = (($44>>>0) / 4)&-1;
+   $46 = $yyptr;
+   $47 = (($46) + ($45<<2)|0);
+   $yyptr = $47;
+   $48 = $yyptr;
+   $49 = $yyvs;
+   $50 = $yysize;
+   $51 = $50<<2;
+   _memcpy(($48|0),($49|0),($51|0))|0;
+   $52 = $yyptr;
+   $yyvs = $52;
+   $53 = $yystacksize;
+   $54 = $53<<2;
+   $55 = (($54) + 3)|0;
+   $yynewbytes1 = $55;
+   $56 = $yynewbytes1;
+   $57 = (($56>>>0) / 4)&-1;
+   $58 = $yyptr;
+   $59 = (($58) + ($57<<2)|0);
+   $yyptr = $59;
+   $60 = $yyss1;
+   $61 = ($60|0)!=($yyssa|0);
+   if ($61) {
+    $62 = $0;
+    $63 = HEAP32[$62>>2]|0;
+    $64 = $yyss1;
+    _mrb_free($63,$64);
+   }
+   $65 = $yyss;
+   $66 = $yysize;
+   $67 = (($65) + ($66<<1)|0);
+   $68 = ((($67)) + -2|0);
+   $yyssp = $68;
+   $69 = $yyvs;
+   $70 = $yysize;
+   $71 = (($69) + ($70<<2)|0);
+   $72 = ((($71)) + -4|0);
+   $yyvsp = $72;
+   $73 = $yyss;
+   $74 = $yystacksize;
+   $75 = (($73) + ($74<<1)|0);
+   $76 = ((($75)) + -2|0);
+   $77 = $yyssp;
+   $78 = ($76>>>0)<=($77>>>0);
+   if ($78) {
+    label = 534;
+    break;
+   }
+  }
+  $79 = $yystate;
+  $80 = ($79|0)==(3);
+  if ($80) {
+   label = 533;
+   break;
+  }
+  $81 = $yystate;
+  $82 = (3044 + ($81<<1)|0);
+  $83 = HEAP16[$82>>1]|0;
+  $84 = $83 << 16 >> 16;
+  $yyn = $84;
+  $85 = $yyn;
+  $86 = ($85|0)==(-771);
+  do {
+   if ($86) {
+    label = 26;
+   } else {
+    $87 = $yychar;
+    $88 = ($87|0)==(-2);
+    if ($88) {
+     $89 = $0;
+     $90 = (_yylex($yylval,$89)|0);
+     $yychar = $90;
+    }
+    $91 = $yychar;
+    $92 = ($91|0)<=(0);
+    if ($92) {
+     $yytoken = 0;
+     $yychar = 0;
+    } else {
+     $93 = $yychar;
+     $94 = ($93>>>0)<=(372);
+     if ($94) {
+      $95 = $yychar;
+      $96 = (58359 + ($95)|0);
+      $97 = HEAP8[$96>>0]|0;
+      $98 = $97&255;
+      $99 = $98;
+     } else {
+      $99 = 2;
+     }
+     $yytoken = $99;
+    }
+    $100 = $yytoken;
+    $101 = $yyn;
+    $102 = (($101) + ($100))|0;
+    $yyn = $102;
+    $103 = $yyn;
+    $104 = ($103|0)<(0);
+    $105 = $yyn;
+    $106 = (10639)<($105|0);
+    $or$cond = $104 | $106;
+    if ($or$cond) {
+     label = 26;
+    } else {
+     $107 = $yyn;
+     $108 = (4980 + ($107<<1)|0);
+     $109 = HEAP16[$108>>1]|0;
+     $110 = $109 << 16 >> 16;
+     $111 = $yytoken;
+     $112 = ($110|0)!=($111|0);
+     if ($112) {
+      label = 26;
+     } else {
+      $113 = $yyn;
+      $114 = (26260 + ($113<<1)|0);
+      $115 = HEAP16[$114>>1]|0;
+      $116 = $115 << 16 >> 16;
+      $yyn = $116;
+      $117 = $yyn;
+      $118 = ($117|0)<=(0);
+      if ($118) {
+       $119 = $yyn;
+       $120 = ($119|0)==(0);
+       $121 = $yyn;
+       $122 = ($121|0)==(-556);
+       $or$cond3 = $120 | $122;
+       if ($or$cond3) {
+        label = 510;
+        break;
+       }
+       $123 = $yyn;
+       $124 = (0 - ($123))|0;
+       $yyn = $124;
+       label = 27;
+       break;
+      }
+      $125 = $yyerrstatus;
+      $126 = ($125|0)!=(0);
+      if ($126) {
+       $127 = $yyerrstatus;
+       $128 = (($127) + -1)|0;
+       $yyerrstatus = $128;
+      }
+      $yychar = -2;
+      $129 = $yyn;
+      $yystate = $129;
+      $130 = $yyvsp;
+      $131 = ((($130)) + 4|0);
+      $yyvsp = $131;
+      ;HEAP32[$131>>2]=HEAP32[$yylval>>2]|0;
+     }
+    }
+   }
+  } while(0);
+  if ((label|0) == 26) {
+   label = 0;
+   $132 = $yystate;
+   $133 = (47540 + ($132<<1)|0);
+   $134 = HEAP16[$133>>1]|0;
+   $135 = $134&65535;
+   $yyn = $135;
+   $136 = $yyn;
+   $137 = ($136|0)==(0);
+   if ($137) {
+    label = 510;
+   } else {
+    label = 27;
+   }
+  }
+  do {
+   if ((label|0) == 27) {
+    label = 0;
+    $138 = $yyn;
+    $139 = (58732 + ($138)|0);
+    $140 = HEAP8[$139>>0]|0;
+    $141 = $140&255;
+    $yylen = $141;
+    $142 = $yylen;
+    $143 = (1 - ($142))|0;
+    $144 = $yyvsp;
+    $145 = (($144) + ($143<<2)|0);
+    ;HEAP32[$yyval>>2]=HEAP32[$145>>2]|0;
+    $146 = $yyn;
+    L69: do {
+     switch ($146|0) {
+     case 2:  {
+      $147 = $0;
+      $148 = ((($147)) + 40|0);
+      HEAP32[$148>>2] = 0;
+      $149 = $0;
+      $150 = ((($149)) + 76|0);
+      $151 = HEAP32[$150>>2]|0;
+      $152 = ($151|0)!=(0|0);
+      if (!($152)) {
+       $153 = $0;
+       $154 = (_cons_gen($153,0,0)|0);
+       $155 = $0;
+       $156 = ((($155)) + 76|0);
+       HEAP32[$156>>2] = $154;
+      }
+      break;
+     }
+     case 3:  {
+      $157 = $0;
+      $158 = $yyvsp;
+      $159 = HEAP32[$158>>2]|0;
+      $160 = (_new_scope($157,$159)|0);
+      $161 = $0;
+      $162 = ((($161)) + 1144|0);
+      HEAP32[$162>>2] = $160;
+      $163 = $yyvsp;
+      $164 = HEAP32[$163>>2]|0;
+      $165 = ($164|0)!=(0|0);
+      if ($165) {
+       $166 = $yyvsp;
+       $167 = HEAP32[$166>>2]|0;
+       $168 = ((($167)) + 10|0);
+       $169 = HEAP16[$168>>1]|0;
+       $170 = $0;
+       $171 = ((($170)) + 1144|0);
+       $172 = HEAP32[$171>>2]|0;
+       $173 = ((($172)) + 10|0);
+       HEAP16[$173>>1] = $169;
+       $174 = $yyvsp;
+       $175 = HEAP32[$174>>2]|0;
+       $176 = ((($175)) + 8|0);
+       $177 = HEAP16[$176>>1]|0;
+       $178 = $0;
+       $179 = ((($178)) + 1144|0);
+       $180 = HEAP32[$179>>2]|0;
+       $181 = ((($180)) + 8|0);
+       HEAP16[$181>>1] = $177;
+      }
+      break;
+     }
+     case 4:  {
+      $182 = $yyvsp;
+      $183 = ((($182)) + -4|0);
+      $184 = HEAP32[$183>>2]|0;
+      HEAP32[$yyval>>2] = $184;
+      break;
+     }
+     case 5:  {
+      $185 = $0;
+      $186 = (_new_begin($185,0)|0);
+      HEAP32[$yyval>>2] = $186;
+      break;
+     }
+     case 6:  {
+      $187 = $0;
+      $188 = $yyvsp;
+      $189 = HEAP32[$188>>2]|0;
+      $190 = (_new_begin($187,$189)|0);
+      HEAP32[$yyval>>2] = $190;
+      $191 = $yyvsp;
+      $192 = HEAP32[$191>>2]|0;
+      $193 = ($192|0)!=(0|0);
+      if ($193) {
+       $194 = $yyvsp;
+       $195 = HEAP32[$194>>2]|0;
+       $196 = ((($195)) + 10|0);
+       $197 = HEAP16[$196>>1]|0;
+       $198 = HEAP32[$yyval>>2]|0;
+       $199 = ((($198)) + 10|0);
+       HEAP16[$199>>1] = $197;
+       $200 = $yyvsp;
+       $201 = HEAP32[$200>>2]|0;
+       $202 = ((($201)) + 8|0);
+       $203 = HEAP16[$202>>1]|0;
+       $204 = HEAP32[$yyval>>2]|0;
+       $205 = ((($204)) + 8|0);
+       HEAP16[$205>>1] = $203;
+      }
+      break;
+     }
+     case 7:  {
+      $206 = $0;
+      $207 = $yyvsp;
+      $208 = ((($207)) + -8|0);
+      $209 = HEAP32[$208>>2]|0;
+      $210 = $0;
+      $211 = $yyvsp;
+      $212 = HEAP32[$211>>2]|0;
+      $213 = (_list1_gen($210,$212)|0);
+      $214 = (_append_gen($206,$209,$213)|0);
+      HEAP32[$yyval>>2] = $214;
+      break;
+     }
+     case 8:  {
+      $215 = $0;
+      $216 = (_new_begin($215,0)|0);
+      HEAP32[$yyval>>2] = $216;
+      break;
+     }
+     case 10:  {
+      $217 = $0;
+      $218 = (_local_switch($217)|0);
+      HEAP32[$yyval>>2] = $218;
+      break;
+     }
+     case 11:  {
+      $219 = $0;
+      _yyerror($219,59288);
+      $220 = $0;
+      $221 = $yyvsp;
+      $222 = ((($221)) + -12|0);
+      $223 = HEAP32[$222>>2]|0;
+      _local_resume($220,$223);
+      HEAP32[$yyval>>2] = 0;
+      break;
+     }
+     case 12:  {
+      $224 = $yyvsp;
+      $225 = ((($224)) + -8|0);
+      $226 = HEAP32[$225>>2]|0;
+      $227 = ($226|0)!=(0|0);
+      do {
+       if ($227) {
+        $228 = $0;
+        $229 = $yyvsp;
+        $230 = ((($229)) + -12|0);
+        $231 = HEAP32[$230>>2]|0;
+        $232 = $yyvsp;
+        $233 = ((($232)) + -8|0);
+        $234 = HEAP32[$233>>2]|0;
+        $235 = $yyvsp;
+        $236 = ((($235)) + -4|0);
+        $237 = HEAP32[$236>>2]|0;
+        $238 = (_new_rescue($228,$231,$234,$237)|0);
+        HEAP32[$yyval>>2] = $238;
+        $239 = $yyvsp;
+        $240 = ((($239)) + -12|0);
+        $241 = HEAP32[$240>>2]|0;
+        $242 = ($241|0)!=(0|0);
+        if ($242) {
+         $243 = $yyvsp;
+         $244 = ((($243)) + -12|0);
+         $245 = HEAP32[$244>>2]|0;
+         $246 = ((($245)) + 10|0);
+         $247 = HEAP16[$246>>1]|0;
+         $248 = HEAP32[$yyval>>2]|0;
+         $249 = ((($248)) + 10|0);
+         HEAP16[$249>>1] = $247;
+         $250 = $yyvsp;
+         $251 = ((($250)) + -12|0);
+         $252 = HEAP32[$251>>2]|0;
+         $253 = ((($252)) + 8|0);
+         $254 = HEAP16[$253>>1]|0;
+         $255 = HEAP32[$yyval>>2]|0;
+         $256 = ((($255)) + 8|0);
+         HEAP16[$256>>1] = $254;
+        }
+       } else {
+        $257 = $yyvsp;
+        $258 = ((($257)) + -4|0);
+        $259 = HEAP32[$258>>2]|0;
+        $260 = ($259|0)!=(0|0);
+        if ($260) {
+         $261 = $0;
+         _yywarn($261,59308);
+         $262 = $0;
+         $263 = $yyvsp;
+         $264 = ((($263)) + -12|0);
+         $265 = HEAP32[$264>>2]|0;
+         $266 = $0;
+         $267 = $yyvsp;
+         $268 = ((($267)) + -4|0);
+         $269 = HEAP32[$268>>2]|0;
+         $270 = (_list1_gen($266,$269)|0);
+         $271 = (_append_gen($262,$265,$270)|0);
+         HEAP32[$yyval>>2] = $271;
+         break;
+        } else {
+         $272 = $yyvsp;
+         $273 = ((($272)) + -12|0);
+         $274 = HEAP32[$273>>2]|0;
+         HEAP32[$yyval>>2] = $274;
+         break;
+        }
+       }
+      } while(0);
+      $275 = $yyvsp;
+      $276 = HEAP32[$275>>2]|0;
+      $277 = ($276|0)!=(0|0);
+      if ($277) {
+       $278 = HEAP32[$yyval>>2]|0;
+       $279 = ($278|0)!=(0|0);
+       $280 = $0;
+       if ($279) {
+        $281 = HEAP32[$yyval>>2]|0;
+        $282 = $yyvsp;
+        $283 = HEAP32[$282>>2]|0;
+        $284 = (_new_ensure($280,$281,$283)|0);
+        HEAP32[$yyval>>2] = $284;
+        break L69;
+       } else {
+        $285 = $yyvsp;
+        $286 = HEAP32[$285>>2]|0;
+        $287 = $0;
+        $288 = $0;
+        $289 = (_new_nil($288)|0);
+        $290 = (_list1_gen($287,$289)|0);
+        $291 = (_append_gen($280,$286,$290)|0);
+        HEAP32[$yyval>>2] = $291;
+        break L69;
+       }
+      }
+      break;
+     }
+     case 13:  {
+      $292 = $yyvsp;
+      $293 = ((($292)) + -4|0);
+      $294 = HEAP32[$293>>2]|0;
+      HEAP32[$yyval>>2] = $294;
+      break;
+     }
+     case 14:  {
+      $295 = $0;
+      $296 = (_new_begin($295,0)|0);
+      HEAP32[$yyval>>2] = $296;
+      break;
+     }
+     case 15:  {
+      $297 = $0;
+      $298 = $yyvsp;
+      $299 = HEAP32[$298>>2]|0;
+      $300 = (_new_begin($297,$299)|0);
+      HEAP32[$yyval>>2] = $300;
+      $301 = $yyvsp;
+      $302 = HEAP32[$301>>2]|0;
+      $303 = ($302|0)!=(0|0);
+      if ($303) {
+       $304 = $yyvsp;
+       $305 = HEAP32[$304>>2]|0;
+       $306 = ((($305)) + 10|0);
+       $307 = HEAP16[$306>>1]|0;
+       $308 = HEAP32[$yyval>>2]|0;
+       $309 = ((($308)) + 10|0);
+       HEAP16[$309>>1] = $307;
+       $310 = $yyvsp;
+       $311 = HEAP32[$310>>2]|0;
+       $312 = ((($311)) + 8|0);
+       $313 = HEAP16[$312>>1]|0;
+       $314 = HEAP32[$yyval>>2]|0;
+       $315 = ((($314)) + 8|0);
+       HEAP16[$315>>1] = $313;
+      }
+      break;
+     }
+     case 16:  {
+      $316 = $0;
+      $317 = $yyvsp;
+      $318 = ((($317)) + -8|0);
+      $319 = HEAP32[$318>>2]|0;
+      $320 = $0;
+      $321 = $yyvsp;
+      $322 = HEAP32[$321>>2]|0;
+      $323 = (_list1_gen($320,$322)|0);
+      $324 = (_append_gen($316,$319,$323)|0);
+      HEAP32[$yyval>>2] = $324;
+      break;
+     }
+     case 17:  {
+      $325 = $0;
+      $326 = $yyvsp;
+      $327 = HEAP32[$326>>2]|0;
+      $328 = (_new_begin($325,$327)|0);
+      HEAP32[$yyval>>2] = $328;
+      break;
+     }
+     case 18:  {
+      $329 = $0;
+      $330 = ((($329)) + 40|0);
+      HEAP32[$330>>2] = 7;
+      break;
+     }
+     case 19:  {
+      $331 = $0;
+      $332 = $yyvsp;
+      $333 = ((($332)) + -8|0);
+      $334 = HEAP32[$333>>2]|0;
+      $335 = $yyvsp;
+      $336 = HEAP32[$335>>2]|0;
+      $337 = (_new_alias($331,$334,$336)|0);
+      HEAP32[$yyval>>2] = $337;
+      break;
+     }
+     case 20:  {
+      $338 = $yyvsp;
+      $339 = HEAP32[$338>>2]|0;
+      HEAP32[$yyval>>2] = $339;
+      break;
+     }
+     case 21:  {
+      $340 = $0;
+      $341 = $yyvsp;
+      $342 = HEAP32[$341>>2]|0;
+      $343 = (_cond($342)|0);
+      $344 = $yyvsp;
+      $345 = ((($344)) + -8|0);
+      $346 = HEAP32[$345>>2]|0;
+      $347 = (_new_if($340,$343,$346,0)|0);
+      HEAP32[$yyval>>2] = $347;
+      break;
+     }
+     case 22:  {
+      $348 = $0;
+      $349 = $yyvsp;
+      $350 = HEAP32[$349>>2]|0;
+      $351 = (_cond($350)|0);
+      $352 = $yyvsp;
+      $353 = ((($352)) + -8|0);
+      $354 = HEAP32[$353>>2]|0;
+      $355 = (_new_unless($348,$351,$354,0)|0);
+      HEAP32[$yyval>>2] = $355;
+      break;
+     }
+     case 23:  {
+      $356 = $0;
+      $357 = $yyvsp;
+      $358 = HEAP32[$357>>2]|0;
+      $359 = (_cond($358)|0);
+      $360 = $yyvsp;
+      $361 = ((($360)) + -8|0);
+      $362 = HEAP32[$361>>2]|0;
+      $363 = (_new_while($356,$359,$362)|0);
+      HEAP32[$yyval>>2] = $363;
+      break;
+     }
+     case 24:  {
+      $364 = $0;
+      $365 = $yyvsp;
+      $366 = HEAP32[$365>>2]|0;
+      $367 = (_cond($366)|0);
+      $368 = $yyvsp;
+      $369 = ((($368)) + -8|0);
+      $370 = HEAP32[$369>>2]|0;
+      $371 = (_new_until($364,$367,$370)|0);
+      HEAP32[$yyval>>2] = $371;
+      break;
+     }
+     case 25:  {
+      $372 = $0;
+      $373 = $yyvsp;
+      $374 = ((($373)) + -8|0);
+      $375 = HEAP32[$374>>2]|0;
+      $376 = $0;
+      $377 = $0;
+      $378 = $yyvsp;
+      $379 = HEAP32[$378>>2]|0;
+      $380 = (_list3_gen($377,0,0,$379)|0);
+      $381 = (_list1_gen($376,$380)|0);
+      $382 = (_new_rescue($372,$375,$381,0)|0);
+      HEAP32[$yyval>>2] = $382;
+      break;
+     }
+     case 26:  {
+      $383 = $0;
+      _yyerror($383,59339);
+      $384 = $0;
+      $385 = $yyvsp;
+      $386 = ((($385)) + -4|0);
+      $387 = HEAP32[$386>>2]|0;
+      $388 = (_new_postexe($384,$387)|0);
+      HEAP32[$yyval>>2] = $388;
+      break;
+     }
+     case 28:  {
+      $389 = $0;
+      $390 = $yyvsp;
+      $391 = ((($390)) + -8|0);
+      $392 = HEAP32[$391>>2]|0;
+      $393 = $yyvsp;
+      $394 = HEAP32[$393>>2]|0;
+      $395 = (_new_masgn($389,$392,$394)|0);
+      HEAP32[$yyval>>2] = $395;
+      break;
+     }
+     case 29:  {
+      $396 = $0;
+      $397 = $yyvsp;
+      $398 = ((($397)) + -8|0);
+      $399 = HEAP32[$398>>2]|0;
+      $400 = $yyvsp;
+      $401 = ((($400)) + -4|0);
+      $402 = HEAP32[$401>>2]|0;
+      $403 = $yyvsp;
+      $404 = HEAP32[$403>>2]|0;
+      $405 = (_new_op_asgn($396,$399,$402,$404)|0);
+      HEAP32[$yyval>>2] = $405;
+      break;
+     }
+     case 30:  {
+      $406 = $0;
+      $407 = $0;
+      $408 = $yyvsp;
+      $409 = ((($408)) + -20|0);
+      $410 = HEAP32[$409>>2]|0;
+      $411 = $0;
+      $412 = (_intern_gen($411,68841,2)|0);
+      $413 = $yyvsp;
+      $414 = ((($413)) + -12|0);
+      $415 = HEAP32[$414>>2]|0;
+      $416 = (_new_call($407,$410,$412,$415)|0);
+      $417 = $yyvsp;
+      $418 = ((($417)) + -4|0);
+      $419 = HEAP32[$418>>2]|0;
+      $420 = $yyvsp;
+      $421 = HEAP32[$420>>2]|0;
+      $422 = (_new_op_asgn($406,$416,$419,$421)|0);
+      HEAP32[$yyval>>2] = $422;
+      break;
+     }
+     case 31:  {
+      $423 = $0;
+      $424 = $0;
+      $425 = $yyvsp;
+      $426 = ((($425)) + -16|0);
+      $427 = HEAP32[$426>>2]|0;
+      $428 = $yyvsp;
+      $429 = ((($428)) + -8|0);
+      $430 = HEAP32[$429>>2]|0;
+      $431 = (_new_call($424,$427,$430,0)|0);
+      $432 = $yyvsp;
+      $433 = ((($432)) + -4|0);
+      $434 = HEAP32[$433>>2]|0;
+      $435 = $yyvsp;
+      $436 = HEAP32[$435>>2]|0;
+      $437 = (_new_op_asgn($423,$431,$434,$436)|0);
+      HEAP32[$yyval>>2] = $437;
+      break;
+     }
+     case 32:  {
+      $438 = $0;
+      $439 = $0;
+      $440 = $yyvsp;
+      $441 = ((($440)) + -16|0);
+      $442 = HEAP32[$441>>2]|0;
+      $443 = $yyvsp;
+      $444 = ((($443)) + -8|0);
+      $445 = HEAP32[$444>>2]|0;
+      $446 = (_new_call($439,$442,$445,0)|0);
+      $447 = $yyvsp;
+      $448 = ((($447)) + -4|0);
+      $449 = HEAP32[$448>>2]|0;
+      $450 = $yyvsp;
+      $451 = HEAP32[$450>>2]|0;
+      $452 = (_new_op_asgn($438,$446,$449,$451)|0);
+      HEAP32[$yyval>>2] = $452;
+      break;
+     }
+     case 33:  {
+      $453 = $0;
+      _yyerror($453,59356);
+      HEAP32[$yyval>>2] = 0;
+      break;
+     }
+     case 34:  {
+      $454 = $0;
+      $455 = $0;
+      $456 = $yyvsp;
+      $457 = ((($456)) + -16|0);
+      $458 = HEAP32[$457>>2]|0;
+      $459 = $yyvsp;
+      $460 = ((($459)) + -8|0);
+      $461 = HEAP32[$460>>2]|0;
+      $462 = (_new_call($455,$458,$461,0)|0);
+      $463 = $yyvsp;
+      $464 = ((($463)) + -4|0);
+      $465 = HEAP32[$464>>2]|0;
+      $466 = $yyvsp;
+      $467 = HEAP32[$466>>2]|0;
+      $468 = (_new_op_asgn($454,$462,$465,$467)|0);
+      HEAP32[$yyval>>2] = $468;
+      break;
+     }
+     case 35:  {
+      $469 = $0;
+      $470 = $yyvsp;
+      $471 = ((($470)) + -8|0);
+      $472 = HEAP32[$471>>2]|0;
+      _backref_error($469,$472);
+      $473 = $0;
+      $474 = (_new_begin($473,0)|0);
+      HEAP32[$yyval>>2] = $474;
+      break;
+     }
+     case 36:  {
+      $475 = $0;
+      $476 = $yyvsp;
+      $477 = ((($476)) + -8|0);
+      $478 = HEAP32[$477>>2]|0;
+      $479 = $0;
+      $480 = $yyvsp;
+      $481 = HEAP32[$480>>2]|0;
+      $482 = (_new_array($479,$481)|0);
+      $483 = (_new_asgn($475,$478,$482)|0);
+      HEAP32[$yyval>>2] = $483;
+      break;
+     }
+     case 37:  {
+      $484 = $0;
+      $485 = $yyvsp;
+      $486 = ((($485)) + -8|0);
+      $487 = HEAP32[$486>>2]|0;
+      $488 = $yyvsp;
+      $489 = HEAP32[$488>>2]|0;
+      $490 = (_new_masgn($484,$487,$489)|0);
+      HEAP32[$yyval>>2] = $490;
+      break;
+     }
+     case 38:  {
+      $491 = $0;
+      $492 = $yyvsp;
+      $493 = ((($492)) + -8|0);
+      $494 = HEAP32[$493>>2]|0;
+      $495 = $0;
+      $496 = $yyvsp;
+      $497 = HEAP32[$496>>2]|0;
+      $498 = (_new_array($495,$497)|0);
+      $499 = (_new_masgn($491,$494,$498)|0);
+      HEAP32[$yyval>>2] = $499;
+      break;
+     }
+     case 40:  {
+      $500 = $0;
+      $501 = $yyvsp;
+      $502 = ((($501)) + -8|0);
+      $503 = HEAP32[$502>>2]|0;
+      $504 = $yyvsp;
+      $505 = HEAP32[$504>>2]|0;
+      $506 = (_new_asgn($500,$503,$505)|0);
+      HEAP32[$yyval>>2] = $506;
+      break;
+     }
+     case 41:  {
+      $507 = $0;
+      $508 = $yyvsp;
+      $509 = ((($508)) + -8|0);
+      $510 = HEAP32[$509>>2]|0;
+      $511 = $yyvsp;
+      $512 = HEAP32[$511>>2]|0;
+      $513 = (_new_asgn($507,$510,$512)|0);
+      HEAP32[$yyval>>2] = $513;
+      break;
+     }
+     case 43:  {
+      $514 = $0;
+      $515 = $yyvsp;
+      $516 = ((($515)) + -8|0);
+      $517 = HEAP32[$516>>2]|0;
+      $518 = $yyvsp;
+      $519 = HEAP32[$518>>2]|0;
+      $520 = (_new_and($514,$517,$519)|0);
+      HEAP32[$yyval>>2] = $520;
+      break;
+     }
+     case 44:  {
+      $521 = $0;
+      $522 = $yyvsp;
+      $523 = ((($522)) + -8|0);
+      $524 = HEAP32[$523>>2]|0;
+      $525 = $yyvsp;
+      $526 = HEAP32[$525>>2]|0;
+      $527 = (_new_or($521,$524,$526)|0);
+      HEAP32[$yyval>>2] = $527;
+      break;
+     }
+     case 45:  {
+      $528 = $0;
+      $529 = $yyvsp;
+      $530 = HEAP32[$529>>2]|0;
+      $531 = (_cond($530)|0);
+      $532 = (_call_uni_op($528,$531,65320)|0);
+      HEAP32[$yyval>>2] = $532;
+      break;
+     }
+     case 46:  {
+      $533 = $0;
+      $534 = $yyvsp;
+      $535 = HEAP32[$534>>2]|0;
+      $536 = (_cond($535)|0);
+      $537 = (_call_uni_op($533,$536,65320)|0);
+      HEAP32[$yyval>>2] = $537;
+      break;
+     }
+     case 48:  {
+      $538 = $yyvsp;
+      $539 = HEAP32[$538>>2]|0;
+      $540 = ($539|0)!=(0|0);
+      if ($540) {
+       $543 = $yyvsp;
+       $544 = HEAP32[$543>>2]|0;
+       HEAP32[$yyval>>2] = $544;
+       break L69;
+      } else {
+       $541 = $0;
+       $542 = (_new_nil($541)|0);
+       HEAP32[$yyval>>2] = $542;
+       break L69;
+      }
+      break;
+     }
+     case 53:  {
+      $545 = $0;
+      _local_nest($545);
+      break;
+     }
+     case 54:  {
+      $546 = $0;
+      $547 = $yyvsp;
+      $548 = ((($547)) + -8|0);
+      $549 = HEAP32[$548>>2]|0;
+      $550 = $yyvsp;
+      $551 = ((($550)) + -4|0);
+      $552 = HEAP32[$551>>2]|0;
+      $553 = (_new_block($546,$549,$552)|0);
+      HEAP32[$yyval>>2] = $553;
+      $554 = $0;
+      _local_unnest($554);
+      break;
+     }
+     case 55:  {
+      $555 = $0;
+      $556 = $yyvsp;
+      $557 = ((($556)) + -4|0);
+      $558 = HEAP32[$557>>2]|0;
+      $559 = $yyvsp;
+      $560 = HEAP32[$559>>2]|0;
+      $561 = (_new_fcall($555,$558,$560)|0);
+      HEAP32[$yyval>>2] = $561;
+      break;
+     }
+     case 56:  {
+      $562 = $0;
+      $563 = $yyvsp;
+      $564 = ((($563)) + -4|0);
+      $565 = HEAP32[$564>>2]|0;
+      $566 = $yyvsp;
+      $567 = HEAP32[$566>>2]|0;
+      _args_with_block($562,$565,$567);
+      $568 = $0;
+      $569 = $yyvsp;
+      $570 = ((($569)) + -8|0);
+      $571 = HEAP32[$570>>2]|0;
+      $572 = $yyvsp;
+      $573 = ((($572)) + -4|0);
+      $574 = HEAP32[$573>>2]|0;
+      $575 = (_new_fcall($568,$571,$574)|0);
+      HEAP32[$yyval>>2] = $575;
+      break;
+     }
+     case 57:  {
+      $576 = $0;
+      $577 = $yyvsp;
+      $578 = ((($577)) + -12|0);
+      $579 = HEAP32[$578>>2]|0;
+      $580 = $yyvsp;
+      $581 = ((($580)) + -4|0);
+      $582 = HEAP32[$581>>2]|0;
+      $583 = $yyvsp;
+      $584 = HEAP32[$583>>2]|0;
+      $585 = (_new_call($576,$579,$582,$584)|0);
+      HEAP32[$yyval>>2] = $585;
+      break;
+     }
+     case 58:  {
+      $586 = $0;
+      $587 = $yyvsp;
+      $588 = ((($587)) + -4|0);
+      $589 = HEAP32[$588>>2]|0;
+      $590 = $yyvsp;
+      $591 = HEAP32[$590>>2]|0;
+      _args_with_block($586,$589,$591);
+      $592 = $0;
+      $593 = $yyvsp;
+      $594 = ((($593)) + -16|0);
+      $595 = HEAP32[$594>>2]|0;
+      $596 = $yyvsp;
+      $597 = ((($596)) + -8|0);
+      $598 = HEAP32[$597>>2]|0;
+      $599 = $yyvsp;
+      $600 = ((($599)) + -4|0);
+      $601 = HEAP32[$600>>2]|0;
+      $602 = (_new_call($592,$595,$598,$601)|0);
+      HEAP32[$yyval>>2] = $602;
+      break;
+     }
+     case 59:  {
+      $603 = $0;
+      $604 = $yyvsp;
+      $605 = ((($604)) + -12|0);
+      $606 = HEAP32[$605>>2]|0;
+      $607 = $yyvsp;
+      $608 = ((($607)) + -4|0);
+      $609 = HEAP32[$608>>2]|0;
+      $610 = $yyvsp;
+      $611 = HEAP32[$610>>2]|0;
+      $612 = (_new_call($603,$606,$609,$611)|0);
+      HEAP32[$yyval>>2] = $612;
+      break;
+     }
+     case 60:  {
+      $613 = $0;
+      $614 = $yyvsp;
+      $615 = ((($614)) + -4|0);
+      $616 = HEAP32[$615>>2]|0;
+      $617 = $yyvsp;
+      $618 = HEAP32[$617>>2]|0;
+      _args_with_block($613,$616,$618);
+      $619 = $0;
+      $620 = $yyvsp;
+      $621 = ((($620)) + -16|0);
+      $622 = HEAP32[$621>>2]|0;
+      $623 = $yyvsp;
+      $624 = ((($623)) + -8|0);
+      $625 = HEAP32[$624>>2]|0;
+      $626 = $yyvsp;
+      $627 = ((($626)) + -4|0);
+      $628 = HEAP32[$627>>2]|0;
+      $629 = (_new_call($619,$622,$625,$628)|0);
+      HEAP32[$yyval>>2] = $629;
+      break;
+     }
+     case 61:  {
+      $630 = $0;
+      $631 = $yyvsp;
+      $632 = HEAP32[$631>>2]|0;
+      $633 = (_new_super($630,$632)|0);
+      HEAP32[$yyval>>2] = $633;
+      break;
+     }
+     case 62:  {
+      $634 = $0;
+      $635 = $yyvsp;
+      $636 = HEAP32[$635>>2]|0;
+      $637 = (_new_yield($634,$636)|0);
+      HEAP32[$yyval>>2] = $637;
+      break;
+     }
+     case 63:  {
+      $638 = $0;
+      $639 = $0;
+      $640 = $yyvsp;
+      $641 = HEAP32[$640>>2]|0;
+      $642 = (_ret_args($639,$641)|0);
+      $643 = (_new_return($638,$642)|0);
+      HEAP32[$yyval>>2] = $643;
+      break;
+     }
+     case 64:  {
+      $644 = $0;
+      $645 = $0;
+      $646 = $yyvsp;
+      $647 = HEAP32[$646>>2]|0;
+      $648 = (_ret_args($645,$647)|0);
+      $649 = (_new_break($644,$648)|0);
+      HEAP32[$yyval>>2] = $649;
+      break;
+     }
+     case 65:  {
+      $650 = $0;
+      $651 = $0;
+      $652 = $yyvsp;
+      $653 = HEAP32[$652>>2]|0;
+      $654 = (_ret_args($651,$653)|0);
+      $655 = (_new_next($650,$654)|0);
+      HEAP32[$yyval>>2] = $655;
+      break;
+     }
+     case 66:  {
+      $656 = $yyvsp;
+      $657 = HEAP32[$656>>2]|0;
+      HEAP32[$yyval>>2] = $657;
+      break;
+     }
+     case 67:  {
+      $658 = $yyvsp;
+      $659 = ((($658)) + -4|0);
+      $660 = HEAP32[$659>>2]|0;
+      HEAP32[$yyval>>2] = $660;
+      break;
+     }
+     case 69:  {
+      $661 = $yyvsp;
+      $662 = ((($661)) + -4|0);
+      $663 = HEAP32[$662>>2]|0;
+      HEAP32[$yyval>>2] = $663;
+      break;
+     }
+     case 70:  {
+      $664 = $0;
+      $665 = $yyvsp;
+      $666 = HEAP32[$665>>2]|0;
+      $667 = (_list1_gen($664,$666)|0);
+      HEAP32[$yyval>>2] = $667;
+      break;
+     }
+     case 71:  {
+      $668 = $0;
+      $669 = $0;
+      $670 = $yyvsp;
+      $671 = ((($670)) + -4|0);
+      $672 = HEAP32[$671>>2]|0;
+      $673 = $0;
+      $674 = $yyvsp;
+      $675 = HEAP32[$674>>2]|0;
+      $676 = (_list1_gen($673,$675)|0);
+      $677 = (_append_gen($669,$672,$676)|0);
+      $678 = (_list1_gen($668,$677)|0);
+      HEAP32[$yyval>>2] = $678;
+      break;
+     }
+     case 72:  {
+      $679 = $0;
+      $680 = $yyvsp;
+      $681 = ((($680)) + -8|0);
+      $682 = HEAP32[$681>>2]|0;
+      $683 = $yyvsp;
+      $684 = HEAP32[$683>>2]|0;
+      $685 = (_list2_gen($679,$682,$684)|0);
+      HEAP32[$yyval>>2] = $685;
+      break;
+     }
+     case 73:  {
+      $686 = $0;
+      $687 = $yyvsp;
+      $688 = ((($687)) + -16|0);
+      $689 = HEAP32[$688>>2]|0;
+      $690 = $yyvsp;
+      $691 = ((($690)) + -8|0);
+      $692 = HEAP32[$691>>2]|0;
+      $693 = $yyvsp;
+      $694 = HEAP32[$693>>2]|0;
+      $695 = (_list3_gen($686,$689,$692,$694)|0);
+      HEAP32[$yyval>>2] = $695;
+      break;
+     }
+     case 74:  {
+      $696 = $0;
+      $697 = $yyvsp;
+      $698 = ((($697)) + -4|0);
+      $699 = HEAP32[$698>>2]|0;
+      $700 = $0;
+      $701 = (_new_nil($700)|0);
+      $702 = (_list2_gen($696,$699,$701)|0);
+      HEAP32[$yyval>>2] = $702;
+      break;
+     }
+     case 75:  {
+      $703 = $0;
+      $704 = $yyvsp;
+      $705 = ((($704)) + -12|0);
+      $706 = HEAP32[$705>>2]|0;
+      $707 = $0;
+      $708 = (_new_nil($707)|0);
+      $709 = $yyvsp;
+      $710 = HEAP32[$709>>2]|0;
+      $711 = (_list3_gen($703,$706,$708,$710)|0);
+      HEAP32[$yyval>>2] = $711;
+      break;
+     }
+     case 76:  {
+      $712 = $0;
+      $713 = $yyvsp;
+      $714 = HEAP32[$713>>2]|0;
+      $715 = (_list2_gen($712,0,$714)|0);
+      HEAP32[$yyval>>2] = $715;
+      break;
+     }
+     case 77:  {
+      $716 = $0;
+      $717 = $yyvsp;
+      $718 = ((($717)) + -8|0);
+      $719 = HEAP32[$718>>2]|0;
+      $720 = $yyvsp;
+      $721 = HEAP32[$720>>2]|0;
+      $722 = (_list3_gen($716,0,$719,$721)|0);
+      HEAP32[$yyval>>2] = $722;
+      break;
+     }
+     case 78:  {
+      $723 = $0;
+      $724 = $0;
+      $725 = (_new_nil($724)|0);
+      $726 = (_list2_gen($723,0,$725)|0);
+      HEAP32[$yyval>>2] = $726;
+      break;
+     }
+     case 79:  {
+      $727 = $0;
+      $728 = $0;
+      $729 = (_new_nil($728)|0);
+      $730 = $yyvsp;
+      $731 = HEAP32[$730>>2]|0;
+      $732 = (_list3_gen($727,0,$729,$731)|0);
+      HEAP32[$yyval>>2] = $732;
+      break;
+     }
+     case 81:  {
+      $733 = $0;
+      $734 = $yyvsp;
+      $735 = ((($734)) + -4|0);
+      $736 = HEAP32[$735>>2]|0;
+      $737 = (_new_masgn($733,$736,0)|0);
+      HEAP32[$yyval>>2] = $737;
+      break;
+     }
+     case 82:  {
+      $738 = $0;
+      $739 = $yyvsp;
+      $740 = ((($739)) + -4|0);
+      $741 = HEAP32[$740>>2]|0;
+      $742 = (_list1_gen($738,$741)|0);
+      HEAP32[$yyval>>2] = $742;
+      break;
+     }
+     case 83:  {
+      $743 = $0;
+      $744 = $yyvsp;
+      $745 = ((($744)) + -8|0);
+      $746 = HEAP32[$745>>2]|0;
+      $747 = $0;
+      $748 = $yyvsp;
+      $749 = ((($748)) + -4|0);
+      $750 = HEAP32[$749>>2]|0;
+      $751 = (_list1_gen($747,$750)|0);
+      $752 = (_append_gen($743,$746,$751)|0);
+      HEAP32[$yyval>>2] = $752;
+      break;
+     }
+     case 84:  {
+      $753 = $0;
+      $754 = $yyvsp;
+      $755 = HEAP32[$754>>2]|0;
+      $756 = (_list1_gen($753,$755)|0);
+      HEAP32[$yyval>>2] = $756;
+      break;
+     }
+     case 85:  {
+      $757 = $0;
+      $758 = $yyvsp;
+      $759 = ((($758)) + -4|0);
+      $760 = HEAP32[$759>>2]|0;
+      $761 = $0;
+      $762 = $yyvsp;
+      $763 = HEAP32[$762>>2]|0;
+      $764 = (_list1_gen($761,$763)|0);
+      $765 = (_append_gen($757,$760,$764)|0);
+      HEAP32[$yyval>>2] = $765;
+      break;
+     }
+     case 86:  {
+      $766 = $0;
+      $767 = $yyvsp;
+      $768 = HEAP32[$767>>2]|0;
+      _assignable($766,$768);
+      break;
+     }
+     case 87:  {
+      $769 = $0;
+      $770 = $yyvsp;
+      $771 = ((($770)) + -12|0);
+      $772 = HEAP32[$771>>2]|0;
+      $773 = $0;
+      $774 = (_intern_gen($773,68841,2)|0);
+      $775 = $yyvsp;
+      $776 = ((($775)) + -4|0);
+      $777 = HEAP32[$776>>2]|0;
+      $778 = (_new_call($769,$772,$774,$777)|0);
+      HEAP32[$yyval>>2] = $778;
+      break;
+     }
+     case 88:  {
+      $779 = $0;
+      $780 = $yyvsp;
+      $781 = ((($780)) + -8|0);
+      $782 = HEAP32[$781>>2]|0;
+      $783 = $yyvsp;
+      $784 = HEAP32[$783>>2]|0;
+      $785 = (_new_call($779,$782,$784,0)|0);
+      HEAP32[$yyval>>2] = $785;
+      break;
+     }
+     case 89:  {
+      $786 = $0;
+      $787 = $yyvsp;
+      $788 = ((($787)) + -8|0);
+      $789 = HEAP32[$788>>2]|0;
+      $790 = $yyvsp;
+      $791 = HEAP32[$790>>2]|0;
+      $792 = (_new_call($786,$789,$791,0)|0);
+      HEAP32[$yyval>>2] = $792;
+      break;
+     }
+     case 90:  {
+      $793 = $0;
+      $794 = $yyvsp;
+      $795 = ((($794)) + -8|0);
+      $796 = HEAP32[$795>>2]|0;
+      $797 = $yyvsp;
+      $798 = HEAP32[$797>>2]|0;
+      $799 = (_new_call($793,$796,$798,0)|0);
+      HEAP32[$yyval>>2] = $799;
+      break;
+     }
+     case 91:  {
+      $800 = $0;
+      $801 = ((($800)) + 64|0);
+      $802 = HEAP32[$801>>2]|0;
+      $803 = ($802|0)!=(0);
+      if ($803) {
+       label = 123;
+      } else {
+       $804 = $0;
+       $805 = ((($804)) + 68|0);
+       $806 = HEAP32[$805>>2]|0;
+       $807 = ($806|0)!=(0);
+       if ($807) {
+        label = 123;
+       }
+      }
+      if ((label|0) == 123) {
+       label = 0;
+       $808 = $0;
+       _yyerror($808,59547);
+      }
+      $809 = $0;
+      $810 = $yyvsp;
+      $811 = ((($810)) + -8|0);
+      $812 = HEAP32[$811>>2]|0;
+      $813 = $yyvsp;
+      $814 = HEAP32[$813>>2]|0;
+      $815 = (_new_colon2($809,$812,$814)|0);
+      HEAP32[$yyval>>2] = $815;
+      break;
+     }
+     case 92:  {
+      $816 = $0;
+      $817 = ((($816)) + 64|0);
+      $818 = HEAP32[$817>>2]|0;
+      $819 = ($818|0)!=(0);
+      if ($819) {
+       label = 127;
+      } else {
+       $820 = $0;
+       $821 = ((($820)) + 68|0);
+       $822 = HEAP32[$821>>2]|0;
+       $823 = ($822|0)!=(0);
+       if ($823) {
+        label = 127;
+       }
+      }
+      if ((label|0) == 127) {
+       label = 0;
+       $824 = $0;
+       _yyerror($824,59547);
+      }
+      $825 = $0;
+      $826 = $yyvsp;
+      $827 = HEAP32[$826>>2]|0;
+      $828 = (_new_colon3($825,$827)|0);
+      HEAP32[$yyval>>2] = $828;
+      break;
+     }
+     case 93:  {
+      $829 = $0;
+      $830 = $yyvsp;
+      $831 = HEAP32[$830>>2]|0;
+      _backref_error($829,$831);
+      HEAP32[$yyval>>2] = 0;
+      break;
+     }
+     case 94:  {
+      $832 = $0;
+      $833 = $yyvsp;
+      $834 = HEAP32[$833>>2]|0;
+      _assignable($832,$834);
+      break;
+     }
+     case 95:  {
+      $835 = $0;
+      $836 = $yyvsp;
+      $837 = ((($836)) + -12|0);
+      $838 = HEAP32[$837>>2]|0;
+      $839 = $0;
+      $840 = (_intern_gen($839,68841,2)|0);
+      $841 = $yyvsp;
+      $842 = ((($841)) + -4|0);
+      $843 = HEAP32[$842>>2]|0;
+      $844 = (_new_call($835,$838,$840,$843)|0);
+      HEAP32[$yyval>>2] = $844;
+      break;
+     }
+     case 96:  {
+      $845 = $0;
+      $846 = $yyvsp;
+      $847 = ((($846)) + -8|0);
+      $848 = HEAP32[$847>>2]|0;
+      $849 = $yyvsp;
+      $850 = HEAP32[$849>>2]|0;
+      $851 = (_new_call($845,$848,$850,0)|0);
+      HEAP32[$yyval>>2] = $851;
+      break;
+     }
+     case 97:  {
+      $852 = $0;
+      $853 = $yyvsp;
+      $854 = ((($853)) + -8|0);
+      $855 = HEAP32[$854>>2]|0;
+      $856 = $yyvsp;
+      $857 = HEAP32[$856>>2]|0;
+      $858 = (_new_call($852,$855,$857,0)|0);
+      HEAP32[$yyval>>2] = $858;
+      break;
+     }
+     case 98:  {
+      $859 = $0;
+      $860 = $yyvsp;
+      $861 = ((($860)) + -8|0);
+      $862 = HEAP32[$861>>2]|0;
+      $863 = $yyvsp;
+      $864 = HEAP32[$863>>2]|0;
+      $865 = (_new_call($859,$862,$864,0)|0);
+      HEAP32[$yyval>>2] = $865;
+      break;
+     }
+     case 99:  {
+      $866 = $0;
+      $867 = ((($866)) + 64|0);
+      $868 = HEAP32[$867>>2]|0;
+      $869 = ($868|0)!=(0);
+      if ($869) {
+       label = 137;
+      } else {
+       $870 = $0;
+       $871 = ((($870)) + 68|0);
+       $872 = HEAP32[$871>>2]|0;
+       $873 = ($872|0)!=(0);
+       if ($873) {
+        label = 137;
+       }
+      }
+      if ((label|0) == 137) {
+       label = 0;
+       $874 = $0;
+       _yyerror($874,59547);
+      }
+      $875 = $0;
+      $876 = $yyvsp;
+      $877 = ((($876)) + -8|0);
+      $878 = HEAP32[$877>>2]|0;
+      $879 = $yyvsp;
+      $880 = HEAP32[$879>>2]|0;
+      $881 = (_new_colon2($875,$878,$880)|0);
+      HEAP32[$yyval>>2] = $881;
+      break;
+     }
+     case 100:  {
+      $882 = $0;
+      $883 = ((($882)) + 64|0);
+      $884 = HEAP32[$883>>2]|0;
+      $885 = ($884|0)!=(0);
+      if ($885) {
+       label = 141;
+      } else {
+       $886 = $0;
+       $887 = ((($886)) + 68|0);
+       $888 = HEAP32[$887>>2]|0;
+       $889 = ($888|0)!=(0);
+       if ($889) {
+        label = 141;
+       }
+      }
+      if ((label|0) == 141) {
+       label = 0;
+       $890 = $0;
+       _yyerror($890,59547);
+      }
+      $891 = $0;
+      $892 = $yyvsp;
+      $893 = HEAP32[$892>>2]|0;
+      $894 = (_new_colon3($891,$893)|0);
+      HEAP32[$yyval>>2] = $894;
+      break;
+     }
+     case 101:  {
+      $895 = $0;
+      $896 = $yyvsp;
+      $897 = HEAP32[$896>>2]|0;
+      _backref_error($895,$897);
+      HEAP32[$yyval>>2] = 0;
+      break;
+     }
+     case 102:  {
+      $898 = $0;
+      _yyerror($898,59575);
+      break;
+     }
+     case 104:  {
+      $899 = $0;
+      $900 = $yyvsp;
+      $901 = HEAP32[$900>>2]|0;
+      $902 = $901;
+      $903 = (_cons_gen($899,(1),$902)|0);
+      HEAP32[$yyval>>2] = $903;
+      break;
+     }
+     case 105:  {
+      $904 = $0;
+      $905 = $yyvsp;
+      $906 = HEAP32[$905>>2]|0;
+      $907 = $906;
+      $908 = (_cons_gen($904,0,$907)|0);
+      HEAP32[$yyval>>2] = $908;
+      break;
+     }
+     case 106:  {
+      $909 = $0;
+      $910 = $yyvsp;
+      $911 = ((($910)) + -8|0);
+      $912 = HEAP32[$911>>2]|0;
+      $913 = $yyvsp;
+      $914 = HEAP32[$913>>2]|0;
+      $915 = $914;
+      $916 = (_cons_gen($909,$912,$915)|0);
+      HEAP32[$yyval>>2] = $916;
+      break;
+     }
+     case 110:  {
+      $917 = $0;
+      $918 = ((($917)) + 40|0);
+      HEAP32[$918>>2] = 3;
+      $919 = $yyvsp;
+      $920 = HEAP32[$919>>2]|0;
+      HEAP32[$yyval>>2] = $920;
+      break;
+     }
+     case 111:  {
+      $921 = $0;
+      $922 = ((($921)) + 40|0);
+      HEAP32[$922>>2] = 3;
+      $923 = $yyvsp;
+      $924 = HEAP32[$923>>2]|0;
+      HEAP32[$yyval>>2] = $924;
+      break;
+     }
+     case 114:  {
+      $925 = $0;
+      $926 = $yyvsp;
+      $927 = HEAP32[$926>>2]|0;
+      $928 = (_new_undef($925,$927)|0);
+      HEAP32[$yyval>>2] = $928;
+      break;
+     }
+     case 115:  {
+      $929 = $0;
+      $930 = ((($929)) + 40|0);
+      HEAP32[$930>>2] = 7;
+      break;
+     }
+     case 116:  {
+      $931 = $0;
+      $932 = $yyvsp;
+      $933 = ((($932)) + -12|0);
+      $934 = HEAP32[$933>>2]|0;
+      $935 = $0;
+      $936 = $yyvsp;
+      $937 = HEAP32[$936>>2]|0;
+      $938 = $937;
+      $939 = (_list1_gen($935,$938)|0);
+      $940 = (_append_gen($931,$934,$939)|0);
+      HEAP32[$yyval>>2] = $940;
+      break;
+     }
+     case 117:  {
+      $941 = $0;
+      $942 = (_intern_gen_c($941,124)|0);
+      HEAP32[$yyval>>2] = $942;
+      break;
+     }
+     case 118:  {
+      $943 = $0;
+      $944 = (_intern_gen_c($943,94)|0);
+      HEAP32[$yyval>>2] = $944;
+      break;
+     }
+     case 119:  {
+      $945 = $0;
+      $946 = (_intern_gen_c($945,38)|0);
+      HEAP32[$yyval>>2] = $946;
+      break;
+     }
+     case 120:  {
+      $947 = $0;
+      $948 = (_intern_gen($947,68851,3)|0);
+      HEAP32[$yyval>>2] = $948;
+      break;
+     }
+     case 121:  {
+      $949 = $0;
+      $950 = (_intern_gen($949,68902,2)|0);
+      HEAP32[$yyval>>2] = $950;
+      break;
+     }
+     case 122:  {
+      $951 = $0;
+      $952 = (_intern_gen($951,69450,3)|0);
+      HEAP32[$yyval>>2] = $952;
+      break;
+     }
+     case 123:  {
+      $953 = $0;
+      $954 = (_intern_gen($953,59610,2)|0);
+      HEAP32[$yyval>>2] = $954;
+      break;
+     }
+     case 124:  {
+      $955 = $0;
+      $956 = (_intern_gen($955,59613,2)|0);
+      HEAP32[$yyval>>2] = $956;
+      break;
+     }
+     case 125:  {
+      $957 = $0;
+      $958 = (_intern_gen_c($957,62)|0);
+      HEAP32[$yyval>>2] = $958;
+      break;
+     }
+     case 126:  {
+      $959 = $0;
+      $960 = (_intern_gen($959,59616,2)|0);
+      HEAP32[$yyval>>2] = $960;
+      break;
+     }
+     case 127:  {
+      $961 = $0;
+      $962 = (_intern_gen_c($961,60)|0);
+      HEAP32[$yyval>>2] = $962;
+      break;
+     }
+     case 128:  {
+      $963 = $0;
+      $964 = (_intern_gen($963,59619,2)|0);
+      HEAP32[$yyval>>2] = $964;
+      break;
+     }
+     case 129:  {
+      $965 = $0;
+      $966 = (_intern_gen($965,68065,2)|0);
+      HEAP32[$yyval>>2] = $966;
+      break;
+     }
+     case 130:  {
+      $967 = $0;
+      $968 = (_intern_gen($967,64339,2)|0);
+      HEAP32[$yyval>>2] = $968;
+      break;
+     }
+     case 131:  {
+      $969 = $0;
+      $970 = (_intern_gen($969,57205,2)|0);
+      HEAP32[$yyval>>2] = $970;
+      break;
+     }
+     case 132:  {
+      $971 = $0;
+      $972 = (_intern_gen_c($971,43)|0);
+      HEAP32[$yyval>>2] = $972;
+      break;
+     }
+     case 133:  {
+      $973 = $0;
+      $974 = (_intern_gen_c($973,45)|0);
+      HEAP32[$yyval>>2] = $974;
+      break;
+     }
+     case 134:  {
+      $975 = $0;
+      $976 = (_intern_gen_c($975,42)|0);
+      HEAP32[$yyval>>2] = $976;
+      break;
+     }
+     case 135:  {
+      $977 = $0;
+      $978 = (_intern_gen_c($977,42)|0);
+      HEAP32[$yyval>>2] = $978;
+      break;
+     }
+     case 136:  {
+      $979 = $0;
+      $980 = (_intern_gen_c($979,47)|0);
+      HEAP32[$yyval>>2] = $980;
+      break;
+     }
+     case 137:  {
+      $981 = $0;
+      $982 = (_intern_gen_c($981,37)|0);
+      HEAP32[$yyval>>2] = $982;
+      break;
+     }
+     case 138:  {
+      $983 = $0;
+      $984 = (_intern_gen($983,57087,2)|0);
+      HEAP32[$yyval>>2] = $984;
+      break;
+     }
+     case 139:  {
+      $985 = $0;
+      $986 = (_intern_gen_c($985,33)|0);
+      HEAP32[$yyval>>2] = $986;
+      break;
+     }
+     case 140:  {
+      $987 = $0;
+      $988 = (_intern_gen_c($987,126)|0);
+      HEAP32[$yyval>>2] = $988;
+      break;
+     }
+     case 141:  {
+      $989 = $0;
+      $990 = (_intern_gen($989,59622,2)|0);
+      HEAP32[$yyval>>2] = $990;
+      break;
+     }
+     case 142:  {
+      $991 = $0;
+      $992 = (_intern_gen($991,59625,2)|0);
+      HEAP32[$yyval>>2] = $992;
+      break;
+     }
+     case 143:  {
+      $993 = $0;
+      $994 = (_intern_gen($993,68841,2)|0);
+      HEAP32[$yyval>>2] = $994;
+      break;
+     }
+     case 144:  {
+      $995 = $0;
+      $996 = (_intern_gen($995,64349,3)|0);
+      HEAP32[$yyval>>2] = $996;
+      break;
+     }
+     case 145:  {
+      $997 = $0;
+      $998 = (_intern_gen_c($997,96)|0);
+      HEAP32[$yyval>>2] = $998;
+      break;
+     }
+     case 186:  {
+      $999 = $0;
+      $1000 = $yyvsp;
+      $1001 = ((($1000)) + -8|0);
+      $1002 = HEAP32[$1001>>2]|0;
+      $1003 = $yyvsp;
+      $1004 = HEAP32[$1003>>2]|0;
+      $1005 = (_new_asgn($999,$1002,$1004)|0);
+      HEAP32[$yyval>>2] = $1005;
+      break;
+     }
+     case 187:  {
+      $1006 = $0;
+      $1007 = $yyvsp;
+      $1008 = ((($1007)) + -16|0);
+      $1009 = HEAP32[$1008>>2]|0;
+      $1010 = $0;
+      $1011 = $yyvsp;
+      $1012 = ((($1011)) + -8|0);
+      $1013 = HEAP32[$1012>>2]|0;
+      $1014 = $0;
+      $1015 = $0;
+      $1016 = $yyvsp;
+      $1017 = HEAP32[$1016>>2]|0;
+      $1018 = (_list3_gen($1015,0,0,$1017)|0);
+      $1019 = (_list1_gen($1014,$1018)|0);
+      $1020 = (_new_rescue($1010,$1013,$1019,0)|0);
+      $1021 = (_new_asgn($1006,$1009,$1020)|0);
+      HEAP32[$yyval>>2] = $1021;
+      break;
+     }
+     case 188:  {
+      $1022 = $0;
+      $1023 = $yyvsp;
+      $1024 = ((($1023)) + -8|0);
+      $1025 = HEAP32[$1024>>2]|0;
+      $1026 = $yyvsp;
+      $1027 = ((($1026)) + -4|0);
+      $1028 = HEAP32[$1027>>2]|0;
+      $1029 = $yyvsp;
+      $1030 = HEAP32[$1029>>2]|0;
+      $1031 = (_new_op_asgn($1022,$1025,$1028,$1030)|0);
+      HEAP32[$yyval>>2] = $1031;
+      break;
+     }
+     case 189:  {
+      $1032 = $0;
+      $1033 = $yyvsp;
+      $1034 = ((($1033)) + -16|0);
+      $1035 = HEAP32[$1034>>2]|0;
+      $1036 = $yyvsp;
+      $1037 = ((($1036)) + -12|0);
+      $1038 = HEAP32[$1037>>2]|0;
+      $1039 = $0;
+      $1040 = $yyvsp;
+      $1041 = ((($1040)) + -8|0);
+      $1042 = HEAP32[$1041>>2]|0;
+      $1043 = $0;
+      $1044 = $0;
+      $1045 = $yyvsp;
+      $1046 = HEAP32[$1045>>2]|0;
+      $1047 = (_list3_gen($1044,0,0,$1046)|0);
+      $1048 = (_list1_gen($1043,$1047)|0);
+      $1049 = (_new_rescue($1039,$1042,$1048,0)|0);
+      $1050 = (_new_op_asgn($1032,$1035,$1038,$1049)|0);
+      HEAP32[$yyval>>2] = $1050;
+      break;
+     }
+     case 190:  {
+      $1051 = $0;
+      $1052 = $0;
+      $1053 = $yyvsp;
+      $1054 = ((($1053)) + -20|0);
+      $1055 = HEAP32[$1054>>2]|0;
+      $1056 = $0;
+      $1057 = (_intern_gen($1056,68841,2)|0);
+      $1058 = $yyvsp;
+      $1059 = ((($1058)) + -12|0);
+      $1060 = HEAP32[$1059>>2]|0;
+      $1061 = (_new_call($1052,$1055,$1057,$1060)|0);
+      $1062 = $yyvsp;
+      $1063 = ((($1062)) + -4|0);
+      $1064 = HEAP32[$1063>>2]|0;
+      $1065 = $yyvsp;
+      $1066 = HEAP32[$1065>>2]|0;
+      $1067 = (_new_op_asgn($1051,$1061,$1064,$1066)|0);
+      HEAP32[$yyval>>2] = $1067;
+      break;
+     }
+     case 191:  {
+      $1068 = $0;
+      $1069 = $0;
+      $1070 = $yyvsp;
+      $1071 = ((($1070)) + -16|0);
+      $1072 = HEAP32[$1071>>2]|0;
+      $1073 = $yyvsp;
+      $1074 = ((($1073)) + -8|0);
+      $1075 = HEAP32[$1074>>2]|0;
+      $1076 = (_new_call($1069,$1072,$1075,0)|0);
+      $1077 = $yyvsp;
+      $1078 = ((($1077)) + -4|0);
+      $1079 = HEAP32[$1078>>2]|0;
+      $1080 = $yyvsp;
+      $1081 = HEAP32[$1080>>2]|0;
+      $1082 = (_new_op_asgn($1068,$1076,$1079,$1081)|0);
+      HEAP32[$yyval>>2] = $1082;
+      break;
+     }
+     case 192:  {
+      $1083 = $0;
+      $1084 = $0;
+      $1085 = $yyvsp;
+      $1086 = ((($1085)) + -16|0);
+      $1087 = HEAP32[$1086>>2]|0;
+      $1088 = $yyvsp;
+      $1089 = ((($1088)) + -8|0);
+      $1090 = HEAP32[$1089>>2]|0;
+      $1091 = (_new_call($1084,$1087,$1090,0)|0);
+      $1092 = $yyvsp;
+      $1093 = ((($1092)) + -4|0);
+      $1094 = HEAP32[$1093>>2]|0;
+      $1095 = $yyvsp;
+      $1096 = HEAP32[$1095>>2]|0;
+      $1097 = (_new_op_asgn($1083,$1091,$1094,$1096)|0);
+      HEAP32[$yyval>>2] = $1097;
+      break;
+     }
+     case 193:  {
+      $1098 = $0;
+      $1099 = $0;
+      $1100 = $yyvsp;
+      $1101 = ((($1100)) + -16|0);
+      $1102 = HEAP32[$1101>>2]|0;
+      $1103 = $yyvsp;
+      $1104 = ((($1103)) + -8|0);
+      $1105 = HEAP32[$1104>>2]|0;
+      $1106 = (_new_call($1099,$1102,$1105,0)|0);
+      $1107 = $yyvsp;
+      $1108 = ((($1107)) + -4|0);
+      $1109 = HEAP32[$1108>>2]|0;
+      $1110 = $yyvsp;
+      $1111 = HEAP32[$1110>>2]|0;
+      $1112 = (_new_op_asgn($1098,$1106,$1109,$1111)|0);
+      HEAP32[$yyval>>2] = $1112;
+      break;
+     }
+     case 194:  {
+      $1113 = $0;
+      _yyerror($1113,59356);
+      $1114 = $0;
+      $1115 = (_new_begin($1114,0)|0);
+      HEAP32[$yyval>>2] = $1115;
+      break;
+     }
+     case 195:  {
+      $1116 = $0;
+      _yyerror($1116,59356);
+      $1117 = $0;
+      $1118 = (_new_begin($1117,0)|0);
+      HEAP32[$yyval>>2] = $1118;
+      break;
+     }
+     case 196:  {
+      $1119 = $0;
+      $1120 = $yyvsp;
+      $1121 = ((($1120)) + -8|0);
+      $1122 = HEAP32[$1121>>2]|0;
+      _backref_error($1119,$1122);
+      $1123 = $0;
+      $1124 = (_new_begin($1123,0)|0);
+      HEAP32[$yyval>>2] = $1124;
+      break;
+     }
+     case 197:  {
+      $1125 = $0;
+      $1126 = $yyvsp;
+      $1127 = ((($1126)) + -8|0);
+      $1128 = HEAP32[$1127>>2]|0;
+      $1129 = $yyvsp;
+      $1130 = HEAP32[$1129>>2]|0;
+      $1131 = (_new_dot2($1125,$1128,$1130)|0);
+      HEAP32[$yyval>>2] = $1131;
+      break;
+     }
+     case 198:  {
+      $1132 = $0;
+      $1133 = $yyvsp;
+      $1134 = ((($1133)) + -8|0);
+      $1135 = HEAP32[$1134>>2]|0;
+      $1136 = $yyvsp;
+      $1137 = HEAP32[$1136>>2]|0;
+      $1138 = (_new_dot3($1132,$1135,$1137)|0);
+      HEAP32[$yyval>>2] = $1138;
+      break;
+     }
+     case 199:  {
+      $1139 = $0;
+      $1140 = $yyvsp;
+      $1141 = ((($1140)) + -8|0);
+      $1142 = HEAP32[$1141>>2]|0;
+      $1143 = $yyvsp;
+      $1144 = HEAP32[$1143>>2]|0;
+      $1145 = (_call_bin_op($1139,$1142,64315,$1144)|0);
+      HEAP32[$yyval>>2] = $1145;
+      break;
+     }
+     case 200:  {
+      $1146 = $0;
+      $1147 = $yyvsp;
+      $1148 = ((($1147)) + -8|0);
+      $1149 = HEAP32[$1148>>2]|0;
+      $1150 = $yyvsp;
+      $1151 = HEAP32[$1150>>2]|0;
+      $1152 = (_call_bin_op($1146,$1149,69609,$1151)|0);
+      HEAP32[$yyval>>2] = $1152;
+      break;
+     }
+     case 201:  {
+      $1153 = $0;
+      $1154 = $yyvsp;
+      $1155 = ((($1154)) + -8|0);
+      $1156 = HEAP32[$1155>>2]|0;
+      $1157 = $yyvsp;
+      $1158 = HEAP32[$1157>>2]|0;
+      $1159 = (_call_bin_op($1153,$1156,68114,$1158)|0);
+      HEAP32[$yyval>>2] = $1159;
+      break;
+     }
+     case 202:  {
+      $1160 = $0;
+      $1161 = $yyvsp;
+      $1162 = ((($1161)) + -8|0);
+      $1163 = HEAP32[$1162>>2]|0;
+      $1164 = $yyvsp;
+      $1165 = HEAP32[$1164>>2]|0;
+      $1166 = (_call_bin_op($1160,$1163,59628,$1165)|0);
+      HEAP32[$yyval>>2] = $1166;
+      break;
+     }
+     case 203:  {
+      $1167 = $0;
+      $1168 = $yyvsp;
+      $1169 = ((($1168)) + -8|0);
+      $1170 = HEAP32[$1169>>2]|0;
+      $1171 = $yyvsp;
+      $1172 = HEAP32[$1171>>2]|0;
+      $1173 = (_call_bin_op($1167,$1170,59630,$1172)|0);
+      HEAP32[$yyval>>2] = $1173;
+      break;
+     }
+     case 204:  {
+      $1174 = $0;
+      $1175 = $yyvsp;
+      $1176 = ((($1175)) + -8|0);
+      $1177 = HEAP32[$1176>>2]|0;
+      $1178 = $yyvsp;
+      $1179 = HEAP32[$1178>>2]|0;
+      $1180 = (_call_bin_op($1174,$1177,57087,$1179)|0);
+      HEAP32[$yyval>>2] = $1180;
+      break;
+     }
+     case 205:  {
+      $1181 = $0;
+      $1182 = $0;
+      $1183 = $yyvsp;
+      $1184 = ((($1183)) + -8|0);
+      $1185 = HEAP32[$1184>>2]|0;
+      $1186 = $yyvsp;
+      $1187 = HEAP32[$1186>>2]|0;
+      $1188 = (_call_bin_op($1182,$1185,57087,$1187)|0);
+      $1189 = (_call_uni_op($1181,$1188,59625)|0);
+      HEAP32[$yyval>>2] = $1189;
+      break;
+     }
+     case 206:  {
+      $1190 = $0;
+      $1191 = $0;
+      $1192 = $yyvsp;
+      $1193 = ((($1192)) + -8|0);
+      $1194 = HEAP32[$1193>>2]|0;
+      $1195 = $yyvsp;
+      $1196 = HEAP32[$1195>>2]|0;
+      $1197 = (_call_bin_op($1191,$1194,57087,$1196)|0);
+      $1198 = (_call_uni_op($1190,$1197,59625)|0);
+      HEAP32[$yyval>>2] = $1198;
+      break;
+     }
+     case 207:  {
+      $1199 = $0;
+      $1200 = $yyvsp;
+      $1201 = HEAP32[$1200>>2]|0;
+      $1202 = (_call_uni_op($1199,$1201,59622)|0);
+      HEAP32[$yyval>>2] = $1202;
+      break;
+     }
+     case 208:  {
+      $1203 = $0;
+      $1204 = $yyvsp;
+      $1205 = HEAP32[$1204>>2]|0;
+      $1206 = (_call_uni_op($1203,$1205,59625)|0);
+      HEAP32[$yyval>>2] = $1206;
+      break;
+     }
+     case 209:  {
+      $1207 = $0;
+      $1208 = $yyvsp;
+      $1209 = ((($1208)) + -8|0);
+      $1210 = HEAP32[$1209>>2]|0;
+      $1211 = $yyvsp;
+      $1212 = HEAP32[$1211>>2]|0;
+      $1213 = (_call_bin_op($1207,$1210,59632,$1212)|0);
+      HEAP32[$yyval>>2] = $1213;
+      break;
+     }
+     case 210:  {
+      $1214 = $0;
+      $1215 = $yyvsp;
+      $1216 = ((($1215)) + -8|0);
+      $1217 = HEAP32[$1216>>2]|0;
+      $1218 = $yyvsp;
+      $1219 = HEAP32[$1218>>2]|0;
+      $1220 = (_call_bin_op($1214,$1217,59634,$1219)|0);
+      HEAP32[$yyval>>2] = $1220;
+      break;
+     }
+     case 211:  {
+      $1221 = $0;
+      $1222 = $yyvsp;
+      $1223 = ((($1222)) + -8|0);
+      $1224 = HEAP32[$1223>>2]|0;
+      $1225 = $yyvsp;
+      $1226 = HEAP32[$1225>>2]|0;
+      $1227 = (_call_bin_op($1221,$1224,68778,$1226)|0);
+      HEAP32[$yyval>>2] = $1227;
+      break;
+     }
+     case 212:  {
+      $1228 = $0;
+      $1229 = $yyvsp;
+      $1230 = ((($1229)) + -8|0);
+      $1231 = HEAP32[$1230>>2]|0;
+      $1232 = $yyvsp;
+      $1233 = HEAP32[$1232>>2]|0;
+      $1234 = (_call_bin_op($1228,$1231,68851,$1233)|0);
+      HEAP32[$yyval>>2] = $1234;
+      break;
+     }
+     case 213:  {
+      $1235 = $0;
+      $1236 = $yyvsp;
+      $1237 = ((($1236)) + -8|0);
+      $1238 = HEAP32[$1237>>2]|0;
+      $1239 = $yyvsp;
+      $1240 = HEAP32[$1239>>2]|0;
+      $1241 = (_call_bin_op($1235,$1238,65241,$1240)|0);
+      HEAP32[$yyval>>2] = $1241;
+      break;
+     }
+     case 214:  {
+      $1242 = $0;
+      $1243 = $yyvsp;
+      $1244 = ((($1243)) + -8|0);
+      $1245 = HEAP32[$1244>>2]|0;
+      $1246 = $yyvsp;
+      $1247 = HEAP32[$1246>>2]|0;
+      $1248 = (_call_bin_op($1242,$1245,59616,$1247)|0);
+      HEAP32[$yyval>>2] = $1248;
+      break;
+     }
+     case 215:  {
+      $1249 = $0;
+      $1250 = $yyvsp;
+      $1251 = ((($1250)) + -8|0);
+      $1252 = HEAP32[$1251>>2]|0;
+      $1253 = $yyvsp;
+      $1254 = HEAP32[$1253>>2]|0;
+      $1255 = (_call_bin_op($1249,$1252,59636,$1254)|0);
+      HEAP32[$yyval>>2] = $1255;
+      break;
+     }
+     case 216:  {
+      $1256 = $0;
+      $1257 = $yyvsp;
+      $1258 = ((($1257)) + -8|0);
+      $1259 = HEAP32[$1258>>2]|0;
+      $1260 = $yyvsp;
+      $1261 = HEAP32[$1260>>2]|0;
+      $1262 = (_call_bin_op($1256,$1259,59619,$1261)|0);
+      HEAP32[$yyval>>2] = $1262;
+      break;
+     }
+     case 217:  {
+      $1263 = $0;
+      $1264 = $yyvsp;
+      $1265 = ((($1264)) + -8|0);
+      $1266 = HEAP32[$1265>>2]|0;
+      $1267 = $yyvsp;
+      $1268 = HEAP32[$1267>>2]|0;
+      $1269 = (_call_bin_op($1263,$1266,68902,$1268)|0);
+      HEAP32[$yyval>>2] = $1269;
+      break;
+     }
+     case 218:  {
+      $1270 = $0;
+      $1271 = $yyvsp;
+      $1272 = ((($1271)) + -8|0);
+      $1273 = HEAP32[$1272>>2]|0;
+      $1274 = $yyvsp;
+      $1275 = HEAP32[$1274>>2]|0;
+      $1276 = (_call_bin_op($1270,$1273,69450,$1275)|0);
+      HEAP32[$yyval>>2] = $1276;
+      break;
+     }
+     case 219:  {
+      $1277 = $0;
+      $1278 = $yyvsp;
+      $1279 = ((($1278)) + -8|0);
+      $1280 = HEAP32[$1279>>2]|0;
+      $1281 = $yyvsp;
+      $1282 = HEAP32[$1281>>2]|0;
+      $1283 = (_call_bin_op($1277,$1280,68065,$1282)|0);
+      HEAP32[$yyval>>2] = $1283;
+      break;
+     }
+     case 220:  {
+      $1284 = $0;
+      $1285 = $yyvsp;
+      $1286 = ((($1285)) + -8|0);
+      $1287 = HEAP32[$1286>>2]|0;
+      $1288 = $yyvsp;
+      $1289 = HEAP32[$1288>>2]|0;
+      $1290 = (_call_bin_op($1284,$1287,59610,$1289)|0);
+      HEAP32[$yyval>>2] = $1290;
+      break;
+     }
+     case 221:  {
+      $1291 = $0;
+      $1292 = $yyvsp;
+      $1293 = ((($1292)) + -8|0);
+      $1294 = HEAP32[$1293>>2]|0;
+      $1295 = $yyvsp;
+      $1296 = HEAP32[$1295>>2]|0;
+      $1297 = (_call_bin_op($1291,$1294,59613,$1296)|0);
+      HEAP32[$yyval>>2] = $1297;
+      break;
+     }
+     case 222:  {
+      $1298 = $0;
+      $1299 = $yyvsp;
+      $1300 = HEAP32[$1299>>2]|0;
+      $1301 = (_cond($1300)|0);
+      $1302 = (_call_uni_op($1298,$1301,65320)|0);
+      HEAP32[$yyval>>2] = $1302;
+      break;
+     }
+     case 223:  {
+      $1303 = $0;
+      $1304 = $yyvsp;
+      $1305 = HEAP32[$1304>>2]|0;
+      $1306 = (_cond($1305)|0);
+      $1307 = (_call_uni_op($1303,$1306,59638)|0);
+      HEAP32[$yyval>>2] = $1307;
+      break;
+     }
+     case 224:  {
+      $1308 = $0;
+      $1309 = $yyvsp;
+      $1310 = ((($1309)) + -8|0);
+      $1311 = HEAP32[$1310>>2]|0;
+      $1312 = $yyvsp;
+      $1313 = HEAP32[$1312>>2]|0;
+      $1314 = (_call_bin_op($1308,$1311,64339,$1313)|0);
+      HEAP32[$yyval>>2] = $1314;
+      break;
+     }
+     case 225:  {
+      $1315 = $0;
+      $1316 = $yyvsp;
+      $1317 = ((($1316)) + -8|0);
+      $1318 = HEAP32[$1317>>2]|0;
+      $1319 = $yyvsp;
+      $1320 = HEAP32[$1319>>2]|0;
+      $1321 = (_call_bin_op($1315,$1318,57205,$1320)|0);
+      HEAP32[$yyval>>2] = $1321;
+      break;
+     }
+     case 226:  {
+      $1322 = $0;
+      $1323 = $yyvsp;
+      $1324 = ((($1323)) + -8|0);
+      $1325 = HEAP32[$1324>>2]|0;
+      $1326 = $yyvsp;
+      $1327 = HEAP32[$1326>>2]|0;
+      $1328 = (_new_and($1322,$1325,$1327)|0);
+      HEAP32[$yyval>>2] = $1328;
+      break;
+     }
+     case 227:  {
+      $1329 = $0;
+      $1330 = $yyvsp;
+      $1331 = ((($1330)) + -8|0);
+      $1332 = HEAP32[$1331>>2]|0;
+      $1333 = $yyvsp;
+      $1334 = HEAP32[$1333>>2]|0;
+      $1335 = (_new_or($1329,$1332,$1334)|0);
+      HEAP32[$yyval>>2] = $1335;
+      break;
+     }
+     case 228:  {
+      $1336 = $0;
+      $1337 = $yyvsp;
+      $1338 = ((($1337)) + -20|0);
+      $1339 = HEAP32[$1338>>2]|0;
+      $1340 = (_cond($1339)|0);
+      $1341 = $yyvsp;
+      $1342 = ((($1341)) + -12|0);
+      $1343 = HEAP32[$1342>>2]|0;
+      $1344 = $yyvsp;
+      $1345 = HEAP32[$1344>>2]|0;
+      $1346 = (_new_if($1336,$1340,$1343,$1345)|0);
+      HEAP32[$yyval>>2] = $1346;
+      break;
+     }
+     case 229:  {
+      $1347 = $yyvsp;
+      $1348 = HEAP32[$1347>>2]|0;
+      HEAP32[$yyval>>2] = $1348;
+      break;
+     }
+     case 230:  {
+      $1349 = $yyvsp;
+      $1350 = HEAP32[$1349>>2]|0;
+      HEAP32[$yyval>>2] = $1350;
+      $1351 = HEAP32[$yyval>>2]|0;
+      $1352 = ($1351|0)!=(0|0);
+      if (!($1352)) {
+       $1353 = $0;
+       $1354 = (_new_nil($1353)|0);
+       HEAP32[$yyval>>2] = $1354;
+      }
+      break;
+     }
+     case 232:  {
+      $1355 = $yyvsp;
+      $1356 = ((($1355)) + -4|0);
+      $1357 = HEAP32[$1356>>2]|0;
+      HEAP32[$yyval>>2] = $1357;
+      $1358 = $yyvsp;
+      $1359 = ((($1358)) + -4|0);
+      $1360 = HEAP32[$1359>>2]|0;
+      $1361 = ($1360|0)!=(0|0);
+      if ($1361) {
+       $1362 = $yyvsp;
+       $1363 = ((($1362)) + -4|0);
+       $1364 = HEAP32[$1363>>2]|0;
+       $1365 = ((($1364)) + 10|0);
+       $1366 = HEAP16[$1365>>1]|0;
+       $1367 = HEAP32[$yyval>>2]|0;
+       $1368 = ((($1367)) + 10|0);
+       HEAP16[$1368>>1] = $1366;
+       $1369 = $yyvsp;
+       $1370 = ((($1369)) + -4|0);
+       $1371 = HEAP32[$1370>>2]|0;
+       $1372 = ((($1371)) + 8|0);
+       $1373 = HEAP16[$1372>>1]|0;
+       $1374 = HEAP32[$yyval>>2]|0;
+       $1375 = ((($1374)) + 8|0);
+       HEAP16[$1375>>1] = $1373;
+      }
+      break;
+     }
+     case 233:  {
+      $1376 = $0;
+      $1377 = $yyvsp;
+      $1378 = ((($1377)) + -12|0);
+      $1379 = HEAP32[$1378>>2]|0;
+      $1380 = $0;
+      $1381 = $0;
+      $1382 = $yyvsp;
+      $1383 = ((($1382)) + -4|0);
+      $1384 = HEAP32[$1383>>2]|0;
+      $1385 = (_new_hash($1381,$1384)|0);
+      $1386 = (_list1_gen($1380,$1385)|0);
+      $1387 = (_append_gen($1376,$1379,$1386)|0);
+      HEAP32[$yyval>>2] = $1387;
+      break;
+     }
+     case 234:  {
+      $1388 = $0;
+      $1389 = $0;
+      $1390 = $yyvsp;
+      $1391 = ((($1390)) + -4|0);
+      $1392 = HEAP32[$1391>>2]|0;
+      $1393 = (_new_hash($1389,$1392)|0);
+      $1394 = (_cons_gen($1388,$1393,0)|0);
+      HEAP32[$yyval>>2] = $1394;
+      $1395 = $yyvsp;
+      $1396 = ((($1395)) + -4|0);
+      $1397 = HEAP32[$1396>>2]|0;
+      $1398 = ($1397|0)!=(0|0);
+      if ($1398) {
+       $1399 = $yyvsp;
+       $1400 = ((($1399)) + -4|0);
+       $1401 = HEAP32[$1400>>2]|0;
+       $1402 = ((($1401)) + 10|0);
+       $1403 = HEAP16[$1402>>1]|0;
+       $1404 = HEAP32[$yyval>>2]|0;
+       $1405 = ((($1404)) + 10|0);
+       HEAP16[$1405>>1] = $1403;
+       $1406 = $yyvsp;
+       $1407 = ((($1406)) + -4|0);
+       $1408 = HEAP32[$1407>>2]|0;
+       $1409 = ((($1408)) + 8|0);
+       $1410 = HEAP16[$1409>>1]|0;
+       $1411 = HEAP32[$yyval>>2]|0;
+       $1412 = ((($1411)) + 8|0);
+       HEAP16[$1412>>1] = $1410;
+      }
+      break;
+     }
+     case 235:  {
+      $1413 = $yyvsp;
+      $1414 = ((($1413)) + -4|0);
+      $1415 = HEAP32[$1414>>2]|0;
+      HEAP32[$yyval>>2] = $1415;
+      break;
+     }
+     case 240:  {
+      $1416 = $0;
+      $1417 = $yyvsp;
+      $1418 = ((($1417)) + -4|0);
+      $1419 = HEAP32[$1418>>2]|0;
+      $1420 = (_cons_gen($1416,$1419,0)|0);
+      HEAP32[$yyval>>2] = $1420;
+      $1421 = $yyvsp;
+      $1422 = ((($1421)) + -4|0);
+      $1423 = HEAP32[$1422>>2]|0;
+      $1424 = ($1423|0)!=(0|0);
+      if ($1424) {
+       $1425 = $yyvsp;
+       $1426 = ((($1425)) + -4|0);
+       $1427 = HEAP32[$1426>>2]|0;
+       $1428 = ((($1427)) + 10|0);
+       $1429 = HEAP16[$1428>>1]|0;
+       $1430 = HEAP32[$yyval>>2]|0;
+       $1431 = ((($1430)) + 10|0);
+       HEAP16[$1431>>1] = $1429;
+       $1432 = $yyvsp;
+       $1433 = ((($1432)) + -4|0);
+       $1434 = HEAP32[$1433>>2]|0;
+       $1435 = ((($1434)) + 8|0);
+       $1436 = HEAP16[$1435>>1]|0;
+       $1437 = HEAP32[$yyval>>2]|0;
+       $1438 = ((($1437)) + 8|0);
+       HEAP16[$1438>>1] = $1436;
+      }
+      break;
+     }
+     case 241:  {
+      $1439 = $0;
+      $1440 = $0;
+      $1441 = $yyvsp;
+      $1442 = ((($1441)) + -12|0);
+      $1443 = HEAP32[$1442>>2]|0;
+      $1444 = $0;
+      $1445 = $0;
+      $1446 = $yyvsp;
+      $1447 = ((($1446)) + -4|0);
+      $1448 = HEAP32[$1447>>2]|0;
+      $1449 = (_new_hash($1445,$1448)|0);
+      $1450 = (_list1_gen($1444,$1449)|0);
+      $1451 = (_append_gen($1440,$1443,$1450)|0);
+      $1452 = (_cons_gen($1439,$1451,0)|0);
+      HEAP32[$yyval>>2] = $1452;
+      $1453 = $yyvsp;
+      $1454 = ((($1453)) + -12|0);
+      $1455 = HEAP32[$1454>>2]|0;
+      $1456 = ($1455|0)!=(0|0);
+      if ($1456) {
+       $1457 = $yyvsp;
+       $1458 = ((($1457)) + -12|0);
+       $1459 = HEAP32[$1458>>2]|0;
+       $1460 = ((($1459)) + 10|0);
+       $1461 = HEAP16[$1460>>1]|0;
+       $1462 = HEAP32[$yyval>>2]|0;
+       $1463 = ((($1462)) + 10|0);
+       HEAP16[$1463>>1] = $1461;
+       $1464 = $yyvsp;
+       $1465 = ((($1464)) + -12|0);
+       $1466 = HEAP32[$1465>>2]|0;
+       $1467 = ((($1466)) + 8|0);
+       $1468 = HEAP16[$1467>>1]|0;
+       $1469 = HEAP32[$yyval>>2]|0;
+       $1470 = ((($1469)) + 8|0);
+       HEAP16[$1470>>1] = $1468;
+      }
+      break;
+     }
+     case 242:  {
+      $1471 = $0;
+      $1472 = $0;
+      $1473 = $0;
+      $1474 = $yyvsp;
+      $1475 = ((($1474)) + -4|0);
+      $1476 = HEAP32[$1475>>2]|0;
+      $1477 = (_new_hash($1473,$1476)|0);
+      $1478 = (_list1_gen($1472,$1477)|0);
+      $1479 = (_cons_gen($1471,$1478,0)|0);
+      HEAP32[$yyval>>2] = $1479;
+      $1480 = $yyvsp;
+      $1481 = ((($1480)) + -4|0);
+      $1482 = HEAP32[$1481>>2]|0;
+      $1483 = ($1482|0)!=(0|0);
+      if ($1483) {
+       $1484 = $yyvsp;
+       $1485 = ((($1484)) + -4|0);
+       $1486 = HEAP32[$1485>>2]|0;
+       $1487 = ((($1486)) + 10|0);
+       $1488 = HEAP16[$1487>>1]|0;
+       $1489 = HEAP32[$yyval>>2]|0;
+       $1490 = ((($1489)) + 10|0);
+       HEAP16[$1490>>1] = $1488;
+       $1491 = $yyvsp;
+       $1492 = ((($1491)) + -4|0);
+       $1493 = HEAP32[$1492>>2]|0;
+       $1494 = ((($1493)) + 8|0);
+       $1495 = HEAP16[$1494>>1]|0;
+       $1496 = HEAP32[$yyval>>2]|0;
+       $1497 = ((($1496)) + 8|0);
+       HEAP16[$1497>>1] = $1495;
+      }
+      break;
+     }
+     case 243:  {
+      $1498 = $0;
+      $1499 = $0;
+      $1500 = $yyvsp;
+      $1501 = HEAP32[$1500>>2]|0;
+      $1502 = (_list1_gen($1499,$1501)|0);
+      $1503 = (_cons_gen($1498,$1502,0)|0);
+      HEAP32[$yyval>>2] = $1503;
+      $1504 = $yyvsp;
+      $1505 = HEAP32[$1504>>2]|0;
+      $1506 = ($1505|0)!=(0|0);
+      if ($1506) {
+       $1507 = $yyvsp;
+       $1508 = HEAP32[$1507>>2]|0;
+       $1509 = ((($1508)) + 10|0);
+       $1510 = HEAP16[$1509>>1]|0;
+       $1511 = HEAP32[$yyval>>2]|0;
+       $1512 = ((($1511)) + 10|0);
+       HEAP16[$1512>>1] = $1510;
+       $1513 = $yyvsp;
+       $1514 = HEAP32[$1513>>2]|0;
+       $1515 = ((($1514)) + 8|0);
+       $1516 = HEAP16[$1515>>1]|0;
+       $1517 = HEAP32[$yyval>>2]|0;
+       $1518 = ((($1517)) + 8|0);
+       HEAP16[$1518>>1] = $1516;
+      }
+      break;
+     }
+     case 244:  {
+      $1519 = $0;
+      $1520 = $yyvsp;
+      $1521 = ((($1520)) + -4|0);
+      $1522 = HEAP32[$1521>>2]|0;
+      $1523 = $yyvsp;
+      $1524 = HEAP32[$1523>>2]|0;
+      $1525 = (_cons_gen($1519,$1522,$1524)|0);
+      HEAP32[$yyval>>2] = $1525;
+      $1526 = $yyvsp;
+      $1527 = ((($1526)) + -4|0);
+      $1528 = HEAP32[$1527>>2]|0;
+      $1529 = ($1528|0)!=(0|0);
+      if ($1529) {
+       $1530 = $yyvsp;
+       $1531 = ((($1530)) + -4|0);
+       $1532 = HEAP32[$1531>>2]|0;
+       $1533 = ((($1532)) + 10|0);
+       $1534 = HEAP16[$1533>>1]|0;
+       $1535 = HEAP32[$yyval>>2]|0;
+       $1536 = ((($1535)) + 10|0);
+       HEAP16[$1536>>1] = $1534;
+       $1537 = $yyvsp;
+       $1538 = ((($1537)) + -4|0);
+       $1539 = HEAP32[$1538>>2]|0;
+       $1540 = ((($1539)) + 8|0);
+       $1541 = HEAP16[$1540>>1]|0;
+       $1542 = HEAP32[$yyval>>2]|0;
+       $1543 = ((($1542)) + 8|0);
+       HEAP16[$1543>>1] = $1541;
+      }
+      break;
+     }
+     case 245:  {
+      $1544 = $0;
+      $1545 = $0;
+      $1546 = $0;
+      $1547 = $yyvsp;
+      $1548 = ((($1547)) + -4|0);
+      $1549 = HEAP32[$1548>>2]|0;
+      $1550 = (_new_hash($1546,$1549)|0);
+      $1551 = (_list1_gen($1545,$1550)|0);
+      $1552 = $yyvsp;
+      $1553 = HEAP32[$1552>>2]|0;
+      $1554 = (_cons_gen($1544,$1551,$1553)|0);
+      HEAP32[$yyval>>2] = $1554;
+      $1555 = $yyvsp;
+      $1556 = ((($1555)) + -4|0);
+      $1557 = HEAP32[$1556>>2]|0;
+      $1558 = ($1557|0)!=(0|0);
+      if ($1558) {
+       $1559 = $yyvsp;
+       $1560 = ((($1559)) + -4|0);
+       $1561 = HEAP32[$1560>>2]|0;
+       $1562 = ((($1561)) + 10|0);
+       $1563 = HEAP16[$1562>>1]|0;
+       $1564 = HEAP32[$yyval>>2]|0;
+       $1565 = ((($1564)) + 10|0);
+       HEAP16[$1565>>1] = $1563;
+       $1566 = $yyvsp;
+       $1567 = ((($1566)) + -4|0);
+       $1568 = HEAP32[$1567>>2]|0;
+       $1569 = ((($1568)) + 8|0);
+       $1570 = HEAP16[$1569>>1]|0;
+       $1571 = HEAP32[$yyval>>2]|0;
+       $1572 = ((($1571)) + 8|0);
+       HEAP16[$1572>>1] = $1570;
+      }
+      break;
+     }
+     case 246:  {
+      $1573 = $0;
+      $1574 = $0;
+      $1575 = $yyvsp;
+      $1576 = ((($1575)) + -12|0);
+      $1577 = HEAP32[$1576>>2]|0;
+      $1578 = $0;
+      $1579 = $0;
+      $1580 = $yyvsp;
+      $1581 = ((($1580)) + -4|0);
+      $1582 = HEAP32[$1581>>2]|0;
+      $1583 = (_new_hash($1579,$1582)|0);
+      $1584 = (_list1_gen($1578,$1583)|0);
+      $1585 = (_append_gen($1574,$1577,$1584)|0);
+      $1586 = $yyvsp;
+      $1587 = HEAP32[$1586>>2]|0;
+      $1588 = (_cons_gen($1573,$1585,$1587)|0);
+      HEAP32[$yyval>>2] = $1588;
+      $1589 = $yyvsp;
+      $1590 = ((($1589)) + -12|0);
+      $1591 = HEAP32[$1590>>2]|0;
+      $1592 = ($1591|0)!=(0|0);
+      if ($1592) {
+       $1593 = $yyvsp;
+       $1594 = ((($1593)) + -12|0);
+       $1595 = HEAP32[$1594>>2]|0;
+       $1596 = ((($1595)) + 10|0);
+       $1597 = HEAP16[$1596>>1]|0;
+       $1598 = HEAP32[$yyval>>2]|0;
+       $1599 = ((($1598)) + 10|0);
+       HEAP16[$1599>>1] = $1597;
+       $1600 = $yyvsp;
+       $1601 = ((($1600)) + -12|0);
+       $1602 = HEAP32[$1601>>2]|0;
+       $1603 = ((($1602)) + 8|0);
+       $1604 = HEAP16[$1603>>1]|0;
+       $1605 = HEAP32[$yyval>>2]|0;
+       $1606 = ((($1605)) + 8|0);
+       HEAP16[$1606>>1] = $1604;
+      }
+      break;
+     }
+     case 247:  {
+      $1607 = $0;
+      $1608 = $yyvsp;
+      $1609 = HEAP32[$1608>>2]|0;
+      $1610 = (_cons_gen($1607,0,$1609)|0);
+      HEAP32[$yyval>>2] = $1610;
+      $1611 = $yyvsp;
+      $1612 = HEAP32[$1611>>2]|0;
+      $1613 = ($1612|0)!=(0|0);
+      if ($1613) {
+       $1614 = $yyvsp;
+       $1615 = HEAP32[$1614>>2]|0;
+       $1616 = ((($1615)) + 10|0);
+       $1617 = HEAP16[$1616>>1]|0;
+       $1618 = HEAP32[$yyval>>2]|0;
+       $1619 = ((($1618)) + 10|0);
+       HEAP16[$1619>>1] = $1617;
+       $1620 = $yyvsp;
+       $1621 = HEAP32[$1620>>2]|0;
+       $1622 = ((($1621)) + 8|0);
+       $1623 = HEAP16[$1622>>1]|0;
+       $1624 = HEAP32[$yyval>>2]|0;
+       $1625 = ((($1624)) + 8|0);
+       HEAP16[$1625>>1] = $1623;
+      }
+      break;
+     }
+     case 248:  {
+      $1626 = $0;
+      $1627 = ((($1626)) + 52|0);
+      $1628 = HEAP32[$1627>>2]|0;
+      HEAP32[$yyval>>2] = $1628;
+      $1629 = $0;
+      $1630 = ((($1629)) + 52|0);
+      $1631 = HEAP32[$1630>>2]|0;
+      $1632 = $1631 << 1;
+      $1633 = $1632 | 1;
+      $1634 = $0;
+      $1635 = ((($1634)) + 52|0);
+      HEAP32[$1635>>2] = $1633;
+      break;
+     }
+     case 249:  {
+      $1636 = $yyvsp;
+      $1637 = ((($1636)) + -4|0);
+      $1638 = HEAP32[$1637>>2]|0;
+      $1639 = $0;
+      $1640 = ((($1639)) + 52|0);
+      HEAP32[$1640>>2] = $1638;
+      $1641 = $yyvsp;
+      $1642 = HEAP32[$1641>>2]|0;
+      HEAP32[$yyval>>2] = $1642;
+      break;
+     }
+     case 250:  {
+      $1643 = $0;
+      $1644 = $yyvsp;
+      $1645 = HEAP32[$1644>>2]|0;
+      $1646 = (_new_block_arg($1643,$1645)|0);
+      HEAP32[$yyval>>2] = $1646;
+      break;
+     }
+     case 251:  {
+      $1647 = $yyvsp;
+      $1648 = HEAP32[$1647>>2]|0;
+      HEAP32[$yyval>>2] = $1648;
+      break;
+     }
+     case 252:  {
+      HEAP32[$yyval>>2] = 0;
+      break;
+     }
+     case 253:  {
+      $1649 = $0;
+      $1650 = $yyvsp;
+      $1651 = HEAP32[$1650>>2]|0;
+      $1652 = (_cons_gen($1649,$1651,0)|0);
+      HEAP32[$yyval>>2] = $1652;
+      $1653 = $yyvsp;
+      $1654 = HEAP32[$1653>>2]|0;
+      $1655 = ($1654|0)!=(0|0);
+      if ($1655) {
+       $1656 = $yyvsp;
+       $1657 = HEAP32[$1656>>2]|0;
+       $1658 = ((($1657)) + 10|0);
+       $1659 = HEAP16[$1658>>1]|0;
+       $1660 = HEAP32[$yyval>>2]|0;
+       $1661 = ((($1660)) + 10|0);
+       HEAP16[$1661>>1] = $1659;
+       $1662 = $yyvsp;
+       $1663 = HEAP32[$1662>>2]|0;
+       $1664 = ((($1663)) + 8|0);
+       $1665 = HEAP16[$1664>>1]|0;
+       $1666 = HEAP32[$yyval>>2]|0;
+       $1667 = ((($1666)) + 8|0);
+       HEAP16[$1667>>1] = $1665;
+      }
+      break;
+     }
+     case 254:  {
+      $1668 = $0;
+      $1669 = $0;
+      $1670 = $yyvsp;
+      $1671 = HEAP32[$1670>>2]|0;
+      $1672 = (_new_splat($1669,$1671)|0);
+      $1673 = (_cons_gen($1668,$1672,0)|0);
+      HEAP32[$yyval>>2] = $1673;
+      $1674 = $yyvsp;
+      $1675 = HEAP32[$1674>>2]|0;
+      $1676 = ($1675|0)!=(0|0);
+      if ($1676) {
+       $1677 = $yyvsp;
+       $1678 = HEAP32[$1677>>2]|0;
+       $1679 = ((($1678)) + 10|0);
+       $1680 = HEAP16[$1679>>1]|0;
+       $1681 = HEAP32[$yyval>>2]|0;
+       $1682 = ((($1681)) + 10|0);
+       HEAP16[$1682>>1] = $1680;
+       $1683 = $yyvsp;
+       $1684 = HEAP32[$1683>>2]|0;
+       $1685 = ((($1684)) + 8|0);
+       $1686 = HEAP16[$1685>>1]|0;
+       $1687 = HEAP32[$yyval>>2]|0;
+       $1688 = ((($1687)) + 8|0);
+       HEAP16[$1688>>1] = $1686;
+      }
+      break;
+     }
+     case 255:  {
+      $1689 = $0;
+      $1690 = $yyvsp;
+      $1691 = ((($1690)) + -8|0);
+      $1692 = HEAP32[$1691>>2]|0;
+      $1693 = $0;
+      $1694 = $yyvsp;
+      $1695 = HEAP32[$1694>>2]|0;
+      $1696 = (_list1_gen($1693,$1695)|0);
+      $1697 = (_append_gen($1689,$1692,$1696)|0);
+      HEAP32[$yyval>>2] = $1697;
+      break;
+     }
+     case 256:  {
+      $1698 = $0;
+      $1699 = $yyvsp;
+      $1700 = ((($1699)) + -12|0);
+      $1701 = HEAP32[$1700>>2]|0;
+      $1702 = $0;
+      $1703 = $0;
+      $1704 = $yyvsp;
+      $1705 = HEAP32[$1704>>2]|0;
+      $1706 = (_new_splat($1703,$1705)|0);
+      $1707 = (_list1_gen($1702,$1706)|0);
+      $1708 = (_append_gen($1698,$1701,$1707)|0);
+      HEAP32[$yyval>>2] = $1708;
+      break;
+     }
+     case 257:  {
+      $1709 = $0;
+      $1710 = $yyvsp;
+      $1711 = ((($1710)) + -12|0);
+      $1712 = HEAP32[$1711>>2]|0;
+      $1713 = $0;
+      $1714 = $yyvsp;
+      $1715 = HEAP32[$1714>>2]|0;
+      $1716 = (_list1_gen($1713,$1715)|0);
+      $1717 = (_append_gen($1709,$1712,$1716)|0);
+      HEAP32[$yyval>>2] = $1717;
+      break;
+     }
+     case 258:  {
+      $1718 = $0;
+      $1719 = $yyvsp;
+      $1720 = ((($1719)) + -16|0);
+      $1721 = HEAP32[$1720>>2]|0;
+      $1722 = $0;
+      $1723 = $0;
+      $1724 = $yyvsp;
+      $1725 = HEAP32[$1724>>2]|0;
+      $1726 = (_new_splat($1723,$1725)|0);
+      $1727 = (_list1_gen($1722,$1726)|0);
+      $1728 = (_append_gen($1718,$1721,$1727)|0);
+      HEAP32[$yyval>>2] = $1728;
+      break;
+     }
+     case 259:  {
+      $1729 = $0;
+      $1730 = $yyvsp;
+      $1731 = ((($1730)) + -8|0);
+      $1732 = HEAP32[$1731>>2]|0;
+      $1733 = $0;
+      $1734 = $yyvsp;
+      $1735 = HEAP32[$1734>>2]|0;
+      $1736 = (_list1_gen($1733,$1735)|0);
+      $1737 = (_append_gen($1729,$1732,$1736)|0);
+      HEAP32[$yyval>>2] = $1737;
+      break;
+     }
+     case 260:  {
+      $1738 = $0;
+      $1739 = $yyvsp;
+      $1740 = ((($1739)) + -12|0);
+      $1741 = HEAP32[$1740>>2]|0;
+      $1742 = $0;
+      $1743 = $0;
+      $1744 = $yyvsp;
+      $1745 = HEAP32[$1744>>2]|0;
+      $1746 = (_new_splat($1743,$1745)|0);
+      $1747 = (_list1_gen($1742,$1746)|0);
+      $1748 = (_append_gen($1738,$1741,$1747)|0);
+      HEAP32[$yyval>>2] = $1748;
+      break;
+     }
+     case 261:  {
+      $1749 = $0;
+      $1750 = $0;
+      $1751 = $yyvsp;
+      $1752 = HEAP32[$1751>>2]|0;
+      $1753 = (_new_splat($1750,$1752)|0);
+      $1754 = (_list1_gen($1749,$1753)|0);
+      HEAP32[$yyval>>2] = $1754;
+      break;
+     }
+     case 269:  {
+      $1755 = $0;
+      $1756 = $yyvsp;
+      $1757 = HEAP32[$1756>>2]|0;
+      $1758 = (_new_fcall($1755,$1757,0)|0);
+      HEAP32[$yyval>>2] = $1758;
+      break;
+     }
+     case 270:  {
+      $1759 = $0;
+      $1760 = ((($1759)) + 52|0);
+      $1761 = HEAP32[$1760>>2]|0;
+      HEAP32[$yyval>>2] = $1761;
+      $1762 = $0;
+      $1763 = ((($1762)) + 52|0);
+      HEAP32[$1763>>2] = 0;
+      break;
+     }
+     case 271:  {
+      $1764 = $yyvsp;
+      $1765 = ((($1764)) + -8|0);
+      $1766 = HEAP32[$1765>>2]|0;
+      $1767 = $0;
+      $1768 = ((($1767)) + 52|0);
+      HEAP32[$1768>>2] = $1766;
+      $1769 = $yyvsp;
+      $1770 = ((($1769)) + -4|0);
+      $1771 = HEAP32[$1770>>2]|0;
+      HEAP32[$yyval>>2] = $1771;
+      break;
+     }
+     case 272:  {
+      $1772 = $0;
+      $1773 = ((($1772)) + 52|0);
+      $1774 = HEAP32[$1773>>2]|0;
+      HEAP32[$yyval>>2] = $1774;
+      $1775 = $0;
+      $1776 = ((($1775)) + 52|0);
+      HEAP32[$1776>>2] = 0;
+      break;
+     }
+     case 273:  {
+      $1777 = $0;
+      $1778 = ((($1777)) + 40|0);
+      HEAP32[$1778>>2] = 2;
+      break;
+     }
+     case 274:  {
+      $1779 = $yyvsp;
+      $1780 = ((($1779)) + -12|0);
+      $1781 = HEAP32[$1780>>2]|0;
+      $1782 = $0;
+      $1783 = ((($1782)) + 52|0);
+      HEAP32[$1783>>2] = $1781;
+      $1784 = $yyvsp;
+      $1785 = ((($1784)) + -8|0);
+      $1786 = HEAP32[$1785>>2]|0;
+      HEAP32[$yyval>>2] = $1786;
+      break;
+     }
+     case 275:  {
+      $1787 = $0;
+      $1788 = ((($1787)) + 40|0);
+      HEAP32[$1788>>2] = 2;
+      break;
+     }
+     case 276:  {
+      HEAP32[$yyval>>2] = 0;
+      break;
+     }
+     case 277:  {
+      $1789 = $yyvsp;
+      $1790 = ((($1789)) + -4|0);
+      $1791 = HEAP32[$1790>>2]|0;
+      HEAP32[$yyval>>2] = $1791;
+      break;
+     }
+     case 278:  {
+      $1792 = $0;
+      $1793 = $yyvsp;
+      $1794 = ((($1793)) + -8|0);
+      $1795 = HEAP32[$1794>>2]|0;
+      $1796 = $yyvsp;
+      $1797 = HEAP32[$1796>>2]|0;
+      $1798 = (_new_colon2($1792,$1795,$1797)|0);
+      HEAP32[$yyval>>2] = $1798;
+      break;
+     }
+     case 279:  {
+      $1799 = $0;
+      $1800 = $yyvsp;
+      $1801 = HEAP32[$1800>>2]|0;
+      $1802 = (_new_colon3($1799,$1801)|0);
+      HEAP32[$yyval>>2] = $1802;
+      break;
+     }
+     case 280:  {
+      $1803 = $0;
+      $1804 = $yyvsp;
+      $1805 = ((($1804)) + -4|0);
+      $1806 = HEAP32[$1805>>2]|0;
+      $1807 = (_new_array($1803,$1806)|0);
+      HEAP32[$yyval>>2] = $1807;
+      $1808 = $yyvsp;
+      $1809 = ((($1808)) + -4|0);
+      $1810 = HEAP32[$1809>>2]|0;
+      $1811 = ($1810|0)!=(0|0);
+      if ($1811) {
+       $1812 = $yyvsp;
+       $1813 = ((($1812)) + -4|0);
+       $1814 = HEAP32[$1813>>2]|0;
+       $1815 = ((($1814)) + 10|0);
+       $1816 = HEAP16[$1815>>1]|0;
+       $1817 = HEAP32[$yyval>>2]|0;
+       $1818 = ((($1817)) + 10|0);
+       HEAP16[$1818>>1] = $1816;
+       $1819 = $yyvsp;
+       $1820 = ((($1819)) + -4|0);
+       $1821 = HEAP32[$1820>>2]|0;
+       $1822 = ((($1821)) + 8|0);
+       $1823 = HEAP16[$1822>>1]|0;
+       $1824 = HEAP32[$yyval>>2]|0;
+       $1825 = ((($1824)) + 8|0);
+       HEAP16[$1825>>1] = $1823;
+      }
+      break;
+     }
+     case 281:  {
+      $1826 = $0;
+      $1827 = $yyvsp;
+      $1828 = ((($1827)) + -4|0);
+      $1829 = HEAP32[$1828>>2]|0;
+      $1830 = (_new_hash($1826,$1829)|0);
+      HEAP32[$yyval>>2] = $1830;
+      $1831 = $yyvsp;
+      $1832 = ((($1831)) + -4|0);
+      $1833 = HEAP32[$1832>>2]|0;
+      $1834 = ($1833|0)!=(0|0);
+      if ($1834) {
+       $1835 = $yyvsp;
+       $1836 = ((($1835)) + -4|0);
+       $1837 = HEAP32[$1836>>2]|0;
+       $1838 = ((($1837)) + 10|0);
+       $1839 = HEAP16[$1838>>1]|0;
+       $1840 = HEAP32[$yyval>>2]|0;
+       $1841 = ((($1840)) + 10|0);
+       HEAP16[$1841>>1] = $1839;
+       $1842 = $yyvsp;
+       $1843 = ((($1842)) + -4|0);
+       $1844 = HEAP32[$1843>>2]|0;
+       $1845 = ((($1844)) + 8|0);
+       $1846 = HEAP16[$1845>>1]|0;
+       $1847 = HEAP32[$yyval>>2]|0;
+       $1848 = ((($1847)) + 8|0);
+       HEAP16[$1848>>1] = $1846;
+      }
+      break;
+     }
+     case 282:  {
+      $1849 = $0;
+      $1850 = (_new_return($1849,0)|0);
+      HEAP32[$yyval>>2] = $1850;
+      break;
+     }
+     case 283:  {
+      $1851 = $0;
+      $1852 = $yyvsp;
+      $1853 = ((($1852)) + -4|0);
+      $1854 = HEAP32[$1853>>2]|0;
+      $1855 = (_new_yield($1851,$1854)|0);
+      HEAP32[$yyval>>2] = $1855;
+      break;
+     }
+     case 284:  {
+      $1856 = $0;
+      $1857 = (_new_yield($1856,0)|0);
+      HEAP32[$yyval>>2] = $1857;
+      break;
+     }
+     case 285:  {
+      $1858 = $0;
+      $1859 = (_new_yield($1858,0)|0);
+      HEAP32[$yyval>>2] = $1859;
+      break;
+     }
+     case 286:  {
+      $1860 = $0;
+      $1861 = $yyvsp;
+      $1862 = ((($1861)) + -4|0);
+      $1863 = HEAP32[$1862>>2]|0;
+      $1864 = (_cond($1863)|0);
+      $1865 = (_call_uni_op($1860,$1864,65320)|0);
+      HEAP32[$yyval>>2] = $1865;
+      break;
+     }
+     case 287:  {
+      $1866 = $0;
+      $1867 = $0;
+      $1868 = (_new_nil($1867)|0);
+      $1869 = (_call_uni_op($1866,$1868,65320)|0);
+      HEAP32[$yyval>>2] = $1869;
+      break;
+     }
+     case 288:  {
+      $1870 = $0;
+      $1871 = $yyvsp;
+      $1872 = ((($1871)) + -4|0);
+      $1873 = HEAP32[$1872>>2]|0;
+      $1874 = $0;
+      $1875 = $yyvsp;
+      $1876 = HEAP32[$1875>>2]|0;
+      $1877 = (_cons_gen($1874,0,$1876)|0);
+      $1878 = (_new_fcall($1870,$1873,$1877)|0);
+      HEAP32[$yyval>>2] = $1878;
+      break;
+     }
+     case 290:  {
+      $1879 = $0;
+      $1880 = $yyvsp;
+      $1881 = ((($1880)) + -4|0);
+      $1882 = HEAP32[$1881>>2]|0;
+      $1883 = $yyvsp;
+      $1884 = HEAP32[$1883>>2]|0;
+      _call_with_block($1879,$1882,$1884);
+      $1885 = $yyvsp;
+      $1886 = ((($1885)) + -4|0);
+      $1887 = HEAP32[$1886>>2]|0;
+      HEAP32[$yyval>>2] = $1887;
+      break;
+     }
+     case 291:  {
+      $1888 = $0;
+      _local_nest($1888);
+      $1889 = $0;
+      $1890 = ((($1889)) + 60|0);
+      $1891 = HEAP32[$1890>>2]|0;
+      HEAP32[$yyval>>2] = $1891;
+      $1892 = $0;
+      $1893 = ((($1892)) + 56|0);
+      $1894 = HEAP32[$1893>>2]|0;
+      $1895 = (($1894) + 1)|0;
+      HEAP32[$1893>>2] = $1895;
+      $1896 = $0;
+      $1897 = ((($1896)) + 60|0);
+      HEAP32[$1897>>2] = $1895;
+      break;
+     }
+     case 292:  {
+      $1898 = $0;
+      $1899 = ((($1898)) + 52|0);
+      $1900 = HEAP32[$1899>>2]|0;
+      HEAP32[$yyval>>2] = $1900;
+      $1901 = $0;
+      $1902 = ((($1901)) + 52|0);
+      HEAP32[$1902>>2] = 0;
+      break;
+     }
+     case 293:  {
+      $1903 = $yyvsp;
+      $1904 = ((($1903)) + -12|0);
+      $1905 = HEAP32[$1904>>2]|0;
+      $1906 = $0;
+      $1907 = ((($1906)) + 60|0);
+      HEAP32[$1907>>2] = $1905;
+      $1908 = $0;
+      $1909 = $yyvsp;
+      $1910 = ((($1909)) + -8|0);
+      $1911 = HEAP32[$1910>>2]|0;
+      $1912 = $yyvsp;
+      $1913 = HEAP32[$1912>>2]|0;
+      $1914 = (_new_lambda($1908,$1911,$1913)|0);
+      HEAP32[$yyval>>2] = $1914;
+      $1915 = $0;
+      _local_unnest($1915);
+      $1916 = $yyvsp;
+      $1917 = ((($1916)) + -4|0);
+      $1918 = HEAP32[$1917>>2]|0;
+      $1919 = $0;
+      $1920 = ((($1919)) + 52|0);
+      HEAP32[$1920>>2] = $1918;
+      $1921 = $0;
+      $1922 = ((($1921)) + 52|0);
+      $1923 = HEAP32[$1922>>2]|0;
+      $1924 = $1923 >>> 1;
+      $1925 = $0;
+      $1926 = ((($1925)) + 52|0);
+      $1927 = HEAP32[$1926>>2]|0;
+      $1928 = $1927 & 1;
+      $1929 = $1924 | $1928;
+      $1930 = $0;
+      $1931 = ((($1930)) + 52|0);
+      HEAP32[$1931>>2] = $1929;
+      break;
+     }
+     case 294:  {
+      $1932 = $0;
+      $1933 = $yyvsp;
+      $1934 = ((($1933)) + -16|0);
+      $1935 = HEAP32[$1934>>2]|0;
+      $1936 = (_cond($1935)|0);
+      $1937 = $yyvsp;
+      $1938 = ((($1937)) + -8|0);
+      $1939 = HEAP32[$1938>>2]|0;
+      $1940 = $yyvsp;
+      $1941 = ((($1940)) + -4|0);
+      $1942 = HEAP32[$1941>>2]|0;
+      $1943 = (_new_if($1932,$1936,$1939,$1942)|0);
+      HEAP32[$yyval>>2] = $1943;
+      $1944 = $yyvsp;
+      $1945 = ((($1944)) + -20|0);
+      $1946 = HEAP32[$1945>>2]|0;
+      $1947 = $1946&65535;
+      $1948 = HEAP32[$yyval>>2]|0;
+      $1949 = ((($1948)) + 8|0);
+      HEAP16[$1949>>1] = $1947;
+      break;
+     }
+     case 295:  {
+      $1950 = $0;
+      $1951 = $yyvsp;
+      $1952 = ((($1951)) + -16|0);
+      $1953 = HEAP32[$1952>>2]|0;
+      $1954 = (_cond($1953)|0);
+      $1955 = $yyvsp;
+      $1956 = ((($1955)) + -8|0);
+      $1957 = HEAP32[$1956>>2]|0;
+      $1958 = $yyvsp;
+      $1959 = ((($1958)) + -4|0);
+      $1960 = HEAP32[$1959>>2]|0;
+      $1961 = (_new_unless($1950,$1954,$1957,$1960)|0);
+      HEAP32[$yyval>>2] = $1961;
+      $1962 = $yyvsp;
+      $1963 = ((($1962)) + -20|0);
+      $1964 = HEAP32[$1963>>2]|0;
+      $1965 = $1964&65535;
+      $1966 = HEAP32[$yyval>>2]|0;
+      $1967 = ((($1966)) + 8|0);
+      HEAP16[$1967>>1] = $1965;
+      break;
+     }
+     case 296:  {
+      $1968 = $0;
+      $1969 = ((($1968)) + 48|0);
+      $1970 = HEAP32[$1969>>2]|0;
+      $1971 = $1970 << 1;
+      $1972 = $1971 | 1;
+      $1973 = $0;
+      $1974 = ((($1973)) + 48|0);
+      HEAP32[$1974>>2] = $1972;
+      break;
+     }
+     case 297:  {
+      $1975 = $0;
+      $1976 = ((($1975)) + 48|0);
+      $1977 = HEAP32[$1976>>2]|0;
+      $1978 = $1977 >>> 1;
+      $1979 = $0;
+      $1980 = ((($1979)) + 48|0);
+      HEAP32[$1980>>2] = $1978;
+      break;
+     }
+     case 298:  {
+      $1981 = $0;
+      $1982 = $yyvsp;
+      $1983 = ((($1982)) + -16|0);
+      $1984 = HEAP32[$1983>>2]|0;
+      $1985 = (_cond($1984)|0);
+      $1986 = $yyvsp;
+      $1987 = ((($1986)) + -4|0);
+      $1988 = HEAP32[$1987>>2]|0;
+      $1989 = (_new_while($1981,$1985,$1988)|0);
+      HEAP32[$yyval>>2] = $1989;
+      $1990 = $yyvsp;
+      $1991 = ((($1990)) + -24|0);
+      $1992 = HEAP32[$1991>>2]|0;
+      $1993 = $1992&65535;
+      $1994 = HEAP32[$yyval>>2]|0;
+      $1995 = ((($1994)) + 8|0);
+      HEAP16[$1995>>1] = $1993;
+      break;
+     }
+     case 299:  {
+      $1996 = $0;
+      $1997 = ((($1996)) + 48|0);
+      $1998 = HEAP32[$1997>>2]|0;
+      $1999 = $1998 << 1;
+      $2000 = $1999 | 1;
+      $2001 = $0;
+      $2002 = ((($2001)) + 48|0);
+      HEAP32[$2002>>2] = $2000;
+      break;
+     }
+     case 300:  {
+      $2003 = $0;
+      $2004 = ((($2003)) + 48|0);
+      $2005 = HEAP32[$2004>>2]|0;
+      $2006 = $2005 >>> 1;
+      $2007 = $0;
+      $2008 = ((($2007)) + 48|0);
+      HEAP32[$2008>>2] = $2006;
+      break;
+     }
+     case 301:  {
+      $2009 = $0;
+      $2010 = $yyvsp;
+      $2011 = ((($2010)) + -16|0);
+      $2012 = HEAP32[$2011>>2]|0;
+      $2013 = (_cond($2012)|0);
+      $2014 = $yyvsp;
+      $2015 = ((($2014)) + -4|0);
+      $2016 = HEAP32[$2015>>2]|0;
+      $2017 = (_new_until($2009,$2013,$2016)|0);
+      HEAP32[$yyval>>2] = $2017;
+      $2018 = $yyvsp;
+      $2019 = ((($2018)) + -24|0);
+      $2020 = HEAP32[$2019>>2]|0;
+      $2021 = $2020&65535;
+      $2022 = HEAP32[$yyval>>2]|0;
+      $2023 = ((($2022)) + 8|0);
+      HEAP16[$2023>>1] = $2021;
+      break;
+     }
+     case 302:  {
+      $2024 = $0;
+      $2025 = $yyvsp;
+      $2026 = ((($2025)) + -12|0);
+      $2027 = HEAP32[$2026>>2]|0;
+      $2028 = $yyvsp;
+      $2029 = ((($2028)) + -4|0);
+      $2030 = HEAP32[$2029>>2]|0;
+      $2031 = (_new_case($2024,$2027,$2030)|0);
+      HEAP32[$yyval>>2] = $2031;
+      break;
+     }
+     case 303:  {
+      $2032 = $0;
+      $2033 = $yyvsp;
+      $2034 = ((($2033)) + -4|0);
+      $2035 = HEAP32[$2034>>2]|0;
+      $2036 = (_new_case($2032,0,$2035)|0);
+      HEAP32[$yyval>>2] = $2036;
+      break;
+     }
+     case 304:  {
+      $2037 = $0;
+      $2038 = ((($2037)) + 48|0);
+      $2039 = HEAP32[$2038>>2]|0;
+      $2040 = $2039 << 1;
+      $2041 = $2040 | 1;
+      $2042 = $0;
+      $2043 = ((($2042)) + 48|0);
+      HEAP32[$2043>>2] = $2041;
+      break;
+     }
+     case 305:  {
+      $2044 = $0;
+      $2045 = ((($2044)) + 48|0);
+      $2046 = HEAP32[$2045>>2]|0;
+      $2047 = $2046 >>> 1;
+      $2048 = $0;
+      $2049 = ((($2048)) + 48|0);
+      HEAP32[$2049>>2] = $2047;
+      break;
+     }
+     case 306:  {
+      $2050 = $0;
+      $2051 = $yyvsp;
+      $2052 = ((($2051)) + -28|0);
+      $2053 = HEAP32[$2052>>2]|0;
+      $2054 = $yyvsp;
+      $2055 = ((($2054)) + -16|0);
+      $2056 = HEAP32[$2055>>2]|0;
+      $2057 = $yyvsp;
+      $2058 = ((($2057)) + -4|0);
+      $2059 = HEAP32[$2058>>2]|0;
+      $2060 = (_new_for($2050,$2053,$2056,$2059)|0);
+      HEAP32[$yyval>>2] = $2060;
+      $2061 = $yyvsp;
+      $2062 = ((($2061)) + -32|0);
+      $2063 = HEAP32[$2062>>2]|0;
+      $2064 = $2063&65535;
+      $2065 = HEAP32[$yyval>>2]|0;
+      $2066 = ((($2065)) + 8|0);
+      HEAP16[$2066>>1] = $2064;
+      break;
+     }
+     case 307:  {
+      $2067 = $0;
+      $2068 = ((($2067)) + 64|0);
+      $2069 = HEAP32[$2068>>2]|0;
+      $2070 = ($2069|0)!=(0);
+      if ($2070) {
+       label = 307;
+      } else {
+       $2071 = $0;
+       $2072 = ((($2071)) + 68|0);
+       $2073 = HEAP32[$2072>>2]|0;
+       $2074 = ($2073|0)!=(0);
+       if ($2074) {
+        label = 307;
+       }
+      }
+      if ((label|0) == 307) {
+       label = 0;
+       $2075 = $0;
+       _yyerror($2075,59640);
+      }
+      $2076 = $0;
+      $2077 = (_local_switch($2076)|0);
+      HEAP32[$yyval>>2] = $2077;
+      break;
+     }
+     case 308:  {
+      $2078 = $0;
+      $2079 = $yyvsp;
+      $2080 = ((($2079)) + -16|0);
+      $2081 = HEAP32[$2080>>2]|0;
+      $2082 = $yyvsp;
+      $2083 = ((($2082)) + -12|0);
+      $2084 = HEAP32[$2083>>2]|0;
+      $2085 = $yyvsp;
+      $2086 = ((($2085)) + -4|0);
+      $2087 = HEAP32[$2086>>2]|0;
+      $2088 = (_new_class($2078,$2081,$2084,$2087)|0);
+      HEAP32[$yyval>>2] = $2088;
+      $2089 = $yyvsp;
+      $2090 = ((($2089)) + -20|0);
+      $2091 = HEAP32[$2090>>2]|0;
+      $2092 = $2091&65535;
+      $2093 = HEAP32[$yyval>>2]|0;
+      $2094 = ((($2093)) + 8|0);
+      HEAP16[$2094>>1] = $2092;
+      $2095 = $0;
+      $2096 = $yyvsp;
+      $2097 = ((($2096)) + -8|0);
+      $2098 = HEAP32[$2097>>2]|0;
+      _local_resume($2095,$2098);
+      break;
+     }
+     case 309:  {
+      $2099 = $0;
+      $2100 = ((($2099)) + 64|0);
+      $2101 = HEAP32[$2100>>2]|0;
+      HEAP32[$yyval>>2] = $2101;
+      $2102 = $0;
+      $2103 = ((($2102)) + 64|0);
+      HEAP32[$2103>>2] = 0;
+      break;
+     }
+     case 310:  {
+      $2104 = $0;
+      $2105 = $0;
+      $2106 = (_local_switch($2105)|0);
+      $2107 = $0;
+      $2108 = ((($2107)) + 68|0);
+      $2109 = HEAP32[$2108>>2]|0;
+      $2110 = $2109;
+      $2111 = (_cons_gen($2104,$2106,$2110)|0);
+      HEAP32[$yyval>>2] = $2111;
+      $2112 = $0;
+      $2113 = ((($2112)) + 68|0);
+      HEAP32[$2113>>2] = 0;
+      break;
+     }
+     case 311:  {
+      $2114 = $0;
+      $2115 = $yyvsp;
+      $2116 = ((($2115)) + -20|0);
+      $2117 = HEAP32[$2116>>2]|0;
+      $2118 = $yyvsp;
+      $2119 = ((($2118)) + -4|0);
+      $2120 = HEAP32[$2119>>2]|0;
+      $2121 = (_new_sclass($2114,$2117,$2120)|0);
+      HEAP32[$yyval>>2] = $2121;
+      $2122 = $yyvsp;
+      $2123 = ((($2122)) + -28|0);
+      $2124 = HEAP32[$2123>>2]|0;
+      $2125 = $2124&65535;
+      $2126 = HEAP32[$yyval>>2]|0;
+      $2127 = ((($2126)) + 8|0);
+      HEAP16[$2127>>1] = $2125;
+      $2128 = $0;
+      $2129 = $yyvsp;
+      $2130 = ((($2129)) + -8|0);
+      $2131 = HEAP32[$2130>>2]|0;
+      $2132 = HEAP32[$2131>>2]|0;
+      _local_resume($2128,$2132);
+      $2133 = $yyvsp;
+      $2134 = ((($2133)) + -16|0);
+      $2135 = HEAP32[$2134>>2]|0;
+      $2136 = $0;
+      $2137 = ((($2136)) + 64|0);
+      HEAP32[$2137>>2] = $2135;
+      $2138 = $yyvsp;
+      $2139 = ((($2138)) + -8|0);
+      $2140 = HEAP32[$2139>>2]|0;
+      $2141 = ((($2140)) + 4|0);
+      $2142 = HEAP32[$2141>>2]|0;
+      $2143 = $2142;
+      $2144 = $0;
+      $2145 = ((($2144)) + 68|0);
+      HEAP32[$2145>>2] = $2143;
+      break;
+     }
+     case 312:  {
+      $2146 = $0;
+      $2147 = ((($2146)) + 64|0);
+      $2148 = HEAP32[$2147>>2]|0;
+      $2149 = ($2148|0)!=(0);
+      if ($2149) {
+       label = 315;
+      } else {
+       $2150 = $0;
+       $2151 = ((($2150)) + 68|0);
+       $2152 = HEAP32[$2151>>2]|0;
+       $2153 = ($2152|0)!=(0);
+       if ($2153) {
+        label = 315;
+       }
+      }
+      if ((label|0) == 315) {
+       label = 0;
+       $2154 = $0;
+       _yyerror($2154,59672);
+      }
+      $2155 = $0;
+      $2156 = (_local_switch($2155)|0);
+      HEAP32[$yyval>>2] = $2156;
+      break;
+     }
+     case 313:  {
+      $2157 = $0;
+      $2158 = $yyvsp;
+      $2159 = ((($2158)) + -12|0);
+      $2160 = HEAP32[$2159>>2]|0;
+      $2161 = $yyvsp;
+      $2162 = ((($2161)) + -4|0);
+      $2163 = HEAP32[$2162>>2]|0;
+      $2164 = (_new_module($2157,$2160,$2163)|0);
+      HEAP32[$yyval>>2] = $2164;
+      $2165 = $yyvsp;
+      $2166 = ((($2165)) + -16|0);
+      $2167 = HEAP32[$2166>>2]|0;
+      $2168 = $2167&65535;
+      $2169 = HEAP32[$yyval>>2]|0;
+      $2170 = ((($2169)) + 8|0);
+      HEAP16[$2170>>1] = $2168;
+      $2171 = $0;
+      $2172 = $yyvsp;
+      $2173 = ((($2172)) + -8|0);
+      $2174 = HEAP32[$2173>>2]|0;
+      _local_resume($2171,$2174);
+      break;
+     }
+     case 314:  {
+      $2175 = $0;
+      $2176 = ((($2175)) + 52|0);
+      $2177 = HEAP32[$2176>>2]|0;
+      HEAP32[$yyval>>2] = $2177;
+      $2178 = $0;
+      $2179 = ((($2178)) + 52|0);
+      HEAP32[$2179>>2] = 0;
+      break;
+     }
+     case 315:  {
+      $2180 = $0;
+      $2181 = ((($2180)) + 64|0);
+      $2182 = HEAP32[$2181>>2]|0;
+      $2183 = (($2182) + 1)|0;
+      HEAP32[$2181>>2] = $2183;
+      $2184 = $0;
+      $2185 = (_local_switch($2184)|0);
+      HEAP32[$yyval>>2] = $2185;
+      break;
+     }
+     case 316:  {
+      $2186 = $0;
+      $2187 = $yyvsp;
+      $2188 = ((($2187)) + -20|0);
+      $2189 = HEAP32[$2188>>2]|0;
+      $2190 = $yyvsp;
+      $2191 = ((($2190)) + -8|0);
+      $2192 = HEAP32[$2191>>2]|0;
+      $2193 = $yyvsp;
+      $2194 = ((($2193)) + -4|0);
+      $2195 = HEAP32[$2194>>2]|0;
+      $2196 = (_new_def($2186,$2189,$2192,$2195)|0);
+      HEAP32[$yyval>>2] = $2196;
+      $2197 = $yyvsp;
+      $2198 = ((($2197)) + -24|0);
+      $2199 = HEAP32[$2198>>2]|0;
+      $2200 = $2199&65535;
+      $2201 = HEAP32[$yyval>>2]|0;
+      $2202 = ((($2201)) + 8|0);
+      HEAP16[$2202>>1] = $2200;
+      $2203 = $0;
+      $2204 = $yyvsp;
+      $2205 = ((($2204)) + -12|0);
+      $2206 = HEAP32[$2205>>2]|0;
+      _local_resume($2203,$2206);
+      $2207 = $0;
+      $2208 = ((($2207)) + 64|0);
+      $2209 = HEAP32[$2208>>2]|0;
+      $2210 = (($2209) + -1)|0;
+      HEAP32[$2208>>2] = $2210;
+      $2211 = $yyvsp;
+      $2212 = ((($2211)) + -16|0);
+      $2213 = HEAP32[$2212>>2]|0;
+      $2214 = $0;
+      $2215 = ((($2214)) + 52|0);
+      HEAP32[$2215>>2] = $2213;
+      break;
+     }
+     case 317:  {
+      $2216 = $0;
+      $2217 = ((($2216)) + 40|0);
+      HEAP32[$2217>>2] = 7;
+      $2218 = $0;
+      $2219 = ((($2218)) + 52|0);
+      $2220 = HEAP32[$2219>>2]|0;
+      HEAP32[$yyval>>2] = $2220;
+      $2221 = $0;
+      $2222 = ((($2221)) + 52|0);
+      HEAP32[$2222>>2] = 0;
+      break;
+     }
+     case 318:  {
+      $2223 = $0;
+      $2224 = ((($2223)) + 68|0);
+      $2225 = HEAP32[$2224>>2]|0;
+      $2226 = (($2225) + 1)|0;
+      HEAP32[$2224>>2] = $2226;
+      $2227 = $0;
+      $2228 = ((($2227)) + 40|0);
+      HEAP32[$2228>>2] = 3;
+      $2229 = $0;
+      $2230 = (_local_switch($2229)|0);
+      HEAP32[$yyval>>2] = $2230;
+      break;
+     }
+     case 319:  {
+      $2231 = $0;
+      $2232 = $yyvsp;
+      $2233 = ((($2232)) + -28|0);
+      $2234 = HEAP32[$2233>>2]|0;
+      $2235 = $yyvsp;
+      $2236 = ((($2235)) + -16|0);
+      $2237 = HEAP32[$2236>>2]|0;
+      $2238 = $yyvsp;
+      $2239 = ((($2238)) + -8|0);
+      $2240 = HEAP32[$2239>>2]|0;
+      $2241 = $yyvsp;
+      $2242 = ((($2241)) + -4|0);
+      $2243 = HEAP32[$2242>>2]|0;
+      $2244 = (_new_sdef($2231,$2234,$2237,$2240,$2243)|0);
+      HEAP32[$yyval>>2] = $2244;
+      $2245 = $yyvsp;
+      $2246 = ((($2245)) + -32|0);
+      $2247 = HEAP32[$2246>>2]|0;
+      $2248 = $2247&65535;
+      $2249 = HEAP32[$yyval>>2]|0;
+      $2250 = ((($2249)) + 8|0);
+      HEAP16[$2250>>1] = $2248;
+      $2251 = $0;
+      $2252 = $yyvsp;
+      $2253 = ((($2252)) + -12|0);
+      $2254 = HEAP32[$2253>>2]|0;
+      _local_resume($2251,$2254);
+      $2255 = $0;
+      $2256 = ((($2255)) + 68|0);
+      $2257 = HEAP32[$2256>>2]|0;
+      $2258 = (($2257) + -1)|0;
+      HEAP32[$2256>>2] = $2258;
+      $2259 = $yyvsp;
+      $2260 = ((($2259)) + -20|0);
+      $2261 = HEAP32[$2260>>2]|0;
+      $2262 = $0;
+      $2263 = ((($2262)) + 52|0);
+      HEAP32[$2263>>2] = $2261;
+      break;
+     }
+     case 320:  {
+      $2264 = $0;
+      $2265 = (_new_break($2264,0)|0);
+      HEAP32[$yyval>>2] = $2265;
+      break;
+     }
+     case 321:  {
+      $2266 = $0;
+      $2267 = (_new_next($2266,0)|0);
+      HEAP32[$yyval>>2] = $2267;
+      break;
+     }
+     case 322:  {
+      $2268 = $0;
+      $2269 = (_new_redo($2268)|0);
+      HEAP32[$yyval>>2] = $2269;
+      break;
+     }
+     case 323:  {
+      $2270 = $0;
+      $2271 = (_new_retry($2270)|0);
+      HEAP32[$yyval>>2] = $2271;
+      break;
+     }
+     case 324:  {
+      $2272 = $yyvsp;
+      $2273 = HEAP32[$2272>>2]|0;
+      HEAP32[$yyval>>2] = $2273;
+      $2274 = HEAP32[$yyval>>2]|0;
+      $2275 = ($2274|0)!=(0|0);
+      if (!($2275)) {
+       $2276 = $0;
+       $2277 = (_new_nil($2276)|0);
+       HEAP32[$yyval>>2] = $2277;
+      }
+      break;
+     }
+     case 331:  {
+      $2278 = $0;
+      $2279 = $yyvsp;
+      $2280 = ((($2279)) + -12|0);
+      $2281 = HEAP32[$2280>>2]|0;
+      $2282 = (_cond($2281)|0);
+      $2283 = $yyvsp;
+      $2284 = ((($2283)) + -4|0);
+      $2285 = HEAP32[$2284>>2]|0;
+      $2286 = $yyvsp;
+      $2287 = HEAP32[$2286>>2]|0;
+      $2288 = (_new_if($2278,$2282,$2285,$2287)|0);
+      HEAP32[$yyval>>2] = $2288;
+      break;
+     }
+     case 333:  {
+      $2289 = $yyvsp;
+      $2290 = HEAP32[$2289>>2]|0;
+      HEAP32[$yyval>>2] = $2290;
+      break;
+     }
+     case 334:  {
+      $2291 = $0;
+      $2292 = $0;
+      $2293 = $yyvsp;
+      $2294 = HEAP32[$2293>>2]|0;
+      $2295 = (_list1_gen($2292,$2294)|0);
+      $2296 = (_list1_gen($2291,$2295)|0);
+      HEAP32[$yyval>>2] = $2296;
+      break;
+     }
+     case 336:  {
+      $2297 = $0;
+      $2298 = $yyvsp;
+      $2299 = HEAP32[$2298>>2]|0;
+      $2300 = (_new_arg($2297,$2299)|0);
+      HEAP32[$yyval>>2] = $2300;
+      break;
+     }
+     case 337:  {
+      $2301 = $0;
+      $2302 = $yyvsp;
+      $2303 = ((($2302)) + -4|0);
+      $2304 = HEAP32[$2303>>2]|0;
+      $2305 = (_new_masgn($2301,$2304,0)|0);
+      HEAP32[$yyval>>2] = $2305;
+      break;
+     }
+     case 338:  {
+      $2306 = $0;
+      $2307 = $yyvsp;
+      $2308 = HEAP32[$2307>>2]|0;
+      $2309 = (_list1_gen($2306,$2308)|0);
+      HEAP32[$yyval>>2] = $2309;
+      break;
+     }
+     case 339:  {
+      $2310 = $0;
+      $2311 = $yyvsp;
+      $2312 = ((($2311)) + -8|0);
+      $2313 = HEAP32[$2312>>2]|0;
+      $2314 = $0;
+      $2315 = $yyvsp;
+      $2316 = HEAP32[$2315>>2]|0;
+      $2317 = (_list1_gen($2314,$2316)|0);
+      $2318 = (_append_gen($2310,$2313,$2317)|0);
+      HEAP32[$yyval>>2] = $2318;
+      break;
+     }
+     case 340:  {
+      $2319 = $0;
+      $2320 = $yyvsp;
+      $2321 = HEAP32[$2320>>2]|0;
+      $2322 = (_list3_gen($2319,$2321,0,0)|0);
+      HEAP32[$yyval>>2] = $2322;
+      break;
+     }
+     case 341:  {
+      $2323 = $0;
+      $2324 = $yyvsp;
+      $2325 = ((($2324)) + -12|0);
+      $2326 = HEAP32[$2325>>2]|0;
+      $2327 = $0;
+      $2328 = $yyvsp;
+      $2329 = HEAP32[$2328>>2]|0;
+      $2330 = (_new_arg($2327,$2329)|0);
+      $2331 = (_list3_gen($2323,$2326,$2330,0)|0);
+      HEAP32[$yyval>>2] = $2331;
+      break;
+     }
+     case 342:  {
+      $2332 = $0;
+      $2333 = $yyvsp;
+      $2334 = ((($2333)) + -20|0);
+      $2335 = HEAP32[$2334>>2]|0;
+      $2336 = $0;
+      $2337 = $yyvsp;
+      $2338 = ((($2337)) + -8|0);
+      $2339 = HEAP32[$2338>>2]|0;
+      $2340 = (_new_arg($2336,$2339)|0);
+      $2341 = $yyvsp;
+      $2342 = HEAP32[$2341>>2]|0;
+      $2343 = (_list3_gen($2332,$2335,$2340,$2342)|0);
+      HEAP32[$yyval>>2] = $2343;
+      break;
+     }
+     case 343:  {
+      $2344 = $0;
+      $2345 = $yyvsp;
+      $2346 = ((($2345)) + -8|0);
+      $2347 = HEAP32[$2346>>2]|0;
+      $2348 = (_list3_gen($2344,$2347,(-1),0)|0);
+      HEAP32[$yyval>>2] = $2348;
+      break;
+     }
+     case 344:  {
+      $2349 = $0;
+      $2350 = $yyvsp;
+      $2351 = ((($2350)) + -16|0);
+      $2352 = HEAP32[$2351>>2]|0;
+      $2353 = $yyvsp;
+      $2354 = HEAP32[$2353>>2]|0;
+      $2355 = (_list3_gen($2349,$2352,(-1),$2354)|0);
+      HEAP32[$yyval>>2] = $2355;
+      break;
+     }
+     case 345:  {
+      $2356 = $0;
+      $2357 = $0;
+      $2358 = $yyvsp;
+      $2359 = HEAP32[$2358>>2]|0;
+      $2360 = (_new_arg($2357,$2359)|0);
+      $2361 = (_list3_gen($2356,0,$2360,0)|0);
+      HEAP32[$yyval>>2] = $2361;
+      break;
+     }
+     case 346:  {
+      $2362 = $0;
+      $2363 = $0;
+      $2364 = $yyvsp;
+      $2365 = ((($2364)) + -8|0);
+      $2366 = HEAP32[$2365>>2]|0;
+      $2367 = (_new_arg($2363,$2366)|0);
+      $2368 = $yyvsp;
+      $2369 = HEAP32[$2368>>2]|0;
+      $2370 = (_list3_gen($2362,0,$2367,$2369)|0);
+      HEAP32[$yyval>>2] = $2370;
+      break;
+     }
+     case 347:  {
+      $2371 = $0;
+      $2372 = (_list3_gen($2371,0,(-1),0)|0);
+      HEAP32[$yyval>>2] = $2372;
+      break;
+     }
+     case 348:  {
+      $2373 = $0;
+      $2374 = $yyvsp;
+      $2375 = HEAP32[$2374>>2]|0;
+      $2376 = (_list3_gen($2373,0,(-1),$2375)|0);
+      HEAP32[$yyval>>2] = $2376;
+      break;
+     }
+     case 349:  {
+      $2377 = $0;
+      $2378 = $yyvsp;
+      $2379 = ((($2378)) + -20|0);
+      $2380 = HEAP32[$2379>>2]|0;
+      $2381 = $yyvsp;
+      $2382 = ((($2381)) + -12|0);
+      $2383 = HEAP32[$2382>>2]|0;
+      $2384 = $yyvsp;
+      $2385 = ((($2384)) + -4|0);
+      $2386 = HEAP32[$2385>>2]|0;
+      $2387 = $yyvsp;
+      $2388 = HEAP32[$2387>>2]|0;
+      $2389 = (_new_args($2377,$2380,$2383,$2386,0,$2388)|0);
+      HEAP32[$yyval>>2] = $2389;
+      break;
+     }
+     case 350:  {
+      $2390 = $0;
+      $2391 = $yyvsp;
+      $2392 = ((($2391)) + -28|0);
+      $2393 = HEAP32[$2392>>2]|0;
+      $2394 = $yyvsp;
+      $2395 = ((($2394)) + -20|0);
+      $2396 = HEAP32[$2395>>2]|0;
+      $2397 = $yyvsp;
+      $2398 = ((($2397)) + -12|0);
+      $2399 = HEAP32[$2398>>2]|0;
+      $2400 = $yyvsp;
+      $2401 = ((($2400)) + -4|0);
+      $2402 = HEAP32[$2401>>2]|0;
+      $2403 = $yyvsp;
+      $2404 = HEAP32[$2403>>2]|0;
+      $2405 = (_new_args($2390,$2393,$2396,$2399,$2402,$2404)|0);
+      HEAP32[$yyval>>2] = $2405;
+      break;
+     }
+     case 351:  {
+      $2406 = $0;
+      $2407 = $yyvsp;
+      $2408 = ((($2407)) + -12|0);
+      $2409 = HEAP32[$2408>>2]|0;
+      $2410 = $yyvsp;
+      $2411 = ((($2410)) + -4|0);
+      $2412 = HEAP32[$2411>>2]|0;
+      $2413 = $yyvsp;
+      $2414 = HEAP32[$2413>>2]|0;
+      $2415 = (_new_args($2406,$2409,$2412,0,0,$2414)|0);
+      HEAP32[$yyval>>2] = $2415;
+      break;
+     }
+     case 352:  {
+      $2416 = $0;
+      $2417 = $yyvsp;
+      $2418 = ((($2417)) + -20|0);
+      $2419 = HEAP32[$2418>>2]|0;
+      $2420 = $yyvsp;
+      $2421 = ((($2420)) + -12|0);
+      $2422 = HEAP32[$2421>>2]|0;
+      $2423 = $yyvsp;
+      $2424 = ((($2423)) + -4|0);
+      $2425 = HEAP32[$2424>>2]|0;
+      $2426 = $yyvsp;
+      $2427 = HEAP32[$2426>>2]|0;
+      $2428 = (_new_args($2416,$2419,$2422,0,$2425,$2427)|0);
+      HEAP32[$yyval>>2] = $2428;
+      break;
+     }
+     case 353:  {
+      $2429 = $0;
+      $2430 = $yyvsp;
+      $2431 = ((($2430)) + -12|0);
+      $2432 = HEAP32[$2431>>2]|0;
+      $2433 = $yyvsp;
+      $2434 = ((($2433)) + -4|0);
+      $2435 = HEAP32[$2434>>2]|0;
+      $2436 = $yyvsp;
+      $2437 = HEAP32[$2436>>2]|0;
+      $2438 = (_new_args($2429,$2432,0,$2435,0,$2437)|0);
+      HEAP32[$yyval>>2] = $2438;
+      break;
+     }
+     case 354:  {
+      $2439 = $0;
+      $2440 = $yyvsp;
+      $2441 = ((($2440)) + -4|0);
+      $2442 = HEAP32[$2441>>2]|0;
+      $2443 = (_new_args($2439,$2442,0,1,0,0)|0);
+      HEAP32[$yyval>>2] = $2443;
+      break;
+     }
+     case 355:  {
+      $2444 = $0;
+      $2445 = $yyvsp;
+      $2446 = ((($2445)) + -20|0);
+      $2447 = HEAP32[$2446>>2]|0;
+      $2448 = $yyvsp;
+      $2449 = ((($2448)) + -12|0);
+      $2450 = HEAP32[$2449>>2]|0;
+      $2451 = $yyvsp;
+      $2452 = ((($2451)) + -4|0);
+      $2453 = HEAP32[$2452>>2]|0;
+      $2454 = $yyvsp;
+      $2455 = HEAP32[$2454>>2]|0;
+      $2456 = (_new_args($2444,$2447,0,$2450,$2453,$2455)|0);
+      HEAP32[$yyval>>2] = $2456;
+      break;
+     }
+     case 356:  {
+      $2457 = $0;
+      $2458 = $yyvsp;
+      $2459 = ((($2458)) + -4|0);
+      $2460 = HEAP32[$2459>>2]|0;
+      $2461 = $yyvsp;
+      $2462 = HEAP32[$2461>>2]|0;
+      $2463 = (_new_args($2457,$2460,0,0,0,$2462)|0);
+      HEAP32[$yyval>>2] = $2463;
+      break;
+     }
+     case 357:  {
+      $2464 = $0;
+      $2465 = $yyvsp;
+      $2466 = ((($2465)) + -12|0);
+      $2467 = HEAP32[$2466>>2]|0;
+      $2468 = $yyvsp;
+      $2469 = ((($2468)) + -4|0);
+      $2470 = HEAP32[$2469>>2]|0;
+      $2471 = $yyvsp;
+      $2472 = HEAP32[$2471>>2]|0;
+      $2473 = (_new_args($2464,0,$2467,$2470,0,$2472)|0);
+      HEAP32[$yyval>>2] = $2473;
+      break;
+     }
+     case 358:  {
+      $2474 = $0;
+      $2475 = $yyvsp;
+      $2476 = ((($2475)) + -20|0);
+      $2477 = HEAP32[$2476>>2]|0;
+      $2478 = $yyvsp;
+      $2479 = ((($2478)) + -12|0);
+      $2480 = HEAP32[$2479>>2]|0;
+      $2481 = $yyvsp;
+      $2482 = ((($2481)) + -4|0);
+      $2483 = HEAP32[$2482>>2]|0;
+      $2484 = $yyvsp;
+      $2485 = HEAP32[$2484>>2]|0;
+      $2486 = (_new_args($2474,0,$2477,$2480,$2483,$2485)|0);
+      HEAP32[$yyval>>2] = $2486;
+      break;
+     }
+     case 359:  {
+      $2487 = $0;
+      $2488 = $yyvsp;
+      $2489 = ((($2488)) + -4|0);
+      $2490 = HEAP32[$2489>>2]|0;
+      $2491 = $yyvsp;
+      $2492 = HEAP32[$2491>>2]|0;
+      $2493 = (_new_args($2487,0,$2490,0,0,$2492)|0);
+      HEAP32[$yyval>>2] = $2493;
+      break;
+     }
+     case 360:  {
+      $2494 = $0;
+      $2495 = $yyvsp;
+      $2496 = ((($2495)) + -12|0);
+      $2497 = HEAP32[$2496>>2]|0;
+      $2498 = $yyvsp;
+      $2499 = ((($2498)) + -4|0);
+      $2500 = HEAP32[$2499>>2]|0;
+      $2501 = $yyvsp;
+      $2502 = HEAP32[$2501>>2]|0;
+      $2503 = (_new_args($2494,0,$2497,0,$2500,$2502)|0);
+      HEAP32[$yyval>>2] = $2503;
+      break;
+     }
+     case 361:  {
+      $2504 = $0;
+      $2505 = $yyvsp;
+      $2506 = ((($2505)) + -4|0);
+      $2507 = HEAP32[$2506>>2]|0;
+      $2508 = $yyvsp;
+      $2509 = HEAP32[$2508>>2]|0;
+      $2510 = (_new_args($2504,0,0,$2507,0,$2509)|0);
+      HEAP32[$yyval>>2] = $2510;
+      break;
+     }
+     case 362:  {
+      $2511 = $0;
+      $2512 = $yyvsp;
+      $2513 = ((($2512)) + -12|0);
+      $2514 = HEAP32[$2513>>2]|0;
+      $2515 = $yyvsp;
+      $2516 = ((($2515)) + -4|0);
+      $2517 = HEAP32[$2516>>2]|0;
+      $2518 = $yyvsp;
+      $2519 = HEAP32[$2518>>2]|0;
+      $2520 = (_new_args($2511,0,0,$2514,$2517,$2519)|0);
+      HEAP32[$yyval>>2] = $2520;
+      break;
+     }
+     case 363:  {
+      $2521 = $0;
+      $2522 = $yyvsp;
+      $2523 = HEAP32[$2522>>2]|0;
+      $2524 = (_new_args($2521,0,0,0,0,$2523)|0);
+      HEAP32[$yyval>>2] = $2524;
+      break;
+     }
+     case 365:  {
+      $2525 = $0;
+      $2526 = ((($2525)) + 72|0);
+      $2527 = HEAP8[$2526>>0]|0;
+      $2528 = $2527 & -2;
+      $2529 = $2528 | 1;
+      HEAP8[$2526>>0] = $2529;
+      $2530 = $yyvsp;
+      $2531 = HEAP32[$2530>>2]|0;
+      HEAP32[$yyval>>2] = $2531;
+      break;
+     }
+     case 366:  {
+      HEAP32[$yyval>>2] = 0;
+      break;
+     }
+     case 367:  {
+      HEAP32[$yyval>>2] = 0;
+      break;
+     }
+     case 368:  {
+      $2532 = $yyvsp;
+      $2533 = ((($2532)) + -8|0);
+      $2534 = HEAP32[$2533>>2]|0;
+      HEAP32[$yyval>>2] = $2534;
+      break;
+     }
+     case 369:  {
+      HEAP32[$yyval>>2] = 0;
+      break;
+     }
+     case 370:  {
+      HEAP32[$yyval>>2] = 0;
+      break;
+     }
+     case 373:  {
+      $2535 = $0;
+      $2536 = $yyvsp;
+      $2537 = HEAP32[$2536>>2]|0;
+      _local_add_f($2535,$2537);
+      $2538 = $0;
+      $2539 = $yyvsp;
+      $2540 = HEAP32[$2539>>2]|0;
+      _new_bv($2538,$2540);
+      break;
+     }
+     case 375:  {
+      $2541 = $yyvsp;
+      $2542 = ((($2541)) + -8|0);
+      $2543 = HEAP32[$2542>>2]|0;
+      HEAP32[$yyval>>2] = $2543;
+      break;
+     }
+     case 376:  {
+      $2544 = $yyvsp;
+      $2545 = HEAP32[$2544>>2]|0;
+      HEAP32[$yyval>>2] = $2545;
+      break;
+     }
+     case 377:  {
+      $2546 = $yyvsp;
+      $2547 = ((($2546)) + -4|0);
+      $2548 = HEAP32[$2547>>2]|0;
+      HEAP32[$yyval>>2] = $2548;
+      break;
+     }
+     case 378:  {
+      $2549 = $yyvsp;
+      $2550 = ((($2549)) + -4|0);
+      $2551 = HEAP32[$2550>>2]|0;
+      HEAP32[$yyval>>2] = $2551;
+      break;
+     }
+     case 379:  {
+      $2552 = $0;
+      _local_nest($2552);
+      break;
+     }
+     case 380:  {
+      $2553 = $0;
+      $2554 = $yyvsp;
+      $2555 = ((($2554)) + -8|0);
+      $2556 = HEAP32[$2555>>2]|0;
+      $2557 = $yyvsp;
+      $2558 = ((($2557)) + -4|0);
+      $2559 = HEAP32[$2558>>2]|0;
+      $2560 = (_new_block($2553,$2556,$2559)|0);
+      HEAP32[$yyval>>2] = $2560;
+      $2561 = $0;
+      _local_unnest($2561);
+      break;
+     }
+     case 381:  {
+      $2562 = $yyvsp;
+      $2563 = ((($2562)) + -4|0);
+      $2564 = HEAP32[$2563>>2]|0;
+      $2565 = HEAP32[$2564>>2]|0;
+      $2566 = ($2565|0)==((38)|0);
+      $2567 = $0;
+      if ($2566) {
+       _yyerror($2567,59705);
+      } else {
+       $2568 = $yyvsp;
+       $2569 = ((($2568)) + -4|0);
+       $2570 = HEAP32[$2569>>2]|0;
+       $2571 = $yyvsp;
+       $2572 = HEAP32[$2571>>2]|0;
+       _call_with_block($2567,$2570,$2572);
+      }
+      $2573 = $yyvsp;
+      $2574 = ((($2573)) + -4|0);
+      $2575 = HEAP32[$2574>>2]|0;
+      HEAP32[$yyval>>2] = $2575;
+      break;
+     }
+     case 382:  {
+      $2576 = $0;
+      $2577 = $yyvsp;
+      $2578 = ((($2577)) + -12|0);
+      $2579 = HEAP32[$2578>>2]|0;
+      $2580 = $yyvsp;
+      $2581 = ((($2580)) + -4|0);
+      $2582 = HEAP32[$2581>>2]|0;
+      $2583 = $yyvsp;
+      $2584 = HEAP32[$2583>>2]|0;
+      $2585 = (_new_call($2576,$2579,$2582,$2584)|0);
+      HEAP32[$yyval>>2] = $2585;
+      break;
+     }
+     case 383:  {
+      $2586 = $0;
+      $2587 = $yyvsp;
+      $2588 = ((($2587)) + -16|0);
+      $2589 = HEAP32[$2588>>2]|0;
+      $2590 = $yyvsp;
+      $2591 = ((($2590)) + -8|0);
+      $2592 = HEAP32[$2591>>2]|0;
+      $2593 = $yyvsp;
+      $2594 = ((($2593)) + -4|0);
+      $2595 = HEAP32[$2594>>2]|0;
+      $2596 = (_new_call($2586,$2589,$2592,$2595)|0);
+      HEAP32[$yyval>>2] = $2596;
+      $2597 = $0;
+      $2598 = HEAP32[$yyval>>2]|0;
+      $2599 = $yyvsp;
+      $2600 = HEAP32[$2599>>2]|0;
+      _call_with_block($2597,$2598,$2600);
+      break;
+     }
+     case 384:  {
+      $2601 = $0;
+      $2602 = $yyvsp;
+      $2603 = ((($2602)) + -16|0);
+      $2604 = HEAP32[$2603>>2]|0;
+      $2605 = $yyvsp;
+      $2606 = ((($2605)) + -8|0);
+      $2607 = HEAP32[$2606>>2]|0;
+      $2608 = $yyvsp;
+      $2609 = ((($2608)) + -4|0);
+      $2610 = HEAP32[$2609>>2]|0;
+      $2611 = (_new_call($2601,$2604,$2607,$2610)|0);
+      HEAP32[$yyval>>2] = $2611;
+      $2612 = $0;
+      $2613 = HEAP32[$yyval>>2]|0;
+      $2614 = $yyvsp;
+      $2615 = HEAP32[$2614>>2]|0;
+      _call_with_block($2612,$2613,$2615);
+      break;
+     }
+     case 385:  {
+      $2616 = $0;
+      $2617 = $yyvsp;
+      $2618 = ((($2617)) + -4|0);
+      $2619 = HEAP32[$2618>>2]|0;
+      $2620 = $yyvsp;
+      $2621 = HEAP32[$2620>>2]|0;
+      $2622 = (_new_fcall($2616,$2619,$2621)|0);
+      HEAP32[$yyval>>2] = $2622;
+      break;
+     }
+     case 386:  {
+      $2623 = $0;
+      $2624 = $yyvsp;
+      $2625 = ((($2624)) + -12|0);
+      $2626 = HEAP32[$2625>>2]|0;
+      $2627 = $yyvsp;
+      $2628 = ((($2627)) + -4|0);
+      $2629 = HEAP32[$2628>>2]|0;
+      $2630 = $yyvsp;
+      $2631 = HEAP32[$2630>>2]|0;
+      $2632 = (_new_call($2623,$2626,$2629,$2631)|0);
+      HEAP32[$yyval>>2] = $2632;
+      break;
+     }
+     case 387:  {
+      $2633 = $0;
+      $2634 = $yyvsp;
+      $2635 = ((($2634)) + -12|0);
+      $2636 = HEAP32[$2635>>2]|0;
+      $2637 = $yyvsp;
+      $2638 = ((($2637)) + -4|0);
+      $2639 = HEAP32[$2638>>2]|0;
+      $2640 = $yyvsp;
+      $2641 = HEAP32[$2640>>2]|0;
+      $2642 = (_new_call($2633,$2636,$2639,$2641)|0);
+      HEAP32[$yyval>>2] = $2642;
+      break;
+     }
+     case 388:  {
+      $2643 = $0;
+      $2644 = $yyvsp;
+      $2645 = ((($2644)) + -8|0);
+      $2646 = HEAP32[$2645>>2]|0;
+      $2647 = $yyvsp;
+      $2648 = HEAP32[$2647>>2]|0;
+      $2649 = (_new_call($2643,$2646,$2648,0)|0);
+      HEAP32[$yyval>>2] = $2649;
+      break;
+     }
+     case 389:  {
+      $2650 = $0;
+      $2651 = $yyvsp;
+      $2652 = ((($2651)) + -8|0);
+      $2653 = HEAP32[$2652>>2]|0;
+      $2654 = $0;
+      $2655 = (_intern_gen($2654,69512,4)|0);
+      $2656 = $yyvsp;
+      $2657 = HEAP32[$2656>>2]|0;
+      $2658 = (_new_call($2650,$2653,$2655,$2657)|0);
+      HEAP32[$yyval>>2] = $2658;
+      break;
+     }
+     case 390:  {
+      $2659 = $0;
+      $2660 = $yyvsp;
+      $2661 = ((($2660)) + -8|0);
+      $2662 = HEAP32[$2661>>2]|0;
+      $2663 = $0;
+      $2664 = (_intern_gen($2663,69512,4)|0);
+      $2665 = $yyvsp;
+      $2666 = HEAP32[$2665>>2]|0;
+      $2667 = (_new_call($2659,$2662,$2664,$2666)|0);
+      HEAP32[$yyval>>2] = $2667;
+      break;
+     }
+     case 391:  {
+      $2668 = $0;
+      $2669 = $yyvsp;
+      $2670 = HEAP32[$2669>>2]|0;
+      $2671 = (_new_super($2668,$2670)|0);
+      HEAP32[$yyval>>2] = $2671;
+      break;
+     }
+     case 392:  {
+      $2672 = $0;
+      $2673 = (_new_zsuper($2672)|0);
+      HEAP32[$yyval>>2] = $2673;
+      break;
+     }
+     case 393:  {
+      $2674 = $0;
+      $2675 = $yyvsp;
+      $2676 = ((($2675)) + -12|0);
+      $2677 = HEAP32[$2676>>2]|0;
+      $2678 = $0;
+      $2679 = (_intern_gen($2678,68841,2)|0);
+      $2680 = $yyvsp;
+      $2681 = ((($2680)) + -4|0);
+      $2682 = HEAP32[$2681>>2]|0;
+      $2683 = (_new_call($2674,$2677,$2679,$2682)|0);
+      HEAP32[$yyval>>2] = $2683;
+      break;
+     }
+     case 394:  {
+      $2684 = $0;
+      _local_nest($2684);
+      $2685 = $0;
+      $2686 = ((($2685)) + 32|0);
+      $2687 = HEAP32[$2686>>2]|0;
+      HEAP32[$yyval>>2] = $2687;
+      break;
+     }
+     case 395:  {
+      $2688 = $0;
+      $2689 = $yyvsp;
+      $2690 = ((($2689)) + -8|0);
+      $2691 = HEAP32[$2690>>2]|0;
+      $2692 = $yyvsp;
+      $2693 = ((($2692)) + -4|0);
+      $2694 = HEAP32[$2693>>2]|0;
+      $2695 = (_new_block($2688,$2691,$2694)|0);
+      HEAP32[$yyval>>2] = $2695;
+      $2696 = $yyvsp;
+      $2697 = ((($2696)) + -12|0);
+      $2698 = HEAP32[$2697>>2]|0;
+      $2699 = $2698&65535;
+      $2700 = HEAP32[$yyval>>2]|0;
+      $2701 = ((($2700)) + 8|0);
+      HEAP16[$2701>>1] = $2699;
+      $2702 = $0;
+      _local_unnest($2702);
+      break;
+     }
+     case 396:  {
+      $2703 = $0;
+      _local_nest($2703);
+      $2704 = $0;
+      $2705 = ((($2704)) + 32|0);
+      $2706 = HEAP32[$2705>>2]|0;
+      HEAP32[$yyval>>2] = $2706;
+      break;
+     }
+     case 397:  {
+      $2707 = $0;
+      $2708 = $yyvsp;
+      $2709 = ((($2708)) + -8|0);
+      $2710 = HEAP32[$2709>>2]|0;
+      $2711 = $yyvsp;
+      $2712 = ((($2711)) + -4|0);
+      $2713 = HEAP32[$2712>>2]|0;
+      $2714 = (_new_block($2707,$2710,$2713)|0);
+      HEAP32[$yyval>>2] = $2714;
+      $2715 = $yyvsp;
+      $2716 = ((($2715)) + -12|0);
+      $2717 = HEAP32[$2716>>2]|0;
+      $2718 = $2717&65535;
+      $2719 = HEAP32[$yyval>>2]|0;
+      $2720 = ((($2719)) + 8|0);
+      HEAP16[$2720>>1] = $2718;
+      $2721 = $0;
+      _local_unnest($2721);
+      break;
+     }
+     case 398:  {
+      $2722 = $0;
+      $2723 = $0;
+      $2724 = $yyvsp;
+      $2725 = ((($2724)) + -12|0);
+      $2726 = HEAP32[$2725>>2]|0;
+      $2727 = $yyvsp;
+      $2728 = ((($2727)) + -4|0);
+      $2729 = HEAP32[$2728>>2]|0;
+      $2730 = (_cons_gen($2723,$2726,$2729)|0);
+      $2731 = $yyvsp;
+      $2732 = HEAP32[$2731>>2]|0;
+      $2733 = (_cons_gen($2722,$2730,$2732)|0);
+      HEAP32[$yyval>>2] = $2733;
+      break;
+     }
+     case 399:  {
+      $2734 = $yyvsp;
+      $2735 = HEAP32[$2734>>2]|0;
+      $2736 = ($2735|0)!=(0|0);
+      if ($2736) {
+       $2737 = $0;
+       $2738 = $0;
+       $2739 = $yyvsp;
+       $2740 = HEAP32[$2739>>2]|0;
+       $2741 = (_cons_gen($2738,0,$2740)|0);
+       $2742 = (_cons_gen($2737,$2741,0)|0);
+       HEAP32[$yyval>>2] = $2742;
+       break L69;
+      } else {
+       HEAP32[$yyval>>2] = 0;
+       break L69;
+      }
+      break;
+     }
+     case 401:  {
+      $2743 = $0;
+      $2744 = $0;
+      $2745 = $yyvsp;
+      $2746 = ((($2745)) + -16|0);
+      $2747 = HEAP32[$2746>>2]|0;
+      $2748 = $yyvsp;
+      $2749 = ((($2748)) + -12|0);
+      $2750 = HEAP32[$2749>>2]|0;
+      $2751 = $yyvsp;
+      $2752 = ((($2751)) + -4|0);
+      $2753 = HEAP32[$2752>>2]|0;
+      $2754 = (_list3_gen($2744,$2747,$2750,$2753)|0);
+      $2755 = (_list1_gen($2743,$2754)|0);
+      HEAP32[$yyval>>2] = $2755;
+      $2756 = $yyvsp;
+      $2757 = HEAP32[$2756>>2]|0;
+      $2758 = ($2757|0)!=(0|0);
+      if ($2758) {
+       $2759 = $0;
+       $2760 = HEAP32[$yyval>>2]|0;
+       $2761 = $yyvsp;
+       $2762 = HEAP32[$2761>>2]|0;
+       $2763 = (_append_gen($2759,$2760,$2762)|0);
+       HEAP32[$yyval>>2] = $2763;
+      }
+      break;
+     }
+     case 403:  {
+      $2764 = $0;
+      $2765 = $yyvsp;
+      $2766 = HEAP32[$2765>>2]|0;
+      $2767 = (_list1_gen($2764,$2766)|0);
+      HEAP32[$yyval>>2] = $2767;
+      break;
+     }
+     case 406:  {
+      $2768 = $yyvsp;
+      $2769 = HEAP32[$2768>>2]|0;
+      HEAP32[$yyval>>2] = $2769;
+      break;
+     }
+     case 408:  {
+      $2770 = $yyvsp;
+      $2771 = HEAP32[$2770>>2]|0;
+      HEAP32[$yyval>>2] = $2771;
+      break;
+     }
+     case 416:  {
+      $2772 = $yyvsp;
+      $2773 = HEAP32[$2772>>2]|0;
+      HEAP32[$yyval>>2] = $2773;
+      break;
+     }
+     case 417:  {
+      $2774 = $0;
+      $2775 = $0;
+      $2776 = $yyvsp;
+      $2777 = ((($2776)) + -4|0);
+      $2778 = HEAP32[$2777>>2]|0;
+      $2779 = $0;
+      $2780 = $yyvsp;
+      $2781 = HEAP32[$2780>>2]|0;
+      $2782 = (_list1_gen($2779,$2781)|0);
+      $2783 = (_append_gen($2775,$2778,$2782)|0);
+      $2784 = (_new_dstr($2774,$2783)|0);
+      HEAP32[$yyval>>2] = $2784;
+      break;
+     }
+     case 419:  {
+      $2785 = $0;
+      $2786 = $yyvsp;
+      $2787 = ((($2786)) + -4|0);
+      $2788 = HEAP32[$2787>>2]|0;
+      $2789 = $yyvsp;
+      $2790 = HEAP32[$2789>>2]|0;
+      $2791 = (_append_gen($2785,$2788,$2790)|0);
+      HEAP32[$yyval>>2] = $2791;
+      break;
+     }
+     case 420:  {
+      $2792 = $0;
+      $2793 = $yyvsp;
+      $2794 = HEAP32[$2793>>2]|0;
+      $2795 = (_list1_gen($2792,$2794)|0);
+      HEAP32[$yyval>>2] = $2795;
+      break;
+     }
+     case 421:  {
+      $2796 = $0;
+      $2797 = ((($2796)) + 44|0);
+      $2798 = HEAP32[$2797>>2]|0;
+      HEAP32[$yyval>>2] = $2798;
+      $2799 = $0;
+      $2800 = ((($2799)) + 44|0);
+      HEAP32[$2800>>2] = 0;
+      break;
+     }
+     case 422:  {
+      $2801 = $yyvsp;
+      $2802 = ((($2801)) + -8|0);
+      $2803 = HEAP32[$2802>>2]|0;
+      $2804 = $0;
+      $2805 = ((($2804)) + 44|0);
+      HEAP32[$2805>>2] = $2803;
+      $2806 = $0;
+      $2807 = $yyvsp;
+      $2808 = ((($2807)) + -12|0);
+      $2809 = HEAP32[$2808>>2]|0;
+      $2810 = $yyvsp;
+      $2811 = ((($2810)) + -4|0);
+      $2812 = HEAP32[$2811>>2]|0;
+      $2813 = (_list2_gen($2806,$2809,$2812)|0);
+      HEAP32[$yyval>>2] = $2813;
+      break;
+     }
+     case 423:  {
+      $2814 = $0;
+      $2815 = $0;
+      $2816 = (_new_literal_delim($2815)|0);
+      $2817 = (_list1_gen($2814,$2816)|0);
+      HEAP32[$yyval>>2] = $2817;
+      break;
+     }
+     case 424:  {
+      $2818 = $0;
+      $2819 = $0;
+      $2820 = (_new_literal_delim($2819)|0);
+      $2821 = (_list1_gen($2818,$2820)|0);
+      HEAP32[$yyval>>2] = $2821;
+      break;
+     }
+     case 425:  {
+      $2822 = $yyvsp;
+      $2823 = HEAP32[$2822>>2]|0;
+      HEAP32[$yyval>>2] = $2823;
+      break;
+     }
+     case 426:  {
+      $2824 = $0;
+      $2825 = $0;
+      $2826 = $yyvsp;
+      $2827 = ((($2826)) + -4|0);
+      $2828 = HEAP32[$2827>>2]|0;
+      $2829 = $0;
+      $2830 = $yyvsp;
+      $2831 = HEAP32[$2830>>2]|0;
+      $2832 = (_list1_gen($2829,$2831)|0);
+      $2833 = (_append_gen($2825,$2828,$2832)|0);
+      $2834 = (_new_dxstr($2824,$2833)|0);
+      HEAP32[$yyval>>2] = $2834;
+      break;
+     }
+     case 427:  {
+      $2835 = $yyvsp;
+      $2836 = HEAP32[$2835>>2]|0;
+      HEAP32[$yyval>>2] = $2836;
+      break;
+     }
+     case 428:  {
+      $2837 = $0;
+      $2838 = $yyvsp;
+      $2839 = ((($2838)) + -4|0);
+      $2840 = HEAP32[$2839>>2]|0;
+      $2841 = $yyvsp;
+      $2842 = HEAP32[$2841>>2]|0;
+      $2843 = (_new_dregx($2837,$2840,$2842)|0);
+      HEAP32[$yyval>>2] = $2843;
+      break;
+     }
+     case 434:  {
+      $2844 = $0;
+      $2845 = (_parsing_heredoc_inf($2844)|0);
+      $inf = $2845;
+      $2846 = $0;
+      $2847 = $inf;
+      $2848 = ((($2847)) + 16|0);
+      $2849 = HEAP32[$2848>>2]|0;
+      $2850 = $0;
+      $2851 = $0;
+      $2852 = (_new_str($2851,75440,0)|0);
+      $2853 = (_list1_gen($2850,$2852)|0);
+      $2854 = (_append_gen($2846,$2849,$2853)|0);
+      $2855 = $inf;
+      $2856 = ((($2855)) + 16|0);
+      HEAP32[$2856>>2] = $2854;
+      $2857 = $0;
+      _heredoc_end($2857);
+      break;
+     }
+     case 435:  {
+      $2858 = $0;
+      _heredoc_end($2858);
+      break;
+     }
+     case 438:  {
+      $2859 = $0;
+      $2860 = (_parsing_heredoc_inf($2859)|0);
+      $inf2 = $2860;
+      $2861 = $0;
+      $2862 = $inf2;
+      $2863 = ((($2862)) + 16|0);
+      $2864 = HEAP32[$2863>>2]|0;
+      $2865 = $0;
+      $2866 = $yyvsp;
+      $2867 = HEAP32[$2866>>2]|0;
+      $2868 = (_list1_gen($2865,$2867)|0);
+      $2869 = (_append_gen($2861,$2864,$2868)|0);
+      $2870 = $inf2;
+      $2871 = ((($2870)) + 16|0);
+      HEAP32[$2871>>2] = $2869;
+      $2872 = $0;
+      _heredoc_treat_nextline($2872);
+      break;
+     }
+     case 439:  {
+      $2873 = $0;
+      $2874 = ((($2873)) + 44|0);
+      $2875 = HEAP32[$2874>>2]|0;
+      HEAP32[$yyval>>2] = $2875;
+      $2876 = $0;
+      $2877 = ((($2876)) + 44|0);
+      HEAP32[$2877>>2] = 0;
+      break;
+     }
+     case 440:  {
+      $2878 = $0;
+      $2879 = (_parsing_heredoc_inf($2878)|0);
+      $inf3 = $2879;
+      $2880 = $yyvsp;
+      $2881 = ((($2880)) + -8|0);
+      $2882 = HEAP32[$2881>>2]|0;
+      $2883 = $0;
+      $2884 = ((($2883)) + 44|0);
+      HEAP32[$2884>>2] = $2882;
+      $2885 = $0;
+      $2886 = $0;
+      $2887 = $inf3;
+      $2888 = ((($2887)) + 16|0);
+      $2889 = HEAP32[$2888>>2]|0;
+      $2890 = $0;
+      $2891 = $yyvsp;
+      $2892 = ((($2891)) + -12|0);
+      $2893 = HEAP32[$2892>>2]|0;
+      $2894 = (_list1_gen($2890,$2893)|0);
+      $2895 = (_append_gen($2886,$2889,$2894)|0);
+      $2896 = $0;
+      $2897 = $yyvsp;
+      $2898 = ((($2897)) + -4|0);
+      $2899 = HEAP32[$2898>>2]|0;
+      $2900 = (_list1_gen($2896,$2899)|0);
+      $2901 = (_append_gen($2885,$2895,$2900)|0);
+      $2902 = $inf3;
+      $2903 = ((($2902)) + 16|0);
+      HEAP32[$2903>>2] = $2901;
+      break;
+     }
+     case 441:  {
+      $2904 = $0;
+      $2905 = $0;
+      $2906 = $yyvsp;
+      $2907 = HEAP32[$2906>>2]|0;
+      $2908 = (_list1_gen($2905,$2907)|0);
+      $2909 = (_new_words($2904,$2908)|0);
+      HEAP32[$yyval>>2] = $2909;
+      break;
+     }
+     case 442:  {
+      $2910 = $0;
+      $2911 = $0;
+      $2912 = $yyvsp;
+      $2913 = ((($2912)) + -4|0);
+      $2914 = HEAP32[$2913>>2]|0;
+      $2915 = $0;
+      $2916 = $yyvsp;
+      $2917 = HEAP32[$2916>>2]|0;
+      $2918 = (_list1_gen($2915,$2917)|0);
+      $2919 = (_append_gen($2911,$2914,$2918)|0);
+      $2920 = (_new_words($2910,$2919)|0);
+      HEAP32[$yyval>>2] = $2920;
+      break;
+     }
+     case 443:  {
+      $2921 = $0;
+      $2922 = $yyvsp;
+      $2923 = HEAP32[$2922>>2]|0;
+      $2924 = (_new_sym($2921,$2923)|0);
+      HEAP32[$yyval>>2] = $2924;
+      break;
+     }
+     case 444:  {
+      $2925 = $0;
+      $2926 = ((($2925)) + 40|0);
+      HEAP32[$2926>>2] = 1;
+      $2927 = $0;
+      $2928 = $0;
+      $2929 = $yyvsp;
+      $2930 = ((($2929)) + -4|0);
+      $2931 = HEAP32[$2930>>2]|0;
+      $2932 = $0;
+      $2933 = $yyvsp;
+      $2934 = HEAP32[$2933>>2]|0;
+      $2935 = (_list1_gen($2932,$2934)|0);
+      $2936 = (_append_gen($2928,$2931,$2935)|0);
+      $2937 = (_new_dsym($2927,$2936)|0);
+      HEAP32[$yyval>>2] = $2937;
+      break;
+     }
+     case 445:  {
+      $2938 = $0;
+      $2939 = ((($2938)) + 40|0);
+      HEAP32[$2939>>2] = 1;
+      $2940 = $yyvsp;
+      $2941 = HEAP32[$2940>>2]|0;
+      HEAP32[$yyval>>2] = $2941;
+      break;
+     }
+     case 450:  {
+      $2942 = $0;
+      $2943 = $yyvsp;
+      $2944 = HEAP32[$2943>>2]|0;
+      $2945 = (_new_strsym($2942,$2944)|0);
+      HEAP32[$yyval>>2] = $2945;
+      break;
+     }
+     case 451:  {
+      $2946 = $0;
+      $2947 = $yyvsp;
+      $2948 = HEAP32[$2947>>2]|0;
+      $2949 = (_new_strsym($2946,$2948)|0);
+      HEAP32[$yyval>>2] = $2949;
+      break;
+     }
+     case 452:  {
+      $2950 = $0;
+      $2951 = $0;
+      $2952 = $yyvsp;
+      $2953 = HEAP32[$2952>>2]|0;
+      $2954 = (_list1_gen($2951,$2953)|0);
+      $2955 = (_new_symbols($2950,$2954)|0);
+      HEAP32[$yyval>>2] = $2955;
+      break;
+     }
+     case 453:  {
+      $2956 = $0;
+      $2957 = $0;
+      $2958 = $yyvsp;
+      $2959 = ((($2958)) + -4|0);
+      $2960 = HEAP32[$2959>>2]|0;
+      $2961 = $0;
+      $2962 = $yyvsp;
+      $2963 = HEAP32[$2962>>2]|0;
+      $2964 = (_list1_gen($2961,$2963)|0);
+      $2965 = (_append_gen($2957,$2960,$2964)|0);
+      $2966 = (_new_symbols($2956,$2965)|0);
+      HEAP32[$yyval>>2] = $2966;
+      break;
+     }
+     case 456:  {
+      $2967 = $0;
+      $2968 = $yyvsp;
+      $2969 = HEAP32[$2968>>2]|0;
+      $2970 = (_negate_lit($2967,$2969)|0);
+      HEAP32[$yyval>>2] = $2970;
+      break;
+     }
+     case 457:  {
+      $2971 = $0;
+      $2972 = $yyvsp;
+      $2973 = HEAP32[$2972>>2]|0;
+      $2974 = (_negate_lit($2971,$2973)|0);
+      HEAP32[$yyval>>2] = $2974;
+      break;
+     }
+     case 458:  {
+      $2975 = $0;
+      $2976 = $yyvsp;
+      $2977 = HEAP32[$2976>>2]|0;
+      $2978 = (_new_lvar($2975,$2977)|0);
+      HEAP32[$yyval>>2] = $2978;
+      break;
+     }
+     case 459:  {
+      $2979 = $0;
+      $2980 = $yyvsp;
+      $2981 = HEAP32[$2980>>2]|0;
+      $2982 = (_new_ivar($2979,$2981)|0);
+      HEAP32[$yyval>>2] = $2982;
+      break;
+     }
+     case 460:  {
+      $2983 = $0;
+      $2984 = $yyvsp;
+      $2985 = HEAP32[$2984>>2]|0;
+      $2986 = (_new_gvar($2983,$2985)|0);
+      HEAP32[$yyval>>2] = $2986;
+      break;
+     }
+     case 461:  {
+      $2987 = $0;
+      $2988 = $yyvsp;
+      $2989 = HEAP32[$2988>>2]|0;
+      $2990 = (_new_cvar($2987,$2989)|0);
+      HEAP32[$yyval>>2] = $2990;
+      break;
+     }
+     case 462:  {
+      $2991 = $0;
+      $2992 = $yyvsp;
+      $2993 = HEAP32[$2992>>2]|0;
+      $2994 = (_new_const($2991,$2993)|0);
+      HEAP32[$yyval>>2] = $2994;
+      break;
+     }
+     case 463:  {
+      $2995 = $0;
+      $2996 = $yyvsp;
+      $2997 = HEAP32[$2996>>2]|0;
+      _assignable($2995,$2997);
+      break;
+     }
+     case 464:  {
+      $2998 = $0;
+      $2999 = $yyvsp;
+      $3000 = HEAP32[$2999>>2]|0;
+      $3001 = (_var_reference($2998,$3000)|0);
+      HEAP32[$yyval>>2] = $3001;
+      break;
+     }
+     case 465:  {
+      $3002 = $0;
+      $3003 = (_new_nil($3002)|0);
+      HEAP32[$yyval>>2] = $3003;
+      break;
+     }
+     case 466:  {
+      $3004 = $0;
+      $3005 = (_new_self($3004)|0);
+      HEAP32[$yyval>>2] = $3005;
+      break;
+     }
+     case 467:  {
+      $3006 = $0;
+      $3007 = (_new_true($3006)|0);
+      HEAP32[$yyval>>2] = $3007;
+      break;
+     }
+     case 468:  {
+      $3008 = $0;
+      $3009 = (_new_false($3008)|0);
+      HEAP32[$yyval>>2] = $3009;
+      break;
+     }
+     case 469:  {
+      $3010 = $0;
+      $3011 = ((($3010)) + 28|0);
+      $3012 = HEAP32[$3011>>2]|0;
+      $3013 = ($3012|0)!=(0|0);
+      if (!($3013)) {
+       $3014 = $0;
+       $3015 = ((($3014)) + 28|0);
+       HEAP32[$3015>>2] = 72338;
+      }
+      $3016 = $0;
+      $3017 = $0;
+      $3018 = ((($3017)) + 28|0);
+      $3019 = HEAP32[$3018>>2]|0;
+      $3020 = $0;
+      $3021 = ((($3020)) + 28|0);
+      $3022 = HEAP32[$3021>>2]|0;
+      $3023 = (_strlen($3022)|0);
+      $3024 = (_new_str($3016,$3019,$3023)|0);
+      HEAP32[$yyval>>2] = $3024;
+      break;
+     }
+     case 470:  {
+      $3025 = $0;
+      $3026 = ((($3025)) + 32|0);
+      $3027 = HEAP32[$3026>>2]|0;
+      HEAP32[$vararg_buffer>>2] = $3027;
+      (_snprintf($buf,16,59726,$vararg_buffer)|0);
+      $3028 = $0;
+      $3029 = (_new_int($3028,$buf,10)|0);
+      HEAP32[$yyval>>2] = $3029;
+      break;
+     }
+     case 473:  {
+      HEAP32[$yyval>>2] = 0;
+      break;
+     }
+     case 474:  {
+      $3030 = $0;
+      $3031 = ((($3030)) + 40|0);
+      HEAP32[$3031>>2] = 0;
+      $3032 = $0;
+      $3033 = ((($3032)) + 72|0);
+      $3034 = HEAP8[$3033>>0]|0;
+      $3035 = $3034 & -2;
+      $3036 = $3035 | 1;
+      HEAP8[$3033>>0] = $3036;
+      break;
+     }
+     case 475:  {
+      $3037 = $yyvsp;
+      $3038 = ((($3037)) + -4|0);
+      $3039 = HEAP32[$3038>>2]|0;
+      HEAP32[$yyval>>2] = $3039;
+      break;
+     }
+     case 476:  {
+      $3040 = $yyvsp;
+      $3041 = ((($3040)) + -4|0);
+      $3042 = HEAP32[$3041>>2]|0;
+      HEAP32[$yyval>>2] = $3042;
+      $3043 = $0;
+      $3044 = ((($3043)) + 40|0);
+      HEAP32[$3044>>2] = 0;
+      $3045 = $0;
+      $3046 = ((($3045)) + 72|0);
+      $3047 = HEAP8[$3046>>0]|0;
+      $3048 = $3047 & -2;
+      $3049 = $3048 | 1;
+      HEAP8[$3046>>0] = $3049;
+      break;
+     }
+     case 477:  {
+      $3050 = $yyvsp;
+      $3051 = ((($3050)) + -4|0);
+      $3052 = HEAP32[$3051>>2]|0;
+      HEAP32[$yyval>>2] = $3052;
+      break;
+     }
+     case 478:  {
+      $3053 = $0;
+      $3054 = $yyvsp;
+      $3055 = ((($3054)) + -20|0);
+      $3056 = HEAP32[$3055>>2]|0;
+      $3057 = $yyvsp;
+      $3058 = ((($3057)) + -12|0);
+      $3059 = HEAP32[$3058>>2]|0;
+      $3060 = $yyvsp;
+      $3061 = ((($3060)) + -4|0);
+      $3062 = HEAP32[$3061>>2]|0;
+      $3063 = $yyvsp;
+      $3064 = HEAP32[$3063>>2]|0;
+      $3065 = (_new_args($3053,$3056,$3059,$3062,0,$3064)|0);
+      HEAP32[$yyval>>2] = $3065;
+      break;
+     }
+     case 479:  {
+      $3066 = $0;
+      $3067 = $yyvsp;
+      $3068 = ((($3067)) + -28|0);
+      $3069 = HEAP32[$3068>>2]|0;
+      $3070 = $yyvsp;
+      $3071 = ((($3070)) + -20|0);
+      $3072 = HEAP32[$3071>>2]|0;
+      $3073 = $yyvsp;
+      $3074 = ((($3073)) + -12|0);
+      $3075 = HEAP32[$3074>>2]|0;
+      $3076 = $yyvsp;
+      $3077 = ((($3076)) + -4|0);
+      $3078 = HEAP32[$3077>>2]|0;
+      $3079 = $yyvsp;
+      $3080 = HEAP32[$3079>>2]|0;
+      $3081 = (_new_args($3066,$3069,$3072,$3075,$3078,$3080)|0);
+      HEAP32[$yyval>>2] = $3081;
+      break;
+     }
+     case 480:  {
+      $3082 = $0;
+      $3083 = $yyvsp;
+      $3084 = ((($3083)) + -12|0);
+      $3085 = HEAP32[$3084>>2]|0;
+      $3086 = $yyvsp;
+      $3087 = ((($3086)) + -4|0);
+      $3088 = HEAP32[$3087>>2]|0;
+      $3089 = $yyvsp;
+      $3090 = HEAP32[$3089>>2]|0;
+      $3091 = (_new_args($3082,$3085,$3088,0,0,$3090)|0);
+      HEAP32[$yyval>>2] = $3091;
+      break;
+     }
+     case 481:  {
+      $3092 = $0;
+      $3093 = $yyvsp;
+      $3094 = ((($3093)) + -20|0);
+      $3095 = HEAP32[$3094>>2]|0;
+      $3096 = $yyvsp;
+      $3097 = ((($3096)) + -12|0);
+      $3098 = HEAP32[$3097>>2]|0;
+      $3099 = $yyvsp;
+      $3100 = ((($3099)) + -4|0);
+      $3101 = HEAP32[$3100>>2]|0;
+      $3102 = $yyvsp;
+      $3103 = HEAP32[$3102>>2]|0;
+      $3104 = (_new_args($3092,$3095,$3098,0,$3101,$3103)|0);
+      HEAP32[$yyval>>2] = $3104;
+      break;
+     }
+     case 482:  {
+      $3105 = $0;
+      $3106 = $yyvsp;
+      $3107 = ((($3106)) + -12|0);
+      $3108 = HEAP32[$3107>>2]|0;
+      $3109 = $yyvsp;
+      $3110 = ((($3109)) + -4|0);
+      $3111 = HEAP32[$3110>>2]|0;
+      $3112 = $yyvsp;
+      $3113 = HEAP32[$3112>>2]|0;
+      $3114 = (_new_args($3105,$3108,0,$3111,0,$3113)|0);
+      HEAP32[$yyval>>2] = $3114;
+      break;
+     }
+     case 483:  {
+      $3115 = $0;
+      $3116 = $yyvsp;
+      $3117 = ((($3116)) + -20|0);
+      $3118 = HEAP32[$3117>>2]|0;
+      $3119 = $yyvsp;
+      $3120 = ((($3119)) + -12|0);
+      $3121 = HEAP32[$3120>>2]|0;
+      $3122 = $yyvsp;
+      $3123 = ((($3122)) + -4|0);
+      $3124 = HEAP32[$3123>>2]|0;
+      $3125 = $yyvsp;
+      $3126 = HEAP32[$3125>>2]|0;
+      $3127 = (_new_args($3115,$3118,0,$3121,$3124,$3126)|0);
+      HEAP32[$yyval>>2] = $3127;
+      break;
+     }
+     case 484:  {
+      $3128 = $0;
+      $3129 = $yyvsp;
+      $3130 = ((($3129)) + -4|0);
+      $3131 = HEAP32[$3130>>2]|0;
+      $3132 = $yyvsp;
+      $3133 = HEAP32[$3132>>2]|0;
+      $3134 = (_new_args($3128,$3131,0,0,0,$3133)|0);
+      HEAP32[$yyval>>2] = $3134;
+      break;
+     }
+     case 485:  {
+      $3135 = $0;
+      $3136 = $yyvsp;
+      $3137 = ((($3136)) + -12|0);
+      $3138 = HEAP32[$3137>>2]|0;
+      $3139 = $yyvsp;
+      $3140 = ((($3139)) + -4|0);
+      $3141 = HEAP32[$3140>>2]|0;
+      $3142 = $yyvsp;
+      $3143 = HEAP32[$3142>>2]|0;
+      $3144 = (_new_args($3135,0,$3138,$3141,0,$3143)|0);
+      HEAP32[$yyval>>2] = $3144;
+      break;
+     }
+     case 486:  {
+      $3145 = $0;
+      $3146 = $yyvsp;
+      $3147 = ((($3146)) + -20|0);
+      $3148 = HEAP32[$3147>>2]|0;
+      $3149 = $yyvsp;
+      $3150 = ((($3149)) + -12|0);
+      $3151 = HEAP32[$3150>>2]|0;
+      $3152 = $yyvsp;
+      $3153 = ((($3152)) + -4|0);
+      $3154 = HEAP32[$3153>>2]|0;
+      $3155 = $yyvsp;
+      $3156 = HEAP32[$3155>>2]|0;
+      $3157 = (_new_args($3145,0,$3148,$3151,$3154,$3156)|0);
+      HEAP32[$yyval>>2] = $3157;
+      break;
+     }
+     case 487:  {
+      $3158 = $0;
+      $3159 = $yyvsp;
+      $3160 = ((($3159)) + -4|0);
+      $3161 = HEAP32[$3160>>2]|0;
+      $3162 = $yyvsp;
+      $3163 = HEAP32[$3162>>2]|0;
+      $3164 = (_new_args($3158,0,$3161,0,0,$3163)|0);
+      HEAP32[$yyval>>2] = $3164;
+      break;
+     }
+     case 488:  {
+      $3165 = $0;
+      $3166 = $yyvsp;
+      $3167 = ((($3166)) + -12|0);
+      $3168 = HEAP32[$3167>>2]|0;
+      $3169 = $yyvsp;
+      $3170 = ((($3169)) + -4|0);
+      $3171 = HEAP32[$3170>>2]|0;
+      $3172 = $yyvsp;
+      $3173 = HEAP32[$3172>>2]|0;
+      $3174 = (_new_args($3165,0,$3168,0,$3171,$3173)|0);
+      HEAP32[$yyval>>2] = $3174;
+      break;
+     }
+     case 489:  {
+      $3175 = $0;
+      $3176 = $yyvsp;
+      $3177 = ((($3176)) + -4|0);
+      $3178 = HEAP32[$3177>>2]|0;
+      $3179 = $yyvsp;
+      $3180 = HEAP32[$3179>>2]|0;
+      $3181 = (_new_args($3175,0,0,$3178,0,$3180)|0);
+      HEAP32[$yyval>>2] = $3181;
+      break;
+     }
+     case 490:  {
+      $3182 = $0;
+      $3183 = $yyvsp;
+      $3184 = ((($3183)) + -12|0);
+      $3185 = HEAP32[$3184>>2]|0;
+      $3186 = $yyvsp;
+      $3187 = ((($3186)) + -4|0);
+      $3188 = HEAP32[$3187>>2]|0;
+      $3189 = $yyvsp;
+      $3190 = HEAP32[$3189>>2]|0;
+      $3191 = (_new_args($3182,0,0,$3185,$3188,$3190)|0);
+      HEAP32[$yyval>>2] = $3191;
+      break;
+     }
+     case 491:  {
+      $3192 = $0;
+      $3193 = $yyvsp;
+      $3194 = HEAP32[$3193>>2]|0;
+      $3195 = (_new_args($3192,0,0,0,0,$3194)|0);
+      HEAP32[$yyval>>2] = $3195;
+      break;
+     }
+     case 492:  {
+      $3196 = $0;
+      _local_add_f($3196,0);
+      $3197 = $0;
+      $3198 = (_new_args($3197,0,0,0,0,0)|0);
+      HEAP32[$yyval>>2] = $3198;
+      break;
+     }
+     case 493:  {
+      $3199 = $0;
+      _yyerror($3199,59729);
+      HEAP32[$yyval>>2] = 0;
+      break;
+     }
+     case 494:  {
+      $3200 = $0;
+      _yyerror($3200,59766);
+      HEAP32[$yyval>>2] = 0;
+      break;
+     }
+     case 495:  {
+      $3201 = $0;
+      _yyerror($3201,59813);
+      HEAP32[$yyval>>2] = 0;
+      break;
+     }
+     case 496:  {
+      $3202 = $0;
+      _yyerror($3202,59857);
+      HEAP32[$yyval>>2] = 0;
+      break;
+     }
+     case 497:  {
+      HEAP32[$yyval>>2] = 0;
+      break;
+     }
+     case 498:  {
+      $3203 = $0;
+      $3204 = $yyvsp;
+      $3205 = HEAP32[$3204>>2]|0;
+      _local_add_f($3203,$3205);
+      $3206 = $yyvsp;
+      $3207 = HEAP32[$3206>>2]|0;
+      HEAP32[$yyval>>2] = $3207;
+      break;
+     }
+     case 499:  {
+      $3208 = $0;
+      $3209 = $yyvsp;
+      $3210 = HEAP32[$3209>>2]|0;
+      $3211 = (_new_arg($3208,$3210)|0);
+      HEAP32[$yyval>>2] = $3211;
+      break;
+     }
+     case 500:  {
+      $3212 = $0;
+      $3213 = $yyvsp;
+      $3214 = ((($3213)) + -4|0);
+      $3215 = HEAP32[$3214>>2]|0;
+      $3216 = (_new_masgn($3212,$3215,0)|0);
+      HEAP32[$yyval>>2] = $3216;
+      break;
+     }
+     case 501:  {
+      $3217 = $0;
+      $3218 = $yyvsp;
+      $3219 = HEAP32[$3218>>2]|0;
+      $3220 = (_list1_gen($3217,$3219)|0);
+      HEAP32[$yyval>>2] = $3220;
+      break;
+     }
+     case 502:  {
+      $3221 = $0;
+      $3222 = $yyvsp;
+      $3223 = ((($3222)) + -8|0);
+      $3224 = HEAP32[$3223>>2]|0;
+      $3225 = $0;
+      $3226 = $yyvsp;
+      $3227 = HEAP32[$3226>>2]|0;
+      $3228 = (_list1_gen($3225,$3227)|0);
+      $3229 = (_append_gen($3221,$3224,$3228)|0);
+      HEAP32[$yyval>>2] = $3229;
+      break;
+     }
+     case 503:  {
+      $3230 = $0;
+      $3231 = $yyvsp;
+      $3232 = ((($3231)) + -4|0);
+      $3233 = HEAP32[$3232>>2]|0;
+      _local_add_f($3230,$3233);
+      $3234 = $yyvsp;
+      $3235 = ((($3234)) + -4|0);
+      $3236 = HEAP32[$3235>>2]|0;
+      HEAP32[$yyval>>2] = $3236;
+      break;
+     }
+     case 504:  {
+      $3237 = $0;
+      $3238 = $yyvsp;
+      $3239 = ((($3238)) + -4|0);
+      $3240 = HEAP32[$3239>>2]|0;
+      $3241 = $3240;
+      $3242 = $yyvsp;
+      $3243 = HEAP32[$3242>>2]|0;
+      $3244 = (_cons_gen($3237,$3241,$3243)|0);
+      HEAP32[$yyval>>2] = $3244;
+      break;
+     }
+     case 505:  {
+      $3245 = $0;
+      $3246 = $yyvsp;
+      $3247 = ((($3246)) + -4|0);
+      $3248 = HEAP32[$3247>>2]|0;
+      $3249 = $3248;
+      $3250 = $yyvsp;
+      $3251 = HEAP32[$3250>>2]|0;
+      $3252 = (_cons_gen($3245,$3249,$3251)|0);
+      HEAP32[$yyval>>2] = $3252;
+      break;
+     }
+     case 506:  {
+      $3253 = $0;
+      $3254 = $yyvsp;
+      $3255 = HEAP32[$3254>>2]|0;
+      $3256 = (_list1_gen($3253,$3255)|0);
+      HEAP32[$yyval>>2] = $3256;
+      break;
+     }
+     case 507:  {
+      $3257 = $0;
+      $3258 = $yyvsp;
+      $3259 = ((($3258)) + -8|0);
+      $3260 = HEAP32[$3259>>2]|0;
+      $3261 = $0;
+      $3262 = $yyvsp;
+      $3263 = HEAP32[$3262>>2]|0;
+      $3264 = (_list1_gen($3261,$3263)|0);
+      $3265 = (_append_gen($3257,$3260,$3264)|0);
+      HEAP32[$yyval>>2] = $3265;
+      break;
+     }
+     case 508:  {
+      $3266 = $0;
+      $3267 = $yyvsp;
+      $3268 = HEAP32[$3267>>2]|0;
+      $3269 = (_list1_gen($3266,$3268)|0);
+      HEAP32[$yyval>>2] = $3269;
+      break;
+     }
+     case 509:  {
+      $3270 = $0;
+      $3271 = $yyvsp;
+      $3272 = ((($3271)) + -8|0);
+      $3273 = HEAP32[$3272>>2]|0;
+      $3274 = $0;
+      $3275 = $yyvsp;
+      $3276 = HEAP32[$3275>>2]|0;
+      $3277 = (_list1_gen($3274,$3276)|0);
+      $3278 = (_append_gen($3270,$3273,$3277)|0);
+      HEAP32[$yyval>>2] = $3278;
+      break;
+     }
+     case 512:  {
+      $3279 = $0;
+      $3280 = $yyvsp;
+      $3281 = HEAP32[$3280>>2]|0;
+      _local_add_f($3279,$3281);
+      $3282 = $yyvsp;
+      $3283 = HEAP32[$3282>>2]|0;
+      HEAP32[$yyval>>2] = $3283;
+      break;
+     }
+     case 513:  {
+      $3284 = $0;
+      _local_add_f($3284,0);
+      HEAP32[$yyval>>2] = -1;
+      break;
+     }
+     case 516:  {
+      $3285 = $0;
+      $3286 = $yyvsp;
+      $3287 = HEAP32[$3286>>2]|0;
+      _local_add_f($3285,$3287);
+      $3288 = $yyvsp;
+      $3289 = HEAP32[$3288>>2]|0;
+      HEAP32[$yyval>>2] = $3289;
+      break;
+     }
+     case 517:  {
+      $3290 = $yyvsp;
+      $3291 = HEAP32[$3290>>2]|0;
+      HEAP32[$yyval>>2] = $3291;
+      break;
+     }
+     case 518:  {
+      $3292 = $0;
+      _local_add_f($3292,0);
+      HEAP32[$yyval>>2] = 0;
+      break;
+     }
+     case 519:  {
+      $3293 = $yyvsp;
+      $3294 = HEAP32[$3293>>2]|0;
+      HEAP32[$yyval>>2] = $3294;
+      $3295 = HEAP32[$yyval>>2]|0;
+      $3296 = ($3295|0)!=(0|0);
+      if (!($3296)) {
+       $3297 = $0;
+       $3298 = (_new_nil($3297)|0);
+       HEAP32[$yyval>>2] = $3298;
+      }
+      break;
+     }
+     case 520:  {
+      $3299 = $0;
+      $3300 = ((($3299)) + 40|0);
+      HEAP32[$3300>>2] = 0;
+      break;
+     }
+     case 521:  {
+      $3301 = $yyvsp;
+      $3302 = ((($3301)) + -4|0);
+      $3303 = HEAP32[$3302>>2]|0;
+      $3304 = ($3303|0)==(0|0);
+      L553: do {
+       if ($3304) {
+        $3305 = $0;
+        _yyerror($3305,59900);
+       } else {
+        $3306 = $yyvsp;
+        $3307 = ((($3306)) + -4|0);
+        $3308 = HEAP32[$3307>>2]|0;
+        $3309 = HEAP32[$3308>>2]|0;
+        $3310 = $3309;
+        switch ($3310|0) {
+        case 99: case 34: case 51: case 47: case 60: case 58: case 57: case 56: case 55:  {
+         break;
+        }
+        default: {
+         break L553;
+        }
+        }
+        $3311 = $0;
+        _yyerror($3311,59938);
+       }
+      } while(0);
+      $3312 = $yyvsp;
+      $3313 = ((($3312)) + -4|0);
+      $3314 = HEAP32[$3313>>2]|0;
+      HEAP32[$yyval>>2] = $3314;
+      break;
+     }
+     case 523:  {
+      $3315 = $yyvsp;
+      $3316 = ((($3315)) + -4|0);
+      $3317 = HEAP32[$3316>>2]|0;
+      HEAP32[$yyval>>2] = $3317;
+      break;
+     }
+     case 524:  {
+      $3318 = $0;
+      $3319 = $yyvsp;
+      $3320 = HEAP32[$3319>>2]|0;
+      $3321 = (_list1_gen($3318,$3320)|0);
+      HEAP32[$yyval>>2] = $3321;
+      $3322 = $yyvsp;
+      $3323 = HEAP32[$3322>>2]|0;
+      $3324 = ($3323|0)!=(0|0);
+      if ($3324) {
+       $3325 = $yyvsp;
+       $3326 = HEAP32[$3325>>2]|0;
+       $3327 = ((($3326)) + 10|0);
+       $3328 = HEAP16[$3327>>1]|0;
+       $3329 = HEAP32[$yyval>>2]|0;
+       $3330 = ((($3329)) + 10|0);
+       HEAP16[$3330>>1] = $3328;
+       $3331 = $yyvsp;
+       $3332 = HEAP32[$3331>>2]|0;
+       $3333 = ((($3332)) + 8|0);
+       $3334 = HEAP16[$3333>>1]|0;
+       $3335 = HEAP32[$yyval>>2]|0;
+       $3336 = ((($3335)) + 8|0);
+       HEAP16[$3336>>1] = $3334;
+      }
+      break;
+     }
+     case 525:  {
+      $3337 = $0;
+      $3338 = $yyvsp;
+      $3339 = ((($3338)) + -8|0);
+      $3340 = HEAP32[$3339>>2]|0;
+      $3341 = $0;
+      $3342 = $yyvsp;
+      $3343 = HEAP32[$3342>>2]|0;
+      $3344 = (_list1_gen($3341,$3343)|0);
+      $3345 = (_append_gen($3337,$3340,$3344)|0);
+      HEAP32[$yyval>>2] = $3345;
+      break;
+     }
+     case 526:  {
+      $3346 = $0;
+      $3347 = $yyvsp;
+      $3348 = ((($3347)) + -8|0);
+      $3349 = HEAP32[$3348>>2]|0;
+      $3350 = $yyvsp;
+      $3351 = HEAP32[$3350>>2]|0;
+      $3352 = (_cons_gen($3346,$3349,$3351)|0);
+      HEAP32[$yyval>>2] = $3352;
+      break;
+     }
+     case 527:  {
+      $3353 = $0;
+      $3354 = $0;
+      $3355 = $yyvsp;
+      $3356 = ((($3355)) + -4|0);
+      $3357 = HEAP32[$3356>>2]|0;
+      $3358 = (_new_sym($3354,$3357)|0);
+      $3359 = $yyvsp;
+      $3360 = HEAP32[$3359>>2]|0;
+      $3361 = (_cons_gen($3353,$3358,$3360)|0);
+      HEAP32[$yyval>>2] = $3361;
+      break;
+     }
+     case 549:  {
+      $yyerrstatus = 0;
+      break;
+     }
+     case 551:  {
+      $3362 = $0;
+      $3363 = ((($3362)) + 32|0);
+      $3364 = HEAP32[$3363>>2]|0;
+      $3365 = (($3364) + 1)|0;
+      HEAP32[$3363>>2] = $3365;
+      $3366 = $0;
+      $3367 = ((($3366)) + 36|0);
+      HEAP32[$3367>>2] = 0;
+      break;
+     }
+     case 554:  {
+      $yyerrstatus = 0;
+      break;
+     }
+     case 555:  {
+      HEAP32[$yyval>>2] = 0;
+      break;
+     }
+     default: {
+     }
+     }
+    } while(0);
+    $3368 = $yylen;
+    $3369 = $yyvsp;
+    $3370 = (0 - ($3368))|0;
+    $3371 = (($3369) + ($3370<<2)|0);
+    $yyvsp = $3371;
+    $3372 = $yylen;
+    $3373 = $yyssp;
+    $3374 = (0 - ($3372))|0;
+    $3375 = (($3373) + ($3374<<1)|0);
+    $yyssp = $3375;
+    $yylen = 0;
+    $3376 = $yyvsp;
+    $3377 = ((($3376)) + 4|0);
+    $yyvsp = $3377;
+    ;HEAP32[$3377>>2]=HEAP32[$yyval>>2]|0;
+    $3378 = $yyn;
+    $3379 = (49476 + ($3378<<1)|0);
+    $3380 = HEAP16[$3379>>1]|0;
+    $3381 = $3380&65535;
+    $yyn = $3381;
+    $3382 = $yyn;
+    $3383 = (($3382) - 144)|0;
+    $3384 = (50588 + ($3383<<1)|0);
+    $3385 = HEAP16[$3384>>1]|0;
+    $3386 = $3385 << 16 >> 16;
+    $3387 = $yyssp;
+    $3388 = HEAP16[$3387>>1]|0;
+    $3389 = $3388 << 16 >> 16;
+    $3390 = (($3386) + ($3389))|0;
+    $yystate = $3390;
+    $3391 = $yystate;
+    $3392 = (0)<=($3391|0);
+    $3393 = $yystate;
+    $3394 = ($3393|0)<=(10639);
+    $or$cond5 = $3392 & $3394;
+    if ($or$cond5) {
+     $3395 = $yystate;
+     $3396 = (4980 + ($3395<<1)|0);
+     $3397 = HEAP16[$3396>>1]|0;
+     $3398 = $3397 << 16 >> 16;
+     $3399 = $yyssp;
+     $3400 = HEAP16[$3399>>1]|0;
+     $3401 = $3400 << 16 >> 16;
+     $3402 = ($3398|0)==($3401|0);
+     if ($3402) {
+      $3403 = $yystate;
+      $3404 = (26260 + ($3403<<1)|0);
+      $3405 = HEAP16[$3404>>1]|0;
+      $3406 = $3405 << 16 >> 16;
+      $yystate = $3406;
+      break;
+     }
+    }
+    $3407 = $yyn;
+    $3408 = (($3407) - 144)|0;
+    $3409 = (50910 + ($3408<<1)|0);
+    $3410 = HEAP16[$3409>>1]|0;
+    $3411 = $3410 << 16 >> 16;
+    $yystate = $3411;
+   }
+   else if ((label|0) == 510) {
+    label = 0;
+    $3412 = $yyerrstatus;
+    $3413 = ($3412|0)!=(0);
+    do {
+     if (!($3413)) {
+      $3414 = $yynerrs;
+      $3415 = (($3414) + 1)|0;
+      $yynerrs = $3415;
+      $3416 = $yystate;
+      $3417 = $yychar;
+      $3418 = (_yysyntax_error(0,$3416,$3417)|0);
+      $yysize4 = $3418;
+      $3419 = $yymsg_alloc;
+      $3420 = $yysize4;
+      $3421 = ($3419>>>0)<($3420>>>0);
+      $3422 = $yymsg_alloc;
+      $3423 = ($3422>>>0)<(4294967295);
+      $or$cond7 = $3421 & $3423;
+      do {
+       if ($or$cond7) {
+        $3424 = $yysize4;
+        $3425 = $3424<<1;
+        $yyalloc = $3425;
+        $3426 = $yysize4;
+        $3427 = $yyalloc;
+        $3428 = ($3426>>>0)<=($3427>>>0);
+        $3429 = $yyalloc;
+        $3430 = ($3429>>>0)<=(4294967295);
+        $or$cond9 = $3428 & $3430;
+        $$12 = $or$cond9 ? $3425 : -1;
+        $yyalloc = $$12;
+        $3431 = $yymsg;
+        $3432 = ($3431|0)!=($yymsgbuf|0);
+        if ($3432) {
+         $3433 = $0;
+         $3434 = HEAP32[$3433>>2]|0;
+         $3435 = $yymsg;
+         _mrb_free($3434,$3435);
+        }
+        $3436 = $0;
+        $3437 = HEAP32[$3436>>2]|0;
+        $3438 = $yyalloc;
+        $3439 = (_mrb_malloc($3437,$3438)|0);
+        $yymsg = $3439;
+        $3440 = $yymsg;
+        $3441 = ($3440|0)!=(0|0);
+        if ($3441) {
+         $3442 = $yyalloc;
+         $yymsg_alloc = $3442;
+         break;
+        } else {
+         $yymsg = $yymsgbuf;
+         $yymsg_alloc = 128;
+         break;
+        }
+       }
+      } while(0);
+      $3443 = $yysize4;
+      $3444 = (0)<($3443>>>0);
+      if ($3444) {
+       $3445 = $yysize4;
+       $3446 = $yymsg_alloc;
+       $3447 = ($3445>>>0)<=($3446>>>0);
+       if ($3447) {
+        $3448 = $yymsg;
+        $3449 = $yystate;
+        $3450 = $yychar;
+        (_yysyntax_error($3448,$3449,$3450)|0);
+        $3451 = $0;
+        $3452 = $yymsg;
+        _yyerror($3451,$3452);
+        break;
+       }
+      }
+      $3453 = $0;
+      _yyerror($3453,62760);
+      $3454 = $yysize4;
+      $3455 = ($3454|0)!=(0);
+      if ($3455) {
+       label = 535;
+       break L1;
+      }
+     }
+    } while(0);
+    $3456 = $yyerrstatus;
+    $3457 = ($3456|0)==(3);
+    do {
+     if ($3457) {
+      $3458 = $yychar;
+      $3459 = ($3458|0)<=(0);
+      if ($3459) {
+       $3460 = $yychar;
+       $3461 = ($3460|0)==(0);
+       if ($3461) {
+        label = 534;
+        break L1;
+       } else {
+        break;
+       }
+      } else {
+       $3462 = $yytoken;
+       $3463 = $0;
+       _yydestruct(62773,$3462,$yylval,$3463);
+       $yychar = -2;
+       break;
+      }
+     }
+    } while(0);
+    $yyerrstatus = 3;
+    while(1) {
+     $3464 = $yystate;
+     $3465 = (3044 + ($3464<<1)|0);
+     $3466 = HEAP16[$3465>>1]|0;
+     $3467 = $3466 << 16 >> 16;
+     $yyn = $3467;
+     $3468 = $yyn;
+     $3469 = ($3468|0)!=(-771);
+     if ($3469) {
+      $3470 = $yyn;
+      $3471 = (($3470) + 1)|0;
+      $yyn = $3471;
+      $3472 = $yyn;
+      $3473 = (0)<=($3472|0);
+      $3474 = $yyn;
+      $3475 = ($3474|0)<=(10639);
+      $or$cond11 = $3473 & $3475;
+      if ($or$cond11) {
+       $3476 = $yyn;
+       $3477 = (4980 + ($3476<<1)|0);
+       $3478 = HEAP16[$3477>>1]|0;
+       $3479 = $3478 << 16 >> 16;
+       $3480 = ($3479|0)==(1);
+       if ($3480) {
+        $3481 = $yyn;
+        $3482 = (26260 + ($3481<<1)|0);
+        $3483 = HEAP16[$3482>>1]|0;
+        $3484 = $3483 << 16 >> 16;
+        $yyn = $3484;
+        $3485 = $yyn;
+        $3486 = (0)<($3485|0);
+        if ($3486) {
+         break;
+        }
+       }
+      }
+     }
+     $3487 = $yyssp;
+     $3488 = $yyss;
+     $3489 = ($3487|0)==($3488|0);
+     if ($3489) {
+      label = 534;
+      break L1;
+     }
+     $3490 = $yystate;
+     $3491 = (51232 + ($3490<<1)|0);
+     $3492 = HEAP16[$3491>>1]|0;
+     $3493 = $3492&65535;
+     $3494 = $yyvsp;
+     $3495 = $0;
+     _yydestruct(62800,$3493,$3494,$3495);
+     $3496 = $yyvsp;
+     $3497 = ((($3496)) + -4|0);
+     $yyvsp = $3497;
+     $3498 = $yyssp;
+     $3499 = ((($3498)) + -2|0);
+     $yyssp = $3499;
+     $3500 = $yyssp;
+     $3501 = HEAP16[$3500>>1]|0;
+     $3502 = $3501 << 16 >> 16;
+     $yystate = $3502;
+    }
+    $3503 = $yyvsp;
+    $3504 = ((($3503)) + 4|0);
+    $yyvsp = $3504;
+    ;HEAP32[$3504>>2]=HEAP32[$yylval>>2]|0;
+    $3505 = $yyn;
+    $yystate = $3505;
+   }
+  } while(0);
+  $3 = $yyssp;
+  $4 = ((($3)) + 2|0);
+  $yyssp = $4;
+ }
+ if ((label|0) == 533) {
+  $yyresult = 0;
+ }
+ else if ((label|0) == 534) {
+  $yyresult = 1;
+ }
+ else if ((label|0) == 535) {
+  $3506 = $0;
+  _yyerror($3506,62815);
+  $yyresult = 2;
+ }
+ $3507 = $yychar;
+ $3508 = ($3507|0)!=(-2);
+ if ($3508) {
+  $3509 = $yytoken;
+  $3510 = $0;
+  _yydestruct(62832,$3509,$yylval,$3510);
+ }
+ $3511 = $yylen;
+ $3512 = $yyvsp;
+ $3513 = (0 - ($3511))|0;
+ $3514 = (($3512) + ($3513<<2)|0);
+ $yyvsp = $3514;
+ $3515 = $yylen;
+ $3516 = $yyssp;
+ $3517 = (0 - ($3515))|0;
+ $3518 = (($3516) + ($3517<<1)|0);
+ $yyssp = $3518;
+ while(1) {
+  $3519 = $yyssp;
+  $3520 = $yyss;
+  $3521 = ($3519|0)!=($3520|0);
+  if (!($3521)) {
+   break;
+  }
+  $3522 = $yyssp;
+  $3523 = HEAP16[$3522>>1]|0;
+  $3524 = $3523 << 16 >> 16;
+  $3525 = (51232 + ($3524<<1)|0);
+  $3526 = HEAP16[$3525>>1]|0;
+  $3527 = $3526&65535;
+  $3528 = $yyvsp;
+  $3529 = $0;
+  _yydestruct(62862,$3527,$3528,$3529);
+  $3530 = $yyvsp;
+  $3531 = ((($3530)) + -4|0);
+  $yyvsp = $3531;
+  $3532 = $yyssp;
+  $3533 = ((($3532)) + -2|0);
+  $yyssp = $3533;
+ }
+ $3534 = $yyss;
+ $3535 = ($3534|0)!=($yyssa|0);
+ if ($3535) {
+  $3536 = $0;
+  $3537 = HEAP32[$3536>>2]|0;
+  $3538 = $yyss;
+  _mrb_free($3537,$3538);
+ }
+ $3539 = $yymsg;
+ $3540 = ($3539|0)!=($yymsgbuf|0);
+ if (!($3540)) {
+  $3544 = $yyresult;
+  STACKTOP = sp;return ($3544|0);
+ }
+ $3541 = $0;
+ $3542 = HEAP32[$3541>>2]|0;
+ $3543 = $yymsg;
+ _mrb_free($3542,$3543);
+ $3544 = $yyresult;
+ STACKTOP = sp;return ($3544|0);
+}
+function _yylex($lval,$p) {
+ $lval = $lval|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $lval;
+ $1 = $p;
+ $2 = $0;
+ $3 = $1;
+ $4 = ((($3)) + 1132|0);
+ HEAP32[$4>>2] = $2;
+ $5 = $1;
+ $6 = (_parser_yylex($5)|0);
+ STACKTOP = sp;return ($6|0);
+}
+function _parser_yylex($p) {
+ $p = $p|0;
+ var $$old = 0, $$old1 = 0, $$old10 = 0, $$old102 = 0, $$old103 = 0, $$old105 = 0, $$old106 = 0, $$old11 = 0, $$old111 = 0, $$old112 = 0, $$old114 = 0, $$old115 = 0, $$old19 = 0, $$old2 = 0, $$old20 = 0, $$old22 = 0, $$old23 = 0, $$old27 = 0, $$old28 = 0, $$old3 = 0;
+ var $$old30 = 0, $$old31 = 0, $$old35 = 0, $$old36 = 0, $$old38 = 0, $$old39 = 0, $$old88 = 0, $$old89 = 0, $$old94 = 0, $$old95 = 0, $$old97 = 0, $$old98 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0;
+ var $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0.0, $1012 = 0.0, $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0;
+ var $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0;
+ var $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0;
+ var $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0;
+ var $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0, $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0;
+ var $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0, $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0;
+ var $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $1119 = 0, $112 = 0, $1120 = 0, $1121 = 0, $1122 = 0, $1123 = 0, $1124 = 0, $1125 = 0, $1126 = 0, $1127 = 0, $1128 = 0, $1129 = 0, $113 = 0;
+ var $1130 = 0, $1131 = 0, $1132 = 0, $1133 = 0, $1134 = 0, $1135 = 0, $1136 = 0, $1137 = 0, $1138 = 0, $1139 = 0, $114 = 0, $1140 = 0, $1141 = 0, $1142 = 0, $1143 = 0, $1144 = 0, $1145 = 0, $1146 = 0, $1147 = 0, $1148 = 0;
+ var $1149 = 0, $115 = 0, $1150 = 0, $1151 = 0, $1152 = 0, $1153 = 0, $1154 = 0, $1155 = 0, $1156 = 0, $1157 = 0, $1158 = 0, $1159 = 0, $116 = 0, $1160 = 0, $1161 = 0, $1162 = 0, $1163 = 0, $1164 = 0, $1165 = 0, $1166 = 0;
+ var $1167 = 0, $1168 = 0, $1169 = 0, $117 = 0, $1170 = 0, $1171 = 0, $1172 = 0, $1173 = 0, $1174 = 0, $1175 = 0, $1176 = 0, $1177 = 0, $1178 = 0, $1179 = 0, $118 = 0, $1180 = 0, $1181 = 0, $1182 = 0, $1183 = 0, $1184 = 0;
+ var $1185 = 0, $1186 = 0, $1187 = 0, $1188 = 0, $1189 = 0, $119 = 0, $1190 = 0, $1191 = 0, $1192 = 0, $1193 = 0, $1194 = 0, $1195 = 0, $1196 = 0, $1197 = 0, $1198 = 0, $1199 = 0, $12 = 0, $120 = 0, $1200 = 0, $1201 = 0;
+ var $1202 = 0, $1203 = 0, $1204 = 0, $1205 = 0, $1206 = 0, $1207 = 0, $1208 = 0, $1209 = 0, $121 = 0, $1210 = 0, $1211 = 0, $1212 = 0, $1213 = 0, $1214 = 0, $1215 = 0, $1216 = 0, $1217 = 0, $1218 = 0, $1219 = 0, $122 = 0;
+ var $1220 = 0, $1221 = 0, $1222 = 0, $1223 = 0, $1224 = 0, $1225 = 0, $1226 = 0, $1227 = 0, $1228 = 0, $1229 = 0, $123 = 0, $1230 = 0, $1231 = 0, $1232 = 0, $1233 = 0, $1234 = 0, $1235 = 0, $1236 = 0, $1237 = 0, $1238 = 0;
+ var $1239 = 0, $124 = 0, $1240 = 0, $1241 = 0, $1242 = 0, $1243 = 0, $1244 = 0, $1245 = 0, $1246 = 0, $1247 = 0, $1248 = 0, $1249 = 0, $125 = 0, $1250 = 0, $1251 = 0, $1252 = 0, $1253 = 0, $1254 = 0, $1255 = 0, $1256 = 0;
+ var $1257 = 0, $1258 = 0, $1259 = 0, $126 = 0, $1260 = 0, $1261 = 0, $1262 = 0, $1263 = 0, $1264 = 0, $1265 = 0, $1266 = 0, $1267 = 0, $1268 = 0, $1269 = 0, $127 = 0, $1270 = 0, $1271 = 0, $1272 = 0, $1273 = 0, $1274 = 0;
+ var $1275 = 0, $1276 = 0, $1277 = 0, $1278 = 0, $1279 = 0, $128 = 0, $1280 = 0, $1281 = 0, $1282 = 0, $1283 = 0, $1284 = 0, $1285 = 0, $1286 = 0, $1287 = 0, $1288 = 0, $1289 = 0, $129 = 0, $1290 = 0, $1291 = 0, $1292 = 0;
+ var $1293 = 0, $1294 = 0, $1295 = 0, $1296 = 0, $1297 = 0, $1298 = 0, $1299 = 0, $13 = 0, $130 = 0, $1300 = 0, $1301 = 0, $1302 = 0, $1303 = 0, $1304 = 0, $1305 = 0, $1306 = 0, $1307 = 0, $1308 = 0, $1309 = 0, $131 = 0;
+ var $1310 = 0, $1311 = 0, $1312 = 0, $1313 = 0, $1314 = 0, $1315 = 0, $1316 = 0, $1317 = 0, $1318 = 0, $1319 = 0, $132 = 0, $1320 = 0, $1321 = 0, $1322 = 0, $1323 = 0, $1324 = 0, $1325 = 0, $1326 = 0, $1327 = 0, $1328 = 0;
+ var $1329 = 0, $133 = 0, $1330 = 0, $1331 = 0, $1332 = 0, $1333 = 0, $1334 = 0, $1335 = 0, $1336 = 0, $1337 = 0, $1338 = 0, $1339 = 0, $134 = 0, $1340 = 0, $1341 = 0, $1342 = 0, $1343 = 0, $1344 = 0, $1345 = 0, $1346 = 0;
+ var $1347 = 0, $1348 = 0, $1349 = 0, $135 = 0, $1350 = 0, $1351 = 0, $1352 = 0, $1353 = 0, $1354 = 0, $1355 = 0, $1356 = 0, $1357 = 0, $1358 = 0, $1359 = 0, $136 = 0, $1360 = 0, $1361 = 0, $1362 = 0, $1363 = 0, $1364 = 0;
+ var $1365 = 0, $1366 = 0, $1367 = 0, $1368 = 0, $1369 = 0, $137 = 0, $1370 = 0, $1371 = 0, $1372 = 0, $1373 = 0, $1374 = 0, $1375 = 0, $1376 = 0, $1377 = 0, $1378 = 0, $1379 = 0, $138 = 0, $1380 = 0, $1381 = 0, $1382 = 0;
+ var $1383 = 0, $1384 = 0, $1385 = 0, $1386 = 0, $1387 = 0, $1388 = 0, $1389 = 0, $139 = 0, $1390 = 0, $1391 = 0, $1392 = 0, $1393 = 0, $1394 = 0, $1395 = 0, $1396 = 0, $1397 = 0, $1398 = 0, $1399 = 0, $14 = 0, $140 = 0;
+ var $1400 = 0, $1401 = 0, $1402 = 0, $1403 = 0, $1404 = 0, $1405 = 0, $1406 = 0, $1407 = 0, $1408 = 0, $1409 = 0, $141 = 0, $1410 = 0, $1411 = 0, $1412 = 0, $1413 = 0, $1414 = 0, $1415 = 0, $1416 = 0, $1417 = 0, $1418 = 0;
+ var $1419 = 0, $142 = 0, $1420 = 0, $1421 = 0, $1422 = 0, $1423 = 0, $1424 = 0, $1425 = 0, $1426 = 0, $1427 = 0, $1428 = 0, $1429 = 0, $143 = 0, $1430 = 0, $1431 = 0, $1432 = 0, $1433 = 0, $1434 = 0, $1435 = 0, $1436 = 0;
+ var $1437 = 0, $1438 = 0, $1439 = 0, $144 = 0, $1440 = 0, $1441 = 0, $1442 = 0, $1443 = 0, $1444 = 0, $1445 = 0, $1446 = 0, $1447 = 0, $1448 = 0, $1449 = 0, $145 = 0, $1450 = 0, $1451 = 0, $1452 = 0, $1453 = 0, $1454 = 0;
+ var $1455 = 0, $1456 = 0, $1457 = 0, $1458 = 0, $1459 = 0, $146 = 0, $1460 = 0, $1461 = 0, $1462 = 0, $1463 = 0, $1464 = 0, $1465 = 0, $1466 = 0, $1467 = 0, $1468 = 0, $1469 = 0, $147 = 0, $1470 = 0, $1471 = 0, $1472 = 0;
+ var $1473 = 0, $1474 = 0, $1475 = 0, $1476 = 0, $1477 = 0, $1478 = 0, $1479 = 0, $148 = 0, $1480 = 0, $1481 = 0, $1482 = 0, $1483 = 0, $1484 = 0, $1485 = 0, $1486 = 0, $1487 = 0, $1488 = 0, $1489 = 0, $149 = 0, $1490 = 0;
+ var $1491 = 0, $1492 = 0, $1493 = 0, $1494 = 0, $1495 = 0, $1496 = 0, $1497 = 0, $1498 = 0, $1499 = 0, $15 = 0, $150 = 0, $1500 = 0, $1501 = 0, $1502 = 0, $1503 = 0, $1504 = 0, $1505 = 0, $1506 = 0, $1507 = 0, $1508 = 0;
+ var $1509 = 0, $151 = 0, $1510 = 0, $1511 = 0, $1512 = 0, $1513 = 0, $1514 = 0, $1515 = 0, $1516 = 0, $1517 = 0, $1518 = 0, $1519 = 0, $152 = 0, $1520 = 0, $1521 = 0, $1522 = 0, $1523 = 0, $1524 = 0, $1525 = 0, $1526 = 0;
+ var $1527 = 0, $1528 = 0, $1529 = 0, $153 = 0, $1530 = 0, $1531 = 0, $1532 = 0, $1533 = 0, $1534 = 0, $1535 = 0, $1536 = 0, $1537 = 0, $1538 = 0, $1539 = 0, $154 = 0, $1540 = 0, $1541 = 0, $1542 = 0, $1543 = 0, $1544 = 0;
+ var $1545 = 0, $1546 = 0, $1547 = 0, $1548 = 0, $1549 = 0, $155 = 0, $1550 = 0, $1551 = 0, $1552 = 0, $1553 = 0, $1554 = 0, $1555 = 0, $1556 = 0, $1557 = 0, $1558 = 0, $1559 = 0, $156 = 0, $1560 = 0, $1561 = 0, $1562 = 0;
+ var $1563 = 0, $1564 = 0, $1565 = 0, $1566 = 0, $1567 = 0, $1568 = 0, $1569 = 0, $157 = 0, $1570 = 0, $1571 = 0, $1572 = 0, $1573 = 0, $1574 = 0, $1575 = 0, $1576 = 0, $1577 = 0, $1578 = 0, $1579 = 0, $158 = 0, $1580 = 0;
+ var $1581 = 0, $1582 = 0, $1583 = 0, $1584 = 0, $1585 = 0, $1586 = 0, $1587 = 0, $1588 = 0, $1589 = 0, $159 = 0, $1590 = 0, $1591 = 0, $1592 = 0, $1593 = 0, $1594 = 0, $1595 = 0, $1596 = 0, $1597 = 0, $1598 = 0, $1599 = 0;
+ var $16 = 0, $160 = 0, $1600 = 0, $1601 = 0, $1602 = 0, $1603 = 0, $1604 = 0, $1605 = 0, $1606 = 0, $1607 = 0, $1608 = 0, $1609 = 0, $161 = 0, $1610 = 0, $1611 = 0, $1612 = 0, $1613 = 0, $1614 = 0, $1615 = 0, $1616 = 0;
+ var $1617 = 0, $1618 = 0, $1619 = 0, $162 = 0, $1620 = 0, $1621 = 0, $1622 = 0, $1623 = 0, $1624 = 0, $1625 = 0, $1626 = 0, $1627 = 0, $1628 = 0, $1629 = 0, $163 = 0, $1630 = 0, $1631 = 0, $1632 = 0, $1633 = 0, $1634 = 0;
+ var $1635 = 0, $1636 = 0, $1637 = 0, $1638 = 0, $1639 = 0, $164 = 0, $1640 = 0, $1641 = 0, $1642 = 0, $1643 = 0, $1644 = 0, $1645 = 0, $1646 = 0, $1647 = 0, $1648 = 0, $1649 = 0, $165 = 0, $1650 = 0, $1651 = 0, $1652 = 0;
+ var $1653 = 0, $1654 = 0, $1655 = 0, $1656 = 0, $1657 = 0, $1658 = 0, $1659 = 0, $166 = 0, $1660 = 0, $1661 = 0, $1662 = 0, $1663 = 0, $1664 = 0, $1665 = 0, $1666 = 0, $1667 = 0, $1668 = 0, $1669 = 0, $167 = 0, $1670 = 0;
+ var $1671 = 0, $1672 = 0, $1673 = 0, $1674 = 0, $1675 = 0, $1676 = 0, $1677 = 0, $1678 = 0, $1679 = 0, $168 = 0, $1680 = 0, $1681 = 0, $1682 = 0, $1683 = 0, $1684 = 0, $1685 = 0, $1686 = 0, $1687 = 0, $1688 = 0, $1689 = 0;
+ var $169 = 0, $1690 = 0, $1691 = 0, $1692 = 0, $1693 = 0, $1694 = 0, $1695 = 0, $1696 = 0, $1697 = 0, $1698 = 0, $1699 = 0, $17 = 0, $170 = 0, $1700 = 0, $1701 = 0, $1702 = 0, $1703 = 0, $1704 = 0, $1705 = 0, $1706 = 0;
+ var $1707 = 0, $1708 = 0, $1709 = 0, $171 = 0, $1710 = 0, $1711 = 0, $1712 = 0, $1713 = 0, $1714 = 0, $1715 = 0, $1716 = 0, $1717 = 0, $1718 = 0, $1719 = 0, $172 = 0, $1720 = 0, $1721 = 0, $1722 = 0, $1723 = 0, $1724 = 0;
+ var $1725 = 0, $1726 = 0, $1727 = 0, $1728 = 0, $1729 = 0, $173 = 0, $1730 = 0, $1731 = 0, $1732 = 0, $1733 = 0, $1734 = 0, $1735 = 0, $1736 = 0, $1737 = 0, $1738 = 0, $1739 = 0, $174 = 0, $1740 = 0, $1741 = 0, $1742 = 0;
+ var $1743 = 0, $1744 = 0, $1745 = 0, $1746 = 0, $1747 = 0, $1748 = 0, $1749 = 0, $175 = 0, $1750 = 0, $1751 = 0, $1752 = 0, $1753 = 0, $1754 = 0, $1755 = 0, $1756 = 0, $1757 = 0, $1758 = 0, $1759 = 0, $176 = 0, $1760 = 0;
+ var $1761 = 0, $1762 = 0, $1763 = 0, $1764 = 0, $1765 = 0, $1766 = 0, $1767 = 0, $1768 = 0, $1769 = 0, $177 = 0, $1770 = 0, $1771 = 0, $1772 = 0, $1773 = 0, $1774 = 0, $1775 = 0, $1776 = 0, $1777 = 0, $1778 = 0, $1779 = 0;
+ var $178 = 0, $1780 = 0, $1781 = 0, $1782 = 0, $1783 = 0, $1784 = 0, $1785 = 0, $1786 = 0, $1787 = 0, $1788 = 0, $1789 = 0, $179 = 0, $1790 = 0, $1791 = 0, $1792 = 0, $1793 = 0, $1794 = 0, $1795 = 0, $1796 = 0, $1797 = 0;
+ var $1798 = 0, $1799 = 0, $18 = 0, $180 = 0, $1800 = 0, $1801 = 0, $1802 = 0, $1803 = 0, $1804 = 0, $1805 = 0, $1806 = 0, $1807 = 0, $1808 = 0, $1809 = 0, $181 = 0, $1810 = 0, $1811 = 0, $1812 = 0, $1813 = 0, $1814 = 0;
+ var $1815 = 0, $1816 = 0, $1817 = 0, $1818 = 0, $1819 = 0, $182 = 0, $1820 = 0, $1821 = 0, $1822 = 0, $1823 = 0, $1824 = 0, $1825 = 0, $1826 = 0, $1827 = 0, $1828 = 0, $1829 = 0, $183 = 0, $1830 = 0, $1831 = 0, $1832 = 0;
+ var $1833 = 0, $1834 = 0, $1835 = 0, $1836 = 0, $1837 = 0, $1838 = 0, $1839 = 0, $184 = 0, $1840 = 0, $1841 = 0, $1842 = 0, $1843 = 0, $1844 = 0, $1845 = 0, $1846 = 0, $1847 = 0, $1848 = 0, $1849 = 0, $185 = 0, $1850 = 0;
+ var $1851 = 0, $1852 = 0, $1853 = 0, $1854 = 0, $1855 = 0, $1856 = 0, $1857 = 0, $1858 = 0, $1859 = 0, $186 = 0, $1860 = 0, $1861 = 0, $1862 = 0, $1863 = 0, $1864 = 0, $1865 = 0, $1866 = 0, $1867 = 0, $1868 = 0, $1869 = 0;
+ var $187 = 0, $1870 = 0, $1871 = 0, $1872 = 0, $1873 = 0, $1874 = 0, $1875 = 0, $1876 = 0, $1877 = 0, $1878 = 0, $1879 = 0, $188 = 0, $1880 = 0, $1881 = 0, $1882 = 0, $1883 = 0, $1884 = 0, $1885 = 0, $1886 = 0, $1887 = 0;
+ var $1888 = 0, $1889 = 0, $189 = 0, $1890 = 0, $1891 = 0, $1892 = 0, $1893 = 0, $1894 = 0, $1895 = 0, $1896 = 0, $1897 = 0, $1898 = 0, $1899 = 0, $19 = 0, $190 = 0, $1900 = 0, $1901 = 0, $1902 = 0, $1903 = 0, $1904 = 0;
+ var $1905 = 0, $1906 = 0, $1907 = 0, $1908 = 0, $1909 = 0, $191 = 0, $1910 = 0, $1911 = 0, $1912 = 0, $1913 = 0, $1914 = 0, $1915 = 0, $1916 = 0, $1917 = 0, $1918 = 0, $1919 = 0, $192 = 0, $1920 = 0, $1921 = 0, $1922 = 0;
+ var $1923 = 0, $1924 = 0, $1925 = 0, $1926 = 0, $1927 = 0, $1928 = 0, $1929 = 0, $193 = 0, $1930 = 0, $1931 = 0, $1932 = 0, $1933 = 0, $1934 = 0, $1935 = 0, $1936 = 0, $1937 = 0, $1938 = 0, $1939 = 0, $194 = 0, $1940 = 0;
+ var $1941 = 0, $1942 = 0, $1943 = 0, $1944 = 0, $1945 = 0, $1946 = 0, $1947 = 0, $1948 = 0, $1949 = 0, $195 = 0, $1950 = 0, $1951 = 0, $1952 = 0, $1953 = 0, $1954 = 0, $1955 = 0, $1956 = 0, $1957 = 0, $1958 = 0, $1959 = 0;
+ var $196 = 0, $1960 = 0, $1961 = 0, $1962 = 0, $1963 = 0, $1964 = 0, $1965 = 0, $1966 = 0, $1967 = 0, $1968 = 0, $1969 = 0, $197 = 0, $1970 = 0, $1971 = 0, $1972 = 0, $1973 = 0, $1974 = 0, $1975 = 0, $1976 = 0, $1977 = 0;
+ var $1978 = 0, $1979 = 0, $198 = 0, $1980 = 0, $1981 = 0, $1982 = 0, $1983 = 0, $1984 = 0, $1985 = 0, $1986 = 0, $1987 = 0, $1988 = 0, $1989 = 0, $199 = 0, $1990 = 0, $1991 = 0, $1992 = 0, $1993 = 0, $1994 = 0, $1995 = 0;
+ var $1996 = 0, $1997 = 0, $1998 = 0, $1999 = 0, $2 = 0, $20 = 0, $200 = 0, $2000 = 0, $2001 = 0, $2002 = 0, $2003 = 0, $2004 = 0, $2005 = 0, $2006 = 0, $2007 = 0, $2008 = 0, $2009 = 0, $201 = 0, $2010 = 0, $2011 = 0;
+ var $2012 = 0, $2013 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0;
+ var $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0;
+ var $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0;
+ var $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0;
+ var $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0;
+ var $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0;
+ var $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0;
+ var $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0;
+ var $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0;
+ var $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0;
+ var $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0;
+ var $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0;
+ var $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0;
+ var $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0;
+ var $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0;
+ var $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0;
+ var $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0;
+ var $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0;
+ var $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0;
+ var $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0;
+ var $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0;
+ var $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0;
+ var $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0;
+ var $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0;
+ var $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0;
+ var $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0;
+ var $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0;
+ var $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0;
+ var $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0;
+ var $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0;
+ var $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0;
+ var $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0;
+ var $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0;
+ var $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0;
+ var $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0;
+ var $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0;
+ var $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0;
+ var $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0;
+ var $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0;
+ var $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0;
+ var $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0;
+ var $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0;
+ var $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0;
+ var $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0;
+ var $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $buf = 0, $c = 0, $c0 = 0, $c2 = 0, $c21 = 0, $cmd_state = 0, $d = 0.0, $endp = 0, $ident = 0, $is_float = 0, $kw = 0, $last_state = 0, $n = 0, $nondigit = 0;
+ var $or$cond = 0, $or$cond$not = 0, $or$cond101 = 0, $or$cond104 = 0, $or$cond107 = 0, $or$cond110 = 0, $or$cond113 = 0, $or$cond113$not = 0, $or$cond116 = 0, $or$cond118 = 0, $or$cond12 = 0, $or$cond121 = 0, $or$cond121$not = 0, $or$cond124 = 0, $or$cond127 = 0, $or$cond127$not = 0, $or$cond130 = 0, $or$cond133 = 0, $or$cond133$not = 0, $or$cond136 = 0;
+ var $or$cond139 = 0, $or$cond139$not = 0, $or$cond142 = 0, $or$cond145 = 0, $or$cond15 = 0, $or$cond150 = 0, $or$cond153 = 0, $or$cond156 = 0, $or$cond159 = 0, $or$cond162 = 0, $or$cond165 = 0, $or$cond168 = 0, $or$cond18 = 0, $or$cond21 = 0, $or$cond21$not = 0, $or$cond24 = 0, $or$cond26 = 0, $or$cond29 = 0, $or$cond29$not = 0, $or$cond32 = 0;
+ var $or$cond34 = 0, $or$cond37 = 0, $or$cond37$not = 0, $or$cond4 = 0, $or$cond40 = 0, $or$cond42 = 0, $or$cond45 = 0, $or$cond48 = 0, $or$cond51 = 0, $or$cond54 = 0, $or$cond57 = 0, $or$cond6 = 0, $or$cond60 = 0, $or$cond63 = 0, $or$cond66 = 0, $or$cond69 = 0, $or$cond72 = 0, $or$cond75 = 0, $or$cond78 = 0, $or$cond81 = 0;
+ var $or$cond84 = 0, $or$cond87 = 0, $or$cond9 = 0, $or$cond90 = 0, $or$cond93 = 0, $or$cond96 = 0, $or$cond96$not = 0, $or$cond99 = 0, $paren = 0, $result = 0, $seen_e = 0, $seen_point = 0, $space_seen = 0, $start = 0, $state = 0, $term = 0, $token = 0, $token_column = 0, $vararg_buffer = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 368|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp + 8|0;
+ $buf = sp + 112|0;
+ $endp = sp + 40|0;
+ $1 = $p;
+ $space_seen = 0;
+ $2 = $1;
+ $3 = ((($2)) + 44|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)!=(0|0);
+ if ($5) {
+  $6 = $1;
+  $7 = ((($6)) + 44|0);
+  $8 = HEAP32[$7>>2]|0;
+  $9 = HEAP32[$8>>2]|0;
+  $10 = $9;
+  $11 = $10 & 64;
+  $12 = ($11|0)!=(0);
+  $13 = $1;
+  if (!($12)) {
+   $19 = (_parse_string($13)|0);
+   $0 = $19;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+  }
+  $14 = ((($13)) + 1120|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = ($15|0)!=(0|0);
+  if ($16) {
+   $17 = $1;
+   $18 = (_parse_string($17)|0);
+   $0 = $18;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+  }
+ }
+ $20 = $1;
+ $21 = ((($20)) + 72|0);
+ $22 = HEAP8[$21>>0]|0;
+ $23 = $22 & 1;
+ $24 = $23&255;
+ $cmd_state = $24;
+ $25 = $1;
+ $26 = ((($25)) + 72|0);
+ $27 = HEAP8[$26>>0]|0;
+ $28 = $27 & -2;
+ HEAP8[$26>>0] = $28;
+ L10: while(1) {
+  $29 = $1;
+  $30 = ((($29)) + 40|0);
+  $31 = HEAP32[$30>>2]|0;
+  $last_state = $31;
+  $32 = $1;
+  $33 = (_nextc($32)|0);
+  $c = $33;
+  switch ($33|0) {
+  case 42:  {
+   label = 25;
+   break L10;
+   break;
+  }
+  case 33:  {
+   label = 47;
+   break L10;
+   break;
+  }
+  case 60:  {
+   label = 82;
+   break L10;
+   break;
+  }
+  case 62:  {
+   label = 107;
+   break L10;
+   break;
+  }
+  case 34:  {
+   label = 118;
+   break L10;
+   break;
+  }
+  case 39:  {
+   label = 119;
+   break L10;
+   break;
+  }
+  case 96:  {
+   label = 120;
+   break L10;
+   break;
+  }
+  case 63:  {
+   label = 128;
+   break L10;
+   break;
+  }
+  case 38:  {
+   label = 155;
+   break L10;
+   break;
+  }
+  case 124:  {
+   label = 177;
+   break L10;
+   break;
+  }
+  case 43:  {
+   label = 188;
+   break L10;
+   break;
+  }
+  case 45:  {
+   label = 209;
+   break L10;
+   break;
+  }
+  case 46:  {
+   label = 232;
+   break L10;
+   break;
+  }
+  case 57: case 56: case 55: case 54: case 53: case 52: case 51: case 50: case 49: case 48:  {
+   label = 240;
+   break L10;
+   break;
+  }
+  case 93: case 41:  {
+   label = 332;
+   break L10;
+   break;
+  }
+  case 125:  {
+   label = 333;
+   break L10;
+   break;
+  }
+  case 58:  {
+   label = 337;
+   break L10;
+   break;
+  }
+  case 47:  {
+   label = 354;
+   break L10;
+   break;
+  }
+  case 94:  {
+   label = 371;
+   break L10;
+   break;
+  }
+  case 59:  {
+   label = 378;
+   break L10;
+   break;
+  }
+  case 44:  {
+   label = 379;
+   break L10;
+   break;
+  }
+  case 126:  {
+   label = 380;
+   break L10;
+   break;
+  }
+  case 40:  {
+   label = 387;
+   break L10;
+   break;
+  }
+  case 91:  {
+   label = 397;
+   break L10;
+   break;
+  }
+  case 123:  {
+   label = 414;
+   break L10;
+   break;
+  }
+  case 37:  {
+   label = 429;
+   break L10;
+   break;
+  }
+  case 36:  {
+   label = 473;
+   break L10;
+   break;
+  }
+  case 64:  {
+   label = 497;
+   break L10;
+   break;
+  }
+  case 95:  {
+   label = 512;
+   break L10;
+   break;
+  }
+  case -1: case 0: case 26: case 4:  {
+   $34 = $1;
+   $35 = ((($34)) + 1116|0);
+   $36 = HEAP32[$35>>2]|0;
+   $37 = ($36|0)!=(0|0);
+   if (!($37)) {
+    label = 9;
+    break L10;
+   }
+   break;
+  }
+  case 11: case 13: case 12: case 9: case 32:  {
+   $space_seen = 1;
+   continue L10;
+   break;
+  }
+  case 35:  {
+   $38 = $1;
+   _skip($38,10);
+   break;
+  }
+  case 10: case -2:  {
+   break;
+  }
+  case 61:  {
+   $173 = $1;
+   $174 = ((($173)) + 36|0);
+   $175 = HEAP32[$174>>2]|0;
+   $176 = ($175|0)==(1);
+   if (!($176)) {
+    label = 69;
+    break L10;
+   }
+   $177 = $1;
+   $178 = (_peeks($177,68915)|0);
+   $179 = ($178<<24>>24)!=(0);
+   if (!($179)) {
+    label = 69;
+    break L10;
+   }
+   $180 = $1;
+   $181 = (_peekc_n($180,5)|0);
+   $c = $181;
+   $182 = $c;
+   $183 = ($182|0)<(0);
+   $184 = $c;
+   $185 = ($184|0)==(32);
+   $or$cond9 = $183 | $185;
+   if (!($or$cond9)) {
+    $186 = $c;
+    $187 = (($186) - 9)|0;
+    $188 = ($187>>>0)<(5);
+    if (!($188)) {
+     label = 69;
+     break L10;
+    }
+   }
+   while(1) {
+    $189 = $1;
+    $190 = (_skips($189,57125)|0);
+    $191 = ($190<<24>>24)!=(0);
+    $192 = $1;
+    if (!($191)) {
+     label = 62;
+     break L10;
+    }
+    $193 = (_nextc($192)|0);
+    $c = $193;
+    $194 = $c;
+    $195 = ($194|0)<(0);
+    $196 = $c;
+    $197 = ($196|0)==(32);
+    $or$cond168 = $195 | $197;
+    if ($or$cond168) {
+     $202 = 1;
+    } else {
+     $198 = $c;
+     $199 = (($198) - 9)|0;
+     $200 = ($199>>>0)<(5);
+     $202 = $200;
+    }
+    $201 = $202 ^ 1;
+    if (!($201)) {
+     break;
+    }
+   }
+   $203 = $c;
+   $204 = ($203|0)!=(10);
+   if ($204) {
+    $205 = $1;
+    _skip($205,10);
+   }
+   $206 = $1;
+   $207 = ((($206)) + 32|0);
+   $208 = HEAP32[$207>>2]|0;
+   $209 = (($208) + 1)|0;
+   HEAP32[$207>>2] = $209;
+   $210 = $1;
+   $211 = ((($210)) + 36|0);
+   HEAP32[$211>>2] = 0;
+   continue L10;
+   break;
+  }
+  case 92:  {
+   $1414 = $1;
+   $1415 = (_nextc($1414)|0);
+   $c = $1415;
+   $1416 = $c;
+   $1417 = ($1416|0)==(10);
+   $1418 = $1;
+   if (!($1417)) {
+    label = 428;
+    break L10;
+   }
+   $1419 = ((($1418)) + 32|0);
+   $1420 = HEAP32[$1419>>2]|0;
+   $1421 = (($1420) + 1)|0;
+   HEAP32[$1419>>2] = $1421;
+   $1422 = $1;
+   $1423 = ((($1422)) + 36|0);
+   HEAP32[$1423>>2] = 0;
+   $space_seen = 1;
+   continue L10;
+   break;
+  }
+  default: {
+   $1715 = $c;
+   $1716 = $1715 | 32;
+   $1717 = (($1716) - 97)|0;
+   $1718 = ($1717>>>0)<(26);
+   if ($1718) {
+    label = 516;
+    break L10;
+   }
+   $1719 = $c;
+   $1720 = (($1719) - 48)|0;
+   $1721 = ($1720>>>0)<(10);
+   $1722 = $c;
+   $1723 = ($1722|0)==(95);
+   $or$cond139 = $1721 | $1723;
+   $or$cond139$not = $or$cond139 ^ 1;
+   $1724 = $c;
+   $1725 = ($1724>>>0)<=(127);
+   $or$cond142 = $or$cond139$not & $1725;
+   if (!($or$cond142)) {
+    label = 516;
+    break L10;
+   }
+   $1726 = $1;
+   $1727 = $c;
+   _yyerror_i($1726,57851,$1727);
+   continue L10;
+  }
+  }
+  $39 = $1;
+  _heredoc_treat_nextline($39);
+  $40 = $1;
+  $41 = ((($40)) + 40|0);
+  $42 = HEAP32[$41>>2]|0;
+  switch ($42|0) {
+  case 10: case 9: case 8: case 7: case 0:  {
+   $43 = $1;
+   $44 = ((($43)) + 32|0);
+   $45 = HEAP32[$44>>2]|0;
+   $46 = (($45) + 1)|0;
+   HEAP32[$44>>2] = $46;
+   $47 = $1;
+   $48 = ((($47)) + 36|0);
+   HEAP32[$48>>2] = 0;
+   $49 = $1;
+   $50 = ((($49)) + 1120|0);
+   $51 = HEAP32[$50>>2]|0;
+   $52 = ($51|0)!=(0|0);
+   if (!($52)) {
+    continue L10;
+   }
+   $53 = $1;
+   $54 = ((($53)) + 44|0);
+   $55 = HEAP32[$54>>2]|0;
+   $56 = ($55|0)!=(0|0);
+   if ($56) {
+    label = 15;
+    break L10;
+   } else {
+    continue L10;
+   }
+   break;
+  }
+  default: {
+  }
+  }
+  $59 = $1;
+  $60 = ((($59)) + 1120|0);
+  $61 = HEAP32[$60>>2]|0;
+  $62 = ($61|0)!=(0|0);
+  if ($62) {
+   label = 17;
+   break;
+  }
+  L41: while(1) {
+   $63 = $1;
+   $64 = (_nextc($63)|0);
+   $c = $64;
+   $65 = ($64|0)!=(0);
+   if (!($65)) {
+    label = 24;
+    break L10;
+   }
+   $66 = $c;
+   switch ($66|0) {
+   case -2: case -1:  {
+    label = 24;
+    break L10;
+    break;
+   }
+   case 46:  {
+    break L41;
+    break;
+   }
+   case 11: case 13: case 12: case 9: case 32:  {
+    break;
+   }
+   default: {
+    label = 23;
+    break L10;
+   }
+   }
+   $space_seen = 1;
+  }
+  $67 = $1;
+  $68 = (_nextc($67)|0);
+  $c = $68;
+  $69 = ($68|0)!=(46);
+  if (!($69)) {
+   label = 24;
+   break;
+  }
+  $70 = $1;
+  $71 = $c;
+  _pushback($70,$71);
+  $72 = $1;
+  _pushback($72,46);
+ }
+ L47:  switch (label|0) {
+  case 9: {
+   $0 = 0;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 15: {
+   $57 = $1;
+   $58 = (_parse_string($57)|0);
+   $0 = $58;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 17: {
+   $0 = 10;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 23: {
+   $73 = $1;
+   $74 = $c;
+   _pushback($73,$74);
+   label = 24;
+   break;
+  }
+  case 25: {
+   $82 = $1;
+   $83 = (_nextc($82)|0);
+   $c = $83;
+   $84 = ($83|0)==(42);
+   do {
+    if ($84) {
+     $85 = $1;
+     $86 = (_nextc($85)|0);
+     $c = $86;
+     $87 = ($86|0)==(61);
+     $88 = $1;
+     if (!($87)) {
+      $95 = $c;
+      _pushback($88,$95);
+      $c = 326;
+      break;
+     }
+     $89 = (_intern_gen($88,57087,2)|0);
+     $90 = $1;
+     $91 = ((($90)) + 1132|0);
+     $92 = HEAP32[$91>>2]|0;
+     HEAP32[$92>>2] = $89;
+     $93 = $1;
+     $94 = ((($93)) + 40|0);
+     HEAP32[$94>>2] = 0;
+     $0 = 345;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    } else {
+     $96 = $c;
+     $97 = ($96|0)==(61);
+     $98 = $1;
+     if ($97) {
+      $99 = (_intern_gen_c($98,42)|0);
+      $100 = $1;
+      $101 = ((($100)) + 1132|0);
+      $102 = HEAP32[$101>>2]|0;
+      HEAP32[$102>>2] = $99;
+      $103 = $1;
+      $104 = ((($103)) + 40|0);
+      HEAP32[$104>>2] = 0;
+      $0 = 345;
+      $2013 = $0;
+      STACKTOP = sp;return ($2013|0);
+     }
+     $105 = $c;
+     _pushback($98,$105);
+     $106 = $1;
+     $107 = ((($106)) + 40|0);
+     $108 = HEAP32[$107>>2]|0;
+     $109 = ($108|0)==(4);
+     if ($109) {
+      $$old = $space_seen;
+      $$old1 = ($$old|0)==(0);
+      $$old2 = $c;
+      $$old3 = ($$old2|0)==(32);
+      $or$cond6 = $$old1 | $$old3;
+      if (!($or$cond6)) {
+       label = 34;
+      }
+     } else {
+      $110 = $1;
+      $111 = ((($110)) + 40|0);
+      $112 = HEAP32[$111>>2]|0;
+      $113 = ($112|0)==(5);
+      $114 = $space_seen;
+      $115 = ($114|0)!=(0);
+      $or$cond = $113 & $115;
+      $or$cond$not = $or$cond ^ 1;
+      $116 = $c;
+      $117 = ($116|0)==(32);
+      $or$cond4 = $or$cond$not | $117;
+      if (!($or$cond4)) {
+       label = 34;
+      }
+     }
+     if ((label|0) == 34) {
+      $118 = $c;
+      $119 = (($118) - 9)|0;
+      $120 = ($119>>>0)<(5);
+      if (!($120)) {
+       $121 = $1;
+       _yywarning($121,57090);
+       $c = 353;
+       break;
+      }
+     }
+     $122 = $1;
+     $123 = ((($122)) + 40|0);
+     $124 = HEAP32[$123>>2]|0;
+     $125 = ($124|0)==(0);
+     if (!($125)) {
+      $126 = $1;
+      $127 = ((($126)) + 40|0);
+      $128 = HEAP32[$127>>2]|0;
+      $129 = ($128|0)==(6);
+      if (!($129)) {
+       $130 = $1;
+       $131 = ((($130)) + 40|0);
+       $132 = HEAP32[$131>>2]|0;
+       $133 = ($132|0)==(10);
+       if (!($133)) {
+        $134 = $1;
+        $135 = ((($134)) + 40|0);
+        $136 = HEAP32[$135>>2]|0;
+        $137 = ($136|0)==(9);
+        if (!($137)) {
+         $c = 42;
+         break;
+        }
+       }
+      }
+     }
+     $c = 353;
+    }
+   } while(0);
+   $138 = $1;
+   $139 = ((($138)) + 40|0);
+   $140 = HEAP32[$139>>2]|0;
+   $141 = ($140|0)==(7);
+   if ($141) {
+    label = 44;
+   } else {
+    $142 = $1;
+    $143 = ((($142)) + 40|0);
+    $144 = HEAP32[$143>>2]|0;
+    $145 = ($144|0)==(8);
+    if ($145) {
+     label = 44;
+    } else {
+     $148 = $1;
+     $149 = ((($148)) + 40|0);
+     HEAP32[$149>>2] = 0;
+    }
+   }
+   if ((label|0) == 44) {
+    $146 = $1;
+    $147 = ((($146)) + 40|0);
+    HEAP32[$147>>2] = 4;
+   }
+   $150 = $c;
+   $0 = $150;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 47: {
+   $151 = $1;
+   $152 = (_nextc($151)|0);
+   $c = $152;
+   $153 = $1;
+   $154 = ((($153)) + 40|0);
+   $155 = HEAP32[$154>>2]|0;
+   $156 = ($155|0)==(7);
+   if ($156) {
+    label = 49;
+   } else {
+    $157 = $1;
+    $158 = ((($157)) + 40|0);
+    $159 = HEAP32[$158>>2]|0;
+    $160 = ($159|0)==(8);
+    if ($160) {
+     label = 49;
+    } else {
+     $165 = $1;
+     $166 = ((($165)) + 40|0);
+     HEAP32[$166>>2] = 0;
+    }
+   }
+   if ((label|0) == 49) {
+    $161 = $1;
+    $162 = ((($161)) + 40|0);
+    HEAP32[$162>>2] = 4;
+    $163 = $c;
+    $164 = ($163|0)==(64);
+    if ($164) {
+     $0 = 33;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    }
+   }
+   $167 = $c;
+   $168 = ($167|0)==(61);
+   if ($168) {
+    $0 = 330;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   $169 = $c;
+   $170 = ($169|0)==(126);
+   if ($170) {
+    $0 = 336;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   } else {
+    $171 = $1;
+    $172 = $c;
+    _pushback($171,$172);
+    $0 = 33;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   break;
+  }
+  case 62: {
+   _yyerror($192,57131);
+   $0 = 0;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 69: {
+   $212 = $1;
+   $213 = ((($212)) + 40|0);
+   $214 = HEAP32[$213>>2]|0;
+   $215 = ($214|0)==(7);
+   if ($215) {
+    label = 71;
+   } else {
+    $216 = $1;
+    $217 = ((($216)) + 40|0);
+    $218 = HEAP32[$217>>2]|0;
+    $219 = ($218|0)==(8);
+    if ($219) {
+     label = 71;
+    } else {
+     $222 = $1;
+     $223 = ((($222)) + 40|0);
+     HEAP32[$223>>2] = 0;
+    }
+   }
+   if ((label|0) == 71) {
+    $220 = $1;
+    $221 = ((($220)) + 40|0);
+    HEAP32[$221>>2] = 4;
+   }
+   $224 = $1;
+   $225 = (_nextc($224)|0);
+   $c = $225;
+   $226 = ($225|0)==(61);
+   if ($226) {
+    $227 = $1;
+    $228 = (_nextc($227)|0);
+    $c = $228;
+    $229 = ($228|0)==(61);
+    if ($229) {
+     $0 = 329;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    } else {
+     $230 = $1;
+     $231 = $c;
+     _pushback($230,$231);
+     $0 = 328;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    }
+   }
+   $232 = $c;
+   $233 = ($232|0)==(126);
+   if ($233) {
+    $0 = 335;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   $234 = $c;
+   $235 = ($234|0)==(62);
+   if ($235) {
+    $0 = 346;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   } else {
+    $236 = $1;
+    $237 = $c;
+    _pushback($236,$237);
+    $0 = 61;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   break;
+  }
+  case 82: {
+   $238 = $1;
+   $239 = (_nextc($238)|0);
+   $c = $239;
+   $240 = $c;
+   $241 = ($240|0)==(60);
+   do {
+    if ($241) {
+     $242 = $1;
+     $243 = ((($242)) + 40|0);
+     $244 = HEAP32[$243>>2]|0;
+     $245 = ($244|0)!=(8);
+     if ($245) {
+      $246 = $1;
+      $247 = ((($246)) + 40|0);
+      $248 = HEAP32[$247>>2]|0;
+      $249 = ($248|0)!=(9);
+      if ($249) {
+       $250 = $1;
+       $251 = ((($250)) + 40|0);
+       $252 = HEAP32[$251>>2]|0;
+       $253 = ($252|0)==(1);
+       if (!($253)) {
+        $254 = $1;
+        $255 = ((($254)) + 40|0);
+        $256 = HEAP32[$255>>2]|0;
+        $257 = ($256|0)==(2);
+        if (!($257)) {
+         $258 = $1;
+         $259 = ((($258)) + 40|0);
+         $260 = HEAP32[$259>>2]|0;
+         $261 = ($260|0)==(3);
+         if (!($261)) {
+          $262 = $1;
+          $263 = ((($262)) + 40|0);
+          $264 = HEAP32[$263>>2]|0;
+          $265 = ($264|0)==(4);
+          if ($265) {
+           $$old10 = $space_seen;
+           $$old11 = ($$old10|0)!=(0);
+           if (!($$old11)) {
+            break;
+           }
+          } else {
+           $266 = $1;
+           $267 = ((($266)) + 40|0);
+           $268 = HEAP32[$267>>2]|0;
+           $269 = ($268|0)!=(5);
+           $270 = $space_seen;
+           $271 = ($270|0)!=(0);
+           $or$cond12 = $269 | $271;
+           if (!($or$cond12)) {
+            break;
+           }
+          }
+          $272 = $1;
+          $273 = (_heredoc_identifier($272)|0);
+          $token = $273;
+          $274 = $token;
+          $275 = ($274|0)!=(0);
+          if ($275) {
+           $276 = $token;
+           $0 = $276;
+           $2013 = $0;
+           STACKTOP = sp;return ($2013|0);
+          }
+         }
+        }
+       }
+      }
+     }
+    }
+   } while(0);
+   $277 = $1;
+   $278 = ((($277)) + 40|0);
+   $279 = HEAP32[$278>>2]|0;
+   $280 = ($279|0)==(7);
+   if ($280) {
+    label = 95;
+   } else {
+    $281 = $1;
+    $282 = ((($281)) + 40|0);
+    $283 = HEAP32[$282>>2]|0;
+    $284 = ($283|0)==(8);
+    if ($284) {
+     label = 95;
+    } else {
+     $287 = $1;
+     $288 = ((($287)) + 40|0);
+     HEAP32[$288>>2] = 0;
+     $289 = $1;
+     $290 = ((($289)) + 40|0);
+     $291 = HEAP32[$290>>2]|0;
+     $292 = ($291|0)==(9);
+     if ($292) {
+      $293 = $1;
+      $294 = ((($293)) + 72|0);
+      $295 = HEAP8[$294>>0]|0;
+      $296 = $295 & -2;
+      $297 = $296 | 1;
+      HEAP8[$294>>0] = $297;
+     }
+    }
+   }
+   if ((label|0) == 95) {
+    $285 = $1;
+    $286 = ((($285)) + 40|0);
+    HEAP32[$286>>2] = 4;
+   }
+   $298 = $c;
+   $299 = ($298|0)==(61);
+   if ($299) {
+    $300 = $1;
+    $301 = (_nextc($300)|0);
+    $c = $301;
+    $302 = ($301|0)==(62);
+    if ($302) {
+     $0 = 327;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    } else {
+     $303 = $1;
+     $304 = $c;
+     _pushback($303,$304);
+     $0 = 332;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    }
+   }
+   $305 = $c;
+   $306 = ($305|0)==(60);
+   $307 = $1;
+   if (!($306)) {
+    $318 = $c;
+    _pushback($307,$318);
+    $0 = 60;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   $308 = (_nextc($307)|0);
+   $c = $308;
+   $309 = ($308|0)==(61);
+   $310 = $1;
+   if ($309) {
+    $311 = (_intern_gen($310,64339,2)|0);
+    $312 = $1;
+    $313 = ((($312)) + 1132|0);
+    $314 = HEAP32[$313>>2]|0;
+    HEAP32[$314>>2] = $311;
+    $315 = $1;
+    $316 = ((($315)) + 40|0);
+    HEAP32[$316>>2] = 0;
+    $0 = 345;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   } else {
+    $317 = $c;
+    _pushback($310,$317);
+    $0 = 341;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   break;
+  }
+  case 107: {
+   $319 = $1;
+   $320 = ((($319)) + 40|0);
+   $321 = HEAP32[$320>>2]|0;
+   $322 = ($321|0)==(7);
+   if ($322) {
+    label = 109;
+   } else {
+    $323 = $1;
+    $324 = ((($323)) + 40|0);
+    $325 = HEAP32[$324>>2]|0;
+    $326 = ($325|0)==(8);
+    if ($326) {
+     label = 109;
+    } else {
+     $329 = $1;
+     $330 = ((($329)) + 40|0);
+     HEAP32[$330>>2] = 0;
+    }
+   }
+   if ((label|0) == 109) {
+    $327 = $1;
+    $328 = ((($327)) + 40|0);
+    HEAP32[$328>>2] = 4;
+   }
+   $331 = $1;
+   $332 = (_nextc($331)|0);
+   $c = $332;
+   $333 = ($332|0)==(61);
+   if ($333) {
+    $0 = 331;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   $334 = $c;
+   $335 = ($334|0)==(62);
+   $336 = $1;
+   if (!($335)) {
+    $347 = $c;
+    _pushback($336,$347);
+    $0 = 62;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   $337 = (_nextc($336)|0);
+   $c = $337;
+   $338 = ($337|0)==(61);
+   $339 = $1;
+   if ($338) {
+    $340 = (_intern_gen($339,57205,2)|0);
+    $341 = $1;
+    $342 = ((($341)) + 1132|0);
+    $343 = HEAP32[$342>>2]|0;
+    HEAP32[$343>>2] = $340;
+    $344 = $1;
+    $345 = ((($344)) + 40|0);
+    HEAP32[$345>>2] = 0;
+    $0 = 345;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   } else {
+    $346 = $c;
+    _pushback($339,$346);
+    $0 = 342;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   break;
+  }
+  case 118: {
+   $348 = $1;
+   $349 = (_new_strterm($348,3,34,0)|0);
+   $350 = $1;
+   $351 = ((($350)) + 44|0);
+   HEAP32[$351>>2] = $349;
+   $0 = 360;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 119: {
+   $352 = $1;
+   $353 = (_new_strterm($352,1,39,0)|0);
+   $354 = $1;
+   $355 = ((($354)) + 44|0);
+   HEAP32[$355>>2] = $353;
+   $356 = $1;
+   $357 = (_parse_string($356)|0);
+   $0 = $357;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 120: {
+   $358 = $1;
+   $359 = ((($358)) + 40|0);
+   $360 = HEAP32[$359>>2]|0;
+   $361 = ($360|0)==(7);
+   $362 = $1;
+   $363 = ((($362)) + 40|0);
+   if ($361) {
+    HEAP32[$363>>2] = 3;
+    $0 = 96;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   $364 = HEAP32[$363>>2]|0;
+   $365 = ($364|0)==(8);
+   if (!($365)) {
+    $370 = $1;
+    $371 = (_new_strterm($370,131,96,0)|0);
+    $372 = $1;
+    $373 = ((($372)) + 44|0);
+    HEAP32[$373>>2] = $371;
+    $0 = 361;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   $366 = $cmd_state;
+   $367 = ($366|0)!=(0);
+   $368 = $1;
+   $369 = ((($368)) + 40|0);
+   if ($367) {
+    HEAP32[$369>>2] = 5;
+   } else {
+    HEAP32[$369>>2] = 4;
+   }
+   $0 = 96;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 128: {
+   $374 = $1;
+   $375 = ((($374)) + 40|0);
+   $376 = HEAP32[$375>>2]|0;
+   $377 = ($376|0)==(1);
+   if (!($377)) {
+    $378 = $1;
+    $379 = ((($378)) + 40|0);
+    $380 = HEAP32[$379>>2]|0;
+    $381 = ($380|0)==(2);
+    if (!($381)) {
+     $382 = $1;
+     $383 = ((($382)) + 40|0);
+     $384 = HEAP32[$383>>2]|0;
+     $385 = ($384|0)==(3);
+     if (!($385)) {
+      $388 = $1;
+      $389 = (_nextc($388)|0);
+      $c = $389;
+      $390 = $c;
+      $391 = ($390|0)<(0);
+      if ($391) {
+       $392 = $1;
+       _yyerror($392,57208);
+       $0 = 0;
+       $2013 = $0;
+       STACKTOP = sp;return ($2013|0);
+      }
+      $393 = $c;
+      $394 = ($393|0)==(32);
+      do {
+       if ($394) {
+        label = 136;
+       } else {
+        $395 = $c;
+        $396 = (($395) - 9)|0;
+        $397 = ($396>>>0)<(5);
+        if ($397) {
+         label = 136;
+        } else {
+         $415 = $1;
+         (_newtok($415)|0);
+         $416 = $c;
+         $417 = (_isalnum($416)|0);
+         $418 = ($417|0)!=(0);
+         $419 = $c;
+         $420 = ($419|0)==(95);
+         $or$cond15 = $418 | $420;
+         if ($or$cond15) {
+          $421 = $1;
+          $422 = (_nextc($421)|0);
+          $c21 = $422;
+          $423 = $1;
+          $424 = $c21;
+          _pushback($423,$424);
+          $425 = $c21;
+          $426 = (_isalnum($425)|0);
+          $427 = ($426|0)!=(0);
+          $428 = $c21;
+          $429 = ($428|0)==(95);
+          $or$cond18 = $427 | $429;
+          if ($or$cond18) {
+           break;
+          }
+         }
+         $430 = $c;
+         $431 = ($430|0)==(92);
+         $432 = $1;
+         if ($431) {
+          $433 = (_read_escape($432)|0);
+          $c = $433;
+          $434 = $1;
+          $435 = $c;
+          _tokadd($434,$435);
+         } else {
+          $436 = $c;
+          _tokadd($432,$436);
+         }
+         $437 = $1;
+         _tokfix($437);
+         $438 = $1;
+         $439 = $1;
+         $440 = (_tok($439)|0);
+         $441 = $1;
+         $442 = (_toklen($441)|0);
+         $443 = (_new_str($438,$440,$442)|0);
+         $444 = $1;
+         $445 = ((($444)) + 1132|0);
+         $446 = HEAP32[$445>>2]|0;
+         HEAP32[$446>>2] = $443;
+         $447 = $1;
+         $448 = ((($447)) + 40|0);
+         HEAP32[$448>>2] = 1;
+         $0 = 315;
+         $2013 = $0;
+         STACKTOP = sp;return ($2013|0);
+        }
+       }
+      } while(0);
+      if ((label|0) == 136) {
+       $398 = $1;
+       $399 = ((($398)) + 40|0);
+       $400 = HEAP32[$399>>2]|0;
+       $401 = ($400|0)==(4);
+       if (!($401)) {
+        $402 = $1;
+        $403 = ((($402)) + 40|0);
+        $404 = HEAP32[$403>>2]|0;
+        $405 = ($404|0)==(5);
+        if (!($405)) {
+         $406 = $c;
+         switch ($406|0) {
+         case 32:  {
+          $c2 = 115;
+          break;
+         }
+         case 10:  {
+          $c2 = 110;
+          break;
+         }
+         case 9:  {
+          $c2 = 116;
+          break;
+         }
+         case 11:  {
+          $c2 = 118;
+          break;
+         }
+         case 13:  {
+          $c2 = 114;
+          break;
+         }
+         case 12:  {
+          $c2 = 102;
+          break;
+         }
+         default: {
+          $c2 = 0;
+         }
+         }
+         $407 = $c2;
+         $408 = ($407|0)!=(0);
+         if ($408) {
+          $409 = $c2;
+          HEAP32[$vararg_buffer>>2] = $409;
+          (_snprintf($buf,256,57236,$vararg_buffer)|0);
+          $410 = $1;
+          _yyerror($410,$buf);
+         }
+        }
+       }
+      }
+      $411 = $1;
+      $412 = $c;
+      _pushback($411,$412);
+      $413 = $1;
+      $414 = ((($413)) + 40|0);
+      HEAP32[$414>>2] = 10;
+      $0 = 63;
+      $2013 = $0;
+      STACKTOP = sp;return ($2013|0);
+     }
+    }
+   }
+   $386 = $1;
+   $387 = ((($386)) + 40|0);
+   HEAP32[$387>>2] = 10;
+   $0 = 63;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 155: {
+   $449 = $1;
+   $450 = (_nextc($449)|0);
+   $c = $450;
+   $451 = ($450|0)==(38);
+   if ($451) {
+    $452 = $1;
+    $453 = ((($452)) + 40|0);
+    HEAP32[$453>>2] = 0;
+    $454 = $1;
+    $455 = (_nextc($454)|0);
+    $c = $455;
+    $456 = ($455|0)==(61);
+    $457 = $1;
+    if ($456) {
+     $458 = (_intern_gen($457,57271,2)|0);
+     $459 = $1;
+     $460 = ((($459)) + 1132|0);
+     $461 = HEAP32[$460>>2]|0;
+     HEAP32[$461>>2] = $458;
+     $462 = $1;
+     $463 = ((($462)) + 40|0);
+     HEAP32[$463>>2] = 0;
+     $0 = 345;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    } else {
+     $464 = $c;
+     _pushback($457,$464);
+     $0 = 333;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    }
+   }
+   $465 = $c;
+   $466 = ($465|0)==(61);
+   $467 = $1;
+   if ($466) {
+    $468 = (_intern_gen_c($467,38)|0);
+    $469 = $1;
+    $470 = ((($469)) + 1132|0);
+    $471 = HEAP32[$470>>2]|0;
+    HEAP32[$471>>2] = $468;
+    $472 = $1;
+    $473 = ((($472)) + 40|0);
+    HEAP32[$473>>2] = 0;
+    $0 = 345;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   $474 = $c;
+   _pushback($467,$474);
+   $475 = $1;
+   $476 = ((($475)) + 40|0);
+   $477 = HEAP32[$476>>2]|0;
+   $478 = ($477|0)==(4);
+   if ($478) {
+    $$old19 = $space_seen;
+    $$old20 = ($$old19|0)==(0);
+    $$old22 = $c;
+    $$old23 = ($$old22|0)==(32);
+    $or$cond26 = $$old20 | $$old23;
+    if ($or$cond26) {
+     label = 166;
+    } else {
+     label = 164;
+    }
+   } else {
+    $479 = $1;
+    $480 = ((($479)) + 40|0);
+    $481 = HEAP32[$480>>2]|0;
+    $482 = ($481|0)==(5);
+    $483 = $space_seen;
+    $484 = ($483|0)!=(0);
+    $or$cond21 = $482 & $484;
+    $or$cond21$not = $or$cond21 ^ 1;
+    $485 = $c;
+    $486 = ($485|0)==(32);
+    $or$cond24 = $or$cond21$not | $486;
+    if ($or$cond24) {
+     label = 166;
+    } else {
+     label = 164;
+    }
+   }
+   if ((label|0) == 164) {
+    $487 = $c;
+    $488 = (($487) - 9)|0;
+    $489 = ($488>>>0)<(5);
+    if ($489) {
+     label = 166;
+    } else {
+     $490 = $1;
+     _yywarning($490,57274);
+     $c = 354;
+    }
+   }
+   do {
+    if ((label|0) == 166) {
+     $491 = $1;
+     $492 = ((($491)) + 40|0);
+     $493 = HEAP32[$492>>2]|0;
+     $494 = ($493|0)==(0);
+     if (!($494)) {
+      $495 = $1;
+      $496 = ((($495)) + 40|0);
+      $497 = HEAP32[$496>>2]|0;
+      $498 = ($497|0)==(6);
+      if (!($498)) {
+       $499 = $1;
+       $500 = ((($499)) + 40|0);
+       $501 = HEAP32[$500>>2]|0;
+       $502 = ($501|0)==(10);
+       if (!($502)) {
+        $503 = $1;
+        $504 = ((($503)) + 40|0);
+        $505 = HEAP32[$504>>2]|0;
+        $506 = ($505|0)==(9);
+        if (!($506)) {
+         $c = 38;
+         break;
+        }
+       }
+      }
+     }
+     $c = 354;
+    }
+   } while(0);
+   $507 = $1;
+   $508 = ((($507)) + 40|0);
+   $509 = HEAP32[$508>>2]|0;
+   $510 = ($509|0)==(7);
+   if ($510) {
+    label = 174;
+   } else {
+    $511 = $1;
+    $512 = ((($511)) + 40|0);
+    $513 = HEAP32[$512>>2]|0;
+    $514 = ($513|0)==(8);
+    if ($514) {
+     label = 174;
+    } else {
+     $517 = $1;
+     $518 = ((($517)) + 40|0);
+     HEAP32[$518>>2] = 0;
+    }
+   }
+   if ((label|0) == 174) {
+    $515 = $1;
+    $516 = ((($515)) + 40|0);
+    HEAP32[$516>>2] = 4;
+   }
+   $519 = $c;
+   $0 = $519;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 177: {
+   $520 = $1;
+   $521 = (_nextc($520)|0);
+   $c = $521;
+   $522 = ($521|0)==(124);
+   if ($522) {
+    $523 = $1;
+    $524 = ((($523)) + 40|0);
+    HEAP32[$524>>2] = 0;
+    $525 = $1;
+    $526 = (_nextc($525)|0);
+    $c = $526;
+    $527 = ($526|0)==(61);
+    $528 = $1;
+    if ($527) {
+     $529 = (_intern_gen($528,57309,2)|0);
+     $530 = $1;
+     $531 = ((($530)) + 1132|0);
+     $532 = HEAP32[$531>>2]|0;
+     HEAP32[$532>>2] = $529;
+     $533 = $1;
+     $534 = ((($533)) + 40|0);
+     HEAP32[$534>>2] = 0;
+     $0 = 345;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    } else {
+     $535 = $c;
+     _pushback($528,$535);
+     $0 = 334;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    }
+   }
+   $536 = $c;
+   $537 = ($536|0)==(61);
+   $538 = $1;
+   if ($537) {
+    $539 = (_intern_gen_c($538,124)|0);
+    $540 = $1;
+    $541 = ((($540)) + 1132|0);
+    $542 = HEAP32[$541>>2]|0;
+    HEAP32[$542>>2] = $539;
+    $543 = $1;
+    $544 = ((($543)) + 40|0);
+    HEAP32[$544>>2] = 0;
+    $0 = 345;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   $545 = ((($538)) + 40|0);
+   $546 = HEAP32[$545>>2]|0;
+   $547 = ($546|0)==(7);
+   if ($547) {
+    label = 185;
+   } else {
+    $548 = $1;
+    $549 = ((($548)) + 40|0);
+    $550 = HEAP32[$549>>2]|0;
+    $551 = ($550|0)==(8);
+    if ($551) {
+     label = 185;
+    } else {
+     $554 = $1;
+     $555 = ((($554)) + 40|0);
+     HEAP32[$555>>2] = 0;
+    }
+   }
+   if ((label|0) == 185) {
+    $552 = $1;
+    $553 = ((($552)) + 40|0);
+    HEAP32[$553>>2] = 4;
+   }
+   $556 = $1;
+   $557 = $c;
+   _pushback($556,$557);
+   $0 = 124;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 188: {
+   $558 = $1;
+   $559 = (_nextc($558)|0);
+   $c = $559;
+   $560 = $1;
+   $561 = ((($560)) + 40|0);
+   $562 = HEAP32[$561>>2]|0;
+   $563 = ($562|0)==(7);
+   if (!($563)) {
+    $564 = $1;
+    $565 = ((($564)) + 40|0);
+    $566 = HEAP32[$565>>2]|0;
+    $567 = ($566|0)==(8);
+    if (!($567)) {
+     $574 = $c;
+     $575 = ($574|0)==(61);
+     $576 = $1;
+     if ($575) {
+      $577 = (_intern_gen_c($576,43)|0);
+      $578 = $1;
+      $579 = ((($578)) + 1132|0);
+      $580 = HEAP32[$579>>2]|0;
+      HEAP32[$580>>2] = $577;
+      $581 = $1;
+      $582 = ((($581)) + 40|0);
+      HEAP32[$582>>2] = 0;
+      $0 = 345;
+      $2013 = $0;
+      STACKTOP = sp;return ($2013|0);
+     }
+     $583 = ((($576)) + 40|0);
+     $584 = HEAP32[$583>>2]|0;
+     $585 = ($584|0)==(0);
+     do {
+      if (!($585)) {
+       $586 = $1;
+       $587 = ((($586)) + 40|0);
+       $588 = HEAP32[$587>>2]|0;
+       $589 = ($588|0)==(6);
+       if (!($589)) {
+        $590 = $1;
+        $591 = ((($590)) + 40|0);
+        $592 = HEAP32[$591>>2]|0;
+        $593 = ($592|0)==(10);
+        if (!($593)) {
+         $594 = $1;
+         $595 = ((($594)) + 40|0);
+         $596 = HEAP32[$595>>2]|0;
+         $597 = ($596|0)==(9);
+         if (!($597)) {
+          $598 = $1;
+          $599 = ((($598)) + 40|0);
+          $600 = HEAP32[$599>>2]|0;
+          $601 = ($600|0)==(4);
+          if ($601) {
+           $$old27 = $space_seen;
+           $$old28 = ($$old27|0)==(0);
+           $$old30 = $c;
+           $$old31 = ($$old30|0)==(32);
+           $or$cond34 = $$old28 | $$old31;
+           if (!($or$cond34)) {
+            label = 202;
+           }
+          } else {
+           $602 = $1;
+           $603 = ((($602)) + 40|0);
+           $604 = HEAP32[$603>>2]|0;
+           $605 = ($604|0)==(5);
+           $606 = $space_seen;
+           $607 = ($606|0)!=(0);
+           $or$cond29 = $605 & $607;
+           $or$cond29$not = $or$cond29 ^ 1;
+           $608 = $c;
+           $609 = ($608|0)==(32);
+           $or$cond32 = $or$cond29$not | $609;
+           if (!($or$cond32)) {
+            label = 202;
+           }
+          }
+          if ((label|0) == 202) {
+           $610 = $c;
+           $611 = (($610) - 9)|0;
+           $612 = ($611>>>0)<(5);
+           if (!($612)) {
+            $613 = $1;
+            $614 = (_arg_ambiguous($613)|0);
+            $615 = ($614|0)!=(0);
+            if ($615) {
+             break;
+            }
+           }
+          }
+          $625 = $1;
+          $626 = ((($625)) + 40|0);
+          HEAP32[$626>>2] = 0;
+          $627 = $1;
+          $628 = $c;
+          _pushback($627,$628);
+          $0 = 43;
+          $2013 = $0;
+          STACKTOP = sp;return ($2013|0);
+         }
+        }
+       }
+      }
+     } while(0);
+     $616 = $1;
+     $617 = ((($616)) + 40|0);
+     HEAP32[$617>>2] = 0;
+     $618 = $1;
+     $619 = $c;
+     _pushback($618,$619);
+     $620 = $c;
+     $621 = ($620|0)>=(0);
+     if ($621) {
+      $622 = $c;
+      $623 = (($622) - 48)|0;
+      $624 = ($623>>>0)<(10);
+      if ($624) {
+       $c = 43;
+       label = 240;
+       break;
+      }
+     }
+     $0 = 324;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    }
+   }
+   $568 = $1;
+   $569 = ((($568)) + 40|0);
+   HEAP32[$569>>2] = 4;
+   $570 = $c;
+   $571 = ($570|0)==(64);
+   if ($571) {
+    $0 = 324;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   } else {
+    $572 = $1;
+    $573 = $c;
+    _pushback($572,$573);
+    $0 = 43;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   break;
+  }
+  case 209: {
+   $629 = $1;
+   $630 = (_nextc($629)|0);
+   $c = $630;
+   $631 = $1;
+   $632 = ((($631)) + 40|0);
+   $633 = HEAP32[$632>>2]|0;
+   $634 = ($633|0)==(7);
+   if (!($634)) {
+    $635 = $1;
+    $636 = ((($635)) + 40|0);
+    $637 = HEAP32[$636>>2]|0;
+    $638 = ($637|0)==(8);
+    if (!($638)) {
+     $645 = $c;
+     $646 = ($645|0)==(61);
+     if ($646) {
+      $647 = $1;
+      $648 = (_intern_gen_c($647,45)|0);
+      $649 = $1;
+      $650 = ((($649)) + 1132|0);
+      $651 = HEAP32[$650>>2]|0;
+      HEAP32[$651>>2] = $648;
+      $652 = $1;
+      $653 = ((($652)) + 40|0);
+      HEAP32[$653>>2] = 0;
+      $0 = 345;
+      $2013 = $0;
+      STACKTOP = sp;return ($2013|0);
+     }
+     $654 = $c;
+     $655 = ($654|0)==(62);
+     $656 = $1;
+     $657 = ((($656)) + 40|0);
+     if ($655) {
+      HEAP32[$657>>2] = 3;
+      $0 = 355;
+      $2013 = $0;
+      STACKTOP = sp;return ($2013|0);
+     }
+     $658 = HEAP32[$657>>2]|0;
+     $659 = ($658|0)==(0);
+     do {
+      if (!($659)) {
+       $660 = $1;
+       $661 = ((($660)) + 40|0);
+       $662 = HEAP32[$661>>2]|0;
+       $663 = ($662|0)==(6);
+       if (!($663)) {
+        $664 = $1;
+        $665 = ((($664)) + 40|0);
+        $666 = HEAP32[$665>>2]|0;
+        $667 = ($666|0)==(10);
+        if (!($667)) {
+         $668 = $1;
+         $669 = ((($668)) + 40|0);
+         $670 = HEAP32[$669>>2]|0;
+         $671 = ($670|0)==(9);
+         if (!($671)) {
+          $672 = $1;
+          $673 = ((($672)) + 40|0);
+          $674 = HEAP32[$673>>2]|0;
+          $675 = ($674|0)==(4);
+          if ($675) {
+           $$old35 = $space_seen;
+           $$old36 = ($$old35|0)==(0);
+           $$old38 = $c;
+           $$old39 = ($$old38|0)==(32);
+           $or$cond42 = $$old36 | $$old39;
+           if (!($or$cond42)) {
+            label = 225;
+           }
+          } else {
+           $676 = $1;
+           $677 = ((($676)) + 40|0);
+           $678 = HEAP32[$677>>2]|0;
+           $679 = ($678|0)==(5);
+           $680 = $space_seen;
+           $681 = ($680|0)!=(0);
+           $or$cond37 = $679 & $681;
+           $or$cond37$not = $or$cond37 ^ 1;
+           $682 = $c;
+           $683 = ($682|0)==(32);
+           $or$cond40 = $or$cond37$not | $683;
+           if (!($or$cond40)) {
+            label = 225;
+           }
+          }
+          if ((label|0) == 225) {
+           $684 = $c;
+           $685 = (($684) - 9)|0;
+           $686 = ($685>>>0)<(5);
+           if (!($686)) {
+            $687 = $1;
+            $688 = (_arg_ambiguous($687)|0);
+            $689 = ($688|0)!=(0);
+            if ($689) {
+             break;
+            }
+           }
+          }
+          $699 = $1;
+          $700 = ((($699)) + 40|0);
+          HEAP32[$700>>2] = 0;
+          $701 = $1;
+          $702 = $c;
+          _pushback($701,$702);
+          $0 = 45;
+          $2013 = $0;
+          STACKTOP = sp;return ($2013|0);
+         }
+        }
+       }
+      }
+     } while(0);
+     $690 = $1;
+     $691 = ((($690)) + 40|0);
+     HEAP32[$691>>2] = 0;
+     $692 = $1;
+     $693 = $c;
+     _pushback($692,$693);
+     $694 = $c;
+     $695 = ($694|0)>=(0);
+     if ($695) {
+      $696 = $c;
+      $697 = (($696) - 48)|0;
+      $698 = ($697>>>0)<(10);
+      if ($698) {
+       $0 = 371;
+       $2013 = $0;
+       STACKTOP = sp;return ($2013|0);
+      }
+     }
+     $0 = 325;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    }
+   }
+   $639 = $1;
+   $640 = ((($639)) + 40|0);
+   HEAP32[$640>>2] = 4;
+   $641 = $c;
+   $642 = ($641|0)==(64);
+   if ($642) {
+    $0 = 325;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   } else {
+    $643 = $1;
+    $644 = $c;
+    _pushback($643,$644);
+    $0 = 45;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   break;
+  }
+  case 232: {
+   $703 = $1;
+   $704 = ((($703)) + 40|0);
+   HEAP32[$704>>2] = 0;
+   $705 = $1;
+   $706 = (_nextc($705)|0);
+   $c = $706;
+   $707 = ($706|0)==(46);
+   $708 = $1;
+   if ($707) {
+    $709 = (_nextc($708)|0);
+    $c = $709;
+    $710 = ($709|0)==(46);
+    if ($710) {
+     $0 = 338;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    } else {
+     $711 = $1;
+     $712 = $c;
+     _pushback($711,$712);
+     $0 = 337;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    }
+   } else {
+    $713 = $c;
+    _pushback($708,$713);
+    $714 = $c;
+    $715 = ($714|0)>=(0);
+    if ($715) {
+     $716 = $c;
+     $717 = (($716) - 48)|0;
+     $718 = ($717>>>0)<(10);
+     if ($718) {
+      $719 = $1;
+      _yyerror($719,57369);
+     }
+    }
+    $720 = $1;
+    $721 = ((($720)) + 40|0);
+    HEAP32[$721>>2] = 8;
+    $0 = 46;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   break;
+  }
+  case 332: {
+   $1042 = $1;
+   $1043 = ((($1042)) + 56|0);
+   $1044 = HEAP32[$1043>>2]|0;
+   $1045 = (($1044) + -1)|0;
+   HEAP32[$1043>>2] = $1045;
+   label = 333;
+   break;
+  }
+  case 337: {
+   $1073 = $1;
+   $1074 = (_nextc($1073)|0);
+   $c = $1074;
+   $1075 = $c;
+   $1076 = ($1075|0)==(58);
+   $1077 = $1;
+   $1078 = ((($1077)) + 40|0);
+   $1079 = HEAP32[$1078>>2]|0;
+   if (!($1076)) {
+    $1111 = ($1079|0)==(1);
+    if (!($1111)) {
+     $1112 = $1;
+     $1113 = ((($1112)) + 40|0);
+     $1114 = HEAP32[$1113>>2]|0;
+     $1115 = ($1114|0)==(2);
+     if (!($1115)) {
+      $1116 = $1;
+      $1117 = ((($1116)) + 40|0);
+      $1118 = HEAP32[$1117>>2]|0;
+      $1119 = ($1118|0)==(3);
+      $1120 = $c;
+      $1121 = ($1120|0)==(32);
+      $or$cond93 = $1119 | $1121;
+      if (!($or$cond93)) {
+       $1122 = $c;
+       $1123 = (($1122) - 9)|0;
+       $1124 = ($1123>>>0)<(5);
+       if (!($1124)) {
+        $1129 = $1;
+        $1130 = $c;
+        _pushback($1129,$1130);
+        $1131 = $1;
+        $1132 = ((($1131)) + 40|0);
+        HEAP32[$1132>>2] = 7;
+        $0 = 356;
+        $2013 = $0;
+        STACKTOP = sp;return ($2013|0);
+       }
+      }
+     }
+    }
+    $1125 = $1;
+    $1126 = $c;
+    _pushback($1125,$1126);
+    $1127 = $1;
+    $1128 = ((($1127)) + 40|0);
+    HEAP32[$1128>>2] = 0;
+    $0 = 58;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   $1080 = ($1079|0)==(0);
+   do {
+    if (!($1080)) {
+     $1081 = $1;
+     $1082 = ((($1081)) + 40|0);
+     $1083 = HEAP32[$1082>>2]|0;
+     $1084 = ($1083|0)==(6);
+     if (!($1084)) {
+      $1085 = $1;
+      $1086 = ((($1085)) + 40|0);
+      $1087 = HEAP32[$1086>>2]|0;
+      $1088 = ($1087|0)==(10);
+      if (!($1088)) {
+       $1089 = $1;
+       $1090 = ((($1089)) + 40|0);
+       $1091 = HEAP32[$1090>>2]|0;
+       $1092 = ($1091|0)==(9);
+       if (!($1092)) {
+        $1093 = $1;
+        $1094 = ((($1093)) + 40|0);
+        $1095 = HEAP32[$1094>>2]|0;
+        $1096 = ($1095|0)==(9);
+        if (!($1096)) {
+         $1097 = $1;
+         $1098 = ((($1097)) + 40|0);
+         $1099 = HEAP32[$1098>>2]|0;
+         $1100 = ($1099|0)==(4);
+         if ($1100) {
+          $$old88 = $space_seen;
+          $$old89 = ($$old88|0)!=(0);
+          if ($$old89) {
+           break;
+          }
+         } else {
+          $1101 = $1;
+          $1102 = ((($1101)) + 40|0);
+          $1103 = HEAP32[$1102>>2]|0;
+          $1104 = ($1103|0)==(5);
+          $1105 = $space_seen;
+          $1106 = ($1105|0)!=(0);
+          $or$cond90 = $1104 & $1106;
+          if ($or$cond90) {
+           break;
+          }
+         }
+         $1109 = $1;
+         $1110 = ((($1109)) + 40|0);
+         HEAP32[$1110>>2] = 8;
+         $0 = 343;
+         $2013 = $0;
+         STACKTOP = sp;return ($2013|0);
+        }
+       }
+      }
+     }
+    }
+   } while(0);
+   $1107 = $1;
+   $1108 = ((($1107)) + 40|0);
+   HEAP32[$1108>>2] = 0;
+   $0 = 344;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 354: {
+   $1133 = $1;
+   $1134 = ((($1133)) + 40|0);
+   $1135 = HEAP32[$1134>>2]|0;
+   $1136 = ($1135|0)==(0);
+   if (!($1136)) {
+    $1137 = $1;
+    $1138 = ((($1137)) + 40|0);
+    $1139 = HEAP32[$1138>>2]|0;
+    $1140 = ($1139|0)==(6);
+    if (!($1140)) {
+     $1141 = $1;
+     $1142 = ((($1141)) + 40|0);
+     $1143 = HEAP32[$1142>>2]|0;
+     $1144 = ($1143|0)==(10);
+     if (!($1144)) {
+      $1145 = $1;
+      $1146 = ((($1145)) + 40|0);
+      $1147 = HEAP32[$1146>>2]|0;
+      $1148 = ($1147|0)==(9);
+      if (!($1148)) {
+       $1153 = $1;
+       $1154 = (_nextc($1153)|0);
+       $c = $1154;
+       $1155 = ($1154|0)==(61);
+       $1156 = $1;
+       if ($1155) {
+        $1157 = (_intern_gen_c($1156,47)|0);
+        $1158 = $1;
+        $1159 = ((($1158)) + 1132|0);
+        $1160 = HEAP32[$1159>>2]|0;
+        HEAP32[$1160>>2] = $1157;
+        $1161 = $1;
+        $1162 = ((($1161)) + 40|0);
+        HEAP32[$1162>>2] = 0;
+        $0 = 345;
+        $2013 = $0;
+        STACKTOP = sp;return ($2013|0);
+       }
+       $1163 = $c;
+       _pushback($1156,$1163);
+       $1164 = $1;
+       $1165 = ((($1164)) + 40|0);
+       $1166 = HEAP32[$1165>>2]|0;
+       $1167 = ($1166|0)==(4);
+       if ($1167) {
+        $$old94 = $space_seen;
+        $$old95 = ($$old94|0)==(0);
+        $$old97 = $c;
+        $$old98 = ($$old97|0)==(32);
+        $or$cond101 = $$old95 | $$old98;
+        if (!($or$cond101)) {
+         label = 364;
+        }
+       } else {
+        $1168 = $1;
+        $1169 = ((($1168)) + 40|0);
+        $1170 = HEAP32[$1169>>2]|0;
+        $1171 = ($1170|0)==(5);
+        $1172 = $space_seen;
+        $1173 = ($1172|0)!=(0);
+        $or$cond96 = $1171 & $1173;
+        $or$cond96$not = $or$cond96 ^ 1;
+        $1174 = $c;
+        $1175 = ($1174|0)==(32);
+        $or$cond99 = $or$cond96$not | $1175;
+        if (!($or$cond99)) {
+         label = 364;
+        }
+       }
+       if ((label|0) == 364) {
+        $1176 = $c;
+        $1177 = (($1176) - 9)|0;
+        $1178 = ($1177>>>0)<(5);
+        if (!($1178)) {
+         $1179 = $1;
+         $1180 = (_new_strterm($1179,7,47,0)|0);
+         $1181 = $1;
+         $1182 = ((($1181)) + 44|0);
+         HEAP32[$1182>>2] = $1180;
+         $0 = 357;
+         $2013 = $0;
+         STACKTOP = sp;return ($2013|0);
+        }
+       }
+       $1183 = $1;
+       $1184 = ((($1183)) + 40|0);
+       $1185 = HEAP32[$1184>>2]|0;
+       $1186 = ($1185|0)==(7);
+       if ($1186) {
+        label = 368;
+       } else {
+        $1187 = $1;
+        $1188 = ((($1187)) + 40|0);
+        $1189 = HEAP32[$1188>>2]|0;
+        $1190 = ($1189|0)==(8);
+        if ($1190) {
+         label = 368;
+        } else {
+         $1193 = $1;
+         $1194 = ((($1193)) + 40|0);
+         HEAP32[$1194>>2] = 0;
+        }
+       }
+       if ((label|0) == 368) {
+        $1191 = $1;
+        $1192 = ((($1191)) + 40|0);
+        HEAP32[$1192>>2] = 4;
+       }
+       $0 = 47;
+       $2013 = $0;
+       STACKTOP = sp;return ($2013|0);
+      }
+     }
+    }
+   }
+   $1149 = $1;
+   $1150 = (_new_strterm($1149,7,47,0)|0);
+   $1151 = $1;
+   $1152 = ((($1151)) + 44|0);
+   HEAP32[$1152>>2] = $1150;
+   $0 = 357;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 371: {
+   $1195 = $1;
+   $1196 = (_nextc($1195)|0);
+   $c = $1196;
+   $1197 = ($1196|0)==(61);
+   $1198 = $1;
+   if ($1197) {
+    $1199 = (_intern_gen_c($1198,94)|0);
+    $1200 = $1;
+    $1201 = ((($1200)) + 1132|0);
+    $1202 = HEAP32[$1201>>2]|0;
+    HEAP32[$1202>>2] = $1199;
+    $1203 = $1;
+    $1204 = ((($1203)) + 40|0);
+    HEAP32[$1204>>2] = 0;
+    $0 = 345;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   $1205 = ((($1198)) + 40|0);
+   $1206 = HEAP32[$1205>>2]|0;
+   $1207 = ($1206|0)==(7);
+   if ($1207) {
+    label = 375;
+   } else {
+    $1208 = $1;
+    $1209 = ((($1208)) + 40|0);
+    $1210 = HEAP32[$1209>>2]|0;
+    $1211 = ($1210|0)==(8);
+    if ($1211) {
+     label = 375;
+    } else {
+     $1214 = $1;
+     $1215 = ((($1214)) + 40|0);
+     HEAP32[$1215>>2] = 0;
+    }
+   }
+   if ((label|0) == 375) {
+    $1212 = $1;
+    $1213 = ((($1212)) + 40|0);
+    HEAP32[$1213>>2] = 4;
+   }
+   $1216 = $1;
+   $1217 = $c;
+   _pushback($1216,$1217);
+   $0 = 94;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 378: {
+   $1218 = $1;
+   $1219 = ((($1218)) + 40|0);
+   HEAP32[$1219>>2] = 0;
+   $0 = 59;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 379: {
+   $1220 = $1;
+   $1221 = ((($1220)) + 40|0);
+   HEAP32[$1221>>2] = 0;
+   $0 = 44;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 380: {
+   $1222 = $1;
+   $1223 = ((($1222)) + 40|0);
+   $1224 = HEAP32[$1223>>2]|0;
+   $1225 = ($1224|0)==(7);
+   if ($1225) {
+    label = 382;
+   } else {
+    $1226 = $1;
+    $1227 = ((($1226)) + 40|0);
+    $1228 = HEAP32[$1227>>2]|0;
+    $1229 = ($1228|0)==(8);
+    if ($1229) {
+     label = 382;
+    } else {
+     $1237 = $1;
+     $1238 = ((($1237)) + 40|0);
+     HEAP32[$1238>>2] = 0;
+    }
+   }
+   if ((label|0) == 382) {
+    $1230 = $1;
+    $1231 = (_nextc($1230)|0);
+    $c = $1231;
+    $1232 = ($1231|0)!=(64);
+    if ($1232) {
+     $1233 = $1;
+     $1234 = $c;
+     _pushback($1233,$1234);
+    }
+    $1235 = $1;
+    $1236 = ((($1235)) + 40|0);
+    HEAP32[$1236>>2] = 4;
+   }
+   $0 = 126;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 387: {
+   $1239 = $1;
+   $1240 = ((($1239)) + 40|0);
+   $1241 = HEAP32[$1240>>2]|0;
+   $1242 = ($1241|0)==(0);
+   do {
+    if ($1242) {
+     label = 391;
+    } else {
+     $1243 = $1;
+     $1244 = ((($1243)) + 40|0);
+     $1245 = HEAP32[$1244>>2]|0;
+     $1246 = ($1245|0)==(6);
+     if ($1246) {
+      label = 391;
+     } else {
+      $1247 = $1;
+      $1248 = ((($1247)) + 40|0);
+      $1249 = HEAP32[$1248>>2]|0;
+      $1250 = ($1249|0)==(10);
+      if ($1250) {
+       label = 391;
+      } else {
+       $1251 = $1;
+       $1252 = ((($1251)) + 40|0);
+       $1253 = HEAP32[$1252>>2]|0;
+       $1254 = ($1253|0)==(9);
+       if ($1254) {
+        label = 391;
+       } else {
+        $1255 = $1;
+        $1256 = ((($1255)) + 40|0);
+        $1257 = HEAP32[$1256>>2]|0;
+        $1258 = ($1257|0)==(4);
+        if ($1258) {
+         $$old102 = $space_seen;
+         $$old103 = ($$old102|0)!=(0);
+         if (!($$old103)) {
+          break;
+         }
+        } else {
+         $1259 = $1;
+         $1260 = ((($1259)) + 40|0);
+         $1261 = HEAP32[$1260>>2]|0;
+         $1262 = ($1261|0)==(5);
+         $1263 = $space_seen;
+         $1264 = ($1263|0)!=(0);
+         $or$cond104 = $1262 & $1264;
+         if (!($or$cond104)) {
+          break;
+         }
+        }
+        $c = 348;
+       }
+      }
+     }
+    }
+   } while(0);
+   if ((label|0) == 391) {
+    $c = 347;
+   }
+   $1265 = $1;
+   $1266 = ((($1265)) + 56|0);
+   $1267 = HEAP32[$1266>>2]|0;
+   $1268 = (($1267) + 1)|0;
+   HEAP32[$1266>>2] = $1268;
+   $1269 = $1;
+   $1270 = ((($1269)) + 48|0);
+   $1271 = HEAP32[$1270>>2]|0;
+   $1272 = $1271 << 1;
+   $1273 = $1;
+   $1274 = ((($1273)) + 48|0);
+   HEAP32[$1274>>2] = $1272;
+   $1275 = $1;
+   $1276 = ((($1275)) + 52|0);
+   $1277 = HEAP32[$1276>>2]|0;
+   $1278 = $1277 << 1;
+   $1279 = $1;
+   $1280 = ((($1279)) + 52|0);
+   HEAP32[$1280>>2] = $1278;
+   $1281 = $1;
+   $1282 = ((($1281)) + 40|0);
+   HEAP32[$1282>>2] = 0;
+   $1283 = $c;
+   $0 = $1283;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 397: {
+   $1284 = $1;
+   $1285 = ((($1284)) + 56|0);
+   $1286 = HEAP32[$1285>>2]|0;
+   $1287 = (($1286) + 1)|0;
+   HEAP32[$1285>>2] = $1287;
+   $1288 = $1;
+   $1289 = ((($1288)) + 40|0);
+   $1290 = HEAP32[$1289>>2]|0;
+   $1291 = ($1290|0)==(7);
+   if (!($1291)) {
+    $1292 = $1;
+    $1293 = ((($1292)) + 40|0);
+    $1294 = HEAP32[$1293>>2]|0;
+    $1295 = ($1294|0)==(8);
+    if (!($1295)) {
+     $1307 = $1;
+     $1308 = ((($1307)) + 40|0);
+     $1309 = HEAP32[$1308>>2]|0;
+     $1310 = ($1309|0)==(0);
+     do {
+      if ($1310) {
+       label = 408;
+      } else {
+       $1311 = $1;
+       $1312 = ((($1311)) + 40|0);
+       $1313 = HEAP32[$1312>>2]|0;
+       $1314 = ($1313|0)==(6);
+       if ($1314) {
+        label = 408;
+       } else {
+        $1315 = $1;
+        $1316 = ((($1315)) + 40|0);
+        $1317 = HEAP32[$1316>>2]|0;
+        $1318 = ($1317|0)==(10);
+        if ($1318) {
+         label = 408;
+        } else {
+         $1319 = $1;
+         $1320 = ((($1319)) + 40|0);
+         $1321 = HEAP32[$1320>>2]|0;
+         $1322 = ($1321|0)==(9);
+         if ($1322) {
+          label = 408;
+         } else {
+          $1323 = $1;
+          $1324 = ((($1323)) + 40|0);
+          $1325 = HEAP32[$1324>>2]|0;
+          $1326 = ($1325|0)==(4);
+          if ($1326) {
+           $$old105 = $space_seen;
+           $$old106 = ($$old105|0)!=(0);
+           if (!($$old106)) {
+            break;
+           }
+          } else {
+           $1327 = $1;
+           $1328 = ((($1327)) + 40|0);
+           $1329 = HEAP32[$1328>>2]|0;
+           $1330 = ($1329|0)==(5);
+           $1331 = $space_seen;
+           $1332 = ($1331|0)!=(0);
+           $or$cond107 = $1330 & $1332;
+           if (!($or$cond107)) {
+            break;
+           }
+          }
+          $c = 350;
+         }
+        }
+       }
+      }
+     } while(0);
+     if ((label|0) == 408) {
+      $c = 350;
+     }
+     $1333 = $1;
+     $1334 = ((($1333)) + 40|0);
+     HEAP32[$1334>>2] = 0;
+     $1335 = $1;
+     $1336 = ((($1335)) + 48|0);
+     $1337 = HEAP32[$1336>>2]|0;
+     $1338 = $1337 << 1;
+     $1339 = $1;
+     $1340 = ((($1339)) + 48|0);
+     HEAP32[$1340>>2] = $1338;
+     $1341 = $1;
+     $1342 = ((($1341)) + 52|0);
+     $1343 = HEAP32[$1342>>2]|0;
+     $1344 = $1343 << 1;
+     $1345 = $1;
+     $1346 = ((($1345)) + 52|0);
+     HEAP32[$1346>>2] = $1344;
+     $1347 = $c;
+     $0 = $1347;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    }
+   }
+   $1296 = $1;
+   $1297 = ((($1296)) + 40|0);
+   HEAP32[$1297>>2] = 4;
+   $1298 = $1;
+   $1299 = (_nextc($1298)|0);
+   $c = $1299;
+   $1300 = ($1299|0)==(93);
+   $1301 = $1;
+   if (!($1300)) {
+    $1306 = $c;
+    _pushback($1301,$1306);
+    $0 = 91;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   $1302 = (_nextc($1301)|0);
+   $c = $1302;
+   $1303 = ($1302|0)==(61);
+   if ($1303) {
+    $0 = 340;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   } else {
+    $1304 = $1;
+    $1305 = $c;
+    _pushback($1304,$1305);
+    $0 = 339;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   break;
+  }
+  case 414: {
+   $1348 = $1;
+   $1349 = ((($1348)) + 60|0);
+   $1350 = HEAP32[$1349>>2]|0;
+   $1351 = ($1350|0)!=(0);
+   if ($1351) {
+    $1352 = $1;
+    $1353 = ((($1352)) + 60|0);
+    $1354 = HEAP32[$1353>>2]|0;
+    $1355 = $1;
+    $1356 = ((($1355)) + 56|0);
+    $1357 = HEAP32[$1356>>2]|0;
+    $1358 = ($1354|0)==($1357|0);
+    if ($1358) {
+     $1359 = $1;
+     $1360 = ((($1359)) + 40|0);
+     HEAP32[$1360>>2] = 0;
+     $1361 = $1;
+     $1362 = ((($1361)) + 60|0);
+     HEAP32[$1362>>2] = 0;
+     $1363 = $1;
+     $1364 = ((($1363)) + 56|0);
+     $1365 = HEAP32[$1364>>2]|0;
+     $1366 = (($1365) + -1)|0;
+     HEAP32[$1364>>2] = $1366;
+     $1367 = $1;
+     $1368 = ((($1367)) + 48|0);
+     $1369 = HEAP32[$1368>>2]|0;
+     $1370 = $1369 << 1;
+     $1371 = $1;
+     $1372 = ((($1371)) + 48|0);
+     HEAP32[$1372>>2] = $1370;
+     $1373 = $1;
+     $1374 = ((($1373)) + 52|0);
+     $1375 = HEAP32[$1374>>2]|0;
+     $1376 = $1375 << 1;
+     $1377 = $1;
+     $1378 = ((($1377)) + 52|0);
+     HEAP32[$1378>>2] = $1376;
+     $0 = 363;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    }
+   }
+   $1379 = $1;
+   $1380 = ((($1379)) + 40|0);
+   $1381 = HEAP32[$1380>>2]|0;
+   $1382 = ($1381|0)==(4);
+   do {
+    if ($1382) {
+     label = 421;
+    } else {
+     $1383 = $1;
+     $1384 = ((($1383)) + 40|0);
+     $1385 = HEAP32[$1384>>2]|0;
+     $1386 = ($1385|0)==(5);
+     if ($1386) {
+      label = 421;
+     } else {
+      $1387 = $1;
+      $1388 = ((($1387)) + 40|0);
+      $1389 = HEAP32[$1388>>2]|0;
+      $1390 = ($1389|0)==(1);
+      if ($1390) {
+       label = 421;
+      } else {
+       $1391 = $1;
+       $1392 = ((($1391)) + 40|0);
+       $1393 = HEAP32[$1392>>2]|0;
+       $1394 = ($1393|0)==(3);
+       if ($1394) {
+        label = 421;
+       } else {
+        $1395 = $1;
+        $1396 = ((($1395)) + 40|0);
+        $1397 = HEAP32[$1396>>2]|0;
+        $1398 = ($1397|0)==(2);
+        if ($1398) {
+         $c = 352;
+         break;
+        } else {
+         $c = 351;
+         break;
+        }
+       }
+      }
+     }
+    }
+   } while(0);
+   if ((label|0) == 421) {
+    $c = 123;
+   }
+   $1399 = $1;
+   $1400 = ((($1399)) + 48|0);
+   $1401 = HEAP32[$1400>>2]|0;
+   $1402 = $1401 << 1;
+   $1403 = $1;
+   $1404 = ((($1403)) + 48|0);
+   HEAP32[$1404>>2] = $1402;
+   $1405 = $1;
+   $1406 = ((($1405)) + 52|0);
+   $1407 = HEAP32[$1406>>2]|0;
+   $1408 = $1407 << 1;
+   $1409 = $1;
+   $1410 = ((($1409)) + 52|0);
+   HEAP32[$1410>>2] = $1408;
+   $1411 = $1;
+   $1412 = ((($1411)) + 40|0);
+   HEAP32[$1412>>2] = 0;
+   $1413 = $c;
+   $0 = $1413;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 428: {
+   $1424 = $c;
+   _pushback($1418,$1424);
+   $0 = 92;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 429: {
+   $1425 = $1;
+   $1426 = ((($1425)) + 40|0);
+   $1427 = HEAP32[$1426>>2]|0;
+   $1428 = ($1427|0)==(0);
+   do {
+    if ($1428) {
+     label = 433;
+    } else {
+     $1429 = $1;
+     $1430 = ((($1429)) + 40|0);
+     $1431 = HEAP32[$1430>>2]|0;
+     $1432 = ($1431|0)==(6);
+     if ($1432) {
+      label = 433;
+     } else {
+      $1433 = $1;
+      $1434 = ((($1433)) + 40|0);
+      $1435 = HEAP32[$1434>>2]|0;
+      $1436 = ($1435|0)==(10);
+      if ($1436) {
+       label = 433;
+      } else {
+       $1437 = $1;
+       $1438 = ((($1437)) + 40|0);
+       $1439 = HEAP32[$1438>>2]|0;
+       $1440 = ($1439|0)==(9);
+       if ($1440) {
+        label = 433;
+       } else {
+        $1531 = $1;
+        $1532 = (_nextc($1531)|0);
+        $c = $1532;
+        $1533 = ($1532|0)==(61);
+        $1534 = $1;
+        if ($1533) {
+         $1535 = (_intern_gen_c($1534,37)|0);
+         $1536 = $1;
+         $1537 = ((($1536)) + 1132|0);
+         $1538 = HEAP32[$1537>>2]|0;
+         HEAP32[$1538>>2] = $1535;
+         $1539 = $1;
+         $1540 = ((($1539)) + 40|0);
+         HEAP32[$1540>>2] = 0;
+         $0 = 345;
+         $2013 = $0;
+         STACKTOP = sp;return ($2013|0);
+        }
+        $1541 = ((($1534)) + 40|0);
+        $1542 = HEAP32[$1541>>2]|0;
+        $1543 = ($1542|0)==(4);
+        if ($1543) {
+         $$old111 = $space_seen;
+         $$old112 = ($$old111|0)==(0);
+         $$old114 = $c;
+         $$old115 = ($$old114|0)==(32);
+         $or$cond118 = $$old112 | $$old115;
+         if (!($or$cond118)) {
+          label = 467;
+         }
+        } else {
+         $1544 = $1;
+         $1545 = ((($1544)) + 40|0);
+         $1546 = HEAP32[$1545>>2]|0;
+         $1547 = ($1546|0)==(5);
+         $1548 = $space_seen;
+         $1549 = ($1548|0)!=(0);
+         $or$cond113 = $1547 & $1549;
+         $or$cond113$not = $or$cond113 ^ 1;
+         $1550 = $c;
+         $1551 = ($1550|0)==(32);
+         $or$cond116 = $or$cond113$not | $1551;
+         if (!($or$cond116)) {
+          label = 467;
+         }
+        }
+        if ((label|0) == 467) {
+         $1552 = $c;
+         $1553 = (($1552) - 9)|0;
+         $1554 = ($1553>>>0)<(5);
+         if (!($1554)) {
+          break;
+         }
+        }
+        $1555 = $1;
+        $1556 = ((($1555)) + 40|0);
+        $1557 = HEAP32[$1556>>2]|0;
+        $1558 = ($1557|0)==(7);
+        if ($1558) {
+         label = 470;
+        } else {
+         $1559 = $1;
+         $1560 = ((($1559)) + 40|0);
+         $1561 = HEAP32[$1560>>2]|0;
+         $1562 = ($1561|0)==(8);
+         if ($1562) {
+          label = 470;
+         } else {
+          $1565 = $1;
+          $1566 = ((($1565)) + 40|0);
+          HEAP32[$1566>>2] = 0;
+         }
+        }
+        if ((label|0) == 470) {
+         $1563 = $1;
+         $1564 = ((($1563)) + 40|0);
+         HEAP32[$1564>>2] = 4;
+        }
+        $1567 = $1;
+        $1568 = $c;
+        _pushback($1567,$1568);
+        $0 = 37;
+        $2013 = $0;
+        STACKTOP = sp;return ($2013|0);
+       }
+      }
+     }
+    }
+   } while(0);
+   if ((label|0) == 433) {
+    $1441 = $1;
+    $1442 = (_nextc($1441)|0);
+    $c = $1442;
+   }
+   $1443 = $c;
+   $1444 = ($1443|0)<(0);
+   do {
+    if ($1444) {
+     label = 437;
+    } else {
+     $1445 = $c;
+     $1446 = $1445 | 32;
+     $1447 = (($1446) - 97)|0;
+     $1448 = ($1447>>>0)<(26);
+     if (!($1448)) {
+      $1449 = $c;
+      $1450 = (($1449) - 48)|0;
+      $1451 = ($1450>>>0)<(10);
+      if (!($1451)) {
+       label = 437;
+       break;
+      }
+     }
+     $1453 = $1;
+     $1454 = (_nextc($1453)|0);
+     $term = $1454;
+     $1455 = $term;
+     $1456 = (_isalnum($1455)|0);
+     $1457 = ($1456|0)!=(0);
+     if ($1457) {
+      $1458 = $1;
+      _yyerror($1458,57548);
+      $0 = 0;
+      $2013 = $0;
+      STACKTOP = sp;return ($2013|0);
+     }
+    }
+   } while(0);
+   if ((label|0) == 437) {
+    $1452 = $c;
+    $term = $1452;
+    $c = 81;
+   }
+   $1459 = $c;
+   $1460 = ($1459|0)<(0);
+   $1461 = $term;
+   $1462 = ($1461|0)<(0);
+   $or$cond110 = $1460 | $1462;
+   if ($or$cond110) {
+    $1463 = $1;
+    _yyerror($1463,57572);
+    $0 = 0;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   $1464 = $term;
+   $paren = $1464;
+   $1465 = $term;
+   $1466 = ($1465|0)==(40);
+   do {
+    if ($1466) {
+     $term = 41;
+    } else {
+     $1467 = $term;
+     $1468 = ($1467|0)==(91);
+     if ($1468) {
+      $term = 93;
+      break;
+     }
+     $1469 = $term;
+     $1470 = ($1469|0)==(123);
+     if ($1470) {
+      $term = 125;
+      break;
+     }
+     $1471 = $term;
+     $1472 = ($1471|0)==(60);
+     if ($1472) {
+      $term = 62;
+      break;
+     } else {
+      $paren = 0;
+      break;
+     }
+    }
+   } while(0);
+   $1473 = $c;
+   do {
+    switch ($1473|0) {
+    case 81:  {
+     $1474 = $1;
+     $1475 = $term;
+     $1476 = $paren;
+     $1477 = (_new_strterm($1474,3,$1475,$1476)|0);
+     $1478 = $1;
+     $1479 = ((($1478)) + 44|0);
+     HEAP32[$1479>>2] = $1477;
+     $0 = 360;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+     break;
+    }
+    case 113:  {
+     $1480 = $1;
+     $1481 = $term;
+     $1482 = $paren;
+     $1483 = (_new_strterm($1480,1,$1481,$1482)|0);
+     $1484 = $1;
+     $1485 = ((($1484)) + 44|0);
+     HEAP32[$1485>>2] = $1483;
+     $1486 = $1;
+     $1487 = (_parse_string($1486)|0);
+     $0 = $1487;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+     break;
+    }
+    case 87:  {
+     $1488 = $1;
+     $1489 = $term;
+     $1490 = $paren;
+     $1491 = (_new_strterm($1488,43,$1489,$1490)|0);
+     $1492 = $1;
+     $1493 = ((($1492)) + 44|0);
+     HEAP32[$1493>>2] = $1491;
+     $0 = 358;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+     break;
+    }
+    case 119:  {
+     $1494 = $1;
+     $1495 = $term;
+     $1496 = $paren;
+     $1497 = (_new_strterm($1494,41,$1495,$1496)|0);
+     $1498 = $1;
+     $1499 = ((($1498)) + 44|0);
+     HEAP32[$1499>>2] = $1497;
+     $0 = 358;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+     break;
+    }
+    case 120:  {
+     $1500 = $1;
+     $1501 = $term;
+     $1502 = $paren;
+     $1503 = (_new_strterm($1500,131,$1501,$1502)|0);
+     $1504 = $1;
+     $1505 = ((($1504)) + 44|0);
+     HEAP32[$1505>>2] = $1503;
+     $0 = 361;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+     break;
+    }
+    case 114:  {
+     $1506 = $1;
+     $1507 = $term;
+     $1508 = $paren;
+     $1509 = (_new_strterm($1506,7,$1507,$1508)|0);
+     $1510 = $1;
+     $1511 = ((($1510)) + 44|0);
+     HEAP32[$1511>>2] = $1509;
+     $0 = 357;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+     break;
+    }
+    case 115:  {
+     $1512 = $1;
+     $1513 = $term;
+     $1514 = $paren;
+     $1515 = (_new_strterm($1512,17,$1513,$1514)|0);
+     $1516 = $1;
+     $1517 = ((($1516)) + 44|0);
+     HEAP32[$1517>>2] = $1515;
+     $0 = 356;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+     break;
+    }
+    case 73:  {
+     $1518 = $1;
+     $1519 = $term;
+     $1520 = $paren;
+     $1521 = (_new_strterm($1518,51,$1519,$1520)|0);
+     $1522 = $1;
+     $1523 = ((($1522)) + 44|0);
+     HEAP32[$1523>>2] = $1521;
+     $0 = 359;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+     break;
+    }
+    case 105:  {
+     $1524 = $1;
+     $1525 = $term;
+     $1526 = $paren;
+     $1527 = (_new_strterm($1524,49,$1525,$1526)|0);
+     $1528 = $1;
+     $1529 = ((($1528)) + 44|0);
+     HEAP32[$1529>>2] = $1527;
+     $0 = 359;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+     break;
+    }
+    default: {
+     $1530 = $1;
+     _yyerror($1530,57548);
+     $0 = 0;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    }
+    }
+   } while(0);
+   break;
+  }
+  case 473: {
+   $1569 = $1;
+   $1570 = ((($1569)) + 40|0);
+   HEAP32[$1570>>2] = 1;
+   $1571 = $1;
+   $1572 = (_newtok($1571)|0);
+   $token_column = $1572;
+   $1573 = $1;
+   $1574 = (_nextc($1573)|0);
+   $c = $1574;
+   $1575 = $c;
+   $1576 = ($1575|0)<(0);
+   if ($1576) {
+    $1577 = $1;
+    _yyerror($1577,57617);
+    $0 = 0;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   $1578 = $c;
+   L572: do {
+    switch ($1578|0) {
+    case 95:  {
+     $1579 = $1;
+     $1580 = (_nextc($1579)|0);
+     $c = $1580;
+     $1581 = $c;
+     $1582 = ($1581|0)>=(0);
+     do {
+      if ($1582) {
+       $1583 = $c;
+       $1584 = $1583 | 32;
+       $1585 = (($1584) - 97)|0;
+       $1586 = ($1585>>>0)<(26);
+       if (!($1586)) {
+        $1587 = $c;
+        $1588 = (($1587) - 48)|0;
+        $1589 = ($1588>>>0)<(10);
+        $1590 = $c;
+        $1591 = ($1590|0)==(95);
+        $or$cond121 = $1589 | $1591;
+        $or$cond121$not = $or$cond121 ^ 1;
+        $1592 = $c;
+        $1593 = ($1592>>>0)<=(127);
+        $or$cond124 = $or$cond121$not & $1593;
+        if ($or$cond124) {
+         break;
+        }
+       }
+       $1594 = $1;
+       _tokadd($1594,36);
+       $1595 = $1;
+       $1596 = $c;
+       _tokadd($1595,$1596);
+       label = 517;
+       break L47;
+      }
+     } while(0);
+     $1597 = $1;
+     $1598 = $c;
+     _pushback($1597,$1598);
+     $c = 95;
+     label = 481;
+     break;
+    }
+    case 34: case 62: case 60: case 58: case 61: case 46: case 44: case 59: case 92: case 47: case 64: case 33: case 63: case 36: case 42: case 126:  {
+     label = 481;
+     break;
+    }
+    case 45:  {
+     $1610 = $1;
+     _tokadd($1610,36);
+     $1611 = $1;
+     $1612 = $c;
+     _tokadd($1611,$1612);
+     $1613 = $1;
+     $1614 = (_nextc($1613)|0);
+     $c = $1614;
+     $1615 = $1;
+     $1616 = $c;
+     _pushback($1615,$1616);
+     label = 483;
+     break;
+    }
+    case 43: case 39: case 96: case 38:  {
+     $1625 = $last_state;
+     $1626 = ($1625|0)==(7);
+     $1627 = $1;
+     if ($1626) {
+      _tokadd($1627,36);
+      $1628 = $1;
+      $1629 = $c;
+      _tokadd($1628,$1629);
+      label = 483;
+      break L572;
+     }
+     $1630 = $c;
+     $1631 = (_new_back_ref($1627,$1630)|0);
+     $1632 = $1;
+     $1633 = ((($1632)) + 1132|0);
+     $1634 = HEAP32[$1633>>2]|0;
+     HEAP32[$1634>>2] = $1631;
+     $0 = 322;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+     break;
+    }
+    case 57: case 56: case 55: case 54: case 53: case 52: case 51: case 50: case 49:  {
+     while(1) {
+      $1635 = $1;
+      $1636 = $c;
+      _tokadd($1635,$1636);
+      $1637 = $1;
+      $1638 = (_nextc($1637)|0);
+      $c = $1638;
+      $1639 = $c;
+      $1640 = ($1639|0)>=(0);
+      if (!($1640)) {
+       break;
+      }
+      $1641 = $c;
+      $1642 = (_isdigit($1641)|0);
+      $1643 = ($1642|0)!=(0);
+      if (!($1643)) {
+       break;
+      }
+     }
+     $1644 = $1;
+     $1645 = $c;
+     _pushback($1644,$1645);
+     $1646 = $last_state;
+     $1647 = ($1646|0)==(7);
+     if ($1647) {
+      label = 483;
+     } else {
+      $1648 = $1;
+      _tokfix($1648);
+      $1649 = $1;
+      $1650 = (_tok($1649)|0);
+      $1651 = (_strtoul($1650,0,10)|0);
+      $n = $1651;
+      $1652 = $n;
+      $1653 = ($1652>>>0)>(2147483647);
+      $1654 = $1;
+      if ($1653) {
+       _yyerror_i($1654,57651,2147483647);
+       $0 = 0;
+       $2013 = $0;
+       STACKTOP = sp;return ($2013|0);
+      } else {
+       $1655 = $n;
+       $1656 = (_new_nth_ref($1654,$1655)|0);
+       $1657 = $1;
+       $1658 = ((($1657)) + 1132|0);
+       $1659 = HEAP32[$1658>>2]|0;
+       HEAP32[$1659>>2] = $1656;
+       $0 = 321;
+       $2013 = $0;
+       STACKTOP = sp;return ($2013|0);
+      }
+     }
+     break;
+    }
+    case 48:  {
+     label = 496;
+     break;
+    }
+    default: {
+     $1660 = $c;
+     $1661 = $1660 | 32;
+     $1662 = (($1661) - 97)|0;
+     $1663 = ($1662>>>0)<(26);
+     if ($1663) {
+      label = 496;
+     } else {
+      $1664 = $c;
+      $1665 = (($1664) - 48)|0;
+      $1666 = ($1665>>>0)<(10);
+      $1667 = $c;
+      $1668 = ($1667|0)==(95);
+      $or$cond127 = $1666 | $1668;
+      $or$cond127$not = $or$cond127 ^ 1;
+      $1669 = $c;
+      $1670 = ($1669>>>0)<=(127);
+      $or$cond130 = $or$cond127$not & $1670;
+      if ($or$cond130) {
+       $1671 = $1;
+       $1672 = $c;
+       _pushback($1671,$1672);
+       $0 = 36;
+       $2013 = $0;
+       STACKTOP = sp;return ($2013|0);
+      } else {
+       label = 496;
+      }
+     }
+    }
+    }
+   } while(0);
+   if ((label|0) == 481) {
+    $1599 = $1;
+    _tokadd($1599,36);
+    $1600 = $1;
+    $1601 = $c;
+    _tokadd($1600,$1601);
+    $1602 = $1;
+    _tokfix($1602);
+    $1603 = $1;
+    $1604 = $1;
+    $1605 = (_tok($1604)|0);
+    $1606 = (_intern_cstr_gen($1603,$1605)|0);
+    $1607 = $1;
+    $1608 = ((($1607)) + 1132|0);
+    $1609 = HEAP32[$1608>>2]|0;
+    HEAP32[$1609>>2] = $1606;
+    $0 = 308;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   else if ((label|0) == 483) {
+    $1617 = $1;
+    _tokfix($1617);
+    $1618 = $1;
+    $1619 = $1;
+    $1620 = (_tok($1619)|0);
+    $1621 = (_intern_cstr_gen($1618,$1620)|0);
+    $1622 = $1;
+    $1623 = ((($1622)) + 1132|0);
+    $1624 = HEAP32[$1623>>2]|0;
+    HEAP32[$1624>>2] = $1621;
+    $0 = 308;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   else if ((label|0) == 496) {
+    $1673 = $1;
+    _tokadd($1673,36);
+    label = 517;
+    break;
+   }
+   break;
+  }
+  case 497: {
+   $1674 = $1;
+   $1675 = (_nextc($1674)|0);
+   $c = $1675;
+   $1676 = $1;
+   $1677 = (_newtok($1676)|0);
+   $token_column = $1677;
+   $1678 = $1;
+   _tokadd($1678,64);
+   $1679 = $c;
+   $1680 = ($1679|0)==(64);
+   if ($1680) {
+    $1681 = $1;
+    _tokadd($1681,64);
+    $1682 = $1;
+    $1683 = (_nextc($1682)|0);
+    $c = $1683;
+   }
+   $1684 = $c;
+   $1685 = ($1684|0)<(0);
+   if ($1685) {
+    $1686 = $1;
+    $1687 = ((($1686)) + 1108|0);
+    $1688 = HEAP32[$1687>>2]|0;
+    $1689 = ($1688|0)==(1);
+    $1690 = $1;
+    if ($1689) {
+     _yyerror($1690,57685);
+    } else {
+     _yyerror($1690,57721);
+    }
+    $0 = 0;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   $1691 = $c;
+   $1692 = (_isdigit($1691)|0);
+   $1693 = ($1692|0)!=(0);
+   if (!($1693)) {
+    $1700 = $c;
+    $1701 = $1700 | 32;
+    $1702 = (($1701) - 97)|0;
+    $1703 = ($1702>>>0)<(26);
+    if ($1703) {
+     label = 517;
+     break;
+    }
+    $1704 = $c;
+    $1705 = (($1704) - 48)|0;
+    $1706 = ($1705>>>0)<(10);
+    $1707 = $c;
+    $1708 = ($1707|0)==(95);
+    $or$cond133 = $1706 | $1708;
+    $or$cond133$not = $or$cond133 ^ 1;
+    $1709 = $c;
+    $1710 = ($1709>>>0)<=(127);
+    $or$cond136 = $or$cond133$not & $1710;
+    if (!($or$cond136)) {
+     label = 517;
+     break;
+    }
+    $1711 = $1;
+    $1712 = $c;
+    _pushback($1711,$1712);
+    $0 = 64;
+    $2013 = $0;
+    STACKTOP = sp;return ($2013|0);
+   }
+   $1694 = $1;
+   $1695 = ((($1694)) + 1108|0);
+   $1696 = HEAP32[$1695>>2]|0;
+   $1697 = ($1696|0)==(1);
+   $1698 = $1;
+   $1699 = $c;
+   if ($1697) {
+    _yyerror_i($1698,57754,$1699);
+   } else {
+    _yyerror_i($1698,57804,$1699);
+   }
+   $0 = 0;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+   break;
+  }
+  case 512: {
+   $1713 = $1;
+   $1714 = (_newtok($1713)|0);
+   $token_column = $1714;
+   label = 517;
+   break;
+  }
+  case 516: {
+   $1728 = $1;
+   $1729 = (_newtok($1728)|0);
+   $token_column = $1729;
+   label = 517;
+   break;
+  }
+ }
+ if ((label|0) == 24) {
+  $75 = $1;
+  $76 = ((($75)) + 72|0);
+  $77 = HEAP8[$76>>0]|0;
+  $78 = $77 & -2;
+  $79 = $78 | 1;
+  HEAP8[$76>>0] = $79;
+  $80 = $1;
+  $81 = ((($80)) + 40|0);
+  HEAP32[$81>>2] = 0;
+  $0 = 10;
+  $2013 = $0;
+  STACKTOP = sp;return ($2013|0);
+ }
+ else if ((label|0) == 240) {
+  $nondigit = 0;
+  $seen_e = 0;
+  $seen_point = 0;
+  $is_float = 0;
+  $722 = $1;
+  $723 = ((($722)) + 40|0);
+  HEAP32[$723>>2] = 1;
+  $724 = $1;
+  (_newtok($724)|0);
+  $725 = $c;
+  $726 = ($725|0)==(45);
+  $727 = $c;
+  $728 = ($727|0)==(43);
+  $or$cond45 = $726 | $728;
+  if ($or$cond45) {
+   $729 = $1;
+   $730 = $c;
+   _tokadd($729,$730);
+   $731 = $1;
+   $732 = (_nextc($731)|0);
+   $c = $732;
+  }
+  $733 = $c;
+  $734 = ($733|0)==(48);
+  L671: do {
+   if ($734) {
+    $735 = $1;
+    $736 = (_toklen($735)|0);
+    $start = $736;
+    $737 = $1;
+    $738 = (_nextc($737)|0);
+    $c = $738;
+    $739 = $c;
+    $740 = ($739|0)==(120);
+    $741 = $c;
+    $742 = ($741|0)==(88);
+    $or$cond48 = $740 | $742;
+    if ($or$cond48) {
+     $743 = $1;
+     $744 = (_nextc($743)|0);
+     $c = $744;
+     $745 = $c;
+     $746 = ($745|0)>=(0);
+     L675: do {
+      if ($746) {
+       $747 = $c;
+       $748 = (($747) - 48)|0;
+       $749 = ($748>>>0)<(10);
+       if (!($749)) {
+        $750 = $c;
+        $751 = $750 | 32;
+        $752 = (($751) - 97)|0;
+        $753 = ($752>>>0)<(6);
+        if (!($753)) {
+         break;
+        }
+       }
+       while(1) {
+        $754 = $c;
+        $755 = ($754|0)==(95);
+        if ($755) {
+         $756 = $nondigit;
+         $757 = ($756|0)!=(0);
+         if ($757) {
+          break L675;
+         }
+         $758 = $c;
+         $nondigit = $758;
+        } else {
+         $759 = $c;
+         $760 = (($759) - 48)|0;
+         $761 = ($760>>>0)<(10);
+         if (!($761)) {
+          $762 = $c;
+          $763 = $762 | 32;
+          $764 = (($763) - 97)|0;
+          $765 = ($764>>>0)<(6);
+          if (!($765)) {
+           break L675;
+          }
+         }
+         $nondigit = 0;
+         $766 = $1;
+         $767 = $c;
+         $768 = (_tolower($767)|0);
+         _tokadd($766,$768);
+        }
+        $769 = $1;
+        $770 = (_nextc($769)|0);
+        $c = $770;
+        $771 = ($770|0)>=(0);
+        if (!($771)) {
+         break;
+        }
+       }
+      }
+     } while(0);
+     $772 = $1;
+     $773 = $c;
+     _pushback($772,$773);
+     $774 = $1;
+     _tokfix($774);
+     $775 = $1;
+     $776 = (_toklen($775)|0);
+     $777 = $start;
+     $778 = ($776|0)==($777|0);
+     if ($778) {
+      $779 = $1;
+      _yyerror($779,57424);
+      $0 = 0;
+      $2013 = $0;
+      STACKTOP = sp;return ($2013|0);
+     }
+     $780 = $nondigit;
+     $781 = ($780|0)!=(0);
+     if ($781) {
+      label = 323;
+      break;
+     }
+     $782 = $1;
+     $783 = $1;
+     $784 = (_tok($783)|0);
+     $785 = (_new_int($782,$784,16)|0);
+     $786 = $1;
+     $787 = ((($786)) + 1132|0);
+     $788 = HEAP32[$787>>2]|0;
+     HEAP32[$788>>2] = $785;
+     $0 = 313;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    }
+    $789 = $c;
+    $790 = ($789|0)==(98);
+    $791 = $c;
+    $792 = ($791|0)==(66);
+    $or$cond51 = $790 | $792;
+    if ($or$cond51) {
+     $793 = $1;
+     $794 = (_nextc($793)|0);
+     $c = $794;
+     $795 = $c;
+     $796 = ($795|0)==(48);
+     $797 = $c;
+     $798 = ($797|0)==(49);
+     $or$cond54 = $796 | $798;
+     L699: do {
+      if ($or$cond54) {
+       while(1) {
+        $799 = $c;
+        $800 = ($799|0)==(95);
+        if ($800) {
+         $801 = $nondigit;
+         $802 = ($801|0)!=(0);
+         if ($802) {
+          break L699;
+         }
+         $803 = $c;
+         $nondigit = $803;
+        } else {
+         $804 = $c;
+         $805 = ($804|0)!=(48);
+         $806 = $c;
+         $807 = ($806|0)!=(49);
+         $or$cond57 = $805 & $807;
+         if ($or$cond57) {
+          break L699;
+         }
+         $nondigit = 0;
+         $808 = $1;
+         $809 = $c;
+         _tokadd($808,$809);
+        }
+        $810 = $1;
+        $811 = (_nextc($810)|0);
+        $c = $811;
+        $812 = ($811|0)>=(0);
+        if (!($812)) {
+         break;
+        }
+       }
+      }
+     } while(0);
+     $813 = $1;
+     $814 = $c;
+     _pushback($813,$814);
+     $815 = $1;
+     _tokfix($815);
+     $816 = $1;
+     $817 = (_toklen($816)|0);
+     $818 = $start;
+     $819 = ($817|0)==($818|0);
+     if ($819) {
+      $820 = $1;
+      _yyerror($820,57424);
+      $0 = 0;
+      $2013 = $0;
+      STACKTOP = sp;return ($2013|0);
+     }
+     $821 = $nondigit;
+     $822 = ($821|0)!=(0);
+     if ($822) {
+      label = 323;
+      break;
+     }
+     $823 = $1;
+     $824 = $1;
+     $825 = (_tok($824)|0);
+     $826 = (_new_int($823,$825,2)|0);
+     $827 = $1;
+     $828 = ((($827)) + 1132|0);
+     $829 = HEAP32[$828>>2]|0;
+     HEAP32[$829>>2] = $826;
+     $0 = 313;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    }
+    $830 = $c;
+    $831 = ($830|0)==(100);
+    $832 = $c;
+    $833 = ($832|0)==(68);
+    $or$cond60 = $831 | $833;
+    if ($or$cond60) {
+     $834 = $1;
+     $835 = (_nextc($834)|0);
+     $c = $835;
+     $836 = $c;
+     $837 = ($836|0)>=(0);
+     L718: do {
+      if ($837) {
+       $838 = $c;
+       $839 = (($838) - 48)|0;
+       $840 = ($839>>>0)<(10);
+       if ($840) {
+        while(1) {
+         $841 = $c;
+         $842 = ($841|0)==(95);
+         if ($842) {
+          $843 = $nondigit;
+          $844 = ($843|0)!=(0);
+          if ($844) {
+           break L718;
+          }
+          $845 = $c;
+          $nondigit = $845;
+         } else {
+          $846 = $c;
+          $847 = (($846) - 48)|0;
+          $848 = ($847>>>0)<(10);
+          if (!($848)) {
+           break L718;
+          }
+          $nondigit = 0;
+          $849 = $1;
+          $850 = $c;
+          _tokadd($849,$850);
+         }
+         $851 = $1;
+         $852 = (_nextc($851)|0);
+         $c = $852;
+         $853 = ($852|0)>=(0);
+         if (!($853)) {
+          break;
+         }
+        }
+       }
+      }
+     } while(0);
+     $854 = $1;
+     $855 = $c;
+     _pushback($854,$855);
+     $856 = $1;
+     _tokfix($856);
+     $857 = $1;
+     $858 = (_toklen($857)|0);
+     $859 = $start;
+     $860 = ($858|0)==($859|0);
+     if ($860) {
+      $861 = $1;
+      _yyerror($861,57424);
+      $0 = 0;
+      $2013 = $0;
+      STACKTOP = sp;return ($2013|0);
+     }
+     $862 = $nondigit;
+     $863 = ($862|0)!=(0);
+     if ($863) {
+      label = 323;
+      break;
+     }
+     $864 = $1;
+     $865 = $1;
+     $866 = (_tok($865)|0);
+     $867 = (_new_int($864,$866,10)|0);
+     $868 = $1;
+     $869 = ((($868)) + 1132|0);
+     $870 = HEAP32[$869>>2]|0;
+     HEAP32[$870>>2] = $867;
+     $0 = 313;
+     $2013 = $0;
+     STACKTOP = sp;return ($2013|0);
+    }
+    $871 = $c;
+    $872 = ($871|0)==(95);
+    if ($872) {
+     label = 289;
+    } else {
+     $873 = $c;
+     $874 = ($873|0)==(111);
+     $875 = $c;
+     $876 = ($875|0)==(79);
+     $or$cond63 = $874 | $876;
+     do {
+      if ($or$cond63) {
+       $877 = $1;
+       $878 = (_nextc($877)|0);
+       $c = $878;
+       $879 = $c;
+       $880 = ($879|0)<(0);
+       $881 = $c;
+       $882 = ($881|0)==(95);
+       $or$cond66 = $880 | $882;
+       if (!($or$cond66)) {
+        $883 = $c;
+        $884 = (($883) - 48)|0;
+        $885 = ($884>>>0)<(10);
+        if ($885) {
+         break;
+        }
+       }
+       $886 = $1;
+       _yyerror($886,57424);
+       $0 = 0;
+       $2013 = $0;
+       STACKTOP = sp;return ($2013|0);
+      }
+     } while(0);
+     $887 = $c;
+     $888 = ($887|0)>=(48);
+     $889 = $c;
+     $890 = ($889|0)<=(55);
+     $or$cond69 = $888 & $890;
+     if ($or$cond69) {
+      label = 289;
+     } else {
+      label = 301;
+     }
+    }
+    L745: do {
+     if ((label|0) == 289) {
+      while(1) {
+       label = 0;
+       $891 = $c;
+       $892 = ($891|0)==(95);
+       if ($892) {
+        $893 = $nondigit;
+        $894 = ($893|0)!=(0);
+        if ($894) {
+         break;
+        }
+        $895 = $c;
+        $nondigit = $895;
+       } else {
+        $896 = $c;
+        $897 = ($896|0)<(48);
+        $898 = $c;
+        $899 = ($898|0)>(57);
+        $or$cond72 = $897 | $899;
+        if ($or$cond72) {
+         break;
+        }
+        $900 = $c;
+        $901 = ($900|0)>(55);
+        if ($901) {
+         break L745;
+        }
+        $nondigit = 0;
+        $902 = $1;
+        $903 = $c;
+        _tokadd($902,$903);
+       }
+       $904 = $1;
+       $905 = (_nextc($904)|0);
+       $c = $905;
+       $906 = ($905|0)>=(0);
+       if ($906) {
+        label = 289;
+       } else {
+        break;
+       }
+      }
+      $907 = $1;
+      $908 = (_toklen($907)|0);
+      $909 = $start;
+      $910 = ($908|0)>($909|0);
+      if (!($910)) {
+       $923 = $nondigit;
+       $924 = ($923|0)!=(0);
+       if (!($924)) {
+        label = 301;
+        break;
+       }
+       $925 = $1;
+       $926 = $c;
+       _pushback($925,$926);
+       label = 323;
+       break L671;
+      }
+      $911 = $1;
+      $912 = $c;
+      _pushback($911,$912);
+      $913 = $1;
+      _tokfix($913);
+      $914 = $nondigit;
+      $915 = ($914|0)!=(0);
+      if ($915) {
+       label = 323;
+       break L671;
+      }
+      $916 = $1;
+      $917 = $1;
+      $918 = (_tok($917)|0);
+      $919 = (_new_int($916,$918,8)|0);
+      $920 = $1;
+      $921 = ((($920)) + 1132|0);
+      $922 = HEAP32[$921>>2]|0;
+      HEAP32[$922>>2] = $919;
+      $0 = 313;
+      $2013 = $0;
+      STACKTOP = sp;return ($2013|0);
+     }
+    } while(0);
+    if ((label|0) == 301) {
+     $927 = $c;
+     $928 = ($927|0)>(55);
+     $929 = $c;
+     $930 = ($929|0)<=(57);
+     $or$cond75 = $928 & $930;
+     if (!($or$cond75)) {
+      $932 = $c;
+      $933 = ($932|0)==(46);
+      $934 = $c;
+      $935 = ($934|0)==(101);
+      $or$cond78 = $933 | $935;
+      $936 = $c;
+      $937 = ($936|0)==(69);
+      $or$cond81 = $or$cond78 | $937;
+      $938 = $1;
+      if ($or$cond81) {
+       _tokadd($938,48);
+       label = 306;
+       break;
+      }
+      $939 = $c;
+      _pushback($938,$939);
+      $940 = $1;
+      $941 = (_new_int($940,57475,10)|0);
+      $942 = $1;
+      $943 = ((($942)) + 1132|0);
+      $944 = HEAP32[$943>>2]|0;
+      HEAP32[$944>>2] = $941;
+      $0 = 313;
+      $2013 = $0;
+      STACKTOP = sp;return ($2013|0);
+     }
+    }
+    $931 = $1;
+    _yyerror($931,57455);
+    label = 306;
+   } else {
+    label = 306;
+   }
+  } while(0);
+  L770: do {
+   if ((label|0) == 306) {
+    L771: while(1) {
+     label = 0;
+     $945 = $c;
+     switch ($945|0) {
+     case 57: case 56: case 55: case 54: case 53: case 52: case 51: case 50: case 49: case 48:  {
+      $nondigit = 0;
+      $946 = $1;
+      $947 = $c;
+      _tokadd($946,$947);
+      break;
+     }
+     case 46:  {
+      $948 = $nondigit;
+      $949 = ($948|0)!=(0);
+      if ($949) {
+       label = 323;
+       break L770;
+      }
+      $950 = $seen_point;
+      $951 = ($950|0)!=(0);
+      $952 = $seen_e;
+      $953 = ($952|0)!=(0);
+      $or$cond84 = $951 | $953;
+      if ($or$cond84) {
+       break L771;
+      }
+      $954 = $1;
+      $955 = (_nextc($954)|0);
+      $c0 = $955;
+      $956 = $c0;
+      $957 = ($956|0)<(0);
+      if ($957) {
+       label = 312;
+       break L771;
+      }
+      $958 = $c0;
+      $959 = (($958) - 48)|0;
+      $960 = ($959>>>0)<(10);
+      if (!($960)) {
+       label = 312;
+       break L771;
+      }
+      $963 = $c0;
+      $c = $963;
+      $964 = $1;
+      _tokadd($964,46);
+      $965 = $1;
+      $966 = $c;
+      _tokadd($965,$966);
+      $967 = $is_float;
+      $968 = (($967) + 1)|0;
+      $is_float = $968;
+      $969 = $seen_point;
+      $970 = (($969) + 1)|0;
+      $seen_point = $970;
+      $nondigit = 0;
+      break;
+     }
+     case 69: case 101:  {
+      $971 = $nondigit;
+      $972 = ($971|0)!=(0);
+      if ($972) {
+       label = 315;
+       break L771;
+      }
+      $976 = $seen_e;
+      $977 = ($976|0)!=(0);
+      if ($977) {
+       break L771;
+      }
+      $978 = $1;
+      $979 = $c;
+      _tokadd($978,$979);
+      $980 = $seen_e;
+      $981 = (($980) + 1)|0;
+      $seen_e = $981;
+      $982 = $is_float;
+      $983 = (($982) + 1)|0;
+      $is_float = $983;
+      $984 = $c;
+      $nondigit = $984;
+      $985 = $1;
+      $986 = (_nextc($985)|0);
+      $c = $986;
+      $987 = $c;
+      $988 = ($987|0)!=(45);
+      $989 = $c;
+      $990 = ($989|0)!=(43);
+      $or$cond87 = $988 & $990;
+      if ($or$cond87) {
+       label = 306;
+       continue L771;
+      }
+      $991 = $1;
+      $992 = $c;
+      _tokadd($991,$992);
+      $993 = $c;
+      $nondigit = $993;
+      break;
+     }
+     case 95:  {
+      $994 = $nondigit;
+      $995 = ($994|0)!=(0);
+      if ($995) {
+       break L771;
+      }
+      $996 = $c;
+      $nondigit = $996;
+      break;
+     }
+     default: {
+      break L771;
+     }
+     }
+     $997 = $1;
+     $998 = (_nextc($997)|0);
+     $c = $998;
+     label = 306;
+    }
+    if ((label|0) == 312) {
+     $961 = $1;
+     $962 = $c0;
+     _pushback($961,$962);
+    }
+    else if ((label|0) == 315) {
+     $973 = $1;
+     $974 = $c;
+     _pushback($973,$974);
+     $975 = $nondigit;
+     $c = $975;
+    }
+    $999 = $1;
+    $1000 = $c;
+    _pushback($999,$1000);
+    $1001 = $nondigit;
+    $1002 = ($1001|0)!=(0);
+    if ($1002) {
+     label = 323;
+    }
+   }
+  } while(0);
+  if ((label|0) == 323) {
+   $1003 = $1;
+   $1004 = $nondigit;
+   _yyerror_i($1003,57477,$1004);
+  }
+  $1005 = $1;
+  _tokfix($1005);
+  $1006 = $is_float;
+  $1007 = ($1006|0)!=(0);
+  if (!($1007)) {
+   $1035 = $1;
+   $1036 = $1;
+   $1037 = (_tok($1036)|0);
+   $1038 = (_new_int($1035,$1037,10)|0);
+   $1039 = $1;
+   $1040 = ((($1039)) + 1132|0);
+   $1041 = HEAP32[$1040>>2]|0;
+   HEAP32[$1041>>2] = $1038;
+   $0 = 313;
+   $2013 = $0;
+   STACKTOP = sp;return ($2013|0);
+  }
+  $1008 = (___errno_location()|0);
+  HEAP32[$1008>>2] = 0;
+  $1009 = $1;
+  $1010 = (_tok($1009)|0);
+  $1011 = (+_strtod($1010,$endp));
+  $d = $1011;
+  $1012 = $d;
+  $1013 = $1012 == 0.0;
+  if ($1013) {
+   $1014 = HEAP32[$endp>>2]|0;
+   $1015 = $1;
+   $1016 = (_tok($1015)|0);
+   $1017 = ($1014|0)==($1016|0);
+   if ($1017) {
+    $1018 = $1;
+    $1019 = $1;
+    $1020 = (_tok($1019)|0);
+    _yywarning_s($1018,57501,$1020);
+   } else {
+    label = 328;
+   }
+  } else {
+   label = 328;
+  }
+  if ((label|0) == 328) {
+   $1021 = (___errno_location()|0);
+   $1022 = HEAP32[$1021>>2]|0;
+   $1023 = ($1022|0)==(34);
+   if ($1023) {
+    $1024 = $1;
+    $1025 = $1;
+    $1026 = (_tok($1025)|0);
+    _yywarning_s($1024,57526,$1026);
+    $1027 = (___errno_location()|0);
+    HEAP32[$1027>>2] = 0;
+   }
+  }
+  $1028 = $1;
+  $1029 = $1;
+  $1030 = (_tok($1029)|0);
+  $1031 = (_new_float($1028,$1030)|0);
+  $1032 = $1;
+  $1033 = ((($1032)) + 1132|0);
+  $1034 = HEAP32[$1033>>2]|0;
+  HEAP32[$1034>>2] = $1031;
+  $0 = 314;
+  $2013 = $0;
+  STACKTOP = sp;return ($2013|0);
+ }
+ else if ((label|0) == 333) {
+  $1046 = $1;
+  $1047 = ((($1046)) + 48|0);
+  $1048 = HEAP32[$1047>>2]|0;
+  $1049 = $1048 >>> 1;
+  $1050 = $1;
+  $1051 = ((($1050)) + 48|0);
+  $1052 = HEAP32[$1051>>2]|0;
+  $1053 = $1052 & 1;
+  $1054 = $1049 | $1053;
+  $1055 = $1;
+  $1056 = ((($1055)) + 48|0);
+  HEAP32[$1056>>2] = $1054;
+  $1057 = $1;
+  $1058 = ((($1057)) + 52|0);
+  $1059 = HEAP32[$1058>>2]|0;
+  $1060 = $1059 >>> 1;
+  $1061 = $1;
+  $1062 = ((($1061)) + 52|0);
+  $1063 = HEAP32[$1062>>2]|0;
+  $1064 = $1063 & 1;
+  $1065 = $1060 | $1064;
+  $1066 = $1;
+  $1067 = ((($1066)) + 52|0);
+  HEAP32[$1067>>2] = $1065;
+  $1068 = $c;
+  $1069 = ($1068|0)==(41);
+  $1070 = $1;
+  $1071 = ((($1070)) + 40|0);
+  if ($1069) {
+   HEAP32[$1071>>2] = 3;
+  } else {
+   HEAP32[$1071>>2] = 2;
+  }
+  $1072 = $c;
+  $0 = $1072;
+  $2013 = $0;
+  STACKTOP = sp;return ($2013|0);
+ }
+ else if ((label|0) == 517) {
+  while(1) {
+   label = 0;
+   $1730 = $1;
+   $1731 = $c;
+   _tokadd($1730,$1731);
+   $1732 = $1;
+   $1733 = (_nextc($1732)|0);
+   $c = $1733;
+   $1734 = $c;
+   $1735 = ($1734|0)<(0);
+   if ($1735) {
+    break;
+   }
+   $1736 = $c;
+   $1737 = $1736 | 32;
+   $1738 = (($1737) - 97)|0;
+   $1739 = ($1738>>>0)<(26);
+   if ($1739) {
+    label = 517;
+    continue;
+   }
+   $1740 = $c;
+   $1741 = (($1740) - 48)|0;
+   $1742 = ($1741>>>0)<(10);
+   $1743 = $c;
+   $1744 = ($1743|0)==(95);
+   $or$cond145 = $1742 | $1744;
+   if ($or$cond145) {
+    label = 517;
+    continue;
+   }
+   $1745 = $c;
+   $1746 = ($1745>>>0)<=(127);
+   $1747 = $1746 ^ 1;
+   if ($1747) {
+    label = 517;
+   } else {
+    break;
+   }
+  }
+  $1748 = $token_column;
+  $1749 = ($1748|0)==(0);
+  if ($1749) {
+   $1750 = $1;
+   $1751 = (_toklen($1750)|0);
+   $1752 = ($1751|0)==(7);
+   if ($1752) {
+    $1753 = $c;
+    $1754 = ($1753|0)<(0);
+    $1755 = $c;
+    $1756 = ($1755|0)==(10);
+    $or$cond150 = $1754 | $1756;
+    if ($or$cond150) {
+     $1757 = $1;
+     $1758 = (_tok($1757)|0);
+     $1759 = $1;
+     $1760 = (_toklen($1759)|0);
+     $1761 = (_strncmp($1758,57887,$1760)|0);
+     $1762 = ($1761|0)==(0);
+     if ($1762) {
+      $0 = -1;
+      $2013 = $0;
+      STACKTOP = sp;return ($2013|0);
+     }
+    }
+   }
+  }
+  $1763 = $1;
+  $1764 = (_tok($1763)|0);
+  $1765 = HEAP8[$1764>>0]|0;
+  $1766 = $1765 << 24 >> 24;
+  L825: do {
+   switch ($1766|0) {
+   case 36: case 64:  {
+    $1767 = $1;
+    $1768 = $c;
+    _pushback($1767,$1768);
+    break;
+   }
+   default: {
+    $1769 = $c;
+    $1770 = ($1769|0)==(33);
+    $1771 = $c;
+    $1772 = ($1771|0)==(63);
+    $or$cond153 = $1770 | $1772;
+    if ($or$cond153) {
+     $1773 = $1;
+     $1774 = (_peek_n($1773,61,0)|0);
+     $1775 = ($1774<<24>>24)!=(0);
+     if (!($1775)) {
+      $1776 = $1;
+      $1777 = $c;
+      _tokadd($1776,$1777);
+      break L825;
+     }
+    }
+    $1778 = $1;
+    $1779 = $c;
+    _pushback($1778,$1779);
+   }
+   }
+  } while(0);
+  $1780 = $1;
+  _tokfix($1780);
+  $result = 0;
+  $1781 = $1;
+  $1782 = (_tok($1781)|0);
+  $1783 = HEAP8[$1782>>0]|0;
+  $1784 = $1783 << 24 >> 24;
+  L833: do {
+   switch ($1784|0) {
+   case 36:  {
+    $1785 = $1;
+    $1786 = ((($1785)) + 40|0);
+    HEAP32[$1786>>2] = 1;
+    $result = 308;
+    break;
+   }
+   case 64:  {
+    $1787 = $1;
+    $1788 = ((($1787)) + 40|0);
+    HEAP32[$1788>>2] = 1;
+    $1789 = $1;
+    $1790 = (_tok($1789)|0);
+    $1791 = ((($1790)) + 1|0);
+    $1792 = HEAP8[$1791>>0]|0;
+    $1793 = $1792 << 24 >> 24;
+    $1794 = ($1793|0)==(64);
+    if ($1794) {
+     $result = 311;
+     break L833;
+    } else {
+     $result = 309;
+     break L833;
+    }
+    break;
+   }
+   default: {
+    $1795 = $1;
+    $1796 = (_toklast($1795)|0);
+    $1797 = ($1796|0)==(33);
+    do {
+     if ($1797) {
+      label = 539;
+     } else {
+      $1798 = $1;
+      $1799 = (_toklast($1798)|0);
+      $1800 = ($1799|0)==(63);
+      if ($1800) {
+       label = 539;
+      } else {
+       $1801 = $1;
+       $1802 = ((($1801)) + 40|0);
+       $1803 = HEAP32[$1802>>2]|0;
+       $1804 = ($1803|0)==(7);
+       L838: do {
+        if ($1804) {
+         $1805 = $1;
+         $1806 = (_nextc($1805)|0);
+         $c = $1806;
+         $1807 = ($1806|0)==(61);
+         do {
+          if ($1807) {
+           $1808 = $1;
+           $1809 = (_peek_n($1808,126,0)|0);
+           $1810 = ($1809<<24>>24)!=(0);
+           if (!($1810)) {
+            $1811 = $1;
+            $1812 = (_peek_n($1811,62,0)|0);
+            $1813 = ($1812<<24>>24)!=(0);
+            if (!($1813)) {
+             $1814 = $1;
+             $1815 = (_peek_n($1814,61,0)|0);
+             $1816 = ($1815<<24>>24)!=(0);
+             if ($1816) {
+              $1817 = $1;
+              $1818 = (_peek_n($1817,62,1)|0);
+              $1819 = $1818&255;
+              $1820 = ($1819|0)!=(0);
+              if (!($1820)) {
+               break;
+              }
+             }
+             $result = 306;
+             $1821 = $1;
+             $1822 = $c;
+             _tokadd($1821,$1822);
+             $1823 = $1;
+             _tokfix($1823);
+             break L838;
+            }
+           }
+          }
+         } while(0);
+         $1824 = $1;
+         $1825 = $c;
+         _pushback($1824,$1825);
+        }
+       } while(0);
+       $1826 = $result;
+       $1827 = ($1826|0)==(0);
+       if ($1827) {
+        $1828 = $1;
+        $1829 = (_tok($1828)|0);
+        $1830 = HEAP8[$1829>>0]|0;
+        $1831 = $1830 << 24 >> 24;
+        $1832 = (($1831) - 65)|0;
+        $1833 = ($1832>>>0)<(26);
+        if ($1833) {
+         $result = 310;
+         break;
+        }
+       }
+       $result = 306;
+      }
+     }
+    } while(0);
+    if ((label|0) == 539) {
+     $result = 307;
+    }
+    $1834 = $1;
+    $1835 = ((($1834)) + 40|0);
+    $1836 = HEAP32[$1835>>2]|0;
+    $1837 = ($1836|0)!=(0);
+    $1838 = $cmd_state;
+    $1839 = ($1838|0)!=(0);
+    $or$cond156 = $1837 | $1839;
+    if ($or$cond156) {
+     $1840 = $1;
+     $1841 = ((($1840)) + 40|0);
+     $1842 = HEAP32[$1841>>2]|0;
+     $1843 = ($1842|0)==(4);
+     if ($1843) {
+      label = 555;
+     } else {
+      $1844 = $1;
+      $1845 = ((($1844)) + 40|0);
+      $1846 = HEAP32[$1845>>2]|0;
+      $1847 = ($1846|0)==(5);
+      if ($1847) {
+       label = 555;
+      }
+     }
+    } else {
+     label = 555;
+    }
+    if ((label|0) == 555) {
+     $1848 = $1;
+     $1849 = (_peek_n($1848,58,0)|0);
+     $1850 = $1849&255;
+     $1851 = ($1850|0)!=(0);
+     if ($1851) {
+      $1852 = $1;
+      $1853 = (_peek_n($1852,58,1)|0);
+      $1854 = ($1853<<24>>24)!=(0);
+      if (!($1854)) {
+       $1855 = $1;
+       $1856 = ((($1855)) + 40|0);
+       HEAP32[$1856>>2] = 0;
+       $1857 = $1;
+       (_nextc($1857)|0);
+       $1858 = $1;
+       _tokfix($1858);
+       $1859 = $1;
+       $1860 = $1;
+       $1861 = (_tok($1860)|0);
+       $1862 = (_intern_cstr_gen($1859,$1861)|0);
+       $1863 = $1;
+       $1864 = ((($1863)) + 1132|0);
+       $1865 = HEAP32[$1864>>2]|0;
+       HEAP32[$1865>>2] = $1862;
+       $0 = 312;
+       $2013 = $0;
+       STACKTOP = sp;return ($2013|0);
+      }
+     }
+    }
+    $1866 = $1;
+    $1867 = ((($1866)) + 40|0);
+    $1868 = HEAP32[$1867>>2]|0;
+    $1869 = ($1868|0)!=(8);
+    if ($1869) {
+     $1870 = $1;
+     $1871 = (_tok($1870)|0);
+     $1872 = $1;
+     $1873 = (_toklen($1872)|0);
+     $1874 = (_reserved_word($1871,$1873)|0);
+     $kw = $1874;
+     $1875 = $kw;
+     $1876 = ($1875|0)!=(0|0);
+     if ($1876) {
+      $1877 = $1;
+      $1878 = ((($1877)) + 40|0);
+      $1879 = HEAP32[$1878>>2]|0;
+      $state = $1879;
+      $1880 = $1;
+      $1881 = ((($1880)) + 32|0);
+      $1882 = HEAP32[$1881>>2]|0;
+      $1883 = $1;
+      $1884 = ((($1883)) + 1132|0);
+      $1885 = HEAP32[$1884>>2]|0;
+      HEAP32[$1885>>2] = $1882;
+      $1886 = $kw;
+      $1887 = ((($1886)) + 12|0);
+      $1888 = HEAP32[$1887>>2]|0;
+      $1889 = $1;
+      $1890 = ((($1889)) + 40|0);
+      HEAP32[$1890>>2] = $1888;
+      $1891 = $state;
+      $1892 = ($1891|0)==(7);
+      $1893 = $1;
+      if ($1892) {
+       $1894 = $kw;
+       $1895 = HEAP32[$1894>>2]|0;
+       $1896 = (_intern_cstr_gen($1893,$1895)|0);
+       $1897 = $1;
+       $1898 = ((($1897)) + 1132|0);
+       $1899 = HEAP32[$1898>>2]|0;
+       HEAP32[$1899>>2] = $1896;
+       $1900 = $kw;
+       $1901 = ((($1900)) + 4|0);
+       $1902 = HEAP32[$1901>>2]|0;
+       $0 = $1902;
+       $2013 = $0;
+       STACKTOP = sp;return ($2013|0);
+      }
+      $1903 = ((($1893)) + 40|0);
+      $1904 = HEAP32[$1903>>2]|0;
+      $1905 = ($1904|0)==(0);
+      if ($1905) {
+       $1906 = $1;
+       $1907 = ((($1906)) + 72|0);
+       $1908 = HEAP8[$1907>>0]|0;
+       $1909 = $1908 & -2;
+       $1910 = $1909 | 1;
+       HEAP8[$1907>>0] = $1910;
+      }
+      $1911 = $kw;
+      $1912 = ((($1911)) + 4|0);
+      $1913 = HEAP32[$1912>>2]|0;
+      $1914 = ($1913|0)==(281);
+      if (!($1914)) {
+       $1948 = $state;
+       $1949 = ($1948|0)==(0);
+       $1950 = $state;
+       $1951 = ($1950|0)==(10);
+       $or$cond165 = $1949 | $1951;
+       $1952 = $kw;
+       $1953 = ((($1952)) + 4|0);
+       $1954 = HEAP32[$1953>>2]|0;
+       if ($or$cond165) {
+        $0 = $1954;
+        $2013 = $0;
+        STACKTOP = sp;return ($2013|0);
+       }
+       $1955 = $kw;
+       $1956 = ((($1955)) + 4|0);
+       $1957 = ((($1956)) + 4|0);
+       $1958 = HEAP32[$1957>>2]|0;
+       $1959 = ($1954|0)!=($1958|0);
+       if ($1959) {
+        $1960 = $1;
+        $1961 = ((($1960)) + 40|0);
+        HEAP32[$1961>>2] = 0;
+       }
+       $1962 = $kw;
+       $1963 = ((($1962)) + 4|0);
+       $1964 = ((($1963)) + 4|0);
+       $1965 = HEAP32[$1964>>2]|0;
+       $0 = $1965;
+       $2013 = $0;
+       STACKTOP = sp;return ($2013|0);
+      }
+      $1915 = $1;
+      $1916 = ((($1915)) + 60|0);
+      $1917 = HEAP32[$1916>>2]|0;
+      $1918 = ($1917|0)!=(0);
+      if ($1918) {
+       $1919 = $1;
+       $1920 = ((($1919)) + 60|0);
+       $1921 = HEAP32[$1920>>2]|0;
+       $1922 = $1;
+       $1923 = ((($1922)) + 56|0);
+       $1924 = HEAP32[$1923>>2]|0;
+       $1925 = ($1921|0)==($1924|0);
+       if ($1925) {
+        $1926 = $1;
+        $1927 = ((($1926)) + 60|0);
+        HEAP32[$1927>>2] = 0;
+        $1928 = $1;
+        $1929 = ((($1928)) + 56|0);
+        $1930 = HEAP32[$1929>>2]|0;
+        $1931 = (($1930) + -1)|0;
+        HEAP32[$1929>>2] = $1931;
+        $0 = 284;
+        $2013 = $0;
+        STACKTOP = sp;return ($2013|0);
+       }
+      }
+      $1932 = $1;
+      $1933 = ((($1932)) + 48|0);
+      $1934 = HEAP32[$1933>>2]|0;
+      $1935 = $1934 & 1;
+      $1936 = ($1935|0)!=(0);
+      if ($1936) {
+       $0 = 282;
+       $2013 = $0;
+       STACKTOP = sp;return ($2013|0);
+      }
+      $1937 = $1;
+      $1938 = ((($1937)) + 52|0);
+      $1939 = HEAP32[$1938>>2]|0;
+      $1940 = $1939 & 1;
+      $1941 = ($1940|0)!=(0);
+      $1942 = $state;
+      $1943 = ($1942|0)!=(5);
+      $or$cond159 = $1941 & $1943;
+      if ($or$cond159) {
+       $0 = 283;
+       $2013 = $0;
+       STACKTOP = sp;return ($2013|0);
+      }
+      $1944 = $state;
+      $1945 = ($1944|0)==(2);
+      $1946 = $state;
+      $1947 = ($1946|0)==(0);
+      $or$cond162 = $1945 | $1947;
+      if ($or$cond162) {
+       $0 = 283;
+       $2013 = $0;
+       STACKTOP = sp;return ($2013|0);
+      } else {
+       $0 = 281;
+       $2013 = $0;
+       STACKTOP = sp;return ($2013|0);
+      }
+     }
+    }
+    $1966 = $1;
+    $1967 = ((($1966)) + 40|0);
+    $1968 = HEAP32[$1967>>2]|0;
+    $1969 = ($1968|0)==(0);
+    if (!($1969)) {
+     $1970 = $1;
+     $1971 = ((($1970)) + 40|0);
+     $1972 = HEAP32[$1971>>2]|0;
+     $1973 = ($1972|0)==(6);
+     if (!($1973)) {
+      $1974 = $1;
+      $1975 = ((($1974)) + 40|0);
+      $1976 = HEAP32[$1975>>2]|0;
+      $1977 = ($1976|0)==(10);
+      if (!($1977)) {
+       $1978 = $1;
+       $1979 = ((($1978)) + 40|0);
+       $1980 = HEAP32[$1979>>2]|0;
+       $1981 = ($1980|0)==(9);
+       if (!($1981)) {
+        $1982 = $1;
+        $1983 = ((($1982)) + 40|0);
+        $1984 = HEAP32[$1983>>2]|0;
+        $1985 = ($1984|0)==(8);
+        if (!($1985)) {
+         $1986 = $1;
+         $1987 = ((($1986)) + 40|0);
+         $1988 = HEAP32[$1987>>2]|0;
+         $1989 = ($1988|0)==(4);
+         if (!($1989)) {
+          $1990 = $1;
+          $1991 = ((($1990)) + 40|0);
+          $1992 = HEAP32[$1991>>2]|0;
+          $1993 = ($1992|0)==(5);
+          if (!($1993)) {
+           $1998 = $1;
+           $1999 = ((($1998)) + 40|0);
+           $2000 = HEAP32[$1999>>2]|0;
+           $2001 = ($2000|0)==(7);
+           $2002 = $1;
+           $2003 = ((($2002)) + 40|0);
+           if ($2001) {
+            HEAP32[$2003>>2] = 3;
+            break L833;
+           } else {
+            HEAP32[$2003>>2] = 1;
+            break L833;
+           }
+          }
+         }
+        }
+       }
+      }
+     }
+    }
+    $1994 = $cmd_state;
+    $1995 = ($1994|0)!=(0);
+    $1996 = $1;
+    $1997 = ((($1996)) + 40|0);
+    if ($1995) {
+     HEAP32[$1997>>2] = 5;
+     break L833;
+    } else {
+     HEAP32[$1997>>2] = 4;
+     break L833;
+    }
+   }
+   }
+  } while(0);
+  $2004 = $1;
+  $2005 = $1;
+  $2006 = (_tok($2005)|0);
+  $2007 = (_intern_cstr_gen($2004,$2006)|0);
+  $ident = $2007;
+  $2008 = $ident;
+  $2009 = $1;
+  $2010 = ((($2009)) + 1132|0);
+  $2011 = HEAP32[$2010>>2]|0;
+  HEAP32[$2011>>2] = $2008;
+  $2012 = $result;
+  $0 = $2012;
+  $2013 = $0;
+  STACKTOP = sp;return ($2013|0);
+ }
+ return (0)|0;
+}
+function _parse_string($p) {
+ $p = $p|0;
+ var $$old = 0, $$old4 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0;
+ var $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0;
+ var $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0;
+ var $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0;
+ var $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0;
+ var $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0;
+ var $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0;
+ var $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0;
+ var $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0;
+ var $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0;
+ var $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0;
+ var $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0;
+ var $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0;
+ var $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0;
+ var $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0;
+ var $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0;
+ var $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0;
+ var $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0;
+ var $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0;
+ var $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0;
+ var $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $beg = 0, $buf = 0, $c = 0, $dup = 0, $enc = 0, $encp = 0, $end = 0;
+ var $f = 0, $flag = 0, $flags = 0, $hinf = 0, $len = 0, $line_head = 0, $msg = 0, $nest_level = 0, $or$cond = 0, $or$cond5 = 0, $re_opt = 0, $s = 0, $s1 = 0, $type = 0, $vararg_buffer = 0, $vararg_buffer6 = 0, $vararg_ptr9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 480|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer6 = sp + 8|0;
+ $vararg_buffer = sp;
+ $buf = sp + 216|0;
+ $flags = sp + 209|0;
+ $enc = sp + 208|0;
+ $msg = sp + 80|0;
+ $1 = $p;
+ $2 = $1;
+ $3 = ((($2)) + 44|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5;
+ $type = $6;
+ $7 = $1;
+ $8 = ((($7)) + 44|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ((($9)) + 4|0);
+ $11 = HEAP32[$10>>2]|0;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $12;
+ $nest_level = $13;
+ $14 = $1;
+ $15 = ((($14)) + 44|0);
+ $16 = HEAP32[$15>>2]|0;
+ $17 = ((($16)) + 4|0);
+ $18 = HEAP32[$17>>2]|0;
+ $19 = ((($18)) + 4|0);
+ $20 = HEAP32[$19>>2]|0;
+ $21 = HEAP32[$20>>2]|0;
+ $22 = $21;
+ $beg = $22;
+ $23 = $1;
+ $24 = ((($23)) + 44|0);
+ $25 = HEAP32[$24>>2]|0;
+ $26 = ((($25)) + 4|0);
+ $27 = HEAP32[$26>>2]|0;
+ $28 = ((($27)) + 4|0);
+ $29 = HEAP32[$28>>2]|0;
+ $30 = ((($29)) + 4|0);
+ $31 = HEAP32[$30>>2]|0;
+ $32 = $31;
+ $end = $32;
+ $33 = $type;
+ $34 = $33 & 64;
+ $35 = ($34|0)!=(0);
+ if ($35) {
+  $36 = $1;
+  $37 = (_parsing_heredoc_inf($36)|0);
+  $38 = $37;
+ } else {
+  $38 = 0;
+ }
+ $hinf = $38;
+ $39 = $1;
+ (_newtok($39)|0);
+ L4: while(1) {
+  $40 = $1;
+  $41 = (_nextc($40)|0);
+  $c = $41;
+  $42 = $end;
+  $43 = ($41|0)!=($42|0);
+  $44 = $nest_level;
+  $45 = ($44|0)!=(0);
+  $46 = $43 ? 1 : $45;
+  if (!($46)) {
+   label = 66;
+   break;
+  }
+  $47 = $hinf;
+  $48 = ($47|0)!=(0|0);
+  if ($48) {
+   $49 = $c;
+   $50 = ($49|0)==(10);
+   $51 = $c;
+   $52 = ($51|0)<(0);
+   $or$cond = $50 | $52;
+   if ($or$cond) {
+    label = 7;
+    break;
+   }
+  }
+  $123 = $c;
+  $124 = ($123|0)<(0);
+  if ($124) {
+   label = 20;
+   break;
+  }
+  $126 = $c;
+  $127 = $beg;
+  $128 = ($126|0)==($127|0);
+  do {
+   if ($128) {
+    $129 = $nest_level;
+    $130 = (($129) + 1)|0;
+    $nest_level = $130;
+    $131 = $nest_level;
+    $132 = $131;
+    $133 = $1;
+    $134 = ((($133)) + 44|0);
+    $135 = HEAP32[$134>>2]|0;
+    $136 = ((($135)) + 4|0);
+    $137 = HEAP32[$136>>2]|0;
+    HEAP32[$137>>2] = $132;
+   } else {
+    $138 = $c;
+    $139 = $end;
+    $140 = ($138|0)==($139|0);
+    if ($140) {
+     $141 = $nest_level;
+     $142 = (($141) + -1)|0;
+     $nest_level = $142;
+     $143 = $nest_level;
+     $144 = $143;
+     $145 = $1;
+     $146 = ((($145)) + 44|0);
+     $147 = HEAP32[$146>>2]|0;
+     $148 = ((($147)) + 4|0);
+     $149 = HEAP32[$148>>2]|0;
+     HEAP32[$149>>2] = $144;
+     break;
+    }
+    $150 = $c;
+    $151 = ($150|0)==(92);
+    if (!($151)) {
+     $218 = $c;
+     $219 = ($218|0)==(35);
+     if (!($219)) {
+      break;
+     }
+     $220 = $type;
+     $221 = $220 & 2;
+     $222 = ($221|0)!=(0);
+     if (!($222)) {
+      break;
+     }
+     $223 = $1;
+     $224 = (_nextc($223)|0);
+     $c = $224;
+     $225 = $c;
+     $226 = ($225|0)==(123);
+     $227 = $1;
+     if ($226) {
+      label = 50;
+      break L4;
+     }
+     _tokadd($227,35);
+     $249 = $1;
+     $250 = $c;
+     _pushback($249,$250);
+     continue L4;
+    }
+    $152 = $1;
+    $153 = (_nextc($152)|0);
+    $c = $153;
+    $154 = $type;
+    $155 = $154 & 2;
+    $156 = ($155|0)!=(0);
+    $157 = $c;
+    if ($156) {
+     $158 = $end;
+     $159 = ($157|0)==($158|0);
+     if (!($159)) {
+      $160 = $c;
+      $161 = $beg;
+      $162 = ($160|0)==($161|0);
+      if (!($162)) {
+       $165 = $c;
+       $166 = ($165|0)==(10);
+       if ($166) {
+        $167 = $1;
+        $168 = ((($167)) + 32|0);
+        $169 = HEAP32[$168>>2]|0;
+        $170 = (($169) + 1)|0;
+        HEAP32[$168>>2] = $170;
+        $171 = $1;
+        $172 = ((($171)) + 36|0);
+        HEAP32[$172>>2] = 0;
+        $173 = $type;
+        $174 = $173 & 32;
+        $175 = ($174|0)!=(0);
+        if (!($175)) {
+         continue L4;
+        }
+        $176 = $1;
+        _tokadd($176,10);
+        continue L4;
+       }
+       $177 = $type;
+       $178 = $177 & 4;
+       $179 = ($178|0)!=(0);
+       $180 = $1;
+       if ($179) {
+        _tokadd($180,92);
+        $181 = $1;
+        $182 = $c;
+        _tokadd($181,$182);
+        continue L4;
+       }
+       $183 = $c;
+       _pushback($180,$183);
+       $184 = $1;
+       $185 = $1;
+       $186 = (_read_escape($185)|0);
+       _tokadd($184,$186);
+       $187 = $hinf;
+       $188 = ($187|0)!=(0|0);
+       if (!($188)) {
+        continue L4;
+       }
+       $189 = $hinf;
+       $190 = HEAP8[$189>>0]|0;
+       $191 = $190 & -3;
+       HEAP8[$189>>0] = $191;
+       continue L4;
+      }
+     }
+     $163 = $1;
+     $164 = $c;
+     _tokadd($163,$164);
+     continue L4;
+    } else {
+     $192 = $beg;
+     $193 = ($157|0)!=($192|0);
+     do {
+      if ($193) {
+       $194 = $c;
+       $195 = $end;
+       $196 = ($194|0)!=($195|0);
+       if ($196) {
+        $197 = $c;
+        $198 = ($197|0)==(10);
+        if ($198) {
+         $199 = $1;
+         $200 = ((($199)) + 32|0);
+         $201 = HEAP32[$200>>2]|0;
+         $202 = (($201) + 1)|0;
+         HEAP32[$200>>2] = $202;
+         $203 = $1;
+         $204 = ((($203)) + 36|0);
+         HEAP32[$204>>2] = 0;
+        }
+        $205 = $c;
+        $206 = ($205|0)==(92);
+        if (!($206)) {
+         $207 = $type;
+         $208 = $207 & 32;
+         $209 = ($208|0)!=(0);
+         if ($209) {
+          $210 = $c;
+          $211 = ($210|0)==(32);
+          if ($211) {
+           break;
+          }
+          $212 = $c;
+          $213 = (($212) - 9)|0;
+          $214 = ($213>>>0)<(5);
+          if ($214) {
+           break;
+          }
+         }
+         $215 = $1;
+         _tokadd($215,92);
+        }
+       }
+      }
+     } while(0);
+     $216 = $1;
+     $217 = $c;
+     _tokadd($216,$217);
+     continue L4;
+    }
+   }
+  } while(0);
+  $251 = $type;
+  $252 = $251 & 32;
+  $253 = ($252|0)!=(0);
+  if ($253) {
+   $254 = $c;
+   $255 = ($254|0)==(32);
+   if ($255) {
+    label = 57;
+    break;
+   }
+   $256 = $c;
+   $257 = (($256) - 9)|0;
+   $258 = ($257>>>0)<(5);
+   if ($258) {
+    label = 57;
+    break;
+   }
+  }
+  $296 = $1;
+  $297 = $c;
+  _tokadd($296,$297);
+ }
+ if ((label|0) == 7) {
+  $53 = $1;
+  _tokadd($53,10);
+  $54 = $1;
+  _tokfix($54);
+  $55 = $1;
+  $56 = ((($55)) + 32|0);
+  $57 = HEAP32[$56>>2]|0;
+  $58 = (($57) + 1)|0;
+  HEAP32[$56>>2] = $58;
+  $59 = $1;
+  $60 = ((($59)) + 36|0);
+  HEAP32[$60>>2] = 0;
+  $61 = $hinf;
+  $62 = HEAP8[$61>>0]|0;
+  $63 = ($62&255) >>> 1;
+  $64 = $63 & 1;
+  $line_head = $64;
+  $65 = $hinf;
+  $66 = HEAP8[$65>>0]|0;
+  $67 = $66 & -3;
+  $68 = $67 | 2;
+  HEAP8[$65>>0] = $68;
+  $69 = $line_head;
+  $70 = ($69<<24>>24)!=(0);
+  if ($70) {
+   $71 = $1;
+   $72 = (_tok($71)|0);
+   $s = $72;
+   $73 = $1;
+   $74 = (_toklen($73)|0);
+   $len = $74;
+   $75 = $hinf;
+   $76 = HEAP8[$75>>0]|0;
+   $77 = $76 & 1;
+   $78 = ($77<<24>>24)!=(0);
+   L131: do {
+    if ($78) {
+     while(1) {
+      $79 = $s;
+      $80 = HEAP8[$79>>0]|0;
+      $81 = $80 << 24 >> 24;
+      $82 = ($81|0)==(32);
+      if ($82) {
+       $$old = $len;
+       $$old4 = ($$old|0)>(0);
+       if (!($$old4)) {
+        break L131;
+       }
+      } else {
+       $83 = $s;
+       $84 = HEAP8[$83>>0]|0;
+       $85 = $84 << 24 >> 24;
+       $86 = (($85) - 9)|0;
+       $87 = ($86>>>0)<(5);
+       $88 = $len;
+       $89 = ($88|0)>(0);
+       $or$cond5 = $87 & $89;
+       if (!($or$cond5)) {
+        break L131;
+       }
+      }
+      $90 = $s;
+      $91 = ((($90)) + 1|0);
+      $s = $91;
+      $92 = $len;
+      $93 = (($92) + -1)|0;
+      $len = $93;
+     }
+    }
+   } while(0);
+   $94 = $len;
+   $95 = (($94) - 1)|0;
+   $96 = $hinf;
+   $97 = ((($96)) + 12|0);
+   $98 = HEAP32[$97>>2]|0;
+   $99 = ($95|0)==($98|0);
+   if ($99) {
+    $100 = $s;
+    $101 = $hinf;
+    $102 = ((($101)) + 8|0);
+    $103 = HEAP32[$102>>2]|0;
+    $104 = $len;
+    $105 = (($104) - 1)|0;
+    $106 = (_strncmp($100,$103,$105)|0);
+    $107 = ($106|0)==(0);
+    if ($107) {
+     $0 = 365;
+     $410 = $0;
+     STACKTOP = sp;return ($410|0);
+    }
+   }
+  }
+  $108 = $c;
+  $109 = ($108|0)<(0);
+  if ($109) {
+   $110 = $hinf;
+   $111 = ((($110)) + 8|0);
+   $112 = HEAP32[$111>>2]|0;
+   HEAP32[$vararg_buffer>>2] = $112;
+   (_snprintf($buf,256,56872,$vararg_buffer)|0);
+   $113 = $1;
+   _yyerror($113,$buf);
+   $0 = 0;
+   $410 = $0;
+   STACKTOP = sp;return ($410|0);
+  } else {
+   $114 = $1;
+   $115 = $1;
+   $116 = (_tok($115)|0);
+   $117 = $1;
+   $118 = (_toklen($117)|0);
+   $119 = (_new_str($114,$116,$118)|0);
+   $120 = $1;
+   $121 = ((($120)) + 1132|0);
+   $122 = HEAP32[$121>>2]|0;
+   HEAP32[$122>>2] = $119;
+   $0 = 369;
+   $410 = $0;
+   STACKTOP = sp;return ($410|0);
+  }
+ }
+ else if ((label|0) == 20) {
+  $125 = $1;
+  _yyerror($125,56926);
+  $0 = 0;
+  $410 = $0;
+  STACKTOP = sp;return ($410|0);
+ }
+ else if ((label|0) == 50) {
+  _tokfix($227);
+  $228 = $1;
+  $229 = ((($228)) + 40|0);
+  HEAP32[$229>>2] = 0;
+  $230 = $1;
+  $231 = ((($230)) + 72|0);
+  $232 = HEAP8[$231>>0]|0;
+  $233 = $232 & -2;
+  $234 = $233 | 1;
+  HEAP8[$231>>0] = $234;
+  $235 = $1;
+  $236 = $1;
+  $237 = (_tok($236)|0);
+  $238 = $1;
+  $239 = (_toklen($238)|0);
+  $240 = (_new_str($235,$237,$239)|0);
+  $241 = $1;
+  $242 = ((($241)) + 1132|0);
+  $243 = HEAP32[$242>>2]|0;
+  HEAP32[$243>>2] = $240;
+  $244 = $hinf;
+  $245 = ($244|0)!=(0|0);
+  if ($245) {
+   $246 = $hinf;
+   $247 = HEAP8[$246>>0]|0;
+   $248 = $247 & -3;
+   HEAP8[$246>>0] = $248;
+   $0 = 368;
+   $410 = $0;
+   STACKTOP = sp;return ($410|0);
+  } else {
+   $0 = 319;
+   $410 = $0;
+   STACKTOP = sp;return ($410|0);
+  }
+ }
+ else if ((label|0) == 57) {
+  $259 = $1;
+  $260 = (_toklen($259)|0);
+  $261 = ($260|0)==(0);
+  if (!($261)) {
+   $284 = $1;
+   $285 = $c;
+   _pushback($284,$285);
+   $286 = $1;
+   _tokfix($286);
+   $287 = $1;
+   $288 = $1;
+   $289 = (_tok($288)|0);
+   $290 = $1;
+   $291 = (_toklen($290)|0);
+   $292 = (_new_str($287,$289,$291)|0);
+   $293 = $1;
+   $294 = ((($293)) + 1132|0);
+   $295 = HEAP32[$294>>2]|0;
+   HEAP32[$295>>2] = $292;
+   $0 = 320;
+   $410 = $0;
+   STACKTOP = sp;return ($410|0);
+  }
+  while(1) {
+   $262 = $c;
+   $263 = ($262|0)==(10);
+   if ($263) {
+    $264 = $1;
+    $265 = ((($264)) + 32|0);
+    $266 = HEAP32[$265>>2]|0;
+    $267 = (($266) + 1)|0;
+    HEAP32[$265>>2] = $267;
+    $268 = $1;
+    $269 = ((($268)) + 36|0);
+    HEAP32[$269>>2] = 0;
+    $270 = $1;
+    _heredoc_treat_nextline($270);
+    $271 = $1;
+    $272 = ((($271)) + 1120|0);
+    $273 = HEAP32[$272>>2]|0;
+    $274 = ($273|0)!=(0|0);
+    if ($274) {
+     label = 60;
+     break;
+    }
+   }
+   $275 = $1;
+   $276 = (_nextc($275)|0);
+   $c = $276;
+   $277 = $c;
+   $278 = ($277|0)==(32);
+   if ($278) {
+    continue;
+   }
+   $279 = $c;
+   $280 = (($279) - 9)|0;
+   $281 = ($280>>>0)<(5);
+   if (!($281)) {
+    label = 63;
+    break;
+   }
+  }
+  if ((label|0) == 60) {
+   $0 = 367;
+   $410 = $0;
+   STACKTOP = sp;return ($410|0);
+  }
+  else if ((label|0) == 63) {
+   $282 = $1;
+   $283 = $c;
+   _pushback($282,$283);
+   $0 = 366;
+   $410 = $0;
+   STACKTOP = sp;return ($410|0);
+  }
+ }
+ else if ((label|0) == 66) {
+  $298 = $1;
+  _tokfix($298);
+  $299 = $1;
+  $300 = ((($299)) + 40|0);
+  HEAP32[$300>>2] = 1;
+  $301 = $1;
+  _end_strterm($301);
+  $302 = $type;
+  $303 = $302 & 128;
+  $304 = ($303|0)!=(0);
+  if ($304) {
+   $305 = $1;
+   $306 = $1;
+   $307 = (_tok($306)|0);
+   $308 = $1;
+   $309 = (_toklen($308)|0);
+   $310 = (_new_xstr($305,$307,$309)|0);
+   $311 = $1;
+   $312 = ((($311)) + 1132|0);
+   $313 = HEAP32[$312>>2]|0;
+   HEAP32[$313>>2] = $310;
+   $0 = 316;
+   $410 = $0;
+   STACKTOP = sp;return ($410|0);
+  }
+  $314 = $type;
+  $315 = $314 & 4;
+  $316 = ($315|0)!=(0);
+  if (!($316)) {
+   $401 = $1;
+   $402 = $1;
+   $403 = (_tok($402)|0);
+   $404 = $1;
+   $405 = (_toklen($404)|0);
+   $406 = (_new_str($401,$403,$405)|0);
+   $407 = $1;
+   $408 = ((($407)) + 1132|0);
+   $409 = HEAP32[$408>>2]|0;
+   HEAP32[$409>>2] = $406;
+   $0 = 318;
+   $410 = $0;
+   STACKTOP = sp;return ($410|0);
+  }
+  $f = 0;
+  $317 = $1;
+  $318 = $1;
+  $319 = (_tok($318)|0);
+  $320 = $1;
+  $321 = (_toklen($320)|0);
+  $322 = (_parser_strndup($317,$319,$321)|0);
+  $s1 = $322;
+  $flag = $flags;
+  HEAP8[$enc>>0] = 0;
+  $323 = $1;
+  (_newtok($323)|0);
+  L65: while(1) {
+   $324 = $1;
+   $325 = (_nextc($324)|0);
+   $re_opt = $325;
+   $326 = $re_opt;
+   $327 = ($326|0)>=(0);
+   if (!($327)) {
+    break;
+   }
+   $328 = $re_opt;
+   $329 = $328 | 32;
+   $330 = (($329) - 97)|0;
+   $331 = ($330>>>0)<(26);
+   if (!($331)) {
+    break;
+   }
+   $332 = $re_opt;
+   switch ($332|0) {
+   case 105:  {
+    $333 = $f;
+    $334 = $333 | 1;
+    $f = $334;
+    continue L65;
+    break;
+   }
+   case 120:  {
+    $335 = $f;
+    $336 = $335 | 2;
+    $f = $336;
+    continue L65;
+    break;
+   }
+   case 109:  {
+    $337 = $f;
+    $338 = $337 | 4;
+    $f = $338;
+    continue L65;
+    break;
+   }
+   case 117:  {
+    $339 = $f;
+    $340 = $339 | 16;
+    $f = $340;
+    continue L65;
+    break;
+   }
+   case 110:  {
+    $341 = $f;
+    $342 = $341 | 32;
+    $f = $342;
+    continue L65;
+    break;
+   }
+   default: {
+    $343 = $1;
+    $344 = $re_opt;
+    _tokadd($343,$344);
+    continue L65;
+   }
+   }
+  }
+  $345 = $1;
+  $346 = $re_opt;
+  _pushback($345,$346);
+  $347 = $1;
+  $348 = (_toklen($347)|0);
+  $349 = ($348|0)!=(0);
+  if ($349) {
+   $350 = $1;
+   _tokfix($350);
+   $351 = $1;
+   $352 = (_toklen($351)|0);
+   $353 = ($352|0)>(1);
+   $354 = $353 ? 57056 : 75440;
+   $355 = $1;
+   $356 = (_tok($355)|0);
+   HEAP32[$vararg_buffer6>>2] = $354;
+   $vararg_ptr9 = ((($vararg_buffer6)) + 4|0);
+   HEAP32[$vararg_ptr9>>2] = $356;
+   (_snprintf($msg,128,57058,$vararg_buffer6)|0);
+   $357 = $1;
+   _yyerror($357,$msg);
+  }
+  $358 = $f;
+  $359 = ($358|0)!=(0);
+  if ($359) {
+   $360 = $f;
+   $361 = $360 & 1;
+   $362 = ($361|0)!=(0);
+   if ($362) {
+    $363 = $flag;
+    $364 = ((($363)) + 1|0);
+    $flag = $364;
+    HEAP8[$363>>0] = 105;
+   }
+   $365 = $f;
+   $366 = $365 & 2;
+   $367 = ($366|0)!=(0);
+   if ($367) {
+    $368 = $flag;
+    $369 = ((($368)) + 1|0);
+    $flag = $369;
+    HEAP8[$368>>0] = 120;
+   }
+   $370 = $f;
+   $371 = $370 & 4;
+   $372 = ($371|0)!=(0);
+   if ($372) {
+    $373 = $flag;
+    $374 = ((($373)) + 1|0);
+    $flag = $374;
+    HEAP8[$373>>0] = 109;
+   }
+   $375 = $f;
+   $376 = $375 & 16;
+   $377 = ($376|0)!=(0);
+   if ($377) {
+    HEAP8[$enc>>0] = 117;
+   }
+   $378 = $f;
+   $379 = $378 & 32;
+   $380 = ($379|0)!=(0);
+   if ($380) {
+    HEAP8[$enc>>0] = 110;
+   }
+  }
+  $381 = $flag;
+  $382 = ($381>>>0)>($flags>>>0);
+  if ($382) {
+   $383 = $1;
+   $384 = $flag;
+   $385 = $384;
+   $386 = $flags;
+   $387 = (($385) - ($386))|0;
+   $388 = (_parser_strndup($383,$flags,$387)|0);
+   $dup = $388;
+  } else {
+   $dup = 0;
+  }
+  $389 = HEAP8[$enc>>0]|0;
+  $390 = ($389<<24>>24)!=(0);
+  if ($390) {
+   $391 = $1;
+   $392 = (_parser_strndup($391,$enc,1)|0);
+   $encp = $392;
+  } else {
+   $encp = 0;
+  }
+  $393 = $1;
+  $394 = $s1;
+  $395 = $dup;
+  $396 = $encp;
+  $397 = (_new_regx($393,$394,$395,$396)|0);
+  $398 = $1;
+  $399 = ((($398)) + 1132|0);
+  $400 = HEAP32[$399>>2]|0;
+  HEAP32[$400>>2] = $397;
+  $0 = 317;
+  $410 = $0;
+  STACKTOP = sp;return ($410|0);
+ }
+ return (0)|0;
+}
+function _parsing_heredoc_inf($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $nd = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $p;
+ $2 = $1;
+ $3 = ((($2)) + 1120|0);
+ $4 = HEAP32[$3>>2]|0;
+ $nd = $4;
+ $5 = $nd;
+ $6 = ($5|0)==(0|0);
+ if ($6) {
+  $0 = 0;
+  $11 = $0;
+  STACKTOP = sp;return ($11|0);
+ } else {
+  $7 = $nd;
+  $8 = HEAP32[$7>>2]|0;
+  $9 = ((($8)) + 4|0);
+  $10 = HEAP32[$9>>2]|0;
+  $0 = $10;
+  $11 = $0;
+  STACKTOP = sp;return ($11|0);
+ }
+ return (0)|0;
+}
+function _newtok($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = ((($1)) + 1108|0);
+ HEAP32[$2>>2] = 0;
+ $3 = $0;
+ $4 = ((($3)) + 36|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = (($5) - 1)|0;
+ STACKTOP = sp;return ($6|0);
+}
+function _nextc($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
+ var $81 = 0, $9 = 0, $c = 0, $tmp = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $p;
+ $2 = $1;
+ $3 = ((($2)) + 80|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)!=(0|0);
+ $6 = $1;
+ do {
+  if ($5) {
+   $7 = ((($6)) + 80|0);
+   $8 = HEAP32[$7>>2]|0;
+   $9 = HEAP32[$8>>2]|0;
+   $10 = $9;
+   $c = $10;
+   $11 = $1;
+   $12 = ((($11)) + 80|0);
+   $13 = HEAP32[$12>>2]|0;
+   $tmp = $13;
+   $14 = $1;
+   $15 = ((($14)) + 80|0);
+   $16 = HEAP32[$15>>2]|0;
+   $17 = ((($16)) + 4|0);
+   $18 = HEAP32[$17>>2]|0;
+   $19 = $1;
+   $20 = ((($19)) + 80|0);
+   HEAP32[$20>>2] = $18;
+   $21 = $1;
+   $22 = $tmp;
+   _cons_free_gen($21,$22);
+  } else {
+   $23 = ((($6)) + 20|0);
+   $24 = HEAP32[$23>>2]|0;
+   $25 = ($24|0)!=(0|0);
+   $26 = $1;
+   if ($25) {
+    $27 = ((($26)) + 20|0);
+    $28 = HEAP32[$27>>2]|0;
+    $29 = (_feof($28)|0);
+    $30 = ($29|0)!=(0);
+    if (!($30)) {
+     $31 = $1;
+     $32 = ((($31)) + 20|0);
+     $33 = HEAP32[$32>>2]|0;
+     $34 = (_fgetc($33)|0);
+     $c = $34;
+     $35 = $c;
+     $36 = ($35|0)==(-1);
+     if (!($36)) {
+      break;
+     }
+    }
+   } else {
+    $37 = ((($26)) + 12|0);
+    $38 = HEAP32[$37>>2]|0;
+    $39 = ($38|0)!=(0|0);
+    if ($39) {
+     $40 = $1;
+     $41 = ((($40)) + 12|0);
+     $42 = HEAP32[$41>>2]|0;
+     $43 = $1;
+     $44 = ((($43)) + 16|0);
+     $45 = HEAP32[$44>>2]|0;
+     $46 = ($42>>>0)>=($45>>>0);
+     if (!($46)) {
+      $47 = $1;
+      $48 = ((($47)) + 12|0);
+      $49 = HEAP32[$48>>2]|0;
+      $50 = ((($49)) + 1|0);
+      HEAP32[$48>>2] = $50;
+      $51 = HEAP8[$49>>0]|0;
+      $52 = $51&255;
+      $c = $52;
+      break;
+     }
+    }
+   }
+   $69 = $1;
+   $70 = ((($69)) + 24|0);
+   $71 = HEAP32[$70>>2]|0;
+   $72 = ($71|0)!=(0|0);
+   if (!($72)) {
+    $0 = -1;
+    $81 = $0;
+    STACKTOP = sp;return ($81|0);
+   }
+   $73 = $1;
+   $74 = ((($73)) + 24|0);
+   $75 = HEAP32[$74>>2]|0;
+   $76 = ((($75)) + 16|0);
+   $77 = HEAP32[$76>>2]|0;
+   $78 = $1;
+   $79 = (FUNCTION_TABLE_ii[$77 & 255]($78)|0);
+   $80 = ($79|0)<(0);
+   if ($80) {
+    $0 = -1;
+    $81 = $0;
+    STACKTOP = sp;return ($81|0);
+   } else {
+    $0 = -2;
+    $81 = $0;
+    STACKTOP = sp;return ($81|0);
+   }
+  }
+ } while(0);
+ $53 = $c;
+ $54 = ($53|0)>=(0);
+ if ($54) {
+  $55 = $1;
+  $56 = ((($55)) + 36|0);
+  $57 = HEAP32[$56>>2]|0;
+  $58 = (($57) + 1)|0;
+  HEAP32[$56>>2] = $58;
+ }
+ $59 = $c;
+ $60 = ($59|0)==(13);
+ if (!($60)) {
+  $68 = $c;
+  $0 = $68;
+  $81 = $0;
+  STACKTOP = sp;return ($81|0);
+ }
+ $61 = $1;
+ $62 = (_nextc($61)|0);
+ $c = $62;
+ $63 = $c;
+ $64 = ($63|0)!=(10);
+ if ($64) {
+  $65 = $1;
+  $66 = $c;
+  _pushback($65,$66);
+  $0 = 13;
+  $81 = $0;
+  STACKTOP = sp;return ($81|0);
+ } else {
+  $67 = $c;
+  $0 = $67;
+  $81 = $0;
+  STACKTOP = sp;return ($81|0);
+ }
+ return (0)|0;
+}
+function _cons_free_gen($p,$cons) {
+ $p = $p|0;
+ $cons = $cons|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $cons;
+ $2 = $0;
+ $3 = ((($2)) + 8|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $1;
+ $6 = ((($5)) + 4|0);
+ HEAP32[$6>>2] = $4;
+ $7 = $1;
+ $8 = $0;
+ $9 = ((($8)) + 8|0);
+ HEAP32[$9>>2] = $7;
+ STACKTOP = sp;return;
+}
+function _pushback($p,$c) {
+ $p = $p|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $c;
+ $2 = $1;
+ $3 = ($2|0)>=(0);
+ if ($3) {
+  $4 = $0;
+  $5 = ((($4)) + 36|0);
+  $6 = HEAP32[$5>>2]|0;
+  $7 = (($6) + -1)|0;
+  HEAP32[$5>>2] = $7;
+ }
+ $8 = $0;
+ $9 = $1;
+ $10 = $9;
+ $11 = $0;
+ $12 = ((($11)) + 80|0);
+ $13 = HEAP32[$12>>2]|0;
+ $14 = (_cons_gen($8,$10,$13)|0);
+ $15 = $0;
+ $16 = ((($15)) + 80|0);
+ HEAP32[$16>>2] = $14;
+ STACKTOP = sp;return;
+}
+function _tokadd($p,$c) {
+ $p = $p|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $8 = 0, $9 = 0, $i = 0, $len = 0;
+ var $utf8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $utf8 = sp + 16|0;
+ $0 = $p;
+ $1 = $c;
+ $2 = $1;
+ $3 = ($2|0)>=(0);
+ $4 = $1;
+ do {
+  if ($3) {
+   $5 = $4&255;
+   HEAP8[$utf8>>0] = $5;
+   $len = 1;
+  } else {
+   $6 = (0 - ($4))|0;
+   $1 = $6;
+   $7 = $1;
+   $8 = ($7|0)<(128);
+   $9 = $1;
+   if ($8) {
+    $10 = $9&255;
+    HEAP8[$utf8>>0] = $10;
+    $len = 1;
+    break;
+   }
+   $11 = ($9|0)<(2048);
+   $12 = $1;
+   if ($11) {
+    $13 = $12 >> 6;
+    $14 = 192 | $13;
+    $15 = $14&255;
+    HEAP8[$utf8>>0] = $15;
+    $16 = $1;
+    $17 = $16 & 63;
+    $18 = 128 | $17;
+    $19 = $18&255;
+    $20 = ((($utf8)) + 1|0);
+    HEAP8[$20>>0] = $19;
+    $len = 2;
+    break;
+   }
+   $21 = ($12|0)<(65536);
+   $22 = $1;
+   if ($21) {
+    $23 = $22 >> 12;
+    $24 = 224 | $23;
+    $25 = $24&255;
+    HEAP8[$utf8>>0] = $25;
+    $26 = $1;
+    $27 = $26 >> 6;
+    $28 = $27 & 63;
+    $29 = 128 | $28;
+    $30 = $29&255;
+    $31 = ((($utf8)) + 1|0);
+    HEAP8[$31>>0] = $30;
+    $32 = $1;
+    $33 = $32 & 63;
+    $34 = 128 | $33;
+    $35 = $34&255;
+    $36 = ((($utf8)) + 2|0);
+    HEAP8[$36>>0] = $35;
+    $len = 3;
+    break;
+   } else {
+    $37 = $22 >> 18;
+    $38 = 240 | $37;
+    $39 = $38&255;
+    HEAP8[$utf8>>0] = $39;
+    $40 = $1;
+    $41 = $40 >> 12;
+    $42 = $41 & 63;
+    $43 = 128 | $42;
+    $44 = $43&255;
+    $45 = ((($utf8)) + 1|0);
+    HEAP8[$45>>0] = $44;
+    $46 = $1;
+    $47 = $46 >> 6;
+    $48 = $47 & 63;
+    $49 = 128 | $48;
+    $50 = $49&255;
+    $51 = ((($utf8)) + 2|0);
+    HEAP8[$51>>0] = $50;
+    $52 = $1;
+    $53 = $52 & 63;
+    $54 = 128 | $53;
+    $55 = $54&255;
+    $56 = ((($utf8)) + 3|0);
+    HEAP8[$56>>0] = $55;
+    $len = 4;
+    break;
+   }
+  }
+ } while(0);
+ $57 = $0;
+ $58 = ((($57)) + 1108|0);
+ $59 = HEAP32[$58>>2]|0;
+ $60 = $len;
+ $61 = (($59) + ($60))|0;
+ $62 = ($61>>>0)<=(1024);
+ if (!($62)) {
+  STACKTOP = sp;return;
+ }
+ $i = 0;
+ while(1) {
+  $63 = $i;
+  $64 = $len;
+  $65 = ($63>>>0)<($64>>>0);
+  if (!($65)) {
+   break;
+  }
+  $66 = $i;
+  $67 = (($utf8) + ($66)|0);
+  $68 = HEAP8[$67>>0]|0;
+  $69 = $0;
+  $70 = ((($69)) + 1108|0);
+  $71 = HEAP32[$70>>2]|0;
+  $72 = (($71) + 1)|0;
+  HEAP32[$70>>2] = $72;
+  $73 = $0;
+  $74 = ((($73)) + 84|0);
+  $75 = (($74) + ($71)|0);
+  HEAP8[$75>>0] = $68;
+  $76 = $i;
+  $77 = (($76) + 1)|0;
+  $i = $77;
+ }
+ STACKTOP = sp;return;
+}
+function _tokfix($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $imax = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = ((($1)) + 1108|0);
+ $3 = HEAP32[$2>>2]|0;
+ $i = $3;
+ $imax = 1023;
+ $4 = $i;
+ $5 = $imax;
+ $6 = ($4|0)>($5|0);
+ if ($6) {
+  $7 = $imax;
+  $i = $7;
+  $8 = $0;
+  _yyerror($8,56813);
+ }
+ $9 = $i;
+ $10 = $0;
+ $11 = ((($10)) + 84|0);
+ $12 = (($11) + ($9)|0);
+ HEAP8[$12>>0] = 0;
+ STACKTOP = sp;return;
+}
+function _yyerror($p,$s) {
+ $p = $p|0;
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $8 = 0, $9 = 0, $c = 0, $n = 0, $vararg_buffer = 0, $vararg_buffer4 = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr3 = 0;
+ var $vararg_ptr7 = 0, $vararg_ptr8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer4 = sp + 16|0;
+ $vararg_buffer = sp;
+ $0 = $p;
+ $1 = $s;
+ $2 = $0;
+ $3 = ((($2)) + 1148|0);
+ $4 = HEAP8[$3>>0]|0;
+ $5 = ($4&255) >>> 1;
+ $6 = $5 & 1;
+ $7 = ($6<<24>>24)!=(0);
+ $8 = $0;
+ if ($7) {
+  $29 = ((($8)) + 1136|0);
+  $30 = HEAP32[$29>>2]|0;
+  $31 = ($30>>>0)<(10);
+  if (!($31)) {
+   $69 = $0;
+   $70 = ((($69)) + 1136|0);
+   $71 = HEAP32[$70>>2]|0;
+   $72 = (($71) + 1)|0;
+   HEAP32[$70>>2] = $72;
+   STACKTOP = sp;return;
+  }
+  $32 = $1;
+  $33 = (_strlen($32)|0);
+  $n = $33;
+  $34 = $0;
+  $35 = $n;
+  $36 = (($35) + 1)|0;
+  $37 = (_parser_palloc($34,$36)|0);
+  $c = $37;
+  $38 = $c;
+  $39 = $1;
+  $40 = $n;
+  $41 = (($40) + 1)|0;
+  _memcpy(($38|0),($39|0),($41|0))|0;
+  $42 = $c;
+  $43 = $0;
+  $44 = ((($43)) + 1136|0);
+  $45 = HEAP32[$44>>2]|0;
+  $46 = $0;
+  $47 = ((($46)) + 1152|0);
+  $48 = (($47) + (($45*12)|0)|0);
+  $49 = ((($48)) + 8|0);
+  HEAP32[$49>>2] = $42;
+  $50 = $0;
+  $51 = ((($50)) + 32|0);
+  $52 = HEAP32[$51>>2]|0;
+  $53 = $0;
+  $54 = ((($53)) + 1136|0);
+  $55 = HEAP32[$54>>2]|0;
+  $56 = $0;
+  $57 = ((($56)) + 1152|0);
+  $58 = (($57) + (($55*12)|0)|0);
+  HEAP32[$58>>2] = $52;
+  $59 = $0;
+  $60 = ((($59)) + 36|0);
+  $61 = HEAP32[$60>>2]|0;
+  $62 = $0;
+  $63 = ((($62)) + 1136|0);
+  $64 = HEAP32[$63>>2]|0;
+  $65 = $0;
+  $66 = ((($65)) + 1152|0);
+  $67 = (($66) + (($64*12)|0)|0);
+  $68 = ((($67)) + 4|0);
+  HEAP32[$68>>2] = $61;
+  $69 = $0;
+  $70 = ((($69)) + 1136|0);
+  $71 = HEAP32[$70>>2]|0;
+  $72 = (($71) + 1)|0;
+  HEAP32[$70>>2] = $72;
+  STACKTOP = sp;return;
+ }
+ $9 = ((($8)) + 28|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = ($10|0)!=(0|0);
+ $12 = HEAP32[637]|0;
+ $13 = $0;
+ if ($11) {
+  $14 = ((($13)) + 28|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = $0;
+  $17 = ((($16)) + 32|0);
+  $18 = HEAP32[$17>>2]|0;
+  $19 = $0;
+  $20 = ((($19)) + 36|0);
+  $21 = HEAP32[$20>>2]|0;
+  $22 = $1;
+  HEAP32[$vararg_buffer>>2] = $15;
+  $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+  HEAP32[$vararg_ptr1>>2] = $18;
+  $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+  HEAP32[$vararg_ptr2>>2] = $21;
+  $vararg_ptr3 = ((($vararg_buffer)) + 12|0);
+  HEAP32[$vararg_ptr3>>2] = $22;
+  (_fprintf($12,56841,$vararg_buffer)|0);
+  $69 = $0;
+  $70 = ((($69)) + 1136|0);
+  $71 = HEAP32[$70>>2]|0;
+  $72 = (($71) + 1)|0;
+  HEAP32[$70>>2] = $72;
+  STACKTOP = sp;return;
+ } else {
+  $23 = ((($13)) + 32|0);
+  $24 = HEAP32[$23>>2]|0;
+  $25 = $0;
+  $26 = ((($25)) + 36|0);
+  $27 = HEAP32[$26>>2]|0;
+  $28 = $1;
+  HEAP32[$vararg_buffer4>>2] = $24;
+  $vararg_ptr7 = ((($vararg_buffer4)) + 4|0);
+  HEAP32[$vararg_ptr7>>2] = $27;
+  $vararg_ptr8 = ((($vararg_buffer4)) + 8|0);
+  HEAP32[$vararg_ptr8>>2] = $28;
+  (_fprintf($12,56856,$vararg_buffer4)|0);
+  $69 = $0;
+  $70 = ((($69)) + 1136|0);
+  $71 = HEAP32[$70>>2]|0;
+  $72 = (($71) + 1)|0;
+  HEAP32[$70>>2] = $72;
+  STACKTOP = sp;return;
+ }
+}
+function _tok($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = ((($1)) + 84|0);
+ STACKTOP = sp;return ($2|0);
+}
+function _toklen($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = ((($1)) + 1108|0);
+ $3 = HEAP32[$2>>2]|0;
+ STACKTOP = sp;return ($3|0);
+}
+function _new_str($p,$s,$len) {
+ $p = $p|0;
+ $s = $s|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $s;
+ $2 = $len;
+ $3 = $0;
+ $4 = $0;
+ $5 = $0;
+ $6 = $1;
+ $7 = $2;
+ $8 = (_parser_strndup($5,$6,$7)|0);
+ $9 = $2;
+ $10 = $9;
+ $11 = (_cons_gen($4,$8,$10)|0);
+ $12 = (_cons_gen($3,(55),$11)|0);
+ STACKTOP = sp;return ($12|0);
+}
+function _parser_strndup($p,$s,$len) {
+ $p = $p|0;
+ $s = $s|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $b = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $s;
+ $2 = $len;
+ $3 = $0;
+ $4 = $2;
+ $5 = (($4) + 1)|0;
+ $6 = (_parser_palloc($3,$5)|0);
+ $b = $6;
+ $7 = $b;
+ $8 = $1;
+ $9 = $2;
+ _memcpy(($7|0),($8|0),($9|0))|0;
+ $10 = $2;
+ $11 = $b;
+ $12 = (($11) + ($10)|0);
+ HEAP8[$12>>0] = 0;
+ $13 = $b;
+ STACKTOP = sp;return ($13|0);
+}
+function _read_escape($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
+ var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
+ var $189 = 0, $19 = 0, $190 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0;
+ var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0;
+ var $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0;
+ var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0;
+ var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $buf = 0, $buf1 = 0, $buf3 = 0, $c = 0, $i = 0, $i2 = 0, $i4 = 0, $or$cond = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $buf = sp + 60|0;
+ $i = sp + 56|0;
+ $buf1 = sp + 48|0;
+ $i2 = sp + 40|0;
+ $buf3 = sp + 4|0;
+ $i4 = sp;
+ $1 = $p;
+ $2 = $1;
+ $3 = (_nextc($2)|0);
+ $c = $3;
+ L1: do {
+  switch ($3|0) {
+  case 92:  {
+   $4 = $c;
+   $0 = $4;
+   $190 = $0;
+   STACKTOP = sp;return ($190|0);
+   break;
+  }
+  case 110:  {
+   $0 = 10;
+   $190 = $0;
+   STACKTOP = sp;return ($190|0);
+   break;
+  }
+  case 116:  {
+   $0 = 9;
+   $190 = $0;
+   STACKTOP = sp;return ($190|0);
+   break;
+  }
+  case 114:  {
+   $0 = 13;
+   $190 = $0;
+   STACKTOP = sp;return ($190|0);
+   break;
+  }
+  case 102:  {
+   $0 = 12;
+   $190 = $0;
+   STACKTOP = sp;return ($190|0);
+   break;
+  }
+  case 118:  {
+   $0 = 11;
+   $190 = $0;
+   STACKTOP = sp;return ($190|0);
+   break;
+  }
+  case 97:  {
+   $0 = 7;
+   $190 = $0;
+   STACKTOP = sp;return ($190|0);
+   break;
+  }
+  case 101:  {
+   $0 = 27;
+   $190 = $0;
+   STACKTOP = sp;return ($190|0);
+   break;
+  }
+  case 55: case 54: case 53: case 52: case 51: case 50: case 49: case 48:  {
+   $5 = $c;
+   HEAP32[$buf>>2] = $5;
+   HEAP32[$i>>2] = 1;
+   while(1) {
+    $6 = HEAP32[$i>>2]|0;
+    $7 = ($6|0)<(3);
+    if (!($7)) {
+     break;
+    }
+    $8 = $1;
+    $9 = (_nextc($8)|0);
+    $10 = HEAP32[$i>>2]|0;
+    $11 = (($buf) + ($10<<2)|0);
+    HEAP32[$11>>2] = $9;
+    $12 = HEAP32[$i>>2]|0;
+    $13 = (($buf) + ($12<<2)|0);
+    $14 = HEAP32[$13>>2]|0;
+    $15 = ($14|0)<(0);
+    if ($15) {
+     break L1;
+    }
+    $16 = HEAP32[$i>>2]|0;
+    $17 = (($buf) + ($16<<2)|0);
+    $18 = HEAP32[$17>>2]|0;
+    $19 = ($18|0)<(48);
+    if ($19) {
+     label = 15;
+     break;
+    }
+    $20 = HEAP32[$i>>2]|0;
+    $21 = (($buf) + ($20<<2)|0);
+    $22 = HEAP32[$21>>2]|0;
+    $23 = (55)<($22|0);
+    if ($23) {
+     label = 15;
+     break;
+    }
+    $28 = HEAP32[$i>>2]|0;
+    $29 = (($28) + 1)|0;
+    HEAP32[$i>>2] = $29;
+   }
+   if ((label|0) == 15) {
+    $24 = $1;
+    $25 = HEAP32[$i>>2]|0;
+    $26 = (($buf) + ($25<<2)|0);
+    $27 = HEAP32[$26>>2]|0;
+    _pushback($24,$27);
+   }
+   $30 = HEAP32[$i>>2]|0;
+   $31 = (_scan_oct($buf,$30,$i)|0);
+   $c = $31;
+   $32 = $c;
+   $0 = $32;
+   $190 = $0;
+   STACKTOP = sp;return ($190|0);
+   break;
+  }
+  case 120:  {
+   HEAP32[$i2>>2] = 0;
+   while(1) {
+    $33 = HEAP32[$i2>>2]|0;
+    $34 = ($33|0)<(2);
+    if (!($34)) {
+     break;
+    }
+    $35 = $1;
+    $36 = (_nextc($35)|0);
+    $37 = HEAP32[$i2>>2]|0;
+    $38 = (($buf1) + ($37<<2)|0);
+    HEAP32[$38>>2] = $36;
+    $39 = HEAP32[$i2>>2]|0;
+    $40 = (($buf1) + ($39<<2)|0);
+    $41 = HEAP32[$40>>2]|0;
+    $42 = ($41|0)<(0);
+    if ($42) {
+     break L1;
+    }
+    $43 = HEAP32[$i2>>2]|0;
+    $44 = (($buf1) + ($43<<2)|0);
+    $45 = HEAP32[$44>>2]|0;
+    $46 = (($45) - 48)|0;
+    $47 = ($46>>>0)<(10);
+    if (!($47)) {
+     $48 = HEAP32[$i2>>2]|0;
+     $49 = (($buf1) + ($48<<2)|0);
+     $50 = HEAP32[$49>>2]|0;
+     $51 = $50 | 32;
+     $52 = (($51) - 97)|0;
+     $53 = ($52>>>0)<(6);
+     if (!($53)) {
+      label = 23;
+      break;
+     }
+    }
+    $58 = HEAP32[$i2>>2]|0;
+    $59 = (($58) + 1)|0;
+    HEAP32[$i2>>2] = $59;
+   }
+   if ((label|0) == 23) {
+    $54 = $1;
+    $55 = HEAP32[$i2>>2]|0;
+    $56 = (($buf1) + ($55<<2)|0);
+    $57 = HEAP32[$56>>2]|0;
+    _pushback($54,$57);
+   }
+   $60 = HEAP32[$i2>>2]|0;
+   $61 = (_scan_hex($buf1,$60,$i2)|0);
+   $c = $61;
+   $62 = HEAP32[$i2>>2]|0;
+   $63 = ($62|0)==(0);
+   if ($63) {
+    $64 = $1;
+    _yyerror($64,56997);
+    $0 = 0;
+    $190 = $0;
+    STACKTOP = sp;return ($190|0);
+   } else {
+    $65 = $c;
+    $0 = $65;
+    $190 = $0;
+    STACKTOP = sp;return ($190|0);
+   }
+   break;
+  }
+  case 117:  {
+   HEAP32[$i4>>2] = 0;
+   $66 = $1;
+   $67 = (_nextc($66)|0);
+   HEAP32[$buf3>>2] = $67;
+   $68 = HEAP32[$buf3>>2]|0;
+   $69 = ($68|0)<(0);
+   if (!($69)) {
+    $70 = HEAP32[$buf3>>2]|0;
+    $71 = ($70|0)==(123);
+    L49: do {
+     if ($71) {
+      HEAP32[$i4>>2] = 0;
+      while(1) {
+       $72 = HEAP32[$i4>>2]|0;
+       $73 = ($72|0)<(9);
+       if (!($73)) {
+        break L49;
+       }
+       $74 = $1;
+       $75 = (_nextc($74)|0);
+       $76 = HEAP32[$i4>>2]|0;
+       $77 = (($buf3) + ($76<<2)|0);
+       HEAP32[$77>>2] = $75;
+       $78 = HEAP32[$i4>>2]|0;
+       $79 = (($buf3) + ($78<<2)|0);
+       $80 = HEAP32[$79>>2]|0;
+       $81 = ($80|0)<(0);
+       if ($81) {
+        break L1;
+       }
+       $82 = HEAP32[$i4>>2]|0;
+       $83 = (($buf3) + ($82<<2)|0);
+       $84 = HEAP32[$83>>2]|0;
+       $85 = ($84|0)==(125);
+       if ($85) {
+        break L49;
+       }
+       $86 = HEAP32[$i4>>2]|0;
+       $87 = (($buf3) + ($86<<2)|0);
+       $88 = HEAP32[$87>>2]|0;
+       $89 = (($88) - 48)|0;
+       $90 = ($89>>>0)<(10);
+       if (!($90)) {
+        $91 = HEAP32[$i4>>2]|0;
+        $92 = (($buf3) + ($91<<2)|0);
+        $93 = HEAP32[$92>>2]|0;
+        $94 = $93 | 32;
+        $95 = (($94) - 97)|0;
+        $96 = ($95>>>0)<(6);
+        if (!($96)) {
+         break;
+        }
+       }
+       $102 = HEAP32[$i4>>2]|0;
+       $103 = (($102) + 1)|0;
+       HEAP32[$i4>>2] = $103;
+      }
+      $97 = $1;
+      _yyerror($97,56997);
+      $98 = $1;
+      $99 = HEAP32[$i4>>2]|0;
+      $100 = (($buf3) + ($99<<2)|0);
+      $101 = HEAP32[$100>>2]|0;
+      _pushback($98,$101);
+      $0 = 0;
+      $190 = $0;
+      STACKTOP = sp;return ($190|0);
+     } else {
+      $104 = HEAP32[$buf3>>2]|0;
+      $105 = (($104) - 48)|0;
+      $106 = ($105>>>0)<(10);
+      if (!($106)) {
+       $107 = HEAP32[$buf3>>2]|0;
+       $108 = $107 | 32;
+       $109 = (($108) - 97)|0;
+       $110 = ($109>>>0)<(6);
+       if (!($110)) {
+        $138 = $1;
+        $139 = HEAP32[$buf3>>2]|0;
+        _pushback($138,$139);
+        break;
+       }
+      }
+      HEAP32[$i4>>2] = 1;
+      while(1) {
+       $111 = HEAP32[$i4>>2]|0;
+       $112 = ($111|0)<(4);
+       if (!($112)) {
+        break L49;
+       }
+       $113 = $1;
+       $114 = (_nextc($113)|0);
+       $115 = HEAP32[$i4>>2]|0;
+       $116 = (($buf3) + ($115<<2)|0);
+       HEAP32[$116>>2] = $114;
+       $117 = HEAP32[$i4>>2]|0;
+       $118 = (($buf3) + ($117<<2)|0);
+       $119 = HEAP32[$118>>2]|0;
+       $120 = ($119|0)<(0);
+       if ($120) {
+        break L1;
+       }
+       $121 = HEAP32[$i4>>2]|0;
+       $122 = (($buf3) + ($121<<2)|0);
+       $123 = HEAP32[$122>>2]|0;
+       $124 = (($123) - 48)|0;
+       $125 = ($124>>>0)<(10);
+       if (!($125)) {
+        $126 = HEAP32[$i4>>2]|0;
+        $127 = (($buf3) + ($126<<2)|0);
+        $128 = HEAP32[$127>>2]|0;
+        $129 = $128 | 32;
+        $130 = (($129) - 97)|0;
+        $131 = ($130>>>0)<(6);
+        if (!($131)) {
+         break;
+        }
+       }
+       $136 = HEAP32[$i4>>2]|0;
+       $137 = (($136) + 1)|0;
+       HEAP32[$i4>>2] = $137;
+      }
+      $132 = $1;
+      $133 = HEAP32[$i4>>2]|0;
+      $134 = (($buf3) + ($133<<2)|0);
+      $135 = HEAP32[$134>>2]|0;
+      _pushback($132,$135);
+     }
+    } while(0);
+    $140 = HEAP32[$i4>>2]|0;
+    $141 = (_scan_hex($buf3,$140,$i4)|0);
+    $c = $141;
+    $142 = HEAP32[$i4>>2]|0;
+    $143 = ($142|0)==(0);
+    if ($143) {
+     $144 = $1;
+     _yyerror($144,56997);
+     $0 = 0;
+     $190 = $0;
+     STACKTOP = sp;return ($190|0);
+    }
+    $145 = $c;
+    $146 = ($145|0)<(0);
+    $147 = $c;
+    $148 = ($147|0)>(1114111);
+    $or$cond = $146 | $148;
+    if (!($or$cond)) {
+     $149 = $c;
+     $150 = $149 & -2048;
+     $151 = ($150|0)==(55296);
+     if (!($151)) {
+      $153 = $c;
+      $154 = (0 - ($153))|0;
+      $0 = $154;
+      $190 = $0;
+      STACKTOP = sp;return ($190|0);
+     }
+    }
+    $152 = $1;
+    _yyerror($152,57029);
+    $0 = 0;
+    $190 = $0;
+    STACKTOP = sp;return ($190|0);
+   }
+   break;
+  }
+  case 98:  {
+   $0 = 8;
+   $190 = $0;
+   STACKTOP = sp;return ($190|0);
+   break;
+  }
+  case 115:  {
+   $0 = 32;
+   $190 = $0;
+   STACKTOP = sp;return ($190|0);
+   break;
+  }
+  case 77:  {
+   $155 = $1;
+   $156 = (_nextc($155)|0);
+   $c = $156;
+   $157 = ($156|0)!=(45);
+   $158 = $1;
+   if ($157) {
+    _yyerror($158,56997);
+    $159 = $1;
+    $160 = $c;
+    _pushback($159,$160);
+    $0 = 0;
+    $190 = $0;
+    STACKTOP = sp;return ($190|0);
+   }
+   $161 = (_nextc($158)|0);
+   $c = $161;
+   $162 = ($161|0)==(92);
+   if ($162) {
+    $163 = $1;
+    $164 = (_read_escape($163)|0);
+    $165 = $164 | 128;
+    $0 = $165;
+    $190 = $0;
+    STACKTOP = sp;return ($190|0);
+   }
+   $166 = $c;
+   $167 = ($166|0)<(0);
+   if (!($167)) {
+    $168 = $c;
+    $169 = $168 & 255;
+    $170 = $169 | 128;
+    $0 = $170;
+    $190 = $0;
+    STACKTOP = sp;return ($190|0);
+   }
+   break;
+  }
+  case 67:  {
+   $171 = $1;
+   $172 = (_nextc($171)|0);
+   $c = $172;
+   $173 = ($172|0)!=(45);
+   if ($173) {
+    $174 = $1;
+    _yyerror($174,56997);
+    $175 = $1;
+    $176 = $c;
+    _pushback($175,$176);
+    $0 = 0;
+    $190 = $0;
+    STACKTOP = sp;return ($190|0);
+   } else {
+    label = 64;
+   }
+   break;
+  }
+  case 99:  {
+   label = 64;
+   break;
+  }
+  case -2: case -1:  {
+   break;
+  }
+  default: {
+   $189 = $c;
+   $0 = $189;
+   $190 = $0;
+   STACKTOP = sp;return ($190|0);
+  }
+  }
+ } while(0);
+ L103: do {
+  if ((label|0) == 64) {
+   $177 = $1;
+   $178 = (_nextc($177)|0);
+   $c = $178;
+   $179 = ($178|0)==(92);
+   do {
+    if ($179) {
+     $180 = $1;
+     $181 = (_read_escape($180)|0);
+     $c = $181;
+    } else {
+     $182 = $c;
+     $183 = ($182|0)==(63);
+     if (!($183)) {
+      $184 = $c;
+      $185 = ($184|0)<(0);
+      if ($185) {
+       break L103;
+      } else {
+       break;
+      }
+     }
+     $0 = 127;
+     $190 = $0;
+     STACKTOP = sp;return ($190|0);
+    }
+   } while(0);
+   $186 = $c;
+   $187 = $186 & 159;
+   $0 = $187;
+   $190 = $0;
+   STACKTOP = sp;return ($190|0);
+  }
+ } while(0);
+ $188 = $1;
+ _yyerror($188,56997);
+ $0 = 0;
+ $190 = $0;
+ STACKTOP = sp;return ($190|0);
+}
+function _scan_oct($start,$len,$retlen) {
+ $start = $start|0;
+ $len = $len|0;
+ $retlen = $retlen|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $retval = 0, $s = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $start;
+ $1 = $len;
+ $2 = $retlen;
+ $3 = $0;
+ $s = $3;
+ $retval = 0;
+ while(1) {
+  $4 = $1;
+  $5 = (($4) + -1)|0;
+  $1 = $5;
+  $6 = ($4|0)!=(0);
+  if (!($6)) {
+   break;
+  }
+  $7 = $s;
+  $8 = HEAP32[$7>>2]|0;
+  $9 = ($8|0)>=(48);
+  if (!($9)) {
+   break;
+  }
+  $10 = $s;
+  $11 = HEAP32[$10>>2]|0;
+  $12 = ($11|0)<=(55);
+  if (!($12)) {
+   break;
+  }
+  $13 = $retval;
+  $14 = $13 << 3;
+  $retval = $14;
+  $15 = $s;
+  $16 = ((($15)) + 4|0);
+  $s = $16;
+  $17 = HEAP32[$15>>2]|0;
+  $18 = (($17) - 48)|0;
+  $19 = $retval;
+  $20 = $19 | $18;
+  $retval = $20;
+ }
+ $21 = $s;
+ $22 = $0;
+ $23 = $21;
+ $24 = $22;
+ $25 = (($23) - ($24))|0;
+ $26 = (($25|0) / 4)&-1;
+ $27 = $2;
+ HEAP32[$27>>2] = $26;
+ $28 = $retval;
+ STACKTOP = sp;return ($28|0);
+}
+function _scan_hex($start,$len,$retlen) {
+ $start = $start|0;
+ $len = $len|0;
+ $retlen = $retlen|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $retval = 0, $s = 0, $tmp = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $start;
+ $1 = $len;
+ $2 = $retlen;
+ $3 = $0;
+ $s = $3;
+ $retval = 0;
+ while(1) {
+  $4 = $1;
+  $5 = (($4) + -1)|0;
+  $1 = $5;
+  $6 = ($4|0)!=(0);
+  if (!($6)) {
+   break;
+  }
+  $7 = $s;
+  $8 = HEAP32[$7>>2]|0;
+  $9 = ($8|0)!=(0);
+  if (!($9)) {
+   break;
+  }
+  $10 = $s;
+  $11 = HEAP32[$10>>2]|0;
+  $12 = (_strchr(56964,$11)|0);
+  $tmp = $12;
+  $13 = ($12|0)!=(0|0);
+  if (!($13)) {
+   break;
+  }
+  $14 = $retval;
+  $15 = $14 << 4;
+  $retval = $15;
+  $16 = $tmp;
+  $17 = $16;
+  $18 = (($17) - (56964))|0;
+  $19 = $18 & 15;
+  $20 = $retval;
+  $21 = $20 | $19;
+  $retval = $21;
+  $22 = $s;
+  $23 = ((($22)) + 4|0);
+  $s = $23;
+ }
+ $24 = $s;
+ $25 = $0;
+ $26 = $24;
+ $27 = $25;
+ $28 = (($26) - ($27))|0;
+ $29 = (($28|0) / 4)&-1;
+ $30 = $2;
+ HEAP32[$30>>2] = $29;
+ $31 = $retval;
+ STACKTOP = sp;return ($31|0);
+}
+function _heredoc_treat_nextline($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
+ var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0;
+ var $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0;
+ var $99 = 0, $m = 0, $n = 0, $n1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = ((($1)) + 1116|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)==(0|0);
+ if ($4) {
+  STACKTOP = sp;return;
+ }
+ $5 = $0;
+ $6 = ((($5)) + 1120|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ($7|0)==(0|0);
+ $9 = $0;
+ $10 = ((($9)) + 1116|0);
+ $11 = HEAP32[$10>>2]|0;
+ do {
+  if ($8) {
+   $12 = $0;
+   $13 = ((($12)) + 1120|0);
+   HEAP32[$13>>2] = $11;
+   $14 = $0;
+   $15 = ((($14)) + 44|0);
+   $16 = HEAP32[$15>>2]|0;
+   $17 = $0;
+   $18 = ((($17)) + 1124|0);
+   HEAP32[$18>>2] = $16;
+   $19 = $0;
+   $20 = $0;
+   $21 = (_parsing_heredoc_inf($20)|0);
+   $22 = ((($21)) + 4|0);
+   $23 = HEAP32[$22>>2]|0;
+   $24 = (_new_strterm($19,$23,0,0)|0);
+   $25 = $0;
+   $26 = ((($25)) + 44|0);
+   HEAP32[$26>>2] = $24;
+   $27 = $0;
+   $28 = ((($27)) + 1112|0);
+   $29 = HEAP32[$28>>2]|0;
+   $n = $29;
+   $30 = $n;
+   $31 = ($30|0)!=(0|0);
+   if (!($31)) {
+    $44 = $0;
+    $45 = ((($44)) + 1120|0);
+    $46 = HEAP32[$45>>2]|0;
+    $47 = $0;
+    $48 = ((($47)) + 1112|0);
+    HEAP32[$48>>2] = $46;
+    break;
+   }
+   while(1) {
+    $32 = $n;
+    $33 = ((($32)) + 4|0);
+    $34 = HEAP32[$33>>2]|0;
+    $35 = ($34|0)!=(0|0);
+    if (!($35)) {
+     break;
+    }
+    $36 = $n;
+    $37 = ((($36)) + 4|0);
+    $38 = HEAP32[$37>>2]|0;
+    $n = $38;
+   }
+   $39 = $0;
+   $40 = ((($39)) + 1120|0);
+   $41 = HEAP32[$40>>2]|0;
+   $42 = $n;
+   $43 = ((($42)) + 4|0);
+   HEAP32[$43>>2] = $41;
+  } else {
+   $m = $11;
+   while(1) {
+    $49 = $m;
+    $50 = ((($49)) + 4|0);
+    $51 = HEAP32[$50>>2]|0;
+    $52 = ($51|0)!=(0|0);
+    if (!($52)) {
+     break;
+    }
+    $53 = $m;
+    $54 = ((($53)) + 4|0);
+    $55 = HEAP32[$54>>2]|0;
+    $m = $55;
+   }
+   $56 = $0;
+   $57 = ((($56)) + 1112|0);
+   $58 = HEAP32[$57>>2]|0;
+   $n1 = $58;
+   $59 = $n1;
+   $60 = $0;
+   $61 = ((($60)) + 1120|0);
+   $62 = HEAP32[$61>>2]|0;
+   $63 = ($59|0)==($62|0);
+   if ($63) {
+    $64 = $n1;
+    $65 = $m;
+    $66 = ((($65)) + 4|0);
+    HEAP32[$66>>2] = $64;
+    $67 = $0;
+    $68 = ((($67)) + 1116|0);
+    $69 = HEAP32[$68>>2]|0;
+    $70 = $0;
+    $71 = ((($70)) + 1112|0);
+    HEAP32[$71>>2] = $69;
+    $72 = $0;
+    $73 = ((($72)) + 1116|0);
+    $74 = HEAP32[$73>>2]|0;
+    $75 = $0;
+    $76 = ((($75)) + 1120|0);
+    HEAP32[$76>>2] = $74;
+    break;
+   }
+   while(1) {
+    $77 = $n1;
+    $78 = ((($77)) + 4|0);
+    $79 = HEAP32[$78>>2]|0;
+    $80 = $0;
+    $81 = ((($80)) + 1120|0);
+    $82 = HEAP32[$81>>2]|0;
+    $83 = ($79|0)!=($82|0);
+    $84 = $n1;
+    $85 = ((($84)) + 4|0);
+    $86 = HEAP32[$85>>2]|0;
+    if (!($83)) {
+     break;
+    }
+    $n1 = $86;
+   }
+   $87 = $m;
+   $88 = ((($87)) + 4|0);
+   HEAP32[$88>>2] = $86;
+   $89 = $0;
+   $90 = ((($89)) + 1116|0);
+   $91 = HEAP32[$90>>2]|0;
+   $92 = $n1;
+   $93 = ((($92)) + 4|0);
+   HEAP32[$93>>2] = $91;
+   $94 = $0;
+   $95 = ((($94)) + 1116|0);
+   $96 = HEAP32[$95>>2]|0;
+   $97 = $0;
+   $98 = ((($97)) + 1120|0);
+   HEAP32[$98>>2] = $96;
+  }
+ } while(0);
+ $99 = $0;
+ $100 = ((($99)) + 1116|0);
+ HEAP32[$100>>2] = 0;
+ STACKTOP = sp;return;
+}
+function _new_strterm($p,$type,$term,$paren) {
+ $p = $p|0;
+ $type = $type|0;
+ $term = $term|0;
+ $paren = $paren|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $type;
+ $2 = $term;
+ $3 = $paren;
+ $4 = $0;
+ $5 = $1;
+ $6 = $5;
+ $7 = $0;
+ $8 = $0;
+ $9 = $3;
+ $10 = $9;
+ $11 = $2;
+ $12 = $11;
+ $13 = (_cons_gen($8,$10,$12)|0);
+ $14 = (_cons_gen($7,0,$13)|0);
+ $15 = (_cons_gen($4,$6,$14)|0);
+ STACKTOP = sp;return ($15|0);
+}
+function _end_strterm($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = $0;
+ $3 = ((($2)) + 44|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ((($4)) + 4|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = ((($6)) + 4|0);
+ $8 = HEAP32[$7>>2]|0;
+ _cons_free_gen($1,$8);
+ $9 = $0;
+ $10 = $0;
+ $11 = ((($10)) + 44|0);
+ $12 = HEAP32[$11>>2]|0;
+ $13 = ((($12)) + 4|0);
+ $14 = HEAP32[$13>>2]|0;
+ _cons_free_gen($9,$14);
+ $15 = $0;
+ $16 = $0;
+ $17 = ((($16)) + 44|0);
+ $18 = HEAP32[$17>>2]|0;
+ _cons_free_gen($15,$18);
+ $19 = $0;
+ $20 = ((($19)) + 44|0);
+ HEAP32[$20>>2] = 0;
+ STACKTOP = sp;return;
+}
+function _new_xstr($p,$s,$len) {
+ $p = $p|0;
+ $s = $s|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $s;
+ $2 = $len;
+ $3 = $0;
+ $4 = $0;
+ $5 = $0;
+ $6 = $1;
+ $7 = $2;
+ $8 = (_parser_strndup($5,$6,$7)|0);
+ $9 = $2;
+ $10 = $9;
+ $11 = (_cons_gen($4,$8,$10)|0);
+ $12 = (_cons_gen($3,(57),$11)|0);
+ STACKTOP = sp;return ($12|0);
+}
+function _new_regx($p,$p1,$p2,$p3) {
+ $p = $p|0;
+ $p1 = $p1|0;
+ $p2 = $p2|0;
+ $p3 = $p3|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $p1;
+ $2 = $p2;
+ $3 = $p3;
+ $4 = $0;
+ $5 = $0;
+ $6 = $1;
+ $7 = $0;
+ $8 = $2;
+ $9 = $3;
+ $10 = (_cons_gen($7,$8,$9)|0);
+ $11 = (_cons_gen($5,$6,$10)|0);
+ $12 = (_cons_gen($4,(59),$11)|0);
+ STACKTOP = sp;return ($12|0);
+}
+function _skip($p,$term) {
+ $p = $p|0;
+ $term = $term|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $term;
+ while(1) {
+  $2 = $0;
+  $3 = (_nextc($2)|0);
+  $c = $3;
+  $4 = $c;
+  $5 = ($4|0)<(0);
+  if ($5) {
+   label = 4;
+   break;
+  }
+  $6 = $c;
+  $7 = $1;
+  $8 = $7 << 24 >> 24;
+  $9 = ($6|0)==($8|0);
+  if ($9) {
+   label = 4;
+   break;
+  }
+ }
+ if ((label|0) == 4) {
+  STACKTOP = sp;return;
+ }
+}
+function _intern_gen($p,$s,$len) {
+ $p = $p|0;
+ $s = $s|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $s;
+ $2 = $len;
+ $3 = $0;
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $1;
+ $6 = $2;
+ $7 = (_mrb_intern($4,$5,$6)|0);
+ STACKTOP = sp;return ($7|0);
+}
+function _intern_gen_c($p,$c) {
+ $p = $p|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = sp + 4|0;
+ $0 = $p;
+ HEAP8[$1>>0] = $c;
+ $2 = $0;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = (_mrb_intern($3,$1,1)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _yywarning($p,$s) {
+ $p = $p|0;
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $s;
+ $2 = $0;
+ $3 = $1;
+ _yywarn($2,$3);
+ STACKTOP = sp;return;
+}
+function _yywarn($p,$s) {
+ $p = $p|0;
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $8 = 0, $9 = 0, $c = 0, $n = 0, $vararg_buffer = 0, $vararg_buffer4 = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr3 = 0;
+ var $vararg_ptr7 = 0, $vararg_ptr8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer4 = sp + 16|0;
+ $vararg_buffer = sp;
+ $0 = $p;
+ $1 = $s;
+ $2 = $0;
+ $3 = ((($2)) + 1148|0);
+ $4 = HEAP8[$3>>0]|0;
+ $5 = ($4&255) >>> 1;
+ $6 = $5 & 1;
+ $7 = ($6<<24>>24)!=(0);
+ $8 = $0;
+ if ($7) {
+  $29 = ((($8)) + 1140|0);
+  $30 = HEAP32[$29>>2]|0;
+  $31 = ($30>>>0)<(10);
+  if (!($31)) {
+   $69 = $0;
+   $70 = ((($69)) + 1140|0);
+   $71 = HEAP32[$70>>2]|0;
+   $72 = (($71) + 1)|0;
+   HEAP32[$70>>2] = $72;
+   STACKTOP = sp;return;
+  }
+  $32 = $1;
+  $33 = (_strlen($32)|0);
+  $n = $33;
+  $34 = $0;
+  $35 = $n;
+  $36 = (($35) + 1)|0;
+  $37 = (_parser_palloc($34,$36)|0);
+  $c = $37;
+  $38 = $c;
+  $39 = $1;
+  $40 = $n;
+  $41 = (($40) + 1)|0;
+  _memcpy(($38|0),($39|0),($41|0))|0;
+  $42 = $c;
+  $43 = $0;
+  $44 = ((($43)) + 1140|0);
+  $45 = HEAP32[$44>>2]|0;
+  $46 = $0;
+  $47 = ((($46)) + 1272|0);
+  $48 = (($47) + (($45*12)|0)|0);
+  $49 = ((($48)) + 8|0);
+  HEAP32[$49>>2] = $42;
+  $50 = $0;
+  $51 = ((($50)) + 32|0);
+  $52 = HEAP32[$51>>2]|0;
+  $53 = $0;
+  $54 = ((($53)) + 1140|0);
+  $55 = HEAP32[$54>>2]|0;
+  $56 = $0;
+  $57 = ((($56)) + 1272|0);
+  $58 = (($57) + (($55*12)|0)|0);
+  HEAP32[$58>>2] = $52;
+  $59 = $0;
+  $60 = ((($59)) + 36|0);
+  $61 = HEAP32[$60>>2]|0;
+  $62 = $0;
+  $63 = ((($62)) + 1140|0);
+  $64 = HEAP32[$63>>2]|0;
+  $65 = $0;
+  $66 = ((($65)) + 1272|0);
+  $67 = (($66) + (($64*12)|0)|0);
+  $68 = ((($67)) + 4|0);
+  HEAP32[$68>>2] = $61;
+  $69 = $0;
+  $70 = ((($69)) + 1140|0);
+  $71 = HEAP32[$70>>2]|0;
+  $72 = (($71) + 1)|0;
+  HEAP32[$70>>2] = $72;
+  STACKTOP = sp;return;
+ }
+ $9 = ((($8)) + 28|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = ($10|0)!=(0|0);
+ $12 = HEAP32[637]|0;
+ $13 = $0;
+ if ($11) {
+  $14 = ((($13)) + 28|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = $0;
+  $17 = ((($16)) + 32|0);
+  $18 = HEAP32[$17>>2]|0;
+  $19 = $0;
+  $20 = ((($19)) + 36|0);
+  $21 = HEAP32[$20>>2]|0;
+  $22 = $1;
+  HEAP32[$vararg_buffer>>2] = $15;
+  $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+  HEAP32[$vararg_ptr1>>2] = $18;
+  $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+  HEAP32[$vararg_ptr2>>2] = $21;
+  $vararg_ptr3 = ((($vararg_buffer)) + 12|0);
+  HEAP32[$vararg_ptr3>>2] = $22;
+  (_fprintf($12,56841,$vararg_buffer)|0);
+  $69 = $0;
+  $70 = ((($69)) + 1140|0);
+  $71 = HEAP32[$70>>2]|0;
+  $72 = (($71) + 1)|0;
+  HEAP32[$70>>2] = $72;
+  STACKTOP = sp;return;
+ } else {
+  $23 = ((($13)) + 32|0);
+  $24 = HEAP32[$23>>2]|0;
+  $25 = $0;
+  $26 = ((($25)) + 36|0);
+  $27 = HEAP32[$26>>2]|0;
+  $28 = $1;
+  HEAP32[$vararg_buffer4>>2] = $24;
+  $vararg_ptr7 = ((($vararg_buffer4)) + 4|0);
+  HEAP32[$vararg_ptr7>>2] = $27;
+  $vararg_ptr8 = ((($vararg_buffer4)) + 8|0);
+  HEAP32[$vararg_ptr8>>2] = $28;
+  (_fprintf($12,56856,$vararg_buffer4)|0);
+  $69 = $0;
+  $70 = ((($69)) + 1140|0);
+  $71 = HEAP32[$70>>2]|0;
+  $72 = (($71) + 1)|0;
+  HEAP32[$70>>2] = $72;
+  STACKTOP = sp;return;
+ }
+}
+function _peeks($p,$s) {
+ $p = $p|0;
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $len = 0, $n = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $p;
+ $2 = $s;
+ $3 = $2;
+ $4 = (_strlen($3)|0);
+ $len = $4;
+ $5 = $1;
+ $6 = ((($5)) + 20|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ($7|0)!=(0|0);
+ if ($8) {
+  $n = 0;
+  while(1) {
+   $9 = $2;
+   $10 = HEAP8[$9>>0]|0;
+   $11 = ($10<<24>>24)!=(0);
+   if (!($11)) {
+    label = 6;
+    break;
+   }
+   $12 = $1;
+   $13 = $2;
+   $14 = ((($13)) + 1|0);
+   $2 = $14;
+   $15 = HEAP8[$13>>0]|0;
+   $16 = $15 << 24 >> 24;
+   $17 = $n;
+   $18 = (($17) + 1)|0;
+   $n = $18;
+   $19 = (_peek_n($12,$16,$17)|0);
+   $20 = ($19<<24>>24)!=(0);
+   if (!($20)) {
+    label = 5;
+    break;
+   }
+  }
+  if ((label|0) == 5) {
+   $0 = 0;
+   $41 = $0;
+   STACKTOP = sp;return ($41|0);
+  }
+  else if ((label|0) == 6) {
+   $0 = 1;
+   $41 = $0;
+   STACKTOP = sp;return ($41|0);
+  }
+ } else {
+  $21 = $1;
+  $22 = ((($21)) + 12|0);
+  $23 = HEAP32[$22>>2]|0;
+  $24 = ($23|0)!=(0|0);
+  if ($24) {
+   $25 = $1;
+   $26 = ((($25)) + 12|0);
+   $27 = HEAP32[$26>>2]|0;
+   $28 = $len;
+   $29 = (($27) + ($28)|0);
+   $30 = $1;
+   $31 = ((($30)) + 16|0);
+   $32 = HEAP32[$31>>2]|0;
+   $33 = ($29>>>0)<=($32>>>0);
+   if ($33) {
+    $34 = $1;
+    $35 = ((($34)) + 12|0);
+    $36 = HEAP32[$35>>2]|0;
+    $37 = $2;
+    $38 = $len;
+    $39 = (_memcmp($36,$37,$38)|0);
+    $40 = ($39|0)==(0);
+    if ($40) {
+     $0 = 1;
+     $41 = $0;
+     STACKTOP = sp;return ($41|0);
+    }
+   }
+  }
+  $0 = 0;
+  $41 = $0;
+  STACKTOP = sp;return ($41|0);
+ }
+ return (0)|0;
+}
+function _peek_n($p,$c,$n) {
+ $p = $p|0;
+ $c = $c|0;
+ $n = $n|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $c;
+ $2 = $n;
+ $3 = $0;
+ $4 = $2;
+ $5 = (_peekc_n($3,$4)|0);
+ $6 = $1;
+ $7 = ($5|0)==($6|0);
+ $8 = $1;
+ $9 = ($8|0)>=(0);
+ $10 = $7 ? $9 : 0;
+ $11 = $10&1;
+ $12 = $11&255;
+ STACKTOP = sp;return ($12|0);
+}
+function _peekc_n($p,$n) {
+ $p = $p|0;
+ $n = $n|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c0 = 0, $list = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $p;
+ $2 = $n;
+ $list = 0;
+ while(1) {
+  $3 = $1;
+  $4 = (_nextc($3)|0);
+  $c0 = $4;
+  $5 = $c0;
+  $6 = ($5|0)==(-1);
+  if ($6) {
+   label = 3;
+   break;
+  }
+  $8 = $1;
+  $9 = $list;
+  $10 = $1;
+  $11 = $c0;
+  $12 = $11;
+  $13 = (_list1_gen($10,$12)|0);
+  $14 = (_append_gen($8,$9,$13)|0);
+  $list = $14;
+  $15 = $2;
+  $16 = (($15) + -1)|0;
+  $2 = $16;
+  $17 = ($15|0)!=(0);
+  if (!($17)) {
+   break;
+  }
+ }
+ if ((label|0) == 3) {
+  $7 = $c0;
+  $0 = $7;
+  $34 = $0;
+  STACKTOP = sp;return ($34|0);
+ }
+ $18 = $1;
+ $19 = ((($18)) + 80|0);
+ $20 = HEAP32[$19>>2]|0;
+ $21 = ($20|0)!=(0|0);
+ if ($21) {
+  $22 = $1;
+  $23 = $list;
+  $24 = $1;
+  $25 = ((($24)) + 80|0);
+  $26 = HEAP32[$25>>2]|0;
+  $27 = (_append_gen($22,$23,$26)|0);
+  $28 = $1;
+  $29 = ((($28)) + 80|0);
+  HEAP32[$29>>2] = $27;
+ } else {
+  $30 = $list;
+  $31 = $1;
+  $32 = ((($31)) + 80|0);
+  HEAP32[$32>>2] = $30;
+ }
+ $33 = $c0;
+ $0 = $33;
+ $34 = $0;
+ STACKTOP = sp;return ($34|0);
+}
+function _skips($p,$s) {
+ $p = $p|0;
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, $c = 0, $len = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $p;
+ $2 = $s;
+ while(1) {
+  $3 = $1;
+  $4 = (_nextc($3)|0);
+  $c = $4;
+  $5 = $c;
+  $6 = ($5|0)<(0);
+  $7 = $c;
+  if ($6) {
+   label = 3;
+   break;
+  }
+  $9 = ($7|0)==(10);
+  if ($9) {
+   $10 = $1;
+   $11 = ((($10)) + 32|0);
+   $12 = HEAP32[$11>>2]|0;
+   $13 = (($12) + 1)|0;
+   HEAP32[$11>>2] = $13;
+   $14 = $1;
+   $15 = ((($14)) + 36|0);
+   HEAP32[$15>>2] = 0;
+  }
+  $16 = $c;
+  $17 = $2;
+  $18 = HEAP8[$17>>0]|0;
+  $19 = $18 << 24 >> 24;
+  $20 = ($16|0)==($19|0);
+  if (!($20)) {
+   continue;
+  }
+  $21 = $2;
+  $22 = ((($21)) + 1|0);
+  $2 = $22;
+  $23 = $1;
+  $24 = $2;
+  $25 = (_peeks($23,$24)|0);
+  $26 = ($25<<24>>24)!=(0);
+  $27 = $2;
+  if ($26) {
+   break;
+  }
+  $41 = ((($27)) + -1|0);
+  $2 = $41;
+ }
+ if ((label|0) == 3) {
+  $8 = $7&255;
+  $0 = $8;
+  $42 = $0;
+  STACKTOP = sp;return ($42|0);
+ }
+ $28 = (_strlen($27)|0);
+ $len = $28;
+ while(1) {
+  $29 = $len;
+  $30 = (($29) + -1)|0;
+  $len = $30;
+  $31 = ($29|0)!=(0);
+  if (!($31)) {
+   break;
+  }
+  $32 = $1;
+  $33 = (_nextc($32)|0);
+  $34 = ($33|0)==(10);
+  if (!($34)) {
+   continue;
+  }
+  $35 = $1;
+  $36 = ((($35)) + 32|0);
+  $37 = HEAP32[$36>>2]|0;
+  $38 = (($37) + 1)|0;
+  HEAP32[$36>>2] = $38;
+  $39 = $1;
+  $40 = ((($39)) + 36|0);
+  HEAP32[$40>>2] = 0;
+ }
+ $0 = 1;
+ $42 = $0;
+ STACKTOP = sp;return ($42|0);
+}
+function _heredoc_identifier($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0;
+ var $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0;
+ var $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0;
+ var $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0;
+ var $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0;
+ var $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $c = 0, $indent = 0, $info = 0, $newnode = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $or$cond5$not = 0, $or$cond7 = 0, $or$cond9 = 0, $quote = 0;
+ var $term = 0, $type = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $p;
+ $type = 65;
+ $indent = 0;
+ $quote = 0;
+ $2 = $1;
+ $3 = (_nextc($2)|0);
+ $c = $3;
+ $4 = $c;
+ $5 = ($4|0)==(32);
+ if (!($5)) {
+  $6 = $c;
+  $7 = (($6) - 9)|0;
+  $8 = ($7>>>0)<(5);
+  $9 = $c;
+  $10 = ($9|0)==(61);
+  $or$cond = $8 | $10;
+  if (!($or$cond)) {
+   $13 = $c;
+   $14 = ($13|0)==(45);
+   if ($14) {
+    $indent = 1;
+    $15 = $1;
+    $16 = (_nextc($15)|0);
+    $c = $16;
+   }
+   $17 = $c;
+   $18 = ($17|0)==(39);
+   $19 = $c;
+   $20 = ($19|0)==(34);
+   $or$cond3 = $18 | $20;
+   $21 = $c;
+   if ($or$cond3) {
+    $term = $21;
+    $22 = $c;
+    $23 = ($22|0)==(39);
+    if ($23) {
+     $quote = 1;
+    }
+    $24 = $1;
+    (_newtok($24)|0);
+    while(1) {
+     $25 = $1;
+     $26 = (_nextc($25)|0);
+     $c = $26;
+     $27 = ($26|0)>=(0);
+     if (!($27)) {
+      break;
+     }
+     $28 = $c;
+     $29 = $term;
+     $30 = ($28|0)!=($29|0);
+     if (!($30)) {
+      break;
+     }
+     $31 = $c;
+     $32 = ($31|0)==(10);
+     if ($32) {
+      label = 13;
+      break;
+     }
+     $33 = $1;
+     $34 = $c;
+     _tokadd($33,$34);
+    }
+    if ((label|0) == 13) {
+     $c = -1;
+    }
+    $35 = $c;
+    $36 = ($35|0)<(0);
+    if ($36) {
+     $37 = $1;
+     _yyerror($37,57167);
+     $0 = 0;
+     $128 = $0;
+     STACKTOP = sp;return ($128|0);
+    }
+   } else {
+    $38 = ($21|0)<(0);
+    if ($38) {
+     $0 = 0;
+     $128 = $0;
+     STACKTOP = sp;return ($128|0);
+    }
+    $39 = $c;
+    $40 = $39 | 32;
+    $41 = (($40) - 97)|0;
+    $42 = ($41>>>0)<(26);
+    if (!($42)) {
+     $43 = $c;
+     $44 = (($43) - 48)|0;
+     $45 = ($44>>>0)<(10);
+     $46 = $c;
+     $47 = ($46|0)==(95);
+     $or$cond5 = $45 | $47;
+     $or$cond5$not = $or$cond5 ^ 1;
+     $48 = $c;
+     $49 = ($48>>>0)<=(127);
+     $or$cond7 = $or$cond5$not & $49;
+     if ($or$cond7) {
+      $50 = $1;
+      $51 = $c;
+      _pushback($50,$51);
+      $52 = $indent;
+      $53 = ($52<<24>>24)!=(0);
+      if ($53) {
+       $54 = $1;
+       _pushback($54,45);
+      }
+      $0 = 0;
+      $128 = $0;
+      STACKTOP = sp;return ($128|0);
+     }
+    }
+    $55 = $1;
+    (_newtok($55)|0);
+    while(1) {
+     $56 = $1;
+     $57 = $c;
+     _tokadd($56,$57);
+     $58 = $1;
+     $59 = (_nextc($58)|0);
+     $c = $59;
+     $60 = ($59|0)>=(0);
+     if (!($60)) {
+      break;
+     }
+     $61 = $c;
+     $62 = $61 | 32;
+     $63 = (($62) - 97)|0;
+     $64 = ($63>>>0)<(26);
+     if ($64) {
+      continue;
+     }
+     $65 = $c;
+     $66 = (($65) - 48)|0;
+     $67 = ($66>>>0)<(10);
+     $68 = $c;
+     $69 = ($68|0)==(95);
+     $or$cond9 = $67 | $69;
+     if ($or$cond9) {
+      continue;
+     }
+     $70 = $c;
+     $71 = ($70>>>0)<=(127);
+     $72 = $71 ^ 1;
+     if (!($72)) {
+      break;
+     }
+    }
+    $73 = $1;
+    $74 = $c;
+    _pushback($73,$74);
+   }
+   $75 = $1;
+   _tokfix($75);
+   $76 = $1;
+   $77 = (_new_heredoc($76)|0);
+   $newnode = $77;
+   $78 = $newnode;
+   $79 = ((($78)) + 4|0);
+   $80 = HEAP32[$79>>2]|0;
+   $info = $80;
+   $81 = $1;
+   $82 = $1;
+   $83 = (_tok($82)|0);
+   $84 = $1;
+   $85 = (_toklen($84)|0);
+   $86 = (_parser_strndup($81,$83,$85)|0);
+   $87 = $info;
+   $88 = ((($87)) + 8|0);
+   HEAP32[$88>>2] = $86;
+   $89 = $1;
+   $90 = (_toklen($89)|0);
+   $91 = $info;
+   $92 = ((($91)) + 12|0);
+   HEAP32[$92>>2] = $90;
+   $93 = $quote;
+   $94 = ($93<<24>>24)!=(0);
+   if (!($94)) {
+    $95 = $type;
+    $96 = $95 | 2;
+    $type = $96;
+   }
+   $97 = $type;
+   $98 = $info;
+   $99 = ((($98)) + 4|0);
+   HEAP32[$99>>2] = $97;
+   $100 = $indent;
+   $101 = $info;
+   $102 = HEAP8[$101>>0]|0;
+   $103 = $100 & 1;
+   $104 = $102 & -2;
+   $105 = $104 | $103;
+   HEAP8[$101>>0] = $105;
+   $106 = $info;
+   $107 = HEAP8[$106>>0]|0;
+   $108 = $107 & -3;
+   $109 = $108 | 2;
+   HEAP8[$106>>0] = $109;
+   $110 = $info;
+   $111 = ((($110)) + 16|0);
+   HEAP32[$111>>2] = 0;
+   $112 = $1;
+   $113 = $1;
+   $114 = ((($113)) + 1116|0);
+   $115 = HEAP32[$114>>2]|0;
+   $116 = $1;
+   $117 = $newnode;
+   $118 = (_list1_gen($116,$117)|0);
+   $119 = (_append_gen($112,$115,$118)|0);
+   $120 = $1;
+   $121 = ((($120)) + 1116|0);
+   HEAP32[$121>>2] = $119;
+   $122 = $1;
+   $123 = ((($122)) + 40|0);
+   HEAP32[$123>>2] = 1;
+   $124 = $newnode;
+   $125 = $1;
+   $126 = ((($125)) + 1132|0);
+   $127 = HEAP32[$126>>2]|0;
+   HEAP32[$127>>2] = $124;
+   $0 = 364;
+   $128 = $0;
+   STACKTOP = sp;return ($128|0);
+  }
+ }
+ $11 = $1;
+ $12 = $c;
+ _pushback($11,$12);
+ $0 = 0;
+ $128 = $0;
+ STACKTOP = sp;return ($128|0);
+}
+function _new_heredoc($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $inf = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = (_parser_palloc($1,20)|0);
+ $inf = $2;
+ $3 = $0;
+ $4 = $inf;
+ $5 = (_cons_gen($3,(99),$4)|0);
+ STACKTOP = sp;return ($5|0);
+}
+function _arg_ambiguous($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ _yywarning($1,57312);
+ STACKTOP = sp;return 1;
+}
+function _new_int($p,$s,$base) {
+ $p = $p|0;
+ $s = $s|0;
+ $base = $base|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $s;
+ $2 = $base;
+ $3 = $0;
+ $4 = $0;
+ $5 = $1;
+ $6 = (_parser_strdup($4,$5)|0);
+ $7 = $2;
+ $8 = $7;
+ $9 = (_list3_gen($3,(50),$6,$8)|0);
+ STACKTOP = sp;return ($9|0);
+}
+function _parser_strdup($p,$s) {
+ $p = $p|0;
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $s;
+ $2 = $0;
+ $3 = $1;
+ $4 = $1;
+ $5 = (_strlen($4)|0);
+ $6 = (_parser_strndup($2,$3,$5)|0);
+ STACKTOP = sp;return ($6|0);
+}
+function _list3_gen($p,$a,$b,$c) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $c;
+ $4 = $0;
+ $5 = $1;
+ $6 = $0;
+ $7 = $2;
+ $8 = $0;
+ $9 = $3;
+ $10 = (_cons_gen($8,$9,0)|0);
+ $11 = (_cons_gen($6,$7,$10)|0);
+ $12 = (_cons_gen($4,$5,$11)|0);
+ STACKTOP = sp;return ($12|0);
+}
+function _yyerror_i($p,$fmt,$i) {
+ $p = $p|0;
+ $fmt = $fmt|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $buf = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 272|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $buf = sp + 16|0;
+ $0 = $p;
+ $1 = $fmt;
+ $2 = $i;
+ $3 = $1;
+ $4 = $2;
+ HEAP32[$vararg_buffer>>2] = $4;
+ (_snprintf($buf,256,$3,$vararg_buffer)|0);
+ $5 = $0;
+ _yyerror($5,$buf);
+ STACKTOP = sp;return;
+}
+function _yywarning_s($p,$fmt,$s) {
+ $p = $p|0;
+ $fmt = $fmt|0;
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $buf = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 272|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $buf = sp + 16|0;
+ $0 = $p;
+ $1 = $fmt;
+ $2 = $s;
+ $3 = $1;
+ $4 = $2;
+ HEAP32[$vararg_buffer>>2] = $4;
+ (_snprintf($buf,256,$3,$vararg_buffer)|0);
+ $5 = $0;
+ _yywarning($5,$buf);
+ STACKTOP = sp;return;
+}
+function _new_float($p,$s) {
+ $p = $p|0;
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $s;
+ $2 = $0;
+ $3 = $0;
+ $4 = $1;
+ $5 = (_parser_strdup($3,$4)|0);
+ $6 = (_cons_gen($2,(51),$5)|0);
+ STACKTOP = sp;return ($6|0);
+}
+function _intern_cstr_gen($p,$s) {
+ $p = $p|0;
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $s;
+ $2 = $0;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $1;
+ $5 = (_mrb_intern_cstr($3,$4)|0);
+ STACKTOP = sp;return ($5|0);
+}
+function _new_back_ref($p,$n) {
+ $p = $p|0;
+ $n = $n|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $n;
+ $2 = $0;
+ $3 = $1;
+ $4 = $3;
+ $5 = (_cons_gen($2,(46),$4)|0);
+ STACKTOP = sp;return ($5|0);
+}
+function _new_nth_ref($p,$n) {
+ $p = $p|0;
+ $n = $n|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $n;
+ $2 = $0;
+ $3 = $1;
+ $4 = $3;
+ $5 = (_cons_gen($2,(45),$4)|0);
+ STACKTOP = sp;return ($5|0);
+}
+function _toklast($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = ((($1)) + 1108|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = (($3) - 1)|0;
+ $5 = $0;
+ $6 = ((($5)) + 84|0);
+ $7 = (($6) + ($4)|0);
+ $8 = HEAP8[$7>>0]|0;
+ $9 = $8 << 24 >> 24;
+ STACKTOP = sp;return ($9|0);
+}
+function _reserved_word($str,$len) {
+ $str = $str|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $key = 0, $or$cond = 0, $or$cond3 = 0, $s = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $str;
+ $2 = $len;
+ $3 = $2;
+ $4 = ($3>>>0)<=(12);
+ $5 = $2;
+ $6 = ($5>>>0)>=(2);
+ $or$cond = $4 & $6;
+ if ($or$cond) {
+  $7 = $1;
+  $8 = $2;
+  $9 = (_hash($7,$8)|0);
+  $key = $9;
+  $10 = $key;
+  $11 = ($10|0)<=(50);
+  $12 = $key;
+  $13 = ($12|0)>=(0);
+  $or$cond3 = $11 & $13;
+  if ($or$cond3) {
+   $14 = $key;
+   $15 = (504 + ($14<<4)|0);
+   $16 = HEAP32[$15>>2]|0;
+   $s = $16;
+   $17 = $1;
+   $18 = HEAP8[$17>>0]|0;
+   $19 = $18 << 24 >> 24;
+   $20 = $s;
+   $21 = HEAP8[$20>>0]|0;
+   $22 = $21 << 24 >> 24;
+   $23 = ($19|0)==($22|0);
+   if ($23) {
+    $24 = $1;
+    $25 = ((($24)) + 1|0);
+    $26 = $s;
+    $27 = ((($26)) + 1|0);
+    $28 = (_strcmp($25,$27)|0);
+    $29 = ($28|0)!=(0);
+    if (!($29)) {
+     $30 = $key;
+     $31 = (504 + ($30<<4)|0);
+     $0 = $31;
+     $32 = $0;
+     STACKTOP = sp;return ($32|0);
+    }
+   }
+  }
+ }
+ $0 = 0;
+ $32 = $0;
+ STACKTOP = sp;return ($32|0);
+}
+function _hash($str,$len) {
+ $str = $str|0;
+ $len = $len|0;
+ var $$off = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $hval = 0, $switch = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $str;
+ $1 = $len;
+ $2 = $1;
+ $hval = $2;
+ $3 = $hval;
+ $$off = (($3) + -1)|0;
+ $switch = ($$off>>>0)<(2);
+ if (!($switch)) {
+  $4 = $0;
+  $5 = ((($4)) + 2|0);
+  $6 = HEAP8[$5>>0]|0;
+  $7 = $6&255;
+  $8 = (57895 + ($7)|0);
+  $9 = HEAP8[$8>>0]|0;
+  $10 = $9&255;
+  $11 = $hval;
+  $12 = (($11) + ($10))|0;
+  $hval = $12;
+ }
+ $13 = $0;
+ $14 = HEAP8[$13>>0]|0;
+ $15 = $14&255;
+ $16 = (57895 + ($15)|0);
+ $17 = HEAP8[$16>>0]|0;
+ $18 = $17&255;
+ $19 = $hval;
+ $20 = (($19) + ($18))|0;
+ $hval = $20;
+ $21 = $hval;
+ $22 = $1;
+ $23 = (($22) - 1)|0;
+ $24 = $0;
+ $25 = (($24) + ($23)|0);
+ $26 = HEAP8[$25>>0]|0;
+ $27 = $26&255;
+ $28 = (57895 + ($27)|0);
+ $29 = HEAP8[$28>>0]|0;
+ $30 = $29&255;
+ $31 = (($21) + ($30))|0;
+ STACKTOP = sp;return ($31|0);
+}
+function _new_scope($p,$body) {
+ $p = $p|0;
+ $body = $body|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $body;
+ $2 = $0;
+ $3 = $0;
+ $4 = $0;
+ $5 = (_locals_node($4)|0);
+ $6 = $1;
+ $7 = (_cons_gen($3,$5,$6)|0);
+ $8 = (_cons_gen($2,(3),$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _locals_node($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = ((($1)) + 76|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)!=(0|0);
+ if (!($4)) {
+  $9 = 0;
+  STACKTOP = sp;return ($9|0);
+ }
+ $5 = $0;
+ $6 = ((($5)) + 76|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = HEAP32[$7>>2]|0;
+ $9 = $8;
+ STACKTOP = sp;return ($9|0);
+}
+function _new_begin($p,$body) {
+ $p = $p|0;
+ $body = $body|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $p;
+ $2 = $body;
+ $3 = $2;
+ $4 = ($3|0)!=(0|0);
+ $5 = $1;
+ if ($4) {
+  $6 = $2;
+  $7 = (_list2_gen($5,(17),$6)|0);
+  $0 = $7;
+ } else {
+  $8 = (_cons_gen($5,(17),0)|0);
+  $0 = $8;
+ }
+ $9 = $0;
+ STACKTOP = sp;return ($9|0);
+}
+function _list2_gen($p,$a,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $0;
+ $4 = $1;
+ $5 = $0;
+ $6 = $2;
+ $7 = (_cons_gen($5,$6,0)|0);
+ $8 = (_cons_gen($3,$4,$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _local_switch($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $prev = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = ((($1)) + 76|0);
+ $3 = HEAP32[$2>>2]|0;
+ $prev = $3;
+ $4 = $0;
+ $5 = (_cons_gen($4,0,0)|0);
+ $6 = $0;
+ $7 = ((($6)) + 76|0);
+ HEAP32[$7>>2] = $5;
+ $8 = $prev;
+ STACKTOP = sp;return ($8|0);
+}
+function _local_resume($p,$prev) {
+ $p = $p|0;
+ $prev = $prev|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $prev;
+ $2 = $1;
+ $3 = $0;
+ $4 = ((($3)) + 76|0);
+ HEAP32[$4>>2] = $2;
+ STACKTOP = sp;return;
+}
+function _new_rescue($p,$body,$resq,$els) {
+ $p = $p|0;
+ $body = $body|0;
+ $resq = $resq|0;
+ $els = $els|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $body;
+ $2 = $resq;
+ $3 = $els;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = $3;
+ $8 = (_list4_gen($4,(18),$5,$6,$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _list4_gen($p,$a,$b,$c,$d) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ $c = $c|0;
+ $d = $d|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $c;
+ $4 = $d;
+ $5 = $0;
+ $6 = $1;
+ $7 = $0;
+ $8 = $2;
+ $9 = $0;
+ $10 = $3;
+ $11 = $0;
+ $12 = $4;
+ $13 = (_cons_gen($11,$12,0)|0);
+ $14 = (_cons_gen($9,$10,$13)|0);
+ $15 = (_cons_gen($7,$8,$14)|0);
+ $16 = (_cons_gen($5,$6,$15)|0);
+ STACKTOP = sp;return ($16|0);
+}
+function _new_ensure($p,$a,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $0;
+ $4 = $0;
+ $5 = $1;
+ $6 = $0;
+ $7 = $2;
+ $8 = (_cons_gen($6,0,$7)|0);
+ $9 = (_cons_gen($4,$5,$8)|0);
+ $10 = (_cons_gen($3,(19),$9)|0);
+ STACKTOP = sp;return ($10|0);
+}
+function _new_nil($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = (_list1_gen($1,(86))|0);
+ STACKTOP = sp;return ($2|0);
+}
+function _new_alias($p,$a,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $0;
+ $4 = $0;
+ $5 = $1;
+ $6 = $5;
+ $7 = $2;
+ $8 = $7;
+ $9 = (_cons_gen($4,$6,$8)|0);
+ $10 = (_cons_gen($3,(72),$9)|0);
+ STACKTOP = sp;return ($10|0);
+}
+function _cond($n) {
+ $n = $n|0;
+ var $0 = 0, $1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $n;
+ $1 = $0;
+ STACKTOP = sp;return ($1|0);
+}
+function _new_if($p,$a,$b,$c) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $c;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = $3;
+ $8 = (_list4_gen($4,(5),$5,$6,$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _new_unless($p,$a,$b,$c) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $c;
+ $4 = $0;
+ $5 = $1;
+ $6 = $3;
+ $7 = $2;
+ $8 = (_list4_gen($4,(5),$5,$6,$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _new_while($p,$a,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $0;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = (_cons_gen($4,$5,$6)|0);
+ $8 = (_cons_gen($3,(9),$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _new_until($p,$a,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $0;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = (_cons_gen($4,$5,$6)|0);
+ $8 = (_cons_gen($3,(10),$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _new_postexe($p,$a) {
+ $p = $p|0;
+ $a = $a|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_cons_gen($2,(91),$3)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _new_masgn($p,$a,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $0;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = (_cons_gen($4,$5,$6)|0);
+ $8 = (_cons_gen($3,(23),$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _new_op_asgn($p,$a,$op,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $op = $op|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $op;
+ $3 = $b;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = $6;
+ $8 = $3;
+ $9 = (_list4_gen($4,(28),$5,$7,$8)|0);
+ STACKTOP = sp;return ($9|0);
+}
+function _new_call($p,$a,$b,$c) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, $n = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $c;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = $6;
+ $8 = $3;
+ $9 = (_list4_gen($4,(29),$5,$7,$8)|0);
+ $n = $9;
+ $10 = $1;
+ $11 = ($10|0)!=(0|0);
+ if (!($11)) {
+  $22 = $n;
+  STACKTOP = sp;return ($22|0);
+ }
+ $12 = $1;
+ $13 = ((($12)) + 10|0);
+ $14 = HEAP16[$13>>1]|0;
+ $15 = $n;
+ $16 = ((($15)) + 10|0);
+ HEAP16[$16>>1] = $14;
+ $17 = $1;
+ $18 = ((($17)) + 8|0);
+ $19 = HEAP16[$18>>1]|0;
+ $20 = $n;
+ $21 = ((($20)) + 8|0);
+ HEAP16[$21>>1] = $19;
+ $22 = $n;
+ STACKTOP = sp;return ($22|0);
+}
+function _backref_error($p,$n) {
+ $p = $p|0;
+ $n = $n|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $c = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $2 = sp + 8|0;
+ $0 = $p;
+ $1 = $n;
+ $3 = $1;
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $4;
+ $c = $5;
+ $6 = $c;
+ $7 = ($6|0)==(45);
+ if ($7) {
+  $8 = $0;
+  $9 = $1;
+  $10 = ((($9)) + 4|0);
+  $11 = HEAP32[$10>>2]|0;
+  $12 = $11;
+  _yyerror_i($8,59379,$12);
+  STACKTOP = sp;return;
+ }
+ $13 = $c;
+ $14 = ($13|0)==(46);
+ $15 = $0;
+ if (!($14)) {
+  $20 = HEAP32[$15>>2]|0;
+  $21 = $c;
+  _mrb_fixnum_value_455($2,$21);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$2>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$2+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$2+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$2+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$2+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$2+7>>0]|0;
+  _mrb_bug($20,59425,$vararg_buffer);
+  // unreachable;
+ }
+ $16 = $1;
+ $17 = ((($16)) + 4|0);
+ $18 = HEAP32[$17>>2]|0;
+ $19 = $18;
+ _yyerror_i($15,59402,$19);
+ STACKTOP = sp;return;
+}
+function _mrb_fixnum_value_455($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 3;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _new_array($p,$a) {
+ $p = $p|0;
+ $a = $a|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_cons_gen($2,(34),$3)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _new_asgn($p,$a,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $0;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = (_cons_gen($4,$5,$6)|0);
+ $8 = (_cons_gen($3,(24),$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _new_and($p,$a,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $0;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = (_cons_gen($4,$5,$6)|0);
+ $8 = (_cons_gen($3,(20),$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _new_or($p,$a,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $0;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = (_cons_gen($4,$5,$6)|0);
+ $8 = (_cons_gen($3,(21),$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _call_uni_op($p,$recv,$m) {
+ $p = $p|0;
+ $recv = $recv|0;
+ $m = $m|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $recv;
+ $2 = $m;
+ $3 = $0;
+ $4 = $1;
+ $5 = $0;
+ $6 = $2;
+ $7 = (_intern_cstr_gen($5,$6)|0);
+ $8 = (_new_call($3,$4,$7,0)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _local_nest($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = $0;
+ $3 = ((($2)) + 76|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = (_cons_gen($1,0,$4)|0);
+ $6 = $0;
+ $7 = ((($6)) + 76|0);
+ HEAP32[$7>>2] = $5;
+ STACKTOP = sp;return;
+}
+function _new_block($p,$a,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $0;
+ $4 = $0;
+ $5 = (_locals_node($4)|0);
+ $6 = $1;
+ $7 = $2;
+ $8 = (_list4_gen($3,(4),$5,$6,$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _local_unnest($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = ((($1)) + 76|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)!=(0|0);
+ if (!($4)) {
+  STACKTOP = sp;return;
+ }
+ $5 = $0;
+ $6 = ((($5)) + 76|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ((($7)) + 4|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = $0;
+ $11 = ((($10)) + 76|0);
+ HEAP32[$11>>2] = $9;
+ STACKTOP = sp;return;
+}
+function _new_fcall($p,$b,$c) {
+ $p = $p|0;
+ $b = $b|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $n = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $b;
+ $2 = $c;
+ $3 = $0;
+ $4 = (_new_self($3)|0);
+ $n = $4;
+ $5 = $2;
+ $6 = ($5|0)!=(0|0);
+ if ($6) {
+  $7 = $2;
+  $8 = ((($7)) + 10|0);
+  $9 = HEAP16[$8>>1]|0;
+  $10 = $n;
+  $11 = ((($10)) + 10|0);
+  HEAP16[$11>>1] = $9;
+  $12 = $2;
+  $13 = ((($12)) + 8|0);
+  $14 = HEAP16[$13>>1]|0;
+  $15 = $n;
+  $16 = ((($15)) + 8|0);
+  HEAP16[$16>>1] = $14;
+ }
+ $17 = $0;
+ $18 = $n;
+ $19 = $1;
+ $20 = $19;
+ $21 = $2;
+ $22 = (_list4_gen($17,(30),$18,$20,$21)|0);
+ $n = $22;
+ $23 = $2;
+ $24 = ($23|0)!=(0|0);
+ if (!($24)) {
+  $35 = $n;
+  STACKTOP = sp;return ($35|0);
+ }
+ $25 = $2;
+ $26 = ((($25)) + 10|0);
+ $27 = HEAP16[$26>>1]|0;
+ $28 = $n;
+ $29 = ((($28)) + 10|0);
+ HEAP16[$29>>1] = $27;
+ $30 = $2;
+ $31 = ((($30)) + 8|0);
+ $32 = HEAP16[$31>>1]|0;
+ $33 = $n;
+ $34 = ((($33)) + 8|0);
+ HEAP16[$34>>1] = $32;
+ $35 = $n;
+ STACKTOP = sp;return ($35|0);
+}
+function _new_self($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = (_list1_gen($1,(85))|0);
+ STACKTOP = sp;return ($2|0);
+}
+function _args_with_block($p,$a,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $2;
+ $4 = ($3|0)!=(0|0);
+ if (!($4)) {
+  STACKTOP = sp;return;
+ }
+ $5 = $1;
+ $6 = ((($5)) + 4|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ($7|0)!=(0|0);
+ if ($8) {
+  $9 = $0;
+  _yyerror($9,59474);
+ }
+ $10 = $2;
+ $11 = $1;
+ $12 = ((($11)) + 4|0);
+ HEAP32[$12>>2] = $10;
+ STACKTOP = sp;return;
+}
+function _new_super($p,$c) {
+ $p = $p|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $c;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_cons_gen($2,(32),$3)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _new_yield($p,$c) {
+ $p = $p|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $p;
+ $2 = $c;
+ $3 = $2;
+ $4 = ($3|0)!=(0|0);
+ if (!($4)) {
+  $14 = $1;
+  $15 = (_cons_gen($14,(38),0)|0);
+  $0 = $15;
+  $16 = $0;
+  STACKTOP = sp;return ($16|0);
+ }
+ $5 = $2;
+ $6 = ((($5)) + 4|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ($7|0)!=(0|0);
+ if ($8) {
+  $9 = $1;
+  _yyerror($9,59474);
+ }
+ $10 = $1;
+ $11 = $2;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = (_cons_gen($10,(38),$12)|0);
+ $0 = $13;
+ $16 = $0;
+ STACKTOP = sp;return ($16|0);
+}
+function _ret_args($p,$n) {
+ $p = $p|0;
+ $n = $n|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $p;
+ $2 = $n;
+ $3 = $2;
+ $4 = ((($3)) + 4|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ($5|0)!=(0|0);
+ if ($6) {
+  $7 = $1;
+  _yyerror($7,59512);
+  $0 = 0;
+  $20 = $0;
+  STACKTOP = sp;return ($20|0);
+ }
+ $8 = $2;
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ((($9)) + 4|0);
+ $11 = HEAP32[$10>>2]|0;
+ $12 = ($11|0)!=(0|0);
+ if ($12) {
+  $16 = $1;
+  $17 = $2;
+  $18 = HEAP32[$17>>2]|0;
+  $19 = (_new_array($16,$18)|0);
+  $0 = $19;
+  $20 = $0;
+  STACKTOP = sp;return ($20|0);
+ } else {
+  $13 = $2;
+  $14 = HEAP32[$13>>2]|0;
+  $15 = HEAP32[$14>>2]|0;
+  $0 = $15;
+  $20 = $0;
+  STACKTOP = sp;return ($20|0);
+ }
+ return (0)|0;
+}
+function _new_return($p,$c) {
+ $p = $p|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $c;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_cons_gen($2,(37),$3)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _new_break($p,$c) {
+ $p = $p|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $c;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_cons_gen($2,(13),$3)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _new_next($p,$c) {
+ $p = $p|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $c;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_cons_gen($2,(14),$3)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _assignable($p,$lhs) {
+ $p = $p|0;
+ $lhs = $lhs|0;
+ var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $lhs;
+ $2 = $1;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3;
+ $5 = ($4|0)==(39);
+ if (!($5)) {
+  STACKTOP = sp;return;
+ }
+ $6 = $0;
+ $7 = $1;
+ $8 = ((($7)) + 4|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = $9;
+ _local_add($6,$10);
+ STACKTOP = sp;return;
+}
+function _local_add($p,$sym) {
+ $p = $p|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $sym;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_local_var_p($2,$3)|0);
+ $5 = ($4<<24>>24)!=(0);
+ if ($5) {
+  STACKTOP = sp;return;
+ }
+ $6 = $0;
+ $7 = $1;
+ _local_add_f($6,$7);
+ STACKTOP = sp;return;
+}
+function _local_var_p($p,$sym) {
+ $p = $p|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0;
+ var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $l = 0, $n = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $p;
+ $2 = $sym;
+ $3 = $1;
+ $4 = ((($3)) + 76|0);
+ $5 = HEAP32[$4>>2]|0;
+ $l = $5;
+ L1: while(1) {
+  $6 = $l;
+  $7 = ($6|0)!=(0|0);
+  if (!($7)) {
+   label = 9;
+   break;
+  }
+  $8 = $l;
+  $9 = HEAP32[$8>>2]|0;
+  $n = $9;
+  while(1) {
+   $10 = $n;
+   $11 = ($10|0)!=(0|0);
+   if (!($11)) {
+    break;
+   }
+   $12 = $n;
+   $13 = HEAP32[$12>>2]|0;
+   $14 = $13;
+   $15 = $2;
+   $16 = ($14|0)==($15|0);
+   if ($16) {
+    label = 6;
+    break L1;
+   }
+   $17 = $n;
+   $18 = ((($17)) + 4|0);
+   $19 = HEAP32[$18>>2]|0;
+   $n = $19;
+  }
+  $20 = $l;
+  $21 = ((($20)) + 4|0);
+  $22 = HEAP32[$21>>2]|0;
+  $l = $22;
+ }
+ if ((label|0) == 6) {
+  $0 = 1;
+  $23 = $0;
+  STACKTOP = sp;return ($23|0);
+ }
+ else if ((label|0) == 9) {
+  $0 = 0;
+  $23 = $0;
+  STACKTOP = sp;return ($23|0);
+ }
+ return (0)|0;
+}
+function _new_colon2($p,$b,$c) {
+ $p = $p|0;
+ $b = $b|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $b;
+ $2 = $c;
+ $3 = $0;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = $6;
+ $8 = (_cons_gen($4,$5,$7)|0);
+ $9 = (_cons_gen($3,(77),$8)|0);
+ STACKTOP = sp;return ($9|0);
+}
+function _new_colon3($p,$c) {
+ $p = $p|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $c;
+ $2 = $0;
+ $3 = $1;
+ $4 = $3;
+ $5 = (_cons_gen($2,(78),$4)|0);
+ STACKTOP = sp;return ($5|0);
+}
+function _new_undef($p,$sym) {
+ $p = $p|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $sym;
+ $2 = $0;
+ $3 = $1;
+ $4 = $3;
+ $5 = (_list2_gen($2,(73),$4)|0);
+ STACKTOP = sp;return ($5|0);
+}
+function _new_dot2($p,$a,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $0;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = (_cons_gen($4,$5,$6)|0);
+ $8 = (_cons_gen($3,(80),$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _new_dot3($p,$a,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $0;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = (_cons_gen($4,$5,$6)|0);
+ $8 = (_cons_gen($3,(81),$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _call_bin_op($p,$recv,$m,$arg1) {
+ $p = $p|0;
+ $recv = $recv|0;
+ $m = $m|0;
+ $arg1 = $arg1|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $recv;
+ $2 = $m;
+ $3 = $arg1;
+ $4 = $0;
+ $5 = $1;
+ $6 = $0;
+ $7 = $2;
+ $8 = (_intern_cstr_gen($6,$7)|0);
+ $9 = $0;
+ $10 = $0;
+ $11 = $3;
+ $12 = (_list1_gen($10,$11)|0);
+ $13 = (_list1_gen($9,$12)|0);
+ $14 = (_new_call($4,$5,$8,$13)|0);
+ STACKTOP = sp;return ($14|0);
+}
+function _new_hash($p,$a) {
+ $p = $p|0;
+ $a = $a|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_cons_gen($2,(36),$3)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _new_block_arg($p,$a) {
+ $p = $p|0;
+ $a = $a|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_cons_gen($2,(69),$3)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _new_splat($p,$a) {
+ $p = $p|0;
+ $a = $a|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_cons_gen($2,(66),$3)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _call_with_block($p,$a,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $n = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $1;
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)==((32)|0);
+ if (!($5)) {
+  $6 = $1;
+  $7 = HEAP32[$6>>2]|0;
+  $8 = ($7|0)==((33)|0);
+  if (!($8)) {
+   $22 = $1;
+   $23 = ((($22)) + 4|0);
+   $24 = HEAP32[$23>>2]|0;
+   $25 = ((($24)) + 4|0);
+   $26 = HEAP32[$25>>2]|0;
+   $27 = ((($26)) + 4|0);
+   $28 = HEAP32[$27>>2]|0;
+   $n = $28;
+   $29 = $n;
+   $30 = HEAP32[$29>>2]|0;
+   $31 = ($30|0)!=(0|0);
+   $32 = $0;
+   if ($31) {
+    $36 = $n;
+    $37 = HEAP32[$36>>2]|0;
+    $38 = $2;
+    _args_with_block($32,$37,$38);
+    STACKTOP = sp;return;
+   } else {
+    $33 = $2;
+    $34 = (_cons_gen($32,0,$33)|0);
+    $35 = $n;
+    HEAP32[$35>>2] = $34;
+    STACKTOP = sp;return;
+   }
+  }
+ }
+ $9 = $1;
+ $10 = ((($9)) + 4|0);
+ $11 = HEAP32[$10>>2]|0;
+ $12 = ($11|0)!=(0|0);
+ $13 = $0;
+ if ($12) {
+  $18 = $1;
+  $19 = ((($18)) + 4|0);
+  $20 = HEAP32[$19>>2]|0;
+  $21 = $2;
+  _args_with_block($13,$20,$21);
+  STACKTOP = sp;return;
+ } else {
+  $14 = $2;
+  $15 = (_cons_gen($13,0,$14)|0);
+  $16 = $1;
+  $17 = ((($16)) + 4|0);
+  HEAP32[$17>>2] = $15;
+  STACKTOP = sp;return;
+ }
+}
+function _new_lambda($p,$a,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $0;
+ $4 = $0;
+ $5 = (_locals_node($4)|0);
+ $6 = $1;
+ $7 = $2;
+ $8 = (_list4_gen($3,(53),$5,$6,$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _new_case($p,$a,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $n = 0, $n2 = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $0;
+ $4 = $1;
+ $5 = (_list2_gen($3,(6),$4)|0);
+ $n = $5;
+ $6 = $n;
+ $n2 = $6;
+ while(1) {
+  $7 = $n2;
+  $8 = ((($7)) + 4|0);
+  $9 = HEAP32[$8>>2]|0;
+  $10 = ($9|0)!=(0|0);
+  if (!($10)) {
+   break;
+  }
+  $11 = $n2;
+  $12 = ((($11)) + 4|0);
+  $13 = HEAP32[$12>>2]|0;
+  $n2 = $13;
+ }
+ $14 = $2;
+ $15 = $n2;
+ $16 = ((($15)) + 4|0);
+ HEAP32[$16>>2] = $14;
+ $17 = $n;
+ STACKTOP = sp;return ($17|0);
+}
+function _new_for($p,$v,$o,$b) {
+ $p = $p|0;
+ $v = $v|0;
+ $o = $o|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $v;
+ $2 = $o;
+ $3 = $b;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = $3;
+ $8 = (_list4_gen($4,(12),$5,$6,$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _new_class($p,$c,$s,$b) {
+ $p = $p|0;
+ $c = $c|0;
+ $s = $s|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $c;
+ $2 = $s;
+ $3 = $b;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = $0;
+ $8 = $0;
+ $9 = (_locals_node($8)|0);
+ $10 = $3;
+ $11 = (_cons_gen($7,$9,$10)|0);
+ $12 = (_list4_gen($4,(74),$5,$6,$11)|0);
+ STACKTOP = sp;return ($12|0);
+}
+function _new_sclass($p,$o,$b) {
+ $p = $p|0;
+ $o = $o|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $o;
+ $2 = $b;
+ $3 = $0;
+ $4 = $1;
+ $5 = $0;
+ $6 = $0;
+ $7 = (_locals_node($6)|0);
+ $8 = $2;
+ $9 = (_cons_gen($5,$7,$8)|0);
+ $10 = (_list3_gen($3,(76),$4,$9)|0);
+ STACKTOP = sp;return ($10|0);
+}
+function _new_module($p,$m,$b) {
+ $p = $p|0;
+ $m = $m|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $m;
+ $2 = $b;
+ $3 = $0;
+ $4 = $1;
+ $5 = $0;
+ $6 = $0;
+ $7 = (_locals_node($6)|0);
+ $8 = $2;
+ $9 = (_cons_gen($5,$7,$8)|0);
+ $10 = (_list3_gen($3,(75),$4,$9)|0);
+ STACKTOP = sp;return ($10|0);
+}
+function _new_def($p,$m,$a,$b) {
+ $p = $p|0;
+ $m = $m|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $m;
+ $2 = $a;
+ $3 = $b;
+ $4 = $0;
+ $5 = $1;
+ $6 = $5;
+ $7 = $0;
+ $8 = (_locals_node($7)|0);
+ $9 = $2;
+ $10 = $3;
+ $11 = (_list5_gen($4,(70),$6,$8,$9,$10)|0);
+ STACKTOP = sp;return ($11|0);
+}
+function _list5_gen($p,$a,$b,$c,$d,$e) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ $c = $c|0;
+ $d = $d|0;
+ $e = $e|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $c;
+ $4 = $d;
+ $5 = $e;
+ $6 = $0;
+ $7 = $1;
+ $8 = $0;
+ $9 = $2;
+ $10 = $0;
+ $11 = $3;
+ $12 = $0;
+ $13 = $4;
+ $14 = $0;
+ $15 = $5;
+ $16 = (_cons_gen($14,$15,0)|0);
+ $17 = (_cons_gen($12,$13,$16)|0);
+ $18 = (_cons_gen($10,$11,$17)|0);
+ $19 = (_cons_gen($8,$9,$18)|0);
+ $20 = (_cons_gen($6,$7,$19)|0);
+ STACKTOP = sp;return ($20|0);
+}
+function _new_sdef($p,$o,$m,$a,$b) {
+ $p = $p|0;
+ $o = $o|0;
+ $m = $m|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $o;
+ $2 = $m;
+ $3 = $a;
+ $4 = $b;
+ $5 = $0;
+ $6 = $1;
+ $7 = $2;
+ $8 = $7;
+ $9 = $0;
+ $10 = (_locals_node($9)|0);
+ $11 = $3;
+ $12 = $4;
+ $13 = (_list6_gen($5,(71),$6,$8,$10,$11,$12)|0);
+ STACKTOP = sp;return ($13|0);
+}
+function _list6_gen($p,$a,$b,$c,$d,$e,$f) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ $c = $c|0;
+ $d = $d|0;
+ $e = $e|0;
+ $f = $f|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $c;
+ $4 = $d;
+ $5 = $e;
+ $6 = $f;
+ $7 = $0;
+ $8 = $1;
+ $9 = $0;
+ $10 = $2;
+ $11 = $0;
+ $12 = $3;
+ $13 = $0;
+ $14 = $4;
+ $15 = $0;
+ $16 = $5;
+ $17 = $0;
+ $18 = $6;
+ $19 = (_cons_gen($17,$18,0)|0);
+ $20 = (_cons_gen($15,$16,$19)|0);
+ $21 = (_cons_gen($13,$14,$20)|0);
+ $22 = (_cons_gen($11,$12,$21)|0);
+ $23 = (_cons_gen($9,$10,$22)|0);
+ $24 = (_cons_gen($7,$8,$23)|0);
+ STACKTOP = sp;return ($24|0);
+}
+function _new_redo($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = (_list1_gen($1,(15))|0);
+ STACKTOP = sp;return ($2|0);
+}
+function _new_retry($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = (_list1_gen($1,(16))|0);
+ STACKTOP = sp;return ($2|0);
+}
+function _new_arg($p,$sym) {
+ $p = $p|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $sym;
+ $2 = $0;
+ $3 = $1;
+ $4 = $3;
+ $5 = (_cons_gen($2,(63),$4)|0);
+ STACKTOP = sp;return ($5|0);
+}
+function _new_args($p,$m,$opt,$rest,$m2,$blk) {
+ $p = $p|0;
+ $m = $m|0;
+ $opt = $opt|0;
+ $rest = $rest|0;
+ $m2 = $m2|0;
+ $blk = $blk|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0;
+ var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $n = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $m;
+ $2 = $opt;
+ $3 = $rest;
+ $4 = $m2;
+ $5 = $blk;
+ $6 = $0;
+ $7 = $4;
+ $8 = $5;
+ $9 = $8;
+ $10 = (_cons_gen($6,$7,$9)|0);
+ $n = $10;
+ $11 = $0;
+ $12 = $3;
+ $13 = $12;
+ $14 = $n;
+ $15 = (_cons_gen($11,$13,$14)|0);
+ $n = $15;
+ $16 = $0;
+ $17 = $2;
+ $18 = $n;
+ $19 = (_cons_gen($16,$17,$18)|0);
+ $n = $19;
+ $20 = $0;
+ $21 = $1;
+ $22 = $n;
+ $23 = (_cons_gen($20,$21,$22)|0);
+ STACKTOP = sp;return ($23|0);
+}
+function _new_bv($p,$id) {
+ $p = $p|0;
+ $id = $id|0;
+ var $0 = 0, $1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $id;
+ STACKTOP = sp;return;
+}
+function _new_zsuper($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = (_list1_gen($1,(33))|0);
+ STACKTOP = sp;return ($2|0);
+}
+function _new_dstr($p,$a) {
+ $p = $p|0;
+ $a = $a|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_cons_gen($2,(56),$3)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _new_literal_delim($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = (_cons_gen($1,(100),0)|0);
+ STACKTOP = sp;return ($2|0);
+}
+function _new_dxstr($p,$a) {
+ $p = $p|0;
+ $a = $a|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_cons_gen($2,(58),$3)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _new_dregx($p,$a,$b) {
+ $p = $p|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $b;
+ $3 = $0;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = (_cons_gen($4,$5,$6)|0);
+ $8 = (_cons_gen($3,(60),$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _heredoc_end($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = ((($1)) + 1120|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ((($3)) + 4|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $0;
+ $7 = ((($6)) + 1120|0);
+ HEAP32[$7>>2] = $5;
+ $8 = $0;
+ $9 = ((($8)) + 1120|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = ($10|0)==(0|0);
+ $12 = $0;
+ if ($11) {
+  $13 = ((($12)) + 40|0);
+  HEAP32[$13>>2] = 0;
+  $14 = $0;
+  $15 = ((($14)) + 72|0);
+  $16 = HEAP8[$15>>0]|0;
+  $17 = $16 & -2;
+  $18 = $17 | 1;
+  HEAP8[$15>>0] = $18;
+  $19 = $0;
+  _end_strterm($19);
+  $20 = $0;
+  $21 = ((($20)) + 1124|0);
+  $22 = HEAP32[$21>>2]|0;
+  $23 = $0;
+  $24 = ((($23)) + 44|0);
+  HEAP32[$24>>2] = $22;
+  $25 = $0;
+  $26 = ((($25)) + 1124|0);
+  HEAP32[$26>>2] = 0;
+  $27 = $0;
+  $28 = ((($27)) + 1128|0);
+  $29 = HEAP8[$28>>0]|0;
+  $30 = $29 & -2;
+  $31 = $30 | 1;
+  HEAP8[$28>>0] = $31;
+  STACKTOP = sp;return;
+ } else {
+  $32 = (_parsing_heredoc_inf($12)|0);
+  $33 = ((($32)) + 4|0);
+  $34 = HEAP32[$33>>2]|0;
+  $35 = $34;
+  $36 = $0;
+  $37 = ((($36)) + 44|0);
+  $38 = HEAP32[$37>>2]|0;
+  HEAP32[$38>>2] = $35;
+  STACKTOP = sp;return;
+ }
+}
+function _new_words($p,$a) {
+ $p = $p|0;
+ $a = $a|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_cons_gen($2,(101),$3)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _new_sym($p,$sym) {
+ $p = $p|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $sym;
+ $2 = $0;
+ $3 = $1;
+ $4 = $3;
+ $5 = (_cons_gen($2,(54),$4)|0);
+ STACKTOP = sp;return ($5|0);
+}
+function _new_dsym($p,$a) {
+ $p = $p|0;
+ $a = $a|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $0;
+ $3 = $0;
+ $4 = $1;
+ $5 = (_new_dstr($3,$4)|0);
+ $6 = (_cons_gen($2,(97),$5)|0);
+ STACKTOP = sp;return ($6|0);
+}
+function _new_strsym($p,$str) {
+ $p = $p|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $len = 0, $s = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $str;
+ $2 = $1;
+ $3 = ((($2)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = HEAP32[$4>>2]|0;
+ $s = $5;
+ $6 = $1;
+ $7 = ((($6)) + 4|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ((($8)) + 4|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = $10;
+ $len = $11;
+ $12 = $0;
+ $13 = HEAP32[$12>>2]|0;
+ $14 = $s;
+ $15 = $len;
+ $16 = (_mrb_intern($13,$14,$15)|0);
+ STACKTOP = sp;return ($16|0);
+}
+function _new_symbols($p,$a) {
+ $p = $p|0;
+ $a = $a|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $a;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_cons_gen($2,(102),$3)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _negate_lit($p,$n) {
+ $p = $p|0;
+ $n = $n|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $n;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_cons_gen($2,(52),$3)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _new_lvar($p,$sym) {
+ $p = $p|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $sym;
+ $2 = $0;
+ $3 = $1;
+ $4 = $3;
+ $5 = (_cons_gen($2,(39),$4)|0);
+ STACKTOP = sp;return ($5|0);
+}
+function _new_ivar($p,$sym) {
+ $p = $p|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $sym;
+ $2 = $0;
+ $3 = $1;
+ $4 = $3;
+ $5 = (_cons_gen($2,(42),$4)|0);
+ STACKTOP = sp;return ($5|0);
+}
+function _new_gvar($p,$sym) {
+ $p = $p|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $sym;
+ $2 = $0;
+ $3 = $1;
+ $4 = $3;
+ $5 = (_cons_gen($2,(41),$4)|0);
+ STACKTOP = sp;return ($5|0);
+}
+function _new_cvar($p,$sym) {
+ $p = $p|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $sym;
+ $2 = $0;
+ $3 = $1;
+ $4 = $3;
+ $5 = (_cons_gen($2,(44),$4)|0);
+ STACKTOP = sp;return ($5|0);
+}
+function _new_const($p,$sym) {
+ $p = $p|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $sym;
+ $2 = $0;
+ $3 = $1;
+ $4 = $3;
+ $5 = (_cons_gen($2,(43),$4)|0);
+ STACKTOP = sp;return ($5|0);
+}
+function _var_reference($p,$lhs) {
+ $p = $p|0;
+ $lhs = $lhs|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $n = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $p;
+ $2 = $lhs;
+ $3 = $2;
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $4;
+ $6 = ($5|0)==(39);
+ if ($6) {
+  $7 = $1;
+  $8 = $2;
+  $9 = ((($8)) + 4|0);
+  $10 = HEAP32[$9>>2]|0;
+  $11 = $10;
+  $12 = (_local_var_p($7,$11)|0);
+  $13 = ($12<<24>>24)!=(0);
+  if (!($13)) {
+   $14 = $1;
+   $15 = $2;
+   $16 = ((($15)) + 4|0);
+   $17 = HEAP32[$16>>2]|0;
+   $18 = $17;
+   $19 = (_new_fcall($14,$18,0)|0);
+   $n = $19;
+   $20 = $1;
+   $21 = $2;
+   _cons_free_gen($20,$21);
+   $22 = $n;
+   $0 = $22;
+   $24 = $0;
+   STACKTOP = sp;return ($24|0);
+  }
+ }
+ $23 = $2;
+ $0 = $23;
+ $24 = $0;
+ STACKTOP = sp;return ($24|0);
+}
+function _new_true($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = (_list1_gen($1,(87))|0);
+ STACKTOP = sp;return ($2|0);
+}
+function _new_false($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = (_list1_gen($1,(88))|0);
+ STACKTOP = sp;return ($2|0);
+}
+function _yysyntax_error($yyresult,$yystate,$yychar) {
+ $yyresult = $yyresult|0;
+ $yystate = $yystate|0;
+ $yychar = $yychar|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $14 = 0, $15 = 0, $16 = 0;
+ var $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0;
+ var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0;
+ var $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0;
+ var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0;
+ var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $or$cond = 0, $or$cond3 = 0, $yyarg = 0, $yychecklim = 0, $yycount = 0, $yyf = 0, $yyfmt = 0, $yyformat = 0, $yyi = 0;
+ var $yyn = 0, $yyp = 0, $yyprefix = 0, $yysize = 0, $yysize0 = 0, $yysize1 = 0, $yysize_overflow = 0, $yytype = 0, $yyx = 0, $yyxbegin = 0, $yyxend = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $yyarg = sp + 40|0;
+ $yyformat = sp + 100|0;
+ $1 = $yyresult;
+ $2 = $yystate;
+ $3 = $yychar;
+ $4 = $2;
+ $5 = (3044 + ($4<<1)|0);
+ $6 = HEAP16[$5>>1]|0;
+ $7 = $6 << 16 >> 16;
+ $yyn = $7;
+ $8 = $yyn;
+ $9 = (-771)<($8|0);
+ $10 = $yyn;
+ $11 = ($10|0)<=(10639);
+ $or$cond = $9 & $11;
+ if (!($or$cond)) {
+  $0 = 0;
+  $130 = $0;
+  STACKTOP = sp;return ($130|0);
+ }
+ $12 = $3;
+ $13 = ($12>>>0)<=(372);
+ if ($13) {
+  $14 = $3;
+  $15 = (58359 + ($14)|0);
+  $16 = HEAP8[$15>>0]|0;
+  $17 = $16&255;
+  $18 = $17;
+ } else {
+  $18 = 2;
+ }
+ $yytype = $18;
+ $19 = $yytype;
+ $20 = (1320 + ($19<<2)|0);
+ $21 = HEAP32[$20>>2]|0;
+ $22 = (_yytnamerr(0,$21)|0);
+ $yysize0 = $22;
+ $23 = $yysize0;
+ $yysize = $23;
+ $yysize_overflow = 0;
+ $yyprefix = 62710;
+ $24 = $yyn;
+ $25 = ($24|0)<(0);
+ $26 = $yyn;
+ $27 = (0 - ($26))|0;
+ $28 = $25 ? $27 : 0;
+ $yyxbegin = $28;
+ $29 = $yyn;
+ $30 = (10639 - ($29))|0;
+ $31 = (($30) + 1)|0;
+ $yychecklim = $31;
+ $32 = $yychecklim;
+ $33 = ($32|0)<(144);
+ $34 = $yychecklim;
+ $35 = $33 ? $34 : 144;
+ $yyxend = $35;
+ $yycount = 1;
+ $36 = $yytype;
+ $37 = (1320 + ($36<<2)|0);
+ $38 = HEAP32[$37>>2]|0;
+ HEAP32[$yyarg>>2] = $38;
+ $39 = (_yystpcpy($yyformat,62725)|0);
+ $yyfmt = $39;
+ $40 = $yyxbegin;
+ $yyx = $40;
+ while(1) {
+  $41 = $yyx;
+  $42 = $yyxend;
+  $43 = ($41|0)<($42|0);
+  if (!($43)) {
+   break;
+  }
+  $44 = $yyx;
+  $45 = $yyn;
+  $46 = (($44) + ($45))|0;
+  $47 = (4980 + ($46<<1)|0);
+  $48 = HEAP16[$47>>1]|0;
+  $49 = $48 << 16 >> 16;
+  $50 = $yyx;
+  $51 = ($49|0)==($50|0);
+  $52 = $yyx;
+  $53 = ($52|0)!=(1);
+  $or$cond3 = $51 & $53;
+  if ($or$cond3) {
+   $54 = $yycount;
+   $55 = ($54|0)==(5);
+   if ($55) {
+    label = 9;
+    break;
+   }
+   $58 = $yyx;
+   $59 = (1320 + ($58<<2)|0);
+   $60 = HEAP32[$59>>2]|0;
+   $61 = $yycount;
+   $62 = (($61) + 1)|0;
+   $yycount = $62;
+   $63 = (($yyarg) + ($61<<2)|0);
+   HEAP32[$63>>2] = $60;
+   $64 = $yysize;
+   $65 = $yyx;
+   $66 = (1320 + ($65<<2)|0);
+   $67 = HEAP32[$66>>2]|0;
+   $68 = (_yytnamerr(0,$67)|0);
+   $69 = (($64) + ($68))|0;
+   $yysize1 = $69;
+   $70 = $yysize1;
+   $71 = $yysize;
+   $72 = ($70>>>0)<($71>>>0);
+   $73 = $72&1;
+   $74 = $yysize_overflow;
+   $75 = $74 | $73;
+   $yysize_overflow = $75;
+   $76 = $yysize1;
+   $yysize = $76;
+   $77 = $yyfmt;
+   $78 = $yyprefix;
+   $79 = (_yystpcpy($77,$78)|0);
+   $yyfmt = $79;
+   $yyprefix = 62753;
+  }
+  $80 = $yyx;
+  $81 = (($80) + 1)|0;
+  $yyx = $81;
+ }
+ if ((label|0) == 9) {
+  $yycount = 1;
+  $56 = $yysize0;
+  $yysize = $56;
+  $57 = ((($yyformat)) + 27|0);
+  HEAP8[$57>>0] = 0;
+ }
+ $yyf = $yyformat;
+ $82 = $yysize;
+ $83 = $yyf;
+ $84 = (_yystrlen($83)|0);
+ $85 = (($82) + ($84))|0;
+ $yysize1 = $85;
+ $86 = $yysize1;
+ $87 = $yysize;
+ $88 = ($86>>>0)<($87>>>0);
+ $89 = $88&1;
+ $90 = $yysize_overflow;
+ $91 = $90 | $89;
+ $yysize_overflow = $91;
+ $92 = $yysize1;
+ $yysize = $92;
+ $93 = $yysize_overflow;
+ $94 = ($93|0)!=(0);
+ if ($94) {
+  $0 = -1;
+  $130 = $0;
+  STACKTOP = sp;return ($130|0);
+ }
+ $95 = $1;
+ $96 = ($95|0)!=(0|0);
+ L22: do {
+  if ($96) {
+   $97 = $1;
+   $yyp = $97;
+   $yyi = 0;
+   while(1) {
+    $98 = $yyf;
+    $99 = HEAP8[$98>>0]|0;
+    $100 = $yyp;
+    HEAP8[$100>>0] = $99;
+    $101 = $99 << 24 >> 24;
+    $102 = ($101|0)!=(0);
+    if (!($102)) {
+     break L22;
+    }
+    $103 = $yyp;
+    $104 = HEAP8[$103>>0]|0;
+    $105 = $104 << 24 >> 24;
+    $106 = ($105|0)==(37);
+    if ($106) {
+     $107 = $yyf;
+     $108 = ((($107)) + 1|0);
+     $109 = HEAP8[$108>>0]|0;
+     $110 = $109 << 24 >> 24;
+     $111 = ($110|0)==(115);
+     if ($111) {
+      $112 = $yyi;
+      $113 = $yycount;
+      $114 = ($112|0)<($113|0);
+      if ($114) {
+       $115 = $yyp;
+       $116 = $yyi;
+       $117 = (($116) + 1)|0;
+       $yyi = $117;
+       $118 = (($yyarg) + ($116<<2)|0);
+       $119 = HEAP32[$118>>2]|0;
+       $120 = (_yytnamerr($115,$119)|0);
+       $121 = $yyp;
+       $122 = (($121) + ($120)|0);
+       $yyp = $122;
+       $123 = $yyf;
+       $124 = ((($123)) + 2|0);
+       $yyf = $124;
+       continue;
+      }
+     }
+    }
+    $125 = $yyp;
+    $126 = ((($125)) + 1|0);
+    $yyp = $126;
+    $127 = $yyf;
+    $128 = ((($127)) + 1|0);
+    $yyf = $128;
+   }
+  }
+ } while(0);
+ $129 = $yysize;
+ $0 = $129;
+ $130 = $0;
+ STACKTOP = sp;return ($130|0);
+}
+function _yytnamerr($yyres,$yystr) {
+ $yyres = $yyres|0;
+ $yystr = $yystr|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $5 = 0;
+ var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $yyn = 0, $yyp = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $yyres;
+ $2 = $yystr;
+ $3 = $2;
+ $4 = HEAP8[$3>>0]|0;
+ $5 = $4 << 24 >> 24;
+ $6 = ($5|0)==(34);
+ L1: do {
+  if ($6) {
+   $yyn = 0;
+   $7 = $2;
+   $yyp = $7;
+   L3: while(1) {
+    $8 = $yyp;
+    $9 = ((($8)) + 1|0);
+    $yyp = $9;
+    $10 = HEAP8[$9>>0]|0;
+    $11 = $10 << 24 >> 24;
+    switch ($11|0) {
+    case 44: case 39:  {
+     break L1;
+     break;
+    }
+    case 34:  {
+     break L3;
+     break;
+    }
+    case 92:  {
+     $12 = $yyp;
+     $13 = ((($12)) + 1|0);
+     $yyp = $13;
+     $14 = HEAP8[$13>>0]|0;
+     $15 = $14 << 24 >> 24;
+     $16 = ($15|0)!=(92);
+     if ($16) {
+      break L1;
+     }
+     break;
+    }
+    default: {
+    }
+    }
+    $17 = $1;
+    $18 = ($17|0)!=(0|0);
+    if ($18) {
+     $19 = $yyp;
+     $20 = HEAP8[$19>>0]|0;
+     $21 = $yyn;
+     $22 = $1;
+     $23 = (($22) + ($21)|0);
+     HEAP8[$23>>0] = $20;
+    }
+    $24 = $yyn;
+    $25 = (($24) + 1)|0;
+    $yyn = $25;
+   }
+   $26 = $1;
+   $27 = ($26|0)!=(0|0);
+   if ($27) {
+    $28 = $yyn;
+    $29 = $1;
+    $30 = (($29) + ($28)|0);
+    HEAP8[$30>>0] = 0;
+   }
+   $31 = $yyn;
+   $0 = $31;
+   $43 = $0;
+   STACKTOP = sp;return ($43|0);
+  }
+ } while(0);
+ $32 = $1;
+ $33 = ($32|0)!=(0|0);
+ if ($33) {
+  $36 = $1;
+  $37 = $2;
+  $38 = (_yystpcpy($36,$37)|0);
+  $39 = $1;
+  $40 = $38;
+  $41 = $39;
+  $42 = (($40) - ($41))|0;
+  $0 = $42;
+  $43 = $0;
+  STACKTOP = sp;return ($43|0);
+ } else {
+  $34 = $2;
+  $35 = (_yystrlen($34)|0);
+  $0 = $35;
+  $43 = $0;
+  STACKTOP = sp;return ($43|0);
+ }
+ return (0)|0;
+}
+function _yystrlen($yystr) {
+ $yystr = $yystr|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $yylen = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $yystr;
+ $yylen = 0;
+ while(1) {
+  $1 = $yylen;
+  $2 = $0;
+  $3 = (($2) + ($1)|0);
+  $4 = HEAP8[$3>>0]|0;
+  $5 = ($4<<24>>24)!=(0);
+  $6 = $yylen;
+  if (!($5)) {
+   break;
+  }
+  $7 = (($6) + 1)|0;
+  $yylen = $7;
+ }
+ STACKTOP = sp;return ($6|0);
+}
+function _yystpcpy($yydest,$yysrc) {
+ $yydest = $yydest|0;
+ $yysrc = $yysrc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $yyd = 0, $yys = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $yydest;
+ $1 = $yysrc;
+ $2 = $0;
+ $yyd = $2;
+ $3 = $1;
+ $yys = $3;
+ while(1) {
+  $4 = $yys;
+  $5 = ((($4)) + 1|0);
+  $yys = $5;
+  $6 = HEAP8[$4>>0]|0;
+  $7 = $yyd;
+  $8 = ((($7)) + 1|0);
+  $yyd = $8;
+  HEAP8[$7>>0] = $6;
+  $9 = $6 << 24 >> 24;
+  $10 = ($9|0)!=(0);
+  if (!($10)) {
+   break;
+  }
+ }
+ $11 = $yyd;
+ $12 = ((($11)) + -1|0);
+ STACKTOP = sp;return ($12|0);
+}
+function _yydestruct($yymsg,$yytype,$yyvaluep,$p) {
+ $yymsg = $yymsg|0;
+ $yytype = $yytype|0;
+ $yyvaluep = $yyvaluep|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $yymsg;
+ $1 = $yytype;
+ $2 = $yyvaluep;
+ $3 = $p;
+ $4 = $0;
+ $5 = ($4|0)!=(0|0);
+ if ($5) {
+  STACKTOP = sp;return;
+ }
+ $0 = 62791;
+ STACKTOP = sp;return;
+}
+function _parser_update_cxt($p,$cxt) {
+ $p = $p|0;
+ $cxt = $cxt|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $n = 0, $n0 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $cxt;
+ $i = 0;
+ $2 = $1;
+ $3 = ($2|0)!=(0|0);
+ if (!($3)) {
+  STACKTOP = sp;return;
+ }
+ $4 = $0;
+ $5 = ((($4)) + 1144|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $7;
+ $9 = ($8|0)!=(3);
+ if ($9) {
+  STACKTOP = sp;return;
+ }
+ $10 = $0;
+ $11 = ((($10)) + 1144|0);
+ $12 = HEAP32[$11>>2]|0;
+ $13 = ((($12)) + 4|0);
+ $14 = HEAP32[$13>>2]|0;
+ $15 = HEAP32[$14>>2]|0;
+ $n = $15;
+ $n0 = $15;
+ while(1) {
+  $16 = $n;
+  $17 = ($16|0)!=(0|0);
+  if (!($17)) {
+   break;
+  }
+  $18 = $i;
+  $19 = (($18) + 1)|0;
+  $i = $19;
+  $20 = $n;
+  $21 = ((($20)) + 4|0);
+  $22 = HEAP32[$21>>2]|0;
+  $n = $22;
+ }
+ $23 = $0;
+ $24 = HEAP32[$23>>2]|0;
+ $25 = $1;
+ $26 = HEAP32[$25>>2]|0;
+ $27 = $i;
+ $28 = $27<<2;
+ $29 = (_mrb_realloc($24,$26,$28)|0);
+ $30 = $1;
+ HEAP32[$30>>2] = $29;
+ $31 = $i;
+ $32 = $1;
+ $33 = ((($32)) + 4|0);
+ HEAP32[$33>>2] = $31;
+ $i = 0;
+ $34 = $n0;
+ $n = $34;
+ while(1) {
+  $35 = $n;
+  $36 = ($35|0)!=(0|0);
+  if (!($36)) {
+   break;
+  }
+  $37 = $n;
+  $38 = HEAP32[$37>>2]|0;
+  $39 = $38;
+  $40 = $i;
+  $41 = $1;
+  $42 = HEAP32[$41>>2]|0;
+  $43 = (($42) + ($40<<2)|0);
+  HEAP32[$43>>2] = $39;
+  $44 = $i;
+  $45 = (($44) + 1)|0;
+  $i = $45;
+  $46 = $n;
+  $47 = ((($46)) + 4|0);
+  $48 = HEAP32[$47>>2]|0;
+  $n = $48;
+ }
+ STACKTOP = sp;return;
+}
+function _mrb_parser_dump($mrb,$tree,$offset) {
+ $mrb = $mrb|0;
+ $tree = $tree|0;
+ $offset = $offset|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0;
+ var $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0;
+ var $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0;
+ var $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0;
+ var $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0, $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0;
+ var $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0, $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0;
+ var $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0, $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $1119 = 0, $112 = 0, $1120 = 0, $1121 = 0, $1122 = 0;
+ var $1123 = 0, $1124 = 0, $1125 = 0, $1126 = 0, $1127 = 0, $1128 = 0, $1129 = 0, $113 = 0, $1130 = 0, $1131 = 0, $1132 = 0, $1133 = 0, $1134 = 0, $1135 = 0, $1136 = 0, $1137 = 0, $1138 = 0, $1139 = 0, $114 = 0, $1140 = 0;
+ var $1141 = 0, $1142 = 0, $1143 = 0, $1144 = 0, $1145 = 0, $1146 = 0, $1147 = 0, $1148 = 0, $1149 = 0, $115 = 0, $1150 = 0, $1151 = 0, $1152 = 0, $1153 = 0, $1154 = 0, $1155 = 0, $1156 = 0, $1157 = 0, $1158 = 0, $1159 = 0;
+ var $116 = 0, $1160 = 0, $1161 = 0, $1162 = 0, $1163 = 0, $1164 = 0, $1165 = 0, $1166 = 0, $1167 = 0, $1168 = 0, $1169 = 0, $117 = 0, $1170 = 0, $1171 = 0, $1172 = 0, $1173 = 0, $1174 = 0, $1175 = 0, $1176 = 0, $1177 = 0;
+ var $1178 = 0, $1179 = 0, $118 = 0, $1180 = 0, $1181 = 0, $1182 = 0, $1183 = 0, $1184 = 0, $1185 = 0, $1186 = 0, $1187 = 0, $1188 = 0, $1189 = 0, $119 = 0, $1190 = 0, $1191 = 0, $1192 = 0, $1193 = 0, $1194 = 0, $1195 = 0;
+ var $1196 = 0, $1197 = 0, $1198 = 0, $1199 = 0, $12 = 0, $120 = 0, $1200 = 0, $1201 = 0, $1202 = 0, $1203 = 0, $1204 = 0, $1205 = 0, $1206 = 0, $1207 = 0, $1208 = 0, $1209 = 0, $121 = 0, $1210 = 0, $1211 = 0, $1212 = 0;
+ var $1213 = 0, $1214 = 0, $1215 = 0, $1216 = 0, $1217 = 0, $1218 = 0, $1219 = 0, $122 = 0, $1220 = 0, $1221 = 0, $1222 = 0, $1223 = 0, $1224 = 0, $1225 = 0, $1226 = 0, $1227 = 0, $1228 = 0, $1229 = 0, $123 = 0, $1230 = 0;
+ var $1231 = 0, $1232 = 0, $1233 = 0, $1234 = 0, $1235 = 0, $1236 = 0, $1237 = 0, $1238 = 0, $1239 = 0, $124 = 0, $1240 = 0, $1241 = 0, $1242 = 0, $1243 = 0, $1244 = 0, $1245 = 0, $1246 = 0, $1247 = 0, $1248 = 0, $1249 = 0;
+ var $125 = 0, $1250 = 0, $1251 = 0, $1252 = 0, $1253 = 0, $1254 = 0, $1255 = 0, $1256 = 0, $1257 = 0, $1258 = 0, $1259 = 0, $126 = 0, $1260 = 0, $1261 = 0, $1262 = 0, $1263 = 0, $1264 = 0, $1265 = 0, $1266 = 0, $1267 = 0;
+ var $1268 = 0, $1269 = 0, $127 = 0, $1270 = 0, $1271 = 0, $1272 = 0, $1273 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0;
+ var $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0;
+ var $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0;
+ var $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0;
+ var $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0;
+ var $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0;
+ var $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0;
+ var $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0;
+ var $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0;
+ var $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0;
+ var $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0;
+ var $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0;
+ var $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0;
+ var $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0;
+ var $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0;
+ var $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0;
+ var $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0;
+ var $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0;
+ var $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0;
+ var $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0;
+ var $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0;
+ var $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0;
+ var $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0;
+ var $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0;
+ var $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0;
+ var $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0;
+ var $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0;
+ var $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0;
+ var $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0;
+ var $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0;
+ var $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0;
+ var $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0;
+ var $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0;
+ var $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0;
+ var $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0;
+ var $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0;
+ var $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0;
+ var $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0;
+ var $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0;
+ var $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0;
+ var $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0;
+ var $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0;
+ var $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0;
+ var $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0;
+ var $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0;
+ var $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0;
+ var $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0;
+ var $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0;
+ var $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $first_lval = 0, $first_lval6 = 0, $n = 0, $n2 = 0, $n21 = 0, $n210 = 0;
+ var $n22 = 0, $n23 = 0, $n24 = 0, $n25 = 0, $n28 = 0, $n3 = 0, $n7 = 0, $n9 = 0, $nodetype = 0, $t = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer102 = 0, $vararg_buffer104 = 0, $vararg_buffer106 = 0, $vararg_buffer108 = 0, $vararg_buffer11 = 0, $vararg_buffer110 = 0, $vararg_buffer112 = 0, $vararg_buffer115 = 0;
+ var $vararg_buffer118 = 0, $vararg_buffer120 = 0, $vararg_buffer122 = 0, $vararg_buffer124 = 0, $vararg_buffer126 = 0, $vararg_buffer128 = 0, $vararg_buffer13 = 0, $vararg_buffer130 = 0, $vararg_buffer132 = 0, $vararg_buffer134 = 0, $vararg_buffer136 = 0, $vararg_buffer138 = 0, $vararg_buffer140 = 0, $vararg_buffer142 = 0, $vararg_buffer144 = 0, $vararg_buffer146 = 0, $vararg_buffer148 = 0, $vararg_buffer15 = 0, $vararg_buffer150 = 0, $vararg_buffer152 = 0;
+ var $vararg_buffer156 = 0, $vararg_buffer158 = 0, $vararg_buffer160 = 0, $vararg_buffer162 = 0, $vararg_buffer164 = 0, $vararg_buffer166 = 0, $vararg_buffer168 = 0, $vararg_buffer17 = 0, $vararg_buffer170 = 0, $vararg_buffer172 = 0, $vararg_buffer174 = 0, $vararg_buffer176 = 0, $vararg_buffer179 = 0, $vararg_buffer182 = 0, $vararg_buffer185 = 0, $vararg_buffer188 = 0, $vararg_buffer19 = 0, $vararg_buffer191 = 0, $vararg_buffer193 = 0, $vararg_buffer195 = 0;
+ var $vararg_buffer197 = 0, $vararg_buffer200 = 0, $vararg_buffer203 = 0, $vararg_buffer206 = 0, $vararg_buffer208 = 0, $vararg_buffer21 = 0, $vararg_buffer212 = 0, $vararg_buffer215 = 0, $vararg_buffer217 = 0, $vararg_buffer221 = 0, $vararg_buffer223 = 0, $vararg_buffer227 = 0, $vararg_buffer229 = 0, $vararg_buffer23 = 0, $vararg_buffer233 = 0, $vararg_buffer235 = 0, $vararg_buffer238 = 0, $vararg_buffer241 = 0, $vararg_buffer244 = 0, $vararg_buffer246 = 0;
+ var $vararg_buffer248 = 0, $vararg_buffer25 = 0, $vararg_buffer250 = 0, $vararg_buffer252 = 0, $vararg_buffer256 = 0, $vararg_buffer258 = 0, $vararg_buffer261 = 0, $vararg_buffer263 = 0, $vararg_buffer265 = 0, $vararg_buffer268 = 0, $vararg_buffer27 = 0, $vararg_buffer271 = 0, $vararg_buffer274 = 0, $vararg_buffer276 = 0, $vararg_buffer278 = 0, $vararg_buffer280 = 0, $vararg_buffer283 = 0, $vararg_buffer286 = 0, $vararg_buffer289 = 0, $vararg_buffer29 = 0;
+ var $vararg_buffer291 = 0, $vararg_buffer293 = 0, $vararg_buffer295 = 0, $vararg_buffer297 = 0, $vararg_buffer3 = 0, $vararg_buffer300 = 0, $vararg_buffer302 = 0, $vararg_buffer304 = 0, $vararg_buffer307 = 0, $vararg_buffer309 = 0, $vararg_buffer31 = 0, $vararg_buffer311 = 0, $vararg_buffer313 = 0, $vararg_buffer316 = 0, $vararg_buffer319 = 0, $vararg_buffer321 = 0, $vararg_buffer324 = 0, $vararg_buffer326 = 0, $vararg_buffer329 = 0, $vararg_buffer331 = 0;
+ var $vararg_buffer333 = 0, $vararg_buffer336 = 0, $vararg_buffer339 = 0, $vararg_buffer34 = 0, $vararg_buffer341 = 0, $vararg_buffer344 = 0, $vararg_buffer346 = 0, $vararg_buffer348 = 0, $vararg_buffer36 = 0, $vararg_buffer39 = 0, $vararg_buffer41 = 0, $vararg_buffer43 = 0, $vararg_buffer45 = 0, $vararg_buffer47 = 0, $vararg_buffer49 = 0, $vararg_buffer5 = 0, $vararg_buffer51 = 0, $vararg_buffer53 = 0, $vararg_buffer55 = 0, $vararg_buffer57 = 0;
+ var $vararg_buffer59 = 0, $vararg_buffer61 = 0, $vararg_buffer63 = 0, $vararg_buffer65 = 0, $vararg_buffer67 = 0, $vararg_buffer69 = 0, $vararg_buffer7 = 0, $vararg_buffer71 = 0, $vararg_buffer73 = 0, $vararg_buffer75 = 0, $vararg_buffer77 = 0, $vararg_buffer79 = 0, $vararg_buffer81 = 0, $vararg_buffer83 = 0, $vararg_buffer85 = 0, $vararg_buffer87 = 0, $vararg_buffer89 = 0, $vararg_buffer9 = 0, $vararg_buffer91 = 0, $vararg_buffer94 = 0;
+ var $vararg_buffer96 = 0, $vararg_buffer98 = 0, $vararg_ptr101 = 0, $vararg_ptr155 = 0, $vararg_ptr211 = 0, $vararg_ptr220 = 0, $vararg_ptr226 = 0, $vararg_ptr232 = 0, $vararg_ptr255 = 0, $vararg_ptr351 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 1296|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer348 = sp + 1208|0;
+ $vararg_buffer346 = sp + 1200|0;
+ $vararg_buffer344 = sp + 1192|0;
+ $vararg_buffer341 = sp + 1184|0;
+ $vararg_buffer339 = sp + 1176|0;
+ $vararg_buffer336 = sp + 1168|0;
+ $vararg_buffer333 = sp + 1160|0;
+ $vararg_buffer331 = sp + 1152|0;
+ $vararg_buffer329 = sp + 1144|0;
+ $vararg_buffer326 = sp + 1136|0;
+ $vararg_buffer324 = sp + 1128|0;
+ $vararg_buffer321 = sp + 1120|0;
+ $vararg_buffer319 = sp + 1112|0;
+ $vararg_buffer316 = sp + 1104|0;
+ $vararg_buffer313 = sp + 1096|0;
+ $vararg_buffer311 = sp + 1088|0;
+ $vararg_buffer309 = sp + 1080|0;
+ $vararg_buffer307 = sp + 1072|0;
+ $vararg_buffer304 = sp + 1064|0;
+ $vararg_buffer302 = sp + 1056|0;
+ $vararg_buffer300 = sp + 1048|0;
+ $vararg_buffer297 = sp + 1040|0;
+ $vararg_buffer295 = sp + 1032|0;
+ $vararg_buffer293 = sp + 1024|0;
+ $vararg_buffer291 = sp + 1016|0;
+ $vararg_buffer289 = sp + 1008|0;
+ $vararg_buffer286 = sp + 1000|0;
+ $vararg_buffer283 = sp + 992|0;
+ $vararg_buffer280 = sp + 984|0;
+ $vararg_buffer278 = sp + 976|0;
+ $vararg_buffer276 = sp + 968|0;
+ $vararg_buffer274 = sp + 960|0;
+ $vararg_buffer271 = sp + 952|0;
+ $vararg_buffer268 = sp + 944|0;
+ $vararg_buffer265 = sp + 936|0;
+ $vararg_buffer263 = sp + 928|0;
+ $vararg_buffer261 = sp + 920|0;
+ $vararg_buffer258 = sp + 912|0;
+ $vararg_buffer256 = sp + 904|0;
+ $vararg_buffer252 = sp + 896|0;
+ $vararg_buffer250 = sp + 888|0;
+ $vararg_buffer248 = sp + 880|0;
+ $vararg_buffer246 = sp + 872|0;
+ $vararg_buffer244 = sp + 864|0;
+ $vararg_buffer241 = sp + 856|0;
+ $vararg_buffer238 = sp + 848|0;
+ $vararg_buffer235 = sp + 840|0;
+ $vararg_buffer233 = sp + 832|0;
+ $vararg_buffer229 = sp + 824|0;
+ $vararg_buffer227 = sp + 816|0;
+ $vararg_buffer223 = sp + 808|0;
+ $vararg_buffer221 = sp + 800|0;
+ $vararg_buffer217 = sp + 792|0;
+ $vararg_buffer215 = sp + 784|0;
+ $vararg_buffer212 = sp + 776|0;
+ $vararg_buffer208 = sp + 768|0;
+ $vararg_buffer206 = sp + 760|0;
+ $vararg_buffer203 = sp + 752|0;
+ $vararg_buffer200 = sp + 744|0;
+ $vararg_buffer197 = sp + 736|0;
+ $vararg_buffer195 = sp + 728|0;
+ $vararg_buffer193 = sp + 720|0;
+ $vararg_buffer191 = sp + 712|0;
+ $vararg_buffer188 = sp + 704|0;
+ $vararg_buffer185 = sp + 696|0;
+ $vararg_buffer182 = sp + 688|0;
+ $vararg_buffer179 = sp + 680|0;
+ $vararg_buffer176 = sp + 672|0;
+ $vararg_buffer174 = sp + 664|0;
+ $vararg_buffer172 = sp + 656|0;
+ $vararg_buffer170 = sp + 648|0;
+ $vararg_buffer168 = sp + 640|0;
+ $vararg_buffer166 = sp + 632|0;
+ $vararg_buffer164 = sp + 624|0;
+ $vararg_buffer162 = sp + 616|0;
+ $vararg_buffer160 = sp + 608|0;
+ $vararg_buffer158 = sp + 600|0;
+ $vararg_buffer156 = sp + 592|0;
+ $vararg_buffer152 = sp + 584|0;
+ $vararg_buffer150 = sp + 576|0;
+ $vararg_buffer148 = sp + 568|0;
+ $vararg_buffer146 = sp + 560|0;
+ $vararg_buffer144 = sp + 552|0;
+ $vararg_buffer142 = sp + 544|0;
+ $vararg_buffer140 = sp + 536|0;
+ $vararg_buffer138 = sp + 528|0;
+ $vararg_buffer136 = sp + 520|0;
+ $vararg_buffer134 = sp + 512|0;
+ $vararg_buffer132 = sp + 504|0;
+ $vararg_buffer130 = sp + 496|0;
+ $vararg_buffer128 = sp + 488|0;
+ $vararg_buffer126 = sp + 480|0;
+ $vararg_buffer124 = sp + 472|0;
+ $vararg_buffer122 = sp + 464|0;
+ $vararg_buffer120 = sp + 456|0;
+ $vararg_buffer118 = sp + 448|0;
+ $vararg_buffer115 = sp + 440|0;
+ $vararg_buffer112 = sp + 432|0;
+ $vararg_buffer110 = sp + 424|0;
+ $vararg_buffer108 = sp + 416|0;
+ $vararg_buffer106 = sp + 408|0;
+ $vararg_buffer104 = sp + 400|0;
+ $vararg_buffer102 = sp + 392|0;
+ $vararg_buffer98 = sp + 384|0;
+ $vararg_buffer96 = sp + 376|0;
+ $vararg_buffer94 = sp + 368|0;
+ $vararg_buffer91 = sp + 360|0;
+ $vararg_buffer89 = sp + 352|0;
+ $vararg_buffer87 = sp + 344|0;
+ $vararg_buffer85 = sp + 336|0;
+ $vararg_buffer83 = sp + 328|0;
+ $vararg_buffer81 = sp + 320|0;
+ $vararg_buffer79 = sp + 312|0;
+ $vararg_buffer77 = sp + 304|0;
+ $vararg_buffer75 = sp + 296|0;
+ $vararg_buffer73 = sp + 288|0;
+ $vararg_buffer71 = sp + 280|0;
+ $vararg_buffer69 = sp + 272|0;
+ $vararg_buffer67 = sp + 264|0;
+ $vararg_buffer65 = sp + 256|0;
+ $vararg_buffer63 = sp + 248|0;
+ $vararg_buffer61 = sp + 240|0;
+ $vararg_buffer59 = sp + 232|0;
+ $vararg_buffer57 = sp + 224|0;
+ $vararg_buffer55 = sp + 216|0;
+ $vararg_buffer53 = sp + 208|0;
+ $vararg_buffer51 = sp + 200|0;
+ $vararg_buffer49 = sp + 192|0;
+ $vararg_buffer47 = sp + 184|0;
+ $vararg_buffer45 = sp + 176|0;
+ $vararg_buffer43 = sp + 168|0;
+ $vararg_buffer41 = sp + 160|0;
+ $vararg_buffer39 = sp + 152|0;
+ $vararg_buffer36 = sp + 144|0;
+ $vararg_buffer34 = sp + 136|0;
+ $vararg_buffer31 = sp + 128|0;
+ $vararg_buffer29 = sp + 120|0;
+ $vararg_buffer27 = sp + 112|0;
+ $vararg_buffer25 = sp + 104|0;
+ $vararg_buffer23 = sp + 96|0;
+ $vararg_buffer21 = sp + 88|0;
+ $vararg_buffer19 = sp + 80|0;
+ $vararg_buffer17 = sp + 72|0;
+ $vararg_buffer15 = sp + 64|0;
+ $vararg_buffer13 = sp + 56|0;
+ $vararg_buffer11 = sp + 48|0;
+ $vararg_buffer9 = sp + 40|0;
+ $vararg_buffer7 = sp + 32|0;
+ $vararg_buffer5 = sp + 24|0;
+ $vararg_buffer3 = sp + 16|0;
+ $vararg_buffer1 = sp + 8|0;
+ $vararg_buffer = sp;
+ $0 = $mrb;
+ $1 = $tree;
+ $2 = $offset;
+ $3 = $1;
+ $4 = ($3|0)!=(0|0);
+ if (!($4)) {
+  STACKTOP = sp;return;
+ }
+ L3: while(1) {
+  $5 = $1;
+  $6 = $2;
+  _dump_prefix($5,$6);
+  $7 = $1;
+  $8 = HEAP32[$7>>2]|0;
+  $9 = $8;
+  $nodetype = $9;
+  $10 = $1;
+  $11 = ((($10)) + 4|0);
+  $12 = HEAP32[$11>>2]|0;
+  $1 = $12;
+  $13 = $nodetype;
+  switch ($13|0) {
+  case 17:  {
+   label = 3;
+   break L3;
+   break;
+  }
+  case 18:  {
+   label = 4;
+   break L3;
+   break;
+  }
+  case 19:  {
+   label = 18;
+   break L3;
+   break;
+  }
+  case 53:  {
+   label = 19;
+   break L3;
+   break;
+  }
+  case 4:  {
+   break L3;
+   break;
+  }
+  case 5:  {
+   label = 34;
+   break L3;
+   break;
+  }
+  case 20:  {
+   label = 36;
+   break L3;
+   break;
+  }
+  case 21:  {
+   label = 37;
+   break L3;
+   break;
+  }
+  case 6:  {
+   label = 38;
+   break L3;
+   break;
+  }
+  case 9:  {
+   label = 43;
+   break L3;
+   break;
+  }
+  case 10:  {
+   label = 44;
+   break L3;
+   break;
+  }
+  case 12:  {
+   label = 45;
+   break L3;
+   break;
+  }
+  case 29: case 30:  {
+   label = 66;
+   break L3;
+   break;
+  }
+  case 80:  {
+   label = 69;
+   break L3;
+   break;
+  }
+  case 81:  {
+   label = 70;
+   break L3;
+   break;
+  }
+  case 77:  {
+   label = 71;
+   break L3;
+   break;
+  }
+  case 78:  {
+   label = 72;
+   break L3;
+   break;
+  }
+  case 34:  {
+   label = 73;
+   break L3;
+   break;
+  }
+  case 36:  {
+   label = 74;
+   break L3;
+   break;
+  }
+  case 66:  {
+   label = 77;
+   break L3;
+   break;
+  }
+  case 24:  {
+   label = 78;
+   break L3;
+   break;
+  }
+  case 23:  {
+   label = 79;
+   break L3;
+   break;
+  }
+  case 28:  {
+   label = 90;
+   break L3;
+   break;
+  }
+  case 32:  {
+   label = 91;
+   break L3;
+   break;
+  }
+  case 33:  {
+   label = 94;
+   break L3;
+   break;
+  }
+  case 37:  {
+   label = 95;
+   break L3;
+   break;
+  }
+  case 38:  {
+   label = 96;
+   break L3;
+   break;
+  }
+  case 13:  {
+   label = 97;
+   break L3;
+   break;
+  }
+  case 14:  {
+   label = 98;
+   break L3;
+   break;
+  }
+  case 15:  {
+   label = 99;
+   break L3;
+   break;
+  }
+  case 16:  {
+   label = 100;
+   break L3;
+   break;
+  }
+  case 39:  {
+   label = 101;
+   break L3;
+   break;
+  }
+  case 41:  {
+   label = 102;
+   break L3;
+   break;
+  }
+  case 42:  {
+   label = 103;
+   break L3;
+   break;
+  }
+  case 44:  {
+   label = 104;
+   break L3;
+   break;
+  }
+  case 43:  {
+   label = 105;
+   break L3;
+   break;
+  }
+  case 47:  {
+   label = 106;
+   break L3;
+   break;
+  }
+  case 46:  {
+   label = 107;
+   break L3;
+   break;
+  }
+  case 45:  {
+   label = 108;
+   break L3;
+   break;
+  }
+  case 63:  {
+   label = 109;
+   break L3;
+   break;
+  }
+  case 69:  {
+   label = 110;
+   break L3;
+   break;
+  }
+  case 50:  {
+   label = 111;
+   break L3;
+   break;
+  }
+  case 51:  {
+   label = 112;
+   break L3;
+   break;
+  }
+  case 52:  {
+   label = 113;
+   break L3;
+   break;
+  }
+  case 55:  {
+   label = 114;
+   break L3;
+   break;
+  }
+  case 56:  {
+   label = 115;
+   break L3;
+   break;
+  }
+  case 57:  {
+   label = 116;
+   break L3;
+   break;
+  }
+  case 58:  {
+   label = 117;
+   break L3;
+   break;
+  }
+  case 59:  {
+   label = 118;
+   break L3;
+   break;
+  }
+  case 60:  {
+   label = 119;
+   break L3;
+   break;
+  }
+  case 54:  {
+   label = 120;
+   break L3;
+   break;
+  }
+  case 85:  {
+   label = 121;
+   break L3;
+   break;
+  }
+  case 86:  {
+   label = 122;
+   break L3;
+   break;
+  }
+  case 87:  {
+   label = 123;
+   break L3;
+   break;
+  }
+  case 88:  {
+   label = 124;
+   break L3;
+   break;
+  }
+  case 72:  {
+   label = 125;
+   break L3;
+   break;
+  }
+  case 73:  {
+   label = 126;
+   break L3;
+   break;
+  }
+  case 74:  {
+   label = 130;
+   break L3;
+   break;
+  }
+  case 75:  {
+   label = 138;
+   break L3;
+   break;
+  }
+  case 76:  {
+   label = 144;
+   break L3;
+   break;
+  }
+  case 70:  {
+   label = 145;
+   break L3;
+   break;
+  }
+  case 71:  {
+   label = 170;
+   break L3;
+   break;
+  }
+  case 91:  {
+   label = 184;
+   break L3;
+   break;
+  }
+  case 99:  {
+   label = 185;
+   break L3;
+   break;
+  }
+  case 3:  {
+   break;
+  }
+  default: {
+   label = 186;
+   break L3;
+  }
+  }
+  (_printf(63227,$vararg_buffer85)|0);
+  $422 = $1;
+  $423 = HEAP32[$422>>2]|0;
+  $n23 = $423;
+  $first_lval = 1;
+  $424 = $n23;
+  $425 = ($424|0)!=(0|0);
+  do {
+   if ($425) {
+    $426 = $n23;
+    $427 = HEAP32[$426>>2]|0;
+    $428 = ($427|0)!=(0|0);
+    if (!($428)) {
+     $429 = $n23;
+     $430 = ((($429)) + 4|0);
+     $431 = HEAP32[$430>>2]|0;
+     $432 = ($431|0)!=(0|0);
+     if (!($432)) {
+      break;
+     }
+    }
+    $433 = $n23;
+    $434 = $2;
+    $435 = (($434) + 1)|0;
+    _dump_prefix($433,$435);
+    (_printf(63240,$vararg_buffer87)|0);
+    $436 = $n23;
+    $437 = $2;
+    $438 = (($437) + 2)|0;
+    _dump_prefix($436,$438);
+    while(1) {
+     $439 = $n23;
+     $440 = ($439|0)!=(0|0);
+     if (!($440)) {
+      break;
+     }
+     $441 = $n23;
+     $442 = HEAP32[$441>>2]|0;
+     $443 = ($442|0)!=(0|0);
+     if ($443) {
+      $444 = $first_lval;
+      $445 = ($444<<24>>24)!=(0);
+      if (!($445)) {
+       (_printf(63258,$vararg_buffer89)|0);
+      }
+      $446 = $0;
+      $447 = $n23;
+      $448 = HEAP32[$447>>2]|0;
+      $449 = $448;
+      $450 = (_mrb_sym2name($446,$449)|0);
+      HEAP32[$vararg_buffer91>>2] = $450;
+      (_printf(63261,$vararg_buffer91)|0);
+      $first_lval = 0;
+     }
+     $451 = $n23;
+     $452 = ((($451)) + 4|0);
+     $453 = HEAP32[$452>>2]|0;
+     $n23 = $453;
+    }
+    (_printf(66199,$vararg_buffer94)|0);
+   }
+  } while(0);
+  $454 = $1;
+  $455 = ((($454)) + 4|0);
+  $456 = HEAP32[$455>>2]|0;
+  $1 = $456;
+  $457 = $2;
+  $458 = (($457) + 1)|0;
+  $2 = $458;
+ }
+ switch (label|0) {
+  case 3: {
+   (_printf(62885,$vararg_buffer)|0);
+   $14 = $0;
+   $15 = $1;
+   $16 = $2;
+   $17 = (($16) + 1)|0;
+   _dump_recur($14,$15,$17);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 4: {
+   (_printf(62898,$vararg_buffer1)|0);
+   $18 = $1;
+   $19 = HEAP32[$18>>2]|0;
+   $20 = ($19|0)!=(0|0);
+   if ($20) {
+    $21 = $1;
+    $22 = $2;
+    $23 = (($22) + 1)|0;
+    _dump_prefix($21,$23);
+    (_printf(62912,$vararg_buffer3)|0);
+    $24 = $0;
+    $25 = $1;
+    $26 = HEAP32[$25>>2]|0;
+    $27 = $2;
+    $28 = (($27) + 2)|0;
+    _mrb_parser_dump($24,$26,$28);
+   }
+   $29 = $1;
+   $30 = ((($29)) + 4|0);
+   $31 = HEAP32[$30>>2]|0;
+   $1 = $31;
+   $32 = $1;
+   $33 = HEAP32[$32>>2]|0;
+   $34 = ($33|0)!=(0|0);
+   L31: do {
+    if ($34) {
+     $35 = $1;
+     $36 = HEAP32[$35>>2]|0;
+     $n2 = $36;
+     $37 = $n2;
+     $38 = $2;
+     $39 = (($38) + 1)|0;
+     _dump_prefix($37,$39);
+     (_printf(62919,$vararg_buffer5)|0);
+     while(1) {
+      $40 = $n2;
+      $41 = ($40|0)!=(0|0);
+      if (!($41)) {
+       break L31;
+      }
+      $42 = $n2;
+      $43 = HEAP32[$42>>2]|0;
+      $n3 = $43;
+      $44 = $n3;
+      $45 = HEAP32[$44>>2]|0;
+      $46 = ($45|0)!=(0|0);
+      if ($46) {
+       $47 = $n2;
+       $48 = $2;
+       $49 = (($48) + 2)|0;
+       _dump_prefix($47,$49);
+       (_printf(62928,$vararg_buffer7)|0);
+       $50 = $0;
+       $51 = $n3;
+       $52 = HEAP32[$51>>2]|0;
+       $53 = $2;
+       $54 = (($53) + 3)|0;
+       _dump_recur($50,$52,$54);
+      }
+      $55 = $n3;
+      $56 = ((($55)) + 4|0);
+      $57 = HEAP32[$56>>2]|0;
+      $58 = HEAP32[$57>>2]|0;
+      $59 = ($58|0)!=(0|0);
+      if ($59) {
+       $60 = $n3;
+       $61 = $2;
+       $62 = (($61) + 2)|0;
+       _dump_prefix($60,$62);
+       (_printf(62945,$vararg_buffer9)|0);
+       $63 = $0;
+       $64 = $n3;
+       $65 = ((($64)) + 4|0);
+       $66 = HEAP32[$65>>2]|0;
+       $67 = HEAP32[$66>>2]|0;
+       $68 = $2;
+       $69 = (($68) + 3)|0;
+       _mrb_parser_dump($63,$67,$69);
+      }
+      $70 = $n3;
+      $71 = ((($70)) + 4|0);
+      $72 = HEAP32[$71>>2]|0;
+      $73 = ((($72)) + 4|0);
+      $74 = HEAP32[$73>>2]|0;
+      $75 = HEAP32[$74>>2]|0;
+      $76 = ($75|0)!=(0|0);
+      if ($76) {
+       $77 = $n3;
+       $78 = $2;
+       $79 = (($78) + 2)|0;
+       _dump_prefix($77,$79);
+       (_printf(62955,$vararg_buffer11)|0);
+       $80 = $0;
+       $81 = $n3;
+       $82 = ((($81)) + 4|0);
+       $83 = HEAP32[$82>>2]|0;
+       $84 = ((($83)) + 4|0);
+       $85 = HEAP32[$84>>2]|0;
+       $86 = HEAP32[$85>>2]|0;
+       $87 = $2;
+       $88 = (($87) + 3)|0;
+       _mrb_parser_dump($80,$86,$88);
+      }
+      $89 = $n2;
+      $90 = ((($89)) + 4|0);
+      $91 = HEAP32[$90>>2]|0;
+      $n2 = $91;
+     }
+    }
+   } while(0);
+   $92 = $1;
+   $93 = ((($92)) + 4|0);
+   $94 = HEAP32[$93>>2]|0;
+   $1 = $94;
+   $95 = $1;
+   $96 = HEAP32[$95>>2]|0;
+   $97 = ($96|0)!=(0|0);
+   if (!($97)) {
+    STACKTOP = sp;return;
+   }
+   $98 = $1;
+   $99 = $2;
+   $100 = (($99) + 1)|0;
+   _dump_prefix($98,$100);
+   (_printf(62969,$vararg_buffer13)|0);
+   $101 = $0;
+   $102 = $1;
+   $103 = HEAP32[$102>>2]|0;
+   $104 = $2;
+   $105 = (($104) + 2)|0;
+   _mrb_parser_dump($101,$103,$105);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 18: {
+   (_printf(62976,$vararg_buffer15)|0);
+   $106 = $1;
+   $107 = $2;
+   $108 = (($107) + 1)|0;
+   _dump_prefix($106,$108);
+   (_printf(62912,$vararg_buffer17)|0);
+   $109 = $0;
+   $110 = $1;
+   $111 = HEAP32[$110>>2]|0;
+   $112 = $2;
+   $113 = (($112) + 2)|0;
+   _mrb_parser_dump($109,$111,$113);
+   $114 = $1;
+   $115 = $2;
+   $116 = (($115) + 1)|0;
+   _dump_prefix($114,$116);
+   (_printf(62990,$vararg_buffer19)|0);
+   $117 = $0;
+   $118 = $1;
+   $119 = ((($118)) + 4|0);
+   $120 = HEAP32[$119>>2]|0;
+   $121 = ((($120)) + 4|0);
+   $122 = HEAP32[$121>>2]|0;
+   $123 = $2;
+   $124 = (($123) + 2)|0;
+   _mrb_parser_dump($117,$122,$124);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 19: {
+   (_printf(62999,$vararg_buffer21)|0);
+   break;
+  }
+  case 34: {
+   (_printf(63090,$vararg_buffer41)|0);
+   $224 = $1;
+   $225 = $2;
+   $226 = (($225) + 1)|0;
+   _dump_prefix($224,$226);
+   (_printf(63100,$vararg_buffer43)|0);
+   $227 = $0;
+   $228 = $1;
+   $229 = HEAP32[$228>>2]|0;
+   $230 = $2;
+   $231 = (($230) + 2)|0;
+   _mrb_parser_dump($227,$229,$231);
+   $232 = $1;
+   $233 = $2;
+   $234 = (($233) + 1)|0;
+   _dump_prefix($232,$234);
+   (_printf(63107,$vararg_buffer45)|0);
+   $235 = $0;
+   $236 = $1;
+   $237 = ((($236)) + 4|0);
+   $238 = HEAP32[$237>>2]|0;
+   $239 = HEAP32[$238>>2]|0;
+   $240 = $2;
+   $241 = (($240) + 2)|0;
+   _mrb_parser_dump($235,$239,$241);
+   $242 = $1;
+   $243 = ((($242)) + 4|0);
+   $244 = HEAP32[$243>>2]|0;
+   $245 = ((($244)) + 4|0);
+   $246 = HEAP32[$245>>2]|0;
+   $247 = HEAP32[$246>>2]|0;
+   $248 = ($247|0)!=(0|0);
+   if (!($248)) {
+    STACKTOP = sp;return;
+   }
+   $249 = $1;
+   $250 = $2;
+   $251 = (($250) + 1)|0;
+   _dump_prefix($249,$251);
+   (_printf(62969,$vararg_buffer47)|0);
+   $252 = $0;
+   $253 = $1;
+   $254 = ((($253)) + 4|0);
+   $255 = HEAP32[$254>>2]|0;
+   $256 = ((($255)) + 4|0);
+   $257 = HEAP32[$256>>2]|0;
+   $258 = HEAP32[$257>>2]|0;
+   $259 = $2;
+   $260 = (($259) + 2)|0;
+   _mrb_parser_dump($252,$258,$260);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 36: {
+   (_printf(63114,$vararg_buffer49)|0);
+   $261 = $0;
+   $262 = $1;
+   $263 = HEAP32[$262>>2]|0;
+   $264 = $2;
+   $265 = (($264) + 1)|0;
+   _mrb_parser_dump($261,$263,$265);
+   $266 = $0;
+   $267 = $1;
+   $268 = ((($267)) + 4|0);
+   $269 = HEAP32[$268>>2]|0;
+   $270 = $2;
+   $271 = (($270) + 1)|0;
+   _mrb_parser_dump($266,$269,$271);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 37: {
+   (_printf(63125,$vararg_buffer51)|0);
+   $272 = $0;
+   $273 = $1;
+   $274 = HEAP32[$273>>2]|0;
+   $275 = $2;
+   $276 = (($275) + 1)|0;
+   _mrb_parser_dump($272,$274,$276);
+   $277 = $0;
+   $278 = $1;
+   $279 = ((($278)) + 4|0);
+   $280 = HEAP32[$279>>2]|0;
+   $281 = $2;
+   $282 = (($281) + 1)|0;
+   _mrb_parser_dump($277,$280,$282);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 38: {
+   (_printf(63135,$vararg_buffer53)|0);
+   $283 = $1;
+   $284 = HEAP32[$283>>2]|0;
+   $285 = ($284|0)!=(0|0);
+   if ($285) {
+    $286 = $0;
+    $287 = $1;
+    $288 = HEAP32[$287>>2]|0;
+    $289 = $2;
+    $290 = (($289) + 1)|0;
+    _mrb_parser_dump($286,$288,$290);
+   }
+   $291 = $1;
+   $292 = ((($291)) + 4|0);
+   $293 = HEAP32[$292>>2]|0;
+   $1 = $293;
+   while(1) {
+    $294 = $1;
+    $295 = ($294|0)!=(0|0);
+    if (!($295)) {
+     break;
+    }
+    $296 = $1;
+    $297 = $2;
+    $298 = (($297) + 1)|0;
+    _dump_prefix($296,$298);
+    (_printf(63147,$vararg_buffer55)|0);
+    $299 = $0;
+    $300 = $1;
+    $301 = HEAP32[$300>>2]|0;
+    $302 = HEAP32[$301>>2]|0;
+    $303 = $2;
+    $304 = (($303) + 2)|0;
+    _dump_recur($299,$302,$304);
+    $305 = $1;
+    $306 = $2;
+    $307 = (($306) + 1)|0;
+    _dump_prefix($305,$307);
+    (_printf(62912,$vararg_buffer57)|0);
+    $308 = $0;
+    $309 = $1;
+    $310 = HEAP32[$309>>2]|0;
+    $311 = ((($310)) + 4|0);
+    $312 = HEAP32[$311>>2]|0;
+    $313 = $2;
+    $314 = (($313) + 2)|0;
+    _mrb_parser_dump($308,$312,$314);
+    $315 = $1;
+    $316 = ((($315)) + 4|0);
+    $317 = HEAP32[$316>>2]|0;
+    $1 = $317;
+   }
+   STACKTOP = sp;return;
+   break;
+  }
+  case 43: {
+   (_printf(63154,$vararg_buffer59)|0);
+   $318 = $1;
+   $319 = $2;
+   $320 = (($319) + 1)|0;
+   _dump_prefix($318,$320);
+   (_printf(63100,$vararg_buffer61)|0);
+   $321 = $0;
+   $322 = $1;
+   $323 = HEAP32[$322>>2]|0;
+   $324 = $2;
+   $325 = (($324) + 2)|0;
+   _mrb_parser_dump($321,$323,$325);
+   $326 = $1;
+   $327 = $2;
+   $328 = (($327) + 1)|0;
+   _dump_prefix($326,$328);
+   (_printf(62912,$vararg_buffer63)|0);
+   $329 = $0;
+   $330 = $1;
+   $331 = ((($330)) + 4|0);
+   $332 = HEAP32[$331>>2]|0;
+   $333 = $2;
+   $334 = (($333) + 2)|0;
+   _mrb_parser_dump($329,$332,$334);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 44: {
+   (_printf(63167,$vararg_buffer65)|0);
+   $335 = $1;
+   $336 = $2;
+   $337 = (($336) + 1)|0;
+   _dump_prefix($335,$337);
+   (_printf(63100,$vararg_buffer67)|0);
+   $338 = $0;
+   $339 = $1;
+   $340 = HEAP32[$339>>2]|0;
+   $341 = $2;
+   $342 = (($341) + 2)|0;
+   _mrb_parser_dump($338,$340,$342);
+   $343 = $1;
+   $344 = $2;
+   $345 = (($344) + 1)|0;
+   _dump_prefix($343,$345);
+   (_printf(62912,$vararg_buffer69)|0);
+   $346 = $0;
+   $347 = $1;
+   $348 = ((($347)) + 4|0);
+   $349 = HEAP32[$348>>2]|0;
+   $350 = $2;
+   $351 = (($350) + 2)|0;
+   _mrb_parser_dump($346,$349,$351);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 45: {
+   (_printf(63180,$vararg_buffer71)|0);
+   $352 = $1;
+   $353 = $2;
+   $354 = (($353) + 1)|0;
+   _dump_prefix($352,$354);
+   (_printf(63191,$vararg_buffer73)|0);
+   $355 = $1;
+   $356 = HEAP32[$355>>2]|0;
+   $n22 = $356;
+   $357 = $n22;
+   $358 = HEAP32[$357>>2]|0;
+   $359 = ($358|0)!=(0|0);
+   if ($359) {
+    $360 = $n22;
+    $361 = $2;
+    $362 = (($361) + 2)|0;
+    _dump_prefix($360,$362);
+    (_printf(63197,$vararg_buffer75)|0);
+    $363 = $0;
+    $364 = $n22;
+    $365 = HEAP32[$364>>2]|0;
+    $366 = $2;
+    $367 = (($366) + 3)|0;
+    _dump_recur($363,$365,$367);
+   }
+   $368 = $n22;
+   $369 = ((($368)) + 4|0);
+   $370 = HEAP32[$369>>2]|0;
+   $n22 = $370;
+   $371 = $n22;
+   $372 = ($371|0)!=(0|0);
+   if ($372) {
+    $373 = $n22;
+    $374 = HEAP32[$373>>2]|0;
+    $375 = ($374|0)!=(0|0);
+    if ($375) {
+     $376 = $n22;
+     $377 = $2;
+     $378 = (($377) + 2)|0;
+     _dump_prefix($376,$378);
+     (_printf(63203,$vararg_buffer77)|0);
+     $379 = $0;
+     $380 = $n22;
+     $381 = HEAP32[$380>>2]|0;
+     $382 = $2;
+     $383 = (($382) + 3)|0;
+     _mrb_parser_dump($379,$381,$383);
+    }
+    $384 = $n22;
+    $385 = ((($384)) + 4|0);
+    $386 = HEAP32[$385>>2]|0;
+    $n22 = $386;
+    $387 = $n22;
+    $388 = ($387|0)!=(0|0);
+    if ($388) {
+     $389 = $n22;
+     $390 = HEAP32[$389>>2]|0;
+     $391 = ($390|0)!=(0|0);
+     if ($391) {
+      $392 = $n22;
+      $393 = $2;
+      $394 = (($393) + 2)|0;
+      _dump_prefix($392,$394);
+      (_printf(63210,$vararg_buffer79)|0);
+      $395 = $0;
+      $396 = $n22;
+      $397 = HEAP32[$396>>2]|0;
+      $398 = $2;
+      $399 = (($398) + 3)|0;
+      _dump_recur($395,$397,$399);
+     }
+    }
+   }
+   $400 = $1;
+   $401 = ((($400)) + 4|0);
+   $402 = HEAP32[$401>>2]|0;
+   $1 = $402;
+   $403 = $1;
+   $404 = $2;
+   $405 = (($404) + 1)|0;
+   _dump_prefix($403,$405);
+   (_printf(63217,$vararg_buffer81)|0);
+   $406 = $0;
+   $407 = $1;
+   $408 = HEAP32[$407>>2]|0;
+   $409 = $2;
+   $410 = (($409) + 2)|0;
+   _mrb_parser_dump($406,$408,$410);
+   $411 = $1;
+   $412 = ((($411)) + 4|0);
+   $413 = HEAP32[$412>>2]|0;
+   $1 = $413;
+   $414 = $1;
+   $415 = $2;
+   $416 = (($415) + 1)|0;
+   _dump_prefix($414,$416);
+   (_printf(63222,$vararg_buffer83)|0);
+   $417 = $0;
+   $418 = $1;
+   $419 = HEAP32[$418>>2]|0;
+   $420 = $2;
+   $421 = (($420) + 2)|0;
+   _mrb_parser_dump($417,$419,$421);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 66: {
+   (_printf(63264,$vararg_buffer96)|0);
+   $459 = $0;
+   $460 = $1;
+   $461 = HEAP32[$460>>2]|0;
+   $462 = $2;
+   $463 = (($462) + 1)|0;
+   _mrb_parser_dump($459,$461,$463);
+   $464 = $1;
+   $465 = $2;
+   $466 = (($465) + 1)|0;
+   _dump_prefix($464,$466);
+   $467 = $0;
+   $468 = $1;
+   $469 = ((($468)) + 4|0);
+   $470 = HEAP32[$469>>2]|0;
+   $471 = HEAP32[$470>>2]|0;
+   $472 = $471;
+   $473 = (_mrb_sym2name($467,$472)|0);
+   $474 = $1;
+   $475 = ((($474)) + 4|0);
+   $476 = HEAP32[$475>>2]|0;
+   $477 = HEAP32[$476>>2]|0;
+   $478 = $477;
+   HEAP32[$vararg_buffer98>>2] = $473;
+   $vararg_ptr101 = ((($vararg_buffer98)) + 4|0);
+   HEAP32[$vararg_ptr101>>2] = $478;
+   (_printf(63276,$vararg_buffer98)|0);
+   $479 = $1;
+   $480 = ((($479)) + 4|0);
+   $481 = HEAP32[$480>>2]|0;
+   $482 = ((($481)) + 4|0);
+   $483 = HEAP32[$482>>2]|0;
+   $484 = HEAP32[$483>>2]|0;
+   $1 = $484;
+   $485 = $1;
+   $486 = ($485|0)!=(0|0);
+   if (!($486)) {
+    STACKTOP = sp;return;
+   }
+   $487 = $1;
+   $488 = $2;
+   $489 = (($488) + 1)|0;
+   _dump_prefix($487,$489);
+   (_printf(63294,$vararg_buffer102)|0);
+   $490 = $0;
+   $491 = $1;
+   $492 = HEAP32[$491>>2]|0;
+   $493 = $2;
+   $494 = (($493) + 2)|0;
+   _dump_recur($490,$492,$494);
+   $495 = $1;
+   $496 = ((($495)) + 4|0);
+   $497 = HEAP32[$496>>2]|0;
+   $498 = ($497|0)!=(0|0);
+   if (!($498)) {
+    STACKTOP = sp;return;
+   }
+   $499 = $1;
+   $500 = $2;
+   $501 = (($500) + 1)|0;
+   _dump_prefix($499,$501);
+   (_printf(63301,$vararg_buffer104)|0);
+   $502 = $0;
+   $503 = $1;
+   $504 = ((($503)) + 4|0);
+   $505 = HEAP32[$504>>2]|0;
+   $506 = $2;
+   $507 = (($506) + 2)|0;
+   _mrb_parser_dump($502,$505,$507);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 69: {
+   (_printf(63309,$vararg_buffer106)|0);
+   $508 = $0;
+   $509 = $1;
+   $510 = HEAP32[$509>>2]|0;
+   $511 = $2;
+   $512 = (($511) + 1)|0;
+   _mrb_parser_dump($508,$510,$512);
+   $513 = $0;
+   $514 = $1;
+   $515 = ((($514)) + 4|0);
+   $516 = HEAP32[$515>>2]|0;
+   $517 = $2;
+   $518 = (($517) + 1)|0;
+   _mrb_parser_dump($513,$516,$518);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 70: {
+   (_printf(63321,$vararg_buffer108)|0);
+   $519 = $0;
+   $520 = $1;
+   $521 = HEAP32[$520>>2]|0;
+   $522 = $2;
+   $523 = (($522) + 1)|0;
+   _mrb_parser_dump($519,$521,$523);
+   $524 = $0;
+   $525 = $1;
+   $526 = ((($525)) + 4|0);
+   $527 = HEAP32[$526>>2]|0;
+   $528 = $2;
+   $529 = (($528) + 1)|0;
+   _mrb_parser_dump($524,$527,$529);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 71: {
+   (_printf(63333,$vararg_buffer110)|0);
+   $530 = $0;
+   $531 = $1;
+   $532 = HEAP32[$531>>2]|0;
+   $533 = $2;
+   $534 = (($533) + 1)|0;
+   _mrb_parser_dump($530,$532,$534);
+   $535 = $1;
+   $536 = $2;
+   $537 = (($536) + 1)|0;
+   _dump_prefix($535,$537);
+   $538 = $0;
+   $539 = $1;
+   $540 = ((($539)) + 4|0);
+   $541 = HEAP32[$540>>2]|0;
+   $542 = $541;
+   $543 = (_mrb_sym2name($538,$542)|0);
+   HEAP32[$vararg_buffer112>>2] = $543;
+   (_printf(63347,$vararg_buffer112)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 72: {
+   $544 = $0;
+   $545 = $1;
+   $546 = $545;
+   $547 = (_mrb_sym2name($544,$546)|0);
+   HEAP32[$vararg_buffer115>>2] = $547;
+   (_printf(63353,$vararg_buffer115)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 73: {
+   (_printf(63372,$vararg_buffer118)|0);
+   $548 = $0;
+   $549 = $1;
+   $550 = $2;
+   $551 = (($550) + 1)|0;
+   _dump_recur($548,$549,$551);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 74: {
+   (_printf(63385,$vararg_buffer120)|0);
+   while(1) {
+    $552 = $1;
+    $553 = ($552|0)!=(0|0);
+    if (!($553)) {
+     break;
+    }
+    $554 = $1;
+    $555 = $2;
+    $556 = (($555) + 1)|0;
+    _dump_prefix($554,$556);
+    (_printf(63397,$vararg_buffer122)|0);
+    $557 = $0;
+    $558 = $1;
+    $559 = HEAP32[$558>>2]|0;
+    $560 = HEAP32[$559>>2]|0;
+    $561 = $2;
+    $562 = (($561) + 2)|0;
+    _mrb_parser_dump($557,$560,$562);
+    $563 = $1;
+    $564 = $2;
+    $565 = (($564) + 1)|0;
+    _dump_prefix($563,$565);
+    (_printf(63403,$vararg_buffer124)|0);
+    $566 = $0;
+    $567 = $1;
+    $568 = HEAP32[$567>>2]|0;
+    $569 = ((($568)) + 4|0);
+    $570 = HEAP32[$569>>2]|0;
+    $571 = $2;
+    $572 = (($571) + 2)|0;
+    _mrb_parser_dump($566,$570,$572);
+    $573 = $1;
+    $574 = ((($573)) + 4|0);
+    $575 = HEAP32[$574>>2]|0;
+    $1 = $575;
+   }
+   STACKTOP = sp;return;
+   break;
+  }
+  case 77: {
+   (_printf(63411,$vararg_buffer126)|0);
+   $576 = $0;
+   $577 = $1;
+   $578 = $2;
+   $579 = (($578) + 1)|0;
+   _mrb_parser_dump($576,$577,$579);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 78: {
+   (_printf(63424,$vararg_buffer128)|0);
+   $580 = $1;
+   $581 = $2;
+   $582 = (($581) + 1)|0;
+   _dump_prefix($580,$582);
+   (_printf(63436,$vararg_buffer130)|0);
+   $583 = $0;
+   $584 = $1;
+   $585 = HEAP32[$584>>2]|0;
+   $586 = $2;
+   $587 = (($586) + 2)|0;
+   _mrb_parser_dump($583,$585,$587);
+   $588 = $1;
+   $589 = $2;
+   $590 = (($589) + 1)|0;
+   _dump_prefix($588,$590);
+   (_printf(63442,$vararg_buffer132)|0);
+   $591 = $0;
+   $592 = $1;
+   $593 = ((($592)) + 4|0);
+   $594 = HEAP32[$593>>2]|0;
+   $595 = $2;
+   $596 = (($595) + 2)|0;
+   _mrb_parser_dump($591,$594,$596);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 79: {
+   (_printf(63448,$vararg_buffer134)|0);
+   $597 = $1;
+   $598 = $2;
+   $599 = (($598) + 1)|0;
+   _dump_prefix($597,$599);
+   (_printf(63461,$vararg_buffer136)|0);
+   $600 = $1;
+   $601 = HEAP32[$600>>2]|0;
+   $n24 = $601;
+   $602 = $n24;
+   $603 = HEAP32[$602>>2]|0;
+   $604 = ($603|0)!=(0|0);
+   if ($604) {
+    $605 = $1;
+    $606 = $2;
+    $607 = (($606) + 2)|0;
+    _dump_prefix($605,$607);
+    (_printf(63197,$vararg_buffer138)|0);
+    $608 = $0;
+    $609 = $n24;
+    $610 = HEAP32[$609>>2]|0;
+    $611 = $2;
+    $612 = (($611) + 3)|0;
+    _dump_recur($608,$610,$612);
+   }
+   $613 = $n24;
+   $614 = ((($613)) + 4|0);
+   $615 = HEAP32[$614>>2]|0;
+   $n24 = $615;
+   $616 = $n24;
+   $617 = ($616|0)!=(0|0);
+   if ($617) {
+    $618 = $n24;
+    $619 = HEAP32[$618>>2]|0;
+    $620 = ($619|0)!=(0|0);
+    do {
+     if ($620) {
+      $621 = $n24;
+      $622 = $2;
+      $623 = (($622) + 2)|0;
+      _dump_prefix($621,$623);
+      (_printf(63203,$vararg_buffer140)|0);
+      $624 = $n24;
+      $625 = HEAP32[$624>>2]|0;
+      $626 = ($625|0)==((-1)|0);
+      if ($626) {
+       $627 = $n24;
+       $628 = $2;
+       $629 = (($628) + 2)|0;
+       _dump_prefix($627,$629);
+       (_printf(63468,$vararg_buffer142)|0);
+       break;
+      } else {
+       $630 = $0;
+       $631 = $n24;
+       $632 = HEAP32[$631>>2]|0;
+       $633 = $2;
+       $634 = (($633) + 3)|0;
+       _mrb_parser_dump($630,$632,$634);
+       break;
+      }
+     }
+    } while(0);
+    $635 = $n24;
+    $636 = ((($635)) + 4|0);
+    $637 = HEAP32[$636>>2]|0;
+    $n24 = $637;
+    $638 = $n24;
+    $639 = ($638|0)!=(0|0);
+    if ($639) {
+     $640 = $n24;
+     $641 = HEAP32[$640>>2]|0;
+     $642 = ($641|0)!=(0|0);
+     if ($642) {
+      $643 = $n24;
+      $644 = $2;
+      $645 = (($644) + 2)|0;
+      _dump_prefix($643,$645);
+      (_printf(63210,$vararg_buffer144)|0);
+      $646 = $0;
+      $647 = $n24;
+      $648 = HEAP32[$647>>2]|0;
+      $649 = $2;
+      $650 = (($649) + 3)|0;
+      _dump_recur($646,$648,$650);
+     }
+    }
+   }
+   $651 = $1;
+   $652 = $2;
+   $653 = (($652) + 1)|0;
+   _dump_prefix($651,$653);
+   (_printf(63442,$vararg_buffer146)|0);
+   $654 = $0;
+   $655 = $1;
+   $656 = ((($655)) + 4|0);
+   $657 = HEAP32[$656>>2]|0;
+   $658 = $2;
+   $659 = (($658) + 2)|0;
+   _mrb_parser_dump($654,$657,$659);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 90: {
+   (_printf(63477,$vararg_buffer148)|0);
+   $660 = $1;
+   $661 = $2;
+   $662 = (($661) + 1)|0;
+   _dump_prefix($660,$662);
+   (_printf(63436,$vararg_buffer150)|0);
+   $663 = $0;
+   $664 = $1;
+   $665 = HEAP32[$664>>2]|0;
+   $666 = $2;
+   $667 = (($666) + 2)|0;
+   _mrb_parser_dump($663,$665,$667);
+   $668 = $1;
+   $669 = ((($668)) + 4|0);
+   $670 = HEAP32[$669>>2]|0;
+   $1 = $670;
+   $671 = $1;
+   $672 = $2;
+   $673 = (($672) + 1)|0;
+   _dump_prefix($671,$673);
+   $674 = $0;
+   $675 = $1;
+   $676 = HEAP32[$675>>2]|0;
+   $677 = $676;
+   $678 = (_mrb_sym2name($674,$677)|0);
+   $679 = $1;
+   $680 = HEAP32[$679>>2]|0;
+   $681 = $680;
+   HEAP32[$vararg_buffer152>>2] = $678;
+   $vararg_ptr155 = ((($vararg_buffer152)) + 4|0);
+   HEAP32[$vararg_ptr155>>2] = $681;
+   (_printf(63492,$vararg_buffer152)|0);
+   $682 = $1;
+   $683 = ((($682)) + 4|0);
+   $684 = HEAP32[$683>>2]|0;
+   $1 = $684;
+   $685 = $0;
+   $686 = $1;
+   $687 = HEAP32[$686>>2]|0;
+   $688 = $2;
+   $689 = (($688) + 1)|0;
+   _mrb_parser_dump($685,$687,$689);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 91: {
+   (_printf(63506,$vararg_buffer156)|0);
+   $690 = $1;
+   $691 = ($690|0)!=(0|0);
+   if (!($691)) {
+    STACKTOP = sp;return;
+   }
+   $692 = $1;
+   $693 = $2;
+   $694 = (($693) + 1)|0;
+   _dump_prefix($692,$694);
+   (_printf(63294,$vararg_buffer158)|0);
+   $695 = $0;
+   $696 = $1;
+   $697 = HEAP32[$696>>2]|0;
+   $698 = $2;
+   $699 = (($698) + 2)|0;
+   _dump_recur($695,$697,$699);
+   $700 = $1;
+   $701 = ((($700)) + 4|0);
+   $702 = HEAP32[$701>>2]|0;
+   $703 = ($702|0)!=(0|0);
+   if (!($703)) {
+    STACKTOP = sp;return;
+   }
+   $704 = $1;
+   $705 = $2;
+   $706 = (($705) + 1)|0;
+   _dump_prefix($704,$706);
+   (_printf(63301,$vararg_buffer160)|0);
+   $707 = $0;
+   $708 = $1;
+   $709 = ((($708)) + 4|0);
+   $710 = HEAP32[$709>>2]|0;
+   $711 = $2;
+   $712 = (($711) + 2)|0;
+   _mrb_parser_dump($707,$710,$712);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 94: {
+   (_printf(63519,$vararg_buffer162)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 95: {
+   (_printf(63532,$vararg_buffer164)|0);
+   $713 = $0;
+   $714 = $1;
+   $715 = $2;
+   $716 = (($715) + 1)|0;
+   _mrb_parser_dump($713,$714,$716);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 96: {
+   (_printf(63546,$vararg_buffer166)|0);
+   $717 = $0;
+   $718 = $1;
+   $719 = $2;
+   $720 = (($719) + 1)|0;
+   _dump_recur($717,$718,$720);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 97: {
+   (_printf(63559,$vararg_buffer168)|0);
+   $721 = $0;
+   $722 = $1;
+   $723 = $2;
+   $724 = (($723) + 1)|0;
+   _mrb_parser_dump($721,$722,$724);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 98: {
+   (_printf(63572,$vararg_buffer170)|0);
+   $725 = $0;
+   $726 = $1;
+   $727 = $2;
+   $728 = (($727) + 1)|0;
+   _mrb_parser_dump($725,$726,$728);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 99: {
+   (_printf(63584,$vararg_buffer172)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 100: {
+   (_printf(63595,$vararg_buffer174)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 101: {
+   $729 = $0;
+   $730 = $1;
+   $731 = $730;
+   $732 = (_mrb_sym2name($729,$731)|0);
+   HEAP32[$vararg_buffer176>>2] = $732;
+   (_printf(63607,$vararg_buffer176)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 102: {
+   $733 = $0;
+   $734 = $1;
+   $735 = $734;
+   $736 = (_mrb_sym2name($733,$735)|0);
+   HEAP32[$vararg_buffer179>>2] = $736;
+   (_printf(63621,$vararg_buffer179)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 103: {
+   $737 = $0;
+   $738 = $1;
+   $739 = $738;
+   $740 = (_mrb_sym2name($737,$739)|0);
+   HEAP32[$vararg_buffer182>>2] = $740;
+   (_printf(63635,$vararg_buffer182)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 104: {
+   $741 = $0;
+   $742 = $1;
+   $743 = $742;
+   $744 = (_mrb_sym2name($741,$743)|0);
+   HEAP32[$vararg_buffer185>>2] = $744;
+   (_printf(63649,$vararg_buffer185)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 105: {
+   $745 = $0;
+   $746 = $1;
+   $747 = $746;
+   $748 = (_mrb_sym2name($745,$747)|0);
+   HEAP32[$vararg_buffer188>>2] = $748;
+   (_printf(63663,$vararg_buffer188)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 106: {
+   (_printf(63678,$vararg_buffer191)|0);
+   $749 = $1;
+   $750 = $2;
+   $751 = (($750) + 1)|0;
+   _dump_prefix($749,$751);
+   (_printf(63436,$vararg_buffer193)|0);
+   $752 = $0;
+   $753 = $1;
+   $754 = HEAP32[$753>>2]|0;
+   $755 = $2;
+   $756 = (($755) + 2)|0;
+   _mrb_parser_dump($752,$754,$756);
+   $757 = $1;
+   $758 = $2;
+   $759 = (($758) + 1)|0;
+   _dump_prefix($757,$759);
+   (_printf(63442,$vararg_buffer195)|0);
+   $760 = $0;
+   $761 = $1;
+   $762 = ((($761)) + 4|0);
+   $763 = HEAP32[$762>>2]|0;
+   $764 = $2;
+   $765 = (($764) + 2)|0;
+   _mrb_parser_dump($760,$763,$765);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 107: {
+   $766 = $1;
+   $767 = $766;
+   HEAP32[$vararg_buffer197>>2] = $767;
+   (_printf(63691,$vararg_buffer197)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 108: {
+   $768 = $1;
+   $769 = $768;
+   HEAP32[$vararg_buffer200>>2] = $769;
+   (_printf(63711,$vararg_buffer200)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 109: {
+   $770 = $0;
+   $771 = $1;
+   $772 = $771;
+   $773 = (_mrb_sym2name($770,$772)|0);
+   HEAP32[$vararg_buffer203>>2] = $773;
+   (_printf(63730,$vararg_buffer203)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 110: {
+   (_printf(63743,$vararg_buffer206)|0);
+   $774 = $0;
+   $775 = $1;
+   $776 = $2;
+   $777 = (($776) + 1)|0;
+   _mrb_parser_dump($774,$775,$777);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 111: {
+   $778 = $1;
+   $779 = HEAP32[$778>>2]|0;
+   $780 = $1;
+   $781 = ((($780)) + 4|0);
+   $782 = HEAP32[$781>>2]|0;
+   $783 = HEAP32[$782>>2]|0;
+   $784 = $783;
+   HEAP32[$vararg_buffer208>>2] = $779;
+   $vararg_ptr211 = ((($vararg_buffer208)) + 4|0);
+   HEAP32[$vararg_ptr211>>2] = $784;
+   (_printf(63760,$vararg_buffer208)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 112: {
+   $785 = $1;
+   HEAP32[$vararg_buffer212>>2] = $785;
+   (_printf(63781,$vararg_buffer212)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 113: {
+   (_printf(63796,$vararg_buffer215)|0);
+   $786 = $0;
+   $787 = $1;
+   $788 = $2;
+   $789 = (($788) + 1)|0;
+   _mrb_parser_dump($786,$787,$789);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 114: {
+   $790 = $1;
+   $791 = HEAP32[$790>>2]|0;
+   $792 = $1;
+   $793 = ((($792)) + 4|0);
+   $794 = HEAP32[$793>>2]|0;
+   $795 = $794;
+   HEAP32[$vararg_buffer217>>2] = $791;
+   $vararg_ptr220 = ((($vararg_buffer217)) + 4|0);
+   HEAP32[$vararg_ptr220>>2] = $795;
+   (_printf(63809,$vararg_buffer217)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 115: {
+   (_printf(63831,$vararg_buffer221)|0);
+   $796 = $0;
+   $797 = $1;
+   $798 = $2;
+   $799 = (($798) + 1)|0;
+   _dump_recur($796,$797,$799);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 116: {
+   $800 = $1;
+   $801 = HEAP32[$800>>2]|0;
+   $802 = $1;
+   $803 = ((($802)) + 4|0);
+   $804 = HEAP32[$803>>2]|0;
+   $805 = $804;
+   HEAP32[$vararg_buffer223>>2] = $801;
+   $vararg_ptr226 = ((($vararg_buffer223)) + 4|0);
+   HEAP32[$vararg_ptr226>>2] = $805;
+   (_printf(63842,$vararg_buffer223)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 117: {
+   (_printf(63865,$vararg_buffer227)|0);
+   $806 = $0;
+   $807 = $1;
+   $808 = $2;
+   $809 = (($808) + 1)|0;
+   _dump_recur($806,$807,$809);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 118: {
+   $810 = $1;
+   $811 = HEAP32[$810>>2]|0;
+   $812 = $1;
+   $813 = ((($812)) + 4|0);
+   $814 = HEAP32[$813>>2]|0;
+   HEAP32[$vararg_buffer229>>2] = $811;
+   $vararg_ptr232 = ((($vararg_buffer229)) + 4|0);
+   HEAP32[$vararg_ptr232>>2] = $814;
+   (_printf(63877,$vararg_buffer229)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 119: {
+   (_printf(63895,$vararg_buffer233)|0);
+   $815 = $0;
+   $816 = $1;
+   $817 = HEAP32[$816>>2]|0;
+   $818 = $2;
+   $819 = (($818) + 1)|0;
+   _dump_recur($815,$817,$819);
+   $820 = $1;
+   $821 = $2;
+   _dump_prefix($820,$821);
+   $822 = $1;
+   $823 = ((($822)) + 4|0);
+   $824 = HEAP32[$823>>2]|0;
+   $825 = ((($824)) + 4|0);
+   $826 = HEAP32[$825>>2]|0;
+   $827 = HEAP32[$826>>2]|0;
+   HEAP32[$vararg_buffer235>>2] = $827;
+   (_printf(63907,$vararg_buffer235)|0);
+   $828 = $1;
+   $829 = $2;
+   _dump_prefix($828,$829);
+   $830 = $1;
+   $831 = ((($830)) + 4|0);
+   $832 = HEAP32[$831>>2]|0;
+   $833 = ((($832)) + 4|0);
+   $834 = HEAP32[$833>>2]|0;
+   $835 = ((($834)) + 4|0);
+   $836 = HEAP32[$835>>2]|0;
+   HEAP32[$vararg_buffer238>>2] = $836;
+   (_printf(63917,$vararg_buffer238)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 120: {
+   $837 = $0;
+   $838 = $1;
+   $839 = $838;
+   $840 = (_mrb_sym2name($837,$839)|0);
+   HEAP32[$vararg_buffer241>>2] = $840;
+   (_printf(63926,$vararg_buffer241)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 121: {
+   (_printf(63940,$vararg_buffer244)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 122: {
+   (_printf(63951,$vararg_buffer246)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 123: {
+   (_printf(63961,$vararg_buffer248)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 124: {
+   (_printf(63972,$vararg_buffer250)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 125: {
+   $841 = $0;
+   $842 = $1;
+   $843 = HEAP32[$842>>2]|0;
+   $844 = $843;
+   $845 = (_mrb_sym2name($841,$844)|0);
+   $846 = $0;
+   $847 = $1;
+   $848 = ((($847)) + 4|0);
+   $849 = HEAP32[$848>>2]|0;
+   $850 = $849;
+   $851 = (_mrb_sym2name($846,$850)|0);
+   HEAP32[$vararg_buffer252>>2] = $845;
+   $vararg_ptr255 = ((($vararg_buffer252)) + 4|0);
+   HEAP32[$vararg_ptr255>>2] = $851;
+   (_printf(63984,$vararg_buffer252)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 126: {
+   (_printf(64003,$vararg_buffer256)|0);
+   $852 = $1;
+   $t = $852;
+   while(1) {
+    $853 = $t;
+    $854 = ($853|0)!=(0|0);
+    if (!($854)) {
+     break;
+    }
+    $855 = $0;
+    $856 = $t;
+    $857 = HEAP32[$856>>2]|0;
+    $858 = $857;
+    $859 = (_mrb_sym2name($855,$858)|0);
+    HEAP32[$vararg_buffer258>>2] = $859;
+    (_printf(64014,$vararg_buffer258)|0);
+    $860 = $t;
+    $861 = ((($860)) + 4|0);
+    $862 = HEAP32[$861>>2]|0;
+    $t = $862;
+   }
+   (_printf(64018,$vararg_buffer261)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 130: {
+   (_printf(64021,$vararg_buffer263)|0);
+   $863 = $1;
+   $864 = HEAP32[$863>>2]|0;
+   $865 = HEAP32[$864>>2]|0;
+   $866 = ($865|0)==(0|0);
+   $867 = $1;
+   do {
+    if ($866) {
+     $868 = $2;
+     $869 = (($868) + 1)|0;
+     _dump_prefix($867,$869);
+     $870 = $0;
+     $871 = $1;
+     $872 = HEAP32[$871>>2]|0;
+     $873 = ((($872)) + 4|0);
+     $874 = HEAP32[$873>>2]|0;
+     $875 = $874;
+     $876 = (_mrb_sym2name($870,$875)|0);
+     HEAP32[$vararg_buffer265>>2] = $876;
+     (_printf(64034,$vararg_buffer265)|0);
+    } else {
+     $877 = HEAP32[$867>>2]|0;
+     $878 = HEAP32[$877>>2]|0;
+     $879 = ($878|0)==((1)|0);
+     if ($879) {
+      $880 = $1;
+      $881 = $2;
+      $882 = (($881) + 1)|0;
+      _dump_prefix($880,$882);
+      $883 = $0;
+      $884 = $1;
+      $885 = HEAP32[$884>>2]|0;
+      $886 = ((($885)) + 4|0);
+      $887 = HEAP32[$886>>2]|0;
+      $888 = $887;
+      $889 = (_mrb_sym2name($883,$888)|0);
+      HEAP32[$vararg_buffer268>>2] = $889;
+      (_printf(63347,$vararg_buffer268)|0);
+      break;
+     } else {
+      $890 = $0;
+      $891 = $1;
+      $892 = HEAP32[$891>>2]|0;
+      $893 = HEAP32[$892>>2]|0;
+      $894 = $2;
+      $895 = (($894) + 1)|0;
+      _mrb_parser_dump($890,$893,$895);
+      $896 = $1;
+      $897 = $2;
+      $898 = (($897) + 1)|0;
+      _dump_prefix($896,$898);
+      $899 = $0;
+      $900 = $1;
+      $901 = HEAP32[$900>>2]|0;
+      $902 = ((($901)) + 4|0);
+      $903 = HEAP32[$902>>2]|0;
+      $904 = $903;
+      $905 = (_mrb_sym2name($899,$904)|0);
+      HEAP32[$vararg_buffer271>>2] = $905;
+      (_printf(63347,$vararg_buffer271)|0);
+      break;
+     }
+    }
+   } while(0);
+   $906 = $1;
+   $907 = ((($906)) + 4|0);
+   $908 = HEAP32[$907>>2]|0;
+   $909 = HEAP32[$908>>2]|0;
+   $910 = ($909|0)!=(0|0);
+   if ($910) {
+    $911 = $1;
+    $912 = $2;
+    $913 = (($912) + 1)|0;
+    _dump_prefix($911,$913);
+    (_printf(64039,$vararg_buffer274)|0);
+    $914 = $0;
+    $915 = $1;
+    $916 = ((($915)) + 4|0);
+    $917 = HEAP32[$916>>2]|0;
+    $918 = HEAP32[$917>>2]|0;
+    $919 = $2;
+    $920 = (($919) + 2)|0;
+    _mrb_parser_dump($914,$918,$920);
+   }
+   $921 = $1;
+   $922 = $2;
+   $923 = (($922) + 1)|0;
+   _dump_prefix($921,$923);
+   (_printf(62912,$vararg_buffer276)|0);
+   $924 = $0;
+   $925 = $1;
+   $926 = ((($925)) + 4|0);
+   $927 = HEAP32[$926>>2]|0;
+   $928 = ((($927)) + 4|0);
+   $929 = HEAP32[$928>>2]|0;
+   $930 = HEAP32[$929>>2]|0;
+   $931 = ((($930)) + 4|0);
+   $932 = HEAP32[$931>>2]|0;
+   $933 = $2;
+   $934 = (($933) + 2)|0;
+   _mrb_parser_dump($924,$932,$934);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 138: {
+   (_printf(64047,$vararg_buffer278)|0);
+   $935 = $1;
+   $936 = HEAP32[$935>>2]|0;
+   $937 = HEAP32[$936>>2]|0;
+   $938 = ($937|0)==(0|0);
+   $939 = $1;
+   do {
+    if ($938) {
+     $940 = $2;
+     $941 = (($940) + 1)|0;
+     _dump_prefix($939,$941);
+     $942 = $0;
+     $943 = $1;
+     $944 = HEAP32[$943>>2]|0;
+     $945 = ((($944)) + 4|0);
+     $946 = HEAP32[$945>>2]|0;
+     $947 = $946;
+     $948 = (_mrb_sym2name($942,$947)|0);
+     HEAP32[$vararg_buffer280>>2] = $948;
+     (_printf(64034,$vararg_buffer280)|0);
+    } else {
+     $949 = HEAP32[$939>>2]|0;
+     $950 = HEAP32[$949>>2]|0;
+     $951 = ($950|0)==((1)|0);
+     if ($951) {
+      $952 = $1;
+      $953 = $2;
+      $954 = (($953) + 1)|0;
+      _dump_prefix($952,$954);
+      $955 = $0;
+      $956 = $1;
+      $957 = HEAP32[$956>>2]|0;
+      $958 = ((($957)) + 4|0);
+      $959 = HEAP32[$958>>2]|0;
+      $960 = $959;
+      $961 = (_mrb_sym2name($955,$960)|0);
+      HEAP32[$vararg_buffer283>>2] = $961;
+      (_printf(63347,$vararg_buffer283)|0);
+      break;
+     } else {
+      $962 = $0;
+      $963 = $1;
+      $964 = HEAP32[$963>>2]|0;
+      $965 = HEAP32[$964>>2]|0;
+      $966 = $2;
+      $967 = (($966) + 1)|0;
+      _mrb_parser_dump($962,$965,$967);
+      $968 = $1;
+      $969 = $2;
+      $970 = (($969) + 1)|0;
+      _dump_prefix($968,$970);
+      $971 = $0;
+      $972 = $1;
+      $973 = HEAP32[$972>>2]|0;
+      $974 = ((($973)) + 4|0);
+      $975 = HEAP32[$974>>2]|0;
+      $976 = $975;
+      $977 = (_mrb_sym2name($971,$976)|0);
+      HEAP32[$vararg_buffer286>>2] = $977;
+      (_printf(63347,$vararg_buffer286)|0);
+      break;
+     }
+    }
+   } while(0);
+   $978 = $1;
+   $979 = $2;
+   $980 = (($979) + 1)|0;
+   _dump_prefix($978,$980);
+   (_printf(62912,$vararg_buffer289)|0);
+   $981 = $0;
+   $982 = $1;
+   $983 = ((($982)) + 4|0);
+   $984 = HEAP32[$983>>2]|0;
+   $985 = HEAP32[$984>>2]|0;
+   $986 = ((($985)) + 4|0);
+   $987 = HEAP32[$986>>2]|0;
+   $988 = $2;
+   $989 = (($988) + 2)|0;
+   _mrb_parser_dump($981,$987,$989);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 144: {
+   (_printf(64061,$vararg_buffer291)|0);
+   $990 = $0;
+   $991 = $1;
+   $992 = HEAP32[$991>>2]|0;
+   $993 = $2;
+   $994 = (($993) + 1)|0;
+   _mrb_parser_dump($990,$992,$994);
+   $995 = $1;
+   $996 = $2;
+   $997 = (($996) + 1)|0;
+   _dump_prefix($995,$997);
+   (_printf(62912,$vararg_buffer293)|0);
+   $998 = $0;
+   $999 = $1;
+   $1000 = ((($999)) + 4|0);
+   $1001 = HEAP32[$1000>>2]|0;
+   $1002 = HEAP32[$1001>>2]|0;
+   $1003 = ((($1002)) + 4|0);
+   $1004 = HEAP32[$1003>>2]|0;
+   $1005 = $2;
+   $1006 = (($1005) + 2)|0;
+   _mrb_parser_dump($998,$1004,$1006);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 145: {
+   (_printf(64075,$vararg_buffer295)|0);
+   $1007 = $1;
+   $1008 = $2;
+   $1009 = (($1008) + 1)|0;
+   _dump_prefix($1007,$1009);
+   $1010 = $0;
+   $1011 = $1;
+   $1012 = HEAP32[$1011>>2]|0;
+   $1013 = $1012;
+   $1014 = (_mrb_sym2name($1010,$1013)|0);
+   HEAP32[$vararg_buffer297>>2] = $1014;
+   (_printf(64086,$vararg_buffer297)|0);
+   $1015 = $1;
+   $1016 = ((($1015)) + 4|0);
+   $1017 = HEAP32[$1016>>2]|0;
+   $1 = $1017;
+   $1018 = $1;
+   $1019 = HEAP32[$1018>>2]|0;
+   $n25 = $1019;
+   $first_lval6 = 1;
+   $1020 = $n25;
+   $1021 = ($1020|0)!=(0|0);
+   do {
+    if ($1021) {
+     $1022 = $n25;
+     $1023 = HEAP32[$1022>>2]|0;
+     $1024 = ($1023|0)!=(0|0);
+     if (!($1024)) {
+      $1025 = $n25;
+      $1026 = ((($1025)) + 4|0);
+      $1027 = HEAP32[$1026>>2]|0;
+      $1028 = ($1027|0)!=(0|0);
+      if (!($1028)) {
+       break;
+      }
+     }
+     $1029 = $n25;
+     $1030 = $2;
+     $1031 = (($1030) + 1)|0;
+     _dump_prefix($1029,$1031);
+     (_printf(63240,$vararg_buffer300)|0);
+     $1032 = $n25;
+     $1033 = $2;
+     $1034 = (($1033) + 2)|0;
+     _dump_prefix($1032,$1034);
+     while(1) {
+      $1035 = $n25;
+      $1036 = ($1035|0)!=(0|0);
+      if (!($1036)) {
+       break;
+      }
+      $1037 = $n25;
+      $1038 = HEAP32[$1037>>2]|0;
+      $1039 = ($1038|0)!=(0|0);
+      if ($1039) {
+       $1040 = $first_lval6;
+       $1041 = ($1040<<24>>24)!=(0);
+       if (!($1041)) {
+        (_printf(63258,$vararg_buffer302)|0);
+       }
+       $1042 = $0;
+       $1043 = $n25;
+       $1044 = HEAP32[$1043>>2]|0;
+       $1045 = $1044;
+       $1046 = (_mrb_sym2name($1042,$1045)|0);
+       HEAP32[$vararg_buffer304>>2] = $1046;
+       (_printf(63261,$vararg_buffer304)|0);
+       $first_lval6 = 0;
+      }
+      $1047 = $n25;
+      $1048 = ((($1047)) + 4|0);
+      $1049 = HEAP32[$1048>>2]|0;
+      $n25 = $1049;
+     }
+     (_printf(66199,$vararg_buffer307)|0);
+    }
+   } while(0);
+   $1050 = $1;
+   $1051 = ((($1050)) + 4|0);
+   $1052 = HEAP32[$1051>>2]|0;
+   $1 = $1052;
+   $1053 = $1;
+   $1054 = HEAP32[$1053>>2]|0;
+   $1055 = ($1054|0)!=(0|0);
+   if ($1055) {
+    $1056 = $1;
+    $1057 = HEAP32[$1056>>2]|0;
+    $n7 = $1057;
+    $1058 = $n7;
+    $1059 = HEAP32[$1058>>2]|0;
+    $1060 = ($1059|0)!=(0|0);
+    if ($1060) {
+     $1061 = $n7;
+     $1062 = $2;
+     $1063 = (($1062) + 1)|0;
+     _dump_prefix($1061,$1063);
+     (_printf(63012,$vararg_buffer309)|0);
+     $1064 = $0;
+     $1065 = $n7;
+     $1066 = HEAP32[$1065>>2]|0;
+     $1067 = $2;
+     $1068 = (($1067) + 2)|0;
+     _dump_recur($1064,$1066,$1068);
+    }
+    $1069 = $n7;
+    $1070 = ((($1069)) + 4|0);
+    $1071 = HEAP32[$1070>>2]|0;
+    $n7 = $1071;
+    $1072 = $n7;
+    $1073 = HEAP32[$1072>>2]|0;
+    $1074 = ($1073|0)!=(0|0);
+    L255: do {
+     if ($1074) {
+      $1075 = $n7;
+      $1076 = $2;
+      $1077 = (($1076) + 1)|0;
+      _dump_prefix($1075,$1077);
+      (_printf(63029,$vararg_buffer311)|0);
+      $1078 = $n7;
+      $1079 = HEAP32[$1078>>2]|0;
+      $n28 = $1079;
+      while(1) {
+       $1080 = $n28;
+       $1081 = ($1080|0)!=(0|0);
+       if (!($1081)) {
+        break L255;
+       }
+       $1082 = $n28;
+       $1083 = $2;
+       $1084 = (($1083) + 2)|0;
+       _dump_prefix($1082,$1084);
+       $1085 = $0;
+       $1086 = $n28;
+       $1087 = HEAP32[$1086>>2]|0;
+       $1088 = HEAP32[$1087>>2]|0;
+       $1089 = $1088;
+       $1090 = (_mrb_sym2name($1085,$1089)|0);
+       HEAP32[$vararg_buffer313>>2] = $1090;
+       (_printf(63045,$vararg_buffer313)|0);
+       $1091 = $0;
+       $1092 = $n28;
+       $1093 = HEAP32[$1092>>2]|0;
+       $1094 = ((($1093)) + 4|0);
+       $1095 = HEAP32[$1094>>2]|0;
+       _mrb_parser_dump($1091,$1095,0);
+       $1096 = $n28;
+       $1097 = ((($1096)) + 4|0);
+       $1098 = HEAP32[$1097>>2]|0;
+       $n28 = $1098;
+      }
+     }
+    } while(0);
+    $1099 = $n7;
+    $1100 = ((($1099)) + 4|0);
+    $1101 = HEAP32[$1100>>2]|0;
+    $n7 = $1101;
+    $1102 = $n7;
+    $1103 = HEAP32[$1102>>2]|0;
+    $1104 = ($1103|0)!=(0|0);
+    if ($1104) {
+     $1105 = $n7;
+     $1106 = $2;
+     $1107 = (($1106) + 1)|0;
+     _dump_prefix($1105,$1107);
+     $1108 = $0;
+     $1109 = $n7;
+     $1110 = HEAP32[$1109>>2]|0;
+     $1111 = $1110;
+     $1112 = (_mrb_sym2name($1108,$1111)|0);
+     HEAP32[$vararg_buffer316>>2] = $1112;
+     (_printf(63049,$vararg_buffer316)|0);
+    }
+    $1113 = $n7;
+    $1114 = ((($1113)) + 4|0);
+    $1115 = HEAP32[$1114>>2]|0;
+    $n7 = $1115;
+    $1116 = $n7;
+    $1117 = HEAP32[$1116>>2]|0;
+    $1118 = ($1117|0)!=(0|0);
+    if ($1118) {
+     $1119 = $n7;
+     $1120 = $2;
+     $1121 = (($1120) + 1)|0;
+     _dump_prefix($1119,$1121);
+     (_printf(63059,$vararg_buffer319)|0);
+     $1122 = $0;
+     $1123 = $n7;
+     $1124 = HEAP32[$1123>>2]|0;
+     $1125 = $2;
+     $1126 = (($1125) + 2)|0;
+     _dump_recur($1122,$1124,$1126);
+    }
+    $1127 = $n7;
+    $1128 = ((($1127)) + 4|0);
+    $1129 = HEAP32[$1128>>2]|0;
+    $1130 = ($1129|0)!=(0|0);
+    if ($1130) {
+     $1131 = $n7;
+     $1132 = $2;
+     $1133 = (($1132) + 1)|0;
+     _dump_prefix($1131,$1133);
+     $1134 = $0;
+     $1135 = $n7;
+     $1136 = ((($1135)) + 4|0);
+     $1137 = HEAP32[$1136>>2]|0;
+     $1138 = $1137;
+     $1139 = (_mrb_sym2name($1134,$1138)|0);
+     HEAP32[$vararg_buffer321>>2] = $1139;
+     (_printf(63081,$vararg_buffer321)|0);
+    }
+   }
+   $1140 = $0;
+   $1141 = $1;
+   $1142 = ((($1141)) + 4|0);
+   $1143 = HEAP32[$1142>>2]|0;
+   $1144 = HEAP32[$1143>>2]|0;
+   $1145 = $2;
+   $1146 = (($1145) + 1)|0;
+   _mrb_parser_dump($1140,$1144,$1146);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 170: {
+   (_printf(64090,$vararg_buffer324)|0);
+   $1147 = $0;
+   $1148 = $1;
+   $1149 = HEAP32[$1148>>2]|0;
+   $1150 = $2;
+   $1151 = (($1150) + 1)|0;
+   _mrb_parser_dump($1147,$1149,$1151);
+   $1152 = $1;
+   $1153 = ((($1152)) + 4|0);
+   $1154 = HEAP32[$1153>>2]|0;
+   $1 = $1154;
+   $1155 = $1;
+   $1156 = $2;
+   $1157 = (($1156) + 1)|0;
+   _dump_prefix($1155,$1157);
+   $1158 = $0;
+   $1159 = $1;
+   $1160 = HEAP32[$1159>>2]|0;
+   $1161 = $1160;
+   $1162 = (_mrb_sym2name($1158,$1161)|0);
+   HEAP32[$vararg_buffer326>>2] = $1162;
+   (_printf(64034,$vararg_buffer326)|0);
+   $1163 = $1;
+   $1164 = ((($1163)) + 4|0);
+   $1165 = HEAP32[$1164>>2]|0;
+   $1166 = ((($1165)) + 4|0);
+   $1167 = HEAP32[$1166>>2]|0;
+   $1 = $1167;
+   $1168 = $1;
+   $1169 = HEAP32[$1168>>2]|0;
+   $1170 = ($1169|0)!=(0|0);
+   if ($1170) {
+    $1171 = $1;
+    $1172 = HEAP32[$1171>>2]|0;
+    $n9 = $1172;
+    $1173 = $n9;
+    $1174 = HEAP32[$1173>>2]|0;
+    $1175 = ($1174|0)!=(0|0);
+    if ($1175) {
+     $1176 = $n9;
+     $1177 = $2;
+     $1178 = (($1177) + 1)|0;
+     _dump_prefix($1176,$1178);
+     (_printf(63012,$vararg_buffer329)|0);
+     $1179 = $0;
+     $1180 = $n9;
+     $1181 = HEAP32[$1180>>2]|0;
+     $1182 = $2;
+     $1183 = (($1182) + 2)|0;
+     _dump_recur($1179,$1181,$1183);
+    }
+    $1184 = $n9;
+    $1185 = ((($1184)) + 4|0);
+    $1186 = HEAP32[$1185>>2]|0;
+    $n9 = $1186;
+    $1187 = $n9;
+    $1188 = HEAP32[$1187>>2]|0;
+    $1189 = ($1188|0)!=(0|0);
+    L276: do {
+     if ($1189) {
+      $1190 = $n9;
+      $1191 = $2;
+      $1192 = (($1191) + 1)|0;
+      _dump_prefix($1190,$1192);
+      (_printf(63029,$vararg_buffer331)|0);
+      $1193 = $n9;
+      $1194 = HEAP32[$1193>>2]|0;
+      $n210 = $1194;
+      while(1) {
+       $1195 = $n210;
+       $1196 = ($1195|0)!=(0|0);
+       if (!($1196)) {
+        break L276;
+       }
+       $1197 = $n210;
+       $1198 = $2;
+       $1199 = (($1198) + 2)|0;
+       _dump_prefix($1197,$1199);
+       $1200 = $0;
+       $1201 = $n210;
+       $1202 = HEAP32[$1201>>2]|0;
+       $1203 = HEAP32[$1202>>2]|0;
+       $1204 = $1203;
+       $1205 = (_mrb_sym2name($1200,$1204)|0);
+       HEAP32[$vararg_buffer333>>2] = $1205;
+       (_printf(63045,$vararg_buffer333)|0);
+       $1206 = $0;
+       $1207 = $n210;
+       $1208 = HEAP32[$1207>>2]|0;
+       $1209 = ((($1208)) + 4|0);
+       $1210 = HEAP32[$1209>>2]|0;
+       _mrb_parser_dump($1206,$1210,0);
+       $1211 = $n210;
+       $1212 = ((($1211)) + 4|0);
+       $1213 = HEAP32[$1212>>2]|0;
+       $n210 = $1213;
+      }
+     }
+    } while(0);
+    $1214 = $n9;
+    $1215 = ((($1214)) + 4|0);
+    $1216 = HEAP32[$1215>>2]|0;
+    $n9 = $1216;
+    $1217 = $n9;
+    $1218 = HEAP32[$1217>>2]|0;
+    $1219 = ($1218|0)!=(0|0);
+    if ($1219) {
+     $1220 = $n9;
+     $1221 = $2;
+     $1222 = (($1221) + 1)|0;
+     _dump_prefix($1220,$1222);
+     $1223 = $0;
+     $1224 = $n9;
+     $1225 = HEAP32[$1224>>2]|0;
+     $1226 = $1225;
+     $1227 = (_mrb_sym2name($1223,$1226)|0);
+     HEAP32[$vararg_buffer336>>2] = $1227;
+     (_printf(63049,$vararg_buffer336)|0);
+    }
+    $1228 = $n9;
+    $1229 = ((($1228)) + 4|0);
+    $1230 = HEAP32[$1229>>2]|0;
+    $n9 = $1230;
+    $1231 = $n9;
+    $1232 = HEAP32[$1231>>2]|0;
+    $1233 = ($1232|0)!=(0|0);
+    if ($1233) {
+     $1234 = $n9;
+     $1235 = $2;
+     $1236 = (($1235) + 1)|0;
+     _dump_prefix($1234,$1236);
+     (_printf(63059,$vararg_buffer339)|0);
+     $1237 = $0;
+     $1238 = $n9;
+     $1239 = HEAP32[$1238>>2]|0;
+     $1240 = $2;
+     $1241 = (($1240) + 2)|0;
+     _dump_recur($1237,$1239,$1241);
+    }
+    $1242 = $n9;
+    $1243 = ((($1242)) + 4|0);
+    $1244 = HEAP32[$1243>>2]|0;
+    $n9 = $1244;
+    $1245 = $n9;
+    $1246 = ($1245|0)!=(0|0);
+    if ($1246) {
+     $1247 = $n9;
+     $1248 = $2;
+     $1249 = (($1248) + 1)|0;
+     _dump_prefix($1247,$1249);
+     $1250 = $0;
+     $1251 = $n9;
+     $1252 = $1251;
+     $1253 = (_mrb_sym2name($1250,$1252)|0);
+     HEAP32[$vararg_buffer341>>2] = $1253;
+     (_printf(63081,$vararg_buffer341)|0);
+    }
+   }
+   $1254 = $1;
+   $1255 = ((($1254)) + 4|0);
+   $1256 = HEAP32[$1255>>2]|0;
+   $1 = $1256;
+   $1257 = $0;
+   $1258 = $1;
+   $1259 = HEAP32[$1258>>2]|0;
+   $1260 = $2;
+   $1261 = (($1260) + 1)|0;
+   _mrb_parser_dump($1257,$1259,$1261);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 184: {
+   (_printf(64102,$vararg_buffer344)|0);
+   $1262 = $0;
+   $1263 = $1;
+   $1264 = $2;
+   $1265 = (($1264) + 1)|0;
+   _mrb_parser_dump($1262,$1263,$1265);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 185: {
+   (_printf(64117,$vararg_buffer346)|0);
+   $1266 = $0;
+   $1267 = $1;
+   $1268 = ((($1267)) + 16|0);
+   $1269 = HEAP32[$1268>>2]|0;
+   $1270 = $2;
+   $1271 = (($1270) + 1)|0;
+   _mrb_parser_dump($1266,$1269,$1271);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 186: {
+   $1272 = $nodetype;
+   $1273 = $nodetype;
+   HEAP32[$vararg_buffer348>>2] = $1272;
+   $vararg_ptr351 = ((($vararg_buffer348)) + 4|0);
+   HEAP32[$vararg_ptr351>>2] = $1273;
+   (_printf(64132,$vararg_buffer348)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+ }
+ (_printf(62999,$vararg_buffer23)|0);
+ $125 = $1;
+ $126 = ((($125)) + 4|0);
+ $127 = HEAP32[$126>>2]|0;
+ $1 = $127;
+ $128 = $1;
+ $129 = HEAP32[$128>>2]|0;
+ $130 = ($129|0)!=(0|0);
+ if ($130) {
+  $131 = $1;
+  $132 = HEAP32[$131>>2]|0;
+  $n = $132;
+  $133 = $n;
+  $134 = HEAP32[$133>>2]|0;
+  $135 = ($134|0)!=(0|0);
+  if ($135) {
+   $136 = $n;
+   $137 = $2;
+   $138 = (($137) + 1)|0;
+   _dump_prefix($136,$138);
+   (_printf(63012,$vararg_buffer25)|0);
+   $139 = $0;
+   $140 = $n;
+   $141 = HEAP32[$140>>2]|0;
+   $142 = $2;
+   $143 = (($142) + 2)|0;
+   _dump_recur($139,$141,$143);
+  }
+  $144 = $n;
+  $145 = ((($144)) + 4|0);
+  $146 = HEAP32[$145>>2]|0;
+  $n = $146;
+  $147 = $n;
+  $148 = HEAP32[$147>>2]|0;
+  $149 = ($148|0)!=(0|0);
+  L301: do {
+   if ($149) {
+    $150 = $n;
+    $151 = $2;
+    $152 = (($151) + 1)|0;
+    _dump_prefix($150,$152);
+    (_printf(63029,$vararg_buffer27)|0);
+    $153 = $n;
+    $154 = HEAP32[$153>>2]|0;
+    $n21 = $154;
+    while(1) {
+     $155 = $n21;
+     $156 = ($155|0)!=(0|0);
+     if (!($156)) {
+      break L301;
+     }
+     $157 = $n21;
+     $158 = $2;
+     $159 = (($158) + 2)|0;
+     _dump_prefix($157,$159);
+     $160 = $0;
+     $161 = $n21;
+     $162 = HEAP32[$161>>2]|0;
+     $163 = HEAP32[$162>>2]|0;
+     $164 = $163;
+     $165 = (_mrb_sym2name($160,$164)|0);
+     HEAP32[$vararg_buffer29>>2] = $165;
+     (_printf(63045,$vararg_buffer29)|0);
+     $166 = $0;
+     $167 = $n21;
+     $168 = HEAP32[$167>>2]|0;
+     $169 = ((($168)) + 4|0);
+     $170 = HEAP32[$169>>2]|0;
+     _mrb_parser_dump($166,$170,0);
+     $171 = $n21;
+     $172 = ((($171)) + 4|0);
+     $173 = HEAP32[$172>>2]|0;
+     $n21 = $173;
+    }
+   }
+  } while(0);
+  $174 = $n;
+  $175 = ((($174)) + 4|0);
+  $176 = HEAP32[$175>>2]|0;
+  $n = $176;
+  $177 = $n;
+  $178 = HEAP32[$177>>2]|0;
+  $179 = ($178|0)!=(0|0);
+  if ($179) {
+   $180 = $n;
+   $181 = $2;
+   $182 = (($181) + 1)|0;
+   _dump_prefix($180,$182);
+   $183 = $0;
+   $184 = $n;
+   $185 = HEAP32[$184>>2]|0;
+   $186 = $185;
+   $187 = (_mrb_sym2name($183,$186)|0);
+   HEAP32[$vararg_buffer31>>2] = $187;
+   (_printf(63049,$vararg_buffer31)|0);
+  }
+  $188 = $n;
+  $189 = ((($188)) + 4|0);
+  $190 = HEAP32[$189>>2]|0;
+  $n = $190;
+  $191 = $n;
+  $192 = HEAP32[$191>>2]|0;
+  $193 = ($192|0)!=(0|0);
+  if ($193) {
+   $194 = $n;
+   $195 = $2;
+   $196 = (($195) + 1)|0;
+   _dump_prefix($194,$196);
+   (_printf(63059,$vararg_buffer34)|0);
+   $197 = $0;
+   $198 = $n;
+   $199 = HEAP32[$198>>2]|0;
+   $200 = $2;
+   $201 = (($200) + 2)|0;
+   _dump_recur($197,$199,$201);
+  }
+  $202 = $n;
+  $203 = ((($202)) + 4|0);
+  $204 = HEAP32[$203>>2]|0;
+  $n = $204;
+  $205 = $n;
+  $206 = ($205|0)!=(0|0);
+  if ($206) {
+   $207 = $n;
+   $208 = $2;
+   $209 = (($208) + 1)|0;
+   _dump_prefix($207,$209);
+   $210 = $0;
+   $211 = $n;
+   $212 = $211;
+   $213 = (_mrb_sym2name($210,$212)|0);
+   HEAP32[$vararg_buffer36>>2] = $213;
+   (_printf(63081,$vararg_buffer36)|0);
+  }
+ }
+ $214 = $1;
+ $215 = $2;
+ $216 = (($215) + 1)|0;
+ _dump_prefix($214,$216);
+ (_printf(62912,$vararg_buffer39)|0);
+ $217 = $0;
+ $218 = $1;
+ $219 = ((($218)) + 4|0);
+ $220 = HEAP32[$219>>2]|0;
+ $221 = HEAP32[$220>>2]|0;
+ $222 = $2;
+ $223 = (($222) + 2)|0;
+ _mrb_parser_dump($217,$221,$223);
+ STACKTOP = sp;return;
+}
+function _dump_prefix($tree,$offset) {
+ $tree = $tree|0;
+ $offset = $offset|0;
+ var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $0 = $tree;
+ $1 = $offset;
+ $2 = $0;
+ $3 = ((($2)) + 8|0);
+ $4 = HEAP16[$3>>1]|0;
+ $5 = $4&65535;
+ HEAP32[$vararg_buffer>>2] = $5;
+ (_printf(62879,$vararg_buffer)|0);
+ while(1) {
+  $6 = $1;
+  $7 = (($6) + -1)|0;
+  $1 = $7;
+  $8 = ($6|0)!=(0);
+  if (!($8)) {
+   break;
+  }
+  $9 = HEAP32[695]|0;
+  (_putc(32,$9)|0);
+  $10 = HEAP32[695]|0;
+  (_putc(32,$10)|0);
+ }
+ STACKTOP = sp;return;
+}
+function _dump_recur($mrb,$tree,$offset) {
+ $mrb = $mrb|0;
+ $tree = $tree|0;
+ $offset = $offset|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $tree;
+ $2 = $offset;
+ while(1) {
+  $3 = $1;
+  $4 = ($3|0)!=(0|0);
+  if (!($4)) {
+   break;
+  }
+  $5 = $0;
+  $6 = $1;
+  $7 = HEAP32[$6>>2]|0;
+  $8 = $2;
+  _mrb_parser_dump($5,$7,$8);
+  $9 = $1;
+  $10 = ((($9)) + 4|0);
+  $11 = HEAP32[$10>>2]|0;
+  $1 = $11;
+ }
+ STACKTOP = sp;return;
+}
+function _mrb_parser_new($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $p = 0, $pool = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $1;
+ $3 = (_mrb_pool_open($2)|0);
+ $pool = $3;
+ $4 = $pool;
+ $5 = ($4|0)!=(0|0);
+ if (!($5)) {
+  $0 = 0;
+  $54 = $0;
+  STACKTOP = sp;return ($54|0);
+ }
+ $6 = $pool;
+ $7 = (_mrb_pool_alloc($6,1408)|0);
+ $p = $7;
+ $8 = $p;
+ $9 = ($8|0)!=(0|0);
+ if ($9) {
+  $10 = $p;
+  _memcpy(($10|0),(73160|0),1408)|0;
+  $11 = $1;
+  $12 = $p;
+  HEAP32[$12>>2] = $11;
+  $13 = $pool;
+  $14 = $p;
+  $15 = ((($14)) + 4|0);
+  HEAP32[$15>>2] = $13;
+  $16 = $p;
+  $17 = ((($16)) + 16|0);
+  HEAP32[$17>>2] = 0;
+  $18 = $p;
+  $19 = ((($18)) + 12|0);
+  HEAP32[$19>>2] = 0;
+  $20 = $p;
+  $21 = ((($20)) + 20|0);
+  HEAP32[$21>>2] = 0;
+  $22 = $p;
+  $23 = ((($22)) + 72|0);
+  $24 = HEAP8[$23>>0]|0;
+  $25 = $24 & -2;
+  $26 = $25 | 1;
+  HEAP8[$23>>0] = $26;
+  $27 = $p;
+  $28 = ((($27)) + 68|0);
+  HEAP32[$28>>2] = 0;
+  $29 = $p;
+  $30 = ((($29)) + 64|0);
+  HEAP32[$30>>2] = 0;
+  $31 = $p;
+  $32 = ((($31)) + 1148|0);
+  $33 = HEAP8[$32>>0]|0;
+  $34 = $33 & -3;
+  HEAP8[$32>>0] = $34;
+  $35 = $p;
+  $36 = ((($35)) + 32|0);
+  HEAP32[$36>>2] = 1;
+  $37 = $p;
+  $38 = ((($37)) + 36|0);
+  HEAP32[$38>>2] = 0;
+  $39 = $p;
+  $40 = ((($39)) + 44|0);
+  HEAP32[$40>>2] = 0;
+  $41 = $p;
+  $42 = ((($41)) + 1120|0);
+  HEAP32[$42>>2] = 0;
+  $43 = $p;
+  $44 = ((($43)) + 1112|0);
+  HEAP32[$44>>2] = 0;
+  $45 = $p;
+  $46 = ((($45)) + 1124|0);
+  HEAP32[$46>>2] = 0;
+  $47 = $p;
+  $48 = ((($47)) + 1400|0);
+  HEAP32[$48>>2] = -1;
+  $49 = $p;
+  $50 = ((($49)) + 1392|0);
+  HEAP32[$50>>2] = 0;
+  $51 = $p;
+  $52 = ((($51)) + 1396|0);
+  HEAP32[$52>>2] = 0;
+  $53 = $p;
+  $0 = $53;
+  $54 = $0;
+  STACKTOP = sp;return ($54|0);
+ } else {
+  $0 = 0;
+  $54 = $0;
+  STACKTOP = sp;return ($54|0);
+ }
+ return (0)|0;
+}
+function _mrb_parser_free($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $0;
+ $2 = ((($1)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ _mrb_pool_close($3);
+ STACKTOP = sp;return;
+}
+function _mrbc_context_new($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = (_mrb_calloc($1,1,32)|0);
+ STACKTOP = sp;return ($2|0);
+}
+function _mrbc_context_free($mrb,$cxt) {
+ $mrb = $mrb|0;
+ $cxt = $cxt|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $cxt;
+ $2 = $0;
+ $3 = $1;
+ $4 = HEAP32[$3>>2]|0;
+ _mrb_free($2,$4);
+ $5 = $0;
+ $6 = $1;
+ _mrb_free($5,$6);
+ STACKTOP = sp;return;
+}
+function _mrbc_filename($mrb,$c,$s) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $len = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $s;
+ $3 = $2;
+ $4 = ($3|0)!=(0|0);
+ if ($4) {
+  $5 = $2;
+  $6 = (_strlen($5)|0);
+  $len = $6;
+  $7 = $0;
+  $8 = $len;
+  $9 = (($8) + 1)|0;
+  $10 = (_mrb_alloca($7,$9)|0);
+  $p = $10;
+  $11 = $p;
+  $12 = $2;
+  $13 = $len;
+  $14 = (($13) + 1)|0;
+  _memcpy(($11|0),($12|0),($14|0))|0;
+  $15 = $p;
+  $16 = $1;
+  $17 = ((($16)) + 8|0);
+  HEAP32[$17>>2] = $15;
+ }
+ $18 = $1;
+ $19 = ((($18)) + 8|0);
+ $20 = HEAP32[$19>>2]|0;
+ STACKTOP = sp;return ($20|0);
+}
+function _mrbc_partial_hook($mrb,$c,$func,$data) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $func = $func|0;
+ $data = $data|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $func;
+ $3 = $data;
+ $4 = $2;
+ $5 = $1;
+ $6 = ((($5)) + 16|0);
+ HEAP32[$6>>2] = $4;
+ $7 = $3;
+ $8 = $1;
+ $9 = ((($8)) + 20|0);
+ HEAP32[$9>>2] = $7;
+ STACKTOP = sp;return;
+}
+function _mrb_parser_get_filename($p,$idx) {
+ $p = $p|0;
+ $idx = $idx|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $p;
+ $2 = $idx;
+ $3 = $2;
+ $4 = $3&65535;
+ $5 = $1;
+ $6 = ((($5)) + 1396|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ($4>>>0)>=($7>>>0);
+ if ($8) {
+  $0 = 0;
+  $19 = $0;
+  STACKTOP = sp;return ($19|0);
+ } else {
+  $9 = $1;
+  $10 = HEAP32[$9>>2]|0;
+  $11 = $2;
+  $12 = $11&65535;
+  $13 = $1;
+  $14 = ((($13)) + 1392|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = (($15) + ($12<<2)|0);
+  $17 = HEAP32[$16>>2]|0;
+  $18 = (_mrb_sym2name_len($10,$17,0)|0);
+  $0 = $18;
+  $19 = $0;
+  STACKTOP = sp;return ($19|0);
+ }
+ return (0)|0;
+}
+function _mrb_parse_file($mrb,$f,$c) {
+ $mrb = $mrb|0;
+ $f = $f|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $p = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $f;
+ $3 = $c;
+ $4 = $1;
+ $5 = (_mrb_parser_new($4)|0);
+ $p = $5;
+ $6 = $p;
+ $7 = ($6|0)!=(0|0);
+ if ($7) {
+  $8 = $p;
+  $9 = ((($8)) + 16|0);
+  HEAP32[$9>>2] = 0;
+  $10 = $p;
+  $11 = ((($10)) + 12|0);
+  HEAP32[$11>>2] = 0;
+  $12 = $2;
+  $13 = $p;
+  $14 = ((($13)) + 20|0);
+  HEAP32[$14>>2] = $12;
+  $15 = $p;
+  $16 = $3;
+  _mrb_parser_parse($15,$16);
+  $17 = $p;
+  $0 = $17;
+  $18 = $0;
+  STACKTOP = sp;return ($18|0);
+ } else {
+  $0 = 0;
+  $18 = $0;
+  STACKTOP = sp;return ($18|0);
+ }
+ return (0)|0;
+}
+function _mrb_load_file_cxt($agg$result,$mrb,$f,$c) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $f = $f|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $f;
+ $2 = $c;
+ $3 = $0;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = (_mrb_parse_file($4,$5,$6)|0);
+ $8 = $2;
+ _load_exec($agg$result,$3,$7,$8);
+ STACKTOP = sp;return;
+}
+function _load_exec($agg$result,$mrb,$p,$c) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $p = $p|0;
+ $c = $c|0;
+ var $$byval_copy = 0, $$byval_copy2 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0;
+ var $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0;
+ var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0;
+ var $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0;
+ var $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0;
+ var $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0;
+ var $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $buf = 0, $keep = 0, $n = 0, $proc = 0, $target = 0, $v = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 368|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy2 = sp + 104|0;
+ $$byval_copy = sp + 96|0;
+ $vararg_buffer = sp;
+ $v = sp + 64|0;
+ $buf = sp + 112|0;
+ $3 = sp + 48|0;
+ $4 = sp + 40|0;
+ $5 = sp + 32|0;
+ $6 = sp + 24|0;
+ $7 = sp + 16|0;
+ $8 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $p;
+ $2 = $c;
+ $9 = $0;
+ $10 = ((($9)) + 32|0);
+ $11 = HEAP32[$10>>2]|0;
+ $target = $11;
+ $keep = 0;
+ $12 = $1;
+ $13 = ($12|0)!=(0|0);
+ if (!($13)) {
+  _mrb_undef_value_557($agg$result);
+  STACKTOP = sp;return;
+ }
+ $14 = $1;
+ $15 = ((($14)) + 1144|0);
+ $16 = HEAP32[$15>>2]|0;
+ $17 = ($16|0)!=(0|0);
+ if ($17) {
+  $18 = $1;
+  $19 = ((($18)) + 1136|0);
+  $20 = HEAP32[$19>>2]|0;
+  $21 = ($20|0)!=(0);
+  if (!($21)) {
+   $52 = $0;
+   $53 = $1;
+   $54 = (_mrb_generate_code($52,$53)|0);
+   $proc = $54;
+   $55 = $1;
+   _mrb_parser_free($55);
+   $56 = $proc;
+   $57 = ($56|0)==(0|0);
+   if ($57) {
+    $58 = $0;
+    $59 = $0;
+    $60 = (_mrb_class_get($59,67747)|0);
+    $61 = $0;
+    _mrb_str_new_static($6,$61,64191,13);
+    ;HEAP32[$$byval_copy2>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$6+4>>2]|0;
+    _mrb_exc_new_str($7,$58,$60,$$byval_copy2);
+    $62 = HEAP32[$7>>2]|0;
+    $63 = $0;
+    $64 = ((($63)) + 20|0);
+    HEAP32[$64>>2] = $62;
+    _mrb_undef_value_557($agg$result);
+    STACKTOP = sp;return;
+   }
+   $65 = $2;
+   $66 = ($65|0)!=(0|0);
+   do {
+    if ($66) {
+     $67 = $2;
+     $68 = ((($67)) + 28|0);
+     $69 = HEAP8[$68>>0]|0;
+     $70 = ($69&255) >>> 1;
+     $71 = $70 & 1;
+     $72 = ($71<<24>>24)!=(0);
+     if ($72) {
+      $73 = $0;
+      $74 = $proc;
+      _mrb_codedump_all($73,$74);
+     }
+     $75 = $2;
+     $76 = ((($75)) + 28|0);
+     $77 = HEAP8[$76>>0]|0;
+     $78 = ($77&255) >>> 2;
+     $79 = $78 & 1;
+     $80 = ($79<<24>>24)!=(0);
+     if ($80) {
+      $81 = $proc;
+      _mrb_obj_value_559($agg$result,$81);
+      STACKTOP = sp;return;
+     }
+     $82 = $2;
+     $83 = ((($82)) + 24|0);
+     $84 = HEAP32[$83>>2]|0;
+     $85 = ($84|0)!=(0|0);
+     if ($85) {
+      $86 = $2;
+      $87 = ((($86)) + 24|0);
+      $88 = HEAP32[$87>>2]|0;
+      $target = $88;
+     }
+     $89 = $2;
+     $90 = ((($89)) + 28|0);
+     $91 = HEAP8[$90>>0]|0;
+     $92 = ($91&255) >>> 3;
+     $93 = $92 & 1;
+     $94 = ($93<<24>>24)!=(0);
+     $95 = $2;
+     if ($94) {
+      $96 = ((($95)) + 4|0);
+      $97 = HEAP32[$96>>2]|0;
+      $98 = (($97) + 1)|0;
+      $keep = $98;
+      break;
+     } else {
+      $99 = ((($95)) + 28|0);
+      $100 = HEAP8[$99>>0]|0;
+      $101 = $100 & -9;
+      $102 = $101 | 8;
+      HEAP8[$99>>0] = $102;
+      break;
+     }
+    }
+   } while(0);
+   $103 = $target;
+   $104 = $proc;
+   $105 = ((($104)) + 16|0);
+   HEAP32[$105>>2] = $103;
+   $106 = $0;
+   $107 = ((($106)) + 12|0);
+   $108 = HEAP32[$107>>2]|0;
+   $109 = ((($108)) + 16|0);
+   $110 = HEAP32[$109>>2]|0;
+   $111 = ($110|0)!=(0|0);
+   if ($111) {
+    $112 = $target;
+    $113 = $0;
+    $114 = ((($113)) + 12|0);
+    $115 = HEAP32[$114>>2]|0;
+    $116 = ((($115)) + 16|0);
+    $117 = HEAP32[$116>>2]|0;
+    $118 = ((($117)) + 44|0);
+    HEAP32[$118>>2] = $112;
+   }
+   $119 = $0;
+   $120 = $proc;
+   $121 = $keep;
+   _mrb_toplevel_run_keep($8,$119,$120,$121);
+   ;HEAP32[$v>>2]=HEAP32[$8>>2]|0;HEAP32[$v+4>>2]=HEAP32[$8+4>>2]|0;
+   $122 = $0;
+   $123 = ((($122)) + 20|0);
+   $124 = HEAP32[$123>>2]|0;
+   $125 = ($124|0)!=(0|0);
+   if ($125) {
+    _mrb_nil_value_560($agg$result);
+    STACKTOP = sp;return;
+   } else {
+    ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+    STACKTOP = sp;return;
+   }
+  }
+ }
+ $22 = $1;
+ $23 = ((($22)) + 1148|0);
+ $24 = HEAP8[$23>>0]|0;
+ $25 = ($24&255) >>> 1;
+ $26 = $25 & 1;
+ $27 = ($26<<24>>24)!=(0);
+ if ($27) {
+  $28 = $1;
+  $29 = ((($28)) + 1152|0);
+  $30 = HEAP32[$29>>2]|0;
+  $31 = $1;
+  $32 = ((($31)) + 1152|0);
+  $33 = ((($32)) + 8|0);
+  $34 = HEAP32[$33>>2]|0;
+  HEAP32[$vararg_buffer>>2] = $30;
+  $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+  HEAP32[$vararg_ptr1>>2] = $34;
+  $35 = (_snprintf($buf,256,64178,$vararg_buffer)|0);
+  $n = $35;
+  $36 = $0;
+  $37 = $0;
+  $38 = (_mrb_class_get($37,67759)|0);
+  $39 = $n;
+  _mrb_exc_new($3,$36,$38,$buf,$39);
+  $40 = HEAP32[$3>>2]|0;
+  $41 = $0;
+  $42 = ((($41)) + 20|0);
+  HEAP32[$42>>2] = $40;
+  $43 = $1;
+  _mrb_parser_free($43);
+  _mrb_undef_value_557($agg$result);
+  STACKTOP = sp;return;
+ } else {
+  $44 = $0;
+  $45 = $0;
+  $46 = (_mrb_class_get($45,67759)|0);
+  $47 = $0;
+  _mrb_str_new_static($4,$47,62760,12);
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$4+4>>2]|0;
+  _mrb_exc_new_str($5,$44,$46,$$byval_copy);
+  $48 = HEAP32[$5>>2]|0;
+  $49 = $0;
+  $50 = ((($49)) + 20|0);
+  HEAP32[$50>>2] = $48;
+  $51 = $1;
+  _mrb_parser_free($51);
+  _mrb_undef_value_557($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_undef_value_557($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 5;
+ HEAP32[$v>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_obj_value_559($agg$result,$p) {
+ $agg$result = $agg$result|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $p;
+ $1 = $0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 & 255;
+ $4 = ((($v)) + 4|0);
+ HEAP32[$4>>2] = $3;
+ $5 = $0;
+ HEAP32[$v>>2] = $5;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_nil_value_560($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_ary_new_capa($agg$result,$mrb,$capa) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $capa = $capa|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $a = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $capa;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_ary_new_capa($2,$3)|0);
+ $a = $4;
+ $5 = $a;
+ _mrb_obj_value_565($agg$result,$5);
+ STACKTOP = sp;return;
+}
+function _ary_new_capa($mrb,$capa) {
+ $mrb = $mrb|0;
+ $capa = $capa|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, $blen = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $capa;
+ $2 = $1;
+ $3 = ($2|0)>(536870911);
+ if ($3) {
+  $4 = $0;
+  $5 = $0;
+  $6 = (_mrb_class_get($5,68855)|0);
+  _mrb_raise($4,$6,64205);
+  // unreachable;
+ }
+ $7 = $1;
+ $8 = $7<<3;
+ $blen = $8;
+ $9 = $blen;
+ $10 = $1;
+ $11 = ($9|0)<($10|0);
+ $12 = $0;
+ $13 = $0;
+ if ($11) {
+  $14 = (_mrb_class_get($13,68855)|0);
+  _mrb_raise($12,$14,64205);
+  // unreachable;
+ } else {
+  $15 = ((($13)) + 52|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = (_mrb_obj_alloc($12,14,$16)|0);
+  $a = $17;
+  $18 = $0;
+  $19 = $blen;
+  $20 = (_mrb_malloc($18,$19)|0);
+  $21 = $a;
+  $22 = ((($21)) + 20|0);
+  HEAP32[$22>>2] = $20;
+  $23 = $1;
+  $24 = $a;
+  $25 = ((($24)) + 16|0);
+  HEAP32[$25>>2] = $23;
+  $26 = $a;
+  $27 = ((($26)) + 12|0);
+  HEAP32[$27>>2] = 0;
+  $28 = $a;
+  STACKTOP = sp;return ($28|0);
+ }
+ return (0)|0;
+}
+function _mrb_obj_value_565($agg$result,$p) {
+ $agg$result = $agg$result|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $p;
+ $1 = $0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 & 255;
+ $4 = ((($v)) + 4|0);
+ HEAP32[$4>>2] = $3;
+ $5 = $0;
+ HEAP32[$v>>2] = $5;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_ary_new($agg$result,$mrb) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ _mrb_ary_new_capa($agg$result,$1,0);
+ STACKTOP = sp;return;
+}
+function _mrb_ary_new_from_values($agg$result,$mrb,$size,$vals) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $size = $size|0;
+ $vals = $vals|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $size;
+ $2 = $vals;
+ $3 = $0;
+ $4 = $1;
+ $5 = (_ary_new_capa($3,$4)|0);
+ $a = $5;
+ $6 = $a;
+ $7 = ((($6)) + 20|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = $2;
+ $10 = $1;
+ _array_copy($8,$9,$10);
+ $11 = $1;
+ $12 = $a;
+ $13 = ((($12)) + 12|0);
+ HEAP32[$13>>2] = $11;
+ $14 = $a;
+ _mrb_obj_value_565($agg$result,$14);
+ STACKTOP = sp;return;
+}
+function _array_copy($dst,$src,$size) {
+ $dst = $dst|0;
+ $src = $src|0;
+ $size = $size|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $dst;
+ $1 = $src;
+ $2 = $size;
+ $i = 0;
+ while(1) {
+  $3 = $i;
+  $4 = $2;
+  $5 = ($3|0)<($4|0);
+  if (!($5)) {
+   break;
+  }
+  $6 = $i;
+  $7 = $0;
+  $8 = (($7) + ($6<<3)|0);
+  $9 = $i;
+  $10 = $1;
+  $11 = (($10) + ($9<<3)|0);
+  ;HEAP32[$8>>2]=HEAP32[$11>>2]|0;HEAP32[$8+4>>2]=HEAP32[$11+4>>2]|0;
+  $12 = $i;
+  $13 = (($12) + 1)|0;
+  $i = $13;
+ }
+ STACKTOP = sp;return;
+}
+function _mrb_assoc_new($agg$result,$mrb,$car,$cdr) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $car = $car|0;
+ $cdr = $cdr|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = (_ary_new_capa($1,2)|0);
+ $a = $2;
+ $3 = $a;
+ $4 = ((($3)) + 20|0);
+ $5 = HEAP32[$4>>2]|0;
+ ;HEAP32[$5>>2]=HEAP32[$car>>2]|0;HEAP32[$5+4>>2]=HEAP32[$car+4>>2]|0;
+ $6 = $a;
+ $7 = ((($6)) + 20|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ((($8)) + 8|0);
+ ;HEAP32[$9>>2]=HEAP32[$cdr>>2]|0;HEAP32[$9+4>>2]=HEAP32[$cdr+4>>2]|0;
+ $10 = $a;
+ $11 = ((($10)) + 12|0);
+ HEAP32[$11>>2] = 2;
+ $12 = $a;
+ _mrb_obj_value_565($agg$result,$12);
+ STACKTOP = sp;return;
+}
+function _ary_modify($mrb,$a) {
+ $mrb = $mrb|0;
+ $a = $a|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $7 = 0, $8 = 0, $9 = 0, $len = 0, $p = 0, $ptr = 0, $shared = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $a;
+ $2 = $1;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $4 & 256;
+ $6 = ($5|0)!=(0);
+ if (!($6)) {
+  STACKTOP = sp;return;
+ }
+ $7 = $1;
+ $8 = ((($7)) + 16|0);
+ $9 = HEAP32[$8>>2]|0;
+ $shared = $9;
+ $10 = $shared;
+ $11 = HEAP32[$10>>2]|0;
+ $12 = ($11|0)==(1);
+ if ($12) {
+  $13 = $1;
+  $14 = ((($13)) + 20|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = $shared;
+  $17 = ((($16)) + 8|0);
+  $18 = HEAP32[$17>>2]|0;
+  $19 = ($15|0)==($18|0);
+  if ($19) {
+   $20 = $shared;
+   $21 = ((($20)) + 8|0);
+   $22 = HEAP32[$21>>2]|0;
+   $23 = $1;
+   $24 = ((($23)) + 20|0);
+   HEAP32[$24>>2] = $22;
+   $25 = $1;
+   $26 = ((($25)) + 12|0);
+   $27 = HEAP32[$26>>2]|0;
+   $28 = $1;
+   $29 = ((($28)) + 16|0);
+   HEAP32[$29>>2] = $27;
+   $30 = $0;
+   $31 = $shared;
+   _mrb_free($30,$31);
+  } else {
+   label = 5;
+  }
+ } else {
+  label = 5;
+ }
+ if ((label|0) == 5) {
+  $32 = $1;
+  $33 = ((($32)) + 20|0);
+  $34 = HEAP32[$33>>2]|0;
+  $p = $34;
+  $35 = $1;
+  $36 = ((($35)) + 12|0);
+  $37 = HEAP32[$36>>2]|0;
+  $38 = $37<<3;
+  $len = $38;
+  $39 = $0;
+  $40 = $len;
+  $41 = (_mrb_malloc($39,$40)|0);
+  $ptr = $41;
+  $42 = $p;
+  $43 = ($42|0)!=(0|0);
+  if ($43) {
+   $44 = $ptr;
+   $45 = $p;
+   $46 = $1;
+   $47 = ((($46)) + 12|0);
+   $48 = HEAP32[$47>>2]|0;
+   _array_copy($44,$45,$48);
+  }
+  $49 = $ptr;
+  $50 = $1;
+  $51 = ((($50)) + 20|0);
+  HEAP32[$51>>2] = $49;
+  $52 = $1;
+  $53 = ((($52)) + 12|0);
+  $54 = HEAP32[$53>>2]|0;
+  $55 = $1;
+  $56 = ((($55)) + 16|0);
+  HEAP32[$56>>2] = $54;
+  $57 = $0;
+  $58 = $shared;
+  _mrb_ary_decref($57,$58);
+ }
+ $59 = $1;
+ $60 = HEAP32[$59>>2]|0;
+ $61 = $60 >>> 11;
+ $62 = $61 & -257;
+ $63 = HEAP32[$59>>2]|0;
+ $64 = $62 & 2097151;
+ $65 = $64 << 11;
+ $66 = $63 & 2047;
+ $67 = $66 | $65;
+ HEAP32[$59>>2] = $67;
+ STACKTOP = sp;return;
+}
+function _mrb_ary_decref($mrb,$shared) {
+ $mrb = $mrb|0;
+ $shared = $shared|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $shared;
+ $2 = $1;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = (($3) + -1)|0;
+ HEAP32[$2>>2] = $4;
+ $5 = $1;
+ $6 = HEAP32[$5>>2]|0;
+ $7 = ($6|0)==(0);
+ if (!($7)) {
+  STACKTOP = sp;return;
+ }
+ $8 = $0;
+ $9 = $1;
+ $10 = ((($9)) + 8|0);
+ $11 = HEAP32[$10>>2]|0;
+ _mrb_free($8,$11);
+ $12 = $0;
+ $13 = $1;
+ _mrb_free($12,$13);
+ STACKTOP = sp;return;
+}
+function _ary_shrink_capa($mrb,$a) {
+ $mrb = $mrb|0;
+ $a = $a|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $capa = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $a;
+ $2 = $1;
+ $3 = ((($2)) + 16|0);
+ $4 = HEAP32[$3>>2]|0;
+ $capa = $4;
+ $5 = $capa;
+ $6 = ($5|0)<(8);
+ if ($6) {
+  STACKTOP = sp;return;
+ }
+ $7 = $capa;
+ $8 = $1;
+ $9 = ((($8)) + 12|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = ($10*5)|0;
+ $12 = ($7|0)<=($11|0);
+ if ($12) {
+  STACKTOP = sp;return;
+ }
+ while(1) {
+  $13 = $capa;
+  $14 = (($13|0) / 2)&-1;
+  $capa = $14;
+  $15 = $capa;
+  $16 = ($15|0)<(4);
+  if ($16) {
+   label = 4;
+   break;
+  }
+  $17 = $capa;
+  $18 = $1;
+  $19 = ((($18)) + 12|0);
+  $20 = HEAP32[$19>>2]|0;
+  $21 = ($20*5)|0;
+  $22 = ($17|0)>($21|0);
+  if (!($22)) {
+   break;
+  }
+ }
+ if ((label|0) == 4) {
+  $capa = 4;
+ }
+ $23 = $capa;
+ $24 = $1;
+ $25 = ((($24)) + 12|0);
+ $26 = HEAP32[$25>>2]|0;
+ $27 = ($23|0)>($26|0);
+ if (!($27)) {
+  STACKTOP = sp;return;
+ }
+ $28 = $capa;
+ $29 = $1;
+ $30 = ((($29)) + 16|0);
+ $31 = HEAP32[$30>>2]|0;
+ $32 = ($28|0)<($31|0);
+ if (!($32)) {
+  STACKTOP = sp;return;
+ }
+ $33 = $capa;
+ $34 = $1;
+ $35 = ((($34)) + 16|0);
+ HEAP32[$35>>2] = $33;
+ $36 = $0;
+ $37 = $1;
+ $38 = ((($37)) + 20|0);
+ $39 = HEAP32[$38>>2]|0;
+ $40 = $capa;
+ $41 = $40<<3;
+ $42 = (_mrb_realloc($36,$39,$41)|0);
+ $43 = $1;
+ $44 = ((($43)) + 20|0);
+ HEAP32[$44>>2] = $42;
+ STACKTOP = sp;return;
+}
+function _ary_expand_capa($mrb,$a,$len) {
+ $mrb = $mrb|0;
+ $a = $a|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $capa = 0, $expanded_ptr = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $a;
+ $2 = $len;
+ $3 = $1;
+ $4 = ((($3)) + 16|0);
+ $5 = HEAP32[$4>>2]|0;
+ $capa = $5;
+ $6 = $2;
+ $7 = ($6|0)>(536870911);
+ if ($7) {
+  $8 = $0;
+  $9 = $0;
+  $10 = (_mrb_class_get($9,68855)|0);
+  _mrb_raise($8,$10,64205);
+  // unreachable;
+ }
+ $11 = $capa;
+ $12 = ($11|0)==(0);
+ if ($12) {
+  $capa = 4;
+ }
+ while(1) {
+  $13 = $capa;
+  $14 = $2;
+  $15 = ($13|0)<($14|0);
+  $16 = $capa;
+  if (!($15)) {
+   break;
+  }
+  $17 = $16<<1;
+  $capa = $17;
+ }
+ $18 = ($16|0)>(536870911);
+ if ($18) {
+  $capa = 536870911;
+ }
+ $19 = $capa;
+ $20 = $1;
+ $21 = ((($20)) + 16|0);
+ $22 = HEAP32[$21>>2]|0;
+ $23 = ($19|0)>($22|0);
+ if (!($23)) {
+  STACKTOP = sp;return;
+ }
+ $24 = $0;
+ $25 = $1;
+ $26 = ((($25)) + 20|0);
+ $27 = HEAP32[$26>>2]|0;
+ $28 = $capa;
+ $29 = $28<<3;
+ $30 = (_mrb_realloc($24,$27,$29)|0);
+ $expanded_ptr = $30;
+ $31 = $capa;
+ $32 = $1;
+ $33 = ((($32)) + 16|0);
+ HEAP32[$33>>2] = $31;
+ $34 = $expanded_ptr;
+ $35 = $1;
+ $36 = ((($35)) + 20|0);
+ HEAP32[$36>>2] = $34;
+ STACKTOP = sp;return;
+}
+function _ary_fill_with_nil($ptr,$size) {
+ $ptr = $ptr|0;
+ $size = $size|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $nil = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $nil = sp;
+ $0 = $ptr;
+ $1 = $size;
+ _mrb_nil_value_576($nil);
+ while(1) {
+  $2 = $1;
+  $3 = (($2) + -1)|0;
+  $1 = $3;
+  $4 = ($2|0)!=(0);
+  if (!($4)) {
+   break;
+  }
+  $5 = $0;
+  $6 = ((($5)) + 8|0);
+  $0 = $6;
+  ;HEAP32[$5>>2]=HEAP32[$nil>>2]|0;HEAP32[$5+4>>2]=HEAP32[$nil+4>>2]|0;
+ }
+ STACKTOP = sp;return;
+}
+function _mrb_nil_value_576($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_ary_concat($mrb,$self,$other) {
+ $mrb = $mrb|0;
+ $self = $self|0;
+ $other = $other|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$other>>2]|0;
+ $a2 = $1;
+ $2 = $0;
+ $3 = HEAP32[$self>>2]|0;
+ $4 = $a2;
+ $5 = ((($4)) + 20|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = $a2;
+ $8 = ((($7)) + 12|0);
+ $9 = HEAP32[$8>>2]|0;
+ _ary_concat($2,$3,$6,$9);
+ STACKTOP = sp;return;
+}
+function _ary_concat($mrb,$a,$ptr,$blen) {
+ $mrb = $mrb|0;
+ $a = $a|0;
+ $ptr = $ptr|0;
+ $blen = $blen|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $len = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $a;
+ $2 = $ptr;
+ $3 = $blen;
+ $4 = $1;
+ $5 = ((($4)) + 12|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = $3;
+ $8 = (($6) + ($7))|0;
+ $len = $8;
+ $9 = $0;
+ $10 = $1;
+ _ary_modify($9,$10);
+ $11 = $1;
+ $12 = ((($11)) + 16|0);
+ $13 = HEAP32[$12>>2]|0;
+ $14 = $len;
+ $15 = ($13|0)<($14|0);
+ if ($15) {
+  $16 = $0;
+  $17 = $1;
+  $18 = $len;
+  _ary_expand_capa($16,$17,$18);
+ }
+ $19 = $1;
+ $20 = ((($19)) + 20|0);
+ $21 = HEAP32[$20>>2]|0;
+ $22 = $1;
+ $23 = ((($22)) + 12|0);
+ $24 = HEAP32[$23>>2]|0;
+ $25 = (($21) + ($24<<3)|0);
+ $26 = $2;
+ $27 = $3;
+ _array_copy($25,$26,$27);
+ $28 = $0;
+ $29 = $1;
+ _mrb_write_barrier($28,$29);
+ $30 = $len;
+ $31 = $1;
+ $32 = ((($31)) + 12|0);
+ HEAP32[$32>>2] = $30;
+ STACKTOP = sp;return;
+}
+function _mrb_ary_replace($mrb,$self,$other) {
+ $mrb = $mrb|0;
+ $self = $self|0;
+ $other = $other|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$other>>2]|0;
+ $a2 = $1;
+ $2 = $0;
+ $3 = HEAP32[$self>>2]|0;
+ $4 = $a2;
+ $5 = ((($4)) + 20|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = $a2;
+ $8 = ((($7)) + 12|0);
+ $9 = HEAP32[$8>>2]|0;
+ _ary_replace($2,$3,$6,$9);
+ STACKTOP = sp;return;
+}
+function _ary_replace($mrb,$a,$argv,$len) {
+ $mrb = $mrb|0;
+ $a = $a|0;
+ $argv = $argv|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0;
+ var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $a;
+ $2 = $argv;
+ $3 = $len;
+ $4 = $0;
+ $5 = $1;
+ _ary_modify($4,$5);
+ $6 = $1;
+ $7 = ((($6)) + 16|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = $3;
+ $10 = ($8|0)<($9|0);
+ if ($10) {
+  $11 = $0;
+  $12 = $1;
+  $13 = $3;
+  _ary_expand_capa($11,$12,$13);
+ }
+ $14 = $1;
+ $15 = ((($14)) + 20|0);
+ $16 = HEAP32[$15>>2]|0;
+ $17 = $2;
+ $18 = $3;
+ _array_copy($16,$17,$18);
+ $19 = $0;
+ $20 = $1;
+ _mrb_write_barrier($19,$20);
+ $21 = $3;
+ $22 = $1;
+ $23 = ((($22)) + 12|0);
+ HEAP32[$23>>2] = $21;
+ STACKTOP = sp;return;
+}
+function _mrb_ary_push($mrb,$ary,$elem) {
+ $mrb = $mrb|0;
+ $ary = $ary|0;
+ $elem = $elem|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$ary>>2]|0;
+ $a = $1;
+ $2 = $0;
+ $3 = $a;
+ _ary_modify($2,$3);
+ $4 = $a;
+ $5 = ((($4)) + 12|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = $a;
+ $8 = ((($7)) + 16|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ($6|0)==($9|0);
+ if ($10) {
+  $11 = $0;
+  $12 = $a;
+  $13 = $a;
+  $14 = ((($13)) + 12|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = (($15) + 1)|0;
+  _ary_expand_capa($11,$12,$16);
+ }
+ $17 = $a;
+ $18 = ((($17)) + 12|0);
+ $19 = HEAP32[$18>>2]|0;
+ $20 = (($19) + 1)|0;
+ HEAP32[$18>>2] = $20;
+ $21 = $a;
+ $22 = ((($21)) + 20|0);
+ $23 = HEAP32[$22>>2]|0;
+ $24 = (($23) + ($19<<3)|0);
+ ;HEAP32[$24>>2]=HEAP32[$elem>>2]|0;HEAP32[$24+4>>2]=HEAP32[$elem+4>>2]|0;
+ $25 = ((($elem)) + 4|0);
+ $26 = HEAP32[$25>>2]|0;
+ $27 = ($26>>>0)<(8);
+ if ($27) {
+  STACKTOP = sp;return;
+ }
+ $28 = $0;
+ $29 = $a;
+ $30 = HEAP32[$elem>>2]|0;
+ _mrb_field_write_barrier($28,$29,$30);
+ STACKTOP = sp;return;
+}
+function _mrb_ary_pop($agg$result,$mrb,$ary) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $ary = $ary|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$ary>>2]|0;
+ $a = $1;
+ $2 = $a;
+ $3 = ((($2)) + 12|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)==(0);
+ if ($5) {
+  _mrb_nil_value_576($agg$result);
+  STACKTOP = sp;return;
+ } else {
+  $6 = $a;
+  $7 = ((($6)) + 12|0);
+  $8 = HEAP32[$7>>2]|0;
+  $9 = (($8) + -1)|0;
+  HEAP32[$7>>2] = $9;
+  $10 = $a;
+  $11 = ((($10)) + 20|0);
+  $12 = HEAP32[$11>>2]|0;
+  $13 = (($12) + ($9<<3)|0);
+  ;HEAP32[$agg$result>>2]=HEAP32[$13>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$13+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_ary_shift($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, $ptr = 0, $size = 0, $val = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val = sp + 8|0;
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $a = $1;
+ $2 = $a;
+ $3 = ((($2)) + 12|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)==(0);
+ if ($5) {
+  _mrb_nil_value_576($agg$result);
+  STACKTOP = sp;return;
+ }
+ $6 = $a;
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $7 >>> 11;
+ $9 = $8 & 256;
+ $10 = ($9|0)!=(0);
+ do {
+  if (!($10)) {
+   $22 = $a;
+   $23 = ((($22)) + 12|0);
+   $24 = HEAP32[$23>>2]|0;
+   $25 = ($24|0)>(10);
+   if ($25) {
+    $26 = $0;
+    $27 = $a;
+    _ary_make_shared($26,$27);
+    break;
+   }
+   $28 = $a;
+   $29 = ((($28)) + 20|0);
+   $30 = HEAP32[$29>>2]|0;
+   $ptr = $30;
+   $31 = $a;
+   $32 = ((($31)) + 12|0);
+   $33 = HEAP32[$32>>2]|0;
+   $size = $33;
+   $34 = $ptr;
+   ;HEAP32[$val>>2]=HEAP32[$34>>2]|0;HEAP32[$val+4>>2]=HEAP32[$34+4>>2]|0;
+   while(1) {
+    $35 = $size;
+    $36 = (($35) + -1)|0;
+    $size = $36;
+    $37 = ($36|0)!=(0);
+    if (!($37)) {
+     break;
+    }
+    $38 = $ptr;
+    $39 = $ptr;
+    $40 = ((($39)) + 8|0);
+    ;HEAP32[$38>>2]=HEAP32[$40>>2]|0;HEAP32[$38+4>>2]=HEAP32[$40+4>>2]|0;
+    $41 = $ptr;
+    $42 = ((($41)) + 8|0);
+    $ptr = $42;
+   }
+   $43 = $a;
+   $44 = ((($43)) + 12|0);
+   $45 = HEAP32[$44>>2]|0;
+   $46 = (($45) + -1)|0;
+   HEAP32[$44>>2] = $46;
+   ;HEAP32[$agg$result>>2]=HEAP32[$val>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$val+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+ } while(0);
+ $11 = $a;
+ $12 = ((($11)) + 20|0);
+ $13 = HEAP32[$12>>2]|0;
+ ;HEAP32[$val>>2]=HEAP32[$13>>2]|0;HEAP32[$val+4>>2]=HEAP32[$13+4>>2]|0;
+ $14 = $a;
+ $15 = ((($14)) + 20|0);
+ $16 = HEAP32[$15>>2]|0;
+ $17 = ((($16)) + 8|0);
+ HEAP32[$15>>2] = $17;
+ $18 = $a;
+ $19 = ((($18)) + 12|0);
+ $20 = HEAP32[$19>>2]|0;
+ $21 = (($20) + -1)|0;
+ HEAP32[$19>>2] = $21;
+ ;HEAP32[$agg$result>>2]=HEAP32[$val>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$val+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _ary_make_shared($mrb,$a) {
+ $mrb = $mrb|0;
+ $a = $a|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $shared = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $a;
+ $2 = $1;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $4 & 256;
+ $6 = ($5|0)!=(0);
+ if ($6) {
+  STACKTOP = sp;return;
+ }
+ $7 = $0;
+ $8 = (_mrb_malloc($7,12)|0);
+ $shared = $8;
+ $9 = $shared;
+ HEAP32[$9>>2] = 1;
+ $10 = $1;
+ $11 = ((($10)) + 16|0);
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $1;
+ $14 = ((($13)) + 12|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = ($12|0)>($15|0);
+ if ($16) {
+  $17 = $0;
+  $18 = $1;
+  $19 = ((($18)) + 20|0);
+  $20 = HEAP32[$19>>2]|0;
+  $21 = $1;
+  $22 = ((($21)) + 12|0);
+  $23 = HEAP32[$22>>2]|0;
+  $24 = $23<<3;
+  $25 = (($24) + 1)|0;
+  $26 = (_mrb_realloc($17,$20,$25)|0);
+  $27 = $shared;
+  $28 = ((($27)) + 8|0);
+  HEAP32[$28>>2] = $26;
+  $29 = $1;
+  $30 = ((($29)) + 20|0);
+  HEAP32[$30>>2] = $26;
+ } else {
+  $31 = $1;
+  $32 = ((($31)) + 20|0);
+  $33 = HEAP32[$32>>2]|0;
+  $34 = $shared;
+  $35 = ((($34)) + 8|0);
+  HEAP32[$35>>2] = $33;
+ }
+ $36 = $1;
+ $37 = ((($36)) + 12|0);
+ $38 = HEAP32[$37>>2]|0;
+ $39 = $shared;
+ $40 = ((($39)) + 4|0);
+ HEAP32[$40>>2] = $38;
+ $41 = $shared;
+ $42 = $1;
+ $43 = ((($42)) + 16|0);
+ HEAP32[$43>>2] = $41;
+ $44 = $1;
+ $45 = HEAP32[$44>>2]|0;
+ $46 = $45 >>> 11;
+ $47 = $46 | 256;
+ $48 = HEAP32[$44>>2]|0;
+ $49 = $47 & 2097151;
+ $50 = $49 << 11;
+ $51 = $48 & 2047;
+ $52 = $51 | $50;
+ HEAP32[$44>>2] = $52;
+ STACKTOP = sp;return;
+}
+function _mrb_ary_unshift($agg$result,$mrb,$self,$item) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ $item = $item|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $8 = 0, $9 = 0, $a = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $a = $1;
+ $2 = $a;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $4 & 256;
+ $6 = ($5|0)!=(0);
+ if ($6) {
+  $7 = $a;
+  $8 = ((($7)) + 16|0);
+  $9 = HEAP32[$8>>2]|0;
+  $10 = HEAP32[$9>>2]|0;
+  $11 = ($10|0)==(1);
+  if ($11) {
+   $12 = $a;
+   $13 = ((($12)) + 20|0);
+   $14 = HEAP32[$13>>2]|0;
+   $15 = $a;
+   $16 = ((($15)) + 16|0);
+   $17 = HEAP32[$16>>2]|0;
+   $18 = ((($17)) + 8|0);
+   $19 = HEAP32[$18>>2]|0;
+   $20 = $14;
+   $21 = $19;
+   $22 = (($20) - ($21))|0;
+   $23 = (($22|0) / 8)&-1;
+   $24 = ($23|0)>=(1);
+   if ($24) {
+    $25 = $a;
+    $26 = ((($25)) + 20|0);
+    $27 = HEAP32[$26>>2]|0;
+    $28 = ((($27)) + -8|0);
+    HEAP32[$26>>2] = $28;
+    $29 = $a;
+    $30 = ((($29)) + 20|0);
+    $31 = HEAP32[$30>>2]|0;
+    ;HEAP32[$31>>2]=HEAP32[$item>>2]|0;HEAP32[$31+4>>2]=HEAP32[$item+4>>2]|0;
+   } else {
+    label = 5;
+   }
+  } else {
+   label = 5;
+  }
+ } else {
+  label = 5;
+ }
+ if ((label|0) == 5) {
+  $32 = $0;
+  $33 = $a;
+  _ary_modify($32,$33);
+  $34 = $a;
+  $35 = ((($34)) + 16|0);
+  $36 = HEAP32[$35>>2]|0;
+  $37 = $a;
+  $38 = ((($37)) + 12|0);
+  $39 = HEAP32[$38>>2]|0;
+  $40 = (($39) + 1)|0;
+  $41 = ($36|0)<($40|0);
+  if ($41) {
+   $42 = $0;
+   $43 = $a;
+   $44 = $a;
+   $45 = ((($44)) + 12|0);
+   $46 = HEAP32[$45>>2]|0;
+   $47 = (($46) + 1)|0;
+   _ary_expand_capa($42,$43,$47);
+  }
+  $48 = $a;
+  $49 = ((($48)) + 20|0);
+  $50 = HEAP32[$49>>2]|0;
+  $51 = ((($50)) + 8|0);
+  $52 = $a;
+  $53 = ((($52)) + 20|0);
+  $54 = HEAP32[$53>>2]|0;
+  $55 = $a;
+  $56 = ((($55)) + 12|0);
+  $57 = HEAP32[$56>>2]|0;
+  _value_move_587($51,$54,$57);
+  $58 = $a;
+  $59 = ((($58)) + 20|0);
+  $60 = HEAP32[$59>>2]|0;
+  ;HEAP32[$60>>2]=HEAP32[$item>>2]|0;HEAP32[$60+4>>2]=HEAP32[$item+4>>2]|0;
+ }
+ $61 = $a;
+ $62 = ((($61)) + 12|0);
+ $63 = HEAP32[$62>>2]|0;
+ $64 = (($63) + 1)|0;
+ HEAP32[$62>>2] = $64;
+ $65 = ((($item)) + 4|0);
+ $66 = HEAP32[$65>>2]|0;
+ $67 = ($66>>>0)<(8);
+ if ($67) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $68 = $0;
+ $69 = $a;
+ $70 = HEAP32[$item>>2]|0;
+ _mrb_field_write_barrier($68,$69,$70);
+ ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _value_move_587($s1,$s2,$n) {
+ $s1 = $s1|0;
+ $s2 = $s2|0;
+ $n = $n|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s1;
+ $1 = $s2;
+ $2 = $n;
+ $3 = $0;
+ $4 = $1;
+ $5 = ($3>>>0)>($4>>>0);
+ if ($5) {
+  $6 = $0;
+  $7 = $1;
+  $8 = $2;
+  $9 = (($7) + ($8<<3)|0);
+  $10 = ($6>>>0)<($9>>>0);
+  if ($10) {
+   $11 = $2;
+   $12 = $0;
+   $13 = (($12) + ($11<<3)|0);
+   $0 = $13;
+   $14 = $2;
+   $15 = $1;
+   $16 = (($15) + ($14<<3)|0);
+   $1 = $16;
+   while(1) {
+    $17 = $2;
+    $18 = (($17) + -1)|0;
+    $2 = $18;
+    $19 = ($17>>>0)>(0);
+    if (!($19)) {
+     break;
+    }
+    $20 = $0;
+    $21 = ((($20)) + -8|0);
+    $0 = $21;
+    $22 = $1;
+    $23 = ((($22)) + -8|0);
+    $1 = $23;
+    ;HEAP32[$21>>2]=HEAP32[$23>>2]|0;HEAP32[$21+4>>2]=HEAP32[$23+4>>2]|0;
+   }
+   STACKTOP = sp;return;
+  }
+ }
+ $24 = $0;
+ $25 = $1;
+ $26 = ($24|0)!=($25|0);
+ if (!($26)) {
+  STACKTOP = sp;return;
+ }
+ while(1) {
+  $27 = $2;
+  $28 = (($27) + -1)|0;
+  $2 = $28;
+  $29 = ($27>>>0)>(0);
+  if (!($29)) {
+   break;
+  }
+  $30 = $0;
+  $31 = ((($30)) + 8|0);
+  $0 = $31;
+  $32 = $1;
+  $33 = ((($32)) + 8|0);
+  $1 = $33;
+  ;HEAP32[$30>>2]=HEAP32[$32>>2]|0;HEAP32[$30+4>>2]=HEAP32[$32+4>>2]|0;
+ }
+ STACKTOP = sp;return;
+}
+function _mrb_ary_ref($agg$result,$mrb,$ary,$n) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $ary = $ary|0;
+ $n = $n|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $a = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $n;
+ $2 = HEAP32[$ary>>2]|0;
+ $a = $2;
+ $3 = $1;
+ $4 = ($3|0)<(0);
+ if ($4) {
+  $5 = $a;
+  $6 = ((($5)) + 12|0);
+  $7 = HEAP32[$6>>2]|0;
+  $8 = $1;
+  $9 = (($8) + ($7))|0;
+  $1 = $9;
+ }
+ $10 = $1;
+ $11 = ($10|0)<(0);
+ if (!($11)) {
+  $12 = $a;
+  $13 = ((($12)) + 12|0);
+  $14 = HEAP32[$13>>2]|0;
+  $15 = $1;
+  $16 = ($14|0)<=($15|0);
+  if (!($16)) {
+   $17 = $1;
+   $18 = $a;
+   $19 = ((($18)) + 20|0);
+   $20 = HEAP32[$19>>2]|0;
+   $21 = (($20) + ($17<<3)|0);
+   ;HEAP32[$agg$result>>2]=HEAP32[$21>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$21+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+ }
+ _mrb_nil_value_576($agg$result);
+ STACKTOP = sp;return;
+}
+function _mrb_ary_set($mrb,$ary,$n,$val) {
+ $mrb = $mrb|0;
+ $ary = $ary|0;
+ $n = $n|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $2 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $n;
+ $3 = HEAP32[$ary>>2]|0;
+ $a = $3;
+ $4 = $0;
+ $5 = $a;
+ _ary_modify($4,$5);
+ $6 = $1;
+ $7 = ($6|0)<(0);
+ if ($7) {
+  $8 = $a;
+  $9 = ((($8)) + 12|0);
+  $10 = HEAP32[$9>>2]|0;
+  $11 = $1;
+  $12 = (($11) + ($10))|0;
+  $1 = $12;
+  $13 = $1;
+  $14 = ($13|0)<(0);
+  if ($14) {
+   $15 = $0;
+   $16 = $0;
+   $17 = (_mrb_class_get($16,68712)|0);
+   $18 = $1;
+   $19 = $a;
+   $20 = ((($19)) + 12|0);
+   $21 = HEAP32[$20>>2]|0;
+   $22 = (($18) - ($21))|0;
+   _mrb_fixnum_value_593($2,$22);
+   ;HEAP8[$vararg_buffer>>0]=HEAP8[$2>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$2+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$2+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$2+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$2+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$2+7>>0]|0;
+   _mrb_raisef($15,$17,64224,$vararg_buffer);
+   // unreachable;
+  }
+ }
+ $23 = $a;
+ $24 = ((($23)) + 12|0);
+ $25 = HEAP32[$24>>2]|0;
+ $26 = $1;
+ $27 = ($25|0)<=($26|0);
+ if ($27) {
+  $28 = $a;
+  $29 = ((($28)) + 16|0);
+  $30 = HEAP32[$29>>2]|0;
+  $31 = $1;
+  $32 = ($30|0)<=($31|0);
+  if ($32) {
+   $33 = $0;
+   $34 = $a;
+   $35 = $1;
+   $36 = (($35) + 1)|0;
+   _ary_expand_capa($33,$34,$36);
+  }
+  $37 = $a;
+  $38 = ((($37)) + 20|0);
+  $39 = HEAP32[$38>>2]|0;
+  $40 = $a;
+  $41 = ((($40)) + 12|0);
+  $42 = HEAP32[$41>>2]|0;
+  $43 = (($39) + ($42<<3)|0);
+  $44 = $1;
+  $45 = (($44) + 1)|0;
+  $46 = $a;
+  $47 = ((($46)) + 12|0);
+  $48 = HEAP32[$47>>2]|0;
+  $49 = (($45) - ($48))|0;
+  _ary_fill_with_nil($43,$49);
+  $50 = $1;
+  $51 = (($50) + 1)|0;
+  $52 = $a;
+  $53 = ((($52)) + 12|0);
+  HEAP32[$53>>2] = $51;
+ }
+ $54 = $1;
+ $55 = $a;
+ $56 = ((($55)) + 20|0);
+ $57 = HEAP32[$56>>2]|0;
+ $58 = (($57) + ($54<<3)|0);
+ ;HEAP32[$58>>2]=HEAP32[$val>>2]|0;HEAP32[$58+4>>2]=HEAP32[$val+4>>2]|0;
+ $59 = ((($val)) + 4|0);
+ $60 = HEAP32[$59>>2]|0;
+ $61 = ($60>>>0)<(8);
+ if ($61) {
+  STACKTOP = sp;return;
+ }
+ $62 = $0;
+ $63 = $a;
+ $64 = HEAP32[$val>>2]|0;
+ _mrb_field_write_barrier($62,$63,$64);
+ STACKTOP = sp;return;
+}
+function _mrb_fixnum_value_593($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 3;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_ary_splice($agg$result,$mrb,$ary,$head,$len,$rpl) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $ary = $ary|0;
+ $head = $head|0;
+ $len = $len|0;
+ $rpl = $rpl|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0;
+ var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0;
+ var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0;
+ var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0;
+ var $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0;
+ var $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $a = 0, $argc = 0, $argv = 0, $i = 0, $size = 0, $tail = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $3 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $head;
+ $2 = $len;
+ $4 = HEAP32[$ary>>2]|0;
+ $a = $4;
+ $5 = $0;
+ $6 = $a;
+ _ary_modify($5,$6);
+ $7 = $2;
+ $8 = ($7|0)<(0);
+ if ($8) {
+  $9 = $0;
+  $10 = $0;
+  $11 = (_mrb_class_get($10,68712)|0);
+  $12 = $2;
+  _mrb_fixnum_value_593($3,$12);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$3>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$3+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$3+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$3+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$3+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$3+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$3+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$3+7>>0]|0;
+  _mrb_raisef($9,$11,64246,$vararg_buffer);
+  // unreachable;
+ }
+ $13 = $1;
+ $14 = ($13|0)<(0);
+ if ($14) {
+  $15 = $a;
+  $16 = ((($15)) + 12|0);
+  $17 = HEAP32[$16>>2]|0;
+  $18 = $1;
+  $19 = (($18) + ($17))|0;
+  $1 = $19;
+  $20 = $1;
+  $21 = ($20|0)<(0);
+  if ($21) {
+   $22 = $0;
+   $23 = $0;
+   $24 = (_mrb_class_get($23,68712)|0);
+   _mrb_raise($22,$24,64267);
+   // unreachable;
+  }
+ }
+ $25 = $a;
+ $26 = ((($25)) + 12|0);
+ $27 = HEAP32[$26>>2]|0;
+ $28 = $2;
+ $29 = ($27|0)<($28|0);
+ if ($29) {
+  label = 8;
+ } else {
+  $30 = $a;
+  $31 = ((($30)) + 12|0);
+  $32 = HEAP32[$31>>2]|0;
+  $33 = $1;
+  $34 = $2;
+  $35 = (($33) + ($34))|0;
+  $36 = ($32|0)<($35|0);
+  if ($36) {
+   label = 8;
+  }
+ }
+ if ((label|0) == 8) {
+  $37 = $a;
+  $38 = ((($37)) + 12|0);
+  $39 = HEAP32[$38>>2]|0;
+  $40 = $1;
+  $41 = (($39) - ($40))|0;
+  $2 = $41;
+ }
+ $42 = $1;
+ $43 = $2;
+ $44 = (($42) + ($43))|0;
+ $tail = $44;
+ $45 = ((($rpl)) + 4|0);
+ $46 = HEAP32[$45>>2]|0;
+ $47 = ($46|0)==(14);
+ if ($47) {
+  $48 = HEAP32[$rpl>>2]|0;
+  $49 = ((($48)) + 12|0);
+  $50 = HEAP32[$49>>2]|0;
+  $argc = $50;
+  $51 = HEAP32[$rpl>>2]|0;
+  $52 = ((($51)) + 20|0);
+  $53 = HEAP32[$52>>2]|0;
+  $argv = $53;
+ } else {
+  $argc = 1;
+  $argv = $rpl;
+ }
+ $54 = $1;
+ $55 = $argc;
+ $56 = (($54) + ($55))|0;
+ $size = $56;
+ $57 = $tail;
+ $58 = $a;
+ $59 = ((($58)) + 12|0);
+ $60 = HEAP32[$59>>2]|0;
+ $61 = ($57|0)<($60|0);
+ if ($61) {
+  $62 = $a;
+  $63 = ((($62)) + 12|0);
+  $64 = HEAP32[$63>>2]|0;
+  $65 = $tail;
+  $66 = (($64) - ($65))|0;
+  $67 = $size;
+  $68 = (($67) + ($66))|0;
+  $size = $68;
+ }
+ $69 = $size;
+ $70 = $a;
+ $71 = ((($70)) + 16|0);
+ $72 = HEAP32[$71>>2]|0;
+ $73 = ($69|0)>($72|0);
+ if ($73) {
+  $74 = $0;
+  $75 = $a;
+  $76 = $size;
+  _ary_expand_capa($74,$75,$76);
+ }
+ $77 = $1;
+ $78 = $a;
+ $79 = ((($78)) + 12|0);
+ $80 = HEAP32[$79>>2]|0;
+ $81 = ($77|0)>($80|0);
+ if ($81) {
+  $82 = $a;
+  $83 = ((($82)) + 20|0);
+  $84 = HEAP32[$83>>2]|0;
+  $85 = $a;
+  $86 = ((($85)) + 12|0);
+  $87 = HEAP32[$86>>2]|0;
+  $88 = (($84) + ($87<<3)|0);
+  $89 = $1;
+  $90 = $a;
+  $91 = ((($90)) + 12|0);
+  $92 = HEAP32[$91>>2]|0;
+  $93 = (($89) - ($92))|0;
+  _ary_fill_with_nil($88,$93);
+ } else {
+  $94 = $1;
+  $95 = $a;
+  $96 = ((($95)) + 12|0);
+  $97 = HEAP32[$96>>2]|0;
+  $98 = ($94|0)<($97|0);
+  if ($98) {
+   $99 = $a;
+   $100 = ((($99)) + 20|0);
+   $101 = HEAP32[$100>>2]|0;
+   $102 = $1;
+   $103 = (($101) + ($102<<3)|0);
+   $104 = $argc;
+   $105 = (($103) + ($104<<3)|0);
+   $106 = $a;
+   $107 = ((($106)) + 20|0);
+   $108 = HEAP32[$107>>2]|0;
+   $109 = $tail;
+   $110 = (($108) + ($109<<3)|0);
+   $111 = $a;
+   $112 = ((($111)) + 12|0);
+   $113 = HEAP32[$112>>2]|0;
+   $114 = $tail;
+   $115 = (($113) - ($114))|0;
+   _value_move_587($105,$110,$115);
+  }
+ }
+ $i = 0;
+ while(1) {
+  $116 = $i;
+  $117 = $argc;
+  $118 = ($116|0)<($117|0);
+  if (!($118)) {
+   break;
+  }
+  $119 = $a;
+  $120 = ((($119)) + 20|0);
+  $121 = HEAP32[$120>>2]|0;
+  $122 = $1;
+  $123 = (($121) + ($122<<3)|0);
+  $124 = $i;
+  $125 = (($123) + ($124<<3)|0);
+  $126 = $argv;
+  $127 = $i;
+  $128 = (($126) + ($127<<3)|0);
+  ;HEAP32[$125>>2]=HEAP32[$128>>2]|0;HEAP32[$125+4>>2]=HEAP32[$128+4>>2]|0;
+  $129 = $i;
+  $130 = $argv;
+  $131 = (($130) + ($129<<3)|0);
+  $132 = ((($131)) + 4|0);
+  $133 = HEAP32[$132>>2]|0;
+  $134 = ($133>>>0)<(8);
+  if (!($134)) {
+   $135 = $0;
+   $136 = $a;
+   $137 = $i;
+   $138 = $argv;
+   $139 = (($138) + ($137<<3)|0);
+   $140 = HEAP32[$139>>2]|0;
+   _mrb_field_write_barrier($135,$136,$140);
+  }
+  $141 = $i;
+  $142 = (($141) + 1)|0;
+  $i = $142;
+ }
+ $143 = $size;
+ $144 = $a;
+ $145 = ((($144)) + 12|0);
+ HEAP32[$145>>2] = $143;
+ ;HEAP32[$agg$result>>2]=HEAP32[$ary>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$ary+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_ary_splat($agg$result,$mrb,$v) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $v = $v|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $v$byval_copy = 0, $v$byval_copy1 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v$byval_copy1 = sp + 16|0;
+ $v$byval_copy = sp + 8|0;
+ $vararg_buffer = sp;
+ $0 = $mrb;
+ $1 = ((($v)) + 4|0);
+ $2 = HEAP32[$1>>2]|0;
+ $3 = ($2|0)==(14);
+ if ($3) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $4 = $0;
+ $5 = $0;
+ $6 = (_mrb_intern_static($5,64289,4)|0);
+ ;HEAP32[$v$byval_copy>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy+4>>2]=HEAP32[$v+4>>2]|0;
+ $7 = (_mrb_respond_to($4,$v$byval_copy,$6)|0);
+ $8 = ($7<<24>>24)!=(0);
+ $9 = $0;
+ if ($8) {
+  ;HEAP32[$v$byval_copy1>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy1+4>>2]=HEAP32[$v+4>>2]|0;
+  _mrb_funcall($agg$result,$9,$v$byval_copy1,64289,0,$vararg_buffer);
+  STACKTOP = sp;return;
+ } else {
+  _mrb_ary_new_from_values($agg$result,$9,1,$v);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_ary_clear($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $a = $1;
+ $2 = $a;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $4 & 256;
+ $6 = ($5|0)!=(0);
+ $7 = $0;
+ $8 = $a;
+ if ($6) {
+  $9 = ((($8)) + 16|0);
+  $10 = HEAP32[$9>>2]|0;
+  _mrb_ary_decref($7,$10);
+  $11 = $a;
+  $12 = HEAP32[$11>>2]|0;
+  $13 = $12 >>> 11;
+  $14 = $13 & -257;
+  $15 = HEAP32[$11>>2]|0;
+  $16 = $14 & 2097151;
+  $17 = $16 << 11;
+  $18 = $15 & 2047;
+  $19 = $18 | $17;
+  HEAP32[$11>>2] = $19;
+ } else {
+  $20 = ((($8)) + 20|0);
+  $21 = HEAP32[$20>>2]|0;
+  _mrb_free($7,$21);
+ }
+ $22 = $a;
+ $23 = ((($22)) + 12|0);
+ HEAP32[$23>>2] = 0;
+ $24 = $a;
+ $25 = ((($24)) + 16|0);
+ HEAP32[$25>>2] = 0;
+ $26 = $a;
+ $27 = ((($26)) + 20|0);
+ HEAP32[$27>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_ary_entry($agg$result,$ary,$offset) {
+ $agg$result = $agg$result|0;
+ $ary = $ary|0;
+ $offset = $offset|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $ary$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $ary$byval_copy = sp + 8|0;
+ $0 = $offset;
+ $1 = $0;
+ $2 = ($1|0)<(0);
+ if ($2) {
+  $3 = HEAP32[$ary>>2]|0;
+  $4 = ((($3)) + 12|0);
+  $5 = HEAP32[$4>>2]|0;
+  $6 = $0;
+  $7 = (($6) + ($5))|0;
+  $0 = $7;
+ }
+ $8 = $0;
+ ;HEAP32[$ary$byval_copy>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy+4>>2]=HEAP32[$ary+4>>2]|0;
+ _ary_elt($agg$result,$ary$byval_copy,$8);
+ STACKTOP = sp;return;
+}
+function _ary_elt($agg$result,$ary,$offset) {
+ $agg$result = $agg$result|0;
+ $ary = $ary|0;
+ $offset = $offset|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $offset;
+ $1 = $0;
+ $2 = ($1|0)<(0);
+ if (!($2)) {
+  $3 = HEAP32[$ary>>2]|0;
+  $4 = ((($3)) + 12|0);
+  $5 = HEAP32[$4>>2]|0;
+  $6 = $0;
+  $7 = ($5|0)<=($6|0);
+  if (!($7)) {
+   $8 = $0;
+   $9 = HEAP32[$ary>>2]|0;
+   $10 = ((($9)) + 20|0);
+   $11 = HEAP32[$10>>2]|0;
+   $12 = (($11) + ($8<<3)|0);
+   ;HEAP32[$agg$result>>2]=HEAP32[$12>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$12+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+ }
+ _mrb_nil_value_576($agg$result);
+ STACKTOP = sp;return;
+}
+function _mrb_ary_join($agg$result,$mrb,$ary,$sep) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $ary = $ary|0;
+ $sep = $sep|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $ary$byval_copy = 0, $sep$byval_copy = 0, $sep$byval_copy1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 48|0;
+ $sep$byval_copy1 = sp + 40|0;
+ $ary$byval_copy = sp + 32|0;
+ $sep$byval_copy = sp + 24|0;
+ $1 = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $3 = $0;
+ ;HEAP32[$sep$byval_copy>>2]=HEAP32[$sep>>2]|0;HEAP32[$sep$byval_copy+4>>2]=HEAP32[$sep+4>>2]|0;
+ _mrb_obj_as_string($1,$3,$sep$byval_copy);
+ ;HEAP32[$sep>>2]=HEAP32[$1>>2]|0;HEAP32[$sep+4>>2]=HEAP32[$1+4>>2]|0;
+ $4 = $0;
+ $5 = $0;
+ _mrb_ary_new($2,$5);
+ ;HEAP32[$ary$byval_copy>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy+4>>2]=HEAP32[$ary+4>>2]|0;
+ ;HEAP32[$sep$byval_copy1>>2]=HEAP32[$sep>>2]|0;HEAP32[$sep$byval_copy1+4>>2]=HEAP32[$sep+4>>2]|0;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+ _join_ary($agg$result,$4,$ary$byval_copy,$sep$byval_copy1,$$byval_copy);
+ STACKTOP = sp;return;
+}
+function _join_ary($agg$result,$mrb,$ary,$sep,$list) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $ary = $ary|0;
+ $sep = $sep|0;
+ $list = $list|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
+ var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $7 = 0, $8 = 0, $9 = 0, $ary$byval_copy = 0, $ary$byval_copy1 = 0, $i = 0, $list$byval_copy = 0, $list$byval_copy3 = 0, $list$byval_copy9 = 0, $result = 0, $result$byval_copy = 0, $result$byval_copy4 = 0, $sep$byval_copy = 0, $sep$byval_copy2 = 0, $tmp = 0, $val = 0;
+ var $val$byval_copy = 0, $val$byval_copy5 = 0, $val$byval_copy6 = 0, $val$byval_copy7 = 0, $val$byval_copy8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 224|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $list$byval_copy9 = sp + 208|0;
+ $val$byval_copy8 = sp + 200|0;
+ $val$byval_copy7 = sp + 192|0;
+ $val$byval_copy6 = sp + 184|0;
+ $val$byval_copy5 = sp + 176|0;
+ $result$byval_copy4 = sp + 168|0;
+ $list$byval_copy3 = sp + 160|0;
+ $sep$byval_copy2 = sp + 152|0;
+ $val$byval_copy = sp + 144|0;
+ $sep$byval_copy = sp + 136|0;
+ $result$byval_copy = sp + 128|0;
+ $ary$byval_copy1 = sp + 120|0;
+ $list$byval_copy = sp + 112|0;
+ $$byval_copy = sp + 104|0;
+ $ary$byval_copy = sp + 96|0;
+ $result = sp + 80|0;
+ $val = sp + 72|0;
+ $tmp = sp + 64|0;
+ $1 = sp + 56|0;
+ $2 = sp + 48|0;
+ $3 = sp + 40|0;
+ $4 = sp + 32|0;
+ $5 = sp + 24|0;
+ $6 = sp + 16|0;
+ $7 = sp + 8|0;
+ $8 = sp;
+ $0 = $mrb;
+ $i = 0;
+ while(1) {
+  $9 = $i;
+  $10 = HEAP32[$list>>2]|0;
+  $11 = ((($10)) + 12|0);
+  $12 = HEAP32[$11>>2]|0;
+  $13 = ($9|0)<($12|0);
+  $14 = $0;
+  if (!($13)) {
+   break;
+  }
+  $15 = $i;
+  $16 = HEAP32[$list>>2]|0;
+  $17 = ((($16)) + 20|0);
+  $18 = HEAP32[$17>>2]|0;
+  $19 = (($18) + ($15<<3)|0);
+  ;HEAP32[$ary$byval_copy>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy+4>>2]=HEAP32[$ary+4>>2]|0;
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$19>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$19+4>>2]|0;
+  $20 = (_mrb_obj_equal($14,$ary$byval_copy,$$byval_copy)|0);
+  $21 = ($20<<24>>24)!=(0);
+  if ($21) {
+   label = 4;
+   break;
+  }
+  $25 = $i;
+  $26 = (($25) + 1)|0;
+  $i = $26;
+ }
+ if ((label|0) == 4) {
+  $22 = $0;
+  $23 = $0;
+  $24 = (_mrb_class_get($23,68855)|0);
+  _mrb_raise($22,$24,64294);
+  // unreachable;
+ }
+ ;HEAP32[$list$byval_copy>>2]=HEAP32[$list>>2]|0;HEAP32[$list$byval_copy+4>>2]=HEAP32[$list+4>>2]|0;
+ ;HEAP32[$ary$byval_copy1>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy1+4>>2]=HEAP32[$ary+4>>2]|0;
+ _mrb_ary_push($14,$list$byval_copy,$ary$byval_copy1);
+ $27 = $0;
+ _mrb_str_buf_new($1,$27,64);
+ ;HEAP32[$result>>2]=HEAP32[$1>>2]|0;HEAP32[$result+4>>2]=HEAP32[$1+4>>2]|0;
+ $i = 0;
+ while(1) {
+  $28 = $i;
+  $29 = HEAP32[$ary>>2]|0;
+  $30 = ((($29)) + 12|0);
+  $31 = HEAP32[$30>>2]|0;
+  $32 = ($28|0)<($31|0);
+  if (!($32)) {
+   break;
+  }
+  $33 = $i;
+  $34 = ($33|0)>(0);
+  do {
+   if ($34) {
+    $35 = ((($sep)) + 4|0);
+    $36 = HEAP32[$35>>2]|0;
+    $37 = ($36|0)==(0);
+    if ($37) {
+     $38 = HEAP32[$sep>>2]|0;
+     $39 = ($38|0)!=(0);
+     if (!($39)) {
+      break;
+     }
+    }
+    $40 = $0;
+    ;HEAP32[$result$byval_copy>>2]=HEAP32[$result>>2]|0;HEAP32[$result$byval_copy+4>>2]=HEAP32[$result+4>>2]|0;
+    ;HEAP32[$sep$byval_copy>>2]=HEAP32[$sep>>2]|0;HEAP32[$sep$byval_copy+4>>2]=HEAP32[$sep+4>>2]|0;
+    _mrb_str_cat_str($2,$40,$result$byval_copy,$sep$byval_copy);
+   }
+  } while(0);
+  $41 = $i;
+  $42 = HEAP32[$ary>>2]|0;
+  $43 = ((($42)) + 20|0);
+  $44 = HEAP32[$43>>2]|0;
+  $45 = (($44) + ($41<<3)|0);
+  ;HEAP32[$val>>2]=HEAP32[$45>>2]|0;HEAP32[$val+4>>2]=HEAP32[$45+4>>2]|0;
+  $46 = ((($val)) + 4|0);
+  $47 = HEAP32[$46>>2]|0;
+  L17: do {
+   switch ($47|0) {
+   case 14:  {
+    label = 13;
+    break;
+   }
+   case 16:  {
+    break;
+   }
+   default: {
+    $52 = $0;
+    ;HEAP32[$val$byval_copy6>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy6+4>>2]=HEAP32[$val+4>>2]|0;
+    _mrb_check_string_type($5,$52,$val$byval_copy6);
+    ;HEAP32[$tmp>>2]=HEAP32[$5>>2]|0;HEAP32[$tmp+4>>2]=HEAP32[$5+4>>2]|0;
+    $53 = ((($tmp)) + 4|0);
+    $54 = HEAP32[$53>>2]|0;
+    $55 = ($54|0)==(0);
+    if ($55) {
+     $56 = HEAP32[$tmp>>2]|0;
+     $57 = ($56|0)!=(0);
+     if (!($57)) {
+      $58 = $0;
+      ;HEAP32[$val$byval_copy7>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy7+4>>2]=HEAP32[$val+4>>2]|0;
+      _mrb_check_convert_type($6,$58,$val$byval_copy7,14,64904,64910);
+      ;HEAP32[$tmp>>2]=HEAP32[$6>>2]|0;HEAP32[$tmp+4>>2]=HEAP32[$6+4>>2]|0;
+      $59 = ((($tmp)) + 4|0);
+      $60 = HEAP32[$59>>2]|0;
+      $61 = ($60|0)==(0);
+      if ($61) {
+       $62 = HEAP32[$tmp>>2]|0;
+       $63 = ($62|0)!=(0);
+       if (!($63)) {
+        $64 = $0;
+        ;HEAP32[$val$byval_copy8>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy8+4>>2]=HEAP32[$val+4>>2]|0;
+        _mrb_obj_as_string($7,$64,$val$byval_copy8);
+        ;HEAP32[$val>>2]=HEAP32[$7>>2]|0;HEAP32[$val+4>>2]=HEAP32[$7+4>>2]|0;
+        break L17;
+       }
+      }
+      ;HEAP32[$val>>2]=HEAP32[$tmp>>2]|0;HEAP32[$val+4>>2]=HEAP32[$tmp+4>>2]|0;
+      label = 13;
+      break L17;
+     }
+    }
+    ;HEAP32[$val>>2]=HEAP32[$tmp>>2]|0;HEAP32[$val+4>>2]=HEAP32[$tmp+4>>2]|0;
+   }
+   }
+  } while(0);
+  if ((label|0) == 13) {
+   label = 0;
+   $48 = $0;
+   ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+   ;HEAP32[$sep$byval_copy2>>2]=HEAP32[$sep>>2]|0;HEAP32[$sep$byval_copy2+4>>2]=HEAP32[$sep+4>>2]|0;
+   ;HEAP32[$list$byval_copy3>>2]=HEAP32[$list>>2]|0;HEAP32[$list$byval_copy3+4>>2]=HEAP32[$list+4>>2]|0;
+   _join_ary($3,$48,$val$byval_copy,$sep$byval_copy2,$list$byval_copy3);
+   ;HEAP32[$val>>2]=HEAP32[$3>>2]|0;HEAP32[$val+4>>2]=HEAP32[$3+4>>2]|0;
+  }
+  $49 = $0;
+  ;HEAP32[$result$byval_copy4>>2]=HEAP32[$result>>2]|0;HEAP32[$result$byval_copy4+4>>2]=HEAP32[$result+4>>2]|0;
+  ;HEAP32[$val$byval_copy5>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy5+4>>2]=HEAP32[$val+4>>2]|0;
+  _mrb_str_cat_str($4,$49,$result$byval_copy4,$val$byval_copy5);
+  $50 = $i;
+  $51 = (($50) + 1)|0;
+  $i = $51;
+ }
+ $65 = $0;
+ ;HEAP32[$list$byval_copy9>>2]=HEAP32[$list>>2]|0;HEAP32[$list$byval_copy9+4>>2]=HEAP32[$list+4>>2]|0;
+ _mrb_ary_pop($8,$65,$list$byval_copy9);
+ ;HEAP32[$agg$result>>2]=HEAP32[$result>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$result+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_init_array($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $8 = 0, $9 = 0, $a = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = $0;
+ $3 = ((($2)) + 32|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = (_mrb_define_class($1,64904,$4)|0);
+ $a = $5;
+ $6 = $0;
+ $7 = ((($6)) + 52|0);
+ HEAP32[$7>>2] = $5;
+ $8 = $a;
+ $9 = HEAP32[$8>>2]|0;
+ $10 = $9 >>> 11;
+ $11 = $10 & -256;
+ $12 = $11 | 14;
+ $13 = $a;
+ $14 = HEAP32[$13>>2]|0;
+ $15 = $12 & 2097151;
+ $16 = $15 << 11;
+ $17 = $14 & 2047;
+ $18 = $17 | $16;
+ HEAP32[$13>>2] = $18;
+ $19 = $0;
+ $20 = $a;
+ _mrb_define_class_method($19,$20,68841,208,4096);
+ $21 = $0;
+ $22 = $a;
+ _mrb_define_method($21,$22,64315,209,262144);
+ $23 = $0;
+ $24 = $a;
+ _mrb_define_method($23,$24,68114,210,262144);
+ $25 = $0;
+ $26 = $a;
+ _mrb_define_method($25,$26,64339,211,262144);
+ $27 = $0;
+ $28 = $a;
+ _mrb_define_method($27,$28,68841,212,4096);
+ $29 = $0;
+ $30 = $a;
+ _mrb_define_method($29,$30,64349,213,4096);
+ $31 = $0;
+ $32 = $a;
+ _mrb_define_method($31,$32,64358,214,0);
+ $33 = $0;
+ $34 = $a;
+ _mrb_define_method($33,$34,64364,215,262144);
+ $35 = $0;
+ $36 = $a;
+ _mrb_define_method($35,$36,64371,216,262144);
+ $37 = $0;
+ $38 = $a;
+ _mrb_define_method($37,$38,64381,217,0);
+ $39 = $0;
+ $40 = $a;
+ _mrb_define_method($39,$40,68938,218,8192);
+ $41 = $0;
+ $42 = $a;
+ _mrb_define_method($41,$42,64411,219,262144);
+ $43 = $0;
+ $44 = $a;
+ _mrb_define_method($43,$44,68999,220,262144);
+ $45 = $0;
+ $46 = $a;
+ _mrb_define_method($45,$46,64419,221,4096);
+ $47 = $0;
+ $48 = $a;
+ _mrb_define_method($47,$48,68964,222,4096);
+ $49 = $0;
+ $50 = $a;
+ _mrb_define_method($49,$50,64428,223,0);
+ $51 = $0;
+ $52 = $a;
+ _mrb_define_method($51,$52,64435,224,0);
+ $53 = $0;
+ $54 = $a;
+ _mrb_define_method($53,$54,64439,211,4096);
+ $55 = $0;
+ $56 = $a;
+ _mrb_define_method($55,$56,64444,220,262144);
+ $57 = $0;
+ $58 = $a;
+ _mrb_define_method($57,$58,64452,225,0);
+ $59 = $0;
+ $60 = $a;
+ _mrb_define_method($59,$60,64460,226,0);
+ $61 = $0;
+ $62 = $a;
+ _mrb_define_method($61,$62,64469,227,262144);
+ $63 = $0;
+ $64 = $a;
+ _mrb_define_method($63,$64,64476,228,0);
+ $65 = $0;
+ $66 = $a;
+ _mrb_define_method($65,$66,64482,223,0);
+ $67 = $0;
+ $68 = $a;
+ _mrb_define_method($67,$68,64487,212,4096);
+ $69 = $0;
+ $70 = $a;
+ _mrb_define_method($69,$70,64493,229,4096);
+ $71 = $0;
+ $72 = $a;
+ _mrb_define_method($71,$72,64501,230,262144);
+ $73 = $0;
+ $74 = $a;
+ _mrb_define_method($73,$74,64510,231,262144);
+ $75 = $0;
+ $76 = $a;
+ _mrb_define_method($75,$76,64520,219,262144);
+ STACKTOP = sp;return;
+}
+function _mrb_ary_s_create($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $len = 0, $vals = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $vals = sp + 12|0;
+ $len = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $vals;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $len;
+ (_mrb_get_args($1,68114,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP32[$len>>2]|0;
+ $4 = HEAP32[$vals>>2]|0;
+ _mrb_ary_new_from_values($agg$result,$2,$3,$4);
+ STACKTOP = sp;return;
+}
+function _mrb_ary_plus($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $5 = 0;
+ var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a1 = 0, $a2 = 0, $blen = 0, $ptr = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $ptr = sp + 12|0;
+ $blen = sp + 8|0;
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $a1 = $1;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $ptr;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $blen;
+ (_mrb_get_args($2,64317,$vararg_buffer)|0);
+ $3 = HEAP32[$blen>>2]|0;
+ $4 = (536870911 - ($3))|0;
+ $5 = $a1;
+ $6 = ((($5)) + 12|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ($4|0)<($7|0);
+ $9 = $0;
+ if ($8) {
+  $10 = $0;
+  $11 = (_mrb_class_get($10,68855)|0);
+  _mrb_raise($9,$11,64205);
+  // unreachable;
+ } else {
+  $12 = $a1;
+  $13 = ((($12)) + 12|0);
+  $14 = HEAP32[$13>>2]|0;
+  $15 = HEAP32[$blen>>2]|0;
+  $16 = (($14) + ($15))|0;
+  $17 = (_ary_new_capa($9,$16)|0);
+  $a2 = $17;
+  $18 = $a2;
+  $19 = ((($18)) + 20|0);
+  $20 = HEAP32[$19>>2]|0;
+  $21 = $a1;
+  $22 = ((($21)) + 20|0);
+  $23 = HEAP32[$22>>2]|0;
+  $24 = $a1;
+  $25 = ((($24)) + 12|0);
+  $26 = HEAP32[$25>>2]|0;
+  _array_copy($20,$23,$26);
+  $27 = $a2;
+  $28 = ((($27)) + 20|0);
+  $29 = HEAP32[$28>>2]|0;
+  $30 = $a1;
+  $31 = ((($30)) + 12|0);
+  $32 = HEAP32[$31>>2]|0;
+  $33 = (($29) + ($32<<3)|0);
+  $34 = HEAP32[$ptr>>2]|0;
+  $35 = HEAP32[$blen>>2]|0;
+  _array_copy($33,$34,$35);
+  $36 = $a1;
+  $37 = ((($36)) + 12|0);
+  $38 = HEAP32[$37>>2]|0;
+  $39 = HEAP32[$blen>>2]|0;
+  $40 = (($38) + ($39))|0;
+  $41 = $a2;
+  $42 = ((($41)) + 12|0);
+  HEAP32[$42>>2] = $40;
+  $43 = $a2;
+  _mrb_obj_value_565($agg$result,$43);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_ary_times($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a1 = 0, $a2 = 0, $ptr = 0, $times = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $times = sp + 4|0;
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $a1 = $1;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $times;
+ (_mrb_get_args($2,64319,$vararg_buffer)|0);
+ $3 = HEAP32[$times>>2]|0;
+ $4 = ($3|0)<(0);
+ if ($4) {
+  $5 = $0;
+  $6 = $0;
+  $7 = (_mrb_class_get($6,68855)|0);
+  _mrb_raise($5,$7,64321);
+  // unreachable;
+ }
+ $8 = HEAP32[$times>>2]|0;
+ $9 = ($8|0)==(0);
+ if ($9) {
+  $10 = $0;
+  _mrb_ary_new($agg$result,$10);
+  STACKTOP = sp;return;
+ }
+ $11 = HEAP32[$times>>2]|0;
+ $12 = (536870911 / ($11|0))&-1;
+ $13 = $a1;
+ $14 = ((($13)) + 12|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = ($12|0)<($15|0);
+ $17 = $0;
+ if ($16) {
+  $18 = $0;
+  $19 = (_mrb_class_get($18,68855)|0);
+  _mrb_raise($17,$19,64205);
+  // unreachable;
+ }
+ $20 = $a1;
+ $21 = ((($20)) + 12|0);
+ $22 = HEAP32[$21>>2]|0;
+ $23 = HEAP32[$times>>2]|0;
+ $24 = Math_imul($22, $23)|0;
+ $25 = (_ary_new_capa($17,$24)|0);
+ $a2 = $25;
+ $26 = $a2;
+ $27 = ((($26)) + 20|0);
+ $28 = HEAP32[$27>>2]|0;
+ $ptr = $28;
+ while(1) {
+  $29 = HEAP32[$times>>2]|0;
+  $30 = (($29) + -1)|0;
+  HEAP32[$times>>2] = $30;
+  $31 = ($29|0)!=(0);
+  if (!($31)) {
+   break;
+  }
+  $32 = $ptr;
+  $33 = $a1;
+  $34 = ((($33)) + 20|0);
+  $35 = HEAP32[$34>>2]|0;
+  $36 = $a1;
+  $37 = ((($36)) + 12|0);
+  $38 = HEAP32[$37>>2]|0;
+  _array_copy($32,$35,$38);
+  $39 = $a1;
+  $40 = ((($39)) + 12|0);
+  $41 = HEAP32[$40>>2]|0;
+  $42 = $ptr;
+  $43 = (($42) + ($41<<3)|0);
+  $ptr = $43;
+  $44 = $a1;
+  $45 = ((($44)) + 12|0);
+  $46 = HEAP32[$45>>2]|0;
+  $47 = $a2;
+  $48 = ((($47)) + 12|0);
+  $49 = HEAP32[$48>>2]|0;
+  $50 = (($49) + ($46))|0;
+  HEAP32[$48>>2] = $50;
+ }
+ $51 = $a2;
+ _mrb_obj_value_565($agg$result,$51);
+ STACKTOP = sp;return;
+}
+function _mrb_ary_push_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $argv = 0, $len = 0, $self$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 32|0;
+ $self$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $argv = sp + 12|0;
+ $len = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $argv;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $len;
+ (_mrb_get_args($1,68114,$vararg_buffer)|0);
+ while(1) {
+  $2 = HEAP32[$len>>2]|0;
+  $3 = (($2) + -1)|0;
+  HEAP32[$len>>2] = $3;
+  $4 = ($2|0)!=(0);
+  if (!($4)) {
+   break;
+  }
+  $5 = $0;
+  $6 = HEAP32[$argv>>2]|0;
+  $7 = ((($6)) + 8|0);
+  HEAP32[$argv>>2] = $7;
+  ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$6+4>>2]|0;
+  _mrb_ary_push($5,$self$byval_copy,$$byval_copy);
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_ary_aget($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $a = 0, $i = 0, $index = 0, $index$byval_copy = 0, $index$byval_copy2 = 0, $index$byval_copy4 = 0, $len = 0, $self$byval_copy = 0, $self$byval_copy3 = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $index$byval_copy4 = sp + 64|0;
+ $self$byval_copy3 = sp + 56|0;
+ $index$byval_copy2 = sp + 48|0;
+ $self$byval_copy = sp + 40|0;
+ $index$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $i = sp + 20|0;
+ $len = sp + 16|0;
+ $index = sp + 8|0;
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $a = $1;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $index;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $len;
+ $3 = (_mrb_get_args($2,64342,$vararg_buffer)|0);
+ $4 = ($3|0)==(1);
+ if ($4) {
+  $5 = ((($index)) + 4|0);
+  $6 = HEAP32[$5>>2]|0;
+  switch ($6|0) {
+  case 17:  {
+   $7 = $0;
+   $8 = $a;
+   $9 = ((($8)) + 12|0);
+   $10 = HEAP32[$9>>2]|0;
+   ;HEAP32[$index$byval_copy>>2]=HEAP32[$index>>2]|0;HEAP32[$index$byval_copy+4>>2]=HEAP32[$index+4>>2]|0;
+   $11 = (_mrb_range_beg_len($7,$index$byval_copy,$i,$len,$10)|0);
+   $12 = ($11<<24>>24)!=(0);
+   if ($12) {
+    $13 = $0;
+    $14 = $a;
+    $15 = HEAP32[$i>>2]|0;
+    $16 = HEAP32[$len>>2]|0;
+    _ary_subseq($agg$result,$13,$14,$15,$16);
+    STACKTOP = sp;return;
+   } else {
+    _mrb_nil_value_576($agg$result);
+    STACKTOP = sp;return;
+   }
+   break;
+  }
+  case 3:  {
+   $17 = $0;
+   $18 = HEAP32[$index>>2]|0;
+   ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+   _mrb_ary_ref($agg$result,$17,$self$byval_copy,$18);
+   STACKTOP = sp;return;
+   break;
+  }
+  default: {
+   $19 = $0;
+   $20 = $0;
+   ;HEAP32[$index$byval_copy2>>2]=HEAP32[$index>>2]|0;HEAP32[$index$byval_copy2+4>>2]=HEAP32[$index+4>>2]|0;
+   $21 = (_aget_index($20,$index$byval_copy2)|0);
+   ;HEAP32[$self$byval_copy3>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy3+4>>2]=HEAP32[$self+4>>2]|0;
+   _mrb_ary_ref($agg$result,$19,$self$byval_copy3,$21);
+   STACKTOP = sp;return;
+  }
+  }
+ }
+ $22 = $0;
+ ;HEAP32[$index$byval_copy4>>2]=HEAP32[$index>>2]|0;HEAP32[$index$byval_copy4+4>>2]=HEAP32[$index+4>>2]|0;
+ $23 = (_aget_index($22,$index$byval_copy4)|0);
+ HEAP32[$i>>2] = $23;
+ $24 = HEAP32[$i>>2]|0;
+ $25 = ($24|0)<(0);
+ if ($25) {
+  $26 = $a;
+  $27 = ((($26)) + 12|0);
+  $28 = HEAP32[$27>>2]|0;
+  $29 = HEAP32[$i>>2]|0;
+  $30 = (($29) + ($28))|0;
+  HEAP32[$i>>2] = $30;
+ }
+ $31 = HEAP32[$i>>2]|0;
+ $32 = ($31|0)<(0);
+ if (!($32)) {
+  $33 = $a;
+  $34 = ((($33)) + 12|0);
+  $35 = HEAP32[$34>>2]|0;
+  $36 = HEAP32[$i>>2]|0;
+  $37 = ($35|0)<($36|0);
+  if (!($37)) {
+   $38 = HEAP32[$len>>2]|0;
+   $39 = ($38|0)<(0);
+   if ($39) {
+    _mrb_nil_value_576($agg$result);
+    STACKTOP = sp;return;
+   }
+   $40 = $a;
+   $41 = ((($40)) + 12|0);
+   $42 = HEAP32[$41>>2]|0;
+   $43 = HEAP32[$i>>2]|0;
+   $44 = ($42|0)==($43|0);
+   if ($44) {
+    $45 = $0;
+    _mrb_ary_new($agg$result,$45);
+    STACKTOP = sp;return;
+   }
+   $46 = HEAP32[$len>>2]|0;
+   $47 = $a;
+   $48 = ((($47)) + 12|0);
+   $49 = HEAP32[$48>>2]|0;
+   $50 = HEAP32[$i>>2]|0;
+   $51 = (($49) - ($50))|0;
+   $52 = ($46|0)>($51|0);
+   if ($52) {
+    $53 = $a;
+    $54 = ((($53)) + 12|0);
+    $55 = HEAP32[$54>>2]|0;
+    $56 = HEAP32[$i>>2]|0;
+    $57 = (($55) - ($56))|0;
+    HEAP32[$len>>2] = $57;
+   }
+   $58 = $0;
+   $59 = $a;
+   $60 = HEAP32[$i>>2]|0;
+   $61 = HEAP32[$len>>2]|0;
+   _ary_subseq($agg$result,$58,$59,$60,$61);
+   STACKTOP = sp;return;
+  }
+ }
+ _mrb_nil_value_576($agg$result);
+ STACKTOP = sp;return;
+}
+function _ary_subseq($agg$result,$mrb,$a,$beg,$len) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $a = $a|0;
+ $beg = $beg|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $b = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $a;
+ $2 = $beg;
+ $3 = $len;
+ $4 = $0;
+ $5 = $1;
+ _ary_make_shared($4,$5);
+ $6 = $0;
+ $7 = $0;
+ $8 = ((($7)) + 52|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = (_mrb_obj_alloc($6,14,$9)|0);
+ $b = $10;
+ $11 = $1;
+ $12 = ((($11)) + 20|0);
+ $13 = HEAP32[$12>>2]|0;
+ $14 = $2;
+ $15 = (($13) + ($14<<3)|0);
+ $16 = $b;
+ $17 = ((($16)) + 20|0);
+ HEAP32[$17>>2] = $15;
+ $18 = $3;
+ $19 = $b;
+ $20 = ((($19)) + 12|0);
+ HEAP32[$20>>2] = $18;
+ $21 = $1;
+ $22 = ((($21)) + 16|0);
+ $23 = HEAP32[$22>>2]|0;
+ $24 = $b;
+ $25 = ((($24)) + 16|0);
+ HEAP32[$25>>2] = $23;
+ $26 = $b;
+ $27 = ((($26)) + 16|0);
+ $28 = HEAP32[$27>>2]|0;
+ $29 = HEAP32[$28>>2]|0;
+ $30 = (($29) + 1)|0;
+ HEAP32[$28>>2] = $30;
+ $31 = $b;
+ $32 = HEAP32[$31>>2]|0;
+ $33 = $32 >>> 11;
+ $34 = $33 | 256;
+ $35 = HEAP32[$31>>2]|0;
+ $36 = $34 & 2097151;
+ $37 = $36 << 11;
+ $38 = $35 & 2047;
+ $39 = $38 | $37;
+ HEAP32[$31>>2] = $39;
+ $40 = $b;
+ _mrb_obj_value_565($agg$result,$40);
+ STACKTOP = sp;return;
+}
+function _aget_index($mrb,$index) {
+ $mrb = $mrb|0;
+ $index = $index|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0.0, $argc = 0, $argv = 0, $i = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $i = sp + 20|0;
+ $argc = sp + 16|0;
+ $argv = sp + 12|0;
+ $1 = $mrb;
+ $2 = ((($index)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)==(3);
+ if ($4) {
+  $5 = HEAP32[$index>>2]|0;
+  $0 = $5;
+  $13 = $0;
+  STACKTOP = sp;return ($13|0);
+ }
+ $6 = ((($index)) + 4|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ($7|0)==(6);
+ if ($8) {
+  $9 = +HEAPF32[$index>>2];
+  $10 = (~~(($9)));
+  $0 = $10;
+  $13 = $0;
+  STACKTOP = sp;return ($13|0);
+ } else {
+  $11 = $1;
+  HEAP32[$vararg_buffer>>2] = $i;
+  $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+  HEAP32[$vararg_ptr1>>2] = $argv;
+  $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+  HEAP32[$vararg_ptr2>>2] = $argc;
+  (_mrb_get_args($11,64346,$vararg_buffer)|0);
+  $12 = HEAP32[$i>>2]|0;
+  $0 = $12;
+  $13 = $0;
+  STACKTOP = sp;return ($13|0);
+ }
+ return (0)|0;
+}
+function _mrb_ary_aset($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $len = 0, $self$byval_copy = 0, $self$byval_copy10 = 0, $self$byval_copy3 = 0, $self$byval_copy6 = 0, $v1 = 0, $v1$byval_copy = 0, $v1$byval_copy5 = 0, $v1$byval_copy8 = 0, $v2 = 0, $v2$byval_copy = 0, $v2$byval_copy4 = 0;
+ var $v2$byval_copy7 = 0, $v2$byval_copy9 = 0, $v3 = 0, $v3$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 176|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v3$byval_copy = sp + 160|0;
+ $self$byval_copy10 = sp + 152|0;
+ $v2$byval_copy9 = sp + 144|0;
+ $v1$byval_copy8 = sp + 136|0;
+ $v2$byval_copy7 = sp + 128|0;
+ $self$byval_copy6 = sp + 120|0;
+ $v1$byval_copy5 = sp + 112|0;
+ $v2$byval_copy4 = sp + 104|0;
+ $self$byval_copy3 = sp + 96|0;
+ $v2$byval_copy = sp + 88|0;
+ $self$byval_copy = sp + 80|0;
+ $v1$byval_copy = sp + 72|0;
+ $vararg_buffer = sp;
+ $v1 = sp + 56|0;
+ $v2 = sp + 48|0;
+ $v3 = sp + 40|0;
+ $i = sp + 36|0;
+ $len = sp + 32|0;
+ $1 = sp + 24|0;
+ $2 = sp + 16|0;
+ $0 = $mrb;
+ $3 = $0;
+ HEAP32[$vararg_buffer>>2] = $v1;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $v2;
+ $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+ HEAP32[$vararg_ptr2>>2] = $v3;
+ $4 = (_mrb_get_args($3,64353,$vararg_buffer)|0);
+ $5 = ($4|0)==(2);
+ if (!($5)) {
+  $22 = $0;
+  $23 = $0;
+  ;HEAP32[$v1$byval_copy8>>2]=HEAP32[$v1>>2]|0;HEAP32[$v1$byval_copy8+4>>2]=HEAP32[$v1+4>>2]|0;
+  $24 = (_aget_index($23,$v1$byval_copy8)|0);
+  $25 = $0;
+  ;HEAP32[$v2$byval_copy9>>2]=HEAP32[$v2>>2]|0;HEAP32[$v2$byval_copy9+4>>2]=HEAP32[$v2+4>>2]|0;
+  $26 = (_aget_index($25,$v2$byval_copy9)|0);
+  ;HEAP32[$self$byval_copy10>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy10+4>>2]=HEAP32[$self+4>>2]|0;
+  ;HEAP32[$v3$byval_copy>>2]=HEAP32[$v3>>2]|0;HEAP32[$v3$byval_copy+4>>2]=HEAP32[$v3+4>>2]|0;
+  _mrb_ary_splice($2,$22,$self$byval_copy10,$24,$26,$v3$byval_copy);
+  ;HEAP32[$agg$result>>2]=HEAP32[$v3>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v3+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $6 = ((($v1)) + 4|0);
+ $7 = HEAP32[$6>>2]|0;
+ switch ($7|0) {
+ case 17:  {
+  $8 = $0;
+  $9 = HEAP32[$self>>2]|0;
+  $10 = ((($9)) + 12|0);
+  $11 = HEAP32[$10>>2]|0;
+  ;HEAP32[$v1$byval_copy>>2]=HEAP32[$v1>>2]|0;HEAP32[$v1$byval_copy+4>>2]=HEAP32[$v1+4>>2]|0;
+  $12 = (_mrb_range_beg_len($8,$v1$byval_copy,$i,$len,$11)|0);
+  $13 = ($12<<24>>24)!=(0);
+  if ($13) {
+   $14 = $0;
+   $15 = HEAP32[$i>>2]|0;
+   $16 = HEAP32[$len>>2]|0;
+   ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+   ;HEAP32[$v2$byval_copy>>2]=HEAP32[$v2>>2]|0;HEAP32[$v2$byval_copy+4>>2]=HEAP32[$v2+4>>2]|0;
+   _mrb_ary_splice($1,$14,$self$byval_copy,$15,$16,$v2$byval_copy);
+  }
+  break;
+ }
+ case 3:  {
+  $17 = $0;
+  $18 = HEAP32[$v1>>2]|0;
+  ;HEAP32[$self$byval_copy3>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy3+4>>2]=HEAP32[$self+4>>2]|0;
+  ;HEAP32[$v2$byval_copy4>>2]=HEAP32[$v2>>2]|0;HEAP32[$v2$byval_copy4+4>>2]=HEAP32[$v2+4>>2]|0;
+  _mrb_ary_set($17,$self$byval_copy3,$18,$v2$byval_copy4);
+  break;
+ }
+ default: {
+  $19 = $0;
+  $20 = $0;
+  ;HEAP32[$v1$byval_copy5>>2]=HEAP32[$v1>>2]|0;HEAP32[$v1$byval_copy5+4>>2]=HEAP32[$v1+4>>2]|0;
+  $21 = (_aget_index($20,$v1$byval_copy5)|0);
+  ;HEAP32[$self$byval_copy6>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy6+4>>2]=HEAP32[$self+4>>2]|0;
+  ;HEAP32[$v2$byval_copy7>>2]=HEAP32[$v2>>2]|0;HEAP32[$v2$byval_copy7+4>>2]=HEAP32[$v2+4>>2]|0;
+  _mrb_ary_set($19,$self$byval_copy6,$21,$v2$byval_copy7);
+ }
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$v2>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v2+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_ary_concat_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $blen = 0, $ptr = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $ptr = sp + 12|0;
+ $blen = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $ptr;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $blen;
+ (_mrb_get_args($1,64317,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP32[$self>>2]|0;
+ $4 = HEAP32[$ptr>>2]|0;
+ $5 = HEAP32[$blen>>2]|0;
+ _ary_concat($2,$3,$4,$5);
+ ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_ary_delete_at($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, $index = 0, $len = 0, $ptr = 0, $val = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $index = sp + 24|0;
+ $val = sp + 16|0;
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $a = $1;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $index;
+ (_mrb_get_args($2,64319,$vararg_buffer)|0);
+ $3 = HEAP32[$index>>2]|0;
+ $4 = ($3|0)<(0);
+ if ($4) {
+  $5 = $a;
+  $6 = ((($5)) + 12|0);
+  $7 = HEAP32[$6>>2]|0;
+  $8 = HEAP32[$index>>2]|0;
+  $9 = (($8) + ($7))|0;
+  HEAP32[$index>>2] = $9;
+ }
+ $10 = HEAP32[$index>>2]|0;
+ $11 = ($10|0)<(0);
+ if (!($11)) {
+  $12 = $a;
+  $13 = ((($12)) + 12|0);
+  $14 = HEAP32[$13>>2]|0;
+  $15 = HEAP32[$index>>2]|0;
+  $16 = ($14|0)<=($15|0);
+  if (!($16)) {
+   $17 = $0;
+   $18 = $a;
+   _ary_modify($17,$18);
+   $19 = HEAP32[$index>>2]|0;
+   $20 = $a;
+   $21 = ((($20)) + 20|0);
+   $22 = HEAP32[$21>>2]|0;
+   $23 = (($22) + ($19<<3)|0);
+   ;HEAP32[$val>>2]=HEAP32[$23>>2]|0;HEAP32[$val+4>>2]=HEAP32[$23+4>>2]|0;
+   $24 = $a;
+   $25 = ((($24)) + 20|0);
+   $26 = HEAP32[$25>>2]|0;
+   $27 = HEAP32[$index>>2]|0;
+   $28 = (($26) + ($27<<3)|0);
+   $ptr = $28;
+   $29 = $a;
+   $30 = ((($29)) + 12|0);
+   $31 = HEAP32[$30>>2]|0;
+   $32 = HEAP32[$index>>2]|0;
+   $33 = (($31) - ($32))|0;
+   $len = $33;
+   while(1) {
+    $34 = $len;
+    $35 = (($34) + -1)|0;
+    $len = $35;
+    $36 = ($35|0)!=(0);
+    if (!($36)) {
+     break;
+    }
+    $37 = $ptr;
+    $38 = $ptr;
+    $39 = ((($38)) + 8|0);
+    ;HEAP32[$37>>2]=HEAP32[$39>>2]|0;HEAP32[$37+4>>2]=HEAP32[$39+4>>2]|0;
+    $40 = $ptr;
+    $41 = ((($40)) + 8|0);
+    $ptr = $41;
+   }
+   $42 = $a;
+   $43 = ((($42)) + 12|0);
+   $44 = HEAP32[$43>>2]|0;
+   $45 = (($44) + -1)|0;
+   HEAP32[$43>>2] = $45;
+   $46 = $0;
+   $47 = $a;
+   _ary_shrink_capa($46,$47);
+   ;HEAP32[$agg$result>>2]=HEAP32[$val>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$val+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+ }
+ _mrb_nil_value_576($agg$result);
+ STACKTOP = sp;return;
+}
+function _mrb_ary_empty_p($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $a = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $a = $1;
+ $2 = $a;
+ $3 = ((($2)) + 12|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)==(0);
+ $6 = $5&1;
+ $7 = $6&255;
+ _mrb_bool_value_618($agg$result,$7);
+ STACKTOP = sp;return;
+}
+function _mrb_bool_value_618($agg$result,$boolean) {
+ $agg$result = $agg$result|0;
+ $boolean = $boolean|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $boolean;
+ $1 = $0;
+ $2 = $1&255;
+ $3 = ($2|0)!=(0);
+ $4 = $3 ? 2 : 0;
+ $5 = ((($v)) + 4|0);
+ HEAP32[$5>>2] = $4;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_ary_first($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, $size = 0, $vararg_buffer = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $size = sp + 4|0;
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $a = $1;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $size;
+ $3 = (_mrb_get_args($2,64388,$vararg_buffer)|0);
+ $4 = ($3|0)==(0);
+ if ($4) {
+  $5 = $a;
+  $6 = ((($5)) + 12|0);
+  $7 = HEAP32[$6>>2]|0;
+  $8 = ($7|0)>(0);
+  if ($8) {
+   $9 = $a;
+   $10 = ((($9)) + 20|0);
+   $11 = HEAP32[$10>>2]|0;
+   ;HEAP32[$agg$result>>2]=HEAP32[$11>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$11+4>>2]|0;
+   STACKTOP = sp;return;
+  } else {
+   _mrb_nil_value_576($agg$result);
+   STACKTOP = sp;return;
+  }
+ }
+ $12 = HEAP32[$size>>2]|0;
+ $13 = ($12|0)<(0);
+ if ($13) {
+  $14 = $0;
+  $15 = $0;
+  $16 = (_mrb_class_get($15,68855)|0);
+  _mrb_raise($14,$16,64391);
+  // unreachable;
+ }
+ $17 = HEAP32[$size>>2]|0;
+ $18 = $a;
+ $19 = ((($18)) + 12|0);
+ $20 = HEAP32[$19>>2]|0;
+ $21 = ($17|0)>($20|0);
+ if ($21) {
+  $22 = $a;
+  $23 = ((($22)) + 12|0);
+  $24 = HEAP32[$23>>2]|0;
+  HEAP32[$size>>2] = $24;
+ }
+ $25 = $a;
+ $26 = HEAP32[$25>>2]|0;
+ $27 = $26 >>> 11;
+ $28 = $27 & 256;
+ $29 = ($28|0)!=(0);
+ $30 = $0;
+ if ($29) {
+  $31 = $a;
+  $32 = HEAP32[$size>>2]|0;
+  _ary_subseq($agg$result,$30,$31,0,$32);
+  STACKTOP = sp;return;
+ } else {
+  $33 = HEAP32[$size>>2]|0;
+  $34 = $a;
+  $35 = ((($34)) + 20|0);
+  $36 = HEAP32[$35>>2]|0;
+  _mrb_ary_new_from_values($agg$result,$30,$33,$36);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_ary_index_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $obj = 0;
+ var $obj$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 32|0;
+ $$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $obj = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $obj;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $i = 0;
+ while(1) {
+  $2 = $i;
+  $3 = HEAP32[$self>>2]|0;
+  $4 = ((($3)) + 12|0);
+  $5 = HEAP32[$4>>2]|0;
+  $6 = ($2|0)<($5|0);
+  if (!($6)) {
+   label = 6;
+   break;
+  }
+  $7 = $0;
+  $8 = $i;
+  $9 = HEAP32[$self>>2]|0;
+  $10 = ((($9)) + 20|0);
+  $11 = HEAP32[$10>>2]|0;
+  $12 = (($11) + ($8<<3)|0);
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$12>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$12+4>>2]|0;
+  ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+  $13 = (_mrb_equal($7,$$byval_copy,$obj$byval_copy)|0);
+  $14 = ($13<<24>>24)!=(0);
+  $15 = $i;
+  if ($14) {
+   label = 4;
+   break;
+  }
+  $16 = (($15) + 1)|0;
+  $i = $16;
+ }
+ if ((label|0) == 4) {
+  _mrb_fixnum_value_593($agg$result,$15);
+  STACKTOP = sp;return;
+ }
+ else if ((label|0) == 6) {
+  _mrb_nil_value_576($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_ary_replace_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $other = 0, $other$byval_copy = 0, $self$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $other$byval_copy = sp + 32|0;
+ $self$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $other = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $other;
+ (_mrb_get_args($1,64417,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ ;HEAP32[$other$byval_copy>>2]=HEAP32[$other>>2]|0;HEAP32[$other$byval_copy+4>>2]=HEAP32[$other+4>>2]|0;
+ _mrb_ary_replace($2,$self$byval_copy,$other$byval_copy);
+ ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_ary_join_m($agg$result,$mrb,$ary) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $ary = $ary|0;
+ var $0 = 0, $1 = 0, $2 = 0, $ary$byval_copy = 0, $sep = 0, $sep$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $sep$byval_copy = sp + 32|0;
+ $ary$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $sep = sp + 8|0;
+ $0 = $mrb;
+ _mrb_nil_value_576($sep);
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $sep;
+ (_mrb_get_args($1,64424,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$ary$byval_copy>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy+4>>2]=HEAP32[$ary+4>>2]|0;
+ ;HEAP32[$sep$byval_copy>>2]=HEAP32[$sep>>2]|0;HEAP32[$sep$byval_copy+4>>2]=HEAP32[$sep+4>>2]|0;
+ _mrb_ary_join($agg$result,$2,$ary$byval_copy,$sep$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_ary_last($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, $or$cond = 0, $size = 0, $vararg_buffer = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $size = sp + 4|0;
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $a = $1;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $size;
+ $3 = (_mrb_get_args($2,64388,$vararg_buffer)|0);
+ $4 = ($3|0)==(0);
+ if ($4) {
+  $5 = $a;
+  $6 = ((($5)) + 12|0);
+  $7 = HEAP32[$6>>2]|0;
+  $8 = ($7|0)>(0);
+  if ($8) {
+   $9 = $a;
+   $10 = ((($9)) + 12|0);
+   $11 = HEAP32[$10>>2]|0;
+   $12 = (($11) - 1)|0;
+   $13 = $a;
+   $14 = ((($13)) + 20|0);
+   $15 = HEAP32[$14>>2]|0;
+   $16 = (($15) + ($12<<3)|0);
+   ;HEAP32[$agg$result>>2]=HEAP32[$16>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$16+4>>2]|0;
+   STACKTOP = sp;return;
+  } else {
+   _mrb_nil_value_576($agg$result);
+   STACKTOP = sp;return;
+  }
+ }
+ $17 = HEAP32[$size>>2]|0;
+ $18 = ($17|0)<(0);
+ if ($18) {
+  $19 = $0;
+  $20 = $0;
+  $21 = (_mrb_class_get($20,68855)|0);
+  _mrb_raise($19,$21,64391);
+  // unreachable;
+ }
+ $22 = HEAP32[$size>>2]|0;
+ $23 = $a;
+ $24 = ((($23)) + 12|0);
+ $25 = HEAP32[$24>>2]|0;
+ $26 = ($22|0)>($25|0);
+ if ($26) {
+  $27 = $a;
+  $28 = ((($27)) + 12|0);
+  $29 = HEAP32[$28>>2]|0;
+  HEAP32[$size>>2] = $29;
+ }
+ $30 = $a;
+ $31 = HEAP32[$30>>2]|0;
+ $32 = $31 >>> 11;
+ $33 = $32 & 256;
+ $34 = ($33|0)!=(0);
+ $35 = HEAP32[$size>>2]|0;
+ $36 = ($35|0)>(4);
+ $or$cond = $34 | $36;
+ $37 = $0;
+ if ($or$cond) {
+  $38 = $a;
+  $39 = $a;
+  $40 = ((($39)) + 12|0);
+  $41 = HEAP32[$40>>2]|0;
+  $42 = HEAP32[$size>>2]|0;
+  $43 = (($41) - ($42))|0;
+  $44 = HEAP32[$size>>2]|0;
+  _ary_subseq($agg$result,$37,$38,$43,$44);
+  STACKTOP = sp;return;
+ } else {
+  $45 = HEAP32[$size>>2]|0;
+  $46 = $a;
+  $47 = ((($46)) + 20|0);
+  $48 = HEAP32[$47>>2]|0;
+  $49 = $a;
+  $50 = ((($49)) + 12|0);
+  $51 = HEAP32[$50>>2]|0;
+  $52 = (($48) + ($51<<3)|0);
+  $53 = HEAP32[$size>>2]|0;
+  $54 = (0 - ($53))|0;
+  $55 = (($52) + ($54<<3)|0);
+  _mrb_ary_new_from_values($agg$result,$37,$45,$55);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_ary_size($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $a = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $a = $1;
+ $2 = $a;
+ $3 = ((($2)) + 12|0);
+ $4 = HEAP32[$3>>2]|0;
+ _mrb_fixnum_value_593($agg$result,$4);
+ STACKTOP = sp;return;
+}
+function _mrb_ary_reverse($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var $a = 0, $b = 0, $e = 0, $p1 = 0, $p2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $a = $1;
+ $2 = $0;
+ $3 = $a;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = (_ary_new_capa($2,$5)|0);
+ $b = $6;
+ $7 = $a;
+ $8 = ((($7)) + 12|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ($9|0)>(0);
+ if (!($10)) {
+  $39 = $b;
+  _mrb_obj_value_565($agg$result,$39);
+  STACKTOP = sp;return;
+ }
+ $11 = $a;
+ $12 = ((($11)) + 20|0);
+ $13 = HEAP32[$12>>2]|0;
+ $p1 = $13;
+ $14 = $p1;
+ $15 = $a;
+ $16 = ((($15)) + 12|0);
+ $17 = HEAP32[$16>>2]|0;
+ $18 = (($14) + ($17<<3)|0);
+ $e = $18;
+ $19 = $b;
+ $20 = ((($19)) + 20|0);
+ $21 = HEAP32[$20>>2]|0;
+ $22 = $a;
+ $23 = ((($22)) + 12|0);
+ $24 = HEAP32[$23>>2]|0;
+ $25 = (($21) + ($24<<3)|0);
+ $26 = ((($25)) + -8|0);
+ $p2 = $26;
+ while(1) {
+  $27 = $p1;
+  $28 = $e;
+  $29 = ($27>>>0)<($28>>>0);
+  if (!($29)) {
+   break;
+  }
+  $30 = $p2;
+  $31 = ((($30)) + -8|0);
+  $p2 = $31;
+  $32 = $p1;
+  $33 = ((($32)) + 8|0);
+  $p1 = $33;
+  ;HEAP32[$30>>2]=HEAP32[$32>>2]|0;HEAP32[$30+4>>2]=HEAP32[$32+4>>2]|0;
+ }
+ $34 = $a;
+ $35 = ((($34)) + 12|0);
+ $36 = HEAP32[$35>>2]|0;
+ $37 = $b;
+ $38 = ((($37)) + 12|0);
+ HEAP32[$38>>2] = $36;
+ $39 = $b;
+ _mrb_obj_value_565($agg$result,$39);
+ STACKTOP = sp;return;
+}
+function _mrb_ary_reverse_bang($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, $p1 = 0, $p2 = 0, $tmp = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $tmp = sp;
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $a = $1;
+ $2 = $a;
+ $3 = ((($2)) + 12|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)>(1);
+ if (!($5)) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $6 = $0;
+ $7 = $a;
+ _ary_modify($6,$7);
+ $8 = $a;
+ $9 = ((($8)) + 20|0);
+ $10 = HEAP32[$9>>2]|0;
+ $p1 = $10;
+ $11 = $a;
+ $12 = ((($11)) + 20|0);
+ $13 = HEAP32[$12>>2]|0;
+ $14 = $a;
+ $15 = ((($14)) + 12|0);
+ $16 = HEAP32[$15>>2]|0;
+ $17 = (($13) + ($16<<3)|0);
+ $18 = ((($17)) + -8|0);
+ $p2 = $18;
+ while(1) {
+  $19 = $p1;
+  $20 = $p2;
+  $21 = ($19>>>0)<($20>>>0);
+  if (!($21)) {
+   break;
+  }
+  $22 = $p1;
+  ;HEAP32[$tmp>>2]=HEAP32[$22>>2]|0;HEAP32[$tmp+4>>2]=HEAP32[$22+4>>2]|0;
+  $23 = $p1;
+  $24 = ((($23)) + 8|0);
+  $p1 = $24;
+  $25 = $p2;
+  ;HEAP32[$23>>2]=HEAP32[$25>>2]|0;HEAP32[$23+4>>2]=HEAP32[$25+4>>2]|0;
+  $26 = $p2;
+  $27 = ((($26)) + -8|0);
+  $p2 = $27;
+  ;HEAP32[$26>>2]=HEAP32[$tmp>>2]|0;HEAP32[$26+4>>2]=HEAP32[$tmp+4>>2]|0;
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_ary_rindex_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0;
+ var $obj = 0, $obj$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 32|0;
+ $$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $obj = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $obj;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = HEAP32[$self>>2]|0;
+ $3 = ((($2)) + 12|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = (($4) - 1)|0;
+ $i = $5;
+ while(1) {
+  $6 = $i;
+  $7 = ($6|0)>=(0);
+  if (!($7)) {
+   label = 6;
+   break;
+  }
+  $8 = $0;
+  $9 = $i;
+  $10 = HEAP32[$self>>2]|0;
+  $11 = ((($10)) + 20|0);
+  $12 = HEAP32[$11>>2]|0;
+  $13 = (($12) + ($9<<3)|0);
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$13>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$13+4>>2]|0;
+  ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+  $14 = (_mrb_equal($8,$$byval_copy,$obj$byval_copy)|0);
+  $15 = ($14<<24>>24)!=(0);
+  $16 = $i;
+  if ($15) {
+   label = 4;
+   break;
+  }
+  $17 = (($16) + -1)|0;
+  $i = $17;
+ }
+ if ((label|0) == 4) {
+  _mrb_fixnum_value_593($agg$result,$16);
+  STACKTOP = sp;return;
+ }
+ else if ((label|0) == 6) {
+  _mrb_nil_value_576($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_ary_unshift_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
+ var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $9 = 0, $a = 0, $len = 0, $vals = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $vals = sp + 12|0;
+ $len = sp + 8|0;
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $a = $1;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $vals;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $len;
+ (_mrb_get_args($2,68114,$vararg_buffer)|0);
+ $3 = $a;
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $4 >>> 11;
+ $6 = $5 & 256;
+ $7 = ($6|0)!=(0);
+ if ($7) {
+  $8 = $a;
+  $9 = ((($8)) + 16|0);
+  $10 = HEAP32[$9>>2]|0;
+  $11 = HEAP32[$10>>2]|0;
+  $12 = ($11|0)==(1);
+  if ($12) {
+   $13 = $a;
+   $14 = ((($13)) + 20|0);
+   $15 = HEAP32[$14>>2]|0;
+   $16 = $a;
+   $17 = ((($16)) + 16|0);
+   $18 = HEAP32[$17>>2]|0;
+   $19 = ((($18)) + 8|0);
+   $20 = HEAP32[$19>>2]|0;
+   $21 = $15;
+   $22 = $20;
+   $23 = (($21) - ($22))|0;
+   $24 = (($23|0) / 8)&-1;
+   $25 = HEAP32[$len>>2]|0;
+   $26 = ($24|0)>=($25|0);
+   if ($26) {
+    $27 = HEAP32[$len>>2]|0;
+    $28 = $a;
+    $29 = ((($28)) + 20|0);
+    $30 = HEAP32[$29>>2]|0;
+    $31 = (0 - ($27))|0;
+    $32 = (($30) + ($31<<3)|0);
+    HEAP32[$29>>2] = $32;
+   } else {
+    label = 5;
+   }
+  } else {
+   label = 5;
+  }
+ } else {
+  label = 5;
+ }
+ if ((label|0) == 5) {
+  $33 = $0;
+  $34 = $a;
+  _ary_modify($33,$34);
+  $35 = HEAP32[$len>>2]|0;
+  $36 = ($35|0)==(0);
+  if ($36) {
+   ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+  $37 = $a;
+  $38 = ((($37)) + 16|0);
+  $39 = HEAP32[$38>>2]|0;
+  $40 = $a;
+  $41 = ((($40)) + 12|0);
+  $42 = HEAP32[$41>>2]|0;
+  $43 = HEAP32[$len>>2]|0;
+  $44 = (($42) + ($43))|0;
+  $45 = ($39|0)<($44|0);
+  if ($45) {
+   $46 = $0;
+   $47 = $a;
+   $48 = $a;
+   $49 = ((($48)) + 12|0);
+   $50 = HEAP32[$49>>2]|0;
+   $51 = HEAP32[$len>>2]|0;
+   $52 = (($50) + ($51))|0;
+   _ary_expand_capa($46,$47,$52);
+  }
+  $53 = $a;
+  $54 = ((($53)) + 20|0);
+  $55 = HEAP32[$54>>2]|0;
+  $56 = HEAP32[$len>>2]|0;
+  $57 = (($55) + ($56<<3)|0);
+  $58 = $a;
+  $59 = ((($58)) + 20|0);
+  $60 = HEAP32[$59>>2]|0;
+  $61 = $a;
+  $62 = ((($61)) + 12|0);
+  $63 = HEAP32[$62>>2]|0;
+  _value_move_587($57,$60,$63);
+ }
+ $64 = $a;
+ $65 = ((($64)) + 20|0);
+ $66 = HEAP32[$65>>2]|0;
+ $67 = HEAP32[$vals>>2]|0;
+ $68 = HEAP32[$len>>2]|0;
+ _array_copy($66,$67,$68);
+ $69 = HEAP32[$len>>2]|0;
+ $70 = $a;
+ $71 = ((($70)) + 12|0);
+ $72 = HEAP32[$71>>2]|0;
+ $73 = (($72) + ($69))|0;
+ HEAP32[$71>>2] = $73;
+ while(1) {
+  $74 = HEAP32[$len>>2]|0;
+  $75 = (($74) + -1)|0;
+  HEAP32[$len>>2] = $75;
+  $76 = ($74|0)!=(0);
+  if (!($76)) {
+   break;
+  }
+  $77 = HEAP32[$len>>2]|0;
+  $78 = HEAP32[$vals>>2]|0;
+  $79 = (($78) + ($77<<3)|0);
+  $80 = ((($79)) + 4|0);
+  $81 = HEAP32[$80>>2]|0;
+  $82 = ($81>>>0)<(8);
+  if ($82) {
+   continue;
+  }
+  $83 = $0;
+  $84 = $a;
+  $85 = HEAP32[$len>>2]|0;
+  $86 = HEAP32[$vals>>2]|0;
+  $87 = (($86) + ($85<<3)|0);
+  $88 = HEAP32[$87>>2]|0;
+  _mrb_field_write_barrier($83,$84,$88);
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_ary_eq($agg$result,$mrb,$ary1) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $ary1 = $ary1|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ary1$byval_copy = 0, $ary2 = 0, $ary2$byval_copy = 0, $vararg_buffer = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $ary2$byval_copy = sp + 32|0;
+ $ary1$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $ary2 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $ary2;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$ary1$byval_copy>>2]=HEAP32[$ary1>>2]|0;HEAP32[$ary1$byval_copy+4>>2]=HEAP32[$ary1+4>>2]|0;
+ ;HEAP32[$ary2$byval_copy>>2]=HEAP32[$ary2>>2]|0;HEAP32[$ary2$byval_copy+4>>2]=HEAP32[$ary2+4>>2]|0;
+ $3 = (_mrb_obj_equal($2,$ary1$byval_copy,$ary2$byval_copy)|0);
+ $4 = ($3<<24>>24)!=(0);
+ if ($4) {
+  _mrb_true_value_641($agg$result);
+  STACKTOP = sp;return;
+ }
+ $5 = ((($ary2)) + 4|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = ($6|0)==(14);
+ if (!($7)) {
+  _mrb_false_value_642($agg$result);
+  STACKTOP = sp;return;
+ }
+ $8 = HEAP32[$ary1>>2]|0;
+ $9 = ((($8)) + 12|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = HEAP32[$ary2>>2]|0;
+ $12 = ((($11)) + 12|0);
+ $13 = HEAP32[$12>>2]|0;
+ $14 = ($10|0)!=($13|0);
+ if ($14) {
+  _mrb_false_value_642($agg$result);
+  STACKTOP = sp;return;
+ } else {
+  ;HEAP32[$agg$result>>2]=HEAP32[$ary2>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$ary2+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_true_value_641($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 2;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_false_value_642($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_ary_cmp($agg$result,$mrb,$ary1) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $ary1 = $ary1|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $ary1$byval_copy = 0, $ary2 = 0, $ary2$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $ary2$byval_copy = sp + 32|0;
+ $ary1$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $ary2 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $ary2;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$ary1$byval_copy>>2]=HEAP32[$ary1>>2]|0;HEAP32[$ary1$byval_copy+4>>2]=HEAP32[$ary1+4>>2]|0;
+ ;HEAP32[$ary2$byval_copy>>2]=HEAP32[$ary2>>2]|0;HEAP32[$ary2$byval_copy+4>>2]=HEAP32[$ary2+4>>2]|0;
+ $3 = (_mrb_obj_equal($2,$ary1$byval_copy,$ary2$byval_copy)|0);
+ $4 = ($3<<24>>24)!=(0);
+ if ($4) {
+  _mrb_fixnum_value_593($agg$result,0);
+  STACKTOP = sp;return;
+ }
+ $5 = ((($ary2)) + 4|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = ($6|0)==(14);
+ if ($7) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$ary2>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$ary2+4>>2]|0;
+  STACKTOP = sp;return;
+ } else {
+  _mrb_nil_value_576($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_obj_value_647($agg$result,$p) {
+ $agg$result = $agg$result|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $p;
+ $1 = $0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 & 255;
+ $4 = ((($v)) + 4|0);
+ HEAP32[$4>>2] = $3;
+ $5 = $0;
+ HEAP32[$v>>2] = $5;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _exc_output_backtrace($mrb,$exc,$func,$stream) {
+ $mrb = $mrb|0;
+ $exc = $exc|0;
+ $func = $func|0;
+ $stream = $stream|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $code = 0, $lastpc = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $lastpc = sp + 24|0;
+ $4 = sp + 8|0;
+ $5 = sp;
+ $0 = $mrb;
+ $1 = $exc;
+ $2 = $func;
+ $3 = $stream;
+ $6 = $0;
+ $7 = $1;
+ $8 = $0;
+ $9 = (_mrb_intern_static($8,67980,6)|0);
+ _mrb_obj_iv_get($4,$6,$7,$9);
+ ;HEAP32[$lastpc>>2]=HEAP32[$4>>2]|0;HEAP32[$lastpc+4>>2]=HEAP32[$4+4>>2]|0;
+ $10 = ((($lastpc)) + 4|0);
+ $11 = HEAP32[$10>>2]|0;
+ $12 = ($11|0)==(0);
+ if ($12) {
+  $13 = HEAP32[$lastpc>>2]|0;
+  $14 = ($13|0)!=(0);
+  if ($14) {
+   label = 4;
+  } else {
+   $code = 0;
+  }
+ } else {
+  label = 4;
+ }
+ if ((label|0) == 4) {
+  $15 = HEAP32[$lastpc>>2]|0;
+  $code = $15;
+ }
+ $16 = $0;
+ $17 = $0;
+ $18 = $1;
+ $19 = $0;
+ $20 = (_mrb_intern_static($19,67505,5)|0);
+ _mrb_obj_iv_get($5,$17,$18,$20);
+ $21 = HEAP32[$5>>2]|0;
+ $22 = $code;
+ $23 = $2;
+ $24 = $3;
+ _output_backtrace($16,$21,$22,$23,$24);
+ STACKTOP = sp;return;
+}
+function _output_backtrace($mrb,$ciidx,$pc0,$func,$data) {
+ $mrb = $mrb|0;
+ $ciidx = $ciidx|0;
+ $pc0 = $pc0|0;
+ $func = $func|0;
+ $data = $data|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0;
+ var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0;
+ var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0;
+ var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0;
+ var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $ci = 0;
+ var $i = 0, $irep = 0, $loc = 0, $pc = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $loc = sp + 16|0;
+ $0 = $mrb;
+ $1 = $ciidx;
+ $2 = $pc0;
+ $3 = $func;
+ $4 = $data;
+ $5 = $1;
+ $6 = $0;
+ $7 = ((($6)) + 12|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ((($8)) + 24|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = $0;
+ $12 = ((($11)) + 12|0);
+ $13 = HEAP32[$12>>2]|0;
+ $14 = ((($13)) + 20|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = $10;
+ $17 = $15;
+ $18 = (($16) - ($17))|0;
+ $19 = (($18|0) / 48)&-1;
+ $20 = ($5|0)>=($19|0);
+ if ($20) {
+  $1 = 10;
+ }
+ $21 = $1;
+ $i = $21;
+ while(1) {
+  $22 = $i;
+  $23 = ($22|0)>=(0);
+  if (!($23)) {
+   break;
+  }
+  $24 = $i;
+  $25 = $0;
+  $26 = ((($25)) + 12|0);
+  $27 = HEAP32[$26>>2]|0;
+  $28 = ((($27)) + 20|0);
+  $29 = HEAP32[$28>>2]|0;
+  $30 = (($29) + (($24*48)|0)|0);
+  $ci = $30;
+  $31 = $ci;
+  $32 = ((($31)) + 4|0);
+  $33 = HEAP32[$32>>2]|0;
+  $34 = ($33|0)!=(0|0);
+  if ($34) {
+   $35 = $ci;
+   $36 = ((($35)) + 4|0);
+   $37 = HEAP32[$36>>2]|0;
+   $38 = HEAP32[$37>>2]|0;
+   $39 = $38 >>> 11;
+   $40 = $39 & 128;
+   $41 = ($40|0)!=(0);
+   if (!($41)) {
+    $42 = $ci;
+    $43 = ((($42)) + 4|0);
+    $44 = HEAP32[$43>>2]|0;
+    $45 = ((($44)) + 12|0);
+    $46 = HEAP32[$45>>2]|0;
+    $irep = $46;
+    $47 = $i;
+    $48 = $0;
+    $49 = ((($48)) + 12|0);
+    $50 = HEAP32[$49>>2]|0;
+    $51 = ((($50)) + 20|0);
+    $52 = HEAP32[$51>>2]|0;
+    $53 = (($52) + (($47*48)|0)|0);
+    $54 = ((($53)) + 32|0);
+    $55 = HEAP32[$54>>2]|0;
+    $56 = ($55|0)!=(0|0);
+    $57 = $i;
+    do {
+     if ($56) {
+      $58 = $0;
+      $59 = ((($58)) + 12|0);
+      $60 = HEAP32[$59>>2]|0;
+      $61 = ((($60)) + 20|0);
+      $62 = HEAP32[$61>>2]|0;
+      $63 = (($62) + (($57*48)|0)|0);
+      $64 = ((($63)) + 32|0);
+      $65 = HEAP32[$64>>2]|0;
+      $pc = $65;
+     } else {
+      $66 = (($57) + 1)|0;
+      $67 = $1;
+      $68 = ($66|0)<=($67|0);
+      if ($68) {
+       $69 = $i;
+       $70 = (($69) + 1)|0;
+       $71 = $0;
+       $72 = ((($71)) + 12|0);
+       $73 = HEAP32[$72>>2]|0;
+       $74 = ((($73)) + 20|0);
+       $75 = HEAP32[$74>>2]|0;
+       $76 = (($75) + (($70*48)|0)|0);
+       $77 = ((($76)) + 28|0);
+       $78 = HEAP32[$77>>2]|0;
+       $79 = ((($78)) + -4|0);
+       $pc = $79;
+       break;
+      } else {
+       $80 = $2;
+       $pc = $80;
+       break;
+      }
+     }
+    } while(0);
+    $81 = $irep;
+    $82 = $pc;
+    $83 = $irep;
+    $84 = ((($83)) + 8|0);
+    $85 = HEAP32[$84>>2]|0;
+    $86 = $82;
+    $87 = $85;
+    $88 = (($86) - ($87))|0;
+    $89 = (($88|0) / 4)&-1;
+    $90 = (_mrb_debug_get_filename($81,$89)|0);
+    $91 = ((($loc)) + 8|0);
+    HEAP32[$91>>2] = $90;
+    $92 = $irep;
+    $93 = $pc;
+    $94 = $irep;
+    $95 = ((($94)) + 8|0);
+    $96 = HEAP32[$95>>2]|0;
+    $97 = $93;
+    $98 = $96;
+    $99 = (($97) - ($98))|0;
+    $100 = (($99|0) / 4)&-1;
+    $101 = (_mrb_debug_get_line($92,$100)|0);
+    $102 = ((($loc)) + 4|0);
+    HEAP32[$102>>2] = $101;
+    $103 = ((($loc)) + 4|0);
+    $104 = HEAP32[$103>>2]|0;
+    $105 = ($104|0)==(-1);
+    if (!($105)) {
+     $106 = $ci;
+     $107 = ((($106)) + 44|0);
+     $108 = HEAP32[$107>>2]|0;
+     $109 = $ci;
+     $110 = ((($109)) + 4|0);
+     $111 = HEAP32[$110>>2]|0;
+     $112 = ((($111)) + 16|0);
+     $113 = HEAP32[$112>>2]|0;
+     $114 = ($108|0)==($113|0);
+     $115 = ((($loc)) + 16|0);
+     if ($114) {
+      HEAP32[$115>>2] = 72376;
+     } else {
+      HEAP32[$115>>2] = 64532;
+     }
+     $116 = ((($loc)) + 8|0);
+     $117 = HEAP32[$116>>2]|0;
+     $118 = ($117|0)!=(0|0);
+     if (!($118)) {
+      $119 = ((($loc)) + 8|0);
+      HEAP32[$119>>2] = 64534;
+     }
+     $120 = $0;
+     $121 = $ci;
+     $122 = HEAP32[$121>>2]|0;
+     $123 = (_mrb_sym2name($120,$122)|0);
+     $124 = ((($loc)) + 12|0);
+     HEAP32[$124>>2] = $123;
+     $125 = $0;
+     $126 = $ci;
+     $127 = ((($126)) + 4|0);
+     $128 = HEAP32[$127>>2]|0;
+     $129 = ((($128)) + 16|0);
+     $130 = HEAP32[$129>>2]|0;
+     $131 = (_mrb_class_name($125,$130)|0);
+     $132 = ((($loc)) + 20|0);
+     HEAP32[$132>>2] = $131;
+     $133 = $i;
+     HEAP32[$loc>>2] = $133;
+     $134 = $3;
+     $135 = $0;
+     $136 = $4;
+     FUNCTION_TABLE_viii[$134 & 511]($135,$loc,$136);
+    }
+   }
+  }
+  $137 = $i;
+  $138 = (($137) + -1)|0;
+  $i = $138;
+ }
+ STACKTOP = sp;return;
+}
+function _mrb_exc_backtrace($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $ary = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $ary = sp + 8|0;
+ $1 = sp;
+ $0 = $mrb;
+ $2 = $0;
+ _mrb_ary_new($1,$2);
+ ;HEAP32[$ary>>2]=HEAP32[$1>>2]|0;HEAP32[$ary+4>>2]=HEAP32[$1+4>>2]|0;
+ $3 = $0;
+ $4 = HEAP32[$self>>2]|0;
+ $5 = HEAP32[$ary>>2]|0;
+ _exc_output_backtrace($3,$4,232,$5);
+ ;HEAP32[$agg$result>>2]=HEAP32[$ary>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$ary+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _get_backtrace_i($mrb,$loc,$data) {
+ $mrb = $mrb|0;
+ $loc = $loc|0;
+ $data = $data|0;
+ var $$byval_copy = 0, $$byval_copy2 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
+ var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ai = 0, $ary = 0, $ary$byval_copy = 0, $str = 0, $str$byval_copy = 0, $str$byval_copy1 = 0, $str$byval_copy3 = 0, $str$byval_copy4 = 0, $str$byval_copy5 = 0;
+ var $str$byval_copy6 = 0, $str$byval_copy7 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 192|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy7 = sp + 184|0;
+ $ary$byval_copy = sp + 176|0;
+ $str$byval_copy6 = sp + 168|0;
+ $str$byval_copy5 = sp + 160|0;
+ $str$byval_copy4 = sp + 152|0;
+ $str$byval_copy3 = sp + 144|0;
+ $$byval_copy2 = sp + 136|0;
+ $str$byval_copy1 = sp + 128|0;
+ $$byval_copy = sp + 120|0;
+ $str$byval_copy = sp + 112|0;
+ $ary = sp + 88|0;
+ $str = sp + 80|0;
+ $3 = sp + 64|0;
+ $4 = sp + 56|0;
+ $5 = sp + 48|0;
+ $6 = sp + 40|0;
+ $7 = sp + 32|0;
+ $8 = sp + 24|0;
+ $9 = sp + 16|0;
+ $10 = sp + 8|0;
+ $11 = sp;
+ $0 = $mrb;
+ $1 = $loc;
+ $2 = $data;
+ $12 = $0;
+ $13 = (_mrb_gc_arena_save($12)|0);
+ $ai = $13;
+ $14 = $2;
+ _mrb_obj_value_647($3,$14);
+ ;HEAP32[$ary>>2]=HEAP32[$3>>2]|0;HEAP32[$ary+4>>2]=HEAP32[$3+4>>2]|0;
+ $15 = $0;
+ $16 = $1;
+ $17 = ((($16)) + 8|0);
+ $18 = HEAP32[$17>>2]|0;
+ _mrb_str_new_cstr($4,$15,$18);
+ ;HEAP32[$str>>2]=HEAP32[$4>>2]|0;HEAP32[$str+4>>2]=HEAP32[$4+4>>2]|0;
+ $19 = $0;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_cat($5,$19,$str$byval_copy,67713,1);
+ $20 = $0;
+ $21 = $0;
+ $22 = $1;
+ $23 = ((($22)) + 4|0);
+ $24 = HEAP32[$23>>2]|0;
+ _mrb_fixnum_value_660($7,$24);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$7+4>>2]|0;
+ _mrb_fixnum_to_str($6,$21,$$byval_copy,10);
+ ;HEAP32[$str$byval_copy1>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy1+4>>2]=HEAP32[$str+4>>2]|0;
+ ;HEAP32[$$byval_copy2>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$6+4>>2]|0;
+ _mrb_str_concat($20,$str$byval_copy1,$$byval_copy2);
+ $25 = $1;
+ $26 = ((($25)) + 12|0);
+ $27 = HEAP32[$26>>2]|0;
+ $28 = ($27|0)!=(0|0);
+ if (!($28)) {
+  $46 = $0;
+  ;HEAP32[$ary$byval_copy>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy+4>>2]=HEAP32[$ary+4>>2]|0;
+  ;HEAP32[$str$byval_copy7>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy7+4>>2]=HEAP32[$str+4>>2]|0;
+  _mrb_ary_push($46,$ary$byval_copy,$str$byval_copy7);
+  $47 = $0;
+  $48 = $ai;
+  _mrb_gc_arena_restore($47,$48);
+  STACKTOP = sp;return;
+ }
+ $29 = $0;
+ ;HEAP32[$str$byval_copy3>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy3+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_cat($8,$29,$str$byval_copy3,64544,4);
+ $30 = $1;
+ $31 = ((($30)) + 20|0);
+ $32 = HEAP32[$31>>2]|0;
+ $33 = ($32|0)!=(0|0);
+ if ($33) {
+  $34 = $0;
+  $35 = $1;
+  $36 = ((($35)) + 20|0);
+  $37 = HEAP32[$36>>2]|0;
+  ;HEAP32[$str$byval_copy4>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy4+4>>2]=HEAP32[$str+4>>2]|0;
+  _mrb_str_cat_cstr($9,$34,$str$byval_copy4,$37);
+  $38 = $0;
+  $39 = $1;
+  $40 = ((($39)) + 16|0);
+  $41 = HEAP32[$40>>2]|0;
+  ;HEAP32[$str$byval_copy5>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy5+4>>2]=HEAP32[$str+4>>2]|0;
+  _mrb_str_cat_cstr($10,$38,$str$byval_copy5,$41);
+ }
+ $42 = $0;
+ $43 = $1;
+ $44 = ((($43)) + 12|0);
+ $45 = HEAP32[$44>>2]|0;
+ ;HEAP32[$str$byval_copy6>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy6+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_cat_cstr($11,$42,$str$byval_copy6,$45);
+ $46 = $0;
+ ;HEAP32[$ary$byval_copy>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy+4>>2]=HEAP32[$ary+4>>2]|0;
+ ;HEAP32[$str$byval_copy7>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy7+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_ary_push($46,$ary$byval_copy,$str$byval_copy7);
+ $47 = $0;
+ $48 = $ai;
+ _mrb_gc_arena_restore($47,$48);
+ STACKTOP = sp;return;
+}
+function _mrb_fixnum_value_660($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 3;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _kh_alloc_mt($mrb,$h) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $len = 0, $p = 0;
+ var $sz = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $h;
+ $2 = $1;
+ $3 = HEAP32[$2>>2]|0;
+ $sz = $3;
+ $len = 8;
+ $4 = $0;
+ $5 = $sz;
+ $6 = $5;
+ $7 = (($6>>>0) / 4)&-1;
+ $8 = $len;
+ $9 = $sz;
+ $10 = Math_imul($8, $9)|0;
+ $11 = (($7) + ($10))|0;
+ $12 = (_mrb_malloc($4,$11)|0);
+ $p = $12;
+ $13 = $1;
+ $14 = ((($13)) + 8|0);
+ HEAP32[$14>>2] = 0;
+ $15 = $1;
+ $16 = ((($15)) + 4|0);
+ HEAP32[$16>>2] = 0;
+ $17 = $p;
+ $18 = $1;
+ $19 = ((($18)) + 16|0);
+ HEAP32[$19>>2] = $17;
+ $20 = $p;
+ $21 = $sz;
+ $22 = $21<<2;
+ $23 = (($20) + ($22)|0);
+ $24 = $1;
+ $25 = ((($24)) + 20|0);
+ HEAP32[$25>>2] = $23;
+ $26 = $p;
+ $27 = $len;
+ $28 = $sz;
+ $29 = Math_imul($27, $28)|0;
+ $30 = (($26) + ($29)|0);
+ $31 = $1;
+ $32 = ((($31)) + 12|0);
+ HEAP32[$32>>2] = $30;
+ $33 = $1;
+ $34 = ((($33)) + 12|0);
+ $35 = HEAP32[$34>>2]|0;
+ $36 = $sz;
+ $37 = (($36>>>0) / 4)&-1;
+ _kh_fill_flags_662($35,-86,$37);
+ STACKTOP = sp;return;
+}
+function _kh_fill_flags_662($p,$c,$len) {
+ $p = $p|0;
+ $c = $c|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $c;
+ $2 = $len;
+ while(1) {
+  $3 = $2;
+  $4 = (($3) + -1)|0;
+  $2 = $4;
+  $5 = ($3>>>0)>(0);
+  if (!($5)) {
+   break;
+  }
+  $6 = $1;
+  $7 = $0;
+  $8 = ((($7)) + 1|0);
+  $0 = $8;
+  HEAP8[$7>>0] = $6;
+ }
+ STACKTOP = sp;return;
+}
+function _kh_init_mt_size($mrb,$size) {
+ $mrb = $mrb|0;
+ $size = $size|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $h = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $size;
+ $2 = $0;
+ $3 = (_mrb_calloc($2,1,24)|0);
+ $h = $3;
+ $4 = $1;
+ $5 = ($4>>>0)<(8);
+ if ($5) {
+  $1 = 8;
+ }
+ $6 = $1;
+ $7 = (($6) + -1)|0;
+ $1 = $7;
+ $8 = $1;
+ $9 = $8 >>> 1;
+ $10 = $1;
+ $11 = $10 | $9;
+ $1 = $11;
+ $12 = $1;
+ $13 = $12 >>> 2;
+ $14 = $1;
+ $15 = $14 | $13;
+ $1 = $15;
+ $16 = $1;
+ $17 = $16 >>> 4;
+ $18 = $1;
+ $19 = $18 | $17;
+ $1 = $19;
+ $20 = $1;
+ $21 = $20 >>> 8;
+ $22 = $1;
+ $23 = $22 | $21;
+ $1 = $23;
+ $24 = $1;
+ $25 = $24 >>> 16;
+ $26 = $1;
+ $27 = $26 | $25;
+ $1 = $27;
+ $28 = $1;
+ $29 = (($28) + 1)|0;
+ $1 = $29;
+ $30 = $1;
+ $31 = $h;
+ HEAP32[$31>>2] = $30;
+ $32 = $0;
+ $33 = $h;
+ _kh_alloc_mt($32,$33);
+ $34 = $h;
+ STACKTOP = sp;return ($34|0);
+}
+function _kh_init_mt($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = (_kh_init_mt_size($1,8)|0);
+ STACKTOP = sp;return ($2|0);
+}
+function _kh_destroy_mt($mrb,$h) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $h;
+ $2 = $1;
+ $3 = ($2|0)!=(0|0);
+ if (!($3)) {
+  STACKTOP = sp;return;
+ }
+ $4 = $0;
+ $5 = $1;
+ $6 = ((($5)) + 16|0);
+ $7 = HEAP32[$6>>2]|0;
+ _mrb_free($4,$7);
+ $8 = $0;
+ $9 = $1;
+ _mrb_free($8,$9);
+ STACKTOP = sp;return;
+}
+function _kh_get_mt($mrb,$h,$key) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ $key = $key|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $7 = 0, $8 = 0, $9 = 0, $k = 0, $step = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $h;
+ $3 = $key;
+ $4 = $3;
+ $5 = $3;
+ $6 = $5 << 2;
+ $7 = $4 ^ $6;
+ $8 = $3;
+ $9 = $8 >>> 2;
+ $10 = $7 ^ $9;
+ $11 = $2;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = (($12) - 1)|0;
+ $14 = $10 & $13;
+ $k = $14;
+ $step = 0;
+ while(1) {
+  $15 = $k;
+  $16 = (($15>>>0) / 4)&-1;
+  $17 = $2;
+  $18 = ((($17)) + 12|0);
+  $19 = HEAP32[$18>>2]|0;
+  $20 = (($19) + ($16)|0);
+  $21 = HEAP8[$20>>0]|0;
+  $22 = $21&255;
+  $23 = $k;
+  $24 = (($23>>>0) % 4)&-1;
+  $25 = (64549 + ($24)|0);
+  $26 = HEAP8[$25>>0]|0;
+  $27 = $26&255;
+  $28 = $22 & $27;
+  $29 = ($28|0)!=(0);
+  $30 = $29 ^ 1;
+  if (!($30)) {
+   label = 7;
+   break;
+  }
+  $31 = $k;
+  $32 = (($31>>>0) / 4)&-1;
+  $33 = $2;
+  $34 = ((($33)) + 12|0);
+  $35 = HEAP32[$34>>2]|0;
+  $36 = (($35) + ($32)|0);
+  $37 = HEAP8[$36>>0]|0;
+  $38 = $37&255;
+  $39 = $k;
+  $40 = (($39>>>0) % 4)&-1;
+  $41 = (64553 + ($40)|0);
+  $42 = HEAP8[$41>>0]|0;
+  $43 = $42&255;
+  $44 = $38 & $43;
+  $45 = ($44|0)!=(0);
+  if (!($45)) {
+   $46 = $k;
+   $47 = $2;
+   $48 = ((($47)) + 16|0);
+   $49 = HEAP32[$48>>2]|0;
+   $50 = (($49) + ($46<<2)|0);
+   $51 = HEAP32[$50>>2]|0;
+   $52 = $3;
+   $53 = ($51|0)==($52|0);
+   if ($53) {
+    label = 5;
+    break;
+   }
+  }
+  $55 = $k;
+  $56 = $step;
+  $57 = (($56) + 1)|0;
+  $step = $57;
+  $58 = (($55) + ($57))|0;
+  $59 = $2;
+  $60 = HEAP32[$59>>2]|0;
+  $61 = (($60) - 1)|0;
+  $62 = $58 & $61;
+  $k = $62;
+ }
+ if ((label|0) == 5) {
+  $54 = $k;
+  $0 = $54;
+  $65 = $0;
+  STACKTOP = sp;return ($65|0);
+ }
+ else if ((label|0) == 7) {
+  $63 = $2;
+  $64 = HEAP32[$63>>2]|0;
+  $0 = $64;
+  $65 = $0;
+  STACKTOP = sp;return ($65|0);
+ }
+ return (0)|0;
+}
+function _kh_resize_mt($mrb,$h,$new_n_buckets) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ $new_n_buckets = $new_n_buckets|0;
+ var $$new_n_buckets = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
+ var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $8 = 0, $9 = 0, $hh = 0, $i = 0;
+ var $k = 0, $old_ed_flags = 0, $old_keys = 0, $old_n_buckets = 0, $old_vals = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $hh = sp + 24|0;
+ $0 = $mrb;
+ $1 = $h;
+ $2 = $new_n_buckets;
+ $3 = $2;
+ $4 = ($3>>>0)<(8);
+ $$new_n_buckets = $4 ? 8 : $new_n_buckets;
+ $2 = $$new_n_buckets;
+ $5 = $2;
+ $6 = (($5) + -1)|0;
+ $2 = $6;
+ $7 = $2;
+ $8 = $7 >>> 1;
+ $9 = $2;
+ $10 = $9 | $8;
+ $2 = $10;
+ $11 = $2;
+ $12 = $11 >>> 2;
+ $13 = $2;
+ $14 = $13 | $12;
+ $2 = $14;
+ $15 = $2;
+ $16 = $15 >>> 4;
+ $17 = $2;
+ $18 = $17 | $16;
+ $2 = $18;
+ $19 = $2;
+ $20 = $19 >>> 8;
+ $21 = $2;
+ $22 = $21 | $20;
+ $2 = $22;
+ $23 = $2;
+ $24 = $23 >>> 16;
+ $25 = $2;
+ $26 = $25 | $24;
+ $2 = $26;
+ $27 = $2;
+ $28 = (($27) + 1)|0;
+ $2 = $28;
+ $29 = $1;
+ $30 = ((($29)) + 12|0);
+ $31 = HEAP32[$30>>2]|0;
+ $old_ed_flags = $31;
+ $32 = $1;
+ $33 = ((($32)) + 16|0);
+ $34 = HEAP32[$33>>2]|0;
+ $old_keys = $34;
+ $35 = $1;
+ $36 = ((($35)) + 20|0);
+ $37 = HEAP32[$36>>2]|0;
+ $old_vals = $37;
+ $38 = $1;
+ $39 = HEAP32[$38>>2]|0;
+ $old_n_buckets = $39;
+ $40 = $2;
+ HEAP32[$hh>>2] = $40;
+ $41 = $0;
+ _kh_alloc_mt($41,$hh);
+ $i = 0;
+ while(1) {
+  $42 = $i;
+  $43 = $old_n_buckets;
+  $44 = ($42>>>0)<($43>>>0);
+  if (!($44)) {
+   break;
+  }
+  $45 = $i;
+  $46 = (($45>>>0) / 4)&-1;
+  $47 = $old_ed_flags;
+  $48 = (($47) + ($46)|0);
+  $49 = HEAP8[$48>>0]|0;
+  $50 = $49&255;
+  $51 = $i;
+  $52 = (($51>>>0) % 4)&-1;
+  $53 = (64557 + ($52)|0);
+  $54 = HEAP8[$53>>0]|0;
+  $55 = $54&255;
+  $56 = $50 & $55;
+  $57 = ($56|0)!=(0);
+  if (!($57)) {
+   $58 = $0;
+   $59 = $i;
+   $60 = $old_keys;
+   $61 = (($60) + ($59<<2)|0);
+   $62 = HEAP32[$61>>2]|0;
+   $63 = (_kh_put_mt($58,$hh,$62,0)|0);
+   $k = $63;
+   $64 = $i;
+   $65 = $old_vals;
+   $66 = (($65) + ($64<<2)|0);
+   $67 = HEAP32[$66>>2]|0;
+   $68 = $k;
+   $69 = ((($hh)) + 20|0);
+   $70 = HEAP32[$69>>2]|0;
+   $71 = (($70) + ($68<<2)|0);
+   HEAP32[$71>>2] = $67;
+  }
+  $72 = $i;
+  $73 = (($72) + 1)|0;
+  $i = $73;
+ }
+ $74 = $1;
+ ;HEAP32[$74>>2]=HEAP32[$hh>>2]|0;HEAP32[$74+4>>2]=HEAP32[$hh+4>>2]|0;HEAP32[$74+8>>2]=HEAP32[$hh+8>>2]|0;HEAP32[$74+12>>2]=HEAP32[$hh+12>>2]|0;HEAP32[$74+16>>2]=HEAP32[$hh+16>>2]|0;HEAP32[$74+20>>2]=HEAP32[$hh+20>>2]|0;
+ $75 = $0;
+ $76 = $old_keys;
+ _mrb_free($75,$76);
+ STACKTOP = sp;return;
+}
+function _kh_put_mt($mrb,$h,$key,$ret) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ $key = $key|0;
+ $ret = $ret|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0;
+ var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0;
+ var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0;
+ var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0;
+ var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $del_k = 0, $k = 0;
+ var $step = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $h;
+ $3 = $key;
+ $4 = $ret;
+ $step = 0;
+ $5 = $2;
+ $6 = ((($5)) + 8|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $2;
+ $9 = HEAP32[$8>>2]|0;
+ $10 = $9 >>> 2;
+ $11 = $2;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $12 >>> 1;
+ $14 = $10 | $13;
+ $15 = ($7>>>0)>=($14>>>0);
+ if ($15) {
+  $16 = $1;
+  $17 = $2;
+  $18 = $2;
+  $19 = HEAP32[$18>>2]|0;
+  $20 = $19<<1;
+  _kh_resize_mt($16,$17,$20);
+ }
+ $21 = $3;
+ $22 = $3;
+ $23 = $22 << 2;
+ $24 = $21 ^ $23;
+ $25 = $3;
+ $26 = $25 >>> 2;
+ $27 = $24 ^ $26;
+ $28 = $2;
+ $29 = HEAP32[$28>>2]|0;
+ $30 = (($29) - 1)|0;
+ $31 = $27 & $30;
+ $k = $31;
+ $32 = $2;
+ $33 = HEAP32[$32>>2]|0;
+ $del_k = $33;
+ while(1) {
+  $34 = $k;
+  $35 = (($34>>>0) / 4)&-1;
+  $36 = $2;
+  $37 = ((($36)) + 12|0);
+  $38 = HEAP32[$37>>2]|0;
+  $39 = (($38) + ($35)|0);
+  $40 = HEAP8[$39>>0]|0;
+  $41 = $40&255;
+  $42 = $k;
+  $43 = (($42>>>0) % 4)&-1;
+  $44 = (64549 + ($43)|0);
+  $45 = HEAP8[$44>>0]|0;
+  $46 = $45&255;
+  $47 = $41 & $46;
+  $48 = ($47|0)!=(0);
+  $49 = $48 ^ 1;
+  if (!($49)) {
+   break;
+  }
+  $50 = $k;
+  $51 = (($50>>>0) / 4)&-1;
+  $52 = $2;
+  $53 = ((($52)) + 12|0);
+  $54 = HEAP32[$53>>2]|0;
+  $55 = (($54) + ($51)|0);
+  $56 = HEAP8[$55>>0]|0;
+  $57 = $56&255;
+  $58 = $k;
+  $59 = (($58>>>0) % 4)&-1;
+  $60 = (64553 + ($59)|0);
+  $61 = HEAP8[$60>>0]|0;
+  $62 = $61&255;
+  $63 = $57 & $62;
+  $64 = ($63|0)!=(0);
+  if ($64) {
+   $77 = $del_k;
+   $78 = $2;
+   $79 = HEAP32[$78>>2]|0;
+   $80 = ($77|0)==($79|0);
+   if ($80) {
+    $81 = $k;
+    $del_k = $81;
+   }
+  } else {
+   $65 = $k;
+   $66 = $2;
+   $67 = ((($66)) + 16|0);
+   $68 = HEAP32[$67>>2]|0;
+   $69 = (($68) + ($65<<2)|0);
+   $70 = HEAP32[$69>>2]|0;
+   $71 = $3;
+   $72 = ($70|0)==($71|0);
+   if ($72) {
+    label = 7;
+    break;
+   }
+  }
+  $82 = $k;
+  $83 = $step;
+  $84 = (($83) + 1)|0;
+  $step = $84;
+  $85 = (($82) + ($84))|0;
+  $86 = $2;
+  $87 = HEAP32[$86>>2]|0;
+  $88 = (($87) - 1)|0;
+  $89 = $85 & $88;
+  $k = $89;
+ }
+ if ((label|0) == 7) {
+  $73 = $4;
+  $74 = ($73|0)!=(0|0);
+  if ($74) {
+   $75 = $4;
+   HEAP32[$75>>2] = 0;
+  }
+  $76 = $k;
+  $0 = $76;
+  $157 = $0;
+  STACKTOP = sp;return ($157|0);
+ }
+ $90 = $del_k;
+ $91 = $2;
+ $92 = HEAP32[$91>>2]|0;
+ $93 = ($90|0)!=($92|0);
+ $94 = $3;
+ if ($93) {
+  $95 = $del_k;
+  $96 = $2;
+  $97 = ((($96)) + 16|0);
+  $98 = HEAP32[$97>>2]|0;
+  $99 = (($98) + ($95<<2)|0);
+  HEAP32[$99>>2] = $94;
+  $100 = $del_k;
+  $101 = (($100>>>0) % 4)&-1;
+  $102 = (64553 + ($101)|0);
+  $103 = HEAP8[$102>>0]|0;
+  $104 = $103&255;
+  $105 = $104 ^ -1;
+  $106 = $del_k;
+  $107 = (($106>>>0) / 4)&-1;
+  $108 = $2;
+  $109 = ((($108)) + 12|0);
+  $110 = HEAP32[$109>>2]|0;
+  $111 = (($110) + ($107)|0);
+  $112 = HEAP8[$111>>0]|0;
+  $113 = $112&255;
+  $114 = $113 & $105;
+  $115 = $114&255;
+  HEAP8[$111>>0] = $115;
+  $116 = $2;
+  $117 = ((($116)) + 4|0);
+  $118 = HEAP32[$117>>2]|0;
+  $119 = (($118) + 1)|0;
+  HEAP32[$117>>2] = $119;
+  $120 = $4;
+  $121 = ($120|0)!=(0|0);
+  if ($121) {
+   $122 = $4;
+   HEAP32[$122>>2] = 2;
+  }
+  $123 = $del_k;
+  $0 = $123;
+  $157 = $0;
+  STACKTOP = sp;return ($157|0);
+ } else {
+  $124 = $k;
+  $125 = $2;
+  $126 = ((($125)) + 16|0);
+  $127 = HEAP32[$126>>2]|0;
+  $128 = (($127) + ($124<<2)|0);
+  HEAP32[$128>>2] = $94;
+  $129 = $k;
+  $130 = (($129>>>0) % 4)&-1;
+  $131 = (64549 + ($130)|0);
+  $132 = HEAP8[$131>>0]|0;
+  $133 = $132&255;
+  $134 = $133 ^ -1;
+  $135 = $k;
+  $136 = (($135>>>0) / 4)&-1;
+  $137 = $2;
+  $138 = ((($137)) + 12|0);
+  $139 = HEAP32[$138>>2]|0;
+  $140 = (($139) + ($136)|0);
+  $141 = HEAP8[$140>>0]|0;
+  $142 = $141&255;
+  $143 = $142 & $134;
+  $144 = $143&255;
+  HEAP8[$140>>0] = $144;
+  $145 = $2;
+  $146 = ((($145)) + 4|0);
+  $147 = HEAP32[$146>>2]|0;
+  $148 = (($147) + 1)|0;
+  HEAP32[$146>>2] = $148;
+  $149 = $2;
+  $150 = ((($149)) + 8|0);
+  $151 = HEAP32[$150>>2]|0;
+  $152 = (($151) + 1)|0;
+  HEAP32[$150>>2] = $152;
+  $153 = $4;
+  $154 = ($153|0)!=(0|0);
+  if ($154) {
+   $155 = $4;
+   HEAP32[$155>>2] = 1;
+  }
+  $156 = $k;
+  $0 = $156;
+  $157 = $0;
+  STACKTOP = sp;return ($157|0);
+ }
+ return (0)|0;
+}
+function _kh_del_mt($mrb,$h,$x) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ $x = $x|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $h;
+ $2 = $x;
+ $3 = $2;
+ $4 = (($3>>>0) % 4)&-1;
+ $5 = (64553 + ($4)|0);
+ $6 = HEAP8[$5>>0]|0;
+ $7 = $6&255;
+ $8 = $2;
+ $9 = (($8>>>0) / 4)&-1;
+ $10 = $1;
+ $11 = ((($10)) + 12|0);
+ $12 = HEAP32[$11>>2]|0;
+ $13 = (($12) + ($9)|0);
+ $14 = HEAP8[$13>>0]|0;
+ $15 = $14&255;
+ $16 = $15 | $7;
+ $17 = $16&255;
+ HEAP8[$13>>0] = $17;
+ $18 = $1;
+ $19 = ((($18)) + 4|0);
+ $20 = HEAP32[$19>>2]|0;
+ $21 = (($20) + -1)|0;
+ HEAP32[$19>>2] = $21;
+ STACKTOP = sp;return;
+}
+function _kh_copy_mt($mrb,$h) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $h2 = 0, $k = 0, $k2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $h;
+ $2 = $0;
+ $3 = (_kh_init_mt($2)|0);
+ $h2 = $3;
+ $k = 0;
+ while(1) {
+  $4 = $k;
+  $5 = $1;
+  $6 = HEAP32[$5>>2]|0;
+  $7 = ($4|0)!=($6|0);
+  if (!($7)) {
+   break;
+  }
+  $8 = $k;
+  $9 = (($8>>>0) / 4)&-1;
+  $10 = $1;
+  $11 = ((($10)) + 12|0);
+  $12 = HEAP32[$11>>2]|0;
+  $13 = (($12) + ($9)|0);
+  $14 = HEAP8[$13>>0]|0;
+  $15 = $14&255;
+  $16 = $k;
+  $17 = (($16>>>0) % 4)&-1;
+  $18 = (64557 + ($17)|0);
+  $19 = HEAP8[$18>>0]|0;
+  $20 = $19&255;
+  $21 = $15 & $20;
+  $22 = ($21|0)!=(0);
+  if (!($22)) {
+   $23 = $0;
+   $24 = $h2;
+   $25 = $k;
+   $26 = $1;
+   $27 = ((($26)) + 16|0);
+   $28 = HEAP32[$27>>2]|0;
+   $29 = (($28) + ($25<<2)|0);
+   $30 = HEAP32[$29>>2]|0;
+   $31 = (_kh_put_mt($23,$24,$30,0)|0);
+   $k2 = $31;
+   $32 = $k;
+   $33 = $1;
+   $34 = ((($33)) + 20|0);
+   $35 = HEAP32[$34>>2]|0;
+   $36 = (($35) + ($32<<2)|0);
+   $37 = HEAP32[$36>>2]|0;
+   $38 = $k2;
+   $39 = $h2;
+   $40 = ((($39)) + 20|0);
+   $41 = HEAP32[$40>>2]|0;
+   $42 = (($41) + ($38<<2)|0);
+   HEAP32[$42>>2] = $37;
+  }
+  $43 = $k;
+  $44 = (($43) + 1)|0;
+  $k = $44;
+ }
+ $45 = $h2;
+ STACKTOP = sp;return ($45|0);
+}
+function _mrb_gc_mark_mt($mrb,$c) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $h = 0, $k = 0;
+ var $m = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $1;
+ $3 = ((($2)) + 16|0);
+ $4 = HEAP32[$3>>2]|0;
+ $h = $4;
+ $5 = $h;
+ $6 = ($5|0)!=(0|0);
+ if (!($6)) {
+  STACKTOP = sp;return;
+ }
+ $k = 0;
+ while(1) {
+  $7 = $k;
+  $8 = $h;
+  $9 = HEAP32[$8>>2]|0;
+  $10 = ($7|0)!=($9|0);
+  if (!($10)) {
+   break;
+  }
+  $11 = $k;
+  $12 = (($11>>>0) / 4)&-1;
+  $13 = $h;
+  $14 = ((($13)) + 12|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = (($15) + ($12)|0);
+  $17 = HEAP8[$16>>0]|0;
+  $18 = $17&255;
+  $19 = $k;
+  $20 = (($19>>>0) % 4)&-1;
+  $21 = (64557 + ($20)|0);
+  $22 = HEAP8[$21>>0]|0;
+  $23 = $22&255;
+  $24 = $18 & $23;
+  $25 = ($24|0)!=(0);
+  if (!($25)) {
+   $26 = $k;
+   $27 = $h;
+   $28 = ((($27)) + 20|0);
+   $29 = HEAP32[$28>>2]|0;
+   $30 = (($29) + ($26<<2)|0);
+   $31 = HEAP32[$30>>2]|0;
+   $m = $31;
+   $32 = $m;
+   $33 = ($32|0)!=(0|0);
+   if ($33) {
+    $34 = $0;
+    $35 = $m;
+    _mrb_gc_mark($34,$35);
+   }
+  }
+  $36 = $k;
+  $37 = (($36) + 1)|0;
+  $k = $37;
+ }
+ STACKTOP = sp;return;
+}
+function _mrb_gc_mark_mt_size($mrb,$c) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $h = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $c;
+ $3 = $2;
+ $4 = ((($3)) + 16|0);
+ $5 = HEAP32[$4>>2]|0;
+ $h = $5;
+ $6 = $h;
+ $7 = ($6|0)!=(0|0);
+ if ($7) {
+  $8 = $h;
+  $9 = ((($8)) + 4|0);
+  $10 = HEAP32[$9>>2]|0;
+  $0 = $10;
+  $11 = $0;
+  STACKTOP = sp;return ($11|0);
+ } else {
+  $0 = 0;
+  $11 = $0;
+  STACKTOP = sp;return ($11|0);
+ }
+ return (0)|0;
+}
+function _mrb_gc_free_mt($mrb,$c) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $0;
+ $3 = $1;
+ $4 = ((($3)) + 16|0);
+ $5 = HEAP32[$4>>2]|0;
+ _kh_destroy_mt($2,$5);
+ STACKTOP = sp;return;
+}
+function _mrb_class_outer_module($mrb,$c) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $outer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $outer = sp + 8|0;
+ $3 = sp;
+ $1 = $mrb;
+ $2 = $c;
+ $4 = $1;
+ $5 = $2;
+ $6 = $1;
+ $7 = (_mrb_intern_static($6,64561,9)|0);
+ _mrb_obj_iv_get($3,$4,$5,$7);
+ ;HEAP32[$outer>>2]=HEAP32[$3>>2]|0;HEAP32[$outer+4>>2]=HEAP32[$3+4>>2]|0;
+ $8 = ((($outer)) + 4|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ($9|0)==(0);
+ if ($10) {
+  $11 = HEAP32[$outer>>2]|0;
+  $12 = ($11|0)!=(0);
+  if (!($12)) {
+   $0 = 0;
+   $14 = $0;
+   STACKTOP = sp;return ($14|0);
+  }
+ }
+ $13 = HEAP32[$outer>>2]|0;
+ $0 = $13;
+ $14 = $0;
+ STACKTOP = sp;return ($14|0);
+}
+function _define_module($mrb,$name,$outer) {
+ $mrb = $mrb|0;
+ $name = $name|0;
+ $outer = $outer|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $m = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 32|0;
+ $4 = sp;
+ $1 = $mrb;
+ $2 = $name;
+ $3 = $outer;
+ $5 = $1;
+ $6 = $3;
+ _mrb_obj_value_675($4,$6);
+ $7 = $2;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$4+4>>2]|0;
+ $8 = (_mrb_const_defined_at($5,$$byval_copy,$7)|0);
+ $9 = ($8<<24>>24)!=(0);
+ $10 = $1;
+ if ($9) {
+  $11 = $3;
+  $12 = $2;
+  $13 = (_module_from_sym($10,$11,$12)|0);
+  $0 = $13;
+  $20 = $0;
+  STACKTOP = sp;return ($20|0);
+ } else {
+  $14 = (_mrb_module_new($10)|0);
+  $m = $14;
+  $15 = $1;
+  $16 = $3;
+  $17 = $m;
+  $18 = $2;
+  _setup_class($15,$16,$17,$18);
+  $19 = $m;
+  $0 = $19;
+  $20 = $0;
+  STACKTOP = sp;return ($20|0);
+ }
+ return (0)|0;
+}
+function _mrb_obj_value_675($agg$result,$p) {
+ $agg$result = $agg$result|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $p;
+ $1 = $0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 & 255;
+ $4 = ((($v)) + 4|0);
+ HEAP32[$4>>2] = $3;
+ $5 = $0;
+ HEAP32[$v>>2] = $5;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _module_from_sym($mrb,$klass,$id) {
+ $mrb = $mrb|0;
+ $klass = $klass|0;
+ $id = $id|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $c = 0, $c$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $c$byval_copy = sp + 40|0;
+ $$byval_copy = sp + 32|0;
+ $c = sp + 8|0;
+ $3 = sp;
+ $0 = $mrb;
+ $1 = $klass;
+ $2 = $id;
+ $4 = $0;
+ $5 = $1;
+ _mrb_obj_value_675($3,$5);
+ $6 = $2;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
+ _mrb_const_get($c,$4,$$byval_copy,$6);
+ $7 = $0;
+ ;HEAP32[$c$byval_copy>>2]=HEAP32[$c>>2]|0;HEAP32[$c$byval_copy+4>>2]=HEAP32[$c+4>>2]|0;
+ _mrb_check_type($7,$c$byval_copy,10);
+ $8 = HEAP32[$c>>2]|0;
+ STACKTOP = sp;return ($8|0);
+}
+function _mrb_module_new($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $m = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = $0;
+ $3 = ((($2)) + 40|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = (_mrb_obj_alloc($1,10,$4)|0);
+ $m = $5;
+ $6 = $0;
+ $7 = $m;
+ _boot_initmod($6,$7);
+ $8 = $m;
+ STACKTOP = sp;return ($8|0);
+}
+function _boot_initmod($mrb,$mod) {
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $mod;
+ $2 = $0;
+ $3 = (_kh_init_mt($2)|0);
+ $4 = $1;
+ $5 = ((($4)) + 16|0);
+ HEAP32[$5>>2] = $3;
+ STACKTOP = sp;return;
+}
+function _setup_class($mrb,$outer,$c,$id) {
+ $mrb = $mrb|0;
+ $outer = $outer|0;
+ $c = $c|0;
+ $id = $id|0;
+ var $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy1 = sp + 40|0;
+ $$byval_copy = sp + 32|0;
+ $4 = sp + 8|0;
+ $5 = sp;
+ $0 = $mrb;
+ $1 = $outer;
+ $2 = $c;
+ $3 = $id;
+ $6 = $0;
+ $7 = $2;
+ $8 = $3;
+ _name_class($6,$7,$8);
+ $9 = $0;
+ $10 = $1;
+ $11 = $3;
+ $12 = $2;
+ _mrb_obj_value_675($4,$12);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$4+4>>2]|0;
+ _mrb_obj_iv_set($9,$10,$11,$$byval_copy);
+ $13 = $1;
+ $14 = $0;
+ $15 = ((($14)) + 32|0);
+ $16 = HEAP32[$15>>2]|0;
+ $17 = ($13|0)!=($16|0);
+ if (!($17)) {
+  STACKTOP = sp;return;
+ }
+ $18 = $0;
+ $19 = $2;
+ $20 = $0;
+ $21 = (_mrb_intern_static($20,64561,9)|0);
+ $22 = $1;
+ _mrb_obj_value_675($5,$22);
+ ;HEAP32[$$byval_copy1>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$5+4>>2]|0;
+ _mrb_obj_iv_set($18,$19,$21,$$byval_copy1);
+ STACKTOP = sp;return;
+}
+function _name_class($mrb,$c,$name) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $name = $name|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 24|0;
+ $3 = sp;
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $name;
+ $4 = $0;
+ $5 = $1;
+ $6 = $0;
+ $7 = (_mrb_intern_static($6,64571,11)|0);
+ $8 = $2;
+ _mrb_symbol_value_677($3,$8);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
+ _mrb_obj_iv_set($4,$5,$7,$$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_symbol_value_677($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 4;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_define_module($mrb,$name) {
+ $mrb = $mrb|0;
+ $name = $name|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $name;
+ $2 = $0;
+ $3 = $0;
+ $4 = $1;
+ $5 = (_mrb_intern_cstr($3,$4)|0);
+ $6 = $0;
+ $7 = ((($6)) + 32|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = (_define_module($2,$5,$8)|0);
+ STACKTOP = sp;return ($9|0);
+}
+function _mrb_vm_define_module($mrb,$outer,$id) {
+ $mrb = $mrb|0;
+ $outer = $outer|0;
+ $id = $id|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $outer$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $outer$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $id;
+ $2 = $0;
+ ;HEAP32[$outer$byval_copy>>2]=HEAP32[$outer>>2]|0;HEAP32[$outer$byval_copy+4>>2]=HEAP32[$outer+4>>2]|0;
+ _check_if_class_or_module($2,$outer$byval_copy);
+ $3 = $0;
+ $4 = $1;
+ $5 = HEAP32[$outer>>2]|0;
+ $6 = (_define_module($3,$4,$5)|0);
+ STACKTOP = sp;return ($6|0);
+}
+function _check_if_class_or_module($mrb,$obj) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $obj$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = ((($obj)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ switch ($3|0) {
+ case 10: case 12: case 9:  {
+  STACKTOP = sp;return;
+  break;
+ }
+ default: {
+  $4 = $0;
+  $5 = $0;
+  $6 = (_mrb_class_get($5,68905)|0);
+  $7 = $0;
+  ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+  _mrb_inspect($1,$7,$obj$byval_copy);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$1>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$1+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$1+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$1+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$1+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$1+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$1+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$1+7>>0]|0;
+  _mrb_raisef($4,$6,64583,$vararg_buffer);
+  // unreachable;
+ }
+ }
+}
+function _mrb_class_get($mrb,$name) {
+ $mrb = $mrb|0;
+ $name = $name|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $name;
+ $2 = $0;
+ $3 = $0;
+ $4 = ((($3)) + 32|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $1;
+ $7 = (_mrb_class_get_under($2,$5,$6)|0);
+ STACKTOP = sp;return ($7|0);
+}
+function _mrb_class_get_under($mrb,$outer,$name) {
+ $mrb = $mrb|0;
+ $outer = $outer|0;
+ $name = $name|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $outer;
+ $2 = $name;
+ $3 = $0;
+ $4 = $1;
+ $5 = $0;
+ $6 = $2;
+ $7 = (_mrb_intern_cstr($5,$6)|0);
+ $8 = (_class_from_sym($3,$4,$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _class_from_sym($mrb,$klass,$id) {
+ $mrb = $mrb|0;
+ $klass = $klass|0;
+ $id = $id|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $c = 0, $c$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $c$byval_copy = sp + 40|0;
+ $$byval_copy = sp + 32|0;
+ $c = sp + 8|0;
+ $3 = sp;
+ $0 = $mrb;
+ $1 = $klass;
+ $2 = $id;
+ $4 = $0;
+ $5 = $1;
+ _mrb_obj_value_675($3,$5);
+ $6 = $2;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
+ _mrb_const_get($c,$4,$$byval_copy,$6);
+ $7 = $0;
+ ;HEAP32[$c$byval_copy>>2]=HEAP32[$c>>2]|0;HEAP32[$c$byval_copy+4>>2]=HEAP32[$c+4>>2]|0;
+ _mrb_check_type($7,$c$byval_copy,9);
+ $8 = HEAP32[$c>>2]|0;
+ STACKTOP = sp;return ($8|0);
+}
+function _mrb_define_class_id($mrb,$name,$super) {
+ $mrb = $mrb|0;
+ $name = $name|0;
+ $super = $super|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $3 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $name;
+ $2 = $super;
+ $4 = $2;
+ $5 = ($4|0)!=(0|0);
+ if (!($5)) {
+  $6 = $0;
+  $7 = $0;
+  $8 = $1;
+  _mrb_sym2str($3,$7,$8);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$3>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$3+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$3+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$3+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$3+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$3+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$3+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$3+7>>0]|0;
+  _mrb_warn($6,64608,$vararg_buffer);
+ }
+ $9 = $0;
+ $10 = $1;
+ $11 = $2;
+ $12 = $0;
+ $13 = ((($12)) + 32|0);
+ $14 = HEAP32[$13>>2]|0;
+ $15 = (_define_class($9,$10,$11,$14)|0);
+ STACKTOP = sp;return ($15|0);
+}
+function _define_class($mrb,$name,$super,$outer) {
+ $mrb = $mrb|0;
+ $name = $name|0;
+ $super = $super|0;
+ $outer = $outer|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $c = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 80|0;
+ $vararg_buffer = sp;
+ $5 = sp + 48|0;
+ $6 = sp + 40|0;
+ $7 = sp + 32|0;
+ $8 = sp + 24|0;
+ $1 = $mrb;
+ $2 = $name;
+ $3 = $super;
+ $4 = $outer;
+ $9 = $1;
+ $10 = $4;
+ _mrb_obj_value_675($5,$10);
+ $11 = $2;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$5+4>>2]|0;
+ $12 = (_mrb_const_defined_at($9,$$byval_copy,$11)|0);
+ $13 = ($12<<24>>24)!=(0);
+ $14 = $1;
+ if (!($13)) {
+  $53 = $3;
+  $54 = (_mrb_class_new($14,$53)|0);
+  $c = $54;
+  $55 = $1;
+  $56 = $4;
+  $57 = $c;
+  $58 = $2;
+  _setup_class($55,$56,$57,$58);
+  $59 = $c;
+  $0 = $59;
+  $60 = $0;
+  STACKTOP = sp;return ($60|0);
+ }
+ $15 = $4;
+ $16 = $2;
+ $17 = (_class_from_sym($14,$15,$16)|0);
+ $c = $17;
+ $18 = $c;
+ $19 = HEAP32[$18>>2]|0;
+ $20 = $19 >>> 11;
+ $21 = $20 & 524288;
+ $22 = ($21|0)!=(0);
+ L5: do {
+  if ($22) {
+   $23 = $c;
+   $24 = ((($23)) + 20|0);
+   $25 = HEAP32[$24>>2]|0;
+   $c = $25;
+   while(1) {
+    $26 = $c;
+    $27 = HEAP32[$26>>2]|0;
+    $28 = $27 >>> 11;
+    $29 = $28 & 1048576;
+    $30 = ($29|0)!=(0);
+    $31 = $30 ^ 1;
+    if (!($31)) {
+     break L5;
+    }
+    $32 = $c;
+    $33 = ((($32)) + 20|0);
+    $34 = HEAP32[$33>>2]|0;
+    $c = $34;
+   }
+  }
+ } while(0);
+ $35 = $3;
+ $36 = ($35|0)!=(0|0);
+ if ($36) {
+  $37 = $c;
+  $38 = ((($37)) + 20|0);
+  $39 = HEAP32[$38>>2]|0;
+  $40 = (_mrb_class_real($39)|0);
+  $41 = $3;
+  $42 = ($40|0)!=($41|0);
+  if ($42) {
+   $43 = $1;
+   $44 = $1;
+   $45 = (_mrb_class_get($44,68905)|0);
+   $46 = $1;
+   $47 = $2;
+   _mrb_sym2str($6,$46,$47);
+   $48 = $c;
+   $49 = ((($48)) + 20|0);
+   $50 = HEAP32[$49>>2]|0;
+   _mrb_obj_value_675($7,$50);
+   $51 = $3;
+   _mrb_obj_value_675($8,$51);
+   ;HEAP8[$vararg_buffer>>0]=HEAP8[$6>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$6+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$6+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$6+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$6+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$6+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$6+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$6+7>>0]|0;
+   $vararg_ptr1 = ((($vararg_buffer)) + 8|0);
+   ;HEAP8[$vararg_ptr1>>0]=HEAP8[$7>>0]|0;HEAP8[$vararg_ptr1+1>>0]=HEAP8[$7+1>>0]|0;HEAP8[$vararg_ptr1+2>>0]=HEAP8[$7+2>>0]|0;HEAP8[$vararg_ptr1+3>>0]=HEAP8[$7+3>>0]|0;HEAP8[$vararg_ptr1+4>>0]=HEAP8[$7+4>>0]|0;HEAP8[$vararg_ptr1+5>>0]=HEAP8[$7+5>>0]|0;HEAP8[$vararg_ptr1+6>>0]=HEAP8[$7+6>>0]|0;HEAP8[$vararg_ptr1+7>>0]=HEAP8[$7+7>>0]|0;
+   $vararg_ptr2 = ((($vararg_buffer)) + 16|0);
+   ;HEAP8[$vararg_ptr2>>0]=HEAP8[$8>>0]|0;HEAP8[$vararg_ptr2+1>>0]=HEAP8[$8+1>>0]|0;HEAP8[$vararg_ptr2+2>>0]=HEAP8[$8+2>>0]|0;HEAP8[$vararg_ptr2+3>>0]=HEAP8[$8+3>>0]|0;HEAP8[$vararg_ptr2+4>>0]=HEAP8[$8+4>>0]|0;HEAP8[$vararg_ptr2+5>>0]=HEAP8[$8+5>>0]|0;HEAP8[$vararg_ptr2+6>>0]=HEAP8[$8+6>>0]|0;HEAP8[$vararg_ptr2+7>>0]=HEAP8[$8+7>>0]|0;
+   _mrb_raisef($43,$45,64648,$vararg_buffer);
+   // unreachable;
+  }
+ }
+ $52 = $c;
+ $0 = $52;
+ $60 = $0;
+ STACKTOP = sp;return ($60|0);
+}
+function _mrb_class_real($cl) {
+ $cl = $cl|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $cl;
+ $2 = $1;
+ $3 = ($2|0)==(0|0);
+ if ($3) {
+  $0 = 0;
+  $15 = $0;
+  STACKTOP = sp;return ($15|0);
+ }
+ while(1) {
+  $4 = $1;
+  $5 = HEAP32[$4>>2]|0;
+  $6 = $5 & 255;
+  $7 = ($6|0)==(12);
+  if ($7) {
+   $16 = 1;
+  } else {
+   $8 = $1;
+   $9 = HEAP32[$8>>2]|0;
+   $10 = $9 & 255;
+   $11 = ($10|0)==(11);
+   $16 = $11;
+  }
+  $12 = $1;
+  if (!($16)) {
+   break;
+  }
+  $13 = ((($12)) + 20|0);
+  $14 = HEAP32[$13>>2]|0;
+  $1 = $14;
+ }
+ $0 = $12;
+ $15 = $0;
+ STACKTOP = sp;return ($15|0);
+}
+function _mrb_class_new($mrb,$super) {
+ $mrb = $mrb|0;
+ $super = $super|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $super;
+ $2 = $1;
+ $3 = ($2|0)!=(0|0);
+ if ($3) {
+  $4 = $0;
+  $5 = $1;
+  _mrb_check_inheritable($4,$5);
+ }
+ $6 = $0;
+ $7 = $1;
+ $8 = (_boot_defclass($6,$7)|0);
+ $c = $8;
+ $9 = $1;
+ $10 = ($9|0)!=(0|0);
+ if (!($10)) {
+  $28 = $0;
+  $29 = $c;
+  _prepare_singleton_class($28,$29);
+  $30 = $c;
+  STACKTOP = sp;return ($30|0);
+ }
+ $11 = $c;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $12 >>> 11;
+ $14 = $13 & -256;
+ $15 = $1;
+ $16 = HEAP32[$15>>2]|0;
+ $17 = $16 >>> 11;
+ $18 = $17 & 255;
+ $19 = $18&255;
+ $20 = $19 << 24 >> 24;
+ $21 = $14 | $20;
+ $22 = $c;
+ $23 = HEAP32[$22>>2]|0;
+ $24 = $21 & 2097151;
+ $25 = $24 << 11;
+ $26 = $23 & 2047;
+ $27 = $26 | $25;
+ HEAP32[$22>>2] = $27;
+ $28 = $0;
+ $29 = $c;
+ _prepare_singleton_class($28,$29);
+ $30 = $c;
+ STACKTOP = sp;return ($30|0);
+}
+function _mrb_check_inheritable($mrb,$super) {
+ $mrb = $mrb|0;
+ $super = $super|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0;
+ var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $2 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $super;
+ $3 = $1;
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $4 & 255;
+ $6 = ($5|0)!=(9);
+ if ($6) {
+  $7 = $0;
+  $8 = $0;
+  $9 = (_mrb_class_get($8,68905)|0);
+  $10 = $1;
+  _mrb_obj_value_675($2,$10);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$2>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$2+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$2+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$2+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$2+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$2+7>>0]|0;
+  _mrb_raisef($7,$9,64693,$vararg_buffer);
+  // unreachable;
+ }
+ $11 = $1;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $12 & 255;
+ $14 = ($13|0)==(12);
+ if ($14) {
+  $15 = $0;
+  $16 = $0;
+  $17 = (_mrb_class_get($16,68905)|0);
+  _mrb_raise($15,$17,64731);
+  // unreachable;
+ }
+ $18 = $1;
+ $19 = $0;
+ $20 = ((($19)) + 36|0);
+ $21 = HEAP32[$20>>2]|0;
+ $22 = ($18|0)==($21|0);
+ if ($22) {
+  $23 = $0;
+  $24 = $0;
+  $25 = (_mrb_class_get($24,68905)|0);
+  _mrb_raise($23,$25,64770);
+  // unreachable;
+ } else {
+  STACKTOP = sp;return;
+ }
+}
+function _boot_defclass($mrb,$super) {
+ $mrb = $mrb|0;
+ $super = $super|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $super;
+ $2 = $0;
+ $3 = $0;
+ $4 = ((($3)) + 36|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = (_mrb_obj_alloc($2,9,$5)|0);
+ $c = $6;
+ $7 = $1;
+ $8 = ($7|0)!=(0|0);
+ if ($8) {
+  $9 = $1;
+  $10 = $c;
+  $11 = ((($10)) + 20|0);
+  HEAP32[$11>>2] = $9;
+  $12 = $0;
+  $13 = $c;
+  $14 = $1;
+  _mrb_field_write_barrier($12,$13,$14);
+ } else {
+  $15 = $0;
+  $16 = ((($15)) + 32|0);
+  $17 = HEAP32[$16>>2]|0;
+  $18 = $c;
+  $19 = ((($18)) + 20|0);
+  HEAP32[$19>>2] = $17;
+ }
+ $20 = $0;
+ $21 = (_kh_init_mt($20)|0);
+ $22 = $c;
+ $23 = ((($22)) + 16|0);
+ HEAP32[$23>>2] = $21;
+ $24 = $c;
+ STACKTOP = sp;return ($24|0);
+}
+function _prepare_singleton_class($mrb,$o) {
+ $mrb = $mrb|0;
+ $o = $o|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
+ var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0;
+ var $80 = 0, $81 = 0, $82 = 0, $9 = 0, $c = 0, $sc = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 24|0;
+ $2 = sp;
+ $0 = $mrb;
+ $1 = $o;
+ $3 = $1;
+ $4 = ((($3)) + 4|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = HEAP32[$5>>2]|0;
+ $7 = $6 & 255;
+ $8 = ($7|0)==(12);
+ if ($8) {
+  STACKTOP = sp;return;
+ }
+ $9 = $0;
+ $10 = $0;
+ $11 = ((($10)) + 36|0);
+ $12 = HEAP32[$11>>2]|0;
+ $13 = (_mrb_obj_alloc($9,12,$12)|0);
+ $sc = $13;
+ $14 = $0;
+ $15 = (_kh_init_mt($14)|0);
+ $16 = $sc;
+ $17 = ((($16)) + 16|0);
+ HEAP32[$17>>2] = $15;
+ $18 = $sc;
+ $19 = ((($18)) + 12|0);
+ HEAP32[$19>>2] = 0;
+ $20 = $1;
+ $21 = HEAP32[$20>>2]|0;
+ $22 = $21 & 255;
+ $23 = ($22|0)==(9);
+ $24 = $1;
+ do {
+  if ($23) {
+   $c = $24;
+   $25 = $c;
+   $26 = ((($25)) + 20|0);
+   $27 = HEAP32[$26>>2]|0;
+   $28 = ($27|0)!=(0|0);
+   if ($28) {
+    $34 = $c;
+    $35 = ((($34)) + 20|0);
+    $36 = HEAP32[$35>>2]|0;
+    $37 = ((($36)) + 4|0);
+    $38 = HEAP32[$37>>2]|0;
+    $39 = $sc;
+    $40 = ((($39)) + 20|0);
+    HEAP32[$40>>2] = $38;
+    break;
+   } else {
+    $29 = $0;
+    $30 = ((($29)) + 36|0);
+    $31 = HEAP32[$30>>2]|0;
+    $32 = $sc;
+    $33 = ((($32)) + 20|0);
+    HEAP32[$33>>2] = $31;
+    break;
+   }
+  } else {
+   $41 = HEAP32[$24>>2]|0;
+   $42 = $41 & 255;
+   $43 = ($42|0)==(12);
+   $44 = $1;
+   if (!($43)) {
+    $65 = ((($44)) + 4|0);
+    $66 = HEAP32[$65>>2]|0;
+    $67 = $sc;
+    $68 = ((($67)) + 20|0);
+    HEAP32[$68>>2] = $66;
+    break;
+   }
+   $c = $44;
+   while(1) {
+    $45 = $c;
+    $46 = ((($45)) + 20|0);
+    $47 = HEAP32[$46>>2]|0;
+    $48 = HEAP32[$47>>2]|0;
+    $49 = $48 & 255;
+    $50 = ($49|0)==(11);
+    if (!($50)) {
+     break;
+    }
+    $51 = $c;
+    $52 = ((($51)) + 20|0);
+    $53 = HEAP32[$52>>2]|0;
+    $c = $53;
+   }
+   $54 = $0;
+   $55 = $c;
+   $56 = ((($55)) + 20|0);
+   $57 = HEAP32[$56>>2]|0;
+   _prepare_singleton_class($54,$57);
+   $58 = $c;
+   $59 = ((($58)) + 20|0);
+   $60 = HEAP32[$59>>2]|0;
+   $61 = ((($60)) + 4|0);
+   $62 = HEAP32[$61>>2]|0;
+   $63 = $sc;
+   $64 = ((($63)) + 20|0);
+   HEAP32[$64>>2] = $62;
+  }
+ } while(0);
+ $69 = $sc;
+ $70 = $1;
+ $71 = ((($70)) + 4|0);
+ HEAP32[$71>>2] = $69;
+ $72 = $0;
+ $73 = $1;
+ $74 = $sc;
+ _mrb_field_write_barrier($72,$73,$74);
+ $75 = $0;
+ $76 = $sc;
+ $77 = $1;
+ _mrb_field_write_barrier($75,$76,$77);
+ $78 = $0;
+ $79 = $sc;
+ $80 = $0;
+ $81 = (_mrb_intern_static($80,67899,12)|0);
+ $82 = $1;
+ _mrb_obj_value_675($2,$82);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+ _mrb_obj_iv_set($78,$79,$81,$$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_define_class($mrb,$name,$super) {
+ $mrb = $mrb|0;
+ $name = $name|0;
+ $super = $super|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $name;
+ $2 = $super;
+ $3 = $0;
+ $4 = $0;
+ $5 = $1;
+ $6 = (_mrb_intern_cstr($4,$5)|0);
+ $7 = $2;
+ $8 = (_mrb_define_class_id($3,$6,$7)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _mrb_vm_define_class($mrb,$outer,$super,$id) {
+ $mrb = $mrb|0;
+ $outer = $outer|0;
+ $super = $super|0;
+ $id = $id|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, $outer$byval_copy = 0, $s = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $outer$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $0 = $mrb;
+ $1 = $id;
+ $2 = ((($super)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)==(0);
+ if ($4) {
+  $5 = HEAP32[$super>>2]|0;
+  $6 = ($5|0)!=(0);
+  if ($6) {
+   label = 3;
+  } else {
+   $s = 0;
+  }
+ } else {
+  label = 3;
+ }
+ do {
+  if ((label|0) == 3) {
+   $7 = ((($super)) + 4|0);
+   $8 = HEAP32[$7>>2]|0;
+   $9 = ($8|0)!=(9);
+   if ($9) {
+    $10 = $0;
+    $11 = $0;
+    $12 = (_mrb_class_get($11,68905)|0);
+    ;HEAP8[$vararg_buffer>>0]=HEAP8[$super>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$super+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$super+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$super+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$super+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$super+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$super+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$super+7>>0]|0;
+    _mrb_raisef($10,$12,64693,$vararg_buffer);
+    // unreachable;
+   } else {
+    $13 = HEAP32[$super>>2]|0;
+    $s = $13;
+    break;
+   }
+  }
+ } while(0);
+ $14 = $0;
+ ;HEAP32[$outer$byval_copy>>2]=HEAP32[$outer>>2]|0;HEAP32[$outer$byval_copy+4>>2]=HEAP32[$outer+4>>2]|0;
+ _check_if_class_or_module($14,$outer$byval_copy);
+ $15 = $0;
+ $16 = $1;
+ $17 = $s;
+ $18 = HEAP32[$outer>>2]|0;
+ $19 = (_define_class($15,$16,$17,$18)|0);
+ $c = $19;
+ $20 = $0;
+ $21 = $c;
+ $22 = ((($21)) + 20|0);
+ $23 = HEAP32[$22>>2]|0;
+ $24 = (_mrb_class_real($23)|0);
+ $25 = $c;
+ _mrb_class_inherited($20,$24,$25);
+ $26 = $c;
+ STACKTOP = sp;return ($26|0);
+}
+function _mrb_class_inherited($mrb,$super,$klass) {
+ $mrb = $mrb|0;
+ $super = $super|0;
+ $klass = $klass|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 48|0;
+ $vararg_buffer = sp;
+ $3 = sp + 24|0;
+ $4 = sp + 16|0;
+ $5 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $super;
+ $2 = $klass;
+ $6 = $1;
+ $7 = ($6|0)!=(0|0);
+ if (!($7)) {
+  $8 = $0;
+  $9 = ((($8)) + 32|0);
+  $10 = HEAP32[$9>>2]|0;
+  $1 = $10;
+ }
+ $11 = $0;
+ $12 = $1;
+ _mrb_obj_value_675($3,$12);
+ $13 = $2;
+ _mrb_obj_value_675($4,$13);
+ ;HEAP8[$vararg_buffer>>0]=HEAP8[$4>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$4+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$4+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$4+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$4+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$4+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$4+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$4+7>>0]|0;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
+ _mrb_funcall($5,$11,$$byval_copy,64799,1,$vararg_buffer);
+ STACKTOP = sp;return;
+}
+function _mrb_class_defined($mrb,$name) {
+ $mrb = $mrb|0;
+ $name = $name|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $sym = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 24|0;
+ $sym = sp + 8|0;
+ $3 = sp;
+ $1 = $mrb;
+ $2 = $name;
+ $4 = $1;
+ $5 = $2;
+ _mrb_check_intern_cstr($sym,$4,$5);
+ $6 = ((($sym)) + 4|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ($7|0)==(0);
+ if ($8) {
+  $9 = HEAP32[$sym>>2]|0;
+  $10 = ($9|0)!=(0);
+  if (!($10)) {
+   $0 = 0;
+   $17 = $0;
+   STACKTOP = sp;return ($17|0);
+  }
+ }
+ $11 = $1;
+ $12 = $1;
+ $13 = ((($12)) + 32|0);
+ $14 = HEAP32[$13>>2]|0;
+ _mrb_obj_value_675($3,$14);
+ $15 = HEAP32[$sym>>2]|0;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
+ $16 = (_mrb_const_defined($11,$$byval_copy,$15)|0);
+ $0 = $16;
+ $17 = $0;
+ STACKTOP = sp;return ($17|0);
+}
+function _mrb_define_method_raw($mrb,$c,$mid,$p) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $mid = $mid|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $h = 0, $k = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $mid;
+ $3 = $p;
+ $4 = $1;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5 >>> 11;
+ $7 = $6 & 524288;
+ $8 = ($7|0)!=(0);
+ L1: do {
+  if ($8) {
+   $9 = $1;
+   $10 = ((($9)) + 20|0);
+   $11 = HEAP32[$10>>2]|0;
+   $1 = $11;
+   while(1) {
+    $12 = $1;
+    $13 = HEAP32[$12>>2]|0;
+    $14 = $13 >>> 11;
+    $15 = $14 & 1048576;
+    $16 = ($15|0)!=(0);
+    $17 = $16 ^ 1;
+    if (!($17)) {
+     break L1;
+    }
+    $18 = $1;
+    $19 = ((($18)) + 20|0);
+    $20 = HEAP32[$19>>2]|0;
+    $1 = $20;
+   }
+  }
+ } while(0);
+ $21 = $1;
+ $22 = ((($21)) + 16|0);
+ $23 = HEAP32[$22>>2]|0;
+ $h = $23;
+ $24 = $h;
+ $25 = ($24|0)!=(0|0);
+ if (!($25)) {
+  $26 = $0;
+  $27 = (_kh_init_mt($26)|0);
+  $28 = $1;
+  $29 = ((($28)) + 16|0);
+  HEAP32[$29>>2] = $27;
+  $h = $27;
+ }
+ $30 = $0;
+ $31 = $h;
+ $32 = $2;
+ $33 = (_kh_put_mt($30,$31,$32,0)|0);
+ $k = $33;
+ $34 = $3;
+ $35 = $k;
+ $36 = $h;
+ $37 = ((($36)) + 20|0);
+ $38 = HEAP32[$37>>2]|0;
+ $39 = (($38) + ($35<<2)|0);
+ HEAP32[$39>>2] = $34;
+ $40 = $3;
+ $41 = ($40|0)!=(0|0);
+ if (!($41)) {
+  STACKTOP = sp;return;
+ }
+ $42 = $0;
+ $43 = $1;
+ $44 = $3;
+ _mrb_field_write_barrier($42,$43,$44);
+ STACKTOP = sp;return;
+}
+function _mrb_define_method_id($mrb,$c,$mid,$func,$aspec) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $mid = $mid|0;
+ $func = $func|0;
+ $aspec = $aspec|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ai = 0;
+ var $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $mid;
+ $3 = $func;
+ $4 = $aspec;
+ $5 = $0;
+ $6 = (_mrb_gc_arena_save($5)|0);
+ $ai = $6;
+ $7 = $0;
+ $8 = $3;
+ $9 = (_mrb_proc_new_cfunc($7,$8)|0);
+ $p = $9;
+ $10 = $1;
+ $11 = $p;
+ $12 = ((($11)) + 16|0);
+ HEAP32[$12>>2] = $10;
+ $13 = $0;
+ $14 = $1;
+ $15 = $2;
+ $16 = $p;
+ _mrb_define_method_raw($13,$14,$15,$16);
+ $17 = $0;
+ $18 = $ai;
+ _mrb_gc_arena_restore($17,$18);
+ STACKTOP = sp;return;
+}
+function _mrb_define_method($mrb,$c,$name,$func,$aspec) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $name = $name|0;
+ $func = $func|0;
+ $aspec = $aspec|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $name;
+ $3 = $func;
+ $4 = $aspec;
+ $5 = $0;
+ $6 = $1;
+ $7 = $0;
+ $8 = $2;
+ $9 = (_mrb_intern_cstr($7,$8)|0);
+ $10 = $3;
+ $11 = $4;
+ _mrb_define_method_id($5,$6,$9,$10,$11);
+ STACKTOP = sp;return;
+}
+function _mrb_nil_value_703($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_get_args($mrb,$format,$varargs) {
+ $mrb = $mrb|0;
+ $format = $format|0;
+ $varargs = $varargs|0;
+ var $$byval_copy = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$byval_copy6 = 0, $$byval_copy7 = 0, $$byval_copy8 = 0, $$byval_copy9 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0;
+ var $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0;
+ var $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0;
+ var $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0;
+ var $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0;
+ var $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0;
+ var $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0;
+ var $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0;
+ var $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0;
+ var $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0;
+ var $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0;
+ var $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0;
+ var $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0;
+ var $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0;
+ var $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0;
+ var $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0.0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0;
+ var $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0.0, $395 = 0.0, $396 = 0;
+ var $397 = 0.0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0.0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0;
+ var $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0;
+ var $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0;
+ var $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0;
+ var $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0;
+ var $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0;
+ var $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0;
+ var $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0;
+ var $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0;
+ var $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0;
+ var $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0;
+ var $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0;
+ var $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $a = 0, $a8 = 0, $aa = 0, $ap = 0, $argc = 0, $arglist_current = 0;
+ var $arglist_current12 = 0, $arglist_current15 = 0, $arglist_current18 = 0, $arglist_current21 = 0, $arglist_current24 = 0, $arglist_current27 = 0, $arglist_current3 = 0, $arglist_current30 = 0, $arglist_current33 = 0, $arglist_current36 = 0, $arglist_current39 = 0, $arglist_current42 = 0, $arglist_current45 = 0, $arglist_current48 = 0, $arglist_current51 = 0, $arglist_current54 = 0, $arglist_current57 = 0, $arglist_current6 = 0, $arglist_current9 = 0, $arglist_next = 0;
+ var $arglist_next10 = 0, $arglist_next13 = 0, $arglist_next16 = 0, $arglist_next19 = 0, $arglist_next22 = 0, $arglist_next25 = 0, $arglist_next28 = 0, $arglist_next31 = 0, $arglist_next34 = 0, $arglist_next37 = 0, $arglist_next4 = 0, $arglist_next40 = 0, $arglist_next43 = 0, $arglist_next46 = 0, $arglist_next49 = 0, $arglist_next52 = 0, $arglist_next55 = 0, $arglist_next58 = 0, $arglist_next7 = 0, $b = 0;
+ var $boolp = 0, $bp = 0, $c = 0, $datap = 0, $expanded = 0, $expanded10 = 0, $expanded100 = 0, $expanded101 = 0, $expanded103 = 0, $expanded104 = 0, $expanded105 = 0, $expanded107 = 0, $expanded108 = 0, $expanded110 = 0, $expanded111 = 0, $expanded112 = 0, $expanded114 = 0, $expanded115 = 0, $expanded117 = 0, $expanded118 = 0;
+ var $expanded119 = 0, $expanded12 = 0, $expanded121 = 0, $expanded122 = 0, $expanded124 = 0, $expanded125 = 0, $expanded126 = 0, $expanded128 = 0, $expanded129 = 0, $expanded13 = 0, $expanded131 = 0, $expanded132 = 0, $expanded133 = 0, $expanded135 = 0, $expanded136 = 0, $expanded138 = 0, $expanded139 = 0, $expanded14 = 0, $expanded140 = 0, $expanded142 = 0;
+ var $expanded143 = 0, $expanded145 = 0, $expanded146 = 0, $expanded147 = 0, $expanded16 = 0, $expanded17 = 0, $expanded19 = 0, $expanded20 = 0, $expanded21 = 0, $expanded23 = 0, $expanded24 = 0, $expanded26 = 0, $expanded27 = 0, $expanded28 = 0, $expanded30 = 0, $expanded31 = 0, $expanded33 = 0, $expanded34 = 0, $expanded35 = 0, $expanded37 = 0;
+ var $expanded38 = 0, $expanded40 = 0, $expanded41 = 0, $expanded42 = 0, $expanded44 = 0, $expanded45 = 0, $expanded47 = 0, $expanded48 = 0, $expanded49 = 0, $expanded51 = 0, $expanded52 = 0, $expanded54 = 0, $expanded55 = 0, $expanded56 = 0, $expanded58 = 0, $expanded59 = 0, $expanded61 = 0, $expanded62 = 0, $expanded63 = 0, $expanded65 = 0;
+ var $expanded66 = 0, $expanded68 = 0, $expanded69 = 0, $expanded70 = 0, $expanded72 = 0, $expanded73 = 0, $expanded75 = 0, $expanded76 = 0, $expanded77 = 0, $expanded79 = 0, $expanded80 = 0, $expanded82 = 0, $expanded83 = 0, $expanded84 = 0, $expanded86 = 0, $expanded87 = 0, $expanded89 = 0, $expanded90 = 0, $expanded91 = 0, $expanded93 = 0;
+ var $expanded94 = 0, $expanded96 = 0, $expanded97 = 0, $expanded98 = 0, $f = 0.0, $given = 0, $i = 0, $opt = 0, $or$cond = 0, $p = 0, $p1 = 0, $p10 = 0, $p11 = 0, $p13 = 0, $p14 = 0, $p2 = 0, $p3 = 0, $p4 = 0, $pb = 0, $pl = 0;
+ var $pl15 = 0, $pl9 = 0, $ps = 0, $ps7 = 0, $sp = 0, $ss = 0, $ss12 = 0, $ss12$byval_copy = 0, $ss5 = 0, $ss6 = 0, $symp = 0, $type = 0, $var = 0, $vararg_buffer = 0, $vararg_buffer59 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 384|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy9 = sp + 368|0;
+ $ss12$byval_copy = sp + 360|0;
+ $$byval_copy8 = sp + 352|0;
+ $$byval_copy7 = sp + 344|0;
+ $$byval_copy6 = sp + 336|0;
+ $$byval_copy5 = sp + 328|0;
+ $$byval_copy4 = sp + 320|0;
+ $$byval_copy3 = sp + 312|0;
+ $$byval_copy2 = sp + 304|0;
+ $$byval_copy = sp + 296|0;
+ $vararg_buffer59 = sp + 8|0;
+ $vararg_buffer = sp;
+ $c = sp + 378|0;
+ $ap = sp + 264|0;
+ $ss = sp + 240|0;
+ $2 = sp + 224|0;
+ $3 = sp + 208|0;
+ $4 = sp + 192|0;
+ $ss5 = sp + 184|0;
+ $5 = sp + 168|0;
+ $ss6 = sp + 160|0;
+ $6 = sp + 144|0;
+ $aa = sp + 136|0;
+ $7 = sp + 112|0;
+ $8 = sp + 88|0;
+ $b = sp + 72|0;
+ $ss12 = sp + 56|0;
+ $9 = sp + 16|0;
+ $0 = $mrb;
+ $1 = $format;
+ $i = 0;
+ $10 = $0;
+ $11 = ((($10)) + 12|0);
+ $12 = HEAP32[$11>>2]|0;
+ $13 = ((($12)) + 4|0);
+ $14 = HEAP32[$13>>2]|0;
+ $15 = ((($14)) + 8|0);
+ $sp = $15;
+ $16 = $0;
+ $17 = ((($16)) + 12|0);
+ $18 = HEAP32[$17>>2]|0;
+ $19 = ((($18)) + 16|0);
+ $20 = HEAP32[$19>>2]|0;
+ $21 = ((($20)) + 36|0);
+ $22 = HEAP32[$21>>2]|0;
+ $argc = $22;
+ $opt = 0;
+ $given = 1;
+ HEAP32[$ap>>2] = $varargs;
+ $23 = $argc;
+ $24 = ($23|0)<(0);
+ if ($24) {
+  $25 = $0;
+  $26 = ((($25)) + 12|0);
+  $27 = HEAP32[$26>>2]|0;
+  $28 = ((($27)) + 4|0);
+  $29 = HEAP32[$28>>2]|0;
+  $30 = ((($29)) + 8|0);
+  $31 = HEAP32[$30>>2]|0;
+  $a = $31;
+  $32 = $a;
+  $33 = ((($32)) + 12|0);
+  $34 = HEAP32[$33>>2]|0;
+  $argc = $34;
+  $35 = $a;
+  $36 = ((($35)) + 20|0);
+  $37 = HEAP32[$36>>2]|0;
+  $sp = $37;
+ }
+ L3: while(1) {
+  $38 = $1;
+  $39 = ((($38)) + 1|0);
+  $1 = $39;
+  $40 = HEAP8[$38>>0]|0;
+  HEAP8[$c>>0] = $40;
+  $41 = ($40<<24>>24)!=(0);
+  $42 = HEAP8[$c>>0]|0;
+  if (!($41)) {
+   label = 98;
+   break;
+  }
+  $43 = $42 << 24 >> 24;
+  switch ($43|0) {
+  case 63: case 38: case 42: case 124:  {
+   break;
+  }
+  default: {
+   $44 = $argc;
+   $45 = $i;
+   $46 = ($44|0)<=($45|0);
+   if ($46) {
+    $47 = $opt;
+    $48 = ($47<<24>>24)!=(0);
+    if (!($48)) {
+     label = 8;
+     break L3;
+    }
+    $given = 0;
+   }
+  }
+  }
+  $52 = HEAP8[$c>>0]|0;
+  $53 = $52 << 24 >> 24;
+  do {
+   switch ($53|0) {
+   case 111:  {
+    $arglist_current = HEAP32[$ap>>2]|0;
+    $54 = $arglist_current;
+    $55 = ((0) + 4|0);
+    $expanded10 = $55;
+    $expanded = (($expanded10) - 1)|0;
+    $56 = (($54) + ($expanded))|0;
+    $57 = ((0) + 4|0);
+    $expanded14 = $57;
+    $expanded13 = (($expanded14) - 1)|0;
+    $expanded12 = $expanded13 ^ -1;
+    $58 = $56 & $expanded12;
+    $59 = $58;
+    $60 = HEAP32[$59>>2]|0;
+    $arglist_next = ((($59)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next;
+    $p = $60;
+    $61 = $i;
+    $62 = $argc;
+    $63 = ($61|0)<($62|0);
+    if (!($63)) {
+     continue L3;
+    }
+    $64 = $p;
+    $65 = $sp;
+    $66 = ((($65)) + 8|0);
+    $sp = $66;
+    ;HEAP32[$64>>2]=HEAP32[$65>>2]|0;HEAP32[$64+4>>2]=HEAP32[$65+4>>2]|0;
+    $67 = $i;
+    $68 = (($67) + 1)|0;
+    $i = $68;
+    continue L3;
+    break;
+   }
+   case 67:  {
+    $arglist_current3 = HEAP32[$ap>>2]|0;
+    $69 = $arglist_current3;
+    $70 = ((0) + 4|0);
+    $expanded17 = $70;
+    $expanded16 = (($expanded17) - 1)|0;
+    $71 = (($69) + ($expanded16))|0;
+    $72 = ((0) + 4|0);
+    $expanded21 = $72;
+    $expanded20 = (($expanded21) - 1)|0;
+    $expanded19 = $expanded20 ^ -1;
+    $73 = $71 & $expanded19;
+    $74 = $73;
+    $75 = HEAP32[$74>>2]|0;
+    $arglist_next4 = ((($74)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next4;
+    $p1 = $75;
+    $76 = $i;
+    $77 = $argc;
+    $78 = ($76|0)<($77|0);
+    if (!($78)) {
+     continue L3;
+    }
+    $79 = $sp;
+    $80 = ((($79)) + 8|0);
+    $sp = $80;
+    ;HEAP32[$ss>>2]=HEAP32[$79>>2]|0;HEAP32[$ss+4>>2]=HEAP32[$79+4>>2]|0;
+    $81 = ((($ss)) + 4|0);
+    $82 = HEAP32[$81>>2]|0;
+    switch ($82|0) {
+    case 12: case 10: case 9:  {
+     break;
+    }
+    default: {
+     label = 14;
+     break L3;
+    }
+    }
+    $86 = $p1;
+    ;HEAP32[$86>>2]=HEAP32[$ss>>2]|0;HEAP32[$86+4>>2]=HEAP32[$ss+4>>2]|0;
+    $87 = $i;
+    $88 = (($87) + 1)|0;
+    $i = $88;
+    continue L3;
+    break;
+   }
+   case 83:  {
+    $arglist_current6 = HEAP32[$ap>>2]|0;
+    $89 = $arglist_current6;
+    $90 = ((0) + 4|0);
+    $expanded24 = $90;
+    $expanded23 = (($expanded24) - 1)|0;
+    $91 = (($89) + ($expanded23))|0;
+    $92 = ((0) + 4|0);
+    $expanded28 = $92;
+    $expanded27 = (($expanded28) - 1)|0;
+    $expanded26 = $expanded27 ^ -1;
+    $93 = $91 & $expanded26;
+    $94 = $93;
+    $95 = HEAP32[$94>>2]|0;
+    $arglist_next7 = ((($94)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next7;
+    $p2 = $95;
+    $96 = $1;
+    $97 = HEAP8[$96>>0]|0;
+    $98 = $97 << 24 >> 24;
+    $99 = ($98|0)==(33);
+    if ($99) {
+     $100 = $1;
+     $101 = ((($100)) + 1|0);
+     $1 = $101;
+     $102 = $i;
+     $103 = $argc;
+     $104 = ($102|0)<($103|0);
+     if ($104) {
+      $105 = $sp;
+      $106 = ((($105)) + 4|0);
+      $107 = HEAP32[$106>>2]|0;
+      $108 = ($107|0)==(0);
+      if ($108) {
+       $109 = $sp;
+       $110 = HEAP32[$109>>2]|0;
+       $111 = ($110|0)!=(0);
+       if (!($111)) {
+        $112 = $p2;
+        $113 = $sp;
+        $114 = ((($113)) + 8|0);
+        $sp = $114;
+        ;HEAP32[$112>>2]=HEAP32[$113>>2]|0;HEAP32[$112+4>>2]=HEAP32[$113+4>>2]|0;
+        $115 = $i;
+        $116 = (($115) + 1)|0;
+        $i = $116;
+        continue L3;
+       }
+      }
+     }
+    }
+    $117 = $i;
+    $118 = $argc;
+    $119 = ($117|0)<($118|0);
+    if (!($119)) {
+     continue L3;
+    }
+    $120 = $p2;
+    $121 = $0;
+    $122 = $sp;
+    $123 = ((($122)) + 8|0);
+    $sp = $123;
+    ;HEAP32[$$byval_copy>>2]=HEAP32[$122>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$122+4>>2]|0;
+    _to_str($2,$121,$$byval_copy);
+    ;HEAP32[$120>>2]=HEAP32[$2>>2]|0;HEAP32[$120+4>>2]=HEAP32[$2+4>>2]|0;
+    $124 = $i;
+    $125 = (($124) + 1)|0;
+    $i = $125;
+    continue L3;
+    break;
+   }
+   case 65:  {
+    $arglist_current9 = HEAP32[$ap>>2]|0;
+    $126 = $arglist_current9;
+    $127 = ((0) + 4|0);
+    $expanded31 = $127;
+    $expanded30 = (($expanded31) - 1)|0;
+    $128 = (($126) + ($expanded30))|0;
+    $129 = ((0) + 4|0);
+    $expanded35 = $129;
+    $expanded34 = (($expanded35) - 1)|0;
+    $expanded33 = $expanded34 ^ -1;
+    $130 = $128 & $expanded33;
+    $131 = $130;
+    $132 = HEAP32[$131>>2]|0;
+    $arglist_next10 = ((($131)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next10;
+    $p3 = $132;
+    $133 = $1;
+    $134 = HEAP8[$133>>0]|0;
+    $135 = $134 << 24 >> 24;
+    $136 = ($135|0)==(33);
+    if ($136) {
+     $137 = $1;
+     $138 = ((($137)) + 1|0);
+     $1 = $138;
+     $139 = $i;
+     $140 = $argc;
+     $141 = ($139|0)<($140|0);
+     if ($141) {
+      $142 = $sp;
+      $143 = ((($142)) + 4|0);
+      $144 = HEAP32[$143>>2]|0;
+      $145 = ($144|0)==(0);
+      if ($145) {
+       $146 = $sp;
+       $147 = HEAP32[$146>>2]|0;
+       $148 = ($147|0)!=(0);
+       if (!($148)) {
+        $149 = $p3;
+        $150 = $sp;
+        $151 = ((($150)) + 8|0);
+        $sp = $151;
+        ;HEAP32[$149>>2]=HEAP32[$150>>2]|0;HEAP32[$149+4>>2]=HEAP32[$150+4>>2]|0;
+        $152 = $i;
+        $153 = (($152) + 1)|0;
+        $i = $153;
+        continue L3;
+       }
+      }
+     }
+    }
+    $154 = $i;
+    $155 = $argc;
+    $156 = ($154|0)<($155|0);
+    if (!($156)) {
+     continue L3;
+    }
+    $157 = $p3;
+    $158 = $0;
+    $159 = $sp;
+    $160 = ((($159)) + 8|0);
+    $sp = $160;
+    ;HEAP32[$$byval_copy2>>2]=HEAP32[$159>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$159+4>>2]|0;
+    _to_ary($3,$158,$$byval_copy2);
+    ;HEAP32[$157>>2]=HEAP32[$3>>2]|0;HEAP32[$157+4>>2]=HEAP32[$3+4>>2]|0;
+    $161 = $i;
+    $162 = (($161) + 1)|0;
+    $i = $162;
+    continue L3;
+    break;
+   }
+   case 72:  {
+    $arglist_current12 = HEAP32[$ap>>2]|0;
+    $163 = $arglist_current12;
+    $164 = ((0) + 4|0);
+    $expanded38 = $164;
+    $expanded37 = (($expanded38) - 1)|0;
+    $165 = (($163) + ($expanded37))|0;
+    $166 = ((0) + 4|0);
+    $expanded42 = $166;
+    $expanded41 = (($expanded42) - 1)|0;
+    $expanded40 = $expanded41 ^ -1;
+    $167 = $165 & $expanded40;
+    $168 = $167;
+    $169 = HEAP32[$168>>2]|0;
+    $arglist_next13 = ((($168)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next13;
+    $p4 = $169;
+    $170 = $1;
+    $171 = HEAP8[$170>>0]|0;
+    $172 = $171 << 24 >> 24;
+    $173 = ($172|0)==(33);
+    if ($173) {
+     $174 = $1;
+     $175 = ((($174)) + 1|0);
+     $1 = $175;
+     $176 = $i;
+     $177 = $argc;
+     $178 = ($176|0)<($177|0);
+     if ($178) {
+      $179 = $sp;
+      $180 = ((($179)) + 4|0);
+      $181 = HEAP32[$180>>2]|0;
+      $182 = ($181|0)==(0);
+      if ($182) {
+       $183 = $sp;
+       $184 = HEAP32[$183>>2]|0;
+       $185 = ($184|0)!=(0);
+       if (!($185)) {
+        $186 = $p4;
+        $187 = $sp;
+        $188 = ((($187)) + 8|0);
+        $sp = $188;
+        ;HEAP32[$186>>2]=HEAP32[$187>>2]|0;HEAP32[$186+4>>2]=HEAP32[$187+4>>2]|0;
+        $189 = $i;
+        $190 = (($189) + 1)|0;
+        $i = $190;
+        continue L3;
+       }
+      }
+     }
+    }
+    $191 = $i;
+    $192 = $argc;
+    $193 = ($191|0)<($192|0);
+    if (!($193)) {
+     continue L3;
+    }
+    $194 = $p4;
+    $195 = $0;
+    $196 = $sp;
+    $197 = ((($196)) + 8|0);
+    $sp = $197;
+    ;HEAP32[$$byval_copy3>>2]=HEAP32[$196>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$196+4>>2]|0;
+    _to_hash($4,$195,$$byval_copy3);
+    ;HEAP32[$194>>2]=HEAP32[$4>>2]|0;HEAP32[$194+4>>2]=HEAP32[$4+4>>2]|0;
+    $198 = $i;
+    $199 = (($198) + 1)|0;
+    $i = $199;
+    continue L3;
+    break;
+   }
+   case 115:  {
+    $ps = 0;
+    $pl = 0;
+    $arglist_current15 = HEAP32[$ap>>2]|0;
+    $200 = $arglist_current15;
+    $201 = ((0) + 4|0);
+    $expanded45 = $201;
+    $expanded44 = (($expanded45) - 1)|0;
+    $202 = (($200) + ($expanded44))|0;
+    $203 = ((0) + 4|0);
+    $expanded49 = $203;
+    $expanded48 = (($expanded49) - 1)|0;
+    $expanded47 = $expanded48 ^ -1;
+    $204 = $202 & $expanded47;
+    $205 = $204;
+    $206 = HEAP32[$205>>2]|0;
+    $arglist_next16 = ((($205)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next16;
+    $ps = $206;
+    $arglist_current18 = HEAP32[$ap>>2]|0;
+    $207 = $arglist_current18;
+    $208 = ((0) + 4|0);
+    $expanded52 = $208;
+    $expanded51 = (($expanded52) - 1)|0;
+    $209 = (($207) + ($expanded51))|0;
+    $210 = ((0) + 4|0);
+    $expanded56 = $210;
+    $expanded55 = (($expanded56) - 1)|0;
+    $expanded54 = $expanded55 ^ -1;
+    $211 = $209 & $expanded54;
+    $212 = $211;
+    $213 = HEAP32[$212>>2]|0;
+    $arglist_next19 = ((($212)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next19;
+    $pl = $213;
+    $214 = $1;
+    $215 = HEAP8[$214>>0]|0;
+    $216 = $215 << 24 >> 24;
+    $217 = ($216|0)==(33);
+    if ($217) {
+     $218 = $1;
+     $219 = ((($218)) + 1|0);
+     $1 = $219;
+     $220 = $i;
+     $221 = $argc;
+     $222 = ($220|0)<($221|0);
+     if ($222) {
+      $223 = $sp;
+      $224 = ((($223)) + 4|0);
+      $225 = HEAP32[$224>>2]|0;
+      $226 = ($225|0)==(0);
+      if ($226) {
+       $227 = $sp;
+       $228 = HEAP32[$227>>2]|0;
+       $229 = ($228|0)!=(0);
+       if (!($229)) {
+        $230 = $ps;
+        HEAP32[$230>>2] = 0;
+        $231 = $pl;
+        HEAP32[$231>>2] = 0;
+        $232 = $i;
+        $233 = (($232) + 1)|0;
+        $i = $233;
+        continue L3;
+       }
+      }
+     }
+    }
+    $234 = $i;
+    $235 = $argc;
+    $236 = ($234|0)<($235|0);
+    if (!($236)) {
+     continue L3;
+    }
+    $237 = $0;
+    $238 = $sp;
+    $239 = ((($238)) + 8|0);
+    $sp = $239;
+    ;HEAP32[$$byval_copy4>>2]=HEAP32[$238>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$238+4>>2]|0;
+    _to_str($5,$237,$$byval_copy4);
+    ;HEAP32[$ss5>>2]=HEAP32[$5>>2]|0;HEAP32[$ss5+4>>2]=HEAP32[$5+4>>2]|0;
+    $240 = HEAP32[$ss5>>2]|0;
+    $241 = HEAP32[$240>>2]|0;
+    $242 = $241 >>> 11;
+    $243 = $242 & 8;
+    $244 = ($243|0)!=(0);
+    $245 = HEAP32[$ss5>>2]|0;
+    $246 = ((($245)) + 12|0);
+    if ($244) {
+     $250 = $246;
+    } else {
+     $247 = ((($246)) + 8|0);
+     $248 = HEAP32[$247>>2]|0;
+     $250 = $248;
+    }
+    $249 = $ps;
+    HEAP32[$249>>2] = $250;
+    $251 = HEAP32[$ss5>>2]|0;
+    $252 = HEAP32[$251>>2]|0;
+    $253 = $252 >>> 11;
+    $254 = $253 & 8;
+    $255 = ($254|0)!=(0);
+    $256 = HEAP32[$ss5>>2]|0;
+    if ($255) {
+     $257 = HEAP32[$256>>2]|0;
+     $258 = $257 >>> 11;
+     $259 = $258 & 496;
+     $260 = $259 >> 4;
+     $264 = $260;
+    } else {
+     $261 = ((($256)) + 12|0);
+     $262 = HEAP32[$261>>2]|0;
+     $264 = $262;
+    }
+    $263 = $pl;
+    HEAP32[$263>>2] = $264;
+    $265 = $i;
+    $266 = (($265) + 1)|0;
+    $i = $266;
+    continue L3;
+    break;
+   }
+   case 122:  {
+    $arglist_current21 = HEAP32[$ap>>2]|0;
+    $267 = $arglist_current21;
+    $268 = ((0) + 4|0);
+    $expanded59 = $268;
+    $expanded58 = (($expanded59) - 1)|0;
+    $269 = (($267) + ($expanded58))|0;
+    $270 = ((0) + 4|0);
+    $expanded63 = $270;
+    $expanded62 = (($expanded63) - 1)|0;
+    $expanded61 = $expanded62 ^ -1;
+    $271 = $269 & $expanded61;
+    $272 = $271;
+    $273 = HEAP32[$272>>2]|0;
+    $arglist_next22 = ((($272)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next22;
+    $ps7 = $273;
+    $274 = $1;
+    $275 = HEAP8[$274>>0]|0;
+    $276 = $275 << 24 >> 24;
+    $277 = ($276|0)==(33);
+    if ($277) {
+     $278 = $1;
+     $279 = ((($278)) + 1|0);
+     $1 = $279;
+     $280 = $i;
+     $281 = $argc;
+     $282 = ($280|0)<($281|0);
+     if ($282) {
+      $283 = $sp;
+      $284 = ((($283)) + 4|0);
+      $285 = HEAP32[$284>>2]|0;
+      $286 = ($285|0)==(0);
+      if ($286) {
+       $287 = $sp;
+       $288 = HEAP32[$287>>2]|0;
+       $289 = ($288|0)!=(0);
+       if (!($289)) {
+        $290 = $ps7;
+        HEAP32[$290>>2] = 0;
+        $291 = $i;
+        $292 = (($291) + 1)|0;
+        $i = $292;
+        $293 = $sp;
+        $294 = ((($293)) + 8|0);
+        $sp = $294;
+        continue L3;
+       }
+      }
+     }
+    }
+    $295 = $i;
+    $296 = $argc;
+    $297 = ($295|0)<($296|0);
+    if (!($297)) {
+     continue L3;
+    }
+    $298 = $0;
+    $299 = $sp;
+    $300 = ((($299)) + 8|0);
+    $sp = $300;
+    ;HEAP32[$$byval_copy5>>2]=HEAP32[$299>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$299+4>>2]|0;
+    _to_str($6,$298,$$byval_copy5);
+    ;HEAP32[$ss6>>2]=HEAP32[$6>>2]|0;HEAP32[$ss6+4>>2]=HEAP32[$6+4>>2]|0;
+    $301 = $0;
+    $302 = (_mrb_string_value_cstr($301,$ss6)|0);
+    $303 = $ps7;
+    HEAP32[$303>>2] = $302;
+    $304 = $i;
+    $305 = (($304) + 1)|0;
+    $i = $305;
+    continue L3;
+    break;
+   }
+   case 97:  {
+    $arglist_current24 = HEAP32[$ap>>2]|0;
+    $306 = $arglist_current24;
+    $307 = ((0) + 4|0);
+    $expanded66 = $307;
+    $expanded65 = (($expanded66) - 1)|0;
+    $308 = (($306) + ($expanded65))|0;
+    $309 = ((0) + 4|0);
+    $expanded70 = $309;
+    $expanded69 = (($expanded70) - 1)|0;
+    $expanded68 = $expanded69 ^ -1;
+    $310 = $308 & $expanded68;
+    $311 = $310;
+    $312 = HEAP32[$311>>2]|0;
+    $arglist_next25 = ((($311)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next25;
+    $pb = $312;
+    $arglist_current27 = HEAP32[$ap>>2]|0;
+    $313 = $arglist_current27;
+    $314 = ((0) + 4|0);
+    $expanded73 = $314;
+    $expanded72 = (($expanded73) - 1)|0;
+    $315 = (($313) + ($expanded72))|0;
+    $316 = ((0) + 4|0);
+    $expanded77 = $316;
+    $expanded76 = (($expanded77) - 1)|0;
+    $expanded75 = $expanded76 ^ -1;
+    $317 = $315 & $expanded75;
+    $318 = $317;
+    $319 = HEAP32[$318>>2]|0;
+    $arglist_next28 = ((($318)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next28;
+    $pl9 = $319;
+    $320 = $1;
+    $321 = HEAP8[$320>>0]|0;
+    $322 = $321 << 24 >> 24;
+    $323 = ($322|0)==(33);
+    if ($323) {
+     $324 = $1;
+     $325 = ((($324)) + 1|0);
+     $1 = $325;
+     $326 = $i;
+     $327 = $argc;
+     $328 = ($326|0)<($327|0);
+     if ($328) {
+      $329 = $sp;
+      $330 = ((($329)) + 4|0);
+      $331 = HEAP32[$330>>2]|0;
+      $332 = ($331|0)==(0);
+      if ($332) {
+       $333 = $sp;
+       $334 = HEAP32[$333>>2]|0;
+       $335 = ($334|0)!=(0);
+       if (!($335)) {
+        $336 = $pb;
+        HEAP32[$336>>2] = 0;
+        $337 = $pl9;
+        HEAP32[$337>>2] = 0;
+        $338 = $i;
+        $339 = (($338) + 1)|0;
+        $i = $339;
+        $340 = $sp;
+        $341 = ((($340)) + 8|0);
+        $sp = $341;
+        continue L3;
+       }
+      }
+     }
+    }
+    $342 = $i;
+    $343 = $argc;
+    $344 = ($342|0)<($343|0);
+    if (!($344)) {
+     continue L3;
+    }
+    $345 = $0;
+    $346 = $sp;
+    $347 = ((($346)) + 8|0);
+    $sp = $347;
+    ;HEAP32[$$byval_copy6>>2]=HEAP32[$346>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$346+4>>2]|0;
+    _to_ary($7,$345,$$byval_copy6);
+    ;HEAP32[$aa>>2]=HEAP32[$7>>2]|0;HEAP32[$aa+4>>2]=HEAP32[$7+4>>2]|0;
+    $348 = HEAP32[$aa>>2]|0;
+    $a8 = $348;
+    $349 = $a8;
+    $350 = ((($349)) + 20|0);
+    $351 = HEAP32[$350>>2]|0;
+    $352 = $pb;
+    HEAP32[$352>>2] = $351;
+    $353 = $a8;
+    $354 = ((($353)) + 12|0);
+    $355 = HEAP32[$354>>2]|0;
+    $356 = $pl9;
+    HEAP32[$356>>2] = $355;
+    $357 = $i;
+    $358 = (($357) + 1)|0;
+    $i = $358;
+    continue L3;
+    break;
+   }
+   case 102:  {
+    $arglist_current30 = HEAP32[$ap>>2]|0;
+    $359 = $arglist_current30;
+    $360 = ((0) + 4|0);
+    $expanded80 = $360;
+    $expanded79 = (($expanded80) - 1)|0;
+    $361 = (($359) + ($expanded79))|0;
+    $362 = ((0) + 4|0);
+    $expanded84 = $362;
+    $expanded83 = (($expanded84) - 1)|0;
+    $expanded82 = $expanded83 ^ -1;
+    $363 = $361 & $expanded82;
+    $364 = $363;
+    $365 = HEAP32[$364>>2]|0;
+    $arglist_next31 = ((($364)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next31;
+    $p10 = $365;
+    $366 = $i;
+    $367 = $argc;
+    $368 = ($366|0)<($367|0);
+    if (!($368)) {
+     continue L3;
+    }
+    $369 = $0;
+    $370 = $sp;
+    ;HEAP32[$$byval_copy7>>2]=HEAP32[$370>>2]|0;HEAP32[$$byval_copy7+4>>2]=HEAP32[$370+4>>2]|0;
+    $371 = (+_mrb_to_flo($369,$$byval_copy7));
+    $372 = $p10;
+    HEAPF32[$372>>2] = $371;
+    $373 = $sp;
+    $374 = ((($373)) + 8|0);
+    $sp = $374;
+    $375 = $i;
+    $376 = (($375) + 1)|0;
+    $i = $376;
+    continue L3;
+    break;
+   }
+   case 105:  {
+    $arglist_current33 = HEAP32[$ap>>2]|0;
+    $377 = $arglist_current33;
+    $378 = ((0) + 4|0);
+    $expanded87 = $378;
+    $expanded86 = (($expanded87) - 1)|0;
+    $379 = (($377) + ($expanded86))|0;
+    $380 = ((0) + 4|0);
+    $expanded91 = $380;
+    $expanded90 = (($expanded91) - 1)|0;
+    $expanded89 = $expanded90 ^ -1;
+    $381 = $379 & $expanded89;
+    $382 = $381;
+    $383 = HEAP32[$382>>2]|0;
+    $arglist_next34 = ((($382)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next34;
+    $p11 = $383;
+    $384 = $i;
+    $385 = $argc;
+    $386 = ($384|0)<($385|0);
+    if (!($386)) {
+     continue L3;
+    }
+    $387 = $sp;
+    $388 = ((($387)) + 4|0);
+    $389 = HEAP32[$388>>2]|0;
+    switch ($389|0) {
+    case 16:  {
+     label = 72;
+     break L3;
+     break;
+    }
+    case 3:  {
+     $390 = $sp;
+     $391 = HEAP32[$390>>2]|0;
+     $392 = $p11;
+     HEAP32[$392>>2] = $391;
+     break;
+    }
+    case 6:  {
+     $393 = $sp;
+     $394 = +HEAPF32[$393>>2];
+     $f = $394;
+     $395 = $f;
+     $396 = $395 <= 2147483648.0;
+     $397 = $f;
+     $398 = $397 >= -2147483648.0;
+     $or$cond = $396 & $398;
+     if (!($or$cond)) {
+      label = 70;
+      break L3;
+     }
+     $402 = $f;
+     $403 = (~~(($402)));
+     $404 = $p11;
+     HEAP32[$404>>2] = $403;
+     break;
+    }
+    default: {
+     $408 = $0;
+     $409 = $sp;
+     ;HEAP32[$$byval_copy8>>2]=HEAP32[$409>>2]|0;HEAP32[$$byval_copy8+4>>2]=HEAP32[$409+4>>2]|0;
+     _mrb_Integer($8,$408,$$byval_copy8);
+     $410 = HEAP32[$8>>2]|0;
+     $411 = $p11;
+     HEAP32[$411>>2] = $410;
+    }
+    }
+    $412 = $sp;
+    $413 = ((($412)) + 8|0);
+    $sp = $413;
+    $414 = $i;
+    $415 = (($414) + 1)|0;
+    $i = $415;
+    continue L3;
+    break;
+   }
+   case 98:  {
+    $arglist_current36 = HEAP32[$ap>>2]|0;
+    $416 = $arglist_current36;
+    $417 = ((0) + 4|0);
+    $expanded94 = $417;
+    $expanded93 = (($expanded94) - 1)|0;
+    $418 = (($416) + ($expanded93))|0;
+    $419 = ((0) + 4|0);
+    $expanded98 = $419;
+    $expanded97 = (($expanded98) - 1)|0;
+    $expanded96 = $expanded97 ^ -1;
+    $420 = $418 & $expanded96;
+    $421 = $420;
+    $422 = HEAP32[$421>>2]|0;
+    $arglist_next37 = ((($421)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next37;
+    $boolp = $422;
+    $423 = $i;
+    $424 = $argc;
+    $425 = ($423|0)<($424|0);
+    if (!($425)) {
+     continue L3;
+    }
+    $426 = $sp;
+    $427 = ((($426)) + 8|0);
+    $sp = $427;
+    ;HEAP32[$b>>2]=HEAP32[$426>>2]|0;HEAP32[$b+4>>2]=HEAP32[$426+4>>2]|0;
+    $428 = ((($b)) + 4|0);
+    $429 = HEAP32[$428>>2]|0;
+    $430 = ($429|0)!=(0);
+    $431 = $430&1;
+    $432 = $431&255;
+    $433 = $boolp;
+    HEAP8[$433>>0] = $432;
+    $434 = $i;
+    $435 = (($434) + 1)|0;
+    $i = $435;
+    continue L3;
+    break;
+   }
+   case 110:  {
+    $arglist_current39 = HEAP32[$ap>>2]|0;
+    $436 = $arglist_current39;
+    $437 = ((0) + 4|0);
+    $expanded101 = $437;
+    $expanded100 = (($expanded101) - 1)|0;
+    $438 = (($436) + ($expanded100))|0;
+    $439 = ((0) + 4|0);
+    $expanded105 = $439;
+    $expanded104 = (($expanded105) - 1)|0;
+    $expanded103 = $expanded104 ^ -1;
+    $440 = $438 & $expanded103;
+    $441 = $440;
+    $442 = HEAP32[$441>>2]|0;
+    $arglist_next40 = ((($441)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next40;
+    $symp = $442;
+    $443 = $i;
+    $444 = $argc;
+    $445 = ($443|0)<($444|0);
+    if (!($445)) {
+     continue L3;
+    }
+    $446 = $sp;
+    $447 = ((($446)) + 8|0);
+    $sp = $447;
+    ;HEAP32[$ss12>>2]=HEAP32[$446>>2]|0;HEAP32[$ss12+4>>2]=HEAP32[$446+4>>2]|0;
+    $448 = $0;
+    ;HEAP32[$ss12$byval_copy>>2]=HEAP32[$ss12>>2]|0;HEAP32[$ss12$byval_copy+4>>2]=HEAP32[$ss12+4>>2]|0;
+    $449 = (_to_sym($448,$ss12$byval_copy)|0);
+    $450 = $symp;
+    HEAP32[$450>>2] = $449;
+    $451 = $i;
+    $452 = (($451) + 1)|0;
+    $i = $452;
+    continue L3;
+    break;
+   }
+   case 100:  {
+    $arglist_current42 = HEAP32[$ap>>2]|0;
+    $453 = $arglist_current42;
+    $454 = ((0) + 4|0);
+    $expanded108 = $454;
+    $expanded107 = (($expanded108) - 1)|0;
+    $455 = (($453) + ($expanded107))|0;
+    $456 = ((0) + 4|0);
+    $expanded112 = $456;
+    $expanded111 = (($expanded112) - 1)|0;
+    $expanded110 = $expanded111 ^ -1;
+    $457 = $455 & $expanded110;
+    $458 = $457;
+    $459 = HEAP32[$458>>2]|0;
+    $arglist_next43 = ((($458)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next43;
+    $datap = $459;
+    $arglist_current45 = HEAP32[$ap>>2]|0;
+    $460 = $arglist_current45;
+    $461 = ((0) + 4|0);
+    $expanded115 = $461;
+    $expanded114 = (($expanded115) - 1)|0;
+    $462 = (($460) + ($expanded114))|0;
+    $463 = ((0) + 4|0);
+    $expanded119 = $463;
+    $expanded118 = (($expanded119) - 1)|0;
+    $expanded117 = $expanded118 ^ -1;
+    $464 = $462 & $expanded117;
+    $465 = $464;
+    $466 = HEAP32[$465>>2]|0;
+    $arglist_next46 = ((($465)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next46;
+    $type = $466;
+    $467 = $1;
+    $468 = HEAP8[$467>>0]|0;
+    $469 = $468 << 24 >> 24;
+    $470 = ($469|0)==(33);
+    if ($470) {
+     $471 = $1;
+     $472 = ((($471)) + 1|0);
+     $1 = $472;
+     $473 = $i;
+     $474 = $argc;
+     $475 = ($473|0)<($474|0);
+     if ($475) {
+      $476 = $sp;
+      $477 = ((($476)) + 4|0);
+      $478 = HEAP32[$477>>2]|0;
+      $479 = ($478|0)==(0);
+      if ($479) {
+       $480 = $sp;
+       $481 = HEAP32[$480>>2]|0;
+       $482 = ($481|0)!=(0);
+       if (!($482)) {
+        $483 = $datap;
+        HEAP32[$483>>2] = 0;
+        $484 = $i;
+        $485 = (($484) + 1)|0;
+        $i = $485;
+        $486 = $sp;
+        $487 = ((($486)) + 8|0);
+        $sp = $487;
+        continue L3;
+       }
+      }
+     }
+    }
+    $488 = $i;
+    $489 = $argc;
+    $490 = ($488|0)<($489|0);
+    if (!($490)) {
+     continue L3;
+    }
+    $491 = $0;
+    $492 = $sp;
+    $493 = ((($492)) + 8|0);
+    $sp = $493;
+    $494 = $type;
+    ;HEAP32[$$byval_copy9>>2]=HEAP32[$492>>2]|0;HEAP32[$$byval_copy9+4>>2]=HEAP32[$492+4>>2]|0;
+    $495 = (_mrb_data_get_ptr($491,$$byval_copy9,$494)|0);
+    $496 = $datap;
+    HEAP32[$496>>2] = $495;
+    $497 = $i;
+    $498 = (($497) + 1)|0;
+    $i = $498;
+    continue L3;
+    break;
+   }
+   case 38:  {
+    $arglist_current48 = HEAP32[$ap>>2]|0;
+    $499 = $arglist_current48;
+    $500 = ((0) + 4|0);
+    $expanded122 = $500;
+    $expanded121 = (($expanded122) - 1)|0;
+    $501 = (($499) + ($expanded121))|0;
+    $502 = ((0) + 4|0);
+    $expanded126 = $502;
+    $expanded125 = (($expanded126) - 1)|0;
+    $expanded124 = $expanded125 ^ -1;
+    $503 = $501 & $expanded124;
+    $504 = $503;
+    $505 = HEAP32[$504>>2]|0;
+    $arglist_next49 = ((($504)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next49;
+    $p13 = $505;
+    $506 = $0;
+    $507 = ((($506)) + 12|0);
+    $508 = HEAP32[$507>>2]|0;
+    $509 = ((($508)) + 16|0);
+    $510 = HEAP32[$509>>2]|0;
+    $511 = ((($510)) + 36|0);
+    $512 = HEAP32[$511>>2]|0;
+    $513 = ($512|0)<(0);
+    $514 = $0;
+    $515 = ((($514)) + 12|0);
+    $516 = HEAP32[$515>>2]|0;
+    $517 = ((($516)) + 4|0);
+    $518 = HEAP32[$517>>2]|0;
+    if ($513) {
+     $519 = ((($518)) + 16|0);
+     $bp = $519;
+    } else {
+     $520 = $0;
+     $521 = ((($520)) + 12|0);
+     $522 = HEAP32[$521>>2]|0;
+     $523 = ((($522)) + 16|0);
+     $524 = HEAP32[$523>>2]|0;
+     $525 = ((($524)) + 36|0);
+     $526 = HEAP32[$525>>2]|0;
+     $527 = (($518) + ($526<<3)|0);
+     $528 = ((($527)) + 8|0);
+     $bp = $528;
+    }
+    $529 = $p13;
+    $530 = $bp;
+    ;HEAP32[$529>>2]=HEAP32[$530>>2]|0;HEAP32[$529+4>>2]=HEAP32[$530+4>>2]|0;
+    continue L3;
+    break;
+   }
+   case 124:  {
+    $opt = 1;
+    continue L3;
+    break;
+   }
+   case 63:  {
+    $arglist_current51 = HEAP32[$ap>>2]|0;
+    $531 = $arglist_current51;
+    $532 = ((0) + 4|0);
+    $expanded129 = $532;
+    $expanded128 = (($expanded129) - 1)|0;
+    $533 = (($531) + ($expanded128))|0;
+    $534 = ((0) + 4|0);
+    $expanded133 = $534;
+    $expanded132 = (($expanded133) - 1)|0;
+    $expanded131 = $expanded132 ^ -1;
+    $535 = $533 & $expanded131;
+    $536 = $535;
+    $537 = HEAP32[$536>>2]|0;
+    $arglist_next52 = ((($536)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next52;
+    $p14 = $537;
+    $538 = $given;
+    $539 = $p14;
+    HEAP8[$539>>0] = $538;
+    continue L3;
+    break;
+   }
+   case 42:  {
+    $arglist_current54 = HEAP32[$ap>>2]|0;
+    $540 = $arglist_current54;
+    $541 = ((0) + 4|0);
+    $expanded136 = $541;
+    $expanded135 = (($expanded136) - 1)|0;
+    $542 = (($540) + ($expanded135))|0;
+    $543 = ((0) + 4|0);
+    $expanded140 = $543;
+    $expanded139 = (($expanded140) - 1)|0;
+    $expanded138 = $expanded139 ^ -1;
+    $544 = $542 & $expanded138;
+    $545 = $544;
+    $546 = HEAP32[$545>>2]|0;
+    $arglist_next55 = ((($545)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next55;
+    $var = $546;
+    $arglist_current57 = HEAP32[$ap>>2]|0;
+    $547 = $arglist_current57;
+    $548 = ((0) + 4|0);
+    $expanded143 = $548;
+    $expanded142 = (($expanded143) - 1)|0;
+    $549 = (($547) + ($expanded142))|0;
+    $550 = ((0) + 4|0);
+    $expanded147 = $550;
+    $expanded146 = (($expanded147) - 1)|0;
+    $expanded145 = $expanded146 ^ -1;
+    $551 = $549 & $expanded145;
+    $552 = $551;
+    $553 = HEAP32[$552>>2]|0;
+    $arglist_next58 = ((($552)) + 4|0);
+    HEAP32[$ap>>2] = $arglist_next58;
+    $pl15 = $553;
+    $554 = $argc;
+    $555 = $i;
+    $556 = ($554|0)>($555|0);
+    if (!($556)) {
+     $571 = $pl15;
+     HEAP32[$571>>2] = 0;
+     $572 = $var;
+     HEAP32[$572>>2] = 0;
+     continue L3;
+    }
+    $557 = $argc;
+    $558 = $i;
+    $559 = (($557) - ($558))|0;
+    $560 = $pl15;
+    HEAP32[$560>>2] = $559;
+    $561 = $pl15;
+    $562 = HEAP32[$561>>2]|0;
+    $563 = ($562|0)>(0);
+    if ($563) {
+     $564 = $sp;
+     $565 = $var;
+     HEAP32[$565>>2] = $564;
+    }
+    $566 = $argc;
+    $i = $566;
+    $567 = $pl15;
+    $568 = HEAP32[$567>>2]|0;
+    $569 = $sp;
+    $570 = (($569) + ($568<<3)|0);
+    $sp = $570;
+    continue L3;
+    break;
+   }
+   default: {
+    label = 97;
+    break L3;
+   }
+   }
+  } while(0);
+ }
+ if ((label|0) == 8) {
+  $49 = $0;
+  $50 = $0;
+  $51 = (_mrb_class_get($50,68855)|0);
+  _mrb_raise($49,$51,64829);
+  // unreachable;
+ }
+ else if ((label|0) == 14) {
+  $83 = $0;
+  $84 = $0;
+  $85 = (_mrb_class_get($84,68905)|0);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$ss>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$ss+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$ss+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$ss+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$ss+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$ss+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$ss+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$ss+7>>0]|0;
+  _mrb_raisef($83,$85,64855,$vararg_buffer);
+  // unreachable;
+ }
+ else if ((label|0) == 70) {
+  $399 = $0;
+  $400 = $0;
+  $401 = (_mrb_class_get($400,64930)|0);
+  _mrb_raise($399,$401,64941);
+  // unreachable;
+ }
+ else if ((label|0) == 72) {
+  $405 = $0;
+  $406 = $0;
+  $407 = (_mrb_class_get($406,68905)|0);
+  _mrb_raise($405,$407,64963);
+  // unreachable;
+ }
+ else if ((label|0) == 97) {
+  $573 = $0;
+  $574 = $0;
+  $575 = (_mrb_class_get($574,68855)|0);
+  $576 = $0;
+  _mrb_str_new($9,$576,$c,1);
+  ;HEAP8[$vararg_buffer59>>0]=HEAP8[$9>>0]|0;HEAP8[$vararg_buffer59+1>>0]=HEAP8[$9+1>>0]|0;HEAP8[$vararg_buffer59+2>>0]=HEAP8[$9+2>>0]|0;HEAP8[$vararg_buffer59+3>>0]=HEAP8[$9+3>>0]|0;HEAP8[$vararg_buffer59+4>>0]=HEAP8[$9+4>>0]|0;HEAP8[$vararg_buffer59+5>>0]=HEAP8[$9+5>>0]|0;HEAP8[$vararg_buffer59+6>>0]=HEAP8[$9+6>>0]|0;HEAP8[$vararg_buffer59+7>>0]=HEAP8[$9+7>>0]|0;
+  _mrb_raisef($573,$575,65009,$vararg_buffer59);
+  // unreachable;
+ }
+ else if ((label|0) == 98) {
+  $577 = ($42<<24>>24)!=(0);
+  if ($577) {
+   $584 = $i;
+   STACKTOP = sp;return ($584|0);
+  }
+  $578 = $argc;
+  $579 = $i;
+  $580 = ($578|0)>($579|0);
+  if ($580) {
+   $581 = $0;
+   $582 = $0;
+   $583 = (_mrb_class_get($582,68855)|0);
+   _mrb_raise($581,$583,64829);
+   // unreachable;
+  } else {
+   $584 = $i;
+   STACKTOP = sp;return ($584|0);
+  }
+ }
+ return (0)|0;
+}
+function _to_str($agg$result,$mrb,$val) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $val$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+ _check_type($agg$result,$1,$val$byval_copy,16,64878,64885);
+ STACKTOP = sp;return;
+}
+function _check_type($agg$result,$mrb,$val,$t,$c,$m) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $val = $val|0;
+ $t = $t|0;
+ $c = $c|0;
+ $m = $m|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var $tmp = 0, $val$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy = sp + 48|0;
+ $vararg_buffer = sp;
+ $tmp = sp + 24|0;
+ $4 = sp + 16|0;
+ $5 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $t;
+ $2 = $c;
+ $3 = $m;
+ $6 = $0;
+ $7 = $1;
+ $8 = $2;
+ $9 = $3;
+ ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+ _mrb_check_convert_type($4,$6,$val$byval_copy,$7,$8,$9);
+ ;HEAP32[$tmp>>2]=HEAP32[$4>>2]|0;HEAP32[$tmp+4>>2]=HEAP32[$4+4>>2]|0;
+ $10 = ((($tmp)) + 4|0);
+ $11 = HEAP32[$10>>2]|0;
+ $12 = ($11|0)==(0);
+ if (!($12)) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$tmp>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$tmp+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $13 = HEAP32[$tmp>>2]|0;
+ $14 = ($13|0)!=(0);
+ if ($14) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$tmp>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$tmp+4>>2]|0;
+  STACKTOP = sp;return;
+ } else {
+  $15 = $0;
+  $16 = $0;
+  $17 = (_mrb_class_get($16,68905)|0);
+  $18 = $0;
+  $19 = $2;
+  _mrb_str_new_cstr($5,$18,$19);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$5>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$5+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$5+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$5+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$5+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$5+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$5+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$5+7>>0]|0;
+  _mrb_raisef($15,$17,64892,$vararg_buffer);
+  // unreachable;
+ }
+}
+function _to_ary($agg$result,$mrb,$val) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $val$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+ _check_type($agg$result,$1,$val$byval_copy,14,64904,64910);
+ STACKTOP = sp;return;
+}
+function _to_hash($agg$result,$mrb,$val) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $val$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+ _check_type($agg$result,$1,$val$byval_copy,15,64917,64922);
+ STACKTOP = sp;return;
+}
+function _to_sym($mrb,$ss) {
+ $mrb = $mrb|0;
+ $ss = $ss|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $obj = 0, $ss$byval_copy = 0;
+ var $ss$byval_copy3 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $ss$byval_copy3 = sp + 56|0;
+ $$byval_copy = sp + 48|0;
+ $ss$byval_copy = sp + 40|0;
+ $vararg_buffer1 = sp + 8|0;
+ $vararg_buffer = sp;
+ $2 = sp + 24|0;
+ $obj = sp + 16|0;
+ $1 = $mrb;
+ $3 = ((($ss)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)==(4);
+ if ($5) {
+  $6 = HEAP32[$ss>>2]|0;
+  $0 = $6;
+  $16 = $0;
+  STACKTOP = sp;return ($16|0);
+ }
+ $7 = ((($ss)) + 4|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ($8|0)==(16);
+ $10 = $1;
+ if (!($9)) {
+  ;HEAP32[$ss$byval_copy3>>2]=HEAP32[$ss>>2]|0;HEAP32[$ss$byval_copy3+4>>2]=HEAP32[$ss+4>>2]|0;
+  _mrb_funcall($obj,$10,$ss$byval_copy3,68986,0,$vararg_buffer);
+  $13 = $1;
+  $14 = $1;
+  $15 = (_mrb_class_get($14,68905)|0);
+  ;HEAP8[$vararg_buffer1>>0]=HEAP8[$obj>>0]|0;HEAP8[$vararg_buffer1+1>>0]=HEAP8[$obj+1>>0]|0;HEAP8[$vararg_buffer1+2>>0]=HEAP8[$obj+2>>0]|0;HEAP8[$vararg_buffer1+3>>0]=HEAP8[$obj+3>>0]|0;HEAP8[$vararg_buffer1+4>>0]=HEAP8[$obj+4>>0]|0;HEAP8[$vararg_buffer1+5>>0]=HEAP8[$obj+5>>0]|0;HEAP8[$vararg_buffer1+6>>0]=HEAP8[$obj+6>>0]|0;HEAP8[$vararg_buffer1+7>>0]=HEAP8[$obj+7>>0]|0;
+  _mrb_raisef($13,$15,68517,$vararg_buffer1);
+  // unreachable;
+ }
+ $11 = $1;
+ ;HEAP32[$ss$byval_copy>>2]=HEAP32[$ss>>2]|0;HEAP32[$ss$byval_copy+4>>2]=HEAP32[$ss+4>>2]|0;
+ _to_str($2,$11,$ss$byval_copy);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+ $12 = (_mrb_intern_str($10,$$byval_copy)|0);
+ $0 = $12;
+ $16 = $0;
+ STACKTOP = sp;return ($16|0);
+}
+function _mrb_include_module($mrb,$c,$m) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $m = $m|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $changed = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $m;
+ $3 = $0;
+ $4 = $1;
+ $5 = $1;
+ $6 = (_find_origin($5)|0);
+ $7 = $2;
+ $8 = (_include_module_at($3,$4,$6,$7,1)|0);
+ $changed = $8;
+ $9 = $changed;
+ $10 = ($9|0)<(0);
+ if ($10) {
+  $11 = $0;
+  $12 = $0;
+  $13 = (_mrb_class_get($12,68855)|0);
+  _mrb_raise($11,$13,65039);
+  // unreachable;
+ } else {
+  STACKTOP = sp;return;
+ }
+}
+function _find_origin($c) {
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $c;
+ $1 = $0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 >>> 11;
+ $4 = $3 & 524288;
+ $5 = ($4|0)!=(0);
+ if (!($5)) {
+  $18 = $0;
+  STACKTOP = sp;return ($18|0);
+ }
+ $6 = $0;
+ $7 = ((($6)) + 20|0);
+ $8 = HEAP32[$7>>2]|0;
+ $0 = $8;
+ while(1) {
+  $9 = $0;
+  $10 = HEAP32[$9>>2]|0;
+  $11 = $10 >>> 11;
+  $12 = $11 & 1048576;
+  $13 = ($12|0)!=(0);
+  $14 = $13 ^ 1;
+  if (!($14)) {
+   break;
+  }
+  $15 = $0;
+  $16 = ((($15)) + 20|0);
+  $17 = HEAP32[$16>>2]|0;
+  $0 = $17;
+ }
+ $18 = $0;
+ STACKTOP = sp;return ($18|0);
+}
+function _include_module_at($mrb,$c,$ins_pos,$m,$search_super) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $ins_pos = $ins_pos|0;
+ $m = $m|0;
+ $search_super = $search_super|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $8 = 0, $9 = 0, $ic = 0, $klass_mt = 0, $p = 0, $superclass_seen = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $c;
+ $3 = $ins_pos;
+ $4 = $m;
+ $5 = $search_super;
+ $6 = $2;
+ $7 = (_find_origin($6)|0);
+ $8 = ((($7)) + 16|0);
+ $9 = HEAP32[$8>>2]|0;
+ $klass_mt = $9;
+ L1: while(1) {
+  $10 = $4;
+  $11 = ($10|0)!=(0|0);
+  if (!($11)) {
+   label = 19;
+   break;
+  }
+  $superclass_seen = 0;
+  $12 = $4;
+  $13 = HEAP32[$12>>2]|0;
+  $14 = $13 >>> 11;
+  $15 = $14 & 524288;
+  $16 = ($15|0)!=(0);
+  do {
+   if (!($16)) {
+    $17 = $klass_mt;
+    $18 = ($17|0)!=(0|0);
+    if ($18) {
+     $19 = $klass_mt;
+     $20 = $4;
+     $21 = ((($20)) + 16|0);
+     $22 = HEAP32[$21>>2]|0;
+     $23 = ($19|0)==($22|0);
+     if ($23) {
+      label = 6;
+      break L1;
+     }
+    }
+    $24 = $2;
+    $25 = ((($24)) + 20|0);
+    $26 = HEAP32[$25>>2]|0;
+    $p = $26;
+    while(1) {
+     $27 = $p;
+     $28 = ($27|0)!=(0|0);
+     if (!($28)) {
+      label = 17;
+      break;
+     }
+     $29 = $p;
+     $30 = HEAP32[$29>>2]|0;
+     $31 = $30 & 255;
+     $32 = ($31|0)==(11);
+     $33 = $p;
+     if ($32) {
+      $34 = ((($33)) + 16|0);
+      $35 = HEAP32[$34>>2]|0;
+      $36 = $4;
+      $37 = ((($36)) + 16|0);
+      $38 = HEAP32[$37>>2]|0;
+      $39 = ($35|0)==($38|0);
+      if ($39) {
+       break;
+      }
+     } else {
+      $43 = HEAP32[$33>>2]|0;
+      $44 = $43 & 255;
+      $45 = ($44|0)==(9);
+      if ($45) {
+       $46 = $5;
+       $47 = ($46|0)!=(0);
+       if (!($47)) {
+        label = 17;
+        break;
+       }
+       $superclass_seen = 1;
+      }
+     }
+     $48 = $p;
+     $49 = ((($48)) + 20|0);
+     $50 = HEAP32[$49>>2]|0;
+     $p = $50;
+    }
+    if ((label|0) == 17) {
+     label = 0;
+     $51 = $1;
+     $52 = $4;
+     $53 = $3;
+     $54 = ((($53)) + 20|0);
+     $55 = HEAP32[$54>>2]|0;
+     $56 = (_include_class_new($51,$52,$55)|0);
+     $ic = $56;
+     $57 = $ic;
+     $58 = $3;
+     $59 = ((($58)) + 20|0);
+     HEAP32[$59>>2] = $57;
+     $60 = $1;
+     $61 = $3;
+     $62 = $3;
+     $63 = ((($62)) + 20|0);
+     $64 = HEAP32[$63>>2]|0;
+     _mrb_field_write_barrier($60,$61,$64);
+     $65 = $ic;
+     $3 = $65;
+     break;
+    }
+    $40 = $superclass_seen;
+    $41 = ($40|0)!=(0);
+    if (!($41)) {
+     $42 = $p;
+     $3 = $42;
+    }
+   }
+  } while(0);
+  $66 = $4;
+  $67 = ((($66)) + 20|0);
+  $68 = HEAP32[$67>>2]|0;
+  $4 = $68;
+ }
+ if ((label|0) == 6) {
+  $0 = -1;
+  $69 = $0;
+  STACKTOP = sp;return ($69|0);
+ }
+ else if ((label|0) == 19) {
+  $0 = 0;
+  $69 = $0;
+  STACKTOP = sp;return ($69|0);
+ }
+ return (0)|0;
+}
+function _include_class_new($mrb,$m,$super) {
+ $mrb = $mrb|0;
+ $m = $m|0;
+ $super = $super|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ic = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $m;
+ $2 = $super;
+ $3 = $0;
+ $4 = $0;
+ $5 = ((($4)) + 36|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = (_mrb_obj_alloc($3,11,$6)|0);
+ $ic = $7;
+ $8 = $1;
+ $9 = HEAP32[$8>>2]|0;
+ $10 = $9 & 255;
+ $11 = ($10|0)==(11);
+ if ($11) {
+  $12 = $1;
+  $13 = ((($12)) + 4|0);
+  $14 = HEAP32[$13>>2]|0;
+  $1 = $14;
+ }
+ $15 = $1;
+ $16 = HEAP32[$15>>2]|0;
+ $17 = $16 >>> 11;
+ $18 = $17 & 524288;
+ $19 = ($18|0)!=(0);
+ L4: do {
+  if ($19) {
+   $20 = $1;
+   $21 = ((($20)) + 20|0);
+   $22 = HEAP32[$21>>2]|0;
+   $1 = $22;
+   while(1) {
+    $23 = $1;
+    $24 = HEAP32[$23>>2]|0;
+    $25 = $24 >>> 11;
+    $26 = $25 & 1048576;
+    $27 = ($26|0)!=(0);
+    $28 = $27 ^ 1;
+    if (!($28)) {
+     break L4;
+    }
+    $29 = $1;
+    $30 = ((($29)) + 20|0);
+    $31 = HEAP32[$30>>2]|0;
+    $1 = $31;
+   }
+  }
+ } while(0);
+ $32 = $1;
+ $33 = ((($32)) + 12|0);
+ $34 = HEAP32[$33>>2]|0;
+ $35 = $ic;
+ $36 = ((($35)) + 12|0);
+ HEAP32[$36>>2] = $34;
+ $37 = $1;
+ $38 = ((($37)) + 16|0);
+ $39 = HEAP32[$38>>2]|0;
+ $40 = $ic;
+ $41 = ((($40)) + 16|0);
+ HEAP32[$41>>2] = $39;
+ $42 = $2;
+ $43 = $ic;
+ $44 = ((($43)) + 20|0);
+ HEAP32[$44>>2] = $42;
+ $45 = $1;
+ $46 = HEAP32[$45>>2]|0;
+ $47 = $46 & 255;
+ $48 = ($47|0)==(11);
+ $49 = $1;
+ if ($48) {
+  $50 = ((($49)) + 4|0);
+  $51 = HEAP32[$50>>2]|0;
+  $52 = $ic;
+  $53 = ((($52)) + 4|0);
+  HEAP32[$53>>2] = $51;
+  $56 = $ic;
+  STACKTOP = sp;return ($56|0);
+ } else {
+  $54 = $ic;
+  $55 = ((($54)) + 4|0);
+  HEAP32[$55>>2] = $49;
+  $56 = $ic;
+  STACKTOP = sp;return ($56|0);
+ }
+ return (0)|0;
+}
+function _mrb_prepend_module($mrb,$c,$m) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $m = $m|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $changed = 0;
+ var $origin = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $m;
+ $changed = 0;
+ $3 = $1;
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $4 >>> 11;
+ $6 = $5 & 524288;
+ $7 = ($6|0)!=(0);
+ if (!($7)) {
+  $8 = $0;
+  $9 = $1;
+  $10 = (_mrb_obj_alloc($8,11,$9)|0);
+  $origin = $10;
+  $11 = $origin;
+  $12 = HEAP32[$11>>2]|0;
+  $13 = $12 >>> 11;
+  $14 = $13 | 1048576;
+  $15 = HEAP32[$11>>2]|0;
+  $16 = $14 & 2097151;
+  $17 = $16 << 11;
+  $18 = $15 & 2047;
+  $19 = $18 | $17;
+  HEAP32[$11>>2] = $19;
+  $20 = $1;
+  $21 = ((($20)) + 20|0);
+  $22 = HEAP32[$21>>2]|0;
+  $23 = $origin;
+  $24 = ((($23)) + 20|0);
+  HEAP32[$24>>2] = $22;
+  $25 = $origin;
+  $26 = $1;
+  $27 = ((($26)) + 20|0);
+  HEAP32[$27>>2] = $25;
+  $28 = $1;
+  $29 = ((($28)) + 16|0);
+  $30 = HEAP32[$29>>2]|0;
+  $31 = $origin;
+  $32 = ((($31)) + 16|0);
+  HEAP32[$32>>2] = $30;
+  $33 = $0;
+  $34 = (_kh_init_mt($33)|0);
+  $35 = $1;
+  $36 = ((($35)) + 16|0);
+  HEAP32[$36>>2] = $34;
+  $37 = $0;
+  $38 = $1;
+  $39 = $origin;
+  _mrb_field_write_barrier($37,$38,$39);
+  $40 = $1;
+  $41 = HEAP32[$40>>2]|0;
+  $42 = $41 >>> 11;
+  $43 = $42 | 524288;
+  $44 = HEAP32[$40>>2]|0;
+  $45 = $43 & 2097151;
+  $46 = $45 << 11;
+  $47 = $44 & 2047;
+  $48 = $47 | $46;
+  HEAP32[$40>>2] = $48;
+ }
+ $49 = $0;
+ $50 = $1;
+ $51 = $1;
+ $52 = $2;
+ $53 = (_include_module_at($49,$50,$51,$52,0)|0);
+ $changed = $53;
+ $54 = $changed;
+ $55 = ($54|0)<(0);
+ if ($55) {
+  $56 = $0;
+  $57 = $0;
+  $58 = (_mrb_class_get($57,68855)|0);
+  _mrb_raise($56,$58,65063);
+  // unreachable;
+ } else {
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_singleton_class($agg$result,$mrb,$v) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $v = $v|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $obj = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 16|0;
+ $1 = sp;
+ $0 = $mrb;
+ $2 = ((($v)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ switch ($3|0) {
+ case 0:  {
+  $4 = ((($v)) + 4|0);
+  $5 = HEAP32[$4>>2]|0;
+  $6 = ($5|0)==(0);
+  if ($6) {
+   $7 = HEAP32[$v>>2]|0;
+   $8 = ($7|0)!=(0);
+   if (!($8)) {
+    $9 = $0;
+    $10 = ((($9)) + 76|0);
+    $11 = HEAP32[$10>>2]|0;
+    _mrb_obj_value_675($agg$result,$11);
+    STACKTOP = sp;return;
+   }
+  }
+  $12 = $0;
+  $13 = ((($12)) + 72|0);
+  $14 = HEAP32[$13>>2]|0;
+  _mrb_obj_value_675($agg$result,$14);
+  STACKTOP = sp;return;
+  break;
+ }
+ case 2:  {
+  $15 = $0;
+  $16 = ((($15)) + 68|0);
+  $17 = HEAP32[$16>>2]|0;
+  _mrb_obj_value_675($agg$result,$17);
+  STACKTOP = sp;return;
+  break;
+ }
+ case 7:  {
+  $18 = $0;
+  $19 = ((($18)) + 32|0);
+  $20 = HEAP32[$19>>2]|0;
+  _mrb_obj_value_675($agg$result,$20);
+  STACKTOP = sp;return;
+  break;
+ }
+ case 6: case 3: case 4:  {
+  $21 = $0;
+  $22 = $0;
+  $23 = (_mrb_class_get($22,68905)|0);
+  _mrb_raise($21,$23,65087);
+  // unreachable;
+  break;
+ }
+ default: {
+  $24 = HEAP32[$v>>2]|0;
+  $obj = $24;
+  $25 = $0;
+  $26 = $obj;
+  _prepare_singleton_class($25,$26);
+  $27 = $0;
+  $28 = ((($27)) + 12|0);
+  $29 = HEAP32[$28>>2]|0;
+  $30 = ($29|0)!=(0|0);
+  if ($30) {
+   $31 = $0;
+   $32 = ((($31)) + 12|0);
+   $33 = HEAP32[$32>>2]|0;
+   $34 = ((($33)) + 16|0);
+   $35 = HEAP32[$34>>2]|0;
+   $36 = ($35|0)!=(0|0);
+   if ($36) {
+    $37 = $0;
+    $38 = ((($37)) + 12|0);
+    $39 = HEAP32[$38>>2]|0;
+    $40 = ((($39)) + 16|0);
+    $41 = HEAP32[$40>>2]|0;
+    $42 = ((($41)) + 44|0);
+    $43 = HEAP32[$42>>2]|0;
+    $44 = ($43|0)!=(0|0);
+    if ($44) {
+     $45 = $0;
+     $46 = $obj;
+     $47 = ((($46)) + 4|0);
+     $48 = HEAP32[$47>>2]|0;
+     $49 = $0;
+     $50 = (_mrb_intern_static($49,64561,9)|0);
+     $51 = $0;
+     $52 = ((($51)) + 12|0);
+     $53 = HEAP32[$52>>2]|0;
+     $54 = ((($53)) + 16|0);
+     $55 = HEAP32[$54>>2]|0;
+     $56 = ((($55)) + 44|0);
+     $57 = HEAP32[$56>>2]|0;
+     _mrb_obj_value_675($1,$57);
+     ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;
+     _mrb_obj_iv_set($45,$48,$50,$$byval_copy);
+    }
+   }
+  }
+  $58 = $obj;
+  $59 = ((($58)) + 4|0);
+  $60 = HEAP32[$59>>2]|0;
+  _mrb_obj_value_675($agg$result,$60);
+  STACKTOP = sp;return;
+ }
+ }
+}
+function _mrb_define_singleton_method($mrb,$o,$name,$func,$aspec) {
+ $mrb = $mrb|0;
+ $o = $o|0;
+ $name = $name|0;
+ $func = $func|0;
+ $aspec = $aspec|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $o;
+ $2 = $name;
+ $3 = $func;
+ $4 = $aspec;
+ $5 = $0;
+ $6 = $1;
+ _prepare_singleton_class($5,$6);
+ $7 = $0;
+ $8 = $1;
+ $9 = ((($8)) + 4|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = $0;
+ $12 = $2;
+ $13 = (_mrb_intern_cstr($11,$12)|0);
+ $14 = $3;
+ $15 = $4;
+ _mrb_define_method_id($7,$10,$13,$14,$15);
+ STACKTOP = sp;return;
+}
+function _mrb_define_class_method($mrb,$c,$name,$func,$aspec) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $name = $name|0;
+ $func = $func|0;
+ $aspec = $aspec|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $name;
+ $3 = $func;
+ $4 = $aspec;
+ $5 = $0;
+ $6 = $1;
+ $7 = $2;
+ $8 = $3;
+ $9 = $4;
+ _mrb_define_singleton_method($5,$6,$7,$8,$9);
+ STACKTOP = sp;return;
+}
+function _mrb_method_search_vm($mrb,$cp,$mid) {
+ $mrb = $mrb|0;
+ $cp = $cp|0;
+ $mid = $mid|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, $h = 0, $k = 0, $m = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $cp;
+ $3 = $mid;
+ $4 = $2;
+ $5 = HEAP32[$4>>2]|0;
+ $c = $5;
+ while(1) {
+  $6 = $c;
+  $7 = ($6|0)!=(0|0);
+  if (!($7)) {
+   break;
+  }
+  $8 = $c;
+  $9 = ((($8)) + 16|0);
+  $10 = HEAP32[$9>>2]|0;
+  $h = $10;
+  $11 = $h;
+  $12 = ($11|0)!=(0|0);
+  if ($12) {
+   $13 = $1;
+   $14 = $h;
+   $15 = $3;
+   $16 = (_kh_get_mt($13,$14,$15)|0);
+   $k = $16;
+   $17 = $k;
+   $18 = $h;
+   $19 = HEAP32[$18>>2]|0;
+   $20 = ($17|0)!=($19|0);
+   if ($20) {
+    label = 5;
+    break;
+   }
+  }
+  $32 = $c;
+  $33 = ((($32)) + 20|0);
+  $34 = HEAP32[$33>>2]|0;
+  $c = $34;
+ }
+ if ((label|0) == 5) {
+  $21 = $k;
+  $22 = $h;
+  $23 = ((($22)) + 20|0);
+  $24 = HEAP32[$23>>2]|0;
+  $25 = (($24) + ($21<<2)|0);
+  $26 = HEAP32[$25>>2]|0;
+  $m = $26;
+  $27 = $m;
+  $28 = ($27|0)!=(0|0);
+  if ($28) {
+   $29 = $c;
+   $30 = $2;
+   HEAP32[$30>>2] = $29;
+   $31 = $m;
+   $0 = $31;
+   $35 = $0;
+   STACKTOP = sp;return ($35|0);
+  }
+ }
+ $0 = 0;
+ $35 = $0;
+ STACKTOP = sp;return ($35|0);
+}
+function _mrb_method_search($mrb,$c,$mid) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $mid = $mid|0;
+ var $$byval_copy = 0, $$byval_copy4 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var $inspect = 0, $m = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_ptr3 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy4 = sp + 88|0;
+ $$byval_copy = sp + 80|0;
+ $vararg_buffer1 = sp + 8|0;
+ $vararg_buffer = sp;
+ $1 = sp + 72|0;
+ $inspect = sp + 56|0;
+ $3 = sp + 48|0;
+ $4 = sp + 40|0;
+ $5 = sp + 32|0;
+ $6 = sp + 24|0;
+ $0 = $mrb;
+ HEAP32[$1>>2] = $c;
+ $2 = $mid;
+ $7 = $0;
+ $8 = $2;
+ $9 = (_mrb_method_search_vm($7,$1,$8)|0);
+ $m = $9;
+ $10 = $m;
+ $11 = ($10|0)!=(0|0);
+ if ($11) {
+  $37 = $m;
+  STACKTOP = sp;return ($37|0);
+ }
+ $12 = $0;
+ $13 = HEAP32[$1>>2]|0;
+ _mrb_obj_value_675($3,$13);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
+ _mrb_funcall($inspect,$12,$$byval_copy,68986,0,$vararg_buffer);
+ $14 = ((($inspect)) + 4|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = ($15|0)==(16);
+ if ($16) {
+  $17 = HEAP32[$inspect>>2]|0;
+  $18 = HEAP32[$17>>2]|0;
+  $19 = $18 >>> 11;
+  $20 = $19 & 8;
+  $21 = ($20|0)!=(0);
+  $22 = HEAP32[$inspect>>2]|0;
+  if ($21) {
+   $23 = HEAP32[$22>>2]|0;
+   $24 = $23 >>> 11;
+   $25 = $24 & 496;
+   $26 = $25 >> 4;
+   $29 = $26;
+  } else {
+   $27 = ((($22)) + 12|0);
+   $28 = HEAP32[$27>>2]|0;
+   $29 = $28;
+  }
+  $30 = ($29|0)>(64);
+  if ($30) {
+   $31 = $0;
+   $32 = HEAP32[$1>>2]|0;
+   _mrb_obj_value_675($4,$32);
+   ;HEAP32[$$byval_copy4>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$4+4>>2]|0;
+   _mrb_any_to_s($5,$31,$$byval_copy4);
+   ;HEAP32[$inspect>>2]=HEAP32[$5>>2]|0;HEAP32[$inspect+4>>2]=HEAP32[$5+4>>2]|0;
+  }
+ }
+ $33 = $0;
+ $34 = $2;
+ $35 = $0;
+ $36 = $2;
+ _mrb_sym2str($6,$35,$36);
+ ;HEAP8[$vararg_buffer1>>0]=HEAP8[$6>>0]|0;HEAP8[$vararg_buffer1+1>>0]=HEAP8[$6+1>>0]|0;HEAP8[$vararg_buffer1+2>>0]=HEAP8[$6+2>>0]|0;HEAP8[$vararg_buffer1+3>>0]=HEAP8[$6+3>>0]|0;HEAP8[$vararg_buffer1+4>>0]=HEAP8[$6+4>>0]|0;HEAP8[$vararg_buffer1+5>>0]=HEAP8[$6+5>>0]|0;HEAP8[$vararg_buffer1+6>>0]=HEAP8[$6+6>>0]|0;HEAP8[$vararg_buffer1+7>>0]=HEAP8[$6+7>>0]|0;
+ $vararg_ptr3 = ((($vararg_buffer1)) + 8|0);
+ ;HEAP8[$vararg_ptr3>>0]=HEAP8[$inspect>>0]|0;HEAP8[$vararg_ptr3+1>>0]=HEAP8[$inspect+1>>0]|0;HEAP8[$vararg_ptr3+2>>0]=HEAP8[$inspect+2>>0]|0;HEAP8[$vararg_ptr3+3>>0]=HEAP8[$inspect+3>>0]|0;HEAP8[$vararg_ptr3+4>>0]=HEAP8[$inspect+4>>0]|0;HEAP8[$vararg_ptr3+5>>0]=HEAP8[$inspect+5>>0]|0;HEAP8[$vararg_ptr3+6>>0]=HEAP8[$inspect+6>>0]|0;HEAP8[$vararg_ptr3+7>>0]=HEAP8[$inspect+7>>0]|0;
+ _mrb_name_error($33,$34,65110,$vararg_buffer1);
+ // unreachable;
+ return (0)|0;
+}
+function _mrb_instance_new($agg$result,$mrb,$cv) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $cv = $cv|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $argc = 0, $argv = 0, $blk = 0, $blk$byval_copy = 0, $cv$byval_copy = 0, $obj = 0, $obj$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $blk$byval_copy = sp + 80|0;
+ $obj$byval_copy = sp + 72|0;
+ $cv$byval_copy = sp + 64|0;
+ $vararg_buffer = sp;
+ $obj = sp + 48|0;
+ $blk = sp + 40|0;
+ $argv = sp + 36|0;
+ $argc = sp + 32|0;
+ $1 = sp + 24|0;
+ $2 = sp + 16|0;
+ $0 = $mrb;
+ $3 = $0;
+ HEAP32[$vararg_buffer>>2] = $argv;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $argc;
+ $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+ HEAP32[$vararg_ptr2>>2] = $blk;
+ (_mrb_get_args($3,65145,$vararg_buffer)|0);
+ $4 = $0;
+ ;HEAP32[$cv$byval_copy>>2]=HEAP32[$cv>>2]|0;HEAP32[$cv$byval_copy+4>>2]=HEAP32[$cv+4>>2]|0;
+ _mrb_instance_alloc($1,$4,$cv$byval_copy);
+ ;HEAP32[$obj>>2]=HEAP32[$1>>2]|0;HEAP32[$obj+4>>2]=HEAP32[$1+4>>2]|0;
+ $5 = $0;
+ $6 = $0;
+ $7 = (_mrb_intern_static($6,68953,10)|0);
+ $8 = HEAP32[$argc>>2]|0;
+ $9 = HEAP32[$argv>>2]|0;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ ;HEAP32[$blk$byval_copy>>2]=HEAP32[$blk>>2]|0;HEAP32[$blk$byval_copy+4>>2]=HEAP32[$blk+4>>2]|0;
+ _mrb_funcall_with_block($2,$5,$obj$byval_copy,$7,$8,$9,$blk$byval_copy);
+ ;HEAP32[$agg$result>>2]=HEAP32[$obj>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$obj+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_instance_alloc($agg$result,$mrb,$cv) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $cv = $cv|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var $c = 0, $o = 0, $ttype = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$cv>>2]|0;
+ $c = $1;
+ $2 = $c;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $4 & 255;
+ $ttype = $5;
+ $6 = $c;
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $7 & 255;
+ $9 = ($8|0)==(12);
+ if ($9) {
+  $10 = $0;
+  $11 = $0;
+  $12 = (_mrb_class_get($11,68905)|0);
+  _mrb_raise($10,$12,65148);
+  // unreachable;
+ }
+ $13 = $ttype;
+ $14 = ($13|0)==(0);
+ if ($14) {
+  $ttype = 8;
+ }
+ $15 = $0;
+ $16 = $ttype;
+ $17 = $c;
+ $18 = (_mrb_obj_alloc($15,$16,$17)|0);
+ $o = $18;
+ $19 = $o;
+ _mrb_obj_value_675($agg$result,$19);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_new($agg$result,$mrb,$c,$argc,$argv) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $argc = $argc|0;
+ $argv = $argv|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $obj = 0, $obj$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 56|0;
+ $$byval_copy = sp + 48|0;
+ $obj = sp + 24|0;
+ $4 = sp + 16|0;
+ $5 = sp + 8|0;
+ $6 = sp;
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $argc;
+ $3 = $argv;
+ $7 = $0;
+ $8 = $1;
+ _mrb_obj_value_675($4,$8);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$4+4>>2]|0;
+ _mrb_instance_alloc($5,$7,$$byval_copy);
+ ;HEAP32[$obj>>2]=HEAP32[$5>>2]|0;HEAP32[$obj+4>>2]=HEAP32[$5+4>>2]|0;
+ $9 = $0;
+ $10 = $0;
+ $11 = (_mrb_intern_static($10,68953,10)|0);
+ $12 = $2;
+ $13 = $3;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ _mrb_funcall_argv($6,$9,$obj$byval_copy,$11,$12,$13);
+ ;HEAP32[$agg$result>>2]=HEAP32[$obj>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$obj+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_method_missing($mrb,$name,$self,$args) {
+ $mrb = $mrb|0;
+ $name = $name|0;
+ $self = $self|0;
+ $args = $args|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $8 = 0, $9 = 0, $args$byval_copy = 0, $inspect = 0, $repr = 0, $self$byval_copy = 0, $self$byval_copy2 = 0;
+ var $self$byval_copy3 = 0, $self$byval_copy4 = 0, $self$byval_copy5 = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $args$byval_copy = sp + 120|0;
+ $self$byval_copy5 = sp + 112|0;
+ $self$byval_copy4 = sp + 104|0;
+ $self$byval_copy3 = sp + 96|0;
+ $self$byval_copy2 = sp + 88|0;
+ $self$byval_copy = sp + 80|0;
+ $vararg_buffer = sp;
+ $repr = sp + 56|0;
+ $2 = sp + 48|0;
+ $3 = sp + 40|0;
+ $4 = sp + 32|0;
+ $5 = sp + 24|0;
+ $6 = sp + 16|0;
+ $0 = $mrb;
+ $1 = $name;
+ $7 = $0;
+ $8 = (_mrb_intern_static($7,68986,7)|0);
+ $inspect = $8;
+ $9 = $0;
+ $10 = ((($9)) + 12|0);
+ $11 = HEAP32[$10>>2]|0;
+ $12 = ((($11)) + 16|0);
+ $13 = HEAP32[$12>>2]|0;
+ $14 = $0;
+ $15 = ((($14)) + 12|0);
+ $16 = HEAP32[$15>>2]|0;
+ $17 = ((($16)) + 20|0);
+ $18 = HEAP32[$17>>2]|0;
+ $19 = ($13>>>0)>($18>>>0);
+ if ($19) {
+  $20 = $0;
+  $21 = ((($20)) + 12|0);
+  $22 = HEAP32[$21>>2]|0;
+  $23 = ((($22)) + 16|0);
+  $24 = HEAP32[$23>>2]|0;
+  $25 = ((($24)) + -48|0);
+  $26 = HEAP32[$25>>2]|0;
+  $27 = $inspect;
+  $28 = ($26|0)==($27|0);
+  if ($28) {
+   $29 = $0;
+   ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+   _mrb_any_to_s($2,$29,$self$byval_copy);
+   ;HEAP32[$repr>>2]=HEAP32[$2>>2]|0;HEAP32[$repr+4>>2]=HEAP32[$2+4>>2]|0;
+  } else {
+   label = 4;
+  }
+ } else {
+  label = 4;
+ }
+ do {
+  if ((label|0) == 4) {
+   $30 = $0;
+   $31 = $inspect;
+   ;HEAP32[$self$byval_copy2>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy2+4>>2]=HEAP32[$self+4>>2]|0;
+   $32 = (_mrb_respond_to($30,$self$byval_copy2,$31)|0);
+   $33 = $32&255;
+   $34 = ($33|0)!=(0);
+   if ($34) {
+    $35 = $0;
+    $36 = ((($35)) + 12|0);
+    $37 = HEAP32[$36>>2]|0;
+    $38 = ((($37)) + 16|0);
+    $39 = HEAP32[$38>>2]|0;
+    $40 = $0;
+    $41 = ((($40)) + 12|0);
+    $42 = HEAP32[$41>>2]|0;
+    $43 = ((($42)) + 20|0);
+    $44 = HEAP32[$43>>2]|0;
+    $45 = $39;
+    $46 = $44;
+    $47 = (($45) - ($46))|0;
+    $48 = (($47|0) / 48)&-1;
+    $49 = ($48|0)<(64);
+    if ($49) {
+     $50 = $0;
+     $51 = $inspect;
+     ;HEAP32[$self$byval_copy3>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy3+4>>2]=HEAP32[$self+4>>2]|0;
+     _mrb_funcall_argv($3,$50,$self$byval_copy3,$51,0,0);
+     ;HEAP32[$repr>>2]=HEAP32[$3>>2]|0;HEAP32[$repr+4>>2]=HEAP32[$3+4>>2]|0;
+     $52 = ((($repr)) + 4|0);
+     $53 = HEAP32[$52>>2]|0;
+     $54 = ($53|0)==(16);
+     if (!($54)) {
+      break;
+     }
+     $55 = HEAP32[$repr>>2]|0;
+     $56 = HEAP32[$55>>2]|0;
+     $57 = $56 >>> 11;
+     $58 = $57 & 8;
+     $59 = ($58|0)!=(0);
+     $60 = HEAP32[$repr>>2]|0;
+     if ($59) {
+      $61 = HEAP32[$60>>2]|0;
+      $62 = $61 >>> 11;
+      $63 = $62 & 496;
+      $64 = $63 >> 4;
+      $67 = $64;
+     } else {
+      $65 = ((($60)) + 12|0);
+      $66 = HEAP32[$65>>2]|0;
+      $67 = $66;
+     }
+     $68 = ($67|0)>(64);
+     if (!($68)) {
+      break;
+     }
+     $69 = $0;
+     ;HEAP32[$self$byval_copy4>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy4+4>>2]=HEAP32[$self+4>>2]|0;
+     _mrb_any_to_s($4,$69,$self$byval_copy4);
+     ;HEAP32[$repr>>2]=HEAP32[$4>>2]|0;HEAP32[$repr+4>>2]=HEAP32[$4+4>>2]|0;
+     break;
+    }
+   }
+   $70 = $0;
+   ;HEAP32[$self$byval_copy5>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy5+4>>2]=HEAP32[$self+4>>2]|0;
+   _mrb_any_to_s($5,$70,$self$byval_copy5);
+   ;HEAP32[$repr>>2]=HEAP32[$5>>2]|0;HEAP32[$repr+4>>2]=HEAP32[$5+4>>2]|0;
+  }
+ } while(0);
+ $71 = $0;
+ $72 = $1;
+ $73 = $0;
+ $74 = $1;
+ _mrb_sym2str($6,$73,$74);
+ ;HEAP8[$vararg_buffer>>0]=HEAP8[$6>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$6+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$6+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$6+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$6+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$6+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$6+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$6+7>>0]|0;
+ $vararg_ptr1 = ((($vararg_buffer)) + 8|0);
+ ;HEAP8[$vararg_ptr1>>0]=HEAP8[$repr>>0]|0;HEAP8[$vararg_ptr1+1>>0]=HEAP8[$repr+1>>0]|0;HEAP8[$vararg_ptr1+2>>0]=HEAP8[$repr+2>>0]|0;HEAP8[$vararg_ptr1+3>>0]=HEAP8[$repr+3>>0]|0;HEAP8[$vararg_ptr1+4>>0]=HEAP8[$repr+4>>0]|0;HEAP8[$vararg_ptr1+5>>0]=HEAP8[$repr+5>>0]|0;HEAP8[$vararg_ptr1+6>>0]=HEAP8[$repr+6>>0]|0;HEAP8[$vararg_ptr1+7>>0]=HEAP8[$repr+7>>0]|0;
+ ;HEAP32[$args$byval_copy>>2]=HEAP32[$args>>2]|0;HEAP32[$args$byval_copy+4>>2]=HEAP32[$args+4>>2]|0;
+ _mrb_no_method_error($71,$72,$args$byval_copy,65189,$vararg_buffer);
+ // unreachable;
+}
+function _mrb_respond_to($mrb,$obj,$mid) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ $mid = $mid|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $obj$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $mid;
+ $2 = $0;
+ $3 = $0;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ $4 = (_mrb_class_741($3,$obj$byval_copy)|0);
+ $5 = $1;
+ $6 = (_mrb_obj_respond_to($2,$4,$5)|0);
+ STACKTOP = sp;return ($6|0);
+}
+function _mrb_class_741($mrb,$v) {
+ $mrb = $mrb|0;
+ $v = $v|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = ((($v)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ L1: do {
+  switch ($3|0) {
+  case 0:  {
+   $4 = HEAP32[$v>>2]|0;
+   $5 = ($4|0)!=(0);
+   $6 = $1;
+   if ($5) {
+    $7 = ((($6)) + 72|0);
+    $8 = HEAP32[$7>>2]|0;
+    $0 = $8;
+    break L1;
+   } else {
+    $9 = ((($6)) + 76|0);
+    $10 = HEAP32[$9>>2]|0;
+    $0 = $10;
+    break L1;
+   }
+   break;
+  }
+  case 2:  {
+   $11 = $1;
+   $12 = ((($11)) + 68|0);
+   $13 = HEAP32[$12>>2]|0;
+   $0 = $13;
+   break;
+  }
+  case 4:  {
+   $14 = $1;
+   $15 = ((($14)) + 80|0);
+   $16 = HEAP32[$15>>2]|0;
+   $0 = $16;
+   break;
+  }
+  case 3:  {
+   $17 = $1;
+   $18 = ((($17)) + 64|0);
+   $19 = HEAP32[$18>>2]|0;
+   $0 = $19;
+   break;
+  }
+  case 6:  {
+   $20 = $1;
+   $21 = ((($20)) + 60|0);
+   $22 = HEAP32[$21>>2]|0;
+   $0 = $22;
+   break;
+  }
+  case 7:  {
+   $23 = $1;
+   $24 = ((($23)) + 32|0);
+   $25 = HEAP32[$24>>2]|0;
+   $0 = $25;
+   break;
+  }
+  case 20:  {
+   $0 = 0;
+   break;
+  }
+  default: {
+   $26 = HEAP32[$v>>2]|0;
+   $27 = ((($26)) + 4|0);
+   $28 = HEAP32[$27>>2]|0;
+   $0 = $28;
+  }
+  }
+ } while(0);
+ $29 = $0;
+ STACKTOP = sp;return ($29|0);
+}
+function _mrb_obj_respond_to($mrb,$c,$mid) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $mid = $mid|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $h = 0, $k = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $c;
+ $3 = $mid;
+ while(1) {
+  $4 = $2;
+  $5 = ($4|0)!=(0|0);
+  if (!($5)) {
+   label = 9;
+   break;
+  }
+  $6 = $2;
+  $7 = ((($6)) + 16|0);
+  $8 = HEAP32[$7>>2]|0;
+  $h = $8;
+  $9 = $h;
+  $10 = ($9|0)!=(0|0);
+  if ($10) {
+   $11 = $1;
+   $12 = $h;
+   $13 = $3;
+   $14 = (_kh_get_mt($11,$12,$13)|0);
+   $k = $14;
+   $15 = $k;
+   $16 = $h;
+   $17 = HEAP32[$16>>2]|0;
+   $18 = ($15|0)!=($17|0);
+   if ($18) {
+    break;
+   }
+  }
+  $26 = $2;
+  $27 = ((($26)) + 20|0);
+  $28 = HEAP32[$27>>2]|0;
+  $2 = $28;
+ }
+ if ((label|0) == 9) {
+  $0 = 0;
+  $29 = $0;
+  STACKTOP = sp;return ($29|0);
+ }
+ $19 = $k;
+ $20 = $h;
+ $21 = ((($20)) + 20|0);
+ $22 = HEAP32[$21>>2]|0;
+ $23 = (($22) + ($19<<2)|0);
+ $24 = HEAP32[$23>>2]|0;
+ $25 = ($24|0)!=(0|0);
+ if ($25) {
+  $0 = 1;
+  $29 = $0;
+  STACKTOP = sp;return ($29|0);
+ } else {
+  $0 = 0;
+  $29 = $0;
+  STACKTOP = sp;return ($29|0);
+ }
+ return (0)|0;
+}
+function _mrb_class_path($agg$result,$mrb,$c) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $c = $c|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
+ var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $7 = 0, $8 = 0, $9 = 0, $base = 0, $base$byval_copy = 0, $classpath = 0, $len = 0, $name = 0, $outer = 0, $path = 0, $path$byval_copy = 0, $path$byval_copy1 = 0, $path$byval_copy2 = 0, $path$byval_copy3 = 0, $path$byval_copy4 = 0, $path$byval_copy5 = 0;
+ var $path$byval_copy6 = 0, $sym = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 192|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $path$byval_copy6 = sp + 176|0;
+ $path$byval_copy5 = sp + 168|0;
+ $path$byval_copy4 = sp + 160|0;
+ $base$byval_copy = sp + 152|0;
+ $path$byval_copy3 = sp + 144|0;
+ $path$byval_copy2 = sp + 136|0;
+ $$byval_copy = sp + 128|0;
+ $path$byval_copy1 = sp + 120|0;
+ $path$byval_copy = sp + 112|0;
+ $path = sp + 96|0;
+ $2 = sp + 80|0;
+ $len = sp + 64|0;
+ $base = sp + 56|0;
+ $3 = sp + 48|0;
+ $4 = sp + 40|0;
+ $5 = sp + 32|0;
+ $6 = sp + 24|0;
+ $7 = sp + 16|0;
+ $8 = sp + 8|0;
+ $9 = sp;
+ $0 = $mrb;
+ $1 = $c;
+ $10 = $0;
+ $11 = (_mrb_intern_static($10,65218,13)|0);
+ $classpath = $11;
+ $12 = $0;
+ $13 = $1;
+ $14 = $classpath;
+ _mrb_obj_iv_get($2,$12,$13,$14);
+ ;HEAP32[$path>>2]=HEAP32[$2>>2]|0;HEAP32[$path+4>>2]=HEAP32[$2+4>>2]|0;
+ $15 = ((($path)) + 4|0);
+ $16 = HEAP32[$15>>2]|0;
+ $17 = ($16|0)==(0);
+ if ($17) {
+  $18 = HEAP32[$path>>2]|0;
+  $19 = ($18|0)!=(0);
+  if (!($19)) {
+   $20 = $0;
+   $21 = $1;
+   $22 = (_mrb_class_outer_module($20,$21)|0);
+   $outer = $22;
+   $23 = $0;
+   $24 = $1;
+   $25 = $outer;
+   $26 = (_mrb_class_sym($23,$24,$25)|0);
+   $sym = $26;
+   $27 = $sym;
+   $28 = ($27|0)==(0);
+   if ($28) {
+    _mrb_nil_value_703($agg$result);
+    STACKTOP = sp;return;
+   }
+   $29 = $outer;
+   $30 = ($29|0)!=(0|0);
+   if ($30) {
+    $31 = $outer;
+    $32 = $0;
+    $33 = ((($32)) + 32|0);
+    $34 = HEAP32[$33>>2]|0;
+    $35 = ($31|0)!=($34|0);
+    if ($35) {
+     $36 = $0;
+     $37 = $outer;
+     _mrb_class_path($base,$36,$37);
+     $38 = $0;
+     _mrb_str_buf_new($3,$38,0);
+     ;HEAP32[$path>>2]=HEAP32[$3>>2]|0;HEAP32[$path+4>>2]=HEAP32[$3+4>>2]|0;
+     $39 = ((($base)) + 4|0);
+     $40 = HEAP32[$39>>2]|0;
+     $41 = ($40|0)==(0);
+     if ($41) {
+      $42 = HEAP32[$base>>2]|0;
+      $43 = ($42|0)!=(0);
+      if ($43) {
+       label = 10;
+      } else {
+       $44 = $0;
+       ;HEAP32[$path$byval_copy>>2]=HEAP32[$path>>2]|0;HEAP32[$path$byval_copy+4>>2]=HEAP32[$path+4>>2]|0;
+       _mrb_str_cat($4,$44,$path$byval_copy,65232,8);
+       $45 = $0;
+       $46 = $0;
+       $47 = $outer;
+       _mrb_ptr_to_str($5,$46,$47);
+       ;HEAP32[$path$byval_copy1>>2]=HEAP32[$path>>2]|0;HEAP32[$path$byval_copy1+4>>2]=HEAP32[$path+4>>2]|0;
+       ;HEAP32[$$byval_copy>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$5+4>>2]|0;
+       _mrb_str_concat($45,$path$byval_copy1,$$byval_copy);
+       $48 = $0;
+       ;HEAP32[$path$byval_copy2>>2]=HEAP32[$path>>2]|0;HEAP32[$path$byval_copy2+4>>2]=HEAP32[$path+4>>2]|0;
+       _mrb_str_cat($6,$48,$path$byval_copy2,65241,1);
+      }
+     } else {
+      label = 10;
+     }
+     if ((label|0) == 10) {
+      $49 = $0;
+      ;HEAP32[$path$byval_copy3>>2]=HEAP32[$path>>2]|0;HEAP32[$path$byval_copy3+4>>2]=HEAP32[$path+4>>2]|0;
+      ;HEAP32[$base$byval_copy>>2]=HEAP32[$base>>2]|0;HEAP32[$base$byval_copy+4>>2]=HEAP32[$base+4>>2]|0;
+      _mrb_str_concat($49,$path$byval_copy3,$base$byval_copy);
+     }
+     $50 = $0;
+     ;HEAP32[$path$byval_copy4>>2]=HEAP32[$path>>2]|0;HEAP32[$path$byval_copy4+4>>2]=HEAP32[$path+4>>2]|0;
+     _mrb_str_cat($7,$50,$path$byval_copy4,65243,2);
+     $51 = $0;
+     $52 = $sym;
+     $53 = (_mrb_sym2name_len($51,$52,$len)|0);
+     $name = $53;
+     $54 = $0;
+     $55 = $name;
+     $56 = HEAP32[$len>>2]|0;
+     ;HEAP32[$path$byval_copy5>>2]=HEAP32[$path>>2]|0;HEAP32[$path$byval_copy5+4>>2]=HEAP32[$path+4>>2]|0;
+     _mrb_str_cat($8,$54,$path$byval_copy5,$55,$56);
+    } else {
+     label = 12;
+    }
+   } else {
+    label = 12;
+   }
+   if ((label|0) == 12) {
+    $57 = $0;
+    $58 = $sym;
+    $59 = (_mrb_sym2name_len($57,$58,$len)|0);
+    $name = $59;
+    $60 = $0;
+    $61 = $name;
+    $62 = HEAP32[$len>>2]|0;
+    _mrb_str_new($9,$60,$61,$62);
+    ;HEAP32[$path>>2]=HEAP32[$9>>2]|0;HEAP32[$path+4>>2]=HEAP32[$9+4>>2]|0;
+   }
+   $63 = $0;
+   $64 = $1;
+   $65 = $classpath;
+   ;HEAP32[$path$byval_copy6>>2]=HEAP32[$path>>2]|0;HEAP32[$path$byval_copy6+4>>2]=HEAP32[$path+4>>2]|0;
+   _mrb_obj_iv_set($63,$64,$65,$path$byval_copy6);
+  }
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$path>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$path+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_class_name($mrb,$c) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $path = 0, $path$byval_copy = 0, $path$byval_copy1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $path$byval_copy1 = sp + 56|0;
+ $$byval_copy = sp + 48|0;
+ $path$byval_copy = sp + 40|0;
+ $path = sp + 24|0;
+ $2 = sp + 16|0;
+ $3 = sp + 8|0;
+ $4 = sp;
+ $0 = $mrb;
+ $1 = $c;
+ $5 = $0;
+ $6 = $1;
+ _mrb_class_path($path,$5,$6);
+ $7 = ((($path)) + 4|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ($8|0)==(0);
+ if ($9) {
+  $10 = HEAP32[$path>>2]|0;
+  $11 = ($10|0)!=(0);
+  if (!($11)) {
+   $12 = $0;
+   _mrb_str_new_static($2,$12,65232,8);
+   ;HEAP32[$path>>2]=HEAP32[$2>>2]|0;HEAP32[$path+4>>2]=HEAP32[$2+4>>2]|0;
+   $13 = $0;
+   $14 = $0;
+   $15 = $1;
+   _mrb_ptr_to_str($3,$14,$15);
+   ;HEAP32[$path$byval_copy>>2]=HEAP32[$path>>2]|0;HEAP32[$path$byval_copy+4>>2]=HEAP32[$path+4>>2]|0;
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
+   _mrb_str_concat($13,$path$byval_copy,$$byval_copy);
+   $16 = $0;
+   ;HEAP32[$path$byval_copy1>>2]=HEAP32[$path>>2]|0;HEAP32[$path$byval_copy1+4>>2]=HEAP32[$path+4>>2]|0;
+   _mrb_str_cat($4,$16,$path$byval_copy1,65241,1);
+  }
+ }
+ $17 = HEAP32[$path>>2]|0;
+ $18 = HEAP32[$17>>2]|0;
+ $19 = $18 >>> 11;
+ $20 = $19 & 8;
+ $21 = ($20|0)!=(0);
+ $22 = HEAP32[$path>>2]|0;
+ $23 = ((($22)) + 12|0);
+ if ($21) {
+  $26 = $23;
+  STACKTOP = sp;return ($26|0);
+ } else {
+  $24 = ((($23)) + 8|0);
+  $25 = HEAP32[$24>>2]|0;
+  $26 = $25;
+  STACKTOP = sp;return ($26|0);
+ }
+ return (0)|0;
+}
+function _mrb_obj_classname($mrb,$obj) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $obj$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ $2 = $0;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ $3 = (_mrb_obj_class($2,$obj$byval_copy)|0);
+ $4 = (_mrb_class_name($1,$3)|0);
+ STACKTOP = sp;return ($4|0);
+}
+function _mrb_obj_class($mrb,$obj) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $obj$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ $2 = (_mrb_class_741($1,$obj$byval_copy)|0);
+ $3 = (_mrb_class_real($2)|0);
+ STACKTOP = sp;return ($3|0);
+}
+function _mrb_alias_method($mrb,$c,$a,$b) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $m = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $a;
+ $3 = $b;
+ $4 = $0;
+ $5 = $1;
+ $6 = $3;
+ $7 = (_mrb_method_search($4,$5,$6)|0);
+ $m = $7;
+ $8 = $0;
+ $9 = $1;
+ $10 = $2;
+ $11 = $m;
+ _mrb_define_method_raw($8,$9,$10,$11);
+ STACKTOP = sp;return;
+}
+function _mrb_undef_method($mrb,$c,$name) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $name = $name|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $name;
+ $3 = $0;
+ $4 = $1;
+ $5 = $0;
+ $6 = $2;
+ $7 = (_mrb_intern_cstr($5,$6)|0);
+ _undef_method($3,$4,$7);
+ STACKTOP = sp;return;
+}
+function _undef_method($mrb,$c,$a) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $a = $a|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $3 = sp + 24|0;
+ $4 = sp + 16|0;
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $a;
+ $5 = $0;
+ $6 = $1;
+ $7 = $2;
+ $8 = (_mrb_obj_respond_to($5,$6,$7)|0);
+ $9 = ($8<<24>>24)!=(0);
+ $10 = $0;
+ if ($9) {
+  $15 = $1;
+  $16 = $2;
+  _mrb_define_method_raw($10,$15,$16,0);
+  STACKTOP = sp;return;
+ } else {
+  $11 = $2;
+  $12 = $0;
+  $13 = $2;
+  _mrb_sym2str($3,$12,$13);
+  $14 = $1;
+  _mrb_obj_value_675($4,$14);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$3>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$3+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$3+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$3+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$3+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$3+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$3+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$3+7>>0]|0;
+  $vararg_ptr1 = ((($vararg_buffer)) + 8|0);
+  ;HEAP8[$vararg_ptr1>>0]=HEAP8[$4>>0]|0;HEAP8[$vararg_ptr1+1>>0]=HEAP8[$4+1>>0]|0;HEAP8[$vararg_ptr1+2>>0]=HEAP8[$4+2>>0]|0;HEAP8[$vararg_ptr1+3>>0]=HEAP8[$4+3>>0]|0;HEAP8[$vararg_ptr1+4>>0]=HEAP8[$4+4>>0]|0;HEAP8[$vararg_ptr1+5>>0]=HEAP8[$4+5>>0]|0;HEAP8[$vararg_ptr1+6>>0]=HEAP8[$4+6>>0]|0;HEAP8[$vararg_ptr1+7>>0]=HEAP8[$4+7>>0]|0;
+  _mrb_name_error($10,$11,65246,$vararg_buffer);
+  // unreachable;
+ }
+}
+function _mrb_undef_class_method($mrb,$c,$name) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $name = $name|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 32|0;
+ $3 = sp + 8|0;
+ $4 = sp;
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $name;
+ $5 = $0;
+ $6 = $0;
+ $7 = $1;
+ _mrb_obj_value_675($3,$7);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
+ _mrb_singleton_class($4,$6,$$byval_copy);
+ $8 = HEAP32[$4>>2]|0;
+ $9 = $2;
+ _mrb_undef_method($5,$8,$9);
+ STACKTOP = sp;return;
+}
+function _mrb_mod_module_function($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ai = 0, $argc = 0, $argv = 0, $i = 0;
+ var $method_rproc = 0, $mid = 0, $mod$byval_copy = 0, $rclass = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 48|0;
+ $mod$byval_copy = sp + 40|0;
+ $vararg_buffer = sp;
+ $argv = sp + 32|0;
+ $argc = sp + 28|0;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+ _mrb_check_type($1,$mod$byval_copy,10);
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $argv;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $argc;
+ (_mrb_get_args($2,68114,$vararg_buffer)|0);
+ $3 = HEAP32[$argc>>2]|0;
+ $4 = ($3|0)==(0);
+ if ($4) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$mod>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$mod+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $i = 0;
+ while(1) {
+  $5 = $i;
+  $6 = HEAP32[$argc>>2]|0;
+  $7 = ($5|0)<($6|0);
+  if (!($7)) {
+   break;
+  }
+  $8 = $0;
+  $9 = $i;
+  $10 = HEAP32[$argv>>2]|0;
+  $11 = (($10) + ($9<<3)|0);
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$11>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$11+4>>2]|0;
+  _mrb_check_type($8,$$byval_copy,4);
+  $12 = $i;
+  $13 = HEAP32[$argv>>2]|0;
+  $14 = (($13) + ($12<<3)|0);
+  $15 = HEAP32[$14>>2]|0;
+  $mid = $15;
+  $16 = HEAP32[$mod>>2]|0;
+  $rclass = $16;
+  $17 = $0;
+  $18 = $rclass;
+  $19 = $mid;
+  $20 = (_mrb_method_search($17,$18,$19)|0);
+  $method_rproc = $20;
+  $21 = $0;
+  $22 = $rclass;
+  _prepare_singleton_class($21,$22);
+  $23 = $0;
+  $24 = (_mrb_gc_arena_save($23)|0);
+  $ai = $24;
+  $25 = $0;
+  $26 = $rclass;
+  $27 = ((($26)) + 4|0);
+  $28 = HEAP32[$27>>2]|0;
+  $29 = $mid;
+  $30 = $method_rproc;
+  _mrb_define_method_raw($25,$28,$29,$30);
+  $31 = $0;
+  $32 = $ai;
+  _mrb_gc_arena_restore($31,$32);
+  $33 = $i;
+  $34 = (($33) + 1)|0;
+  $i = $34;
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$mod>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$mod+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_init_class($mrb) {
+ $mrb = $mrb|0;
+ var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0;
+ var $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0;
+ var $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0;
+ var $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0;
+ var $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0;
+ var $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0;
+ var $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0;
+ var $22 = 0, $220 = 0, $221 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0;
+ var $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0;
+ var $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0;
+ var $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0;
+ var $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $bob = 0, $cls = 0, $mod = 0, $obj = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy4 = sp + 96|0;
+ $$byval_copy3 = sp + 88|0;
+ $$byval_copy2 = sp + 80|0;
+ $$byval_copy1 = sp + 72|0;
+ $$byval_copy = sp + 64|0;
+ $1 = sp + 32|0;
+ $2 = sp + 24|0;
+ $3 = sp + 16|0;
+ $4 = sp + 8|0;
+ $5 = sp;
+ $0 = $mrb;
+ $6 = $0;
+ $7 = (_boot_defclass($6,0)|0);
+ $bob = $7;
+ $8 = $0;
+ $9 = $bob;
+ $10 = (_boot_defclass($8,$9)|0);
+ $obj = $10;
+ $11 = $obj;
+ $12 = $0;
+ $13 = ((($12)) + 32|0);
+ HEAP32[$13>>2] = $11;
+ $14 = $0;
+ $15 = $obj;
+ $16 = (_boot_defclass($14,$15)|0);
+ $mod = $16;
+ $17 = $mod;
+ $18 = $0;
+ $19 = ((($18)) + 40|0);
+ HEAP32[$19>>2] = $17;
+ $20 = $0;
+ $21 = $mod;
+ $22 = (_boot_defclass($20,$21)|0);
+ $cls = $22;
+ $23 = $cls;
+ $24 = $0;
+ $25 = ((($24)) + 36|0);
+ HEAP32[$25>>2] = $23;
+ $26 = $cls;
+ $27 = $cls;
+ $28 = ((($27)) + 4|0);
+ HEAP32[$28>>2] = $26;
+ $29 = $mod;
+ $30 = ((($29)) + 4|0);
+ HEAP32[$30>>2] = $26;
+ $31 = $obj;
+ $32 = ((($31)) + 4|0);
+ HEAP32[$32>>2] = $26;
+ $33 = $bob;
+ $34 = ((($33)) + 4|0);
+ HEAP32[$34>>2] = $26;
+ $35 = $0;
+ $36 = $bob;
+ _prepare_singleton_class($35,$36);
+ $37 = $0;
+ $38 = $obj;
+ _prepare_singleton_class($37,$38);
+ $39 = $0;
+ $40 = $mod;
+ _prepare_singleton_class($39,$40);
+ $41 = $0;
+ $42 = $cls;
+ _prepare_singleton_class($41,$42);
+ $43 = $0;
+ $44 = $bob;
+ $45 = $bob;
+ _mrb_obj_value_675($1,$45);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;
+ _mrb_define_const($43,$44,65283,$$byval_copy);
+ $46 = $0;
+ $47 = $obj;
+ $48 = $bob;
+ _mrb_obj_value_675($2,$48);
+ ;HEAP32[$$byval_copy1>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$2+4>>2]|0;
+ _mrb_define_const($46,$47,65283,$$byval_copy1);
+ $49 = $0;
+ $50 = $obj;
+ $51 = $obj;
+ _mrb_obj_value_675($3,$51);
+ ;HEAP32[$$byval_copy2>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$3+4>>2]|0;
+ _mrb_define_const($49,$50,65295,$$byval_copy2);
+ $52 = $0;
+ $53 = $obj;
+ $54 = $mod;
+ _mrb_obj_value_675($4,$54);
+ ;HEAP32[$$byval_copy3>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$4+4>>2]|0;
+ _mrb_define_const($52,$53,65302,$$byval_copy3);
+ $55 = $0;
+ $56 = $obj;
+ $57 = $cls;
+ _mrb_obj_value_675($5,$57);
+ ;HEAP32[$$byval_copy4>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$5+4>>2]|0;
+ _mrb_define_const($55,$56,65309,$$byval_copy4);
+ $58 = $0;
+ $59 = $bob;
+ $60 = $0;
+ $61 = (_mrb_intern_static($60,65283,11)|0);
+ _name_class($58,$59,$61);
+ $62 = $0;
+ $63 = $obj;
+ $64 = $0;
+ $65 = (_mrb_intern_static($64,65295,6)|0);
+ _name_class($62,$63,$65);
+ $66 = $0;
+ $67 = $mod;
+ $68 = $0;
+ $69 = (_mrb_intern_static($68,65302,6)|0);
+ _name_class($66,$67,$69);
+ $70 = $0;
+ $71 = $cls;
+ $72 = $0;
+ $73 = (_mrb_intern_static($72,65309,5)|0);
+ _name_class($70,$71,$73);
+ $74 = $0;
+ $75 = $0;
+ $76 = ((($75)) + 32|0);
+ $77 = HEAP32[$76>>2]|0;
+ $78 = (_mrb_define_class($74,65315,$77)|0);
+ $79 = $0;
+ $80 = ((($79)) + 44|0);
+ HEAP32[$80>>2] = $78;
+ $81 = $0;
+ $82 = ((($81)) + 44|0);
+ $83 = HEAP32[$82>>2]|0;
+ $84 = HEAP32[$83>>2]|0;
+ $85 = $84 >>> 11;
+ $86 = $85 & -256;
+ $87 = $86 | 13;
+ $88 = $0;
+ $89 = ((($88)) + 44|0);
+ $90 = HEAP32[$89>>2]|0;
+ $91 = HEAP32[$90>>2]|0;
+ $92 = $87 & 2097151;
+ $93 = $92 << 11;
+ $94 = $91 & 2047;
+ $95 = $94 | $93;
+ HEAP32[$90>>2] = $95;
+ $96 = $cls;
+ $97 = HEAP32[$96>>2]|0;
+ $98 = $97 >>> 11;
+ $99 = $98 & -256;
+ $100 = $99 | 9;
+ $101 = $cls;
+ $102 = HEAP32[$101>>2]|0;
+ $103 = $100 & 2097151;
+ $104 = $103 << 11;
+ $105 = $102 & 2047;
+ $106 = $105 | $104;
+ HEAP32[$101>>2] = $106;
+ $107 = $0;
+ $108 = $bob;
+ _mrb_define_method($107,$108,68953,233,0);
+ $109 = $0;
+ $110 = $bob;
+ _mrb_define_method($109,$110,65320,234,0);
+ $111 = $0;
+ $112 = $bob;
+ _mrb_define_method($111,$112,65322,235,4096);
+ $113 = $0;
+ $114 = $cls;
+ _mrb_define_class_method($113,$114,67683,236,8192);
+ $115 = $0;
+ $116 = $cls;
+ _mrb_define_method($115,$116,65344,237,0);
+ $117 = $0;
+ $118 = $cls;
+ _mrb_define_method($117,$118,67683,238,4096);
+ $119 = $0;
+ $120 = $cls;
+ _mrb_define_method($119,$120,68953,239,8192);
+ $121 = $0;
+ $122 = $cls;
+ _mrb_define_method($121,$122,64799,233,262144);
+ $123 = $mod;
+ $124 = HEAP32[$123>>2]|0;
+ $125 = $124 >>> 11;
+ $126 = $125 & -256;
+ $127 = $126 | 10;
+ $128 = $mod;
+ $129 = HEAP32[$128>>2]|0;
+ $130 = $127 & 2097151;
+ $131 = $130 << 11;
+ $132 = $129 & 2047;
+ $133 = $132 | $131;
+ HEAP32[$128>>2] = $133;
+ $134 = $0;
+ $135 = $mod;
+ _mrb_define_method($134,$135,65355,240,262144);
+ $136 = $0;
+ $137 = $mod;
+ _mrb_define_method($136,$137,65424,241,262144);
+ $138 = $0;
+ $139 = $mod;
+ _mrb_define_method($138,$139,65443,242,524288);
+ $140 = $0;
+ $141 = $mod;
+ _mrb_define_method($140,$141,68155,243,262144);
+ $142 = $0;
+ $143 = $mod;
+ _mrb_define_method($142,$143,68169,233,262144);
+ $144 = $0;
+ $145 = $mod;
+ _mrb_define_method($144,$145,65462,244,4096);
+ $146 = $0;
+ $147 = $mod;
+ _mrb_define_method($146,$147,65487,233,262144);
+ $148 = $0;
+ $149 = $mod;
+ _mrb_define_method($148,$149,65470,245,262144);
+ $150 = $0;
+ $151 = $mod;
+ _mrb_define_method($150,$151,65497,246,4096);
+ $152 = $0;
+ $153 = $mod;
+ _mrb_define_method($152,$153,68944,247,262144);
+ $154 = $0;
+ $155 = $mod;
+ _mrb_define_method($154,$155,65505,248,262144);
+ $156 = $0;
+ $157 = $mod;
+ _mrb_define_method($156,$157,65530,249,4096);
+ $158 = $0;
+ $159 = $mod;
+ _mrb_define_method($158,$159,65521,233,262144);
+ $160 = $0;
+ $161 = $mod;
+ _mrb_define_method($160,$161,65541,250,0);
+ $162 = $0;
+ $163 = $mod;
+ _mrb_define_method($162,$163,68953,251,0);
+ $164 = $0;
+ $165 = $mod;
+ _mrb_define_method($164,$165,65561,252,4096);
+ $166 = $0;
+ $167 = $mod;
+ _mrb_define_method($166,$167,65578,253,262144);
+ $168 = $0;
+ $169 = $mod;
+ _mrb_define_method($168,$169,65594,249,4096);
+ $170 = $0;
+ $171 = $mod;
+ _mrb_define_method($170,$171,65606,254,4096);
+ $172 = $0;
+ $173 = $mod;
+ _mrb_define_method($172,$173,65622,255,4096);
+ $174 = $0;
+ $175 = $mod;
+ _mrb_define_method($174,$175,65630,255,4096);
+ $176 = $0;
+ $177 = $mod;
+ _mrb_define_method($176,$177,65640,255,4096);
+ $178 = $0;
+ $179 = $mod;
+ _mrb_define_method($178,$179,65647,256,262144);
+ $180 = $0;
+ $181 = $mod;
+ _mrb_define_method($180,$181,65730,257,4096);
+ $182 = $0;
+ $183 = $mod;
+ _mrb_define_method($182,$183,65744,233,262144);
+ $184 = $0;
+ $185 = $mod;
+ _mrb_define_method($184,$185,65789,258,4096);
+ $186 = $0;
+ $187 = $mod;
+ _mrb_define_method($186,$187,65803,259,4096);
+ $188 = $0;
+ $189 = $mod;
+ _mrb_define_method($188,$189,68977,260,0);
+ $190 = $0;
+ $191 = $mod;
+ _mrb_define_method($190,$191,68986,260,0);
+ $192 = $0;
+ $193 = $mod;
+ _mrb_define_method($192,$193,69642,261,4096);
+ $194 = $0;
+ $195 = $mod;
+ _mrb_define_method($194,$195,65840,262,0);
+ $196 = $0;
+ $197 = $mod;
+ _mrb_define_method($196,$197,69655,263,4096);
+ $198 = $0;
+ $199 = $mod;
+ _mrb_define_method($198,$199,65850,264,270336);
+ $200 = $0;
+ $201 = $mod;
+ _mrb_define_method($200,$201,65892,265,262144);
+ $202 = $0;
+ $203 = $mod;
+ _mrb_define_method($202,$203,65902,266,524288);
+ $204 = $0;
+ $205 = $mod;
+ _mrb_define_method($204,$205,65912,267,8192);
+ $206 = $0;
+ $207 = $mod;
+ _mrb_define_method($206,$207,65922,268,262144);
+ $208 = $0;
+ $209 = $mod;
+ _mrb_define_method($208,$209,65959,269,262144);
+ $210 = $0;
+ $211 = $mod;
+ _mrb_define_method($210,$211,66029,270,262144);
+ $212 = $0;
+ $213 = $mod;
+ _mrb_define_method($212,$213,66043,271,0);
+ $214 = $0;
+ $215 = $mod;
+ _mrb_define_method($214,$215,69450,272,262144);
+ $216 = $0;
+ $217 = $mod;
+ _mrb_define_class_method($216,$217,65912,273,4096);
+ $218 = $0;
+ $219 = $cls;
+ _mrb_undef_method($218,$219,65505);
+ $220 = $0;
+ $221 = $cls;
+ _mrb_undef_method($220,$221,68155);
+ STACKTOP = sp;return;
+}
+function _mrb_bob_init($agg$result,$mrb,$cv) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $cv = $cv|0;
+ var $0 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ _mrb_nil_value_703($agg$result);
+ STACKTOP = sp;return;
+}
+function _mrb_bob_not($agg$result,$mrb,$cv) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $cv = $cv|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = ((($cv)) + 4|0);
+ $2 = HEAP32[$1>>2]|0;
+ $3 = ($2|0)!=(0);
+ $4 = $3 ^ 1;
+ $5 = $4&1;
+ $6 = $5&255;
+ _mrb_bool_value_763($agg$result,$6);
+ STACKTOP = sp;return;
+}
+function _mrb_bool_value_763($agg$result,$boolean) {
+ $agg$result = $agg$result|0;
+ $boolean = $boolean|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $boolean;
+ $1 = $0;
+ $2 = $1&255;
+ $3 = ($2|0)!=(0);
+ $4 = $3 ? 2 : 0;
+ $5 = ((($v)) + 4|0);
+ HEAP32[$5>>2] = $4;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_bob_missing($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $a = 0, $alen = 0, $mod$byval_copy = 0, $name = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 48|0;
+ $mod$byval_copy = sp + 40|0;
+ $vararg_buffer = sp;
+ $name = sp + 32|0;
+ $a = sp + 28|0;
+ $alen = sp + 24|0;
+ $1 = sp + 16|0;
+ $0 = $mrb;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $name;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $a;
+ $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+ HEAP32[$vararg_ptr2>>2] = $alen;
+ (_mrb_get_args($2,65337,$vararg_buffer)|0);
+ $3 = $0;
+ $4 = HEAP32[$name>>2]|0;
+ $5 = $0;
+ $6 = HEAP32[$alen>>2]|0;
+ $7 = HEAP32[$a>>2]|0;
+ _mrb_ary_new_from_values($1,$5,$6,$7);
+ ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;
+ _mrb_method_missing($3,$4,$mod$byval_copy,$$byval_copy);
+ _mrb_nil_value_703($agg$result);
+ STACKTOP = sp;return;
+}
+function _mrb_class_new_class($agg$result,$mrb,$cv) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $cv = $cv|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $blk = 0, $blk$byval_copy = 0, $n = 0, $new_class = 0, $new_class$byval_copy = 0, $super = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $blk$byval_copy = sp + 72|0;
+ $new_class$byval_copy = sp + 64|0;
+ $vararg_buffer = sp;
+ $super = sp + 48|0;
+ $blk = sp + 40|0;
+ $new_class = sp + 32|0;
+ $1 = sp + 24|0;
+ $2 = sp + 16|0;
+ $3 = sp + 8|0;
+ $0 = $mrb;
+ $4 = $0;
+ HEAP32[$vararg_buffer>>2] = $super;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $blk;
+ $5 = (_mrb_get_args($4,65340,$vararg_buffer)|0);
+ $n = $5;
+ $6 = $n;
+ $7 = ($6|0)==(0);
+ if ($7) {
+  $8 = $0;
+  $9 = ((($8)) + 32|0);
+  $10 = HEAP32[$9>>2]|0;
+  _mrb_obj_value_675($1,$10);
+  ;HEAP32[$super>>2]=HEAP32[$1>>2]|0;HEAP32[$super+4>>2]=HEAP32[$1+4>>2]|0;
+ }
+ $11 = $0;
+ $12 = HEAP32[$super>>2]|0;
+ $13 = (_mrb_class_new($11,$12)|0);
+ _mrb_obj_value_675($2,$13);
+ ;HEAP32[$new_class>>2]=HEAP32[$2>>2]|0;HEAP32[$new_class+4>>2]=HEAP32[$2+4>>2]|0;
+ $14 = $0;
+ $15 = $0;
+ $16 = (_mrb_intern_static($15,68953,10)|0);
+ $17 = $n;
+ ;HEAP32[$new_class$byval_copy>>2]=HEAP32[$new_class>>2]|0;HEAP32[$new_class$byval_copy+4>>2]=HEAP32[$new_class+4>>2]|0;
+ ;HEAP32[$blk$byval_copy>>2]=HEAP32[$blk>>2]|0;HEAP32[$blk$byval_copy+4>>2]=HEAP32[$blk+4>>2]|0;
+ _mrb_funcall_with_block($3,$14,$new_class$byval_copy,$16,$17,$super,$blk$byval_copy);
+ $18 = $0;
+ $19 = HEAP32[$super>>2]|0;
+ $20 = HEAP32[$new_class>>2]|0;
+ _mrb_class_inherited($18,$19,$20);
+ ;HEAP32[$agg$result>>2]=HEAP32[$new_class>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$new_class+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_class_superclass($agg$result,$mrb,$klass) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $klass = $klass|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$klass>>2]|0;
+ $c = $1;
+ $2 = $c;
+ $3 = (_find_origin($2)|0);
+ $4 = ((($3)) + 20|0);
+ $5 = HEAP32[$4>>2]|0;
+ $c = $5;
+ while(1) {
+  $6 = $c;
+  $7 = ($6|0)!=(0|0);
+  if ($7) {
+   $8 = $c;
+   $9 = HEAP32[$8>>2]|0;
+   $10 = $9 & 255;
+   $11 = ($10|0)==(11);
+   $18 = $11;
+  } else {
+   $18 = 0;
+  }
+  $12 = $c;
+  if (!($18)) {
+   break;
+  }
+  $13 = (_find_origin($12)|0);
+  $14 = ((($13)) + 20|0);
+  $15 = HEAP32[$14>>2]|0;
+  $c = $15;
+ }
+ $16 = ($12|0)!=(0|0);
+ if ($16) {
+  $17 = $c;
+  _mrb_obj_value_675($agg$result,$17);
+  STACKTOP = sp;return;
+ } else {
+  _mrb_nil_value_703($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_class_initialize($agg$result,$mrb,$c) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, $b = 0, $b$byval_copy = 0, $c$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $c$byval_copy = sp + 48|0;
+ $b$byval_copy = sp + 40|0;
+ $vararg_buffer = sp;
+ $a = sp + 24|0;
+ $b = sp + 16|0;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $a;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $b;
+ (_mrb_get_args($2,65340,$vararg_buffer)|0);
+ $3 = ((($b)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)==(0);
+ if ($5) {
+  $6 = HEAP32[$b>>2]|0;
+  $7 = ($6|0)!=(0);
+  if (!($7)) {
+   ;HEAP32[$agg$result>>2]=HEAP32[$c>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$c+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+ }
+ $8 = $0;
+ $9 = HEAP32[$c>>2]|0;
+ ;HEAP32[$b$byval_copy>>2]=HEAP32[$b>>2]|0;HEAP32[$b$byval_copy+4>>2]=HEAP32[$b+4>>2]|0;
+ ;HEAP32[$c$byval_copy>>2]=HEAP32[$c>>2]|0;HEAP32[$c$byval_copy+4>>2]=HEAP32[$c+4>>2]|0;
+ _mrb_yield_with_class($1,$8,$b$byval_copy,1,$c,$c$byval_copy,$9);
+ ;HEAP32[$agg$result>>2]=HEAP32[$c>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$c+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_mod_cvar_defined($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $id = 0, $mod$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $mod$byval_copy = sp + 16|0;
+ $vararg_buffer = sp;
+ $id = sp + 4|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $id;
+ (_mrb_get_args($1,68285,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP32[$id>>2]|0;
+ _check_cv_name_sym($2,$3);
+ $4 = $0;
+ $5 = HEAP32[$id>>2]|0;
+ ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+ $6 = (_mrb_cv_defined($4,$mod$byval_copy,$5)|0);
+ _mrb_bool_value_763($agg$result,$6);
+ STACKTOP = sp;return;
+}
+function _check_cv_name_sym($mrb,$id) {
+ $mrb = $mrb|0;
+ $id = $id|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 16|0;
+ $2 = sp;
+ $0 = $mrb;
+ $1 = $id;
+ $3 = $0;
+ $4 = $0;
+ $5 = $1;
+ _mrb_sym2str($2,$4,$5);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+ _check_cv_name_str($3,$$byval_copy);
+ STACKTOP = sp;return;
+}
+function _check_cv_name_str($mrb,$str) {
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $len = 0, $s = 0;
+ var $str$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $0 = $mrb;
+ $1 = HEAP32[$str>>2]|0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 >>> 11;
+ $4 = $3 & 8;
+ $5 = ($4|0)!=(0);
+ $6 = HEAP32[$str>>2]|0;
+ $7 = ((($6)) + 12|0);
+ if ($5) {
+  $10 = $7;
+ } else {
+  $8 = ((($7)) + 8|0);
+  $9 = HEAP32[$8>>2]|0;
+  $10 = $9;
+ }
+ $s = $10;
+ $11 = HEAP32[$str>>2]|0;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $12 >>> 11;
+ $14 = $13 & 8;
+ $15 = ($14|0)!=(0);
+ $16 = HEAP32[$str>>2]|0;
+ if ($15) {
+  $17 = HEAP32[$16>>2]|0;
+  $18 = $17 >>> 11;
+  $19 = $18 & 496;
+  $20 = $19 >> 4;
+  $23 = $20;
+ } else {
+  $21 = ((($16)) + 12|0);
+  $22 = HEAP32[$21>>2]|0;
+  $23 = $22;
+ }
+ $len = $23;
+ $24 = $len;
+ $25 = ($24|0)<(3);
+ if (!($25)) {
+  $26 = $s;
+  $27 = HEAP8[$26>>0]|0;
+  $28 = $27 << 24 >> 24;
+  $29 = ($28|0)==(64);
+  if ($29) {
+   $30 = $s;
+   $31 = ((($30)) + 1|0);
+   $32 = HEAP8[$31>>0]|0;
+   $33 = $32 << 24 >> 24;
+   $34 = ($33|0)==(64);
+   if ($34) {
+    STACKTOP = sp;return;
+   }
+  }
+ }
+ $35 = $0;
+ $36 = $0;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ $37 = (_mrb_intern_str($36,$str$byval_copy)|0);
+ ;HEAP8[$vararg_buffer>>0]=HEAP8[$str>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$str+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$str+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$str+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$str+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$str+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$str+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$str+7>>0]|0;
+ _mrb_name_error($35,$37,65379,$vararg_buffer);
+ // unreachable;
+}
+function _mrb_mod_cvar_get($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $id = 0, $mod$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $mod$byval_copy = sp + 16|0;
+ $vararg_buffer = sp;
+ $id = sp + 4|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $id;
+ (_mrb_get_args($1,68285,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP32[$id>>2]|0;
+ _check_cv_name_sym($2,$3);
+ $4 = $0;
+ $5 = HEAP32[$id>>2]|0;
+ ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+ _mrb_cv_get($agg$result,$4,$mod$byval_copy,$5);
+ STACKTOP = sp;return;
+}
+function _mrb_mod_cvar_set($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $id = 0, $mod$byval_copy = 0, $value = 0, $value$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $value$byval_copy = sp + 40|0;
+ $mod$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $value = sp + 16|0;
+ $id = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $id;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $value;
+ (_mrb_get_args($1,68331,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP32[$id>>2]|0;
+ _check_cv_name_sym($2,$3);
+ $4 = $0;
+ $5 = HEAP32[$id>>2]|0;
+ ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+ ;HEAP32[$value$byval_copy>>2]=HEAP32[$value>>2]|0;HEAP32[$value$byval_copy+4>>2]=HEAP32[$value+4>>2]|0;
+ _mrb_cv_set($4,$mod$byval_copy,$5,$value$byval_copy);
+ ;HEAP32[$agg$result>>2]=HEAP32[$value>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$value+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_mod_extend_object($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $mod$byval_copy = 0, $obj = 0, $obj$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 40|0;
+ $mod$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $obj = sp + 16|0;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = $0;
+ ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+ _mrb_check_type($2,$mod$byval_copy,10);
+ $3 = $0;
+ HEAP32[$vararg_buffer>>2] = $obj;
+ (_mrb_get_args($3,68900,$vararg_buffer)|0);
+ $4 = $0;
+ $5 = $0;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ _mrb_singleton_class($1,$5,$obj$byval_copy);
+ $6 = HEAP32[$1>>2]|0;
+ $7 = HEAP32[$mod>>2]|0;
+ _mrb_include_module($4,$6,$7);
+ ;HEAP32[$agg$result>>2]=HEAP32[$mod>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$mod+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_mod_prepend($agg$result,$mrb,$klass) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $klass = $klass|0;
+ var $$byval_copy = 0, $$byval_copy8 = 0, $$byval_copy9 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
+ var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $argc = 0, $argv = 0, $i = 0, $vararg_buffer = 0, $vararg_buffer2 = 0, $vararg_buffer5 = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy9 = sp + 72|0;
+ $$byval_copy8 = sp + 64|0;
+ $$byval_copy = sp + 56|0;
+ $vararg_buffer5 = sp + 16|0;
+ $vararg_buffer2 = sp + 8|0;
+ $vararg_buffer = sp;
+ $argv = sp + 48|0;
+ $argc = sp + 44|0;
+ $1 = sp + 32|0;
+ $2 = sp + 24|0;
+ $0 = $mrb;
+ $3 = $0;
+ HEAP32[$vararg_buffer>>2] = $argv;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $argc;
+ (_mrb_get_args($3,68114,$vararg_buffer)|0);
+ $i = 0;
+ while(1) {
+  $4 = $i;
+  $5 = HEAP32[$argc>>2]|0;
+  $6 = ($4|0)<($5|0);
+  if (!($6)) {
+   break;
+  }
+  $7 = $0;
+  $8 = $i;
+  $9 = HEAP32[$argv>>2]|0;
+  $10 = (($9) + ($8<<3)|0);
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$10>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$10+4>>2]|0;
+  _mrb_check_type($7,$$byval_copy,10);
+  $11 = $i;
+  $12 = (($11) + 1)|0;
+  $i = $12;
+ }
+ while(1) {
+  $13 = HEAP32[$argc>>2]|0;
+  $14 = (($13) + -1)|0;
+  HEAP32[$argc>>2] = $14;
+  $15 = ($13|0)!=(0);
+  if (!($15)) {
+   break;
+  }
+  $16 = $0;
+  $17 = HEAP32[$argc>>2]|0;
+  $18 = HEAP32[$argv>>2]|0;
+  $19 = (($18) + ($17<<3)|0);
+  ;HEAP8[$vararg_buffer2>>0]=HEAP8[$klass>>0]|0;HEAP8[$vararg_buffer2+1>>0]=HEAP8[$klass+1>>0]|0;HEAP8[$vararg_buffer2+2>>0]=HEAP8[$klass+2>>0]|0;HEAP8[$vararg_buffer2+3>>0]=HEAP8[$klass+3>>0]|0;HEAP8[$vararg_buffer2+4>>0]=HEAP8[$klass+4>>0]|0;HEAP8[$vararg_buffer2+5>>0]=HEAP8[$klass+5>>0]|0;HEAP8[$vararg_buffer2+6>>0]=HEAP8[$klass+6>>0]|0;HEAP8[$vararg_buffer2+7>>0]=HEAP8[$klass+7>>0]|0;
+  ;HEAP32[$$byval_copy8>>2]=HEAP32[$19>>2]|0;HEAP32[$$byval_copy8+4>>2]=HEAP32[$19+4>>2]|0;
+  _mrb_funcall($1,$16,$$byval_copy8,65470,1,$vararg_buffer2);
+  $20 = $0;
+  $21 = HEAP32[$argc>>2]|0;
+  $22 = HEAP32[$argv>>2]|0;
+  $23 = (($22) + ($21<<3)|0);
+  ;HEAP8[$vararg_buffer5>>0]=HEAP8[$klass>>0]|0;HEAP8[$vararg_buffer5+1>>0]=HEAP8[$klass+1>>0]|0;HEAP8[$vararg_buffer5+2>>0]=HEAP8[$klass+2>>0]|0;HEAP8[$vararg_buffer5+3>>0]=HEAP8[$klass+3>>0]|0;HEAP8[$vararg_buffer5+4>>0]=HEAP8[$klass+4>>0]|0;HEAP8[$vararg_buffer5+5>>0]=HEAP8[$klass+5>>0]|0;HEAP8[$vararg_buffer5+6>>0]=HEAP8[$klass+6>>0]|0;HEAP8[$vararg_buffer5+7>>0]=HEAP8[$klass+7>>0]|0;
+  ;HEAP32[$$byval_copy9>>2]=HEAP32[$23>>2]|0;HEAP32[$$byval_copy9+4>>2]=HEAP32[$23+4>>2]|0;
+  _mrb_funcall($2,$20,$$byval_copy9,65487,1,$vararg_buffer5);
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$klass>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$klass+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_mod_prepend_features($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $klass = 0, $mod$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $mod$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $klass = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+ _mrb_check_type($1,$mod$byval_copy,10);
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $klass;
+ (_mrb_get_args($2,68256,$vararg_buffer)|0);
+ $3 = $0;
+ $4 = HEAP32[$klass>>2]|0;
+ $5 = HEAP32[$mod>>2]|0;
+ _mrb_prepend_module($3,$4,$5);
+ ;HEAP32[$agg$result>>2]=HEAP32[$mod>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$mod+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_mod_include($agg$result,$mrb,$klass) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $klass = $klass|0;
+ var $$byval_copy = 0, $$byval_copy8 = 0, $$byval_copy9 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
+ var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $argc = 0, $argv = 0, $i = 0, $vararg_buffer = 0, $vararg_buffer2 = 0, $vararg_buffer5 = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy9 = sp + 72|0;
+ $$byval_copy8 = sp + 64|0;
+ $$byval_copy = sp + 56|0;
+ $vararg_buffer5 = sp + 16|0;
+ $vararg_buffer2 = sp + 8|0;
+ $vararg_buffer = sp;
+ $argv = sp + 48|0;
+ $argc = sp + 44|0;
+ $1 = sp + 32|0;
+ $2 = sp + 24|0;
+ $0 = $mrb;
+ $3 = $0;
+ HEAP32[$vararg_buffer>>2] = $argv;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $argc;
+ (_mrb_get_args($3,68114,$vararg_buffer)|0);
+ $i = 0;
+ while(1) {
+  $4 = $i;
+  $5 = HEAP32[$argc>>2]|0;
+  $6 = ($4|0)<($5|0);
+  if (!($6)) {
+   break;
+  }
+  $7 = $0;
+  $8 = $i;
+  $9 = HEAP32[$argv>>2]|0;
+  $10 = (($9) + ($8<<3)|0);
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$10>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$10+4>>2]|0;
+  _mrb_check_type($7,$$byval_copy,10);
+  $11 = $i;
+  $12 = (($11) + 1)|0;
+  $i = $12;
+ }
+ while(1) {
+  $13 = HEAP32[$argc>>2]|0;
+  $14 = (($13) + -1)|0;
+  HEAP32[$argc>>2] = $14;
+  $15 = ($13|0)!=(0);
+  if (!($15)) {
+   break;
+  }
+  $16 = $0;
+  $17 = HEAP32[$argc>>2]|0;
+  $18 = HEAP32[$argv>>2]|0;
+  $19 = (($18) + ($17<<3)|0);
+  ;HEAP8[$vararg_buffer2>>0]=HEAP8[$klass>>0]|0;HEAP8[$vararg_buffer2+1>>0]=HEAP8[$klass+1>>0]|0;HEAP8[$vararg_buffer2+2>>0]=HEAP8[$klass+2>>0]|0;HEAP8[$vararg_buffer2+3>>0]=HEAP8[$klass+3>>0]|0;HEAP8[$vararg_buffer2+4>>0]=HEAP8[$klass+4>>0]|0;HEAP8[$vararg_buffer2+5>>0]=HEAP8[$klass+5>>0]|0;HEAP8[$vararg_buffer2+6>>0]=HEAP8[$klass+6>>0]|0;HEAP8[$vararg_buffer2+7>>0]=HEAP8[$klass+7>>0]|0;
+  ;HEAP32[$$byval_copy8>>2]=HEAP32[$19>>2]|0;HEAP32[$$byval_copy8+4>>2]=HEAP32[$19+4>>2]|0;
+  _mrb_funcall($1,$16,$$byval_copy8,65505,1,$vararg_buffer2);
+  $20 = $0;
+  $21 = HEAP32[$argc>>2]|0;
+  $22 = HEAP32[$argv>>2]|0;
+  $23 = (($22) + ($21<<3)|0);
+  ;HEAP8[$vararg_buffer5>>0]=HEAP8[$klass>>0]|0;HEAP8[$vararg_buffer5+1>>0]=HEAP8[$klass+1>>0]|0;HEAP8[$vararg_buffer5+2>>0]=HEAP8[$klass+2>>0]|0;HEAP8[$vararg_buffer5+3>>0]=HEAP8[$klass+3>>0]|0;HEAP8[$vararg_buffer5+4>>0]=HEAP8[$klass+4>>0]|0;HEAP8[$vararg_buffer5+5>>0]=HEAP8[$klass+5>>0]|0;HEAP8[$vararg_buffer5+6>>0]=HEAP8[$klass+6>>0]|0;HEAP8[$vararg_buffer5+7>>0]=HEAP8[$klass+7>>0]|0;
+  ;HEAP32[$$byval_copy9>>2]=HEAP32[$23>>2]|0;HEAP32[$$byval_copy9+4>>2]=HEAP32[$23+4>>2]|0;
+  _mrb_funcall($2,$20,$$byval_copy9,65521,1,$vararg_buffer5);
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$klass>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$klass+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_mod_include_p($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, $mod2 = 0;
+ var $mod2$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $mod2$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $mod2 = sp + 8|0;
+ $0 = $mrb;
+ $1 = HEAP32[$mod>>2]|0;
+ $c = $1;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $mod2;
+ (_mrb_get_args($2,68256,$vararg_buffer)|0);
+ $3 = $0;
+ ;HEAP32[$mod2$byval_copy>>2]=HEAP32[$mod2>>2]|0;HEAP32[$mod2$byval_copy+4>>2]=HEAP32[$mod2+4>>2]|0;
+ _mrb_check_type($3,$mod2$byval_copy,10);
+ while(1) {
+  $4 = $c;
+  $5 = ($4|0)!=(0|0);
+  if (!($5)) {
+   label = 7;
+   break;
+  }
+  $6 = $c;
+  $7 = HEAP32[$6>>2]|0;
+  $8 = $7 & 255;
+  $9 = ($8|0)==(11);
+  if ($9) {
+   $10 = $c;
+   $11 = ((($10)) + 4|0);
+   $12 = HEAP32[$11>>2]|0;
+   $13 = HEAP32[$mod2>>2]|0;
+   $14 = ($12|0)==($13|0);
+   if ($14) {
+    label = 5;
+    break;
+   }
+  }
+  $15 = $c;
+  $16 = ((($15)) + 20|0);
+  $17 = HEAP32[$16>>2]|0;
+  $c = $17;
+ }
+ if ((label|0) == 5) {
+  _mrb_true_value_786($agg$result);
+  STACKTOP = sp;return;
+ }
+ else if ((label|0) == 7) {
+  _mrb_false_value_787($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_true_value_786($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 2;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_false_value_787($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_mod_append_features($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $klass = 0, $mod$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $mod$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $klass = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+ _mrb_check_type($1,$mod$byval_copy,10);
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $klass;
+ (_mrb_get_args($2,68256,$vararg_buffer)|0);
+ $3 = $0;
+ $4 = HEAP32[$klass>>2]|0;
+ $5 = HEAP32[$mod>>2]|0;
+ _mrb_include_module($3,$4,$5);
+ ;HEAP32[$agg$result>>2]=HEAP32[$mod>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$mod+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_mod_included_modules($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, $origin = 0, $result = 0, $result$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 48|0;
+ $result$byval_copy = sp + 40|0;
+ $result = sp + 24|0;
+ $1 = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $3 = HEAP32[$self>>2]|0;
+ $c = $3;
+ $4 = $c;
+ $origin = $4;
+ $5 = $origin;
+ $6 = HEAP32[$5>>2]|0;
+ $7 = $6 >>> 11;
+ $8 = $7 & 524288;
+ $9 = ($8|0)!=(0);
+ L1: do {
+  if ($9) {
+   $10 = $origin;
+   $11 = ((($10)) + 20|0);
+   $12 = HEAP32[$11>>2]|0;
+   $origin = $12;
+   while(1) {
+    $13 = $origin;
+    $14 = HEAP32[$13>>2]|0;
+    $15 = $14 >>> 11;
+    $16 = $15 & 1048576;
+    $17 = ($16|0)!=(0);
+    $18 = $17 ^ 1;
+    if (!($18)) {
+     break L1;
+    }
+    $19 = $origin;
+    $20 = ((($19)) + 20|0);
+    $21 = HEAP32[$20>>2]|0;
+    $origin = $21;
+   }
+  }
+ } while(0);
+ $22 = $0;
+ _mrb_ary_new($1,$22);
+ ;HEAP32[$result>>2]=HEAP32[$1>>2]|0;HEAP32[$result+4>>2]=HEAP32[$1+4>>2]|0;
+ while(1) {
+  $23 = $c;
+  $24 = ($23|0)!=(0|0);
+  if (!($24)) {
+   break;
+  }
+  $25 = $c;
+  $26 = $origin;
+  $27 = ($25|0)!=($26|0);
+  if ($27) {
+   $28 = $c;
+   $29 = HEAP32[$28>>2]|0;
+   $30 = $29 & 255;
+   $31 = ($30|0)==(11);
+   if ($31) {
+    $32 = $c;
+    $33 = ((($32)) + 4|0);
+    $34 = HEAP32[$33>>2]|0;
+    $35 = HEAP32[$34>>2]|0;
+    $36 = $35 & 255;
+    $37 = ($36|0)==(10);
+    if ($37) {
+     $38 = $0;
+     $39 = $c;
+     $40 = ((($39)) + 4|0);
+     $41 = HEAP32[$40>>2]|0;
+     _mrb_obj_value_675($2,$41);
+     ;HEAP32[$result$byval_copy>>2]=HEAP32[$result>>2]|0;HEAP32[$result$byval_copy+4>>2]=HEAP32[$result+4>>2]|0;
+     ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+     _mrb_ary_push($38,$result$byval_copy,$$byval_copy);
+    }
+   }
+  }
+  $42 = $c;
+  $43 = ((($42)) + 20|0);
+  $44 = HEAP32[$43>>2]|0;
+  $c = $44;
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$result>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$result+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_mod_initialize($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $b = 0, $b$byval_copy = 0, $m = 0, $mod$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $mod$byval_copy = sp + 48|0;
+ $b$byval_copy = sp + 40|0;
+ $vararg_buffer = sp;
+ $b = sp + 24|0;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = HEAP32[$mod>>2]|0;
+ $m = $2;
+ $3 = $0;
+ $4 = $m;
+ _boot_initmod($3,$4);
+ $5 = $0;
+ HEAP32[$vararg_buffer>>2] = $b;
+ (_mrb_get_args($5,65558,$vararg_buffer)|0);
+ $6 = ((($b)) + 4|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ($7|0)==(0);
+ if ($8) {
+  $9 = HEAP32[$b>>2]|0;
+  $10 = ($9|0)!=(0);
+  if (!($10)) {
+   ;HEAP32[$agg$result>>2]=HEAP32[$mod>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$mod+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+ }
+ $11 = $0;
+ $12 = $m;
+ ;HEAP32[$b$byval_copy>>2]=HEAP32[$b>>2]|0;HEAP32[$b$byval_copy+4>>2]=HEAP32[$b+4>>2]|0;
+ ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+ _mrb_yield_with_class($1,$11,$b$byval_copy,1,$mod,$mod$byval_copy,$12);
+ ;HEAP32[$agg$result>>2]=HEAP32[$mod>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$mod+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_mod_instance_methods($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $c = 0, $recur = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $recur = sp + 12|0;
+ $0 = $mrb;
+ $1 = HEAP32[$mod>>2]|0;
+ $c = $1;
+ HEAP8[$recur>>0] = 1;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $recur;
+ (_mrb_get_args($2,68376,$vararg_buffer)|0);
+ $3 = $0;
+ $4 = HEAP8[$recur>>0]|0;
+ $5 = $c;
+ _mrb_class_instance_method_list($agg$result,$3,$4,$5,0);
+ STACKTOP = sp;return;
+}
+function _mrb_mod_method_defined($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $id = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $id = sp + 4|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $id;
+ (_mrb_get_args($1,68285,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP32[$mod>>2]|0;
+ $4 = HEAP32[$id>>2]|0;
+ $5 = (_mrb_obj_respond_to($2,$3,$4)|0);
+ _mrb_bool_value_763($agg$result,$5);
+ STACKTOP = sp;return;
+}
+function _mrb_mod_dummy_visibility($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ ;HEAP32[$agg$result>>2]=HEAP32[$mod>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$mod+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_mod_remove_cvar($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var $id = 0, $mod$byval_copy = 0, $mod$byval_copy9 = 0, $val = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer5 = 0, $vararg_ptr4 = 0, $vararg_ptr8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $mod$byval_copy9 = sp + 96|0;
+ $mod$byval_copy = sp + 88|0;
+ $vararg_buffer5 = sp + 24|0;
+ $vararg_buffer1 = sp + 8|0;
+ $vararg_buffer = sp;
+ $val = sp + 72|0;
+ $id = sp + 64|0;
+ $1 = sp + 56|0;
+ $2 = sp + 48|0;
+ $3 = sp + 40|0;
+ $0 = $mrb;
+ $4 = $0;
+ HEAP32[$vararg_buffer>>2] = $id;
+ (_mrb_get_args($4,68285,$vararg_buffer)|0);
+ $5 = $0;
+ $6 = HEAP32[$id>>2]|0;
+ _check_cv_name_sym($5,$6);
+ $7 = $0;
+ $8 = HEAP32[$id>>2]|0;
+ ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+ _mrb_iv_remove($1,$7,$mod$byval_copy,$8);
+ ;HEAP32[$val>>2]=HEAP32[$1>>2]|0;HEAP32[$val+4>>2]=HEAP32[$1+4>>2]|0;
+ $9 = ((($val)) + 4|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = ($10|0)==(5);
+ if (!($11)) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$val>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$val+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $12 = $0;
+ $13 = HEAP32[$id>>2]|0;
+ ;HEAP32[$mod$byval_copy9>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy9+4>>2]=HEAP32[$mod+4>>2]|0;
+ $14 = (_mrb_cv_defined($12,$mod$byval_copy9,$13)|0);
+ $15 = ($14<<24>>24)!=(0);
+ $16 = $0;
+ $17 = HEAP32[$id>>2]|0;
+ $18 = $0;
+ $19 = HEAP32[$id>>2]|0;
+ if ($15) {
+  _mrb_sym2str($2,$18,$19);
+  ;HEAP8[$vararg_buffer1>>0]=HEAP8[$2>>0]|0;HEAP8[$vararg_buffer1+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$vararg_buffer1+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$vararg_buffer1+3>>0]=HEAP8[$2+3>>0]|0;HEAP8[$vararg_buffer1+4>>0]=HEAP8[$2+4>>0]|0;HEAP8[$vararg_buffer1+5>>0]=HEAP8[$2+5>>0]|0;HEAP8[$vararg_buffer1+6>>0]=HEAP8[$2+6>>0]|0;HEAP8[$vararg_buffer1+7>>0]=HEAP8[$2+7>>0]|0;
+  $vararg_ptr4 = ((($vararg_buffer1)) + 8|0);
+  ;HEAP8[$vararg_ptr4>>0]=HEAP8[$mod>>0]|0;HEAP8[$vararg_ptr4+1>>0]=HEAP8[$mod+1>>0]|0;HEAP8[$vararg_ptr4+2>>0]=HEAP8[$mod+2>>0]|0;HEAP8[$vararg_ptr4+3>>0]=HEAP8[$mod+3>>0]|0;HEAP8[$vararg_ptr4+4>>0]=HEAP8[$mod+4>>0]|0;HEAP8[$vararg_ptr4+5>>0]=HEAP8[$mod+5>>0]|0;HEAP8[$vararg_ptr4+6>>0]=HEAP8[$mod+6>>0]|0;HEAP8[$vararg_ptr4+7>>0]=HEAP8[$mod+7>>0]|0;
+  _mrb_name_error($16,$17,65669,$vararg_buffer1);
+  // unreachable;
+ } else {
+  _mrb_sym2str($3,$18,$19);
+  ;HEAP8[$vararg_buffer5>>0]=HEAP8[$3>>0]|0;HEAP8[$vararg_buffer5+1>>0]=HEAP8[$3+1>>0]|0;HEAP8[$vararg_buffer5+2>>0]=HEAP8[$3+2>>0]|0;HEAP8[$vararg_buffer5+3>>0]=HEAP8[$3+3>>0]|0;HEAP8[$vararg_buffer5+4>>0]=HEAP8[$3+4>>0]|0;HEAP8[$vararg_buffer5+5>>0]=HEAP8[$3+5>>0]|0;HEAP8[$vararg_buffer5+6>>0]=HEAP8[$3+6>>0]|0;HEAP8[$vararg_buffer5+7>>0]=HEAP8[$3+7>>0]|0;
+  $vararg_ptr8 = ((($vararg_buffer5)) + 8|0);
+  ;HEAP8[$vararg_ptr8>>0]=HEAP8[$mod>>0]|0;HEAP8[$vararg_ptr8+1>>0]=HEAP8[$mod+1>>0]|0;HEAP8[$vararg_ptr8+2>>0]=HEAP8[$mod+2>>0]|0;HEAP8[$vararg_ptr8+3>>0]=HEAP8[$mod+3>>0]|0;HEAP8[$vararg_ptr8+4>>0]=HEAP8[$mod+4>>0]|0;HEAP8[$vararg_ptr8+5>>0]=HEAP8[$mod+5>>0]|0;HEAP8[$vararg_ptr8+6>>0]=HEAP8[$mod+6>>0]|0;HEAP8[$vararg_ptr8+7>>0]=HEAP8[$mod+7>>0]|0;
+  _mrb_name_error($16,$17,65693,$vararg_buffer5);
+  // unreachable;
+ }
+}
+function _mrb_mod_remove_method($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $argc = 0, $argv = 0, $mod$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $mod$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $argc = sp + 12|0;
+ $argv = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $argv;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $argc;
+ (_mrb_get_args($1,68114,$vararg_buffer)|0);
+ while(1) {
+  $2 = HEAP32[$argc>>2]|0;
+  $3 = (($2) + -1)|0;
+  HEAP32[$argc>>2] = $3;
+  $4 = ($2|0)!=(0);
+  if (!($4)) {
+   break;
+  }
+  $5 = $0;
+  $6 = HEAP32[$argv>>2]|0;
+  $7 = HEAP32[$6>>2]|0;
+  ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+  _remove_method($5,$mod$byval_copy,$7);
+  $8 = HEAP32[$argv>>2]|0;
+  $9 = ((($8)) + 8|0);
+  HEAP32[$argv>>2] = $9;
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$mod>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$mod+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _remove_method($mrb,$mod,$mid) {
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ $mid = $mid|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, $h = 0, $k = 0, $mod$byval_copy = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_ptr4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $mod$byval_copy = sp + 72|0;
+ $vararg_buffer1 = sp + 8|0;
+ $vararg_buffer = sp;
+ $2 = sp + 40|0;
+ $3 = sp + 32|0;
+ $4 = sp + 24|0;
+ $0 = $mrb;
+ $1 = $mid;
+ $5 = HEAP32[$mod>>2]|0;
+ $c = $5;
+ $6 = $c;
+ $7 = (_find_origin($6)|0);
+ $8 = ((($7)) + 16|0);
+ $9 = HEAP32[$8>>2]|0;
+ $h = $9;
+ $10 = $h;
+ $11 = ($10|0)!=(0|0);
+ if ($11) {
+  $12 = $0;
+  $13 = $h;
+  $14 = $1;
+  $15 = (_kh_get_mt($12,$13,$14)|0);
+  $k = $15;
+  $16 = $k;
+  $17 = $h;
+  $18 = HEAP32[$17>>2]|0;
+  $19 = ($16|0)!=($18|0);
+  if ($19) {
+   $20 = $0;
+   $21 = $h;
+   $22 = $k;
+   _kh_del_mt($20,$21,$22);
+   $23 = $0;
+   $24 = $1;
+   _mrb_symbol_value_677($2,$24);
+   ;HEAP8[$vararg_buffer>>0]=HEAP8[$2>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$2+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$2+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$2+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$2+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$2+7>>0]|0;
+   ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+   _mrb_funcall($3,$23,$mod$byval_copy,65744,1,$vararg_buffer);
+   STACKTOP = sp;return;
+  }
+ }
+ $25 = $0;
+ $26 = $1;
+ $27 = $0;
+ $28 = $1;
+ _mrb_sym2str($4,$27,$28);
+ ;HEAP8[$vararg_buffer1>>0]=HEAP8[$4>>0]|0;HEAP8[$vararg_buffer1+1>>0]=HEAP8[$4+1>>0]|0;HEAP8[$vararg_buffer1+2>>0]=HEAP8[$4+2>>0]|0;HEAP8[$vararg_buffer1+3>>0]=HEAP8[$4+3>>0]|0;HEAP8[$vararg_buffer1+4>>0]=HEAP8[$4+4>>0]|0;HEAP8[$vararg_buffer1+5>>0]=HEAP8[$4+5>>0]|0;HEAP8[$vararg_buffer1+6>>0]=HEAP8[$4+6>>0]|0;HEAP8[$vararg_buffer1+7>>0]=HEAP8[$4+7>>0]|0;
+ $vararg_ptr4 = ((($vararg_buffer1)) + 8|0);
+ ;HEAP8[$vararg_ptr4>>0]=HEAP8[$mod>>0]|0;HEAP8[$vararg_ptr4+1>>0]=HEAP8[$mod+1>>0]|0;HEAP8[$vararg_ptr4+2>>0]=HEAP8[$mod+2>>0]|0;HEAP8[$vararg_ptr4+3>>0]=HEAP8[$mod+3>>0]|0;HEAP8[$vararg_ptr4+4>>0]=HEAP8[$mod+4>>0]|0;HEAP8[$vararg_ptr4+5>>0]=HEAP8[$mod+5>>0]|0;HEAP8[$vararg_ptr4+6>>0]=HEAP8[$mod+6>>0]|0;HEAP8[$vararg_ptr4+7>>0]=HEAP8[$mod+7>>0]|0;
+ _mrb_name_error($25,$26,65759,$vararg_buffer1);
+ // unreachable;
+}
+function _mrb_mod_attr_reader($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ai = 0, $argc = 0, $argv = 0, $c = 0, $i = 0, $method = 0, $name = 0, $name$byval_copy = 0;
+ var $str = 0, $str$byval_copy = 0, $str$byval_copy2 = 0, $str$byval_copy3 = 0, $sym = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy3 = sp + 128|0;
+ $name$byval_copy = sp + 120|0;
+ $str$byval_copy2 = sp + 112|0;
+ $str$byval_copy = sp + 104|0;
+ $$byval_copy = sp + 96|0;
+ $vararg_buffer = sp;
+ $argv = sp + 84|0;
+ $argc = sp + 80|0;
+ $name = sp + 64|0;
+ $str = sp + 56|0;
+ $1 = sp + 40|0;
+ $2 = sp + 32|0;
+ $3 = sp + 24|0;
+ $4 = sp + 16|0;
+ $5 = sp + 8|0;
+ $0 = $mrb;
+ $6 = HEAP32[$mod>>2]|0;
+ $c = $6;
+ $7 = $0;
+ HEAP32[$vararg_buffer>>2] = $argv;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $argc;
+ (_mrb_get_args($7,68114,$vararg_buffer)|0);
+ $8 = $0;
+ $9 = (_mrb_gc_arena_save($8)|0);
+ $ai = $9;
+ $i = 0;
+ while(1) {
+  $10 = $i;
+  $11 = HEAP32[$argc>>2]|0;
+  $12 = ($10|0)<($11|0);
+  if (!($12)) {
+   break;
+  }
+  $13 = $0;
+  $14 = $i;
+  $15 = HEAP32[$argv>>2]|0;
+  $16 = (($15) + ($14<<3)|0);
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$16>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$16+4>>2]|0;
+  $17 = (_to_sym($13,$$byval_copy)|0);
+  $method = $17;
+  $18 = $0;
+  $19 = $method;
+  _mrb_sym2str($1,$18,$19);
+  ;HEAP32[$name>>2]=HEAP32[$1>>2]|0;HEAP32[$name+4>>2]=HEAP32[$1+4>>2]|0;
+  $20 = $0;
+  $21 = HEAP32[$name>>2]|0;
+  $22 = HEAP32[$21>>2]|0;
+  $23 = $22 >>> 11;
+  $24 = $23 & 8;
+  $25 = ($24|0)!=(0);
+  $26 = HEAP32[$name>>2]|0;
+  if ($25) {
+   $27 = HEAP32[$26>>2]|0;
+   $28 = $27 >>> 11;
+   $29 = $28 & 496;
+   $30 = $29 >> 4;
+   $34 = $30;
+  } else {
+   $31 = ((($26)) + 12|0);
+   $32 = HEAP32[$31>>2]|0;
+   $34 = $32;
+  }
+  $33 = (($34) + 1)|0;
+  _mrb_str_buf_new($2,$20,$33);
+  ;HEAP32[$str>>2]=HEAP32[$2>>2]|0;HEAP32[$str+4>>2]=HEAP32[$2+4>>2]|0;
+  $35 = $0;
+  ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+  _mrb_str_cat($3,$35,$str$byval_copy,65801,1);
+  $36 = $0;
+  ;HEAP32[$str$byval_copy2>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy2+4>>2]=HEAP32[$str+4>>2]|0;
+  ;HEAP32[$name$byval_copy>>2]=HEAP32[$name>>2]|0;HEAP32[$name$byval_copy+4>>2]=HEAP32[$name+4>>2]|0;
+  _mrb_str_cat_str($4,$36,$str$byval_copy2,$name$byval_copy);
+  $37 = $0;
+  ;HEAP32[$str$byval_copy3>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy3+4>>2]=HEAP32[$str+4>>2]|0;
+  $38 = (_mrb_intern_str($37,$str$byval_copy3)|0);
+  $sym = $38;
+  $39 = $0;
+  $40 = $sym;
+  _mrb_iv_check($39,$40);
+  $41 = $sym;
+  _mrb_symbol_value_677($5,$41);
+  ;HEAP32[$name>>2]=HEAP32[$5>>2]|0;HEAP32[$name+4>>2]=HEAP32[$5+4>>2]|0;
+  $42 = $0;
+  $43 = $c;
+  $44 = $method;
+  $45 = $0;
+  $46 = (_mrb_proc_new_cfunc_with_env($45,274,1,$name)|0);
+  _mrb_define_method_raw($42,$43,$44,$46);
+  $47 = $0;
+  $48 = $ai;
+  _mrb_gc_arena_restore($47,$48);
+  $49 = $i;
+  $50 = (($49) + 1)|0;
+  $i = $50;
+ }
+ _mrb_nil_value_703($agg$result);
+ STACKTOP = sp;return;
+}
+function _attr_reader($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $name = 0, $name$byval_copy = 0, $obj$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 24|0;
+ $name$byval_copy = sp + 16|0;
+ $name = sp;
+ $0 = $mrb;
+ $1 = $0;
+ _mrb_proc_cfunc_env_get($name,$1,0);
+ $2 = $0;
+ $3 = $0;
+ ;HEAP32[$name$byval_copy>>2]=HEAP32[$name>>2]|0;HEAP32[$name$byval_copy+4>>2]=HEAP32[$name+4>>2]|0;
+ $4 = (_to_sym($3,$name$byval_copy)|0);
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ _mrb_iv_get($agg$result,$2,$obj$byval_copy,$4);
+ STACKTOP = sp;return;
+}
+function _mrb_mod_attr_writer($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
+ var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $8 = 0, $9 = 0, $ai = 0, $argc = 0, $argv = 0, $attr = 0, $c = 0, $i = 0, $method = 0;
+ var $name = 0, $name$byval_copy = 0, $name$byval_copy5 = 0, $str = 0, $str$byval_copy = 0, $str$byval_copy2 = 0, $str$byval_copy3 = 0, $str$byval_copy4 = 0, $str$byval_copy6 = 0, $str$byval_copy7 = 0, $sym = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 208|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy7 = sp + 192|0;
+ $str$byval_copy6 = sp + 184|0;
+ $name$byval_copy5 = sp + 176|0;
+ $str$byval_copy4 = sp + 168|0;
+ $str$byval_copy3 = sp + 160|0;
+ $name$byval_copy = sp + 152|0;
+ $str$byval_copy2 = sp + 144|0;
+ $str$byval_copy = sp + 136|0;
+ $$byval_copy = sp + 128|0;
+ $vararg_buffer = sp;
+ $argv = sp + 116|0;
+ $argc = sp + 112|0;
+ $name = sp + 96|0;
+ $str = sp + 88|0;
+ $attr = sp + 80|0;
+ $1 = sp + 64|0;
+ $2 = sp + 56|0;
+ $3 = sp + 48|0;
+ $4 = sp + 40|0;
+ $5 = sp + 32|0;
+ $6 = sp + 24|0;
+ $7 = sp + 16|0;
+ $8 = sp + 8|0;
+ $0 = $mrb;
+ $9 = HEAP32[$mod>>2]|0;
+ $c = $9;
+ $10 = $0;
+ HEAP32[$vararg_buffer>>2] = $argv;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $argc;
+ (_mrb_get_args($10,68114,$vararg_buffer)|0);
+ $11 = $0;
+ $12 = (_mrb_gc_arena_save($11)|0);
+ $ai = $12;
+ $i = 0;
+ while(1) {
+  $13 = $i;
+  $14 = HEAP32[$argc>>2]|0;
+  $15 = ($13|0)<($14|0);
+  if (!($15)) {
+   break;
+  }
+  $16 = $0;
+  $17 = $i;
+  $18 = HEAP32[$argv>>2]|0;
+  $19 = (($18) + ($17<<3)|0);
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$19>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$19+4>>2]|0;
+  $20 = (_to_sym($16,$$byval_copy)|0);
+  $method = $20;
+  $21 = $0;
+  $22 = $method;
+  _mrb_sym2str($1,$21,$22);
+  ;HEAP32[$name>>2]=HEAP32[$1>>2]|0;HEAP32[$name+4>>2]=HEAP32[$1+4>>2]|0;
+  $23 = $0;
+  $24 = HEAP32[$name>>2]|0;
+  $25 = HEAP32[$24>>2]|0;
+  $26 = $25 >>> 11;
+  $27 = $26 & 8;
+  $28 = ($27|0)!=(0);
+  $29 = HEAP32[$name>>2]|0;
+  if ($28) {
+   $30 = HEAP32[$29>>2]|0;
+   $31 = $30 >>> 11;
+   $32 = $31 & 496;
+   $33 = $32 >> 4;
+   $37 = $33;
+  } else {
+   $34 = ((($29)) + 12|0);
+   $35 = HEAP32[$34>>2]|0;
+   $37 = $35;
+  }
+  $36 = (($37) + 1)|0;
+  _mrb_str_buf_new($2,$23,$36);
+  ;HEAP32[$str>>2]=HEAP32[$2>>2]|0;HEAP32[$str+4>>2]=HEAP32[$2+4>>2]|0;
+  $38 = $0;
+  ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+  _mrb_str_cat($3,$38,$str$byval_copy,65801,1);
+  $39 = $0;
+  ;HEAP32[$str$byval_copy2>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy2+4>>2]=HEAP32[$str+4>>2]|0;
+  ;HEAP32[$name$byval_copy>>2]=HEAP32[$name>>2]|0;HEAP32[$name$byval_copy+4>>2]=HEAP32[$name+4>>2]|0;
+  _mrb_str_cat_str($4,$39,$str$byval_copy2,$name$byval_copy);
+  $40 = $0;
+  ;HEAP32[$str$byval_copy3>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy3+4>>2]=HEAP32[$str+4>>2]|0;
+  $41 = (_mrb_intern_str($40,$str$byval_copy3)|0);
+  $sym = $41;
+  $42 = $0;
+  $43 = $sym;
+  _mrb_iv_check($42,$43);
+  $44 = $sym;
+  _mrb_symbol_value_677($5,$44);
+  ;HEAP32[$attr>>2]=HEAP32[$5>>2]|0;HEAP32[$attr+4>>2]=HEAP32[$5+4>>2]|0;
+  $45 = $0;
+  $46 = HEAP32[$str>>2]|0;
+  $47 = HEAP32[$46>>2]|0;
+  $48 = $47 >>> 11;
+  $49 = $48 & 8;
+  $50 = ($49|0)!=(0);
+  $51 = HEAP32[$str>>2]|0;
+  if ($50) {
+   $52 = HEAP32[$51>>2]|0;
+   $53 = $52 >>> 11;
+   $54 = $53 & 496;
+   $55 = $54 >> 4;
+   $58 = $55;
+  } else {
+   $56 = ((($51)) + 12|0);
+   $57 = HEAP32[$56>>2]|0;
+   $58 = $57;
+  }
+  _mrb_str_buf_new($6,$45,$58);
+  ;HEAP32[$str>>2]=HEAP32[$6>>2]|0;HEAP32[$str+4>>2]=HEAP32[$6+4>>2]|0;
+  $59 = $0;
+  ;HEAP32[$str$byval_copy4>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy4+4>>2]=HEAP32[$str+4>>2]|0;
+  ;HEAP32[$name$byval_copy5>>2]=HEAP32[$name>>2]|0;HEAP32[$name$byval_copy5+4>>2]=HEAP32[$name+4>>2]|0;
+  _mrb_str_cat_str($7,$59,$str$byval_copy4,$name$byval_copy5);
+  $60 = $0;
+  ;HEAP32[$str$byval_copy6>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy6+4>>2]=HEAP32[$str+4>>2]|0;
+  _mrb_str_cat($8,$60,$str$byval_copy6,65815,1);
+  $61 = $0;
+  ;HEAP32[$str$byval_copy7>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy7+4>>2]=HEAP32[$str+4>>2]|0;
+  $62 = (_mrb_intern_str($61,$str$byval_copy7)|0);
+  $method = $62;
+  $63 = $0;
+  $64 = $c;
+  $65 = $method;
+  $66 = $0;
+  $67 = (_mrb_proc_new_cfunc_with_env($66,275,1,$attr)|0);
+  _mrb_define_method_raw($63,$64,$65,$67);
+  $68 = $0;
+  $69 = $ai;
+  _mrb_gc_arena_restore($68,$69);
+  $70 = $i;
+  $71 = (($70) + 1)|0;
+  $i = $71;
+ }
+ _mrb_nil_value_703($agg$result);
+ STACKTOP = sp;return;
+}
+function _attr_writer($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $name = 0, $name$byval_copy = 0, $obj$byval_copy = 0, $val = 0, $val$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy = sp + 48|0;
+ $obj$byval_copy = sp + 40|0;
+ $name$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $name = sp + 16|0;
+ $val = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ _mrb_proc_cfunc_env_get($name,$1,0);
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $val;
+ (_mrb_get_args($2,68900,$vararg_buffer)|0);
+ $3 = $0;
+ $4 = $0;
+ ;HEAP32[$name$byval_copy>>2]=HEAP32[$name>>2]|0;HEAP32[$name$byval_copy+4>>2]=HEAP32[$name+4>>2]|0;
+ $5 = (_to_sym($4,$name$byval_copy)|0);
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+ _mrb_iv_set($3,$obj$byval_copy,$5,$val$byval_copy);
+ ;HEAP32[$agg$result>>2]=HEAP32[$val>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$val+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_mod_to_s($agg$result,$mrb,$klass) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $klass = $klass|0;
+ var $$byval_copy = 0, $$byval_copy3 = 0, $$byval_copy9 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
+ var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0;
+ var $42 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, $klass$byval_copy = 0, $path = 0, $str = 0, $str$byval_copy = 0, $str$byval_copy10 = 0, $str$byval_copy2 = 0, $str$byval_copy4 = 0, $str$byval_copy5 = 0, $str$byval_copy6 = 0, $str$byval_copy7 = 0, $str$byval_copy8 = 0, $v = 0, $v$byval_copy = 0;
+ var $v$byval_copy1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 240|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy10 = sp + 232|0;
+ $$byval_copy9 = sp + 224|0;
+ $str$byval_copy8 = sp + 216|0;
+ $str$byval_copy7 = sp + 208|0;
+ $str$byval_copy6 = sp + 200|0;
+ $str$byval_copy5 = sp + 192|0;
+ $str$byval_copy4 = sp + 184|0;
+ $$byval_copy3 = sp + 176|0;
+ $str$byval_copy2 = sp + 168|0;
+ $v$byval_copy1 = sp + 160|0;
+ $$byval_copy = sp + 152|0;
+ $str$byval_copy = sp + 144|0;
+ $v$byval_copy = sp + 136|0;
+ $klass$byval_copy = sp + 128|0;
+ $str = sp + 112|0;
+ $v = sp + 104|0;
+ $1 = sp + 96|0;
+ $2 = sp + 88|0;
+ $3 = sp + 80|0;
+ $4 = sp + 72|0;
+ $5 = sp + 64|0;
+ $path = sp + 48|0;
+ $6 = sp + 40|0;
+ $7 = sp + 32|0;
+ $8 = sp + 24|0;
+ $9 = sp + 16|0;
+ $10 = sp + 8|0;
+ $11 = sp;
+ $0 = $mrb;
+ $12 = ((($klass)) + 4|0);
+ $13 = HEAP32[$12>>2]|0;
+ $14 = ($13|0)==(12);
+ $15 = $0;
+ if ($14) {
+  $16 = $0;
+  $17 = (_mrb_intern_static($16,67899,12)|0);
+  ;HEAP32[$klass$byval_copy>>2]=HEAP32[$klass>>2]|0;HEAP32[$klass$byval_copy+4>>2]=HEAP32[$klass+4>>2]|0;
+  _mrb_iv_get($v,$15,$klass$byval_copy,$17);
+  $18 = $0;
+  _mrb_str_new_static($1,$18,65232,8);
+  ;HEAP32[$str>>2]=HEAP32[$1>>2]|0;HEAP32[$str+4>>2]=HEAP32[$1+4>>2]|0;
+  $19 = ((($v)) + 4|0);
+  $20 = HEAP32[$19>>2]|0;
+  switch ($20|0) {
+  case 12: case 10: case 9:  {
+   $21 = $0;
+   $22 = $0;
+   ;HEAP32[$v$byval_copy>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy+4>>2]=HEAP32[$v+4>>2]|0;
+   _mrb_inspect($2,$22,$v$byval_copy);
+   ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+   _mrb_str_cat_str($3,$21,$str$byval_copy,$$byval_copy);
+   break;
+  }
+  default: {
+   $23 = $0;
+   $24 = $0;
+   ;HEAP32[$v$byval_copy1>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy1+4>>2]=HEAP32[$v+4>>2]|0;
+   _mrb_any_to_s($4,$24,$v$byval_copy1);
+   ;HEAP32[$str$byval_copy2>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy2+4>>2]=HEAP32[$str+4>>2]|0;
+   ;HEAP32[$$byval_copy3>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$4+4>>2]|0;
+   _mrb_str_cat_str($5,$23,$str$byval_copy2,$$byval_copy3);
+  }
+  }
+  $25 = $0;
+  ;HEAP32[$str$byval_copy4>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy4+4>>2]=HEAP32[$str+4>>2]|0;
+  _mrb_str_cat($agg$result,$25,$str$byval_copy4,65241,1);
+  STACKTOP = sp;return;
+ }
+ _mrb_str_buf_new($6,$15,32);
+ ;HEAP32[$str>>2]=HEAP32[$6>>2]|0;HEAP32[$str+4>>2]=HEAP32[$6+4>>2]|0;
+ $26 = HEAP32[$klass>>2]|0;
+ $c = $26;
+ $27 = $0;
+ $28 = $c;
+ _mrb_class_path($7,$27,$28);
+ ;HEAP32[$path>>2]=HEAP32[$7>>2]|0;HEAP32[$path+4>>2]=HEAP32[$7+4>>2]|0;
+ $29 = ((($path)) + 4|0);
+ $30 = HEAP32[$29>>2]|0;
+ $31 = ($30|0)==(0);
+ if ($31) {
+  $32 = HEAP32[$path>>2]|0;
+  $33 = ($32|0)!=(0);
+  if (!($33)) {
+   $34 = ((($klass)) + 4|0);
+   $35 = HEAP32[$34>>2]|0;
+   switch ($35|0) {
+   case 9:  {
+    $36 = $0;
+    ;HEAP32[$str$byval_copy5>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy5+4>>2]=HEAP32[$str+4>>2]|0;
+    _mrb_str_cat($8,$36,$str$byval_copy5,65232,8);
+    break;
+   }
+   case 10:  {
+    $37 = $0;
+    ;HEAP32[$str$byval_copy6>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy6+4>>2]=HEAP32[$str+4>>2]|0;
+    _mrb_str_cat($9,$37,$str$byval_copy6,65817,9);
+    break;
+   }
+   default: {
+    $38 = $0;
+    ;HEAP32[$str$byval_copy7>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy7+4>>2]=HEAP32[$str+4>>2]|0;
+    _mrb_str_cat($10,$38,$str$byval_copy7,65827,9);
+   }
+   }
+   $39 = $0;
+   $40 = $0;
+   $41 = $c;
+   _mrb_ptr_to_str($11,$40,$41);
+   ;HEAP32[$str$byval_copy8>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy8+4>>2]=HEAP32[$str+4>>2]|0;
+   ;HEAP32[$$byval_copy9>>2]=HEAP32[$11>>2]|0;HEAP32[$$byval_copy9+4>>2]=HEAP32[$11+4>>2]|0;
+   _mrb_str_concat($39,$str$byval_copy8,$$byval_copy9);
+   $42 = $0;
+   ;HEAP32[$str$byval_copy10>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy10+4>>2]=HEAP32[$str+4>>2]|0;
+   _mrb_str_cat($agg$result,$42,$str$byval_copy10,65241,1);
+   STACKTOP = sp;return;
+  }
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$path>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$path+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_mod_alias($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $c = 0, $new_name = 0, $old_name = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $new_name = sp + 12|0;
+ $old_name = sp + 8|0;
+ $0 = $mrb;
+ $1 = HEAP32[$mod>>2]|0;
+ $c = $1;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $new_name;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $old_name;
+ (_mrb_get_args($2,65837,$vararg_buffer)|0);
+ $3 = $0;
+ $4 = $c;
+ $5 = HEAP32[$new_name>>2]|0;
+ $6 = HEAP32[$old_name>>2]|0;
+ _mrb_alias_method($3,$4,$5,$6);
+ _mrb_nil_value_703($agg$result);
+ STACKTOP = sp;return;
+}
+function _mrb_mod_ancestors($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $$byval_copy = 0, $$byval_copy2 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $25 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, $result = 0, $result$byval_copy = 0, $result$byval_copy1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy2 = sp + 72|0;
+ $result$byval_copy1 = sp + 64|0;
+ $$byval_copy = sp + 56|0;
+ $result$byval_copy = sp + 48|0;
+ $result = sp + 32|0;
+ $1 = sp + 16|0;
+ $2 = sp + 8|0;
+ $3 = sp;
+ $0 = $mrb;
+ $4 = HEAP32[$self>>2]|0;
+ $c = $4;
+ $5 = $0;
+ _mrb_ary_new($1,$5);
+ ;HEAP32[$result>>2]=HEAP32[$1>>2]|0;HEAP32[$result+4>>2]=HEAP32[$1+4>>2]|0;
+ while(1) {
+  $6 = $c;
+  $7 = ($6|0)!=(0|0);
+  if (!($7)) {
+   break;
+  }
+  $8 = $c;
+  $9 = HEAP32[$8>>2]|0;
+  $10 = $9 & 255;
+  $11 = ($10|0)==(11);
+  if ($11) {
+   $12 = $0;
+   $13 = $c;
+   $14 = ((($13)) + 4|0);
+   $15 = HEAP32[$14>>2]|0;
+   _mrb_obj_value_675($2,$15);
+   ;HEAP32[$result$byval_copy>>2]=HEAP32[$result>>2]|0;HEAP32[$result$byval_copy+4>>2]=HEAP32[$result+4>>2]|0;
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+   _mrb_ary_push($12,$result$byval_copy,$$byval_copy);
+  } else {
+   $16 = $c;
+   $17 = HEAP32[$16>>2]|0;
+   $18 = $17 >>> 11;
+   $19 = $18 & 524288;
+   $20 = ($19|0)!=(0);
+   if (!($20)) {
+    $21 = $0;
+    $22 = $c;
+    _mrb_obj_value_675($3,$22);
+    ;HEAP32[$result$byval_copy1>>2]=HEAP32[$result>>2]|0;HEAP32[$result$byval_copy1+4>>2]=HEAP32[$result+4>>2]|0;
+    ;HEAP32[$$byval_copy2>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$3+4>>2]|0;
+    _mrb_ary_push($21,$result$byval_copy1,$$byval_copy2);
+   }
+  }
+  $23 = $c;
+  $24 = ((($23)) + 20|0);
+  $25 = HEAP32[$24>>2]|0;
+  $c = $25;
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$result>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$result+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_mod_undef($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $argc = 0, $argv = 0, $c = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $argc = sp + 12|0;
+ $argv = sp + 8|0;
+ $0 = $mrb;
+ $1 = HEAP32[$mod>>2]|0;
+ $c = $1;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $argv;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $argc;
+ (_mrb_get_args($2,68114,$vararg_buffer)|0);
+ while(1) {
+  $3 = HEAP32[$argc>>2]|0;
+  $4 = (($3) + -1)|0;
+  HEAP32[$argc>>2] = $4;
+  $5 = ($3|0)!=(0);
+  if (!($5)) {
+   break;
+  }
+  $6 = $0;
+  $7 = $c;
+  $8 = HEAP32[$argv>>2]|0;
+  $9 = HEAP32[$8>>2]|0;
+  _undef_method($6,$7,$9);
+  $10 = HEAP32[$argv>>2]|0;
+  $11 = ((($10)) + 8|0);
+  HEAP32[$argv>>2] = $11;
+ }
+ _mrb_nil_value_703($agg$result);
+ STACKTOP = sp;return;
+}
+function _mrb_mod_const_defined($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $id = 0, $inherit = 0, $mod$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $mod$byval_copy = sp + 16|0;
+ $vararg_buffer = sp;
+ $id = sp + 8|0;
+ $inherit = sp + 24|0;
+ $0 = $mrb;
+ HEAP8[$inherit>>0] = 1;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $id;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $inherit;
+ (_mrb_get_args($1,65865,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP32[$id>>2]|0;
+ _check_const_name_sym($2,$3);
+ $4 = $0;
+ $5 = HEAP32[$id>>2]|0;
+ $6 = HEAP8[$inherit>>0]|0;
+ ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+ _const_defined($agg$result,$4,$mod$byval_copy,$5,$6);
+ STACKTOP = sp;return;
+}
+function _check_const_name_sym($mrb,$id) {
+ $mrb = $mrb|0;
+ $id = $id|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 16|0;
+ $2 = sp;
+ $0 = $mrb;
+ $1 = $id;
+ $3 = $0;
+ $4 = $0;
+ $5 = $1;
+ _mrb_sym2str($2,$4,$5);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+ _check_const_name_str($3,$$byval_copy);
+ STACKTOP = sp;return;
+}
+function _check_const_name_str($mrb,$str) {
+ $mrb = $mrb|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $str$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 16|0;
+ $vararg_buffer = sp;
+ $0 = $mrb;
+ $1 = HEAP32[$str>>2]|0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 >>> 11;
+ $4 = $3 & 8;
+ $5 = ($4|0)!=(0);
+ $6 = HEAP32[$str>>2]|0;
+ if ($5) {
+  $7 = HEAP32[$6>>2]|0;
+  $8 = $7 >>> 11;
+  $9 = $8 & 496;
+  $10 = $9 >> 4;
+  $13 = $10;
+ } else {
+  $11 = ((($6)) + 12|0);
+  $12 = HEAP32[$11>>2]|0;
+  $13 = $12;
+ }
+ $14 = ($13|0)<(1);
+ if (!($14)) {
+  $15 = HEAP32[$str>>2]|0;
+  $16 = HEAP32[$15>>2]|0;
+  $17 = $16 >>> 11;
+  $18 = $17 & 8;
+  $19 = ($18|0)!=(0);
+  $20 = HEAP32[$str>>2]|0;
+  $21 = ((($20)) + 12|0);
+  if ($19) {
+   $25 = $21;
+  } else {
+   $22 = ((($21)) + 8|0);
+   $23 = HEAP32[$22>>2]|0;
+   $25 = $23;
+  }
+  $24 = HEAP8[$25>>0]|0;
+  $26 = $24 << 24 >> 24;
+  $27 = (($26) - 65)|0;
+  $28 = ($27>>>0)<(26);
+  if ($28) {
+   STACKTOP = sp;return;
+  }
+ }
+ $29 = $0;
+ $30 = $0;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ $31 = (_mrb_intern_str($30,$str$byval_copy)|0);
+ ;HEAP8[$vararg_buffer>>0]=HEAP8[$str>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$str+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$str+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$str+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$str+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$str+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$str+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$str+7>>0]|0;
+ _mrb_name_error($29,$31,65869,$vararg_buffer);
+ // unreachable;
+}
+function _const_defined($agg$result,$mrb,$mod,$id,$inherit) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ $id = $id|0;
+ $inherit = $inherit|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $mod$byval_copy = 0, $mod$byval_copy1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $mod$byval_copy1 = sp + 16|0;
+ $mod$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $id;
+ $2 = $inherit;
+ $3 = $2;
+ $4 = ($3<<24>>24)!=(0);
+ $5 = $0;
+ $6 = $1;
+ if ($4) {
+  ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+  $7 = (_mrb_const_defined($5,$mod$byval_copy,$6)|0);
+  _mrb_bool_value_763($agg$result,$7);
+  STACKTOP = sp;return;
+ } else {
+  ;HEAP32[$mod$byval_copy1>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy1+4>>2]=HEAP32[$mod+4>>2]|0;
+  $8 = (_mrb_const_defined_at($5,$mod$byval_copy1,$6)|0);
+  _mrb_bool_value_763($agg$result,$8);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_mod_const_get($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $id = 0, $mod$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $mod$byval_copy = sp + 16|0;
+ $vararg_buffer = sp;
+ $id = sp + 4|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $id;
+ (_mrb_get_args($1,68285,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP32[$id>>2]|0;
+ _check_const_name_sym($2,$3);
+ $4 = $0;
+ $5 = HEAP32[$id>>2]|0;
+ ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+ _mrb_const_get($agg$result,$4,$mod$byval_copy,$5);
+ STACKTOP = sp;return;
+}
+function _mrb_mod_const_set($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $id = 0, $mod$byval_copy = 0, $value = 0, $value$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $value$byval_copy = sp + 32|0;
+ $mod$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $id = sp + 16|0;
+ $value = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $id;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $value;
+ (_mrb_get_args($1,68331,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP32[$id>>2]|0;
+ _check_const_name_sym($2,$3);
+ $4 = $0;
+ $5 = HEAP32[$id>>2]|0;
+ ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+ ;HEAP32[$value$byval_copy>>2]=HEAP32[$value>>2]|0;HEAP32[$value$byval_copy+4>>2]=HEAP32[$value+4>>2]|0;
+ _mrb_const_set($4,$mod$byval_copy,$5,$value$byval_copy);
+ ;HEAP32[$agg$result>>2]=HEAP32[$value>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$value+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_mod_remove_const($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $id = 0, $mod$byval_copy = 0, $val = 0, $vararg_buffer = 0, $vararg_buffer1 = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $mod$byval_copy = sp + 48|0;
+ $vararg_buffer1 = sp + 8|0;
+ $vararg_buffer = sp;
+ $id = sp + 40|0;
+ $val = sp + 32|0;
+ $1 = sp + 24|0;
+ $2 = sp + 16|0;
+ $0 = $mrb;
+ $3 = $0;
+ HEAP32[$vararg_buffer>>2] = $id;
+ (_mrb_get_args($3,68285,$vararg_buffer)|0);
+ $4 = $0;
+ $5 = HEAP32[$id>>2]|0;
+ _check_const_name_sym($4,$5);
+ $6 = $0;
+ $7 = HEAP32[$id>>2]|0;
+ ;HEAP32[$mod$byval_copy>>2]=HEAP32[$mod>>2]|0;HEAP32[$mod$byval_copy+4>>2]=HEAP32[$mod+4>>2]|0;
+ _mrb_iv_remove($1,$6,$mod$byval_copy,$7);
+ ;HEAP32[$val>>2]=HEAP32[$1>>2]|0;HEAP32[$val+4>>2]=HEAP32[$1+4>>2]|0;
+ $8 = ((($val)) + 4|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ($9|0)==(5);
+ if ($10) {
+  $11 = $0;
+  $12 = HEAP32[$id>>2]|0;
+  $13 = $0;
+  $14 = HEAP32[$id>>2]|0;
+  _mrb_sym2str($2,$13,$14);
+  ;HEAP8[$vararg_buffer1>>0]=HEAP8[$2>>0]|0;HEAP8[$vararg_buffer1+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$vararg_buffer1+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$vararg_buffer1+3>>0]=HEAP8[$2+3>>0]|0;HEAP8[$vararg_buffer1+4>>0]=HEAP8[$2+4>>0]|0;HEAP8[$vararg_buffer1+5>>0]=HEAP8[$2+5>>0]|0;HEAP8[$vararg_buffer1+6>>0]=HEAP8[$2+6>>0]|0;HEAP8[$vararg_buffer1+7>>0]=HEAP8[$2+7>>0]|0;
+  _mrb_name_error($11,$12,65935,$vararg_buffer1);
+  // unreachable;
+ } else {
+  ;HEAP32[$agg$result>>2]=HEAP32[$val>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$val+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_mod_const_missing($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $sym = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer5 = 0, $vararg_ptr4 = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer5 = sp + 24|0;
+ $vararg_buffer1 = sp + 8|0;
+ $vararg_buffer = sp;
+ $sym = sp + 48|0;
+ $1 = sp + 40|0;
+ $2 = sp + 32|0;
+ $0 = $mrb;
+ $3 = $0;
+ HEAP32[$vararg_buffer>>2] = $sym;
+ (_mrb_get_args($3,68285,$vararg_buffer)|0);
+ $4 = HEAP32[$mod>>2]|0;
+ $5 = (_mrb_class_real($4)|0);
+ $6 = $0;
+ $7 = ((($6)) + 32|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ($5|0)!=($8|0);
+ $10 = $0;
+ $11 = HEAP32[$sym>>2]|0;
+ $12 = $0;
+ $13 = HEAP32[$sym>>2]|0;
+ if ($9) {
+  _mrb_sym2str($1,$12,$13);
+  ;HEAP8[$vararg_buffer1>>0]=HEAP8[$mod>>0]|0;HEAP8[$vararg_buffer1+1>>0]=HEAP8[$mod+1>>0]|0;HEAP8[$vararg_buffer1+2>>0]=HEAP8[$mod+2>>0]|0;HEAP8[$vararg_buffer1+3>>0]=HEAP8[$mod+3>>0]|0;HEAP8[$vararg_buffer1+4>>0]=HEAP8[$mod+4>>0]|0;HEAP8[$vararg_buffer1+5>>0]=HEAP8[$mod+5>>0]|0;HEAP8[$vararg_buffer1+6>>0]=HEAP8[$mod+6>>0]|0;HEAP8[$vararg_buffer1+7>>0]=HEAP8[$mod+7>>0]|0;
+  $vararg_ptr4 = ((($vararg_buffer1)) + 8|0);
+  ;HEAP8[$vararg_ptr4>>0]=HEAP8[$1>>0]|0;HEAP8[$vararg_ptr4+1>>0]=HEAP8[$1+1>>0]|0;HEAP8[$vararg_ptr4+2>>0]=HEAP8[$1+2>>0]|0;HEAP8[$vararg_ptr4+3>>0]=HEAP8[$1+3>>0]|0;HEAP8[$vararg_ptr4+4>>0]=HEAP8[$1+4>>0]|0;HEAP8[$vararg_ptr4+5>>0]=HEAP8[$1+5>>0]|0;HEAP8[$vararg_ptr4+6>>0]=HEAP8[$1+6>>0]|0;HEAP8[$vararg_ptr4+7>>0]=HEAP8[$1+7>>0]|0;
+  _mrb_name_error($10,$11,65973,$vararg_buffer1);
+  // unreachable;
+ } else {
+  _mrb_sym2str($2,$12,$13);
+  ;HEAP8[$vararg_buffer5>>0]=HEAP8[$2>>0]|0;HEAP8[$vararg_buffer5+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$vararg_buffer5+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$vararg_buffer5+3>>0]=HEAP8[$2+3>>0]|0;HEAP8[$vararg_buffer5+4>>0]=HEAP8[$2+4>>0]|0;HEAP8[$vararg_buffer5+5>>0]=HEAP8[$2+5>>0]|0;HEAP8[$vararg_buffer5+6>>0]=HEAP8[$2+6>>0]|0;HEAP8[$vararg_buffer5+7>>0]=HEAP8[$2+7>>0]|0;
+  _mrb_name_error($10,$11,66003,$vararg_buffer5);
+  // unreachable;
+ }
+}
+function _mod_define_method($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $blk = 0, $c = 0, $mid = 0, $p = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $mid = sp + 16|0;
+ $blk = sp + 8|0;
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $c = $1;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $mid;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $blk;
+ (_mrb_get_args($2,68603,$vararg_buffer)|0);
+ $3 = ((($blk)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)==(0);
+ if ($5) {
+  $6 = HEAP32[$blk>>2]|0;
+  $7 = ($6|0)!=(0);
+  if (!($7)) {
+   $8 = $0;
+   $9 = $0;
+   $10 = (_mrb_class_get($9,68855)|0);
+   _mrb_raise($8,$10,68606);
+   // unreachable;
+  }
+ }
+ $11 = $0;
+ $12 = $0;
+ $13 = ((($12)) + 44|0);
+ $14 = HEAP32[$13>>2]|0;
+ $15 = (_mrb_obj_alloc($11,13,$14)|0);
+ $p = $15;
+ $16 = $p;
+ $17 = HEAP32[$blk>>2]|0;
+ _mrb_proc_copy($16,$17);
+ $18 = $p;
+ $19 = HEAP32[$18>>2]|0;
+ $20 = $19 >>> 11;
+ $21 = $20 | 256;
+ $22 = HEAP32[$18>>2]|0;
+ $23 = $21 & 2097151;
+ $24 = $23 << 11;
+ $25 = $22 & 2047;
+ $26 = $25 | $24;
+ HEAP32[$18>>2] = $26;
+ $27 = $0;
+ $28 = $c;
+ $29 = HEAP32[$mid>>2]|0;
+ $30 = $p;
+ _mrb_define_method_raw($27,$28,$29,$30);
+ $31 = HEAP32[$mid>>2]|0;
+ _mrb_symbol_value_677($agg$result,$31);
+ STACKTOP = sp;return;
+}
+function _mrb_mod_eqq($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $eqq = 0, $obj = 0, $obj$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $obj = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $obj;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP32[$mod>>2]|0;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ $4 = (_mrb_obj_is_kind_of($2,$obj$byval_copy,$3)|0);
+ $eqq = $4;
+ $5 = $eqq;
+ _mrb_bool_value_763($agg$result,$5);
+ STACKTOP = sp;return;
+}
+function _mrb_mod_s_constants($agg$result,$mrb,$mod) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $mod = $mod|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = $0;
+ $3 = (_mrb_class_get($2,64809)|0);
+ _mrb_raise($1,$3,66059);
+ // unreachable;
+}
+function _mrb_codedump_all($mrb,$proc) {
+ $mrb = $mrb|0;
+ $proc = $proc|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $proc;
+ $2 = $0;
+ $3 = $1;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ _codedump_recur($2,$5);
+ STACKTOP = sp;return;
+}
+function _codedump_recur($mrb,$irep) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $0;
+ $3 = $1;
+ _codedump($2,$3);
+ $i = 0;
+ while(1) {
+  $4 = $i;
+  $5 = $1;
+  $6 = ((($5)) + 52|0);
+  $7 = HEAP32[$6>>2]|0;
+  $8 = ($4>>>0)<($7>>>0);
+  if (!($8)) {
+   break;
+  }
+  $9 = $0;
+  $10 = $i;
+  $11 = $1;
+  $12 = ((($11)) + 20|0);
+  $13 = HEAP32[$12>>2]|0;
+  $14 = (($13) + ($10<<2)|0);
+  $15 = HEAP32[$14>>2]|0;
+  _codedump_recur($9,$15);
+  $16 = $i;
+  $17 = (($16) + 1)|0;
+  $i = $17;
+ }
+ STACKTOP = sp;return;
+}
+function _codedump($mrb,$irep) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ var $$byval_copy = 0, $$byval_copy321 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0;
+ var $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0;
+ var $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0;
+ var $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0;
+ var $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0;
+ var $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0;
+ var $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0;
+ var $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0;
+ var $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0;
+ var $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0;
+ var $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0;
+ var $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0;
+ var $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0;
+ var $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0;
+ var $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0;
+ var $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0;
+ var $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0;
+ var $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0;
+ var $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0;
+ var $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0;
+ var $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0;
+ var $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0;
+ var $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0;
+ var $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0;
+ var $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0;
+ var $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0;
+ var $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0;
+ var $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0;
+ var $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0;
+ var $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0;
+ var $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0;
+ var $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0;
+ var $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0;
+ var $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0;
+ var $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0;
+ var $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0;
+ var $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0;
+ var $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0;
+ var $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0;
+ var $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0;
+ var $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0;
+ var $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0;
+ var $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0;
+ var $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0;
+ var $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0;
+ var $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0;
+ var $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0;
+ var $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0;
+ var $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0;
+ var $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0;
+ var $998 = 0, $ai = 0, $c = 0, $file = 0, $i = 0, $line = 0, $next_file = 0, $s = 0, $s2 = 0, $s4 = 0, $v = 0, $v$byval_copy = 0, $v1 = 0, $v3 = 0, $vararg_buffer = 0, $vararg_buffer100 = 0, $vararg_buffer103 = 0, $vararg_buffer107 = 0, $vararg_buffer11 = 0, $vararg_buffer111 = 0;
+ var $vararg_buffer116 = 0, $vararg_buffer121 = 0, $vararg_buffer126 = 0, $vararg_buffer130 = 0, $vararg_buffer137 = 0, $vararg_buffer14 = 0, $vararg_buffer146 = 0, $vararg_buffer149 = 0, $vararg_buffer151 = 0, $vararg_buffer153 = 0, $vararg_buffer155 = 0, $vararg_buffer162 = 0, $vararg_buffer167 = 0, $vararg_buffer17 = 0, $vararg_buffer172 = 0, $vararg_buffer176 = 0, $vararg_buffer181 = 0, $vararg_buffer186 = 0, $vararg_buffer19 = 0, $vararg_buffer191 = 0;
+ var $vararg_buffer196 = 0, $vararg_buffer201 = 0, $vararg_buffer206 = 0, $vararg_buffer211 = 0, $vararg_buffer216 = 0, $vararg_buffer221 = 0, $vararg_buffer226 = 0, $vararg_buffer23 = 0, $vararg_buffer231 = 0, $vararg_buffer233 = 0, $vararg_buffer238 = 0, $vararg_buffer242 = 0, $vararg_buffer246 = 0, $vararg_buffer251 = 0, $vararg_buffer256 = 0, $vararg_buffer261 = 0, $vararg_buffer265 = 0, $vararg_buffer270 = 0, $vararg_buffer273 = 0, $vararg_buffer277 = 0;
+ var $vararg_buffer28 = 0, $vararg_buffer281 = 0, $vararg_buffer285 = 0, $vararg_buffer289 = 0, $vararg_buffer292 = 0, $vararg_buffer295 = 0, $vararg_buffer298 = 0, $vararg_buffer301 = 0, $vararg_buffer304 = 0, $vararg_buffer307 = 0, $vararg_buffer310 = 0, $vararg_buffer313 = 0, $vararg_buffer319 = 0, $vararg_buffer32 = 0, $vararg_buffer36 = 0, $vararg_buffer39 = 0, $vararg_buffer42 = 0, $vararg_buffer45 = 0, $vararg_buffer48 = 0, $vararg_buffer52 = 0;
+ var $vararg_buffer56 = 0, $vararg_buffer6 = 0, $vararg_buffer60 = 0, $vararg_buffer64 = 0, $vararg_buffer69 = 0, $vararg_buffer74 = 0, $vararg_buffer78 = 0, $vararg_buffer82 = 0, $vararg_buffer87 = 0, $vararg_buffer9 = 0, $vararg_buffer92 = 0, $vararg_buffer96 = 0, $vararg_ptr1 = 0, $vararg_ptr106 = 0, $vararg_ptr110 = 0, $vararg_ptr114 = 0, $vararg_ptr115 = 0, $vararg_ptr119 = 0, $vararg_ptr120 = 0, $vararg_ptr124 = 0;
+ var $vararg_ptr125 = 0, $vararg_ptr129 = 0, $vararg_ptr133 = 0, $vararg_ptr134 = 0, $vararg_ptr135 = 0, $vararg_ptr136 = 0, $vararg_ptr140 = 0, $vararg_ptr141 = 0, $vararg_ptr142 = 0, $vararg_ptr143 = 0, $vararg_ptr144 = 0, $vararg_ptr145 = 0, $vararg_ptr158 = 0, $vararg_ptr159 = 0, $vararg_ptr160 = 0, $vararg_ptr161 = 0, $vararg_ptr165 = 0, $vararg_ptr166 = 0, $vararg_ptr170 = 0, $vararg_ptr171 = 0;
+ var $vararg_ptr175 = 0, $vararg_ptr179 = 0, $vararg_ptr180 = 0, $vararg_ptr184 = 0, $vararg_ptr185 = 0, $vararg_ptr189 = 0, $vararg_ptr190 = 0, $vararg_ptr194 = 0, $vararg_ptr195 = 0, $vararg_ptr199 = 0, $vararg_ptr2 = 0, $vararg_ptr200 = 0, $vararg_ptr204 = 0, $vararg_ptr205 = 0, $vararg_ptr209 = 0, $vararg_ptr210 = 0, $vararg_ptr214 = 0, $vararg_ptr215 = 0, $vararg_ptr219 = 0, $vararg_ptr22 = 0;
+ var $vararg_ptr220 = 0, $vararg_ptr224 = 0, $vararg_ptr225 = 0, $vararg_ptr229 = 0, $vararg_ptr230 = 0, $vararg_ptr236 = 0, $vararg_ptr237 = 0, $vararg_ptr241 = 0, $vararg_ptr245 = 0, $vararg_ptr249 = 0, $vararg_ptr250 = 0, $vararg_ptr254 = 0, $vararg_ptr255 = 0, $vararg_ptr259 = 0, $vararg_ptr26 = 0, $vararg_ptr260 = 0, $vararg_ptr264 = 0, $vararg_ptr268 = 0, $vararg_ptr269 = 0, $vararg_ptr27 = 0;
+ var $vararg_ptr276 = 0, $vararg_ptr280 = 0, $vararg_ptr284 = 0, $vararg_ptr288 = 0, $vararg_ptr3 = 0, $vararg_ptr31 = 0, $vararg_ptr316 = 0, $vararg_ptr317 = 0, $vararg_ptr318 = 0, $vararg_ptr35 = 0, $vararg_ptr4 = 0, $vararg_ptr5 = 0, $vararg_ptr51 = 0, $vararg_ptr55 = 0, $vararg_ptr59 = 0, $vararg_ptr63 = 0, $vararg_ptr67 = 0, $vararg_ptr68 = 0, $vararg_ptr72 = 0, $vararg_ptr73 = 0;
+ var $vararg_ptr77 = 0, $vararg_ptr81 = 0, $vararg_ptr85 = 0, $vararg_ptr86 = 0, $vararg_ptr90 = 0, $vararg_ptr91 = 0, $vararg_ptr95 = 0, $vararg_ptr99 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 1040|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy321 = sp + 1024|0;
+ $$byval_copy = sp + 1016|0;
+ $v$byval_copy = sp + 1008|0;
+ $vararg_buffer319 = sp + 904|0;
+ $vararg_buffer313 = sp + 888|0;
+ $vararg_buffer310 = sp + 880|0;
+ $vararg_buffer307 = sp + 872|0;
+ $vararg_buffer304 = sp + 864|0;
+ $vararg_buffer301 = sp + 856|0;
+ $vararg_buffer298 = sp + 848|0;
+ $vararg_buffer295 = sp + 840|0;
+ $vararg_buffer292 = sp + 832|0;
+ $vararg_buffer289 = sp + 824|0;
+ $vararg_buffer285 = sp + 816|0;
+ $vararg_buffer281 = sp + 808|0;
+ $vararg_buffer277 = sp + 800|0;
+ $vararg_buffer273 = sp + 792|0;
+ $vararg_buffer270 = sp + 784|0;
+ $vararg_buffer265 = sp + 768|0;
+ $vararg_buffer261 = sp + 760|0;
+ $vararg_buffer256 = sp + 744|0;
+ $vararg_buffer251 = sp + 728|0;
+ $vararg_buffer246 = sp + 712|0;
+ $vararg_buffer242 = sp + 704|0;
+ $vararg_buffer238 = sp + 696|0;
+ $vararg_buffer233 = sp + 680|0;
+ $vararg_buffer231 = sp + 672|0;
+ $vararg_buffer226 = sp + 656|0;
+ $vararg_buffer221 = sp + 640|0;
+ $vararg_buffer216 = sp + 624|0;
+ $vararg_buffer211 = sp + 608|0;
+ $vararg_buffer206 = sp + 592|0;
+ $vararg_buffer201 = sp + 576|0;
+ $vararg_buffer196 = sp + 560|0;
+ $vararg_buffer191 = sp + 544|0;
+ $vararg_buffer186 = sp + 528|0;
+ $vararg_buffer181 = sp + 512|0;
+ $vararg_buffer176 = sp + 496|0;
+ $vararg_buffer172 = sp + 488|0;
+ $vararg_buffer167 = sp + 472|0;
+ $vararg_buffer162 = sp + 456|0;
+ $vararg_buffer155 = sp + 432|0;
+ $vararg_buffer153 = sp + 424|0;
+ $vararg_buffer151 = sp + 416|0;
+ $vararg_buffer149 = sp + 408|0;
+ $vararg_buffer146 = sp + 400|0;
+ $vararg_buffer137 = sp + 368|0;
+ $vararg_buffer130 = sp + 344|0;
+ $vararg_buffer126 = sp + 336|0;
+ $vararg_buffer121 = sp + 320|0;
+ $vararg_buffer116 = sp + 304|0;
+ $vararg_buffer111 = sp + 288|0;
+ $vararg_buffer107 = sp + 280|0;
+ $vararg_buffer103 = sp + 272|0;
+ $vararg_buffer100 = sp + 264|0;
+ $vararg_buffer96 = sp + 256|0;
+ $vararg_buffer92 = sp + 248|0;
+ $vararg_buffer87 = sp + 232|0;
+ $vararg_buffer82 = sp + 216|0;
+ $vararg_buffer78 = sp + 208|0;
+ $vararg_buffer74 = sp + 200|0;
+ $vararg_buffer69 = sp + 184|0;
+ $vararg_buffer64 = sp + 168|0;
+ $vararg_buffer60 = sp + 160|0;
+ $vararg_buffer56 = sp + 152|0;
+ $vararg_buffer52 = sp + 144|0;
+ $vararg_buffer48 = sp + 136|0;
+ $vararg_buffer45 = sp + 128|0;
+ $vararg_buffer42 = sp + 120|0;
+ $vararg_buffer39 = sp + 112|0;
+ $vararg_buffer36 = sp + 104|0;
+ $vararg_buffer32 = sp + 96|0;
+ $vararg_buffer28 = sp + 88|0;
+ $vararg_buffer23 = sp + 72|0;
+ $vararg_buffer19 = sp + 64|0;
+ $vararg_buffer17 = sp + 56|0;
+ $vararg_buffer14 = sp + 48|0;
+ $vararg_buffer11 = sp + 40|0;
+ $vararg_buffer9 = sp + 32|0;
+ $vararg_buffer6 = sp + 24|0;
+ $vararg_buffer = sp;
+ $v = sp + 968|0;
+ $s = sp + 960|0;
+ $v1 = sp + 952|0;
+ $s2 = sp + 944|0;
+ $2 = sp + 936|0;
+ $v3 = sp + 928|0;
+ $s4 = sp + 920|0;
+ $3 = sp + 912|0;
+ $0 = $mrb;
+ $1 = $irep;
+ $file = 0;
+ $4 = $1;
+ $5 = ($4|0)!=(0|0);
+ if (!($5)) {
+  STACKTOP = sp;return;
+ }
+ $6 = $1;
+ $7 = $1;
+ $8 = ((($7)) + 2|0);
+ $9 = HEAP16[$8>>1]|0;
+ $10 = $9&65535;
+ $11 = $1;
+ $12 = HEAP16[$11>>1]|0;
+ $13 = $12&65535;
+ $14 = $1;
+ $15 = ((($14)) + 44|0);
+ $16 = HEAP32[$15>>2]|0;
+ $17 = $1;
+ $18 = ((($17)) + 48|0);
+ $19 = HEAP32[$18>>2]|0;
+ $20 = $1;
+ $21 = ((($20)) + 52|0);
+ $22 = HEAP32[$21>>2]|0;
+ HEAP32[$vararg_buffer>>2] = $6;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $10;
+ $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+ HEAP32[$vararg_ptr2>>2] = $13;
+ $vararg_ptr3 = ((($vararg_buffer)) + 12|0);
+ HEAP32[$vararg_ptr3>>2] = $16;
+ $vararg_ptr4 = ((($vararg_buffer)) + 16|0);
+ HEAP32[$vararg_ptr4>>2] = $19;
+ $vararg_ptr5 = ((($vararg_buffer)) + 20|0);
+ HEAP32[$vararg_ptr5>>2] = $22;
+ (_printf(66092,$vararg_buffer)|0);
+ $i = 0;
+ while(1) {
+  $23 = $i;
+  $24 = $1;
+  $25 = ((($24)) + 40|0);
+  $26 = HEAP32[$25>>2]|0;
+  $27 = ($23|0)<($26|0);
+  if (!($27)) {
+   break;
+  }
+  $28 = $0;
+  $29 = (_mrb_gc_arena_save($28)|0);
+  $ai = $29;
+  $30 = $1;
+  $31 = $i;
+  $32 = (_mrb_debug_get_filename($30,$31)|0);
+  $next_file = $32;
+  $33 = $next_file;
+  $34 = ($33|0)!=(0|0);
+  if ($34) {
+   $35 = $file;
+   $36 = $next_file;
+   $37 = ($35|0)!=($36|0);
+   if ($37) {
+    $38 = $next_file;
+    HEAP32[$vararg_buffer6>>2] = $38;
+    (_printf(66146,$vararg_buffer6)|0);
+    $39 = $next_file;
+    $file = $39;
+   }
+  }
+  $40 = $1;
+  $41 = $i;
+  $42 = (_mrb_debug_get_line($40,$41)|0);
+  $line = $42;
+  $43 = $line;
+  $44 = ($43|0)<(0);
+  if ($44) {
+   (_printf(66156,$vararg_buffer9)|0);
+  } else {
+   $45 = $line;
+   HEAP32[$vararg_buffer11>>2] = $45;
+   (_printf(66163,$vararg_buffer11)|0);
+  }
+  $46 = $i;
+  HEAP32[$vararg_buffer14>>2] = $46;
+  (_printf(66168,$vararg_buffer14)|0);
+  $47 = $i;
+  $48 = $1;
+  $49 = ((($48)) + 8|0);
+  $50 = HEAP32[$49>>2]|0;
+  $51 = (($50) + ($47<<2)|0);
+  $52 = HEAP32[$51>>2]|0;
+  $c = $52;
+  $53 = $c;
+  $54 = $53 & 127;
+  do {
+   switch ($54|0) {
+   case 0:  {
+    (_printf(66174,$vararg_buffer17)|0);
+    break;
+   }
+   case 1:  {
+    $55 = $c;
+    $56 = $55 >>> 23;
+    $57 = $56 & 511;
+    $58 = $c;
+    $59 = $58 >>> 14;
+    $60 = $59 & 511;
+    HEAP32[$vararg_buffer19>>2] = $57;
+    $vararg_ptr22 = ((($vararg_buffer19)) + 4|0);
+    HEAP32[$vararg_ptr22>>2] = $60;
+    (_printf(66182,$vararg_buffer19)|0);
+    $61 = $0;
+    $62 = $1;
+    $63 = $c;
+    _print_lv($61,$62,$63,3);
+    break;
+   }
+   case 2:  {
+    $64 = $c;
+    $65 = $64 >>> 7;
+    $66 = $65 & 65535;
+    $67 = $1;
+    $68 = ((($67)) + 12|0);
+    $69 = HEAP32[$68>>2]|0;
+    $70 = (($69) + ($66<<3)|0);
+    ;HEAP32[$v>>2]=HEAP32[$70>>2]|0;HEAP32[$v+4>>2]=HEAP32[$70+4>>2]|0;
+    $71 = $0;
+    ;HEAP32[$v$byval_copy>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy+4>>2]=HEAP32[$v+4>>2]|0;
+    _mrb_inspect($s,$71,$v$byval_copy);
+    $72 = $c;
+    $73 = $72 >>> 23;
+    $74 = $73 & 511;
+    $75 = $c;
+    $76 = $75 >>> 7;
+    $77 = $76 & 65535;
+    $78 = HEAP32[$s>>2]|0;
+    $79 = HEAP32[$78>>2]|0;
+    $80 = $79 >>> 11;
+    $81 = $80 & 8;
+    $82 = ($81|0)!=(0);
+    $83 = HEAP32[$s>>2]|0;
+    $84 = ((($83)) + 12|0);
+    if ($82) {
+     $87 = $84;
+    } else {
+     $85 = ((($84)) + 8|0);
+     $86 = HEAP32[$85>>2]|0;
+     $87 = $86;
+    }
+    HEAP32[$vararg_buffer23>>2] = $74;
+    $vararg_ptr26 = ((($vararg_buffer23)) + 4|0);
+    HEAP32[$vararg_ptr26>>2] = $77;
+    $vararg_ptr27 = ((($vararg_buffer23)) + 8|0);
+    HEAP32[$vararg_ptr27>>2] = $87;
+    (_printf(66214,$vararg_buffer23)|0);
+    $88 = $0;
+    $89 = $1;
+    $90 = $c;
+    _print_lv($88,$89,$90,1);
+    break;
+   }
+   case 3:  {
+    $91 = $c;
+    $92 = $91 >>> 23;
+    $93 = $92 & 511;
+    $94 = $c;
+    $95 = $94 >>> 7;
+    $96 = $95 & 65535;
+    $97 = (($96) - 32767)|0;
+    HEAP32[$vararg_buffer28>>2] = $93;
+    $vararg_ptr31 = ((($vararg_buffer28)) + 4|0);
+    HEAP32[$vararg_ptr31>>2] = $97;
+    (_printf(66238,$vararg_buffer28)|0);
+    $98 = $0;
+    $99 = $1;
+    $100 = $c;
+    _print_lv($98,$99,$100,1);
+    break;
+   }
+   case 4:  {
+    $101 = $c;
+    $102 = $101 >>> 23;
+    $103 = $102 & 511;
+    $104 = $0;
+    $105 = $c;
+    $106 = $105 >>> 7;
+    $107 = $106 & 65535;
+    $108 = $1;
+    $109 = ((($108)) + 16|0);
+    $110 = HEAP32[$109>>2]|0;
+    $111 = (($110) + ($107<<2)|0);
+    $112 = HEAP32[$111>>2]|0;
+    $113 = (_mrb_sym2name($104,$112)|0);
+    HEAP32[$vararg_buffer32>>2] = $103;
+    $vararg_ptr35 = ((($vararg_buffer32)) + 4|0);
+    HEAP32[$vararg_ptr35>>2] = $113;
+    (_printf(66255,$vararg_buffer32)|0);
+    $114 = $0;
+    $115 = $1;
+    $116 = $c;
+    _print_lv($114,$115,$116,1);
+    break;
+   }
+   case 5:  {
+    $117 = $c;
+    $118 = $117 >>> 23;
+    $119 = $118 & 511;
+    HEAP32[$vararg_buffer36>>2] = $119;
+    (_printf(66274,$vararg_buffer36)|0);
+    $120 = $0;
+    $121 = $1;
+    $122 = $c;
+    _print_lv($120,$121,$122,1);
+    break;
+   }
+   case 6:  {
+    $123 = $c;
+    $124 = $123 >>> 23;
+    $125 = $124 & 511;
+    HEAP32[$vararg_buffer39>>2] = $125;
+    (_printf(66291,$vararg_buffer39)|0);
+    $126 = $0;
+    $127 = $1;
+    $128 = $c;
+    _print_lv($126,$127,$128,1);
+    break;
+   }
+   case 7:  {
+    $129 = $c;
+    $130 = $129 >>> 23;
+    $131 = $130 & 511;
+    HEAP32[$vararg_buffer42>>2] = $131;
+    (_printf(66309,$vararg_buffer42)|0);
+    $132 = $0;
+    $133 = $1;
+    $134 = $c;
+    _print_lv($132,$133,$134,1);
+    break;
+   }
+   case 8:  {
+    $135 = $c;
+    $136 = $135 >>> 23;
+    $137 = $136 & 511;
+    HEAP32[$vararg_buffer45>>2] = $137;
+    (_printf(66324,$vararg_buffer45)|0);
+    $138 = $0;
+    $139 = $1;
+    $140 = $c;
+    _print_lv($138,$139,$140,1);
+    break;
+   }
+   case 9:  {
+    $141 = $c;
+    $142 = $141 >>> 23;
+    $143 = $142 & 511;
+    $144 = $0;
+    $145 = $c;
+    $146 = $145 >>> 7;
+    $147 = $146 & 65535;
+    $148 = $1;
+    $149 = ((($148)) + 16|0);
+    $150 = HEAP32[$149>>2]|0;
+    $151 = (($150) + ($147<<2)|0);
+    $152 = HEAP32[$151>>2]|0;
+    $153 = (_mrb_sym2name($144,$152)|0);
+    HEAP32[$vararg_buffer48>>2] = $143;
+    $vararg_ptr51 = ((($vararg_buffer48)) + 4|0);
+    HEAP32[$vararg_ptr51>>2] = $153;
+    (_printf(66339,$vararg_buffer48)|0);
+    $154 = $0;
+    $155 = $1;
+    $156 = $c;
+    _print_lv($154,$155,$156,1);
+    break;
+   }
+   case 10:  {
+    $157 = $0;
+    $158 = $c;
+    $159 = $158 >>> 7;
+    $160 = $159 & 65535;
+    $161 = $1;
+    $162 = ((($161)) + 16|0);
+    $163 = HEAP32[$162>>2]|0;
+    $164 = (($163) + ($160<<2)|0);
+    $165 = HEAP32[$164>>2]|0;
+    $166 = (_mrb_sym2name($157,$165)|0);
+    $167 = $c;
+    $168 = $167 >>> 23;
+    $169 = $168 & 511;
+    HEAP32[$vararg_buffer52>>2] = $166;
+    $vararg_ptr55 = ((($vararg_buffer52)) + 4|0);
+    HEAP32[$vararg_ptr55>>2] = $169;
+    (_printf(66360,$vararg_buffer52)|0);
+    $170 = $0;
+    $171 = $1;
+    $172 = $c;
+    _print_lv($170,$171,$172,1);
+    break;
+   }
+   case 17:  {
+    $173 = $c;
+    $174 = $173 >>> 23;
+    $175 = $174 & 511;
+    $176 = $0;
+    $177 = $c;
+    $178 = $177 >>> 7;
+    $179 = $178 & 65535;
+    $180 = $1;
+    $181 = ((($180)) + 16|0);
+    $182 = HEAP32[$181>>2]|0;
+    $183 = (($182) + ($179<<2)|0);
+    $184 = HEAP32[$183>>2]|0;
+    $185 = (_mrb_sym2name($176,$184)|0);
+    HEAP32[$vararg_buffer56>>2] = $175;
+    $vararg_ptr59 = ((($vararg_buffer56)) + 4|0);
+    HEAP32[$vararg_ptr59>>2] = $185;
+    (_printf(66382,$vararg_buffer56)|0);
+    $186 = $0;
+    $187 = $1;
+    $188 = $c;
+    _print_lv($186,$187,$188,1);
+    break;
+   }
+   case 18:  {
+    $189 = $0;
+    $190 = $c;
+    $191 = $190 >>> 7;
+    $192 = $191 & 65535;
+    $193 = $1;
+    $194 = ((($193)) + 16|0);
+    $195 = HEAP32[$194>>2]|0;
+    $196 = (($195) + ($192<<2)|0);
+    $197 = HEAP32[$196>>2]|0;
+    $198 = (_mrb_sym2name($189,$197)|0);
+    $199 = $c;
+    $200 = $199 >>> 23;
+    $201 = $200 & 511;
+    HEAP32[$vararg_buffer60>>2] = $198;
+    $vararg_ptr63 = ((($vararg_buffer60)) + 4|0);
+    HEAP32[$vararg_ptr63>>2] = $201;
+    (_printf(66402,$vararg_buffer60)|0);
+    $202 = $0;
+    $203 = $1;
+    $204 = $c;
+    _print_lv($202,$203,$204,1);
+    break;
+   }
+   case 19:  {
+    $205 = $c;
+    $206 = $205 >>> 23;
+    $207 = $206 & 511;
+    $208 = $c;
+    $209 = $208 >>> 23;
+    $210 = $209 & 511;
+    $211 = $0;
+    $212 = $c;
+    $213 = $212 >>> 7;
+    $214 = $213 & 65535;
+    $215 = $1;
+    $216 = ((($215)) + 16|0);
+    $217 = HEAP32[$216>>2]|0;
+    $218 = (($217) + ($214<<2)|0);
+    $219 = HEAP32[$218>>2]|0;
+    $220 = (_mrb_sym2name($211,$219)|0);
+    HEAP32[$vararg_buffer64>>2] = $207;
+    $vararg_ptr67 = ((($vararg_buffer64)) + 4|0);
+    HEAP32[$vararg_ptr67>>2] = $210;
+    $vararg_ptr68 = ((($vararg_buffer64)) + 8|0);
+    HEAP32[$vararg_ptr68>>2] = $220;
+    (_printf(66423,$vararg_buffer64)|0);
+    $221 = $0;
+    $222 = $1;
+    $223 = $c;
+    _print_lv($221,$222,$223,3);
+    break;
+   }
+   case 20:  {
+    $224 = $c;
+    $225 = $224 >>> 23;
+    $226 = $225 & 511;
+    $227 = (($226) + 1)|0;
+    $228 = $0;
+    $229 = $c;
+    $230 = $229 >>> 7;
+    $231 = $230 & 65535;
+    $232 = $1;
+    $233 = ((($232)) + 16|0);
+    $234 = HEAP32[$233>>2]|0;
+    $235 = (($234) + ($231<<2)|0);
+    $236 = HEAP32[$235>>2]|0;
+    $237 = (_mrb_sym2name($228,$236)|0);
+    $238 = $c;
+    $239 = $238 >>> 23;
+    $240 = $239 & 511;
+    HEAP32[$vararg_buffer69>>2] = $227;
+    $vararg_ptr72 = ((($vararg_buffer69)) + 4|0);
+    HEAP32[$vararg_ptr72>>2] = $237;
+    $vararg_ptr73 = ((($vararg_buffer69)) + 8|0);
+    HEAP32[$vararg_ptr73>>2] = $240;
+    (_printf(66447,$vararg_buffer69)|0);
+    $241 = $0;
+    $242 = $1;
+    $243 = $c;
+    _print_lv($241,$242,$243,1);
+    break;
+   }
+   case 13:  {
+    $244 = $c;
+    $245 = $244 >>> 23;
+    $246 = $245 & 511;
+    $247 = $0;
+    $248 = $c;
+    $249 = $248 >>> 7;
+    $250 = $249 & 65535;
+    $251 = $1;
+    $252 = ((($251)) + 16|0);
+    $253 = HEAP32[$252>>2]|0;
+    $254 = (($253) + ($250<<2)|0);
+    $255 = HEAP32[$254>>2]|0;
+    $256 = (_mrb_sym2name($247,$255)|0);
+    HEAP32[$vararg_buffer74>>2] = $246;
+    $vararg_ptr77 = ((($vararg_buffer74)) + 4|0);
+    HEAP32[$vararg_ptr77>>2] = $256;
+    (_printf(66471,$vararg_buffer74)|0);
+    $257 = $0;
+    $258 = $1;
+    $259 = $c;
+    _print_lv($257,$258,$259,1);
+    break;
+   }
+   case 14:  {
+    $260 = $0;
+    $261 = $c;
+    $262 = $261 >>> 7;
+    $263 = $262 & 65535;
+    $264 = $1;
+    $265 = ((($264)) + 16|0);
+    $266 = HEAP32[$265>>2]|0;
+    $267 = (($266) + ($263<<2)|0);
+    $268 = HEAP32[$267>>2]|0;
+    $269 = (_mrb_sym2name($260,$268)|0);
+    $270 = $c;
+    $271 = $270 >>> 23;
+    $272 = $271 & 511;
+    HEAP32[$vararg_buffer78>>2] = $269;
+    $vararg_ptr81 = ((($vararg_buffer78)) + 4|0);
+    HEAP32[$vararg_ptr81>>2] = $272;
+    (_printf(66487,$vararg_buffer78)|0);
+    $273 = $0;
+    $274 = $1;
+    $275 = $c;
+    _print_lv($273,$274,$275,1);
+    break;
+   }
+   case 21:  {
+    $276 = $c;
+    $277 = $276 >>> 23;
+    $278 = $277 & 511;
+    $279 = $c;
+    $280 = $279 >>> 14;
+    $281 = $280 & 511;
+    $282 = $c;
+    $283 = $282 >>> 7;
+    $284 = $283 & 127;
+    HEAP32[$vararg_buffer82>>2] = $278;
+    $vararg_ptr85 = ((($vararg_buffer82)) + 4|0);
+    HEAP32[$vararg_ptr85>>2] = $281;
+    $vararg_ptr86 = ((($vararg_buffer82)) + 8|0);
+    HEAP32[$vararg_ptr86>>2] = $284;
+    (_printf(66503,$vararg_buffer82)|0);
+    $285 = $0;
+    $286 = $1;
+    $287 = $c;
+    _print_lv($285,$286,$287,1);
+    break;
+   }
+   case 22:  {
+    $288 = $c;
+    $289 = $288 >>> 23;
+    $290 = $289 & 511;
+    $291 = $c;
+    $292 = $291 >>> 14;
+    $293 = $292 & 511;
+    $294 = $c;
+    $295 = $294 >>> 7;
+    $296 = $295 & 127;
+    HEAP32[$vararg_buffer87>>2] = $290;
+    $vararg_ptr90 = ((($vararg_buffer87)) + 4|0);
+    HEAP32[$vararg_ptr90>>2] = $293;
+    $vararg_ptr91 = ((($vararg_buffer87)) + 8|0);
+    HEAP32[$vararg_ptr91>>2] = $296;
+    (_printf(66525,$vararg_buffer87)|0);
+    $297 = $0;
+    $298 = $1;
+    $299 = $c;
+    _print_lv($297,$298,$299,1);
+    break;
+   }
+   case 15:  {
+    $300 = $c;
+    $301 = $300 >>> 23;
+    $302 = $301 & 511;
+    $303 = $0;
+    $304 = $c;
+    $305 = $304 >>> 7;
+    $306 = $305 & 65535;
+    $307 = $1;
+    $308 = ((($307)) + 16|0);
+    $309 = HEAP32[$308>>2]|0;
+    $310 = (($309) + ($306<<2)|0);
+    $311 = HEAP32[$310>>2]|0;
+    $312 = (_mrb_sym2name($303,$311)|0);
+    HEAP32[$vararg_buffer92>>2] = $302;
+    $vararg_ptr95 = ((($vararg_buffer92)) + 4|0);
+    HEAP32[$vararg_ptr95>>2] = $312;
+    (_printf(66547,$vararg_buffer92)|0);
+    $313 = $0;
+    $314 = $1;
+    $315 = $c;
+    _print_lv($313,$314,$315,1);
+    break;
+   }
+   case 16:  {
+    $316 = $0;
+    $317 = $c;
+    $318 = $317 >>> 7;
+    $319 = $318 & 65535;
+    $320 = $1;
+    $321 = ((($320)) + 16|0);
+    $322 = HEAP32[$321>>2]|0;
+    $323 = (($322) + ($319<<2)|0);
+    $324 = HEAP32[$323>>2]|0;
+    $325 = (_mrb_sym2name($316,$324)|0);
+    $326 = $c;
+    $327 = $326 >>> 23;
+    $328 = $327 & 511;
+    HEAP32[$vararg_buffer96>>2] = $325;
+    $vararg_ptr99 = ((($vararg_buffer96)) + 4|0);
+    HEAP32[$vararg_ptr99>>2] = $328;
+    (_printf(66563,$vararg_buffer96)|0);
+    $329 = $0;
+    $330 = $1;
+    $331 = $c;
+    _print_lv($329,$330,$331,1);
+    break;
+   }
+   case 23:  {
+    $332 = $i;
+    $333 = $c;
+    $334 = $333 >>> 7;
+    $335 = $334 & 65535;
+    $336 = (($335) - 32767)|0;
+    $337 = (($332) + ($336))|0;
+    HEAP32[$vararg_buffer100>>2] = $337;
+    (_printf(66579,$vararg_buffer100)|0);
+    break;
+   }
+   case 24:  {
+    $338 = $c;
+    $339 = $338 >>> 23;
+    $340 = $339 & 511;
+    $341 = $i;
+    $342 = $c;
+    $343 = $342 >>> 7;
+    $344 = $343 & 65535;
+    $345 = (($344) - 32767)|0;
+    $346 = (($341) + ($345))|0;
+    HEAP32[$vararg_buffer103>>2] = $340;
+    $vararg_ptr106 = ((($vararg_buffer103)) + 4|0);
+    HEAP32[$vararg_ptr106>>2] = $346;
+    (_printf(66592,$vararg_buffer103)|0);
+    break;
+   }
+   case 25:  {
+    $347 = $c;
+    $348 = $347 >>> 23;
+    $349 = $348 & 511;
+    $350 = $i;
+    $351 = $c;
+    $352 = $351 >>> 7;
+    $353 = $352 & 65535;
+    $354 = (($353) - 32767)|0;
+    $355 = (($350) + ($354))|0;
+    HEAP32[$vararg_buffer107>>2] = $349;
+    $vararg_ptr110 = ((($vararg_buffer107)) + 4|0);
+    HEAP32[$vararg_ptr110>>2] = $355;
+    (_printf(66611,$vararg_buffer107)|0);
+    break;
+   }
+   case 32:  {
+    $356 = $c;
+    $357 = $356 >>> 23;
+    $358 = $357 & 511;
+    $359 = $0;
+    $360 = $c;
+    $361 = $360 >>> 14;
+    $362 = $361 & 511;
+    $363 = $1;
+    $364 = ((($363)) + 16|0);
+    $365 = HEAP32[$364>>2]|0;
+    $366 = (($365) + ($362<<2)|0);
+    $367 = HEAP32[$366>>2]|0;
+    $368 = (_mrb_sym2name($359,$367)|0);
+    $369 = $c;
+    $370 = $369 >>> 7;
+    $371 = $370 & 127;
+    HEAP32[$vararg_buffer111>>2] = $358;
+    $vararg_ptr114 = ((($vararg_buffer111)) + 4|0);
+    HEAP32[$vararg_ptr114>>2] = $368;
+    $vararg_ptr115 = ((($vararg_buffer111)) + 8|0);
+    HEAP32[$vararg_ptr115>>2] = $371;
+    (_printf(66631,$vararg_buffer111)|0);
+    break;
+   }
+   case 33:  {
+    $372 = $c;
+    $373 = $372 >>> 23;
+    $374 = $373 & 511;
+    $375 = $0;
+    $376 = $c;
+    $377 = $376 >>> 14;
+    $378 = $377 & 511;
+    $379 = $1;
+    $380 = ((($379)) + 16|0);
+    $381 = HEAP32[$380>>2]|0;
+    $382 = (($381) + ($378<<2)|0);
+    $383 = HEAP32[$382>>2]|0;
+    $384 = (_mrb_sym2name($375,$383)|0);
+    $385 = $c;
+    $386 = $385 >>> 7;
+    $387 = $386 & 127;
+    HEAP32[$vararg_buffer116>>2] = $374;
+    $vararg_ptr119 = ((($vararg_buffer116)) + 4|0);
+    HEAP32[$vararg_ptr119>>2] = $384;
+    $vararg_ptr120 = ((($vararg_buffer116)) + 8|0);
+    HEAP32[$vararg_ptr120>>2] = $387;
+    (_printf(66651,$vararg_buffer116)|0);
+    break;
+   }
+   case 42:  {
+    $388 = $c;
+    $389 = $388 >>> 23;
+    $390 = $389 & 511;
+    $391 = $0;
+    $392 = $c;
+    $393 = $392 >>> 14;
+    $394 = $393 & 511;
+    $395 = $1;
+    $396 = ((($395)) + 16|0);
+    $397 = HEAP32[$396>>2]|0;
+    $398 = (($397) + ($394<<2)|0);
+    $399 = HEAP32[$398>>2]|0;
+    $400 = (_mrb_sym2name($391,$399)|0);
+    $401 = $c;
+    $402 = $401 >>> 7;
+    $403 = $402 & 127;
+    HEAP32[$vararg_buffer121>>2] = $390;
+    $vararg_ptr124 = ((($vararg_buffer121)) + 4|0);
+    HEAP32[$vararg_ptr124>>2] = $400;
+    $vararg_ptr125 = ((($vararg_buffer121)) + 8|0);
+    HEAP32[$vararg_ptr125>>2] = $403;
+    (_printf(66672,$vararg_buffer121)|0);
+    break;
+   }
+   case 36:  {
+    $404 = $c;
+    $405 = $404 >>> 23;
+    $406 = $405 & 511;
+    $407 = $c;
+    $408 = $407 >>> 7;
+    $409 = $408 & 127;
+    HEAP32[$vararg_buffer126>>2] = $406;
+    $vararg_ptr129 = ((($vararg_buffer126)) + 4|0);
+    HEAP32[$vararg_ptr129>>2] = $409;
+    (_printf(66696,$vararg_buffer126)|0);
+    break;
+   }
+   case 37:  {
+    $410 = $c;
+    $411 = $410 >>> 23;
+    $412 = $411 & 511;
+    $413 = $c;
+    $414 = $413 >>> 7;
+    $415 = $414 & 65535;
+    $416 = $415 >> 10;
+    $417 = $416 & 63;
+    $418 = $c;
+    $419 = $418 >>> 7;
+    $420 = $419 & 65535;
+    $421 = $420 >> 9;
+    $422 = $421 & 1;
+    $423 = $c;
+    $424 = $423 >>> 7;
+    $425 = $424 & 65535;
+    $426 = $425 >> 4;
+    $427 = $426 & 31;
+    $428 = $c;
+    $429 = $428 >>> 7;
+    $430 = $429 & 65535;
+    $431 = $430 >> 0;
+    $432 = $431 & 15;
+    HEAP32[$vararg_buffer130>>2] = $412;
+    $vararg_ptr133 = ((($vararg_buffer130)) + 4|0);
+    HEAP32[$vararg_ptr133>>2] = $417;
+    $vararg_ptr134 = ((($vararg_buffer130)) + 8|0);
+    HEAP32[$vararg_ptr134>>2] = $422;
+    $vararg_ptr135 = ((($vararg_buffer130)) + 12|0);
+    HEAP32[$vararg_ptr135>>2] = $427;
+    $vararg_ptr136 = ((($vararg_buffer130)) + 16|0);
+    HEAP32[$vararg_ptr136>>2] = $432;
+    (_printf(66713,$vararg_buffer130)|0);
+    $433 = $0;
+    $434 = $1;
+    $435 = $c;
+    _print_lv($433,$434,$435,1);
+    break;
+   }
+   case 38:  {
+    $436 = $c;
+    $437 = $436 >>> 7;
+    $438 = $437 & 33554431;
+    $439 = $438 >> 18;
+    $440 = $439 & 31;
+    $441 = $c;
+    $442 = $441 >>> 7;
+    $443 = $442 & 33554431;
+    $444 = $443 >> 13;
+    $445 = $444 & 31;
+    $446 = $c;
+    $447 = $446 >>> 7;
+    $448 = $447 & 33554431;
+    $449 = $448 >> 12;
+    $450 = $449 & 1;
+    $451 = $c;
+    $452 = $451 >>> 7;
+    $453 = $452 & 33554431;
+    $454 = $453 >> 7;
+    $455 = $454 & 31;
+    $456 = $c;
+    $457 = $456 >>> 7;
+    $458 = $457 & 33554431;
+    $459 = $458 >> 2;
+    $460 = $459 & 31;
+    $461 = $c;
+    $462 = $461 >>> 7;
+    $463 = $462 & 33554431;
+    $464 = $463 >> 1;
+    $465 = $464 & 1;
+    $466 = $c;
+    $467 = $466 >>> 7;
+    $468 = $467 & 33554431;
+    $469 = $468 & 1;
+    HEAP32[$vararg_buffer137>>2] = $440;
+    $vararg_ptr140 = ((($vararg_buffer137)) + 4|0);
+    HEAP32[$vararg_ptr140>>2] = $445;
+    $vararg_ptr141 = ((($vararg_buffer137)) + 8|0);
+    HEAP32[$vararg_ptr141>>2] = $450;
+    $vararg_ptr142 = ((($vararg_buffer137)) + 12|0);
+    HEAP32[$vararg_ptr142>>2] = $455;
+    $vararg_ptr143 = ((($vararg_buffer137)) + 16|0);
+    HEAP32[$vararg_ptr143>>2] = $460;
+    $vararg_ptr144 = ((($vararg_buffer137)) + 20|0);
+    HEAP32[$vararg_ptr144>>2] = $465;
+    $vararg_ptr145 = ((($vararg_buffer137)) + 24|0);
+    HEAP32[$vararg_ptr145>>2] = $469;
+    (_printf(66739,$vararg_buffer137)|0);
+    break;
+   }
+   case 41:  {
+    $470 = $c;
+    $471 = $470 >>> 23;
+    $472 = $471 & 511;
+    HEAP32[$vararg_buffer146>>2] = $472;
+    (_printf(66770,$vararg_buffer146)|0);
+    $473 = $c;
+    $474 = $473 >>> 14;
+    $475 = $474 & 511;
+    switch ($475|0) {
+    case 2: case 0:  {
+     (_printf(66784,$vararg_buffer149)|0);
+     break;
+    }
+    case 1:  {
+     (_printf(66793,$vararg_buffer151)|0);
+     break;
+    }
+    default: {
+     (_printf(66801,$vararg_buffer153)|0);
+    }
+    }
+    $476 = $0;
+    $477 = $1;
+    $478 = $c;
+    _print_lv($476,$477,$478,1);
+    break;
+   }
+   case 43:  {
+    $479 = $c;
+    $480 = $479 >>> 23;
+    $481 = $480 & 511;
+    $482 = $c;
+    $483 = $482 >>> 7;
+    $484 = $483 & 65535;
+    $485 = $484 >> 10;
+    $486 = $485 & 63;
+    $487 = $c;
+    $488 = $487 >>> 7;
+    $489 = $488 & 65535;
+    $490 = $489 >> 9;
+    $491 = $490 & 1;
+    $492 = $c;
+    $493 = $492 >>> 7;
+    $494 = $493 & 65535;
+    $495 = $494 >> 4;
+    $496 = $495 & 31;
+    $497 = $c;
+    $498 = $497 >>> 7;
+    $499 = $498 & 65535;
+    $500 = $499 >> 0;
+    $501 = $500 & 15;
+    HEAP32[$vararg_buffer155>>2] = $481;
+    $vararg_ptr158 = ((($vararg_buffer155)) + 4|0);
+    HEAP32[$vararg_ptr158>>2] = $486;
+    $vararg_ptr159 = ((($vararg_buffer155)) + 8|0);
+    HEAP32[$vararg_ptr159>>2] = $491;
+    $vararg_ptr160 = ((($vararg_buffer155)) + 12|0);
+    HEAP32[$vararg_ptr160>>2] = $496;
+    $vararg_ptr161 = ((($vararg_buffer155)) + 16|0);
+    HEAP32[$vararg_ptr161>>2] = $501;
+    (_printf(66810,$vararg_buffer155)|0);
+    $502 = $0;
+    $503 = $1;
+    $504 = $c;
+    _print_lv($502,$503,$504,1);
+    break;
+   }
+   case 64:  {
+    $505 = $c;
+    $506 = $505 >>> 23;
+    $507 = $506 & 511;
+    $508 = $c;
+    $509 = $508 >>> 9;
+    $510 = $509 & 16383;
+    $511 = (($510) + 1)|0;
+    $512 = $c;
+    $513 = $512 >>> 7;
+    $514 = $513 & 3;
+    HEAP32[$vararg_buffer162>>2] = $507;
+    $vararg_ptr165 = ((($vararg_buffer162)) + 4|0);
+    HEAP32[$vararg_ptr165>>2] = $511;
+    $vararg_ptr166 = ((($vararg_buffer162)) + 8|0);
+    HEAP32[$vararg_ptr166>>2] = $514;
+    (_printf(66837,$vararg_buffer162)|0);
+    $515 = $0;
+    $516 = $1;
+    $517 = $c;
+    _print_lv($515,$516,$517,1);
+    break;
+   }
+   case 65:  {
+    $518 = $c;
+    $519 = $518 >>> 23;
+    $520 = $519 & 511;
+    $521 = $c;
+    $522 = $521 >>> 14;
+    $523 = $522 & 511;
+    $524 = $c;
+    $525 = $524 >>> 7;
+    $526 = $525 & 127;
+    HEAP32[$vararg_buffer167>>2] = $520;
+    $vararg_ptr170 = ((($vararg_buffer167)) + 4|0);
+    HEAP32[$vararg_ptr170>>2] = $523;
+    $vararg_ptr171 = ((($vararg_buffer167)) + 8|0);
+    HEAP32[$vararg_ptr171>>2] = $526;
+    (_printf(66861,$vararg_buffer167)|0);
+    $527 = $0;
+    $528 = $1;
+    $529 = $c;
+    _print_lv($527,$528,$529,3);
+    break;
+   }
+   case 70:  {
+    $530 = $c;
+    $531 = $530 >>> 23;
+    $532 = $531 & 511;
+    $533 = $0;
+    $534 = $c;
+    $535 = $534 >>> 14;
+    $536 = $535 & 511;
+    $537 = $1;
+    $538 = ((($537)) + 16|0);
+    $539 = HEAP32[$538>>2]|0;
+    $540 = (($539) + ($536<<2)|0);
+    $541 = HEAP32[$540>>2]|0;
+    $542 = (_mrb_sym2name($533,$541)|0);
+    HEAP32[$vararg_buffer172>>2] = $532;
+    $vararg_ptr175 = ((($vararg_buffer172)) + 4|0);
+    HEAP32[$vararg_ptr175>>2] = $542;
+    (_printf(66881,$vararg_buffer172)|0);
+    $543 = $0;
+    $544 = $1;
+    $545 = $c;
+    _print_lv($543,$544,$545,1);
+    break;
+   }
+   case 44:  {
+    $546 = $c;
+    $547 = $546 >>> 23;
+    $548 = $547 & 511;
+    $549 = $0;
+    $550 = $c;
+    $551 = $550 >>> 14;
+    $552 = $551 & 511;
+    $553 = $1;
+    $554 = ((($553)) + 16|0);
+    $555 = HEAP32[$554>>2]|0;
+    $556 = (($555) + ($552<<2)|0);
+    $557 = HEAP32[$556>>2]|0;
+    $558 = (_mrb_sym2name($549,$557)|0);
+    $559 = $c;
+    $560 = $559 >>> 7;
+    $561 = $560 & 127;
+    HEAP32[$vararg_buffer176>>2] = $548;
+    $vararg_ptr179 = ((($vararg_buffer176)) + 4|0);
+    HEAP32[$vararg_ptr179>>2] = $558;
+    $vararg_ptr180 = ((($vararg_buffer176)) + 8|0);
+    HEAP32[$vararg_ptr180>>2] = $561;
+    (_printf(66899,$vararg_buffer176)|0);
+    break;
+   }
+   case 45:  {
+    $562 = $c;
+    $563 = $562 >>> 23;
+    $564 = $563 & 511;
+    $565 = $0;
+    $566 = $c;
+    $567 = $566 >>> 14;
+    $568 = $567 & 511;
+    $569 = $1;
+    $570 = ((($569)) + 16|0);
+    $571 = HEAP32[$570>>2]|0;
+    $572 = (($571) + ($568<<2)|0);
+    $573 = HEAP32[$572>>2]|0;
+    $574 = (_mrb_sym2name($565,$573)|0);
+    $575 = $c;
+    $576 = $575 >>> 7;
+    $577 = $576 & 127;
+    HEAP32[$vararg_buffer181>>2] = $564;
+    $vararg_ptr184 = ((($vararg_buffer181)) + 4|0);
+    HEAP32[$vararg_ptr184>>2] = $574;
+    $vararg_ptr185 = ((($vararg_buffer181)) + 8|0);
+    HEAP32[$vararg_ptr185>>2] = $577;
+    (_printf(66918,$vararg_buffer181)|0);
+    break;
+   }
+   case 46:  {
+    $578 = $c;
+    $579 = $578 >>> 23;
+    $580 = $579 & 511;
+    $581 = $0;
+    $582 = $c;
+    $583 = $582 >>> 14;
+    $584 = $583 & 511;
+    $585 = $1;
+    $586 = ((($585)) + 16|0);
+    $587 = HEAP32[$586>>2]|0;
+    $588 = (($587) + ($584<<2)|0);
+    $589 = HEAP32[$588>>2]|0;
+    $590 = (_mrb_sym2name($581,$589)|0);
+    $591 = $c;
+    $592 = $591 >>> 7;
+    $593 = $592 & 127;
+    HEAP32[$vararg_buffer186>>2] = $580;
+    $vararg_ptr189 = ((($vararg_buffer186)) + 4|0);
+    HEAP32[$vararg_ptr189>>2] = $590;
+    $vararg_ptr190 = ((($vararg_buffer186)) + 8|0);
+    HEAP32[$vararg_ptr190>>2] = $593;
+    (_printf(66938,$vararg_buffer186)|0);
+    break;
+   }
+   case 47:  {
+    $594 = $c;
+    $595 = $594 >>> 23;
+    $596 = $595 & 511;
+    $597 = $0;
+    $598 = $c;
+    $599 = $598 >>> 14;
+    $600 = $599 & 511;
+    $601 = $1;
+    $602 = ((($601)) + 16|0);
+    $603 = HEAP32[$602>>2]|0;
+    $604 = (($603) + ($600<<2)|0);
+    $605 = HEAP32[$604>>2]|0;
+    $606 = (_mrb_sym2name($597,$605)|0);
+    $607 = $c;
+    $608 = $607 >>> 7;
+    $609 = $608 & 127;
+    HEAP32[$vararg_buffer191>>2] = $596;
+    $vararg_ptr194 = ((($vararg_buffer191)) + 4|0);
+    HEAP32[$vararg_ptr194>>2] = $606;
+    $vararg_ptr195 = ((($vararg_buffer191)) + 8|0);
+    HEAP32[$vararg_ptr195>>2] = $609;
+    (_printf(66957,$vararg_buffer191)|0);
+    break;
+   }
+   case 48:  {
+    $610 = $c;
+    $611 = $610 >>> 23;
+    $612 = $611 & 511;
+    $613 = $0;
+    $614 = $c;
+    $615 = $614 >>> 14;
+    $616 = $615 & 511;
+    $617 = $1;
+    $618 = ((($617)) + 16|0);
+    $619 = HEAP32[$618>>2]|0;
+    $620 = (($619) + ($616<<2)|0);
+    $621 = HEAP32[$620>>2]|0;
+    $622 = (_mrb_sym2name($613,$621)|0);
+    $623 = $c;
+    $624 = $623 >>> 7;
+    $625 = $624 & 127;
+    HEAP32[$vararg_buffer196>>2] = $612;
+    $vararg_ptr199 = ((($vararg_buffer196)) + 4|0);
+    HEAP32[$vararg_ptr199>>2] = $622;
+    $vararg_ptr200 = ((($vararg_buffer196)) + 8|0);
+    HEAP32[$vararg_ptr200>>2] = $625;
+    (_printf(66977,$vararg_buffer196)|0);
+    break;
+   }
+   case 49:  {
+    $626 = $c;
+    $627 = $626 >>> 23;
+    $628 = $627 & 511;
+    $629 = $0;
+    $630 = $c;
+    $631 = $630 >>> 14;
+    $632 = $631 & 511;
+    $633 = $1;
+    $634 = ((($633)) + 16|0);
+    $635 = HEAP32[$634>>2]|0;
+    $636 = (($635) + ($632<<2)|0);
+    $637 = HEAP32[$636>>2]|0;
+    $638 = (_mrb_sym2name($629,$637)|0);
+    $639 = $c;
+    $640 = $639 >>> 7;
+    $641 = $640 & 127;
+    HEAP32[$vararg_buffer201>>2] = $628;
+    $vararg_ptr204 = ((($vararg_buffer201)) + 4|0);
+    HEAP32[$vararg_ptr204>>2] = $638;
+    $vararg_ptr205 = ((($vararg_buffer201)) + 8|0);
+    HEAP32[$vararg_ptr205>>2] = $641;
+    (_printf(66996,$vararg_buffer201)|0);
+    break;
+   }
+   case 51:  {
+    $642 = $c;
+    $643 = $642 >>> 23;
+    $644 = $643 & 511;
+    $645 = $0;
+    $646 = $c;
+    $647 = $646 >>> 14;
+    $648 = $647 & 511;
+    $649 = $1;
+    $650 = ((($649)) + 16|0);
+    $651 = HEAP32[$650>>2]|0;
+    $652 = (($651) + ($648<<2)|0);
+    $653 = HEAP32[$652>>2]|0;
+    $654 = (_mrb_sym2name($645,$653)|0);
+    $655 = $c;
+    $656 = $655 >>> 7;
+    $657 = $656 & 127;
+    HEAP32[$vararg_buffer206>>2] = $644;
+    $vararg_ptr209 = ((($vararg_buffer206)) + 4|0);
+    HEAP32[$vararg_ptr209>>2] = $654;
+    $vararg_ptr210 = ((($vararg_buffer206)) + 8|0);
+    HEAP32[$vararg_ptr210>>2] = $657;
+    (_printf(67015,$vararg_buffer206)|0);
+    break;
+   }
+   case 52:  {
+    $658 = $c;
+    $659 = $658 >>> 23;
+    $660 = $659 & 511;
+    $661 = $0;
+    $662 = $c;
+    $663 = $662 >>> 14;
+    $664 = $663 & 511;
+    $665 = $1;
+    $666 = ((($665)) + 16|0);
+    $667 = HEAP32[$666>>2]|0;
+    $668 = (($667) + ($664<<2)|0);
+    $669 = HEAP32[$668>>2]|0;
+    $670 = (_mrb_sym2name($661,$669)|0);
+    $671 = $c;
+    $672 = $671 >>> 7;
+    $673 = $672 & 127;
+    HEAP32[$vararg_buffer211>>2] = $660;
+    $vararg_ptr214 = ((($vararg_buffer211)) + 4|0);
+    HEAP32[$vararg_ptr214>>2] = $670;
+    $vararg_ptr215 = ((($vararg_buffer211)) + 8|0);
+    HEAP32[$vararg_ptr215>>2] = $673;
+    (_printf(67033,$vararg_buffer211)|0);
+    break;
+   }
+   case 53:  {
+    $674 = $c;
+    $675 = $674 >>> 23;
+    $676 = $675 & 511;
+    $677 = $0;
+    $678 = $c;
+    $679 = $678 >>> 14;
+    $680 = $679 & 511;
+    $681 = $1;
+    $682 = ((($681)) + 16|0);
+    $683 = HEAP32[$682>>2]|0;
+    $684 = (($683) + ($680<<2)|0);
+    $685 = HEAP32[$684>>2]|0;
+    $686 = (_mrb_sym2name($677,$685)|0);
+    $687 = $c;
+    $688 = $687 >>> 7;
+    $689 = $688 & 127;
+    HEAP32[$vararg_buffer216>>2] = $676;
+    $vararg_ptr219 = ((($vararg_buffer216)) + 4|0);
+    HEAP32[$vararg_ptr219>>2] = $686;
+    $vararg_ptr220 = ((($vararg_buffer216)) + 8|0);
+    HEAP32[$vararg_ptr220>>2] = $689;
+    (_printf(67051,$vararg_buffer216)|0);
+    break;
+   }
+   case 54:  {
+    $690 = $c;
+    $691 = $690 >>> 23;
+    $692 = $691 & 511;
+    $693 = $0;
+    $694 = $c;
+    $695 = $694 >>> 14;
+    $696 = $695 & 511;
+    $697 = $1;
+    $698 = ((($697)) + 16|0);
+    $699 = HEAP32[$698>>2]|0;
+    $700 = (($699) + ($696<<2)|0);
+    $701 = HEAP32[$700>>2]|0;
+    $702 = (_mrb_sym2name($693,$701)|0);
+    $703 = $c;
+    $704 = $703 >>> 7;
+    $705 = $704 & 127;
+    HEAP32[$vararg_buffer221>>2] = $692;
+    $vararg_ptr224 = ((($vararg_buffer221)) + 4|0);
+    HEAP32[$vararg_ptr224>>2] = $702;
+    $vararg_ptr225 = ((($vararg_buffer221)) + 8|0);
+    HEAP32[$vararg_ptr225>>2] = $705;
+    (_printf(67069,$vararg_buffer221)|0);
+    break;
+   }
+   case 50:  {
+    $706 = $c;
+    $707 = $706 >>> 23;
+    $708 = $707 & 511;
+    $709 = $0;
+    $710 = $c;
+    $711 = $710 >>> 14;
+    $712 = $711 & 511;
+    $713 = $1;
+    $714 = ((($713)) + 16|0);
+    $715 = HEAP32[$714>>2]|0;
+    $716 = (($715) + ($712<<2)|0);
+    $717 = HEAP32[$716>>2]|0;
+    $718 = (_mrb_sym2name($709,$717)|0);
+    $719 = $c;
+    $720 = $719 >>> 7;
+    $721 = $720 & 127;
+    HEAP32[$vararg_buffer226>>2] = $708;
+    $vararg_ptr229 = ((($vararg_buffer226)) + 4|0);
+    HEAP32[$vararg_ptr229>>2] = $718;
+    $vararg_ptr230 = ((($vararg_buffer226)) + 8|0);
+    HEAP32[$vararg_ptr230>>2] = $721;
+    (_printf(67087,$vararg_buffer226)|0);
+    break;
+   }
+   case 74:  {
+    (_printf(67105,$vararg_buffer231)|0);
+    break;
+   }
+   case 55:  {
+    $722 = $c;
+    $723 = $722 >>> 23;
+    $724 = $723 & 511;
+    $725 = $c;
+    $726 = $725 >>> 14;
+    $727 = $726 & 511;
+    $728 = $c;
+    $729 = $728 >>> 7;
+    $730 = $729 & 127;
+    HEAP32[$vararg_buffer233>>2] = $724;
+    $vararg_ptr236 = ((($vararg_buffer233)) + 4|0);
+    HEAP32[$vararg_ptr236>>2] = $727;
+    $vararg_ptr237 = ((($vararg_buffer233)) + 8|0);
+    HEAP32[$vararg_ptr237>>2] = $730;
+    (_printf(67114,$vararg_buffer233)|0);
+    $731 = $0;
+    $732 = $1;
+    $733 = $c;
+    _print_lv($731,$732,$733,3);
+    break;
+   }
+   case 56:  {
+    $734 = $c;
+    $735 = $734 >>> 23;
+    $736 = $735 & 511;
+    $737 = $c;
+    $738 = $737 >>> 14;
+    $739 = $738 & 511;
+    HEAP32[$vararg_buffer238>>2] = $736;
+    $vararg_ptr241 = ((($vararg_buffer238)) + 4|0);
+    HEAP32[$vararg_ptr241>>2] = $739;
+    (_printf(67134,$vararg_buffer238)|0);
+    $740 = $0;
+    $741 = $1;
+    $742 = $c;
+    _print_lv($740,$741,$742,3);
+    break;
+   }
+   case 57:  {
+    $743 = $c;
+    $744 = $743 >>> 23;
+    $745 = $744 & 511;
+    $746 = $c;
+    $747 = $746 >>> 14;
+    $748 = $747 & 511;
+    HEAP32[$vararg_buffer242>>2] = $745;
+    $vararg_ptr245 = ((($vararg_buffer242)) + 4|0);
+    HEAP32[$vararg_ptr245>>2] = $748;
+    (_printf(67153,$vararg_buffer242)|0);
+    $749 = $0;
+    $750 = $1;
+    $751 = $c;
+    _print_lv($749,$750,$751,3);
+    break;
+   }
+   case 58:  {
+    $752 = $c;
+    $753 = $752 >>> 23;
+    $754 = $753 & 511;
+    $755 = $c;
+    $756 = $755 >>> 14;
+    $757 = $756 & 511;
+    $758 = $c;
+    $759 = $758 >>> 7;
+    $760 = $759 & 127;
+    HEAP32[$vararg_buffer246>>2] = $754;
+    $vararg_ptr249 = ((($vararg_buffer246)) + 4|0);
+    HEAP32[$vararg_ptr249>>2] = $757;
+    $vararg_ptr250 = ((($vararg_buffer246)) + 8|0);
+    HEAP32[$vararg_ptr250>>2] = $760;
+    (_printf(67173,$vararg_buffer246)|0);
+    $761 = $0;
+    $762 = $1;
+    $763 = $c;
+    _print_lv($761,$762,$763,3);
+    break;
+   }
+   case 60:  {
+    $764 = $c;
+    $765 = $764 >>> 23;
+    $766 = $765 & 511;
+    $767 = $c;
+    $768 = $767 >>> 14;
+    $769 = $768 & 511;
+    $770 = $c;
+    $771 = $770 >>> 7;
+    $772 = $771 & 127;
+    HEAP32[$vararg_buffer251>>2] = $766;
+    $vararg_ptr254 = ((($vararg_buffer251)) + 4|0);
+    HEAP32[$vararg_ptr254>>2] = $769;
+    $vararg_ptr255 = ((($vararg_buffer251)) + 8|0);
+    HEAP32[$vararg_ptr255>>2] = $772;
+    (_printf(67192,$vararg_buffer251)|0);
+    $773 = $0;
+    $774 = $1;
+    $775 = $c;
+    _print_lv($773,$774,$775,1);
+    break;
+   }
+   case 61:  {
+    $776 = $c;
+    $777 = $776 >>> 7;
+    $778 = $777 & 65535;
+    $779 = $1;
+    $780 = ((($779)) + 12|0);
+    $781 = HEAP32[$780>>2]|0;
+    $782 = (($781) + ($778<<3)|0);
+    ;HEAP32[$v1>>2]=HEAP32[$782>>2]|0;HEAP32[$v1+4>>2]=HEAP32[$782+4>>2]|0;
+    $783 = $0;
+    $784 = $0;
+    $785 = HEAP32[$v1>>2]|0;
+    $786 = HEAP32[$785>>2]|0;
+    $787 = $786 >>> 11;
+    $788 = $787 & 8;
+    $789 = ($788|0)!=(0);
+    $790 = HEAP32[$v1>>2]|0;
+    $791 = ((($790)) + 12|0);
+    if ($789) {
+     $806 = $791;
+    } else {
+     $792 = ((($791)) + 8|0);
+     $793 = HEAP32[$792>>2]|0;
+     $806 = $793;
+    }
+    $794 = HEAP32[$v1>>2]|0;
+    $795 = HEAP32[$794>>2]|0;
+    $796 = $795 >>> 11;
+    $797 = $796 & 8;
+    $798 = ($797|0)!=(0);
+    $799 = HEAP32[$v1>>2]|0;
+    if ($798) {
+     $800 = HEAP32[$799>>2]|0;
+     $801 = $800 >>> 11;
+     $802 = $801 & 496;
+     $803 = $802 >> 4;
+     $807 = $803;
+    } else {
+     $804 = ((($799)) + 12|0);
+     $805 = HEAP32[$804>>2]|0;
+     $807 = $805;
+    }
+    _mrb_str_new($2,$784,$806,$807);
+    ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+    _mrb_str_dump($s2,$783,$$byval_copy);
+    $808 = $c;
+    $809 = $808 >>> 23;
+    $810 = $809 & 511;
+    $811 = $c;
+    $812 = $811 >>> 7;
+    $813 = $812 & 65535;
+    $814 = HEAP32[$s2>>2]|0;
+    $815 = HEAP32[$814>>2]|0;
+    $816 = $815 >>> 11;
+    $817 = $816 & 8;
+    $818 = ($817|0)!=(0);
+    $819 = HEAP32[$s2>>2]|0;
+    $820 = ((($819)) + 12|0);
+    if ($818) {
+     $823 = $820;
+    } else {
+     $821 = ((($820)) + 8|0);
+     $822 = HEAP32[$821>>2]|0;
+     $823 = $822;
+    }
+    HEAP32[$vararg_buffer256>>2] = $810;
+    $vararg_ptr259 = ((($vararg_buffer256)) + 4|0);
+    HEAP32[$vararg_ptr259>>2] = $813;
+    $vararg_ptr260 = ((($vararg_buffer256)) + 8|0);
+    HEAP32[$vararg_ptr260>>2] = $823;
+    (_printf(67211,$vararg_buffer256)|0);
+    $824 = $0;
+    $825 = $1;
+    $826 = $c;
+    _print_lv($824,$825,$826,1);
+    break;
+   }
+   case 62:  {
+    $827 = $c;
+    $828 = $827 >>> 23;
+    $829 = $828 & 511;
+    $830 = $c;
+    $831 = $830 >>> 14;
+    $832 = $831 & 511;
+    HEAP32[$vararg_buffer261>>2] = $829;
+    $vararg_ptr264 = ((($vararg_buffer261)) + 4|0);
+    HEAP32[$vararg_ptr264>>2] = $832;
+    (_printf(67236,$vararg_buffer261)|0);
+    $833 = $0;
+    $834 = $1;
+    $835 = $c;
+    _print_lv($833,$834,$835,3);
+    break;
+   }
+   case 63:  {
+    $836 = $c;
+    $837 = $836 >>> 23;
+    $838 = $837 & 511;
+    $839 = $c;
+    $840 = $839 >>> 14;
+    $841 = $840 & 511;
+    $842 = $c;
+    $843 = $842 >>> 7;
+    $844 = $843 & 127;
+    HEAP32[$vararg_buffer265>>2] = $838;
+    $vararg_ptr268 = ((($vararg_buffer265)) + 4|0);
+    HEAP32[$vararg_ptr268>>2] = $841;
+    $vararg_ptr269 = ((($vararg_buffer265)) + 8|0);
+    HEAP32[$vararg_ptr269>>2] = $844;
+    (_printf(67255,$vararg_buffer265)|0);
+    $845 = $0;
+    $846 = $1;
+    $847 = $c;
+    _print_lv($845,$846,$847,3);
+    break;
+   }
+   case 66:  {
+    $848 = $c;
+    $849 = $848 >>> 23;
+    $850 = $849 & 511;
+    HEAP32[$vararg_buffer270>>2] = $850;
+    (_printf(67274,$vararg_buffer270)|0);
+    $851 = $0;
+    $852 = $1;
+    $853 = $c;
+    _print_lv($851,$852,$853,1);
+    break;
+   }
+   case 67:  {
+    $854 = $c;
+    $855 = $854 >>> 23;
+    $856 = $855 & 511;
+    $857 = $0;
+    $858 = $c;
+    $859 = $858 >>> 14;
+    $860 = $859 & 511;
+    $861 = $1;
+    $862 = ((($861)) + 16|0);
+    $863 = HEAP32[$862>>2]|0;
+    $864 = (($863) + ($860<<2)|0);
+    $865 = HEAP32[$864>>2]|0;
+    $866 = (_mrb_sym2name($857,$865)|0);
+    HEAP32[$vararg_buffer273>>2] = $856;
+    $vararg_ptr276 = ((($vararg_buffer273)) + 4|0);
+    HEAP32[$vararg_ptr276>>2] = $866;
+    (_printf(67290,$vararg_buffer273)|0);
+    $867 = $0;
+    $868 = $1;
+    $869 = $c;
+    _print_lv($867,$868,$869,1);
+    break;
+   }
+   case 68:  {
+    $870 = $c;
+    $871 = $870 >>> 23;
+    $872 = $871 & 511;
+    $873 = $0;
+    $874 = $c;
+    $875 = $874 >>> 14;
+    $876 = $875 & 511;
+    $877 = $1;
+    $878 = ((($877)) + 16|0);
+    $879 = HEAP32[$878>>2]|0;
+    $880 = (($879) + ($876<<2)|0);
+    $881 = HEAP32[$880>>2]|0;
+    $882 = (_mrb_sym2name($873,$881)|0);
+    HEAP32[$vararg_buffer277>>2] = $872;
+    $vararg_ptr280 = ((($vararg_buffer277)) + 4|0);
+    HEAP32[$vararg_ptr280>>2] = $882;
+    (_printf(67307,$vararg_buffer277)|0);
+    $883 = $0;
+    $884 = $1;
+    $885 = $c;
+    _print_lv($883,$884,$885,1);
+    break;
+   }
+   case 69:  {
+    $886 = $c;
+    $887 = $886 >>> 23;
+    $888 = $887 & 511;
+    $889 = $c;
+    $890 = $889 >>> 7;
+    $891 = $890 & 65535;
+    $892 = (($891) + 1)|0;
+    HEAP32[$vararg_buffer281>>2] = $888;
+    $vararg_ptr284 = ((($vararg_buffer281)) + 4|0);
+    HEAP32[$vararg_ptr284>>2] = $892;
+    (_printf(67325,$vararg_buffer281)|0);
+    $893 = $0;
+    $894 = $1;
+    $895 = $c;
+    _print_lv($893,$894,$895,1);
+    break;
+   }
+   case 71:  {
+    $896 = $c;
+    $897 = $896 >>> 23;
+    $898 = $897 & 511;
+    $899 = $c;
+    $900 = $899 >>> 14;
+    $901 = $900 & 511;
+    HEAP32[$vararg_buffer285>>2] = $898;
+    $vararg_ptr288 = ((($vararg_buffer285)) + 4|0);
+    HEAP32[$vararg_ptr288>>2] = $901;
+    (_printf(67344,$vararg_buffer285)|0);
+    $902 = $0;
+    $903 = $1;
+    $904 = $c;
+    _print_lv($902,$903,$904,3);
+    break;
+   }
+   case 72:  {
+    $905 = $c;
+    $906 = $905 >>> 23;
+    $907 = $906 & 511;
+    HEAP32[$vararg_buffer289>>2] = $907;
+    (_printf(67363,$vararg_buffer289)|0);
+    $908 = $0;
+    $909 = $1;
+    $910 = $c;
+    _print_lv($908,$909,$910,1);
+    break;
+   }
+   case 75:  {
+    $911 = $c;
+    $912 = $911 >>> 7;
+    $913 = $912 & 65535;
+    $914 = $1;
+    $915 = ((($914)) + 12|0);
+    $916 = HEAP32[$915>>2]|0;
+    $917 = (($916) + ($913<<3)|0);
+    ;HEAP32[$v3>>2]=HEAP32[$917>>2]|0;HEAP32[$v3+4>>2]=HEAP32[$917+4>>2]|0;
+    $918 = $0;
+    $919 = $0;
+    $920 = HEAP32[$v3>>2]|0;
+    $921 = HEAP32[$920>>2]|0;
+    $922 = $921 >>> 11;
+    $923 = $922 & 8;
+    $924 = ($923|0)!=(0);
+    $925 = HEAP32[$v3>>2]|0;
+    $926 = ((($925)) + 12|0);
+    if ($924) {
+     $941 = $926;
+    } else {
+     $927 = ((($926)) + 8|0);
+     $928 = HEAP32[$927>>2]|0;
+     $941 = $928;
+    }
+    $929 = HEAP32[$v3>>2]|0;
+    $930 = HEAP32[$929>>2]|0;
+    $931 = $930 >>> 11;
+    $932 = $931 & 8;
+    $933 = ($932|0)!=(0);
+    $934 = HEAP32[$v3>>2]|0;
+    if ($933) {
+     $935 = HEAP32[$934>>2]|0;
+     $936 = $935 >>> 11;
+     $937 = $936 & 496;
+     $938 = $937 >> 4;
+     $942 = $938;
+    } else {
+     $939 = ((($934)) + 12|0);
+     $940 = HEAP32[$939>>2]|0;
+     $942 = $940;
+    }
+    _mrb_str_new($3,$919,$941,$942);
+    ;HEAP32[$$byval_copy321>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy321+4>>2]=HEAP32[$3+4>>2]|0;
+    _mrb_str_dump($s4,$918,$$byval_copy321);
+    $943 = HEAP32[$s4>>2]|0;
+    $944 = HEAP32[$943>>2]|0;
+    $945 = $944 >>> 11;
+    $946 = $945 & 8;
+    $947 = ($946|0)!=(0);
+    $948 = HEAP32[$s4>>2]|0;
+    $949 = ((($948)) + 12|0);
+    if ($947) {
+     $952 = $949;
+    } else {
+     $950 = ((($949)) + 8|0);
+     $951 = HEAP32[$950>>2]|0;
+     $952 = $951;
+    }
+    HEAP32[$vararg_buffer292>>2] = $952;
+    (_printf(67379,$vararg_buffer292)|0);
+    break;
+   }
+   case 30:  {
+    $953 = $c;
+    $954 = $953 >>> 7;
+    $955 = $954 & 65535;
+    $956 = (($955) + 1)|0;
+    HEAP32[$vararg_buffer295>>2] = $956;
+    (_printf(67390,$vararg_buffer295)|0);
+    break;
+   }
+   case 26:  {
+    $957 = $i;
+    $958 = $c;
+    $959 = $958 >>> 7;
+    $960 = $959 & 65535;
+    $961 = (($960) - 32767)|0;
+    $962 = (($957) + ($961))|0;
+    HEAP32[$vararg_buffer298>>2] = $962;
+    (_printf(67408,$vararg_buffer298)|0);
+    break;
+   }
+   case 27:  {
+    $963 = $c;
+    $964 = $963 >>> 23;
+    $965 = $964 & 511;
+    HEAP32[$vararg_buffer301>>2] = $965;
+    (_printf(67423,$vararg_buffer301)|0);
+    $966 = $0;
+    $967 = $1;
+    $968 = $c;
+    _print_lv($966,$967,$968,1);
+    break;
+   }
+   case 29:  {
+    $969 = $c;
+    $970 = $969 >>> 23;
+    $971 = $970 & 511;
+    HEAP32[$vararg_buffer304>>2] = $971;
+    (_printf(67439,$vararg_buffer304)|0);
+    $972 = $0;
+    $973 = $1;
+    $974 = $c;
+    _print_lv($972,$973,$974,1);
+    break;
+   }
+   case 28:  {
+    $975 = $c;
+    $976 = $975 >>> 23;
+    $977 = $976 & 511;
+    HEAP32[$vararg_buffer307>>2] = $977;
+    (_printf(67454,$vararg_buffer307)|0);
+    $978 = $0;
+    $979 = $1;
+    $980 = $c;
+    _print_lv($978,$979,$980,1);
+    break;
+   }
+   case 31:  {
+    $981 = $c;
+    $982 = $981 >>> 23;
+    $983 = $982 & 511;
+    HEAP32[$vararg_buffer310>>2] = $983;
+    (_printf(67469,$vararg_buffer310)|0);
+    break;
+   }
+   default: {
+    $984 = $c;
+    $985 = $984 & 127;
+    $986 = $c;
+    $987 = $986 >>> 23;
+    $988 = $987 & 511;
+    $989 = $c;
+    $990 = $989 >>> 14;
+    $991 = $990 & 511;
+    $992 = $c;
+    $993 = $992 >>> 7;
+    $994 = $993 & 127;
+    HEAP32[$vararg_buffer313>>2] = $985;
+    $vararg_ptr316 = ((($vararg_buffer313)) + 4|0);
+    HEAP32[$vararg_ptr316>>2] = $988;
+    $vararg_ptr317 = ((($vararg_buffer313)) + 8|0);
+    HEAP32[$vararg_ptr317>>2] = $991;
+    $vararg_ptr318 = ((($vararg_buffer313)) + 12|0);
+    HEAP32[$vararg_ptr318>>2] = $994;
+    (_printf(67481,$vararg_buffer313)|0);
+   }
+   }
+  } while(0);
+  $995 = $0;
+  $996 = $ai;
+  _mrb_gc_arena_restore($995,$996);
+  $997 = $i;
+  $998 = (($997) + 1)|0;
+  $i = $998;
+ }
+ (_printf(66199,$vararg_buffer319)|0);
+ STACKTOP = sp;return;
+}
+function _print_lv($mrb,$irep,$c,$r) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $c = $c|0;
+ $r = $r|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $pre = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer3 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer3 = sp + 16|0;
+ $vararg_buffer1 = sp + 8|0;
+ $vararg_buffer = sp;
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $c;
+ $3 = $r;
+ $pre = 0;
+ $4 = $1;
+ $5 = ((($4)) + 24|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = ($6|0)!=(0|0);
+ do {
+  if ($7) {
+   $8 = $3;
+   $9 = $8 & 1;
+   $10 = ($9|0)!=(0);
+   if ($10) {
+    $11 = $2;
+    $12 = $11 >>> 23;
+    $13 = $12 & 511;
+    $14 = $1;
+    $15 = HEAP16[$14>>1]|0;
+    $16 = $15&65535;
+    $17 = ($13|0)>=($16|0);
+    if ($17) {
+     label = 4;
+    }
+   } else {
+    label = 4;
+   }
+   if ((label|0) == 4) {
+    $18 = $3;
+    $19 = $18 & 2;
+    $20 = ($19|0)!=(0);
+    if (!($20)) {
+     break;
+    }
+    $21 = $2;
+    $22 = $21 >>> 14;
+    $23 = $22 & 511;
+    $24 = $1;
+    $25 = HEAP16[$24>>1]|0;
+    $26 = $25&65535;
+    $27 = ($23|0)>=($26|0);
+    if ($27) {
+     break;
+    }
+   }
+   (_printf(66201,$vararg_buffer1)|0);
+   $28 = $3;
+   $29 = $28 & 1;
+   $30 = ($29|0)!=(0);
+   if ($30) {
+    $31 = $0;
+    $32 = $1;
+    $33 = $2;
+    $34 = $33 >>> 23;
+    $35 = $34 & 511;
+    $36 = (_print_r($31,$32,$35,0)|0);
+    $pre = $36;
+   }
+   $37 = $3;
+   $38 = $37 & 2;
+   $39 = ($38|0)!=(0);
+   if ($39) {
+    $40 = $0;
+    $41 = $1;
+    $42 = $2;
+    $43 = $42 >>> 14;
+    $44 = $43 & 511;
+    $45 = $pre;
+    (_print_r($40,$41,$44,$45)|0);
+   }
+   (_printf(66199,$vararg_buffer3)|0);
+   STACKTOP = sp;return;
+  }
+ } while(0);
+ (_printf(66199,$vararg_buffer)|0);
+ STACKTOP = sp;return;
+}
+function _print_r($mrb,$irep,$n,$pre) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $n = $n|0;
+ $pre = $pre|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $sym = 0, $vararg_buffer = 0;
+ var $vararg_buffer1 = 0, $vararg_ptr3 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer1 = sp + 8|0;
+ $vararg_buffer = sp;
+ $1 = $mrb;
+ $2 = $irep;
+ $3 = $n;
+ $4 = $pre;
+ $5 = $3;
+ $6 = ($5|0)==(0);
+ if ($6) {
+  $0 = 0;
+  $36 = $0;
+  STACKTOP = sp;return ($36|0);
+ }
+ $i = 0;
+ while(1) {
+  $7 = $i;
+  $8 = (($7) + 1)|0;
+  $9 = $2;
+  $10 = HEAP16[$9>>1]|0;
+  $11 = $10&65535;
+  $12 = ($8>>>0)<($11>>>0);
+  if (!($12)) {
+   label = 10;
+   break;
+  }
+  $13 = $i;
+  $14 = $2;
+  $15 = ((($14)) + 24|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = (($16) + ($13<<3)|0);
+  $18 = ((($17)) + 4|0);
+  $19 = HEAP16[$18>>1]|0;
+  $20 = $19&65535;
+  $21 = $3;
+  $22 = ($20|0)==($21|0);
+  $23 = $i;
+  if ($22) {
+   break;
+  }
+  $35 = (($23) + 1)|0;
+  $i = $35;
+ }
+ if ((label|0) == 10) {
+  $0 = 0;
+  $36 = $0;
+  STACKTOP = sp;return ($36|0);
+ }
+ $24 = $2;
+ $25 = ((($24)) + 24|0);
+ $26 = HEAP32[$25>>2]|0;
+ $27 = (($26) + ($23<<3)|0);
+ $28 = HEAP32[$27>>2]|0;
+ $sym = $28;
+ $29 = $4;
+ $30 = ($29|0)!=(0);
+ if ($30) {
+  (_printf(66205,$vararg_buffer)|0);
+ }
+ $31 = $3;
+ $32 = $1;
+ $33 = $sym;
+ $34 = (_mrb_sym2name($32,$33)|0);
+ HEAP32[$vararg_buffer1>>2] = $31;
+ $vararg_ptr3 = ((($vararg_buffer1)) + 4|0);
+ HEAP32[$vararg_ptr3>>2] = $34;
+ (_printf(66207,$vararg_buffer1)|0);
+ $0 = 1;
+ $36 = $0;
+ STACKTOP = sp;return ($36|0);
+}
+function _calc_crc_16_ccitt($src,$nbytes,$crc) {
+ $src = $src|0;
+ $nbytes = $nbytes|0;
+ $crc = $crc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $crcwk = 0, $ibit = 0, $ibyte = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $src;
+ $1 = $nbytes;
+ $2 = $crc;
+ $3 = $2;
+ $4 = $3&65535;
+ $5 = $4 << 8;
+ $crcwk = $5;
+ $ibyte = 0;
+ while(1) {
+  $6 = $ibyte;
+  $7 = $1;
+  $8 = ($6>>>0)<($7>>>0);
+  if (!($8)) {
+   break;
+  }
+  $9 = $0;
+  $10 = ((($9)) + 1|0);
+  $0 = $10;
+  $11 = HEAP8[$9>>0]|0;
+  $12 = $11&255;
+  $13 = $crcwk;
+  $14 = $13 | $12;
+  $crcwk = $14;
+  $ibit = 0;
+  while(1) {
+   $15 = $ibit;
+   $16 = ($15>>>0)<(8);
+   if (!($16)) {
+    break;
+   }
+   $17 = $crcwk;
+   $18 = $17 << 1;
+   $crcwk = $18;
+   $19 = $crcwk;
+   $20 = $19 & 16777216;
+   $21 = ($20|0)!=(0);
+   if ($21) {
+    $22 = $crcwk;
+    $23 = $22 ^ 17834240;
+    $crcwk = $23;
+   }
+   $24 = $ibit;
+   $25 = (($24) + 1)|0;
+   $ibit = $25;
+  }
+  $26 = $ibyte;
+  $27 = (($26) + 1)|0;
+  $ibyte = $27;
+ }
+ $28 = $crcwk;
+ $29 = $28 >>> 8;
+ $30 = $29&65535;
+ STACKTOP = sp;return ($30|0);
+}
+function _mrb_debug_get_filename($irep,$pc) {
+ $irep = $irep|0;
+ $pc = $pc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0;
+ var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $f = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $irep;
+ $2 = $pc;
+ $3 = $1;
+ $4 = ($3|0)!=(0|0);
+ if ($4) {
+  $5 = $2;
+  $6 = $1;
+  $7 = ((($6)) + 40|0);
+  $8 = HEAP32[$7>>2]|0;
+  $9 = ($5>>>0)<($8>>>0);
+  if ($9) {
+   $f = 0;
+   $10 = $1;
+   $11 = ((($10)) + 36|0);
+   $12 = HEAP32[$11>>2]|0;
+   $13 = ($12|0)!=(0|0);
+   $14 = $1;
+   if (!($13)) {
+    $15 = ((($14)) + 28|0);
+    $16 = HEAP32[$15>>2]|0;
+    $0 = $16;
+    $25 = $0;
+    STACKTOP = sp;return ($25|0);
+   }
+   $17 = ((($14)) + 36|0);
+   $18 = HEAP32[$17>>2]|0;
+   $19 = $2;
+   $20 = (_get_file($18,$19)|0);
+   $f = $20;
+   $21 = ($20|0)!=(0|0);
+   if ($21) {
+    $22 = $f;
+    $23 = ((($22)) + 4|0);
+    $24 = HEAP32[$23>>2]|0;
+    $0 = $24;
+    $25 = $0;
+    STACKTOP = sp;return ($25|0);
+   }
+  }
+ }
+ $0 = 0;
+ $25 = $0;
+ STACKTOP = sp;return ($25|0);
+}
+function _get_file($info,$pc) {
+ $info = $info|0;
+ $pc = $pc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $count = 0, $it = 0;
+ var $ret = 0, $step = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $info;
+ $2 = $pc;
+ $3 = $2;
+ $4 = $1;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ($3>>>0)>=($5>>>0);
+ if ($6) {
+  $0 = 0;
+  $37 = $0;
+  STACKTOP = sp;return ($37|0);
+ }
+ $7 = $1;
+ $8 = ((($7)) + 8|0);
+ $9 = HEAP32[$8>>2]|0;
+ $ret = $9;
+ $10 = $1;
+ $11 = ((($10)) + 4|0);
+ $12 = HEAP16[$11>>1]|0;
+ $13 = $12&65535;
+ $count = $13;
+ while(1) {
+  $14 = $count;
+  $15 = ($14|0)>(0);
+  if (!($15)) {
+   break;
+  }
+  $16 = $count;
+  $17 = (($16|0) / 2)&-1;
+  $step = $17;
+  $18 = $ret;
+  $19 = $step;
+  $20 = (($18) + ($19<<2)|0);
+  $it = $20;
+  $21 = $2;
+  $22 = $it;
+  $23 = HEAP32[$22>>2]|0;
+  $24 = HEAP32[$23>>2]|0;
+  $25 = ($21>>>0)<($24>>>0);
+  if ($25) {
+   $32 = $step;
+   $count = $32;
+   continue;
+  } else {
+   $26 = $it;
+   $27 = ((($26)) + 4|0);
+   $ret = $27;
+   $28 = $step;
+   $29 = (($28) + 1)|0;
+   $30 = $count;
+   $31 = (($30) - ($29))|0;
+   $count = $31;
+   continue;
+  }
+ }
+ $33 = $ret;
+ $34 = ((($33)) + -4|0);
+ $ret = $34;
+ $35 = $ret;
+ $36 = HEAP32[$35>>2]|0;
+ $0 = $36;
+ $37 = $0;
+ STACKTOP = sp;return ($37|0);
+}
+function _mrb_debug_get_line($irep,$pc) {
+ $irep = $irep|0;
+ $pc = $pc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $8 = 0, $9 = 0, $count = 0, $f = 0, $it = 0, $ret = 0, $step = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $irep;
+ $2 = $pc;
+ $3 = $1;
+ $4 = ($3|0)!=(0|0);
+ L1: do {
+  if ($4) {
+   $5 = $2;
+   $6 = $1;
+   $7 = ((($6)) + 40|0);
+   $8 = HEAP32[$7>>2]|0;
+   $9 = ($5>>>0)<($8>>>0);
+   if ($9) {
+    $f = 0;
+    $10 = $1;
+    $11 = ((($10)) + 36|0);
+    $12 = HEAP32[$11>>2]|0;
+    $13 = ($12|0)!=(0|0);
+    $14 = $1;
+    if (!($13)) {
+     $15 = ((($14)) + 32|0);
+     $16 = HEAP32[$15>>2]|0;
+     $17 = ($16|0)!=(0|0);
+     if ($17) {
+      $18 = $2;
+      $19 = $1;
+      $20 = ((($19)) + 32|0);
+      $21 = HEAP32[$20>>2]|0;
+      $22 = (($21) + ($18<<1)|0);
+      $23 = HEAP16[$22>>1]|0;
+      $24 = $23&65535;
+      $25 = $24;
+     } else {
+      $25 = -1;
+     }
+     $0 = $25;
+     $74 = $0;
+     STACKTOP = sp;return ($74|0);
+    }
+    $26 = ((($14)) + 36|0);
+    $27 = HEAP32[$26>>2]|0;
+    $28 = $2;
+    $29 = (_get_file($27,$28)|0);
+    $f = $29;
+    $30 = ($29|0)!=(0|0);
+    if ($30) {
+     $31 = $f;
+     $32 = ((($31)) + 16|0);
+     $33 = HEAP32[$32>>2]|0;
+     switch ($33|0) {
+     case 0:  {
+      $34 = $2;
+      $35 = $f;
+      $36 = HEAP32[$35>>2]|0;
+      $37 = (($34) - ($36))|0;
+      $38 = $f;
+      $39 = ((($38)) + 20|0);
+      $40 = HEAP32[$39>>2]|0;
+      $41 = (($40) + ($37<<1)|0);
+      $42 = HEAP16[$41>>1]|0;
+      $43 = $42&65535;
+      $0 = $43;
+      $74 = $0;
+      STACKTOP = sp;return ($74|0);
+      break;
+     }
+     case 1:  {
+      break;
+     }
+     default: {
+      break L1;
+     }
+     }
+     $44 = $f;
+     $45 = ((($44)) + 20|0);
+     $46 = HEAP32[$45>>2]|0;
+     $ret = $46;
+     $47 = $f;
+     $48 = ((($47)) + 12|0);
+     $49 = HEAP32[$48>>2]|0;
+     $count = $49;
+     while(1) {
+      $50 = $count;
+      $51 = ($50>>>0)>(0);
+      if (!($51)) {
+       break;
+      }
+      $52 = $count;
+      $53 = (($52>>>0) / 2)&-1;
+      $step = $53;
+      $54 = $ret;
+      $55 = $step;
+      $56 = (($54) + ($55<<3)|0);
+      $it = $56;
+      $57 = $2;
+      $58 = $it;
+      $59 = HEAP32[$58>>2]|0;
+      $60 = ($57>>>0)<($59>>>0);
+      if ($60) {
+       $67 = $step;
+       $count = $67;
+       continue;
+      } else {
+       $61 = $it;
+       $62 = ((($61)) + 8|0);
+       $ret = $62;
+       $63 = $step;
+       $64 = (($63) + 1)|0;
+       $65 = $count;
+       $66 = (($65) - ($64))|0;
+       $count = $66;
+       continue;
+      }
+     }
+     $68 = $ret;
+     $69 = ((($68)) + -8|0);
+     $ret = $69;
+     $70 = $ret;
+     $71 = ((($70)) + 4|0);
+     $72 = HEAP16[$71>>1]|0;
+     $73 = $72&65535;
+     $0 = $73;
+     $74 = $0;
+     STACKTOP = sp;return ($74|0);
+    }
+   }
+  }
+ } while(0);
+ $0 = -1;
+ $74 = $0;
+ STACKTOP = sp;return ($74|0);
+}
+function _mrb_debug_info_alloc($mrb,$irep) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $ret = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $0;
+ $3 = (_mrb_malloc($2,12)|0);
+ $ret = $3;
+ $4 = $ret;
+ ;HEAP32[$4>>2]=HEAP32[74568>>2]|0;HEAP32[$4+4>>2]=HEAP32[74568+4>>2]|0;HEAP32[$4+8>>2]=HEAP32[74568+8>>2]|0;
+ $5 = $ret;
+ $6 = $1;
+ $7 = ((($6)) + 36|0);
+ HEAP32[$7>>2] = $5;
+ $8 = $ret;
+ STACKTOP = sp;return ($8|0);
+}
+function _mrb_debug_info_append_file($mrb,$irep,$start_pos,$end_pos) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ $start_pos = $start_pos|0;
+ $end_pos = $end_pos|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
+ var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
+ var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
+ var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0;
+ var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0;
+ var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0;
+ var $98 = 0, $99 = 0, $file_pc_count = 0, $fn_len = 0, $i = 0, $info = 0, $len = 0, $m = 0, $prev_line = 0, $ret = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $len = sp + 12|0;
+ $m = sp;
+ $1 = $mrb;
+ $2 = $irep;
+ $3 = $start_pos;
+ $4 = $end_pos;
+ $5 = $2;
+ $6 = ((($5)) + 36|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ($7|0)!=(0|0);
+ if (!($8)) {
+  $0 = 0;
+  $201 = $0;
+  STACKTOP = sp;return ($201|0);
+ }
+ $9 = $2;
+ $10 = ((($9)) + 36|0);
+ $11 = HEAP32[$10>>2]|0;
+ $info = $11;
+ $12 = $info;
+ $13 = ((($12)) + 4|0);
+ $14 = HEAP16[$13>>1]|0;
+ $15 = $14&65535;
+ $16 = ($15|0)>(0);
+ if ($16) {
+  $17 = $2;
+  $18 = ((($17)) + 28|0);
+  $19 = HEAP32[$18>>2]|0;
+  $20 = $info;
+  $21 = ((($20)) + 4|0);
+  $22 = HEAP16[$21>>1]|0;
+  $23 = $22&65535;
+  $24 = (($23) - 1)|0;
+  $25 = $info;
+  $26 = ((($25)) + 8|0);
+  $27 = HEAP32[$26>>2]|0;
+  $28 = (($27) + ($24<<2)|0);
+  $29 = HEAP32[$28>>2]|0;
+  $30 = ((($29)) + 4|0);
+  $31 = HEAP32[$30>>2]|0;
+  $32 = (_strcmp($19,$31)|0);
+  $33 = ($32|0)==(0);
+  if ($33) {
+   $0 = 0;
+   $201 = $0;
+   STACKTOP = sp;return ($201|0);
+  }
+ }
+ $34 = $1;
+ $35 = (_mrb_malloc($34,24)|0);
+ $ret = $35;
+ $36 = $info;
+ $37 = ((($36)) + 8|0);
+ $38 = HEAP32[$37>>2]|0;
+ $39 = ($38|0)!=(0|0);
+ $40 = $1;
+ if ($39) {
+  $41 = $info;
+  $42 = ((($41)) + 8|0);
+  $43 = HEAP32[$42>>2]|0;
+  $44 = $info;
+  $45 = ((($44)) + 4|0);
+  $46 = HEAP16[$45>>1]|0;
+  $47 = $46&65535;
+  $48 = (($47) + 1)|0;
+  $49 = $48<<2;
+  $50 = (_mrb_realloc($40,$43,$49)|0);
+  $54 = $50;
+ } else {
+  $51 = (_mrb_malloc($40,4)|0);
+  $54 = $51;
+ }
+ $52 = $info;
+ $53 = ((($52)) + 8|0);
+ HEAP32[$53>>2] = $54;
+ $55 = $ret;
+ $56 = $info;
+ $57 = ((($56)) + 4|0);
+ $58 = HEAP16[$57>>1]|0;
+ $59 = (($58) + 1)<<16>>16;
+ HEAP16[$57>>1] = $59;
+ $60 = $58&65535;
+ $61 = $info;
+ $62 = ((($61)) + 8|0);
+ $63 = HEAP32[$62>>2]|0;
+ $64 = (($63) + ($60<<2)|0);
+ HEAP32[$64>>2] = $55;
+ $65 = $4;
+ $66 = $3;
+ $67 = (($65) - ($66))|0;
+ $file_pc_count = $67;
+ $68 = $3;
+ $69 = $ret;
+ HEAP32[$69>>2] = $68;
+ $70 = $4;
+ $71 = $info;
+ HEAP32[$71>>2] = $70;
+ $72 = $2;
+ $73 = ((($72)) + 28|0);
+ $74 = HEAP32[$73>>2]|0;
+ $75 = (_strlen($74)|0);
+ $fn_len = $75;
+ $76 = $1;
+ $77 = $2;
+ $78 = ((($77)) + 28|0);
+ $79 = HEAP32[$78>>2]|0;
+ $80 = $fn_len;
+ $81 = (_mrb_intern($76,$79,$80)|0);
+ $82 = $ret;
+ $83 = ((($82)) + 8|0);
+ HEAP32[$83>>2] = $81;
+ HEAP32[$len>>2] = 0;
+ $84 = $1;
+ $85 = $ret;
+ $86 = ((($85)) + 8|0);
+ $87 = HEAP32[$86>>2]|0;
+ $88 = (_mrb_sym2name_len($84,$87,$len)|0);
+ $89 = $ret;
+ $90 = ((($89)) + 4|0);
+ HEAP32[$90>>2] = $88;
+ $91 = $2;
+ $92 = ((($91)) + 32|0);
+ $93 = HEAP32[$92>>2]|0;
+ $94 = $3;
+ $95 = (($93) + ($94<<1)|0);
+ $96 = $4;
+ $97 = $3;
+ $98 = (($96) - ($97))|0;
+ $99 = (_select_line_type($95,$98)|0);
+ $100 = $ret;
+ $101 = ((($100)) + 16|0);
+ HEAP32[$101>>2] = $99;
+ $102 = $ret;
+ $103 = ((($102)) + 20|0);
+ HEAP32[$103>>2] = 0;
+ $104 = $ret;
+ $105 = ((($104)) + 16|0);
+ $106 = HEAP32[$105>>2]|0;
+ L14: do {
+  switch ($106|0) {
+  case 0:  {
+   $107 = $file_pc_count;
+   $108 = $ret;
+   $109 = ((($108)) + 12|0);
+   HEAP32[$109>>2] = $107;
+   $110 = $1;
+   $111 = $file_pc_count;
+   $112 = $111<<1;
+   $113 = (_mrb_malloc($110,$112)|0);
+   $114 = $ret;
+   $115 = ((($114)) + 20|0);
+   HEAP32[$115>>2] = $113;
+   $i = 0;
+   while(1) {
+    $116 = $i;
+    $117 = $file_pc_count;
+    $118 = ($116>>>0)<($117>>>0);
+    if (!($118)) {
+     break L14;
+    }
+    $119 = $3;
+    $120 = $i;
+    $121 = (($119) + ($120))|0;
+    $122 = $2;
+    $123 = ((($122)) + 32|0);
+    $124 = HEAP32[$123>>2]|0;
+    $125 = (($124) + ($121<<1)|0);
+    $126 = HEAP16[$125>>1]|0;
+    $127 = $i;
+    $128 = $ret;
+    $129 = ((($128)) + 20|0);
+    $130 = HEAP32[$129>>2]|0;
+    $131 = (($130) + ($127<<1)|0);
+    HEAP16[$131>>1] = $126;
+    $132 = $i;
+    $133 = (($132) + 1)|0;
+    $i = $133;
+   }
+   break;
+  }
+  case 1:  {
+   $prev_line = 0;
+   $134 = $1;
+   $135 = (_mrb_malloc($134,8)|0);
+   $136 = $ret;
+   $137 = ((($136)) + 20|0);
+   HEAP32[$137>>2] = $135;
+   $138 = $ret;
+   $139 = ((($138)) + 12|0);
+   HEAP32[$139>>2] = 0;
+   $i = 0;
+   while(1) {
+    $140 = $i;
+    $141 = $file_pc_count;
+    $142 = ($140>>>0)<($141>>>0);
+    if (!($142)) {
+     break L14;
+    }
+    $143 = $3;
+    $144 = $i;
+    $145 = (($143) + ($144))|0;
+    $146 = $2;
+    $147 = ((($146)) + 32|0);
+    $148 = HEAP32[$147>>2]|0;
+    $149 = (($148) + ($145<<1)|0);
+    $150 = HEAP16[$149>>1]|0;
+    $151 = $150&65535;
+    $152 = $prev_line;
+    $153 = $152&65535;
+    $154 = ($151|0)==($153|0);
+    if (!($154)) {
+     $155 = $1;
+     $156 = $ret;
+     $157 = ((($156)) + 20|0);
+     $158 = HEAP32[$157>>2]|0;
+     $159 = $ret;
+     $160 = ((($159)) + 12|0);
+     $161 = HEAP32[$160>>2]|0;
+     $162 = (($161) + 1)|0;
+     $163 = $162<<3;
+     $164 = (_mrb_realloc($155,$158,$163)|0);
+     $165 = $ret;
+     $166 = ((($165)) + 20|0);
+     HEAP32[$166>>2] = $164;
+     $167 = $3;
+     $168 = $i;
+     $169 = (($167) + ($168))|0;
+     HEAP32[$m>>2] = $169;
+     $170 = $3;
+     $171 = $i;
+     $172 = (($170) + ($171))|0;
+     $173 = $2;
+     $174 = ((($173)) + 32|0);
+     $175 = HEAP32[$174>>2]|0;
+     $176 = (($175) + ($172<<1)|0);
+     $177 = HEAP16[$176>>1]|0;
+     $178 = ((($m)) + 4|0);
+     HEAP16[$178>>1] = $177;
+     $179 = $ret;
+     $180 = ((($179)) + 12|0);
+     $181 = HEAP32[$180>>2]|0;
+     $182 = $ret;
+     $183 = ((($182)) + 20|0);
+     $184 = HEAP32[$183>>2]|0;
+     $185 = (($184) + ($181<<3)|0);
+     ;HEAP32[$185>>2]=HEAP32[$m>>2]|0;HEAP32[$185+4>>2]=HEAP32[$m+4>>2]|0;
+     $186 = $ret;
+     $187 = ((($186)) + 12|0);
+     $188 = HEAP32[$187>>2]|0;
+     $189 = (($188) + 1)|0;
+     HEAP32[$187>>2] = $189;
+     $190 = $3;
+     $191 = $i;
+     $192 = (($190) + ($191))|0;
+     $193 = $2;
+     $194 = ((($193)) + 32|0);
+     $195 = HEAP32[$194>>2]|0;
+     $196 = (($195) + ($192<<1)|0);
+     $197 = HEAP16[$196>>1]|0;
+     $prev_line = $197;
+    }
+    $198 = $i;
+    $199 = (($198) + 1)|0;
+    $i = $199;
+   }
+   break;
+  }
+  default: {
+  }
+  }
+ } while(0);
+ $200 = $ret;
+ $0 = $200;
+ $201 = $0;
+ STACKTOP = sp;return ($201|0);
+}
+function _select_line_type($lines,$lines_len) {
+ $lines = $lines|0;
+ $lines_len = $lines_len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $i = 0, $line_count = 0, $prev_line = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $lines;
+ $1 = $lines_len;
+ $line_count = 0;
+ $prev_line = -1;
+ $i = 0;
+ while(1) {
+  $2 = $i;
+  $3 = $1;
+  $4 = ($2>>>0)<($3>>>0);
+  if (!($4)) {
+   break;
+  }
+  $5 = $i;
+  $6 = $0;
+  $7 = (($6) + ($5<<1)|0);
+  $8 = HEAP16[$7>>1]|0;
+  $9 = $8&65535;
+  $10 = $prev_line;
+  $11 = ($9|0)!=($10|0);
+  if ($11) {
+   $12 = $line_count;
+   $13 = (($12) + 1)|0;
+   $line_count = $13;
+  }
+  $14 = $i;
+  $15 = (($14) + 1)|0;
+  $i = $15;
+ }
+ $16 = $1;
+ $17 = $16<<1;
+ $18 = $line_count;
+ $19 = $18<<3;
+ $20 = ($17>>>0)<=($19>>>0);
+ $21 = $20 ? 0 : 1;
+ STACKTOP = sp;return ($21|0);
+}
+function _mrb_debug_info_free($mrb,$d) {
+ $mrb = $mrb|0;
+ $d = $d|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $d;
+ $2 = $1;
+ $3 = ($2|0)!=(0|0);
+ if (!($3)) {
+  STACKTOP = sp;return;
+ }
+ $i = 0;
+ while(1) {
+  $4 = $i;
+  $5 = $1;
+  $6 = ((($5)) + 4|0);
+  $7 = HEAP16[$6>>1]|0;
+  $8 = $7&65535;
+  $9 = ($4>>>0)<($8>>>0);
+  $10 = $0;
+  if (!($9)) {
+   break;
+  }
+  $11 = $i;
+  $12 = $1;
+  $13 = ((($12)) + 8|0);
+  $14 = HEAP32[$13>>2]|0;
+  $15 = (($14) + ($11<<2)|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = ((($16)) + 20|0);
+  $18 = HEAP32[$17>>2]|0;
+  _mrb_free($10,$18);
+  $19 = $0;
+  $20 = $i;
+  $21 = $1;
+  $22 = ((($21)) + 8|0);
+  $23 = HEAP32[$22>>2]|0;
+  $24 = (($23) + ($20<<2)|0);
+  $25 = HEAP32[$24>>2]|0;
+  _mrb_free($19,$25);
+  $26 = $i;
+  $27 = (($26) + 1)|0;
+  $i = $27;
+ }
+ $28 = $1;
+ $29 = ((($28)) + 8|0);
+ $30 = HEAP32[$29>>2]|0;
+ _mrb_free($10,$30);
+ $31 = $0;
+ $32 = $1;
+ _mrb_free($31,$32);
+ STACKTOP = sp;return;
+}
+function _mrb_exc_new($agg$result,$mrb,$c,$ptr,$len) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $ptr = $ptr|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $arg = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $arg = sp;
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $ptr;
+ $3 = $len;
+ $4 = $0;
+ $5 = $2;
+ $6 = $3;
+ _mrb_str_new($arg,$4,$5,$6);
+ $7 = $0;
+ $8 = $1;
+ _mrb_obj_new($agg$result,$7,$8,1,$arg);
+ STACKTOP = sp;return;
+}
+function _mrb_exc_new_str($agg$result,$mrb,$c,$str) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $str = $str|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $str$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy = sp + 16|0;
+ $2 = sp;
+ $0 = $mrb;
+ $1 = $c;
+ $3 = $0;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_to_str($2,$3,$str$byval_copy);
+ ;HEAP32[$str>>2]=HEAP32[$2>>2]|0;HEAP32[$str+4>>2]=HEAP32[$2+4>>2]|0;
+ $4 = $0;
+ $5 = $1;
+ _mrb_obj_new($agg$result,$4,$5,1,$str);
+ STACKTOP = sp;return;
+}
+function _mrb_exc_raise($mrb,$exc) {
+ $mrb = $mrb|0;
+ $exc = $exc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exc$byval_copy = 0, $or$cond = 0, $or$cond3 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $exc$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = HEAP32[$exc>>2]|0;
+ $2 = $0;
+ $3 = ((($2)) + 20|0);
+ HEAP32[$3>>2] = $1;
+ $4 = $0;
+ $5 = ((($4)) + 92|0);
+ $6 = ((($5)) + 452|0);
+ $7 = HEAP8[$6>>0]|0;
+ $8 = ($7&255) >>> 3;
+ $9 = $8 & 1;
+ $10 = ($9<<24>>24)!=(0);
+ $11 = HEAP32[18645]|0;
+ $12 = ($11|0)!=(0);
+ $or$cond = $10 | $12;
+ if (!($or$cond)) {
+  HEAP32[18645] = 1;
+  $13 = $0;
+  $14 = $0;
+  $15 = ((($14)) + 20|0);
+  $16 = HEAP32[$15>>2]|0;
+  _exc_debug_info($13,$16);
+ }
+ $17 = $0;
+ $18 = HEAP32[$17>>2]|0;
+ $19 = ($18|0)!=(0|0);
+ $20 = $0;
+ if ($19) {
+  $30 = HEAP32[$20>>2]|0;
+  _longjmp(($30|0),1);
+  // unreachable;
+ }
+ $21 = ((($20)) + 92|0);
+ $22 = ((($21)) + 452|0);
+ $23 = HEAP8[$22>>0]|0;
+ $24 = ($23&255) >>> 3;
+ $25 = $24 & 1;
+ $26 = ($25<<24>>24)!=(0);
+ $27 = HEAP32[18645]|0;
+ $28 = ($27|0)!=(0);
+ $or$cond3 = $26 | $28;
+ if ($or$cond3) {
+  _abort();
+  // unreachable;
+ }
+ HEAP32[18645] = 1;
+ $29 = $0;
+ ;HEAP32[$exc$byval_copy>>2]=HEAP32[$exc>>2]|0;HEAP32[$exc$byval_copy+4>>2]=HEAP32[$exc+4>>2]|0;
+ _mrb_p($29,$exc$byval_copy);
+ _abort();
+ // unreachable;
+}
+function _exc_debug_info($mrb,$exc) {
+ $mrb = $mrb|0;
+ $exc = $exc|0;
+ var $$byval_copy = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0;
+ var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0;
+ var $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0;
+ var $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0;
+ var $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0;
+ var $96 = 0, $97 = 0, $98 = 0, $99 = 0, $ci = 0, $err = 0, $file = 0, $irep = 0, $line = 0, $or$cond = 0, $or$cond3 = 0, $pc = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy5 = sp + 72|0;
+ $$byval_copy4 = sp + 64|0;
+ $$byval_copy = sp + 56|0;
+ $2 = sp + 32|0;
+ $3 = sp + 8|0;
+ $4 = sp;
+ $0 = $mrb;
+ $1 = $exc;
+ $5 = $0;
+ $6 = ((($5)) + 12|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ((($7)) + 16|0);
+ $9 = HEAP32[$8>>2]|0;
+ $ci = $9;
+ $10 = $ci;
+ $11 = ((($10)) + 28|0);
+ $12 = HEAP32[$11>>2]|0;
+ $pc = $12;
+ $13 = $0;
+ $14 = $1;
+ $15 = $0;
+ $16 = (_mrb_intern_static($15,67505,5)|0);
+ $17 = $ci;
+ $18 = $0;
+ $19 = ((($18)) + 12|0);
+ $20 = HEAP32[$19>>2]|0;
+ $21 = ((($20)) + 20|0);
+ $22 = HEAP32[$21>>2]|0;
+ $23 = $17;
+ $24 = $22;
+ $25 = (($23) - ($24))|0;
+ $26 = (($25|0) / 48)&-1;
+ _mrb_fixnum_value_931($2,$26);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+ _mrb_obj_iv_set($13,$14,$16,$$byval_copy);
+ while(1) {
+  $27 = $ci;
+  $28 = $0;
+  $29 = ((($28)) + 12|0);
+  $30 = HEAP32[$29>>2]|0;
+  $31 = ((($30)) + 20|0);
+  $32 = HEAP32[$31>>2]|0;
+  $33 = ($27>>>0)>=($32>>>0);
+  if (!($33)) {
+   label = 11;
+   break;
+  }
+  $34 = $ci;
+  $35 = ((($34)) + 32|0);
+  $36 = HEAP32[$35>>2]|0;
+  $err = $36;
+  $37 = $err;
+  $38 = ($37|0)==(0|0);
+  $39 = $pc;
+  $40 = ($39|0)!=(0|0);
+  $or$cond = $38 & $40;
+  if ($or$cond) {
+   $41 = $pc;
+   $42 = ((($41)) + -4|0);
+   $err = $42;
+  }
+  $43 = $err;
+  $44 = ($43|0)!=(0|0);
+  if ($44) {
+   $45 = $ci;
+   $46 = ((($45)) + 4|0);
+   $47 = HEAP32[$46>>2]|0;
+   $48 = ($47|0)!=(0|0);
+   if ($48) {
+    $49 = $ci;
+    $50 = ((($49)) + 4|0);
+    $51 = HEAP32[$50>>2]|0;
+    $52 = HEAP32[$51>>2]|0;
+    $53 = $52 >>> 11;
+    $54 = $53 & 128;
+    $55 = ($54|0)!=(0);
+    if (!($55)) {
+     $56 = $ci;
+     $57 = ((($56)) + 4|0);
+     $58 = HEAP32[$57>>2]|0;
+     $59 = ((($58)) + 12|0);
+     $60 = HEAP32[$59>>2]|0;
+     $irep = $60;
+     $61 = $irep;
+     $62 = $err;
+     $63 = $irep;
+     $64 = ((($63)) + 8|0);
+     $65 = HEAP32[$64>>2]|0;
+     $66 = $62;
+     $67 = $65;
+     $68 = (($66) - ($67))|0;
+     $69 = (($68|0) / 4)&-1;
+     $70 = (_mrb_debug_get_line($61,$69)|0);
+     $line = $70;
+     $71 = $irep;
+     $72 = $err;
+     $73 = $irep;
+     $74 = ((($73)) + 8|0);
+     $75 = HEAP32[$74>>2]|0;
+     $76 = $72;
+     $77 = $75;
+     $78 = (($76) - ($77))|0;
+     $79 = (($78|0) / 4)&-1;
+     $80 = (_mrb_debug_get_filename($71,$79)|0);
+     $file = $80;
+     $81 = $line;
+     $82 = ($81|0)!=(-1);
+     $83 = $file;
+     $84 = ($83|0)!=(0|0);
+     $or$cond3 = $82 & $84;
+     if ($or$cond3) {
+      break;
+     }
+    }
+   }
+  }
+  $96 = $ci;
+  $97 = ((($96)) + 28|0);
+  $98 = HEAP32[$97>>2]|0;
+  $pc = $98;
+  $99 = $ci;
+  $100 = ((($99)) + -48|0);
+  $ci = $100;
+ }
+ if ((label|0) == 11) {
+  STACKTOP = sp;return;
+ }
+ $85 = $0;
+ $86 = $1;
+ $87 = $0;
+ $88 = (_mrb_intern_static($87,67511,4)|0);
+ $89 = $0;
+ $90 = $file;
+ _mrb_str_new_cstr($3,$89,$90);
+ ;HEAP32[$$byval_copy4>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$3+4>>2]|0;
+ _mrb_obj_iv_set($85,$86,$88,$$byval_copy4);
+ $91 = $0;
+ $92 = $1;
+ $93 = $0;
+ $94 = (_mrb_intern_static($93,67516,4)|0);
+ $95 = $line;
+ _mrb_fixnum_value_931($4,$95);
+ ;HEAP32[$$byval_copy5>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$4+4>>2]|0;
+ _mrb_obj_iv_set($91,$92,$94,$$byval_copy5);
+ STACKTOP = sp;return;
+}
+function _mrb_fixnum_value_931($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 3;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_raise($mrb,$c,$msg) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $msg = $msg|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $mesg = 0, $mesg$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 48|0;
+ $mesg$byval_copy = sp + 40|0;
+ $mesg = sp + 16|0;
+ $3 = sp + 8|0;
+ $4 = sp;
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $msg;
+ $5 = $0;
+ $6 = $2;
+ _mrb_str_new_cstr($3,$5,$6);
+ ;HEAP32[$mesg>>2]=HEAP32[$3>>2]|0;HEAP32[$mesg+4>>2]=HEAP32[$3+4>>2]|0;
+ $7 = $0;
+ $8 = $0;
+ $9 = $1;
+ ;HEAP32[$mesg$byval_copy>>2]=HEAP32[$mesg>>2]|0;HEAP32[$mesg$byval_copy+4>>2]=HEAP32[$mesg+4>>2]|0;
+ _mrb_exc_new_str($4,$8,$9,$mesg$byval_copy);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$4+4>>2]|0;
+ _mrb_exc_raise($7,$$byval_copy);
+ // unreachable;
+}
+function _mrb_vformat($agg$result,$mrb,$format,$ap) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $format = $format|0;
+ $ap = $ap|0;
+ var $$byval_copy = 0, $$byval_copy11 = 0, $$byval_copy13 = 0, $$byval_copy15 = 0, $$byval_copy7 = 0, $$byval_copy9 = 0, $$field$field = 0.0, $$field2 = 0, $$index1 = 0, $$index5 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0;
+ var $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0;
+ var $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0;
+ var $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0;
+ var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $9 = 0, $arglist_current = 0, $arglist_next = 0, $ary = 0, $ary$byval_copy = 0, $ary$byval_copy10 = 0, $ary$byval_copy12 = 0, $ary$byval_copy14 = 0, $ary$byval_copy6 = 0;
+ var $ary$byval_copy8 = 0, $b = 0, $c = 0, $expanded = 0, $expanded16 = 0, $expanded18 = 0, $expanded19 = 0, $expanded20 = 0, $p = 0, $size = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 192|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy15 = sp + 168|0;
+ $ary$byval_copy14 = sp + 160|0;
+ $$byval_copy13 = sp + 152|0;
+ $ary$byval_copy12 = sp + 144|0;
+ $$byval_copy11 = sp + 136|0;
+ $ary$byval_copy10 = sp + 128|0;
+ $$byval_copy9 = sp + 120|0;
+ $ary$byval_copy8 = sp + 112|0;
+ $$byval_copy7 = sp + 104|0;
+ $ary$byval_copy6 = sp + 96|0;
+ $$byval_copy = sp + 88|0;
+ $ary$byval_copy = sp + 80|0;
+ $ary = sp + 48|0;
+ $3 = sp + 40|0;
+ $4 = sp + 32|0;
+ $5 = sp + 24|0;
+ $6 = sp + 16|0;
+ $7 = sp + 8|0;
+ $8 = sp;
+ $0 = $mrb;
+ $1 = $format;
+ $2 = $ap;
+ $9 = $1;
+ $p = $9;
+ $10 = $p;
+ $b = $10;
+ $11 = $0;
+ _mrb_ary_new_capa($ary,$11,4);
+ while(1) {
+  $12 = $p;
+  $13 = HEAP8[$12>>0]|0;
+  $14 = ($13<<24>>24)!=(0);
+  if (!($14)) {
+   break;
+  }
+  $15 = $p;
+  $16 = ((($15)) + 1|0);
+  $p = $16;
+  $17 = HEAP8[$15>>0]|0;
+  $c = $17;
+  $18 = $c;
+  $19 = $18 << 24 >> 24;
+  $20 = ($19|0)==(37);
+  if ($20) {
+   $21 = $p;
+   $22 = HEAP8[$21>>0]|0;
+   $23 = $22 << 24 >> 24;
+   $24 = ($23|0)==(83);
+   if (!($24)) {
+    continue;
+   }
+   $25 = $p;
+   $26 = $b;
+   $27 = $25;
+   $28 = $26;
+   $29 = (($27) - ($28))|0;
+   $30 = (($29) - 1)|0;
+   $size = $30;
+   $31 = $0;
+   $32 = $0;
+   $33 = $b;
+   $34 = $size;
+   _mrb_str_new($3,$32,$33,$34);
+   ;HEAP32[$ary$byval_copy>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy+4>>2]=HEAP32[$ary+4>>2]|0;
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
+   _mrb_ary_push($31,$ary$byval_copy,$$byval_copy);
+   $35 = $0;
+   $36 = $2;
+   $arglist_current = HEAP32[$36>>2]|0;
+   $37 = $arglist_current;
+   $38 = ((0) + 4|0);
+   $expanded16 = $38;
+   $expanded = (($expanded16) - 1)|0;
+   $39 = (($37) + ($expanded))|0;
+   $40 = ((0) + 4|0);
+   $expanded20 = $40;
+   $expanded19 = (($expanded20) - 1)|0;
+   $expanded18 = $expanded19 ^ -1;
+   $41 = $39 & $expanded18;
+   $42 = $41;
+   $$field$field = +HEAPF32[$42>>2];
+   $$index1 = ((($42)) + 4|0);
+   $$field2 = HEAP32[$$index1>>2]|0;
+   $arglist_next = ((($42)) + 8|0);
+   HEAP32[$36>>2] = $arglist_next;
+   HEAPF32[$4>>2] = $$field$field;
+   $$index5 = ((($4)) + 4|0);
+   HEAP32[$$index5>>2] = $$field2;
+   ;HEAP32[$ary$byval_copy6>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy6+4>>2]=HEAP32[$ary+4>>2]|0;
+   ;HEAP32[$$byval_copy7>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy7+4>>2]=HEAP32[$4+4>>2]|0;
+   _mrb_ary_push($35,$ary$byval_copy6,$$byval_copy7);
+   $43 = $p;
+   $44 = ((($43)) + 1|0);
+   $b = $44;
+   continue;
+  }
+  $45 = $c;
+  $46 = $45 << 24 >> 24;
+  $47 = ($46|0)==(92);
+  if (!($47)) {
+   continue;
+  }
+  $48 = $p;
+  $49 = HEAP8[$48>>0]|0;
+  $50 = ($49<<24>>24)!=(0);
+  if (!($50)) {
+   break;
+  }
+  $51 = $p;
+  $52 = $b;
+  $53 = $51;
+  $54 = $52;
+  $55 = (($53) - ($54))|0;
+  $56 = (($55) - 1)|0;
+  $size = $56;
+  $57 = $0;
+  $58 = $0;
+  $59 = $b;
+  $60 = $size;
+  _mrb_str_new($5,$58,$59,$60);
+  ;HEAP32[$ary$byval_copy8>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy8+4>>2]=HEAP32[$ary+4>>2]|0;
+  ;HEAP32[$$byval_copy9>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy9+4>>2]=HEAP32[$5+4>>2]|0;
+  _mrb_ary_push($57,$ary$byval_copy8,$$byval_copy9);
+  $61 = $0;
+  $62 = $0;
+  $63 = $p;
+  _mrb_str_new($6,$62,$63,1);
+  ;HEAP32[$ary$byval_copy10>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy10+4>>2]=HEAP32[$ary+4>>2]|0;
+  ;HEAP32[$$byval_copy11>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy11+4>>2]=HEAP32[$6+4>>2]|0;
+  _mrb_ary_push($61,$ary$byval_copy10,$$byval_copy11);
+  $64 = $p;
+  $65 = ((($64)) + 1|0);
+  $p = $65;
+  $b = $65;
+ }
+ $66 = $b;
+ $67 = $1;
+ $68 = ($66|0)==($67|0);
+ if ($68) {
+  $69 = $0;
+  $70 = $1;
+  _mrb_str_new_cstr($agg$result,$69,$70);
+  STACKTOP = sp;return;
+ } else {
+  $71 = $p;
+  $72 = $b;
+  $73 = $71;
+  $74 = $72;
+  $75 = (($73) - ($74))|0;
+  $size = $75;
+  $76 = $0;
+  $77 = $0;
+  $78 = $b;
+  $79 = $size;
+  _mrb_str_new($7,$77,$78,$79);
+  ;HEAP32[$ary$byval_copy12>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy12+4>>2]=HEAP32[$ary+4>>2]|0;
+  ;HEAP32[$$byval_copy13>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy13+4>>2]=HEAP32[$7+4>>2]|0;
+  _mrb_ary_push($76,$ary$byval_copy12,$$byval_copy13);
+  $80 = $0;
+  $81 = $0;
+  _mrb_str_new($8,$81,0,0);
+  ;HEAP32[$ary$byval_copy14>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy14+4>>2]=HEAP32[$ary+4>>2]|0;
+  ;HEAP32[$$byval_copy15>>2]=HEAP32[$8>>2]|0;HEAP32[$$byval_copy15+4>>2]=HEAP32[$8+4>>2]|0;
+  _mrb_ary_join($agg$result,$80,$ary$byval_copy14,$$byval_copy15);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_format($agg$result,$mrb,$format,$varargs) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $format = $format|0;
+ $varargs = $varargs|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $ap = 0, $str = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $ap = sp + 16|0;
+ $str = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $1 = $format;
+ HEAP32[$ap>>2] = $varargs;
+ $3 = $0;
+ $4 = $1;
+ _mrb_vformat($2,$3,$4,$ap);
+ ;HEAP32[$str>>2]=HEAP32[$2>>2]|0;HEAP32[$str+4>>2]=HEAP32[$2+4>>2]|0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_raisef($mrb,$c,$fmt,$varargs) {
+ $mrb = $mrb|0;
+ $c = $c|0;
+ $fmt = $fmt|0;
+ $varargs = $varargs|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $args = 0, $mesg = 0, $mesg$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 64|0;
+ $mesg$byval_copy = sp + 56|0;
+ $args = sp + 24|0;
+ $mesg = sp + 16|0;
+ $3 = sp + 8|0;
+ $4 = sp;
+ $0 = $mrb;
+ $1 = $c;
+ $2 = $fmt;
+ HEAP32[$args>>2] = $varargs;
+ $5 = $0;
+ $6 = $2;
+ _mrb_vformat($3,$5,$6,$args);
+ ;HEAP32[$mesg>>2]=HEAP32[$3>>2]|0;HEAP32[$mesg+4>>2]=HEAP32[$3+4>>2]|0;
+ $7 = $0;
+ $8 = $0;
+ $9 = $1;
+ ;HEAP32[$mesg$byval_copy>>2]=HEAP32[$mesg>>2]|0;HEAP32[$mesg$byval_copy+4>>2]=HEAP32[$mesg+4>>2]|0;
+ _mrb_exc_new_str($4,$8,$9,$mesg$byval_copy);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$4+4>>2]|0;
+ _mrb_exc_raise($7,$$byval_copy);
+ // unreachable;
+}
+function _mrb_name_error($mrb,$id,$fmt,$varargs) {
+ $mrb = $mrb|0;
+ $id = $id|0;
+ $fmt = $fmt|0;
+ $varargs = $varargs|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $args = 0, $argv = 0, $exc = 0, $exc$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $exc$byval_copy = sp + 80|0;
+ $exc = sp + 56|0;
+ $argv = sp + 40|0;
+ $args = sp + 24|0;
+ $3 = sp + 16|0;
+ $4 = sp + 8|0;
+ $5 = sp;
+ $0 = $mrb;
+ $1 = $id;
+ $2 = $fmt;
+ HEAP32[$args>>2] = $varargs;
+ $6 = $0;
+ $7 = $2;
+ _mrb_vformat($3,$6,$7,$args);
+ ;HEAP32[$argv>>2]=HEAP32[$3>>2]|0;HEAP32[$argv+4>>2]=HEAP32[$3+4>>2]|0;
+ $8 = ((($argv)) + 8|0);
+ $9 = $1;
+ _mrb_symbol_value_942($4,$9);
+ ;HEAP32[$8>>2]=HEAP32[$4>>2]|0;HEAP32[$8+4>>2]=HEAP32[$4+4>>2]|0;
+ $10 = $0;
+ $11 = $0;
+ $12 = (_mrb_class_get($11,67521)|0);
+ _mrb_obj_new($5,$10,$12,2,$argv);
+ ;HEAP32[$exc>>2]=HEAP32[$5>>2]|0;HEAP32[$exc+4>>2]=HEAP32[$5+4>>2]|0;
+ $13 = $0;
+ ;HEAP32[$exc$byval_copy>>2]=HEAP32[$exc>>2]|0;HEAP32[$exc$byval_copy+4>>2]=HEAP32[$exc+4>>2]|0;
+ _mrb_exc_raise($13,$exc$byval_copy);
+ // unreachable;
+}
+function _mrb_symbol_value_942($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 4;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_warn($mrb,$fmt,$varargs) {
+ $mrb = $mrb|0;
+ $fmt = $fmt|0;
+ $varargs = $varargs|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ap = 0, $str = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $ap = sp + 16|0;
+ $str = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $1 = $fmt;
+ HEAP32[$ap>>2] = $varargs;
+ $3 = $0;
+ $4 = $1;
+ _mrb_vformat($2,$3,$4,$ap);
+ ;HEAP32[$str>>2]=HEAP32[$2>>2]|0;HEAP32[$str+4>>2]=HEAP32[$2+4>>2]|0;
+ $5 = HEAP32[637]|0;
+ (_fputs(67531,$5)|0);
+ $6 = HEAP32[$str>>2]|0;
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $7 >>> 11;
+ $9 = $8 & 8;
+ $10 = ($9|0)!=(0);
+ $11 = HEAP32[$str>>2]|0;
+ $12 = ((($11)) + 12|0);
+ if ($10) {
+  $28 = $12;
+ } else {
+  $13 = ((($12)) + 8|0);
+  $14 = HEAP32[$13>>2]|0;
+  $28 = $14;
+ }
+ $15 = HEAP32[$str>>2]|0;
+ $16 = HEAP32[$15>>2]|0;
+ $17 = $16 >>> 11;
+ $18 = $17 & 8;
+ $19 = ($18|0)!=(0);
+ $20 = HEAP32[$str>>2]|0;
+ if ($19) {
+  $21 = HEAP32[$20>>2]|0;
+  $22 = $21 >>> 11;
+  $23 = $22 & 496;
+  $24 = $23 >> 4;
+  $29 = $24;
+  $27 = HEAP32[637]|0;
+  (_fwrite($28,$29,1,$27)|0);
+  STACKTOP = sp;return;
+ } else {
+  $25 = ((($20)) + 12|0);
+  $26 = HEAP32[$25>>2]|0;
+  $29 = $26;
+  $27 = HEAP32[637]|0;
+  (_fwrite($28,$29,1,$27)|0);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_bug($mrb,$fmt,$varargs) {
+ $mrb = $mrb|0;
+ $fmt = $fmt|0;
+ $varargs = $varargs|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ap = 0, $str = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $ap = sp + 16|0;
+ $str = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $1 = $fmt;
+ HEAP32[$ap>>2] = $varargs;
+ $3 = $0;
+ $4 = $1;
+ _mrb_vformat($2,$3,$4,$ap);
+ ;HEAP32[$str>>2]=HEAP32[$2>>2]|0;HEAP32[$str+4>>2]=HEAP32[$2+4>>2]|0;
+ $5 = HEAP32[637]|0;
+ (_fputs(67541,$5)|0);
+ $6 = HEAP32[$str>>2]|0;
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $7 >>> 11;
+ $9 = $8 & 8;
+ $10 = ($9|0)!=(0);
+ $11 = HEAP32[$str>>2]|0;
+ $12 = ((($11)) + 12|0);
+ if ($10) {
+  $28 = $12;
+ } else {
+  $13 = ((($12)) + 8|0);
+  $14 = HEAP32[$13>>2]|0;
+  $28 = $14;
+ }
+ $15 = HEAP32[$str>>2]|0;
+ $16 = HEAP32[$15>>2]|0;
+ $17 = $16 >>> 11;
+ $18 = $17 & 8;
+ $19 = ($18|0)!=(0);
+ $20 = HEAP32[$str>>2]|0;
+ if ($19) {
+  $21 = HEAP32[$20>>2]|0;
+  $22 = $21 >>> 11;
+  $23 = $22 & 496;
+  $24 = $23 >> 4;
+  $29 = $24;
+  $27 = HEAP32[637]|0;
+  (_fwrite($28,$29,1,$27)|0);
+  _exit(1);
+  // unreachable;
+ } else {
+  $25 = ((($20)) + 12|0);
+  $26 = HEAP32[$25>>2]|0;
+  $29 = $26;
+  $27 = HEAP32[637]|0;
+  (_fwrite($28,$29,1,$27)|0);
+  _exit(1);
+  // unreachable;
+ }
+}
+function _mrb_make_exception($agg$result,$mrb,$argc,$argv) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $argc = $argc|0;
+ $argv = $argv|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $argc;
+ $2 = $argv;
+ $3 = $0;
+ $4 = $1;
+ $5 = $2;
+ _make_exception($agg$result,$3,$4,$5,1);
+ STACKTOP = sp;return;
+}
+function _make_exception($agg$result,$mrb,$argc,$argv,$isstr) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $argc = $argc|0;
+ $argv = $argv|0;
+ $isstr = $isstr|0;
+ var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy5 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0;
+ var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0;
+ var $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0;
+ var $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $7 = 0, $8 = 0, $9 = 0, $exc = 0, $mesg = 0, $mesg$byval_copy = 0, $mesg$byval_copy3 = 0, $mesg$byval_copy4 = 0, $n = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy5 = sp + 136|0;
+ $mesg$byval_copy4 = sp + 128|0;
+ $mesg$byval_copy3 = sp + 120|0;
+ $$byval_copy2 = sp + 112|0;
+ $$byval_copy1 = sp + 104|0;
+ $mesg$byval_copy = sp + 96|0;
+ $$byval_copy = sp + 88|0;
+ $vararg_buffer = sp;
+ $mesg = sp + 64|0;
+ $4 = sp + 48|0;
+ $5 = sp + 40|0;
+ $6 = sp + 32|0;
+ $7 = sp + 16|0;
+ $8 = sp + 8|0;
+ $0 = $mrb;
+ $1 = $argc;
+ $2 = $argv;
+ $3 = $isstr;
+ _mrb_nil_value_950($4);
+ ;HEAP32[$mesg>>2]=HEAP32[$4>>2]|0;HEAP32[$mesg+4>>2]=HEAP32[$4+4>>2]|0;
+ $9 = $1;
+ L1: do {
+  switch ($9|0) {
+  case 0:  {
+   break;
+  }
+  case 1:  {
+   $10 = $2;
+   $11 = ((($10)) + 4|0);
+   $12 = HEAP32[$11>>2]|0;
+   $13 = ($12|0)==(0);
+   if ($13) {
+    $14 = $2;
+    $15 = HEAP32[$14>>2]|0;
+    $16 = ($15|0)!=(0);
+    if (!($16)) {
+     break L1;
+    }
+   }
+   $17 = $3;
+   $18 = ($17<<24>>24)!=(0);
+   do {
+    if ($18) {
+     $19 = $0;
+     $20 = $2;
+     ;HEAP32[$$byval_copy>>2]=HEAP32[$20>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$20+4>>2]|0;
+     _mrb_check_string_type($5,$19,$$byval_copy);
+     ;HEAP32[$mesg>>2]=HEAP32[$5>>2]|0;HEAP32[$mesg+4>>2]=HEAP32[$5+4>>2]|0;
+     $21 = ((($mesg)) + 4|0);
+     $22 = HEAP32[$21>>2]|0;
+     $23 = ($22|0)==(0);
+     if ($23) {
+      $24 = HEAP32[$mesg>>2]|0;
+      $25 = ($24|0)!=(0);
+      if (!($25)) {
+       break;
+      }
+     }
+     $26 = $0;
+     $27 = $0;
+     $28 = (_mrb_class_get($27,67967)|0);
+     ;HEAP32[$mesg$byval_copy>>2]=HEAP32[$mesg>>2]|0;HEAP32[$mesg$byval_copy+4>>2]=HEAP32[$mesg+4>>2]|0;
+     _mrb_exc_new_str($6,$26,$28,$mesg$byval_copy);
+     ;HEAP32[$mesg>>2]=HEAP32[$6>>2]|0;HEAP32[$mesg+4>>2]=HEAP32[$6+4>>2]|0;
+     break L1;
+    }
+   } while(0);
+   $n = 0;
+   label = 10;
+   break;
+  }
+  case 3: case 2:  {
+   $n = 1;
+   label = 10;
+   break;
+  }
+  default: {
+   $44 = $0;
+   $45 = $0;
+   $46 = (_mrb_class_get($45,68855)|0);
+   $47 = $1;
+   _mrb_fixnum_value_931($8,$47);
+   ;HEAP8[$vararg_buffer>>0]=HEAP8[$8>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$8+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$8+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$8+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$8+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$8+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$8+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$8+7>>0]|0;
+   _mrb_raisef($44,$46,67589,$vararg_buffer);
+   // unreachable;
+  }
+  }
+ } while(0);
+ do {
+  if ((label|0) == 10) {
+   $29 = $0;
+   $30 = (_mrb_intern_static($29,67547,9)|0);
+   $exc = $30;
+   $31 = $0;
+   $32 = $2;
+   $33 = $exc;
+   ;HEAP32[$$byval_copy1>>2]=HEAP32[$32>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$32+4>>2]|0;
+   $34 = (_mrb_respond_to($31,$$byval_copy1,$33)|0);
+   $35 = ($34<<24>>24)!=(0);
+   $36 = $0;
+   if ($35) {
+    $37 = $2;
+    $38 = $exc;
+    $39 = $n;
+    $40 = $2;
+    $41 = ((($40)) + 8|0);
+    ;HEAP32[$$byval_copy2>>2]=HEAP32[$37>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$37+4>>2]|0;
+    _mrb_funcall_argv($7,$36,$$byval_copy2,$38,$39,$41);
+    ;HEAP32[$mesg>>2]=HEAP32[$7>>2]|0;HEAP32[$mesg+4>>2]=HEAP32[$7+4>>2]|0;
+    break;
+   } else {
+    $42 = $0;
+    $43 = (_mrb_class_get($42,68905)|0);
+    _mrb_raise($36,$43,67557);
+    // unreachable;
+   }
+  }
+ } while(0);
+ $48 = $1;
+ $49 = ($48|0)>(0);
+ if (!($49)) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$mesg>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$mesg+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $50 = $0;
+ $51 = $0;
+ $52 = ((($51)) + 568|0);
+ $53 = HEAP32[$52>>2]|0;
+ ;HEAP32[$mesg$byval_copy3>>2]=HEAP32[$mesg>>2]|0;HEAP32[$mesg$byval_copy3+4>>2]=HEAP32[$mesg+4>>2]|0;
+ $54 = (_mrb_obj_is_kind_of($50,$mesg$byval_copy3,$53)|0);
+ $55 = ($54<<24>>24)!=(0);
+ if (!($55)) {
+  $56 = $0;
+  $57 = $0;
+  $58 = (_mrb_class_get($57,68905)|0);
+  _mrb_raise($56,$58,67629);
+  // unreachable;
+ }
+ $59 = $1;
+ $60 = ($59|0)>(2);
+ if (!($60)) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$mesg>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$mesg+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $61 = $0;
+ $62 = $2;
+ $63 = ((($62)) + 16|0);
+ ;HEAP32[$mesg$byval_copy4>>2]=HEAP32[$mesg>>2]|0;HEAP32[$mesg$byval_copy4+4>>2]=HEAP32[$mesg+4>>2]|0;
+ ;HEAP32[$$byval_copy5>>2]=HEAP32[$63>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$63+4>>2]|0;
+ _set_backtrace($61,$mesg$byval_copy4,$$byval_copy5);
+ ;HEAP32[$agg$result>>2]=HEAP32[$mesg>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$mesg+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_nil_value_950($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _set_backtrace($mrb,$info,$bt) {
+ $mrb = $mrb|0;
+ $info = $info|0;
+ $bt = $bt|0;
+ var $0 = 0, $1 = 0, $2 = 0, $info$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $info$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = $0;
+ ;HEAP8[$vararg_buffer>>0]=HEAP8[$bt>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$bt+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$bt+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$bt+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$bt+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$bt+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$bt+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$bt+7>>0]|0;
+ ;HEAP32[$info$byval_copy>>2]=HEAP32[$info>>2]|0;HEAP32[$info$byval_copy+4>>2]=HEAP32[$info+4>>2]|0;
+ _mrb_funcall($1,$2,$info$byval_copy,67655,1,$vararg_buffer);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_value_960($agg$result,$p) {
+ $agg$result = $agg$result|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $p;
+ $1 = $0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 & 255;
+ $4 = ((($v)) + 4|0);
+ HEAP32[$4>>2] = $3;
+ $5 = $0;
+ HEAP32[$v>>2] = $5;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_no_method_error($mrb,$id,$args,$fmt,$varargs) {
+ $mrb = $mrb|0;
+ $id = $id|0;
+ $args = $args|0;
+ $fmt = $fmt|0;
+ $varargs = $varargs|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ap = 0, $exc = 0, $exc$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr1 = 0;
+ var $vararg_ptr2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $exc$byval_copy = sp + 104|0;
+ $$byval_copy = sp + 96|0;
+ $vararg_buffer = sp;
+ $exc = sp + 72|0;
+ $ap = sp + 56|0;
+ $3 = sp + 48|0;
+ $4 = sp + 40|0;
+ $5 = sp + 32|0;
+ $6 = sp + 24|0;
+ $0 = $mrb;
+ $1 = $id;
+ $2 = $fmt;
+ HEAP32[$ap>>2] = $varargs;
+ $7 = $0;
+ $8 = $0;
+ $9 = (_mrb_class_get($8,67669)|0);
+ _mrb_obj_value_960($3,$9);
+ $10 = $0;
+ $11 = $2;
+ _mrb_vformat($4,$10,$11,$ap);
+ $12 = $1;
+ _mrb_symbol_value_942($5,$12);
+ ;HEAP8[$vararg_buffer>>0]=HEAP8[$4>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$4+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$4+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$4+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$4+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$4+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$4+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$4+7>>0]|0;
+ $vararg_ptr1 = ((($vararg_buffer)) + 8|0);
+ ;HEAP8[$vararg_ptr1>>0]=HEAP8[$5>>0]|0;HEAP8[$vararg_ptr1+1>>0]=HEAP8[$5+1>>0]|0;HEAP8[$vararg_ptr1+2>>0]=HEAP8[$5+2>>0]|0;HEAP8[$vararg_ptr1+3>>0]=HEAP8[$5+3>>0]|0;HEAP8[$vararg_ptr1+4>>0]=HEAP8[$5+4>>0]|0;HEAP8[$vararg_ptr1+5>>0]=HEAP8[$5+5>>0]|0;HEAP8[$vararg_ptr1+6>>0]=HEAP8[$5+6>>0]|0;HEAP8[$vararg_ptr1+7>>0]=HEAP8[$5+7>>0]|0;
+ $vararg_ptr2 = ((($vararg_buffer)) + 16|0);
+ ;HEAP8[$vararg_ptr2>>0]=HEAP8[$args>>0]|0;HEAP8[$vararg_ptr2+1>>0]=HEAP8[$args+1>>0]|0;HEAP8[$vararg_ptr2+2>>0]=HEAP8[$args+2>>0]|0;HEAP8[$vararg_ptr2+3>>0]=HEAP8[$args+3>>0]|0;HEAP8[$vararg_ptr2+4>>0]=HEAP8[$args+4>>0]|0;HEAP8[$vararg_ptr2+5>>0]=HEAP8[$args+5>>0]|0;HEAP8[$vararg_ptr2+6>>0]=HEAP8[$args+6>>0]|0;HEAP8[$vararg_ptr2+7>>0]=HEAP8[$args+7>>0]|0;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
+ _mrb_funcall($6,$7,$$byval_copy,67683,3,$vararg_buffer);
+ ;HEAP32[$exc>>2]=HEAP32[$6>>2]|0;HEAP32[$exc+4>>2]=HEAP32[$6+4>>2]|0;
+ $13 = $0;
+ ;HEAP32[$exc$byval_copy>>2]=HEAP32[$exc>>2]|0;HEAP32[$exc$byval_copy+4>>2]=HEAP32[$exc+4>>2]|0;
+ _mrb_exc_raise($13,$exc$byval_copy);
+ // unreachable;
+}
+function _mrb_init_exception($mrb) {
+ $mrb = $mrb|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, $exception = 0, $runtime_error = 0, $script_error = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 32|0;
+ $1 = sp + 8|0;
+ $2 = sp;
+ $0 = $mrb;
+ $3 = $0;
+ $4 = $0;
+ $5 = ((($4)) + 32|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = (_mrb_define_class($3,67687,$6)|0);
+ $exception = $7;
+ $8 = $0;
+ $9 = ((($8)) + 568|0);
+ HEAP32[$9>>2] = $7;
+ $10 = $exception;
+ $11 = HEAP32[$10>>2]|0;
+ $12 = $11 >>> 11;
+ $13 = $12 & -256;
+ $14 = $13 | 18;
+ $15 = $exception;
+ $16 = HEAP32[$15>>2]|0;
+ $17 = $14 & 2097151;
+ $18 = $17 << 11;
+ $19 = $16 & 2047;
+ $20 = $19 | $18;
+ HEAP32[$15>>2] = $20;
+ $21 = $0;
+ $22 = $exception;
+ _mrb_define_class_method($21,$22,67547,238,4096);
+ $23 = $0;
+ $24 = $exception;
+ _mrb_define_method($23,$24,67547,276,4096);
+ $25 = $0;
+ $26 = $exception;
+ _mrb_define_method($25,$26,68953,277,4096);
+ $27 = $0;
+ $28 = $exception;
+ _mrb_define_method($27,$28,68977,278,0);
+ $29 = $0;
+ $30 = $exception;
+ _mrb_define_method($29,$30,67705,279,0);
+ $31 = $0;
+ $32 = $exception;
+ _mrb_define_method($31,$32,68986,280,0);
+ $33 = $0;
+ $34 = $exception;
+ _mrb_define_method($33,$34,67723,281,0);
+ $35 = $0;
+ $36 = $0;
+ $37 = ((($36)) + 568|0);
+ $38 = HEAP32[$37>>2]|0;
+ $39 = (_mrb_define_class($35,69398,$38)|0);
+ $40 = $0;
+ $41 = ((($40)) + 572|0);
+ HEAP32[$41>>2] = $39;
+ $42 = $0;
+ $43 = $0;
+ $44 = ((($43)) + 572|0);
+ $45 = HEAP32[$44>>2]|0;
+ $46 = (_mrb_define_class($42,67967,$45)|0);
+ $runtime_error = $46;
+ $47 = $0;
+ $48 = $runtime_error;
+ $49 = $0;
+ _mrb_str_new_static($1,$49,67733,13);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;
+ _mrb_exc_new_str($2,$47,$48,$$byval_copy);
+ $50 = HEAP32[$2>>2]|0;
+ $51 = $0;
+ $52 = ((($51)) + 576|0);
+ HEAP32[$52>>2] = $50;
+ $53 = $0;
+ $54 = $0;
+ $55 = ((($54)) + 568|0);
+ $56 = HEAP32[$55>>2]|0;
+ $57 = (_mrb_define_class($53,67747,$56)|0);
+ $script_error = $57;
+ $58 = $0;
+ $59 = $script_error;
+ (_mrb_define_class($58,67759,$59)|0);
+ $60 = $0;
+ $61 = $exception;
+ (_mrb_define_class($60,67771,$61)|0);
+ STACKTOP = sp;return;
+}
+function _exc_exception($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a = 0, $a$byval_copy = 0, $a$byval_copy2 = 0, $argc = 0, $exc = 0, $exc$byval_copy = 0, $self$byval_copy = 0;
+ var $self$byval_copy1 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $a$byval_copy2 = sp + 80|0;
+ $exc$byval_copy = sp + 72|0;
+ $self$byval_copy1 = sp + 64|0;
+ $a$byval_copy = sp + 56|0;
+ $self$byval_copy = sp + 48|0;
+ $vararg_buffer = sp;
+ $exc = sp + 32|0;
+ $a = sp + 24|0;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $a;
+ $3 = (_mrb_get_args($2,67697,$vararg_buffer)|0);
+ $argc = $3;
+ $4 = $argc;
+ $5 = ($4|0)==(0);
+ if ($5) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $6 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ ;HEAP32[$a$byval_copy>>2]=HEAP32[$a>>2]|0;HEAP32[$a$byval_copy+4>>2]=HEAP32[$a+4>>2]|0;
+ $7 = (_mrb_obj_equal($6,$self$byval_copy,$a$byval_copy)|0);
+ $8 = ($7<<24>>24)!=(0);
+ if ($8) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+  STACKTOP = sp;return;
+ } else {
+  $9 = $0;
+  ;HEAP32[$self$byval_copy1>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy1+4>>2]=HEAP32[$self+4>>2]|0;
+  _mrb_obj_clone($1,$9,$self$byval_copy1);
+  ;HEAP32[$exc>>2]=HEAP32[$1>>2]|0;HEAP32[$exc+4>>2]=HEAP32[$1+4>>2]|0;
+  $10 = $0;
+  $11 = $0;
+  $12 = (_mrb_intern_static($11,67700,4)|0);
+  ;HEAP32[$exc$byval_copy>>2]=HEAP32[$exc>>2]|0;HEAP32[$exc$byval_copy+4>>2]=HEAP32[$exc+4>>2]|0;
+  ;HEAP32[$a$byval_copy2>>2]=HEAP32[$a>>2]|0;HEAP32[$a$byval_copy2+4>>2]=HEAP32[$a+4>>2]|0;
+  _mrb_iv_set($10,$exc$byval_copy,$12,$a$byval_copy2);
+  ;HEAP32[$agg$result>>2]=HEAP32[$exc>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$exc+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+}
+function _exc_initialize($agg$result,$mrb,$exc) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $exc = $exc|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $exc$byval_copy = 0, $mesg = 0, $mesg$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $mesg$byval_copy = sp + 32|0;
+ $exc$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $mesg = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $mesg;
+ $2 = (_mrb_get_args($1,67697,$vararg_buffer)|0);
+ $3 = ($2|0)==(1);
+ if (!($3)) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$exc>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$exc+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $4 = $0;
+ $5 = $0;
+ $6 = (_mrb_intern_static($5,67700,4)|0);
+ ;HEAP32[$exc$byval_copy>>2]=HEAP32[$exc>>2]|0;HEAP32[$exc$byval_copy+4>>2]=HEAP32[$exc+4>>2]|0;
+ ;HEAP32[$mesg$byval_copy>>2]=HEAP32[$mesg>>2]|0;HEAP32[$mesg$byval_copy+4>>2]=HEAP32[$mesg+4>>2]|0;
+ _mrb_iv_set($4,$exc$byval_copy,$6,$mesg$byval_copy);
+ ;HEAP32[$agg$result>>2]=HEAP32[$exc>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$exc+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _exc_to_s($agg$result,$mrb,$exc) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $exc = $exc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var $exc$byval_copy = 0, $exc$byval_copy1 = 0, $mesg = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $exc$byval_copy1 = sp + 32|0;
+ $exc$byval_copy = sp + 24|0;
+ $mesg = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ $2 = $0;
+ $3 = (_mrb_intern_static($2,67700,4)|0);
+ ;HEAP32[$exc$byval_copy>>2]=HEAP32[$exc>>2]|0;HEAP32[$exc$byval_copy+4>>2]=HEAP32[$exc+4>>2]|0;
+ _mrb_attr_get($mesg,$1,$exc$byval_copy,$3);
+ $4 = ((($mesg)) + 4|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ($5|0)==(16);
+ if (!($6)) {
+  $7 = $0;
+  $8 = $0;
+  ;HEAP32[$exc$byval_copy1>>2]=HEAP32[$exc>>2]|0;HEAP32[$exc$byval_copy1+4>>2]=HEAP32[$exc+4>>2]|0;
+  $9 = (_mrb_obj_classname($8,$exc$byval_copy1)|0);
+  _mrb_str_new_cstr($agg$result,$7,$9);
+  STACKTOP = sp;return;
+ }
+ $10 = HEAP32[$mesg>>2]|0;
+ $p = $10;
+ $11 = $p;
+ $12 = ((($11)) + 4|0);
+ $13 = HEAP32[$12>>2]|0;
+ $14 = ($13|0)!=(0|0);
+ if (!($14)) {
+  $15 = $0;
+  $16 = ((($15)) + 48|0);
+  $17 = HEAP32[$16>>2]|0;
+  $18 = $p;
+  $19 = ((($18)) + 4|0);
+  HEAP32[$19>>2] = $17;
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$mesg>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$mesg+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _exc_message($agg$result,$mrb,$exc) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $exc = $exc|0;
+ var $0 = 0, $1 = 0, $exc$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $exc$byval_copy = sp + 8|0;
+ $vararg_buffer = sp;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$exc$byval_copy>>2]=HEAP32[$exc>>2]|0;HEAP32[$exc$byval_copy+4>>2]=HEAP32[$exc+4>>2]|0;
+ _mrb_funcall($agg$result,$1,$exc$byval_copy,68977,0,$vararg_buffer);
+ STACKTOP = sp;return;
+}
+function _exc_inspect($agg$result,$mrb,$exc) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $exc = $exc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
+ var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $9 = 0, $append_mesg = 0, $cname = 0, $exc$byval_copy = 0, $exc$byval_copy1 = 0, $exc$byval_copy11 = 0, $exc$byval_copy2 = 0, $exc$byval_copy8 = 0, $file = 0, $file$byval_copy = 0, $line = 0, $line$byval_copy = 0, $mesg = 0;
+ var $mesg$byval_copy = 0, $mesg$byval_copy14 = 0, $mesg$byval_copy6 = 0, $str = 0, $str$byval_copy = 0, $str$byval_copy10 = 0, $str$byval_copy12 = 0, $str$byval_copy13 = 0, $str$byval_copy15 = 0, $str$byval_copy3 = 0, $str$byval_copy4 = 0, $str$byval_copy5 = 0, $str$byval_copy7 = 0, $str$byval_copy9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 352|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str$byval_copy15 = sp + 328|0;
+ $mesg$byval_copy14 = sp + 320|0;
+ $str$byval_copy13 = sp + 312|0;
+ $str$byval_copy12 = sp + 304|0;
+ $exc$byval_copy11 = sp + 296|0;
+ $str$byval_copy10 = sp + 288|0;
+ $str$byval_copy9 = sp + 280|0;
+ $exc$byval_copy8 = sp + 272|0;
+ $str$byval_copy7 = sp + 264|0;
+ $mesg$byval_copy6 = sp + 256|0;
+ $str$byval_copy5 = sp + 248|0;
+ $str$byval_copy4 = sp + 240|0;
+ $line$byval_copy = sp + 232|0;
+ $str$byval_copy3 = sp + 224|0;
+ $str$byval_copy = sp + 216|0;
+ $file$byval_copy = sp + 208|0;
+ $mesg$byval_copy = sp + 200|0;
+ $exc$byval_copy2 = sp + 192|0;
+ $exc$byval_copy1 = sp + 184|0;
+ $exc$byval_copy = sp + 176|0;
+ $str = sp + 160|0;
+ $mesg = sp + 152|0;
+ $file = sp + 144|0;
+ $line = sp + 136|0;
+ $1 = sp + 128|0;
+ $2 = sp + 120|0;
+ $3 = sp + 112|0;
+ $4 = sp + 104|0;
+ $5 = sp + 96|0;
+ $6 = sp + 88|0;
+ $7 = sp + 80|0;
+ $8 = sp + 72|0;
+ $9 = sp + 64|0;
+ $10 = sp + 56|0;
+ $11 = sp + 48|0;
+ $12 = sp + 40|0;
+ $13 = sp + 24|0;
+ $14 = sp + 16|0;
+ $15 = sp + 8|0;
+ $16 = sp;
+ $0 = $mrb;
+ $17 = $0;
+ $18 = $0;
+ $19 = (_mrb_intern_static($18,67700,4)|0);
+ ;HEAP32[$exc$byval_copy>>2]=HEAP32[$exc>>2]|0;HEAP32[$exc$byval_copy+4>>2]=HEAP32[$exc+4>>2]|0;
+ _mrb_attr_get($1,$17,$exc$byval_copy,$19);
+ ;HEAP32[$mesg>>2]=HEAP32[$1>>2]|0;HEAP32[$mesg+4>>2]=HEAP32[$1+4>>2]|0;
+ $20 = $0;
+ $21 = $0;
+ $22 = (_mrb_intern_static($21,67511,4)|0);
+ ;HEAP32[$exc$byval_copy1>>2]=HEAP32[$exc>>2]|0;HEAP32[$exc$byval_copy1+4>>2]=HEAP32[$exc+4>>2]|0;
+ _mrb_attr_get($2,$20,$exc$byval_copy1,$22);
+ ;HEAP32[$file>>2]=HEAP32[$2>>2]|0;HEAP32[$file+4>>2]=HEAP32[$2+4>>2]|0;
+ $23 = $0;
+ $24 = $0;
+ $25 = (_mrb_intern_static($24,67516,4)|0);
+ ;HEAP32[$exc$byval_copy2>>2]=HEAP32[$exc>>2]|0;HEAP32[$exc$byval_copy2+4>>2]=HEAP32[$exc+4>>2]|0;
+ _mrb_attr_get($3,$23,$exc$byval_copy2,$25);
+ ;HEAP32[$line>>2]=HEAP32[$3>>2]|0;HEAP32[$line+4>>2]=HEAP32[$3+4>>2]|0;
+ $26 = ((($mesg)) + 4|0);
+ $27 = HEAP32[$26>>2]|0;
+ $28 = ($27|0)==(0);
+ if ($28) {
+  $29 = HEAP32[$mesg>>2]|0;
+  $30 = ($29|0)!=(0);
+  $31 = $30 ^ 1;
+  $33 = $31;
+ } else {
+  $33 = 0;
+ }
+ $32 = $33 ^ 1;
+ $34 = $32&1;
+ $35 = $34&255;
+ $append_mesg = $35;
+ $36 = $append_mesg;
+ $37 = ($36<<24>>24)!=(0);
+ if ($37) {
+  $38 = $0;
+  ;HEAP32[$mesg$byval_copy>>2]=HEAP32[$mesg>>2]|0;HEAP32[$mesg$byval_copy+4>>2]=HEAP32[$mesg+4>>2]|0;
+  _mrb_obj_as_string($4,$38,$mesg$byval_copy);
+  ;HEAP32[$mesg>>2]=HEAP32[$4>>2]|0;HEAP32[$mesg+4>>2]=HEAP32[$4+4>>2]|0;
+  $39 = HEAP32[$mesg>>2]|0;
+  $40 = HEAP32[$39>>2]|0;
+  $41 = $40 >>> 11;
+  $42 = $41 & 8;
+  $43 = ($42|0)!=(0);
+  $44 = HEAP32[$mesg>>2]|0;
+  if ($43) {
+   $45 = HEAP32[$44>>2]|0;
+   $46 = $45 >>> 11;
+   $47 = $46 & 496;
+   $48 = $47 >> 4;
+   $51 = $48;
+  } else {
+   $49 = ((($44)) + 12|0);
+   $50 = HEAP32[$49>>2]|0;
+   $51 = $50;
+  }
+  $52 = ($51|0)>(0);
+  $53 = $52&1;
+  $54 = $53&255;
+  $append_mesg = $54;
+ }
+ $55 = ((($file)) + 4|0);
+ $56 = HEAP32[$55>>2]|0;
+ $57 = ($56|0)==(0);
+ if ($57) {
+  $58 = HEAP32[$file>>2]|0;
+  $59 = ($58|0)!=(0);
+  if ($59) {
+   label = 10;
+  }
+ } else {
+  label = 10;
+ }
+ do {
+  if ((label|0) == 10) {
+   $60 = ((($line)) + 4|0);
+   $61 = HEAP32[$60>>2]|0;
+   $62 = ($61|0)==(0);
+   if ($62) {
+    $63 = HEAP32[$line>>2]|0;
+    $64 = ($63|0)!=(0);
+    if (!($64)) {
+     break;
+    }
+   }
+   $65 = $0;
+   ;HEAP32[$file$byval_copy>>2]=HEAP32[$file>>2]|0;HEAP32[$file$byval_copy+4>>2]=HEAP32[$file+4>>2]|0;
+   _mrb_str_dup($5,$65,$file$byval_copy);
+   ;HEAP32[$str>>2]=HEAP32[$5>>2]|0;HEAP32[$str+4>>2]=HEAP32[$5+4>>2]|0;
+   $66 = $0;
+   ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+   _mrb_str_cat($6,$66,$str$byval_copy,67713,1);
+   $67 = $0;
+   ;HEAP32[$str$byval_copy3>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy3+4>>2]=HEAP32[$str+4>>2]|0;
+   ;HEAP32[$line$byval_copy>>2]=HEAP32[$line>>2]|0;HEAP32[$line$byval_copy+4>>2]=HEAP32[$line+4>>2]|0;
+   _mrb_str_append($7,$67,$str$byval_copy3,$line$byval_copy);
+   $68 = $0;
+   ;HEAP32[$str$byval_copy4>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy4+4>>2]=HEAP32[$str+4>>2]|0;
+   _mrb_str_cat($8,$68,$str$byval_copy4,67715,2);
+   $69 = $append_mesg;
+   $70 = ($69<<24>>24)!=(0);
+   if ($70) {
+    $71 = $0;
+    ;HEAP32[$str$byval_copy5>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy5+4>>2]=HEAP32[$str+4>>2]|0;
+    ;HEAP32[$mesg$byval_copy6>>2]=HEAP32[$mesg>>2]|0;HEAP32[$mesg$byval_copy6+4>>2]=HEAP32[$mesg+4>>2]|0;
+    _mrb_str_cat_str($9,$71,$str$byval_copy5,$mesg$byval_copy6);
+    $72 = $0;
+    ;HEAP32[$str$byval_copy7>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy7+4>>2]=HEAP32[$str+4>>2]|0;
+    _mrb_str_cat($10,$72,$str$byval_copy7,67718,2);
+   }
+   $73 = $0;
+   $74 = $0;
+   ;HEAP32[$exc$byval_copy8>>2]=HEAP32[$exc>>2]|0;HEAP32[$exc$byval_copy8+4>>2]=HEAP32[$exc+4>>2]|0;
+   $75 = (_mrb_obj_classname($74,$exc$byval_copy8)|0);
+   ;HEAP32[$str$byval_copy9>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy9+4>>2]=HEAP32[$str+4>>2]|0;
+   _mrb_str_cat_cstr($11,$73,$str$byval_copy9,$75);
+   $76 = $append_mesg;
+   $77 = ($76<<24>>24)!=(0);
+   if (!($77)) {
+    ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+    STACKTOP = sp;return;
+   }
+   $78 = $0;
+   ;HEAP32[$str$byval_copy10>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy10+4>>2]=HEAP32[$str+4>>2]|0;
+   _mrb_str_cat($12,$78,$str$byval_copy10,67721,1);
+   ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+ } while(0);
+ $79 = $0;
+ ;HEAP32[$exc$byval_copy11>>2]=HEAP32[$exc>>2]|0;HEAP32[$exc$byval_copy11+4>>2]=HEAP32[$exc+4>>2]|0;
+ $80 = (_mrb_obj_classname($79,$exc$byval_copy11)|0);
+ $cname = $80;
+ $81 = $0;
+ $82 = $cname;
+ _mrb_str_new_cstr($13,$81,$82);
+ ;HEAP32[$str>>2]=HEAP32[$13>>2]|0;HEAP32[$str+4>>2]=HEAP32[$13+4>>2]|0;
+ $83 = $0;
+ ;HEAP32[$str$byval_copy12>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy12+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_cat($14,$83,$str$byval_copy12,67715,2);
+ $84 = $append_mesg;
+ $85 = ($84<<24>>24)!=(0);
+ $86 = $0;
+ if ($85) {
+  ;HEAP32[$str$byval_copy13>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy13+4>>2]=HEAP32[$str+4>>2]|0;
+  ;HEAP32[$mesg$byval_copy14>>2]=HEAP32[$mesg>>2]|0;HEAP32[$mesg$byval_copy14+4>>2]=HEAP32[$mesg+4>>2]|0;
+  _mrb_str_cat_str($15,$86,$str$byval_copy13,$mesg$byval_copy14);
+  ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+  STACKTOP = sp;return;
+ } else {
+  $87 = $cname;
+  ;HEAP32[$str$byval_copy15>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy15+4>>2]=HEAP32[$str+4>>2]|0;
+  _mrb_str_cat_cstr($16,$86,$str$byval_copy15,$87);
+  ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_data_check_type($mrb,$obj,$type) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ $type = $type|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, $obj$byval_copy = 0, $obj$byval_copy6 = 0;
+ var $t2 = 0, $vararg_buffer = 0, $vararg_buffer2 = 0, $vararg_ptr1 = 0, $vararg_ptr5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy6 = sp + 96|0;
+ $obj$byval_copy = sp + 88|0;
+ $vararg_buffer2 = sp + 16|0;
+ $vararg_buffer = sp;
+ $2 = sp + 64|0;
+ $3 = sp + 56|0;
+ $4 = sp + 40|0;
+ $5 = sp + 32|0;
+ $0 = $mrb;
+ $1 = $type;
+ $6 = ((($obj)) + 4|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ($7|0)!=(21);
+ if ($8) {
+  $9 = $0;
+  ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+  _mrb_check_type($9,$obj$byval_copy,21);
+ }
+ $10 = HEAP32[$obj>>2]|0;
+ $11 = ((($10)) + 16|0);
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $1;
+ $14 = ($12|0)!=($13|0);
+ if (!($14)) {
+  STACKTOP = sp;return;
+ }
+ $15 = HEAP32[$obj>>2]|0;
+ $16 = ((($15)) + 16|0);
+ $17 = HEAP32[$16>>2]|0;
+ $t2 = $17;
+ $18 = $t2;
+ $19 = ($18|0)!=(0|0);
+ $20 = $0;
+ if ($19) {
+  $21 = $0;
+  $22 = (_mrb_class_get($21,68905)|0);
+  $23 = $0;
+  $24 = $t2;
+  $25 = HEAP32[$24>>2]|0;
+  _mrb_str_new_cstr($2,$23,$25);
+  $26 = $0;
+  $27 = $1;
+  $28 = HEAP32[$27>>2]|0;
+  _mrb_str_new_cstr($3,$26,$28);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$2>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$2+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$2+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$2+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$2+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$2+7>>0]|0;
+  $vararg_ptr1 = ((($vararg_buffer)) + 8|0);
+  ;HEAP8[$vararg_ptr1>>0]=HEAP8[$3>>0]|0;HEAP8[$vararg_ptr1+1>>0]=HEAP8[$3+1>>0]|0;HEAP8[$vararg_ptr1+2>>0]=HEAP8[$3+2>>0]|0;HEAP8[$vararg_ptr1+3>>0]=HEAP8[$3+3>>0]|0;HEAP8[$vararg_ptr1+4>>0]=HEAP8[$3+4>>0]|0;HEAP8[$vararg_ptr1+5>>0]=HEAP8[$3+5>>0]|0;HEAP8[$vararg_ptr1+6>>0]=HEAP8[$3+6>>0]|0;HEAP8[$vararg_ptr1+7>>0]=HEAP8[$3+7>>0]|0;
+  _mrb_raisef($20,$22,67788,$vararg_buffer);
+  // unreachable;
+ } else {
+  ;HEAP32[$obj$byval_copy6>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy6+4>>2]=HEAP32[$obj+4>>2]|0;
+  $29 = (_mrb_class_985($20,$obj$byval_copy6)|0);
+  $c = $29;
+  $30 = $0;
+  $31 = $0;
+  $32 = (_mrb_class_get($31,68905)|0);
+  $33 = $c;
+  _mrb_obj_value_986($4,$33);
+  $34 = $0;
+  $35 = $1;
+  $36 = HEAP32[$35>>2]|0;
+  _mrb_str_new_cstr($5,$34,$36);
+  ;HEAP8[$vararg_buffer2>>0]=HEAP8[$4>>0]|0;HEAP8[$vararg_buffer2+1>>0]=HEAP8[$4+1>>0]|0;HEAP8[$vararg_buffer2+2>>0]=HEAP8[$4+2>>0]|0;HEAP8[$vararg_buffer2+3>>0]=HEAP8[$4+3>>0]|0;HEAP8[$vararg_buffer2+4>>0]=HEAP8[$4+4>>0]|0;HEAP8[$vararg_buffer2+5>>0]=HEAP8[$4+5>>0]|0;HEAP8[$vararg_buffer2+6>>0]=HEAP8[$4+6>>0]|0;HEAP8[$vararg_buffer2+7>>0]=HEAP8[$4+7>>0]|0;
+  $vararg_ptr5 = ((($vararg_buffer2)) + 8|0);
+  ;HEAP8[$vararg_ptr5>>0]=HEAP8[$5>>0]|0;HEAP8[$vararg_ptr5+1>>0]=HEAP8[$5+1>>0]|0;HEAP8[$vararg_ptr5+2>>0]=HEAP8[$5+2>>0]|0;HEAP8[$vararg_ptr5+3>>0]=HEAP8[$5+3>>0]|0;HEAP8[$vararg_ptr5+4>>0]=HEAP8[$5+4>>0]|0;HEAP8[$vararg_ptr5+5>>0]=HEAP8[$5+5>>0]|0;HEAP8[$vararg_ptr5+6>>0]=HEAP8[$5+6>>0]|0;HEAP8[$vararg_ptr5+7>>0]=HEAP8[$5+7>>0]|0;
+  _mrb_raisef($30,$32,67825,$vararg_buffer2);
+  // unreachable;
+ }
+}
+function _mrb_class_985($mrb,$v) {
+ $mrb = $mrb|0;
+ $v = $v|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = ((($v)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ L1: do {
+  switch ($3|0) {
+  case 0:  {
+   $4 = HEAP32[$v>>2]|0;
+   $5 = ($4|0)!=(0);
+   $6 = $1;
+   if ($5) {
+    $7 = ((($6)) + 72|0);
+    $8 = HEAP32[$7>>2]|0;
+    $0 = $8;
+    break L1;
+   } else {
+    $9 = ((($6)) + 76|0);
+    $10 = HEAP32[$9>>2]|0;
+    $0 = $10;
+    break L1;
+   }
+   break;
+  }
+  case 2:  {
+   $11 = $1;
+   $12 = ((($11)) + 68|0);
+   $13 = HEAP32[$12>>2]|0;
+   $0 = $13;
+   break;
+  }
+  case 4:  {
+   $14 = $1;
+   $15 = ((($14)) + 80|0);
+   $16 = HEAP32[$15>>2]|0;
+   $0 = $16;
+   break;
+  }
+  case 3:  {
+   $17 = $1;
+   $18 = ((($17)) + 64|0);
+   $19 = HEAP32[$18>>2]|0;
+   $0 = $19;
+   break;
+  }
+  case 6:  {
+   $20 = $1;
+   $21 = ((($20)) + 60|0);
+   $22 = HEAP32[$21>>2]|0;
+   $0 = $22;
+   break;
+  }
+  case 7:  {
+   $23 = $1;
+   $24 = ((($23)) + 32|0);
+   $25 = HEAP32[$24>>2]|0;
+   $0 = $25;
+   break;
+  }
+  case 20:  {
+   $0 = 0;
+   break;
+  }
+  default: {
+   $26 = HEAP32[$v>>2]|0;
+   $27 = ((($26)) + 4|0);
+   $28 = HEAP32[$27>>2]|0;
+   $0 = $28;
+  }
+  }
+ } while(0);
+ $29 = $0;
+ STACKTOP = sp;return ($29|0);
+}
+function _mrb_obj_value_986($agg$result,$p) {
+ $agg$result = $agg$result|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $p;
+ $1 = $0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 & 255;
+ $4 = ((($v)) + 4|0);
+ HEAP32[$4>>2] = $3;
+ $5 = $0;
+ HEAP32[$v>>2] = $5;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_data_get_ptr($mrb,$obj,$type) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ $type = $type|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $obj$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $type;
+ $2 = $0;
+ $3 = $1;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ _mrb_data_check_type($2,$obj$byval_copy,$3);
+ $4 = HEAP32[$obj>>2]|0;
+ $5 = ((($4)) + 20|0);
+ $6 = HEAP32[$5>>2]|0;
+ STACKTOP = sp;return ($6|0);
+}
+function _mrb_float_id($f) {
+ $f = +$f;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $id = 0, $len = 0, $p = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = sp + 12|0;
+ HEAPF32[$0>>2] = $f;
+ $p = $0;
+ $len = 4;
+ $id = 0;
+ while(1) {
+  $1 = $len;
+  $2 = (($1) + -1)|0;
+  $len = $2;
+  $3 = ($1|0)!=(0);
+  $4 = $id;
+  if (!($3)) {
+   break;
+  }
+  $5 = ($4*65599)|0;
+  $6 = $p;
+  $7 = HEAP8[$6>>0]|0;
+  $8 = $7 << 24 >> 24;
+  $9 = (($5) + ($8))|0;
+  $id = $9;
+  $10 = $p;
+  $11 = ((($10)) + 1|0);
+  $p = $11;
+ }
+ $12 = $id;
+ $13 = $12 >> 5;
+ $14 = (($4) + ($13))|0;
+ $id = $14;
+ $15 = $id;
+ STACKTOP = sp;return ($15|0);
+}
+function _mrb_obj_id($obj) {
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $tt = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = ((($obj)) + 4|0);
+ $2 = HEAP32[$1>>2]|0;
+ $tt = $2;
+ $3 = $tt;
+ L1: do {
+  switch ($3|0) {
+  case 5: case 1:  {
+   $4 = $tt;
+   $5 = 0 ^ $4;
+   $0 = $5;
+   break;
+  }
+  case 0:  {
+   $6 = ((($obj)) + 4|0);
+   $7 = HEAP32[$6>>2]|0;
+   $8 = ($7|0)==(0);
+   if ($8) {
+    $9 = HEAP32[$obj>>2]|0;
+    $10 = ($9|0)!=(0);
+    if (!($10)) {
+     $11 = $tt;
+     $12 = 1 ^ $11;
+     $0 = $12;
+     break L1;
+    }
+   }
+   $13 = $tt;
+   $14 = 0 ^ $13;
+   $0 = $14;
+   break;
+  }
+  case 2:  {
+   $15 = $tt;
+   $16 = 1 ^ $15;
+   $0 = $16;
+   break;
+  }
+  case 4:  {
+   $17 = HEAP32[$obj>>2]|0;
+   $18 = $tt;
+   $19 = $17 ^ $18;
+   $0 = $19;
+   break;
+  }
+  case 3:  {
+   $20 = HEAP32[$obj>>2]|0;
+   $21 = (+($20|0));
+   $22 = (_mrb_float_id($21)|0);
+   $23 = $22 ^ 6;
+   $0 = $23;
+   break;
+  }
+  case 6:  {
+   $24 = +HEAPF32[$obj>>2];
+   $25 = (_mrb_float_id($24)|0);
+   $26 = $tt;
+   $27 = $25 ^ $26;
+   $0 = $27;
+   break;
+  }
+  default: {
+   $28 = HEAP32[$obj>>2]|0;
+   $29 = $28;
+   $30 = $tt;
+   $31 = $29 ^ $30;
+   $0 = $31;
+  }
+  }
+ } while(0);
+ $32 = $0;
+ STACKTOP = sp;return ($32|0);
+}
+function _mrb_regexp_p($mrb,$v) {
+ $mrb = $mrb|0;
+ $v = $v|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $v$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ $2 = (_mrb_class_defined($1,69627)|0);
+ $3 = $2&255;
+ $4 = ($3|0)!=(0);
+ if (!($4)) {
+  $12 = 0;
+  $11 = $12&1;
+  $13 = $11&255;
+  STACKTOP = sp;return ($13|0);
+ }
+ $5 = $0;
+ $6 = $0;
+ $7 = (_mrb_class_get($6,69627)|0);
+ ;HEAP32[$v$byval_copy>>2]=HEAP32[$v>>2]|0;HEAP32[$v$byval_copy+4>>2]=HEAP32[$v+4>>2]|0;
+ $8 = (_mrb_obj_is_kind_of($5,$v$byval_copy,$7)|0);
+ $9 = $8&255;
+ $10 = ($9|0)!=(0);
+ $12 = $10;
+ $11 = $12&1;
+ $13 = $11&255;
+ STACKTOP = sp;return ($13|0);
+}
+function _mrb_init_core($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ _mrb_init_symtbl($1);
+ $2 = $0;
+ _mrb_gc_arena_restore($2,0);
+ $3 = $0;
+ _mrb_init_class($3);
+ $4 = $0;
+ _mrb_gc_arena_restore($4,0);
+ $5 = $0;
+ _mrb_init_object($5);
+ $6 = $0;
+ _mrb_gc_arena_restore($6,0);
+ $7 = $0;
+ _mrb_init_kernel($7);
+ $8 = $0;
+ _mrb_gc_arena_restore($8,0);
+ $9 = $0;
+ _mrb_init_comparable($9);
+ $10 = $0;
+ _mrb_gc_arena_restore($10,0);
+ $11 = $0;
+ _mrb_init_enumerable($11);
+ $12 = $0;
+ _mrb_gc_arena_restore($12,0);
+ $13 = $0;
+ _mrb_init_symbol($13);
+ $14 = $0;
+ _mrb_gc_arena_restore($14,0);
+ $15 = $0;
+ _mrb_init_exception($15);
+ $16 = $0;
+ _mrb_gc_arena_restore($16,0);
+ $17 = $0;
+ _mrb_init_proc($17);
+ $18 = $0;
+ _mrb_gc_arena_restore($18,0);
+ $19 = $0;
+ _mrb_init_string($19);
+ $20 = $0;
+ _mrb_gc_arena_restore($20,0);
+ $21 = $0;
+ _mrb_init_array($21);
+ $22 = $0;
+ _mrb_gc_arena_restore($22,0);
+ $23 = $0;
+ _mrb_init_hash($23);
+ $24 = $0;
+ _mrb_gc_arena_restore($24,0);
+ $25 = $0;
+ _mrb_init_numeric($25);
+ $26 = $0;
+ _mrb_gc_arena_restore($26,0);
+ $27 = $0;
+ _mrb_init_range($27);
+ $28 = $0;
+ _mrb_gc_arena_restore($28,0);
+ $29 = $0;
+ _mrb_init_gc($29);
+ $30 = $0;
+ _mrb_gc_arena_restore($30,0);
+ $31 = $0;
+ _mrb_init_version($31);
+ $32 = $0;
+ _mrb_gc_arena_restore($32,0);
+ $33 = $0;
+ _mrb_init_mrblib($33);
+ $34 = $0;
+ _mrb_gc_arena_restore($34,0);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_inspect($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $obj$byval_copy = 0, $obj$byval_copy1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy1 = sp + 16|0;
+ $obj$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = ((($obj)) + 4|0);
+ $2 = HEAP32[$1>>2]|0;
+ $3 = ($2|0)==(8);
+ if ($3) {
+  $4 = $0;
+  ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+  $5 = (_mrb_obj_basic_to_s_p($4,$obj$byval_copy)|0);
+  $6 = $5&255;
+  $7 = ($6|0)!=(0);
+  if ($7) {
+   $8 = $0;
+   $9 = HEAP32[$obj>>2]|0;
+   _mrb_obj_iv_inspect($agg$result,$8,$9);
+   STACKTOP = sp;return;
+  }
+ }
+ $10 = $0;
+ ;HEAP32[$obj$byval_copy1>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy1+4>>2]=HEAP32[$obj+4>>2]|0;
+ _mrb_any_to_s($agg$result,$10,$obj$byval_copy1);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_basic_to_s_p($mrb,$obj) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $me = 0, $obj$byval_copy = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 8|0;
+ $1 = $mrb;
+ $2 = $1;
+ $3 = $1;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ $4 = (_mrb_class_998($3,$obj$byval_copy)|0);
+ $5 = $1;
+ $6 = (_mrb_intern_static($5,68977,4)|0);
+ $7 = (_mrb_method_search($2,$4,$6)|0);
+ $me = $7;
+ $8 = $me;
+ $9 = HEAP32[$8>>2]|0;
+ $10 = $9 >>> 11;
+ $11 = $10 & 128;
+ $12 = ($11|0)!=(0);
+ if ($12) {
+  $13 = $me;
+  $14 = ((($13)) + 12|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = ($15|0)==(282|0);
+  if ($16) {
+   $0 = 1;
+   $17 = $0;
+   STACKTOP = sp;return ($17|0);
+  }
+ }
+ $0 = 0;
+ $17 = $0;
+ STACKTOP = sp;return ($17|0);
+}
+function _mrb_class_998($mrb,$v) {
+ $mrb = $mrb|0;
+ $v = $v|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = ((($v)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ L1: do {
+  switch ($3|0) {
+  case 0:  {
+   $4 = HEAP32[$v>>2]|0;
+   $5 = ($4|0)!=(0);
+   $6 = $1;
+   if ($5) {
+    $7 = ((($6)) + 72|0);
+    $8 = HEAP32[$7>>2]|0;
+    $0 = $8;
+    break L1;
+   } else {
+    $9 = ((($6)) + 76|0);
+    $10 = HEAP32[$9>>2]|0;
+    $0 = $10;
+    break L1;
+   }
+   break;
+  }
+  case 2:  {
+   $11 = $1;
+   $12 = ((($11)) + 68|0);
+   $13 = HEAP32[$12>>2]|0;
+   $0 = $13;
+   break;
+  }
+  case 4:  {
+   $14 = $1;
+   $15 = ((($14)) + 80|0);
+   $16 = HEAP32[$15>>2]|0;
+   $0 = $16;
+   break;
+  }
+  case 3:  {
+   $17 = $1;
+   $18 = ((($17)) + 64|0);
+   $19 = HEAP32[$18>>2]|0;
+   $0 = $19;
+   break;
+  }
+  case 6:  {
+   $20 = $1;
+   $21 = ((($20)) + 60|0);
+   $22 = HEAP32[$21>>2]|0;
+   $0 = $22;
+   break;
+  }
+  case 7:  {
+   $23 = $1;
+   $24 = ((($23)) + 32|0);
+   $25 = HEAP32[$24>>2]|0;
+   $0 = $25;
+   break;
+  }
+  case 20:  {
+   $0 = 0;
+   break;
+  }
+  default: {
+   $26 = HEAP32[$v>>2]|0;
+   $27 = ((($26)) + 4|0);
+   $28 = HEAP32[$27>>2]|0;
+   $0 = $28;
+  }
+  }
+ } while(0);
+ $29 = $0;
+ STACKTOP = sp;return ($29|0);
+}
+function _mrb_obj_clone($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $clone = 0, $clone$byval_copy = 0, $p = 0, $self$byval_copy = 0, $self$byval_copy1 = 0, $self$byval_copy2 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy2 = sp + 56|0;
+ $clone$byval_copy = sp + 48|0;
+ $self$byval_copy1 = sp + 40|0;
+ $self$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $clone = sp + 16|0;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = ((($self)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3>>>0)<(8);
+ if ($4) {
+  $5 = $0;
+  $6 = $0;
+  $7 = (_mrb_class_get($6,68905)|0);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$self>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$self+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$self+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$self+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$self+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$self+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$self+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$self+7>>0]|0;
+  _mrb_raisef($5,$7,67856,$vararg_buffer);
+  // unreachable;
+ }
+ $8 = ((($self)) + 4|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ($9|0)==(12);
+ $11 = $0;
+ if ($10) {
+  $12 = $0;
+  $13 = (_mrb_class_get($12,68905)|0);
+  _mrb_raise($11,$13,67871);
+  // unreachable;
+ } else {
+  $14 = ((($self)) + 4|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = $0;
+  ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+  $17 = (_mrb_obj_class($16,$self$byval_copy)|0);
+  $18 = (_mrb_obj_alloc($11,$15,$17)|0);
+  $p = $18;
+  $19 = $0;
+  ;HEAP32[$self$byval_copy1>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy1+4>>2]=HEAP32[$self+4>>2]|0;
+  $20 = (_mrb_singleton_class_clone($19,$self$byval_copy1)|0);
+  $21 = $p;
+  $22 = ((($21)) + 4|0);
+  HEAP32[$22>>2] = $20;
+  $23 = $p;
+  _mrb_obj_value_1005($1,$23);
+  ;HEAP32[$clone>>2]=HEAP32[$1>>2]|0;HEAP32[$clone+4>>2]=HEAP32[$1+4>>2]|0;
+  $24 = $0;
+  ;HEAP32[$clone$byval_copy>>2]=HEAP32[$clone>>2]|0;HEAP32[$clone$byval_copy+4>>2]=HEAP32[$clone+4>>2]|0;
+  ;HEAP32[$self$byval_copy2>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy2+4>>2]=HEAP32[$self+4>>2]|0;
+  _init_copy($24,$clone$byval_copy,$self$byval_copy2);
+  ;HEAP32[$agg$result>>2]=HEAP32[$clone>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$clone+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_singleton_class_clone($mrb,$obj) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
+ var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0;
+ var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0;
+ var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $8 = 0, $9 = 0, $clone = 0, $klass = 0, $obj$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 64|0;
+ $$byval_copy2 = sp + 56|0;
+ $$byval_copy1 = sp + 48|0;
+ $$byval_copy = sp + 40|0;
+ $2 = sp + 16|0;
+ $3 = sp + 8|0;
+ $4 = sp;
+ $1 = $mrb;
+ $5 = HEAP32[$obj>>2]|0;
+ $6 = ((($5)) + 4|0);
+ $7 = HEAP32[$6>>2]|0;
+ $klass = $7;
+ $8 = $klass;
+ $9 = HEAP32[$8>>2]|0;
+ $10 = $9 & 255;
+ $11 = ($10|0)!=(12);
+ if ($11) {
+  $12 = $klass;
+  $0 = $12;
+  $70 = $0;
+  STACKTOP = sp;return ($70|0);
+ }
+ $13 = $1;
+ $14 = $klass;
+ $15 = HEAP32[$14>>2]|0;
+ $16 = $15 & 255;
+ $17 = $1;
+ $18 = ((($17)) + 36|0);
+ $19 = HEAP32[$18>>2]|0;
+ $20 = (_mrb_obj_alloc($13,$16,$19)|0);
+ $clone = $20;
+ $21 = ((($obj)) + 4|0);
+ $22 = HEAP32[$21>>2]|0;
+ $23 = ($22|0)==(9);
+ if ($23) {
+  label = 5;
+ } else {
+  $24 = ((($obj)) + 4|0);
+  $25 = HEAP32[$24>>2]|0;
+  $26 = ($25|0)==(12);
+  if ($26) {
+   label = 5;
+  } else {
+   $30 = $1;
+   $31 = $klass;
+   _mrb_obj_value_1005($2,$31);
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+   $32 = (_mrb_singleton_class_clone($30,$$byval_copy)|0);
+   $33 = $clone;
+   $34 = ((($33)) + 4|0);
+   HEAP32[$34>>2] = $32;
+  }
+ }
+ if ((label|0) == 5) {
+  $27 = $clone;
+  $28 = $clone;
+  $29 = ((($28)) + 4|0);
+  HEAP32[$29>>2] = $27;
+ }
+ $35 = $klass;
+ $36 = ((($35)) + 20|0);
+ $37 = HEAP32[$36>>2]|0;
+ $38 = $clone;
+ $39 = ((($38)) + 20|0);
+ HEAP32[$39>>2] = $37;
+ $40 = $klass;
+ $41 = ((($40)) + 12|0);
+ $42 = HEAP32[$41>>2]|0;
+ $43 = ($42|0)!=(0|0);
+ if ($43) {
+  $44 = $1;
+  $45 = $clone;
+  _mrb_obj_value_1005($3,$45);
+  $46 = $klass;
+  _mrb_obj_value_1005($4,$46);
+  ;HEAP32[$$byval_copy1>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$3+4>>2]|0;
+  ;HEAP32[$$byval_copy2>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$4+4>>2]|0;
+  _mrb_iv_copy($44,$$byval_copy1,$$byval_copy2);
+  $47 = $1;
+  $48 = $clone;
+  $49 = $1;
+  $50 = (_mrb_intern_static($49,67899,12)|0);
+  ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+  _mrb_obj_iv_set($47,$48,$50,$obj$byval_copy);
+ }
+ $51 = $klass;
+ $52 = ((($51)) + 16|0);
+ $53 = HEAP32[$52>>2]|0;
+ $54 = ($53|0)!=(0|0);
+ $55 = $1;
+ if ($54) {
+  $56 = $klass;
+  $57 = ((($56)) + 16|0);
+  $58 = HEAP32[$57>>2]|0;
+  $59 = (_kh_copy_mt($55,$58)|0);
+  $60 = $clone;
+  $61 = ((($60)) + 16|0);
+  HEAP32[$61>>2] = $59;
+ } else {
+  $62 = (_kh_init_mt($55)|0);
+  $63 = $clone;
+  $64 = ((($63)) + 16|0);
+  HEAP32[$64>>2] = $62;
+ }
+ $65 = $clone;
+ $66 = HEAP32[$65>>2]|0;
+ $67 = $66 & -256;
+ $68 = $67 | 12;
+ HEAP32[$65>>2] = $68;
+ $69 = $clone;
+ $0 = $69;
+ $70 = $0;
+ STACKTOP = sp;return ($70|0);
+}
+function _mrb_obj_value_1005($agg$result,$p) {
+ $agg$result = $agg$result|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $p;
+ $1 = $0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 & 255;
+ $4 = ((($v)) + 4|0);
+ HEAP32[$4>>2] = $3;
+ $5 = $0;
+ HEAP32[$v>>2] = $5;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _init_copy($mrb,$dest,$obj) {
+ $mrb = $mrb|0;
+ $dest = $dest|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $dest$byval_copy = 0, $dest$byval_copy1 = 0, $dest$byval_copy3 = 0, $obj$byval_copy = 0, $obj$byval_copy2 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $dest$byval_copy3 = sp + 56|0;
+ $obj$byval_copy2 = sp + 48|0;
+ $dest$byval_copy1 = sp + 40|0;
+ $obj$byval_copy = sp + 32|0;
+ $dest$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = ((($obj)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ switch ($3|0) {
+ case 10: case 9:  {
+  $4 = $0;
+  ;HEAP32[$dest$byval_copy>>2]=HEAP32[$dest>>2]|0;HEAP32[$dest$byval_copy+4>>2]=HEAP32[$dest+4>>2]|0;
+  ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+  _copy_class($4,$dest$byval_copy,$obj$byval_copy);
+  label = 3;
+  break;
+ }
+ case 18: case 21: case 15: case 12: case 8:  {
+  label = 3;
+  break;
+ }
+ default: {
+ }
+ }
+ if ((label|0) == 3) {
+  $5 = $0;
+  ;HEAP32[$dest$byval_copy1>>2]=HEAP32[$dest>>2]|0;HEAP32[$dest$byval_copy1+4>>2]=HEAP32[$dest+4>>2]|0;
+  ;HEAP32[$obj$byval_copy2>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy2+4>>2]=HEAP32[$obj+4>>2]|0;
+  _mrb_iv_copy($5,$dest$byval_copy1,$obj$byval_copy2);
+ }
+ $6 = $0;
+ ;HEAP8[$vararg_buffer>>0]=HEAP8[$obj>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$obj+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$obj+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$obj+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$obj+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$obj+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$obj+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$obj+7>>0]|0;
+ ;HEAP32[$dest$byval_copy3>>2]=HEAP32[$dest>>2]|0;HEAP32[$dest$byval_copy3+4>>2]=HEAP32[$dest+4>>2]|0;
+ _mrb_funcall($1,$6,$dest$byval_copy3,68999,1,$vararg_buffer);
+ STACKTOP = sp;return;
+}
+function _copy_class($mrb,$dst,$src) {
+ $mrb = $mrb|0;
+ $dst = $dst|0;
+ $src = $src|0;
+ var $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
+ var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $c0 = 0, $c1 = 0, $dc = 0, $sc = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy1 = sp + 64|0;
+ $$byval_copy = sp + 56|0;
+ $1 = sp + 24|0;
+ $2 = sp + 16|0;
+ $3 = sp + 8|0;
+ $4 = sp;
+ $0 = $mrb;
+ $5 = HEAP32[$dst>>2]|0;
+ $dc = $5;
+ $6 = HEAP32[$src>>2]|0;
+ $sc = $6;
+ $7 = $sc;
+ $8 = HEAP32[$7>>2]|0;
+ $9 = $8 >>> 11;
+ $10 = $9 & 524288;
+ $11 = ($10|0)!=(0);
+ if (!($11)) {
+  $47 = $0;
+  $48 = $sc;
+  $49 = ((($48)) + 16|0);
+  $50 = HEAP32[$49>>2]|0;
+  $51 = (_kh_copy_mt($47,$50)|0);
+  $52 = $dc;
+  $53 = ((($52)) + 16|0);
+  HEAP32[$53>>2] = $51;
+  $54 = $sc;
+  $55 = ((($54)) + 20|0);
+  $56 = HEAP32[$55>>2]|0;
+  $57 = $dc;
+  $58 = ((($57)) + 20|0);
+  HEAP32[$58>>2] = $56;
+  STACKTOP = sp;return;
+ }
+ $12 = $sc;
+ $13 = ((($12)) + 20|0);
+ $14 = HEAP32[$13>>2]|0;
+ $c0 = $14;
+ $15 = $dc;
+ $c1 = $15;
+ while(1) {
+  $16 = $c0;
+  $17 = HEAP32[$16>>2]|0;
+  $18 = $17 >>> 11;
+  $19 = $18 & 1048576;
+  $20 = ($19|0)!=(0);
+  $21 = $20 ^ 1;
+  $22 = $0;
+  $23 = $c0;
+  if (!($21)) {
+   break;
+  }
+  _mrb_obj_value_1005($1,$23);
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;
+  _mrb_obj_dup($2,$22,$$byval_copy);
+  $24 = HEAP32[$2>>2]|0;
+  $25 = $c1;
+  $26 = ((($25)) + 20|0);
+  HEAP32[$26>>2] = $24;
+  $27 = $c1;
+  $28 = ((($27)) + 20|0);
+  $29 = HEAP32[$28>>2]|0;
+  $c1 = $29;
+  $30 = $c0;
+  $31 = ((($30)) + 20|0);
+  $32 = HEAP32[$31>>2]|0;
+  $c0 = $32;
+ }
+ _mrb_obj_value_1005($3,$23);
+ ;HEAP32[$$byval_copy1>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$3+4>>2]|0;
+ _mrb_obj_dup($4,$22,$$byval_copy1);
+ $33 = HEAP32[$4>>2]|0;
+ $34 = $c1;
+ $35 = ((($34)) + 20|0);
+ HEAP32[$35>>2] = $33;
+ $36 = $c1;
+ $37 = ((($36)) + 20|0);
+ $38 = HEAP32[$37>>2]|0;
+ $39 = HEAP32[$38>>2]|0;
+ $40 = $39 >>> 11;
+ $41 = $40 | 1048576;
+ $42 = HEAP32[$38>>2]|0;
+ $43 = $41 & 2097151;
+ $44 = $43 << 11;
+ $45 = $42 & 2047;
+ $46 = $45 | $44;
+ HEAP32[$38>>2] = $46;
+ $47 = $0;
+ $48 = $sc;
+ $49 = ((($48)) + 16|0);
+ $50 = HEAP32[$49>>2]|0;
+ $51 = (_kh_copy_mt($47,$50)|0);
+ $52 = $dc;
+ $53 = ((($52)) + 16|0);
+ HEAP32[$53>>2] = $51;
+ $54 = $sc;
+ $55 = ((($54)) + 20|0);
+ $56 = HEAP32[$55>>2]|0;
+ $57 = $dc;
+ $58 = ((($57)) + 20|0);
+ HEAP32[$58>>2] = $56;
+ STACKTOP = sp;return;
+}
+function _mrb_obj_dup($agg$result,$mrb,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $dup = 0, $dup$byval_copy = 0, $obj$byval_copy = 0, $obj$byval_copy1 = 0, $p = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy1 = sp + 48|0;
+ $dup$byval_copy = sp + 40|0;
+ $obj$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $dup = sp + 16|0;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = ((($obj)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3>>>0)<(8);
+ if ($4) {
+  $5 = $0;
+  $6 = $0;
+  $7 = (_mrb_class_get($6,68905)|0);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$obj>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$obj+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$obj+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$obj+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$obj+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$obj+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$obj+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$obj+7>>0]|0;
+  _mrb_raisef($5,$7,67912,$vararg_buffer);
+  // unreachable;
+ }
+ $8 = ((($obj)) + 4|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ($9|0)==(12);
+ $11 = $0;
+ if ($10) {
+  $12 = $0;
+  $13 = (_mrb_class_get($12,68905)|0);
+  _mrb_raise($11,$13,67925);
+  // unreachable;
+ } else {
+  $14 = ((($obj)) + 4|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = $0;
+  ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+  $17 = (_mrb_obj_class($16,$obj$byval_copy)|0);
+  $18 = (_mrb_obj_alloc($11,$15,$17)|0);
+  $p = $18;
+  $19 = $p;
+  _mrb_obj_value_1005($1,$19);
+  ;HEAP32[$dup>>2]=HEAP32[$1>>2]|0;HEAP32[$dup+4>>2]=HEAP32[$1+4>>2]|0;
+  $20 = $0;
+  ;HEAP32[$dup$byval_copy>>2]=HEAP32[$dup>>2]|0;HEAP32[$dup$byval_copy+4>>2]=HEAP32[$dup+4>>2]|0;
+  ;HEAP32[$obj$byval_copy1>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy1+4>>2]=HEAP32[$obj+4>>2]|0;
+  _init_copy($20,$dup$byval_copy,$obj$byval_copy1);
+  ;HEAP32[$agg$result>>2]=HEAP32[$dup>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$dup+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_obj_hash($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $self$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ $1 = (_mrb_obj_id($self$byval_copy)|0);
+ _mrb_fixnum_value_1010($agg$result,$1);
+ STACKTOP = sp;return;
+}
+function _mrb_fixnum_value_1010($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 3;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_obj_is_instance_of($mrb,$obj,$c) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $obj$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 8|0;
+ $1 = $mrb;
+ $2 = $c;
+ $3 = $1;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ $4 = (_mrb_obj_class($3,$obj$byval_copy)|0);
+ $5 = $2;
+ $6 = ($4|0)==($5|0);
+ if ($6) {
+  $0 = 1;
+  $7 = $0;
+  STACKTOP = sp;return ($7|0);
+ } else {
+  $0 = 0;
+  $7 = $0;
+  STACKTOP = sp;return ($7|0);
+ }
+ return (0)|0;
+}
+function _kh_alloc_st($mrb,$h) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $len = 0, $p = 0, $sz = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $h;
+ $2 = $1;
+ $3 = HEAP32[$2>>2]|0;
+ $sz = $3;
+ $len = 4;
+ $4 = $0;
+ $5 = $sz;
+ $6 = $5;
+ $7 = (($6>>>0) / 4)&-1;
+ $8 = $len;
+ $9 = $sz;
+ $10 = Math_imul($8, $9)|0;
+ $11 = (($7) + ($10))|0;
+ $12 = (_mrb_malloc($4,$11)|0);
+ $p = $12;
+ $13 = $1;
+ $14 = ((($13)) + 8|0);
+ HEAP32[$14>>2] = 0;
+ $15 = $1;
+ $16 = ((($15)) + 4|0);
+ HEAP32[$16>>2] = 0;
+ $17 = $p;
+ $18 = $1;
+ $19 = ((($18)) + 16|0);
+ HEAP32[$19>>2] = $17;
+ $20 = $1;
+ $21 = ((($20)) + 20|0);
+ HEAP32[$21>>2] = 0;
+ $22 = $p;
+ $23 = $len;
+ $24 = $sz;
+ $25 = Math_imul($23, $24)|0;
+ $26 = (($22) + ($25)|0);
+ $27 = $1;
+ $28 = ((($27)) + 12|0);
+ HEAP32[$28>>2] = $26;
+ $29 = $1;
+ $30 = ((($29)) + 12|0);
+ $31 = HEAP32[$30>>2]|0;
+ $32 = $sz;
+ $33 = (($32>>>0) / 4)&-1;
+ _kh_fill_flags_1011($31,-86,$33);
+ STACKTOP = sp;return;
+}
+function _kh_fill_flags_1011($p,$c,$len) {
+ $p = $p|0;
+ $c = $c|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $p;
+ $1 = $c;
+ $2 = $len;
+ while(1) {
+  $3 = $2;
+  $4 = (($3) + -1)|0;
+  $2 = $4;
+  $5 = ($3>>>0)>(0);
+  if (!($5)) {
+   break;
+  }
+  $6 = $1;
+  $7 = $0;
+  $8 = ((($7)) + 1|0);
+  $0 = $8;
+  HEAP8[$7>>0] = $6;
+ }
+ STACKTOP = sp;return;
+}
+function _kh_init_st_size($mrb,$size) {
+ $mrb = $mrb|0;
+ $size = $size|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $h = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $size;
+ $2 = $0;
+ $3 = (_mrb_calloc($2,1,24)|0);
+ $h = $3;
+ $4 = $1;
+ $5 = ($4>>>0)<(8);
+ if ($5) {
+  $1 = 8;
+ }
+ $6 = $1;
+ $7 = (($6) + -1)|0;
+ $1 = $7;
+ $8 = $1;
+ $9 = $8 >>> 1;
+ $10 = $1;
+ $11 = $10 | $9;
+ $1 = $11;
+ $12 = $1;
+ $13 = $12 >>> 2;
+ $14 = $1;
+ $15 = $14 | $13;
+ $1 = $15;
+ $16 = $1;
+ $17 = $16 >>> 4;
+ $18 = $1;
+ $19 = $18 | $17;
+ $1 = $19;
+ $20 = $1;
+ $21 = $20 >>> 8;
+ $22 = $1;
+ $23 = $22 | $21;
+ $1 = $23;
+ $24 = $1;
+ $25 = $24 >>> 16;
+ $26 = $1;
+ $27 = $26 | $25;
+ $1 = $27;
+ $28 = $1;
+ $29 = (($28) + 1)|0;
+ $1 = $29;
+ $30 = $1;
+ $31 = $h;
+ HEAP32[$31>>2] = $30;
+ $32 = $0;
+ $33 = $h;
+ _kh_alloc_st($32,$33);
+ $34 = $h;
+ STACKTOP = sp;return ($34|0);
+}
+function _kh_init_st($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = (_kh_init_st_size($1,8)|0);
+ STACKTOP = sp;return ($2|0);
+}
+function _kh_destroy_st($mrb,$h) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $h;
+ $2 = $1;
+ $3 = ($2|0)!=(0|0);
+ if (!($3)) {
+  STACKTOP = sp;return;
+ }
+ $4 = $0;
+ $5 = $1;
+ $6 = ((($5)) + 16|0);
+ $7 = HEAP32[$6>>2]|0;
+ _mrb_free($4,$7);
+ $8 = $0;
+ $9 = $1;
+ _mrb_free($8,$9);
+ STACKTOP = sp;return;
+}
+function _kh_resize_st($mrb,$h,$new_n_buckets) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ $new_n_buckets = $new_n_buckets|0;
+ var $$new_n_buckets = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
+ var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $7 = 0, $8 = 0, $9 = 0, $hh = 0, $i = 0, $k = 0, $old_ed_flags = 0, $old_keys = 0, $old_n_buckets = 0, $old_vals = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $hh = sp + 24|0;
+ $0 = $mrb;
+ $1 = $h;
+ $2 = $new_n_buckets;
+ $3 = $2;
+ $4 = ($3>>>0)<(8);
+ $$new_n_buckets = $4 ? 8 : $new_n_buckets;
+ $2 = $$new_n_buckets;
+ $5 = $2;
+ $6 = (($5) + -1)|0;
+ $2 = $6;
+ $7 = $2;
+ $8 = $7 >>> 1;
+ $9 = $2;
+ $10 = $9 | $8;
+ $2 = $10;
+ $11 = $2;
+ $12 = $11 >>> 2;
+ $13 = $2;
+ $14 = $13 | $12;
+ $2 = $14;
+ $15 = $2;
+ $16 = $15 >>> 4;
+ $17 = $2;
+ $18 = $17 | $16;
+ $2 = $18;
+ $19 = $2;
+ $20 = $19 >>> 8;
+ $21 = $2;
+ $22 = $21 | $20;
+ $2 = $22;
+ $23 = $2;
+ $24 = $23 >>> 16;
+ $25 = $2;
+ $26 = $25 | $24;
+ $2 = $26;
+ $27 = $2;
+ $28 = (($27) + 1)|0;
+ $2 = $28;
+ $29 = $1;
+ $30 = ((($29)) + 12|0);
+ $31 = HEAP32[$30>>2]|0;
+ $old_ed_flags = $31;
+ $32 = $1;
+ $33 = ((($32)) + 16|0);
+ $34 = HEAP32[$33>>2]|0;
+ $old_keys = $34;
+ $35 = $1;
+ $36 = ((($35)) + 20|0);
+ $37 = HEAP32[$36>>2]|0;
+ $old_vals = $37;
+ $38 = $1;
+ $39 = HEAP32[$38>>2]|0;
+ $old_n_buckets = $39;
+ $40 = $2;
+ HEAP32[$hh>>2] = $40;
+ $41 = $0;
+ _kh_alloc_st($41,$hh);
+ $i = 0;
+ while(1) {
+  $42 = $i;
+  $43 = $old_n_buckets;
+  $44 = ($42>>>0)<($43>>>0);
+  if (!($44)) {
+   break;
+  }
+  $45 = $i;
+  $46 = (($45>>>0) / 4)&-1;
+  $47 = $old_ed_flags;
+  $48 = (($47) + ($46)|0);
+  $49 = HEAP8[$48>>0]|0;
+  $50 = $49&255;
+  $51 = $i;
+  $52 = (($51>>>0) % 4)&-1;
+  $53 = (67959 + ($52)|0);
+  $54 = HEAP8[$53>>0]|0;
+  $55 = $54&255;
+  $56 = $50 & $55;
+  $57 = ($56|0)!=(0);
+  if (!($57)) {
+   $58 = $0;
+   $59 = $i;
+   $60 = $old_keys;
+   $61 = (($60) + ($59<<2)|0);
+   $62 = HEAP32[$61>>2]|0;
+   $63 = (_kh_put_st($58,$hh,$62,0)|0);
+   $k = $63;
+  }
+  $64 = $i;
+  $65 = (($64) + 1)|0;
+  $i = $65;
+ }
+ $66 = $1;
+ ;HEAP32[$66>>2]=HEAP32[$hh>>2]|0;HEAP32[$66+4>>2]=HEAP32[$hh+4>>2]|0;HEAP32[$66+8>>2]=HEAP32[$hh+8>>2]|0;HEAP32[$66+12>>2]=HEAP32[$hh+12>>2]|0;HEAP32[$66+16>>2]=HEAP32[$hh+16>>2]|0;HEAP32[$66+20>>2]=HEAP32[$hh+20>>2]|0;
+ $67 = $0;
+ $68 = $old_keys;
+ _mrb_free($67,$68);
+ STACKTOP = sp;return;
+}
+function _kh_put_st($mrb,$h,$key,$ret) {
+ $mrb = $mrb|0;
+ $h = $h|0;
+ $key = $key|0;
+ $ret = $ret|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0;
+ var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0;
+ var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0;
+ var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0;
+ var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $del_k = 0, $k = 0;
+ var $step = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $h;
+ $3 = $key;
+ $4 = $ret;
+ $step = 0;
+ $5 = $2;
+ $6 = ((($5)) + 8|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $2;
+ $9 = HEAP32[$8>>2]|0;
+ $10 = $9 >>> 2;
+ $11 = $2;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $12 >>> 1;
+ $14 = $10 | $13;
+ $15 = ($7>>>0)>=($14>>>0);
+ if ($15) {
+  $16 = $1;
+  $17 = $2;
+  $18 = $2;
+  $19 = HEAP32[$18>>2]|0;
+  $20 = $19<<1;
+  _kh_resize_st($16,$17,$20);
+ }
+ $21 = $3;
+ $22 = $3;
+ $23 = $22 << 2;
+ $24 = $21 ^ $23;
+ $25 = $3;
+ $26 = $25 >>> 2;
+ $27 = $24 ^ $26;
+ $28 = $2;
+ $29 = HEAP32[$28>>2]|0;
+ $30 = (($29) - 1)|0;
+ $31 = $27 & $30;
+ $k = $31;
+ $32 = $2;
+ $33 = HEAP32[$32>>2]|0;
+ $del_k = $33;
+ while(1) {
+  $34 = $k;
+  $35 = (($34>>>0) / 4)&-1;
+  $36 = $2;
+  $37 = ((($36)) + 12|0);
+  $38 = HEAP32[$37>>2]|0;
+  $39 = (($38) + ($35)|0);
+  $40 = HEAP8[$39>>0]|0;
+  $41 = $40&255;
+  $42 = $k;
+  $43 = (($42>>>0) % 4)&-1;
+  $44 = (67951 + ($43)|0);
+  $45 = HEAP8[$44>>0]|0;
+  $46 = $45&255;
+  $47 = $41 & $46;
+  $48 = ($47|0)!=(0);
+  $49 = $48 ^ 1;
+  if (!($49)) {
+   break;
+  }
+  $50 = $k;
+  $51 = (($50>>>0) / 4)&-1;
+  $52 = $2;
+  $53 = ((($52)) + 12|0);
+  $54 = HEAP32[$53>>2]|0;
+  $55 = (($54) + ($51)|0);
+  $56 = HEAP8[$55>>0]|0;
+  $57 = $56&255;
+  $58 = $k;
+  $59 = (($58>>>0) % 4)&-1;
+  $60 = (67955 + ($59)|0);
+  $61 = HEAP8[$60>>0]|0;
+  $62 = $61&255;
+  $63 = $57 & $62;
+  $64 = ($63|0)!=(0);
+  if ($64) {
+   $77 = $del_k;
+   $78 = $2;
+   $79 = HEAP32[$78>>2]|0;
+   $80 = ($77|0)==($79|0);
+   if ($80) {
+    $81 = $k;
+    $del_k = $81;
+   }
+  } else {
+   $65 = $k;
+   $66 = $2;
+   $67 = ((($66)) + 16|0);
+   $68 = HEAP32[$67>>2]|0;
+   $69 = (($68) + ($65<<2)|0);
+   $70 = HEAP32[$69>>2]|0;
+   $71 = $3;
+   $72 = ($70|0)==($71|0);
+   if ($72) {
+    label = 7;
+    break;
+   }
+  }
+  $82 = $k;
+  $83 = $step;
+  $84 = (($83) + 1)|0;
+  $step = $84;
+  $85 = (($82) + ($84))|0;
+  $86 = $2;
+  $87 = HEAP32[$86>>2]|0;
+  $88 = (($87) - 1)|0;
+  $89 = $85 & $88;
+  $k = $89;
+ }
+ if ((label|0) == 7) {
+  $73 = $4;
+  $74 = ($73|0)!=(0|0);
+  if ($74) {
+   $75 = $4;
+   HEAP32[$75>>2] = 0;
+  }
+  $76 = $k;
+  $0 = $76;
+  $157 = $0;
+  STACKTOP = sp;return ($157|0);
+ }
+ $90 = $del_k;
+ $91 = $2;
+ $92 = HEAP32[$91>>2]|0;
+ $93 = ($90|0)!=($92|0);
+ $94 = $3;
+ if ($93) {
+  $95 = $del_k;
+  $96 = $2;
+  $97 = ((($96)) + 16|0);
+  $98 = HEAP32[$97>>2]|0;
+  $99 = (($98) + ($95<<2)|0);
+  HEAP32[$99>>2] = $94;
+  $100 = $del_k;
+  $101 = (($100>>>0) % 4)&-1;
+  $102 = (67955 + ($101)|0);
+  $103 = HEAP8[$102>>0]|0;
+  $104 = $103&255;
+  $105 = $104 ^ -1;
+  $106 = $del_k;
+  $107 = (($106>>>0) / 4)&-1;
+  $108 = $2;
+  $109 = ((($108)) + 12|0);
+  $110 = HEAP32[$109>>2]|0;
+  $111 = (($110) + ($107)|0);
+  $112 = HEAP8[$111>>0]|0;
+  $113 = $112&255;
+  $114 = $113 & $105;
+  $115 = $114&255;
+  HEAP8[$111>>0] = $115;
+  $116 = $2;
+  $117 = ((($116)) + 4|0);
+  $118 = HEAP32[$117>>2]|0;
+  $119 = (($118) + 1)|0;
+  HEAP32[$117>>2] = $119;
+  $120 = $4;
+  $121 = ($120|0)!=(0|0);
+  if ($121) {
+   $122 = $4;
+   HEAP32[$122>>2] = 2;
+  }
+  $123 = $del_k;
+  $0 = $123;
+  $157 = $0;
+  STACKTOP = sp;return ($157|0);
+ } else {
+  $124 = $k;
+  $125 = $2;
+  $126 = ((($125)) + 16|0);
+  $127 = HEAP32[$126>>2]|0;
+  $128 = (($127) + ($124<<2)|0);
+  HEAP32[$128>>2] = $94;
+  $129 = $k;
+  $130 = (($129>>>0) % 4)&-1;
+  $131 = (67951 + ($130)|0);
+  $132 = HEAP8[$131>>0]|0;
+  $133 = $132&255;
+  $134 = $133 ^ -1;
+  $135 = $k;
+  $136 = (($135>>>0) / 4)&-1;
+  $137 = $2;
+  $138 = ((($137)) + 12|0);
+  $139 = HEAP32[$138>>2]|0;
+  $140 = (($139) + ($136)|0);
+  $141 = HEAP8[$140>>0]|0;
+  $142 = $141&255;
+  $143 = $142 & $134;
+  $144 = $143&255;
+  HEAP8[$140>>0] = $144;
+  $145 = $2;
+  $146 = ((($145)) + 4|0);
+  $147 = HEAP32[$146>>2]|0;
+  $148 = (($147) + 1)|0;
+  HEAP32[$146>>2] = $148;
+  $149 = $2;
+  $150 = ((($149)) + 8|0);
+  $151 = HEAP32[$150>>2]|0;
+  $152 = (($151) + 1)|0;
+  HEAP32[$150>>2] = $152;
+  $153 = $4;
+  $154 = ($153|0)!=(0|0);
+  if ($154) {
+   $155 = $4;
+   HEAP32[$155>>2] = 1;
+  }
+  $156 = $k;
+  $0 = $156;
+  $157 = $0;
+  STACKTOP = sp;return ($157|0);
+ }
+ return (0)|0;
+}
+function _mrb_class_instance_method_list($agg$result,$mrb,$recur,$klass,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $recur = $recur|0;
+ $klass = $klass|0;
+ $obj = $obj|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
+ var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0;
+ var $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $9 = 0, $ary = 0, $ary$byval_copy = 0, $i = 0, $oldklass = 0, $or$cond = 0, $or$cond3 = 0, $prepended = 0, $set = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 56|0;
+ $ary$byval_copy = sp + 48|0;
+ $ary = sp + 24|0;
+ $4 = sp + 8|0;
+ $5 = sp;
+ $0 = $mrb;
+ $1 = $recur;
+ $2 = $klass;
+ $3 = $obj;
+ $prepended = 0;
+ $6 = $0;
+ $7 = (_kh_init_st($6)|0);
+ $set = $7;
+ $8 = $1;
+ $9 = ($8<<24>>24)!=(0);
+ if (!($9)) {
+  $10 = $2;
+  $11 = HEAP32[$10>>2]|0;
+  $12 = $11 >>> 11;
+  $13 = $12 & 524288;
+  $14 = ($13|0)!=(0);
+  if ($14) {
+   $15 = $2;
+   $16 = HEAP32[$15>>2]|0;
+   $17 = $16 >>> 11;
+   $18 = $17 & 524288;
+   $19 = ($18|0)!=(0);
+   L4: do {
+    if ($19) {
+     $20 = $2;
+     $21 = ((($20)) + 20|0);
+     $22 = HEAP32[$21>>2]|0;
+     $2 = $22;
+     while(1) {
+      $23 = $2;
+      $24 = HEAP32[$23>>2]|0;
+      $25 = $24 >>> 11;
+      $26 = $25 & 1048576;
+      $27 = ($26|0)!=(0);
+      $28 = $27 ^ 1;
+      if (!($28)) {
+       break L4;
+      }
+      $29 = $2;
+      $30 = ((($29)) + 20|0);
+      $31 = HEAP32[$30>>2]|0;
+      $2 = $31;
+     }
+    }
+   } while(0);
+   $prepended = 1;
+  }
+ }
+ $oldklass = 0;
+ while(1) {
+  $32 = $2;
+  $33 = ($32|0)!=(0|0);
+  if (!($33)) {
+   break;
+  }
+  $34 = $2;
+  $35 = $oldklass;
+  $36 = ($34|0)!=($35|0);
+  if (!($36)) {
+   break;
+  }
+  $37 = $0;
+  $38 = $2;
+  $39 = $set;
+  _method_entry_loop($37,$38,$39);
+  $40 = $2;
+  $41 = HEAP32[$40>>2]|0;
+  $42 = $41 & 255;
+  $43 = ($42|0)!=(11);
+  $44 = $prepended;
+  $45 = ($44<<24>>24)!=(0);
+  $or$cond = $43 | $45;
+  if ($or$cond) {
+   $46 = $2;
+   $47 = HEAP32[$46>>2]|0;
+   $48 = $47 & 255;
+   $49 = ($48|0)==(12);
+   $50 = $1;
+   $51 = ($50<<24>>24)!=(0);
+   $or$cond3 = $49 | $51;
+   if (!($or$cond3)) {
+    break;
+   }
+  }
+  $52 = $2;
+  $oldklass = $52;
+  $53 = $2;
+  $54 = ((($53)) + 20|0);
+  $55 = HEAP32[$54>>2]|0;
+  $2 = $55;
+ }
+ $56 = $0;
+ _mrb_ary_new($4,$56);
+ ;HEAP32[$ary>>2]=HEAP32[$4>>2]|0;HEAP32[$ary+4>>2]=HEAP32[$4+4>>2]|0;
+ $i = 0;
+ while(1) {
+  $57 = $i;
+  $58 = $set;
+  $59 = HEAP32[$58>>2]|0;
+  $60 = ($57>>>0)<($59>>>0);
+  if (!($60)) {
+   break;
+  }
+  $61 = $i;
+  $62 = (($61>>>0) / 4)&-1;
+  $63 = $set;
+  $64 = ((($63)) + 12|0);
+  $65 = HEAP32[$64>>2]|0;
+  $66 = (($65) + ($62)|0);
+  $67 = HEAP8[$66>>0]|0;
+  $68 = $67&255;
+  $69 = $i;
+  $70 = (($69>>>0) % 4)&-1;
+  $71 = (67959 + ($70)|0);
+  $72 = HEAP8[$71>>0]|0;
+  $73 = $72&255;
+  $74 = $68 & $73;
+  $75 = ($74|0)!=(0);
+  if (!($75)) {
+   $76 = $0;
+   $77 = $i;
+   $78 = $set;
+   $79 = ((($78)) + 16|0);
+   $80 = HEAP32[$79>>2]|0;
+   $81 = (($80) + ($77<<2)|0);
+   $82 = HEAP32[$81>>2]|0;
+   _mrb_symbol_value_1017($5,$82);
+   ;HEAP32[$ary$byval_copy>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy+4>>2]=HEAP32[$ary+4>>2]|0;
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$5+4>>2]|0;
+   _mrb_ary_push($76,$ary$byval_copy,$$byval_copy);
+  }
+  $83 = $i;
+  $84 = (($83) + 1)|0;
+  $i = $84;
+ }
+ $85 = $0;
+ $86 = $set;
+ _kh_destroy_st($85,$86);
+ ;HEAP32[$agg$result>>2]=HEAP32[$ary>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$ary+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _method_entry_loop($mrb,$klass,$set) {
+ $mrb = $mrb|0;
+ $klass = $klass|0;
+ $set = $set|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $5 = 0;
+ var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $h = 0, $i = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $klass;
+ $2 = $set;
+ $3 = $1;
+ $4 = ((($3)) + 16|0);
+ $5 = HEAP32[$4>>2]|0;
+ $h = $5;
+ $6 = $h;
+ $7 = ($6|0)!=(0|0);
+ if (!($7)) {
+  STACKTOP = sp;return;
+ }
+ $i = 0;
+ while(1) {
+  $8 = $i;
+  $9 = $h;
+  $10 = HEAP32[$9>>2]|0;
+  $11 = ($8>>>0)<($10>>>0);
+  if (!($11)) {
+   break;
+  }
+  $12 = $i;
+  $13 = (($12>>>0) / 4)&-1;
+  $14 = $h;
+  $15 = ((($14)) + 12|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = (($16) + ($13)|0);
+  $18 = HEAP8[$17>>0]|0;
+  $19 = $18&255;
+  $20 = $i;
+  $21 = (($20>>>0) % 4)&-1;
+  $22 = (67959 + ($21)|0);
+  $23 = HEAP8[$22>>0]|0;
+  $24 = $23&255;
+  $25 = $19 & $24;
+  $26 = ($25|0)!=(0);
+  if (!($26)) {
+   $27 = $i;
+   $28 = $h;
+   $29 = ((($28)) + 20|0);
+   $30 = HEAP32[$29>>2]|0;
+   $31 = (($30) + ($27<<2)|0);
+   $32 = HEAP32[$31>>2]|0;
+   $33 = ($32|0)!=(0|0);
+   if ($33) {
+    $34 = $0;
+    $35 = $2;
+    $36 = $i;
+    $37 = $h;
+    $38 = ((($37)) + 16|0);
+    $39 = HEAP32[$38>>2]|0;
+    $40 = (($39) + ($36<<2)|0);
+    $41 = HEAP32[$40>>2]|0;
+    (_kh_put_st($34,$35,$41,0)|0);
+   }
+  }
+  $42 = $i;
+  $43 = (($42) + 1)|0;
+  $i = $43;
+ }
+ STACKTOP = sp;return;
+}
+function _mrb_symbol_value_1017($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 4;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_f_raise($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $$byval_copy = 0, $$byval_copy2 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var $a = 0, $argc = 0, $exc = 0, $exc$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $exc$byval_copy = sp + 96|0;
+ $$byval_copy2 = sp + 88|0;
+ $$byval_copy = sp + 80|0;
+ $vararg_buffer = sp;
+ $a = sp + 56|0;
+ $exc = sp + 48|0;
+ $1 = sp + 32|0;
+ $2 = sp + 24|0;
+ $3 = sp + 16|0;
+ $4 = sp + 8|0;
+ $0 = $mrb;
+ $5 = $0;
+ $6 = ((($a)) + 8|0);
+ HEAP32[$vararg_buffer>>2] = $a;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $6;
+ $7 = (_mrb_get_args($5,67963,$vararg_buffer)|0);
+ $argc = $7;
+ $8 = $argc;
+ switch ($8|0) {
+ case 0:  {
+  $9 = $0;
+  $10 = $0;
+  $11 = (_mrb_class_get($10,67967)|0);
+  _mrb_raise($9,$11,75440);
+  // unreachable;
+  break;
+ }
+ case 1:  {
+  label = 3;
+  break;
+ }
+ default: {
+ }
+ }
+ do {
+  if ((label|0) == 3) {
+   $12 = ((($a)) + 8|0);
+   $13 = $0;
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$a>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$a+4>>2]|0;
+   _mrb_check_string_type($1,$13,$$byval_copy);
+   ;HEAP32[$12>>2]=HEAP32[$1>>2]|0;HEAP32[$12+4>>2]=HEAP32[$1+4>>2]|0;
+   $14 = ((($a)) + 8|0);
+   $15 = ((($14)) + 4|0);
+   $16 = HEAP32[$15>>2]|0;
+   $17 = ($16|0)==(0);
+   if ($17) {
+    $18 = ((($a)) + 8|0);
+    $19 = HEAP32[$18>>2]|0;
+    $20 = ($19|0)!=(0);
+    if (!($20)) {
+     break;
+    }
+   }
+   $argc = 2;
+   $21 = $0;
+   $22 = (_mrb_class_get($21,67967)|0);
+   _mrb_obj_value_1005($2,$22);
+   ;HEAP32[$a>>2]=HEAP32[$2>>2]|0;HEAP32[$a+4>>2]=HEAP32[$2+4>>2]|0;
+  }
+ } while(0);
+ $23 = $0;
+ $24 = $argc;
+ _mrb_make_exception($3,$23,$24,$a);
+ ;HEAP32[$exc>>2]=HEAP32[$3>>2]|0;HEAP32[$exc+4>>2]=HEAP32[$3+4>>2]|0;
+ $25 = $0;
+ $26 = HEAP32[$exc>>2]|0;
+ $27 = $0;
+ $28 = (_mrb_intern_static($27,67980,6)|0);
+ $29 = $0;
+ $30 = $0;
+ $31 = ((($30)) + 12|0);
+ $32 = HEAP32[$31>>2]|0;
+ $33 = ((($32)) + 16|0);
+ $34 = HEAP32[$33>>2]|0;
+ $35 = ((($34)) + 28|0);
+ $36 = HEAP32[$35>>2]|0;
+ _mrb_cptr_value_1022($4,$29,$36);
+ ;HEAP32[$$byval_copy2>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$4+4>>2]|0;
+ _mrb_obj_iv_set($25,$26,$28,$$byval_copy2);
+ $37 = $0;
+ ;HEAP32[$exc$byval_copy>>2]=HEAP32[$exc>>2]|0;HEAP32[$exc$byval_copy+4>>2]=HEAP32[$exc+4>>2]|0;
+ _mrb_exc_raise($37,$exc$byval_copy);
+ // unreachable;
+}
+function _mrb_cptr_value_1022($agg$result,$mrb,$p) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $mrb;
+ $1 = $p;
+ $2 = ((($v)) + 4|0);
+ HEAP32[$2>>2] = 7;
+ $3 = $1;
+ HEAP32[$v>>2] = $3;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_init_kernel($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0;
+ var $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0;
+ var $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0;
+ var $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0;
+ var $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0;
+ var $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $krn = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = (_mrb_define_module($1,69618)|0);
+ $krn = $2;
+ $3 = $0;
+ $4 = ((($3)) + 84|0);
+ HEAP32[$4>>2] = $2;
+ $5 = $0;
+ $6 = $krn;
+ _mrb_define_class_method($5,$6,67987,283,0);
+ $7 = $0;
+ $8 = $krn;
+ _mrb_define_class_method($7,$8,68000,284,0);
+ $9 = $0;
+ $10 = $krn;
+ _mrb_define_class_method($9,$10,68017,283,0);
+ $11 = $0;
+ $12 = $krn;
+ _mrb_define_class_method($11,$12,68027,285,0);
+ $13 = $0;
+ $14 = $krn;
+ _mrb_define_class_method($13,$14,68043,286,16384);
+ $15 = $0;
+ $16 = $krn;
+ _mrb_define_method($15,$16,68049,199,0);
+ $17 = $0;
+ $18 = $krn;
+ _mrb_define_method($17,$18,68902,287,262144);
+ $19 = $0;
+ $20 = $krn;
+ _mrb_define_method($19,$20,68065,288,262144);
+ $21 = $0;
+ $22 = $krn;
+ _mrb_define_method($21,$22,69450,289,262144);
+ $23 = $0;
+ $24 = $krn;
+ _mrb_define_method($23,$24,68068,290,0);
+ $25 = $0;
+ $26 = $krn;
+ _mrb_define_method($25,$26,68075,291,4096);
+ $27 = $0;
+ $28 = $krn;
+ _mrb_define_method($27,$28,67987,283,0);
+ $29 = $0;
+ $30 = $krn;
+ _mrb_define_method($29,$30,68084,292,0);
+ $31 = $0;
+ $32 = $krn;
+ _mrb_define_method($31,$32,68090,293,0);
+ $33 = $0;
+ $34 = $krn;
+ _mrb_define_method($33,$34,68096,294,0);
+ $35 = $0;
+ $36 = $krn;
+ _mrb_define_method($35,$36,68994,287,262144);
+ $37 = $0;
+ $38 = $krn;
+ _mrb_define_method($37,$38,68100,287,262144);
+ $39 = $0;
+ $40 = $krn;
+ _mrb_define_method($39,$40,68107,295,4096);
+ $41 = $0;
+ $42 = $krn;
+ _mrb_define_method($41,$42,68000,284,0);
+ $43 = $0;
+ $44 = $krn;
+ _mrb_define_method($43,$44,68178,296,0);
+ $45 = $0;
+ $46 = $krn;
+ _mrb_define_method($45,$46,68999,297,262144);
+ $47 = $0;
+ $48 = $krn;
+ _mrb_define_method($47,$48,68986,298,0);
+ $49 = $0;
+ $50 = $krn;
+ _mrb_define_method($49,$50,68229,299,4096);
+ $51 = $0;
+ $52 = $krn;
+ _mrb_define_method($51,$52,68243,300,262144);
+ $53 = $0;
+ $54 = $krn;
+ _mrb_define_method($53,$54,68258,301,262144);
+ $55 = $0;
+ $56 = $krn;
+ _mrb_define_method($55,$56,68287,302,262144);
+ $57 = $0;
+ $58 = $krn;
+ _mrb_define_method($57,$58,68309,303,524288);
+ $59 = $0;
+ $60 = $krn;
+ _mrb_define_method($59,$60,68334,304,0);
+ $61 = $0;
+ $62 = $krn;
+ _mrb_define_method($61,$62,68353,305,262144);
+ $63 = $0;
+ $64 = $krn;
+ _mrb_define_method($63,$64,68017,283,0);
+ $65 = $0;
+ $66 = $krn;
+ _mrb_define_method($65,$66,68359,305,262144);
+ $67 = $0;
+ $68 = $krn;
+ _mrb_define_method($67,$68,68027,285,0);
+ $69 = $0;
+ $70 = $krn;
+ _mrb_define_method($69,$70,68368,306,8192);
+ $71 = $0;
+ $72 = $krn;
+ _mrb_define_method($71,$72,68379,307,0);
+ $73 = $0;
+ $74 = $krn;
+ _mrb_define_method($73,$74,68384,290,0);
+ $75 = $0;
+ $76 = $krn;
+ _mrb_define_method($75,$76,68394,308,8192);
+ $77 = $0;
+ $78 = $krn;
+ _mrb_define_method($77,$78,68410,309,8192);
+ $79 = $0;
+ $80 = $krn;
+ _mrb_define_method($79,$80,68428,310,8192);
+ $81 = $0;
+ $82 = $krn;
+ _mrb_define_method($81,$82,68043,286,4096);
+ $83 = $0;
+ $84 = $krn;
+ _mrb_define_method($83,$84,68443,311,262144);
+ $85 = $0;
+ $86 = $krn;
+ _mrb_define_method($85,$86,68501,312,4096);
+ $87 = $0;
+ $88 = $krn;
+ _mrb_define_method($87,$88,68556,291,4096);
+ $89 = $0;
+ $90 = $krn;
+ _mrb_define_method($89,$90,68561,313,8192);
+ $91 = $0;
+ $92 = $krn;
+ _mrb_define_method($91,$92,68579,314,4096);
+ $93 = $0;
+ $94 = $krn;
+ _mrb_define_method($93,$94,68977,282,0);
+ $95 = $0;
+ $96 = $krn;
+ _mrb_define_method($95,$96,69439,315,262144);
+ $97 = $0;
+ $98 = $0;
+ $99 = ((($98)) + 32|0);
+ $100 = HEAP32[$99>>2]|0;
+ $101 = $0;
+ $102 = ((($101)) + 84|0);
+ $103 = HEAP32[$102>>2]|0;
+ _mrb_include_module($97,$100,$103);
+ $104 = $0;
+ $105 = $0;
+ $106 = ((($105)) + 40|0);
+ $107 = HEAP32[$106>>2]|0;
+ $108 = $0;
+ $109 = (_mrb_intern_static($108,68096,3)|0);
+ $110 = $0;
+ $111 = (_mrb_intern_static($110,68090,5)|0);
+ _mrb_alias_method($104,$107,$109,$111);
+ STACKTOP = sp;return;
+}
+function _mrb_f_block_given_p_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
+ var $81 = 0, $82 = 0, $83 = 0, $9 = 0, $bp = 0, $ci = 0, $e = 0, $given_p = 0, $sp = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = ((($1)) + 12|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ((($3)) + 16|0);
+ $5 = HEAP32[$4>>2]|0;
+ $ci = $5;
+ $6 = $ci;
+ $7 = ((($6)) + 8|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ((($8)) + 8|0);
+ $bp = $9;
+ $10 = $ci;
+ $11 = ((($10)) + -48|0);
+ $ci = $11;
+ $12 = $ci;
+ $13 = $0;
+ $14 = ((($13)) + 12|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = ((($15)) + 20|0);
+ $17 = HEAP32[$16>>2]|0;
+ $18 = ($12>>>0)<=($17>>>0);
+ if ($18) {
+  $given_p = 0;
+ } else {
+  $19 = $ci;
+  $20 = ((($19)) + 4|0);
+  $21 = HEAP32[$20>>2]|0;
+  $22 = ((($21)) + 20|0);
+  $23 = HEAP32[$22>>2]|0;
+  $24 = ($23|0)!=(0|0);
+  do {
+   if ($24) {
+    $25 = $ci;
+    $26 = ((($25)) + 4|0);
+    $27 = HEAP32[$26>>2]|0;
+    $28 = ((($27)) + 20|0);
+    $29 = HEAP32[$28>>2]|0;
+    $e = $29;
+    while(1) {
+     $30 = $e;
+     $31 = ((($30)) + 4|0);
+     $32 = HEAP32[$31>>2]|0;
+     $33 = ($32|0)!=(0|0);
+     $34 = $e;
+     if (!($33)) {
+      break;
+     }
+     $35 = ((($34)) + 4|0);
+     $36 = HEAP32[$35>>2]|0;
+     $e = $36;
+    }
+    $37 = ((($34)) + 12|0);
+    $38 = HEAP32[$37>>2]|0;
+    $sp = $38;
+    $39 = $sp;
+    $40 = ($39|0)!=(0|0);
+    if ($40) {
+     $41 = $sp;
+     $42 = $0;
+     $43 = ((($42)) + 12|0);
+     $44 = HEAP32[$43>>2]|0;
+     $45 = ((($44)) + 8|0);
+     $46 = HEAP32[$45>>2]|0;
+     $47 = ($41|0)==($46|0);
+     if (!($47)) {
+      $48 = $0;
+      $49 = ((($48)) + 12|0);
+      $50 = HEAP32[$49>>2]|0;
+      $51 = ((($50)) + 20|0);
+      $52 = HEAP32[$51>>2]|0;
+      $53 = $e;
+      $54 = ((($53)) + 20|0);
+      $55 = HEAP32[$54>>2]|0;
+      $56 = (($52) + (($55*48)|0)|0);
+      $ci = $56;
+      $57 = $ci;
+      $58 = ((($57)) + 48|0);
+      $59 = ((($58)) + 8|0);
+      $60 = HEAP32[$59>>2]|0;
+      $61 = ((($60)) + 8|0);
+      $bp = $61;
+      break;
+     }
+     _mrb_false_value_1027($agg$result);
+     STACKTOP = sp;return;
+    }
+   }
+  } while(0);
+  $62 = $ci;
+  $63 = ((($62)) + 36|0);
+  $64 = HEAP32[$63>>2]|0;
+  $65 = ($64|0)>(0);
+  if ($65) {
+   $66 = $ci;
+   $67 = ((($66)) + 36|0);
+   $68 = HEAP32[$67>>2]|0;
+   $69 = $bp;
+   $70 = (($69) + ($68<<3)|0);
+   $bp = $70;
+  }
+  $71 = $bp;
+  $72 = ((($71)) + 4|0);
+  $73 = HEAP32[$72>>2]|0;
+  $74 = ($73|0)==(0);
+  if ($74) {
+   $75 = $bp;
+   $76 = HEAP32[$75>>2]|0;
+   $77 = ($76|0)!=(0);
+   $78 = $77 ^ 1;
+   $80 = $78;
+  } else {
+   $80 = 0;
+  }
+  $79 = $80 ^ 1;
+  $81 = $79&1;
+  $82 = $81&255;
+  $given_p = $82;
+ }
+ $83 = $given_p;
+ _mrb_bool_value_1028($agg$result,$83);
+ STACKTOP = sp;return;
+}
+function _mrb_false_value_1027($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_bool_value_1028($agg$result,$boolean) {
+ $agg$result = $agg$result|0;
+ $boolean = $boolean|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $boolean;
+ $1 = $0;
+ $2 = $1&255;
+ $3 = ($2|0)!=(0);
+ $4 = $3 ? 2 : 0;
+ $5 = ((($v)) + 4|0);
+ HEAP32[$5>>2] = $4;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_local_variables($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $$byval_copy = 0, $$byval_copy2 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0;
+ var $114 = 0, $115 = 0, $116 = 0, $117 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
+ var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0;
+ var $e = 0, $i = 0, $irep = 0, $proc = 0, $ret = 0, $ret$byval_copy = 0, $ret$byval_copy1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy2 = sp + 88|0;
+ $ret$byval_copy1 = sp + 80|0;
+ $$byval_copy = sp + 72|0;
+ $ret$byval_copy = sp + 64|0;
+ $ret = sp + 48|0;
+ $1 = sp + 24|0;
+ $2 = sp + 16|0;
+ $3 = sp;
+ $0 = $mrb;
+ $4 = $0;
+ $5 = ((($4)) + 12|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = ((($6)) + 16|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ((($8)) + -48|0);
+ $10 = ((($9)) + 4|0);
+ $11 = HEAP32[$10>>2]|0;
+ $proc = $11;
+ $12 = $proc;
+ $13 = HEAP32[$12>>2]|0;
+ $14 = $13 >>> 11;
+ $15 = $14 & 128;
+ $16 = ($15|0)!=(0);
+ if ($16) {
+  $17 = $0;
+  _mrb_ary_new($agg$result,$17);
+  STACKTOP = sp;return;
+ }
+ $18 = $proc;
+ $19 = ((($18)) + 12|0);
+ $20 = HEAP32[$19>>2]|0;
+ $irep = $20;
+ $21 = $irep;
+ $22 = ((($21)) + 24|0);
+ $23 = HEAP32[$22>>2]|0;
+ $24 = ($23|0)!=(0|0);
+ $25 = $0;
+ if (!($24)) {
+  _mrb_ary_new($agg$result,$25);
+  STACKTOP = sp;return;
+ }
+ $26 = $irep;
+ $27 = HEAP16[$26>>1]|0;
+ $28 = $27&65535;
+ $29 = (($28) - 1)|0;
+ _mrb_ary_new_capa($1,$25,$29);
+ ;HEAP32[$ret>>2]=HEAP32[$1>>2]|0;HEAP32[$ret+4>>2]=HEAP32[$1+4>>2]|0;
+ $i = 0;
+ while(1) {
+  $30 = $i;
+  $31 = (($30) + 1)|0;
+  $32 = $irep;
+  $33 = HEAP16[$32>>1]|0;
+  $34 = $33&65535;
+  $35 = ($31>>>0)<($34>>>0);
+  if (!($35)) {
+   break;
+  }
+  $36 = $i;
+  $37 = $irep;
+  $38 = ((($37)) + 24|0);
+  $39 = HEAP32[$38>>2]|0;
+  $40 = (($39) + ($36<<3)|0);
+  $41 = HEAP32[$40>>2]|0;
+  $42 = ($41|0)!=(0);
+  if ($42) {
+   $43 = $0;
+   $44 = $i;
+   $45 = $irep;
+   $46 = ((($45)) + 24|0);
+   $47 = HEAP32[$46>>2]|0;
+   $48 = (($47) + ($44<<3)|0);
+   $49 = HEAP32[$48>>2]|0;
+   _mrb_symbol_value_1017($2,$49);
+   ;HEAP32[$ret$byval_copy>>2]=HEAP32[$ret>>2]|0;HEAP32[$ret$byval_copy+4>>2]=HEAP32[$ret+4>>2]|0;
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+   _mrb_ary_push($43,$ret$byval_copy,$$byval_copy);
+  }
+  $50 = $i;
+  $51 = (($50) + 1)|0;
+  $i = $51;
+ }
+ $52 = $proc;
+ $53 = ((($52)) + 20|0);
+ $54 = HEAP32[$53>>2]|0;
+ $55 = ($54|0)!=(0|0);
+ L16: do {
+  if ($55) {
+   $56 = $proc;
+   $57 = ((($56)) + 20|0);
+   $58 = HEAP32[$57>>2]|0;
+   $e = $58;
+   while(1) {
+    $59 = $e;
+    $60 = ($59|0)!=(0|0);
+    if (!($60)) {
+     break L16;
+    }
+    $61 = $e;
+    $62 = ((($61)) + 20|0);
+    $63 = HEAP32[$62>>2]|0;
+    $64 = $0;
+    $65 = ((($64)) + 12|0);
+    $66 = HEAP32[$65>>2]|0;
+    $67 = ((($66)) + 20|0);
+    $68 = HEAP32[$67>>2]|0;
+    $69 = (($68) + (($63*48)|0)|0);
+    $70 = ((($69)) + 4|0);
+    $71 = HEAP32[$70>>2]|0;
+    $72 = HEAP32[$71>>2]|0;
+    $73 = $72 >>> 11;
+    $74 = $73 & 128;
+    $75 = ($74|0)!=(0);
+    L21: do {
+     if (!($75)) {
+      $76 = $e;
+      $77 = ((($76)) + 20|0);
+      $78 = HEAP32[$77>>2]|0;
+      $79 = $0;
+      $80 = ((($79)) + 12|0);
+      $81 = HEAP32[$80>>2]|0;
+      $82 = ((($81)) + 20|0);
+      $83 = HEAP32[$82>>2]|0;
+      $84 = (($83) + (($78*48)|0)|0);
+      $85 = ((($84)) + 4|0);
+      $86 = HEAP32[$85>>2]|0;
+      $87 = ((($86)) + 12|0);
+      $88 = HEAP32[$87>>2]|0;
+      $irep = $88;
+      $89 = $irep;
+      $90 = ((($89)) + 24|0);
+      $91 = HEAP32[$90>>2]|0;
+      $92 = ($91|0)!=(0|0);
+      if ($92) {
+       $i = 0;
+       while(1) {
+        $93 = $i;
+        $94 = (($93) + 1)|0;
+        $95 = $irep;
+        $96 = HEAP16[$95>>1]|0;
+        $97 = $96&65535;
+        $98 = ($94>>>0)<($97>>>0);
+        if (!($98)) {
+         break L21;
+        }
+        $99 = $i;
+        $100 = $irep;
+        $101 = ((($100)) + 24|0);
+        $102 = HEAP32[$101>>2]|0;
+        $103 = (($102) + ($99<<3)|0);
+        $104 = HEAP32[$103>>2]|0;
+        $105 = ($104|0)!=(0);
+        if ($105) {
+         $106 = $0;
+         $107 = $i;
+         $108 = $irep;
+         $109 = ((($108)) + 24|0);
+         $110 = HEAP32[$109>>2]|0;
+         $111 = (($110) + ($107<<3)|0);
+         $112 = HEAP32[$111>>2]|0;
+         _mrb_symbol_value_1017($3,$112);
+         ;HEAP32[$ret$byval_copy1>>2]=HEAP32[$ret>>2]|0;HEAP32[$ret$byval_copy1+4>>2]=HEAP32[$ret+4>>2]|0;
+         ;HEAP32[$$byval_copy2>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$3+4>>2]|0;
+         _mrb_ary_push($106,$ret$byval_copy1,$$byval_copy2);
+        }
+        $113 = $i;
+        $114 = (($113) + 1)|0;
+        $i = $114;
+       }
+      }
+     }
+    } while(0);
+    $115 = $e;
+    $116 = ((($115)) + 4|0);
+    $117 = HEAP32[$116>>2]|0;
+    $e = $117;
+   }
+  }
+ } while(0);
+ ;HEAP32[$agg$result>>2]=HEAP32[$ret>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$ret+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_obj_equal_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $arg = 0, $arg$byval_copy = 0, $self$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $arg$byval_copy = sp + 32|0;
+ $self$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $arg = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $arg;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ ;HEAP32[$arg$byval_copy>>2]=HEAP32[$arg>>2]|0;HEAP32[$arg$byval_copy+4>>2]=HEAP32[$arg+4>>2]|0;
+ $3 = (_mrb_obj_equal($2,$self$byval_copy,$arg$byval_copy)|0);
+ _mrb_bool_value_1028($agg$result,$3);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_not_equal_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $arg = 0, $arg$byval_copy = 0, $self$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $arg$byval_copy = sp + 32|0;
+ $self$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $arg = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $arg;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ ;HEAP32[$arg$byval_copy>>2]=HEAP32[$arg>>2]|0;HEAP32[$arg$byval_copy+4>>2]=HEAP32[$arg+4>>2]|0;
+ $3 = (_mrb_equal($2,$self$byval_copy,$arg$byval_copy)|0);
+ $4 = ($3<<24>>24)!=(0);
+ $5 = $4 ^ 1;
+ $6 = $5&1;
+ $7 = $6&255;
+ _mrb_bool_value_1028($agg$result,$7);
+ STACKTOP = sp;return;
+}
+function _mrb_equal_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $arg = 0, $arg$byval_copy = 0, $self$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $arg$byval_copy = sp + 32|0;
+ $self$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $arg = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $arg;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ ;HEAP32[$arg$byval_copy>>2]=HEAP32[$arg>>2]|0;HEAP32[$arg$byval_copy+4>>2]=HEAP32[$arg+4>>2]|0;
+ $3 = (_mrb_equal($2,$self$byval_copy,$arg$byval_copy)|0);
+ _mrb_bool_value_1028($agg$result,$3);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_id_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $self$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ $1 = (_mrb_obj_id($self$byval_copy)|0);
+ _mrb_fixnum_value_1010($agg$result,$1);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_class_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $self$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ $2 = (_mrb_obj_class($1,$self$byval_copy)|0);
+ _mrb_obj_value_1005($agg$result,$2);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_extend_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $argc = 0, $argv = 0, $self$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $argv = sp + 12|0;
+ $argc = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $argv;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $argc;
+ (_mrb_get_args($1,68114,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP32[$argc>>2]|0;
+ $4 = HEAP32[$argv>>2]|0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _mrb_obj_extend($agg$result,$2,$3,$4,$self$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_extend($agg$result,$mrb,$argc,$argv,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $argc = $argc|0;
+ $argv = $argv|0;
+ $obj = $obj|0;
+ var $$byval_copy = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
+ var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy5 = sp + 64|0;
+ $$byval_copy4 = sp + 56|0;
+ $$byval_copy = sp + 48|0;
+ $vararg_buffer1 = sp + 8|0;
+ $vararg_buffer = sp;
+ $3 = sp + 24|0;
+ $4 = sp + 16|0;
+ $0 = $mrb;
+ $1 = $argc;
+ $2 = $argv;
+ $5 = $1;
+ $6 = ($5|0)==(0);
+ if ($6) {
+  $7 = $0;
+  $8 = $0;
+  $9 = (_mrb_class_get($8,68855)|0);
+  _mrb_raise($7,$9,68116);
+  // unreachable;
+ }
+ $i = 0;
+ while(1) {
+  $10 = $i;
+  $11 = $1;
+  $12 = ($10|0)<($11|0);
+  if (!($12)) {
+   break;
+  }
+  $13 = $0;
+  $14 = $i;
+  $15 = $2;
+  $16 = (($15) + ($14<<3)|0);
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$16>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$16+4>>2]|0;
+  _mrb_check_type($13,$$byval_copy,10);
+  $17 = $i;
+  $18 = (($17) + 1)|0;
+  $i = $18;
+ }
+ while(1) {
+  $19 = $1;
+  $20 = (($19) + -1)|0;
+  $1 = $20;
+  $21 = ($19|0)!=(0);
+  if (!($21)) {
+   break;
+  }
+  $22 = $0;
+  $23 = $1;
+  $24 = $2;
+  $25 = (($24) + ($23<<3)|0);
+  ;HEAP8[$vararg_buffer>>0]=HEAP8[$obj>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$obj+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$obj+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$obj+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$obj+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$obj+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$obj+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$obj+7>>0]|0;
+  ;HEAP32[$$byval_copy4>>2]=HEAP32[$25>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$25+4>>2]|0;
+  _mrb_funcall($3,$22,$$byval_copy4,68155,1,$vararg_buffer);
+  $26 = $0;
+  $27 = $1;
+  $28 = $2;
+  $29 = (($28) + ($27<<3)|0);
+  ;HEAP8[$vararg_buffer1>>0]=HEAP8[$obj>>0]|0;HEAP8[$vararg_buffer1+1>>0]=HEAP8[$obj+1>>0]|0;HEAP8[$vararg_buffer1+2>>0]=HEAP8[$obj+2>>0]|0;HEAP8[$vararg_buffer1+3>>0]=HEAP8[$obj+3>>0]|0;HEAP8[$vararg_buffer1+4>>0]=HEAP8[$obj+4>>0]|0;HEAP8[$vararg_buffer1+5>>0]=HEAP8[$obj+5>>0]|0;HEAP8[$vararg_buffer1+6>>0]=HEAP8[$obj+6>>0]|0;HEAP8[$vararg_buffer1+7>>0]=HEAP8[$obj+7>>0]|0;
+  ;HEAP32[$$byval_copy5>>2]=HEAP32[$29>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$29+4>>2]|0;
+  _mrb_funcall($4,$26,$$byval_copy5,68169,1,$vararg_buffer1);
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$obj>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$obj+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_obj_init_copy($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $orig = 0, $orig$byval_copy = 0;
+ var $orig$byval_copy2 = 0, $self$byval_copy = 0, $self$byval_copy1 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $orig$byval_copy2 = sp + 48|0;
+ $self$byval_copy1 = sp + 40|0;
+ $orig$byval_copy = sp + 32|0;
+ $self$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $orig = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $orig;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ ;HEAP32[$orig$byval_copy>>2]=HEAP32[$orig>>2]|0;HEAP32[$orig$byval_copy+4>>2]=HEAP32[$orig+4>>2]|0;
+ $3 = (_mrb_obj_equal($2,$self$byval_copy,$orig$byval_copy)|0);
+ $4 = ($3<<24>>24)!=(0);
+ if ($4) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $5 = ((($self)) + 4|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = ((($orig)) + 4|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ($6|0)!=($8|0);
+ if ($9) {
+  $15 = $0;
+  $16 = $0;
+  $17 = (_mrb_class_get($16,68905)|0);
+  _mrb_raise($15,$17,68183);
+  // unreachable;
+ }
+ $10 = $0;
+ ;HEAP32[$self$byval_copy1>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy1+4>>2]=HEAP32[$self+4>>2]|0;
+ $11 = (_mrb_obj_class($10,$self$byval_copy1)|0);
+ $12 = $0;
+ ;HEAP32[$orig$byval_copy2>>2]=HEAP32[$orig>>2]|0;HEAP32[$orig$byval_copy2+4>>2]=HEAP32[$orig+4>>2]|0;
+ $13 = (_mrb_obj_class($12,$orig$byval_copy2)|0);
+ $14 = ($11|0)!=($13|0);
+ if ($14) {
+  $15 = $0;
+  $16 = $0;
+  $17 = (_mrb_class_get($16,68905)|0);
+  _mrb_raise($15,$17,68183);
+  // unreachable;
+ }
+ ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _obj_is_instance_of($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $arg = 0, $self$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $arg = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $arg;
+ (_mrb_get_args($1,68256,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP32[$arg>>2]|0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ $4 = (_mrb_obj_is_instance_of($2,$self$byval_copy,$3)|0);
+ _mrb_bool_value_1028($agg$result,$4);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_ivar_defined($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $self$byval_copy = 0, $sym = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 16|0;
+ $vararg_buffer = sp;
+ $sym = sp + 4|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $sym;
+ (_mrb_get_args($1,68285,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP32[$sym>>2]|0;
+ _mrb_iv_check($2,$3);
+ $4 = $0;
+ $5 = HEAP32[$sym>>2]|0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ $6 = (_mrb_iv_defined($4,$self$byval_copy,$5)|0);
+ _mrb_bool_value_1028($agg$result,$6);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_ivar_get($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $iv_name = 0, $self$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 16|0;
+ $vararg_buffer = sp;
+ $iv_name = sp + 4|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $iv_name;
+ (_mrb_get_args($1,68285,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP32[$iv_name>>2]|0;
+ _mrb_iv_check($2,$3);
+ $4 = $0;
+ $5 = HEAP32[$iv_name>>2]|0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _mrb_iv_get($agg$result,$4,$self$byval_copy,$5);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_ivar_set($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $iv_name = 0, $self$byval_copy = 0, $val = 0, $val$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy = sp + 32|0;
+ $self$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $iv_name = sp + 16|0;
+ $val = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $iv_name;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $val;
+ (_mrb_get_args($1,68331,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP32[$iv_name>>2]|0;
+ _mrb_iv_check($2,$3);
+ $4 = $0;
+ $5 = HEAP32[$iv_name>>2]|0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+ _mrb_iv_set($4,$self$byval_copy,$5,$val$byval_copy);
+ ;HEAP32[$agg$result>>2]=HEAP32[$val>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$val+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_obj_is_kind_of_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $arg = 0, $self$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $arg = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $arg;
+ (_mrb_get_args($1,68256,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP32[$arg>>2]|0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ $4 = (_mrb_obj_is_kind_of($2,$self$byval_copy,$3)|0);
+ _mrb_bool_value_1028($agg$result,$4);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_methods_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $recur = 0, $self$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 8|0;
+ $vararg_buffer = sp;
+ $recur = sp + 16|0;
+ $0 = $mrb;
+ HEAP8[$recur>>0] = 1;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $recur;
+ (_mrb_get_args($1,68376,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP8[$recur>>0]|0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _mrb_obj_methods($agg$result,$2,$3,$self$byval_copy,0);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_methods($agg$result,$mrb,$recur,$obj,$flag) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $recur = $recur|0;
+ $obj = $obj|0;
+ $flag = $flag|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $obj$byval_copy = 0, $obj$byval_copy1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy1 = sp + 16|0;
+ $obj$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $recur;
+ $2 = $flag;
+ $3 = $1;
+ $4 = ($3<<24>>24)!=(0);
+ $5 = $0;
+ $6 = $1;
+ if ($4) {
+  $7 = $0;
+  ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+  $8 = (_mrb_class_998($7,$obj$byval_copy)|0);
+  _mrb_class_instance_method_list($agg$result,$5,$6,$8,0);
+  STACKTOP = sp;return;
+ } else {
+  ;HEAP32[$obj$byval_copy1>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy1+4>>2]=HEAP32[$obj+4>>2]|0;
+  _mrb_obj_singleton_methods($agg$result,$5,$6,$obj$byval_copy1);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_obj_singleton_methods($agg$result,$mrb,$recur,$obj) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $recur = $recur|0;
+ $obj = $obj|0;
+ var $$byval_copy = 0, $$old = 0, $$old2 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
+ var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0;
+ var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0;
+ var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $7 = 0, $8 = 0, $9 = 0, $ary = 0, $ary$byval_copy = 0, $i = 0, $klass = 0, $obj$byval_copy = 0, $or$cond = 0, $set = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 56|0;
+ $ary$byval_copy = sp + 48|0;
+ $obj$byval_copy = sp + 40|0;
+ $ary = sp + 24|0;
+ $2 = sp + 8|0;
+ $3 = sp;
+ $0 = $mrb;
+ $1 = $recur;
+ $4 = $0;
+ $5 = (_kh_init_st($4)|0);
+ $set = $5;
+ $6 = $0;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ $7 = (_mrb_class_998($6,$obj$byval_copy)|0);
+ $klass = $7;
+ $8 = $klass;
+ $9 = ($8|0)!=(0|0);
+ if ($9) {
+  $10 = $klass;
+  $11 = HEAP32[$10>>2]|0;
+  $12 = $11 & 255;
+  $13 = ($12|0)==(12);
+  if ($13) {
+   $14 = $0;
+   $15 = $klass;
+   $16 = $set;
+   _method_entry_loop($14,$15,$16);
+   $17 = $klass;
+   $18 = ((($17)) + 20|0);
+   $19 = HEAP32[$18>>2]|0;
+   $klass = $19;
+  }
+ }
+ $20 = $1;
+ $21 = ($20<<24>>24)!=(0);
+ $22 = $klass;
+ $23 = ($22|0)!=(0|0);
+ $or$cond = $21 & $23;
+ L5: do {
+  if ($or$cond) {
+   while(1) {
+    $24 = $klass;
+    $25 = HEAP32[$24>>2]|0;
+    $26 = $25 & 255;
+    $27 = ($26|0)==(12);
+    if (!($27)) {
+     $28 = $klass;
+     $29 = HEAP32[$28>>2]|0;
+     $30 = $29 & 255;
+     $31 = ($30|0)==(11);
+     if (!($31)) {
+      break L5;
+     }
+    }
+    $32 = $0;
+    $33 = $klass;
+    $34 = $set;
+    _method_entry_loop($32,$33,$34);
+    $35 = $klass;
+    $36 = ((($35)) + 20|0);
+    $37 = HEAP32[$36>>2]|0;
+    $klass = $37;
+    $$old = $klass;
+    $$old2 = ($$old|0)!=(0|0);
+    if (!($$old2)) {
+     break;
+    }
+   }
+  }
+ } while(0);
+ $38 = $0;
+ _mrb_ary_new($2,$38);
+ ;HEAP32[$ary>>2]=HEAP32[$2>>2]|0;HEAP32[$ary+4>>2]=HEAP32[$2+4>>2]|0;
+ $i = 0;
+ while(1) {
+  $39 = $i;
+  $40 = $set;
+  $41 = HEAP32[$40>>2]|0;
+  $42 = ($39>>>0)<($41>>>0);
+  if (!($42)) {
+   break;
+  }
+  $43 = $i;
+  $44 = (($43>>>0) / 4)&-1;
+  $45 = $set;
+  $46 = ((($45)) + 12|0);
+  $47 = HEAP32[$46>>2]|0;
+  $48 = (($47) + ($44)|0);
+  $49 = HEAP8[$48>>0]|0;
+  $50 = $49&255;
+  $51 = $i;
+  $52 = (($51>>>0) % 4)&-1;
+  $53 = (67959 + ($52)|0);
+  $54 = HEAP8[$53>>0]|0;
+  $55 = $54&255;
+  $56 = $50 & $55;
+  $57 = ($56|0)!=(0);
+  if (!($57)) {
+   $58 = $0;
+   $59 = $i;
+   $60 = $set;
+   $61 = ((($60)) + 16|0);
+   $62 = HEAP32[$61>>2]|0;
+   $63 = (($62) + ($59<<2)|0);
+   $64 = HEAP32[$63>>2]|0;
+   _mrb_symbol_value_1017($3,$64);
+   ;HEAP32[$ary$byval_copy>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy+4>>2]=HEAP32[$ary+4>>2]|0;
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$3+4>>2]|0;
+   _mrb_ary_push($58,$ary$byval_copy,$$byval_copy);
+  }
+  $65 = $i;
+  $66 = (($65) + 1)|0;
+  $i = $66;
+ }
+ $67 = $0;
+ $68 = $set;
+ _kh_destroy_st($67,$68);
+ ;HEAP32[$agg$result>>2]=HEAP32[$ary>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$ary+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_false($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ _mrb_false_value_1027($agg$result);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_private_methods($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $recur = 0, $self$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 8|0;
+ $vararg_buffer = sp;
+ $recur = sp + 16|0;
+ $0 = $mrb;
+ HEAP8[$recur>>0] = 1;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $recur;
+ (_mrb_get_args($1,68376,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP8[$recur>>0]|0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _mrb_obj_methods($agg$result,$2,$3,$self$byval_copy,2);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_protected_methods($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $recur = 0, $self$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 8|0;
+ $vararg_buffer = sp;
+ $recur = sp + 16|0;
+ $0 = $mrb;
+ HEAP8[$recur>>0] = 1;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $recur;
+ (_mrb_get_args($1,68376,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP8[$recur>>0]|0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _mrb_obj_methods($agg$result,$2,$3,$self$byval_copy,4);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_public_methods($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $recur = 0, $self$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 8|0;
+ $vararg_buffer = sp;
+ $recur = sp + 16|0;
+ $0 = $mrb;
+ HEAP8[$recur>>0] = 1;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $recur;
+ (_mrb_get_args($1,68376,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP8[$recur>>0]|0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _mrb_obj_methods($agg$result,$2,$3,$self$byval_copy,0);
+ STACKTOP = sp;return;
+}
+function _mrb_obj_remove_instance_variable($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $self$byval_copy = 0, $sym = 0, $val = 0, $vararg_buffer = 0, $vararg_buffer1 = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 48|0;
+ $vararg_buffer1 = sp + 8|0;
+ $vararg_buffer = sp;
+ $sym = sp + 40|0;
+ $val = sp + 32|0;
+ $1 = sp + 24|0;
+ $2 = sp + 16|0;
+ $0 = $mrb;
+ $3 = $0;
+ HEAP32[$vararg_buffer>>2] = $sym;
+ (_mrb_get_args($3,68285,$vararg_buffer)|0);
+ $4 = $0;
+ $5 = HEAP32[$sym>>2]|0;
+ _mrb_iv_check($4,$5);
+ $6 = $0;
+ $7 = HEAP32[$sym>>2]|0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _mrb_iv_remove($1,$6,$self$byval_copy,$7);
+ ;HEAP32[$val>>2]=HEAP32[$1>>2]|0;HEAP32[$val+4>>2]=HEAP32[$1+4>>2]|0;
+ $8 = ((($val)) + 4|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ($9|0)==(5);
+ if ($10) {
+  $11 = $0;
+  $12 = HEAP32[$sym>>2]|0;
+  $13 = $0;
+  $14 = HEAP32[$sym>>2]|0;
+  _mrb_sym2str($2,$13,$14);
+  ;HEAP8[$vararg_buffer1>>0]=HEAP8[$2>>0]|0;HEAP8[$vararg_buffer1+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$vararg_buffer1+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$vararg_buffer1+3>>0]=HEAP8[$2+3>>0]|0;HEAP8[$vararg_buffer1+4>>0]=HEAP8[$2+4>>0]|0;HEAP8[$vararg_buffer1+5>>0]=HEAP8[$2+5>>0]|0;HEAP8[$vararg_buffer1+6>>0]=HEAP8[$2+6>>0]|0;HEAP8[$vararg_buffer1+7>>0]=HEAP8[$2+7>>0]|0;
+  _mrb_name_error($11,$12,68468,$vararg_buffer1);
+  // unreachable;
+ } else {
+  ;HEAP32[$agg$result>>2]=HEAP32[$val>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$val+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+}
+function _obj_respond_to($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $args = 0, $id = 0, $mid = 0, $mid$byval_copy = 0;
+ var $mid$byval_copy5 = 0, $mid$byval_copy6 = 0, $priv = 0, $respond_to_p = 0, $rtm_id = 0, $self$byval_copy = 0, $self$byval_copy7 = 0, $self$byval_copy8 = 0, $tmp = 0, $vararg_buffer = 0, $vararg_buffer2 = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy8 = sp + 136|0;
+ $self$byval_copy7 = sp + 128|0;
+ $self$byval_copy = sp + 120|0;
+ $mid$byval_copy6 = sp + 112|0;
+ $mid$byval_copy5 = sp + 104|0;
+ $mid$byval_copy = sp + 96|0;
+ $vararg_buffer2 = sp + 8|0;
+ $vararg_buffer = sp;
+ $mid = sp + 80|0;
+ $priv = sp + 145|0;
+ $tmp = sp + 64|0;
+ $1 = sp + 56|0;
+ $2 = sp + 48|0;
+ $3 = sp + 40|0;
+ $args = sp + 24|0;
+ $4 = sp + 16|0;
+ $0 = $mrb;
+ HEAP8[$priv>>0] = 0;
+ $respond_to_p = 1;
+ $5 = $0;
+ HEAP32[$vararg_buffer>>2] = $mid;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $priv;
+ (_mrb_get_args($5,68513,$vararg_buffer)|0);
+ $6 = ((($mid)) + 4|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ($7|0)==(4);
+ do {
+  if ($8) {
+   $9 = HEAP32[$mid>>2]|0;
+   $id = $9;
+  } else {
+   $10 = ((($mid)) + 4|0);
+   $11 = HEAP32[$10>>2]|0;
+   $12 = ($11|0)==(16);
+   if (!($12)) {
+    $13 = $0;
+    ;HEAP32[$mid$byval_copy>>2]=HEAP32[$mid>>2]|0;HEAP32[$mid$byval_copy+4>>2]=HEAP32[$mid+4>>2]|0;
+    _mrb_check_string_type($1,$13,$mid$byval_copy);
+    ;HEAP32[$tmp>>2]=HEAP32[$1>>2]|0;HEAP32[$tmp+4>>2]=HEAP32[$1+4>>2]|0;
+    $14 = ((($tmp)) + 4|0);
+    $15 = HEAP32[$14>>2]|0;
+    $16 = ($15|0)==(0);
+    if ($16) {
+     $17 = HEAP32[$tmp>>2]|0;
+     $18 = ($17|0)!=(0);
+     if (!($18)) {
+      $19 = $0;
+      ;HEAP32[$mid$byval_copy5>>2]=HEAP32[$mid>>2]|0;HEAP32[$mid$byval_copy5+4>>2]=HEAP32[$mid+4>>2]|0;
+      _mrb_inspect($2,$19,$mid$byval_copy5);
+      ;HEAP32[$tmp>>2]=HEAP32[$2>>2]|0;HEAP32[$tmp+4>>2]=HEAP32[$2+4>>2]|0;
+      $20 = $0;
+      $21 = $0;
+      $22 = (_mrb_class_get($21,68905)|0);
+      ;HEAP8[$vararg_buffer2>>0]=HEAP8[$tmp>>0]|0;HEAP8[$vararg_buffer2+1>>0]=HEAP8[$tmp+1>>0]|0;HEAP8[$vararg_buffer2+2>>0]=HEAP8[$tmp+2>>0]|0;HEAP8[$vararg_buffer2+3>>0]=HEAP8[$tmp+3>>0]|0;HEAP8[$vararg_buffer2+4>>0]=HEAP8[$tmp+4>>0]|0;HEAP8[$vararg_buffer2+5>>0]=HEAP8[$tmp+5>>0]|0;HEAP8[$vararg_buffer2+6>>0]=HEAP8[$tmp+6>>0]|0;HEAP8[$vararg_buffer2+7>>0]=HEAP8[$tmp+7>>0]|0;
+      _mrb_raisef($20,$22,68517,$vararg_buffer2);
+      // unreachable;
+     }
+    }
+   }
+   $23 = $0;
+   ;HEAP32[$mid$byval_copy6>>2]=HEAP32[$mid>>2]|0;HEAP32[$mid$byval_copy6+4>>2]=HEAP32[$mid+4>>2]|0;
+   _mrb_check_intern_str($3,$23,$mid$byval_copy6);
+   ;HEAP32[$tmp>>2]=HEAP32[$3>>2]|0;HEAP32[$tmp+4>>2]=HEAP32[$3+4>>2]|0;
+   $24 = ((($tmp)) + 4|0);
+   $25 = HEAP32[$24>>2]|0;
+   $26 = ($25|0)==(0);
+   if ($26) {
+    $27 = HEAP32[$tmp>>2]|0;
+    $28 = ($27|0)!=(0);
+    if (!($28)) {
+     $respond_to_p = 0;
+     break;
+    }
+   }
+   $29 = HEAP32[$tmp>>2]|0;
+   $id = $29;
+  }
+ } while(0);
+ $30 = $respond_to_p;
+ $31 = ($30<<24>>24)!=(0);
+ if ($31) {
+  $32 = $0;
+  $33 = $id;
+  $34 = HEAP8[$priv>>0]|0;
+  $35 = ($34<<24>>24)!=(0);
+  $36 = $35 ^ 1;
+  $37 = $36&1;
+  ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+  $38 = (_basic_obj_respond_to($32,$self$byval_copy,$33,$37)|0);
+  $respond_to_p = $38;
+ }
+ $39 = $respond_to_p;
+ $40 = ($39<<24>>24)!=(0);
+ if (!($40)) {
+  $41 = $0;
+  $42 = (_mrb_intern_static($41,68536,19)|0);
+  $rtm_id = $42;
+  $43 = $0;
+  $44 = $rtm_id;
+  $45 = HEAP8[$priv>>0]|0;
+  $46 = ($45<<24>>24)!=(0);
+  $47 = $46 ^ 1;
+  $48 = $47&1;
+  ;HEAP32[$self$byval_copy7>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy7+4>>2]=HEAP32[$self+4>>2]|0;
+  $49 = (_basic_obj_respond_to($43,$self$byval_copy7,$44,$48)|0);
+  $50 = ($49<<24>>24)!=(0);
+  if ($50) {
+   ;HEAP32[$args>>2]=HEAP32[$mid>>2]|0;HEAP32[$args+4>>2]=HEAP32[$mid+4>>2]|0;
+   $51 = ((($args)) + 8|0);
+   $52 = HEAP8[$priv>>0]|0;
+   _mrb_bool_value_1028($4,$52);
+   ;HEAP32[$51>>2]=HEAP32[$4>>2]|0;HEAP32[$51+4>>2]=HEAP32[$4+4>>2]|0;
+   $53 = $0;
+   $54 = $rtm_id;
+   ;HEAP32[$self$byval_copy8>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy8+4>>2]=HEAP32[$self+4>>2]|0;
+   _mrb_funcall_argv($agg$result,$53,$self$byval_copy8,$54,2,$args);
+   STACKTOP = sp;return;
+  }
+ }
+ $55 = $respond_to_p;
+ _mrb_bool_value_1028($agg$result,$55);
+ STACKTOP = sp;return;
+}
+function _basic_obj_respond_to($mrb,$obj,$id,$pub) {
+ $mrb = $mrb|0;
+ $obj = $obj|0;
+ $id = $id|0;
+ $pub = $pub|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $obj$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $obj$byval_copy = sp + 16|0;
+ $0 = $mrb;
+ $1 = $id;
+ $2 = $pub;
+ $3 = $0;
+ $4 = $1;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ $5 = (_mrb_respond_to($3,$obj$byval_copy,$4)|0);
+ STACKTOP = sp;return ($5|0);
+}
+function _mrb_obj_singleton_methods_m($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $recur = 0, $self$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 8|0;
+ $vararg_buffer = sp;
+ $recur = sp + 16|0;
+ $0 = $mrb;
+ HEAP8[$recur>>0] = 1;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $recur;
+ (_mrb_get_args($1,68376,$vararg_buffer)|0);
+ $2 = $0;
+ $3 = HEAP8[$recur>>0]|0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _mrb_obj_singleton_methods($agg$result,$2,$3,$self$byval_copy);
+ STACKTOP = sp;return;
+}
+function _mod_define_singleton_method($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $blk = 0, $mid = 0, $p = 0, $self$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $self$byval_copy = sp + 40|0;
+ $vararg_buffer = sp;
+ $mid = sp + 24|0;
+ $blk = sp + 16|0;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ _mrb_nil_value_1081($blk);
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $mid;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $blk;
+ (_mrb_get_args($2,68603,$vararg_buffer)|0);
+ $3 = ((($blk)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)==(0);
+ if ($5) {
+  $6 = HEAP32[$blk>>2]|0;
+  $7 = ($6|0)!=(0);
+  if (!($7)) {
+   $8 = $0;
+   $9 = $0;
+   $10 = (_mrb_class_get($9,68855)|0);
+   _mrb_raise($8,$10,68606);
+   // unreachable;
+  }
+ }
+ $11 = $0;
+ $12 = $0;
+ $13 = ((($12)) + 44|0);
+ $14 = HEAP32[$13>>2]|0;
+ $15 = (_mrb_obj_alloc($11,13,$14)|0);
+ $p = $15;
+ $16 = $p;
+ $17 = HEAP32[$blk>>2]|0;
+ _mrb_proc_copy($16,$17);
+ $18 = $p;
+ $19 = HEAP32[$18>>2]|0;
+ $20 = $19 >>> 11;
+ $21 = $20 | 256;
+ $22 = HEAP32[$18>>2]|0;
+ $23 = $21 & 2097151;
+ $24 = $23 << 11;
+ $25 = $22 & 2047;
+ $26 = $25 | $24;
+ HEAP32[$18>>2] = $26;
+ $27 = $0;
+ $28 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _mrb_singleton_class($1,$28,$self$byval_copy);
+ $29 = HEAP32[$1>>2]|0;
+ $30 = HEAP32[$mid>>2]|0;
+ $31 = $p;
+ _mrb_define_method_raw($27,$29,$30,$31);
+ $32 = HEAP32[$mid>>2]|0;
+ _mrb_symbol_value_1017($agg$result,$32);
+ STACKTOP = sp;return;
+}
+function _mrb_nil_value_1081($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_obj_ceqq($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $ary = 0, $ary$byval_copy = 0, $c = 0, $eqq = 0, $i = 0, $len = 0, $self$byval_copy = 0, $v = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 80|0;
+ $ary$byval_copy = sp + 72|0;
+ $self$byval_copy = sp + 64|0;
+ $vararg_buffer = sp;
+ $v = sp + 48|0;
+ $ary = sp + 24|0;
+ $c = sp + 16|0;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = $0;
+ $3 = (_mrb_intern_static($2,69450,3)|0);
+ $eqq = $3;
+ $4 = $0;
+ ;HEAP32[$self$byval_copy>>2]=HEAP32[$self>>2]|0;HEAP32[$self$byval_copy+4>>2]=HEAP32[$self+4>>2]|0;
+ _mrb_ary_splat($ary,$4,$self$byval_copy);
+ $5 = $0;
+ HEAP32[$vararg_buffer>>2] = $v;
+ (_mrb_get_args($5,68900,$vararg_buffer)|0);
+ $6 = HEAP32[$ary>>2]|0;
+ $7 = ((($6)) + 12|0);
+ $8 = HEAP32[$7>>2]|0;
+ $len = $8;
+ $i = 0;
+ while(1) {
+  $9 = $i;
+  $10 = $len;
+  $11 = ($9|0)<($10|0);
+  if (!($11)) {
+   label = 6;
+   break;
+  }
+  $12 = $0;
+  $13 = $i;
+  ;HEAP32[$ary$byval_copy>>2]=HEAP32[$ary>>2]|0;HEAP32[$ary$byval_copy+4>>2]=HEAP32[$ary+4>>2]|0;
+  _mrb_ary_entry($1,$ary$byval_copy,$13);
+  $14 = $eqq;
+  ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;
+  _mrb_funcall_argv($c,$12,$$byval_copy,$14,1,$v);
+  $15 = ((($c)) + 4|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = ($16|0)!=(0);
+  if ($17) {
+   label = 4;
+   break;
+  }
+  $18 = $i;
+  $19 = (($18) + 1)|0;
+  $i = $19;
+ }
+ if ((label|0) == 4) {
+  _mrb_true_value_1085($agg$result);
+  STACKTOP = sp;return;
+ }
+ else if ((label|0) == 6) {
+  _mrb_false_value_1027($agg$result);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_true_value_1085($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 2;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_pool_open($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $pool = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = (_mrb_malloc_simple($1,8)|0);
+ $pool = $2;
+ $3 = $pool;
+ $4 = ($3|0)!=(0|0);
+ if (!($4)) {
+  $9 = $pool;
+  STACKTOP = sp;return ($9|0);
+ }
+ $5 = $0;
+ $6 = $pool;
+ HEAP32[$6>>2] = $5;
+ $7 = $pool;
+ $8 = ((($7)) + 4|0);
+ HEAP32[$8>>2] = 0;
+ $9 = $pool;
+ STACKTOP = sp;return ($9|0);
+}
+function _mrb_pool_close($pool) {
+ $pool = $pool|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $page = 0, $tmp = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $pool;
+ $1 = $0;
+ $2 = ($1|0)!=(0|0);
+ if (!($2)) {
+  STACKTOP = sp;return;
+ }
+ $3 = $0;
+ $4 = ((($3)) + 4|0);
+ $5 = HEAP32[$4>>2]|0;
+ $page = $5;
+ while(1) {
+  $6 = $page;
+  $7 = ($6|0)!=(0|0);
+  if (!($7)) {
+   break;
+  }
+  $8 = $page;
+  $tmp = $8;
+  $9 = $page;
+  $10 = HEAP32[$9>>2]|0;
+  $page = $10;
+  $11 = $0;
+  $12 = HEAP32[$11>>2]|0;
+  $13 = $tmp;
+  _mrb_free($12,$13);
+ }
+ $14 = $0;
+ $15 = HEAP32[$14>>2]|0;
+ $16 = $0;
+ _mrb_free($15,$16);
+ STACKTOP = sp;return;
+}
+function _mrb_pool_alloc($pool,$len) {
+ $pool = $pool|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $7 = 0, $8 = 0, $9 = 0, $n = 0, $page = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $pool;
+ $2 = $len;
+ $3 = $1;
+ $4 = ($3|0)!=(0|0);
+ if (!($4)) {
+  $0 = 0;
+  $65 = $0;
+  STACKTOP = sp;return ($65|0);
+ }
+ $5 = $2;
+ $6 = (-1 - ($5))|0;
+ $7 = (($6) + 1)|0;
+ $8 = $7 & 3;
+ $9 = $2;
+ $10 = (($9) + ($8))|0;
+ $2 = $10;
+ $11 = $1;
+ $12 = ((($11)) + 4|0);
+ $13 = HEAP32[$12>>2]|0;
+ $page = $13;
+ while(1) {
+  $14 = $page;
+  $15 = ($14|0)!=(0|0);
+  if (!($15)) {
+   break;
+  }
+  $16 = $page;
+  $17 = ((($16)) + 4|0);
+  $18 = HEAP32[$17>>2]|0;
+  $19 = $2;
+  $20 = (($18) + ($19))|0;
+  $21 = $page;
+  $22 = ((($21)) + 8|0);
+  $23 = HEAP32[$22>>2]|0;
+  $24 = ($20>>>0)<=($23>>>0);
+  $25 = $page;
+  if ($24) {
+   label = 6;
+   break;
+  }
+  $42 = HEAP32[$25>>2]|0;
+  $page = $42;
+ }
+ if ((label|0) == 6) {
+  $26 = ((($25)) + 4|0);
+  $27 = HEAP32[$26>>2]|0;
+  $n = $27;
+  $28 = $2;
+  $29 = $page;
+  $30 = ((($29)) + 4|0);
+  $31 = HEAP32[$30>>2]|0;
+  $32 = (($31) + ($28))|0;
+  HEAP32[$30>>2] = $32;
+  $33 = $page;
+  $34 = ((($33)) + 16|0);
+  $35 = $n;
+  $36 = (($34) + ($35)|0);
+  $37 = $page;
+  $38 = ((($37)) + 12|0);
+  HEAP32[$38>>2] = $36;
+  $39 = $page;
+  $40 = ((($39)) + 12|0);
+  $41 = HEAP32[$40>>2]|0;
+  $0 = $41;
+  $65 = $0;
+  STACKTOP = sp;return ($65|0);
+ }
+ $43 = $1;
+ $44 = $2;
+ $45 = (_page_alloc($43,$44)|0);
+ $page = $45;
+ $46 = $page;
+ $47 = ($46|0)!=(0|0);
+ if ($47) {
+  $48 = $2;
+  $49 = $page;
+  $50 = ((($49)) + 4|0);
+  HEAP32[$50>>2] = $48;
+  $51 = $1;
+  $52 = ((($51)) + 4|0);
+  $53 = HEAP32[$52>>2]|0;
+  $54 = $page;
+  HEAP32[$54>>2] = $53;
+  $55 = $page;
+  $56 = $1;
+  $57 = ((($56)) + 4|0);
+  HEAP32[$57>>2] = $55;
+  $58 = $page;
+  $59 = ((($58)) + 16|0);
+  $60 = $page;
+  $61 = ((($60)) + 12|0);
+  HEAP32[$61>>2] = $59;
+  $62 = $page;
+  $63 = ((($62)) + 12|0);
+  $64 = HEAP32[$63>>2]|0;
+  $0 = $64;
+  $65 = $0;
+  STACKTOP = sp;return ($65|0);
+ } else {
+  $0 = 0;
+  $65 = $0;
+  STACKTOP = sp;return ($65|0);
+ }
+ return (0)|0;
+}
+function _page_alloc($pool,$len) {
+ $pool = $pool|0;
+ $len = $len|0;
+ var $$len = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $page = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $pool;
+ $1 = $len;
+ $2 = $1;
+ $3 = ($2>>>0)<(4096);
+ $$len = $3 ? 4096 : $len;
+ $1 = $$len;
+ $4 = $0;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $1;
+ $7 = (20 + ($6))|0;
+ $8 = (_mrb_malloc_simple($5,$7)|0);
+ $page = $8;
+ $9 = $page;
+ $10 = ($9|0)!=(0|0);
+ if (!($10)) {
+  $16 = $page;
+  STACKTOP = sp;return ($16|0);
+ }
+ $11 = $page;
+ $12 = ((($11)) + 4|0);
+ HEAP32[$12>>2] = 0;
+ $13 = $1;
+ $14 = $page;
+ $15 = ((($14)) + 8|0);
+ HEAP32[$15>>2] = $13;
+ $16 = $page;
+ STACKTOP = sp;return ($16|0);
+}
+function _mrb_proc_new($mrb,$irep) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $5 = 0;
+ var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ci = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $0;
+ $3 = ((($2)) + 12|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ((($4)) + 16|0);
+ $6 = HEAP32[$5>>2]|0;
+ $ci = $6;
+ $7 = $0;
+ $8 = $0;
+ $9 = ((($8)) + 44|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = (_mrb_obj_alloc($7,13,$10)|0);
+ $p = $11;
+ $12 = $p;
+ $13 = ((($12)) + 16|0);
+ HEAP32[$13>>2] = 0;
+ $14 = $ci;
+ $15 = ($14|0)!=(0|0);
+ if ($15) {
+  $16 = $ci;
+  $17 = ((($16)) + 4|0);
+  $18 = HEAP32[$17>>2]|0;
+  $19 = ($18|0)!=(0|0);
+  if ($19) {
+   $20 = $ci;
+   $21 = ((($20)) + 4|0);
+   $22 = HEAP32[$21>>2]|0;
+   $23 = ((($22)) + 16|0);
+   $24 = HEAP32[$23>>2]|0;
+   $25 = $p;
+   $26 = ((($25)) + 16|0);
+   HEAP32[$26>>2] = $24;
+  }
+  $27 = $p;
+  $28 = ((($27)) + 16|0);
+  $29 = HEAP32[$28>>2]|0;
+  $30 = ($29|0)!=(0|0);
+  if (!($30)) {
+   $31 = $ci;
+   $32 = ((($31)) + 44|0);
+   $33 = HEAP32[$32>>2]|0;
+   $34 = $p;
+   $35 = ((($34)) + 16|0);
+   HEAP32[$35>>2] = $33;
+  }
+ }
+ $36 = $1;
+ $37 = $p;
+ $38 = ((($37)) + 12|0);
+ HEAP32[$38>>2] = $36;
+ $39 = $p;
+ $40 = ((($39)) + 20|0);
+ HEAP32[$40>>2] = 0;
+ $41 = $0;
+ $42 = $1;
+ _mrb_irep_incref($41,$42);
+ $43 = $p;
+ STACKTOP = sp;return ($43|0);
+}
+function _mrb_closure_new($mrb,$irep) {
+ $mrb = $mrb|0;
+ $irep = $irep|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $p = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $irep;
+ $2 = $0;
+ $3 = $1;
+ $4 = (_mrb_proc_new($2,$3)|0);
+ $p = $4;
+ $5 = $0;
+ $6 = $p;
+ $7 = $0;
+ $8 = ((($7)) + 12|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ((($9)) + 16|0);
+ $11 = HEAP32[$10>>2]|0;
+ $12 = ((($11)) + 4|0);
+ $13 = HEAP32[$12>>2]|0;
+ $14 = ((($13)) + 12|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = HEAP16[$15>>1]|0;
+ $17 = $16&65535;
+ _closure_setup($5,$6,$17);
+ $18 = $p;
+ STACKTOP = sp;return ($18|0);
+}
+function _closure_setup($mrb,$p,$nlocals) {
+ $mrb = $mrb|0;
+ $p = $p|0;
+ $nlocals = $nlocals|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $e = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $p;
+ $2 = $nlocals;
+ $3 = $0;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ((($5)) + 16|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ((($7)) + 24|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ($9|0)!=(0|0);
+ $11 = $0;
+ if ($10) {
+  $21 = ((($11)) + 12|0);
+  $22 = HEAP32[$21>>2]|0;
+  $23 = ((($22)) + 16|0);
+  $24 = HEAP32[$23>>2]|0;
+  $25 = ((($24)) + 24|0);
+  $26 = HEAP32[$25>>2]|0;
+  $e = $26;
+  $27 = $e;
+  $28 = $1;
+  $29 = ((($28)) + 20|0);
+  HEAP32[$29>>2] = $27;
+  STACKTOP = sp;return;
+ } else {
+  $12 = $2;
+  $13 = (_env_new($11,$12)|0);
+  $e = $13;
+  $14 = $e;
+  $15 = $0;
+  $16 = ((($15)) + 12|0);
+  $17 = HEAP32[$16>>2]|0;
+  $18 = ((($17)) + 16|0);
+  $19 = HEAP32[$18>>2]|0;
+  $20 = ((($19)) + 24|0);
+  HEAP32[$20>>2] = $14;
+  $27 = $e;
+  $28 = $1;
+  $29 = ((($28)) + 20|0);
+  HEAP32[$29>>2] = $27;
+  STACKTOP = sp;return;
+ }
+}
+function _env_new($mrb,$nlocals) {
+ $mrb = $mrb|0;
+ $nlocals = $nlocals|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $e = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $nlocals;
+ $2 = $0;
+ $3 = $0;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ((($5)) + 16|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ((($7)) + 4|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ((($9)) + 20|0);
+ $11 = HEAP32[$10>>2]|0;
+ $12 = (_mrb_obj_alloc($2,20,$11)|0);
+ $e = $12;
+ $13 = $1;
+ $14 = $e;
+ $15 = HEAP32[$14>>2]|0;
+ $16 = $13 & 2097151;
+ $17 = $16 << 11;
+ $18 = $15 & 2047;
+ $19 = $18 | $17;
+ HEAP32[$14>>2] = $19;
+ $20 = $0;
+ $21 = ((($20)) + 12|0);
+ $22 = HEAP32[$21>>2]|0;
+ $23 = ((($22)) + 16|0);
+ $24 = HEAP32[$23>>2]|0;
+ $25 = HEAP32[$24>>2]|0;
+ $26 = $e;
+ $27 = ((($26)) + 16|0);
+ HEAP32[$27>>2] = $25;
+ $28 = $0;
+ $29 = ((($28)) + 12|0);
+ $30 = HEAP32[$29>>2]|0;
+ $31 = ((($30)) + 16|0);
+ $32 = HEAP32[$31>>2]|0;
+ $33 = $0;
+ $34 = ((($33)) + 12|0);
+ $35 = HEAP32[$34>>2]|0;
+ $36 = ((($35)) + 20|0);
+ $37 = HEAP32[$36>>2]|0;
+ $38 = $32;
+ $39 = $37;
+ $40 = (($38) - ($39))|0;
+ $41 = (($40|0) / 48)&-1;
+ $42 = $e;
+ $43 = ((($42)) + 20|0);
+ HEAP32[$43>>2] = $41;
+ $44 = $0;
+ $45 = ((($44)) + 12|0);
+ $46 = HEAP32[$45>>2]|0;
+ $47 = ((($46)) + 4|0);
+ $48 = HEAP32[$47>>2]|0;
+ $49 = $e;
+ $50 = ((($49)) + 12|0);
+ HEAP32[$50>>2] = $48;
+ $51 = $e;
+ STACKTOP = sp;return ($51|0);
+}
+function _mrb_proc_new_cfunc($mrb,$func) {
+ $mrb = $mrb|0;
+ $func = $func|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $func;
+ $2 = $0;
+ $3 = $0;
+ $4 = ((($3)) + 44|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = (_mrb_obj_alloc($2,13,$5)|0);
+ $p = $6;
+ $7 = $1;
+ $8 = $p;
+ $9 = ((($8)) + 12|0);
+ HEAP32[$9>>2] = $7;
+ $10 = $p;
+ $11 = HEAP32[$10>>2]|0;
+ $12 = $11 >>> 11;
+ $13 = $12 | 128;
+ $14 = HEAP32[$10>>2]|0;
+ $15 = $13 & 2097151;
+ $16 = $15 << 11;
+ $17 = $14 & 2047;
+ $18 = $17 | $16;
+ HEAP32[$10>>2] = $18;
+ $19 = $p;
+ $20 = ((($19)) + 20|0);
+ HEAP32[$20>>2] = 0;
+ $21 = $p;
+ STACKTOP = sp;return ($21|0);
+}
+function _mrb_proc_new_cfunc_with_env($mrb,$func,$argc,$argv) {
+ $mrb = $mrb|0;
+ $func = $func|0;
+ $argc = $argc|0;
+ $argv = $argv|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $e = 0, $i = 0, $p = 0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $func;
+ $2 = $argc;
+ $3 = $argv;
+ $4 = $0;
+ $5 = $1;
+ $6 = (_mrb_proc_new_cfunc($4,$5)|0);
+ $p = $6;
+ $7 = $0;
+ $8 = $2;
+ $9 = (_env_new($7,$8)|0);
+ $e = $9;
+ $10 = $p;
+ $11 = ((($10)) + 20|0);
+ HEAP32[$11>>2] = $9;
+ $12 = $0;
+ $13 = $p;
+ $14 = $p;
+ $15 = ((($14)) + 20|0);
+ $16 = HEAP32[$15>>2]|0;
+ _mrb_field_write_barrier($12,$13,$16);
+ $17 = $e;
+ $18 = ((($17)) + 20|0);
+ HEAP32[$18>>2] = -1;
+ $19 = $0;
+ $20 = $2;
+ $21 = $20<<3;
+ $22 = (_mrb_malloc($19,$21)|0);
+ $23 = $e;
+ $24 = ((($23)) + 12|0);
+ HEAP32[$24>>2] = $22;
+ $25 = $3;
+ $26 = ($25|0)!=(0|0);
+ $i = 0;
+ if ($26) {
+  while(1) {
+   $27 = $i;
+   $28 = $2;
+   $29 = ($27|0)<($28|0);
+   if (!($29)) {
+    break;
+   }
+   $30 = $i;
+   $31 = $e;
+   $32 = ((($31)) + 12|0);
+   $33 = HEAP32[$32>>2]|0;
+   $34 = (($33) + ($30<<3)|0);
+   $35 = $i;
+   $36 = $3;
+   $37 = (($36) + ($35<<3)|0);
+   ;HEAP32[$34>>2]=HEAP32[$37>>2]|0;HEAP32[$34+4>>2]=HEAP32[$37+4>>2]|0;
+   $38 = $i;
+   $39 = (($38) + 1)|0;
+   $i = $39;
+  }
+  $56 = $p;
+  STACKTOP = sp;return ($56|0);
+ } else {
+  while(1) {
+   $40 = $i;
+   $41 = $2;
+   $42 = ($40|0)<($41|0);
+   if (!($42)) {
+    break;
+   }
+   $43 = $i;
+   $44 = $e;
+   $45 = ((($44)) + 12|0);
+   $46 = HEAP32[$45>>2]|0;
+   $47 = (($46) + ($43<<3)|0);
+   $48 = ((($47)) + 4|0);
+   HEAP32[$48>>2] = 0;
+   $49 = $i;
+   $50 = $e;
+   $51 = ((($50)) + 12|0);
+   $52 = HEAP32[$51>>2]|0;
+   $53 = (($52) + ($49<<3)|0);
+   HEAP32[$53>>2] = 0;
+   $54 = $i;
+   $55 = (($54) + 1)|0;
+   $i = $55;
+  }
+  $56 = $p;
+  STACKTOP = sp;return ($56|0);
+ }
+ return (0)|0;
+}
+function _mrb_proc_cfunc_env_get($agg$result,$mrb,$idx) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $idx = $idx|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $e = 0, $p = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $2 = sp + 24|0;
+ $3 = sp + 16|0;
+ $0 = $mrb;
+ $1 = $idx;
+ $4 = $0;
+ $5 = ((($4)) + 12|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = ((($6)) + 16|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ((($8)) + 4|0);
+ $10 = HEAP32[$9>>2]|0;
+ $p = $10;
+ $11 = $p;
+ $12 = ((($11)) + 20|0);
+ $13 = HEAP32[$12>>2]|0;
+ $e = $13;
+ $14 = $p;
+ $15 = HEAP32[$14>>2]|0;
+ $16 = $15 >>> 11;
+ $17 = $16 & 128;
+ $18 = ($17|0)!=(0);
+ if (!($18)) {
+  $19 = $0;
+  $20 = $0;
+  $21 = (_mrb_class_get($20,68905)|0);
+  _mrb_raise($19,$21,68621);
+  // unreachable;
+ }
+ $22 = $e;
+ $23 = ($22|0)!=(0|0);
+ if (!($23)) {
+  $24 = $0;
+  $25 = $0;
+  $26 = (_mrb_class_get($25,68905)|0);
+  _mrb_raise($24,$26,68662);
+  // unreachable;
+ }
+ $27 = $1;
+ $28 = ($27|0)<(0);
+ if (!($28)) {
+  $29 = $e;
+  $30 = HEAP32[$29>>2]|0;
+  $31 = $30 >>> 11;
+  $32 = $1;
+  $33 = ($31|0)<=($32|0);
+  if (!($33)) {
+   $41 = $1;
+   $42 = $e;
+   $43 = ((($42)) + 12|0);
+   $44 = HEAP32[$43>>2]|0;
+   $45 = (($44) + ($41<<3)|0);
+   ;HEAP32[$agg$result>>2]=HEAP32[$45>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$45+4>>2]|0;
+   STACKTOP = sp;return;
+  }
+ }
+ $34 = $0;
+ $35 = $0;
+ $36 = (_mrb_class_get($35,68712)|0);
+ $37 = $1;
+ _mrb_fixnum_value_1106($2,$37);
+ $38 = $e;
+ $39 = HEAP32[$38>>2]|0;
+ $40 = $39 >>> 11;
+ _mrb_fixnum_value_1106($3,$40);
+ ;HEAP8[$vararg_buffer>>0]=HEAP8[$2>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$2+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$2+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$2+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$2+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$2+7>>0]|0;
+ $vararg_ptr1 = ((($vararg_buffer)) + 8|0);
+ ;HEAP8[$vararg_ptr1>>0]=HEAP8[$3>>0]|0;HEAP8[$vararg_ptr1+1>>0]=HEAP8[$3+1>>0]|0;HEAP8[$vararg_ptr1+2>>0]=HEAP8[$3+2>>0]|0;HEAP8[$vararg_ptr1+3>>0]=HEAP8[$3+3>>0]|0;HEAP8[$vararg_ptr1+4>>0]=HEAP8[$3+4>>0]|0;HEAP8[$vararg_ptr1+5>>0]=HEAP8[$3+5>>0]|0;HEAP8[$vararg_ptr1+6>>0]=HEAP8[$3+6>>0]|0;HEAP8[$vararg_ptr1+7>>0]=HEAP8[$3+7>>0]|0;
+ _mrb_raisef($34,$36,68723,$vararg_buffer);
+ // unreachable;
+}
+function _mrb_fixnum_value_1106($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 3;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_proc_copy($a,$b) {
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $a;
+ $1 = $b;
+ $2 = $1;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $3 >>> 11;
+ $5 = $0;
+ $6 = HEAP32[$5>>2]|0;
+ $7 = $4 & 2097151;
+ $8 = $7 << 11;
+ $9 = $6 & 2047;
+ $10 = $9 | $8;
+ HEAP32[$5>>2] = $10;
+ $11 = $0;
+ $12 = ((($11)) + 12|0);
+ $13 = $1;
+ $14 = ((($13)) + 12|0);
+ ;HEAP32[$12>>2]=HEAP32[$14>>2]|0;
+ $15 = $0;
+ $16 = HEAP32[$15>>2]|0;
+ $17 = $16 >>> 11;
+ $18 = $17 & 128;
+ $19 = ($18|0)!=(0);
+ if (!($19)) {
+  $20 = $0;
+  $21 = ((($20)) + 12|0);
+  $22 = HEAP32[$21>>2]|0;
+  $23 = ((($22)) + 56|0);
+  $24 = HEAP32[$23>>2]|0;
+  $25 = (($24) + 1)|0;
+  HEAP32[$23>>2] = $25;
+ }
+ $26 = $1;
+ $27 = ((($26)) + 16|0);
+ $28 = HEAP32[$27>>2]|0;
+ $29 = $0;
+ $30 = ((($29)) + 16|0);
+ HEAP32[$30>>2] = $28;
+ $31 = $1;
+ $32 = ((($31)) + 20|0);
+ $33 = HEAP32[$32>>2]|0;
+ $34 = $0;
+ $35 = ((($34)) + 20|0);
+ HEAP32[$35>>2] = $33;
+ STACKTOP = sp;return;
+}
+function _mrb_proc_iseq($mrb,$p) {
+ $mrb = $mrb|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $p;
+ $2 = $1;
+ $3 = ((($2)) + 12|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ((($4)) + 8|0);
+ $6 = HEAP32[$5>>2]|0;
+ STACKTOP = sp;return ($6|0);
+}
+function _mrb_init_proc($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $call_irep = 0, $m = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = (_mrb_malloc($1,60)|0);
+ $call_irep = $2;
+ $3 = $call_irep;
+ dest=$3; src=74584; stop=dest+60|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0));
+ $4 = $call_irep;
+ $5 = ((($4)) + 4|0);
+ HEAP8[$5>>0] = 1;
+ $6 = $call_irep;
+ $7 = ((($6)) + 8|0);
+ HEAP32[$7>>2] = 2544;
+ $8 = $call_irep;
+ $9 = ((($8)) + 40|0);
+ HEAP32[$9>>2] = 1;
+ $10 = $0;
+ $11 = $0;
+ $12 = ((($11)) + 44|0);
+ $13 = HEAP32[$12>>2]|0;
+ _mrb_define_method($10,$13,68953,316,0);
+ $14 = $0;
+ $15 = $0;
+ $16 = ((($15)) + 44|0);
+ $17 = HEAP32[$16>>2]|0;
+ _mrb_define_method($14,$17,68999,317,262144);
+ $18 = $0;
+ $19 = $0;
+ $20 = ((($19)) + 44|0);
+ $21 = HEAP32[$20>>2]|0;
+ _mrb_define_method($18,$21,68835,318,0);
+ $22 = $0;
+ $23 = $call_irep;
+ $24 = (_mrb_proc_new($22,$23)|0);
+ $m = $24;
+ $25 = $0;
+ $26 = $0;
+ $27 = ((($26)) + 44|0);
+ $28 = HEAP32[$27>>2]|0;
+ $29 = $0;
+ $30 = (_mrb_intern_static($29,69512,4)|0);
+ $31 = $m;
+ _mrb_define_method_raw($25,$28,$30,$31);
+ $32 = $0;
+ $33 = $0;
+ $34 = ((($33)) + 44|0);
+ $35 = HEAP32[$34>>2]|0;
+ $36 = $0;
+ $37 = (_mrb_intern_static($36,68841,2)|0);
+ $38 = $m;
+ _mrb_define_method_raw($32,$35,$37,$38);
+ $39 = $0;
+ $40 = $0;
+ $41 = ((($40)) + 84|0);
+ $42 = HEAP32[$41>>2]|0;
+ _mrb_define_class_method($39,$42,68844,319,0);
+ $43 = $0;
+ $44 = $0;
+ $45 = ((($44)) + 84|0);
+ $46 = HEAP32[$45>>2]|0;
+ _mrb_define_method($43,$46,68844,319,0);
+ STACKTOP = sp;return;
+}
+function _mrb_proc_initialize($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $blk = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $blk = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $blk;
+ (_mrb_get_args($1,68778,$vararg_buffer)|0);
+ $2 = ((($blk)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)==(0);
+ if ($4) {
+  $5 = HEAP32[$blk>>2]|0;
+  $6 = ($5|0)!=(0);
+  if (!($6)) {
+   $7 = $0;
+   $8 = $0;
+   $9 = (_mrb_class_get($8,68855)|0);
+   _mrb_raise($7,$9,68780);
+   // unreachable;
+  }
+ }
+ $10 = HEAP32[$self>>2]|0;
+ $11 = HEAP32[$blk>>2]|0;
+ _mrb_proc_copy($10,$11);
+ ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_proc_init_copy($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $proc = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $proc = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $proc;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = ((($proc)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)!=(13);
+ if ($4) {
+  $5 = $0;
+  $6 = $0;
+  $7 = (_mrb_class_get($6,68855)|0);
+  _mrb_raise($5,$7,68824);
+  // unreachable;
+ } else {
+  $8 = HEAP32[$self>>2]|0;
+  $9 = HEAP32[$proc>>2]|0;
+  _mrb_proc_copy($8,$9);
+  ;HEAP32[$agg$result>>2]=HEAP32[$self>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$self+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_proc_arity($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $arity = 0, $aspec = 0, $iseq = 0, $ma = 0, $op = 0, $or$cond = 0, $p = 0, $pa = 0, $ra = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$self>>2]|0;
+ $p = $1;
+ $2 = $0;
+ $3 = $p;
+ $4 = (_mrb_proc_iseq($2,$3)|0);
+ $iseq = $4;
+ $5 = $p;
+ $6 = HEAP32[$5>>2]|0;
+ $7 = $6 >>> 11;
+ $8 = $7 & 128;
+ $9 = ($8|0)!=(0);
+ if ($9) {
+  _mrb_fixnum_value_1106($agg$result,-1);
+  STACKTOP = sp;return;
+ }
+ $10 = $iseq;
+ $11 = HEAP32[$10>>2]|0;
+ $12 = $11 & 127;
+ $13 = ($12|0)!=(38);
+ if ($13) {
+  _mrb_fixnum_value_1106($agg$result,0);
+  STACKTOP = sp;return;
+ }
+ $14 = $iseq;
+ $15 = HEAP32[$14>>2]|0;
+ $16 = $15 >>> 7;
+ $17 = $16 & 33554431;
+ $aspec = $17;
+ $18 = $aspec;
+ $19 = $18 >>> 18;
+ $20 = $19 & 31;
+ $ma = $20;
+ $21 = $aspec;
+ $22 = $21 >>> 13;
+ $23 = $22 & 31;
+ $op = $23;
+ $24 = $aspec;
+ $25 = $24 >>> 12;
+ $26 = $25 & 1;
+ $ra = $26;
+ $27 = $aspec;
+ $28 = $27 >>> 7;
+ $29 = $28 & 31;
+ $pa = $29;
+ $30 = $ra;
+ $31 = ($30|0)!=(0);
+ if ($31) {
+  label = 7;
+ } else {
+  $32 = $p;
+  $33 = HEAP32[$32>>2]|0;
+  $34 = $33 >>> 11;
+  $35 = $34 & 256;
+  $36 = ($35|0)!=(0);
+  $37 = $op;
+  $38 = ($37|0)!=(0);
+  $or$cond = $36 & $38;
+  if ($or$cond) {
+   label = 7;
+  } else {
+   $44 = $ma;
+   $45 = $pa;
+   $46 = (($44) + ($45))|0;
+   $47 = $46;
+  }
+ }
+ if ((label|0) == 7) {
+  $39 = $ma;
+  $40 = $pa;
+  $41 = (($39) + ($40))|0;
+  $42 = (($41) + 1)|0;
+  $43 = (0 - ($42))|0;
+  $47 = $43;
+ }
+ $arity = $47;
+ $48 = $arity;
+ _mrb_fixnum_value_1106($agg$result,$48);
+ STACKTOP = sp;return;
+}
+function _proc_lambda($agg$result,$mrb,$self) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $self = $self|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $blk = 0;
+ var $p = 0, $p2 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $blk = sp + 16|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $blk;
+ (_mrb_get_args($1,68778,$vararg_buffer)|0);
+ $2 = ((($blk)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)==(0);
+ if ($4) {
+  $5 = HEAP32[$blk>>2]|0;
+  $6 = ($5|0)!=(0);
+  if (!($6)) {
+   $7 = $0;
+   $8 = $0;
+   $9 = (_mrb_class_get($8,68855)|0);
+   _mrb_raise($7,$9,68780);
+   // unreachable;
+  }
+ }
+ $10 = ((($blk)) + 4|0);
+ $11 = HEAP32[$10>>2]|0;
+ $12 = ($11|0)!=(13);
+ if ($12) {
+  $13 = $0;
+  $14 = $0;
+  $15 = (_mrb_class_get($14,68855)|0);
+  _mrb_raise($13,$15,68824);
+  // unreachable;
+ }
+ $16 = HEAP32[$blk>>2]|0;
+ $p = $16;
+ $17 = $p;
+ $18 = HEAP32[$17>>2]|0;
+ $19 = $18 >>> 11;
+ $20 = $19 & 256;
+ $21 = ($20|0)!=(0);
+ if ($21) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$blk>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$blk+4>>2]|0;
+  STACKTOP = sp;return;
+ } else {
+  $22 = $0;
+  $23 = $p;
+  $24 = ((($23)) + 4|0);
+  $25 = HEAP32[$24>>2]|0;
+  $26 = (_mrb_obj_alloc($22,13,$25)|0);
+  $p2 = $26;
+  $27 = $p2;
+  $28 = $p;
+  _mrb_proc_copy($27,$28);
+  $29 = $p2;
+  $30 = HEAP32[$29>>2]|0;
+  $31 = $30 >>> 11;
+  $32 = $31 | 256;
+  $33 = HEAP32[$29>>2]|0;
+  $34 = $32 & 2097151;
+  $35 = $34 << 11;
+  $36 = $33 & 2047;
+  $37 = $36 | $35;
+  HEAP32[$29>>2] = $37;
+  $38 = $p2;
+  _mrb_obj_value_1123($agg$result,$38);
+  STACKTOP = sp;return;
+ }
+}
+function _mrb_obj_value_1123($agg$result,$p) {
+ $agg$result = $agg$result|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $p;
+ $1 = $0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 & 255;
+ $4 = ((($v)) + 4|0);
+ HEAP32[$4>>2] = $3;
+ $5 = $0;
+ HEAP32[$v>>2] = $5;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_range_new($agg$result,$mrb,$beg,$end,$excl) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $beg = $beg|0;
+ $end = $end|0;
+ $excl = $excl|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0;
+ var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $beg$byval_copy = 0, $end$byval_copy = 0, $r = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $end$byval_copy = sp + 16|0;
+ $beg$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $excl;
+ $2 = $0;
+ ;HEAP32[$beg$byval_copy>>2]=HEAP32[$beg>>2]|0;HEAP32[$beg$byval_copy+4>>2]=HEAP32[$beg+4>>2]|0;
+ ;HEAP32[$end$byval_copy>>2]=HEAP32[$end>>2]|0;HEAP32[$end$byval_copy+4>>2]=HEAP32[$end+4>>2]|0;
+ _range_check($2,$beg$byval_copy,$end$byval_copy);
+ $3 = $0;
+ $4 = $0;
+ $5 = (_mrb_class_get($4,68889)|0);
+ $6 = (_mrb_obj_alloc($3,17,$5)|0);
+ $r = $6;
+ $7 = $0;
+ $8 = (_mrb_malloc($7,16)|0);
+ $9 = $r;
+ $10 = ((($9)) + 12|0);
+ HEAP32[$10>>2] = $8;
+ $11 = $r;
+ $12 = ((($11)) + 12|0);
+ $13 = HEAP32[$12>>2]|0;
+ ;HEAP32[$13>>2]=HEAP32[$beg>>2]|0;HEAP32[$13+4>>2]=HEAP32[$beg+4>>2]|0;
+ $14 = $r;
+ $15 = ((($14)) + 12|0);
+ $16 = HEAP32[$15>>2]|0;
+ $17 = ((($16)) + 8|0);
+ ;HEAP32[$17>>2]=HEAP32[$end>>2]|0;HEAP32[$17+4>>2]=HEAP32[$end+4>>2]|0;
+ $18 = $1;
+ $19 = $r;
+ $20 = ((($19)) + 16|0);
+ $21 = HEAP8[$20>>0]|0;
+ $22 = $18 & 1;
+ $23 = $21 & -2;
+ $24 = $23 | $22;
+ HEAP8[$20>>0] = $24;
+ $25 = $r;
+ _mrb_obj_value_1130($agg$result,$25);
+ STACKTOP = sp;return;
+}
+function _range_check($mrb,$a,$b) {
+ $mrb = $mrb|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, $a$byval_copy = 0, $ans = 0, $or$cond = 0, $or$cond3 = 0, $ta = 0, $tb = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $a$byval_copy = sp + 40|0;
+ $vararg_buffer = sp;
+ $ans = sp + 24|0;
+ $1 = sp + 8|0;
+ $0 = $mrb;
+ $2 = ((($a)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $ta = $3;
+ $4 = ((($b)) + 4|0);
+ $5 = HEAP32[$4>>2]|0;
+ $tb = $5;
+ $6 = $ta;
+ $7 = ($6|0)==(3);
+ $8 = $ta;
+ $9 = ($8|0)==(6);
+ $or$cond = $7 | $9;
+ if ($or$cond) {
+  $10 = $tb;
+  $11 = ($10|0)==(3);
+  $12 = $tb;
+  $13 = ($12|0)==(6);
+  $or$cond3 = $11 | $13;
+  if ($or$cond3) {
+   STACKTOP = sp;return;
+  }
+ }
+ $14 = $0;
+ ;HEAP8[$vararg_buffer>>0]=HEAP8[$b>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$b+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$b+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$b+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$b+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$b+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$b+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$b+7>>0]|0;
+ ;HEAP32[$a$byval_copy>>2]=HEAP32[$a>>2]|0;HEAP32[$a$byval_copy+4>>2]=HEAP32[$a+4>>2]|0;
+ _mrb_funcall($1,$14,$a$byval_copy,68851,1,$vararg_buffer);
+ ;HEAP32[$ans>>2]=HEAP32[$1>>2]|0;HEAP32[$ans+4>>2]=HEAP32[$1+4>>2]|0;
+ $15 = ((($ans)) + 4|0);
+ $16 = HEAP32[$15>>2]|0;
+ $17 = ($16|0)==(0);
+ if (!($17)) {
+  STACKTOP = sp;return;
+ }
+ $18 = HEAP32[$ans>>2]|0;
+ $19 = ($18|0)!=(0);
+ if ($19) {
+  STACKTOP = sp;return;
+ } else {
+  $20 = $0;
+  $21 = $0;
+  $22 = (_mrb_class_get($21,68855)|0);
+  _mrb_raise($20,$22,68869);
+  // unreachable;
+ }
+}
+function _mrb_obj_value_1130($agg$result,$p) {
+ $agg$result = $agg$result|0;
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $p;
+ $1 = $0;
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 & 255;
+ $4 = ((($v)) + 4|0);
+ HEAP32[$4>>2] = $3;
+ $5 = $0;
+ HEAP32[$v>>2] = $5;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_range_beg($agg$result,$mrb,$range) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $range = $range|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $r = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$range>>2]|0;
+ $r = $1;
+ $2 = $r;
+ $3 = ((($2)) + 12|0);
+ $4 = HEAP32[$3>>2]|0;
+ ;HEAP32[$agg$result>>2]=HEAP32[$4>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$4+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_range_end($agg$result,$mrb,$range) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $range = $range|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $r = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$range>>2]|0;
+ $r = $1;
+ $2 = $r;
+ $3 = ((($2)) + 12|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ((($4)) + 8|0);
+ ;HEAP32[$agg$result>>2]=HEAP32[$5>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$5+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_range_excl($agg$result,$mrb,$range) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $range = $range|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $r = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = HEAP32[$range>>2]|0;
+ $r = $1;
+ $2 = $r;
+ $3 = ((($2)) + 16|0);
+ $4 = HEAP8[$3>>0]|0;
+ $5 = $4 & 1;
+ _mrb_bool_value_1131($agg$result,$5);
+ STACKTOP = sp;return;
+}
+function _mrb_bool_value_1131($agg$result,$boolean) {
+ $agg$result = $agg$result|0;
+ $boolean = $boolean|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $boolean;
+ $1 = $0;
+ $2 = $1&255;
+ $3 = ($2|0)!=(0);
+ $4 = $3 ? 2 : 0;
+ $5 = ((($v)) + 4|0);
+ HEAP32[$5>>2] = $4;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_range_initialize($agg$result,$mrb,$range) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $range = $range|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $beg = 0, $beg$byval_copy = 0, $end = 0, $end$byval_copy = 0, $exclusive = 0, $n = 0, $range$byval_copy = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $end$byval_copy = sp + 56|0;
+ $beg$byval_copy = sp + 48|0;
+ $range$byval_copy = sp + 40|0;
+ $vararg_buffer = sp;
+ $beg = sp + 24|0;
+ $end = sp + 16|0;
+ $exclusive = sp + 64|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $beg;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = $end;
+ $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+ HEAP32[$vararg_ptr2>>2] = $exclusive;
+ $2 = (_mrb_get_args($1,68895,$vararg_buffer)|0);
+ $n = $2;
+ $3 = $n;
+ $4 = ($3|0)!=(3);
+ if ($4) {
+  HEAP8[$exclusive>>0] = 0;
+ }
+ $5 = $0;
+ $6 = HEAP8[$exclusive>>0]|0;
+ ;HEAP32[$range$byval_copy>>2]=HEAP32[$range>>2]|0;HEAP32[$range$byval_copy+4>>2]=HEAP32[$range+4>>2]|0;
+ ;HEAP32[$beg$byval_copy>>2]=HEAP32[$beg>>2]|0;HEAP32[$beg$byval_copy+4>>2]=HEAP32[$beg+4>>2]|0;
+ ;HEAP32[$end$byval_copy>>2]=HEAP32[$end>>2]|0;HEAP32[$end$byval_copy+4>>2]=HEAP32[$end+4>>2]|0;
+ _range_init($5,$range$byval_copy,$beg$byval_copy,$end$byval_copy,$6);
+ ;HEAP32[$agg$result>>2]=HEAP32[$range>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$range+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _range_init($mrb,$range,$beg,$end,$exclude_end) {
+ $mrb = $mrb|0;
+ $range = $range|0;
+ $beg = $beg|0;
+ $end = $end|0;
+ $exclude_end = $exclude_end|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $3 = 0;
+ var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $beg$byval_copy = 0, $end$byval_copy = 0, $r = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $end$byval_copy = sp + 16|0;
+ $beg$byval_copy = sp + 8|0;
+ $0 = $mrb;
+ $1 = $exclude_end;
+ $2 = HEAP32[$range>>2]|0;
+ $r = $2;
+ $3 = $0;
+ ;HEAP32[$beg$byval_copy>>2]=HEAP32[$beg>>2]|0;HEAP32[$beg$byval_copy+4>>2]=HEAP32[$beg+4>>2]|0;
+ ;HEAP32[$end$byval_copy>>2]=HEAP32[$end>>2]|0;HEAP32[$end$byval_copy+4>>2]=HEAP32[$end+4>>2]|0;
+ _range_check($3,$beg$byval_copy,$end$byval_copy);
+ $4 = $1;
+ $5 = $r;
+ $6 = ((($5)) + 16|0);
+ $7 = HEAP8[$6>>0]|0;
+ $8 = $4 & 1;
+ $9 = $7 & -2;
+ $10 = $9 | $8;
+ HEAP8[$6>>0] = $10;
+ $11 = $r;
+ $12 = ((($11)) + 12|0);
+ $13 = HEAP32[$12>>2]|0;
+ $14 = ($13|0)!=(0|0);
+ if (!($14)) {
+  $15 = $0;
+  $16 = (_mrb_malloc($15,16)|0);
+  $17 = $r;
+  $18 = ((($17)) + 12|0);
+  HEAP32[$18>>2] = $16;
+ }
+ $19 = $r;
+ $20 = ((($19)) + 12|0);
+ $21 = HEAP32[$20>>2]|0;
+ ;HEAP32[$21>>2]=HEAP32[$beg>>2]|0;HEAP32[$21+4>>2]=HEAP32[$beg+4>>2]|0;
+ $22 = $r;
+ $23 = ((($22)) + 12|0);
+ $24 = HEAP32[$23>>2]|0;
+ $25 = ((($24)) + 8|0);
+ ;HEAP32[$25>>2]=HEAP32[$end>>2]|0;HEAP32[$25+4>>2]=HEAP32[$end+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_range_eq($agg$result,$mrb,$range) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $range = $range|0;
+ var $$byval_copy = 0, $$byval_copy9 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
+ var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $obj = 0, $obj$byval_copy = 0, $obj$byval_copy8 = 0, $range$byval_copy = 0, $range$byval_copy7 = 0, $ro = 0, $rr = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer4 = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy9 = sp + 104|0;
+ $$byval_copy = sp + 96|0;
+ $obj$byval_copy8 = sp + 88|0;
+ $range$byval_copy7 = sp + 80|0;
+ $obj$byval_copy = sp + 72|0;
+ $range$byval_copy = sp + 64|0;
+ $vararg_buffer4 = sp + 16|0;
+ $vararg_buffer1 = sp + 8|0;
+ $vararg_buffer = sp;
+ $obj = sp + 40|0;
+ $1 = sp + 32|0;
+ $2 = sp + 24|0;
+ $0 = $mrb;
+ $3 = $0;
+ HEAP32[$vararg_buffer>>2] = $obj;
+ (_mrb_get_args($3,68900,$vararg_buffer)|0);
+ $4 = $0;
+ ;HEAP32[$range$byval_copy>>2]=HEAP32[$range>>2]|0;HEAP32[$range$byval_copy+4>>2]=HEAP32[$range+4>>2]|0;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ $5 = (_mrb_obj_equal($4,$range$byval_copy,$obj$byval_copy)|0);
+ $6 = ($5<<24>>24)!=(0);
+ if ($6) {
+  _mrb_true_value_1134($agg$result);
+  STACKTOP = sp;return;
+ }
+ $7 = $0;
+ $8 = $0;
+ ;HEAP32[$range$byval_copy7>>2]=HEAP32[$range>>2]|0;HEAP32[$range$byval_copy7+4>>2]=HEAP32[$range+4>>2]|0;
+ $9 = (_mrb_obj_class($8,$range$byval_copy7)|0);
+ ;HEAP32[$obj$byval_copy8>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy8+4>>2]=HEAP32[$obj+4>>2]|0;
+ $10 = (_mrb_obj_is_instance_of($7,$obj$byval_copy8,$9)|0);
+ $11 = ($10<<24>>24)!=(0);
+ if (!($11)) {
+  _mrb_false_value_1135($agg$result);
+  STACKTOP = sp;return;
+ }
+ $12 = HEAP32[$range>>2]|0;
+ $rr = $12;
+ $13 = HEAP32[$obj>>2]|0;
+ $ro = $13;
+ $14 = $0;
+ $15 = $rr;
+ $16 = ((($15)) + 12|0);
+ $17 = HEAP32[$16>>2]|0;
+ $18 = $ro;
+ $19 = ((($18)) + 12|0);
+ $20 = HEAP32[$19>>2]|0;
+ ;HEAP8[$vararg_buffer1>>0]=HEAP8[$20>>0]|0;HEAP8[$vararg_buffer1+1>>0]=HEAP8[$20+1>>0]|0;HEAP8[$vararg_buffer1+2>>0]=HEAP8[$20+2>>0]|0;HEAP8[$vararg_buffer1+3>>0]=HEAP8[$20+3>>0]|0;HEAP8[$vararg_buffer1+4>>0]=HEAP8[$20+4>>0]|0;HEAP8[$vararg_buffer1+5>>0]=HEAP8[$20+5>>0]|0;HEAP8[$vararg_buffer1+6>>0]=HEAP8[$20+6>>0]|0;HEAP8[$vararg_buffer1+7>>0]=HEAP8[$20+7>>0]|0;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$17>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$17+4>>2]|0;
+ _mrb_funcall($1,$14,$$byval_copy,68902,1,$vararg_buffer1);
+ $21 = ((($1)) + 4|0);
+ $22 = HEAP32[$21>>2]|0;
+ $23 = ($22|0)!=(0);
+ if ($23) {
+  $24 = $0;
+  $25 = $rr;
+  $26 = ((($25)) + 12|0);
+  $27 = HEAP32[$26>>2]|0;
+  $28 = ((($27)) + 8|0);
+  $29 = $ro;
+  $30 = ((($29)) + 12|0);
+  $31 = HEAP32[$30>>2]|0;
+  $32 = ((($31)) + 8|0);
+  ;HEAP8[$vararg_buffer4>>0]=HEAP8[$32>>0]|0;HEAP8[$vararg_buffer4+1>>0]=HEAP8[$32+1>>0]|0;HEAP8[$vararg_buffer4+2>>0]=HEAP8[$32+2>>0]|0;HEAP8[$vararg_buffer4+3>>0]=HEAP8[$32+3>>0]|0;HEAP8[$vararg_buffer4+4>>0]=HEAP8[$32+4>>0]|0;HEAP8[$vararg_buffer4+5>>0]=HEAP8[$32+5>>0]|0;HEAP8[$vararg_buffer4+6>>0]=HEAP8[$32+6>>0]|0;HEAP8[$vararg_buffer4+7>>0]=HEAP8[$32+7>>0]|0;
+  ;HEAP32[$$byval_copy9>>2]=HEAP32[$28>>2]|0;HEAP32[$$byval_copy9+4>>2]=HEAP32[$28+4>>2]|0;
+  _mrb_funcall($2,$24,$$byval_copy9,68902,1,$vararg_buffer4);
+  $33 = ((($2)) + 4|0);
+  $34 = HEAP32[$33>>2]|0;
+  $35 = ($34|0)!=(0);
+  if ($35) {
+   $36 = $rr;
+   $37 = ((($36)) + 16|0);
+   $38 = HEAP8[$37>>0]|0;
+   $39 = $38 & 1;
+   $40 = $39&255;
+   $41 = $ro;
+   $42 = ((($41)) + 16|0);
+   $43 = HEAP8[$42>>0]|0;
+   $44 = $43 & 1;
+   $45 = $44&255;
+   $46 = ($40|0)!=($45|0);
+   if (!($46)) {
+    _mrb_true_value_1134($agg$result);
+    STACKTOP = sp;return;
+   }
+  }
+ }
+ _mrb_false_value_1135($agg$result);
+ STACKTOP = sp;return;
+}
+function _mrb_true_value_1134($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 2;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_false_value_1135($agg$result) {
+ $agg$result = $agg$result|0;
+ var $0 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = ((($v)) + 4|0);
+ HEAP32[$0>>2] = 0;
+ HEAP32[$v>>2] = 1;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_range_include($agg$result,$mrb,$range) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $range = $range|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $beg = 0, $beg$byval_copy = 0, $end = 0, $end$byval_copy = 0, $end$byval_copy2 = 0, $include_p = 0, $r = 0, $val = 0;
+ var $val$byval_copy = 0, $val$byval_copy1 = 0, $val$byval_copy3 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy3 = sp + 88|0;
+ $end$byval_copy2 = sp + 80|0;
+ $val$byval_copy1 = sp + 72|0;
+ $end$byval_copy = sp + 64|0;
+ $val$byval_copy = sp + 56|0;
+ $beg$byval_copy = sp + 48|0;
+ $vararg_buffer = sp;
+ $val = sp + 32|0;
+ $beg = sp + 16|0;
+ $end = sp + 8|0;
+ $0 = $mrb;
+ $1 = HEAP32[$range>>2]|0;
+ $r = $1;
+ $2 = $0;
+ HEAP32[$vararg_buffer>>2] = $val;
+ (_mrb_get_args($2,68900,$vararg_buffer)|0);
+ $3 = $r;
+ $4 = ((($3)) + 12|0);
+ $5 = HEAP32[$4>>2]|0;
+ ;HEAP32[$beg>>2]=HEAP32[$5>>2]|0;HEAP32[$beg+4>>2]=HEAP32[$5+4>>2]|0;
+ $6 = $r;
+ $7 = ((($6)) + 12|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = ((($8)) + 8|0);
+ ;HEAP32[$end>>2]=HEAP32[$9>>2]|0;HEAP32[$end+4>>2]=HEAP32[$9+4>>2]|0;
+ $10 = $0;
+ ;HEAP32[$beg$byval_copy>>2]=HEAP32[$beg>>2]|0;HEAP32[$beg$byval_copy+4>>2]=HEAP32[$beg+4>>2]|0;
+ ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+ $11 = (_r_le($10,$beg$byval_copy,$val$byval_copy)|0);
+ $12 = $11&255;
+ $13 = ($12|0)!=(0);
+ if (!($13)) {
+  $29 = 0;
+  $28 = $29&1;
+  $30 = $28&255;
+  $include_p = $30;
+  $31 = $include_p;
+  _mrb_bool_value_1131($agg$result,$31);
+  STACKTOP = sp;return;
+ }
+ $14 = $r;
+ $15 = ((($14)) + 16|0);
+ $16 = HEAP8[$15>>0]|0;
+ $17 = $16 & 1;
+ $18 = $17&255;
+ $19 = ($18|0)!=(0);
+ if ($19) {
+  $20 = $0;
+  ;HEAP32[$end$byval_copy>>2]=HEAP32[$end>>2]|0;HEAP32[$end$byval_copy+4>>2]=HEAP32[$end+4>>2]|0;
+  ;HEAP32[$val$byval_copy1>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy1+4>>2]=HEAP32[$val+4>>2]|0;
+  $21 = (_r_gt($20,$end$byval_copy,$val$byval_copy1)|0);
+  $22 = $21&255;
+  $23 = ($22|0)!=(0);
+  if ($23) {
+   $29 = 1;
+   $28 = $29&1;
+   $30 = $28&255;
+   $include_p = $30;
+   $31 = $include_p;
+   _mrb_bool_value_1131($agg$result,$31);
+   STACKTOP = sp;return;
+  }
+ }
+ $24 = $0;
+ ;HEAP32[$end$byval_copy2>>2]=HEAP32[$end>>2]|0;HEAP32[$end$byval_copy2+4>>2]=HEAP32[$end+4>>2]|0;
+ ;HEAP32[$val$byval_copy3>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy3+4>>2]=HEAP32[$val+4>>2]|0;
+ $25 = (_r_ge($24,$end$byval_copy2,$val$byval_copy3)|0);
+ $26 = $25&255;
+ $27 = ($26|0)!=(0);
+ $29 = $27;
+ $28 = $29&1;
+ $30 = $28&255;
+ $include_p = $30;
+ $31 = $include_p;
+ _mrb_bool_value_1131($agg$result,$31);
+ STACKTOP = sp;return;
+}
+function _r_le($mrb,$a,$b) {
+ $mrb = $mrb|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a$byval_copy = 0, $c = 0, $or$cond = 0, $r = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $a$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $r = sp + 16|0;
+ $1 = $mrb;
+ $2 = $1;
+ ;HEAP8[$vararg_buffer>>0]=HEAP8[$b>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$b+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$b+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$b+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$b+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$b+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$b+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$b+7>>0]|0;
+ ;HEAP32[$a$byval_copy>>2]=HEAP32[$a>>2]|0;HEAP32[$a$byval_copy+4>>2]=HEAP32[$a+4>>2]|0;
+ _mrb_funcall($r,$2,$a$byval_copy,68851,1,$vararg_buffer);
+ $3 = ((($r)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)==(3);
+ if ($5) {
+  $6 = HEAP32[$r>>2]|0;
+  $c = $6;
+  $7 = $c;
+  $8 = ($7|0)==(0);
+  $9 = $c;
+  $10 = ($9|0)==(-1);
+  $or$cond = $8 | $10;
+  if ($or$cond) {
+   $0 = 1;
+   $11 = $0;
+   STACKTOP = sp;return ($11|0);
+  }
+ }
+ $0 = 0;
+ $11 = $0;
+ STACKTOP = sp;return ($11|0);
+}
+function _r_gt($mrb,$a,$b) {
+ $mrb = $mrb|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a$byval_copy = 0, $r = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $a$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $r = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ ;HEAP8[$vararg_buffer>>0]=HEAP8[$b>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$b+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$b+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$b+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$b+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$b+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$b+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$b+7>>0]|0;
+ ;HEAP32[$a$byval_copy>>2]=HEAP32[$a>>2]|0;HEAP32[$a$byval_copy+4>>2]=HEAP32[$a+4>>2]|0;
+ _mrb_funcall($r,$1,$a$byval_copy,68851,1,$vararg_buffer);
+ $2 = ((($r)) + 4|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)==(3);
+ $5 = HEAP32[$r>>2]|0;
+ $6 = ($5|0)==(1);
+ $7 = $4 ? $6 : 0;
+ $8 = $7&1;
+ $9 = $8&255;
+ STACKTOP = sp;return ($9|0);
+}
+function _r_ge($mrb,$a,$b) {
+ $mrb = $mrb|0;
+ $a = $a|0;
+ $b = $b|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $a$byval_copy = 0, $c = 0, $or$cond = 0, $r = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $a$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $r = sp + 16|0;
+ $1 = $mrb;
+ $2 = $1;
+ ;HEAP8[$vararg_buffer>>0]=HEAP8[$b>>0]|0;HEAP8[$vararg_buffer+1>>0]=HEAP8[$b+1>>0]|0;HEAP8[$vararg_buffer+2>>0]=HEAP8[$b+2>>0]|0;HEAP8[$vararg_buffer+3>>0]=HEAP8[$b+3>>0]|0;HEAP8[$vararg_buffer+4>>0]=HEAP8[$b+4>>0]|0;HEAP8[$vararg_buffer+5>>0]=HEAP8[$b+5>>0]|0;HEAP8[$vararg_buffer+6>>0]=HEAP8[$b+6>>0]|0;HEAP8[$vararg_buffer+7>>0]=HEAP8[$b+7>>0]|0;
+ ;HEAP32[$a$byval_copy>>2]=HEAP32[$a>>2]|0;HEAP32[$a$byval_copy+4>>2]=HEAP32[$a+4>>2]|0;
+ _mrb_funcall($r,$2,$a$byval_copy,68851,1,$vararg_buffer);
+ $3 = ((($r)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)==(3);
+ if ($5) {
+  $6 = HEAP32[$r>>2]|0;
+  $c = $6;
+  $7 = $c;
+  $8 = ($7|0)==(0);
+  $9 = $c;
+  $10 = ($9|0)==(1);
+  $or$cond = $8 | $10;
+  if ($or$cond) {
+   $0 = 1;
+   $11 = $0;
+   STACKTOP = sp;return ($11|0);
+  }
+ }
+ $0 = 0;
+ $11 = $0;
+ STACKTOP = sp;return ($11|0);
+}
+function _mrb_range_beg_len($mrb,$range,$begp,$lenp,$len) {
+ $mrb = $mrb|0;
+ $range = $range|0;
+ $begp = $begp|0;
+ $lenp = $lenp|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $range$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $range$byval_copy = sp + 16|0;
+ $0 = $mrb;
+ $1 = $begp;
+ $2 = $lenp;
+ $3 = $len;
+ $4 = $0;
+ $5 = $1;
+ $6 = $2;
+ $7 = $3;
+ ;HEAP32[$range$byval_copy>>2]=HEAP32[$range>>2]|0;HEAP32[$range$byval_copy+4>>2]=HEAP32[$range+4>>2]|0;
+ $8 = (_range_beg_len($4,$range$byval_copy,$5,$6,$7,1)|0);
+ STACKTOP = sp;return ($8|0);
+}
+function _range_beg_len($mrb,$range,$begp,$lenp,$len,$trunc) {
+ $mrb = $mrb|0;
+ $range = $range|0;
+ $begp = $begp|0;
+ $lenp = $lenp|0;
+ $len = $len|0;
+ $trunc = $trunc|0;
+ var $$ = 0, $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
+ var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0;
+ var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0;
+ var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $7 = 0, $8 = 0, $9 = 0, $beg = 0, $end = 0, $r = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy1 = sp + 56|0;
+ $$byval_copy = sp + 48|0;
+ $6 = sp + 8|0;
+ $7 = sp;
+ $1 = $mrb;
+ $2 = $begp;
+ $3 = $lenp;
+ $4 = $len;
+ $5 = $trunc;
+ $8 = HEAP32[$range>>2]|0;
+ $r = $8;
+ $9 = ((($range)) + 4|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = ($10|0)!=(17);
+ if ($11) {
+  $0 = 0;
+  $65 = $0;
+  STACKTOP = sp;return ($65|0);
+ }
+ $12 = $1;
+ $13 = $r;
+ $14 = ((($13)) + 12|0);
+ $15 = HEAP32[$14>>2]|0;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$15>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$15+4>>2]|0;
+ _mrb_to_int($6,$12,$$byval_copy);
+ $16 = HEAP32[$6>>2]|0;
+ $beg = $16;
+ $17 = $1;
+ $18 = $r;
+ $19 = ((($18)) + 12|0);
+ $20 = HEAP32[$19>>2]|0;
+ $21 = ((($20)) + 8|0);
+ ;HEAP32[$$byval_copy1>>2]=HEAP32[$21>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$21+4>>2]|0;
+ _mrb_to_int($7,$17,$$byval_copy1);
+ $22 = HEAP32[$7>>2]|0;
+ $end = $22;
+ $23 = $beg;
+ $24 = ($23|0)<(0);
+ if ($24) {
+  $25 = $4;
+  $26 = $beg;
+  $27 = (($26) + ($25))|0;
+  $beg = $27;
+  $28 = $beg;
+  $29 = ($28|0)<(0);
+  if ($29) {
+   $0 = 0;
+   $65 = $0;
+   STACKTOP = sp;return ($65|0);
+  }
+ }
+ $30 = $5;
+ $31 = ($30<<24>>24)!=(0);
+ do {
+  if ($31) {
+   $32 = $beg;
+   $33 = $4;
+   $34 = ($32|0)>($33|0);
+   if ($34) {
+    $0 = 0;
+    $65 = $0;
+    STACKTOP = sp;return ($65|0);
+   } else {
+    $35 = $end;
+    $36 = $4;
+    $37 = ($35|0)>($36|0);
+    if (!($37)) {
+     break;
+    }
+    $38 = $4;
+    $end = $38;
+    break;
+   }
+  }
+ } while(0);
+ $39 = $end;
+ $40 = ($39|0)<(0);
+ if ($40) {
+  $41 = $4;
+  $42 = $end;
+  $43 = (($42) + ($41))|0;
+  $end = $43;
+ }
+ $44 = $r;
+ $45 = ((($44)) + 16|0);
+ $46 = HEAP8[$45>>0]|0;
+ $47 = $46 & 1;
+ $48 = ($47<<24>>24)!=(0);
+ do {
+  if (!($48)) {
+   $49 = $5;
+   $50 = ($49<<24>>24)!=(0);
+   if ($50) {
+    $51 = $end;
+    $52 = $4;
+    $53 = ($51|0)<($52|0);
+    if (!($53)) {
+     break;
+    }
+   }
+   $54 = $end;
+   $55 = (($54) + 1)|0;
+   $end = $55;
+  }
+ } while(0);
+ $56 = $end;
+ $57 = $beg;
+ $58 = (($56) - ($57))|0;
+ $4 = $58;
+ $59 = $4;
+ $60 = ($59|0)<(0);
+ $$ = $60 ? 0 : $58;
+ $4 = $$;
+ $61 = $beg;
+ $62 = $2;
+ HEAP32[$62>>2] = $61;
+ $63 = $4;
+ $64 = $3;
+ HEAP32[$64>>2] = $63;
+ $0 = 1;
+ $65 = $0;
+ STACKTOP = sp;return ($65|0);
+}
+function _mrb_init_range($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $r = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ $2 = $0;
+ $3 = ((($2)) + 32|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = (_mrb_define_class($1,68889,$4)|0);
+ $r = $5;
+ $6 = $r;
+ $7 = HEAP32[$6>>2]|0;
+ $8 = $7 >>> 11;
+ $9 = $8 & -256;
+ $10 = $9 | 17;
+ $11 = $r;
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $10 & 2097151;
+ $14 = $13 << 11;
+ $15 = $12 & 2047;
+ $16 = $15 | $14;
+ HEAP32[$11>>2] = $16;
+ $17 = $0;
+ $18 = $r;
+ _mrb_define_method($17,$18,68915,320,0);
+ $19 = $0;
+ $20 = $r;
+ _mrb_define_method($19,$20,68921,321,0);
+ $21 = $0;
+ $22 = $r;
+ _mrb_define_method($21,$22,68902,322,262144);
+ $23 = $0;
+ $24 = $r;
+ _mrb_define_method($23,$24,69450,323,262144);
+ $25 = $0;
+ $26 = $r;
+ _mrb_define_method($25,$26,68925,324,0);
+ $27 = $0;
+ $28 = $r;
+ _mrb_define_method($27,$28,68938,320,0);
+ $29 = $0;
+ $30 = $r;
+ _mrb_define_method($29,$30,68944,323,262144);
+ $31 = $0;
+ $32 = $r;
+ _mrb_define_method($31,$32,68953,325,4096);
+ $33 = $0;
+ $34 = $r;
+ _mrb_define_method($33,$34,68964,321,0);
+ $35 = $0;
+ $36 = $r;
+ _mrb_define_method($35,$36,68969,323,262144);
+ $37 = $0;
+ $38 = $r;
+ _mrb_define_method($37,$38,68977,326,0);
+ $39 = $0;
+ $40 = $r;
+ _mrb_define_method($39,$40,68986,327,0);
+ $41 = $0;
+ $42 = $r;
+ _mrb_define_method($41,$42,68994,328,262144);
+ $43 = $0;
+ $44 = $r;
+ _mrb_define_method($43,$44,68999,329,262144);
+ STACKTOP = sp;return;
+}
+function _range_to_s($agg$result,$mrb,$range) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $range = $range|0;
+ var $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $25 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $r = 0, $str = 0, $str$byval_copy = 0, $str$byval_copy2 = 0, $str$byval_copy3 = 0, $str2 = 0, $str2$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str2$byval_copy = sp + 112|0;
+ $str$byval_copy3 = sp + 104|0;
+ $str$byval_copy2 = sp + 96|0;
+ $str$byval_copy = sp + 88|0;
+ $$byval_copy1 = sp + 80|0;
+ $$byval_copy = sp + 72|0;
+ $str = sp + 56|0;
+ $str2 = sp + 48|0;
+ $1 = sp + 32|0;
+ $2 = sp + 24|0;
+ $3 = sp + 16|0;
+ $4 = sp + 8|0;
+ $5 = sp;
+ $0 = $mrb;
+ $6 = HEAP32[$range>>2]|0;
+ $r = $6;
+ $7 = $0;
+ $8 = $r;
+ $9 = ((($8)) + 12|0);
+ $10 = HEAP32[$9>>2]|0;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$10>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$10+4>>2]|0;
+ _mrb_obj_as_string($1,$7,$$byval_copy);
+ ;HEAP32[$str>>2]=HEAP32[$1>>2]|0;HEAP32[$str+4>>2]=HEAP32[$1+4>>2]|0;
+ $11 = $0;
+ $12 = $r;
+ $13 = ((($12)) + 12|0);
+ $14 = HEAP32[$13>>2]|0;
+ $15 = ((($14)) + 8|0);
+ ;HEAP32[$$byval_copy1>>2]=HEAP32[$15>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$15+4>>2]|0;
+ _mrb_obj_as_string($2,$11,$$byval_copy1);
+ ;HEAP32[$str2>>2]=HEAP32[$2>>2]|0;HEAP32[$str2+4>>2]=HEAP32[$2+4>>2]|0;
+ $16 = $0;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_dup($3,$16,$str$byval_copy);
+ ;HEAP32[$str>>2]=HEAP32[$3>>2]|0;HEAP32[$str+4>>2]=HEAP32[$3+4>>2]|0;
+ $17 = $0;
+ $18 = $r;
+ $19 = ((($18)) + 16|0);
+ $20 = HEAP8[$19>>0]|0;
+ $21 = $20 & 1;
+ $22 = $21&255;
+ $23 = ($22|0)!=(0);
+ $24 = $23 ? 3 : 2;
+ ;HEAP32[$str$byval_copy2>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy2+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_cat($4,$17,$str$byval_copy2,68982,$24);
+ $25 = $0;
+ ;HEAP32[$str$byval_copy3>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy3+4>>2]=HEAP32[$str+4>>2]|0;
+ ;HEAP32[$str2$byval_copy>>2]=HEAP32[$str2>>2]|0;HEAP32[$str2$byval_copy+4>>2]=HEAP32[$str2+4>>2]|0;
+ _mrb_str_cat_str($5,$25,$str$byval_copy3,$str2$byval_copy);
+ ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _range_inspect($agg$result,$mrb,$range) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $range = $range|0;
+ var $$byval_copy = 0, $$byval_copy1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $25 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $r = 0, $str = 0, $str$byval_copy = 0, $str$byval_copy2 = 0, $str$byval_copy3 = 0, $str2 = 0, $str2$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $str2$byval_copy = sp + 112|0;
+ $str$byval_copy3 = sp + 104|0;
+ $str$byval_copy2 = sp + 96|0;
+ $str$byval_copy = sp + 88|0;
+ $$byval_copy1 = sp + 80|0;
+ $$byval_copy = sp + 72|0;
+ $str = sp + 56|0;
+ $str2 = sp + 48|0;
+ $1 = sp + 32|0;
+ $2 = sp + 24|0;
+ $3 = sp + 16|0;
+ $4 = sp + 8|0;
+ $5 = sp;
+ $0 = $mrb;
+ $6 = HEAP32[$range>>2]|0;
+ $r = $6;
+ $7 = $0;
+ $8 = $r;
+ $9 = ((($8)) + 12|0);
+ $10 = HEAP32[$9>>2]|0;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$10>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$10+4>>2]|0;
+ _mrb_inspect($1,$7,$$byval_copy);
+ ;HEAP32[$str>>2]=HEAP32[$1>>2]|0;HEAP32[$str+4>>2]=HEAP32[$1+4>>2]|0;
+ $11 = $0;
+ $12 = $r;
+ $13 = ((($12)) + 12|0);
+ $14 = HEAP32[$13>>2]|0;
+ $15 = ((($14)) + 8|0);
+ ;HEAP32[$$byval_copy1>>2]=HEAP32[$15>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$15+4>>2]|0;
+ _mrb_inspect($2,$11,$$byval_copy1);
+ ;HEAP32[$str2>>2]=HEAP32[$2>>2]|0;HEAP32[$str2+4>>2]=HEAP32[$2+4>>2]|0;
+ $16 = $0;
+ ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_dup($3,$16,$str$byval_copy);
+ ;HEAP32[$str>>2]=HEAP32[$3>>2]|0;HEAP32[$str+4>>2]=HEAP32[$3+4>>2]|0;
+ $17 = $0;
+ $18 = $r;
+ $19 = ((($18)) + 16|0);
+ $20 = HEAP8[$19>>0]|0;
+ $21 = $20 & 1;
+ $22 = $21&255;
+ $23 = ($22|0)!=(0);
+ $24 = $23 ? 3 : 2;
+ ;HEAP32[$str$byval_copy2>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy2+4>>2]=HEAP32[$str+4>>2]|0;
+ _mrb_str_cat($4,$17,$str$byval_copy2,68982,$24);
+ $25 = $0;
+ ;HEAP32[$str$byval_copy3>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy3+4>>2]=HEAP32[$str+4>>2]|0;
+ ;HEAP32[$str2$byval_copy>>2]=HEAP32[$str2>>2]|0;HEAP32[$str2$byval_copy+4>>2]=HEAP32[$str2+4>>2]|0;
+ _mrb_str_cat_str($5,$25,$str$byval_copy3,$str2$byval_copy);
+ ;HEAP32[$agg$result>>2]=HEAP32[$str>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$str+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _range_eql($agg$result,$mrb,$range) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $range = $range|0;
+ var $$byval_copy = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0;
+ var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0;
+ var $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $o = 0, $obj = 0, $obj$byval_copy = 0, $obj$byval_copy1 = 0, $r = 0, $range$byval_copy = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy4 = sp + 80|0;
+ $$byval_copy3 = sp + 72|0;
+ $$byval_copy2 = sp + 64|0;
+ $$byval_copy = sp + 56|0;
+ $obj$byval_copy1 = sp + 48|0;
+ $obj$byval_copy = sp + 40|0;
+ $range$byval_copy = sp + 32|0;
+ $vararg_buffer = sp;
+ $obj = sp + 16|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $obj;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$range$byval_copy>>2]=HEAP32[$range>>2]|0;HEAP32[$range$byval_copy+4>>2]=HEAP32[$range+4>>2]|0;
+ ;HEAP32[$obj$byval_copy>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy+4>>2]=HEAP32[$obj+4>>2]|0;
+ $3 = (_mrb_obj_equal($2,$range$byval_copy,$obj$byval_copy)|0);
+ $4 = ($3<<24>>24)!=(0);
+ if ($4) {
+  _mrb_true_value_1134($agg$result);
+  STACKTOP = sp;return;
+ }
+ $5 = $0;
+ $6 = $0;
+ $7 = (_mrb_class_get($6,68889)|0);
+ ;HEAP32[$obj$byval_copy1>>2]=HEAP32[$obj>>2]|0;HEAP32[$obj$byval_copy1+4>>2]=HEAP32[$obj+4>>2]|0;
+ $8 = (_mrb_obj_is_kind_of($5,$obj$byval_copy1,$7)|0);
+ $9 = ($8<<24>>24)!=(0);
+ if (!($9)) {
+  _mrb_false_value_1135($agg$result);
+  STACKTOP = sp;return;
+ }
+ $10 = ((($obj)) + 4|0);
+ $11 = HEAP32[$10>>2]|0;
+ $12 = ($11|0)!=(17);
+ if ($12) {
+  _mrb_false_value_1135($agg$result);
+  STACKTOP = sp;return;
+ }
+ $13 = HEAP32[$range>>2]|0;
+ $r = $13;
+ $14 = HEAP32[$obj>>2]|0;
+ $o = $14;
+ $15 = $0;
+ $16 = $r;
+ $17 = ((($16)) + 12|0);
+ $18 = HEAP32[$17>>2]|0;
+ $19 = $o;
+ $20 = ((($19)) + 12|0);
+ $21 = HEAP32[$20>>2]|0;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$18>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$18+4>>2]|0;
+ ;HEAP32[$$byval_copy2>>2]=HEAP32[$21>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$21+4>>2]|0;
+ $22 = (_mrb_eql($15,$$byval_copy,$$byval_copy2)|0);
+ $23 = ($22<<24>>24)!=(0);
+ if ($23) {
+  $24 = $0;
+  $25 = $r;
+  $26 = ((($25)) + 12|0);
+  $27 = HEAP32[$26>>2]|0;
+  $28 = ((($27)) + 8|0);
+  $29 = $o;
+  $30 = ((($29)) + 12|0);
+  $31 = HEAP32[$30>>2]|0;
+  $32 = ((($31)) + 8|0);
+  ;HEAP32[$$byval_copy3>>2]=HEAP32[$28>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$28+4>>2]|0;
+  ;HEAP32[$$byval_copy4>>2]=HEAP32[$32>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$32+4>>2]|0;
+  $33 = (_mrb_eql($24,$$byval_copy3,$$byval_copy4)|0);
+  $34 = ($33<<24>>24)!=(0);
+  if ($34) {
+   $35 = $r;
+   $36 = ((($35)) + 16|0);
+   $37 = HEAP8[$36>>0]|0;
+   $38 = $37 & 1;
+   $39 = $38&255;
+   $40 = $o;
+   $41 = ((($40)) + 16|0);
+   $42 = HEAP8[$41>>0]|0;
+   $43 = $42 & 1;
+   $44 = $43&255;
+   $45 = ($39|0)!=($44|0);
+   if (!($45)) {
+    _mrb_true_value_1134($agg$result);
+    STACKTOP = sp;return;
+   }
+  }
+ }
+ _mrb_false_value_1135($agg$result);
+ STACKTOP = sp;return;
+}
+function _range_initialize_copy($agg$result,$mrb,$copy) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $copy = $copy|0;
+ var $$byval_copy = 0, $$byval_copy4 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $25 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $copy$byval_copy = 0, $copy$byval_copy1 = 0, $copy$byval_copy3 = 0, $r = 0, $src = 0, $src$byval_copy = 0, $src$byval_copy2 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy4 = sp + 72|0;
+ $$byval_copy = sp + 64|0;
+ $copy$byval_copy3 = sp + 56|0;
+ $src$byval_copy2 = sp + 48|0;
+ $copy$byval_copy1 = sp + 40|0;
+ $src$byval_copy = sp + 32|0;
+ $copy$byval_copy = sp + 24|0;
+ $vararg_buffer = sp;
+ $src = sp + 8|0;
+ $0 = $mrb;
+ $1 = $0;
+ HEAP32[$vararg_buffer>>2] = $src;
+ (_mrb_get_args($1,68900,$vararg_buffer)|0);
+ $2 = $0;
+ ;HEAP32[$copy$byval_copy>>2]=HEAP32[$copy>>2]|0;HEAP32[$copy$byval_copy+4>>2]=HEAP32[$copy+4>>2]|0;
+ ;HEAP32[$src$byval_copy>>2]=HEAP32[$src>>2]|0;HEAP32[$src$byval_copy+4>>2]=HEAP32[$src+4>>2]|0;
+ $3 = (_mrb_obj_equal($2,$copy$byval_copy,$src$byval_copy)|0);
+ $4 = ($3<<24>>24)!=(0);
+ if ($4) {
+  ;HEAP32[$agg$result>>2]=HEAP32[$copy>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$copy+4>>2]|0;
+  STACKTOP = sp;return;
+ }
+ $5 = $0;
+ $6 = $0;
+ ;HEAP32[$copy$byval_copy1>>2]=HEAP32[$copy>>2]|0;HEAP32[$copy$byval_copy1+4>>2]=HEAP32[$copy+4>>2]|0;
+ $7 = (_mrb_obj_class($6,$copy$byval_copy1)|0);
+ ;HEAP32[$src$byval_copy2>>2]=HEAP32[$src>>2]|0;HEAP32[$src$byval_copy2+4>>2]=HEAP32[$src+4>>2]|0;
+ $8 = (_mrb_obj_is_instance_of($5,$src$byval_copy2,$7)|0);
+ $9 = ($8<<24>>24)!=(0);
+ if (!($9)) {
+  $10 = $0;
+  $11 = $0;
+  $12 = (_mrb_class_get($11,68905)|0);
+  _mrb_raise($10,$12,69015);
+  // unreachable;
+ }
+ $13 = HEAP32[$src>>2]|0;
+ $r = $13;
+ $14 = $0;
+ $15 = $r;
+ $16 = ((($15)) + 12|0);
+ $17 = HEAP32[$16>>2]|0;
+ $18 = $r;
+ $19 = ((($18)) + 12|0);
+ $20 = HEAP32[$19>>2]|0;
+ $21 = ((($20)) + 8|0);
+ $22 = $r;
+ $23 = ((($22)) + 16|0);
+ $24 = HEAP8[$23>>0]|0;
+ $25 = $24 & 1;
+ ;HEAP32[$copy$byval_copy3>>2]=HEAP32[$copy>>2]|0;HEAP32[$copy$byval_copy3+4>>2]=HEAP32[$copy+4>>2]|0;
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$17>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$17+4>>2]|0;
+ ;HEAP32[$$byval_copy4>>2]=HEAP32[$21>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$21+4>>2]|0;
+ _range_init($14,$copy$byval_copy3,$$byval_copy,$$byval_copy4,$25);
+ ;HEAP32[$agg$result>>2]=HEAP32[$copy>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$copy+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_init_version($mrb) {
+ $mrb = $mrb|0;
+ var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$byval_copy6 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0;
+ var $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $mruby_version = 0, $mruby_version$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy6 = sp + 128|0;
+ $$byval_copy5 = sp + 120|0;
+ $$byval_copy4 = sp + 112|0;
+ $$byval_copy3 = sp + 104|0;
+ $$byval_copy2 = sp + 96|0;
+ $mruby_version$byval_copy = sp + 88|0;
+ $$byval_copy1 = sp + 80|0;
+ $$byval_copy = sp + 72|0;
+ $mruby_version = sp + 56|0;
+ $1 = sp + 48|0;
+ $2 = sp + 40|0;
+ $3 = sp + 32|0;
+ $4 = sp + 24|0;
+ $5 = sp + 16|0;
+ $6 = sp + 8|0;
+ $7 = sp;
+ $0 = $mrb;
+ $8 = $0;
+ _mrb_str_new_static($mruby_version,$8,69036,5);
+ $9 = $0;
+ $10 = $0;
+ _mrb_str_new_static($1,$10,69042,3);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$1+4>>2]|0;
+ _mrb_define_global_const($9,69046,$$byval_copy);
+ $11 = $0;
+ $12 = $0;
+ _mrb_str_new_static($2,$12,69059,5);
+ ;HEAP32[$$byval_copy1>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$2+4>>2]|0;
+ _mrb_define_global_const($11,69065,$$byval_copy1);
+ $13 = $0;
+ ;HEAP32[$mruby_version$byval_copy>>2]=HEAP32[$mruby_version>>2]|0;HEAP32[$mruby_version$byval_copy+4>>2]=HEAP32[$mruby_version+4>>2]|0;
+ _mrb_define_global_const($13,69077,$mruby_version$byval_copy);
+ $14 = $0;
+ $15 = $0;
+ _mrb_str_new_static($3,$15,69036,5);
+ ;HEAP32[$$byval_copy2>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$3+4>>2]|0;
+ _mrb_define_global_const($14,69097,$$byval_copy2);
+ $16 = $0;
+ _mrb_fixnum_value_1168($4,10200);
+ ;HEAP32[$$byval_copy3>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$4+4>>2]|0;
+ _mrb_define_global_const($16,69111,$$byval_copy3);
+ $17 = $0;
+ $18 = $0;
+ _mrb_str_new_static($5,$18,69128,10);
+ ;HEAP32[$$byval_copy4>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$5+4>>2]|0;
+ _mrb_define_global_const($17,69139,$$byval_copy4);
+ $19 = $0;
+ $20 = $0;
+ _mrb_str_new_static($6,$20,69158,25);
+ ;HEAP32[$$byval_copy5>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$6+4>>2]|0;
+ _mrb_define_global_const($19,69184,$$byval_copy5);
+ $21 = $0;
+ $22 = $0;
+ _mrb_str_new_static($7,$22,69202,48);
+ ;HEAP32[$$byval_copy6>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy6+4>>2]=HEAP32[$7+4>>2]|0;
+ _mrb_define_global_const($21,69251,$$byval_copy6);
+ STACKTOP = sp;return;
+}
+function _mrb_fixnum_value_1168($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 3;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _mrb_generate_code($mrb,$p) {
+ $mrb = $mrb|0;
+ $p = $p|0;
+ var $$0 = 0, $$reg2mem26$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0;
+ var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $cond = 0, $cond28 = 0, $cond29 = 0, $cond30 = 0, $cond31 = 0, $cond32 = 0, $cond33 = 0, $cond34 = 0, _setjmpTable = 0, _setjmpTableSize = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ _setjmpTableSize = 4;_setjmpTable = _malloc(40) | 0;HEAP32[_setjmpTable>>2]=0;
+ __THREW__ = 0;
+ $0 = (invoke_iiii(330,($mrb|0),(0|0),(0|0))|0);
+ $1 = __THREW__; __THREW__ = 0;
+ if ((($1|0) != 0) & ((threwValue|0) != 0)) { $2 = _testSetjmp(HEAP32[$1>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($2|0) == 0) { _longjmp($1|0, threwValue|0); } tempRet0 = (threwValue); } else { $2 = -1; };
+ $3 = tempRet0;
+ $cond = ($2|0)==(1);
+ do {
+  if ($cond) {
+   $$reg2mem26$0 = $3;
+  } else {
+   $4 = ($0|0)!=(0|0);
+   if ($4) {
+    HEAP32[$0>>2] = $mrb;
+    $5 = ((($0)) + 248|0);
+    HEAP32[$5>>2] = $p;
+    $6 = ((($p)) + 28|0);
+    $7 = HEAP32[$6>>2]|0;
+    $8 = ((($0)) + 196|0);
+    HEAP32[$8>>2] = $7;
+    $9 = ((($p)) + 1400|0);
+    $10 = HEAP32[$9>>2]|0;
+    $11 = $10&65535;
+    $12 = ((($0)) + 244|0);
+    HEAP16[$12>>1] = $11;
+    $13 = ((($0)) + 8|0);
+    _setjmpTable = _saveSetjmp($13,1,_setjmpTable|0,_setjmpTableSize|0)|0;_setjmpTableSize = tempRet0;
+    __THREW__ = 0;
+    $14 = __THREW__; __THREW__ = 0;
+    if ((($14|0) != 0) & ((threwValue|0) != 0)) { $15 = _testSetjmp(HEAP32[$14>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($15|0) == 0) { _longjmp($14|0, threwValue|0); } tempRet0 = (threwValue); } else { $15 = -1; };
+    $16 = tempRet0;
+    $cond28 = ($15|0)==(1);
+    if ($cond28) {
+     $$reg2mem26$0 = $16;
+     break;
+    }
+    $$reg2mem26$0 = 0;
+    break;
+   } else {
+    $$0 = 0;
+    _free(_setjmpTable|0);
+    return ($$0|0);
+   }
+  }
+ } while(0);
+ while(1) {
+  $17 = ($$reg2mem26$0|0)==(0);
+  if ($17) {
+   $18 = ((($p)) + 1144|0);
+   $19 = HEAP32[$18>>2]|0;
+   __THREW__ = 0;
+   invoke_viii(331,($0|0),($19|0),0);
+   $20 = __THREW__; __THREW__ = 0;
+   if ((($20|0) != 0) & ((threwValue|0) != 0)) { $21 = _testSetjmp(HEAP32[$20>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($21|0) == 0) { _longjmp($20|0, threwValue|0); } tempRet0 = (threwValue); } else { $21 = -1; };
+   $22 = tempRet0;
+   $cond31 = ($21|0)==(1);
+   if ($cond31) {
+    $$reg2mem26$0 = $22;
+    continue;
+   }
+   $23 = ((($0)) + 216|0);
+   $24 = HEAP32[$23>>2]|0;
+   __THREW__ = 0;
+   $25 = (invoke_iii(195,($mrb|0),($24|0))|0);
+   $26 = __THREW__; __THREW__ = 0;
+   if ((($26|0) != 0) & ((threwValue|0) != 0)) { $27 = _testSetjmp(HEAP32[$26>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($27|0) == 0) { _longjmp($26|0, threwValue|0); } tempRet0 = (threwValue); } else { $27 = -1; };
+   $28 = tempRet0;
+   $cond32 = ($27|0)==(1);
+   if ($cond32) {
+    $$reg2mem26$0 = $28;
+    continue;
+   }
+   $29 = ((($0)) + 216|0);
+   $30 = HEAP32[$29>>2]|0;
+   __THREW__ = 0;
+   invoke_vii(332,($mrb|0),($30|0));
+   $31 = __THREW__; __THREW__ = 0;
+   if ((($31|0) != 0) & ((threwValue|0) != 0)) { $32 = _testSetjmp(HEAP32[$31>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($32|0) == 0) { _longjmp($31|0, threwValue|0); } tempRet0 = (threwValue); } else { $32 = -1; };
+   $33 = tempRet0;
+   $cond33 = ($32|0)==(1);
+   if ($cond33) {
+    $$reg2mem26$0 = $33;
+    continue;
+   }
+   $34 = ((($0)) + 4|0);
+   $35 = HEAP32[$34>>2]|0;
+   __THREW__ = 0;
+   invoke_vi(333,($35|0));
+   $36 = __THREW__; __THREW__ = 0;
+   if ((($36|0) != 0) & ((threwValue|0) != 0)) { $37 = _testSetjmp(HEAP32[$36>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($37|0) == 0) { _longjmp($36|0, threwValue|0); } tempRet0 = (threwValue); } else { $37 = -1; };
+   $38 = tempRet0;
+   $cond34 = ($37|0)==(1);
+   if ($cond34) {
+    $$reg2mem26$0 = $38;
+    continue;
+   } else {
+    label = 11;
+    break;
+   }
+  } else {
+   $39 = ((($0)) + 196|0);
+   $40 = HEAP32[$39>>2]|0;
+   $41 = ((($0)) + 216|0);
+   $42 = HEAP32[$41>>2]|0;
+   $43 = ((($42)) + 28|0);
+   $44 = HEAP32[$43>>2]|0;
+   $45 = ($40|0)==($44|0);
+   if ($45) {
+    $46 = ((($0)) + 216|0);
+    $47 = HEAP32[$46>>2]|0;
+    $48 = ((($47)) + 28|0);
+    HEAP32[$48>>2] = 0;
+   }
+   $49 = ((($0)) + 216|0);
+   $50 = HEAP32[$49>>2]|0;
+   __THREW__ = 0;
+   invoke_vii(332,($mrb|0),($50|0));
+   $51 = __THREW__; __THREW__ = 0;
+   if ((($51|0) != 0) & ((threwValue|0) != 0)) { $52 = _testSetjmp(HEAP32[$51>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($52|0) == 0) { _longjmp($51|0, threwValue|0); } tempRet0 = (threwValue); } else { $52 = -1; };
+   $53 = tempRet0;
+   $cond29 = ($52|0)==(1);
+   if ($cond29) {
+    $$reg2mem26$0 = $53;
+    continue;
+   }
+   $54 = ((($0)) + 4|0);
+   $55 = HEAP32[$54>>2]|0;
+   __THREW__ = 0;
+   invoke_vi(333,($55|0));
+   $56 = __THREW__; __THREW__ = 0;
+   if ((($56|0) != 0) & ((threwValue|0) != 0)) { $57 = _testSetjmp(HEAP32[$56>>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; if (($57|0) == 0) { _longjmp($56|0, threwValue|0); } tempRet0 = (threwValue); } else { $57 = -1; };
+   $58 = tempRet0;
+   $cond30 = ($57|0)==(1);
+   if ($cond30) {
+    $$reg2mem26$0 = $58;
+    continue;
+   } else {
+    label = 16;
+    break;
+   }
+  }
+ }
+ if ((label|0) == 11) {
+  $$0 = $25;
+  _free(_setjmpTable|0);
+  return ($$0|0);
+ }
+ else if ((label|0) == 16) {
+  $$0 = 0;
+  _free(_setjmpTable|0);
+  return ($$0|0);
+ }
+ return (0)|0;
+}
+function _scope_new($mrb,$prev,$lv) {
+ $mrb = $mrb|0;
+ $prev = $prev|0;
+ $lv = $lv|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
+ var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
+ var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0;
+ var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0;
+ var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
+ var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0;
+ var $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0;
+ var $99 = 0, $i = 0, $n = 0, $p = 0, $pool = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $mrb;
+ $2 = $prev;
+ $3 = $lv;
+ $4 = $1;
+ $5 = (_mrb_pool_open($4)|0);
+ $pool = $5;
+ $6 = $pool;
+ $7 = (_mrb_pool_alloc($6,252)|0);
+ $p = $7;
+ $8 = $p;
+ $9 = ($8|0)!=(0|0);
+ if (!($9)) {
+  $0 = 0;
+  $240 = $0;
+  STACKTOP = sp;return ($240|0);
+ }
+ $10 = $p;
+ _memcpy(($10|0),(74644|0),252)|0;
+ $11 = $1;
+ $12 = $p;
+ HEAP32[$12>>2] = $11;
+ $13 = $pool;
+ $14 = $p;
+ $15 = ((($14)) + 4|0);
+ HEAP32[$15>>2] = $13;
+ $16 = $2;
+ $17 = ($16|0)!=(0|0);
+ if (!($17)) {
+  $18 = $p;
+  $0 = $18;
+  $240 = $0;
+  STACKTOP = sp;return ($240|0);
+ }
+ $19 = $2;
+ $20 = $p;
+ $21 = ((($20)) + 164|0);
+ HEAP32[$21>>2] = $19;
+ $22 = $p;
+ $23 = ((($22)) + 184|0);
+ $24 = HEAP16[$23>>1]|0;
+ $25 = $24 & -32768;
+ $26 = $25 | 32767;
+ HEAP16[$23>>1] = $26;
+ $27 = $p;
+ $28 = ((($27)) + 184|0);
+ $29 = HEAP16[$28>>1]|0;
+ $30 = $29 & 32767;
+ HEAP16[$28>>1] = $30;
+ $31 = $1;
+ $32 = (_mrb_add_irep($31)|0);
+ $33 = $p;
+ $34 = ((($33)) + 216|0);
+ HEAP32[$34>>2] = $32;
+ $35 = $2;
+ $36 = $p;
+ $37 = ((($36)) + 216|0);
+ $38 = HEAP32[$37>>2]|0;
+ _scope_add_irep($35,$38);
+ $39 = $p;
+ $40 = ((($39)) + 228|0);
+ HEAP32[$40>>2] = 8;
+ $41 = $1;
+ $42 = $p;
+ $43 = ((($42)) + 228|0);
+ $44 = HEAP32[$43>>2]|0;
+ $45 = $44<<2;
+ $46 = (_mrb_malloc($41,$45)|0);
+ $47 = $p;
+ $48 = ((($47)) + 216|0);
+ $49 = HEAP32[$48>>2]|0;
+ $50 = ((($49)) + 20|0);
+ HEAP32[$50>>2] = $46;
+ $51 = $p;
+ $52 = ((($51)) + 212|0);
+ HEAP32[$52>>2] = 1024;
+ $53 = $1;
+ $54 = $p;
+ $55 = ((($54)) + 212|0);
+ $56 = HEAP32[$55>>2]|0;
+ $57 = $56<<2;
+ $58 = (_mrb_malloc($53,$57)|0);
+ $59 = $p;
+ $60 = ((($59)) + 204|0);
+ HEAP32[$60>>2] = $58;
+ $61 = $p;
+ $62 = ((($61)) + 204|0);
+ $63 = HEAP32[$62>>2]|0;
+ $64 = $p;
+ $65 = ((($64)) + 216|0);
+ $66 = HEAP32[$65>>2]|0;
+ $67 = ((($66)) + 8|0);
+ HEAP32[$67>>2] = $63;
+ $68 = $p;
+ $69 = ((($68)) + 220|0);
+ HEAP32[$69>>2] = 32;
+ $70 = $1;
+ $71 = $p;
+ $72 = ((($71)) + 220|0);
+ $73 = HEAP32[$72>>2]|0;
+ $74 = $73<<3;
+ $75 = (_mrb_malloc($70,$74)|0);
+ $76 = $p;
+ $77 = ((($76)) + 216|0);
+ $78 = HEAP32[$77>>2]|0;
+ $79 = ((($78)) + 12|0);
+ HEAP32[$79>>2] = $75;
+ $80 = $p;
+ $81 = ((($80)) + 216|0);
+ $82 = HEAP32[$81>>2]|0;
+ $83 = ((($82)) + 44|0);
+ HEAP32[$83>>2] = 0;
+ $84 = $p;
+ $85 = ((($84)) + 224|0);
+ HEAP32[$85>>2] = 256;
+ $86 = $1;
+ $87 = $p;
+ $88 = ((($87)) + 224|0);
+ $89 = HEAP32[$88>>2]|0;
+ $90 = $89<<2;
+ $91 = (_mrb_malloc($86,$90)|0);
+ $92 = $p;
+ $93 = ((($92)) + 216|0);
+ $94 = HEAP32[$93>>2]|0;
+ $95 = ((($94)) + 16|0);
+ HEAP32[$95>>2] = $91;
+ $96 = $p;
+ $97 = ((($96)) + 216|0);
+ $98 = HEAP32[$97>>2]|0;
+ $99 = ((($98)) + 48|0);
+ HEAP32[$99>>2] = 0;
+ $100 = $3;
+ $101 = $p;
+ $102 = ((($101)) + 168|0);
+ HEAP32[$102>>2] = $100;
+ $103 = $3;
+ $104 = (_node_len($103)|0);
+ $105 = (($104) + 1)|0;
+ $106 = $p;
+ $107 = ((($106)) + 172|0);
+ $108 = HEAP32[$107>>2]|0;
+ $109 = (($108) + ($105))|0;
+ HEAP32[$107>>2] = $109;
+ $110 = $p;
+ $111 = ((($110)) + 172|0);
+ $112 = HEAP32[$111>>2]|0;
+ $113 = $112&65535;
+ $114 = $p;
+ $115 = ((($114)) + 232|0);
+ HEAP16[$115>>1] = $113;
+ $116 = $3;
+ $117 = ($116|0)!=(0|0);
+ L9: do {
+  if ($117) {
+   $118 = $3;
+   $n = $118;
+   $i = 0;
+   $119 = $1;
+   $120 = $p;
+   $121 = ((($120)) + 232|0);
+   $122 = HEAP16[$121>>1]|0;
+   $123 = $122&65535;
+   $124 = (($123) - 1)|0;
+   $125 = $124<<3;
+   $126 = (_mrb_malloc($119,$125)|0);
+   $127 = $p;
+   $128 = ((($127)) + 216|0);
+   $129 = HEAP32[$128>>2]|0;
+   $130 = ((($129)) + 24|0);
+   HEAP32[$130>>2] = $126;
+   $i = 0;
+   $131 = $3;
+   $n = $131;
+   while(1) {
+    $132 = $n;
+    $133 = ($132|0)!=(0|0);
+    if (!($133)) {
+     break L9;
+    }
+    $134 = $n;
+    $135 = HEAP32[$134>>2]|0;
+    $136 = $135;
+    $137 = $i;
+    $138 = $p;
+    $139 = ((($138)) + 216|0);
+    $140 = HEAP32[$139>>2]|0;
+    $141 = ((($140)) + 24|0);
+    $142 = HEAP32[$141>>2]|0;
+    $143 = (($142) + ($137<<3)|0);
+    HEAP32[$143>>2] = $136;
+    $144 = $n;
+    $145 = HEAP32[$144>>2]|0;
+    $146 = $145;
+    $147 = ($146|0)!=(0);
+    if ($147) {
+     $148 = $p;
+     $149 = $n;
+     $150 = HEAP32[$149>>2]|0;
+     $151 = $150;
+     $152 = (_lv_idx($148,$151)|0);
+     $153 = $152&65535;
+     $154 = $i;
+     $155 = $p;
+     $156 = ((($155)) + 216|0);
+     $157 = HEAP32[$156>>2]|0;
+     $158 = ((($157)) + 24|0);
+     $159 = HEAP32[$158>>2]|0;
+     $160 = (($159) + ($154<<3)|0);
+     $161 = ((($160)) + 4|0);
+     HEAP16[$161>>1] = $153;
+    } else {
+     $162 = $i;
+     $163 = $p;
+     $164 = ((($163)) + 216|0);
+     $165 = HEAP32[$164>>2]|0;
+     $166 = ((($165)) + 24|0);
+     $167 = HEAP32[$166>>2]|0;
+     $168 = (($167) + ($162<<3)|0);
+     $169 = ((($168)) + 4|0);
+     HEAP16[$169>>1] = 0;
+    }
+    $170 = $i;
+    $171 = (($170) + 1)|0;
+    $i = $171;
+    $172 = $n;
+    $173 = ((($172)) + 4|0);
+    $174 = HEAP32[$173>>2]|0;
+    $n = $174;
+   }
+  }
+ } while(0);
+ $175 = $1;
+ $176 = (_mrb_gc_arena_save($175)|0);
+ $177 = $p;
+ $178 = ((($177)) + 236|0);
+ HEAP32[$178>>2] = $176;
+ $179 = $2;
+ $180 = ((($179)) + 196|0);
+ $181 = HEAP32[$180>>2]|0;
+ $182 = $p;
+ $183 = ((($182)) + 196|0);
+ HEAP32[$183>>2] = $181;
+ $184 = $p;
+ $185 = ((($184)) + 196|0);
+ $186 = HEAP32[$185>>2]|0;
+ $187 = ($186|0)!=(0|0);
+ if ($187) {
+  $188 = $1;
+  $189 = $p;
+  $190 = ((($189)) + 212|0);
+  $191 = HEAP32[$190>>2]|0;
+  $192 = $191<<1;
+  $193 = (_mrb_malloc($188,$192)|0);
+  $194 = $p;
+  $195 = ((($194)) + 208|0);
+  HEAP32[$195>>2] = $193;
+ }
+ $196 = $2;
+ $197 = ((($196)) + 200|0);
+ $198 = HEAP16[$197>>1]|0;
+ $199 = $p;
+ $200 = ((($199)) + 200|0);
+ HEAP16[$200>>1] = $198;
+ $201 = $p;
+ $202 = ((($201)) + 240|0);
+ HEAP32[$202>>2] = 0;
+ $203 = $p;
+ $204 = ((($203)) + 196|0);
+ $205 = HEAP32[$204>>2]|0;
+ $206 = ($205|0)!=(0|0);
+ if ($206) {
+  $207 = $1;
+  $208 = $p;
+  $209 = ((($208)) + 216|0);
+  $210 = HEAP32[$209>>2]|0;
+  (_mrb_debug_info_alloc($207,$210)|0);
+  $211 = $p;
+  $212 = ((($211)) + 196|0);
+  $213 = HEAP32[$212>>2]|0;
+  $214 = $p;
+  $215 = ((($214)) + 216|0);
+  $216 = HEAP32[$215>>2]|0;
+  $217 = ((($216)) + 28|0);
+  HEAP32[$217>>2] = $213;
+  $218 = $p;
+  $219 = ((($218)) + 208|0);
+  $220 = HEAP32[$219>>2]|0;
+  $221 = $p;
+  $222 = ((($221)) + 216|0);
+  $223 = HEAP32[$222>>2]|0;
+  $224 = ((($223)) + 32|0);
+  HEAP32[$224>>2] = $220;
+ } else {
+  $225 = $p;
+  $226 = ((($225)) + 216|0);
+  $227 = HEAP32[$226>>2]|0;
+  $228 = ((($227)) + 36|0);
+  HEAP32[$228>>2] = 0;
+ }
+ $229 = $2;
+ $230 = ((($229)) + 248|0);
+ $231 = HEAP32[$230>>2]|0;
+ $232 = $p;
+ $233 = ((($232)) + 248|0);
+ HEAP32[$233>>2] = $231;
+ $234 = $2;
+ $235 = ((($234)) + 244|0);
+ $236 = HEAP16[$235>>1]|0;
+ $237 = $p;
+ $238 = ((($237)) + 244|0);
+ HEAP16[$238>>1] = $236;
+ $239 = $p;
+ $0 = $239;
+ $240 = $0;
+ STACKTOP = sp;return ($240|0);
+}
+function _scope_add_irep($s,$irep) {
+ $s = $s|0;
+ $irep = $irep|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $irep;
+ $2 = $0;
+ $3 = ((($2)) + 216|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)==(0|0);
+ if ($5) {
+  $6 = $1;
+  $7 = $0;
+  $8 = ((($7)) + 216|0);
+  HEAP32[$8>>2] = $6;
+  STACKTOP = sp;return;
+ }
+ $9 = $0;
+ $10 = ((($9)) + 216|0);
+ $11 = HEAP32[$10>>2]|0;
+ $12 = ((($11)) + 52|0);
+ $13 = HEAP32[$12>>2]|0;
+ $14 = $0;
+ $15 = ((($14)) + 228|0);
+ $16 = HEAP32[$15>>2]|0;
+ $17 = ($13|0)==($16|0);
+ if ($17) {
+  $18 = $0;
+  $19 = ((($18)) + 228|0);
+  $20 = HEAP32[$19>>2]|0;
+  $21 = $20<<1;
+  HEAP32[$19>>2] = $21;
+  $22 = $0;
+  $23 = $0;
+  $24 = ((($23)) + 216|0);
+  $25 = HEAP32[$24>>2]|0;
+  $26 = ((($25)) + 20|0);
+  $27 = HEAP32[$26>>2]|0;
+  $28 = $0;
+  $29 = ((($28)) + 228|0);
+  $30 = HEAP32[$29>>2]|0;
+  $31 = $30<<2;
+  $32 = (_codegen_realloc($22,$27,$31)|0);
+  $33 = $0;
+  $34 = ((($33)) + 216|0);
+  $35 = HEAP32[$34>>2]|0;
+  $36 = ((($35)) + 20|0);
+  HEAP32[$36>>2] = $32;
+ }
+ $37 = $1;
+ $38 = $0;
+ $39 = ((($38)) + 216|0);
+ $40 = HEAP32[$39>>2]|0;
+ $41 = ((($40)) + 52|0);
+ $42 = HEAP32[$41>>2]|0;
+ $43 = $0;
+ $44 = ((($43)) + 216|0);
+ $45 = HEAP32[$44>>2]|0;
+ $46 = ((($45)) + 20|0);
+ $47 = HEAP32[$46>>2]|0;
+ $48 = (($47) + ($42<<2)|0);
+ HEAP32[$48>>2] = $37;
+ $49 = $0;
+ $50 = ((($49)) + 216|0);
+ $51 = HEAP32[$50>>2]|0;
+ $52 = ((($51)) + 52|0);
+ $53 = HEAP32[$52>>2]|0;
+ $54 = (($53) + 1)|0;
+ HEAP32[$52>>2] = $54;
+ STACKTOP = sp;return;
+}
+function _codegen_realloc($s,$p,$len) {
+ $s = $s|0;
+ $p = $p|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $p;
+ $2 = $len;
+ $3 = $0;
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $1;
+ $6 = $2;
+ $7 = (_mrb_realloc_simple($4,$5,$6)|0);
+ $1 = $7;
+ $8 = $1;
+ $9 = ($8|0)==(0|0);
+ $10 = $2;
+ $11 = ($10>>>0)>(0);
+ $or$cond = $9 & $11;
+ if (!($or$cond)) {
+  $13 = $1;
+  STACKTOP = sp;return ($13|0);
+ }
+ $12 = $0;
+ _codegen_error($12,69267);
+ $13 = $1;
+ STACKTOP = sp;return ($13|0);
+}
+function _codegen_error($s,$message) {
+ $s = $s|0;
+ $message = $message|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $tmp = 0, $vararg_buffer = 0, $vararg_buffer3 = 0, $vararg_ptr1 = 0;
+ var $vararg_ptr2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer3 = sp + 16|0;
+ $vararg_buffer = sp;
+ $0 = $s;
+ $1 = $message;
+ $2 = $0;
+ $3 = ($2|0)!=(0|0);
+ if (!($3)) {
+  STACKTOP = sp;return;
+ }
+ while(1) {
+  $4 = $0;
+  $5 = ((($4)) + 164|0);
+  $6 = HEAP32[$5>>2]|0;
+  $7 = ($6|0)!=(0|0);
+  $8 = $0;
+  if (!($7)) {
+   break;
+  }
+  $9 = ((($8)) + 164|0);
+  $10 = HEAP32[$9>>2]|0;
+  $tmp = $10;
+  $11 = $0;
+  $12 = ((($11)) + 4|0);
+  $13 = HEAP32[$12>>2]|0;
+  _mrb_pool_close($13);
+  $14 = $tmp;
+  $0 = $14;
+ }
+ $15 = ((($8)) + 196|0);
+ $16 = HEAP32[$15>>2]|0;
+ $17 = ($16|0)!=(0|0);
+ if ($17) {
+  $18 = $0;
+  $19 = ((($18)) + 200|0);
+  $20 = HEAP16[$19>>1]|0;
+  $21 = $20&65535;
+  $22 = ($21|0)!=(0);
+  if ($22) {
+   $23 = HEAP32[637]|0;
+   $24 = $0;
+   $25 = ((($24)) + 196|0);
+   $26 = HEAP32[$25>>2]|0;
+   $27 = $0;
+   $28 = ((($27)) + 200|0);
+   $29 = HEAP16[$28>>1]|0;
+   $30 = $29&65535;
+   $31 = $1;
+   HEAP32[$vararg_buffer>>2] = $26;
+   $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+   HEAP32[$vararg_ptr1>>2] = $30;
+   $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+   HEAP32[$vararg_ptr2>>2] = $31;
+   (_fprintf($23,69279,$vararg_buffer)|0);
+   $34 = $0;
+   $35 = ((($34)) + 8|0);
+   _longjmp(($35|0),1);
+   // unreachable;
+  }
+ }
+ $32 = HEAP32[637]|0;
+ $33 = $1;
+ HEAP32[$vararg_buffer3>>2] = $33;
+ (_fprintf($32,69304,$vararg_buffer3)|0);
+ $34 = $0;
+ $35 = ((($34)) + 8|0);
+ _longjmp(($35|0),1);
+ // unreachable;
+}
+function _node_len($tree) {
+ $tree = $tree|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $n = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $tree;
+ $n = 0;
+ while(1) {
+  $1 = $0;
+  $2 = ($1|0)!=(0|0);
+  $3 = $n;
+  if (!($2)) {
+   break;
+  }
+  $4 = (($3) + 1)|0;
+  $n = $4;
+  $5 = $0;
+  $6 = ((($5)) + 4|0);
+  $7 = HEAP32[$6>>2]|0;
+  $0 = $7;
+ }
+ STACKTOP = sp;return ($3|0);
+}
+function _lv_idx($s,$id) {
+ $s = $s|0;
+ $id = $id|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $lv = 0;
+ var $n = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $s;
+ $2 = $id;
+ $3 = $1;
+ $4 = ((($3)) + 168|0);
+ $5 = HEAP32[$4>>2]|0;
+ $lv = $5;
+ $n = 1;
+ while(1) {
+  $6 = $lv;
+  $7 = ($6|0)!=(0|0);
+  if (!($7)) {
+   label = 6;
+   break;
+  }
+  $8 = $lv;
+  $9 = HEAP32[$8>>2]|0;
+  $10 = $9;
+  $11 = $2;
+  $12 = ($10|0)==($11|0);
+  $13 = $n;
+  if ($12) {
+   label = 4;
+   break;
+  }
+  $14 = (($13) + 1)|0;
+  $n = $14;
+  $15 = $lv;
+  $16 = ((($15)) + 4|0);
+  $17 = HEAP32[$16>>2]|0;
+  $lv = $17;
+ }
+ if ((label|0) == 4) {
+  $0 = $13;
+  $18 = $0;
+  STACKTOP = sp;return ($18|0);
+ }
+ else if ((label|0) == 6) {
+  $0 = 0;
+  $18 = $0;
+  STACKTOP = sp;return ($18|0);
+ }
+ return (0)|0;
+}
+function _codegen($s,$tree,$val) {
+ $s = $s|0;
+ $tree = $tree|0;
+ $val = $val|0;
+ var $$byval_copy = 0, $$byval_copy12 = 0, $$byval_copy13 = 0, $$byval_copy14 = 0, $$byval_copy15 = 0, $$byval_copy16 = 0, $$byval_copy17 = 0, $$byval_copy18 = 0, $$byval_copy19 = 0, $$byval_copy20 = 0, $$byval_copy21 = 0, $$byval_copy22 = 0, $$byval_copy23 = 0, $$byval_copy24 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0;
+ var $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0, $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0;
+ var $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0, $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0;
+ var $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0, $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0;
+ var $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $1060 = 0, $1061 = 0, $1062 = 0, $1063 = 0, $1064 = 0, $1065 = 0, $1066 = 0, $1067 = 0, $1068 = 0, $1069 = 0, $107 = 0, $1070 = 0, $1071 = 0, $1072 = 0, $1073 = 0, $1074 = 0;
+ var $1075 = 0, $1076 = 0, $1077 = 0, $1078 = 0, $1079 = 0, $108 = 0, $1080 = 0, $1081 = 0, $1082 = 0, $1083 = 0, $1084 = 0, $1085 = 0, $1086 = 0, $1087 = 0, $1088 = 0, $1089 = 0, $109 = 0, $1090 = 0, $1091 = 0, $1092 = 0;
+ var $1093 = 0, $1094 = 0, $1095 = 0, $1096 = 0, $1097 = 0, $1098 = 0, $1099 = 0, $11 = 0, $110 = 0, $1100 = 0, $1101 = 0, $1102 = 0, $1103 = 0, $1104 = 0, $1105 = 0, $1106 = 0, $1107 = 0, $1108 = 0, $1109 = 0, $111 = 0;
+ var $1110 = 0, $1111 = 0, $1112 = 0, $1113 = 0, $1114 = 0, $1115 = 0, $1116 = 0, $1117 = 0, $1118 = 0, $1119 = 0, $112 = 0, $1120 = 0, $1121 = 0, $1122 = 0, $1123 = 0, $1124 = 0, $1125 = 0, $1126 = 0, $1127 = 0, $1128 = 0;
+ var $1129 = 0, $113 = 0, $1130 = 0, $1131 = 0, $1132 = 0, $1133 = 0, $1134 = 0, $1135 = 0, $1136 = 0, $1137 = 0, $1138 = 0, $1139 = 0, $114 = 0, $1140 = 0, $1141 = 0, $1142 = 0, $1143 = 0, $1144 = 0, $1145 = 0, $1146 = 0;
+ var $1147 = 0, $1148 = 0, $1149 = 0, $115 = 0, $1150 = 0, $1151 = 0, $1152 = 0, $1153 = 0, $1154 = 0, $1155 = 0, $1156 = 0, $1157 = 0, $1158 = 0, $1159 = 0, $116 = 0, $1160 = 0, $1161 = 0, $1162 = 0, $1163 = 0, $1164 = 0;
+ var $1165 = 0, $1166 = 0, $1167 = 0, $1168 = 0, $1169 = 0, $117 = 0, $1170 = 0, $1171 = 0, $1172 = 0, $1173 = 0, $1174 = 0, $1175 = 0, $1176 = 0, $1177 = 0, $1178 = 0, $1179 = 0, $118 = 0, $1180 = 0, $1181 = 0, $1182 = 0;
+ var $1183 = 0, $1184 = 0, $1185 = 0, $1186 = 0, $1187 = 0, $1188 = 0, $1189 = 0, $119 = 0, $1190 = 0, $1191 = 0, $1192 = 0, $1193 = 0, $1194 = 0, $1195 = 0, $1196 = 0, $1197 = 0, $1198 = 0, $1199 = 0, $12 = 0, $120 = 0;
+ var $1200 = 0, $1201 = 0, $1202 = 0, $1203 = 0, $1204 = 0, $1205 = 0, $1206 = 0, $1207 = 0, $1208 = 0, $1209 = 0, $121 = 0, $1210 = 0, $1211 = 0, $1212 = 0, $1213 = 0, $1214 = 0, $1215 = 0, $1216 = 0, $1217 = 0, $1218 = 0;
+ var $1219 = 0, $122 = 0, $1220 = 0, $1221 = 0, $1222 = 0, $1223 = 0, $1224 = 0, $1225 = 0, $1226 = 0, $1227 = 0, $1228 = 0, $1229 = 0, $123 = 0, $1230 = 0, $1231 = 0, $1232 = 0, $1233 = 0, $1234 = 0, $1235 = 0, $1236 = 0;
+ var $1237 = 0, $1238 = 0, $1239 = 0, $124 = 0, $1240 = 0, $1241 = 0, $1242 = 0, $1243 = 0, $1244 = 0, $1245 = 0, $1246 = 0, $1247 = 0, $1248 = 0, $1249 = 0, $125 = 0, $1250 = 0, $1251 = 0, $1252 = 0, $1253 = 0, $1254 = 0;
+ var $1255 = 0, $1256 = 0, $1257 = 0, $1258 = 0, $1259 = 0, $126 = 0, $1260 = 0, $1261 = 0, $1262 = 0, $1263 = 0, $1264 = 0, $1265 = 0, $1266 = 0, $1267 = 0, $1268 = 0, $1269 = 0, $127 = 0, $1270 = 0, $1271 = 0, $1272 = 0;
+ var $1273 = 0, $1274 = 0, $1275 = 0, $1276 = 0, $1277 = 0, $1278 = 0, $1279 = 0, $128 = 0, $1280 = 0, $1281 = 0, $1282 = 0, $1283 = 0, $1284 = 0, $1285 = 0, $1286 = 0, $1287 = 0, $1288 = 0, $1289 = 0, $129 = 0, $1290 = 0;
+ var $1291 = 0, $1292 = 0, $1293 = 0, $1294 = 0, $1295 = 0, $1296 = 0, $1297 = 0, $1298 = 0, $1299 = 0, $13 = 0, $130 = 0, $1300 = 0, $1301 = 0, $1302 = 0, $1303 = 0, $1304 = 0, $1305 = 0, $1306 = 0, $1307 = 0, $1308 = 0;
+ var $1309 = 0, $131 = 0, $1310 = 0, $1311 = 0, $1312 = 0, $1313 = 0, $1314 = 0, $1315 = 0, $1316 = 0, $1317 = 0, $1318 = 0, $1319 = 0, $132 = 0, $1320 = 0, $1321 = 0, $1322 = 0, $1323 = 0, $1324 = 0, $1325 = 0, $1326 = 0;
+ var $1327 = 0, $1328 = 0, $1329 = 0, $133 = 0, $1330 = 0, $1331 = 0, $1332 = 0, $1333 = 0, $1334 = 0, $1335 = 0, $1336 = 0, $1337 = 0, $1338 = 0, $1339 = 0, $134 = 0, $1340 = 0, $1341 = 0, $1342 = 0, $1343 = 0, $1344 = 0;
+ var $1345 = 0, $1346 = 0, $1347 = 0, $1348 = 0, $1349 = 0, $135 = 0, $1350 = 0, $1351 = 0, $1352 = 0, $1353 = 0, $1354 = 0, $1355 = 0, $1356 = 0, $1357 = 0, $1358 = 0, $1359 = 0, $136 = 0, $1360 = 0, $1361 = 0, $1362 = 0;
+ var $1363 = 0, $1364 = 0, $1365 = 0, $1366 = 0, $1367 = 0, $1368 = 0, $1369 = 0, $137 = 0, $1370 = 0, $1371 = 0, $1372 = 0, $1373 = 0, $1374 = 0, $1375 = 0, $1376 = 0, $1377 = 0, $1378 = 0, $1379 = 0, $138 = 0, $1380 = 0;
+ var $1381 = 0, $1382 = 0, $1383 = 0, $1384 = 0, $1385 = 0, $1386 = 0, $1387 = 0, $1388 = 0, $1389 = 0, $139 = 0, $1390 = 0, $1391 = 0, $1392 = 0, $1393 = 0, $1394 = 0, $1395 = 0, $1396 = 0, $1397 = 0, $1398 = 0, $1399 = 0;
+ var $14 = 0, $140 = 0, $1400 = 0, $1401 = 0, $1402 = 0, $1403 = 0, $1404 = 0, $1405 = 0, $1406 = 0, $1407 = 0, $1408 = 0, $1409 = 0, $141 = 0, $1410 = 0, $1411 = 0, $1412 = 0, $1413 = 0, $1414 = 0, $1415 = 0, $1416 = 0;
+ var $1417 = 0, $1418 = 0, $1419 = 0, $142 = 0, $1420 = 0, $1421 = 0, $1422 = 0, $1423 = 0, $1424 = 0, $1425 = 0, $1426 = 0, $1427 = 0, $1428 = 0, $1429 = 0, $143 = 0, $1430 = 0, $1431 = 0, $1432 = 0, $1433 = 0, $1434 = 0;
+ var $1435 = 0, $1436 = 0, $1437 = 0, $1438 = 0, $1439 = 0, $144 = 0, $1440 = 0, $1441 = 0, $1442 = 0, $1443 = 0, $1444 = 0, $1445 = 0, $1446 = 0, $1447 = 0, $1448 = 0, $1449 = 0, $145 = 0, $1450 = 0, $1451 = 0, $1452 = 0;
+ var $1453 = 0, $1454 = 0, $1455 = 0, $1456 = 0, $1457 = 0, $1458 = 0, $1459 = 0, $146 = 0, $1460 = 0, $1461 = 0, $1462 = 0, $1463 = 0, $1464 = 0, $1465 = 0, $1466 = 0, $1467 = 0, $1468 = 0, $1469 = 0, $147 = 0, $1470 = 0;
+ var $1471 = 0, $1472 = 0, $1473 = 0, $1474 = 0, $1475 = 0, $1476 = 0, $1477 = 0, $1478 = 0, $1479 = 0, $148 = 0, $1480 = 0, $1481 = 0, $1482 = 0, $1483 = 0, $1484 = 0, $1485 = 0, $1486 = 0, $1487 = 0, $1488 = 0, $1489 = 0;
+ var $149 = 0, $1490 = 0, $1491 = 0, $1492 = 0, $1493 = 0, $1494 = 0, $1495 = 0, $1496 = 0, $1497 = 0, $1498 = 0, $1499 = 0, $15 = 0, $150 = 0, $1500 = 0, $1501 = 0, $1502 = 0, $1503 = 0, $1504 = 0, $1505 = 0, $1506 = 0;
+ var $1507 = 0, $1508 = 0, $1509 = 0, $151 = 0, $1510 = 0, $1511 = 0, $1512 = 0, $1513 = 0, $1514 = 0, $1515 = 0, $1516 = 0, $1517 = 0, $1518 = 0, $1519 = 0, $152 = 0, $1520 = 0, $1521 = 0, $1522 = 0, $1523 = 0, $1524 = 0;
+ var $1525 = 0, $1526 = 0, $1527 = 0, $1528 = 0, $1529 = 0, $153 = 0, $1530 = 0, $1531 = 0, $1532 = 0, $1533 = 0, $1534 = 0, $1535 = 0, $1536 = 0, $1537 = 0, $1538 = 0, $1539 = 0, $154 = 0, $1540 = 0, $1541 = 0, $1542 = 0;
+ var $1543 = 0, $1544 = 0, $1545 = 0, $1546 = 0, $1547 = 0, $1548 = 0, $1549 = 0, $155 = 0, $1550 = 0, $1551 = 0, $1552 = 0, $1553 = 0, $1554 = 0, $1555 = 0, $1556 = 0, $1557 = 0, $1558 = 0, $1559 = 0, $156 = 0, $1560 = 0;
+ var $1561 = 0, $1562 = 0, $1563 = 0, $1564 = 0, $1565 = 0, $1566 = 0, $1567 = 0, $1568 = 0, $1569 = 0, $157 = 0, $1570 = 0, $1571 = 0, $1572 = 0, $1573 = 0, $1574 = 0, $1575 = 0, $1576 = 0, $1577 = 0, $1578 = 0, $1579 = 0;
+ var $158 = 0, $1580 = 0, $1581 = 0, $1582 = 0, $1583 = 0, $1584 = 0, $1585 = 0, $1586 = 0, $1587 = 0, $1588 = 0, $1589 = 0, $159 = 0, $1590 = 0, $1591 = 0, $1592 = 0, $1593 = 0, $1594 = 0, $1595 = 0, $1596 = 0, $1597 = 0;
+ var $1598 = 0, $1599 = 0, $16 = 0, $160 = 0, $1600 = 0, $1601 = 0, $1602 = 0, $1603 = 0, $1604 = 0, $1605 = 0, $1606 = 0, $1607 = 0, $1608 = 0, $1609 = 0, $161 = 0, $1610 = 0, $1611 = 0, $1612 = 0, $1613 = 0, $1614 = 0;
+ var $1615 = 0, $1616 = 0, $1617 = 0, $1618 = 0, $1619 = 0, $162 = 0, $1620 = 0, $1621 = 0, $1622 = 0, $1623 = 0, $1624 = 0, $1625 = 0, $1626 = 0, $1627 = 0, $1628 = 0, $1629 = 0, $163 = 0, $1630 = 0, $1631 = 0, $1632 = 0;
+ var $1633 = 0, $1634 = 0, $1635 = 0, $1636 = 0, $1637 = 0, $1638 = 0, $1639 = 0, $164 = 0, $1640 = 0, $1641 = 0, $1642 = 0, $1643 = 0, $1644 = 0, $1645 = 0, $1646 = 0, $1647 = 0, $1648 = 0, $1649 = 0, $165 = 0, $1650 = 0;
+ var $1651 = 0, $1652 = 0, $1653 = 0, $1654 = 0, $1655 = 0, $1656 = 0, $1657 = 0, $1658 = 0, $1659 = 0, $166 = 0, $1660 = 0, $1661 = 0, $1662 = 0, $1663 = 0, $1664 = 0, $1665 = 0, $1666 = 0, $1667 = 0, $1668 = 0, $1669 = 0;
+ var $167 = 0, $1670 = 0, $1671 = 0, $1672 = 0, $1673 = 0, $1674 = 0, $1675 = 0, $1676 = 0, $1677 = 0, $1678 = 0, $1679 = 0, $168 = 0, $1680 = 0, $1681 = 0, $1682 = 0, $1683 = 0, $1684 = 0, $1685 = 0, $1686 = 0, $1687 = 0;
+ var $1688 = 0, $1689 = 0, $169 = 0, $1690 = 0, $1691 = 0, $1692 = 0, $1693 = 0, $1694 = 0, $1695 = 0, $1696 = 0, $1697 = 0, $1698 = 0, $1699 = 0, $17 = 0, $170 = 0, $1700 = 0, $1701 = 0, $1702 = 0, $1703 = 0, $1704 = 0;
+ var $1705 = 0, $1706 = 0, $1707 = 0, $1708 = 0, $1709 = 0, $171 = 0, $1710 = 0, $1711 = 0, $1712 = 0, $1713 = 0, $1714 = 0, $1715 = 0, $1716 = 0, $1717 = 0, $1718 = 0, $1719 = 0, $172 = 0, $1720 = 0, $1721 = 0, $1722 = 0;
+ var $1723 = 0, $1724 = 0, $1725 = 0, $1726 = 0, $1727 = 0, $1728 = 0, $1729 = 0, $173 = 0, $1730 = 0, $1731 = 0, $1732 = 0, $1733 = 0, $1734 = 0, $1735 = 0, $1736 = 0, $1737 = 0, $1738 = 0, $1739 = 0, $174 = 0, $1740 = 0;
+ var $1741 = 0, $1742 = 0, $1743 = 0, $1744 = 0, $1745 = 0, $1746 = 0, $1747 = 0, $1748 = 0, $1749 = 0, $175 = 0, $1750 = 0, $1751 = 0, $1752 = 0, $1753 = 0, $1754 = 0, $1755 = 0, $1756 = 0, $1757 = 0, $1758 = 0, $1759 = 0;
+ var $176 = 0, $1760 = 0, $1761 = 0, $1762 = 0, $1763 = 0, $1764 = 0, $1765 = 0, $1766 = 0, $1767 = 0, $1768 = 0, $1769 = 0, $177 = 0, $1770 = 0, $1771 = 0, $1772 = 0, $1773 = 0, $1774 = 0, $1775 = 0, $1776 = 0, $1777 = 0;
+ var $1778 = 0, $1779 = 0, $178 = 0, $1780 = 0, $1781 = 0, $1782 = 0, $1783 = 0, $1784 = 0, $1785 = 0, $1786 = 0, $1787 = 0, $1788 = 0, $1789 = 0, $179 = 0, $1790 = 0, $1791 = 0, $1792 = 0, $1793 = 0, $1794 = 0, $1795 = 0;
+ var $1796 = 0, $1797 = 0, $1798 = 0, $1799 = 0, $18 = 0, $180 = 0, $1800 = 0, $1801 = 0, $1802 = 0, $1803 = 0, $1804 = 0, $1805 = 0, $1806 = 0, $1807 = 0, $1808 = 0, $1809 = 0, $181 = 0, $1810 = 0, $1811 = 0, $1812 = 0;
+ var $1813 = 0, $1814 = 0, $1815 = 0, $1816 = 0, $1817 = 0, $1818 = 0, $1819 = 0, $182 = 0, $1820 = 0, $1821 = 0, $1822 = 0, $1823 = 0, $1824 = 0, $1825 = 0, $1826 = 0, $1827 = 0, $1828 = 0, $1829 = 0, $183 = 0, $1830 = 0;
+ var $1831 = 0, $1832 = 0, $1833 = 0, $1834 = 0, $1835 = 0, $1836 = 0, $1837 = 0, $1838 = 0, $1839 = 0, $184 = 0, $1840 = 0, $1841 = 0, $1842 = 0, $1843 = 0, $1844 = 0, $1845 = 0, $1846 = 0, $1847 = 0, $1848 = 0, $1849 = 0;
+ var $185 = 0, $1850 = 0, $1851 = 0, $1852 = 0, $1853 = 0, $1854 = 0, $1855 = 0, $1856 = 0, $1857 = 0, $1858 = 0, $1859 = 0, $186 = 0, $1860 = 0, $1861 = 0, $1862 = 0, $1863 = 0, $1864 = 0, $1865 = 0, $1866 = 0, $1867 = 0;
+ var $1868 = 0, $1869 = 0, $187 = 0, $1870 = 0, $1871 = 0, $1872 = 0, $1873 = 0, $1874 = 0, $1875 = 0, $1876 = 0, $1877 = 0, $1878 = 0, $1879 = 0, $188 = 0, $1880 = 0, $1881 = 0, $1882 = 0, $1883 = 0, $1884 = 0, $1885 = 0;
+ var $1886 = 0, $1887 = 0, $1888 = 0, $1889 = 0, $189 = 0, $1890 = 0, $1891 = 0, $1892 = 0, $1893 = 0, $1894 = 0, $1895 = 0, $1896 = 0, $1897 = 0, $1898 = 0, $1899 = 0, $19 = 0, $190 = 0, $1900 = 0, $1901 = 0, $1902 = 0;
+ var $1903 = 0, $1904 = 0, $1905 = 0, $1906 = 0, $1907 = 0, $1908 = 0, $1909 = 0, $191 = 0, $1910 = 0, $1911 = 0, $1912 = 0, $1913 = 0, $1914 = 0, $1915 = 0, $1916 = 0, $1917 = 0, $1918 = 0, $1919 = 0, $192 = 0, $1920 = 0;
+ var $1921 = 0, $1922 = 0, $1923 = 0, $1924 = 0, $1925 = 0, $1926 = 0, $1927 = 0, $1928 = 0, $1929 = 0, $193 = 0, $1930 = 0, $1931 = 0, $1932 = 0, $1933 = 0, $1934 = 0, $1935 = 0, $1936 = 0, $1937 = 0, $1938 = 0, $1939 = 0;
+ var $194 = 0, $1940 = 0, $1941 = 0, $1942 = 0, $1943 = 0, $1944 = 0, $1945 = 0, $1946 = 0, $1947 = 0, $1948 = 0, $1949 = 0, $195 = 0, $1950 = 0, $1951 = 0, $1952 = 0, $1953 = 0, $1954 = 0, $1955 = 0, $1956 = 0, $1957 = 0;
+ var $1958 = 0, $1959 = 0, $196 = 0, $1960 = 0, $1961 = 0, $1962 = 0, $1963 = 0, $1964 = 0, $1965 = 0, $1966 = 0, $1967 = 0, $1968 = 0, $1969 = 0, $197 = 0, $1970 = 0, $1971 = 0, $1972 = 0, $1973 = 0, $1974 = 0, $1975 = 0;
+ var $1976 = 0, $1977 = 0, $1978 = 0, $1979 = 0, $198 = 0, $1980 = 0, $1981 = 0, $1982 = 0, $1983 = 0, $1984 = 0, $1985 = 0, $1986 = 0, $1987 = 0, $1988 = 0, $1989 = 0, $199 = 0, $1990 = 0, $1991 = 0, $1992 = 0, $1993 = 0;
+ var $1994 = 0, $1995 = 0, $1996 = 0, $1997 = 0, $1998 = 0, $1999 = 0, $2 = 0, $20 = 0, $200 = 0, $2000 = 0, $2001 = 0, $2002 = 0, $2003 = 0, $2004 = 0, $2005 = 0, $2006 = 0, $2007 = 0, $2008 = 0, $2009 = 0, $201 = 0;
+ var $2010 = 0, $2011 = 0, $2012 = 0, $2013 = 0, $2014 = 0, $2015 = 0, $2016 = 0, $2017 = 0, $2018 = 0, $2019 = 0, $202 = 0, $2020 = 0, $2021 = 0, $2022 = 0, $2023 = 0, $2024 = 0, $2025 = 0, $2026 = 0, $2027 = 0, $2028 = 0;
+ var $2029 = 0, $203 = 0, $2030 = 0, $2031 = 0, $2032 = 0, $2033 = 0, $2034 = 0, $2035 = 0, $2036 = 0, $2037 = 0, $2038 = 0, $2039 = 0, $204 = 0, $2040 = 0, $2041 = 0, $2042 = 0, $2043 = 0, $2044 = 0, $2045 = 0, $2046 = 0;
+ var $2047 = 0, $2048 = 0, $2049 = 0, $205 = 0, $2050 = 0, $2051 = 0, $2052 = 0, $2053 = 0, $2054 = 0, $2055 = 0, $2056 = 0, $2057 = 0, $2058 = 0, $2059 = 0, $206 = 0, $2060 = 0, $2061 = 0, $2062 = 0, $2063 = 0, $2064 = 0;
+ var $2065 = 0, $2066 = 0, $2067 = 0, $2068 = 0, $2069 = 0, $207 = 0, $2070 = 0, $2071 = 0, $2072 = 0, $2073 = 0, $2074 = 0, $2075 = 0, $2076 = 0, $2077 = 0, $2078 = 0, $2079 = 0, $208 = 0, $2080 = 0, $2081 = 0, $2082 = 0;
+ var $2083 = 0, $2084 = 0, $2085 = 0, $2086 = 0, $2087 = 0, $2088 = 0, $2089 = 0, $209 = 0, $2090 = 0, $2091 = 0, $2092 = 0, $2093 = 0, $2094 = 0, $2095 = 0, $2096 = 0, $2097 = 0, $2098 = 0, $2099 = 0, $21 = 0, $210 = 0;
+ var $2100 = 0, $2101 = 0, $2102 = 0, $2103 = 0, $2104 = 0, $2105 = 0, $2106 = 0, $2107 = 0, $2108 = 0, $2109 = 0, $211 = 0, $2110 = 0, $2111 = 0, $2112 = 0, $2113 = 0, $2114 = 0, $2115 = 0, $2116 = 0, $2117 = 0, $2118 = 0;
+ var $2119 = 0, $212 = 0, $2120 = 0, $2121 = 0, $2122 = 0, $2123 = 0, $2124 = 0, $2125 = 0, $2126 = 0, $2127 = 0, $2128 = 0, $2129 = 0, $213 = 0, $2130 = 0, $2131 = 0, $2132 = 0, $2133 = 0, $2134 = 0, $2135 = 0, $2136 = 0;
+ var $2137 = 0, $2138 = 0, $2139 = 0, $214 = 0, $2140 = 0, $2141 = 0, $2142 = 0, $2143 = 0, $2144 = 0, $2145 = 0, $2146 = 0, $2147 = 0, $2148 = 0, $2149 = 0, $215 = 0, $2150 = 0, $2151 = 0, $2152 = 0, $2153 = 0.0, $2154 = 0;
+ var $2155 = 0, $2156 = 0, $2157 = 0.0, $2158 = 0.0, $2159 = 0, $216 = 0, $2160 = 0, $2161 = 0, $2162 = 0, $2163 = 0, $2164 = 0, $2165 = 0, $2166 = 0, $2167 = 0, $2168 = 0, $2169 = 0, $217 = 0, $2170 = 0, $2171 = 0, $2172 = 0;
+ var $2173 = 0, $2174 = 0, $2175 = 0, $2176 = 0, $2177 = 0, $2178 = 0, $2179 = 0, $218 = 0, $2180 = 0, $2181 = 0, $2182 = 0, $2183 = 0, $2184 = 0, $2185 = 0, $2186 = 0, $2187 = 0, $2188 = 0, $2189 = 0, $219 = 0, $2190 = 0;
+ var $2191 = 0, $2192 = 0, $2193 = 0, $2194 = 0, $2195 = 0, $2196 = 0, $2197 = 0, $2198 = 0, $2199 = 0, $22 = 0, $220 = 0, $2200 = 0, $2201 = 0, $2202 = 0, $2203 = 0, $2204 = 0, $2205 = 0.0, $2206 = 0, $2207 = 0, $2208 = 0;
+ var $2209 = 0.0, $221 = 0, $2210 = 0, $2211 = 0, $2212 = 0, $2213 = 0, $2214 = 0, $2215 = 0, $2216 = 0, $2217 = 0, $2218 = 0, $2219 = 0, $222 = 0, $2220 = 0, $2221 = 0, $2222 = 0, $2223 = 0, $2224 = 0, $2225 = 0, $2226 = 0;
+ var $2227 = 0, $2228 = 0, $2229 = 0, $223 = 0, $2230 = 0, $2231 = 0, $2232 = 0.0, $2233 = 0, $2234 = 0, $2235 = 0, $2236 = 0.0, $2237 = 0.0, $2238 = 0, $2239 = 0, $224 = 0, $2240 = 0, $2241 = 0, $2242 = 0, $2243 = 0, $2244 = 0;
+ var $2245 = 0, $2246 = 0, $2247 = 0, $2248 = 0, $2249 = 0, $225 = 0, $2250 = 0, $2251 = 0, $2252 = 0, $2253 = 0, $2254 = 0, $2255 = 0, $2256 = 0, $2257 = 0, $2258 = 0, $2259 = 0, $226 = 0, $2260 = 0, $2261 = 0, $2262 = 0;
+ var $2263 = 0, $2264 = 0, $2265 = 0, $2266 = 0, $2267 = 0.0, $2268 = 0, $2269 = 0, $227 = 0, $2270 = 0, $2271 = 0.0, $2272 = 0.0, $2273 = 0.0, $2274 = 0, $2275 = 0, $2276 = 0, $2277 = 0, $2278 = 0, $2279 = 0, $228 = 0, $2280 = 0;
+ var $2281 = 0, $2282 = 0, $2283 = 0, $2284 = 0, $2285 = 0, $2286 = 0, $2287 = 0, $2288 = 0, $2289 = 0, $229 = 0, $2290 = 0, $2291 = 0, $2292 = 0, $2293 = 0, $2294 = 0, $2295 = 0, $2296 = 0, $2297 = 0, $2298 = 0, $2299 = 0;
+ var $23 = 0, $230 = 0, $2300 = 0, $2301 = 0, $2302 = 0, $2303 = 0, $2304 = 0, $2305 = 0, $2306 = 0, $2307 = 0, $2308 = 0, $2309 = 0, $231 = 0, $2310 = 0, $2311 = 0, $2312 = 0, $2313 = 0, $2314 = 0, $2315 = 0, $2316 = 0;
+ var $2317 = 0, $2318 = 0, $2319 = 0, $232 = 0, $2320 = 0, $2321 = 0, $2322 = 0, $2323 = 0, $2324 = 0, $2325 = 0, $2326 = 0, $2327 = 0, $2328 = 0, $2329 = 0, $233 = 0, $2330 = 0, $2331 = 0, $2332 = 0, $2333 = 0, $2334 = 0;
+ var $2335 = 0, $2336 = 0, $2337 = 0, $2338 = 0, $2339 = 0, $234 = 0, $2340 = 0, $2341 = 0, $2342 = 0, $2343 = 0, $2344 = 0, $2345 = 0, $2346 = 0, $2347 = 0, $2348 = 0, $2349 = 0, $235 = 0, $2350 = 0, $2351 = 0, $2352 = 0;
+ var $2353 = 0, $2354 = 0, $2355 = 0, $2356 = 0, $2357 = 0, $2358 = 0, $2359 = 0, $236 = 0, $2360 = 0, $2361 = 0, $2362 = 0, $2363 = 0, $2364 = 0, $2365 = 0, $2366 = 0, $2367 = 0, $2368 = 0, $2369 = 0, $237 = 0, $2370 = 0;
+ var $2371 = 0, $2372 = 0, $2373 = 0, $2374 = 0, $2375 = 0, $2376 = 0, $2377 = 0, $2378 = 0, $2379 = 0, $238 = 0, $2380 = 0, $2381 = 0, $2382 = 0, $2383 = 0, $2384 = 0, $2385 = 0, $2386 = 0, $2387 = 0, $2388 = 0, $2389 = 0;
+ var $239 = 0, $2390 = 0, $2391 = 0, $2392 = 0, $2393 = 0, $2394 = 0, $2395 = 0, $2396 = 0, $2397 = 0, $2398 = 0, $2399 = 0, $24 = 0, $240 = 0, $2400 = 0, $2401 = 0, $2402 = 0, $2403 = 0, $2404 = 0, $2405 = 0, $2406 = 0;
+ var $2407 = 0, $2408 = 0, $2409 = 0, $241 = 0, $2410 = 0, $2411 = 0, $2412 = 0, $2413 = 0, $2414 = 0, $2415 = 0, $2416 = 0, $2417 = 0, $2418 = 0, $2419 = 0, $242 = 0, $2420 = 0, $2421 = 0, $2422 = 0, $2423 = 0, $2424 = 0;
+ var $2425 = 0, $2426 = 0, $2427 = 0, $2428 = 0, $2429 = 0, $243 = 0, $2430 = 0, $2431 = 0, $2432 = 0, $2433 = 0, $2434 = 0, $2435 = 0, $2436 = 0, $2437 = 0, $2438 = 0, $2439 = 0, $244 = 0, $2440 = 0, $2441 = 0, $2442 = 0;
+ var $2443 = 0, $2444 = 0, $2445 = 0, $2446 = 0, $2447 = 0, $2448 = 0, $2449 = 0, $245 = 0, $2450 = 0, $2451 = 0, $2452 = 0, $2453 = 0, $2454 = 0, $2455 = 0, $2456 = 0, $2457 = 0, $2458 = 0, $2459 = 0, $246 = 0, $2460 = 0;
+ var $2461 = 0, $2462 = 0, $2463 = 0, $2464 = 0, $2465 = 0, $2466 = 0, $2467 = 0, $2468 = 0, $2469 = 0, $247 = 0, $2470 = 0, $2471 = 0, $2472 = 0, $2473 = 0, $2474 = 0, $2475 = 0, $2476 = 0, $2477 = 0, $2478 = 0, $2479 = 0;
+ var $248 = 0, $2480 = 0, $2481 = 0, $2482 = 0, $2483 = 0, $2484 = 0, $2485 = 0, $2486 = 0, $2487 = 0, $2488 = 0, $2489 = 0, $249 = 0, $2490 = 0, $2491 = 0, $2492 = 0, $2493 = 0, $2494 = 0, $2495 = 0, $2496 = 0, $2497 = 0;
+ var $2498 = 0, $2499 = 0, $25 = 0, $250 = 0, $2500 = 0, $2501 = 0, $2502 = 0, $2503 = 0, $2504 = 0, $2505 = 0, $2506 = 0, $2507 = 0, $2508 = 0, $2509 = 0, $251 = 0, $2510 = 0, $2511 = 0, $2512 = 0, $2513 = 0, $2514 = 0;
+ var $2515 = 0, $2516 = 0, $2517 = 0, $2518 = 0, $2519 = 0, $252 = 0, $2520 = 0, $2521 = 0, $2522 = 0, $2523 = 0, $2524 = 0, $2525 = 0, $2526 = 0, $2527 = 0, $2528 = 0, $2529 = 0, $253 = 0, $2530 = 0, $2531 = 0, $2532 = 0;
+ var $2533 = 0, $2534 = 0, $2535 = 0, $2536 = 0, $2537 = 0, $2538 = 0, $2539 = 0, $254 = 0, $2540 = 0, $2541 = 0, $2542 = 0, $2543 = 0, $2544 = 0, $2545 = 0, $2546 = 0, $2547 = 0, $2548 = 0, $2549 = 0, $255 = 0, $2550 = 0;
+ var $2551 = 0, $2552 = 0, $2553 = 0, $2554 = 0, $2555 = 0, $2556 = 0, $2557 = 0, $2558 = 0, $2559 = 0, $256 = 0, $2560 = 0, $2561 = 0, $2562 = 0, $2563 = 0, $2564 = 0, $2565 = 0, $2566 = 0, $2567 = 0, $2568 = 0, $2569 = 0;
+ var $257 = 0, $2570 = 0, $2571 = 0, $2572 = 0, $2573 = 0, $2574 = 0, $2575 = 0, $2576 = 0, $2577 = 0, $2578 = 0, $2579 = 0, $258 = 0, $2580 = 0, $2581 = 0, $2582 = 0, $2583 = 0, $2584 = 0, $2585 = 0, $2586 = 0, $2587 = 0;
+ var $2588 = 0, $2589 = 0, $259 = 0, $2590 = 0, $2591 = 0, $2592 = 0, $2593 = 0, $2594 = 0, $2595 = 0, $2596 = 0, $2597 = 0, $2598 = 0, $2599 = 0, $26 = 0, $260 = 0, $2600 = 0, $2601 = 0, $2602 = 0, $2603 = 0, $2604 = 0;
+ var $2605 = 0, $2606 = 0, $2607 = 0, $2608 = 0, $2609 = 0, $261 = 0, $2610 = 0, $2611 = 0, $2612 = 0, $2613 = 0, $2614 = 0, $2615 = 0, $2616 = 0, $2617 = 0, $2618 = 0, $2619 = 0, $262 = 0, $2620 = 0, $2621 = 0, $2622 = 0;
+ var $2623 = 0, $2624 = 0, $2625 = 0, $2626 = 0, $2627 = 0, $2628 = 0, $2629 = 0, $263 = 0, $2630 = 0, $2631 = 0, $2632 = 0, $2633 = 0, $2634 = 0, $2635 = 0, $2636 = 0, $2637 = 0, $2638 = 0, $2639 = 0, $264 = 0, $2640 = 0;
+ var $2641 = 0, $2642 = 0, $2643 = 0, $2644 = 0, $2645 = 0, $2646 = 0, $2647 = 0, $2648 = 0, $2649 = 0, $265 = 0, $2650 = 0, $2651 = 0, $2652 = 0, $2653 = 0, $2654 = 0, $2655 = 0, $2656 = 0, $2657 = 0, $2658 = 0, $2659 = 0;
+ var $266 = 0, $2660 = 0, $2661 = 0, $2662 = 0, $2663 = 0, $2664 = 0, $2665 = 0, $2666 = 0, $2667 = 0, $2668 = 0, $2669 = 0, $267 = 0, $2670 = 0, $2671 = 0, $2672 = 0, $2673 = 0, $2674 = 0, $2675 = 0, $2676 = 0, $2677 = 0;
+ var $2678 = 0, $2679 = 0, $268 = 0, $2680 = 0, $2681 = 0, $2682 = 0, $2683 = 0, $2684 = 0, $2685 = 0, $2686 = 0, $2687 = 0, $2688 = 0, $2689 = 0, $269 = 0, $2690 = 0, $2691 = 0, $2692 = 0, $2693 = 0, $2694 = 0, $2695 = 0;
+ var $2696 = 0, $2697 = 0, $2698 = 0, $2699 = 0, $27 = 0, $270 = 0, $2700 = 0, $2701 = 0, $2702 = 0, $2703 = 0, $2704 = 0, $2705 = 0, $2706 = 0, $2707 = 0, $2708 = 0, $2709 = 0, $271 = 0, $2710 = 0, $2711 = 0, $2712 = 0;
+ var $2713 = 0, $2714 = 0, $2715 = 0, $2716 = 0, $2717 = 0, $2718 = 0, $2719 = 0, $272 = 0, $2720 = 0, $2721 = 0, $2722 = 0, $2723 = 0, $2724 = 0, $2725 = 0, $2726 = 0, $2727 = 0, $2728 = 0, $2729 = 0, $273 = 0, $2730 = 0;
+ var $2731 = 0, $2732 = 0, $2733 = 0, $2734 = 0, $2735 = 0, $2736 = 0, $2737 = 0, $2738 = 0, $2739 = 0, $274 = 0, $2740 = 0, $2741 = 0, $2742 = 0, $2743 = 0, $2744 = 0, $2745 = 0, $2746 = 0, $2747 = 0, $2748 = 0, $2749 = 0;
+ var $275 = 0, $2750 = 0, $2751 = 0, $2752 = 0, $2753 = 0, $2754 = 0, $2755 = 0, $2756 = 0, $2757 = 0, $2758 = 0, $2759 = 0, $276 = 0, $2760 = 0, $2761 = 0, $2762 = 0, $2763 = 0, $2764 = 0, $2765 = 0, $2766 = 0, $2767 = 0;
+ var $2768 = 0, $2769 = 0, $277 = 0, $2770 = 0, $2771 = 0, $2772 = 0, $2773 = 0, $2774 = 0, $2775 = 0, $2776 = 0, $2777 = 0, $2778 = 0, $2779 = 0, $278 = 0, $2780 = 0, $2781 = 0, $2782 = 0, $2783 = 0, $2784 = 0, $2785 = 0;
+ var $2786 = 0, $2787 = 0, $2788 = 0, $2789 = 0, $279 = 0, $2790 = 0, $2791 = 0, $2792 = 0, $2793 = 0, $2794 = 0, $2795 = 0, $2796 = 0, $2797 = 0, $2798 = 0, $2799 = 0, $28 = 0, $280 = 0, $2800 = 0, $2801 = 0, $2802 = 0;
+ var $2803 = 0, $2804 = 0, $2805 = 0, $2806 = 0, $2807 = 0, $2808 = 0, $2809 = 0, $281 = 0, $2810 = 0, $2811 = 0, $2812 = 0, $2813 = 0, $2814 = 0, $2815 = 0, $2816 = 0, $2817 = 0, $2818 = 0, $2819 = 0, $282 = 0, $2820 = 0;
+ var $2821 = 0, $2822 = 0, $2823 = 0, $2824 = 0, $2825 = 0, $2826 = 0, $2827 = 0, $2828 = 0, $2829 = 0, $283 = 0, $2830 = 0, $2831 = 0, $2832 = 0, $2833 = 0, $2834 = 0, $2835 = 0, $2836 = 0, $2837 = 0, $2838 = 0, $2839 = 0;
+ var $284 = 0, $2840 = 0, $2841 = 0, $2842 = 0, $2843 = 0, $2844 = 0, $2845 = 0, $2846 = 0, $2847 = 0, $2848 = 0, $2849 = 0, $285 = 0, $2850 = 0, $2851 = 0, $2852 = 0, $2853 = 0, $2854 = 0, $2855 = 0, $2856 = 0, $2857 = 0;
+ var $2858 = 0, $2859 = 0, $286 = 0, $2860 = 0, $2861 = 0, $2862 = 0, $2863 = 0, $2864 = 0, $2865 = 0, $2866 = 0, $2867 = 0, $2868 = 0, $2869 = 0, $287 = 0, $2870 = 0, $2871 = 0, $2872 = 0, $2873 = 0, $2874 = 0, $2875 = 0;
+ var $2876 = 0, $2877 = 0, $2878 = 0, $2879 = 0, $288 = 0, $2880 = 0, $2881 = 0, $2882 = 0, $2883 = 0, $2884 = 0, $2885 = 0, $2886 = 0, $2887 = 0, $2888 = 0, $2889 = 0, $289 = 0, $2890 = 0, $2891 = 0, $2892 = 0, $2893 = 0;
+ var $2894 = 0, $2895 = 0, $2896 = 0, $2897 = 0, $2898 = 0, $2899 = 0, $29 = 0, $290 = 0, $2900 = 0, $2901 = 0, $2902 = 0, $2903 = 0, $2904 = 0, $2905 = 0, $2906 = 0, $2907 = 0, $2908 = 0, $2909 = 0, $291 = 0, $2910 = 0;
+ var $2911 = 0, $2912 = 0, $2913 = 0, $2914 = 0, $2915 = 0, $2916 = 0, $2917 = 0, $2918 = 0, $2919 = 0, $292 = 0, $2920 = 0, $2921 = 0, $2922 = 0, $2923 = 0, $2924 = 0, $2925 = 0, $2926 = 0, $2927 = 0, $2928 = 0, $2929 = 0;
+ var $293 = 0, $2930 = 0, $2931 = 0, $2932 = 0, $2933 = 0, $2934 = 0, $2935 = 0, $2936 = 0, $2937 = 0, $2938 = 0, $2939 = 0, $294 = 0, $2940 = 0, $2941 = 0, $2942 = 0, $2943 = 0, $2944 = 0, $2945 = 0, $2946 = 0, $2947 = 0;
+ var $2948 = 0, $2949 = 0, $295 = 0, $2950 = 0, $2951 = 0, $2952 = 0, $2953 = 0, $2954 = 0, $2955 = 0, $2956 = 0, $2957 = 0, $2958 = 0, $2959 = 0, $296 = 0, $2960 = 0, $2961 = 0, $2962 = 0, $2963 = 0, $2964 = 0, $2965 = 0;
+ var $2966 = 0, $2967 = 0, $2968 = 0, $2969 = 0, $297 = 0, $2970 = 0, $2971 = 0, $2972 = 0, $2973 = 0, $2974 = 0, $2975 = 0, $2976 = 0, $2977 = 0, $2978 = 0, $2979 = 0, $298 = 0, $2980 = 0, $2981 = 0, $2982 = 0, $2983 = 0;
+ var $2984 = 0, $2985 = 0, $2986 = 0, $2987 = 0, $2988 = 0, $2989 = 0, $299 = 0, $2990 = 0, $2991 = 0, $2992 = 0, $2993 = 0, $2994 = 0, $2995 = 0, $2996 = 0, $2997 = 0, $2998 = 0, $2999 = 0, $3 = 0, $30 = 0, $300 = 0;
+ var $3000 = 0, $3001 = 0, $3002 = 0, $3003 = 0, $3004 = 0, $3005 = 0, $3006 = 0, $3007 = 0, $3008 = 0, $3009 = 0, $301 = 0, $3010 = 0, $3011 = 0, $3012 = 0, $3013 = 0, $3014 = 0, $3015 = 0, $3016 = 0, $3017 = 0, $3018 = 0;
+ var $3019 = 0, $302 = 0, $3020 = 0, $3021 = 0, $3022 = 0, $3023 = 0, $3024 = 0, $3025 = 0, $3026 = 0, $3027 = 0, $3028 = 0, $3029 = 0, $303 = 0, $3030 = 0, $3031 = 0, $3032 = 0, $3033 = 0, $3034 = 0, $3035 = 0, $3036 = 0;
+ var $3037 = 0, $3038 = 0, $3039 = 0, $304 = 0, $3040 = 0, $3041 = 0, $3042 = 0, $3043 = 0, $3044 = 0, $3045 = 0, $3046 = 0, $3047 = 0, $3048 = 0, $3049 = 0, $305 = 0, $3050 = 0, $3051 = 0, $3052 = 0, $3053 = 0, $3054 = 0;
+ var $3055 = 0, $3056 = 0, $3057 = 0, $3058 = 0, $3059 = 0, $306 = 0, $3060 = 0, $3061 = 0, $3062 = 0, $3063 = 0, $3064 = 0, $3065 = 0, $3066 = 0, $3067 = 0, $3068 = 0, $3069 = 0, $307 = 0, $3070 = 0, $3071 = 0, $3072 = 0;
+ var $3073 = 0, $3074 = 0, $3075 = 0, $3076 = 0, $3077 = 0, $3078 = 0, $3079 = 0, $308 = 0, $3080 = 0, $3081 = 0, $3082 = 0, $3083 = 0, $3084 = 0, $3085 = 0, $3086 = 0, $3087 = 0, $3088 = 0, $3089 = 0, $309 = 0, $3090 = 0;
+ var $3091 = 0, $3092 = 0, $3093 = 0, $3094 = 0, $3095 = 0, $3096 = 0, $3097 = 0, $3098 = 0, $3099 = 0, $31 = 0, $310 = 0, $3100 = 0, $3101 = 0, $3102 = 0, $3103 = 0, $3104 = 0, $3105 = 0, $3106 = 0, $3107 = 0, $3108 = 0;
+ var $3109 = 0, $311 = 0, $3110 = 0, $3111 = 0, $3112 = 0, $3113 = 0, $3114 = 0, $3115 = 0, $3116 = 0, $3117 = 0, $3118 = 0, $3119 = 0, $312 = 0, $3120 = 0, $3121 = 0, $3122 = 0, $3123 = 0, $3124 = 0, $3125 = 0, $3126 = 0;
+ var $3127 = 0, $3128 = 0, $3129 = 0, $313 = 0, $3130 = 0, $3131 = 0, $3132 = 0, $3133 = 0, $3134 = 0, $3135 = 0, $3136 = 0, $3137 = 0, $3138 = 0, $3139 = 0, $314 = 0, $3140 = 0, $3141 = 0, $3142 = 0, $3143 = 0, $3144 = 0;
+ var $3145 = 0, $3146 = 0, $3147 = 0, $3148 = 0, $3149 = 0, $315 = 0, $3150 = 0, $3151 = 0, $3152 = 0, $3153 = 0, $3154 = 0, $3155 = 0, $3156 = 0, $3157 = 0, $3158 = 0, $3159 = 0, $316 = 0, $3160 = 0, $3161 = 0, $3162 = 0;
+ var $3163 = 0, $3164 = 0, $3165 = 0, $3166 = 0, $3167 = 0, $3168 = 0, $3169 = 0, $317 = 0, $3170 = 0, $3171 = 0, $3172 = 0, $3173 = 0, $3174 = 0, $3175 = 0, $3176 = 0, $3177 = 0, $3178 = 0, $3179 = 0, $318 = 0, $3180 = 0;
+ var $3181 = 0, $3182 = 0, $3183 = 0, $3184 = 0, $3185 = 0, $3186 = 0, $3187 = 0, $3188 = 0, $3189 = 0, $319 = 0, $3190 = 0, $3191 = 0, $3192 = 0, $3193 = 0, $3194 = 0, $3195 = 0, $3196 = 0, $3197 = 0, $3198 = 0, $3199 = 0;
+ var $32 = 0, $320 = 0, $3200 = 0, $3201 = 0, $3202 = 0, $3203 = 0, $3204 = 0, $3205 = 0, $3206 = 0, $3207 = 0, $3208 = 0, $3209 = 0, $321 = 0, $3210 = 0, $3211 = 0, $3212 = 0, $3213 = 0, $3214 = 0, $3215 = 0, $3216 = 0;
+ var $3217 = 0, $3218 = 0, $3219 = 0, $322 = 0, $3220 = 0, $3221 = 0, $3222 = 0, $3223 = 0, $3224 = 0, $3225 = 0, $3226 = 0, $3227 = 0, $3228 = 0, $3229 = 0, $323 = 0, $3230 = 0, $3231 = 0, $3232 = 0, $3233 = 0, $3234 = 0;
+ var $3235 = 0, $3236 = 0, $3237 = 0, $3238 = 0, $3239 = 0, $324 = 0, $3240 = 0, $3241 = 0, $3242 = 0, $3243 = 0, $3244 = 0, $3245 = 0, $3246 = 0, $3247 = 0, $3248 = 0, $3249 = 0, $325 = 0, $3250 = 0, $3251 = 0, $3252 = 0;
+ var $3253 = 0, $3254 = 0, $3255 = 0, $3256 = 0, $3257 = 0, $3258 = 0, $3259 = 0, $326 = 0, $3260 = 0, $3261 = 0, $3262 = 0, $3263 = 0, $3264 = 0, $3265 = 0, $3266 = 0, $3267 = 0, $3268 = 0, $3269 = 0, $327 = 0, $3270 = 0;
+ var $3271 = 0, $3272 = 0, $3273 = 0, $3274 = 0, $3275 = 0, $3276 = 0, $3277 = 0, $3278 = 0, $3279 = 0, $328 = 0, $3280 = 0, $3281 = 0, $3282 = 0, $3283 = 0, $3284 = 0, $3285 = 0, $3286 = 0, $3287 = 0, $3288 = 0, $3289 = 0;
+ var $329 = 0, $3290 = 0, $3291 = 0, $3292 = 0, $3293 = 0, $3294 = 0, $3295 = 0, $3296 = 0, $3297 = 0, $3298 = 0, $3299 = 0, $33 = 0, $330 = 0, $3300 = 0, $3301 = 0, $3302 = 0, $3303 = 0, $3304 = 0, $3305 = 0, $3306 = 0;
+ var $3307 = 0, $3308 = 0, $3309 = 0, $331 = 0, $3310 = 0, $3311 = 0, $3312 = 0, $3313 = 0, $3314 = 0, $3315 = 0, $3316 = 0, $3317 = 0, $3318 = 0, $3319 = 0, $332 = 0, $3320 = 0, $3321 = 0, $3322 = 0, $3323 = 0, $3324 = 0;
+ var $3325 = 0, $3326 = 0, $3327 = 0, $3328 = 0, $3329 = 0, $333 = 0, $3330 = 0, $3331 = 0, $3332 = 0, $3333 = 0, $3334 = 0, $3335 = 0, $3336 = 0, $3337 = 0, $3338 = 0, $3339 = 0, $334 = 0, $3340 = 0, $3341 = 0, $3342 = 0;
+ var $3343 = 0, $3344 = 0, $3345 = 0, $3346 = 0, $3347 = 0, $3348 = 0, $3349 = 0, $335 = 0, $3350 = 0, $3351 = 0, $3352 = 0, $3353 = 0, $3354 = 0, $3355 = 0, $3356 = 0, $3357 = 0, $3358 = 0, $3359 = 0, $336 = 0, $3360 = 0;
+ var $3361 = 0, $3362 = 0, $3363 = 0, $3364 = 0, $3365 = 0, $3366 = 0, $3367 = 0, $3368 = 0, $3369 = 0, $337 = 0, $3370 = 0, $3371 = 0, $3372 = 0, $3373 = 0, $3374 = 0, $3375 = 0, $3376 = 0, $3377 = 0, $3378 = 0, $3379 = 0;
+ var $338 = 0, $3380 = 0, $3381 = 0, $3382 = 0, $3383 = 0, $3384 = 0, $3385 = 0, $3386 = 0, $3387 = 0, $3388 = 0, $3389 = 0, $339 = 0, $3390 = 0, $3391 = 0, $3392 = 0, $3393 = 0, $3394 = 0, $3395 = 0, $3396 = 0, $3397 = 0;
+ var $3398 = 0, $3399 = 0, $34 = 0, $340 = 0, $3400 = 0, $3401 = 0, $3402 = 0, $3403 = 0, $3404 = 0, $3405 = 0, $3406 = 0, $3407 = 0, $3408 = 0, $3409 = 0, $341 = 0, $3410 = 0, $3411 = 0, $3412 = 0, $3413 = 0, $3414 = 0;
+ var $3415 = 0, $3416 = 0, $3417 = 0, $3418 = 0, $3419 = 0, $342 = 0, $3420 = 0, $3421 = 0, $3422 = 0, $3423 = 0, $3424 = 0, $3425 = 0, $3426 = 0, $3427 = 0, $3428 = 0, $3429 = 0, $343 = 0, $3430 = 0, $3431 = 0, $3432 = 0;
+ var $3433 = 0, $3434 = 0, $3435 = 0, $3436 = 0, $3437 = 0, $3438 = 0, $3439 = 0, $344 = 0, $3440 = 0, $3441 = 0, $3442 = 0, $3443 = 0, $3444 = 0, $3445 = 0, $3446 = 0, $3447 = 0, $3448 = 0, $3449 = 0, $345 = 0, $3450 = 0;
+ var $3451 = 0, $3452 = 0, $3453 = 0, $3454 = 0, $3455 = 0, $3456 = 0, $3457 = 0, $3458 = 0, $3459 = 0, $346 = 0, $3460 = 0, $3461 = 0, $3462 = 0, $3463 = 0, $3464 = 0, $3465 = 0, $3466 = 0, $3467 = 0, $3468 = 0, $3469 = 0;
+ var $347 = 0, $3470 = 0, $3471 = 0, $3472 = 0, $3473 = 0, $3474 = 0, $3475 = 0, $3476 = 0, $3477 = 0, $3478 = 0, $3479 = 0, $348 = 0, $3480 = 0, $3481 = 0, $3482 = 0, $3483 = 0, $3484 = 0, $3485 = 0, $3486 = 0, $3487 = 0;
+ var $3488 = 0, $3489 = 0, $349 = 0, $3490 = 0, $3491 = 0, $3492 = 0, $3493 = 0, $3494 = 0, $3495 = 0, $3496 = 0, $3497 = 0, $3498 = 0, $3499 = 0, $35 = 0, $350 = 0, $3500 = 0, $3501 = 0, $3502 = 0, $3503 = 0, $3504 = 0;
+ var $3505 = 0, $3506 = 0, $3507 = 0, $3508 = 0, $3509 = 0, $351 = 0, $3510 = 0, $3511 = 0, $3512 = 0, $3513 = 0, $3514 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0;
+ var $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0;
+ var $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0;
+ var $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0;
+ var $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0;
+ var $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0;
+ var $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0;
+ var $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0;
+ var $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0;
+ var $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0;
+ var $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0;
+ var $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0;
+ var $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0;
+ var $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0;
+ var $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0;
+ var $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0;
+ var $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0;
+ var $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0;
+ var $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0;
+ var $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0;
+ var $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0;
+ var $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0;
+ var $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0;
+ var $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0;
+ var $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0;
+ var $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0;
+ var $810 = 0, $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0;
+ var $829 = 0, $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0;
+ var $847 = 0, $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0;
+ var $865 = 0, $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0;
+ var $883 = 0, $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0;
+ var $900 = 0, $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0;
+ var $919 = 0, $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0;
+ var $937 = 0, $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0;
+ var $955 = 0, $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0;
+ var $973 = 0, $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0;
+ var $991 = 0, $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $a = 0, $ai = 0, $ai60 = 0, $ai64 = 0, $ai67 = 0, $ai71 = 0, $ainfo = 0, $ainfo23 = 0, $argc = 0, $argc73 = 0, $args = 0;
+ var $b = 0, $base = 0, $base46 = 0, $buf = 0, $c = 0, $co = 0, $co48 = 0, $e = 0, $epush = 0, $exc = 0, $exend = 0, $f = 0.0, $f40 = 0.0, $f43 = 0.0, $f50 = 0.0, $fix = 0, $fix$byval_copy = 0, $head = 0, $i = 0, $i47 = 0;
+ var $idx = 0, $idx1 = 0, $idx18 = 0, $idx2 = 0, $idx28 = 0, $idx80 = 0, $idx81 = 0, $idx82 = 0, $idx84 = 0, $idx86 = 0, $len = 0, $len14 = 0, $len17 = 0, $len55 = 0, $len63 = 0, $lp = 0, $lp26 = 0, $lp6 = 0, $lp7 = 0, $lv = 0;
+ var $lv22 = 0, $lv29 = 0, $mrb = 0, $msg = 0, $n = 0, $n13 = 0, $n15 = 0, $n2 = 0, $n20 = 0, $n24 = 0, $n27 = 0, $n3 = 0, $n4 = 0, $n57 = 0, $n58 = 0, $n59 = 0, $n70 = 0, $n77 = 0, $name = 0, $noexc = 0;
+ var $noop = 0, $nt = 0, $num = 0, $off = 0, $off38 = 0, $off41 = 0, $off44 = 0, $off51 = 0, $off52 = 0, $off56 = 0, $off66 = 0, $off69 = 0, $off74 = 0, $onerr = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $or$cond7 = 0, $or$cond9 = 0, $overflow = 0;
+ var $overflow49 = 0, $p = 0, $p1 = 0, $p2 = 0, $p276 = 0, $p3 = 0, $p37 = 0, $p39 = 0, $p42 = 0, $p45 = 0, $p54 = 0, $p62 = 0, $p75 = 0, $pos = 0, $pos1 = 0, $pos11 = 0, $pos13 = 0, $pos18 = 0, $pos19 = 0, $pos2 = 0;
+ var $pos24 = 0, $pos29 = 0, $pos3 = 0, $pos5 = 0, $post = 0, $recv = 0, $rhs = 0, $rn = 0, $s2 = 0, $s221 = 0, $sendv = 0, $sendv25 = 0, $str = 0, $str$byval_copy = 0, $str36 = 0, $str36$byval_copy = 0, $str36$byval_copy10 = 0, $str36$byval_copy11 = 0, $sym = 0, $sym12 = 0;
+ var $sym16 = 0, $sym30 = 0, $sym31 = 0, $sym32 = 0, $sym33 = 0, $sym34 = 0, $sym35 = 0, $sym53 = 0, $sym61 = 0, $sym65 = 0, $sym68 = 0, $sym72 = 0, $sym78 = 0, $sym83 = 0, $sym85 = 0, $symbol = 0, $t = 0, $t79 = 0, $tmp = 0, $tmp10 = 0;
+ var $undef = 0, $up = 0, $update = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 944|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy24 = sp + 920|0;
+ $$byval_copy23 = sp + 912|0;
+ $$byval_copy22 = sp + 904|0;
+ $$byval_copy21 = sp + 896|0;
+ $$byval_copy20 = sp + 888|0;
+ $$byval_copy19 = sp + 880|0;
+ $$byval_copy18 = sp + 872|0;
+ $$byval_copy17 = sp + 864|0;
+ $$byval_copy16 = sp + 856|0;
+ $$byval_copy15 = sp + 848|0;
+ $$byval_copy14 = sp + 840|0;
+ $$byval_copy13 = sp + 832|0;
+ $$byval_copy12 = sp + 824|0;
+ $str36$byval_copy11 = sp + 816|0;
+ $$byval_copy = sp + 808|0;
+ $str36$byval_copy10 = sp + 800|0;
+ $fix$byval_copy = sp + 792|0;
+ $str36$byval_copy = sp + 784|0;
+ $str$byval_copy = sp + 776|0;
+ $len17 = sp + 588|0;
+ $buf = sp + 930|0;
+ $str = sp + 480|0;
+ $3 = sp + 464|0;
+ $fix = sp + 448|0;
+ $str36 = sp + 440|0;
+ $4 = sp + 432|0;
+ $5 = sp + 424|0;
+ $6 = sp + 416|0;
+ $overflow = sp + 929|0;
+ $7 = sp + 384|0;
+ $8 = sp + 368|0;
+ $9 = sp + 344|0;
+ $10 = sp + 320|0;
+ $overflow49 = sp + 928|0;
+ $11 = sp + 288|0;
+ $12 = sp + 272|0;
+ $13 = sp + 240|0;
+ $14 = sp + 192|0;
+ $15 = sp + 160|0;
+ $16 = sp + 144|0;
+ $17 = sp + 136|0;
+ $18 = sp + 104|0;
+ $19 = sp + 88|0;
+ $0 = $s;
+ $1 = $tree;
+ $2 = $val;
+ $20 = $1;
+ $21 = ($20|0)!=(0|0);
+ if (!($21)) {
+  STACKTOP = sp;return;
+ }
+ $22 = $0;
+ $23 = ((($22)) + 216|0);
+ $24 = HEAP32[$23>>2]|0;
+ $25 = ($24|0)!=(0|0);
+ if ($25) {
+  $26 = $0;
+  $27 = ((($26)) + 244|0);
+  $28 = HEAP16[$27>>1]|0;
+  $29 = $28&65535;
+  $30 = $1;
+  $31 = ((($30)) + 10|0);
+  $32 = HEAP16[$31>>1]|0;
+  $33 = $32&65535;
+  $34 = ($29|0)!=($33|0);
+  if ($34) {
+   $35 = $0;
+   $36 = ((($35)) + 248|0);
+   $37 = HEAP32[$36>>2]|0;
+   $38 = $0;
+   $39 = ((($38)) + 244|0);
+   $40 = HEAP16[$39>>1]|0;
+   $41 = (_mrb_parser_get_filename($37,$40)|0);
+   $42 = $0;
+   $43 = ((($42)) + 216|0);
+   $44 = HEAP32[$43>>2]|0;
+   $45 = ((($44)) + 28|0);
+   HEAP32[$45>>2] = $41;
+   $46 = $0;
+   $47 = HEAP32[$46>>2]|0;
+   $48 = $0;
+   $49 = ((($48)) + 216|0);
+   $50 = HEAP32[$49>>2]|0;
+   $51 = $0;
+   $52 = ((($51)) + 240|0);
+   $53 = HEAP32[$52>>2]|0;
+   $54 = $0;
+   $55 = ((($54)) + 176|0);
+   $56 = HEAP32[$55>>2]|0;
+   (_mrb_debug_info_append_file($47,$50,$53,$56)|0);
+   $57 = $0;
+   $58 = ((($57)) + 176|0);
+   $59 = HEAP32[$58>>2]|0;
+   $60 = $0;
+   $61 = ((($60)) + 240|0);
+   HEAP32[$61>>2] = $59;
+   $62 = $1;
+   $63 = ((($62)) + 10|0);
+   $64 = HEAP16[$63>>1]|0;
+   $65 = $0;
+   $66 = ((($65)) + 244|0);
+   HEAP16[$66>>1] = $64;
+   $67 = $0;
+   $68 = ((($67)) + 248|0);
+   $69 = HEAP32[$68>>2]|0;
+   $70 = $1;
+   $71 = ((($70)) + 10|0);
+   $72 = HEAP16[$71>>1]|0;
+   $73 = (_mrb_parser_get_filename($69,$72)|0);
+   $74 = $0;
+   $75 = ((($74)) + 196|0);
+   HEAP32[$75>>2] = $73;
+  }
+ }
+ $76 = $1;
+ $77 = HEAP32[$76>>2]|0;
+ $78 = $77;
+ $nt = $78;
+ $79 = $1;
+ $80 = ((($79)) + 8|0);
+ $81 = HEAP16[$80>>1]|0;
+ $82 = $0;
+ $83 = ((($82)) + 200|0);
+ HEAP16[$83>>1] = $81;
+ $84 = $1;
+ $85 = ((($84)) + 4|0);
+ $86 = HEAP32[$85>>2]|0;
+ $1 = $86;
+ $87 = $nt;
+ do {
+  switch ($87|0) {
+  case 17:  {
+   $88 = $2;
+   $89 = ($88|0)==(0);
+   $90 = $1;
+   $91 = ($90|0)!=(0|0);
+   $or$cond = $89 | $91;
+   if (!($or$cond)) {
+    $92 = $0;
+    $93 = $0;
+    $94 = ((($93)) + 172|0);
+    $95 = HEAP32[$94>>2]|0;
+    $96 = $95 & 511;
+    $97 = $96 << 23;
+    $98 = 5 | $97;
+    (_genop($92,$98)|0);
+    $99 = $0;
+    _push_($99);
+   }
+   while(1) {
+    $100 = $1;
+    $101 = ($100|0)!=(0|0);
+    if (!($101)) {
+     break;
+    }
+    $102 = $0;
+    $103 = $1;
+    $104 = HEAP32[$103>>2]|0;
+    $105 = $1;
+    $106 = ((($105)) + 4|0);
+    $107 = HEAP32[$106>>2]|0;
+    $108 = ($107|0)!=(0|0);
+    $109 = $2;
+    $110 = $108 ? 0 : $109;
+    _codegen($102,$104,$110);
+    $111 = $1;
+    $112 = ((($111)) + 4|0);
+    $113 = HEAP32[$112>>2]|0;
+    $1 = $113;
+   }
+   STACKTOP = sp;return;
+   break;
+  }
+  case 18:  {
+   $114 = $0;
+   $115 = (_genop($114,26)|0);
+   $onerr = $115;
+   $116 = $0;
+   $117 = (_loop_push($116,3)|0);
+   $lp = $117;
+   $118 = $onerr;
+   $119 = $lp;
+   $120 = ((($119)) + 4|0);
+   HEAP32[$120>>2] = $118;
+   $121 = $1;
+   $122 = HEAP32[$121>>2]|0;
+   $123 = ($122|0)!=(0|0);
+   if ($123) {
+    $124 = $0;
+    $125 = $1;
+    $126 = HEAP32[$125>>2]|0;
+    $127 = $2;
+    _codegen($124,$126,$127);
+    $128 = $2;
+    $129 = ($128|0)!=(0);
+    if ($129) {
+     $130 = $0;
+     $131 = ((($130)) + 172|0);
+     $132 = HEAP32[$131>>2]|0;
+     $133 = (($132) + -1)|0;
+     HEAP32[$131>>2] = $133;
+    }
+   }
+   $134 = $lp;
+   HEAP32[$134>>2] = 4;
+   $135 = $0;
+   $136 = (_genop($135,23)|0);
+   $noexc = $136;
+   $137 = $0;
+   $138 = $onerr;
+   _dispatch($137,$138);
+   $139 = $1;
+   $140 = ((($139)) + 4|0);
+   $141 = HEAP32[$140>>2]|0;
+   $1 = $141;
+   $exend = 0;
+   $pos1 = 0;
+   $142 = $1;
+   $143 = HEAP32[$142>>2]|0;
+   $144 = ($143|0)!=(0|0);
+   if ($144) {
+    $145 = $1;
+    $146 = HEAP32[$145>>2]|0;
+    $n2 = $146;
+    $147 = $0;
+    $148 = ((($147)) + 172|0);
+    $149 = HEAP32[$148>>2]|0;
+    $exc = $149;
+    $150 = $0;
+    $151 = $exc;
+    $152 = $151 & 511;
+    $153 = $152 << 23;
+    $154 = 27 | $153;
+    (_genop($150,$154)|0);
+    $155 = $0;
+    _push_($155);
+    while(1) {
+     $156 = $n2;
+     $157 = ($156|0)!=(0|0);
+     if (!($157)) {
+      break;
+     }
+     $158 = $n2;
+     $159 = HEAP32[$158>>2]|0;
+     $n3 = $159;
+     $160 = $n3;
+     $161 = HEAP32[$160>>2]|0;
+     $n4 = $161;
+     $162 = $pos1;
+     $163 = ($162|0)!=(0);
+     if ($163) {
+      $164 = $0;
+      $165 = $pos1;
+      _dispatch($164,$165);
+     }
+     $pos2 = 0;
+     while(1) {
+      $166 = $n4;
+      $167 = ($166|0)!=(0|0);
+      $168 = $0;
+      if ($167) {
+       $169 = $n4;
+       $170 = HEAP32[$169>>2]|0;
+       _codegen($168,$170,1);
+      } else {
+       $171 = $0;
+       $172 = ((($171)) + 172|0);
+       $173 = HEAP32[$172>>2]|0;
+       $174 = $173 & 511;
+       $175 = $174 << 23;
+       $176 = 17 | $175;
+       $177 = $0;
+       $178 = $0;
+       $179 = HEAP32[$178>>2]|0;
+       $180 = (_mrb_intern_static($179,69398,13)|0);
+       $181 = (_new_msym($177,$180)|0);
+       $182 = $181 & 65535;
+       $183 = $182 << 7;
+       $184 = $176 | $183;
+       (_genop($168,$184)|0);
+       $185 = $0;
+       _push_($185);
+      }
+      $186 = $0;
+      $187 = $0;
+      $188 = ((($187)) + 172|0);
+      $189 = HEAP32[$188>>2]|0;
+      $190 = $189 & 511;
+      $191 = $190 << 23;
+      $192 = 1 | $191;
+      $193 = $exc;
+      $194 = $193 & 511;
+      $195 = $194 << 14;
+      $196 = $192 | $195;
+      (_genop($186,$196)|0);
+      $197 = $0;
+      $198 = ((($197)) + 172|0);
+      $199 = HEAP32[$198>>2]|0;
+      $200 = (($199) + -1)|0;
+      HEAP32[$198>>2] = $200;
+      $201 = $n4;
+      $202 = ($201|0)!=(0|0);
+      if ($202) {
+       $203 = $n4;
+       $204 = HEAP32[$203>>2]|0;
+       $205 = ($204|0)!=(0|0);
+       if ($205) {
+        $206 = $n4;
+        $207 = HEAP32[$206>>2]|0;
+        $208 = HEAP32[$207>>2]|0;
+        $209 = $208;
+        $210 = ($209|0)==(66);
+        if ($210) {
+         $211 = $0;
+         $212 = $0;
+         $213 = ((($212)) + 172|0);
+         $214 = HEAP32[$213>>2]|0;
+         $215 = $214 & 511;
+         $216 = $215 << 23;
+         $217 = 32 | $216;
+         $218 = $0;
+         $219 = $0;
+         $220 = HEAP32[$219>>2]|0;
+         $221 = (_mrb_intern_static($220,69439,10)|0);
+         $222 = (_new_msym($218,$221)|0);
+         $223 = $222 & 511;
+         $224 = $223 << 14;
+         $225 = $217 | $224;
+         $226 = $225 | 128;
+         (_genop($211,$226)|0);
+        } else {
+         label = 26;
+        }
+       } else {
+        label = 26;
+       }
+      } else {
+       label = 26;
+      }
+      if ((label|0) == 26) {
+       label = 0;
+       $227 = $0;
+       $228 = $0;
+       $229 = ((($228)) + 172|0);
+       $230 = HEAP32[$229>>2]|0;
+       $231 = $230 & 511;
+       $232 = $231 << 23;
+       $233 = 32 | $232;
+       $234 = $0;
+       $235 = $0;
+       $236 = HEAP32[$235>>2]|0;
+       $237 = (_mrb_intern_static($236,69450,3)|0);
+       $238 = (_new_msym($234,$237)|0);
+       $239 = $238 & 511;
+       $240 = $239 << 14;
+       $241 = $233 | $240;
+       $242 = $241 | 128;
+       (_genop($227,$242)|0);
+      }
+      $243 = $0;
+      $244 = $0;
+      $245 = ((($244)) + 172|0);
+      $246 = HEAP32[$245>>2]|0;
+      $247 = $246 & 511;
+      $248 = $247 << 23;
+      $249 = 24 | $248;
+      $250 = $pos2;
+      $251 = (($250) + 32767)|0;
+      $252 = $251 & 65535;
+      $253 = $252 << 7;
+      $254 = $249 | $253;
+      $255 = (_genop($243,$254)|0);
+      $tmp = $255;
+      $256 = $tmp;
+      $pos2 = $256;
+      $257 = $n4;
+      $258 = ($257|0)!=(0|0);
+      if ($258) {
+       $259 = $n4;
+       $260 = ((($259)) + 4|0);
+       $261 = HEAP32[$260>>2]|0;
+       $n4 = $261;
+      }
+      $262 = $n4;
+      $263 = ($262|0)!=(0|0);
+      if (!($263)) {
+       break;
+      }
+     }
+     $264 = $0;
+     $265 = (_genop($264,4194199)|0);
+     $pos1 = $265;
+     $266 = $0;
+     $267 = $pos2;
+     _dispatch_linked($266,$267);
+     $268 = $0;
+     $269 = ((($268)) + 172|0);
+     $270 = HEAP32[$269>>2]|0;
+     $271 = (($270) + -1)|0;
+     HEAP32[$269>>2] = $271;
+     $272 = $n3;
+     $273 = ((($272)) + 4|0);
+     $274 = HEAP32[$273>>2]|0;
+     $275 = HEAP32[$274>>2]|0;
+     $276 = ($275|0)!=(0|0);
+     if ($276) {
+      $277 = $0;
+      $278 = $n3;
+      $279 = ((($278)) + 4|0);
+      $280 = HEAP32[$279>>2]|0;
+      $281 = HEAP32[$280>>2]|0;
+      $282 = $exc;
+      _gen_assignment($277,$281,$282,0);
+     }
+     $283 = $n3;
+     $284 = ((($283)) + 4|0);
+     $285 = HEAP32[$284>>2]|0;
+     $286 = ((($285)) + 4|0);
+     $287 = HEAP32[$286>>2]|0;
+     $288 = HEAP32[$287>>2]|0;
+     $289 = ($288|0)!=(0|0);
+     if ($289) {
+      $290 = $0;
+      $291 = $n3;
+      $292 = ((($291)) + 4|0);
+      $293 = HEAP32[$292>>2]|0;
+      $294 = ((($293)) + 4|0);
+      $295 = HEAP32[$294>>2]|0;
+      $296 = HEAP32[$295>>2]|0;
+      $297 = $2;
+      _codegen($290,$296,$297);
+      $298 = $2;
+      $299 = ($298|0)!=(0);
+      if ($299) {
+       $300 = $0;
+       $301 = ((($300)) + 172|0);
+       $302 = HEAP32[$301>>2]|0;
+       $303 = (($302) + -1)|0;
+       HEAP32[$301>>2] = $303;
+      }
+     }
+     $304 = $0;
+     $305 = $exend;
+     $306 = (($305) + 32767)|0;
+     $307 = $306 & 65535;
+     $308 = $307 << 7;
+     $309 = 23 | $308;
+     $310 = (_genop($304,$309)|0);
+     $tmp = $310;
+     $311 = $tmp;
+     $exend = $311;
+     $312 = $n2;
+     $313 = ((($312)) + 4|0);
+     $314 = HEAP32[$313>>2]|0;
+     $n2 = $314;
+     $315 = $0;
+     _push_($315);
+    }
+    $316 = $pos1;
+    $317 = ($316|0)!=(0);
+    if ($317) {
+     $318 = $0;
+     $319 = $pos1;
+     _dispatch($318,$319);
+     $320 = $0;
+     $321 = $exc;
+     $322 = $321 & 511;
+     $323 = $322 << 23;
+     $324 = 29 | $323;
+     (_genop($320,$324)|0);
+    }
+   }
+   $325 = $0;
+   $326 = ((($325)) + 172|0);
+   $327 = HEAP32[$326>>2]|0;
+   $328 = (($327) + -1)|0;
+   HEAP32[$326>>2] = $328;
+   $329 = $1;
+   $330 = ((($329)) + 4|0);
+   $331 = HEAP32[$330>>2]|0;
+   $1 = $331;
+   $332 = $0;
+   $333 = $noexc;
+   _dispatch($332,$333);
+   $334 = $0;
+   (_genop($334,8388636)|0);
+   $335 = $1;
+   $336 = HEAP32[$335>>2]|0;
+   $337 = ($336|0)!=(0|0);
+   if ($337) {
+    $338 = $0;
+    $339 = $1;
+    $340 = HEAP32[$339>>2]|0;
+    $341 = $2;
+    _codegen($338,$340,$341);
+   } else {
+    $342 = $2;
+    $343 = ($342|0)!=(0);
+    if ($343) {
+     $344 = $0;
+     _push_($344);
+    }
+   }
+   $345 = $0;
+   $346 = $exend;
+   _dispatch_linked($345,$346);
+   $347 = $0;
+   _loop_pop($347,0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 19:  {
+   $348 = $0;
+   $349 = ((($348)) + 176|0);
+   $350 = HEAP32[$349>>2]|0;
+   $epush = $350;
+   $351 = $0;
+   (_genop($351,30)|0);
+   $352 = $0;
+   $353 = ((($352)) + 192|0);
+   $354 = HEAP32[$353>>2]|0;
+   $355 = (($354) + 1)|0;
+   HEAP32[$353>>2] = $355;
+   $356 = $0;
+   $357 = $1;
+   $358 = HEAP32[$357>>2]|0;
+   $359 = $2;
+   _codegen($356,$358,$359);
+   $360 = $0;
+   $361 = $1;
+   $362 = ((($361)) + 4|0);
+   $363 = HEAP32[$362>>2]|0;
+   $364 = (_scope_body($360,$363,0)|0);
+   $idx = $364;
+   $365 = $idx;
+   $366 = $365 & 65535;
+   $367 = $366 << 7;
+   $368 = 30 | $367;
+   $369 = $epush;
+   $370 = $0;
+   $371 = ((($370)) + 204|0);
+   $372 = HEAP32[$371>>2]|0;
+   $373 = (($372) + ($369<<2)|0);
+   HEAP32[$373>>2] = $368;
+   $374 = $0;
+   $375 = ((($374)) + 192|0);
+   $376 = HEAP32[$375>>2]|0;
+   $377 = (($376) + -1)|0;
+   HEAP32[$375>>2] = $377;
+   $378 = $0;
+   (_genop_peep($378,8388639,0)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 53:  {
+   $379 = $0;
+   $380 = $1;
+   $381 = (_lambda_body($379,$380,1)|0);
+   $idx1 = $381;
+   $382 = $0;
+   $383 = $0;
+   $384 = ((($383)) + 172|0);
+   $385 = HEAP32[$384>>2]|0;
+   $386 = $385 & 511;
+   $387 = $386 << 23;
+   $388 = 64 | $387;
+   $389 = $idx1;
+   $390 = $389 & 16383;
+   $391 = $390 << 9;
+   $392 = $391 | 384;
+   $393 = $388 | $392;
+   (_genop($382,$393)|0);
+   $394 = $0;
+   _push_($394);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 4:  {
+   $395 = $0;
+   $396 = $1;
+   $397 = (_lambda_body($395,$396,1)|0);
+   $idx2 = $397;
+   $398 = $0;
+   $399 = $0;
+   $400 = ((($399)) + 172|0);
+   $401 = HEAP32[$400>>2]|0;
+   $402 = $401 & 511;
+   $403 = $402 << 23;
+   $404 = 64 | $403;
+   $405 = $idx2;
+   $406 = $405 & 16383;
+   $407 = $406 << 9;
+   $408 = $407 | 256;
+   $409 = $404 | $408;
+   (_genop($398,$409)|0);
+   $410 = $0;
+   _push_($410);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 5:  {
+   $411 = $1;
+   $412 = ((($411)) + 4|0);
+   $413 = HEAP32[$412>>2]|0;
+   $414 = ((($413)) + 4|0);
+   $415 = HEAP32[$414>>2]|0;
+   $416 = HEAP32[$415>>2]|0;
+   $e = $416;
+   $417 = $1;
+   $418 = HEAP32[$417>>2]|0;
+   $419 = HEAP32[$418>>2]|0;
+   $420 = $419;
+   switch ($420|0) {
+   case 55: case 50: case 87:  {
+    $421 = $0;
+    $422 = $1;
+    $423 = ((($422)) + 4|0);
+    $424 = HEAP32[$423>>2]|0;
+    $425 = HEAP32[$424>>2]|0;
+    $426 = $2;
+    _codegen($421,$425,$426);
+    STACKTOP = sp;return;
+    break;
+   }
+   case 86: case 88:  {
+    $427 = $0;
+    $428 = $e;
+    $429 = $2;
+    _codegen($427,$428,$429);
+    STACKTOP = sp;return;
+    break;
+   }
+   default: {
+    $430 = $0;
+    $431 = $1;
+    $432 = HEAP32[$431>>2]|0;
+    _codegen($430,$432,1);
+    $433 = $0;
+    $434 = ((($433)) + 172|0);
+    $435 = HEAP32[$434>>2]|0;
+    $436 = (($435) + -1)|0;
+    HEAP32[$434>>2] = $436;
+    $437 = $0;
+    $438 = $0;
+    $439 = ((($438)) + 172|0);
+    $440 = HEAP32[$439>>2]|0;
+    $441 = $440 & 511;
+    $442 = $441 << 23;
+    $443 = 25 | $442;
+    $444 = $443 | 4194176;
+    $445 = (_genop_peep($437,$444,0)|0);
+    $pos13 = $445;
+    $446 = $0;
+    $447 = $1;
+    $448 = ((($447)) + 4|0);
+    $449 = HEAP32[$448>>2]|0;
+    $450 = HEAP32[$449>>2]|0;
+    $451 = $2;
+    _codegen($446,$450,$451);
+    $452 = $2;
+    $453 = ($452|0)!=(0);
+    if ($453) {
+     $454 = $1;
+     $455 = ((($454)) + 4|0);
+     $456 = HEAP32[$455>>2]|0;
+     $457 = HEAP32[$456>>2]|0;
+     $458 = ($457|0)!=(0|0);
+     if (!($458)) {
+      $459 = $0;
+      $460 = $0;
+      $461 = ((($460)) + 172|0);
+      $462 = HEAP32[$461>>2]|0;
+      $463 = $462 & 511;
+      $464 = $463 << 23;
+      $465 = 5 | $464;
+      (_genop($459,$465)|0);
+      $466 = $0;
+      _push_($466);
+     }
+    }
+    $467 = $e;
+    $468 = ($467|0)!=(0|0);
+    $469 = $2;
+    $470 = ($469|0)!=(0);
+    if ($468) {
+     if ($470) {
+      $471 = $0;
+      $472 = ((($471)) + 172|0);
+      $473 = HEAP32[$472>>2]|0;
+      $474 = (($473) + -1)|0;
+      HEAP32[$472>>2] = $474;
+     }
+     $475 = $0;
+     $476 = (_genop($475,4194199)|0);
+     $pos24 = $476;
+     $477 = $0;
+     $478 = $pos13;
+     _dispatch($477,$478);
+     $479 = $0;
+     $480 = $e;
+     $481 = $2;
+     _codegen($479,$480,$481);
+     $482 = $0;
+     $483 = $pos24;
+     _dispatch($482,$483);
+     STACKTOP = sp;return;
+    }
+    $484 = $0;
+    if ($470) {
+     $485 = ((($484)) + 172|0);
+     $486 = HEAP32[$485>>2]|0;
+     $487 = (($486) + -1)|0;
+     HEAP32[$485>>2] = $487;
+     $488 = $0;
+     $489 = (_genop($488,4194199)|0);
+     $pos24 = $489;
+     $490 = $0;
+     $491 = $pos13;
+     _dispatch($490,$491);
+     $492 = $0;
+     $493 = $0;
+     $494 = ((($493)) + 172|0);
+     $495 = HEAP32[$494>>2]|0;
+     $496 = $495 & 511;
+     $497 = $496 << 23;
+     $498 = 5 | $497;
+     (_genop($492,$498)|0);
+     $499 = $0;
+     $500 = $pos24;
+     _dispatch($499,$500);
+     $501 = $0;
+     _push_($501);
+     STACKTOP = sp;return;
+    } else {
+     $502 = $pos13;
+     _dispatch($484,$502);
+     STACKTOP = sp;return;
+    }
+   }
+   }
+   break;
+  }
+  case 20:  {
+   $503 = $0;
+   $504 = $1;
+   $505 = HEAP32[$504>>2]|0;
+   _codegen($503,$505,1);
+   $506 = $0;
+   $507 = ((($506)) + 172|0);
+   $508 = HEAP32[$507>>2]|0;
+   $509 = (($508) + -1)|0;
+   HEAP32[$507>>2] = $509;
+   $510 = $0;
+   $511 = $0;
+   $512 = ((($511)) + 172|0);
+   $513 = HEAP32[$512>>2]|0;
+   $514 = $513 & 511;
+   $515 = $514 << 23;
+   $516 = 25 | $515;
+   $517 = $516 | 4194176;
+   $518 = (_genop($510,$517)|0);
+   $pos = $518;
+   $519 = $0;
+   $520 = $1;
+   $521 = ((($520)) + 4|0);
+   $522 = HEAP32[$521>>2]|0;
+   $523 = $2;
+   _codegen($519,$522,$523);
+   $524 = $0;
+   $525 = $pos;
+   _dispatch($524,$525);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 21:  {
+   $526 = $0;
+   $527 = $1;
+   $528 = HEAP32[$527>>2]|0;
+   _codegen($526,$528,1);
+   $529 = $0;
+   $530 = ((($529)) + 172|0);
+   $531 = HEAP32[$530>>2]|0;
+   $532 = (($531) + -1)|0;
+   HEAP32[$530>>2] = $532;
+   $533 = $0;
+   $534 = $0;
+   $535 = ((($534)) + 172|0);
+   $536 = HEAP32[$535>>2]|0;
+   $537 = $536 & 511;
+   $538 = $537 << 23;
+   $539 = 24 | $538;
+   $540 = $539 | 4194176;
+   $541 = (_genop($533,$540)|0);
+   $pos5 = $541;
+   $542 = $0;
+   $543 = $1;
+   $544 = ((($543)) + 4|0);
+   $545 = HEAP32[$544>>2]|0;
+   $546 = $2;
+   _codegen($542,$545,$546);
+   $547 = $0;
+   $548 = $pos5;
+   _dispatch($547,$548);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 9:  {
+   $549 = $0;
+   $550 = (_loop_push($549,0)|0);
+   $lp6 = $550;
+   $551 = $0;
+   $552 = (_genop($551,4194199)|0);
+   $553 = $lp6;
+   $554 = ((($553)) + 4|0);
+   HEAP32[$554>>2] = $552;
+   $555 = $0;
+   $556 = (_new_label($555)|0);
+   $557 = $lp6;
+   $558 = ((($557)) + 8|0);
+   HEAP32[$558>>2] = $556;
+   $559 = $0;
+   $560 = $1;
+   $561 = ((($560)) + 4|0);
+   $562 = HEAP32[$561>>2]|0;
+   _codegen($559,$562,0);
+   $563 = $0;
+   $564 = $lp6;
+   $565 = ((($564)) + 4|0);
+   $566 = HEAP32[$565>>2]|0;
+   _dispatch($563,$566);
+   $567 = $0;
+   $568 = $1;
+   $569 = HEAP32[$568>>2]|0;
+   _codegen($567,$569,1);
+   $570 = $0;
+   $571 = ((($570)) + 172|0);
+   $572 = HEAP32[$571>>2]|0;
+   $573 = (($572) + -1)|0;
+   HEAP32[$571>>2] = $573;
+   $574 = $0;
+   $575 = $0;
+   $576 = ((($575)) + 172|0);
+   $577 = HEAP32[$576>>2]|0;
+   $578 = $577 & 511;
+   $579 = $578 << 23;
+   $580 = 24 | $579;
+   $581 = $lp6;
+   $582 = ((($581)) + 8|0);
+   $583 = HEAP32[$582>>2]|0;
+   $584 = $0;
+   $585 = ((($584)) + 176|0);
+   $586 = HEAP32[$585>>2]|0;
+   $587 = (($583) - ($586))|0;
+   $588 = (($587) + 32767)|0;
+   $589 = $588 & 65535;
+   $590 = $589 << 7;
+   $591 = $580 | $590;
+   (_genop($574,$591)|0);
+   $592 = $0;
+   $593 = $2;
+   _loop_pop($592,$593);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 10:  {
+   $594 = $0;
+   $595 = (_loop_push($594,0)|0);
+   $lp7 = $595;
+   $596 = $0;
+   $597 = (_genop($596,4194199)|0);
+   $598 = $lp7;
+   $599 = ((($598)) + 4|0);
+   HEAP32[$599>>2] = $597;
+   $600 = $0;
+   $601 = (_new_label($600)|0);
+   $602 = $lp7;
+   $603 = ((($602)) + 8|0);
+   HEAP32[$603>>2] = $601;
+   $604 = $0;
+   $605 = $1;
+   $606 = ((($605)) + 4|0);
+   $607 = HEAP32[$606>>2]|0;
+   _codegen($604,$607,0);
+   $608 = $0;
+   $609 = $lp7;
+   $610 = ((($609)) + 4|0);
+   $611 = HEAP32[$610>>2]|0;
+   _dispatch($608,$611);
+   $612 = $0;
+   $613 = $1;
+   $614 = HEAP32[$613>>2]|0;
+   _codegen($612,$614,1);
+   $615 = $0;
+   $616 = ((($615)) + 172|0);
+   $617 = HEAP32[$616>>2]|0;
+   $618 = (($617) + -1)|0;
+   HEAP32[$616>>2] = $618;
+   $619 = $0;
+   $620 = $0;
+   $621 = ((($620)) + 172|0);
+   $622 = HEAP32[$621>>2]|0;
+   $623 = $622 & 511;
+   $624 = $623 << 23;
+   $625 = 25 | $624;
+   $626 = $lp7;
+   $627 = ((($626)) + 8|0);
+   $628 = HEAP32[$627>>2]|0;
+   $629 = $0;
+   $630 = ((($629)) + 176|0);
+   $631 = HEAP32[$630>>2]|0;
+   $632 = (($628) - ($631))|0;
+   $633 = (($632) + 32767)|0;
+   $634 = $633 & 65535;
+   $635 = $634 << 7;
+   $636 = $625 | $635;
+   (_genop($619,$636)|0);
+   $637 = $0;
+   $638 = $2;
+   _loop_pop($637,$638);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 12:  {
+   $639 = $0;
+   $640 = $1;
+   _for_body($639,$640);
+   $641 = $2;
+   $642 = ($641|0)!=(0);
+   if (!($642)) {
+    STACKTOP = sp;return;
+   }
+   $643 = $0;
+   _push_($643);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 6:  {
+   $head = 0;
+   $pos3 = 0;
+   $644 = $1;
+   $645 = HEAP32[$644>>2]|0;
+   $646 = ($645|0)!=(0|0);
+   if ($646) {
+    $647 = $0;
+    $648 = ((($647)) + 172|0);
+    $649 = HEAP32[$648>>2]|0;
+    $head = $649;
+    $650 = $0;
+    $651 = $1;
+    $652 = HEAP32[$651>>2]|0;
+    _codegen($650,$652,1);
+   }
+   $653 = $1;
+   $654 = ((($653)) + 4|0);
+   $655 = HEAP32[$654>>2]|0;
+   $1 = $655;
+   while(1) {
+    $656 = $1;
+    $657 = ($656|0)!=(0|0);
+    if (!($657)) {
+     break;
+    }
+    $658 = $1;
+    $659 = HEAP32[$658>>2]|0;
+    $660 = HEAP32[$659>>2]|0;
+    $n = $660;
+    $pos29 = 0;
+    $pos18 = 0;
+    while(1) {
+     $661 = $n;
+     $662 = ($661|0)!=(0|0);
+     if (!($662)) {
+      break;
+     }
+     $663 = $0;
+     $664 = $n;
+     $665 = HEAP32[$664>>2]|0;
+     _codegen($663,$665,1);
+     $666 = $head;
+     $667 = ($666|0)!=(0);
+     $668 = $0;
+     do {
+      if ($667) {
+       $669 = $0;
+       $670 = ((($669)) + 172|0);
+       $671 = HEAP32[$670>>2]|0;
+       $672 = $671 & 511;
+       $673 = $672 << 23;
+       $674 = 1 | $673;
+       $675 = $head;
+       $676 = $675 & 511;
+       $677 = $676 << 14;
+       $678 = $674 | $677;
+       (_genop($668,$678)|0);
+       $679 = $0;
+       $680 = ((($679)) + 172|0);
+       $681 = HEAP32[$680>>2]|0;
+       $682 = (($681) + -1)|0;
+       HEAP32[$680>>2] = $682;
+       $683 = $n;
+       $684 = HEAP32[$683>>2]|0;
+       $685 = HEAP32[$684>>2]|0;
+       $686 = $685;
+       $687 = ($686|0)==(66);
+       $688 = $0;
+       $689 = $0;
+       $690 = ((($689)) + 172|0);
+       $691 = HEAP32[$690>>2]|0;
+       $692 = $691 & 511;
+       $693 = $692 << 23;
+       $694 = 32 | $693;
+       $695 = $0;
+       $696 = $0;
+       $697 = HEAP32[$696>>2]|0;
+       if ($687) {
+        $698 = (_mrb_intern_static($697,69439,10)|0);
+        $699 = (_new_msym($695,$698)|0);
+        $700 = $699 & 511;
+        $701 = $700 << 14;
+        $702 = $694 | $701;
+        $703 = $702 | 128;
+        (_genop($688,$703)|0);
+        break;
+       } else {
+        $704 = (_mrb_intern_static($697,69450,3)|0);
+        $705 = (_new_msym($695,$704)|0);
+        $706 = $705 & 511;
+        $707 = $706 << 14;
+        $708 = $694 | $707;
+        $709 = $708 | 128;
+        (_genop($688,$709)|0);
+        break;
+       }
+      } else {
+       $710 = ((($668)) + 172|0);
+       $711 = HEAP32[$710>>2]|0;
+       $712 = (($711) + -1)|0;
+       HEAP32[$710>>2] = $712;
+      }
+     } while(0);
+     $713 = $0;
+     $714 = $0;
+     $715 = ((($714)) + 172|0);
+     $716 = HEAP32[$715>>2]|0;
+     $717 = $716 & 511;
+     $718 = $717 << 23;
+     $719 = 24 | $718;
+     $720 = $pos29;
+     $721 = (($720) + 32767)|0;
+     $722 = $721 & 65535;
+     $723 = $722 << 7;
+     $724 = $719 | $723;
+     $725 = (_genop($713,$724)|0);
+     $tmp10 = $725;
+     $726 = $tmp10;
+     $pos29 = $726;
+     $727 = $n;
+     $728 = ((($727)) + 4|0);
+     $729 = HEAP32[$728>>2]|0;
+     $n = $729;
+    }
+    $730 = $1;
+    $731 = HEAP32[$730>>2]|0;
+    $732 = HEAP32[$731>>2]|0;
+    $733 = ($732|0)!=(0|0);
+    if ($733) {
+     $734 = $0;
+     $735 = (_genop($734,4194199)|0);
+     $pos18 = $735;
+     $736 = $0;
+     $737 = $pos29;
+     _dispatch_linked($736,$737);
+    }
+    $738 = $0;
+    $739 = $1;
+    $740 = HEAP32[$739>>2]|0;
+    $741 = ((($740)) + 4|0);
+    $742 = HEAP32[$741>>2]|0;
+    $743 = $2;
+    _codegen($738,$742,$743);
+    $744 = $2;
+    $745 = ($744|0)!=(0);
+    if ($745) {
+     $746 = $0;
+     $747 = ((($746)) + 172|0);
+     $748 = HEAP32[$747>>2]|0;
+     $749 = (($748) + -1)|0;
+     HEAP32[$747>>2] = $749;
+    }
+    $750 = $0;
+    $751 = $pos3;
+    $752 = (($751) + 32767)|0;
+    $753 = $752 & 65535;
+    $754 = $753 << 7;
+    $755 = 23 | $754;
+    $756 = (_genop($750,$755)|0);
+    $tmp10 = $756;
+    $757 = $tmp10;
+    $pos3 = $757;
+    $758 = $pos18;
+    $759 = ($758|0)!=(0);
+    if ($759) {
+     $760 = $0;
+     $761 = $pos18;
+     _dispatch($760,$761);
+    }
+    $762 = $1;
+    $763 = ((($762)) + 4|0);
+    $764 = HEAP32[$763>>2]|0;
+    $1 = $764;
+   }
+   $765 = $2;
+   $766 = ($765|0)!=(0);
+   if ($766) {
+    $767 = $0;
+    $768 = ((($767)) + 172|0);
+    $769 = HEAP32[$768>>2]|0;
+    $pos11 = $769;
+    $770 = $0;
+    $771 = $0;
+    $772 = ((($771)) + 172|0);
+    $773 = HEAP32[$772>>2]|0;
+    $774 = $773 & 511;
+    $775 = $774 << 23;
+    $776 = 5 | $775;
+    (_genop($770,$776)|0);
+    $777 = $pos3;
+    $778 = ($777|0)!=(0);
+    if ($778) {
+     $779 = $0;
+     $780 = $pos3;
+     _dispatch_linked($779,$780);
+    }
+    $781 = $head;
+    $782 = ($781|0)!=(0);
+    if ($782) {
+     $783 = $0;
+     $784 = ((($783)) + 172|0);
+     $785 = HEAP32[$784>>2]|0;
+     $786 = (($785) + -1)|0;
+     HEAP32[$784>>2] = $786;
+    }
+    $787 = $0;
+    $788 = $0;
+    $789 = ((($788)) + 172|0);
+    $790 = HEAP32[$789>>2]|0;
+    $791 = $790 & 511;
+    $792 = $791 << 23;
+    $793 = 1 | $792;
+    $794 = $pos11;
+    $795 = $794 & 511;
+    $796 = $795 << 14;
+    $797 = $793 | $796;
+    (_genop($787,$797)|0);
+    $798 = $0;
+    _push_($798);
+    STACKTOP = sp;return;
+   } else {
+    $799 = $pos3;
+    $800 = ($799|0)!=(0);
+    if ($800) {
+     $801 = $0;
+     $802 = $pos3;
+     _dispatch_linked($801,$802);
+    }
+    $803 = $head;
+    $804 = ($803|0)!=(0);
+    if (!($804)) {
+     STACKTOP = sp;return;
+    }
+    $805 = $0;
+    $806 = ((($805)) + 172|0);
+    $807 = HEAP32[$806>>2]|0;
+    $808 = (($807) + -1)|0;
+    HEAP32[$806>>2] = $808;
+    STACKTOP = sp;return;
+   }
+   break;
+  }
+  case 3:  {
+   $809 = $0;
+   $810 = $1;
+   (_scope_body($809,$810,0)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 29: case 30:  {
+   $811 = $0;
+   $812 = $1;
+   $813 = $2;
+   _gen_call($811,$812,0,0,$813);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 80:  {
+   $814 = $0;
+   $815 = $1;
+   $816 = HEAP32[$815>>2]|0;
+   $817 = $2;
+   _codegen($814,$816,$817);
+   $818 = $0;
+   $819 = $1;
+   $820 = ((($819)) + 4|0);
+   $821 = HEAP32[$820>>2]|0;
+   $822 = $2;
+   _codegen($818,$821,$822);
+   $823 = $2;
+   $824 = ($823|0)!=(0);
+   if (!($824)) {
+    STACKTOP = sp;return;
+   }
+   $825 = $0;
+   $826 = ((($825)) + 172|0);
+   $827 = HEAP32[$826>>2]|0;
+   $828 = (($827) + -1)|0;
+   HEAP32[$826>>2] = $828;
+   $829 = $0;
+   $830 = ((($829)) + 172|0);
+   $831 = HEAP32[$830>>2]|0;
+   $832 = (($831) + -1)|0;
+   HEAP32[$830>>2] = $832;
+   $833 = $0;
+   $834 = $0;
+   $835 = ((($834)) + 172|0);
+   $836 = HEAP32[$835>>2]|0;
+   $837 = $836 & 511;
+   $838 = $837 << 23;
+   $839 = 65 | $838;
+   $840 = $0;
+   $841 = ((($840)) + 172|0);
+   $842 = HEAP32[$841>>2]|0;
+   $843 = $842 & 511;
+   $844 = $843 << 14;
+   $845 = $839 | $844;
+   (_genop($833,$845)|0);
+   $846 = $0;
+   _push_($846);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 81:  {
+   $847 = $0;
+   $848 = $1;
+   $849 = HEAP32[$848>>2]|0;
+   $850 = $2;
+   _codegen($847,$849,$850);
+   $851 = $0;
+   $852 = $1;
+   $853 = ((($852)) + 4|0);
+   $854 = HEAP32[$853>>2]|0;
+   $855 = $2;
+   _codegen($851,$854,$855);
+   $856 = $2;
+   $857 = ($856|0)!=(0);
+   if (!($857)) {
+    STACKTOP = sp;return;
+   }
+   $858 = $0;
+   $859 = ((($858)) + 172|0);
+   $860 = HEAP32[$859>>2]|0;
+   $861 = (($860) + -1)|0;
+   HEAP32[$859>>2] = $861;
+   $862 = $0;
+   $863 = ((($862)) + 172|0);
+   $864 = HEAP32[$863>>2]|0;
+   $865 = (($864) + -1)|0;
+   HEAP32[$863>>2] = $865;
+   $866 = $0;
+   $867 = $0;
+   $868 = ((($867)) + 172|0);
+   $869 = HEAP32[$868>>2]|0;
+   $870 = $869 & 511;
+   $871 = $870 << 23;
+   $872 = 65 | $871;
+   $873 = $0;
+   $874 = ((($873)) + 172|0);
+   $875 = HEAP32[$874>>2]|0;
+   $876 = $875 & 511;
+   $877 = $876 << 14;
+   $878 = $872 | $877;
+   $879 = $878 | 128;
+   (_genop($866,$879)|0);
+   $880 = $0;
+   _push_($880);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 77:  {
+   $881 = $0;
+   $882 = $1;
+   $883 = ((($882)) + 4|0);
+   $884 = HEAP32[$883>>2]|0;
+   $885 = $884;
+   $886 = (_new_sym_1188($881,$885)|0);
+   $sym = $886;
+   $887 = $0;
+   $888 = $1;
+   $889 = HEAP32[$888>>2]|0;
+   _codegen($887,$889,1);
+   $890 = $0;
+   $891 = ((($890)) + 172|0);
+   $892 = HEAP32[$891>>2]|0;
+   $893 = (($892) + -1)|0;
+   HEAP32[$891>>2] = $893;
+   $894 = $0;
+   $895 = $0;
+   $896 = ((($895)) + 172|0);
+   $897 = HEAP32[$896>>2]|0;
+   $898 = $897 & 511;
+   $899 = $898 << 23;
+   $900 = 19 | $899;
+   $901 = $sym;
+   $902 = $901 & 65535;
+   $903 = $902 << 7;
+   $904 = $900 | $903;
+   (_genop($894,$904)|0);
+   $905 = $2;
+   $906 = ($905|0)!=(0);
+   if (!($906)) {
+    STACKTOP = sp;return;
+   }
+   $907 = $0;
+   _push_($907);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 78:  {
+   $908 = $0;
+   $909 = $1;
+   $910 = $909;
+   $911 = (_new_sym_1188($908,$910)|0);
+   $sym12 = $911;
+   $912 = $0;
+   $913 = $0;
+   $914 = ((($913)) + 172|0);
+   $915 = HEAP32[$914>>2]|0;
+   $916 = $915 & 511;
+   $917 = $916 << 23;
+   $918 = 66 | $917;
+   (_genop($912,$918)|0);
+   $919 = $0;
+   $920 = $0;
+   $921 = ((($920)) + 172|0);
+   $922 = HEAP32[$921>>2]|0;
+   $923 = $922 & 511;
+   $924 = $923 << 23;
+   $925 = 19 | $924;
+   $926 = $sym12;
+   $927 = $926 & 65535;
+   $928 = $927 << 7;
+   $929 = $925 | $928;
+   (_genop($919,$929)|0);
+   $930 = $2;
+   $931 = ($930|0)!=(0);
+   if (!($931)) {
+    STACKTOP = sp;return;
+   }
+   $932 = $0;
+   _push_($932);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 34:  {
+   $933 = $0;
+   $934 = $1;
+   $935 = $2;
+   $936 = (_gen_values($933,$934,$935)|0);
+   $n13 = $936;
+   $937 = $n13;
+   $938 = ($937|0)>=(0);
+   $939 = $2;
+   $940 = ($939|0)!=(0);
+   if ($938) {
+    if (!($940)) {
+     STACKTOP = sp;return;
+    }
+    $941 = $n13;
+    $942 = $0;
+    $943 = ((($942)) + 172|0);
+    $944 = HEAP32[$943>>2]|0;
+    $945 = (($944) - ($941))|0;
+    HEAP32[$943>>2] = $945;
+    $946 = $0;
+    $947 = $0;
+    $948 = ((($947)) + 172|0);
+    $949 = HEAP32[$948>>2]|0;
+    $950 = $949 & 511;
+    $951 = $950 << 23;
+    $952 = 55 | $951;
+    $953 = $0;
+    $954 = ((($953)) + 172|0);
+    $955 = HEAP32[$954>>2]|0;
+    $956 = $955 & 511;
+    $957 = $956 << 14;
+    $958 = $952 | $957;
+    $959 = $n13;
+    $960 = $959 & 127;
+    $961 = $960 << 7;
+    $962 = $958 | $961;
+    (_genop($946,$962)|0);
+    $963 = $0;
+    _push_($963);
+    STACKTOP = sp;return;
+   } else {
+    if (!($940)) {
+     STACKTOP = sp;return;
+    }
+    $964 = $0;
+    _push_($964);
+    STACKTOP = sp;return;
+   }
+   break;
+  }
+  case 36:  {
+   $len = 0;
+   $update = 0;
+   while(1) {
+    $965 = $1;
+    $966 = ($965|0)!=(0|0);
+    if (!($966)) {
+     break;
+    }
+    $967 = $0;
+    $968 = $1;
+    $969 = HEAP32[$968>>2]|0;
+    $970 = HEAP32[$969>>2]|0;
+    $971 = $2;
+    _codegen($967,$970,$971);
+    $972 = $0;
+    $973 = $1;
+    $974 = HEAP32[$973>>2]|0;
+    $975 = ((($974)) + 4|0);
+    $976 = HEAP32[$975>>2]|0;
+    $977 = $2;
+    _codegen($972,$976,$977);
+    $978 = $len;
+    $979 = (($978) + 1)|0;
+    $len = $979;
+    $980 = $1;
+    $981 = ((($980)) + 4|0);
+    $982 = HEAP32[$981>>2]|0;
+    $1 = $982;
+    $983 = $2;
+    $984 = ($983|0)!=(0);
+    $985 = $len;
+    $986 = ($985|0)==(126);
+    $or$cond3 = $984 & $986;
+    if (!($or$cond3)) {
+     continue;
+    }
+    $987 = $len;
+    $988 = $987<<1;
+    $989 = $0;
+    $990 = ((($989)) + 172|0);
+    $991 = HEAP32[$990>>2]|0;
+    $992 = (($991) - ($988))|0;
+    HEAP32[$990>>2] = $992;
+    $993 = $0;
+    $994 = $0;
+    $995 = ((($994)) + 172|0);
+    $996 = HEAP32[$995>>2]|0;
+    $997 = $996 & 511;
+    $998 = $997 << 23;
+    $999 = 63 | $998;
+    $1000 = $0;
+    $1001 = ((($1000)) + 172|0);
+    $1002 = HEAP32[$1001>>2]|0;
+    $1003 = $1002 & 511;
+    $1004 = $1003 << 14;
+    $1005 = $999 | $1004;
+    $1006 = $len;
+    $1007 = $1006 & 127;
+    $1008 = $1007 << 7;
+    $1009 = $1005 | $1008;
+    (_genop($993,$1009)|0);
+    $1010 = $update;
+    $1011 = ($1010<<24>>24)!=(0);
+    if ($1011) {
+     $1012 = $0;
+     $1013 = ((($1012)) + 172|0);
+     $1014 = HEAP32[$1013>>2]|0;
+     $1015 = (($1014) + -1)|0;
+     HEAP32[$1013>>2] = $1015;
+     $1016 = $0;
+     $1017 = $0;
+     $1018 = ((($1017)) + 172|0);
+     $1019 = HEAP32[$1018>>2]|0;
+     $1020 = $1019 & 511;
+     $1021 = $1020 << 23;
+     $1022 = 32 | $1021;
+     $1023 = $0;
+     $1024 = $0;
+     $1025 = HEAP32[$1024>>2]|0;
+     $1026 = (_mrb_intern_static($1025,69503,8)|0);
+     $1027 = (_new_msym($1023,$1026)|0);
+     $1028 = $1027 & 511;
+     $1029 = $1028 << 14;
+     $1030 = $1022 | $1029;
+     $1031 = $1030 | 128;
+     (_genop($1016,$1031)|0);
+    }
+    $1032 = $0;
+    _push_($1032);
+    $update = 1;
+    $len = 0;
+   }
+   $1033 = $2;
+   $1034 = ($1033|0)!=(0);
+   if (!($1034)) {
+    STACKTOP = sp;return;
+   }
+   $1035 = $len;
+   $1036 = $1035<<1;
+   $1037 = $0;
+   $1038 = ((($1037)) + 172|0);
+   $1039 = HEAP32[$1038>>2]|0;
+   $1040 = (($1039) - ($1036))|0;
+   HEAP32[$1038>>2] = $1040;
+   $1041 = $0;
+   $1042 = $0;
+   $1043 = ((($1042)) + 172|0);
+   $1044 = HEAP32[$1043>>2]|0;
+   $1045 = $1044 & 511;
+   $1046 = $1045 << 23;
+   $1047 = 63 | $1046;
+   $1048 = $0;
+   $1049 = ((($1048)) + 172|0);
+   $1050 = HEAP32[$1049>>2]|0;
+   $1051 = $1050 & 511;
+   $1052 = $1051 << 14;
+   $1053 = $1047 | $1052;
+   $1054 = $len;
+   $1055 = $1054 & 127;
+   $1056 = $1055 << 7;
+   $1057 = $1053 | $1056;
+   (_genop($1041,$1057)|0);
+   $1058 = $update;
+   $1059 = ($1058<<24>>24)!=(0);
+   if ($1059) {
+    $1060 = $0;
+    $1061 = ((($1060)) + 172|0);
+    $1062 = HEAP32[$1061>>2]|0;
+    $1063 = (($1062) + -1)|0;
+    HEAP32[$1061>>2] = $1063;
+    $1064 = $0;
+    $1065 = $0;
+    $1066 = ((($1065)) + 172|0);
+    $1067 = HEAP32[$1066>>2]|0;
+    $1068 = $1067 & 511;
+    $1069 = $1068 << 23;
+    $1070 = 32 | $1069;
+    $1071 = $0;
+    $1072 = $0;
+    $1073 = HEAP32[$1072>>2]|0;
+    $1074 = (_mrb_intern_static($1073,69503,8)|0);
+    $1075 = (_new_msym($1071,$1074)|0);
+    $1076 = $1075 & 511;
+    $1077 = $1076 << 14;
+    $1078 = $1070 | $1077;
+    $1079 = $1078 | 128;
+    (_genop($1064,$1079)|0);
+   }
+   $1080 = $0;
+   _push_($1080);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 66:  {
+   $1081 = $0;
+   $1082 = $1;
+   _codegen($1081,$1082,1);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 24:  {
+   $1083 = $0;
+   $1084 = $1;
+   $1085 = ((($1084)) + 4|0);
+   $1086 = HEAP32[$1085>>2]|0;
+   _codegen($1083,$1086,1);
+   $1087 = $0;
+   $1088 = ((($1087)) + 172|0);
+   $1089 = HEAP32[$1088>>2]|0;
+   $1090 = (($1089) + -1)|0;
+   HEAP32[$1088>>2] = $1090;
+   $1091 = $0;
+   $1092 = $1;
+   $1093 = HEAP32[$1092>>2]|0;
+   $1094 = $0;
+   $1095 = ((($1094)) + 172|0);
+   $1096 = HEAP32[$1095>>2]|0;
+   $1097 = $2;
+   _gen_assignment($1091,$1093,$1096,$1097);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 23:  {
+   $len14 = 0;
+   $n15 = 0;
+   $post = 0;
+   $1098 = $1;
+   $1099 = ((($1098)) + 4|0);
+   $1100 = HEAP32[$1099>>2]|0;
+   $t = $1100;
+   $1101 = $0;
+   $1102 = ((($1101)) + 172|0);
+   $1103 = HEAP32[$1102>>2]|0;
+   $rhs = $1103;
+   $1104 = $t;
+   $1105 = HEAP32[$1104>>2]|0;
+   $1106 = $1105;
+   $1107 = ($1106|0)==(34);
+   if ($1107) {
+    $1108 = $t;
+    $1109 = ((($1108)) + 4|0);
+    $1110 = HEAP32[$1109>>2]|0;
+    $1111 = (_nosplat($1110)|0);
+    $1112 = $1111&255;
+    $1113 = ($1112|0)!=(0);
+    if ($1113) {
+     $1114 = $t;
+     $1115 = ((($1114)) + 4|0);
+     $1116 = HEAP32[$1115>>2]|0;
+     $t = $1116;
+     while(1) {
+      $1117 = $t;
+      $1118 = ($1117|0)!=(0|0);
+      if (!($1118)) {
+       break;
+      }
+      $1119 = $0;
+      $1120 = $t;
+      $1121 = HEAP32[$1120>>2]|0;
+      _codegen($1119,$1121,1);
+      $1122 = $len14;
+      $1123 = (($1122) + 1)|0;
+      $len14 = $1123;
+      $1124 = $t;
+      $1125 = ((($1124)) + 4|0);
+      $1126 = HEAP32[$1125>>2]|0;
+      $t = $1126;
+     }
+     $1127 = $1;
+     $1128 = HEAP32[$1127>>2]|0;
+     $1 = $1128;
+     $1129 = $1;
+     $1130 = HEAP32[$1129>>2]|0;
+     $1131 = ($1130|0)!=(0|0);
+     L213: do {
+      if ($1131) {
+       $1132 = $1;
+       $1133 = HEAP32[$1132>>2]|0;
+       $t = $1133;
+       $n15 = 0;
+       while(1) {
+        $1134 = $t;
+        $1135 = ($1134|0)!=(0|0);
+        if (!($1135)) {
+         break L213;
+        }
+        $1136 = $0;
+        $1137 = $t;
+        $1138 = HEAP32[$1137>>2]|0;
+        $1139 = $rhs;
+        $1140 = $n15;
+        $1141 = (($1139) + ($1140))|0;
+        _gen_assignment($1136,$1138,$1141,0);
+        $1142 = $n15;
+        $1143 = (($1142) + 1)|0;
+        $n15 = $1143;
+        $1144 = $t;
+        $1145 = ((($1144)) + 4|0);
+        $1146 = HEAP32[$1145>>2]|0;
+        $t = $1146;
+       }
+      }
+     } while(0);
+     $1147 = $1;
+     $1148 = ((($1147)) + 4|0);
+     $1149 = HEAP32[$1148>>2]|0;
+     $t = $1149;
+     $1150 = $t;
+     $1151 = ($1150|0)!=(0|0);
+     L219: do {
+      if ($1151) {
+       $1152 = $t;
+       $1153 = ((($1152)) + 4|0);
+       $1154 = HEAP32[$1153>>2]|0;
+       $1155 = ($1154|0)!=(0|0);
+       L221: do {
+        if ($1155) {
+         $1156 = $t;
+         $1157 = ((($1156)) + 4|0);
+         $1158 = HEAP32[$1157>>2]|0;
+         $1159 = HEAP32[$1158>>2]|0;
+         $p = $1159;
+         while(1) {
+          $1160 = $p;
+          $1161 = ($1160|0)!=(0|0);
+          if (!($1161)) {
+           break L221;
+          }
+          $1162 = $post;
+          $1163 = (($1162) + 1)|0;
+          $post = $1163;
+          $1164 = $p;
+          $1165 = ((($1164)) + 4|0);
+          $1166 = HEAP32[$1165>>2]|0;
+          $p = $1166;
+         }
+        }
+       } while(0);
+       $1167 = $t;
+       $1168 = HEAP32[$1167>>2]|0;
+       $1169 = ($1168|0)!=(0|0);
+       if ($1169) {
+        $1170 = $len14;
+        $1171 = $post;
+        $1172 = $n15;
+        $1173 = (($1171) + ($1172))|0;
+        $1174 = ($1170|0)<($1173|0);
+        if ($1174) {
+         $rn = 0;
+        } else {
+         $1175 = $len14;
+         $1176 = $post;
+         $1177 = (($1175) - ($1176))|0;
+         $1178 = $n15;
+         $1179 = (($1177) - ($1178))|0;
+         $rn = $1179;
+        }
+        $1180 = $0;
+        $1181 = $0;
+        $1182 = ((($1181)) + 172|0);
+        $1183 = HEAP32[$1182>>2]|0;
+        $1184 = $1183 & 511;
+        $1185 = $1184 << 23;
+        $1186 = 55 | $1185;
+        $1187 = $rhs;
+        $1188 = $n15;
+        $1189 = (($1187) + ($1188))|0;
+        $1190 = $1189 & 511;
+        $1191 = $1190 << 14;
+        $1192 = $1186 | $1191;
+        $1193 = $rn;
+        $1194 = $1193 & 127;
+        $1195 = $1194 << 7;
+        $1196 = $1192 | $1195;
+        (_genop($1180,$1196)|0);
+        $1197 = $0;
+        $1198 = $t;
+        $1199 = HEAP32[$1198>>2]|0;
+        $1200 = $0;
+        $1201 = ((($1200)) + 172|0);
+        $1202 = HEAP32[$1201>>2]|0;
+        _gen_assignment($1197,$1199,$1202,0);
+        $1203 = $rn;
+        $1204 = $n15;
+        $1205 = (($1204) + ($1203))|0;
+        $n15 = $1205;
+       }
+       $1206 = $t;
+       $1207 = ((($1206)) + 4|0);
+       $1208 = HEAP32[$1207>>2]|0;
+       $1209 = ($1208|0)!=(0|0);
+       if ($1209) {
+        $1210 = $t;
+        $1211 = ((($1210)) + 4|0);
+        $1212 = HEAP32[$1211>>2]|0;
+        $1213 = HEAP32[$1212>>2]|0;
+        $1214 = ($1213|0)!=(0|0);
+        if ($1214) {
+         $1215 = $t;
+         $1216 = ((($1215)) + 4|0);
+         $1217 = HEAP32[$1216>>2]|0;
+         $1218 = HEAP32[$1217>>2]|0;
+         $t = $1218;
+         while(1) {
+          $1219 = $n15;
+          $1220 = $len14;
+          $1221 = ($1219|0)<($1220|0);
+          if (!($1221)) {
+           break L219;
+          }
+          $1222 = $0;
+          $1223 = $t;
+          $1224 = HEAP32[$1223>>2]|0;
+          $1225 = $rhs;
+          $1226 = $n15;
+          $1227 = (($1225) + ($1226))|0;
+          _gen_assignment($1222,$1224,$1227,0);
+          $1228 = $t;
+          $1229 = ((($1228)) + 4|0);
+          $1230 = HEAP32[$1229>>2]|0;
+          $t = $1230;
+          $1231 = $n15;
+          $1232 = (($1231) + 1)|0;
+          $n15 = $1232;
+         }
+        }
+       }
+      }
+     } while(0);
+     $1233 = $len14;
+     $1234 = $0;
+     $1235 = ((($1234)) + 172|0);
+     $1236 = HEAP32[$1235>>2]|0;
+     $1237 = (($1236) - ($1233))|0;
+     HEAP32[$1235>>2] = $1237;
+     $1238 = $2;
+     $1239 = ($1238|0)!=(0);
+     if (!($1239)) {
+      STACKTOP = sp;return;
+     }
+     $1240 = $0;
+     $1241 = $rhs;
+     $1242 = $1241 & 511;
+     $1243 = $1242 << 23;
+     $1244 = 55 | $1243;
+     $1245 = $rhs;
+     $1246 = $1245 & 511;
+     $1247 = $1246 << 14;
+     $1248 = $1244 | $1247;
+     $1249 = $len14;
+     $1250 = $1249 & 127;
+     $1251 = $1250 << 7;
+     $1252 = $1248 | $1251;
+     (_genop($1240,$1252)|0);
+     $1253 = $0;
+     _push_($1253);
+     STACKTOP = sp;return;
+    }
+   }
+   $1254 = $0;
+   $1255 = $t;
+   _codegen($1254,$1255,1);
+   $1256 = $0;
+   $1257 = $1;
+   $1258 = HEAP32[$1257>>2]|0;
+   $1259 = $rhs;
+   $1260 = $2;
+   _gen_vmassignment($1256,$1258,$1259,$1260);
+   $1261 = $2;
+   $1262 = ($1261|0)!=(0);
+   if ($1262) {
+    STACKTOP = sp;return;
+   }
+   $1263 = $0;
+   $1264 = ((($1263)) + 172|0);
+   $1265 = HEAP32[$1264>>2]|0;
+   $1266 = (($1265) + -1)|0;
+   HEAP32[$1264>>2] = $1266;
+   STACKTOP = sp;return;
+   break;
+  }
+  case 28:  {
+   $1267 = $1;
+   $1268 = ((($1267)) + 4|0);
+   $1269 = HEAP32[$1268>>2]|0;
+   $1270 = HEAP32[$1269>>2]|0;
+   $1271 = $1270;
+   $sym16 = $1271;
+   $1272 = $0;
+   $1273 = HEAP32[$1272>>2]|0;
+   $1274 = $sym16;
+   $1275 = (_mrb_sym2name_len($1273,$1274,$len17)|0);
+   $name = $1275;
+   $1276 = $0;
+   $1277 = $1;
+   $1278 = HEAP32[$1277>>2]|0;
+   _codegen($1276,$1278,1);
+   $1279 = HEAP32[$len17>>2]|0;
+   $1280 = ($1279|0)==(2);
+   do {
+    if ($1280) {
+     $1281 = $name;
+     $1282 = HEAP8[$1281>>0]|0;
+     $1283 = $1282 << 24 >> 24;
+     $1284 = ($1283|0)==(124);
+     if ($1284) {
+      $1285 = $name;
+      $1286 = ((($1285)) + 1|0);
+      $1287 = HEAP8[$1286>>0]|0;
+      $1288 = $1287 << 24 >> 24;
+      $1289 = ($1288|0)==(124);
+      if (!($1289)) {
+       label = 152;
+      }
+     } else {
+      label = 152;
+     }
+     if ((label|0) == 152) {
+      $1290 = $name;
+      $1291 = HEAP8[$1290>>0]|0;
+      $1292 = $1291 << 24 >> 24;
+      $1293 = ($1292|0)==(38);
+      if (!($1293)) {
+       break;
+      }
+      $1294 = $name;
+      $1295 = ((($1294)) + 1|0);
+      $1296 = HEAP8[$1295>>0]|0;
+      $1297 = $1296 << 24 >> 24;
+      $1298 = ($1297|0)==(38);
+      if (!($1298)) {
+       break;
+      }
+     }
+     $1299 = $0;
+     $1300 = ((($1299)) + 172|0);
+     $1301 = HEAP32[$1300>>2]|0;
+     $1302 = (($1301) + -1)|0;
+     HEAP32[$1300>>2] = $1302;
+     $1303 = $0;
+     $1304 = $name;
+     $1305 = HEAP8[$1304>>0]|0;
+     $1306 = $1305 << 24 >> 24;
+     $1307 = ($1306|0)==(124);
+     $1308 = $1307 ? 24 : 25;
+     $1309 = $1308 & 127;
+     $1310 = $0;
+     $1311 = ((($1310)) + 172|0);
+     $1312 = HEAP32[$1311>>2]|0;
+     $1313 = $1312 & 511;
+     $1314 = $1313 << 23;
+     $1315 = $1309 | $1314;
+     $1316 = $1315 | 4194176;
+     $1317 = (_genop_peep($1303,$1316,0)|0);
+     $pos19 = $1317;
+     $1318 = $0;
+     $1319 = $1;
+     $1320 = ((($1319)) + 4|0);
+     $1321 = HEAP32[$1320>>2]|0;
+     $1322 = ((($1321)) + 4|0);
+     $1323 = HEAP32[$1322>>2]|0;
+     $1324 = HEAP32[$1323>>2]|0;
+     _codegen($1318,$1324,1);
+     $1325 = $0;
+     $1326 = ((($1325)) + 172|0);
+     $1327 = HEAP32[$1326>>2]|0;
+     $1328 = (($1327) + -1)|0;
+     HEAP32[$1326>>2] = $1328;
+     $1329 = $0;
+     $1330 = $1;
+     $1331 = HEAP32[$1330>>2]|0;
+     $1332 = $0;
+     $1333 = ((($1332)) + 172|0);
+     $1334 = HEAP32[$1333>>2]|0;
+     $1335 = $2;
+     _gen_assignment($1329,$1331,$1334,$1335);
+     $1336 = $0;
+     $1337 = $pos19;
+     _dispatch($1336,$1337);
+     STACKTOP = sp;return;
+    }
+   } while(0);
+   $1338 = $0;
+   $1339 = $1;
+   $1340 = ((($1339)) + 4|0);
+   $1341 = HEAP32[$1340>>2]|0;
+   $1342 = ((($1341)) + 4|0);
+   $1343 = HEAP32[$1342>>2]|0;
+   $1344 = HEAP32[$1343>>2]|0;
+   _codegen($1338,$1344,1);
+   $1345 = $0;
+   _push_($1345);
+   $1346 = $0;
+   $1347 = ((($1346)) + 172|0);
+   $1348 = HEAP32[$1347>>2]|0;
+   $1349 = (($1348) + -1)|0;
+   HEAP32[$1347>>2] = $1349;
+   $1350 = $0;
+   $1351 = ((($1350)) + 172|0);
+   $1352 = HEAP32[$1351>>2]|0;
+   $1353 = (($1352) + -1)|0;
+   HEAP32[$1351>>2] = $1353;
+   $1354 = $0;
+   $1355 = ((($1354)) + 172|0);
+   $1356 = HEAP32[$1355>>2]|0;
+   $1357 = (($1356) + -1)|0;
+   HEAP32[$1355>>2] = $1357;
+   $1358 = $0;
+   $1359 = $sym16;
+   $1360 = (_new_msym($1358,$1359)|0);
+   $idx18 = $1360;
+   $1361 = HEAP32[$len17>>2]|0;
+   $1362 = ($1361|0)==(1);
+   if ($1362) {
+    $1363 = $name;
+    $1364 = HEAP8[$1363>>0]|0;
+    $1365 = $1364 << 24 >> 24;
+    $1366 = ($1365|0)==(43);
+    if ($1366) {
+     $1367 = $0;
+     $1368 = $0;
+     $1369 = ((($1368)) + 172|0);
+     $1370 = HEAP32[$1369>>2]|0;
+     $1371 = $1370 & 511;
+     $1372 = $1371 << 23;
+     $1373 = 44 | $1372;
+     $1374 = $idx18;
+     $1375 = $1374 & 511;
+     $1376 = $1375 << 14;
+     $1377 = $1373 | $1376;
+     $1378 = $1377 | 128;
+     $1379 = $2;
+     (_genop_peep($1367,$1378,$1379)|0);
+    } else {
+     label = 158;
+    }
+   } else {
+    label = 158;
+   }
+   do {
+    if ((label|0) == 158) {
+     $1380 = HEAP32[$len17>>2]|0;
+     $1381 = ($1380|0)==(1);
+     if ($1381) {
+      $1382 = $name;
+      $1383 = HEAP8[$1382>>0]|0;
+      $1384 = $1383 << 24 >> 24;
+      $1385 = ($1384|0)==(45);
+      if ($1385) {
+       $1386 = $0;
+       $1387 = $0;
+       $1388 = ((($1387)) + 172|0);
+       $1389 = HEAP32[$1388>>2]|0;
+       $1390 = $1389 & 511;
+       $1391 = $1390 << 23;
+       $1392 = 46 | $1391;
+       $1393 = $idx18;
+       $1394 = $1393 & 511;
+       $1395 = $1394 << 14;
+       $1396 = $1392 | $1395;
+       $1397 = $1396 | 128;
+       $1398 = $2;
+       (_genop_peep($1386,$1397,$1398)|0);
+       break;
+      }
+     }
+     $1399 = HEAP32[$len17>>2]|0;
+     $1400 = ($1399|0)==(1);
+     if ($1400) {
+      $1401 = $name;
+      $1402 = HEAP8[$1401>>0]|0;
+      $1403 = $1402 << 24 >> 24;
+      $1404 = ($1403|0)==(42);
+      if ($1404) {
+       $1405 = $0;
+       $1406 = $0;
+       $1407 = ((($1406)) + 172|0);
+       $1408 = HEAP32[$1407>>2]|0;
+       $1409 = $1408 & 511;
+       $1410 = $1409 << 23;
+       $1411 = 48 | $1410;
+       $1412 = $idx18;
+       $1413 = $1412 & 511;
+       $1414 = $1413 << 14;
+       $1415 = $1411 | $1414;
+       $1416 = $1415 | 128;
+       (_genop($1405,$1416)|0);
+       break;
+      }
+     }
+     $1417 = HEAP32[$len17>>2]|0;
+     $1418 = ($1417|0)==(1);
+     if ($1418) {
+      $1419 = $name;
+      $1420 = HEAP8[$1419>>0]|0;
+      $1421 = $1420 << 24 >> 24;
+      $1422 = ($1421|0)==(47);
+      if ($1422) {
+       $1423 = $0;
+       $1424 = $0;
+       $1425 = ((($1424)) + 172|0);
+       $1426 = HEAP32[$1425>>2]|0;
+       $1427 = $1426 & 511;
+       $1428 = $1427 << 23;
+       $1429 = 49 | $1428;
+       $1430 = $idx18;
+       $1431 = $1430 & 511;
+       $1432 = $1431 << 14;
+       $1433 = $1429 | $1432;
+       $1434 = $1433 | 128;
+       (_genop($1423,$1434)|0);
+       break;
+      }
+     }
+     $1435 = HEAP32[$len17>>2]|0;
+     $1436 = ($1435|0)==(1);
+     if ($1436) {
+      $1437 = $name;
+      $1438 = HEAP8[$1437>>0]|0;
+      $1439 = $1438 << 24 >> 24;
+      $1440 = ($1439|0)==(60);
+      if ($1440) {
+       $1441 = $0;
+       $1442 = $0;
+       $1443 = ((($1442)) + 172|0);
+       $1444 = HEAP32[$1443>>2]|0;
+       $1445 = $1444 & 511;
+       $1446 = $1445 << 23;
+       $1447 = 51 | $1446;
+       $1448 = $idx18;
+       $1449 = $1448 & 511;
+       $1450 = $1449 << 14;
+       $1451 = $1447 | $1450;
+       $1452 = $1451 | 128;
+       (_genop($1441,$1452)|0);
+       break;
+      }
+     }
+     $1453 = HEAP32[$len17>>2]|0;
+     $1454 = ($1453|0)==(2);
+     if ($1454) {
+      $1455 = $name;
+      $1456 = HEAP8[$1455>>0]|0;
+      $1457 = $1456 << 24 >> 24;
+      $1458 = ($1457|0)==(60);
+      if ($1458) {
+       $1459 = $name;
+       $1460 = ((($1459)) + 1|0);
+       $1461 = HEAP8[$1460>>0]|0;
+       $1462 = $1461 << 24 >> 24;
+       $1463 = ($1462|0)==(61);
+       if ($1463) {
+        $1464 = $0;
+        $1465 = $0;
+        $1466 = ((($1465)) + 172|0);
+        $1467 = HEAP32[$1466>>2]|0;
+        $1468 = $1467 & 511;
+        $1469 = $1468 << 23;
+        $1470 = 52 | $1469;
+        $1471 = $idx18;
+        $1472 = $1471 & 511;
+        $1473 = $1472 << 14;
+        $1474 = $1470 | $1473;
+        $1475 = $1474 | 128;
+        (_genop($1464,$1475)|0);
+        break;
+       }
+      }
+     }
+     $1476 = HEAP32[$len17>>2]|0;
+     $1477 = ($1476|0)==(1);
+     if ($1477) {
+      $1478 = $name;
+      $1479 = HEAP8[$1478>>0]|0;
+      $1480 = $1479 << 24 >> 24;
+      $1481 = ($1480|0)==(62);
+      if ($1481) {
+       $1482 = $0;
+       $1483 = $0;
+       $1484 = ((($1483)) + 172|0);
+       $1485 = HEAP32[$1484>>2]|0;
+       $1486 = $1485 & 511;
+       $1487 = $1486 << 23;
+       $1488 = 53 | $1487;
+       $1489 = $idx18;
+       $1490 = $1489 & 511;
+       $1491 = $1490 << 14;
+       $1492 = $1488 | $1491;
+       $1493 = $1492 | 128;
+       (_genop($1482,$1493)|0);
+       break;
+      }
+     }
+     $1494 = HEAP32[$len17>>2]|0;
+     $1495 = ($1494|0)==(2);
+     if ($1495) {
+      $1496 = $name;
+      $1497 = HEAP8[$1496>>0]|0;
+      $1498 = $1497 << 24 >> 24;
+      $1499 = ($1498|0)==(62);
+      if ($1499) {
+       $1500 = $name;
+       $1501 = ((($1500)) + 1|0);
+       $1502 = HEAP8[$1501>>0]|0;
+       $1503 = $1502 << 24 >> 24;
+       $1504 = ($1503|0)==(61);
+       if ($1504) {
+        $1505 = $0;
+        $1506 = $0;
+        $1507 = ((($1506)) + 172|0);
+        $1508 = HEAP32[$1507>>2]|0;
+        $1509 = $1508 & 511;
+        $1510 = $1509 << 23;
+        $1511 = 54 | $1510;
+        $1512 = $idx18;
+        $1513 = $1512 & 511;
+        $1514 = $1513 << 14;
+        $1515 = $1511 | $1514;
+        $1516 = $1515 | 128;
+        (_genop($1505,$1516)|0);
+        break;
+       }
+      }
+     }
+     $1517 = $0;
+     $1518 = $0;
+     $1519 = ((($1518)) + 172|0);
+     $1520 = HEAP32[$1519>>2]|0;
+     $1521 = $1520 & 511;
+     $1522 = $1521 << 23;
+     $1523 = 32 | $1522;
+     $1524 = $idx18;
+     $1525 = $1524 & 511;
+     $1526 = $1525 << 14;
+     $1527 = $1523 | $1526;
+     $1528 = $1527 | 128;
+     (_genop($1517,$1528)|0);
+    }
+   } while(0);
+   $1529 = $0;
+   $1530 = $1;
+   $1531 = HEAP32[$1530>>2]|0;
+   $1532 = $0;
+   $1533 = ((($1532)) + 172|0);
+   $1534 = HEAP32[$1533>>2]|0;
+   $1535 = $2;
+   _gen_assignment($1529,$1531,$1534,$1535);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 32:  {
+   $n20 = 0;
+   $noop = 0;
+   $sendv = 0;
+   $1536 = $0;
+   _push_($1536);
+   $1537 = $1;
+   $1538 = ($1537|0)!=(0|0);
+   if ($1538) {
+    $1539 = $1;
+    $1540 = HEAP32[$1539>>2]|0;
+    $args = $1540;
+    $1541 = $args;
+    $1542 = ($1541|0)!=(0|0);
+    if ($1542) {
+     $1543 = $0;
+     $1544 = $args;
+     $1545 = (_gen_values($1543,$1544,1)|0);
+     $n20 = $1545;
+     $1546 = $n20;
+     $1547 = ($1546|0)<(0);
+     if ($1547) {
+      $sendv = 1;
+      $noop = 1;
+      $n20 = 1;
+      $1548 = $0;
+      _push_($1548);
+     }
+    }
+   }
+   $1549 = $1;
+   $1550 = ($1549|0)!=(0|0);
+   if ($1550) {
+    $1551 = $1;
+    $1552 = ((($1551)) + 4|0);
+    $1553 = HEAP32[$1552>>2]|0;
+    $1554 = ($1553|0)!=(0|0);
+    if ($1554) {
+     $1555 = $0;
+     $1556 = $1;
+     $1557 = ((($1556)) + 4|0);
+     $1558 = HEAP32[$1557>>2]|0;
+     _codegen($1555,$1558,1);
+     $1559 = $0;
+     $1560 = ((($1559)) + 172|0);
+     $1561 = HEAP32[$1560>>2]|0;
+     $1562 = (($1561) + -1)|0;
+     HEAP32[$1560>>2] = $1562;
+    } else {
+     label = 190;
+    }
+   } else {
+    label = 190;
+   }
+   if ((label|0) == 190) {
+    $1563 = $0;
+    $1564 = $0;
+    $1565 = ((($1564)) + 172|0);
+    $1566 = HEAP32[$1565>>2]|0;
+    $1567 = $1566 & 511;
+    $1568 = $1567 << 23;
+    $1569 = 5 | $1568;
+    (_genop($1563,$1569)|0);
+    $1570 = $0;
+    _push_($1570);
+    $1571 = $0;
+    $1572 = ((($1571)) + 172|0);
+    $1573 = HEAP32[$1572>>2]|0;
+    $1574 = (($1573) + -1)|0;
+    HEAP32[$1572>>2] = $1574;
+   }
+   $1575 = $n20;
+   $1576 = (($1575) + 1)|0;
+   $1577 = $0;
+   $1578 = ((($1577)) + 172|0);
+   $1579 = HEAP32[$1578>>2]|0;
+   $1580 = (($1579) - ($1576))|0;
+   HEAP32[$1578>>2] = $1580;
+   $1581 = $sendv;
+   $1582 = ($1581|0)!=(0);
+   if ($1582) {
+    $n20 = 127;
+   }
+   $1583 = $0;
+   $1584 = $0;
+   $1585 = ((($1584)) + 172|0);
+   $1586 = HEAP32[$1585>>2]|0;
+   $1587 = $1586 & 511;
+   $1588 = $1587 << 23;
+   $1589 = 36 | $1588;
+   $1590 = $n20;
+   $1591 = $1590 & 127;
+   $1592 = $1591 << 7;
+   $1593 = $1589 | $1592;
+   (_genop($1583,$1593)|0);
+   $1594 = $2;
+   $1595 = ($1594|0)!=(0);
+   if (!($1595)) {
+    STACKTOP = sp;return;
+   }
+   $1596 = $0;
+   _push_($1596);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 33:  {
+   $1597 = $0;
+   $s2 = $1597;
+   $lv = 0;
+   $ainfo = 0;
+   $1598 = $0;
+   _push_($1598);
+   while(1) {
+    $1599 = $s2;
+    $1600 = ((($1599)) + 184|0);
+    $1601 = HEAP16[$1600>>1]|0;
+    $1602 = ($1601&65535) >>> 15;
+    $1603 = $1602&255;
+    $1604 = ($1603<<24>>24)!=(0);
+    $1605 = $1604 ^ 1;
+    if (!($1605)) {
+     break;
+    }
+    $1606 = $lv;
+    $1607 = (($1606) + 1)|0;
+    $lv = $1607;
+    $1608 = $s2;
+    $1609 = ((($1608)) + 164|0);
+    $1610 = HEAP32[$1609>>2]|0;
+    $s2 = $1610;
+    $1611 = $s2;
+    $1612 = ($1611|0)!=(0|0);
+    if (!($1612)) {
+     break;
+    }
+   }
+   $1613 = $s2;
+   $1614 = ($1613|0)!=(0|0);
+   if ($1614) {
+    $1615 = $s2;
+    $1616 = ((($1615)) + 184|0);
+    $1617 = HEAP16[$1616>>1]|0;
+    $1618 = ($1617 << 1)&65535;
+    $1619 = ($1618<<16>>16) >> 1;
+    $1620 = $1619 << 16 >> 16;
+    $ainfo = $1620;
+   }
+   $1621 = $0;
+   $1622 = $0;
+   $1623 = ((($1622)) + 172|0);
+   $1624 = HEAP32[$1623>>2]|0;
+   $1625 = $1624 & 511;
+   $1626 = $1625 << 23;
+   $1627 = 37 | $1626;
+   $1628 = $ainfo;
+   $1629 = $1628 << 4;
+   $1630 = $lv;
+   $1631 = $1630 & 15;
+   $1632 = $1629 | $1631;
+   $1633 = $1632 & 65535;
+   $1634 = $1633 << 7;
+   $1635 = $1627 | $1634;
+   (_genop($1621,$1635)|0);
+   $1636 = $0;
+   _push_($1636);
+   $1637 = $0;
+   _push_($1637);
+   $1638 = $0;
+   $1639 = ((($1638)) + 172|0);
+   $1640 = HEAP32[$1639>>2]|0;
+   $1641 = (($1640) + -1)|0;
+   HEAP32[$1639>>2] = $1641;
+   $1642 = $1;
+   $1643 = ($1642|0)!=(0|0);
+   if ($1643) {
+    $1644 = $1;
+    $1645 = ((($1644)) + 4|0);
+    $1646 = HEAP32[$1645>>2]|0;
+    $1647 = ($1646|0)!=(0|0);
+    if ($1647) {
+     $1648 = $0;
+     $1649 = $1;
+     $1650 = ((($1649)) + 4|0);
+     $1651 = HEAP32[$1650>>2]|0;
+     _codegen($1648,$1651,1);
+     $1652 = $0;
+     $1653 = ((($1652)) + 172|0);
+     $1654 = HEAP32[$1653>>2]|0;
+     $1655 = (($1654) + -1)|0;
+     HEAP32[$1653>>2] = $1655;
+    }
+   }
+   $1656 = $0;
+   $1657 = ((($1656)) + 172|0);
+   $1658 = HEAP32[$1657>>2]|0;
+   $1659 = (($1658) + -1)|0;
+   HEAP32[$1657>>2] = $1659;
+   $1660 = $0;
+   $1661 = ((($1660)) + 172|0);
+   $1662 = HEAP32[$1661>>2]|0;
+   $1663 = (($1662) + -1)|0;
+   HEAP32[$1661>>2] = $1663;
+   $1664 = $0;
+   $1665 = $0;
+   $1666 = ((($1665)) + 172|0);
+   $1667 = HEAP32[$1666>>2]|0;
+   $1668 = $1667 & 511;
+   $1669 = $1668 << 23;
+   $1670 = 36 | $1669;
+   $1671 = $1670 | 16256;
+   (_genop($1664,$1671)|0);
+   $1672 = $2;
+   $1673 = ($1672|0)!=(0);
+   if (!($1673)) {
+    STACKTOP = sp;return;
+   }
+   $1674 = $0;
+   _push_($1674);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 37:  {
+   $1675 = $1;
+   $1676 = ($1675|0)!=(0|0);
+   $1677 = $0;
+   if ($1676) {
+    $1678 = $1;
+    _codegen($1677,$1678,1);
+    $1679 = $0;
+    $1680 = ((($1679)) + 172|0);
+    $1681 = HEAP32[$1680>>2]|0;
+    $1682 = (($1681) + -1)|0;
+    HEAP32[$1680>>2] = $1682;
+   } else {
+    $1683 = $0;
+    $1684 = ((($1683)) + 172|0);
+    $1685 = HEAP32[$1684>>2]|0;
+    $1686 = $1685 & 511;
+    $1687 = $1686 << 23;
+    $1688 = 5 | $1687;
+    (_genop($1677,$1688)|0);
+   }
+   $1689 = $0;
+   $1690 = ((($1689)) + 188|0);
+   $1691 = HEAP32[$1690>>2]|0;
+   $1692 = ($1691|0)!=(0|0);
+   $1693 = $0;
+   $1694 = $0;
+   $1695 = ((($1694)) + 172|0);
+   $1696 = HEAP32[$1695>>2]|0;
+   $1697 = $1696 & 511;
+   $1698 = $1697 << 23;
+   $1699 = 41 | $1698;
+   if ($1692) {
+    $1700 = $1699 | 32768;
+    (_genop($1693,$1700)|0);
+   } else {
+    (_genop_peep($1693,$1699,0)|0);
+   }
+   $1701 = $2;
+   $1702 = ($1701|0)!=(0);
+   if (!($1702)) {
+    STACKTOP = sp;return;
+   }
+   $1703 = $0;
+   _push_($1703);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 38:  {
+   $1704 = $0;
+   $s221 = $1704;
+   $lv22 = 0;
+   $ainfo23 = 0;
+   $n24 = 0;
+   $sendv25 = 0;
+   while(1) {
+    $1705 = $s221;
+    $1706 = ((($1705)) + 184|0);
+    $1707 = HEAP16[$1706>>1]|0;
+    $1708 = ($1707&65535) >>> 15;
+    $1709 = $1708&255;
+    $1710 = ($1709<<24>>24)!=(0);
+    $1711 = $1710 ^ 1;
+    if (!($1711)) {
+     break;
+    }
+    $1712 = $lv22;
+    $1713 = (($1712) + 1)|0;
+    $lv22 = $1713;
+    $1714 = $s221;
+    $1715 = ((($1714)) + 164|0);
+    $1716 = HEAP32[$1715>>2]|0;
+    $s221 = $1716;
+    $1717 = $s221;
+    $1718 = ($1717|0)!=(0|0);
+    if (!($1718)) {
+     break;
+    }
+   }
+   $1719 = $s221;
+   $1720 = ($1719|0)!=(0|0);
+   if ($1720) {
+    $1721 = $s221;
+    $1722 = ((($1721)) + 184|0);
+    $1723 = HEAP16[$1722>>1]|0;
+    $1724 = ($1723 << 1)&65535;
+    $1725 = ($1724<<16>>16) >> 1;
+    $1726 = $1725 << 16 >> 16;
+    $ainfo23 = $1726;
+   }
+   $1727 = $0;
+   $1728 = $0;
+   $1729 = ((($1728)) + 172|0);
+   $1730 = HEAP32[$1729>>2]|0;
+   $1731 = $1730 & 511;
+   $1732 = $1731 << 23;
+   $1733 = 43 | $1732;
+   $1734 = $ainfo23;
+   $1735 = $1734 << 4;
+   $1736 = $lv22;
+   $1737 = $1736 & 15;
+   $1738 = $1735 | $1737;
+   $1739 = $1738 & 65535;
+   $1740 = $1739 << 7;
+   $1741 = $1733 | $1740;
+   (_genop($1727,$1741)|0);
+   $1742 = $0;
+   _push_($1742);
+   $1743 = $1;
+   $1744 = ($1743|0)!=(0|0);
+   if ($1744) {
+    $1745 = $0;
+    $1746 = $1;
+    $1747 = (_gen_values($1745,$1746,1)|0);
+    $n24 = $1747;
+    $1748 = $n24;
+    $1749 = ($1748|0)<(0);
+    if ($1749) {
+     $sendv25 = 1;
+     $n24 = 1;
+     $1750 = $0;
+     _push_($1750);
+    }
+   }
+   $1751 = $n24;
+   $1752 = (($1751) + 1)|0;
+   $1753 = $0;
+   $1754 = ((($1753)) + 172|0);
+   $1755 = HEAP32[$1754>>2]|0;
+   $1756 = (($1755) - ($1752))|0;
+   HEAP32[$1754>>2] = $1756;
+   $1757 = $sendv25;
+   $1758 = ($1757|0)!=(0);
+   if ($1758) {
+    $n24 = 127;
+   }
+   $1759 = $0;
+   $1760 = $0;
+   $1761 = ((($1760)) + 172|0);
+   $1762 = HEAP32[$1761>>2]|0;
+   $1763 = $1762 & 511;
+   $1764 = $1763 << 23;
+   $1765 = 32 | $1764;
+   $1766 = $0;
+   $1767 = $0;
+   $1768 = HEAP32[$1767>>2]|0;
+   $1769 = (_mrb_intern_static($1768,69512,4)|0);
+   $1770 = (_new_msym($1766,$1769)|0);
+   $1771 = $1770 & 511;
+   $1772 = $1771 << 14;
+   $1773 = $1765 | $1772;
+   $1774 = $n24;
+   $1775 = $1774 & 127;
+   $1776 = $1775 << 7;
+   $1777 = $1773 | $1776;
+   (_genop($1759,$1777)|0);
+   $1778 = $2;
+   $1779 = ($1778|0)!=(0);
+   if (!($1779)) {
+    STACKTOP = sp;return;
+   }
+   $1780 = $0;
+   _push_($1780);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 13:  {
+   $1781 = $0;
+   $1782 = $1;
+   _loop_break($1781,$1782);
+   $1783 = $2;
+   $1784 = ($1783|0)!=(0);
+   if (!($1784)) {
+    STACKTOP = sp;return;
+   }
+   $1785 = $0;
+   _push_($1785);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 14:  {
+   $1786 = $0;
+   $1787 = ((($1786)) + 188|0);
+   $1788 = HEAP32[$1787>>2]|0;
+   $1789 = ($1788|0)!=(0|0);
+   $1790 = $0;
+   do {
+    if ($1789) {
+     $1791 = ((($1790)) + 188|0);
+     $1792 = HEAP32[$1791>>2]|0;
+     $1793 = HEAP32[$1792>>2]|0;
+     $1794 = ($1793|0)==(0);
+     if ($1794) {
+      $1795 = $0;
+      $1796 = ((($1795)) + 192|0);
+      $1797 = HEAP32[$1796>>2]|0;
+      $1798 = $0;
+      $1799 = ((($1798)) + 188|0);
+      $1800 = HEAP32[$1799>>2]|0;
+      $1801 = ((($1800)) + 20|0);
+      $1802 = HEAP32[$1801>>2]|0;
+      $1803 = ($1797|0)>($1802|0);
+      if ($1803) {
+       $1804 = $0;
+       $1805 = $0;
+       $1806 = ((($1805)) + 192|0);
+       $1807 = HEAP32[$1806>>2]|0;
+       $1808 = $0;
+       $1809 = ((($1808)) + 188|0);
+       $1810 = HEAP32[$1809>>2]|0;
+       $1811 = ((($1810)) + 20|0);
+       $1812 = HEAP32[$1811>>2]|0;
+       $1813 = (($1807) - ($1812))|0;
+       $1814 = $1813 & 511;
+       $1815 = $1814 << 23;
+       $1816 = 31 | $1815;
+       (_genop_peep($1804,$1816,0)|0);
+      }
+      $1817 = $0;
+      $1818 = $1;
+      _codegen($1817,$1818,0);
+      $1819 = $0;
+      $1820 = $0;
+      $1821 = ((($1820)) + 188|0);
+      $1822 = HEAP32[$1821>>2]|0;
+      $1823 = ((($1822)) + 4|0);
+      $1824 = HEAP32[$1823>>2]|0;
+      $1825 = $0;
+      $1826 = ((($1825)) + 176|0);
+      $1827 = HEAP32[$1826>>2]|0;
+      $1828 = (($1824) - ($1827))|0;
+      $1829 = (($1828) + 32767)|0;
+      $1830 = $1829 & 65535;
+      $1831 = $1830 << 7;
+      $1832 = 23 | $1831;
+      (_genop($1819,$1832)|0);
+      break;
+     }
+     $1833 = $1;
+     $1834 = ($1833|0)!=(0|0);
+     $1835 = $0;
+     if ($1834) {
+      $1836 = $1;
+      _codegen($1835,$1836,1);
+      $1837 = $0;
+      $1838 = ((($1837)) + 172|0);
+      $1839 = HEAP32[$1838>>2]|0;
+      $1840 = (($1839) + -1)|0;
+      HEAP32[$1838>>2] = $1840;
+     } else {
+      $1841 = $0;
+      $1842 = ((($1841)) + 172|0);
+      $1843 = HEAP32[$1842>>2]|0;
+      $1844 = $1843 & 511;
+      $1845 = $1844 << 23;
+      $1846 = 5 | $1845;
+      (_genop($1835,$1846)|0);
+     }
+     $1847 = $0;
+     $1848 = $0;
+     $1849 = ((($1848)) + 172|0);
+     $1850 = HEAP32[$1849>>2]|0;
+     $1851 = $1850 & 511;
+     $1852 = $1851 << 23;
+     $1853 = 41 | $1852;
+     (_genop_peep($1847,$1853,0)|0);
+    } else {
+     _raise_error($1790,69534);
+    }
+   } while(0);
+   $1854 = $2;
+   $1855 = ($1854|0)!=(0);
+   if (!($1855)) {
+    STACKTOP = sp;return;
+   }
+   $1856 = $0;
+   _push_($1856);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 15:  {
+   $1857 = $0;
+   $1858 = ((($1857)) + 188|0);
+   $1859 = HEAP32[$1858>>2]|0;
+   $1860 = ($1859|0)!=(0|0);
+   $1861 = $0;
+   if (!($1860)) {
+    _raise_error($1861,69550);
+    STACKTOP = sp;return;
+   }
+   $1862 = ((($1861)) + 192|0);
+   $1863 = HEAP32[$1862>>2]|0;
+   $1864 = $0;
+   $1865 = ((($1864)) + 188|0);
+   $1866 = HEAP32[$1865>>2]|0;
+   $1867 = ((($1866)) + 20|0);
+   $1868 = HEAP32[$1867>>2]|0;
+   $1869 = ($1863|0)>($1868|0);
+   if ($1869) {
+    $1870 = $0;
+    $1871 = $0;
+    $1872 = ((($1871)) + 192|0);
+    $1873 = HEAP32[$1872>>2]|0;
+    $1874 = $0;
+    $1875 = ((($1874)) + 188|0);
+    $1876 = HEAP32[$1875>>2]|0;
+    $1877 = ((($1876)) + 20|0);
+    $1878 = HEAP32[$1877>>2]|0;
+    $1879 = (($1873) - ($1878))|0;
+    $1880 = $1879 & 511;
+    $1881 = $1880 << 23;
+    $1882 = 31 | $1881;
+    (_genop_peep($1870,$1882,0)|0);
+   }
+   $1883 = $0;
+   $1884 = $0;
+   $1885 = ((($1884)) + 188|0);
+   $1886 = HEAP32[$1885>>2]|0;
+   $1887 = ((($1886)) + 8|0);
+   $1888 = HEAP32[$1887>>2]|0;
+   $1889 = $0;
+   $1890 = ((($1889)) + 176|0);
+   $1891 = HEAP32[$1890>>2]|0;
+   $1892 = (($1888) - ($1891))|0;
+   $1893 = (($1892) + 32767)|0;
+   $1894 = $1893 & 65535;
+   $1895 = $1894 << 7;
+   $1896 = 23 | $1895;
+   (_genop($1883,$1896)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 16:  {
+   $msg = 69566;
+   $1897 = $0;
+   $1898 = ((($1897)) + 188|0);
+   $1899 = HEAP32[$1898>>2]|0;
+   $1900 = ($1899|0)!=(0|0);
+   $1901 = $0;
+   if (!($1900)) {
+    $1902 = $msg;
+    _raise_error($1901,$1902);
+    STACKTOP = sp;return;
+   }
+   $1903 = ((($1901)) + 188|0);
+   $1904 = HEAP32[$1903>>2]|0;
+   $lp26 = $1904;
+   $n27 = 0;
+   while(1) {
+    $1905 = $lp26;
+    $1906 = ($1905|0)!=(0|0);
+    if ($1906) {
+     $1907 = $lp26;
+     $1908 = HEAP32[$1907>>2]|0;
+     $1909 = ($1908|0)!=(4);
+     $3514 = $1909;
+    } else {
+     $3514 = 0;
+    }
+    $1910 = $lp26;
+    if (!($3514)) {
+     break;
+    }
+    $1911 = HEAP32[$1910>>2]|0;
+    $1912 = ($1911|0)==(3);
+    if ($1912) {
+     $1913 = $n27;
+     $1914 = (($1913) + 1)|0;
+     $n27 = $1914;
+    }
+    $1915 = $lp26;
+    $1916 = ((($1915)) + 24|0);
+    $1917 = HEAP32[$1916>>2]|0;
+    $lp26 = $1917;
+   }
+   $1918 = ($1910|0)!=(0|0);
+   if (!($1918)) {
+    $1919 = $0;
+    $1920 = $msg;
+    _raise_error($1919,$1920);
+    STACKTOP = sp;return;
+   }
+   $1921 = $n27;
+   $1922 = ($1921|0)>(0);
+   L416: do {
+    if ($1922) {
+     while(1) {
+      $1923 = $n27;
+      $1924 = (($1923) + -1)|0;
+      $n27 = $1924;
+      $1925 = ($1923|0)!=(0);
+      if (!($1925)) {
+       break L416;
+      }
+      $1926 = $0;
+      (_genop_peep($1926,8388636,0)|0);
+     }
+    }
+   } while(0);
+   $1927 = $0;
+   $1928 = ((($1927)) + 192|0);
+   $1929 = HEAP32[$1928>>2]|0;
+   $1930 = $lp26;
+   $1931 = ((($1930)) + 20|0);
+   $1932 = HEAP32[$1931>>2]|0;
+   $1933 = ($1929|0)>($1932|0);
+   if ($1933) {
+    $1934 = $0;
+    $1935 = $0;
+    $1936 = ((($1935)) + 192|0);
+    $1937 = HEAP32[$1936>>2]|0;
+    $1938 = $lp26;
+    $1939 = ((($1938)) + 20|0);
+    $1940 = HEAP32[$1939>>2]|0;
+    $1941 = (($1937) - ($1940))|0;
+    $1942 = $1941 & 511;
+    $1943 = $1942 << 23;
+    $1944 = 31 | $1943;
+    (_genop_peep($1934,$1944,0)|0);
+   }
+   $1945 = $0;
+   $1946 = $lp26;
+   $1947 = ((($1946)) + 4|0);
+   $1948 = HEAP32[$1947>>2]|0;
+   $1949 = $0;
+   $1950 = ((($1949)) + 176|0);
+   $1951 = HEAP32[$1950>>2]|0;
+   $1952 = (($1948) - ($1951))|0;
+   $1953 = (($1952) + 32767)|0;
+   $1954 = $1953 & 65535;
+   $1955 = $1954 << 7;
+   $1956 = 23 | $1955;
+   (_genop($1945,$1956)|0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 39:  {
+   $1957 = $2;
+   $1958 = ($1957|0)!=(0);
+   if (!($1958)) {
+    STACKTOP = sp;return;
+   }
+   $1959 = $0;
+   $1960 = $1;
+   $1961 = $1960;
+   $1962 = (_lv_idx($1959,$1961)|0);
+   $idx28 = $1962;
+   $1963 = $idx28;
+   $1964 = ($1963|0)>(0);
+   L429: do {
+    if ($1964) {
+     $1965 = $0;
+     $1966 = $0;
+     $1967 = ((($1966)) + 172|0);
+     $1968 = HEAP32[$1967>>2]|0;
+     $1969 = $1968 & 511;
+     $1970 = $1969 << 23;
+     $1971 = 1 | $1970;
+     $1972 = $idx28;
+     $1973 = $1972 & 511;
+     $1974 = $1973 << 14;
+     $1975 = $1971 | $1974;
+     (_genop_peep($1965,$1975,0)|0);
+    } else {
+     $lv29 = 0;
+     $1976 = $0;
+     $1977 = ((($1976)) + 164|0);
+     $1978 = HEAP32[$1977>>2]|0;
+     $up = $1978;
+     while(1) {
+      $1979 = $up;
+      $1980 = ($1979|0)!=(0|0);
+      if (!($1980)) {
+       break L429;
+      }
+      $1981 = $up;
+      $1982 = $1;
+      $1983 = $1982;
+      $1984 = (_lv_idx($1981,$1983)|0);
+      $idx28 = $1984;
+      $1985 = $idx28;
+      $1986 = ($1985|0)>(0);
+      if ($1986) {
+       break;
+      }
+      $2002 = $lv29;
+      $2003 = (($2002) + 1)|0;
+      $lv29 = $2003;
+      $2004 = $up;
+      $2005 = ((($2004)) + 164|0);
+      $2006 = HEAP32[$2005>>2]|0;
+      $up = $2006;
+     }
+     $1987 = $0;
+     $1988 = $0;
+     $1989 = ((($1988)) + 172|0);
+     $1990 = HEAP32[$1989>>2]|0;
+     $1991 = $1990 & 511;
+     $1992 = $1991 << 23;
+     $1993 = 21 | $1992;
+     $1994 = $idx28;
+     $1995 = $1994 & 511;
+     $1996 = $1995 << 14;
+     $1997 = $1993 | $1996;
+     $1998 = $lv29;
+     $1999 = $1998 & 127;
+     $2000 = $1999 << 7;
+     $2001 = $1997 | $2000;
+     (_genop($1987,$2001)|0);
+    }
+   } while(0);
+   $2007 = $0;
+   _push_($2007);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 41:  {
+   $2008 = $2;
+   $2009 = ($2008|0)!=(0);
+   if (!($2009)) {
+    STACKTOP = sp;return;
+   }
+   $2010 = $0;
+   $2011 = $1;
+   $2012 = $2011;
+   $2013 = (_new_sym_1188($2010,$2012)|0);
+   $sym30 = $2013;
+   $2014 = $0;
+   $2015 = $0;
+   $2016 = ((($2015)) + 172|0);
+   $2017 = HEAP32[$2016>>2]|0;
+   $2018 = $2017 & 511;
+   $2019 = $2018 << 23;
+   $2020 = 9 | $2019;
+   $2021 = $sym30;
+   $2022 = $2021 & 65535;
+   $2023 = $2022 << 7;
+   $2024 = $2020 | $2023;
+   (_genop($2014,$2024)|0);
+   $2025 = $0;
+   _push_($2025);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 42:  {
+   $2026 = $2;
+   $2027 = ($2026|0)!=(0);
+   if (!($2027)) {
+    STACKTOP = sp;return;
+   }
+   $2028 = $0;
+   $2029 = $1;
+   $2030 = $2029;
+   $2031 = (_new_sym_1188($2028,$2030)|0);
+   $sym31 = $2031;
+   $2032 = $0;
+   $2033 = $0;
+   $2034 = ((($2033)) + 172|0);
+   $2035 = HEAP32[$2034>>2]|0;
+   $2036 = $2035 & 511;
+   $2037 = $2036 << 23;
+   $2038 = 13 | $2037;
+   $2039 = $sym31;
+   $2040 = $2039 & 65535;
+   $2041 = $2040 << 7;
+   $2042 = $2038 | $2041;
+   (_genop($2032,$2042)|0);
+   $2043 = $0;
+   _push_($2043);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 44:  {
+   $2044 = $2;
+   $2045 = ($2044|0)!=(0);
+   if (!($2045)) {
+    STACKTOP = sp;return;
+   }
+   $2046 = $0;
+   $2047 = $1;
+   $2048 = $2047;
+   $2049 = (_new_sym_1188($2046,$2048)|0);
+   $sym32 = $2049;
+   $2050 = $0;
+   $2051 = $0;
+   $2052 = ((($2051)) + 172|0);
+   $2053 = HEAP32[$2052>>2]|0;
+   $2054 = $2053 & 511;
+   $2055 = $2054 << 23;
+   $2056 = 15 | $2055;
+   $2057 = $sym32;
+   $2058 = $2057 & 65535;
+   $2059 = $2058 << 7;
+   $2060 = $2056 | $2059;
+   (_genop($2050,$2060)|0);
+   $2061 = $0;
+   _push_($2061);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 43:  {
+   $2062 = $0;
+   $2063 = $1;
+   $2064 = $2063;
+   $2065 = (_new_sym_1188($2062,$2064)|0);
+   $sym33 = $2065;
+   $2066 = $0;
+   $2067 = $0;
+   $2068 = ((($2067)) + 172|0);
+   $2069 = HEAP32[$2068>>2]|0;
+   $2070 = $2069 & 511;
+   $2071 = $2070 << 23;
+   $2072 = 17 | $2071;
+   $2073 = $sym33;
+   $2074 = $2073 & 65535;
+   $2075 = $2074 << 7;
+   $2076 = $2072 | $2075;
+   (_genop($2066,$2076)|0);
+   $2077 = $2;
+   $2078 = ($2077|0)!=(0);
+   if (!($2078)) {
+    STACKTOP = sp;return;
+   }
+   $2079 = $0;
+   _push_($2079);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 89:  {
+   $2080 = $0;
+   $2081 = $1;
+   _codegen($2080,$2081,1);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 46:  {
+   $2082 = $2;
+   $2083 = ($2082|0)!=(0);
+   if (!($2083)) {
+    STACKTOP = sp;return;
+   }
+   ;HEAP8[$buf>>0]=HEAP8[69583>>0]|0;HEAP8[$buf+1>>0]=HEAP8[69583+1>>0]|0;
+   $2084 = $1;
+   $2085 = $2084;
+   $2086 = $2085&255;
+   $2087 = ((($buf)) + 1|0);
+   HEAP8[$2087>>0] = $2086;
+   $2088 = $0;
+   $2089 = HEAP32[$2088>>2]|0;
+   _mrb_str_new($3,$2089,$buf,2);
+   ;HEAP32[$str>>2]=HEAP32[$3>>2]|0;HEAP32[$str+4>>2]=HEAP32[$3+4>>2]|0;
+   $2090 = $0;
+   $2091 = $0;
+   $2092 = HEAP32[$2091>>2]|0;
+   ;HEAP32[$str$byval_copy>>2]=HEAP32[$str>>2]|0;HEAP32[$str$byval_copy+4>>2]=HEAP32[$str+4>>2]|0;
+   $2093 = (_mrb_intern_str($2092,$str$byval_copy)|0);
+   $2094 = (_new_sym_1188($2090,$2093)|0);
+   $sym34 = $2094;
+   $2095 = $0;
+   $2096 = $0;
+   $2097 = ((($2096)) + 172|0);
+   $2098 = HEAP32[$2097>>2]|0;
+   $2099 = $2098 & 511;
+   $2100 = $2099 << 23;
+   $2101 = 9 | $2100;
+   $2102 = $sym34;
+   $2103 = $2102 & 65535;
+   $2104 = $2103 << 7;
+   $2105 = $2101 | $2104;
+   (_genop($2095,$2105)|0);
+   $2106 = $0;
+   _push_($2106);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 45:  {
+   $2107 = $2;
+   $2108 = ($2107|0)!=(0);
+   if (!($2108)) {
+    STACKTOP = sp;return;
+   }
+   $2109 = $0;
+   $2110 = HEAP32[$2109>>2]|0;
+   $mrb = $2110;
+   $2111 = $1;
+   $2112 = $2111;
+   _mrb_fixnum_value_1199($fix,$2112);
+   $2113 = $mrb;
+   _mrb_str_buf_new($str36,$2113,4);
+   $2114 = $mrb;
+   ;HEAP32[$str36$byval_copy>>2]=HEAP32[$str36>>2]|0;HEAP32[$str36$byval_copy+4>>2]=HEAP32[$str36+4>>2]|0;
+   _mrb_str_cat($4,$2114,$str36$byval_copy,69583,1);
+   $2115 = $mrb;
+   $2116 = $mrb;
+   ;HEAP32[$fix$byval_copy>>2]=HEAP32[$fix>>2]|0;HEAP32[$fix$byval_copy+4>>2]=HEAP32[$fix+4>>2]|0;
+   _mrb_fixnum_to_str($5,$2116,$fix$byval_copy,10);
+   ;HEAP32[$str36$byval_copy10>>2]=HEAP32[$str36>>2]|0;HEAP32[$str36$byval_copy10+4>>2]=HEAP32[$str36+4>>2]|0;
+   ;HEAP32[$$byval_copy>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$5+4>>2]|0;
+   _mrb_str_cat_str($6,$2115,$str36$byval_copy10,$$byval_copy);
+   $2117 = $0;
+   $2118 = $mrb;
+   ;HEAP32[$str36$byval_copy11>>2]=HEAP32[$str36>>2]|0;HEAP32[$str36$byval_copy11+4>>2]=HEAP32[$str36+4>>2]|0;
+   $2119 = (_mrb_intern_str($2118,$str36$byval_copy11)|0);
+   $2120 = (_new_sym_1188($2117,$2119)|0);
+   $sym35 = $2120;
+   $2121 = $0;
+   $2122 = $0;
+   $2123 = ((($2122)) + 172|0);
+   $2124 = HEAP32[$2123>>2]|0;
+   $2125 = $2124 & 511;
+   $2126 = $2125 << 23;
+   $2127 = 9 | $2126;
+   $2128 = $sym35;
+   $2129 = $2128 & 65535;
+   $2130 = $2129 << 7;
+   $2131 = $2127 | $2130;
+   (_genop($2121,$2131)|0);
+   $2132 = $0;
+   _push_($2132);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 91:  {
+   $3512 = $0;
+   $3513 = $1;
+   _codegen($3512,$3513,0);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 69:  {
+   $2133 = $0;
+   $2134 = $1;
+   _codegen($2133,$2134,1);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 50:  {
+   $2135 = $2;
+   $2136 = ($2135|0)!=(0);
+   if (!($2136)) {
+    STACKTOP = sp;return;
+   }
+   $2137 = $1;
+   $2138 = HEAP32[$2137>>2]|0;
+   $p37 = $2138;
+   $2139 = $1;
+   $2140 = ((($2139)) + 4|0);
+   $2141 = HEAP32[$2140>>2]|0;
+   $2142 = HEAP32[$2141>>2]|0;
+   $2143 = $2142;
+   $base = $2143;
+   $2144 = $0;
+   $2145 = $p37;
+   $2146 = $base;
+   $2147 = (_readint_mrb_int($2144,$2145,$2146,0,$overflow)|0);
+   $i = $2147;
+   $2148 = HEAP8[$overflow>>0]|0;
+   $2149 = ($2148<<24>>24)!=(0);
+   if ($2149) {
+    $2150 = $0;
+    $2151 = $p37;
+    $2152 = $base;
+    $2153 = (+_readint_float($2150,$2151,$2152));
+    $f = $2153;
+    $2154 = $0;
+    $2155 = $0;
+    $2156 = HEAP32[$2155>>2]|0;
+    $2157 = $f;
+    $2158 = $2157;
+    _mrb_float_value_1202($7,$2156,$2158);
+    ;HEAP32[$$byval_copy12>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy12+4>>2]=HEAP32[$7+4>>2]|0;
+    $2159 = (_new_lit($2154,$$byval_copy12)|0);
+    $off = $2159;
+    $2160 = $0;
+    $2161 = $0;
+    $2162 = ((($2161)) + 172|0);
+    $2163 = HEAP32[$2162>>2]|0;
+    $2164 = $2163 & 511;
+    $2165 = $2164 << 23;
+    $2166 = 2 | $2165;
+    $2167 = $off;
+    $2168 = $2167 & 65535;
+    $2169 = $2168 << 7;
+    $2170 = $2166 | $2169;
+    (_genop($2160,$2170)|0);
+   } else {
+    $2171 = $i;
+    $2172 = ($2171|0)<(32767);
+    $2173 = $i;
+    $2174 = ($2173|0)>(-32767);
+    $or$cond5 = $2172 & $2174;
+    $2175 = $0;
+    if ($or$cond5) {
+     $2176 = ((($2175)) + 172|0);
+     $2177 = HEAP32[$2176>>2]|0;
+     $2178 = $2177 & 511;
+     $2179 = $2178 << 23;
+     $2180 = 3 | $2179;
+     $2181 = $i;
+     $2182 = (($2181) + 32767)|0;
+     $2183 = $2182 & 65535;
+     $2184 = $2183 << 7;
+     $2185 = $2180 | $2184;
+     $co = $2185;
+    } else {
+     $2186 = $i;
+     _mrb_fixnum_value_1199($8,$2186);
+     ;HEAP32[$$byval_copy13>>2]=HEAP32[$8>>2]|0;HEAP32[$$byval_copy13+4>>2]=HEAP32[$8+4>>2]|0;
+     $2187 = (_new_lit($2175,$$byval_copy13)|0);
+     $off38 = $2187;
+     $2188 = $0;
+     $2189 = ((($2188)) + 172|0);
+     $2190 = HEAP32[$2189>>2]|0;
+     $2191 = $2190 & 511;
+     $2192 = $2191 << 23;
+     $2193 = 2 | $2192;
+     $2194 = $off38;
+     $2195 = $2194 & 65535;
+     $2196 = $2195 << 7;
+     $2197 = $2193 | $2196;
+     $co = $2197;
+    }
+    $2198 = $0;
+    $2199 = $co;
+    (_genop($2198,$2199)|0);
+   }
+   $2200 = $0;
+   _push_($2200);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 51:  {
+   $2201 = $2;
+   $2202 = ($2201|0)!=(0);
+   if (!($2202)) {
+    STACKTOP = sp;return;
+   }
+   $2203 = $1;
+   $p39 = $2203;
+   $2204 = $p39;
+   $2205 = (+_strtof($2204,0));
+   $f40 = $2205;
+   $2206 = $0;
+   $2207 = $0;
+   $2208 = HEAP32[$2207>>2]|0;
+   $2209 = $f40;
+   _mrb_float_value_1202($9,$2208,$2209);
+   ;HEAP32[$$byval_copy14>>2]=HEAP32[$9>>2]|0;HEAP32[$$byval_copy14+4>>2]=HEAP32[$9+4>>2]|0;
+   $2210 = (_new_lit($2206,$$byval_copy14)|0);
+   $off41 = $2210;
+   $2211 = $0;
+   $2212 = $0;
+   $2213 = ((($2212)) + 172|0);
+   $2214 = HEAP32[$2213>>2]|0;
+   $2215 = $2214 & 511;
+   $2216 = $2215 << 23;
+   $2217 = 2 | $2216;
+   $2218 = $off41;
+   $2219 = $2218 & 65535;
+   $2220 = $2219 << 7;
+   $2221 = $2217 | $2220;
+   (_genop($2211,$2221)|0);
+   $2222 = $0;
+   _push_($2222);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 52:  {
+   $2223 = $1;
+   $2224 = HEAP32[$2223>>2]|0;
+   $2225 = $2224;
+   $nt = $2225;
+   $2226 = $1;
+   $2227 = ((($2226)) + 4|0);
+   $2228 = HEAP32[$2227>>2]|0;
+   $1 = $2228;
+   $2229 = $nt;
+   switch ($2229|0) {
+   case 51:  {
+    $2230 = $1;
+    $p42 = $2230;
+    $2231 = $p42;
+    $2232 = (+_strtof($2231,0));
+    $f43 = $2232;
+    $2233 = $0;
+    $2234 = $0;
+    $2235 = HEAP32[$2234>>2]|0;
+    $2236 = $f43;
+    $2237 = -$2236;
+    _mrb_float_value_1202($10,$2235,$2237);
+    ;HEAP32[$$byval_copy15>>2]=HEAP32[$10>>2]|0;HEAP32[$$byval_copy15+4>>2]=HEAP32[$10+4>>2]|0;
+    $2238 = (_new_lit($2233,$$byval_copy15)|0);
+    $off44 = $2238;
+    $2239 = $0;
+    $2240 = $0;
+    $2241 = ((($2240)) + 172|0);
+    $2242 = HEAP32[$2241>>2]|0;
+    $2243 = $2242 & 511;
+    $2244 = $2243 << 23;
+    $2245 = 2 | $2244;
+    $2246 = $off44;
+    $2247 = $2246 & 65535;
+    $2248 = $2247 << 7;
+    $2249 = $2245 | $2248;
+    (_genop($2239,$2249)|0);
+    $2250 = $0;
+    _push_($2250);
+    STACKTOP = sp;return;
+    break;
+   }
+   case 50:  {
+    $2251 = $1;
+    $2252 = HEAP32[$2251>>2]|0;
+    $p45 = $2252;
+    $2253 = $1;
+    $2254 = ((($2253)) + 4|0);
+    $2255 = HEAP32[$2254>>2]|0;
+    $2256 = HEAP32[$2255>>2]|0;
+    $2257 = $2256;
+    $base46 = $2257;
+    $2258 = $0;
+    $2259 = $p45;
+    $2260 = $base46;
+    $2261 = (_readint_mrb_int($2258,$2259,$2260,1,$overflow49)|0);
+    $i47 = $2261;
+    $2262 = HEAP8[$overflow49>>0]|0;
+    $2263 = ($2262<<24>>24)!=(0);
+    if ($2263) {
+     $2264 = $0;
+     $2265 = $p45;
+     $2266 = $base46;
+     $2267 = (+_readint_float($2264,$2265,$2266));
+     $f50 = $2267;
+     $2268 = $0;
+     $2269 = $0;
+     $2270 = HEAP32[$2269>>2]|0;
+     $2271 = $f50;
+     $2272 = -$2271;
+     $2273 = $2272;
+     _mrb_float_value_1202($11,$2270,$2273);
+     ;HEAP32[$$byval_copy16>>2]=HEAP32[$11>>2]|0;HEAP32[$$byval_copy16+4>>2]=HEAP32[$11+4>>2]|0;
+     $2274 = (_new_lit($2268,$$byval_copy16)|0);
+     $off51 = $2274;
+     $2275 = $0;
+     $2276 = $0;
+     $2277 = ((($2276)) + 172|0);
+     $2278 = HEAP32[$2277>>2]|0;
+     $2279 = $2278 & 511;
+     $2280 = $2279 << 23;
+     $2281 = 2 | $2280;
+     $2282 = $off51;
+     $2283 = $2282 & 65535;
+     $2284 = $2283 << 7;
+     $2285 = $2281 | $2284;
+     (_genop($2275,$2285)|0);
+    } else {
+     $2286 = $i47;
+     $2287 = ($2286|0)<(32767);
+     $2288 = $i47;
+     $2289 = ($2288|0)>(-32767);
+     $or$cond7 = $2287 & $2289;
+     $2290 = $0;
+     if ($or$cond7) {
+      $2291 = ((($2290)) + 172|0);
+      $2292 = HEAP32[$2291>>2]|0;
+      $2293 = $2292 & 511;
+      $2294 = $2293 << 23;
+      $2295 = 3 | $2294;
+      $2296 = $i47;
+      $2297 = (($2296) + 32767)|0;
+      $2298 = $2297 & 65535;
+      $2299 = $2298 << 7;
+      $2300 = $2295 | $2299;
+      $co48 = $2300;
+     } else {
+      $2301 = $i47;
+      _mrb_fixnum_value_1199($12,$2301);
+      ;HEAP32[$$byval_copy17>>2]=HEAP32[$12>>2]|0;HEAP32[$$byval_copy17+4>>2]=HEAP32[$12+4>>2]|0;
+      $2302 = (_new_lit($2290,$$byval_copy17)|0);
+      $off52 = $2302;
+      $2303 = $0;
+      $2304 = ((($2303)) + 172|0);
+      $2305 = HEAP32[$2304>>2]|0;
+      $2306 = $2305 & 511;
+      $2307 = $2306 << 23;
+      $2308 = 2 | $2307;
+      $2309 = $off52;
+      $2310 = $2309 & 65535;
+      $2311 = $2310 << 7;
+      $2312 = $2308 | $2311;
+      $co48 = $2312;
+     }
+     $2313 = $0;
+     $2314 = $co48;
+     (_genop($2313,$2314)|0);
+    }
+    $2315 = $0;
+    _push_($2315);
+    STACKTOP = sp;return;
+    break;
+   }
+   default: {
+    $2316 = $0;
+    $2317 = $0;
+    $2318 = HEAP32[$2317>>2]|0;
+    $2319 = (_mrb_intern_static($2318,69609,1)|0);
+    $2320 = (_new_msym($2316,$2319)|0);
+    $sym53 = $2320;
+    $2321 = $0;
+    $2322 = $0;
+    $2323 = ((($2322)) + 172|0);
+    $2324 = HEAP32[$2323>>2]|0;
+    $2325 = $2324 & 511;
+    $2326 = $2325 << 23;
+    $2327 = 3 | $2326;
+    (_genop($2321,$2327)|0);
+    $2328 = $0;
+    _push_($2328);
+    $2329 = $0;
+    $2330 = $1;
+    _codegen($2329,$2330,1);
+    $2331 = $0;
+    $2332 = ((($2331)) + 172|0);
+    $2333 = HEAP32[$2332>>2]|0;
+    $2334 = (($2333) + -1)|0;
+    HEAP32[$2332>>2] = $2334;
+    $2335 = $0;
+    $2336 = ((($2335)) + 172|0);
+    $2337 = HEAP32[$2336>>2]|0;
+    $2338 = (($2337) + -1)|0;
+    HEAP32[$2336>>2] = $2338;
+    $2339 = $0;
+    $2340 = $0;
+    $2341 = ((($2340)) + 172|0);
+    $2342 = HEAP32[$2341>>2]|0;
+    $2343 = $2342 & 511;
+    $2344 = $2343 << 23;
+    $2345 = 46 | $2344;
+    $2346 = $sym53;
+    $2347 = $2346 & 511;
+    $2348 = $2347 << 14;
+    $2349 = $2345 | $2348;
+    $2350 = $2349 | 256;
+    (_genop($2339,$2350)|0);
+    STACKTOP = sp;return;
+   }
+   }
+   break;
+  }
+  case 55:  {
+   $2351 = $2;
+   $2352 = ($2351|0)!=(0);
+   if (!($2352)) {
+    STACKTOP = sp;return;
+   }
+   $2353 = $1;
+   $2354 = HEAP32[$2353>>2]|0;
+   $p54 = $2354;
+   $2355 = $1;
+   $2356 = ((($2355)) + 4|0);
+   $2357 = HEAP32[$2356>>2]|0;
+   $2358 = $2357;
+   $len55 = $2358;
+   $2359 = $0;
+   $2360 = HEAP32[$2359>>2]|0;
+   $2361 = (_mrb_gc_arena_save($2360)|0);
+   $ai = $2361;
+   $2362 = $0;
+   $2363 = $0;
+   $2364 = HEAP32[$2363>>2]|0;
+   $2365 = $p54;
+   $2366 = $len55;
+   _mrb_str_new($13,$2364,$2365,$2366);
+   ;HEAP32[$$byval_copy18>>2]=HEAP32[$13>>2]|0;HEAP32[$$byval_copy18+4>>2]=HEAP32[$13+4>>2]|0;
+   $2367 = (_new_lit($2362,$$byval_copy18)|0);
+   $off56 = $2367;
+   $2368 = $0;
+   $2369 = HEAP32[$2368>>2]|0;
+   $2370 = $ai;
+   _mrb_gc_arena_restore($2369,$2370);
+   $2371 = $0;
+   $2372 = $0;
+   $2373 = ((($2372)) + 172|0);
+   $2374 = HEAP32[$2373>>2]|0;
+   $2375 = $2374 & 511;
+   $2376 = $2375 << 23;
+   $2377 = 61 | $2376;
+   $2378 = $off56;
+   $2379 = $2378 & 65535;
+   $2380 = $2379 << 7;
+   $2381 = $2377 | $2380;
+   (_genop($2371,$2381)|0);
+   $2382 = $0;
+   _push_($2382);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 99:  {
+   $2383 = $1;
+   $2384 = ((($2383)) + 16|0);
+   $2385 = HEAP32[$2384>>2]|0;
+   $1 = $2385;
+   break;
+  }
+  case 56:  {
+   break;
+  }
+  case 101:  {
+   $2441 = $0;
+   $2442 = $1;
+   $2443 = $2;
+   _gen_literal_array($2441,$2442,0,$2443);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 102:  {
+   $2444 = $0;
+   $2445 = $1;
+   $2446 = $2;
+   _gen_literal_array($2444,$2445,1,$2446);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 58:  {
+   $2447 = $0;
+   $2448 = HEAP32[$2447>>2]|0;
+   $2449 = (_mrb_gc_arena_save($2448)|0);
+   $ai60 = $2449;
+   $2450 = $0;
+   $2451 = $0;
+   $2452 = HEAP32[$2451>>2]|0;
+   $2453 = (_mrb_intern_static($2452,69618,6)|0);
+   $2454 = (_new_sym_1188($2450,$2453)|0);
+   $sym61 = $2454;
+   $2455 = $2;
+   $2456 = ($2455|0)==(0);
+   if ($2456) {
+    $2457 = $0;
+    _push_($2457);
+   }
+   $2458 = $0;
+   $2459 = $0;
+   $2460 = ((($2459)) + 172|0);
+   $2461 = HEAP32[$2460>>2]|0;
+   $2462 = $2461 & 511;
+   $2463 = $2462 << 23;
+   $2464 = 66 | $2463;
+   (_genop($2458,$2464)|0);
+   $2465 = $0;
+   $2466 = $0;
+   $2467 = ((($2466)) + 172|0);
+   $2468 = HEAP32[$2467>>2]|0;
+   $2469 = $2468 & 511;
+   $2470 = $2469 << 23;
+   $2471 = 19 | $2470;
+   $2472 = $sym61;
+   $2473 = $2472 & 65535;
+   $2474 = $2473 << 7;
+   $2475 = $2471 | $2474;
+   (_genop($2465,$2475)|0);
+   $2476 = $0;
+   _push_($2476);
+   $2477 = $0;
+   $2478 = $1;
+   $2479 = HEAP32[$2478>>2]|0;
+   _codegen($2477,$2479,1);
+   $2480 = $1;
+   $2481 = ((($2480)) + 4|0);
+   $2482 = HEAP32[$2481>>2]|0;
+   $n59 = $2482;
+   while(1) {
+    $2483 = $n59;
+    $2484 = ($2483|0)!=(0|0);
+    if (!($2484)) {
+     break;
+    }
+    $2485 = $n59;
+    $2486 = HEAP32[$2485>>2]|0;
+    $2487 = HEAP32[$2486>>2]|0;
+    $2488 = $2487;
+    $2489 = ($2488|0)==(57);
+    if ($2489) {
+     $2490 = $n59;
+     $2491 = HEAP32[$2490>>2]|0;
+     HEAP32[$2491>>2] = (55);
+    }
+    $2492 = $0;
+    $2493 = $n59;
+    $2494 = HEAP32[$2493>>2]|0;
+    _codegen($2492,$2494,1);
+    $2495 = $0;
+    $2496 = ((($2495)) + 172|0);
+    $2497 = HEAP32[$2496>>2]|0;
+    $2498 = (($2497) + -1)|0;
+    HEAP32[$2496>>2] = $2498;
+    $2499 = $0;
+    $2500 = ((($2499)) + 172|0);
+    $2501 = HEAP32[$2500>>2]|0;
+    $2502 = (($2501) + -1)|0;
+    HEAP32[$2500>>2] = $2502;
+    $2503 = $0;
+    $2504 = $0;
+    $2505 = ((($2504)) + 172|0);
+    $2506 = HEAP32[$2505>>2]|0;
+    $2507 = $2506 & 511;
+    $2508 = $2507 << 23;
+    $2509 = 62 | $2508;
+    $2510 = $0;
+    $2511 = ((($2510)) + 172|0);
+    $2512 = HEAP32[$2511>>2]|0;
+    $2513 = (($2512) + 1)|0;
+    $2514 = $2513 & 511;
+    $2515 = $2514 << 14;
+    $2516 = $2509 | $2515;
+    (_genop_peep($2503,$2516,1)|0);
+    $2517 = $0;
+    _push_($2517);
+    $2518 = $n59;
+    $2519 = ((($2518)) + 4|0);
+    $2520 = HEAP32[$2519>>2]|0;
+    $n59 = $2520;
+   }
+   $2521 = $0;
+   $2522 = ((($2521)) + 172|0);
+   $2523 = HEAP32[$2522>>2]|0;
+   $2524 = (($2523) + -1)|0;
+   HEAP32[$2522>>2] = $2524;
+   $2525 = $0;
+   $2526 = ((($2525)) + 172|0);
+   $2527 = HEAP32[$2526>>2]|0;
+   $2528 = (($2527) + -1)|0;
+   HEAP32[$2526>>2] = $2528;
+   $2529 = $0;
+   $2530 = $0;
+   $2531 = HEAP32[$2530>>2]|0;
+   $2532 = (_mrb_intern_static($2531,69625,1)|0);
+   $2533 = (_new_sym_1188($2529,$2532)|0);
+   $sym61 = $2533;
+   $2534 = $0;
+   $2535 = $0;
+   $2536 = ((($2535)) + 172|0);
+   $2537 = HEAP32[$2536>>2]|0;
+   $2538 = $2537 & 511;
+   $2539 = $2538 << 23;
+   $2540 = 32 | $2539;
+   $2541 = $sym61;
+   $2542 = $2541 & 511;
+   $2543 = $2542 << 14;
+   $2544 = $2540 | $2543;
+   $2545 = $2544 | 128;
+   (_genop($2534,$2545)|0);
+   $2546 = $2;
+   $2547 = ($2546|0)==(0);
+   $2548 = $0;
+   if ($2547) {
+    $2549 = ((($2548)) + 172|0);
+    $2550 = HEAP32[$2549>>2]|0;
+    $2551 = (($2550) + -1)|0;
+    HEAP32[$2549>>2] = $2551;
+   } else {
+    _push_($2548);
+   }
+   $2552 = $0;
+   $2553 = HEAP32[$2552>>2]|0;
+   $2554 = $ai60;
+   _mrb_gc_arena_restore($2553,$2554);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 57:  {
+   $2555 = $1;
+   $2556 = HEAP32[$2555>>2]|0;
+   $p62 = $2556;
+   $2557 = $1;
+   $2558 = ((($2557)) + 4|0);
+   $2559 = HEAP32[$2558>>2]|0;
+   $2560 = $2559;
+   $len63 = $2560;
+   $2561 = $0;
+   $2562 = HEAP32[$2561>>2]|0;
+   $2563 = (_mrb_gc_arena_save($2562)|0);
+   $ai64 = $2563;
+   $2564 = $0;
+   $2565 = $0;
+   $2566 = HEAP32[$2565>>2]|0;
+   $2567 = (_mrb_intern_static($2566,69618,6)|0);
+   $2568 = (_new_sym_1188($2564,$2567)|0);
+   $sym65 = $2568;
+   $2569 = $0;
+   $2570 = $0;
+   $2571 = HEAP32[$2570>>2]|0;
+   $2572 = $p62;
+   $2573 = $len63;
+   _mrb_str_new($14,$2571,$2572,$2573);
+   ;HEAP32[$$byval_copy19>>2]=HEAP32[$14>>2]|0;HEAP32[$$byval_copy19+4>>2]=HEAP32[$14+4>>2]|0;
+   $2574 = (_new_lit($2569,$$byval_copy19)|0);
+   $off66 = $2574;
+   $2575 = $2;
+   $2576 = ($2575|0)==(0);
+   if ($2576) {
+    $2577 = $0;
+    _push_($2577);
+   }
+   $2578 = $0;
+   $2579 = $0;
+   $2580 = ((($2579)) + 172|0);
+   $2581 = HEAP32[$2580>>2]|0;
+   $2582 = $2581 & 511;
+   $2583 = $2582 << 23;
+   $2584 = 66 | $2583;
+   (_genop($2578,$2584)|0);
+   $2585 = $0;
+   $2586 = $0;
+   $2587 = ((($2586)) + 172|0);
+   $2588 = HEAP32[$2587>>2]|0;
+   $2589 = $2588 & 511;
+   $2590 = $2589 << 23;
+   $2591 = 19 | $2590;
+   $2592 = $sym65;
+   $2593 = $2592 & 65535;
+   $2594 = $2593 << 7;
+   $2595 = $2591 | $2594;
+   (_genop($2585,$2595)|0);
+   $2596 = $0;
+   _push_($2596);
+   $2597 = $0;
+   $2598 = $0;
+   $2599 = ((($2598)) + 172|0);
+   $2600 = HEAP32[$2599>>2]|0;
+   $2601 = $2600 & 511;
+   $2602 = $2601 << 23;
+   $2603 = 61 | $2602;
+   $2604 = $off66;
+   $2605 = $2604 & 65535;
+   $2606 = $2605 << 7;
+   $2607 = $2603 | $2606;
+   (_genop($2597,$2607)|0);
+   $2608 = $0;
+   $2609 = ((($2608)) + 172|0);
+   $2610 = HEAP32[$2609>>2]|0;
+   $2611 = (($2610) + -1)|0;
+   HEAP32[$2609>>2] = $2611;
+   $2612 = $0;
+   $2613 = $0;
+   $2614 = HEAP32[$2613>>2]|0;
+   $2615 = (_mrb_intern_static($2614,69625,1)|0);
+   $2616 = (_new_sym_1188($2612,$2615)|0);
+   $sym65 = $2616;
+   $2617 = $0;
+   $2618 = $0;
+   $2619 = ((($2618)) + 172|0);
+   $2620 = HEAP32[$2619>>2]|0;
+   $2621 = $2620 & 511;
+   $2622 = $2621 << 23;
+   $2623 = 32 | $2622;
+   $2624 = $sym65;
+   $2625 = $2624 & 511;
+   $2626 = $2625 << 14;
+   $2627 = $2623 | $2626;
+   $2628 = $2627 | 128;
+   (_genop($2617,$2628)|0);
+   $2629 = $2;
+   $2630 = ($2629|0)==(0);
+   $2631 = $0;
+   if ($2630) {
+    $2632 = ((($2631)) + 172|0);
+    $2633 = HEAP32[$2632>>2]|0;
+    $2634 = (($2633) + -1)|0;
+    HEAP32[$2632>>2] = $2634;
+   } else {
+    _push_($2631);
+   }
+   $2635 = $0;
+   $2636 = HEAP32[$2635>>2]|0;
+   $2637 = $ai64;
+   _mrb_gc_arena_restore($2636,$2637);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 59:  {
+   $2638 = $2;
+   $2639 = ($2638|0)!=(0);
+   if (!($2639)) {
+    STACKTOP = sp;return;
+   }
+   $2640 = $1;
+   $2641 = HEAP32[$2640>>2]|0;
+   $p1 = $2641;
+   $2642 = $1;
+   $2643 = ((($2642)) + 4|0);
+   $2644 = HEAP32[$2643>>2]|0;
+   $2645 = HEAP32[$2644>>2]|0;
+   $p2 = $2645;
+   $2646 = $1;
+   $2647 = ((($2646)) + 4|0);
+   $2648 = HEAP32[$2647>>2]|0;
+   $2649 = ((($2648)) + 4|0);
+   $2650 = HEAP32[$2649>>2]|0;
+   $p3 = $2650;
+   $2651 = $0;
+   $2652 = HEAP32[$2651>>2]|0;
+   $2653 = (_mrb_gc_arena_save($2652)|0);
+   $ai67 = $2653;
+   $2654 = $0;
+   $2655 = $0;
+   $2656 = HEAP32[$2655>>2]|0;
+   $2657 = (_mrb_intern_static($2656,69627,6)|0);
+   $2658 = (_new_sym_1188($2654,$2657)|0);
+   $sym68 = $2658;
+   $2659 = $0;
+   $2660 = $0;
+   $2661 = HEAP32[$2660>>2]|0;
+   $2662 = $p1;
+   _mrb_str_new_cstr($15,$2661,$2662);
+   ;HEAP32[$$byval_copy20>>2]=HEAP32[$15>>2]|0;HEAP32[$$byval_copy20+4>>2]=HEAP32[$15+4>>2]|0;
+   $2663 = (_new_lit($2659,$$byval_copy20)|0);
+   $off69 = $2663;
+   $argc = 1;
+   $2664 = $0;
+   $2665 = $0;
+   $2666 = ((($2665)) + 172|0);
+   $2667 = HEAP32[$2666>>2]|0;
+   $2668 = $2667 & 511;
+   $2669 = $2668 << 23;
+   $2670 = 66 | $2669;
+   (_genop($2664,$2670)|0);
+   $2671 = $0;
+   $2672 = $0;
+   $2673 = ((($2672)) + 172|0);
+   $2674 = HEAP32[$2673>>2]|0;
+   $2675 = $2674 & 511;
+   $2676 = $2675 << 23;
+   $2677 = 19 | $2676;
+   $2678 = $sym68;
+   $2679 = $2678 & 65535;
+   $2680 = $2679 << 7;
+   $2681 = $2677 | $2680;
+   (_genop($2671,$2681)|0);
+   $2682 = $0;
+   _push_($2682);
+   $2683 = $0;
+   $2684 = $0;
+   $2685 = ((($2684)) + 172|0);
+   $2686 = HEAP32[$2685>>2]|0;
+   $2687 = $2686 & 511;
+   $2688 = $2687 << 23;
+   $2689 = 61 | $2688;
+   $2690 = $off69;
+   $2691 = $2690 & 65535;
+   $2692 = $2691 << 7;
+   $2693 = $2689 | $2692;
+   (_genop($2683,$2693)|0);
+   $2694 = $p2;
+   $2695 = ($2694|0)!=(0|0);
+   $2696 = $p3;
+   $2697 = ($2696|0)!=(0|0);
+   $or$cond9 = $2695 | $2697;
+   if ($or$cond9) {
+    $2698 = $0;
+    _push_($2698);
+    $2699 = $p2;
+    $2700 = ($2699|0)!=(0|0);
+    $2701 = $0;
+    $2702 = $0;
+    if ($2700) {
+     $2703 = HEAP32[$2702>>2]|0;
+     $2704 = $p2;
+     _mrb_str_new_cstr($16,$2703,$2704);
+     ;HEAP32[$$byval_copy21>>2]=HEAP32[$16>>2]|0;HEAP32[$$byval_copy21+4>>2]=HEAP32[$16+4>>2]|0;
+     $2705 = (_new_lit($2701,$$byval_copy21)|0);
+     $off69 = $2705;
+     $2706 = $0;
+     $2707 = $0;
+     $2708 = ((($2707)) + 172|0);
+     $2709 = HEAP32[$2708>>2]|0;
+     $2710 = $2709 & 511;
+     $2711 = $2710 << 23;
+     $2712 = 61 | $2711;
+     $2713 = $off69;
+     $2714 = $2713 & 65535;
+     $2715 = $2714 << 7;
+     $2716 = $2712 | $2715;
+     (_genop($2706,$2716)|0);
+    } else {
+     $2717 = ((($2702)) + 172|0);
+     $2718 = HEAP32[$2717>>2]|0;
+     $2719 = $2718 & 511;
+     $2720 = $2719 << 23;
+     $2721 = 5 | $2720;
+     (_genop($2701,$2721)|0);
+    }
+    $2722 = $argc;
+    $2723 = (($2722) + 1)|0;
+    $argc = $2723;
+    $2724 = $p3;
+    $2725 = ($2724|0)!=(0|0);
+    if ($2725) {
+     $2726 = $0;
+     _push_($2726);
+     $2727 = $0;
+     $2728 = $0;
+     $2729 = HEAP32[$2728>>2]|0;
+     $2730 = $p3;
+     _mrb_str_new($17,$2729,$2730,1);
+     ;HEAP32[$$byval_copy22>>2]=HEAP32[$17>>2]|0;HEAP32[$$byval_copy22+4>>2]=HEAP32[$17+4>>2]|0;
+     $2731 = (_new_lit($2727,$$byval_copy22)|0);
+     $off69 = $2731;
+     $2732 = $0;
+     $2733 = $0;
+     $2734 = ((($2733)) + 172|0);
+     $2735 = HEAP32[$2734>>2]|0;
+     $2736 = $2735 & 511;
+     $2737 = $2736 << 23;
+     $2738 = 61 | $2737;
+     $2739 = $off69;
+     $2740 = $2739 & 65535;
+     $2741 = $2740 << 7;
+     $2742 = $2738 | $2741;
+     (_genop($2732,$2742)|0);
+     $2743 = $argc;
+     $2744 = (($2743) + 1)|0;
+     $argc = $2744;
+     $2745 = $0;
+     $2746 = ((($2745)) + 172|0);
+     $2747 = HEAP32[$2746>>2]|0;
+     $2748 = (($2747) + -1)|0;
+     HEAP32[$2746>>2] = $2748;
+    }
+    $2749 = $0;
+    $2750 = ((($2749)) + 172|0);
+    $2751 = HEAP32[$2750>>2]|0;
+    $2752 = (($2751) + -1)|0;
+    HEAP32[$2750>>2] = $2752;
+   }
+   $2753 = $0;
+   $2754 = ((($2753)) + 172|0);
+   $2755 = HEAP32[$2754>>2]|0;
+   $2756 = (($2755) + -1)|0;
+   HEAP32[$2754>>2] = $2756;
+   $2757 = $0;
+   $2758 = $0;
+   $2759 = HEAP32[$2758>>2]|0;
+   $2760 = (_mrb_intern_static($2759,69634,7)|0);
+   $2761 = (_new_sym_1188($2757,$2760)|0);
+   $sym68 = $2761;
+   $2762 = $0;
+   $2763 = $0;
+   $2764 = ((($2763)) + 172|0);
+   $2765 = HEAP32[$2764>>2]|0;
+   $2766 = $2765 & 511;
+   $2767 = $2766 << 23;
+   $2768 = 32 | $2767;
+   $2769 = $sym68;
+   $2770 = $2769 & 511;
+   $2771 = $2770 << 14;
+   $2772 = $2768 | $2771;
+   $2773 = $argc;
+   $2774 = $2773 & 127;
+   $2775 = $2774 << 7;
+   $2776 = $2772 | $2775;
+   (_genop($2762,$2776)|0);
+   $2777 = $0;
+   $2778 = HEAP32[$2777>>2]|0;
+   $2779 = $ai67;
+   _mrb_gc_arena_restore($2778,$2779);
+   $2780 = $0;
+   _push_($2780);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 60:  {
+   $2781 = $2;
+   $2782 = ($2781|0)!=(0);
+   $2783 = $1;
+   $2784 = HEAP32[$2783>>2]|0;
+   if (!($2782)) {
+    $n77 = $2784;
+    while(1) {
+     $2954 = $n77;
+     $2955 = ($2954|0)!=(0|0);
+     if (!($2955)) {
+      break;
+     }
+     $2956 = $n77;
+     $2957 = HEAP32[$2956>>2]|0;
+     $2958 = HEAP32[$2957>>2]|0;
+     $2959 = $2958;
+     $2960 = ($2959|0)!=(55);
+     if ($2960) {
+      $2961 = $0;
+      $2962 = $n77;
+      $2963 = HEAP32[$2962>>2]|0;
+      _codegen($2961,$2963,0);
+     }
+     $2964 = $n77;
+     $2965 = ((($2964)) + 4|0);
+     $2966 = HEAP32[$2965>>2]|0;
+     $n77 = $2966;
+    }
+    STACKTOP = sp;return;
+   }
+   $n70 = $2784;
+   $2785 = $0;
+   $2786 = HEAP32[$2785>>2]|0;
+   $2787 = (_mrb_gc_arena_save($2786)|0);
+   $ai71 = $2787;
+   $2788 = $0;
+   $2789 = $0;
+   $2790 = HEAP32[$2789>>2]|0;
+   $2791 = (_mrb_intern_static($2790,69627,6)|0);
+   $2792 = (_new_sym_1188($2788,$2791)|0);
+   $sym72 = $2792;
+   $argc73 = 1;
+   $2793 = $0;
+   $2794 = $0;
+   $2795 = ((($2794)) + 172|0);
+   $2796 = HEAP32[$2795>>2]|0;
+   $2797 = $2796 & 511;
+   $2798 = $2797 << 23;
+   $2799 = 66 | $2798;
+   (_genop($2793,$2799)|0);
+   $2800 = $0;
+   $2801 = $0;
+   $2802 = ((($2801)) + 172|0);
+   $2803 = HEAP32[$2802>>2]|0;
+   $2804 = $2803 & 511;
+   $2805 = $2804 << 23;
+   $2806 = 19 | $2805;
+   $2807 = $sym72;
+   $2808 = $2807 & 65535;
+   $2809 = $2808 << 7;
+   $2810 = $2806 | $2809;
+   (_genop($2800,$2810)|0);
+   $2811 = $0;
+   _push_($2811);
+   $2812 = $0;
+   $2813 = $n70;
+   $2814 = HEAP32[$2813>>2]|0;
+   _codegen($2812,$2814,1);
+   $2815 = $n70;
+   $2816 = ((($2815)) + 4|0);
+   $2817 = HEAP32[$2816>>2]|0;
+   $n70 = $2817;
+   while(1) {
+    $2818 = $n70;
+    $2819 = ($2818|0)!=(0|0);
+    if (!($2819)) {
+     break;
+    }
+    $2820 = $0;
+    $2821 = $n70;
+    $2822 = HEAP32[$2821>>2]|0;
+    _codegen($2820,$2822,1);
+    $2823 = $0;
+    $2824 = ((($2823)) + 172|0);
+    $2825 = HEAP32[$2824>>2]|0;
+    $2826 = (($2825) + -1)|0;
+    HEAP32[$2824>>2] = $2826;
+    $2827 = $0;
+    $2828 = ((($2827)) + 172|0);
+    $2829 = HEAP32[$2828>>2]|0;
+    $2830 = (($2829) + -1)|0;
+    HEAP32[$2828>>2] = $2830;
+    $2831 = $0;
+    $2832 = $0;
+    $2833 = ((($2832)) + 172|0);
+    $2834 = HEAP32[$2833>>2]|0;
+    $2835 = $2834 & 511;
+    $2836 = $2835 << 23;
+    $2837 = 62 | $2836;
+    $2838 = $0;
+    $2839 = ((($2838)) + 172|0);
+    $2840 = HEAP32[$2839>>2]|0;
+    $2841 = (($2840) + 1)|0;
+    $2842 = $2841 & 511;
+    $2843 = $2842 << 14;
+    $2844 = $2837 | $2843;
+    (_genop_peep($2831,$2844,1)|0);
+    $2845 = $0;
+    _push_($2845);
+    $2846 = $n70;
+    $2847 = ((($2846)) + 4|0);
+    $2848 = HEAP32[$2847>>2]|0;
+    $n70 = $2848;
+   }
+   $2849 = $1;
+   $2850 = ((($2849)) + 4|0);
+   $2851 = HEAP32[$2850>>2]|0;
+   $2852 = ((($2851)) + 4|0);
+   $2853 = HEAP32[$2852>>2]|0;
+   $n70 = $2853;
+   $2854 = $n70;
+   $2855 = HEAP32[$2854>>2]|0;
+   $2856 = ($2855|0)!=(0|0);
+   if ($2856) {
+    $2857 = $n70;
+    $2858 = HEAP32[$2857>>2]|0;
+    $p75 = $2858;
+    $2859 = $0;
+    $2860 = $0;
+    $2861 = HEAP32[$2860>>2]|0;
+    $2862 = $p75;
+    _mrb_str_new_cstr($18,$2861,$2862);
+    ;HEAP32[$$byval_copy23>>2]=HEAP32[$18>>2]|0;HEAP32[$$byval_copy23+4>>2]=HEAP32[$18+4>>2]|0;
+    $2863 = (_new_lit($2859,$$byval_copy23)|0);
+    $off74 = $2863;
+    $2864 = $0;
+    $2865 = $1;
+    $2866 = HEAP32[$2865>>2]|0;
+    _codegen($2864,$2866,1);
+    $2867 = $0;
+    $2868 = $0;
+    $2869 = ((($2868)) + 172|0);
+    $2870 = HEAP32[$2869>>2]|0;
+    $2871 = $2870 & 511;
+    $2872 = $2871 << 23;
+    $2873 = 61 | $2872;
+    $2874 = $off74;
+    $2875 = $2874 & 65535;
+    $2876 = $2875 << 7;
+    $2877 = $2873 | $2876;
+    (_genop($2867,$2877)|0);
+    $2878 = $0;
+    $2879 = ((($2878)) + 172|0);
+    $2880 = HEAP32[$2879>>2]|0;
+    $2881 = (($2880) + -1)|0;
+    HEAP32[$2879>>2] = $2881;
+    $2882 = $0;
+    $2883 = $0;
+    $2884 = ((($2883)) + 172|0);
+    $2885 = HEAP32[$2884>>2]|0;
+    $2886 = $2885 & 511;
+    $2887 = $2886 << 23;
+    $2888 = 62 | $2887;
+    $2889 = $0;
+    $2890 = ((($2889)) + 172|0);
+    $2891 = HEAP32[$2890>>2]|0;
+    $2892 = (($2891) + 1)|0;
+    $2893 = $2892 & 511;
+    $2894 = $2893 << 14;
+    $2895 = $2888 | $2894;
+    (_genop_peep($2882,$2895,1)|0);
+   }
+   $2896 = $n70;
+   $2897 = ((($2896)) + 4|0);
+   $2898 = HEAP32[$2897>>2]|0;
+   $2899 = ($2898|0)!=(0|0);
+   if ($2899) {
+    $2900 = $n70;
+    $2901 = ((($2900)) + 4|0);
+    $2902 = HEAP32[$2901>>2]|0;
+    $p276 = $2902;
+    $2903 = $0;
+    _push_($2903);
+    $2904 = $0;
+    $2905 = $0;
+    $2906 = HEAP32[$2905>>2]|0;
+    $2907 = $p276;
+    _mrb_str_new_cstr($19,$2906,$2907);
+    ;HEAP32[$$byval_copy24>>2]=HEAP32[$19>>2]|0;HEAP32[$$byval_copy24+4>>2]=HEAP32[$19+4>>2]|0;
+    $2908 = (_new_lit($2904,$$byval_copy24)|0);
+    $off74 = $2908;
+    $2909 = $0;
+    $2910 = $0;
+    $2911 = ((($2910)) + 172|0);
+    $2912 = HEAP32[$2911>>2]|0;
+    $2913 = $2912 & 511;
+    $2914 = $2913 << 23;
+    $2915 = 61 | $2914;
+    $2916 = $off74;
+    $2917 = $2916 & 65535;
+    $2918 = $2917 << 7;
+    $2919 = $2915 | $2918;
+    (_genop($2909,$2919)|0);
+    $2920 = $argc73;
+    $2921 = (($2920) + 1)|0;
+    $argc73 = $2921;
+    $2922 = $0;
+    $2923 = ((($2922)) + 172|0);
+    $2924 = HEAP32[$2923>>2]|0;
+    $2925 = (($2924) + -1)|0;
+    HEAP32[$2923>>2] = $2925;
+   }
+   $2926 = $0;
+   $2927 = ((($2926)) + 172|0);
+   $2928 = HEAP32[$2927>>2]|0;
+   $2929 = (($2928) + -1)|0;
+   HEAP32[$2927>>2] = $2929;
+   $2930 = $0;
+   $2931 = $0;
+   $2932 = HEAP32[$2931>>2]|0;
+   $2933 = (_mrb_intern_static($2932,69634,7)|0);
+   $2934 = (_new_sym_1188($2930,$2933)|0);
+   $sym72 = $2934;
+   $2935 = $0;
+   $2936 = $0;
+   $2937 = ((($2936)) + 172|0);
+   $2938 = HEAP32[$2937>>2]|0;
+   $2939 = $2938 & 511;
+   $2940 = $2939 << 23;
+   $2941 = 32 | $2940;
+   $2942 = $sym72;
+   $2943 = $2942 & 511;
+   $2944 = $2943 << 14;
+   $2945 = $2941 | $2944;
+   $2946 = $argc73;
+   $2947 = $2946 & 127;
+   $2948 = $2947 << 7;
+   $2949 = $2945 | $2948;
+   (_genop($2935,$2949)|0);
+   $2950 = $0;
+   $2951 = HEAP32[$2950>>2]|0;
+   $2952 = $ai71;
+   _mrb_gc_arena_restore($2951,$2952);
+   $2953 = $0;
+   _push_($2953);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 54:  {
+   $2967 = $2;
+   $2968 = ($2967|0)!=(0);
+   if (!($2968)) {
+    STACKTOP = sp;return;
+   }
+   $2969 = $0;
+   $2970 = $1;
+   $2971 = $2970;
+   $2972 = (_new_sym_1188($2969,$2971)|0);
+   $sym78 = $2972;
+   $2973 = $0;
+   $2974 = $0;
+   $2975 = ((($2974)) + 172|0);
+   $2976 = HEAP32[$2975>>2]|0;
+   $2977 = $2976 & 511;
+   $2978 = $2977 << 23;
+   $2979 = 4 | $2978;
+   $2980 = $sym78;
+   $2981 = $2980 & 65535;
+   $2982 = $2981 << 7;
+   $2983 = $2979 | $2982;
+   (_genop($2973,$2983)|0);
+   $2984 = $0;
+   _push_($2984);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 97:  {
+   $2985 = $0;
+   $2986 = $1;
+   $2987 = $2;
+   _codegen($2985,$2986,$2987);
+   $2988 = $2;
+   $2989 = ($2988|0)!=(0);
+   if (!($2989)) {
+    STACKTOP = sp;return;
+   }
+   $2990 = $0;
+   _gen_send_intern($2990);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 85:  {
+   $2991 = $2;
+   $2992 = ($2991|0)!=(0);
+   if (!($2992)) {
+    STACKTOP = sp;return;
+   }
+   $2993 = $0;
+   $2994 = $0;
+   $2995 = ((($2994)) + 172|0);
+   $2996 = HEAP32[$2995>>2]|0;
+   $2997 = $2996 & 511;
+   $2998 = $2997 << 23;
+   $2999 = 6 | $2998;
+   (_genop($2993,$2999)|0);
+   $3000 = $0;
+   _push_($3000);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 86:  {
+   $3001 = $2;
+   $3002 = ($3001|0)!=(0);
+   if (!($3002)) {
+    STACKTOP = sp;return;
+   }
+   $3003 = $0;
+   $3004 = $0;
+   $3005 = ((($3004)) + 172|0);
+   $3006 = HEAP32[$3005>>2]|0;
+   $3007 = $3006 & 511;
+   $3008 = $3007 << 23;
+   $3009 = 5 | $3008;
+   (_genop($3003,$3009)|0);
+   $3010 = $0;
+   _push_($3010);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 87:  {
+   $3011 = $2;
+   $3012 = ($3011|0)!=(0);
+   if (!($3012)) {
+    STACKTOP = sp;return;
+   }
+   $3013 = $0;
+   $3014 = $0;
+   $3015 = ((($3014)) + 172|0);
+   $3016 = HEAP32[$3015>>2]|0;
+   $3017 = $3016 & 511;
+   $3018 = $3017 << 23;
+   $3019 = 7 | $3018;
+   (_genop($3013,$3019)|0);
+   $3020 = $0;
+   _push_($3020);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 88:  {
+   $3021 = $2;
+   $3022 = ($3021|0)!=(0);
+   if (!($3022)) {
+    STACKTOP = sp;return;
+   }
+   $3023 = $0;
+   $3024 = $0;
+   $3025 = ((($3024)) + 172|0);
+   $3026 = HEAP32[$3025>>2]|0;
+   $3027 = $3026 & 511;
+   $3028 = $3027 << 23;
+   $3029 = 8 | $3028;
+   (_genop($3023,$3029)|0);
+   $3030 = $0;
+   _push_($3030);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 72:  {
+   $3031 = $0;
+   $3032 = $1;
+   $3033 = HEAP32[$3032>>2]|0;
+   $3034 = $3033;
+   $3035 = (_new_msym($3031,$3034)|0);
+   $a = $3035;
+   $3036 = $0;
+   $3037 = $1;
+   $3038 = ((($3037)) + 4|0);
+   $3039 = HEAP32[$3038>>2]|0;
+   $3040 = $3039;
+   $3041 = (_new_msym($3036,$3040)|0);
+   $b = $3041;
+   $3042 = $0;
+   $3043 = $0;
+   $3044 = HEAP32[$3043>>2]|0;
+   $3045 = (_mrb_intern_static($3044,69642,12)|0);
+   $3046 = (_new_msym($3042,$3045)|0);
+   $c = $3046;
+   $3047 = $0;
+   $3048 = $0;
+   $3049 = ((($3048)) + 172|0);
+   $3050 = HEAP32[$3049>>2]|0;
+   $3051 = $3050 & 511;
+   $3052 = $3051 << 23;
+   $3053 = 72 | $3052;
+   (_genop($3047,$3053)|0);
+   $3054 = $0;
+   _push_($3054);
+   $3055 = $0;
+   $3056 = $0;
+   $3057 = ((($3056)) + 172|0);
+   $3058 = HEAP32[$3057>>2]|0;
+   $3059 = $3058 & 511;
+   $3060 = $3059 << 23;
+   $3061 = 4 | $3060;
+   $3062 = $a;
+   $3063 = $3062 & 65535;
+   $3064 = $3063 << 7;
+   $3065 = $3061 | $3064;
+   (_genop($3055,$3065)|0);
+   $3066 = $0;
+   _push_($3066);
+   $3067 = $0;
+   $3068 = $0;
+   $3069 = ((($3068)) + 172|0);
+   $3070 = HEAP32[$3069>>2]|0;
+   $3071 = $3070 & 511;
+   $3072 = $3071 << 23;
+   $3073 = 4 | $3072;
+   $3074 = $b;
+   $3075 = $3074 & 65535;
+   $3076 = $3075 << 7;
+   $3077 = $3073 | $3076;
+   (_genop($3067,$3077)|0);
+   $3078 = $0;
+   _push_($3078);
+   $3079 = $0;
+   $3080 = $0;
+   $3081 = ((($3080)) + 172|0);
+   $3082 = HEAP32[$3081>>2]|0;
+   $3083 = $3082 & 511;
+   $3084 = $3083 << 23;
+   $3085 = 5 | $3084;
+   (_genop($3079,$3085)|0);
+   $3086 = $0;
+   $3087 = ((($3086)) + 172|0);
+   $3088 = HEAP32[$3087>>2]|0;
+   $3089 = (($3088) - 3)|0;
+   HEAP32[$3087>>2] = $3089;
+   $3090 = $0;
+   $3091 = $0;
+   $3092 = ((($3091)) + 172|0);
+   $3093 = HEAP32[$3092>>2]|0;
+   $3094 = $3093 & 511;
+   $3095 = $3094 << 23;
+   $3096 = 32 | $3095;
+   $3097 = $c;
+   $3098 = $3097 & 511;
+   $3099 = $3098 << 14;
+   $3100 = $3096 | $3099;
+   $3101 = $3100 | 256;
+   (_genop($3090,$3101)|0);
+   $3102 = $2;
+   $3103 = ($3102|0)!=(0);
+   if (!($3103)) {
+    STACKTOP = sp;return;
+   }
+   $3104 = $0;
+   _push_($3104);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 73:  {
+   $3105 = $0;
+   $3106 = $0;
+   $3107 = HEAP32[$3106>>2]|0;
+   $3108 = (_mrb_intern_static($3107,69655,12)|0);
+   $3109 = (_new_msym($3105,$3108)|0);
+   $undef = $3109;
+   $num = 0;
+   $3110 = $1;
+   $t79 = $3110;
+   $3111 = $0;
+   $3112 = $0;
+   $3113 = ((($3112)) + 172|0);
+   $3114 = HEAP32[$3113>>2]|0;
+   $3115 = $3114 & 511;
+   $3116 = $3115 << 23;
+   $3117 = 72 | $3116;
+   (_genop($3111,$3117)|0);
+   $3118 = $0;
+   _push_($3118);
+   while(1) {
+    $3119 = $t79;
+    $3120 = ($3119|0)!=(0|0);
+    if (!($3120)) {
+     break;
+    }
+    $3121 = $0;
+    $3122 = $t79;
+    $3123 = HEAP32[$3122>>2]|0;
+    $3124 = $3123;
+    $3125 = (_new_msym($3121,$3124)|0);
+    $symbol = $3125;
+    $3126 = $0;
+    $3127 = $0;
+    $3128 = ((($3127)) + 172|0);
+    $3129 = HEAP32[$3128>>2]|0;
+    $3130 = $3129 & 511;
+    $3131 = $3130 << 23;
+    $3132 = 4 | $3131;
+    $3133 = $symbol;
+    $3134 = $3133 & 65535;
+    $3135 = $3134 << 7;
+    $3136 = $3132 | $3135;
+    (_genop($3126,$3136)|0);
+    $3137 = $0;
+    _push_($3137);
+    $3138 = $t79;
+    $3139 = ((($3138)) + 4|0);
+    $3140 = HEAP32[$3139>>2]|0;
+    $t79 = $3140;
+    $3141 = $num;
+    $3142 = (($3141) + 1)|0;
+    $num = $3142;
+   }
+   $3143 = $num;
+   $3144 = (($3143) + 1)|0;
+   $3145 = $0;
+   $3146 = ((($3145)) + 172|0);
+   $3147 = HEAP32[$3146>>2]|0;
+   $3148 = (($3147) - ($3144))|0;
+   HEAP32[$3146>>2] = $3148;
+   $3149 = $0;
+   $3150 = $0;
+   $3151 = ((($3150)) + 172|0);
+   $3152 = HEAP32[$3151>>2]|0;
+   $3153 = $3152 & 511;
+   $3154 = $3153 << 23;
+   $3155 = 32 | $3154;
+   $3156 = $undef;
+   $3157 = $3156 & 511;
+   $3158 = $3157 << 14;
+   $3159 = $3155 | $3158;
+   $3160 = $num;
+   $3161 = $3160 & 127;
+   $3162 = $3161 << 7;
+   $3163 = $3159 | $3162;
+   (_genop($3149,$3163)|0);
+   $3164 = $2;
+   $3165 = ($3164|0)!=(0);
+   if (!($3165)) {
+    STACKTOP = sp;return;
+   }
+   $3166 = $0;
+   _push_($3166);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 74:  {
+   $3167 = $1;
+   $3168 = HEAP32[$3167>>2]|0;
+   $3169 = HEAP32[$3168>>2]|0;
+   $3170 = ($3169|0)==(0|0);
+   do {
+    if ($3170) {
+     $3171 = $0;
+     $3172 = $0;
+     $3173 = ((($3172)) + 172|0);
+     $3174 = HEAP32[$3173>>2]|0;
+     $3175 = $3174 & 511;
+     $3176 = $3175 << 23;
+     $3177 = 5 | $3176;
+     (_genop($3171,$3177)|0);
+     $3178 = $0;
+     _push_($3178);
+    } else {
+     $3179 = $1;
+     $3180 = HEAP32[$3179>>2]|0;
+     $3181 = HEAP32[$3180>>2]|0;
+     $3182 = ($3181|0)==((1)|0);
+     $3183 = $0;
+     if ($3182) {
+      $3184 = $0;
+      $3185 = ((($3184)) + 172|0);
+      $3186 = HEAP32[$3185>>2]|0;
+      $3187 = $3186 & 511;
+      $3188 = $3187 << 23;
+      $3189 = 66 | $3188;
+      (_genop($3183,$3189)|0);
+      $3190 = $0;
+      _push_($3190);
+      break;
+     } else {
+      $3191 = $1;
+      $3192 = HEAP32[$3191>>2]|0;
+      $3193 = HEAP32[$3192>>2]|0;
+      _codegen($3183,$3193,1);
+      break;
+     }
+    }
+   } while(0);
+   $3194 = $1;
+   $3195 = ((($3194)) + 4|0);
+   $3196 = HEAP32[$3195>>2]|0;
+   $3197 = HEAP32[$3196>>2]|0;
+   $3198 = ($3197|0)!=(0|0);
+   $3199 = $0;
+   if ($3198) {
+    $3200 = $1;
+    $3201 = ((($3200)) + 4|0);
+    $3202 = HEAP32[$3201>>2]|0;
+    $3203 = HEAP32[$3202>>2]|0;
+    _codegen($3199,$3203,1);
+   } else {
+    $3204 = $0;
+    $3205 = ((($3204)) + 172|0);
+    $3206 = HEAP32[$3205>>2]|0;
+    $3207 = $3206 & 511;
+    $3208 = $3207 << 23;
+    $3209 = 5 | $3208;
+    (_genop($3199,$3209)|0);
+    $3210 = $0;
+    _push_($3210);
+   }
+   $3211 = $0;
+   $3212 = ((($3211)) + 172|0);
+   $3213 = HEAP32[$3212>>2]|0;
+   $3214 = (($3213) + -1)|0;
+   HEAP32[$3212>>2] = $3214;
+   $3215 = $0;
+   $3216 = ((($3215)) + 172|0);
+   $3217 = HEAP32[$3216>>2]|0;
+   $3218 = (($3217) + -1)|0;
+   HEAP32[$3216>>2] = $3218;
+   $3219 = $0;
+   $3220 = $1;
+   $3221 = HEAP32[$3220>>2]|0;
+   $3222 = ((($3221)) + 4|0);
+   $3223 = HEAP32[$3222>>2]|0;
+   $3224 = $3223;
+   $3225 = (_new_msym($3219,$3224)|0);
+   $idx80 = $3225;
+   $3226 = $0;
+   $3227 = $0;
+   $3228 = ((($3227)) + 172|0);
+   $3229 = HEAP32[$3228>>2]|0;
+   $3230 = $3229 & 511;
+   $3231 = $3230 << 23;
+   $3232 = 67 | $3231;
+   $3233 = $idx80;
+   $3234 = $3233 & 511;
+   $3235 = $3234 << 14;
+   $3236 = $3232 | $3235;
+   (_genop($3226,$3236)|0);
+   $3237 = $0;
+   $3238 = $1;
+   $3239 = ((($3238)) + 4|0);
+   $3240 = HEAP32[$3239>>2]|0;
+   $3241 = ((($3240)) + 4|0);
+   $3242 = HEAP32[$3241>>2]|0;
+   $3243 = HEAP32[$3242>>2]|0;
+   $3244 = $2;
+   $3245 = (_scope_body($3237,$3243,$3244)|0);
+   $idx80 = $3245;
+   $3246 = $0;
+   $3247 = $0;
+   $3248 = ((($3247)) + 172|0);
+   $3249 = HEAP32[$3248>>2]|0;
+   $3250 = $3249 & 511;
+   $3251 = $3250 << 23;
+   $3252 = 69 | $3251;
+   $3253 = $idx80;
+   $3254 = $3253 & 65535;
+   $3255 = $3254 << 7;
+   $3256 = $3252 | $3255;
+   (_genop($3246,$3256)|0);
+   $3257 = $2;
+   $3258 = ($3257|0)!=(0);
+   if (!($3258)) {
+    STACKTOP = sp;return;
+   }
+   $3259 = $0;
+   _push_($3259);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 75:  {
+   $3260 = $1;
+   $3261 = HEAP32[$3260>>2]|0;
+   $3262 = HEAP32[$3261>>2]|0;
+   $3263 = ($3262|0)==(0|0);
+   do {
+    if ($3263) {
+     $3264 = $0;
+     $3265 = $0;
+     $3266 = ((($3265)) + 172|0);
+     $3267 = HEAP32[$3266>>2]|0;
+     $3268 = $3267 & 511;
+     $3269 = $3268 << 23;
+     $3270 = 5 | $3269;
+     (_genop($3264,$3270)|0);
+     $3271 = $0;
+     _push_($3271);
+    } else {
+     $3272 = $1;
+     $3273 = HEAP32[$3272>>2]|0;
+     $3274 = HEAP32[$3273>>2]|0;
+     $3275 = ($3274|0)==((1)|0);
+     $3276 = $0;
+     if ($3275) {
+      $3277 = $0;
+      $3278 = ((($3277)) + 172|0);
+      $3279 = HEAP32[$3278>>2]|0;
+      $3280 = $3279 & 511;
+      $3281 = $3280 << 23;
+      $3282 = 66 | $3281;
+      (_genop($3276,$3282)|0);
+      $3283 = $0;
+      _push_($3283);
+      break;
+     } else {
+      $3284 = $1;
+      $3285 = HEAP32[$3284>>2]|0;
+      $3286 = HEAP32[$3285>>2]|0;
+      _codegen($3276,$3286,1);
+      break;
+     }
+    }
+   } while(0);
+   $3287 = $0;
+   $3288 = ((($3287)) + 172|0);
+   $3289 = HEAP32[$3288>>2]|0;
+   $3290 = (($3289) + -1)|0;
+   HEAP32[$3288>>2] = $3290;
+   $3291 = $0;
+   $3292 = $1;
+   $3293 = HEAP32[$3292>>2]|0;
+   $3294 = ((($3293)) + 4|0);
+   $3295 = HEAP32[$3294>>2]|0;
+   $3296 = $3295;
+   $3297 = (_new_msym($3291,$3296)|0);
+   $idx81 = $3297;
+   $3298 = $0;
+   $3299 = $0;
+   $3300 = ((($3299)) + 172|0);
+   $3301 = HEAP32[$3300>>2]|0;
+   $3302 = $3301 & 511;
+   $3303 = $3302 << 23;
+   $3304 = 68 | $3303;
+   $3305 = $idx81;
+   $3306 = $3305 & 511;
+   $3307 = $3306 << 14;
+   $3308 = $3304 | $3307;
+   (_genop($3298,$3308)|0);
+   $3309 = $0;
+   $3310 = $1;
+   $3311 = ((($3310)) + 4|0);
+   $3312 = HEAP32[$3311>>2]|0;
+   $3313 = HEAP32[$3312>>2]|0;
+   $3314 = $2;
+   $3315 = (_scope_body($3309,$3313,$3314)|0);
+   $idx81 = $3315;
+   $3316 = $0;
+   $3317 = $0;
+   $3318 = ((($3317)) + 172|0);
+   $3319 = HEAP32[$3318>>2]|0;
+   $3320 = $3319 & 511;
+   $3321 = $3320 << 23;
+   $3322 = 69 | $3321;
+   $3323 = $idx81;
+   $3324 = $3323 & 65535;
+   $3325 = $3324 << 7;
+   $3326 = $3322 | $3325;
+   (_genop($3316,$3326)|0);
+   $3327 = $2;
+   $3328 = ($3327|0)!=(0);
+   if (!($3328)) {
+    STACKTOP = sp;return;
+   }
+   $3329 = $0;
+   _push_($3329);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 76:  {
+   $3330 = $0;
+   $3331 = $1;
+   $3332 = HEAP32[$3331>>2]|0;
+   _codegen($3330,$3332,1);
+   $3333 = $0;
+   $3334 = ((($3333)) + 172|0);
+   $3335 = HEAP32[$3334>>2]|0;
+   $3336 = (($3335) + -1)|0;
+   HEAP32[$3334>>2] = $3336;
+   $3337 = $0;
+   $3338 = $0;
+   $3339 = ((($3338)) + 172|0);
+   $3340 = HEAP32[$3339>>2]|0;
+   $3341 = $3340 & 511;
+   $3342 = $3341 << 23;
+   $3343 = 71 | $3342;
+   $3344 = $0;
+   $3345 = ((($3344)) + 172|0);
+   $3346 = HEAP32[$3345>>2]|0;
+   $3347 = $3346 & 511;
+   $3348 = $3347 << 14;
+   $3349 = $3343 | $3348;
+   (_genop($3337,$3349)|0);
+   $3350 = $0;
+   $3351 = $1;
+   $3352 = ((($3351)) + 4|0);
+   $3353 = HEAP32[$3352>>2]|0;
+   $3354 = HEAP32[$3353>>2]|0;
+   $3355 = $2;
+   $3356 = (_scope_body($3350,$3354,$3355)|0);
+   $idx82 = $3356;
+   $3357 = $0;
+   $3358 = $0;
+   $3359 = ((($3358)) + 172|0);
+   $3360 = HEAP32[$3359>>2]|0;
+   $3361 = $3360 & 511;
+   $3362 = $3361 << 23;
+   $3363 = 69 | $3362;
+   $3364 = $idx82;
+   $3365 = $3364 & 65535;
+   $3366 = $3365 << 7;
+   $3367 = $3363 | $3366;
+   (_genop($3357,$3367)|0);
+   $3368 = $2;
+   $3369 = ($3368|0)!=(0);
+   if (!($3369)) {
+    STACKTOP = sp;return;
+   }
+   $3370 = $0;
+   _push_($3370);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 70:  {
+   $3371 = $0;
+   $3372 = $1;
+   $3373 = HEAP32[$3372>>2]|0;
+   $3374 = $3373;
+   $3375 = (_new_msym($3371,$3374)|0);
+   $sym83 = $3375;
+   $3376 = $0;
+   $3377 = $1;
+   $3378 = ((($3377)) + 4|0);
+   $3379 = HEAP32[$3378>>2]|0;
+   $3380 = (_lambda_body($3376,$3379,0)|0);
+   $idx84 = $3380;
+   $3381 = $0;
+   $3382 = $0;
+   $3383 = ((($3382)) + 172|0);
+   $3384 = HEAP32[$3383>>2]|0;
+   $3385 = $3384 & 511;
+   $3386 = $3385 << 23;
+   $3387 = 72 | $3386;
+   (_genop($3381,$3387)|0);
+   $3388 = $0;
+   _push_($3388);
+   $3389 = $0;
+   $3390 = $0;
+   $3391 = ((($3390)) + 172|0);
+   $3392 = HEAP32[$3391>>2]|0;
+   $3393 = $3392 & 511;
+   $3394 = $3393 << 23;
+   $3395 = 64 | $3394;
+   $3396 = $idx84;
+   $3397 = $3396 & 16383;
+   $3398 = $3397 << 9;
+   $3399 = $3398 | 128;
+   $3400 = $3395 | $3399;
+   (_genop($3389,$3400)|0);
+   $3401 = $0;
+   _push_($3401);
+   $3402 = $0;
+   $3403 = ((($3402)) + 172|0);
+   $3404 = HEAP32[$3403>>2]|0;
+   $3405 = (($3404) + -1)|0;
+   HEAP32[$3403>>2] = $3405;
+   $3406 = $0;
+   $3407 = ((($3406)) + 172|0);
+   $3408 = HEAP32[$3407>>2]|0;
+   $3409 = (($3408) + -1)|0;
+   HEAP32[$3407>>2] = $3409;
+   $3410 = $0;
+   $3411 = $0;
+   $3412 = ((($3411)) + 172|0);
+   $3413 = HEAP32[$3412>>2]|0;
+   $3414 = $3413 & 511;
+   $3415 = $3414 << 23;
+   $3416 = 70 | $3415;
+   $3417 = $sym83;
+   $3418 = $3417 & 511;
+   $3419 = $3418 << 14;
+   $3420 = $3416 | $3419;
+   (_genop($3410,$3420)|0);
+   $3421 = $2;
+   $3422 = ($3421|0)!=(0);
+   if (!($3422)) {
+    STACKTOP = sp;return;
+   }
+   $3423 = $0;
+   $3424 = $0;
+   $3425 = ((($3424)) + 172|0);
+   $3426 = HEAP32[$3425>>2]|0;
+   $3427 = $3426 & 511;
+   $3428 = $3427 << 23;
+   $3429 = 4 | $3428;
+   $3430 = $sym83;
+   $3431 = $3430 & 65535;
+   $3432 = $3431 << 7;
+   $3433 = $3429 | $3432;
+   (_genop($3423,$3433)|0);
+   $3434 = $0;
+   _push_($3434);
+   STACKTOP = sp;return;
+   break;
+  }
+  case 71:  {
+   $3435 = $1;
+   $3436 = HEAP32[$3435>>2]|0;
+   $recv = $3436;
+   $3437 = $0;
+   $3438 = $1;
+   $3439 = ((($3438)) + 4|0);
+   $3440 = HEAP32[$3439>>2]|0;
+   $3441 = HEAP32[$3440>>2]|0;
+   $3442 = $3441;
+   $3443 = (_new_msym($3437,$3442)|0);
+   $sym85 = $3443;
+   $3444 = $0;
+   $3445 = $1;
+   $3446 = ((($3445)) + 4|0);
+   $3447 = HEAP32[$3446>>2]|0;
+   $3448 = ((($3447)) + 4|0);
+   $3449 = HEAP32[$3448>>2]|0;
+   $3450 = (_lambda_body($3444,$3449,0)|0);
+   $idx86 = $3450;
+   $3451 = $0;
+   $3452 = $recv;
+   _codegen($3451,$3452,1);
+   $3453 = $0;
+   $3454 = ((($3453)) + 172|0);
+   $3455 = HEAP32[$3454>>2]|0;
+   $3456 = (($3455) + -1)|0;
+   HEAP32[$3454>>2] = $3456;
+   $3457 = $0;
+   $3458 = $0;
+   $3459 = ((($3458)) + 172|0);
+   $3460 = HEAP32[$3459>>2]|0;
+   $3461 = $3460 & 511;
+   $3462 = $3461 << 23;
+   $3463 = 71 | $3462;
+   $3464 = $0;
+   $3465 = ((($3464)) + 172|0);
+   $3466 = HEAP32[$3465>>2]|0;
+   $3467 = $3466 & 511;
+   $3468 = $3467 << 14;
+   $3469 = $3463 | $3468;
+   (_genop($3457,$3469)|0);
+   $3470 = $0;
+   _push_($3470);
+   $3471 = $0;
+   $3472 = $0;
+   $3473 = ((($3472)) + 172|0);
+   $3474 = HEAP32[$3473>>2]|0;
+   $3475 = $3474 & 511;
+   $3476 = $3475 << 23;
+   $3477 = 64 | $3476;
+   $3478 = $idx86;
+   $3479 = $3478 & 16383;
+   $3480 = $3479 << 9;
+   $3481 = $3480 | 128;
+   $3482 = $3477 | $3481;
+   (_genop($3471,$3482)|0);
+   $3483 = $0;
+   $3484 = ((($3483)) + 172|0);
+   $3485 = HEAP32[$3484>>2]|0;
+   $3486 = (($3485) + -1)|0;
+   HEAP32[$3484>>2] = $3486;
+   $3487 = $0;
+   $3488 = $0;
+   $3489 = ((($3488)) + 172|0);
+   $3490 = HEAP32[$3489>>2]|0;
+   $3491 = $3490 & 511;
+   $3492 = $3491 << 23;
+   $3493 = 70 | $3492;
+   $3494 = $sym85;
+   $3495 = $3494 & 511;
+   $3496 = $3495 << 14;
+   $3497 = $3493 | $3496;
+   (_genop($3487,$3497)|0);
+   $3498 = $2;
+   $3499 = ($3498|0)!=(0);
+   if (!($3499)) {
+    STACKTOP = sp;return;
+   }
+   $3500 = $0;
+   $3501 = $0;
+   $3502 = ((($3501)) + 172|0);
+   $3503 = HEAP32[$3502>>2]|0;
+   $3504 = $3503 & 511;
+   $3505 = $3504 << 23;
+   $3506 = 4 | $3505;
+   $3507 = $sym85;
+   $3508 = $3507 & 65535;
+   $3509 = $3508 << 7;
+   $3510 = $3506 | $3509;
+   (_genop($3500,$3510)|0);
+   $3511 = $0;
+   _push_($3511);
+   STACKTOP = sp;return;
+   break;
+  }
+  default: {
+   STACKTOP = sp;return;
+  }
+  }
+ } while(0);
+ $2386 = $2;
+ $2387 = ($2386|0)!=(0);
+ $2388 = $1;
+ if ($2387) {
+  $n57 = $2388;
+  $2389 = $n57;
+  $2390 = ($2389|0)!=(0|0);
+  if (!($2390)) {
+   STACKTOP = sp;return;
+  }
+  $2391 = $0;
+  $2392 = $n57;
+  $2393 = HEAP32[$2392>>2]|0;
+  _codegen($2391,$2393,1);
+  $2394 = $n57;
+  $2395 = ((($2394)) + 4|0);
+  $2396 = HEAP32[$2395>>2]|0;
+  $n57 = $2396;
+  while(1) {
+   $2397 = $n57;
+   $2398 = ($2397|0)!=(0|0);
+   if (!($2398)) {
+    break;
+   }
+   $2399 = $0;
+   $2400 = $n57;
+   $2401 = HEAP32[$2400>>2]|0;
+   _codegen($2399,$2401,1);
+   $2402 = $0;
+   $2403 = ((($2402)) + 172|0);
+   $2404 = HEAP32[$2403>>2]|0;
+   $2405 = (($2404) + -1)|0;
+   HEAP32[$2403>>2] = $2405;
+   $2406 = $0;
+   $2407 = ((($2406)) + 172|0);
+   $2408 = HEAP32[$2407>>2]|0;
+   $2409 = (($2408) + -1)|0;
+   HEAP32[$2407>>2] = $2409;
+   $2410 = $0;
+   $2411 = $0;
+   $2412 = ((($2411)) + 172|0);
+   $2413 = HEAP32[$2412>>2]|0;
+   $2414 = $2413 & 511;
+   $2415 = $2414 << 23;
+   $2416 = 62 | $2415;
+   $2417 = $0;
+   $2418 = ((($2417)) + 172|0);
+   $2419 = HEAP32[$2418>>2]|0;
+   $2420 = (($2419) + 1)|0;
+   $2421 = $2420 & 511;
+   $2422 = $2421 << 14;
+   $2423 = $2416 | $2422;
+   (_genop_peep($2410,$2423,1)|0);
+   $2424 = $0;
+   _push_($2424);
+   $2425 = $n57;
+   $2426 = ((($2425)) + 4|0);
+   $2427 = HEAP32[$2426>>2]|0;
+   $n57 = $2427;
+  }
+  STACKTOP = sp;return;
+ } else {
+  $n58 = $2388;
+  while(1) {
+   $2428 = $n58;
+   $2429 = ($2428|0)!=(0|0);
+   if (!($2429)) {
+    break;
+   }
+   $2430 = $n58;
+   $2431 = HEAP32[$2430>>2]|0;
+   $2432 = HEAP32[$2431>>2]|0;
+   $2433 = $2432;
+   $2434 = ($2433|0)!=(55);
+   if ($2434) {
+    $2435 = $0;
+    $2436 = $n58;
+    $2437 = HEAP32[$2436>>2]|0;
+    _codegen($2435,$2437,0);
+   }
+   $2438 = $n58;
+   $2439 = ((($2438)) + 4|0);
+   $2440 = HEAP32[$2439>>2]|0;
+   $n58 = $2440;
+  }
+  STACKTOP = sp;return;
+ }
+}
+function _genop($s,$i) {
+ $s = $s|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $i;
+ $2 = $0;
+ $3 = ((($2)) + 176|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $0;
+ $6 = ((($5)) + 212|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ($4|0)==($7|0);
+ if ($8) {
+  $9 = $0;
+  $10 = ((($9)) + 212|0);
+  $11 = HEAP32[$10>>2]|0;
+  $12 = $11<<1;
+  HEAP32[$10>>2] = $12;
+  $13 = $0;
+  $14 = $0;
+  $15 = ((($14)) + 204|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = $0;
+  $18 = ((($17)) + 212|0);
+  $19 = HEAP32[$18>>2]|0;
+  $20 = $19<<2;
+  $21 = (_codegen_realloc($13,$16,$20)|0);
+  $22 = $0;
+  $23 = ((($22)) + 204|0);
+  HEAP32[$23>>2] = $21;
+  $24 = $0;
+  $25 = ((($24)) + 208|0);
+  $26 = HEAP32[$25>>2]|0;
+  $27 = ($26|0)!=(0|0);
+  if ($27) {
+   $28 = $0;
+   $29 = $0;
+   $30 = ((($29)) + 208|0);
+   $31 = HEAP32[$30>>2]|0;
+   $32 = $0;
+   $33 = ((($32)) + 212|0);
+   $34 = HEAP32[$33>>2]|0;
+   $35 = $34<<1;
+   $36 = (_codegen_realloc($28,$31,$35)|0);
+   $37 = $0;
+   $38 = ((($37)) + 208|0);
+   HEAP32[$38>>2] = $36;
+   $39 = $0;
+   $40 = ((($39)) + 208|0);
+   $41 = HEAP32[$40>>2]|0;
+   $42 = $0;
+   $43 = ((($42)) + 216|0);
+   $44 = HEAP32[$43>>2]|0;
+   $45 = ((($44)) + 32|0);
+   HEAP32[$45>>2] = $41;
+  }
+ }
+ $46 = $1;
+ $47 = $0;
+ $48 = ((($47)) + 176|0);
+ $49 = HEAP32[$48>>2]|0;
+ $50 = $0;
+ $51 = ((($50)) + 204|0);
+ $52 = HEAP32[$51>>2]|0;
+ $53 = (($52) + ($49<<2)|0);
+ HEAP32[$53>>2] = $46;
+ $54 = $0;
+ $55 = ((($54)) + 208|0);
+ $56 = HEAP32[$55>>2]|0;
+ $57 = ($56|0)!=(0|0);
+ if (!($57)) {
+  $68 = $0;
+  $69 = ((($68)) + 176|0);
+  $70 = HEAP32[$69>>2]|0;
+  $71 = (($70) + 1)|0;
+  HEAP32[$69>>2] = $71;
+  STACKTOP = sp;return ($70|0);
+ }
+ $58 = $0;
+ $59 = ((($58)) + 200|0);
+ $60 = HEAP16[$59>>1]|0;
+ $61 = $0;
+ $62 = ((($61)) + 176|0);
+ $63 = HEAP32[$62>>2]|0;
+ $64 = $0;
+ $65 = ((($64)) + 208|0);
+ $66 = HEAP32[$65>>2]|0;
+ $67 = (($66) + ($63<<1)|0);
+ HEAP16[$67>>1] = $60;
+ $68 = $0;
+ $69 = ((($68)) + 176|0);
+ $70 = HEAP32[$69>>2]|0;
+ $71 = (($70) + 1)|0;
+ HEAP32[$69>>2] = $71;
+ STACKTOP = sp;return ($70|0);
+}
+function _push_($s) {
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0;
+ var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $0;
+ $2 = ((($1)) + 172|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($3|0)>(511);
+ if ($4) {
+  $5 = $0;
+  _codegen_error($5,69323);
+ }
+ $6 = $0;
+ $7 = ((($6)) + 172|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = (($8) + 1)|0;
+ HEAP32[$7>>2] = $9;
+ $10 = $0;
+ $11 = ((($10)) + 172|0);
+ $12 = HEAP32[$11>>2]|0;
+ $13 = $0;
+ $14 = ((($13)) + 234|0);
+ $15 = HEAP16[$14>>1]|0;
+ $16 = $15&65535;
+ $17 = ($12|0)>($16|0);
+ if (!($17)) {
+  STACKTOP = sp;return;
+ }
+ $18 = $0;
+ $19 = ((($18)) + 172|0);
+ $20 = HEAP32[$19>>2]|0;
+ $21 = $20&65535;
+ $22 = $0;
+ $23 = ((($22)) + 234|0);
+ HEAP16[$23>>1] = $21;
+ STACKTOP = sp;return;
+}
+function _loop_push($s,$t) {
+ $s = $s|0;
+ $t = $t|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $t;
+ $2 = $0;
+ $3 = (_codegen_palloc($2,28)|0);
+ $p = $3;
+ $4 = $1;
+ $5 = $p;
+ HEAP32[$5>>2] = $4;
+ $6 = $p;
+ $7 = ((($6)) + 12|0);
+ HEAP32[$7>>2] = 0;
+ $8 = $p;
+ $9 = ((($8)) + 8|0);
+ HEAP32[$9>>2] = 0;
+ $10 = $p;
+ $11 = ((($10)) + 4|0);
+ HEAP32[$11>>2] = 0;
+ $12 = $0;
+ $13 = ((($12)) + 188|0);
+ $14 = HEAP32[$13>>2]|0;
+ $15 = $p;
+ $16 = ((($15)) + 24|0);
+ HEAP32[$16>>2] = $14;
+ $17 = $0;
+ $18 = ((($17)) + 192|0);
+ $19 = HEAP32[$18>>2]|0;
+ $20 = $p;
+ $21 = ((($20)) + 20|0);
+ HEAP32[$21>>2] = $19;
+ $22 = $0;
+ $23 = ((($22)) + 172|0);
+ $24 = HEAP32[$23>>2]|0;
+ $25 = $p;
+ $26 = ((($25)) + 16|0);
+ HEAP32[$26>>2] = $24;
+ $27 = $p;
+ $28 = $0;
+ $29 = ((($28)) + 188|0);
+ HEAP32[$29>>2] = $27;
+ $30 = $p;
+ STACKTOP = sp;return ($30|0);
+}
+function _codegen_palloc($s,$len) {
+ $s = $s|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $len;
+ $2 = $0;
+ $3 = ((($2)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $1;
+ $6 = (_mrb_pool_alloc($4,$5)|0);
+ $p = $6;
+ $7 = $p;
+ $8 = ($7|0)!=(0|0);
+ if ($8) {
+  $10 = $p;
+  STACKTOP = sp;return ($10|0);
+ }
+ $9 = $0;
+ _codegen_error($9,69346);
+ $10 = $p;
+ STACKTOP = sp;return ($10|0);
+}
+function _dispatch($s,$pc) {
+ $s = $s|0;
+ $pc = $pc|0;
+ var $$off = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $c = 0, $diff = 0, $i = 0, $switch = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $0 = $s;
+ $1 = $pc;
+ $2 = $0;
+ $3 = ((($2)) + 176|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $1;
+ $6 = (($4) - ($5))|0;
+ $diff = $6;
+ $7 = $1;
+ $8 = $0;
+ $9 = ((($8)) + 204|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = (($10) + ($7<<2)|0);
+ $12 = HEAP32[$11>>2]|0;
+ $i = $12;
+ $13 = $i;
+ $14 = $13 & 127;
+ $c = $14;
+ $15 = $0;
+ $16 = ((($15)) + 176|0);
+ $17 = HEAP32[$16>>2]|0;
+ $18 = $0;
+ $19 = ((($18)) + 180|0);
+ HEAP32[$19>>2] = $17;
+ $20 = $c;
+ $$off = (($20) + -23)|0;
+ $switch = ($$off>>>0)<(4);
+ if (!($switch)) {
+  $21 = HEAP32[637]|0;
+  (_fprintf($21,69369,$vararg_buffer)|0);
+  $22 = $0;
+  _scope_error($22);
+ }
+ $23 = $c;
+ $24 = $23 & 127;
+ $25 = $i;
+ $26 = $25 >>> 23;
+ $27 = $26 & 511;
+ $28 = $27 & 511;
+ $29 = $28 << 23;
+ $30 = $24 | $29;
+ $31 = $diff;
+ $32 = (($31) + 32767)|0;
+ $33 = $32 & 65535;
+ $34 = $33 << 7;
+ $35 = $30 | $34;
+ $36 = $1;
+ $37 = $0;
+ $38 = ((($37)) + 204|0);
+ $39 = HEAP32[$38>>2]|0;
+ $40 = (($39) + ($36<<2)|0);
+ HEAP32[$40>>2] = $35;
+ STACKTOP = sp;return;
+}
+function _scope_error($s) {
+ $s = $s|0;
+ var $0 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ _exit(1);
+ // unreachable;
+}
+function _new_msym($s,$sym) {
+ $s = $s|0;
+ $sym = $sym|0;
+ var $$ = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, $i = 0, $len = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $s;
+ $2 = $sym;
+ $3 = $1;
+ $4 = ((($3)) + 216|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ((($5)) + 48|0);
+ $7 = HEAP32[$6>>2]|0;
+ $len = $7;
+ $8 = $len;
+ $9 = ($8>>>0)>(256);
+ $$ = $9 ? 256 : $7;
+ $len = $$;
+ $i = 0;
+ while(1) {
+  $10 = $i;
+  $11 = $len;
+  $12 = ($10>>>0)<($11>>>0);
+  if (!($12)) {
+   break;
+  }
+  $13 = $i;
+  $14 = $1;
+  $15 = ((($14)) + 216|0);
+  $16 = HEAP32[$15>>2]|0;
+  $17 = ((($16)) + 16|0);
+  $18 = HEAP32[$17>>2]|0;
+  $19 = (($18) + ($13<<2)|0);
+  $20 = HEAP32[$19>>2]|0;
+  $21 = $2;
+  $22 = ($20|0)==($21|0);
+  $23 = $i;
+  if ($22) {
+   label = 4;
+   break;
+  }
+  $24 = $1;
+  $25 = ((($24)) + 216|0);
+  $26 = HEAP32[$25>>2]|0;
+  $27 = ((($26)) + 16|0);
+  $28 = HEAP32[$27>>2]|0;
+  $29 = (($28) + ($23<<2)|0);
+  $30 = HEAP32[$29>>2]|0;
+  $31 = ($30|0)==(0);
+  if ($31) {
+   break;
+  }
+  $32 = $i;
+  $33 = (($32) + 1)|0;
+  $i = $33;
+ }
+ if ((label|0) == 4) {
+  $0 = $23;
+  $59 = $0;
+  STACKTOP = sp;return ($59|0);
+ }
+ $34 = $i;
+ $35 = ($34|0)==(256);
+ if ($35) {
+  $36 = $1;
+  _codegen_error($36,69412);
+ }
+ $37 = $2;
+ $38 = $i;
+ $39 = $1;
+ $40 = ((($39)) + 216|0);
+ $41 = HEAP32[$40>>2]|0;
+ $42 = ((($41)) + 16|0);
+ $43 = HEAP32[$42>>2]|0;
+ $44 = (($43) + ($38<<2)|0);
+ HEAP32[$44>>2] = $37;
+ $45 = $i;
+ $46 = $1;
+ $47 = ((($46)) + 216|0);
+ $48 = HEAP32[$47>>2]|0;
+ $49 = ((($48)) + 48|0);
+ $50 = HEAP32[$49>>2]|0;
+ $51 = ($45|0)==($50|0);
+ if ($51) {
+  $52 = $1;
+  $53 = ((($52)) + 216|0);
+  $54 = HEAP32[$53>>2]|0;
+  $55 = ((($54)) + 48|0);
+  $56 = HEAP32[$55>>2]|0;
+  $57 = (($56) + 1)|0;
+  HEAP32[$55>>2] = $57;
+ }
+ $58 = $i;
+ $0 = $58;
+ $59 = $0;
+ STACKTOP = sp;return ($59|0);
+}
+function _dispatch_linked($s,$pc) {
+ $s = $s|0;
+ $pc = $pc|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i = 0;
+ var $pos = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $pc;
+ $2 = $1;
+ $3 = ($2|0)!=(0);
+ if (!($3)) {
+  STACKTOP = sp;return;
+ }
+ while(1) {
+  $4 = $1;
+  $5 = $0;
+  $6 = ((($5)) + 204|0);
+  $7 = HEAP32[$6>>2]|0;
+  $8 = (($7) + ($4<<2)|0);
+  $9 = HEAP32[$8>>2]|0;
+  $i = $9;
+  $10 = $i;
+  $11 = $10 >>> 7;
+  $12 = $11 & 65535;
+  $13 = (($12) - 32767)|0;
+  $pos = $13;
+  $14 = $0;
+  $15 = $1;
+  _dispatch($14,$15);
+  $16 = $pos;
+  $17 = ($16|0)!=(0);
+  if (!($17)) {
+   break;
+  }
+  $18 = $pos;
+  $1 = $18;
+ }
+ STACKTOP = sp;return;
+}
+function _gen_assignment($s,$tree,$sp,$val) {
+ $s = $s|0;
+ $tree = $tree|0;
+ $sp = $sp|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
+ var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
+ var $189 = 0, $19 = 0, $190 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0;
+ var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0;
+ var $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0;
+ var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0;
+ var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $idx = 0, $lv = 0, $type = 0, $up = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $0 = $s;
+ $1 = $tree;
+ $2 = $sp;
+ $3 = $val;
+ $4 = $1;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5;
+ $type = $6;
+ $7 = $1;
+ $8 = ((($7)) + 4|0);
+ $9 = HEAP32[$8>>2]|0;
+ $1 = $9;
+ $10 = $type;
+ L1: do {
+  switch ($10|0) {
+  case 41:  {
+   $11 = $0;
+   $12 = $1;
+   $13 = $12;
+   $14 = (_new_sym_1188($11,$13)|0);
+   $idx = $14;
+   $15 = $0;
+   $16 = $2;
+   $17 = $16 & 511;
+   $18 = $17 << 23;
+   $19 = 10 | $18;
+   $20 = $idx;
+   $21 = $20 & 65535;
+   $22 = $21 << 7;
+   $23 = $19 | $22;
+   $24 = $3;
+   (_genop_peep($15,$23,$24)|0);
+   break;
+  }
+  case 39:  {
+   $25 = $0;
+   $26 = $1;
+   $27 = $26;
+   $28 = (_lv_idx($25,$27)|0);
+   $idx = $28;
+   $29 = $idx;
+   $30 = ($29|0)>(0);
+   if ($30) {
+    $31 = $idx;
+    $32 = $2;
+    $33 = ($31|0)!=($32|0);
+    if (!($33)) {
+     break L1;
+    }
+    $34 = $0;
+    $35 = $idx;
+    $36 = $35 & 511;
+    $37 = $36 << 23;
+    $38 = 1 | $37;
+    $39 = $2;
+    $40 = $39 & 511;
+    $41 = $40 << 14;
+    $42 = $38 | $41;
+    $43 = $3;
+    (_genop_peep($34,$42,$43)|0);
+    break L1;
+   }
+   $lv = 0;
+   $44 = $0;
+   $45 = ((($44)) + 164|0);
+   $46 = HEAP32[$45>>2]|0;
+   $up = $46;
+   while(1) {
+    $47 = $up;
+    $48 = ($47|0)!=(0|0);
+    if (!($48)) {
+     break L1;
+    }
+    $49 = $up;
+    $50 = $1;
+    $51 = $50;
+    $52 = (_lv_idx($49,$51)|0);
+    $idx = $52;
+    $53 = $idx;
+    $54 = ($53|0)>(0);
+    if ($54) {
+     break;
+    }
+    $69 = $lv;
+    $70 = (($69) + 1)|0;
+    $lv = $70;
+    $71 = $up;
+    $72 = ((($71)) + 164|0);
+    $73 = HEAP32[$72>>2]|0;
+    $up = $73;
+   }
+   $55 = $0;
+   $56 = $2;
+   $57 = $56 & 511;
+   $58 = $57 << 23;
+   $59 = 22 | $58;
+   $60 = $idx;
+   $61 = $60 & 511;
+   $62 = $61 << 14;
+   $63 = $59 | $62;
+   $64 = $lv;
+   $65 = $64 & 127;
+   $66 = $65 << 7;
+   $67 = $63 | $66;
+   $68 = $3;
+   (_genop_peep($55,$67,$68)|0);
+   break;
+  }
+  case 42:  {
+   $74 = $0;
+   $75 = $1;
+   $76 = $75;
+   $77 = (_new_sym_1188($74,$76)|0);
+   $idx = $77;
+   $78 = $0;
+   $79 = $2;
+   $80 = $79 & 511;
+   $81 = $80 << 23;
+   $82 = 14 | $81;
+   $83 = $idx;
+   $84 = $83 & 65535;
+   $85 = $84 << 7;
+   $86 = $82 | $85;
+   $87 = $3;
+   (_genop_peep($78,$86,$87)|0);
+   break;
+  }
+  case 44:  {
+   $88 = $0;
+   $89 = $1;
+   $90 = $89;
+   $91 = (_new_sym_1188($88,$90)|0);
+   $idx = $91;
+   $92 = $0;
+   $93 = $2;
+   $94 = $93 & 511;
+   $95 = $94 << 23;
+   $96 = 16 | $95;
+   $97 = $idx;
+   $98 = $97 & 65535;
+   $99 = $98 << 7;
+   $100 = $96 | $99;
+   $101 = $3;
+   (_genop_peep($92,$100,$101)|0);
+   break;
+  }
+  case 43:  {
+   $102 = $0;
+   $103 = $1;
+   $104 = $103;
+   $105 = (_new_sym_1188($102,$104)|0);
+   $idx = $105;
+   $106 = $0;
+   $107 = $2;
+   $108 = $107 & 511;
+   $109 = $108 << 23;
+   $110 = 18 | $109;
+   $111 = $idx;
+   $112 = $111 & 65535;
+   $113 = $112 << 7;
+   $114 = $110 | $113;
+   $115 = $3;
+   (_genop_peep($106,$114,$115)|0);
+   break;
+  }
+  case 77:  {
+   $116 = $0;
+   $117 = $1;
+   $118 = ((($117)) + 4|0);
+   $119 = HEAP32[$118>>2]|0;
+   $120 = $119;
+   $121 = (_new_sym_1188($116,$120)|0);
+   $idx = $121;
+   $122 = $0;
+   $123 = $0;
+   $124 = ((($123)) + 172|0);
+   $125 = HEAP32[$124>>2]|0;
+   $126 = $125 & 511;
+   $127 = $126 << 23;
+   $128 = 1 | $127;
+   $129 = $2;
+   $130 = $129 & 511;
+   $131 = $130 << 14;
+   $132 = $128 | $131;
+   (_genop_peep($122,$132,0)|0);
+   $133 = $0;
+   _push_($133);
+   $134 = $0;
+   $135 = $1;
+   $136 = HEAP32[$135>>2]|0;
+   _codegen($134,$136,1);
+   $137 = $0;
+   $138 = ((($137)) + 172|0);
+   $139 = HEAP32[$138>>2]|0;
+   $140 = (($139) - 2)|0;
+   HEAP32[$138>>2] = $140;
+   $141 = $0;
+   $142 = $0;
+   $143 = ((($142)) + 172|0);
+   $144 = HEAP32[$143>>2]|0;
+   $145 = $144 & 511;
+   $146 = $145 << 23;
+   $147 = 20 | $146;
+   $148 = $idx;
+   $149 = $148 & 65535;
+   $150 = $149 << 7;
+   $151 = $147 | $150;
+   $152 = $3;
+   (_genop_peep($141,$151,$152)|0);
+   break;
+  }
+  case 29:  {
+   $153 = $0;
+   _push_($153);
+   $154 = $0;
+   $155 = $1;
+   $156 = $0;
+   $157 = $1;
+   $158 = ((($157)) + 4|0);
+   $159 = HEAP32[$158>>2]|0;
+   $160 = HEAP32[$159>>2]|0;
+   $161 = $160;
+   $162 = (_attrsym($156,$161)|0);
+   $163 = $2;
+   _gen_call($154,$155,$162,$163,0);
+   $164 = $0;
+   $165 = ((($164)) + 172|0);
+   $166 = HEAP32[$165>>2]|0;
+   $167 = (($166) + -1)|0;
+   HEAP32[$165>>2] = $167;
+   $168 = $3;
+   $169 = ($168|0)!=(0);
+   if ($169) {
+    $170 = $0;
+    $171 = $0;
+    $172 = ((($171)) + 172|0);
+    $173 = HEAP32[$172>>2]|0;
+    $174 = $173 & 511;
+    $175 = $174 << 23;
+    $176 = 1 | $175;
+    $177 = $2;
+    $178 = $177 & 511;
+    $179 = $178 << 14;
+    $180 = $176 | $179;
+    $181 = $3;
+    (_genop_peep($170,$180,$181)|0);
+   }
+   break;
+  }
+  case 23:  {
+   $182 = $0;
+   $183 = $1;
+   $184 = HEAP32[$183>>2]|0;
+   $185 = $2;
+   $186 = $3;
+   _gen_vmassignment($182,$184,$185,$186);
+   break;
+  }
+  case 86:  {
+   break;
+  }
+  default: {
+   $187 = $type;
+   HEAP32[$vararg_buffer>>2] = $187;
+   (_printf(69454,$vararg_buffer)|0);
+  }
+  }
+ } while(0);
+ $188 = $3;
+ $189 = ($188|0)!=(0);
+ if (!($189)) {
+  STACKTOP = sp;return;
+ }
+ $190 = $0;
+ _push_($190);
+ STACKTOP = sp;return;
+}
+function _new_sym_1188($s,$sym) {
+ $s = $s|0;
+ $sym = $sym|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
+ var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $i = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $s;
+ $2 = $sym;
+ $i = 0;
+ while(1) {
+  $3 = $i;
+  $4 = $1;
+  $5 = ((($4)) + 216|0);
+  $6 = HEAP32[$5>>2]|0;
+  $7 = ((($6)) + 48|0);
+  $8 = HEAP32[$7>>2]|0;
+  $9 = ($3>>>0)<($8>>>0);
+  if (!($9)) {
+   break;
+  }
+  $10 = $i;
+  $11 = $1;
+  $12 = ((($11)) + 216|0);
+  $13 = HEAP32[$12>>2]|0;
+  $14 = ((($13)) + 16|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = (($15) + ($10<<2)|0);
+  $17 = HEAP32[$16>>2]|0;
+  $18 = $2;
+  $19 = ($17|0)==($18|0);
+  $20 = $i;
+  if ($19) {
+   label = 4;
+   break;
+  }
+  $21 = (($20) + 1)|0;
+  $i = $21;
+ }
+ if ((label|0) == 4) {
+  $0 = $20;
+  $90 = $0;
+  STACKTOP = sp;return ($90|0);
+ }
+ $22 = $1;
+ $23 = ((($22)) + 216|0);
+ $24 = HEAP32[$23>>2]|0;
+ $25 = ((($24)) + 48|0);
+ $26 = HEAP32[$25>>2]|0;
+ $27 = ($26>>>0)>(125);
+ if ($27) {
+  $28 = $1;
+  $29 = ((($28)) + 216|0);
+  $30 = HEAP32[$29>>2]|0;
+  $31 = ((($30)) + 48|0);
+  $32 = HEAP32[$31>>2]|0;
+  $33 = ($32>>>0)<(256);
+  if ($33) {
+   $34 = $1;
+   $35 = $1;
+   $36 = ((($35)) + 216|0);
+   $37 = HEAP32[$36>>2]|0;
+   $38 = ((($37)) + 16|0);
+   $39 = HEAP32[$38>>2]|0;
+   $40 = (_codegen_realloc($34,$39,262144)|0);
+   $41 = $1;
+   $42 = ((($41)) + 216|0);
+   $43 = HEAP32[$42>>2]|0;
+   $44 = ((($43)) + 16|0);
+   HEAP32[$44>>2] = $40;
+   $i = 0;
+   while(1) {
+    $45 = $i;
+    $46 = $1;
+    $47 = ((($46)) + 216|0);
+    $48 = HEAP32[$47>>2]|0;
+    $49 = ((($48)) + 48|0);
+    $50 = HEAP32[$49>>2]|0;
+    $51 = (256 - ($50))|0;
+    $52 = ($45>>>0)<($51>>>0);
+    if (!($52)) {
+     break;
+    }
+    $53 = $i;
+    $54 = $1;
+    $55 = ((($54)) + 216|0);
+    $56 = HEAP32[$55>>2]|0;
+    $57 = ((($56)) + 48|0);
+    $58 = HEAP32[$57>>2]|0;
+    $59 = (($53) + ($58))|0;
+    $60 = $1;
+    $61 = ((($60)) + 216|0);
+    $62 = HEAP32[$61>>2]|0;
+    $63 = ((($62)) + 16|0);
+    $64 = HEAP32[$63>>2]|0;
+    $65 = (($64) + ($59<<2)|0);
+    HEAP32[$65>>2] = 0;
+    $66 = $i;
+    $67 = (($66) + 1)|0;
+    $i = $67;
+   }
+   $68 = $1;
+   $69 = ((($68)) + 216|0);
+   $70 = HEAP32[$69>>2]|0;
+   $71 = ((($70)) + 48|0);
+   HEAP32[$71>>2] = 256;
+  }
+ }
+ $72 = $2;
+ $73 = $1;
+ $74 = ((($73)) + 216|0);
+ $75 = HEAP32[$74>>2]|0;
+ $76 = ((($75)) + 48|0);
+ $77 = HEAP32[$76>>2]|0;
+ $78 = $1;
+ $79 = ((($78)) + 216|0);
+ $80 = HEAP32[$79>>2]|0;
+ $81 = ((($80)) + 16|0);
+ $82 = HEAP32[$81>>2]|0;
+ $83 = (($82) + ($77<<2)|0);
+ HEAP32[$83>>2] = $72;
+ $84 = $1;
+ $85 = ((($84)) + 216|0);
+ $86 = HEAP32[$85>>2]|0;
+ $87 = ((($86)) + 48|0);
+ $88 = HEAP32[$87>>2]|0;
+ $89 = (($88) + 1)|0;
+ HEAP32[$87>>2] = $89;
+ $0 = $88;
+ $90 = $0;
+ STACKTOP = sp;return ($90|0);
+}
+function _genop_peep($s,$i,$val) {
+ $s = $s|0;
+ $i = $i|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
+ var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
+ var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0;
+ var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0;
+ var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0;
+ var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0;
+ var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0;
+ var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0;
+ var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0;
+ var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0;
+ var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0;
+ var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0;
+ var $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0;
+ var $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0;
+ var $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0;
+ var $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0;
+ var $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0;
+ var $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0;
+ var $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0;
+ var $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0;
+ var $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0;
+ var $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0;
+ var $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0;
+ var $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0;
+ var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0;
+ var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0;
+ var $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $c = 0, $c0 = 0, $c1 = 0, $i0 = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $1 = $s;
+ $2 = $i;
+ $3 = $val;
+ $4 = $1;
+ $5 = (_no_optimize($4)|0);
+ $6 = ($5<<24>>24)!=(0);
+ L1: do {
+  if (!($6)) {
+   $7 = $1;
+   $8 = ((($7)) + 180|0);
+   $9 = HEAP32[$8>>2]|0;
+   $10 = $1;
+   $11 = ((($10)) + 176|0);
+   $12 = HEAP32[$11>>2]|0;
+   $13 = ($9|0)!=($12|0);
+   if ($13) {
+    $14 = $1;
+    $15 = ((($14)) + 176|0);
+    $16 = HEAP32[$15>>2]|0;
+    $17 = ($16|0)>(0);
+    if ($17) {
+     $18 = $1;
+     $19 = ((($18)) + 176|0);
+     $20 = HEAP32[$19>>2]|0;
+     $21 = (($20) - 1)|0;
+     $22 = $1;
+     $23 = ((($22)) + 204|0);
+     $24 = HEAP32[$23>>2]|0;
+     $25 = (($24) + ($21<<2)|0);
+     $26 = HEAP32[$25>>2]|0;
+     $i0 = $26;
+     $27 = $2;
+     $28 = $27 & 127;
+     $c1 = $28;
+     $29 = $i0;
+     $30 = $29 & 127;
+     $c0 = $30;
+     $31 = $c1;
+     switch ($31|0) {
+     case 1:  {
+      $32 = $2;
+      $33 = $32 >>> 23;
+      $34 = $33 & 511;
+      $35 = $2;
+      $36 = $35 >>> 14;
+      $37 = $36 & 511;
+      $38 = ($34|0)==($37|0);
+      if ($38) {
+       $0 = 0;
+       $584 = $0;
+       STACKTOP = sp;return ($584|0);
+      }
+      $39 = $3;
+      $40 = ($39|0)!=(0);
+      if ($40) {
+       break L1;
+      }
+      $41 = $c0;
+      switch ($41|0) {
+      case 1:  {
+       $42 = $2;
+       $43 = $42 >>> 23;
+       $44 = $43 & 511;
+       $45 = $i0;
+       $46 = $45 >>> 23;
+       $47 = $46 & 511;
+       $48 = ($44|0)==($47|0);
+       if ($48) {
+        $49 = $1;
+        $50 = ((($49)) + 176|0);
+        $51 = HEAP32[$50>>2]|0;
+        $52 = (($51) + -1)|0;
+        HEAP32[$50>>2] = $52;
+        $53 = $2;
+        $54 = $1;
+        $55 = ((($54)) + 176|0);
+        $56 = HEAP32[$55>>2]|0;
+        $57 = $1;
+        $58 = ((($57)) + 204|0);
+        $59 = HEAP32[$58>>2]|0;
+        $60 = (($59) + ($56<<2)|0);
+        HEAP32[$60>>2] = $53;
+       }
+       $61 = $2;
+       $62 = $61 >>> 14;
+       $63 = $62 & 511;
+       $64 = $i0;
+       $65 = $64 >>> 23;
+       $66 = $65 & 511;
+       $67 = ($63|0)==($66|0);
+       if ($67) {
+        $68 = $2;
+        $69 = $68 >>> 23;
+        $70 = $69 & 511;
+        $71 = $i0;
+        $72 = $71 >>> 14;
+        $73 = $72 & 511;
+        $74 = ($70|0)==($73|0);
+        if ($74) {
+         $0 = 0;
+         $584 = $0;
+         STACKTOP = sp;return ($584|0);
+        }
+       }
+       $75 = $2;
+       $76 = $75 >>> 14;
+       $77 = $76 & 511;
+       $78 = $i0;
+       $79 = $78 >>> 23;
+       $80 = $79 & 511;
+       $81 = ($77|0)==($80|0);
+       if (!($81)) {
+        break L1;
+       }
+       $82 = $i0;
+       $83 = $82 >>> 23;
+       $84 = $83 & 511;
+       $85 = $1;
+       $86 = ((($85)) + 232|0);
+       $87 = HEAP16[$86>>1]|0;
+       $88 = $87&65535;
+       $89 = ($84|0)>=($88|0);
+       if (!($89)) {
+        break L1;
+       }
+       $90 = $1;
+       $91 = ((($90)) + 176|0);
+       $92 = HEAP32[$91>>2]|0;
+       $93 = (($92) + -1)|0;
+       HEAP32[$91>>2] = $93;
+       $94 = $1;
+       $95 = $2;
+       $96 = $95 >>> 23;
+       $97 = $96 & 511;
+       $98 = $97 & 511;
+       $99 = $98 << 23;
+       $100 = 1 | $99;
+       $101 = $i0;
+       $102 = $101 >>> 14;
+       $103 = $102 & 511;
+       $104 = $103 & 511;
+       $105 = $104 << 14;
+       $106 = $100 | $105;
+       $107 = $3;
+       $108 = (_genop_peep($94,$106,$107)|0);
+       $0 = $108;
+       $584 = $0;
+       STACKTOP = sp;return ($584|0);
+       break;
+      }
+      case 3:  {
+       $109 = $2;
+       $110 = $109 >>> 14;
+       $111 = $110 & 511;
+       $112 = $i0;
+       $113 = $112 >>> 23;
+       $114 = $113 & 511;
+       $115 = ($111|0)==($114|0);
+       if (!($115)) {
+        break L1;
+       }
+       $116 = $i0;
+       $117 = $116 >>> 23;
+       $118 = $117 & 511;
+       $119 = $1;
+       $120 = ((($119)) + 232|0);
+       $121 = HEAP16[$120>>1]|0;
+       $122 = $121&65535;
+       $123 = ($118|0)>=($122|0);
+       if (!($123)) {
+        break L1;
+       }
+       $124 = $2;
+       $125 = $124 >>> 23;
+       $126 = $125 & 511;
+       $127 = $126 & 511;
+       $128 = $127 << 23;
+       $129 = 3 | $128;
+       $130 = $i0;
+       $131 = $130 >>> 7;
+       $132 = $131 & 65535;
+       $133 = (($132) - 32767)|0;
+       $134 = (($133) + 32767)|0;
+       $135 = $134 & 65535;
+       $136 = $135 << 7;
+       $137 = $129 | $136;
+       $138 = $1;
+       $139 = ((($138)) + 176|0);
+       $140 = HEAP32[$139>>2]|0;
+       $141 = (($140) - 1)|0;
+       $142 = $1;
+       $143 = ((($142)) + 204|0);
+       $144 = HEAP32[$143>>2]|0;
+       $145 = (($144) + ($141<<2)|0);
+       HEAP32[$145>>2] = $137;
+       $0 = 0;
+       $584 = $0;
+       STACKTOP = sp;return ($584|0);
+       break;
+      }
+      case 21: case 58: case 65: case 63: case 55:  {
+       $146 = $2;
+       $147 = $146 >>> 14;
+       $148 = $147 & 511;
+       $149 = $i0;
+       $150 = $149 >>> 23;
+       $151 = $150 & 511;
+       $152 = ($148|0)==($151|0);
+       if (!($152)) {
+        break L1;
+       }
+       $153 = $i0;
+       $154 = $153 >>> 23;
+       $155 = $154 & 511;
+       $156 = $1;
+       $157 = ((($156)) + 232|0);
+       $158 = HEAP16[$157>>1]|0;
+       $159 = $158&65535;
+       $160 = ($155|0)>=($159|0);
+       if (!($160)) {
+        break L1;
+       }
+       $161 = $c0;
+       $162 = $161 & 127;
+       $163 = $2;
+       $164 = $163 >>> 23;
+       $165 = $164 & 511;
+       $166 = $165 & 511;
+       $167 = $166 << 23;
+       $168 = $162 | $167;
+       $169 = $i0;
+       $170 = $169 >>> 14;
+       $171 = $170 & 511;
+       $172 = $171 & 511;
+       $173 = $172 << 14;
+       $174 = $168 | $173;
+       $175 = $i0;
+       $176 = $175 >>> 7;
+       $177 = $176 & 127;
+       $178 = $177 & 127;
+       $179 = $178 << 7;
+       $180 = $174 | $179;
+       $181 = $1;
+       $182 = ((($181)) + 176|0);
+       $183 = HEAP32[$182>>2]|0;
+       $184 = (($183) - 1)|0;
+       $185 = $1;
+       $186 = ((($185)) + 204|0);
+       $187 = HEAP32[$186>>2]|0;
+       $188 = (($187) + ($184<<2)|0);
+       HEAP32[$188>>2] = $180;
+       $0 = 0;
+       $584 = $0;
+       STACKTOP = sp;return ($584|0);
+       break;
+      }
+      case 61: case 2: case 11: case 17: case 15: case 13: case 9: case 4:  {
+       $189 = $2;
+       $190 = $189 >>> 14;
+       $191 = $190 & 511;
+       $192 = $i0;
+       $193 = $192 >>> 23;
+       $194 = $193 & 511;
+       $195 = ($191|0)==($194|0);
+       if (!($195)) {
+        break L1;
+       }
+       $196 = $i0;
+       $197 = $196 >>> 23;
+       $198 = $197 & 511;
+       $199 = $1;
+       $200 = ((($199)) + 232|0);
+       $201 = HEAP16[$200>>1]|0;
+       $202 = $201&65535;
+       $203 = ($198|0)>=($202|0);
+       if (!($203)) {
+        break L1;
+       }
+       $204 = $c0;
+       $205 = $204 & 127;
+       $206 = $2;
+       $207 = $206 >>> 23;
+       $208 = $207 & 511;
+       $209 = $208 & 511;
+       $210 = $209 << 23;
+       $211 = $205 | $210;
+       $212 = $i0;
+       $213 = $212 >>> 7;
+       $214 = $213 & 65535;
+       $215 = $214 & 65535;
+       $216 = $215 << 7;
+       $217 = $211 | $216;
+       $218 = $1;
+       $219 = ((($218)) + 176|0);
+       $220 = HEAP32[$219>>2]|0;
+       $221 = (($220) - 1)|0;
+       $222 = $1;
+       $223 = ((($222)) + 204|0);
+       $224 = HEAP32[$223>>2]|0;
+       $225 = (($224) + ($221<<2)|0);
+       HEAP32[$225>>2] = $217;
+       $0 = 0;
+       $584 = $0;
+       STACKTOP = sp;return ($584|0);
+       break;
+      }
+      case 71:  {
+       $226 = $2;
+       $227 = $226 >>> 14;
+       $228 = $227 & 511;
+       $229 = $i0;
+       $230 = $229 >>> 23;
+       $231 = $230 & 511;
+       $232 = ($228|0)==($231|0);
+       if (!($232)) {
+        break L1;
+       }
+       $233 = $i0;
+       $234 = $233 >>> 23;
+       $235 = $234 & 511;
+       $236 = $1;
+       $237 = ((($236)) + 232|0);
+       $238 = HEAP16[$237>>1]|0;
+       $239 = $238&65535;
+       $240 = ($235|0)>=($239|0);
+       if (!($240)) {
+        break L1;
+       }
+       $241 = $c0;
+       $242 = $241 & 127;
+       $243 = $2;
+       $244 = $243 >>> 23;
+       $245 = $244 & 511;
+       $246 = $245 & 511;
+       $247 = $246 << 23;
+       $248 = $242 | $247;
+       $249 = $i0;
+       $250 = $249 >>> 14;
+       $251 = $250 & 511;
+       $252 = $251 & 511;
+       $253 = $252 << 14;
+       $254 = $248 | $253;
+       $255 = $1;
+       $256 = ((($255)) + 176|0);
+       $257 = HEAP32[$256>>2]|0;
+       $258 = (($257) - 1)|0;
+       $259 = $1;
+       $260 = ((($259)) + 204|0);
+       $261 = HEAP32[$260>>2]|0;
+       $262 = (($261) + ($258<<2)|0);
+       HEAP32[$262>>2] = $254;
+       $0 = 0;
+       $584 = $0;
+       STACKTOP = sp;return ($584|0);
+       break;
+      }
+      case 66: case 8: case 7: case 6: case 5:  {
+       $263 = $2;
+       $264 = $263 >>> 14;
+       $265 = $264 & 511;
+       $266 = $i0;
+       $267 = $266 >>> 23;
+       $268 = $267 & 511;
+       $269 = ($265|0)==($268|0);
+       if (!($269)) {
+        break L1;
+       }
+       $270 = $i0;
+       $271 = $270 >>> 23;
+       $272 = $271 & 511;
+       $273 = $1;
+       $274 = ((($273)) + 232|0);
+       $275 = HEAP16[$274>>1]|0;
+       $276 = $275&65535;
+       $277 = ($272|0)>=($276|0);
+       if (!($277)) {
+        break L1;
+       }
+       $278 = $c0;
+       $279 = $278 & 127;
+       $280 = $2;
+       $281 = $280 >>> 23;
+       $282 = $281 & 511;
+       $283 = $282 & 511;
+       $284 = $283 << 23;
+       $285 = $279 | $284;
+       $286 = $1;
+       $287 = ((($286)) + 176|0);
+       $288 = HEAP32[$287>>2]|0;
+       $289 = (($288) - 1)|0;
+       $290 = $1;
+       $291 = ((($290)) + 204|0);
+       $292 = HEAP32[$291>>2]|0;
+       $293 = (($292) + ($289<<2)|0);
+       HEAP32[$293>>2] = $285;
+       $0 = 0;
+       $584 = $0;
+       STACKTOP = sp;return ($584|0);
+       break;
+      }
+      default: {
+       break L1;
+      }
+      }
+      break;
+     }
+     case 10: case 20: case 18: case 16: case 14:  {
+      $294 = $3;
+      $295 = ($294|0)==(0);
+      $296 = $c0;
+      $297 = ($296|0)==(1);
+      $or$cond3 = $295 & $297;
+      if (!($or$cond3)) {
+       break L1;
+      }
+      $298 = $2;
+      $299 = $298 >>> 23;
+      $300 = $299 & 511;
+      $301 = $i0;
+      $302 = $301 >>> 23;
+      $303 = $302 & 511;
+      $304 = ($300|0)==($303|0);
+      if (!($304)) {
+       break L1;
+      }
+      $305 = $c1;
+      $306 = $305 & 127;
+      $307 = $i0;
+      $308 = $307 >>> 14;
+      $309 = $308 & 511;
+      $310 = $309 & 511;
+      $311 = $310 << 23;
+      $312 = $306 | $311;
+      $313 = $2;
+      $314 = $313 >>> 7;
+      $315 = $314 & 65535;
+      $316 = $315 & 65535;
+      $317 = $316 << 7;
+      $318 = $312 | $317;
+      $319 = $1;
+      $320 = ((($319)) + 176|0);
+      $321 = HEAP32[$320>>2]|0;
+      $322 = (($321) - 1)|0;
+      $323 = $1;
+      $324 = ((($323)) + 204|0);
+      $325 = HEAP32[$324>>2]|0;
+      $326 = (($325) + ($322<<2)|0);
+      HEAP32[$326>>2] = $318;
+      $0 = 0;
+      $584 = $0;
+      STACKTOP = sp;return ($584|0);
+      break;
+     }
+     case 22:  {
+      $327 = $3;
+      $328 = ($327|0)==(0);
+      $329 = $c0;
+      $330 = ($329|0)==(1);
+      $or$cond5 = $328 & $330;
+      if (!($or$cond5)) {
+       break L1;
+      }
+      $331 = $2;
+      $332 = $331 >>> 23;
+      $333 = $332 & 511;
+      $334 = $i0;
+      $335 = $334 >>> 23;
+      $336 = $335 & 511;
+      $337 = ($333|0)==($336|0);
+      if (!($337)) {
+       break L1;
+      }
+      $338 = $c1;
+      $339 = $338 & 127;
+      $340 = $i0;
+      $341 = $340 >>> 14;
+      $342 = $341 & 511;
+      $343 = $342 & 511;
+      $344 = $343 << 23;
+      $345 = $339 | $344;
+      $346 = $2;
+      $347 = $346 >>> 14;
+      $348 = $347 & 511;
+      $349 = $348 & 511;
+      $350 = $349 << 14;
+      $351 = $345 | $350;
+      $352 = $2;
+      $353 = $352 >>> 7;
+      $354 = $353 & 127;
+      $355 = $354 & 127;
+      $356 = $355 << 7;
+      $357 = $351 | $356;
+      $358 = $1;
+      $359 = ((($358)) + 176|0);
+      $360 = HEAP32[$359>>2]|0;
+      $361 = (($360) - 1)|0;
+      $362 = $1;
+      $363 = ((($362)) + 204|0);
+      $364 = HEAP32[$363>>2]|0;
+      $365 = (($364) + ($361<<2)|0);
+      HEAP32[$365>>2] = $357;
+      $0 = 0;
+      $584 = $0;
+      STACKTOP = sp;return ($584|0);
+      break;
+     }
+     case 31:  {
+      $366 = $c0;
+      $367 = ($366|0)==(31);
+      if (!($367)) {
+       break L1;
+      }
+      $368 = $i0;
+      $369 = $368 >>> 23;
+      $370 = $369 & 511;
+      $371 = $2;
+      $372 = $371 >>> 23;
+      $373 = $372 & 511;
+      $374 = (($370) + ($373))|0;
+      $375 = $374 & 511;
+      $376 = $375 << 23;
+      $377 = 31 | $376;
+      $378 = $1;
+      $379 = ((($378)) + 176|0);
+      $380 = HEAP32[$379>>2]|0;
+      $381 = (($380) - 1)|0;
+      $382 = $1;
+      $383 = ((($382)) + 204|0);
+      $384 = HEAP32[$383>>2]|0;
+      $385 = (($384) + ($381<<2)|0);
+      HEAP32[$385>>2] = $377;
+      $0 = 0;
+      $584 = $0;
+      STACKTOP = sp;return ($584|0);
+      break;
+     }
+     case 28:  {
+      $386 = $c0;
+      $387 = ($386|0)==(28);
+      if (!($387)) {
+       break L1;
+      }
+      $388 = $i0;
+      $389 = $388 >>> 23;
+      $390 = $389 & 511;
+      $391 = $2;
+      $392 = $391 >>> 23;
+      $393 = $392 & 511;
+      $394 = (($390) + ($393))|0;
+      $395 = $394 & 511;
+      $396 = $395 << 23;
+      $397 = 28 | $396;
+      $398 = $1;
+      $399 = ((($398)) + 176|0);
+      $400 = HEAP32[$399>>2]|0;
+      $401 = (($400) - 1)|0;
+      $402 = $1;
+      $403 = ((($402)) + 204|0);
+      $404 = HEAP32[$403>>2]|0;
+      $405 = (($404) + ($401<<2)|0);
+      HEAP32[$405>>2] = $397;
+      $0 = 0;
+      $584 = $0;
+      STACKTOP = sp;return ($584|0);
+      break;
+     }
+     case 41:  {
+      $406 = $c0;
+      switch ($406|0) {
+      case 41:  {
+       $0 = 0;
+       $584 = $0;
+       STACKTOP = sp;return ($584|0);
+       break;
+      }
+      case 1:  {
+       $407 = $i0;
+       $408 = $407 >>> 23;
+       $409 = $408 & 511;
+       $410 = $1;
+       $411 = ((($410)) + 232|0);
+       $412 = HEAP16[$411>>1]|0;
+       $413 = $412&65535;
+       $414 = ($409|0)>=($413|0);
+       if (!($414)) {
+        break L1;
+       }
+       $415 = $i0;
+       $416 = $415 >>> 14;
+       $417 = $416 & 511;
+       $418 = $417 & 511;
+       $419 = $418 << 23;
+       $420 = 41 | $419;
+       $421 = $1;
+       $422 = ((($421)) + 176|0);
+       $423 = HEAP32[$422>>2]|0;
+       $424 = (($423) - 1)|0;
+       $425 = $1;
+       $426 = ((($425)) + 204|0);
+       $427 = HEAP32[$426>>2]|0;
+       $428 = (($427) + ($424<<2)|0);
+       HEAP32[$428>>2] = $420;
+       $0 = 0;
+       $584 = $0;
+       STACKTOP = sp;return ($584|0);
+       break;
+      }
+      case 10: case 22: case 20: case 18: case 16: case 14:  {
+       $429 = $1;
+       $430 = ((($429)) + 176|0);
+       $431 = HEAP32[$430>>2]|0;
+       $432 = (($431) + -1)|0;
+       HEAP32[$430>>2] = $432;
+       $433 = $1;
+       $434 = $i0;
+       (_genop_peep($433,$434,0)|0);
+       $435 = $1;
+       $436 = ((($435)) + 176|0);
+       $437 = HEAP32[$436>>2]|0;
+       $438 = (($437) - 1)|0;
+       $439 = $1;
+       $440 = ((($439)) + 204|0);
+       $441 = HEAP32[$440>>2]|0;
+       $442 = (($441) + ($438<<2)|0);
+       $443 = HEAP32[$442>>2]|0;
+       $i0 = $443;
+       $444 = $1;
+       $445 = $i0;
+       $446 = $445 >>> 23;
+       $447 = $446 & 511;
+       $448 = $447 & 511;
+       $449 = $448 << 23;
+       $450 = 41 | $449;
+       $451 = (_genop($444,$450)|0);
+       $0 = $451;
+       $584 = $0;
+       STACKTOP = sp;return ($584|0);
+       break;
+      }
+      default: {
+       break L1;
+      }
+      }
+      break;
+     }
+     case 46: case 44:  {
+      $452 = $c0;
+      $453 = ($452|0)==(3);
+      if ($453) {
+       $454 = $i0;
+       $455 = $454 >>> 7;
+       $456 = $455 & 65535;
+       $457 = (($456) - 32767)|0;
+       $c = $457;
+       $458 = $c1;
+       $459 = ($458|0)==(46);
+       if ($459) {
+        $460 = $c;
+        $461 = (0 - ($460))|0;
+        $c = $461;
+       }
+       $462 = $c;
+       $463 = ($462|0)>(127);
+       $464 = $c;
+       $465 = ($464|0)<(-127);
+       $or$cond = $463 | $465;
+       if ($or$cond) {
+        break L1;
+       }
+       $466 = $c;
+       $467 = (0)<=($466|0);
+       $468 = $2;
+       $469 = $468 >>> 23;
+       $470 = $469 & 511;
+       $471 = $470 & 511;
+       $472 = $471 << 23;
+       if ($467) {
+        $473 = 45 | $472;
+        $474 = $2;
+        $475 = $474 >>> 14;
+        $476 = $475 & 511;
+        $477 = $476 & 511;
+        $478 = $477 << 14;
+        $479 = $473 | $478;
+        $480 = $c;
+        $481 = $480 & 127;
+        $482 = $481 << 7;
+        $483 = $479 | $482;
+        $484 = $1;
+        $485 = ((($484)) + 176|0);
+        $486 = HEAP32[$485>>2]|0;
+        $487 = (($486) - 1)|0;
+        $488 = $1;
+        $489 = ((($488)) + 204|0);
+        $490 = HEAP32[$489>>2]|0;
+        $491 = (($490) + ($487<<2)|0);
+        HEAP32[$491>>2] = $483;
+       } else {
+        $492 = 47 | $472;
+        $493 = $2;
+        $494 = $493 >>> 14;
+        $495 = $494 & 511;
+        $496 = $495 & 511;
+        $497 = $496 << 14;
+        $498 = $492 | $497;
+        $499 = $c;
+        $500 = (0 - ($499))|0;
+        $501 = $500 & 127;
+        $502 = $501 << 7;
+        $503 = $498 | $502;
+        $504 = $1;
+        $505 = ((($504)) + 176|0);
+        $506 = HEAP32[$505>>2]|0;
+        $507 = (($506) - 1)|0;
+        $508 = $1;
+        $509 = ((($508)) + 204|0);
+        $510 = HEAP32[$509>>2]|0;
+        $511 = (($510) + ($507<<2)|0);
+        HEAP32[$511>>2] = $503;
+       }
+       $0 = 0;
+       $584 = $0;
+       STACKTOP = sp;return ($584|0);
+      }
+      break;
+     }
+     case 62:  {
+      break;
+     }
+     case 25: case 24:  {
+      $544 = $c0;
+      $545 = ($544|0)==(1);
+      if (!($545)) {
+       break L1;
+      }
+      $546 = $2;
+      $547 = $546 >>> 23;
+      $548 = $547 & 511;
+      $549 = $i0;
+      $550 = $549 >>> 23;
+      $551 = $550 & 511;
+      $552 = ($548|0)==($551|0);
+      if (!($552)) {
+       break L1;
+      }
+      $553 = $c1;
+      $554 = $553 & 127;
+      $555 = $i0;
+      $556 = $555 >>> 14;
+      $557 = $556 & 511;
+      $558 = $557 & 511;
+      $559 = $558 << 23;
+      $560 = $554 | $559;
+      $561 = $2;
+      $562 = $561 >>> 7;
+      $563 = $562 & 65535;
+      $564 = (($563) - 32767)|0;
+      $565 = (($564) + 32767)|0;
+      $566 = $565 & 65535;
+      $567 = $566 << 7;
+      $568 = $560 | $567;
+      $569 = $1;
+      $570 = ((($569)) + 176|0);
+      $571 = HEAP32[$570>>2]|0;
+      $572 = (($571) - 1)|0;
+      $573 = $1;
+      $574 = ((($573)) + 204|0);
+      $575 = HEAP32[$574>>2]|0;
+      $576 = (($575) + ($572<<2)|0);
+      HEAP32[$576>>2] = $568;
+      $577 = $1;
+      $578 = ((($577)) + 176|0);
+      $579 = HEAP32[$578>>2]|0;
+      $580 = (($579) - 1)|0;
+      $0 = $580;
+      $584 = $0;
+      STACKTOP = sp;return ($584|0);
+      break;
+     }
+     default: {
+      break L1;
+     }
+     }
+     $512 = $c0;
+     $513 = ($512|0)==(61);
+     if ($513) {
+      $514 = $i0;
+      $515 = $514 >>> 7;
+      $516 = $515 & 65535;
+      $517 = $1;
+      $518 = ((($517)) + 216|0);
+      $519 = HEAP32[$518>>2]|0;
+      $520 = ((($519)) + 12|0);
+      $521 = HEAP32[$520>>2]|0;
+      $522 = (($521) + ($516<<3)|0);
+      ;HEAP32[$v>>2]=HEAP32[$522>>2]|0;HEAP32[$v+4>>2]=HEAP32[$522+4>>2]|0;
+      $523 = ((($v)) + 4|0);
+      $524 = HEAP32[$523>>2]|0;
+      $525 = ($524|0)==(16);
+      if ($525) {
+       $526 = HEAP32[$v>>2]|0;
+       $527 = HEAP32[$526>>2]|0;
+       $528 = $527 >>> 11;
+       $529 = $528 & 8;
+       $530 = ($529|0)!=(0);
+       $531 = HEAP32[$v>>2]|0;
+       if ($530) {
+        $532 = HEAP32[$531>>2]|0;
+        $533 = $532 >>> 11;
+        $534 = $533 & 496;
+        $535 = $534 >> 4;
+        $538 = $535;
+       } else {
+        $536 = ((($531)) + 12|0);
+        $537 = HEAP32[$536>>2]|0;
+        $538 = $537;
+       }
+       $539 = ($538|0)==(0);
+       if ($539) {
+        $540 = $1;
+        $541 = ((($540)) + 176|0);
+        $542 = HEAP32[$541>>2]|0;
+        $543 = (($542) + -1)|0;
+        HEAP32[$541>>2] = $543;
+        $0 = 0;
+        $584 = $0;
+        STACKTOP = sp;return ($584|0);
+       }
+      }
+     }
+    }
+   }
+  }
+ } while(0);
+ $581 = $1;
+ $582 = $2;
+ $583 = (_genop($581,$582)|0);
+ $0 = $583;
+ $584 = $0;
+ STACKTOP = sp;return ($584|0);
+}
+function _no_optimize($s) {
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $s;
+ $2 = $1;
+ $3 = ($2|0)!=(0|0);
+ if ($3) {
+  $4 = $1;
+  $5 = ((($4)) + 248|0);
+  $6 = HEAP32[$5>>2]|0;
+  $7 = ($6|0)!=(0|0);
+  if ($7) {
+   $8 = $1;
+   $9 = ((($8)) + 248|0);
+   $10 = HEAP32[$9>>2]|0;
+   $11 = ((($10)) + 1148|0);
+   $12 = HEAP8[$11>>0]|0;
+   $13 = $12 & 1;
+   $14 = $13&255;
+   $15 = ($14|0)!=(0);
+   if ($15) {
+    $0 = 1;
+    $16 = $0;
+    STACKTOP = sp;return ($16|0);
+   }
+  }
+ }
+ $0 = 0;
+ $16 = $0;
+ STACKTOP = sp;return ($16|0);
+}
+function _attrsym($s,$a) {
+ $s = $s|0;
+ $a = $a|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $len = 0, $name = 0, $name2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $len = sp + 4|0;
+ $0 = $s;
+ $1 = $a;
+ $2 = $0;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $1;
+ $5 = (_mrb_sym2name_len($3,$4,$len)|0);
+ $name = $5;
+ $6 = $0;
+ $7 = HEAP32[$len>>2]|0;
+ $8 = (($7) + 1)|0;
+ $9 = (($8) + 1)|0;
+ $10 = (_codegen_palloc($6,$9)|0);
+ $name2 = $10;
+ $11 = $name2;
+ $12 = $name;
+ $13 = HEAP32[$len>>2]|0;
+ _memcpy(($11|0),($12|0),($13|0))|0;
+ $14 = HEAP32[$len>>2]|0;
+ $15 = $name2;
+ $16 = (($15) + ($14)|0);
+ HEAP8[$16>>0] = 61;
+ $17 = HEAP32[$len>>2]|0;
+ $18 = (($17) + 1)|0;
+ $19 = $name2;
+ $20 = (($19) + ($18)|0);
+ HEAP8[$20>>0] = 0;
+ $21 = $0;
+ $22 = HEAP32[$21>>2]|0;
+ $23 = $name2;
+ $24 = HEAP32[$len>>2]|0;
+ $25 = (($24) + 1)|0;
+ $26 = (_mrb_intern($22,$23,$25)|0);
+ STACKTOP = sp;return ($26|0);
+}
+function _gen_call($s,$tree,$name,$sp,$val) {
+ $s = $s|0;
+ $tree = $tree|0;
+ $name = $name|0;
+ $sp = $sp|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
+ var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
+ var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0;
+ var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0;
+ var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0;
+ var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0;
+ var $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0;
+ var $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0;
+ var $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0;
+ var $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0;
+ var $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0;
+ var $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0;
+ var $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0;
+ var $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0;
+ var $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $blk = 0, $idx = 0, $n = 0, $noop = 0, $or$cond = 0;
+ var $or$cond11 = 0, $or$cond13 = 0, $or$cond15 = 0, $or$cond17 = 0, $or$cond3 = 0, $or$cond5 = 0, $or$cond7 = 0, $or$cond9 = 0, $sendv = 0, $sym = 0, $symlen = 0, $symname = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $symlen = sp + 4|0;
+ $0 = $s;
+ $1 = $tree;
+ $2 = $name;
+ $3 = $sp;
+ $4 = $val;
+ $5 = $2;
+ $6 = ($5|0)!=(0);
+ if ($6) {
+  $7 = $2;
+  $13 = $7;
+ } else {
+  $8 = $1;
+  $9 = ((($8)) + 4|0);
+  $10 = HEAP32[$9>>2]|0;
+  $11 = HEAP32[$10>>2]|0;
+  $12 = $11;
+  $13 = $12;
+ }
+ $sym = $13;
+ $n = 0;
+ $noop = 0;
+ $sendv = 0;
+ $blk = 0;
+ $14 = $0;
+ $15 = $1;
+ $16 = HEAP32[$15>>2]|0;
+ _codegen($14,$16,1);
+ $17 = $0;
+ $18 = $sym;
+ $19 = (_new_msym($17,$18)|0);
+ $idx = $19;
+ $20 = $1;
+ $21 = ((($20)) + 4|0);
+ $22 = HEAP32[$21>>2]|0;
+ $23 = ((($22)) + 4|0);
+ $24 = HEAP32[$23>>2]|0;
+ $25 = HEAP32[$24>>2]|0;
+ $1 = $25;
+ $26 = $1;
+ $27 = ($26|0)!=(0|0);
+ if ($27) {
+  $28 = $0;
+  $29 = $1;
+  $30 = HEAP32[$29>>2]|0;
+  $31 = (_gen_values($28,$30,1)|0);
+  $n = $31;
+  $32 = $n;
+  $33 = ($32|0)<(0);
+  if ($33) {
+   $sendv = 1;
+   $noop = 1;
+   $n = 1;
+   $34 = $0;
+   _push_($34);
+  }
+ }
+ $35 = $3;
+ $36 = ($35|0)!=(0);
+ do {
+  if ($36) {
+   $37 = $sendv;
+   $38 = ($37|0)!=(0);
+   $39 = $0;
+   if ($38) {
+    $40 = ((($39)) + 172|0);
+    $41 = HEAP32[$40>>2]|0;
+    $42 = (($41) + -1)|0;
+    HEAP32[$40>>2] = $42;
+    $43 = $0;
+    $44 = $0;
+    $45 = ((($44)) + 172|0);
+    $46 = HEAP32[$45>>2]|0;
+    $47 = $46 & 511;
+    $48 = $47 << 23;
+    $49 = 57 | $48;
+    $50 = $3;
+    $51 = $50 & 511;
+    $52 = $51 << 14;
+    $53 = $49 | $52;
+    (_genop($43,$53)|0);
+    $54 = $0;
+    _push_($54);
+    break;
+   } else {
+    $55 = $0;
+    $56 = ((($55)) + 172|0);
+    $57 = HEAP32[$56>>2]|0;
+    $58 = $57 & 511;
+    $59 = $58 << 23;
+    $60 = 1 | $59;
+    $61 = $3;
+    $62 = $61 & 511;
+    $63 = $62 << 14;
+    $64 = $60 | $63;
+    (_genop($39,$64)|0);
+    $65 = $0;
+    _push_($65);
+    $66 = $n;
+    $67 = (($66) + 1)|0;
+    $n = $67;
+    break;
+   }
+  }
+ } while(0);
+ $68 = $1;
+ $69 = ($68|0)!=(0|0);
+ if ($69) {
+  $70 = $1;
+  $71 = ((($70)) + 4|0);
+  $72 = HEAP32[$71>>2]|0;
+  $73 = ($72|0)!=(0|0);
+  if ($73) {
+   $noop = 1;
+   $74 = $0;
+   $75 = $1;
+   $76 = ((($75)) + 4|0);
+   $77 = HEAP32[$76>>2]|0;
+   _codegen($74,$77,1);
+   $78 = $0;
+   $79 = ((($78)) + 172|0);
+   $80 = HEAP32[$79>>2]|0;
+   $81 = (($80) + -1)|0;
+   HEAP32[$79>>2] = $81;
+  } else {
+   label = 14;
+  }
+ } else {
+  label = 14;
+ }
+ if ((label|0) == 14) {
+  $82 = $0;
+  $83 = ((($82)) + 172|0);
+  $84 = HEAP32[$83>>2]|0;
+  $blk = $84;
+ }
+ $85 = $0;
+ _push_($85);
+ $86 = $0;
+ $87 = ((($86)) + 172|0);
+ $88 = HEAP32[$87>>2]|0;
+ $89 = (($88) + -1)|0;
+ HEAP32[$87>>2] = $89;
+ $90 = $n;
+ $91 = (($90) + 1)|0;
+ $92 = $0;
+ $93 = ((($92)) + 172|0);
+ $94 = HEAP32[$93>>2]|0;
+ $95 = (($94) - ($91))|0;
+ HEAP32[$93>>2] = $95;
+ $96 = $0;
+ $97 = HEAP32[$96>>2]|0;
+ $98 = $sym;
+ $99 = (_mrb_sym2name_len($97,$98,$symlen)|0);
+ $symname = $99;
+ $100 = $noop;
+ $101 = ($100|0)==(0);
+ $102 = HEAP32[$symlen>>2]|0;
+ $103 = ($102|0)==(1);
+ $or$cond = $101 & $103;
+ if ($or$cond) {
+  $104 = $symname;
+  $105 = HEAP8[$104>>0]|0;
+  $106 = $105 << 24 >> 24;
+  $107 = ($106|0)==(43);
+  if ($107) {
+   $108 = $0;
+   $109 = $0;
+   $110 = ((($109)) + 172|0);
+   $111 = HEAP32[$110>>2]|0;
+   $112 = $111 & 511;
+   $113 = $112 << 23;
+   $114 = 44 | $113;
+   $115 = $idx;
+   $116 = $115 & 511;
+   $117 = $116 << 14;
+   $118 = $114 | $117;
+   $119 = $n;
+   $120 = $119 & 127;
+   $121 = $120 << 7;
+   $122 = $118 | $121;
+   $123 = $4;
+   (_genop_peep($108,$122,$123)|0);
+  } else {
+   label = 18;
+  }
+ } else {
+  label = 18;
+ }
+ do {
+  if ((label|0) == 18) {
+   $124 = $noop;
+   $125 = ($124|0)==(0);
+   $126 = HEAP32[$symlen>>2]|0;
+   $127 = ($126|0)==(1);
+   $or$cond3 = $125 & $127;
+   if ($or$cond3) {
+    $128 = $symname;
+    $129 = HEAP8[$128>>0]|0;
+    $130 = $129 << 24 >> 24;
+    $131 = ($130|0)==(45);
+    if ($131) {
+     $132 = $0;
+     $133 = $0;
+     $134 = ((($133)) + 172|0);
+     $135 = HEAP32[$134>>2]|0;
+     $136 = $135 & 511;
+     $137 = $136 << 23;
+     $138 = 46 | $137;
+     $139 = $idx;
+     $140 = $139 & 511;
+     $141 = $140 << 14;
+     $142 = $138 | $141;
+     $143 = $n;
+     $144 = $143 & 127;
+     $145 = $144 << 7;
+     $146 = $142 | $145;
+     $147 = $4;
+     (_genop_peep($132,$146,$147)|0);
+     break;
+    }
+   }
+   $148 = $noop;
+   $149 = ($148|0)==(0);
+   $150 = HEAP32[$symlen>>2]|0;
+   $151 = ($150|0)==(1);
+   $or$cond5 = $149 & $151;
+   if ($or$cond5) {
+    $152 = $symname;
+    $153 = HEAP8[$152>>0]|0;
+    $154 = $153 << 24 >> 24;
+    $155 = ($154|0)==(42);
+    if ($155) {
+     $156 = $0;
+     $157 = $0;
+     $158 = ((($157)) + 172|0);
+     $159 = HEAP32[$158>>2]|0;
+     $160 = $159 & 511;
+     $161 = $160 << 23;
+     $162 = 48 | $161;
+     $163 = $idx;
+     $164 = $163 & 511;
+     $165 = $164 << 14;
+     $166 = $162 | $165;
+     $167 = $n;
+     $168 = $167 & 127;
+     $169 = $168 << 7;
+     $170 = $166 | $169;
+     (_genop($156,$170)|0);
+     break;
+    }
+   }
+   $171 = $noop;
+   $172 = ($171|0)==(0);
+   $173 = HEAP32[$symlen>>2]|0;
+   $174 = ($173|0)==(1);
+   $or$cond7 = $172 & $174;
+   if ($or$cond7) {
+    $175 = $symname;
+    $176 = HEAP8[$175>>0]|0;
+    $177 = $176 << 24 >> 24;
+    $178 = ($177|0)==(47);
+    if ($178) {
+     $179 = $0;
+     $180 = $0;
+     $181 = ((($180)) + 172|0);
+     $182 = HEAP32[$181>>2]|0;
+     $183 = $182 & 511;
+     $184 = $183 << 23;
+     $185 = 49 | $184;
+     $186 = $idx;
+     $187 = $186 & 511;
+     $188 = $187 << 14;
+     $189 = $185 | $188;
+     $190 = $n;
+     $191 = $190 & 127;
+     $192 = $191 << 7;
+     $193 = $189 | $192;
+     (_genop($179,$193)|0);
+     break;
+    }
+   }
+   $194 = $noop;
+   $195 = ($194|0)==(0);
+   $196 = HEAP32[$symlen>>2]|0;
+   $197 = ($196|0)==(1);
+   $or$cond9 = $195 & $197;
+   if ($or$cond9) {
+    $198 = $symname;
+    $199 = HEAP8[$198>>0]|0;
+    $200 = $199 << 24 >> 24;
+    $201 = ($200|0)==(60);
+    if ($201) {
+     $202 = $0;
+     $203 = $0;
+     $204 = ((($203)) + 172|0);
+     $205 = HEAP32[$204>>2]|0;
+     $206 = $205 & 511;
+     $207 = $206 << 23;
+     $208 = 51 | $207;
+     $209 = $idx;
+     $210 = $209 & 511;
+     $211 = $210 << 14;
+     $212 = $208 | $211;
+     $213 = $n;
+     $214 = $213 & 127;
+     $215 = $214 << 7;
+     $216 = $212 | $215;
+     (_genop($202,$216)|0);
+     break;
+    }
+   }
+   $217 = $noop;
+   $218 = ($217|0)==(0);
+   $219 = HEAP32[$symlen>>2]|0;
+   $220 = ($219|0)==(2);
+   $or$cond11 = $218 & $220;
+   if ($or$cond11) {
+    $221 = $symname;
+    $222 = HEAP8[$221>>0]|0;
+    $223 = $222 << 24 >> 24;
+    $224 = ($223|0)==(60);
+    if ($224) {
+     $225 = $symname;
+     $226 = ((($225)) + 1|0);
+     $227 = HEAP8[$226>>0]|0;
+     $228 = $227 << 24 >> 24;
+     $229 = ($228|0)==(61);
+     if ($229) {
+      $230 = $0;
+      $231 = $0;
+      $232 = ((($231)) + 172|0);
+      $233 = HEAP32[$232>>2]|0;
+      $234 = $233 & 511;
+      $235 = $234 << 23;
+      $236 = 52 | $235;
+      $237 = $idx;
+      $238 = $237 & 511;
+      $239 = $238 << 14;
+      $240 = $236 | $239;
+      $241 = $n;
+      $242 = $241 & 127;
+      $243 = $242 << 7;
+      $244 = $240 | $243;
+      (_genop($230,$244)|0);
+      break;
+     }
+    }
+   }
+   $245 = $noop;
+   $246 = ($245|0)==(0);
+   $247 = HEAP32[$symlen>>2]|0;
+   $248 = ($247|0)==(1);
+   $or$cond13 = $246 & $248;
+   if ($or$cond13) {
+    $249 = $symname;
+    $250 = HEAP8[$249>>0]|0;
+    $251 = $250 << 24 >> 24;
+    $252 = ($251|0)==(62);
+    if ($252) {
+     $253 = $0;
+     $254 = $0;
+     $255 = ((($254)) + 172|0);
+     $256 = HEAP32[$255>>2]|0;
+     $257 = $256 & 511;
+     $258 = $257 << 23;
+     $259 = 53 | $258;
+     $260 = $idx;
+     $261 = $260 & 511;
+     $262 = $261 << 14;
+     $263 = $259 | $262;
+     $264 = $n;
+     $265 = $264 & 127;
+     $266 = $265 << 7;
+     $267 = $263 | $266;
+     (_genop($253,$267)|0);
+     break;
+    }
+   }
+   $268 = $noop;
+   $269 = ($268|0)==(0);
+   $270 = HEAP32[$symlen>>2]|0;
+   $271 = ($270|0)==(2);
+   $or$cond15 = $269 & $271;
+   if ($or$cond15) {
+    $272 = $symname;
+    $273 = HEAP8[$272>>0]|0;
+    $274 = $273 << 24 >> 24;
+    $275 = ($274|0)==(62);
+    if ($275) {
+     $276 = $symname;
+     $277 = ((($276)) + 1|0);
+     $278 = HEAP8[$277>>0]|0;
+     $279 = $278 << 24 >> 24;
+     $280 = ($279|0)==(61);
+     if ($280) {
+      $281 = $0;
+      $282 = $0;
+      $283 = ((($282)) + 172|0);
+      $284 = HEAP32[$283>>2]|0;
+      $285 = $284 & 511;
+      $286 = $285 << 23;
+      $287 = 54 | $286;
+      $288 = $idx;
+      $289 = $288 & 511;
+      $290 = $289 << 14;
+      $291 = $287 | $290;
+      $292 = $n;
+      $293 = $292 & 127;
+      $294 = $293 << 7;
+      $295 = $291 | $294;
+      (_genop($281,$295)|0);
+      break;
+     }
+    }
+   }
+   $296 = $noop;
+   $297 = ($296|0)==(0);
+   $298 = HEAP32[$symlen>>2]|0;
+   $299 = ($298|0)==(2);
+   $or$cond17 = $297 & $299;
+   if ($or$cond17) {
+    $300 = $symname;
+    $301 = HEAP8[$300>>0]|0;
+    $302 = $301 << 24 >> 24;
+    $303 = ($302|0)==(61);
+    if ($303) {
+     $304 = $symname;
+     $305 = ((($304)) + 1|0);
+     $306 = HEAP8[$305>>0]|0;
+     $307 = $306 << 24 >> 24;
+     $308 = ($307|0)==(61);
+     if ($308) {
+      $309 = $0;
+      $310 = $0;
+      $311 = ((($310)) + 172|0);
+      $312 = HEAP32[$311>>2]|0;
+      $313 = $312 & 511;
+      $314 = $313 << 23;
+      $315 = 50 | $314;
+      $316 = $idx;
+      $317 = $316 & 511;
+      $318 = $317 << 14;
+      $319 = $315 | $318;
+      $320 = $n;
+      $321 = $320 & 127;
+      $322 = $321 << 7;
+      $323 = $319 | $322;
+      (_genop($309,$323)|0);
+      break;
+     }
+    }
+   }
+   $324 = $sendv;
+   $325 = ($324|0)!=(0);
+   if ($325) {
+    $n = 127;
+   }
+   $326 = $blk;
+   $327 = ($326|0)>(0);
+   $328 = $0;
+   $329 = $0;
+   $330 = ((($329)) + 172|0);
+   $331 = HEAP32[$330>>2]|0;
+   $332 = $331 & 511;
+   $333 = $332 << 23;
+   if ($327) {
+    $334 = 32 | $333;
+    $335 = $idx;
+    $336 = $335 & 511;
+    $337 = $336 << 14;
+    $338 = $334 | $337;
+    $339 = $n;
+    $340 = $339 & 127;
+    $341 = $340 << 7;
+    $342 = $338 | $341;
+    (_genop($328,$342)|0);
+    break;
+   } else {
+    $343 = 33 | $333;
+    $344 = $idx;
+    $345 = $344 & 511;
+    $346 = $345 << 14;
+    $347 = $343 | $346;
+    $348 = $n;
+    $349 = $348 & 127;
+    $350 = $349 << 7;
+    $351 = $347 | $350;
+    (_genop($328,$351)|0);
+    break;
+   }
+  }
+ } while(0);
+ $352 = $4;
+ $353 = ($352|0)!=(0);
+ if (!($353)) {
+  STACKTOP = sp;return;
+ }
+ $354 = $0;
+ _push_($354);
+ STACKTOP = sp;return;
+}
+function _gen_values($s,$t,$val) {
+ $s = $s|0;
+ $t = $t|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $16 = 0, $17 = 0;
+ var $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0;
+ var $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0;
+ var $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0;
+ var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0;
+ var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $is_splat = 0, $n = 0, $or$cond = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $s;
+ $2 = $t;
+ $3 = $val;
+ $n = 0;
+ while(1) {
+  $4 = $2;
+  $5 = ($4|0)!=(0|0);
+  if (!($5)) {
+   label = 19;
+   break;
+  }
+  $6 = $2;
+  $7 = HEAP32[$6>>2]|0;
+  $8 = HEAP32[$7>>2]|0;
+  $9 = $8;
+  $10 = ($9|0)==(66);
+  $11 = $10&1;
+  $is_splat = $11;
+  $12 = $n;
+  $13 = ($12|0)>=(127);
+  $14 = $is_splat;
+  $15 = ($14|0)!=(0);
+  $or$cond = $13 | $15;
+  if ($or$cond) {
+   break;
+  }
+  $139 = $1;
+  $140 = $2;
+  $141 = HEAP32[$140>>2]|0;
+  $142 = $3;
+  _codegen($139,$141,$142);
+  $143 = $n;
+  $144 = (($143) + 1)|0;
+  $n = $144;
+  $145 = $2;
+  $146 = ((($145)) + 4|0);
+  $147 = HEAP32[$146>>2]|0;
+  $2 = $147;
+ }
+ if ((label|0) == 19) {
+  $148 = $n;
+  $0 = $148;
+  $149 = $0;
+  STACKTOP = sp;return ($149|0);
+ }
+ $16 = $3;
+ $17 = ($16|0)!=(0);
+ L9: do {
+  if ($17) {
+   $18 = $n;
+   $19 = $1;
+   $20 = ((($19)) + 172|0);
+   $21 = HEAP32[$20>>2]|0;
+   $22 = (($21) - ($18))|0;
+   HEAP32[$20>>2] = $22;
+   $23 = $1;
+   $24 = $1;
+   $25 = ((($24)) + 172|0);
+   $26 = HEAP32[$25>>2]|0;
+   $27 = $26 & 511;
+   $28 = $27 << 23;
+   $29 = 55 | $28;
+   $30 = $1;
+   $31 = ((($30)) + 172|0);
+   $32 = HEAP32[$31>>2]|0;
+   $33 = $32 & 511;
+   $34 = $33 << 14;
+   $35 = $29 | $34;
+   $36 = $n;
+   $37 = $36 & 127;
+   $38 = $37 << 7;
+   $39 = $35 | $38;
+   (_genop($23,$39)|0);
+   $40 = $1;
+   _push_($40);
+   $41 = $1;
+   $42 = $2;
+   $43 = HEAP32[$42>>2]|0;
+   _codegen($41,$43,1);
+   $44 = $1;
+   $45 = ((($44)) + 172|0);
+   $46 = HEAP32[$45>>2]|0;
+   $47 = (($46) + -1)|0;
+   HEAP32[$45>>2] = $47;
+   $48 = $1;
+   $49 = ((($48)) + 172|0);
+   $50 = HEAP32[$49>>2]|0;
+   $51 = (($50) + -1)|0;
+   HEAP32[$49>>2] = $51;
+   $52 = $is_splat;
+   $53 = ($52|0)!=(0);
+   $54 = $1;
+   $55 = $1;
+   $56 = ((($55)) + 172|0);
+   $57 = HEAP32[$56>>2]|0;
+   $58 = $57 & 511;
+   $59 = $58 << 23;
+   if ($53) {
+    $60 = 56 | $59;
+    $61 = $1;
+    $62 = ((($61)) + 172|0);
+    $63 = HEAP32[$62>>2]|0;
+    $64 = (($63) + 1)|0;
+    $65 = $64 & 511;
+    $66 = $65 << 14;
+    $67 = $60 | $66;
+    (_genop($54,$67)|0);
+   } else {
+    $68 = 57 | $59;
+    $69 = $1;
+    $70 = ((($69)) + 172|0);
+    $71 = HEAP32[$70>>2]|0;
+    $72 = (($71) + 1)|0;
+    $73 = $72 & 511;
+    $74 = $73 << 14;
+    $75 = $68 | $74;
+    (_genop($54,$75)|0);
+   }
+   $76 = $2;
+   $77 = ((($76)) + 4|0);
+   $78 = HEAP32[$77>>2]|0;
+   $2 = $78;
+   while(1) {
+    $79 = $2;
+    $80 = ($79|0)!=(0|0);
+    if (!($80)) {
+     break L9;
+    }
+    $81 = $1;
+    _push_($81);
+    $82 = $1;
+    $83 = $2;
+    $84 = HEAP32[$83>>2]|0;
+    _codegen($82,$84,1);
+    $85 = $1;
+    $86 = ((($85)) + 172|0);
+    $87 = HEAP32[$86>>2]|0;
+    $88 = (($87) + -1)|0;
+    HEAP32[$86>>2] = $88;
+    $89 = $1;
+    $90 = ((($89)) + 172|0);
+    $91 = HEAP32[$90>>2]|0;
+    $92 = (($91) + -1)|0;
+    HEAP32[$90>>2] = $92;
+    $93 = $2;
+    $94 = HEAP32[$93>>2]|0;
+    $95 = HEAP32[$94>>2]|0;
+    $96 = $95;
+    $97 = ($96|0)==(66);
+    $98 = $1;
+    $99 = $1;
+    $100 = ((($99)) + 172|0);
+    $101 = HEAP32[$100>>2]|0;
+    $102 = $101 & 511;
+    $103 = $102 << 23;
+    if ($97) {
+     $104 = 56 | $103;
+     $105 = $1;
+     $106 = ((($105)) + 172|0);
+     $107 = HEAP32[$106>>2]|0;
+     $108 = (($107) + 1)|0;
+     $109 = $108 & 511;
+     $110 = $109 << 14;
+     $111 = $104 | $110;
+     (_genop($98,$111)|0);
+    } else {
+     $112 = 57 | $103;
+     $113 = $1;
+     $114 = ((($113)) + 172|0);
+     $115 = HEAP32[$114>>2]|0;
+     $116 = (($115) + 1)|0;
+     $117 = $116 & 511;
+     $118 = $117 << 14;
+     $119 = $112 | $118;
+     (_genop($98,$119)|0);
+    }
+    $120 = $2;
+    $121 = ((($120)) + 4|0);
+    $122 = HEAP32[$121>>2]|0;
+    $2 = $122;
+   }
+  } else {
+   $123 = $1;
+   $124 = $2;
+   $125 = HEAP32[$124>>2]|0;
+   $126 = ((($125)) + 4|0);
+   $127 = HEAP32[$126>>2]|0;
+   _codegen($123,$127,0);
+   $128 = $2;
+   $129 = ((($128)) + 4|0);
+   $130 = HEAP32[$129>>2]|0;
+   $2 = $130;
+   while(1) {
+    $131 = $2;
+    $132 = ($131|0)!=(0|0);
+    if (!($132)) {
+     break L9;
+    }
+    $133 = $1;
+    $134 = $2;
+    $135 = HEAP32[$134>>2]|0;
+    _codegen($133,$135,0);
+    $136 = $2;
+    $137 = ((($136)) + 4|0);
+    $138 = HEAP32[$137>>2]|0;
+    $2 = $138;
+   }
+  }
+ } while(0);
+ $0 = -1;
+ $149 = $0;
+ STACKTOP = sp;return ($149|0);
+}
+function _gen_vmassignment($s,$tree,$rhs,$val) {
+ $s = $s|0;
+ $tree = $tree|0;
+ $rhs = $rhs|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $14 = 0;
+ var $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0;
+ var $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0;
+ var $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0;
+ var $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0;
+ var $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $n = 0, $p = 0, $post = 0, $t = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $tree;
+ $2 = $rhs;
+ $3 = $val;
+ $n = 0;
+ $post = 0;
+ $4 = $1;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = ($5|0)!=(0|0);
+ L1: do {
+  if ($6) {
+   $7 = $1;
+   $8 = HEAP32[$7>>2]|0;
+   $t = $8;
+   $n = 0;
+   while(1) {
+    $9 = $t;
+    $10 = ($9|0)!=(0|0);
+    if (!($10)) {
+     break L1;
+    }
+    $11 = $0;
+    $12 = $0;
+    $13 = ((($12)) + 172|0);
+    $14 = HEAP32[$13>>2]|0;
+    $15 = $14 & 511;
+    $16 = $15 << 23;
+    $17 = 58 | $16;
+    $18 = $2;
+    $19 = $18 & 511;
+    $20 = $19 << 14;
+    $21 = $17 | $20;
+    $22 = $n;
+    $23 = $22 & 127;
+    $24 = $23 << 7;
+    $25 = $21 | $24;
+    (_genop($11,$25)|0);
+    $26 = $0;
+    $27 = $t;
+    $28 = HEAP32[$27>>2]|0;
+    $29 = $0;
+    $30 = ((($29)) + 172|0);
+    $31 = HEAP32[$30>>2]|0;
+    _gen_assignment($26,$28,$31,0);
+    $32 = $n;
+    $33 = (($32) + 1)|0;
+    $n = $33;
+    $34 = $t;
+    $35 = ((($34)) + 4|0);
+    $36 = HEAP32[$35>>2]|0;
+    $t = $36;
+   }
+  }
+ } while(0);
+ $37 = $1;
+ $38 = ((($37)) + 4|0);
+ $39 = HEAP32[$38>>2]|0;
+ $t = $39;
+ $40 = $t;
+ $41 = ($40|0)!=(0|0);
+ if (!($41)) {
+  STACKTOP = sp;return;
+ }
+ $42 = $t;
+ $43 = ((($42)) + 4|0);
+ $44 = HEAP32[$43>>2]|0;
+ $45 = ($44|0)!=(0|0);
+ L10: do {
+  if ($45) {
+   $46 = $t;
+   $47 = ((($46)) + 4|0);
+   $48 = HEAP32[$47>>2]|0;
+   $49 = HEAP32[$48>>2]|0;
+   $p = $49;
+   while(1) {
+    $50 = $p;
+    $51 = ($50|0)!=(0|0);
+    if (!($51)) {
+     break L10;
+    }
+    $52 = $post;
+    $53 = (($52) + 1)|0;
+    $post = $53;
+    $54 = $p;
+    $55 = ((($54)) + 4|0);
+    $56 = HEAP32[$55>>2]|0;
+    $p = $56;
+   }
+  }
+ } while(0);
+ $57 = $3;
+ $58 = ($57|0)!=(0);
+ $59 = $0;
+ if ($58) {
+  $60 = $0;
+  $61 = ((($60)) + 172|0);
+  $62 = HEAP32[$61>>2]|0;
+  $63 = $62 & 511;
+  $64 = $63 << 23;
+  $65 = 1 | $64;
+  $66 = $2;
+  $67 = $66 & 511;
+  $68 = $67 << 14;
+  $69 = $65 | $68;
+  (_genop($59,$69)|0);
+ } else {
+  $70 = ((($59)) + 172|0);
+  $71 = HEAP32[$70>>2]|0;
+  $72 = (($71) + -1)|0;
+  HEAP32[$70>>2] = $72;
+ }
+ $73 = $0;
+ $74 = $post;
+ _push_n_($73,$74);
+ $75 = $post;
+ $76 = $0;
+ $77 = ((($76)) + 172|0);
+ $78 = HEAP32[$77>>2]|0;
+ $79 = (($78) - ($75))|0;
+ HEAP32[$77>>2] = $79;
+ $80 = $0;
+ $81 = $0;
+ $82 = ((($81)) + 172|0);
+ $83 = HEAP32[$82>>2]|0;
+ $84 = $83 & 511;
+ $85 = $84 << 23;
+ $86 = 60 | $85;
+ $87 = $n;
+ $88 = $87 & 511;
+ $89 = $88 << 14;
+ $90 = $86 | $89;
+ $91 = $post;
+ $92 = $91 & 127;
+ $93 = $92 << 7;
+ $94 = $90 | $93;
+ (_genop($80,$94)|0);
+ $n = 1;
+ $95 = $t;
+ $96 = HEAP32[$95>>2]|0;
+ $97 = ($96|0)!=(0|0);
+ if ($97) {
+  $98 = $0;
+  $99 = $t;
+  $100 = HEAP32[$99>>2]|0;
+  $101 = $0;
+  $102 = ((($101)) + 172|0);
+  $103 = HEAP32[$102>>2]|0;
+  _gen_assignment($98,$100,$103,0);
+ }
+ $104 = $t;
+ $105 = ((($104)) + 4|0);
+ $106 = HEAP32[$105>>2]|0;
+ $107 = ($106|0)!=(0|0);
+ L23: do {
+  if ($107) {
+   $108 = $t;
+   $109 = ((($108)) + 4|0);
+   $110 = HEAP32[$109>>2]|0;
+   $111 = HEAP32[$110>>2]|0;
+   $112 = ($111|0)!=(0|0);
+   if ($112) {
+    $113 = $t;
+    $114 = ((($113)) + 4|0);
+    $115 = HEAP32[$114>>2]|0;
+    $116 = HEAP32[$115>>2]|0;
+    $t = $116;
+    while(1) {
+     $117 = $t;
+     $118 = ($117|0)!=(0|0);
+     if (!($118)) {
+      break L23;
+     }
+     $119 = $0;
+     $120 = $t;
+     $121 = HEAP32[$120>>2]|0;
+     $122 = $0;
+     $123 = ((($122)) + 172|0);
+     $124 = HEAP32[$123>>2]|0;
+     $125 = $n;
+     $126 = (($124) + ($125))|0;
+     _gen_assignment($119,$121,$126,0);
+     $127 = $t;
+     $128 = ((($127)) + 4|0);
+     $129 = HEAP32[$128>>2]|0;
+     $t = $129;
+     $130 = $n;
+     $131 = (($130) + 1)|0;
+     $n = $131;
+    }
+   }
+  }
+ } while(0);
+ $132 = $0;
+ _push_($132);
+ STACKTOP = sp;return;
+}
+function _push_n_($s,$n) {
+ $s = $s|0;
+ $n = $n|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $n;
+ $2 = $0;
+ $3 = ((($2)) + 172|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = $1;
+ $6 = (($4) + ($5))|0;
+ $7 = ($6>>>0)>(511);
+ if ($7) {
+  $8 = $0;
+  _codegen_error($8,69323);
+ }
+ $9 = $1;
+ $10 = $0;
+ $11 = ((($10)) + 172|0);
+ $12 = HEAP32[$11>>2]|0;
+ $13 = (($12) + ($9))|0;
+ HEAP32[$11>>2] = $13;
+ $14 = $0;
+ $15 = ((($14)) + 172|0);
+ $16 = HEAP32[$15>>2]|0;
+ $17 = $0;
+ $18 = ((($17)) + 234|0);
+ $19 = HEAP16[$18>>1]|0;
+ $20 = $19&65535;
+ $21 = ($16|0)>($20|0);
+ if (!($21)) {
+  STACKTOP = sp;return;
+ }
+ $22 = $0;
+ $23 = ((($22)) + 172|0);
+ $24 = HEAP32[$23>>2]|0;
+ $25 = $24&65535;
+ $26 = $0;
+ $27 = ((($26)) + 234|0);
+ HEAP16[$27>>1] = $25;
+ STACKTOP = sp;return;
+}
+function _loop_pop($s,$val) {
+ $s = $s|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $val;
+ $2 = $1;
+ $3 = ($2|0)!=(0);
+ if ($3) {
+  $4 = $0;
+  $5 = $0;
+  $6 = ((($5)) + 172|0);
+  $7 = HEAP32[$6>>2]|0;
+  $8 = $7 & 511;
+  $9 = $8 << 23;
+  $10 = 5 | $9;
+  (_genop($4,$10)|0);
+ }
+ $11 = $0;
+ $12 = $0;
+ $13 = ((($12)) + 188|0);
+ $14 = HEAP32[$13>>2]|0;
+ $15 = ((($14)) + 12|0);
+ $16 = HEAP32[$15>>2]|0;
+ _dispatch_linked($11,$16);
+ $17 = $0;
+ $18 = ((($17)) + 188|0);
+ $19 = HEAP32[$18>>2]|0;
+ $20 = ((($19)) + 24|0);
+ $21 = HEAP32[$20>>2]|0;
+ $22 = $0;
+ $23 = ((($22)) + 188|0);
+ HEAP32[$23>>2] = $21;
+ $24 = $1;
+ $25 = ($24|0)!=(0);
+ if (!($25)) {
+  STACKTOP = sp;return;
+ }
+ $26 = $0;
+ _push_($26);
+ STACKTOP = sp;return;
+}
+function _scope_body($s,$tree,$val) {
+ $s = $s|0;
+ $tree = $tree|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $scope = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $s;
+ $2 = $tree;
+ $3 = $val;
+ $4 = $1;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $1;
+ $7 = $2;
+ $8 = HEAP32[$7>>2]|0;
+ $9 = (_scope_new($5,$6,$8)|0);
+ $scope = $9;
+ $10 = $scope;
+ $11 = ($10|0)==(0|0);
+ if ($11) {
+  $12 = $1;
+  _raise_error($12,69470);
+ }
+ $13 = $scope;
+ $14 = $2;
+ $15 = ((($14)) + 4|0);
+ $16 = HEAP32[$15>>2]|0;
+ _codegen($13,$16,1);
+ $17 = $1;
+ $18 = ((($17)) + 204|0);
+ $19 = HEAP32[$18>>2]|0;
+ $20 = ($19|0)!=(0|0);
+ do {
+  if ($20) {
+   $22 = $3;
+   $23 = ($22|0)!=(0);
+   $24 = $scope;
+   if (!($23)) {
+    (_genop($24,41)|0);
+    break;
+   }
+   $25 = ((($24)) + 234|0);
+   $26 = HEAP16[$25>>1]|0;
+   $27 = $26&65535;
+   $28 = ($27|0)==(0);
+   $29 = $scope;
+   if ($28) {
+    (_genop($29,5)|0);
+    $30 = $scope;
+    (_genop($30,41)|0);
+    break;
+   } else {
+    $31 = $scope;
+    $32 = ((($31)) + 172|0);
+    $33 = HEAP32[$32>>2]|0;
+    $34 = (($33) - 1)|0;
+    $35 = $34 & 511;
+    $36 = $35 << 23;
+    $37 = 41 | $36;
+    (_genop_peep($29,$37,0)|0);
+    break;
+   }
+  } else {
+   $21 = $scope;
+   (_genop($21,74)|0);
+  }
+ } while(0);
+ $38 = $scope;
+ _scope_finish($38);
+ $39 = $1;
+ $40 = ((($39)) + 216|0);
+ $41 = HEAP32[$40>>2]|0;
+ $42 = ($41|0)!=(0|0);
+ if ($42) {
+  $43 = $1;
+  $44 = ((($43)) + 216|0);
+  $45 = HEAP32[$44>>2]|0;
+  $46 = ((($45)) + 52|0);
+  $47 = HEAP32[$46>>2]|0;
+  $48 = (($47) - 1)|0;
+  $0 = $48;
+  $49 = $0;
+  STACKTOP = sp;return ($49|0);
+ } else {
+  $0 = 0;
+  $49 = $0;
+  STACKTOP = sp;return ($49|0);
+ }
+ return (0)|0;
+}
+function _raise_error($s,$msg) {
+ $s = $s|0;
+ $msg = $msg|0;
+ var $$byval_copy = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $idx = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $$byval_copy = sp + 24|0;
+ $2 = sp;
+ $0 = $s;
+ $1 = $msg;
+ $3 = $0;
+ $4 = $0;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $1;
+ _mrb_str_new_cstr($2,$5,$6);
+ ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;
+ $7 = (_new_lit($3,$$byval_copy)|0);
+ $idx = $7;
+ $8 = $0;
+ $9 = $idx;
+ $10 = $9 & 65535;
+ $11 = $10 << 7;
+ $12 = 8388683 | $11;
+ (_genop($8,$12)|0);
+ STACKTOP = sp;return;
+}
+function _new_lit($s,$val) {
+ $s = $s|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
+ var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
+ var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0;
+ var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0;
+ var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0;
+ var $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0;
+ var $97 = 0, $98 = 0, $99 = 0.0, $i = 0, $len = 0, $pv = 0, $val$byval_copy = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $val$byval_copy = sp + 32|0;
+ $2 = sp;
+ $1 = $s;
+ $3 = ((($val)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ L1: do {
+  switch ($4|0) {
+  case 16:  {
+   $i = 0;
+   while(1) {
+    $5 = $i;
+    $6 = $1;
+    $7 = ((($6)) + 216|0);
+    $8 = HEAP32[$7>>2]|0;
+    $9 = ((($8)) + 44|0);
+    $10 = HEAP32[$9>>2]|0;
+    $11 = ($5>>>0)<($10>>>0);
+    if (!($11)) {
+     break L1;
+    }
+    $12 = $i;
+    $13 = $1;
+    $14 = ((($13)) + 216|0);
+    $15 = HEAP32[$14>>2]|0;
+    $16 = ((($15)) + 12|0);
+    $17 = HEAP32[$16>>2]|0;
+    $18 = (($17) + ($12<<3)|0);
+    $pv = $18;
+    $19 = $pv;
+    $20 = ((($19)) + 4|0);
+    $21 = HEAP32[$20>>2]|0;
+    $22 = ($21|0)!=(16);
+    if (!($22)) {
+     $23 = $pv;
+     $24 = HEAP32[$23>>2]|0;
+     $25 = HEAP32[$24>>2]|0;
+     $26 = $25 >>> 11;
+     $27 = $26 & 8;
+     $28 = ($27|0)!=(0);
+     $29 = $pv;
+     $30 = HEAP32[$29>>2]|0;
+     if ($28) {
+      $31 = HEAP32[$30>>2]|0;
+      $32 = $31 >>> 11;
+      $33 = $32 & 496;
+      $34 = $33 >> 4;
+      $37 = $34;
+     } else {
+      $35 = ((($30)) + 12|0);
+      $36 = HEAP32[$35>>2]|0;
+      $37 = $36;
+     }
+     $len = $37;
+     $38 = HEAP32[$val>>2]|0;
+     $39 = HEAP32[$38>>2]|0;
+     $40 = $39 >>> 11;
+     $41 = $40 & 8;
+     $42 = ($41|0)!=(0);
+     $43 = HEAP32[$val>>2]|0;
+     if ($42) {
+      $44 = HEAP32[$43>>2]|0;
+      $45 = $44 >>> 11;
+      $46 = $45 & 496;
+      $47 = $46 >> 4;
+      $51 = $47;
+     } else {
+      $48 = ((($43)) + 12|0);
+      $49 = HEAP32[$48>>2]|0;
+      $51 = $49;
+     }
+     $50 = ($37|0)!=($51|0);
+     if (!($50)) {
+      $52 = $pv;
+      $53 = HEAP32[$52>>2]|0;
+      $54 = HEAP32[$53>>2]|0;
+      $55 = $54 >>> 11;
+      $56 = $55 & 8;
+      $57 = ($56|0)!=(0);
+      $58 = $pv;
+      $59 = HEAP32[$58>>2]|0;
+      $60 = ((($59)) + 12|0);
+      if ($57) {
+       $73 = $60;
+      } else {
+       $61 = ((($60)) + 8|0);
+       $62 = HEAP32[$61>>2]|0;
+       $73 = $62;
+      }
+      $63 = HEAP32[$val>>2]|0;
+      $64 = HEAP32[$63>>2]|0;
+      $65 = $64 >>> 11;
+      $66 = $65 & 8;
+      $67 = ($66|0)!=(0);
+      $68 = HEAP32[$val>>2]|0;
+      $69 = ((($68)) + 12|0);
+      if ($67) {
+       $74 = $69;
+      } else {
+       $70 = ((($69)) + 8|0);
+       $71 = HEAP32[$70>>2]|0;
+       $74 = $71;
+      }
+      $72 = $len;
+      $75 = (_memcmp($73,$74,$72)|0);
+      $76 = ($75|0)==(0);
+      if ($76) {
+       break;
+      }
+     }
+    }
+    $78 = $i;
+    $79 = (($78) + 1)|0;
+    $i = $79;
+   }
+   $77 = $i;
+   $0 = $77;
+   $182 = $0;
+   STACKTOP = sp;return ($182|0);
+   break;
+  }
+  case 6:  {
+   $i = 0;
+   while(1) {
+    $80 = $i;
+    $81 = $1;
+    $82 = ((($81)) + 216|0);
+    $83 = HEAP32[$82>>2]|0;
+    $84 = ((($83)) + 44|0);
+    $85 = HEAP32[$84>>2]|0;
+    $86 = ($80>>>0)<($85>>>0);
+    if (!($86)) {
+     break L1;
+    }
+    $87 = $i;
+    $88 = $1;
+    $89 = ((($88)) + 216|0);
+    $90 = HEAP32[$89>>2]|0;
+    $91 = ((($90)) + 12|0);
+    $92 = HEAP32[$91>>2]|0;
+    $93 = (($92) + ($87<<3)|0);
+    $pv = $93;
+    $94 = $pv;
+    $95 = ((($94)) + 4|0);
+    $96 = HEAP32[$95>>2]|0;
+    $97 = ($96|0)!=(6);
+    if (!($97)) {
+     $98 = $pv;
+     $99 = +HEAPF32[$98>>2];
+     $100 = +HEAPF32[$val>>2];
+     $101 = $99 == $100;
+     if ($101) {
+      break;
+     }
+    }
+    $103 = $i;
+    $104 = (($103) + 1)|0;
+    $i = $104;
+   }
+   $102 = $i;
+   $0 = $102;
+   $182 = $0;
+   STACKTOP = sp;return ($182|0);
+   break;
+  }
+  case 3:  {
+   $i = 0;
+   while(1) {
+    $105 = $i;
+    $106 = $1;
+    $107 = ((($106)) + 216|0);
+    $108 = HEAP32[$107>>2]|0;
+    $109 = ((($108)) + 44|0);
+    $110 = HEAP32[$109>>2]|0;
+    $111 = ($105>>>0)<($110>>>0);
+    if (!($111)) {
+     break L1;
+    }
+    $112 = $i;
+    $113 = $1;
+    $114 = ((($113)) + 216|0);
+    $115 = HEAP32[$114>>2]|0;
+    $116 = ((($115)) + 12|0);
+    $117 = HEAP32[$116>>2]|0;
+    $118 = (($117) + ($112<<3)|0);
+    $pv = $118;
+    $119 = $pv;
+    $120 = ((($119)) + 4|0);
+    $121 = HEAP32[$120>>2]|0;
+    $122 = ($121|0)==(3);
+    if ($122) {
+     $123 = $pv;
+     $124 = HEAP32[$123>>2]|0;
+     $125 = HEAP32[$val>>2]|0;
+     $126 = ($124|0)==($125|0);
+     if ($126) {
+      break;
+     }
+    }
+    $128 = $i;
+    $129 = (($128) + 1)|0;
+    $i = $129;
+   }
+   $127 = $i;
+   $0 = $127;
+   $182 = $0;
+   STACKTOP = sp;return ($182|0);
+   break;
+  }
+  default: {
+   $0 = 0;
+   $182 = $0;
+   STACKTOP = sp;return ($182|0);
+  }
+  }
+ } while(0);
+ $130 = $1;
+ $131 = ((($130)) + 216|0);
+ $132 = HEAP32[$131>>2]|0;
+ $133 = ((($132)) + 44|0);
+ $134 = HEAP32[$133>>2]|0;
+ $135 = $1;
+ $136 = ((($135)) + 220|0);
+ $137 = HEAP32[$136>>2]|0;
+ $138 = ($134|0)==($137|0);
+ if ($138) {
+  $139 = $1;
+  $140 = ((($139)) + 220|0);
+  $141 = HEAP32[$140>>2]|0;
+  $142 = $141<<1;
+  HEAP32[$140>>2] = $142;
+  $143 = $1;
+  $144 = $1;
+  $145 = ((($144)) + 216|0);
+  $146 = HEAP32[$145>>2]|0;
+  $147 = ((($146)) + 12|0);
+  $148 = HEAP32[$147>>2]|0;
+  $149 = $1;
+  $150 = ((($149)) + 220|0);
+  $151 = HEAP32[$150>>2]|0;
+  $152 = $151<<3;
+  $153 = (_codegen_realloc($143,$148,$152)|0);
+  $154 = $1;
+  $155 = ((($154)) + 216|0);
+  $156 = HEAP32[$155>>2]|0;
+  $157 = ((($156)) + 12|0);
+  HEAP32[$157>>2] = $153;
+ }
+ $158 = $1;
+ $159 = ((($158)) + 216|0);
+ $160 = HEAP32[$159>>2]|0;
+ $161 = ((($160)) + 44|0);
+ $162 = HEAP32[$161>>2]|0;
+ $163 = $1;
+ $164 = ((($163)) + 216|0);
+ $165 = HEAP32[$164>>2]|0;
+ $166 = ((($165)) + 12|0);
+ $167 = HEAP32[$166>>2]|0;
+ $168 = (($167) + ($162<<3)|0);
+ $pv = $168;
+ $169 = $1;
+ $170 = ((($169)) + 216|0);
+ $171 = HEAP32[$170>>2]|0;
+ $172 = ((($171)) + 44|0);
+ $173 = HEAP32[$172>>2]|0;
+ $174 = (($173) + 1)|0;
+ HEAP32[$172>>2] = $174;
+ $i = $173;
+ $175 = ((($val)) + 4|0);
+ $176 = HEAP32[$175>>2]|0;
+ switch ($176|0) {
+ case 16:  {
+  $177 = $pv;
+  $178 = $1;
+  $179 = HEAP32[$178>>2]|0;
+  ;HEAP32[$val$byval_copy>>2]=HEAP32[$val>>2]|0;HEAP32[$val$byval_copy+4>>2]=HEAP32[$val+4>>2]|0;
+  _mrb_str_pool($2,$179,$val$byval_copy);
+  ;HEAP32[$177>>2]=HEAP32[$2>>2]|0;HEAP32[$177+4>>2]=HEAP32[$2+4>>2]|0;
+  break;
+ }
+ case 3: case 6:  {
+  $180 = $pv;
+  ;HEAP32[$180>>2]=HEAP32[$val>>2]|0;HEAP32[$180+4>>2]=HEAP32[$val+4>>2]|0;
+  break;
+ }
+ default: {
+ }
+ }
+ $181 = $i;
+ $0 = $181;
+ $182 = $0;
+ STACKTOP = sp;return ($182|0);
+}
+function _scope_finish($s) {
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0;
+ var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0;
+ var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0;
+ var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0;
+ var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $fname = 0, $fname_len = 0;
+ var $irep = 0, $mrb = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $0;
+ $2 = HEAP32[$1>>2]|0;
+ $mrb = $2;
+ $3 = $0;
+ $4 = ((($3)) + 216|0);
+ $5 = HEAP32[$4>>2]|0;
+ $irep = $5;
+ $6 = $irep;
+ $7 = ((($6)) + 4|0);
+ HEAP8[$7>>0] = 0;
+ $8 = $0;
+ $9 = ((($8)) + 204|0);
+ $10 = HEAP32[$9>>2]|0;
+ $11 = ($10|0)!=(0|0);
+ do {
+  if ($11) {
+   $12 = $0;
+   $13 = $0;
+   $14 = ((($13)) + 204|0);
+   $15 = HEAP32[$14>>2]|0;
+   $16 = $0;
+   $17 = ((($16)) + 176|0);
+   $18 = HEAP32[$17>>2]|0;
+   $19 = $18<<2;
+   $20 = (_codegen_realloc($12,$15,$19)|0);
+   $21 = $irep;
+   $22 = ((($21)) + 8|0);
+   HEAP32[$22>>2] = $20;
+   $23 = $0;
+   $24 = ((($23)) + 176|0);
+   $25 = HEAP32[$24>>2]|0;
+   $26 = $irep;
+   $27 = ((($26)) + 40|0);
+   HEAP32[$27>>2] = $25;
+   $28 = $0;
+   $29 = ((($28)) + 208|0);
+   $30 = HEAP32[$29>>2]|0;
+   $31 = ($30|0)!=(0|0);
+   if ($31) {
+    $32 = $0;
+    $33 = $0;
+    $34 = ((($33)) + 208|0);
+    $35 = HEAP32[$34>>2]|0;
+    $36 = $0;
+    $37 = ((($36)) + 176|0);
+    $38 = HEAP32[$37>>2]|0;
+    $39 = $38<<1;
+    $40 = (_codegen_realloc($32,$35,$39)|0);
+    $41 = $irep;
+    $42 = ((($41)) + 32|0);
+    HEAP32[$42>>2] = $40;
+    break;
+   } else {
+    $43 = $irep;
+    $44 = ((($43)) + 32|0);
+    HEAP32[$44>>2] = 0;
+    break;
+   }
+  }
+ } while(0);
+ $45 = $0;
+ $46 = $irep;
+ $47 = ((($46)) + 12|0);
+ $48 = HEAP32[$47>>2]|0;
+ $49 = $irep;
+ $50 = ((($49)) + 44|0);
+ $51 = HEAP32[$50>>2]|0;
+ $52 = $51<<3;
+ $53 = (_codegen_realloc($45,$48,$52)|0);
+ $54 = $irep;
+ $55 = ((($54)) + 12|0);
+ HEAP32[$55>>2] = $53;
+ $56 = $0;
+ $57 = $irep;
+ $58 = ((($57)) + 16|0);
+ $59 = HEAP32[$58>>2]|0;
+ $60 = $irep;
+ $61 = ((($60)) + 48|0);
+ $62 = HEAP32[$61>>2]|0;
+ $63 = $62<<2;
+ $64 = (_codegen_realloc($56,$59,$63)|0);
+ $65 = $irep;
+ $66 = ((($65)) + 16|0);
+ HEAP32[$66>>2] = $64;
+ $67 = $0;
+ $68 = $irep;
+ $69 = ((($68)) + 20|0);
+ $70 = HEAP32[$69>>2]|0;
+ $71 = $irep;
+ $72 = ((($71)) + 52|0);
+ $73 = HEAP32[$72>>2]|0;
+ $74 = $73<<2;
+ $75 = (_codegen_realloc($67,$70,$74)|0);
+ $76 = $irep;
+ $77 = ((($76)) + 20|0);
+ HEAP32[$77>>2] = $75;
+ $78 = $0;
+ $79 = ((($78)) + 196|0);
+ $80 = HEAP32[$79>>2]|0;
+ $81 = ($80|0)!=(0|0);
+ if (!($81)) {
+  $122 = $0;
+  $123 = ((($122)) + 232|0);
+  $124 = HEAP16[$123>>1]|0;
+  $125 = $irep;
+  HEAP16[$125>>1] = $124;
+  $126 = $0;
+  $127 = ((($126)) + 234|0);
+  $128 = HEAP16[$127>>1]|0;
+  $129 = $irep;
+  $130 = ((($129)) + 2|0);
+  HEAP16[$130>>1] = $128;
+  $131 = $mrb;
+  $132 = $0;
+  $133 = ((($132)) + 236|0);
+  $134 = HEAP32[$133>>2]|0;
+  _mrb_gc_arena_restore($131,$134);
+  $135 = $0;
+  $136 = ((($135)) + 4|0);
+  $137 = HEAP32[$136>>2]|0;
+  _mrb_pool_close($137);
+  STACKTOP = sp;return;
+ }
+ $82 = $0;
+ $83 = ((($82)) + 248|0);
+ $84 = HEAP32[$83>>2]|0;
+ $85 = $0;
+ $86 = ((($85)) + 244|0);
+ $87 = HEAP16[$86>>1]|0;
+ $88 = (_mrb_parser_get_filename($84,$87)|0);
+ $89 = $0;
+ $90 = ((($89)) + 216|0);
+ $91 = HEAP32[$90>>2]|0;
+ $92 = ((($91)) + 28|0);
+ HEAP32[$92>>2] = $88;
+ $93 = $mrb;
+ $94 = $0;
+ $95 = ((($94)) + 216|0);
+ $96 = HEAP32[$95>>2]|0;
+ $97 = $0;
+ $98 = ((($97)) + 240|0);
+ $99 = HEAP32[$98>>2]|0;
+ $100 = $0;
+ $101 = ((($100)) + 176|0);
+ $102 = HEAP32[$101>>2]|0;
+ (_mrb_debug_info_append_file($93,$96,$99,$102)|0);
+ $103 = $0;
+ $104 = ((($103)) + 196|0);
+ $105 = HEAP32[$104>>2]|0;
+ $106 = (_strlen($105)|0);
+ $fname_len = $106;
+ $107 = $0;
+ $108 = $fname_len;
+ $109 = (($108) + 1)|0;
+ $110 = (_codegen_malloc($107,$109)|0);
+ $fname = $110;
+ $111 = $fname;
+ $112 = $0;
+ $113 = ((($112)) + 196|0);
+ $114 = HEAP32[$113>>2]|0;
+ $115 = $fname_len;
+ _memcpy(($111|0),($114|0),($115|0))|0;
+ $116 = $fname_len;
+ $117 = $fname;
+ $118 = (($117) + ($116)|0);
+ HEAP8[$118>>0] = 0;
+ $119 = $fname;
+ $120 = $irep;
+ $121 = ((($120)) + 28|0);
+ HEAP32[$121>>2] = $119;
+ $122 = $0;
+ $123 = ((($122)) + 232|0);
+ $124 = HEAP16[$123>>1]|0;
+ $125 = $irep;
+ HEAP16[$125>>1] = $124;
+ $126 = $0;
+ $127 = ((($126)) + 234|0);
+ $128 = HEAP16[$127>>1]|0;
+ $129 = $irep;
+ $130 = ((($129)) + 2|0);
+ HEAP16[$130>>1] = $128;
+ $131 = $mrb;
+ $132 = $0;
+ $133 = ((($132)) + 236|0);
+ $134 = HEAP32[$133>>2]|0;
+ _mrb_gc_arena_restore($131,$134);
+ $135 = $0;
+ $136 = ((($135)) + 4|0);
+ $137 = HEAP32[$136>>2]|0;
+ _mrb_pool_close($137);
+ STACKTOP = sp;return;
+}
+function _codegen_malloc($s,$len) {
+ $s = $s|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $p = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $len;
+ $2 = $0;
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $1;
+ $5 = (_mrb_malloc_simple($3,$4)|0);
+ $p = $5;
+ $6 = $p;
+ $7 = ($6|0)!=(0|0);
+ if ($7) {
+  $9 = $p;
+  STACKTOP = sp;return ($9|0);
+ }
+ $8 = $0;
+ _codegen_error($8,69487);
+ $9 = $p;
+ STACKTOP = sp;return ($9|0);
+}
+function _lambda_body($s,$tree,$blk) {
+ $s = $s|0;
+ $tree = $tree|0;
+ $blk = $blk|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0;
+ var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0;
+ var $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0;
+ var $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0;
+ var $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0;
+ var $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0;
+ var $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0;
+ var $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $26 = 0, $27 = 0, $28 = 0;
+ var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0;
+ var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0;
+ var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0;
+ var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $a = 0, $ba = 0;
+ var $c = 0, $i = 0, $idx = 0, $ka = 0, $kd = 0, $lp = 0, $ma = 0, $n = 0, $oa = 0, $opt = 0, $pa = 0, $parent = 0, $pos = 0, $ra = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $tree;
+ $2 = $blk;
+ $3 = $0;
+ $parent = $3;
+ $4 = $0;
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $0;
+ $7 = $1;
+ $8 = HEAP32[$7>>2]|0;
+ $9 = (_scope_new($5,$6,$8)|0);
+ $0 = $9;
+ $10 = $0;
+ $11 = ($10|0)==(0|0);
+ if ($11) {
+  $12 = $parent;
+  _raise_error($12,69470);
+ }
+ $13 = $2;
+ $14 = ($13|0)!=(0);
+ $15 = $14 ^ 1;
+ $16 = $15&1;
+ $17 = $16&255;
+ $18 = $0;
+ $19 = ((($18)) + 184|0);
+ $20 = $17&255;
+ $21 = HEAP16[$19>>1]|0;
+ $22 = $20 & 1;
+ $23 = ($22 << 15)&65535;
+ $24 = $21 & 32767;
+ $25 = $24 | $23;
+ HEAP16[$19>>1] = $25;
+ $26 = $2;
+ $27 = ($26|0)!=(0);
+ if ($27) {
+  $28 = $0;
+  $29 = (_loop_push($28,1)|0);
+  $lp = $29;
+  $30 = $0;
+  $31 = (_new_label($30)|0);
+  $32 = $lp;
+  $33 = ((($32)) + 4|0);
+  HEAP32[$33>>2] = $31;
+ }
+ $34 = $1;
+ $35 = ((($34)) + 4|0);
+ $36 = HEAP32[$35>>2]|0;
+ $1 = $36;
+ $37 = $1;
+ $38 = HEAP32[$37>>2]|0;
+ $39 = ($38|0)!=(0|0);
+ if ($39) {
+  $40 = $1;
+  $41 = HEAP32[$40>>2]|0;
+  $42 = HEAP32[$41>>2]|0;
+  $43 = (_node_len($42)|0);
+  $ma = $43;
+  $44 = $1;
+  $45 = HEAP32[$44>>2]|0;
+  $46 = HEAP32[$45>>2]|0;
+  $n = $46;
+  while(1) {
+   $47 = $n;
+   $48 = ($47|0)!=(0|0);
+   if (!($48)) {
+    break;
+   }
+   $49 = $n;
+   $50 = ((($49)) + 4|0);
+   $51 = HEAP32[$50>>2]|0;
+   $n = $51;
+  }
+  $52 = $1;
+  $53 = HEAP32[$52>>2]|0;
+  $54 = ((($53)) + 4|0);
+  $55 = HEAP32[$54>>2]|0;
+  $56 = HEAP32[$55>>2]|0;
+  $57 = (_node_len($56)|0);
+  $oa = $57;
+  $58 = $1;
+  $59 = HEAP32[$58>>2]|0;
+  $60 = ((($59)) + 4|0);
+  $61 = HEAP32[$60>>2]|0;
+  $62 = ((($61)) + 4|0);
+  $63 = HEAP32[$62>>2]|0;
+  $64 = HEAP32[$63>>2]|0;
+  $65 = ($64|0)!=(0|0);
+  $66 = $65 ? 1 : 0;
+  $ra = $66;
+  $67 = $1;
+  $68 = HEAP32[$67>>2]|0;
+  $69 = ((($68)) + 4|0);
+  $70 = HEAP32[$69>>2]|0;
+  $71 = ((($70)) + 4|0);
+  $72 = HEAP32[$71>>2]|0;
+  $73 = ((($72)) + 4|0);
+  $74 = HEAP32[$73>>2]|0;
+  $75 = HEAP32[$74>>2]|0;
+  $76 = (_node_len($75)|0);
+  $pa = $76;
+  $kd = 0;
+  $ka = 0;
+  $77 = $1;
+  $78 = HEAP32[$77>>2]|0;
+  $79 = ((($78)) + 4|0);
+  $80 = HEAP32[$79>>2]|0;
+  $81 = ((($80)) + 4|0);
+  $82 = HEAP32[$81>>2]|0;
+  $83 = ((($82)) + 4|0);
+  $84 = HEAP32[$83>>2]|0;
+  $85 = ((($84)) + 4|0);
+  $86 = HEAP32[$85>>2]|0;
+  $87 = ($86|0)!=(0|0);
+  $88 = $87 ? 1 : 0;
+  $ba = $88;
+  $89 = $ma;
+  $90 = $89 & 31;
+  $91 = $90 << 18;
+  $92 = $oa;
+  $93 = $92 & 31;
+  $94 = $93 << 13;
+  $95 = $91 | $94;
+  $96 = $ra;
+  $97 = $96 & 1;
+  $98 = $97 << 12;
+  $99 = $95 | $98;
+  $100 = $pa;
+  $101 = $100 & 31;
+  $102 = $101 << 7;
+  $103 = $99 | $102;
+  $104 = $ka;
+  $105 = $104 & 31;
+  $106 = $105 << 2;
+  $107 = $103 | $106;
+  $108 = $kd;
+  $109 = $108 & 1;
+  $110 = $109 << 1;
+  $111 = $107 | $110;
+  $112 = $ba;
+  $113 = $112 & 1;
+  $114 = $111 | $113;
+  $a = $114;
+  $115 = $ma;
+  $116 = $oa;
+  $117 = (($115) + ($116))|0;
+  $118 = $117 & 63;
+  $119 = $118 << 6;
+  $120 = $ra;
+  $121 = $120 & 1;
+  $122 = $121 << 5;
+  $123 = $119 | $122;
+  $124 = $pa;
+  $125 = $124 & 31;
+  $126 = $123 | $125;
+  $127 = $0;
+  $128 = ((($127)) + 184|0);
+  $129 = $126&65535;
+  $130 = HEAP16[$128>>1]|0;
+  $131 = $129 & 32767;
+  $132 = $130 & -32768;
+  $133 = $132 | $131;
+  HEAP16[$128>>1] = $133;
+  $134 = $0;
+  $135 = $a;
+  $136 = $135 & 33554431;
+  $137 = $136 << 7;
+  $138 = 38 | $137;
+  (_genop($134,$138)|0);
+  $139 = $0;
+  $140 = (_new_label($139)|0);
+  $pos = $140;
+  $i = 0;
+  while(1) {
+   $141 = $i;
+   $142 = $oa;
+   $143 = ($141|0)<($142|0);
+   if (!($143)) {
+    break;
+   }
+   $144 = $0;
+   (_new_label($144)|0);
+   $145 = $0;
+   (_genop($145,4194199)|0);
+   $146 = $i;
+   $147 = (($146) + 1)|0;
+   $i = $147;
+  }
+  $148 = $oa;
+  $149 = ($148|0)>(0);
+  if ($149) {
+   $150 = $0;
+   (_genop($150,4194199)|0);
+  }
+  $151 = $1;
+  $152 = HEAP32[$151>>2]|0;
+  $153 = ((($152)) + 4|0);
+  $154 = HEAP32[$153>>2]|0;
+  $155 = HEAP32[$154>>2]|0;
+  $opt = $155;
+  $i = 0;
+  while(1) {
+   $156 = $opt;
+   $157 = ($156|0)!=(0|0);
+   if (!($157)) {
+    break;
+   }
+   $158 = $0;
+   $159 = $pos;
+   $160 = $i;
+   $161 = (($159) + ($160))|0;
+   _dispatch($158,$161);
+   $162 = $0;
+   $163 = $opt;
+   $164 = HEAP32[$163>>2]|0;
+   $165 = ((($164)) + 4|0);
+   $166 = HEAP32[$165>>2]|0;
+   _codegen($162,$166,1);
+   $167 = $0;
+   $168 = $opt;
+   $169 = HEAP32[$168>>2]|0;
+   $170 = HEAP32[$169>>2]|0;
+   $171 = $170;
+   $172 = (_lv_idx($167,$171)|0);
+   $idx = $172;
+   $173 = $0;
+   $174 = ((($173)) + 172|0);
+   $175 = HEAP32[$174>>2]|0;
+   $176 = (($175) + -1)|0;
+   HEAP32[$174>>2] = $176;
+   $177 = $0;
+   $178 = $idx;
+   $179 = $178 & 511;
+   $180 = $179 << 23;
+   $181 = 1 | $180;
+   $182 = $0;
+   $183 = ((($182)) + 172|0);
+   $184 = HEAP32[$183>>2]|0;
+   $185 = $184 & 511;
+   $186 = $185 << 14;
+   $187 = $181 | $186;
+   (_genop_peep($177,$187,0)|0);
+   $188 = $i;
+   $189 = (($188) + 1)|0;
+   $i = $189;
+   $190 = $opt;
+   $191 = ((($190)) + 4|0);
+   $192 = HEAP32[$191>>2]|0;
+   $opt = $192;
+  }
+  $193 = $oa;
+  $194 = ($193|0)>(0);
+  if ($194) {
+   $195 = $0;
+   $196 = $pos;
+   $197 = $i;
+   $198 = (($196) + ($197))|0;
+   _dispatch($195,$198);
+  }
+ }
+ $199 = $0;
+ $200 = $1;
+ $201 = ((($200)) + 4|0);
+ $202 = HEAP32[$201>>2]|0;
+ $203 = HEAP32[$202>>2]|0;
+ _codegen($199,$203,1);
+ $204 = $0;
+ $205 = ((($204)) + 172|0);
+ $206 = HEAP32[$205>>2]|0;
+ $207 = (($206) + -1)|0;
+ HEAP32[$205>>2] = $207;
+ $208 = $0;
+ $209 = ((($208)) + 176|0);
+ $210 = HEAP32[$209>>2]|0;
+ $211 = ($210|0)>(0);
+ do {
+  if ($211) {
+   $212 = $0;
+   $213 = ((($212)) + 176|0);
+   $214 = HEAP32[$213>>2]|0;
+   $215 = (($214) - 1)|0;
+   $216 = $0;
+   $217 = ((($216)) + 204|0);
+   $218 = HEAP32[$217>>2]|0;
+   $219 = (($218) + ($215<<2)|0);
+   $220 = HEAP32[$219>>2]|0;
+   $c = $220;
+   $221 = $c;
+   $222 = $221 & 127;
+   $223 = ($222|0)!=(41);
+   if (!($223)) {
+    $224 = $c;
+    $225 = $224 >>> 14;
+    $226 = $225 & 511;
+    $227 = ($226|0)!=(0);
+    if (!($227)) {
+     $228 = $0;
+     $229 = ((($228)) + 176|0);
+     $230 = HEAP32[$229>>2]|0;
+     $231 = $0;
+     $232 = ((($231)) + 180|0);
+     $233 = HEAP32[$232>>2]|0;
+     $234 = ($230|0)==($233|0);
+     if (!($234)) {
+      break;
+     }
+    }
+   }
+   $235 = $0;
+   $236 = ((($235)) + 234|0);
+   $237 = HEAP16[$236>>1]|0;
+   $238 = $237&65535;
+   $239 = ($238|0)==(0);
+   $240 = $0;
+   if ($239) {
+    (_genop($240,5)|0);
+    $241 = $0;
+    (_genop($241,41)|0);
+    break;
+   } else {
+    $242 = $0;
+    $243 = ((($242)) + 172|0);
+    $244 = HEAP32[$243>>2]|0;
+    $245 = $244 & 511;
+    $246 = $245 << 23;
+    $247 = 41 | $246;
+    (_genop_peep($240,$247,0)|0);
+    break;
+   }
+  }
+ } while(0);
+ $248 = $2;
+ $249 = ($248|0)!=(0);
+ if (!($249)) {
+  $251 = $0;
+  _scope_finish($251);
+  $252 = $parent;
+  $253 = ((($252)) + 216|0);
+  $254 = HEAP32[$253>>2]|0;
+  $255 = ((($254)) + 52|0);
+  $256 = HEAP32[$255>>2]|0;
+  $257 = (($256) - 1)|0;
+  STACKTOP = sp;return ($257|0);
+ }
+ $250 = $0;
+ _loop_pop($250,0);
+ $251 = $0;
+ _scope_finish($251);
+ $252 = $parent;
+ $253 = ((($252)) + 216|0);
+ $254 = HEAP32[$253>>2]|0;
+ $255 = ((($254)) + 52|0);
+ $256 = HEAP32[$255>>2]|0;
+ $257 = (($256) - 1)|0;
+ STACKTOP = sp;return ($257|0);
+}
+function _new_label($s) {
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $0;
+ $2 = ((($1)) + 176|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = $0;
+ $5 = ((($4)) + 180|0);
+ HEAP32[$5>>2] = $3;
+ $6 = $0;
+ $7 = ((($6)) + 176|0);
+ $8 = HEAP32[$7>>2]|0;
+ STACKTOP = sp;return ($8|0);
+}
+function _for_body($s,$tree) {
+ $s = $s|0;
+ $tree = $tree|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0;
+ var $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0;
+ var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0;
+ var $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0;
+ var $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0;
+ var $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0;
+ var $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $c = 0, $idx = 0, $lp = 0, $n2 = 0, $prev = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $tree;
+ $2 = $0;
+ $prev = $2;
+ $3 = $0;
+ $4 = $1;
+ $5 = ((($4)) + 4|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = HEAP32[$6>>2]|0;
+ _codegen($3,$7,1);
+ $8 = $0;
+ $9 = HEAP32[$8>>2]|0;
+ $10 = $0;
+ $11 = (_scope_new($9,$10,0)|0);
+ $0 = $11;
+ $12 = $0;
+ $13 = ($12|0)==(0|0);
+ if ($13) {
+  $14 = $prev;
+  _raise_error($14,69470);
+ }
+ $15 = $0;
+ _push_($15);
+ $16 = $0;
+ $17 = (_loop_push($16,2)|0);
+ $lp = $17;
+ $18 = $0;
+ $19 = (_new_label($18)|0);
+ $20 = $lp;
+ $21 = ((($20)) + 4|0);
+ HEAP32[$21>>2] = $19;
+ $22 = $1;
+ $23 = HEAP32[$22>>2]|0;
+ $n2 = $23;
+ $24 = $0;
+ (_genop($24,33554470)|0);
+ $25 = $n2;
+ $26 = HEAP32[$25>>2]|0;
+ $27 = ($26|0)!=(0|0);
+ if ($27) {
+  $28 = $n2;
+  $29 = HEAP32[$28>>2]|0;
+  $30 = ((($29)) + 4|0);
+  $31 = HEAP32[$30>>2]|0;
+  $32 = ($31|0)!=(0|0);
+  if ($32) {
+   label = 7;
+  } else {
+   $33 = $n2;
+   $34 = ((($33)) + 4|0);
+   $35 = HEAP32[$34>>2]|0;
+   $36 = ($35|0)!=(0|0);
+   if ($36) {
+    label = 7;
+   } else {
+    $37 = $0;
+    $38 = $n2;
+    $39 = HEAP32[$38>>2]|0;
+    $40 = HEAP32[$39>>2]|0;
+    _gen_assignment($37,$40,1,0);
+   }
+  }
+ } else {
+  label = 7;
+ }
+ if ((label|0) == 7) {
+  $41 = $0;
+  $42 = $n2;
+  _gen_vmassignment($41,$42,1,1);
+ }
+ $43 = $0;
+ $44 = $1;
+ $45 = ((($44)) + 4|0);
+ $46 = HEAP32[$45>>2]|0;
+ $47 = ((($46)) + 4|0);
+ $48 = HEAP32[$47>>2]|0;
+ $49 = HEAP32[$48>>2]|0;
+ _codegen($43,$49,1);
+ $50 = $0;
+ $51 = ((($50)) + 172|0);
+ $52 = HEAP32[$51>>2]|0;
+ $53 = (($52) + -1)|0;
+ HEAP32[$51>>2] = $53;
+ $54 = $0;
+ $55 = ((($54)) + 176|0);
+ $56 = HEAP32[$55>>2]|0;
+ $57 = ($56|0)>(0);
+ do {
+  if ($57) {
+   $58 = $0;
+   $59 = ((($58)) + 176|0);
+   $60 = HEAP32[$59>>2]|0;
+   $61 = (($60) - 1)|0;
+   $62 = $0;
+   $63 = ((($62)) + 204|0);
+   $64 = HEAP32[$63>>2]|0;
+   $65 = (($64) + ($61<<2)|0);
+   $66 = HEAP32[$65>>2]|0;
+   $c = $66;
+   $67 = $c;
+   $68 = $67 & 127;
+   $69 = ($68|0)!=(41);
+   if (!($69)) {
+    $70 = $c;
+    $71 = $70 >>> 14;
+    $72 = $71 & 511;
+    $73 = ($72|0)!=(0);
+    if (!($73)) {
+     $74 = $0;
+     $75 = ((($74)) + 176|0);
+     $76 = HEAP32[$75>>2]|0;
+     $77 = $0;
+     $78 = ((($77)) + 180|0);
+     $79 = HEAP32[$78>>2]|0;
+     $80 = ($76|0)==($79|0);
+     if (!($80)) {
+      break;
+     }
+    }
+   }
+   $81 = $0;
+   $82 = $0;
+   $83 = ((($82)) + 172|0);
+   $84 = HEAP32[$83>>2]|0;
+   $85 = $84 & 511;
+   $86 = $85 << 23;
+   $87 = 41 | $86;
+   (_genop_peep($81,$87,0)|0);
+  }
+ } while(0);
+ $88 = $0;
+ _loop_pop($88,0);
+ $89 = $0;
+ _scope_finish($89);
+ $90 = $prev;
+ $0 = $90;
+ $91 = $0;
+ $92 = $0;
+ $93 = ((($92)) + 172|0);
+ $94 = HEAP32[$93>>2]|0;
+ $95 = $94 & 511;
+ $96 = $95 << 23;
+ $97 = 64 | $96;
+ $98 = $0;
+ $99 = ((($98)) + 216|0);
+ $100 = HEAP32[$99>>2]|0;
+ $101 = ((($100)) + 52|0);
+ $102 = HEAP32[$101>>2]|0;
+ $103 = (($102) - 1)|0;
+ $104 = $103 & 16383;
+ $105 = $104 << 9;
+ $106 = $105 | 256;
+ $107 = $97 | $106;
+ (_genop($91,$107)|0);
+ $108 = $0;
+ $109 = ((($108)) + 172|0);
+ $110 = HEAP32[$109>>2]|0;
+ $111 = (($110) + -1)|0;
+ HEAP32[$109>>2] = $111;
+ $112 = $0;
+ $113 = $0;
+ $114 = HEAP32[$113>>2]|0;
+ $115 = (_mrb_intern_static($114,69498,4)|0);
+ $116 = (_new_msym($112,$115)|0);
+ $idx = $116;
+ $117 = $0;
+ $118 = $0;
+ $119 = ((($118)) + 172|0);
+ $120 = HEAP32[$119>>2]|0;
+ $121 = $120 & 511;
+ $122 = $121 << 23;
+ $123 = 33 | $122;
+ $124 = $idx;
+ $125 = $124 & 511;
+ $126 = $125 << 14;
+ $127 = $123 | $126;
+ (_genop($117,$127)|0);
+ STACKTOP = sp;return;
+}
+function _nosplat($t) {
+ $t = $t|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $t;
+ while(1) {
+  $2 = $1;
+  $3 = ($2|0)!=(0|0);
+  if (!($3)) {
+   label = 6;
+   break;
+  }
+  $4 = $1;
+  $5 = HEAP32[$4>>2]|0;
+  $6 = HEAP32[$5>>2]|0;
+  $7 = $6;
+  $8 = ($7|0)==(66);
+  if ($8) {
+   label = 4;
+   break;
+  }
+  $9 = $1;
+  $10 = ((($9)) + 4|0);
+  $11 = HEAP32[$10>>2]|0;
+  $1 = $11;
+ }
+ if ((label|0) == 4) {
+  $0 = 0;
+  $12 = $0;
+  STACKTOP = sp;return ($12|0);
+ }
+ else if ((label|0) == 6) {
+  $0 = 1;
+  $12 = $0;
+  STACKTOP = sp;return ($12|0);
+ }
+ return (0)|0;
+}
+function _loop_break($s,$tree) {
+ $s = $s|0;
+ $tree = $tree|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0;
+ var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $loop = 0;
+ var $tmp = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $tree;
+ $2 = $0;
+ $3 = ((($2)) + 188|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = ($4|0)!=(0|0);
+ if (!($5)) {
+  $6 = $0;
+  $7 = $1;
+  _codegen($6,$7,0);
+  $8 = $0;
+  _raise_error($8,69517);
+  STACKTOP = sp;return;
+ }
+ $9 = $1;
+ $10 = ($9|0)!=(0|0);
+ if ($10) {
+  $11 = $0;
+  $12 = $1;
+  _codegen($11,$12,1);
+  $13 = $0;
+  $14 = ((($13)) + 172|0);
+  $15 = HEAP32[$14>>2]|0;
+  $16 = (($15) + -1)|0;
+  HEAP32[$14>>2] = $16;
+ }
+ $17 = $0;
+ $18 = ((($17)) + 188|0);
+ $19 = HEAP32[$18>>2]|0;
+ $loop = $19;
+ while(1) {
+  $20 = $loop;
+  $21 = ($20|0)!=(0|0);
+  if (!($21)) {
+   break;
+  }
+  $22 = $loop;
+  $23 = HEAP32[$22>>2]|0;
+  $24 = ($23|0)==(3);
+  if (!($24)) {
+   break;
+  }
+  $25 = $0;
+  (_genop_peep($25,8388636,0)|0);
+  $26 = $loop;
+  $27 = ((($26)) + 24|0);
+  $28 = HEAP32[$27>>2]|0;
+  $loop = $28;
+ }
+ while(1) {
+  $29 = $loop;
+  $30 = ($29|0)!=(0|0);
+  if ($30) {
+   $31 = $loop;
+   $32 = HEAP32[$31>>2]|0;
+   $33 = ($32|0)==(4);
+   $98 = $33;
+  } else {
+   $98 = 0;
+  }
+  $34 = $loop;
+  if (!($98)) {
+   break;
+  }
+  $35 = ((($34)) + 24|0);
+  $36 = HEAP32[$35>>2]|0;
+  $loop = $36;
+ }
+ $37 = ($34|0)!=(0|0);
+ if (!($37)) {
+  $38 = $0;
+  _codegen_error($38,69517);
+ }
+ $39 = $loop;
+ $40 = HEAP32[$39>>2]|0;
+ $41 = ($40|0)==(0);
+ $42 = $0;
+ if (!($41)) {
+  $91 = $0;
+  $92 = ((($91)) + 172|0);
+  $93 = HEAP32[$92>>2]|0;
+  $94 = $93 & 511;
+  $95 = $94 << 23;
+  $96 = 41 | $95;
+  $97 = $96 | 16384;
+  (_genop($42,$97)|0);
+  STACKTOP = sp;return;
+ }
+ $43 = ((($42)) + 192|0);
+ $44 = HEAP32[$43>>2]|0;
+ $45 = $0;
+ $46 = ((($45)) + 188|0);
+ $47 = HEAP32[$46>>2]|0;
+ $48 = ((($47)) + 20|0);
+ $49 = HEAP32[$48>>2]|0;
+ $50 = ($44|0)>($49|0);
+ if ($50) {
+  $51 = $0;
+  $52 = $0;
+  $53 = ((($52)) + 192|0);
+  $54 = HEAP32[$53>>2]|0;
+  $55 = $0;
+  $56 = ((($55)) + 188|0);
+  $57 = HEAP32[$56>>2]|0;
+  $58 = ((($57)) + 20|0);
+  $59 = HEAP32[$58>>2]|0;
+  $60 = (($54) - ($59))|0;
+  $61 = $60 & 511;
+  $62 = $61 << 23;
+  $63 = 31 | $62;
+  (_genop_peep($51,$63,0)|0);
+ }
+ $64 = $1;
+ $65 = ($64|0)!=(0|0);
+ if ($65) {
+  $66 = $0;
+  $67 = $loop;
+  $68 = ((($67)) + 16|0);
+  $69 = HEAP32[$68>>2]|0;
+  $70 = $69 & 511;
+  $71 = $70 << 23;
+  $72 = 1 | $71;
+  $73 = $0;
+  $74 = ((($73)) + 172|0);
+  $75 = HEAP32[$74>>2]|0;
+  $76 = $75 & 511;
+  $77 = $76 << 14;
+  $78 = $72 | $77;
+  (_genop_peep($66,$78,0)|0);
+ }
+ $79 = $0;
+ $80 = $loop;
+ $81 = ((($80)) + 12|0);
+ $82 = HEAP32[$81>>2]|0;
+ $83 = (($82) + 32767)|0;
+ $84 = $83 & 65535;
+ $85 = $84 << 7;
+ $86 = 23 | $85;
+ $87 = (_genop($79,$86)|0);
+ $tmp = $87;
+ $88 = $tmp;
+ $89 = $loop;
+ $90 = ((($89)) + 12|0);
+ HEAP32[$90>>2] = $88;
+ STACKTOP = sp;return;
+}
+function _mrb_fixnum_value_1199($agg$result,$i) {
+ $agg$result = $agg$result|0;
+ $i = $i|0;
+ var $0 = 0, $1 = 0, $2 = 0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $i;
+ $1 = ((($v)) + 4|0);
+ HEAP32[$1>>2] = 3;
+ $2 = $0;
+ HEAP32[$v>>2] = $2;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _readint_mrb_int($s,$p,$base,$neg,$overflow) {
+ $s = $s|0;
+ $p = $p|0;
+ $base = $base|0;
+ $neg = $neg|0;
+ $overflow = $overflow|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0;
+ var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $8 = 0, $9 = 0, $c = 0, $e = 0, $n = 0, $result = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $1 = $s;
+ $2 = $p;
+ $3 = $base;
+ $4 = $neg;
+ $5 = $overflow;
+ $6 = $2;
+ $7 = $2;
+ $8 = (_strlen($7)|0);
+ $9 = (($6) + ($8)|0);
+ $e = $9;
+ $result = 0;
+ $10 = $2;
+ $11 = HEAP8[$10>>0]|0;
+ $12 = $11 << 24 >> 24;
+ $13 = ($12|0)==(43);
+ if ($13) {
+  $14 = $2;
+  $15 = ((($14)) + 1|0);
+  $2 = $15;
+ }
+ while(1) {
+  $16 = $2;
+  $17 = $e;
+  $18 = ($16>>>0)<($17>>>0);
+  if (!($18)) {
+   label = 18;
+   break;
+  }
+  $19 = $2;
+  $20 = HEAP8[$19>>0]|0;
+  $c = $20;
+  $21 = $c;
+  $22 = $21&255;
+  $23 = (_tolower($22)|0);
+  $24 = $23&255;
+  $c = $24;
+  $n = 0;
+  while(1) {
+   $25 = $n;
+   $26 = $3;
+   $27 = ($25|0)<($26|0);
+   if (!($27)) {
+    break;
+   }
+   $28 = $n;
+   $29 = (55345 + ($28)|0);
+   $30 = HEAP8[$29>>0]|0;
+   $31 = $30 << 24 >> 24;
+   $32 = $c;
+   $33 = $32 << 24 >> 24;
+   $34 = ($31|0)==($33|0);
+   if ($34) {
+    break;
+   }
+   $35 = $n;
+   $36 = (($35) + 1)|0;
+   $n = $36;
+  }
+  $37 = $n;
+  $38 = $3;
+  $39 = ($37|0)==($38|0);
+  if ($39) {
+   $40 = $1;
+   _codegen_error($40,69585);
+  }
+  $41 = $4;
+  $42 = ($41<<24>>24)!=(0);
+  $43 = $n;
+  if ($42) {
+   $44 = (-2147483648 + ($43))|0;
+   $45 = $3;
+   $46 = (($44|0) / ($45|0))&-1;
+   $47 = $result;
+   $48 = ($46|0)>($47|0);
+   if ($48) {
+    label = 12;
+    break;
+   }
+   $50 = $3;
+   $51 = $result;
+   $52 = Math_imul($51, $50)|0;
+   $result = $52;
+   $53 = $n;
+   $54 = $result;
+   $55 = (($54) - ($53))|0;
+   $result = $55;
+  } else {
+   $56 = (2147483647 - ($43))|0;
+   $57 = $3;
+   $58 = (($56|0) / ($57|0))&-1;
+   $59 = $result;
+   $60 = ($58|0)<($59|0);
+   if ($60) {
+    label = 15;
+    break;
+   }
+   $62 = $3;
+   $63 = $result;
+   $64 = Math_imul($63, $62)|0;
+   $result = $64;
+   $65 = $n;
+   $66 = $result;
+   $67 = (($66) + ($65))|0;
+   $result = $67;
+  }
+  $68 = $2;
+  $69 = ((($68)) + 1|0);
+  $2 = $69;
+ }
+ if ((label|0) == 12) {
+  $49 = $5;
+  HEAP8[$49>>0] = 1;
+  $0 = 0;
+  $72 = $0;
+  STACKTOP = sp;return ($72|0);
+ }
+ else if ((label|0) == 15) {
+  $61 = $5;
+  HEAP8[$61>>0] = 1;
+  $0 = 0;
+  $72 = $0;
+  STACKTOP = sp;return ($72|0);
+ }
+ else if ((label|0) == 18) {
+  $70 = $5;
+  HEAP8[$70>>0] = 0;
+  $71 = $result;
+  $0 = $71;
+  $72 = $0;
+  STACKTOP = sp;return ($72|0);
+ }
+ return (0)|0;
+}
+function _readint_float($s,$p,$base) {
+ $s = $s|0;
+ $p = $p|0;
+ $base = $base|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
+ var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0;
+ var $45 = 0, $46 = 0, $47 = 0, $48 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, $e = 0, $f = 0.0, $n = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $p;
+ $2 = $base;
+ $3 = $1;
+ $4 = $1;
+ $5 = (_strlen($4)|0);
+ $6 = (($3) + ($5)|0);
+ $e = $6;
+ $f = 0.0;
+ $7 = $1;
+ $8 = HEAP8[$7>>0]|0;
+ $9 = $8 << 24 >> 24;
+ $10 = ($9|0)==(43);
+ if ($10) {
+  $11 = $1;
+  $12 = ((($11)) + 1|0);
+  $1 = $12;
+ }
+ while(1) {
+  $13 = $1;
+  $14 = $e;
+  $15 = ($13>>>0)<($14>>>0);
+  if (!($15)) {
+   break;
+  }
+  $16 = $1;
+  $17 = HEAP8[$16>>0]|0;
+  $c = $17;
+  $18 = $c;
+  $19 = $18&255;
+  $20 = (_tolower($19)|0);
+  $21 = $20&255;
+  $c = $21;
+  $n = 0;
+  while(1) {
+   $22 = $n;
+   $23 = $2;
+   $24 = ($22|0)<($23|0);
+   if (!($24)) {
+    break;
+   }
+   $25 = $n;
+   $26 = (55345 + ($25)|0);
+   $27 = HEAP8[$26>>0]|0;
+   $28 = $27 << 24 >> 24;
+   $29 = $c;
+   $30 = $29 << 24 >> 24;
+   $31 = ($28|0)==($30|0);
+   if ($31) {
+    label = 7;
+    break;
+   }
+   $40 = $n;
+   $41 = (($40) + 1)|0;
+   $n = $41;
+  }
+  if ((label|0) == 7) {
+   label = 0;
+   $32 = $2;
+   $33 = (+($32|0));
+   $34 = $f;
+   $35 = $34 * $33;
+   $f = $35;
+   $36 = $n;
+   $37 = (+($36|0));
+   $38 = $f;
+   $39 = $38 + $37;
+   $f = $39;
+  }
+  $42 = $n;
+  $43 = $2;
+  $44 = ($42|0)==($43|0);
+  if ($44) {
+   $45 = $0;
+   _codegen_error($45,69585);
+  }
+  $46 = $1;
+  $47 = ((($46)) + 1|0);
+  $1 = $47;
+ }
+ $48 = $f;
+ STACKTOP = sp;return (+$48);
+}
+function _mrb_float_value_1202($agg$result,$mrb,$f) {
+ $agg$result = $agg$result|0;
+ $mrb = $mrb|0;
+ $f = +$f;
+ var $0 = 0, $1 = 0.0, $2 = 0, $3 = 0.0, $v = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $v = sp;
+ $0 = $mrb;
+ $1 = $f;
+ $2 = ((($v)) + 4|0);
+ HEAP32[$2>>2] = 6;
+ $3 = $1;
+ HEAPF32[$v>>2] = $3;
+ ;HEAP32[$agg$result>>2]=HEAP32[$v>>2]|0;HEAP32[$agg$result+4>>2]=HEAP32[$v+4>>2]|0;
+ STACKTOP = sp;return;
+}
+function _gen_literal_array($s,$tree,$sym,$val) {
+ $s = $s|0;
+ $tree = $tree|0;
+ $sym = $sym|0;
+ $val = $val|0;
+ var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0;
+ var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0;
+ var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0;
+ var $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0;
+ var $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0;
+ var $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $i = 0, $j = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $tree;
+ $2 = $sym;
+ $3 = $val;
+ $4 = $3;
+ $5 = ($4|0)!=(0);
+ if (!($5)) {
+  while(1) {
+   $94 = $1;
+   $95 = ($94|0)!=(0|0);
+   if (!($95)) {
+    break;
+   }
+   $96 = $1;
+   $97 = HEAP32[$96>>2]|0;
+   $98 = HEAP32[$97>>2]|0;
+   $99 = $98;
+   switch ($99|0) {
+   case 4: case 17:  {
+    $100 = $0;
+    $101 = $1;
+    $102 = HEAP32[$101>>2]|0;
+    _codegen($100,$102,0);
+    break;
+   }
+   default: {
+   }
+   }
+   $103 = $1;
+   $104 = ((($103)) + 4|0);
+   $105 = HEAP32[$104>>2]|0;
+   $1 = $105;
+  }
+  STACKTOP = sp;return;
+ }
+ $i = 0;
+ $j = 0;
+ while(1) {
+  $6 = $1;
+  $7 = ($6|0)!=(0|0);
+  if (!($7)) {
+   break;
+  }
+  $8 = $1;
+  $9 = HEAP32[$8>>2]|0;
+  $10 = HEAP32[$9>>2]|0;
+  $11 = $10;
+  switch ($11|0) {
+  case 55:  {
+   $12 = $1;
+   $13 = ((($12)) + 4|0);
+   $14 = HEAP32[$13>>2]|0;
+   $15 = ($14|0)==(0|0);
+   if ($15) {
+    $16 = $1;
+    $17 = HEAP32[$16>>2]|0;
+    $18 = ((($17)) + 4|0);
+    $19 = HEAP32[$18>>2]|0;
+    $20 = ((($19)) + 4|0);
+    $21 = HEAP32[$20>>2]|0;
+    $22 = $21;
+    $23 = ($22|0)==(0);
+    if (!($23)) {
+     label = 7;
+    }
+   } else {
+    label = 7;
+   }
+   break;
+  }
+  case 17:  {
+   label = 7;
+   break;
+  }
+  case 100:  {
+   $29 = $j;
+   $30 = ($29|0)>(0);
+   if ($30) {
+    $j = 0;
+    $31 = $i;
+    $32 = (($31) + 1)|0;
+    $i = $32;
+    $33 = $2;
+    $34 = ($33<<24>>24)!=(0);
+    if ($34) {
+     $35 = $0;
+     _gen_send_intern($35);
+    }
+   }
+   break;
+  }
+  default: {
+  }
+  }
+  if ((label|0) == 7) {
+   label = 0;
+   $24 = $0;
+   $25 = $1;
+   $26 = HEAP32[$25>>2]|0;
+   _codegen($24,$26,1);
+   $27 = $j;
+   $28 = (($27) + 1)|0;
+   $j = $28;
+  }
+  $36 = $j;
+  $37 = ($36|0)>=(2);
+  if ($37) {
+   $38 = $0;
+   $39 = ((($38)) + 172|0);
+   $40 = HEAP32[$39>>2]|0;
+   $41 = (($40) + -1)|0;
+   HEAP32[$39>>2] = $41;
+   $42 = $0;
+   $43 = ((($42)) + 172|0);
+   $44 = HEAP32[$43>>2]|0;
+   $45 = (($44) + -1)|0;
+   HEAP32[$43>>2] = $45;
+   $46 = $0;
+   $47 = $0;
+   $48 = ((($47)) + 172|0);
+   $49 = HEAP32[$48>>2]|0;
+   $50 = $49 & 511;
+   $51 = $50 << 23;
+   $52 = 62 | $51;
+   $53 = $0;
+   $54 = ((($53)) + 172|0);
+   $55 = HEAP32[$54>>2]|0;
+   $56 = (($55) + 1)|0;
+   $57 = $56 & 511;
+   $58 = $57 << 14;
+   $59 = $52 | $58;
+   (_genop_peep($46,$59,1)|0);
+   $60 = $0;
+   _push_($60);
+   $j = 1;
+  }
+  $61 = $1;
+  $62 = ((($61)) + 4|0);
+  $63 = HEAP32[$62>>2]|0;
+  $1 = $63;
+ }
+ $64 = $j;
+ $65 = ($64|0)>(0);
+ if ($65) {
+  $66 = $i;
+  $67 = (($66) + 1)|0;
+  $i = $67;
+  $68 = $2;
+  $69 = ($68<<24>>24)!=(0);
+  if ($69) {
+   $70 = $0;
+   _gen_send_intern($70);
+  }
+ }
+ $71 = $i;
+ $72 = $0;
+ $73 = ((($72)) + 172|0);
+ $74 = HEAP32[$73>>2]|0;
+ $75 = (($74) - ($71))|0;
+ HEAP32[$73>>2] = $75;
+ $76 = $0;
+ $77 = $0;
+ $78 = ((($77)) + 172|0);
+ $79 = HEAP32[$78>>2]|0;
+ $80 = $79 & 511;
+ $81 = $80 << 23;
+ $82 = 55 | $81;
+ $83 = $0;
+ $84 = ((($83)) + 172|0);
+ $85 = HEAP32[$84>>2]|0;
+ $86 = $85 & 511;
+ $87 = $86 << 14;
+ $88 = $82 | $87;
+ $89 = $i;
+ $90 = $89 & 127;
+ $91 = $90 << 7;
+ $92 = $88 | $91;
+ (_genop($76,$92)|0);
+ $93 = $0;
+ _push_($93);
+ STACKTOP = sp;return;
+}
+function _gen_send_intern($s) {
+ $s = $s|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $s;
+ $1 = $0;
+ $2 = ((($1)) + 172|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = (($3) + -1)|0;
+ HEAP32[$2>>2] = $4;
+ $5 = $0;
+ $6 = $0;
+ $7 = ((($6)) + 172|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = $8 & 511;
+ $10 = $9 << 23;
+ $11 = 32 | $10;
+ $12 = $0;
+ $13 = $0;
+ $14 = HEAP32[$13>>2]|0;
+ $15 = (_mrb_intern_static($14,69611,6)|0);
+ $16 = (_new_msym($12,$15)|0);
+ $17 = $16 & 511;
+ $18 = $17 << 14;
+ $19 = $11 | $18;
+ (_genop($5,$19)|0);
+ $20 = $0;
+ _push_($20);
+ STACKTOP = sp;return;
+}
+function _mrb_init_comparable($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ (_mrb_define_module($1,69668)|0);
+ STACKTOP = sp;return;
+}
+function _mrb_init_enumerable($mrb) {
+ $mrb = $mrb|0;
+ var $0 = 0, $1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $0 = $mrb;
+ $1 = $0;
+ (_mrb_define_module($1,69679)|0);
+ STACKTOP = sp;return;
+}
+function ___stdio_close($f) {
+ $f = $f|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $vararg_buffer = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $0 = ((($f)) + 60|0);
+ $1 = HEAP32[$0>>2]|0;
+ HEAP32[$vararg_buffer>>2] = $1;
+ $2 = (___syscall6(6,($vararg_buffer|0))|0);
+ $3 = (___syscall_ret($2)|0);
+ STACKTOP = sp;return ($3|0);
+}
+function ___syscall_ret($r) {
+ $r = $r|0;
+ var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ($r>>>0)>(4294963200);
+ if ($0) {
+  $1 = (0 - ($r))|0;
+  $2 = (___errno_location()|0);
+  HEAP32[$2>>2] = $1;
+  $$0 = -1;
+ } else {
+  $$0 = $r;
+ }
+ return ($$0|0);
+}
+function ___errno_location() {
+ var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = HEAP32[18724]|0;
+ $1 = ($0|0)==(0|0);
+ if ($1) {
+  $$0 = 74940;
+ } else {
+  $2 = (_pthread_self()|0);
+  $3 = ((($2)) + 64|0);
+  $4 = HEAP32[$3>>2]|0;
+  $$0 = $4;
+ }
+ return ($$0|0);
+}
+function ___stdio_write($f,$buf,$len) {
+ $f = $f|0;
+ $buf = $buf|0;
+ $len = $len|0;
+ var $$0 = 0, $$phi$trans$insert = 0, $$pre = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
+ var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0;
+ var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cnt$0 = 0, $cnt$1 = 0, $iov$0 = 0, $iov$0$lcssa11 = 0, $iov$1 = 0, $iovcnt$0 = 0, $iovcnt$0$lcssa12 = 0;
+ var $iovcnt$1 = 0, $iovs = 0, $rem$0 = 0, $vararg_buffer = 0, $vararg_buffer3 = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr6 = 0, $vararg_ptr7 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer3 = sp + 16|0;
+ $vararg_buffer = sp;
+ $iovs = sp + 32|0;
+ $0 = ((($f)) + 28|0);
+ $1 = HEAP32[$0>>2]|0;
+ HEAP32[$iovs>>2] = $1;
+ $2 = ((($iovs)) + 4|0);
+ $3 = ((($f)) + 20|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = (($4) - ($1))|0;
+ HEAP32[$2>>2] = $5;
+ $6 = ((($iovs)) + 8|0);
+ HEAP32[$6>>2] = $buf;
+ $7 = ((($iovs)) + 12|0);
+ HEAP32[$7>>2] = $len;
+ $8 = (($5) + ($len))|0;
+ $9 = ((($f)) + 60|0);
+ $10 = ((($f)) + 44|0);
+ $iov$0 = $iovs;$iovcnt$0 = 2;$rem$0 = $8;
+ while(1) {
+  $11 = HEAP32[18724]|0;
+  $12 = ($11|0)==(0|0);
+  if ($12) {
+   $16 = HEAP32[$9>>2]|0;
+   HEAP32[$vararg_buffer3>>2] = $16;
+   $vararg_ptr6 = ((($vararg_buffer3)) + 4|0);
+   HEAP32[$vararg_ptr6>>2] = $iov$0;
+   $vararg_ptr7 = ((($vararg_buffer3)) + 8|0);
+   HEAP32[$vararg_ptr7>>2] = $iovcnt$0;
+   $17 = (___syscall146(146,($vararg_buffer3|0))|0);
+   $18 = (___syscall_ret($17)|0);
+   $cnt$0 = $18;
+  } else {
+   _pthread_cleanup_push((334|0),($f|0));
+   $13 = HEAP32[$9>>2]|0;
+   HEAP32[$vararg_buffer>>2] = $13;
+   $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+   HEAP32[$vararg_ptr1>>2] = $iov$0;
+   $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+   HEAP32[$vararg_ptr2>>2] = $iovcnt$0;
+   $14 = (___syscall146(146,($vararg_buffer|0))|0);
+   $15 = (___syscall_ret($14)|0);
+   _pthread_cleanup_pop(0);
+   $cnt$0 = $15;
+  }
+  $19 = ($rem$0|0)==($cnt$0|0);
+  if ($19) {
+   label = 6;
+   break;
+  }
+  $26 = ($cnt$0|0)<(0);
+  if ($26) {
+   $iov$0$lcssa11 = $iov$0;$iovcnt$0$lcssa12 = $iovcnt$0;
+   label = 8;
+   break;
+  }
+  $34 = (($rem$0) - ($cnt$0))|0;
+  $35 = ((($iov$0)) + 4|0);
+  $36 = HEAP32[$35>>2]|0;
+  $37 = ($cnt$0>>>0)>($36>>>0);
+  if ($37) {
+   $38 = HEAP32[$10>>2]|0;
+   HEAP32[$0>>2] = $38;
+   HEAP32[$3>>2] = $38;
+   $39 = (($cnt$0) - ($36))|0;
+   $40 = ((($iov$0)) + 8|0);
+   $41 = (($iovcnt$0) + -1)|0;
+   $$phi$trans$insert = ((($iov$0)) + 12|0);
+   $$pre = HEAP32[$$phi$trans$insert>>2]|0;
+   $49 = $$pre;$cnt$1 = $39;$iov$1 = $40;$iovcnt$1 = $41;
+  } else {
+   $42 = ($iovcnt$0|0)==(2);
+   if ($42) {
+    $43 = HEAP32[$0>>2]|0;
+    $44 = (($43) + ($cnt$0)|0);
+    HEAP32[$0>>2] = $44;
+    $49 = $36;$cnt$1 = $cnt$0;$iov$1 = $iov$0;$iovcnt$1 = 2;
+   } else {
+    $49 = $36;$cnt$1 = $cnt$0;$iov$1 = $iov$0;$iovcnt$1 = $iovcnt$0;
+   }
+  }
+  $45 = HEAP32[$iov$1>>2]|0;
+  $46 = (($45) + ($cnt$1)|0);
+  HEAP32[$iov$1>>2] = $46;
+  $47 = ((($iov$1)) + 4|0);
+  $48 = (($49) - ($cnt$1))|0;
+  HEAP32[$47>>2] = $48;
+  $iov$0 = $iov$1;$iovcnt$0 = $iovcnt$1;$rem$0 = $34;
+ }
+ if ((label|0) == 6) {
+  $20 = HEAP32[$10>>2]|0;
+  $21 = ((($f)) + 48|0);
+  $22 = HEAP32[$21>>2]|0;
+  $23 = (($20) + ($22)|0);
+  $24 = ((($f)) + 16|0);
+  HEAP32[$24>>2] = $23;
+  $25 = $20;
+  HEAP32[$0>>2] = $25;
+  HEAP32[$3>>2] = $25;
+  $$0 = $len;
+ }
+ else if ((label|0) == 8) {
+  $27 = ((($f)) + 16|0);
+  HEAP32[$27>>2] = 0;
+  HEAP32[$0>>2] = 0;
+  HEAP32[$3>>2] = 0;
+  $28 = HEAP32[$f>>2]|0;
+  $29 = $28 | 32;
+  HEAP32[$f>>2] = $29;
+  $30 = ($iovcnt$0$lcssa12|0)==(2);
+  if ($30) {
+   $$0 = 0;
+  } else {
+   $31 = ((($iov$0$lcssa11)) + 4|0);
+   $32 = HEAP32[$31>>2]|0;
+   $33 = (($len) - ($32))|0;
+   $$0 = $33;
+  }
+ }
+ STACKTOP = sp;return ($$0|0);
+}
+function _cleanup_522($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ((($p)) + 68|0);
+ $1 = HEAP32[$0>>2]|0;
+ $2 = ($1|0)==(0);
+ if ($2) {
+  ___unlockfile($p);
+ }
+ return;
+}
+function ___unlockfile($f) {
+ $f = $f|0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ return;
+}
+function ___stdio_seek($f,$off,$whence) {
+ $f = $f|0;
+ $off = $off|0;
+ $whence = $whence|0;
+ var $$pre = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $ret = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr3 = 0, $vararg_ptr4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $ret = sp + 20|0;
+ $0 = ((($f)) + 60|0);
+ $1 = HEAP32[$0>>2]|0;
+ HEAP32[$vararg_buffer>>2] = $1;
+ $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+ HEAP32[$vararg_ptr1>>2] = 0;
+ $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+ HEAP32[$vararg_ptr2>>2] = $off;
+ $vararg_ptr3 = ((($vararg_buffer)) + 12|0);
+ HEAP32[$vararg_ptr3>>2] = $ret;
+ $vararg_ptr4 = ((($vararg_buffer)) + 16|0);
+ HEAP32[$vararg_ptr4>>2] = $whence;
+ $2 = (___syscall140(140,($vararg_buffer|0))|0);
+ $3 = (___syscall_ret($2)|0);
+ $4 = ($3|0)<(0);
+ if ($4) {
+  HEAP32[$ret>>2] = -1;
+  $5 = -1;
+ } else {
+  $$pre = HEAP32[$ret>>2]|0;
+  $5 = $$pre;
+ }
+ STACKTOP = sp;return ($5|0);
+}
+function ___stdio_read($f,$buf,$len) {
+ $f = $f|0;
+ $buf = $buf|0;
+ $len = $len|0;
+ var $$0 = 0, $$cast = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $cnt$0 = 0, $iov = 0, $vararg_buffer = 0, $vararg_buffer3 = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr6 = 0, $vararg_ptr7 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer3 = sp + 16|0;
+ $vararg_buffer = sp;
+ $iov = sp + 32|0;
+ HEAP32[$iov>>2] = $buf;
+ $0 = ((($iov)) + 4|0);
+ $1 = ((($f)) + 48|0);
+ $2 = HEAP32[$1>>2]|0;
+ $3 = ($2|0)!=(0);
+ $4 = $3&1;
+ $5 = (($len) - ($4))|0;
+ HEAP32[$0>>2] = $5;
+ $6 = ((($iov)) + 8|0);
+ $7 = ((($f)) + 44|0);
+ $8 = HEAP32[$7>>2]|0;
+ HEAP32[$6>>2] = $8;
+ $9 = ((($iov)) + 12|0);
+ HEAP32[$9>>2] = $2;
+ $10 = HEAP32[18724]|0;
+ $11 = ($10|0)==(0|0);
+ if ($11) {
+  $16 = ((($f)) + 60|0);
+  $17 = HEAP32[$16>>2]|0;
+  HEAP32[$vararg_buffer3>>2] = $17;
+  $vararg_ptr6 = ((($vararg_buffer3)) + 4|0);
+  HEAP32[$vararg_ptr6>>2] = $iov;
+  $vararg_ptr7 = ((($vararg_buffer3)) + 8|0);
+  HEAP32[$vararg_ptr7>>2] = 2;
+  $18 = (___syscall145(145,($vararg_buffer3|0))|0);
+  $19 = (___syscall_ret($18)|0);
+  $cnt$0 = $19;
+ } else {
+  _pthread_cleanup_push((335|0),($f|0));
+  $12 = ((($f)) + 60|0);
+  $13 = HEAP32[$12>>2]|0;
+  HEAP32[$vararg_buffer>>2] = $13;
+  $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+  HEAP32[$vararg_ptr1>>2] = $iov;
+  $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+  HEAP32[$vararg_ptr2>>2] = 2;
+  $14 = (___syscall145(145,($vararg_buffer|0))|0);
+  $15 = (___syscall_ret($14)|0);
+  _pthread_cleanup_pop(0);
+  $cnt$0 = $15;
+ }
+ $20 = ($cnt$0|0)<(1);
+ if ($20) {
+  $21 = $cnt$0 & 48;
+  $22 = $21 ^ 16;
+  $23 = HEAP32[$f>>2]|0;
+  $24 = $23 | $22;
+  HEAP32[$f>>2] = $24;
+  $25 = ((($f)) + 8|0);
+  HEAP32[$25>>2] = 0;
+  $26 = ((($f)) + 4|0);
+  HEAP32[$26>>2] = 0;
+  $$0 = $cnt$0;
+ } else {
+  $27 = HEAP32[$0>>2]|0;
+  $28 = ($cnt$0>>>0)>($27>>>0);
+  if ($28) {
+   $29 = (($cnt$0) - ($27))|0;
+   $30 = HEAP32[$7>>2]|0;
+   $31 = ((($f)) + 4|0);
+   HEAP32[$31>>2] = $30;
+   $$cast = $30;
+   $32 = (($$cast) + ($29)|0);
+   $33 = ((($f)) + 8|0);
+   HEAP32[$33>>2] = $32;
+   $34 = HEAP32[$1>>2]|0;
+   $35 = ($34|0)==(0);
+   if ($35) {
+    $$0 = $len;
+   } else {
+    $36 = ((($$cast)) + 1|0);
+    HEAP32[$31>>2] = $36;
+    $37 = HEAP8[$$cast>>0]|0;
+    $38 = (($len) + -1)|0;
+    $39 = (($buf) + ($38)|0);
+    HEAP8[$39>>0] = $37;
+    $$0 = $len;
+   }
+  } else {
+   $$0 = $cnt$0;
+  }
+ }
+ STACKTOP = sp;return ($$0|0);
+}
+function _cleanup_517($p) {
+ $p = $p|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ((($p)) + 68|0);
+ $1 = HEAP32[$0>>2]|0;
+ $2 = ($1|0)==(0);
+ if ($2) {
+  ___unlockfile($p);
+ }
+ return;
+}
+function ___stdout_write($f,$buf,$len) {
+ $f = $f|0;
+ $buf = $buf|0;
+ $len = $len|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $tio = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer = sp;
+ $tio = sp + 12|0;
+ $0 = ((($f)) + 36|0);
+ HEAP32[$0>>2] = 2;
+ $1 = HEAP32[$f>>2]|0;
+ $2 = $1 & 64;
+ $3 = ($2|0)==(0);
+ if ($3) {
+  $4 = ((($f)) + 60|0);
+  $5 = HEAP32[$4>>2]|0;
+  HEAP32[$vararg_buffer>>2] = $5;
+  $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+  HEAP32[$vararg_ptr1>>2] = 21505;
+  $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+  HEAP32[$vararg_ptr2>>2] = $tio;
+  $6 = (___syscall54(54,($vararg_buffer|0))|0);
+  $7 = ($6|0)==(0);
+  if (!($7)) {
+   $8 = ((($f)) + 75|0);
+   HEAP8[$8>>0] = -1;
+  }
+ }
+ $9 = (___stdio_write($f,$buf,$len)|0);
+ STACKTOP = sp;return ($9|0);
+}
+function _tolower($c) {
+ $c = $c|0;
+ var $$0 = 0, $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = (_isupper($c)|0);
+ $1 = ($0|0)==(0);
+ $2 = $c | 32;
+ $$0 = $1 ? $c : $2;
+ return ($$0|0);
+}
+function _isupper($c) {
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = (($c) + -65)|0;
+ $1 = ($0>>>0)<(26);
+ $2 = $1&1;
+ return ($2|0);
+}
+function _strtox_545($s,$p,$base,$0,$1) {
+ $s = $s|0;
+ $p = $p|0;
+ $base = $base|0;
+ $0 = $0|0;
+ $1 = $1|0;
+ var $$sink = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $f = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $f = sp;
+ HEAP32[$f>>2] = 0;
+ $2 = ((($f)) + 4|0);
+ HEAP32[$2>>2] = $s;
+ $3 = ((($f)) + 44|0);
+ HEAP32[$3>>2] = $s;
+ $4 = ($s|0)<(0|0);
+ $5 = ((($s)) + 2147483647|0);
+ $$sink = $4 ? (-1) : $5;
+ $6 = ((($f)) + 8|0);
+ HEAP32[$6>>2] = $$sink;
+ $7 = ((($f)) + 76|0);
+ HEAP32[$7>>2] = -1;
+ ___shlim($f,0);
+ $8 = (___intscan($f,$base,1,$0,$1)|0);
+ $9 = tempRet0;
+ $10 = ($p|0)==(0|0);
+ if (!($10)) {
+  $11 = ((($f)) + 108|0);
+  $12 = HEAP32[$11>>2]|0;
+  $13 = HEAP32[$2>>2]|0;
+  $14 = HEAP32[$6>>2]|0;
+  $15 = (($13) + ($12))|0;
+  $16 = (($15) - ($14))|0;
+  $17 = (($s) + ($16)|0);
+  HEAP32[$p>>2] = $17;
+ }
+ tempRet0 = ($9);
+ STACKTOP = sp;return ($8|0);
+}
+function ___shlim($f,$lim) {
+ $f = $f|0;
+ $lim = $lim|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ((($f)) + 104|0);
+ HEAP32[$0>>2] = $lim;
+ $1 = ((($f)) + 8|0);
+ $2 = HEAP32[$1>>2]|0;
+ $3 = ((($f)) + 4|0);
+ $4 = HEAP32[$3>>2]|0;
+ $5 = (($2) - ($4))|0;
+ $6 = ((($f)) + 108|0);
+ HEAP32[$6>>2] = $5;
+ $7 = ($lim|0)!=(0);
+ $8 = ($5|0)>($lim|0);
+ $or$cond = $7 & $8;
+ if ($or$cond) {
+  $9 = $4;
+  $10 = (($9) + ($lim)|0);
+  $11 = ((($f)) + 100|0);
+  HEAP32[$11>>2] = $10;
+ } else {
+  $12 = ((($f)) + 100|0);
+  HEAP32[$12>>2] = $2;
+ }
+ return;
+}
+function ___intscan($f,$base,$pok,$0,$1) {
+ $f = $f|0;
+ $base = $base|0;
+ $pok = $pok|0;
+ $0 = $0|0;
+ $1 = $1|0;
+ var $$1 = 0, $$115 = 0, $$116 = 0, $$base14 = 0, $$lcssa = 0, $$lcssa108 = 0, $$lcssa109 = 0, $$lcssa110 = 0, $$lcssa111 = 0, $$lcssa112 = 0, $$lcssa113 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0;
+ var $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0;
+ var $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0;
+ var $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0;
+ var $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0;
+ var $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0;
+ var $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0;
+ var $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0;
+ var $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0;
+ var $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0;
+ var $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0;
+ var $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0;
+ var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0;
+ var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0;
+ var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0;
+ var $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $c$0 = 0, $c$1 = 0, $c$117 = 0, $c$2$be = 0, $c$2$be$lcssa = 0, $c$2$lcssa = 0, $c$3$be = 0, $c$3$lcssa = 0, $c$359 = 0, $c$4$be = 0, $c$4$be$lcssa = 0, $c$4$lcssa = 0, $c$5$be = 0, $c$6$be = 0, $c$6$be$lcssa = 0;
+ var $c$6$lcssa = 0, $c$7$be = 0, $c$742 = 0, $c$8 = 0, $c$9$be = 0, $neg$0 = 0, $neg$0$ = 0, $neg$1 = 0, $or$cond = 0, $or$cond12 = 0, $or$cond31 = 0, $or$cond5 = 0, $or$cond7 = 0, $x$070 = 0, $x$136 = 0, $x$254 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = ($base>>>0)>(36);
+ L1: do {
+  if ($2) {
+   $5 = (___errno_location()|0);
+   HEAP32[$5>>2] = 22;
+   $286 = 0;$287 = 0;
+  } else {
+   $3 = ((($f)) + 4|0);
+   $4 = ((($f)) + 100|0);
+   while(1) {
+    $6 = HEAP32[$3>>2]|0;
+    $7 = HEAP32[$4>>2]|0;
+    $8 = ($6>>>0)<($7>>>0);
+    if ($8) {
+     $9 = ((($6)) + 1|0);
+     HEAP32[$3>>2] = $9;
+     $10 = HEAP8[$6>>0]|0;
+     $11 = $10&255;
+     $13 = $11;
+    } else {
+     $12 = (___shgetc($f)|0);
+     $13 = $12;
+    }
+    $14 = (_isspace($13)|0);
+    $15 = ($14|0)==(0);
+    if ($15) {
+     $$lcssa113 = $13;
+     break;
+    }
+   }
+   $16 = ($$lcssa113|0)==(45);
+   L11: do {
+    switch ($$lcssa113|0) {
+    case 43: case 45:  {
+     $17 = $16 << 31 >> 31;
+     $18 = HEAP32[$3>>2]|0;
+     $19 = HEAP32[$4>>2]|0;
+     $20 = ($18>>>0)<($19>>>0);
+     if ($20) {
+      $21 = ((($18)) + 1|0);
+      HEAP32[$3>>2] = $21;
+      $22 = HEAP8[$18>>0]|0;
+      $23 = $22&255;
+      $c$0 = $23;$neg$0 = $17;
+      break L11;
+     } else {
+      $24 = (___shgetc($f)|0);
+      $c$0 = $24;$neg$0 = $17;
+      break L11;
+     }
+     break;
+    }
+    default: {
+     $c$0 = $$lcssa113;$neg$0 = 0;
+    }
+    }
+   } while(0);
+   $25 = ($base|0)==(0);
+   $26 = $base | 16;
+   $27 = ($26|0)==(16);
+   $28 = ($c$0|0)==(48);
+   $or$cond5 = $27 & $28;
+   do {
+    if ($or$cond5) {
+     $29 = HEAP32[$3>>2]|0;
+     $30 = HEAP32[$4>>2]|0;
+     $31 = ($29>>>0)<($30>>>0);
+     if ($31) {
+      $32 = ((($29)) + 1|0);
+      HEAP32[$3>>2] = $32;
+      $33 = HEAP8[$29>>0]|0;
+      $34 = $33&255;
+      $37 = $34;
+     } else {
+      $35 = (___shgetc($f)|0);
+      $37 = $35;
+     }
+     $36 = $37 | 32;
+     $38 = ($36|0)==(120);
+     if (!($38)) {
+      if ($25) {
+       $$116 = 8;$c$117 = $37;
+       label = 46;
+       break;
+      } else {
+       $$1 = $base;$c$1 = $37;
+       label = 32;
+       break;
+      }
+     }
+     $39 = HEAP32[$3>>2]|0;
+     $40 = HEAP32[$4>>2]|0;
+     $41 = ($39>>>0)<($40>>>0);
+     if ($41) {
+      $42 = ((($39)) + 1|0);
+      HEAP32[$3>>2] = $42;
+      $43 = HEAP8[$39>>0]|0;
+      $44 = $43&255;
+      $47 = $44;
+     } else {
+      $45 = (___shgetc($f)|0);
+      $47 = $45;
+     }
+     $46 = ((69691) + ($47)|0);
+     $48 = HEAP8[$46>>0]|0;
+     $49 = ($48&255)>(15);
+     if ($49) {
+      $50 = HEAP32[$4>>2]|0;
+      $51 = ($50|0)==(0|0);
+      if (!($51)) {
+       $52 = HEAP32[$3>>2]|0;
+       $53 = ((($52)) + -1|0);
+       HEAP32[$3>>2] = $53;
+      }
+      $54 = ($pok|0)==(0);
+      if ($54) {
+       ___shlim($f,0);
+       $286 = 0;$287 = 0;
+       break L1;
+      }
+      if ($51) {
+       $286 = 0;$287 = 0;
+       break L1;
+      }
+      $55 = HEAP32[$3>>2]|0;
+      $56 = ((($55)) + -1|0);
+      HEAP32[$3>>2] = $56;
+      $286 = 0;$287 = 0;
+      break L1;
+     } else {
+      $$116 = 16;$c$117 = $47;
+      label = 46;
+     }
+    } else {
+     $$base14 = $25 ? 10 : $base;
+     $57 = ((69691) + ($c$0)|0);
+     $58 = HEAP8[$57>>0]|0;
+     $59 = $58&255;
+     $60 = ($59>>>0)<($$base14>>>0);
+     if ($60) {
+      $$1 = $$base14;$c$1 = $c$0;
+      label = 32;
+     } else {
+      $61 = HEAP32[$4>>2]|0;
+      $62 = ($61|0)==(0|0);
+      if (!($62)) {
+       $63 = HEAP32[$3>>2]|0;
+       $64 = ((($63)) + -1|0);
+       HEAP32[$3>>2] = $64;
+      }
+      ___shlim($f,0);
+      $65 = (___errno_location()|0);
+      HEAP32[$65>>2] = 22;
+      $286 = 0;$287 = 0;
+      break L1;
+     }
+    }
+   } while(0);
+   if ((label|0) == 32) {
+    $66 = ($$1|0)==(10);
+    if ($66) {
+     $67 = (($c$1) + -48)|0;
+     $68 = ($67>>>0)<(10);
+     if ($68) {
+      $71 = $67;$x$070 = 0;
+      while(1) {
+       $69 = ($x$070*10)|0;
+       $70 = (($69) + ($71))|0;
+       $72 = HEAP32[$3>>2]|0;
+       $73 = HEAP32[$4>>2]|0;
+       $74 = ($72>>>0)<($73>>>0);
+       if ($74) {
+        $75 = ((($72)) + 1|0);
+        HEAP32[$3>>2] = $75;
+        $76 = HEAP8[$72>>0]|0;
+        $77 = $76&255;
+        $c$2$be = $77;
+       } else {
+        $78 = (___shgetc($f)|0);
+        $c$2$be = $78;
+       }
+       $79 = (($c$2$be) + -48)|0;
+       $80 = ($79>>>0)<(10);
+       $81 = ($70>>>0)<(429496729);
+       $82 = $80 & $81;
+       if ($82) {
+        $71 = $79;$x$070 = $70;
+       } else {
+        $$lcssa112 = $70;$c$2$be$lcssa = $c$2$be;
+        break;
+       }
+      }
+      $288 = $$lcssa112;$289 = 0;$c$2$lcssa = $c$2$be$lcssa;
+     } else {
+      $288 = 0;$289 = 0;$c$2$lcssa = $c$1;
+     }
+     $83 = (($c$2$lcssa) + -48)|0;
+     $84 = ($83>>>0)<(10);
+     if ($84) {
+      $85 = $288;$86 = $289;$89 = $83;$c$359 = $c$2$lcssa;
+      while(1) {
+       $87 = (___muldi3(($85|0),($86|0),10,0)|0);
+       $88 = tempRet0;
+       $90 = ($89|0)<(0);
+       $91 = $90 << 31 >> 31;
+       $92 = $89 ^ -1;
+       $93 = $91 ^ -1;
+       $94 = ($88>>>0)>($93>>>0);
+       $95 = ($87>>>0)>($92>>>0);
+       $96 = ($88|0)==($93|0);
+       $97 = $96 & $95;
+       $98 = $94 | $97;
+       if ($98) {
+        $$lcssa = $89;$290 = $85;$291 = $86;$c$3$lcssa = $c$359;
+        break;
+       }
+       $99 = (_i64Add(($87|0),($88|0),($89|0),($91|0))|0);
+       $100 = tempRet0;
+       $101 = HEAP32[$3>>2]|0;
+       $102 = HEAP32[$4>>2]|0;
+       $103 = ($101>>>0)<($102>>>0);
+       if ($103) {
+        $104 = ((($101)) + 1|0);
+        HEAP32[$3>>2] = $104;
+        $105 = HEAP8[$101>>0]|0;
+        $106 = $105&255;
+        $c$3$be = $106;
+       } else {
+        $107 = (___shgetc($f)|0);
+        $c$3$be = $107;
+       }
+       $108 = (($c$3$be) + -48)|0;
+       $109 = ($108>>>0)<(10);
+       $110 = ($100>>>0)<(429496729);
+       $111 = ($99>>>0)<(2576980378);
+       $112 = ($100|0)==(429496729);
+       $113 = $112 & $111;
+       $114 = $110 | $113;
+       $or$cond7 = $109 & $114;
+       if ($or$cond7) {
+        $85 = $99;$86 = $100;$89 = $108;$c$359 = $c$3$be;
+       } else {
+        $$lcssa = $108;$290 = $99;$291 = $100;$c$3$lcssa = $c$3$be;
+        break;
+       }
+      }
+      $115 = ($$lcssa>>>0)>(9);
+      if ($115) {
+       $259 = $291;$261 = $290;$neg$1 = $neg$0;
+      } else {
+       $$115 = 10;$292 = $290;$293 = $291;$c$8 = $c$3$lcssa;
+       label = 72;
+      }
+     } else {
+      $259 = $289;$261 = $288;$neg$1 = $neg$0;
+     }
+    } else {
+     $$116 = $$1;$c$117 = $c$1;
+     label = 46;
+    }
+   }
+   L63: do {
+    if ((label|0) == 46) {
+     $116 = (($$116) + -1)|0;
+     $117 = $116 & $$116;
+     $118 = ($117|0)==(0);
+     if ($118) {
+      $123 = ($$116*23)|0;
+      $124 = $123 >>> 5;
+      $125 = $124 & 7;
+      $126 = (69947 + ($125)|0);
+      $127 = HEAP8[$126>>0]|0;
+      $128 = $127 << 24 >> 24;
+      $129 = ((69691) + ($c$117)|0);
+      $130 = HEAP8[$129>>0]|0;
+      $131 = $130&255;
+      $132 = ($131>>>0)<($$116>>>0);
+      if ($132) {
+       $135 = $131;$x$136 = 0;
+       while(1) {
+        $133 = $x$136 << $128;
+        $134 = $135 | $133;
+        $136 = HEAP32[$3>>2]|0;
+        $137 = HEAP32[$4>>2]|0;
+        $138 = ($136>>>0)<($137>>>0);
+        if ($138) {
+         $139 = ((($136)) + 1|0);
+         HEAP32[$3>>2] = $139;
+         $140 = HEAP8[$136>>0]|0;
+         $141 = $140&255;
+         $c$4$be = $141;
+        } else {
+         $142 = (___shgetc($f)|0);
+         $c$4$be = $142;
+        }
+        $143 = ((69691) + ($c$4$be)|0);
+        $144 = HEAP8[$143>>0]|0;
+        $145 = $144&255;
+        $146 = ($145>>>0)<($$116>>>0);
+        $147 = ($134>>>0)<(134217728);
+        $148 = $147 & $146;
+        if ($148) {
+         $135 = $145;$x$136 = $134;
+        } else {
+         $$lcssa108 = $134;$$lcssa109 = $144;$c$4$be$lcssa = $c$4$be;
+         break;
+        }
+       }
+       $152 = $$lcssa109;$154 = 0;$156 = $$lcssa108;$c$4$lcssa = $c$4$be$lcssa;
+      } else {
+       $152 = $130;$154 = 0;$156 = 0;$c$4$lcssa = $c$117;
+      }
+      $149 = (_bitshift64Lshr(-1,-1,($128|0))|0);
+      $150 = tempRet0;
+      $151 = $152&255;
+      $153 = ($151>>>0)>=($$116>>>0);
+      $155 = ($154>>>0)>($150>>>0);
+      $157 = ($156>>>0)>($149>>>0);
+      $158 = ($154|0)==($150|0);
+      $159 = $158 & $157;
+      $160 = $155 | $159;
+      $or$cond31 = $153 | $160;
+      if ($or$cond31) {
+       $$115 = $$116;$292 = $156;$293 = $154;$c$8 = $c$4$lcssa;
+       label = 72;
+       break;
+      } else {
+       $161 = $156;$162 = $154;$166 = $152;
+      }
+      while(1) {
+       $163 = (_bitshift64Shl(($161|0),($162|0),($128|0))|0);
+       $164 = tempRet0;
+       $165 = $166&255;
+       $167 = $165 | $163;
+       $168 = HEAP32[$3>>2]|0;
+       $169 = HEAP32[$4>>2]|0;
+       $170 = ($168>>>0)<($169>>>0);
+       if ($170) {
+        $171 = ((($168)) + 1|0);
+        HEAP32[$3>>2] = $171;
+        $172 = HEAP8[$168>>0]|0;
+        $173 = $172&255;
+        $c$5$be = $173;
+       } else {
+        $174 = (___shgetc($f)|0);
+        $c$5$be = $174;
+       }
+       $175 = ((69691) + ($c$5$be)|0);
+       $176 = HEAP8[$175>>0]|0;
+       $177 = $176&255;
+       $178 = ($177>>>0)>=($$116>>>0);
+       $179 = ($164>>>0)>($150>>>0);
+       $180 = ($167>>>0)>($149>>>0);
+       $181 = ($164|0)==($150|0);
+       $182 = $181 & $180;
+       $183 = $179 | $182;
+       $or$cond = $178 | $183;
+       if ($or$cond) {
+        $$115 = $$116;$292 = $167;$293 = $164;$c$8 = $c$5$be;
+        label = 72;
+        break L63;
+       } else {
+        $161 = $167;$162 = $164;$166 = $176;
+       }
+      }
+     }
+     $119 = ((69691) + ($c$117)|0);
+     $120 = HEAP8[$119>>0]|0;
+     $121 = $120&255;
+     $122 = ($121>>>0)<($$116>>>0);
+     if ($122) {
+      $186 = $121;$x$254 = 0;
+      while(1) {
+       $184 = Math_imul($x$254, $$116)|0;
+       $185 = (($186) + ($184))|0;
+       $187 = HEAP32[$3>>2]|0;
+       $188 = HEAP32[$4>>2]|0;
+       $189 = ($187>>>0)<($188>>>0);
+       if ($189) {
+        $190 = ((($187)) + 1|0);
+        HEAP32[$3>>2] = $190;
+        $191 = HEAP8[$187>>0]|0;
+        $192 = $191&255;
+        $c$6$be = $192;
+       } else {
+        $193 = (___shgetc($f)|0);
+        $c$6$be = $193;
+       }
+       $194 = ((69691) + ($c$6$be)|0);
+       $195 = HEAP8[$194>>0]|0;
+       $196 = $195&255;
+       $197 = ($196>>>0)<($$116>>>0);
+       $198 = ($185>>>0)<(119304647);
+       $199 = $198 & $197;
+       if ($199) {
+        $186 = $196;$x$254 = $185;
+       } else {
+        $$lcssa110 = $185;$$lcssa111 = $195;$c$6$be$lcssa = $c$6$be;
+        break;
+       }
+      }
+      $201 = $$lcssa111;$294 = $$lcssa110;$295 = 0;$c$6$lcssa = $c$6$be$lcssa;
+     } else {
+      $201 = $120;$294 = 0;$295 = 0;$c$6$lcssa = $c$117;
+     }
+     $200 = $201&255;
+     $202 = ($200>>>0)<($$116>>>0);
+     if ($202) {
+      $203 = (___udivdi3(-1,-1,($$116|0),0)|0);
+      $204 = tempRet0;
+      $205 = $295;$207 = $294;$215 = $201;$c$742 = $c$6$lcssa;
+      while(1) {
+       $206 = ($205>>>0)>($204>>>0);
+       $208 = ($207>>>0)>($203>>>0);
+       $209 = ($205|0)==($204|0);
+       $210 = $209 & $208;
+       $211 = $206 | $210;
+       if ($211) {
+        $$115 = $$116;$292 = $207;$293 = $205;$c$8 = $c$742;
+        label = 72;
+        break L63;
+       }
+       $212 = (___muldi3(($207|0),($205|0),($$116|0),0)|0);
+       $213 = tempRet0;
+       $214 = $215&255;
+       $216 = $214 ^ -1;
+       $217 = ($213>>>0)>(4294967295);
+       $218 = ($212>>>0)>($216>>>0);
+       $219 = ($213|0)==(-1);
+       $220 = $219 & $218;
+       $221 = $217 | $220;
+       if ($221) {
+        $$115 = $$116;$292 = $207;$293 = $205;$c$8 = $c$742;
+        label = 72;
+        break L63;
+       }
+       $222 = (_i64Add(($214|0),0,($212|0),($213|0))|0);
+       $223 = tempRet0;
+       $224 = HEAP32[$3>>2]|0;
+       $225 = HEAP32[$4>>2]|0;
+       $226 = ($224>>>0)<($225>>>0);
+       if ($226) {
+        $227 = ((($224)) + 1|0);
+        HEAP32[$3>>2] = $227;
+        $228 = HEAP8[$224>>0]|0;
+        $229 = $228&255;
+        $c$7$be = $229;
+       } else {
+        $230 = (___shgetc($f)|0);
+        $c$7$be = $230;
+       }
+       $231 = ((69691) + ($c$7$be)|0);
+       $232 = HEAP8[$231>>0]|0;
+       $233 = $232&255;
+       $234 = ($233>>>0)<($$116>>>0);
+       if ($234) {
+        $205 = $223;$207 = $222;$215 = $232;$c$742 = $c$7$be;
+       } else {
+        $$115 = $$116;$292 = $222;$293 = $223;$c$8 = $c$7$be;
+        label = 72;
+        break;
+       }
+      }
+     } else {
+      $$115 = $$116;$292 = $294;$293 = $295;$c$8 = $c$6$lcssa;
+      label = 72;
+     }
+    }
+   } while(0);
+   if ((label|0) == 72) {
+    $235 = ((69691) + ($c$8)|0);
+    $236 = HEAP8[$235>>0]|0;
+    $237 = $236&255;
+    $238 = ($237>>>0)<($$115>>>0);
+    if ($238) {
+     while(1) {
+      $239 = HEAP32[$3>>2]|0;
+      $240 = HEAP32[$4>>2]|0;
+      $241 = ($239>>>0)<($240>>>0);
+      if ($241) {
+       $242 = ((($239)) + 1|0);
+       HEAP32[$3>>2] = $242;
+       $243 = HEAP8[$239>>0]|0;
+       $244 = $243&255;
+       $c$9$be = $244;
+      } else {
+       $245 = (___shgetc($f)|0);
+       $c$9$be = $245;
+      }
+      $246 = ((69691) + ($c$9$be)|0);
+      $247 = HEAP8[$246>>0]|0;
+      $248 = $247&255;
+      $249 = ($248>>>0)<($$115>>>0);
+      if (!($249)) {
+       break;
+      }
+     }
+     $250 = (___errno_location()|0);
+     HEAP32[$250>>2] = 34;
+     $251 = $0 & 1;
+     $252 = ($251|0)==(0);
+     $253 = (0)==(0);
+     $254 = $252 & $253;
+     $neg$0$ = $254 ? $neg$0 : 0;
+     $259 = $1;$261 = $0;$neg$1 = $neg$0$;
+    } else {
+     $259 = $293;$261 = $292;$neg$1 = $neg$0;
+    }
+   }
+   $255 = HEAP32[$4>>2]|0;
+   $256 = ($255|0)==(0|0);
+   if (!($256)) {
+    $257 = HEAP32[$3>>2]|0;
+    $258 = ((($257)) + -1|0);
+    HEAP32[$3>>2] = $258;
+   }
+   $260 = ($259>>>0)<($1>>>0);
+   $262 = ($261>>>0)<($0>>>0);
+   $263 = ($259|0)==($1|0);
+   $264 = $263 & $262;
+   $265 = $260 | $264;
+   if (!($265)) {
+    $266 = $0 & 1;
+    $267 = ($266|0)!=(0);
+    $268 = (0)!=(0);
+    $269 = $267 | $268;
+    $270 = ($neg$1|0)!=(0);
+    $or$cond12 = $269 | $270;
+    if (!($or$cond12)) {
+     $271 = (___errno_location()|0);
+     HEAP32[$271>>2] = 34;
+     $272 = (_i64Add(($0|0),($1|0),-1,-1)|0);
+     $273 = tempRet0;
+     $286 = $273;$287 = $272;
+     break;
+    }
+    $274 = ($259>>>0)>($1>>>0);
+    $275 = ($261>>>0)>($0>>>0);
+    $276 = ($259|0)==($1|0);
+    $277 = $276 & $275;
+    $278 = $274 | $277;
+    if ($278) {
+     $279 = (___errno_location()|0);
+     HEAP32[$279>>2] = 34;
+     $286 = $1;$287 = $0;
+     break;
+    }
+   }
+   $280 = ($neg$1|0)<(0);
+   $281 = $280 << 31 >> 31;
+   $282 = $261 ^ $neg$1;
+   $283 = $259 ^ $281;
+   $284 = (_i64Subtract(($282|0),($283|0),($neg$1|0),($281|0))|0);
+   $285 = tempRet0;
+   $286 = $285;$287 = $284;
+  }
+ } while(0);
+ tempRet0 = ($286);
+ return ($287|0);
+}
+function ___shgetc($f) {
+ $f = $f|0;
+ var $$0 = 0, $$phi$trans$insert = 0, $$phi$trans$insert3 = 0, $$pre = 0, $$pre4 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0;
+ var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0;
+ var $40 = 0, $41 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ((($f)) + 104|0);
+ $1 = HEAP32[$0>>2]|0;
+ $2 = ($1|0)==(0);
+ if ($2) {
+  label = 3;
+ } else {
+  $3 = ((($f)) + 108|0);
+  $4 = HEAP32[$3>>2]|0;
+  $5 = ($4|0)<($1|0);
+  if ($5) {
+   label = 3;
+  } else {
+   label = 4;
+  }
+ }
+ if ((label|0) == 3) {
+  $6 = (___uflow($f)|0);
+  $7 = ($6|0)<(0);
+  if ($7) {
+   label = 4;
+  } else {
+   $9 = HEAP32[$0>>2]|0;
+   $10 = ($9|0)==(0);
+   $$phi$trans$insert = ((($f)) + 8|0);
+   $$pre = HEAP32[$$phi$trans$insert>>2]|0;
+   if ($10) {
+    $11 = $$pre;
+    $41 = $11;
+    label = 9;
+   } else {
+    $12 = ((($f)) + 4|0);
+    $13 = HEAP32[$12>>2]|0;
+    $14 = $13;
+    $15 = (($$pre) - ($14))|0;
+    $16 = ((($f)) + 108|0);
+    $17 = HEAP32[$16>>2]|0;
+    $18 = (($9) - ($17))|0;
+    $19 = ($15|0)<($18|0);
+    $20 = $$pre;
+    if ($19) {
+     $41 = $20;
+     label = 9;
+    } else {
+     $21 = (($18) + -1)|0;
+     $22 = (($13) + ($21)|0);
+     $23 = ((($f)) + 100|0);
+     HEAP32[$23>>2] = $22;
+     $25 = $20;
+    }
+   }
+   if ((label|0) == 9) {
+    $24 = ((($f)) + 100|0);
+    HEAP32[$24>>2] = $$pre;
+    $25 = $41;
+   }
+   $26 = ($25|0)==(0|0);
+   $$phi$trans$insert3 = ((($f)) + 4|0);
+   if ($26) {
+    $$pre4 = HEAP32[$$phi$trans$insert3>>2]|0;
+    $36 = $$pre4;
+   } else {
+    $27 = HEAP32[$$phi$trans$insert3>>2]|0;
+    $28 = $25;
+    $29 = ((($f)) + 108|0);
+    $30 = HEAP32[$29>>2]|0;
+    $31 = (($28) + 1)|0;
+    $32 = (($31) - ($27))|0;
+    $33 = (($32) + ($30))|0;
+    HEAP32[$29>>2] = $33;
+    $34 = $27;
+    $36 = $34;
+   }
+   $35 = ((($36)) + -1|0);
+   $37 = HEAP8[$35>>0]|0;
+   $38 = $37&255;
+   $39 = ($38|0)==($6|0);
+   if ($39) {
+    $$0 = $6;
+   } else {
+    $40 = $6&255;
+    HEAP8[$35>>0] = $40;
+    $$0 = $6;
+   }
+  }
+ }
+ if ((label|0) == 4) {
+  $8 = ((($f)) + 100|0);
+  HEAP32[$8>>2] = 0;
+  $$0 = -1;
+ }
+ return ($$0|0);
+}
+function ___uflow($f) {
+ $f = $f|0;
+ var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $c = sp;
+ $0 = ((($f)) + 8|0);
+ $1 = HEAP32[$0>>2]|0;
+ $2 = ($1|0)==(0|0);
+ if ($2) {
+  $3 = (___toread($f)|0);
+  $4 = ($3|0)==(0);
+  if ($4) {
+   label = 3;
+  } else {
+   $$0 = -1;
+  }
+ } else {
+  label = 3;
+ }
+ if ((label|0) == 3) {
+  $5 = ((($f)) + 32|0);
+  $6 = HEAP32[$5>>2]|0;
+  $7 = (FUNCTION_TABLE_iiii[$6 & 511]($f,$c,1)|0);
+  $8 = ($7|0)==(1);
+  if ($8) {
+   $9 = HEAP8[$c>>0]|0;
+   $10 = $9&255;
+   $$0 = $10;
+  } else {
+   $$0 = -1;
+  }
+ }
+ STACKTOP = sp;return ($$0|0);
+}
+function ___toread($f) {
+ $f = $f|0;
+ var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ((($f)) + 74|0);
+ $1 = HEAP8[$0>>0]|0;
+ $2 = $1 << 24 >> 24;
+ $3 = (($2) + 255)|0;
+ $4 = $3 | $2;
+ $5 = $4&255;
+ HEAP8[$0>>0] = $5;
+ $6 = ((($f)) + 20|0);
+ $7 = HEAP32[$6>>2]|0;
+ $8 = ((($f)) + 44|0);
+ $9 = HEAP32[$8>>2]|0;
+ $10 = ($7>>>0)>($9>>>0);
+ if ($10) {
+  $11 = ((($f)) + 36|0);
+  $12 = HEAP32[$11>>2]|0;
+  (FUNCTION_TABLE_iiii[$12 & 511]($f,0,0)|0);
+ }
+ $13 = ((($f)) + 16|0);
+ HEAP32[$13>>2] = 0;
+ $14 = ((($f)) + 28|0);
+ HEAP32[$14>>2] = 0;
+ HEAP32[$6>>2] = 0;
+ $15 = HEAP32[$f>>2]|0;
+ $16 = $15 & 20;
+ $17 = ($16|0)==(0);
+ if ($17) {
+  $21 = HEAP32[$8>>2]|0;
+  $22 = ((($f)) + 8|0);
+  HEAP32[$22>>2] = $21;
+  $23 = ((($f)) + 4|0);
+  HEAP32[$23>>2] = $21;
+  $$0 = 0;
+ } else {
+  $18 = $15 & 4;
+  $19 = ($18|0)==(0);
+  if ($19) {
+   $$0 = -1;
+  } else {
+   $20 = $15 | 32;
+   HEAP32[$f>>2] = $20;
+   $$0 = -1;
+  }
+ }
+ return ($$0|0);
+}
+function _isspace($c) {
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ($c|0)==(32);
+ $1 = (($c) + -9)|0;
+ $2 = ($1>>>0)<(5);
+ $3 = $0 | $2;
+ $4 = $3&1;
+ return ($4|0);
+}
+function _strtoul($s,$p,$base) {
+ $s = $s|0;
+ $p = $p|0;
+ $base = $base|0;
+ var $0 = 0, $1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = (_strtox_545($s,$p,$base,-1,0)|0);
+ $1 = tempRet0;
+ return ($0|0);
+}
+function _copysign($x,$y) {
+ $x = +$x;
+ $y = +$y;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $fabs = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF64[tempDoublePtr>>3] = $y;$0 = HEAP32[tempDoublePtr>>2]|0;
+ $1 = HEAP32[tempDoublePtr+4>>2]|0;
+ $fabs = (+Math_abs((+$x)));
+ HEAPF64[tempDoublePtr>>3] = $fabs;$2 = HEAP32[tempDoublePtr>>2]|0;
+ $3 = HEAP32[tempDoublePtr+4>>2]|0;
+ $4 = $1 & -2147483648;
+ $5 = $4 | $3;
+ HEAP32[tempDoublePtr>>2] = $2;HEAP32[tempDoublePtr+4>>2] = $5;$6 = +HEAPF64[tempDoublePtr>>3];
+ return (+$6);
+}
+function _memchr($src,$c,$n) {
+ $src = $src|0;
+ $c = $c|0;
+ $n = $n|0;
+ var $$0$lcssa = 0, $$0$lcssa30 = 0, $$019 = 0, $$1$lcssa = 0, $$110 = 0, $$110$lcssa = 0, $$24 = 0, $$3 = 0, $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0;
+ var $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0;
+ var $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond18 = 0, $s$0$lcssa = 0, $s$0$lcssa29 = 0, $s$020 = 0, $s$15 = 0, $s$2 = 0, $w$0$lcssa = 0, $w$011 = 0, $w$011$lcssa = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = $c & 255;
+ $1 = $src;
+ $2 = $1 & 3;
+ $3 = ($2|0)!=(0);
+ $4 = ($n|0)!=(0);
+ $or$cond18 = $4 & $3;
+ L1: do {
+  if ($or$cond18) {
+   $5 = $c&255;
+   $$019 = $n;$s$020 = $src;
+   while(1) {
+    $6 = HEAP8[$s$020>>0]|0;
+    $7 = ($6<<24>>24)==($5<<24>>24);
+    if ($7) {
+     $$0$lcssa30 = $$019;$s$0$lcssa29 = $s$020;
+     label = 6;
+     break L1;
+    }
+    $8 = ((($s$020)) + 1|0);
+    $9 = (($$019) + -1)|0;
+    $10 = $8;
+    $11 = $10 & 3;
+    $12 = ($11|0)!=(0);
+    $13 = ($9|0)!=(0);
+    $or$cond = $13 & $12;
+    if ($or$cond) {
+     $$019 = $9;$s$020 = $8;
+    } else {
+     $$0$lcssa = $9;$$lcssa = $13;$s$0$lcssa = $8;
+     label = 5;
+     break;
+    }
+   }
+  } else {
+   $$0$lcssa = $n;$$lcssa = $4;$s$0$lcssa = $src;
+   label = 5;
+  }
+ } while(0);
+ if ((label|0) == 5) {
+  if ($$lcssa) {
+   $$0$lcssa30 = $$0$lcssa;$s$0$lcssa29 = $s$0$lcssa;
+   label = 6;
+  } else {
+   $$3 = 0;$s$2 = $s$0$lcssa;
+  }
+ }
+ L8: do {
+  if ((label|0) == 6) {
+   $14 = HEAP8[$s$0$lcssa29>>0]|0;
+   $15 = $c&255;
+   $16 = ($14<<24>>24)==($15<<24>>24);
+   if ($16) {
+    $$3 = $$0$lcssa30;$s$2 = $s$0$lcssa29;
+   } else {
+    $17 = Math_imul($0, 16843009)|0;
+    $18 = ($$0$lcssa30>>>0)>(3);
+    L11: do {
+     if ($18) {
+      $$110 = $$0$lcssa30;$w$011 = $s$0$lcssa29;
+      while(1) {
+       $19 = HEAP32[$w$011>>2]|0;
+       $20 = $19 ^ $17;
+       $21 = (($20) + -16843009)|0;
+       $22 = $20 & -2139062144;
+       $23 = $22 ^ -2139062144;
+       $24 = $23 & $21;
+       $25 = ($24|0)==(0);
+       if (!($25)) {
+        $$110$lcssa = $$110;$w$011$lcssa = $w$011;
+        break;
+       }
+       $26 = ((($w$011)) + 4|0);
+       $27 = (($$110) + -4)|0;
+       $28 = ($27>>>0)>(3);
+       if ($28) {
+        $$110 = $27;$w$011 = $26;
+       } else {
+        $$1$lcssa = $27;$w$0$lcssa = $26;
+        label = 11;
+        break L11;
+       }
+      }
+      $$24 = $$110$lcssa;$s$15 = $w$011$lcssa;
+     } else {
+      $$1$lcssa = $$0$lcssa30;$w$0$lcssa = $s$0$lcssa29;
+      label = 11;
+     }
+    } while(0);
+    if ((label|0) == 11) {
+     $29 = ($$1$lcssa|0)==(0);
+     if ($29) {
+      $$3 = 0;$s$2 = $w$0$lcssa;
+      break;
+     } else {
+      $$24 = $$1$lcssa;$s$15 = $w$0$lcssa;
+     }
+    }
+    while(1) {
+     $30 = HEAP8[$s$15>>0]|0;
+     $31 = ($30<<24>>24)==($15<<24>>24);
+     if ($31) {
+      $$3 = $$24;$s$2 = $s$15;
+      break L8;
+     }
+     $32 = ((($s$15)) + 1|0);
+     $33 = (($$24) + -1)|0;
+     $34 = ($33|0)==(0);
+     if ($34) {
+      $$3 = 0;$s$2 = $32;
+      break;
+     } else {
+      $$24 = $33;$s$15 = $32;
+     }
+    }
+   }
+  }
+ } while(0);
+ $35 = ($$3|0)!=(0);
+ $36 = $35 ? $s$2 : 0;
+ return ($36|0);
+}
+function _strncmp($_l,$_r,$n) {
+ $_l = $_l|0;
+ $_r = $_r|0;
+ $n = $n|0;
+ var $$03 = 0, $$08 = 0, $$08$in = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
+ var $l$06 = 0, $or$cond = 0, $or$cond4 = 0, $r$0$lcssa = 0, $r$07 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ($n|0)==(0);
+ if ($0) {
+  $$03 = 0;
+ } else {
+  $1 = HEAP8[$_l>>0]|0;
+  $2 = ($1<<24>>24)==(0);
+  L3: do {
+   if ($2) {
+    $13 = 0;$r$0$lcssa = $_r;
+   } else {
+    $$08$in = $n;$6 = $1;$l$06 = $_l;$r$07 = $_r;
+    while(1) {
+     $$08 = (($$08$in) + -1)|0;
+     $3 = HEAP8[$r$07>>0]|0;
+     $4 = ($3<<24>>24)!=(0);
+     $5 = ($$08|0)!=(0);
+     $or$cond = $5 & $4;
+     $7 = ($6<<24>>24)==($3<<24>>24);
+     $or$cond4 = $7 & $or$cond;
+     if (!($or$cond4)) {
+      $13 = $6;$r$0$lcssa = $r$07;
+      break L3;
+     }
+     $8 = ((($l$06)) + 1|0);
+     $9 = ((($r$07)) + 1|0);
+     $10 = HEAP8[$8>>0]|0;
+     $11 = ($10<<24>>24)==(0);
+     if ($11) {
+      $13 = 0;$r$0$lcssa = $9;
+      break;
+     } else {
+      $$08$in = $$08;$6 = $10;$l$06 = $8;$r$07 = $9;
+     }
+    }
+   }
+  } while(0);
+  $12 = $13&255;
+  $14 = HEAP8[$r$0$lcssa>>0]|0;
+  $15 = $14&255;
+  $16 = (($12) - ($15))|0;
+  $$03 = $16;
+ }
+ return ($$03|0);
+}
+function _memcmp($vl,$vr,$n) {
+ $vl = $vl|0;
+ $vr = $vr|0;
+ $n = $n|0;
+ var $$03 = 0, $$lcssa = 0, $$lcssa19 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $l$04 = 0, $r$05 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ($n|0)==(0);
+ L1: do {
+  if ($0) {
+   $11 = 0;
+  } else {
+   $$03 = $n;$l$04 = $vl;$r$05 = $vr;
+   while(1) {
+    $1 = HEAP8[$l$04>>0]|0;
+    $2 = HEAP8[$r$05>>0]|0;
+    $3 = ($1<<24>>24)==($2<<24>>24);
+    if (!($3)) {
+     $$lcssa = $1;$$lcssa19 = $2;
+     break;
+    }
+    $4 = (($$03) + -1)|0;
+    $5 = ((($l$04)) + 1|0);
+    $6 = ((($r$05)) + 1|0);
+    $7 = ($4|0)==(0);
+    if ($7) {
+     $11 = 0;
+     break L1;
+    } else {
+     $$03 = $4;$l$04 = $5;$r$05 = $6;
+    }
+   }
+   $8 = $$lcssa&255;
+   $9 = $$lcssa19&255;
+   $10 = (($8) - ($9))|0;
+   $11 = $10;
+  }
+ } while(0);
+ return ($11|0);
+}
+function _vsnprintf($s,$n,$fmt,$ap) {
+ $s = $s|0;
+ $n = $n|0;
+ $fmt = $fmt|0;
+ $ap = $ap|0;
+ var $$$02 = 0, $$0 = 0, $$01 = 0, $$02 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0;
+ var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $b = 0, $f = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $b = sp + 112|0;
+ $f = sp;
+ dest=$f; src=2900; stop=dest+112|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0));
+ $0 = (($n) + -1)|0;
+ $1 = ($0>>>0)>(2147483646);
+ if ($1) {
+  $2 = ($n|0)==(0);
+  if ($2) {
+   $$01 = $b;$$02 = 1;
+   label = 4;
+  } else {
+   $3 = (___errno_location()|0);
+   HEAP32[$3>>2] = 75;
+   $$0 = -1;
+  }
+ } else {
+  $$01 = $s;$$02 = $n;
+  label = 4;
+ }
+ if ((label|0) == 4) {
+  $4 = $$01;
+  $5 = (-2 - ($4))|0;
+  $6 = ($$02>>>0)>($5>>>0);
+  $$$02 = $6 ? $5 : $$02;
+  $7 = ((($f)) + 48|0);
+  HEAP32[$7>>2] = $$$02;
+  $8 = ((($f)) + 20|0);
+  HEAP32[$8>>2] = $$01;
+  $9 = ((($f)) + 44|0);
+  HEAP32[$9>>2] = $$01;
+  $10 = (($$01) + ($$$02)|0);
+  $11 = ((($f)) + 16|0);
+  HEAP32[$11>>2] = $10;
+  $12 = ((($f)) + 28|0);
+  HEAP32[$12>>2] = $10;
+  $13 = (_vfprintf($f,$fmt,$ap)|0);
+  $14 = ($$$02|0)==(0);
+  if ($14) {
+   $$0 = $13;
+  } else {
+   $15 = HEAP32[$8>>2]|0;
+   $16 = HEAP32[$11>>2]|0;
+   $17 = ($15|0)==($16|0);
+   $18 = $17 << 31 >> 31;
+   $19 = (($15) + ($18)|0);
+   HEAP8[$19>>0] = 0;
+   $$0 = $13;
+  }
+ }
+ STACKTOP = sp;return ($$0|0);
+}
+function _sn_write($f,$s,$l) {
+ $f = $f|0;
+ $s = $s|0;
+ $l = $l|0;
+ var $$cast = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $l$ = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ((($f)) + 16|0);
+ $1 = HEAP32[$0>>2]|0;
+ $2 = ((($f)) + 20|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = (($1) - ($3))|0;
+ $5 = ($4>>>0)>($l>>>0);
+ $l$ = $5 ? $l : $4;
+ $$cast = $3;
+ _memcpy(($$cast|0),($s|0),($l$|0))|0;
+ $6 = HEAP32[$2>>2]|0;
+ $7 = (($6) + ($l$)|0);
+ HEAP32[$2>>2] = $7;
+ return ($l|0);
+}
+function _vfprintf($f,$fmt,$ap) {
+ $f = $f|0;
+ $fmt = $fmt|0;
+ $ap = $ap|0;
+ var $$ = 0, $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0;
+ var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ap2 = 0, $internal_buf = 0, $nl_arg = 0, $nl_type = 0;
+ var $ret$1 = 0, $ret$1$ = 0, $vacopy_currentptr = 0, dest = 0, label = 0, sp = 0, stop = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 224|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $ap2 = sp + 120|0;
+ $nl_type = sp + 80|0;
+ $nl_arg = sp;
+ $internal_buf = sp + 136|0;
+ dest=$nl_type; stop=dest+40|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0));
+ $vacopy_currentptr = HEAP32[$ap>>2]|0;
+ HEAP32[$ap2>>2] = $vacopy_currentptr;
+ $0 = (_printf_core(0,$fmt,$ap2,$nl_arg,$nl_type)|0);
+ $1 = ($0|0)<(0);
+ if ($1) {
+  $$0 = -1;
+ } else {
+  $2 = ((($f)) + 76|0);
+  $3 = HEAP32[$2>>2]|0;
+  $4 = ($3|0)>(-1);
+  if ($4) {
+   $5 = (___lockfile($f)|0);
+   $32 = $5;
+  } else {
+   $32 = 0;
+  }
+  $6 = HEAP32[$f>>2]|0;
+  $7 = $6 & 32;
+  $8 = ((($f)) + 74|0);
+  $9 = HEAP8[$8>>0]|0;
+  $10 = ($9<<24>>24)<(1);
+  if ($10) {
+   $11 = $6 & -33;
+   HEAP32[$f>>2] = $11;
+  }
+  $12 = ((($f)) + 48|0);
+  $13 = HEAP32[$12>>2]|0;
+  $14 = ($13|0)==(0);
+  if ($14) {
+   $16 = ((($f)) + 44|0);
+   $17 = HEAP32[$16>>2]|0;
+   HEAP32[$16>>2] = $internal_buf;
+   $18 = ((($f)) + 28|0);
+   HEAP32[$18>>2] = $internal_buf;
+   $19 = ((($f)) + 20|0);
+   HEAP32[$19>>2] = $internal_buf;
+   HEAP32[$12>>2] = 80;
+   $20 = ((($internal_buf)) + 80|0);
+   $21 = ((($f)) + 16|0);
+   HEAP32[$21>>2] = $20;
+   $22 = (_printf_core($f,$fmt,$ap2,$nl_arg,$nl_type)|0);
+   $23 = ($17|0)==(0|0);
+   if ($23) {
+    $ret$1 = $22;
+   } else {
+    $24 = ((($f)) + 36|0);
+    $25 = HEAP32[$24>>2]|0;
+    (FUNCTION_TABLE_iiii[$25 & 511]($f,0,0)|0);
+    $26 = HEAP32[$19>>2]|0;
+    $27 = ($26|0)==(0|0);
+    $$ = $27 ? -1 : $22;
+    HEAP32[$16>>2] = $17;
+    HEAP32[$12>>2] = 0;
+    HEAP32[$21>>2] = 0;
+    HEAP32[$18>>2] = 0;
+    HEAP32[$19>>2] = 0;
+    $ret$1 = $$;
+   }
+  } else {
+   $15 = (_printf_core($f,$fmt,$ap2,$nl_arg,$nl_type)|0);
+   $ret$1 = $15;
+  }
+  $28 = HEAP32[$f>>2]|0;
+  $29 = $28 & 32;
+  $30 = ($29|0)==(0);
+  $ret$1$ = $30 ? $ret$1 : -1;
+  $31 = $28 | $7;
+  HEAP32[$f>>2] = $31;
+  $33 = ($32|0)==(0);
+  if (!($33)) {
+   ___unlockfile($f);
+  }
+  $$0 = $ret$1$;
+ }
+ STACKTOP = sp;return ($$0|0);
+}
+function _printf_core($f,$fmt,$ap,$nl_arg,$nl_type) {
+ $f = $f|0;
+ $fmt = $fmt|0;
+ $ap = $ap|0;
+ $nl_arg = $nl_arg|0;
+ $nl_type = $nl_type|0;
+ var $$ = 0, $$$i = 0, $$0 = 0, $$0$i = 0, $$0$lcssa$i = 0, $$012$i = 0, $$013$i = 0, $$03$i33 = 0, $$07$i = 0.0, $$1$i = 0.0, $$114$i = 0, $$2$i = 0.0, $$20$i = 0.0, $$210$$24$i = 0, $$210$$26$i = 0, $$210$i = 0, $$23$i = 0, $$25$i = 0, $$3$i = 0.0, $$311$i = 0;
+ var $$33$i = 0, $$36$i = 0.0, $$4$i = 0.0, $$412$lcssa$i = 0, $$41278$i = 0, $$43 = 0, $$5$lcssa$i = 0, $$589$i = 0, $$a$3$i = 0, $$a$3191$i = 0, $$a$3192$i = 0, $$fl$4 = 0, $$l10n$0 = 0, $$lcssa = 0, $$lcssa162$i = 0, $$lcssa295 = 0, $$lcssa300 = 0, $$lcssa301 = 0, $$lcssa302 = 0, $$lcssa303 = 0;
+ var $$lcssa304 = 0, $$lcssa306 = 0, $$lcssa316 = 0, $$lcssa319 = 0.0, $$lcssa321 = 0, $$neg55$i = 0, $$neg56$i = 0, $$p$$i = 0, $$p$5 = 0, $$p$i = 0, $$pn$i = 0, $$pr$i = 0, $$pr50$i = 0, $$pre = 0, $$pre$i = 0, $$pre$phi190$iZ2D = 0, $$pre170 = 0, $$pre171 = 0, $$pre185$i = 0, $$pre188$i = 0;
+ var $$pre189$i = 0, $$z$3$i = 0, $$z$4$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0;
+ var $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0;
+ var $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0;
+ var $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0;
+ var $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0;
+ var $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0;
+ var $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0;
+ var $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0;
+ var $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0;
+ var $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0;
+ var $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0;
+ var $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0;
+ var $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0;
+ var $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0;
+ var $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0.0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0.0, $363 = 0, $364 = 0, $365 = 0;
+ var $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0;
+ var $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0.0, $391 = 0.0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0;
+ var $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0.0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0.0, $411 = 0.0, $412 = 0.0, $413 = 0.0, $414 = 0.0, $415 = 0.0, $416 = 0, $417 = 0, $418 = 0, $419 = 0;
+ var $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0;
+ var $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0.0, $442 = 0.0, $443 = 0.0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0;
+ var $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0;
+ var $474 = 0.0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0.0, $483 = 0.0, $484 = 0.0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0;
+ var $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0;
+ var $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0;
+ var $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0;
+ var $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0;
+ var $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0;
+ var $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0.0, $594 = 0.0, $595 = 0, $596 = 0.0, $597 = 0, $598 = 0, $599 = 0, $6 = 0;
+ var $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0;
+ var $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0;
+ var $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0;
+ var $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0;
+ var $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0, $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0;
+ var $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0;
+ var $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0;
+ var $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0, $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0;
+ var $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0, $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0;
+ var $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0, $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0;
+ var $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0, $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0;
+ var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0;
+ var $98 = 0, $99 = 0, $a$0 = 0, $a$1 = 0, $a$1$lcssa$i = 0, $a$1149$i = 0, $a$2 = 0, $a$2$ph$i = 0, $a$3$lcssa$i = 0, $a$3136$i = 0, $a$5$lcssa$i = 0, $a$5111$i = 0, $a$6$i = 0, $a$8$i = 0, $a$9$ph$i = 0, $arg = 0, $arglist_current = 0, $arglist_current2 = 0, $arglist_next = 0, $arglist_next3 = 0;
+ var $argpos$0 = 0, $big$i = 0, $buf = 0, $buf$i = 0, $carry$0142$i = 0, $carry3$0130$i = 0, $cnt$0 = 0, $cnt$1 = 0, $cnt$1$lcssa = 0, $d$0$i = 0, $d$0141$i = 0, $d$0143$i = 0, $d$1129$i = 0, $d$2$lcssa$i = 0, $d$2110$i = 0, $d$4$i = 0, $d$584$i = 0, $d$677$i = 0, $d$788$i = 0, $e$0125$i = 0;
+ var $e$1$i = 0, $e$2106$i = 0, $e$4$i = 0, $e$5$ph$i = 0, $e2$i = 0, $ebuf0$i = 0, $estr$0$i = 0, $estr$1$lcssa$i = 0, $estr$195$i = 0, $estr$2$i = 0, $exitcond$i = 0, $expanded = 0, $expanded10 = 0, $expanded11 = 0, $expanded13 = 0, $expanded14 = 0, $expanded15 = 0, $expanded4 = 0, $expanded6 = 0, $expanded7 = 0;
+ var $expanded8 = 0, $fl$0100 = 0, $fl$053 = 0, $fl$1 = 0, $fl$1$ = 0, $fl$3 = 0, $fl$4 = 0, $fl$6 = 0, $i$0$lcssa = 0, $i$0$lcssa178 = 0, $i$0105 = 0, $i$0124$i = 0, $i$03$i = 0, $i$03$i25 = 0, $i$1$lcssa$i = 0, $i$1116 = 0, $i$1118$i = 0, $i$2105$i = 0, $i$291 = 0, $i$291$lcssa = 0;
+ var $i$3101$i = 0, $i$389 = 0, $isdigit = 0, $isdigit$i = 0, $isdigit$i27 = 0, $isdigit10 = 0, $isdigit12 = 0, $isdigit2$i = 0, $isdigit2$i23 = 0, $isdigittmp = 0, $isdigittmp$ = 0, $isdigittmp$i = 0, $isdigittmp$i26 = 0, $isdigittmp1$i = 0, $isdigittmp1$i22 = 0, $isdigittmp11 = 0, $isdigittmp4$i = 0, $isdigittmp4$i24 = 0, $isdigittmp9 = 0, $j$0$i = 0;
+ var $j$0117$i = 0, $j$0119$i = 0, $j$1102$i = 0, $j$2$i = 0, $l$0 = 0, $l$0$i = 0, $l$1$i = 0, $l$1104 = 0, $l$2 = 0, $l10n$0 = 0, $l10n$0$lcssa = 0, $l10n$0$phi = 0, $l10n$1 = 0, $l10n$2 = 0, $l10n$3 = 0, $mb = 0, $notlhs$i = 0, $notrhs$i = 0, $or$cond = 0, $or$cond$i = 0;
+ var $or$cond122 = 0, $or$cond15 = 0, $or$cond17 = 0, $or$cond18$i = 0, $or$cond20 = 0, $or$cond22$i = 0, $or$cond3$not$i = 0, $or$cond31$i = 0, $or$cond6$i = 0, $p$0 = 0, $p$0$ = 0, $p$1 = 0, $p$2 = 0, $p$2$ = 0, $p$3 = 0, $p$4176 = 0, $p$5 = 0, $pl$0 = 0, $pl$0$i = 0, $pl$1 = 0;
+ var $pl$1$i = 0, $pl$2 = 0, $prefix$0 = 0, $prefix$0$$i = 0, $prefix$0$i = 0, $prefix$1 = 0, $prefix$2 = 0, $r$0$a$9$i = 0, $re$171$i = 0, $round$070$i = 0.0, $round6$1$i = 0.0, $s$0 = 0, $s$0$i = 0, $s$1 = 0, $s$1$i = 0, $s$1$i$lcssa = 0, $s$2$lcssa = 0, $s$292 = 0, $s$4 = 0, $s$6 = 0;
+ var $s$7 = 0, $s$7$lcssa298 = 0, $s1$0$i = 0, $s7$081$i = 0, $s7$1$i = 0, $s8$0$lcssa$i = 0, $s8$072$i = 0, $s9$0$i = 0, $s9$185$i = 0, $s9$2$i = 0, $scevgep182$i = 0, $scevgep182183$i = 0, $small$0$i = 0.0, $small$1$i = 0.0, $st$0 = 0, $st$0$lcssa299 = 0, $storemerge = 0, $storemerge13 = 0, $storemerge851 = 0, $storemerge899 = 0;
+ var $sum = 0, $t$0 = 0, $t$1 = 0, $w$$i = 0, $w$0 = 0, $w$1 = 0, $w$2 = 0, $w$32$i = 0, $wc = 0, $ws$0106 = 0, $ws$1117 = 0, $z$0$i = 0, $z$0$lcssa = 0, $z$093 = 0, $z$1 = 0, $z$1$lcssa$i = 0, $z$1148$i = 0, $z$2 = 0, $z$2$i = 0, $z$2$i$lcssa = 0;
+ var $z$3$lcssa$i = 0, $z$3135$i = 0, $z$4$i = 0, $z$7$$i = 0, $z$7$i = 0, $z$7$i$lcssa = 0, $z$7$ph$i = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 624|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $big$i = sp + 24|0;
+ $e2$i = sp + 16|0;
+ $buf$i = sp + 588|0;
+ $ebuf0$i = sp + 576|0;
+ $arg = sp;
+ $buf = sp + 536|0;
+ $wc = sp + 8|0;
+ $mb = sp + 528|0;
+ $0 = ($f|0)!=(0|0);
+ $1 = ((($buf)) + 40|0);
+ $2 = $1;
+ $3 = ((($buf)) + 39|0);
+ $4 = ((($wc)) + 4|0);
+ $5 = $buf$i;
+ $6 = (0 - ($5))|0;
+ $7 = ((($ebuf0$i)) + 12|0);
+ $8 = ((($ebuf0$i)) + 11|0);
+ $9 = $7;
+ $10 = (($9) - ($5))|0;
+ $11 = (-2 - ($5))|0;
+ $12 = (($9) + 2)|0;
+ $13 = ((($big$i)) + 288|0);
+ $14 = ((($buf$i)) + 9|0);
+ $15 = $14;
+ $16 = ((($buf$i)) + 8|0);
+ $cnt$0 = 0;$l$0 = 0;$l10n$0 = 0;$s$0 = $fmt;
+ L1: while(1) {
+  $17 = ($cnt$0|0)>(-1);
+  do {
+   if ($17) {
+    $18 = (2147483647 - ($cnt$0))|0;
+    $19 = ($l$0|0)>($18|0);
+    if ($19) {
+     $20 = (___errno_location()|0);
+     HEAP32[$20>>2] = 75;
+     $cnt$1 = -1;
+     break;
+    } else {
+     $21 = (($l$0) + ($cnt$0))|0;
+     $cnt$1 = $21;
+     break;
+    }
+   } else {
+    $cnt$1 = $cnt$0;
+   }
+  } while(0);
+  $22 = HEAP8[$s$0>>0]|0;
+  $23 = ($22<<24>>24)==(0);
+  if ($23) {
+   $cnt$1$lcssa = $cnt$1;$l10n$0$lcssa = $l10n$0;
+   label = 244;
+   break;
+  } else {
+   $24 = $22;$s$1 = $s$0;
+  }
+  L9: while(1) {
+   switch ($24<<24>>24) {
+   case 37:  {
+    $s$292 = $s$1;$z$093 = $s$1;
+    label = 9;
+    break L9;
+    break;
+   }
+   case 0:  {
+    $s$2$lcssa = $s$1;$z$0$lcssa = $s$1;
+    break L9;
+    break;
+   }
+   default: {
+   }
+   }
+   $25 = ((($s$1)) + 1|0);
+   $$pre = HEAP8[$25>>0]|0;
+   $24 = $$pre;$s$1 = $25;
+  }
+  L12: do {
+   if ((label|0) == 9) {
+    while(1) {
+     label = 0;
+     $26 = ((($s$292)) + 1|0);
+     $27 = HEAP8[$26>>0]|0;
+     $28 = ($27<<24>>24)==(37);
+     if (!($28)) {
+      $s$2$lcssa = $s$292;$z$0$lcssa = $z$093;
+      break L12;
+     }
+     $29 = ((($z$093)) + 1|0);
+     $30 = ((($s$292)) + 2|0);
+     $31 = HEAP8[$30>>0]|0;
+     $32 = ($31<<24>>24)==(37);
+     if ($32) {
+      $s$292 = $30;$z$093 = $29;
+      label = 9;
+     } else {
+      $s$2$lcssa = $30;$z$0$lcssa = $29;
+      break;
+     }
+    }
+   }
+  } while(0);
+  $33 = $z$0$lcssa;
+  $34 = $s$0;
+  $35 = (($33) - ($34))|0;
+  if ($0) {
+   $36 = HEAP32[$f>>2]|0;
+   $37 = $36 & 32;
+   $38 = ($37|0)==(0);
+   if ($38) {
+    (___fwritex($s$0,$35,$f)|0);
+   }
+  }
+  $39 = ($z$0$lcssa|0)==($s$0|0);
+  if (!($39)) {
+   $l10n$0$phi = $l10n$0;$cnt$0 = $cnt$1;$l$0 = $35;$s$0 = $s$2$lcssa;$l10n$0 = $l10n$0$phi;
+   continue;
+  }
+  $40 = ((($s$2$lcssa)) + 1|0);
+  $41 = HEAP8[$40>>0]|0;
+  $42 = $41 << 24 >> 24;
+  $isdigittmp = (($42) + -48)|0;
+  $isdigit = ($isdigittmp>>>0)<(10);
+  if ($isdigit) {
+   $43 = ((($s$2$lcssa)) + 2|0);
+   $44 = HEAP8[$43>>0]|0;
+   $45 = ($44<<24>>24)==(36);
+   $46 = ((($s$2$lcssa)) + 3|0);
+   $$43 = $45 ? $46 : $40;
+   $$l10n$0 = $45 ? 1 : $l10n$0;
+   $isdigittmp$ = $45 ? $isdigittmp : -1;
+   $$pre170 = HEAP8[$$43>>0]|0;
+   $48 = $$pre170;$argpos$0 = $isdigittmp$;$l10n$1 = $$l10n$0;$storemerge = $$43;
+  } else {
+   $48 = $41;$argpos$0 = -1;$l10n$1 = $l10n$0;$storemerge = $40;
+  }
+  $47 = $48 << 24 >> 24;
+  $49 = $47 & -32;
+  $50 = ($49|0)==(32);
+  L25: do {
+   if ($50) {
+    $52 = $47;$57 = $48;$fl$0100 = 0;$storemerge899 = $storemerge;
+    while(1) {
+     $51 = (($52) + -32)|0;
+     $53 = 1 << $51;
+     $54 = $53 & 75913;
+     $55 = ($54|0)==(0);
+     if ($55) {
+      $66 = $57;$fl$053 = $fl$0100;$storemerge851 = $storemerge899;
+      break L25;
+     }
+     $56 = $57 << 24 >> 24;
+     $58 = (($56) + -32)|0;
+     $59 = 1 << $58;
+     $60 = $59 | $fl$0100;
+     $61 = ((($storemerge899)) + 1|0);
+     $62 = HEAP8[$61>>0]|0;
+     $63 = $62 << 24 >> 24;
+     $64 = $63 & -32;
+     $65 = ($64|0)==(32);
+     if ($65) {
+      $52 = $63;$57 = $62;$fl$0100 = $60;$storemerge899 = $61;
+     } else {
+      $66 = $62;$fl$053 = $60;$storemerge851 = $61;
+      break;
+     }
+    }
+   } else {
+    $66 = $48;$fl$053 = 0;$storemerge851 = $storemerge;
+   }
+  } while(0);
+  $67 = ($66<<24>>24)==(42);
+  do {
+   if ($67) {
+    $68 = ((($storemerge851)) + 1|0);
+    $69 = HEAP8[$68>>0]|0;
+    $70 = $69 << 24 >> 24;
+    $isdigittmp11 = (($70) + -48)|0;
+    $isdigit12 = ($isdigittmp11>>>0)<(10);
+    if ($isdigit12) {
+     $71 = ((($storemerge851)) + 2|0);
+     $72 = HEAP8[$71>>0]|0;
+     $73 = ($72<<24>>24)==(36);
+     if ($73) {
+      $74 = (($nl_type) + ($isdigittmp11<<2)|0);
+      HEAP32[$74>>2] = 10;
+      $75 = HEAP8[$68>>0]|0;
+      $76 = $75 << 24 >> 24;
+      $77 = (($76) + -48)|0;
+      $78 = (($nl_arg) + ($77<<3)|0);
+      $79 = $78;
+      $80 = $79;
+      $81 = HEAP32[$80>>2]|0;
+      $82 = (($79) + 4)|0;
+      $83 = $82;
+      $84 = HEAP32[$83>>2]|0;
+      $85 = ((($storemerge851)) + 3|0);
+      $l10n$2 = 1;$storemerge13 = $85;$w$0 = $81;
+     } else {
+      label = 24;
+     }
+    } else {
+     label = 24;
+    }
+    if ((label|0) == 24) {
+     label = 0;
+     $86 = ($l10n$1|0)==(0);
+     if (!($86)) {
+      $$0 = -1;
+      break L1;
+     }
+     if (!($0)) {
+      $fl$1 = $fl$053;$l10n$3 = 0;$s$4 = $68;$w$1 = 0;
+      break;
+     }
+     $arglist_current = HEAP32[$ap>>2]|0;
+     $87 = $arglist_current;
+     $88 = ((0) + 4|0);
+     $expanded4 = $88;
+     $expanded = (($expanded4) - 1)|0;
+     $89 = (($87) + ($expanded))|0;
+     $90 = ((0) + 4|0);
+     $expanded8 = $90;
+     $expanded7 = (($expanded8) - 1)|0;
+     $expanded6 = $expanded7 ^ -1;
+     $91 = $89 & $expanded6;
+     $92 = $91;
+     $93 = HEAP32[$92>>2]|0;
+     $arglist_next = ((($92)) + 4|0);
+     HEAP32[$ap>>2] = $arglist_next;
+     $l10n$2 = 0;$storemerge13 = $68;$w$0 = $93;
+    }
+    $94 = ($w$0|0)<(0);
+    if ($94) {
+     $95 = $fl$053 | 8192;
+     $96 = (0 - ($w$0))|0;
+     $fl$1 = $95;$l10n$3 = $l10n$2;$s$4 = $storemerge13;$w$1 = $96;
+    } else {
+     $fl$1 = $fl$053;$l10n$3 = $l10n$2;$s$4 = $storemerge13;$w$1 = $w$0;
+    }
+   } else {
+    $97 = $66 << 24 >> 24;
+    $isdigittmp1$i = (($97) + -48)|0;
+    $isdigit2$i = ($isdigittmp1$i>>>0)<(10);
+    if ($isdigit2$i) {
+     $101 = $storemerge851;$i$03$i = 0;$isdigittmp4$i = $isdigittmp1$i;
+     while(1) {
+      $98 = ($i$03$i*10)|0;
+      $99 = (($98) + ($isdigittmp4$i))|0;
+      $100 = ((($101)) + 1|0);
+      $102 = HEAP8[$100>>0]|0;
+      $103 = $102 << 24 >> 24;
+      $isdigittmp$i = (($103) + -48)|0;
+      $isdigit$i = ($isdigittmp$i>>>0)<(10);
+      if ($isdigit$i) {
+       $101 = $100;$i$03$i = $99;$isdigittmp4$i = $isdigittmp$i;
+      } else {
+       $$lcssa = $99;$$lcssa295 = $100;
+       break;
+      }
+     }
+     $104 = ($$lcssa|0)<(0);
+     if ($104) {
+      $$0 = -1;
+      break L1;
+     } else {
+      $fl$1 = $fl$053;$l10n$3 = $l10n$1;$s$4 = $$lcssa295;$w$1 = $$lcssa;
+     }
+    } else {
+     $fl$1 = $fl$053;$l10n$3 = $l10n$1;$s$4 = $storemerge851;$w$1 = 0;
+    }
+   }
+  } while(0);
+  $105 = HEAP8[$s$4>>0]|0;
+  $106 = ($105<<24>>24)==(46);
+  L46: do {
+   if ($106) {
+    $107 = ((($s$4)) + 1|0);
+    $108 = HEAP8[$107>>0]|0;
+    $109 = ($108<<24>>24)==(42);
+    if (!($109)) {
+     $136 = $108 << 24 >> 24;
+     $isdigittmp1$i22 = (($136) + -48)|0;
+     $isdigit2$i23 = ($isdigittmp1$i22>>>0)<(10);
+     if ($isdigit2$i23) {
+      $140 = $107;$i$03$i25 = 0;$isdigittmp4$i24 = $isdigittmp1$i22;
+     } else {
+      $p$0 = 0;$s$6 = $107;
+      break;
+     }
+     while(1) {
+      $137 = ($i$03$i25*10)|0;
+      $138 = (($137) + ($isdigittmp4$i24))|0;
+      $139 = ((($140)) + 1|0);
+      $141 = HEAP8[$139>>0]|0;
+      $142 = $141 << 24 >> 24;
+      $isdigittmp$i26 = (($142) + -48)|0;
+      $isdigit$i27 = ($isdigittmp$i26>>>0)<(10);
+      if ($isdigit$i27) {
+       $140 = $139;$i$03$i25 = $138;$isdigittmp4$i24 = $isdigittmp$i26;
+      } else {
+       $p$0 = $138;$s$6 = $139;
+       break L46;
+      }
+     }
+    }
+    $110 = ((($s$4)) + 2|0);
+    $111 = HEAP8[$110>>0]|0;
+    $112 = $111 << 24 >> 24;
+    $isdigittmp9 = (($112) + -48)|0;
+    $isdigit10 = ($isdigittmp9>>>0)<(10);
+    if ($isdigit10) {
+     $113 = ((($s$4)) + 3|0);
+     $114 = HEAP8[$113>>0]|0;
+     $115 = ($114<<24>>24)==(36);
+     if ($115) {
+      $116 = (($nl_type) + ($isdigittmp9<<2)|0);
+      HEAP32[$116>>2] = 10;
+      $117 = HEAP8[$110>>0]|0;
+      $118 = $117 << 24 >> 24;
+      $119 = (($118) + -48)|0;
+      $120 = (($nl_arg) + ($119<<3)|0);
+      $121 = $120;
+      $122 = $121;
+      $123 = HEAP32[$122>>2]|0;
+      $124 = (($121) + 4)|0;
+      $125 = $124;
+      $126 = HEAP32[$125>>2]|0;
+      $127 = ((($s$4)) + 4|0);
+      $p$0 = $123;$s$6 = $127;
+      break;
+     }
+    }
+    $128 = ($l10n$3|0)==(0);
+    if (!($128)) {
+     $$0 = -1;
+     break L1;
+    }
+    if ($0) {
+     $arglist_current2 = HEAP32[$ap>>2]|0;
+     $129 = $arglist_current2;
+     $130 = ((0) + 4|0);
+     $expanded11 = $130;
+     $expanded10 = (($expanded11) - 1)|0;
+     $131 = (($129) + ($expanded10))|0;
+     $132 = ((0) + 4|0);
+     $expanded15 = $132;
+     $expanded14 = (($expanded15) - 1)|0;
+     $expanded13 = $expanded14 ^ -1;
+     $133 = $131 & $expanded13;
+     $134 = $133;
+     $135 = HEAP32[$134>>2]|0;
+     $arglist_next3 = ((($134)) + 4|0);
+     HEAP32[$ap>>2] = $arglist_next3;
+     $p$0 = $135;$s$6 = $110;
+    } else {
+     $p$0 = 0;$s$6 = $110;
+    }
+   } else {
+    $p$0 = -1;$s$6 = $s$4;
+   }
+  } while(0);
+  $s$7 = $s$6;$st$0 = 0;
+  while(1) {
+   $143 = HEAP8[$s$7>>0]|0;
+   $144 = $143 << 24 >> 24;
+   $145 = (($144) + -65)|0;
+   $146 = ($145>>>0)>(57);
+   if ($146) {
+    $$0 = -1;
+    break L1;
+   }
+   $147 = ((($s$7)) + 1|0);
+   $148 = ((69956 + (($st$0*58)|0)|0) + ($145)|0);
+   $149 = HEAP8[$148>>0]|0;
+   $150 = $149&255;
+   $151 = (($150) + -1)|0;
+   $152 = ($151>>>0)<(8);
+   if ($152) {
+    $s$7 = $147;$st$0 = $150;
+   } else {
+    $$lcssa300 = $147;$$lcssa301 = $149;$$lcssa302 = $150;$s$7$lcssa298 = $s$7;$st$0$lcssa299 = $st$0;
+    break;
+   }
+  }
+  $153 = ($$lcssa301<<24>>24)==(0);
+  if ($153) {
+   $$0 = -1;
+   break;
+  }
+  $154 = ($$lcssa301<<24>>24)==(19);
+  $155 = ($argpos$0|0)>(-1);
+  do {
+   if ($154) {
+    if ($155) {
+     $$0 = -1;
+     break L1;
+    } else {
+     label = 52;
+    }
+   } else {
+    if ($155) {
+     $156 = (($nl_type) + ($argpos$0<<2)|0);
+     HEAP32[$156>>2] = $$lcssa302;
+     $157 = (($nl_arg) + ($argpos$0<<3)|0);
+     $158 = $157;
+     $159 = $158;
+     $160 = HEAP32[$159>>2]|0;
+     $161 = (($158) + 4)|0;
+     $162 = $161;
+     $163 = HEAP32[$162>>2]|0;
+     $164 = $arg;
+     $165 = $164;
+     HEAP32[$165>>2] = $160;
+     $166 = (($164) + 4)|0;
+     $167 = $166;
+     HEAP32[$167>>2] = $163;
+     label = 52;
+     break;
+    }
+    if (!($0)) {
+     $$0 = 0;
+     break L1;
+    }
+    _pop_arg($arg,$$lcssa302,$ap);
+   }
+  } while(0);
+  if ((label|0) == 52) {
+   label = 0;
+   if (!($0)) {
+    $cnt$0 = $cnt$1;$l$0 = $35;$l10n$0 = $l10n$3;$s$0 = $$lcssa300;
+    continue;
+   }
+  }
+  $168 = HEAP8[$s$7$lcssa298>>0]|0;
+  $169 = $168 << 24 >> 24;
+  $170 = ($st$0$lcssa299|0)!=(0);
+  $171 = $169 & 15;
+  $172 = ($171|0)==(3);
+  $or$cond15 = $170 & $172;
+  $173 = $169 & -33;
+  $t$0 = $or$cond15 ? $173 : $169;
+  $174 = $fl$1 & 8192;
+  $175 = ($174|0)==(0);
+  $176 = $fl$1 & -65537;
+  $fl$1$ = $175 ? $fl$1 : $176;
+  L75: do {
+   switch ($t$0|0) {
+   case 110:  {
+    switch ($st$0$lcssa299|0) {
+    case 0:  {
+     $183 = HEAP32[$arg>>2]|0;
+     HEAP32[$183>>2] = $cnt$1;
+     $cnt$0 = $cnt$1;$l$0 = $35;$l10n$0 = $l10n$3;$s$0 = $$lcssa300;
+     continue L1;
+     break;
+    }
+    case 1:  {
+     $184 = HEAP32[$arg>>2]|0;
+     HEAP32[$184>>2] = $cnt$1;
+     $cnt$0 = $cnt$1;$l$0 = $35;$l10n$0 = $l10n$3;$s$0 = $$lcssa300;
+     continue L1;
+     break;
+    }
+    case 2:  {
+     $185 = ($cnt$1|0)<(0);
+     $186 = $185 << 31 >> 31;
+     $187 = HEAP32[$arg>>2]|0;
+     $188 = $187;
+     $189 = $188;
+     HEAP32[$189>>2] = $cnt$1;
+     $190 = (($188) + 4)|0;
+     $191 = $190;
+     HEAP32[$191>>2] = $186;
+     $cnt$0 = $cnt$1;$l$0 = $35;$l10n$0 = $l10n$3;$s$0 = $$lcssa300;
+     continue L1;
+     break;
+    }
+    case 3:  {
+     $192 = $cnt$1&65535;
+     $193 = HEAP32[$arg>>2]|0;
+     HEAP16[$193>>1] = $192;
+     $cnt$0 = $cnt$1;$l$0 = $35;$l10n$0 = $l10n$3;$s$0 = $$lcssa300;
+     continue L1;
+     break;
+    }
+    case 4:  {
+     $194 = $cnt$1&255;
+     $195 = HEAP32[$arg>>2]|0;
+     HEAP8[$195>>0] = $194;
+     $cnt$0 = $cnt$1;$l$0 = $35;$l10n$0 = $l10n$3;$s$0 = $$lcssa300;
+     continue L1;
+     break;
+    }
+    case 6:  {
+     $196 = HEAP32[$arg>>2]|0;
+     HEAP32[$196>>2] = $cnt$1;
+     $cnt$0 = $cnt$1;$l$0 = $35;$l10n$0 = $l10n$3;$s$0 = $$lcssa300;
+     continue L1;
+     break;
+    }
+    case 7:  {
+     $197 = ($cnt$1|0)<(0);
+     $198 = $197 << 31 >> 31;
+     $199 = HEAP32[$arg>>2]|0;
+     $200 = $199;
+     $201 = $200;
+     HEAP32[$201>>2] = $cnt$1;
+     $202 = (($200) + 4)|0;
+     $203 = $202;
+     HEAP32[$203>>2] = $198;
+     $cnt$0 = $cnt$1;$l$0 = $35;$l10n$0 = $l10n$3;$s$0 = $$lcssa300;
+     continue L1;
+     break;
+    }
+    default: {
+     $cnt$0 = $cnt$1;$l$0 = $35;$l10n$0 = $l10n$3;$s$0 = $$lcssa300;
+     continue L1;
+    }
+    }
+    break;
+   }
+   case 112:  {
+    $204 = ($p$0>>>0)>(8);
+    $205 = $204 ? $p$0 : 8;
+    $206 = $fl$1$ | 8;
+    $fl$3 = $206;$p$1 = $205;$t$1 = 120;
+    label = 64;
+    break;
+   }
+   case 88: case 120:  {
+    $fl$3 = $fl$1$;$p$1 = $p$0;$t$1 = $t$0;
+    label = 64;
+    break;
+   }
+   case 111:  {
+    $244 = $arg;
+    $245 = $244;
+    $246 = HEAP32[$245>>2]|0;
+    $247 = (($244) + 4)|0;
+    $248 = $247;
+    $249 = HEAP32[$248>>2]|0;
+    $250 = ($246|0)==(0);
+    $251 = ($249|0)==(0);
+    $252 = $250 & $251;
+    if ($252) {
+     $$0$lcssa$i = $1;
+    } else {
+     $$03$i33 = $1;$254 = $246;$258 = $249;
+     while(1) {
+      $253 = $254 & 7;
+      $255 = $253 | 48;
+      $256 = $255&255;
+      $257 = ((($$03$i33)) + -1|0);
+      HEAP8[$257>>0] = $256;
+      $259 = (_bitshift64Lshr(($254|0),($258|0),3)|0);
+      $260 = tempRet0;
+      $261 = ($259|0)==(0);
+      $262 = ($260|0)==(0);
+      $263 = $261 & $262;
+      if ($263) {
+       $$0$lcssa$i = $257;
+       break;
+      } else {
+       $$03$i33 = $257;$254 = $259;$258 = $260;
+      }
+     }
+    }
+    $264 = $fl$1$ & 8;
+    $265 = ($264|0)==(0);
+    if ($265) {
+     $a$0 = $$0$lcssa$i;$fl$4 = $fl$1$;$p$2 = $p$0;$pl$1 = 0;$prefix$1 = 70436;
+     label = 77;
+    } else {
+     $266 = $$0$lcssa$i;
+     $267 = (($2) - ($266))|0;
+     $268 = ($p$0|0)>($267|0);
+     $269 = (($267) + 1)|0;
+     $p$0$ = $268 ? $p$0 : $269;
+     $a$0 = $$0$lcssa$i;$fl$4 = $fl$1$;$p$2 = $p$0$;$pl$1 = 0;$prefix$1 = 70436;
+     label = 77;
+    }
+    break;
+   }
+   case 105: case 100:  {
+    $270 = $arg;
+    $271 = $270;
+    $272 = HEAP32[$271>>2]|0;
+    $273 = (($270) + 4)|0;
+    $274 = $273;
+    $275 = HEAP32[$274>>2]|0;
+    $276 = ($275|0)<(0);
+    if ($276) {
+     $277 = (_i64Subtract(0,0,($272|0),($275|0))|0);
+     $278 = tempRet0;
+     $279 = $arg;
+     $280 = $279;
+     HEAP32[$280>>2] = $277;
+     $281 = (($279) + 4)|0;
+     $282 = $281;
+     HEAP32[$282>>2] = $278;
+     $287 = $277;$288 = $278;$pl$0 = 1;$prefix$0 = 70436;
+     label = 76;
+     break L75;
+    }
+    $283 = $fl$1$ & 2048;
+    $284 = ($283|0)==(0);
+    if ($284) {
+     $285 = $fl$1$ & 1;
+     $286 = ($285|0)==(0);
+     $$ = $286 ? 70436 : (70438);
+     $287 = $272;$288 = $275;$pl$0 = $285;$prefix$0 = $$;
+     label = 76;
+    } else {
+     $287 = $272;$288 = $275;$pl$0 = 1;$prefix$0 = (70437);
+     label = 76;
+    }
+    break;
+   }
+   case 117:  {
+    $177 = $arg;
+    $178 = $177;
+    $179 = HEAP32[$178>>2]|0;
+    $180 = (($177) + 4)|0;
+    $181 = $180;
+    $182 = HEAP32[$181>>2]|0;
+    $287 = $179;$288 = $182;$pl$0 = 0;$prefix$0 = 70436;
+    label = 76;
+    break;
+   }
+   case 99:  {
+    $308 = $arg;
+    $309 = $308;
+    $310 = HEAP32[$309>>2]|0;
+    $311 = (($308) + 4)|0;
+    $312 = $311;
+    $313 = HEAP32[$312>>2]|0;
+    $314 = $310&255;
+    HEAP8[$3>>0] = $314;
+    $a$2 = $3;$fl$6 = $176;$p$5 = 1;$pl$2 = 0;$prefix$2 = 70436;$z$2 = $1;
+    break;
+   }
+   case 109:  {
+    $315 = (___errno_location()|0);
+    $316 = HEAP32[$315>>2]|0;
+    $317 = (_strerror($316)|0);
+    $a$1 = $317;
+    label = 82;
+    break;
+   }
+   case 115:  {
+    $318 = HEAP32[$arg>>2]|0;
+    $319 = ($318|0)!=(0|0);
+    $320 = $319 ? $318 : 72338;
+    $a$1 = $320;
+    label = 82;
+    break;
+   }
+   case 67:  {
+    $327 = $arg;
+    $328 = $327;
+    $329 = HEAP32[$328>>2]|0;
+    $330 = (($327) + 4)|0;
+    $331 = $330;
+    $332 = HEAP32[$331>>2]|0;
+    HEAP32[$wc>>2] = $329;
+    HEAP32[$4>>2] = 0;
+    HEAP32[$arg>>2] = $wc;
+    $798 = $wc;$p$4176 = -1;
+    label = 86;
+    break;
+   }
+   case 83:  {
+    $$pre171 = HEAP32[$arg>>2]|0;
+    $333 = ($p$0|0)==(0);
+    if ($333) {
+     _pad_1244($f,32,$w$1,0,$fl$1$);
+     $i$0$lcssa178 = 0;
+     label = 97;
+    } else {
+     $798 = $$pre171;$p$4176 = $p$0;
+     label = 86;
+    }
+    break;
+   }
+   case 65: case 71: case 70: case 69: case 97: case 103: case 102: case 101:  {
+    $358 = +HEAPF64[$arg>>3];
+    HEAP32[$e2$i>>2] = 0;
+    HEAPF64[tempDoublePtr>>3] = $358;$359 = HEAP32[tempDoublePtr>>2]|0;
+    $360 = HEAP32[tempDoublePtr+4>>2]|0;
+    $361 = ($360|0)<(0);
+    if ($361) {
+     $362 = -$358;
+     $$07$i = $362;$pl$0$i = 1;$prefix$0$i = 72345;
+    } else {
+     $363 = $fl$1$ & 2048;
+     $364 = ($363|0)==(0);
+     if ($364) {
+      $365 = $fl$1$ & 1;
+      $366 = ($365|0)==(0);
+      $$$i = $366 ? (72346) : (72351);
+      $$07$i = $358;$pl$0$i = $365;$prefix$0$i = $$$i;
+     } else {
+      $$07$i = $358;$pl$0$i = 1;$prefix$0$i = (72348);
+     }
+    }
+    HEAPF64[tempDoublePtr>>3] = $$07$i;$367 = HEAP32[tempDoublePtr>>2]|0;
+    $368 = HEAP32[tempDoublePtr+4>>2]|0;
+    $369 = $368 & 2146435072;
+    $370 = ($369>>>0)<(2146435072);
+    $371 = (0)<(0);
+    $372 = ($369|0)==(2146435072);
+    $373 = $372 & $371;
+    $374 = $370 | $373;
+    do {
+     if ($374) {
+      $390 = (+_frexpl($$07$i,$e2$i));
+      $391 = $390 * 2.0;
+      $392 = $391 != 0.0;
+      if ($392) {
+       $393 = HEAP32[$e2$i>>2]|0;
+       $394 = (($393) + -1)|0;
+       HEAP32[$e2$i>>2] = $394;
+      }
+      $395 = $t$0 | 32;
+      $396 = ($395|0)==(97);
+      if ($396) {
+       $397 = $t$0 & 32;
+       $398 = ($397|0)==(0);
+       $399 = ((($prefix$0$i)) + 9|0);
+       $prefix$0$$i = $398 ? $prefix$0$i : $399;
+       $400 = $pl$0$i | 2;
+       $401 = ($p$0>>>0)>(11);
+       $402 = (12 - ($p$0))|0;
+       $403 = ($402|0)==(0);
+       $404 = $401 | $403;
+       do {
+        if ($404) {
+         $$1$i = $391;
+        } else {
+         $re$171$i = $402;$round$070$i = 8.0;
+         while(1) {
+          $405 = (($re$171$i) + -1)|0;
+          $406 = $round$070$i * 16.0;
+          $407 = ($405|0)==(0);
+          if ($407) {
+           $$lcssa319 = $406;
+           break;
+          } else {
+           $re$171$i = $405;$round$070$i = $406;
+          }
+         }
+         $408 = HEAP8[$prefix$0$$i>>0]|0;
+         $409 = ($408<<24>>24)==(45);
+         if ($409) {
+          $410 = -$391;
+          $411 = $410 - $$lcssa319;
+          $412 = $$lcssa319 + $411;
+          $413 = -$412;
+          $$1$i = $413;
+          break;
+         } else {
+          $414 = $391 + $$lcssa319;
+          $415 = $414 - $$lcssa319;
+          $$1$i = $415;
+          break;
+         }
+        }
+       } while(0);
+       $416 = HEAP32[$e2$i>>2]|0;
+       $417 = ($416|0)<(0);
+       $418 = (0 - ($416))|0;
+       $419 = $417 ? $418 : $416;
+       $420 = ($419|0)<(0);
+       $421 = $420 << 31 >> 31;
+       $422 = (_fmt_u_1243($419,$421,$7)|0);
+       $423 = ($422|0)==($7|0);
+       if ($423) {
+        HEAP8[$8>>0] = 48;
+        $estr$0$i = $8;
+       } else {
+        $estr$0$i = $422;
+       }
+       $424 = $416 >> 31;
+       $425 = $424 & 2;
+       $426 = (($425) + 43)|0;
+       $427 = $426&255;
+       $428 = ((($estr$0$i)) + -1|0);
+       HEAP8[$428>>0] = $427;
+       $429 = (($t$0) + 15)|0;
+       $430 = $429&255;
+       $431 = ((($estr$0$i)) + -2|0);
+       HEAP8[$431>>0] = $430;
+       $notrhs$i = ($p$0|0)<(1);
+       $432 = $fl$1$ & 8;
+       $433 = ($432|0)==(0);
+       $$2$i = $$1$i;$s$0$i = $buf$i;
+       while(1) {
+        $434 = (~~(($$2$i)));
+        $435 = (70420 + ($434)|0);
+        $436 = HEAP8[$435>>0]|0;
+        $437 = $436&255;
+        $438 = $437 | $397;
+        $439 = $438&255;
+        $440 = ((($s$0$i)) + 1|0);
+        HEAP8[$s$0$i>>0] = $439;
+        $441 = (+($434|0));
+        $442 = $$2$i - $441;
+        $443 = $442 * 16.0;
+        $444 = $440;
+        $445 = (($444) - ($5))|0;
+        $446 = ($445|0)==(1);
+        do {
+         if ($446) {
+          $notlhs$i = $443 == 0.0;
+          $or$cond3$not$i = $notrhs$i & $notlhs$i;
+          $or$cond$i = $433 & $or$cond3$not$i;
+          if ($or$cond$i) {
+           $s$1$i = $440;
+           break;
+          }
+          $447 = ((($s$0$i)) + 2|0);
+          HEAP8[$440>>0] = 46;
+          $s$1$i = $447;
+         } else {
+          $s$1$i = $440;
+         }
+        } while(0);
+        $448 = $443 != 0.0;
+        if ($448) {
+         $$2$i = $443;$s$0$i = $s$1$i;
+        } else {
+         $s$1$i$lcssa = $s$1$i;
+         break;
+        }
+       }
+       $449 = ($p$0|0)!=(0);
+       $$pre188$i = $s$1$i$lcssa;
+       $450 = (($11) + ($$pre188$i))|0;
+       $451 = ($450|0)<($p$0|0);
+       $or$cond122 = $449 & $451;
+       $452 = $431;
+       $453 = (($12) + ($p$0))|0;
+       $454 = (($453) - ($452))|0;
+       $455 = (($10) - ($452))|0;
+       $456 = (($455) + ($$pre188$i))|0;
+       $l$0$i = $or$cond122 ? $454 : $456;
+       $457 = (($l$0$i) + ($400))|0;
+       _pad_1244($f,32,$w$1,$457,$fl$1$);
+       $458 = HEAP32[$f>>2]|0;
+       $459 = $458 & 32;
+       $460 = ($459|0)==(0);
+       if ($460) {
+        (___fwritex($prefix$0$$i,$400,$f)|0);
+       }
+       $461 = $fl$1$ ^ 65536;
+       _pad_1244($f,48,$w$1,$457,$461);
+       $462 = (($$pre188$i) - ($5))|0;
+       $463 = HEAP32[$f>>2]|0;
+       $464 = $463 & 32;
+       $465 = ($464|0)==(0);
+       if ($465) {
+        (___fwritex($buf$i,$462,$f)|0);
+       }
+       $466 = (($9) - ($452))|0;
+       $sum = (($462) + ($466))|0;
+       $467 = (($l$0$i) - ($sum))|0;
+       _pad_1244($f,48,$467,0,0);
+       $468 = HEAP32[$f>>2]|0;
+       $469 = $468 & 32;
+       $470 = ($469|0)==(0);
+       if ($470) {
+        (___fwritex($431,$466,$f)|0);
+       }
+       $471 = $fl$1$ ^ 8192;
+       _pad_1244($f,32,$w$1,$457,$471);
+       $472 = ($457|0)<($w$1|0);
+       $w$$i = $472 ? $w$1 : $457;
+       $$0$i = $w$$i;
+       break;
+      }
+      $473 = ($p$0|0)<(0);
+      $$p$i = $473 ? 6 : $p$0;
+      if ($392) {
+       $474 = $391 * 268435456.0;
+       $475 = HEAP32[$e2$i>>2]|0;
+       $476 = (($475) + -28)|0;
+       HEAP32[$e2$i>>2] = $476;
+       $$3$i = $474;$477 = $476;
+      } else {
+       $$pre185$i = HEAP32[$e2$i>>2]|0;
+       $$3$i = $391;$477 = $$pre185$i;
+      }
+      $478 = ($477|0)<(0);
+      $$33$i = $478 ? $big$i : $13;
+      $479 = $$33$i;
+      $$4$i = $$3$i;$z$0$i = $$33$i;
+      while(1) {
+       $480 = (~~(($$4$i))>>>0);
+       HEAP32[$z$0$i>>2] = $480;
+       $481 = ((($z$0$i)) + 4|0);
+       $482 = (+($480>>>0));
+       $483 = $$4$i - $482;
+       $484 = $483 * 1.0E+9;
+       $485 = $484 != 0.0;
+       if ($485) {
+        $$4$i = $484;$z$0$i = $481;
+       } else {
+        $$lcssa303 = $481;
+        break;
+       }
+      }
+      $$pr$i = HEAP32[$e2$i>>2]|0;
+      $486 = ($$pr$i|0)>(0);
+      if ($486) {
+       $487 = $$pr$i;$a$1149$i = $$33$i;$z$1148$i = $$lcssa303;
+       while(1) {
+        $488 = ($487|0)>(29);
+        $489 = $488 ? 29 : $487;
+        $d$0141$i = ((($z$1148$i)) + -4|0);
+        $490 = ($d$0141$i>>>0)<($a$1149$i>>>0);
+        do {
+         if ($490) {
+          $a$2$ph$i = $a$1149$i;
+         } else {
+          $carry$0142$i = 0;$d$0143$i = $d$0141$i;
+          while(1) {
+           $491 = HEAP32[$d$0143$i>>2]|0;
+           $492 = (_bitshift64Shl(($491|0),0,($489|0))|0);
+           $493 = tempRet0;
+           $494 = (_i64Add(($492|0),($493|0),($carry$0142$i|0),0)|0);
+           $495 = tempRet0;
+           $496 = (___uremdi3(($494|0),($495|0),1000000000,0)|0);
+           $497 = tempRet0;
+           HEAP32[$d$0143$i>>2] = $496;
+           $498 = (___udivdi3(($494|0),($495|0),1000000000,0)|0);
+           $499 = tempRet0;
+           $d$0$i = ((($d$0143$i)) + -4|0);
+           $500 = ($d$0$i>>>0)<($a$1149$i>>>0);
+           if ($500) {
+            $$lcssa304 = $498;
+            break;
+           } else {
+            $carry$0142$i = $498;$d$0143$i = $d$0$i;
+           }
+          }
+          $501 = ($$lcssa304|0)==(0);
+          if ($501) {
+           $a$2$ph$i = $a$1149$i;
+           break;
+          }
+          $502 = ((($a$1149$i)) + -4|0);
+          HEAP32[$502>>2] = $$lcssa304;
+          $a$2$ph$i = $502;
+         }
+        } while(0);
+        $z$2$i = $z$1148$i;
+        while(1) {
+         $503 = ($z$2$i>>>0)>($a$2$ph$i>>>0);
+         if (!($503)) {
+          $z$2$i$lcssa = $z$2$i;
+          break;
+         }
+         $504 = ((($z$2$i)) + -4|0);
+         $505 = HEAP32[$504>>2]|0;
+         $506 = ($505|0)==(0);
+         if ($506) {
+          $z$2$i = $504;
+         } else {
+          $z$2$i$lcssa = $z$2$i;
+          break;
+         }
+        }
+        $507 = HEAP32[$e2$i>>2]|0;
+        $508 = (($507) - ($489))|0;
+        HEAP32[$e2$i>>2] = $508;
+        $509 = ($508|0)>(0);
+        if ($509) {
+         $487 = $508;$a$1149$i = $a$2$ph$i;$z$1148$i = $z$2$i$lcssa;
+        } else {
+         $$pr50$i = $508;$a$1$lcssa$i = $a$2$ph$i;$z$1$lcssa$i = $z$2$i$lcssa;
+         break;
+        }
+       }
+      } else {
+       $$pr50$i = $$pr$i;$a$1$lcssa$i = $$33$i;$z$1$lcssa$i = $$lcssa303;
+      }
+      $510 = ($$pr50$i|0)<(0);
+      if ($510) {
+       $511 = (($$p$i) + 25)|0;
+       $512 = (($511|0) / 9)&-1;
+       $513 = (($512) + 1)|0;
+       $514 = ($395|0)==(102);
+       $516 = $$pr50$i;$a$3136$i = $a$1$lcssa$i;$z$3135$i = $z$1$lcssa$i;
+       while(1) {
+        $515 = (0 - ($516))|0;
+        $517 = ($515|0)>(9);
+        $518 = $517 ? 9 : $515;
+        $519 = ($a$3136$i>>>0)<($z$3135$i>>>0);
+        do {
+         if ($519) {
+          $523 = 1 << $518;
+          $524 = (($523) + -1)|0;
+          $525 = 1000000000 >>> $518;
+          $carry3$0130$i = 0;$d$1129$i = $a$3136$i;
+          while(1) {
+           $526 = HEAP32[$d$1129$i>>2]|0;
+           $527 = $526 & $524;
+           $528 = $526 >>> $518;
+           $529 = (($528) + ($carry3$0130$i))|0;
+           HEAP32[$d$1129$i>>2] = $529;
+           $530 = Math_imul($527, $525)|0;
+           $531 = ((($d$1129$i)) + 4|0);
+           $532 = ($531>>>0)<($z$3135$i>>>0);
+           if ($532) {
+            $carry3$0130$i = $530;$d$1129$i = $531;
+           } else {
+            $$lcssa306 = $530;
+            break;
+           }
+          }
+          $533 = HEAP32[$a$3136$i>>2]|0;
+          $534 = ($533|0)==(0);
+          $535 = ((($a$3136$i)) + 4|0);
+          $$a$3$i = $534 ? $535 : $a$3136$i;
+          $536 = ($$lcssa306|0)==(0);
+          if ($536) {
+           $$a$3192$i = $$a$3$i;$z$4$i = $z$3135$i;
+           break;
+          }
+          $537 = ((($z$3135$i)) + 4|0);
+          HEAP32[$z$3135$i>>2] = $$lcssa306;
+          $$a$3192$i = $$a$3$i;$z$4$i = $537;
+         } else {
+          $520 = HEAP32[$a$3136$i>>2]|0;
+          $521 = ($520|0)==(0);
+          $522 = ((($a$3136$i)) + 4|0);
+          $$a$3191$i = $521 ? $522 : $a$3136$i;
+          $$a$3192$i = $$a$3191$i;$z$4$i = $z$3135$i;
+         }
+        } while(0);
+        $538 = $514 ? $$33$i : $$a$3192$i;
+        $539 = $z$4$i;
+        $540 = $538;
+        $541 = (($539) - ($540))|0;
+        $542 = $541 >> 2;
+        $543 = ($542|0)>($513|0);
+        $544 = (($538) + ($513<<2)|0);
+        $$z$4$i = $543 ? $544 : $z$4$i;
+        $545 = HEAP32[$e2$i>>2]|0;
+        $546 = (($545) + ($518))|0;
+        HEAP32[$e2$i>>2] = $546;
+        $547 = ($546|0)<(0);
+        if ($547) {
+         $516 = $546;$a$3136$i = $$a$3192$i;$z$3135$i = $$z$4$i;
+        } else {
+         $a$3$lcssa$i = $$a$3192$i;$z$3$lcssa$i = $$z$4$i;
+         break;
+        }
+       }
+      } else {
+       $a$3$lcssa$i = $a$1$lcssa$i;$z$3$lcssa$i = $z$1$lcssa$i;
+      }
+      $548 = ($a$3$lcssa$i>>>0)<($z$3$lcssa$i>>>0);
+      do {
+       if ($548) {
+        $549 = $a$3$lcssa$i;
+        $550 = (($479) - ($549))|0;
+        $551 = $550 >> 2;
+        $552 = ($551*9)|0;
+        $553 = HEAP32[$a$3$lcssa$i>>2]|0;
+        $554 = ($553>>>0)<(10);
+        if ($554) {
+         $e$1$i = $552;
+         break;
+        } else {
+         $e$0125$i = $552;$i$0124$i = 10;
+        }
+        while(1) {
+         $555 = ($i$0124$i*10)|0;
+         $556 = (($e$0125$i) + 1)|0;
+         $557 = ($553>>>0)<($555>>>0);
+         if ($557) {
+          $e$1$i = $556;
+          break;
+         } else {
+          $e$0125$i = $556;$i$0124$i = $555;
+         }
+        }
+       } else {
+        $e$1$i = 0;
+       }
+      } while(0);
+      $558 = ($395|0)!=(102);
+      $559 = $558 ? $e$1$i : 0;
+      $560 = (($$p$i) - ($559))|0;
+      $561 = ($395|0)==(103);
+      $562 = ($$p$i|0)!=(0);
+      $563 = $562 & $561;
+      $$neg55$i = $563 << 31 >> 31;
+      $564 = (($560) + ($$neg55$i))|0;
+      $565 = $z$3$lcssa$i;
+      $566 = (($565) - ($479))|0;
+      $567 = $566 >> 2;
+      $568 = ($567*9)|0;
+      $569 = (($568) + -9)|0;
+      $570 = ($564|0)<($569|0);
+      if ($570) {
+       $571 = ((($$33$i)) + 4|0);
+       $572 = (($564) + 9216)|0;
+       $573 = (($572|0) / 9)&-1;
+       $574 = (($573) + -1024)|0;
+       $575 = (($571) + ($574<<2)|0);
+       $576 = (($572|0) % 9)&-1;
+       $j$0117$i = (($576) + 1)|0;
+       $577 = ($j$0117$i|0)<(9);
+       if ($577) {
+        $i$1118$i = 10;$j$0119$i = $j$0117$i;
+        while(1) {
+         $578 = ($i$1118$i*10)|0;
+         $j$0$i = (($j$0119$i) + 1)|0;
+         $exitcond$i = ($j$0$i|0)==(9);
+         if ($exitcond$i) {
+          $i$1$lcssa$i = $578;
+          break;
+         } else {
+          $i$1118$i = $578;$j$0119$i = $j$0$i;
+         }
+        }
+       } else {
+        $i$1$lcssa$i = 10;
+       }
+       $579 = HEAP32[$575>>2]|0;
+       $580 = (($579>>>0) % ($i$1$lcssa$i>>>0))&-1;
+       $581 = ($580|0)==(0);
+       $582 = ((($575)) + 4|0);
+       $583 = ($582|0)==($z$3$lcssa$i|0);
+       $or$cond18$i = $583 & $581;
+       do {
+        if ($or$cond18$i) {
+         $a$8$i = $a$3$lcssa$i;$d$4$i = $575;$e$4$i = $e$1$i;
+        } else {
+         $584 = (($579>>>0) / ($i$1$lcssa$i>>>0))&-1;
+         $585 = $584 & 1;
+         $586 = ($585|0)==(0);
+         $$20$i = $586 ? 9007199254740992.0 : 9007199254740994.0;
+         $587 = (($i$1$lcssa$i|0) / 2)&-1;
+         $588 = ($580>>>0)<($587>>>0);
+         if ($588) {
+          $small$0$i = 0.5;
+         } else {
+          $589 = ($580|0)==($587|0);
+          $or$cond22$i = $583 & $589;
+          $$36$i = $or$cond22$i ? 1.0 : 1.5;
+          $small$0$i = $$36$i;
+         }
+         $590 = ($pl$0$i|0)==(0);
+         do {
+          if ($590) {
+           $round6$1$i = $$20$i;$small$1$i = $small$0$i;
+          } else {
+           $591 = HEAP8[$prefix$0$i>>0]|0;
+           $592 = ($591<<24>>24)==(45);
+           if (!($592)) {
+            $round6$1$i = $$20$i;$small$1$i = $small$0$i;
+            break;
+           }
+           $593 = -$$20$i;
+           $594 = -$small$0$i;
+           $round6$1$i = $593;$small$1$i = $594;
+          }
+         } while(0);
+         $595 = (($579) - ($580))|0;
+         HEAP32[$575>>2] = $595;
+         $596 = $round6$1$i + $small$1$i;
+         $597 = $596 != $round6$1$i;
+         if (!($597)) {
+          $a$8$i = $a$3$lcssa$i;$d$4$i = $575;$e$4$i = $e$1$i;
+          break;
+         }
+         $598 = (($595) + ($i$1$lcssa$i))|0;
+         HEAP32[$575>>2] = $598;
+         $599 = ($598>>>0)>(999999999);
+         if ($599) {
+          $a$5111$i = $a$3$lcssa$i;$d$2110$i = $575;
+          while(1) {
+           $600 = ((($d$2110$i)) + -4|0);
+           HEAP32[$d$2110$i>>2] = 0;
+           $601 = ($600>>>0)<($a$5111$i>>>0);
+           if ($601) {
+            $602 = ((($a$5111$i)) + -4|0);
+            HEAP32[$602>>2] = 0;
+            $a$6$i = $602;
+           } else {
+            $a$6$i = $a$5111$i;
+           }
+           $603 = HEAP32[$600>>2]|0;
+           $604 = (($603) + 1)|0;
+           HEAP32[$600>>2] = $604;
+           $605 = ($604>>>0)>(999999999);
+           if ($605) {
+            $a$5111$i = $a$6$i;$d$2110$i = $600;
+           } else {
+            $a$5$lcssa$i = $a$6$i;$d$2$lcssa$i = $600;
+            break;
+           }
+          }
+         } else {
+          $a$5$lcssa$i = $a$3$lcssa$i;$d$2$lcssa$i = $575;
+         }
+         $606 = $a$5$lcssa$i;
+         $607 = (($479) - ($606))|0;
+         $608 = $607 >> 2;
+         $609 = ($608*9)|0;
+         $610 = HEAP32[$a$5$lcssa$i>>2]|0;
+         $611 = ($610>>>0)<(10);
+         if ($611) {
+          $a$8$i = $a$5$lcssa$i;$d$4$i = $d$2$lcssa$i;$e$4$i = $609;
+          break;
+         } else {
+          $e$2106$i = $609;$i$2105$i = 10;
+         }
+         while(1) {
+          $612 = ($i$2105$i*10)|0;
+          $613 = (($e$2106$i) + 1)|0;
+          $614 = ($610>>>0)<($612>>>0);
+          if ($614) {
+           $a$8$i = $a$5$lcssa$i;$d$4$i = $d$2$lcssa$i;$e$4$i = $613;
+           break;
+          } else {
+           $e$2106$i = $613;$i$2105$i = $612;
+          }
+         }
+        }
+       } while(0);
+       $615 = ((($d$4$i)) + 4|0);
+       $616 = ($z$3$lcssa$i>>>0)>($615>>>0);
+       $$z$3$i = $616 ? $615 : $z$3$lcssa$i;
+       $a$9$ph$i = $a$8$i;$e$5$ph$i = $e$4$i;$z$7$ph$i = $$z$3$i;
+      } else {
+       $a$9$ph$i = $a$3$lcssa$i;$e$5$ph$i = $e$1$i;$z$7$ph$i = $z$3$lcssa$i;
+      }
+      $617 = (0 - ($e$5$ph$i))|0;
+      $z$7$i = $z$7$ph$i;
+      while(1) {
+       $618 = ($z$7$i>>>0)>($a$9$ph$i>>>0);
+       if (!($618)) {
+        $$lcssa162$i = 0;$z$7$i$lcssa = $z$7$i;
+        break;
+       }
+       $619 = ((($z$7$i)) + -4|0);
+       $620 = HEAP32[$619>>2]|0;
+       $621 = ($620|0)==(0);
+       if ($621) {
+        $z$7$i = $619;
+       } else {
+        $$lcssa162$i = 1;$z$7$i$lcssa = $z$7$i;
+        break;
+       }
+      }
+      do {
+       if ($561) {
+        $622 = $562&1;
+        $623 = $622 ^ 1;
+        $$p$$i = (($623) + ($$p$i))|0;
+        $624 = ($$p$$i|0)>($e$5$ph$i|0);
+        $625 = ($e$5$ph$i|0)>(-5);
+        $or$cond6$i = $624 & $625;
+        if ($or$cond6$i) {
+         $626 = (($t$0) + -1)|0;
+         $$neg56$i = (($$p$$i) + -1)|0;
+         $627 = (($$neg56$i) - ($e$5$ph$i))|0;
+         $$013$i = $626;$$210$i = $627;
+        } else {
+         $628 = (($t$0) + -2)|0;
+         $629 = (($$p$$i) + -1)|0;
+         $$013$i = $628;$$210$i = $629;
+        }
+        $630 = $fl$1$ & 8;
+        $631 = ($630|0)==(0);
+        if (!($631)) {
+         $$114$i = $$013$i;$$311$i = $$210$i;$$pre$phi190$iZ2D = $630;
+         break;
+        }
+        do {
+         if ($$lcssa162$i) {
+          $632 = ((($z$7$i$lcssa)) + -4|0);
+          $633 = HEAP32[$632>>2]|0;
+          $634 = ($633|0)==(0);
+          if ($634) {
+           $j$2$i = 9;
+           break;
+          }
+          $635 = (($633>>>0) % 10)&-1;
+          $636 = ($635|0)==(0);
+          if ($636) {
+           $i$3101$i = 10;$j$1102$i = 0;
+          } else {
+           $j$2$i = 0;
+           break;
+          }
+          while(1) {
+           $637 = ($i$3101$i*10)|0;
+           $638 = (($j$1102$i) + 1)|0;
+           $639 = (($633>>>0) % ($637>>>0))&-1;
+           $640 = ($639|0)==(0);
+           if ($640) {
+            $i$3101$i = $637;$j$1102$i = $638;
+           } else {
+            $j$2$i = $638;
+            break;
+           }
+          }
+         } else {
+          $j$2$i = 9;
+         }
+        } while(0);
+        $641 = $$013$i | 32;
+        $642 = ($641|0)==(102);
+        $643 = $z$7$i$lcssa;
+        $644 = (($643) - ($479))|0;
+        $645 = $644 >> 2;
+        $646 = ($645*9)|0;
+        $647 = (($646) + -9)|0;
+        if ($642) {
+         $648 = (($647) - ($j$2$i))|0;
+         $649 = ($648|0)<(0);
+         $$23$i = $649 ? 0 : $648;
+         $650 = ($$210$i|0)<($$23$i|0);
+         $$210$$24$i = $650 ? $$210$i : $$23$i;
+         $$114$i = $$013$i;$$311$i = $$210$$24$i;$$pre$phi190$iZ2D = 0;
+         break;
+        } else {
+         $651 = (($647) + ($e$5$ph$i))|0;
+         $652 = (($651) - ($j$2$i))|0;
+         $653 = ($652|0)<(0);
+         $$25$i = $653 ? 0 : $652;
+         $654 = ($$210$i|0)<($$25$i|0);
+         $$210$$26$i = $654 ? $$210$i : $$25$i;
+         $$114$i = $$013$i;$$311$i = $$210$$26$i;$$pre$phi190$iZ2D = 0;
+         break;
+        }
+       } else {
+        $$pre189$i = $fl$1$ & 8;
+        $$114$i = $t$0;$$311$i = $$p$i;$$pre$phi190$iZ2D = $$pre189$i;
+       }
+      } while(0);
+      $655 = $$311$i | $$pre$phi190$iZ2D;
+      $656 = ($655|0)!=(0);
+      $657 = $656&1;
+      $658 = $$114$i | 32;
+      $659 = ($658|0)==(102);
+      if ($659) {
+       $660 = ($e$5$ph$i|0)>(0);
+       $661 = $660 ? $e$5$ph$i : 0;
+       $$pn$i = $661;$estr$2$i = 0;
+      } else {
+       $662 = ($e$5$ph$i|0)<(0);
+       $663 = $662 ? $617 : $e$5$ph$i;
+       $664 = ($663|0)<(0);
+       $665 = $664 << 31 >> 31;
+       $666 = (_fmt_u_1243($663,$665,$7)|0);
+       $667 = $666;
+       $668 = (($9) - ($667))|0;
+       $669 = ($668|0)<(2);
+       if ($669) {
+        $estr$195$i = $666;
+        while(1) {
+         $670 = ((($estr$195$i)) + -1|0);
+         HEAP8[$670>>0] = 48;
+         $671 = $670;
+         $672 = (($9) - ($671))|0;
+         $673 = ($672|0)<(2);
+         if ($673) {
+          $estr$195$i = $670;
+         } else {
+          $estr$1$lcssa$i = $670;
+          break;
+         }
+        }
+       } else {
+        $estr$1$lcssa$i = $666;
+       }
+       $674 = $e$5$ph$i >> 31;
+       $675 = $674 & 2;
+       $676 = (($675) + 43)|0;
+       $677 = $676&255;
+       $678 = ((($estr$1$lcssa$i)) + -1|0);
+       HEAP8[$678>>0] = $677;
+       $679 = $$114$i&255;
+       $680 = ((($estr$1$lcssa$i)) + -2|0);
+       HEAP8[$680>>0] = $679;
+       $681 = $680;
+       $682 = (($9) - ($681))|0;
+       $$pn$i = $682;$estr$2$i = $680;
+      }
+      $683 = (($pl$0$i) + 1)|0;
+      $684 = (($683) + ($$311$i))|0;
+      $l$1$i = (($684) + ($657))|0;
+      $685 = (($l$1$i) + ($$pn$i))|0;
+      _pad_1244($f,32,$w$1,$685,$fl$1$);
+      $686 = HEAP32[$f>>2]|0;
+      $687 = $686 & 32;
+      $688 = ($687|0)==(0);
+      if ($688) {
+       (___fwritex($prefix$0$i,$pl$0$i,$f)|0);
+      }
+      $689 = $fl$1$ ^ 65536;
+      _pad_1244($f,48,$w$1,$685,$689);
+      do {
+       if ($659) {
+        $690 = ($a$9$ph$i>>>0)>($$33$i>>>0);
+        $r$0$a$9$i = $690 ? $$33$i : $a$9$ph$i;
+        $d$584$i = $r$0$a$9$i;
+        while(1) {
+         $691 = HEAP32[$d$584$i>>2]|0;
+         $692 = (_fmt_u_1243($691,0,$14)|0);
+         $693 = ($d$584$i|0)==($r$0$a$9$i|0);
+         do {
+          if ($693) {
+           $699 = ($692|0)==($14|0);
+           if (!($699)) {
+            $s7$1$i = $692;
+            break;
+           }
+           HEAP8[$16>>0] = 48;
+           $s7$1$i = $16;
+          } else {
+           $694 = ($692>>>0)>($buf$i>>>0);
+           if (!($694)) {
+            $s7$1$i = $692;
+            break;
+           }
+           $695 = $692;
+           $696 = (($695) - ($5))|0;
+           _memset(($buf$i|0),48,($696|0))|0;
+           $s7$081$i = $692;
+           while(1) {
+            $697 = ((($s7$081$i)) + -1|0);
+            $698 = ($697>>>0)>($buf$i>>>0);
+            if ($698) {
+             $s7$081$i = $697;
+            } else {
+             $s7$1$i = $697;
+             break;
+            }
+           }
+          }
+         } while(0);
+         $700 = HEAP32[$f>>2]|0;
+         $701 = $700 & 32;
+         $702 = ($701|0)==(0);
+         if ($702) {
+          $703 = $s7$1$i;
+          $704 = (($15) - ($703))|0;
+          (___fwritex($s7$1$i,$704,$f)|0);
+         }
+         $705 = ((($d$584$i)) + 4|0);
+         $706 = ($705>>>0)>($$33$i>>>0);
+         if ($706) {
+          $$lcssa316 = $705;
+          break;
+         } else {
+          $d$584$i = $705;
+         }
+        }
+        $707 = ($655|0)==(0);
+        do {
+         if (!($707)) {
+          $708 = HEAP32[$f>>2]|0;
+          $709 = $708 & 32;
+          $710 = ($709|0)==(0);
+          if (!($710)) {
+           break;
+          }
+          (___fwritex(72376,1,$f)|0);
+         }
+        } while(0);
+        $711 = ($$lcssa316>>>0)<($z$7$i$lcssa>>>0);
+        $712 = ($$311$i|0)>(0);
+        $713 = $712 & $711;
+        if ($713) {
+         $$41278$i = $$311$i;$d$677$i = $$lcssa316;
+         while(1) {
+          $714 = HEAP32[$d$677$i>>2]|0;
+          $715 = (_fmt_u_1243($714,0,$14)|0);
+          $716 = ($715>>>0)>($buf$i>>>0);
+          if ($716) {
+           $717 = $715;
+           $718 = (($717) - ($5))|0;
+           _memset(($buf$i|0),48,($718|0))|0;
+           $s8$072$i = $715;
+           while(1) {
+            $719 = ((($s8$072$i)) + -1|0);
+            $720 = ($719>>>0)>($buf$i>>>0);
+            if ($720) {
+             $s8$072$i = $719;
+            } else {
+             $s8$0$lcssa$i = $719;
+             break;
+            }
+           }
+          } else {
+           $s8$0$lcssa$i = $715;
+          }
+          $721 = HEAP32[$f>>2]|0;
+          $722 = $721 & 32;
+          $723 = ($722|0)==(0);
+          if ($723) {
+           $724 = ($$41278$i|0)>(9);
+           $725 = $724 ? 9 : $$41278$i;
+           (___fwritex($s8$0$lcssa$i,$725,$f)|0);
+          }
+          $726 = ((($d$677$i)) + 4|0);
+          $727 = (($$41278$i) + -9)|0;
+          $728 = ($726>>>0)<($z$7$i$lcssa>>>0);
+          $729 = ($$41278$i|0)>(9);
+          $730 = $729 & $728;
+          if ($730) {
+           $$41278$i = $727;$d$677$i = $726;
+          } else {
+           $$412$lcssa$i = $727;
+           break;
+          }
+         }
+        } else {
+         $$412$lcssa$i = $$311$i;
+        }
+        $731 = (($$412$lcssa$i) + 9)|0;
+        _pad_1244($f,48,$731,9,0);
+       } else {
+        $732 = ((($a$9$ph$i)) + 4|0);
+        $z$7$$i = $$lcssa162$i ? $z$7$i$lcssa : $732;
+        $733 = ($$311$i|0)>(-1);
+        if ($733) {
+         $734 = ($$pre$phi190$iZ2D|0)==(0);
+         $$589$i = $$311$i;$d$788$i = $a$9$ph$i;
+         while(1) {
+          $735 = HEAP32[$d$788$i>>2]|0;
+          $736 = (_fmt_u_1243($735,0,$14)|0);
+          $737 = ($736|0)==($14|0);
+          if ($737) {
+           HEAP8[$16>>0] = 48;
+           $s9$0$i = $16;
+          } else {
+           $s9$0$i = $736;
+          }
+          $738 = ($d$788$i|0)==($a$9$ph$i|0);
+          do {
+           if ($738) {
+            $742 = ((($s9$0$i)) + 1|0);
+            $743 = HEAP32[$f>>2]|0;
+            $744 = $743 & 32;
+            $745 = ($744|0)==(0);
+            if ($745) {
+             (___fwritex($s9$0$i,1,$f)|0);
+            }
+            $746 = ($$589$i|0)<(1);
+            $or$cond31$i = $734 & $746;
+            if ($or$cond31$i) {
+             $s9$2$i = $742;
+             break;
+            }
+            $747 = HEAP32[$f>>2]|0;
+            $748 = $747 & 32;
+            $749 = ($748|0)==(0);
+            if (!($749)) {
+             $s9$2$i = $742;
+             break;
+            }
+            (___fwritex(72376,1,$f)|0);
+            $s9$2$i = $742;
+           } else {
+            $739 = ($s9$0$i>>>0)>($buf$i>>>0);
+            if (!($739)) {
+             $s9$2$i = $s9$0$i;
+             break;
+            }
+            $scevgep182$i = (($s9$0$i) + ($6)|0);
+            $scevgep182183$i = $scevgep182$i;
+            _memset(($buf$i|0),48,($scevgep182183$i|0))|0;
+            $s9$185$i = $s9$0$i;
+            while(1) {
+             $740 = ((($s9$185$i)) + -1|0);
+             $741 = ($740>>>0)>($buf$i>>>0);
+             if ($741) {
+              $s9$185$i = $740;
+             } else {
+              $s9$2$i = $740;
+              break;
+             }
+            }
+           }
+          } while(0);
+          $750 = $s9$2$i;
+          $751 = (($15) - ($750))|0;
+          $752 = HEAP32[$f>>2]|0;
+          $753 = $752 & 32;
+          $754 = ($753|0)==(0);
+          if ($754) {
+           $755 = ($$589$i|0)>($751|0);
+           $756 = $755 ? $751 : $$589$i;
+           (___fwritex($s9$2$i,$756,$f)|0);
+          }
+          $757 = (($$589$i) - ($751))|0;
+          $758 = ((($d$788$i)) + 4|0);
+          $759 = ($758>>>0)<($z$7$$i>>>0);
+          $760 = ($757|0)>(-1);
+          $761 = $759 & $760;
+          if ($761) {
+           $$589$i = $757;$d$788$i = $758;
+          } else {
+           $$5$lcssa$i = $757;
+           break;
+          }
+         }
+        } else {
+         $$5$lcssa$i = $$311$i;
+        }
+        $762 = (($$5$lcssa$i) + 18)|0;
+        _pad_1244($f,48,$762,18,0);
+        $763 = HEAP32[$f>>2]|0;
+        $764 = $763 & 32;
+        $765 = ($764|0)==(0);
+        if (!($765)) {
+         break;
+        }
+        $766 = $estr$2$i;
+        $767 = (($9) - ($766))|0;
+        (___fwritex($estr$2$i,$767,$f)|0);
+       }
+      } while(0);
+      $768 = $fl$1$ ^ 8192;
+      _pad_1244($f,32,$w$1,$685,$768);
+      $769 = ($685|0)<($w$1|0);
+      $w$32$i = $769 ? $w$1 : $685;
+      $$0$i = $w$32$i;
+     } else {
+      $375 = $t$0 & 32;
+      $376 = ($375|0)!=(0);
+      $377 = $376 ? 72364 : 72368;
+      $378 = ($$07$i != $$07$i) | (0.0 != 0.0);
+      $379 = $376 ? 72387 : 72372;
+      $pl$1$i = $378 ? 0 : $pl$0$i;
+      $s1$0$i = $378 ? $379 : $377;
+      $380 = (($pl$1$i) + 3)|0;
+      _pad_1244($f,32,$w$1,$380,$176);
+      $381 = HEAP32[$f>>2]|0;
+      $382 = $381 & 32;
+      $383 = ($382|0)==(0);
+      if ($383) {
+       (___fwritex($prefix$0$i,$pl$1$i,$f)|0);
+       $$pre$i = HEAP32[$f>>2]|0;
+       $385 = $$pre$i;
+      } else {
+       $385 = $381;
+      }
+      $384 = $385 & 32;
+      $386 = ($384|0)==(0);
+      if ($386) {
+       (___fwritex($s1$0$i,3,$f)|0);
+      }
+      $387 = $fl$1$ ^ 8192;
+      _pad_1244($f,32,$w$1,$380,$387);
+      $388 = ($380|0)<($w$1|0);
+      $389 = $388 ? $w$1 : $380;
+      $$0$i = $389;
+     }
+    } while(0);
+    $cnt$0 = $cnt$1;$l$0 = $$0$i;$l10n$0 = $l10n$3;$s$0 = $$lcssa300;
+    continue L1;
+    break;
+   }
+   default: {
+    $a$2 = $s$0;$fl$6 = $fl$1$;$p$5 = $p$0;$pl$2 = 0;$prefix$2 = 70436;$z$2 = $1;
+   }
+   }
+  } while(0);
+  L311: do {
+   if ((label|0) == 64) {
+    label = 0;
+    $207 = $arg;
+    $208 = $207;
+    $209 = HEAP32[$208>>2]|0;
+    $210 = (($207) + 4)|0;
+    $211 = $210;
+    $212 = HEAP32[$211>>2]|0;
+    $213 = $t$1 & 32;
+    $214 = ($209|0)==(0);
+    $215 = ($212|0)==(0);
+    $216 = $214 & $215;
+    if ($216) {
+     $a$0 = $1;$fl$4 = $fl$3;$p$2 = $p$1;$pl$1 = 0;$prefix$1 = 70436;
+     label = 77;
+    } else {
+     $$012$i = $1;$218 = $209;$225 = $212;
+     while(1) {
+      $217 = $218 & 15;
+      $219 = (70420 + ($217)|0);
+      $220 = HEAP8[$219>>0]|0;
+      $221 = $220&255;
+      $222 = $221 | $213;
+      $223 = $222&255;
+      $224 = ((($$012$i)) + -1|0);
+      HEAP8[$224>>0] = $223;
+      $226 = (_bitshift64Lshr(($218|0),($225|0),4)|0);
+      $227 = tempRet0;
+      $228 = ($226|0)==(0);
+      $229 = ($227|0)==(0);
+      $230 = $228 & $229;
+      if ($230) {
+       $$lcssa321 = $224;
+       break;
+      } else {
+       $$012$i = $224;$218 = $226;$225 = $227;
+      }
+     }
+     $231 = $arg;
+     $232 = $231;
+     $233 = HEAP32[$232>>2]|0;
+     $234 = (($231) + 4)|0;
+     $235 = $234;
+     $236 = HEAP32[$235>>2]|0;
+     $237 = ($233|0)==(0);
+     $238 = ($236|0)==(0);
+     $239 = $237 & $238;
+     $240 = $fl$3 & 8;
+     $241 = ($240|0)==(0);
+     $or$cond17 = $241 | $239;
+     if ($or$cond17) {
+      $a$0 = $$lcssa321;$fl$4 = $fl$3;$p$2 = $p$1;$pl$1 = 0;$prefix$1 = 70436;
+      label = 77;
+     } else {
+      $242 = $t$1 >> 4;
+      $243 = (70436 + ($242)|0);
+      $a$0 = $$lcssa321;$fl$4 = $fl$3;$p$2 = $p$1;$pl$1 = 2;$prefix$1 = $243;
+      label = 77;
+     }
+    }
+   }
+   else if ((label|0) == 76) {
+    label = 0;
+    $289 = (_fmt_u_1243($287,$288,$1)|0);
+    $a$0 = $289;$fl$4 = $fl$1$;$p$2 = $p$0;$pl$1 = $pl$0;$prefix$1 = $prefix$0;
+    label = 77;
+   }
+   else if ((label|0) == 82) {
+    label = 0;
+    $321 = (_memchr($a$1,0,$p$0)|0);
+    $322 = ($321|0)==(0|0);
+    $323 = $321;
+    $324 = $a$1;
+    $325 = (($323) - ($324))|0;
+    $326 = (($a$1) + ($p$0)|0);
+    $z$1 = $322 ? $326 : $321;
+    $p$3 = $322 ? $p$0 : $325;
+    $a$2 = $a$1;$fl$6 = $176;$p$5 = $p$3;$pl$2 = 0;$prefix$2 = 70436;$z$2 = $z$1;
+   }
+   else if ((label|0) == 86) {
+    label = 0;
+    $i$0105 = 0;$l$1104 = 0;$ws$0106 = $798;
+    while(1) {
+     $334 = HEAP32[$ws$0106>>2]|0;
+     $335 = ($334|0)==(0);
+     if ($335) {
+      $i$0$lcssa = $i$0105;$l$2 = $l$1104;
+      break;
+     }
+     $336 = (_wctomb($mb,$334)|0);
+     $337 = ($336|0)<(0);
+     $338 = (($p$4176) - ($i$0105))|0;
+     $339 = ($336>>>0)>($338>>>0);
+     $or$cond20 = $337 | $339;
+     if ($or$cond20) {
+      $i$0$lcssa = $i$0105;$l$2 = $336;
+      break;
+     }
+     $340 = ((($ws$0106)) + 4|0);
+     $341 = (($336) + ($i$0105))|0;
+     $342 = ($p$4176>>>0)>($341>>>0);
+     if ($342) {
+      $i$0105 = $341;$l$1104 = $336;$ws$0106 = $340;
+     } else {
+      $i$0$lcssa = $341;$l$2 = $336;
+      break;
+     }
+    }
+    $343 = ($l$2|0)<(0);
+    if ($343) {
+     $$0 = -1;
+     break L1;
+    }
+    _pad_1244($f,32,$w$1,$i$0$lcssa,$fl$1$);
+    $344 = ($i$0$lcssa|0)==(0);
+    if ($344) {
+     $i$0$lcssa178 = 0;
+     label = 97;
+    } else {
+     $i$1116 = 0;$ws$1117 = $798;
+     while(1) {
+      $345 = HEAP32[$ws$1117>>2]|0;
+      $346 = ($345|0)==(0);
+      if ($346) {
+       $i$0$lcssa178 = $i$0$lcssa;
+       label = 97;
+       break L311;
+      }
+      $347 = ((($ws$1117)) + 4|0);
+      $348 = (_wctomb($mb,$345)|0);
+      $349 = (($348) + ($i$1116))|0;
+      $350 = ($349|0)>($i$0$lcssa|0);
+      if ($350) {
+       $i$0$lcssa178 = $i$0$lcssa;
+       label = 97;
+       break L311;
+      }
+      $351 = HEAP32[$f>>2]|0;
+      $352 = $351 & 32;
+      $353 = ($352|0)==(0);
+      if ($353) {
+       (___fwritex($mb,$348,$f)|0);
+      }
+      $354 = ($349>>>0)<($i$0$lcssa>>>0);
+      if ($354) {
+       $i$1116 = $349;$ws$1117 = $347;
+      } else {
+       $i$0$lcssa178 = $i$0$lcssa;
+       label = 97;
+       break;
+      }
+     }
+    }
+   }
+  } while(0);
+  if ((label|0) == 97) {
+   label = 0;
+   $355 = $fl$1$ ^ 8192;
+   _pad_1244($f,32,$w$1,$i$0$lcssa178,$355);
+   $356 = ($w$1|0)>($i$0$lcssa178|0);
+   $357 = $356 ? $w$1 : $i$0$lcssa178;
+   $cnt$0 = $cnt$1;$l$0 = $357;$l10n$0 = $l10n$3;$s$0 = $$lcssa300;
+   continue;
+  }
+  if ((label|0) == 77) {
+   label = 0;
+   $290 = ($p$2|0)>(-1);
+   $291 = $fl$4 & -65537;
+   $$fl$4 = $290 ? $291 : $fl$4;
+   $292 = $arg;
+   $293 = $292;
+   $294 = HEAP32[$293>>2]|0;
+   $295 = (($292) + 4)|0;
+   $296 = $295;
+   $297 = HEAP32[$296>>2]|0;
+   $298 = ($294|0)!=(0);
+   $299 = ($297|0)!=(0);
+   $300 = $298 | $299;
+   $301 = ($p$2|0)!=(0);
+   $or$cond = $301 | $300;
+   if ($or$cond) {
+    $302 = $a$0;
+    $303 = (($2) - ($302))|0;
+    $304 = $300&1;
+    $305 = $304 ^ 1;
+    $306 = (($305) + ($303))|0;
+    $307 = ($p$2|0)>($306|0);
+    $p$2$ = $307 ? $p$2 : $306;
+    $a$2 = $a$0;$fl$6 = $$fl$4;$p$5 = $p$2$;$pl$2 = $pl$1;$prefix$2 = $prefix$1;$z$2 = $1;
+   } else {
+    $a$2 = $1;$fl$6 = $$fl$4;$p$5 = 0;$pl$2 = $pl$1;$prefix$2 = $prefix$1;$z$2 = $1;
+   }
+  }
+  $770 = $z$2;
+  $771 = $a$2;
+  $772 = (($770) - ($771))|0;
+  $773 = ($p$5|0)<($772|0);
+  $$p$5 = $773 ? $772 : $p$5;
+  $774 = (($pl$2) + ($$p$5))|0;
+  $775 = ($w$1|0)<($774|0);
+  $w$2 = $775 ? $774 : $w$1;
+  _pad_1244($f,32,$w$2,$774,$fl$6);
+  $776 = HEAP32[$f>>2]|0;
+  $777 = $776 & 32;
+  $778 = ($777|0)==(0);
+  if ($778) {
+   (___fwritex($prefix$2,$pl$2,$f)|0);
+  }
+  $779 = $fl$6 ^ 65536;
+  _pad_1244($f,48,$w$2,$774,$779);
+  _pad_1244($f,48,$$p$5,$772,0);
+  $780 = HEAP32[$f>>2]|0;
+  $781 = $780 & 32;
+  $782 = ($781|0)==(0);
+  if ($782) {
+   (___fwritex($a$2,$772,$f)|0);
+  }
+  $783 = $fl$6 ^ 8192;
+  _pad_1244($f,32,$w$2,$774,$783);
+  $cnt$0 = $cnt$1;$l$0 = $w$2;$l10n$0 = $l10n$3;$s$0 = $$lcssa300;
+ }
+ L345: do {
+  if ((label|0) == 244) {
+   $784 = ($f|0)==(0|0);
+   if ($784) {
+    $785 = ($l10n$0$lcssa|0)==(0);
+    if ($785) {
+     $$0 = 0;
+    } else {
+     $i$291 = 1;
+     while(1) {
+      $786 = (($nl_type) + ($i$291<<2)|0);
+      $787 = HEAP32[$786>>2]|0;
+      $788 = ($787|0)==(0);
+      if ($788) {
+       $i$291$lcssa = $i$291;
+       break;
+      }
+      $790 = (($nl_arg) + ($i$291<<3)|0);
+      _pop_arg($790,$787,$ap);
+      $791 = (($i$291) + 1)|0;
+      $792 = ($791|0)<(10);
+      if ($792) {
+       $i$291 = $791;
+      } else {
+       $$0 = 1;
+       break L345;
+      }
+     }
+     $789 = ($i$291$lcssa|0)<(10);
+     if ($789) {
+      $i$389 = $i$291$lcssa;
+      while(1) {
+       $795 = (($nl_type) + ($i$389<<2)|0);
+       $796 = HEAP32[$795>>2]|0;
+       $797 = ($796|0)==(0);
+       $793 = (($i$389) + 1)|0;
+       if (!($797)) {
+        $$0 = -1;
+        break L345;
+       }
+       $794 = ($793|0)<(10);
+       if ($794) {
+        $i$389 = $793;
+       } else {
+        $$0 = 1;
+        break;
+       }
+      }
+     } else {
+      $$0 = 1;
+     }
+    }
+   } else {
+    $$0 = $cnt$1$lcssa;
+   }
+  }
+ } while(0);
+ STACKTOP = sp;return ($$0|0);
+}
+function ___fwritex($s,$l,$f) {
+ $s = $s|0;
+ $l = $l|0;
+ $f = $f|0;
+ var $$0 = 0, $$01 = 0, $$02 = 0, $$pre = 0, $$pre6 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0;
+ var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i$0 = 0, $i$0$lcssa12 = 0;
+ var $i$1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ((($f)) + 16|0);
+ $1 = HEAP32[$0>>2]|0;
+ $2 = ($1|0)==(0|0);
+ if ($2) {
+  $4 = (___towrite($f)|0);
+  $5 = ($4|0)==(0);
+  if ($5) {
+   $$pre = HEAP32[$0>>2]|0;
+   $9 = $$pre;
+   label = 5;
+  } else {
+   $$0 = 0;
+  }
+ } else {
+  $3 = $1;
+  $9 = $3;
+  label = 5;
+ }
+ L5: do {
+  if ((label|0) == 5) {
+   $6 = ((($f)) + 20|0);
+   $7 = HEAP32[$6>>2]|0;
+   $8 = (($9) - ($7))|0;
+   $10 = ($8>>>0)<($l>>>0);
+   $11 = $7;
+   if ($10) {
+    $12 = ((($f)) + 36|0);
+    $13 = HEAP32[$12>>2]|0;
+    $14 = (FUNCTION_TABLE_iiii[$13 & 511]($f,$s,$l)|0);
+    $$0 = $14;
+    break;
+   }
+   $15 = ((($f)) + 75|0);
+   $16 = HEAP8[$15>>0]|0;
+   $17 = ($16<<24>>24)>(-1);
+   L10: do {
+    if ($17) {
+     $i$0 = $l;
+     while(1) {
+      $18 = ($i$0|0)==(0);
+      if ($18) {
+       $$01 = $l;$$02 = $s;$29 = $11;$i$1 = 0;
+       break L10;
+      }
+      $19 = (($i$0) + -1)|0;
+      $20 = (($s) + ($19)|0);
+      $21 = HEAP8[$20>>0]|0;
+      $22 = ($21<<24>>24)==(10);
+      if ($22) {
+       $i$0$lcssa12 = $i$0;
+       break;
+      } else {
+       $i$0 = $19;
+      }
+     }
+     $23 = ((($f)) + 36|0);
+     $24 = HEAP32[$23>>2]|0;
+     $25 = (FUNCTION_TABLE_iiii[$24 & 511]($f,$s,$i$0$lcssa12)|0);
+     $26 = ($25>>>0)<($i$0$lcssa12>>>0);
+     if ($26) {
+      $$0 = $i$0$lcssa12;
+      break L5;
+     }
+     $27 = (($s) + ($i$0$lcssa12)|0);
+     $28 = (($l) - ($i$0$lcssa12))|0;
+     $$pre6 = HEAP32[$6>>2]|0;
+     $$01 = $28;$$02 = $27;$29 = $$pre6;$i$1 = $i$0$lcssa12;
+    } else {
+     $$01 = $l;$$02 = $s;$29 = $11;$i$1 = 0;
+    }
+   } while(0);
+   _memcpy(($29|0),($$02|0),($$01|0))|0;
+   $30 = HEAP32[$6>>2]|0;
+   $31 = (($30) + ($$01)|0);
+   HEAP32[$6>>2] = $31;
+   $32 = (($i$1) + ($$01))|0;
+   $$0 = $32;
+  }
+ } while(0);
+ return ($$0|0);
+}
+function ___towrite($f) {
+ $f = $f|0;
+ var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ((($f)) + 74|0);
+ $1 = HEAP8[$0>>0]|0;
+ $2 = $1 << 24 >> 24;
+ $3 = (($2) + 255)|0;
+ $4 = $3 | $2;
+ $5 = $4&255;
+ HEAP8[$0>>0] = $5;
+ $6 = HEAP32[$f>>2]|0;
+ $7 = $6 & 8;
+ $8 = ($7|0)==(0);
+ if ($8) {
+  $10 = ((($f)) + 8|0);
+  HEAP32[$10>>2] = 0;
+  $11 = ((($f)) + 4|0);
+  HEAP32[$11>>2] = 0;
+  $12 = ((($f)) + 44|0);
+  $13 = HEAP32[$12>>2]|0;
+  $14 = ((($f)) + 28|0);
+  HEAP32[$14>>2] = $13;
+  $15 = ((($f)) + 20|0);
+  HEAP32[$15>>2] = $13;
+  $16 = $13;
+  $17 = ((($f)) + 48|0);
+  $18 = HEAP32[$17>>2]|0;
+  $19 = (($16) + ($18)|0);
+  $20 = ((($f)) + 16|0);
+  HEAP32[$20>>2] = $19;
+  $$0 = 0;
+ } else {
+  $9 = $6 | 32;
+  HEAP32[$f>>2] = $9;
+  $$0 = -1;
+ }
+ return ($$0|0);
+}
+function _pop_arg($arg,$type,$ap) {
+ $arg = $arg|0;
+ $type = $type|0;
+ $ap = $ap|0;
+ var $$mask = 0, $$mask1 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0.0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0.0;
+ var $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0;
+ var $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0;
+ var $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0;
+ var $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0;
+ var $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $arglist_current = 0, $arglist_current11 = 0, $arglist_current14 = 0, $arglist_current17 = 0;
+ var $arglist_current2 = 0, $arglist_current20 = 0, $arglist_current23 = 0, $arglist_current26 = 0, $arglist_current5 = 0, $arglist_current8 = 0, $arglist_next = 0, $arglist_next12 = 0, $arglist_next15 = 0, $arglist_next18 = 0, $arglist_next21 = 0, $arglist_next24 = 0, $arglist_next27 = 0, $arglist_next3 = 0, $arglist_next6 = 0, $arglist_next9 = 0, $expanded = 0, $expanded28 = 0, $expanded30 = 0, $expanded31 = 0;
+ var $expanded32 = 0, $expanded34 = 0, $expanded35 = 0, $expanded37 = 0, $expanded38 = 0, $expanded39 = 0, $expanded41 = 0, $expanded42 = 0, $expanded44 = 0, $expanded45 = 0, $expanded46 = 0, $expanded48 = 0, $expanded49 = 0, $expanded51 = 0, $expanded52 = 0, $expanded53 = 0, $expanded55 = 0, $expanded56 = 0, $expanded58 = 0, $expanded59 = 0;
+ var $expanded60 = 0, $expanded62 = 0, $expanded63 = 0, $expanded65 = 0, $expanded66 = 0, $expanded67 = 0, $expanded69 = 0, $expanded70 = 0, $expanded72 = 0, $expanded73 = 0, $expanded74 = 0, $expanded76 = 0, $expanded77 = 0, $expanded79 = 0, $expanded80 = 0, $expanded81 = 0, $expanded83 = 0, $expanded84 = 0, $expanded86 = 0, $expanded87 = 0;
+ var $expanded88 = 0, $expanded90 = 0, $expanded91 = 0, $expanded93 = 0, $expanded94 = 0, $expanded95 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ($type>>>0)>(20);
+ L1: do {
+  if (!($0)) {
+   do {
+    switch ($type|0) {
+    case 9:  {
+     $arglist_current = HEAP32[$ap>>2]|0;
+     $1 = $arglist_current;
+     $2 = ((0) + 4|0);
+     $expanded28 = $2;
+     $expanded = (($expanded28) - 1)|0;
+     $3 = (($1) + ($expanded))|0;
+     $4 = ((0) + 4|0);
+     $expanded32 = $4;
+     $expanded31 = (($expanded32) - 1)|0;
+     $expanded30 = $expanded31 ^ -1;
+     $5 = $3 & $expanded30;
+     $6 = $5;
+     $7 = HEAP32[$6>>2]|0;
+     $arglist_next = ((($6)) + 4|0);
+     HEAP32[$ap>>2] = $arglist_next;
+     HEAP32[$arg>>2] = $7;
+     break L1;
+     break;
+    }
+    case 10:  {
+     $arglist_current2 = HEAP32[$ap>>2]|0;
+     $8 = $arglist_current2;
+     $9 = ((0) + 4|0);
+     $expanded35 = $9;
+     $expanded34 = (($expanded35) - 1)|0;
+     $10 = (($8) + ($expanded34))|0;
+     $11 = ((0) + 4|0);
+     $expanded39 = $11;
+     $expanded38 = (($expanded39) - 1)|0;
+     $expanded37 = $expanded38 ^ -1;
+     $12 = $10 & $expanded37;
+     $13 = $12;
+     $14 = HEAP32[$13>>2]|0;
+     $arglist_next3 = ((($13)) + 4|0);
+     HEAP32[$ap>>2] = $arglist_next3;
+     $15 = ($14|0)<(0);
+     $16 = $15 << 31 >> 31;
+     $17 = $arg;
+     $18 = $17;
+     HEAP32[$18>>2] = $14;
+     $19 = (($17) + 4)|0;
+     $20 = $19;
+     HEAP32[$20>>2] = $16;
+     break L1;
+     break;
+    }
+    case 11:  {
+     $arglist_current5 = HEAP32[$ap>>2]|0;
+     $21 = $arglist_current5;
+     $22 = ((0) + 4|0);
+     $expanded42 = $22;
+     $expanded41 = (($expanded42) - 1)|0;
+     $23 = (($21) + ($expanded41))|0;
+     $24 = ((0) + 4|0);
+     $expanded46 = $24;
+     $expanded45 = (($expanded46) - 1)|0;
+     $expanded44 = $expanded45 ^ -1;
+     $25 = $23 & $expanded44;
+     $26 = $25;
+     $27 = HEAP32[$26>>2]|0;
+     $arglist_next6 = ((($26)) + 4|0);
+     HEAP32[$ap>>2] = $arglist_next6;
+     $28 = $arg;
+     $29 = $28;
+     HEAP32[$29>>2] = $27;
+     $30 = (($28) + 4)|0;
+     $31 = $30;
+     HEAP32[$31>>2] = 0;
+     break L1;
+     break;
+    }
+    case 12:  {
+     $arglist_current8 = HEAP32[$ap>>2]|0;
+     $32 = $arglist_current8;
+     $33 = ((0) + 8|0);
+     $expanded49 = $33;
+     $expanded48 = (($expanded49) - 1)|0;
+     $34 = (($32) + ($expanded48))|0;
+     $35 = ((0) + 8|0);
+     $expanded53 = $35;
+     $expanded52 = (($expanded53) - 1)|0;
+     $expanded51 = $expanded52 ^ -1;
+     $36 = $34 & $expanded51;
+     $37 = $36;
+     $38 = $37;
+     $39 = $38;
+     $40 = HEAP32[$39>>2]|0;
+     $41 = (($38) + 4)|0;
+     $42 = $41;
+     $43 = HEAP32[$42>>2]|0;
+     $arglist_next9 = ((($37)) + 8|0);
+     HEAP32[$ap>>2] = $arglist_next9;
+     $44 = $arg;
+     $45 = $44;
+     HEAP32[$45>>2] = $40;
+     $46 = (($44) + 4)|0;
+     $47 = $46;
+     HEAP32[$47>>2] = $43;
+     break L1;
+     break;
+    }
+    case 13:  {
+     $arglist_current11 = HEAP32[$ap>>2]|0;
+     $48 = $arglist_current11;
+     $49 = ((0) + 4|0);
+     $expanded56 = $49;
+     $expanded55 = (($expanded56) - 1)|0;
+     $50 = (($48) + ($expanded55))|0;
+     $51 = ((0) + 4|0);
+     $expanded60 = $51;
+     $expanded59 = (($expanded60) - 1)|0;
+     $expanded58 = $expanded59 ^ -1;
+     $52 = $50 & $expanded58;
+     $53 = $52;
+     $54 = HEAP32[$53>>2]|0;
+     $arglist_next12 = ((($53)) + 4|0);
+     HEAP32[$ap>>2] = $arglist_next12;
+     $55 = $54&65535;
+     $56 = $55 << 16 >> 16;
+     $57 = ($56|0)<(0);
+     $58 = $57 << 31 >> 31;
+     $59 = $arg;
+     $60 = $59;
+     HEAP32[$60>>2] = $56;
+     $61 = (($59) + 4)|0;
+     $62 = $61;
+     HEAP32[$62>>2] = $58;
+     break L1;
+     break;
+    }
+    case 14:  {
+     $arglist_current14 = HEAP32[$ap>>2]|0;
+     $63 = $arglist_current14;
+     $64 = ((0) + 4|0);
+     $expanded63 = $64;
+     $expanded62 = (($expanded63) - 1)|0;
+     $65 = (($63) + ($expanded62))|0;
+     $66 = ((0) + 4|0);
+     $expanded67 = $66;
+     $expanded66 = (($expanded67) - 1)|0;
+     $expanded65 = $expanded66 ^ -1;
+     $67 = $65 & $expanded65;
+     $68 = $67;
+     $69 = HEAP32[$68>>2]|0;
+     $arglist_next15 = ((($68)) + 4|0);
+     HEAP32[$ap>>2] = $arglist_next15;
+     $$mask1 = $69 & 65535;
+     $70 = $arg;
+     $71 = $70;
+     HEAP32[$71>>2] = $$mask1;
+     $72 = (($70) + 4)|0;
+     $73 = $72;
+     HEAP32[$73>>2] = 0;
+     break L1;
+     break;
+    }
+    case 15:  {
+     $arglist_current17 = HEAP32[$ap>>2]|0;
+     $74 = $arglist_current17;
+     $75 = ((0) + 4|0);
+     $expanded70 = $75;
+     $expanded69 = (($expanded70) - 1)|0;
+     $76 = (($74) + ($expanded69))|0;
+     $77 = ((0) + 4|0);
+     $expanded74 = $77;
+     $expanded73 = (($expanded74) - 1)|0;
+     $expanded72 = $expanded73 ^ -1;
+     $78 = $76 & $expanded72;
+     $79 = $78;
+     $80 = HEAP32[$79>>2]|0;
+     $arglist_next18 = ((($79)) + 4|0);
+     HEAP32[$ap>>2] = $arglist_next18;
+     $81 = $80&255;
+     $82 = $81 << 24 >> 24;
+     $83 = ($82|0)<(0);
+     $84 = $83 << 31 >> 31;
+     $85 = $arg;
+     $86 = $85;
+     HEAP32[$86>>2] = $82;
+     $87 = (($85) + 4)|0;
+     $88 = $87;
+     HEAP32[$88>>2] = $84;
+     break L1;
+     break;
+    }
+    case 16:  {
+     $arglist_current20 = HEAP32[$ap>>2]|0;
+     $89 = $arglist_current20;
+     $90 = ((0) + 4|0);
+     $expanded77 = $90;
+     $expanded76 = (($expanded77) - 1)|0;
+     $91 = (($89) + ($expanded76))|0;
+     $92 = ((0) + 4|0);
+     $expanded81 = $92;
+     $expanded80 = (($expanded81) - 1)|0;
+     $expanded79 = $expanded80 ^ -1;
+     $93 = $91 & $expanded79;
+     $94 = $93;
+     $95 = HEAP32[$94>>2]|0;
+     $arglist_next21 = ((($94)) + 4|0);
+     HEAP32[$ap>>2] = $arglist_next21;
+     $$mask = $95 & 255;
+     $96 = $arg;
+     $97 = $96;
+     HEAP32[$97>>2] = $$mask;
+     $98 = (($96) + 4)|0;
+     $99 = $98;
+     HEAP32[$99>>2] = 0;
+     break L1;
+     break;
+    }
+    case 17:  {
+     $arglist_current23 = HEAP32[$ap>>2]|0;
+     $100 = $arglist_current23;
+     $101 = ((0) + 8|0);
+     $expanded84 = $101;
+     $expanded83 = (($expanded84) - 1)|0;
+     $102 = (($100) + ($expanded83))|0;
+     $103 = ((0) + 8|0);
+     $expanded88 = $103;
+     $expanded87 = (($expanded88) - 1)|0;
+     $expanded86 = $expanded87 ^ -1;
+     $104 = $102 & $expanded86;
+     $105 = $104;
+     $106 = +HEAPF64[$105>>3];
+     $arglist_next24 = ((($105)) + 8|0);
+     HEAP32[$ap>>2] = $arglist_next24;
+     HEAPF64[$arg>>3] = $106;
+     break L1;
+     break;
+    }
+    case 18:  {
+     $arglist_current26 = HEAP32[$ap>>2]|0;
+     $107 = $arglist_current26;
+     $108 = ((0) + 8|0);
+     $expanded91 = $108;
+     $expanded90 = (($expanded91) - 1)|0;
+     $109 = (($107) + ($expanded90))|0;
+     $110 = ((0) + 8|0);
+     $expanded95 = $110;
+     $expanded94 = (($expanded95) - 1)|0;
+     $expanded93 = $expanded94 ^ -1;
+     $111 = $109 & $expanded93;
+     $112 = $111;
+     $113 = +HEAPF64[$112>>3];
+     $arglist_next27 = ((($112)) + 8|0);
+     HEAP32[$ap>>2] = $arglist_next27;
+     HEAPF64[$arg>>3] = $113;
+     break L1;
+     break;
+    }
+    default: {
+     break L1;
+    }
+    }
+   } while(0);
+  }
+ } while(0);
+ return;
+}
+function _fmt_u_1243($0,$1,$s) {
+ $0 = $0|0;
+ $1 = $1|0;
+ $s = $s|0;
+ var $$0$lcssa = 0, $$01$lcssa$off0 = 0, $$05 = 0, $$1$lcssa = 0, $$12 = 0, $$lcssa19 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0;
+ var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $y$03 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $2 = ($1>>>0)>(0);
+ $3 = ($0>>>0)>(4294967295);
+ $4 = ($1|0)==(0);
+ $5 = $4 & $3;
+ $6 = $2 | $5;
+ if ($6) {
+  $$05 = $s;$7 = $0;$8 = $1;
+  while(1) {
+   $9 = (___uremdi3(($7|0),($8|0),10,0)|0);
+   $10 = tempRet0;
+   $11 = $9 | 48;
+   $12 = $11&255;
+   $13 = ((($$05)) + -1|0);
+   HEAP8[$13>>0] = $12;
+   $14 = (___udivdi3(($7|0),($8|0),10,0)|0);
+   $15 = tempRet0;
+   $16 = ($8>>>0)>(9);
+   $17 = ($7>>>0)>(4294967295);
+   $18 = ($8|0)==(9);
+   $19 = $18 & $17;
+   $20 = $16 | $19;
+   if ($20) {
+    $$05 = $13;$7 = $14;$8 = $15;
+   } else {
+    $$lcssa19 = $13;$28 = $14;$29 = $15;
+    break;
+   }
+  }
+  $$0$lcssa = $$lcssa19;$$01$lcssa$off0 = $28;
+ } else {
+  $$0$lcssa = $s;$$01$lcssa$off0 = $0;
+ }
+ $21 = ($$01$lcssa$off0|0)==(0);
+ if ($21) {
+  $$1$lcssa = $$0$lcssa;
+ } else {
+  $$12 = $$0$lcssa;$y$03 = $$01$lcssa$off0;
+  while(1) {
+   $22 = (($y$03>>>0) % 10)&-1;
+   $23 = $22 | 48;
+   $24 = $23&255;
+   $25 = ((($$12)) + -1|0);
+   HEAP8[$25>>0] = $24;
+   $26 = (($y$03>>>0) / 10)&-1;
+   $27 = ($y$03>>>0)<(10);
+   if ($27) {
+    $$1$lcssa = $25;
+    break;
+   } else {
+    $$12 = $25;$y$03 = $26;
+   }
+  }
+ }
+ return ($$1$lcssa|0);
+}
+function _strerror($e) {
+ $e = $e|0;
+ var $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $i$03 = 0, $i$03$lcssa = 0, $i$12 = 0, $s$0$lcssa = 0, $s$01 = 0, $s$1 = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ $i$03 = 0;
+ while(1) {
+  $1 = (70446 + ($i$03)|0);
+  $2 = HEAP8[$1>>0]|0;
+  $3 = $2&255;
+  $4 = ($3|0)==($e|0);
+  if ($4) {
+   $i$03$lcssa = $i$03;
+   label = 2;
+   break;
+  }
+  $5 = (($i$03) + 1)|0;
+  $6 = ($5|0)==(87);
+  if ($6) {
+   $i$12 = 87;$s$01 = 70534;
+   label = 5;
+   break;
+  } else {
+   $i$03 = $5;
+  }
+ }
+ if ((label|0) == 2) {
+  $0 = ($i$03$lcssa|0)==(0);
+  if ($0) {
+   $s$0$lcssa = 70534;
+  } else {
+   $i$12 = $i$03$lcssa;$s$01 = 70534;
+   label = 5;
+  }
+ }
+ if ((label|0) == 5) {
+  while(1) {
+   label = 0;
+   $s$1 = $s$01;
+   while(1) {
+    $7 = HEAP8[$s$1>>0]|0;
+    $8 = ($7<<24>>24)==(0);
+    $9 = ((($s$1)) + 1|0);
+    if ($8) {
+     $$lcssa = $9;
+     break;
+    } else {
+     $s$1 = $9;
+    }
+   }
+   $10 = (($i$12) + -1)|0;
+   $11 = ($10|0)==(0);
+   if ($11) {
+    $s$0$lcssa = $$lcssa;
+    break;
+   } else {
+    $i$12 = $10;$s$01 = $$lcssa;
+    label = 5;
+   }
+  }
+ }
+ return ($s$0$lcssa|0);
+}
+function _pad_1244($f,$c,$w,$l,$fl) {
+ $f = $f|0;
+ $c = $c|0;
+ $w = $w|0;
+ $l = $l|0;
+ $fl = $fl|0;
+ var $$0$lcssa6 = 0, $$02 = 0, $$pre = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0, $9 = 0, $or$cond = 0, $pad = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $pad = sp;
+ $0 = $fl & 73728;
+ $1 = ($0|0)==(0);
+ $2 = ($w|0)>($l|0);
+ $or$cond = $2 & $1;
+ do {
+  if ($or$cond) {
+   $3 = (($w) - ($l))|0;
+   $4 = ($3>>>0)>(256);
+   $5 = $4 ? 256 : $3;
+   _memset(($pad|0),($c|0),($5|0))|0;
+   $6 = ($3>>>0)>(255);
+   $7 = HEAP32[$f>>2]|0;
+   $8 = $7 & 32;
+   $9 = ($8|0)==(0);
+   if ($6) {
+    $10 = (($w) - ($l))|0;
+    $$02 = $3;$17 = $7;$18 = $9;
+    while(1) {
+     if ($18) {
+      (___fwritex($pad,256,$f)|0);
+      $$pre = HEAP32[$f>>2]|0;
+      $14 = $$pre;
+     } else {
+      $14 = $17;
+     }
+     $11 = (($$02) + -256)|0;
+     $12 = ($11>>>0)>(255);
+     $13 = $14 & 32;
+     $15 = ($13|0)==(0);
+     if ($12) {
+      $$02 = $11;$17 = $14;$18 = $15;
+     } else {
+      break;
+     }
+    }
+    $16 = $10 & 255;
+    if ($15) {
+     $$0$lcssa6 = $16;
+    } else {
+     break;
+    }
+   } else {
+    if ($9) {
+     $$0$lcssa6 = $3;
+    } else {
+     break;
+    }
+   }
+   (___fwritex($pad,$$0$lcssa6,$f)|0);
+  }
+ } while(0);
+ STACKTOP = sp;return;
+}
+function _wctomb($s,$wc) {
+ $s = $s|0;
+ $wc = $wc|0;
+ var $$0 = 0, $0 = 0, $1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ($s|0)==(0|0);
+ if ($0) {
+  $$0 = 0;
+ } else {
+  $1 = (_wcrtomb($s,$wc,0)|0);
+  $$0 = $1;
+ }
+ return ($$0|0);
+}
+function _wcrtomb($s,$wc,$st) {
+ $s = $s|0;
+ $wc = $wc|0;
+ $st = $st|0;
+ var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ($s|0)==(0|0);
+ do {
+  if ($0) {
+   $$0 = 1;
+  } else {
+   $1 = ($wc>>>0)<(128);
+   if ($1) {
+    $2 = $wc&255;
+    HEAP8[$s>>0] = $2;
+    $$0 = 1;
+    break;
+   }
+   $3 = ($wc>>>0)<(2048);
+   if ($3) {
+    $4 = $wc >>> 6;
+    $5 = $4 | 192;
+    $6 = $5&255;
+    $7 = ((($s)) + 1|0);
+    HEAP8[$s>>0] = $6;
+    $8 = $wc & 63;
+    $9 = $8 | 128;
+    $10 = $9&255;
+    HEAP8[$7>>0] = $10;
+    $$0 = 2;
+    break;
+   }
+   $11 = ($wc>>>0)<(55296);
+   $12 = $wc & -8192;
+   $13 = ($12|0)==(57344);
+   $or$cond = $11 | $13;
+   if ($or$cond) {
+    $14 = $wc >>> 12;
+    $15 = $14 | 224;
+    $16 = $15&255;
+    $17 = ((($s)) + 1|0);
+    HEAP8[$s>>0] = $16;
+    $18 = $wc >>> 6;
+    $19 = $18 & 63;
+    $20 = $19 | 128;
+    $21 = $20&255;
+    $22 = ((($s)) + 2|0);
+    HEAP8[$17>>0] = $21;
+    $23 = $wc & 63;
+    $24 = $23 | 128;
+    $25 = $24&255;
+    HEAP8[$22>>0] = $25;
+    $$0 = 3;
+    break;
+   }
+   $26 = (($wc) + -65536)|0;
+   $27 = ($26>>>0)<(1048576);
+   if ($27) {
+    $28 = $wc >>> 18;
+    $29 = $28 | 240;
+    $30 = $29&255;
+    $31 = ((($s)) + 1|0);
+    HEAP8[$s>>0] = $30;
+    $32 = $wc >>> 12;
+    $33 = $32 & 63;
+    $34 = $33 | 128;
+    $35 = $34&255;
+    $36 = ((($s)) + 2|0);
+    HEAP8[$31>>0] = $35;
+    $37 = $wc >>> 6;
+    $38 = $37 & 63;
+    $39 = $38 | 128;
+    $40 = $39&255;
+    $41 = ((($s)) + 3|0);
+    HEAP8[$36>>0] = $40;
+    $42 = $wc & 63;
+    $43 = $42 | 128;
+    $44 = $43&255;
+    HEAP8[$41>>0] = $44;
+    $$0 = 4;
+    break;
+   } else {
+    $45 = (___errno_location()|0);
+    HEAP32[$45>>2] = 84;
+    $$0 = -1;
+    break;
+   }
+  }
+ } while(0);
+ return ($$0|0);
+}
+function _frexpl($x,$e) {
+ $x = +$x;
+ $e = $e|0;
+ var $0 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = (+_frexp($x,$e));
+ return (+$0);
+}
+function _frexp($x,$e) {
+ $x = +$x;
+ $e = $e|0;
+ var $$0 = 0.0, $$01 = 0.0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, $storemerge = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF64[tempDoublePtr>>3] = $x;$0 = HEAP32[tempDoublePtr>>2]|0;
+ $1 = HEAP32[tempDoublePtr+4>>2]|0;
+ $2 = (_bitshift64Lshr(($0|0),($1|0),52)|0);
+ $3 = tempRet0;
+ $4 = $2 & 2047;
+ switch ($4|0) {
+ case 0:  {
+  $5 = $x != 0.0;
+  if ($5) {
+   $6 = $x * 1.8446744073709552E+19;
+   $7 = (+_frexp($6,$e));
+   $8 = HEAP32[$e>>2]|0;
+   $9 = (($8) + -64)|0;
+   $$01 = $7;$storemerge = $9;
+  } else {
+   $$01 = $x;$storemerge = 0;
+  }
+  HEAP32[$e>>2] = $storemerge;
+  $$0 = $$01;
+  break;
+ }
+ case 2047:  {
+  $$0 = $x;
+  break;
+ }
+ default: {
+  $10 = (($4) + -1022)|0;
+  HEAP32[$e>>2] = $10;
+  $11 = $1 & -2146435073;
+  $12 = $11 | 1071644672;
+  HEAP32[tempDoublePtr>>2] = $0;HEAP32[tempDoublePtr+4>>2] = $12;$13 = +HEAPF64[tempDoublePtr>>3];
+  $$0 = $13;
+ }
+ }
+ return (+$$0);
+}
+function ___lockfile($f) {
+ $f = $f|0;
+ var label = 0, sp = 0;
+ sp = STACKTOP;
+ return 0;
+}
+function _strcmp($l,$r) {
+ $l = $l|0;
+ $r = $r|0;
+ var $$014 = 0, $$05 = 0, $$lcssa = 0, $$lcssa2 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond3 = 0, label = 0;
+ var sp = 0;
+ sp = STACKTOP;
+ $0 = HEAP8[$l>>0]|0;
+ $1 = HEAP8[$r>>0]|0;
+ $2 = ($0<<24>>24)!=($1<<24>>24);
+ $3 = ($0<<24>>24)==(0);
+ $or$cond3 = $3 | $2;
+ if ($or$cond3) {
+  $$lcssa = $0;$$lcssa2 = $1;
+ } else {
+  $$014 = $l;$$05 = $r;
+  while(1) {
+   $4 = ((($$014)) + 1|0);
+   $5 = ((($$05)) + 1|0);
+   $6 = HEAP8[$4>>0]|0;
+   $7 = HEAP8[$5>>0]|0;
+   $8 = ($6<<24>>24)!=($7<<24>>24);
+   $9 = ($6<<24>>24)==(0);
+   $or$cond = $9 | $8;
+   if ($or$cond) {
+    $$lcssa = $6;$$lcssa2 = $7;
+    break;
+   } else {
+    $$014 = $4;$$05 = $5;
+   }
+  }
+ }
+ $10 = $$lcssa&255;
+ $11 = $$lcssa2&255;
+ $12 = (($10) - ($11))|0;
+ return ($12|0);
+}
+function _isalnum($c) {
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, $isdigit = 0, $isdigittmp = 0, $not$ = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = (_isalpha($c)|0);
+ $isdigittmp = (($c) + -48)|0;
+ $isdigit = ($isdigittmp>>>0)<(10);
+ $not$ = ($0|0)!=(0);
+ $1 = $isdigit | $not$;
+ $2 = $1&1;
+ return ($2|0);
+}
+function _isalpha($c) {
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = $c | 32;
+ $1 = (($0) + -97)|0;
+ $2 = ($1>>>0)<(26);
+ $3 = $2&1;
+ return ($3|0);
+}
+function _isdigit($c) {
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = (($c) + -48)|0;
+ $1 = ($0>>>0)<(10);
+ $2 = $1&1;
+ return ($2|0);
+}
+function ___floatscan($f,$prec,$pok) {
+ $f = $f|0;
+ $prec = $prec|0;
+ $pok = $pok|0;
+ var $$$i = 0, $$0 = 0.0, $$010$i = 0, $$012$i = 0, $$07$i = 0, $$0710$i = 0, $$0711$i = 0, $$1$i = 0.0, $$111$be$i = 0, $$111$ph$i = 0, $$16$i = 0, $$2$i = 0, $$24$i = 0, $$3$be$i = 0, $$3$lcssa$i = 0, $$3112$i = 0, $$in = 0, $$k$0$i = 0, $$lcssa = 0, $$lcssa258 = 0;
+ var $$lcssa258$lcssa = 0, $$lcssa259 = 0, $$lcssa259$lcssa = 0, $$lcssa265 = 0, $$lcssa266 = 0, $$lcssa267 = 0, $$lcssa277 = 0, $$lnz$0$i = 0, $$neg$i = 0, $$neg40$i = 0, $$not$i = 0, $$old8 = 0, $$pn$i = 0.0, $$pre$i = 0, $$pre$i17 = 0, $$pre$phi43$iZ2D = 0.0, $$pre42$i = 0.0, $$promoted$i = 0, $$sink$off0$i = 0, $0 = 0;
+ var $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0;
+ var $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0;
+ var $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0;
+ var $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0;
+ var $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0.0, $183 = 0.0, $184 = 0.0, $185 = 0.0, $186 = 0, $187 = 0, $188 = 0.0, $189 = 0.0;
+ var $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0;
+ var $207 = 0, $208 = 0, $209 = 0.0, $21 = 0, $210 = 0.0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0;
+ var $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0;
+ var $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0.0, $259 = 0.0, $26 = 0, $260 = 0;
+ var $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0.0, $268 = 0.0, $269 = 0.0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0;
+ var $28 = 0, $280 = 0.0, $281 = 0.0, $282 = 0.0, $283 = 0, $284 = 0, $285 = 0.0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0;
+ var $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0.0, $31 = 0, $310 = 0.0, $311 = 0.0, $312 = 0, $313 = 0, $314 = 0;
+ var $315 = 0, $316 = 0, $317 = 0.0, $318 = 0.0, $319 = 0.0, $32 = 0, $320 = 0.0, $321 = 0.0, $322 = 0.0, $323 = 0, $324 = 0, $325 = 0.0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0;
+ var $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0;
+ var $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0;
+ var $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0;
+ var $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0;
+ var $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0;
+ var $423 = 0, $424 = 0.0, $425 = 0.0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0;
+ var $441 = 0.0, $442 = 0.0, $443 = 0.0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0.0, $454 = 0.0, $455 = 0.0, $456 = 0, $457 = 0, $458 = 0, $459 = 0;
+ var $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0.0, $466 = 0.0, $467 = 0.0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0;
+ var $478 = 0, $479 = 0.0, $48 = 0, $480 = 0, $481 = 0.0, $482 = 0.0, $483 = 0, $484 = 0.0, $485 = 0, $486 = 0.0, $487 = 0.0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0.0, $492 = 0.0, $493 = 0, $494 = 0, $495 = 0;
+ var $496 = 0, $497 = 0.0, $498 = 0.0, $499 = 0.0, $5 = 0, $50 = 0.0, $500 = 0, $501 = 0, $502 = 0, $503 = 0.0, $504 = 0.0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0.0, $510 = 0, $511 = 0, $512 = 0;
+ var $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0.0, $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0;
+ var $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0;
+ var $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0;
+ var $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0;
+ var $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0;
+ var $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0, $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0.0, $619 = 0, $62 = 0, $620 = 0;
+ var $621 = 0, $622 = 0, $623 = 0.0, $624 = 0.0, $625 = 0.0, $626 = 0, $627 = 0.0, $628 = 0.0, $629 = 0.0, $63 = 0, $630 = 0.0, $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0;
+ var $64 = 0, $640 = 0, $641 = 0.0, $642 = 0.0, $643 = 0.0, $644 = 0, $645 = 0.0, $646 = 0.0, $647 = 0, $648 = 0, $649 = 0, $65 = 0, $650 = 0.0, $651 = 0.0, $652 = 0.0, $653 = 0.0, $654 = 0, $655 = 0, $656 = 0.0, $657 = 0;
+ var $658 = 0.0, $659 = 0.0, $66 = 0, $660 = 0.0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0.0, $666 = 0, $667 = 0, $668 = 0, $669 = 0, $67 = 0, $670 = 0.0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0;
+ var $676 = 0, $677 = 0.0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0.0, $683 = 0, $684 = 0, $685 = 0.0, $686 = 0.0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0;
+ var $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0, $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0;
+ var $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0, $721 = 0, $722 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0;
+ var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0;
+ var $98 = 0, $99 = 0, $a$0$lcssa161$i = 0, $a$093$i = 0, $a$1$i = 0, $a$1$i$lcssa = 0, $a$2$ph46$i = 0, $a$4$i = 0, $a$4$i$lcssa250 = 0, $a$4$i251 = 0, $a$4$ph$i = 0, $a$4$ph167$i = 0, $a$586$i = 0, $a$6$i = 0, $a$6$i$lcssa = 0, $a$6$i$lcssa$lcssa = 0, $bias$0$i = 0.0, $bias$0$i25 = 0.0, $bits$0$ph = 0, $brmerge$i28 = 0;
+ var $c$0 = 0, $c$0$i = 0, $c$1$lcssa = 0, $c$1$ph$i = 0, $c$179 = 0, $c$2 = 0, $c$2$i = 0, $c$2$lcssa$i = 0, $c$377 = 0, $c$4 = 0, $c$5 = 0, $c$6 = 0, $carry$095$i = 0, $carry1$0$i = 0, $carry1$1$i = 0, $carry1$1$i$lcssa = 0, $carry1$1$i$lcssa$lcssa = 0, $carry4$089$i = 0, $cond$i = 0, $d$0$i = 0;
+ var $denormal$0$i = 0, $denormal$1$i = 0, $denormal$2$i = 0, $e2$0$i19 = 0, $e2$0$ph$i = 0, $e2$1$i = 0, $e2$1$i248 = 0, $e2$1$ph$i = 0, $e2$1$ph166$i = 0, $e2$3$i = 0, $e2$4$i = 0, $emin$0$ph = 0, $exitcond151$i = 0, $frac$0$i = 0.0, $frac$1$i = 0.0, $frac$3$i = 0.0, $gotdig$0$i = 0, $gotdig$0$i$lcssa244 = 0, $gotdig$0$i12 = 0, $gotdig$0$i12$lcssa275 = 0;
+ var $gotdig$2$i = 0, $gotdig$2$i$lcssa = 0, $gotdig$2$i13 = 0, $gotdig$3$i = 0, $gotdig$3$lcssa$i = 0, $gotdig$3108$i = 0, $gotdig$3108$i$lcssa = 0, $gotdig$4$i = 0, $gotrad$0$i = 0, $gotrad$0$i$lcssa = 0, $gotrad$0$i14 = 0, $gotrad$1$i = 0, $gotrad$1$lcssa$i = 0, $gotrad$1109$i = 0, $gotrad$2$i = 0, $gottail$0$i = 0, $gottail$1$i = 0, $gottail$2$i = 0, $i$0$lcssa = 0, $i$078 = 0;
+ var $i$1 = 0, $i$276 = 0, $i$3 = 0, $i$4 = 0, $i$4$lcssa = 0, $j$0$lcssa$i = 0, $j$0111$i = 0, $j$0111$i$lcssa = 0, $j$075$i = 0, $j$076$i = 0, $j$077$i = 0, $j$2$i = 0, $j$3102$i = 0, $k$0$lcssa$i = 0, $k$0110$i = 0, $k$0110$i$lcssa = 0, $k$071$i = 0, $k$072$i = 0, $k$073$i = 0, $k$2$i = 0;
+ var $k$3$i = 0, $k$494$i = 0, $k$5$i = 0, $k$5$in$i = 0, $k$5$z$2$i = 0, $k$687$i = 0, $lnz$0$lcssa$i = 0, $lnz$0107$i = 0, $lnz$0107$i$lcssa = 0, $lnz$065$i = 0, $lnz$066$i = 0, $lnz$067$i = 0, $lnz$2$i = 0, $or$cond = 0, $or$cond$i = 0, $or$cond$i16 = 0, $or$cond18$i = 0, $or$cond192$i = 0, $or$cond20$i = 0, $or$cond21$i = 0;
+ var $or$cond22$i = 0, $or$cond25$i = 0, $or$cond26$i = 0, $or$cond3$i = 0, $or$cond4$i = 0, $or$cond5 = 0, $or$cond6$i = 0, $or$cond7 = 0, $or$cond9 = 0, $or$cond9$i = 0, $or$cond9$i27 = 0, $rp$0$lcssa162$i = 0, $rp$092$i = 0, $rp$1$i18 = 0, $rp$1$i18$lcssa = 0, $rp$2$ph44$i = 0, $rp$4$ph$i = 0, $rp$4$ph42$i = 0, $rp$585$i = 0, $rp$6$i = 0;
+ var $rp$6$i$lcssa = 0, $rp$6$i$lcssa$lcssa = 0, $scale$0$i = 0.0, $scale$1$i = 0.0, $scale$2$i = 0.0, $sign$0 = 0, $storemerge$i = 0, $sum$i = 0, $x$0$i = 0, $x$0$i$lcssa = 0, $x$1$i = 0, $x$2$i = 0, $x$3$lcssa$i = 0, $x$324$i = 0, $x$4$lcssa$i = 0, $x$419$i = 0, $x$5$i = 0, $x$6$i = 0, $x$i = 0, $y$0$i = 0.0;
+ var $y$0$i$lcssa = 0.0, $y$1$i = 0.0, $y$1$i24 = 0.0, $y$2$i = 0.0, $y$2$i26 = 0.0, $y$3$i = 0.0, $y$3$lcssa$i = 0.0, $y$320$i = 0.0, $y$4$i = 0.0, $y$5$i = 0.0, $z$0$i = 0, $z$1$i = 0, $z$1$ph45$i = 0, $z$10$1$i = 0, $z$10$i = 0, $z$2$i = 0, $z$3$i = 0, $z$3$i$lcssa = 0, $z$3$i$lcssa$lcssa = 0, $z$4$i = 0;
+ var $z$6$ph$i = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 512|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $x$i = sp;
+ switch ($prec|0) {
+ case 0:  {
+  $bits$0$ph = 24;$emin$0$ph = -149;
+  label = 4;
+  break;
+ }
+ case 1:  {
+  $bits$0$ph = 53;$emin$0$ph = -1074;
+  label = 4;
+  break;
+ }
+ case 2:  {
+  $bits$0$ph = 53;$emin$0$ph = -1074;
+  label = 4;
+  break;
+ }
+ default: {
+  $$0 = 0.0;
+ }
+ }
+ L4: do {
+  if ((label|0) == 4) {
+   $0 = ((($f)) + 4|0);
+   $1 = ((($f)) + 100|0);
+   while(1) {
+    $2 = HEAP32[$0>>2]|0;
+    $3 = HEAP32[$1>>2]|0;
+    $4 = ($2>>>0)<($3>>>0);
+    if ($4) {
+     $5 = ((($2)) + 1|0);
+     HEAP32[$0>>2] = $5;
+     $6 = HEAP8[$2>>0]|0;
+     $7 = $6&255;
+     $9 = $7;
+    } else {
+     $8 = (___shgetc($f)|0);
+     $9 = $8;
+    }
+    $10 = (_isspace($9)|0);
+    $11 = ($10|0)==(0);
+    if ($11) {
+     $$lcssa277 = $9;
+     break;
+    }
+   }
+   $12 = ($$lcssa277|0)==(45);
+   L13: do {
+    switch ($$lcssa277|0) {
+    case 43: case 45:  {
+     $13 = $12&1;
+     $14 = $13 << 1;
+     $15 = (1 - ($14))|0;
+     $16 = HEAP32[$0>>2]|0;
+     $17 = HEAP32[$1>>2]|0;
+     $18 = ($16>>>0)<($17>>>0);
+     if ($18) {
+      $19 = ((($16)) + 1|0);
+      HEAP32[$0>>2] = $19;
+      $20 = HEAP8[$16>>0]|0;
+      $21 = $20&255;
+      $c$0 = $21;$sign$0 = $15;
+      break L13;
+     } else {
+      $22 = (___shgetc($f)|0);
+      $c$0 = $22;$sign$0 = $15;
+      break L13;
+     }
+     break;
+    }
+    default: {
+     $c$0 = $$lcssa277;$sign$0 = 1;
+    }
+    }
+   } while(0);
+   $c$179 = $c$0;$i$078 = 0;
+   while(1) {
+    $23 = $c$179 | 32;
+    $24 = (72378 + ($i$078)|0);
+    $25 = HEAP8[$24>>0]|0;
+    $26 = $25 << 24 >> 24;
+    $27 = ($23|0)==($26|0);
+    if (!($27)) {
+     $c$1$lcssa = $c$179;$i$0$lcssa = $i$078;
+     break;
+    }
+    $28 = ($i$078>>>0)<(7);
+    do {
+     if ($28) {
+      $29 = HEAP32[$0>>2]|0;
+      $30 = HEAP32[$1>>2]|0;
+      $31 = ($29>>>0)<($30>>>0);
+      if ($31) {
+       $32 = ((($29)) + 1|0);
+       HEAP32[$0>>2] = $32;
+       $33 = HEAP8[$29>>0]|0;
+       $34 = $33&255;
+       $c$2 = $34;
+       break;
+      } else {
+       $35 = (___shgetc($f)|0);
+       $c$2 = $35;
+       break;
+      }
+     } else {
+      $c$2 = $c$179;
+     }
+    } while(0);
+    $36 = (($i$078) + 1)|0;
+    $37 = ($36>>>0)<(8);
+    if ($37) {
+     $c$179 = $c$2;$i$078 = $36;
+    } else {
+     $c$1$lcssa = $c$2;$i$0$lcssa = $36;
+     break;
+    }
+   }
+   L29: do {
+    switch ($i$0$lcssa|0) {
+    case 8:  {
+     break;
+    }
+    case 3:  {
+     label = 23;
+     break;
+    }
+    default: {
+     $38 = ($i$0$lcssa>>>0)>(3);
+     $39 = ($pok|0)!=(0);
+     $or$cond5 = $39 & $38;
+     if ($or$cond5) {
+      $40 = ($i$0$lcssa|0)==(8);
+      if ($40) {
+       break L29;
+      } else {
+       label = 23;
+       break L29;
+      }
+     }
+     $53 = ($i$0$lcssa|0)==(0);
+     L34: do {
+      if ($53) {
+       $c$377 = $c$1$lcssa;$i$276 = 0;
+       while(1) {
+        $54 = $c$377 | 32;
+        $55 = (72387 + ($i$276)|0);
+        $56 = HEAP8[$55>>0]|0;
+        $57 = $56 << 24 >> 24;
+        $58 = ($54|0)==($57|0);
+        if (!($58)) {
+         $c$5 = $c$377;$i$3 = $i$276;
+         break L34;
+        }
+        $59 = ($i$276>>>0)<(2);
+        do {
+         if ($59) {
+          $60 = HEAP32[$0>>2]|0;
+          $61 = HEAP32[$1>>2]|0;
+          $62 = ($60>>>0)<($61>>>0);
+          if ($62) {
+           $63 = ((($60)) + 1|0);
+           HEAP32[$0>>2] = $63;
+           $64 = HEAP8[$60>>0]|0;
+           $65 = $64&255;
+           $c$4 = $65;
+           break;
+          } else {
+           $66 = (___shgetc($f)|0);
+           $c$4 = $66;
+           break;
+          }
+         } else {
+          $c$4 = $c$377;
+         }
+        } while(0);
+        $67 = (($i$276) + 1)|0;
+        $68 = ($67>>>0)<(3);
+        if ($68) {
+         $c$377 = $c$4;$i$276 = $67;
+        } else {
+         $c$5 = $c$4;$i$3 = $67;
+         break;
+        }
+       }
+      } else {
+       $c$5 = $c$1$lcssa;$i$3 = $i$0$lcssa;
+      }
+     } while(0);
+     switch ($i$3|0) {
+     case 3:  {
+      $69 = HEAP32[$0>>2]|0;
+      $70 = HEAP32[$1>>2]|0;
+      $71 = ($69>>>0)<($70>>>0);
+      if ($71) {
+       $72 = ((($69)) + 1|0);
+       HEAP32[$0>>2] = $72;
+       $73 = HEAP8[$69>>0]|0;
+       $74 = $73&255;
+       $76 = $74;
+      } else {
+       $75 = (___shgetc($f)|0);
+       $76 = $75;
+      }
+      $77 = ($76|0)==(40);
+      if ($77) {
+       $i$4 = 1;
+      } else {
+       $78 = HEAP32[$1>>2]|0;
+       $79 = ($78|0)==(0|0);
+       if ($79) {
+        $$0 = nan;
+        break L4;
+       }
+       $80 = HEAP32[$0>>2]|0;
+       $81 = ((($80)) + -1|0);
+       HEAP32[$0>>2] = $81;
+       $$0 = nan;
+       break L4;
+      }
+      while(1) {
+       $82 = HEAP32[$0>>2]|0;
+       $83 = HEAP32[$1>>2]|0;
+       $84 = ($82>>>0)<($83>>>0);
+       if ($84) {
+        $85 = ((($82)) + 1|0);
+        HEAP32[$0>>2] = $85;
+        $86 = HEAP8[$82>>0]|0;
+        $87 = $86&255;
+        $90 = $87;
+       } else {
+        $88 = (___shgetc($f)|0);
+        $90 = $88;
+       }
+       $89 = (($90) + -48)|0;
+       $91 = ($89>>>0)<(10);
+       $92 = (($90) + -65)|0;
+       $93 = ($92>>>0)<(26);
+       $or$cond = $91 | $93;
+       if (!($or$cond)) {
+        $94 = (($90) + -97)|0;
+        $95 = ($94>>>0)<(26);
+        $96 = ($90|0)==(95);
+        $or$cond7 = $96 | $95;
+        if (!($or$cond7)) {
+         $$lcssa = $90;$i$4$lcssa = $i$4;
+         break;
+        }
+       }
+       $108 = (($i$4) + 1)|0;
+       $i$4 = $108;
+      }
+      $97 = ($$lcssa|0)==(41);
+      if ($97) {
+       $$0 = nan;
+       break L4;
+      }
+      $98 = HEAP32[$1>>2]|0;
+      $99 = ($98|0)==(0|0);
+      if (!($99)) {
+       $100 = HEAP32[$0>>2]|0;
+       $101 = ((($100)) + -1|0);
+       HEAP32[$0>>2] = $101;
+      }
+      if (!($39)) {
+       $103 = (___errno_location()|0);
+       HEAP32[$103>>2] = 22;
+       ___shlim($f,0);
+       $$0 = 0.0;
+       break L4;
+      }
+      $102 = ($i$4$lcssa|0)==(0);
+      if ($102) {
+       $$0 = nan;
+       break L4;
+      } else {
+       $$in = $i$4$lcssa;
+      }
+      while(1) {
+       $104 = (($$in) + -1)|0;
+       if (!($99)) {
+        $105 = HEAP32[$0>>2]|0;
+        $106 = ((($105)) + -1|0);
+        HEAP32[$0>>2] = $106;
+       }
+       $107 = ($104|0)==(0);
+       if ($107) {
+        $$0 = nan;
+        break L4;
+       } else {
+        $$in = $104;
+       }
+      }
+      break;
+     }
+     case 0:  {
+      $114 = ($c$5|0)==(48);
+      do {
+       if ($114) {
+        $115 = HEAP32[$0>>2]|0;
+        $116 = HEAP32[$1>>2]|0;
+        $117 = ($115>>>0)<($116>>>0);
+        if ($117) {
+         $118 = ((($115)) + 1|0);
+         HEAP32[$0>>2] = $118;
+         $119 = HEAP8[$115>>0]|0;
+         $120 = $119&255;
+         $123 = $120;
+        } else {
+         $121 = (___shgetc($f)|0);
+         $123 = $121;
+        }
+        $122 = $123 | 32;
+        $124 = ($122|0)==(120);
+        if (!($124)) {
+         $326 = HEAP32[$1>>2]|0;
+         $327 = ($326|0)==(0|0);
+         if ($327) {
+          $c$6 = 48;
+          break;
+         }
+         $328 = HEAP32[$0>>2]|0;
+         $329 = ((($328)) + -1|0);
+         HEAP32[$0>>2] = $329;
+         $c$6 = 48;
+         break;
+        }
+        $125 = HEAP32[$0>>2]|0;
+        $126 = HEAP32[$1>>2]|0;
+        $127 = ($125>>>0)<($126>>>0);
+        if ($127) {
+         $128 = ((($125)) + 1|0);
+         HEAP32[$0>>2] = $128;
+         $129 = HEAP8[$125>>0]|0;
+         $130 = $129&255;
+         $c$0$i = $130;$gotdig$0$i = 0;
+        } else {
+         $131 = (___shgetc($f)|0);
+         $c$0$i = $131;$gotdig$0$i = 0;
+        }
+        L94: while(1) {
+         switch ($c$0$i|0) {
+         case 46:  {
+          $gotdig$0$i$lcssa244 = $gotdig$0$i;
+          label = 74;
+          break L94;
+          break;
+         }
+         case 48:  {
+          break;
+         }
+         default: {
+          $168 = 0;$170 = 0;$693 = 0;$694 = 0;$c$2$i = $c$0$i;$gotdig$2$i = $gotdig$0$i;$gotrad$0$i = 0;$gottail$0$i = 0;$scale$0$i = 1.0;$x$0$i = 0;$y$0$i = 0.0;
+          break L94;
+         }
+         }
+         $132 = HEAP32[$0>>2]|0;
+         $133 = HEAP32[$1>>2]|0;
+         $134 = ($132>>>0)<($133>>>0);
+         if ($134) {
+          $135 = ((($132)) + 1|0);
+          HEAP32[$0>>2] = $135;
+          $136 = HEAP8[$132>>0]|0;
+          $137 = $136&255;
+          $c$0$i = $137;$gotdig$0$i = 1;
+          continue;
+         } else {
+          $138 = (___shgetc($f)|0);
+          $c$0$i = $138;$gotdig$0$i = 1;
+          continue;
+         }
+        }
+        if ((label|0) == 74) {
+         $139 = HEAP32[$0>>2]|0;
+         $140 = HEAP32[$1>>2]|0;
+         $141 = ($139>>>0)<($140>>>0);
+         if ($141) {
+          $142 = ((($139)) + 1|0);
+          HEAP32[$0>>2] = $142;
+          $143 = HEAP8[$139>>0]|0;
+          $144 = $143&255;
+          $c$1$ph$i = $144;
+         } else {
+          $145 = (___shgetc($f)|0);
+          $c$1$ph$i = $145;
+         }
+         $146 = ($c$1$ph$i|0)==(48);
+         if ($146) {
+          $154 = 0;$155 = 0;
+          while(1) {
+           $147 = HEAP32[$0>>2]|0;
+           $148 = HEAP32[$1>>2]|0;
+           $149 = ($147>>>0)<($148>>>0);
+           if ($149) {
+            $150 = ((($147)) + 1|0);
+            HEAP32[$0>>2] = $150;
+            $151 = HEAP8[$147>>0]|0;
+            $152 = $151&255;
+            $158 = $152;
+           } else {
+            $153 = (___shgetc($f)|0);
+            $158 = $153;
+           }
+           $156 = (_i64Add(($154|0),($155|0),-1,-1)|0);
+           $157 = tempRet0;
+           $159 = ($158|0)==(48);
+           if ($159) {
+            $154 = $156;$155 = $157;
+           } else {
+            $168 = 0;$170 = 0;$693 = $156;$694 = $157;$c$2$i = $158;$gotdig$2$i = 1;$gotrad$0$i = 1;$gottail$0$i = 0;$scale$0$i = 1.0;$x$0$i = 0;$y$0$i = 0.0;
+            break;
+           }
+          }
+         } else {
+          $168 = 0;$170 = 0;$693 = 0;$694 = 0;$c$2$i = $c$1$ph$i;$gotdig$2$i = $gotdig$0$i$lcssa244;$gotrad$0$i = 1;$gottail$0$i = 0;$scale$0$i = 1.0;$x$0$i = 0;$y$0$i = 0.0;
+         }
+        }
+        while(1) {
+         $160 = (($c$2$i) + -48)|0;
+         $161 = ($160>>>0)<(10);
+         $$pre$i = $c$2$i | 32;
+         if ($161) {
+          label = 86;
+         } else {
+          $162 = (($$pre$i) + -97)|0;
+          $163 = ($162>>>0)<(6);
+          $164 = ($c$2$i|0)==(46);
+          $or$cond6$i = $164 | $163;
+          if (!($or$cond6$i)) {
+           $212 = $693;$213 = $170;$215 = $694;$216 = $168;$c$2$lcssa$i = $c$2$i;$gotdig$2$i$lcssa = $gotdig$2$i;$gotrad$0$i$lcssa = $gotrad$0$i;$x$0$i$lcssa = $x$0$i;$y$0$i$lcssa = $y$0$i;
+           break;
+          }
+          if ($164) {
+           $165 = ($gotrad$0$i|0)==(0);
+           if ($165) {
+            $695 = $170;$696 = $168;$697 = $170;$698 = $168;$gotdig$3$i = $gotdig$2$i;$gotrad$1$i = 1;$gottail$2$i = $gottail$0$i;$scale$2$i = $scale$0$i;$x$2$i = $x$0$i;$y$2$i = $y$0$i;
+           } else {
+            $212 = $693;$213 = $170;$215 = $694;$216 = $168;$c$2$lcssa$i = 46;$gotdig$2$i$lcssa = $gotdig$2$i;$gotrad$0$i$lcssa = $gotrad$0$i;$x$0$i$lcssa = $x$0$i;$y$0$i$lcssa = $y$0$i;
+            break;
+           }
+          } else {
+           label = 86;
+          }
+         }
+         if ((label|0) == 86) {
+          label = 0;
+          $166 = ($c$2$i|0)>(57);
+          $167 = (($$pre$i) + -87)|0;
+          $d$0$i = $166 ? $167 : $160;
+          $169 = ($168|0)<(0);
+          $171 = ($170>>>0)<(8);
+          $172 = ($168|0)==(0);
+          $173 = $172 & $171;
+          $174 = $169 | $173;
+          do {
+           if ($174) {
+            $175 = $x$0$i << 4;
+            $176 = (($d$0$i) + ($175))|0;
+            $gottail$1$i = $gottail$0$i;$scale$1$i = $scale$0$i;$x$1$i = $176;$y$1$i = $y$0$i;
+           } else {
+            $177 = ($168|0)<(0);
+            $178 = ($170>>>0)<(14);
+            $179 = ($168|0)==(0);
+            $180 = $179 & $178;
+            $181 = $177 | $180;
+            if ($181) {
+             $182 = (+($d$0$i|0));
+             $183 = $scale$0$i * 0.0625;
+             $184 = $183 * $182;
+             $185 = $y$0$i + $184;
+             $gottail$1$i = $gottail$0$i;$scale$1$i = $183;$x$1$i = $x$0$i;$y$1$i = $185;
+             break;
+            }
+            $186 = ($d$0$i|0)==(0);
+            $187 = ($gottail$0$i|0)!=(0);
+            $or$cond$i = $187 | $186;
+            if ($or$cond$i) {
+             $gottail$1$i = $gottail$0$i;$scale$1$i = $scale$0$i;$x$1$i = $x$0$i;$y$1$i = $y$0$i;
+            } else {
+             $188 = $scale$0$i * 0.5;
+             $189 = $y$0$i + $188;
+             $gottail$1$i = 1;$scale$1$i = $scale$0$i;$x$1$i = $x$0$i;$y$1$i = $189;
+            }
+           }
+          } while(0);
+          $190 = (_i64Add(($170|0),($168|0),1,0)|0);
+          $191 = tempRet0;
+          $695 = $693;$696 = $694;$697 = $190;$698 = $191;$gotdig$3$i = 1;$gotrad$1$i = $gotrad$0$i;$gottail$2$i = $gottail$1$i;$scale$2$i = $scale$1$i;$x$2$i = $x$1$i;$y$2$i = $y$1$i;
+         }
+         $192 = HEAP32[$0>>2]|0;
+         $193 = HEAP32[$1>>2]|0;
+         $194 = ($192>>>0)<($193>>>0);
+         if ($194) {
+          $195 = ((($192)) + 1|0);
+          HEAP32[$0>>2] = $195;
+          $196 = HEAP8[$192>>0]|0;
+          $197 = $196&255;
+          $168 = $698;$170 = $697;$693 = $695;$694 = $696;$c$2$i = $197;$gotdig$2$i = $gotdig$3$i;$gotrad$0$i = $gotrad$1$i;$gottail$0$i = $gottail$2$i;$scale$0$i = $scale$2$i;$x$0$i = $x$2$i;$y$0$i = $y$2$i;
+          continue;
+         } else {
+          $198 = (___shgetc($f)|0);
+          $168 = $698;$170 = $697;$693 = $695;$694 = $696;$c$2$i = $198;$gotdig$2$i = $gotdig$3$i;$gotrad$0$i = $gotrad$1$i;$gottail$0$i = $gottail$2$i;$scale$0$i = $scale$2$i;$x$0$i = $x$2$i;$y$0$i = $y$2$i;
+          continue;
+         }
+        }
+        $199 = ($gotdig$2$i$lcssa|0)==(0);
+        if ($199) {
+         $200 = HEAP32[$1>>2]|0;
+         $201 = ($200|0)==(0|0);
+         if (!($201)) {
+          $202 = HEAP32[$0>>2]|0;
+          $203 = ((($202)) + -1|0);
+          HEAP32[$0>>2] = $203;
+         }
+         $204 = ($pok|0)==(0);
+         if ($204) {
+          ___shlim($f,0);
+         } else {
+          if (!($201)) {
+           $205 = HEAP32[$0>>2]|0;
+           $206 = ((($205)) + -1|0);
+           HEAP32[$0>>2] = $206;
+           $207 = ($gotrad$0$i$lcssa|0)==(0);
+           if (!($207)) {
+            $208 = ((($205)) + -2|0);
+            HEAP32[$0>>2] = $208;
+           }
+          }
+         }
+         $209 = (+($sign$0|0));
+         $210 = $209 * 0.0;
+         $$0 = $210;
+         break L4;
+        }
+        $211 = ($gotrad$0$i$lcssa|0)==(0);
+        $214 = $211 ? $213 : $212;
+        $217 = $211 ? $216 : $215;
+        $218 = ($216|0)<(0);
+        $219 = ($213>>>0)<(8);
+        $220 = ($216|0)==(0);
+        $221 = $220 & $219;
+        $222 = $218 | $221;
+        if ($222) {
+         $224 = $213;$225 = $216;$x$324$i = $x$0$i$lcssa;
+         while(1) {
+          $223 = $x$324$i << 4;
+          $226 = (_i64Add(($224|0),($225|0),1,0)|0);
+          $227 = tempRet0;
+          $228 = ($227|0)<(0);
+          $229 = ($226>>>0)<(8);
+          $230 = ($227|0)==(0);
+          $231 = $230 & $229;
+          $232 = $228 | $231;
+          if ($232) {
+           $224 = $226;$225 = $227;$x$324$i = $223;
+          } else {
+           $x$3$lcssa$i = $223;
+           break;
+          }
+         }
+        } else {
+         $x$3$lcssa$i = $x$0$i$lcssa;
+        }
+        $233 = $c$2$lcssa$i | 32;
+        $234 = ($233|0)==(112);
+        if ($234) {
+         $235 = (_scanexp($f,$pok)|0);
+         $236 = tempRet0;
+         $237 = ($235|0)==(0);
+         $238 = ($236|0)==(-2147483648);
+         $239 = $237 & $238;
+         if ($239) {
+          $240 = ($pok|0)==(0);
+          if ($240) {
+           ___shlim($f,0);
+           $$0 = 0.0;
+           break L4;
+          }
+          $241 = HEAP32[$1>>2]|0;
+          $242 = ($241|0)==(0|0);
+          if ($242) {
+           $253 = 0;$254 = 0;
+          } else {
+           $243 = HEAP32[$0>>2]|0;
+           $244 = ((($243)) + -1|0);
+           HEAP32[$0>>2] = $244;
+           $253 = 0;$254 = 0;
+          }
+         } else {
+          $253 = $235;$254 = $236;
+         }
+        } else {
+         $245 = HEAP32[$1>>2]|0;
+         $246 = ($245|0)==(0|0);
+         if ($246) {
+          $253 = 0;$254 = 0;
+         } else {
+          $247 = HEAP32[$0>>2]|0;
+          $248 = ((($247)) + -1|0);
+          HEAP32[$0>>2] = $248;
+          $253 = 0;$254 = 0;
+         }
+        }
+        $249 = (_bitshift64Shl(($214|0),($217|0),2)|0);
+        $250 = tempRet0;
+        $251 = (_i64Add(($249|0),($250|0),-32,-1)|0);
+        $252 = tempRet0;
+        $255 = (_i64Add(($251|0),($252|0),($253|0),($254|0))|0);
+        $256 = tempRet0;
+        $257 = ($x$3$lcssa$i|0)==(0);
+        if ($257) {
+         $258 = (+($sign$0|0));
+         $259 = $258 * 0.0;
+         $$0 = $259;
+         break L4;
+        }
+        $260 = (0 - ($emin$0$ph))|0;
+        $261 = ($256|0)>(0);
+        $262 = ($255>>>0)>($260>>>0);
+        $263 = ($256|0)==(0);
+        $264 = $263 & $262;
+        $265 = $261 | $264;
+        if ($265) {
+         $266 = (___errno_location()|0);
+         HEAP32[$266>>2] = 34;
+         $267 = (+($sign$0|0));
+         $268 = $267 * 1.7976931348623157E+308;
+         $269 = $268 * 1.7976931348623157E+308;
+         $$0 = $269;
+         break L4;
+        }
+        $270 = (($emin$0$ph) + -106)|0;
+        $271 = ($270|0)<(0);
+        $272 = $271 << 31 >> 31;
+        $273 = ($256|0)<($272|0);
+        $274 = ($255>>>0)<($270>>>0);
+        $275 = ($256|0)==($272|0);
+        $276 = $275 & $274;
+        $277 = $273 | $276;
+        if ($277) {
+         $279 = (___errno_location()|0);
+         HEAP32[$279>>2] = 34;
+         $280 = (+($sign$0|0));
+         $281 = $280 * 2.2250738585072014E-308;
+         $282 = $281 * 2.2250738585072014E-308;
+         $$0 = $282;
+         break L4;
+        }
+        $278 = ($x$3$lcssa$i|0)>(-1);
+        if ($278) {
+         $288 = $255;$289 = $256;$x$419$i = $x$3$lcssa$i;$y$320$i = $y$0$i$lcssa;
+         while(1) {
+          $283 = !($y$320$i >= 0.5);
+          $284 = $x$419$i << 1;
+          $285 = $y$320$i + -1.0;
+          $286 = $283&1;
+          $287 = $286 | $284;
+          $x$5$i = $287 ^ 1;
+          $$pn$i = $283 ? $y$320$i : $285;
+          $y$4$i = $y$320$i + $$pn$i;
+          $290 = (_i64Add(($288|0),($289|0),-1,-1)|0);
+          $291 = tempRet0;
+          $292 = ($287|0)>(-1);
+          if ($292) {
+           $288 = $290;$289 = $291;$x$419$i = $x$5$i;$y$320$i = $y$4$i;
+          } else {
+           $297 = $290;$298 = $291;$x$4$lcssa$i = $x$5$i;$y$3$lcssa$i = $y$4$i;
+           break;
+          }
+         }
+        } else {
+         $297 = $255;$298 = $256;$x$4$lcssa$i = $x$3$lcssa$i;$y$3$lcssa$i = $y$0$i$lcssa;
+        }
+        $293 = ($emin$0$ph|0)<(0);
+        $294 = $293 << 31 >> 31;
+        $295 = (_i64Subtract(32,0,($emin$0$ph|0),($294|0))|0);
+        $296 = tempRet0;
+        $299 = (_i64Add(($297|0),($298|0),($295|0),($296|0))|0);
+        $300 = tempRet0;
+        $301 = (0)>($300|0);
+        $302 = ($bits$0$ph>>>0)>($299>>>0);
+        $303 = (0)==($300|0);
+        $304 = $303 & $302;
+        $305 = $301 | $304;
+        if ($305) {
+         $306 = ($299|0)<(0);
+         if ($306) {
+          $$0710$i = 0;
+          label = 127;
+         } else {
+          $$07$i = $299;
+          label = 125;
+         }
+        } else {
+         $$07$i = $bits$0$ph;
+         label = 125;
+        }
+        if ((label|0) == 125) {
+         $307 = ($$07$i|0)<(53);
+         if ($307) {
+          $$0710$i = $$07$i;
+          label = 127;
+         } else {
+          $$pre42$i = (+($sign$0|0));
+          $$0711$i = $$07$i;$$pre$phi43$iZ2D = $$pre42$i;$bias$0$i = 0.0;
+         }
+        }
+        if ((label|0) == 127) {
+         $308 = (84 - ($$0710$i))|0;
+         $309 = (+_scalbn(1.0,$308));
+         $310 = (+($sign$0|0));
+         $311 = (+_copysignl($309,$310));
+         $$0711$i = $$0710$i;$$pre$phi43$iZ2D = $310;$bias$0$i = $311;
+        }
+        $312 = ($$0711$i|0)<(32);
+        $313 = $y$3$lcssa$i != 0.0;
+        $or$cond4$i = $313 & $312;
+        $314 = $x$4$lcssa$i & 1;
+        $315 = ($314|0)==(0);
+        $or$cond9$i = $315 & $or$cond4$i;
+        $316 = $or$cond9$i&1;
+        $x$6$i = (($316) + ($x$4$lcssa$i))|0;
+        $y$5$i = $or$cond9$i ? 0.0 : $y$3$lcssa$i;
+        $317 = (+($x$6$i>>>0));
+        $318 = $$pre$phi43$iZ2D * $317;
+        $319 = $bias$0$i + $318;
+        $320 = $$pre$phi43$iZ2D * $y$5$i;
+        $321 = $320 + $319;
+        $322 = $321 - $bias$0$i;
+        $323 = $322 != 0.0;
+        if (!($323)) {
+         $324 = (___errno_location()|0);
+         HEAP32[$324>>2] = 34;
+        }
+        $325 = (+_scalbnl($322,$297));
+        $$0 = $325;
+        break L4;
+       } else {
+        $c$6 = $c$5;
+       }
+      } while(0);
+      $sum$i = (($emin$0$ph) + ($bits$0$ph))|0;
+      $330 = (0 - ($sum$i))|0;
+      $$010$i = $c$6;$gotdig$0$i12 = 0;
+      L184: while(1) {
+       switch ($$010$i|0) {
+       case 46:  {
+        $gotdig$0$i12$lcssa275 = $gotdig$0$i12;
+        label = 138;
+        break L184;
+        break;
+       }
+       case 48:  {
+        break;
+       }
+       default: {
+        $$2$i = $$010$i;$699 = 0;$700 = 0;$gotdig$2$i13 = $gotdig$0$i12;$gotrad$0$i14 = 0;
+        break L184;
+       }
+       }
+       $331 = HEAP32[$0>>2]|0;
+       $332 = HEAP32[$1>>2]|0;
+       $333 = ($331>>>0)<($332>>>0);
+       if ($333) {
+        $334 = ((($331)) + 1|0);
+        HEAP32[$0>>2] = $334;
+        $335 = HEAP8[$331>>0]|0;
+        $336 = $335&255;
+        $$010$i = $336;$gotdig$0$i12 = 1;
+        continue;
+       } else {
+        $337 = (___shgetc($f)|0);
+        $$010$i = $337;$gotdig$0$i12 = 1;
+        continue;
+       }
+      }
+      if ((label|0) == 138) {
+       $338 = HEAP32[$0>>2]|0;
+       $339 = HEAP32[$1>>2]|0;
+       $340 = ($338>>>0)<($339>>>0);
+       if ($340) {
+        $341 = ((($338)) + 1|0);
+        HEAP32[$0>>2] = $341;
+        $342 = HEAP8[$338>>0]|0;
+        $343 = $342&255;
+        $$111$ph$i = $343;
+       } else {
+        $344 = (___shgetc($f)|0);
+        $$111$ph$i = $344;
+       }
+       $345 = ($$111$ph$i|0)==(48);
+       if ($345) {
+        $346 = 0;$347 = 0;
+        while(1) {
+         $348 = (_i64Add(($346|0),($347|0),-1,-1)|0);
+         $349 = tempRet0;
+         $350 = HEAP32[$0>>2]|0;
+         $351 = HEAP32[$1>>2]|0;
+         $352 = ($350>>>0)<($351>>>0);
+         if ($352) {
+          $353 = ((($350)) + 1|0);
+          HEAP32[$0>>2] = $353;
+          $354 = HEAP8[$350>>0]|0;
+          $355 = $354&255;
+          $$111$be$i = $355;
+         } else {
+          $356 = (___shgetc($f)|0);
+          $$111$be$i = $356;
+         }
+         $357 = ($$111$be$i|0)==(48);
+         if ($357) {
+          $346 = $348;$347 = $349;
+         } else {
+          $$2$i = $$111$be$i;$699 = $348;$700 = $349;$gotdig$2$i13 = 1;$gotrad$0$i14 = 1;
+          break;
+         }
+        }
+       } else {
+        $$2$i = $$111$ph$i;$699 = 0;$700 = 0;$gotdig$2$i13 = $gotdig$0$i12$lcssa275;$gotrad$0$i14 = 1;
+       }
+      }
+      HEAP32[$x$i>>2] = 0;
+      $358 = (($$2$i) + -48)|0;
+      $359 = ($358>>>0)<(10);
+      $360 = ($$2$i|0)==(46);
+      $361 = $360 | $359;
+      L203: do {
+       if ($361) {
+        $362 = ((($x$i)) + 496|0);
+        $$3112$i = $$2$i;$365 = 0;$366 = 0;$701 = $360;$702 = $358;$703 = $699;$704 = $700;$gotdig$3108$i = $gotdig$2$i13;$gotrad$1109$i = $gotrad$0$i14;$j$0111$i = 0;$k$0110$i = 0;$lnz$0107$i = 0;
+        L205: while(1) {
+         do {
+          if ($701) {
+           $cond$i = ($gotrad$1109$i|0)==(0);
+           if ($cond$i) {
+            $705 = $365;$706 = $366;$707 = $365;$708 = $366;$gotdig$4$i = $gotdig$3108$i;$gotrad$2$i = 1;$j$2$i = $j$0111$i;$k$2$i = $k$0110$i;$lnz$2$i = $lnz$0107$i;
+           } else {
+            $709 = $703;$710 = $704;$711 = $365;$712 = $366;$gotdig$3108$i$lcssa = $gotdig$3108$i;$j$0111$i$lcssa = $j$0111$i;$k$0110$i$lcssa = $k$0110$i;$lnz$0107$i$lcssa = $lnz$0107$i;
+            break L205;
+           }
+          } else {
+           $364 = ($k$0110$i|0)<(125);
+           $367 = (_i64Add(($365|0),($366|0),1,0)|0);
+           $368 = tempRet0;
+           $369 = ($$3112$i|0)!=(48);
+           if (!($364)) {
+            if (!($369)) {
+             $705 = $703;$706 = $704;$707 = $367;$708 = $368;$gotdig$4$i = $gotdig$3108$i;$gotrad$2$i = $gotrad$1109$i;$j$2$i = $j$0111$i;$k$2$i = $k$0110$i;$lnz$2$i = $lnz$0107$i;
+             break;
+            }
+            $379 = HEAP32[$362>>2]|0;
+            $380 = $379 | 1;
+            HEAP32[$362>>2] = $380;
+            $705 = $703;$706 = $704;$707 = $367;$708 = $368;$gotdig$4$i = $gotdig$3108$i;$gotrad$2$i = $gotrad$1109$i;$j$2$i = $j$0111$i;$k$2$i = $k$0110$i;$lnz$2$i = $lnz$0107$i;
+            break;
+           }
+           $$lnz$0$i = $369 ? $367 : $lnz$0107$i;
+           $370 = ($j$0111$i|0)==(0);
+           $371 = (($x$i) + ($k$0110$i<<2)|0);
+           if ($370) {
+            $storemerge$i = $702;
+           } else {
+            $372 = HEAP32[$371>>2]|0;
+            $373 = ($372*10)|0;
+            $374 = (($$3112$i) + -48)|0;
+            $375 = (($374) + ($373))|0;
+            $storemerge$i = $375;
+           }
+           HEAP32[$371>>2] = $storemerge$i;
+           $376 = (($j$0111$i) + 1)|0;
+           $377 = ($376|0)==(9);
+           $378 = $377&1;
+           $$k$0$i = (($378) + ($k$0110$i))|0;
+           $$16$i = $377 ? 0 : $376;
+           $705 = $703;$706 = $704;$707 = $367;$708 = $368;$gotdig$4$i = 1;$gotrad$2$i = $gotrad$1109$i;$j$2$i = $$16$i;$k$2$i = $$k$0$i;$lnz$2$i = $$lnz$0$i;
+          }
+         } while(0);
+         $381 = HEAP32[$0>>2]|0;
+         $382 = HEAP32[$1>>2]|0;
+         $383 = ($381>>>0)<($382>>>0);
+         if ($383) {
+          $384 = ((($381)) + 1|0);
+          HEAP32[$0>>2] = $384;
+          $385 = HEAP8[$381>>0]|0;
+          $386 = $385&255;
+          $$3$be$i = $386;
+         } else {
+          $387 = (___shgetc($f)|0);
+          $$3$be$i = $387;
+         }
+         $388 = (($$3$be$i) + -48)|0;
+         $389 = ($388>>>0)<(10);
+         $390 = ($$3$be$i|0)==(46);
+         $391 = $390 | $389;
+         if ($391) {
+          $$3112$i = $$3$be$i;$365 = $707;$366 = $708;$701 = $390;$702 = $388;$703 = $705;$704 = $706;$gotdig$3108$i = $gotdig$4$i;$gotrad$1109$i = $gotrad$2$i;$j$0111$i = $j$2$i;$k$0110$i = $k$2$i;$lnz$0107$i = $lnz$2$i;
+         } else {
+          $$3$lcssa$i = $$3$be$i;$393 = $705;$394 = $707;$396 = $706;$397 = $708;$gotdig$3$lcssa$i = $gotdig$4$i;$gotrad$1$lcssa$i = $gotrad$2$i;$j$0$lcssa$i = $j$2$i;$k$0$lcssa$i = $k$2$i;$lnz$0$lcssa$i = $lnz$2$i;
+          label = 161;
+          break L203;
+         }
+        }
+        $363 = ($gotdig$3108$i$lcssa|0)!=(0);
+        $713 = $711;$714 = $712;$715 = $709;$716 = $710;$717 = $363;$j$077$i = $j$0111$i$lcssa;$k$073$i = $k$0110$i$lcssa;$lnz$067$i = $lnz$0107$i$lcssa;
+        label = 169;
+       } else {
+        $$3$lcssa$i = $$2$i;$393 = $699;$394 = 0;$396 = $700;$397 = 0;$gotdig$3$lcssa$i = $gotdig$2$i13;$gotrad$1$lcssa$i = $gotrad$0$i14;$j$0$lcssa$i = 0;$k$0$lcssa$i = 0;$lnz$0$lcssa$i = 0;
+        label = 161;
+       }
+      } while(0);
+      do {
+       if ((label|0) == 161) {
+        $392 = ($gotrad$1$lcssa$i|0)==(0);
+        $395 = $392 ? $394 : $393;
+        $398 = $392 ? $397 : $396;
+        $399 = ($gotdig$3$lcssa$i|0)!=(0);
+        $400 = $$3$lcssa$i | 32;
+        $401 = ($400|0)==(101);
+        $or$cond18$i = $401 & $399;
+        if (!($or$cond18$i)) {
+         $416 = ($$3$lcssa$i|0)>(-1);
+         if ($416) {
+          $713 = $394;$714 = $397;$715 = $395;$716 = $398;$717 = $399;$j$077$i = $j$0$lcssa$i;$k$073$i = $k$0$lcssa$i;$lnz$067$i = $lnz$0$lcssa$i;
+          label = 169;
+          break;
+         } else {
+          $718 = $394;$719 = $397;$720 = $399;$721 = $395;$722 = $398;$j$076$i = $j$0$lcssa$i;$k$072$i = $k$0$lcssa$i;$lnz$066$i = $lnz$0$lcssa$i;
+          label = 171;
+          break;
+         }
+        }
+        $402 = (_scanexp($f,$pok)|0);
+        $403 = tempRet0;
+        $404 = ($402|0)==(0);
+        $405 = ($403|0)==(-2147483648);
+        $406 = $404 & $405;
+        if ($406) {
+         $407 = ($pok|0)==(0);
+         if ($407) {
+          ___shlim($f,0);
+          $$1$i = 0.0;
+          break;
+         }
+         $408 = HEAP32[$1>>2]|0;
+         $409 = ($408|0)==(0|0);
+         if ($409) {
+          $412 = 0;$413 = 0;
+         } else {
+          $410 = HEAP32[$0>>2]|0;
+          $411 = ((($410)) + -1|0);
+          HEAP32[$0>>2] = $411;
+          $412 = 0;$413 = 0;
+         }
+        } else {
+         $412 = $402;$413 = $403;
+        }
+        $414 = (_i64Add(($412|0),($413|0),($395|0),($398|0))|0);
+        $415 = tempRet0;
+        $426 = $414;$428 = $394;$429 = $415;$431 = $397;$j$075$i = $j$0$lcssa$i;$k$071$i = $k$0$lcssa$i;$lnz$065$i = $lnz$0$lcssa$i;
+        label = 173;
+       }
+      } while(0);
+      if ((label|0) == 169) {
+       $417 = HEAP32[$1>>2]|0;
+       $418 = ($417|0)==(0|0);
+       if ($418) {
+        $718 = $713;$719 = $714;$720 = $717;$721 = $715;$722 = $716;$j$076$i = $j$077$i;$k$072$i = $k$073$i;$lnz$066$i = $lnz$067$i;
+        label = 171;
+       } else {
+        $419 = HEAP32[$0>>2]|0;
+        $420 = ((($419)) + -1|0);
+        HEAP32[$0>>2] = $420;
+        if ($717) {
+         $426 = $715;$428 = $713;$429 = $716;$431 = $714;$j$075$i = $j$077$i;$k$071$i = $k$073$i;$lnz$065$i = $lnz$067$i;
+         label = 173;
+        } else {
+         label = 172;
+        }
+       }
+      }
+      if ((label|0) == 171) {
+       if ($720) {
+        $426 = $721;$428 = $718;$429 = $722;$431 = $719;$j$075$i = $j$076$i;$k$071$i = $k$072$i;$lnz$065$i = $lnz$066$i;
+        label = 173;
+       } else {
+        label = 172;
+       }
+      }
+      do {
+       if ((label|0) == 172) {
+        $421 = (___errno_location()|0);
+        HEAP32[$421>>2] = 22;
+        ___shlim($f,0);
+        $$1$i = 0.0;
+       }
+       else if ((label|0) == 173) {
+        $422 = HEAP32[$x$i>>2]|0;
+        $423 = ($422|0)==(0);
+        if ($423) {
+         $424 = (+($sign$0|0));
+         $425 = $424 * 0.0;
+         $$1$i = $425;
+         break;
+        }
+        $427 = ($426|0)==($428|0);
+        $430 = ($429|0)==($431|0);
+        $432 = $427 & $430;
+        $433 = ($431|0)<(0);
+        $434 = ($428>>>0)<(10);
+        $435 = ($431|0)==(0);
+        $436 = $435 & $434;
+        $437 = $433 | $436;
+        $or$cond$i16 = $437 & $432;
+        if ($or$cond$i16) {
+         $438 = ($bits$0$ph>>>0)>(30);
+         $439 = $422 >>> $bits$0$ph;
+         $440 = ($439|0)==(0);
+         $or$cond20$i = $438 | $440;
+         if ($or$cond20$i) {
+          $441 = (+($sign$0|0));
+          $442 = (+($422>>>0));
+          $443 = $441 * $442;
+          $$1$i = $443;
+          break;
+         }
+        }
+        $444 = (($emin$0$ph|0) / -2)&-1;
+        $445 = ($444|0)<(0);
+        $446 = $445 << 31 >> 31;
+        $447 = ($429|0)>($446|0);
+        $448 = ($426>>>0)>($444>>>0);
+        $449 = ($429|0)==($446|0);
+        $450 = $449 & $448;
+        $451 = $447 | $450;
+        if ($451) {
+         $452 = (___errno_location()|0);
+         HEAP32[$452>>2] = 34;
+         $453 = (+($sign$0|0));
+         $454 = $453 * 1.7976931348623157E+308;
+         $455 = $454 * 1.7976931348623157E+308;
+         $$1$i = $455;
+         break;
+        }
+        $456 = (($emin$0$ph) + -106)|0;
+        $457 = ($456|0)<(0);
+        $458 = $457 << 31 >> 31;
+        $459 = ($429|0)<($458|0);
+        $460 = ($426>>>0)<($456>>>0);
+        $461 = ($429|0)==($458|0);
+        $462 = $461 & $460;
+        $463 = $459 | $462;
+        if ($463) {
+         $464 = (___errno_location()|0);
+         HEAP32[$464>>2] = 34;
+         $465 = (+($sign$0|0));
+         $466 = $465 * 2.2250738585072014E-308;
+         $467 = $466 * 2.2250738585072014E-308;
+         $$1$i = $467;
+         break;
+        }
+        $468 = ($j$075$i|0)==(0);
+        if ($468) {
+         $k$3$i = $k$071$i;
+        } else {
+         $469 = ($j$075$i|0)<(9);
+         if ($469) {
+          $470 = (($x$i) + ($k$071$i<<2)|0);
+          $$promoted$i = HEAP32[$470>>2]|0;
+          $472 = $$promoted$i;$j$3102$i = $j$075$i;
+          while(1) {
+           $471 = ($472*10)|0;
+           $473 = (($j$3102$i) + 1)|0;
+           $exitcond151$i = ($473|0)==(9);
+           if ($exitcond151$i) {
+            $$lcssa267 = $471;
+            break;
+           } else {
+            $472 = $471;$j$3102$i = $473;
+           }
+          }
+          HEAP32[$470>>2] = $$lcssa267;
+         }
+         $474 = (($k$071$i) + 1)|0;
+         $k$3$i = $474;
+        }
+        $475 = ($lnz$065$i|0)<(9);
+        if ($475) {
+         $476 = ($lnz$065$i|0)<=($426|0);
+         $477 = ($426|0)<(18);
+         $or$cond3$i = $476 & $477;
+         if ($or$cond3$i) {
+          $478 = ($426|0)==(9);
+          if ($478) {
+           $479 = (+($sign$0|0));
+           $480 = HEAP32[$x$i>>2]|0;
+           $481 = (+($480>>>0));
+           $482 = $479 * $481;
+           $$1$i = $482;
+           break;
+          }
+          $483 = ($426|0)<(9);
+          if ($483) {
+           $484 = (+($sign$0|0));
+           $485 = HEAP32[$x$i>>2]|0;
+           $486 = (+($485>>>0));
+           $487 = $484 * $486;
+           $488 = (8 - ($426))|0;
+           $489 = (3012 + ($488<<2)|0);
+           $490 = HEAP32[$489>>2]|0;
+           $491 = (+($490|0));
+           $492 = $487 / $491;
+           $$1$i = $492;
+           break;
+          }
+          $$neg$i = Math_imul($426, -3)|0;
+          $$neg40$i = (($bits$0$ph) + 27)|0;
+          $493 = (($$neg40$i) + ($$neg$i))|0;
+          $494 = ($493|0)>(30);
+          $$pre$i17 = HEAP32[$x$i>>2]|0;
+          $495 = $$pre$i17 >>> $493;
+          $496 = ($495|0)==(0);
+          $or$cond192$i = $494 | $496;
+          if ($or$cond192$i) {
+           $497 = (+($sign$0|0));
+           $498 = (+($$pre$i17>>>0));
+           $499 = $497 * $498;
+           $500 = (($426) + -10)|0;
+           $501 = (3012 + ($500<<2)|0);
+           $502 = HEAP32[$501>>2]|0;
+           $503 = (+($502|0));
+           $504 = $499 * $503;
+           $$1$i = $504;
+           break;
+          }
+         }
+        }
+        $505 = (($426|0) % 9)&-1;
+        $506 = ($505|0)==(0);
+        if ($506) {
+         $a$2$ph46$i = 0;$e2$0$ph$i = 0;$rp$2$ph44$i = $426;$z$1$ph45$i = $k$3$i;
+        } else {
+         $507 = ($426|0)>(-1);
+         $508 = (($505) + 9)|0;
+         $509 = $507 ? $505 : $508;
+         $510 = (8 - ($509))|0;
+         $511 = (3012 + ($510<<2)|0);
+         $512 = HEAP32[$511>>2]|0;
+         $513 = ($k$3$i|0)==(0);
+         if ($513) {
+          $a$0$lcssa161$i = 0;$rp$0$lcssa162$i = $426;$z$0$i = 0;
+         } else {
+          $514 = (1000000000 / ($512|0))&-1;
+          $a$093$i = 0;$carry$095$i = 0;$k$494$i = 0;$rp$092$i = $426;
+          while(1) {
+           $515 = (($x$i) + ($k$494$i<<2)|0);
+           $516 = HEAP32[$515>>2]|0;
+           $517 = (($516>>>0) % ($512>>>0))&-1;
+           $518 = (($516>>>0) / ($512>>>0))&-1;
+           $519 = (($518) + ($carry$095$i))|0;
+           HEAP32[$515>>2] = $519;
+           $520 = Math_imul($517, $514)|0;
+           $521 = ($k$494$i|0)==($a$093$i|0);
+           $522 = ($519|0)==(0);
+           $or$cond21$i = $521 & $522;
+           $523 = (($k$494$i) + 1)|0;
+           $524 = $523 & 127;
+           $525 = (($rp$092$i) + -9)|0;
+           $rp$1$i18 = $or$cond21$i ? $525 : $rp$092$i;
+           $a$1$i = $or$cond21$i ? $524 : $a$093$i;
+           $526 = ($523|0)==($k$3$i|0);
+           if ($526) {
+            $$lcssa266 = $520;$a$1$i$lcssa = $a$1$i;$rp$1$i18$lcssa = $rp$1$i18;
+            break;
+           } else {
+            $a$093$i = $a$1$i;$carry$095$i = $520;$k$494$i = $523;$rp$092$i = $rp$1$i18;
+           }
+          }
+          $527 = ($$lcssa266|0)==(0);
+          if ($527) {
+           $a$0$lcssa161$i = $a$1$i$lcssa;$rp$0$lcssa162$i = $rp$1$i18$lcssa;$z$0$i = $k$3$i;
+          } else {
+           $528 = (($k$3$i) + 1)|0;
+           $529 = (($x$i) + ($k$3$i<<2)|0);
+           HEAP32[$529>>2] = $$lcssa266;
+           $a$0$lcssa161$i = $a$1$i$lcssa;$rp$0$lcssa162$i = $rp$1$i18$lcssa;$z$0$i = $528;
+          }
+         }
+         $530 = (9 - ($509))|0;
+         $531 = (($530) + ($rp$0$lcssa162$i))|0;
+         $a$2$ph46$i = $a$0$lcssa161$i;$e2$0$ph$i = 0;$rp$2$ph44$i = $531;$z$1$ph45$i = $z$0$i;
+        }
+        L284: while(1) {
+         $532 = ($rp$2$ph44$i|0)<(18);
+         $533 = ($rp$2$ph44$i|0)==(18);
+         $534 = (($x$i) + ($a$2$ph46$i<<2)|0);
+         $e2$0$i19 = $e2$0$ph$i;$z$1$i = $z$1$ph45$i;
+         while(1) {
+          if (!($532)) {
+           if (!($533)) {
+            $a$4$ph$i = $a$2$ph46$i;$e2$1$ph$i = $e2$0$i19;$rp$4$ph42$i = $rp$2$ph44$i;$z$6$ph$i = $z$1$i;
+            break L284;
+           }
+           $535 = HEAP32[$534>>2]|0;
+           $536 = ($535>>>0)<(9007199);
+           if (!($536)) {
+            $a$4$ph$i = $a$2$ph46$i;$e2$1$ph$i = $e2$0$i19;$rp$4$ph42$i = 18;$z$6$ph$i = $z$1$i;
+            break L284;
+           }
+          }
+          $537 = (($z$1$i) + 127)|0;
+          $carry1$0$i = 0;$k$5$in$i = $537;$z$2$i = $z$1$i;
+          while(1) {
+           $k$5$i = $k$5$in$i & 127;
+           $538 = (($x$i) + ($k$5$i<<2)|0);
+           $539 = HEAP32[$538>>2]|0;
+           $540 = (_bitshift64Shl(($539|0),0,29)|0);
+           $541 = tempRet0;
+           $542 = (_i64Add(($540|0),($541|0),($carry1$0$i|0),0)|0);
+           $543 = tempRet0;
+           $544 = ($543>>>0)>(0);
+           $545 = ($542>>>0)>(1000000000);
+           $546 = ($543|0)==(0);
+           $547 = $546 & $545;
+           $548 = $544 | $547;
+           if ($548) {
+            $549 = (___udivdi3(($542|0),($543|0),1000000000,0)|0);
+            $550 = tempRet0;
+            $551 = (___uremdi3(($542|0),($543|0),1000000000,0)|0);
+            $552 = tempRet0;
+            $$sink$off0$i = $551;$carry1$1$i = $549;
+           } else {
+            $$sink$off0$i = $542;$carry1$1$i = 0;
+           }
+           HEAP32[$538>>2] = $$sink$off0$i;
+           $553 = (($z$2$i) + 127)|0;
+           $554 = $553 & 127;
+           $555 = ($k$5$i|0)!=($554|0);
+           $556 = ($k$5$i|0)==($a$2$ph46$i|0);
+           $or$cond22$i = $555 | $556;
+           $557 = ($$sink$off0$i|0)==(0);
+           $k$5$z$2$i = $557 ? $k$5$i : $z$2$i;
+           $z$3$i = $or$cond22$i ? $z$2$i : $k$5$z$2$i;
+           $558 = (($k$5$i) + -1)|0;
+           if ($556) {
+            $carry1$1$i$lcssa = $carry1$1$i;$z$3$i$lcssa = $z$3$i;
+            break;
+           } else {
+            $carry1$0$i = $carry1$1$i;$k$5$in$i = $558;$z$2$i = $z$3$i;
+           }
+          }
+          $559 = (($e2$0$i19) + -29)|0;
+          $560 = ($carry1$1$i$lcssa|0)==(0);
+          if ($560) {
+           $e2$0$i19 = $559;$z$1$i = $z$3$i$lcssa;
+          } else {
+           $$lcssa265 = $559;$carry1$1$i$lcssa$lcssa = $carry1$1$i$lcssa;$z$3$i$lcssa$lcssa = $z$3$i$lcssa;
+           break;
+          }
+         }
+         $561 = (($rp$2$ph44$i) + 9)|0;
+         $562 = (($a$2$ph46$i) + 127)|0;
+         $563 = $562 & 127;
+         $564 = ($563|0)==($z$3$i$lcssa$lcssa|0);
+         if ($564) {
+          $565 = (($z$3$i$lcssa$lcssa) + 127)|0;
+          $566 = $565 & 127;
+          $567 = (($x$i) + ($566<<2)|0);
+          $568 = HEAP32[$567>>2]|0;
+          $569 = (($z$3$i$lcssa$lcssa) + 126)|0;
+          $570 = $569 & 127;
+          $571 = (($x$i) + ($570<<2)|0);
+          $572 = HEAP32[$571>>2]|0;
+          $573 = $572 | $568;
+          HEAP32[$571>>2] = $573;
+          $z$4$i = $566;
+         } else {
+          $z$4$i = $z$3$i$lcssa$lcssa;
+         }
+         $574 = (($x$i) + ($563<<2)|0);
+         HEAP32[$574>>2] = $carry1$1$i$lcssa$lcssa;
+         $a$2$ph46$i = $563;$e2$0$ph$i = $$lcssa265;$rp$2$ph44$i = $561;$z$1$ph45$i = $z$4$i;
+        }
+        L302: while(1) {
+         $605 = (($z$6$ph$i) + 1)|0;
+         $602 = $605 & 127;
+         $606 = (($z$6$ph$i) + 127)|0;
+         $607 = $606 & 127;
+         $608 = (($x$i) + ($607<<2)|0);
+         $a$4$ph167$i = $a$4$ph$i;$e2$1$ph166$i = $e2$1$ph$i;$rp$4$ph$i = $rp$4$ph42$i;
+         while(1) {
+          $609 = ($rp$4$ph$i|0)==(18);
+          $610 = ($rp$4$ph$i|0)>(27);
+          $$24$i = $610 ? 9 : 1;
+          $$not$i = $609 ^ 1;
+          $a$4$i = $a$4$ph167$i;$e2$1$i = $e2$1$ph166$i;
+          while(1) {
+           $575 = $a$4$i & 127;
+           $576 = ($575|0)==($z$6$ph$i|0);
+           do {
+            if ($576) {
+             label = 219;
+            } else {
+             $577 = (($x$i) + ($575<<2)|0);
+             $578 = HEAP32[$577>>2]|0;
+             $579 = ($578>>>0)<(9007199);
+             if ($579) {
+              label = 219;
+              break;
+             }
+             $580 = ($578>>>0)>(9007199);
+             if ($580) {
+              break;
+             }
+             $581 = (($a$4$i) + 1)|0;
+             $582 = $581 & 127;
+             $583 = ($582|0)==($z$6$ph$i|0);
+             if ($583) {
+              label = 219;
+              break;
+             }
+             $689 = (($x$i) + ($582<<2)|0);
+             $690 = HEAP32[$689>>2]|0;
+             $691 = ($690>>>0)<(254740991);
+             if ($691) {
+              label = 219;
+              break;
+             }
+             $692 = ($690>>>0)>(254740991);
+             $brmerge$i28 = $692 | $$not$i;
+             if (!($brmerge$i28)) {
+              $616 = $575;$a$4$i251 = $a$4$i;$e2$1$i248 = $e2$1$i;$z$10$i = $z$6$ph$i;
+              break L302;
+             }
+            }
+           } while(0);
+           if ((label|0) == 219) {
+            label = 0;
+            if ($609) {
+             label = 220;
+             break L302;
+            }
+           }
+           $584 = (($e2$1$i) + ($$24$i))|0;
+           $585 = ($a$4$i|0)==($z$6$ph$i|0);
+           if ($585) {
+            $a$4$i = $z$6$ph$i;$e2$1$i = $584;
+           } else {
+            $$lcssa258 = $584;$a$4$i$lcssa250 = $a$4$i;
+            break;
+           }
+          }
+          $586 = 1 << $$24$i;
+          $587 = (($586) + -1)|0;
+          $588 = 1000000000 >>> $$24$i;
+          $a$586$i = $a$4$i$lcssa250;$carry4$089$i = 0;$k$687$i = $a$4$i$lcssa250;$rp$585$i = $rp$4$ph$i;
+          while(1) {
+           $589 = (($x$i) + ($k$687$i<<2)|0);
+           $590 = HEAP32[$589>>2]|0;
+           $591 = $590 & $587;
+           $592 = $590 >>> $$24$i;
+           $593 = (($592) + ($carry4$089$i))|0;
+           HEAP32[$589>>2] = $593;
+           $594 = Math_imul($591, $588)|0;
+           $595 = ($k$687$i|0)==($a$586$i|0);
+           $596 = ($593|0)==(0);
+           $or$cond25$i = $595 & $596;
+           $597 = (($k$687$i) + 1)|0;
+           $598 = $597 & 127;
+           $599 = (($rp$585$i) + -9)|0;
+           $rp$6$i = $or$cond25$i ? $599 : $rp$585$i;
+           $a$6$i = $or$cond25$i ? $598 : $a$586$i;
+           $600 = ($598|0)==($z$6$ph$i|0);
+           if ($600) {
+            $$lcssa259 = $594;$a$6$i$lcssa = $a$6$i;$rp$6$i$lcssa = $rp$6$i;
+            break;
+           } else {
+            $a$586$i = $a$6$i;$carry4$089$i = $594;$k$687$i = $598;$rp$585$i = $rp$6$i;
+           }
+          }
+          $601 = ($$lcssa259|0)==(0);
+          if ($601) {
+           $a$4$ph167$i = $a$6$i$lcssa;$e2$1$ph166$i = $$lcssa258;$rp$4$ph$i = $rp$6$i$lcssa;
+           continue;
+          }
+          $603 = ($602|0)==($a$6$i$lcssa|0);
+          if (!($603)) {
+           $$lcssa258$lcssa = $$lcssa258;$$lcssa259$lcssa = $$lcssa259;$a$6$i$lcssa$lcssa = $a$6$i$lcssa;$rp$6$i$lcssa$lcssa = $rp$6$i$lcssa;
+           break;
+          }
+          $611 = HEAP32[$608>>2]|0;
+          $612 = $611 | 1;
+          HEAP32[$608>>2] = $612;
+          $a$4$ph167$i = $a$6$i$lcssa;$e2$1$ph166$i = $$lcssa258;$rp$4$ph$i = $rp$6$i$lcssa;
+         }
+         $604 = (($x$i) + ($z$6$ph$i<<2)|0);
+         HEAP32[$604>>2] = $$lcssa259$lcssa;
+         $a$4$ph$i = $a$6$i$lcssa$lcssa;$e2$1$ph$i = $$lcssa258$lcssa;$rp$4$ph42$i = $rp$6$i$lcssa$lcssa;$z$6$ph$i = $602;
+        }
+        if ((label|0) == 220) {
+         if ($576) {
+          $613 = (($602) + -1)|0;
+          $614 = (($x$i) + ($613<<2)|0);
+          HEAP32[$614>>2] = 0;
+          $616 = $z$6$ph$i;$a$4$i251 = $a$4$i;$e2$1$i248 = $e2$1$i;$z$10$i = $602;
+         } else {
+          $616 = $575;$a$4$i251 = $a$4$i;$e2$1$i248 = $e2$1$i;$z$10$i = $z$6$ph$i;
+         }
+        }
+        $615 = (($x$i) + ($616<<2)|0);
+        $617 = HEAP32[$615>>2]|0;
+        $618 = (+($617>>>0));
+        $619 = (($a$4$i251) + 1)|0;
+        $620 = $619 & 127;
+        $621 = ($620|0)==($z$10$i|0);
+        if ($621) {
+         $678 = (($a$4$i251) + 2)|0;
+         $679 = $678 & 127;
+         $680 = (($679) + -1)|0;
+         $681 = (($x$i) + ($680<<2)|0);
+         HEAP32[$681>>2] = 0;
+         $z$10$1$i = $679;
+        } else {
+         $z$10$1$i = $z$10$i;
+        }
+        $682 = $618 * 1.0E+9;
+        $683 = (($x$i) + ($620<<2)|0);
+        $684 = HEAP32[$683>>2]|0;
+        $685 = (+($684>>>0));
+        $686 = $682 + $685;
+        $642 = (+($sign$0|0));
+        $624 = $642 * $686;
+        $662 = (($e2$1$i248) + 53)|0;
+        $668 = (($662) - ($emin$0$ph))|0;
+        $669 = ($668|0)<($bits$0$ph|0);
+        $687 = ($668|0)<(0);
+        $$$i = $687 ? 0 : $668;
+        $denormal$0$i = $669&1;
+        $$012$i = $669 ? $$$i : $bits$0$ph;
+        $688 = ($$012$i|0)<(53);
+        if ($688) {
+         $622 = (105 - ($$012$i))|0;
+         $623 = (+_scalbn(1.0,$622));
+         $625 = (+_copysignl($623,$624));
+         $626 = (53 - ($$012$i))|0;
+         $627 = (+_scalbn(1.0,$626));
+         $628 = (+_fmodl($624,$627));
+         $629 = $624 - $628;
+         $630 = $625 + $629;
+         $bias$0$i25 = $625;$frac$0$i = $628;$y$1$i24 = $630;
+        } else {
+         $bias$0$i25 = 0.0;$frac$0$i = 0.0;$y$1$i24 = $624;
+        }
+        $631 = (($a$4$i251) + 2)|0;
+        $632 = $631 & 127;
+        $633 = ($632|0)==($z$10$1$i|0);
+        do {
+         if ($633) {
+          $frac$3$i = $frac$0$i;
+         } else {
+          $634 = (($x$i) + ($632<<2)|0);
+          $635 = HEAP32[$634>>2]|0;
+          $636 = ($635>>>0)<(500000000);
+          do {
+           if ($636) {
+            $637 = ($635|0)==(0);
+            if ($637) {
+             $638 = (($a$4$i251) + 3)|0;
+             $639 = $638 & 127;
+             $640 = ($639|0)==($z$10$1$i|0);
+             if ($640) {
+              $frac$1$i = $frac$0$i;
+              break;
+             }
+            }
+            $641 = $642 * 0.25;
+            $643 = $641 + $frac$0$i;
+            $frac$1$i = $643;
+           } else {
+            $644 = ($635>>>0)>(500000000);
+            if ($644) {
+             $645 = $642 * 0.75;
+             $646 = $645 + $frac$0$i;
+             $frac$1$i = $646;
+             break;
+            }
+            $647 = (($a$4$i251) + 3)|0;
+            $648 = $647 & 127;
+            $649 = ($648|0)==($z$10$1$i|0);
+            if ($649) {
+             $650 = $642 * 0.5;
+             $651 = $650 + $frac$0$i;
+             $frac$1$i = $651;
+             break;
+            } else {
+             $652 = $642 * 0.75;
+             $653 = $652 + $frac$0$i;
+             $frac$1$i = $653;
+             break;
+            }
+           }
+          } while(0);
+          $654 = (53 - ($$012$i))|0;
+          $655 = ($654|0)>(1);
+          if (!($655)) {
+           $frac$3$i = $frac$1$i;
+           break;
+          }
+          $656 = (+_fmodl($frac$1$i,1.0));
+          $657 = $656 != 0.0;
+          if ($657) {
+           $frac$3$i = $frac$1$i;
+           break;
+          }
+          $658 = $frac$1$i + 1.0;
+          $frac$3$i = $658;
+         }
+        } while(0);
+        $659 = $y$1$i24 + $frac$3$i;
+        $660 = $659 - $bias$0$i25;
+        $661 = $662 & 2147483647;
+        $663 = (-2 - ($sum$i))|0;
+        $664 = ($661|0)>($663|0);
+        do {
+         if ($664) {
+          $665 = (+Math_abs((+$660)));
+          $666 = !($665 >= 9007199254740992.0);
+          if ($666) {
+           $denormal$2$i = $denormal$0$i;$e2$3$i = $e2$1$i248;$y$2$i26 = $660;
+          } else {
+           $667 = ($$012$i|0)==($668|0);
+           $or$cond26$i = $669 & $667;
+           $denormal$1$i = $or$cond26$i ? 0 : $denormal$0$i;
+           $670 = $660 * 0.5;
+           $671 = (($e2$1$i248) + 1)|0;
+           $denormal$2$i = $denormal$1$i;$e2$3$i = $671;$y$2$i26 = $670;
+          }
+          $672 = (($e2$3$i) + 50)|0;
+          $673 = ($672|0)>($330|0);
+          if (!($673)) {
+           $674 = ($denormal$2$i|0)!=(0);
+           $675 = $frac$3$i != 0.0;
+           $or$cond9$i27 = $675 & $674;
+           if (!($or$cond9$i27)) {
+            $e2$4$i = $e2$3$i;$y$3$i = $y$2$i26;
+            break;
+           }
+          }
+          $676 = (___errno_location()|0);
+          HEAP32[$676>>2] = 34;
+          $e2$4$i = $e2$3$i;$y$3$i = $y$2$i26;
+         } else {
+          $e2$4$i = $e2$1$i248;$y$3$i = $660;
+         }
+        } while(0);
+        $677 = (+_scalbnl($y$3$i,$e2$4$i));
+        $$1$i = $677;
+       }
+      } while(0);
+      $$0 = $$1$i;
+      break L4;
+      break;
+     }
+     default: {
+      $109 = HEAP32[$1>>2]|0;
+      $110 = ($109|0)==(0|0);
+      if (!($110)) {
+       $111 = HEAP32[$0>>2]|0;
+       $112 = ((($111)) + -1|0);
+       HEAP32[$0>>2] = $112;
+      }
+      $113 = (___errno_location()|0);
+      HEAP32[$113>>2] = 22;
+      ___shlim($f,0);
+      $$0 = 0.0;
+      break L4;
+     }
+     }
+    }
+    }
+   } while(0);
+   if ((label|0) == 23) {
+    $41 = HEAP32[$1>>2]|0;
+    $42 = ($41|0)==(0|0);
+    if (!($42)) {
+     $43 = HEAP32[$0>>2]|0;
+     $44 = ((($43)) + -1|0);
+     HEAP32[$0>>2] = $44;
+    }
+    $45 = ($pok|0)!=(0);
+    $46 = ($i$0$lcssa>>>0)>(3);
+    $or$cond9 = $45 & $46;
+    if ($or$cond9) {
+     $i$1 = $i$0$lcssa;
+     while(1) {
+      if (!($42)) {
+       $47 = HEAP32[$0>>2]|0;
+       $48 = ((($47)) + -1|0);
+       HEAP32[$0>>2] = $48;
+      }
+      $49 = (($i$1) + -1)|0;
+      $$old8 = ($49>>>0)>(3);
+      if ($$old8) {
+       $i$1 = $49;
+      } else {
+       break;
+      }
+     }
+    }
+   }
+   $50 = (+($sign$0|0));
+   $51 = $50 * inf;
+   $52 = $51;
+   $$0 = $52;
+  }
+ } while(0);
+ STACKTOP = sp;return (+$$0);
+}
+function _scanexp($f,$pok) {
+ $f = $f|0;
+ $pok = $pok|0;
+ var $$lcssa22 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
+ var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0;
+ var $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0;
+ var $99 = 0, $c$0 = 0, $c$1$be = 0, $c$1$be$lcssa = 0, $c$112 = 0, $c$2$be = 0, $c$2$lcssa = 0, $c$27 = 0, $c$3$be = 0, $neg$0 = 0, $or$cond3 = 0, $x$013 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ((($f)) + 4|0);
+ $1 = HEAP32[$0>>2]|0;
+ $2 = ((($f)) + 100|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($1>>>0)<($3>>>0);
+ if ($4) {
+  $5 = ((($1)) + 1|0);
+  HEAP32[$0>>2] = $5;
+  $6 = HEAP8[$1>>0]|0;
+  $7 = $6&255;
+  $9 = $7;
+ } else {
+  $8 = (___shgetc($f)|0);
+  $9 = $8;
+ }
+ $10 = ($9|0)==(45);
+ switch ($9|0) {
+ case 43: case 45:  {
+  $11 = $10&1;
+  $12 = HEAP32[$0>>2]|0;
+  $13 = HEAP32[$2>>2]|0;
+  $14 = ($12>>>0)<($13>>>0);
+  if ($14) {
+   $15 = ((($12)) + 1|0);
+   HEAP32[$0>>2] = $15;
+   $16 = HEAP8[$12>>0]|0;
+   $17 = $16&255;
+   $20 = $17;
+  } else {
+   $18 = (___shgetc($f)|0);
+   $20 = $18;
+  }
+  $19 = (($20) + -48)|0;
+  $21 = ($19>>>0)>(9);
+  $22 = ($pok|0)!=(0);
+  $or$cond3 = $22 & $21;
+  if ($or$cond3) {
+   $23 = HEAP32[$2>>2]|0;
+   $24 = ($23|0)==(0|0);
+   if ($24) {
+    $c$0 = $20;$neg$0 = $11;
+   } else {
+    $25 = HEAP32[$0>>2]|0;
+    $26 = ((($25)) + -1|0);
+    HEAP32[$0>>2] = $26;
+    $c$0 = $20;$neg$0 = $11;
+   }
+  } else {
+   $c$0 = $20;$neg$0 = $11;
+  }
+  break;
+ }
+ default: {
+  $c$0 = $9;$neg$0 = 0;
+ }
+ }
+ $27 = (($c$0) + -48)|0;
+ $28 = ($27>>>0)>(9);
+ if ($28) {
+  $29 = HEAP32[$2>>2]|0;
+  $30 = ($29|0)==(0|0);
+  if ($30) {
+   $98 = -2147483648;$99 = 0;
+  } else {
+   $31 = HEAP32[$0>>2]|0;
+   $32 = ((($31)) + -1|0);
+   HEAP32[$0>>2] = $32;
+   $98 = -2147483648;$99 = 0;
+  }
+ } else {
+  $c$112 = $c$0;$x$013 = 0;
+  while(1) {
+   $33 = ($x$013*10)|0;
+   $34 = (($c$112) + -48)|0;
+   $35 = (($34) + ($33))|0;
+   $36 = HEAP32[$0>>2]|0;
+   $37 = HEAP32[$2>>2]|0;
+   $38 = ($36>>>0)<($37>>>0);
+   if ($38) {
+    $39 = ((($36)) + 1|0);
+    HEAP32[$0>>2] = $39;
+    $40 = HEAP8[$36>>0]|0;
+    $41 = $40&255;
+    $c$1$be = $41;
+   } else {
+    $42 = (___shgetc($f)|0);
+    $c$1$be = $42;
+   }
+   $43 = (($c$1$be) + -48)|0;
+   $44 = ($43>>>0)<(10);
+   $45 = ($35|0)<(214748364);
+   $46 = $44 & $45;
+   if ($46) {
+    $c$112 = $c$1$be;$x$013 = $35;
+   } else {
+    $$lcssa22 = $35;$c$1$be$lcssa = $c$1$be;
+    break;
+   }
+  }
+  $47 = ($$lcssa22|0)<(0);
+  $48 = $47 << 31 >> 31;
+  $49 = (($c$1$be$lcssa) + -48)|0;
+  $50 = ($49>>>0)<(10);
+  if ($50) {
+   $53 = $$lcssa22;$54 = $48;$c$27 = $c$1$be$lcssa;
+   while(1) {
+    $55 = (___muldi3(($53|0),($54|0),10,0)|0);
+    $56 = tempRet0;
+    $57 = ($c$27|0)<(0);
+    $58 = $57 << 31 >> 31;
+    $59 = (_i64Add(($c$27|0),($58|0),-48,-1)|0);
+    $60 = tempRet0;
+    $61 = (_i64Add(($59|0),($60|0),($55|0),($56|0))|0);
+    $62 = tempRet0;
+    $63 = HEAP32[$0>>2]|0;
+    $64 = HEAP32[$2>>2]|0;
+    $65 = ($63>>>0)<($64>>>0);
+    if ($65) {
+     $66 = ((($63)) + 1|0);
+     HEAP32[$0>>2] = $66;
+     $67 = HEAP8[$63>>0]|0;
+     $68 = $67&255;
+     $c$2$be = $68;
+    } else {
+     $69 = (___shgetc($f)|0);
+     $c$2$be = $69;
+    }
+    $70 = (($c$2$be) + -48)|0;
+    $71 = ($70>>>0)<(10);
+    $72 = ($62|0)<(21474836);
+    $73 = ($61>>>0)<(2061584302);
+    $74 = ($62|0)==(21474836);
+    $75 = $74 & $73;
+    $76 = $72 | $75;
+    $77 = $71 & $76;
+    if ($77) {
+     $53 = $61;$54 = $62;$c$27 = $c$2$be;
+    } else {
+     $92 = $61;$93 = $62;$c$2$lcssa = $c$2$be;
+     break;
+    }
+   }
+  } else {
+   $92 = $$lcssa22;$93 = $48;$c$2$lcssa = $c$1$be$lcssa;
+  }
+  $51 = (($c$2$lcssa) + -48)|0;
+  $52 = ($51>>>0)<(10);
+  if ($52) {
+   while(1) {
+    $78 = HEAP32[$0>>2]|0;
+    $79 = HEAP32[$2>>2]|0;
+    $80 = ($78>>>0)<($79>>>0);
+    if ($80) {
+     $81 = ((($78)) + 1|0);
+     HEAP32[$0>>2] = $81;
+     $82 = HEAP8[$78>>0]|0;
+     $83 = $82&255;
+     $c$3$be = $83;
+    } else {
+     $84 = (___shgetc($f)|0);
+     $c$3$be = $84;
+    }
+    $85 = (($c$3$be) + -48)|0;
+    $86 = ($85>>>0)<(10);
+    if (!($86)) {
+     break;
+    }
+   }
+  }
+  $87 = HEAP32[$2>>2]|0;
+  $88 = ($87|0)==(0|0);
+  if (!($88)) {
+   $89 = HEAP32[$0>>2]|0;
+   $90 = ((($89)) + -1|0);
+   HEAP32[$0>>2] = $90;
+  }
+  $91 = ($neg$0|0)!=(0);
+  $94 = (_i64Subtract(0,0,($92|0),($93|0))|0);
+  $95 = tempRet0;
+  $96 = $91 ? $94 : $92;
+  $97 = $91 ? $95 : $93;
+  $98 = $97;$99 = $96;
+ }
+ tempRet0 = ($98);
+ return ($99|0);
+}
+function _scalbn($x,$n) {
+ $x = +$x;
+ $n = $n|0;
+ var $$ = 0, $$0 = 0, $$1 = 0, $0 = 0, $1 = 0.0, $10 = 0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0;
+ var $8 = 0.0, $9 = 0, $y$0 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ($n|0)>(1023);
+ if ($0) {
+  $1 = $x * 8.9884656743115795E+307;
+  $2 = (($n) + -1023)|0;
+  $3 = ($2|0)>(1023);
+  if ($3) {
+   $4 = $1 * 8.9884656743115795E+307;
+   $5 = (($n) + -2046)|0;
+   $6 = ($5|0)>(1023);
+   $$ = $6 ? 1023 : $5;
+   $$0 = $$;$y$0 = $4;
+  } else {
+   $$0 = $2;$y$0 = $1;
+  }
+ } else {
+  $7 = ($n|0)<(-1022);
+  if ($7) {
+   $8 = $x * 2.2250738585072014E-308;
+   $9 = (($n) + 1022)|0;
+   $10 = ($9|0)<(-1022);
+   if ($10) {
+    $11 = $8 * 2.2250738585072014E-308;
+    $12 = (($n) + 2044)|0;
+    $13 = ($12|0)<(-1022);
+    $$1 = $13 ? -1022 : $12;
+    $$0 = $$1;$y$0 = $11;
+   } else {
+    $$0 = $9;$y$0 = $8;
+   }
+  } else {
+   $$0 = $n;$y$0 = $x;
+  }
+ }
+ $14 = (($$0) + 1023)|0;
+ $15 = (_bitshift64Shl(($14|0),0,52)|0);
+ $16 = tempRet0;
+ HEAP32[tempDoublePtr>>2] = $15;HEAP32[tempDoublePtr+4>>2] = $16;$17 = +HEAPF64[tempDoublePtr>>3];
+ $18 = $y$0 * $17;
+ return (+$18);
+}
+function _copysignl($x,$y) {
+ $x = +$x;
+ $y = +$y;
+ var $0 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = (+_copysign($x,$y));
+ return (+$0);
+}
+function _scalbnl($x,$n) {
+ $x = +$x;
+ $n = $n|0;
+ var $0 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = (+_scalbn($x,$n));
+ return (+$0);
+}
+function _fmodl($x,$y) {
+ $x = +$x;
+ $y = +$y;
+ var $0 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = (+_fmod($x,$y));
+ return (+$0);
+}
+function _fmod($x,$y) {
+ $x = +$x;
+ $y = +$y;
+ var $$0 = 0.0, $$lcssa7 = 0, $$x = 0.0, $0 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0;
+ var $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0.0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0;
+ var $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0;
+ var $15 = 0, $150 = 0, $151 = 0, $152 = 0.0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0.0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0;
+ var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0;
+ var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0;
+ var $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0;
+ var $99 = 0, $ex$0$lcssa = 0, $ex$026 = 0, $ex$1 = 0, $ex$2$lcssa = 0, $ex$212 = 0, $ex$3$lcssa = 0, $ex$39 = 0, $ey$0$lcssa = 0, $ey$020 = 0, $ey$1$ph = 0, $fabs = 0.0, $or$cond = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ HEAPF64[tempDoublePtr>>3] = $x;$0 = HEAP32[tempDoublePtr>>2]|0;
+ $1 = HEAP32[tempDoublePtr+4>>2]|0;
+ HEAPF64[tempDoublePtr>>3] = $y;$2 = HEAP32[tempDoublePtr>>2]|0;
+ $3 = HEAP32[tempDoublePtr+4>>2]|0;
+ $4 = (_bitshift64Lshr(($0|0),($1|0),52)|0);
+ $5 = tempRet0;
+ $6 = $4 & 2047;
+ $7 = (_bitshift64Lshr(($2|0),($3|0),52)|0);
+ $8 = tempRet0;
+ $9 = $7 & 2047;
+ $10 = $1 & -2147483648;
+ $11 = (_bitshift64Shl(($2|0),($3|0),1)|0);
+ $12 = tempRet0;
+ $13 = ($11|0)==(0);
+ $14 = ($12|0)==(0);
+ $15 = $13 & $14;
+ L1: do {
+  if ($15) {
+   label = 3;
+  } else {
+   $fabs = (+Math_abs((+$y)));
+   HEAPF64[tempDoublePtr>>3] = $fabs;$16 = HEAP32[tempDoublePtr>>2]|0;
+   $17 = HEAP32[tempDoublePtr+4>>2]|0;
+   $18 = ($17>>>0)>(2146435072);
+   $19 = ($16>>>0)>(0);
+   $20 = ($17|0)==(2146435072);
+   $21 = $20 & $19;
+   $22 = $18 | $21;
+   $23 = ($6|0)==(2047);
+   $or$cond = $22 | $23;
+   if ($or$cond) {
+    label = 3;
+   } else {
+    $26 = (_bitshift64Shl(($0|0),($1|0),1)|0);
+    $27 = tempRet0;
+    $28 = ($27>>>0)>($12>>>0);
+    $29 = ($26>>>0)>($11>>>0);
+    $30 = ($27|0)==($12|0);
+    $31 = $30 & $29;
+    $32 = $28 | $31;
+    if (!($32)) {
+     $33 = ($26|0)==($11|0);
+     $34 = ($27|0)==($12|0);
+     $35 = $33 & $34;
+     $36 = $x * 0.0;
+     $$x = $35 ? $36 : $x;
+     return (+$$x);
+    }
+    $37 = ($6|0)==(0);
+    if ($37) {
+     $38 = (_bitshift64Shl(($0|0),($1|0),12)|0);
+     $39 = tempRet0;
+     $40 = ($39|0)>(-1);
+     $41 = ($38>>>0)>(4294967295);
+     $42 = ($39|0)==(-1);
+     $43 = $42 & $41;
+     $44 = $40 | $43;
+     if ($44) {
+      $46 = $38;$47 = $39;$ex$026 = 0;
+      while(1) {
+       $45 = (($ex$026) + -1)|0;
+       $48 = (_bitshift64Shl(($46|0),($47|0),1)|0);
+       $49 = tempRet0;
+       $50 = ($49|0)>(-1);
+       $51 = ($48>>>0)>(4294967295);
+       $52 = ($49|0)==(-1);
+       $53 = $52 & $51;
+       $54 = $50 | $53;
+       if ($54) {
+        $46 = $48;$47 = $49;$ex$026 = $45;
+       } else {
+        $ex$0$lcssa = $45;
+        break;
+       }
+      }
+     } else {
+      $ex$0$lcssa = 0;
+     }
+     $55 = (1 - ($ex$0$lcssa))|0;
+     $56 = (_bitshift64Shl(($0|0),($1|0),($55|0))|0);
+     $57 = tempRet0;
+     $84 = $56;$85 = $57;$ex$1 = $ex$0$lcssa;
+    } else {
+     $58 = $1 & 1048575;
+     $59 = $58 | 1048576;
+     $84 = $0;$85 = $59;$ex$1 = $6;
+    }
+    $60 = ($9|0)==(0);
+    if ($60) {
+     $61 = (_bitshift64Shl(($2|0),($3|0),12)|0);
+     $62 = tempRet0;
+     $63 = ($62|0)>(-1);
+     $64 = ($61>>>0)>(4294967295);
+     $65 = ($62|0)==(-1);
+     $66 = $65 & $64;
+     $67 = $63 | $66;
+     if ($67) {
+      $69 = $61;$70 = $62;$ey$020 = 0;
+      while(1) {
+       $68 = (($ey$020) + -1)|0;
+       $71 = (_bitshift64Shl(($69|0),($70|0),1)|0);
+       $72 = tempRet0;
+       $73 = ($72|0)>(-1);
+       $74 = ($71>>>0)>(4294967295);
+       $75 = ($72|0)==(-1);
+       $76 = $75 & $74;
+       $77 = $73 | $76;
+       if ($77) {
+        $69 = $71;$70 = $72;$ey$020 = $68;
+       } else {
+        $ey$0$lcssa = $68;
+        break;
+       }
+      }
+     } else {
+      $ey$0$lcssa = 0;
+     }
+     $78 = (1 - ($ey$0$lcssa))|0;
+     $79 = (_bitshift64Shl(($2|0),($3|0),($78|0))|0);
+     $80 = tempRet0;
+     $86 = $79;$87 = $80;$ey$1$ph = $ey$0$lcssa;
+    } else {
+     $81 = $3 & 1048575;
+     $82 = $81 | 1048576;
+     $86 = $2;$87 = $82;$ey$1$ph = $9;
+    }
+    $83 = ($ex$1|0)>($ey$1$ph|0);
+    $88 = (_i64Subtract(($84|0),($85|0),($86|0),($87|0))|0);
+    $89 = tempRet0;
+    $90 = ($89|0)>(-1);
+    $91 = ($88>>>0)>(4294967295);
+    $92 = ($89|0)==(-1);
+    $93 = $92 & $91;
+    $94 = $90 | $93;
+    L23: do {
+     if ($83) {
+      $153 = $94;$154 = $88;$155 = $89;$95 = $84;$97 = $85;$ex$212 = $ex$1;
+      while(1) {
+       if ($153) {
+        $96 = ($95|0)==($86|0);
+        $98 = ($97|0)==($87|0);
+        $99 = $96 & $98;
+        if ($99) {
+         break;
+        } else {
+         $101 = $154;$102 = $155;
+        }
+       } else {
+        $101 = $95;$102 = $97;
+       }
+       $103 = (_bitshift64Shl(($101|0),($102|0),1)|0);
+       $104 = tempRet0;
+       $105 = (($ex$212) + -1)|0;
+       $106 = ($105|0)>($ey$1$ph|0);
+       $107 = (_i64Subtract(($103|0),($104|0),($86|0),($87|0))|0);
+       $108 = tempRet0;
+       $109 = ($108|0)>(-1);
+       $110 = ($107>>>0)>(4294967295);
+       $111 = ($108|0)==(-1);
+       $112 = $111 & $110;
+       $113 = $109 | $112;
+       if ($106) {
+        $153 = $113;$154 = $107;$155 = $108;$95 = $103;$97 = $104;$ex$212 = $105;
+       } else {
+        $$lcssa7 = $113;$114 = $103;$116 = $104;$156 = $107;$157 = $108;$ex$2$lcssa = $105;
+        break L23;
+       }
+      }
+      $100 = $x * 0.0;
+      $$0 = $100;
+      break L1;
+     } else {
+      $$lcssa7 = $94;$114 = $84;$116 = $85;$156 = $88;$157 = $89;$ex$2$lcssa = $ex$1;
+     }
+    } while(0);
+    if ($$lcssa7) {
+     $115 = ($114|0)==($86|0);
+     $117 = ($116|0)==($87|0);
+     $118 = $115 & $117;
+     if ($118) {
+      $126 = $x * 0.0;
+      $$0 = $126;
+      break;
+     } else {
+      $119 = $157;$121 = $156;
+     }
+    } else {
+     $119 = $116;$121 = $114;
+    }
+    $120 = ($119>>>0)<(1048576);
+    $122 = ($121>>>0)<(0);
+    $123 = ($119|0)==(1048576);
+    $124 = $123 & $122;
+    $125 = $120 | $124;
+    if ($125) {
+     $127 = $121;$128 = $119;$ex$39 = $ex$2$lcssa;
+     while(1) {
+      $129 = (_bitshift64Shl(($127|0),($128|0),1)|0);
+      $130 = tempRet0;
+      $131 = (($ex$39) + -1)|0;
+      $132 = ($130>>>0)<(1048576);
+      $133 = ($129>>>0)<(0);
+      $134 = ($130|0)==(1048576);
+      $135 = $134 & $133;
+      $136 = $132 | $135;
+      if ($136) {
+       $127 = $129;$128 = $130;$ex$39 = $131;
+      } else {
+       $138 = $129;$139 = $130;$ex$3$lcssa = $131;
+       break;
+      }
+     }
+    } else {
+     $138 = $121;$139 = $119;$ex$3$lcssa = $ex$2$lcssa;
+    }
+    $137 = ($ex$3$lcssa|0)>(0);
+    if ($137) {
+     $140 = (_i64Add(($138|0),($139|0),0,-1048576)|0);
+     $141 = tempRet0;
+     $142 = (_bitshift64Shl(($ex$3$lcssa|0),0,52)|0);
+     $143 = tempRet0;
+     $144 = $140 | $142;
+     $145 = $141 | $143;
+     $150 = $145;$151 = $144;
+    } else {
+     $146 = (1 - ($ex$3$lcssa))|0;
+     $147 = (_bitshift64Lshr(($138|0),($139|0),($146|0))|0);
+     $148 = tempRet0;
+     $150 = $148;$151 = $147;
+    }
+    $149 = $150 | $10;
+    HEAP32[tempDoublePtr>>2] = $151;HEAP32[tempDoublePtr+4>>2] = $149;$152 = +HEAPF64[tempDoublePtr>>3];
+    $$0 = $152;
+   }
+  }
+ } while(0);
+ if ((label|0) == 3) {
+  $24 = $x * $y;
+  $25 = $24 / $24;
+  $$0 = $25;
+ }
+ return (+$$0);
+}
+function _strlen($s) {
+ $s = $s|0;
+ var $$0 = 0, $$01$lcssa = 0, $$014 = 0, $$1$lcssa = 0, $$lcssa20 = 0, $$pn = 0, $$pn15 = 0, $$pre = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0;
+ var $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $w$0 = 0, $w$0$lcssa = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = $s;
+ $1 = $0 & 3;
+ $2 = ($1|0)==(0);
+ L1: do {
+  if ($2) {
+   $$01$lcssa = $s;
+   label = 4;
+  } else {
+   $$014 = $s;$21 = $0;
+   while(1) {
+    $3 = HEAP8[$$014>>0]|0;
+    $4 = ($3<<24>>24)==(0);
+    if ($4) {
+     $$pn = $21;
+     break L1;
+    }
+    $5 = ((($$014)) + 1|0);
+    $6 = $5;
+    $7 = $6 & 3;
+    $8 = ($7|0)==(0);
+    if ($8) {
+     $$01$lcssa = $5;
+     label = 4;
+     break;
+    } else {
+     $$014 = $5;$21 = $6;
+    }
+   }
+  }
+ } while(0);
+ if ((label|0) == 4) {
+  $w$0 = $$01$lcssa;
+  while(1) {
+   $9 = HEAP32[$w$0>>2]|0;
+   $10 = (($9) + -16843009)|0;
+   $11 = $9 & -2139062144;
+   $12 = $11 ^ -2139062144;
+   $13 = $12 & $10;
+   $14 = ($13|0)==(0);
+   $15 = ((($w$0)) + 4|0);
+   if ($14) {
+    $w$0 = $15;
+   } else {
+    $$lcssa20 = $9;$w$0$lcssa = $w$0;
+    break;
+   }
+  }
+  $16 = $$lcssa20&255;
+  $17 = ($16<<24>>24)==(0);
+  if ($17) {
+   $$1$lcssa = $w$0$lcssa;
+  } else {
+   $$pn15 = $w$0$lcssa;
+   while(1) {
+    $18 = ((($$pn15)) + 1|0);
+    $$pre = HEAP8[$18>>0]|0;
+    $19 = ($$pre<<24>>24)==(0);
+    if ($19) {
+     $$1$lcssa = $18;
+     break;
+    } else {
+     $$pn15 = $18;
+    }
+   }
+  }
+  $20 = $$1$lcssa;
+  $$pn = $20;
+ }
+ $$0 = (($$pn) - ($0))|0;
+ return ($$0|0);
+}
+function _snprintf($s,$n,$fmt,$varargs) {
+ $s = $s|0;
+ $n = $n|0;
+ $fmt = $fmt|0;
+ $varargs = $varargs|0;
+ var $0 = 0, $ap = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $ap = sp;
+ HEAP32[$ap>>2] = $varargs;
+ $0 = (_vsnprintf($s,$n,$fmt,$ap)|0);
+ STACKTOP = sp;return ($0|0);
+}
+function _fmodf($x,$y) {
+ $x = +$x;
+ $y = +$y;
+ var $$0 = 0.0, $$lcssa = 0, $$lcssa6 = 0, $$x = 0.0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0;
+ var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0;
+ var $41 = 0, $42 = 0.0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0;
+ var $6 = 0, $60 = 0, $61 = 0.0, $62 = 0, $63 = 0, $7 = 0, $8 = 0, $9 = 0, $ex$0$lcssa = 0, $ex$025 = 0, $ex$1 = 0, $ex$2$lcssa = 0, $ex$211 = 0, $ex$3$lcssa = 0, $ex$38 = 0, $ey$0$lcssa = 0, $ey$019 = 0, $ey$1$ph = 0, $fabs = 0.0, $i$026 = 0;
+ var $i$120 = 0, $or$cond = 0, $uxi$0 = 0, $uxi$1$lcssa = 0, $uxi$112 = 0, $uxi$2 = 0, $uxi$3$lcssa = 0, $uxi$3$ph = 0, $uxi$39 = 0, $uxi$4 = 0, $uy$sroa$0$0$ph = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = (HEAPF32[tempDoublePtr>>2]=$x,HEAP32[tempDoublePtr>>2]|0);
+ $1 = (HEAPF32[tempDoublePtr>>2]=$y,HEAP32[tempDoublePtr>>2]|0);
+ $2 = $0 >>> 23;
+ $3 = $2 & 255;
+ $4 = $1 >>> 23;
+ $5 = $4 & 255;
+ $6 = $0 & -2147483648;
+ $7 = $1 << 1;
+ $8 = ($7|0)==(0);
+ L1: do {
+  if ($8) {
+   label = 3;
+  } else {
+   $fabs = (+Math_abs((+$y)));
+   $9 = (HEAPF32[tempDoublePtr>>2]=$fabs,HEAP32[tempDoublePtr>>2]|0);
+   $10 = ($9>>>0)>(2139095040);
+   $11 = ($3|0)==(255);
+   $or$cond = $10 | $11;
+   if ($or$cond) {
+    label = 3;
+   } else {
+    $14 = $0 << 1;
+    $15 = ($14>>>0)>($7>>>0);
+    if (!($15)) {
+     $16 = ($14|0)==($7|0);
+     $17 = $x * 0.0;
+     $$x = $16 ? $17 : $x;
+     return (+$$x);
+    }
+    $18 = ($3|0)==(0);
+    if ($18) {
+     $19 = $0 << 9;
+     $20 = ($19|0)>(-1);
+     if ($20) {
+      $ex$025 = 0;$i$026 = $19;
+      while(1) {
+       $21 = (($ex$025) + -1)|0;
+       $22 = $i$026 << 1;
+       $23 = ($22|0)>(-1);
+       if ($23) {
+        $ex$025 = $21;$i$026 = $22;
+       } else {
+        $ex$0$lcssa = $21;
+        break;
+       }
+      }
+     } else {
+      $ex$0$lcssa = 0;
+     }
+     $24 = (1 - ($ex$0$lcssa))|0;
+     $25 = $0 << $24;
+     $ex$1 = $ex$0$lcssa;$uxi$0 = $25;
+    } else {
+     $26 = $0 & 8388607;
+     $27 = $26 | 8388608;
+     $ex$1 = $3;$uxi$0 = $27;
+    }
+    $28 = ($5|0)==(0);
+    if ($28) {
+     $29 = $1 << 9;
+     $30 = ($29|0)>(-1);
+     if ($30) {
+      $ey$019 = 0;$i$120 = $29;
+      while(1) {
+       $31 = (($ey$019) + -1)|0;
+       $32 = $i$120 << 1;
+       $33 = ($32|0)>(-1);
+       if ($33) {
+        $ey$019 = $31;$i$120 = $32;
+       } else {
+        $ey$0$lcssa = $31;
+        break;
+       }
+      }
+     } else {
+      $ey$0$lcssa = 0;
+     }
+     $34 = (1 - ($ey$0$lcssa))|0;
+     $35 = $1 << $34;
+     $ey$1$ph = $ey$0$lcssa;$uy$sroa$0$0$ph = $35;
+    } else {
+     $36 = $1 & 8388607;
+     $37 = $36 | 8388608;
+     $ey$1$ph = $5;$uy$sroa$0$0$ph = $37;
+    }
+    $38 = ($ex$1|0)>($ey$1$ph|0);
+    $39 = (($uxi$0) - ($uy$sroa$0$0$ph))|0;
+    $40 = ($39|0)>(-1);
+    L23: do {
+     if ($38) {
+      $62 = $40;$63 = $39;$ex$211 = $ex$1;$uxi$112 = $uxi$0;
+      while(1) {
+       if ($62) {
+        $41 = ($uxi$112|0)==($uy$sroa$0$0$ph|0);
+        if ($41) {
+         break;
+        } else {
+         $uxi$2 = $63;
+        }
+       } else {
+        $uxi$2 = $uxi$112;
+       }
+       $43 = $uxi$2 << 1;
+       $44 = (($ex$211) + -1)|0;
+       $45 = ($44|0)>($ey$1$ph|0);
+       $46 = (($43) - ($uy$sroa$0$0$ph))|0;
+       $47 = ($46|0)>(-1);
+       if ($45) {
+        $62 = $47;$63 = $46;$ex$211 = $44;$uxi$112 = $43;
+       } else {
+        $$lcssa = $46;$$lcssa6 = $47;$ex$2$lcssa = $44;$uxi$1$lcssa = $43;
+        break L23;
+       }
+      }
+      $42 = $x * 0.0;
+      $$0 = $42;
+      break L1;
+     } else {
+      $$lcssa = $39;$$lcssa6 = $40;$ex$2$lcssa = $ex$1;$uxi$1$lcssa = $uxi$0;
+     }
+    } while(0);
+    if ($$lcssa6) {
+     $48 = ($uxi$1$lcssa|0)==($uy$sroa$0$0$ph|0);
+     if ($48) {
+      $50 = $x * 0.0;
+      $$0 = $50;
+      break;
+     } else {
+      $uxi$3$ph = $$lcssa;
+     }
+    } else {
+     $uxi$3$ph = $uxi$1$lcssa;
+    }
+    $49 = ($uxi$3$ph>>>0)<(8388608);
+    if ($49) {
+     $ex$38 = $ex$2$lcssa;$uxi$39 = $uxi$3$ph;
+     while(1) {
+      $51 = $uxi$39 << 1;
+      $52 = (($ex$38) + -1)|0;
+      $53 = ($51>>>0)<(8388608);
+      if ($53) {
+       $ex$38 = $52;$uxi$39 = $51;
+      } else {
+       $ex$3$lcssa = $52;$uxi$3$lcssa = $51;
+       break;
+      }
+     }
+    } else {
+     $ex$3$lcssa = $ex$2$lcssa;$uxi$3$lcssa = $uxi$3$ph;
+    }
+    $54 = ($ex$3$lcssa|0)>(0);
+    if ($54) {
+     $55 = (($uxi$3$lcssa) + -8388608)|0;
+     $56 = $ex$3$lcssa << 23;
+     $57 = $55 | $56;
+     $uxi$4 = $57;
+    } else {
+     $58 = (1 - ($ex$3$lcssa))|0;
+     $59 = $uxi$3$lcssa >>> $58;
+     $uxi$4 = $59;
+    }
+    $60 = $uxi$4 | $6;
+    $61 = (HEAP32[tempDoublePtr>>2]=$60,+HEAPF32[tempDoublePtr>>2]);
+    $$0 = $61;
+   }
+  }
+ } while(0);
+ if ((label|0) == 3) {
+  $12 = $x * $y;
+  $13 = $12 / $12;
+  $$0 = $13;
+ }
+ return (+$$0);
+}
+function _strchr($s,$c) {
+ $s = $s|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = (___strchrnul($s,$c)|0);
+ $1 = HEAP8[$0>>0]|0;
+ $2 = $c&255;
+ $3 = ($1<<24>>24)==($2<<24>>24);
+ $4 = $3 ? $0 : 0;
+ return ($4|0);
+}
+function ___strchrnul($s,$c) {
+ $s = $s|0;
+ $c = $c|0;
+ var $$0 = 0, $$02$lcssa = 0, $$0211 = 0, $$1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0;
+ var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond5 = 0, $w$0$lcssa = 0, $w$08 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = $c & 255;
+ $1 = ($0|0)==(0);
+ L1: do {
+  if ($1) {
+   $6 = (_strlen($s)|0);
+   $7 = (($s) + ($6)|0);
+   $$0 = $7;
+  } else {
+   $2 = $s;
+   $3 = $2 & 3;
+   $4 = ($3|0)==(0);
+   if ($4) {
+    $$02$lcssa = $s;
+   } else {
+    $5 = $c&255;
+    $$0211 = $s;
+    while(1) {
+     $8 = HEAP8[$$0211>>0]|0;
+     $9 = ($8<<24>>24)==(0);
+     $10 = ($8<<24>>24)==($5<<24>>24);
+     $or$cond = $9 | $10;
+     if ($or$cond) {
+      $$0 = $$0211;
+      break L1;
+     }
+     $11 = ((($$0211)) + 1|0);
+     $12 = $11;
+     $13 = $12 & 3;
+     $14 = ($13|0)==(0);
+     if ($14) {
+      $$02$lcssa = $11;
+      break;
+     } else {
+      $$0211 = $11;
+     }
+    }
+   }
+   $15 = Math_imul($0, 16843009)|0;
+   $16 = HEAP32[$$02$lcssa>>2]|0;
+   $17 = (($16) + -16843009)|0;
+   $18 = $16 & -2139062144;
+   $19 = $18 ^ -2139062144;
+   $20 = $19 & $17;
+   $21 = ($20|0)==(0);
+   L10: do {
+    if ($21) {
+     $23 = $16;$w$08 = $$02$lcssa;
+     while(1) {
+      $22 = $23 ^ $15;
+      $24 = (($22) + -16843009)|0;
+      $25 = $22 & -2139062144;
+      $26 = $25 ^ -2139062144;
+      $27 = $26 & $24;
+      $28 = ($27|0)==(0);
+      if (!($28)) {
+       $w$0$lcssa = $w$08;
+       break L10;
+      }
+      $29 = ((($w$08)) + 4|0);
+      $30 = HEAP32[$29>>2]|0;
+      $31 = (($30) + -16843009)|0;
+      $32 = $30 & -2139062144;
+      $33 = $32 ^ -2139062144;
+      $34 = $33 & $31;
+      $35 = ($34|0)==(0);
+      if ($35) {
+       $23 = $30;$w$08 = $29;
+      } else {
+       $w$0$lcssa = $29;
+       break;
+      }
+     }
+    } else {
+     $w$0$lcssa = $$02$lcssa;
+    }
+   } while(0);
+   $36 = $c&255;
+   $$1 = $w$0$lcssa;
+   while(1) {
+    $37 = HEAP8[$$1>>0]|0;
+    $38 = ($37<<24>>24)==(0);
+    $39 = ($37<<24>>24)==($36<<24>>24);
+    $or$cond5 = $38 | $39;
+    $40 = ((($$1)) + 1|0);
+    if ($or$cond5) {
+     $$0 = $$1;
+     break;
+    } else {
+     $$1 = $40;
+    }
+   }
+  }
+ } while(0);
+ return ($$0|0);
+}
+function _fopen($filename,$mode) {
+ $filename = $filename|0;
+ $mode = $mode|0;
+ var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $memchr = 0, $vararg_buffer = 0, $vararg_buffer3 = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer3 = sp + 16|0;
+ $vararg_buffer = sp;
+ $0 = HEAP8[$mode>>0]|0;
+ $1 = $0 << 24 >> 24;
+ $memchr = (_memchr(72391,$1,4)|0);
+ $2 = ($memchr|0)==(0|0);
+ if ($2) {
+  $3 = (___errno_location()|0);
+  HEAP32[$3>>2] = 22;
+  $$0 = 0;
+ } else {
+  $4 = (___fmodeflags($mode)|0);
+  $5 = $4 | 32768;
+  HEAP32[$vararg_buffer>>2] = $filename;
+  $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+  HEAP32[$vararg_ptr1>>2] = $5;
+  $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+  HEAP32[$vararg_ptr2>>2] = 438;
+  $6 = (___syscall5(5,($vararg_buffer|0))|0);
+  $7 = (___syscall_ret($6)|0);
+  $8 = ($7|0)<(0);
+  if ($8) {
+   $$0 = 0;
+  } else {
+   $9 = (___fdopen($7,$mode)|0);
+   $10 = ($9|0)==(0|0);
+   if ($10) {
+    HEAP32[$vararg_buffer3>>2] = $7;
+    (___syscall6(6,($vararg_buffer3|0))|0);
+    $$0 = 0;
+   } else {
+    $$0 = $9;
+   }
+  }
+ }
+ STACKTOP = sp;return ($$0|0);
+}
+function ___fmodeflags($mode) {
+ $mode = $mode|0;
+ var $$ = 0, $$flags$4 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $flags$0 = 0, $flags$0$ = 0, $flags$2 = 0;
+ var $flags$2$ = 0, $flags$4 = 0, $not$ = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = (_strchr($mode,43)|0);
+ $1 = ($0|0)==(0|0);
+ $2 = HEAP8[$mode>>0]|0;
+ $not$ = ($2<<24>>24)!=(114);
+ $$ = $not$&1;
+ $flags$0 = $1 ? $$ : 2;
+ $3 = (_strchr($mode,120)|0);
+ $4 = ($3|0)==(0|0);
+ $5 = $flags$0 | 128;
+ $flags$0$ = $4 ? $flags$0 : $5;
+ $6 = (_strchr($mode,101)|0);
+ $7 = ($6|0)==(0|0);
+ $8 = $flags$0$ | 524288;
+ $flags$2 = $7 ? $flags$0$ : $8;
+ $9 = ($2<<24>>24)==(114);
+ $10 = $flags$2 | 64;
+ $flags$2$ = $9 ? $flags$2 : $10;
+ $11 = ($2<<24>>24)==(119);
+ $12 = $flags$2$ | 512;
+ $flags$4 = $11 ? $12 : $flags$2$;
+ $13 = ($2<<24>>24)==(97);
+ $14 = $flags$4 | 1024;
+ $$flags$4 = $13 ? $14 : $flags$4;
+ return ($$flags$4|0);
+}
+function ___fdopen($fd,$mode) {
+ $fd = $fd|0;
+ $mode = $mode|0;
+ var $$0 = 0, $$cast = 0, $$pre = 0, $$pre1 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0;
+ var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $memchr = 0, $tio = 0, $vararg_buffer = 0, $vararg_buffer12 = 0, $vararg_buffer3 = 0, $vararg_buffer7 = 0, $vararg_ptr1 = 0, $vararg_ptr10 = 0, $vararg_ptr11 = 0, $vararg_ptr15 = 0, $vararg_ptr16 = 0, $vararg_ptr2 = 0, $vararg_ptr6 = 0, dest = 0, label = 0;
+ var sp = 0, stop = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $vararg_buffer12 = sp + 40|0;
+ $vararg_buffer7 = sp + 24|0;
+ $vararg_buffer3 = sp + 16|0;
+ $vararg_buffer = sp;
+ $tio = sp + 52|0;
+ $0 = HEAP8[$mode>>0]|0;
+ $1 = $0 << 24 >> 24;
+ $memchr = (_memchr(72391,$1,4)|0);
+ $2 = ($memchr|0)==(0|0);
+ if ($2) {
+  $3 = (___errno_location()|0);
+  HEAP32[$3>>2] = 22;
+  $$0 = 0;
+ } else {
+  $4 = (_malloc(1144)|0);
+  $5 = ($4|0)==(0|0);
+  if ($5) {
+   $$0 = 0;
+  } else {
+   dest=$4; stop=dest+112|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0));
+   $6 = (_strchr($mode,43)|0);
+   $7 = ($6|0)==(0|0);
+   if ($7) {
+    $8 = ($0<<24>>24)==(114);
+    $9 = $8 ? 8 : 4;
+    HEAP32[$4>>2] = $9;
+   }
+   $10 = (_strchr($mode,101)|0);
+   $11 = ($10|0)==(0|0);
+   if ($11) {
+    $12 = $0;
+   } else {
+    HEAP32[$vararg_buffer>>2] = $fd;
+    $vararg_ptr1 = ((($vararg_buffer)) + 4|0);
+    HEAP32[$vararg_ptr1>>2] = 2;
+    $vararg_ptr2 = ((($vararg_buffer)) + 8|0);
+    HEAP32[$vararg_ptr2>>2] = 1;
+    (___syscall221(221,($vararg_buffer|0))|0);
+    $$pre = HEAP8[$mode>>0]|0;
+    $12 = $$pre;
+   }
+   $13 = ($12<<24>>24)==(97);
+   if ($13) {
+    HEAP32[$vararg_buffer3>>2] = $fd;
+    $vararg_ptr6 = ((($vararg_buffer3)) + 4|0);
+    HEAP32[$vararg_ptr6>>2] = 3;
+    $14 = (___syscall221(221,($vararg_buffer3|0))|0);
+    $15 = $14 & 1024;
+    $16 = ($15|0)==(0);
+    if ($16) {
+     $17 = $14 | 1024;
+     HEAP32[$vararg_buffer7>>2] = $fd;
+     $vararg_ptr10 = ((($vararg_buffer7)) + 4|0);
+     HEAP32[$vararg_ptr10>>2] = 4;
+     $vararg_ptr11 = ((($vararg_buffer7)) + 8|0);
+     HEAP32[$vararg_ptr11>>2] = $17;
+     (___syscall221(221,($vararg_buffer7|0))|0);
+    }
+    $18 = HEAP32[$4>>2]|0;
+    $19 = $18 | 128;
+    HEAP32[$4>>2] = $19;
+    $26 = $19;
+   } else {
+    $$pre1 = HEAP32[$4>>2]|0;
+    $26 = $$pre1;
+   }
+   $20 = ((($4)) + 60|0);
+   HEAP32[$20>>2] = $fd;
+   $21 = ((($4)) + 120|0);
+   $22 = ((($4)) + 44|0);
+   HEAP32[$22>>2] = $21;
+   $23 = ((($4)) + 48|0);
+   HEAP32[$23>>2] = 1024;
+   $24 = ((($4)) + 75|0);
+   HEAP8[$24>>0] = -1;
+   $25 = $26 & 8;
+   $27 = ($25|0)==(0);
+   if ($27) {
+    HEAP32[$vararg_buffer12>>2] = $fd;
+    $vararg_ptr15 = ((($vararg_buffer12)) + 4|0);
+    HEAP32[$vararg_ptr15>>2] = 21505;
+    $vararg_ptr16 = ((($vararg_buffer12)) + 8|0);
+    HEAP32[$vararg_ptr16>>2] = $tio;
+    $28 = (___syscall54(54,($vararg_buffer12|0))|0);
+    $29 = ($28|0)==(0);
+    if ($29) {
+     HEAP8[$24>>0] = 10;
+    }
+   }
+   $30 = ((($4)) + 32|0);
+   HEAP32[$30>>2] = 4;
+   $31 = ((($4)) + 36|0);
+   HEAP32[$31>>2] = 2;
+   $32 = ((($4)) + 40|0);
+   HEAP32[$32>>2] = 3;
+   $33 = ((($4)) + 12|0);
+   HEAP32[$33>>2] = 1;
+   $34 = HEAP32[(74900)>>2]|0;
+   $35 = ($34|0)==(0);
+   if ($35) {
+    $36 = ((($4)) + 76|0);
+    HEAP32[$36>>2] = -1;
+   }
+   ___lock(((74924)|0));
+   $37 = HEAP32[(74920)>>2]|0;
+   $38 = ((($4)) + 56|0);
+   HEAP32[$38>>2] = $37;
+   $39 = ($37|0)==(0);
+   if (!($39)) {
+    $$cast = $37;
+    $40 = ((($$cast)) + 52|0);
+    HEAP32[$40>>2] = $4;
+   }
+   HEAP32[(74920)>>2] = $4;
+   ___unlock(((74924)|0));
+   $$0 = $4;
+  }
+ }
+ STACKTOP = sp;return ($$0|0);
+}
+function _fclose($f) {
+ $f = $f|0;
+ var $$pre = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ((($f)) + 76|0);
+ $1 = HEAP32[$0>>2]|0;
+ $2 = ($1|0)>(-1);
+ if ($2) {
+  (___lockfile($f)|0);
+ }
+ $3 = HEAP32[$f>>2]|0;
+ $4 = $3 & 1;
+ $5 = ($4|0)!=(0);
+ if (!($5)) {
+  ___lock(((74924)|0));
+  $6 = ((($f)) + 52|0);
+  $7 = HEAP32[$6>>2]|0;
+  $8 = ($7|0)==(0|0);
+  $9 = $7;
+  $$pre = ((($f)) + 56|0);
+  if (!($8)) {
+   $10 = HEAP32[$$pre>>2]|0;
+   $11 = ((($7)) + 56|0);
+   HEAP32[$11>>2] = $10;
+  }
+  $12 = HEAP32[$$pre>>2]|0;
+  $13 = ($12|0)==(0|0);
+  $14 = $12;
+  if (!($13)) {
+   $15 = ((($12)) + 52|0);
+   HEAP32[$15>>2] = $9;
+  }
+  $16 = HEAP32[(74920)>>2]|0;
+  $17 = ($16|0)==($f|0);
+  if ($17) {
+   HEAP32[(74920)>>2] = $14;
+  }
+  ___unlock(((74924)|0));
+ }
+ $18 = (_fflush($f)|0);
+ $19 = ((($f)) + 12|0);
+ $20 = HEAP32[$19>>2]|0;
+ $21 = (FUNCTION_TABLE_ii[$20 & 255]($f)|0);
+ $22 = $21 | $18;
+ $23 = ((($f)) + 92|0);
+ $24 = HEAP32[$23>>2]|0;
+ $25 = ($24|0)==(0|0);
+ if (!($25)) {
+  _free($24);
+ }
+ if (!($5)) {
+  _free($f);
+ }
+ return ($22|0);
+}
+function _fflush($f) {
+ $f = $f|0;
+ var $$0 = 0, $$01 = 0, $$012 = 0, $$014 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0;
+ var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, $r$0$lcssa = 0, $r$03 = 0, $r$1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ($f|0)==(0|0);
+ do {
+  if ($0) {
+   $7 = HEAP32[724]|0;
+   $8 = ($7|0)==(0|0);
+   if ($8) {
+    $27 = 0;
+   } else {
+    $9 = HEAP32[724]|0;
+    $10 = (_fflush($9)|0);
+    $27 = $10;
+   }
+   ___lock(((74924)|0));
+   $$012 = HEAP32[(74920)>>2]|0;
+   $11 = ($$012|0)==(0|0);
+   if ($11) {
+    $r$0$lcssa = $27;
+   } else {
+    $$014 = $$012;$r$03 = $27;
+    while(1) {
+     $12 = ((($$014)) + 76|0);
+     $13 = HEAP32[$12>>2]|0;
+     $14 = ($13|0)>(-1);
+     if ($14) {
+      $15 = (___lockfile($$014)|0);
+      $23 = $15;
+     } else {
+      $23 = 0;
+     }
+     $16 = ((($$014)) + 20|0);
+     $17 = HEAP32[$16>>2]|0;
+     $18 = ((($$014)) + 28|0);
+     $19 = HEAP32[$18>>2]|0;
+     $20 = ($17>>>0)>($19>>>0);
+     if ($20) {
+      $21 = (___fflush_unlocked($$014)|0);
+      $22 = $21 | $r$03;
+      $r$1 = $22;
+     } else {
+      $r$1 = $r$03;
+     }
+     $24 = ($23|0)==(0);
+     if (!($24)) {
+      ___unlockfile($$014);
+     }
+     $25 = ((($$014)) + 56|0);
+     $$01 = HEAP32[$25>>2]|0;
+     $26 = ($$01|0)==(0|0);
+     if ($26) {
+      $r$0$lcssa = $r$1;
+      break;
+     } else {
+      $$014 = $$01;$r$03 = $r$1;
+     }
+    }
+   }
+   ___unlock(((74924)|0));
+   $$0 = $r$0$lcssa;
+  } else {
+   $1 = ((($f)) + 76|0);
+   $2 = HEAP32[$1>>2]|0;
+   $3 = ($2|0)>(-1);
+   if (!($3)) {
+    $4 = (___fflush_unlocked($f)|0);
+    $$0 = $4;
+    break;
+   }
+   $5 = (___lockfile($f)|0);
+   $phitmp = ($5|0)==(0);
+   $6 = (___fflush_unlocked($f)|0);
+   if ($phitmp) {
+    $$0 = $6;
+   } else {
+    ___unlockfile($f);
+    $$0 = $6;
+   }
+  }
+ } while(0);
+ return ($$0|0);
+}
+function ___fflush_unlocked($f) {
+ $f = $f|0;
+ var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0;
+ var $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ((($f)) + 20|0);
+ $1 = HEAP32[$0>>2]|0;
+ $2 = ((($f)) + 28|0);
+ $3 = HEAP32[$2>>2]|0;
+ $4 = ($1>>>0)>($3>>>0);
+ if ($4) {
+  $5 = ((($f)) + 36|0);
+  $6 = HEAP32[$5>>2]|0;
+  (FUNCTION_TABLE_iiii[$6 & 511]($f,0,0)|0);
+  $7 = HEAP32[$0>>2]|0;
+  $8 = ($7|0)==(0|0);
+  if ($8) {
+   $$0 = -1;
+  } else {
+   label = 3;
+  }
+ } else {
+  label = 3;
+ }
+ if ((label|0) == 3) {
+  $9 = ((($f)) + 4|0);
+  $10 = HEAP32[$9>>2]|0;
+  $11 = ((($f)) + 8|0);
+  $12 = HEAP32[$11>>2]|0;
+  $13 = ($10>>>0)<($12>>>0);
+  if ($13) {
+   $14 = ((($f)) + 40|0);
+   $15 = HEAP32[$14>>2]|0;
+   $16 = $10;
+   $17 = $12;
+   $18 = (($16) - ($17))|0;
+   (FUNCTION_TABLE_iiii[$15 & 511]($f,$18,1)|0);
+  }
+  $19 = ((($f)) + 16|0);
+  HEAP32[$19>>2] = 0;
+  HEAP32[$2>>2] = 0;
+  HEAP32[$0>>2] = 0;
+  HEAP32[$11>>2] = 0;
+  HEAP32[$9>>2] = 0;
+  $$0 = 0;
+ }
+ return ($$0|0);
+}
+function _feof($f) {
+ $f = $f|0;
+ var $$lobit = 0, $$lobit1 = 0, $$lobit2 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $phitmp = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ((($f)) + 76|0);
+ $1 = HEAP32[$0>>2]|0;
+ $2 = ($1|0)>(-1);
+ if ($2) {
+  $5 = (___lockfile($f)|0);
+  $phitmp = ($5|0)==(0);
+  $6 = HEAP32[$f>>2]|0;
+  $7 = $6 >>> 4;
+  $$lobit = $7 & 1;
+  if ($phitmp) {
+   $$lobit2 = $$lobit;
+  } else {
+   ___unlockfile($f);
+   $$lobit2 = $$lobit;
+  }
+ } else {
+  $3 = HEAP32[$f>>2]|0;
+  $4 = $3 >>> 4;
+  $$lobit1 = $4 & 1;
+  $$lobit2 = $$lobit1;
+ }
+ return ($$lobit2|0);
+}
+function _fprintf($f,$fmt,$varargs) {
+ $f = $f|0;
+ $fmt = $fmt|0;
+ $varargs = $varargs|0;
+ var $0 = 0, $ap = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $ap = sp;
+ HEAP32[$ap>>2] = $varargs;
+ $0 = (_vfprintf($f,$fmt,$ap)|0);
+ STACKTOP = sp;return ($0|0);
+}
+function _strrchr($s,$c) {
+ $s = $s|0;
+ $c = $c|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = (_strlen($s)|0);
+ $1 = (($0) + 1)|0;
+ $2 = (___memrchr($s,$c,$1)|0);
+ return ($2|0);
+}
+function ___memrchr($m,$c,$n) {
+ $m = $m|0;
+ $c = $c|0;
+ $n = $n|0;
+ var $$0 = 0, $$01 = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = $c&255;
+ $$01 = $n;
+ while(1) {
+  $1 = (($$01) + -1)|0;
+  $2 = ($$01|0)==(0);
+  if ($2) {
+   $$0 = 0;
+   break;
+  }
+  $3 = (($m) + ($1)|0);
+  $4 = HEAP8[$3>>0]|0;
+  $5 = ($4<<24>>24)==($0<<24>>24);
+  if ($5) {
+   $$0 = $3;
+   break;
+  } else {
+   $$01 = $1;
+  }
+ }
+ return ($$0|0);
+}
+function _fgetc($f) {
+ $f = $f|0;
+ var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0;
+ var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ((($f)) + 76|0);
+ $1 = HEAP32[$0>>2]|0;
+ $2 = ($1|0)<(0);
+ if ($2) {
+  label = 3;
+ } else {
+  $3 = (___lockfile($f)|0);
+  $4 = ($3|0)==(0);
+  if ($4) {
+   label = 3;
+  } else {
+   $14 = ((($f)) + 4|0);
+   $15 = HEAP32[$14>>2]|0;
+   $16 = ((($f)) + 8|0);
+   $17 = HEAP32[$16>>2]|0;
+   $18 = ($15>>>0)<($17>>>0);
+   if ($18) {
+    $19 = ((($15)) + 1|0);
+    HEAP32[$14>>2] = $19;
+    $20 = HEAP8[$15>>0]|0;
+    $21 = $20&255;
+    $23 = $21;
+   } else {
+    $22 = (___uflow($f)|0);
+    $23 = $22;
+   }
+   ___unlockfile($f);
+   $$0 = $23;
+  }
+ }
+ do {
+  if ((label|0) == 3) {
+   $5 = ((($f)) + 4|0);
+   $6 = HEAP32[$5>>2]|0;
+   $7 = ((($f)) + 8|0);
+   $8 = HEAP32[$7>>2]|0;
+   $9 = ($6>>>0)<($8>>>0);
+   if ($9) {
+    $10 = ((($6)) + 1|0);
+    HEAP32[$5>>2] = $10;
+    $11 = HEAP8[$6>>0]|0;
+    $12 = $11&255;
+    $$0 = $12;
+    break;
+   } else {
+    $13 = (___uflow($f)|0);
+    $$0 = $13;
+    break;
+   }
+  }
+ } while(0);
+ return ($$0|0);
+}
+function ___overflow($f,$_c) {
+ $f = $f|0;
+ $_c = $_c|0;
+ var $$0 = 0, $$pre = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0;
+ var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $c = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $c = sp;
+ $0 = $_c&255;
+ HEAP8[$c>>0] = $0;
+ $1 = ((($f)) + 16|0);
+ $2 = HEAP32[$1>>2]|0;
+ $3 = ($2|0)==(0|0);
+ if ($3) {
+  $4 = (___towrite($f)|0);
+  $5 = ($4|0)==(0);
+  if ($5) {
+   $$pre = HEAP32[$1>>2]|0;
+   $9 = $$pre;
+   label = 4;
+  } else {
+   $$0 = -1;
+  }
+ } else {
+  $9 = $2;
+  label = 4;
+ }
+ do {
+  if ((label|0) == 4) {
+   $6 = ((($f)) + 20|0);
+   $7 = HEAP32[$6>>2]|0;
+   $8 = ($7>>>0)<($9>>>0);
+   if ($8) {
+    $10 = $_c & 255;
+    $11 = ((($f)) + 75|0);
+    $12 = HEAP8[$11>>0]|0;
+    $13 = $12 << 24 >> 24;
+    $14 = ($10|0)==($13|0);
+    if (!($14)) {
+     $15 = ((($7)) + 1|0);
+     HEAP32[$6>>2] = $15;
+     HEAP8[$7>>0] = $0;
+     $$0 = $10;
+     break;
+    }
+   }
+   $16 = ((($f)) + 36|0);
+   $17 = HEAP32[$16>>2]|0;
+   $18 = (FUNCTION_TABLE_iiii[$17 & 511]($f,$c,1)|0);
+   $19 = ($18|0)==(1);
+   if ($19) {
+    $20 = HEAP8[$c>>0]|0;
+    $21 = $20&255;
+    $$0 = $21;
+   } else {
+    $$0 = -1;
+   }
+  }
+ } while(0);
+ STACKTOP = sp;return ($$0|0);
+}
+function _fputs($s,$f) {
+ $s = $s|0;
+ $f = $f|0;
+ var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = (_strlen($s)|0);
+ $1 = (_fwrite($s,$0,1,$f)|0);
+ $2 = (($1) + -1)|0;
+ return ($2|0);
+}
+function _fwrite($src,$size,$nmemb,$f) {
+ $src = $src|0;
+ $size = $size|0;
+ $nmemb = $nmemb|0;
+ $f = $f|0;
+ var $0 = 0, $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = Math_imul($nmemb, $size)|0;
+ $1 = ((($f)) + 76|0);
+ $2 = HEAP32[$1>>2]|0;
+ $3 = ($2|0)>(-1);
+ if ($3) {
+  $5 = (___lockfile($f)|0);
+  $phitmp = ($5|0)==(0);
+  $6 = (___fwritex($src,$0,$f)|0);
+  if ($phitmp) {
+   $7 = $6;
+  } else {
+   ___unlockfile($f);
+   $7 = $6;
+  }
+ } else {
+  $4 = (___fwritex($src,$0,$f)|0);
+  $7 = $4;
+ }
+ $8 = ($7|0)==($0|0);
+ if ($8) {
+  $10 = $nmemb;
+ } else {
+  $9 = (($7>>>0) / ($size>>>0))&-1;
+  $10 = $9;
+ }
+ return ($10|0);
+}
+function _printf($fmt,$varargs) {
+ $fmt = $fmt|0;
+ $varargs = $varargs|0;
+ var $0 = 0, $1 = 0, $ap = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $ap = sp;
+ HEAP32[$ap>>2] = $varargs;
+ $0 = HEAP32[695]|0;
+ $1 = (_vfprintf($0,$fmt,$ap)|0);
+ STACKTOP = sp;return ($1|0);
+}
+function _putc($c,$f) {
+ $c = $c|0;
+ $f = $f|0;
+ var $$0 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0;
+ var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ((($f)) + 76|0);
+ $1 = HEAP32[$0>>2]|0;
+ $2 = ($1|0)<(0);
+ if ($2) {
+  label = 3;
+ } else {
+  $3 = (___lockfile($f)|0);
+  $4 = ($3|0)==(0);
+  if ($4) {
+   label = 3;
+  } else {
+   $18 = ((($f)) + 75|0);
+   $19 = HEAP8[$18>>0]|0;
+   $20 = $19 << 24 >> 24;
+   $21 = ($20|0)==($c|0);
+   if ($21) {
+    label = 10;
+   } else {
+    $22 = ((($f)) + 20|0);
+    $23 = HEAP32[$22>>2]|0;
+    $24 = ((($f)) + 16|0);
+    $25 = HEAP32[$24>>2]|0;
+    $26 = ($23>>>0)<($25>>>0);
+    if ($26) {
+     $27 = $c&255;
+     $28 = ((($23)) + 1|0);
+     HEAP32[$22>>2] = $28;
+     HEAP8[$23>>0] = $27;
+     $29 = $c & 255;
+     $31 = $29;
+    } else {
+     label = 10;
+    }
+   }
+   if ((label|0) == 10) {
+    $30 = (___overflow($f,$c)|0);
+    $31 = $30;
+   }
+   ___unlockfile($f);
+   $$0 = $31;
+  }
+ }
+ do {
+  if ((label|0) == 3) {
+   $5 = ((($f)) + 75|0);
+   $6 = HEAP8[$5>>0]|0;
+   $7 = $6 << 24 >> 24;
+   $8 = ($7|0)==($c|0);
+   if (!($8)) {
+    $9 = ((($f)) + 20|0);
+    $10 = HEAP32[$9>>2]|0;
+    $11 = ((($f)) + 16|0);
+    $12 = HEAP32[$11>>2]|0;
+    $13 = ($10>>>0)<($12>>>0);
+    if ($13) {
+     $14 = $c&255;
+     $15 = ((($10)) + 1|0);
+     HEAP32[$9>>2] = $15;
+     HEAP8[$10>>0] = $14;
+     $16 = $c & 255;
+     $$0 = $16;
+     break;
+    }
+   }
+   $17 = (___overflow($f,$c)|0);
+   $$0 = $17;
+  }
+ } while(0);
+ return ($$0|0);
+}
+function _strtod($s,$p) {
+ $s = $s|0;
+ $p = $p|0;
+ var $0 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = (+_strtox($s,$p,1));
+ return (+$0);
+}
+function _strtox($s,$p,$prec) {
+ $s = $s|0;
+ $p = $p|0;
+ $prec = $prec|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $f = 0, dest = 0, label = 0, sp = 0, stop = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $f = sp;
+ dest=$f; stop=dest+112|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0));
+ $0 = ((($f)) + 4|0);
+ HEAP32[$0>>2] = $s;
+ $1 = ((($f)) + 8|0);
+ HEAP32[$1>>2] = (-1);
+ $2 = ((($f)) + 44|0);
+ HEAP32[$2>>2] = $s;
+ $3 = ((($f)) + 76|0);
+ HEAP32[$3>>2] = -1;
+ ___shlim($f,0);
+ $4 = (+___floatscan($f,$prec,1));
+ $5 = ((($f)) + 108|0);
+ $6 = HEAP32[$5>>2]|0;
+ $7 = HEAP32[$0>>2]|0;
+ $8 = HEAP32[$1>>2]|0;
+ $9 = (($7) - ($8))|0;
+ $10 = (($9) + ($6))|0;
+ $11 = ($p|0)==(0|0);
+ if (!($11)) {
+  $12 = ($10|0)!=(0);
+  $13 = (($s) + ($10)|0);
+  $14 = $12 ? $13 : $s;
+  HEAP32[$p>>2] = $14;
+ }
+ STACKTOP = sp;return (+$4);
+}
+function _strtof($s,$p) {
+ $s = $s|0;
+ $p = $p|0;
+ var $0 = 0.0, $1 = 0.0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = (+_strtox($s,$p,0));
+ $1 = $0;
+ return (+$1);
+}
+function _malloc($bytes) {
+ $bytes = $bytes|0;
+ var $$0 = 0, $$lcssa = 0, $$lcssa141 = 0, $$lcssa142 = 0, $$lcssa144 = 0, $$lcssa147 = 0, $$lcssa149 = 0, $$lcssa151 = 0, $$lcssa153 = 0, $$lcssa155 = 0, $$lcssa157 = 0, $$not$i = 0, $$pre = 0, $$pre$i = 0, $$pre$i$i = 0, $$pre$i13 = 0, $$pre$i16$i = 0, $$pre$phi$i$iZ2D = 0, $$pre$phi$i14Z2D = 0, $$pre$phi$i17$iZ2D = 0;
+ var $$pre$phi$iZ2D = 0, $$pre$phi10$i$iZ2D = 0, $$pre$phiZ2D = 0, $$pre71 = 0, $$pre9$i$i = 0, $$rsize$0$i = 0, $$rsize$4$i = 0, $$v$0$i = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $1000 = 0, $1001 = 0, $1002 = 0, $1003 = 0, $1004 = 0, $1005 = 0, $1006 = 0, $1007 = 0;
+ var $1008 = 0, $1009 = 0, $101 = 0, $1010 = 0, $1011 = 0, $1012 = 0, $1013 = 0, $1014 = 0, $1015 = 0, $1016 = 0, $1017 = 0, $1018 = 0, $1019 = 0, $102 = 0, $1020 = 0, $1021 = 0, $1022 = 0, $1023 = 0, $1024 = 0, $1025 = 0;
+ var $1026 = 0, $1027 = 0, $1028 = 0, $1029 = 0, $103 = 0, $1030 = 0, $1031 = 0, $1032 = 0, $1033 = 0, $1034 = 0, $1035 = 0, $1036 = 0, $1037 = 0, $1038 = 0, $1039 = 0, $104 = 0, $1040 = 0, $1041 = 0, $1042 = 0, $1043 = 0;
+ var $1044 = 0, $1045 = 0, $1046 = 0, $1047 = 0, $1048 = 0, $1049 = 0, $105 = 0, $1050 = 0, $1051 = 0, $1052 = 0, $1053 = 0, $1054 = 0, $1055 = 0, $1056 = 0, $1057 = 0, $1058 = 0, $1059 = 0, $106 = 0, $107 = 0, $108 = 0;
+ var $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0;
+ var $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0;
+ var $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0;
+ var $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0;
+ var $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0;
+ var $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0;
+ var $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0;
+ var $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0;
+ var $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0;
+ var $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0;
+ var $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0;
+ var $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0;
+ var $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0, $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0;
+ var $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0, $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0;
+ var $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0;
+ var $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0, $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0;
+ var $398 = 0, $399 = 0, $4 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0;
+ var $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0, $43 = 0, $430 = 0, $431 = 0, $432 = 0;
+ var $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0, $448 = 0, $449 = 0, $45 = 0, $450 = 0;
+ var $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0, $466 = 0, $467 = 0, $468 = 0, $469 = 0;
+ var $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0, $484 = 0, $485 = 0, $486 = 0, $487 = 0;
+ var $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $5 = 0, $50 = 0, $500 = 0, $501 = 0, $502 = 0, $503 = 0, $504 = 0;
+ var $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0, $520 = 0, $521 = 0, $522 = 0;
+ var $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0, $539 = 0, $54 = 0, $540 = 0;
+ var $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0, $557 = 0, $558 = 0, $559 = 0;
+ var $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0, $575 = 0, $576 = 0, $577 = 0;
+ var $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0, $593 = 0, $594 = 0, $595 = 0;
+ var $596 = 0, $597 = 0, $598 = 0, $599 = 0, $6 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0, $611 = 0, $612 = 0;
+ var $613 = 0, $614 = 0, $615 = 0, $616 = 0, $617 = 0, $618 = 0, $619 = 0, $62 = 0, $620 = 0, $621 = 0, $622 = 0, $623 = 0, $624 = 0, $625 = 0, $626 = 0, $627 = 0, $628 = 0, $629 = 0, $63 = 0, $630 = 0;
+ var $631 = 0, $632 = 0, $633 = 0, $634 = 0, $635 = 0, $636 = 0, $637 = 0, $638 = 0, $639 = 0, $64 = 0, $640 = 0, $641 = 0, $642 = 0, $643 = 0, $644 = 0, $645 = 0, $646 = 0, $647 = 0, $648 = 0, $649 = 0;
+ var $65 = 0, $650 = 0, $651 = 0, $652 = 0, $653 = 0, $654 = 0, $655 = 0, $656 = 0, $657 = 0, $658 = 0, $659 = 0, $66 = 0, $660 = 0, $661 = 0, $662 = 0, $663 = 0, $664 = 0, $665 = 0, $666 = 0, $667 = 0;
+ var $668 = 0, $669 = 0, $67 = 0, $670 = 0, $671 = 0, $672 = 0, $673 = 0, $674 = 0, $675 = 0, $676 = 0, $677 = 0, $678 = 0, $679 = 0, $68 = 0, $680 = 0, $681 = 0, $682 = 0, $683 = 0, $684 = 0, $685 = 0;
+ var $686 = 0, $687 = 0, $688 = 0, $689 = 0, $69 = 0, $690 = 0, $691 = 0, $692 = 0, $693 = 0, $694 = 0, $695 = 0, $696 = 0, $697 = 0, $698 = 0, $699 = 0, $7 = 0, $70 = 0, $700 = 0, $701 = 0, $702 = 0;
+ var $703 = 0, $704 = 0, $705 = 0, $706 = 0, $707 = 0, $708 = 0, $709 = 0, $71 = 0, $710 = 0, $711 = 0, $712 = 0, $713 = 0, $714 = 0, $715 = 0, $716 = 0, $717 = 0, $718 = 0, $719 = 0, $72 = 0, $720 = 0;
+ var $721 = 0, $722 = 0, $723 = 0, $724 = 0, $725 = 0, $726 = 0, $727 = 0, $728 = 0, $729 = 0, $73 = 0, $730 = 0, $731 = 0, $732 = 0, $733 = 0, $734 = 0, $735 = 0, $736 = 0, $737 = 0, $738 = 0, $739 = 0;
+ var $74 = 0, $740 = 0, $741 = 0, $742 = 0, $743 = 0, $744 = 0, $745 = 0, $746 = 0, $747 = 0, $748 = 0, $749 = 0, $75 = 0, $750 = 0, $751 = 0, $752 = 0, $753 = 0, $754 = 0, $755 = 0, $756 = 0, $757 = 0;
+ var $758 = 0, $759 = 0, $76 = 0, $760 = 0, $761 = 0, $762 = 0, $763 = 0, $764 = 0, $765 = 0, $766 = 0, $767 = 0, $768 = 0, $769 = 0, $77 = 0, $770 = 0, $771 = 0, $772 = 0, $773 = 0, $774 = 0, $775 = 0;
+ var $776 = 0, $777 = 0, $778 = 0, $779 = 0, $78 = 0, $780 = 0, $781 = 0, $782 = 0, $783 = 0, $784 = 0, $785 = 0, $786 = 0, $787 = 0, $788 = 0, $789 = 0, $79 = 0, $790 = 0, $791 = 0, $792 = 0, $793 = 0;
+ var $794 = 0, $795 = 0, $796 = 0, $797 = 0, $798 = 0, $799 = 0, $8 = 0, $80 = 0, $800 = 0, $801 = 0, $802 = 0, $803 = 0, $804 = 0, $805 = 0, $806 = 0, $807 = 0, $808 = 0, $809 = 0, $81 = 0, $810 = 0;
+ var $811 = 0, $812 = 0, $813 = 0, $814 = 0, $815 = 0, $816 = 0, $817 = 0, $818 = 0, $819 = 0, $82 = 0, $820 = 0, $821 = 0, $822 = 0, $823 = 0, $824 = 0, $825 = 0, $826 = 0, $827 = 0, $828 = 0, $829 = 0;
+ var $83 = 0, $830 = 0, $831 = 0, $832 = 0, $833 = 0, $834 = 0, $835 = 0, $836 = 0, $837 = 0, $838 = 0, $839 = 0, $84 = 0, $840 = 0, $841 = 0, $842 = 0, $843 = 0, $844 = 0, $845 = 0, $846 = 0, $847 = 0;
+ var $848 = 0, $849 = 0, $85 = 0, $850 = 0, $851 = 0, $852 = 0, $853 = 0, $854 = 0, $855 = 0, $856 = 0, $857 = 0, $858 = 0, $859 = 0, $86 = 0, $860 = 0, $861 = 0, $862 = 0, $863 = 0, $864 = 0, $865 = 0;
+ var $866 = 0, $867 = 0, $868 = 0, $869 = 0, $87 = 0, $870 = 0, $871 = 0, $872 = 0, $873 = 0, $874 = 0, $875 = 0, $876 = 0, $877 = 0, $878 = 0, $879 = 0, $88 = 0, $880 = 0, $881 = 0, $882 = 0, $883 = 0;
+ var $884 = 0, $885 = 0, $886 = 0, $887 = 0, $888 = 0, $889 = 0, $89 = 0, $890 = 0, $891 = 0, $892 = 0, $893 = 0, $894 = 0, $895 = 0, $896 = 0, $897 = 0, $898 = 0, $899 = 0, $9 = 0, $90 = 0, $900 = 0;
+ var $901 = 0, $902 = 0, $903 = 0, $904 = 0, $905 = 0, $906 = 0, $907 = 0, $908 = 0, $909 = 0, $91 = 0, $910 = 0, $911 = 0, $912 = 0, $913 = 0, $914 = 0, $915 = 0, $916 = 0, $917 = 0, $918 = 0, $919 = 0;
+ var $92 = 0, $920 = 0, $921 = 0, $922 = 0, $923 = 0, $924 = 0, $925 = 0, $926 = 0, $927 = 0, $928 = 0, $929 = 0, $93 = 0, $930 = 0, $931 = 0, $932 = 0, $933 = 0, $934 = 0, $935 = 0, $936 = 0, $937 = 0;
+ var $938 = 0, $939 = 0, $94 = 0, $940 = 0, $941 = 0, $942 = 0, $943 = 0, $944 = 0, $945 = 0, $946 = 0, $947 = 0, $948 = 0, $949 = 0, $95 = 0, $950 = 0, $951 = 0, $952 = 0, $953 = 0, $954 = 0, $955 = 0;
+ var $956 = 0, $957 = 0, $958 = 0, $959 = 0, $96 = 0, $960 = 0, $961 = 0, $962 = 0, $963 = 0, $964 = 0, $965 = 0, $966 = 0, $967 = 0, $968 = 0, $969 = 0, $97 = 0, $970 = 0, $971 = 0, $972 = 0, $973 = 0;
+ var $974 = 0, $975 = 0, $976 = 0, $977 = 0, $978 = 0, $979 = 0, $98 = 0, $980 = 0, $981 = 0, $982 = 0, $983 = 0, $984 = 0, $985 = 0, $986 = 0, $987 = 0, $988 = 0, $989 = 0, $99 = 0, $990 = 0, $991 = 0;
+ var $992 = 0, $993 = 0, $994 = 0, $995 = 0, $996 = 0, $997 = 0, $998 = 0, $999 = 0, $F$0$i$i = 0, $F1$0$i = 0, $F4$0 = 0, $F4$0$i$i = 0, $F5$0$i = 0, $I1$0$i$i = 0, $I7$0$i = 0, $I7$0$i$i = 0, $K12$0$i = 0, $K2$0$i$i = 0, $K8$0$i$i = 0, $R$1$i = 0;
+ var $R$1$i$i = 0, $R$1$i$i$lcssa = 0, $R$1$i$lcssa = 0, $R$1$i9 = 0, $R$1$i9$lcssa = 0, $R$3$i = 0, $R$3$i$i = 0, $R$3$i11 = 0, $RP$1$i = 0, $RP$1$i$i = 0, $RP$1$i$i$lcssa = 0, $RP$1$i$lcssa = 0, $RP$1$i8 = 0, $RP$1$i8$lcssa = 0, $T$0$i = 0, $T$0$i$i = 0, $T$0$i$i$lcssa = 0, $T$0$i$i$lcssa140 = 0, $T$0$i$lcssa = 0, $T$0$i$lcssa156 = 0;
+ var $T$0$i18$i = 0, $T$0$i18$i$lcssa = 0, $T$0$i18$i$lcssa139 = 0, $br$2$ph$i = 0, $cond$i = 0, $cond$i$i = 0, $cond$i12 = 0, $exitcond$i$i = 0, $i$01$i$i = 0, $idx$0$i = 0, $magic$i$i = 0, $nb$0 = 0, $not$$i$i = 0, $not$$i20$i = 0, $not$7$i = 0, $oldfirst$0$i$i = 0, $or$cond$i = 0, $or$cond$i17 = 0, $or$cond1$i = 0, $or$cond1$i16 = 0;
+ var $or$cond10$i = 0, $or$cond11$i = 0, $or$cond2$i = 0, $or$cond48$i = 0, $or$cond5$i = 0, $or$cond7$i = 0, $or$cond8$i = 0, $p$0$i$i = 0, $qsize$0$i$i = 0, $rsize$0$i = 0, $rsize$0$i$lcssa = 0, $rsize$0$i5 = 0, $rsize$1$i = 0, $rsize$3$i = 0, $rsize$4$lcssa$i = 0, $rsize$412$i = 0, $rst$0$i = 0, $rst$1$i = 0, $sizebits$0$$i = 0, $sizebits$0$i = 0;
+ var $sp$0$i$i = 0, $sp$0$i$i$i = 0, $sp$068$i = 0, $sp$068$i$lcssa = 0, $sp$167$i = 0, $sp$167$i$lcssa = 0, $ssize$0$i = 0, $ssize$2$ph$i = 0, $ssize$5$i = 0, $t$0$i = 0, $t$0$i4 = 0, $t$2$i = 0, $t$4$ph$i = 0, $t$4$v$4$i = 0, $t$411$i = 0, $tbase$746$i = 0, $tsize$745$i = 0, $v$0$i = 0, $v$0$i$lcssa = 0, $v$0$i6 = 0;
+ var $v$1$i = 0, $v$3$i = 0, $v$4$lcssa$i = 0, $v$413$i = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
+ $magic$i$i = sp;
+ $0 = ($bytes>>>0)<(245);
+ do {
+  if ($0) {
+   $1 = ($bytes>>>0)<(11);
+   $2 = (($bytes) + 11)|0;
+   $3 = $2 & -8;
+   $4 = $1 ? 16 : $3;
+   $5 = $4 >>> 3;
+   $6 = HEAP32[18736]|0;
+   $7 = $6 >>> $5;
+   $8 = $7 & 3;
+   $9 = ($8|0)==(0);
+   if (!($9)) {
+    $10 = $7 & 1;
+    $11 = $10 ^ 1;
+    $12 = (($11) + ($5))|0;
+    $13 = $12 << 1;
+    $14 = (74984 + ($13<<2)|0);
+    $15 = ((($14)) + 8|0);
+    $16 = HEAP32[$15>>2]|0;
+    $17 = ((($16)) + 8|0);
+    $18 = HEAP32[$17>>2]|0;
+    $19 = ($14|0)==($18|0);
+    do {
+     if ($19) {
+      $20 = 1 << $12;
+      $21 = $20 ^ -1;
+      $22 = $6 & $21;
+      HEAP32[18736] = $22;
+     } else {
+      $23 = HEAP32[(74960)>>2]|0;
+      $24 = ($18>>>0)<($23>>>0);
+      if ($24) {
+       _abort();
+       // unreachable;
+      }
+      $25 = ((($18)) + 12|0);
+      $26 = HEAP32[$25>>2]|0;
+      $27 = ($26|0)==($16|0);
+      if ($27) {
+       HEAP32[$25>>2] = $14;
+       HEAP32[$15>>2] = $18;
+       break;
+      } else {
+       _abort();
+       // unreachable;
+      }
+     }
+    } while(0);
+    $28 = $12 << 3;
+    $29 = $28 | 3;
+    $30 = ((($16)) + 4|0);
+    HEAP32[$30>>2] = $29;
+    $31 = (($16) + ($28)|0);
+    $32 = ((($31)) + 4|0);
+    $33 = HEAP32[$32>>2]|0;
+    $34 = $33 | 1;
+    HEAP32[$32>>2] = $34;
+    $$0 = $17;
+    STACKTOP = sp;return ($$0|0);
+   }
+   $35 = HEAP32[(74952)>>2]|0;
+   $36 = ($4>>>0)>($35>>>0);
+   if ($36) {
+    $37 = ($7|0)==(0);
+    if (!($37)) {
+     $38 = $7 << $5;
+     $39 = 2 << $5;
+     $40 = (0 - ($39))|0;
+     $41 = $39 | $40;
+     $42 = $38 & $41;
+     $43 = (0 - ($42))|0;
+     $44 = $42 & $43;
+     $45 = (($44) + -1)|0;
+     $46 = $45 >>> 12;
+     $47 = $46 & 16;
+     $48 = $45 >>> $47;
+     $49 = $48 >>> 5;
+     $50 = $49 & 8;
+     $51 = $50 | $47;
+     $52 = $48 >>> $50;
+     $53 = $52 >>> 2;
+     $54 = $53 & 4;
+     $55 = $51 | $54;
+     $56 = $52 >>> $54;
+     $57 = $56 >>> 1;
+     $58 = $57 & 2;
+     $59 = $55 | $58;
+     $60 = $56 >>> $58;
+     $61 = $60 >>> 1;
+     $62 = $61 & 1;
+     $63 = $59 | $62;
+     $64 = $60 >>> $62;
+     $65 = (($63) + ($64))|0;
+     $66 = $65 << 1;
+     $67 = (74984 + ($66<<2)|0);
+     $68 = ((($67)) + 8|0);
+     $69 = HEAP32[$68>>2]|0;
+     $70 = ((($69)) + 8|0);
+     $71 = HEAP32[$70>>2]|0;
+     $72 = ($67|0)==($71|0);
+     do {
+      if ($72) {
+       $73 = 1 << $65;
+       $74 = $73 ^ -1;
+       $75 = $6 & $74;
+       HEAP32[18736] = $75;
+       $89 = $35;
+      } else {
+       $76 = HEAP32[(74960)>>2]|0;
+       $77 = ($71>>>0)<($76>>>0);
+       if ($77) {
+        _abort();
+        // unreachable;
+       }
+       $78 = ((($71)) + 12|0);
+       $79 = HEAP32[$78>>2]|0;
+       $80 = ($79|0)==($69|0);
+       if ($80) {
+        HEAP32[$78>>2] = $67;
+        HEAP32[$68>>2] = $71;
+        $$pre = HEAP32[(74952)>>2]|0;
+        $89 = $$pre;
+        break;
+       } else {
+        _abort();
+        // unreachable;
+       }
+      }
+     } while(0);
+     $81 = $65 << 3;
+     $82 = (($81) - ($4))|0;
+     $83 = $4 | 3;
+     $84 = ((($69)) + 4|0);
+     HEAP32[$84>>2] = $83;
+     $85 = (($69) + ($4)|0);
+     $86 = $82 | 1;
+     $87 = ((($85)) + 4|0);
+     HEAP32[$87>>2] = $86;
+     $88 = (($85) + ($82)|0);
+     HEAP32[$88>>2] = $82;
+     $90 = ($89|0)==(0);
+     if (!($90)) {
+      $91 = HEAP32[(74964)>>2]|0;
+      $92 = $89 >>> 3;
+      $93 = $92 << 1;
+      $94 = (74984 + ($93<<2)|0);
+      $95 = HEAP32[18736]|0;
+      $96 = 1 << $92;
+      $97 = $95 & $96;
+      $98 = ($97|0)==(0);
+      if ($98) {
+       $99 = $95 | $96;
+       HEAP32[18736] = $99;
+       $$pre71 = ((($94)) + 8|0);
+       $$pre$phiZ2D = $$pre71;$F4$0 = $94;
+      } else {
+       $100 = ((($94)) + 8|0);
+       $101 = HEAP32[$100>>2]|0;
+       $102 = HEAP32[(74960)>>2]|0;
+       $103 = ($101>>>0)<($102>>>0);
+       if ($103) {
+        _abort();
+        // unreachable;
+       } else {
+        $$pre$phiZ2D = $100;$F4$0 = $101;
+       }
+      }
+      HEAP32[$$pre$phiZ2D>>2] = $91;
+      $104 = ((($F4$0)) + 12|0);
+      HEAP32[$104>>2] = $91;
+      $105 = ((($91)) + 8|0);
+      HEAP32[$105>>2] = $F4$0;
+      $106 = ((($91)) + 12|0);
+      HEAP32[$106>>2] = $94;
+     }
+     HEAP32[(74952)>>2] = $82;
+     HEAP32[(74964)>>2] = $85;
+     $$0 = $70;
+     STACKTOP = sp;return ($$0|0);
+    }
+    $107 = HEAP32[(74948)>>2]|0;
+    $108 = ($107|0)==(0);
+    if ($108) {
+     $nb$0 = $4;
+    } else {
+     $109 = (0 - ($107))|0;
+     $110 = $107 & $109;
+     $111 = (($110) + -1)|0;
+     $112 = $111 >>> 12;
+     $113 = $112 & 16;
+     $114 = $111 >>> $113;
+     $115 = $114 >>> 5;
+     $116 = $115 & 8;
+     $117 = $116 | $113;
+     $118 = $114 >>> $116;
+     $119 = $118 >>> 2;
+     $120 = $119 & 4;
+     $121 = $117 | $120;
+     $122 = $118 >>> $120;
+     $123 = $122 >>> 1;
+     $124 = $123 & 2;
+     $125 = $121 | $124;
+     $126 = $122 >>> $124;
+     $127 = $126 >>> 1;
+     $128 = $127 & 1;
+     $129 = $125 | $128;
+     $130 = $126 >>> $128;
+     $131 = (($129) + ($130))|0;
+     $132 = (75248 + ($131<<2)|0);
+     $133 = HEAP32[$132>>2]|0;
+     $134 = ((($133)) + 4|0);
+     $135 = HEAP32[$134>>2]|0;
+     $136 = $135 & -8;
+     $137 = (($136) - ($4))|0;
+     $rsize$0$i = $137;$t$0$i = $133;$v$0$i = $133;
+     while(1) {
+      $138 = ((($t$0$i)) + 16|0);
+      $139 = HEAP32[$138>>2]|0;
+      $140 = ($139|0)==(0|0);
+      if ($140) {
+       $141 = ((($t$0$i)) + 20|0);
+       $142 = HEAP32[$141>>2]|0;
+       $143 = ($142|0)==(0|0);
+       if ($143) {
+        $rsize$0$i$lcssa = $rsize$0$i;$v$0$i$lcssa = $v$0$i;
+        break;
+       } else {
+        $145 = $142;
+       }
+      } else {
+       $145 = $139;
+      }
+      $144 = ((($145)) + 4|0);
+      $146 = HEAP32[$144>>2]|0;
+      $147 = $146 & -8;
+      $148 = (($147) - ($4))|0;
+      $149 = ($148>>>0)<($rsize$0$i>>>0);
+      $$rsize$0$i = $149 ? $148 : $rsize$0$i;
+      $$v$0$i = $149 ? $145 : $v$0$i;
+      $rsize$0$i = $$rsize$0$i;$t$0$i = $145;$v$0$i = $$v$0$i;
+     }
+     $150 = HEAP32[(74960)>>2]|0;
+     $151 = ($v$0$i$lcssa>>>0)<($150>>>0);
+     if ($151) {
+      _abort();
+      // unreachable;
+     }
+     $152 = (($v$0$i$lcssa) + ($4)|0);
+     $153 = ($v$0$i$lcssa>>>0)<($152>>>0);
+     if (!($153)) {
+      _abort();
+      // unreachable;
+     }
+     $154 = ((($v$0$i$lcssa)) + 24|0);
+     $155 = HEAP32[$154>>2]|0;
+     $156 = ((($v$0$i$lcssa)) + 12|0);
+     $157 = HEAP32[$156>>2]|0;
+     $158 = ($157|0)==($v$0$i$lcssa|0);
+     do {
+      if ($158) {
+       $168 = ((($v$0$i$lcssa)) + 20|0);
+       $169 = HEAP32[$168>>2]|0;
+       $170 = ($169|0)==(0|0);
+       if ($170) {
+        $171 = ((($v$0$i$lcssa)) + 16|0);
+        $172 = HEAP32[$171>>2]|0;
+        $173 = ($172|0)==(0|0);
+        if ($173) {
+         $R$3$i = 0;
+         break;
+        } else {
+         $R$1$i = $172;$RP$1$i = $171;
+        }
+       } else {
+        $R$1$i = $169;$RP$1$i = $168;
+       }
+       while(1) {
+        $174 = ((($R$1$i)) + 20|0);
+        $175 = HEAP32[$174>>2]|0;
+        $176 = ($175|0)==(0|0);
+        if (!($176)) {
+         $R$1$i = $175;$RP$1$i = $174;
+         continue;
+        }
+        $177 = ((($R$1$i)) + 16|0);
+        $178 = HEAP32[$177>>2]|0;
+        $179 = ($178|0)==(0|0);
+        if ($179) {
+         $R$1$i$lcssa = $R$1$i;$RP$1$i$lcssa = $RP$1$i;
+         break;
+        } else {
+         $R$1$i = $178;$RP$1$i = $177;
+        }
+       }
+       $180 = ($RP$1$i$lcssa>>>0)<($150>>>0);
+       if ($180) {
+        _abort();
+        // unreachable;
+       } else {
+        HEAP32[$RP$1$i$lcssa>>2] = 0;
+        $R$3$i = $R$1$i$lcssa;
+        break;
+       }
+      } else {
+       $159 = ((($v$0$i$lcssa)) + 8|0);
+       $160 = HEAP32[$159>>2]|0;
+       $161 = ($160>>>0)<($150>>>0);
+       if ($161) {
+        _abort();
+        // unreachable;
+       }
+       $162 = ((($160)) + 12|0);
+       $163 = HEAP32[$162>>2]|0;
+       $164 = ($163|0)==($v$0$i$lcssa|0);
+       if (!($164)) {
+        _abort();
+        // unreachable;
+       }
+       $165 = ((($157)) + 8|0);
+       $166 = HEAP32[$165>>2]|0;
+       $167 = ($166|0)==($v$0$i$lcssa|0);
+       if ($167) {
+        HEAP32[$162>>2] = $157;
+        HEAP32[$165>>2] = $160;
+        $R$3$i = $157;
+        break;
+       } else {
+        _abort();
+        // unreachable;
+       }
+      }
+     } while(0);
+     $181 = ($155|0)==(0|0);
+     do {
+      if (!($181)) {
+       $182 = ((($v$0$i$lcssa)) + 28|0);
+       $183 = HEAP32[$182>>2]|0;
+       $184 = (75248 + ($183<<2)|0);
+       $185 = HEAP32[$184>>2]|0;
+       $186 = ($v$0$i$lcssa|0)==($185|0);
+       if ($186) {
+        HEAP32[$184>>2] = $R$3$i;
+        $cond$i = ($R$3$i|0)==(0|0);
+        if ($cond$i) {
+         $187 = 1 << $183;
+         $188 = $187 ^ -1;
+         $189 = HEAP32[(74948)>>2]|0;
+         $190 = $189 & $188;
+         HEAP32[(74948)>>2] = $190;
+         break;
+        }
+       } else {
+        $191 = HEAP32[(74960)>>2]|0;
+        $192 = ($155>>>0)<($191>>>0);
+        if ($192) {
+         _abort();
+         // unreachable;
+        }
+        $193 = ((($155)) + 16|0);
+        $194 = HEAP32[$193>>2]|0;
+        $195 = ($194|0)==($v$0$i$lcssa|0);
+        if ($195) {
+         HEAP32[$193>>2] = $R$3$i;
+        } else {
+         $196 = ((($155)) + 20|0);
+         HEAP32[$196>>2] = $R$3$i;
+        }
+        $197 = ($R$3$i|0)==(0|0);
+        if ($197) {
+         break;
+        }
+       }
+       $198 = HEAP32[(74960)>>2]|0;
+       $199 = ($R$3$i>>>0)<($198>>>0);
+       if ($199) {
+        _abort();
+        // unreachable;
+       }
+       $200 = ((($R$3$i)) + 24|0);
+       HEAP32[$200>>2] = $155;
+       $201 = ((($v$0$i$lcssa)) + 16|0);
+       $202 = HEAP32[$201>>2]|0;
+       $203 = ($202|0)==(0|0);
+       do {
+        if (!($203)) {
+         $204 = ($202>>>0)<($198>>>0);
+         if ($204) {
+          _abort();
+          // unreachable;
+         } else {
+          $205 = ((($R$3$i)) + 16|0);
+          HEAP32[$205>>2] = $202;
+          $206 = ((($202)) + 24|0);
+          HEAP32[$206>>2] = $R$3$i;
+          break;
+         }
+        }
+       } while(0);
+       $207 = ((($v$0$i$lcssa)) + 20|0);
+       $208 = HEAP32[$207>>2]|0;
+       $209 = ($208|0)==(0|0);
+       if (!($209)) {
+        $210 = HEAP32[(74960)>>2]|0;
+        $211 = ($208>>>0)<($210>>>0);
+        if ($211) {
+         _abort();
+         // unreachable;
+        } else {
+         $212 = ((($R$3$i)) + 20|0);
+         HEAP32[$212>>2] = $208;
+         $213 = ((($208)) + 24|0);
+         HEAP32[$213>>2] = $R$3$i;
+         break;
+        }
+       }
+      }
+     } while(0);
+     $214 = ($rsize$0$i$lcssa>>>0)<(16);
+     if ($214) {
+      $215 = (($rsize$0$i$lcssa) + ($4))|0;
+      $216 = $215 | 3;
+      $217 = ((($v$0$i$lcssa)) + 4|0);
+      HEAP32[$217>>2] = $216;
+      $218 = (($v$0$i$lcssa) + ($215)|0);
+      $219 = ((($218)) + 4|0);
+      $220 = HEAP32[$219>>2]|0;
+      $221 = $220 | 1;
+      HEAP32[$219>>2] = $221;
+     } else {
+      $222 = $4 | 3;
+      $223 = ((($v$0$i$lcssa)) + 4|0);
+      HEAP32[$223>>2] = $222;
+      $224 = $rsize$0$i$lcssa | 1;
+      $225 = ((($152)) + 4|0);
+      HEAP32[$225>>2] = $224;
+      $226 = (($152) + ($rsize$0$i$lcssa)|0);
+      HEAP32[$226>>2] = $rsize$0$i$lcssa;
+      $227 = HEAP32[(74952)>>2]|0;
+      $228 = ($227|0)==(0);
+      if (!($228)) {
+       $229 = HEAP32[(74964)>>2]|0;
+       $230 = $227 >>> 3;
+       $231 = $230 << 1;
+       $232 = (74984 + ($231<<2)|0);
+       $233 = HEAP32[18736]|0;
+       $234 = 1 << $230;
+       $235 = $233 & $234;
+       $236 = ($235|0)==(0);
+       if ($236) {
+        $237 = $233 | $234;
+        HEAP32[18736] = $237;
+        $$pre$i = ((($232)) + 8|0);
+        $$pre$phi$iZ2D = $$pre$i;$F1$0$i = $232;
+       } else {
+        $238 = ((($232)) + 8|0);
+        $239 = HEAP32[$238>>2]|0;
+        $240 = HEAP32[(74960)>>2]|0;
+        $241 = ($239>>>0)<($240>>>0);
+        if ($241) {
+         _abort();
+         // unreachable;
+        } else {
+         $$pre$phi$iZ2D = $238;$F1$0$i = $239;
+        }
+       }
+       HEAP32[$$pre$phi$iZ2D>>2] = $229;
+       $242 = ((($F1$0$i)) + 12|0);
+       HEAP32[$242>>2] = $229;
+       $243 = ((($229)) + 8|0);
+       HEAP32[$243>>2] = $F1$0$i;
+       $244 = ((($229)) + 12|0);
+       HEAP32[$244>>2] = $232;
+      }
+      HEAP32[(74952)>>2] = $rsize$0$i$lcssa;
+      HEAP32[(74964)>>2] = $152;
+     }
+     $245 = ((($v$0$i$lcssa)) + 8|0);
+     $$0 = $245;
+     STACKTOP = sp;return ($$0|0);
+    }
+   } else {
+    $nb$0 = $4;
+   }
+  } else {
+   $246 = ($bytes>>>0)>(4294967231);
+   if ($246) {
+    $nb$0 = -1;
+   } else {
+    $247 = (($bytes) + 11)|0;
+    $248 = $247 & -8;
+    $249 = HEAP32[(74948)>>2]|0;
+    $250 = ($249|0)==(0);
+    if ($250) {
+     $nb$0 = $248;
+    } else {
+     $251 = (0 - ($248))|0;
+     $252 = $247 >>> 8;
+     $253 = ($252|0)==(0);
+     if ($253) {
+      $idx$0$i = 0;
+     } else {
+      $254 = ($248>>>0)>(16777215);
+      if ($254) {
+       $idx$0$i = 31;
+      } else {
+       $255 = (($252) + 1048320)|0;
+       $256 = $255 >>> 16;
+       $257 = $256 & 8;
+       $258 = $252 << $257;
+       $259 = (($258) + 520192)|0;
+       $260 = $259 >>> 16;
+       $261 = $260 & 4;
+       $262 = $261 | $257;
+       $263 = $258 << $261;
+       $264 = (($263) + 245760)|0;
+       $265 = $264 >>> 16;
+       $266 = $265 & 2;
+       $267 = $262 | $266;
+       $268 = (14 - ($267))|0;
+       $269 = $263 << $266;
+       $270 = $269 >>> 15;
+       $271 = (($268) + ($270))|0;
+       $272 = $271 << 1;
+       $273 = (($271) + 7)|0;
+       $274 = $248 >>> $273;
+       $275 = $274 & 1;
+       $276 = $275 | $272;
+       $idx$0$i = $276;
+      }
+     }
+     $277 = (75248 + ($idx$0$i<<2)|0);
+     $278 = HEAP32[$277>>2]|0;
+     $279 = ($278|0)==(0|0);
+     L123: do {
+      if ($279) {
+       $rsize$3$i = $251;$t$2$i = 0;$v$3$i = 0;
+       label = 86;
+      } else {
+       $280 = ($idx$0$i|0)==(31);
+       $281 = $idx$0$i >>> 1;
+       $282 = (25 - ($281))|0;
+       $283 = $280 ? 0 : $282;
+       $284 = $248 << $283;
+       $rsize$0$i5 = $251;$rst$0$i = 0;$sizebits$0$i = $284;$t$0$i4 = $278;$v$0$i6 = 0;
+       while(1) {
+        $285 = ((($t$0$i4)) + 4|0);
+        $286 = HEAP32[$285>>2]|0;
+        $287 = $286 & -8;
+        $288 = (($287) - ($248))|0;
+        $289 = ($288>>>0)<($rsize$0$i5>>>0);
+        if ($289) {
+         $290 = ($287|0)==($248|0);
+         if ($290) {
+          $rsize$412$i = $288;$t$411$i = $t$0$i4;$v$413$i = $t$0$i4;
+          label = 90;
+          break L123;
+         } else {
+          $rsize$1$i = $288;$v$1$i = $t$0$i4;
+         }
+        } else {
+         $rsize$1$i = $rsize$0$i5;$v$1$i = $v$0$i6;
+        }
+        $291 = ((($t$0$i4)) + 20|0);
+        $292 = HEAP32[$291>>2]|0;
+        $293 = $sizebits$0$i >>> 31;
+        $294 = (((($t$0$i4)) + 16|0) + ($293<<2)|0);
+        $295 = HEAP32[$294>>2]|0;
+        $296 = ($292|0)==(0|0);
+        $297 = ($292|0)==($295|0);
+        $or$cond1$i = $296 | $297;
+        $rst$1$i = $or$cond1$i ? $rst$0$i : $292;
+        $298 = ($295|0)==(0|0);
+        $299 = $298&1;
+        $300 = $299 ^ 1;
+        $sizebits$0$$i = $sizebits$0$i << $300;
+        if ($298) {
+         $rsize$3$i = $rsize$1$i;$t$2$i = $rst$1$i;$v$3$i = $v$1$i;
+         label = 86;
+         break;
+        } else {
+         $rsize$0$i5 = $rsize$1$i;$rst$0$i = $rst$1$i;$sizebits$0$i = $sizebits$0$$i;$t$0$i4 = $295;$v$0$i6 = $v$1$i;
+        }
+       }
+      }
+     } while(0);
+     if ((label|0) == 86) {
+      $301 = ($t$2$i|0)==(0|0);
+      $302 = ($v$3$i|0)==(0|0);
+      $or$cond$i = $301 & $302;
+      if ($or$cond$i) {
+       $303 = 2 << $idx$0$i;
+       $304 = (0 - ($303))|0;
+       $305 = $303 | $304;
+       $306 = $249 & $305;
+       $307 = ($306|0)==(0);
+       if ($307) {
+        $nb$0 = $248;
+        break;
+       }
+       $308 = (0 - ($306))|0;
+       $309 = $306 & $308;
+       $310 = (($309) + -1)|0;
+       $311 = $310 >>> 12;
+       $312 = $311 & 16;
+       $313 = $310 >>> $312;
+       $314 = $313 >>> 5;
+       $315 = $314 & 8;
+       $316 = $315 | $312;
+       $317 = $313 >>> $315;
+       $318 = $317 >>> 2;
+       $319 = $318 & 4;
+       $320 = $316 | $319;
+       $321 = $317 >>> $319;
+       $322 = $321 >>> 1;
+       $323 = $322 & 2;
+       $324 = $320 | $323;
+       $325 = $321 >>> $323;
+       $326 = $325 >>> 1;
+       $327 = $326 & 1;
+       $328 = $324 | $327;
+       $329 = $325 >>> $327;
+       $330 = (($328) + ($329))|0;
+       $331 = (75248 + ($330<<2)|0);
+       $332 = HEAP32[$331>>2]|0;
+       $t$4$ph$i = $332;
+      } else {
+       $t$4$ph$i = $t$2$i;
+      }
+      $333 = ($t$4$ph$i|0)==(0|0);
+      if ($333) {
+       $rsize$4$lcssa$i = $rsize$3$i;$v$4$lcssa$i = $v$3$i;
+      } else {
+       $rsize$412$i = $rsize$3$i;$t$411$i = $t$4$ph$i;$v$413$i = $v$3$i;
+       label = 90;
+      }
+     }
+     if ((label|0) == 90) {
+      while(1) {
+       label = 0;
+       $334 = ((($t$411$i)) + 4|0);
+       $335 = HEAP32[$334>>2]|0;
+       $336 = $335 & -8;
+       $337 = (($336) - ($248))|0;
+       $338 = ($337>>>0)<($rsize$412$i>>>0);
+       $$rsize$4$i = $338 ? $337 : $rsize$412$i;
+       $t$4$v$4$i = $338 ? $t$411$i : $v$413$i;
+       $339 = ((($t$411$i)) + 16|0);
+       $340 = HEAP32[$339>>2]|0;
+       $341 = ($340|0)==(0|0);
+       if (!($341)) {
+        $rsize$412$i = $$rsize$4$i;$t$411$i = $340;$v$413$i = $t$4$v$4$i;
+        label = 90;
+        continue;
+       }
+       $342 = ((($t$411$i)) + 20|0);
+       $343 = HEAP32[$342>>2]|0;
+       $344 = ($343|0)==(0|0);
+       if ($344) {
+        $rsize$4$lcssa$i = $$rsize$4$i;$v$4$lcssa$i = $t$4$v$4$i;
+        break;
+       } else {
+        $rsize$412$i = $$rsize$4$i;$t$411$i = $343;$v$413$i = $t$4$v$4$i;
+        label = 90;
+       }
+      }
+     }
+     $345 = ($v$4$lcssa$i|0)==(0|0);
+     if ($345) {
+      $nb$0 = $248;
+     } else {
+      $346 = HEAP32[(74952)>>2]|0;
+      $347 = (($346) - ($248))|0;
+      $348 = ($rsize$4$lcssa$i>>>0)<($347>>>0);
+      if ($348) {
+       $349 = HEAP32[(74960)>>2]|0;
+       $350 = ($v$4$lcssa$i>>>0)<($349>>>0);
+       if ($350) {
+        _abort();
+        // unreachable;
+       }
+       $351 = (($v$4$lcssa$i) + ($248)|0);
+       $352 = ($v$4$lcssa$i>>>0)<($351>>>0);
+       if (!($352)) {
+        _abort();
+        // unreachable;
+       }
+       $353 = ((($v$4$lcssa$i)) + 24|0);
+       $354 = HEAP32[$353>>2]|0;
+       $355 = ((($v$4$lcssa$i)) + 12|0);
+       $356 = HEAP32[$355>>2]|0;
+       $357 = ($356|0)==($v$4$lcssa$i|0);
+       do {
+        if ($357) {
+         $367 = ((($v$4$lcssa$i)) + 20|0);
+         $368 = HEAP32[$367>>2]|0;
+         $369 = ($368|0)==(0|0);
+         if ($369) {
+          $370 = ((($v$4$lcssa$i)) + 16|0);
+          $371 = HEAP32[$370>>2]|0;
+          $372 = ($371|0)==(0|0);
+          if ($372) {
+           $R$3$i11 = 0;
+           break;
+          } else {
+           $R$1$i9 = $371;$RP$1$i8 = $370;
+          }
+         } else {
+          $R$1$i9 = $368;$RP$1$i8 = $367;
+         }
+         while(1) {
+          $373 = ((($R$1$i9)) + 20|0);
+          $374 = HEAP32[$373>>2]|0;
+          $375 = ($374|0)==(0|0);
+          if (!($375)) {
+           $R$1$i9 = $374;$RP$1$i8 = $373;
+           continue;
+          }
+          $376 = ((($R$1$i9)) + 16|0);
+          $377 = HEAP32[$376>>2]|0;
+          $378 = ($377|0)==(0|0);
+          if ($378) {
+           $R$1$i9$lcssa = $R$1$i9;$RP$1$i8$lcssa = $RP$1$i8;
+           break;
+          } else {
+           $R$1$i9 = $377;$RP$1$i8 = $376;
+          }
+         }
+         $379 = ($RP$1$i8$lcssa>>>0)<($349>>>0);
+         if ($379) {
+          _abort();
+          // unreachable;
+         } else {
+          HEAP32[$RP$1$i8$lcssa>>2] = 0;
+          $R$3$i11 = $R$1$i9$lcssa;
+          break;
+         }
+        } else {
+         $358 = ((($v$4$lcssa$i)) + 8|0);
+         $359 = HEAP32[$358>>2]|0;
+         $360 = ($359>>>0)<($349>>>0);
+         if ($360) {
+          _abort();
+          // unreachable;
+         }
+         $361 = ((($359)) + 12|0);
+         $362 = HEAP32[$361>>2]|0;
+         $363 = ($362|0)==($v$4$lcssa$i|0);
+         if (!($363)) {
+          _abort();
+          // unreachable;
+         }
+         $364 = ((($356)) + 8|0);
+         $365 = HEAP32[$364>>2]|0;
+         $366 = ($365|0)==($v$4$lcssa$i|0);
+         if ($366) {
+          HEAP32[$361>>2] = $356;
+          HEAP32[$364>>2] = $359;
+          $R$3$i11 = $356;
+          break;
+         } else {
+          _abort();
+          // unreachable;
+         }
+        }
+       } while(0);
+       $380 = ($354|0)==(0|0);
+       do {
+        if (!($380)) {
+         $381 = ((($v$4$lcssa$i)) + 28|0);
+         $382 = HEAP32[$381>>2]|0;
+         $383 = (75248 + ($382<<2)|0);
+         $384 = HEAP32[$383>>2]|0;
+         $385 = ($v$4$lcssa$i|0)==($384|0);
+         if ($385) {
+          HEAP32[$383>>2] = $R$3$i11;
+          $cond$i12 = ($R$3$i11|0)==(0|0);
+          if ($cond$i12) {
+           $386 = 1 << $382;
+           $387 = $386 ^ -1;
+           $388 = HEAP32[(74948)>>2]|0;
+           $389 = $388 & $387;
+           HEAP32[(74948)>>2] = $389;
+           break;
+          }
+         } else {
+          $390 = HEAP32[(74960)>>2]|0;
+          $391 = ($354>>>0)<($390>>>0);
+          if ($391) {
+           _abort();
+           // unreachable;
+          }
+          $392 = ((($354)) + 16|0);
+          $393 = HEAP32[$392>>2]|0;
+          $394 = ($393|0)==($v$4$lcssa$i|0);
+          if ($394) {
+           HEAP32[$392>>2] = $R$3$i11;
+          } else {
+           $395 = ((($354)) + 20|0);
+           HEAP32[$395>>2] = $R$3$i11;
+          }
+          $396 = ($R$3$i11|0)==(0|0);
+          if ($396) {
+           break;
+          }
+         }
+         $397 = HEAP32[(74960)>>2]|0;
+         $398 = ($R$3$i11>>>0)<($397>>>0);
+         if ($398) {
+          _abort();
+          // unreachable;
+         }
+         $399 = ((($R$3$i11)) + 24|0);
+         HEAP32[$399>>2] = $354;
+         $400 = ((($v$4$lcssa$i)) + 16|0);
+         $401 = HEAP32[$400>>2]|0;
+         $402 = ($401|0)==(0|0);
+         do {
+          if (!($402)) {
+           $403 = ($401>>>0)<($397>>>0);
+           if ($403) {
+            _abort();
+            // unreachable;
+           } else {
+            $404 = ((($R$3$i11)) + 16|0);
+            HEAP32[$404>>2] = $401;
+            $405 = ((($401)) + 24|0);
+            HEAP32[$405>>2] = $R$3$i11;
+            break;
+           }
+          }
+         } while(0);
+         $406 = ((($v$4$lcssa$i)) + 20|0);
+         $407 = HEAP32[$406>>2]|0;
+         $408 = ($407|0)==(0|0);
+         if (!($408)) {
+          $409 = HEAP32[(74960)>>2]|0;
+          $410 = ($407>>>0)<($409>>>0);
+          if ($410) {
+           _abort();
+           // unreachable;
+          } else {
+           $411 = ((($R$3$i11)) + 20|0);
+           HEAP32[$411>>2] = $407;
+           $412 = ((($407)) + 24|0);
+           HEAP32[$412>>2] = $R$3$i11;
+           break;
+          }
+         }
+        }
+       } while(0);
+       $413 = ($rsize$4$lcssa$i>>>0)<(16);
+       do {
+        if ($413) {
+         $414 = (($rsize$4$lcssa$i) + ($248))|0;
+         $415 = $414 | 3;
+         $416 = ((($v$4$lcssa$i)) + 4|0);
+         HEAP32[$416>>2] = $415;
+         $417 = (($v$4$lcssa$i) + ($414)|0);
+         $418 = ((($417)) + 4|0);
+         $419 = HEAP32[$418>>2]|0;
+         $420 = $419 | 1;
+         HEAP32[$418>>2] = $420;
+        } else {
+         $421 = $248 | 3;
+         $422 = ((($v$4$lcssa$i)) + 4|0);
+         HEAP32[$422>>2] = $421;
+         $423 = $rsize$4$lcssa$i | 1;
+         $424 = ((($351)) + 4|0);
+         HEAP32[$424>>2] = $423;
+         $425 = (($351) + ($rsize$4$lcssa$i)|0);
+         HEAP32[$425>>2] = $rsize$4$lcssa$i;
+         $426 = $rsize$4$lcssa$i >>> 3;
+         $427 = ($rsize$4$lcssa$i>>>0)<(256);
+         if ($427) {
+          $428 = $426 << 1;
+          $429 = (74984 + ($428<<2)|0);
+          $430 = HEAP32[18736]|0;
+          $431 = 1 << $426;
+          $432 = $430 & $431;
+          $433 = ($432|0)==(0);
+          if ($433) {
+           $434 = $430 | $431;
+           HEAP32[18736] = $434;
+           $$pre$i13 = ((($429)) + 8|0);
+           $$pre$phi$i14Z2D = $$pre$i13;$F5$0$i = $429;
+          } else {
+           $435 = ((($429)) + 8|0);
+           $436 = HEAP32[$435>>2]|0;
+           $437 = HEAP32[(74960)>>2]|0;
+           $438 = ($436>>>0)<($437>>>0);
+           if ($438) {
+            _abort();
+            // unreachable;
+           } else {
+            $$pre$phi$i14Z2D = $435;$F5$0$i = $436;
+           }
+          }
+          HEAP32[$$pre$phi$i14Z2D>>2] = $351;
+          $439 = ((($F5$0$i)) + 12|0);
+          HEAP32[$439>>2] = $351;
+          $440 = ((($351)) + 8|0);
+          HEAP32[$440>>2] = $F5$0$i;
+          $441 = ((($351)) + 12|0);
+          HEAP32[$441>>2] = $429;
+          break;
+         }
+         $442 = $rsize$4$lcssa$i >>> 8;
+         $443 = ($442|0)==(0);
+         if ($443) {
+          $I7$0$i = 0;
+         } else {
+          $444 = ($rsize$4$lcssa$i>>>0)>(16777215);
+          if ($444) {
+           $I7$0$i = 31;
+          } else {
+           $445 = (($442) + 1048320)|0;
+           $446 = $445 >>> 16;
+           $447 = $446 & 8;
+           $448 = $442 << $447;
+           $449 = (($448) + 520192)|0;
+           $450 = $449 >>> 16;
+           $451 = $450 & 4;
+           $452 = $451 | $447;
+           $453 = $448 << $451;
+           $454 = (($453) + 245760)|0;
+           $455 = $454 >>> 16;
+           $456 = $455 & 2;
+           $457 = $452 | $456;
+           $458 = (14 - ($457))|0;
+           $459 = $453 << $456;
+           $460 = $459 >>> 15;
+           $461 = (($458) + ($460))|0;
+           $462 = $461 << 1;
+           $463 = (($461) + 7)|0;
+           $464 = $rsize$4$lcssa$i >>> $463;
+           $465 = $464 & 1;
+           $466 = $465 | $462;
+           $I7$0$i = $466;
+          }
+         }
+         $467 = (75248 + ($I7$0$i<<2)|0);
+         $468 = ((($351)) + 28|0);
+         HEAP32[$468>>2] = $I7$0$i;
+         $469 = ((($351)) + 16|0);
+         $470 = ((($469)) + 4|0);
+         HEAP32[$470>>2] = 0;
+         HEAP32[$469>>2] = 0;
+         $471 = HEAP32[(74948)>>2]|0;
+         $472 = 1 << $I7$0$i;
+         $473 = $471 & $472;
+         $474 = ($473|0)==(0);
+         if ($474) {
+          $475 = $471 | $472;
+          HEAP32[(74948)>>2] = $475;
+          HEAP32[$467>>2] = $351;
+          $476 = ((($351)) + 24|0);
+          HEAP32[$476>>2] = $467;
+          $477 = ((($351)) + 12|0);
+          HEAP32[$477>>2] = $351;
+          $478 = ((($351)) + 8|0);
+          HEAP32[$478>>2] = $351;
+          break;
+         }
+         $479 = HEAP32[$467>>2]|0;
+         $480 = ($I7$0$i|0)==(31);
+         $481 = $I7$0$i >>> 1;
+         $482 = (25 - ($481))|0;
+         $483 = $480 ? 0 : $482;
+         $484 = $rsize$4$lcssa$i << $483;
+         $K12$0$i = $484;$T$0$i = $479;
+         while(1) {
+          $485 = ((($T$0$i)) + 4|0);
+          $486 = HEAP32[$485>>2]|0;
+          $487 = $486 & -8;
+          $488 = ($487|0)==($rsize$4$lcssa$i|0);
+          if ($488) {
+           $T$0$i$lcssa = $T$0$i;
+           label = 148;
+           break;
+          }
+          $489 = $K12$0$i >>> 31;
+          $490 = (((($T$0$i)) + 16|0) + ($489<<2)|0);
+          $491 = $K12$0$i << 1;
+          $492 = HEAP32[$490>>2]|0;
+          $493 = ($492|0)==(0|0);
+          if ($493) {
+           $$lcssa157 = $490;$T$0$i$lcssa156 = $T$0$i;
+           label = 145;
+           break;
+          } else {
+           $K12$0$i = $491;$T$0$i = $492;
+          }
+         }
+         if ((label|0) == 145) {
+          $494 = HEAP32[(74960)>>2]|0;
+          $495 = ($$lcssa157>>>0)<($494>>>0);
+          if ($495) {
+           _abort();
+           // unreachable;
+          } else {
+           HEAP32[$$lcssa157>>2] = $351;
+           $496 = ((($351)) + 24|0);
+           HEAP32[$496>>2] = $T$0$i$lcssa156;
+           $497 = ((($351)) + 12|0);
+           HEAP32[$497>>2] = $351;
+           $498 = ((($351)) + 8|0);
+           HEAP32[$498>>2] = $351;
+           break;
+          }
+         }
+         else if ((label|0) == 148) {
+          $499 = ((($T$0$i$lcssa)) + 8|0);
+          $500 = HEAP32[$499>>2]|0;
+          $501 = HEAP32[(74960)>>2]|0;
+          $502 = ($500>>>0)>=($501>>>0);
+          $not$7$i = ($T$0$i$lcssa>>>0)>=($501>>>0);
+          $503 = $502 & $not$7$i;
+          if ($503) {
+           $504 = ((($500)) + 12|0);
+           HEAP32[$504>>2] = $351;
+           HEAP32[$499>>2] = $351;
+           $505 = ((($351)) + 8|0);
+           HEAP32[$505>>2] = $500;
+           $506 = ((($351)) + 12|0);
+           HEAP32[$506>>2] = $T$0$i$lcssa;
+           $507 = ((($351)) + 24|0);
+           HEAP32[$507>>2] = 0;
+           break;
+          } else {
+           _abort();
+           // unreachable;
+          }
+         }
+        }
+       } while(0);
+       $508 = ((($v$4$lcssa$i)) + 8|0);
+       $$0 = $508;
+       STACKTOP = sp;return ($$0|0);
+      } else {
+       $nb$0 = $248;
+      }
+     }
+    }
+   }
+  }
+ } while(0);
+ $509 = HEAP32[(74952)>>2]|0;
+ $510 = ($509>>>0)<($nb$0>>>0);
+ if (!($510)) {
+  $511 = (($509) - ($nb$0))|0;
+  $512 = HEAP32[(74964)>>2]|0;
+  $513 = ($511>>>0)>(15);
+  if ($513) {
+   $514 = (($512) + ($nb$0)|0);
+   HEAP32[(74964)>>2] = $514;
+   HEAP32[(74952)>>2] = $511;
+   $515 = $511 | 1;
+   $516 = ((($514)) + 4|0);
+   HEAP32[$516>>2] = $515;
+   $517 = (($514) + ($511)|0);
+   HEAP32[$517>>2] = $511;
+   $518 = $nb$0 | 3;
+   $519 = ((($512)) + 4|0);
+   HEAP32[$519>>2] = $518;
+  } else {
+   HEAP32[(74952)>>2] = 0;
+   HEAP32[(74964)>>2] = 0;
+   $520 = $509 | 3;
+   $521 = ((($512)) + 4|0);
+   HEAP32[$521>>2] = $520;
+   $522 = (($512) + ($509)|0);
+   $523 = ((($522)) + 4|0);
+   $524 = HEAP32[$523>>2]|0;
+   $525 = $524 | 1;
+   HEAP32[$523>>2] = $525;
+  }
+  $526 = ((($512)) + 8|0);
+  $$0 = $526;
+  STACKTOP = sp;return ($$0|0);
+ }
+ $527 = HEAP32[(74956)>>2]|0;
+ $528 = ($527>>>0)>($nb$0>>>0);
+ if ($528) {
+  $529 = (($527) - ($nb$0))|0;
+  HEAP32[(74956)>>2] = $529;
+  $530 = HEAP32[(74968)>>2]|0;
+  $531 = (($530) + ($nb$0)|0);
+  HEAP32[(74968)>>2] = $531;
+  $532 = $529 | 1;
+  $533 = ((($531)) + 4|0);
+  HEAP32[$533>>2] = $532;
+  $534 = $nb$0 | 3;
+  $535 = ((($530)) + 4|0);
+  HEAP32[$535>>2] = $534;
+  $536 = ((($530)) + 8|0);
+  $$0 = $536;
+  STACKTOP = sp;return ($$0|0);
+ }
+ $537 = HEAP32[18854]|0;
+ $538 = ($537|0)==(0);
+ if ($538) {
+  HEAP32[(75424)>>2] = 4096;
+  HEAP32[(75420)>>2] = 4096;
+  HEAP32[(75428)>>2] = -1;
+  HEAP32[(75432)>>2] = -1;
+  HEAP32[(75436)>>2] = 0;
+  HEAP32[(75388)>>2] = 0;
+  $539 = $magic$i$i;
+  $540 = $539 & -16;
+  $541 = $540 ^ 1431655768;
+  HEAP32[$magic$i$i>>2] = $541;
+  HEAP32[18854] = $541;
+ }
+ $542 = (($nb$0) + 48)|0;
+ $543 = HEAP32[(75424)>>2]|0;
+ $544 = (($nb$0) + 47)|0;
+ $545 = (($543) + ($544))|0;
+ $546 = (0 - ($543))|0;
+ $547 = $545 & $546;
+ $548 = ($547>>>0)>($nb$0>>>0);
+ if (!($548)) {
+  $$0 = 0;
+  STACKTOP = sp;return ($$0|0);
+ }
+ $549 = HEAP32[(75384)>>2]|0;
+ $550 = ($549|0)==(0);
+ if (!($550)) {
+  $551 = HEAP32[(75376)>>2]|0;
+  $552 = (($551) + ($547))|0;
+  $553 = ($552>>>0)<=($551>>>0);
+  $554 = ($552>>>0)>($549>>>0);
+  $or$cond1$i16 = $553 | $554;
+  if ($or$cond1$i16) {
+   $$0 = 0;
+   STACKTOP = sp;return ($$0|0);
+  }
+ }
+ $555 = HEAP32[(75388)>>2]|0;
+ $556 = $555 & 4;
+ $557 = ($556|0)==(0);
+ L254: do {
+  if ($557) {
+   $558 = HEAP32[(74968)>>2]|0;
+   $559 = ($558|0)==(0|0);
+   L256: do {
+    if ($559) {
+     label = 171;
+    } else {
+     $sp$0$i$i = (75392);
+     while(1) {
+      $560 = HEAP32[$sp$0$i$i>>2]|0;
+      $561 = ($560>>>0)>($558>>>0);
+      if (!($561)) {
+       $562 = ((($sp$0$i$i)) + 4|0);
+       $563 = HEAP32[$562>>2]|0;
+       $564 = (($560) + ($563)|0);
+       $565 = ($564>>>0)>($558>>>0);
+       if ($565) {
+        $$lcssa153 = $sp$0$i$i;$$lcssa155 = $562;
+        break;
+       }
+      }
+      $566 = ((($sp$0$i$i)) + 8|0);
+      $567 = HEAP32[$566>>2]|0;
+      $568 = ($567|0)==(0|0);
+      if ($568) {
+       label = 171;
+       break L256;
+      } else {
+       $sp$0$i$i = $567;
+      }
+     }
+     $591 = HEAP32[(74956)>>2]|0;
+     $592 = (($545) - ($591))|0;
+     $593 = $592 & $546;
+     $594 = ($593>>>0)<(2147483647);
+     if ($594) {
+      $595 = (_sbrk(($593|0))|0);
+      $596 = HEAP32[$$lcssa153>>2]|0;
+      $597 = HEAP32[$$lcssa155>>2]|0;
+      $598 = (($596) + ($597)|0);
+      $599 = ($595|0)==($598|0);
+      if ($599) {
+       $600 = ($595|0)==((-1)|0);
+       if (!($600)) {
+        $tbase$746$i = $595;$tsize$745$i = $593;
+        label = 191;
+        break L254;
+       }
+      } else {
+       $br$2$ph$i = $595;$ssize$2$ph$i = $593;
+       label = 181;
+      }
+     }
+    }
+   } while(0);
+   do {
+    if ((label|0) == 171) {
+     $569 = (_sbrk(0)|0);
+     $570 = ($569|0)==((-1)|0);
+     if (!($570)) {
+      $571 = $569;
+      $572 = HEAP32[(75420)>>2]|0;
+      $573 = (($572) + -1)|0;
+      $574 = $573 & $571;
+      $575 = ($574|0)==(0);
+      if ($575) {
+       $ssize$0$i = $547;
+      } else {
+       $576 = (($573) + ($571))|0;
+       $577 = (0 - ($572))|0;
+       $578 = $576 & $577;
+       $579 = (($547) - ($571))|0;
+       $580 = (($579) + ($578))|0;
+       $ssize$0$i = $580;
+      }
+      $581 = HEAP32[(75376)>>2]|0;
+      $582 = (($581) + ($ssize$0$i))|0;
+      $583 = ($ssize$0$i>>>0)>($nb$0>>>0);
+      $584 = ($ssize$0$i>>>0)<(2147483647);
+      $or$cond$i17 = $583 & $584;
+      if ($or$cond$i17) {
+       $585 = HEAP32[(75384)>>2]|0;
+       $586 = ($585|0)==(0);
+       if (!($586)) {
+        $587 = ($582>>>0)<=($581>>>0);
+        $588 = ($582>>>0)>($585>>>0);
+        $or$cond2$i = $587 | $588;
+        if ($or$cond2$i) {
+         break;
+        }
+       }
+       $589 = (_sbrk(($ssize$0$i|0))|0);
+       $590 = ($589|0)==($569|0);
+       if ($590) {
+        $tbase$746$i = $569;$tsize$745$i = $ssize$0$i;
+        label = 191;
+        break L254;
+       } else {
+        $br$2$ph$i = $589;$ssize$2$ph$i = $ssize$0$i;
+        label = 181;
+       }
+      }
+     }
+    }
+   } while(0);
+   L276: do {
+    if ((label|0) == 181) {
+     $601 = (0 - ($ssize$2$ph$i))|0;
+     $602 = ($br$2$ph$i|0)!=((-1)|0);
+     $603 = ($ssize$2$ph$i>>>0)<(2147483647);
+     $or$cond7$i = $603 & $602;
+     $604 = ($542>>>0)>($ssize$2$ph$i>>>0);
+     $or$cond8$i = $604 & $or$cond7$i;
+     do {
+      if ($or$cond8$i) {
+       $605 = HEAP32[(75424)>>2]|0;
+       $606 = (($544) - ($ssize$2$ph$i))|0;
+       $607 = (($606) + ($605))|0;
+       $608 = (0 - ($605))|0;
+       $609 = $607 & $608;
+       $610 = ($609>>>0)<(2147483647);
+       if ($610) {
+        $611 = (_sbrk(($609|0))|0);
+        $612 = ($611|0)==((-1)|0);
+        if ($612) {
+         (_sbrk(($601|0))|0);
+         break L276;
+        } else {
+         $613 = (($609) + ($ssize$2$ph$i))|0;
+         $ssize$5$i = $613;
+         break;
+        }
+       } else {
+        $ssize$5$i = $ssize$2$ph$i;
+       }
+      } else {
+       $ssize$5$i = $ssize$2$ph$i;
+      }
+     } while(0);
+     $614 = ($br$2$ph$i|0)==((-1)|0);
+     if (!($614)) {
+      $tbase$746$i = $br$2$ph$i;$tsize$745$i = $ssize$5$i;
+      label = 191;
+      break L254;
+     }
+    }
+   } while(0);
+   $615 = HEAP32[(75388)>>2]|0;
+   $616 = $615 | 4;
+   HEAP32[(75388)>>2] = $616;
+   label = 188;
+  } else {
+   label = 188;
+  }
+ } while(0);
+ if ((label|0) == 188) {
+  $617 = ($547>>>0)<(2147483647);
+  if ($617) {
+   $618 = (_sbrk(($547|0))|0);
+   $619 = (_sbrk(0)|0);
+   $620 = ($618|0)!=((-1)|0);
+   $621 = ($619|0)!=((-1)|0);
+   $or$cond5$i = $620 & $621;
+   $622 = ($618>>>0)<($619>>>0);
+   $or$cond10$i = $622 & $or$cond5$i;
+   if ($or$cond10$i) {
+    $623 = $619;
+    $624 = $618;
+    $625 = (($623) - ($624))|0;
+    $626 = (($nb$0) + 40)|0;
+    $$not$i = ($625>>>0)>($626>>>0);
+    if ($$not$i) {
+     $tbase$746$i = $618;$tsize$745$i = $625;
+     label = 191;
+    }
+   }
+  }
+ }
+ if ((label|0) == 191) {
+  $627 = HEAP32[(75376)>>2]|0;
+  $628 = (($627) + ($tsize$745$i))|0;
+  HEAP32[(75376)>>2] = $628;
+  $629 = HEAP32[(75380)>>2]|0;
+  $630 = ($628>>>0)>($629>>>0);
+  if ($630) {
+   HEAP32[(75380)>>2] = $628;
+  }
+  $631 = HEAP32[(74968)>>2]|0;
+  $632 = ($631|0)==(0|0);
+  do {
+   if ($632) {
+    $633 = HEAP32[(74960)>>2]|0;
+    $634 = ($633|0)==(0|0);
+    $635 = ($tbase$746$i>>>0)<($633>>>0);
+    $or$cond11$i = $634 | $635;
+    if ($or$cond11$i) {
+     HEAP32[(74960)>>2] = $tbase$746$i;
+    }
+    HEAP32[(75392)>>2] = $tbase$746$i;
+    HEAP32[(75396)>>2] = $tsize$745$i;
+    HEAP32[(75404)>>2] = 0;
+    $636 = HEAP32[18854]|0;
+    HEAP32[(74980)>>2] = $636;
+    HEAP32[(74976)>>2] = -1;
+    $i$01$i$i = 0;
+    while(1) {
+     $637 = $i$01$i$i << 1;
+     $638 = (74984 + ($637<<2)|0);
+     $639 = ((($638)) + 12|0);
+     HEAP32[$639>>2] = $638;
+     $640 = ((($638)) + 8|0);
+     HEAP32[$640>>2] = $638;
+     $641 = (($i$01$i$i) + 1)|0;
+     $exitcond$i$i = ($641|0)==(32);
+     if ($exitcond$i$i) {
+      break;
+     } else {
+      $i$01$i$i = $641;
+     }
+    }
+    $642 = (($tsize$745$i) + -40)|0;
+    $643 = ((($tbase$746$i)) + 8|0);
+    $644 = $643;
+    $645 = $644 & 7;
+    $646 = ($645|0)==(0);
+    $647 = (0 - ($644))|0;
+    $648 = $647 & 7;
+    $649 = $646 ? 0 : $648;
+    $650 = (($tbase$746$i) + ($649)|0);
+    $651 = (($642) - ($649))|0;
+    HEAP32[(74968)>>2] = $650;
+    HEAP32[(74956)>>2] = $651;
+    $652 = $651 | 1;
+    $653 = ((($650)) + 4|0);
+    HEAP32[$653>>2] = $652;
+    $654 = (($650) + ($651)|0);
+    $655 = ((($654)) + 4|0);
+    HEAP32[$655>>2] = 40;
+    $656 = HEAP32[(75432)>>2]|0;
+    HEAP32[(74972)>>2] = $656;
+   } else {
+    $sp$068$i = (75392);
+    while(1) {
+     $657 = HEAP32[$sp$068$i>>2]|0;
+     $658 = ((($sp$068$i)) + 4|0);
+     $659 = HEAP32[$658>>2]|0;
+     $660 = (($657) + ($659)|0);
+     $661 = ($tbase$746$i|0)==($660|0);
+     if ($661) {
+      $$lcssa147 = $657;$$lcssa149 = $658;$$lcssa151 = $659;$sp$068$i$lcssa = $sp$068$i;
+      label = 201;
+      break;
+     }
+     $662 = ((($sp$068$i)) + 8|0);
+     $663 = HEAP32[$662>>2]|0;
+     $664 = ($663|0)==(0|0);
+     if ($664) {
+      break;
+     } else {
+      $sp$068$i = $663;
+     }
+    }
+    if ((label|0) == 201) {
+     $665 = ((($sp$068$i$lcssa)) + 12|0);
+     $666 = HEAP32[$665>>2]|0;
+     $667 = $666 & 8;
+     $668 = ($667|0)==(0);
+     if ($668) {
+      $669 = ($631>>>0)>=($$lcssa147>>>0);
+      $670 = ($631>>>0)<($tbase$746$i>>>0);
+      $or$cond48$i = $670 & $669;
+      if ($or$cond48$i) {
+       $671 = (($$lcssa151) + ($tsize$745$i))|0;
+       HEAP32[$$lcssa149>>2] = $671;
+       $672 = HEAP32[(74956)>>2]|0;
+       $673 = ((($631)) + 8|0);
+       $674 = $673;
+       $675 = $674 & 7;
+       $676 = ($675|0)==(0);
+       $677 = (0 - ($674))|0;
+       $678 = $677 & 7;
+       $679 = $676 ? 0 : $678;
+       $680 = (($631) + ($679)|0);
+       $681 = (($tsize$745$i) - ($679))|0;
+       $682 = (($681) + ($672))|0;
+       HEAP32[(74968)>>2] = $680;
+       HEAP32[(74956)>>2] = $682;
+       $683 = $682 | 1;
+       $684 = ((($680)) + 4|0);
+       HEAP32[$684>>2] = $683;
+       $685 = (($680) + ($682)|0);
+       $686 = ((($685)) + 4|0);
+       HEAP32[$686>>2] = 40;
+       $687 = HEAP32[(75432)>>2]|0;
+       HEAP32[(74972)>>2] = $687;
+       break;
+      }
+     }
+    }
+    $688 = HEAP32[(74960)>>2]|0;
+    $689 = ($tbase$746$i>>>0)<($688>>>0);
+    if ($689) {
+     HEAP32[(74960)>>2] = $tbase$746$i;
+     $753 = $tbase$746$i;
+    } else {
+     $753 = $688;
+    }
+    $690 = (($tbase$746$i) + ($tsize$745$i)|0);
+    $sp$167$i = (75392);
+    while(1) {
+     $691 = HEAP32[$sp$167$i>>2]|0;
+     $692 = ($691|0)==($690|0);
+     if ($692) {
+      $$lcssa144 = $sp$167$i;$sp$167$i$lcssa = $sp$167$i;
+      label = 209;
+      break;
+     }
+     $693 = ((($sp$167$i)) + 8|0);
+     $694 = HEAP32[$693>>2]|0;
+     $695 = ($694|0)==(0|0);
+     if ($695) {
+      $sp$0$i$i$i = (75392);
+      break;
+     } else {
+      $sp$167$i = $694;
+     }
+    }
+    if ((label|0) == 209) {
+     $696 = ((($sp$167$i$lcssa)) + 12|0);
+     $697 = HEAP32[$696>>2]|0;
+     $698 = $697 & 8;
+     $699 = ($698|0)==(0);
+     if ($699) {
+      HEAP32[$$lcssa144>>2] = $tbase$746$i;
+      $700 = ((($sp$167$i$lcssa)) + 4|0);
+      $701 = HEAP32[$700>>2]|0;
+      $702 = (($701) + ($tsize$745$i))|0;
+      HEAP32[$700>>2] = $702;
+      $703 = ((($tbase$746$i)) + 8|0);
+      $704 = $703;
+      $705 = $704 & 7;
+      $706 = ($705|0)==(0);
+      $707 = (0 - ($704))|0;
+      $708 = $707 & 7;
+      $709 = $706 ? 0 : $708;
+      $710 = (($tbase$746$i) + ($709)|0);
+      $711 = ((($690)) + 8|0);
+      $712 = $711;
+      $713 = $712 & 7;
+      $714 = ($713|0)==(0);
+      $715 = (0 - ($712))|0;
+      $716 = $715 & 7;
+      $717 = $714 ? 0 : $716;
+      $718 = (($690) + ($717)|0);
+      $719 = $718;
+      $720 = $710;
+      $721 = (($719) - ($720))|0;
+      $722 = (($710) + ($nb$0)|0);
+      $723 = (($721) - ($nb$0))|0;
+      $724 = $nb$0 | 3;
+      $725 = ((($710)) + 4|0);
+      HEAP32[$725>>2] = $724;
+      $726 = ($718|0)==($631|0);
+      do {
+       if ($726) {
+        $727 = HEAP32[(74956)>>2]|0;
+        $728 = (($727) + ($723))|0;
+        HEAP32[(74956)>>2] = $728;
+        HEAP32[(74968)>>2] = $722;
+        $729 = $728 | 1;
+        $730 = ((($722)) + 4|0);
+        HEAP32[$730>>2] = $729;
+       } else {
+        $731 = HEAP32[(74964)>>2]|0;
+        $732 = ($718|0)==($731|0);
+        if ($732) {
+         $733 = HEAP32[(74952)>>2]|0;
+         $734 = (($733) + ($723))|0;
+         HEAP32[(74952)>>2] = $734;
+         HEAP32[(74964)>>2] = $722;
+         $735 = $734 | 1;
+         $736 = ((($722)) + 4|0);
+         HEAP32[$736>>2] = $735;
+         $737 = (($722) + ($734)|0);
+         HEAP32[$737>>2] = $734;
+         break;
+        }
+        $738 = ((($718)) + 4|0);
+        $739 = HEAP32[$738>>2]|0;
+        $740 = $739 & 3;
+        $741 = ($740|0)==(1);
+        if ($741) {
+         $742 = $739 & -8;
+         $743 = $739 >>> 3;
+         $744 = ($739>>>0)<(256);
+         L328: do {
+          if ($744) {
+           $745 = ((($718)) + 8|0);
+           $746 = HEAP32[$745>>2]|0;
+           $747 = ((($718)) + 12|0);
+           $748 = HEAP32[$747>>2]|0;
+           $749 = $743 << 1;
+           $750 = (74984 + ($749<<2)|0);
+           $751 = ($746|0)==($750|0);
+           do {
+            if (!($751)) {
+             $752 = ($746>>>0)<($753>>>0);
+             if ($752) {
+              _abort();
+              // unreachable;
+             }
+             $754 = ((($746)) + 12|0);
+             $755 = HEAP32[$754>>2]|0;
+             $756 = ($755|0)==($718|0);
+             if ($756) {
+              break;
+             }
+             _abort();
+             // unreachable;
+            }
+           } while(0);
+           $757 = ($748|0)==($746|0);
+           if ($757) {
+            $758 = 1 << $743;
+            $759 = $758 ^ -1;
+            $760 = HEAP32[18736]|0;
+            $761 = $760 & $759;
+            HEAP32[18736] = $761;
+            break;
+           }
+           $762 = ($748|0)==($750|0);
+           do {
+            if ($762) {
+             $$pre9$i$i = ((($748)) + 8|0);
+             $$pre$phi10$i$iZ2D = $$pre9$i$i;
+            } else {
+             $763 = ($748>>>0)<($753>>>0);
+             if ($763) {
+              _abort();
+              // unreachable;
+             }
+             $764 = ((($748)) + 8|0);
+             $765 = HEAP32[$764>>2]|0;
+             $766 = ($765|0)==($718|0);
+             if ($766) {
+              $$pre$phi10$i$iZ2D = $764;
+              break;
+             }
+             _abort();
+             // unreachable;
+            }
+           } while(0);
+           $767 = ((($746)) + 12|0);
+           HEAP32[$767>>2] = $748;
+           HEAP32[$$pre$phi10$i$iZ2D>>2] = $746;
+          } else {
+           $768 = ((($718)) + 24|0);
+           $769 = HEAP32[$768>>2]|0;
+           $770 = ((($718)) + 12|0);
+           $771 = HEAP32[$770>>2]|0;
+           $772 = ($771|0)==($718|0);
+           do {
+            if ($772) {
+             $782 = ((($718)) + 16|0);
+             $783 = ((($782)) + 4|0);
+             $784 = HEAP32[$783>>2]|0;
+             $785 = ($784|0)==(0|0);
+             if ($785) {
+              $786 = HEAP32[$782>>2]|0;
+              $787 = ($786|0)==(0|0);
+              if ($787) {
+               $R$3$i$i = 0;
+               break;
+              } else {
+               $R$1$i$i = $786;$RP$1$i$i = $782;
+              }
+             } else {
+              $R$1$i$i = $784;$RP$1$i$i = $783;
+             }
+             while(1) {
+              $788 = ((($R$1$i$i)) + 20|0);
+              $789 = HEAP32[$788>>2]|0;
+              $790 = ($789|0)==(0|0);
+              if (!($790)) {
+               $R$1$i$i = $789;$RP$1$i$i = $788;
+               continue;
+              }
+              $791 = ((($R$1$i$i)) + 16|0);
+              $792 = HEAP32[$791>>2]|0;
+              $793 = ($792|0)==(0|0);
+              if ($793) {
+               $R$1$i$i$lcssa = $R$1$i$i;$RP$1$i$i$lcssa = $RP$1$i$i;
+               break;
+              } else {
+               $R$1$i$i = $792;$RP$1$i$i = $791;
+              }
+             }
+             $794 = ($RP$1$i$i$lcssa>>>0)<($753>>>0);
+             if ($794) {
+              _abort();
+              // unreachable;
+             } else {
+              HEAP32[$RP$1$i$i$lcssa>>2] = 0;
+              $R$3$i$i = $R$1$i$i$lcssa;
+              break;
+             }
+            } else {
+             $773 = ((($718)) + 8|0);
+             $774 = HEAP32[$773>>2]|0;
+             $775 = ($774>>>0)<($753>>>0);
+             if ($775) {
+              _abort();
+              // unreachable;
+             }
+             $776 = ((($774)) + 12|0);
+             $777 = HEAP32[$776>>2]|0;
+             $778 = ($777|0)==($718|0);
+             if (!($778)) {
+              _abort();
+              // unreachable;
+             }
+             $779 = ((($771)) + 8|0);
+             $780 = HEAP32[$779>>2]|0;
+             $781 = ($780|0)==($718|0);
+             if ($781) {
+              HEAP32[$776>>2] = $771;
+              HEAP32[$779>>2] = $774;
+              $R$3$i$i = $771;
+              break;
+             } else {
+              _abort();
+              // unreachable;
+             }
+            }
+           } while(0);
+           $795 = ($769|0)==(0|0);
+           if ($795) {
+            break;
+           }
+           $796 = ((($718)) + 28|0);
+           $797 = HEAP32[$796>>2]|0;
+           $798 = (75248 + ($797<<2)|0);
+           $799 = HEAP32[$798>>2]|0;
+           $800 = ($718|0)==($799|0);
+           do {
+            if ($800) {
+             HEAP32[$798>>2] = $R$3$i$i;
+             $cond$i$i = ($R$3$i$i|0)==(0|0);
+             if (!($cond$i$i)) {
+              break;
+             }
+             $801 = 1 << $797;
+             $802 = $801 ^ -1;
+             $803 = HEAP32[(74948)>>2]|0;
+             $804 = $803 & $802;
+             HEAP32[(74948)>>2] = $804;
+             break L328;
+            } else {
+             $805 = HEAP32[(74960)>>2]|0;
+             $806 = ($769>>>0)<($805>>>0);
+             if ($806) {
+              _abort();
+              // unreachable;
+             }
+             $807 = ((($769)) + 16|0);
+             $808 = HEAP32[$807>>2]|0;
+             $809 = ($808|0)==($718|0);
+             if ($809) {
+              HEAP32[$807>>2] = $R$3$i$i;
+             } else {
+              $810 = ((($769)) + 20|0);
+              HEAP32[$810>>2] = $R$3$i$i;
+             }
+             $811 = ($R$3$i$i|0)==(0|0);
+             if ($811) {
+              break L328;
+             }
+            }
+           } while(0);
+           $812 = HEAP32[(74960)>>2]|0;
+           $813 = ($R$3$i$i>>>0)<($812>>>0);
+           if ($813) {
+            _abort();
+            // unreachable;
+           }
+           $814 = ((($R$3$i$i)) + 24|0);
+           HEAP32[$814>>2] = $769;
+           $815 = ((($718)) + 16|0);
+           $816 = HEAP32[$815>>2]|0;
+           $817 = ($816|0)==(0|0);
+           do {
+            if (!($817)) {
+             $818 = ($816>>>0)<($812>>>0);
+             if ($818) {
+              _abort();
+              // unreachable;
+             } else {
+              $819 = ((($R$3$i$i)) + 16|0);
+              HEAP32[$819>>2] = $816;
+              $820 = ((($816)) + 24|0);
+              HEAP32[$820>>2] = $R$3$i$i;
+              break;
+             }
+            }
+           } while(0);
+           $821 = ((($815)) + 4|0);
+           $822 = HEAP32[$821>>2]|0;
+           $823 = ($822|0)==(0|0);
+           if ($823) {
+            break;
+           }
+           $824 = HEAP32[(74960)>>2]|0;
+           $825 = ($822>>>0)<($824>>>0);
+           if ($825) {
+            _abort();
+            // unreachable;
+           } else {
+            $826 = ((($R$3$i$i)) + 20|0);
+            HEAP32[$826>>2] = $822;
+            $827 = ((($822)) + 24|0);
+            HEAP32[$827>>2] = $R$3$i$i;
+            break;
+           }
+          }
+         } while(0);
+         $828 = (($718) + ($742)|0);
+         $829 = (($742) + ($723))|0;
+         $oldfirst$0$i$i = $828;$qsize$0$i$i = $829;
+        } else {
+         $oldfirst$0$i$i = $718;$qsize$0$i$i = $723;
+        }
+        $830 = ((($oldfirst$0$i$i)) + 4|0);
+        $831 = HEAP32[$830>>2]|0;
+        $832 = $831 & -2;
+        HEAP32[$830>>2] = $832;
+        $833 = $qsize$0$i$i | 1;
+        $834 = ((($722)) + 4|0);
+        HEAP32[$834>>2] = $833;
+        $835 = (($722) + ($qsize$0$i$i)|0);
+        HEAP32[$835>>2] = $qsize$0$i$i;
+        $836 = $qsize$0$i$i >>> 3;
+        $837 = ($qsize$0$i$i>>>0)<(256);
+        if ($837) {
+         $838 = $836 << 1;
+         $839 = (74984 + ($838<<2)|0);
+         $840 = HEAP32[18736]|0;
+         $841 = 1 << $836;
+         $842 = $840 & $841;
+         $843 = ($842|0)==(0);
+         do {
+          if ($843) {
+           $844 = $840 | $841;
+           HEAP32[18736] = $844;
+           $$pre$i16$i = ((($839)) + 8|0);
+           $$pre$phi$i17$iZ2D = $$pre$i16$i;$F4$0$i$i = $839;
+          } else {
+           $845 = ((($839)) + 8|0);
+           $846 = HEAP32[$845>>2]|0;
+           $847 = HEAP32[(74960)>>2]|0;
+           $848 = ($846>>>0)<($847>>>0);
+           if (!($848)) {
+            $$pre$phi$i17$iZ2D = $845;$F4$0$i$i = $846;
+            break;
+           }
+           _abort();
+           // unreachable;
+          }
+         } while(0);
+         HEAP32[$$pre$phi$i17$iZ2D>>2] = $722;
+         $849 = ((($F4$0$i$i)) + 12|0);
+         HEAP32[$849>>2] = $722;
+         $850 = ((($722)) + 8|0);
+         HEAP32[$850>>2] = $F4$0$i$i;
+         $851 = ((($722)) + 12|0);
+         HEAP32[$851>>2] = $839;
+         break;
+        }
+        $852 = $qsize$0$i$i >>> 8;
+        $853 = ($852|0)==(0);
+        do {
+         if ($853) {
+          $I7$0$i$i = 0;
+         } else {
+          $854 = ($qsize$0$i$i>>>0)>(16777215);
+          if ($854) {
+           $I7$0$i$i = 31;
+           break;
+          }
+          $855 = (($852) + 1048320)|0;
+          $856 = $855 >>> 16;
+          $857 = $856 & 8;
+          $858 = $852 << $857;
+          $859 = (($858) + 520192)|0;
+          $860 = $859 >>> 16;
+          $861 = $860 & 4;
+          $862 = $861 | $857;
+          $863 = $858 << $861;
+          $864 = (($863) + 245760)|0;
+          $865 = $864 >>> 16;
+          $866 = $865 & 2;
+          $867 = $862 | $866;
+          $868 = (14 - ($867))|0;
+          $869 = $863 << $866;
+          $870 = $869 >>> 15;
+          $871 = (($868) + ($870))|0;
+          $872 = $871 << 1;
+          $873 = (($871) + 7)|0;
+          $874 = $qsize$0$i$i >>> $873;
+          $875 = $874 & 1;
+          $876 = $875 | $872;
+          $I7$0$i$i = $876;
+         }
+        } while(0);
+        $877 = (75248 + ($I7$0$i$i<<2)|0);
+        $878 = ((($722)) + 28|0);
+        HEAP32[$878>>2] = $I7$0$i$i;
+        $879 = ((($722)) + 16|0);
+        $880 = ((($879)) + 4|0);
+        HEAP32[$880>>2] = 0;
+        HEAP32[$879>>2] = 0;
+        $881 = HEAP32[(74948)>>2]|0;
+        $882 = 1 << $I7$0$i$i;
+        $883 = $881 & $882;
+        $884 = ($883|0)==(0);
+        if ($884) {
+         $885 = $881 | $882;
+         HEAP32[(74948)>>2] = $885;
+         HEAP32[$877>>2] = $722;
+         $886 = ((($722)) + 24|0);
+         HEAP32[$886>>2] = $877;
+         $887 = ((($722)) + 12|0);
+         HEAP32[$887>>2] = $722;
+         $888 = ((($722)) + 8|0);
+         HEAP32[$888>>2] = $722;
+         break;
+        }
+        $889 = HEAP32[$877>>2]|0;
+        $890 = ($I7$0$i$i|0)==(31);
+        $891 = $I7$0$i$i >>> 1;
+        $892 = (25 - ($891))|0;
+        $893 = $890 ? 0 : $892;
+        $894 = $qsize$0$i$i << $893;
+        $K8$0$i$i = $894;$T$0$i18$i = $889;
+        while(1) {
+         $895 = ((($T$0$i18$i)) + 4|0);
+         $896 = HEAP32[$895>>2]|0;
+         $897 = $896 & -8;
+         $898 = ($897|0)==($qsize$0$i$i|0);
+         if ($898) {
+          $T$0$i18$i$lcssa = $T$0$i18$i;
+          label = 279;
+          break;
+         }
+         $899 = $K8$0$i$i >>> 31;
+         $900 = (((($T$0$i18$i)) + 16|0) + ($899<<2)|0);
+         $901 = $K8$0$i$i << 1;
+         $902 = HEAP32[$900>>2]|0;
+         $903 = ($902|0)==(0|0);
+         if ($903) {
+          $$lcssa = $900;$T$0$i18$i$lcssa139 = $T$0$i18$i;
+          label = 276;
+          break;
+         } else {
+          $K8$0$i$i = $901;$T$0$i18$i = $902;
+         }
+        }
+        if ((label|0) == 276) {
+         $904 = HEAP32[(74960)>>2]|0;
+         $905 = ($$lcssa>>>0)<($904>>>0);
+         if ($905) {
+          _abort();
+          // unreachable;
+         } else {
+          HEAP32[$$lcssa>>2] = $722;
+          $906 = ((($722)) + 24|0);
+          HEAP32[$906>>2] = $T$0$i18$i$lcssa139;
+          $907 = ((($722)) + 12|0);
+          HEAP32[$907>>2] = $722;
+          $908 = ((($722)) + 8|0);
+          HEAP32[$908>>2] = $722;
+          break;
+         }
+        }
+        else if ((label|0) == 279) {
+         $909 = ((($T$0$i18$i$lcssa)) + 8|0);
+         $910 = HEAP32[$909>>2]|0;
+         $911 = HEAP32[(74960)>>2]|0;
+         $912 = ($910>>>0)>=($911>>>0);
+         $not$$i20$i = ($T$0$i18$i$lcssa>>>0)>=($911>>>0);
+         $913 = $912 & $not$$i20$i;
+         if ($913) {
+          $914 = ((($910)) + 12|0);
+          HEAP32[$914>>2] = $722;
+          HEAP32[$909>>2] = $722;
+          $915 = ((($722)) + 8|0);
+          HEAP32[$915>>2] = $910;
+          $916 = ((($722)) + 12|0);
+          HEAP32[$916>>2] = $T$0$i18$i$lcssa;
+          $917 = ((($722)) + 24|0);
+          HEAP32[$917>>2] = 0;
+          break;
+         } else {
+          _abort();
+          // unreachable;
+         }
+        }
+       }
+      } while(0);
+      $1048 = ((($710)) + 8|0);
+      $$0 = $1048;
+      STACKTOP = sp;return ($$0|0);
+     } else {
+      $sp$0$i$i$i = (75392);
+     }
+    }
+    while(1) {
+     $918 = HEAP32[$sp$0$i$i$i>>2]|0;
+     $919 = ($918>>>0)>($631>>>0);
+     if (!($919)) {
+      $920 = ((($sp$0$i$i$i)) + 4|0);
+      $921 = HEAP32[$920>>2]|0;
+      $922 = (($918) + ($921)|0);
+      $923 = ($922>>>0)>($631>>>0);
+      if ($923) {
+       $$lcssa142 = $922;
+       break;
+      }
+     }
+     $924 = ((($sp$0$i$i$i)) + 8|0);
+     $925 = HEAP32[$924>>2]|0;
+     $sp$0$i$i$i = $925;
+    }
+    $926 = ((($$lcssa142)) + -47|0);
+    $927 = ((($926)) + 8|0);
+    $928 = $927;
+    $929 = $928 & 7;
+    $930 = ($929|0)==(0);
+    $931 = (0 - ($928))|0;
+    $932 = $931 & 7;
+    $933 = $930 ? 0 : $932;
+    $934 = (($926) + ($933)|0);
+    $935 = ((($631)) + 16|0);
+    $936 = ($934>>>0)<($935>>>0);
+    $937 = $936 ? $631 : $934;
+    $938 = ((($937)) + 8|0);
+    $939 = ((($937)) + 24|0);
+    $940 = (($tsize$745$i) + -40)|0;
+    $941 = ((($tbase$746$i)) + 8|0);
+    $942 = $941;
+    $943 = $942 & 7;
+    $944 = ($943|0)==(0);
+    $945 = (0 - ($942))|0;
+    $946 = $945 & 7;
+    $947 = $944 ? 0 : $946;
+    $948 = (($tbase$746$i) + ($947)|0);
+    $949 = (($940) - ($947))|0;
+    HEAP32[(74968)>>2] = $948;
+    HEAP32[(74956)>>2] = $949;
+    $950 = $949 | 1;
+    $951 = ((($948)) + 4|0);
+    HEAP32[$951>>2] = $950;
+    $952 = (($948) + ($949)|0);
+    $953 = ((($952)) + 4|0);
+    HEAP32[$953>>2] = 40;
+    $954 = HEAP32[(75432)>>2]|0;
+    HEAP32[(74972)>>2] = $954;
+    $955 = ((($937)) + 4|0);
+    HEAP32[$955>>2] = 27;
+    ;HEAP32[$938>>2]=HEAP32[(75392)>>2]|0;HEAP32[$938+4>>2]=HEAP32[(75392)+4>>2]|0;HEAP32[$938+8>>2]=HEAP32[(75392)+8>>2]|0;HEAP32[$938+12>>2]=HEAP32[(75392)+12>>2]|0;
+    HEAP32[(75392)>>2] = $tbase$746$i;
+    HEAP32[(75396)>>2] = $tsize$745$i;
+    HEAP32[(75404)>>2] = 0;
+    HEAP32[(75400)>>2] = $938;
+    $p$0$i$i = $939;
+    while(1) {
+     $956 = ((($p$0$i$i)) + 4|0);
+     HEAP32[$956>>2] = 7;
+     $957 = ((($956)) + 4|0);
+     $958 = ($957>>>0)<($$lcssa142>>>0);
+     if ($958) {
+      $p$0$i$i = $956;
+     } else {
+      break;
+     }
+    }
+    $959 = ($937|0)==($631|0);
+    if (!($959)) {
+     $960 = $937;
+     $961 = $631;
+     $962 = (($960) - ($961))|0;
+     $963 = HEAP32[$955>>2]|0;
+     $964 = $963 & -2;
+     HEAP32[$955>>2] = $964;
+     $965 = $962 | 1;
+     $966 = ((($631)) + 4|0);
+     HEAP32[$966>>2] = $965;
+     HEAP32[$937>>2] = $962;
+     $967 = $962 >>> 3;
+     $968 = ($962>>>0)<(256);
+     if ($968) {
+      $969 = $967 << 1;
+      $970 = (74984 + ($969<<2)|0);
+      $971 = HEAP32[18736]|0;
+      $972 = 1 << $967;
+      $973 = $971 & $972;
+      $974 = ($973|0)==(0);
+      if ($974) {
+       $975 = $971 | $972;
+       HEAP32[18736] = $975;
+       $$pre$i$i = ((($970)) + 8|0);
+       $$pre$phi$i$iZ2D = $$pre$i$i;$F$0$i$i = $970;
+      } else {
+       $976 = ((($970)) + 8|0);
+       $977 = HEAP32[$976>>2]|0;
+       $978 = HEAP32[(74960)>>2]|0;
+       $979 = ($977>>>0)<($978>>>0);
+       if ($979) {
+        _abort();
+        // unreachable;
+       } else {
+        $$pre$phi$i$iZ2D = $976;$F$0$i$i = $977;
+       }
+      }
+      HEAP32[$$pre$phi$i$iZ2D>>2] = $631;
+      $980 = ((($F$0$i$i)) + 12|0);
+      HEAP32[$980>>2] = $631;
+      $981 = ((($631)) + 8|0);
+      HEAP32[$981>>2] = $F$0$i$i;
+      $982 = ((($631)) + 12|0);
+      HEAP32[$982>>2] = $970;
+      break;
+     }
+     $983 = $962 >>> 8;
+     $984 = ($983|0)==(0);
+     if ($984) {
+      $I1$0$i$i = 0;
+     } else {
+      $985 = ($962>>>0)>(16777215);
+      if ($985) {
+       $I1$0$i$i = 31;
+      } else {
+       $986 = (($983) + 1048320)|0;
+       $987 = $986 >>> 16;
+       $988 = $987 & 8;
+       $989 = $983 << $988;
+       $990 = (($989) + 520192)|0;
+       $991 = $990 >>> 16;
+       $992 = $991 & 4;
+       $993 = $992 | $988;
+       $994 = $989 << $992;
+       $995 = (($994) + 245760)|0;
+       $996 = $995 >>> 16;
+       $997 = $996 & 2;
+       $998 = $993 | $997;
+       $999 = (14 - ($998))|0;
+       $1000 = $994 << $997;
+       $1001 = $1000 >>> 15;
+       $1002 = (($999) + ($1001))|0;
+       $1003 = $1002 << 1;
+       $1004 = (($1002) + 7)|0;
+       $1005 = $962 >>> $1004;
+       $1006 = $1005 & 1;
+       $1007 = $1006 | $1003;
+       $I1$0$i$i = $1007;
+      }
+     }
+     $1008 = (75248 + ($I1$0$i$i<<2)|0);
+     $1009 = ((($631)) + 28|0);
+     HEAP32[$1009>>2] = $I1$0$i$i;
+     $1010 = ((($631)) + 20|0);
+     HEAP32[$1010>>2] = 0;
+     HEAP32[$935>>2] = 0;
+     $1011 = HEAP32[(74948)>>2]|0;
+     $1012 = 1 << $I1$0$i$i;
+     $1013 = $1011 & $1012;
+     $1014 = ($1013|0)==(0);
+     if ($1014) {
+      $1015 = $1011 | $1012;
+      HEAP32[(74948)>>2] = $1015;
+      HEAP32[$1008>>2] = $631;
+      $1016 = ((($631)) + 24|0);
+      HEAP32[$1016>>2] = $1008;
+      $1017 = ((($631)) + 12|0);
+      HEAP32[$1017>>2] = $631;
+      $1018 = ((($631)) + 8|0);
+      HEAP32[$1018>>2] = $631;
+      break;
+     }
+     $1019 = HEAP32[$1008>>2]|0;
+     $1020 = ($I1$0$i$i|0)==(31);
+     $1021 = $I1$0$i$i >>> 1;
+     $1022 = (25 - ($1021))|0;
+     $1023 = $1020 ? 0 : $1022;
+     $1024 = $962 << $1023;
+     $K2$0$i$i = $1024;$T$0$i$i = $1019;
+     while(1) {
+      $1025 = ((($T$0$i$i)) + 4|0);
+      $1026 = HEAP32[$1025>>2]|0;
+      $1027 = $1026 & -8;
+      $1028 = ($1027|0)==($962|0);
+      if ($1028) {
+       $T$0$i$i$lcssa = $T$0$i$i;
+       label = 305;
+       break;
+      }
+      $1029 = $K2$0$i$i >>> 31;
+      $1030 = (((($T$0$i$i)) + 16|0) + ($1029<<2)|0);
+      $1031 = $K2$0$i$i << 1;
+      $1032 = HEAP32[$1030>>2]|0;
+      $1033 = ($1032|0)==(0|0);
+      if ($1033) {
+       $$lcssa141 = $1030;$T$0$i$i$lcssa140 = $T$0$i$i;
+       label = 302;
+       break;
+      } else {
+       $K2$0$i$i = $1031;$T$0$i$i = $1032;
+      }
+     }
+     if ((label|0) == 302) {
+      $1034 = HEAP32[(74960)>>2]|0;
+      $1035 = ($$lcssa141>>>0)<($1034>>>0);
+      if ($1035) {
+       _abort();
+       // unreachable;
+      } else {
+       HEAP32[$$lcssa141>>2] = $631;
+       $1036 = ((($631)) + 24|0);
+       HEAP32[$1036>>2] = $T$0$i$i$lcssa140;
+       $1037 = ((($631)) + 12|0);
+       HEAP32[$1037>>2] = $631;
+       $1038 = ((($631)) + 8|0);
+       HEAP32[$1038>>2] = $631;
+       break;
+      }
+     }
+     else if ((label|0) == 305) {
+      $1039 = ((($T$0$i$i$lcssa)) + 8|0);
+      $1040 = HEAP32[$1039>>2]|0;
+      $1041 = HEAP32[(74960)>>2]|0;
+      $1042 = ($1040>>>0)>=($1041>>>0);
+      $not$$i$i = ($T$0$i$i$lcssa>>>0)>=($1041>>>0);
+      $1043 = $1042 & $not$$i$i;
+      if ($1043) {
+       $1044 = ((($1040)) + 12|0);
+       HEAP32[$1044>>2] = $631;
+       HEAP32[$1039>>2] = $631;
+       $1045 = ((($631)) + 8|0);
+       HEAP32[$1045>>2] = $1040;
+       $1046 = ((($631)) + 12|0);
+       HEAP32[$1046>>2] = $T$0$i$i$lcssa;
+       $1047 = ((($631)) + 24|0);
+       HEAP32[$1047>>2] = 0;
+       break;
+      } else {
+       _abort();
+       // unreachable;
+      }
+     }
+    }
+   }
+  } while(0);
+  $1049 = HEAP32[(74956)>>2]|0;
+  $1050 = ($1049>>>0)>($nb$0>>>0);
+  if ($1050) {
+   $1051 = (($1049) - ($nb$0))|0;
+   HEAP32[(74956)>>2] = $1051;
+   $1052 = HEAP32[(74968)>>2]|0;
+   $1053 = (($1052) + ($nb$0)|0);
+   HEAP32[(74968)>>2] = $1053;
+   $1054 = $1051 | 1;
+   $1055 = ((($1053)) + 4|0);
+   HEAP32[$1055>>2] = $1054;
+   $1056 = $nb$0 | 3;
+   $1057 = ((($1052)) + 4|0);
+   HEAP32[$1057>>2] = $1056;
+   $1058 = ((($1052)) + 8|0);
+   $$0 = $1058;
+   STACKTOP = sp;return ($$0|0);
+  }
+ }
+ $1059 = (___errno_location()|0);
+ HEAP32[$1059>>2] = 12;
+ $$0 = 0;
+ STACKTOP = sp;return ($$0|0);
+}
+function _free($mem) {
+ $mem = $mem|0;
+ var $$lcssa = 0, $$pre = 0, $$pre$phi41Z2D = 0, $$pre$phi43Z2D = 0, $$pre$phiZ2D = 0, $$pre40 = 0, $$pre42 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0;
+ var $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0;
+ var $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0;
+ var $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0;
+ var $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0;
+ var $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $2 = 0;
+ var $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0;
+ var $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0;
+ var $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0;
+ var $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0;
+ var $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0;
+ var $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0;
+ var $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0;
+ var $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0;
+ var $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0;
+ var $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0;
+ var $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $F18$0 = 0, $I20$0 = 0, $K21$0 = 0, $R$1 = 0, $R$1$lcssa = 0, $R$3 = 0, $R8$1 = 0, $R8$1$lcssa = 0, $R8$3 = 0, $RP$1 = 0, $RP$1$lcssa = 0, $RP10$1 = 0, $RP10$1$lcssa = 0;
+ var $T$0 = 0, $T$0$lcssa = 0, $T$0$lcssa48 = 0, $cond20 = 0, $cond21 = 0, $not$ = 0, $p$1 = 0, $psize$1 = 0, $psize$2 = 0, $sp$0$i = 0, $sp$0$in$i = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ($mem|0)==(0|0);
+ if ($0) {
+  return;
+ }
+ $1 = ((($mem)) + -8|0);
+ $2 = HEAP32[(74960)>>2]|0;
+ $3 = ($1>>>0)<($2>>>0);
+ if ($3) {
+  _abort();
+  // unreachable;
+ }
+ $4 = ((($mem)) + -4|0);
+ $5 = HEAP32[$4>>2]|0;
+ $6 = $5 & 3;
+ $7 = ($6|0)==(1);
+ if ($7) {
+  _abort();
+  // unreachable;
+ }
+ $8 = $5 & -8;
+ $9 = (($1) + ($8)|0);
+ $10 = $5 & 1;
+ $11 = ($10|0)==(0);
+ do {
+  if ($11) {
+   $12 = HEAP32[$1>>2]|0;
+   $13 = ($6|0)==(0);
+   if ($13) {
+    return;
+   }
+   $14 = (0 - ($12))|0;
+   $15 = (($1) + ($14)|0);
+   $16 = (($12) + ($8))|0;
+   $17 = ($15>>>0)<($2>>>0);
+   if ($17) {
+    _abort();
+    // unreachable;
+   }
+   $18 = HEAP32[(74964)>>2]|0;
+   $19 = ($15|0)==($18|0);
+   if ($19) {
+    $104 = ((($9)) + 4|0);
+    $105 = HEAP32[$104>>2]|0;
+    $106 = $105 & 3;
+    $107 = ($106|0)==(3);
+    if (!($107)) {
+     $p$1 = $15;$psize$1 = $16;
+     break;
+    }
+    HEAP32[(74952)>>2] = $16;
+    $108 = $105 & -2;
+    HEAP32[$104>>2] = $108;
+    $109 = $16 | 1;
+    $110 = ((($15)) + 4|0);
+    HEAP32[$110>>2] = $109;
+    $111 = (($15) + ($16)|0);
+    HEAP32[$111>>2] = $16;
+    return;
+   }
+   $20 = $12 >>> 3;
+   $21 = ($12>>>0)<(256);
+   if ($21) {
+    $22 = ((($15)) + 8|0);
+    $23 = HEAP32[$22>>2]|0;
+    $24 = ((($15)) + 12|0);
+    $25 = HEAP32[$24>>2]|0;
+    $26 = $20 << 1;
+    $27 = (74984 + ($26<<2)|0);
+    $28 = ($23|0)==($27|0);
+    if (!($28)) {
+     $29 = ($23>>>0)<($2>>>0);
+     if ($29) {
+      _abort();
+      // unreachable;
+     }
+     $30 = ((($23)) + 12|0);
+     $31 = HEAP32[$30>>2]|0;
+     $32 = ($31|0)==($15|0);
+     if (!($32)) {
+      _abort();
+      // unreachable;
+     }
+    }
+    $33 = ($25|0)==($23|0);
+    if ($33) {
+     $34 = 1 << $20;
+     $35 = $34 ^ -1;
+     $36 = HEAP32[18736]|0;
+     $37 = $36 & $35;
+     HEAP32[18736] = $37;
+     $p$1 = $15;$psize$1 = $16;
+     break;
+    }
+    $38 = ($25|0)==($27|0);
+    if ($38) {
+     $$pre42 = ((($25)) + 8|0);
+     $$pre$phi43Z2D = $$pre42;
+    } else {
+     $39 = ($25>>>0)<($2>>>0);
+     if ($39) {
+      _abort();
+      // unreachable;
+     }
+     $40 = ((($25)) + 8|0);
+     $41 = HEAP32[$40>>2]|0;
+     $42 = ($41|0)==($15|0);
+     if ($42) {
+      $$pre$phi43Z2D = $40;
+     } else {
+      _abort();
+      // unreachable;
+     }
+    }
+    $43 = ((($23)) + 12|0);
+    HEAP32[$43>>2] = $25;
+    HEAP32[$$pre$phi43Z2D>>2] = $23;
+    $p$1 = $15;$psize$1 = $16;
+    break;
+   }
+   $44 = ((($15)) + 24|0);
+   $45 = HEAP32[$44>>2]|0;
+   $46 = ((($15)) + 12|0);
+   $47 = HEAP32[$46>>2]|0;
+   $48 = ($47|0)==($15|0);
+   do {
+    if ($48) {
+     $58 = ((($15)) + 16|0);
+     $59 = ((($58)) + 4|0);
+     $60 = HEAP32[$59>>2]|0;
+     $61 = ($60|0)==(0|0);
+     if ($61) {
+      $62 = HEAP32[$58>>2]|0;
+      $63 = ($62|0)==(0|0);
+      if ($63) {
+       $R$3 = 0;
+       break;
+      } else {
+       $R$1 = $62;$RP$1 = $58;
+      }
+     } else {
+      $R$1 = $60;$RP$1 = $59;
+     }
+     while(1) {
+      $64 = ((($R$1)) + 20|0);
+      $65 = HEAP32[$64>>2]|0;
+      $66 = ($65|0)==(0|0);
+      if (!($66)) {
+       $R$1 = $65;$RP$1 = $64;
+       continue;
+      }
+      $67 = ((($R$1)) + 16|0);
+      $68 = HEAP32[$67>>2]|0;
+      $69 = ($68|0)==(0|0);
+      if ($69) {
+       $R$1$lcssa = $R$1;$RP$1$lcssa = $RP$1;
+       break;
+      } else {
+       $R$1 = $68;$RP$1 = $67;
+      }
+     }
+     $70 = ($RP$1$lcssa>>>0)<($2>>>0);
+     if ($70) {
+      _abort();
+      // unreachable;
+     } else {
+      HEAP32[$RP$1$lcssa>>2] = 0;
+      $R$3 = $R$1$lcssa;
+      break;
+     }
+    } else {
+     $49 = ((($15)) + 8|0);
+     $50 = HEAP32[$49>>2]|0;
+     $51 = ($50>>>0)<($2>>>0);
+     if ($51) {
+      _abort();
+      // unreachable;
+     }
+     $52 = ((($50)) + 12|0);
+     $53 = HEAP32[$52>>2]|0;
+     $54 = ($53|0)==($15|0);
+     if (!($54)) {
+      _abort();
+      // unreachable;
+     }
+     $55 = ((($47)) + 8|0);
+     $56 = HEAP32[$55>>2]|0;
+     $57 = ($56|0)==($15|0);
+     if ($57) {
+      HEAP32[$52>>2] = $47;
+      HEAP32[$55>>2] = $50;
+      $R$3 = $47;
+      break;
+     } else {
+      _abort();
+      // unreachable;
+     }
+    }
+   } while(0);
+   $71 = ($45|0)==(0|0);
+   if ($71) {
+    $p$1 = $15;$psize$1 = $16;
+   } else {
+    $72 = ((($15)) + 28|0);
+    $73 = HEAP32[$72>>2]|0;
+    $74 = (75248 + ($73<<2)|0);
+    $75 = HEAP32[$74>>2]|0;
+    $76 = ($15|0)==($75|0);
+    if ($76) {
+     HEAP32[$74>>2] = $R$3;
+     $cond20 = ($R$3|0)==(0|0);
+     if ($cond20) {
+      $77 = 1 << $73;
+      $78 = $77 ^ -1;
+      $79 = HEAP32[(74948)>>2]|0;
+      $80 = $79 & $78;
+      HEAP32[(74948)>>2] = $80;
+      $p$1 = $15;$psize$1 = $16;
+      break;
+     }
+    } else {
+     $81 = HEAP32[(74960)>>2]|0;
+     $82 = ($45>>>0)<($81>>>0);
+     if ($82) {
+      _abort();
+      // unreachable;
+     }
+     $83 = ((($45)) + 16|0);
+     $84 = HEAP32[$83>>2]|0;
+     $85 = ($84|0)==($15|0);
+     if ($85) {
+      HEAP32[$83>>2] = $R$3;
+     } else {
+      $86 = ((($45)) + 20|0);
+      HEAP32[$86>>2] = $R$3;
+     }
+     $87 = ($R$3|0)==(0|0);
+     if ($87) {
+      $p$1 = $15;$psize$1 = $16;
+      break;
+     }
+    }
+    $88 = HEAP32[(74960)>>2]|0;
+    $89 = ($R$3>>>0)<($88>>>0);
+    if ($89) {
+     _abort();
+     // unreachable;
+    }
+    $90 = ((($R$3)) + 24|0);
+    HEAP32[$90>>2] = $45;
+    $91 = ((($15)) + 16|0);
+    $92 = HEAP32[$91>>2]|0;
+    $93 = ($92|0)==(0|0);
+    do {
+     if (!($93)) {
+      $94 = ($92>>>0)<($88>>>0);
+      if ($94) {
+       _abort();
+       // unreachable;
+      } else {
+       $95 = ((($R$3)) + 16|0);
+       HEAP32[$95>>2] = $92;
+       $96 = ((($92)) + 24|0);
+       HEAP32[$96>>2] = $R$3;
+       break;
+      }
+     }
+    } while(0);
+    $97 = ((($91)) + 4|0);
+    $98 = HEAP32[$97>>2]|0;
+    $99 = ($98|0)==(0|0);
+    if ($99) {
+     $p$1 = $15;$psize$1 = $16;
+    } else {
+     $100 = HEAP32[(74960)>>2]|0;
+     $101 = ($98>>>0)<($100>>>0);
+     if ($101) {
+      _abort();
+      // unreachable;
+     } else {
+      $102 = ((($R$3)) + 20|0);
+      HEAP32[$102>>2] = $98;
+      $103 = ((($98)) + 24|0);
+      HEAP32[$103>>2] = $R$3;
+      $p$1 = $15;$psize$1 = $16;
+      break;
+     }
+    }
+   }
+  } else {
+   $p$1 = $1;$psize$1 = $8;
+  }
+ } while(0);
+ $112 = ($p$1>>>0)<($9>>>0);
+ if (!($112)) {
+  _abort();
+  // unreachable;
+ }
+ $113 = ((($9)) + 4|0);
+ $114 = HEAP32[$113>>2]|0;
+ $115 = $114 & 1;
+ $116 = ($115|0)==(0);
+ if ($116) {
+  _abort();
+  // unreachable;
+ }
+ $117 = $114 & 2;
+ $118 = ($117|0)==(0);
+ if ($118) {
+  $119 = HEAP32[(74968)>>2]|0;
+  $120 = ($9|0)==($119|0);
+  if ($120) {
+   $121 = HEAP32[(74956)>>2]|0;
+   $122 = (($121) + ($psize$1))|0;
+   HEAP32[(74956)>>2] = $122;
+   HEAP32[(74968)>>2] = $p$1;
+   $123 = $122 | 1;
+   $124 = ((($p$1)) + 4|0);
+   HEAP32[$124>>2] = $123;
+   $125 = HEAP32[(74964)>>2]|0;
+   $126 = ($p$1|0)==($125|0);
+   if (!($126)) {
+    return;
+   }
+   HEAP32[(74964)>>2] = 0;
+   HEAP32[(74952)>>2] = 0;
+   return;
+  }
+  $127 = HEAP32[(74964)>>2]|0;
+  $128 = ($9|0)==($127|0);
+  if ($128) {
+   $129 = HEAP32[(74952)>>2]|0;
+   $130 = (($129) + ($psize$1))|0;
+   HEAP32[(74952)>>2] = $130;
+   HEAP32[(74964)>>2] = $p$1;
+   $131 = $130 | 1;
+   $132 = ((($p$1)) + 4|0);
+   HEAP32[$132>>2] = $131;
+   $133 = (($p$1) + ($130)|0);
+   HEAP32[$133>>2] = $130;
+   return;
+  }
+  $134 = $114 & -8;
+  $135 = (($134) + ($psize$1))|0;
+  $136 = $114 >>> 3;
+  $137 = ($114>>>0)<(256);
+  do {
+   if ($137) {
+    $138 = ((($9)) + 8|0);
+    $139 = HEAP32[$138>>2]|0;
+    $140 = ((($9)) + 12|0);
+    $141 = HEAP32[$140>>2]|0;
+    $142 = $136 << 1;
+    $143 = (74984 + ($142<<2)|0);
+    $144 = ($139|0)==($143|0);
+    if (!($144)) {
+     $145 = HEAP32[(74960)>>2]|0;
+     $146 = ($139>>>0)<($145>>>0);
+     if ($146) {
+      _abort();
+      // unreachable;
+     }
+     $147 = ((($139)) + 12|0);
+     $148 = HEAP32[$147>>2]|0;
+     $149 = ($148|0)==($9|0);
+     if (!($149)) {
+      _abort();
+      // unreachable;
+     }
+    }
+    $150 = ($141|0)==($139|0);
+    if ($150) {
+     $151 = 1 << $136;
+     $152 = $151 ^ -1;
+     $153 = HEAP32[18736]|0;
+     $154 = $153 & $152;
+     HEAP32[18736] = $154;
+     break;
+    }
+    $155 = ($141|0)==($143|0);
+    if ($155) {
+     $$pre40 = ((($141)) + 8|0);
+     $$pre$phi41Z2D = $$pre40;
+    } else {
+     $156 = HEAP32[(74960)>>2]|0;
+     $157 = ($141>>>0)<($156>>>0);
+     if ($157) {
+      _abort();
+      // unreachable;
+     }
+     $158 = ((($141)) + 8|0);
+     $159 = HEAP32[$158>>2]|0;
+     $160 = ($159|0)==($9|0);
+     if ($160) {
+      $$pre$phi41Z2D = $158;
+     } else {
+      _abort();
+      // unreachable;
+     }
+    }
+    $161 = ((($139)) + 12|0);
+    HEAP32[$161>>2] = $141;
+    HEAP32[$$pre$phi41Z2D>>2] = $139;
+   } else {
+    $162 = ((($9)) + 24|0);
+    $163 = HEAP32[$162>>2]|0;
+    $164 = ((($9)) + 12|0);
+    $165 = HEAP32[$164>>2]|0;
+    $166 = ($165|0)==($9|0);
+    do {
+     if ($166) {
+      $177 = ((($9)) + 16|0);
+      $178 = ((($177)) + 4|0);
+      $179 = HEAP32[$178>>2]|0;
+      $180 = ($179|0)==(0|0);
+      if ($180) {
+       $181 = HEAP32[$177>>2]|0;
+       $182 = ($181|0)==(0|0);
+       if ($182) {
+        $R8$3 = 0;
+        break;
+       } else {
+        $R8$1 = $181;$RP10$1 = $177;
+       }
+      } else {
+       $R8$1 = $179;$RP10$1 = $178;
+      }
+      while(1) {
+       $183 = ((($R8$1)) + 20|0);
+       $184 = HEAP32[$183>>2]|0;
+       $185 = ($184|0)==(0|0);
+       if (!($185)) {
+        $R8$1 = $184;$RP10$1 = $183;
+        continue;
+       }
+       $186 = ((($R8$1)) + 16|0);
+       $187 = HEAP32[$186>>2]|0;
+       $188 = ($187|0)==(0|0);
+       if ($188) {
+        $R8$1$lcssa = $R8$1;$RP10$1$lcssa = $RP10$1;
+        break;
+       } else {
+        $R8$1 = $187;$RP10$1 = $186;
+       }
+      }
+      $189 = HEAP32[(74960)>>2]|0;
+      $190 = ($RP10$1$lcssa>>>0)<($189>>>0);
+      if ($190) {
+       _abort();
+       // unreachable;
+      } else {
+       HEAP32[$RP10$1$lcssa>>2] = 0;
+       $R8$3 = $R8$1$lcssa;
+       break;
+      }
+     } else {
+      $167 = ((($9)) + 8|0);
+      $168 = HEAP32[$167>>2]|0;
+      $169 = HEAP32[(74960)>>2]|0;
+      $170 = ($168>>>0)<($169>>>0);
+      if ($170) {
+       _abort();
+       // unreachable;
+      }
+      $171 = ((($168)) + 12|0);
+      $172 = HEAP32[$171>>2]|0;
+      $173 = ($172|0)==($9|0);
+      if (!($173)) {
+       _abort();
+       // unreachable;
+      }
+      $174 = ((($165)) + 8|0);
+      $175 = HEAP32[$174>>2]|0;
+      $176 = ($175|0)==($9|0);
+      if ($176) {
+       HEAP32[$171>>2] = $165;
+       HEAP32[$174>>2] = $168;
+       $R8$3 = $165;
+       break;
+      } else {
+       _abort();
+       // unreachable;
+      }
+     }
+    } while(0);
+    $191 = ($163|0)==(0|0);
+    if (!($191)) {
+     $192 = ((($9)) + 28|0);
+     $193 = HEAP32[$192>>2]|0;
+     $194 = (75248 + ($193<<2)|0);
+     $195 = HEAP32[$194>>2]|0;
+     $196 = ($9|0)==($195|0);
+     if ($196) {
+      HEAP32[$194>>2] = $R8$3;
+      $cond21 = ($R8$3|0)==(0|0);
+      if ($cond21) {
+       $197 = 1 << $193;
+       $198 = $197 ^ -1;
+       $199 = HEAP32[(74948)>>2]|0;
+       $200 = $199 & $198;
+       HEAP32[(74948)>>2] = $200;
+       break;
+      }
+     } else {
+      $201 = HEAP32[(74960)>>2]|0;
+      $202 = ($163>>>0)<($201>>>0);
+      if ($202) {
+       _abort();
+       // unreachable;
+      }
+      $203 = ((($163)) + 16|0);
+      $204 = HEAP32[$203>>2]|0;
+      $205 = ($204|0)==($9|0);
+      if ($205) {
+       HEAP32[$203>>2] = $R8$3;
+      } else {
+       $206 = ((($163)) + 20|0);
+       HEAP32[$206>>2] = $R8$3;
+      }
+      $207 = ($R8$3|0)==(0|0);
+      if ($207) {
+       break;
+      }
+     }
+     $208 = HEAP32[(74960)>>2]|0;
+     $209 = ($R8$3>>>0)<($208>>>0);
+     if ($209) {
+      _abort();
+      // unreachable;
+     }
+     $210 = ((($R8$3)) + 24|0);
+     HEAP32[$210>>2] = $163;
+     $211 = ((($9)) + 16|0);
+     $212 = HEAP32[$211>>2]|0;
+     $213 = ($212|0)==(0|0);
+     do {
+      if (!($213)) {
+       $214 = ($212>>>0)<($208>>>0);
+       if ($214) {
+        _abort();
+        // unreachable;
+       } else {
+        $215 = ((($R8$3)) + 16|0);
+        HEAP32[$215>>2] = $212;
+        $216 = ((($212)) + 24|0);
+        HEAP32[$216>>2] = $R8$3;
+        break;
+       }
+      }
+     } while(0);
+     $217 = ((($211)) + 4|0);
+     $218 = HEAP32[$217>>2]|0;
+     $219 = ($218|0)==(0|0);
+     if (!($219)) {
+      $220 = HEAP32[(74960)>>2]|0;
+      $221 = ($218>>>0)<($220>>>0);
+      if ($221) {
+       _abort();
+       // unreachable;
+      } else {
+       $222 = ((($R8$3)) + 20|0);
+       HEAP32[$222>>2] = $218;
+       $223 = ((($218)) + 24|0);
+       HEAP32[$223>>2] = $R8$3;
+       break;
+      }
+     }
+    }
+   }
+  } while(0);
+  $224 = $135 | 1;
+  $225 = ((($p$1)) + 4|0);
+  HEAP32[$225>>2] = $224;
+  $226 = (($p$1) + ($135)|0);
+  HEAP32[$226>>2] = $135;
+  $227 = HEAP32[(74964)>>2]|0;
+  $228 = ($p$1|0)==($227|0);
+  if ($228) {
+   HEAP32[(74952)>>2] = $135;
+   return;
+  } else {
+   $psize$2 = $135;
+  }
+ } else {
+  $229 = $114 & -2;
+  HEAP32[$113>>2] = $229;
+  $230 = $psize$1 | 1;
+  $231 = ((($p$1)) + 4|0);
+  HEAP32[$231>>2] = $230;
+  $232 = (($p$1) + ($psize$1)|0);
+  HEAP32[$232>>2] = $psize$1;
+  $psize$2 = $psize$1;
+ }
+ $233 = $psize$2 >>> 3;
+ $234 = ($psize$2>>>0)<(256);
+ if ($234) {
+  $235 = $233 << 1;
+  $236 = (74984 + ($235<<2)|0);
+  $237 = HEAP32[18736]|0;
+  $238 = 1 << $233;
+  $239 = $237 & $238;
+  $240 = ($239|0)==(0);
+  if ($240) {
+   $241 = $237 | $238;
+   HEAP32[18736] = $241;
+   $$pre = ((($236)) + 8|0);
+   $$pre$phiZ2D = $$pre;$F18$0 = $236;
+  } else {
+   $242 = ((($236)) + 8|0);
+   $243 = HEAP32[$242>>2]|0;
+   $244 = HEAP32[(74960)>>2]|0;
+   $245 = ($243>>>0)<($244>>>0);
+   if ($245) {
+    _abort();
+    // unreachable;
+   } else {
+    $$pre$phiZ2D = $242;$F18$0 = $243;
+   }
+  }
+  HEAP32[$$pre$phiZ2D>>2] = $p$1;
+  $246 = ((($F18$0)) + 12|0);
+  HEAP32[$246>>2] = $p$1;
+  $247 = ((($p$1)) + 8|0);
+  HEAP32[$247>>2] = $F18$0;
+  $248 = ((($p$1)) + 12|0);
+  HEAP32[$248>>2] = $236;
+  return;
+ }
+ $249 = $psize$2 >>> 8;
+ $250 = ($249|0)==(0);
+ if ($250) {
+  $I20$0 = 0;
+ } else {
+  $251 = ($psize$2>>>0)>(16777215);
+  if ($251) {
+   $I20$0 = 31;
+  } else {
+   $252 = (($249) + 1048320)|0;
+   $253 = $252 >>> 16;
+   $254 = $253 & 8;
+   $255 = $249 << $254;
+   $256 = (($255) + 520192)|0;
+   $257 = $256 >>> 16;
+   $258 = $257 & 4;
+   $259 = $258 | $254;
+   $260 = $255 << $258;
+   $261 = (($260) + 245760)|0;
+   $262 = $261 >>> 16;
+   $263 = $262 & 2;
+   $264 = $259 | $263;
+   $265 = (14 - ($264))|0;
+   $266 = $260 << $263;
+   $267 = $266 >>> 15;
+   $268 = (($265) + ($267))|0;
+   $269 = $268 << 1;
+   $270 = (($268) + 7)|0;
+   $271 = $psize$2 >>> $270;
+   $272 = $271 & 1;
+   $273 = $272 | $269;
+   $I20$0 = $273;
+  }
+ }
+ $274 = (75248 + ($I20$0<<2)|0);
+ $275 = ((($p$1)) + 28|0);
+ HEAP32[$275>>2] = $I20$0;
+ $276 = ((($p$1)) + 16|0);
+ $277 = ((($p$1)) + 20|0);
+ HEAP32[$277>>2] = 0;
+ HEAP32[$276>>2] = 0;
+ $278 = HEAP32[(74948)>>2]|0;
+ $279 = 1 << $I20$0;
+ $280 = $278 & $279;
+ $281 = ($280|0)==(0);
+ do {
+  if ($281) {
+   $282 = $278 | $279;
+   HEAP32[(74948)>>2] = $282;
+   HEAP32[$274>>2] = $p$1;
+   $283 = ((($p$1)) + 24|0);
+   HEAP32[$283>>2] = $274;
+   $284 = ((($p$1)) + 12|0);
+   HEAP32[$284>>2] = $p$1;
+   $285 = ((($p$1)) + 8|0);
+   HEAP32[$285>>2] = $p$1;
+  } else {
+   $286 = HEAP32[$274>>2]|0;
+   $287 = ($I20$0|0)==(31);
+   $288 = $I20$0 >>> 1;
+   $289 = (25 - ($288))|0;
+   $290 = $287 ? 0 : $289;
+   $291 = $psize$2 << $290;
+   $K21$0 = $291;$T$0 = $286;
+   while(1) {
+    $292 = ((($T$0)) + 4|0);
+    $293 = HEAP32[$292>>2]|0;
+    $294 = $293 & -8;
+    $295 = ($294|0)==($psize$2|0);
+    if ($295) {
+     $T$0$lcssa = $T$0;
+     label = 130;
+     break;
+    }
+    $296 = $K21$0 >>> 31;
+    $297 = (((($T$0)) + 16|0) + ($296<<2)|0);
+    $298 = $K21$0 << 1;
+    $299 = HEAP32[$297>>2]|0;
+    $300 = ($299|0)==(0|0);
+    if ($300) {
+     $$lcssa = $297;$T$0$lcssa48 = $T$0;
+     label = 127;
+     break;
+    } else {
+     $K21$0 = $298;$T$0 = $299;
+    }
+   }
+   if ((label|0) == 127) {
+    $301 = HEAP32[(74960)>>2]|0;
+    $302 = ($$lcssa>>>0)<($301>>>0);
+    if ($302) {
+     _abort();
+     // unreachable;
+    } else {
+     HEAP32[$$lcssa>>2] = $p$1;
+     $303 = ((($p$1)) + 24|0);
+     HEAP32[$303>>2] = $T$0$lcssa48;
+     $304 = ((($p$1)) + 12|0);
+     HEAP32[$304>>2] = $p$1;
+     $305 = ((($p$1)) + 8|0);
+     HEAP32[$305>>2] = $p$1;
+     break;
+    }
+   }
+   else if ((label|0) == 130) {
+    $306 = ((($T$0$lcssa)) + 8|0);
+    $307 = HEAP32[$306>>2]|0;
+    $308 = HEAP32[(74960)>>2]|0;
+    $309 = ($307>>>0)>=($308>>>0);
+    $not$ = ($T$0$lcssa>>>0)>=($308>>>0);
+    $310 = $309 & $not$;
+    if ($310) {
+     $311 = ((($307)) + 12|0);
+     HEAP32[$311>>2] = $p$1;
+     HEAP32[$306>>2] = $p$1;
+     $312 = ((($p$1)) + 8|0);
+     HEAP32[$312>>2] = $307;
+     $313 = ((($p$1)) + 12|0);
+     HEAP32[$313>>2] = $T$0$lcssa;
+     $314 = ((($p$1)) + 24|0);
+     HEAP32[$314>>2] = 0;
+     break;
+    } else {
+     _abort();
+     // unreachable;
+    }
+   }
+  }
+ } while(0);
+ $315 = HEAP32[(74976)>>2]|0;
+ $316 = (($315) + -1)|0;
+ HEAP32[(74976)>>2] = $316;
+ $317 = ($316|0)==(0);
+ if ($317) {
+  $sp$0$in$i = (75400);
+ } else {
+  return;
+ }
+ while(1) {
+  $sp$0$i = HEAP32[$sp$0$in$i>>2]|0;
+  $318 = ($sp$0$i|0)==(0|0);
+  $319 = ((($sp$0$i)) + 8|0);
+  if ($318) {
+   break;
+  } else {
+   $sp$0$in$i = $319;
+  }
+ }
+ HEAP32[(74976)>>2] = -1;
+ return;
+}
+function _realloc($oldmem,$bytes) {
+ $oldmem = $oldmem|0;
+ $bytes = $bytes|0;
+ var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0;
+ var $7 = 0, $8 = 0, $9 = 0, $mem$1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ($oldmem|0)==(0|0);
+ if ($0) {
+  $1 = (_malloc($bytes)|0);
+  $mem$1 = $1;
+  return ($mem$1|0);
+ }
+ $2 = ($bytes>>>0)>(4294967231);
+ if ($2) {
+  $3 = (___errno_location()|0);
+  HEAP32[$3>>2] = 12;
+  $mem$1 = 0;
+  return ($mem$1|0);
+ }
+ $4 = ($bytes>>>0)<(11);
+ $5 = (($bytes) + 11)|0;
+ $6 = $5 & -8;
+ $7 = $4 ? 16 : $6;
+ $8 = ((($oldmem)) + -8|0);
+ $9 = (_try_realloc_chunk($8,$7)|0);
+ $10 = ($9|0)==(0|0);
+ if (!($10)) {
+  $11 = ((($9)) + 8|0);
+  $mem$1 = $11;
+  return ($mem$1|0);
+ }
+ $12 = (_malloc($bytes)|0);
+ $13 = ($12|0)==(0|0);
+ if ($13) {
+  $mem$1 = 0;
+  return ($mem$1|0);
+ }
+ $14 = ((($oldmem)) + -4|0);
+ $15 = HEAP32[$14>>2]|0;
+ $16 = $15 & -8;
+ $17 = $15 & 3;
+ $18 = ($17|0)==(0);
+ $19 = $18 ? 8 : 4;
+ $20 = (($16) - ($19))|0;
+ $21 = ($20>>>0)<($bytes>>>0);
+ $22 = $21 ? $20 : $bytes;
+ _memcpy(($12|0),($oldmem|0),($22|0))|0;
+ _free($oldmem);
+ $mem$1 = $12;
+ return ($mem$1|0);
+}
+function _try_realloc_chunk($p,$nb) {
+ $p = $p|0;
+ $nb = $nb|0;
+ var $$pre = 0, $$pre$phiZ2D = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0;
+ var $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0;
+ var $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0;
+ var $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0;
+ var $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0;
+ var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0;
+ var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0;
+ var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0;
+ var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $R$1 = 0, $R$1$lcssa = 0;
+ var $R$3 = 0, $RP$1 = 0, $RP$1$lcssa = 0, $cond = 0, $newp$2 = 0, $notlhs = 0, $notrhs = 0, $or$cond$not = 0, $or$cond3 = 0, $storemerge = 0, $storemerge1 = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = ((($p)) + 4|0);
+ $1 = HEAP32[$0>>2]|0;
+ $2 = $1 & -8;
+ $3 = (($p) + ($2)|0);
+ $4 = HEAP32[(74960)>>2]|0;
+ $5 = $1 & 3;
+ $notlhs = ($p>>>0)>=($4>>>0);
+ $notrhs = ($5|0)!=(1);
+ $or$cond$not = $notrhs & $notlhs;
+ $6 = ($p>>>0)<($3>>>0);
+ $or$cond3 = $or$cond$not & $6;
+ if (!($or$cond3)) {
+  _abort();
+  // unreachable;
+ }
+ $7 = ((($3)) + 4|0);
+ $8 = HEAP32[$7>>2]|0;
+ $9 = $8 & 1;
+ $10 = ($9|0)==(0);
+ if ($10) {
+  _abort();
+  // unreachable;
+ }
+ $11 = ($5|0)==(0);
+ if ($11) {
+  $12 = ($nb>>>0)<(256);
+  if ($12) {
+   $newp$2 = 0;
+   return ($newp$2|0);
+  }
+  $13 = (($nb) + 4)|0;
+  $14 = ($2>>>0)<($13>>>0);
+  if (!($14)) {
+   $15 = (($2) - ($nb))|0;
+   $16 = HEAP32[(75424)>>2]|0;
+   $17 = $16 << 1;
+   $18 = ($15>>>0)>($17>>>0);
+   if (!($18)) {
+    $newp$2 = $p;
+    return ($newp$2|0);
+   }
+  }
+  $newp$2 = 0;
+  return ($newp$2|0);
+ }
+ $19 = ($2>>>0)<($nb>>>0);
+ if (!($19)) {
+  $20 = (($2) - ($nb))|0;
+  $21 = ($20>>>0)>(15);
+  if (!($21)) {
+   $newp$2 = $p;
+   return ($newp$2|0);
+  }
+  $22 = (($p) + ($nb)|0);
+  $23 = $1 & 1;
+  $24 = $23 | $nb;
+  $25 = $24 | 2;
+  HEAP32[$0>>2] = $25;
+  $26 = ((($22)) + 4|0);
+  $27 = $20 | 3;
+  HEAP32[$26>>2] = $27;
+  $28 = (($22) + ($20)|0);
+  $29 = ((($28)) + 4|0);
+  $30 = HEAP32[$29>>2]|0;
+  $31 = $30 | 1;
+  HEAP32[$29>>2] = $31;
+  _dispose_chunk($22,$20);
+  $newp$2 = $p;
+  return ($newp$2|0);
+ }
+ $32 = HEAP32[(74968)>>2]|0;
+ $33 = ($3|0)==($32|0);
+ if ($33) {
+  $34 = HEAP32[(74956)>>2]|0;
+  $35 = (($34) + ($2))|0;
+  $36 = ($35>>>0)>($nb>>>0);
+  if (!($36)) {
+   $newp$2 = 0;
+   return ($newp$2|0);
+  }
+  $37 = (($35) - ($nb))|0;
+  $38 = (($p) + ($nb)|0);
+  $39 = $1 & 1;
+  $40 = $39 | $nb;
+  $41 = $40 | 2;
+  HEAP32[$0>>2] = $41;
+  $42 = ((($38)) + 4|0);
+  $43 = $37 | 1;
+  HEAP32[$42>>2] = $43;
+  HEAP32[(74968)>>2] = $38;
+  HEAP32[(74956)>>2] = $37;
+  $newp$2 = $p;
+  return ($newp$2|0);
+ }
+ $44 = HEAP32[(74964)>>2]|0;
+ $45 = ($3|0)==($44|0);
+ if ($45) {
+  $46 = HEAP32[(74952)>>2]|0;
+  $47 = (($46) + ($2))|0;
+  $48 = ($47>>>0)<($nb>>>0);
+  if ($48) {
+   $newp$2 = 0;
+   return ($newp$2|0);
+  }
+  $49 = (($47) - ($nb))|0;
+  $50 = ($49>>>0)>(15);
+  if ($50) {
+   $51 = (($p) + ($nb)|0);
+   $52 = (($51) + ($49)|0);
+   $53 = $1 & 1;
+   $54 = $53 | $nb;
+   $55 = $54 | 2;
+   HEAP32[$0>>2] = $55;
+   $56 = ((($51)) + 4|0);
+   $57 = $49 | 1;
+   HEAP32[$56>>2] = $57;
+   HEAP32[$52>>2] = $49;
+   $58 = ((($52)) + 4|0);
+   $59 = HEAP32[$58>>2]|0;
+   $60 = $59 & -2;
+   HEAP32[$58>>2] = $60;
+   $storemerge = $51;$storemerge1 = $49;
+  } else {
+   $61 = $1 & 1;
+   $62 = $61 | $47;
+   $63 = $62 | 2;
+   HEAP32[$0>>2] = $63;
+   $64 = (($p) + ($47)|0);
+   $65 = ((($64)) + 4|0);
+   $66 = HEAP32[$65>>2]|0;
+   $67 = $66 | 1;
+   HEAP32[$65>>2] = $67;
+   $storemerge = 0;$storemerge1 = 0;
+  }
+  HEAP32[(74952)>>2] = $storemerge1;
+  HEAP32[(74964)>>2] = $storemerge;
+  $newp$2 = $p;
+  return ($newp$2|0);
+ }
+ $68 = $8 & 2;
+ $69 = ($68|0)==(0);
+ if (!($69)) {
+  $newp$2 = 0;
+  return ($newp$2|0);
+ }
+ $70 = $8 & -8;
+ $71 = (($70) + ($2))|0;
+ $72 = ($71>>>0)<($nb>>>0);
+ if ($72) {
+  $newp$2 = 0;
+  return ($newp$2|0);
+ }
+ $73 = (($71) - ($nb))|0;
+ $74 = $8 >>> 3;
+ $75 = ($8>>>0)<(256);
+ do {
+  if ($75) {
+   $76 = ((($3)) + 8|0);
+   $77 = HEAP32[$76>>2]|0;
+   $78 = ((($3)) + 12|0);
+   $79 = HEAP32[$78>>2]|0;
+   $80 = $74 << 1;
+   $81 = (74984 + ($80<<2)|0);
+   $82 = ($77|0)==($81|0);
+   if (!($82)) {
+    $83 = ($77>>>0)<($4>>>0);
+    if ($83) {
+     _abort();
+     // unreachable;
+    }
+    $84 = ((($77)) + 12|0);
+    $85 = HEAP32[$84>>2]|0;
+    $86 = ($85|0)==($3|0);
+    if (!($86)) {
+     _abort();
+     // unreachable;
+    }
+   }
+   $87 = ($79|0)==($77|0);
+   if ($87) {
+    $88 = 1 << $74;
+    $89 = $88 ^ -1;
+    $90 = HEAP32[18736]|0;
+    $91 = $90 & $89;
+    HEAP32[18736] = $91;
+    break;
+   }
+   $92 = ($79|0)==($81|0);
+   if ($92) {
+    $$pre = ((($79)) + 8|0);
+    $$pre$phiZ2D = $$pre;
+   } else {
+    $93 = ($79>>>0)<($4>>>0);
+    if ($93) {
+     _abort();
+     // unreachable;
+    }
+    $94 = ((($79)) + 8|0);
+    $95 = HEAP32[$94>>2]|0;
+    $96 = ($95|0)==($3|0);
+    if ($96) {
+     $$pre$phiZ2D = $94;
+    } else {
+     _abort();
+     // unreachable;
+    }
+   }
+   $97 = ((($77)) + 12|0);
+   HEAP32[$97>>2] = $79;
+   HEAP32[$$pre$phiZ2D>>2] = $77;
+  } else {
+   $98 = ((($3)) + 24|0);
+   $99 = HEAP32[$98>>2]|0;
+   $100 = ((($3)) + 12|0);
+   $101 = HEAP32[$100>>2]|0;
+   $102 = ($101|0)==($3|0);
+   do {
+    if ($102) {
+     $112 = ((($3)) + 16|0);
+     $113 = ((($112)) + 4|0);
+     $114 = HEAP32[$113>>2]|0;
+     $115 = ($114|0)==(0|0);
+     if ($115) {
+      $116 = HEAP32[$112>>2]|0;
+      $117 = ($116|0)==(0|0);
+      if ($117) {
+       $R$3 = 0;
+       break;
+      } else {
+       $R$1 = $116;$RP$1 = $112;
+      }
+     } else {
+      $R$1 = $114;$RP$1 = $113;
+     }
+     while(1) {
+      $118 = ((($R$1)) + 20|0);
+      $119 = HEAP32[$118>>2]|0;
+      $120 = ($119|0)==(0|0);
+      if (!($120)) {
+       $R$1 = $119;$RP$1 = $118;
+       continue;
+      }
+      $121 = ((($R$1)) + 16|0);
+      $122 = HEAP32[$121>>2]|0;
+      $123 = ($122|0)==(0|0);
+      if ($123) {
+       $R$1$lcssa = $R$1;$RP$1$lcssa = $RP$1;
+       break;
+      } else {
+       $R$1 = $122;$RP$1 = $121;
+      }
+     }
+     $124 = ($RP$1$lcssa>>>0)<($4>>>0);
+     if ($124) {
+      _abort();
+      // unreachable;
+     } else {
+      HEAP32[$RP$1$lcssa>>2] = 0;
+      $R$3 = $R$1$lcssa;
+      break;
+     }
+    } else {
+     $103 = ((($3)) + 8|0);
+     $104 = HEAP32[$103>>2]|0;
+     $105 = ($104>>>0)<($4>>>0);
+     if ($105) {
+      _abort();
+      // unreachable;
+     }
+     $106 = ((($104)) + 12|0);
+     $107 = HEAP32[$106>>2]|0;
+     $108 = ($107|0)==($3|0);
+     if (!($108)) {
+      _abort();
+      // unreachable;
+     }
+     $109 = ((($101)) + 8|0);
+     $110 = HEAP32[$109>>2]|0;
+     $111 = ($110|0)==($3|0);
+     if ($111) {
+      HEAP32[$106>>2] = $101;
+      HEAP32[$109>>2] = $104;
+      $R$3 = $101;
+      break;
+     } else {
+      _abort();
+      // unreachable;
+     }
+    }
+   } while(0);
+   $125 = ($99|0)==(0|0);
+   if (!($125)) {
+    $126 = ((($3)) + 28|0);
+    $127 = HEAP32[$126>>2]|0;
+    $128 = (75248 + ($127<<2)|0);
+    $129 = HEAP32[$128>>2]|0;
+    $130 = ($3|0)==($129|0);
+    if ($130) {
+     HEAP32[$128>>2] = $R$3;
+     $cond = ($R$3|0)==(0|0);
+     if ($cond) {
+      $131 = 1 << $127;
+      $132 = $131 ^ -1;
+      $133 = HEAP32[(74948)>>2]|0;
+      $134 = $133 & $132;
+      HEAP32[(74948)>>2] = $134;
+      break;
+     }
+    } else {
+     $135 = HEAP32[(74960)>>2]|0;
+     $136 = ($99>>>0)<($135>>>0);
+     if ($136) {
+      _abort();
+      // unreachable;
+     }
+     $137 = ((($99)) + 16|0);
+     $138 = HEAP32[$137>>2]|0;
+     $139 = ($138|0)==($3|0);
+     if ($139) {
+      HEAP32[$137>>2] = $R$3;
+     } else {
+      $140 = ((($99)) + 20|0);
+      HEAP32[$140>>2] = $R$3;
+     }
+     $141 = ($R$3|0)==(0|0);
+     if ($141) {
+      break;
+     }
+    }
+    $142 = HEAP32[(74960)>>2]|0;
+    $143 = ($R$3>>>0)<($142>>>0);
+    if ($143) {
+     _abort();
+     // unreachable;
+    }
+    $144 = ((($R$3)) + 24|0);
+    HEAP32[$144>>2] = $99;
+    $145 = ((($3)) + 16|0);
+    $146 = HEAP32[$145>>2]|0;
+    $147 = ($146|0)==(0|0);
+    do {
+     if (!($147)) {
+      $148 = ($146>>>0)<($142>>>0);
+      if ($148) {
+       _abort();
+       // unreachable;
+      } else {
+       $149 = ((($R$3)) + 16|0);
+       HEAP32[$149>>2] = $146;
+       $150 = ((($146)) + 24|0);
+       HEAP32[$150>>2] = $R$3;
+       break;
+      }
+     }
+    } while(0);
+    $151 = ((($145)) + 4|0);
+    $152 = HEAP32[$151>>2]|0;
+    $153 = ($152|0)==(0|0);
+    if (!($153)) {
+     $154 = HEAP32[(74960)>>2]|0;
+     $155 = ($152>>>0)<($154>>>0);
+     if ($155) {
+      _abort();
+      // unreachable;
+     } else {
+      $156 = ((($R$3)) + 20|0);
+      HEAP32[$156>>2] = $152;
+      $157 = ((($152)) + 24|0);
+      HEAP32[$157>>2] = $R$3;
+      break;
+     }
+    }
+   }
+  }
+ } while(0);
+ $158 = ($73>>>0)<(16);
+ if ($158) {
+  $159 = $1 & 1;
+  $160 = $71 | $159;
+  $161 = $160 | 2;
+  HEAP32[$0>>2] = $161;
+  $162 = (($p) + ($71)|0);
+  $163 = ((($162)) + 4|0);
+  $164 = HEAP32[$163>>2]|0;
+  $165 = $164 | 1;
+  HEAP32[$163>>2] = $165;
+  $newp$2 = $p;
+  return ($newp$2|0);
+ } else {
+  $166 = (($p) + ($nb)|0);
+  $167 = $1 & 1;
+  $168 = $167 | $nb;
+  $169 = $168 | 2;
+  HEAP32[$0>>2] = $169;
+  $170 = ((($166)) + 4|0);
+  $171 = $73 | 3;
+  HEAP32[$170>>2] = $171;
+  $172 = (($166) + ($73)|0);
+  $173 = ((($172)) + 4|0);
+  $174 = HEAP32[$173>>2]|0;
+  $175 = $174 | 1;
+  HEAP32[$173>>2] = $175;
+  _dispose_chunk($166,$73);
+  $newp$2 = $p;
+  return ($newp$2|0);
+ }
+ return (0)|0;
+}
+function _dispose_chunk($p,$psize) {
+ $p = $p|0;
+ $psize = $psize|0;
+ var $$1 = 0, $$14 = 0, $$2 = 0, $$lcssa = 0, $$pre = 0, $$pre$phi22Z2D = 0, $$pre$phi24Z2D = 0, $$pre$phiZ2D = 0, $$pre21 = 0, $$pre23 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0;
+ var $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0;
+ var $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0;
+ var $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0;
+ var $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0;
+ var $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0;
+ var $198 = 0, $199 = 0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0;
+ var $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0, $23 = 0, $230 = 0, $231 = 0, $232 = 0;
+ var $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0, $250 = 0;
+ var $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0;
+ var $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0;
+ var $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $3 = 0, $30 = 0, $300 = 0, $301 = 0, $302 = 0, $303 = 0, $304 = 0;
+ var $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0;
+ var $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0;
+ var $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0;
+ var $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $F17$0 = 0, $I20$0 = 0, $K21$0 = 0, $R$1 = 0, $R$1$lcssa = 0;
+ var $R$3 = 0, $R7$1 = 0, $R7$1$lcssa = 0, $R7$3 = 0, $RP$1 = 0, $RP$1$lcssa = 0, $RP9$1 = 0, $RP9$1$lcssa = 0, $T$0 = 0, $T$0$lcssa = 0, $T$0$lcssa30 = 0, $cond = 0, $cond16 = 0, $not$ = 0, label = 0, sp = 0;
+ sp = STACKTOP;
+ $0 = (($p) + ($psize)|0);
+ $1 = ((($p)) + 4|0);
+ $2 = HEAP32[$1>>2]|0;
+ $3 = $2 & 1;
+ $4 = ($3|0)==(0);
+ do {
+  if ($4) {
+   $5 = HEAP32[$p>>2]|0;
+   $6 = $2 & 3;
+   $7 = ($6|0)==(0);
+   if ($7) {
+    return;
+   }
+   $8 = (0 - ($5))|0;
+   $9 = (($p) + ($8)|0);
+   $10 = (($5) + ($psize))|0;
+   $11 = HEAP32[(74960)>>2]|0;
+   $12 = ($9>>>0)<($11>>>0);
+   if ($12) {
+    _abort();
+    // unreachable;
+   }
+   $13 = HEAP32[(74964)>>2]|0;
+   $14 = ($9|0)==($13|0);
+   if ($14) {
+    $99 = ((($0)) + 4|0);
+    $100 = HEAP32[$99>>2]|0;
+    $101 = $100 & 3;
+    $102 = ($101|0)==(3);
+    if (!($102)) {
+     $$1 = $9;$$14 = $10;
+     break;
+    }
+    HEAP32[(74952)>>2] = $10;
+    $103 = $100 & -2;
+    HEAP32[$99>>2] = $103;
+    $104 = $10 | 1;
+    $105 = ((($9)) + 4|0);
+    HEAP32[$105>>2] = $104;
+    $106 = (($9) + ($10)|0);
+    HEAP32[$106>>2] = $10;
+    return;
+   }
+   $15 = $5 >>> 3;
+   $16 = ($5>>>0)<(256);
+   if ($16) {
+    $17 = ((($9)) + 8|0);
+    $18 = HEAP32[$17>>2]|0;
+    $19 = ((($9)) + 12|0);
+    $20 = HEAP32[$19>>2]|0;
+    $21 = $15 << 1;
+    $22 = (74984 + ($21<<2)|0);
+    $23 = ($18|0)==($22|0);
+    if (!($23)) {
+     $24 = ($18>>>0)<($11>>>0);
+     if ($24) {
+      _abort();
+      // unreachable;
+     }
+     $25 = ((($18)) + 12|0);
+     $26 = HEAP32[$25>>2]|0;
+     $27 = ($26|0)==($9|0);
+     if (!($27)) {
+      _abort();
+      // unreachable;
+     }
+    }
+    $28 = ($20|0)==($18|0);
+    if ($28) {
+     $29 = 1 << $15;
+     $30 = $29 ^ -1;
+     $31 = HEAP32[18736]|0;
+     $32 = $31 & $30;
+     HEAP32[18736] = $32;
+     $$1 = $9;$$14 = $10;
+     break;
+    }
+    $33 = ($20|0)==($22|0);
+    if ($33) {
+     $$pre23 = ((($20)) + 8|0);
+     $$pre$phi24Z2D = $$pre23;
+    } else {
+     $34 = ($20>>>0)<($11>>>0);
+     if ($34) {
+      _abort();
+      // unreachable;
+     }
+     $35 = ((($20)) + 8|0);
+     $36 = HEAP32[$35>>2]|0;
+     $37 = ($36|0)==($9|0);
+     if ($37) {
+      $$pre$phi24Z2D = $35;
+     } else {
+      _abort();
+      // unreachable;
+     }
+    }
+    $38 = ((($18)) + 12|0);
+    HEAP32[$38>>2] = $20;
+    HEAP32[$$pre$phi24Z2D>>2] = $18;
+    $$1 = $9;$$14 = $10;
+    break;
+   }
+   $39 = ((($9)) + 24|0);
+   $40 = HEAP32[$39>>2]|0;
+   $41 = ((($9)) + 12|0);
+   $42 = HEAP32[$41>>2]|0;
+   $43 = ($42|0)==($9|0);
+   do {
+    if ($43) {
+     $53 = ((($9)) + 16|0);
+     $54 = ((($53)) + 4|0);
+     $55 = HEAP32[$54>>2]|0;
+     $56 = ($55|0)==(0|0);
+     if ($56) {
+      $57 = HEAP32[$53>>2]|0;
+      $58 = ($57|0)==(0|0);
+      if ($58) {
+       $R$3 = 0;
+       break;
+      } else {
+       $R$1 = $57;$RP$1 = $53;
+      }
+     } else {
+      $R$1 = $55;$RP$1 = $54;
+     }
+     while(1) {
+      $59 = ((($R$1)) + 20|0);
+      $60 = HEAP32[$59>>2]|0;
+      $61 = ($60|0)==(0|0);
+      if (!($61)) {
+       $R$1 = $60;$RP$1 = $59;
+       continue;
+      }
+      $62 = ((($R$1)) + 16|0);
+      $63 = HEAP32[$62>>2]|0;
+      $64 = ($63|0)==(0|0);
+      if ($64) {
+       $R$1$lcssa = $R$1;$RP$1$lcssa = $RP$1;
+       break;
+      } else {
+       $R$1 = $63;$RP$1 = $62;
+      }
+     }
+     $65 = ($RP$1$lcssa>>>0)<($11>>>0);
+     if ($65) {
+      _abort();
+      // unreachable;
+     } else {
+      HEAP32[$RP$1$lcssa>>2] = 0;
+      $R$3 = $R$1$lcssa;
+      break;
+     }
+    } else {
+     $44 = ((($9)) + 8|0);
+     $45 = HEAP32[$44>>2]|0;
+     $46 = ($45>>>0)<($11>>>0);
+     if ($46) {
+      _abort();
+      // unreachable;
+     }
+     $47 = ((($45)) + 12|0);
+     $48 = HEAP32[$47>>2]|0;
+     $49 = ($48|0)==($9|0);
+     if (!($49)) {
+      _abort();
+      // unreachable;
+     }
+     $50 = ((($42)) + 8|0);
+     $51 = HEAP32[$50>>2]|0;
+     $52 = ($51|0)==($9|0);
+     if ($52) {
+      HEAP32[$47>>2] = $42;
+      HEAP32[$50>>2] = $45;
+      $R$3 = $42;
+      break;
+     } else {
+      _abort();
+      // unreachable;
+     }
+    }
+   } while(0);
+   $66 = ($40|0)==(0|0);
+   if ($66) {
+    $$1 = $9;$$14 = $10;
+   } else {
+    $67 = ((($9)) + 28|0);
+    $68 = HEAP32[$67>>2]|0;
+    $69 = (75248 + ($68<<2)|0);
+    $70 = HEAP32[$69>>2]|0;
+    $71 = ($9|0)==($70|0);
+    if ($71) {
+     HEAP32[$69>>2] = $R$3;
+     $cond = ($R$3|0)==(0|0);
+     if ($cond) {
+      $72 = 1 << $68;
+      $73 = $72 ^ -1;
+      $74 = HEAP32[(74948)>>2]|0;
+      $75 = $74 & $73;
+      HEAP32[(74948)>>2] = $75;
+      $$1 = $9;$$14 = $10;
+      break;
+     }
+    } else {
+     $76 = HEAP32[(74960)>>2]|0;
+     $77 = ($40>>>0)<($76>>>0);
+     if ($77) {
+      _abort();
+      // unreachable;
+     }
+     $78 = ((($40)) + 16|0);
+     $79 = HEAP32[$78>>2]|0;
+     $80 = ($79|0)==($9|0);
+     if ($80) {
+      HEAP32[$78>>2] = $R$3;
+     } else {
+      $81 = ((($40)) + 20|0);
+      HEAP32[$81>>2] = $R$3;
+     }
+     $82 = ($R$3|0)==(0|0);
+     if ($82) {
+      $$1 = $9;$$14 = $10;
+      break;
+     }
+    }
+    $83 = HEAP32[(74960)>>2]|0;
+    $84 = ($R$3>>>0)<($83>>>0);
+    if ($84) {
+     _abort();
+     // unreachable;
+    }
+    $85 = ((($R$3)) + 24|0);
+    HEAP32[$85>>2] = $40;
+    $86 = ((($9)) + 16|0);
+    $87 = HEAP32[$86>>2]|0;
+    $88 = ($87|0)==(0|0);
+    do {
+     if (!($88)) {
+      $89 = ($87>>>0)<($83>>>0);
+      if ($89) {
+       _abort();
+       // unreachable;
+      } else {
+       $90 = ((($R$3)) + 16|0);
+       HEAP32[$90>>2] = $87;
+       $91 = ((($87)) + 24|0);
+       HEAP32[$91>>2] = $R$3;
+       break;
+      }
+     }
+    } while(0);
+    $92 = ((($86)) + 4|0);
+    $93 = HEAP32[$92>>2]|0;
+    $94 = ($93|0)==(0|0);
+    if ($94) {
+     $$1 = $9;$$14 = $10;
+    } else {
+     $95 = HEAP32[(74960)>>2]|0;
+     $96 = ($93>>>0)<($95>>>0);
+     if ($96) {
+      _abort();
+      // unreachable;
+     } else {
+      $97 = ((($R$3)) + 20|0);
+      HEAP32[$97>>2] = $93;
+      $98 = ((($93)) + 24|0);
+      HEAP32[$98>>2] = $R$3;
+      $$1 = $9;$$14 = $10;
+      break;
+     }
+    }
+   }
+  } else {
+   $$1 = $p;$$14 = $psize;
+  }
+ } while(0);
+ $107 = HEAP32[(74960)>>2]|0;
+ $108 = ($0>>>0)<($107>>>0);
+ if ($108) {
+  _abort();
+  // unreachable;
+ }
+ $109 = ((($0)) + 4|0);
+ $110 = HEAP32[$109>>2]|0;
+ $111 = $110 & 2;
+ $112 = ($111|0)==(0);
+ if ($112) {
+  $113 = HEAP32[(74968)>>2]|0;
+  $114 = ($0|0)==($113|0);
+  if ($114) {
+   $115 = HEAP32[(74956)>>2]|0;
+   $116 = (($115) + ($$14))|0;
+   HEAP32[(74956)>>2] = $116;
+   HEAP32[(74968)>>2] = $$1;
+   $117 = $116 | 1;
+   $118 = ((($$1)) + 4|0);
+   HEAP32[$118>>2] = $117;
+   $119 = HEAP32[(74964)>>2]|0;
+   $120 = ($$1|0)==($119|0);
+   if (!($120)) {
+    return;
+   }
+   HEAP32[(74964)>>2] = 0;
+   HEAP32[(74952)>>2] = 0;
+   return;
+  }
+  $121 = HEAP32[(74964)>>2]|0;
+  $122 = ($0|0)==($121|0);
+  if ($122) {
+   $123 = HEAP32[(74952)>>2]|0;
+   $124 = (($123) + ($$14))|0;
+   HEAP32[(74952)>>2] = $124;
+   HEAP32[(74964)>>2] = $$1;
+   $125 = $124 | 1;
+   $126 = ((($$1)) + 4|0);
+   HEAP32[$126>>2] = $125;
+   $127 = (($$1) + ($124)|0);
+   HEAP32[$127>>2] = $124;
+   return;
+  }
+  $128 = $110 & -8;
+  $129 = (($128) + ($$14))|0;
+  $130 = $110 >>> 3;
+  $131 = ($110>>>0)<(256);
+  do {
+   if ($131) {
+    $132 = ((($0)) + 8|0);
+    $133 = HEAP32[$132>>2]|0;
+    $134 = ((($0)) + 12|0);
+    $135 = HEAP32[$134>>2]|0;
+    $136 = $130 << 1;
+    $137 = (74984 + ($136<<2)|0);
+    $138 = ($133|0)==($137|0);
+    if (!($138)) {
+     $139 = ($133>>>0)<($107>>>0);
+     if ($139) {
+      _abort();
+      // unreachable;
+     }
+     $140 = ((($133)) + 12|0);
+     $141 = HEAP32[$140>>2]|0;
+     $142 = ($141|0)==($0|0);
+     if (!($142)) {
+      _abort();
+      // unreachable;
+     }
+    }
+    $143 = ($135|0)==($133|0);
+    if ($143) {
+     $144 = 1 << $130;
+     $145 = $144 ^ -1;
+     $146 = HEAP32[18736]|0;
+     $147 = $146 & $145;
+     HEAP32[18736] = $147;
+     break;
+    }
+    $148 = ($135|0)==($137|0);
+    if ($148) {
+     $$pre21 = ((($135)) + 8|0);
+     $$pre$phi22Z2D = $$pre21;
+    } else {
+     $149 = ($135>>>0)<($107>>>0);
+     if ($149) {
+      _abort();
+      // unreachable;
+     }
+     $150 = ((($135)) + 8|0);
+     $151 = HEAP32[$150>>2]|0;
+     $152 = ($151|0)==($0|0);
+     if ($152) {
+      $$pre$phi22Z2D = $150;
+     } else {
+      _abort();
+      // unreachable;
+     }
+    }
+    $153 = ((($133)) + 12|0);
+    HEAP32[$153>>2] = $135;
+    HEAP32[$$pre$phi22Z2D>>2] = $133;
+   } else {
+    $154 = ((($0)) + 24|0);
+    $155 = HEAP32[$154>>2]|0;
+    $156 = ((($0)) + 12|0);
+    $157 = HEAP32[$156>>2]|0;
+    $158 = ($157|0)==($0|0);
+    do {
+     if ($158) {
+      $168 = ((($0)) + 16|0);
+      $169 = ((($168)) + 4|0);
+      $170 = HEAP32[$169>>2]|0;
+      $171 = ($170|0)==(0|0);
+      if ($171) {
+       $172 = HEAP32[$168>>2]|0;
+       $173 = ($172|0)==(0|0);
+       if ($173) {
+        $R7$3 = 0;
+        break;
+       } else {
+        $R7$1 = $172;$RP9$1 = $168;
+       }
+      } else {
+       $R7$1 = $170;$RP9$1 = $169;
+      }
+      while(1) {
+       $174 = ((($R7$1)) + 20|0);
+       $175 = HEAP32[$174>>2]|0;
+       $176 = ($175|0)==(0|0);
+       if (!($176)) {
+        $R7$1 = $175;$RP9$1 = $174;
+        continue;
+       }
+       $177 = ((($R7$1)) + 16|0);
+       $178 = HEAP32[$177>>2]|0;
+       $179 = ($178|0)==(0|0);
+       if ($179) {
+        $R7$1$lcssa = $R7$1;$RP9$1$lcssa = $RP9$1;
+        break;
+       } else {
+        $R7$1 = $178;$RP9$1 = $177;
+       }
+      }
+      $180 = ($RP9$1$lcssa>>>0)<($107>>>0);
+      if ($180) {
+       _abort();
+       // unreachable;
+      } else {
+       HEAP32[$RP9$1$lcssa>>2] = 0;
+       $R7$3 = $R7$1$lcssa;
+       break;
+      }
+     } else {
+      $159 = ((($0)) + 8|0);
+      $160 = HEAP32[$159>>2]|0;
+      $161 = ($160>>>0)<($107>>>0);
+      if ($161) {
+       _abort();
+       // unreachable;
+      }
+      $162 = ((($160)) + 12|0);
+      $163 = HEAP32[$162>>2]|0;
+      $164 = ($163|0)==($0|0);
+      if (!($164)) {
+       _abort();
+       // unreachable;
+      }
+      $165 = ((($157)) + 8|0);
+      $166 = HEAP32[$165>>2]|0;
+      $167 = ($166|0)==($0|0);
+      if ($167) {
+       HEAP32[$162>>2] = $157;
+       HEAP32[$165>>2] = $160;
+       $R7$3 = $157;
+       break;
+      } else {
+       _abort();
+       // unreachable;
+      }
+     }
+    } while(0);
+    $181 = ($155|0)==(0|0);
+    if (!($181)) {
+     $182 = ((($0)) + 28|0);
+     $183 = HEAP32[$182>>2]|0;
+     $184 = (75248 + ($183<<2)|0);
+     $185 = HEAP32[$184>>2]|0;
+     $186 = ($0|0)==($185|0);
+     if ($186) {
+      HEAP32[$184>>2] = $R7$3;
+      $cond16 = ($R7$3|0)==(0|0);
+      if ($cond16) {
+       $187 = 1 << $183;
+       $188 = $187 ^ -1;
+       $189 = HEAP32[(74948)>>2]|0;
+       $190 = $189 & $188;
+       HEAP32[(74948)>>2] = $190;
+       break;
+      }
+     } else {
+      $191 = HEAP32[(74960)>>2]|0;
+      $192 = ($155>>>0)<($191>>>0);
+      if ($192) {
+       _abort();
+       // unreachable;
+      }
+      $193 = ((($155)) + 16|0);
+      $194 = HEAP32[$193>>2]|0;
+      $195 = ($194|0)==($0|0);
+      if ($195) {
+       HEAP32[$193>>2] = $R7$3;
+      } else {
+       $196 = ((($155)) + 20|0);
+       HEAP32[$196>>2] = $R7$3;
+      }
+      $197 = ($R7$3|0)==(0|0);
+      if ($197) {
+       break;
+      }
+     }
+     $198 = HEAP32[(74960)>>2]|0;
+     $199 = ($R7$3>>>0)<($198>>>0);
+     if ($199) {
+      _abort();
+      // unreachable;
+     }
+     $200 = ((($R7$3)) + 24|0);
+     HEAP32[$200>>2] = $155;
+     $201 = ((($0)) + 16|0);
+     $202 = HEAP32[$201>>2]|0;
+     $203 = ($202|0)==(0|0);
+     do {
+      if (!($203)) {
+       $204 = ($202>>>0)<($198>>>0);
+       if ($204) {
+        _abort();
+        // unreachable;
+       } else {
+        $205 = ((($R7$3)) + 16|0);
+        HEAP32[$205>>2] = $202;
+        $206 = ((($202)) + 24|0);
+        HEAP32[$206>>2] = $R7$3;
+        break;
+       }
+      }
+     } while(0);
+     $207 = ((($201)) + 4|0);
+     $208 = HEAP32[$207>>2]|0;
+     $209 = ($208|0)==(0|0);
+     if (!($209)) {
+      $210 = HEAP32[(74960)>>2]|0;
+      $211 = ($208>>>0)<($210>>>0);
+      if ($211) {
+       _abort();
+       // unreachable;
+      } else {
+       $212 = ((($R7$3)) + 20|0);
+       HEAP32[$212>>2] = $208;
+       $213 = ((($208)) + 24|0);
+       HEAP32[$213>>2] = $R7$3;
+       break;
+      }
+     }
+    }
+   }
+  } while(0);
+  $214 = $129 | 1;
+  $215 = ((($$1)) + 4|0);
+  HEAP32[$215>>2] = $214;
+  $216 = (($$1) + ($129)|0);
+  HEAP32[$216>>2] = $129;
+  $217 = HEAP32[(74964)>>2]|0;
+  $218 = ($$1|0)==($217|0);
+  if ($218) {
+   HEAP32[(74952)>>2] = $129;
+   return;
+  } else {
+   $$2 = $129;
+  }
+ } else {
+  $219 = $110 & -2;
+  HEAP32[$109>>2] = $219;
+  $220 = $$14 | 1;
+  $221 = ((($$1)) + 4|0);
+  HEAP32[$221>>2] = $220;
+  $222 = (($$1) + ($$14)|0);
+  HEAP32[$222>>2] = $$14;
+  $$2 = $$14;
+ }
+ $223 = $$2 >>> 3;
+ $224 = ($$2>>>0)<(256);
+ if ($224) {
+  $225 = $223 << 1;
+  $226 = (74984 + ($225<<2)|0);
+  $227 = HEAP32[18736]|0;
+  $228 = 1 << $223;
+  $229 = $227 & $228;
+  $230 = ($229|0)==(0);
+  if ($230) {
+   $231 = $227 | $228;
+   HEAP32[18736] = $231;
+   $$pre = ((($226)) + 8|0);
+   $$pre$phiZ2D = $$pre;$F17$0 = $226;
+  } else {
+   $232 = ((($226)) + 8|0);
+   $233 = HEAP32[$232>>2]|0;
+   $234 = HEAP32[(74960)>>2]|0;
+   $235 = ($233>>>0)<($234>>>0);
+   if ($235) {
+    _abort();
+    // unreachable;
+   } else {
+    $$pre$phiZ2D = $232;$F17$0 = $233;
+   }
+  }
+  HEAP32[$$pre$phiZ2D>>2] = $$1;
+  $236 = ((($F17$0)) + 12|0);
+  HEAP32[$236>>2] = $$1;
+  $237 = ((($$1)) + 8|0);
+  HEAP32[$237>>2] = $F17$0;
+  $238 = ((($$1)) + 12|0);
+  HEAP32[$238>>2] = $226;
+  return;
+ }
+ $239 = $$2 >>> 8;
+ $240 = ($239|0)==(0);
+ if ($240) {
+  $I20$0 = 0;
+ } else {
+  $241 = ($$2>>>0)>(16777215);
+  if ($241) {
+   $I20$0 = 31;
+  } else {
+   $242 = (($239) + 1048320)|0;
+   $243 = $242 >>> 16;
+   $244 = $243 & 8;
+   $245 = $239 << $244;
+   $246 = (($245) + 520192)|0;
+   $247 = $246 >>> 16;
+   $248 = $247 & 4;
+   $249 = $248 | $244;
+   $250 = $245 << $248;
+   $251 = (($250) + 245760)|0;
+   $252 = $251 >>> 16;
+   $253 = $252 & 2;
+   $254 = $249 | $253;
+   $255 = (14 - ($254))|0;
+   $256 = $250 << $253;
+   $257 = $256 >>> 15;
+   $258 = (($255) + ($257))|0;
+   $259 = $258 << 1;
+   $260 = (($258) + 7)|0;
+   $261 = $$2 >>> $260;
+   $262 = $261 & 1;
+   $263 = $262 | $259;
+   $I20$0 = $263;
+  }
+ }
+ $264 = (75248 + ($I20$0<<2)|0);
+ $265 = ((($$1)) + 28|0);
+ HEAP32[$265>>2] = $I20$0;
+ $266 = ((($$1)) + 16|0);
+ $267 = ((($$1)) + 20|0);
+ HEAP32[$267>>2] = 0;
+ HEAP32[$266>>2] = 0;
+ $268 = HEAP32[(74948)>>2]|0;
+ $269 = 1 << $I20$0;
+ $270 = $268 & $269;
+ $271 = ($270|0)==(0);
+ if ($271) {
+  $272 = $268 | $269;
+  HEAP32[(74948)>>2] = $272;
+  HEAP32[$264>>2] = $$1;
+  $273 = ((($$1)) + 24|0);
+  HEAP32[$273>>2] = $264;
+  $274 = ((($$1)) + 12|0);
+  HEAP32[$274>>2] = $$1;
+  $275 = ((($$1)) + 8|0);
+  HEAP32[$275>>2] = $$1;
+  return;
+ }
+ $276 = HEAP32[$264>>2]|0;
+ $277 = ($I20$0|0)==(31);
+ $278 = $I20$0 >>> 1;
+ $279 = (25 - ($278))|0;
+ $280 = $277 ? 0 : $279;
+ $281 = $$2 << $280;
+ $K21$0 = $281;$T$0 = $276;
+ while(1) {
+  $282 = ((($T$0)) + 4|0);
+  $283 = HEAP32[$282>>2]|0;
+  $284 = $283 & -8;
+  $285 = ($284|0)==($$2|0);
+  if ($285) {
+   $T$0$lcssa = $T$0;
+   label = 127;
+   break;
+  }
+  $286 = $K21$0 >>> 31;
+  $287 = (((($T$0)) + 16|0) + ($286<<2)|0);
+  $288 = $K21$0 << 1;
+  $289 = HEAP32[$287>>2]|0;
+  $290 = ($289|0)==(0|0);
+  if ($290) {
+   $$lcssa = $287;$T$0$lcssa30 = $T$0;
+   label = 124;
+   break;
+  } else {
+   $K21$0 = $288;$T$0 = $289;
+  }
+ }
+ if ((label|0) == 124) {
+  $291 = HEAP32[(74960)>>2]|0;
+  $292 = ($$lcssa>>>0)<($291>>>0);
+  if ($292) {
+   _abort();
+   // unreachable;
+  }
+  HEAP32[$$lcssa>>2] = $$1;
+  $293 = ((($$1)) + 24|0);
+  HEAP32[$293>>2] = $T$0$lcssa30;
+  $294 = ((($$1)) + 12|0);
+  HEAP32[$294>>2] = $$1;
+  $295 = ((($$1)) + 8|0);
+  HEAP32[$295>>2] = $$1;
+  return;
+ }
+ else if ((label|0) == 127) {
+  $296 = ((($T$0$lcssa)) + 8|0);
+  $297 = HEAP32[$296>>2]|0;
+  $298 = HEAP32[(74960)>>2]|0;
+  $299 = ($297>>>0)>=($298>>>0);
+  $not$ = ($T$0$lcssa>>>0)>=($298>>>0);
+  $300 = $299 & $not$;
+  if (!($300)) {
+   _abort();
+   // unreachable;
+  }
+  $301 = ((($297)) + 12|0);
+  HEAP32[$301>>2] = $$1;
+  HEAP32[$296>>2] = $$1;
+  $302 = ((($$1)) + 8|0);
+  HEAP32[$302>>2] = $297;
+  $303 = ((($$1)) + 12|0);
+  HEAP32[$303>>2] = $T$0$lcssa;
+  $304 = ((($$1)) + 24|0);
+  HEAP32[$304>>2] = 0;
+  return;
+ }
+}
+function runPostSets() {
+}
+function _i64Subtract(a, b, c, d) {
+    a = a|0; b = b|0; c = c|0; d = d|0;
+    var l = 0, h = 0;
+    l = (a - c)>>>0;
+    h = (b - d)>>>0;
+    h = (b - d - (((c>>>0) > (a>>>0))|0))>>>0; // Borrow one from high word to low word on underflow.
+    return ((tempRet0 = h,l|0)|0);
+}
+function _i64Add(a, b, c, d) {
+    /*
+      x = a + b*2^32
+      y = c + d*2^32
+      result = l + h*2^32
+    */
+    a = a|0; b = b|0; c = c|0; d = d|0;
+    var l = 0, h = 0;
+    l = (a + c)>>>0;
+    h = (b + d + (((l>>>0) < (a>>>0))|0))>>>0; // Add carry from low word to high word on overflow.
+    return ((tempRet0 = h,l|0)|0);
+}
+function _memset(ptr, value, num) {
+    ptr = ptr|0; value = value|0; num = num|0;
+    var stop = 0, value4 = 0, stop4 = 0, unaligned = 0;
+    stop = (ptr + num)|0;
+    if ((num|0) >= 20) {
+      // This is unaligned, but quite large, so work hard to get to aligned settings
+      value = value & 0xff;
+      unaligned = ptr & 3;
+      value4 = value | (value << 8) | (value << 16) | (value << 24);
+      stop4 = stop & ~3;
+      if (unaligned) {
+        unaligned = (ptr + 4 - unaligned)|0;
+        while ((ptr|0) < (unaligned|0)) { // no need to check for stop, since we have large num
+          HEAP8[((ptr)>>0)]=value;
+          ptr = (ptr+1)|0;
+        }
+      }
+      while ((ptr|0) < (stop4|0)) {
+        HEAP32[((ptr)>>2)]=value4;
+        ptr = (ptr+4)|0;
+      }
+    }
+    while ((ptr|0) < (stop|0)) {
+      HEAP8[((ptr)>>0)]=value;
+      ptr = (ptr+1)|0;
+    }
+    return (ptr-num)|0;
+}
+function _bitshift64Shl(low, high, bits) {
+    low = low|0; high = high|0; bits = bits|0;
+    var ander = 0;
+    if ((bits|0) < 32) {
+      ander = ((1 << bits) - 1)|0;
+      tempRet0 = (high << bits) | ((low&(ander << (32 - bits))) >>> (32 - bits));
+      return low << bits;
+    }
+    tempRet0 = low << (bits - 32);
+    return 0;
+}
+function _saveSetjmp(env, label, table, size) {
+    // Not particularly fast: slow table lookup of setjmpId to label. But setjmp
+    // prevents relooping anyhow, so slowness is to be expected. And typical case
+    // is 1 setjmp per invocation, or less.
+    env = env|0;
+    label = label|0;
+    table = table|0;
+    size = size|0;
+    var i = 0;
+    setjmpId = (setjmpId+1)|0;
+    HEAP32[((env)>>2)]=setjmpId;
+    while ((i|0) < (size|0)) {
+      if (((HEAP32[(((table)+((i<<3)))>>2)])|0) == 0) {
+        HEAP32[(((table)+((i<<3)))>>2)]=setjmpId;
+        HEAP32[(((table)+((i<<3)+4))>>2)]=label;
+        // prepare next slot
+        HEAP32[(((table)+((i<<3)+8))>>2)]=0;
+        tempRet0 = size;
+        return table | 0;
+      }
+      i = i+1|0;
+    }
+    // grow the table
+    size = (size*2)|0;
+    table = _realloc(table|0, 8*(size+1|0)|0) | 0;
+    table = _saveSetjmp(env|0, label|0, table|0, size|0) | 0;
+    tempRet0 = size;
+    return table | 0;
+}
+function _bitshift64Lshr(low, high, bits) {
+    low = low|0; high = high|0; bits = bits|0;
+    var ander = 0;
+    if ((bits|0) < 32) {
+      ander = ((1 << bits) - 1)|0;
+      tempRet0 = high >>> bits;
+      return (low >>> bits) | ((high&ander) << (32 - bits));
+    }
+    tempRet0 = 0;
+    return (high >>> (bits - 32))|0;
+}
+function _testSetjmp(id, table, size) {
+    id = id|0;
+    table = table|0;
+    size = size|0;
+    var i = 0, curr = 0;
+    while ((i|0) < (size|0)) {
+      curr = ((HEAP32[(((table)+((i<<3)))>>2)])|0);
+      if ((curr|0) == 0) break;
+      if ((curr|0) == (id|0)) {
+        return ((HEAP32[(((table)+((i<<3)+4))>>2)])|0);
+      }
+      i = i+1|0;
+    }
+    return 0;
+}
+function _memcpy(dest, src, num) {
+    dest = dest|0; src = src|0; num = num|0;
+    var ret = 0;
+    if ((num|0) >= 4096) return _emscripten_memcpy_big(dest|0, src|0, num|0)|0;
+    ret = dest|0;
+    if ((dest&3) == (src&3)) {
+      while (dest & 3) {
+        if ((num|0) == 0) return ret|0;
+        HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0);
+        dest = (dest+1)|0;
+        src = (src+1)|0;
+        num = (num-1)|0;
+      }
+      while ((num|0) >= 4) {
+        HEAP32[((dest)>>2)]=((HEAP32[((src)>>2)])|0);
+        dest = (dest+4)|0;
+        src = (src+4)|0;
+        num = (num-4)|0;
+      }
+    }
+    while ((num|0) > 0) {
+      HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0);
+      dest = (dest+1)|0;
+      src = (src+1)|0;
+      num = (num-1)|0;
+    }
+    return ret|0;
+}
+function _llvm_cttz_i32(x) {
+    x = x|0;
+    var ret = 0;
+    ret = ((HEAP8[(((cttz_i8)+(x & 0xff))>>0)])|0);
+    if ((ret|0) < 8) return ret|0;
+    ret = ((HEAP8[(((cttz_i8)+((x >> 8)&0xff))>>0)])|0);
+    if ((ret|0) < 8) return (ret + 8)|0;
+    ret = ((HEAP8[(((cttz_i8)+((x >> 16)&0xff))>>0)])|0);
+    if ((ret|0) < 8) return (ret + 16)|0;
+    return (((HEAP8[(((cttz_i8)+(x >>> 24))>>0)])|0) + 24)|0;
+}
+function ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) {
+    $a$0 = $a$0 | 0;
+    $a$1 = $a$1 | 0;
+    $b$0 = $b$0 | 0;
+    $b$1 = $b$1 | 0;
+    $rem = $rem | 0;
+    var $n_sroa_0_0_extract_trunc = 0, $n_sroa_1_4_extract_shift$0 = 0, $n_sroa_1_4_extract_trunc = 0, $d_sroa_0_0_extract_trunc = 0, $d_sroa_1_4_extract_shift$0 = 0, $d_sroa_1_4_extract_trunc = 0, $4 = 0, $17 = 0, $37 = 0, $49 = 0, $51 = 0, $57 = 0, $58 = 0, $66 = 0, $78 = 0, $86 = 0, $88 = 0, $89 = 0, $91 = 0, $92 = 0, $95 = 0, $105 = 0, $117 = 0, $119 = 0, $125 = 0, $126 = 0, $130 = 0, $q_sroa_1_1_ph = 0, $q_sroa_0_1_ph = 0, $r_sroa_1_1_ph = 0, $r_sroa_0_1_ph = 0, $sr_1_ph = 0, $d_sroa_0_0_insert_insert99$0 = 0, $d_sroa_0_0_insert_insert99$1 = 0, $137$0 = 0, $137$1 = 0, $carry_0203 = 0, $sr_1202 = 0, $r_sroa_0_1201 = 0, $r_sroa_1_1200 = 0, $q_sroa_0_1199 = 0, $q_sroa_1_1198 = 0, $147 = 0, $149 = 0, $r_sroa_0_0_insert_insert42$0 = 0, $r_sroa_0_0_insert_insert42$1 = 0, $150$1 = 0, $151$0 = 0, $152 = 0, $154$0 = 0, $r_sroa_0_0_extract_trunc = 0, $r_sroa_1_4_extract_trunc = 0, $155 = 0, $carry_0_lcssa$0 = 0, $carry_0_lcssa$1 = 0, $r_sroa_0_1_lcssa = 0, $r_sroa_1_1_lcssa = 0, $q_sroa_0_1_lcssa = 0, $q_sroa_1_1_lcssa = 0, $q_sroa_0_0_insert_ext75$0 = 0, $q_sroa_0_0_insert_ext75$1 = 0, $q_sroa_0_0_insert_insert77$1 = 0, $_0$0 = 0, $_0$1 = 0;
+    $n_sroa_0_0_extract_trunc = $a$0;
+    $n_sroa_1_4_extract_shift$0 = $a$1;
+    $n_sroa_1_4_extract_trunc = $n_sroa_1_4_extract_shift$0;
+    $d_sroa_0_0_extract_trunc = $b$0;
+    $d_sroa_1_4_extract_shift$0 = $b$1;
+    $d_sroa_1_4_extract_trunc = $d_sroa_1_4_extract_shift$0;
+    if (($n_sroa_1_4_extract_trunc | 0) == 0) {
+      $4 = ($rem | 0) != 0;
+      if (($d_sroa_1_4_extract_trunc | 0) == 0) {
+        if ($4) {
+          HEAP32[$rem >> 2] = ($n_sroa_0_0_extract_trunc >>> 0) % ($d_sroa_0_0_extract_trunc >>> 0);
+          HEAP32[$rem + 4 >> 2] = 0;
+        }
+        $_0$1 = 0;
+        $_0$0 = ($n_sroa_0_0_extract_trunc >>> 0) / ($d_sroa_0_0_extract_trunc >>> 0) >>> 0;
+        return (tempRet0 = $_0$1, $_0$0) | 0;
+      } else {
+        if (!$4) {
+          $_0$1 = 0;
+          $_0$0 = 0;
+          return (tempRet0 = $_0$1, $_0$0) | 0;
+        }
+        HEAP32[$rem >> 2] = $a$0 & -1;
+        HEAP32[$rem + 4 >> 2] = $a$1 & 0;
+        $_0$1 = 0;
+        $_0$0 = 0;
+        return (tempRet0 = $_0$1, $_0$0) | 0;
+      }
+    }
+    $17 = ($d_sroa_1_4_extract_trunc | 0) == 0;
+    do {
+      if (($d_sroa_0_0_extract_trunc | 0) == 0) {
+        if ($17) {
+          if (($rem | 0) != 0) {
+            HEAP32[$rem >> 2] = ($n_sroa_1_4_extract_trunc >>> 0) % ($d_sroa_0_0_extract_trunc >>> 0);
+            HEAP32[$rem + 4 >> 2] = 0;
+          }
+          $_0$1 = 0;
+          $_0$0 = ($n_sroa_1_4_extract_trunc >>> 0) / ($d_sroa_0_0_extract_trunc >>> 0) >>> 0;
+          return (tempRet0 = $_0$1, $_0$0) | 0;
+        }
+        if (($n_sroa_0_0_extract_trunc | 0) == 0) {
+          if (($rem | 0) != 0) {
+            HEAP32[$rem >> 2] = 0;
+            HEAP32[$rem + 4 >> 2] = ($n_sroa_1_4_extract_trunc >>> 0) % ($d_sroa_1_4_extract_trunc >>> 0);
+          }
+          $_0$1 = 0;
+          $_0$0 = ($n_sroa_1_4_extract_trunc >>> 0) / ($d_sroa_1_4_extract_trunc >>> 0) >>> 0;
+          return (tempRet0 = $_0$1, $_0$0) | 0;
+        }
+        $37 = $d_sroa_1_4_extract_trunc - 1 | 0;
+        if (($37 & $d_sroa_1_4_extract_trunc | 0) == 0) {
+          if (($rem | 0) != 0) {
+            HEAP32[$rem >> 2] = 0 | $a$0 & -1;
+            HEAP32[$rem + 4 >> 2] = $37 & $n_sroa_1_4_extract_trunc | $a$1 & 0;
+          }
+          $_0$1 = 0;
+          $_0$0 = $n_sroa_1_4_extract_trunc >>> ((_llvm_cttz_i32($d_sroa_1_4_extract_trunc | 0) | 0) >>> 0);
+          return (tempRet0 = $_0$1, $_0$0) | 0;
+        }
+        $49 = Math_clz32($d_sroa_1_4_extract_trunc | 0) | 0;
+        $51 = $49 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0;
+        if ($51 >>> 0 <= 30) {
+          $57 = $51 + 1 | 0;
+          $58 = 31 - $51 | 0;
+          $sr_1_ph = $57;
+          $r_sroa_0_1_ph = $n_sroa_1_4_extract_trunc << $58 | $n_sroa_0_0_extract_trunc >>> ($57 >>> 0);
+          $r_sroa_1_1_ph = $n_sroa_1_4_extract_trunc >>> ($57 >>> 0);
+          $q_sroa_0_1_ph = 0;
+          $q_sroa_1_1_ph = $n_sroa_0_0_extract_trunc << $58;
+          break;
+        }
+        if (($rem | 0) == 0) {
+          $_0$1 = 0;
+          $_0$0 = 0;
+          return (tempRet0 = $_0$1, $_0$0) | 0;
+        }
+        HEAP32[$rem >> 2] = 0 | $a$0 & -1;
+        HEAP32[$rem + 4 >> 2] = $n_sroa_1_4_extract_shift$0 | $a$1 & 0;
+        $_0$1 = 0;
+        $_0$0 = 0;
+        return (tempRet0 = $_0$1, $_0$0) | 0;
+      } else {
+        if (!$17) {
+          $117 = Math_clz32($d_sroa_1_4_extract_trunc | 0) | 0;
+          $119 = $117 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0;
+          if ($119 >>> 0 <= 31) {
+            $125 = $119 + 1 | 0;
+            $126 = 31 - $119 | 0;
+            $130 = $119 - 31 >> 31;
+            $sr_1_ph = $125;
+            $r_sroa_0_1_ph = $n_sroa_0_0_extract_trunc >>> ($125 >>> 0) & $130 | $n_sroa_1_4_extract_trunc << $126;
+            $r_sroa_1_1_ph = $n_sroa_1_4_extract_trunc >>> ($125 >>> 0) & $130;
+            $q_sroa_0_1_ph = 0;
+            $q_sroa_1_1_ph = $n_sroa_0_0_extract_trunc << $126;
+            break;
+          }
+          if (($rem | 0) == 0) {
+            $_0$1 = 0;
+            $_0$0 = 0;
+            return (tempRet0 = $_0$1, $_0$0) | 0;
+          }
+          HEAP32[$rem >> 2] = 0 | $a$0 & -1;
+          HEAP32[$rem + 4 >> 2] = $n_sroa_1_4_extract_shift$0 | $a$1 & 0;
+          $_0$1 = 0;
+          $_0$0 = 0;
+          return (tempRet0 = $_0$1, $_0$0) | 0;
+        }
+        $66 = $d_sroa_0_0_extract_trunc - 1 | 0;
+        if (($66 & $d_sroa_0_0_extract_trunc | 0) != 0) {
+          $86 = (Math_clz32($d_sroa_0_0_extract_trunc | 0) | 0) + 33 | 0;
+          $88 = $86 - (Math_clz32($n_sroa_1_4_extract_trunc | 0) | 0) | 0;
+          $89 = 64 - $88 | 0;
+          $91 = 32 - $88 | 0;
+          $92 = $91 >> 31;
+          $95 = $88 - 32 | 0;
+          $105 = $95 >> 31;
+          $sr_1_ph = $88;
+          $r_sroa_0_1_ph = $91 - 1 >> 31 & $n_sroa_1_4_extract_trunc >>> ($95 >>> 0) | ($n_sroa_1_4_extract_trunc << $91 | $n_sroa_0_0_extract_trunc >>> ($88 >>> 0)) & $105;
+          $r_sroa_1_1_ph = $105 & $n_sroa_1_4_extract_trunc >>> ($88 >>> 0);
+          $q_sroa_0_1_ph = $n_sroa_0_0_extract_trunc << $89 & $92;
+          $q_sroa_1_1_ph = ($n_sroa_1_4_extract_trunc << $89 | $n_sroa_0_0_extract_trunc >>> ($95 >>> 0)) & $92 | $n_sroa_0_0_extract_trunc << $91 & $88 - 33 >> 31;
+          break;
+        }
+        if (($rem | 0) != 0) {
+          HEAP32[$rem >> 2] = $66 & $n_sroa_0_0_extract_trunc;
+          HEAP32[$rem + 4 >> 2] = 0;
+        }
+        if (($d_sroa_0_0_extract_trunc | 0) == 1) {
+          $_0$1 = $n_sroa_1_4_extract_shift$0 | $a$1 & 0;
+          $_0$0 = 0 | $a$0 & -1;
+          return (tempRet0 = $_0$1, $_0$0) | 0;
+        } else {
+          $78 = _llvm_cttz_i32($d_sroa_0_0_extract_trunc | 0) | 0;
+          $_0$1 = 0 | $n_sroa_1_4_extract_trunc >>> ($78 >>> 0);
+          $_0$0 = $n_sroa_1_4_extract_trunc << 32 - $78 | $n_sroa_0_0_extract_trunc >>> ($78 >>> 0) | 0;
+          return (tempRet0 = $_0$1, $_0$0) | 0;
+        }
+      }
+    } while (0);
+    if (($sr_1_ph | 0) == 0) {
+      $q_sroa_1_1_lcssa = $q_sroa_1_1_ph;
+      $q_sroa_0_1_lcssa = $q_sroa_0_1_ph;
+      $r_sroa_1_1_lcssa = $r_sroa_1_1_ph;
+      $r_sroa_0_1_lcssa = $r_sroa_0_1_ph;
+      $carry_0_lcssa$1 = 0;
+      $carry_0_lcssa$0 = 0;
+    } else {
+      $d_sroa_0_0_insert_insert99$0 = 0 | $b$0 & -1;
+      $d_sroa_0_0_insert_insert99$1 = $d_sroa_1_4_extract_shift$0 | $b$1 & 0;
+      $137$0 = _i64Add($d_sroa_0_0_insert_insert99$0 | 0, $d_sroa_0_0_insert_insert99$1 | 0, -1, -1) | 0;
+      $137$1 = tempRet0;
+      $q_sroa_1_1198 = $q_sroa_1_1_ph;
+      $q_sroa_0_1199 = $q_sroa_0_1_ph;
+      $r_sroa_1_1200 = $r_sroa_1_1_ph;
+      $r_sroa_0_1201 = $r_sroa_0_1_ph;
+      $sr_1202 = $sr_1_ph;
+      $carry_0203 = 0;
+      while (1) {
+        $147 = $q_sroa_0_1199 >>> 31 | $q_sroa_1_1198 << 1;
+        $149 = $carry_0203 | $q_sroa_0_1199 << 1;
+        $r_sroa_0_0_insert_insert42$0 = 0 | ($r_sroa_0_1201 << 1 | $q_sroa_1_1198 >>> 31);
+        $r_sroa_0_0_insert_insert42$1 = $r_sroa_0_1201 >>> 31 | $r_sroa_1_1200 << 1 | 0;
+        _i64Subtract($137$0 | 0, $137$1 | 0, $r_sroa_0_0_insert_insert42$0 | 0, $r_sroa_0_0_insert_insert42$1 | 0) | 0;
+        $150$1 = tempRet0;
+        $151$0 = $150$1 >> 31 | (($150$1 | 0) < 0 ? -1 : 0) << 1;
+        $152 = $151$0 & 1;
+        $154$0 = _i64Subtract($r_sroa_0_0_insert_insert42$0 | 0, $r_sroa_0_0_insert_insert42$1 | 0, $151$0 & $d_sroa_0_0_insert_insert99$0 | 0, ((($150$1 | 0) < 0 ? -1 : 0) >> 31 | (($150$1 | 0) < 0 ? -1 : 0) << 1) & $d_sroa_0_0_insert_insert99$1 | 0) | 0;
+        $r_sroa_0_0_extract_trunc = $154$0;
+        $r_sroa_1_4_extract_trunc = tempRet0;
+        $155 = $sr_1202 - 1 | 0;
+        if (($155 | 0) == 0) {
+          break;
+        } else {
+          $q_sroa_1_1198 = $147;
+          $q_sroa_0_1199 = $149;
+          $r_sroa_1_1200 = $r_sroa_1_4_extract_trunc;
+          $r_sroa_0_1201 = $r_sroa_0_0_extract_trunc;
+          $sr_1202 = $155;
+          $carry_0203 = $152;
+        }
+      }
+      $q_sroa_1_1_lcssa = $147;
+      $q_sroa_0_1_lcssa = $149;
+      $r_sroa_1_1_lcssa = $r_sroa_1_4_extract_trunc;
+      $r_sroa_0_1_lcssa = $r_sroa_0_0_extract_trunc;
+      $carry_0_lcssa$1 = 0;
+      $carry_0_lcssa$0 = $152;
+    }
+    $q_sroa_0_0_insert_ext75$0 = $q_sroa_0_1_lcssa;
+    $q_sroa_0_0_insert_ext75$1 = 0;
+    $q_sroa_0_0_insert_insert77$1 = $q_sroa_1_1_lcssa | $q_sroa_0_0_insert_ext75$1;
+    if (($rem | 0) != 0) {
+      HEAP32[$rem >> 2] = 0 | $r_sroa_0_1_lcssa;
+      HEAP32[$rem + 4 >> 2] = $r_sroa_1_1_lcssa | 0;
+    }
+    $_0$1 = (0 | $q_sroa_0_0_insert_ext75$0) >>> 31 | $q_sroa_0_0_insert_insert77$1 << 1 | ($q_sroa_0_0_insert_ext75$1 << 1 | $q_sroa_0_0_insert_ext75$0 >>> 31) & 0 | $carry_0_lcssa$1;
+    $_0$0 = ($q_sroa_0_0_insert_ext75$0 << 1 | 0 >>> 31) & -2 | $carry_0_lcssa$0;
+    return (tempRet0 = $_0$1, $_0$0) | 0;
+}
+function ___udivdi3($a$0, $a$1, $b$0, $b$1) {
+    $a$0 = $a$0 | 0;
+    $a$1 = $a$1 | 0;
+    $b$0 = $b$0 | 0;
+    $b$1 = $b$1 | 0;
+    var $1$0 = 0;
+    $1$0 = ___udivmoddi4($a$0, $a$1, $b$0, $b$1, 0) | 0;
+    return $1$0 | 0;
+}
+function ___muldsi3($a, $b) {
+    $a = $a | 0;
+    $b = $b | 0;
+    var $1 = 0, $2 = 0, $3 = 0, $6 = 0, $8 = 0, $11 = 0, $12 = 0;
+    $1 = $a & 65535;
+    $2 = $b & 65535;
+    $3 = Math_imul($2, $1) | 0;
+    $6 = $a >>> 16;
+    $8 = ($3 >>> 16) + (Math_imul($2, $6) | 0) | 0;
+    $11 = $b >>> 16;
+    $12 = Math_imul($11, $1) | 0;
+    return (tempRet0 = (($8 >>> 16) + (Math_imul($11, $6) | 0) | 0) + ((($8 & 65535) + $12 | 0) >>> 16) | 0, 0 | ($8 + $12 << 16 | $3 & 65535)) | 0;
+}
+function ___muldi3($a$0, $a$1, $b$0, $b$1) {
+    $a$0 = $a$0 | 0;
+    $a$1 = $a$1 | 0;
+    $b$0 = $b$0 | 0;
+    $b$1 = $b$1 | 0;
+    var $x_sroa_0_0_extract_trunc = 0, $y_sroa_0_0_extract_trunc = 0, $1$0 = 0, $1$1 = 0, $2 = 0;
+    $x_sroa_0_0_extract_trunc = $a$0;
+    $y_sroa_0_0_extract_trunc = $b$0;
+    $1$0 = ___muldsi3($x_sroa_0_0_extract_trunc, $y_sroa_0_0_extract_trunc) | 0;
+    $1$1 = tempRet0;
+    $2 = Math_imul($a$1, $y_sroa_0_0_extract_trunc) | 0;
+    return (tempRet0 = ((Math_imul($b$1, $x_sroa_0_0_extract_trunc) | 0) + $2 | 0) + $1$1 | $1$1 & 0, 0 | $1$0 & -1) | 0;
+}
+function _memmove(dest, src, num) {
+    dest = dest|0; src = src|0; num = num|0;
+    var ret = 0;
+    if (((src|0) < (dest|0)) & ((dest|0) < ((src + num)|0))) {
+      // Unlikely case: Copy backwards in a safe manner
+      ret = dest;
+      src = (src + num)|0;
+      dest = (dest + num)|0;
+      while ((num|0) > 0) {
+        dest = (dest - 1)|0;
+        src = (src - 1)|0;
+        num = (num - 1)|0;
+        HEAP8[((dest)>>0)]=((HEAP8[((src)>>0)])|0);
+      }
+      dest = ret;
+    } else {
+      _memcpy(dest, src, num) | 0;
+    }
+    return dest | 0;
+}
+function ___uremdi3($a$0, $a$1, $b$0, $b$1) {
+    $a$0 = $a$0 | 0;
+    $a$1 = $a$1 | 0;
+    $b$0 = $b$0 | 0;
+    $b$1 = $b$1 | 0;
+    var $rem = 0, __stackBase__ = 0;
+    __stackBase__ = STACKTOP;
+    STACKTOP = STACKTOP + 16 | 0;
+    $rem = __stackBase__ | 0;
+    ___udivmoddi4($a$0, $a$1, $b$0, $b$1, $rem) | 0;
+    STACKTOP = __stackBase__;
+    return (tempRet0 = HEAP32[$rem + 4 >> 2] | 0, HEAP32[$rem >> 2] | 0) | 0;
+}
+function _pthread_self() {
+    return 0;
+}
+
+  
+function dynCall_iiii(index,a1,a2,a3) {
+  index = index|0;
+  a1=a1|0; a2=a2|0; a3=a3|0;
+  return FUNCTION_TABLE_iiii[index&511](a1|0,a2|0,a3|0)|0;
+}
+
+
+function dynCall_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7) {
+  index = index|0;
+  a1=a1|0; a2=a2|0; a3=a3|0; a4=a4|0; a5=a5|0; a6=a6|0; a7=a7|0;
+  FUNCTION_TABLE_viiiiiii[index&255](a1|0,a2|0,a3|0,a4|0,a5|0,a6|0,a7|0);
+}
+
+
+function dynCall_viiiii(index,a1,a2,a3,a4,a5) {
+  index = index|0;
+  a1=a1|0; a2=a2|0; a3=a3|0; a4=a4|0; a5=a5|0;
+  FUNCTION_TABLE_viiiii[index&255](a1|0,a2|0,a3|0,a4|0,a5|0);
+}
+
+
+function dynCall_vi(index,a1) {
+  index = index|0;
+  a1=a1|0;
+  FUNCTION_TABLE_vi[index&511](a1|0);
+}
+
+
+function dynCall_vii(index,a1,a2) {
+  index = index|0;
+  a1=a1|0; a2=a2|0;
+  FUNCTION_TABLE_vii[index&511](a1|0,a2|0);
+}
+
+
+function dynCall_ii(index,a1) {
+  index = index|0;
+  a1=a1|0;
+  return FUNCTION_TABLE_ii[index&255](a1|0)|0;
+}
+
+
+function dynCall_viii(index,a1,a2,a3) {
+  index = index|0;
+  a1=a1|0; a2=a2|0; a3=a3|0;
+  FUNCTION_TABLE_viii[index&511](a1|0,a2|0,a3|0);
+}
+
+
+function dynCall_iiiii(index,a1,a2,a3,a4) {
+  index = index|0;
+  a1=a1|0; a2=a2|0; a3=a3|0; a4=a4|0;
+  return FUNCTION_TABLE_iiiii[index&255](a1|0,a2|0,a3|0,a4|0)|0;
+}
+
+
+function dynCall_viiiiii(index,a1,a2,a3,a4,a5,a6) {
+  index = index|0;
+  a1=a1|0; a2=a2|0; a3=a3|0; a4=a4|0; a5=a5|0; a6=a6|0;
+  FUNCTION_TABLE_viiiiii[index&255](a1|0,a2|0,a3|0,a4|0,a5|0,a6|0);
+}
+
+
+function dynCall_iii(index,a1,a2) {
+  index = index|0;
+  a1=a1|0; a2=a2|0;
+  return FUNCTION_TABLE_iii[index&255](a1|0,a2|0)|0;
+}
+
+
+function dynCall_viiii(index,a1,a2,a3,a4) {
+  index = index|0;
+  a1=a1|0; a2=a2|0; a3=a3|0; a4=a4|0;
+  FUNCTION_TABLE_viiii[index&255](a1|0,a2|0,a3|0,a4|0);
+}
+
+function b0(p0,p1,p2) {
+ p0 = p0|0;p1 = p1|0;p2 = p2|0; nullFunc_iiii(0);return 0;
+}
+function b1(p0,p1,p2,p3,p4,p5,p6) {
+ p0 = p0|0;p1 = p1|0;p2 = p2|0;p3 = p3|0;p4 = p4|0;p5 = p5|0;p6 = p6|0; nullFunc_viiiiiii(1);
+}
+function b2(p0,p1,p2,p3,p4) {
+ p0 = p0|0;p1 = p1|0;p2 = p2|0;p3 = p3|0;p4 = p4|0; nullFunc_viiiii(2);
+}
+function b3(p0) {
+ p0 = p0|0; nullFunc_vi(3);
+}
+function b4(p0,p1) {
+ p0 = p0|0;p1 = p1|0; nullFunc_vii(4);
+}
+function _emscripten_longjmp__wrapper(p0,p1) {
+ p0 = p0|0;p1 = p1|0; _emscripten_longjmp(p0|0,p1|0);
+}
+function b5(p0) {
+ p0 = p0|0; nullFunc_ii(5);return 0;
+}
+function b6(p0,p1,p2) {
+ p0 = p0|0;p1 = p1|0;p2 = p2|0; nullFunc_viii(6);
+}
+function b7(p0,p1,p2,p3) {
+ p0 = p0|0;p1 = p1|0;p2 = p2|0;p3 = p3|0; nullFunc_iiiii(7);return 0;
+}
+function b8(p0,p1,p2,p3,p4,p5) {
+ p0 = p0|0;p1 = p1|0;p2 = p2|0;p3 = p3|0;p4 = p4|0;p5 = p5|0; nullFunc_viiiiii(8);
+}
+function b9(p0,p1) {
+ p0 = p0|0;p1 = p1|0; nullFunc_iii(9);return 0;
+}
+function b10(p0,p1,p2,p3) {
+ p0 = p0|0;p1 = p1|0;p2 = p2|0;p3 = p3|0; nullFunc_viiii(10);
+}
+
+// EMSCRIPTEN_END_FUNCS
+var FUNCTION_TABLE_iiii = [b0,b0,___stdio_write,___stdio_seek,___stdio_read,___stdout_write,_sn_write,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0
+,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0
+,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0
+,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0
+,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,_mrb_method_search_vm,_mrb_intern_static,b0,b0,b0,b0,b0,b0,b0,b0
+,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,_mrb_realloc,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0
+,b0,b0,_mrb_int_add_overflow_439,b0,_mrb_int_sub_overflow_440,b0,_mrb_obj_eq,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,_mrb_vm_define_module,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0
+,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0
+,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0
+,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0
+,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0
+,b0,_scope_new,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0
+,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0
+,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0
+,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0
+,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0
+,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0
+,b0,b0,b0];
+var FUNCTION_TABLE_viiiiiii = [b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1
+,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1
+,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1
+,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1
+,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,_mrb_funcall_with_block,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1
+,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1
+,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1
+,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1
+,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1,b1];
+var FUNCTION_TABLE_viiiii = [b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2
+,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2
+,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2
+,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2
+,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2
+,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2
+,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,_mrb_range_new,b2,b2,b2,b2,b2,b2,b2,b2
+,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2
+,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2,b2];
+var FUNCTION_TABLE_vi = [b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3
+,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3
+,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3
+,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3
+,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,_cipop,b3,_stack_init,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3
+,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,_mrb_nil_value_419,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3
+,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3
+,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3
+,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3
+,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3
+,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3
+,b3,b3,b3,b3,_mrb_pool_close,_cleanup_522,_cleanup_517,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3
+,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3
+,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3
+,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3
+,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3
+,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3,b3
+,b3,b3,b3];
+var FUNCTION_TABLE_vii = [b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4
+,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4
+,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4
+,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4
+,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,_mrb_obj_value_420,b4,b4,_mrb_fixnum_value_421,b4,b4,b4,b4,b4,b4,_mrb_symbol_value_427,b4,b4,_mrb_gc_arena_restore,b4,_mrb_gc_protect
+,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,_mrb_write_barrier,b4,b4,_ecall,b4,b4,b4,b4,b4,b4,b4,b4,_argnum_error,b4,b4,_emscripten_longjmp__wrapper,b4,_localjump_error,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,_parser_init_cxt,b4,b4,_parser_update_cxt,b4,_yyerror,b4
+,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4
+,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4
+,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4
+,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4
+,b4,b4,b4,_mrb_irep_decref,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4
+,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4
+,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4
+,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4
+,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4
+,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4,b4
+,b4,b4,b4];
+var FUNCTION_TABLE_ii = [b5,___stdio_close,b5,b5,b5,b5,b5,_partial_hook,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5
+,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5
+,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5
+,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5
+,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,_cipush,b5,b5,b5,_mrb_gc_arena_save,b5,b5,b5
+,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5
+,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,_yyparse,_new_nil,b5,b5,b5,b5
+,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5
+,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5,b5];
+var FUNCTION_TABLE_viii = [b6,b6,b6,b6,b6,b6,b6,b6,_gc_start,_gc_enable,_gc_disable,_gc_interval_ratio_get,_gc_interval_ratio_set,_gc_step_ratio_get,_gc_step_ratio_set,_gc_generational_mode_set,_gc_generational_mode_get,_mrb_hash_aget,_mrb_hash_aset,_mrb_hash_clear,_mrb_hash_default,_mrb_hash_set_default,_mrb_hash_default_proc,_mrb_hash_set_default_proc,_mrb_hash_delete,_mrb_hash_empty_p,_mrb_hash_has_key,_mrb_hash_has_value,_mrb_hash_init
+,_mrb_hash_keys,_mrb_hash_size_m,_mrb_hash_shift,_mrb_hash_dup,_mrb_hash_values,_mrb_hash_to_hash,_num_pow,_num_div,_num_cmp,_int_to_i,_fix_plus,_fix_minus,_fix_mul,_fix_mod,_fix_equal,_fix_rev,_fix_and,_fix_or,_fix_xor,_fix_lshift,_fix_rshift,_fix_eql,_flo_hash,_fix_to_f,_fix_to_s,_fix_divmod,_flo_plus,_flo_minus,_flo_mul,_flo_mod
+,_flo_eq,_flo_ceil,_flo_finite_p,_flo_floor,_flo_infinite_p,_flo_round,_flo_to_f,_flo_truncate,_flo_divmod,_flo_eql,_flo_to_s,_flo_nan_p,_false_and,_false_xor,_false_or,_mrb_true,_nil_to_s,_nil_inspect,_true_and,_true_xor,_true_to_s,_true_or,_false_to_s,b6,_inspect_main,_mrb_str_bytesize,_mrb_str_cmp_m,_mrb_str_equal_m,_mrb_str_plus_m,_mrb_str_times
+,_mrb_str_aref_m,_mrb_str_capitalize,_mrb_str_capitalize_bang,_mrb_str_chomp,_mrb_str_chomp_bang,_mrb_str_chop,_mrb_str_chop_bang,_mrb_str_downcase,_mrb_str_downcase_bang,_mrb_str_empty_p,_mrb_str_eql,_mrb_str_hash_m,_mrb_str_include,_mrb_str_index,_mrb_str_init,_mrb_str_replace,_mrb_str_intern,_mrb_str_size,_mrb_str_reverse,_mrb_str_reverse_bang,_mrb_str_rindex,_mrb_str_split_m,_mrb_str_to_f,_mrb_str_to_i,_mrb_str_to_s,_mrb_str_upcase,_mrb_str_upcase_bang,_mrb_str_inspect,_mrb_str_bytes,_mrb_str_freeze
+,_sym_equal,_mrb_sym_to_s,_sym_to_sym,_sym_inspect,_sym_cmp,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,_stack_extend,b6,_stack_copy,b6,b6,b6,b6
+,_mrb_gv_get,_mrb_gv_set,_mrb_vm_special_get,_mrb_vm_special_set,_mrb_vm_iv_get,_mrb_vm_iv_set,_mrb_vm_cv_get,_mrb_vm_cv_set,_mrb_vm_const_get,_mrb_vm_const_set,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,_value_move,b6,b6,_mrb_ary_new_capa,b6,b6,_mrb_cptr_value,b6,b6
+,b6,b6,b6,b6,b6,b6,b6,_mrb_ary_splat,_mrb_ary_concat,_mrb_ary_push,b6,b6,_mrb_str_dup,_mrb_str_concat,_mrb_hash_new_capa,b6,b6,b6,b6,b6,_mrb_singleton_class,b6,b6,b6,b6,b6,b6,_mrb_parser_dump,b6,_mrb_ary_s_create
+,_mrb_ary_plus,_mrb_ary_times,_mrb_ary_push_m,_mrb_ary_aget,_mrb_ary_aset,_mrb_ary_clear,_mrb_ary_concat_m,_mrb_ary_delete_at,_mrb_ary_empty_p,_mrb_ary_first,_mrb_ary_index_m,_mrb_ary_replace_m,_mrb_ary_join_m,_mrb_ary_last,_mrb_ary_size,_mrb_ary_pop,_mrb_ary_reverse,_mrb_ary_reverse_bang,_mrb_ary_rindex_m,_mrb_ary_shift,_mrb_ary_unshift_m,_mrb_ary_eq,_mrb_ary_cmp,_get_backtrace_i,_mrb_bob_init,_mrb_bob_not,_mrb_bob_missing,_mrb_class_new_class,_mrb_class_superclass,_mrb_instance_new
+,_mrb_class_initialize,_mrb_mod_cvar_defined,_mrb_mod_cvar_get,_mrb_mod_cvar_set,_mrb_mod_extend_object,_mrb_mod_prepend,_mrb_mod_prepend_features,_mrb_mod_include,_mrb_mod_include_p,_mrb_mod_append_features,_mrb_mod_module_eval,_mrb_mod_included_modules,_mrb_mod_initialize,_mrb_mod_instance_methods,_mrb_mod_method_defined,_mrb_mod_module_function,_mrb_mod_dummy_visibility,_mrb_mod_remove_cvar,_mrb_mod_remove_method,_mrb_mod_attr_reader,_mrb_mod_attr_writer,_mrb_mod_to_s,_mrb_mod_alias,_mrb_mod_ancestors,_mrb_mod_undef,_mrb_mod_const_defined,_mrb_mod_const_get,_mrb_mod_const_set,_mrb_mod_constants,_mrb_mod_remove_const
+,_mrb_mod_const_missing,_mod_define_method,_mrb_mod_class_variables,_mrb_mod_eqq,_mrb_mod_s_constants,_attr_reader,_attr_writer,_exc_exception,_exc_initialize,_exc_to_s,_exc_message,_exc_inspect,_mrb_exc_backtrace,_mrb_any_to_s,_mrb_f_block_given_p_m,_mrb_f_global_variables,_mrb_local_variables,_mrb_f_raise,_mrb_obj_equal_m,_mrb_obj_not_equal_m,_mrb_equal_m,_mrb_obj_id_m,_mrb_f_send,_mrb_obj_class_m,_mrb_obj_clone,_mrb_obj_dup,_mrb_obj_extend_m,_mrb_obj_hash,_mrb_obj_init_copy,_mrb_obj_inspect
+,_mrb_obj_instance_eval,_obj_is_instance_of,_mrb_obj_ivar_defined,_mrb_obj_ivar_get,_mrb_obj_ivar_set,_mrb_obj_instance_variables,_mrb_obj_is_kind_of_m,_mrb_obj_methods_m,_mrb_false,_mrb_obj_private_methods,_mrb_obj_protected_methods,_mrb_obj_public_methods,_mrb_obj_remove_instance_variable,_obj_respond_to,_mrb_obj_singleton_methods_m,_mod_define_singleton_method,_mrb_obj_ceqq,_mrb_proc_initialize,_mrb_proc_init_copy,_mrb_proc_arity,_proc_lambda,_mrb_range_beg,_mrb_range_end,_mrb_range_eq,_mrb_range_include,_mrb_range_excl,_mrb_range_initialize,_range_to_s,_range_inspect,_range_eql
+,_range_initialize_copy,b6,_codegen,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6
+,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6
+,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6
+,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6
+,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6
+,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6,b6
+,b6,b6,b6];
+var FUNCTION_TABLE_iiiii = [b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7
+,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7
+,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,_mrb_default_allocf,b7,b7,b7,b7,b7,b7
+,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7
+,b7,b7,b7,b7,b7,_iv_mark_i,_inspect_i,_iv_i,_cv_i,_const_i,_gv_i,_csym_i,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7
+,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7
+,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,_mrb_vm_define_class,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7
+,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7
+,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7,b7];
+var FUNCTION_TABLE_viiiiii = [b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8
+,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8
+,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8
+,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8
+,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8
+,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,_mrb_convert_type,b8,b8,b8,b8
+,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8
+,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8
+,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8,b8];
+var FUNCTION_TABLE_iii = [b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9
+,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9
+,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9
+,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9
+,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,_mrb_class_get,b9,b9,_mrb_class_423,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9
+,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,_uvenv,b9,b9,b9,_mrb_closure_new,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9
+,_top_env,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,_mrb_proc_new,b9,b9,b9,b9,b9,_printf,b9,b9,b9,b9,b9,b9,b9
+,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9
+,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9,b9];
+var FUNCTION_TABLE_viiii = [b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10
+,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10
+,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10
+,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10
+,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,_mrb_raisef,b10,b10,b10,b10,b10,b10,b10,b10,b10,_mrb_run,b10
+,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,_mrb_const_get,_mrb_const_set,b10,b10,b10,b10,b10,b10,_mrb_ary_new_from_values,_mrb_method_missing,_mrb_ary_unshift,b10,_mrb_str_new_static,_mrb_exc_new_str,b10,b10,b10,b10,_mrb_obj_iv_ifnone,b10
+,b10,b10,b10,_mrb_str_plus,b10,_mrb_fixnum_mul,b10,b10,b10,b10,_mrb_ary_ref,_mrb_ary_set,b10,b10,b10,_mrb_hash_set,b10,b10,b10,_mrb_define_method_raw,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10
+,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10
+,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10,b10];
+
+  return { _main: _main, _llvm_cttz_i32: _llvm_cttz_i32, _bitshift64Lshr: _bitshift64Lshr, _bitshift64Shl: _bitshift64Shl, _fflush: _fflush, _memset: _memset, _memcpy: _memcpy, ___muldi3: ___muldi3, ___uremdi3: ___uremdi3, _i64Subtract: _i64Subtract, ___udivmoddi4: ___udivmoddi4, _realloc: _realloc, _i64Add: _i64Add, _pthread_self: _pthread_self, ___udivdi3: ___udivdi3, ___errno_location: ___errno_location, ___muldsi3: ___muldsi3, _testSetjmp: _testSetjmp, _saveSetjmp: _saveSetjmp, _free: _free, _memmove: _memmove, _malloc: _malloc, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, establishStackSpace: establishStackSpace, setThrew: setThrew, setTempRet0: setTempRet0, getTempRet0: getTempRet0, dynCall_iiii: dynCall_iiii, dynCall_viiiiiii: dynCall_viiiiiii, dynCall_viiiii: dynCall_viiiii, dynCall_vi: dynCall_vi, dynCall_vii: dynCall_vii, dynCall_ii: dynCall_ii, dynCall_viii: dynCall_viii, dynCall_iiiii: dynCall_iiiii, dynCall_viiiiii: dynCall_viiiiii, dynCall_iii: dynCall_iii, dynCall_viiii: dynCall_viiii };
+})
+// EMSCRIPTEN_END_ASM
+(Module.asmGlobalArg, Module.asmLibraryArg, buffer);
+
+var real__main = asm["_main"]; asm["_main"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real__main.apply(null, arguments);
+};
+
+var real__llvm_cttz_i32 = asm["_llvm_cttz_i32"]; asm["_llvm_cttz_i32"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real__llvm_cttz_i32.apply(null, arguments);
+};
+
+var real__bitshift64Lshr = asm["_bitshift64Lshr"]; asm["_bitshift64Lshr"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real__bitshift64Lshr.apply(null, arguments);
+};
+
+var real__bitshift64Shl = asm["_bitshift64Shl"]; asm["_bitshift64Shl"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real__bitshift64Shl.apply(null, arguments);
+};
+
+var real__fflush = asm["_fflush"]; asm["_fflush"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real__fflush.apply(null, arguments);
+};
+
+var real____muldi3 = asm["___muldi3"]; asm["___muldi3"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real____muldi3.apply(null, arguments);
+};
+
+var real____uremdi3 = asm["___uremdi3"]; asm["___uremdi3"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real____uremdi3.apply(null, arguments);
+};
+
+var real__i64Subtract = asm["_i64Subtract"]; asm["_i64Subtract"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real__i64Subtract.apply(null, arguments);
+};
+
+var real____udivmoddi4 = asm["___udivmoddi4"]; asm["___udivmoddi4"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real____udivmoddi4.apply(null, arguments);
+};
+
+var real__realloc = asm["_realloc"]; asm["_realloc"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real__realloc.apply(null, arguments);
+};
+
+var real__i64Add = asm["_i64Add"]; asm["_i64Add"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real__i64Add.apply(null, arguments);
+};
+
+var real__pthread_self = asm["_pthread_self"]; asm["_pthread_self"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real__pthread_self.apply(null, arguments);
+};
+
+var real____udivdi3 = asm["___udivdi3"]; asm["___udivdi3"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real____udivdi3.apply(null, arguments);
+};
+
+var real____errno_location = asm["___errno_location"]; asm["___errno_location"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real____errno_location.apply(null, arguments);
+};
+
+var real____muldsi3 = asm["___muldsi3"]; asm["___muldsi3"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real____muldsi3.apply(null, arguments);
+};
+
+var real__testSetjmp = asm["_testSetjmp"]; asm["_testSetjmp"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real__testSetjmp.apply(null, arguments);
+};
+
+var real__saveSetjmp = asm["_saveSetjmp"]; asm["_saveSetjmp"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real__saveSetjmp.apply(null, arguments);
+};
+
+var real__free = asm["_free"]; asm["_free"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real__free.apply(null, arguments);
+};
+
+var real__memmove = asm["_memmove"]; asm["_memmove"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real__memmove.apply(null, arguments);
+};
+
+var real__malloc = asm["_malloc"]; asm["_malloc"] = function() {
+assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
+assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+return real__malloc.apply(null, arguments);
+};
+var _main = Module["_main"] = asm["_main"];
+var _llvm_cttz_i32 = Module["_llvm_cttz_i32"] = asm["_llvm_cttz_i32"];
+var _bitshift64Lshr = Module["_bitshift64Lshr"] = asm["_bitshift64Lshr"];
+var _bitshift64Shl = Module["_bitshift64Shl"] = asm["_bitshift64Shl"];
+var _fflush = Module["_fflush"] = asm["_fflush"];
+var _memset = Module["_memset"] = asm["_memset"];
+var _memcpy = Module["_memcpy"] = asm["_memcpy"];
+var ___muldi3 = Module["___muldi3"] = asm["___muldi3"];
+var ___uremdi3 = Module["___uremdi3"] = asm["___uremdi3"];
+var _i64Subtract = Module["_i64Subtract"] = asm["_i64Subtract"];
+var ___udivmoddi4 = Module["___udivmoddi4"] = asm["___udivmoddi4"];
+var _realloc = Module["_realloc"] = asm["_realloc"];
+var _i64Add = Module["_i64Add"] = asm["_i64Add"];
+var _pthread_self = Module["_pthread_self"] = asm["_pthread_self"];
+var ___udivdi3 = Module["___udivdi3"] = asm["___udivdi3"];
+var ___errno_location = Module["___errno_location"] = asm["___errno_location"];
+var ___muldsi3 = Module["___muldsi3"] = asm["___muldsi3"];
+var _testSetjmp = Module["_testSetjmp"] = asm["_testSetjmp"];
+var _saveSetjmp = Module["_saveSetjmp"] = asm["_saveSetjmp"];
+var _free = Module["_free"] = asm["_free"];
+var runPostSets = Module["runPostSets"] = asm["runPostSets"];
+var _memmove = Module["_memmove"] = asm["_memmove"];
+var _malloc = Module["_malloc"] = asm["_malloc"];
+var dynCall_iiii = Module["dynCall_iiii"] = asm["dynCall_iiii"];
+var dynCall_viiiiiii = Module["dynCall_viiiiiii"] = asm["dynCall_viiiiiii"];
+var dynCall_viiiii = Module["dynCall_viiiii"] = asm["dynCall_viiiii"];
+var dynCall_vi = Module["dynCall_vi"] = asm["dynCall_vi"];
+var dynCall_vii = Module["dynCall_vii"] = asm["dynCall_vii"];
+var dynCall_ii = Module["dynCall_ii"] = asm["dynCall_ii"];
+var dynCall_viii = Module["dynCall_viii"] = asm["dynCall_viii"];
+var dynCall_iiiii = Module["dynCall_iiiii"] = asm["dynCall_iiiii"];
+var dynCall_viiiiii = Module["dynCall_viiiiii"] = asm["dynCall_viiiiii"];
+var dynCall_iii = Module["dynCall_iii"] = asm["dynCall_iii"];
+var dynCall_viiii = Module["dynCall_viiii"] = asm["dynCall_viiii"];
+;
+
+Runtime.stackAlloc = asm['stackAlloc'];
+Runtime.stackSave = asm['stackSave'];
+Runtime.stackRestore = asm['stackRestore'];
+Runtime.establishStackSpace = asm['establishStackSpace'];
+
+Runtime.setTempRet0 = asm['setTempRet0'];
+Runtime.getTempRet0 = asm['getTempRet0'];
+
+
+
+// === Auto-generated postamble setup entry stuff ===
+
+
+
+
+
+function ExitStatus(status) {
+  this.name = "ExitStatus";
+  this.message = "Program terminated with exit(" + status + ")";
+  this.status = status;
+};
+ExitStatus.prototype = new Error();
+ExitStatus.prototype.constructor = ExitStatus;
+
+var initialStackTop;
+var preloadStartTime = null;
+var calledMain = false;
+
+dependenciesFulfilled = function runCaller() {
+  // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false)
+  if (!Module['calledRun']) run();
+  if (!Module['calledRun']) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled
+}
+
+Module['callMain'] = Module.callMain = function callMain(args) {
+  assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on __ATMAIN__)');
+  assert(__ATPRERUN__.length == 0, 'cannot call main when preRun functions remain to be called');
+
+  args = args || [];
+
+  ensureInitRuntime();
+
+  var argc = args.length+1;
+  function pad() {
+    for (var i = 0; i < 4-1; i++) {
+      argv.push(0);
+    }
+  }
+  var argv = [allocate(intArrayFromString(Module['thisProgram']), 'i8', ALLOC_NORMAL) ];
+  pad();
+  for (var i = 0; i < argc-1; i = i + 1) {
+    argv.push(allocate(intArrayFromString(args[i]), 'i8', ALLOC_NORMAL));
+    pad();
+  }
+  argv.push(0);
+  argv = allocate(argv, 'i32', ALLOC_NORMAL);
+
+
+  try {
+
+    var ret = Module['_main'](argc, argv, 0);
+
+
+    // if we're not running an evented main loop, it's time to exit
+    exit(ret, /* implicit = */ true);
+  }
+  catch(e) {
+    if (e instanceof ExitStatus) {
+      // exit() throws this once it's done to make sure execution
+      // has been stopped completely
+      return;
+    } else if (e == 'SimulateInfiniteLoop') {
+      // running an evented main loop, don't immediately exit
+      Module['noExitRuntime'] = true;
+      return;
+    } else {
+      if (e && typeof e === 'object' && e.stack) Module.printErr('exception thrown: ' + [e, e.stack]);
+      throw e;
+    }
+  } finally {
+    calledMain = true;
+  }
+}
+
+
+
+
+function run(args) {
+  args = args || Module['arguments'];
+
+  if (preloadStartTime === null) preloadStartTime = Date.now();
+
+  if (runDependencies > 0) {
+    Module.printErr('run() called, but dependencies remain, so not running');
+    return;
+  }
+
+  writeStackCookie();
+
+  preRun();
+
+  if (runDependencies > 0) return; // a preRun added a dependency, run will be called later
+  if (Module['calledRun']) return; // run may have just been called through dependencies being fulfilled just in this very frame
+
+  function doRun() {
+    if (Module['calledRun']) return; // run may have just been called while the async setStatus time below was happening
+    Module['calledRun'] = true;
+
+    if (ABORT) return;
+
+    ensureInitRuntime();
+
+    preMain();
+
+    if (ENVIRONMENT_IS_WEB && preloadStartTime !== null) {
+      Module.printErr('pre-main prep time: ' + (Date.now() - preloadStartTime) + ' ms');
+    }
+
+    if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized']();
+
+    if (Module['_main'] && shouldRunNow) Module['callMain'](args);
+
+    postRun();
+  }
+
+  if (Module['setStatus']) {
+    Module['setStatus']('Running...');
+    setTimeout(function() {
+      setTimeout(function() {
+        Module['setStatus']('');
+      }, 1);
+      doRun();
+    }, 1);
+  } else {
+    doRun();
+  }
+  checkStackCookie();
+}
+Module['run'] = Module.run = run;
+
+function exit(status, implicit) {
+  if (implicit && Module['noExitRuntime']) {
+    Module.printErr('exit(' + status + ') implicitly called by end of main(), but noExitRuntime, so not exiting the runtime (you can use emscripten_force_exit, if you want to force a true shutdown)');
+    return;
+  }
+
+  if (Module['noExitRuntime']) {
+    Module.printErr('exit(' + status + ') called, but noExitRuntime, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)');
+  } else {
+
+    ABORT = true;
+    EXITSTATUS = status;
+    STACKTOP = initialStackTop;
+
+    exitRuntime();
+
+    if (Module['onExit']) Module['onExit'](status);
+  }
+
+  if (ENVIRONMENT_IS_NODE) {
+    process['exit'](status);
+  } else if (ENVIRONMENT_IS_SHELL && typeof quit === 'function') {
+    quit(status);
+  }
+  // if we reach here, we must throw an exception to halt the current execution
+  throw new ExitStatus(status);
+}
+Module['exit'] = Module.exit = exit;
+
+var abortDecorators = [];
+
+function abort(what) {
+  if (what !== undefined) {
+    Module.print(what);
+    Module.printErr(what);
+    what = JSON.stringify(what)
+  } else {
+    what = '';
+  }
+
+  ABORT = true;
+  EXITSTATUS = 1;
+
+  var extra = '';
+
+  var output = 'abort(' + what + ') at ' + stackTrace() + extra;
+  if (abortDecorators) {
+    abortDecorators.forEach(function(decorator) {
+      output = decorator(output, what);
+    });
+  }
+  throw output;
+}
+Module['abort'] = Module.abort = abort;
+
+// {{PRE_RUN_ADDITIONS}}
+
+if (Module['preInit']) {
+  if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']];
+  while (Module['preInit'].length > 0) {
+    Module['preInit'].pop()();
+  }
+}
+
+// shouldRunNow refers to calling main(), not run().
+var shouldRunNow = true;
+if (Module['noInitialRun']) {
+  shouldRunNow = false;
+}
+
+
+run();
+
+// {{POST_RUN_ADDITIONS}}
+
+
+
+
+
+// {{MODULE_ADDITIONS}}
+
+
+
+};
+
Index: EcnlProtoTool/trunk/webapp/webmrbc/mrbc.min.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/mrbc.min.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/mrbc.min.js	(revision 270)
@@ -0,0 +1,47 @@
+var mrbc=function(Module){function globalEval(a){eval.call(null,a)}function assert(a,b){a||abort("Assertion failed: "+b)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(a){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}function setValue(a,b,c,d){switch(c=c||"i8","*"===c.charAt(c.length-1)&&(c="i32"),c){case"i1":HEAP8[a>>0]=b;break;case"i8":HEAP8[a>>0]=b;break;case"i16":HEAP16[a>>1]=b;break;case"i32":HEAP32[a>>2]=b;break;case"i64":tempI64=[b>>>0,(tempDouble=b,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[a>>2]=tempI64[0],HEAP32[a+4>>2]=tempI64[1];break;case"float":HEAPF32[a>>2]=b;break;case"double":HEAPF64[a>>3]=b;break;default:abort("invalid type for setValue: "+c)}}function getValue(a,b,c){switch(b=b||"i8","*"===b.charAt(b.length-1)&&(b="i32"),b){case"i1":return HEAP8[a>>0];case"i8":return HEAP8[a>>0];case"i16":return HEAP16[a>>1];case"i32":return HEAP32[a>>2];case"i64":return HEAP32[a>>2];case"float":return HEAPF32[a>>2];case"double":return HEAPF64[a>>3];default:abort("invalid type for setValue: "+b)}return null}function allocate(a,b,c,d){var e,f;"number"==typeof a?(e=!0,f=a):(e=!1,f=a.length);var h,g="string"==typeof b?b:null;if(h=c==ALLOC_NONE?d:["function"==typeof _malloc?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][void 0===c?ALLOC_STATIC:c](Math.max(f,g?1:b.length)),e){var i,d=h;for(assert(0==(3&h)),i=h+(f&-4);d<i;d+=4)HEAP32[d>>2]=0;for(i=h+f;d<i;)HEAP8[d++>>0]=0;return h}if("i8"===g)return a.subarray||a.slice?HEAPU8.set(a,h):HEAPU8.set(new Uint8Array(a),h),h;for(var k,l,m,j=0;j<f;){var n=a[j];"function"==typeof n&&(n=Runtime.getFunctionIndex(n)),k=g||b[j],0!==k?(assert(k,"Must know what type to store in allocate!"),"i64"==k&&(k="i32"),setValue(h+j,n,k),m!==k&&(l=Runtime.getNativeTypeSize(k),m=k),j+=l):j++}return h}function getMemory(a){return staticSealed?"undefined"!=typeof _sbrk&&!_sbrk.called||!runtimeInitialized?Runtime.dynamicAlloc(a):_malloc(a):Runtime.staticAlloc(a)}function Pointer_stringify(a,b){if(0===b||!a)return"";for(var d,c=0,e=0;;){if(assert(a+e<TOTAL_MEMORY),d=HEAPU8[a+e>>0],c|=d,0==d&&!b)break;if(e++,b&&e==b)break}b||(b=e);var f="";if(c<128){for(var h,g=1024;b>0;)h=String.fromCharCode.apply(String,HEAPU8.subarray(a,a+Math.min(b,g))),f=f?f+h:h,a+=g,b-=g;return f}return Module.UTF8ToString(a)}function AsciiToString(a){for(var b="";;){var c=HEAP8[a++>>0];if(!c)return b;b+=String.fromCharCode(c)}}function stringToAscii(a,b){return writeAsciiToMemory(a,b,!1)}function UTF8ArrayToString(a,b){for(var c,d,e,f,g,h,i="";;){if(c=a[b++],!c)return i;if(128&c)if(d=63&a[b++],192!=(224&c))if(e=63&a[b++],224==(240&c)?c=(15&c)<<12|d<<6|e:(f=63&a[b++],240==(248&c)?c=(7&c)<<18|d<<12|e<<6|f:(g=63&a[b++],248==(252&c)?c=(3&c)<<24|d<<18|e<<12|f<<6|g:(h=63&a[b++],c=(1&c)<<30|d<<24|e<<18|f<<12|g<<6|h))),c<65536)i+=String.fromCharCode(c);else{var j=c-65536;i+=String.fromCharCode(55296|j>>10,56320|1023&j)}else i+=String.fromCharCode((31&c)<<6|d);else i+=String.fromCharCode(c)}}function UTF8ToString(a){return UTF8ArrayToString(HEAPU8,a)}function stringToUTF8Array(a,b,c,d){if(!(d>0))return 0;for(var e=c,f=c+d-1,g=0;g<a.length;++g){var h=a.charCodeAt(g);if(h>=55296&&h<=57343&&(h=65536+((1023&h)<<10)|1023&a.charCodeAt(++g)),h<=127){if(c>=f)break;b[c++]=h}else if(h<=2047){if(c+1>=f)break;b[c++]=192|h>>6,b[c++]=128|63&h}else if(h<=65535){if(c+2>=f)break;b[c++]=224|h>>12,b[c++]=128|h>>6&63,b[c++]=128|63&h}else if(h<=2097151){if(c+3>=f)break;b[c++]=240|h>>18,b[c++]=128|h>>12&63,b[c++]=128|h>>6&63,b[c++]=128|63&h}else if(h<=67108863){if(c+4>=f)break;b[c++]=248|h>>24,b[c++]=128|h>>18&63,b[c++]=128|h>>12&63,b[c++]=128|h>>6&63,b[c++]=128|63&h}else{if(c+5>=f)break;b[c++]=252|h>>30,b[c++]=128|h>>24&63,b[c++]=128|h>>18&63,b[c++]=128|h>>12&63,b[c++]=128|h>>6&63,b[c++]=128|63&h}}return b[c]=0,c-e}function stringToUTF8(a,b,c){return assert("number"==typeof c,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),stringToUTF8Array(a,HEAPU8,b,c)}function lengthBytesUTF8(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);d>=55296&&d<=57343&&(d=65536+((1023&d)<<10)|1023&a.charCodeAt(++c)),d<=127?++b:b+=d<=2047?2:d<=65535?3:d<=2097151?4:d<=67108863?5:6}return b}function UTF16ToString(a){for(var b=0,c="";;){var d=HEAP16[a+2*b>>1];if(0==d)return c;++b,c+=String.fromCharCode(d)}}function stringToUTF16(a,b,c){if(assert("number"==typeof c,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===c&&(c=2147483647),c<2)return 0;c-=2;for(var d=b,e=c<2*a.length?c/2:a.length,f=0;f<e;++f){var g=a.charCodeAt(f);HEAP16[b>>1]=g,b+=2}return HEAP16[b>>1]=0,b-d}function lengthBytesUTF16(a){return 2*a.length}function UTF32ToString(a){for(var b=0,c="";;){var d=HEAP32[a+4*b>>2];if(0==d)return c;if(++b,d>=65536){var e=d-65536;c+=String.fromCharCode(55296|e>>10,56320|1023&e)}else c+=String.fromCharCode(d)}}function stringToUTF32(a,b,c){if(assert("number"==typeof c,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===c&&(c=2147483647),c<4)return 0;for(var d=b,e=d+c-4,f=0;f<a.length;++f){var g=a.charCodeAt(f);if(g>=55296&&g<=57343){var h=a.charCodeAt(++f);g=65536+((1023&g)<<10)|1023&h}if(HEAP32[b>>2]=g,b+=4,b+4>e)break}return HEAP32[b>>2]=0,b-d}function lengthBytesUTF32(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);d>=55296&&d<=57343&&++c,b+=4}return b}function demangle(a){var b=!!Module.___cxa_demangle;if(b){try{var c=_malloc(a.length);writeStringToMemory(a.substr(1),c);var d=_malloc(4),e=Module.___cxa_demangle(c,0,0,d);if(0===getValue(d,"i32")&&e)return Pointer_stringify(e)}catch(a){}finally{c&&_free(c),d&&_free(d),e&&_free(e)}return a}return Runtime.warnOnce("warning: build with  -s DEMANGLE_SUPPORT=1  to link in libcxxabi demangling"),a}function demangleAll(a){return a.replace(/__Z[\w\d_]+/g,function(a){var b=demangle(a);return a===b?a:a+" ["+b+"]"})}function jsStackTrace(){var a=new Error;if(!a.stack){try{throw new Error(0)}catch(b){a=b}if(!a.stack)return"(no stack trace available)"}return a.stack.toString()}function stackTrace(){var a=jsStackTrace();return Module.extraStackTrace&&(a+="\n"+Module.extraStackTrace()),demangleAll(a)}function alignMemoryPage(a){return a%4096>0&&(a+=4096-a%4096),a}function updateGlobalBuffer(a){Module.buffer=buffer=a}function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}function writeStackCookie(){assert(0==(3&STACK_MAX)),HEAPU32[(STACK_MAX>>2)-1]=34821223,HEAPU32[(STACK_MAX>>2)-2]=2310721022}function checkStackCookie(){34821223==HEAPU32[(STACK_MAX>>2)-1]&&2310721022==HEAPU32[(STACK_MAX>>2)-2]||abort("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+HEAPU32[(STACK_MAX>>2)-2].toString(16)+" "+HEAPU32[(STACK_MAX>>2)-1].toString(16))}function abortStackOverflow(a){abort("Stack overflow! Attempted to allocate "+a+" bytes on the stack, but stack has only "+(STACK_MAX-asm.stackSave()+a)+" bytes available!")}function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with  -s TOTAL_MEMORY=X  with X higher than the current value "+TOTAL_MEMORY+", (2) compile with  -s ALLOW_MEMORY_GROWTH=1  which adjusts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of this abort, compile with  -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}function callRuntimeCallbacks(a){for(;a.length>0;){var b=a.shift();if("function"!=typeof b){var c=b.func;"number"==typeof c?void 0===b.arg?Runtime.dynCall("v",c):Runtime.dynCall("vi",c,[b.arg]):c(void 0===b.arg?null:b.arg)}else b()}}function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){checkStackCookie(),runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){checkStackCookie(),callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){checkStackCookie(),callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(checkStackCookie(),Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(a){__ATPRERUN__.unshift(a)}function addOnInit(a){__ATINIT__.unshift(a)}function addOnPreMain(a){__ATMAIN__.unshift(a)}function addOnExit(a){__ATEXIT__.unshift(a)}function addOnPostRun(a){__ATPOSTRUN__.unshift(a)}function intArrayFromString(a,b,c){var d=c>0?c:lengthBytesUTF8(a)+1,e=new Array(d),f=stringToUTF8Array(a,e,0,e.length);return b&&(e.length=f),e}function intArrayToString(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];d>255&&(assert(!1,"Character code "+d+" ("+String.fromCharCode(d)+")  at offset "+c+" not in 0x00-0xFF."),d&=255),b.push(String.fromCharCode(d))}return b.join("")}function writeStringToMemory(a,b,c){for(var d=intArrayFromString(a,c),e=0;e<d.length;){var f=d[e];HEAP8[b+e>>0]=f,e+=1}}function writeArrayToMemory(a,b){for(var c=0;c<a.length;c++)HEAP8[b++>>0]=a[c]}function writeAsciiToMemory(a,b,c){for(var d=0;d<a.length;++d)assert(a.charCodeAt(d)===a.charCodeAt(d)&255),HEAP8[b++>>0]=a.charCodeAt(d);c||(HEAP8[b>>0]=0)}function unSign(a,b,c){return a>=0?a:b<=32?2*Math.abs(1<<b-1)+a:Math.pow(2,b)+a}function reSign(a,b,c){if(a<=0)return a;var d=b<=32?Math.abs(1<<b-1):Math.pow(2,b-1);return a>=d&&(b<=32||a>d)&&(a=-2*d+a),a}function getUniqueRunDependency(a){for(var b=a;;){if(!runDependencyTracking[a])return a;a=b+Math.random()}return a}function addRunDependency(a){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),a?(assert(!runDependencyTracking[a]),runDependencyTracking[a]=1,null===runDependencyWatcher&&"undefined"!=typeof setInterval&&(runDependencyWatcher=setInterval(function(){if(ABORT)return clearInterval(runDependencyWatcher),void(runDependencyWatcher=null);var a=!1;for(var b in runDependencyTracking)a||(a=!0,Module.printErr("still waiting on run dependencies:")),Module.printErr("dependency: "+b);a&&Module.printErr("(end of list)")},1e4))):Module.printErr("warning: run dependency added without ID")}function removeRunDependency(a){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),a?(assert(runDependencyTracking[a]),delete runDependencyTracking[a]):Module.printErr("warning: run dependency removed without ID"),0==runDependencies&&(null!==runDependencyWatcher&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var b=dependenciesFulfilled;dependenciesFulfilled=null,b()}}function copyTempFloat(a){HEAP8[tempDoublePtr]=HEAP8[a],HEAP8[tempDoublePtr+1]=HEAP8[a+1],HEAP8[tempDoublePtr+2]=HEAP8[a+2],HEAP8[tempDoublePtr+3]=HEAP8[a+3]}function copyTempDouble(a){HEAP8[tempDoublePtr]=HEAP8[a],HEAP8[tempDoublePtr+1]=HEAP8[a+1],HEAP8[tempDoublePtr+2]=HEAP8[a+2],HEAP8[tempDoublePtr+3]=HEAP8[a+3],HEAP8[tempDoublePtr+4]=HEAP8[a+4],HEAP8[tempDoublePtr+5]=HEAP8[a+5],HEAP8[tempDoublePtr+6]=HEAP8[a+6],HEAP8[tempDoublePtr+7]=HEAP8[a+7]}function _abort(){Module.abort()}function ___lock(){}function ___unlock(){}function _realloc(){throw"bad"}function __exit(a){Module.exit(a)}function _exit(a){__exit(a)}function _emscripten_set_main_loop_timing(a,b){function e(a){a.source===window&&a.data===d&&(a.stopPropagation(),c.shift()())}if(Browser.mainLoop.timingMode=a,Browser.mainLoop.timingValue=b,!Browser.mainLoop.func)return console.error("emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up."),1;if(0==a)Browser.mainLoop.scheduler=function(){var c=0|Math.max(0,Browser.mainLoop.tickStartTime+b-_emscripten_get_now());setTimeout(Browser.mainLoop.runner,c)},Browser.mainLoop.method="timeout";else if(1==a)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(2==a){if(!window.setImmediate){var c=[],d="__emcc";window.addEventListener("message",e,!0),window.setImmediate=function(b){c.push(b),window.postMessage(d,"*")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(a,b,c,d,e){Module.noExitRuntime=!0,assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Browser.mainLoop.func=a,Browser.mainLoop.arg=d;var f;if("undefined"!=typeof d){var g=[d];f=function(){Runtime.dynCall("vi",a,g)}}else f=function(){Runtime.dynCall("v",a)};var h=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var b=Date.now(),c=Browser.mainLoop.queue.shift();if(c.func(c.arg),Browser.mainLoop.remainingBlockers){var d=Browser.mainLoop.remainingBlockers,e=d%1==0?d-1:Math.floor(d);c.counted?Browser.mainLoop.remainingBlockers=e:(e+=.5,Browser.mainLoop.remainingBlockers=(8*d+e)/9)}if(console.log('main loop blocker "'+c.name+'" took '+(Date.now()-b)+" ms"),Browser.mainLoop.updateStatus(),h<Browser.mainLoop.currentlyRunningMainloop)return;return void setTimeout(Browser.mainLoop.runner,0)}if(!(h<Browser.mainLoop.currentlyRunningMainloop)){if(Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0,1==Browser.mainLoop.timingMode&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0)return void Browser.mainLoop.scheduler();0==Browser.mainLoop.timingMode&&(Browser.mainLoop.tickStartTime=_emscripten_get_now()),"timeout"===Browser.mainLoop.method&&Module.ctx&&(Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),Browser.mainLoop.method=""),Browser.mainLoop.runIter(f),checkStackCookie(),h<Browser.mainLoop.currentlyRunningMainloop||("object"==typeof SDL&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),Browser.mainLoop.scheduler())}}},e||(b&&b>0?_emscripten_set_main_loop_timing(0,1e3/b):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),c)throw"SimulateInfiniteLoop"}function ___setErrNo(a){return Module.___errno_location?HEAP32[Module.___errno_location()>>2]=a:Module.printErr("failed to set errno from JS"),a}function ___syscall54(a,b){SYSCALLS.varargs=b;try{var c=SYSCALLS.getStreamFromFD(),d=SYSCALLS.get();switch(d){case 21505:return c.tty?0:-ERRNO_CODES.ENOTTY;case 21506:return c.tty?0:-ERRNO_CODES.ENOTTY;case 21519:if(!c.tty)return-ERRNO_CODES.ENOTTY;var e=SYSCALLS.get();return HEAP32[e>>2]=0,0;case 21520:return c.tty?-ERRNO_CODES.EINVAL:-ERRNO_CODES.ENOTTY;case 21531:var e=SYSCALLS.get();return FS.ioctl(c,d,e);default:abort("bad ioctl syscall "+d)}}catch(a){return"undefined"!=typeof FS&&a instanceof FS.ErrnoError||abort(a),-a.errno}}function _longjmp(a,b){throw asm.setThrew(a,b||1),"longjmp"}function _pthread_cleanup_push(a,b){__ATEXIT__.push(function(){Runtime.dynCall("vi",a,[b])}),_pthread_cleanup_push.level=__ATEXIT__.length}function _pthread_cleanup_pop(){assert(_pthread_cleanup_push.level==__ATEXIT__.length,"cannot pop if something else added meanwhile!"),__ATEXIT__.pop(),_pthread_cleanup_push.level=__ATEXIT__.length}function _emscripten_longjmp(a,b){_longjmp(a,b)}function ___syscall5(a,b){SYSCALLS.varargs=b;try{var c=SYSCALLS.getStr(),d=SYSCALLS.get(),e=SYSCALLS.get(),f=FS.open(c,d,e);return f.fd}catch(a){return"undefined"!=typeof FS&&a instanceof FS.ErrnoError||abort(a),-a.errno}}function _emscripten_memcpy_big(a,b,c){return HEAPU8.set(HEAPU8.subarray(b,b+c),a),a}function ___syscall6(a,b){SYSCALLS.varargs=b;try{var c=SYSCALLS.getStreamFromFD();return FS.close(c),0}catch(a){return"undefined"!=typeof FS&&a instanceof FS.ErrnoError||abort(a),-a.errno}}function _sbrk(a){var b=_sbrk;b.called||(DYNAMICTOP=alignMemoryPage(DYNAMICTOP),b.called=!0,assert(Runtime.dynamicAlloc),b.alloc=Runtime.dynamicAlloc,Runtime.dynamicAlloc=function(){abort("cannot dynamically allocate, sbrk now has control")});var c=DYNAMICTOP;if(0!=a){var d=b.alloc(a);if(!d)return-1>>>0}return c}function ___syscall140(a,b){SYSCALLS.varargs=b;try{var c=SYSCALLS.getStreamFromFD(),d=SYSCALLS.get(),e=SYSCALLS.get(),f=SYSCALLS.get(),g=SYSCALLS.get(),h=e;return assert(0===d),FS.llseek(c,h,g),HEAP32[f>>2]=c.position,c.getdents&&0===h&&0===g&&(c.getdents=null),0}catch(a){return"undefined"!=typeof FS&&a instanceof FS.ErrnoError||abort(a),-a.errno}}function ___syscall146(a,b){SYSCALLS.varargs=b;try{var c=SYSCALLS.getStreamFromFD(),d=SYSCALLS.get(),e=SYSCALLS.get();return SYSCALLS.doWritev(c,d,e)}catch(a){return"undefined"!=typeof FS&&a instanceof FS.ErrnoError||abort(a),-a.errno}}function ___syscall221(a,b){SYSCALLS.varargs=b;try{var c=SYSCALLS.getStreamFromFD(),d=SYSCALLS.get();switch(d){case 0:var e=SYSCALLS.get();if(e<0)return-ERRNO_CODES.EINVAL;var f;return f=FS.open(c.path,c.flags,0,e),f.fd;case 1:case 2:return 0;case 3:return c.flags;case 4:var e=SYSCALLS.get();return c.flags|=e,0;case 12:case 12:var e=SYSCALLS.get(),g=0;return HEAP16[e+g>>1]=2,0;case 13:case 14:case 13:case 14:return 0;case 16:case 8:return-ERRNO_CODES.EINVAL;case 9:return ___setErrNo(ERRNO_CODES.EINVAL),-1;default:return-ERRNO_CODES.EINVAL}}catch(a){return"undefined"!=typeof FS&&a instanceof FS.ErrnoError||abort(a),-a.errno}}function ___syscall145(a,b){SYSCALLS.varargs=b;try{var c=SYSCALLS.getStreamFromFD(),d=SYSCALLS.get(),e=SYSCALLS.get();return SYSCALLS.doReadv(c,d,e)}catch(a){return"undefined"!=typeof FS&&a instanceof FS.ErrnoError||abort(a),-a.errno}}function nullFunc_iiii(a){Module.printErr("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Module.printErr("Build with ASSERTIONS=2 for more info."),abort(a)}function nullFunc_viiiiiii(a){Module.printErr("Invalid function pointer called with signature 'viiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Module.printErr("Build with ASSERTIONS=2 for more info."),abort(a)}function nullFunc_viiiii(a){Module.printErr("Invalid function pointer called with signature 'viiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Module.printErr("Build with ASSERTIONS=2 for more info."),abort(a)}function nullFunc_vi(a){Module.printErr("Invalid function pointer called with signature 'vi'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Module.printErr("Build with ASSERTIONS=2 for more info."),abort(a)}function nullFunc_vii(a){Module.printErr("Invalid function pointer called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Module.printErr("Build with ASSERTIONS=2 for more info."),abort(a)}function nullFunc_ii(a){Module.printErr("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Module.printErr("Build with ASSERTIONS=2 for more info."),abort(a)}function nullFunc_viii(a){Module.printErr("Invalid function pointer called with signature 'viii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Module.printErr("Build with ASSERTIONS=2 for more info."),abort(a)}function nullFunc_iiiii(a){Module.printErr("Invalid function pointer called with signature 'iiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Module.printErr("Build with ASSERTIONS=2 for more info."),abort(a)}function nullFunc_viiiiii(a){Module.printErr("Invalid function pointer called with signature 'viiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Module.printErr("Build with ASSERTIONS=2 for more info."),abort(a)}function nullFunc_iii(a){Module.printErr("Invalid function pointer called with signature 'iii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Module.printErr("Build with ASSERTIONS=2 for more info."),abort(a)}function nullFunc_viiii(a){Module.printErr("Invalid function pointer called with signature 'viiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),Module.printErr("Build with ASSERTIONS=2 for more info."),abort(a)}function invoke_iiii(a,b,c,d){try{return Module.dynCall_iiii(a,b,c,d)}catch(a){if("number"!=typeof a&&"longjmp"!==a)throw a;asm.setThrew(1,0)}}function invoke_viiiiiii(a,b,c,d,e,f,g,h){try{Module.dynCall_viiiiiii(a,b,c,d,e,f,g,h)}catch(a){if("number"!=typeof a&&"longjmp"!==a)throw a;asm.setThrew(1,0)}}function invoke_viiiii(a,b,c,d,e,f){try{Module.dynCall_viiiii(a,b,c,d,e,f)}catch(a){if("number"!=typeof a&&"longjmp"!==a)throw a;asm.setThrew(1,0)}}function invoke_vi(a,b){try{Module.dynCall_vi(a,b)}catch(a){if("number"!=typeof a&&"longjmp"!==a)throw a;asm.setThrew(1,0)}}function invoke_vii(a,b,c){try{Module.dynCall_vii(a,b,c)}catch(a){if("number"!=typeof a&&"longjmp"!==a)throw a;asm.setThrew(1,0)}}function invoke_ii(a,b){try{return Module.dynCall_ii(a,b)}catch(a){if("number"!=typeof a&&"longjmp"!==a)throw a;asm.setThrew(1,0)}}function invoke_viii(a,b,c,d){try{Module.dynCall_viii(a,b,c,d)}catch(a){if("number"!=typeof a&&"longjmp"!==a)throw a;asm.setThrew(1,0)}}function invoke_iiiii(a,b,c,d,e){try{return Module.dynCall_iiiii(a,b,c,d,e)}catch(a){if("number"!=typeof a&&"longjmp"!==a)throw a;asm.setThrew(1,0)}}function invoke_viiiiii(a,b,c,d,e,f,g){try{Module.dynCall_viiiiii(a,b,c,d,e,f,g)}catch(a){if("number"!=typeof a&&"longjmp"!==a)throw a;asm.setThrew(1,0)}}function invoke_iii(a,b,c){try{return Module.dynCall_iii(a,b,c)}catch(a){if("number"!=typeof a&&"longjmp"!==a)throw a;asm.setThrew(1,0)}}function invoke_viiii(a,b,c,d,e){try{Module.dynCall_viiii(a,b,c,d,e)}catch(a){if("number"!=typeof a&&"longjmp"!==a)throw a;asm.setThrew(1,0)}}function ExitStatus(a){this.name="ExitStatus",this.message="Program terminated with exit("+a+")",this.status=a}function run(a){function b(){Module.calledRun||(Module.calledRun=!0,ABORT||(ensureInitRuntime(),preMain(),ENVIRONMENT_IS_WEB&&null!==preloadStartTime&&Module.printErr("pre-main prep time: "+(Date.now()-preloadStartTime)+" ms"),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(a),postRun()))}return a=a||Module.arguments,null===preloadStartTime&&(preloadStartTime=Date.now()),runDependencies>0?void Module.printErr("run() called, but dependencies remain, so not running"):(writeStackCookie(),preRun(),void(runDependencies>0||Module.calledRun||(Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),b()},1)):b(),checkStackCookie())))}function exit(a,b){if(b&&Module.noExitRuntime)return void Module.printErr("exit("+a+") implicitly called by end of main(), but noExitRuntime, so not exiting the runtime (you can use emscripten_force_exit, if you want to force a true shutdown)");throw Module.noExitRuntime?Module.printErr("exit("+a+") called, but noExitRuntime, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)"):(ABORT=!0,EXITSTATUS=a,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(a)),ENVIRONMENT_IS_NODE?process.exit(a):ENVIRONMENT_IS_SHELL&&"function"==typeof quit&&quit(a),new ExitStatus(a)}function abort(a){void 0!==a?(Module.print(a),Module.printErr(a),a=JSON.stringify(a)):a="",ABORT=!0,EXITSTATUS=1;var b="",c="abort("+a+") at "+stackTrace()+b;throw abortDecorators&&abortDecorators.forEach(function(b){c=b(c,a)}),c}Module.preRun.push(function(){Module.FS=FS});var Module;Module||(Module=("undefined"!=typeof Module?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if("WEB"===Module.ENVIRONMENT)ENVIRONMENT_IS_WEB=!0;else if("WORKER"===Module.ENVIRONMENT)ENVIRONMENT_IS_WORKER=!0;else if("NODE"===Module.ENVIRONMENT)ENVIRONMENT_IS_NODE=!0;else{if("SHELL"!==Module.ENVIRONMENT)throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");ENVIRONMENT_IS_SHELL=!0}else ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_NODE="object"==typeof process&&"function"==typeof require&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(b,c){nodeFS||(nodeFS=require("fs")),nodePath||(nodePath=require("path")),b=nodePath.normalize(b);var d=nodeFS.readFileSync(b);return c?d:d.toString()},Module.readBinary=function(b){var c=Module.read(b,!0);return c.buffer||(c=new Uint8Array(c)),assert(c.buffer),c},Module.load=function(b){globalEval(read(b))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),"undefined"!=typeof module&&(module.exports=Module),process.on("uncaughtException",function(a){if(!(a instanceof ExitStatus))throw a}),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),"undefined"!=typeof printErr&&(Module.printErr=printErr),"undefined"!=typeof read?Module.read=read:Module.read=function(){throw"no read() available (jsc?)"},Module.readBinary=function(b){if("function"==typeof readbuffer)return new Uint8Array(readbuffer(b));var c=read(b,"binary");return assert("object"==typeof c),c},"undefined"!=typeof scriptArgs?Module.arguments=scriptArgs:"undefined"!=typeof arguments&&(Module.arguments=arguments);else{if(!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER)throw"Unknown runtime environment. Where are we?";if(Module.read=function(b){var c=new XMLHttpRequest;return c.open("GET",b,!1),c.send(null),c.responseText},Module.readAsync=function(b,c,d){var e=new XMLHttpRequest;e.open("GET",b,!0),e.responseType="arraybuffer",e.onload=function(){200==e.status||0==e.status&&e.response?c(e.response):d()},e.onerror=d,e.send(null)},"undefined"!=typeof arguments&&(Module.arguments=arguments),"undefined"!=typeof console)Module.print||(Module.print=function(b){console.log(b)}),Module.printErr||(Module.printErr=function(b){console.warn(b)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&"undefined"!=typeof dump?function(a){dump(a)}:function(a){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),"undefined"==typeof Module.setWindowTitle&&(Module.setWindowTitle=function(a){document.title=a})}!Module.load&&Module.read&&(Module.load=function(b){globalEval(Module.read(b))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(a){tempRet0=a},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(a){STACKTOP=a},getNativeTypeSize:function(a){switch(a){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:if("*"===a[a.length-1])return Runtime.QUANTUM_SIZE;if("i"===a[0]){var b=parseInt(a.substr(1));return assert(b%8===0),b/8}return 0}},getNativeFieldSize:function(a){return Math.max(Runtime.getNativeTypeSize(a),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(a,b){return"double"===b||"i64"===b?7&a&&(assert(4===(7&a)),a+=4):assert(0===(3&a)),a},getAlignSize:function(a,b,c){return c||"i64"!=a&&"double"!=a?a?Math.min(b||(a?Runtime.getNativeFieldSize(a):0),Runtime.QUANTUM_SIZE):Math.min(b,8):8},dynCall:function(a,b,c){return c&&c.length?(assert(c.length==a.length-1),assert("dynCall_"+a in Module,"bad function pointer type - no table for sig '"+a+"'"),Module["dynCall_"+a].apply(null,[b].concat(c))):(assert(1==a.length),assert("dynCall_"+a in Module,"bad function pointer type - no table for sig '"+a+"'"),
+Module["dynCall_"+a].call(null,b))},functionPointers:[],addFunction:function(a){for(var b=0;b<Runtime.functionPointers.length;b++)if(!Runtime.functionPointers[b])return Runtime.functionPointers[b]=a,2*(1+b);throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."},removeFunction:function(a){Runtime.functionPointers[(a-2)/2]=null},warnOnce:function(a){Runtime.warnOnce.shown||(Runtime.warnOnce.shown={}),Runtime.warnOnce.shown[a]||(Runtime.warnOnce.shown[a]=1,Module.printErr(a))},funcWrappers:{},getFuncWrapper:function(a,b){assert(b),Runtime.funcWrappers[b]||(Runtime.funcWrappers[b]={});var c=Runtime.funcWrappers[b];return c[a]||(1===b.length?c[a]=function(){return Runtime.dynCall(b,a)}:2===b.length?c[a]=function(d){return Runtime.dynCall(b,a,[d])}:c[a]=function(){return Runtime.dynCall(b,a,Array.prototype.slice.call(arguments))}),c[a]},getCompilerSetting:function(a){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work"},stackAlloc:function(a){var b=STACKTOP;return STACKTOP=STACKTOP+a|0,STACKTOP=STACKTOP+15&-16,0|assert((0|STACKTOP)<(0|STACK_MAX)|0),b},staticAlloc:function(a){var b=STATICTOP;return STATICTOP=STATICTOP+(assert(!staticSealed),a)|0,STATICTOP=STATICTOP+15&-16,b},dynamicAlloc:function(a){var b=DYNAMICTOP;if(DYNAMICTOP=DYNAMICTOP+(assert(DYNAMICTOP>0),a)|0,DYNAMICTOP=DYNAMICTOP+15&-16,DYNAMICTOP>=TOTAL_MEMORY){var c=enlargeMemory();if(!c)return DYNAMICTOP=b,0}return b},alignMemory:function(a,b){var c=a=Math.ceil(a/(b?b:16))*(b?b:16);return c},makeBigInt:function(a,b,c){var d=c?+(a>>>0)+4294967296*+(b>>>0):+(a>>>0)+4294967296*+(0|b);return d},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=!1,EXITSTATUS=0,globalScope=this,cwrap,ccall;!function(){function parseJSFunc(a){var b=a.toString().match(sourceRegex).slice(1);return{arguments:b[0],body:b[1],returnValue:b[2]}}function ensureJSsource(){if(!JSsource){JSsource={};for(var a in JSfuncs)JSfuncs.hasOwnProperty(a)&&(JSsource[a]=parseJSFunc(JSfuncs[a]))}}var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(a){var b=Runtime.stackAlloc(a.length);return writeArrayToMemory(a,b),b},stringToC:function(a){var b=0;return null!==a&&void 0!==a&&0!==a&&(b=Runtime.stackAlloc((a.length<<2)+1),writeStringToMemory(a,b)),b}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(b,c,d,e,f){var g=getCFunc(b),h=[],i=0;if(assert("array"!==c,'Return type should not be "array".'),e)for(var j=0;j<e.length;j++){var k=toC[d[j]];k?(0===i&&(i=Runtime.stackSave()),h[j]=k(e[j])):h[j]=e[j]}var l=g.apply(null,h);if(f&&f.async||"object"!=typeof EmterpreterAsync||assert(!EmterpreterAsync.state,"cannot start async op with normal JS calling ccall"),f&&f.async&&assert(!c,"async ccalls cannot return values"),"string"===c&&(l=Pointer_stringify(l)),0!==i){if(f&&f.async)return void EmterpreterAsync.asyncFinalizers.push(function(){Runtime.stackRestore(i)});Runtime.stackRestore(i)}return l};var sourceRegex=/^function\s*[a-zA-Z$_0-9]*\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/,JSsource=null;cwrap=function cwrap(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident),numericArgs=argTypes.every(function(a){return"number"===a}),numericRet="string"!==returnType;if(numericRet&&numericArgs)return cfunc;var argNames=argTypes.map(function(a,b){return"$"+b}),funcstr="(function("+argNames.join(",")+") {",nargs=argTypes.length;if(!numericArgs){ensureJSsource(),funcstr+="var stack = "+JSsource.stackSave.body+";";for(var i=0;i<nargs;i++){var arg=argNames[i],type=argTypes[i];if("number"!==type){var convertCode=JSsource[type+"ToC"];funcstr+="var "+convertCode.arguments+" = "+arg+";",funcstr+=convertCode.body+";",funcstr+=arg+"=("+convertCode.returnValue+");"}}}var cfuncname=parseJSFunc(function(){return cfunc}).returnValue;if(funcstr+="var ret = "+cfuncname+"("+argNames.join(",")+");",!numericRet){var strgfy=parseJSFunc(function(){return Pointer_stringify}).returnValue;funcstr+="ret = "+strgfy+"(ret);"}return funcstr+="if (typeof EmterpreterAsync === 'object') { assert(!EmterpreterAsync.state, 'cannot start async op with normal JS calling cwrap') }",numericArgs||(ensureJSsource(),funcstr+=JSsource.stackRestore.body.replace("()","(stack)")+";"),funcstr+="return ret})",eval(funcstr)}}(),Module.ccall=ccall,Module.cwrap=cwrap,Module.setValue=setValue,Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE,Module.allocate=allocate,Module.getMemory=getMemory,Module.Pointer_stringify=Pointer_stringify,Module.AsciiToString=AsciiToString,Module.stringToAscii=stringToAscii,Module.UTF8ArrayToString=UTF8ArrayToString,Module.UTF8ToString=UTF8ToString,Module.stringToUTF8Array=stringToUTF8Array,Module.stringToUTF8=stringToUTF8,Module.lengthBytesUTF8=lengthBytesUTF8,Module.stackTrace=stackTrace;for(var PAGE_SIZE=4096,HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,STATIC_BASE=0,STATICTOP=0,staticSealed=!1,STACK_BASE=0,STACKTOP=0,STACK_MAX=0,DYNAMIC_BASE=0,DYNAMICTOP=0,TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||16777216,totalMemory=65536;totalMemory<TOTAL_MEMORY||totalMemory<2*TOTAL_STACK;)totalMemory<16777216?totalMemory*=2:totalMemory+=16777216;if(totalMemory!==TOTAL_MEMORY&&(Module.printErr("increasing TOTAL_MEMORY to "+totalMemory+" to be compliant with the asm.js spec (and given that TOTAL_STACK="+TOTAL_STACK+")"),TOTAL_MEMORY=totalMemory),assert("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&!!new Int32Array(1).subarray&&!!new Int32Array(1).set,"JS engine does not provide full typed array support"),Module.buffer?(buffer=Module.buffer,assert(buffer.byteLength===TOTAL_MEMORY,"provided buffer should be "+TOTAL_MEMORY+" bytes, but it is "+buffer.byteLength)):buffer=new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews(),HEAP32[0]=255,255!==HEAPU8[0]||0!==HEAPU8[3])throw"Typed arrays 2 must be run on a little-endian system";Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;Module.addOnPreRun=addOnPreRun,Module.addOnInit=addOnInit,Module.addOnPreMain=addOnPreMain,Module.addOnExit=addOnExit,Module.addOnPostRun=addOnPostRun,Module.intArrayFromString=intArrayFromString,Module.intArrayToString=intArrayToString,Module.writeStringToMemory=writeStringToMemory,Module.writeArrayToMemory=writeArrayToMemory,Module.writeAsciiToMemory=writeAsciiToMemory,Math.imul&&Math.imul(4294967295,5)===-5||(Math.imul=function(b,c){var d=b>>>16,e=65535&b,f=c>>>16,g=65535&c;return e*g+(d*g+e*f<<16)|0}),Math.imul=Math.imul,Math.clz32||(Math.clz32=function(a){a>>>=0;for(var b=0;b<32;b++)if(a&1<<31-b)return b;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(a){return a<0?Math.ceil(a):Math.floor(a)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_min=Math.min,Math_clz32=Math.clz32,Math_trunc=Math.trunc,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null,runDependencyTracking={};Module.addRunDependency=addRunDependency,Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var memoryInitializer=null,ASM_CONSTS=[];STATIC_BASE=8,STATICTOP=STATIC_BASE+77520,__ATINIT__.push(),allocate([64,209,0,0,74,209,0,0,105,209,0,0,150,209,0,0,211,209,0,0,254,209,0,0,55,210,0,0,101,210,0,0,144,210,0,0,177,210,0,0,208,210,0,0,0,0,0,0,0,0,0,0,70,227,0,0,2,0,0,0,94,227,0,0,3,0,0,0,89,215,0,0,4,0,0,0,120,219,0,0,10,0,0,0,22,255,0,0,8,0,0,0,15,255,0,0,9,0,0,0,29,255,0,0,11,0,0,0,96,215,0,0,12,0,0,0,103,215,0,0,13,0,0,0,35,255,0,0,6,0,0,0,110,215,0,0,14,0,0,0,136,253,0,0,15,0,0,0,149,253,0,0,16,0,0,0,110,253,0,0,17,0,0,0,25,13,1,0,19,0,0,0,116,215,0,0,21,0,0,0,121,215,0,0,255,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,20,0,0,0,21,0,0,0,22,0,0,0,23,0,0,0,24,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,30,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,33,0,0,0,35,0,0,0,36,0,0,0,37,0,0,0,38,0,0,0,39,0,0,0,40,0,0,0,41,0,0,0,42,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,47,0,0,0,48,0,0,0,49,0,0,0,50,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,57,0,0,0,58,0,0,0,59,0,0,0,60,0,0,0,61,0,0,0,62,0,0,0,63,0,0,0,64,0,0,0,65,0,0,0,66,0,0,0,67,0,0,0,68,0,0,0,69,0,0,0,70,0,0,0,71,0,0,0,72,0,0,0,73,0,0,0,74,0,0,0,75,0,0,0,34,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,39,227,0,0,20,1,0,0,20,1,0,0,6,0,0,0,45,227,0,0,17,1,0,0,17,1,0,0,0,0,0,0,50,227,0,0,33,1,0,0,33,1,0,0,1,0,0,0,54,227,0,0,13,1,0,0,13,1,0,0,0,0,0,0,57,13,1,0,14,1,0,0,14,1,0,0,1,0,0,0,61,227,0,0,15,1,0,0,15,1,0,0,0,0,0,0,66,227,0,0,38,1,0,0,38,1,0,0,4,0,0,0,70,227,0,0,35,1,0,0,35,1,0,0,1,0,0,0,76,227,0,0,32,1,0,0,32,1,0,0,1,0,0,0,81,227,0,0,16,1,0,0,16,1,0,0,10,0,0,0,87,227,0,0,12,1,0,0,43,1,0,0,6,0,0,0,94,227,0,0,34,1,0,0,34,1,0,0,1,0,0,0,99,227,0,0,9,1,0,0,42,1,0,0,10,0,0,0,105,227,0,0,7,1,0,0,40,1,0,0,10,0,0,0,112,227,0,0,29,1,0,0,29,1,0,0,6,0,0,0,119,227,0,0,4,1,0,0,4,1,0,0,7,0,0,0,123,227,0,0,36,1,0,0,36,1,0,0,10,0,0,0,127,227,0,0,25,1,0,0,25,1,0,0,0,0,0,0,130,227,0,0,30,1,0,0,30,1,0,0,4,0,0,0,136,227,0,0,10,1,0,0,10,1,0,0,10,0,0,0,140,227,0,0,11,1,0,0,11,1,0,0,7,0,0,0,146,227,0,0,37,1,0,0,37,1,0,0,10,0,0,0,149,227,0,0,24,1,0,0,24,1,0,0,10,0,0,0,152,227,0,0,19,1,0,0,19,1,0,0,10,0,0,0,157,227,0,0,23,1,0,0,23,1,0,0,1,0,0,0,163,227,0,0,6,1,0,0,39,1,0,0,10,0,0,0,166,227,0,0,18,1,0,0,18,1,0,0,10,0,0,0,171,227,0,0,22,1,0,0,22,1,0,0,1,0,0,0,176,227,0,0,21,1,0,0,21,1,0,0,6,0,0,0,181,227,0,0,31,1,0,0,31,1,0,0,4,0,0,0,187,227,0,0,3,1,0,0,3,1,0,0,10,0,0,0,51,13,1,0,5,1,0,0,5,1,0,0,0,0,0,0,194,227,0,0,47,1,0,0,47,1,0,0,1,0,0,0,203,227,0,0,48,1,0,0,48,1,0,0,1,0,0,0,212,227,0,0,49,1,0,0,49,1,0,0,1,0,0,0,225,227,0,0,46,1,0,0,46,1,0,0,1,0,0,0,229,227,0,0,44,1,0,0,44,1,0,0,7,0,0,0,235,227,0,0,45,1,0,0,45,1,0,0,1,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,244,9,1,0,2,1,0,0,2,1,0,0,9,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,176,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,241,227,0,0,8,1,0,0,41,1,0,0,10,0,0,0,77,234,0,0,82,234,0,0,88,234,0,0,99,234,0,0,113,234,0,0,128,234,0,0,140,234,0,0,154,234,0,0,165,234,0,0,180,234,0,0,194,234,0,0,208,234,0,0,220,234,0,0,234,234,0,0,249,234,0,0,8,235,0,0,20,235,0,0,33,235,0,0,47,235,0,0,60,235,0,0,73,235,0,0,86,235,0,0,100,235,0,0,113,235,0,0,126,235,0,0,140,235,0,0,151,235,0,0,162,235,0,0,178,235,0,0,195,235,0,0,213,235,0,0,228,235,0,0,242,235,0,0,0,236,0,0,13,236,0,0,25,236,0,0,38,236,0,0,52,236,0,0,64,236,0,0,75,236,0,0,87,236,0,0,99,236,0,0,115,236,0,0,130,236,0,0,145,236,0,0,161,236,0,0,175,236,0,0,189,236,0,0,201,236,0,0,217,236,0,0,233,236,0,0,253,236,0,0,9,237,0,0,14,237,0,0,20,237,0,0,26,237,0,0,36,237,0,0,42,237,0,0,49,237,0,0,58,237,0,0,65,237,0,0,71,237,0,0,80,237,0,0,88,237,0,0,96,237,0,0,109,237,0,0,121,237,0,0,130,237,0,0,140,237,0,0,152,237,0,0,159,237,0,0,167,237,0,0,172,237,0,0,177,237,0,0,181,237,0,0,186,237,0,0,191,237,0,0,196,237,0,0,201,237,0,0,208,237,0,0,214,237,0,0,221,237,0,0,229,237,0,0,235,237,0,0,241,237,0,0,247,237,0,0,253,237,0,0,4,238,0,0,11,238,0,0,19,238,0,0,27,238,0,0,36,238,0,0,43,238,0,0,51,238,0,0,63,238,0,0,71,238,0,0,79,238,0,0,87,238,0,0,99,238,0,0,105,238,0,0,112,238,0,0,120,238,0,0,128,238,0,0,140,238,0,0,151,238,0,0,164,238,0,0,176,238,0,0,189,238,0,0,202,238,0,0,210,238,0,0,223,238,0,0,236,238,0,0,251,238,0,0,13,239,0,0,29,239,0,0,44,239,0,0,52,239,0,0,56,239,0,0,60,239,0,0,64,239,0,0,68,239,0,0,72,239,0,0,76,239,0,0,80,239,0,0,84,239,0,0,88,239,0,0,92,239,0,0,96,239,0,0,100,239,0,0,104,239,0,0,116,239,0,0,120,239,0,0,124,239,0,0,136,239,0,0,140,239,0,0,144,239,0,0,148,239,0,0,152,239,0,0,156,239,0,0,160,239,0,0,164,239,0,0,168,239,0,0,172,239,0,0,176,239,0,0,181,239,0,0,189,239,0,0,197,239,0,0,201,239,0,0,214,239,0,0,224,239,0,0,233,239,0,0,236,239,0,0,245,239,0,0,254,239,0,0,4,240,0,0,9,240,0,0,13,240,0,0,26,240,0,0,31,240,0,0,42,240,0,0,55,240,0,0,69,240,0,0,85,240,0,0,89,240,0,0,97,240,0,0,102,240,0,0,113,240,0,0,124,240,0,0,134,240,0,0,144,240,0,0,154,240,0,0,164,240,0,0,168,240,0,0,174,240,0,0,180,240,0,0,186,240,0,0,191,240,0,0,202,240,0,0,206,240,0,0,209,240,0,0,218,240,0,0,222,240,0,0,232,240,0,0,242,240,0,0,253,240,0,0,12,241,0,0,26,241,0,0,36,241,0,0,49,241,0,0,52,241,0,0,62,241,0,0,76,241,0,0,81,241,0,0,86,241,0,0,94,241,0,0,97,241,0,0,100,241,0,0,104,241,0,0,109,241,0,0,113,241,0,0,117,241,0,0,122,241,0,0,127,241,0,0,132,241,0,0,137,241,0,0,142,241,0,0,147,241,0,0,151,241,0,0,155,241,0,0,159,241,0,0,163,241,0,0,167,241,0,0,171,241,0,0,175,241,0,0,179,241,0,0,61,227,0,0,127,227,0,0,193,241,0,0,201,241,0,0,210,241,0,0,218,241,0,0,225,241,0,0,237,241,0,0,245,241,0,0,1,242,0,0,17,242,0,0,33,242,0,0,45,242,0,0,54,242,0,0,59,242,0,0,70,242,0,0,82,242,0,0,91,242,0,0,96,242,0,0,107,242,0,0,119,242,0,0,131,242,0,0,135,242,0,0,139,242,0,0,149,242,0,0,155,242,0,0,166,242,0,0,175,242,0,0,183,242,0,0,194,242,0,0,202,242,0,0,209,242,0,0,220,242,0,0,234,242,0,0,238,242,0,0,246,242,0,0,253,242,0,0,5,243,0,0,24,243,0,0,39,243,0,0,52,243,0,0,71,243,0,0,93,243,0,0,97,243,0,0,103,243,0,0,110,243,0,0,123,243,0,0,127,243,0,0,135,243,0,0,143,243,0,0,152,243,0,0,160,243,0,0,168,243,0,0,64,255,0,0,176,243,0,0,181,243,0,0,191,243,0,0,198,243,0,0,208,243,0,0,219,243,0,0,230,243,0,0,236,243,0,0,247,243,0,0,253,243,0,0,9,244,0,0,24,244,0,0,33,244,0,0,46,244,0,0,57,244,0,0,69,244,0,0,81,244,0,0,97,244,0,0,107,244,0,0,112,244,0,0,123,244,0,0,130,244,0,0,136,244,0,0,146,244,0,0,157,244,0,0,168,244,0,0,181,244,0,0,191,244,0,0,198,244,0,0,205,244,0,0,214,244,0,0,222,244,0,0,227,244,0,0,230,244,0,0,235,244,0,0,241,244,0,0,0,0,0,0,35,0,0,0,248,9,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,185,38,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,108,10,0,0,9,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,3,0,0,0,193,38,1,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,10,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,3,0,0,0,201,42,1,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,100,0,0,0,232,3,0,0,16,39,0,0,160,134,1,0,64,66,15,0,128,150,152,0,0,225,245,5,253,252,126,0,160,9,253,252,84,27,100,34,171,35,250,20,253,252,17,33,17,33,253,252,253,252,209,34,249,24,25,19,250,29,250,29,253,252,253,252,250,29,13,12,132,10,253,252,253,252,253,252,253,252,181,0,249,24,253,252,230,255,253,252,253,252,131,21,7,11,253,252,253,252,12,22,253,252,253,252,253,252,253,252,253,252,253,252,253,252,130,33,130,33,90,0,194,16,215,255,107,30,77,31,9,26,253,252,233,23,115,2,98,3,105,3,115,3,193,1,253,252,235,0,243,33,130,33,253,252,246,0,253,252,185,4,253,252,123,1,253,252,253,252,101,0,37,0,253,252,36,0,62,35,253,252,117,0,117,11,7,0,87,0,13,0,66,0,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,14,0,92,0,253,252,49,0,51,0,253,252,253,252,253,252,253,252,253,252,31,0,53,0,141,0,133,1,144,1,17,33,75,1,52,17,115,1,253,252,175,0,253,252,213,0,253,252,253,252,51,0,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,45,0,74,0,83,0,100,0,253,252,253,252,253,252,253,252,253,252,253,252,129,0,187,0,253,252,204,0,253,252,214,0,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,13,0,162,13,26,1,123,1,109,0,20,1,139,1,25,0,48,1,50,0,109,0,17,33,17,33,86,1,253,252,253,252,167,1,121,1,54,0,95,0,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,113,24,253,252,253,252,19,1,253,252,253,252,253,252,246,0,151,1,253,252,253,252,43,1,130,33,130,33,130,33,130,33,253,252,117,11,110,1,253,252,253,252,68,1,70,1,253,252,253,252,253,252,167,18,253,252,250,29,250,29,253,252,253,252,139,19,17,33,253,252,253,252,79,1,166,17,253,252,26,2,146,1,106,1,54,28,194,16,83,1,246,0,185,4,72,1,103,1,253,252,17,33,72,1,89,1,94,0,106,0,253,252,110,1,100,1,106,0,253,252,186,1,24,36,99,1,39,2,133,2,137,2,246,2,253,252,253,252,253,252,253,252,169,3,253,252,253,252,253,252,253,252,253,252,253,252,125,1,44,3,253,252,253,252,179,3,253,252,187,3,253,252,201,3,253,252,78,2,174,1,178,1,253,252,253,252,253,252,253,252,253,19,17,33,17,33,17,33,17,33,54,28,17,33,17,33,253,252,253,252,190,31,253,252,194,16,118,26,113,1,190,31,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,130,33,235,8,250,29,47,37,253,252,253,252,251,40,253,252,253,252,253,252,243,33,243,33,253,252,156,1,253,252,123,1,253,252,9,3,253,252,253,252,253,252,253,252,253,252,128,37,250,29,209,37,162,13,17,33,253,252,253,252,245,1,250,1,67,0,253,252,49,14,249,1,130,33,34,38,250,29,115,38,130,33,130,33,79,15,55,0,55,0,103,0,196,38,250,29,21,39,253,252,204,1,253,252,125,1,151,1,47,32,2,2,253,252,253,252,253,252,253,252,130,33,227,26,253,252,253,252,220,30,253,252,72,1,136,1,253,252,253,252,72,1,253,252,162,1,163,1,253,252,71,0,253,252,253,252,249,24,193,15,184,1,34,38,115,38,130,33,185,4,72,1,253,252,253,252,110,20,171,1,123,1,253,252,253,252,197,27,253,252,253,252,77,31,253,252,253,252,253,252,9,3,36,0,24,36,253,252,24,36,102,39,250,29,183,39,194,1,253,252,253,252,253,252,253,252,132,4,253,252,253,252,253,252,253,252,50,4,253,252,253,252,253,252,253,252,253,252,182,1,130,33,253,252,190,1,23,2,195,1,28,2,253,252,253,252,14,2,166,17,253,252,253,252,253,252,125,1,253,252,181,1,253,252,253,252,253,252,253,252,253,252,253,252,253,252,130,33,130,33,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,33,0,130,33,253,252,199,1,202,1,253,252,72,1,24,36,203,1,253,252,253,252,253,252,226,1,111,10,253,252,253,252,146,1,240,36,240,36,240,36,240,36,40,4,40,4,15,41,249,12,240,36,240,36,248,11,248,11,85,2,85,2,119,12,40,4,40,4,224,2,224,2,158,2,52,0,52,0,146,1,146,1,146,1,144,12,239,22,19,13,96,23,253,252,53,0,253,252,72,1,208,1,253,252,44,2,253,252,253,252,138,11,253,252,253,252,160,8,33,0,33,0,253,252,236,9,253,252,117,11,253,252,253,252,246,0,17,33,162,13,176,1,229,0,253,252,53,0,72,1,53,0,77,2,71,0,148,3,129,25,253,252,160,32,104,2,253,252,150,0,253,252,242,10,125,22,1,10,72,1,244,0,13,1,104,2,253,252,253,252,253,252,253,252,139,0,152,0,72,1,107,0,123,0,17,33,249,24,253,252,125,1,122,2,69,0,253,252,253,252,130,33,110,1,253,252,167,28,70,1,253,252,253,252,253,252,253,252,227,26,220,30,253,252,253,252,4,2,253,252,117,11,18,1,185,4,72,1,106,0,113,1,253,252,176,1,229,0,72,1,66,1,71,1,253,252,253,252,132,4,231,1,253,252,8,2,72,1,253,252,72,1,61,0,50,4,253,252,253,252,253,252,50,4,253,252,253,252,142,2,253,252,253,252,253,252,13,2,166,17,253,252,253,252,253,252,146,1,146,1,253,252,68,3,53,18,253,252,253,252,21,2,24,29,253,252,253,252,24,36,243,33,130,33,49,2,243,33,243,33,253,252,156,1,32,2,50,2,243,33,243,33,253,252,253,252,156,1,253,252,66,0,101,0,53,18,166,17,130,33,33,0,253,252,246,0,149,2,253,252,253,252,253,252,50,4,162,13,246,0,253,252,199,1,253,252,93,2,253,252,80,16,155,2,253,252,17,33,161,2,253,252,130,33,130,33,21,1,130,33,130,33,179,2,53,18,53,18,130,0,55,0,253,252,253,252,137,29,192,14,253,252,130,33,253,252,253,252,62,2,253,252,253,252,253,252,200,0,72,1,182,2,65,2,146,4,253,252,63,2,66,2,53,18,166,17,253,252,253,252,67,2,68,2,253,252,81,2,253,252,82,2,81,2,253,252,86,2,72,1,103,2,102,2,133,36,253,252,110,2,112,2,253,252,200,2,130,33,117,2,253,252,117,11,130,33,253,252,117,11,253,252,117,11,253,252,253,252,243,33,253,252,117,11,253,252,117,11,253,252,253,252,253,252,237,2,121,2,117,11,166,17,162,13,253,252,253,252,72,1,243,2,253,252,148,3,242,36,109,0,253,252,253,252,53,18,253,252,253,252,109,0,253,252,130,33,253,252,248,2,249,2,253,252,253,252,138,0,253,252,220,30,253,252,129,2,182,2,46,2,253,252,253,252,236,2,4,3,145,2,50,4,253,252,142,2,253,252,142,2,253,252,142,2,253,252,253,252,253,252,167,2,253,252,50,4,253,252,238,2,22,3,50,4,253,252,142,2,253,252,253,252,159,2,117,11,253,252,117,11,253,252,253,252,164,2,32,3,253,252,253,252,162,13,250,2,253,252,40,3,133,2,137,2,162,13,253,252,49,14,253,252,253,252,53,18,253,252,253,252,253,252,182,2,129,2,182,2,171,2,253,252,237,0,253,252,253,252,253,252,253,252,81,2,175,2,81,2,81,2,253,252,177,2,178,2,253,252,8,40,81,2,253,252,181,2,81,2,253,252,253,252,33,3,9,3,89,40,250,29,170,40,250,1,150,0,49,3,129,2,182,2,236,2,253,252,253,252,142,2,253,252,253,252,253,252,50,4,253,252,142,2,253,252,183,2,185,2,253,252,142,2,253,252,253,252,253,252,82,0,229,0,72,1,119,0,121,0,253,252,253,252,253,252,129,2,253,252,81,2,81,2,188,2,81,2,81,2,128,0,253,252,253,252,142,2,253,252,253,252,253,252,81,2,253,252,2,0,170,1,27,0,16,0,17,0,62,0,83,0,20,0,132,1,248,0,15,0,7,0,36,1,28,0,14,0,5,0,6,0,80,1,76,0,150,1,36,1,16,0,17,0,13,0,4,0,20,0,208,0,48,0,28,0,82,2,108,1,159,1,65,0,202,1,22,0,24,1,52,0,31,1,110,0,28,1,107,1,90,2,109,1,80,1,97,2,112,1,16,0,17,0,50,0,51,0,20,0,100,2,130,1,159,2,107,2,50,0,51,0,210,1,54,0,2,0,65,0,4,0,52,0,15,0,131,1,155,2,144,1,65,0,244,1,248,2,167,1,67,2,68,2,170,1,250,2,153,1,143,1,26,0,145,1,25,0,50,0,174,2,27,0,174,2,219,1,16,0,76,0,154,1,74,3,142,2,29,0,93,3,26,0,16,0,17,0,88,0,13,1,20,0,16,0,140,0,22,0,88,0,143,0,48,1,90,0,9,0,10,0,133,0,37,0,38,0,98,0,15,0,79,0,65,0,107,1,90,0,109,1,105,0,15,2,112,1,25,0,188,1,10,0,71,0,48,0,16,0,0,0,15,0,25,0,28,0,116,0,119,0,25,0,88,0,212,1,16,0,129,1,16,0,131,1,90,0,90,0,116,0,135,0,136,0,16,0,55,0,213,1,70,3,25,0,136,0,143,1,137,0,145,1,116,0,121,0,25,0,18,0,90,0,20,0,152,1,77,1,154,1,88,0,165,3,25,0,116,0,116,0,17,0,18,0,108,0,139,0,88,0,158,3,137,0,11,3,88,0,98,0,25,0,126,0,127,0,128,0,136,0,90,0,116,0,133,0,155,2,137,0,111,0,88,0,159,2,139,0,137,0,139,0,113,2,187,1,188,1,179,1,142,0,143,0,133,0,224,1,121,2,125,3,123,3,174,2,109,0,137,0,203,2,224,1,77,2,136,0,142,0,143,0,158,1,143,0,128,2,210,1,88,0,211,1,136,0,213,1,139,0,135,0,136,0,142,0,143,0,26,0,77,3,233,0,31,1,226,0,137,0,137,0,116,0,157,3,233,0,136,0,143,0,15,1,252,0,137,0,254,0,255,0,137,0,137,0,247,0,248,0,81,3,13,1,143,0,202,0,142,0,143,0,255,0,89,3,89,3,208,0,252,0,93,3,254,0,137,0,142,0,143,0,142,0,143,0,136,0,15,1,137,0,147,2,148,2,142,0,143,0,65,3,15,1,75,1,88,0,137,0,15,2,139,0,80,1,139,0,233,0,252,0,189,2,254,0,182,2,127,2,128,2,88,0,137,0,196,2,139,0,88,0,58,0,59,0,120,0,2,0,31,1,4,0,5,0,6,0,88,0,88,0,9,0,10,0,209,0,210,0,13,0,89,2,15,0,16,0,17,0,77,1,129,1,20,0,116,1,117,1,88,0,78,1,15,1,139,0,209,0,210,0,136,0,143,0,12,1,86,2,23,1,24,1,252,0,165,3,254,0,28,1,133,0,90,0,135,0,136,0,55,0,2,1,7,1,136,0,65,1,48,0,211,2,78,1,13,1,52,0,25,0,135,0,136,0,136,0,108,1,25,0,17,1,2,1,3,1,62,0,21,1,233,2,90,0,116,0,75,1,108,1,77,3,135,0,136,0,80,1,90,0,139,0,248,2,76,0,250,2,20,1,130,1,137,0,89,3,183,2,109,1,65,1,93,3,143,0,178,3,51,0,70,1,130,1,116,0,55,0,144,1,142,0,143,0,116,0,137,1,116,0,116,0,90,0,122,2,153,1,55,0,144,1,131,1,149,1,150,1,25,0,109,0,137,2,111,0,208,1,153,1,210,1,77,1,67,3,137,0,137,0,145,1,174,2,26,0,37,0,38,0,66,1,67,1,68,1,69,1,154,1,71,1,72,1,184,1,26,0,20,0,167,1,58,0,59,0,43,3,178,1,179,1,66,1,67,1,68,1,69,1,116,0,185,1,184,1,142,0,210,2,116,0,182,2,115,2,160,1,70,3,71,3,65,3,210,2,165,3,90,0,149,1,150,1,212,1,188,1,91,0,26,0,137,0,199,1,137,0,140,0,137,0,137,0,143,0,212,1,140,0,133,0,15,2,143,0,143,0,140,1,71,0,208,1,116,0,210,1,88,0,116,0,140,0,148,1,213,1,67,3,88,0,230,1,133,1,141,0,233,1,88,0,235,1,134,0,110,0,137,0,199,0,113,0,114,0,108,3,55,0,185,1,137,0,123,3,71,0,125,3,209,0,210,0,71,0,137,0,194,1,172,1,97,0,61,0,88,0,176,1,64,0,65,0,242,2,15,0,181,1,8,2,13,0,88,0,16,0,133,0,63,0,135,0,136,0,39,2,191,1,139,0,15,0,135,0,136,0,140,0,133,0,157,3,135,0,136,0,15,2,51,0,139,0,53,0,54,0,55,0,56,0,57,2,49,3,252,0,110,0,254,0,255,0,113,0,114,0,2,1,3,1,90,0,137,0,137,0,7,1,135,0,136,0,111,0,112,0,12,1,13,1,137,0,133,0,116,0,135,0,136,0,82,2,20,1,139,0,240,1,63,2,134,0,137,0,66,2,67,2,68,2,55,2,116,0,31,1,75,2,137,0,97,2,151,3,51,0,63,2,137,0,63,0,66,2,51,0,137,0,83,2,107,2,137,0,137,0,152,3,116,0,89,2,90,2,137,0,92,2,87,2,15,0,81,2,14,2,83,2,111,2,51,0,100,2,53,0,54,0,55,0,56,0,65,1,66,1,67,1,68,1,69,1,70,1,71,1,72,1,111,2,137,0,75,1,88,0,77,1,78,1,142,2,80,1,89,2,122,2,198,2,18,0,75,2,182,2,51,3,183,2,88,0,153,2,186,2,187,2,57,3,127,2,55,2,90,0,192,2,193,2,15,0,134,0,61,0,90,0,63,2,64,0,65,0,66,2,137,0,108,1,134,0,141,3,174,2,56,0,57,0,58,0,59,0,116,1,117,1,71,0,150,3,137,0,152,3,116,0,135,0,136,0,115,2,15,0,85,2,116,0,118,0,130,1,14,0,132,1,133,1,76,2,141,0,135,0,136,0,15,0,62,0,140,1,64,0,65,0,137,0,144,1,137,0,91,0,137,2,148,1,137,0,76,2,111,0,112,0,153,1,182,2,51,0,15,0,53,0,54,0,55,0,56,0,137,0,205,2,203,2,137,0,140,0,137,0,137,0,110,2,212,2,142,0,124,0,125,0,126,0,127,0,128,0,216,2,15,0,136,2,219,2,137,0,137,0,134,0,88,0,110,2,185,1,121,0,88,0,111,0,112,0,233,2,71,0,31,3,151,2,194,1,51,0,92,0,53,0,54,0,55,0,56,0,137,0,242,2,99,0,11,3,167,2,86,0,87,0,208,1,137,0,210,1,137,0,212,1,175,2,15,0,205,2,137,0,134,0,2,3,3,3,15,0,5,3,212,2,7,3,8,3,15,0,15,0,123,0,137,0,13,3,135,0,136,0,16,3,17,3,135,0,136,0,92,0,15,0,200,2,201,2,240,1,134,0,14,3,233,2,124,0,125,0,126,0,127,0,128,0,51,0,121,0,53,0,54,0,55,0,56,0,55,0,218,2,71,0,137,0,51,0,134,0,53,0,54,0,55,0,56,0,15,0,15,0,55,0,230,2,231,2,137,0,15,2,86,0,87,0,137,0,237,2,137,0,137,0,50,3,221,2,137,0,65,3,15,0,2,0,139,0,4,0,139,0,137,0,185,1,247,2,9,0,10,0,254,2,255,2,6,0,221,2,15,0,16,0,17,0,66,2,92,0,20,0,233,1,13,0,235,1,159,2,98,0,99,0,162,2,123,0,124,0,125,0,126,0,127,0,128,0,88,0,154,3,51,3,147,2,199,2,174,2,128,3,158,3,57,3,62,0,153,3,64,0,65,0,88,0,48,0,246,1,123,0,76,2,77,2,126,0,7,0,42,3,51,0,155,2,53,0,54,0,55,0,56,0,62,0,46,3,89,3,88,0,139,0,54,3,133,3,134,3,135,3,136,3,49,3,138,3,139,3,151,3,198,0,142,3,255,255,144,3,145,3,135,0,136,0,255,255,255,255,110,2,151,3,255,255,153,3,154,3,178,3,255,255,111,0,112,0,135,0,136,0,255,255,92,0,63,0,64,0,65,0,152,3,255,255,98,0,99,0,63,0,64,0,65,0,255,255,109,0,255,255,111,0,135,0,136,0,255,255,63,0,64,0,65,0,255,255,255,255,255,255,186,3,187,3,188,3,189,3,190,3,255,255,114,3,123,0,116,3,255,255,126,0,119,3,198,3,255,255,255,255,51,0,255,255,53,0,54,0,55,0,56,0,167,2,255,255,255,255,255,255,111,0,112,0,143,0,255,255,175,2,255,255,255,255,111,0,112,0,255,255,255,255,182,2,183,2,255,255,255,255,186,2,187,2,111,0,112,0,255,255,255,255,192,2,193,2,63,0,64,0,65,0,255,255,255,255,255,255,200,2,201,2,92,0,255,255,63,0,64,0,65,0,255,255,98,0,99,0,255,255,211,2,63,0,64,0,65,0,255,255,16,0,17,0,218,2,255,255,20,0,221,2,255,255,77,3,199,0,79,3,63,0,64,0,65,0,83,3,230,2,231,2,255,255,123,0,209,0,210,0,126,0,237,2,255,255,93,3,255,255,95,3,111,0,112,0,255,255,45,0,46,0,255,255,255,255,139,0,50,0,51,0,111,0,112,0,254,2,255,2,41,1,255,255,255,255,255,255,111,0,112,0,62,0,63,0,49,1,255,255,255,255,52,1,255,255,54,1,14,3,56,1,255,255,58,1,111,0,112,0,255,255,252,0,255,255,254,0,255,0,255,255,255,255,2,1,3,1,255,255,255,255,31,3,7,1,255,255,255,255,255,255,255,255,12,1,13,1,255,255,255,255,255,255,42,3,43,3,255,255,20,1,255,255,255,255,255,255,255,255,50,3,161,3,255,255,255,255,54,3,165,3,255,255,167,3,255,255,255,255,255,255,255,255,172,3,51,0,255,255,53,0,54,0,55,0,56,0,255,255,255,255,2,3,3,3,71,0,5,3,255,255,7,3,8,3,255,255,255,255,255,255,255,255,13,3,255,255,194,3,16,3,17,3,255,255,86,0,87,0,65,1,66,1,67,1,68,1,69,1,70,1,71,1,72,1,255,255,255,255,75,1,255,255,77,1,255,255,92,0,80,1,255,255,255,255,108,3,255,255,98,0,99,0,255,255,255,255,114,3,255,255,116,3,255,255,255,255,119,3,255,255,255,255,255,255,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,108,1,255,255,123,0,255,255,255,255,126,0,255,255,255,255,116,1,117,1,255,255,255,255,51,0,255,255,53,0,54,0,55,0,56,0,151,3,255,255,255,255,255,255,130,1,255,255,132,1,133,1,51,0,255,255,53,0,54,0,55,0,56,0,140,1,255,255,255,255,255,255,144,1,255,255,255,255,255,255,148,1,255,255,255,255,255,255,255,255,153,1,255,255,255,255,255,255,238,0,239,0,240,0,241,0,92,0,40,0,41,0,42,0,43,0,44,0,98,0,255,255,255,255,255,255,252,0,255,255,254,0,255,0,92,0,255,255,133,3,134,3,135,3,136,3,98,0,138,3,139,3,255,255,185,1,142,3,255,255,144,3,145,3,255,255,255,255,255,255,255,255,194,1,255,255,255,255,255,255,2,0,255,255,4,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,13,0,255,255,255,255,212,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,186,3,187,3,188,3,189,3,190,3,255,255,255,255,255,255,255,255,255,255,240,1,255,255,198,3,255,255,48,0,255,255,255,255,255,255,255,255,255,255,75,1,255,255,255,255,255,255,255,255,80,1,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,89,1,90,1,91,1,92,1,93,1,94,1,95,1,96,1,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,255,255,108,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,116,1,117,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,130,1,255,255,111,0,255,255,255,255,2,0,255,255,4,0,255,255,255,255,255,255,255,255,142,1,255,255,144,1,255,255,146,1,147,1,255,255,255,255,255,255,255,255,255,255,153,1,255,255,255,255,255,255,76,2,77,2,255,255,160,1,255,255,255,255,255,255,255,255,255,255,166,1,167,1,255,255,255,255,170,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,189,1,255,255,110,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,199,1,255,255,255,255,202,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,212,1,255,255,255,255,255,255,255,255,255,255,255,255,51,0,199,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,2,0,231,1,4,0,5,0,6,0,7,0,255,255,255,255,255,255,255,255,255,255,13,0,255,255,255,255,111,0,255,255,255,255,255,255,167,2,255,255,255,255,255,255,255,255,255,255,254,1,255,1,175,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,183,2,9,2,255,255,186,2,187,2,255,255,255,255,255,255,255,255,192,2,193,2,255,255,48,0,255,255,255,255,255,255,52,0,200,2,201,2,255,255,7,1,255,255,255,255,255,255,255,255,12,1,13,1,255,255,211,2,255,255,255,255,255,255,255,255,255,255,255,255,218,2,255,255,255,255,221,2,255,255,76,0,255,255,255,255,255,255,255,255,255,255,255,255,230,2,231,2,255,255,255,255,255,255,255,255,255,255,237,2,2,0,255,255,4,0,5,0,6,0,255,255,255,255,255,255,255,255,255,255,255,255,13,0,255,255,199,0,255,255,255,255,254,2,255,2,255,255,255,255,111,0,255,255,255,255,65,1,255,255,255,255,89,2,255,255,70,1,255,255,255,255,255,255,255,255,255,255,255,255,77,1,255,255,255,255,80,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,255,255,255,255,31,3,52,0,255,255,255,255,255,255,255,255,118,2,255,255,255,255,121,2,255,255,42,3,43,3,255,255,255,255,127,2,128,2,255,255,255,255,255,255,255,255,255,255,255,255,54,3,255,255,76,0,255,255,255,255,7,1,255,255,255,255,255,255,255,255,12,1,13,1,255,255,255,255,255,255,238,0,239,0,240,0,132,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,140,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,148,1,255,255,199,0,111,0,255,255,255,255,255,255,255,255,255,255,255,255,179,2,255,255,255,255,255,255,183,2,184,2,255,255,186,2,187,2,255,255,108,3,255,255,255,255,192,2,193,2,255,255,114,3,255,255,116,3,65,1,255,255,119,3,255,255,202,2,70,1,255,255,255,255,185,1,255,255,255,255,255,255,77,1,255,255,255,255,255,255,255,255,194,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,224,2,225,2,255,255,227,2,228,2,255,255,255,255,255,255,151,3,255,255,255,255,7,1,236,2,255,255,255,255,239,2,12,1,13,1,255,255,75,1,255,255,255,255,255,255,255,255,80,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,1,199,0,240,1,255,255,255,255,255,255,132,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,140,1,255,255,255,255,20,3,255,255,255,255,255,255,24,3,148,1,255,255,255,255,255,255,255,255,255,255,31,3,255,255,255,255,255,255,255,255,255,255,65,1,255,255,255,255,255,255,255,255,70,1,255,255,255,255,255,255,255,255,255,255,255,255,77,1,78,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,59,3,255,255,255,255,185,1,255,255,255,255,255,255,255,255,67,3,7,1,255,255,255,255,194,1,160,1,12,1,13,1,255,255,255,255,255,255,166,1,167,1,255,255,255,255,170,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,1,255,255,255,255,255,255,255,255,255,255,77,2,255,255,255,255,255,255,255,255,255,255,132,1,255,255,255,255,255,255,255,255,255,255,255,255,199,1,140,1,255,255,202,1,255,255,255,255,240,1,255,255,255,255,148,1,255,255,255,255,255,255,255,255,255,255,65,1,255,255,255,255,255,255,255,255,70,1,255,255,255,255,255,255,255,255,255,255,255,255,77,1,78,1,255,255,255,255,255,255,231,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,151,3,255,255,255,255,255,255,255,255,255,255,185,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,194,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,9,2,255,255,255,255,208,1,255,255,210,1,255,255,255,255,255,255,255,255,255,255,167,2,255,255,255,255,255,255,255,255,132,1,255,255,255,255,175,2,255,255,255,255,255,255,255,255,140,1,255,255,255,255,183,2,255,255,255,255,255,255,255,255,148,1,77,2,255,255,240,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,200,2,201,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,211,2,255,255,255,255,255,255,255,255,255,255,255,255,218,2,255,255,255,255,255,255,15,2,255,255,255,255,185,1,255,255,255,255,255,255,255,255,230,2,231,2,255,255,255,255,194,1,255,255,89,2,237,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,208,1,255,255,210,1,255,255,255,255,255,255,254,2,255,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,118,2,255,255,255,255,121,2,255,255,255,255,255,255,255,255,255,255,127,2,128,2,255,255,255,255,255,255,167,2,240,1,255,255,255,255,255,255,77,2,255,255,255,255,175,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,42,3,43,3,255,255,255,255,255,255,255,255,255,255,255,255,50,3,255,255,255,255,255,255,54,3,15,2,200,2,201,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,211,2,255,255,255,255,179,2,255,255,255,255,255,255,218,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,230,2,231,2,255,255,255,255,255,255,255,255,255,255,237,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,108,3,255,255,254,2,255,2,255,255,255,255,114,3,255,255,116,3,77,2,167,2,119,3,255,255,255,255,255,255,255,255,255,255,255,255,175,2,236,2,255,255,255,255,239,2,255,255,255,255,182,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,200,2,201,2,255,255,42,3,43,3,255,255,0,0,255,255,255,255,255,255,255,255,211,2,255,255,255,255,255,255,54,3,20,3,255,255,218,2,13,0,14,0,15,0,16,0,17,0,18,0,255,255,20,0,255,255,255,255,255,255,230,2,231,2,26,0,27,0,255,255,255,255,255,255,237,2,255,255,255,255,255,255,255,255,255,255,37,0,38,0,255,255,40,0,41,0,42,0,43,0,44,0,255,255,255,255,255,255,254,2,255,2,167,2,255,255,255,255,255,255,255,255,255,255,255,255,67,3,175,2,255,255,255,255,255,255,255,255,108,3,14,3,182,2,255,255,255,255,255,255,114,3,255,255,116,3,255,255,255,255,119,3,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,200,2,201,2,255,255,255,255,255,255,88,0,255,255,255,255,255,255,42,3,43,3,211,2,255,255,255,255,255,255,255,255,255,255,50,3,218,2,255,255,255,255,54,3,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,230,2,231,2,255,255,255,255,255,255,255,255,255,255,237,2,255,255,255,255,255,255,255,255,255,255,51,0,52,0,255,255,255,255,55,0,255,255,255,255,133,0,134,0,255,255,136,0,254,2,255,2,139,0,140,0,255,255,142,0,143,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,14,3,255,255,80,0,81,0,255,255,108,3,84,0,85,0,86,0,87,0,255,255,114,3,255,255,116,3,255,255,255,255,119,3,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,42,3,43,3,255,255,255,255,255,255,255,255,255,255,255,255,50,3,255,255,255,255,255,255,54,3,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,108,3,255,255,255,255,255,255,255,255,255,255,114,3,255,255,116,3,0,0,1,0,119,3,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,255,255,255,255,255,255,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,46,0,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,0,0,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,13,0,14,0,15,0,16,0,17,0,18,0,255,255,20,0,255,255,255,255,44,0,255,255,255,255,255,255,27,0,28,0,29,0,255,255,255,255,129,0,130,0,131,0,255,255,255,255,37,0,38,0,255,255,40,0,41,0,42,0,43,0,44,0,142,0,143,0,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,255,255,255,255,255,255,255,255,71,0,72],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE),
+allocate([73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,88,0,255,255,90,0,91,0,255,255,255,255,255,255,255,255,117,0,97,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,108,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,116,0,117,0,118,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,0,0,255,255,255,255,134,0,135,0,136,0,137,0,255,255,255,255,140,0,141,0,142,0,143,0,13,0,14,0,15,0,16,0,17,0,18,0,255,255,20,0,255,255,255,255,44,0,255,255,255,255,26,0,27,0,28,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,37,0,38,0,255,255,40,0,41,0,42,0,43,0,44,0,255,255,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,88,0,255,255,255,255,91,0,255,255,255,255,255,255,255,255,117,0,97,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,137,0,117,0,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,0,0,255,255,133,0,134,0,135,0,136,0,137,0,255,255,139,0,140,0,141,0,142,0,143,0,13,0,14,0,15,0,16,0,17,0,18,0,255,255,20,0,255,255,255,255,44,0,255,255,255,255,255,255,27,0,28,0,29,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,37,0,38,0,255,255,40,0,41,0,42,0,43,0,44,0,255,255,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,88,0,255,255,255,255,91,0,255,255,255,255,255,255,255,255,117,0,97,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,108,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,117,0,118,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,0,0,255,255,255,255,134,0,135,0,136,0,137,0,255,255,255,255,140,0,141,0,142,0,143,0,13,0,14,0,15,0,16,0,17,0,18,0,255,255,20,0,255,255,255,255,255,255,255,255,255,255,26,0,27,0,28,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,37,0,38,0,255,255,40,0,41,0,42,0,43,0,44,0,255,255,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,88,0,255,255,255,255,91,0,255,255,255,255,255,255,255,255,117,0,97,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,117,0,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,0,0,255,255,133,0,134,0,135,0,136,0,137,0,255,255,139,0,140,0,141,0,142,0,143,0,13,0,14,0,15,0,16,0,17,0,18,0,255,255,20,0,255,255,255,255,255,255,255,255,255,255,255,255,27,0,28,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,37,0,38,0,255,255,40,0,41,0,42,0,43,0,44,0,255,255,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,88,0,255,255,255,255,91,0,255,255,255,255,255,255,255,255,255,255,97,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,117,0,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,0,0,255,255,255,255,134,0,135,0,136,0,137,0,255,255,139,0,140,0,141,0,142,0,143,0,13,0,14,0,15,0,255,255,17,0,18,0,255,255,20,0,255,255,255,255,255,255,255,255,255,255,26,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,37,0,38,0,255,255,40,0,41,0,42,0,43,0,44,0,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,88,0,255,255,90,0,255,255,117,0,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,116,0,117,0,143,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,0,0,255,255,133,0,134,0,135,0,136,0,137,0,255,255,255,255,140,0,255,255,142,0,143,0,13,0,14,0,15,0,255,255,17,0,18,0,255,255,20,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,37,0,38,0,255,255,40,0,41,0,42,0,43,0,44,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,255,255,80,0,81,0,255,255,255,255,255,255,255,255,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,255,255,255,255,86,0,87,0,88,0,255,255,90,0,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,116,0,117,0,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,255,255,255,255,255,255,134,0,135,0,136,0,137,0,255,255,255,255,140,0,255,255,142,0,143,0,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,255,255,255,255,18,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,129,0,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,142,0,143,0,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,15,0,255,255,17,0,18,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,129,0,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,142,0,143,0,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,15,0,255,255,255,255,18,0,19,0,20,0,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,129,0,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,142,0,143,0,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,15,0,255,255,255,255,18,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,129,0,130,0,131,0,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,142,0,143,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,46,0,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,129,0,130,0,131,0,255,255,255,255,134,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,142,0,143,0,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,14,0,15,0,255,255,255,255,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,129,0,130,0,131,0,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,142,0,143,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,129,0,130,0,131,0,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,140,0,255,255,142,0,143,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,129,0,130,0,131,0,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,140,0,255,255,142,0,143,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,129,0,130,0,131,0,255,255,255,255,134,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,142,0,143,0,1,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,15,0,255,255,255,255,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,129,0,130,0,131,0,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,142,0,143,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,129,0,130,0,131,0,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,143,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,129,0,130,0,131,0,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,142,0,143,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,129,0,130,0,131,0,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,143,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,46,0,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,142,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,129,0,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,142,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,255,255,255,255,255,255,255,255,255,255,45,0,46,0,47,0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,138,0,139,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,26,0,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,129,0,130,0,131,0,255,255,133,0,255,255,255,255,255,255,255,255,255,255,139,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,26,0,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,133,0,21,0,22,0,23,0,24,0,255,255,139,0,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,90,0,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,116,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,129,0,130,0,131,0,255,255,19,0,255,255,21,0,22,0,23,0,24,0,139,0,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,139,0,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,129,0,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,139,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,255,255,255,255,255,255,255,255,255,255,45,0,46,0,47,0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,255,255,255,255,255,255,255,255,255,255,255,255,63,0,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,105,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,138,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,255,255,255,255,255,255,255,255,255,255,45,0,46,0,47,0,48,0,49,0,50,0,51,0,52,0,53,0,54,0,55,0,56,0,255,255,255,255,255,255,255,255,255,255,255,255,63,0,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,105,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,138,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,255,255,255,255,255,255,255,255,255,255,45,0,46,0,47,0,48,0,49,0,50,0,51,0,52,0,255,255,255,255,55,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,101,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,138,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,255,255,255,255,255,255,255,255,255,255,45,0,46,0,47,0,48,0,49,0,50,0,51,0,52,0,255,255,255,255,55,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,138,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,129,0,21,0,22,0,23,0,24,0,255,255,255,255,255,255,137,0,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,129,0,21,0,22,0,23,0,24,0,255,255,255,255,255,255,137,0,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,110,0,255,255,255,255,113,0,114,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,46,0,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,110,0,255,255,255,255,113,0,114,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,45,0,255,255,47,0,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,110,0,255,255,255,255,113,0,114,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,110,0,255,255,255,255,113,0,114,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,110,0,255,255,255,255,113,0,114,0,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+10240),
+allocate([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,99,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,99,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,69,0,70,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,255,255,255,255,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,129,0,130,0,131,0,19,0,255,255,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,86,0,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,129,0,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,129,0,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,98,0,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,129,0,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,129,0,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,129,0,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,19,0,129,0,21,0,22,0,23,0,24,0,255,255,255,255,255,255,255,255,255,255,30,0,31,0,32,0,33,0,34,0,35,0,36,0,255,255,255,255,39,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48,0,49,0,255,255,51,0,52,0,53,0,54,0,55,0,56,0,255,255,58,0,59,0,60,0,255,255,255,255,63,0,255,255,255,255,66,0,67,0,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,255,255,255,255,86,0,87,0,255,255,255,255,255,255,89,0,255,255,255,255,92,0,93,0,255,255,95,0,96,0,255,255,255,255,255,255,100,0,101,0,102,0,103,0,104,0,105,0,106,0,255,255,255,255,109,0,255,255,255,255,51,0,52,0,255,255,255,255,55,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,255,255,129,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,98,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,51,0,52,0,255,255,255,255,55,0,255,255,138,0,139,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,255,255,255,255,80,0,81,0,255,255,255,255,84,0,85,0,86,0,87,0,255,255,255,255,255,255,71,0,72,0,73,0,74,0,75,0,76,0,77,0,98,0,255,255,80,0,81,0,255,255,255,255,255,255,255,255,86,0,87,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,255,255,130,0,131,0,255,255,255,255,255,255,255,255,255,255,255,255,138,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,99,0,123,2,3,1,242,0,242,0,61,1,115,1,242,0,84,2,171,1,235,0,194,0,226,1,5,1,230,0,115,0,115,0,18,2,79,1,104,2,237,1,248,0,248,0,115,0,100,0,248,0,148,1,18,1,230,0,207,2,57,2,114,2,65,1,123,2,0,1,203,1,32,1,208,1,124,1,205,1,55,2,219,2,63,2,23,2,226,2,66,2,247,0,247,0,25,1,29,1,247,0,229,2,82,2,6,3,232,2,24,1,28,1,139,2,42,1,67,0,235,0,67,0,115,0,236,0,83,2,1,3,97,2,64,1,168,2,69,3,120,2,200,2,201,2,120,2,72,3,107,2,55,2,113,1,63,2,162,255,23,1,12,3,101,2,14,3,152,2,139,1,115,0,83,2,130,3,246,2,254,2,143,3,113,1,245,0,250,0,188,254,191,1,251,0,159,255,237,254,1,1,110,1,237,254,244,1,49,254,201,0,201,0,7,1,71,1,72,1,118,1,201,0,173,2,236,0,53,2,49,254,61,2,0,1,181,2,61,2,155,255,83,2,208,0,81,1,14,1,139,1,3,0,233,0,156,255,73,1,162,255,118,1,160,255,46,254,142,2,160,255,53,2,158,255,61,2,117,1,147,1,162,255,188,254,188,254,161,255,11,1,83,2,124,3,158,255,111,1,53,2,170,255,61,2,75,1,174,2,161,255,218,2,189,1,160,1,53,2,14,2,61,2,47,254,143,3,159,255,155,255,155,255,221,2,218,2,255,2,252,0,45,254,130,3,76,1,87,3,107,1,119,1,157,255,104,1,105,1,106,1,46,254,116,1,156,255,114,1,3,3,163,255,14,1,44,254,7,3,255,0,170,255,255,0,168,2,53,2,61,2,171,1,231,0,232,0,114,1,153,2,168,2,156,3,72,3,17,3,121,1,236,2,42,3,237,1,206,2,47,254,231,0,232,0,113,2,232,0,123,2,208,1,42,254,53,2,45,254,61,2,237,253,108,1,109,1,159,255,159,255,119,254,6,3,235,0,207,1,42,1,199,1,163,255,80,1,184,3,159,1,44,254,232,0,194,1,242,0,164,255,242,0,242,0,202,1,168,255,169,1,169,1,1,3,18,1,232,0,236,0,231,0,232,0,180,1,14,3,1,3,236,0,248,0,14,3,248,0,166,255,160,255,160,255,158,255,158,255,42,254,235,0,169,255,152,2,249,2,161,255,161,255,120,3,193,1,10,2,43,254,167,255,208,1,237,253,19,2,2,1,236,0,247,0,29,3,247,0,22,3,120,2,120,2,119,254,165,255,36,3,236,253,54,254,59,1,60,1,127,1,81,0,115,0,81,0,116,0,116,0,129,1,50,254,204,0,204,0,201,0,201,0,214,0,215,2,204,0,204,0,204,0,18,1,80,2,204,0,69,2,71,2,234,254,16,2,236,0,2,1,149,1,150,1,43,254,232,0,190,1,237,1,201,1,201,1,172,1,14,3,175,1,201,1,119,254,227,2,119,254,119,254,138,1,182,1,186,1,54,254,0,2,81,0,47,3,115,0,14,1,33,1,168,255,130,1,131,1,50,254,242,0,166,255,195,1,181,1,183,1,204,0,197,1,63,3,228,2,160,255,12,2,180,1,134,3,234,254,234,254,12,2,59,3,236,253,152,2,33,1,152,2,196,1,242,0,158,3,139,3,18,2,62,2,67,0,144,3,232,0,191,3,122,1,5,2,180,1,158,255,123,1,242,0,231,0,232,0,189,255,91,2,142,1,161,255,146,1,241,2,242,0,151,1,180,1,62,2,103,2,103,2,155,1,204,0,245,2,81,0,138,2,180,1,207,1,14,1,123,2,175,255,157,1,62,2,18,3,240,253,71,1,72,1,201,0,201,0,201,0,201,0,62,2,6,2,7,2,130,2,239,253,160,1,122,2,125,1,126,1,105,3,169,1,169,1,1,2,2,2,3,2,4,2,168,255,99,0,230,0,162,1,46,3,166,255,208,1,237,2,115,2,152,2,126,3,121,3,237,1,188,3,189,1,236,0,236,0,242,0,62,2,166,1,233,253,168,255,137,2,167,1,168,255,170,1,166,255,168,255,180,1,166,255,185,1,207,1,166,255,232,0,92,2,81,1,115,0,190,255,115,0,54,254,156,255,192,1,100,2,62,2,120,2,143,1,157,2,85,2,198,1,157,2,50,254,157,2,204,1,241,1,210,1,81,0,242,1,243,1,148,3,206,1,67,0,164,255,152,2,254,1,152,2,204,0,204,0,255,1,17,2,135,2,124,2,73,2,57,1,152,1,126,2,45,1,46,1,241,2,88,2,129,2,177,2,89,2,233,253,93,2,240,253,238,1,54,254,54,254,185,2,134,2,240,253,116,2,144,1,145,1,125,2,239,253,152,2,50,254,50,254,115,0,146,2,239,253,215,1,216,1,217,1,218,1,190,2,237,1,204,0,169,2,204,0,204,0,242,1,243,1,204,0,204,0,192,2,127,2,128,2,81,0,153,1,154,1,47,1,48,1,81,0,81,0,175,255,233,253,145,2,233,253,233,253,190,2,204,0,237,253,166,2,197,2,132,2,155,2,197,2,177,2,177,2,188,2,160,255,33,1,204,2,159,2,190,2,178,3,161,2,194,2,162,2,165,2,194,2,164,2,3,255,197,2,190,2,179,2,182,2,83,2,183,2,217,2,220,2,168,255,220,2,213,2,208,2,188,2,180,2,194,2,234,2,146,2,220,2,215,1,216,1,217,1,218,1,81,0,204,0,204,0,204,0,204,0,81,0,204,0,204,0,230,0,248,2,204,0,187,1,81,0,33,1,190,2,204,0,12,2,169,1,37,3,218,2,236,0,207,1,114,3,19,2,211,1,253,2,25,3,27,3,116,3,242,2,189,2,193,2,32,3,34,3,235,2,243,2,253,1,31,3,196,2,45,1,46,1,199,2,250,2,204,0,9,3,53,2,253,2,52,1,54,1,56,1,58,1,204,0,204,0,81,1,53,2,2,255,61,2,158,255,144,1,188,1,236,0,45,3,209,2,161,255,24,3,204,0,54,3,81,0,204,0,201,0,30,3,212,1,213,1,58,3,44,1,81,0,45,1,46,1,166,255,204,0,125,3,50,3,201,1,81,0,169,255,205,2,47,1,48,1,204,0,115,0,146,2,60,3,215,1,216,1,217,1,218,1,67,3,44,3,177,2,70,3,73,3,77,3,79,3,201,0,48,3,74,3,102,1,103,1,104,1,105,1,106,1,52,3,97,3,244,2,56,3,81,3,83,3,86,3,48,254,233,2,81,0,88,3,244,254,47,1,48,1,103,2,81,1,100,3,251,2,81,0,146,2,219,1,215,1,216,1,217,1,218,1,89,3,169,1,221,1,253,2,10,3,94,1,95,1,33,1,93,3,33,1,95,3,204,0,19,3,102,3,236,0,1,255,103,3,157,2,157,2,107,3,157,2,236,0,157,2,157,2,117,3,118,3,222,1,123,3,157,2,48,254,48,254,157,2,157,2,244,254,244,254,147,2,131,3,39,3,40,3,81,0,132,3,115,0,236,0,102,1,103,1,104,1,105,1,106,1,127,3,137,3,215,1,216,1,217,1,218,1,140,3,53,3,81,1,0,255,214,1,146,3,215,1,216,1,217,1,218,1,147,3,175,3,149,3,61,3,62,3,157,3,33,1,94,1,95,1,161,3,65,3,165,3,167,3,115,0,201,0,172,3,220,2,183,3,98,0,237,253,98,0,236,253,194,3,131,2,68,3,98,0,98,0,75,3,76,3,120,0,57,3,98,0,98,0,98,0,198,2,219,1,98,0,160,2,212,0,163,2,5,3,220,1,221,1,8,3,101,1,102,1,103,1,104,1,105,1,106,1,233,254,182,3,236,0,247,2,38,3,13,3,159,3,185,3,236,0,248,1,181,3,45,1,46,1,141,3,98,0,170,2,222,1,204,0,81,0,223,1,197,0,104,3,214,1,2,3,215,1,216,1,217,1,218,1,98,0,106,3,138,3,150,3,224,1,115,3,157,2,157,2,157,2,157,2,108,3,157,2,157,2,242,0,135,1,157,2,0,0,157,2,157,2,233,254,233,254,0,0,0,0,204,0,180,1,0,0,91,2,220,2,190,2,0,0,47,1,48,1,130,1,131,1,0,0,219,1,51,1,45,1,46,1,62,2,0,0,220,1,221,1,53,1,45,1,46,1,0,0,98,0,0,0,98,0,151,3,152,3,0,0,55,1,45,1,46,1,0,0,0,0,0,0,157,2,157,2,157,2,157,2,157,2,0,0,153,3,222,1,154,3,0,0,223,1,155,3,157,2,0,0,0,0,214,1,0,0,215,1,216,1,217,1,218,1,81,0,0,0,0,0,0,0,47,1,48,1,232,0,0,0,81,0,0,0,0,0,47,1,48,1,0,0,0,0,33,1,204,0,0,0,0,0,204,0,204,0,47,1,48,1,0,0,0,0,204,0,204,0,238,1,45,1,46,1,0,0,0,0,0,0,81,0,81,0,219,1,0,0,250,1,45,1,46,1,0,0,220,1,221,1,0,0,81,0,251,1,45,1,46,1,0,0,243,0,243,0,81,0,0,0,243,0,204,0,0,0,133,3,98,0,135,3,252,1,45,1,46,1,136,3,81,0,81,0,0,0,222,1,98,0,98,0,223,1,81,0,0,0,142,3,0,0,145,3,47,1,48,1,0,0,8,1,10,1,0,0,0,0,210,2,243,0,243,0,47,1,48,1,81,0,81,0,239,1,0,0,0,0,0,0,47,1,48,1,62,1,63,1,249,1,0,0,0,0,249,1,0,0,249,1,92,3,249,1,0,0,249,1,47,1,48,1,0,0,98,0,0,0,98,0,98,0,0,0,0,0,98,0,98,0,0,0,0,0,204,0,98,0,0,0,0,0,0,0,0,0,98,0,98,0,0,0,0,0,0,0,81,0,81,0,0,0,98,0,0,0,0,0,0,0,0,0,111,3,186,3,0,0,0,0,81,0,187,3,0,0,189,3,0,0,0,0,0,0,0,0,190,3,214,1,0,0,215,1,216,1,217,1,218,1,0,0,0,0,78,3,80,3,81,1,82,3,0,0,84,3,85,3,0,0,0,0,0,0,0,0,90,3,0,0,198,3,94,3,96,3,0,0,94,1,95,1,98,0,98,0,98,0,98,0,98,0,98,0,98,0,98,0,0,0,0,0,98,0,0,0,98,0,0,0,219,1,98,0,0,0,0,0,81,0,0,0,220,1,221,1,0,0,0,0,81,0,0,0,81,0,0,0,0,0,81,0,0,0,0,0,0,0,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,0,0,0,0,98,0,0,0,222,1,0,0,0,0,223,1,0,0,0,0,98,0,98,0,0,0,0,0,146,2,0,0,215,1,216,1,217,1,218,1,204,0,0,0,0,0,0,0,98,0,0,0,98,0,98,0,146,2,0,0,215,1,216,1,217,1,218,1,98,0,0,0,0,0,0,0,98,0,0,0,0,0,0,0,98,0,0,0,0,0,0,0,0,0,98,0,0,0,0,0,0,0,243,0,243,0,243,0,62,1,147,2,66,1,67,1,68,1,69,1,70,1,148,2,0,0,0,0,0,0,243,0,0,0,243,0,243,0,147,2,0,0,160,3,162,3,163,3,164,3,71,3,166,3,168,3,0,0,98,0,171,3,0,0,173,3,174,3,0,0,0,0,0,0,0,0,98,0,0,0,0,0,0,0,78,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,213,0,0,0,0,0,98,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,3,193,3,195,3,196,3,197,3,0,0,0,0,0,0,0,0,0,0,98,0,0,0,199,3,0,0,78,0,0,0,0,0,0,0,0,0,0,0,243,0,0,0,0,0,0,0,0,0,21,2,24,2,25,2,26,2,27,2,28,2,29,2,30,2,31,2,32,2,33,2,34,2,35,2,36,2,37,2,38,2,39,2,40,2,41,2,42,2,43,2,44,2,45,2,46,2,47,2,48,2,49,2,0,0,243,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,70,2,72,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,0,0,0,78,0,0,0,0,0,95,0,0,0,95,0,0,0,0,0,0,0,0,0,94,2,0,0,243,0,0,0,70,2,72,2,0,0,0,0,0,0,0,0,0,0,243,0,0,0,0,0,0,0,98,0,98,0,0,0,243,0,0,0,0,0,0,0,0,0,0,0,243,0,243,0,0,0,0,0,243,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133,2,0,0,98,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,0,0,0,0,0,243,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,0,0,0,0,0,0,0,0,0,0,0,0,0,26,1,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,243,0,94,0,117,0,117,0,117,0,0,0,0,0,0,0,0,0,0,0,216,0,0,0,0,0,95,0,0,0,0,0,0,0,98,0,0,0,0,0,0,0,0,0,0,0,171,2,172,2,98,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,98,0,243,0,0,0,98,0,98,0,0,0,0,0,0,0,0,0,98,0,98,0,0,0,94,0,0,0,0,0,0,0,34,1,98,0,98,0,0,0,78,0,0,0,0,0,0,0,0,0,78,0,78,0,0,0,98,0,0,0,0,0,0,0,0,0,0,0,0,0,98,0,0,0,0,0,98,0,0,0,34,1,0,0,0,0,0,0,0,0,0,0,0,0,98,0,98,0,0,0,0,0,0,0,0,0,0,0,98,0,97,0,0,0,97,0,118,0,118,0,0,0,0,0,0,0,0,0,0,0,0,0,217,0,0,0,95,0,0,0,0,0,98,0,98,0,0,0,0,0,94,0,0,0,0,0,78,0,0,0,0,0,243,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,0,0,0,0,20,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,0,0,0,0,98,0,35,1,0,0,0,0,0,0,0,0,243,0,0,0,0,0,243,0,0,0,98,0,98,0,0,0,0,0,243,0,243,0,0,0,0,0,0,0,0,0,0,0,0,0,98,0,0,0,35,1,0,0,0,0,95,0,0,0,0,0,0,0,0,0,95,0,95,0,0,0,0,0,0,0,163,1,164,1,165,1,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,0,0,94,0,97,0,0,0,0,0,0,0,0,0,0,0,0,0,243,0,0,0,0,0,0,0,94,2,23,3,0,0,26,3,28,3,0,0,98,0,0,0,0,0,33,3,35,3,0,0,98,0,0,0,98,0,95,0,0,0,98,0,0,0,41,3,95,0,0,0,0,0,78,0,0,0,0,0,0,0,95,0,0,0,0,0,0,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,3,28,3,0,0,33,3,35,3,0,0,0,0,0,0,98,0,0,0,0,0,94,0,243,0,0,0,0,0,243,0,94,0,94,0,0,0,11,2,0,0,0,0,0,0,0,0,22,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,1,97,0,78,0,0,0,0,0,0,0,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,95,0,0,0,0,0,243,0,0,0,0,0,0,0,99,3,95,0,0,0,0,0,0,0,0,0,0,0,101,3,0,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,34,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,101,3,0,0,0,0,95,0,0,0,0,0,0,0,0,0,243,0,97,0,0,0,0,0,95,0,22,2,97,0,97,0,0,0,0,0,0,0,117,2,119,2,0,0,0,0,26,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,1,0,0,0,0,0,0,0,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,119,2,94,0,0,0,26,1,0,0,0,0,95,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,97,0,0,0,0,0,0,0,0,0,97,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,35,1,0,0,0,0,0,0,158,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,0,0,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,2,0,0,0,0,34,1,0,0,34,1,0,0,0,0,0,0,0,0,0,0,78,0,0,0,0,0,0,0,0,0,97,0,0,0,0,0,78,0,0,0,0,0,0,0,0,0,97,0,0,0,0,0,20,2,0,0,0,0,0,0,0,0,97,0,95,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,0,0,0,0,0,0,34,1,0,0,0,0,97,0,0,0,0,0,0,0,0,0,78,0,78,0,0,0,0,0,97,0,0,0,214,2,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,1,0,0,35,1,0,0,0,0,0,0,78,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,238,2,0,0,0,0,240,2,0,0,0,0,0,0,0,0,0,0,119,2,26,1,0,0,0,0,0,0,95,0,97,0,0,0,0,0,0,0,94,0,0,0,0,0,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,110,3,0,0,0,0,0,0,78,0,35,1,95,0,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,95,0,0,0,0,0,21,3,0,0,0,0,0,0,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,95,0,95,0,0,0,0,0,0,0,0,0,0,0,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,0,0,95,0,95,0,0,0,0,0,78,0,0,0,78,0,97,0,94,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,64,3,0,0,0,0,66,3,0,0,0,0,34,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,94,0,0,0,95,0,95,0,0,0,213,253,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,95,0,98,3,0,0,94,0,213,253,213,253,213,253,213,253,213,253,213,253,0,0,213,253,0,0,0,0,0,0,94,0,94],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+20480),allocate([213,253,213,253,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,213,253,213,253,0,0,213,253,213,253,213,253,213,253,213,253,0,0,0,0,0,0,94,0,94,0,97,0,0,0,0,0,0,0,0,0,0,0,0,0,26,1,97,0,0,0,0,0,0,0,0,0,95,0,117,0,35,1,0,0,0,0,0,0,95,0,0,0,95,0,0,0,0,0,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,97,0,0,0,0,0,0,0,213,253,0,0,0,0,0,0,94,0,94,0,97,0,0,0,0,0,0,0,0,0,0,0,112,3,97,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,97,0,0,0,0,0,0,0,0,0,0,0,97,0,0,0,0,0,0,0,0,0,0,0,50,2,51,2,0,0,0,0,52,2,0,0,0,0,213,253,213,253,0,0,213,253,97,0,97,0,255,0,213,253,0,0,213,253,213,253,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,118,0,0,0,173,0,174,0,0,0,94,0,175,0,176,0,177,0,178,0,0,0,94,0,0,0,94,0,0,0,0,0,94,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,97,0,0,0,0,0,0,0,0,0,0,0,0,0,113,3,0,0,0,0,0,0,97,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,0,0,0,0,0,0,0,0,0,0,97,0,0,0,97,0,213,253,4,0,97,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,29,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,234,254,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,234,254,234,254,234,254,234,254,234,254,234,254,0,0,234,254,0,0,0,0,202,2,0,0,0,0,0,0,234,254,234,254,234,254,0,0,0,0,61,0,62,0,63,0,0,0,0,0,234,254,234,254,0,0,234,254,234,254,234,254,234,254,234,254,213,253,213,253,0,0,0,0,0,0,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,89,1,90,1,91,1,92,1,93,1,0,0,0,0,94,1,95,1,0,0,0,0,0,0,0,0,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,0,0,0,0,234,254,234,254,234,254,0,0,225,2,234,254,0,0,0,0,0,0,0,0,96,1,234,254,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,234,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,157,255,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,0,0,0,0,120,254,0,0,0,0,234,254,234,254,234,254,234,254,0,0,0,0,234,254,234,254,234,254,234,254,120,254,120,254,120,254,120,254,120,254,120,254,0,0,120,254,0,0,0,0,184,2,0,0,0,0,120,254,120,254,120,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,120,254,120,254,0,0,120,254,120,254,120,254,120,254,120,254,0,0,0,0,0,0,0,0,0,0,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,89,1,90,1,91,1,92,1,93,1,0,0,0,0,94,1,95,1,0,0,0,0,0,0,0,0,120,254,120,254,120,254,120,254,120,254,120,254,120,254,120,254,120,254,120,254,120,254,120,254,120,254,0,0,0,0,120,254,120,254,120,254,0,0,0,0,120,254,0,0,0,0,0,0,0,0,96,1,120,254,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,255,120,254,0,0,120,254,120,254,120,254,120,254,120,254,120,254,120,254,120,254,120,254,120,254,0,0,0,0,243,254,0,0,120,254,120,254,120,254,120,254,120,254,0,0,255,0,120,254,120,254,120,254,120,254,243,254,243,254,243,254,243,254,243,254,243,254,0,0,243,254,0,0,0,0,184,2,0,0,0,0,0,0,243,254,243,254,243,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,254,243,254,0,0,243,254,243,254,243,254,243,254,243,254,0,0,0,0,0,0,0,0,0,0,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,89,1,90,1,91,1,92,1,93,1,0,0,0,0,94,1,95,1,0,0,0,0,0,0,0,0,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,0,0,0,0,243,254,243,254,243,254,0,0,0,0,243,254,0,0,0,0,0,0,0,0,96,1,243,254,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,243,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,243,254,0,0,0,0,213,253,0,0,0,0,243,254,243,254,243,254,243,254,0,0,0,0,243,254,243,254,243,254,243,254,213,253,213,253,213,253,213,253,213,253,213,253,0,0,213,253,0,0,0,0,0,0,0,0,0,0,213,253,213,253,213,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,213,253,213,253,0,0,213,253,213,253,213,253,213,253,213,253,0,0,0,0,0,0,0,0,0,0,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,89,1,90,1,91,1,92,1,93,1,0,0,0,0,94,1,95,1,0,0,0,0,0,0,0,0,213,253,213,253,213,253,213,253,213,253,213,253,213,253,213,253,213,253,213,253,213,253,213,253,213,253,0,0,0,0,213,253,213,253,213,253,0,0,0,0,213,253,0,0,0,0,0,0,0,0,96,1,213,253,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,213,253,0,0,213,253,213,253,213,253,213,253,213,253,213,253,213,253,213,253,213,253,213,253,0,0,0,0,227,254,0,0,213,253,213,253,213,253,213,253,213,253,0,0,255,0,213,253,213,253,213,253,213,253,227,254,227,254,227,254,227,254,227,254,227,254,0,0,227,254,0,0,0,0,0,0,0,0,0,0,0,0,227,254,227,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,254,227,254,0,0,227,254,227,254,227,254,227,254,227,254,0,0,0,0,0,0,0,0,0,0,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,89,1,90,1,91,1,212,253,212,253,0,0,0,0,94,1,95,1,0,0,0,0,0,0,0,0,227,254,227,254,227,254,227,254,227,254,227,254,227,254,227,254,227,254,227,254,227,254,227,254,227,254,0,0,0,0,227,254,227,254,227,254,0,0,0,0,227,254,0,0,0,0,0,0,0,0,0,0,227,254,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,254,0,0,227,254,227,254,227,254,227,254,227,254,227,254,227,254,227,254,227,254,227,254,0,0,0,0,233,253,0,0,0,0,227,254,227,254,227,254,227,254,0,0,252,0,227,254,227,254,227,254,227,254,233,253,233,253,233,253,0,0,233,253,233,253,0,0,233,253,0,0,0,0,0,0,0,0,0,0,233,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,253,233,253,0,0,233,253,233,253,233,253,233,253,233,253,0,0,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,89,1,90,1,91,1,92,1,93,1,0,0,0,0,94,1,95,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,253,233,253,233,253,233,253,233,253,233,253,233,253,233,253,233,253,233,253,233,253,233,253,233,253,0,0,0,0,233,253,233,253,233,253,0,0,186,2,0,0,96,1,0,0,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,159,255,233,253,232,0,233,253,233,253,233,253,233,253,233,253,233,253,233,253,233,253,233,253,233,253,0,0,0,0,234,254,0,0,233,253,233,253,233,253,233,253,167,255,0,0,0,0,233,253,0,0,233,253,233,253,234,254,234,254,234,254,0,0,234,254,234,254,0,0,234,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,234,254,234,254,0,0,234,254,234,254,234,254,234,254,234,254,81,1,82,1,83,1,84,1,85,1,86,1,87,1,88,1,0,0,90,1,91,1,0,0,0,0,0,0,0,0,94,1,95,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,0,0,0,0,234,254,234,254,234,254,0,0,187,2,0,0,0,0,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,157,255,234,254,0,0,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,234,254,0,0,0,0,0,0,0,0,0,0,234,254,234,254,234,254,165,255,0,0,0,0,234,254,0,0,234,254,234,254,12,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,213,253,213,253,213,253,0,0,0,0,213,253,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,61,0,62,0,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,213,253,213,253,12,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,213,253,0,0,213,253,213,253,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,61,0,62,0,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,213,253,213,253,12,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,213,253,0,0,0,0,213,253,15,0,213,253,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,61,0,62,0,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,213,253,213,253,12,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,213,253,0,0,0,0,213,253,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,61,0,62,0,63,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,213,253,213,253,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,29,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,61,0,62,0,63,0,0,0,0,0,213,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,213,253,213,253,12,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,213,253,213,253,0,0,0,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,12,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,61,0,62,0,63,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,213,253,213,253,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,13,1,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,12,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,61,0,62,0,63,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,213,253,0,0,213,253,213,253,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,12,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,61,0,62,0,63,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,213,253,0,0,213,253,213,253,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,61,0,62,0,63,0,0,0,0,0,213,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,213,253,213,253,12,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,213,253,0,0,0,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,61,0,62,0,63,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,213,253,213,253,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,238,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,239,0,240,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,61,0,241,0,63,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,232,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,61,0,62,0,63,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,231,0,232,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,61,0,62,0,63,0,0,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,232,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,29,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,0,0,61,0,62,0,63,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,162,1,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,61,0,62,0,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,162,1,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0,131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143,0,144,0,0,0,0,0,0,0,145,0,146,0,147,0,148,0,149,0,150,0,151,0,152,0,153,0,154,0,0,0,0,0,0,0,0,0,0,0,155,0,156,0,157,0,158,0,159,0,160,0,161,0,162,0,35,0,36,0,163,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,193,0,240,253,240,253,240,253,240,253,240,253,240,253,240,253,240,253,240,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,253,0,0,240,253,240,253,240,253,240,253,0,0,240,253,0,0,0,0,0,0,240,253,240,253,240,253,240,253,240,253,240,253,240,253,0,0,0,0,240,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,253,240,253,0,0,240,253,240,253,240,253,240,253,240,253,240,253,240,253,240,253,240,253,240,253,0,0,0,0,240,253,0,0,0,0,240,253,240,253,0,0,240,253,240,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,253,0,0,0,0,240,253,240,253,0,0,240,253,240,253,0,0,240,253,240,253,240,253,240,253,240,253,240,253,240,253,240,253,240,253,0,0,0,0,240,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,253,240,253,240,253,0,0,240,253,0,0,0,0,0,0,0,0,0,0,240,253,239,253,239,253,239,253,239,253,239,253,239,253,239,253,239,253,239,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,239,253,0,0,239,253,239,253,239,253,239,253,0,0,239,253,0,0,0,0,0,0,239,253,239,253,239,253,239,253,239,253,239,253,239,253,0,0,0,0,239,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,239,253,239,253,0,0,239,253,239,253,239,253,239,253,239,253,239,253,239,253,239,253,239,253,239,253,0,0,0,0,239,253,0,0,0,0,239,253,239,253,0,0,239,253,239,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,239,253,0,0,0,0,239,253,239,253,0,0,239,253,239,253,0,0,239,253,239,253,239,253,239,253,239,253,239,253,239,253,239,253,239,253,0,0,0,0,239,253,0,0,0,0,0,0,0,0,0,0,0,0,237,253,237,253,237,253,237,253,237,253,237,253,237,253,237,253,237,253,0,0,0,0,0,0,0,0,239,253,239,253,239,253,237,253,239,253,237,253,237,253,237,253,237,253,0,0,239,253,0,0,0,0,0,0,237,253,237,253,237,253,237,253,237,253,237,253,237,253,0,0,0,0,237,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,237,253,237,253,0,0,237,253,237,253,237,253,237,253,237,253,237,253,237,253,237,253,237,253,237,253,0,0,0,0,237,253,0,0,0,0,237,253,237,253,0,0,237,253,237,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,237,253,224,2,0,0,237,253,237,253,0,0,237,253,237,253,0,0,237,253,237,253,237,253,237,253,237,253,237,253,237,253,237,253,237,253,0,0,0,0,237,253,0,0,0,0,0,0,0,0,0,0,0,0,159,255,235,253,235,253,235,253,235,253,235,253,235,253,235,253,235,253,235,253,0,0,0,0,0,0,237,253,237,253,237,253,0,0,235,253,0,0,235,253,235,253,235,253,235,253,237,253,0,0,0,0,0,0,0,0,235,253,235,253,235,253,235,253,235,253,235,253,235,253,0,0,0,0,235,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,235,253,235,253,0,0,235,253,235,253,235,253,235,253,235,253,235,253,235,253,235,253,235,253,235,253,0,0,0,0,235,253,0,0,0,0,235,253,235,253,0,0,235,253,235,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,235,253,0,0,0,0,235,253,235,253,0,0,235,253,235,253,0,0,235,253,235,253,235,253,235,253,235,253,235,253,235,253,235,253,235,253,0,0,0,0,235,253,0,0,0,0,0,0,0,0,0,0,0,0,234,253,234,253,234,253,234,253,234,253,234,253,234,253,234,253,234,253,0,0,0,0,0,0,0,0,235,253,235,253,235,253,234,253,0,0,234,253,234,253,234,253,234,253,0,0,235,253,0,0,0,0,0,0,234,253,234,253,234,253,234,253,234,253,234,253,234,253,0,0,0,0,234,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,234,253,234,253,0,0,234,253,234,253,234,253,234,253,234,253,234,253,234,253,234,253,234,253,234,253,0,0,0,0,234,253,0,0,0,0,234,253,234,253,0,0,234,253,234,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,234,253,0,0,0,0,234,253,234,253,0,0,234,253,234,253,0,0,234,253,234,253,234,253,234,253,234,253,234,253,234,253,234,253,234,253,0,0,0,0,234,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,234,253,234,253,234,253,0,0,0,0,0,0,0,0,0,0,0,0,0,0,234,253,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0,131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143,0,144,0,0,0,0,0,0,0,145,0,146,0,147,0,218,0,219,0,220,0,221,0,152,0,153,0,154,0,0,0,0,0,0,0,0,0,0,0,155,0,156,0,157,0,222,0,223,0,160,0,224,0,162,0,37,1,38,1,225,0,39,1,0,0,0,0,0,0,0,0,0,0,0,0,40,1,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,41,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0,131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143,0,144,0,0,0,0,0,0,0,145,0,146,0,147,0,218,0,219,0,220,0,221,0,152,0,153,0,154,0,0,0,0,0,0,0,0,0,0,0,155,0,156,0,157,0,222,0,223,0,160,0,224,0,162,0,37,1,38,1,225,0,39,1,0,0,0,0,0,0,0,0,0,0,0,0,40,1,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,156,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0,131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143,0,144,0,0,0,0,0,0,0,145,0,146,0,147,0,218,0,219,0,220,0,221,0,152,0,153,0,154,0,0,0,0,0,0,0,0,0,0,0,155,0,156,0,157,0,222,0,223,0,160,0,224,0,162,0,0,0,0,0,225,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,129,0,130,0,131,0,132,0,133,0,134,0,135,0,136,0,137,0,138,0,139,0,140,0,141,0,142,0,143,0,144,0,0,0,0,0,0,0,145,0,146,0,147,0,218,0,219,0,220,0,221,0,152,0,153,0,154,0,0,0,0,0,0,0,0,0,0,0,155,0,156,0,157,0,222,0,223,0,160,0,224,0,162,0,0,0,0,0,225,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,1,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,112,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,31,1,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,1,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,112,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,15,2,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,238,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,118,2,240,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,241,1,0,0,0,0,242,1,243,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,29,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,62,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,238,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,118,2,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,241,1,0,0,0,0,242,1,243,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,30,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,62,0,63],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+30720),
+allocate([15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,239,2,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,241,1,0,0,0,0,242,1,243,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,20,3,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,241,1,0,0,0,0,242,1,243,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,118,2,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,241,1,0,0,0,0,242,1,243,1,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,238,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,239,0,240,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,238,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,239,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,238,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,240,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,238,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,9,2,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,239,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,9,2,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,62,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,16,0,17,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,45,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,61,0,241,0,63,0,15,0,0,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,107,0,34,0,35,0,36,0,108,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,109,0,0,0,0,0,110,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,112,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,211,0,0,0,0,0,48,0,49,0,0,0,50,0,51,0,0,0,52,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,112,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,1,0,0,0,0,77,1,49,0,0,0,50,0,51,0,0,0,78,1,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,112,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,107,0,34,0,35,0,36,0,108,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,110,0,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,112,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,1,0,0,0,0,77,1,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,112,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,91,3,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,112,0,101,0,102,0,18,0,19,0,0,0,0,0,0,0,0,0,0,0,103,0,104,0,105,0,23,0,24,0,25,0,26,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,32,0,0,0,33,0,34,0,35,0,36,0,37,0,38,0,0,0,39,0,40,0,41,0,0,0,0,0,42,0,0,0,0,0,43,0,44,0,0,0,81,1,212,253,212,253,212,253,212,253,86,1,87,1,0,0,0,0,212,253,212,253,0,0,0,0,0,0,0,0,94,1,95,1,0,0,0,0,0,0,109,3,0,0,0,0,111,0,49,0,0,0,50,0,51,0,0,0,0,0,0,0,53,0,54,0,55,0,56,0,57,0,58,0,59,0,0,0,0,0,60,0,0,0,0,0,58,2,59,2,0,0,0,0,60,2,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,0,0,0,0,112,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,78,2,51,2,0,0,0,0,79,2,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,64,2,59,2,0,0,0,0,65,2,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,95,2,51,2,0,0,0,0,96,2,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,98,2,59,2,0,0,0,0,99,2,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,105,2,51,2,0,0,0,0,106,2,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,108,2,59,2,0,0,0,0,109,2,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,140,2,51,2,0,0,0,0,141,2,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,143,2,59,2,0,0,0,0,144,2,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,169,3,51,2,0,0,0,0,170,3,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,176,3,51,2,0,0,0,0,177,3,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,179,3,59,2,0,0,0,0,180,3,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,64,2,59,2,0,0,0,0,65,2,0,0,192,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,0,165,0,166,0,167,0,168,0,169,0,170,0,171,0,172,0,0,0,0,0,173,0,174,0,0,0,0,0,175,0,176,0,177,0,178,0,0,0,0,0,0,0,81,1,82,1,83,1,84,1,85,1,86,1,87,1,179,0,0,0,90,1,91,1,0,0,0,0,0,0,0,0,94,1,95,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,180,0,181,0,182,0,183,0,184,0,185,0,186,0,187,0,188,0,189,0,0,0,190,0,191,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,97,1,98,1,99,1,100,1,101,1,102,1,103,1,104,1,105,1,106,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,14,1,0,0,0,0,40,1,43,1,0,0,0,0,28,2,64,1,65,1,66,1,67,1,26,1,248,0,248,0,210,1,209,1,211,1,212,1,30,2,0,0,10,0,0,0,214,1,213,1,202,1,18,2,204,1,203,1,206,1,205,1,198,1,199,1,158,1,159,1,215,1,216,1,0,0,0,0,0,0,0,0,16,1,43,2,43,2,78,0,35,1,0,0,0,0,0,0,0,0,0,0,0,0,173,1,0,0,0,0,0,0,3,0,28,2,6,0,9,0,27,0,39,0,42,0,50,0,49,0,0,0,66,0,0,0,70,0,80,0,0,0,47,0,229,0,0,0,51,0,33,1,6,1,7,1,8,1,9,1,10,1,156,1,155,1,187,1,157,1,154,1,208,1,0,0,11,1,12,1,248,0,5,0,8,0,64,1,65,1,26,1,29,1,136,1,0,0,102,0,103,0,0,0,0,0,0,0,0,0,105,0,217,1,68,1,0,0,208,1,12,1,0,0,56,1,156,0,166,0,157,0,153,0,182,0,183,0,184,0,185,0,164,0,179,0,172,0,162,0,161,0,177,0,160,0,159,0,155,0,180,0,154,0,167,0,171,0,173,0,165,0,158,0,174,0,181,0,176,0,175,0,168,0,178,0,163,0,152,0,170,0,169,0,151,0,149,0,150,0,146,0,147,0,148,0,107,0,109,0,108,0,141,0,142,0,138,0,120,0,121,0,122,0,129,0,126,0,128,0,123,0,124,0,143,0,144,0,130,0,131,0,135,0,125,0,127,0,117,0,118,0,119,0,132,0,133,0,134,0,136,0,137,0,139,0,140,0,145,0,8,2,58,1,110,0,111,0,7,2,0,0,0,0,0,0,48,0,0,0,0,0,0,0,208,1,0,0,12,1,0,0,0,0,0,0,0,0,79,1,78,1,0,0,0,0,208,1,12,1,175,0,168,0,178,0,163,0,146,0,147,0,107,0,108,0,0,0,112,0,114,0,20,0,113,0,37,2,39,2,28,2,0,0,41,2,38,2,29,2,0,0,0,0,0,0,0,0,243,0,230,0,253,0,64,0,247,0,43,2,43,2,12,2,65,0,63,0,30,2,62,0,0,0,43,2,135,1,61,0,30,2,0,0,31,2,18,0,0,0,0,0,207,0,0,0,208,0,23,1,0,0,0,0,0,0,28,2,15,0,30,2,68,0,14,0,0,0,30,2,0,0,34,2,34,2,231,0,0,0,0,0,34,2,10,2,0,0,0,0,76,0,0,0,86,0,93,0,236,1,192,1,191,1,193,1,194,1,0,0,190,1,189,1,171,1,165,1,164,1,167,1,0,0,0,0,162,1,185,1,0,0,196,1,0,0,160,1,0,0,169,1,0,0,200,1,201,1,46,0,222,0,223,0,4,0,29,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,123,1,125,1,0,0,82,0,0,0,74,0,71,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,2,0,0,27,2,26,2,0,0,140,1,138,1,34,1,0,0,0,0,129,1,55,0,32,1,53,1,102,0,103,0,104,0,200,1,201,1,218,1,51,1,0,0,43,2,0,0,0,0,0,0,59,1,61,1,0,0,43,2,23,1,70,1,0,0,69,1,0,0,0,0,43,2,0,0,0,0,0,0,0,0,0,0,0,0,23,1,0,0,43,2,0,0,48,1,0,0,115,0,174,1,0,0,0,0,0,0,42,2,15,2,254,0,250,0,0,0,0,0,244,0,252,0,0,0,245,0,30,2,0,0,28,1,249,0,30,2,239,0,43,2,43,2,238,0,30,2,31,1,45,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,30,2,21,1,13,0,29,2,67,0,17,1,20,1,24,1,36,2,232,0,35,2,36,2,234,0,25,1,11,2,92,0,84,0,0,0,79,0,0,0,0,0,43,2,0,0,242,1,239,1,238,1,237,1,240,1,0,0,255,1,3,2,2,2,254,1,236,1,36,1,120,1,241,1,243,1,245,1,43,2,0,0,252,1,43,2,1,2,43,2,0,0,235,1,195,1,0,0,0,0,178,1,183,1,182,1,168,1,176,1,0,0,180,1,172,1,163,1,186,1,197,1,161,1,170,1,0,0,0,0,7,0,21,0,22,0,23,0,24,0,25,0,43,0,44,0,43,2,0,0,28,0,37,0,0,0,38,0,30,2,0,0,72,0,83,0,41,0,40,0,0,0,186,0,253,0,36,0,204,0,212,0,217,0,218,0,219,0,214,0,216,0,226,0,227,0,220,0,221,0,197,0,198,0,224,0,225,0,30,2,213,0,215,0,209,0,210,0,211,0,199,0,200,0,201,0,202,0,203,0,19,2,24,2,20,2,25,2,134,1,248,0,132,1,30,2,19,2,21,2,20,2,22,2,133,1,248,0,19,2,20,2,248,0,43,2,43,2,29,0,188,0,35,0,196,0,53,0,56,0,0,0,0,0,0,0,102,0,103,0,106,0,0,0,30,2,43,2,0,0,30,2,236,1,0,0,15,1,43,2,43,2,146,1,43,2,71,1,186,0,23,2,20,2,30,2,19,2,20,2,43,2,73,1,41,1,72,1,44,1,23,2,22,1,30,2,19,2,20,2,0,0,0,0,40,2,175,1,0,0,0,0,47,1,14,2,0,0,255,0,251,0,0,0,43,2,13,2,27,1,32,2,235,0,240,0,242,0,30,1,19,0,0,0,26,0,195,0,69,0,16,0,30,2,34,2,85,0,77,0,89,0,91,0,30,2,19,2,20,2,247,1,242,1,0,0,91,1,82,1,84,1,30,2,80,1,30,2,0,0,0,0,228,1,6,2,248,1,0,0,231,1,0,2,0,0,233,1,4,2,188,1,0,0,0,0,177,1,179,1,181,1,205,0,206,0,111,1,30,2,0,0,109,1,108,1,5,1,0,0,81,0,75,0,0,0,0,0,0,0,0,0,0,0,0,0,131,1,59,0,0,0,137,1,0,0,0,0,237,0,130,1,57,0,236,0,126,1,52,0,0,0,0,0,0,0,43,2,54,1,0,0,0,0,137,1,57,1,9,2,236,1,0,0,0,0,62,1,147,1,148,1,43,2,149,1,0,0,43,2,76,1,0,0,0,0,74,1,0,0,0,0,137,1,0,0,0,0,0,0,0,0,0,0,137,1,0,0,116,0,46,1,0,0,0,0,0,1,0,0,1,1,246,0,43,2,11,0,18,1,233,0,87,0,30,2,0,0,89,1,0,0,244,1,0,0,113,1,0,0,0,0,37,1,246,1,43,2,43,2,5,2,43,2,253,1,43,2,43,2,166,1,0,0,30,2,0,0,43,2,0,0,250,1,43,2,43,2,107,1,0,0,0,0,3,1,73,0,187,0,0,0,34,0,193,0,33,0,194,0,60,0,33,2,0,0,31,0,191,0,32,0,192,0,58,0,127,1,128,1,0,0,0,0,189,0,0,0,0,0,219,1,52,1,30,2,0,0,221,1,236,1,0,0,0,0,151,1,77,1,0,0,12,0,153,1,0,0,38,1,0,0,39,1,0,0,0,0,49,1,255,0,43,2,2,1,241,0,81,1,92,1,0,0,87,1,83,1,119,1,0,0,0,0,0,0,0,0,224,1,0,0,226,1,0,0,232,1,0,0,229,1,234,1,184,1,0,0,110,1,98,1,100,1,0,0,249,1,0,0,103,1,0,0,105,1,124,1,4,1,228,0,30,0,190,0,141,1,139,1,0,0,0,0,220,1,60,1,0,0,0,0,150,1,0,0,94,0,101,0,0,0,152,1,0,0,42,1,45,1,0,0,143,1,144,1,142,1,0,0,90,1,0,0,85,1,117,1,30,2,115,1,118,1,122,1,121,1,43,2,43,2,43,2,43,2,112,1,43,2,43,2,23,1,0,0,43,2,251,1,43,2,43,2,54,0,55,1,0,0,100,0,0,0,43,2,0,0,43,2,43,2,0,0,88,1,0,0,0,0,114,1,225,1,0,0,222,1,227,1,230,1,0,0,95,1,0,0,97,1,23,2,22,1,104,1,0,0,101,1,106,1,63,1,23,2,99,0,30,2,19,2,20,2,145,1,75,1,50,1,86,1,116,1,43,2,43,2,43,2,43,2,43,2,137,1,223,1,96,1,0,0,93,1,99,1,102,1,43,2,94,1,0,0,144,0,146,0,145,0,147,0,148,0,148,0,148,0,148,0,149,0,150,0,149,0,151,0,152,0,153,0,153,0,153,0,153,0,155,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,154,0,156,0,156,0,157,0,157,0,157,0,157,0,157,0,157,0,158,0,159,0,159,0,160,0,160,0,162,0,161,0,163,0,163,0,163,0,163,0,163,0,163,0,163,0,163,0,163,0,163,0,163,0,164,0,164,0,165,0,165,0,166,0,166,0,166,0,166,0,166,0,166,0,166,0,166,0,166,0,166,0,167,0,167,0,168,0,168,0,169,0,169,0,170,0,170,0,170,0,170,0,170,0,170,0,170,0,170,0,171,0,171,0,171,0,171,0,171,0,171,0,171,0,171,0,172,0,172,0,173,0,173,0,173,0,174,0,174,0,174,0,174,0,174,0,175,0,175,0,176,0,177,0,176,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,178,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,179,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,181,0,182,0,182,0,182,0,182,0,183,0,184,0,184,0,185,0,185,0,185,0,185,0,185,0,186,0,186,0,186,0,186,0,186,0,188,0,187,0,189,0,190,0,190,0,191,0,191,0,191,0,191,0,191,0,191,0,192,0,192,0,192,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,194,0,193,0,195,0,196,0,193,0,197,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,193,0,198,0,199,0,193,0,193,0,193,0,200,0,201,0,193,0,202,0,203,0,193,0,193,0,193,0,204,0,205,0,193,0,206,0,193,0,207,0,208,0,193,0,209,0,193,0,210,0,211,0,193,0,212,0,213,0,193,0,193,0,193,0,193,0,193,0,214,0,215,0,215,0,215,0,216,0,216,0,217,0,217,0,218,0,218,0,219,0,219,0,220,0,220,0,221,0,221,0,222,0,222,0,222,0,222,0,222,0,222,0,222,0,222,0,222,0,223,0,223,0,223,0,223,0,223,0,223,0,223,0,223,0,223,0,223,0,223,0,223,0,223,0,223,0,223,0,224,0,224,0,225,0,225,0,225,0,226,0,226,0,227,0,227,0,228,0,228,0,229,0,229,0,230,0,230,0,232,0,231,0,233,0,233,0,233,0,233,0,234,0,234,0,234,0,234,0,234,0,234,0,234,0,234,0,234,0,236,0,235,0,237,0,235,0,238,0,239,0,239,0,240,0,240,0,241,0,241,0,241,0,242,0,242,0,243,0,243,0,244,0,244,0,244,0,244,0,245,0,245,0,245,0,245,0,246,0,246,0,247,0,248,0,247,0,247,0,247,0,249,0,249,0,250,0,250,0,251,0,252,0,252,0,253,0,253,0,254,0,254,0,255,0,255,0,0,1,1,1,0,1,2,1,2,1,3,1,3,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,12,1,13,1,12,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,17,1,17,1,18,1,18,1,19,1,19,1,20,1,21,1,22,1,23,1,23,1,24,1,24,1,25,1,25,1,26,1,26,1,27,1,27,1,28,1,29,1,29,1,30,1,31,1,30,1,32,1,32,1,33,1,33,1,34,1,34,1,35,1,35,1,35,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,38,1,38,1,39,1,39,1,40,1,40,1,41,1,42,1,43,1,43,1,43,1,44,1,44,1,46,1,45,1,47,1,47,1,48,1,253,252,253,252,253,252,141,1,253,252,20,0,253,252,132,254,76,0,253,252,57,0,253,252,193,254,96,0,112,0,199,255,253,252,94,254,253,252,243,255,72,3,83,255,235,255,198,255,6,255,103,254,240,255,3,5,184,255,70,3,4,0,241,255,253,252,253,252,7,255,253,252,238,3,150,5,253,252,12,0,15,1,178,254,77,0,78,0,253,252,159,254,17,255,30,0,219,254,10,0,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,253,252,38,1,74,255,125,254,200,255,207,253,253,252,80,253,77,253,209,0,253,252,4,254,253,252,163,253,253,252,202,255,253,252,253,252,158,0,253,252,253,252,253,252,179,255,253,252,253,252,128,254,253,252,210,255,253,252,253,252,253,252,253,252,253,252,94,2,253,2,253,252,253,252,253,252,253,252,253,252,55,255,80,254,253,252,122,1,253,252,253,252,253,252,0,0,253,252,253,252,253,252,210,5,115,5,110,3,43,6,253,252,253,252,86,0,232,254,14,253,121,254,166,253,184,0,165,253,150,253,254,252,38,0,221,0,253,252,30,254,253,252,240,254,107,1,253,252,253,252,253,252,5,0,87,254,63,3,189,254,253,252,197,2,2,0,231,255,80,0,203,253,11,255,251,255,48,0,253,252,223,255,254,255,255,255,1,0,2,0,64,0,65,0,66,0,6,1,136,1,137,1,15,1,16,1,184,1,68,0,69,0,202,0,70,0,71,0,74,2,203,2,72,0,73,0,17,1,74,0,75,0,76,0,209,1,77,0,203,0,113,0,114,0,227,0,228,0,229,0,111,2,195,0,196,0,79,0,244,0,22,1,54,2,195,2,176,1,177,1,253,0,254,0,246,0,168,1,178,1,13,2,80,0,199,0,20,1,136,2,21,1,36,1,154,2,209,0,230,2,210,0,231,2,110,2,119,3,77,2,75,2,43,3,132,1,134,1,86,2,87,2,49,3,9,1,140,1,102,2,222,2,223,2,215,0,149,2,150,2,151,2,11,3,175,2,176,2,252,2,128,3,129,3,225,1,0,3,74,1,8,2,82,0,83,0,120,1,68,2,67,2,161,1,122,3,90,2,216,2,51,3,55,3,84,0,85,0,49,1,50,1,240,1,86,0,87,0,88,0,112,2,121,2,245,1,246,1,247,1,167,2,89,0,90,0,91,0,43,1,92,0,93,0,205,0,206,0,96,0,207,0,128,1,76,2,211,2,212,2,227,1,228,1,229,1,230,1,231,1,232,1,15,3,16,3,233,1,234,1,235,1,236,1,4,3,156,2,198,0,133,1,27,1,179,1,249,0,119,0,81,2],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+40960),allocate([56,2,112,1,234,0,173,1,174,1,191,2,200,1,141,1,4,1,158,1,237,0,19,1,0,0,145,0,146,0,0,0,1,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,19,0,21,0,22,0,23,0,24,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,39,0,45,0,46,0,47,0,48,0,49,0,51,0,52,0,53,0,54,0,55,0,56,0,58,0,59,0,60,0,63,0,66,0,67,0,69,0,70,0,89,0,92,0,93,0,95,0,96,0,98,0,100,0,101,0,102,0,103,0,104,0,105,0,106,0,109,0,129,0,130,0,131,0,147,0,148,0,149,0,154,0,156,0,157,0,159,0,160,0,163,0,164,0,166,0,167,0,168,0,170,0,171,0,180,0,193,0,214,0,233,0,234,0,244,0,245,0,249,0,250,0,251,0,2,1,3,1,4,1,6,1,7,1,8,1,9,1,10,1,11,1,35,1,48,1,149,0,21,0,22,0,30,0,31,0,32,0,39,0,51,0,55,0,86,0,89,0,92,0,129,0,172,0,173,0,193,0,214,0,8,1,11,1,35,1,173,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,45,0,46,0,47,0,48,0,49,0,50,0,51,0,52,0,55,0,69,0,70,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,80,0,81,0,84,0,85,0,86,0,87,0,98,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,130,0,131,0,138,0,139,0,174,0,178,0,179,0,10,1,30,1,194,0,89,0,157,0,158,0,171,0,214,0,8,1,9,1,11,1,158,0,200,0,202,0,89,0,164,0,171,0,214,0,219,0,8,1,11,1,33,0,34,0,35,0,36,0,48,0,49,0,51,0,55,0,101,0,174,0,175,0,176,0,4,1,142,0,143,0,158,0,39,1,44,1,45,1,47,1,57,0,98,0,99,0,130,0,163,0,180,0,181,0,186,0,189,0,191,0,33,1,34,1,186,0,186,0,139,0,187,0,188,0,139,0,183,0,187,0,139,0,40,1,45,1,175,0,150,0,133,0,180,0,214,0,180,0,55,0,1,0,92,0,152,0,153,0,154,0,165,0,166,0,48,1,195,0,197,0,182,0,191,0,33,1,48,1,181,0,32,1,33,1,48,1,89,0,137,0,170,0,214,0,8,1,11,1,198,0,53,0,54,0,56,0,63,0,105,0,174,0,5,1,62,0,64,0,65,0,111,0,112,0,246,0,247,0,63,0,246,0,63,0,246,0,63,0,246,0,61,0,246,0,58,0,59,0,159,0,180,0,180,0,39,1,47,1,40,0,41,0,42,0,43,0,44,0,37,0,38,0,28,0,231,0,116,0,137,0,92,0,98,0,167,0,116,0,71,0,72,0,73,0,74,0,75,0,76,0,77,0,78,0,79,0,80,0,81,0,82,0,83,0,86,0,87,0,117,0,119,0,120,0,121,0,122,0,123,0,124,0,125,0,126,0,127,0,128,0,88,0,135,0,136,0,88,0,136,0,38,1,26,0,133,0,235,0,90,0,90,0,183,0,187,0,235,0,157,0,51,0,55,0,172,0,58,0,59,0,120,0,12,1,88,0,135,0,136,0,209,0,31,1,210,0,38,1,151,0,152,0,55,0,16,0,215,0,44,1,116,0,88,0,135,0,136,0,90,0,90,0,215,0,158,0,158,0,55,0,88,0,135,0,136,0,25,0,105,0,137,0,46,1,39,1,20,0,238,0,142,0,181,0,181,0,181,0,91,0,137,0,190,0,48,1,137,0,190,0,186,0,40,1,41,1,186,0,185,0,186,0,191,0,33,1,48,1,157,0,41,1,157,0,155,0,133,0,152,0,88,0,136,0,90,0,154,0,165,0,140,0,39,1,47,1,41,1,157,0,41,1,141,0,137,0,43,1,45,1,137,0,43,1,134,0,43,1,55,0,167,0,168,0,169,0,137,0,88,0,135,0,136,0,51,0,53,0,54,0,55,0,56,0,92,0,98,0,99,0,123,0,126,0,139,0,229,0,15,1,16,1,17,1,18,1,19,1,20,1,21,1,24,1,25,1,26,1,27,1,28,1,63,0,247,0,248,0,110,0,113,0,114,0,253,0,254,0,255,0,0,1,62,0,247,0,63,0,63,0,63,0,61,0,71,0,71,0,149,0,158,0,158,0,158,0,158,0,154,0,157,0,157,0,232,0,98,0,159,0,181,0,191,0,192,0,165,0,137,0,170,0,137,0,156,0,159,0,171,0,180,0,181,0,192,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,180,0,51,0,52,0,55,0,178,0,183,0,36,1,37,1,185,0,51,0,52,0,55,0,178,0,183,0,36,1,51,0,55,0,36,1,237,0,236,0,159,0,180,0,159,0,180,0,97,0,161,0,207,0,13,1,206,0,51,0,55,0,172,0,36,1,185,0,36,1,151,0,157,0,211,0,212,0,15,0,13,0,240,0,48,1,152,0,16,0,180,0,51,0,55,0,185,0,51,0,55,0,152,0,27,0,216,0,44,1,216,0,51,0,55,0,185,0,51,0,55,0,204,0,177,0,252,0,253,0,238,0,191,0,15,0,181,0,98,0,181,0,189,0,253,0,33,1,34,1,41,1,140,0,41,1,137,0,137,0,41,1,175,0,147,0,134,0,180,0,41,1,154,0,196,0,33,1,167,0,169,0,51,0,55,0,185,0,51,0,55,0,116,0,51,0,92,0,98,0,220,0,221,0,222,0,17,1,15,1,199,0,137,0,29,1,48,1,181,0,137,0,29,1,51,0,137,0,29,1,51,0,63,0,152,0,1,1,254,0,110,0,0,1,180,0,180,0,79,0,121,0,224,0,225,0,48,1,181,0,137,0,41,1,169,0,137,0,116,0,44,0,40,1,90,0,90,0,183,0,187,0,40,1,42,1,90,0,90,0,183,0,184,0,187,0,48,1,184,0,187,0,224,0,224,0,44,0,162,0,44,1,158,0,151,0,42,1,15,0,41,1,139,0,14,1,15,1,174,0,181,0,192,0,241,0,48,1,18,0,218,0,48,1,17,0,217,0,218,0,90,0,90,0,42,1,90,0,90,0,218,0,201,0,203,0,42,1,158,0,175,0,15,0,137,0,215,0,181,0,98,0,181,0,190,0,33,1,134,0,41,1,43,1,42,1,222,0,137,0,17,1,137,0,41,1,226,0,40,1,29,0,108,0,230,0,18,1,24,1,26,1,28,1,19,1,21,1,26,1,19,1,134,0,152,0,223,0,226,0,19,1,20,1,22,1,23,1,26,1,28,1,152,0,98,0,181,0,169,0,180,0,118,0,159,0,180,0,159,0,180,0,161,0,141,0,90,0,159,0,180,0,159,0,180,0,161,0,235,0,231,0,152,0,152,0,180,0,224,0,208,0,44,1,15,0,15,1,151,0,44,1,213,0,91,0,242,0,48,1,152,0,14,0,243,0,48,1,158,0,15,0,90,0,15,0,152,0,152,0,216,0,181,0,152,0,181,0,137,0,41,1,221,0,137,0,98,0,220,0,140,0,142,0,152,0,152,0,137,0,29,1,137,0,29,1,137,0,29,1,137,0,29,1,29,1,134,0,226,0,121,0,137,0,29,1,89,0,214,0,137,0,29,1,137,0,29,1,15,0,181,0,180,0,159,0,180,0,15,0,134,0,152,0,151,0,41,1,15,0,14,1,89,0,171,0,214,0,8,1,11,1,215,0,152,0,215,0,15,0,15,0,205,0,218,0,238,0,239,0,137,0,221,0,137,0,17,1,51,0,227,0,228,0,16,1,15,0,134,0,19,1,26,1,19,1,19,1,121,0,23,1,26,1,55,0,88,0,19,1,22,1,26,1,19,1,134,0,15,0,151,0,55,0,88,0,135,0,136,0,152,0,152,0,152,0,221,0,137,0,137,0,40,1,29,1,137,0,29,1,29,1,29,1,137,0,29,1,137,0,29,1,51,0,55,0,29,1,137,0,29,1,29,1,15,0,51,0,55,0,185,0,51,0,55,0,240,0,217,0,15,0,221,0,228,0,19,1,19,1,26,1,19,1,19,1,42,1,29,1,29,1,137,0,29,1,29,1,29,1,19,1,29,1,73,110,118,97,108,105,100,32,109,114,98,95,115,116,97,116,101,44,32,101,120,105,116,105,110,103,32,109,114,98,99,10,0,37,115,58,32,110,111,32,112,114,111,103,114,97,109,32,102,105,108,101,32,103,105,118,101,110,10,0,46,99,0,46,109,114,98,0,37,115,58,32,111,117,116,112,117,116,32,102,105,108,101,32,115,104,111,117,108,100,32,98,101,32,115,112,101,99,105,102,105,101,100,32,116,111,32,99,111,109,112,105,108,101,32,109,117,108,116,105,112,108,101,32,102,105,108,101,115,10,0,37,115,58,37,115,58,83,121,110,116,97,120,32,79,75,10,0,119,98,0,37,115,58,32,99,97,110,110,111,116,32,111,112,101,110,32,111,117,116,112,117,116,32,102,105,108,101,58,40,37,115,41,10,0,79,117,116,112,117,116,32,102,105,108,101,32,105,115,32,114,101,113,117,105,114,101,100,10,0,37,115,58,32,97,110,32,111,117,116,112,117,116,32,102,105,108,101,32,105,115,32,97,108,114,101,97,100,121,32,115,112,101,99,105,102,105,101,100,46,32,40,37,115,41,10,0,37,115,58,32,102,117,110,99,116,105,111,110,32,110,97,109,101,32,105,115,32,110,111,116,32,115,112,101,99,105,102,105,101,100,46,10,0,118,101,114,115,105,111,110,0,118,101,114,98,111,115,101,0,99,111,112,121,114,105,103,104,116,0,37,115,58,32,103,101,110,101,114,97,116,105,110,103,32,37,115,32,101,110,100,105,97,110,32,67,32,102,105,108,101,46,32,115,112,101,99,105,102,121,32,45,101,47,45,69,32,102,111,114,32,99,114,111,115,115,32,99,111,109,112,105,108,105,110,103,46,10,0,98,105,103,0,108,105,116,116,108,101,0,115,119,105,116,99,104,101,115,58,0,45,99,32,32,32,32,32,32,32,32,32,32,32,99,104,101,99,107,32,115,121,110,116,97,120,32,111,110,108,121,0,45,111,60,111,117,116,102,105,108,101,62,32,32,112,108,97,99,101,32,116,104,101,32,111,117,116,112,117,116,32,105,110,116,111,32,60,111,117,116,102,105,108,101,62,0,45,118,32,32,32,32,32,32,32,32,32,32,32,112,114,105,110,116,32,118,101,114,115,105,111,110,32,110,117,109,98,101,114,44,32,116,104,101,110,32,116,117,114,110,32,111,110,32,118,101,114,98,111,115,101,32,109,111,100,101,0,45,103,32,32,32,32,32,32,32,32,32,32,32,112,114,111,100,117,99,101,32,100,101,98,117,103,103,105,110,103,32,105,110,102,111,114,109,97,116,105,111,110,0,45,66,60,115,121,109,98,111,108,62,32,32,32,98,105,110,97,114,121,32,60,115,121,109,98,111,108,62,32,111,117,116,112,117,116,32,105,110,32,67,32,108,97,110,103,117,97,103,101,32,102,111,114,109,97,116,0,45,101,32,32,32,32,32,32,32,32,32,32,32,103,101,110,101,114,97,116,101,32,108,105,116,116,108,101,32,101,110,100,105,97,110,32,105,115,101,113,32,100,97,116,97,0,45,69,32,32,32,32,32,32,32,32,32,32,32,103,101,110,101,114,97,116,101,32,98,105,103,32,101,110,100,105,97,110,32,105,115,101,113,32,100,97,116,97,0,45,45,118,101,114,98,111,115,101,32,32,32,32,114,117,110,32,97,116,32,118,101,114,98,111,115,101,32,109,111,100,101,0,45,45,118,101,114,115,105,111,110,32,32,32,32,112,114,105,110,116,32,116,104,101,32,118,101,114,115,105,111,110,0,45,45,99,111,112,121,114,105,103,104,116,32,32,112,114,105,110,116,32,116,104,101,32,99,111,112,121,114,105,103,104,116,0,85,115,97,103,101,58,32,37,115,32,91,115,119,105,116,99,104,101,115,93,32,112,114,111,103,114,97,109,102,105,108,101,10,0,32,32,37,115,10,0,114,0,37,115,58,32,99,97,110,110,111,116,32,111,112,101,110,32,112,114,111,103,114,97,109,32,102,105,108,101,46,32,40,37,115,41,10,0,37,115,58,32,105,110,118,97,108,105,100,32,67,32,108,97,110,103,117,97,103,101,32,115,121,109,98,111,108,32,110,97,109,101,10,0,37,115,58,32,101,114,114,111,114,32,105,110,32,109,114,98,32,100,117,109,112,32,40,37,115,41,32,37,100,10,0,37,46,56,101,0,73,82,69,80,0,48,48,48,48,0,68,66,71,0,0,76,73,78,69,0,76,86,65,82,0,69,78,68,0,0,82,73,84,69,0,69,84,73,82,0,48,48,48,51,0,77,65,84,90,0,47,42,32,100,117,109,112,101,100,32,105,110,32,108,105,116,116,108,101,32,101,110,100,105,97,110,32,111,114,100,101,114,46,10,32,32,32,117,115,101,32,96,109,114,98,99,32,45,69,96,32,111,112,116,105,111,110,32,102,111,114,32,98,105,103,32,101,110,100,105,97,110,32,67,80,85,46,32,42,47,10,0,47,42,32,100,117,109,112,101,100,32,105,110,32,98,105,103,32,101,110,100,105,97,110,32,111,114,100,101,114,46,10,32,32,32,117,115,101,32,96,109,114,98,99,32,45,101,96,32,111,112,116,105,111,110,32,102,111,114,32,98,101,116,116,101,114,32,112,101,114,102,111,114,109,97,110,99,101,32,111,110,32,108,105,116,116,108,101,32,101,110,100,105,97,110,32,67,80,85,46,32,42,47,10,0,35,105,110,99,108,117,100,101,32,60,115,116,100,105,110,116,46,104,62,10,0,99,111,110,115,116,32,117,105,110,116,56,95,116,10,35,105,102,32,100,101,102,105,110,101,100,32,95,95,71,78,85,67,95,95,10,95,95,97,116,116,114,105,98,117,116,101,95,95,40,40,97,108,105,103,110,101,100,40,37,117,41,41,41,10,35,101,108,105,102,32,100,101,102,105,110,101,100,32,95,77,83,67,95,86,69,82,10,95,95,100,101,99,108,115,112,101,99,40,97,108,105,103,110,40,37,117,41,41,10,35,101,110,100,105,102,10,37,115,91,93,32,61,32,123,0,48,120,37,48,50,120,44,0,10,125,59,10,0,105,110,118,97,108,105,100,32,102,111,114,109,97,116,32,115,116,114,105,110,103,0,97,114,101,110,97,32,111,118,101,114,102,108,111,119,32,101,114,114,111,114,0,71,67,0,115,116,97,114,116,0,101,110,97,98,108,101,0,100,105,115,97,98,108,101,0,105,110,116,101,114,118,97,108,95,114,97,116,105,111,0,105,110,116,101,114,118,97,108,95,114,97,116,105,111,61,0,115,116,101,112,95,114,97,116,105,111,0,115,116,101,112,95,114,97,116,105,111,61,0,103,101,110,101,114,97,116,105,111,110,97,108,95,109,111,100,101,61,0,103,101,110,101,114,97,116,105,111,110,97,108,95,109,111,100,101,0,2,8,32,128,1,4,16,64,3,12,48,192,105,102,110,111,110,101,0,111,111,0,100,101,102,97,117,108,116,0,124,111,63,0,100,101,102,97,117,108,116,61,0,100,101,102,97,117,108,116,95,112,114,111,99,0,100,101,102,97,117,108,116,95,112,114,111,99,61,0,95,95,100,101,108,101,116,101,0,104,97,115,95,107,101,121,63,0,104,97,115,95,118,97,108,117,101,63,0,38,124,111,63,0,107,101,121,63,0,107,101,121,115,0,115,116,111,114,101,0,118,97,108,117,101,63,0,118,97,108,117,101,115,0,110,111,110,32,102,108,111,97,116,32,118,97,108,117,101,0,70,108,111,97,116,68,111,109,97,105,110,69,114,114,111,114,0,45,73,110,102,105,110,105,116,121,0,73,110,102,105,110,105,116,121,0,78,97,78,0,105,110,118,97,108,105,100,32,114,97,100,105,120,32,37,83,0,78,117,109,101,114,105,99,0,102,0,113,117,111,0,99,97,110,39,116,32,99,111,110,118,101,114,116,32,70,108,111,97,116,32,105,110,116,111,32,73,110,116,101,103,101,114,0,100,105,118,109,111,100,0,99,101,105,108,0,102,105,110,105,116,101,63,0,102,108,111,111,114,0,105,110,102,105,110,105,116,101,63,0,114,111,117,110,100,0,116,114,117,110,99,97,116,101,0,37,46,55,103,0,110,97,110,63,0,73,78,70,73,78,73,84,89,0,78,105,108,67,108,97,115,115,0,98,0,84,114,117,101,67,108,97,115,115,0,70,97,108,115,101,67,108,97,115,115,0,73,110,116,101,103,101,114,0,99,97,110,39,116,32,99,111,110,118,101,114,116,32,37,83,32,105,110,116,111,32,37,83,0,37,83,32,99,97,110,110,111,116,32,98,101,32,99,111,110,118,101,114,116,101,100,32,116,111,32,37,83,32,98,121,32,35,37,83,0,70,105,120,110,117,109,0,105,67,108,97,115,115,0,83,67,108,97,115,115,0,70,108,111,97,116,0,70,105,108,101,0,68,97,116,97,0,117,110,107,110,111,119,110,32,116,121,112,101,32,37,83,32,40,37,83,32,103,105,118,101,110,41,0,35,60,0,99,108,97,115,115,32,111,114,32,109,111,100,117,108,101,32,114,101,113,117,105,114,101,100,0,116,111,95,105,110,116,0,99,97,110,39,116,32,99,111,110,118,101,114,116,32,37,83,32,116,111,32,73,110,116,101,103,101,114,32,40,37,83,35,37,83,32,103,105,118,101,115,32,37,83,41,0,99,97,110,39,116,32,99,111,110,118,101,114,116,32,110,105,108,32,105,110,116,111,32,73,110,116,101,103,101,114,0,98,97,115,101,32,115,112,101,99,105,102,105,101,100,32,102,111,114,32,110,111,110,32,115,116,114,105,110,103,32,118,97,108,117,101,0,109,97,105,110,0,48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,0,115,116,114,105,110,103,32,99,97,112,97,99,105,116,121,32,115,105,122,101,32,116,111,111,32,98,105,103,0,115,116,114,105,110,103,32,115,105,122,101,32,116,111,111,32,98,105,103,0,115,116,114,105,110,103,32,99,111,110,116,97,105,110,115,32,110,117,108,108,32,98,121,116,101,0,99,97,110,39,116,32,109,111,100,105,102,121,32,102,114,111,122,101,110,32,115,116,114,105,110,103,0,82,101,103,101,120,112,32,99,108,97,115,115,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,105,108,108,101,103,97,108,32,114,97,100,105,120,32,37,83,0,115,116,114,105,110,103,32,40,37,83,41,32,116,111,111,32,98,105,103,32,102,111,114,32,105,110,116,101,103,101,114,0,105,110,118,97,108,105,100,32,115,116,114,105,110,103,32,102,111,114,32,110,117,109,98,101,114,40,37,83,41,0,105,110,118,97,108,105,100,32,115,116,114,105,110,103,32,102,111,114,32,102,108,111,97,116,40,37,83,41,0,115,116,114,105,110,103,32,102,111,114,32,70,108,111,97,116,32,99,111,110,116,97,105,110,115,32,110,117,108,108,32,98,121,116,101,0,34,0,98,121,116,101,115,105,122,101,0,83,0,97,114,103,117,109,101,110,116,32,116,111,111,32,98,105,103,0,111,124,111,0,119,114,111,110,103,32,110,117,109,98,101,114,32,111,102,32,97,114,103,117,109,101,110,116,115,32,40,37,83,32,102,111,114,32,49,41,0,99,97,110,39,116,32,99,111,110,118,101,114,116,32,116,111,32,70,105,120,110,117,109,0,99,97,112,105,116,97,108,105,122,101,0,99,97,112,105,116,97,108,105,122,101,33,0,99,104,111,109,112,0,124,83,0,99,104,111,109,112,33,0,99,104,111,112,0,99,104,111,112,33,0,100,111,119,110,99,97,115,101,0,100,111,119,110,99,97,115,101,33,0,116,121,112,101,32,109,105,115,109,97,116,99,104,58,32,37,83,32,103,105,118,101,110,0,115,112,108,105,116,0,124,111,105,0,116,111,95,102,0,116,111,95,105,0,117,112,99,97,115,101,0,117,112,99,97,115,101,33,0,98,121,116,101,115,0,102,114,101,101,122,101,0,2,8,32,128,1,4,16,64,3,12,48,192,115,121,109,98,111,108,32,108,101,110,103,116,104,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,0,105,100,50,110,97,109,101,0,116,111,95,115,121,109,0,99,97,110,110,111,116,32,115,101,116,32,105,110,115,116,97,110,99,101,32,118,97,114,105,97,98,108,101,0,39,37,83,39,32,105,115,32,110,111,116,32,97,108,108,111,119,101,100,32,97,115,32,97,110,32,105,110,115,116,97,110,99,101,32,118,97,114,105,97,98,108,101,32,110,97,109,101,0,45,60,0,117,110,105,110,105,116,105,97,108,105,122,101,100,32,99,108,97,115,115,32,118,97,114,105,97,98,108,101,32,37,83,32,105,110,32,37,83,0,99,111,110,115,116,97,110,116,32,108,111,111,107,45,117,112,32,102,111,114,32,110,111,110,32,99,108,97,115,115,47,109,111,100,117,108,101,0,84,111,111,32,108,111,110,103,32,97,114,103,117,109,101,110,116,115,46,32,40,108,105,109,105,116,61,56,41,0,110,101,103,97,116,105,118,101,32,97,114,103,99,32,102,111,114,32,102,117,110,99,97,108,108,32,40,37,83,41,0,115,116,97,99,107,32,108,101,118,101,108,32,116,111,111,32,100,101,101,112,46,32,40,108,105,109,105,116,61,40,48,120,52,48,48,48,48,32,45,32,49,50,56,41,41,0,115,117,112,101,114,32,99,97,108,108,101,100,32,111,117,116,115,105,100,101,32,111,102,32,109,101,116,104,111,100,0,116,111,95,112,114,111,99,0,39,37,83,39,58,32,119,114,111,110,103,32,110,117,109,98,101,114,32,111,102,32,97,114,103,117,109,101,110,116,115,32,40,37,83,32,102,111,114,32,37,83,41,0,119,114,111,110,103,32,110,117,109,98,101,114,32,111,102,32,97,114,103,117,109,101,110,116,115,32,40,37,83,32,102,111,114,32,37,83,41,0,114,101,116,117,114,110,0,98,114,101,97,107,0,0,121,105,101,108,100,0,0,6,5,5,117,110,101,120,112,101,99,116,101,100,32,0,76,111,99,97,108,74,117,109,112,69,114,114,111,114,0,70,105,98,101,114,69,114,114,111,114,0,100,111,117,98,108,101,32,114,101,115,117,109,101,0,110,111,32,116,97,114,103,101,116,32,99,108,97,115,115,32,111,114,32,109,111,100,117,108,101,0,79,80,95,68,69,66,85,71,32,37,100,32,37,100,32,37,100,10,0,110,42,38,0,124,83,38,0,109,111,100,117,108,101,95,101,118,97,108,47,99,108,97,115,115,95,101,118,97,108,32,119,105,116,104,32,115,116,114,105,110,103,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,105,110,115,116,97,110,99,101,95,101,118,97,108,32,119,105,116,104,32,115,116,114,105,110,103,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,115,116,114,105,110,103,32,116,111,111,32,108,111,110,103,32,40,116,114,117,110,99,97,116,101,100,41,0,37,115,40,37,100,44,37,100,41,58,32,37,115,10,0,108,105,110,101,32,37,100,58,37,100,58,32,37,115,10,0,99,97,110,39,116,32,102,105,110,100,32,104,101,114,101,100,111,99,32,100,101,108,105,109,105,116,101,114,32,34,37,115,34,32,97,110,121,119,104,101,114,101,32,98,101,102,111,114,101,32,69,79,70,0,117,110,116,101,114,109,105,110,97,116,101,100,32,115,116,114,105,110,103,32,109,101,101,116,115,32,101,110,100,32,111,102,32,102,105,108,101,0,48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,0,73,110,118,97,108,105,100,32,101,115,99,97,112,101,32,99,104,97,114,97,99,116,101,114,32,115,121,110,116,97,120,0,73,110,118,97,108,105,100,32,85,110,105,99,111,100,101,32,99,111,100,101,32,112,111,105,110,116,0,115,0,117,110,107,110,111,119,110,32,114,101,103,101,120,112,32,111,112,116,105,111,110,37,115,32,45,32,37,115,0,42,42,0,39,42,39,32,105,110,116,101,114,112,114,101,116,101,100,32,97,115,32,97,114,103,117,109,101,110,116,32,112,114,101,102,105,120,0,10,61,101,110,100,0,101,109,98,101,100,100,101,100,32,100,111,99,117,109,101,110,116,32,109,101,101,116,115,32,101,110,100,32,111,102,32,102,105,108,101,0,117,110,116,101,114,109,105,110,97,116,101,100,32,104,101,114,101,32,100,111,99,117,109,101,110,116,32,105,100,101,110,116,105,102,105,101,114,0,62,62,0,105,110,99,111,109,112,108,101,116,101,32,99,104,97,114,97,99,116,101,114,32,115,121,110,116,97,120,0,105,110,118,97,108,105,100,32,99,104,97,114,97,99,116,101,114,32,115,121,110,116,97,120,59,32,117,115,101,32,63,92,37,99,0,38,38,0,39,38,39,32,105,110,116,101,114,112,114,101,116,101,100,32,97,115,32,97,114,103,117,109,101,110,116,32,112,114,101,102,105,120,0,124,124,0,97,109,98,105,103,117,111,117,115,32,102,105,114,115,116,32,97,114,103,117,109,101,110,116,59,32,112,117,116,32,112,97,114,101,110,116,104,101,115,101,115,32,111,114,32,101,118,101,110,32,115,112,97,99,101,115,0,110,111,32,46,60,100,105,103,105,116,62,32,102,108,111,97,116,105,110,103,32,108,105,116,101,114,97,108,32,97,110,121,109,111,114,101,59,32,112,117,116,32,48,32,98,101,102,111,114,101,32,100,111,116,0,110,117,109,101,114,105,99,32,108,105,116,101,114,97,108,32,119,105,116,104,111,117,116,32,100,105,103,105,116,115,0,73,110,118,97,108,105,100,32,111,99,116,97,108,32,100,105,103,105,116,0,48,0,116,114,97,105,108,105,110,103,32,39,37,99,39,32,105,110,32,110,117,109,98,101,114,0,99,111,114,114,117,112,116,101,100,32,102,108,111,97,116,32,118,97,108,117,101,32,37,115,0,102,108,111,97,116,32,37,115,32,111,117,116,32,111,102,32,114,97,110,103,101,0,117,110,107,110,111,119,110,32,116,121,112,101,32,111,102,32,37,115,116,114,105,110,103,0,117,110,116,101,114,109,105,110,97,116,101,100,32,113,117,111,116,101,100,32,115,116,114,105,110,103,32,109,101,101,116,115,32,101,110,100,32,111,102,32,102,105,108,101,0,105,110,99,111,109,112,108,101,116,101,32,103,108,111,98,97,108,32,118,97,114,105,97,98,108,101,32,115,121,110,116,97,120,0,99,97,112,116,117,114,101,32,103,114,111,117,112,32,105,110,100,101,120,32,109,117,115,116,32,98,101,32,60,61,32,37,100,0,105,110,99,111,109,112,108,101,116,101,32,105,110,115,116,97,110,99,101,32,118,97,114,105,97,98,108,101,32,115,121,110,116,97,120,0,105,110,99,111,109,112,108,101,116,101,32,99,108,97,115,115,32,118,97,114,105,97,98,108,101,32,115,121,110,116,97,120,0,39,64,37,99,39,32,105,115,32,110,111,116,32,97,108,108,111,119,101,100,32,97,115,32,97,110,32,105,110,115,116,97,110,99,101,32,118,97,114,105,97,98,108,101,32,110,97,109,101,0,39,64,64,37,99,39,32,105,115,32,110,111,116,32,97,108,108,111,119,101,100,32,97,115,32,97,32,99,108,97,115,115,32,118,97,114,105,97,98,108,101,32,110,97,109,101,0,73,110,118,97,108,105,100,32,99,104,97,114,32,39,92,120,37,48,50,88,39,32,105,110,32,101,120,112,114,101,115,115,105,111,110,0,95,95,69,78,68,95,95,0,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,14,51,16,8,11,13,51,51,51,51,10,51,13,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,11,51,13,1,26,4,1,8,28,51,23,51,1,1,27,5,19,21,51,8,3,3,11,51,21,24,16,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,98,114,101,97,107,0,101,108,115,101,0,110,105,108,0,101,110,115,117,114,101,0,116,104,101,110,0,110,111,116,0,102,97,108,115,101,0,115,101,108,102,0,101,108,115,105,102,0,114,101,115,99,117,101,0,116,114,117,101,0,117,110,116,105,108,0,117,110,108,101,115,115,0,114,101,116,117,114,110,0,100,101,102,0,97,110,100,0,100,111,0,121,105,101,108,100,0,102,111,114,0,117,110,100,101,102,0,111,114,0,105,110,0,119,104,101,110,0,114,101,116,114,121,0,105,102,0,99,97,115,101,0,114,101,100,111,0,110,101,120,116,0,115,117,112,101,114,0,109,111,100,117,108,101,0,95,95,76,73,78,69,95,95,0,95,95,70,73,76,69,95,95,0,95,95,69,78,67,79,68,73,78,71,95,95,0,69,78,68,0,97,108,105,97,115,0,66,69,71,73,78,0,119,104,105,108,101,0,0,2,2,2,2,2,2,2,2,2,143,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,130,2,2,2,128,123,2,139,140,126,124,137,125,136,127,2,2,2,2,2,2,2,2,2,2,118,142,120,116,119,117,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,135,2,141,122,2,138,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,133,121,134,131,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,129,132,0,2,0,2,2,1,1,3,2,1,0,5,4,2,1,1,3,2,0,4,2,3,3,3,3,3,4,1,3,3,6,5,5,5,5,3,3,3,3,1,3,3,1,3,3,3,2,1,1,1,1,1,4,0,5,2,3,4,5,4,5,2,2,2,2,2,1,3,1,3,1,2,3,5,2,4,2,4,1,3,1,3,2,3,1,2,1,4,3,3,3,3,2,1,1,4,3,3,3,3,2,1,1,1,2,1,3,1,1,1,1,1,1,1,1,0,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,5,3,5,6,5,5,5,5,4,3,3,3,3,3,3,3,3,3,4,4,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,3,3,3,3,6,1,1,1,2,4,2,3,1,1,1,1,2,4,2,1,2,2,4,1,0,2,2,2,1,1,2,3,4,4,5,3,4,2,1,1,1,1,1,1,1,1,0,4,0,0,5,0,3,3,3,2,3,3,1,4,3,1,4,3,2,1,2,0,0,5,6,6,0,0,7,0,0,7,5,4,0,0,9,0,6,0,0,8,0,5,0,0,7,0,0,9,1,1,1,1,1,1,1,2,1,1,1,5,1,2,1,1,1,3,1,3,1,4,6,3,5,2,4,1,3,6,8,4,6,4,2,6,2,4,6,2,4,2,4,1,1,1,3,1,4,1,4,1,3,1,1,4,1,3,3,0,5,2,4,5,5,2,4,4,3,3,3,2,1,4,0,5,0,5,5,1,1,6,1,1,1,1,2,1,2,1,1,1,1,1,1,1,2,3,1,2,1,0,4,1,2,2,3,2,3,1,0,1,1,2,1,2,1,2,1,0,4,2,3,1,4,2,1,1,1,1,1,2,2,3,1,1,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,4,3,2,6,8,4,6,4,6,2,4,6,2,4,2,4,1,0,1,1,1,1,1,1,1,3,1,3,2,2,2,1,3,1,3,1,1,2,1,1,1,2,2,1,1,0,4,1,2,1,3,3,2,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,2,2,0,1,1,1,1,0,3,1,2,0,66,69,71,73,78,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,101,108,115,101,32,119,105,116,104,111,117,116,32,114,101,115,99,117,101,32,105,115,32,117,115,101,108,101,115,115,0,69,78,68,32,110,111,116,32,115,117,112,111,114,116,101,100,0,99,111,110,115,116,97,110,116,32,114,101,45,97,115,115,105,103,110,109,101,110,116,0,99,97,110,39,116,32,115,101,116,32,118,97,114,105,97,98,108,101,32,36,37,100,0,99,97,110,39,116,32,115,101,116,32,118,97,114,105,97,98,108,101,32,36,37,99,0,73,110,116,101,114,110,97,108,32,101,114,114,111,114,32,105,110,32,98,97,99,107,114,101,102,95,101,114,114,111,114,40,41,32,58,32,110,61,62,99,97,114,32,61,61,32,37,83,0,98,111,116,104,32,98,108,111,99,107,32,97,114,103,32,97,110,100,32,97,99,116,117,97,108,32,98,108,111,99,107,32,103,105,118,101,110,0,98,108,111,99,107,32,97,114,103,117,109,101,110,116,32,115,104,111,117,108,100,32,110,111,116,32,98,101,32,103,105,118,101,110,0,100,121,110,97,109,105,99,32,99,111,110,115,116,97,110,116,32,97,115,115,105,103,110,109,101,110,116,0,99,108,97,115,115,47,109,111,100,117,108,101,32,110,97,109,101,32,109,117,115,116,32,98,101,32,67,79,78,83,84,65,78,84,0,61,126,0,33,126,0,62,61,0,60,61,0,43,64,0,45,64,0,47,0,37,0,124,0,94,0,60,0,126,0,99,108,97,115,115,32,100,101,102,105,110,105,116,105,111,110,32,105,110,32,109,101,116,104,111,100,32,98,111,100,121,0,109,111,100,117,108,101,32,100,101,102,105,110,105,116,105,111,110,32,105,110,32,109,101,116,104,111,100,32,98,111,100,121,0,98,108,111,99,107,32,103,105,118,101,110,32,116,111,32,121,105,101,108,100,0,37,100,0,102,111,114,109,97,108,32,97,114,103,117,109,101,110,116,32,99,97,110,110,111,116,32,98,101,32,97,32,99,111,110,115,116,97,110,116,0,102,111,114,109,97,108,32,97,114,103,117,109,101,110,116,32,99,97,110,110,111,116,32,98,101,32,97,110,32,105,110,115,116,97,110,99,101,32,118,97,114,105,97,98,108,101,0,102,111,114,109,97,108,32,97,114,103,117,109,101,110,116,32,99,97,110,110,111,116,32,98,101,32,97,32,103,108,111,98,97,108,32,118,97,114,105,97,98,108,101,0,102,111,114,109,97,108,32,97,114,103,117,109,101,110,116,32,99,97,110,110,111,116,32,98,101,32,97,32,99,108,97,115,115,32,118,97,114,105,97,98,108,101,0,99,97,110,39,116,32,100,101,102,105,110,101,32,115,105,110,103,108,101,116,111,110,32,109,101,116,104,111,100,32,102,111,114,32,40,41,46,0,99,97,110,39,116,32,100,101,102,105,110,101,32,115,105,110,103,108,101,116,111,110,32,109,101,116,104,111,100,32,102,111,114,32,108,105,116,101,114,97,108,115,0,36,101,110,100,0,101,114,114,111,114,0,36,117,110,100,101,102,105,110,101,100,0,107,101,121,119,111,114,100,95,99,108,97,115,115,0,107,101,121,119,111,114,100,95,109,111,100,117,108,101,0,107,101,121,119,111,114,100,95,100,101,102,0,107,101,121,119,111,114,100,95,98,101,103,105,110,0,107,101,121,119,111,114,100,95,105,102,0,107,101,121,119,111,114,100,95,117,110,108,101,115,115,0,107,101,121,119,111,114,100,95,119,104,105,108,101,0,107,101,121,119,111,114,100,95,117,110,116,105,108,0,107,101,121,119,111,114,100,95,102,111,114,0,107,101,121,119,111,114,100,95,117,110,100,101,102,0,107,101,121,119,111,114,100,95,114,101,115,99,117,101,0,107,101,121,119,111,114,100,95,101,110,115,117,114,101,0,107,101,121,119,111,114,100,95,101,110,100,0,107,101,121,119,111,114,100,95,116,104,101,110,0,107,101,121,119,111,114,100,95,101,108,115,105,102,0,107,101,121,119,111,114,100,95,101,108,115,101,0,107,101,121,119,111,114,100,95,99,97,115,101,0,107,101,121,119,111,114,100,95,119,104,101,110,0,107,101,121,119,111,114,100,95,98,114,101,97,107,0,107,101,121,119,111,114,100,95,110,101,120,116,0,107,101,121,119,111,114,100,95,114,101,100,111,0,107,101,121,119,111,114,100,95,114,101,116,114,121,0,107,101,121,119,111,114,100,95,105,110,0,107,101,121,119,111,114,100,95,100,111,0,107,101,121,119,111,114,100,95,100,111,95,99,111,110,100,0,107,101,121,119,111,114,100,95,100,111,95,98,108,111,99,107,0,107,101,121,119,111,114,100,95,100,111,95,76,65,77,66,68,65,0,107,101,121,119,111,114,100,95,114,101,116,117,114,110,0,107,101,121,119,111,114,100,95,121,105,101,108,100,0,107,101,121,119,111,114,100,95,115,117,112,101,114,0,107,101,121,119,111,114,100,95,115,101,108,102,0,107,101,121,119,111,114,100,95,110,105,108,0,107,101,121,119,111,114,100,95,116,114,117,101,0,107,101,121,119,111,114,100,95,102,97,108,115,101,0,107,101,121,119,111,114,100,95,97,110,100,0,107,101,121,119,111,114,100,95,111,114,0,107,101,121,119,111,114,100,95,110,111,116,0,109,111,100,105,102,105,101,114,95,105,102,0,109,111,100,105,102,105,101,114,95,117,110,108,101,115,115,0,109,111,100,105,102,105,101,114,95,119,104,105,108,101,0,109,111,100,105,102,105,101,114,95,117,110,116,105,108,0,109,111,100,105,102,105,101,114,95,114,101,115,99,117,101,0,107,101,121,119,111,114,100,95,97,108,105,97,115,0,107,101,121,119,111,114,100,95,66,69,71,73,78,0,107,101,121,119,111,114,100,95,69,78,68,0,107,101,121,119,111,114,100,95,95,76,73,78,69,95,95,0,107,101,121,119,111,114,100,95,95,70,73,76,69,95,95,0,107,101,121,119,111,114,100,95,95,69,78,67,79,68,73,78,71,95,95,0,116,73,68,69,78,84,73,70,73,69,82,0,116,70,73,68,0,116,71,86,65,82,0,116,73,86,65,82,0,116,67,79,78,83,84,65,78,84,0,116,67,86,65,82,0,116,76,65,66,69,76,0,116,73,78,84,69,71,69,82,0,116,70,76,79,65,84,0,116,67,72,65,82,0,116,88,83,84,82,73,78,71,0,116,82,69,71,69,88,80,0,116,83,84,82,73,78,71,0,116,83,84,82,73,78,71,95,80,65,82,84,0,116,83,84,82,73,78,71,95,77,73,68,0,116,78,84,72,95,82,69,70,0,116,66,65,67,75,95,82,69,70,0,116,82,69,71,69,88,80,95,69,78,68,0,116,85,80,76,85,83,0,116,85,77,73,78,85,83,0,116,80,79,87,0,116,67,77,80,0,116,69,81,0,116,69,81,81,0,116,78,69,81,0,116,71,69,81,0,116,76,69,81,0,116,65,78,68,79,80,0,116,79,82,79,80,0,116,77,65,84,67,72,0,116,78,77,65,84,67,72,0,116,68,79,84,50,0,116,68,79,84,51,0,116,65,82,69,70,0,116,65,83,69,84,0,116,76,83,72,70,84,0,116,82,83,72,70,84,0,116,67,79,76,79,78,50,0,116,67,79,76,79,78,51,0,116,79,80,95,65,83,71,78,0,116,65,83,83,79,67,0,116,76,80,65,82,69,78,0,116,76,80,65,82,69,78,95,65,82,71,0,116,82,80,65,82,69,78,0,116,76,66,82,65,67,75,0,116,76,66,82,65,67,69,0,116,76,66,82,65,67,69,95,65,82,71,0,116,83,84,65,82,0,116,65,77,80,69,82,0,116,76,65,77,66,68,65,0,116,83,89,77,66,69,71,0,116,82,69,71,69,88,80,95,66,69,71,0,116,87,79,82,68,83,95,66,69,71,0,116,83,89,77,66,79,76,83,95,66,69,71,0,116,83,84,82,73,78,71,95,66,69,71,0,116,88,83,84,82,73,78,71,95,66,69,71,0,116,83,84,82,73,78,71,95,68,86,65,82,0,116,76,65,77,66,69,71,0,116,72,69,82,69,68,79,67,95,66,69,71,0,116,72,69,82,69,68,79,67,95,69,78,68,0,116,76,73,84,69,82,65,76,95,68,69,76,73,77,0,116,72,68,95,76,73,84,69,82,65,76,95,68,69,76,73,77,0,116,72,68,95,83,84,82,73,78,71,95,80,65,82,84,0,116,72,68,95,83,84,82,73,78,71,95,77,73,68,0,116,76,79,87,69,83,84,0,39,61,39,0,39,63,39,0,39,58,39,0,39,62,39,0,39,60,39,0,39,124,39,0,39,94,39,0,39,38,39,0,39,43,39,0,39,45,39,0,39,42,39,0,39,47,39,0,39,37,39,0,116,85,77,73,78,85,83,95,78,85,77,0,39,33,39,0,39,126,39,0,116,76,65,83,84,95,84,79,75,69,78,0,39,123,39,0,39,125,39,0,39,91,39,0,39,46,39,0,39,44,39,0,39,96,39,0,39,40,39,0,39,41,39,0,39,93,39,0,39,59,39,0,39,92,110,39,0,36,97,99,99,101,112,116,0,112,114,111,103,114,97,109,0,36,64,49,0,116,111,112,95,99,111,109,112,115,116,109,116,0,116,111,112,95,115,116,109,116,115,0,116,111,112,95,115,116,109,116,0,64,50,0,98,111,100,121,115,116,109,116,0,99,111,109,112,115,116,109,116,0,115,116,109,116,115,0,115,116,109,116],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+51200),
+allocate([0,36,64,51,0,99,111,109,109,97,110,100,95,97,115,103,110,0,101,120,112,114,0,101,120,112,114,95,118,97,108,117,101,0,99,111,109,109,97,110,100,95,99,97,108,108,0,98,108,111,99,107,95,99,111,109,109,97,110,100,0,99,109,100,95,98,114,97,99,101,95,98,108,111,99,107,0,36,64,52,0,99,111,109,109,97,110,100,0,109,108,104,115,0,109,108,104,115,95,105,110,110,101,114,0,109,108,104,115,95,98,97,115,105,99,0,109,108,104,115,95,105,116,101,109,0,109,108,104,115,95,108,105,115,116,0,109,108,104,115,95,112,111,115,116,0,109,108,104,115,95,110,111,100,101,0,108,104,115,0,99,110,97,109,101,0,99,112,97,116,104,0,102,110,97,109,101,0,102,115,121,109,0,117,110,100,101,102,95,108,105,115,116,0,36,64,53,0,111,112,0,114,101,115,119,111,114,100,115,0,97,114,103,0,97,114,103,95,118,97,108,117,101,0,97,114,101,102,95,97,114,103,115,0,112,97,114,101,110,95,97,114,103,115,0,111,112,116,95,112,97,114,101,110,95,97,114,103,115,0,111,112,116,95,99,97,108,108,95,97,114,103,115,0,99,97,108,108,95,97,114,103,115,0,99,111,109,109,97,110,100,95,97,114,103,115,0,64,54,0,98,108,111,99,107,95,97,114,103,0,111,112,116,95,98,108,111,99,107,95,97,114,103,0,97,114,103,115,0,109,114,104,115,0,112,114,105,109,97,114,121,0,64,55,0,64,56,0,36,64,57,0,36,64,49,48,0,64,49,49,0,64,49,50,0,36,64,49,51,0,36,64,49,52,0,36,64,49,53,0,36,64,49,54,0,36,64,49,55,0,36,64,49,56,0,64,49,57,0,64,50,48,0,64,50,49,0,64,50,50,0,64,50,51,0,64,50,52,0,64,50,53,0,64,50,54,0,112,114,105,109,97,114,121,95,118,97,108,117,101,0,105,102,95,116,97,105,108,0,111,112,116,95,101,108,115,101,0,102,111,114,95,118,97,114,0,102,95,109,97,114,103,0,102,95,109,97,114,103,95,108,105,115,116,0,102,95,109,97,114,103,115,0,98,108,111,99,107,95,112,97,114,97,109,0,111,112,116,95,98,108,111,99,107,95,112,97,114,97,109,0,98,108,111,99,107,95,112,97,114,97,109,95,100,101,102,0,111,112,116,95,98,118,95,100,101,99,108,0,98,118,95,100,101,99,108,115,0,98,118,97,114,0,102,95,108,97,114,103,108,105,115,116,0,108,97,109,98,100,97,95,98,111,100,121,0,100,111,95,98,108,111,99,107,0,36,64,50,55,0,98,108,111,99,107,95,99,97,108,108,0,109,101,116,104,111,100,95,99,97,108,108,0,98,114,97,99,101,95,98,108,111,99,107,0,64,50,56,0,64,50,57,0,99,97,115,101,95,98,111,100,121,0,99,97,115,101,115,0,111,112,116,95,114,101,115,99,117,101,0,101,120,99,95,108,105,115,116,0,101,120,99,95,118,97,114,0,111,112,116,95,101,110,115,117,114,101,0,108,105,116,101,114,97,108,0,115,116,114,105,110,103,0,115,116,114,105,110,103,95,114,101,112,0,115,116,114,105,110,103,95,105,110,116,101,114,112,0,64,51,48,0,120,115,116,114,105,110,103,0,114,101,103,101,120,112,0,104,101,114,101,100,111,99,0,111,112,116,95,104,101,114,101,100,111,99,95,98,111,100,105,101,115,0,104,101,114,101,100,111,99,95,98,111,100,105,101,115,0,104,101,114,101,100,111,99,95,98,111,100,121,0,104,101,114,101,100,111,99,95,115,116,114,105,110,103,95,114,101,112,0,104,101,114,101,100,111,99,95,115,116,114,105,110,103,95,105,110,116,101,114,112,0,64,51,49,0,119,111,114,100,115,0,115,121,109,98,111,108,0,98,97,115,105,99,95,115,121,109,98,111,108,0,115,121,109,0,115,121,109,98,111,108,115,0,110,117,109,101,114,105,99,0,118,97,114,105,97,98,108,101,0,118,97,114,95,108,104,115,0,118,97,114,95,114,101,102,0,98,97,99,107,114,101,102,0,36,64,51,50,0,102,95,97,114,103,108,105,115,116,0,102,95,97,114,103,115,0,102,95,98,97,100,95,97,114,103,0,102,95,110,111,114,109,95,97,114,103,0,102,95,97,114,103,95,105,116,101,109,0,102,95,97,114,103,0,102,95,111,112,116,95,97,115,103,110,0,102,95,111,112,116,0,102,95,98,108,111,99,107,95,111,112,116,0,102,95,98,108,111,99,107,95,111,112,116,97,114,103,0,102,95,111,112,116,97,114,103,0,114,101,115,116,97,114,103,95,109,97,114,107,0,102,95,114,101,115,116,95,97,114,103,0,98,108,107,97,114,103,95,109,97,114,107,0,102,95,98,108,111,99,107,95,97,114,103,0,111,112,116,95,102,95,98,108,111,99,107,95,97,114,103,0,115,105,110,103,108,101,116,111,110,0,36,64,51,51,0,97,115,115,111,99,95,108,105,115,116,0,97,115,115,111,99,115,0,97,115,115,111,99,0,111,112,101,114,97,116,105,111,110,0,111,112,101,114,97,116,105,111,110,50,0,111,112,101,114,97,116,105,111,110,51,0,100,111,116,95,111,114,95,99,111,108,111,110,0,111,112,116,95,116,101,114,109,115,0,111,112,116,95,110,108,0,114,112,97,114,101,110,0,114,98,114,97,99,107,101,116,0,116,114,97,105,108,101,114,0,116,101,114,109,0,110,108,0,36,64,51,52,0,116,101,114,109,115,0,110,111,110,101,0,44,32,101,120,112,101,99,116,105,110,103,32,37,115,0,115,121,110,116,97,120,32,101,114,114,111,114,44,32,117,110,101,120,112,101,99,116,101,100,32,37,115,0,32,111,114,32,37,115,0,115,121,110,116,97,120,32,101,114,114,111,114,0,69,114,114,111,114,58,32,100,105,115,99,97,114,100,105,110,103,0,68,101,108,101,116,105,110,103,0,69,114,114,111,114,58,32,112,111,112,112,105,110,103,0,109,101,109,111,114,121,32,101,120,104,97,117,115,116,101,100,0,67,108,101,97,110,117,112,58,32,100,105,115,99,97,114,100,105,110,103,32,108,111,111,107,97,104,101,97,100,0,67,108,101,97,110,117,112,58,32,112,111,112,112,105,110,103,0,37,48,53,100,32,0,78,79,68,69,95,66,69,71,73,78,58,10,0,78,79,68,69,95,82,69,83,67,85,69,58,10,0,98,111,100,121,58,10,0,114,101,115,99,117,101,58,10,0,104,97,110,100,108,101,32,99,108,97,115,115,101,115,58,10,0,101,120,99,95,118,97,114,58,10,0,114,101,115,99,117,101,32,98,111,100,121,58,10,0,101,108,115,101,58,10,0,78,79,68,69,95,69,78,83,85,82,69,58,10,0,101,110,115,117,114,101,58,10,0,78,79,68,69,95,66,76,79,67,75,58,10,0,109,97,110,100,97,116,111,114,121,32,97,114,103,115,58,10,0,111,112,116,105,111,110,97,108,32,97,114,103,115,58,10,0,37,115,61,0,114,101,115,116,61,42,37,115,10,0,112,111,115,116,32,109,97,110,100,97,116,111,114,121,32,97,114,103,115,58,10,0,98,108,107,61,38,37,115,10,0,78,79,68,69,95,73,70,58,10,0,99,111,110,100,58,10,0,116,104,101,110,58,10,0,78,79,68,69,95,65,78,68,58,10,0,78,79,68,69,95,79,82,58,10,0,78,79,68,69,95,67,65,83,69,58,10,0,99,97,115,101,58,10,0,78,79,68,69,95,87,72,73,76,69,58,10,0,78,79,68,69,95,85,78,84,73,76,58,10,0,78,79,68,69,95,70,79,82,58,10,0,118,97,114,58,10,0,112,114,101,58,10,0,114,101,115,116,58,10,0,112,111,115,116,58,10,0,105,110,58,10,0,100,111,58,10,0,78,79,68,69,95,83,67,79,80,69,58,10,0,108,111,99,97,108,32,118,97,114,105,97,98,108,101,115,58,10,0,44,32,0,37,115,0,78,79,68,69,95,67,65,76,76,58,10,0,109,101,116,104,111,100,61,39,37,115,39,32,40,37,100,41,10,0,97,114,103,115,58,10,0,98,108,111,99,107,58,10,0,78,79,68,69,95,68,79,84,50,58,10,0,78,79,68,69,95,68,79,84,51,58,10,0,78,79,68,69,95,67,79,76,79,78,50,58,10,0,58,58,37,115,10,0,78,79,68,69,95,67,79,76,79,78,51,58,32,58,58,37,115,10,0,78,79,68,69,95,65,82,82,65,89,58,10,0,78,79,68,69,95,72,65,83,72,58,10,0,107,101,121,58,10,0,118,97,108,117,101,58,10,0,78,79,68,69,95,83,80,76,65,84,58,10,0,78,79,68,69,95,65,83,71,78,58,10,0,108,104,115,58,10,0,114,104,115,58,10,0,78,79,68,69,95,77,65,83,71,78,58,10,0,109,108,104,115,58,10,0,40,101,109,112,116,121,41,10,0,78,79,68,69,95,79,80,95,65,83,71,78,58,10,0,111,112,61,39,37,115,39,32,40,37,100,41,10,0,78,79,68,69,95,83,85,80,69,82,58,10,0,78,79,68,69,95,90,83,85,80,69,82,10,0,78,79,68,69,95,82,69,84,85,82,78,58,10,0,78,79,68,69,95,89,73,69,76,68,58,10,0,78,79,68,69,95,66,82,69,65,75,58,10,0,78,79,68,69,95,78,69,88,84,58,10,0,78,79,68,69,95,82,69,68,79,10,0,78,79,68,69,95,82,69,84,82,89,10,0,78,79,68,69,95,76,86,65,82,32,37,115,10,0,78,79,68,69,95,71,86,65,82,32,37,115,10,0,78,79,68,69,95,73,86,65,82,32,37,115,10,0,78,79,68,69,95,67,86,65,82,32,37,115,10,0,78,79,68,69,95,67,79,78,83,84,32,37,115,10,0,78,79,68,69,95,77,65,84,67,72,58,10,0,78,79,68,69,95,66,65,67,75,95,82,69,70,58,32,36,37,99,10,0,78,79,68,69,95,78,84,72,95,82,69,70,58,32,36,37,100,10,0,78,79,68,69,95,65,82,71,32,37,115,10,0,78,79,68,69,95,66,76,79,67,75,95,65,82,71,58,10,0,78,79,68,69,95,73,78,84,32,37,115,32,98,97,115,101,32,37,100,10,0,78,79,68,69,95,70,76,79,65,84,32,37,115,10,0,78,79,68,69,95,78,69,71,65,84,69,10,0,78,79,68,69,95,83,84,82,32,34,37,115,34,32,108,101,110,32,37,100,10,0,78,79,68,69,95,68,83,84,82,10,0,78,79,68,69,95,88,83,84,82,32,34,37,115,34,32,108,101,110,32,37,100,10,0,78,79,68,69,95,68,88,83,84,82,10,0,78,79,68,69,95,82,69,71,88,32,47,37,115,47,37,115,10,0,78,79,68,69,95,68,82,69,71,88,10,0,116,97,105,108,58,32,37,115,10,0,111,112,116,58,32,37,115,10,0,78,79,68,69,95,83,89,77,32,58,37,115,10,0,78,79,68,69,95,83,69,76,70,10,0,78,79,68,69,95,78,73,76,10,0,78,79,68,69,95,84,82,85,69,10,0,78,79,68,69,95,70,65,76,83,69,10,0,78,79,68,69,95,65,76,73,65,83,32,37,115,32,37,115,58,10,0,78,79,68,69,95,85,78,68,69,70,0,32,37,115,0,58,10,0,78,79,68,69,95,67,76,65,83,83,58,10,0,58,37,115,10,0,115,117,112,101,114,58,10,0,78,79,68,69,95,77,79,68,85,76,69,58,10,0,78,79,68,69,95,83,67,76,65,83,83,58,10,0,78,79,68,69,95,68,69,70,58,10,0,37,115,10,0,78,79,68,69,95,83,68,69,70,58,10,0,78,79,68,69,95,80,79,83,84,69,88,69,58,10,0,78,79,68,69,95,72,69,82,69,68,79,67,58,10,0,110,111,100,101,32,116,121,112,101,58,32,37,100,32,40,48,120,37,120,41,10,0,109,101,109,111,114,121,32,97,108,108,111,99,97,116,105,111,110,32,101,114,114,111,114,0,108,105,110,101,32,37,100,58,32,37,115,10,0,99,111,100,101,103,101,110,32,101,114,114,111,114,0,97,114,114,97,121,32,115,105,122,101,32,116,111,111,32,98,105,103,0,105,110,100,101,120,32,37,83,32,111,117,116,32,111,102,32,97,114,114,97,121,0,110,101,103,97,116,105,118,101,32,108,101,110,103,116,104,32,40,37,83,41,0,105,110,100,101,120,32,105,115,32,111,117,116,32,111,102,32,97,114,114,97,121,0,116,111,95,97,0,114,101,99,117,114,115,105,118,101,32,97,114,114,97,121,32,106,111,105,110,0,43,0,97,0,105,0,110,101,103,97,116,105,118,101,32,97,114,103,117,109,101,110,116,0,60,60,0,111,124,105,0,105,42,0,91,93,61,0,111,111,124,111,0,99,108,101,97,114,0,99,111,110,99,97,116,0,100,101,108,101,116,101,95,97,116,0,101,109,112,116,121,63,0,124,105,0,110,101,103,97,116,105,118,101,32,97,114,114,97,121,32,115,105,122,101,0,105,110,100,101,120,0,65,0,106,111,105,110,0,124,83,33,0,108,101,110,103,116,104,0,112,111,112,0,112,117,115,104,0,114,101,112,108,97,99,101,0,114,101,118,101,114,115,101,0,114,101,118,101,114,115,101,33,0,114,105,110,100,101,120,0,115,104,105,102,116,0,115,105,122,101,0,115,108,105,99,101,0,117,110,115,104,105,102,116,0,95,95,97,114,121,95,101,113,0,95,95,97,114,121,95,99,109,112,0,95,95,97,114,121,95,105,110,100,101,120,0,35,0,40,117,110,107,110,111,119,110,41,0,58,105,110,32,0,2,8,32,128,1,4,16,64,3,12,48,192,95,95,111,117,116,101,114,95,95,0,95,95,99,108,97,115,115,105,100,95,95,0,37,83,32,105,115,32,110,111,116,32,97,32,99,108,97,115,115,47,109,111,100,117,108,101,0,110,111,32,115,117,112,101,114,32,99,108,97,115,115,32,102,111,114,32,39,37,83,39,44,32,79,98,106,101,99,116,32,97,115,115,117,109,101,100,0,115,117,112,101,114,99,108,97,115,115,32,109,105,115,109,97,116,99,104,32,102,111,114,32,67,108,97,115,115,32,37,83,32,40,37,83,32,110,111,116,32,37,83,41,0,115,117,112,101,114,99,108,97,115,115,32,109,117,115,116,32,98,101,32,97,32,67,108,97,115,115,32,40,37,83,32,103,105,118,101,110,41,0,99,97,110,39,116,32,109,97,107,101,32,115,117,98,99,108,97,115,115,32,111,102,32,115,105,110,103,108,101,116,111,110,32,99,108,97,115,115,0,99,97,110,39,116,32,109,97,107,101,32,115,117,98,99,108,97,115,115,32,111,102,32,67,108,97,115,115,0,105,110,104,101,114,105,116,101,100,0,78,111,116,73,109,112,108,101,109,101,110,116,101,100,69,114,114,111,114,0,119,114,111,110,103,32,110,117,109,98,101,114,32,111,102,32,97,114,103,117,109,101,110,116,115,0,37,83,32,105,115,32,110,111,116,32,99,108,97,115,115,47,109,111,100,117,108,101,0,83,116,114,105,110,103,0,116,111,95,115,116,114,0,101,120,112,101,99,116,101,100,32,37,83,0,65,114,114,97,121,0,116,111,95,97,114,121,0,72,97,115,104,0,116,111,95,104,97,115,104,0,82,97,110,103,101,69,114,114,111,114,0,102,108,111,97,116,32,116,111,111,32,98,105,103,32,102,111,114,32,105,110,116,0,110,111,32,105,109,112,108,105,99,105,116,32,99,111,110,118,101,114,115,105,111,110,32,111,102,32,83,116,114,105,110,103,32,105,110,116,111,32,73,110,116,101,103,101,114,0,105,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,32,115,112,101,99,105,102,105,101,114,32,37,83,0,99,121,99,108,105,99,32,105,110,99,108,117,100,101,32,100,101,116,101,99,116,101,100,0,99,121,99,108,105,99,32,112,114,101,112,101,110,100,32,100,101,116,101,99,116,101,100,0,99,97,110,39,116,32,100,101,102,105,110,101,32,115,105,110,103,108,101,116,111,110,0,117,110,100,101,102,105,110,101,100,32,109,101,116,104,111,100,32,39,37,83,39,32,102,111,114,32,99,108,97,115,115,32,37,83,0,42,38,0,99,97,110,39,116,32,99,114,101,97,116,101,32,105,110,115,116,97,110,99,101,32,111,102,32,115,105,110,103,108,101,116,111,110,32,99,108,97,115,115,0,117,110,100,101,102,105,110,101,100,32,109,101,116,104,111,100,32,39,37,83,39,32,102,111,114,32,37,83,0,95,95,99,108,97,115,115,112,97,116,104,95,95,0,35,60,67,108,97,115,115,58,0,62,0,58,58,0,117,110,100,101,102,105,110,101,100,32,109,101,116,104,111,100,32,39,37,83,39,32,102,111,114,32,99,108,97,115,115,32,39,37,83,39,0,66,97,115,105,99,79,98,106,101,99,116,0,79,98,106,101,99,116,0,77,111,100,117,108,101,0,67,108,97,115,115,0,80,114,111,99,0,33,0,109,101,116,104,111,100,95,109,105,115,115,105,110,103,0,110,42,0,124,67,38,0,115,117,112,101,114,99,108,97,115,115,0,99,108,97,115,115,95,118,97,114,105,97,98,108,101,95,100,101,102,105,110,101,100,63,0,39,37,83,39,32,105,115,32,110,111,116,32,97,108,108,111,119,101,100,32,97,115,32,97,32,99,108,97,115,115,32,118,97,114,105,97,98,108,101,32,110,97,109,101,0,99,108,97,115,115,95,118,97,114,105,97,98,108,101,95,103,101,116,0,99,108,97,115,115,95,118,97,114,105,97,98,108,101,95,115,101,116,0,112,114,101,112,101,110,100,0,112,114,101,112,101,110,100,95,102,101,97,116,117,114,101,115,0,112,114,101,112,101,110,100,101,100,0,105,110,99,108,117,100,101,0,97,112,112,101,110,100,95,102,101,97,116,117,114,101,115,0,105,110,99,108,117,100,101,100,0,99,108,97,115,115,95,101,118,97,108,0,105,110,99,108,117,100,101,100,95,109,111,100,117,108,101,115,0,124,38,0,105,110,115,116,97,110,99,101,95,109,101,116,104,111,100,115,0,109,101,116,104,111,100,95,100,101,102,105,110,101,100,63,0,109,111,100,117,108,101,95,101,118,97,108,0,109,111,100,117,108,101,95,102,117,110,99,116,105,111,110,0,112,114,105,118,97,116,101,0,112,114,111,116,101,99,116,101,100,0,112,117,98,108,105,99,0,114,101,109,111,118,101,95,99,108,97,115,115,95,118,97,114,105,97,98,108,101,0,99,97,110,110,111,116,32,114,101,109,111,118,101,32,37,83,32,102,111,114,32,37,83,0,99,108,97,115,115,32,118,97,114,105,97,98,108,101,32,37,83,32,110,111,116,32,100,101,102,105,110,101,100,32,102,111,114,32,37,83,0,114,101,109,111,118,101,95,109,101,116,104,111,100,0,109,101,116,104,111,100,95,114,101,109,111,118,101,100,0,109,101,116,104,111,100,32,39,37,83,39,32,110,111,116,32,100,101,102,105,110,101,100,32,105,110,32,37,83,0,97,116,116,114,95,114,101,97,100,101,114,0,64,0,97,116,116,114,95,119,114,105,116,101,114,0,61,0,35,60,77,111,100,117,108,101,58,0,35,60,63,63,63,63,63,63,58,0,110,110,0,97,110,99,101,115,116,111,114,115,0,99,111,110,115,116,95,100,101,102,105,110,101,100,63,0,110,124,98,0,119,114,111,110,103,32,99,111,110,115,116,97,110,116,32,110,97,109,101,32,37,83,0,99,111,110,115,116,95,103,101,116,0,99,111,110,115,116,95,115,101,116,0,99,111,110,115,116,97,110,116,115,0,114,101,109,111,118,101,95,99,111,110,115,116,0,99,111,110,115,116,97,110,116,32,37,83,32,110,111,116,32,100,101,102,105,110,101,100,0,99,111,110,115,116,95,109,105,115,115,105,110,103,0,117,110,105,110,105,116,105,97,108,105,122,101,100,32,99,111,110,115,116,97,110,116,32,37,83,58,58,37,83,0,117,110,105,110,105,116,105,97,108,105,122,101,100,32,99,111,110,115,116,97,110,116,32,37,83,0,100,101,102,105,110,101,95,109,101,116,104,111,100,0,99,108,97,115,115,95,118,97,114,105,97,98,108,101,115,0,77,111,100,117,108,101,46,99,111,110,115,116,97,110,116,115,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,105,114,101,112,32,37,112,32,110,114,101,103,115,61,37,100,32,110,108,111,99,97,108,115,61,37,100,32,112,111,111,108,115,61,37,100,32,115,121,109,115,61,37,100,32,114,101,112,115,61,37,100,10,0,102,105,108,101,58,32,37,115,10,0,32,32,32,32,32,32,0,37,53,100,32,0,37,48,51,100,32,0,79,80,95,78,79,80,10,0,79,80,95,77,79,86,69,9,82,37,100,9,82,37,100,9,0,10,0,9,59,32,0,32,0,82,37,100,58,37,115,0,79,80,95,76,79,65,68,76,9,82,37,100,9,76,40,37,100,41,9,59,32,37,115,0,79,80,95,76,79,65,68,73,9,82,37,100,9,37,100,9,0,79,80,95,76,79,65,68,83,89,77,9,82,37,100,9,58,37,115,0,79,80,95,76,79,65,68,78,73,76,9,82,37,100,9,9,0,79,80,95,76,79,65,68,83,69,76,70,9,82,37,100,9,9,0,79,80,95,76,79,65,68,84,9,82,37,100,9,9,0,79,80,95,76,79,65,68,70,9,82,37,100,9,9,0,79,80,95,71,69,84,71,76,79,66,65,76,9,82,37,100,9,58,37,115,0,79,80,95,83,69,84,71,76,79,66,65,76,9,58,37,115,9,82,37,100,9,0,79,80,95,71,69,84,67,79,78,83,84,9,82,37,100,9,58,37,115,0,79,80,95,83,69,84,67,79,78,83,84,9,58,37,115,9,82,37,100,9,0,79,80,95,71,69,84,77,67,78,83,84,9,82,37,100,9,82,37,100,58,58,37,115,0,79,80,95,83,69,84,77,67,78,83,84,9,82,37,100,58,58,37,115,9,82,37,100,0,79,80,95,71,69,84,73,86,9,82,37,100,9,37,115,0,79,80,95,83,69,84,73,86,9,37,115,9,82,37,100,0,79,80,95,71,69,84,85,80,86,65,82,9,82,37,100,9,37,100,9,37,100,0,79,80,95,83,69,84,85,80,86,65,82,9,82,37,100,9,37,100,9,37,100,0,79,80,95,71,69,84,67,86,9,82,37,100,9,37,115,0,79,80,95,83,69,84,67,86,9,37,115,9,82,37,100,0,79,80,95,74,77,80,9,37,48,51,100,10,0,79,80,95,74,77,80,73,70,9,82,37,100,9,37,48,51,100,10,0,79,80,95,74,77,80,78,79,84,9,82,37,100,9,37,48,51,100,10,0,79,80,95,83,69,78,68,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,83,69,78,68,66,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,84,65,73,76,67,65,76,76,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,83,85,80,69,82,9,82,37,100,9,37,100,10,0,79,80,95,65,82,71,65,82,89,9,82,37,100,9,37,100,58,37,100,58,37,100,58,37,100,0,79,80,95,69,78,84,69,82,9,37,100,58,37,100,58,37,100,58,37,100,58,37,100,58,37,100,58,37,100,10,0,79,80,95,82,69,84,85,82,78,9,82,37,100,0,9,114,101,116,117,114,110,9,0,9,98,114,101,97,107,9,0,9,98,114,111,107,101,110,9,0,79,80,95,66,76,75,80,85,83,72,9,82,37,100,9,37,100,58,37,100,58,37,100,58,37,100,0,79,80,95,76,65,77,66,68,65,9,82,37,100,9,73,40,37,43,100,41,9,37,100,0,79,80,95,82,65,78,71,69,9,82,37,100,9,82,37,100,9,37,100,0,79,80,95,77,69,84,72,79,68,9,82,37,100,9,58,37,115,0,79,80,95,65,68,68,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,65,68,68,73,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,83,85,66,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,83,85,66,73,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,77,85,76,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,68,73,86,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,76,84,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,76,69,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,71,84,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,71,69,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,69,81,9,82,37,100,9,58,37,115,9,37,100,10,0,79,80,95,83,84,79,80,10,0,79,80,95,65,82,82,65,89,9,82,37,100,9,82,37,100,9,37,100,0,79,80,95,65,82,89,67,65,84,9,82,37,100,9,82,37,100,9,0,79,80,95,65,82,89,80,85,83,72,9,82,37,100,9,82,37,100,9,0,79,80,95,65,82,69,70,9,82,37,100,9,82,37,100,9,37,100,0,79,80,95,65,80,79,83,84,9,82,37,100,9,37,100,9,37,100,0,79,80,95,83,84,82,73,78,71,9,82,37,100,9,76,40,37,100,41,9,59,32,37,115,0,79,80,95,83,84,82,67,65,84,9,82,37,100,9,82,37,100,9,0,79,80,95,72,65,83,72,9,82,37,100,9,82,37,100,9,37,100,0,79,80,95,79,67,76,65,83,83,9,82,37,100,9,9,0,79,80,95,67,76,65,83,83,9,82,37,100,9,58,37,115,0,79,80,95,77,79,68,85,76,69,9,82,37,100,9,58,37,115,0,79,80,95,69,88,69,67,9,82,37,100,9,73,40,37,43,100,41,0,79,80,95,83,67,76,65,83,83,9,82,37,100,9,82,37,100,9,0,79,80,95,84,67,76,65,83,83,9,82,37,100,9,9,0,79,80,95,69,82,82,9,37,115,10,0,79,80,95,69,80,85,83,72,9,58,73,40,37,43,100,41,10,0,79,80,95,79,78,69,82,82,9,37,48,51,100,10,0,79,80,95,82,69,83,67,85,69,9,82,37,100,9,9,0,79,80,95,82,65,73,83,69,9,82,37,100,9,9,0,79,80,95,80,79,80,69,82,82,9,37,100,9,9,0,79,80,95,69,80,79,80,9,37,100,10,0,79,80,95,117,110,107,110,111,119,110,32,37,100,9,37,100,9,37,100,9,37,100,10,0,99,105,105,100,120,0,102,105,108,101,0,108,105,110,101,0,78,97,109,101,69,114,114,111,114,0,119,97,114,110,105,110,103,58,32,0,98,117,103,58,32,0,101,120,99,101,112,116,105,111,110,0,101,120,99,101,112,116,105,111,110,32,99,108,97,115,115,47,111,98,106,101,99,116,32,101,120,112,101,99,116,101,100,0,119,114,111,110,103,32,110,117,109,98,101,114,32,111,102,32,97,114,103,117,109,101,110,116,115,32,40,37,83,32,102,111,114,32,48,46,46,51,41,0,101,120,99,101,112,116,105,111,110,32,111,98,106,101,99,116,32,101,120,112,101,99,116,101,100,0,115,101,116,95,98,97,99,107,116,114,97,99,101,0,78,111,77,101,116,104,111,100,69,114,114,111,114,0,110,101,119,0,69,120,99,101,112,116,105,111,110,0,124,111,0,109,101,115,103,0,109,101,115,115,97,103,101,0,58,0,58,32,0,32,40,0,41,0,98,97,99,107,116,114,97,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,83,99,114,105,112,116,69,114,114,111,114,0,83,121,110,116,97,120,69,114,114,111,114,0,83,121,115,116,101,109,83,116,97,99,107,69,114,114,111,114,0,119,114,111,110,103,32,97,114,103,117,109,101,110,116,32,116,121,112,101,32,37,83,32,40,101,120,112,101,99,116,101,100,32,37,83,41,0,117,110,105,110,105,116,105,97,108,105,122,101,100,32,37,83,32,40,101,120,112,101,99,116,101,100,32,37,83,41,0,99,97,110,39,116,32,99,108,111,110,101,32,37,83,0,99,97,110,39,116,32,99,108,111,110,101,32,115,105,110,103,108,101,116,111,110,32,99,108,97,115,115,0,95,95,97,116,116,97,99,104,101,100,95,95,0,99,97,110,39,116,32,100,117,112,32,37,83,0,99,97,110,39,116,32,100,117,112,32,115,105,110,103,108,101,116,111,110,32,99,108,97,115,115,0,2,8,32,128,1,4,16,64,3,12,48,192,124,111,111,0,82,117,110,116,105,109,101,69,114,114,111,114,0,108,97,115,116,112,99,0,98,108,111,99,107,95,103,105,118,101,110,63,0,103,108,111,98,97,108,95,118,97,114,105,97,98,108,101,115,0,105,116,101,114,97,116,111,114,63,0,108,111,99,97,108,95,118,97,114,105,97,98,108,101,115,0,114,97,105,115,101,0,115,105,110,103,108,101,116,111,110,95,99,108,97,115,115,0,33,61,0,95,95,105,100,95,95,0,95,95,115,101,110,100,95,95,0,99,108,97,115,115,0,99,108,111,110,101,0,100,117,112,0,101,113,117,97,108,63,0,101,120,116,101,110,100,0,42,0,119,114,111,110,103,32,110,117,109,98,101,114,32,111,102,32,97,114,103,117,109,101,110,116,115,32,40,97,116,32,108,101,97,115,116,32,49,41,0,101,120,116,101,110,100,95,111,98,106,101,99,116,0,101,120,116,101,110,100,101,100,0,104,97,115,104,0,105,110,105,116,105,97,108,105,122,101,95,99,111,112,121,32,115,104,111,117,108,100,32,116,97,107,101,32,115,97,109,101,32,99,108,97,115,115,32,111,98,106,101,99,116,0,105,110,115,116,97,110,99,101,95,101,118,97,108,0,105,110,115,116,97,110,99,101,95,111,102,63,0,67,0,105,110,115,116,97,110,99,101,95,118,97,114,105,97,98,108,101,95,100,101,102,105,110,101,100,63,0,110,0,105,110,115,116,97,110,99,101,95,118,97,114,105,97,98,108,101,95,103,101,116,0,105,110,115,116,97,110,99,101,95,118,97,114,105,97,98,108,101,95,115,101,116,0,110,111,0,105,110,115,116,97,110,99,101,95,118,97,114,105,97,98,108,101,115,0,105,115,95,97,63,0,107,105,110,100,95,111,102,63,0,109,101,116,104,111,100,115,0,124,98,0,110,105,108,63,0,111,98,106,101,99,116,95,105,100,0,112,114,105,118,97,116,101,95,109,101,116,104,111,100,115,0,112,114,111,116,101,99,116,101,100,95,109,101,116,104,111,100,115,0,112,117,98,108,105,99,95,109,101,116,104,111,100,115,0,114,101,109,111,118,101,95,105,110,115,116,97,110,99,101,95,118,97,114,105,97,98,108,101,0,105,110,115,116,97,110,99,101,32,118,97,114,105,97,98,108,101,32,37,83,32,110,111,116,32,100,101,102,105,110,101,100,0,114,101,115,112,111,110,100,95,116,111,63,0,111,124,98,0,37,83,32,105,115,32,110,111,116,32,97,32,115,121,109,98,111,108,0,114,101,115,112,111,110,100,95,116,111,95,109,105,115,115,105,110,103,63,0,115,101,110,100,0,115,105,110,103,108,101,116,111,110,95,109,101,116,104,111,100,115,0,100,101,102,105,110,101,95,115,105,110,103,108,101,116,111,110,95,109,101,116,104,111,100,0,110,38,0,110,111,32,98,108,111,99,107,32,103,105,118,101,110,0,67,97,110,39,116,32,103,101,116,32,99,102,117,110,99,32,101,110,118,32,102,114,111,109,32,110,111,110,45,99,102,117,110,99,32,112,114,111,99,46,0,67,97,110,39,116,32,103,101,116,32,99,102,117,110,99,32,101,110,118,32,102,114,111,109,32,99,102,117,110,99,32,80,114,111,99,32,119,105,116,104,111,117,116,32,82,69,110,118,46,0,73,110,100,101,120,69,114,114,111,114,0,69,110,118,32,105,110,100,101,120,32,111,117,116,32,111,102,32,114,97,110,103,101,58,32,37,83,32,40,101,120,112,101,99,116,101,100,58,32,48,32,60,61,32,105,110,100,101,120,32,60,32,37,83,41,0,38,0,116,114,105,101,100,32,116,111,32,99,114,101,97,116,101,32,80,114,111,99,32,111,98,106,101,99,116,32,119,105,116,104,111,117,116,32,97,32,98,108,111,99,107,0,110,111,116,32,97,32,112,114,111,99,0,97,114,105,116,121,0,91,93,0,108,97,109,98,100,97,0,60,61,62,0,65,114,103,117,109,101,110,116,69,114,114,111,114,0,98,97,100,32,118,97,108,117,101,32,102,111,114,32,114,97,110,103,101,0,82,97,110,103,101,0,111,111,124,98,0,111,0,61,61,0,84,121,112,101,69,114,114,111,114,0,98,101,103,105,110,0,101,110,100,0,101,120,99,108,117,100,101,95,101,110,100,63,0,102,105,114,115,116,0,105,110,99,108,117,100,101,63,0,105,110,105,116,105,97,108,105,122,101,0,108,97,115,116,0,109,101,109,98,101,114,63,0,116,111,95,115,0,46,46,46,0,105,110,115,112,101,99,116,0,101,113,108,63,0,105,110,105,116,105,97,108,105,122,101,95,99,111,112,121,0,119,114,111,110,103,32,97,114,103,117,109,101,110,116,32,99,108,97,115,115,0,49,46,50,46,48,0,49,46,57,0,82,85,66,89,95,86,69,82,83,73,79,78,0,109,114,117,98,121,0,82,85,66,89,95,69,78,71,73,78,69,0,82,85,66,89,95,69,78,71,73,78,69,95,86,69,82,83,73,79,78,0,77,82,85,66,89,95,86,69,82,83,73,79,78,0,77,82,85,66,89,95,82,69,76,69,65,83,69,95,78,79,0,50,48,49,53,45,49,49,45,49,55,0,77,82,85,66,89,95,82,69,76,69,65,83,69,95,68,65,84,69,0,109,114,117,98,121,32,49,46,50,46,48,32,40,50,48,49,53,45,49,49,45,49,55,41,32,0,77,82,85,66,89,95,68,69,83,67,82,73,80,84,73,79,78,0,109,114,117,98,121,32,45,32,67,111,112,121,114,105,103,104,116,32,40,99,41,32,50,48,49,48,45,50,48,49,53,32,109,114,117,98,121,32,100,101,118,101,108,111,112,101,114,115,0,77,82,85,66,89,95,67,79,80,89,82,73,71,72,84,0,109,114,98,95,114,101,97,108,108,111,99,0,99,111,100,101,103,101,110,32,101,114,114,111,114,58,37,115,58,37,100,58,32,37,115,10,0,99,111,100,101,103,101,110,32,101,114,114,111,114,58,32,37,115,10,0,116,111,111,32,99,111,109,112,108,101,120,32,101,120,112,114,101,115,115,105,111,110,0,112,111,111,108,32,109,101,109,111,114,121,32,97,108,108,111,99,97,116,105,111,110,0,98,117,103,58,32,100,105,115,112,97,116,99,104,32,111,110,32,110,111,110,32,74,77,80,32,111,112,10,0,83,116,97,110,100,97,114,100,69,114,114,111,114,0,116,111,111,32,109,97,110,121,32,115,121,109,98,111,108,115,32,40,109,97,120,32,50,53,54,41,0,95,95,99,97,115,101,95,101,113,113,0,61,61,61,0,117,110,107,110,111,119,110,32,108,104,115,32,37,100,10,0,117,110,101,120,112,101,99,116,101,100,32,115,99,111,112,101,0,109,114,98,95,109,97,108,108,111,99,0,101,97,99,104,0,95,95,117,112,100,97,116,101,0,99,97,108,108,0,117,110,101,120,112,101,99,116,101,100,32,98,114,101,97,107,0,117,110,101,120,112,101,99,116,101,100,32,110,101,120,116,0,117,110,101,120,112,101,99,116,101,100,32,114,101,100,111,0,117,110,101,120,112,101,99,116,101,100,32,114,101,116,114,121,0,36,0,109,97,108,102,111,114,109,101,100,32,114,101,97,100,105,110,116,32,105,110,112,117,116,0,45,0,105,110,116,101,114,110,0,75,101,114,110,101,108,0,96,0,82,101,103,101,120,112,0,99,111,109,112,105,108,101,0,97,108,105,97,115,95,109,101,116,104,111,100,0,117,110,100,101,102,95,109,101,116,104,111,100,0,67,111,109,112,97,114,97,98,108,101,0,69,110,117,109,101,114,97,98,108,101,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,255,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,4,7,3,6,5,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,45,43,32,32,32,48,88,48,120,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+61440),
+allocate([32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,78,65,78,0,46,0,105,110,102,105,110,105,116,121,0,110,97,110,0,114,119,97,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+71680);var tempDoublePtr=STATICTOP;STATICTOP+=16,assert(tempDoublePtr%8==0),Module._i64Subtract=_i64Subtract,Module._i64Add=_i64Add,Module._memset=_memset,Module._bitshift64Shl=_bitshift64Shl;var _llvm_fabs_f64=Math_abs;Module._realloc=_realloc,Module._saveSetjmp=_saveSetjmp;var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var a=Browser.mainLoop.timingMode,b=Browser.mainLoop.timingValue,c=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(c,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(a,b),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var a=Module.statusMessage||"Please wait...",b=Browser.mainLoop.remainingBlockers,c=Browser.mainLoop.expectedBlockers;b?b<c?Module.setStatus(a+" ("+(c-b)+"/"+c+")"):Module.setStatus(a):Module.setStatus("")}},runIter:function(a){if(!ABORT){if(Module.preMainLoop){var b=Module.preMainLoop();if(b===!1)return}try{a()}catch(a){if(a instanceof ExitStatus)return;throw a&&"object"==typeof a&&a.stack&&Module.printErr("exception thrown: "+[a,a.stack]),a}Module.postMainLoop&&Module.postMainLoop()}}},isFullScreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){function d(){Browser.pointerLock=document.pointerLockElement===c||document.mozPointerLockElement===c||document.webkitPointerLockElement===c||document.msPointerLockElement===c}if(Module.preloadPlugins||(Module.preloadPlugins=[]),!Browser.initted){Browser.initted=!0;try{new Blob,Browser.hasBlobConstructor=!0}catch(a){Browser.hasBlobConstructor=!1,console.log("warning: no blob constructor, cannot create blobs with mimetypes")}Browser.BlobBuilder="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:Browser.hasBlobConstructor?null:console.log("warning: no BlobBuilder"),Browser.URLObject="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,Module.noImageDecoding||"undefined"!=typeof Browser.URLObject||(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),Module.noImageDecoding=!0);var a={};a.canHandle=function(b){return!Module.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(b)},a.handle=function(b,c,d,e){var f=null;if(Browser.hasBlobConstructor)try{f=new Blob([b],{type:Browser.getMimetype(c)}),f.size!==b.length&&(f=new Blob([new Uint8Array(b).buffer],{type:Browser.getMimetype(c)}))}catch(a){Runtime.warnOnce("Blob constructor present but fails: "+a+"; falling back to blob builder")}if(!f){var g=new Browser.BlobBuilder;g.append(new Uint8Array(b).buffer),f=g.getBlob()}var h=Browser.URLObject.createObjectURL(f);assert("string"==typeof h,"createObjectURL must return a url as a string");var i=new Image;i.onload=function(){assert(i.complete,"Image "+c+" could not be decoded");var e=document.createElement("canvas");e.width=i.width,e.height=i.height;var f=e.getContext("2d");f.drawImage(i,0,0),Module.preloadedImages[c]=e,Browser.URLObject.revokeObjectURL(h),d&&d(b)},i.onerror=function(b){console.log("Image "+h+" could not be decoded"),e&&e()},i.src=h},Module.preloadPlugins.push(a);var b={};b.canHandle=function(b){return!Module.noAudioDecoding&&b.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},b.handle=function(b,c,d,e){function g(a){f||(f=!0,Module.preloadedAudios[c]=a,d&&d(b))}function h(){f||(f=!0,Module.preloadedAudios[c]=new Audio,e&&e())}var f=!1;if(!Browser.hasBlobConstructor)return h();try{var i=new Blob([b],{type:Browser.getMimetype(c)})}catch(a){return h()}var j=Browser.URLObject.createObjectURL(i);assert("string"==typeof j,"createObjectURL must return a url as a string");var k=new Audio;k.addEventListener("canplaythrough",function(){g(k)},!1),k.onerror=function(d){function e(a){for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c="=",d="",e=0,f=0,g=0;g<a.length;g++)for(e=e<<8|a[g],f+=8;f>=6;){var h=e>>f-6&63;f-=6,d+=b[h]}return 2==f?(d+=b[(3&e)<<4],d+=c+c):4==f&&(d+=b[(15&e)<<2],d+=c),d}f||(console.log("warning: browser could not fully decode audio "+c+", trying slower base64 approach"),k.src="data:audio/x-"+c.substr(-3)+";base64,"+e(b),g(k))},k.src=j,Browser.safeSetTimeout(function(){g(k)},1e4)},Module.preloadPlugins.push(b);var c=Module.canvas;c&&(c.requestPointerLock=c.requestPointerLock||c.mozRequestPointerLock||c.webkitRequestPointerLock||c.msRequestPointerLock||function(){},c.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},c.exitPointerLock=c.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",d,!1),document.addEventListener("mozpointerlockchange",d,!1),document.addEventListener("webkitpointerlockchange",d,!1),document.addEventListener("mspointerlockchange",d,!1),Module.elementPointerLock&&c.addEventListener("click",function(a){!Browser.pointerLock&&c.requestPointerLock&&(c.requestPointerLock(),a.preventDefault())},!1))}},createContext:function(a,b,c,d){if(b&&Module.ctx&&a==Module.canvas)return Module.ctx;var e,f;if(b){var g={antialias:!1,alpha:!1};if(d)for(var h in d)g[h]=d[h];f=GL.createContext(a,g),f&&(e=GL.getContext(f).GLctx),a.style.backgroundColor="black"}else e=a.getContext("2d");return e?(c&&(b||assert("undefined"==typeof GLctx,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=e,b&&GL.makeContextCurrent(f),Module.useWebGL=b,Browser.moduleContextCreatedCallbacks.forEach(function(a){a()}),Browser.init()),e):null},destroyContext:function(a,b,c){},fullScreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullScreen:function(a,b,c){function e(){Browser.isFullScreen=!1;var a=d.parentNode;(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===a?(d.cancelFullScreen=document.cancelFullScreen||document.mozCancelFullScreen||document.webkitCancelFullScreen||document.msExitFullscreen||document.exitFullscreen||function(){},d.cancelFullScreen=d.cancelFullScreen.bind(document),Browser.lockPointer&&d.requestPointerLock(),Browser.isFullScreen=!0,Browser.resizeCanvas&&Browser.setFullScreenCanvasSize()):(a.parentNode.insertBefore(d,a),a.parentNode.removeChild(a),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullScreen),Browser.updateCanvasDimensions(d)}Browser.lockPointer=a,Browser.resizeCanvas=b,Browser.vrDevice=c,"undefined"==typeof Browser.lockPointer&&(Browser.lockPointer=!0),"undefined"==typeof Browser.resizeCanvas&&(Browser.resizeCanvas=!1),"undefined"==typeof Browser.vrDevice&&(Browser.vrDevice=null);var d=Module.canvas;Browser.fullScreenHandlersInstalled||(Browser.fullScreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",e,!1),document.addEventListener("mozfullscreenchange",e,!1),document.addEventListener("webkitfullscreenchange",e,!1),document.addEventListener("MSFullscreenChange",e,!1));var f=document.createElement("div");d.parentNode.insertBefore(f,d),f.appendChild(d),f.requestFullScreen=f.requestFullScreen||f.mozRequestFullScreen||f.msRequestFullscreen||(f.webkitRequestFullScreen?function(){f.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(f.webkitRequestFullscreen?function(){f.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null),c?f.requestFullScreen({vrDisplay:c}):f.requestFullScreen()},nextRAF:0,fakeRequestAnimationFrame:function(a){var b=Date.now();if(0===Browser.nextRAF)Browser.nextRAF=b+1e3/60;else for(;b+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var c=Math.max(Browser.nextRAF-b,0);setTimeout(a,c)},requestAnimationFrame:function(b){"undefined"==typeof window?Browser.fakeRequestAnimationFrame(b):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(b))},safeCallback:function(a){return function(){if(!ABORT)return a.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var a=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],a.forEach(function(a){a()})}},safeRequestAnimationFrame:function(a){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?a():Browser.queuedAsyncCallbacks.push(a))})},safeSetTimeout:function(a,b){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?a():Browser.queuedAsyncCallbacks.push(a))},b)},safeSetInterval:function(a,b){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&a()},b)},getMimetype:function(a){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[a.substr(a.lastIndexOf(".")+1)]},getUserMedia:function(a){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(a)},getMovementX:function(a){return a.movementX||a.mozMovementX||a.webkitMovementX||0},getMovementY:function(a){return a.movementY||a.mozMovementY||a.webkitMovementY||0},getMouseWheelDelta:function(a){var b=0;switch(a.type){case"DOMMouseScroll":b=a.detail;break;case"mousewheel":b=a.wheelDelta;break;case"wheel":b=a.deltaY;break;default:throw"unrecognized mouse wheel event: "+a.type}return b},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(a){if(Browser.pointerLock)"mousemove"!=a.type&&"mozMovementX"in a?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(a),Browser.mouseMovementY=Browser.getMovementY(a)),"undefined"!=typeof SDL?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var b=Module.canvas.getBoundingClientRect(),c=Module.canvas.width,d=Module.canvas.height,e="undefined"!=typeof window.scrollX?window.scrollX:window.pageXOffset,f="undefined"!=typeof window.scrollY?window.scrollY:window.pageYOffset;if(assert("undefined"!=typeof e&&"undefined"!=typeof f,"Unable to retrieve scroll position, mouse positions likely broken."),"touchstart"===a.type||"touchend"===a.type||"touchmove"===a.type){var g=a.touch;if(void 0===g)return;var h=g.pageX-(e+b.left),i=g.pageY-(f+b.top);h*=c/b.width,i*=d/b.height;var j={x:h,y:i};if("touchstart"===a.type)Browser.lastTouches[g.identifier]=j,Browser.touches[g.identifier]=j;else if("touchend"===a.type||"touchmove"===a.type){var k=Browser.touches[g.identifier];k||(k=j),Browser.lastTouches[g.identifier]=k,Browser.touches[g.identifier]=j}return}var l=a.pageX-(e+b.left),m=a.pageY-(f+b.top);l*=c/b.width,m*=d/b.height,Browser.mouseMovementX=l-Browser.mouseX,Browser.mouseMovementY=m-Browser.mouseY,Browser.mouseX=l,Browser.mouseY=m}},asyncLoad:function(a,b,c,d){Module.readAsync(a,function(c){assert(c,'Loading data file "'+a+'" failed (no arrayBuffer).'),b(new Uint8Array(c)),d||removeRunDependency("al "+a)},function(b){if(!c)throw'Loading data file "'+a+'" failed.';c()}),d||addRunDependency("al "+a)},resizeListeners:[],updateResizeListeners:function(){var a=Module.canvas;Browser.resizeListeners.forEach(function(b){b(a.width,a.height)})},setCanvasSize:function(a,b,c){var d=Module.canvas;Browser.updateCanvasDimensions(d,a,b),c||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:function(){if("undefined"!=typeof SDL){var a=HEAPU32[SDL.screen+0*Runtime.QUANTUM_SIZE>>2];a|=8388608,HEAP32[SDL.screen+0*Runtime.QUANTUM_SIZE>>2]=a}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if("undefined"!=typeof SDL){var a=HEAPU32[SDL.screen+0*Runtime.QUANTUM_SIZE>>2];a&=-8388609,HEAP32[SDL.screen+0*Runtime.QUANTUM_SIZE>>2]=a}Browser.updateResizeListeners()},updateCanvasDimensions:function(a,b,c){b&&c?(a.widthNative=b,a.heightNative=c):(b=a.widthNative,c=a.heightNative);var d=b,e=c;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(d/e<Module.forcedAspectRatio?d=Math.round(e*Module.forcedAspectRatio):e=Math.round(d/Module.forcedAspectRatio)),(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===a.parentNode&&"undefined"!=typeof screen){var f=Math.min(screen.width/d,screen.height/e);d=Math.round(d*f),e=Math.round(e*f)}Browser.resizeCanvas?(a.width!=d&&(a.width=d),a.height!=e&&(a.height=e),"undefined"!=typeof a.style&&(a.style.removeProperty("width"),a.style.removeProperty("height"))):(a.width!=b&&(a.width=b),a.height!=c&&(a.height=c),"undefined"!=typeof a.style&&(d!=b||e!=c?(a.style.setProperty("width",d+"px","important"),a.style.setProperty("height",e+"px","important")):(a.style.removeProperty("width"),a.style.removeProperty("height"))))},wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function(){var a=Browser.nextWgetRequestHandle;return Browser.nextWgetRequestHandle++,a}},ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86},ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can   access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"},PATH={splitPath:function(a){var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return b.exec(a).slice(1)},normalizeArray:function(a,b){for(var c=0,d=a.length-1;d>=0;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a},normalize:function(a){var b="/"===a.charAt(0),c="/"===a.substr(-1);return a=PATH.normalizeArray(a.split("/").filter(function(a){return!!a}),!b).join("/"),a||b||(a="."),a&&c&&(a+="/"),(b?"/":"")+a},dirname:function(a){var b=PATH.splitPath(a),c=b[0],d=b[1];return c||d?(d&&(d=d.substr(0,d.length-1)),c+d):"."},basename:function(a){if("/"===a)return"/";var b=a.lastIndexOf("/");return b===-1?a:a.substr(b+1)},extname:function(a){return PATH.splitPath(a)[3]},join:function(){var a=Array.prototype.slice.call(arguments,0);return PATH.normalize(a.join("/"))},join2:function(a,b){return PATH.normalize(a+"/"+b)},resolve:function(){for(var a="",b=!1,c=arguments.length-1;c>=-1&&!b;c--){var d=c>=0?arguments[c]:FS.cwd();if("string"!=typeof d)throw new TypeError("Arguments to path.resolve must be strings");if(!d)return"";a=d+"/"+a,b="/"===d.charAt(0)}return a=PATH.normalizeArray(a.split("/").filter(function(a){return!!a}),!b).join("/"),(b?"/":"")+a||"."},relative:function(a,b){function c(a){for(var b=0;b<a.length&&""===a[b];b++);for(var c=a.length-1;c>=0&&""===a[c];c--);return b>c?[]:a.slice(b,c-b+1)}a=PATH.resolve(a).substr(1),b=PATH.resolve(b).substr(1);for(var d=c(a.split("/")),e=c(b.split("/")),f=Math.min(d.length,e.length),g=f,h=0;h<f;h++)if(d[h]!==e[h]){g=h;break}for(var i=[],h=g;h<d.length;h++)i.push("..");return i=i.concat(e.slice(g)),i.join("/")}},TTY={ttys:[],init:function(){},shutdown:function(){},register:function(a,b){TTY.ttys[a]={input:[],output:[],ops:b},FS.registerDevice(a,TTY.stream_ops)},stream_ops:{open:function(a){var b=TTY.ttys[a.node.rdev];if(!b)throw new FS.ErrnoError(ERRNO_CODES.ENODEV);a.tty=b,a.seekable=!1},close:function(a){a.tty.ops.flush(a.tty)},flush:function(a){a.tty.ops.flush(a.tty)},read:function(a,b,c,d,e){if(!a.tty||!a.tty.ops.get_char)throw new FS.ErrnoError(ERRNO_CODES.ENXIO);for(var f=0,g=0;g<d;g++){var h;try{h=a.tty.ops.get_char(a.tty)}catch(a){throw new FS.ErrnoError(ERRNO_CODES.EIO)}if(void 0===h&&0===f)throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);if(null===h||void 0===h)break;f++,b[c+g]=h}return f&&(a.node.timestamp=Date.now()),f},write:function(a,b,c,d,e){if(!a.tty||!a.tty.ops.put_char)throw new FS.ErrnoError(ERRNO_CODES.ENXIO);for(var f=0;f<d;f++)try{a.tty.ops.put_char(a.tty,b[c+f])}catch(a){throw new FS.ErrnoError(ERRNO_CODES.EIO)}return d&&(a.node.timestamp=Date.now()),f}},default_tty_ops:{get_char:function(a){if(!a.input.length){var b=null;if(ENVIRONMENT_IS_NODE){var c=256,d=new Buffer(c),e=0,f=process.stdin.fd,g=!1;try{f=fs.openSync("/dev/stdin","r"),g=!0}catch(a){}e=fs.readSync(f,d,0,c,null),g&&fs.closeSync(f),b=e>0?d.slice(0,e).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(b=window.prompt("Input: "),null!==b&&(b+="\n")):"function"==typeof readline&&(b=readline(),null!==b&&(b+="\n"));if(!b)return null;a.input=intArrayFromString(b,!0)}return a.input.shift()},put_char:function(a,b){null===b||10===b?(Module.print(UTF8ArrayToString(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&a.output.length>0&&(Module.print(UTF8ArrayToString(a.output,0)),a.output=[])}},default_tty1_ops:{put_char:function(a,b){null===b||10===b?(Module.printErr(UTF8ArrayToString(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&a.output.length>0&&(Module.printErr(UTF8ArrayToString(a.output,0)),a.output=[])}}},MEMFS={ops_table:null,mount:function(a){return MEMFS.createNode(null,"/",16895,0)},createNode:function(a,b,c,d){if(FS.isBlkdev(c)||FS.isFIFO(c))throw new FS.ErrnoError(ERRNO_CODES.EPERM);MEMFS.ops_table||(MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}});var e=FS.createNode(a,b,c,d);return FS.isDir(e.mode)?(e.node_ops=MEMFS.ops_table.dir.node,e.stream_ops=MEMFS.ops_table.dir.stream,e.contents={}):FS.isFile(e.mode)?(e.node_ops=MEMFS.ops_table.file.node,e.stream_ops=MEMFS.ops_table.file.stream,e.usedBytes=0,e.contents=null):FS.isLink(e.mode)?(e.node_ops=MEMFS.ops_table.link.node,e.stream_ops=MEMFS.ops_table.link.stream):FS.isChrdev(e.mode)&&(e.node_ops=MEMFS.ops_table.chrdev.node,e.stream_ops=MEMFS.ops_table.chrdev.stream),e.timestamp=Date.now(),a&&(a.contents[b]=e),e},getFileDataAsRegularArray:function(a){if(a.contents&&a.contents.subarray){for(var b=[],c=0;c<a.usedBytes;++c)b.push(a.contents[c]);return b}return a.contents},getFileDataAsTypedArray:function(a){return a.contents?a.contents.subarray?a.contents.subarray(0,a.usedBytes):new Uint8Array(a.contents):new Uint8Array},expandFileStorage:function(a,b){if(a.contents&&a.contents.subarray&&b>a.contents.length&&(a.contents=MEMFS.getFileDataAsRegularArray(a),a.usedBytes=a.contents.length),!a.contents||a.contents.subarray){var c=a.contents?a.contents.buffer.byteLength:0;if(c>=b)return;var d=1048576;b=Math.max(b,c*(c<d?2:1.125)|0),0!=c&&(b=Math.max(b,256));var e=a.contents;return a.contents=new Uint8Array(b),void(a.usedBytes>0&&a.contents.set(e.subarray(0,a.usedBytes),0))}for(!a.contents&&b>0&&(a.contents=[]);a.contents.length<b;)a.contents.push(0)},resizeFileStorage:function(a,b){if(a.usedBytes!=b){if(0==b)return a.contents=null,void(a.usedBytes=0);if(!a.contents||a.contents.subarray){var c=a.contents;return a.contents=new Uint8Array(new ArrayBuffer(b)),c&&a.contents.set(c.subarray(0,Math.min(b,a.usedBytes))),void(a.usedBytes=b)}if(a.contents||(a.contents=[]),a.contents.length>b)a.contents.length=b;else for(;a.contents.length<b;)a.contents.push(0);a.usedBytes=b}},node_ops:{getattr:function(a){var b={};return b.dev=FS.isChrdev(a.mode)?a.id:1,b.ino=a.id,b.mode=a.mode,b.nlink=1,b.uid=0,b.gid=0,b.rdev=a.rdev,FS.isDir(a.mode)?b.size=4096:FS.isFile(a.mode)?b.size=a.usedBytes:FS.isLink(a.mode)?b.size=a.link.length:b.size=0,b.atime=new Date(a.timestamp),b.mtime=new Date(a.timestamp),b.ctime=new Date(a.timestamp),b.blksize=4096,b.blocks=Math.ceil(b.size/b.blksize),b},setattr:function(a,b){void 0!==b.mode&&(a.mode=b.mode),void 0!==b.timestamp&&(a.timestamp=b.timestamp),void 0!==b.size&&MEMFS.resizeFileStorage(a,b.size)},lookup:function(a,b){throw FS.genericErrors[ERRNO_CODES.ENOENT]},mknod:function(a,b,c,d){return MEMFS.createNode(a,b,c,d)},rename:function(a,b,c){if(FS.isDir(a.mode)){var d;try{d=FS.lookupNode(b,c)}catch(a){}if(d)for(var e in d.contents)throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY)}delete a.parent.contents[a.name],a.name=c,b.contents[c]=a,a.parent=b},unlink:function(a,b){delete a.contents[b]},rmdir:function(a,b){var c=FS.lookupNode(a,b);for(var d in c.contents)throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);delete a.contents[b]},readdir:function(a){var b=[".",".."];for(var c in a.contents)a.contents.hasOwnProperty(c)&&b.push(c);return b},symlink:function(a,b,c){var d=MEMFS.createNode(a,b,41471,0);return d.link=c,d},readlink:function(a){if(!FS.isLink(a.mode))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);return a.link}},stream_ops:{read:function(a,b,c,d,e){var f=a.node.contents;if(e>=a.node.usedBytes)return 0;var g=Math.min(a.node.usedBytes-e,d);if(assert(g>=0),g>8&&f.subarray)b.set(f.subarray(e,e+g),c);else for(var h=0;h<g;h++)b[c+h]=f[e+h];return g},write:function(a,b,c,d,e,f){if(!d)return 0;var g=a.node;if(g.timestamp=Date.now(),b.subarray&&(!g.contents||g.contents.subarray)){if(f)return assert(0===e,"canOwn must imply no weird position inside the file"),g.contents=b.subarray(c,c+d),g.usedBytes=d,d;if(0===g.usedBytes&&0===e)return g.contents=new Uint8Array(b.subarray(c,c+d)),g.usedBytes=d,d;if(e+d<=g.usedBytes)return g.contents.set(b.subarray(c,c+d),e),d}if(MEMFS.expandFileStorage(g,e+d),g.contents.subarray&&b.subarray)g.contents.set(b.subarray(c,c+d),e);else for(var h=0;h<d;h++)g.contents[e+h]=b[c+h];return g.usedBytes=Math.max(g.usedBytes,e+d),d},llseek:function(a,b,c){var d=b;if(1===c?d+=a.position:2===c&&FS.isFile(a.node.mode)&&(d+=a.node.usedBytes),d<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);return d},allocate:function(a,b,c){MEMFS.expandFileStorage(a.node,b+c),a.node.usedBytes=Math.max(a.node.usedBytes,b+c)},mmap:function(a,b,c,d,e,f,g){if(!FS.isFile(a.node.mode))throw new FS.ErrnoError(ERRNO_CODES.ENODEV);var h,i,j=a.node.contents;if(2&g||j.buffer!==b&&j.buffer!==b.buffer){if((e>0||e+d<a.node.usedBytes)&&(j=j.subarray?j.subarray(e,e+d):Array.prototype.slice.call(j,e,e+d)),i=!0,h=_malloc(d),!h)throw new FS.ErrnoError(ERRNO_CODES.ENOMEM);b.set(j,h)}else i=!1,h=j.byteOffset;return{ptr:h,allocated:i}},msync:function(a,b,c,d,e){if(!FS.isFile(a.node.mode))throw new FS.ErrnoError(ERRNO_CODES.ENODEV);if(2&e)return 0;MEMFS.stream_ops.write(a,b,0,d,c,!1);return 0}}},IDBFS={dbs:{},indexedDB:function(){if("undefined"!=typeof indexedDB)return indexedDB;var a=null;return"object"==typeof window&&(a=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),assert(a,"IDBFS used, but indexedDB not supported"),a},DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(a){return MEMFS.mount.apply(null,arguments)},syncfs:function(a,b,c){IDBFS.getLocalSet(a,function(d,e){return d?c(d):void IDBFS.getRemoteSet(a,function(a,d){if(a)return c(a);var f=b?d:e,g=b?e:d;IDBFS.reconcile(f,g,c)})})},getDB:function(a,b){var c=IDBFS.dbs[a];if(c)return b(null,c);var d;try{d=IDBFS.indexedDB().open(a,IDBFS.DB_VERSION)}catch(a){return b(a)}d.onupgradeneeded=function(a){var d,b=a.target.result,c=a.target.transaction;d=b.objectStoreNames.contains(IDBFS.DB_STORE_NAME)?c.objectStore(IDBFS.DB_STORE_NAME):b.createObjectStore(IDBFS.DB_STORE_NAME),d.indexNames.contains("timestamp")||d.createIndex("timestamp","timestamp",{unique:!1})},d.onsuccess=function(){c=d.result,IDBFS.dbs[a]=c,b(null,c)},d.onerror=function(a){b(this.error),a.preventDefault()}},getLocalSet:function(a,b){function d(a){return"."!==a&&".."!==a}function e(a){return function(b){return PATH.join2(a,b)}}for(var c={},f=FS.readdir(a.mountpoint).filter(d).map(e(a.mountpoint));f.length;){var h,g=f.pop();try{h=FS.stat(g)}catch(a){return b(a);
+}FS.isDir(h.mode)&&f.push.apply(f,FS.readdir(g).filter(d).map(e(g))),c[g]={timestamp:h.mtime}}return b(null,{type:"local",entries:c})},getRemoteSet:function(a,b){var c={};IDBFS.getDB(a.mountpoint,function(a,d){if(a)return b(a);var e=d.transaction([IDBFS.DB_STORE_NAME],"readonly");e.onerror=function(a){b(this.error),a.preventDefault()};var f=e.objectStore(IDBFS.DB_STORE_NAME),g=f.index("timestamp");g.openKeyCursor().onsuccess=function(a){var e=a.target.result;return e?(c[e.primaryKey]={timestamp:e.key},void e.continue()):b(null,{type:"remote",db:d,entries:c})}})},loadLocalEntry:function(a,b){var c,d;try{var e=FS.lookupPath(a);d=e.node,c=FS.stat(a)}catch(a){return b(a)}return FS.isDir(c.mode)?b(null,{timestamp:c.mtime,mode:c.mode}):FS.isFile(c.mode)?(d.contents=MEMFS.getFileDataAsTypedArray(d),b(null,{timestamp:c.mtime,mode:c.mode,contents:d.contents})):b(new Error("node type not supported"))},storeLocalEntry:function(a,b,c){try{if(FS.isDir(b.mode))FS.mkdir(a,b.mode);else{if(!FS.isFile(b.mode))return c(new Error("node type not supported"));FS.writeFile(a,b.contents,{encoding:"binary",canOwn:!0})}FS.chmod(a,b.mode),FS.utime(a,b.timestamp,b.timestamp)}catch(a){return c(a)}c(null)},removeLocalEntry:function(a,b){try{var d=(FS.lookupPath(a),FS.stat(a));FS.isDir(d.mode)?FS.rmdir(a):FS.isFile(d.mode)&&FS.unlink(a)}catch(a){return b(a)}b(null)},loadRemoteEntry:function(a,b,c){var d=a.get(b);d.onsuccess=function(a){c(null,a.target.result)},d.onerror=function(a){c(this.error),a.preventDefault()}},storeRemoteEntry:function(a,b,c,d){var e=a.put(c,b);e.onsuccess=function(){d(null)},e.onerror=function(a){d(this.error),a.preventDefault()}},removeRemoteEntry:function(a,b,c){var d=a.delete(b);d.onsuccess=function(){c(null)},d.onerror=function(a){c(this.error),a.preventDefault()}},reconcile:function(a,b,c){function l(a){if(a){if(!l.errored)return l.errored=!0,c(a)}else if(++h>=d)return c(null)}var d=0,e=[];Object.keys(a.entries).forEach(function(c){var f=a.entries[c],g=b.entries[c];(!g||f.timestamp>g.timestamp)&&(e.push(c),d++)});var f=[];if(Object.keys(b.entries).forEach(function(c){var g=(b.entries[c],a.entries[c]);g||(f.push(c),d++)}),!d)return c(null);var h=0,i="remote"===a.type?a.db:b.db,j=i.transaction([IDBFS.DB_STORE_NAME],"readwrite"),k=j.objectStore(IDBFS.DB_STORE_NAME);j.onerror=function(a){l(this.error),a.preventDefault()},e.sort().forEach(function(a){"local"===b.type?IDBFS.loadRemoteEntry(k,a,function(b,c){return b?l(b):void IDBFS.storeLocalEntry(a,c,l)}):IDBFS.loadLocalEntry(a,function(b,c){return b?l(b):void IDBFS.storeRemoteEntry(k,a,c,l)})}),f.sort().reverse().forEach(function(a){"local"===b.type?IDBFS.removeLocalEntry(a,l):IDBFS.removeRemoteEntry(k,a,l)})}},NODEFS={isWindows:!1,staticInit:function(){NODEFS.isWindows=!!process.platform.match(/^win/)},mount:function(a){return assert(ENVIRONMENT_IS_NODE),NODEFS.createNode(null,"/",NODEFS.getMode(a.opts.root),0)},createNode:function(a,b,c,d){if(!FS.isDir(c)&&!FS.isFile(c)&&!FS.isLink(c))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var e=FS.createNode(a,b,c);return e.node_ops=NODEFS.node_ops,e.stream_ops=NODEFS.stream_ops,e},getMode:function(a){var b;try{b=fs.lstatSync(a),NODEFS.isWindows&&(b.mode=b.mode|(146&b.mode)>>1)}catch(a){if(!a.code)throw a;throw new FS.ErrnoError(ERRNO_CODES[a.code])}return b.mode},realPath:function(a){for(var b=[];a.parent!==a;)b.push(a.name),a=a.parent;return b.push(a.mount.opts.root),b.reverse(),PATH.join.apply(null,b)},flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:function(a){if(a&=-32769,a&=-524289,a in NODEFS.flagsToPermissionStringMap)return NODEFS.flagsToPermissionStringMap[a];throw new FS.ErrnoError(ERRNO_CODES.EINVAL)},node_ops:{getattr:function(a){var c,b=NODEFS.realPath(a);try{c=fs.lstatSync(b)}catch(a){if(!a.code)throw a;throw new FS.ErrnoError(ERRNO_CODES[a.code])}return NODEFS.isWindows&&!c.blksize&&(c.blksize=4096),NODEFS.isWindows&&!c.blocks&&(c.blocks=(c.size+c.blksize-1)/c.blksize|0),{dev:c.dev,ino:c.ino,mode:c.mode,nlink:c.nlink,uid:c.uid,gid:c.gid,rdev:c.rdev,size:c.size,atime:c.atime,mtime:c.mtime,ctime:c.ctime,blksize:c.blksize,blocks:c.blocks}},setattr:function(a,b){var c=NODEFS.realPath(a);try{if(void 0!==b.mode&&(fs.chmodSync(c,b.mode),a.mode=b.mode),void 0!==b.timestamp){var d=new Date(b.timestamp);fs.utimesSync(c,d,d)}void 0!==b.size&&fs.truncateSync(c,b.size)}catch(a){if(!a.code)throw a;throw new FS.ErrnoError(ERRNO_CODES[a.code])}},lookup:function(a,b){var c=PATH.join2(NODEFS.realPath(a),b),d=NODEFS.getMode(c);return NODEFS.createNode(a,b,d)},mknod:function(a,b,c,d){var e=NODEFS.createNode(a,b,c,d),f=NODEFS.realPath(e);try{FS.isDir(e.mode)?fs.mkdirSync(f,e.mode):fs.writeFileSync(f,"",{mode:e.mode})}catch(a){if(!a.code)throw a;throw new FS.ErrnoError(ERRNO_CODES[a.code])}return e},rename:function(a,b,c){var d=NODEFS.realPath(a),e=PATH.join2(NODEFS.realPath(b),c);try{fs.renameSync(d,e)}catch(a){if(!a.code)throw a;throw new FS.ErrnoError(ERRNO_CODES[a.code])}},unlink:function(a,b){var c=PATH.join2(NODEFS.realPath(a),b);try{fs.unlinkSync(c)}catch(a){if(!a.code)throw a;throw new FS.ErrnoError(ERRNO_CODES[a.code])}},rmdir:function(a,b){var c=PATH.join2(NODEFS.realPath(a),b);try{fs.rmdirSync(c)}catch(a){if(!a.code)throw a;throw new FS.ErrnoError(ERRNO_CODES[a.code])}},readdir:function(a){var b=NODEFS.realPath(a);try{return fs.readdirSync(b)}catch(a){if(!a.code)throw a;throw new FS.ErrnoError(ERRNO_CODES[a.code])}},symlink:function(a,b,c){var d=PATH.join2(NODEFS.realPath(a),b);try{fs.symlinkSync(c,d)}catch(a){if(!a.code)throw a;throw new FS.ErrnoError(ERRNO_CODES[a.code])}},readlink:function(a){var b=NODEFS.realPath(a);try{return b=fs.readlinkSync(b),b=NODEJS_PATH.relative(NODEJS_PATH.resolve(a.mount.opts.root),b)}catch(a){if(!a.code)throw a;throw new FS.ErrnoError(ERRNO_CODES[a.code])}}},stream_ops:{open:function(a){var b=NODEFS.realPath(a.node);try{FS.isFile(a.node.mode)&&(a.nfd=fs.openSync(b,NODEFS.flagsToPermissionString(a.flags)))}catch(a){if(!a.code)throw a;throw new FS.ErrnoError(ERRNO_CODES[a.code])}},close:function(a){try{FS.isFile(a.node.mode)&&a.nfd&&fs.closeSync(a.nfd)}catch(a){if(!a.code)throw a;throw new FS.ErrnoError(ERRNO_CODES[a.code])}},read:function(a,b,c,d,e){if(0===d)return 0;var g,f=new Buffer(d);try{g=fs.readSync(a.nfd,f,0,d,e)}catch(a){throw new FS.ErrnoError(ERRNO_CODES[a.code])}if(g>0)for(var h=0;h<g;h++)b[c+h]=f[h];return g},write:function(a,b,c,d,e){var g,f=new Buffer(b.subarray(c,c+d));try{g=fs.writeSync(a.nfd,f,0,d,e)}catch(a){throw new FS.ErrnoError(ERRNO_CODES[a.code])}return g},llseek:function(a,b,c){var d=b;if(1===c)d+=a.position;else if(2===c&&FS.isFile(a.node.mode))try{var e=fs.fstatSync(a.nfd);d+=e.size}catch(a){throw new FS.ErrnoError(ERRNO_CODES[a.code])}if(d<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);return d}}},WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(a){function d(a){for(var d=a.split("/"),e=b,f=0;f<d.length-1;f++){var g=d.slice(0,f+1).join("/");c[g]||(c[g]=WORKERFS.createNode(e,d[f],WORKERFS.DIR_MODE,0)),e=c[g]}return e}function e(a){var b=a.split("/");return b[b.length-1]}assert(ENVIRONMENT_IS_WORKER),WORKERFS.reader||(WORKERFS.reader=new FileReaderSync);var b=WORKERFS.createNode(null,"/",WORKERFS.DIR_MODE,0),c={};return Array.prototype.forEach.call(a.opts.files||[],function(a){WORKERFS.createNode(d(a.name),e(a.name),WORKERFS.FILE_MODE,0,a,a.lastModifiedDate)}),(a.opts.blobs||[]).forEach(function(a){WORKERFS.createNode(d(a.name),e(a.name),WORKERFS.FILE_MODE,0,a.data)}),(a.opts.packages||[]).forEach(function(a){a.metadata.files.forEach(function(b){var c=b.filename.substr(1);WORKERFS.createNode(d(c),e(c),WORKERFS.FILE_MODE,0,a.blob.slice(b.start,b.end))})}),b},createNode:function(a,b,c,d,e,f){var g=FS.createNode(a,b,c);return g.mode=c,g.node_ops=WORKERFS.node_ops,g.stream_ops=WORKERFS.stream_ops,g.timestamp=(f||new Date).getTime(),assert(WORKERFS.FILE_MODE!==WORKERFS.DIR_MODE),c===WORKERFS.FILE_MODE?(g.size=e.size,g.contents=e):(g.size=4096,g.contents={}),a&&(a.contents[b]=g),g},node_ops:{getattr:function(a){return{dev:1,ino:void 0,mode:a.mode,nlink:1,uid:0,gid:0,rdev:void 0,size:a.size,atime:new Date(a.timestamp),mtime:new Date(a.timestamp),ctime:new Date(a.timestamp),blksize:4096,blocks:Math.ceil(a.size/4096)}},setattr:function(a,b){void 0!==b.mode&&(a.mode=b.mode),void 0!==b.timestamp&&(a.timestamp=b.timestamp)},lookup:function(a,b){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)},mknod:function(a,b,c,d){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},rename:function(a,b,c){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},unlink:function(a,b){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},rmdir:function(a,b){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},readdir:function(a){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},symlink:function(a,b,c){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},readlink:function(a){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}},stream_ops:{read:function(a,b,c,d,e){if(e>=a.node.size)return 0;var f=a.node.contents.slice(e,e+d),g=WORKERFS.reader.readAsArrayBuffer(f);return b.set(new Uint8Array(g),c),f.size},write:function(a,b,c,d,e){throw new FS.ErrnoError(ERRNO_CODES.EIO)},llseek:function(a,b,c){var d=b;if(1===c?d+=a.position:2===c&&FS.isFile(a.node.mode)&&(d+=a.node.size),d<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);return d}}},_stdin=STATICTOP;STATICTOP+=16;var _stdout=STATICTOP;STATICTOP+=16;var _stderr=STATICTOP;STATICTOP+=16;var FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(a){if(!(a instanceof FS.ErrnoError))throw a+" : "+stackTrace();return ___setErrNo(a.errno)},lookupPath:function(a,b){if(a=PATH.resolve(FS.cwd(),a),b=b||{},!a)return{path:"",node:null};var c={follow_mount:!0,recurse_count:0};for(var d in c)void 0===b[d]&&(b[d]=c[d]);if(b.recurse_count>8)throw new FS.ErrnoError(ERRNO_CODES.ELOOP);for(var e=PATH.normalizeArray(a.split("/").filter(function(a){return!!a}),!1),f=FS.root,g="/",h=0;h<e.length;h++){var i=h===e.length-1;if(i&&b.parent)break;if(f=FS.lookupNode(f,e[h]),g=PATH.join2(g,e[h]),FS.isMountpoint(f)&&(!i||i&&b.follow_mount)&&(f=f.mounted.root),!i||b.follow)for(var j=0;FS.isLink(f.mode);){var k=FS.readlink(g);g=PATH.resolve(PATH.dirname(g),k);var l=FS.lookupPath(g,{recurse_count:b.recurse_count});if(f=l.node,j++>40)throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}}return{path:g,node:f}},getPath:function(a){for(var b;;){if(FS.isRoot(a)){var c=a.mount.mountpoint;return b?"/"!==c[c.length-1]?c+"/"+b:c+b:c}b=b?a.name+"/"+b:a.name,a=a.parent}},hashName:function(a,b){for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%FS.nameTable.length},hashAddNode:function(a){var b=FS.hashName(a.parent.id,a.name);a.name_next=FS.nameTable[b],FS.nameTable[b]=a},hashRemoveNode:function(a){var b=FS.hashName(a.parent.id,a.name);if(FS.nameTable[b]===a)FS.nameTable[b]=a.name_next;else for(var c=FS.nameTable[b];c;){if(c.name_next===a){c.name_next=a.name_next;break}c=c.name_next}},lookupNode:function(a,b){var c=FS.mayLookup(a);if(c)throw new FS.ErrnoError(c,a);for(var d=FS.hashName(a.id,b),e=FS.nameTable[d];e;e=e.name_next){var f=e.name;if(e.parent.id===a.id&&f===b)return e}return FS.lookup(a,b)},createNode:function(a,b,c,d){if(!FS.FSNode){FS.FSNode=function(a,b,c,d){a||(a=this),this.parent=a,this.mount=a.mount,this.mounted=null,this.id=FS.nextInode++,this.name=b,this.mode=c,this.node_ops={},this.stream_ops={},this.rdev=d},FS.FSNode.prototype={};var e=365,f=146;Object.defineProperties(FS.FSNode.prototype,{read:{get:function(){return(this.mode&e)===e},set:function(a){a?this.mode|=e:this.mode&=~e}},write:{get:function(){return(this.mode&f)===f},set:function(a){a?this.mode|=f:this.mode&=~f}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}})}var g=new FS.FSNode(a,b,c,d);return FS.hashAddNode(g),g},destroyNode:function(a){FS.hashRemoveNode(a)},isRoot:function(a){return a===a.parent},isMountpoint:function(a){return!!a.mounted},isFile:function(a){return 32768===(61440&a)},isDir:function(a){return 16384===(61440&a)},isLink:function(a){return 40960===(61440&a)},isChrdev:function(a){return 8192===(61440&a)},isBlkdev:function(a){return 24576===(61440&a)},isFIFO:function(a){return 4096===(61440&a)},isSocket:function(a){return 49152===(49152&a)},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(a){var b=FS.flagModes[a];if("undefined"==typeof b)throw new Error("Unknown file open mode: "+a);return b},flagsToPermissionString:function(a){var b=["r","w","rw"][3&a];return 512&a&&(b+="w"),b},nodePermissions:function(a,b){return FS.ignorePermissions?0:(b.indexOf("r")===-1||292&a.mode)&&(b.indexOf("w")===-1||146&a.mode)&&(b.indexOf("x")===-1||73&a.mode)?0:ERRNO_CODES.EACCES},mayLookup:function(a){var b=FS.nodePermissions(a,"x");return b?b:a.node_ops.lookup?0:ERRNO_CODES.EACCES},mayCreate:function(a,b){try{FS.lookupNode(a,b);return ERRNO_CODES.EEXIST}catch(a){}return FS.nodePermissions(a,"wx")},mayDelete:function(a,b,c){var d;try{d=FS.lookupNode(a,b)}catch(a){return a.errno}var e=FS.nodePermissions(a,"wx");if(e)return e;if(c){if(!FS.isDir(d.mode))return ERRNO_CODES.ENOTDIR;if(FS.isRoot(d)||FS.getPath(d)===FS.cwd())return ERRNO_CODES.EBUSY}else if(FS.isDir(d.mode))return ERRNO_CODES.EISDIR;return 0},mayOpen:function(a,b){return a?FS.isLink(a.mode)?ERRNO_CODES.ELOOP:FS.isDir(a.mode)&&("r"!==FS.flagsToPermissionString(b)||512&b)?ERRNO_CODES.EISDIR:FS.nodePermissions(a,FS.flagsToPermissionString(b)):ERRNO_CODES.ENOENT},MAX_OPEN_FDS:4096,nextfd:function(a,b){a=a||0,b=b||FS.MAX_OPEN_FDS;for(var c=a;c<=b;c++)if(!FS.streams[c])return c;throw new FS.ErrnoError(ERRNO_CODES.EMFILE)},getStream:function(a){return FS.streams[a]},createStream:function(a,b,c){FS.FSStream||(FS.FSStream=function(){},FS.FSStream.prototype={},Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(a){this.node=a}},isRead:{get:function(){return 1!==(2097155&this.flags)}},isWrite:{get:function(){return 0!==(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}));var d=new FS.FSStream;for(var e in a)d[e]=a[e];a=d;var f=FS.nextfd(b,c);return a.fd=f,FS.streams[f]=a,a},closeStream:function(a){FS.streams[a]=null},chrdev_stream_ops:{open:function(a){var b=FS.getDevice(a.node.rdev);a.stream_ops=b.stream_ops,a.stream_ops.open&&a.stream_ops.open(a)},llseek:function(){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}},major:function(a){return a>>8},minor:function(a){return 255&a},makedev:function(a,b){return a<<8|b},registerDevice:function(a,b){FS.devices[a]={stream_ops:b}},getDevice:function(a){return FS.devices[a]},getMounts:function(a){for(var b=[],c=[a];c.length;){var d=c.pop();b.push(d),c.push.apply(c,d.mounts)}return b},syncfs:function(a,b){function e(a){return assert(FS.syncFSRequests>0),FS.syncFSRequests--,b(a)}function f(a){if(a){if(!f.errored)return f.errored=!0,e(a)}else++d>=c.length&&e(null)}"function"==typeof a&&(b=a,a=!1),FS.syncFSRequests++,FS.syncFSRequests>1&&console.log("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var c=FS.getMounts(FS.root.mount),d=0;c.forEach(function(b){return b.type.syncfs?void b.type.syncfs(b,a,f):f(null)})},mount:function(a,b,c){var f,d="/"===c,e=!c;if(d&&FS.root)throw new FS.ErrnoError(ERRNO_CODES.EBUSY);if(!d&&!e){var g=FS.lookupPath(c,{follow_mount:!1});if(c=g.path,f=g.node,FS.isMountpoint(f))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);if(!FS.isDir(f.mode))throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}var h={type:a,opts:b,mountpoint:c,mounts:[]},i=a.mount(h);return i.mount=h,h.root=i,d?FS.root=i:f&&(f.mounted=h,f.mount&&f.mount.mounts.push(h)),i},unmount:function(a){var b=FS.lookupPath(a,{follow_mount:!1});if(!FS.isMountpoint(b.node))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var c=b.node,d=c.mounted,e=FS.getMounts(d);Object.keys(FS.nameTable).forEach(function(a){for(var b=FS.nameTable[a];b;){var c=b.name_next;e.indexOf(b.mount)!==-1&&FS.destroyNode(b),b=c}}),c.mounted=null;var f=c.mount.mounts.indexOf(d);assert(f!==-1),c.mount.mounts.splice(f,1)},lookup:function(a,b){return a.node_ops.lookup(a,b)},mknod:function(a,b,c){var d=FS.lookupPath(a,{parent:!0}),e=d.node,f=PATH.basename(a);if(!f||"."===f||".."===f)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var g=FS.mayCreate(e,f);if(g)throw new FS.ErrnoError(g);if(!e.node_ops.mknod)throw new FS.ErrnoError(ERRNO_CODES.EPERM);return e.node_ops.mknod(e,f,b,c)},create:function(a,b){return b=void 0!==b?b:438,b&=4095,b|=32768,FS.mknod(a,b,0)},mkdir:function(a,b){return b=void 0!==b?b:511,b&=1023,b|=16384,FS.mknod(a,b,0)},mkdev:function(a,b,c){return"undefined"==typeof c&&(c=b,b=438),b|=8192,FS.mknod(a,b,c)},symlink:function(a,b){if(!PATH.resolve(a))throw new FS.ErrnoError(ERRNO_CODES.ENOENT);var c=FS.lookupPath(b,{parent:!0}),d=c.node;if(!d)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);var e=PATH.basename(b),f=FS.mayCreate(d,e);if(f)throw new FS.ErrnoError(f);if(!d.node_ops.symlink)throw new FS.ErrnoError(ERRNO_CODES.EPERM);return d.node_ops.symlink(d,e,a)},rename:function(a,b){var g,h,i,c=PATH.dirname(a),d=PATH.dirname(b),e=PATH.basename(a),f=PATH.basename(b);try{g=FS.lookupPath(a,{parent:!0}),h=g.node,g=FS.lookupPath(b,{parent:!0}),i=g.node}catch(a){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(!h||!i)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(h.mount!==i.mount)throw new FS.ErrnoError(ERRNO_CODES.EXDEV);var j=FS.lookupNode(h,e),k=PATH.relative(a,d);if("."!==k.charAt(0))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if(k=PATH.relative(b,c),"."!==k.charAt(0))throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);var l;try{l=FS.lookupNode(i,f)}catch(a){}if(j!==l){var m=FS.isDir(j.mode),n=FS.mayDelete(h,e,m);if(n)throw new FS.ErrnoError(n);if(n=l?FS.mayDelete(i,f,m):FS.mayCreate(i,f))throw new FS.ErrnoError(n);if(!h.node_ops.rename)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isMountpoint(j)||l&&FS.isMountpoint(l))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);if(i!==h&&(n=FS.nodePermissions(h,"w")))throw new FS.ErrnoError(n);try{FS.trackingDelegate.willMovePath&&FS.trackingDelegate.willMovePath(a,b)}catch(c){console.log("FS.trackingDelegate['willMovePath']('"+a+"', '"+b+"') threw an exception: "+c.message)}FS.hashRemoveNode(j);try{h.node_ops.rename(j,i,f)}catch(a){throw a}finally{FS.hashAddNode(j)}try{FS.trackingDelegate.onMovePath&&FS.trackingDelegate.onMovePath(a,b)}catch(c){console.log("FS.trackingDelegate['onMovePath']('"+a+"', '"+b+"') threw an exception: "+c.message)}}},rmdir:function(a){var b=FS.lookupPath(a,{parent:!0}),c=b.node,d=PATH.basename(a),e=FS.lookupNode(c,d),f=FS.mayDelete(c,d,!0);if(f)throw new FS.ErrnoError(f);if(!c.node_ops.rmdir)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isMountpoint(e))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);try{FS.trackingDelegate.willDeletePath&&FS.trackingDelegate.willDeletePath(a)}catch(b){console.log("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+b.message)}c.node_ops.rmdir(c,d),FS.destroyNode(e);try{FS.trackingDelegate.onDeletePath&&FS.trackingDelegate.onDeletePath(a)}catch(b){console.log("FS.trackingDelegate['onDeletePath']('"+a+"') threw an exception: "+b.message)}},readdir:function(a){var b=FS.lookupPath(a,{follow:!0}),c=b.node;if(!c.node_ops.readdir)throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);return c.node_ops.readdir(c)},unlink:function(a){var b=FS.lookupPath(a,{parent:!0}),c=b.node,d=PATH.basename(a),e=FS.lookupNode(c,d),f=FS.mayDelete(c,d,!1);if(f)throw f===ERRNO_CODES.EISDIR&&(f=ERRNO_CODES.EPERM),new FS.ErrnoError(f);if(!c.node_ops.unlink)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isMountpoint(e))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);try{FS.trackingDelegate.willDeletePath&&FS.trackingDelegate.willDeletePath(a)}catch(b){console.log("FS.trackingDelegate['willDeletePath']('"+a+"') threw an exception: "+b.message)}c.node_ops.unlink(c,d),FS.destroyNode(e);try{FS.trackingDelegate.onDeletePath&&FS.trackingDelegate.onDeletePath(a)}catch(b){console.log("FS.trackingDelegate['onDeletePath']('"+a+"') threw an exception: "+b.message)}},readlink:function(a){var b=FS.lookupPath(a),c=b.node;if(!c)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(!c.node_ops.readlink)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);return PATH.resolve(FS.getPath(c.parent),c.node_ops.readlink(c))},stat:function(a,b){var c=FS.lookupPath(a,{follow:!b}),d=c.node;if(!d)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(!d.node_ops.getattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);return d.node_ops.getattr(d)},lstat:function(a){return FS.stat(a,!0)},chmod:function(a,b,c){var d;if("string"==typeof a){var e=FS.lookupPath(a,{follow:!c});d=e.node}else d=a;if(!d.node_ops.setattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);d.node_ops.setattr(d,{mode:4095&b|d.mode&-4096,timestamp:Date.now()})},lchmod:function(a,b){FS.chmod(a,b,!0)},fchmod:function(a,b){var c=FS.getStream(a);if(!c)throw new FS.ErrnoError(ERRNO_CODES.EBADF);FS.chmod(c.node,b)},chown:function(a,b,c,d){var e;if("string"==typeof a){var f=FS.lookupPath(a,{follow:!d});e=f.node}else e=a;if(!e.node_ops.setattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);e.node_ops.setattr(e,{timestamp:Date.now()})},lchown:function(a,b,c){FS.chown(a,b,c,!0)},fchown:function(a,b,c){var d=FS.getStream(a);if(!d)throw new FS.ErrnoError(ERRNO_CODES.EBADF);FS.chown(d.node,b,c)},truncate:function(a,b){if(b<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var c;if("string"==typeof a){var d=FS.lookupPath(a,{follow:!0});c=d.node}else c=a;if(!c.node_ops.setattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isDir(c.mode))throw new FS.ErrnoError(ERRNO_CODES.EISDIR);if(!FS.isFile(c.mode))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var e=FS.nodePermissions(c,"w");if(e)throw new FS.ErrnoError(e);c.node_ops.setattr(c,{size:b,timestamp:Date.now()})},ftruncate:function(a,b){var c=FS.getStream(a);if(!c)throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(0===(2097155&c.flags))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);FS.truncate(c.node,b)},utime:function(a,b,c){var d=FS.lookupPath(a,{follow:!0}),e=d.node;e.node_ops.setattr(e,{timestamp:Math.max(b,c)})},open:function(a,b,c,d,e){if(""===a)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);b="string"==typeof b?FS.modeStringToFlags(b):b,c="undefined"==typeof c?438:c,c=64&b?4095&c|32768:0;var f;if("object"==typeof a)f=a;else{a=PATH.normalize(a);try{var g=FS.lookupPath(a,{follow:!(131072&b)});f=g.node}catch(a){}}var h=!1;if(64&b)if(f){if(128&b)throw new FS.ErrnoError(ERRNO_CODES.EEXIST)}else f=FS.mknod(a,c,0),h=!0;if(!f)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(FS.isChrdev(f.mode)&&(b&=-513),65536&b&&!FS.isDir(f.mode))throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);if(!h){var i=FS.mayOpen(f,b);if(i)throw new FS.ErrnoError(i)}512&b&&FS.truncate(f,0),b&=-641;var j=FS.createStream({node:f,path:FS.getPath(f),flags:b,seekable:!0,position:0,stream_ops:f.stream_ops,ungotten:[],error:!1},d,e);j.stream_ops.open&&j.stream_ops.open(j),!Module.logReadFiles||1&b||(FS.readFiles||(FS.readFiles={}),a in FS.readFiles||(FS.readFiles[a]=1,Module.printErr("read file: "+a)));try{if(FS.trackingDelegate.onOpenFile){var k=0;1!==(2097155&b)&&(k|=FS.tracking.openFlags.READ),0!==(2097155&b)&&(k|=FS.tracking.openFlags.WRITE),FS.trackingDelegate.onOpenFile(a,k)}}catch(b){console.log("FS.trackingDelegate['onOpenFile']('"+a+"', flags) threw an exception: "+b.message)}return j},close:function(a){a.getdents&&(a.getdents=null);try{a.stream_ops.close&&a.stream_ops.close(a)}catch(a){throw a}finally{FS.closeStream(a.fd)}},llseek:function(a,b,c){if(!a.seekable||!a.stream_ops.llseek)throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);return a.position=a.stream_ops.llseek(a,b,c),a.ungotten=[],a.position},read:function(a,b,c,d,e){if(d<0||e<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if(1===(2097155&a.flags))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(FS.isDir(a.node.mode))throw new FS.ErrnoError(ERRNO_CODES.EISDIR);if(!a.stream_ops.read)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var f=!0;if("undefined"==typeof e)e=a.position,f=!1;else if(!a.seekable)throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);var g=a.stream_ops.read(a,b,c,d,e);return f||(a.position+=g),g},write:function(a,b,c,d,e,f){if(d<0||e<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if(0===(2097155&a.flags))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(FS.isDir(a.node.mode))throw new FS.ErrnoError(ERRNO_CODES.EISDIR);if(!a.stream_ops.write)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);1024&a.flags&&FS.llseek(a,0,2);var g=!0;if("undefined"==typeof e)e=a.position,g=!1;else if(!a.seekable)throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);var h=a.stream_ops.write(a,b,c,d,e,f);g||(a.position+=h);try{a.path&&FS.trackingDelegate.onWriteToFile&&FS.trackingDelegate.onWriteToFile(a.path)}catch(a){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+a.message)}return h},allocate:function(a,b,c){if(b<0||c<=0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if(0===(2097155&a.flags))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(!FS.isFile(a.node.mode)&&!FS.isDir(node.mode))throw new FS.ErrnoError(ERRNO_CODES.ENODEV);if(!a.stream_ops.allocate)throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP);a.stream_ops.allocate(a,b,c)},mmap:function(a,b,c,d,e,f,g){if(1===(2097155&a.flags))throw new FS.ErrnoError(ERRNO_CODES.EACCES);if(!a.stream_ops.mmap)throw new FS.ErrnoError(ERRNO_CODES.ENODEV);return a.stream_ops.mmap(a,b,c,d,e,f,g)},msync:function(a,b,c,d,e){return a&&a.stream_ops.msync?a.stream_ops.msync(a,b,c,d,e):0},munmap:function(a){return 0},ioctl:function(a,b,c){if(!a.stream_ops.ioctl)throw new FS.ErrnoError(ERRNO_CODES.ENOTTY);return a.stream_ops.ioctl(a,b,c)},readFile:function(a,b){if(b=b||{},b.flags=b.flags||"r",b.encoding=b.encoding||"binary","utf8"!==b.encoding&&"binary"!==b.encoding)throw new Error('Invalid encoding type "'+b.encoding+'"');var c,d=FS.open(a,b.flags),e=FS.stat(a),f=e.size,g=new Uint8Array(f);return FS.read(d,g,0,f,0),"utf8"===b.encoding?c=UTF8ArrayToString(g,0):"binary"===b.encoding&&(c=g),FS.close(d),c},writeFile:function(a,b,c){if(c=c||{},c.flags=c.flags||"w",c.encoding=c.encoding||"utf8","utf8"!==c.encoding&&"binary"!==c.encoding)throw new Error('Invalid encoding type "'+c.encoding+'"');var d=FS.open(a,c.flags,c.mode);if("utf8"===c.encoding){var e=new Uint8Array(lengthBytesUTF8(b)+1),f=stringToUTF8Array(b,e,0,e.length);FS.write(d,e,0,f,0,c.canOwn)}else"binary"===c.encoding&&FS.write(d,b,0,b.length,0,c.canOwn);FS.close(d)},cwd:function(){return FS.currentPath},chdir:function(a){var b=FS.lookupPath(a,{follow:!0});if(!FS.isDir(b.node.mode))throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);var c=FS.nodePermissions(b.node,"x");if(c)throw new FS.ErrnoError(c);FS.currentPath=b.path},createDefaultDirectories:function(){FS.mkdir("/tmp"),FS.mkdir("/home"),FS.mkdir("/home/web_user")},createDefaultDevices:function(){FS.mkdir("/dev"),FS.registerDevice(FS.makedev(1,3),{read:function(){return 0},write:function(a,b,c,d,e){return d}}),FS.mkdev("/dev/null",FS.makedev(1,3)),TTY.register(FS.makedev(5,0),TTY.default_tty_ops),TTY.register(FS.makedev(6,0),TTY.default_tty1_ops),FS.mkdev("/dev/tty",FS.makedev(5,0)),FS.mkdev("/dev/tty1",FS.makedev(6,0));var a;if("undefined"!=typeof crypto){var b=new Uint8Array(1);a=function(){return crypto.getRandomValues(b),b[0]}}else a=ENVIRONMENT_IS_NODE?function(){return require("crypto").randomBytes(1)[0]}:function(){return 256*Math.random()|0};FS.createDevice("/dev","random",a),FS.createDevice("/dev","urandom",a),FS.mkdir("/dev/shm"),FS.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){FS.mkdir("/proc"),FS.mkdir("/proc/self"),FS.mkdir("/proc/self/fd"),FS.mount({mount:function(){var a=FS.createNode("/proc/self","fd",16895,73);return a.node_ops={lookup:function(a,b){var c=+b,d=FS.getStream(c);if(!d)throw new FS.ErrnoError(ERRNO_CODES.EBADF);var e={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return d.path}}};return e.parent=e,e}},a}},{},"/proc/self/fd")},createStandardStreams:function(){Module.stdin?FS.createDevice("/dev","stdin",Module.stdin):FS.symlink("/dev/tty","/dev/stdin"),Module.stdout?FS.createDevice("/dev","stdout",null,Module.stdout):FS.symlink("/dev/tty","/dev/stdout"),Module.stderr?FS.createDevice("/dev","stderr",null,Module.stderr):FS.symlink("/dev/tty1","/dev/stderr");var a=FS.open("/dev/stdin","r");assert(0===a.fd,"invalid handle for stdin ("+a.fd+")");var b=FS.open("/dev/stdout","w");assert(1===b.fd,"invalid handle for stdout ("+b.fd+")");var c=FS.open("/dev/stderr","w");assert(2===c.fd,"invalid handle for stderr ("+c.fd+")")},ensureErrnoError:function(){FS.ErrnoError||(FS.ErrnoError=function(b,c){this.node=c,this.setErrno=function(a){this.errno=a;for(var b in ERRNO_CODES)if(ERRNO_CODES[b]===a){this.code=b;break}},this.setErrno(b),this.message=ERRNO_MESSAGES[b],this.stack&&(this.stack=demangleAll(this.stack))},FS.ErrnoError.prototype=new Error,FS.ErrnoError.prototype.constructor=FS.ErrnoError,[ERRNO_CODES.ENOENT].forEach(function(a){FS.genericErrors[a]=new FS.ErrnoError(a),FS.genericErrors[a].stack="<generic error, no stack>"}))},staticInit:function(){FS.ensureErrnoError(),FS.nameTable=new Array(4096),FS.mount(MEMFS,{},"/"),FS.createDefaultDirectories(),FS.createDefaultDevices(),FS.createSpecialDirectories(),FS.filesystems={MEMFS:MEMFS,IDBFS:IDBFS,NODEFS:NODEFS,WORKERFS:WORKERFS}},init:function(a,b,c){assert(!FS.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),FS.init.initialized=!0,FS.ensureErrnoError(),Module.stdin=a||Module.stdin,Module.stdout=b||Module.stdout,Module.stderr=c||Module.stderr,FS.createStandardStreams()},quit:function(){FS.init.initialized=!1;var a=Module._fflush;a&&a(0);for(var b=0;b<FS.streams.length;b++){var c=FS.streams[b];c&&FS.close(c)}},getMode:function(a,b){var c=0;return a&&(c|=365),b&&(c|=146),c},joinPath:function(a,b){var c=PATH.join.apply(null,a);return b&&"/"==c[0]&&(c=c.substr(1)),c},absolutePath:function(a,b){return PATH.resolve(b,a)},standardizePath:function(a){return PATH.normalize(a)},findObject:function(a,b){var c=FS.analyzePath(a,b);return c.exists?c.object:(___setErrNo(c.error),null)},analyzePath:function(a,b){try{var c=FS.lookupPath(a,{follow:!b});a=c.path}catch(a){}var d={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var c=FS.lookupPath(a,{parent:!0});d.parentExists=!0,d.parentPath=c.path,d.parentObject=c.node,d.name=PATH.basename(a),c=FS.lookupPath(a,{follow:!b}),d.exists=!0,d.path=c.path,d.object=c.node,d.name=c.node.name,d.isRoot="/"===c.path}catch(a){d.error=a.errno}return d},createFolder:function(a,b,c,d){var e=PATH.join2("string"==typeof a?a:FS.getPath(a),b),f=FS.getMode(c,d);return FS.mkdir(e,f)},createPath:function(a,b,c,d){a="string"==typeof a?a:FS.getPath(a);for(var e=b.split("/").reverse();e.length;){var f=e.pop();if(f){var g=PATH.join2(a,f);try{FS.mkdir(g)}catch(a){}a=g}}return g},createFile:function(a,b,c,d,e){var f=PATH.join2("string"==typeof a?a:FS.getPath(a),b),g=FS.getMode(d,e);return FS.create(f,g)},createDataFile:function(a,b,c,d,e,f){var g=b?PATH.join2("string"==typeof a?a:FS.getPath(a),b):a,h=FS.getMode(d,e),i=FS.create(g,h);if(c){if("string"==typeof c){for(var j=new Array(c.length),k=0,l=c.length;k<l;++k)j[k]=c.charCodeAt(k);c=j}FS.chmod(i,146|h);var m=FS.open(i,"w");FS.write(m,c,0,c.length,0,f),FS.close(m),FS.chmod(i,h)}return i},createDevice:function(a,b,c,d){var e=PATH.join2("string"==typeof a?a:FS.getPath(a),b),f=FS.getMode(!!c,!!d);
+FS.createDevice.major||(FS.createDevice.major=64);var g=FS.makedev(FS.createDevice.major++,0);return FS.registerDevice(g,{open:function(a){a.seekable=!1},close:function(a){d&&d.buffer&&d.buffer.length&&d(10)},read:function(a,b,d,e,f){for(var g=0,h=0;h<e;h++){var i;try{i=c()}catch(a){throw new FS.ErrnoError(ERRNO_CODES.EIO)}if(void 0===i&&0===g)throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);if(null===i||void 0===i)break;g++,b[d+h]=i}return g&&(a.node.timestamp=Date.now()),g},write:function(a,b,c,e,f){for(var g=0;g<e;g++)try{d(b[c+g])}catch(a){throw new FS.ErrnoError(ERRNO_CODES.EIO)}return e&&(a.node.timestamp=Date.now()),g}}),FS.mkdev(e,f,g)},createLink:function(a,b,c,d,e){var f=PATH.join2("string"==typeof a?a:FS.getPath(a),b);return FS.symlink(c,f)},forceLoadFile:function(a){if(a.isDevice||a.isFolder||a.link||a.contents)return!0;var b=!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!Module.read)throw new Error("Cannot load without read() or XMLHttpRequest.");try{a.contents=intArrayFromString(Module.read(a.url),!0),a.usedBytes=a.contents.length}catch(a){b=!1}return b||___setErrNo(ERRNO_CODES.EIO),b},createLazyFile:function(a,b,c,d,e){function f(){this.lengthKnown=!1,this.chunks=[]}if(f.prototype.get=function(b){if(!(b>this.length-1||b<0)){var c=b%this.chunkSize,d=b/this.chunkSize|0;return this.getter(d)[c]}},f.prototype.setDataGetter=function(b){this.getter=b},f.prototype.cacheLength=function(){var b=new XMLHttpRequest;if(b.open("HEAD",c,!1),b.send(null),!(b.status>=200&&b.status<300||304===b.status))throw new Error("Couldn't load "+c+". Status: "+b.status);var e,d=Number(b.getResponseHeader("Content-length")),f=(e=b.getResponseHeader("Accept-Ranges"))&&"bytes"===e,g=(e=b.getResponseHeader("Content-Encoding"))&&"gzip"===e,h=1048576;f||(h=d);var i=function(a,b){if(a>b)throw new Error("invalid range ("+a+", "+b+") or no bytes requested!");if(b>d-1)throw new Error("only "+d+" bytes available! programmer error!");var e=new XMLHttpRequest;if(e.open("GET",c,!1),d!==h&&e.setRequestHeader("Range","bytes="+a+"-"+b),"undefined"!=typeof Uint8Array&&(e.responseType="arraybuffer"),e.overrideMimeType&&e.overrideMimeType("text/plain; charset=x-user-defined"),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+c+". Status: "+e.status);return void 0!==e.response?new Uint8Array(e.response||[]):intArrayFromString(e.responseText||"",!0)},j=this;j.setDataGetter(function(a){var b=a*h,c=(a+1)*h-1;if(c=Math.min(c,d-1),"undefined"==typeof j.chunks[a]&&(j.chunks[a]=i(b,c)),"undefined"==typeof j.chunks[a])throw new Error("doXHR failed!");return j.chunks[a]}),!g&&d||(h=d=1,d=this.getter(0).length,h=d,console.log("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=d,this._chunkSize=h,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var g=new f;Object.defineProperties(g,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var h={isDevice:!1,contents:g}}else var h={isDevice:!1,url:c};var i=FS.createFile(a,b,h,d,e);h.contents?i.contents=h.contents:h.url&&(i.contents=null,i.url=h.url),Object.defineProperties(i,{usedBytes:{get:function(){return this.contents.length}}});var j={},k=Object.keys(i.stream_ops);return k.forEach(function(a){var b=i.stream_ops[a];j[a]=function(){if(!FS.forceLoadFile(i))throw new FS.ErrnoError(ERRNO_CODES.EIO);return b.apply(null,arguments)}}),j.read=function(b,c,d,e,f){if(!FS.forceLoadFile(i))throw new FS.ErrnoError(ERRNO_CODES.EIO);var g=b.node.contents;if(f>=g.length)return 0;var h=Math.min(g.length-f,e);if(assert(h>=0),g.slice)for(var j=0;j<h;j++)c[d+j]=g[f+j];else for(var j=0;j<h;j++)c[d+j]=g.get(f+j);return h},i.stream_ops=j,i},createPreloadedFile:function(a,b,c,d,e,f,g,h,i,j){function m(c){function m(c){j&&j(),h||FS.createDataFile(a,b,c,d,e,i),f&&f(),removeRunDependency(l)}var n=!1;Module.preloadPlugins.forEach(function(a){n||a.canHandle(k)&&(a.handle(c,k,m,function(){g&&g(),removeRunDependency(l)}),n=!0)}),n||m(c)}Browser.init();var k=b?PATH.resolve(PATH.join2(a,b)):a,l=getUniqueRunDependency("cp "+k);addRunDependency(l),"string"==typeof c?Browser.asyncLoad(c,function(a){m(a)},g):m(c)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(a,b,c){b=b||function(){},c=c||function(){};var d=FS.indexedDB();try{var e=d.open(FS.DB_NAME(),FS.DB_VERSION)}catch(a){return c(a)}e.onupgradeneeded=function(){console.log("creating db");var b=e.result;b.createObjectStore(FS.DB_STORE_NAME)},e.onsuccess=function(){function l(){0==j?b():c()}var f=e.result,g=f.transaction([FS.DB_STORE_NAME],"readwrite"),h=g.objectStore(FS.DB_STORE_NAME),i=0,j=0,k=a.length;a.forEach(function(a){var b=h.put(FS.analyzePath(a).object.contents,a);b.onsuccess=function(){i++,i+j==k&&l()},b.onerror=function(){j++,i+j==k&&l()}}),g.onerror=c},e.onerror=c},loadFilesFromDB:function(a,b,c){b=b||function(){},c=c||function(){};var d=FS.indexedDB();try{var e=d.open(FS.DB_NAME(),FS.DB_VERSION)}catch(a){return c(a)}e.onupgradeneeded=c,e.onsuccess=function(){function l(){0==j?b():c()}var f=e.result;try{var g=f.transaction([FS.DB_STORE_NAME],"readonly")}catch(a){return void c(a)}var h=g.objectStore(FS.DB_STORE_NAME),i=0,j=0,k=a.length;a.forEach(function(a){var b=h.get(a);b.onsuccess=function(){FS.analyzePath(a).exists&&FS.unlink(a),FS.createDataFile(PATH.dirname(a),PATH.basename(a),b.result,!0,!0,!0),i++,i+j==k&&l()},b.onerror=function(){j++,i+j==k&&l()}}),g.onerror=c},e.onerror=c}},SYSCALLS={DEFAULT_POLLMASK:5,mappings:{},umask:511,calculateAt:function(a,b){if("/"!==b[0]){var c;if(a===-100)c=FS.cwd();else{var d=FS.getStream(a);if(!d)throw new FS.ErrnoError(ERRNO_CODES.EBADF);c=d.path}b=PATH.join2(c,b)}return b},doStat:function(a,b,c){try{var d=a(b)}catch(a){if(a&&a.node&&PATH.normalize(b)!==PATH.normalize(FS.getPath(a.node)))return-ERRNO_CODES.ENOTDIR;throw a}return HEAP32[c>>2]=d.dev,HEAP32[c+4>>2]=0,HEAP32[c+8>>2]=d.ino,HEAP32[c+12>>2]=d.mode,HEAP32[c+16>>2]=d.nlink,HEAP32[c+20>>2]=d.uid,HEAP32[c+24>>2]=d.gid,HEAP32[c+28>>2]=d.rdev,HEAP32[c+32>>2]=0,HEAP32[c+36>>2]=d.size,HEAP32[c+40>>2]=4096,HEAP32[c+44>>2]=d.blocks,HEAP32[c+48>>2]=d.atime.getTime()/1e3|0,HEAP32[c+52>>2]=0,HEAP32[c+56>>2]=d.mtime.getTime()/1e3|0,HEAP32[c+60>>2]=0,HEAP32[c+64>>2]=d.ctime.getTime()/1e3|0,HEAP32[c+68>>2]=0,HEAP32[c+72>>2]=d.ino,0},doMsync:function(a,b,c,d){var e=new Uint8Array(HEAPU8.subarray(a,a+c));FS.msync(b,e,0,c,d)},doMkdir:function(a,b){return a=PATH.normalize(a),"/"===a[a.length-1]&&(a=a.substr(0,a.length-1)),FS.mkdir(a,b,0),0},doMknod:function(a,b,c){switch(61440&b){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-ERRNO_CODES.EINVAL}return FS.mknod(a,b,c),0},doReadlink:function(a,b,c){if(c<=0)return-ERRNO_CODES.EINVAL;var d=FS.readlink(a);return d=d.slice(0,Math.max(0,c)),writeStringToMemory(d,b,!0),d.length},doAccess:function(a,b){if(b&-8)return-ERRNO_CODES.EINVAL;var c,d=FS.lookupPath(a,{follow:!0});c=d.node;var e="";return 4&b&&(e+="r"),2&b&&(e+="w"),1&b&&(e+="x"),e&&FS.nodePermissions(c,e)?-ERRNO_CODES.EACCES:0},doDup:function(a,b,c){var d=FS.getStream(c);return d&&FS.close(d),FS.open(a,b,0,c,c).fd},doReadv:function(a,b,c,d){for(var e=0,f=0;f<c;f++){var g=HEAP32[b+8*f>>2],h=HEAP32[b+(8*f+4)>>2],i=FS.read(a,HEAP8,g,h,d);if(i<0)return-1;if(e+=i,i<h)break}return e},doWritev:function(a,b,c,d){for(var e=0,f=0;f<c;f++){var g=HEAP32[b+8*f>>2],h=HEAP32[b+(8*f+4)>>2],i=FS.write(a,HEAP8,g,h,d);if(i<0)return-1;e+=i}return e},varargs:0,get:function(a){SYSCALLS.varargs+=4;var b=HEAP32[SYSCALLS.varargs-4>>2];return b},getStr:function(){var a=Pointer_stringify(SYSCALLS.get());return a},getStreamFromFD:function(){var a=FS.getStream(SYSCALLS.get());if(!a)throw new FS.ErrnoError(ERRNO_CODES.EBADF);return a},getSocketFromFD:function(){var a=SOCKFS.getSocket(SYSCALLS.get());if(!a)throw new FS.ErrnoError(ERRNO_CODES.EBADF);return a},getSocketAddress:function(a){var b=SYSCALLS.get(),c=SYSCALLS.get();if(a&&0===b)return null;var d=__read_sockaddr(b,c);if(d.errno)throw new FS.ErrnoError(d.errno);return d.addr=DNS.lookup_addr(d.addr)||d.addr,d},get64:function(){var a=SYSCALLS.get(),b=SYSCALLS.get();return assert(a>=0?0===b:b===-1),a},getZero:function(){assert(0===SYSCALLS.get())}};Module._bitshift64Lshr=_bitshift64Lshr,Module._testSetjmp=_testSetjmp,Module._memcpy=_memcpy;var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",ALLOC_STATIC);Module._llvm_cttz_i32=_llvm_cttz_i32,Module.___udivmoddi4=___udivmoddi4,Module.___udivdi3=___udivdi3,Module.___muldsi3=___muldsi3,Module.___muldi3=___muldi3;var _llvm_pow_f64=Math_pow;Module._memmove=_memmove,Module.___uremdi3=___uremdi3;var _llvm_fabs_f32=Math_abs;if(Module._pthread_self=_pthread_self,Module.requestFullScreen=function(b,c,d){Browser.requestFullScreen(b,c,d)},Module.requestAnimationFrame=function(b){Browser.requestAnimationFrame(b)},Module.setCanvasSize=function(b,c,d){Browser.setCanvasSize(b,c,d)},Module.pauseMainLoop=function(){Browser.mainLoop.pause()},Module.resumeMainLoop=function(){Browser.mainLoop.resume()},Module.getUserMedia=function(){Browser.getUserMedia()},Module.createContext=function(b,c,d,e){return Browser.createContext(b,c,d,e)},_emscripten_get_now=ENVIRONMENT_IS_NODE?function(){var b=process.hrtime();return 1e3*b[0]+b[1]/1e6}:"undefined"!=typeof dateNow?dateNow:"object"==typeof self&&self.performance&&"function"==typeof self.performance.now?function(){return self.performance.now()}:"object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:Date.now,FS.staticInit(),__ATINIT__.unshift(function(){Module.noFSInit||FS.init.initialized||FS.init()}),__ATMAIN__.push(function(){FS.ignorePermissions=!1}),__ATEXIT__.push(function(){FS.quit()}),Module.FS_createFolder=FS.createFolder,Module.FS_createPath=FS.createPath,Module.FS_createDataFile=FS.createDataFile,Module.FS_createPreloadedFile=FS.createPreloadedFile,Module.FS_createLazyFile=FS.createLazyFile,Module.FS_createLink=FS.createLink,Module.FS_createDevice=FS.createDevice,Module.FS_unlink=FS.unlink,__ATINIT__.unshift(function(){TTY.init()}),__ATEXIT__.push(function(){TTY.shutdown()}),ENVIRONMENT_IS_NODE){var fs=require("fs"),NODEJS_PATH=require("path");NODEFS.staticInit()}STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),staticSealed=!0,STACK_MAX=STACK_BASE+TOTAL_STACK,DYNAMIC_BASE=DYNAMICTOP=Runtime.alignMemory(STACK_MAX),assert(DYNAMIC_BASE<TOTAL_MEMORY,"TOTAL_MEMORY not big enough for stack"),Module.asmGlobalArg={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,NaN:NaN,Infinity:1/0},Module.asmLibraryArg={abort:abort,assert:assert,abortStackOverflow:abortStackOverflow,nullFunc_iiii:nullFunc_iiii,nullFunc_viiiiiii:nullFunc_viiiiiii,nullFunc_viiiii:nullFunc_viiiii,nullFunc_vi:nullFunc_vi,nullFunc_vii:nullFunc_vii,nullFunc_ii:nullFunc_ii,nullFunc_viii:nullFunc_viii,nullFunc_iiiii:nullFunc_iiiii,nullFunc_viiiiii:nullFunc_viiiiii,nullFunc_iii:nullFunc_iii,nullFunc_viiii:nullFunc_viiii,invoke_iiii:invoke_iiii,invoke_viiiiiii:invoke_viiiiiii,invoke_viiiii:invoke_viiiii,invoke_vi:invoke_vi,invoke_vii:invoke_vii,invoke_ii:invoke_ii,invoke_viii:invoke_viii,invoke_iiiii:invoke_iiiii,invoke_viiiiii:invoke_viiiiii,invoke_iii:invoke_iii,invoke_viiii:invoke_viiii,_pthread_cleanup_pop:_pthread_cleanup_pop,___syscall221:___syscall221,_llvm_pow_f64:_llvm_pow_f64,_abort:_abort,_llvm_fabs_f64:_llvm_fabs_f64,_pthread_cleanup_push:_pthread_cleanup_push,_longjmp:_longjmp,_emscripten_set_main_loop_timing:_emscripten_set_main_loop_timing,_sbrk:_sbrk,_emscripten_memcpy_big:_emscripten_memcpy_big,__exit:__exit,___setErrNo:___setErrNo,_llvm_fabs_f32:_llvm_fabs_f32,___syscall54:___syscall54,___unlock:___unlock,_emscripten_set_main_loop:_emscripten_set_main_loop,_emscripten_get_now:_emscripten_get_now,___lock:___lock,___syscall6:___syscall6,___syscall5:___syscall5,_emscripten_longjmp:_emscripten_longjmp,___syscall140:___syscall140,_exit:_exit,___syscall145:___syscall145,___syscall146:___syscall146,STACKTOP:STACKTOP,STACK_MAX:STACK_MAX,tempDoublePtr:tempDoublePtr,ABORT:ABORT,cttz_i8:cttz_i8};var asm=function(a,b,c){"almost asm";function Ua(a){a|=0;var b=0;return b=l,l=l+a|0,l=l+15&-16,(0|l)>=(0|m)&&Z(0|a),0|b}function Va(){return 0|l}function Wa(a){a|=0,l=a}function Xa(a,b){a|=0,b|=0,l=a,m=b}function Ya(a,b){a|=0,b|=0,0==(0|q)&&(q=a,r=b)}function Za(a){a|=0,F=a}function $a(){return 0|F}function _a(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,ub=0;if(ub=l,l=l+112|0,(0|l)>=(0|m)&&X(),nb=ub+32|0,pb=ub+24|0,ob=ub+16|0,mb=ub+8|0,lb=ub,gb=ub+60|0,hb=ub+48|0,E=ub+40|0,c=0,e=a,t=b,P=0|$f(),ib=P,_=ib,ka=0==(0|_))return va=0|f[637],0|$v(53168,va),c=1,h=c,l=ub,0|h;if(Ga=ib,Ra=e,g=t,i=0|ab(Ga,Ra,g,gb),jb=i,j=jb,k=(0|j)<0)return n=ib,bb(n,gb),o=t,p=0|f[o>>2],cb(p),c=1,h=c,l=ub,0|h;if(q=jb,r=e,s=(0|q)==(0|r))return u=0|f[637],v=gb+12|0,w=0|f[v>>2],f[lb>>2]=w,0|Vv(u,53201,lb),c=1,h=c,l=ub,0|h;x=gb+16|0,y=0|f[x>>2],z=0==(0|y);do if(z&&(A=gb+24|0,B=0|d[A>>0],C=1&B,D=C<<24>>24!=0,!D)){if(F=jb,G=F+1|0,H=e,I=(0|G)==(0|H)){J=ib,K=jb,L=t,M=L+(K<<2)|0,N=0|f[M>>2],O=gb+20|0,Q=0|f[O>>2],R=0!=(0|Q),S=R?53228:53231,T=0|db(J,N,S),U=gb+16|0,f[U>>2]=T;break}return V=0|f[637],W=gb+12|0,Y=0|f[W>>2],f[mb>>2]=Y,0|Vv(V,53236,mb),c=1,h=c,l=ub,0|h}while(0);if(Z=jb,$=gb+8|0,f[$>>2]=Z,aa=ib,eb(E,aa,gb),f[hb>>2]=0|f[E>>2],f[hb+4>>2]=0|f[E+4>>2],ba=hb+4|0,ca=0|f[ba>>2],da=0==(0|ca),da&&(ea=0|f[hb>>2],fa=0!=(0|ea),!fa))return ga=ib,bb(ga,gb),c=1,h=c,l=ub,0|h;if(ha=gb+24|0,ia=0|d[ha>>0],ja=1&ia,la=ja<<24>>24!=0,la&&(ma=gb+12|0,na=0|f[ma>>2],oa=jb,pa=t,qa=pa+(oa<<2)|0,ra=0|f[qa>>2],f[ob>>2]=na,rb=ob+4|0,f[rb>>2]=ra,0|aw(53299,ob)),sa=gb+24|0,ta=0|d[sa>>0],ua=1&ta,wa=ua<<24>>24!=0)return xa=ib,bb(xa,gb),c=0,h=c,l=ub,0|h;if(ya=gb+16|0,za=0|f[ya>>2],Aa=0!=(0|za),!Aa)return Qa=0|f[637],0|Vv(Qa,53353,nb),c=1,h=c,l=ub,0|h;if(Ba=gb+16|0,Ca=0|f[Ba>>2],Da=0|yv(69609,Ca),Ea=0==(0|Da))Fa=0|f[695],sb=Fa;else if(Ha=gb+16|0,Ia=0|f[Ha>>2],Ja=0|Ov(Ia,53316),sb=Ja,Ka=0==(0|Ja))return La=0|f[637],Ma=gb+12|0,Na=0|f[Ma>>2],Oa=gb+16|0,Pa=0|f[Oa>>2],f[pb>>2]=Na,qb=pb+4|0,f[qb>>2]=Pa,0|Vv(La,53319,pb),c=1,h=c,l=ub,0|h;return Sa=ib,Ta=sb,Ua=gb+16|0,Va=0|f[Ua>>2],Wa=0|f[hb>>2],Xa=0|fb(Sa,Ta,Va,Wa,gb),kb=Xa,Ya=sb,0|Rv(Ya),Za=ib,bb(Za,gb),$a=kb,_a=0!=(0|$a),_a?(c=1,h=c,l=ub,0|h):(c=0,h=c,l=ub,0|h)}function ab(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,eb=0,fb=0,gb=0,hb=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0;Ud=l,l=l+64|0,(0|l)>=(0|m)&&X(),Qd=Ud+16|0,Pd=Ud+8|0,Od=Ud,h=a,qb=b,pc=c,Ac=e,Nd=0,Lc=Ac,f[Lc>>2]=0|f[18099],f[Lc+4>>2]=0|f[18100],f[Lc+8>>2]=0|f[18101],f[Lc+12>>2]=0|f[18102],f[Lc+16>>2]=0|f[18103],f[Lc+20>>2]=0|f[18104],f[Lc+24>>2]=0|f[18105],Wc=qb,fd=Ac,f[fd>>2]=Wc,qd=pc,Bd=Ac,i=Bd+4|0,f[i>>2]=qd,v=pc,G=0|f[v>>2],R=Ac,ba=R+12|0,f[ba>>2]=G,Md=1;a:for(;;){if(ma=Md,xa=qb,Ia=(0|ma)<(0|xa),!Ia){Td=36;break}if(Ua=Md,eb=pc,rb=eb+(Ua<<2)|0,Cb=0|f[rb>>2],Nb=0|d[Cb>>0],Yb=Nb<<24>>24,hc=45==(0|Yb),!hc){Td=36;break}kc=Md,lc=pc,mc=lc+(kc<<2)|0,nc=0|f[mc>>2],oc=nc+1|0,qc=0|d[oc>>0],rc=qc<<24>>24;b:do switch(0|rc){case 104:Td=24;break a;case 111:if(sc=Ac,tc=sc+16|0,uc=0|f[tc>>2],vc=0!=(0|uc)){Td=6;break a}if(Cc=Md,Dc=pc,Ec=Dc+(Cc<<2)|0,Fc=0|f[Ec>>2],Gc=Fc+2|0,Hc=0|d[Gc>>0],Ic=Hc<<24>>24,Jc=0==(0|Ic),Jc&&(Kc=Md,Mc=Kc+1|0,Nc=pc,Oc=Nc+(Mc<<2)|0,Pc=0|f[Oc>>2],Qc=0!=(0|Pc))){Rc=Md,Sc=Rc+1|0,Md=Sc,Tc=h,Uc=Md,Vc=pc,Xc=Vc+(Uc<<2)|0,Yc=0|f[Xc>>2],Zc=0|db(Tc,Yc,75440),$c=Ac,_c=$c+16|0,f[_c>>2]=Zc;break b}ad=h,bd=Md,cd=pc,dd=cd+(bd<<2)|0,ed=0|f[dd>>2],gd=ed+2|0,hd=0|db(ad,gd,75440),id=Ac,jd=id+16|0,f[jd>>2]=hd;break;case 66:if(kd=Md,ld=pc,md=ld+(kd<<2)|0,nd=0|f[md>>2],od=nd+2|0,pd=0|d[od>>0],rd=pd<<24>>24,sd=0==(0|rd),sd?(td=Md,ud=td+1|0,vd=pc,wd=vd+(ud<<2)|0,xd=0|f[wd>>2],yd=0!=(0|xd),yd?(zd=Md,Ad=zd+1|0,Md=Ad,Cd=Md,Dd=pc,Ed=Dd+(Cd<<2)|0,Fd=0|f[Ed>>2],Gd=Ac,Hd=Gd+20|0,f[Hd>>2]=Fd):Td=14):Td=14,14==(0|Td)&&(Td=0,Id=Md,Jd=pc,Kd=Jd+(Id<<2)|0,Ld=0|f[Kd>>2],j=Ld+2|0,k=Ac,n=k+20|0,f[n>>2]=j),o=Ac,p=o+20|0,q=0|f[p>>2],r=0|d[q>>0],s=r<<24>>24,t=0==(0|s)){Td=16;break a}break;case 99:z=Ac,A=z+24|0,B=0|d[A>>0],C=B&-2,D=1|C,d[A>>0]=D;break;case 118:E=Ac,F=E+24|0,H=0|d[F>>0],I=(255&H)>>>1,J=1&I,K=J<<24>>24!=0,K||(L=h,Uf(L)),M=Ac,N=M+24|0,O=0|d[N>>0],P=O&-3,Q=2|P,d[N>>0]=Q;break;case 103:S=Ac,T=S+24|0,U=0|d[T>>0],V=(255&U)>>>2,W=15&V,Y=255&W,Z=1|Y,$=255&Z,_=0|d[T>>0],aa=15&$,ca=aa<<2&255,da=_&-61,ea=da|ca,d[T>>0]=ea;break;case 69:fa=Ac,ga=fa+24|0,ha=0|d[ga>>0],ia=(255&ha)>>>2,ja=15&ia,ka=255&ja,la=ka&-7,na=2|la,oa=Ac,pa=oa+24|0,qa=255&na,ra=0|d[pa>>0],sa=15&qa,ta=sa<<2&255,ua=ra&-61,va=ua|ta,d[pa>>0]=va;break;case 101:wa=Ac,ya=wa+24|0,za=0|d[ya>>0],Aa=(255&za)>>>2,Ba=15&Aa,Ca=255&Ba,Da=Ca&-7,Ea=4|Da,Fa=Ac,Ga=Fa+24|0,Ha=255&Ea,Ja=0|d[Ga>>0],Ka=15&Ha,La=Ka<<2&255,Ma=Ja&-61,Na=Ma|La,d[Ga>>0]=Na;break;case 45:if(Oa=Md,Pa=pc,Ra=Pa+(Oa<<2)|0,Sa=0|f[Ra>>2],Ta=Sa+1|0,Va=0|d[Ta>>0],Wa=Va<<24>>24,Xa=10==(0|Wa),Ya=Md,Xa){Td=26;break a}if(Za=pc,$a=Za+(Ya<<2)|0,_a=0|f[$a>>2],ab=_a+2|0,bb=0|yv(ab,53462),cb=0==(0|bb)){Td=28;break a}if(gb=Md,hb=pc,jb=hb+(gb<<2)|0,kb=0|f[jb>>2],lb=kb+2|0,mb=0|yv(lb,53470),nb=0==(0|mb),!nb){Td=31;break a}ob=Ac,pb=ob+24|0,sb=0|d[pb>>0],tb=sb&-3,ub=2|tb,d[pb>>0]=ub;break;default:Td=34;break a}while(0);Fb=Md,Gb=Fb+1|0,Md=Gb}if(6==(0|Td))return wc=0|f[637],xc=Ac,yc=xc+12|0,zc=0|f[yc>>2],Bc=Nd,f[Od>>2]=zc,Rd=Od+4|0,f[Rd>>2]=Bc,0|Vv(wc,53378,Od),g=-1,jc=g,l=Ud,0|jc;if(16==(0|Td))return u=0|f[637],w=Ac,x=w+12|0,y=0|f[x>>2],f[Pd>>2]=y,0|Vv(u,53425,Pd),g=-1,jc=g,l=Ud,0|jc;if(24==(0|Td))return g=-1,jc=g,l=Ud,0|jc;if(26==(0|Td))return g=Ya,jc=g,l=Ud,0|jc;if(28==(0|Td))fb=h,Uf(fb),Qa(0);else{if(31==(0|Td))return vb=Md,wb=pc,xb=wb+(vb<<2)|0,yb=0|f[xb>>2],zb=yb+2|0,Ab=0|yv(zb,53478),Bb=0==(0|Ab),Bb&&(Db=h,Vf(Db),Qa(0)),g=-1,jc=g,l=Ud,0|jc;if(34==(0|Td))return Eb=Md,g=Eb,jc=g,l=Ud,0|jc;if(36==(0|Td))return Hb=Ac,Ib=Hb+24|0,Jb=0|d[Ib>>0],Kb=(255&Jb)>>>1,Lb=1&Kb,Mb=255&Lb,Ob=0!=(0|Mb),Ob&&(Pb=Ac,Qb=Pb+20|0,Rb=0|f[Qb>>2],Sb=0!=(0|Rb),Sb&&(Tb=Ac,Ub=Tb+24|0,Vb=0|d[Ub>>0],Wb=(255&Vb)>>>2,Xb=15&Wb,Zb=255&Xb,$b=6&Zb,_b=0==(0|$b),_b&&(ac=0|f[637],bc=Ac,cc=bc+12|0,dc=0|f[cc>>2],ec=0|ib(),fc=0!=(0|ec),gc=fc?53557:53561,f[Qd>>2]=dc,Sd=Qd+4|0,f[Sd>>2]=gc,0|Vv(ac,53488,Qd)))),ic=Md,g=ic,jc=g,l=Ud,0|jc}return 0}function bb(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,g=d,h=g+16|0,i=0|f[h>>2],Dc(e,i),j=c,gg(j),l=n}function cb(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;for(q=l,l=l+32|0,(0|l)>=(0|m)&&X(),o=q+8|0,n=q,b=a,k=8,c=b,f[n>>2]=c,0|aw(54001,n);;){if(d=k,e=0|f[d>>2],g=0!=(0|e),!g)break;h=k,i=h+4|0,k=i,j=0|f[h>>2],f[o>>2]=j,0|aw(54035,o)}l=q}function db(a,b,c){a|=0,b|=0,c|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0;return Q=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,f=b,s=c,D=f,F=0|Jv(D),M=F,G=s,H=0|Jv(G),L=H,I=e,J=M,K=L,g=J+K|0,h=g+1|0,i=0|Jc(I,h),N=i,j=N,k=f,n=M,o=n+1|0,0|sw(0|j,0|k,0|o),p=s,q=0|d[p>>0],(r=q<<24>>24!=0)?(t=N,u=0|Wv(t,46),O=u,v=0==(0|u),v&&(w=N,x=M,y=w+x|0,O=y),z=O,A=s,B=L,C=B+1|0,0|sw(0|z,0|A,0|C),E=N,l=Q,0|E):(E=N,l=Q,0|E)}function eb(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0;return Ka=l,l=l+48|0,(0|l)>=(0|m)&&X(),Ha=Ka,Ga=Ka+24|0,t=Ka+8|0,e=b,g=c,E=g,P=E+8|0,_=0|f[P>>2],ka=g,va=ka+4|0,Aa=0|f[va>>2],Ba=Aa+(_<<2)|0,h=0|f[Ba>>2],Ea=h,Fa=0,i=e,j=0|yn(i),Ca=j,k=g,n=k+24|0,o=0|d[n>>0],p=(255&o)>>>1,q=1&p,r=q<<24>>24!=0,r&&(s=Ca,u=s+28|0,v=0|d[u>>0],w=v&-3,x=2|w,d[u>>0]=x),y=Ca,z=y+28|0,A=0|d[z>>0],B=A&-5,C=4|B,d[z>>0]=C,D=Ea,F=0|d[D>>0],G=F<<24>>24,H=45==(0|G),H?(I=Ea,J=I+1|0,K=0|d[J>>0],L=K<<24>>24,M=0==(0|L),M?(N=0|f[666],Da=N):Ja=6):Ja=6,6==(0|Ja)&&(Fa=1,O=Ea,Q=0|Ov(O,54041),Da=Q,R=0==(0|Q))?(S=0|f[637],T=g,U=T+12|0,V=0|f[U>>2],W=Ea,f[Ha>>2]=V,Ia=Ha+4|0,f[Ia>>2]=W,0|Vv(S,54043,Ha),jb(a),void(l=Ka)):(Y=e,Z=Ca,$=Ea,0|An(Y,Z,$),aa=g,ba=aa+8|0,ca=0|f[ba>>2],da=ca+1|0,f[ba>>2]=da,ea=g,fa=ea+8|0,ga=0|f[fa>>2],ha=g,ia=0|f[ha>>2],ja=(0|ga)<(0|ia),ja&&(Fa=0,la=e,ma=Ca,na=g,Bn(la,ma,7,na)),oa=e,pa=Da,qa=Ca,En(t,oa,pa,qa),f[Ga>>2]=0|f[t>>2],f[Ga+4>>2]=0|f[t+4>>2],ra=Fa,sa=ra<<24>>24!=0,sa&&(ta=Da,0|Rv(ta)),ua=e,wa=Ca,zn(ua,wa),xa=Ga+4|0,ya=0|f[xa>>2],za=5==(0|ya),za?(jb(a),void(l=Ka)):(f[a>>2]=0|f[Ga>>2],f[a+4>>2]=0|f[Ga+4>>2],void(l=Ka)))}function fb(a,b,c,e,g){a|=0,b|=0,c|=0,e|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,fa=0;return fa=l,l=l+48|0,(0|l)>=(0|m)&&X(),ba=fa+8|0,aa=fa,h=a,i=b,v=c,G=e,R=g,_=0,U=G,V=U+12|0,W=0|f[V>>2],$=W,Y=R,Z=Y+20|0,j=0|f[Z>>2],k=0!=(0|j),n=h,o=$,p=R,q=p+24|0,r=0|d[q>>0],s=(255&r)>>>2,t=15&s,u=255&t,w=255&u,x=i,k?(y=R,z=y+20|0,A=0|f[z>>2],B=0|ac(n,o,w,x,A),_=B,C=_,D=(0|C)==-7,D&&(E=0|f[637],F=R,H=F+20|0,I=0|f[H>>2],f[aa>>2]=I,0|Vv(E,54079,aa))):(J=0|_b(n,o,w,x),_=J),K=_,(L=0!=(0|K))?(M=0|f[637],N=R,O=N+12|0,P=0|f[O>>2],Q=v,S=_,f[ba>>2]=P,ca=ba+4|0,f[ca>>2]=Q,da=ba+8|0,f[da>>2]=S,0|Vv(M,54115,ba),T=_,l=fa,0|T):(T=_,l=fa,0|T)}function gb(a){a|=0;var b=0,d=0;d=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,l=d}function hb(a){a|=0;var b=0,d=0;d=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,l=d}function ib(){var a=0,b=0,c=0,e=0,g=0,h=0,i=0,k=0;return k=l,l=l+16|0,(0|l)>=(0|m)&&X(),h=k+4|0,f[h>>2]=1,i=h,a=i,b=0|d[a>>0],c=b<<24>>24,e=0!=(0|c),g=e?0:1,l=k,0|g}function jb(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function kb(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,fa=0;return fa=l,l=l+32|0,(0|l)>=(0|m)&&X(),ca=fa,c=a,q=c,B=q+24|0,M=0|f[B>>2],aa=M,V=aa,W=V+20|0,Y=0|f[W>>2],_=Y,Z=c,$=Z+20|0,d=0|f[$>>2],e=0!=(0|d),e&&(g=c,h=g+20|0,i=0|f[h>>2],0|Rv(i)),j=_,k=j+8|0,n=0|f[k>>2],o=_,p=0|f[o>>2],(r=(0|n)>=(0|p))?(s=c,t=s+20|0,f[t>>2]=0,b=-1,U=b,l=fa,0|U):(u=_,v=u+8|0,w=0|f[v>>2],x=w+1|0,f[v>>2]=x,y=_,z=y+4|0,A=0|f[z>>2],C=A+(w<<2)|0,D=0|f[C>>2],ba=D,E=ba,F=0|Ov(E,54041),G=c,H=G+20|0,f[H>>2]=F,I=c,J=I+20|0,K=0|f[J>>2],L=0==(0|K),L?(N=0|f[637],O=_,P=O+12|0,Q=0|f[P>>2],R=ba,f[ca>>2]=Q,da=ca+4|0,f[da>>2]=R,0|Vv(N,54043,ca),b=-1,U=b,l=fa,0|U):(S=c,T=ba,Hk(S,T),b=0,U=b,l=fa,0|U))}function lb(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,z=0;z=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,q=b,r=q,s=255&r,t=2==(0|s),u=d,v=255&u,w=6&v,x=0==(0|w),e=d;do{if(t){if(x){f=255&e,g=1&f,h=6|g,i=255&h,c=i;break}c=e;break}if(x){j=255&e,k=1&j,n=2|k,o=255&n,c=o;break}c=e;break}while(0);return p=c,l=z,0|p}function mb(a,b,c,d,g){a|=0,b|=0,c|=0,d|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,qb=0,rb=0,sb=0,tb=0,ub=0,wb=0,Bb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Qb=0,Rb=0,Tb=0,Ub=0,Vb=0,Xb=0,Yb=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,oc=0;if(oc=l,l=l+64|0,(0|l)>=(0|m)&&X(),kc=oc+24|0,gc=oc+8|0,hc=oc+4|0,dc=oc,ec=oc+56|0,i=a,ha=b,sa=c,Da=d,Oa=g,jc=-1,lc=0,mc=0,bc=0,Za=ha,ib=0|nb(Za),cc=ib,Bb=ha,Nb=0|ob(Bb),fc=Nb,f[gc>>2]=0,f[hc>>2]=0,f[dc>>2]=0,e[ec>>1]=0,j=i,w=0==(0|j))return H=Da,f[H>>2]=0,h=-1,aa=h,l=oc,0|aa;f[kc>>2]=12,S=i,ba=ha,ca=0|pb(S,ba),da=0|f[kc>>2],ea=da+ca|0,f[kc>>2]=ea,fa=sa,ga=255&fa,ia=1&ga,ja=0!=(0|ia);do if(ja){if(ka=cc,la=ka<<24>>24!=0,ma=lc,na=ma+8|0,lc=na,oa=i,la){pa=0|Jc(oa,5),f[dc>>2]=pa,qa=lc,ra=qa+2|0,lc=ra,ta=i,ua=ha,va=0|vb(ta,ua,dc,ec),wa=lc,xa=wa+va|0,lc=xa,ya=i,za=ha,Aa=0|xb(ya,za),Ba=lc,Ca=Ba+Aa|0,lc=Ca;break}Ea=ha,Fa=0|yb(oa,Ea),Ga=lc,Ha=Ga+Fa|0,lc=Ha;break}while(0);Ia=fc,Ja=Ia<<24>>24!=0,Ja&&(Ka=mc,La=Ka+8|0,mc=La,Ma=i,Na=ha,zb(Ma,Na,gc,hc),Pa=i,Qa=ha,Ra=0|f[gc>>2],Sa=0|f[hc>>2],Ta=0|Ab(Pa,Qa,Ra,Sa),Ua=mc,Va=Ua+Ta|0,mc=Va),Wa=0|f[kc>>2],Xa=22+Wa|0,Ya=lc,$a=Xa+Ya|0,_a=mc,ab=$a+_a|0,bb=ab+8|0,ic=bb,cb=i,db=ic,eb=0|Jc(cb,db),fb=Da,f[fb>>2]=eb,bc=eb,gb=bc,hb=gb+22|0,bc=hb,jb=i,kb=ha,lb=bc,mb=sa,qb=0|Cb(jb,kb,lb,kc,mb),jc=qb,rb=jc,sb=0!=(0|rb);do if(!sb){if(tb=0|f[kc>>2],ub=bc,wb=ub+tb|0,bc=wb,Db=0|f[kc>>2],Eb=22+Db|0,Fb=lc,Gb=Eb+Fb|0,Hb=mc,Ib=Gb+Hb|0,Jb=Ib+8|0,Kb=Oa,f[Kb>>2]=Jb,Lb=sa,Mb=255&Lb,Ob=1&Mb,Qb=0!=(0|Ob)){if(Rb=cc,Tb=Rb<<24>>24!=0,Ub=i,Vb=ha,Xb=bc,Tb?(Yb=0|f[dc>>2],_b=0|e[ec>>1],ac=0|Pb(Ub,Vb,Xb,Yb,_b),jc=ac):(k=0|Sb(Ub,Vb,Xb),jc=k),n=jc,o=0!=(0|n))break;p=lc,q=bc,r=q+p|0,bc=r}if(s=fc,t=s<<24>>24!=0){if(u=i,v=ha,x=bc,y=0|f[gc>>2],z=0|f[hc>>2],A=0|Wb(u,v,x,y,z),jc=A,B=jc,C=0!=(0|B))break;D=mc,E=bc,F=E+D|0,bc=F}G=i,I=bc,0|Zb(G,I),J=i,K=Oa,L=0|f[K>>2],M=Da,N=0|f[M>>2],O=sa,0|$b(J,L,N,O)}while(0);return P=jc,Q=0!=(0|P),Q&&(R=i,T=Da,U=0|f[T>>2],Dc(R,U),V=Da,f[V>>2]=0),W=i,Y=0|f[gc>>2],Dc(W,Y),Z=i,$=0|f[dc>>2],Dc(Z,$),_=jc,h=_,aa=h,l=oc,0|aa}function nb(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;if(C=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,q=c,t=q+36|0,u=0|f[t>>2],v=0!=(0|u),!v)return b=0,s=b,l=C,0|s;for(A=0;;){if(w=A,x=c,y=x+52|0,z=0|f[y>>2],d=w>>>0<z>>>0,!d){B=8;break}if(e=A,g=c,h=g+20|0,i=0|f[h>>2],j=i+(e<<2)|0,k=0|f[j>>2],n=0|nb(k),o=n<<24>>24!=0,!o){B=6;break}p=A,r=p+1|0,A=r}return 6==(0|B)?(b=0,s=b,l=C,0|s):8==(0|B)?(b=1,s=b,l=C,0|s):0}function ob(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;if(C=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,q=c,t=q+24|0,u=0|f[t>>2],v=0!=(0|u))return b=1,s=b,l=C,0|s;for(A=0;;){if(w=A,x=c,y=x+52|0,z=0|f[y>>2],d=w>>>0<z>>>0,!d){B=8;break}if(e=A,g=c,h=g+20|0,i=0|f[h>>2],j=i+(e<<2)|0,k=0|f[j>>2],n=0|ob(k),o=n<<24>>24!=0){B=6;break}p=A,r=p+1|0,A=r}return 6==(0|B)?(b=1,s=b,l=C,0|s):8==(0|B)?(b=0,s=b,l=C,0|s):0}function pb(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,F=0;for(F=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,D=0,r=c,v=d,w=0|qb(r,v),D=w,C=0;;){if(x=C,y=d,z=y+52|0,A=0|f[z>>2],B=x>>>0<A>>>0,!B)break;e=c,g=C,h=d,i=h+20|0,j=0|f[i>>2],k=j+(g<<2)|0,n=0|f[k>>2],o=0|pb(e,n),p=D,q=p+o|0,D=q,s=C,t=s+1|0,C=t}return u=D,l=F,0|u}function qb(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,C=0;return C=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,A=0,q=c,t=0|rb(q),u=A,v=u+t|0,A=v,w=c,x=d,y=0|sb(w,x),z=A,e=z+y|0,A=e,f=c,g=d,h=0|tb(f,g),i=A,j=i+h|0,A=j,k=c,n=d,o=0|ub(k,n),p=A,r=p+o|0,A=r,s=A,l=C,0|s}function rb(a){a|=0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0;return j=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,h=0,c=h,d=c+4|0,h=d,e=h,f=e+6|0,h=f,g=h,l=j,0|g}function sb(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,s=0,i=s,j=i+4|0,s=j,k=s,n=k+4|0,s=n,o=d,p=o+40|0,q=0|f[p>>2],r=q<<2,e=s,g=e+r|0,s=g,h=s,l=u,0|h}function tb(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,jb=0;for(jb=l,l=l+80|0,(0|l)>=(0|m)&&X(),d=jb+72|0,c=jb+64|0,hb=jb+40|0,u=jb+24|0,F=jb+8|0,e=a,g=b,gb=0,Q=gb,aa=Q+4|0,gb=aa,la=g,wa=la+44|0,Ha=0|f[wa>>2],Sa=3*Ha|0,h=gb,j=h+Sa|0,gb=j,fb=0;;){if(k=fb,n=g,o=n+44|0,p=0|f[o>>2],q=k>>>0<p>>>0,!q)break;switch(r=e,s=0|Wc(r),bb=s,t=fb,v=g,w=v+12|0,x=0|f[w>>2],y=x+(t<<3)|0,z=y+4|0,A=0|f[z>>2],0|A){case 3:B=e,C=fb,D=g,E=D+12|0,G=0|f[E>>2],H=G+(C<<3)|0,f[c>>2]=0|f[H>>2],f[c+4>>2]=0|f[H+4>>2],pe(u,B,c,10),f[hb>>2]=0|f[u>>2],f[hb+4>>2]=0|f[u+4>>2],I=0|f[hb>>2],J=0|f[I>>2],K=J>>>11,L=8&K,M=0!=(0|L),N=0|f[hb>>2],M?(O=0|f[N>>2],P=O>>>11,R=496&P,S=R>>4,V=S):(T=N+12|0,U=0|f[T>>2],V=U),cb=V,W=cb,Y=gb,Z=Y+W|0,gb=Z;break;case 6:$=e,_=fb,ba=g,ca=ba+12|0,da=0|f[ca>>2],ea=da+(_<<3)|0,f[d>>2]=0|f[ea>>2],f[d+4>>2]=0|f[ea+4>>2],cc(F,$,d,54146),f[hb>>2]=0|f[F>>2],f[hb+4>>2]=0|f[F+4>>2],fa=0|f[hb>>2],ga=0|f[fa>>2],ha=ga>>>11,ia=8&ha,ja=0!=(0|ia),ka=0|f[hb>>2],ja?(ma=0|f[ka>>2],na=ma>>>11,oa=496&na,pa=oa>>4,sa=pa):(qa=ka+12|0,ra=0|f[qa>>2],sa=ra),db=sa,ta=db,ua=gb,va=ua+ta|0,gb=va;break;case 16:xa=fb,ya=g,za=ya+12|0,Aa=0|f[za>>2],Ba=Aa+(xa<<3)|0,Ca=0|f[Ba>>2],Da=0|f[Ca>>2],Ea=Da>>>11,Fa=8&Ea,Ga=0!=(0|Fa),
+Ia=fb,Ja=g,Ka=Ja+12|0,La=0|f[Ka>>2],Ma=La+(Ia<<3)|0,Na=0|f[Ma>>2],Ga?(Oa=0|f[Na>>2],Pa=Oa>>>11,Qa=496&Pa,Ra=Qa>>4,Va=Ra):(Ta=Na+12|0,Ua=0|f[Ta>>2],Va=Ua),eb=Va,Wa=eb,Xa=gb,Ya=Xa+Wa|0,gb=Ya}Za=e,$a=bb,Xc(Za,$a),_a=fb,ab=_a+1|0,fb=ab}return i=gb,l=jb,0|i}function ub(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0;for(O=l,l=l+32|0,(0|l)>=(0|m)&&X(),K=O,c=a,d=b,L=0,r=L,C=r+4|0,L=C,M=0;;){if(E=M,F=d,G=F+48|0,H=0|f[G>>2],I=E>>>0<H>>>0,J=L,!I)break;e=J+2|0,L=e,g=M,h=d,i=h+16|0,j=0|f[i>>2],k=j+(g<<2)|0,n=0|f[k>>2],o=0!=(0|n),o&&(p=c,q=M,s=d,t=s+16|0,u=0|f[t>>2],v=u+(q<<2)|0,w=0|f[v>>2],0|si(p,w,K),x=0|f[K>>2],y=x+1|0,z=L,A=z+y|0,L=A),B=M,D=B+1|0,M=D}return l=O,0|J}function vb(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Sa=0;for(Sa=l,l=l+48|0,(0|l)>=(0|m)&&X(),Na=Sa,g=a,h=b,u=c,F=d,Q=u,aa=0|f[Q>>2],Oa=aa,Qa=0,la=h,wa=la+36|0,Ha=0|f[wa>>2],La=Ha,Pa=0;;){if(Ka=Pa,i=La,j=i+4|0,k=0|e[j>>1],n=65535&k,o=Ka>>>0<n>>>0,!o)break;p=Pa,q=La,r=q+8|0,s=0|f[r>>2],t=s+(p<<2)|0,v=0|f[t>>2],Ma=v,w=Oa,x=F,y=0|e[x>>1],z=65535&y,A=Ma,B=A+8|0,C=0|f[B>>2],D=0|wb(w,z,C),E=(0|D)==-1,E&&(G=F,H=0|e[G>>1],I=65535&H,J=I+1|0,K=65535&J,e[G>>1]=K,L=g,M=Oa,N=F,O=0|e[N>>1],P=65535&O,R=P<<2,S=0|Hc(L,M,R),Oa=S,T=u,f[T>>2]=S,U=Ma,V=U+8|0,W=0|f[V>>2],Y=F,Z=0|e[Y>>1],$=65535&Z,_=$-1|0,ba=Oa,ca=ba+(_<<2)|0,f[ca>>2]=W,da=g,ea=Ma,fa=ea+8|0,ga=0|f[fa>>2],0|si(da,ga,Na),ha=0|f[Na>>2],ia=2+ha|0,ja=Qa,ka=ja+ia|0,Qa=ka),ma=Pa,na=ma+1|0,Pa=na}for(Pa=0;;){if(oa=Pa,pa=h,qa=pa+52|0,ra=0|f[qa>>2],sa=oa>>>0<ra>>>0,!sa)break;ta=g,ua=Pa,va=h,xa=va+20|0,ya=0|f[xa>>2],za=ya+(ua<<2)|0,Aa=0|f[za>>2],Ba=u,Ca=F,Da=0|vb(ta,Aa,Ba,Ca),Ea=Qa,Fa=Ea+Da|0,Qa=Fa,Ga=Pa,Ia=Ga+1|0,Pa=Ia}return Ja=Qa,l=Sa,0|Ja}function wb(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;for(y=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,o=b,p=c,w=0;;){if(q=w,r=o,s=(0|q)<(0|r),!s){x=6;break}if(t=w,u=e,v=u+(t<<2)|0,g=0|f[v>>2],h=p,i=(0|g)==(0|h),j=w,i){x=4;break}k=j+1|0,w=k}return 4==(0|x)?(d=j,n=d,l=y,0|n):6==(0|x)?(d=-1,n=d,l=y,0|n):0}function xb(a,b){a|=0,b|=0;var c=0,d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,za=0;for(za=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,d=b,xa=0,s=xa,D=s+4|0,xa=D,O=xa,$=O+2|0,xa=$,ua=0;;){if(ja=ua,ra=65535&ja,sa=d,ta=sa+36|0,g=0|f[ta>>2],h=g+4|0,i=0|e[h>>1],j=65535&i,k=(0|ra)<(0|j),!k)break;switch(n=ua,o=65535&n,p=d,q=p+36|0,r=0|f[q>>2],t=r+8|0,u=0|f[t>>2],v=u+(o<<2)|0,w=0|f[v>>2],va=w,x=xa,y=x+4|0,xa=y,z=xa,A=z+2|0,xa=A,B=xa,C=B+4|0,xa=C,E=xa,F=E+1|0,xa=F,G=va,H=G+16|0,I=0|f[H>>2],0|I){case 0:J=va,K=J+12|0,L=0|f[K>>2],M=L<<1,N=xa,P=N+M|0,xa=P;break;case 1:Q=va,R=Q+12|0,S=0|f[R>>2],T=6*S|0,U=xa,V=U+T|0,xa=V}W=ua,Y=W+1<<16>>16,ua=Y}for(wa=0;;){if(Z=wa,_=d,aa=_+52|0,ba=0|f[aa>>2],ca=Z>>>0<ba>>>0,!ca)break;da=c,ea=wa,fa=d,ga=fa+20|0,ha=0|f[ga>>2],ia=ha+(ea<<2)|0,ka=0|f[ia>>2],la=0|xb(da,ka),ma=xa,na=ma+la|0,xa=na,oa=wa,pa=oa+1|0,wa=pa}return qa=xa,l=za,0|qa}function yb(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,K=0;return K=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,I=0,r=I,B=r+4|0,I=B,C=I,D=C+2|0,I=D,E=d,F=E+28|0,G=0|f[F>>2],H=0!=(0|G),H&&(e=d,g=e+28|0,h=0|f[g>>2],i=0|Jv(h),j=I,k=j+i|0,I=k),n=I,o=n+4|0,I=o,p=d,q=p+32|0,s=0|f[q>>2],(t=0!=(0|s))?(u=d,v=u+40|0,w=0|f[v>>2],x=w<<1,y=I,z=y+x|0,I=z,A=I,l=K,0|A):(A=I,l=K,0|A)}function zb(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,za=0;for(za=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=a,h=b,u=c,F=d,Q=u,aa=0|f[Q>>2],la=0==(0|aa),la&&(ta=g,ua=0|Jc(ta,4),va=u,f[va>>2]=ua),wa=0;;){if(i=wa,j=i+1|0,k=h,n=0|e[k>>1],o=65535&n,p=j>>>0<o>>>0,!p)break;q=wa,r=h,s=r+24|0,t=0|f[s>>2],v=t+(q<<3)|0,w=0|f[v>>2],xa=w,x=xa,y=0==(0|x),y||(z=u,A=0|f[z>>2],B=F,C=0|f[B>>2],D=xa,E=0|wb(A,C,D),G=(0|E)!=-1,G||(H=F,I=0|f[H>>2],J=I+1|0,f[H>>2]=J,K=g,L=u,M=0|f[L>>2],N=F,O=0|f[N>>2],P=O<<2,R=0|Hc(K,M,P),S=u,f[S>>2]=R,T=xa,U=F,V=0|f[U>>2],W=V-1|0,Y=u,Z=0|f[Y>>2],$=Z+(W<<2)|0,f[$>>2]=T)),_=wa,ba=_+1|0,wa=ba}for(wa=0;;){if(ca=wa,da=h,ea=da+52|0,fa=0|f[ea>>2],ga=ca>>>0<fa>>>0,!ga)break;ha=g,ia=wa,ja=h,ka=ja+20|0,ma=0|f[ka>>2],na=ma+(ia<<2)|0,oa=0|f[na>>2],pa=u,qa=F,zb(ha,oa,pa,qa),ra=wa,sa=ra+1|0,wa=sa}l=za}function Ab(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,N=0;for(N=l,l=l+32|0,(0|l)>=(0|m)&&X(),L=N,e=a,g=b,t=c,C=d,K=0,D=K,E=D+4|0,K=E,F=C,G=F<<1,H=K,I=H+G|0,K=I,J=0;;){if(h=J,i=C,j=h>>>0<i>>>0,k=e,!j)break;n=J,o=t,p=o+(n<<2)|0,q=0|f[p>>2],0|si(k,q,L),r=0|f[L>>2],s=K,u=s+r|0,K=u,v=J,w=v+1|0,J=w}return x=g,y=0|Bb(k,x),z=K,A=z+y|0,K=A,B=K,l=N,0|B}function Bb(a,b){a|=0,b|=0;var c=0,d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,K=0;for(K=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,I=0,s=d,A=0|e[s>>1],B=65535&A,C=B-1|0,D=C<<2,E=I,F=E+D|0,I=F,H=0;;){if(G=H,g=d,h=g+52|0,i=0|f[h>>2],j=G>>>0<i>>>0,!j)break;k=c,n=H,o=d,p=o+20|0,q=0|f[p>>2],r=q+(n<<2)|0,t=0|f[r>>2],u=0|Bb(k,t),v=I,w=v+u|0,I=w,x=H,y=x+1|0,H=y}return z=I,l=K,0|z}function Cb(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,V=0;return V=l,l=l+48|0,(0|l)>=(0|m)&&X(),T=V+4|0,h=a,u=b,F=c,K=d,L=e,f[T>>2]=0,M=F,Q=M,N=h,O=0==(0|N),P=F,i=0==(0|P),(R=O|i)?(g=-7,J=g,l=V,0|J):(j=Q,k=j+12|0,Q=k,n=h,o=u,p=Q,q=L,r=0|Db(n,o,p,T,q),S=r,s=S,t=0!=(0|s),t?(v=S,g=v,J=g,l=V,0|J):(w=Q,x=F,y=w,z=x,A=y-z|0,B=0|f[T>>2],C=A+B|0,D=K,f[D>>2]=C,E=h,G=K,H=0|f[G>>2],I=F,0|Ob(E,H,I),g=0,J=g,l=V,0|J))}function Db(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0;if(Fa=l,l=l+48|0,(0|l)>=(0|m)&&X(),Ca=Fa,h=a,u=b,F=c,Q=d,aa=e,la=F,Da=la,wa=u,ya=0==(0|wa))return g=-6,xa=g,l=Fa,0|xa;if(za=h,i=u,j=0|qb(za,i),k=Q,f[k>>2]=j,n=Q,o=0|f[n>>2],p=0==(0|o))return g=-1,xa=g,l=Fa,0|xa;for(q=h,r=u,s=F,t=0|Eb(q,r,s),v=F,w=v+t|0,F=w,x=h,y=u,z=F,A=aa,B=0|Hb(x,y,z,A),C=F,D=C+B|0,F=D,E=h,G=u,H=F,I=0|Lb(E,G,H),J=F,K=J+I|0,F=K,L=h,M=u,N=F,O=0|Nb(L,M,N),P=F,R=P+O|0,F=R,Aa=0;;){if(S=Aa,T=u,U=T+52|0,V=0|f[U>>2],W=S>>>0<V>>>0,!W){Ea=10;break}if(Y=h,Z=Aa,$=u,_=$+20|0,ba=0|f[_>>2],ca=ba+(Z<<2)|0,da=0|f[ca>>2],ea=F,fa=aa,ga=0|Db(Y,da,ea,Ca,fa),Ba=ga,ha=Ba,ia=0!=(0|ha)){Ea=8;break}ka=0|f[Ca>>2],ma=F,na=ma+ka|0,F=na,oa=Aa,pa=oa+1|0,Aa=pa}return 8==(0|Ea)?(ja=Ba,g=ja,xa=g,l=Fa,0|xa):10==(0|Ea)?(qa=F,ra=Da,sa=qa,ta=ra,ua=sa-ta|0,va=Q,f[va>>2]=ua,g=0,xa=g,l=Fa,0|xa):0}function Eb(a,b,c){a|=0,b|=0,c|=0;var d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,U=0;return U=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,g=b,t=c,E=t,S=E,M=d,N=g,O=0|qb(M,N),P=S,Q=0|Fb(O,P),R=S,h=R+Q|0,S=h,i=g,j=0|e[i>>1],k=S,n=0|Gb(j,k),o=S,p=o+n|0,S=p,q=g,r=q+2|0,s=0|e[r>>1],u=S,v=0|Gb(s,u),w=S,x=w+v|0,S=x,y=g,z=y+52|0,A=0|f[z>>2],B=65535&A,C=S,D=0|Gb(B,C),F=S,G=F+D|0,S=G,H=S,I=t,J=H,K=I,L=J-K|0,l=U,0|L}function Fb(a,b){a|=0,b|=0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;return E=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,e=b,r=c,w=r>>>24,x=255&w,y=255&x,z=e,A=z+1|0,e=A,d[z>>0]=y,B=c,C=B>>>16,f=255&C,g=255&f,h=e,i=h+1|0,e=i,d[h>>0]=g,j=c,k=j>>>8,n=255&k,o=255&n,p=e,q=p+1|0,e=q,d[p>>0]=o,s=c,t=255&s,u=255&t,v=e,d[v>>0]=u,l=E,4}function Gb(a,b){a|=0,b|=0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,e=b,j=c,k=65535&j,n=k>>8,o=255&n,p=255&o,q=e,r=q+1|0,e=r,d[q>>0]=p,s=c,f=65535&s,g=255&f,h=255&g,i=e,d[i>>0]=h,l=u,2}function Hb(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ha=0;switch(Ha=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,g=b,t=c,E=d,P=t,Ea=P,_=g,ka=_+40|0,va=0|f[ka>>2],Ca=Ea,Da=0|Fb(va,Ca),h=Ea,i=h+Da|0,Ea=i,j=Ea,k=0|Ib(j),n=Ea,o=n+k|0,Ea=o,p=E,q=255&p,r=6&q,0|r){case 2:if(s=0|Jb(),u=0!=(0|s),!u){for(Fa=0;;){if(v=Fa,w=g,x=w+40|0,y=0|f[x>>2],z=v>>>0<y>>>0,!z)break;A=Fa,B=g,C=B+8|0,D=0|f[C>>2],F=D+(A<<2)|0,G=0|f[F>>2],H=Ea,I=0|Fb(G,H),J=Ea,K=J+I|0,Ea=K,L=Fa,M=L+1|0,Fa=M}return xa=Ea,ya=t,za=xa,Aa=ya,Ba=za-Aa|0,l=Ha,0|Ba}break;case 4:if(N=0|Jb(),O=0!=(0|N)){for(Fa=0;;){if(Q=Fa,R=g,S=R+40|0,T=0|f[S>>2],U=Q>>>0<T>>>0,!U)break;V=Fa,W=g,Y=W+8|0,Z=0|f[Y>>2],$=Z+(V<<2)|0,aa=0|f[$>>2],ba=Ea,ca=0|Kb(aa,ba),da=Ea,ea=da+ca|0,Ea=ea,fa=Fa,ga=fa+1|0,Fa=ga}return xa=Ea,ya=t,za=xa,Aa=ya,Ba=za-Aa|0,l=Ha,0|Ba}break;case 6:break;default:return xa=Ea,ya=t,za=xa,Aa=ya,Ba=za-Aa|0,l=Ha,0|Ba}return ha=Ea,ia=g,ja=ia+8|0,la=0|f[ja>>2],ma=g,na=ma+40|0,oa=0|f[na>>2],pa=oa<<2,0|sw(0|ha,0|la,0|pa),qa=g,ra=qa+40|0,sa=0|f[ra>>2],ta=sa<<2,ua=Ea,wa=ua+ta|0,Ea=wa,xa=Ea,ya=t,za=xa,Aa=ya,Ba=za-Aa|0,l=Ha,0|Ba}function Ib(a){a|=0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,n=4,c=b,d=c,e=0-d|0,f=3&e,o=f,g=o,h=g>>>0>0,h&&(i=b,j=o,0|nw(0|i,0,0|j)),k=o,l=q,0|k}function Jb(){var a=0,b=0,c=0,e=0,g=0,h=0,i=0,k=0;return k=l,l=l+16|0,(0|l)>=(0|m)&&X(),h=k+4|0,f[h>>2]=1,i=h,a=i,b=0|d[a>>0],c=b<<24>>24,e=0!=(0|c),g=e?0:1,l=k,0|g}function Kb(a,b){a|=0,b|=0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;return E=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,e=b,r=c,w=r>>>24,x=255&w,y=255&x,z=e,A=z+3|0,d[A>>0]=y,B=c,C=B>>>16,f=255&C,g=255&f,h=e,i=h+2|0,d[i>>0]=g,j=c,k=j>>>8,n=255&k,o=255&n,p=e,q=p+1|0,d[q>>0]=o,s=c,t=255&s,u=255&t,v=e,d[v>>0]=u,l=E,4}function Lb(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0;for(mb=l,l=l+96|0,(0|l)>=(0|m)&&X(),e=mb+72|0,d=mb+64|0,jb=mb+32|0,I=mb+16|0,T=mb+8|0,g=a,h=b,x=c,da=x,gb=da,oa=h,za=oa+44|0,Ka=0|f[za>>2],Va=gb,i=0|Fb(Ka,Va),o=gb,p=o+i|0,gb=p,ib=0;;){if(q=ib,r=h,s=r+44|0,t=0|f[s>>2],u=q>>>0<t>>>0,!u)break;switch(v=g,w=0|Wc(v),eb=w,y=ib,z=h,A=z+12|0,B=0|f[A>>2],C=B+(y<<3)|0,D=C+4|0,E=0|f[D>>2],0|E){case 3:F=gb,G=0|Mb(1,F),H=gb,J=H+G|0,gb=J,K=g,L=ib,M=h,N=M+12|0,O=0|f[N>>2],P=O+(L<<3)|0,f[d>>2]=0|f[P>>2],f[d+4>>2]=0|f[P+4>>2],pe(I,K,d,10),f[jb>>2]=0|f[I>>2],f[jb+4>>2]=0|f[I+4>>2],lb=7;break;case 6:Q=gb,R=0|Mb(2,Q),S=gb,U=S+R|0,gb=U,V=g,W=ib,Y=h,Z=Y+12|0,$=0|f[Z>>2],_=$+(W<<3)|0,f[e>>2]=0|f[_>>2],f[e+4>>2]=0|f[_+4>>2],cc(T,V,e,54146),f[jb>>2]=0|f[T>>2],f[jb+4>>2]=0|f[T+4>>2],lb=7;break;case 16:aa=gb,ba=0|Mb(0,aa),ca=gb,ea=ca+ba|0,gb=ea,fa=ib,ga=h,ha=ga+12|0,ia=0|f[ha>>2],ja=ia+(fa<<3)|0,f[jb>>2]=0|f[ja>>2],f[jb+4>>2]=0|f[ja+4>>2],lb=7}7==(0|lb)&&(lb=0,ka=0|f[jb>>2],la=0|f[ka>>2],ma=la>>>11,na=8&ma,pa=0!=(0|na),qa=0|f[jb>>2],ra=qa+12|0,pa?ua=ra:(sa=ra+8|0,ta=0|f[sa>>2],ua=ta),fb=ua,va=0|f[jb>>2],wa=0|f[va>>2],xa=wa>>>11,ya=8&xa,Aa=0!=(0|ya),Ba=0|f[jb>>2],Aa?(Ca=0|f[Ba>>2],Da=Ca>>>11,Ea=496&Da,Fa=Ea>>4,Ia=Fa):(Ga=Ba+12|0,Ha=0|f[Ga>>2],Ia=Ha),kb=Ia,Ja=kb,La=65535&Ja,hb=La,Ma=hb,Na=gb,Oa=0|Gb(Ma,Na),Pa=gb,Qa=Pa+Oa|0,gb=Qa,Ra=gb,Sa=fb,Ta=hb,Ua=65535&Ta,0|sw(0|Ra,0|Sa,0|Ua),Wa=hb,Xa=65535&Wa,Ya=gb,Za=Ya+Xa|0,gb=Za,$a=g,_a=eb,Xc($a,_a)),ab=ib,bb=ab+1|0,ib=bb}return cb=gb,db=x,j=cb,k=db,n=j-k|0,l=mb,0|n}function Mb(a,b){a|=0,b|=0;var c=0,e=0,f=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,e=b,f=c,g=e,d[g>>0]=f,l=i,1}function Nb(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,ra=0;for(ra=l,l=l+32|0,(0|l)>=(0|m)&&X(),na=ra,e=a,g=b,t=c,E=t,ma=E,P=g,_=P+48|0,ia=0|f[_>>2],ja=ma,ka=0|Fb(ia,ja),la=ma,h=la+ka|0,ma=h,pa=0;;){if(i=pa,j=g,k=j+48|0,n=0|f[k>>2],o=i>>>0<n>>>0,!o)break;p=pa,q=g,r=q+16|0,s=0|f[r>>2],u=s+(p<<2)|0,v=0|f[u>>2],w=0!=(0|v),w?(x=e,y=pa,z=g,A=z+16|0,B=0|f[A>>2],C=B+(y<<2)|0,D=0|f[C>>2],F=0|si(x,D,na),oa=F,G=0|f[na>>2],H=65535&G,I=ma,J=0|Gb(H,I),K=ma,L=K+J|0,ma=L,M=ma,N=oa,O=0|f[na>>2],0|sw(0|M,0|N,0|O),Q=0|f[na>>2],R=65535&Q,S=65535&R,T=ma,U=T+S|0,ma=U,V=ma,W=V+1|0,ma=W,d[V>>0]=0):(Y=ma,Z=0|Gb(-1,Y),$=ma,aa=$+Z|0,ma=aa),ba=pa,ca=ba+1|0,pa=ca}return da=ma,ea=t,fa=da,ga=ea,ha=fa-ga|0,l=ra,0|ha}function Ob(a,b,c){a|=0,b|=0,c|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;return s=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,g=c,h=g,q=h,i=q,d[i>>0]=0|d[54151],d[i+1>>0]=0|d[54152],d[i+2>>0]=0|d[54153],d[i+3>>0]=0|d[54154],j=f,k=q,n=k+4|0,0|Fb(j,n),o=q,p=o+8|0,d[p>>0]=0|d[54156],d[p+1>>0]=0|d[54157],d[p+2>>0]=0|d[54158],d[p+3>>0]=0|d[54159],l=s,0}function Pb(a,b,c,e,g){a|=0,b|=0,c|=0,e|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Fa=0;if(Fa=l,l=l+48|0,(0|l)>=(0|m)&&X(),Da=Fa,i=a,v=b,G=c,R=e,ba=g,Ba=0,ma=G,wa=ma,ta=i,ua=0==(0|ta),va=G,j=0==(0|va),Aa=ua|j)return h=-7,sa=h,l=Fa,0|sa;for(k=wa,ya=k,n=G,o=n+8|0,G=o,p=Ba,q=p+8|0,Ba=q,r=ba,s=G,t=0|Gb(r,s),u=G,w=u+t|0,G=w,x=Ba,y=x+2|0,Ba=y,za=0;;){if(z=za,A=65535&z,B=ba,C=65535&B,D=(0|A)<(0|C),E=i,!D)break;F=za,H=65535&F,I=R,J=I+(H<<2)|0,K=0|f[J>>2],L=0|si(E,K,Da),Ca=L,M=0|f[Da>>2],N=65535&M,O=G,P=0|Gb(N,O),Q=G,S=Q+P|0,G=S,T=G,U=Ca,V=0|f[Da>>2],0|sw(0|T,0|U,0|V),W=0|f[Da>>2],Y=G,Z=Y+W|0,G=Z,$=0|f[Da>>2],_=2+$|0,aa=Ba,ca=aa+_|0,Ba=ca,da=za,ea=da+1<<16>>16,za=ea}return fa=v,ga=G,ha=R,ia=ba,ja=0|Qb(E,fa,ga,ha,ia),xa=ja,ka=xa,la=Ba,na=la+ka|0,Ba=na,oa=ya,d[oa>>0]=0|d[54161],d[oa+1>>0]=0|d[54162],d[oa+2>>0]=0|d[54163],d[oa+3>>0]=0|d[54164],pa=Ba,qa=ya,ra=qa+4|0,0|Fb(pa,ra),h=0,sa=h,l=Fa,0|sa}function Qb(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,$=0;for($=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=a,h=b,u=c,F=d,P=e,Q=g,R=h,S=u,T=F,U=P,i=0|Rb(Q,R,S,T,U),W=i,Y=i,j=W,k=u,n=k+j|0,u=n,V=0;;){if(o=V,p=h,q=p+52|0,r=0|f[q>>2],s=o>>>0<r>>>0,!s)break;t=g,v=V,w=h,x=w+20|0,y=0|f[x>>2],z=y+(v<<2)|0,A=0|f[z>>2],B=u,C=F,D=P,E=0|Qb(t,A,B,C,D),W=E,G=W,H=u,I=H+G|0,u=I,J=W,K=Y,L=K+J|0,Y=L,M=V,N=M+1|0,V=N}return O=Y,l=$,0|O}function Rb(a,b,c,d,g){a|=0,b|=0,c|=0,d|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Ob=0;for(Ob=l,l=l+48|0,(0|l)>=(0|m)&&X(),h=a,i=b,V=c,fa=d,qa=g,Ba=V,Ma=Ba+4|0,Db=Ma,Xa=i,gb=Xa+36|0,rb=0|f[gb>>2],j=rb+4|0,w=0|e[j>>1],H=Db,O=0|Gb(w,H),P=Db,Q=P+O|0,Db=Q,Eb=0;;){if(R=Eb,S=65535&R,T=i,U=T+36|0,W=0|f[U>>2],Y=W+4|0,Z=0|e[Y>>1],$=65535&Z,_=(0|S)<(0|$),!_)break;aa=Eb,ba=65535&aa,ca=i,da=ca+36|0,ea=0|f[da>>2],ga=ea+8|0,ha=0|f[ga>>2],ia=ha+(ba<<2)|0,ja=0|f[ia>>2],Hb=ja,ka=Hb,la=0|f[ka>>2],ma=Db,na=0|Fb(la,ma),oa=Db,pa=oa+na|0,Db=pa,ra=fa,sa=qa,ta=65535&sa,ua=Hb,va=ua+8|0,wa=0|f[va>>2],xa=0|wb(ra,ta,wa),Ib=xa,ya=Ib,za=65535&ya,Aa=Db,Ca=0|Gb(za,Aa),Da=Db,Ea=Da+Ca|0,Db=Ea,Fa=Hb,Ga=Fa+12|0,Ha=0|f[Ga>>2],Ia=Db,Ja=0|Fb(Ha,Ia),Ka=Db,La=Ka+Ja|0,Db=La,Na=Hb,Oa=Na+16|0,Pa=0|f[Oa>>2],Qa=255&Pa,Ra=Db,Sa=0|Mb(Qa,Ra),Ta=Db,Ua=Ta+Sa|0,Db=Ua,Va=Hb,Wa=Va+16|0,Ya=0|f[Wa>>2];a:do switch(0|Ya){case 0:for(Jb=0;;){if(Za=Jb,$a=Hb,_a=$a+12|0,ab=0|f[_a>>2],bb=Za>>>0<ab>>>0,!bb)break a;cb=Jb,db=Hb,eb=db+20|0,fb=0|f[eb>>2],hb=fb+(cb<<1)|0,ib=0|e[hb>>1],jb=Db,kb=0|Gb(ib,jb),lb=Db,mb=lb+kb|0,Db=mb,nb=Jb,ob=nb+1|0,Jb=ob}break;case 1:for(Kb=0;;){if(pb=Kb,qb=Hb,sb=qb+12|0,tb=0|f[sb>>2],ub=pb>>>0<tb>>>0,!ub)break a;vb=Kb,xb=Hb,yb=xb+20|0,zb=0|f[yb>>2],Ab=zb+(vb<<3)|0,Bb=0|f[Ab>>2],Cb=Db,k=0|Fb(Bb,Cb),n=Db,o=n+k|0,Db=o,p=Kb,q=Hb,r=q+20|0,s=0|f[r>>2],t=s+(p<<3)|0,u=t+4|0,v=0|e[u>>1],x=Db,y=0|Gb(v,x),z=Db,A=z+y|0,Db=A,B=Kb,C=B+1|0,Kb=C}}while(0);D=Eb,E=D+1<<16>>16,Eb=E}return F=Db,G=V,I=F,J=G,K=I-J|0,Lb=K,L=Lb,M=V,0|Fb(L,M),N=Lb,l=Ob,0|N}function Sb(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,I=0;return I=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,r=b,w=c,G=0,F=0,x=w,D=x,y=e,z=0==(0|y),A=w,B=0==(0|A),E=z|B,E?(d=-7,v=d,l=I,0|v):(C=D,f=C+8|0,D=f,g=G,h=g+8|0,G=h,i=e,j=r,k=D,n=0|Tb(i,j,k),F=n,o=F,p=G,q=p+o|0,G=q,s=e,t=G,u=w,0|Vb(s,t,u),d=0,v=d,l=I,0|v)}function Tb(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0;for(P=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,N=0,D=d,F=e,G=s,H=0|Ub(D,F,G),M=H,I=M,J=s,K=J+I|0,s=K,g=M,h=N,i=h+g|0,N=i,L=0;;){if(j=L,k=e,n=k+52|0,o=0|f[n>>2],p=j>>>0<o>>>0,!p)break;q=d,r=e,t=s,u=0|Tb(q,r,t),M=u,v=M,w=s,x=w+v|0,s=x,y=M,z=N,A=z+y|0,N=A,B=L,C=B+1|0,L=C}return E=N,l=P,0|E}function Ub(a,b,c){a|=0,b|=0,c|=0;var d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Da=0;if(Da=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,g=b,t=c,E=t,ya=E,P=ya,_=P+4|0,ya=_,ka=g,va=ka+28|0,wa=0|f[va>>2],xa=0!=(0|wa),xa?(h=g,i=h+28|0,j=0|f[i>>2],k=0|Jv(j),Aa=k):Aa=0,n=Aa,o=65535&n,p=ya,q=0|Gb(o,p),r=ya,s=r+q|0,ya=s,u=Aa,v=0!=(0|u),v&&(w=ya,x=g,y=x+28|0,z=0|f[y>>2],A=Aa,0|sw(0|w,0|z,0|A),B=Aa,C=ya,D=C+B|0,ya=D),F=g,G=F+32|0,H=0|f[G>>2],I=0!=(0|H),!I)return ia=ya,ja=0|Fb(0,ia),la=ya,ma=la+ja|0,ya=ma,na=ya,oa=t,pa=na,qa=oa,ra=pa-qa|0,za=ra,sa=za,ta=t,0|Fb(sa,ta),ua=za,l=Da,0|ua;for(J=g,K=J+40|0,L=0|f[K>>2],M=ya,N=0|Fb(L,M),O=ya,Q=O+N|0,ya=Q,Ba=0;;){if(R=Ba,S=g,T=S+40|0,U=0|f[T>>2],V=R>>>0<U>>>0,!V)break;W=Ba,Y=g,Z=Y+32|0,$=0|f[Z>>2],aa=$+(W<<1)|0,ba=0|e[aa>>1],ca=ya,da=0|Gb(ba,ca),ea=ya,fa=ea+da|0,ya=fa,ga=Ba,ha=ga+1|0,Ba=ha}return na=ya,oa=t,pa=na,qa=oa,ra=pa-qa|0,za=ra,sa=za,ta=t,0|Fb(sa,ta),ua=za,l=Da,0|ua}function Vb(a,b,c){a|=0,b|=0,c|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,g=c,h=g,o=h,i=o,d[i>>0]=0|d[54166],d[i+1>>0]=0|d[54167],d[i+2>>0]=0|d[54168],d[i+3>>0]=0|d[54169],j=f,k=o,n=k+4|0,0|Fb(j,n),l=q,0}function Wb(a,b,c,e,g){a|=0,b|=0,c|=0,e|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,aa=0;return aa=l,l=l+48|0,(0|l)>=(0|m)&&X(),V=aa+12|0,i=a,v=b,G=c,P=e,Q=g,R=G,f[V>>2]=R,$=0,S=i,T=0==(0|S),U=0|f[V>>2],j=0==(0|U),(Z=T|j)?(h=-7,O=h,l=aa,0|O):(k=0|f[V>>2],Y=k,n=0|f[V>>2],o=n+8|0,f[V>>2]=o,p=i,q=P,r=Q,s=0|Xb(p,V,q,r),$=s,t=$,u=0!=(0|t),u||(w=i,x=v,y=P,z=Q,A=0|Yb(w,x,V,y,z),$=A,B=$,C=0!=(0|B),C||(D=Y,d[D>>0]=0|d[54171],d[D+1>>0]=0|d[54172],d[D+2>>0]=0|d[54173],d[D+3>>0]=0|d[54174],E=0|f[V>>2],F=G,H=E,I=F,J=H-I|0,W=J,K=W,L=Y,M=L+4|0,0|Fb(K,M))),N=$,h=N,O=h,l=aa,0|O)}function Xb(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,W=0;for(W=l,l=l+32|0,(0|l)>=(0|m)&&X(),U=W,e=a,g=b,t=c,E=d,L=g,M=0|f[L>>2],R=M,N=E,O=R,P=0|Fb(N,O),Q=R,h=Q+P|0,R=h,S=0;;){if(i=S,j=E,k=i>>>0<j>>>0,!k)break;n=e,o=S,p=t,q=p+(o<<2)|0,r=0|f[q>>2],s=0|si(n,r,U),T=s,u=0|f[U>>2],v=65535&u,w=R,x=0|Gb(v,w),y=R,z=y+x|0,R=z,A=R,B=T,C=0|f[U>>2],0|sw(0|A,0|B,0|C),D=0|f[U>>2],F=R,G=F+D|0,R=G,H=S,I=H+1|0,S=I}return J=R,K=g,f[K>>2]=J,l=W,0}function Yb(a,b,c,d,g){a|=0,b|=0,c|=0,d|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ia=0;for(Ia=l,l=l+32|0,(0|l)>=(0|m)&&X(),Ea=Ia+8|0,h=a,i=b,v=c,G=d,R=g,ba=v,ma=0|f[ba>>2],f[Ea>>2]=ma,Fa=0;;){if(xa=Fa,Ca=xa+1|0,Da=i,j=0|e[Da>>1],k=65535&j,n=Ca>>>0<k>>>0,!n)break;o=Fa,p=i,q=p+24|0,r=0|f[q>>2],s=r+(o<<3)|0,t=0|f[s>>2],u=0==(0|t),u?(w=0|f[Ea>>2],x=0|Gb(-1,w),y=0|f[Ea>>2],z=y+x|0,f[Ea>>2]=z,A=0|f[Ea>>2],B=0|Gb(0,A),C=0|f[Ea>>2],D=C+B|0,f[Ea>>2]=D):(E=G,F=R,H=Fa,I=i,J=I+24|0,K=0|f[J>>2],L=K+(H<<3)|0,M=0|f[L>>2],N=0|wb(E,F,M),Ga=N,O=Ga,P=65535&O,Q=0|f[Ea>>2],S=0|Gb(P,Q),T=0|f[Ea>>2],U=T+S|0,f[Ea>>2]=U,V=Fa,W=i,Y=W+24|0,Z=0|f[Y>>2],$=Z+(V<<3)|0,_=$+4|0,aa=0|e[_>>1],ca=0|f[Ea>>2],da=0|Gb(aa,ca),ea=0|f[Ea>>2],fa=ea+da|0,f[Ea>>2]=fa),ga=Fa,ha=ga+1|0,Fa=ha}for(Fa=0;;){if(ia=Fa,ja=i,ka=ja+52|0,la=0|f[ka>>2],na=ia>>>0<la>>>0,!na)break;oa=h,pa=Fa,qa=i,ra=qa+20|0,sa=0|f[ra>>2],ta=sa+(pa<<2)|0,ua=0|f[ta>>2],va=G,wa=R,0|Yb(oa,ua,Ea,va,wa),ya=Fa,za=ya+1|0,Fa=za}return Aa=0|f[Ea>>2],Ba=v,f[Ba>>2]=Aa,l=Ia,0}function Zb(a,b){a|=0,b|=0;var c=0,e=0,f=0,g=0,h=0,j=0;return j=l,l=l+16|0,(0|l)>=(0|m)&&X(),h=j+8|0,c=a,e=b,d[h>>0]=0|d[54176],d[h+1>>0]=0|d[54177],d[h+2>>0]=0|d[54178],d[h+3>>0]=0|d[54179],f=h+4|0,0|Fb(8,f),g=e,d[g>>0]=0|d[h>>0],d[g+1>>0]=0|d[h+1>>0],d[g+2>>0]=0|d[h+2>>0],d[g+3>>0]=0|d[h+3>>0],d[g+4>>0]=0|d[h+4>>0],d[g+5>>0]=0|d[h+5>>0],d[g+6>>0]=0|d[h+6>>0],d[g+7>>0]=0|d[h+7>>0],l=j,8}function $b(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0;switch(Y=l,l=l+32|0,(0|l)>=(0|m)&&X(),f=a,g=b,t=c,E=e,N=t,U=N,O=E,P=255&O,Q=6&P,0|Q){case 2:W=2;break;case 4:W=3;break;case 6:h=0|Jb(),i=0!=(0|h),W=i?2:3}return 2==(0|W)?(R=U,d[R>>0]=0|d[54181],d[R+1>>0]=0|d[54182],d[R+2>>0]=0|d[54183],d[R+3>>0]=0|d[54184]):3==(0|W)&&(S=U,d[S>>0]=0|d[54186],d[S+1>>0]=0|d[54187],d[S+2>>0]=0|d[54188],d[S+3>>0]=0|d[54189]),j=U,k=j+4|0,d[k>>0]=0|d[54191],d[k+1>>0]=0|d[54192],d[k+2>>0]=0|d[54193],d[k+3>>0]=0|d[54194],n=U,o=n+14|0,d[o>>0]=0|d[54196],d[o+1>>0]=0|d[54197],d[o+2>>0]=0|d[54198],d[o+3>>0]=0|d[54199],p=U,q=p+18|0,d[q>>0]=0|d[54156],d[q+1>>0]=0|d[54157],d[q+2>>0]=0|d[54158],d[q+3>>0]=0|d[54159],r=g,s=U,u=s+10|0,0|Fb(r,u),v=U,w=v+8|0,x=t,y=w,z=x,A=y-z|0,B=A+2|0,V=B,C=t,D=V,F=C+D|0,G=g,H=V,I=G-H|0,J=0|or(F,I,0),T=J,K=T,L=U,M=L+8|0,0|Gb(K,M),l=Y,0}function _b(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0;return J=l,l=l+32|0,(0|l)>=(0|m)&&X(),F=J+8|0,G=J+4|0,g=a,t=b,y=c,z=d,f[F>>2]=0,f[G>>2]=0,A=z,(B=0==(0|A))?(e=-7,x=e,l=J,0|x):(C=g,D=t,E=y,h=0|lb(E,0),i=0|mb(C,D,h,F,G),H=i,j=H,k=0==(0|j),k&&(n=0|f[F>>2],o=0|f[G>>2],p=z,q=0|_v(n,1,o,p),r=0|f[G>>2],s=(0|q)!=(0|r),s&&(H=-2)),u=g,v=0|f[F>>2],Dc(u,v),w=H,e=w,x=e,l=J,0|x)}function ac(a,b,c,e,g){a|=0,b|=0,c|=0,e|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0;if(Ta=l,l=l+96|0,(0|l)>=(0|m)&&X(),Ma=Ta+40|0,Pa=Ta+24|0,Oa=Ta+16|0,Na=Ta+8|0,La=Ta,Ga=Ta+56|0,Ia=Ta+52|0,i=a,v=b,G=c,R=e,ba=g,f[Ga>>2]=0,f[Ia>>2]=0,Ha=0,ma=R,xa=0==(0|ma),Ea=ba,Fa=0==(0|Ea),Ja=xa|Fa,!Ja&&(j=ba,k=0|d[j>>0],n=k<<24>>24,o=0==(0|n),!o)){p=G,q=0|lb(p,2),G=q,r=i,s=v,t=G,u=0|mb(r,s,t,Ga,Ia),Ka=u,w=Ka,x=0==(0|w);do if(x){if(y=G,z=0|bc(y),A=z<<24>>24!=0,B=R,A){if(H=0|Vv(B,54283,Na),I=(0|H)<0)return J=i,K=0|f[Ga>>2],Dc(J,K),h=-2,Da=h,l=Ta,0|Da}else if(C=0|Vv(B,54201,La),D=(0|C)<0)return E=i,F=0|f[Ga>>2],Dc(E,F),h=-2,Da=h,l=Ta,0|Da;if(L=R,M=0|Vv(L,54387,Oa),N=(0|M)<0)return O=i,P=0|f[Ga>>2],Dc(O,P),h=-2,Da=h,l=Ta,0|Da;if(Q=R,S=ba,f[Pa>>2]=4,Qa=Pa+4|0,f[Qa>>2]=4,Ra=Pa+8|0,f[Ra>>2]=S,T=0|Vv(Q,54408,Pa),U=(0|T)<0)return V=i,W=0|f[Ga>>2],Dc(V,W),h=-2,Da=h,l=Ta,0|Da;for(;;){if(Y=Ha,Z=0|f[Ia>>2],$=Y>>>0<Z>>>0,!$){Sa=20;break}if(_=Ha,aa=(_>>>0)%16&-1,ca=0==(0|aa),ca&&(da=R,ea=0|$v(66199,da),fa=(0|ea)==-1)){Sa=17;break}if(ia=R,ja=Ha,ka=ja+1|0,Ha=ka,la=0|f[Ga>>2],na=la+ja|0,oa=0|d[na>>0],pa=255&oa,f[Ma>>2]=pa,qa=0|Vv(ia,54533,Ma),ra=(0|qa)<0){Sa=19;break}}if(17==(0|Sa))return ga=i,ha=0|f[Ga>>2],Dc(ga,ha),h=-2,Da=h,l=Ta,0|Da;if(19==(0|Sa))return sa=i,ta=0|f[Ga>>2],Dc(sa,ta),h=-2,Da=h,l=Ta,0|Da;if(20==(0|Sa)){if(ua=R,va=0|$v(54541,ua),wa=(0|va)==-1,!wa)break;return ya=i,za=0|f[Ga>>2],Dc(ya,za),h=-2,Da=h,l=Ta,0|Da}}while(0);return Aa=i,Ba=0|f[Ga>>2],Dc(Aa,Ba),Ca=Ka,h=Ca,Da=h,l=Ta,0|Da}return h=-7,Da=h,l=Ta,0|Da}function bc(a){a|=0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0;switch(k=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=c,e=255&d,f=6&e,0|f){case 2:b=1;break;case 4:b=0;break;default:g=0|Jb(),h=255&g,b=h}return i=b,l=k,0|i}function cc(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0;return y=l,l=l+32|0,(0|l)>=(0|m)&&X(),w=y+8|0,o=y,e=b,g=d,p=e,f[w>>2]=p,q=w+4|0,r=e,lg(o,r,24),f[q>>2]=0|f[o>>2],f[q+4>>2]=0|f[o+4>>2],s=g,t=+j[c>>2],u=0|dc(w,s,t),(v=(0|u)<0)?(h=e,i=e,k=0|tp(i,68855),Br(h,k,54546),void 0):(n=w+4|0,f[a>>2]=0|f[n>>2],f[a+4>>2]=0|f[n+4>>2],void(l=y))}function dc(a,b,c){a|=0,b|=0,c=+c;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Z=0;if(Z=l,l=l+32|0,(0|l)>=(0|m)&&X(),f=a,s=b,D=c,O=s,R=0|d[O>>0],S=R<<24>>24,T=37!=(0|S))return e=-1,Q=e,l=Z,0|Q;U=s,V=U+1|0,s=V,g=s,h=0|d[g>>0],i=h<<24>>24,j=46==(0|i);a:do if(j)for(k=s,n=k+1|0,s=n,W=0;;){if(o=s,p=0|d[o>>0],q=p<<24>>24,r=q-48|0,t=r>>>0<10,!t)break a;u=W,v=10*u|0,w=s,x=0|d[w>>0],y=x<<24>>24,z=y-48|0,A=v+z|0,W=A,B=s,C=B+1|0,s=C}else W=-1;while(0);switch(E=s,F=0|d[E>>0],G=F<<24>>24,0|G){case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:return H=f,I=D,J=I,K=W,L=s,M=0|d[L>>0],N=M<<24>>24,P=0|ec(H,J,0,K,0,N),e=P,Q=e,l=Z,0|Q;default:return e=-1,Q=e,l=Z,0|Q}return 0}function ec(a,b,c,e,g,h){a|=0,b=+b,c|=0,e|=0,g|=0,h|=0;var i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0,wf=0,xf=0,yf=0,zf=0,Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0,Gf=0,Hf=0,If=0,Jf=0,Kf=0,Lf=0,Mf=0,Nf=0,Of=0,Pf=0,Qf=0,Rf=0,Sf=0,Tf=0,Uf=0,Vf=0,Wf=0,Xf=0,Yf=0,Zf=0,$f=0,_f=0,ag=0,bg=0,cg=0,dg=0,eg=0,fg=0,gg=0,hg=0,ig=0,jg=0,kg=0,lg=0,mg=0,ng=0,og=0,pg=0,qg=0,rg=0,sg=0,tg=0,ug=0,vg=0,wg=0,xg=0,yg=0,zg=0,Ag=0,Bg=0,Cg=0,Dg=0,Eg=0,Fg=0,Gg=0,Hg=0,Ig=0,Jg=0,Kg=0,Lg=0,Mg=0,Ng=0,Og=0,Pg=0,Qg=0,Rg=0,Sg=0,Tg=0,Ug=0,Vg=0,Wg=0,Xg=0,Yg=0,Zg=0,$g=0,_g=0,ah=0,bh=0,ch=0,dh=0,eh=0,fh=0,gh=0,hh=0,ih=0,jh=0,kh=0,lh=0,mh=0,nh=0,oh=0,ph=0,qh=0,rh=0,sh=0,th=0,uh=0,vh=0,wh=0,xh=0,yh=0,zh=0,Ah=0,Bh=0,Ch=0,Dh=0,Eh=0,Fh=0,Gh=0,Hh=0,Ih=0,Jh=0,Kh=0,Lh=0,Mh=0,Nh=0,Oh=0,Ph=0,Qh=0,Rh=0,Sh=0,Th=0,Uh=0,Vh=0,Wh=0,Xh=0,Yh=0,Zh=0,$h=0,_h=0,ai=0,bi=0,ci=0,di=0,ei=0,fi=0,gi=0,hi=0,ii=0,ji=0,ki=0,li=0,mi=0,ni=0,oi=0,pi=0,qi=0,ri=0,si=0,ti=0,ui=0,vi=0,wi=0,xi=0,yi=0,zi=0,Ai=0,Bi=0,Ci=0,Di=0,Ei=0,Fi=0,Gi=0,Hi=0,Ii=0,Ji=0,Ki=0,Li=0,Mi=0,Ni=0,Oi=0,Pi=0,Qi=0,Ri=0,Si=0,Ti=0,Ui=0,Vi=0,Wi=0,Xi=0,Yi=0,Zi=0,$i=0,_i=0,aj=0,bj=0,cj=0,dj=0,ej=0,fj=0,gj=0,hj=0,ij=0,jj=0,kj=0,lj=0,mj=0,nj=0,oj=0,pj=0,qj=0,rj=0,sj=0,tj=0,uj=0,vj=0,wj=0,xj=0,yj=0,zj=0,Aj=0,Bj=0,Cj=0,Dj=0,Ej=0,Fj=0,Gj=0,Hj=0,Ij=0,Jj=0,Kj=0,Lj=0,Mj=0,Nj=0,Oj=0,Pj=0,Qj=0,Rj=0,Sj=0,Tj=0,Uj=0,Vj=0,Wj=0,Xj=0,Yj=0,Zj=0,$j=0,_j=0,ak=0,bk=0,ck=0,dk=0,ek=0,fk=0,gk=0,hk=0,ik=0,jk=0,kk=0,lk=0,mk=0,nk=0,ok=0,pk=0,qk=0,rk=0,sk=0,tk=0,uk=0,vk=0,wk=0,xk=0,yk=0,zk=0,Ak=0,Bk=0,Ck=0,Dk=0,Ek=0,Fk=0,Gk=0,Hk=0,Ik=0,Jk=0,Kk=0,Lk=0,Mk=0,Nk=0,Ok=0,Pk=0,Qk=0,Rk=0,Sk=0,Tk=0,Uk=0,Vk=0,Wk=0,Xk=0,Yk=0,Zk=0,$k=0,_k=0,al=0,bl=0,cl=0,dl=0,el=0,fl=0,gl=0,hl=0,il=0,jl=0,kl=0,ll=0,ml=0,nl=0,ol=0,pl=0,ql=0,rl=0,sl=0,tl=0,ul=0,vl=0,wl=0,xl=0,yl=0,zl=0,Al=0,Bl=0,Cl=0,Dl=0,El=0,Fl=0,Gl=0,Hl=0,Il=0,Jl=0,Kl=0,Ll=0,Ml=0,Nl=0,Ol=0,Pl=0,Ql=0,Rl=0,Sl=0,Tl=0,Ul=0,Vl=0,Wl=0,Xl=0,Yl=0,Zl=0,$l=0,_l=0,am=0,bm=0,cm=0,dm=0,em=0,fm=0,gm=0,hm=0,im=0,jm=0,km=0,lm=0,mm=0,nm=0,om=0,pm=0,qm=0,rm=0,sm=0,tm=0,um=0,vm=0,wm=0,xm=0,ym=0,zm=0,Am=0,Bm=0,Cm=0,Dm=0,Em=0,Fm=0,Gm=0,Hm=0,Im=0,Jm=0,Km=0,Lm=0,Mm=0,Nm=0,Om=0,Pm=0,Qm=0,Rm=0,Sm=0,Tm=0,Um=0,Vm=0,Wm=0,Xm=0,Ym=0,Zm=0,$m=0,_m=0,an=0,bn=0,cn=0,dn=0,en=0,fn=0,gn=0,hn=0,jn=0,kn=0,ln=0,mn=0,nn=0,on=0,pn=0,qn=0,rn=0,sn=0,tn=0,un=0,vn=0,wn=0,xn=0,yn=0,zn=0,An=0,Bn=0,Cn=0,Dn=0,En=0,Fn=0,Gn=0,Hn=0,In=0,Jn=0,Kn=0,Ln=0,Mn=0,Nn=0,On=0,Pn=0,Qn=0,Rn=0,Sn=0,Tn=0,Un=0,Vn=0,Wn=0,Xn=0,Yn=0,Zn=0,$n=0,_n=0,ao=0,bo=0,co=0,eo=0,fo=0,go=0,ho=0,io=0,jo=0,ko=0,lo=0,mo=0,no=0,oo=0,po=0,qo=0,ro=0,so=0,to=0,uo=0,vo=0,wo=0,xo=0,yo=0,zo=0,Ao=0,Bo=0,Co=0,Do=0,Eo=0,Fo=0,Go=0,Ho=0,Io=0,Jo=0,Ko=0,Lo=0,Mo=0,No=0,Oo=0,Po=0,Qo=0,Ro=0,So=0,To=0,Uo=0,Vo=0,Wo=0,Xo=0,Yo=0,Zo=0,$o=0,_o=0,ap=0,bp=0,cp=0,dp=0,ep=0,fp=0,gp=0,hp=0,ip=0,jp=0,kp=0,lp=0,mp=0,np=0,op=0,pp=0,qp=0,rp=0,sp=0,tp=0,up=0,vp=0,wp=0,xp=0,yp=0,zp=0,Ap=0,Bp=0,Cp=0,Dp=0,Ep=0,Fp=0,Gp=0,Hp=0,Ip=0,Jp=0,Kp=0,Lp=0,Mp=0,Np=0,Op=0,Pp=0,Qp=0,Rp=0,Sp=0,Tp=0,Up=0,Vp=0,Wp=0,Xp=0,Yp=0,Zp=0,$p=0,_p=0,aq=0,bq=0,cq=0,dq=0,eq=0,fq=0,gq=0,hq=0,iq=0,jq=0,kq=0,lq=0,mq=0,nq=0,oq=0,pq=0,qq=0,rq=0,sq=0,tq=0,uq=0,vq=0,wq=0,xq=0,yq=0,zq=0,Aq=0,Bq=0,Cq=0,Dq=0,Eq=0,Fq=0,Gq=0,Hq=0,Iq=0,Jq=0,Kq=0,Lq=0,Mq=0,Nq=0,Oq=0,Pq=0,Qq=0,Rq=0,Sq=0,Tq=0,Uq=0,Vq=0,Wq=0,Xq=0,Yq=0,Zq=0,$q=0,_q=0,ar=0,br=0,cr=0,dr=0,er=0,fr=0,gr=0,hr=0,ir=0,jr=0,kr=0,lr=0,mr=0,nr=0,or=0,pr=0,qr=0,rr=0,sr=0,tr=0,ur=0,vr=0,wr=0,xr=0;
+xr=l,l=l+720|0,(0|l)>=(0|m)&&X(),Oq=xr+152|0,Uq=xr+128|0,Pq=xr+692|0,Wq=xr+680|0,tr=xr+16|0,j=a,rb=b,yd=c,Cf=e,Fh=g,Ij=h,f[Uq>>2]=0,er=72345,Ll=Wq+12|0,Vq=Ll,dr=1,Pn=rb,Tp=0|gc(Pn),k=F,x=0|qw(0|Tp,0|k,63),J=F,V=0!=(0|x);do{if(!V){if(Ba=Fh,Ma=2048&Ba,Xa=0!=(0|Ma)){gb=er,sb=gb+3|0,er=sb;break}if(Db=Fh,Ob=1&Db,Zb=0!=(0|Ob),mc=er,Zb){xc=mc+6|0,er=xc;break}Ic=mc+1|0,er=Ic,dr=0;break}fa=rb,qa=-fa,rb=qa}while(0);if(Tc=rb,cd=0|gc(Tc),nd=F,zd=2147483647&nd,Kd=zd>>>0<2146435072,Vd=cd>>>0<0,ee=2146435072==(0|zd),pe=ee&Vd,Ae=Kd|pe,!Ae)return Le=Ij,We=32&Le,ff=0!=(0|We),rf=ff?72364:72368,or=rf,Df=rb,Of=rb,Zf=Df!=Of,Zf&&(ig=Ij,tg=32&ig,Eg=0!=(0|tg),Pg=Eg?72387:72372,or=Pg),$g=j,jh=yd,uh=dr,Gh=3+uh|0,Rh=Fh,ai=Rh&-65537,hc($g,32,jh,Gh,ai),li=j,wi=er,Hi=dr,ic(li,wi,Hi),Si=j,bj=or,ic(Si,bj,3),mj=j,xj=yd,Jj=dr,Uj=3+Jj|0,dk=Fh,ok=8192^dk,hc(mj,32,xj,Uj,ok),zk=yd,Kk=dr,Vk=3+Kk|0,el=(0|zk)>(0|Vk),pl=yd,Al=dr,Ml=3+Al|0,Xl=el?pl:Ml,i=Xl,Fq=i,l=xr,0|Fq;if(gm=rb,rm=+wv(gm,Uq),Cm=2*rm,rb=Cm,Nm=rb,Ym=0!=Nm,Ym&&(hn=0|f[Uq>>2],tn=hn+-1|0,f[Uq>>2]=tn),En=Ij,Qn=32|En,_n=97==(0|Qn)){ir=8,lo=Ij,wo=32&lo,Ho=0!=(0|wo),Ho&&(So=er,bp=So+9|0,er=bp),mp=dr,xp=mp+2|0,dr=xp,Ip=Cf,Up=(0|Ip)<0,dq=Cf,oq=(0|dq)>=12,ar=Up|oq,ar?gr=0:(zq=Cf,Gq=12-zq|0,gr=Gq),Hq=gr,Iq=0!=(0|Hq);do if(Iq){for(;;){if(Jq=gr,Kq=Jq+-1|0,gr=Kq,Lq=0!=(0|Jq),!Lq)break;n=ir,o=16*n,ir=o}if(p=er,q=0|d[p>>0],r=q<<24>>24,s=45==(0|r)){t=rb,u=-t,rb=u,v=ir,w=rb,y=w-v,rb=y,z=ir,A=rb,B=A+z,rb=B,C=rb,D=-C,rb=D;break}E=ir,G=rb,H=G+E,rb=H,I=ir,K=rb,L=K-I,rb=L;break}while(0);for(M=0|f[Uq>>2],N=(0|M)<0,O=0|f[Uq>>2],P=0-O|0,Q=N?P:O,R=Vq,S=0|jc(Q,R),Xq=S,T=Xq,W=Vq,Y=(0|T)==(0|W),Y&&(Z=Xq,$=Z+-1|0,Xq=$,d[$>>0]=48),_=0|f[Uq>>2],aa=(0|_)<0,ba=aa?45:43,ca=255&ba,da=Xq,ea=da+-1|0,Xq=ea,d[ea>>0]=ca,ga=Ij,ha=ga+15|0,ia=255&ha,ja=Xq,ka=ja+-1|0,Xq=ka,d[ka>>0]=ia,kr=Pq;;){la=rb,ma=~~la,sr=ma,na=sr,oa=70420+na|0,pa=0|d[oa>>0],ra=pa<<24>>24,sa=Ij,ta=32&sa,ua=ra|ta,va=255&ua,wa=kr,xa=wa+1|0,kr=xa,d[wa>>0]=va,ya=rb,za=sr,Aa=+(0|za),Ca=ya-Aa,Da=16*Ca,rb=Da,Ea=kr,Fa=Ea,Ga=Pq,Ha=Fa-Ga|0,Ia=1==(0|Ha);do if(Ia){if(Ja=rb,Ka=0!=Ja,La=Cf,Na=(0|La)>0,br=Ka|Na,!br&&(Oa=Fh,Pa=8&Oa,Qa=0!=(0|Pa),!Qa))break;Ra=kr,Sa=Ra+1|0,kr=Sa,d[Ra>>0]=46}while(0);if(Ta=rb,Ua=0!=Ta,!Ua)break}return Va=Cf,Wa=0!=(0|Va),Wa?(Ya=kr,Za=Ya,$a=Pq,_a=Za-$a|0,ab=_a-2|0,bb=Cf,cb=(0|ab)<(0|bb),cb?(db=Cf,eb=db+2|0,fb=Vq,hb=Xq,ib=fb,jb=hb,kb=ib-jb|0,lb=eb+kb|0,$q=lb):wr=37):wr=37,37==(0|wr)&&(mb=kr,nb=mb,ob=Pq,pb=nb-ob|0,qb=Vq,tb=Xq,ub=qb,vb=tb,wb=ub-vb|0,xb=pb+wb|0,$q=xb),yb=j,zb=yd,Ab=dr,Bb=$q,Cb=Ab+Bb|0,Eb=Fh,hc(yb,32,zb,Cb,Eb),Fb=j,Gb=er,Hb=dr,ic(Fb,Gb,Hb),Ib=j,Jb=yd,Kb=dr,Lb=$q,Mb=Kb+Lb|0,Nb=Fh,Pb=65536^Nb,hc(Ib,48,Jb,Mb,Pb),Qb=j,Rb=kr,Sb=Rb,Tb=Pq,Ub=Sb-Tb|0,ic(Qb,Pq,Ub),Vb=j,Wb=$q,Xb=Vq,Yb=Xq,$b=Xb,_b=Yb,ac=$b-_b|0,bc=Wb-ac|0,cc=kr,dc=cc,ec=Pq,fc=dc-ec|0,kc=bc-fc|0,hc(Vb,48,kc,0,0),lc=j,nc=Xq,oc=Vq,pc=Xq,qc=oc,rc=pc,sc=qc-rc|0,ic(lc,nc,sc),tc=j,uc=yd,vc=dr,wc=$q,yc=vc+wc|0,zc=Fh,Ac=8192^zc,hc(tc,32,uc,yc,Ac),Bc=yd,Cc=dr,Dc=$q,Ec=Cc+Dc|0,Fc=(0|Bc)>(0|Ec),Fc?(Gc=yd,Lc=Gc):(Hc=dr,Jc=$q,Kc=Hc+Jc|0,Lc=Kc),i=Lc,Fq=i,l=xr,0|Fq}for(Mc=Cf,Nc=(0|Mc)<0,Nc&&(Cf=6),Oc=rb,Pc=0!=Oc,Pc&&(Qc=rb,Rc=268435456*Qc,rb=Rc,Sc=0|f[Uq>>2],Uc=Sc-28|0,f[Uq>>2]=Uc),Vc=0|f[Uq>>2],Wc=(0|Vc)<0,Wc?(vr=Oq,fr=Oq,Mq=Oq):(Xc=Oq+504|0,Yc=Xc+-212|0,Zc=Yc+-4|0,vr=Zc,fr=Zc,Mq=Zc);;)if($c=rb,_c=~~$c>>>0,ad=vr,f[ad>>2]=_c,bd=rb,dd=vr,ed=dd+4|0,vr=ed,fd=0|f[dd>>2],gd=+(fd>>>0),hd=bd-gd,id=1e9*hd,rb=id,jd=rb,kd=0!=jd,!kd)break;for(;;){if(ld=0|f[Uq>>2],md=(0|ld)>0,!md)break;for(Qq=0,od=0|f[Uq>>2],pd=29<(0|od),qd=0|f[Uq>>2],rd=pd?29:qd,lr=rd,sd=vr,td=sd+-4|0,Sq=td;;){if(ud=Sq,vd=Mq,wd=ud>>>0>=vd>>>0,!wd)break;xd=Sq,Ad=0|f[xd>>2],Bd=lr,Cd=0|ow(0|Ad,0,0|Bd),Dd=F,Ed=Qq,Fd=0|mw(0|Cd,0|Dd,0|Ed,0),Gd=F,Hd=tr,Id=Hd,f[Id>>2]=Fd,Jd=Hd+4|0,Ld=Jd,f[Ld>>2]=Gd,Md=tr,Nd=Md,Od=0|f[Nd>>2],Pd=Md+4|0,Qd=Pd,Rd=0|f[Qd>>2],Sd=0|zw(0|Od,0|Rd,1e9,0),Td=F,Ud=Sq,f[Ud>>2]=Sd,Wd=tr,Xd=Wd,Yd=0|f[Xd>>2],Zd=Wd+4|0,$d=Zd,_d=0|f[$d>>2],ae=0|vw(0|Yd,0|_d,1e9,0),be=F,Qq=ae,ce=Sq,de=ce+-4|0,Sq=de}for(fe=Qq,ge=0!=(0|fe),ge&&(he=Qq,ie=Mq,je=ie+-4|0,Mq=je,f[je>>2]=he);;){if(ke=vr,le=Mq,me=ke>>>0>le>>>0,!me)break;if(ne=vr,oe=ne+-4|0,qe=0|f[oe>>2],re=0!=(0|qe),se=1^re,!se)break;te=vr,ue=te+-4|0,vr=ue}ve=lr,we=0|f[Uq>>2],xe=we-ve|0,f[Uq>>2]=xe}for(;;){if(ye=0|f[Uq>>2],ze=(0|ye)<0,!ze)break;for(Rq=0,Be=0|f[Uq>>2],Ce=0-Be|0,De=9<(0|Ce),Ee=0|f[Uq>>2],Fe=0-Ee|0,Ge=De?9:Fe,mr=Ge,He=Cf,Ie=He+17|0,Je=Ie+8|0,Ke=(0|Je)/9&-1,Me=1+Ke|0,_q=Me,Ne=Mq,Sq=Ne;;){if(Oe=Sq,Pe=vr,Qe=Oe>>>0<Pe>>>0,!Qe)break;Re=Sq,Se=0|f[Re>>2],Te=mr,Ue=1<<Te,Ve=Ue-1|0,Xe=Se&Ve,hr=Xe,Ye=Sq,Ze=0|f[Ye>>2],$e=mr,_e=Ze>>>$e,af=Rq,bf=_e+af|0,cf=Sq,f[cf>>2]=bf,df=mr,ef=1e9>>df,gf=hr,hf=0|U(ef,gf),Rq=hf,jf=Sq,kf=jf+4|0,Sq=kf}lf=Mq,mf=0|f[lf>>2],nf=0!=(0|mf),nf||(of=Mq,pf=of+4|0,Mq=pf),qf=Rq,sf=0!=(0|qf),sf&&(tf=Rq,uf=vr,vf=uf+4|0,vr=vf,f[uf>>2]=tf),wf=Ij,xf=32|wf,yf=102==(0|xf),zf=fr,Af=Mq,Bf=yf?zf:Af,Nq=Bf,Ef=vr,Ff=Nq,Gf=Ef,Hf=Ff,If=Gf-Hf|0,Jf=(0|If)/4&-1,Kf=_q,Lf=(0|Jf)>(0|Kf),Lf&&(Mf=Nq,Nf=_q,Pf=Mf+(Nf<<2)|0,vr=Pf),Qf=mr,Rf=0|f[Uq>>2],Sf=Rf+Qf|0,f[Uq>>2]=Sf}Tf=Mq,Uf=vr,Vf=Tf>>>0<Uf>>>0;a:do if(Vf)for(Yq=10,Wf=fr,Xf=Mq,Yf=Wf,$f=Xf,_f=Yf-$f|0,ag=(0|_f)/4&-1,bg=9*ag|0,Tq=bg;;){if(cg=Mq,dg=0|f[cg>>2],eg=Yq,fg=dg>>>0>=eg>>>0,!fg)break a;gg=Yq,hg=10*gg|0,Yq=hg,jg=Tq,kg=jg+1|0,Tq=kg}else Tq=0;while(0);if(lg=Cf,mg=Ij,ng=32|mg,og=102!=(0|ng),pg=1&og,qg=Tq,rg=0|U(pg,qg),sg=lg-rg|0,ug=Ij,vg=32|ug,wg=103==(0|vg),xg=Cf,yg=0!=(0|xg),zg=wg?yg:0,Ag=1&zg,Bg=sg-Ag|0,Zq=Bg,Cg=Zq,Dg=vr,Fg=fr,Gg=Dg,Hg=Fg,Ig=Gg-Hg|0,Jg=(0|Ig)/4&-1,Kg=Jg-1|0,Lg=9*Kg|0,Mg=(0|Cg)<(0|Lg)){for(Ng=fr,Og=Ng+4|0,Qg=Zq,Rg=Qg+9216|0,Sg=(0|Rg)/9&-1,Tg=Sg-1024|0,Ug=Og+(Tg<<2)|0,Sq=Ug,Vg=Zq,Wg=Vg+9216|0,Zq=Wg,Xg=Zq,Yg=(0|Xg)%9&-1,Zq=Yg,Yq=10,Zg=Zq,_g=Zg+1|0,Zq=_g;;){if(ah=Zq,bh=(0|ah)<9,!bh)break;ch=Yq,dh=10*ch|0,Yq=dh,eh=Zq,fh=eh+1|0,Zq=fh}gh=Sq,hh=0|f[gh>>2],ih=Yq,kh=(hh>>>0)%(ih>>>0)&-1,ur=kh,lh=ur,mh=0!=(0|lh),mh?wr=82:(nh=Sq,oh=nh+4|0,ph=vr,qh=(0|oh)!=(0|ph),qh&&(wr=82));a:do if(82==(0|wr)){jr=9007199254740992,rh=Sq,sh=0|f[rh>>2],th=Yq,vh=(sh>>>0)/(th>>>0)&-1,wh=1&vh,xh=0!=(0|wh),xh&&(yh=jr,zh=yh+2,jr=zh),Ah=ur,Bh=Yq,Ch=(Bh>>>0)/2&-1,Dh=Ah>>>0<Ch>>>0;do if(Dh)nr=.5;else{if(Eh=ur,Hh=Yq,Ih=(Hh>>>0)/2&-1,Jh=(0|Eh)==(0|Ih),Jh&&(Kh=Sq,Lh=Kh+4|0,Mh=vr,Nh=(0|Lh)==(0|Mh))){nr=1;break}nr=1.5}while(0);if(Oh=dr,Ph=0!=(0|Oh),Ph&&(Qh=er,Sh=0|d[Qh>>0],Th=Sh<<24>>24,Uh=45==(0|Th),Uh&&(Vh=jr,Wh=Vh*-1,jr=Wh,Xh=nr,Yh=Xh*-1,nr=Yh)),Zh=ur,$h=Sq,_h=0|f[$h>>2],bi=_h-Zh|0,f[$h>>2]=bi,ci=jr,di=nr,ei=ci+di,fi=jr,gi=ei!=fi){for(hi=Sq,ii=0|f[hi>>2],ji=Yq,ki=ii+ji|0,mi=Sq,f[mi>>2]=ki;;){if(ni=Sq,oi=0|f[ni>>2],pi=oi>>>0>999999999,!pi)break;qi=Sq,ri=qi+-4|0,Sq=ri,f[qi>>2]=0,si=Sq,ti=Mq,ui=si>>>0<ti>>>0,ui&&(vi=Mq,xi=vi+-4|0,Mq=xi,f[xi>>2]=0),yi=Sq,zi=0|f[yi>>2],Ai=zi+1|0,f[yi>>2]=Ai}for(Yq=10,Bi=fr,Ci=Mq,Di=Bi,Ei=Ci,Fi=Di-Ei|0,Gi=(0|Fi)/4&-1,Ii=9*Gi|0,Tq=Ii;;){if(Ji=Mq,Ki=0|f[Ji>>2],Li=Yq,Mi=Ki>>>0>=Li>>>0,!Mi)break a;Ni=Yq,Oi=10*Ni|0,Yq=Oi,Pi=Tq,Qi=Pi+1|0,Tq=Qi}}}while(0);Ri=vr,Ti=Sq,Ui=Ti+4|0,Vi=Ri>>>0>Ui>>>0,Vi&&(Wi=Sq,Xi=Wi+4|0,vr=Xi)}for(;;){if(Yi=vr,Zi=Mq,$i=Yi>>>0>Zi>>>0,!$i)break;if(_i=vr,aj=_i+-4|0,cj=0|f[aj>>2],dj=0!=(0|cj),ej=1^dj,!ej)break;fj=vr,gj=fj+-4|0,vr=gj}hj=Ij,ij=32|hj,jj=103==(0|ij);do if(jj&&(kj=Cf,lj=0!=(0|kj),lj||(nj=Cf,oj=nj+1|0,Cf=oj),pj=Cf,qj=Tq,rj=(0|pj)>(0|qj),sj=Tq,tj=(0|sj)>=-4,cr=rj&tj,uj=Ij,cr?(vj=uj+-1|0,Ij=vj,wj=Tq,yj=wj+1|0,zj=Cf,Aj=zj-yj|0,Cf=Aj):(Bj=uj-2|0,Ij=Bj,Cj=Cf,Dj=Cj+-1|0,Cf=Dj),Ej=Fh,Fj=8&Ej,Gj=0!=(0|Fj),!Gj)){Hj=vr,Kj=Mq,Lj=Hj>>>0>Kj>>>0;a:do if(Lj)if(Mj=vr,Nj=Mj+-4|0,Oj=0|f[Nj>>2],Pj=0!=(0|Oj))for(Yq=10,Zq=0;;){if(Qj=vr,Rj=Qj+-4|0,Sj=0|f[Rj>>2],Tj=Yq,Vj=(Sj>>>0)%(Tj>>>0)&-1,Wj=0==(0|Vj),!Wj)break a;Xj=Yq,Yj=10*Xj|0,Yq=Yj,Zj=Zq,$j=Zj+1|0,Zq=$j}else wr=119;else wr=119;while(0);if(119==(0|wr)&&(Zq=9),_j=Ij,ak=32|_j,bk=102==(0|ak),ck=Cf,ek=vr,fk=fr,gk=ek,hk=fk,ik=gk-hk|0,jk=(0|ik)/4&-1,kk=jk-1|0,lk=9*kk|0,bk){mk=Zq,nk=lk-mk|0,pk=0>(0|nk),pk?Ck=0:(qk=vr,rk=fr,sk=qk,tk=rk,uk=sk-tk|0,vk=(0|uk)/4&-1,wk=vk-1|0,xk=9*wk|0,yk=Zq,Ak=xk-yk|0,Ck=Ak),Bk=(0|ck)<(0|Ck);do if(Bk)Dk=Cf,_k=Dk;else{if(Ek=vr,Fk=fr,Gk=Ek,Hk=Fk,Ik=Gk-Hk|0,Jk=(0|Ik)/4&-1,Lk=Jk-1|0,Mk=9*Lk|0,Nk=Zq,Ok=Mk-Nk|0,Pk=0>(0|Ok)){_k=0;break}Qk=vr,Rk=fr,Sk=Qk,Tk=Rk,Uk=Sk-Tk|0,Wk=(0|Uk)/4&-1,Xk=Wk-1|0,Yk=9*Xk|0,Zk=Zq,$k=Yk-Zk|0,_k=$k}while(0);Cf=_k;break}al=Tq,bl=lk+al|0,cl=Zq,dl=bl-cl|0,fl=0>(0|dl),fl?ul=0:(gl=vr,hl=fr,il=gl,jl=hl,kl=il-jl|0,ll=(0|kl)/4&-1,ml=ll-1|0,nl=9*ml|0,ol=Tq,ql=nl+ol|0,rl=Zq,sl=ql-rl|0,ul=sl),tl=(0|ck)<(0|ul);do if(tl)vl=Cf,Zl=vl;else{if(wl=vr,xl=fr,yl=wl,zl=xl,Bl=yl-zl|0,Cl=(0|Bl)/4&-1,Dl=Cl-1|0,El=9*Dl|0,Fl=Tq,Gl=El+Fl|0,Hl=Zq,Il=Gl-Hl|0,Jl=0>(0|Il)){Zl=0;break}Kl=vr,Nl=fr,Ol=Kl,Pl=Nl,Ql=Ol-Pl|0,Rl=(0|Ql)/4&-1,Sl=Rl-1|0,Tl=9*Sl|0,Ul=Tq,Vl=Tl+Ul|0,Wl=Zq,Yl=Vl-Wl|0,Zl=Yl}while(0);Cf=Zl;break}while(0);if($l=Cf,_l=1+$l|0,am=Cf,bm=0!=(0|am),bm?hm=1:(cm=Fh,dm=8&cm,em=0!=(0|dm),hm=em),fm=1&hm,im=_l+fm|0,$q=im,jm=Ij,km=32|jm,lm=102==(0|km),mm=Tq,lm)nm=(0|mm)>0,nm&&(om=Tq,pm=$q,qm=pm+om|0,$q=qm);else{for(sm=(0|mm)<0,tm=Tq,um=0-tm|0,vm=sm?um:tm,wm=Vq,xm=0|jc(vm,wm),Xq=xm;;){if(ym=Vq,zm=Xq,Am=ym,Bm=zm,Dm=Am-Bm|0,Em=(0|Dm)<2,!Em)break;Fm=Xq,Gm=Fm+-1|0,Xq=Gm,d[Gm>>0]=48}Hm=Tq,Im=(0|Hm)<0,Jm=Im?45:43,Km=255&Jm,Lm=Xq,Mm=Lm+-1|0,Xq=Mm,d[Mm>>0]=Km,Om=Ij,Pm=255&Om,Qm=Xq,Rm=Qm+-1|0,Xq=Rm,d[Rm>>0]=Pm,Sm=Vq,Tm=Xq,Um=Sm,Vm=Tm,Wm=Um-Vm|0,Xm=$q,Zm=Xm+Wm|0,$q=Zm}if($m=j,_m=yd,an=dr,bn=$q,cn=an+bn|0,dn=Fh,hc($m,32,_m,cn,dn),en=j,fn=er,gn=dr,ic(en,fn,gn),jn=j,kn=yd,ln=dr,mn=$q,nn=ln+mn|0,on=Fh,pn=65536^on,hc(jn,48,kn,nn,pn),qn=Ij,rn=32|qn,sn=102==(0|rn)){for(un=Mq,vn=fr,wn=un>>>0>vn>>>0,wn&&(xn=fr,Mq=xn),yn=Mq,Sq=yn;;){if(zn=Sq,An=fr,Bn=zn>>>0<=An>>>0,!Bn)break;Cn=Sq,Dn=0|f[Cn>>2],Fn=Pq+9|0,Gn=0|jc(Dn,Fn),pr=Gn,Hn=Sq,In=Mq,Jn=(0|Hn)!=(0|In);a:do if(Jn)for(;;){if(Kn=pr,Ln=Kn>>>0>Pq>>>0,!Ln)break a;Mn=pr,Nn=Mn+-1|0,pr=Nn,d[Nn>>0]=48}else On=pr,Rn=Pq+9|0,Sn=(0|On)==(0|Rn),Sn&&(Tn=pr,Un=Tn+-1|0,pr=Un,d[Un>>0]=48);while(0);Vn=j,Wn=pr,Xn=Pq+9|0,Yn=pr,Zn=Xn,$n=Yn,ao=Zn-$n|0,ic(Vn,Wn,ao),bo=Sq,co=bo+4|0,Sq=co}for(eo=Cf,fo=0!=(0|eo),fo?wr=157:(go=Fh,ho=8&go,io=0!=(0|ho),io&&(wr=157)),157==(0|wr)&&(jo=j,ic(jo,72376,1));;){if(ko=Sq,mo=vr,no=ko>>>0<mo>>>0,oo=Cf,po=(0|oo)>0,qo=no?po:0,!qo)break;for(ro=Sq,so=0|f[ro>>2],to=Pq+9|0,uo=0|jc(so,to),qr=uo;;){if(vo=qr,xo=vo>>>0>Pq>>>0,!xo)break;yo=qr,zo=yo+-1|0,qr=zo,d[zo>>0]=48}Ao=j,Bo=qr,Co=Cf,Do=9<(0|Co),Eo=Cf,Fo=Do?9:Eo,ic(Ao,Bo,Fo),Go=Sq,Io=Go+4|0,Sq=Io,Jo=Cf,Ko=Jo-9|0,Cf=Ko}Lo=j,Mo=Cf,No=Mo+9|0,hc(Lo,48,No,9,0)}else{for(Oo=vr,Po=Mq,Qo=Oo>>>0<=Po>>>0,Qo&&(Ro=Mq,To=Ro+4|0,vr=To),Uo=Mq,Sq=Uo;;){if(Vo=Sq,Wo=vr,Xo=Vo>>>0<Wo>>>0,Yo=Cf,Zo=(0|Yo)>=0,$o=Xo?Zo:0,!$o)break;_o=Sq,ap=0|f[_o>>2],cp=Pq+9|0,dp=0|jc(ap,cp),rr=dp,ep=rr,fp=Pq+9|0,gp=(0|ep)==(0|fp),gp&&(hp=rr,ip=hp+-1|0,rr=ip,d[ip>>0]=48),jp=Sq,kp=Mq,lp=(0|jp)!=(0|kp);a:do if(lp)for(;;){if(np=rr,op=np>>>0>Pq>>>0,!op)break a;pp=rr,qp=pp+-1|0,rr=qp,d[qp>>0]=48}else{if(rp=j,sp=rr,tp=sp+1|0,rr=tp,ic(rp,sp,1),up=Cf,vp=(0|up)>0,!vp&&(wp=Fh,yp=8&wp,zp=0!=(0|yp),!zp))break;Ap=j,ic(Ap,72376,1)}while(0);Bp=j,Cp=rr,Dp=Pq+9|0,Ep=rr,Fp=Dp,Gp=Ep,Hp=Fp-Gp|0,Jp=Cf,Kp=(0|Hp)<(0|Jp),Kp?(Lp=Pq+9|0,Mp=rr,Np=Lp,Op=Mp,Pp=Np-Op|0,Rp=Pp):(Qp=Cf,Rp=Qp),ic(Bp,Cp,Rp),Sp=Pq+9|0,Vp=rr,Wp=Sp,Xp=Vp,Yp=Wp-Xp|0,Zp=Cf,$p=Zp-Yp|0,Cf=$p,_p=Sq,aq=_p+4|0,Sq=aq}bq=j,cq=Cf,eq=cq+18|0,hc(bq,48,eq,18,0),fq=j,gq=Xq,hq=Vq,iq=Xq,jq=hq,kq=iq,lq=jq-kq|0,ic(fq,gq,lq)}return mq=j,nq=yd,pq=dr,qq=$q,rq=pq+qq|0,sq=Fh,tq=8192^sq,hc(mq,32,nq,rq,tq),uq=yd,vq=dr,wq=$q,xq=vq+wq|0,yq=(0|uq)>(0|xq),yq?(Aq=yd,Eq=Aq):(Bq=dr,Cq=$q,Dq=Bq+Cq|0,Eq=Dq),i=Eq,Fq=i,l=xr,0|Fq}function gc(a){a=+a;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),n=p,b=a,c=b,k[n>>3]=c,d=n,e=d,g=0|f[e>>2],h=d+4|0,i=h,j=0|f[i>>2],F=j,l=p,0|g}function hc(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,K=0;if(K=l,l=l+288|0,(0|l)>=(0|m)&&X(),I=K+16|0,f=a,g=b,t=c,B=d,C=e,D=C,E=73728&D,F=0!=(0|E))return void(l=K);if(G=B,H=t,h=(0|G)>=(0|H))return void(l=K);for(i=t,j=B,k=i-j|0,B=k,n=g,o=n<<24>>24,p=255&o,q=B,r=(0|q)>256,s=B,u=r?256:s,0|nw(0|I,0|p,0|u);;){if(v=B,w=(0|v)>=256,x=f,!w)break;ic(x,I,256),y=B,z=y-256|0,B=z}A=B,ic(x,I,A),l=K}function ic(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;s=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=s+24|0,i=s,e=a,g=b,h=c,j=e,k=0|f[j>>2],n=e,o=n+4|0,p=g,q=h,f[d>>2]=0|f[o>>2],f[d+4>>2]=0|f[o+4>>2],dh(i,k,d,p,q),l=s}function jc(a,b){a|=0,b|=0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;for(t=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,e=b;;){if(i=c,j=0!=(0|i),!j)break;k=c,n=(k>>>0)%10&-1,o=48+n|0,p=255&o,q=e,r=q+-1|0,e=r,d[r>>0]=p,f=c,g=(f>>>0)/10&-1,c=g}return h=e,l=t,0|h}function kc(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,$=0;return $=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,g=b,t=c,E=e,P=E+4|0,R=0|f[P>>2],S=e,T=g,U=t,V=e,h=V+8|0,i=0|f[h>>2],j=0|dx[255&R](S,T,U,i),Y=j,k=Y,n=0==(0|k),o=t,p=o>>>0>0,(W=n&p)?(q=e,r=q+92|0,s=0|f[r>>2],(u=0!=(0|s))?(v=e,lc(v),w=e,x=w+4|0,y=0|f[x>>2],z=e,A=g,B=t,C=e,D=C+8|0,F=0|f[D>>2],G=0|dx[255&y](z,A,B,F),Y=G,H=Y,(I=0!=(0|H))?(Q=Y,l=$,0|Q):(J=e,K=J+92|0,L=K+452|0,M=0|d[L>>0],N=M&-9,O=8|N,d[L>>0]=O,Q=Y,l=$,0|Q)):(Q=Y,l=$,0|Q)):(Q=Y,l=$,0|Q)}function lc(a){a|=0;var b=0,c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,la=0;return la=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,r=c+92|0,ja=r,C=ja,N=C+452|0,$=0|d[N>>0],fa=1&$,(ga=fa<<24>>24!=0)?void(l=la):(ha=ja,ia=ha+452|0,e=0|d[ia>>0],g=(255&e)>>>2,h=1&g,i=h<<24>>24!=0,i?(j=b,k=ja,mc(j,k),n=ja,o=n+452|0,p=0|d[o>>0],q=p&-3,s=2|q,d[o>>0]=s):(t=ja,u=t+420|0,v=0|f[u>>2],w=0!=(0|v),w&&(x=b,y=ja,nc(x,y,0))),z=b,A=ja,nc(z,A,0),B=ja,D=B+436|0,E=0|f[D>>2],F=(E>>>0)/100&-1,G=ja,H=G+444|0,I=0|f[H>>2],J=0|U(F,I),K=ja,L=K+440|0,f[L>>2]=J,M=ja,O=M+452|0,P=0|d[O>>0],Q=(255&P)>>>2,R=1&Q,(S=R<<24>>24!=0)?(T=ja,V=T+436|0,W=0|f[V>>2],Y=(W>>>0)/100&-1,Z=200*Y|0,_=ja,aa=_+456|0,f[aa>>2]=Z,ba=ja,ca=ba+452|0,da=0|d[ca>>0],ea=da&-3,d[ca>>0]=ea,void(l=la)):void(l=la))}function mc(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,$=0;$=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,e=b,s=e,D=s+452|0,O=0|d[D>>0],S=(255&O)>>>2,T=1&S,Y=T,U=e,V=U+452|0,W=0|d[V>>0],g=(255&W)>>>2,h=1&g,i=255&h,j=0!=(0|i),j&&(k=e,n=k+452|0,o=0|d[n>>0],p=(255&o)>>>1,q=1&p,r=255&q,t=0!=(0|r),t&&(u=c,v=e,nc(u,v,0))),w=e,x=w+452|0,y=0|d[x>>0],z=y&-5,d[x>>0]=z,A=c,B=e,Ac(A,B),C=c,E=e,nc(C,E,0),F=Y,G=e,H=G+452|0,I=0|d[H>>0],J=1&F,K=J<<2&255,L=I&-5,M=L|K,d[H>>0]=M,N=e,P=N+428|0,f[P>>2]=0,Q=e,R=Q+432|0,f[R>>2]=0,l=$}function nc(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;for(r=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,g=c;;)if(h=d,i=e,0|oc(h,i,-1),j=e,k=j+420|0,n=0|f[k>>2],o=g,p=(0|n)!=(0|o),!p)break;l=r}function oc(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,T=0;switch(T=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,s=b,D=c,L=s,M=L+420|0,N=0|f[M>>2],0|N){case 0:return O=e,P=s,pc(O,P),Q=s,g=Q+420|0,f[g>>2]=1,h=s,i=h+424|0,j=0|f[i>>2],k=3^j,n=s,o=n+424|0,f[o>>2]=k,d=0,K=d,l=T,0|K;case 1:return p=s,q=p+428|0,r=0|f[q>>2],t=0!=(0|r),u=e,v=s,t?(w=D,x=0|vc(u,v,w),d=x,K=d,l=T,0|K):(yc(u,v),y=e,z=s,Ac(y,z),d=0,K=d,l=T,0|K);case 2:return R=0,A=e,B=s,C=D,E=0|Bc(A,B,C),R=E,F=R,G=0==(0|F),G&&(H=s,I=H+420|0,f[I>>2]=0),J=R,d=J,K=d,l=T,0|K;default:return d=0,K=d,l=T,0|K}return 0}function pc(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0;for(Ga=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,e=b,s=e,D=s+452|0,O=0|d[D>>0],$=(255&O)>>>2,ja=1&$,ua=255&ja,Ba=0!=(0|ua),Ba?(Ca=e,g=Ca+452|0,h=0|d[g>>0],i=(255&h)>>>1,j=1&i,k=j<<24>>24!=0,k&&(Fa=3)):Fa=3,3==(0|Fa)&&(n=e,o=n+428|0,f[o>>2]=0,p=e,q=p+432|0,f[q>>2]=0),r=c,Ii(r),Ea=0,t=e,u=t+416|0,v=0|f[u>>2],Da=v;;){if(w=Ea,x=Da,y=w>>>0<x>>>0,z=c,!y)break;A=Ea,B=e,C=B+16|0,E=C+(A<<2)|0,F=0|f[E>>2],qc(z,F),G=Ea,H=G+1|0,Ea=H}return I=c,J=I+32|0,K=0|f[J>>2],qc(z,K),L=c,M=c,N=M+28|0,P=0|f[N>>2],qc(L,P),Q=c,R=c,S=R+20|0,T=0|f[S>>2],qc(Q,T),U=c,V=c,W=V+576|0,Y=0|f[W>>2],qc(U,Y),Z=c,_=c,aa=_+16|0,ba=0|f[aa>>2],sc(Z,ba),ca=c,da=ca+16|0,ea=0|f[da>>2],fa=ea+48|0,ga=0|f[fa>>2],ha=0!=(0|ga),ha&&(ia=c,ka=c,la=ka+16|0,ma=0|f[la>>2],na=ma+48|0,oa=0|f[na>>2],qc(ia,oa)),pa=c,qa=pa+16|0,ra=0|f[qa>>2],sa=c,ta=sa+12|0,va=0|f[ta>>2],(wa=(0|ra)!=(0|va))?(xa=c,ya=c,za=ya+12|0,Aa=0|f[za>>2],sc(xa,Aa),void(l=Ga)):void(l=Ga)}function qc(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,j=d,(k=0==(0|j))?void(l=u):(n=d,o=0|f[n>>2],p=o>>>8,q=7&p,r=3&q,(s=0!=(0|r))?(e=c,g=c,h=g+92|0,i=d,rc(e,h,i),void(l=u)):void(l=u))}function rc(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;v=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,k=c,n=k,o=0|f[n>>2],p=o&-1793,f[n>>2]=p,q=e,r=q+428|0,s=0|f[r>>2],t=k,g=t+8|0,f[g>>2]=s,h=k,i=e,j=i+428|0,f[j>>2]=h,l=v}function sc(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,ta=0;ta=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,d=b,qa=0,r=c,C=d,tc(r,C),N=d,Z=N+20|0,ia=0|f[Z>>2],ma=0!=(0|ia);a:do if(ma)for(na=d,oa=na+20|0,e=0|f[oa>>2],pa=e;;){if(g=pa,h=d,i=h+16|0,j=0|f[i>>2],k=g>>>0<=j>>>0,!k)break a;n=pa,o=n+20|0,p=0|f[o>>2],q=qa,s=(0|p)>(0|q),s&&(t=pa,u=t+20|0,v=0|f[u>>2],qa=v),w=c,x=pa,y=x+24|0,z=0|f[y>>2],qc(w,z),A=c,B=pa,D=B+4|0,E=0|f[D>>2],qc(A,E),F=c,G=pa,H=G+44|0,I=0|f[H>>2],qc(F,I),J=pa,K=J+48|0,pa=K}while(0);for(ra=0;;){if(L=ra,M=qa,O=(0|L)<(0|M),!O)break;P=c,Q=ra,R=d,S=R+36|0,T=0|f[S>>2],U=T+(Q<<2)|0,V=0|f[U>>2],qc(P,V),W=ra,Y=W+1|0,ra=Y}return $=d,_=0|f[$>>2],(aa=0!=(0|_))?(ba=d,ca=0|f[ba>>2],da=ca+48|0,ea=0|f[da>>2],(fa=0!=(0|ea))?(ga=c,ha=d,ja=0|f[ha>>2],ka=ja+48|0,la=0|f[ka>>2],qc(ga,la),void(l=ta)):void(l=ta)):void(l=ta)}function tc(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,xa=0;for(xa=l,l=l+32|0,(0|l)>=(0|m)&&X(),va=xa+8|0,r=xa,c=a,d=b,C=d,N=C+4|0,Z=0|f[N>>2],ia=d,qa=ia+8|0,ra=0|f[qa>>2],sa=Z,e=ra,g=sa-e|0,h=(0|g)/8&-1,ta=h,i=d,j=i+16|0,k=0|f[j>>2],n=0!=(0|k),n&&(o=d,p=o+16|0,q=0|f[p>>2],s=q+12|0,t=0|f[s>>2],u=ta,v=u+t|0,ta=v),w=d,x=w+8|0,y=0|f[x>>2],z=ta,A=y+(z<<3)|0,B=d,D=B+12|0,E=0|f[D>>2],F=A>>>0>E>>>0,F&&(G=d,H=G+12|0,I=0|f[H>>2],J=d,K=J+8|0,L=0|f[K>>2],M=I,O=L,P=M-O|0,Q=(0|P)/8&-1,ta=Q),ua=0;;){if(R=ua,S=ta,T=R>>>0<S>>>0,!T)break;U=ua,V=d,W=V+8|0,Y=0|f[W>>2],$=Y+(U<<3)|0,f[va>>2]=0|f[$>>2],f[va+4>>2]=0|f[$+4>>2],_=va+4|0,aa=0|f[_>>2],ba=aa>>>0<8;do if(!ba){if(ca=0|f[va>>2],da=0|f[ca>>2],ea=255&da,fa=1==(0|ea)){ga=ua,ha=d,ja=ha+8|0,ka=0|f[ja>>2],la=ka+(ga<<3)|0,uc(r),f[la>>2]=0|f[r>>2],f[la+4>>2]=0|f[r+4>>2];break}ma=c,na=0|f[va>>2],qc(ma,na);break}while(0);oa=ua,pa=oa+1|0,ua=pa}l=xa}function uc(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function vc(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;for(B=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,r=c,z=0;;){if(s=e,t=s+428|0,u=0|f[t>>2],v=0!=(0|u),!v){A=5;break}if(w=z,x=r,y=w>>>0<x>>>0,!y){A=5;break}g=d,h=e,i=e,j=i+428|0,k=0|f[j>>2],n=0|wc(g,h,k),o=z,p=o+n|0,z=p}return 5==(0|A)?(q=z,l=B,0|q):0}function wc(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Mb=0;switch(Mb=l,l=l+48|0,(0|l)>=(0|m)&&X(),d=a,e=b,Z=c,Ib=0,ia=d,ta=e,Ea=Z,xc(ia,ta,Ea),Pa=Z,$a=0|f[Pa>>2],jb=255&$a,0|jb){case 11:return ub=Ib,g=ub+1|0,Ib=g,R=Ib,l=Mb,0|R;case 10:case 12:case 9:return t=Z,Gb=t,E=d,P=Z,S=0|Pi(E,P),T=Ib,U=T+S|0,Ib=U,V=d,W=Gb,Y=0|fp(V,W),$=Ib,_=$+Y|0,Ib=_,aa=Ib,ba=aa+1|0,Ib=ba,R=Ib,l=Mb,0|R;case 18:case 21:case 8:return ca=d,da=Z,ea=0|Pi(ca,da),fa=Ib,ga=fa+ea|0,Ib=ga,R=Ib,l=Mb,0|R;case 20:return ha=Z,ja=0|f[ha>>2],ka=ja>>>11,la=Ib,ma=la+ka|0,Ib=ma,R=Ib,l=Mb,0|R;case 22:if(na=Z,oa=na+12|0,pa=0|f[oa>>2],Hb=pa,qa=Hb,ra=0!=(0|qa),!ra)return R=Ib,l=Mb,0|R;sa=Hb,ua=sa+4|0,va=0|f[ua>>2],wa=Hb,xa=wa+8|0,ya=0|f[xa>>2],za=va,Aa=ya,Ba=za-Aa|0,Ca=(0|Ba)/8&-1,Kb=Ca,Da=Hb,Fa=Da+16|0,Ga=0|f[Fa>>2],Ha=0!=(0|Ga),Ha&&(Ia=Hb,Ja=Ia+16|0,Ka=0|f[Ja>>2],La=Ka+12|0,Ma=0|f[La>>2],Na=Kb,Oa=Na+Ma|0,Kb=Oa),Qa=Hb,Ra=Qa+8|0,Sa=0|f[Ra>>2],Ta=Kb,Ua=Sa+(Ta<<3)|0,Va=Hb,Wa=Va+12|0,Xa=0|f[Wa>>2],Ya=Ua>>>0>Xa>>>0,Ya&&(Za=Hb,_a=Za+12|0,ab=0|f[_a>>2],bb=Hb,cb=bb+8|0,db=0|f[cb>>2],eb=ab,fb=db,gb=eb-fb|0,hb=(0|gb)/8&-1,Kb=hb),ib=Kb,kb=Ib,lb=kb+ib|0,Ib=lb,mb=Hb,nb=mb+16|0,ob=0|f[nb>>2],pb=0!=(0|ob),pb?(qb=Hb,rb=qb+16|0,sb=0|f[rb>>2],tb=sb+20|0,vb=0|f[tb>>2],yb=vb):yb=0,wb=Ib,xb=wb+yb|0,Ib=xb,zb=Hb,Ab=zb+20|0,Bb=0|f[Ab>>2],Cb=0!=(0|Bb);a:do if(Cb)for(Kb=0,Db=Hb,Eb=Db+20|0,h=0|f[Eb>>2],Jb=h;;){if(i=Jb,j=Hb,k=j+16|0,n=0|f[k>>2],o=i>>>0<=n>>>0,!o)break a;p=Kb,q=p+1|0,Kb=q,r=Jb,s=r+48|0,Jb=s}while(0);return u=Kb,v=Ib,w=v+u|0,Ib=w,R=Ib,l=Mb,0|R;case 14:return x=Z,Fb=x,y=Fb,z=y+12|0,A=0|f[z>>2],B=Ib,C=B+A|0,Ib=C,R=Ib,l=Mb,0|R;case 15:return D=d,F=Z,G=0|Pi(D,F),H=Ib,I=H+G|0,Ib=I,J=d,K=Z,L=0|yd(J,K),M=Ib,N=M+L|0,Ib=N,R=Ib,l=Mb,0|R;case 17:case 13:return O=Ib,Q=O+2|0,Ib=Q,R=Ib,l=Mb,0|R;default:return R=Ib,l=Mb,0|R}return 0}function xc(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,$b=0;switch($b=l,l=l+64|0,(0|l)>=(0|m)&&X(),d=a,e=b,ga=c,ra=ga,Ca=0|f[ra>>2],Na=Ca&-1793,Ya=1024|Na,f[ra>>2]=Ya,hb=ga,sb=hb+8|0,Db=0|f[sb>>2],g=e,t=g+428|0,f[t>>2]=Db,E=d,P=ga,_=P+4|0,ba=0|f[_>>2],qc(E,ba),ca=ga,da=0|f[ca>>2],ea=255&da,0|ea){case 11:return fa=ga,Pb=fa,ha=Pb,ia=0|f[ha>>2],ja=ia>>>11,ka=1048576&ja,la=0!=(0|ka),la&&(ma=d,na=Pb,ep(ma,na)),oa=d,pa=ga,qa=pa+20|0,sa=0|f[qa>>2],qc(oa,sa),void(l=$b);case 12:case 10:case 9:ta=ga,Qb=ta,ua=d,va=Qb,ep(ua,va),wa=d,xa=Qb,ya=xa+20|0,za=0|f[ya>>2],qc(wa,za);break;case 18:case 21:case 8:break;case 13:return Da=ga,Xb=Da,Ea=d,Fa=Xb,Ga=Fa+20|0,Ha=0|f[Ga>>2],qc(Ea,Ha),Ia=d,Ja=Xb,Ka=Ja+16|0,La=0|f[Ka>>2],qc(Ia,La),void(l=$b);case 20:if(Ma=ga,Sb=Ma,Oa=Sb,Pa=Oa+20|0,Qa=0|f[Pa>>2],Ra=(0|Qa)>=0)return void(l=$b);for(Sa=Sb,Ta=0|f[Sa>>2],Ua=Ta>>>11,Wb=Ua,Ub=0;;){if(Va=Ub,Wa=Wb,Xa=(0|Va)<(0|Wa),!Xa)break;Za=Ub,$a=Sb,_a=$a+12|0,ab=0|f[_a>>2],bb=ab+(Za<<3)|0,cb=bb+4|0,db=0|f[cb>>2],eb=db>>>0<8,eb||(fb=d,gb=Ub,ib=Sb,jb=ib+12|0,kb=0|f[jb>>2],lb=kb+(gb<<3)|0,mb=0|f[lb>>2],qc(fb,mb)),nb=Ub,ob=nb+1|0,Ub=ob}return void(l=$b);case 22:return pb=ga,qb=pb+12|0,rb=0|f[qb>>2],Rb=rb,tb=Rb,(ub=0!=(0|tb))?(vb=d,wb=Rb,sc(vb,wb),void(l=$b)):void(l=$b);case 14:for(xb=ga,Ob=xb,Vb=0,yb=Ob,zb=yb+12|0,Ab=0|f[zb>>2],Tb=Ab;;){if(Bb=Vb,Cb=Tb,Eb=Bb>>>0<Cb>>>0,!Eb)break;Fb=Vb,Gb=Ob,Hb=Gb+20|0,Ib=0|f[Hb>>2],Jb=Ib+(Fb<<3)|0,Kb=Jb+4|0,Lb=0|f[Kb>>2],Mb=Lb>>>0<8,Mb||(Nb=d,h=Vb,i=Ob,j=i+20|0,k=0|f[j>>2],n=k+(h<<3)|0,o=0|f[n>>2],qc(Nb,o)),p=Vb,q=p+1|0,Vb=q}return void(l=$b);case 15:return r=d,s=ga,Oi(r,s),u=d,v=ga,xd(u,v),void(l=$b);case 17:return w=ga,Yb=w,x=Yb,y=x+12|0,z=0|f[y>>2],(A=0!=(0|z))?(B=Yb,C=B+12|0,D=0|f[C>>2],F=D+4|0,G=0|f[F>>2],H=G>>>0<8,H||(I=d,J=Yb,K=J+12|0,L=0|f[K>>2],M=0|f[L>>2],qc(I,M)),N=Yb,O=N+12|0,Q=0|f[O>>2],R=Q+8|0,S=R+4|0,T=0|f[S>>2],(U=T>>>0<8)?void(l=$b):(V=d,W=Yb,Y=W+12|0,Z=0|f[Y>>2],$=Z+8|0,aa=0|f[$>>2],qc(V,aa),void(l=$b))):void(l=$b);default:return void(l=$b)}Aa=d,Ba=ga,Oi(Aa,Ba),l=$b}function yc(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,x=0;x=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,o=c,p=c,q=p+16|0,r=0|f[q>>2],tc(o,r),s=c,t=d,zc(s,t),u=d,v=u+432|0,e=0|f[v>>2],g=d,h=g+428|0,f[h>>2]=e,i=d,j=i+432|0,f[j>>2]=0,k=c,n=d,zc(k,n),l=x}function zc(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,F=0;for(F=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b;;){if(r=d,x=r+428|0,y=0|f[x>>2],z=0!=(0|y),!z)break;A=d,B=A+428|0,C=0|f[B>>2],D=0|f[C>>2],e=D>>>8,g=7&e,h=0==(0|g),h?(i=c,j=d,k=d,n=k+428|0,o=0|f[n>>2],xc(i,j,o)):(p=d,q=p+428|0,s=0|f[q>>2],t=s+8|0,u=0|f[t>>2],v=d,w=v+428|0,f[w>>2]=u)}l=F}function Ac(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;t=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,i=d,j=i+420|0,f[j>>2]=2,k=d,n=0|f[k>>2],o=d,p=o+4|0,f[p>>2]=n,q=d,r=q+12|0,e=0|f[r>>2],g=d,h=g+436|0,f[h>>2]=e,l=t}function Bc(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0;for(mc=l,l=l+48|0,(0|l)>=(0|m)&&X(),e=a,g=b,va=c,Ga=g,Ra=Ga+4|0,ab=0|f[Ra>>2],jc=ab,kc=0;;){if(lb=jc,wb=0!=(0|lb),wb?(Hb=kc,Sb=va,h=Hb>>>0<Sb>>>0,qa=h):qa=0,u=jc,!qa)break;for(F=u+24|0,ic=F,Q=ic,aa=Q+1536|0,cc=aa,dc=0,bc=1,la=jc,ra=0|f[la>>2],sa=0==(0|ra),ta=1&sa,ua=255&ta,ec=ua,wa=g,xa=wa+452|0,ya=0|d[xa>>0],za=(255&ya)>>>2,Aa=1&za,Ba=255&Aa,Ca=0!=(0|Ba),Ca&&(Da=g,Ea=Da+452|0,Fa=0|d[Ea>>0],Ha=(255&Fa)>>>1,Ia=1&Ha,Ja=Ia<<24>>24!=0,Ja||(Ka=jc,La=Ka+20|0,Ma=0|d[La>>0],Na=1&Ma,Oa=255&Na,Pa=0!=(0|Oa),Pa&&(Qa=cc,ic=Qa,bc=0)));;){if(Sa=ic,Ta=cc,Ua=Sa>>>0<Ta>>>0,!Ua)break;Va=ic,Wa=0|f[Va>>2],Xa=Wa>>>8,Ya=7&Xa,Za=g,$a=Za+424|0,_a=0|f[$a>>2],bb=3^_a,cb=Ya&bb,db=3&cb,eb=0!=(0|db),eb?lc=12:(fb=ic,gb=0|f[fb>>2],hb=255&gb,ib=1==(0|hb),ib?lc=12:(zb=g,Ab=zb+452|0,Bb=0|d[Ab>>0],Cb=(255&Bb)>>>2,Db=1&Cb,Eb=Db<<24>>24!=0,Eb||(Fb=g,Gb=Fb+424|0,Ib=0|f[Gb>>2],Jb=ic,Kb=0|f[Jb>>2],Lb=7&Ib,Mb=Lb<<8,Nb=Kb&-1793,Ob=Nb|Mb,f[Jb>>2]=Ob),bc=0)),12==(0|lc)&&(lc=0,jb=ic,kb=0|f[jb>>2],mb=255&kb,nb=1!=(0|mb),nb&&(ob=e,pb=ic,Cc(ob,pb),qb=jc,rb=0|f[qb>>2],sb=ic,tb=sb+12|0,f[tb>>2]=rb,ub=ic,vb=jc,f[vb>>2]=ub,xb=dc,yb=xb+1|0,dc=yb)),Pb=ic,Qb=Pb+24|0,ic=Qb}Rb=bc,Tb=255&Rb,Ub=0!=(0|Tb),Vb=dc,Wb=Vb>>>0<64,gc=Ub&Wb,gc?(Xb=jc,Yb=Xb+8|0,Zb=0|f[Yb>>2],fc=Zb,$b=g,_b=jc,Ec($b,_b),ac=g,i=jc,Fc(ac,i),j=e,k=jc,Dc(j,k),n=fc,jc=n):(o=ec,p=255&o,q=0!=(0|p),r=dc,s=r>>>0>0,hc=q&s,hc&&(t=g,v=jc,Gc(t,v)),w=jc,x=0|f[w>>2],y=0==(0|x),y?(z=g,A=z+452|0,B=0|d[A>>0],C=(255&B)>>>2,D=1&C,E=255&D,G=0!=(0|E),G?(H=g,I=H+452|0,J=0|d[I>>0],K=(255&J)>>>1,L=1&K,M=L<<24>>24!=0,M?lc=26:(N=jc,O=N+20|0,P=0|d[O>>0],R=P&-2,S=1|R,d[O>>0]=S)):lc=26):lc=26,26==(0|lc)&&(lc=0,T=jc,U=T+20|0,V=0|d[U>>0],W=V&-2,d[U>>0]=W),Y=jc,Z=Y+8|0,$=0|f[Z>>2],jc=$),_=kc,ba=_+64|0,kc=ba,ca=dc,da=g,ea=da+12|0,fa=0|f[ea>>2],ga=fa-ca|0,f[ea>>2]=ga,ha=dc,ia=g,ja=ia+436|0,ka=0|f[ja>>2],ma=ka-ha|0,f[ja>>2]=ma}return na=g,oa=na+4|0,f[oa>>2]=u,pa=kc,l=mc,0|pa}function Cc(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,db=0;db=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=d,C=0|f[r>>2],N=255&C;a:do switch(0|N){case 18:case 8:Z=c,ia=d,Ri(Z,ia);break;case 12:case 10:case 9:ta=c,Ea=d,gp(ta,Ea),Pa=c,e=d,Ri(Pa,e);break;case 11:g=d,h=0|f[g>>2],i=h>>>11,j=1048576&i,k=0!=(0|j),k&&(n=c,o=d,gp(n,o));break;case 20:p=d,ab=p,q=ab,s=q+20|0,t=0|f[s>>2],u=(0|t)>=0,u||(v=c,w=ab,x=w+12|0,y=0|f[x>>2],Dc(v,y),z=ab,A=z+12|0,f[A>>2]=0);break;case 22:B=d,D=B+12|0,E=0|f[D>>2],$a=E,F=$a,G=c,H=G+16|0,I=0|f[H>>2],J=(0|F)!=(0|I),J&&(K=c,L=$a,fg(K,L));break;case 14:if(M=d,O=0|f[M>>2],P=O>>>11,Q=256&P,R=0!=(0|Q),S=c,T=d,R){U=T+16|0,V=0|f[U>>2],Rn(S,V);break a}W=T+20|0,Y=0|f[W>>2],Dc(S,Y);break a;case 15:$=c,_=d,Ri($,_),aa=c,ba=d,zd(aa,ba);break;case 16:ca=c,da=d,sg(ca,da);break;case 13:ea=d,bb=ea,fa=bb,ga=0|f[fa>>2],ha=ga>>>11,ja=128&ha,ka=0!=(0|ja),ka||(la=bb,ma=la+12|0,na=0|f[ma>>2],oa=0!=(0|na),oa&&(pa=c,qa=bb,ra=qa+12|0,sa=0|f[ra>>2],bg(pa,sa)));break;case 17:ua=c,va=d,wa=va+12|0,xa=0|f[wa>>2],Dc(ua,xa);break;case 21:ya=d,_a=ya,za=_a,Aa=za+16|0,Ba=0|f[Aa>>2],Ca=0!=(0|Ba),Ca&&(Da=_a,Fa=Da+16|0,Ga=0|f[Fa>>2],Ha=Ga+4|0,Ia=0|f[Ha>>2],Ja=0!=(0|Ia),Ja&&(Ka=_a,La=Ka+16|0,Ma=0|f[La>>2],Na=Ma+4|0,Oa=0|f[Na>>2],Qa=c,Ra=_a,Sa=Ra+20|0,Ta=0|f[Sa>>2],ax[511&Oa](Qa,Ta))),Ua=c,Va=d,Ri(Ua,Va);break;case 6:case 4:case 3:case 2:return void(l=db)}while(0);Wa=d,Xa=0|f[Wa>>2],Ya=Xa&-256,Za=1|Ya,f[Wa>>2]=Za,l=db}function Dc(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;q=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,g=e+4|0,h=0|f[g>>2],i=c,j=d,k=c,n=k+8|0,o=0|f[n>>2],0|dx[255&h](i,j,0,o),l=q}function Ec(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0;return Q=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=d,C=r+4|0,J=0|f[C>>2],K=0!=(0|J),K&&(L=d,M=L+8|0,N=0|f[M>>2],O=d,e=O+4|0,g=0|f[e>>2],h=g+8|0,f[h>>2]=N),i=d,j=i+8|0,k=0|f[j>>2],n=0!=(0|k),n&&(o=d,p=o+4|0,q=0|f[p>>2],s=d,t=s+8|0,u=0|f[t>>2],v=u+4|0,f[v>>2]=q),w=c,x=0|f[w>>2],y=d,(z=(0|x)==(0|y))?(A=d,B=A+8|0,D=0|f[B>>2],E=c,f[E>>2]=D,F=d,G=F+4|0,f[G>>2]=0,H=d,I=H+8|0,f[I>>2]=0,void(l=Q)):(F=d,G=F+4|0,f[G>>2]=0,H=d,I=H+8|0,f[I>>2]=0,void(l=Q))}function Fc(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0;return S=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=d,C=r+16|0,L=0|f[C>>2],M=0!=(0|L),M&&(N=d,
+O=N+12|0,P=0|f[O>>2],Q=d,e=Q+16|0,g=0|f[e>>2],h=g+12|0,f[h>>2]=P),i=d,j=i+12|0,k=0|f[j>>2],n=0!=(0|k),n&&(o=d,p=o+16|0,q=0|f[p>>2],s=d,t=s+12|0,u=0|f[t>>2],v=u+16|0,f[v>>2]=q),w=c,x=w+8|0,y=0|f[x>>2],z=d,(A=(0|y)==(0|z))?(B=d,D=B+12|0,E=0|f[D>>2],F=c,G=F+8|0,f[G>>2]=E,H=d,I=H+16|0,f[I>>2]=0,J=d,K=J+12|0,f[K>>2]=0,void(l=S)):(H=d,I=H+16|0,f[I>>2]=0,J=d,K=J+12|0,f[K>>2]=0,void(l=S))}function Gc(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,z=0;z=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,q=c,r=q+8|0,s=0|f[r>>2],t=d,u=t+12|0,f[u>>2]=s,v=c,w=v+8|0,x=0|f[w>>2],e=0!=(0|x),e&&(g=d,h=c,i=h+8|0,j=0|f[i>>2],k=j+16|0,f[k>>2]=g),n=d,o=c,p=o+8|0,f[p>>2]=n,l=z}function Hc(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0;return Q=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=Q+24|0,F=Q,g=a,h=b,u=c,H=g,I=h,J=u,K=0|kc(H,I,J),O=K,L=O,M=0==(0|L),i=u,j=0!=(0|i),N=M&j,k=g,n=k+92|0,o=n+452|0,p=0|d[o>>0],N?(q=(255&p)>>>3,r=1&q,(s=r<<24>>24!=0)?(G=O,l=Q,0|G):(t=g,v=t+92|0,w=v+452|0,x=0|d[w>>0],y=x&-9,z=8|y,d[w>>0]=z,A=g,B=g,C=B+576|0,D=0|f[C>>2],Ic(F,D),f[e>>2]=0|f[F>>2],f[e+4>>2]=0|f[F+4>>2],yr(A,e),0)):(E=p&-9,d[o>>0]=E,G=O,l=Q,0|G)}function Ic(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=0|f[d>>2],g=255&e,h=j+4|0,f[h>>2]=g,i=c,f[j>>2]=i,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function Jc(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=0|Hc(e,0,f),l=i,0|g}function Kc(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=0|kc(e,0,f),l=i,0|g}function Lc(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0;return D=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,e=b,r=c,s=e,t=s>>>0>0,u=r,v=u>>>0>0,z=t&v,z&&(w=e,x=r,y=4294967295/(x>>>0)&-1,f=w>>>0<=y>>>0)?(g=e,h=r,i=0|U(g,h),B=i,j=d,k=B,n=0|Jc(j,k),A=n,o=A,p=B,0|nw(0|o,0,0|p),q=A,l=D,0|q):(A=0,q=A,l=D,0|q)}function Mc(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;E=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,e=b,s=e,w=s+424|0,f[w>>2]=1,x=e,f[x>>2]=0,y=e,z=y+8|0,f[z>>2]=0,A=c,B=e,Nc(A,B),C=e,g=C+444|0,f[g>>2]=200,h=e,i=h+448|0,f[i>>2]=200,j=e,k=j+452|0,n=0|d[k>>0],o=n&-5,p=4|o,d[k>>0]=p,q=e,r=q+452|0,t=0|d[r>>0],u=t&-3,v=2|u,d[r>>0]=v,l=E}function Nc(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,L=0;for(L=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=c,z=0|Lc(r,1,1564),I=z,J=0,A=I,B=A+24|0,H=B,C=H,D=C+1536|0,G=D;;){if(E=H,F=G,e=E>>>0<F>>>0,!e)break;g=H,h=0|f[g>>2],i=h&-256,j=1|i,f[g>>2]=j,k=J,n=H,o=n+12|0,f[o>>2]=k,p=H,J=p,q=H,s=q+24|0,H=s}t=J,u=I,f[u>>2]=t,v=d,w=I,Oc(v,w),x=d,y=I,Gc(x,y),l=L}function Oc(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;v=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,k=c,n=0|f[k>>2],o=d,p=o+8|0,f[p>>2]=n,q=c,r=0|f[q>>2],s=0!=(0|r),s&&(t=d,e=c,g=0|f[e>>2],h=g+4|0,f[h>>2]=t),i=d,j=c,f[j>>2]=i,l=v}function Pc(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,L=0;for(L=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=d,z=0|f[r>>2],I=z;;){if(A=I,B=0!=(0|A),!B)break;for(C=I,J=C,D=I,E=D+8|0,F=0|f[E>>2],I=F,e=J,g=e+24|0,H=g,h=H,i=h+1536|0,G=i;;){if(j=H,k=G,n=j>>>0<k>>>0,!n)break;o=H,p=0|f[o>>2],q=255&p,s=1!=(0|q),s&&(t=c,u=H,Cc(t,u)),v=H,w=v+24|0,H=w}x=c,y=J,Dc(x,y)}l=L}function Qc(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,h=0;h=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,Pc(e,f),l=h}function Rc(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;return o=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b+4|0,e=0|f[d>>2],(g=e>>>0<8)?void(l=o):(h=c,i=c,j=i+92|0,k=0|f[b>>2],Sc(h,j,k),void(l=o))}function Sc(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;return B=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,t=e,u=t+416|0,v=0|f[u>>2],(w=(0|v)>=100)?(x=e,y=x+416|0,f[y>>2]=96,z=d,g=d,h=0|tp(g,67967),Br(z,h,54568),void 0):(i=s,j=e,k=j+416|0,n=0|f[k>>2],o=n+1|0,f[k>>2]=o,p=e,q=p+16|0,r=q+(n<<2)|0,f[r>>2]=i,void(l=B))}function Tc(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,va=0;return va=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,D=d,O=D+92|0,sa=O,$=sa,ja=$+440|0,pa=0|f[ja>>2],qa=sa,ra=qa+12|0,g=0|f[ra>>2],h=pa>>>0<g>>>0,h&&(i=d,Uc(i)),j=sa,k=j+8|0,n=0|f[k>>2],o=0==(0|n),o&&(p=d,q=sa,Nc(p,q)),r=sa,t=r+8|0,u=0|f[t>>2],v=0|f[u>>2],ta=v,w=ta,x=w+12|0,y=0|f[x>>2],z=sa,A=z+8|0,B=0|f[A>>2],f[B>>2]=y,C=sa,E=C+8|0,F=0|f[E>>2],G=0|f[F>>2],H=0==(0|G),H&&(I=sa,J=sa,K=J+8|0,L=0|f[K>>2],Fc(I,L)),M=sa,N=M+12|0,P=0|f[N>>2],Q=P+1|0,f[N>>2]=Q,R=d,S=sa,T=ta,Sc(R,S,T),U=ta,f[U>>2]=0|f[18106],f[U+4>>2]=0|f[18107],f[U+8>>2]=0|f[18108],f[U+12>>2]=0|f[18109],f[U+16>>2]=0|f[18110],f[U+20>>2]=0|f[18111],V=e,W=ta,Y=0|f[W>>2],Z=255&V,_=Y&-256,aa=_|Z,f[W>>2]=aa,ba=s,ca=ta,da=ca+4|0,f[da>>2]=ba,ea=sa,fa=ea+424|0,ga=0|f[fa>>2],ha=ta,ia=0|f[ha>>2],ka=7&ga,la=ka<<8,ma=ia&-1793,na=ma|la,f[ha>>2]=na,oa=ta,l=va,0|oa}function Uc(a){a|=0;var b=0,c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0;return $a=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,r=c+92|0,Ya=r,C=Ya,N=C+452|0,$=0|d[N>>0],ja=1&$,(ua=ja<<24>>24!=0)?void(l=$a):(Fa=Ya,Qa=Fa+452|0,e=0|d[Qa>>0],g=(255&e)>>>2,h=1&g,i=255&h,j=0!=(0|i),j?(k=Ya,n=k+452|0,o=0|d[n>>0],p=(255&o)>>>1,q=1&p,s=q<<24>>24!=0,s?Za=5:(t=b,u=Ya,nc(t,u,0))):Za=5,5==(0|Za)&&(v=b,w=Ya,Vc(v,w)),x=Ya,y=x+420|0,z=0|f[y>>2],(A=0==(0|z))?(B=Ya,D=B+436|0,E=0|f[D>>2],F=(E>>>0)/100&-1,G=Ya,H=G+444|0,I=0|f[H>>2],J=0|U(F,I),K=Ya,L=K+440|0,f[L>>2]=J,M=Ya,O=M+440|0,P=0|f[O>>2],Q=P>>>0<1024,Q&&(R=Ya,S=R+440|0,f[S>>2]=1024),T=Ya,V=T+452|0,W=0|d[V>>0],Y=(255&W)>>>2,Z=1&Y,_=255&Z,aa=0!=(0|_),aa&&(ba=Ya,ca=ba+452|0,da=0|d[ca>>0],ea=(255&da)>>>1,fa=1&ea,ga=255&fa,ha=0!=(0|ga))?(ia=Ya,ka=ia+436|0,la=0|f[ka>>2],ma=(la>>>0)/100&-1,na=200*ma|0,oa=Ya,pa=oa+456|0,f[pa>>2]=na,qa=Ya,ra=qa+452|0,sa=0|d[ra>>0],ta=sa&-3,d[ra>>0]=ta,void(l=$a)):(va=Ya,wa=va+452|0,xa=0|d[wa>>0],ya=(255&xa)>>>2,za=1&ya,Aa=255&za,(Ba=0!=(0|Aa))?(Ca=Ya,Da=Ca+452|0,Ea=0|d[Da>>0],Ga=(255&Ea)>>>1,Ha=1&Ga,(Ia=Ha<<24>>24!=0)?void(l=$a):(Ja=Ya,Ka=Ja+12|0,La=0|f[Ka>>2],Ma=Ya,Na=Ma+456|0,Oa=0|f[Na>>2],(Pa=La>>>0>Oa>>>0)?(Ra=b,Sa=Ya,mc(Ra,Sa),Ta=Ya,Ua=Ta+452|0,Va=0|d[Ua>>0],Wa=Va&-3,Xa=2|Wa,d[Ua>>0]=Xa,void(l=$a)):void(l=$a))):void(l=$a))):void(l=$a))}function Vc(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,H=0;for(H=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,E=0,F=0,r=d,x=r+448|0,y=0|f[x>>2],z=10*y|0,E=z;;){if(A=F,B=E,C=A>>>0<B>>>0,!C)break;if(D=c,e=d,g=E,h=0|oc(D,e,g),i=F,j=i+h|0,F=j,k=d,n=k+420|0,o=0|f[n>>2],p=0==(0|o))break}q=d,s=q+12|0,t=0|f[s>>2],u=t+1024|0,v=d,w=v+440|0,f[w>>2]=u,l=H}function Wc(a){a|=0;var b=0,c=0,d=0,e=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=c+92|0,e=d+416|0,g=0|f[e>>2],l=i,0|g}function Xc(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,g=e+92|0,k=g,h=d,i=k,j=i+416|0,f[j>>2]=h,l=o}function Yc(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,Y=0;return Y=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,g=b,t=c,E=e,P=E+92|0,V=P,Q=g,R=0|f[Q>>2],S=R>>>8,T=7&S,U=4&T,(h=0!=(0|U))?(i=t,j=0|f[i>>2],k=j>>>8,n=7&k,o=3&n,(p=0!=(0|o))?(q=V,r=q+452|0,s=0|d[r>>0],u=(255&s)>>>2,v=1&u,w=255&v,x=0!=(0|w),x||(y=V,z=y+420|0,A=0|f[z>>2],B=1==(0|A))?(C=e,D=V,F=t,rc(C,D,F),void(l=Y)):(G=V,H=G+424|0,I=0|f[H>>2],J=g,K=0|f[J>>2],L=7&I,M=L<<8,N=K&-1793,O=N|M,f[J>>2]=O,void(l=Y))):void(l=Y)):void(l=Y)}function Zc(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,C=0;return C=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=c,t=r+92|0,A=t,u=d,v=0|f[u>>2],w=v>>>8,x=7&w,y=4&x,(z=0!=(0|y))?(e=d,g=0|f[e>>2],h=g&-1793,f[e>>2]=h,i=A,j=i+432|0,k=0|f[j>>2],n=d,o=n+8|0,f[o>>2]=k,p=d,q=A,s=q+432|0,f[s>>2]=p,void(l=C)):void(l=C)}function $c(a){a|=0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0;A=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,p=0|qp(c,54589),y=p,r=b,s=y,Yp(r,s,54592,8,0),t=b,u=y,Yp(t,u,54598,9,0),v=b,w=y,Yp(v,w,54605,10,0),x=b,d=y,Yp(x,d,54613,11,0),e=b,f=y,Yp(e,f,54628,12,262144),g=b,h=y,Yp(g,h,54644,13,0),i=b,j=y,Yp(i,j,54655,14,262144),k=b,n=y,Yp(k,n,54667,15,262144),o=b,q=y,Yp(o,q,54686,16,0),l=A}function _c(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0;g=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=d,lc(e),uc(a),l=g}function ad(a,b,c){a|=0,b|=0,c|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;u=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=b,f=e,i=f+92|0,j=i+452|0,k=0|d[j>>0],n=1&k,s=n,o=e,p=o+92|0,q=p+452|0,r=0|d[q>>0],g=r&-2,d[q>>0]=g,h=s,bd(a,h),l=u}function bd(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=255&d,g=0!=(0|e),h=g?2:0,i=j+4|0,f[i>>2]=h,f[j>>2]=1,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function cd(a,b,c){a|=0,b|=0,c|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;v=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=b,f=e,j=f+92|0,k=j+452|0,n=0|d[k>>0],o=1&n,t=o,p=e,q=p+92|0,r=q+452|0,s=0|d[r>>0],g=s&-2,h=1|g,d[r>>0]=h,i=t,bd(a,i),l=v}function dd(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0;k=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=d,g=e+92|0,h=g+444|0,i=0|f[h>>2],ed(a,i),l=k}function ed(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=3,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function fd(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+16|0,(0|l)>=(0|m)&&X(),n=p,k=p+4|0,d=b,e=d,f[n>>2]=k,0|Lp(e,64319,n),g=0|f[k>>2],h=d,i=h+92|0,j=i+444|0,f[j>>2]=g,uc(a),l=p}function gd(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0;k=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=d,g=e+92|0,h=g+448|0,i=0|f[h>>2],ed(a,i),l=k}function hd(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+16|0,(0|l)>=(0|m)&&X(),n=p,k=p+4|0,d=b,e=d,f[n>>2]=k,0|Lp(e,64319,n),g=0|f[k>>2],h=d,i=h+92|0,j=i+448|0,f[j>>2]=g,uc(a),l=p}function id(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;return B=l,l=l+16|0,(0|l)>=(0|m)&&X(),z=B,y=B+8|0,e=b,g=e,f[z>>2]=y,0|Lp(g,55037,z),q=e,r=q+92|0,s=r+452|0,t=0|d[s>>0],u=(255&t)>>>2,v=1&u,w=255&v,x=0|d[y>>0],h=255&x,(i=(0|w)!=(0|h))?(j=e,k=e,n=k+92|0,o=0|d[y>>0],jd(j,n,o),p=0|d[y>>0],bd(a,p),void(l=B)):(p=0|d[y>>0],bd(a,p),void(l=B))}function jd(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,ea=0;ea=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,g=b,t=c,E=g,P=E+452|0,Z=0|d[P>>0],$=(255&Z)>>>2,_=1&$,aa=255&_,ba=0==(0|aa),h=t,i=h<<24>>24!=0,ca=ba|i,ca?(r=g,s=r+452|0,u=0|d[s>>0],v=(255&u)>>>2,w=1&v,x=w<<24>>24!=0,x||(y=t,z=255&y,A=0!=(0|z),A&&(B=e,C=g,nc(B,C,0),D=g,F=D+436|0,G=0|f[F>>2],H=(G>>>0)/100&-1,I=200*H|0,J=g,K=J+456|0,f[K>>2]=I,L=g,M=L+452|0,N=0|d[M>>0],O=N&-3,d[M>>0]=O))):(j=e,k=g,mc(j,k),n=g,o=n+452|0,p=0|d[o>>0],q=p&-3,d[o>>0]=q),Q=t,R=g,S=R+452|0,T=0|d[S>>0],U=1&Q,V=U<<2&255,W=T&-5,Y=W|V,d[S>>0]=Y,l=ea}function kd(a,b,c){a|=0,b|=0,c|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=b,f=e,g=f+92|0,h=g+452|0,i=0|d[h>>0],j=(255&i)>>>2,k=1&j,bd(a,k),l=o}function ld(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,W=0;W=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=d,C=0|f[r>>2],T=C,R=20,L=c,M=T,N=M,O=(N>>>0)/4&-1,P=R,Q=T,e=0|U(P,Q),g=O+e|0,h=0|Jc(L,g),S=h,i=d,j=i+8|0,f[j>>2]=0,k=d,n=k+4|0,f[n>>2]=0,o=S,p=d,q=p+16|0,f[q>>2]=o,s=S,t=T,u=t<<3,v=s+u|0,w=d,x=w+20|0,f[x>>2]=v,y=S,z=R,A=T,B=0|U(z,A),D=y+B|0,E=d,F=E+12|0,f[F>>2]=D,G=d,H=G+12|0,I=0|f[H>>2],J=T,K=(J>>>0)/4&-1,md(I,-86,K),l=W}function md(a,b,c){a|=0,b|=0,c|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;for(q=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,g=c;;){if(h=g,i=h+-1|0,g=i,j=h>>>0>0,!j)break;k=f,n=e,o=n+1|0,e=o,d[n>>0]=k}l=q}function nd(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0;return Q=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=c,C=0|Lc(r,1,24),O=C,I=d,J=I>>>0<8,J&&(d=8),K=d,L=K+-1|0,d=L,M=d,N=M>>>1,e=d,g=e|N,d=g,h=d,i=h>>>2,j=d,k=j|i,d=k,n=d,o=n>>>4,p=d,q=p|o,d=q,s=d,t=s>>>8,u=d,v=u|t,d=v,w=d,x=w>>>16,y=d,z=y|x,d=z,A=d,B=A+1|0,d=B,D=d,E=O,f[E>>2]=D,F=c,G=O,ld(F,G),H=O,l=Q,0|H}function od(a){a|=0;var b=0,c=0,d=0,f=0;return f=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=0|nd(c,8),l=f,0|d}function pd(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=d,(g=0!=(0|e))?(h=c,i=d,j=i+16|0,k=0|f[j>>2],Dc(h,k),n=c,o=d,Dc(n,o),void(l=q)):void(l=q)}function qd(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0;return y=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,p=d,(q=0!=(0|p))?(r=d,s=r+12|0,t=0|f[s>>2],(u=0!=(0|t))?(v=d,w=v+12|0,e=0|f[w>>2],g=d,h=0|f[g>>2],i=(h>>>0)/4&-1,md(e,-86,i),j=d,k=j+8|0,f[k>>2]=0,n=d,o=n+4|0,f[o>>2]=0,void(l=y)):void(l=y)):void(l=y)}function rd(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0;for(ua=l,l=l+48|0,(0|l)>=(0|m)&&X(),ra=ua+40|0,e=ua+32|0,qa=ua+24|0,h=a,u=b,F=h,f[qa>>2]=0|f[c>>2],f[qa+4>>2]=0|f[c+4>>2],Q=0|sd(F,qa),aa=u,la=0|f[aa>>2],ma=la-1|0,na=Q&ma,pa=na,sa=0;;){if(oa=pa,i=(oa>>>0)/4&-1,j=u,k=j+12|0,n=0|f[k>>2],o=n+i|0,p=0|d[o>>0],q=255&p,r=pa,s=(r>>>0)%4&-1,t=54704+s|0,v=0|d[t>>0],w=255&v,x=q&w,y=0!=(0|x),z=1^y,!z){ta=7;break}if(A=pa,B=(A>>>0)/4&-1,C=u,D=C+12|0,E=0|f[D>>2],G=E+B|0,H=0|d[G>>0],I=255&H,J=pa,K=(J>>>0)%4&-1,L=54708+K|0,M=0|d[L>>0],N=255&M,O=I&N,P=0!=(0|O),!P&&(R=h,S=pa,T=u,U=T+16|0,V=0|f[U>>2],W=V+(S<<3)|0,f[e>>2]=0|f[W>>2],f[e+4>>2]=0|f[W+4>>2],f[ra>>2]=0|f[c>>2],f[ra+4>>2]=0|f[c+4>>2],Y=0|td(R,e,ra),Z=0!=(0|Y))){ta=5;break}_=pa,ba=sa,ca=ba+1|0,sa=ca,da=_+ca|0,ea=u,fa=0|f[ea>>2],ga=fa-1|0,ha=da&ga,pa=ha}return 5==(0|ta)?($=pa,g=$,ka=g,l=ua,0|ka):7==(0|ta)?(ia=u,ja=0|f[ia>>2],g=ja,ka=g,l=ua,0|ka):0}function sd(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Ta=0;switch(Ta=l,l=l+64|0,(0|l)>=(0|m)&&X(),Na=Ta+56|0,Ra=Ta,La=Ta+32|0,t=Ta+8|0,e=a,E=b+4|0,P=0|f[E>>2],Qa=P,_=Qa,0|_){case 16:for(ka=0|f[b>>2],va=0|f[ka>>2],Ga=va>>>11,Ja=8&Ga,g=0!=(0|Ja),h=0|f[b>>2],i=h+12|0,g?o=i:(k=i+8|0,n=0|f[k>>2],o=n),Pa=o,p=0|f[b>>2],q=0|f[p>>2],r=q>>>11,s=8&r,u=0!=(0|s),v=0|f[b>>2],u?(w=0|f[v>>2],x=w>>>11,y=496&x,z=y>>4,C=z):(A=v+12|0,B=0|f[A>>2],C=B),Oa=C,Ka=0,Ma=0;;){if(D=Ma,F=Oa,G=(0|D)<(0|F),H=Ka,!G)break;I=H<<5,J=Ka,K=I-J|0,L=Pa,M=L+1|0,Pa=M,N=0|d[L>>0],O=N<<24>>24,Q=K+O|0,Ka=Q,R=Ma,S=R+1|0,Ma=S}return c=H,Ia=c,l=Ta,0|Ia;case 4:return T=0|f[b>>2],Ka=T,U=Ka,V=Ka,W=V<<2,Y=U^W,Z=Ka,$=Z>>>2,aa=Y^$,c=aa,Ia=c,l=Ta,0|Ia;case 3:return ba=0|f[b>>2],ca=+(0|ba),da=0|Zr(ca),Ka=da,ea=Ka,fa=Ka,ga=fa<<2,ha=ea^ga,ia=Ka,ja=ia>>>2,la=ha^ja,c=la,Ia=c,l=Ta,0|Ia;case 6:return ma=+j[b>>2],na=0|Zr(ma),Ka=na,oa=Ka,pa=Ka,qa=pa<<2,ra=oa^qa,sa=Ka,ta=sa>>>2,ua=ra^ta,c=ua,Ia=c,l=Ta,0|Ia;default:return wa=e,f[Na>>2]=0|f[b>>2],f[Na+4>>2]=0|f[b+4>>2],Yj(t,wa,Na,68178,0,Ra),f[La>>2]=0|f[t>>2],f[La+4>>2]=0|f[t+4>>2],xa=Qa,ya=0|f[La>>2],za=xa^ya,Ka=za,Aa=Ka,Ba=Ka,Ca=Ba<<2,Da=Aa^Ca,Ea=Ka,Fa=Ea>>>2,Ha=Da^Fa,c=Ha,Ia=c,l=Ta,0|Ia}return 0}function td(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,ba=0;ba=l,l=l+48|0,(0|l)>=(0|m)&&X(),$=ba+40|0,Y=ba+32|0,Z=ba+24|0,W=ba+16|0,e=a,t=b+4|0,E=0|f[t>>2],_=E,P=_;a:do switch(0|P){case 16:R=e,f[W>>2]=0|f[b>>2],f[W+4>>2]=0|f[b+4>>2],f[Z>>2]=0|f[c>>2],f[Z+4>>2]=0|f[c+4>>2],S=0|Cg(R,W,Z),T=255&S,d=T;break;case 4:if(U=c+4|0,V=0|f[U>>2],g=4!=(0|V)){d=0;break a}h=0|f[b>>2],i=0|f[c>>2],k=(0|h)==(0|i),n=1&k,d=n;break a;case 3:switch(o=c+4|0,p=0|f[o>>2],0|p){case 3:q=0|f[b>>2],r=0|f[c>>2],s=(0|q)==(0|r),u=1&s,d=u;break a;case 6:v=0|f[b>>2],w=+(0|v),x=+j[c>>2],y=w==x,z=1&y,d=z;break a;default:d=0;break a}break;case 6:switch(A=c+4|0,B=0|f[A>>2],0|B){case 3:C=+j[b>>2],D=0|f[c>>2],F=+(0|D),G=C==F,H=1&G,d=H;break a;case 6:I=+j[b>>2],J=+j[c>>2],K=I==J,L=1&K,d=L;break a;default:d=0;break a}break;default:M=e,f[Y>>2]=0|f[b>>2],f[Y+4>>2]=0|f[b+4>>2],f[$>>2]=0|f[c>>2],f[$+4>>2]=0|f[c+4>>2],N=0|Qf(M,Y,$),O=255&N,d=O}while(0);return Q=d,l=ba,0|Q}function ud(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Na=0;for(Na=l,l=l+80|0,(0|l)>=(0|m)&&X(),e=Na+64|0,Fa=Na+24|0,h=a,i=b,v=c,G=v,R=G>>>0<8,g=R?8:c,v=g,ba=v,ma=ba+-1|0,v=ma,xa=v,Da=xa>>>1,Ea=v,j=Ea|Da,v=j,k=v,n=k>>>2,o=v,p=o|n,v=p,q=v,r=q>>>4,s=v,t=s|r,v=t,u=v,w=u>>>8,x=v,y=x|w,v=y,z=v,A=z>>>16,B=v,C=B|A,v=C,D=v,E=D+1|0,v=E,F=i,H=F+12|0,I=0|f[H>>2],Ia=I,J=i,K=J+16|0,L=0|f[K>>2],Ja=L,M=i,N=M+20|0,O=0|f[N>>2],La=O,P=i,Q=0|f[P>>2],Ka=Q,S=v,f[Fa>>2]=S,T=h,ld(T,Fa),Ga=0;;){if(U=Ga,V=Ka,W=U>>>0<V>>>0,!W)break;Y=Ga,Z=(Y>>>0)/4&-1,$=Ia,_=$+Z|0,aa=0|d[_>>0],ca=255&aa,da=Ga,ea=(da>>>0)%4&-1,fa=54712+ea|0,ga=0|d[fa>>0],ha=255&ga,ia=ca&ha,ja=0!=(0|ia),ja||(ka=h,la=Ga,na=Ja,oa=na+(la<<3)|0,f[e>>2]=0|f[oa>>2],f[e+4>>2]=0|f[oa+4>>2],pa=0|vd(ka,Fa,e,0),Ha=pa,qa=Ha,ra=Fa+20|0,sa=0|f[ra>>2],ta=sa+(12*qa|0)|0,ua=Ga,va=La,wa=va+(12*ua|0)|0,f[ta>>2]=0|f[wa>>2],f[ta+4>>2]=0|f[wa+4>>2],f[ta+8>>2]=0|f[wa+8>>2]),ya=Ga,za=ya+1|0,Ga=za}Aa=i,f[Aa>>2]=0|f[Fa>>2],f[Aa+4>>2]=0|f[Fa+4>>2],f[Aa+8>>2]=0|f[Fa+8>>2],f[Aa+12>>2]=0|f[Fa+12>>2],f[Aa+16>>2]=0|f[Fa+16>>2],f[Aa+20>>2]=0|f[Fa+20>>2],Ba=h,Ca=Ja,Dc(Ba,Ca),l=Na}function vd(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0;for(fc=l,l=l+64|0,(0|l)>=(0|m)&&X(),cc=fc+48|0,g=fc+40|0,bc=fc+32|0,i=a,ta=b,Ea=e,dc=0,Pa=ta,$a=Pa+8|0,jb=0|f[$a>>2],ub=ta,Fb=0|f[ub>>2],Qb=Fb>>>2,j=ta,w=0|f[j>>2],H=w>>>1,S=Qb|H,ca=jb>>>0>=S>>>0,ca&&(na=i,pa=ta,qa=ta,ra=0|f[qa>>2],sa=ra<<1,ud(na,pa,sa)),ua=i,f[bc>>2]=0|f[c>>2],f[bc+4>>2]=0|f[c+4>>2],va=0|sd(ua,bc),wa=ta,xa=0|f[wa>>2],ya=xa-1|0,za=va&ya,ac=za,Aa=ta,Ba=0|f[Aa>>2],_b=Ba;;){if(Ca=ac,Da=(Ca>>>0)/4&-1,Fa=ta,Ga=Fa+12|0,Ha=0|f[Ga>>2],Ia=Ha+Da|0,Ja=0|d[Ia>>0],Ka=255&Ja,La=ac,Ma=(La>>>0)%4&-1,Na=54704+Ma|0,Oa=0|d[Na>>0],Qa=255&Oa,Ra=Ka&Qa,Sa=0!=(0|Ra),Ta=1^Sa,!Ta)break;if(Ua=ac,Va=(Ua>>>0)/4&-1,Wa=ta,Xa=Wa+12|0,Ya=0|f[Xa>>2],Za=Ya+Va|0,_a=0|d[Za>>0],ab=255&_a,bb=ac,cb=(bb>>>0)%4&-1,db=54708+cb|0,eb=0|d[db>>0],fb=255&eb,gb=ab&fb,hb=0!=(0|gb))wb=_b,xb=ta,yb=0|f[xb>>2],zb=(0|wb)==(0|yb),zb&&(Ab=ac,_b=Ab);else if(ib=i,kb=ac,lb=ta,mb=lb+16|0,nb=0|f[mb>>2],ob=nb+(kb<<3)|0,f[g>>2]=0|f[ob>>2],f[g+4>>2]=0|f[ob+4>>2],f[cc>>2]=0|f[c>>2],f[cc+4>>2]=0|f[c+4>>2],pb=0|td(ib,g,cc),qb=0!=(0|pb)){ec=7;break}Bb=ac,Cb=dc,Db=Cb+1|0,dc=Db,Eb=Bb+Db|0,Gb=ta,Hb=0|f[Gb>>2],Ib=Hb-1|0,Jb=Eb&Ib,ac=Jb}return 7==(0|ec)?(rb=Ea,sb=0!=(0|rb),sb&&(tb=Ea,f[tb>>2]=0),vb=ac,h=vb,oa=h,l=fc,0|oa):(Kb=_b,Lb=ta,Mb=0|f[Lb>>2],Nb=(0|Kb)!=(0|Mb),Nb?(Ob=_b,Pb=ta,Rb=Pb+16|0,Sb=0|f[Rb>>2],Tb=Sb+(Ob<<3)|0,f[Tb>>2]=0|f[c>>2],f[Tb+4>>2]=0|f[c+4>>2],Ub=_b,Vb=(Ub>>>0)%4&-1,Wb=54708+Vb|0,Xb=0|d[Wb>>0],Yb=255&Xb,Zb=Yb^-1,$b=_b,k=($b>>>0)/4&-1,n=ta,o=n+12|0,p=0|f[o>>2],q=p+k|0,r=0|d[q>>0],s=255&r,t=s&Zb,u=255&t,d[q>>0]=u,v=ta,x=v+4|0,y=0|f[x>>2],z=y+1|0,f[x>>2]=z,A=Ea,B=0!=(0|A),B&&(C=Ea,f[C>>2]=2),D=_b,h=D,oa=h,l=fc,0|oa):(E=ac,F=ta,G=F+16|0,I=0|f[G>>2],J=I+(E<<3)|0,f[J>>2]=0|f[c>>2],f[J+4>>2]=0|f[c+4>>2],K=ac,L=(K>>>0)%4&-1,M=54704+L|0,N=0|d[M>>0],O=255&N,P=O^-1,Q=ac,R=(Q>>>0)/4&-1,T=ta,U=T+12|0,V=0|f[U>>2],W=V+R|0,Y=0|d[W>>0],Z=255&Y,$=Z&P,_=255&$,d[W>>0]=_,aa=ta,ba=aa+4|0,da=0|f[ba>>2],ea=da+1|0,f[ba>>2]=ea,fa=ta,ga=fa+8|0,ha=0|f[ga>>2],ia=ha+1|0,f[ga>>2]=ia,ja=Ea,ka=0!=(0|ja),ka&&(la=Ea,f[la>>2]=1),ma=ac,h=ma,oa=h,l=fc,0|oa))}function wd(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;E=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,g=b,t=c,w=t,x=(w>>>0)%4&-1,y=54708+x|0,z=0|d[y>>0],A=255&z,B=t,C=(B>>>0)/4&-1,h=g,i=h+12|0,j=0|f[i>>2],k=j+C|0,n=0|d[k>>0],o=255&n,p=o|A,q=255&p,d[k>>0]=q,r=g,s=r+4|0,u=0|f[s>>2],v=u+-1|0,f[s>>2]=v,l=E}function xd(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,ga=0;if(ga=l,l=l+32|0,(0|l)>=(0|m)&&X(),da=ga+8|0,ea=ga,c=a,e=b,s=e,D=s+16|0,O=0|f[D>>2],ba=O,Y=ba,Z=0!=(0|Y),!Z)return void(l=ga);for(ca=0;;){if($=ca,_=ba,aa=0|f[_>>2],g=(0|$)!=(0|aa),!g)break;h=ca,i=(h>>>0)/4&-1,j=ba,k=j+12|0,n=0|f[k>>2],o=n+i|0,p=0|d[o>>0],q=255&p,r=ca,t=(r>>>0)%4&-1,u=54712+t|0,v=0|d[u>>0],w=255&v,x=q&w,y=0!=(0|x),y||(z=ca,A=ba,B=A+16|0,C=0|f[B>>2],E=C+(z<<3)|0,f[da>>2]=0|f[E>>2],f[da+4>>2]=0|f[E+4>>2],F=ca,G=ba,H=G+20|0,I=0|f[H>>2],J=I+(12*F|0)|0,f[ea>>2]=0|f[J>>2],f[ea+4>>2]=0|f[J+4>>2],K=da+4|0,L=0|f[K>>2],M=L>>>0<8,M||(N=c,P=0|f[da>>2],qc(N,P)),Q=ea+4|0,R=0|f[Q>>2],S=R>>>0<8,S||(T=c,U=0|f[ea>>2],qc(T,U))),V=ca,W=V+1|0,ca=W}l=ga}function yd(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,j=b,k=j,n=k+16|0,o=0|f[n>>2],p=0!=(0|o),p?(q=j,r=q+16|0,s=0|f[r>>2],e=s+4|0,g=0|f[e>>2],h=g<<1,c=h,i=c,l=u,0|i):(c=0,i=c,l=u,0|i)}function zd(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=d,g=e+16|0,h=0|f[g>>2],(i=0!=(0|h))?(j=c,k=d,n=k+16|0,o=0|f[n>>2],pd(j,o),void(l=q)):void(l=q)}function Ad(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0;D=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=c,s=d,u=d,v=u+56|0,w=0|f[v>>2],x=0|Tc(s,15,w),B=x,y=d,z=0|od(y),A=B,g=A+16|0,f[g>>2]=z,h=e,i=(0|h)>0,i&&(j=d,k=B,n=k+16|0,o=0|f[n>>2],p=e,ud(j,o,p)),q=B,r=q+12|0,f[r>>2]=0,t=B,Bd(a,t),l=D}function Bd(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=0|f[d>>2],g=255&e,h=j+4|0,f[h>>2]=g,i=c,f[j>>2]=i,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function Cd(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,U=0;return U=l,l=l+80|0,(0|l)>=(0|m)&&X(),O=U+64|0,g=U+56|0,N=U+48|0,Q=U+40|0,R=U,i=U+16|0,h=b,v=0|f[c>>2],F=v+16|0,G=0|f[F>>2],M=G,H=M,I=0!=(0|H),I&&(J=h,K=M,f[Q>>2]=0|f[e>>2],f[Q+4>>2]=0|f[e+4>>2],L=0|rd(J,K,Q),P=L,j=P,k=M,n=0|f[k>>2],o=(0|j)!=(0|n))?(p=P,q=M,r=q+20|0,s=0|f[r>>2],t=s+(12*p|0)|0,f[a>>2]=0|f[t>>2],f[a+4>>2]=0|f[t+4>>2],void(l=U)):(u=0|f[c>>2],w=0|f[u>>2],x=w>>>11,y=256&x,z=0!=(0|y),A=h,B=h,z?(C=h,D=0|ki(C,54716,6),f[N>>2]=0|f[c>>2],f[N+4>>2]=0|f[c+4>>2],Yi(i,B,N,D),d[R>>0]=0|d[c>>0],d[R+1>>0]=0|d[c+1>>0],d[R+2>>0]=0|d[c+2>>0],d[R+3>>0]=0|d[c+3>>0],d[R+4>>0]=0|d[c+4>>0],d[R+5>>0]=0|d[c+5>>0],d[R+6>>0]=0|d[c+6>>0],d[R+7>>0]=0|d[c+7>>0],S=R+8|0,d[S>>0]=0|d[e>>0],d[S+1>>0]=0|d[e+1>>0],d[S+2>>0]=0|d[e+2>>0],d[S+3>>0]=0|d[e+3>>0],d[S+4>>0]=0|d[e+4>>0],d[S+5>>0]=0|d[e+5>>0],d[S+6>>0]=0|d[e+6>>0],d[S+7>>0]=0|d[e+7>>0],f[g>>2]=0|f[i>>2],f[g+4>>2]=0|f[i+4>>2],Yj(a,A,g,69512,2,R),void(l=U)):(E=0|ki(B,54716,6),f[O>>2]=0|f[c>>2],f[O+4>>2]=0|f[c+4>>2],Yi(a,A,O,E),void(l=U)))}function Dd(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,qa=0;return qa=l,l=l+64|0,(0|l)>=(0|m)&&X(),na=qa+48|0,ma=qa+40|0,ka=qa+32|0,oa=qa+12|0,g=qa,e=a,t=e,f[ka>>2]=0|f[b>>2],f[ka+4>>2]=0|f[b+4>>2],Ed(t,ka),E=0|f[b>>2],P=E+16|0,_=0|f[P>>2],ja=_,ea=ja,fa=0!=(0|ea),fa||(ga=e,ha=0|od(ga),h=0|f[b>>2],i=h+16|0,f[i>>2]=ha,ja=ha),j=e,k=ja,f[ma>>2]=0|f[c>>2],f[ma+4>>2]=0|f[c+4>>2],n=0|vd(j,k,ma,oa),la=n,o=la,p=ja,q=p+20|0,r=0|f[q>>2],s=r+(12*o|0)|0,f[s>>2]=0|f[d>>2],f[s+4>>2]=0|f[d+4>>2],u=0|f[oa>>2],v=0!=(0|u),v&&(w=e,x=0|Wc(w),ia=x,y=la,z=ja,A=z+16|0,B=0|f[A>>2],C=B+(y<<3)|0,D=e,f[na>>2]=0|f[c>>2],f[na+4>>2]=0|f[c+4>>2],Gd(g,D,na),f[C>>2]=0|f[g>>2],f[C+4>>2]=0|f[g+4>>2],f[c>>2]=0|f[C>>2],f[c+4>>2]=0|f[C+4>>2],F=e,G=ia,Xc(F,G),H=ja,I=H+4|0,J=0|f[I>>2],K=J-1|0,L=la,M=ja,N=M+20|0,O=0|f[N>>2],Q=O+(12*L|0)|0,R=Q+8|0,f[R>>2]=K),S=c+4|0,T=0|f[S>>2],U=T>>>0<8,U||(V=e,W=0|f[b>>2],Y=0|f[c>>2],Yc(V,W,Y)),Z=d+4|0,$=0|f[Z>>2],(aa=$>>>0<8)?void(l=qa):(ba=e,ca=0|f[b>>2],da=0|f[d>>2],Yc(ba,ca,da),void(l=qa))}function Ed(a,b){a|=0,b|=0;var c=0,d=0,e=0,h=0;h=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=h+8|0,c=a,d=c,f[e>>2]=0|f[b>>2],f[e+4>>2]=0|f[b+4>>2],0|Fd(d,e),l=h}function Fd(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,i=0|f[b>>2],j=i+16|0,k=0|f[j>>2],s=k,n=s,o=0!=(0|n),o?(g=s,c=g,h=c,l=u,0|h):(p=d,q=0|od(p),r=0|f[b>>2],e=r+16|0,f[e>>2]=q,c=q,h=c,l=u,0|h)}function Gd(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,C=0;C=l,l=l+32|0,(0|l)>=(0|m)&&X(),A=C+16|0,e=C,d=b,s=c+4|0,t=0|f[s>>2],u=16==(0|t),u&&(v=0|f[c>>2],w=0|f[v>>2],x=w>>>11,y=4&x,z=0!=(0|y),z||(g=d,f[A>>2]=0|f[c>>2],f[A+4>>2]=0|f[c+4>>2],Hg(e,g,A),f[c>>2]=0|f[e>>2],f[c+4>>2]=0|f[e+4>>2],h=0|f[c>>2],i=0|f[h>>2],j=i>>>11,k=4|j,n=0|f[h>>2],o=2097151&k,p=o<<11,q=2047&n,r=q|p,f[h>>2]=r)),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=C}function Hd(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Ba=0;if(Ba=l,l=l+48|0,(0|l)>=(0|m)&&X(),ya=Ba+32|0,va=Ba+8|0,g=b,h=0|f[c>>2],u=h+16|0,F=0|f[u>>2],wa=F,Q=wa,aa=0!=(0|Q),aa&&(la=g,sa=wa,f[ya>>2]=0|f[e>>2],f[ya+4>>2]=0|f[e+4>>2],ta=0|rd(la,sa,ya),xa=ta,ua=xa,i=wa,j=0|f[i>>2],k=(0|ua)!=(0|j))){for(n=xa,o=wa,p=o+20|0,q=0|f[p>>2],r=q+(12*n|0)|0,f[va>>2]=0|f[r>>2],f[va+4>>2]=0|f[r+4>>2],s=xa,t=wa,v=t+20|0,w=0|f[v>>2],x=w+(12*s|0)|0,y=x+8|0,z=0|f[y>>2],za=z,A=g,B=wa,C=xa,wd(A,B,C),xa=0;;){if(D=xa,E=wa,G=0|f[E>>2],H=(0|D)!=(0|G),!H)break;I=xa,J=(I>>>0)/4&-1,K=wa,L=K+12|0,M=0|f[L>>2],N=M+J|0,O=0|d[N>>0],P=255&O,R=xa,S=(R>>>0)%4&-1,T=54712+S|0,U=0|d[T>>0],V=255&U,W=P&V,Y=0!=(0|W),Y||(Z=xa,$=wa,_=$+20|0,ba=0|f[_>>2],ca=ba+(12*Z|0)|0,da=ca+8|0,ea=0|f[da>>2],fa=za,ga=(0|ea)>(0|fa),ga&&(ha=xa,ia=wa,ja=ia+20|0,ka=0|f[ja>>2],ma=ka+(12*ha|0)|0,na=ma+8|0,oa=0|f[na>>2],pa=oa+-1|0,f[na>>2]=pa)),qa=xa,ra=qa+1|0,xa=ra}return f[a>>2]=0|f[va>>2],f[a+4>>2]=0|f[va+4>>2],void(l=Ba)}Id(a),l=Ba}function Id(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Jd(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;q=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=0|f[c>>2],g=e+16|0,h=0|f[g>>2],o=h,i=o,j=0!=(0|i),j&&(k=d,n=o,qd(k,n)),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=q}function Kd(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=0|f[c>>2],i=e+16|0,j=0|f[i>>2],s=j,k=s,n=0!=(0|k),n?(o=s,p=o+4|0,q=0|f[p>>2],r=0==(0|q),g=1&r,h=255&g,Ld(a,h),void(l=u)):(Md(a),void(l=u))}function Ld(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=255&d,g=0!=(0|e),h=g?2:0,i=j+4|0,f[i>>2]=h,f[j>>2]=1,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function Md(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=2,f[c>>2]=1,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Nd(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,xa=0;if(xa=l,l=l+96|0,(0|l)>=(0|m)&&X(),e=xa+80|0,qa=xa+72|0,pa=xa+48|0,h=xa+32|0,u=xa+24|0,ua=xa+16|0,sa=xa,g=b,F=0|f[c>>2],Q=F+16|0,aa=0|f[Q>>2],ra=aa,la=ra,ma=0!=(0|la),ma&&(na=ra,oa=na+4|0,i=0|f[oa>>2],j=0==(0|i),!j)){for(n=g,o=ra,p=o+4|0,q=0|f[p>>2],Jn(h,n,q),f[pa>>2]=0|f[h>>2],f[pa+4>>2]=0|f[h+4>>2],r=g,s=ra,t=s+4|0,v=0|f[t>>2],w=v-1|0,Id(u),f[qa>>2]=0|f[pa>>2],f[qa+4>>2]=0|f[pa+4>>2],f[e>>2]=0|f[u>>2],f[e+4>>2]=0|f[u+4>>2],go(r,qa,w,e),x=0|f[pa>>2],y=x+20|0,z=0|f[y>>2],va=z,ta=0;;){if(A=ta,B=ra,C=0|f[B>>2],D=(0|A)!=(0|C),!D)break;E=ta,G=(E>>>0)/4&-1,H=ra,I=H+12|0,J=0|f[I>>2],K=J+G|0,L=0|d[K>>0],M=255&L,N=ta,O=(N>>>0)%4&-1,P=54712+O|0,R=0|d[P>>0],S=255&R,T=M&S,U=0!=(0|T),U||(V=ta,W=ra,Y=W+16|0,Z=0|f[Y>>2],$=Z+(V<<3)|0,f[ua>>2]=0|f[$>>2],f[ua+4>>2]=0|f[$+4>>2],_=ta,ba=ra,ca=ba+20|0,da=0|f[ca>>2],ea=da+(12*_|0)|0,f[sa>>2]=0|f[ea>>2],f[sa+4>>2]=0|f[ea+4>>2],f[sa+8>>2]=0|f[ea+8>>2],fa=sa+8|0,ga=0|f[fa>>2],ha=va,ia=ha+(ga<<3)|0,f[ia>>2]=0|f[ua>>2],f[ia+4>>2]=0|f[ua+4>>2]),ja=ta,ka=ja+1|0,ta=ka}return f[a>>2]=0|f[pa>>2],f[a+4>>2]=0|f[pa+4>>2],void(l=xa)}k=g,Mn(a,k),l=xa}function Od(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ua=0;
+ua=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,q=b,B=q+32|0,M=0|f[B>>2],Y=0|Dp(c,64917,M),sa=Y,ha=b,pa=ha+56|0,f[pa>>2]=Y,qa=sa,ra=0|f[qa>>2],d=ra>>>11,e=d&-256,g=15|e,h=sa,i=0|f[h>>2],j=2097151&g,k=j<<11,n=2047&i,o=n|k,f[h>>2]=o,p=b,r=sa,Jp(p,r,68841,17,262144),s=b,t=sa,Jp(s,t,64349,18,524288),u=b,v=sa,Jp(u,v,64358,19,0),w=b,x=sa,Jp(w,x,54726,20,4096),y=b,z=sa,Jp(y,z,54738,21,262144),A=b,C=sa,Jp(A,C,54747,22,0),D=b,E=sa,Jp(D,E,54760,23,262144),F=b,G=sa,Jp(F,G,54774,24,262144),H=b,I=sa,Jp(H,I,64381,25,0),J=b,K=sa,Jp(J,K,54783,26,262144),L=b,N=sa,Jp(L,N,54792,27,262144),O=b,P=sa,Jp(O,P,68944,26,262144),Q=b,R=sa,Jp(Q,R,68953,28,8192),S=b,T=sa,Jp(S,T,54808,26,262144),U=b,V=sa,Jp(U,V,54813,29,0),W=b,Z=sa,Jp(W,Z,64428,30,0),$=b,_=sa,Jp($,_,68969,26,262144),aa=b,ba=sa,Jp(aa,ba,64476,31,0),ca=b,da=sa,Jp(ca,da,68096,32,0),ea=b,fa=sa,Jp(ea,fa,64482,30,0),ga=b,ia=sa,Jp(ga,ia,54818,18,524288),ja=b,ka=sa,Jp(ja,ka,54824,27,262144),la=b,ma=sa,Jp(la,ma,54831,33,0),na=b,oa=sa,Jp(na,oa,64922,34,0),l=ua}function Pd(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+48|0,(0|l)>=(0|m)&&X(),i=o+32|0,j=o+24|0,k=o,h=o+8|0,d=b,e=d,f[k>>2]=h,0|Lp(e,68900,k),g=d,f[j>>2]=0|f[c>>2],f[j+4>>2]=0|f[c+4>>2],f[i>>2]=0|f[h>>2],f[i+4>>2]=0|f[h+4>>2],Cd(a,g,j,i),l=o}function Qd(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;r=l,l=l+64|0,(0|l)>=(0|m)&&X(),n=r+48|0,i=r+40|0,j=r+32|0,o=r,h=r+16|0,k=r+8|0,d=b,e=d,f[o>>2]=h,p=o+4|0,f[p>>2]=k,0|Lp(e,54723,o),g=d,f[j>>2]=0|f[c>>2],f[j+4>>2]=0|f[c+4>>2],f[i>>2]=0|f[h>>2],f[i+4>>2]=0|f[h+4>>2],f[n>>2]=0|f[k>>2],f[n+4>>2]=0|f[k+4>>2],Dd(g,j,i,n),f[a>>2]=0|f[k>>2],f[a+4>>2]=0|f[k+4>>2],l=r}function Rd(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,I=0;return I=l,l=l+80|0,(0|l)>=(0|m)&&X(),B=I+64|0,e=I+56|0,A=I+48|0,E=I+8|0,D=I,C=I+32|0,z=I+72|0,h=I+24|0,g=b,r=g,f[D>>2]=C,F=D+4|0,f[F>>2]=z,0|Lp(r,54734,D),s=0|f[c>>2],t=0|f[s>>2],u=t>>>11,v=256&u,(w=0!=(0|v))?(x=0|d[z>>0],y=x<<24>>24!=0,y?(i=g,j=g,k=g,n=0|ki(k,54716,6),f[A>>2]=0|f[c>>2],f[A+4>>2]=0|f[c+4>>2],Yi(h,j,A,n),d[E>>0]=0|d[c>>0],d[E+1>>0]=0|d[c+1>>0],d[E+2>>0]=0|d[c+2>>0],d[E+3>>0]=0|d[c+3>>0],d[E+4>>0]=0|d[c+4>>0],d[E+5>>0]=0|d[c+5>>0],d[E+6>>0]=0|d[c+6>>0],d[E+7>>0]=0|d[c+7>>0],G=E+8|0,d[G>>0]=0|d[C>>0],d[G+1>>0]=0|d[C+1>>0],d[G+2>>0]=0|d[C+2>>0],d[G+3>>0]=0|d[C+3>>0],d[G+4>>0]=0|d[C+4>>0],d[G+5>>0]=0|d[C+5>>0],d[G+6>>0]=0|d[C+6>>0],d[G+7>>0]=0|d[C+7>>0],f[e>>2]=0|f[h>>2],f[e+4>>2]=0|f[h+4>>2],Yj(a,i,e,69512,2,E),void(l=I)):(Id(a),void(l=I))):(o=g,p=g,q=0|ki(p,54716,6),f[B>>2]=0|f[c>>2],f[B+4>>2]=0|f[c+4>>2],Yi(a,o,B,q),void(l=I))}function Sd(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;B=l,l=l+48|0,(0|l)>=(0|m)&&X(),y=B+40|0,w=B+32|0,v=B+24|0,z=B,x=B+8|0,d=b,e=d,f[z>>2]=x,0|Lp(e,68900,z),n=d,f[v>>2]=0|f[c>>2],f[v+4>>2]=0|f[c+4>>2],Ed(n,v),o=d,p=d,q=0|ki(p,54716,6),f[w>>2]=0|f[c>>2],f[w+4>>2]=0|f[c+4>>2],f[y>>2]=0|f[x>>2],f[y+4>>2]=0|f[x+4>>2],cj(o,w,q,y),r=0|f[c>>2],s=0|f[r>>2],t=s>>>11,u=t&-257,g=0|f[r>>2],h=2097151&u,i=h<<11,j=2047&g,k=j|i,f[r>>2]=k,f[a>>2]=0|f[x>>2],f[a+4>>2]=0|f[x+4>>2],l=B}function Td(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;return r=l,l=l+16|0,(0|l)>=(0|m)&&X(),p=r+8|0,d=b,e=0|f[c>>2],g=0|f[e>>2],h=g>>>11,i=256&h,j=0!=(0|i),j?(k=d,n=d,o=0|ki(n,54716,6),f[p>>2]=0|f[c>>2],f[p+4>>2]=0|f[c+4>>2],Yi(a,k,p,o),void(l=r)):(Id(a),void(l=r))}function Ud(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;B=l,l=l+48|0,(0|l)>=(0|m)&&X(),y=B+40|0,w=B+32|0,v=B+24|0,z=B,x=B+8|0,d=b,e=d,f[z>>2]=x,0|Lp(e,68900,z),n=d,f[v>>2]=0|f[c>>2],f[v+4>>2]=0|f[c+4>>2],Ed(n,v),o=d,p=d,q=0|ki(p,54716,6),f[w>>2]=0|f[c>>2],f[w+4>>2]=0|f[c+4>>2],f[y>>2]=0|f[x>>2],f[y+4>>2]=0|f[x+4>>2],cj(o,w,q,y),r=0|f[c>>2],s=0|f[r>>2],t=s>>>11,u=256|t,g=0|f[r>>2],h=2097151&u,i=h<<11,j=2047&g,k=j|i,f[r>>2]=k,f[a>>2]=0|f[x>>2],f[a+4>>2]=0|f[x+4>>2],l=B}function Vd(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+48|0,(0|l)>=(0|m)&&X(),i=o+32|0,j=o+24|0,k=o,h=o+8|0,d=b,e=d,f[k>>2]=h,0|Lp(e,68900,k),g=d,f[j>>2]=0|f[c>>2],f[j+4>>2]=0|f[c+4>>2],f[i>>2]=0|f[h>>2],f[i+4>>2]=0|f[h+4>>2],Hd(a,g,j,i),l=o}function Wd(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,C=0;return C=l,l=l+48|0,(0|l)>=(0|m)&&X(),z=C+32|0,A=C,y=C+16|0,d=b,e=d,f[A>>2]=y,0|Lp(e,68900,A),o=0|f[c>>2],p=o+16|0,q=0|f[p>>2],w=q,r=w,s=0!=(0|r),s?(t=d,u=w,f[z>>2]=0|f[y>>2],f[z+4>>2]=0|f[y+4>>2],v=0|rd(t,u,z),x=v,g=x,h=w,i=0|f[h>>2],j=(0|g)!=(0|i),k=1&j,n=255&k,Ld(a,n),void(l=C)):(Xd(a),void(l=C))}function Xd(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=1,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Yd(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Z=0;Z=l,l=l+48|0,(0|l)>=(0|m)&&X(),V=Z+40|0,e=Z+32|0,W=Z,U=Z+16|0,g=b,h=g,f[W>>2]=U,0|Lp(h,68900,W),u=0|f[c>>2],F=u+16|0,M=0|f[F>>2],S=M,N=S,O=0!=(0|N);a:do if(O){for(T=0;;){if(P=T,Q=S,R=0|f[Q>>2],i=(0|P)!=(0|R),!i)break a;if(j=T,k=(j>>>0)/4&-1,n=S,o=n+12|0,p=0|f[o>>2],q=p+k|0,r=0|d[q>>0],s=255&r,t=T,v=(t>>>0)%4&-1,w=54712+v|0,x=0|d[w>>0],y=255&x,z=s&y,A=0!=(0|z),!A&&(B=g,C=T,D=S,E=D+20|0,G=0|f[E>>2],H=G+(12*C|0)|0,f[e>>2]=0|f[H>>2],f[e+4>>2]=0|f[H+4>>2],f[V>>2]=0|f[U>>2],f[V+4>>2]=0|f[U+4>>2],I=0|lf(B,e,V),J=I<<24>>24!=0))break;K=T,L=K+1|0,T=L}return Md(a),void(l=Z)}while(0);Xd(a),l=Z}function Zd(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;R=l,l=l+80|0,(0|l)>=(0|m)&&X(),L=R+64|0,J=R+56|0,I=R+48|0,N=R,H=R+32|0,K=R+24|0,M=R+72|0,g=R+16|0,e=b,Id(g),f[K>>2]=0|f[g>>2],f[K+4>>2]=0|f[g+4>>2],t=e,f[N>>2]=H,O=N+4|0,f[O>>2]=K,P=N+8|0,f[P>>2]=M,0|Lp(t,54803,N),A=e,f[I>>2]=0|f[c>>2],f[I+4>>2]=0|f[c+4>>2],Ed(A,I),B=H+4|0,C=0|f[B>>2],D=0==(0|C),D?(E=0|f[H>>2],F=0!=(0|E),F&&(Q=3)):Q=3;do if(3==(0|Q)){if(G=0|d[M>>0],h=G<<24>>24!=0,!h){n=0|f[c>>2],o=0|f[n>>2],p=o>>>11,q=256|p,r=0|f[n>>2],s=2097151&q,u=s<<11,v=2047&r,w=v|u,f[n>>2]=w,f[K>>2]=0|f[H>>2],f[K+4>>2]=0|f[H+4>>2];break}i=e,j=e,k=0|tp(j,68855),Br(i,k,64829)}while(0);x=e,y=e,z=0|ki(y,54716,6),f[J>>2]=0|f[c>>2],f[J+4>>2]=0|f[c+4>>2],f[L>>2]=0|f[K>>2],f[L+4>>2]=0|f[K+4>>2],cj(x,J,z,L),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=R}function $d(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;return r=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=0|f[c>>2],g=e+16|0,h=0|f[g>>2],p=h,i=p,j=0!=(0|i),j?(k=p,n=k+4|0,o=0|f[n>>2],_d(a,o),void(l=r)):(_d(a,0),void(l=r))}function _d(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=3,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function ae(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,ya=0;ya=l,l=l+160|0,(0|l)>=(0|m)&&X(),ta=ya+144|0,e=ya+136|0,sa=ya+128|0,oa=ya+120|0,la=ya+112|0,na=ya+104|0,ka=ya+96|0,ra=ya+88|0,ja=ya+80|0,qa=ya+72|0,va=ya,ia=ya+48|0,ma=ya+40|0,h=ya+32|0,u=ya+24|0,F=ya+16|0,g=b,Q=0|f[c>>2],aa=Q+16|0,ea=0|f[aa>>2],pa=ea,fa=g,f[qa>>2]=0|f[c>>2],f[qa+4>>2]=0|f[c+4>>2],Ed(fa,qa),ga=pa,ha=0!=(0|ga);a:do if(ha&&(i=pa,j=i+4|0,k=0|f[j>>2],n=k>>>0>0)){for(ua=0;;){if(o=ua,p=pa,q=0|f[p>>2],r=(0|o)!=(0|q),!r)break a;if(s=ua,t=(s>>>0)/4&-1,v=pa,w=v+12|0,x=0|f[w>>2],y=x+t|0,z=0|d[y>>0],A=255&z,B=ua,C=(B>>>0)%4&-1,D=54712+C|0,E=0|d[D>>0],G=255&E,H=A&G,I=0!=(0|H),J=ua,!I)break;T=J+1|0,ua=T}return K=pa,L=K+16|0,M=0|f[L>>2],N=M+(J<<3)|0,f[ia>>2]=0|f[N>>2],f[ia+4>>2]=0|f[N+4>>2],O=g,f[ja>>2]=0|f[ia>>2],f[ja+4>>2]=0|f[ia+4>>2],Rc(O,ja),P=g,f[ra>>2]=0|f[c>>2],f[ra+4>>2]=0|f[c+4>>2],f[ka>>2]=0|f[ia>>2],f[ka+4>>2]=0|f[ia+4>>2],Hd(h,P,ra,ka),f[ma>>2]=0|f[h>>2],f[ma+4>>2]=0|f[h+4>>2],R=g,f[na>>2]=0|f[ma>>2],f[na+4>>2]=0|f[ma+4>>2],Rc(R,na),S=g,f[la>>2]=0|f[ia>>2],f[la+4>>2]=0|f[ia+4>>2],f[oa>>2]=0|f[ma>>2],f[oa+4>>2]=0|f[ma+4>>2],Pn(a,S,la,oa),void(l=ya)}while(0);return U=0|f[c>>2],V=0|f[U>>2],W=V>>>11,Y=256&W,Z=0!=(0|Y),$=g,_=g,Z?(ba=g,ca=0|ki(ba,54716,6),f[sa>>2]=0|f[c>>2],f[sa+4>>2]=0|f[c+4>>2],Yi(u,_,sa,ca),Id(F),d[va>>0]=0|d[c>>0],d[va+1>>0]=0|d[c+1>>0],d[va+2>>0]=0|d[c+2>>0],d[va+3>>0]=0|d[c+3>>0],d[va+4>>0]=0|d[c+4>>0],d[va+5>>0]=0|d[c+5>>0],d[va+6>>0]=0|d[c+6>>0],d[va+7>>0]=0|d[c+7>>0],wa=va+8|0,d[wa>>0]=0|d[F>>0],d[wa+1>>0]=0|d[F+1>>0],d[wa+2>>0]=0|d[F+2>>0],d[wa+3>>0]=0|d[F+3>>0],d[wa+4>>0]=0|d[F+4>>0],d[wa+5>>0]=0|d[F+5>>0],d[wa+6>>0]=0|d[F+6>>0],d[wa+7>>0]=0|d[F+7>>0],f[e>>2]=0|f[u>>2],f[e+4>>2]=0|f[u+4>>2],Yj(a,$,e,69512,2,va),void(l=ya)):(da=0|ki(_,54716,6),f[ta>>2]=0|f[c>>2],f[ta+4>>2]=0|f[c+4>>2],Yi(a,$,ta,da),void(l=ya))}function be(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Da=0;if(Da=l,l=l+64|0,(0|l)>=(0|m)&&X(),g=Da+48|0,e=Da+40|0,i=Da,h=b,v=0|f[c>>2],G=v+16|0,R=0|f[G>>2],xa=R,ba=h,ma=h,ta=ma+56|0,ua=0|f[ta>>2],va=0|Tc(ba,15,ua),za=va,j=h,k=0|od(j),n=za,o=n+16|0,f[o>>2]=k,p=xa,q=p+4|0,r=0|f[q>>2],s=r>>>0>0,!s)return sa=za,Bd(a,sa),void(l=Da);for(t=za,u=t+16|0,w=0|f[u>>2],Aa=w,ya=0;;){if(x=ya,y=xa,z=0|f[y>>2],A=(0|x)!=(0|z),!A)break;B=ya,C=(B>>>0)/4&-1,D=xa,E=D+12|0,F=0|f[E>>2],H=F+C|0,I=0|d[H>>0],J=255&I,K=ya,L=(K>>>0)%4&-1,M=54712+L|0,N=0|d[M>>0],O=255&N,P=J&O,Q=0!=(0|P),Q||(S=h,T=0|Wc(S),wa=T,U=h,V=Aa,W=h,Y=ya,Z=xa,$=Z+16|0,_=0|f[$>>2],aa=_+(Y<<3)|0,f[e>>2]=0|f[aa>>2],f[e+4>>2]=0|f[aa+4>>2],Gd(i,W,e),f[g>>2]=0|f[i>>2],f[g+4>>2]=0|f[i+4>>2],ca=0|vd(U,V,g,0),Ba=ca,da=h,ea=wa,Xc(da,ea),fa=Ba,ga=Aa,ha=ga+20|0,ia=0|f[ha>>2],ja=ia+(12*fa|0)|0,ka=ya,la=xa,na=la+20|0,oa=0|f[na>>2],pa=oa+(12*ka|0)|0,f[ja>>2]=0|f[pa>>2],f[ja+4>>2]=0|f[pa+4>>2],f[ja+8>>2]=0|f[pa+8>>2]),qa=ya,ra=qa+1|0,ya=ra}sa=za,Bd(a,sa),l=Da}function ce(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,ba=0;if(ba=l,l=l+64|0,(0|l)>=(0|m)&&X(),e=ba+56|0,Y=ba+48|0,W=ba+24|0,h=ba+16|0,$=ba,g=b,u=0|f[c>>2],F=u+16|0,Q=0|f[F>>2],Z=Q,R=Z,S=0!=(0|R),T=g,!S)return Mn(a,T),void(l=ba);for(U=Z,V=U+4|0,i=0|f[V>>2],Jn(h,T,i),f[W>>2]=0|f[h>>2],f[W+4>>2]=0|f[h+4>>2],_=0;;){if(j=_,k=Z,n=0|f[k>>2],o=(0|j)!=(0|n),!o)break;p=_,q=(p>>>0)/4&-1,r=Z,s=r+12|0,t=0|f[s>>2],v=t+q|0,w=0|d[v>>0],x=255&w,y=_,z=(y>>>0)%4&-1,A=54712+z|0,B=0|d[A>>0],C=255&B,D=x&C,E=0!=(0|D),E||(G=_,H=Z,I=H+20|0,J=0|f[I>>2],K=J+(12*G|0)|0,f[$>>2]=0|f[K>>2],f[$+4>>2]=0|f[K+4>>2],f[$+8>>2]=0|f[K+8>>2],L=g,M=$+8|0,N=0|f[M>>2],f[Y>>2]=0|f[W>>2],f[Y+4>>2]=0|f[W+4>>2],f[e>>2]=0|f[$>>2],f[e+4>>2]=0|f[$+4>>2],go(L,Y,N,e)),O=_,P=O+1|0,_=P}f[a>>2]=0|f[W>>2],f[a+4>>2]=0|f[W+4>>2],l=ba}function de(a,b,c){a|=0,b|=0,c|=0;var d=0,g=0;g=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=g}function ee(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,s=0;switch(s=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,g=b+4|0,h=0|f[g>>2],0|h){case 3:return i=0|f[b>>2],k=+(0|i),c=k,e=c,l=s,+e;case 6:return q=+j[b>>2],c=q,e=c,l=s,+e;default:n=d,o=d,p=0|tp(o,68905),Br(n,p,54838)}return 0}function fe(a,b,c){a|=0,b|=0,c=+c;var d=0,e=0,g=0,h=0,i=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),i=n,d=b,e=c,g=i+4|0,f[g>>2]=6,h=e,j[i>>2]=h,f[a>>2]=0|f[i>>2],f[a+4>>2]=0|f[i+4>>2],l=n}function ge(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0;return qa=l,l=l+32|0,(0|l)>=(0|m)&&X(),oa=qa+16|0,i=b,j=0|f[c>>2],fa=j,w=d+4|0,H=0|f[w>>2],(S=3==(0|H))?(aa=fa,(ba=0==(0|aa))?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=qa)):(ca=0|f[d>>2],ga=ca,da=fa,ea=(0|da)<32768,k=fa,n=(0|k)>=-32768,ia=ea&n,o=ga,p=(0|o)<32768,la=ia&p,q=ga,r=(0|q)>=-32768,ma=la&r,s=fa,t=ga,u=0|U(s,t),ma?(he(a,u),void(l=qa)):(v=+(0|u),ha=v,x=fa,y=0!=(0|x),z=ha,y?(A=fa,B=+(0|A),C=z/B,D=ga,E=+(0|D),F=C==E,G=ha,I=G<=2147483648,na=F&I,J=ha,K=J>=-2147483648,ja=na&K,pa=ja?10:9):(e=z<=2147483648,g=ha,h=g>=-2147483648,ka=e&h,pa=ka?10:9),9==(0|pa)?(L=i,M=fa,N=+(0|M),O=ga,P=+(0|O),Q=N*P,fe(a,L,Q),void(l=qa)):10==(0|pa)?(R=ha,T=~~R,he(a,T),void(l=qa)):void 0))):(V=i,W=fa,Y=+(0|W),Z=i,f[oa>>2]=0|f[d>>2],f[oa+4>>2]=0|f[d+4>>2],$=+ee(Z,oa),_=Y*$,fe(a,V,_),void(l=qa))}function he(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=3,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function ie(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,M=0;return M=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=c+4|0,t=0|f[e>>2],C=6==(0|t),C||(D=d,E=d,F=0|tp(E,68905),Br(D,F,54838)),G=+j[c>>2],J=G,H=J,I=0|je(H),g=2147483647&I,h=2139095040==(0|g),h&&(i=d,k=d,n=0|tp(k,54854),o=J,p=o<0,q=p?54871:54881,Br(i,n,q)),r=J,s=0|je(r),u=2147483647&s,(v=u>>>0>2139095040)?(w=d,x=d,y=0|tp(x,54854),Br(w,y,54890),void 0):(z=J,A=~~z,K=A,B=K,he(a,B),void(l=M))}function je(a){a=+a;var b=0,c=0,d=0,e=0,h=0;return h=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=h,b=a,c=b,j[e>>2]=c,d=0|f[e>>2],l=h,0|d}function ke(a){a=+a;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),n=p,b=a,c=b,k[n>>3]=c,d=n,e=d,g=0|f[e>>2],h=d+4|0,i=h,j=0|f[i>>2],F=j,l=p,0|g}function le(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,L=0;return L=l,l=l+32|0,(0|l)>=(0|m)&&X(),J=L+16|0,I=L,e=b,g=0|f[c>>2],G=g,t=d+4|0,z=0|f[t>>2],(A=3==(0|z))?(B=G,(C=0==(0|B))?(f[a>>2]=0|f[d>>2],f[a+4>>2]=0|f[d+4>>2],void(l=L)):(D=0|f[d>>2],H=D,E=G,F=H,h=0|me(E,F,I),i=h<<24>>24!=0,i?(j=e,k=G,n=+(0|k),o=H,p=+(0|o),q=n+p,fe(a,j,q),void(l=L)):(r=0|f[I>>2],he(a,r),void(l=L)))):(s=e,u=G,v=+(0|u),w=e,f[J>>2]=0|f[d>>2],f[J+4>>2]=0|f[d+4>>2],x=+ee(w,J),y=v+x,fe(a,s,y),void(l=L))}function me(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0;return G=l,l=l+32|0,(0|l)>=(0|m)&&X(),n=a,o=b,u=c,v=n,w=o,d=v+w|0,j=v+-2147483648|0,h=v+2147483647|0,i=(0|d)<(0|j),g=(0|d)>(0|h),e=(0|v)>=0,k=e?i:g,E=d,x=E,y=(0|x)>2147483647,D=k|y,D?p=1:(z=E,A=(0|z)<-2147483648,p=A),B=1&p,q=255&B,C=q,r=E,s=u,f[s>>2]=r,t=C,l=G,0|t}function ne(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0;return J=l,l=l+32|0,(0|l)>=(0|m)&&X(),H=J+16|0,G=J,e=b,g=0|f[c>>2],E=g,t=d+4|0,x=0|f[t>>2],(y=3==(0|x))?(z=0|f[d>>2],F=z,A=E,B=F,C=0|oe(A,B,G),D=C<<24>>24!=0,D?(h=e,i=E,j=+(0|i),k=F,n=+(0|k),o=j-n,fe(a,h,o),void(l=J)):(p=0|f[G>>2],he(a,p),void(l=J))):(q=e,r=E,s=+(0|r),u=e,f[H>>2]=0|f[d>>2],f[H+4>>2]=0|f[d+4>>2],v=+ee(u,H),w=s-v,fe(a,q,w),void(l=J))}function oe(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0;return G=l,l=l+32|0,(0|l)>=(0|m)&&X(),n=a,o=b,u=c,v=n,w=o,d=v-w|0,j=v+-2147483647|0,h=v+-2147483648|0,i=(0|d)<(0|j),g=(0|d)>(0|h),e=(0|v)>=0,k=e?i:g,E=d,x=E,y=(0|x)>2147483647,D=k|y,D?p=1:(z=E,A=(0|z)<-2147483648,p=A),B=1&p,q=255&B,C=q,r=E,s=u,f[s>>2]=r,t=C,l=G,0|t}function pe(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,ma=0;ma=l,l=l+80|0,(0|l)>=(0|m)&&X(),ka=ma,ha=ma+32|0,u=ma+8|0,g=b,h=e,F=ha+33|0,ga=F,Q=0|f[c>>2],ja=Q,aa=h,ca=(0|aa)<2,da=h,ea=36<(0|da),ia=ca|ea,ia&&(fa=g,i=g,j=0|tp(i,68855),k=h,he(u,k),d[ka>>0]=0|d[u>>0],d[ka+1>>0]=0|d[u+1>>0],d[ka+2>>0]=0|d[u+2>>0],d[ka+3>>0]=0|d[u+3>>0],d[ka+4>>0]=0|d[u+4>>0],d[ka+5>>0]=0|d[u+5>>0],d[ka+6>>0]=0|d[u+6>>0],d[ka+7>>0]=0|d[u+7>>0],Er(fa,j,54894,ka)),n=ja,o=0==(0|n);a:do if(o)p=ga,q=p+-1|0,ga=q,d[q>>0]=48;else{if(r=ja,s=(0|r)<0,!s)for(;;)if(J=ja,K=h,L=(0|J)%(0|K)&-1,M=55345+L|0,N=0|d[M>>0],O=ga,P=O+-1|0,ga=P,d[P>>0]=N,R=h,S=ja,T=(0|S)/(0|R)&-1,ja=T,U=0!=(0|T),!U)break a;for(;;)if(t=ja,v=h,w=(0|t)%(0|v)&-1,x=0-w|0,y=55345+x|0,z=0|d[y>>0],A=ga,B=A+-1|0,ga=B,d[B>>0]=z,C=h,D=ja,E=(0|D)/(0|C)&-1,ja=E,G=0!=(0|E),!G)break;H=ga,I=H+-1|0,ga=I,d[I>>0]=45}while(0);V=g,W=ga,Y=ha+33|0,Z=ga,$=Y,_=Z,ba=$-_|0,ng(a,V,W,ba),l=ma}function qe(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,vb=0;vb=l,l=l+64|0,(0|l)>=(0|m)&&X(),c=vb+48|0,b=vb+40|0,e=vb+8|0,J=vb,d=a,U=d,ea=d,pa=ea+32|0,Aa=0|f[pa>>2],La=0|Dp(U,54911,Aa),tb=La,Wa=d,fb=tb,Jp(Wa,fb,57087,35,262144),g=d,t=tb,Jp(g,t,59628,36,262144),B=d,C=tb,Jp(B,C,54921,36,262144),D=d,E=tb,Jp(D,E,68851,37,262144),F=d,G=tb,H=0|Dp(F,55060,G),sb=H,I=d,K=sb,nq(I,K,67683),L=d,M=sb,Jp(L,M,56116,38,0),N=d,O=sb,Jp(N,O,55221,38,0),P=d,Q=sb,R=0|Dp(P,55129,Q),qb=R,S=d,T=S+64|0,f[T>>2]=R,V=d,W=qb,Jp(V,W,64315,39,262144),Y=d,Z=qb,Jp(Y,Z,69609,40,262144),$=d,_=qb,Jp($,_,68114,41,262144),aa=d,ba=qb,Jp(aa,ba,59630,42,262144),ca=d,da=qb,Jp(ca,da,68902,43,262144),fa=d,ga=qb,Jp(fa,ga,59638,44,0),ha=d,ia=qb,Jp(ha,ia,68778,45,262144),ja=d,ka=qb,Jp(ja,ka,59632,46,262144),la=d,ma=qb,Jp(la,ma,59634,47,262144),na=d,oa=qb,Jp(na,oa,64339,48,262144),qa=d,ra=qb,Jp(qa,ra,57205,49,262144),sa=d,ta=qb,Jp(sa,ta,68994,50,262144),ua=d,va=qb,Jp(ua,va,68178,51,0),wa=d,xa=qb,Jp(wa,xa,56111,52,0),ya=d,za=qb,Jp(ya,za,68977,53,0),Ba=d,Ca=qb,Jp(Ba,Ca,68986,53,0),Da=d,Ea=qb,Jp(Da,Ea,54958,54,262144),Fa=d,Ga=tb,Ha=0|Dp(Fa,55150,Ga),rb=Ha,Ia=d,Ja=Ia+60|0,f[Ja>>2]=Ha,Ka=d,Ma=rb,nq(Ka,Ma,67683),Na=d,Oa=rb,Jp(Na,Oa,64315,55,262144),Pa=d,Qa=rb,Jp(Pa,Qa,69609,56,262144),Ra=d,Sa=rb,Jp(Ra,Sa,68114,57,262144),Ta=d,Ua=rb,Jp(Ta,Ua,59630,58,262144),Va=d,Xa=rb,Jp(Va,Xa,68902,59,262144),Ya=d,Za=rb,Jp(Ya,Za,54965,60,0),$a=d,_a=rb,Jp($a,_a,54970,61,0),ab=d,bb=rb,Jp(ab,bb,54978,62,0),cb=d,db=rb,Jp(cb,db,54984,63,0),eb=d,gb=rb,Jp(eb,gb,54994,64,8192),hb=d,ib=rb,Jp(hb,ib,56111,65,0),jb=d,kb=rb,Jp(jb,kb,56116,66,0),lb=d,mb=rb,Jp(lb,mb,55221,66,0),nb=d,ob=rb,Jp(nb,ob,55e3,66,0),pb=d,h=rb,Jp(pb,h,54958,67,262144),i=d,j=rb,Jp(i,j,68994,68,262144),k=d,n=rb,Jp(k,n,68977,69,0),o=d,p=rb,Jp(o,p,68986,69,0),q=d,r=rb,Jp(q,r,55014,70,0),s=d,w=rb,x=d,fe(e,x,v),f[b>>2]=0|f[e>>2],f[b+4>>2]=0|f[e+4>>2],Kj(s,w,55019,b),y=d,z=rb,A=d,fe(J,A,u),f[c>>2]=0|f[J>>2],f[c+4>>2]=0|f[J+4>>2],Kj(y,z,72372,c),l=vb}function re(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,$=0;$=l,l=l+48|0,(0|l)>=(0|m)&&X(),U=$+40|0,W=$+32|0,T=$,V=$+16|0,d=b,e=d,f[T>>2]=V,0|Lp(e,68900,T),s=d,f[W>>2]=0|f[V>>2],f[W+4>>2]=0|f[V+4>>2],D=+ee(s,W),Y=D,I=d,f[U>>2]=0|f[c>>2],f[U+4>>2]=0|f[c+4>>2],K=+ee(I,U),L=K,M=Y,N=M,O=+J(+L,+N),g=O,P=g,h=c+4|0,i=0|f[h>>2],j=3==(0|i);do if(j&&(k=V+4|0,n=0|f[k>>2],o=3==(0|n),p=P,q=p<=2147483648,Q=o&q,r=P,t=r>=-2147483648,R=Q&t,u=Y,v=u>0,S=R&v)){if(w=P,x=w<0,!x){if(y=P,z=y>0,!z)break;if(A=P,B=~~A,C=(0|B)>0,!C)break}return E=P,F=~~E,he(a,F),void(l=$)}while(0);G=d,H=P,fe(a,G,H),l=$}function se(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,s=0;s=l,l=l+32|0,(0|l)>=(0|m)&&X(),p=s+16|0,o=s,q=s+4|0,d=b,e=d,f[o>>2]=q,0|Lp(e,54919,o),g=d,h=d,f[p>>2]=0|f[c>>2],f[p+4>>2]=0|f[c+4>>2],i=+ee(h,p),k=+j[q>>2],n=i/k,fe(a,g,n),l=s}function te(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,C=0;switch(C=l,l=l+48|0,(0|l)>=(0|m)&&X(),x=C+32|0,y=C,w=C+16|0,d=b,e=d,f[y>>2]=w,0|Lp(e,68900,y),o=d,f[x>>2]=0|f[c>>2],f[x+4>>2]=0|f[c+4>>2],p=+ee(o,x),z=p,q=w+4|0,r=0|f[q>>2],0|r){case 3:s=0|f[w>>2],t=+(0|s),A=t;break;case 6:u=+j[w>>2],A=u;break;default:return ue(a),void(l=C)}return v=z,g=A,(h=v>g)?(he(a,1),void(l=C)):(i=z,k=A,n=i<k,n?(he(a,-1),void(l=C)):(he(a,0),void(l=C)))}function ue(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function ve(a,b,c){a|=0,b|=0,c|=0;var d=0,g=0;g=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=g}function we(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+48|0,(0|l)>=(0|m)&&X(),i=o+32|0,j=o+24|0,k=o,h=o+8|0,d=b,e=d,f[k>>2]=h,0|Lp(e,68900,k),g=d,f[j>>2]=0|f[c>>2],f[j+4>>2]=0|f[c+4>>2],f[i>>2]=0|f[h>>2],f[i+4>>2]=0|f[h+4>>2],le(a,g,j,i),l=o}function xe(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+48|0,(0|l)>=(0|m)&&X(),i=o+32|0,j=o+24|0,k=o,h=o+8|0,d=b,e=d,f[k>>2]=h,0|Lp(e,68900,k),g=d,f[j>>2]=0|f[c>>2],f[j+4>>2]=0|f[c+4>>2],f[i>>2]=0|f[h>>2],f[i+4>>2]=0|f[h+4>>2],ne(a,g,j,i),l=o}function ye(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+48|0,(0|l)>=(0|m)&&X(),k=o+32|0,i=o+24|0,h=o,j=o+8|0,d=b,e=d,f[h>>2]=j,0|Lp(e,68900,h),g=d,f[i>>2]=0|f[c>>2],f[i+4>>2]=0|f[c+4>>2],f[k>>2]=0|f[j>>2],f[k+4>>2]=0|f[j+4>>2],ge(a,g,i,k),l=o}function ze(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0;return J=l,l=l+48|0,(0|l)>=(0|m)&&X(),H=J+40|0,F=J,G=J+24|0,D=J+8|0,E=J+4|0,d=b,e=d,f[F>>2]=G,0|Lp(e,68900,F),s=0|f[c>>2],B=s,t=G+4|0,v=0|f[t>>2],(w=3==(0|v))?(x=0|f[G>>2],C=x,y=0==(0|x),z=d,y?(fe(a,z,u),void(l=J)):(A=B,g=C,Ae(z,A,g,0,D),h=0|f[D>>2],he(a,h),void(l=J))):(i=d,k=B,n=+(0|k),o=d,f[H>>2]=0|f[G>>2],f[H+4>>2]=0|f[G+4>>2],p=+ee(o,H),Be(i,n,p,0,E),q=d,r=+j[E>>2],fe(a,q,r),void(l=J))}function Ae(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0;la=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=a,h=b,u=c,F=d,Q=e,ba=u,ca=(0|ba)<0,da=h,ea=(0|da)<0,fa=h;do{if(ca){if(ea){i=0-fa|0,j=u,k=0-j|0,n=(0|i)/(0|k)&-1,ga=n;break}o=u,p=0-o|0,q=(0|fa)/(0|p)&-1,r=0-q|0,ga=r;break}if(ea){s=0-fa|0,t=u,v=(0|s)/(0|t)&-1,w=0-v|0,ga=w;break}x=u,y=(0|fa)/(0|x)&-1,ga=y;break}while(0);return z=h,A=ga,B=u,C=0|U(A,B),D=z-C|0,ha=D,E=ha,G=(0|E)<0,H=u,I=(0|H)>0,ia=G&I,ia?ka=10:(J=ha,K=(0|J)>0,L=u,M=(0|L)<0,ja=K&M,ja&&(ka=10)),10==(0|ka)&&(N=u,O=ha,P=O+N|0,ha=P,R=ga,S=R-1|0,ga=S),T=F,V=0!=(0|T),V&&(W=ga,Y=F,f[Y>>2]=W),Z=Q,($=0!=(0|Z))?(_=ha,aa=Q,f[aa>>2]=_,void(l=la)):void(l=la)}function Be(a,b,c,d,e){a|=0,b=+b,c=+c,d|=0,e|=0;var f=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0;return ea=l,l=l+32|0,(0|l)>=(0|m)&&X(),f=a,g=b,w=c,H=d,S=e,Y=w,Z=Y,$=0==Z,$?(ba=v,ca=u):(_=g,aa=w,h=+Lv(_,aa),ca=h,i=g,k=0|je(i),n=2147483647&k,o=2139095040==(0|n),o?(p=w,q=0|je(p),r=2147483647&q,s=r>>>0<2139095040,s?(t=g,ba=t):da=6):da=6,6==(0|da)&&(x=g,y=ca,z=x-y,A=w,B=z/A,ba=B),C=w,D=ca,E=C*D,F=E<0,F&&(G=w,I=ca,J=I+G,ca=J,K=ba,L=K,M=L-1,N=M,ba=N)),O=S,P=0!=(0|O),P&&(Q=ca,R=S,j[R>>2]=Q),T=H,(U=0!=(0|T))?(V=ba,W=H,j[W>>2]=V,void(l=ea)):void(l=ea)}function Ce(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,z=0;switch(z=l,l=l+32|0,(0|l)>=(0|m)&&X(),w=z,x=z+8|0,d=b,e=d,f[w>>2]=x,0|Lp(e,68900,w),o=x+4|0,p=0|f[o>>2],0|p){case 3:return q=0|f[c>>2],r=0|f[x>>2],s=(0|q)==(0|r),t=1&s,u=255&t,De(a,u),void(l=z);case 6:return v=0|f[c>>2],g=+(0|v),h=+j[x>>2],i=g==h,k=1&i,n=255&k,De(a,n),void(l=z);default:return Ee(a),void(l=z)}}function De(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=255&d,g=0!=(0|e),h=g?2:0,i=j+4|0,f[i>>2]=h,f[j>>2]=1,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function Ee(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=1,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Fe(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0;k=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=0|f[c>>2],i=e,g=i,h=g^-1,he(a,h),l=k}function Ge(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;r=l,l=l+48|0,(0|l)>=(0|m)&&X(),p=r+32|0,n=r,o=r+16|0,e=r+8|0,d=b,g=d,f[n>>2]=o,0|Lp(g,68900,n),h=d,f[p>>2]=0|f[o>>2],f[p+4>>2]=0|f[o+4>>2],He(e,h,p),f[o>>2]=0|f[e>>2],f[o+4>>2]=0|f[e+4>>2],i=0|f[c>>2],j=0|f[o>>2],k=i&j,he(a,k),l=r}function He(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;for(u=l,l=l+32|0,(0|l)>=(0|m)&&X(),s=u+16|0,e=u,d=b;;){if(i=c+4|0,j=0|f[i>>2],k=3==(0|j),n=1^k,!n){t=6;break}if(o=c+4|0,p=0|f[o>>2],q=6==(0|p),r=d,q){t=4;break}f[s>>2]=0|f[c>>2],f[s+4>>2]=0|f[c+4>>2],Mf(e,r,s),f[c>>2]=0|f[e>>2],f[c+4>>2]=0|f[e+4>>2]}if(4==(0|t))g=d,h=0|tp(g,68905),Br(r,h,54925);else if(6==(0|t))return f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=u)}function Ie(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;r=l,l=l+48|0,(0|l)>=(0|m)&&X(),p=r+32|0,n=r,o=r+16|0,e=r+8|0,d=b,g=d,f[n>>2]=o,0|Lp(g,68900,n),h=d,f[p>>2]=0|f[o>>2],f[p+4>>2]=0|f[o+4>>2],He(e,h,p),f[o>>2]=0|f[e>>2],f[o+4>>2]=0|f[e+4>>2],i=0|f[c>>2],j=0|f[o>>2],k=i|j,he(a,k),l=r}function Je(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;r=l,l=l+48|0,(0|l)>=(0|m)&&X(),p=r+32|0,n=r,o=r+16|0,e=r+8|0,d=b,g=d,f[n>>2]=o,0|Lp(g,68900,n),h=d,f[p>>2]=0|f[o>>2],f[p+4>>2]=0|f[o+4>>2],He(e,h,p),f[o>>2]=0|f[e>>2],f[o+4>>2]=0|f[e+4>>2],i=0|f[c>>2],j=0|f[o>>2],k=i^j,he(a,k),l=r}function Ke(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;return w=l,l=l+16|0,(0|l)>=(0|m)&&X(),u=w+4|0,d=b,e=d,Le(e,u),j=0|f[u>>2],(k=0==(0|j))?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=w)):(n=0|f[c>>2],t=n,o=0|f[u>>2],p=(0|o)<0,p?(q=t,r=0|f[u>>2],s=0-r|0,Me(a,q,s),void(l=w)):(g=d,h=t,i=0|f[u>>2],Ne(a,g,h,i),void(l=w)))}function Le(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;q=l,l=l+48|0,(0|l)>=(0|m)&&X(),o=q+32|0,k=q,n=q+16|0,e=q+8|0,c=a,d=b,g=c,f[k>>2]=n,0|Lp(g,68900,k),h=c,f[o>>2]=0|f[n>>2],f[o+4>>2]=0|f[n+4>>2],He(e,h,o),i=0|f[e>>2],j=d,f[j>>2]=i,l=q}function Me(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,o=0;return o=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=c,f=e,g=(0|f)>=31,h=d,g?(i=(0|h)<0,i?(he(a,-1),void(l=o)):(he(a,0),void(l=o))):(j=e,k=h>>j,he(a,k),void(l=o))}function Ne(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0;if(y=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=b,f=c,o=d,p=o,q=(0|p)>31,r=f,!q)return k=o,n=r<<k,he(a,n),void(l=y);for(s=+(0|r),w=s;;){if(t=o,u=t+-1|0,o=u,v=0!=(0|t),!v)break;g=w,h=2*g,w=h}i=e,j=w,fe(a,i,j),l=y}function Oe(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;return w=l,l=l+16|0,(0|l)>=(0|m)&&X(),u=w+4|0,d=b,e=d,Le(e,u),j=0|f[u>>2],(k=0==(0|j))?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=w)):(n=0|f[c>>2],t=n,o=0|f[u>>2],p=(0|o)<0,p?(q=d,r=t,s=0|f[u>>2],g=0-s|0,Ne(a,q,r,g),void(l=w)):(h=t,i=0|f[u>>2],Me(a,h,i),void(l=w)))}function Pe(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;return t=l,l=l+32|0,(0|l)>=(0|m)&&X(),q=t,r=t+8|0,d=b,e=d,f[q>>2]=r,0|Lp(e,68900,q),g=r+4|0,h=0|f[g>>2],i=3==(0|h),i?(j=0|f[c>>2],k=0|f[r>>2],n=(0|j)==(0|k),o=1&n,p=255&o,De(a,p),void(l=t)):(Ee(a),void(l=t))}function Qe(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,I=0;for(I=l,l=l+32|0,(0|l)>=(0|m)&&X(),E=I+12|0,e=b,g=0|f[c>>2],u=+(0|g),j[E>>2]=u,w=+j[E>>2],x=0==w,x&&(j[E>>2]=0),D=E,F=0,G=0;;){if(y=G,z=y>>>0<4,A=F,!z)break;B=971*A|0,C=G,h=D,i=h+C|0,k=0|d[i>>0],n=255&k,o=B^n,F=o,p=G,q=p+1|0,G=q}return(r=(0|A)<0)?(s=F,t=0-s|0,F=t,v=F,he(a,v),void(l=I)):(v=F,he(a,v),void(l=I))}function Re(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,j=0;j=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=d,g=0|f[c>>2],h=+(0|g),fe(a,e,h),l=j}function Se(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+32|0,(0|l)>=(0|m)&&X(),j=o+16|0,k=o,i=o+4|0,d=b,f[i>>2]=10,e=d,f[k>>2]=i,0|Lp(e,64388,k),g=d,h=0|f[i>>2],f[j>>2]=0|f[c>>2],f[j+4>>2]=0|f[c+4>>2],pe(a,g,j,h),l=o}function Te(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,fa=0;return fa=l,l=l+160|0,(0|l)>=(0|m)&&X(),Y=fa+152|0,V=fa+144|0,da=fa+136|0,h=fa+128|0,g=fa+120|0,e=fa+112|0,d=fa+104|0,ba=fa,ca=fa+88|0,Z=fa+84|0,_=fa+80|0,k=fa+72|0,z=fa+64|0,K=fa+56|0,O=fa+48|0,$=fa+44|0,aa=fa+40|0,U=fa+32|0,W=fa+24|0,P=fa+16|0,Q=fa+8|0,i=b,R=i,f[ba>>2]=ca,0|Lp(R,68900,ba),S=ca+4|0,T=0|f[S>>2],(n=3==(0|T))?(o=0|f[ca>>2],p=0==(0|o),q=i,p?(r=i,fe(k,r,v),s=i,fe(z,s,u),f[d>>2]=0|f[k>>2],f[d+4>>2]=0|f[k+4>>2],f[e>>2]=0|f[z>>2],f[e+4>>2]=0|f[z+4>>2],Pn(a,q,d,e),void(l=fa)):(t=0|f[c>>2],w=0|f[ca>>2],Ae(q,t,w,Z,_),x=i,y=0|f[Z>>2],he(K,y),A=0|f[_>>2],he(O,A),f[g>>2]=0|f[K>>2],f[g+4>>2]=0|f[K+4>>2],f[h>>2]=0|f[O>>2],f[h+4>>2]=0|f[O+4>>2],Pn(a,x,g,h),void(l=fa))):(B=i,C=0|f[c>>2],D=+(0|C),E=i,f[da>>2]=0|f[ca>>2],f[da+4>>2]=0|f[ca+4>>2],F=+ee(E,da),Be(B,D,F,$,aa),G=i,H=+j[$>>2],I=~~H,J=+(0|I),fe(P,G,J),f[U>>2]=0|f[P>>2],f[U+4>>2]=0|f[P+4>>2],L=i,M=+j[aa>>2],fe(Q,L,M),f[W>>2]=0|f[Q>>2],f[W+4>>2]=0|f[Q+4>>2],N=i,f[V>>2]=0|f[U>>2],f[V+4>>2]=0|f[U+4>>2],f[Y>>2]=0|f[W>>2],f[Y+4>>2]=0|f[W+4>>2],Pn(a,N,V,Y),void(l=fa))}function Ue(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,s=0;s=l,l=l+32|0,(0|l)>=(0|m)&&X(),q=s+24|0,o=s,p=s+8|0,d=b,e=d,f[o>>2]=p,0|Lp(e,68900,o),g=d,h=+j[c>>2],i=d,f[q>>2]=0|f[p>>2],f[q+4>>2]=0|f[p+4>>2],k=+ee(i,q),n=h+k,fe(a,g,n),l=s}function Ve(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,s=0;s=l,l=l+32|0,(0|l)>=(0|m)&&X(),q=s+24|0,o=s,p=s+8|0,d=b,e=d,f[o>>2]=p,0|Lp(e,68900,o),g=d,h=+j[c>>2],i=d,f[q>>2]=0|f[p>>2],f[q+4>>2]=0|f[p+4>>2],k=+ee(i,q),n=h-k,fe(a,g,n),l=s}function We(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,s=0;s=l,l=l+32|0,(0|l)>=(0|m)&&X(),q=s+24|0,o=s,p=s+8|0,d=b,e=d,f[o>>2]=p,0|Lp(e,68900,o),g=d,h=+j[c>>2],i=d,f[q>>2]=0|f[p>>2],f[q+4>>2]=0|f[p+4>>2],k=+ee(i,q),n=h*k,fe(a,g,n),l=s}function Xe(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;u=l,l=l+32|0,(0|l)>=(0|m)&&X(),s=u+24|0,q=u,r=u+8|0,p=u+4|0,d=b,e=d,f[q>>2]=r,0|Lp(e,68900,q),g=d,h=+j[c>>2],i=d,f[s>>2]=0|f[r>>2],f[s+4>>2]=0|f[r+4>>2],k=+ee(i,s),Be(g,h,k,0,p),n=d,o=+j[p>>2],fe(a,n,o),l=u}function Ye(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,z=0;switch(z=l,l=l+32|0,(0|l)>=(0|m)&&X(),w=z,x=z+8|0,d=b,e=d,f[w>>2]=x,0|Lp(e,68900,w),o=x+4|0,p=0|f[o>>2],0|p){case 3:return q=+j[c>>2],r=0|f[x>>2],s=+(0|r),t=q==s,u=1&t,v=255&u,De(a,v),void(l=z);case 6:return g=+j[c>>2],h=+j[x>>2],i=g==h,k=1&i,n=255&k,De(a,n),
+void(l=z);default:return Ee(a),void(l=z)}}function Ze(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=+j[c>>2],g=+T(+e),r=g,h=r,i=h<=2147483648,k=r,n=k>=-2147483648,s=i&n,s?(q=r,f=~~q,he(a,f),void(l=u)):(o=d,p=r,fe(a,o,p),void(l=u))}function $e(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,k=0,o=0;o=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=+j[c>>2],f=0|je(e),g=2147483647&f,h=g>>>0<2139095040,i=1&h,k=255&i,De(a,k),l=o}function _e(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=+j[c>>2],g=+G(+e),r=g,h=r,i=h<=2147483648,k=r,n=k>=-2147483648,s=i&n,s?(q=r,f=~~q,he(a,f),void(l=u)):(o=d,p=r,fe(a,o,p),void(l=u))}function af(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,r=0;return r=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=+j[c>>2],p=e,f=p,g=0|je(f),h=2147483647&g,i=2139095040==(0|h),i?(k=p,n=k<0,o=n?-1:1,he(a,o),void(l=r)):(ue(a),void(l=r))}function bf(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,nb=0;if(nb=l,l=l+48|0,(0|l)>=(0|m)&&X(),lb=nb+24|0,jb=nb+32|0,d=b,f[jb>>2]=0,e=d,f[lb>>2]=jb,0|Lp(e,64388,lb),w=+j[c>>2],J=w,kb=J,V=kb,fa=0|ke(V),qa=F,Ba=2147483647&qa,Ma=0==(0|fa),Xa=2146435072==(0|Ba),g=Ma&Xa)return n=0|f[jb>>2],o=0<(0|n),o||(p=d,q=d,r=0|tp(q,54854),s=kb,t=s<0,u=t?54871:54881,Br(p,r,u)),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=nb);if(v=kb,x=0|ke(v),y=F,z=2147483647&y,A=z>>>0>2146435072,B=x>>>0>0,C=2146435072==(0|z),D=C&B,E=A|D)return H=0|f[jb>>2],I=0<(0|H),I||(K=d,L=d,M=0|tp(L,54854),Br(K,M,54890)),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=nb);for(hb=1,N=0|f[jb>>2],O=(0|N)>=0,P=0|f[jb>>2],Q=0-P|0,R=O?P:Q,ib=R;;){if(S=ib,U=S+-1|0,ib=U,W=(0|U)>=0,Y=hb,!W)break;Z=10*Y,hb=Z}$=0|ke(Y),_=F,aa=2147483647&_,ba=0==(0|$),ca=2146435072==(0|aa),da=ba&ca,ea=0|f[jb>>2],ga=(0|ea)<0;do{if(!da){if(ha=hb,ia=kb,ga?(ja=ia/ha,kb=ja):(ka=ia*ha,kb=ka),la=kb,ma=la>0,na=kb,ma?(oa=na,pa=+G(+oa),ra=pa,gb=ra,sa=gb,ta=kb,ua=gb,va=ta-ua,wa=va>=.5,xa=1&wa,ya=+(0|xa),za=sa+ya,kb=za):(Aa=na<0,Aa&&(Ca=kb,Da=Ca,Ea=+T(+Da),Fa=Ea,gb=Fa,Ga=gb,Ha=gb,Ia=kb,Ja=Ha-Ia,Ka=Ja>=.5,La=1&Ka,Na=+(0|La),Oa=Ga-Na,kb=Oa)),Pa=0|f[jb>>2],Qa=(0|Pa)<0,Ra=hb,Sa=kb,Qa){Ta=Sa*Ra,kb=Ta;break}Ua=Sa/Ra,kb=Ua;break}ga&&(kb=0)}while(0);return Va=0|f[jb>>2],Wa=(0|Va)>0,Ya=kb,Wa?(Za=0|ke(Ya),$a=F,_a=2147483647&$a,ab=_a>>>0<2146435072,bb=Za>>>0<0,cb=2146435072==(0|_a),db=cb&bb,eb=ab|db,eb?(fb=d,h=kb,i=h,fe(a,fb,i),void(l=nb)):(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=nb))):(k=~~Ya,he(a,k),void(l=nb))}function cf(a,b,c){a|=0,b|=0,c|=0;var d=0,g=0;g=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=g}function df(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0;return D=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=+j[c>>2],A=e,s=A,t=s,u=t>0,u&&(v=A,w=+G(+v),A=w),x=A,y=x,z=y<0,z&&(f=A,g=+T(+f),A=g),h=A,i=h<=2147483648,k=A,n=k>=-2147483648,B=i&n,B?(q=A,r=~~q,he(a,r),void(l=D)):(o=d,p=A,fe(a,o,p),void(l=D))}function ef(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0;G=l,l=l+96|0,(0|l)>=(0|m)&&X(),z=G+80|0,x=G+72|0,E=G+64|0,C=G,D=G+48|0,A=G+44|0,B=G+40|0,w=G+32|0,y=G+24|0,e=G+16|0,o=G+8|0,d=b,p=d,f[C>>2]=D,0|Lp(p,68900,C),q=d,r=+j[c>>2],s=d,f[E>>2]=0|f[D>>2],f[E+4>>2]=0|f[D+4>>2],t=+ee(s,E),Be(q,r,t,A,B),u=d,v=+j[A>>2],g=~~v,h=+(0|g),fe(e,u,h),f[w>>2]=0|f[e>>2],f[w+4>>2]=0|f[e+4>>2],i=d,k=+j[B>>2],fe(o,i,k),f[y>>2]=0|f[o>>2],f[y+4>>2]=0|f[o+4>>2],n=d,f[x>>2]=0|f[w>>2],f[x+4>>2]=0|f[w+4>>2],f[z>>2]=0|f[y>>2],f[z+4>>2]=0|f[y+4>>2],Pn(a,n,x,z),l=G}function ff(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;return v=l,l=l+32|0,(0|l)>=(0|m)&&X(),s=v,t=v+8|0,d=b,e=d,f[s>>2]=t,0|Lp(e,68900,s),h=t+4|0,i=0|f[h>>2],k=6==(0|i),k?(n=+j[c>>2],o=0|f[t>>2],p=+(0|o),q=n==p,r=1&q,g=255&r,De(a,g),void(l=v)):(Ee(a),void(l=v))}function gf(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),n=p+8|0,d=b,e=+j[c>>2],g=0|je(e),h=2147483647&g,i=h>>>0>2139095040,k=d,i?(rg(a,k,54890,3),void(l=p)):(f[n>>2]=0|f[c>>2],f[n+4>>2]=0|f[c+4>>2],cc(a,k,n,55009),void(l=p))}function hf(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,k=0,o=0;o=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=+j[c>>2],f=0|je(e),g=2147483647&f,h=g>>>0>2139095040,i=1&h,k=255&i,De(a,k),l=o}function jf(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,M=0;M=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,t=b+4|0,E=0|f[t>>2],F=c+4|0,G=0|f[F>>2],H=(0|E)!=(0|G);a:do if(H)d=0;else switch(I=b+4|0,J=0|f[I>>2],0|J){case 2:d=1;break a;case 3:case 0:K=0|f[b>>2],g=0|f[c>>2],h=(0|K)==(0|g),i=1&h,k=255&i,d=k;break a;case 4:n=0|f[b>>2],o=0|f[c>>2],p=(0|n)==(0|o),q=1&p,r=255&q,d=r;break a;case 6:s=+j[b>>2],u=+j[c>>2],v=s==u,w=1&v,x=255&w,d=x;break a;default:y=0|f[b>>2],z=0|f[c>>2],A=(0|y)==(0|z),B=1&A,C=255&B,d=C;break a}while(0);return D=d,l=M,0|D}function kf(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0;return k=l,l=l+32|0,(0|l)>=(0|m)&&X(),i=k+16|0,h=k+8|0,d=a,e=d,f[h>>2]=0|f[b>>2],f[h+4>>2]=0|f[b+4>>2],f[i>>2]=0|f[c>>2],f[i+4>>2]=0|f[c+4>>2],g=0|jf(e,h,i),l=k,0|g}function lf(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0;return y=l,l=l+64|0,(0|l)>=(0|m)&&X(),t=y+48|0,u=y+40|0,s=y+32|0,w=y,v=y+16|0,i=y+8|0,g=a,j=g,f[s>>2]=0|f[b>>2],f[s+4>>2]=0|f[b+4>>2],f[u>>2]=0|f[c>>2],f[u+4>>2]=0|f[c+4>>2],k=0|jf(j,s,u),(n=k<<24>>24!=0)?(e=1,h=e,l=y,0|h):(o=g,d[w>>0]=0|d[c>>0],d[w+1>>0]=0|d[c+1>>0],d[w+2>>0]=0|d[c+2>>0],d[w+3>>0]=0|d[c+3>>0],d[w+4>>0]=0|d[c+4>>0],d[w+5>>0]=0|d[c+5>>0],d[w+6>>0]=0|d[c+6>>0],d[w+7>>0]=0|d[c+7>>0],f[t>>2]=0|f[b>>2],f[t+4>>2]=0|f[b+4>>2],Yj(i,o,t,68902,1,w),f[v>>2]=0|f[i>>2],f[v+4>>2]=0|f[i+4>>2],p=v+4|0,q=0|f[p>>2],r=0!=(0|q),r?(e=1,h=e,l=y,0|h):(e=0,h=e,l=y,0|h))}function mf(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,pa=0;pa=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,q=b,B=q+32|0,M=0|f[B>>2],Y=0|Dp(c,55028,M),ma=Y,ha=b,ia=ha+76|0,f[ia>>2]=Y,ja=b,ka=ma,nq(ja,ka,67683),d=b,e=ma,Jp(d,e,68778,71,262144),g=b,h=ma,Jp(g,h,59634,72,262144),i=b,j=ma,Jp(i,j,59632,73,262144),k=b,n=ma,Jp(k,n,68379,74,0),o=b,p=ma,Jp(o,p,68977,75,0),r=b,s=ma,Jp(r,s,68986,76,0),t=b,u=b,v=u+32|0,w=0|f[v>>2],x=0|Dp(t,55039,w),na=x,y=b,z=y+68|0,f[z>>2]=x,A=b,C=na,nq(A,C,67683),D=b,E=na,Jp(D,E,68778,77,262144),F=b,G=na,Jp(F,G,59634,78,262144),H=b,I=na,Jp(H,I,68977,79,0),J=b,K=na,Jp(J,K,59632,80,262144),L=b,N=na,Jp(L,N,68986,79,0),O=b,P=b,Q=P+32|0,R=0|f[Q>>2],S=0|Dp(O,55049,R),la=S,T=b,U=T+72|0,f[U>>2]=S,V=b,W=la,nq(V,W,67683),Z=b,$=la,Jp(Z,$,68778,71,262144),_=b,aa=la,Jp(_,aa,59634,72,262144),ba=b,ca=la,Jp(ba,ca,68977,81,0),da=b,ea=la,Jp(da,ea,59632,73,262144),fa=b,ga=la,Jp(fa,ga,68986,81,0),l=pa}function nf(a,b,c){a|=0,b|=0,c|=0;var d=0,f=0;f=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,of(a),l=f}function of(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=1,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function pf(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,i=n+8|0,e=b,g=e,f[j>>2]=i,0|Lp(g,55037,j),h=0|d[i>>0],qf(a,h),l=n}function qf(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=255&d,g=0!=(0|e),h=g?2:0,i=j+4|0,f[i>>2]=h,f[j>>2]=1,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function rf(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,i=n+8|0,e=b,g=e,f[j>>2]=i,0|Lp(g,55037,j),h=0|d[i>>0],qf(a,h),l=n}function sf(a,b,c){a|=0,b|=0,c|=0;var d=0,f=0;f=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,tf(a),l=f}function tf(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=2,f[c>>2]=1,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function uf(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0;g=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=d,ng(a,e,0,0),l=g}function vf(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0;g=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=d,rg(a,e,58162,3),l=g}function wf(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,i=n+8|0,e=b,g=e,f[j>>2]=i,0|Lp(g,55037,j),h=0|d[i>>0],qf(a,h),l=n}function xf(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;r=l,l=l+16|0,(0|l)>=(0|m)&&X(),p=r,o=r+8|0,e=b,g=e,f[p>>2]=o,0|Lp(g,55037,p),h=0|d[o>>0],i=h<<24>>24!=0,j=1^i,k=1&j,n=255&k,qf(a,n),l=r}function yf(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0;g=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=d,rg(a,e,58206,4),l=g}function zf(a,b,c){a|=0,b|=0,c|=0;var d=0,f=0;f=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,tf(a),l=f}function Af(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0;g=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=d,rg(a,e,58182,5),l=g}function Bf(a,b,c,e,g,h){a|=0,b|=0,c|=0,e|=0,g|=0,h|=0;var i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0;return O=l,l=l+80|0,(0|l)>=(0|m)&&X(),K=O+64|0,J=O+56|0,I=O+48|0,L=O,B=O+24|0,C=O+16|0,i=b,j=e,w=g,A=h,H=0,D=i,E=w,F=0|li(D,E),H=F,G=i,k=H,f[I>>2]=0|f[c>>2],f[I+4>>2]=0|f[c+4>>2],n=0|dq(G,I,k),(o=n<<24>>24!=0)?(y=i,z=H,f[K>>2]=0|f[c>>2],f[K+4>>2]=0|f[c+4>>2],Zj(a,y,K,z,0,0),void(l=O)):(p=A,q=p<<24>>24!=0,q&&(r=i,s=i,t=0|tp(s,68905),u=i,f[J>>2]=0|f[c>>2],f[J+4>>2]=0|f[c+4>>2],Cf(B,u,J),v=i,x=j,qg(C,v,x),d[L>>0]=0|d[B>>0],d[L+1>>0]=0|d[B+1>>0],d[L+2>>0]=0|d[B+2>>0],d[L+3>>0]=0|d[B+3>>0],d[L+4>>0]=0|d[B+4>>0],d[L+5>>0]=0|d[B+5>>0],d[L+6>>0]=0|d[B+6>>0],d[L+7>>0]=0|d[B+7>>0],M=L+8|0,d[M>>0]=0|d[C>>0],d[M+1>>0]=0|d[C+1>>0],d[M+2>>0]=0|d[C+2>>0],d[M+3>>0]=0|d[C+3>>0],d[M+4>>0]=0|d[C+4>>0],d[M+5>>0]=0|d[C+5>>0],d[M+6>>0]=0|d[C+6>>0],d[M+7>>0]=0|d[C+7>>0],Er(r,t,55068,L)),Ef(a),void(l=O))}function Cf(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+32|0,(0|l)>=(0|m)&&X(),s=u+16|0,r=u+8|0,d=b,e=c+4|0,h=0|f[e>>2],i=0==(0|h),i||(j=c+4|0,k=0|f[j>>2],n=2==(0|k))?(o=d,f[r>>2]=0|f[c>>2],f[r+4>>2]=0|f[c+4>>2],Df(a,o,r),void(l=u)):(p=d,q=d,f[s>>2]=0|f[c>>2],f[s+4>>2]=0|f[c+4>>2],g=0|iq(q,s),qg(a,p,g),void(l=u))}function Df(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+48|0,(0|l)>=(0|m)&&X(),d=o+32|0,j=o+24|0,k=o,g=o+8|0,e=b,h=e,i=e,f[j>>2]=0|f[c>>2],f[j+4>>2]=0|f[c+4>>2],Yj(g,i,j,68986,0,k),f[d>>2]=0|f[g>>2],f[d+4>>2]=0|f[g+4>>2],Vg(a,h,d),l=o}function Ef(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Ff(a,b,c,e,g,h){a|=0,b|=0,c|=0,e|=0,g|=0,h|=0;var i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0;return P=l,l=l+80|0,(0|l)>=(0|m)&&X(),K=P+72|0,L=P,J=P+48|0,D=P+40|0,E=P+32|0,F=P+24|0,i=b,j=e,w=g,C=h,G=c+4|0,H=0|f[G>>2],I=j,(k=(0|H)==(0|I))?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=P)):(n=i,o=w,p=C,f[K>>2]=0|f[c>>2],f[K+4>>2]=0|f[c+4>>2],Bf(D,n,K,o,p,1),f[J>>2]=0|f[D>>2],f[J+4>>2]=0|f[D+4>>2],q=J+4|0,r=0|f[q>>2],s=j,t=(0|r)!=(0|s),t&&(u=i,v=i,x=0|tp(v,68905),y=i,z=w,qg(E,y,z),A=i,B=C,qg(F,A,B),d[L>>0]=0|d[c>>0],d[L+1>>0]=0|d[c+1>>0],d[L+2>>0]=0|d[c+2>>0],d[L+3>>0]=0|d[c+3>>0],d[L+4>>0]=0|d[c+4>>0],d[L+5>>0]=0|d[c+5>>0],d[L+6>>0]=0|d[c+6>>0],d[L+7>>0]=0|d[c+7>>0],M=L+8|0,d[M>>0]=0|d[E>>0],d[M+1>>0]=0|d[E+1>>0],d[M+2>>0]=0|d[E+2>>0],d[M+3>>0]=0|d[E+3>>0],d[M+4>>0]=0|d[E+4>>0],d[M+5>>0]=0|d[E+5>>0],d[M+6>>0]=0|d[E+6>>0],d[M+7>>0]=0|d[E+7>>0],N=L+16|0,d[N>>0]=0|d[F>>0],d[N+1>>0]=0|d[F+1>>0],d[N+2>>0]=0|d[F+2>>0],d[N+3>>0]=0|d[F+3>>0],d[N+4>>0]=0|d[F+4>>0],d[N+5>>0]=0|d[F+5>>0],d[N+6>>0]=0|d[F+6>>0],d[N+7>>0]=0|d[F+7>>0],Er(u,x,55093,L)),f[a>>2]=0|f[J>>2],f[a+4>>2]=0|f[J+4>>2],void(l=P))}function Gf(a,b,c,d,e,g){a|=0,b|=0,c|=0,d|=0,e|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;return K=l,l=l+48|0,(0|l)>=(0|m)&&X(),I=K+32|0,H=K+8|0,A=K,h=b,i=d,v=e,z=g,B=c+4|0,C=0|f[B>>2],D=i,E=(0|C)==(0|D),F=i,j=21!=(0|F),(G=E&j)?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=K)):(k=h,n=v,o=z,f[I>>2]=0|f[c>>2],f[I+4>>2]=0|f[c+4>>2],Bf(A,k,I,n,o,0),f[H>>2]=0|f[A>>2],f[H+4>>2]=0|f[A+4>>2],p=H+4|0,q=0|f[p>>2],r=0==(0|q),r?(s=0|f[H>>2],t=0!=(0|s),t&&(J=5)):J=5,5!=(0|J)||(u=H+4|0,w=0|f[u>>2],x=i,y=(0|w)!=(0|x))?(Ef(a),void(l=K)):(f[a>>2]=0|f[H>>2],f[a+4>>2]=0|f[H+4>>2],void(l=K)))}function Hf(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0;if(Ma=l,l=l+144|0,(0|l)>=(0|m)&&X(),Ja=Ma+136|0,Ia=Ma+128|0,Ha=Ma+120|0,Ga=Ma+112|0,Da=Ma+16|0,Ca=Ma,t=Ma+80|0,E=Ma+72|0,P=Ma+64|0,_=Ma+56|0,ka=Ma+48|0,va=Ma+40|0,xa=Ma+32|0,e=a,g=c,Ba=56,ya=b+4|0,h=0|f[ya>>2],Ka=h,i=Ka,j=g,k=(0|i)!=(0|j),n=Ka,o=21==(0|n),Aa=k|o,!Aa)return void(l=Ma);for(;;){if(p=Ba,q=0|d[p>>0],r=255&q,s=(0|r)<23,!s){La=19;break}if(u=Ba,v=0|d[u>>0],w=255&v,x=g,y=(0|w)==(0|x))break;oa=Ba,pa=oa+8|0,Ba=pa}19==(0|La)&&(qa=e,ra=e,sa=0|tp(ra,68905),ta=g,If(va,ta),ua=b+4|0,wa=0|f[ua>>2],If(xa,wa),d[Da>>0]=0|d[va>>0],d[Da+1>>0]=0|d[va+1>>0],d[Da+2>>0]=0|d[va+2>>0],d[Da+3>>0]=0|d[va+3>>0],d[Da+4>>0]=0|d[va+4>>0],d[Da+5>>0]=0|d[va+5>>0],d[Da+6>>0]=0|d[va+6>>0],d[Da+7>>0]=0|d[va+7>>0],Fa=Da+8|0,d[Fa>>0]=0|d[xa>>0],d[Fa+1>>0]=0|d[xa+1>>0],d[Fa+2>>0]=0|d[xa+2>>0],d[Fa+3>>0]=0|d[xa+3>>0],d[Fa+4>>0]=0|d[xa+4>>0],d[Fa+5>>0]=0|d[xa+5>>0],d[Fa+6>>0]=0|d[xa+6>>0],d[Fa+7>>0]=0|d[xa+7>>0],Er(qa,sa,55166,Da)),z=b+4|0,A=0|f[z>>2],B=0==(0|A),B?(C=0|f[b>>2],D=0!=(0|C),D?La=7:za=58162):La=7;do if(7==(0|La)){if(F=b+4|0,G=0|f[F>>2],H=3==(0|G)){za=55129;break}if(I=b+4|0,J=0|f[I>>2],K=4==(0|J)){za=56184;break}if(L=b+4|0,M=0|f[L>>2],N=M>>>0<8,O=e,!N){f[Ja>>2]=0|f[b>>2],f[Ja+4>>2]=0|f[b+4>>2],da=0|iq(O,Ja),za=da;break}f[Ga>>2]=0|f[b>>2],f[Ga+4>>2]=0|f[b+4>>2],Vg(t,O,Ga),Q=0|f[t>>2],R=0|f[Q>>2],S=R>>>11,T=8&S,U=0!=(0|T),V=e,U?(f[Ha>>2]=0|f[b>>2],f[Ha+4>>2]=0|f[b+4>>2],Vg(E,V,Ha),W=0|f[E>>2],Y=W+12|0,ca=Y):(f[Ia>>2]=0|f[b>>2],f[Ia+4>>2]=0|f[b+4>>2],Vg(P,V,Ia),Z=0|f[P>>2],$=Z+12|0,aa=$+8|0,ba=0|f[aa>>2],ca=ba),za=ca}while(0);ea=e,fa=e,ga=0|tp(fa,68905),ha=e,ia=za,qg(_,ha,ia),ja=e,la=Ba,ma=la+4|0,na=0|f[ma>>2],qg(ka,ja,na),d[Ca>>0]=0|d[_>>0],d[Ca+1>>0]=0|d[_+1>>0],d[Ca+2>>0]=0|d[_+2>>0],d[Ca+3>>0]=0|d[_+3>>0],d[Ca+4>>0]=0|d[_+4>>0],d[Ca+5>>0]=0|d[_+5>>0],d[Ca+6>>0]=0|d[_+6>>0],d[Ca+7>>0]=0|d[_+7>>0],Ea=Ca+8|0,d[Ea>>0]=0|d[ka>>0],d[Ea+1>>0]=0|d[ka+1>>0],d[Ea+2>>0]=0|d[ka+2>>0],d[Ea+3>>0]=0|d[ka+3>>0],d[Ea+4>>0]=0|d[ka+4>>0],d[Ea+5>>0]=0|d[ka+5>>0],d[Ea+6>>0]=0|d[ka+6>>0],d[Ea+7>>0]=0|d[ka+7>>0],Er(ea,ga,67788,Ca)}function If(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=3,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function Jf(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,H=0;H=l,l=l+128|0,(0|l)>=(0|m)&&X(),F=H+112|0,d=H+104|0,E=H+96|0,D=H+88|0,C=H+80|0,B=H+72|0,z=H+64|0,A=H+48|0,g=H+32|0,q=H+24|0,r=H+16|0,s=H+8|0,t=H,e=b,u=e,lg(A,u,20),v=e,f[z>>2]=0|f[c>>2],f[z+4>>2]=0|f[c+4>>2],w=0|iq(v,z),y=w,x=e,f[B>>2]=0|f[A>>2],f[B+4>>2]=0|f[A+4>>2],dh(g,x,B,55193,2),h=e,i=y,f[C>>2]=0|f[A>>2],f[C+4>>2]=0|f[A+4>>2],fh(q,h,C,i),j=e,f[D>>2]=0|f[A>>2],f[D+4>>2]=0|f[A+4>>2],dh(r,j,D,67713,1),k=e,n=e,o=0|f[c>>2],Wg(s,n,o),f[E>>2]=0|f[A>>2],f[E+4>>2]=0|f[A+4>>2],f[d>>2]=0|f[s>>2],f[d+4>>2]=0|f[s+4>>2],yg(k,E,d),p=e,f[F>>2]=0|f[A>>2],f[F+4>>2]=0|f[A+4>>2],dh(t,p,F,65241,1),f[a>>2]=0|f[A>>2],f[a+4>>2]=0|f[A+4>>2],l=H}function Kf(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0;ca=l,l=l+32|0,(0|l)>=(0|m)&&X(),_=ca+16|0,g=a,t=c,E=g,f[_>>2]=0|f[b>>2],f[_+4>>2]=0|f[b+4>>2],P=0|Lf(E,_),$=P,U=t,V=0|f[U>>2],W=255&V,d=W+-9|0,aa=d>>>0<3,aa||(Y=g,Z=g,h=0|tp(Z,68905),Br(Y,h,55196)),i=t,j=0|f[i>>2],k=j>>>11,n=524288&k,o=0!=(0|n);a:do if(o)for(p=t,q=p+20|0,r=0|f[q>>2],t=r;;){if(s=t,u=0|f[s>>2],v=u>>>11,w=1048576&v,x=0!=(0|w),y=1^x,!y)break a;z=t,A=z+20|0,B=0|f[A>>2],t=B}while(0);for(;;){if(C=$,D=0!=(0|C),!D){ba=12;break}if(F=$,G=t,H=(0|F)==(0|G)){ba=10;break}if(I=$,J=I+16|0,K=0|f[J>>2],L=t,M=L+16|0,N=0|f[M>>2],O=(0|K)==(0|N)){ba=10;break}Q=$,R=Q+20|0,S=0|f[R>>2],$=S}return 10==(0|ba)?(e=1,T=e,l=ca,0|T):12==(0|ba)?(e=0,T=e,l=ca,0|T):0}function Lf(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,K=0;K=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,r=b+4|0,C=0|f[r>>2];a:do switch(0|C){case 0:if(D=0|f[b>>2],E=0!=(0|D),F=d,E){G=F+72|0,H=0|f[G>>2],c=H;break a}I=F+76|0,e=0|f[I>>2],c=e;break a;case 2:g=d,h=g+68|0,i=0|f[h>>2],c=i;break;case 4:j=d,k=j+80|0,n=0|f[k>>2],c=n;break;case 3:o=d,p=o+64|0,q=0|f[p>>2],c=q;break;case 6:s=d,t=s+60|0,u=0|f[t>>2],c=u;break;case 7:v=d,w=v+32|0,x=0|f[w>>2],c=x;break;case 20:c=0;break;default:y=0|f[b>>2],z=y+4|0,A=0|f[z>>2],c=A}while(0);return B=c,l=K,0|B}function Mf(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i+8|0,d=b,e=d,f[g>>2]=0|f[c>>2],f[g+4>>2]=0|f[c+4>>2],Nf(a,e,g,55221),l=i}function Nf(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0;return Q=l,l=l+112|0,(0|l)>=(0|m)&&X(),I=Q+104|0,K=Q+96|0,H=Q+88|0,J=Q+80|0,L=Q,G=Q+64|0,u=Q+56|0,F=Q+48|0,y=Q+40|0,z=Q+32|0,g=b,h=e,A=c+4|0,B=0|f[A>>2],(C=3==(0|B))?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=Q)):(D=g,E=h,f[J>>2]=0|f[c>>2],f[J+4>>2]=0|f[c+4>>2],Bf(u,D,J,55060,E,1),f[G>>2]=0|f[u>>2],f[G+4>>2]=0|f[u+4>>2],i=g,j=g,k=j+64|0,n=0|f[k>>2],f[H>>2]=0|f[G>>2],f[H+4>>2]=0|f[G+4>>2],o=0|Kf(i,H,n),p=o<<24>>24!=0,p||(q=g,f[K>>2]=0|f[c>>2],f[K+4>>2]=0|f[c+4>>2],Cf(F,q,K),r=g,s=g,t=0|tp(s,68905),v=g,w=h,qg(y,v,w),x=g,f[I>>2]=0|f[G>>2],f[I+4>>2]=0|f[G+4>>2],Cf(z,x,I),d[L>>0]=0|d[F>>0],d[L+1>>0]=0|d[F+1>>0],d[L+2>>0]=0|d[F+2>>0],d[L+3>>0]=0|d[F+3>>0],d[L+4>>0]=0|d[F+4>>0],d[L+5>>0]=0|d[F+5>>0],d[L+6>>0]=0|d[F+6>>0],d[L+7>>0]=0|d[F+7>>0],M=L+8|0,d[M>>0]=0|d[F>>0],d[M+1>>0]=0|d[F+1>>0],d[M+2>>0]=0|d[F+2>>0],d[M+3>>0]=0|d[F+3>>0],d[M+4>>0]=0|d[F+4>>0],d[M+5>>0]=0|d[F+5>>0],d[M+6>>0]=0|d[F+6>>0],d[M+7>>0]=0|d[F+7>>0],N=L+16|0,d[N>>0]=0|d[y>>0],d[N+1>>0]=0|d[y+1>>0],d[N+2>>0]=0|d[y+2>>0],d[N+3>>0]=0|d[y+3>>0],d[N+4>>0]=0|d[y+4>>0],d[N+5>>0]=0|d[y+5>>0],d[N+6>>0]=0|d[y+6>>0],d[N+7>>0]=0|d[y+7>>0],O=L+24|0,d[O>>0]=0|d[z>>0],d[O+1>>0]=0|d[z+1>>0],d[O+2>>0]=0|d[z+2>>0],d[O+3>>0]=0|d[z+3>>0],d[O+4>>0]=0|d[z+4>>0],d[O+5>>0]=0|d[z+5>>0],d[O+6>>0]=0|d[z+6>>0],d[O+7>>0]=0|d[z+7>>0],Er(r,t,55228,L)),f[a>>2]=0|f[G>>2],f[a+4>>2]=0|f[G+4>>2],void(l=Q))}function Of(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0;switch(ga=l,l=l+80|0,(0|l)>=(0|m)&&X(),ea=ga+64|0,da=ga+56|0,ca=ga+48|0,ba=ga+40|0,aa=ga+32|0,_=ga+16|0,u=ga+8|0,F=ga,e=b,g=d,Q=c+4|0,V=0|f[Q>>2],W=0==(0|V),W&&(Y=0|f[c>>2],Z=0!=(0|Y),Z||($=g,h=0!=(0|$),h?(L=e,M=e,N=0|tp(M,68855),Br(L,N,55304)):(i=e,k=e,n=0|tp(k,68905),Br(i,n,55273)))),o=c+4|0,p=0|f[o>>2],0|p){case 6:fa=6;break;case 3:return y=g,z=0!=(0|y),z&&(L=e,M=e,N=0|tp(M,68855),Br(L,N,55304)),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=ga);case 16:break;default:fa=13}do if(6==(0|fa)){if(q=g,r=0!=(0|q),r&&(L=e,M=e,N=0|tp(M,68855),Br(L,N,55304)),s=+j[c>>2],t=s<=2147483648,t&&(v=+j[c>>2],w=v>=-2147483648)){fa=13;break}return x=e,f[aa>>2]=0|f[c>>2],f[aa+4>>2]=0|f[c+4>>2],ie(a,x,aa),void(l=ga)}while(0);do if(13==(0|fa)){if(C=g,D=0!=(0|C),E=e,D){if(f[ca>>2]=0|f[c>>2],f[ca+4>>2]=0|f[c+4>>2],Xg(u,E,ca),f[_>>2]=0|f[u>>2],f[_+4>>2]=0|f[u+4>>2],G=_+4|0,H=0|f[G>>2],I=0==(0|H),!I)break;if(J=0|f[_>>2],K=0!=(0|J))break;L=e,M=e,N=0|tp(M,68855),Br(L,N,55304)}return f[da>>2]=0|f[c>>2],f[da+4>>2]=0|f[c+4>>2],Bf(F,E,da,55060,55221,0),f[_>>2]=0|f[F>>2],f[_+4>>2]=0|f[F+4>>2],O=_+4|0,P=0|f[O>>2],R=0==(0|P),R&&(S=0|f[_>>2],T=0!=(0|S),!T)?(U=e,f[ea>>2]=0|f[c>>2],f[ea+4>>2]=0|f[c+4>>2],Nf(a,U,ea,56116),void(l=ga)):(f[a>>2]=0|f[_>>2],f[a+4>>2]=0|f[_+4>>2],void(l=ga))}while(0);A=e,B=g,f[ba>>2]=0|f[c>>2],f[ba+4>>2]=0|f[c+4>>2],_g(a,A,ba,B,1),l=ga}function Pf(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i+8|0,d=b,e=d,f[g>>2]=0|f[c>>2],f[g+4>>2]=0|f[c+4>>2],Of(a,e,g,0),l=i}function Qf(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,z=0;return z=l,l=l+64|0,(0|l)>=(0|m)&&X(),v=z+40|0,w=z+32|0,u=z+24|0,x=z,k=z+8|0,g=a,n=g,f[u>>2]=0|f[b>>2],f[u+4>>2]=0|f[b+4>>2],f[w>>2]=0|f[c>>2],f[w+4>>2]=0|f[c+4>>2],o=0|jf(n,u,w),p=o<<24>>24!=0,p?(e=1,j=e,l=z,0|j):(q=g,d[x>>0]=0|d[c>>0],d[x+1>>0]=0|d[c+1>>0],d[x+2>>0]=0|d[c+2>>0],d[x+3>>0]=0|d[c+3>>0],d[x+4>>0]=0|d[c+4>>0],d[x+5>>0]=0|d[c+5>>0],d[x+6>>0]=0|d[c+6>>0],d[x+7>>0]=0|d[c+7>>0],f[v>>2]=0|f[b>>2],f[v+4>>2]=0|f[b+4>>2],Yj(k,q,v,68994,1,x),r=k+4|0,s=0|f[r>>2],t=0!=(0|s),h=1&t,i=255&h,e=i,j=e,l=z,0|j)}function Rf(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,k=0;k=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=k+24|0,i=k+16|0,e=k,d=a,g=d,f[i>>2]=0|f[b>>2],f[i+4>>2]=0|f[b+4>>2],Df(e,g,i),h=0|f[695],f[c>>2]=0|f[e>>2],f[c+4>>2]=0|f[e+4>>2],Sf(c,h),l=k}function Sf(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0;return J=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=b,d=a+4|0,r=0|f[d>>2],(B=16==(0|r))?(C=0|f[a>>2],D=0|f[C>>2],E=D>>>11,F=8&E,G=0!=(0|F),H=0|f[a>>2],e=H+12|0,G?y=e:(g=e+8|0,h=0|f[g>>2],y=h),i=0|f[a>>2],j=0|f[i>>2],k=j>>>11,n=8&k,o=0!=(0|n),p=0|f[a>>2],o?(q=0|f[p>>2],s=q>>>11,t=496&s,u=t>>4,z=u):(v=p+12|0,w=0|f[v>>2],z=w),x=c,0|_v(y,z,1,x),A=c,0|bw(10,A),void(l=J)):void(l=J)}function Tf(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=0|f[d>>2],g=255&e,h=j+4|0,f[h>>2]=g,i=c,f[j>>2]=i,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function Uf(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;r=l,l=l+48|0,(0|l)>=(0|m)&&X(),c=r+32|0,b=r+24|0,e=r+8|0,g=r,d=a,h=d,i=d,j=i+32|0,k=0|f[j>>2],Tf(g,k),n=d,o=0|ki(n,69184,17),f[b>>2]=0|f[g>>2],f[b+4>>2]=0|f[g+4>>2],Ej(e,h,b,o),p=0|f[695],f[c>>2]=0|f[e>>2],f[c+4>>2]=0|f[e+4>>2],Sf(c,p),l=r}function Vf(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;r=l,l=l+48|0,(0|l)>=(0|m)&&X(),c=r+32|0,b=r+24|0,e=r+8|0,g=r,d=a,h=d,i=d,j=i+32|0,k=0|f[j>>2],Tf(g,k),n=d,o=0|ki(n,69251,15),f[b>>2]=0|f[g>>2],f[b+4>>2]=0|f[g+4>>2],Ej(e,h,b,o),p=0|f[695],f[c>>2]=0|f[e>>2],f[c+4>>2]=0|f[e+4>>2],Sf(c,p),l=r}function Wf(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;return t=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,h=b,i=d,j=h,k=0|dx[255&i](0,0,592,j),r=k,n=r,o=0==(0|n),o?(c=0,g=c,l=t,0|g):(p=r,q=d,e=h,Xf(p,q,e),f=r,c=f,g=c,l=t,0|g)}function Xf(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,K=0,L=0,M=0;K=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,B=d,0|sw(0|B,72448,592),C=s,D=d,E=D+8|0,f[E>>2]=C,F=e,G=d,H=G+4|0,f[H>>2]=F,g=d,h=g+588|0,f[h>>2]=0,i=d,j=d,k=j+92|0,Mc(i,k),n=d,o=0|Jc(n,52),p=d,q=p+12|0,f[q>>2]=o,r=d,t=r+12|0,u=0|f[t>>2],I=u,L=73040,M=I+52|0;do f[I>>2]=0|f[L>>2],I=I+4|0,L=L+4|0;while((0|I)<(0|M));v=d,w=v+12|0,x=0|f[w>>2],y=d,z=y+16|0,f[z>>2]=x,A=d,as(A),l=K}function Yf(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;return s=l,l=l+32|0,(0|l)>=(0|m)&&X(),f=a,h=b,i=c,j=d,k=i,n=0==(0|k),o=h,n?(gw(o),e=0):(p=i,q=0|hw(o,p),e=q),g=e,l=s,0|g}function Zf(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;return w=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,k=c,n=d,o=8+n|0,p=0|Jc(k,o),u=p,q=c,r=q+88|0,s=0|f[r>>2],t=u,f[t>>2]=s,e=u,g=c,h=g+88|0,f[h>>2]=e,i=u,j=i+4|0,l=w,0|j}function $f(){var a=0,b=0,c=0,e=0;return e=l,l=l+16|0,(0|l)>=(0|m)&&X(),a=0|_f(82,0),c=a,b=c,l=e,0|b}function _f(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;return s=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,g=b,h=d,i=g,j=0|Wf(h,i),q=j,k=q,n=0==(0|k),n?(c=0,f=c,l=s,0|f):(o=q,hb(o),p=q,Xc(p,0),e=q,c=e,f=c,l=s,0|f)}function ag(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,k=0;k=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=d,g=e+56|0,h=0|f[g>>2],i=h+1|0,f[g>>2]=i,l=k}function bg(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;return s=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,h=d,i=h+56|0,j=0|f[i>>2],k=j+-1|0,f[i>>2]=k,n=d,o=n+56|0,p=0|f[o>>2],(q=0==(0|p))?(e=c,g=d,cg(e,g),void(l=s)):void(l=s)}function cg(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Na=0;for(Na=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,e=b,s=e,D=s+4|0,O=0|d[D>>0],$=255&O,ja=1&$,ua=0!=(0|ja),ua||(Fa=c,Ka=e,g=Ka+8|0,h=0|f[g>>2],Dc(Fa,h)),La=0;;){if(i=La,j=e,k=j+44|0,n=0|f[k>>2],o=i>>>0<n>>>0,!o)break;p=La,q=e,r=q+12|0,t=0|f[r>>2],u=t+(p<<3)|0,v=u+4|0,w=0|f[v>>2],x=16==(0|w),x&&(y=c,z=La,A=e,B=A+12|0,C=0|f[B>>2],E=C+(z<<3)|0,F=0|f[E>>2],sg(y,F),G=c,H=La,I=e,J=I+12|0,K=0|f[J>>2],L=K+(H<<3)|0,M=0|f[L>>2],Dc(G,M)),N=La,P=N+1|0,La=P}for(Q=c,R=e,S=R+12|0,T=0|f[S>>2],Dc(Q,T),U=c,V=e,W=V+16|0,Y=0|f[W>>2],Dc(U,Y),La=0;;){if(Z=La,_=e,aa=_+52|0,ba=0|f[aa>>2],ca=Z>>>0<ba>>>0,da=c,!ca)break;ea=La,fa=e,ga=fa+20|0,ha=0|f[ga>>2],ia=ha+(ea<<2)|0,ka=0|f[ia>>2],bg(da,ka),la=La,ma=la+1|0,La=ma}na=e,oa=na+20|0,pa=0|f[oa>>2],Dc(da,pa),qa=c,ra=e,sa=ra+24|0,ta=0|f[sa>>2],Dc(qa,ta),va=c,wa=e,xa=wa+28|0,ya=0|f[xa>>2],Dc(va,ya),za=c,Aa=e,Ba=Aa+32|0,Ca=0|f[Ba>>2],Dc(za,Ca),Da=c,Ea=e,Ga=Ea+36|0,Ha=0|f[Ga>>2],vr(Da,Ha),Ia=c,Ja=e,Dc(Ia,Ja),l=Na}function dg(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Fb=0;return Fb=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=b,g=0|f[c>>2],Cb=g,S=e,ca=0|Jc(S,24),Ab=ca,na=Ab,ya=0|f[na>>2],Ja=ya&-256,Ua=16|Ja,f[na>>2]=Ua,db=e,ob=db+48|0,h=0|f[ob>>2],u=Ab,F=u+4|0,f[F>>2]=h,L=Cb,M=0|f[L>>2],N=M>>>11,O=2&N,P=0!=(0|O),Q=Ab,R=0|f[Q>>2],T=2047&R,P?(U=4096|T,f[Q>>2]=U,V=Cb,W=V+12|0,Y=W+8|0,Z=0|f[Y>>2],$=Ab,_=$+12|0,aa=_+8|0,f[aa>>2]=Z,ba=Cb,da=ba+12|0,ea=0|f[da>>2],fa=Ab,ga=fa+12|0,f[ga>>2]=ea,ha=Ab,ia=ha+12|0,ja=ia+4|0,f[ja>>2]=0,K=Ab,eg(a,K),void(l=Fb)):(f[Q>>2]=T,ka=Cb,la=0|f[ka>>2],ma=la>>>11,oa=8&ma,pa=0!=(0|oa),qa=Cb,ra=qa+12|0,pa?(Bb=ra,sa=Cb,ta=0|f[sa>>2],ua=ta>>>11,va=496&ua,wa=va>>4,zb=wa):(xa=ra+8|0,za=0|f[xa>>2],Bb=za,Aa=Cb,Ba=Aa+12|0,Ca=0|f[Ba>>2],zb=Ca),Da=zb,Ea=(0|Da)<11,Ea?(Fa=Ab,Ga=0|f[Fa>>2],Ha=Ga>>>11,Ia=8|Ha,Ka=0|f[Fa>>2],La=2097151&Ia,Ma=La<<11,Na=2047&Ka,Oa=Na|Ma,f[Fa>>2]=Oa,Pa=zb,Db=Pa,Qa=Ab,Ra=0|f[Qa>>2],Sa=Ra>>>11,Ta=Sa&-497,Va=0|f[Qa>>2],Wa=2097151&Ta,Xa=Wa<<11,Ya=2047&Va,Za=Ya|Xa,f[Qa>>2]=Za,$a=Db,_a=$a<<4,ab=Ab,bb=0|f[ab>>2],cb=bb>>>11,eb=cb|_a,fb=0|f[ab>>2],gb=2097151&eb,hb=gb<<11,ib=2047&fb,jb=ib|hb,f[ab>>2]=jb,kb=Bb,lb=0!=(0|kb),lb&&(mb=Ab,nb=mb+12|0,pb=Bb,qb=zb,0|sw(0|nb,0|pb,0|qb)),rb=zb,sb=Ab,tb=sb+12|0,ub=tb+rb|0,d[ub>>0]=0,K=Ab,eg(a,K),void(l=Fb)):(vb=e,wb=zb,xb=wb+1|0,yb=0|Jc(vb,xb),i=Ab,j=i+12|0,k=j+8|0,f[k>>2]=yb,n=zb,o=Ab,p=o+12|0,f[p>>2]=n,q=zb,r=Ab,s=r+12|0,t=s+4|0,f[t>>2]=q,v=Bb,w=0!=(0|v),w&&(x=Ab,y=x+12|0,z=y+8|0,A=0|f[z>>2],B=Bb,C=zb,0|sw(0|A,0|B,0|C)),D=zb,E=Ab,G=E+12|0,H=G+8|0,I=0|f[H>>2],J=I+D|0,d[J>>0]=0,K=Ab,eg(a,K),void(l=Fb)))}function eg(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=0|f[d>>2],g=255&e,h=j+4|0,f[h>>2]=g,i=c,f[j>>2]=i,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function fg(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,C=0;return C=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=d,(u=0!=(0|r))?(v=c,w=d,x=w+8|0,y=0|f[x>>2],Dc(v,y),z=c,A=d,e=A+20|0,g=0|f[e>>2],Dc(z,g),h=c,i=d,j=i+28|0,k=0|f[j>>2],Dc(h,k),n=c,o=d,p=o+36|0,q=0|f[p>>2],Dc(n,q),s=c,t=d,Dc(s,t),void(l=C)):void(l=C)}function gg(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0;if(S=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,q=0!=(0|c),!q)return void(l=S);if(B=b,K=B+588|0,L=0|f[K>>2],M=(0|L)>0){for(N=b,O=N+588|0,P=0|f[O>>2],Q=P;;){if(d=Q,e=(0|d)>0,!e)break;g=Q,h=g-1|0,i=b,j=i+584|0,k=0|f[j>>2],n=k+(h<<2)|0,o=0|f[n>>2],p=b,_w[511&o](p),r=Q,s=r+-1|0,Q=s}t=b,u=b,v=u+584|0,w=0|f[v>>2],Dc(t,w)}x=b,Mi(x),y=b,z=b,A=z+16|0,C=0|f[A>>2],fg(y,C),D=b,ti(D),E=b,hg(E),F=b,G=b,H=G+92|0,Qc(F,H),I=b,J=b,Dc(I,J),l=S}function hg(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;if(u=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,h=0==(0|c))return void(l=u);for(i=b,j=i+88|0,k=0|f[j>>2],r=k;;){if(n=r,o=0!=(0|n),!o)break;p=r,s=p,q=r,d=0|f[q>>2],r=d,e=b,g=s,Dc(e,g)}l=u}function ig(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0,p=0,q=0;o=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=0|Jc(c,60),j=d,e=j,k=e,p=73092,q=k+60|0;do f[k>>2]=0|f[p>>2],k=k+4|0,p=p+4|0;while((0|k)<(0|q));return g=j,h=g+56|0,f[h>>2]=1,i=j,l=o,0|i}function jg(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0;return D=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=b,d=c,r=d+28|0,v=0|f[r>>2],(w=0!=(0|v))?(s=c,t=s+28|0,u=0|f[t>>2],eg(a,u),void(l=D)):(x=c,y=c,z=y+32|0,A=0|f[z>>2],B=0|Tc(x,8,A),e=c,g=e+28|0,f[g>>2]=B,h=c,i=c,j=i+28|0,k=0|f[j>>2],Xp(h,k,68986,83,0),n=c,o=c,p=o+28|0,q=0|f[p>>2],Xp(n,q,68977,83,0),s=c,t=s+28|0,u=0|f[t>>2],eg(a,u),void(l=D))}function kg(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0;g=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=d,rg(a,e,55340,4),l=g}function lg(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,V=0;return V=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=b,g=c,t=e,E=e,N=E+48|0,O=0|f[N>>2],P=0|Tc(t,16,O),T=P,Q=g,R=Q>>>0>=2147483647,R&&(S=e,h=e,i=0|tp(h,68855),Br(S,i,55382)),j=g,k=j>>>0<20,k&&(g=20),n=T,o=n+12|0,f[o>>2]=0,p=g,q=T,r=q+12|0,s=r+4|0,f[s>>2]=p,u=e,v=g,w=v+1|0,x=0|Jc(u,w),y=T,z=y+12|0,A=z+8|0,f[A>>2]=x,B=T,C=0|f[B>>2],
+D=C>>>11,F=8&D,G=0!=(0|F),H=T,I=H+12|0,G?(L=I,d[L>>0]=0,M=T,mg(a,M),void(l=V)):(J=I+8|0,K=0|f[J>>2],L=K,d[L>>0]=0,M=T,mg(a,M),void(l=V))}function mg(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=0|f[d>>2],g=255&e,h=j+4|0,f[h>>2]=g,i=c,f[j>>2]=i,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function ng(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=b,f=c,g=d,h=e,i=f,j=g,k=0|og(h,i,j),mg(a,k),l=o}function og(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Ta=0;return Ta=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=a,t=b,E=c,P=g,_=g,ka=_+48|0,va=0|f[ka>>2],Ga=0|Tc(P,16,va),Qa=Ga,Pa=E,h=Pa>>>0<11,h?(i=Qa,j=0|f[i>>2],k=j>>>11,n=8|k,o=0|f[i>>2],p=2097151&n,q=p<<11,r=2047&o,s=r|q,f[i>>2]=s,u=E,Ra=u,v=Qa,w=0|f[v>>2],x=w>>>11,y=x&-497,z=0|f[v>>2],A=2097151&y,B=A<<11,C=2047&z,D=C|B,f[v>>2]=D,F=Ra,G=F<<4,H=Qa,I=0|f[H>>2],J=I>>>11,K=J|G,L=0|f[H>>2],M=2097151&K,N=M<<11,O=2047&L,Q=O|N,f[H>>2]=Q,R=t,S=0!=(0|R),S&&(T=Qa,U=T+12|0,V=t,W=E,0|sw(0|U,0|V,0|W))):(Y=E,Z=Y>>>0>=2147483647,Z&&($=g,aa=g,ba=0|tp(aa,68855),Br($,ba,55411)),ca=E,da=Qa,ea=da+12|0,f[ea>>2]=ca,fa=E,ga=Qa,ha=ga+12|0,ia=ha+4|0,f[ia>>2]=fa,ja=g,la=E,ma=la+1|0,na=0|Jc(ja,ma),oa=Qa,pa=oa+12|0,qa=pa+8|0,f[qa>>2]=na,ra=t,sa=0!=(0|ra),sa&&(ta=Qa,ua=ta+12|0,wa=ua+8|0,xa=0|f[wa>>2],ya=t,za=E,0|sw(0|xa,0|ya,0|za))),Aa=E,Ba=Qa,Ca=0|f[Ba>>2],Da=Ca>>>11,Ea=8&Da,Fa=0!=(0|Ea),Ha=Qa,Ia=Ha+12|0,Fa?(Ma=Ia,La=Ma+Aa|0,d[La>>0]=0,Na=Qa,e=Na,Oa=e,l=Ta,0|Oa):(Ja=Ia+8|0,Ka=0|f[Ja>>2],Ma=Ka,La=Ma+Aa|0,d[La>>0]=0,Na=Qa,e=Na,Oa=e,l=Ta,0|Oa)}function pg(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,I=0;return I=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,z=s,A=z>>>0>=2147483647,B=d,C=d,A?(D=0|tp(C,68855),Br(B,D,55411),0):(E=C+48|0,F=0|f[E>>2],g=0|Tc(B,16,F),G=g,h=s,i=G,j=i+12|0,f[j>>2]=h,k=G,n=k+12|0,o=n+4|0,f[o>>2]=0,p=e,q=G,r=q+12|0,t=r+8|0,f[t>>2]=p,u=G,v=0|f[u>>2],w=2047&v,x=4096|w,f[u>>2]=x,y=G,l=I,0|y)}function qg(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;t=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=c,g=e,h=0!=(0|g),h?(i=e,j=0|Jv(i),q=j):q=0,k=d,n=e,o=q,p=0|og(k,n,o),r=p,f=r,mg(a,f),l=t}function rg(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;q=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=b,f=c,g=d,h=e,i=f,j=g,k=0|pg(h,i,j),o=k,n=o,mg(a,n),l=q}function sg(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,H=0;return H=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=d,z=0|f[r>>2],A=z>>>11,B=8&A,(C=0!=(0|B))?void(l=H):(D=d,E=0|f[D>>2],F=E>>>11,e=1&F,(g=0!=(0|e))?(h=c,i=d,j=i+12|0,k=j+4|0,n=0|f[k>>2],tg(h,n),void(l=H)):(o=d,p=0|f[o>>2],q=p>>>11,s=2&q,(t=0!=(0|s))?void(l=H):(u=c,v=d,w=v+12|0,x=w+8|0,y=0|f[x>>2],Dc(u,y),void(l=H))))}function tg(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;return B=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,e=b,s=e,t=s+4|0,u=0|f[t>>2],v=u+-1|0,f[t>>2]=v,w=e,x=w+4|0,y=0|f[x>>2],(z=0==(0|y))?(g=e,h=0|d[g>>0],i=1&h,j=i<<24>>24!=0,j||(k=c,n=e,o=n+8|0,p=0|f[o>>2],Dc(k,p)),q=c,r=e,Dc(q,r),void(l=B)):void(l=B)}function ug(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0;if(ba=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,s=b,D=s,O=0|f[D>>2],T=O>>>11,U=8&T,V=0!=(0|U),W=s,V?(Y=0|f[W>>2],g=Y>>>11,h=496&g,i=h>>4,n=i):(j=W+12|0,k=0|f[j>>2],n=k),$=n,o=s,p=0|f[o>>2],q=p>>>11,r=8&q,t=0!=(0|r),u=s,v=u+12|0,t?y=v:(w=v+8|0,x=0|f[w>>2],y=x),_=y,z=_,A=0!=(0|z),!A)return c=0,S=c,l=ba,0|S;for(Z=0;;){if(B=Z,C=$,E=(0|B)<(0|C),!E)break;if(F=Z,G=_,H=G+F|0,I=0|d[H>>0],J=I<<24>>24,K=0==(0|J)){aa=12;break}P=Z,Q=P+1|0,Z=Q}return 12==(0|aa)&&(L=e,M=e,N=0|tp(M,68855),Br(L,N,55431)),R=$,c=R,S=c,l=ba,0|S}function vg(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0;return kc=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,e=b,ya=c,Ja=e,wg(ya,Ja),Ua=e,db=0|f[Ua>>2],ob=db>>>11,zb=1&ob,Kb=0!=(0|zb),Vb=e,Kb?(g=Vb+12|0,t=g+4|0,E=0|f[t>>2],ic=E,P=ic,_=P+4|0,ka=0|f[_>>2],ua=1==(0|ka),ua?(va=e,wa=va+12|0,xa=wa+8|0,za=0|f[xa>>2],Aa=ic,Ba=Aa+8|0,Ca=0|f[Ba>>2],Da=(0|za)==(0|Ca),Da?(Ea=ic,Fa=Ea+8|0,Ga=0|f[Fa>>2],Ha=e,Ia=Ha+12|0,Ka=Ia+8|0,f[Ka>>2]=Ga,La=ic,Ma=La+12|0,Na=0|f[Ma>>2],Oa=e,Pa=Oa+12|0,Qa=Pa+4|0,f[Qa>>2]=Na,Ra=e,Sa=Ra+12|0,Ta=0|f[Sa>>2],Va=e,Wa=0|f[Va>>2],Xa=Wa>>>11,Ya=8&Xa,Za=0!=(0|Ya),$a=e,_a=$a+12|0,Za?eb=_a:(ab=_a+8|0,bb=0|f[ab>>2],eb=bb),cb=eb+Ta|0,d[cb>>0]=0,fb=c,gb=ic,Dc(fb,gb)):jc=8):jc=8,8==(0|jc)&&(hb=e,ib=0|f[hb>>2],jb=ib>>>11,kb=8&jb,lb=0!=(0|kb),mb=e,nb=mb+12|0,lb?rb=nb:(pb=nb+8|0,qb=0|f[pb>>2],rb=qb),fc=rb,sb=e,tb=sb+12|0,ub=0|f[tb>>2],ec=ub,vb=c,wb=ec,xb=wb+1|0,yb=0|Jc(vb,xb),hc=yb,Ab=fc,Bb=0!=(0|Ab),Bb&&(Cb=hc,Db=fc,Eb=ec,0|sw(0|Cb,0|Db,0|Eb)),Fb=ec,Gb=hc,Hb=Gb+Fb|0,d[Hb>>0]=0,Ib=hc,Jb=e,Lb=Jb+12|0,Mb=Lb+8|0,f[Mb>>2]=Ib,Nb=ec,Ob=e,Pb=Ob+12|0,Qb=Pb+4|0,f[Qb>>2]=Nb,Rb=c,Sb=ic,tg(Rb,Sb)),Tb=e,Ub=0|f[Tb>>2],Wb=Ub>>>11,Xb=Wb&-2,Yb=0|f[Tb>>2],Zb=2097151&Xb,$b=Zb<<11,_b=2047&Yb,ac=_b|$b,f[Tb>>2]=ac,void(l=kc)):(bc=0|f[Vb>>2],cc=bc>>>11,dc=2&cc,(h=0!=(0|dc))?(i=e,j=i+12|0,k=j+8|0,n=0|f[k>>2],gc=n,o=c,p=e,q=p+12|0,r=0|f[q>>2],s=r+1|0,u=0|Jc(o,s),v=e,w=v+12|0,x=w+8|0,f[x>>2]=u,y=gc,z=0!=(0|y),z&&(A=e,B=0|f[A>>2],C=B>>>11,D=8&C,F=0!=(0|D),G=e,H=G+12|0,F?O=H:(I=H+8|0,J=0|f[I>>2],O=J),K=gc,L=e,M=L+12|0,N=0|f[M>>2],0|sw(0|O,0|K,0|N)),Q=e,R=Q+12|0,S=0|f[R>>2],T=e,U=0|f[T>>2],V=U>>>11,W=8&V,Y=0!=(0|W),Z=e,$=Z+12|0,Y?da=$:(aa=$+8|0,ba=0|f[aa>>2],da=ba),ca=da+S|0,d[ca>>0]=0,ea=e,fa=ea+12|0,ga=0|f[fa>>2],ha=e,ia=ha+12|0,ja=ia+4|0,f[ja>>2]=ga,la=e,ma=0|f[la>>2],na=ma>>>11,oa=na&-3,pa=0|f[la>>2],qa=2097151&oa,ra=qa<<11,sa=2047&pa,ta=sa|ra,f[la>>2]=ta,void(l=kc)):void(l=kc))}function wg(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=d,g=0|f[e>>2],h=g>>>11,i=4&h,(j=0!=(0|i))?(k=c,n=c,o=0|tp(n,67967),Br(k,o,55457),void 0):void(l=q)}function xg(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ua=0;return ua=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,D=e,O=0|f[D>>2],$=O>>>11,ja=8&$,(oa=0!=(0|ja))?(pa=s,(qa=11<(0|pa))?(g=d,h=s,i=h+1|0,j=0|Jc(g,i),sa=j,k=e,n=0|f[k>>2],o=n>>>11,p=496&o,q=p>>4,ra=q,r=sa,t=e,u=t+12|0,v=ra,0|sw(0|r,0|u,0|v),w=e,x=0|f[w>>2],y=x>>>11,z=y&-505,A=0|f[w>>2],B=2097151&z,C=B<<11,E=2047&A,F=E|C,f[w>>2]=F,G=sa,H=e,I=H+12|0,J=I+8|0,f[J>>2]=G,K=ra,L=e,M=L+12|0,f[M>>2]=K,N=s,P=e,Q=P+12|0,R=Q+4|0,f[R>>2]=N,void(l=ua)):void(l=ua)):(S=d,T=e,U=0|f[T>>2],V=U>>>11,W=8&V,Y=0!=(0|W),Z=e,_=Z+12|0,Y?ea=_:(aa=_+8|0,ba=0|f[aa>>2],ea=ba),ca=s,da=ca+1|0,fa=0|Hc(S,ea,da),ga=e,ha=ga+12|0,ia=ha+8|0,f[ia>>2]=fa,ka=s,la=e,ma=la+12|0,na=ma+4|0,f[na>>2]=ka,void(l=ua))}function yg(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Tb=0;return Tb=l,l=l+48|0,(0|l)>=(0|m)&&X(),Ob=Tb+32|0,g=Tb+8|0,e=a,fa=0|f[b>>2],Pb=fa,qa=e,Ba=Pb,vg(qa,Ba),Ma=c+4|0,Xa=0|f[Ma>>2],gb=16==(0|Xa),gb||(rb=e,f[Ob>>2]=0|f[c>>2],f[Ob+4>>2]=0|f[c+4>>2],zg(g,rb,Ob),f[c>>2]=0|f[g>>2],f[c+4>>2]=0|f[g+4>>2]),Cb=0|f[c>>2],Qb=Cb,h=Pb,u=0|f[h>>2],F=u>>>11,Q=8&F,_=0!=(0|Q),aa=Pb,_?(ba=0|f[aa>>2],ca=ba>>>11,da=496&ca,ea=da>>4,wa=ea):(ga=aa+12|0,ha=0|f[ga>>2],wa=ha),ia=Qb,ja=0|f[ia>>2],ka=ja>>>11,la=8&ka,ma=0!=(0|la),na=Qb,ma?(oa=0|f[na>>2],pa=oa>>>11,ra=496&pa,sa=ra>>4,xa=sa):(ta=na+12|0,ua=0|f[ta>>2],xa=ua),va=wa+xa|0,Nb=va,ya=0|f[b>>2],za=0|f[ya>>2],Aa=za>>>11,Ca=8&Aa,Da=0!=(0|Ca),Da?Ja=11:(Ea=0|f[b>>2],Fa=Ea+12|0,Ga=Fa+4|0,Ha=0|f[Ga>>2],Ja=Ha),Ia=Nb,Ka=(0|Ja)<(0|Ia),Ka&&(La=e,Na=Pb,Oa=Nb,xg(La,Na,Oa)),Pa=Pb,Qa=0|f[Pa>>2],Ra=Qa>>>11,Sa=8&Ra,Ta=0!=(0|Sa),Ua=Pb,Va=Ua+12|0,Ta?lb=Va:(Wa=Va+8|0,Ya=0|f[Wa>>2],lb=Ya),Za=Pb,$a=0|f[Za>>2],_a=$a>>>11,ab=8&_a,bb=0!=(0|ab),cb=Pb,bb?(db=0|f[cb>>2],eb=db>>>11,fb=496&eb,hb=fb>>4,mb=hb):(ib=cb+12|0,jb=0|f[ib>>2],mb=jb),kb=lb+mb|0,nb=Qb,ob=0|f[nb>>2],pb=ob>>>11,qb=8&pb,sb=0!=(0|qb),tb=Qb,ub=tb+12|0,sb?Kb=ub:(vb=ub+8|0,wb=0|f[vb>>2],Kb=wb),xb=Qb,yb=0|f[xb>>2],zb=yb>>>11,Ab=8&zb,Bb=0!=(0|Ab),Db=Qb,Bb?(Eb=0|f[Db>>2],Fb=Eb>>>11,Gb=496&Fb,Hb=Gb>>4,Lb=Hb):(Ib=Db+12|0,Jb=0|f[Ib>>2],Lb=Jb),0|sw(0|kb,0|Kb,0|Lb),Mb=Pb,i=0|f[Mb>>2],j=i>>>11,k=8&j,n=0!=(0|k),o=Nb,n?(Rb=o,p=Pb,q=0|f[p>>2],r=q>>>11,s=r&-497,t=0|f[p>>2],v=2097151&s,w=v<<11,x=2047&t,y=x|w,f[p>>2]=y,z=Rb,A=z<<4,B=Pb,C=0|f[B>>2],D=C>>>11,E=D|A,G=0|f[B>>2],H=2097151&E,I=H<<11,J=2047&G,K=J|I,f[B>>2]=K):(L=Pb,M=L+12|0,f[M>>2]=o),N=Nb,O=Pb,P=0|f[O>>2],R=P>>>11,S=8&R,T=0!=(0|S),U=Pb,V=U+12|0,T?($=V,Z=$+N|0,d[Z>>0]=0,void(l=Tb)):(W=V+8|0,Y=0|f[W>>2],$=Y,Z=$+N|0,d[Z>>0]=0,void(l=Tb))}function zg(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,x=0;return x=l,l=l+48|0,(0|l)>=(0|m)&&X(),v=x+40|0,u=x+32|0,t=x+16|0,e=x+8|0,j=x,d=b,k=c+4|0,n=0|f[k>>2],(o=16==(0|n))?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=x)):(p=d,f[u>>2]=0|f[c>>2],f[u+4>>2]=0|f[c+4>>2],Gf(e,p,u,16,64878,64885),f[t>>2]=0|f[e>>2],f[t+4>>2]=0|f[e+4>>2],q=t+4|0,r=0|f[q>>2],s=0==(0|r),s&&(g=0|f[t>>2],h=0!=(0|g),h||(i=d,f[v>>2]=0|f[c>>2],f[v+4>>2]=0|f[c+4>>2],Ff(j,i,v,16,64878,68977),f[t>>2]=0|f[j>>2],f[t+4>>2]=0|f[j+4>>2])),f[a>>2]=0|f[t>>2],f[a+4>>2]=0|f[t+4>>2],void(l=x))}function Ag(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,rb=0;return rb=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=b,g=0|f[c>>2],nb=g,G=0|f[d>>2],ob=G,R=e,ba=nb,ma=0|f[ba>>2],xa=ma>>>11,Ia=8&xa,Ta=0!=(0|Ia),cb=nb,Ta?(h=0|f[cb>>2],u=h>>>11,y=496&u,z=y>>4,Q=z):(A=cb+12|0,B=0|f[A>>2],Q=B),C=ob,D=0|f[C>>2],E=D>>>11,F=8&E,H=0!=(0|F),I=ob,H?(J=0|f[I>>2],K=J>>>11,L=496&K,M=L>>4,S=M):(N=I+12|0,O=0|f[N>>2],S=O),P=Q+S|0,T=0|og(R,0,P),pb=T,U=pb,V=0|f[U>>2],W=V>>>11,Y=8&W,Z=0!=(0|Y),$=pb,_=$+12|0,Z?Aa=_:(aa=_+8|0,ca=0|f[aa>>2],Aa=ca),da=nb,ea=0|f[da>>2],fa=ea>>>11,ga=8&fa,ha=0!=(0|ga),ia=nb,ja=ia+12|0,ha?Ba=ja:(ka=ja+8|0,la=0|f[ka>>2],Ba=la),na=nb,oa=0|f[na>>2],pa=oa>>>11,qa=8&pa,ra=0!=(0|qa),sa=nb,ra?(ta=0|f[sa>>2],ua=ta>>>11,va=496&ua,wa=va>>4,Ca=wa):(ya=sa+12|0,za=0|f[ya>>2],Ca=za),0|sw(0|Aa,0|Ba,0|Ca),Da=pb,Ea=0|f[Da>>2],Fa=Ea>>>11,Ga=8&Fa,Ha=0!=(0|Ga),Ja=pb,Ka=Ja+12|0,Ha?_a=Ka:(La=Ka+8|0,Ma=0|f[La>>2],_a=Ma),Na=nb,Oa=0|f[Na>>2],Pa=Oa>>>11,Qa=8&Pa,Ra=0!=(0|Qa),Sa=nb,Ra?(Ua=0|f[Sa>>2],Va=Ua>>>11,Wa=496&Va,Xa=Wa>>4,ab=Xa):(Ya=Sa+12|0,Za=0|f[Ya>>2],ab=Za),$a=_a+ab|0,bb=ob,db=0|f[bb>>2],eb=db>>>11,fb=8&eb,gb=0!=(0|fb),hb=ob,ib=hb+12|0,gb?v=ib:(jb=ib+8|0,kb=0|f[jb>>2],v=kb),lb=ob,mb=0|f[lb>>2],i=mb>>>11,j=8&i,k=0!=(0|j),n=ob,k?(o=0|f[n>>2],p=o>>>11,q=496&p,r=q>>4,w=r,0|sw(0|$a,0|v,0|w),x=pb,mg(a,x),void(l=rb)):(s=n+12|0,t=0|f[s>>2],w=t,0|sw(0|$a,0|v,0|w),x=pb,mg(a,x),void(l=rb))}function Bg(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Pb=0;Pb=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,ca=0|f[b>>2],Mb=ca,na=0|f[c>>2],Nb=na,ya=Mb,Ja=0|f[ya>>2],Ua=Ja>>>11,db=8&Ua,ob=0!=(0|db),zb=Mb,ob?(g=0|f[zb>>2],t=g>>>11,E=496&t,P=E>>4,la=P):(Y=zb+12|0,Z=0|f[Y>>2],la=Z),$=Nb,_=0|f[$>>2],aa=_>>>11,ba=8&aa,da=0!=(0|ba),ea=Nb,da?(fa=0|f[ea>>2],ga=fa>>>11,ha=496&ga,ia=ha>>4,oa=ia):(ja=ea+12|0,ka=0|f[ja>>2],oa=ka),ma=(0|la)>(0|oa);do{if(ma){if(pa=Nb,qa=0|f[pa>>2],ra=qa>>>11,sa=8&ra,ta=0!=(0|sa),ua=Nb,ta){va=0|f[ua>>2],wa=va>>>11,xa=496&wa,za=xa>>4,Pa=za;break}Aa=ua+12|0,Ba=0|f[Aa>>2],Pa=Ba;break}if(Ca=Mb,Da=0|f[Ca>>2],Ea=Da>>>11,Fa=8&Ea,Ga=0!=(0|Fa),Ha=Mb,Ga){Ia=0|f[Ha>>2],Ka=Ia>>>11,La=496&Ka,Ma=La>>4,Pa=Ma;break}Na=Ha+12|0,Oa=0|f[Na>>2],Pa=Oa;break}while(0);return Kb=Pa,Qa=Mb,Ra=0|f[Qa>>2],Sa=Ra>>>11,Ta=8&Sa,Va=0!=(0|Ta),Wa=Mb,Xa=Wa+12|0,Va?jb=Xa:(Ya=Xa+8|0,Za=0|f[Ya>>2],jb=Za),$a=Nb,_a=0|f[$a>>2],ab=_a>>>11,bb=8&ab,cb=0!=(0|bb),eb=Nb,fb=eb+12|0,cb?kb=fb:(gb=fb+8|0,hb=0|f[gb>>2],kb=hb),ib=Kb,lb=0|iv(jb,kb,ib),Lb=lb,mb=Lb,(nb=0==(0|mb))?(pb=Mb,qb=0|f[pb>>2],rb=qb>>>11,sb=8&rb,tb=0!=(0|sb),ub=Mb,tb?(vb=0|f[ub>>2],wb=vb>>>11,xb=496&wb,yb=xb>>4,n=yb):(Ab=ub+12|0,Bb=0|f[Ab>>2],n=Bb),Cb=Nb,Db=0|f[Cb>>2],Eb=Db>>>11,Fb=8&Eb,Gb=0!=(0|Fb),Hb=Nb,Gb?(Ib=0|f[Hb>>2],Jb=Ib>>>11,h=496&Jb,i=h>>4,p=i):(j=Hb+12|0,k=0|f[j>>2],p=k),(o=(0|n)==(0|p))?(d=0,W=d,l=Pb,0|W):(q=Mb,r=0|f[q>>2],s=r>>>11,u=8&s,v=0!=(0|u),w=Mb,v?(x=0|f[w>>2],y=x>>>11,z=496&y,A=z>>4,R=A):(B=w+12|0,C=0|f[B>>2],R=C),D=Nb,F=0|f[D>>2],G=F>>>11,H=8&G,I=0!=(0|H),J=Nb,I?(K=0|f[J>>2],L=K>>>11,M=496&L,N=M>>4,T=N):(O=J+12|0,Q=0|f[O>>2],T=Q),S=(0|R)>(0|T),S?(d=1,W=d,l=Pb,0|W):(d=-1,W=d,l=Pb,0|W))):(U=Lb,V=(0|U)>0,V?(d=1,W=d,l=Pb,0|W):(d=-1,W=d,l=Pb,0|W))}function Cg(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,N=0;return N=l,l=l+80|0,(0|l)>=(0|m)&&X(),K=N+64|0,G=N+56|0,F=N+48|0,J=N+40|0,I=N+32|0,H=N+24|0,L=N,s=N+8|0,e=a,y=c+4|0,z=0|f[y>>2],(A=z>>>0<8)?(d=0,x=d,l=N,0|x):(B=c+4|0,C=0|f[B>>2],(D=16==(0|C))?(v=e,f[G>>2]=0|f[b>>2],f[G+4>>2]=0|f[b+4>>2],f[K>>2]=0|f[c>>2],f[K+4>>2]=0|f[c+4>>2],w=0|Dg(v,G,K),d=w,x=d,l=N,0|x):(E=c+4|0,g=0|f[E>>2],h=0==(0|g),h&&(i=0|f[c>>2],j=0!=(0|i),!j)?(d=0,x=d,l=N,0|x):(k=e,n=e,o=0|ki(n,64885,6),f[H>>2]=0|f[c>>2],f[H+4>>2]=0|f[c+4>>2],p=0|dq(k,H,o),q=p<<24>>24!=0,q?(r=e,f[I>>2]=0|f[c>>2],f[I+4>>2]=0|f[c+4>>2],Yj(s,r,I,64885,0,L),f[c>>2]=0|f[s>>2],f[c+4>>2]=0|f[s+4>>2],t=e,f[J>>2]=0|f[c>>2],f[J+4>>2]=0|f[c+4>>2],f[F>>2]=0|f[b>>2],f[F+4>>2]=0|f[b+4>>2],u=0|lf(t,J,F),d=u,x=d,l=N,0|x):(d=0,x=d,l=N,0|x))))}function Dg(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ja=0;return ja=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,s=0|f[b>>2],D=0|f[s>>2],O=D>>>11,$=8&O,da=0!=(0|$),ea=0|f[b>>2],da?(fa=0|f[ea>>2],ga=fa>>>11,g=496&ga,h=g>>4,k=h):(i=ea+12|0,j=0|f[i>>2],k=j),ha=k,n=ha,o=0|f[c>>2],p=0|f[o>>2],q=p>>>11,r=8&q,t=0!=(0|r),u=0|f[c>>2],t?(v=0|f[u>>2],w=v>>>11,x=496&w,y=x>>4,C=y):(z=u+12|0,A=0|f[z>>2],C=A),(B=(0|n)!=(0|C))?(d=0,ca=d,l=ja,0|ca):(E=0|f[b>>2],F=0|f[E>>2],G=F>>>11,H=8&G,I=0!=(0|H),J=0|f[b>>2],K=J+12|0,I?Z=K:(L=K+8|0,M=0|f[L>>2],Z=M),N=0|f[c>>2],P=0|f[N>>2],Q=P>>>11,R=8&Q,S=0!=(0|R),T=0|f[c>>2],U=T+12|0,S?_=U:(V=U+8|0,W=0|f[V>>2],_=W),Y=ha,aa=0|iv(Z,_,Y),ba=0==(0|aa),ba?(d=1,ca=d,l=ja,0|ca):(d=0,ca=d,l=ja,0|ca))}function Eg(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+32|0,(0|l)>=(0|m)&&X(),r=u+16|0,s=u,c=a,d=c,f[r>>2]=0|f[b>>2],f[r+4>>2]=0|f[b+4>>2],zg(s,d,r),h=0|f[s>>2],i=0|f[h>>2],j=i>>>11,k=8&j,n=0!=(0|k),o=0|f[s>>2],p=o+12|0,n?(g=p,l=u,0|g):(q=p+8|0,e=0|f[q>>2],g=e,l=u,0|g)}function Fg(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,h=0;h=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=c,e=c,f=0|tp(e,64809),Br(d,f,55484)}function Gg(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;return n=l,l=l+32|0,(0|l)>=(0|m)&&X(),j=n+16|0,i=n+8|0,c=a,d=c,f[i>>2]=0|f[b>>2],f[i+4>>2]=0|f[b+4>>2],e=0|_r(d,i),(g=e<<24>>24!=0)?(h=c,f[j>>2]=0|f[b>>2],f[j+4>>2]=0|f[b+4>>2],Fg(h,j),void(l=n)):void(l=n)}function Hg(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;t=l,l=l+32|0,(0|l)>=(0|m)&&X(),r=t+16|0,d=b,e=0|f[c>>2],q=e,g=d,h=0|og(g,0,0),p=h,i=d,j=p,f[r>>2]=0|f[c>>2],f[r+4>>2]=0|f[c+4>>2],Ig(i,j,r),k=d,n=p,o=q,Jg(a,k,n,o),l=t}function Ig(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,g=0|f[c>>2],h=g+4|0,i=0|f[h>>2],j=e,k=j+4|0,f[k>>2]=i,l=o}function Jg(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,fc=0;fc=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=b,g=c,wa=d,Ha=e,Sa=g,wg(Ha,Sa),bb=wa,mb=0|f[bb>>2],xb=mb>>>11,Ib=8&xb,Tb=0!=(0|Ib),h=wa,Tb?(u=0|f[h>>2],F=u>>>11,Q=496&F,aa=Q>>4,ta=aa):(la=h+12|0,sa=0|f[la>>2],ta=sa),cc=ta,ua=g,va=0|f[ua>>2],xa=va>>>11,ya=1&xa,za=0!=(0|ya),za?(Aa=e,Ba=g,Ca=Ba+12|0,Da=Ca+4|0,Ea=0|f[Da>>2],tg(Aa,Ea)):(Fa=g,Ga=0|f[Fa>>2],Ia=Ga>>>11,Ja=8&Ia,Ka=0!=(0|Ja),Ka||(La=g,Ma=0|f[La>>2],Na=Ma>>>11,Oa=2&Na,Pa=0!=(0|Oa),Pa||(Qa=e,Ra=g,Ta=Ra+12|0,Ua=Ta+8|0,Va=0|f[Ua>>2],Dc(Qa,Va)))),Wa=g,Xa=0|f[Wa>>2],Ya=Xa>>>11,Za=Ya&-3,$a=0|f[Wa>>2],_a=2097151&Za,ab=_a<<11,cb=2047&$a,db=cb|ab,f[Wa>>2]=db,eb=wa,fb=0|f[eb>>2],gb=fb>>>11,hb=1&gb,ib=0!=(0|hb);do if(!ib){if(bc=cc,i=(0|bc)<=11,!i){pa=e,qa=wa,Kg(pa,qa);break}return j=g,k=0|f[j>>2],n=k>>>11,o=n&-2,p=0|f[j>>2],q=2097151&o,r=q<<11,s=2047&p,t=s|r,f[j>>2]=t,v=g,w=0|f[v>>2],x=w>>>11,y=8|x,z=0|f[v>>2],A=2097151&y,B=A<<11,C=2047&z,D=C|B,f[v>>2]=D,E=g,G=E+12|0,H=wa,I=0|f[H>>2],J=I>>>11,K=8&J,L=0!=(0|K),M=wa,N=M+12|0,L?S=N:(O=N+8|0,P=0|f[O>>2],S=P),R=cc,0|sw(0|G,0|S,0|R),T=cc,dc=T,U=g,V=0|f[U>>2],W=V>>>11,Y=W&-497,Z=0|f[U>>2],$=2097151&Y,_=$<<11,ba=2047&Z,ca=ba|_,f[U>>2]=ca,da=dc,ea=da<<4,fa=g,ga=0|f[fa>>2],ha=ga>>>11,ia=ha|ea,ja=0|f[fa>>2],ka=2097151&ia,ma=ka<<11,na=2047&ja,oa=na|ma,f[fa>>2]=oa,ra=g,mg(a,ra),void(l=fc)}while(0);jb=g,kb=0|f[jb>>2],lb=kb>>>11,nb=lb&-505,ob=0|f[jb>>2],pb=2097151&nb,qb=pb<<11,rb=2047&ob,sb=rb|qb,f[jb>>2]=sb,tb=wa,ub=tb+12|0,vb=ub+8|0,wb=0|f[vb>>2],yb=g,zb=yb+12|0,Ab=zb+8|0,f[Ab>>2]=wb,Bb=cc,Cb=g,Db=Cb+12|0,f[Db>>2]=Bb,Eb=wa,Fb=Eb+12|0,Gb=Fb+4|0,Hb=0|f[Gb>>2],Jb=g,Kb=Jb+12|0,Lb=Kb+4|0,f[Lb>>2]=Hb,Mb=g,Nb=0|f[Mb>>2],Ob=Nb>>>11,Pb=1|Ob,Qb=0|f[Mb>>2],Rb=2097151&Pb,Sb=Rb<<11,Ub=2047&Qb,Vb=Ub|Sb,f[Mb>>2]=Vb,Wb=g,Xb=Wb+12|0,Yb=Xb+4|0,Zb=0|f[Yb>>2],$b=Zb+4|0,_b=0|f[$b>>2],ac=_b+1|0,f[$b>>2]=ac,ra=g,mg(a,ra),l=fc}function Kg(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Cb=0;if(Cb=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,e=b,R=e,ba=0|f[R>>2],ma=ba>>>11,xa=1&ma,Ia=0!=(0|xa))return void(l=Cb);Ta=c,cb=0|Jc(Ta,16),zb=cb,nb=zb,g=nb+4|0,f[g>>2]=1,t=e,E=0|f[t>>2],K=E>>>11,L=8&K,M=0!=(0|L),N=e,O=0|f[N>>2],P=O>>>11;do{if(!M){if(Fa=2&P,Ga=0!=(0|Fa),Ha=zb,Ja=0|d[Ha>>0],Ka=Ja&-2,Ga){La=1|Ka,d[Ha>>0]=La,Ma=e,Na=Ma+12|0,Oa=Na+8|0,Pa=0|f[Oa>>2],Qa=zb,Ra=Qa+8|0,f[Ra>>2]=Pa,Sa=e,Ua=0|f[Sa>>2],Va=Ua>>>11,Wa=Va&-3,Xa=0|f[Sa>>2],Ya=2097151&Wa,Za=Ya<<11,$a=2047&Xa,_a=$a|Za,f[Sa>>2]=_a;break}if(d[Ha>>0]=Ka,ab=e,bb=ab+12|0,db=bb+4|0,eb=0|f[db>>2],fb=e,gb=fb+12|0,hb=0|f[gb>>2],ib=(0|eb)>(0|hb)){jb=c,kb=e,lb=kb+12|0,mb=lb+8|0,ob=0|f[mb>>2],pb=e,qb=pb+12|0,rb=0|f[qb>>2],sb=rb+1|0,tb=0|Hc(jb,ob,sb),ub=zb,vb=ub+8|0,f[vb>>2]=tb,wb=e,xb=wb+12|0,h=xb+8|0,f[h>>2]=tb;break}i=e,j=i+12|0,k=j+8|0,n=0|f[k>>2],o=zb,p=o+8|0,f[p>>2]=n;break}Q=496&P,S=Q>>4,yb=S,T=c,U=yb,V=U+1|0,W=0|Jc(T,V),Ab=W,Y=Ab,Z=e,$=Z+12|0,_=yb,0|sw(0|Y,0|$,0|_),aa=yb,ca=Ab,da=ca+aa|0,d[da>>0]=0,ea=e,fa=0|f[ea>>2],ga=fa>>>11,ha=ga&-505,ia=0|f[ea>>2],ja=2097151&ha,ka=ja<<11,la=2047&ia,na=la|ka,f[ea>>2]=na,oa=Ab,pa=e,qa=pa+12|0,ra=qa+8|0,f[ra>>2]=oa,sa=yb,ta=e,ua=ta+12|0,f[ua>>2]=sa,va=zb,wa=0|d[va>>0],ya=wa&-2,d[va>>0]=ya,za=e,Aa=za+12|0,Ba=Aa+8|0,Ca=0|f[Ba>>2],Da=zb,Ea=Da+8|0,f[Ea>>2]=Ca}while(0);q=e,r=q+12|0,s=0|f[r>>2],u=zb,v=u+12|0,f[v>>2]=s,w=zb,x=e,y=x+12|0,z=y+4|0,f[z>>2]=w,A=e,B=0|f[A>>2],C=B>>>11,D=1|C,F=0|f[A>>2],G=2097151&D,H=G<<11,I=2047&F,J=I|H,f[A>>2]=J,l=Cb}function Lg(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,W=0;return W=l,l=l+32|0,(0|l)>=(0|m)&&X(),U=W+24|0,T=W+16|0,g=b,h=d,u=e,f[T>>2]=0|f[c>>2],f[T+4>>2]=0|f[c+4>>2],F=0|Mg(T,-1),S=F,M=u,(N=(0|M)<0)?(Og(a),void(l=W)):(O=S,P=0==(0|O),P?u=0:(Q=h,R=(0|Q)<0,R&&(i=S,j=h,k=i+j|0,h=k)),n=h,o=S,(p=(0|n)>(0|o))?(Og(a),void(l=W)):(q=h,r=(0|q)<0,r&&(s=S,t=h,v=t+s|0,h=v,w=h,x=(0|w)<0)?(Og(a),void(l=W)):(y=h,z=u,A=y+z|0,B=S,C=(0|A)>(0|B),C&&(D=S,E=h,G=D-E|0,u=G),H=u,I=(0|H)<=0,I&&(u=0),J=g,K=h,L=u,f[U>>2]=0|f[c>>2],f[U+4>>2]=0|f[c+4>>2],Pg(a,J,U,K,L),void(l=W))))}function Mg(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Z=0;Z=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=b,W=0,d=0|f[a>>2],r=0|f[d>>2],C=r>>>11,N=8&C,P=0!=(0|N),Q=0|f[a>>2],R=Q+12|0,P?e=R:(S=R+8|0,T=0|f[S>>2],e=T),V=e,g=V,U=g,h=c,i=(0|h)<0;do{if(i){if(j=0|f[a>>2],k=0|f[j>>2],n=k>>>11,o=8&n,p=0!=(0|o),q=0|f[a>>2],p){s=0|f[q>>2],t=s>>>11,u=496&t,v=u>>4,B=v;break}w=q+12|0,x=0|f[w>>2],B=x;break}y=c,B=y}while(0);for(z=U,A=z+B|0,U=A;;){if(D=V,E=U,F=D>>>0<E>>>0,!F)break;G=V,H=U,I=0|Ng(G,H),J=V,K=J+I|0,V=K,L=W,M=L+1|0,W=M}return O=W,l=Z,0|O}function Ng(a,b){a|=0,b|=0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;if(K=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,r=b,A=e,B=0|d[A>>0],C=255&B,D=55513+C|0,E=0|d[D>>0],F=E<<24>>24,I=F,G=e,f=I,g=G+f|0,h=r,i=g>>>0>h>>>0)return c=1,z=c,l=K,0|z;for(H=1;;){if(j=H,k=I,n=(0|j)<(0|k),!n){J=8;break}if(o=H,p=e,q=p+o|0,s=0|d[q>>0],t=s<<24>>24,u=192&t,v=128!=(0|u)){J=6;break}w=H,x=w+1|0,H=x}return 6==(0|J)?(c=1,z=c,l=K,0|z):8==(0|J)?(y=I,c=y,z=c,l=K,0|z):0}function Og(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Pg(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,x=0;x=l,l=l+48|0,(0|l)>=(0|m)&&X(),v=x+32|0,u=x+24|0,t=x+16|0,g=b,h=d,j=e,k=h,f[t>>2]=0|f[c>>2],f[t+4>>2]=0|f[c+4>>2],n=0|Qg(t,0,k),h=n,o=h,p=j,f[u>>2]=0|f[c>>2],f[u+4>>2]=0|f[c+4>>2],q=0|Qg(u,o,p),j=q,r=g,s=h,i=j,f[v>>2]=0|f[c>>2],f[v+4>>2]=0|f[c+4>>2],Rg(a,r,v,s,i),l=x}function Qg(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0;for(pa=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=b,e=c,s=0|f[a>>2],D=0|f[s>>2],O=D>>>11,$=8&O,fa=0!=(0|$),ga=0|f[a>>2],ha=ga+12|0,fa?j=ha:(ia=ha+8|0,g=0|f[ia>>2],j=g),h=d,i=j+h|0,na=i,k=0|f[a>>2],n=0|f[k>>2],o=n>>>11,p=8&o,q=0!=(0|p),r=0|f[a>>2],t=r+12|0,q?K=t:(u=t+8|0,v=0|f[u>>2],K=v),w=0|f[a>>2],x=0|f[w>>2],y=x>>>11,z=8&y,A=0!=(0|z),B=0|f[a>>2],A?(C=0|f[B>>2],E=C>>>11,F=496&E,G=F>>4,L=G):(H=B+12|0,I=0|f[H>>2],L=I),J=K+L|0,ka=J,la=0,ja=0;;){if(M=na,N=ka,P=M>>>0<N>>>0,!P){oa=14;break}if(Q=la,R=e,S=(0|Q)<(0|R),!S){oa=14;break}T=na,U=ka,V=0|Ng(T,U),ma=V,W=ma,Y=ja,Z=Y+W|0,ja=Z,_=ma,aa=na,ba=aa+_|0,na=ba,ca=la,da=ca+1|0,la=da}return 14==(0|oa)?(ea=ja,l=pa,0|ea):0}function Rg(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,oa=0;return oa=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=b,h=d,u=e,F=0|f[c>>2],ka=F,Q=ka,aa=0|f[Q>>2],ga=aa>>>11,ha=8&ga,ia=0!=(0|ha),ja=g,i=ka,ia?(j=i+12|0,k=h,n=j+k|0,o=u,p=0|og(ja,n,o),la=p,fa=la,mg(a,fa),void(l=oa)):(Kg(ja,i),q=ka,r=q+12|0,s=r+4|0,t=0|f[s>>2],ma=t,v=g,w=g,x=w+48|0,y=0|f[x>>2],z=0|Tc(v,16,y),la=z,A=ka,B=A+12|0,C=B+8|0,D=0|f[C>>2],E=h,G=D+E|0,H=la,I=H+12|0,J=I+8|0,f[J>>2]=G,K=u,L=la,M=L+12|0,f[M>>2]=K,N=ma,O=la,P=O+12|0,R=P+4|0,f[R>>2]=N,S=la,T=0|f[S>>2],U=T>>>11,V=1|U,W=0|f[S>>2],Y=2097151&V,Z=Y<<11,$=2047&W,_=$|Z,f[S>>2]=_,ba=ma,ca=ba+4|0,da=0|f[ca>>2],ea=da+1|0,f[ca>>2]=ea,fa=la,mg(a,fa),void(l=oa))}function Sg(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Z=0;for(Z=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,e=0|f[b>>2],W=e,s=W,D=0|f[s>>2],N=D>>>11,O=8&N,P=0!=(0|O),Q=W,P?(R=0|f[Q>>2],S=R>>>11,g=496&S,h=g>>4,k=h):(i=Q+12|0,j=0|f[i>>2],k=j),U=k,n=W,o=0|f[n>>2],p=o>>>11,q=8&p,r=0!=(0|q),t=W,u=t+12|0,r?x=u:(v=u+8|0,w=0|f[v>>2],x=w),V=x,T=0;;){if(y=U,z=y+-1|0,U=z,A=0!=(0|y),B=T,!A)break;C=65599*B|0,E=V,F=0|d[E>>0],G=F<<24>>24,H=C+G|0,T=H,I=V,J=I+1|0,V=J}return K=T,L=K>>5,M=B+L|0,l=Z,0|M}function Tg(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,j=0;j=l,l=l+16|0,(0|l)>=(0|m)&&X(),h=j+8|0,d=b,e=d,f[h>>2]=0|f[c>>2],f[h+4>>2]=0|f[c+4>>2],g=0|mi(e,h),Ug(a,g),l=j}function Ug(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=4,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function Vg(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;return v=l,l=l+48|0,(0|l)>=(0|m)&&X(),r=v+40|0,q=v+32|0,t=v,s=v+16|0,e=v+8|0,d=b,g=c+4|0,h=0|f[g>>2],(i=16==(0|h))?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=v)):(j=d,f[q>>2]=0|f[c>>2],f[q+4>>2]=0|f[c+4>>2],Yj(e,j,q,68977,0,t),f[s>>2]=0|f[e>>2],f[s+4>>2]=0|f[e+4>>2],k=s+4|0,n=0|f[k>>2],o=16==(0|n),o?(f[a>>2]=0|f[s>>2],f[a+4>>2]=0|f[s+4>>2],void(l=v)):(p=d,f[r>>2]=0|f[c>>2],f[r+4>>2]=0|f[c+4>>2],Jf(a,p,r),void(l=v)))}function Wg(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0;for(_a=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=b,g=c,t=g,E=t,Va=E,P=e,_=0|og(P,0,10),Ya=_,ka=Ya,va=0|f[ka>>2],Ga=va>>>11,Ra=8&Ga,h=0!=(0|Ra),i=Ya,j=i+12|0,h?o=j:(k=j+8|0,n=0|f[k>>2],o=n),Wa=o,p=Wa,q=p+1|0,Wa=q,d[p>>0]=48,r=Wa,s=r+1|0,Wa=s,d[r>>0]=120,u=Wa,Xa=u;;)if(v=Va,w=(v>>>0)%16&-1,x=55345+w|0,y=0|d[x>>0],z=Xa,A=z+1|0,Xa=A,d[z>>0]=y,B=Va,C=(B>>>0)/16&-1,Va=C,D=Va,F=D>>>0>0,!F)break;for(G=Xa,d[G>>0]=0,H=Ya,I=0|f[H>>2],J=I>>>11,K=8&J,L=0!=(0|K),M=Xa,N=Ya,O=0|f[N>>2],Q=O>>>11,R=8&Q,S=0!=(0|R),T=Ya,U=T+12|0,L?(S?Z=U:(V=U+8|0,W=0|f[V>>2],Z=W),Y=M,$=Z,aa=Y-$|0,Za=aa,ba=Ya,ca=0|f[ba>>2],da=ca>>>11,ea=da&-497,fa=0|f[ba>>2],ga=2097151&ea,ha=ga<<11,ia=2047&fa,ja=ia|ha,f[ba>>2]=ja,la=Za,ma=la<<4,na=Ya,oa=0|f[na>>2],pa=oa>>>11,qa=pa|ma,ra=0|f[na>>2],sa=2097151&qa,ta=sa<<11,ua=2047&ra,wa=ua|ta,f[na>>2]=wa):(S?Aa=U:(xa=U+8|0,ya=0|f[xa>>2],Aa=ya),za=M,Ba=Aa,Ca=za-Ba|0,Da=Ya,Ea=Da+12|0,f[Ea>>2]=Ca);;){if(Fa=Wa,Ha=Xa,Ia=Fa>>>0<Ha>>>0,!Ia)break;Ja=Wa,Ka=0|d[Ja>>0],Ua=Ka,La=Xa,Ma=La+-1|0,Xa=Ma,Na=0|d[Ma>>0],Oa=Wa,Pa=Oa+1|0,Wa=Pa,d[Oa>>0]=Na,Qa=Ua,Sa=Xa,d[Sa>>0]=Qa}Ta=Ya,mg(a,Ta),l=_a}function Xg(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i+8|0,d=b,e=d,f[g>>2]=0|f[c>>2],f[g+4>>2]=0|f[c+4>>2],Gf(a,e,g,16,64878,64885),l=i}function Yg(a,b,c,e,g){a|=0,b|=0,c|=0,e|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0;
+vf=l,l=l+96|0,(0|l)>=(0|m)&&X(),tf=vf+24|0,sf=vf+16|0,rf=vf+8|0,kf=vf,Yd=vf+48|0,he=vf+40|0,se=vf+32|0,h=b,i=c,pb=e,sd=g,of=1,De=kf,Oe=De,f[Oe>>2]=0,Ze=De+4|0,j=Ze,f[j>>2]=0,w=i,I=0!=(0|w);do if(I){for(;;){if(oa=i,za=0|d[oa>>0],Ka=za<<24>>24,Va=32==(0|Ka),Va?Od=1:(eb=i,qb=0|d[eb>>0],Bb=qb<<24>>24,Mb=Bb-9|0,Xb=Mb>>>0<5,Od=Xb),gc=i,!Od)break;rc=gc+1|0,i=rc}if(Cc=0|d[gc>>0],Nc=Cc<<24>>24,Yc=43==(0|Nc),hd=i,Yc?(td=hd+1|0,i=td):(Ed=0|d[hd>>0],Pd=Ed<<24>>24,Rd=45==(0|Pd),Rd&&(Sd=i,Td=Sd+1|0,i=Td,of=0)),Ud=i,Vd=0|d[Ud>>0],Wd=Vd<<24>>24,Xd=43==(0|Wd),!Xd&&(Zd=i,$d=0|d[Zd>>0],_d=$d<<24>>24,ae=45==(0|_d),!ae)){de=pb,ee=(0|de)<=0;a:do if(ee){if(fe=i,ge=0|d[fe>>0],ie=ge<<24>>24,je=48==(0|ie),!je){if(oe=pb,pe=(0|oe)<-1){qe=pb,re=0-qe|0,pb=re;break}pb=10;break}switch(ke=i,le=ke+1|0,me=0|d[le>>0],ne=me<<24>>24,0|ne){case 88:case 120:pb=16;break a;case 66:case 98:pb=2;break a;case 79:case 111:pb=8;break a;case 68:case 100:pb=10;break a;default:pb=8;break a}}while(0);te=pb;a:do switch(0|te){case 2:if(ue=i,ve=0|d[ue>>0],we=ve<<24>>24,xe=48==(0|we)){if(ye=i,ze=ye+1|0,Ae=0|d[ze>>0],Be=Ae<<24>>24,Ce=98==(0|Be),!Ce&&(Ee=i,Fe=Ee+1|0,Ge=0|d[Fe>>0],He=Ge<<24>>24,Ie=66==(0|He),!Ie))break a;Je=i,Ke=Je+2|0,i=Ke}break;case 15:case 14:case 13:case 12:case 11:case 9:case 7:case 6:case 5:case 4:case 3:break;case 8:if(Le=i,Me=0|d[Le>>0],Ne=Me<<24>>24,Pe=48==(0|Ne)){if(Qe=i,Re=Qe+1|0,Se=0|d[Re>>0],Te=Se<<24>>24,Ue=111==(0|Te),!Ue&&(Ve=i,We=Ve+1|0,Xe=0|d[We>>0],Ye=Xe<<24>>24,$e=79==(0|Ye),!$e))break a;_e=i,af=_e+2|0,i=af}break;case 10:if(bf=i,cf=0|d[bf>>0],df=cf<<24>>24,ef=48==(0|df)){if(ff=i,gf=ff+1|0,hf=0|d[gf>>0],k=hf<<24>>24,n=100==(0|k),!n&&(o=i,p=o+1|0,q=0|d[p>>0],r=q<<24>>24,s=68==(0|r),!s))break a;t=i,u=t+2|0,i=u}break;case 16:if(v=i,x=0|d[v>>0],y=x<<24>>24,z=48==(0|y)){if(A=i,B=A+1|0,C=0|d[B>>0],D=C<<24>>24,E=120==(0|D),!E&&(G=i,H=G+1|0,J=0|d[H>>0],K=J<<24>>24,L=88==(0|K),!L))break a;M=i,N=M+2|0,i=N}break;default:O=pb,P=(0|O)<2,Q=pb,R=36<(0|Q),lf=P|R,lf&&(S=h,U=h,V=0|tp(U,68855),W=pb,Zg(Yd,W),d[rf>>0]=0|d[Yd>>0],d[rf+1>>0]=0|d[Yd+1>>0],d[rf+2>>0]=0|d[Yd+2>>0],d[rf+3>>0]=0|d[Yd+3>>0],d[rf+4>>0]=0|d[Yd+4>>0],d[rf+5>>0]=0|d[Yd+5>>0],d[rf+6>>0]=0|d[Yd+6>>0],d[rf+7>>0]=0|d[Yd+7>>0],Er(S,V,55769,rf))}while(0);Y=i,Z=0|d[Y>>0],$=Z<<24>>24,_=48==(0|$);do if(_){for(pf=0;;){if(aa=i,ba=aa+1|0,i=ba,ca=0|d[ba>>0],ea=ca<<24>>24,jf=ea,fa=48==(0|ea),ga=jf,ha=95==(0|ga),ia=fa?1:ha,!ia)break;if(ja=jf,ka=95==(0|ja)){if(la=pf,ma=la+1|0,pf=ma,na=(0|ma)>=2)break}else pf=0}if(pa=i,qa=0|d[pa>>0],ra=qa<<24>>24,jf=ra,sa=0==(0|ra),ta=jf,ua=32==(0|ta),mf=sa|ua,!mf&&(va=jf,wa=va-9|0,xa=wa>>>0<5,!xa))break;ya=i,Aa=ya+-1|0,i=Aa}while(0);Ba=i,Ca=0|d[Ba>>0],Da=Ca<<24>>24,jf=Da,Ea=jf,Fa=Ea-48|0,Ga=Fa>>>0<10,Ha=jf;do if(Ga)Ia=Ha-48|0,Ua=Ia;else{if(Ja=Ha-97|0,La=Ja>>>0<26,Ma=jf,La){Na=Ma-97|0,Oa=Na+10|0,Ua=Oa;break}Pa=Ma-65|0,Qa=Pa>>>0<26,Qa?(Ra=jf,Sa=Ra-65|0,Ta=Sa+10|0,Ua=Ta):Ua=-1}while(0);if(jf=Ua,Wa=jf,Xa=(0|Wa)<0,!Xa&&(Ya=jf,Za=pb,$a=(0|Ya)>=(0|Za),!$a)){for(pf=0,bb=i,nf=bb;;){if(cb=nf,db=0|d[cb>>0],fb=db<<24>>24!=0,!fb)break;if(gb=nf,hb=0|d[gb>>0],ib=hb<<24>>24,jb=95==(0|ib)){if(kb=pf,lb=0==(0|kb),!lb){uf=70;break}mb=pf,nb=mb+1|0,pf=nb}else{pf=0,sb=nf,tb=0|d[sb>>0],ub=tb<<24>>24,vb=ub-48|0,wb=vb>>>0<10,xb=nf,yb=0|d[xb>>0],zb=yb<<24>>24;do if(wb)Ab=zb-48|0,Rb=Ab;else{if(Cb=zb-97|0,Db=Cb>>>0<26,Eb=nf,Fb=0|d[Eb>>0],Gb=Fb<<24>>24,Db){Hb=Gb-97|0,Ib=Hb+10|0,Rb=Ib;break}Jb=Gb-65|0,Kb=Jb>>>0<26,Kb?(Lb=nf,Nb=0|d[Lb>>0],Ob=Nb<<24>>24,Pb=Ob-65|0,Qb=Pb+10|0,Rb=Qb):Rb=-1}while(0);if(jf=Rb,Sb=jf,Tb=(0|Sb)<0){uf=79;break}if(Ub=jf,Vb=pb,Wb=(0|Ub)>=(0|Vb)){uf=79;break}if($b=pb,_b=(0|$b)<0,ac=_b<<31>>31,bc=kf,cc=bc,dc=0|f[cc>>2],ec=bc+4|0,fc=ec,hc=0|f[fc>>2],ic=0|xw(0|dc,0|hc,0|$b,0|ac),jc=F,kc=kf,lc=kc,f[lc>>2]=ic,mc=kc+4|0,nc=mc,f[nc>>2]=jc,oc=jf,pc=(0|oc)<0,qc=pc<<31>>31,sc=kf,tc=sc,uc=0|f[tc>>2],vc=sc+4|0,wc=vc,xc=0|f[wc>>2],yc=0|mw(0|uc,0|xc,0|oc,0|qc),zc=F,Ac=kf,Bc=Ac,f[Bc>>2]=yc,Dc=Ac+4|0,Ec=Dc,f[Ec>>2]=zc,Fc=kf,Gc=Fc,Hc=0|f[Gc>>2],Ic=Fc+4|0,Jc=Ic,Kc=0|f[Jc>>2],Lc=Kc>>>0>0,Mc=Hc>>>0>2147483647,Oc=0==(0|Kc),Pc=Oc&Mc,Qc=Lc|Pc){uf=81;break}}Wc=nf,Xc=Wc+1|0,nf=Xc}if(70==(0|uf)){if(ob=sd,rb=0!=(0|ob))break}else if(79==(0|uf)){if(Yb=sd,Zb=0!=(0|Yb))break}else 81==(0|uf)&&(Rc=h,Sc=h,Tc=0|tp(Sc,68855),Uc=h,Vc=i,qg(he,Uc,Vc),d[sf>>0]=0|d[he>>0],d[sf+1>>0]=0|d[he+1>>0],d[sf+2>>0]=0|d[he+2>>0],d[sf+3>>0]=0|d[he+3>>0],d[sf+4>>0]=0|d[he+4>>0],d[sf+5>>0]=0|d[he+5>>0],d[sf+6>>0]=0|d[he+6>>0],d[sf+7>>0]=0|d[he+7>>0],Er(Rc,Tc,55786,sf));if(Zc=kf,$c=Zc,_c=0|f[$c>>2],ad=Zc+4|0,bd=ad,cd=0|f[bd>>2],qf=_c,dd=sd,ed=0!=(0|dd)){if(fd=nf,gd=i,id=(0|fd)==(0|gd))break;for(;;){if(jd=nf,kd=0|d[jd>>0],ld=kd<<24>>24,md=0!=(0|ld),md?(nd=nf,od=0|d[nd>>0],pd=od<<24>>24,qd=32==(0|pd),qd?Qd=1:(rd=nf,ud=0|d[rd>>0],vd=ud<<24>>24,wd=vd-9|0,xd=wd>>>0<5,Qd=xd)):Qd=0,yd=nf,!Qd)break;zd=yd+1|0,nf=zd}if(Ad=0|d[yd>>0],Bd=Ad<<24>>24!=0)break}return Cd=of,Dd=Cd<<24>>24,Fd=0!=(0|Dd),Gd=qf,Hd=0-Gd|0,Id=Fd?Gd:Hd,Zg(a,Id),void(l=vf)}if(_a=sd,ab=0!=(0|_a))break;return Zg(a,0),void(l=vf)}if(be=sd,ce=0!=(0|be),!ce)return Zg(a,0),void(l=vf)}else if(T=sd,da=0!=(0|T),!da)return Zg(a,0),void(l=vf);while(0);Jd=h,Kd=h,Ld=0|tp(Kd,68855),Md=h,Nd=i,qg(se,Md,Nd),d[tf>>0]=0|d[se>>0],d[tf+1>>0]=0|d[se+1>>0],d[tf+2>>0]=0|d[se+2>>0],d[tf+3>>0]=0|d[se+3>>0],d[tf+4>>0]=0|d[se+4>>0],d[tf+5>>0]=0|d[se+5>>0],d[tf+6>>0]=0|d[se+6>>0],d[tf+7>>0]=0|d[se+7>>0],Er(Jd,Ld,55818,tf)}function Zg(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=3,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function $g(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,aa=0;return aa=l,l=l+48|0,(0|l)>=(0|m)&&X(),c=aa+40|0,$=aa+16|0,g=a,t=b,E=g,P=t,f[c>>2]=0|f[P>>2],f[c+4>>2]=0|f[P+4>>2],zg($,E,c),R=0|f[$>>2],Z=R,S=g,T=Z,U=0|ug(S,T),W=U,V=Z,h=0|f[V>>2],i=h>>>11,j=8&i,k=0!=(0|j),n=Z,o=n+12|0,k?r=o:(p=o+8|0,q=0|f[p>>2],r=q),Y=r,s=Y,u=0!=(0|s),u&&(v=W,w=Y,x=w+v|0,y=0|d[x>>0],z=y<<24>>24,A=0!=(0|z),!A)?(O=Y,e=O,Q=e,l=aa,0|Q):(B=g,C=Z,vg(B,C),D=Z,F=0|f[D>>2],G=F>>>11,H=8&G,I=0!=(0|H),J=Z,K=J+12|0,I?N=K:(L=K+8|0,M=0|f[L>>2],N=M),e=N,Q=e,l=aa,0|Q)}function _g(a,b,c,e,g){a|=0,b|=0,c|=0,e|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ia=0;ia=l,l=l+48|0,(0|l)>=(0|m)&&X(),fa=ia+24|0,h=b,i=e,v=g,G=v,R=G<<24>>24!=0,$=h,R?(_=0|$g($,c),ea=_):(f[fa>>2]=0|f[c>>2],f[fa+4>>2]=0|f[c+4>>2],aa=0|Eg($,fa),ea=aa),ba=ea,ca=0!=(0|ba),ca&&(j=0|f[c>>2],k=0|f[j>>2],n=k>>>11,o=8&n,p=0!=(0|o),q=0|f[c>>2],p?(r=0|f[q>>2],s=r>>>11,t=496&s,u=t>>4,y=u):(w=q+12|0,x=0|f[w>>2],y=x),da=y,z=da,A=ea,B=A+z|0,C=0|d[B>>0],D=C<<24>>24!=0,D&&(E=h,F=ea,H=da,I=0|og(E,F,H),ga=I,J=ga,K=0|f[J>>2],L=K>>>11,M=8&L,N=0!=(0|M),O=ga,P=O+12|0,N?T=P:(Q=P+8|0,S=0|f[Q>>2],T=S),ea=T)),U=h,V=ea,W=i,Y=v,Z=255&Y,Yg(a,U,V,W,Z),l=ia}function ah(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,_b=0;if(_b=l,l=l+128|0,(0|l)>=(0|m)&&X(),Zb=_b+16|0,Wb=_b+40|0,Tb=_b+54|0,Ha=_b+32|0,g=a,la=b,wa=c,Sa=la,bb=0!=(0|Sa),!bb)return e=0,ea=e,l=_b,+ea;for(;;){if(mb=la,xb=0|d[mb>>0],Ib=xb<<24>>24,h=32==(0|Ib),!h&&(u=la,F=0|d[u>>0],Q=F<<24>>24,aa=Q-9|0,ga=aa>>>0<5,!ga))break;ha=la,ia=ha+1|0,la=ia}ja=wa,ka=ja<<24>>24!=0;do if(!ka&&(ma=la,na=0|d[ma>>0],oa=na<<24>>24,pa=48==(0|oa))){if(qa=la,ra=qa+1|0,sa=0|d[ra>>0],ta=sa<<24>>24,ua=120==(0|ta),!ua&&(va=la,xa=va+1|0,ya=0|d[xa>>0],za=ya<<24>>24,Aa=88==(0|za),!Aa))break;return e=0,ea=e,l=_b,+ea}while(0);Ba=la,Ca=+cw(Ba,Wb),Ub=Ca,Da=la,Ea=0|f[Wb>>2],Fa=(0|Da)==(0|Ea);a:do{if(!Fa){if(Pa=0|f[Wb>>2],Qa=0|d[Pa>>0],Ra=Qa<<24>>24!=0){for(Xb=Tb,Ta=Tb+70|0,Ua=Ta+-1|0,Vb=Ua,Yb=0;;){if(Va=la,Wa=0|f[Wb>>2],Xa=Va>>>0<Wa>>>0,!Xa)break;if(Ya=Xb,Za=Vb,$a=Ya>>>0<Za>>>0,!$a)break;_a=la,ab=_a+1|0,la=ab,cb=0|d[_a>>0],db=Xb,eb=db+1|0,Xb=eb,d[db>>0]=cb,Yb=cb}b:for(;;){if(fb=la,gb=0|d[fb>>0],hb=gb<<24>>24!=0,!hb)break;if(ib=la,jb=0|d[ib>>0],kb=jb<<24>>24,lb=95==(0|kb)){if(nb=wa,ob=nb<<24>>24!=0,!ob)for(;;)if(Db=la,Eb=Db+1|0,la=Eb,Fb=0|d[Eb>>0],Gb=Fb<<24>>24,Hb=95==(0|Gb),!Hb)continue b;if(pb=Xb,qb=(0|pb)==(0|Tb))break a;if(rb=Yb,sb=rb<<24>>24,tb=sb-48|0,ub=tb>>>0<10,!ub)break a;if(vb=la,wb=vb+1|0,la=wb,yb=la,zb=0|d[yb>>0],Ab=zb<<24>>24,Bb=Ab-48|0,Cb=Bb>>>0<10,!Cb)break a}Jb=la,Kb=Jb+1|0,la=Kb,Lb=0|d[Jb>>0],Yb=Lb,Mb=Xb,Nb=Vb,Ob=Mb>>>0<Nb>>>0,Ob&&(Pb=Yb,Qb=Xb,Rb=Qb+1|0,Xb=Rb,d[Qb>>0]=Pb)}Sb=Xb,d[Sb>>0]=0,la=Tb,i=wa,j=i<<24>>24!=0;do if(!j&&(k=la,n=0|d[k>>0],o=n<<24>>24,p=48==(0|o))){if(q=la,r=q+1|0,s=0|d[r>>0],t=s<<24>>24,v=120==(0|t),!v&&(w=la,x=w+1|0,y=0|d[x>>0],z=y<<24>>24,A=88==(0|z),!A))break;return e=0,ea=e,l=_b,+ea}while(0);if(B=la,C=+cw(B,Wb),Ub=C,D=wa,E=D<<24>>24!=0){if(G=0|f[Wb>>2],H=0!=(0|G),!H)break;if(I=la,J=0|f[Wb>>2],K=(0|I)==(0|J))break;for(;;){if(L=0|f[Wb>>2],M=0|d[L>>0],N=M<<24>>24,O=0!=(0|N),O?(P=0|f[Wb>>2],R=0|d[P>>0],S=R<<24>>24,T=32==(0|S),T?fa=1:(U=0|f[Wb>>2],V=0|d[U>>0],W=V<<24>>24,Y=W-9|0,Z=Y>>>0<5,fa=Z)):fa=0,$=0|f[Wb>>2],!fa)break;_=$+1|0,f[Wb>>2]=_}if(ba=0|d[$>>0],ca=ba<<24>>24!=0)break}}return da=Ub,e=da,ea=e,l=_b,+ea}if(Ga=wa,Ia=Ga<<24>>24!=0,!Ia)return Oa=Ub,e=Oa,ea=e,l=_b,+ea}while(0);return Ja=g,Ka=g,La=0|tp(Ka,68855),Ma=g,Na=la,qg(Ha,Ma,Na),d[Zb>>0]=0|d[Ha>>0],d[Zb+1>>0]=0|d[Ha+1>>0],d[Zb+2>>0]=0|d[Ha+2>>0],d[Zb+3>>0]=0|d[Ha+3>>0],d[Zb+4>>0]=0|d[Ha+4>>0],d[Zb+5>>0]=0|d[Ha+5>>0],d[Zb+6>>0]=0|d[Ha+6>>0],d[Zb+7>>0]=0|d[Ha+7>>0],Er(Ja,La,55848,Zb),0}function bh(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,va=0;return va=l,l=l+48|0,(0|l)>=(0|m)&&X(),sa=va+32|0,t=va+8|0,e=a,g=c,E=e,f[sa>>2]=0|f[b>>2],f[sa+4>>2]=0|f[b+4>>2],zg(t,E,sa),f[b>>2]=0|f[t>>2],f[b+4>>2]=0|f[t+4>>2],P=0|f[b>>2],_=0|f[P>>2],ka=_>>>11,na=8&ka,oa=0!=(0|na),pa=0|f[b>>2],h=pa+12|0,oa?k=h:(i=h+8|0,j=0|f[i>>2],k=j),ra=k,n=0|f[b>>2],o=0|f[n>>2],p=o>>>11,q=8&p,r=0!=(0|q),s=0|f[b>>2],r?(u=0|f[s>>2],v=u>>>11,w=496&v,x=w>>4,A=x):(y=s+12|0,z=0|f[y>>2],A=z),qa=A,B=ra,(C=0!=(0|B))?(D=g,F=255&D,G=0!=(0|F),G&&(H=ra,I=qa,J=0|gv(H,0,I),K=0!=(0|J),K&&(L=e,M=e,N=0|tp(M,68855),Br(L,N,55877))),O=qa,Q=ra,R=Q+O|0,S=0|d[R>>0],(T=S<<24>>24!=0)?(U=e,V=ra,W=qa,Y=0|og(U,V,W),ta=Y,Z=ta,$=0|f[Z>>2],aa=$>>>11,ba=8&aa,ca=0!=(0|ba),da=ta,ea=da+12|0,ca?ha=ea:(fa=ea+8|0,ga=0|f[fa>>2],ha=ga),ra=ha,ia=e,ja=ra,la=g,ma=+ah(ia,ja,la),l=va,+ma):(ia=e,ja=ra,la=g,ma=+ah(ia,ja,la),l=va,+ma)):(ia=e,ja=ra,la=g,ma=+ah(ia,ja,la),l=va,+ma)}function ch(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,kd=0;kd=l,l=l+48|0,(0|l)>=(0|m)&&X(),id=kd+24|0,e=b,dd=2,g=0|f[c>>2],mb=0|f[g>>2],Gb=mb>>>11,Rb=8&Gb,ac=0!=(0|Rb),lc=0|f[c>>2],wc=lc+12|0,ac?h=wc:(Hc=wc+8|0,Sc=0|f[Hc>>2],h=Sc),ed=h,u=ed,F=0|f[c>>2],Q=0|f[F>>2],aa=Q>>>11,la=8&aa,wa=0!=(0|la),Ha=0|f[c>>2],wa?(Sa=0|f[Ha>>2],bb=Sa>>>11,nb=496&bb,xb=nb>>4,Bb=xb):(yb=Ha+12|0,zb=0|f[yb>>2],Bb=zb),Ab=u+Bb|0,fd=Ab;a:for(;;){if(Cb=ed,Db=fd,Eb=Cb>>>0<Db>>>0,!Eb)break;switch(Fb=ed,Hb=Fb+1|0,ed=Hb,Ib=0|d[Fb>>0],bd=Ib,Jb=bd,Kb=255&Jb,0|Kb){case 27:case 7:case 8:case 11:case 12:case 9:case 13:case 10:case 92:case 34:Lb=dd,Mb=Lb+2|0,dd=Mb;continue a;case 35:Nb=ed,Ob=fd,Pb=Nb>>>0<Ob>>>0,Pb?(Qb=ed,Sb=0|d[Qb>>0],Tb=Sb<<24>>24,Ub=36==(0|Tb),Ub?cc=1:(Vb=ed,Wb=0|d[Vb>>0],Xb=Wb<<24>>24,Yb=64==(0|Xb),Yb?cc=1:(Zb=ed,$b=0|d[Zb>>0],_b=$b<<24>>24,bc=123==(0|_b),cc=bc))):cc=0,dc=cc?2:1,ec=dd,fc=ec+dc|0,dd=fc;continue a;default:if(gc=bd,hc=255&gc,ic=hc-32|0,jc=ic>>>0<95,kc=dd,jc){mc=kc+1|0,dd=mc;continue a}nc=kc+4|0,dd=nc;continue a}}oc=e,pc=dd,qc=0|og(oc,0,pc),hd=qc,rc=e,sc=hd,f[id>>2]=0|f[c>>2],f[id+4>>2]=0|f[c+4>>2],Ig(rc,sc,id),tc=0|f[c>>2],uc=0|f[tc>>2],vc=uc>>>11,xc=8&vc,yc=0!=(0|xc),zc=0|f[c>>2],Ac=zc+12|0,yc?Dc=Ac:(Bc=Ac+8|0,Cc=0|f[Bc>>2],Dc=Cc),ed=Dc,Ec=ed,Fc=0|f[c>>2],Gc=0|f[Fc>>2],Ic=Gc>>>11,Jc=8&Ic,Kc=0!=(0|Jc),Lc=0|f[c>>2],Kc?(Mc=0|f[Lc>>2],Nc=Mc>>>11,Oc=496&Nc,Pc=Oc>>4,Uc=Pc):(Qc=Lc+12|0,Rc=0|f[Qc>>2],Uc=Rc),Tc=Ec+Uc|0,fd=Tc,Vc=hd,Wc=0|f[Vc>>2],Xc=Wc>>>11,Yc=8&Xc,Zc=0!=(0|Yc),$c=hd,_c=$c+12|0,Zc?j=_c:(ad=_c+8|0,i=0|f[ad>>2],j=i),gd=j,k=gd,n=k+1|0,gd=n,d[k>>0]=34;a:for(;;){if(o=ed,p=fd,q=o>>>0<p>>>0,!q)break;r=ed,s=r+1|0,ed=s,t=0|d[r>>0],cd=t,v=cd,w=255&v;do switch(0|w){case 92:case 34:x=gd,y=x+1|0,gd=y,d[x>>0]=92,z=cd,A=gd,B=A+1|0,gd=B,d[A>>0]=z;continue a;case 10:C=gd,D=C+1|0,gd=D,d[C>>0]=92,E=gd,G=E+1|0,gd=G,d[E>>0]=110;continue a;case 13:H=gd,I=H+1|0,gd=I,d[H>>0]=92,J=gd,K=J+1|0,gd=K,d[J>>0]=114;continue a;case 9:L=gd,M=L+1|0,gd=M,d[L>>0]=92,N=gd,O=N+1|0,gd=O,d[N>>0]=116;continue a;case 12:P=gd,R=P+1|0,gd=R,d[P>>0]=92,S=gd,T=S+1|0,gd=T,d[S>>0]=102;continue a;case 11:U=gd,V=U+1|0,gd=V,d[U>>0]=92,W=gd,Y=W+1|0,gd=Y,d[W>>0]=118;continue a;case 8:Z=gd,$=Z+1|0,gd=$,d[Z>>0]=92,_=gd,ba=_+1|0,gd=ba,d[_>>0]=98;continue a;case 7:ca=gd,da=ca+1|0,gd=da,d[ca>>0]=92,ea=gd,fa=ea+1|0,gd=fa,d[ea>>0]=97;continue a;case 27:ga=gd,ha=ga+1|0,gd=ha,d[ga>>0]=92,ia=gd,ja=ia+1|0,gd=ja,d[ia>>0]=101;continue a;case 35:ka=ed,ma=fd,na=ka>>>0<ma>>>0;do if(na){if(oa=ed,pa=0|d[oa>>0],qa=pa<<24>>24,ra=36==(0|qa),!ra&&(sa=ed,ta=0|d[sa>>0],ua=ta<<24>>24,va=64==(0|ua),!va&&(xa=ed,ya=0|d[xa>>0],za=ya<<24>>24,Aa=123==(0|za),!Aa)))break;Ba=gd,Ca=Ba+1|0,gd=Ca,d[Ba>>0]=92}while(0);Da=gd,Ea=Da+1|0,gd=Ea,d[Da>>0]=35;continue a;default:if(Fa=cd,Ga=255&Fa,Ia=Ga-32|0,Ja=Ia>>>0<95){Ka=cd,La=gd,Ma=La+1|0,gd=Ma,d[La>>0]=Ka;continue a}Na=gd,Oa=Na+1|0,gd=Oa,d[Na>>0]=92,Pa=cd,Qa=255&Pa,Ra=(0|Qa)%8&-1,Ta=48+Ra|0,Ua=255&Ta,Va=gd,Wa=Va+2|0,d[Wa>>0]=Ua,Xa=cd,Ya=255&Xa,Za=(0|Ya)/8&-1,$a=255&Za,cd=$a,_a=cd,ab=255&_a,cb=(0|ab)%8&-1,db=48+cb|0,eb=255&db,fb=gd,gb=fb+1|0,d[gb>>0]=eb,hb=cd,ib=255&hb,jb=(0|ib)/8&-1,kb=255&jb,cd=kb,lb=cd,ob=255&lb,pb=(0|ob)%8&-1,qb=48+pb|0,rb=255&qb,sb=gd,d[sb>>0]=rb,tb=gd,ub=tb+3|0,gd=ub;continue a}while(0)}vb=gd,d[vb>>0]=34,wb=hd,mg(a,wb),l=kd}function dh(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;q=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=b,h=d,i=e,j=g,k=0|f[c>>2],n=h,o=i,eh(j,k,n,o),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=q}function eh(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0;if(_c=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=a,h=b,nb=c,zb=e,Xc=-1,Kb=zb,Vb=0==(0|Kb))return void(l=_c);if(ec=g,pc=h,vg(ec,pc),Ac=nb,Lc=h,i=0|f[Lc>>2],v=i>>>11,G=8&v,R=0!=(0|G),ba=h,ma=ba+12|0,R?cb=ma:(xa=ma+8|0,Ia=0|f[xa>>2],cb=Ia),Ta=Ac>>>0>=cb>>>0,Ta&&(ob=nb,qb=h,rb=0|f[qb>>2],sb=rb>>>11,tb=8&sb,ub=0!=(0|tb),vb=h,wb=vb+12|0,ub?Ob=wb:(xb=wb+8|0,yb=0|f[xb>>2],Ob=yb),Ab=h,Bb=0|f[Ab>>2],Cb=Bb>>>11,Db=8&Cb,Eb=0!=(0|Db),Fb=h,Eb?(Gb=0|f[Fb>>2],Hb=Gb>>>11,Ib=496&Hb,Jb=Ib>>4,Pb=Jb):(Lb=Fb+12|0,Mb=0|f[Lb>>2],Pb=Mb),Nb=Ob+Pb|0,Qb=ob>>>0<=Nb>>>0,Qb&&(Rb=nb,Sb=h,Tb=0|f[Sb>>2],Ub=Tb>>>11,Wb=8&Ub,Xb=0!=(0|Wb),Yb=h,Zb=Yb+12|0,Xb?bc=Zb:($b=Zb+8|0,_b=0|f[$b>>2],bc=_b),ac=Rb,cc=bc,dc=ac-cc|0,Xc=dc)),fc=h,gc=0|f[fc>>2],hc=gc>>>11,ic=8&hc,jc=0!=(0|ic),jc?Wc=11:(kc=h,lc=kc+12|0,mc=lc+4|0,nc=0|f[mc>>2],Wc=nc),oc=h,qc=0|f[oc>>2],rc=qc>>>11,sc=8&rc,tc=0!=(0|sc),uc=h,tc?(vc=0|f[uc>>2],wc=vc>>>11,xc=496&wc,yc=xc>>4,Ec=yc):(zc=uc+12|0,Bc=0|f[zc>>2],Ec=Bc),Cc=zb,Dc=2147483647-Cc|0,Fc=(0|Ec)>=(0|Dc),Fc&&(Gc=g,Hc=g,Ic=0|tp(Hc,68855),Br(Gc,Ic,55411)),Jc=h,Kc=0|f[Jc>>2],Mc=Kc>>>11,Nc=8&Mc,Oc=0!=(0|Nc),Pc=h,Oc?(Qc=0|f[Pc>>2],Rc=Qc>>>11,Sc=496&Rc,Tc=Sc>>4,n=Tc):(Uc=Pc+12|0,Vc=0|f[Uc>>2],n=Vc),j=zb,k=n+j|0,Zc=k,o=Wc,p=Zc,q=o>>>0<=p>>>0){for(;;){if(r=Zc,s=Wc,t=r>>>0>s>>>0,!t)break;if(u=Wc,w=u+1|0,x=w>>>0>=1073741823){$c=31;break}B=Wc,C=B+1|0,D=C<<1,Wc=D}31==(0|$c)&&(y=Zc,z=y+4095|0,A=(z>>>0)/4096&-1,Wc=A),E=g,F=h,H=Wc,xg(E,F,H)}I=Xc,J=(0|I)!=-1,J&&(K=h,L=0|f[K>>2],M=L>>>11,N=8&M,O=0!=(0|N),P=h,Q=P+12|0,O?W=Q:(S=Q+8|0,T=0|f[S>>2],W=T),U=Xc,V=W+U|0,nb=V),Y=h,Z=0|f[Y>>2],$=Z>>>11,_=8&$,aa=0!=(0|_),ca=h,da=ca+12|0,aa?ua=da:(ea=da+8|0,fa=0|f[ea>>2],ua=fa),ga=h,ha=0|f[ga>>2],ia=ha>>>11,ja=8&ia,ka=0!=(0|ja),la=h,ka?(na=0|f[la>>2],oa=na>>>11,pa=496&oa,qa=pa>>4,va=qa):(ra=la+12|0,sa=0|f[ra>>2],va=sa),ta=ua+va|0,wa=nb,ya=zb,0|sw(0|ta,0|wa,0|ya),za=h,Aa=0|f[za>>2],Ba=Aa>>>11,Ca=8&Ba,Da=0!=(0|Ca),Ea=Zc,Da?(Yc=Ea,Fa=h,Ga=0|f[Fa>>2],Ha=Ga>>>11,Ja=Ha&-497,Ka=0|f[Fa>>2],La=2097151&Ja,Ma=La<<11,Na=2047&Ka,Oa=Na|Ma,f[Fa>>2]=Oa,Pa=Yc,Qa=Pa<<4,Ra=h,Sa=0|f[Ra>>2],Ua=Sa>>>11,Va=Ua|Qa,Wa=0|f[Ra>>2],Xa=2097151&Va,Ya=Xa<<11,Za=2047&Wa,$a=Za|Ya,f[Ra>>2]=$a):(_a=h,ab=_a+12|0,f[ab>>2]=Ea),bb=Zc,db=h,eb=0|f[db>>2],fb=eb>>>11,gb=8&fb,hb=0!=(0|gb),ib=h,jb=ib+12|0,hb?pb=jb:(kb=jb+8|0,lb=0|f[kb>>2],pb=lb),mb=pb+bb|0,d[mb>>0]=0,l=_c}function fh(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+16|0,(0|l)>=(0|m)&&X(),n=p+8|0,e=b,g=d,h=e,i=g,j=g,k=0|Jv(j),f[n>>2]=0|f[c>>2],f[n+4>>2]=0|f[c+4>>2],dh(a,h,n,i,k),l=p}function gh(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,I=0;I=l,l=l+16|0,(0|l)>=(0|m)&&X(),G=I+8|0,e=b,g=e,t=0|f[d>>2],z=0|f[t>>2],A=z>>>11,B=8&A,C=0!=(0|B),D=0|f[d>>2],E=D+12|0,C?x=E:(F=E+8|0,h=0|f[F>>2],x=h),i=0|f[d>>2],j=0|f[i>>2],k=j>>>11,n=8&k,o=0!=(0|n),p=0|f[d>>2],o?(q=0|f[p>>2],r=q>>>11,s=496&r,u=s>>4,y=u):(v=p+12|0,w=0|f[v>>2],y=w),f[G>>2]=0|f[c>>2],f[G+4>>2]=0|f[c+4>>2],dh(a,g,G,x,y),l=I}function hh(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+48|0,(0|l)>=(0|m)&&X(),n=p+32|0,j=p+24|0,k=p+16|0,g=p,e=b,h=e,f[k>>2]=0|f[d>>2],f[k+4>>2]=0|f[d+4>>2],zg(g,h,k),f[d>>2]=0|f[g>>2],f[d+4>>2]=0|f[g+4>>2],i=e,f[j>>2]=0|f[c>>2],f[j+4>>2]=0|f[c+4>>2],f[n>>2]=0|f[d>>2],f[n+4>>2]=0|f[d+4>>2],gh(a,i,j,n),l=p}function ih(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,_b=0;for(_b=l,l=l+144|0,(0|l)>=(0|m)&&X(),Zb=_b+120|0,Yb=_b+112|0,Xb=_b+104|0,Wb=_b+96|0,Vb=_b+88|0,Ub=_b+80|0,Mb=_b+130|0,Tb=_b+56|0,g=_b+40|0,ea=_b+32|0,pa=_b+24|0,Aa=_b+16|0,La=_b+8|0,Wa=_b,e=b,fb=e,rg(Tb,fb,55913,1),qb=0|f[c>>2],Bb=0|f[qb>>2],h=Bb>>>11,u=8&h,F=0!=(0|u),Q=0|f[c>>2],$=Q+12|0,F?ba=$:(_=$+8|0,aa=0|f[_>>2],ba=aa),Rb=ba,ca=0|f[c>>2],da=0|f[ca>>2],fa=da>>>11,ga=8&fa,ha=0!=(0|ga),ia=0|f[c>>2],ja=ia+12|0,ha?Ba=ja:(ka=ja+8|0,la=0|f[ka>>2],Ba=la),ma=0|f[c>>2],na=0|f[ma>>2],oa=na>>>11,qa=8&oa,ra=0!=(0|qa),sa=0|f[c>>2],ra?(ta=0|f[sa>>2],ua=ta>>>11,va=496&ua,wa=va>>4,Ca=wa):(xa=sa+12|0,ya=0|f[xa>>2],Ca=ya),za=Ba+Ca|0,Sb=za;;){if(Da=Rb,Ea=Sb,Fa=Da>>>0<Ea>>>0,!Fa)break;Ga=Rb,Ha=Sb,Ia=0|Ng(Ga,Ha),Pb=Ia,Ja=Pb,Ka=(0|Ja)>1;a:do if(Ka){for(Qb=0;;){if(Ma=Qb,Na=Pb,Oa=(0|Ma)<(0|Na),!Oa)break;Pa=Qb,Qa=Rb,Ra=Qa+Pa|0,Sa=0|d[Ra>>0],Ta=Qb,Ua=Mb+Ta|0,d[Ua>>0]=Sa,Va=Qb,Xa=Va+1|0,Qb=Xa}Ya=e,Za=Pb,f[Ub>>2]=0|f[Tb>>2],f[Ub+4>>2]=0|f[Tb+4>>2],dh(g,Ya,Ub,Mb,Za),$a=Pb,_a=$a-1|0,ab=Rb,bb=ab+_a|0,Rb=bb}else{cb=Rb,db=0|d[cb>>0],Nb=db,eb=Nb,gb=255&eb,hb=34==(0|gb);do if(!hb&&(ib=Nb,jb=255&ib,kb=92==(0|jb),!kb)){if(lb=Nb,mb=255&lb,nb=35==(0|mb),nb&&(ob=Rb,pb=Sb,rb=ob>>>0<pb>>>0)){if(sb=Rb,tb=0|d[sb>>0],ub=tb<<24>>24,vb=36==(0|ub))break;if(wb=Rb,xb=0|d[wb>>0],yb=xb<<24>>24,zb=64==(0|yb))break;if(Ab=Rb,Cb=0|d[Ab>>0],Db=Cb<<24>>24,Eb=123==(0|Db))break}if(Ib=Nb,Jb=255&Ib,Kb=Jb-32|0,Lb=Kb>>>0<95,i=Nb,Lb){d[Mb>>0]=i,j=e,f[Wb>>2]=0|f[Tb>>2],f[Wb+4>>2]=0|f[Tb+4>>2],dh(pa,j,Wb,Mb,1);break a}switch(k=255&i,0|k){case 10:Ob=110;break;case 13:Ob=114;break;case 9:Ob=116;break;case 12:Ob=102;break;case 11:Ob=118;break;case 8:Ob=98;break;case 7:Ob=97;break;case 27:Ob=101;break;default:Ob=0}if(n=Ob,o=n<<24>>24!=0,d[Mb>>0]=92,o){p=Ob,q=Mb+1|0,d[q>>0]=p,r=e,f[Xb>>2]=0|f[Tb>>2],f[Xb+4>>2]=0|f[Tb+4>>2],dh(Aa,r,Xb,Mb,2);break a}s=Nb,t=255&s,v=(0|t)%8&-1,w=48+v|0,x=255&w,y=Mb+3|0,d[y>>0]=x,z=Nb,A=255&z,B=(0|A)/8&-1,C=255&B,Nb=C,D=Nb,E=255&D,G=(0|E)%8&-1,H=48+G|0,I=255&H,J=Mb+2|0,d[J>>0]=I,K=Nb,L=255&K,M=(0|L)/8&-1,N=255&M,Nb=N,O=Nb,P=255&O,R=(0|P)%8&-1,S=48+R|0,T=255&S,U=Mb+1|0,d[U>>0]=T,V=e,f[Yb>>2]=0|f[Tb>>2],f[Yb+4>>2]=0|f[Tb+4>>2],dh(La,V,Yb,Mb,4);break a}while(0);d[Mb>>0]=92,Fb=Nb,Gb=Mb+1|0,d[Gb>>0]=Fb,Hb=e,f[Vb>>2]=0|f[Tb>>2],f[Vb+4>>2]=0|f[Tb+4>>2],dh(ea,Hb,Vb,Mb,2)}while(0);W=Rb,Y=W+1|0,Rb=Y}Z=e,f[Zb>>2]=0|f[Tb>>2],f[Zb+4>>2]=0|f[Tb+4>>2],dh(Wa,Z,Zb,55913,1),f[a>>2]=0|f[Tb>>2],f[a+4>>2]=0|f[Tb+4>>2],l=_b}function jh(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,$a=0;$a=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,q=b,B=q+32|0,M=0|f[B>>2],Y=0|Dp(c,64878,M),Ya=Y,ha=b,sa=ha+48|0,f[sa>>2]=Y,Da=Ya,Oa=0|f[Da>>2],d=Oa>>>11,e=d&-256,g=16|e,h=Ya,i=0|f[h>>2],j=2097151&g,k=j<<11,n=2047&i,o=n|k,f[h>>2]=o,p=b,r=Ya,Jp(p,r,55915,84,0),s=b,t=Ya,Jp(s,t,68851,85,262144),u=b,v=Ya,Jp(u,v,68902,86,262144),w=b,x=Ya,Jp(w,x,64315,87,262144),y=b,z=Ya,Jp(y,z,68114,88,262144),A=b,C=Ya,Jp(A,C,68841,89,4096),D=b,E=Ya,Jp(D,E,56008,90,0),F=b,G=Ya,Jp(F,G,56019,91,0),H=b,I=Ya,Jp(H,I,56031,92,4096),J=b,K=Ya,Jp(J,K,56040,93,4096),L=b,N=Ya,Jp(L,N,56047,94,262144),O=b,P=Ya,Jp(O,P,56052,95,262144),Q=b,R=Ya,Jp(Q,R,56058,96,0),S=b,T=Ya,Jp(S,T,56067,97,0),U=b,V=Ya,Jp(U,V,64381,98,0),W=b,Z=Ya,Jp(W,Z,68994,99,262144),$=b,_=Ya,Jp($,_,68178,100,0),aa=b,ba=Ya,Jp(aa,ba,68944,101,262144),ca=b,da=Ya,Jp(ca,da,64411,102,4096),ea=b,fa=Ya,Jp(ea,fa,68953,103,262144),ga=b,ia=Ya,Jp(ga,ia,68999,104,262144),ja=b,ka=Ya,Jp(ja,ka,69611,105,0),la=b,ma=Ya,Jp(la,ma,64428,106,0),na=b,oa=Ya,Jp(na,oa,64444,104,262144),pa=b,qa=Ya,Jp(pa,qa,64452,107,0),ra=b,ta=Ya,Jp(ra,ta,64460,108,0),ua=b,va=Ya,Jp(ua,va,64469,109,4096),wa=b,xa=Ya,Jp(wa,xa,64482,106,0),ya=b,za=Ya,Jp(ya,za,64487,89,4096),Aa=b,Ba=Ya,Jp(Aa,Ba,56101,110,4096),Ca=b,Ea=Ya,Jp(Ca,Ea,56111,111,0),Fa=b,Ga=Ya,Jp(Fa,Ga,56116,112,4096),Ha=b,Ia=Ya,Jp(Ha,Ia,68977,113,0),Ja=b,Ka=Ya,Jp(Ja,Ka,64885,113,0),La=b,Ma=Ya,Jp(La,Ma,56199,105,0),Na=b,Pa=Ya,Jp(Na,Pa,56121,114,0),Qa=b,Ra=Ya,Jp(Qa,Ra,56128,115,0),Sa=b,Ta=Ya,Jp(Sa,Ta,68986,116,0),Ua=b,Va=Ya,Jp(Ua,Va,56136,117,0),Wa=b,Xa=Ya,Jp(Wa,Xa,56142,118,0),l=$a}function kh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,x=0;x=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=0|f[c>>2],n=0|f[e>>2],o=n>>>11,p=8&o,q=0!=(0|p),r=0|f[c>>2],q?(s=0|f[r>>2],t=s>>>11,u=496&t,g=u>>4,j=g):(h=r+12|0,i=0|f[h>>2],j=i),v=j,k=v,Zg(a,k),l=x}function lh(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,Y=0;Y=l,l=l+112|0,(0|l)>=(0|m)&&X(),R=Y+104|0,M=Y+96|0,e=Y+88|0,Q=Y+80|0,P=Y+72|0,O=Y+64|0,V=Y+16|0,U=Y+8|0,T=Y,N=Y+48|0,S=Y+32|0,h=Y+24|0,g=b,u=g,f[T>>2]=N,0|Lp(u,68900,T),E=N+4|0,F=0|f[E>>2],G=16==(0|F),H=g;do{if(!G){if(I=g,J=0|ki(I,68977,4),f[O>>2]=0|f[N>>2],f[O+4>>2]=0|f[N+4>>2],K=0|dq(H,O,J),i=K<<24>>24!=0,!i)return Og(a),void(l=Y);if(j=g,k=g,n=0|ki(k,68851,3),f[P>>2]=0|f[N>>2],f[P+4>>2]=0|f[N+4>>2],o=0|dq(j,P,n),p=o<<24>>24!=0,!p)return Og(a),void(l=Y);if(q=g,d[U>>0]=0|d[c>>0],d[U+1>>0]=0|d[c+1>>0],d[U+2>>0]=0|d[c+2>>0],d[U+3>>0]=0|d[c+3>>0],d[U+4>>0]=0|d[c+4>>0],d[U+5>>0]=0|d[c+5>>0],d[U+6>>0]=0|d[c+6>>0],d[U+7>>0]=0|d[c+7>>0],f[Q>>2]=0|f[N>>2],f[Q+4>>2]=0|f[N+4>>2],Yj(S,q,Q,68851,1,U),r=S+4|0,s=0|f[r>>2],t=0==(0|s),t&&(v=0|f[S>>2],w=0!=(0|v),!w))return Og(a),void(l=Y);if(x=0|f[S>>2],y=0!=(0|x)){A=0|f[S>>2],B=0-A|0,L=B;break}return z=g,Zg(h,0),d[V>>0]=0|d[S>>0],d[V+1>>0]=0|d[S+1>>0],d[V+2>>0]=0|d[S+2>>0],d[V+3>>0]=0|d[S+3>>0],d[V+4>>0]=0|d[S+4>>0],d[V+5>>0]=0|d[S+5>>0],d[V+6>>0]=0|d[S+6>>0],d[V+7>>0]=0|d[S+7>>0],f[e>>2]=0|f[h>>2],f[e+4>>2]=0|f[h+4>>2],Yj(a,z,e,69609,1,V),void(l=Y)}f[M>>2]=0|f[c>>2],f[M+4>>2]=0|f[c+4>>2],f[R>>2]=0|f[N>>2],f[R+4>>2]=0|f[N+4>>2],C=0|Bg(H,M,R),L=C}while(0);D=L,Zg(a,D),l=Y}function mh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+48|0,(0|l)>=(0|m)&&X(),k=p+32|0,i=p+24|0,n=p,j=p+8|0,d=b,e=d,f[n>>2]=j,0|Lp(e,68900,n),g=d,f[i>>2]=0|f[c>>2],f[i+4>>2]=0|f[c+4>>2],f[k>>2]=0|f[j>>2],f[k+4>>2]=0|f[j+4>>2],h=0|Cg(g,i,k),nh(a,h),l=p}function nh(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=255&d,g=0!=(0|e),h=g?2:0,i=j+4|0,f[i>>2]=h,f[j>>2]=1,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function oh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+48|0,(0|l)>=(0|m)&&X(),j=o+32|0,h=o+24|0,k=o,i=o+8|0,d=b,e=d,f[k>>2]=i,0|Lp(e,55924,k),g=d,f[h>>2]=0|f[c>>2],f[h+4>>2]=0|f[c+4>>2],f[j>>2]=0|f[i>>2],f[j+4>>2]=0|f[i+4>>2],Ag(a,g,h,j),l=o}function ph(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,yb=0;if(yb=l,l=l+48|0,(0|l)>=(0|m)&&X(),tb=yb+32|0,wb=yb,vb=yb+12|0,e=b,g=e,f[wb>>2]=vb,0|Lp(g,64319,wb),I=0|f[vb>>2],T=(0|I)<0,T&&(ea=e,pa=e,Aa=0|tp(pa,68855),Br(ea,Aa,64321)),La=0|f[vb>>2],Wa=0!=(0|La),Wa&&(fb=0|f[vb>>2],h=2147483647/(0|fb)&-1,u=0|f[c>>2],A=0|f[u>>2],B=A>>>11,C=8&B,D=0!=(0|C),E=0|f[c>>2],D?(F=0|f[E>>2],G=F>>>11,H=496&G,J=H>>4,N=J):(K=E+12|0,L=0|f[K>>2],N=L),M=(0|h)<(0|N),M&&(O=e,P=e,Q=0|tp(P,68855),Br(O,Q,55926))),R=0|f[c>>2],S=0|f[R>>2],V=S>>>11,W=8&V,Y=0!=(0|W),Z=0|f[c>>2],Y?($=0|f[Z>>2],_=$>>>11,aa=496&_,ba=aa>>4,ha=ba):(ca=Z+12|0,da=0|f[ca>>2],ha=da),fa=0|f[vb>>2],ga=0|U(ha,fa),qb=ga,ia=e,ja=qb,ka=0|og(ia,0,ja),ub=ka,la=e,ma=ub,f[tb>>2]=0|f[c>>2],f[tb+4>>2]=0|f[c+4>>2],Ig(la,ma,tb),na=ub,oa=0|f[na>>2],qa=oa>>>11,ra=8&qa,sa=0!=(0|ra),ta=ub,ua=ta+12|0,sa?xa=ua:(va=ua+8|0,wa=0|f[va>>2],xa=wa),sb=xa,ya=qb,za=(0|ya)>0){for(Ba=0|f[c>>2],Ca=0|f[Ba>>2],Da=Ca>>>11,Ea=8&Da,Fa=0!=(0|Ea),Ga=0|f[c>>2],Fa?(Ha=0|f[Ga>>2],Ia=Ha>>>11,Ja=496&Ia,Ka=Ja>>4,Oa=Ka):(Ma=Ga+12|0,Na=0|f[Ma>>2],Oa=Na),rb=Oa,Pa=sb,Qa=0|f[c>>2],Ra=0|f[Qa>>2],Sa=Ra>>>11,Ta=8&Sa,Ua=0!=(0|Ta),Va=0|f[c>>2],Xa=Va+12|0,Ua?_a=Xa:(Ya=Xa+8|0,Za=0|f[Ya>>2],_a=Za),$a=rb,0|sw(0|Pa,0|_a,0|$a);;){if(ab=rb,bb=qb,cb=(0|bb)/2&-1,db=(0|ab)<=(0|cb),eb=sb,gb=rb,hb=eb+gb|0,ib=sb,!db)break;jb=rb,0|sw(0|hb,0|ib,0|jb),kb=rb,lb=kb<<1,rb=lb}mb=qb,nb=rb,ob=mb-nb|0,0|sw(0|hb,0|ib,0|ob)}return pb=ub,i=0|f[pb>>2],j=i>>>11,k=8&j,n=0!=(0|k),o=ub,n?(p=0|f[o>>2],q=p>>>11,r=496&q,s=r>>4,y=s,w=sb,x=w+y|0,d[x>>0]=0,z=ub,mg(a,z),void(l=yb)):(t=o+12|0,v=0|f[t>>2],y=v,w=sb,x=w+y|0,d[x>>0]=0,z=ub,mg(a,z),void(l=yb))}function qh(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,I=0;return I=l,l=l+96|0,(0|l)>=(0|m)&&X(),z=I+80|0,D=I+72|0,C=I+64|0,y=I+56|0,F=I+8|0,E=I,x=I+40|0,A=I+32|0,g=I+16|0,e=b,p=e,f[E>>2]=x,G=E+4|0,f[G>>2]=A,q=0|Lp(p,55943,E),B=q,r=B,(s=2==(0|r))?(t=e,f[y>>2]=0|f[x>>2],f[y+4>>2]=0|f[x+4>>2],Gg(t,y),u=e,v=0|f[x>>2],w=0|f[A>>2],f[C>>2]=0|f[c>>2],f[C+4>>2]=0|f[c+4>>2],Lg(a,u,C,v,w),void(l=I)):(h=B,i=1!=(0|h),j=e,i&&(k=e,n=0|tp(k,68855),o=B,Zg(g,o),d[F>>0]=0|d[g>>0],d[F+1>>0]=0|d[g+1>>0],d[F+2>>0]=0|d[g+2>>0],d[F+3>>0]=0|d[g+3>>0],d[F+4>>0]=0|d[g+4>>0],d[F+5>>0]=0|d[g+5>>0],d[F+6>>0]=0|d[g+6>>0],d[F+7>>0]=0|d[g+7>>0],Er(j,n,55947,F)),f[D>>2]=0|f[c>>2],f[D+4>>2]=0|f[c+4>>2],f[z>>2]=0|f[x>>2],f[z+4>>2]=0|f[x+4>>2],rh(a,j,D,z),void(l=I))}function rh(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0;switch(ra=l,l=l+112|0,(0|l)>=(0|m)&&X(),ka=ra+96|0,pa=ra+88|0,ja=ra+80|0,oa=ra+72|0,ia=ra+64|0,ha=ra+56|0,na=ra+48|0,ma=ra+40|0,ga=ra+32|0,g=ra+16|0,ea=ra+12|0,la=ra+8|0,t=ra,e=b,E=e,f[ga>>2]=0|f[d>>2],f[ga+4>>2]=0|f[d+4>>2],Gg(E,ga),P=d+4|0,_=0|f[P>>2],0|_){case 3:aa=0|f[d>>2],fa=aa;break;case 16:return C=e,f[na>>2]=0|f[c>>2],f[na+4>>2]=0|f[c+4>>2],f[ha>>2]=0|f[d>>2],f[ha+4>>2]=0|f[d+4>>2],D=0|sh(C,na,ha,0),F=(0|D)!=-1,F?(G=e,f[ia>>2]=0|f[d>>2],f[ia+4>>2]=0|f[d+4>>2],Hg(a,G,ia),void(l=ra)):(Og(a),void(l=ra));case 17:return f[oa>>2]=0|f[c>>2],f[oa+4>>2]=0|f[c+4>>2],H=0|Mg(oa,-1),f[la>>2]=H,I=e,J=0|f[la>>2],f[ja>>2]=0|f[d>>2],f[ja+4>>2]=0|f[d+4>>2],K=0|Ot(I,ja,ea,la,J),L=K<<24>>24!=0,L?(M=e,N=0|f[ea>>2],O=0|f[la>>2],f[pa>>2]=0|f[c>>2],f[pa+4>>2]=0|f[c+4>>2],
+Pg(a,M,pa,N,O),void(l=ra)):(Og(a),void(l=ra));default:Q=e,f[ka>>2]=0|f[d>>2],f[ka+4>>2]=0|f[d+4>>2],Pf(t,Q,ka),f[d>>2]=0|f[t>>2],f[d+4>>2]=0|f[t+4>>2],R=d+4|0,S=0|f[R>>2],T=0==(0|S),T&&(U=0|f[d>>2],V=0!=(0|U),V||(W=e,Y=e,Z=0|tp(Y,68905),Br(W,Z,55984))),$=0|f[d>>2],fa=$}return ba=e,ca=fa,f[ma>>2]=0|f[c>>2],f[ma+4>>2]=0|f[c+4>>2],Lg(g,ba,ma,ca,1),f[c>>2]=0|f[g>>2],f[c+4>>2]=0|f[g+4>>2],da=c+4|0,h=0|f[da>>2],i=0==(0|h),i?(j=0|f[c>>2],k=0!=(0|j),k&&(qa=5)):qa=5,5==(0|qa)&&(n=0|f[c>>2],o=0|f[n>>2],p=o>>>11,q=8&p,r=0!=(0|q),s=0|f[c>>2],r?(u=0|f[s>>2],v=u>>>11,w=496&v,x=w>>4,A=x):(y=s+12|0,z=0|f[y>>2],A=z),B=0==(0|A))?(Og(a),void(l=ra)):(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=ra))}function sh(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,ob=0;return ob=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=a,B=d,M=0|f[b>>2],Y=0|f[M>>2],ha=Y>>>11,sa=8&ha,Da=0!=(0|sa),Oa=0|f[b>>2],Da?(Za=0|f[Oa>>2],h=Za>>>11,s=496&h,t=s>>4,w=t):(u=Oa+12|0,v=0|f[u>>2],w=v),ib=w,x=0|f[c>>2],y=0|f[x>>2],z=y>>>11,A=8&z,C=0!=(0|A),D=0|f[c>>2],C?(E=0|f[D>>2],F=E>>>11,G=496&F,H=G>>4,K=H):(I=D+12|0,J=0|f[I>>2],K=J),lb=K,L=B,N=(0|L)<0,N&&(O=ib,P=B,Q=P+O|0,B=Q,R=B,S=(0|R)<0)?(e=-1,r=e,l=ob,0|r):(T=ib,U=B,V=T-U|0,W=lb,(Z=(0|V)<(0|W))?(e=-1,r=e,l=ob,0|r):($=0|f[b>>2],_=0|f[$>>2],aa=_>>>11,ba=8&aa,ca=0!=(0|ba),da=0|f[b>>2],ea=da+12|0,ca?ia=ea:(fa=ea+8|0,ga=0|f[fa>>2],ia=ga),kb=ia,ja=B,ka=0!=(0|ja),ka&&(la=B,ma=kb,na=ma+la|0,kb=na),oa=lb,(pa=0==(0|oa))?(qa=B,e=qa,r=e,l=ob,0|r):(ra=0|f[c>>2],ta=0|f[ra>>2],ua=ta>>>11,va=8&ua,wa=0!=(0|va),xa=0|f[c>>2],ya=xa+12|0,wa?Ba=ya:(za=ya+8|0,Aa=0|f[za>>2],Ba=Aa),mb=Ba,Ca=0|f[c>>2],Ea=0|f[Ca>>2],Fa=Ea>>>11,Ga=8&Fa,Ha=0!=(0|Ga),Ia=0|f[c>>2],Ha?(Ja=0|f[Ia>>2],Ka=Ja>>>11,La=496&Ka,Ma=La>>4,Qa=Ma):(Na=Ia+12|0,Pa=0|f[Na>>2],Qa=Pa),lb=Qa,Ra=0|f[b>>2],Sa=0|f[Ra>>2],Ta=Sa>>>11,Ua=8&Ta,Va=0!=(0|Ua),Wa=0|f[b>>2],Va?(Xa=0|f[Wa>>2],Ya=Xa>>>11,$a=496&Ya,_a=$a>>4,eb=_a):(ab=Wa+12|0,bb=0|f[ab>>2],eb=bb),cb=B,db=eb-cb|0,ib=db,fb=mb,gb=lb,hb=kb,i=ib,j=0|th(fb,gb,hb,i),jb=j,k=jb,n=(0|k)<0,o=jb,n?(e=o,r=e,l=ob,0|r):(p=B,q=o+p|0,e=q,r=e,l=ob,0|r))))}function th(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0;ia=l,l=l+48|0,(0|l)>=(0|m)&&X(),g=a,t=b,E=c,P=e,$=g,da=$,_=E,ea=_,aa=t,ba=P,ca=(0|aa)>(0|ba);do if(ca)f=-1;else{if(h=t,i=P,j=(0|h)==(0|i)){k=g,n=E,o=t,p=0|iv(k,n,o),q=0==(0|p),r=q?0:-1,f=r;break}if(s=t,u=(0|s)<1){f=0;break}if(v=t,w=1==(0|v),!w){T=g,U=t,V=E,W=P,Y=0|uh(T,U,V,W),f=Y;break}for(x=ea,ga=x,y=ga,z=P,A=y+z|0,fa=A;;){if(B=ea,C=fa,D=B>>>0<C>>>0,!D){ha=13;break}if(F=da,G=0|d[F>>0],H=255&G,I=ea,J=0|d[I>>0],K=255&J,L=(0|H)==(0|K),M=ea,L){ha=11;break}S=M+1|0,ea=S}if(11==(0|ha)){N=ga,O=M,Q=N,R=O-Q|0,f=R;break}if(13==(0|ha)){f=-1;break}}while(0);return Z=f,l=ia,0|Z}function uh(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0;for(Ba=l,l=l+1072|0,(0|l)>=(0|m)&&X(),wa=Ba,h=a,u=b,F=c,Q=e,aa=h,xa=aa,la=h,sa=u,ta=la+sa|0,ya=ta,ua=F,za=ua,va=0;;){if(i=va,j=(0|i)<256,!j)break;k=u,n=k+1|0,o=va,p=wa+(o<<2)|0,f[p>>2]=n,q=va,r=q+1|0,va=r}for(;;){if(s=xa,t=ya,v=s>>>0<t>>>0,!v)break;w=ya,x=xa,y=w,z=x,A=y-z|0,B=xa,C=0|d[B>>0],D=255&C,E=wa+(D<<2)|0,f[E>>2]=A,G=xa,H=G+1|0,xa=H}for(;;){if(I=za,J=u,K=I+J|0,L=F,M=Q,N=L+M|0,O=K>>>0<=N>>>0,!O){Aa=11;break}if(P=h,R=0|d[P>>0],S=255&R,T=za,U=0|d[T>>0],V=255&U,W=(0|S)==(0|V),W&&(Y=h,Z=za,$=u,_=0|iv(Y,Z,$),ba=0==(0|_))){Aa=9;break}ha=u,ia=za,ja=ia+ha|0,ka=0|d[ja>>0],ma=255&ka,na=wa+(ma<<2)|0,oa=0|f[na>>2],pa=za,qa=pa+oa|0,za=qa}return 9==(0|Aa)?(ca=za,da=F,ea=ca,fa=da,ga=ea-fa|0,g=ga,ra=g,l=Ba,0|ra):11==(0|Aa)?(g=-1,ra=g,l=Ba,0|ra):0}function vh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+48|0,(0|l)>=(0|m)&&X(),n=p+40|0,j=p+32|0,k=p+16|0,e=p+8|0,g=p,d=b,h=d,f[j>>2]=0|f[c>>2],f[j+4>>2]=0|f[c+4>>2],Hg(e,h,j),f[k>>2]=0|f[e>>2],f[k+4>>2]=0|f[e+4>>2],i=d,f[n>>2]=0|f[k>>2],f[n+4>>2]=0|f[k+4>>2],wh(g,i,n),f[a>>2]=0|f[k>>2],f[a+4>>2]=0|f[k+4>>2],l=p}function wh(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,ib=0;ib=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=b,db=0,g=0|f[c>>2],gb=g,w=e,H=gb,vg(w,H),S=gb,ca=0|f[S>>2],na=ca>>>11,ya=8&na,Ja=0!=(0|ya),Ua=gb,Ja?(h=0|f[Ua>>2],n=h>>>11,o=496&n,p=o>>4,s=p):(q=Ua+12|0,r=0|f[q>>2],s=r),t=0==(0|s);do if(!t){if(u=gb,v=0|f[u>>2],x=v>>>11,y=8&x,z=0!=(0|y),A=gb,B=A+12|0,z){if(C=0!=(0|B),!C)break}else if(D=B+8|0,E=0|f[D>>2],F=0!=(0|E),!F)break;for(G=gb,I=0|f[G>>2],J=I>>>11,K=8&J,L=0!=(0|K),M=gb,N=M+12|0,L?Q=N:(O=N+8|0,P=0|f[O>>2],Q=P),eb=Q,R=gb,T=0|f[R>>2],U=T>>>11,V=8&U,W=0!=(0|V),Y=gb,Z=Y+12|0,W?pa=Z:($=Z+8|0,_=0|f[$>>2],pa=_),aa=gb,ba=0|f[aa>>2],da=ba>>>11,ea=8&da,fa=0!=(0|ea),ga=gb,fa?(ha=0|f[ga>>2],ia=ha>>>11,ja=496&ia,ka=ja>>4,qa=ka):(la=ga+12|0,ma=0|f[la>>2],qa=ma),oa=pa+qa|0,fb=oa,ra=eb,sa=0|d[ra>>0],ta=sa<<24>>24,ua=ta-97|0,va=ua>>>0<26,va&&(wa=eb,xa=0|d[wa>>0],za=xa<<24>>24,Aa=za-97|0,Ba=Aa>>>0<26,Ca=eb,Da=0|d[Ca>>0],Ea=Da<<24>>24,Fa=95&Ea,Ga=Ba?Fa:Ea,Ha=255&Ga,Ia=eb,d[Ia>>0]=Ha,db=1);;){if(Ka=eb,La=Ka+1|0,eb=La,Ma=fb,Na=La>>>0<Ma>>>0,!Na)break;Oa=eb,Pa=0|d[Oa>>0],Qa=Pa<<24>>24,Ra=Qa-65|0,Sa=Ra>>>0<26,Sa&&(Ta=eb,Va=0|d[Ta>>0],Wa=Va<<24>>24,Xa=Wa-65|0,Ya=Xa>>>0<26,Za=eb,$a=0|d[Za>>0],_a=$a<<24>>24,ab=32|_a,bb=Ya?ab:_a,cb=255&bb,i=eb,d[i>>0]=cb,db=1)}return j=db,k=j<<24>>24!=0,k?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=ib)):(Og(a),void(l=ib))}while(0);Og(a),l=ib}function xh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+48|0,(0|l)>=(0|m)&&X(),n=p+40|0,j=p+32|0,k=p+16|0,e=p+8|0,g=p,d=b,h=d,f[j>>2]=0|f[c>>2],f[j+4>>2]=0|f[c+4>>2],Hg(e,h,j),f[k>>2]=0|f[e>>2],f[k+4>>2]=0|f[e+4>>2],i=d,f[n>>2]=0|f[k>>2],f[n+4>>2]=0|f[k+4>>2],yh(g,i,n),f[a>>2]=0|f[k>>2],f[a+4>>2]=0|f[k+4>>2],l=p}function yh(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0,wf=0,xf=0,yf=0,zf=0,Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0,Gf=0,Hf=0,If=0,Jf=0,Kf=0,Lf=0,Mf=0,Nf=0,Of=0,Pf=0,Qf=0,Rf=0,Sf=0,Tf=0,Uf=0,Vf=0,Wf=0,Xf=0,Yf=0,Zf=0,$f=0,_f=0,ag=0,bg=0,cg=0,dg=0,eg=0,fg=0,gg=0,hg=0,ig=0,jg=0,kg=0,lg=0,mg=0,ng=0,og=0,pg=0,qg=0,rg=0,sg=0,tg=0,ug=0,wg=0,xg=0,yg=0,zg=0,Ag=0,Bg=0,Cg=0,Dg=0,Eg=0,Fg=0,Gg=0,Hg=0,Ig=0,Jg=0,Kg=0,Lg=0,Mg=0,Ng=0,Pg=0,Qg=0,Rg=0,Sg=0,Tg=0,Ug=0,Vg=0,Wg=0,Xg=0,Yg=0,Zg=0,$g=0,_g=0,ah=0,bh=0,ch=0,dh=0,eh=0,fh=0,gh=0,hh=0,ih=0,jh=0,kh=0,lh=0,mh=0,nh=0,oh=0,ph=0,qh=0,rh=0,sh=0,th=0,uh=0,vh=0,wh=0,xh=0,yh=0,zh=0,Ah=0,Bh=0,Ch=0,Dh=0,Eh=0,Fh=0,Gh=0,Hh=0,Ih=0,Jh=0,Kh=0,Lh=0,Mh=0,Nh=0,Oh=0,Ph=0,Qh=0,Rh=0,Sh=0,Th=0,Uh=0,Vh=0,Wh=0,Xh=0,Yh=0,Zh=0,$h=0,_h=0,ai=0,bi=0,ci=0,di=0,ei=0,fi=0,gi=0,hi=0,ii=0,ji=0,ki=0,li=0,mi=0,ni=0,oi=0,pi=0,qi=0,ri=0,si=0,ti=0,ui=0,wi=0;wi=l,l=l+64|0,(0|l)>=(0|m)&&X(),ui=wi,mi=wi+48|0,e=b,g=0|f[c>>2],oi=g,mb=e,pd=oi,vg(mb,pd),tf=oi,fh=0|f[tf>>2],qh=fh>>>11,Bh=8&qh,Mh=0!=(0|Bh),Xh=oi,Mh?(h=0|f[Xh>>2],u=h>>>11,F=496&u,Q=F>>4,wa=Q):(aa=Xh+12|0,la=0|f[aa>>2],wa=la),gi=wa,Ha=e,f[ui>>2]=mi,Sa=0|Lp(Ha,56037,ui),bb=0==(0|Sa),nb=gi,yb=0==(0|nb);a:do{if(!bb){do if(!yb){if(Hc=mi+4|0,Ic=0|f[Hc>>2],Jc=0==(0|Ic),Jc&&(Lc=0|f[mi>>2],Mc=0!=(0|Lc),!Mc))break;if(Nc=oi,Oc=0|f[Nc>>2],Pc=Oc>>>11,Qc=8&Pc,Rc=0!=(0|Qc),Sc=oi,Tc=Sc+12|0,Rc?Xc=Tc:(Uc=Tc+8|0,Wc=0|f[Uc>>2],Xc=Wc),ki=Xc,Yc=0|f[mi>>2],Zc=0|f[Yc>>2],$c=Zc>>>11,_c=8&$c,ad=0!=(0|_c),bd=0|f[mi>>2],ad?(cd=0|f[bd>>2],dd=cd>>>11,fd=496&dd,gd=fd>>4,jd=gd):(hd=bd+12|0,id=0|f[hd>>2],jd=id),ni=jd,kd=ni,ld=0==(0|kd)){for(;;){if(md=gi,nd=(0|md)>0,nd?(od=gi,rd=od-1|0,sd=ki,td=sd+rd|0,ud=0|d[td>>0],vd=ud<<24>>24,wd=10==(0|vd),dh=wd):dh=0,xd=gi,!dh)break;yd=xd+-1|0,gi=yd,zd=gi,Ad=(0|zd)>0,Ad&&(Cd=gi,Dd=Cd-1|0,Ed=ki,Fd=Ed+Dd|0,Gd=0|d[Fd>>0],Hd=Gd<<24>>24,Id=13==(0|Hd),Id&&(Jd=gi,Kd=Jd+-1|0,gi=Kd))}return Ld=oi,Nd=0|f[Ld>>2],Od=Nd>>>11,Pd=8&Od,Qd=0!=(0|Pd),Rd=oi,Qd?(Sd=0|f[Rd>>2],Td=Sd>>>11,Ud=496&Td,Vd=Ud>>4,$d=Vd):(Wd=Rd+12|0,Yd=0|f[Wd>>2],$d=Yd),(Zd=(0|xd)<(0|$d))?(_d=oi,ae=0|f[_d>>2],be=ae>>>11,ce=8&be,de=0!=(0|ce),ee=gi,de?(si=ee,fe=oi,he=0|f[fe>>2],ie=he>>>11,je=ie&-497,ke=0|f[fe>>2],le=2097151&je,me=le<<11,ne=2047&ke,oe=ne|me,f[fe>>2]=oe,pe=si,qe=pe<<4,se=oi,te=0|f[se>>2],ue=te>>>11,ve=ue|qe,we=0|f[se>>2],xe=2097151&ve,ye=xe<<11,ze=2047&we,Ae=ze|ye,f[se>>2]=Ae):(Be=oi,De=Be+12|0,f[De>>2]=ee),Ee=gi,Fe=ki,Ge=Fe+Ee|0,d[Ge>>0]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=wi)):(Og(a),void(l=wi))}if(He=ni,Ie=gi,Je=(0|He)>(0|Ie))return Og(a),void(l=wi);if(Ke=ni,Le=Ke-1|0,Me=0|f[mi>>2],Oe=0|f[Me>>2],Pe=Oe>>>11,Qe=8&Pe,Re=0!=(0|Qe),Se=0|f[mi>>2],Te=Se+12|0,Re?Xe=Te:(Ue=Te+8|0,Ve=0|f[Ue>>2],Xe=Ve),We=Xe+Le|0,Ze=0|d[We>>0],$e=Ze<<24>>24,hi=$e,_e=ni,af=1==(0|_e),bf=hi,cf=10==(0|bf),ii=af&cf,ii&&(df=ni,ef=df-1|0,ff=0|f[mi>>2],gf=0|f[ff>>2],jf=gf>>>11,kf=8&jf,lf=0!=(0|kf),mf=0|f[mi>>2],nf=mf+12|0,lf?rf=nf:(of=nf+8|0,pf=0|f[of>>2],rf=pf),qf=rf+ef|0,sf=0|d[qf>>0],vf=sf<<24>>24,hi=vf),wf=ni,xf=1==(0|wf),yf=hi,zf=10==(0|yf),ji=xf&zf)break a;Af=ki,Bf=gi,Cf=Af+Bf|0,Df=ni,Ef=0-Df|0,Gf=Cf+Ef|0,li=Gf,Hf=gi,If=Hf-1|0,Jf=ki,Kf=Jf+If|0,Lf=0|d[Kf>>0],Mf=Lf<<24>>24,Nf=hi,Of=(0|Mf)==(0|Nf);do if(Of){if(Pf=ni,Rf=(0|Pf)<=1,!Rf&&(Sf=0|f[mi>>2],Tf=0|f[Sf>>2],Uf=Tf>>>11,Vf=8&Uf,Wf=0!=(0|Vf),Xf=0|f[mi>>2],Yf=Xf+12|0,Wf?cg=Yf:(Zf=Yf+8|0,$f=0|f[Zf>>2],cg=$f),ag=li,bg=ni,dg=0|iv(cg,ag,bg),eg=0==(0|dg),!eg))break;return fg=oi,gg=0|f[fg>>2],hg=gg>>>11,ig=8&hg,jg=0!=(0|ig),lg=gi,mg=ni,ng=lg-mg|0,jg?(ti=ng,og=oi,pg=0|f[og>>2],qg=pg>>>11,rg=qg&-497,sg=0|f[og>>2],tg=2097151&rg,ug=tg<<11,xg=2047&sg,yg=xg|ug,f[og>>2]=yg,zg=ti,Ag=zg<<4,Bg=oi,Cg=0|f[Bg>>2],Dg=Cg>>>11,Eg=Dg|Ag,Fg=0|f[Bg>>2],Gg=2097151&Eg,Ig=Gg<<11,Jg=2047&Fg,Kg=Jg|Ig,f[Bg>>2]=Kg):(Lg=oi,Mg=Lg+12|0,f[Mg>>2]=ng),Ng=oi,Pg=0|f[Ng>>2],Qg=Pg>>>11,Rg=8&Qg,Sg=0!=(0|Rg),Ug=oi,Sg?(Vg=0|f[Ug>>2],Wg=Vg>>>11,Xg=496&Wg,Yg=Xg>>4,bh=Yg):(Zg=Ug+12|0,$g=0|f[Zg>>2],bh=$g),_g=ki,ah=_g+bh|0,d[ah>>0]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=wi)}while(0);return Og(a),void(l=wi)}while(0);return Og(a),void(l=wi)}if(yb)return Og(a),void(l=wi)}while(0);Jb=gi,Ub=Jb-1|0,dc=oi,oc=0|f[dc>>2],zc=oc>>>11,Kc=8&zc,Vc=0!=(0|Kc),ed=oi,qd=ed+12|0,Vc?ge=qd:(Bd=qd+8|0,Md=0|f[Bd>>2],ge=Md),Xd=ge+Ub|0,re=0|d[Xd>>0],Ce=re<<24>>24,Ne=10==(0|Ce);do{if(!Ne){if(Qa=gi,Ra=Qa-1|0,Ta=oi,Ua=0|f[Ta>>2],Va=Ua>>>11,Wa=8&Va,Xa=0!=(0|Wa),Ya=oi,Za=Ya+12|0,Xa?cb=Za:($a=Za+8|0,_a=0|f[$a>>2],cb=_a),ab=cb+Ra|0,db=0|d[ab>>0],eb=db<<24>>24,fb=13==(0|eb),!fb)return Og(a),void(l=wi);if(gb=oi,hb=0|f[gb>>2],ib=hb>>>11,jb=8&ib,kb=0!=(0|jb),lb=oi,ob=0|f[lb>>2],pb=ob>>>11,qb=8&pb,rb=0!=(0|qb),sb=oi,kb){rb?(tb=0|f[sb>>2],ub=tb>>>11,vb=496&ub,wb=vb>>4,Bb=wb):(xb=sb+12|0,zb=0|f[xb>>2],Bb=zb),Ab=Bb-1|0,ri=Ab,Cb=oi,Db=0|f[Cb>>2],Eb=Db>>>11,Fb=Eb&-497,Gb=0|f[Cb>>2],Hb=2097151&Fb,Ib=Hb<<11,Kb=2047&Gb,Lb=Kb|Ib,f[Cb>>2]=Lb,Mb=ri,Nb=Mb<<4,Ob=oi,Pb=0|f[Ob>>2],Qb=Pb>>>11,Rb=Qb|Nb,Sb=0|f[Ob>>2],Tb=2097151&Rb,Vb=Tb<<11,Wb=2047&Sb,Xb=Wb|Vb,f[Ob>>2]=Xb;break}rb?(Yb=0|f[sb>>2],Zb=Yb>>>11,$b=496&Zb,_b=$b>>4,ec=_b):(ac=sb+12|0,bc=0|f[ac>>2],ec=bc),cc=ec-1|0,fc=oi,gc=fc+12|0,f[gc>>2]=cc;break}if(Ye=oi,hf=0|f[Ye>>2],uf=hf>>>11,Ff=8&uf,Qf=0!=(0|Ff),_f=oi,kg=0|f[_f>>2],wg=kg>>>11,Hg=8&wg,Tg=0!=(0|Hg),ch=oi,Qf?(Tg?(eh=0|f[ch>>2],gh=eh>>>11,hh=496&gh,ih=hh>>4,mh=ih):(jh=ch+12|0,kh=0|f[jh>>2],mh=kh),lh=mh-1|0,pi=lh,nh=oi,oh=0|f[nh>>2],ph=oh>>>11,rh=ph&-497,sh=0|f[nh>>2],th=2097151&rh,uh=th<<11,vh=2047&sh,wh=vh|uh,f[nh>>2]=wh,xh=pi,yh=xh<<4,zh=oi,Ah=0|f[zh>>2],Ch=Ah>>>11,Dh=Ch|yh,Eh=0|f[zh>>2],Fh=2097151&Dh,Gh=Fh<<11,Hh=2047&Eh,Ih=Hh|Gh,f[zh>>2]=Ih):(Tg?(Jh=0|f[ch>>2],Kh=Jh>>>11,Lh=496&Kh,Nh=Lh>>4,Rh=Nh):(Oh=ch+12|0,Ph=0|f[Oh>>2],Rh=Ph),Qh=Rh-1|0,Sh=oi,Th=Sh+12|0,f[Th>>2]=Qh),Uh=oi,Vh=0|f[Uh>>2],Wh=Vh>>>11,Yh=8&Wh,Zh=0!=(0|Yh),$h=oi,Zh?(_h=0|f[$h>>2],ai=_h>>>11,bi=496&ai,ci=bi>>4,fi=ci):(di=$h+12|0,ei=0|f[di>>2],fi=ei),i=(0|fi)>0,i&&(j=oi,k=0|f[j>>2],n=k>>>11,o=8&n,p=0!=(0|o),q=oi,p?(r=0|f[q>>2],s=r>>>11,t=496&s,v=t>>4,z=v):(w=q+12|0,x=0|f[w>>2],z=x),y=z-1|0,A=oi,B=0|f[A>>2],C=B>>>11,D=8&C,E=0!=(0|D),G=oi,H=G+12|0,E?L=H:(I=H+8|0,J=0|f[I>>2],L=J),K=L+y|0,M=0|d[K>>0],N=M<<24>>24,O=13==(0|N))){if(P=oi,R=0|f[P>>2],S=R>>>11,T=8&S,U=0!=(0|T),V=oi,W=0|f[V>>2],Y=W>>>11,Z=8&Y,$=0!=(0|Z),_=oi,U){$?(ba=0|f[_>>2],ca=ba>>>11,da=496&ca,ea=da>>4,ia=ea):(fa=_+12|0,ga=0|f[fa>>2],ia=ga),ha=ia-1|0,qi=ha,ja=oi,ka=0|f[ja>>2],ma=ka>>>11,na=ma&-497,oa=0|f[ja>>2],pa=2097151&na,qa=pa<<11,ra=2047&oa,sa=ra|qa,f[ja>>2]=sa,ta=qi,ua=ta<<4,va=oi,xa=0|f[va>>2],ya=xa>>>11,za=ya|ua,Aa=0|f[va>>2],Ba=2097151&za,Ca=Ba<<11,Da=2047&Aa,Ea=Da|Ca,f[va>>2]=Ea;break}$?(Fa=0|f[_>>2],Ga=Fa>>>11,Ia=496&Ga,Ja=Ia>>4,Na=Ja):(Ka=_+12|0,La=0|f[Ka>>2],Na=La),Ma=Na-1|0,Oa=oi,Pa=Oa+12|0,f[Pa>>2]=Ma;break}}while(0);hc=oi,ic=0|f[hc>>2],jc=ic>>>11,kc=8&jc,lc=0!=(0|kc),mc=oi,lc?(nc=0|f[mc>>2],pc=nc>>>11,qc=496&pc,rc=qc>>4,Gc=rc):(sc=mc+12|0,tc=0|f[sc>>2],Gc=tc),uc=oi,vc=0|f[uc>>2],wc=vc>>>11,xc=8&wc,yc=0!=(0|xc),Ac=oi,Bc=Ac+12|0,yc?Fc=Bc:(Cc=Bc+8|0,Dc=0|f[Cc>>2],Fc=Dc),Ec=Fc+Gc|0,d[Ec>>0]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=wi}function zh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+48|0,(0|l)>=(0|m)&&X(),n=p+40|0,j=p+32|0,k=p+16|0,e=p+8|0,g=p,d=b,h=d,f[j>>2]=0|f[c>>2],f[j+4>>2]=0|f[c+4>>2],Hg(e,h,j),f[k>>2]=0|f[e>>2],f[k+4>>2]=0|f[e+4>>2],i=d,f[n>>2]=0|f[k>>2],f[n+4>>2]=0|f[k+4>>2],Ah(g,i,n),f[a>>2]=0|f[k>>2],f[a+4>>2]=0|f[k+4>>2],l=p}function Ah(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Vb=0;if(Vb=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=b,g=0|f[c>>2],Rb=g,ea=e,pa=Rb,vg(ea,pa),Aa=Rb,La=0|f[Aa>>2],Wa=La>>>11,fb=8&Wa,qb=0!=(0|fb),Bb=Rb,qb?(h=0|f[Bb>>2],u=h>>>11,F=496&u,Q=F>>4,aa=Q):($=Bb+12|0,_=0|f[$>>2],aa=_),ba=(0|aa)>0,!ba)return Og(a),void(l=Vb);for(ca=Rb,da=0|f[ca>>2],fa=da>>>11,ga=8&fa,ha=0!=(0|ga),ia=Rb,ja=ia+12|0,ha?ma=ja:(ka=ja+8|0,la=0|f[ka>>2],ma=la),Sb=ma,na=Sb,Qb=na,oa=Qb,qa=Rb,ra=0|f[qa>>2],sa=ra>>>11,ta=8&sa,ua=0!=(0|ta),va=Rb,ua?(wa=0|f[va>>2],xa=wa>>>11,ya=496&xa,za=ya>>4,Ea=za):(Ba=va+12|0,Ca=0|f[Ba>>2],Ea=Ca),Da=oa+Ea|0,Nb=Da;;){if(Fa=Qb,Ga=Nb,Ha=Fa>>>0<Ga>>>0,!Ha)break;if(Ia=Qb,Ja=Nb,Ka=0|Ng(Ia,Ja),Mb=Ka,Ma=Qb,Na=Mb,Oa=Ma+Na|0,Pa=Nb,Qa=Oa>>>0>=Pa>>>0)break;Ra=Mb,Sa=Qb,Ta=Sa+Ra|0,Qb=Ta}Ua=Qb,Va=Sb,Xa=Ua,Ya=Va,Za=Xa-Ya|0,Ob=Za,$a=Ob,_a=Rb,ab=0|f[_a>>2],bb=ab>>>11,cb=8&bb,db=0!=(0|cb),eb=Rb,gb=eb+12|0,db?kb=gb:(hb=gb+8|0,ib=0|f[hb>>2],kb=ib),jb=kb+$a|0,lb=0|d[jb>>0],mb=lb<<24>>24,nb=10==(0|mb),ob=Ob,pb=(0|ob)>0,Pb=nb&pb,Pb&&(rb=Ob,sb=rb-1|0,tb=Rb,ub=0|f[tb>>2],vb=ub>>>11,wb=8&vb,xb=0!=(0|wb),yb=Rb,zb=yb+12|0,xb?Eb=zb:(Ab=zb+8|0,Cb=0|f[Ab>>2],Eb=Cb),Db=Eb+sb|0,Fb=0|d[Db>>0],Gb=Fb<<24>>24,Hb=13==(0|Gb),Hb&&(Ib=Ob,Jb=Ib+-1|0,Ob=Jb)),Kb=Rb,Lb=0|f[Kb>>2],i=Lb>>>11,j=8&i,k=0!=(0|j),n=Ob,k?(Tb=n,o=Rb,p=0|f[o>>2],q=p>>>11,r=q&-497,s=0|f[o>>2],t=2097151&r,v=t<<11,w=2047&s,x=w|v,f[o>>2]=x,y=Tb,z=y<<4,A=Rb,B=0|f[A>>2],C=B>>>11,D=C|z,E=0|f[A>>2],G=2097151&D,H=G<<11,I=2047&E,J=I|H,f[A>>2]=J):(K=Rb,L=K+12|0,f[L>>2]=n),M=Ob,N=Rb,O=0|f[N>>2],P=O>>>11,R=8&P,S=0!=(0|R),T=Rb,U=T+12|0,S?Z=U:(V=U+8|0,W=0|f[V>>2],Z=W),Y=Z+M|0,d[Y>>0]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=Vb}function Bh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+48|0,(0|l)>=(0|m)&&X(),n=p+40|0,j=p+32|0,k=p+16|0,e=p+8|0,g=p,d=b,h=d,f[j>>2]=0|f[c>>2],f[j+4>>2]=0|f[c+4>>2],Hg(e,h,j),f[k>>2]=0|f[e>>2],f[k+4>>2]=0|f[e+4>>2],i=d,f[n>>2]=0|f[k>>2],f[n+4>>2]=0|f[k+4>>2],Ch(g,i,n),f[a>>2]=0|f[k>>2],f[a+4>>2]=0|f[k+4>>2],l=p}function Ch(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,va=0;for(va=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=b,qa=0,g=0|f[c>>2],ta=g,t=e,E=ta,vg(t,E),P=ta,_=0|f[P>>2],ka=_>>>11,na=8&ka,oa=0!=(0|na),pa=ta,h=pa+12|0,oa?k=h:(i=h+8|0,j=0|f[i>>2],k=j),ra=k,n=ta,o=0|f[n>>2],p=o>>>11,q=8&p,r=0!=(0|q),s=ta,u=s+12|0,r?L=u:(v=u+8|0,w=0|f[v>>2],L=w),x=ta,y=0|f[x>>2],z=y>>>11,A=8&z,B=0!=(0|A),C=ta,B?(D=0|f[C>>2],F=D>>>11,G=496&F,H=G>>4,M=H):(I=C+12|0,J=0|f[I>>2],M=J),K=L+M|0,sa=K;;){if(N=ra,O=sa,Q=N>>>0<O>>>0,!Q)break;R=ra,S=0|d[R>>0],T=S<<24>>24,U=T-65|0,V=U>>>0<26,V&&(W=ra,Y=0|d[W>>0],Z=Y<<24>>24,$=Z-65|0,aa=$>>>0<26,ba=ra,ca=0|d[ba>>0],da=ca<<24>>24,ea=32|da,fa=aa?ea:da,ga=255&fa,ha=ra,d[ha>>0]=ga,qa=1),ia=ra,ja=ia+1|0,ra=ja}return la=qa,ma=la<<24>>24!=0,ma?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=va)):(Og(a),void(l=va))}function Dh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0;A=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=0|f[c>>2],y=e,q=y,r=0|f[q>>2],s=r>>>11,t=8&s,u=0!=(0|t),v=y,u?(w=0|f[v>>2],x=w>>>11,g=496&x,h=g>>4,k=h):(i=v+12|0,j=0|f[i>>2],k=j),n=0==(0|k),o=1&n,p=255&o,nh(a,p),l=A}function Eh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,z=0;return z=l,l=l+48|0,(0|l)>=(0|m)&&X(),w=z+32|0,u=z+24|0,x=z,v=z+8|0,d=b,e=d,f[x>>2]=v,0|Lp(e,68900,x),j=v+4|0,k=0|f[j>>2],(n=16==(0|k))?(o=d,f[u>>2]=0|f[c>>2],f[u+4>>2]=0|f[c+4>>2],f[w>>2]=0|f[v>>2],f[w+4>>2]=0|f[v+4>>2],p=0|Dg(o,u,w),q=255&p,r=0!=(0|q),g=r,s=1&g,h=255&s,t=h,i=t,nh(a,i),void(l=z)):(g=0,s=1&g,h=255&s,t=h,i=t,nh(a,i),void(l=z))}function Fh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n+8|0,d=b,e=d,f[j>>2]=0|f[c>>2],f[j+4>>2]=0|f[c+4>>2],g=0|Sg(e,j),i=g,h=i,Zg(a,h),l=n}function Gh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,da=0;return da=l,l=l+64|0,(0|l)>=(0|m)&&X(),aa=da+48|0,Z=da+40|0,_=da+32|0,ba=da,$=da+16|0,e=da+8|0,d=b,s=d,f[ba>>2]=$,0|Lp(s,68900,ba),D=$+4|0,O=0|f[D>>2],(R=3==(0|O))?(S=0|f[c>>2],T=0|f[S>>2],U=T>>>11,V=8&U,g=0!=(0|V),h=0|f[c>>2],i=h+12|0,g?B=i:(j=i+8|0,k=0|f[j>>2],B=k),n=0|f[$>>2],o=0|f[c>>2],p=0|f[o>>2],q=p>>>11,r=8&q,t=0!=(0|r),u=0|f[c>>2],t?(v=0|f[u>>2],w=v>>>11,x=496&w,y=x>>4,C=y):(z=u+12|0,A=0|f[z>>2],C=A),E=0|gv(B,n,C),F=0!=(0|E),G=1&F,H=255&G,Y=H,Q=Y,nh(a,Q),void(l=da)):(I=d,f[_>>2]=0|f[$>>2],f[_+4>>2]=0|f[$+4>>2],zg(e,I,_),f[$>>2]=0|f[e>>2],f[$+4>>2]=0|f[e+4>>2],J=d,f[Z>>2]=0|f[c>>2],f[Z+4>>2]=0|f[c+4>>2],f[aa>>2]=0|f[$>>2],f[aa+4>>2]=0|f[$+4>>2],K=0|sh(J,Z,aa,0),W=K,L=W,M=(0|L)!=-1,N=1&M,P=255&N,Y=P,Q=Y,nh(a,Q),void(l=da))}function Hh(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Ba=0;Ba=l,l=l+128|0,(0|l)>=(0|m)&&X(),va=Ba+112|0,ra=Ba+104|0,ua=Ba+96|0,qa=Ba+88|0,pa=Ba+80|0,ta=Ba+72|0,ya=Ba+8|0,xa=Ba,la=Ba+60|0,ka=Ba+56|0,sa=Ba+48|0,g=Ba+32|0,wa=Ba+24|0,t=Ba+16|0,e=b,E=e,f[xa>>2]=la,za=xa+4|0,f[za>>2]=ka,0|Lp(E,68114,xa),P=0|f[ka>>2],_=2==(0|P);do{if(!_){if(oa=0,h=0|f[ka>>2],i=(0|h)>0){j=0|f[la>>2],f[sa>>2]=0|f[j>>2],f[sa+4>>2]=0|f[j+4>>2];break}Og(g),f[sa>>2]=0|f[g>>2],f[sa+4>>2]=0|f[g+4>>2];break}ga=0|f[la>>2],ha=ga+8|0,ia=0|f[ha>>2],oa=ia,ja=0|f[la>>2],f[sa>>2]=0|f[ja>>2],f[sa+4>>2]=0|f[ja+4>>2]}while(0);return k=e,f[ta>>2]=0|f[sa>>2],f[ta+4>>2]=0|f[sa+4>>2],Gg(k,ta),f[pa>>2]=0|f[c>>2],f[pa+4>>2]=0|f[c+4>>2],n=0|Mg(pa,-1),ma=n,o=oa,p=(0|o)<0,p&&(q=ma,r=oa,s=r+q|0,oa=s,u=oa,v=(0|u)<0)?(Og(a),void(l=Ba)):(w=oa,x=ma,(y=(0|w)>=(0|x))?(Og(a),void(l=Ba)):(z=oa,f[qa>>2]=0|f[c>>2],f[qa+4>>2]=0|f[c+4>>2],A=0|Qg(qa,0,z),oa=A,B=sa+4|0,C=0|f[B>>2],na=16==(0|C),na||(D=e,f[ua>>2]=0|f[sa>>2],f[ua+4>>2]=0|f[sa+4>>2],Xg(t,D,ua),f[wa>>2]=0|f[t>>2],f[wa+4>>2]=0|f[t+4>>2],F=wa+4|0,G=0|f[F>>2],H=0==(0|G),H&&(I=0|f[wa>>2],J=0!=(0|I),J||(K=e,L=e,M=0|tp(L,68905),d[ya>>0]=0|d[sa>>0],d[ya+1>>0]=0|d[sa+1>>0],d[ya+2>>0]=0|d[sa+2>>0],d[ya+3>>0]=0|d[sa+3>>0],d[ya+4>>0]=0|d[sa+4>>0],d[ya+5>>0]=0|d[sa+5>>0],d[ya+6>>0]=0|d[sa+6>>0],d[ya+7>>0]=0|d[sa+7>>0],Er(K,M,56077,ya))),f[sa>>2]=0|f[wa>>2],f[sa+4>>2]=0|f[wa+4>>2]),N=e,O=oa,f[ra>>2]=0|f[c>>2],f[ra+4>>2]=0|f[c+4>>2],f[va>>2]=0|f[sa>>2],f[va+4>>2]=0|f[sa+4>>2],Q=0|sh(N,ra,va,O),oa=Q,R=oa,(S=(0|R)==-1)?(Og(a),void(l=Ba)):(T=0|f[c>>2],U=0|f[T>>2],V=U>>>11,W=8&V,Y=0!=(0|W),Z=0|f[c>>2],$=Z+12|0,Y?da=$:(aa=$+8|0,ba=0|f[aa>>2],da=ba),ca=oa,ea=0|Ih(da,ca),oa=ea,fa=oa,Zg(a,fa),void(l=Ba))))}function Ih(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;for(B=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,d=b,y=0,x=0;;){if(p=x,q=d,r=(0|p)<(0|q),!r)break;s=c,t=c,u=d,v=t+u|0,w=0|Ng(s,v),z=w,e=z,f=x,g=f+e|0,x=g,h=z,i=c,j=i+h|0,c=j,k=y,n=k+1|0,y=n}return o=y,l=B,0|o}function Jh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;r=l,l=l+32|0,(0|l)>=(0|m)&&X(),p=r,o=r+16|0,e=r+8|0,d=b,g=d,f[p>>2]=o,h=0|Lp(g,56037,p),i=1==(0|h),i&&(j=d,k=0|f[c>>2],n=0|f[o>>2],Jg(e,j,k,n)),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=r}function Kh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+32|0,(0|l)>=(0|m)&&X(),k=o,j=o+8|0,d=b,e=d,f[k>>2]=j,0|Lp(e,55924,k),g=d,h=0|f[c>>2],i=0|f[j>>2],Jg(a,g,h,i),l=o}function Lh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0;k=l,l=l+16|0,(0|l)>=(0|m)&&X(),i=k+8|0,d=b,f[i>>2]=0|f[c>>2],f[i+4>>2]=0|f[c+4>>2],e=0|Mg(i,-1),h=e,g=h,Zg(a,g),l=k}function Mh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+48|0,(0|l)>=(0|m)&&X(),k=o+32|0,i=o+24|0,j=o+8|0,e=o,d=b,g=d,f[i>>2]=0|f[c>>2],f[i+4>>2]=0|f[c+4>>2],Hg(j,g,i),h=d,f[k>>2]=0|f[j>>2],f[k+4>>2]=0|f[j+4>>2],Nh(e,h,k),f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=o}function Nh(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,$b=0;if($b=l,l=l+64|0,(0|l)>=(0|m)&&X(),Xb=$b+48|0,e=b,f[Xb>>2]=0|f[c>>2],f[Xb+4>>2]=0|f[c+4>>2],g=0|Mg(Xb,-1),Yb=g,fa=0|f[c>>2],qa=0|f[fa>>2],Ba=qa>>>11,Ma=8&Ba,Xa=0!=(0|Ma),gb=0|f[c>>2],Xa?(rb=0|f[gb>>2],Cb=rb>>>11,h=496&Cb,u=h>>4,_=u):(F=gb+12|0,Q=0|f[F>>2],_=Q),Sb=_,aa=Yb,ba=Sb,ca=(0|aa)==(0|ba)){wb=0|f[c>>2],Wb=wb,xb=e,yb=Wb,vg(xb,yb),zb=Wb,Ab=0|f[zb>>2],Bb=Ab>>>11,Db=8&Bb,Eb=0!=(0|Db),Fb=Wb,Eb?(Gb=0|f[Fb>>2],Hb=Gb>>>11,Ib=496&Hb,Jb=Ib>>4,Mb=Jb):(Kb=Fb+12|0,Lb=0|f[Kb>>2],Mb=Lb),i=(0|Mb)>1;a:do if(i)for(j=Wb,k=0|f[j>>2],n=k>>>11,o=8&n,p=0!=(0|o),q=Wb,r=q+12|0,p?v=r:(s=r+8|0,t=0|f[s>>2],v=t),Ub=v,w=Ub,x=Wb,y=0|f[x>>2],z=y>>>11,A=8&z,B=0!=(0|A),C=Wb,B?(D=0|f[C>>2],E=D>>>11,G=496&E,H=G>>4,L=H):(I=C+12|0,J=0|f[I>>2],L=J),K=w+L|0,M=K+-1|0,Rb=M;;){if(N=Ub,O=Rb,P=N>>>0<O>>>0,!P)break a;R=Ub,S=0|d[R>>0],Ob=S,T=Rb,U=0|d[T>>0],V=Ub,W=V+1|0,Ub=W,d[V>>0]=U,Y=Ob,Z=Rb,$=Z+-1|0,Rb=$,d[Z>>0]=Y}while(0);return f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=$b)}if(da=Yb,ea=(0|da)>1){for(ga=e,ha=0|f[c>>2],vg(ga,ha),ia=0|f[c>>2],ja=0|f[ia>>2],ka=ja>>>11,la=8&ka,ma=0!=(0|la),na=0|f[c>>2],ma?(oa=0|f[na>>2],pa=oa>>>11,ra=496&pa,sa=ra>>4,va=sa):(ta=na+12|0,ua=0|f[ta>>2],va=ua),Sb=va,wa=e,xa=Sb,ya=0|Jc(wa,xa),Nb=ya,za=Nb,Tb=za,Aa=Nb,Ca=Sb,Da=Aa+Ca|0,Qb=Da,Ea=Nb,Fa=0|f[c>>2],Ga=0|f[Fa>>2],Ha=Ga>>>11,Ia=8&Ha,Ja=0!=(0|Ia),Ka=0|f[c>>2],La=Ka+12|0,Ja?Qa=La:(Na=La+8|0,Oa=0|f[Na>>2],Qa=Oa),Pa=Sb,0|sw(0|Ea,0|Qa,0|Pa),Ra=0|f[c>>2],Sa=0|f[Ra>>2],Ta=Sa>>>11,Ua=8&Ta,Va=0!=(0|Ua),Wa=0|f[c>>2],Ya=Wa+12|0,Va?bb=Ya:(Za=Ya+8|0,$a=0|f[Za>>2],bb=$a),_a=Sb,ab=bb+_a|0,Vb=ab;;){if(cb=Tb,db=Qb,eb=cb>>>0<db>>>0,!eb)break;fb=Tb,hb=Qb,ib=0|Ng(fb,hb),Pb=ib,jb=Pb,kb=Vb,lb=0-jb|0,mb=kb+lb|0,Vb=mb,nb=Vb,ob=Tb,pb=Pb,0|sw(0|nb,0|ob,0|pb),qb=Pb,sb=Tb,tb=sb+qb|0,Tb=tb}ub=e,vb=Nb,Dc(ub,vb)}f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=$b}function Oh(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ka=0;Ka=l,l=l+144|0,(0|l)>=(0|m)&&X(),Ba=Ka+136|0,ya=Ka+128|0,Da=Ka+120|0,Ca=Ka+112|0,xa=Ka+104|0,wa=Ka+96|0,Aa=Ka+88|0,va=Ka+80|0,Ga=Ka+8|0,Fa=Ka,ra=Ka+68|0,qa=Ka+64|0,za=Ka+56|0,Ia=Ka+48|0,g=Ka+32|0,Ea=Ka+24|0,t=Ka+16|0,e=b,f[va>>2]=0|f[c>>2],f[va+4>>2]=0|f[c+4>>2],E=0|Mg(va,-1),ta=E,P=e,f[Fa>>2]=ra,Ha=Fa+4|0,f[Ha>>2]=qa,0|Lp(P,68114,Fa),_=0|f[qa>>2],ka=2==(0|_);do{if(!ka){if(x=ta,ua=x,y=0|f[qa>>2],z=(0|y)>0){A=0|f[ra>>2],f[za>>2]=0|f[A>>2],f[za+4>>2]=0|f[A+4>>2];break}Og(g),f[za>>2]=0|f[g>>2],f[za+4>>2]=0|f[g+4>>2];break}if(na=0|f[ra>>2],f[za>>2]=0|f[na>>2],f[za+4>>2]=0|f[na+4>>2],oa=0|f[ra>>2],pa=oa+8|0,f[Ia>>2]=0|f[pa>>2],f[Ia+4>>2]=0|f[pa+4>>2],h=0|f[Ia>>2],ua=h,i=ua,j=(0|i)<0,j&&(k=ta,n=ua,o=n+k|0,ua=o,p=ua,q=(0|p)<0))return r=e,f[Aa>>2]=0|f[za>>2],f[Aa+4>>2]=0|f[za+4>>2],Gg(r,Aa),Og(a),void(l=Ka);s=ua,u=ta,v=(0|s)>(0|u),v&&(w=ta,ua=w)}while(0);return B=ua,f[wa>>2]=0|f[c>>2],f[wa+4>>2]=0|f[c+4>>2],C=0|Qg(wa,0,B),ua=C,D=ua,F=ta,f[xa>>2]=0|f[c>>2],f[xa+4>>2]=0|f[c+4>>2],G=0|Qg(xa,D,F),ta=G,H=e,f[Ca>>2]=0|f[za>>2],f[Ca+4>>2]=0|f[za+4>>2],Gg(H,Ca),I=za+4|0,J=0|f[I>>2],sa=16==(0|J),sa||(K=e,f[Da>>2]=0|f[za>>2],f[Da+4>>2]=0|f[za+4>>2],Xg(t,K,Da),f[Ea>>2]=0|f[t>>2],f[Ea+4>>2]=0|f[t+4>>2],L=Ea+4|0,M=0|f[L>>2],N=0==(0|M),N&&(O=0|f[Ea>>2],Q=0!=(0|O),Q||(R=e,S=e,T=0|tp(S,68905),d[Ga>>0]=0|d[za>>0],d[Ga+1>>0]=0|d[za+1>>0],d[Ga+2>>0]=0|d[za+2>>0],d[Ga+3>>0]=0|d[za+3>>0],d[Ga+4>>0]=0|d[za+4>>0],d[Ga+5>>0]=0|d[za+5>>0],d[Ga+6>>0]=0|d[za+6>>0],d[Ga+7>>0]=0|d[za+7>>0],Er(R,T,56077,Ga))),f[za>>2]=0|f[Ea>>2],f[za+4>>2]=0|f[Ea+4>>2]),U=e,V=ua,f[ya>>2]=0|f[c>>2],f[ya+4>>2]=0|f[c+4>>2],f[Ba>>2]=0|f[za>>2],f[Ba+4>>2]=0|f[za+4>>2],W=0|Ph(U,ya,Ba,V),ua=W,Y=ua,(Z=(0|Y)>=0)?($=0|f[c>>2],aa=0|f[$>>2],ba=aa>>>11,ca=8&ba,da=0!=(0|ca),ea=0|f[c>>2],fa=ea+12|0,da?ja=fa:(ga=fa+8|0,ha=0|f[ga>>2],ja=ha),ia=ua,la=0|Ih(ja,ia),ua=la,ma=ua,Zg(a,ma),void(l=Ka)):(Og(a),void(l=Ka))}function Ph(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0;if(Db=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=a,Q=d,aa=0|f[b>>2],yb=aa,la=0|f[c>>2],wa=0|f[la>>2],Ha=wa>>>11,Sa=8&Ha,bb=0!=(0|Sa),mb=0|f[c>>2],bb?(h=0|f[mb>>2],u=h>>>11,F=496&u,J=F>>4,M=J):(K=mb+12|0,L=0|f[K>>2],M=L),xb=M,N=yb,O=0|f[N>>2],P=O>>>11,R=8&P,S=0!=(0|R),T=yb,S?(U=0|f[T>>2],V=U>>>11,W=496&V,Y=W>>4,ba=Y):(Z=T+12|0,$=0|f[Z>>2],ba=$),_=xb,ca=(0|ba)<(0|_))return e=-1,I=e,l=Db,0|I;if(da=yb,ea=0|f[da>>2],fa=ea>>>11,ga=8&fa,ha=0!=(0|ga),ia=yb,ha?(ja=0|f[ia>>2],ka=ja>>>11,ma=496&ka,na=ma>>4,sa=na):(oa=ia+12|0,pa=0|f[oa>>2],sa=pa),qa=Q,ra=sa-qa|0,ta=xb,ua=(0|ra)<(0|ta),ua&&(va=yb,xa=0|f[va>>2],ya=xa>>>11,za=8&ya,Aa=0!=(0|za),Ba=yb,Aa?(Ca=0|f[Ba>>2],Da=Ca>>>11,Ea=496&Da,Fa=Ea>>4,La=Fa):(Ga=Ba+12|0,Ia=0|f[Ga>>2],La=Ia),Ja=xb,Ka=La-Ja|0,Q=Ka),Ma=yb,Na=0|f[Ma>>2],Oa=Na>>>11,Pa=8&Oa,Qa=0!=(0|Pa),Ra=yb,Ta=Ra+12|0,Qa?Wa=Ta:(Ua=Ta+8|0,Va=0|f[Ua>>2],Wa=Va),Ab=Wa,Xa=yb,Ya=0|f[Xa>>2],Za=Ya>>>11,$a=8&Za,_a=0!=(0|$a),ab=yb,cb=ab+12|0,_a?hb=cb:(db=cb+8|0,eb=0|f[db>>2],hb=eb),fb=Q,gb=hb+fb|0,zb=gb,ib=0|f[c>>2],jb=0|f[ib>>2],kb=jb>>>11,lb=8&kb,nb=0!=(0|lb),ob=0|f[c>>2],pb=ob+12|0,nb?sb=pb:(qb=pb+8|0,rb=0|f[qb>>2],sb=rb),Bb=sb,tb=xb,ub=0!=(0|tb),!ub)return H=Q,e=H,I=e,l=Db,0|I;for(;;){if(vb=Ab,wb=zb,i=vb>>>0<=wb>>>0,!i){Cb=34;break}if(j=zb,k=Bb,n=xb,o=0|iv(j,k,n),p=0==(0|o),q=zb,p)break;G=q+-1|0,zb=G}return 34==(0|Cb)?(e=-1,I=e,l=Db,0|I):(r=yb,s=0|f[r>>2],t=s>>>11,v=8&t,w=0!=(0|v),x=yb,y=x+12|0,w?C=y:(z=y+8|0,A=0|f[z>>2],C=A),B=q,D=C,E=B-D|0,e=E,I=e,l=Db,0|I)}function Qh(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0,wf=0,xf=0,yf=0,zf=0,Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0,Gf=0,Hf=0,If=0,Jf=0,Kf=0,Lf=0,Mf=0,Nf=0,Of=0,Pf=0,Qf=0,Rf=0,Sf=0,Tf=0,Uf=0;
+Uf=l,l=l+272|0,(0|l)>=(0|m)&&X(),Bf=Uf+256|0,Qf=Uf+248|0,Af=Uf+240|0,Jf=Uf+232|0,If=Uf+224|0,Hf=Uf+216|0,g=Uf+208|0,Cf=Uf+200|0,Mf=Uf+192|0,Lf=Uf+184|0,e=Uf+176|0,zf=Uf+168|0,Kf=Uf+160|0,Gf=Uf+152|0,Rf=Uf,Ef=Uf+136|0,tf=Uf+112|0,yf=Uf+104|0,Pf=Uf+96|0,i=Uf+88|0,ob=Uf+64|0,td=Uf+40|0,Yd=Uf+32|0,he=Uf+24|0,se=Uf+8|0,h=b,Og(Ef),Ff=1,pf=0,f[tf>>2]=0,De=h,f[Rf>>2]=Ef,Sf=Rf+4|0,f[Sf>>2]=tf,Oe=0|Lp(De,56107,Rf),lf=Oe,Ze=0|f[tf>>2],j=(0|Ze)>0,w=lf,H=2==(0|w),S=j?H:0,ca=1&S,uf=ca,na=lf,ya=2==(0|na);do if(ya){if(Ja=0|f[tf>>2],Ua=1==(0|Ja),!Ua){pf=1;break}return db=0|f[c>>2],pb=0|f[db>>2],Ab=pb>>>11,Lb=8&Ab,Wb=0!=(0|Lb),fc=0|f[c>>2],Wb?(qc=0|f[fc>>2],Bc=qc>>>11,Mc=496&Bc,Zc=Mc>>4,Fd=Zc):(id=fc+12|0,ud=0|f[id>>2],Fd=ud),Qd=0==(0|Fd),Rd=h,Qd?(Jn(a,Rd,0),void(l=Uf)):(Nn(a,Rd,1,c),void(l=Uf))}while(0);Sd=lf,Td=0==(0|Sd);do if(Td)Tf=13;else{if(Ud=Ef+4|0,Vd=0|f[Ud>>2],Wd=0==(0|Vd),Wd&&(Xd=0|f[Ef>>2],Zd=0!=(0|Xd),!Zd)){Tf=13;break}if($d=Ef+4|0,_d=0|f[$d>>2],ae=16==(0|_d),!ae){Fe=h,f[Gf>>2]=0|f[c>>2],f[Gf+4>>2]=0|f[c+4>>2],Fg(Fe,Gf);break}Ff=1,be=0|f[Ef>>2],ce=0|f[be>>2],de=ce>>>11,ee=8&de,fe=0!=(0|ee),ge=0|f[Ef>>2],fe?(ie=0|f[ge>>2],je=ie>>>11,ke=496&je,le=ke>>4,oe=le):(me=ge+12|0,ne=0|f[me>>2],oe=ne),pe=1==(0|oe),pe&&(qe=0|f[Ef>>2],re=0|f[qe>>2],te=re>>>11,ue=8&te,ve=0!=(0|ue),we=0|f[Ef>>2],xe=we+12|0,ve?Be=xe:(ye=xe+8|0,ze=0|f[ye>>2],Be=ze),Ae=0|d[Be>>0],Ce=Ae<<24>>24,Ee=32==(0|Ce),Ee&&(Ff=0))}while(0);13==(0|Tf)&&(Ff=0),Ge=h,Mn(i,Ge),f[yf>>2]=0|f[i>>2],f[yf+4>>2]=0|f[i+4>>2],mf=0,He=Ff,Ie=0==(0|He);a:do if(Ie)for(Df=1,qf=0,Je=0|f[c>>2],Ke=0|f[Je>>2],Le=Ke>>>11,Me=8&Le,Ne=0!=(0|Me),Pe=0|f[c>>2],Ne?(Qe=0|f[Pe>>2],Re=Qe>>>11,Se=496&Re,Te=Se>>4,We=Te):(Ue=Pe+12|0,Ve=0|f[Ue>>2],We=Ve),Nf=We,Xe=h,Ye=0|Wc(Xe),jf=Ye,$e=mf,of=$e,qf=$e;;){if(_e=qf,af=Nf,bf=(0|_e)<(0|af),!bf)break a;if(cf=qf,df=cf+1|0,qf=df,ef=0|f[c>>2],ff=0|f[ef>>2],gf=ff>>>11,hf=8&gf,k=0!=(0|hf),n=0|f[c>>2],o=n+12|0,k?s=o:(p=o+8|0,q=0|f[p>>2],s=q),r=s+cf|0,t=0|d[r>>0],u=255&t,nf=u,v=Df,x=v<<24>>24!=0,y=nf,z=32==(0|y),x){if(!z&&(A=nf,B=A-9|0,C=B>>>0<5,!C)){if(E=qf,of=E,Df=0,F=uf,G=0!=(0|F),!G)continue;if(I=0|f[tf>>2],J=pf,K=(0|I)<=(0|J))break a;continue}D=qf,mf=D}else z||(L=nf,M=L-9|0,N=M>>>0<5)?(O=h,P=h,Q=mf,R=of,T=mf,U=R-T|0,f[Kf>>2]=0|f[c>>2],f[Kf+4>>2]=0|f[c+4>>2],Rg(ob,P,Kf,Q,U),f[zf>>2]=0|f[yf>>2],f[zf+4>>2]=0|f[yf+4>>2],f[e>>2]=0|f[ob>>2],f[e+4>>2]=0|f[ob+4>>2],$n(O,zf,e),V=h,W=jf,Xc(V,W),Df=1,Y=qf,mf=Y,Z=uf,($=0!=(0|Z))&&(_=pf,aa=_+1|0,pf=aa)):(ba=qf,of=ba)}else{if(da=Ff,ea=1==(0|da),!ea){Qb=h,f[Hf>>2]=0|f[c>>2],f[Hf+4>>2]=0|f[c+4>>2],Fg(Qb,Hf);break}for(fa=0|f[c>>2],ga=0|f[fa>>2],ha=ga>>>11,ia=8&ha,ja=0!=(0|ia),ka=0|f[c>>2],ja?(la=0|f[ka>>2],ma=la>>>11,oa=496&ma,pa=oa>>4,sa=pa):(qa=ka+12|0,ra=0|f[qa>>2],sa=ra),Of=sa,ta=0|f[Ef>>2],ua=0|f[ta>>2],va=ua>>>11,wa=8&va,xa=0!=(0|wa),za=0|f[Ef>>2],xa?(Aa=0|f[za>>2],Ba=Aa>>>11,Ca=496&Ba,Da=Ca>>4,Ga=Da):(Ea=za+12|0,Fa=0|f[Ea>>2],Ga=Fa),xf=Ga,rf=0,Ha=h,Ia=0|Wc(Ha),kf=Ia;;){if(Ka=rf,La=Of,Ma=(0|Ka)<(0|La),!Ma)break;if(Na=xf,Oa=(0|Na)>0){if(Pa=0|f[Ef>>2],Qa=0|f[Pa>>2],Ra=Qa>>>11,Sa=8&Ra,Ta=0!=(0|Sa),Va=0|f[Ef>>2],Wa=Va+12|0,Ta?qb=Wa:(Xa=Wa+8|0,Ya=0|f[Xa>>2],qb=Ya),Za=xf,$a=0|f[c>>2],_a=0|f[$a>>2],ab=_a>>>11,bb=8&ab,cb=0!=(0|bb),eb=0|f[c>>2],fb=eb+12|0,cb?kb=fb:(gb=fb+8|0,hb=0|f[gb>>2],kb=hb),ib=rf,jb=kb+ib|0,lb=Of,mb=rf,nb=lb-mb|0,rb=0|th(qb,Za,jb,nb),of=rb,sb=of,tb=(0|sb)<0)break}else ub=rf,f[Lf>>2]=0|f[c>>2],f[Lf+4>>2]=0|f[c+4>>2],vb=0|Qg(Lf,ub,1),of=vb;if(wb=h,xb=h,yb=rf,zb=of,f[Mf>>2]=0|f[c>>2],f[Mf+4>>2]=0|f[c+4>>2],Rg(td,xb,Mf,yb,zb),f[Cf>>2]=0|f[yf>>2],f[Cf+4>>2]=0|f[yf+4>>2],f[g>>2]=0|f[td>>2],f[g+4>>2]=0|f[td+4>>2],$n(wb,Cf,g),Bb=h,Cb=kf,Xc(Bb,Cb),Db=of,Eb=xf,Fb=Db+Eb|0,Gb=rf,Hb=Gb+Fb|0,rf=Hb,Ib=uf,Jb=0!=(0|Ib),Jb&&(Kb=0|f[tf>>2],Mb=pf,Nb=Mb+1|0,pf=Nb,Ob=(0|Kb)<=(0|Nb)))break}Pb=rf,mf=Pb}while(0);Rb=0|f[c>>2],Sb=0|f[Rb>>2],Tb=Sb>>>11,Ub=8&Tb,Vb=0!=(0|Ub),Xb=0|f[c>>2],Vb?(Yb=0|f[Xb>>2],Zb=Yb>>>11,$b=496&Zb,_b=$b>>4,cc=_b):(ac=Xb+12|0,bc=0|f[ac>>2],cc=bc),dc=(0|cc)>0;do if(dc){if(ec=uf,gc=0!=(0|ec),!gc&&(hc=0|f[c>>2],ic=0|f[hc>>2],jc=ic>>>11,kc=8&jc,lc=0!=(0|kc),mc=0|f[c>>2],lc?(nc=0|f[mc>>2],oc=nc>>>11,pc=496&oc,rc=pc>>4,vc=rc):(sc=mc+12|0,tc=0|f[sc>>2],vc=tc),uc=mf,wc=(0|vc)>(0|uc),xc=0|f[tf>>2],yc=(0|xc)<0,vf=wc|yc,!vf))break;zc=0|f[c>>2],Ac=0|f[zc>>2],Cc=Ac>>>11,Dc=8&Cc,Ec=0!=(0|Dc),Fc=0|f[c>>2],Ec?(Gc=0|f[Fc>>2],Hc=Gc>>>11,Ic=496&Hc,Jc=Ic>>4,Oc=Jc):(Kc=Fc+12|0,Lc=0|f[Kc>>2],Oc=Lc),Nc=mf,Pc=(0|Oc)==(0|Nc),Qc=h,Pc?(f[If>>2]=0|f[c>>2],f[If+4>>2]=0|f[c+4>>2],Rh(Yd,Qc,If),f[Pf>>2]=0|f[Yd>>2],f[Pf+4>>2]=0|f[Yd+4>>2]):(Rc=mf,Sc=0|f[c>>2],Tc=0|f[Sc>>2],Uc=Tc>>>11,Vc=8&Uc,Yc=0!=(0|Vc),$c=0|f[c>>2],Yc?(_c=0|f[$c>>2],ad=_c>>>11,bd=496&ad,cd=bd>>4,hd=cd):(dd=$c+12|0,ed=0|f[dd>>2],hd=ed),fd=mf,gd=hd-fd|0,f[Jf>>2]=0|f[c>>2],f[Jf+4>>2]=0|f[c+4>>2],Rg(he,Qc,Jf,Rc,gd),f[Pf>>2]=0|f[he>>2],f[Pf+4>>2]=0|f[he+4>>2]),jd=h,f[Af>>2]=0|f[yf>>2],f[Af+4>>2]=0|f[yf+4>>2],f[Qf>>2]=0|f[Pf>>2],f[Qf+4>>2]=0|f[Pf+4>>2],$n(jd,Af,Qf)}while(0);kd=uf,ld=0==(0|kd),md=0|f[tf>>2],nd=0==(0|md),wf=ld&nd;a:do if(wf)for(;;){if(od=0|f[yf>>2],pd=od+12|0,qd=0|f[pd>>2],sf=qd,rd=(0|qd)>0,!rd)break a;if(sd=sf,vd=sd-1|0,wd=0|f[yf>>2],xd=wd+20|0,yd=0|f[xd>>2],zd=yd+(vd<<3)|0,f[Pf>>2]=0|f[zd>>2],f[Pf+4>>2]=0|f[zd+4>>2],Ad=0|f[Pf>>2],Bd=0|f[Ad>>2],Cd=Bd>>>11,Dd=8&Cd,Ed=0!=(0|Dd),Gd=0|f[Pf>>2],Ed?(Hd=0|f[Gd>>2],Id=Hd>>>11,Jd=496&Id,Kd=Jd>>4,Nd=Kd):(Ld=Gd+12|0,Md=0|f[Ld>>2],Nd=Md),Od=0==(0|Nd),!Od)break a;Pd=h,f[Bf>>2]=0|f[yf>>2],f[Bf+4>>2]=0|f[yf+4>>2],_n(se,Pd,Bf)}while(0);f[a>>2]=0|f[yf>>2],f[a+4>>2]=0|f[yf+4>>2],l=Uf}function Rh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+16|0,(0|l)>=(0|m)&&X(),n=p+8|0,d=b,e=d,g=0|og(e,0,0),k=g,h=d,i=k,f[n>>2]=0|f[c>>2],f[n+4>>2]=0|f[c+4>>2],Ig(h,i,n),j=k,mg(a,j),l=p}function Sh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n+8|0,d=b,e=d,g=d,f[j>>2]=0|f[c>>2],f[j+4>>2]=0|f[c+4>>2],h=+bh(g,j,0),i=h,Th(a,e,i),l=n}function Th(a,b,c){a|=0,b|=0,c=+c;var d=0,e=0,g=0,h=0,i=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),i=n,d=b,e=c,g=i+4|0,f[g>>2]=6,h=e,j[i>>2]=h,f[a>>2]=0|f[i>>2],f[a+4>>2]=0|f[i+4>>2],l=n}function Uh(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;return w=l,l=l+48|0,(0|l)>=(0|m)&&X(),s=w+32|0,u=w+8|0,t=w,r=w+24|0,g=w+16|0,e=b,f[r>>2]=10,h=e,f[t>>2]=r,0|Lp(h,64388,t),i=0|f[r>>2],j=(0|i)<0,k=e,j?(n=e,o=0|tp(n,68855),p=0|f[r>>2],Zg(g,p),d[u>>0]=0|d[g>>0],d[u+1>>0]=0|d[g+1>>0],d[u+2>>0]=0|d[g+2>>0],d[u+3>>0]=0|d[g+3>>0],d[u+4>>0]=0|d[g+4>>0],d[u+5>>0]=0|d[g+5>>0],d[u+6>>0]=0|d[g+6>>0],d[u+7>>0]=0|d[g+7>>0],Er(k,o,55769,u),void 0):(q=0|f[r>>2],f[s>>2]=0|f[c>>2],f[s+4>>2]=0|f[c+4>>2],_g(a,k,s,q,0),void(l=w))}function Vh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;return r=l,l=l+32|0,(0|l)>=(0|m)&&X(),p=r+16|0,o=r+8|0,d=b,e=d,f[o>>2]=0|f[c>>2],f[o+4>>2]=0|f[c+4>>2],g=0|jq(e,o),h=d,i=h+48|0,j=0|f[i>>2],k=(0|g)!=(0|j),k?(n=d,f[p>>2]=0|f[c>>2],f[p+4>>2]=0|f[c+4>>2],Hg(a,n,p),void(l=r)):(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=r))}function Wh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+48|0,(0|l)>=(0|m)&&X(),n=p+40|0,j=p+32|0,k=p+16|0,e=p+8|0,g=p,d=b,h=d,f[j>>2]=0|f[c>>2],f[j+4>>2]=0|f[c+4>>2],Hg(e,h,j),f[k>>2]=0|f[e>>2],f[k+4>>2]=0|f[e+4>>2],i=d,f[n>>2]=0|f[k>>2],f[n+4>>2]=0|f[k+4>>2],Xh(g,i,n),f[a>>2]=0|f[k>>2],f[a+4>>2]=0|f[k+4>>2],l=p}function Xh(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,va=0;for(va=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=b,g=0|f[c>>2],ta=g,qa=0,t=e,E=ta,vg(t,E),P=0|f[c>>2],_=0|f[P>>2],ka=_>>>11,na=8&ka,oa=0!=(0|na),pa=0|f[c>>2],h=pa+12|0,oa?k=h:(i=h+8|0,j=0|f[i>>2],k=j),ra=k,n=0|f[c>>2],o=0|f[n>>2],p=o>>>11,q=8&p,r=0!=(0|q),s=0|f[c>>2],u=s+12|0,r?L=u:(v=u+8|0,w=0|f[v>>2],L=w),x=0|f[c>>2],y=0|f[x>>2],z=y>>>11,A=8&z,B=0!=(0|A),C=0|f[c>>2],B?(D=0|f[C>>2],F=D>>>11,G=496&F,H=G>>4,M=H):(I=C+12|0,J=0|f[I>>2],M=J),K=L+M|0,sa=K;;){if(N=ra,O=sa,Q=N>>>0<O>>>0,!Q)break;R=ra,S=0|d[R>>0],T=S<<24>>24,U=T-97|0,V=U>>>0<26,V&&(W=ra,Y=0|d[W>>0],Z=Y<<24>>24,$=Z-97|0,aa=$>>>0<26,ba=ra,ca=0|d[ba>>0],da=ca<<24>>24,ea=95&da,fa=aa?ea:da,ga=255&fa,ha=ra,d[ha>>0]=ga,qa=1),ia=ra,ja=ia+1|0,ra=ja}return la=qa,ma=la<<24>>24!=0,ma?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=va)):(Og(a),void(l=va))}function Yh(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,ma=0;for(ma=l,l=l+48|0,(0|l)>=(0|m)&&X(),e=ma+40|0,ha=ma+32|0,ga=ma+16|0,h=ma,g=b,u=0|f[c>>2],ka=u,F=g,Q=ka,aa=0|f[Q>>2],ca=aa>>>11,da=8&ca,ea=0!=(0|da),fa=ka,ea?(i=0|f[fa>>2],j=i>>>11,k=496&j,n=k>>4,q=n):(o=fa+12|0,p=0|f[o>>2],q=p),Jn(ga,F,q),r=ka,s=0|f[r>>2],t=s>>>11,v=8&t,w=0!=(0|v),x=ka,y=x+12|0,w?B=y:(z=y+8|0,A=0|f[z>>2],B=A),ia=B,C=ia,D=ka,E=0|f[D>>2],G=E>>>11,H=8&G,I=0!=(0|H),J=ka,I?(K=0|f[J>>2],L=K>>>11,M=496&L,N=M>>4,S=N):(O=J+12|0,P=0|f[O>>2],S=P),R=C+S|0,ja=R;;){if(T=ia,U=ja,V=T>>>0<U>>>0,!V)break;W=g,Y=ia,Z=0|d[Y>>0],$=255&Z,Zg(h,$),f[ha>>2]=0|f[ga>>2],f[ha+4>>2]=0|f[ga+4>>2],f[e>>2]=0|f[h>>2],f[e+4>>2]=0|f[h+4>>2],$n(W,ha,e),_=ia,ba=_+1|0,ia=ba}f[a>>2]=0|f[ga>>2],f[a+4>>2]=0|f[ga+4>>2],l=ma}function Zh(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;t=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=0|f[c>>2],r=e,h=r,i=0|f[h>>2],j=i>>>11,k=4|j,n=0|f[h>>2],o=2097151&k,p=o<<11,q=2047&n,g=q|p,f[h>>2]=g,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=t}function $h(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,R=0;R=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=d,C=0|f[r>>2],P=C,N=4,H=c,I=P,J=I,K=(J>>>0)/4&-1,L=N,M=P,e=0|U(L,M),g=K+e|0,h=0|Jc(H,g),O=h,i=d,j=i+8|0,f[j>>2]=0,k=d,n=k+4|0,f[n>>2]=0,o=O,p=d,q=p+16|0,f[q>>2]=o,s=d,t=s+20|0,f[t>>2]=0,u=O,v=N,w=P,x=0|U(v,w),y=u+x|0,z=d,A=z+12|0,f[A>>2]=y,B=d,D=B+12|0,E=0|f[D>>2],F=P,G=(F>>>0)/4&-1,_h(E,-86,G),l=R}function _h(a,b,c){a|=0,b|=0,c|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;for(q=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,g=c;;){if(h=g,i=h+-1|0,g=i,j=h>>>0>0,!j)break;k=f,n=e,o=n+1|0,e=o,d[n>>0]=k}l=q}function ai(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0;return Q=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=c,C=0|Lc(r,1,24),O=C,I=d,J=I>>>0<8,J&&(d=8),K=d,L=K+-1|0,d=L,M=d,N=M>>>1,e=d,g=e|N,d=g,h=d,i=h>>>2,j=d,k=j|i,d=k,n=d,o=n>>>4,p=d,q=p|o,d=q,s=d,t=s>>>8,u=d,v=u|t,d=v,w=d,x=w>>>16,y=d,z=y|x,d=z,A=d,B=A+1|0,d=B,D=d,E=O,f[E>>2]=D,F=c,G=O,$h(F,G),H=O,l=Q,0|H}function bi(a){a|=0;var b=0,c=0,d=0,f=0;return f=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=0|ai(c,8),l=f,0|d}function ci(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=d,(g=0!=(0|e))?(h=c,i=d,j=i+16|0,k=0|f[j>>2],Dc(h,k),n=c,o=d,Dc(n,o),void(l=q)):void(l=q)}function di(a,b,c){a|=0,b|=0,c|=0;var e=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0;for(ob=l,l=l+32|0,(0|l)>=(0|m)&&X(),h=a,E=b,P=c,_=h,ka=P,va=0|ei(_,ka),Ga=E,Ra=0|f[Ga>>2],ab=Ra-1|0,i=va&ab,lb=i,mb=0;;){if(v=lb,w=(v>>>0)/4&-1,x=E,y=x+12|0,z=0|f[y>>2],A=z+w|0,B=0|d[A>>0],C=255&B,D=lb,F=(D>>>0)%4&-1,G=56149+F|0,H=0|d[G>>0],I=255&H,J=C&I,K=0!=(0|J),L=1^K,!L){nb=8;break}if(M=lb,N=(M>>>0)/4&-1,O=E,Q=O+12|0,R=0|f[Q>>2],S=R+N|0,T=0|d[S>>0],U=255&T,V=lb,W=(V>>>0)%4&-1,Y=56153+W|0,Z=0|d[Y>>0],$=255&Z,aa=U&$,ba=0!=(0|aa),!ba&&(ca=lb,da=E,ea=da+16|0,fa=0|f[ea>>2],ga=fa+(ca<<2)|0,ha=0|f[ga>>2],ia=h,ja=ia+560|0,la=0|f[ja>>2],ma=la+(6*ha|0)|0,na=g[ma>>0]|g[ma+1>>0]<<8,oa=(65535&na)>>>1,pa=65535&oa,qa=P,ra=h,sa=ra+560|0,ta=0|f[sa>>2],ua=ta+(6*qa|0)|0,wa=g[ua>>0]|g[ua+1>>0]<<8,xa=(65535&wa)>>>1,ya=65535&xa,za=(0|pa)==(0|ya),za&&(Aa=lb,Ba=E,Ca=Ba+16|0,Da=0|f[Ca>>2],Ea=Da+(Aa<<2)|0,Fa=0|f[Ea>>2],Ha=h,Ia=Ha+560|0,Ja=0|f[Ia>>2],Ka=Ja+(6*Fa|0)|0,La=Ka+2|0,Ma=g[La>>0]|g[La+1>>0]<<8|g[La+2>>0]<<16|g[La+3>>0]<<24,Na=P,Oa=h,Pa=Oa+560|0,Qa=0|f[Pa>>2],Sa=Qa+(6*Na|0)|0,Ta=Sa+2|0,Ua=g[Ta>>0]|g[Ta+1>>0]<<8|g[Ta+2>>0]<<16|g[Ta+3>>0]<<24,Va=lb,Wa=E,Xa=Wa+16|0,Ya=0|f[Xa>>2],Za=Ya+(Va<<2)|0,$a=0|f[Za>>2],_a=h,bb=_a+560|0,cb=0|f[bb>>2],db=cb+(6*$a|0)|0,eb=g[db>>0]|g[db+1>>0]<<8,fb=(65535&eb)>>>1,gb=65535&fb,hb=0|iv(Ma,Ua,gb),ib=0==(0|hb)))){nb=6;break}kb=lb,j=mb,k=j+1|0,mb=k,n=kb+k|0,o=E,p=0|f[o>>2],q=p-1|0,r=n&q,lb=r}return 6==(0|nb)?(jb=lb,e=jb,u=e,l=ob,0|u):8==(0|nb)?(s=E,t=0|f[s>>2],e=t,u=e,l=ob,0|u):0}function ei(a,b){a|=0,b|=0;var c=0,e=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,R=0;for(R=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,e=b,M=0,t=e,E=c,G=E+560|0,H=0|f[G>>2],I=H+(6*t|0)|0,J=g[I>>0]|g[I+1>>0]<<8,K=(65535&J)>>>1,L=65535&K,O=L,h=e,i=c,j=i+560|0,k=0|f[j>>2],n=k+(6*h|0)|0,o=n+2|0,p=g[o>>0]|g[o+1>>0]<<8|g[o+2>>0]<<16|g[o+3>>0]<<24,P=p,N=0;;){if(q=N,r=O,s=q>>>0<r>>>0,u=M,!s)break;v=u<<5,w=M,x=v-w|0,y=P,z=y+1|0,P=z,A=0|d[y>>0],B=A<<24>>24,C=x+B|0,M=C,D=N,F=D+1|0,N=F}return l=R,0|u}function fi(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Ga=0;for(Ga=l,l=l+64|0,(0|l)>=(0|m)&&X(),ya=Ga+24|0,g=a,h=b,u=c,F=u,Q=F>>>0<8,e=Q?8:c,u=e,aa=u,la=aa+-1|0,u=la,va=u,wa=va>>>1,xa=u,i=xa|wa,u=i,j=u,k=j>>>2,n=u,o=n|k,u=o,p=u,q=p>>>4,r=u,s=r|q,u=s,t=u,v=t>>>8,w=u,x=w|v,u=x,y=u,z=y>>>16,A=u,B=A|z,u=B,C=u,D=C+1|0,u=D,E=h,G=E+12|0,H=0|f[G>>2],Ba=H,I=h,J=I+16|0,K=0|f[J>>2],Ca=K,L=h,M=L+20|0,N=0|f[M>>2],Ea=N,O=h,P=0|f[O>>2],Da=P,R=u,f[ya>>2]=R,S=g,$h(S,ya),za=0;;){if(T=za,U=Da,V=T>>>0<U>>>0,!V)break;W=za,Y=(W>>>0)/4&-1,Z=Ba,$=Z+Y|0,_=0|d[$>>0],ba=255&_,ca=za,da=(ca>>>0)%4&-1,ea=56157+da|0,fa=0|d[ea>>0],ga=255&fa,ha=ba&ga,ia=0!=(0|ha),ia||(ja=g,ka=za,ma=Ca,na=ma+(ka<<2)|0,oa=0|f[na>>2],pa=0|gi(ja,ya,oa,0),Aa=pa),qa=za,ra=qa+1|0,za=ra}sa=h,f[sa>>2]=0|f[ya>>2],f[sa+4>>2]=0|f[ya+4>>2],f[sa+8>>2]=0|f[ya+8>>2],f[sa+12>>2]=0|f[ya+12>>2],f[sa+16>>2]=0|f[ya+16>>2],f[sa+20>>2]=0|f[ya+20>>2],ta=g,ua=Ca,Dc(ta,ua),l=Ga}function gi(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0;for(ad=l,l=l+32|0,(0|l)>=(0|m)&&X(),i=a,ob=b,Bb=c,Mb=e,$c=0,Xb=ob,gc=Xb+8|0,rc=0|f[gc>>2],Cc=ob,Nc=0|f[Cc>>2],j=Nc>>>2,w=ob,H=0|f[w>>2],S=H>>>1,ca=j|S,na=rc>>>0>=ca>>>0,na&&(ya=i,Ja=ob,Ua=ob,db=0|f[Ua>>2],pb=db<<1,fi(ya,Ja,pb)),sb=i,tb=Bb,ub=0|ei(sb,tb),vb=ob,wb=0|f[vb>>2],xb=wb-1|0,yb=ub&xb,Zc=yb,zb=ob,Ab=0|f[zb>>2],Yc=Ab;;){if(Cb=Zc,Db=(Cb>>>0)/4&-1,Eb=ob,Fb=Eb+12|0,Gb=0|f[Fb>>2],Hb=Gb+Db|0,Ib=0|d[Hb>>0],Jb=255&Ib,Kb=Zc,Lb=(Kb>>>0)%4&-1,Nb=56149+Lb|0,Ob=0|d[Nb>>0],Pb=255&Ob,Qb=Jb&Pb,Rb=0!=(0|Qb),Sb=1^Rb,!Sb)break;if(Tb=Zc,Ub=(Tb>>>0)/4&-1,Vb=ob,Wb=Vb+12|0,Yb=0|f[Wb>>2],Zb=Yb+Ub|0,$b=0|d[Zb>>0],_b=255&$b,ac=Zc,bc=(ac>>>0)%4&-1,cc=56153+bc|0,dc=0|d[cc>>0],ec=255&dc,fc=_b&ec,hc=0!=(0|fc))J=Yc,K=ob,L=0|f[K>>2],M=(0|J)==(0|L),M&&(N=Zc,Yc=N);else if(ic=Zc,jc=ob,kc=jc+16|0,lc=0|f[kc>>2],mc=lc+(ic<<2)|0,nc=0|f[mc>>2],oc=i,pc=oc+560|0,qc=0|f[pc>>2],sc=qc+(6*nc|0)|0,tc=g[sc>>0]|g[sc+1>>0]<<8,uc=(65535&tc)>>>1,vc=65535&uc,wc=Bb,xc=i,yc=xc+560|0,zc=0|f[yc>>2],Ac=zc+(6*wc|0)|0,Bc=g[Ac>>0]|g[Ac+1>>0]<<8,Dc=(65535&Bc)>>>1,Ec=65535&Dc,Fc=(0|vc)==(0|Ec),Fc&&(Gc=Zc,Hc=ob,Ic=Hc+16|0,Jc=0|f[Ic>>2],Kc=Jc+(Gc<<2)|0,Lc=0|f[Kc>>2],Mc=i,Oc=Mc+560|0,Pc=0|f[Oc>>2],Qc=Pc+(6*Lc|0)|0,Rc=Qc+2|0,Sc=g[Rc>>0]|g[Rc+1>>0]<<8|g[Rc+2>>0]<<16|g[Rc+3>>0]<<24,Tc=Bb,Uc=i,Vc=Uc+560|0,Wc=0|f[Vc>>2],Xc=Wc+(6*Tc|0)|0,k=Xc+2|0,n=g[k>>0]|g[k+1>>0]<<8|g[k+2>>0]<<16|g[k+3>>0]<<24,o=Zc,p=ob,q=p+16|0,r=0|f[q>>2],s=r+(o<<2)|0,t=0|f[s>>2],u=i,v=u+560|0,x=0|f[v>>2],y=x+(6*t|0)|0,z=g[y>>0]|g[y+1>>0]<<8,A=(65535&z)>>>1,B=65535&A,C=0|iv(Sc,n,B),D=0==(0|C))){_c=8;break}O=Zc,P=$c,Q=P+1|0,$c=Q,R=O+Q|0,T=ob,U=0|f[T>>2],V=U-1|0,W=R&V,Zc=W}return 8==(0|_c)?(E=Mb,F=0!=(0|E),F&&(G=Mb,f[G>>2]=0),I=Zc,h=I,rb=h,l=ad,0|rb):(Y=Yc,Z=ob,$=0|f[Z>>2],_=(0|Y)!=(0|$),aa=Bb,_?(ba=Yc,da=ob,ea=da+16|0,fa=0|f[ea>>2],ga=fa+(ba<<2)|0,f[ga>>2]=aa,ha=Yc,ia=(ha>>>0)%4&-1,ja=56153+ia|0,ka=0|d[ja>>0],la=255&ka,ma=la^-1,oa=Yc,pa=(oa>>>0)/4&-1,qa=ob,ra=qa+12|0,sa=0|f[ra>>2],ta=sa+pa|0,ua=0|d[ta>>0],va=255&ua,wa=va&ma,xa=255&wa,d[ta>>0]=xa,za=ob,Aa=za+4|0,Ba=0|f[Aa>>2],Ca=Ba+1|0,f[Aa>>2]=Ca,Da=Mb,Ea=0!=(0|Da),Ea&&(Fa=Mb,f[Fa>>2]=2),Ga=Yc,h=Ga,rb=h,l=ad,0|rb):(Ha=Zc,Ia=ob,Ka=Ia+16|0,La=0|f[Ka>>2],Ma=La+(Ha<<2)|0,f[Ma>>2]=aa,Na=Zc,Oa=(Na>>>0)%4&-1,Pa=56149+Oa|0,Qa=0|d[Pa>>0],Ra=255&Qa,Sa=Ra^-1,Ta=Zc,Va=(Ta>>>0)/4&-1,Wa=ob,Xa=Wa+12|0,Ya=0|f[Xa>>2],Za=Ya+Va|0,$a=0|d[Za>>0],_a=255&$a,ab=_a&Sa,bb=255&ab,d[Za>>0]=bb,cb=ob,eb=cb+4|0,fb=0|f[eb>>2],gb=fb+1|0,f[eb>>2]=gb,hb=ob,ib=hb+8|0,jb=0|f[ib>>2],kb=jb+1|0,f[ib>>2]=kb,lb=Mb,mb=0!=(0|lb),mb&&(nb=Mb,f[nb>>2]=1),qb=Zc,h=qb,rb=h,l=ad,0|rb))}function hi(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,n=0;return n=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=e,i=f,j=0|ii(g,h,i,0),l=n,0|j}function ii(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Fb=0;return Fb=l,l=l+48|0,(0|l)>=(0|m)&&X(),i=a,S=b,ca=c,na=e,ya=i,Ja=ya+556|0,Ua=0|f[Ja>>2],zb=Ua,db=i,ob=db+560|0,j=0|f[ob>>2],Cb=j,w=i,H=ca,ji(w,H),L=Cb,M=0!=(0|L),M&&(N=na,O=255&N,P=Cb,Q=g[P>>0]|g[P+1>>0]<<8,R=1&O,T=Q&-2,U=T|R,d[P>>0]=255&U,d[P+1>>0]=U>>8,V=ca,W=65535&V,Y=Cb,Z=g[Y>>0]|g[Y+1>>0]<<8,$=32767&W,_=$<<1&65535,aa=1&Z,ba=aa|_,d[Y>>0]=255&ba,d[Y+1>>0]=ba>>8,da=S,ea=Cb,fa=ea+2|0,d[fa>>0]=255&da,d[fa+1>>0]=da>>8&255,d[fa+2>>0]=da>>16&255,d[fa+3>>0]=da>>24,ga=i,ha=zb,ia=0|di(ga,ha,0),Ab=ia,ja=Ab,ka=zb,la=0|f[ka>>2],ma=(0|ja)!=(0|la))?(oa=Ab,pa=zb,qa=pa+16|0,ra=0|f[qa>>2],sa=ra+(oa<<2)|0,ta=0|f[sa>>2],h=ta,K=h,l=Fb,0|K):(ua=i,va=ua+552|0,wa=0|f[va>>2],xa=wa+1|0,f[va>>2]=xa,Db=xa,za=i,Aa=za+564|0,Ba=0|f[Aa>>2],Ca=Db,Da=Ba>>>0<Ca>>>0,Da&&(Ea=i,Fa=Ea+564|0,Ga=0|f[Fa>>2],Ha=0==(0|Ga),Ia=i,Ka=Ia+564|0,Ha?f[Ka>>2]=100:(La=0|f[Ka>>2],Ma=+(La>>>0),Na=1.2*Ma,Oa=~~Na>>>0,Pa=i,Qa=Pa+564|0,f[Qa>>2]=Oa),Ra=i,Sa=i,Ta=Sa+560|0,Va=0|f[Ta>>2],Wa=i,Xa=Wa+564|0,Ya=0|f[Xa>>2],Za=Ya+1|0,$a=6*Za|0,_a=0|Hc(Ra,Va,$a),ab=i,bb=ab+560|0,f[bb>>2]=_a),cb=Db,eb=i,fb=eb+560|0,gb=0|f[fb>>2],hb=gb+(6*cb|0)|0,Cb=hb,ib=ca,jb=65535&ib,kb=Cb,lb=g[kb>>0]|g[kb+1>>0]<<8,mb=32767&jb,nb=mb<<1&65535,pb=1&lb,qb=pb|nb,d[kb>>0]=255&qb,d[kb+1>>0]=qb>>8,rb=na,sb=255&rb,tb=0!=(0|sb),tb?(ub=S,vb=Cb,wb=vb+2|0,d[wb>>0]=255&ub,d[wb+1>>0]=ub>>8&255,d[wb+2>>0]=ub>>16&255,d[wb+3>>0]=ub>>24,xb=Cb,yb=g[xb>>0]|g[xb+1>>0]<<8,k=yb&-2,n=1|k,d[xb>>0]=255&n,d[xb+1>>0]=n>>8):(o=i,p=ca,q=p+1|0,r=0|Jc(o,q),Bb=r,s=Bb,t=S,u=ca,0|sw(0|s,0|t,0|u),v=ca,x=Bb,y=x+v|0,d[y>>0]=0,z=Bb,A=Cb,B=A+2|0,d[B>>0]=255&z,d[B+1>>0]=z>>8&255,d[B+2>>0]=z>>16&255,d[B+3>>0]=z>>24,C=Cb,D=g[C>>0]|g[C+1>>0]<<8,E=D&-2,d[C>>0]=255&E,d[C+1>>0]=E>>8),F=i,G=zb,I=Db,0|gi(F,G,I,0),J=Db,h=J,K=h,l=Fb,0|K)}function ji(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0;return k=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=d,(f=e>>>0>=65535)?(g=c,h=c,i=0|tp(h,68855),Br(g,i,56161),void 0):void(l=k)}function ki(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,n=0;return n=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=e,i=f,j=0|ii(g,h,i,1),l=n,0|j}function li(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0;return k=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=d,h=0|Jv(g),i=0|hi(e,f,h),l=k,0|i}function mi(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0;return G=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=c,r=0|f[b>>2],y=0|f[r>>2],z=y>>>11,A=8&z,B=0!=(0|A),C=0|f[b>>2],D=C+12|0,B?v=D:(E=D+8|0,e=0|f[E>>2],v=e),g=0|f[b>>2],h=0|f[g>>2],i=h>>>11,j=8&i,k=0!=(0|j),n=0|f[b>>2],k?(o=0|f[n>>2],p=o>>>11,q=496&p,s=q>>4,w=s,x=0|hi(d,v,w),l=G,0|x):(t=n+12|0,u=0|f[t>>2],w=u,x=0|hi(d,v,w),l=G,0|x)}function ni(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,W=0;return W=l,l=l+32|0,(0|l)>=(0|m)&&X(),h=b,i=c,v=e,G=h,M=G+556|0,N=0|f[M>>2],S=N,O=h,P=O+560|0,Q=0|f[P>>2],U=Q,R=h,j=v,ji(R,j),k=v,n=65535&k,o=U,p=g[o>>0]|g[o+1>>0]<<8,q=32767&n,r=q<<1&65535,s=1&p,t=s|r,d[o>>0]=255&t,d[o+1>>0]=t>>8,u=i,w=U,x=w+2|0,d[x>>0]=255&u,d[x+1>>0]=u>>8&255,d[x+2>>0]=u>>16&255,d[x+3>>0]=u>>24,y=h,z=S,A=0|di(y,z,0),T=A,B=T,C=S,D=0|f[C>>2],E=(0|B)!=(0|D),E?(F=T,H=S,I=H+16|0,J=0|f[I>>2],K=J+(F<<2)|0,L=0|f[K>>2],oi(a,L),void(l=W)):(pi(a),void(l=W))}function oi(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=4,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function pi(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function qi(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,k=0;k=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=c,f=d,g=e,h=e,i=0|Jv(h),ni(a,f,g,i),l=k}function ri(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0;return G=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=d,s=0|f[c>>2],y=0|f[s>>2],z=y>>>11,A=8&z,B=0!=(0|A),C=0|f[c>>2],D=C+12|0,B?w=D:(E=D+8|0,g=0|f[E>>2],w=g),h=0|f[c>>2],i=0|f[h>>2],j=i>>>11,k=8&j,n=0!=(0|k),o=0|f[c>>2],n?(p=0|f[o>>2],q=p>>>11,r=496&q,t=r>>4,x=t,ni(a,e,w,x),void(l=G)):(u=o+12|0,v=0|f[u>>2],x=v,ni(a,e,w,x),void(l=G))}function si(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0;return P=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,t=b,E=c,I=t,J=0==(0|I),J||(K=e,L=K+552|0,M=0|f[L>>2],N=t,h=M>>>0<N>>>0)?(i=E,j=0!=(0|i),j&&(k=E,f[k>>2]=0),d=0,H=d,l=P,0|H):(n=E,o=0!=(0|n),o&&(p=t,q=e,r=q+560|0,s=0|f[r>>2],u=s+(6*p|0)|0,v=g[u>>0]|g[u+1>>0]<<8,w=(65535&v)>>>1,x=65535&w,y=E,f[y>>2]=x),z=t,A=e,B=A+560|0,C=0|f[B>>2],D=C+(6*z|0)|0,F=D+2|0,G=g[F>>0]|g[F+1>>0]<<8|g[F+2>>0]<<16|g[F+3>>0]<<24,d=G,H=d,l=P,0|H)}function ti(a){a|=0;var b=0,c=0,d=0,e=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0;for(Q=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,N=1,c=b,r=c+552|0,C=0|f[r>>2],H=C+1|0,O=H;;){if(I=N,J=O,K=I>>>0<J>>>0,!K)break;L=N,M=b,d=M+560|0,e=0|f[d>>2],h=e+(6*L|0)|0,i=g[h>>0]|g[h+1>>0]<<8,j=1&i,k=j<<16>>16!=0,k||(n=b,o=N,p=b,q=p+560|0,s=0|f[q>>2],t=s+(6*o|0)|0,u=t+2|0,v=g[u>>0]|g[u+1>>0]<<8|g[u+2>>0]<<16|g[u+3>>0]<<24,Dc(n,v)),w=N,x=w+1|0,N=x}y=b,z=b,A=z+560|0,B=0|f[A>>2],Dc(y,B),D=b,E=b,F=E+556|0,G=0|f[F>>2],ci(D,G),l=Q}function ui(a){a|=0;var b=0,c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=0|bi(c),e=b,g=e+556|0,f[g>>2]=d,l=i}function vi(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;return t=l,l=l+16|0,(0|l)>=(0|m)&&X(),q=t+4|0,d=b,e=c,g=d,h=e,i=0|si(g,h,q),r=i,j=r,k=0!=(0|j),k?(n=d,o=r,p=0|f[q>>2],rg(a,n,o,p),void(l=t)):(wi(a),void(l=t))}function wi(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=5,f[c>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function xi(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,R=0;return R=l,l=l+48|0,(0|l)>=(0|m)&&X(),c=R+40|0,N=R+20|0,P=R+8|0,D=R,e=a,s=b,H=e,I=s,J=0|si(H,I,N),O=J,K=O,(L=0!=(0|K))?(M=O,g=0|yi(M),h=255&g,i=0!=(0|h),i&&(j=O,k=0|Jv(j),n=0|f[N>>2],o=(0|k)==(0|n))?(p=O,d=p,G=d,l=R,0|G):(q=e,r=e,t=O,u=0|f[N>>2],rg(D,r,t,u),f[c>>2]=0|f[D>>2],f[c+4>>2]=0|f[D+4>>2],ch(P,q,c),v=0|f[P>>2],w=0|f[v>>2],x=w>>>11,y=8&x,z=0!=(0|y),A=0|f[P>>2],B=A+12|0,z?F=B:(C=B+8|0,E=0|f[C>>2],F=E),d=F,G=d,l=R,0|G)):(d=0,G=d,l=R,0|G)}function yi(a){a|=0;var b=0,c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0;if(bc=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,ra=e,$b=ra,Zb=0,Ca=$b,Na=0!=(0|Ca),!Na)return c=0,ma=c,l=bc,0|ma;Ya=$b,hb=0|d[Ya>>0],sb=hb<<24>>24;a:do switch(0|sb){case 0:return c=0,ma=c,l=bc,0|ma;case 36:if(Db=$b,Ob=Db+1|0,$b=Ob,f=0|zi(Ob),s=f<<24>>24!=0)return c=1,ma=c,l=bc,0|ma;ac=36;break;case 64:D=$b,O=D+1|0,$b=O,$=0|d[O>>0],ja=$<<24>>24,na=64==(0|ja),na?(oa=$b,pa=oa+1|0,$b=pa,ac=36):ac=36;break;case 60:switch(qa=$b,sa=qa+1|0,$b=sa,ta=0|d[sa>>0],ua=ta<<24>>24,0|ua){case 60:va=$b,wa=va+1|0,$b=wa;break a;case 61:break;default:break a}xa=$b,ya=xa+1|0,$b=ya,za=0|d[ya>>0],Aa=za<<24>>24,Ba=62==(0|Aa),Ba&&(Da=$b,Ea=Da+1|0,$b=Ea);break;case 62:Fa=$b,Ga=Fa+1|0,$b=Ga,Ha=0|d[Ga>>0],Ia=Ha<<24>>24,b=Ia+-61|0,_b=b>>>0<2,_b&&(Ja=$b,Ka=Ja+1|0,$b=Ka);break;case 61:switch(La=$b,Ma=La+1|0,$b=Ma,Oa=0|d[Ma>>0],Pa=Oa<<24>>24,0|Pa){case 126:Qa=$b,Ra=Qa+1|0,$b=Ra;break a;case 61:if(Sa=$b,Ta=Sa+1|0,$b=Ta,Ua=0|d[Ta>>0],Va=Ua<<24>>24,Wa=61==(0|Va),!Wa)break a;Xa=$b,Za=Xa+1|0,$b=Za;break a;default:return c=0,ma=c,l=bc,0|ma}break;case 42:$a=$b,_a=$a+1|0,$b=_a,ab=0|d[_a>>0],bb=ab<<24>>24,cb=42==(0|bb),cb&&(db=$b,eb=db+1|0,$b=eb);break;case 33:fb=$b,gb=fb+1|0,$b=gb,ib=0|d[gb>>0],jb=ib<<24>>24,kb=61==(0|jb),kb&&(lb=$b,mb=lb+1|0,$b=mb);break;case 45:case 43:nb=$b,ob=nb+1|0,$b=ob,pb=0|d[ob>>0],qb=pb<<24>>24,rb=64==(0|qb),rb&&(tb=$b,ub=tb+1|0,$b=ub);break;case 124:vb=$b,wb=vb+1|0,$b=wb,xb=0|d[wb>>0],yb=xb<<24>>24,zb=124==(0|yb),zb&&(Ab=$b,Bb=Ab+1|0,$b=Bb);break;case 38:Cb=$b,Eb=Cb+1|0,$b=Eb,Fb=0|d[Eb>>0],Gb=Fb<<24>>24,Hb=38==(0|Gb),Hb&&(Ib=$b,Jb=Ib+1|0,$b=Jb);break;case 96:case 126:case 37:case 47:case 94:Kb=$b,Lb=Kb+1|0,$b=Lb;break;case 91:if(Mb=$b,Nb=Mb+1|0,$b=Nb,Pb=0|d[Nb>>0],Qb=Pb<<24>>24,Rb=93!=(0|Qb))return c=0,ma=c,l=bc,0|ma;if(Sb=$b,Tb=Sb+1|0,$b=Tb,Ub=0|d[Tb>>0],Vb=Ub<<24>>24,Wb=61==(0|Vb),!Wb)break a;Xb=$b,Yb=Xb+1|0,$b=Yb;break a;default:g=$b,h=0|d[g>>0],i=h<<24>>24,j=i-65|0,k=j>>>0<26,n=1^k,o=1&n,p=255&o,Zb=p,ac=36}while(0);a:do if(36==(0|ac)){if(q=$b,r=0|d[q>>0],t=r<<24>>24,u=95!=(0|t),u&&(v=$b,w=0|d[v>>0],x=w<<24>>24,y=32|x,z=y-97|0,A=z>>>0<26,!A))return c=0,ma=c,l=bc,0|ma;for(;;){if(B=$b,C=0|d[B>>0],E=C<<24>>24,F=(0|E)!=-1,!F)break;if(G=$b,H=0|d[G>>0],I=H<<24>>24,J=32|I,K=J-97|0,L=K>>>0<26,!L&&(M=$b,N=0|d[M>>0],P=N<<24>>24,Q=P-48|0,R=Q>>>0<10,!R&&(S=$b,T=0|d[S>>0],U=T<<24>>24,V=95==(0|U),!V)))break;W=$b,Y=W+1|0,$b=Y}if(Z=Zb,_=Z<<24>>24!=0){switch(aa=$b,ba=0|d[aa>>0],ca=ba<<24>>24,0|ca){case 61:case 63:case 33:break;default:break a}da=$b,ea=da+1|0,$b=ea}}while(0);return fa=$b,ga=0|d[fa>>0],ha=ga<<24>>24,ia=0!=(0|ha),ka=ia?0:1,la=255&ka,c=la,ma=c,l=bc,0|ma}function zi(a){a|=0;var b=0,c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,ba=0;ba=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,q=c,B=0|d[q>>0],M=B<<24>>24;a:do switch(0|M){case 48:case 43:case 39:case 96:case 38:case 34:case 62:case 60:case 58:case 61:case 46:case 44:case 59:case 92:case 47:case 64:case 33:case 63:case 36:case 42:case 126:W=c,Y=W+1|0,c=Y;break;case 45:if(Z=c,$=Z+1|0,c=$,_=c,e=0|d[_>>0],f=e<<24>>24,g=(0|f)!=-1){if(h=c,i=0|d[h>>0],j=i<<24>>24,k=32|j,n=k-97|0,o=n>>>0<26,!o&&(p=c,r=0|d[p>>0],s=r<<24>>24,t=s-48|0,u=t>>>0<10,!u&&(v=c,w=0|d[v>>0],x=w<<24>>24,y=95==(0|x),!y)))break a;z=c,A=z+1|0,c=A}break;default:if(C=c,D=0|d[C>>0],E=D<<24>>24,F=E-48|0,G=F>>>0<10)for(;;)if(H=c,I=H+1|0,c=I,J=c,K=0|d[J>>0],L=K<<24>>24,N=L-48|0,O=N>>>0<10,!O)break a;return b=0,V=b,l=ba,0|V}while(0);return P=c,Q=0|d[P>>0],R=Q<<24>>24!=0,S=1^R,T=1&S,U=255&T,b=U,V=b,l=ba,0|V}function Ai(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0;A=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,q=b,r=q+32|0,s=0|f[r>>2],t=0|Dp(c,56184,s),y=t,u=b,v=u+80|0,f[v>>2]=t,w=b,x=y,Jp(w,x,69450,119,262144),d=b,e=y,Jp(d,e,56191,120,0),g=b,h=y,Jp(g,h,68977,120,0),i=b,j=y,Jp(i,j,56199,121,0),k=b,n=y,Jp(k,n,68986,122,0),o=b,p=y,Jp(o,p,68851,123,262144),l=A}function Bi(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+48|0,(0|l)>=(0|m)&&X(),k=p+32|0,i=p+24|0,n=p,j=p+8|0,d=b,e=d,f[n>>2]=j,0|Lp(e,68900,n),g=d,f[i>>2]=0|f[c>>2],f[i+4>>2]=0|f[c+4>>2],f[k>>2]=0|f[j>>2],f[k+4>>2]=0|f[j+4>>2],h=0|kf(g,i,k),Ci(a,h),l=p}function Ci(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=255&d,g=0!=(0|e),h=g?2:0,i=j+4|0,f[i>>2]=h,f[j>>2]=1,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function Di(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;s=l,l=l+16|0,(0|l)>=(0|m)&&X(),p=s,d=b,e=0|f[c>>2],o=e,g=d,h=o,i=0|si(g,h,p),q=i,j=d,k=q,n=0|f[p>>2],rg(a,j,k,n),l=s}function Ei(a,b,c){a|=0,b|=0,c|=0;var d=0,g=0;g=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=g}function Fi(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,qa=0;return qa=l,l=l+64|0,(0|l)>=(0|m)&&X(),oa=qa+48|0,na=qa+32|0,ka=qa+24|0,g=qa+8|0,t=qa,e=b,E=0|f[c>>2],ja=E,P=e,_=ja,fa=0|si(P,_,ka),
+la=fa,ga=e,ha=0|f[ka>>2],ia=ha+1|0,ng(g,ga,0,ia),f[na>>2]=0|f[g>>2],f[na+4>>2]=0|f[g+4>>2],h=0|f[na>>2],i=0|f[h>>2],j=i>>>11,k=8&j,n=0!=(0|k),o=0|f[na>>2],p=o+12|0,n?s=p:(q=p+8|0,r=0|f[q>>2],s=r),ma=s,u=0|f[na>>2],v=0|f[u>>2],w=v>>>11,x=8&w,y=0!=(0|x),z=0|f[na>>2],A=z+12|0,y?D=A:(B=A+8|0,C=0|f[B>>2],D=C),d[D>>0]=58,F=ma,G=F+1|0,H=la,I=0|f[ka>>2],0|sw(0|G,0|H,0|I),J=la,K=0|yi(J),L=K<<24>>24!=0,L&&(M=la,N=0|Jv(M),O=0|f[ka>>2],Q=(0|N)!=(0|O),!Q)?(f[a>>2]=0|f[na>>2],f[a+4>>2]=0|f[na+4>>2],void(l=qa)):(R=e,f[oa>>2]=0|f[na>>2],f[oa+4>>2]=0|f[na+4>>2],ch(t,R,oa),f[na>>2]=0|f[t>>2],f[na+4>>2]=0|f[t+4>>2],S=0|f[na>>2],T=0|f[S>>2],U=T>>>11,V=8&U,W=0!=(0|V),Y=0|f[na>>2],Z=Y+12|0,W?ba=Z:($=Z+8|0,aa=0|f[$>>2],ba=aa),ma=ba,ca=ma,d[ca>>0]=58,da=ma,ea=da+1|0,d[ea>>0]=34,f[a>>2]=0|f[na>>2],f[a+4>>2]=0|f[na+4>>2],void(l=qa))}function Gi(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,aa=0;return aa=l,l=l+64|0,(0|l)>=(0|m)&&X(),$=aa,W=aa+40|0,R=aa+8|0,S=aa+4|0,d=b,e=d,f[$>>2]=W,0|Lp(e,68900,$),s=W+4|0,D=0|f[s>>2],(K=4!=(0|D))?(pi(a),void(l=aa)):(L=0|f[c>>2],Y=L,M=0|f[W>>2],Z=M,N=Y,O=Z,(P=(0|N)==(0|O))?(Hi(a,0),void(l=aa)):(g=d,h=Y,i=0|si(g,h,R),T=i,j=d,k=Z,n=0|si(j,k,S),U=n,o=0|f[R>>2],p=0|f[S>>2],q=(0|o)>(0|p),r=0|f[S>>2],t=0|f[R>>2],u=q?r:t,Q=u,v=T,w=U,x=Q,y=0|iv(v,w,x),V=y,z=V,(A=0==(0|z))?(B=0|f[R>>2],C=0|f[S>>2],(E=(0|B)==(0|C))?(Hi(a,0),void(l=aa)):(F=0|f[R>>2],G=0|f[S>>2],H=(0|F)>(0|G),H?(Hi(a,1),void(l=aa)):(Hi(a,-1),void(l=aa)))):(I=V,J=(0|I)>0,J?(Hi(a,1),void(l=aa)):(Hi(a,-1),void(l=aa)))))}function Hi(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=3,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function Ii(a){a|=0;var b=0,c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=b,e=d+24|0,g=0|f[e>>2],Ji(c,g),l=i}function Ji(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;return j=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=d,(f=0!=(0|e))?(g=c,h=d,0|Li(g,h,124,0),void(l=j)):void(l=j)}function Ki(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,g=b,h=d,i=c+4|0,j=0|f[i>>2],(k=j>>>0<8)?(l=q,0):(n=e,o=0|f[c>>2],qc(n,o),l=q,0)}function Li(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0;ma=l,l=l+48|0,(0|l)>=(0|m)&&X(),e=ma+32|0,h=a,u=b,F=c,Q=d,aa=u,da=0|f[aa>>2],ka=da;a:for(;;){if(ea=ka,fa=0!=(0|ea),!fa){la=15;break}for(ha=0;;){if(ga=ha,i=ga>>>0<4,!i)break;if(j=ha,k=ka,n=k+(j<<2)|0,o=0|f[n>>2],ia=o,p=ka,q=p+48|0,r=0|f[q>>2],s=0!=(0|r),!s&&(t=ha,v=u,w=v+8|0,x=0|f[w>>2],y=t>>>0>=x>>>0)){la=7;break a}if(z=ia,A=0!=(0|z)){if(B=F,C=h,D=ia,E=ha,G=ka,H=G+16|0,I=H+(E<<3)|0,J=Q,f[e>>2]=0|f[I>>2],f[e+4>>2]=0|f[I+4>>2],K=0|dx[255&B](C,D,e,J),ja=K,L=ja,M=(0|L)>0){la=10;break a}N=ja,O=(0|N)<0,O&&(P=u,R=P+4|0,S=0|f[R>>2],T=S+-1|0,f[R>>2]=T,U=ha,V=ka,W=V+(U<<2)|0,f[W>>2]=0)}Y=ha,Z=Y+1|0,ha=Z}$=ka,_=$+48|0,ba=0|f[_>>2],ka=ba}return 7==(0|la)?(g=0,ca=g,l=ma,0|ca):10==(0|la)?(g=0,ca=g,l=ma,0|ca):15==(0|la)?(g=1,ca=g,l=ma,0|ca):0}function Mi(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;return o=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=c+24|0,e=0|f[d>>2],(g=0!=(0|e))?(h=b,i=b,j=i+24|0,k=0|f[j>>2],Ni(h,k),void(l=o)):void(l=o)}function Ni(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;for(w=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,j=d,k=0|f[j>>2],u=k;;){if(n=u,o=0!=(0|n),!o)break;p=u,t=p,q=u,r=q+48|0,s=0|f[r>>2],u=s,e=c,g=t,Dc(e,g)}h=c,i=d,Dc(h,i),l=w}function Oi(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,k=0;k=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,g=d,h=g+12|0,i=0|f[h>>2],Ji(e,i),l=k}function Pi(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;return n=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,g=d,h=g+12|0,i=0|f[h>>2],j=0|Qi(e,i),l=n,0|j}function Qi(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;if(N=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,r=b,L=0,C=r,E=0!=(0|C),!E)return c=0,D=c,l=N,0|D;if(F=r,G=F+4|0,H=0|f[G>>2],I=H>>>0>0,J=r,I)return e=J+4|0,g=0|f[e>>2],c=g,D=c,l=N,0|D;for(h=0|f[J>>2],K=h;;){if(i=K,j=0!=(0|i),!j){M=10;break}if(k=K,n=k+48|0,o=0|f[n>>2],p=0==(0|o)){M=8;break}x=K,y=x+48|0,z=0|f[y>>2],K=z,A=L,B=A+4|0,L=B}return 8==(0|M)?(q=r,s=q+8|0,t=0|f[s>>2],u=L,v=u+t|0,L=v,w=L,c=w,D=c,l=N,0|D):10==(0|M)?(c=0,D=c,l=N,0|D):0}function Ri(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=d,g=e+12|0,h=0|f[g>>2],(i=0!=(0|h))?(j=c,k=d,n=k+12|0,o=0|f[n>>2],Ni(j,o),void(l=q)):void(l=q)}function Si(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0;g=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=c,Ti(a,0),l=g}function Ti(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=3,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function Ui(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0;g=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,l=g}function Vi(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0;return y=l,l=l+32|0,(0|l)>=(0|m)&&X(),w=y,e=b,g=c,o=d,p=g,q=p+12|0,r=0|f[q>>2],s=0!=(0|r),s&&(t=e,u=g,v=u+12|0,h=0|f[v>>2],i=o,j=0|Wi(t,h,i,w),k=255&j,n=0!=(0|k))?(f[a>>2]=0|f[w>>2],f[a+4>>2]=0|f[w+4>>2],void(l=y)):(Xi(a),void(l=y))}function Wi(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0;$=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=a,t=b,E=c,P=d,Q=t,R=0|f[Q>>2],Y=R;a:for(;;){if(S=Y,T=0!=(0|S),!T){Z=14;break}for(V=0;;){if(U=V,h=U>>>0<4,!h)break;if(i=V,j=Y,k=j+(i<<2)|0,n=0|f[k>>2],W=n,o=Y,p=o+48|0,q=0|f[p>>2],r=0!=(0|q),!r&&(s=V,u=t,v=u+8|0,w=0|f[v>>2],x=s>>>0>=w>>>0)){Z=7;break a}if(y=W,z=E,A=(0|y)==(0|z)){Z=9;break a}J=V,K=J+1|0,V=K}L=Y,M=L+48|0,N=0|f[M>>2],Y=N}return 7==(0|Z)?(e=0,O=e,l=$,0|O):9==(0|Z)?(B=P,C=0!=(0|B),C&&(D=P,F=V,G=Y,H=G+16|0,I=H+(F<<3)|0,f[D>>2]=0|f[I>>2],f[D+4>>2]=0|f[I+4>>2]),e=1,O=e,l=$,0|O):14==(0|Z)?(e=0,O=e,l=$,0|O):0}function Xi(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Yi(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),o=q+8|0,e=b,g=d,f[o>>2]=0|f[c>>2],f[o+4>>2]=0|f[c+4>>2],h=0|Zi(o),i=h<<24>>24!=0,i?(j=e,k=0|f[c>>2],n=g,Vi(a,j,k,n),void(l=q)):(Xi(a),void(l=q))}function Zi(a){a|=0;var b=0,c=0,d=0,e=0,h=0;switch(h=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a+4|0,d=0|f[c>>2],0|d){case 18:case 21:case 15:case 12:case 10:case 9:case 8:b=1;break;default:b=0}return e=b,l=h,0|e}function $i(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;B=l,l=l+32|0,(0|l)>=(0|m)&&X(),z=B+16|0,e=a,g=b,q=c,r=g,s=r+12|0,t=0|f[s>>2],y=t,u=y,v=0!=(0|u),v||(w=e,x=0|_i(w),h=g,i=h+12|0,f[i>>2]=x,y=x),j=e,k=g,Zc(j,k),n=e,o=y,p=q,f[z>>2]=0|f[d>>2],f[z+4>>2]=0|f[d+4>>2],aj(n,o,p,z),l=B}function _i(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=0|Jc(c,12),n=d,e=n,g=e+4|0,f[g>>2]=0,h=n,f[h>>2]=0,i=n,j=i+8|0,f[j>>2]=0,k=n,l=p,0|k}function aj(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0;Za=l,l=l+48|0,(0|l)>=(0|m)&&X(),e=a,g=b,t=c,E=g,P=0|f[E>>2],Xa=P,Wa=0,Ua=0,Ta=0;a:for(;;){if(_=Xa,ka=0!=(0|_),!ka){Ya=14;break}for(Ra=0;;){if(va=Ra,Ga=va>>>0<4,!Ga)break;if(Qa=Ra,h=Xa,i=h+(Qa<<2)|0,j=0|f[i>>2],Sa=j,k=Xa,n=k+48|0,o=0|f[n>>2],p=0!=(0|o),!p&&(q=Ra,r=g,s=r+8|0,u=0|f[s>>2],v=q>>>0>=u>>>0)){Ya=7;break a}if(N=Ua,O=0==(0|N),Q=Sa,R=0==(0|Q),Va=O&R)S=Xa,Ua=S,T=Ra,Ta=T;else if(U=Sa,V=t,W=(0|U)==(0|V)){Ya=11;break a}ba=Ra,ca=ba+1|0,Ra=ca}da=Xa,Wa=da,ea=Xa,fa=ea+48|0,ga=0|f[fa>>2],Xa=ga}return 7==(0|Ya)?(w=t,x=Ra,y=Xa,z=y+(x<<2)|0,f[z>>2]=w,A=Ra,B=Xa,C=B+16|0,D=C+(A<<3)|0,f[D>>2]=0|f[d>>2],f[D+4>>2]=0|f[d+4>>2],F=Ra,G=F+1|0,H=g,I=H+8|0,f[I>>2]=G,J=g,K=J+4|0,L=0|f[K>>2],M=L+1|0,f[K>>2]=M,void(l=Za)):11==(0|Ya)?(Y=Ra,Z=Xa,$=Z+16|0,aa=$+(Y<<3)|0,f[aa>>2]=0|f[d>>2],f[aa+4>>2]=0|f[d+4>>2],void(l=Za)):14==(0|Ya)?(ha=g,ia=ha+4|0,ja=0|f[ia>>2],la=ja+1|0,f[ia>>2]=la,ma=Ua,(na=0!=(0|ma))?(oa=t,pa=Ta,qa=Ua,ra=qa+(pa<<2)|0,f[ra>>2]=oa,sa=Ta,ta=Ua,ua=ta+16|0,wa=ua+(sa<<3)|0,f[wa>>2]=0|f[d>>2],f[wa+4>>2]=0|f[d+4>>2],void(l=Za)):(xa=e,ya=0|Jc(xa,52),Xa=ya,za=Xa,(Aa=0!=(0|za))?(Ba=Xa,Ca=Ba+48|0,f[Ca>>2]=0,Da=t,Ea=Xa,f[Ea>>2]=Da,Fa=Xa,Ha=Fa+16|0,f[Ha>>2]=0|f[d>>2],f[Ha+4>>2]=0|f[d+4>>2],Ia=g,Ja=Ia+8|0,f[Ja>>2]=1,Ka=Wa,La=0!=(0|Ka),Ma=Xa,La?(Na=Wa,Oa=Na+48|0,f[Oa>>2]=Ma,void(l=Za)):(Pa=g,f[Pa>>2]=Ma,void(l=Za))):void(l=Za))):void 0}function bj(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,F=0;if(F=l,l=l+32|0,(0|l)>=(0|m)&&X(),D=F+16|0,e=a,g=b,t=c,v=g,w=v+12|0,x=0|f[w>>2],C=x,y=C,z=0!=(0|y),A=e,z){if(j=C,k=t,n=0|Wi(A,j,k,d),o=n<<24>>24!=0)return void(l=F)}else B=0|_i(A),h=g,i=h+12|0,f[i>>2]=B,C=B;p=e,q=g,Zc(p,q),r=e,s=C,u=t,f[D>>2]=0|f[d>>2],f[D+4>>2]=0|f[d+4>>2],aj(r,s,u,D),l=F}function cj(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;return t=l,l=l+32|0,(0|l)>=(0|m)&&X(),r=t+16|0,q=t+8|0,e=a,g=c,f[q>>2]=0|f[b>>2],f[q+4>>2]=0|f[b+4>>2],h=0|Zi(q),i=h<<24>>24!=0,j=e,i?(k=0|f[b>>2],n=g,f[r>>2]=0|f[d>>2],f[r+4>>2]=0|f[d+4>>2],$i(j,k,n,r),void(l=t)):(o=e,p=0|tp(o,68855),Br(j,p,56206),void 0)}function dj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;return w=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,k=b,n=c,o=k,p=o+12|0,q=0|f[p>>2],u=q,r=u,s=0!=(0|r),s?(t=e,g=u,h=n,i=0|Wi(t,g,h,0),d=i,j=d,l=w,0|j):(d=0,j=d,l=w,0|j)}function ej(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;return s=l,l=l+32|0,(0|l)>=(0|m)&&X(),q=s+8|0,e=a,g=c,f[q>>2]=0|f[b>>2],f[q+4>>2]=0|f[b+4>>2],h=0|Zi(q),i=h<<24>>24!=0,i?(j=e,k=0|f[b>>2],n=g,o=0|dj(j,k,n),d=o,p=d,l=s,0|p):(d=0,p=d,l=s,0|p)}function fj(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0;if(ha=l,l=l+32|0,(0|l)>=(0|m)&&X(),ea=ha,e=a,s=b,D=e,O=s,$=0|si(D,O,ea),fa=$,_=0|f[ea>>2],aa=(0|_)<2)return c=0,Z=c,l=ha,0|Z;if(ba=fa,ca=0|d[ba>>0],g=ca<<24>>24,h=64!=(0|g))return c=0,Z=c,l=ha,0|Z;if(i=fa,j=i+1|0,k=0|d[j>>0],n=k<<24>>24,o=64==(0|n))return c=0,Z=c,l=ha,0|Z;for(da=1;;){if(p=da,q=0|f[ea>>2],r=(0|p)<(0|q),!r){ga=15;break}if(t=da,u=fa,v=u+t|0,w=0|d[v>>0],x=w<<24>>24,y=32|x,z=y-97|0,A=z>>>0<26,!A&&(B=da,C=fa,E=C+B|0,F=0|d[E>>0],G=F<<24>>24,H=G-48|0,I=H>>>0<10,!I&&(J=da,K=fa,L=K+J|0,M=0|d[L>>0],N=M<<24>>24,P=95==(0|N),!P&&(Q=da,R=fa,S=R+Q|0,T=0|d[S>>0],U=T<<24>>24,V=U>>>0<=127)))){ga=13;break}W=da,Y=W+1|0,da=Y}return 13==(0|ga)?(c=0,Z=c,l=ha,0|Z):15==(0|ga)?(c=1,Z=c,l=ha,0|Z):0}function gj(a,b){a|=0,b|=0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;return s=l,l=l+32|0,(0|l)>=(0|m)&&X(),q=s,g=s+8|0,c=a,e=b,h=c,i=e,j=0|fj(h,i),(k=j<<24>>24!=0)?void(l=s):(n=c,o=e,p=c,f=e,vi(g,p,f),d[q>>0]=0|d[g>>0],d[q+1>>0]=0|d[g+1>>0],d[q+2>>0]=0|d[g+2>>0],d[q+3>>0]=0|d[g+3>>0],d[q+4>>0]=0|d[g+4>>0],d[q+5>>0]=0|d[g+5>>0],d[q+6>>0]=0|d[g+6>>0],d[q+7>>0]=0|d[g+7>>0],Fr(n,o,56235,q),void 0)}function hj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0;return J=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=0|f[b>>2],G=e,s=0|f[c>>2],H=s,z=G,A=z+12|0,B=0|f[A>>2],C=0!=(0|B),C&&(D=d,E=G,F=E+12|0,g=0|f[F>>2],Ni(D,g),h=G,i=h+12|0,f[i>>2]=0),j=H,k=j+12|0,n=0|f[k>>2],(o=0!=(0|n))?(p=d,q=G,Zc(p,q),r=d,t=H,u=t+12|0,v=0|f[u>>2],w=0|ij(r,v),x=G,y=x+12|0,f[y>>2]=w,void(l=J)):void(l=J)}function ij(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0;$=l,l=l+48|0,(0|l)>=(0|m)&&X(),Y=$+40|0,W=$,d=a,r=b,C=r,M=0|f[C>>2],U=M,N=d,O=0|_i(N),V=O;a:for(;;){if(P=U,Q=0!=(0|P),!Q){Z=10;break}for(S=0;;){if(R=S,e=R>>>0<4,!e)break;if(g=S,h=U,i=h+(g<<2)|0,j=0|f[i>>2],T=j,k=S,n=U,o=n+16|0,p=o+(k<<3)|0,f[W>>2]=0|f[p>>2],f[W+4>>2]=0|f[p+4>>2],q=U,s=q+48|0,t=0|f[s>>2],u=0==(0|t),u&&(v=S,w=r,x=w+8|0,y=0|f[x>>2],z=v>>>0>=y>>>0)){Z=7;break a}B=d,D=V,E=T,f[Y>>2]=0|f[W>>2],f[Y+4>>2]=0|f[W+4>>2],aj(B,D,E,Y),F=S,G=F+1|0,S=G}H=U,I=H+48|0,J=0|f[I>>2],U=J}return 7==(0|Z)?(A=V,c=A,L=c,l=$,0|L):10==(0|Z)?(K=V,c=K,L=c,l=$,0|L):0}function jj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Z=0;return Z=l,l=l+160|0,(0|l)>=(0|m)&&X(),g=Z+144|0,V=Z+136|0,e=Z+128|0,U=Z+120|0,T=Z+112|0,S=Z+104|0,R=Z+96|0,d=Z+88|0,v=Z+56|0,Q=Z+48|0,G=Z+40|0,I=Z+32|0,J=Z+24|0,K=Z+16|0,L=Z+8|0,M=Z,h=b,i=c,N=i,j=N+12|0,k=0|f[j>>2],W=k,n=h,o=W,p=0|Qi(n,o),P=p,q=P,r=q>>>0>0,s=h,t=i,r?(kj(v,t),f[d>>2]=0|f[v>>2],f[d+4>>2]=0|f[v+4>>2],u=0|iq(s,d),O=u,w=h,lg(Q,w,30),x=h,f[R>>2]=0|f[Q>>2],f[R+4>>2]=0|f[Q+4>>2],dh(G,x,R,56284,2),y=h,z=O,f[S>>2]=0|f[Q>>2],f[S+4>>2]=0|f[Q+4>>2],fh(I,y,S,z),A=h,f[T>>2]=0|f[Q>>2],f[T+4>>2]=0|f[Q+4>>2],dh(J,A,T,67713,1),B=h,C=h,D=i,Wg(K,C,D),f[U>>2]=0|f[Q>>2],f[U+4>>2]=0|f[Q+4>>2],f[e>>2]=0|f[K>>2],f[e+4>>2]=0|f[K+4>>2],yg(B,U,e),E=h,F=W,0|Li(E,F,125,Q),H=h,f[V>>2]=0|f[Q>>2],f[V+4>>2]=0|f[Q+4>>2],dh(L,H,V,65241,1),f[a>>2]=0|f[Q>>2],f[a+4>>2]=0|f[Q+4>>2],void(l=Z)):(kj(M,t),f[g>>2]=0|f[M>>2],f[g+4>>2]=0|f[M+4>>2],Jf(a,s,g),void(l=Z))}function kj(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=0|f[d>>2],g=255&e,h=j+4|0,f[h>>2]=g,i=c,f[j>>2]=i,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function lj(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ja=0;return ja=l,l=l+176|0,(0|l)>=(0|m)&&X(),Y=ja+160|0,fa=ja+152|0,ha=ja+144|0,ga=ja+136|0,ea=ja+128|0,da=ja+120|0,ca=ja+112|0,ba=ja+104|0,aa=ja+80|0,Z=ja+72|0,W=ja+64|0,F=ja+48|0,Q=ja+40|0,R=ja+32|0,S=ja+24|0,T=ja+16|0,U=ja+8|0,V=ja,g=a,h=b,u=e,i=u,f[aa>>2]=0|f[i>>2],f[aa+4>>2]=0|f[i+4>>2],j=0|f[aa>>2],k=0|f[j>>2],n=k>>>11,o=8&n,p=0!=(0|o),q=0|f[aa>>2],r=q+12|0,p?v=r:(s=r+8|0,t=0|f[s>>2],v=t),_=v,w=_,x=0|d[w>>0],y=x<<24>>24,z=45==(0|y),z?(A=_,d[A>>0]=35,B=g,f[ba>>2]=0|f[aa>>2],f[ba+4>>2]=0|f[aa+4>>2],dh(F,B,ba,66205,1)):(C=g,f[ca>>2]=0|f[aa>>2],f[ca+4>>2]=0|f[aa+4>>2],dh(Q,C,ca,63258,2)),D=g,E=h,G=0|si(D,E,Z),$=G,H=g,I=$,J=0|f[Z>>2],f[da>>2]=0|f[aa>>2],f[da+4>>2]=0|f[aa+4>>2],dh(R,H,da,I,J),K=g,f[ea>>2]=0|f[aa>>2],f[ea+4>>2]=0|f[aa+4>>2],dh(S,K,ea,65815,1),L=c+4|0,M=0|f[L>>2],N=8==(0|M),O=g,N?(f[ga>>2]=0|f[c>>2],f[ga+4>>2]=0|f[c+4>>2],Jf(T,O,ga),f[W>>2]=0|f[T>>2],f[W+4>>2]=0|f[T+4>>2],P=g,f[fa>>2]=0|f[aa>>2],f[fa+4>>2]=0|f[aa+4>>2],f[Y>>2]=0|f[W>>2],f[Y+4>>2]=0|f[W+4>>2],gh(V,P,fa,Y),l=ja,0):(f[ha>>2]=0|f[c>>2],f[ha+4>>2]=0|f[c+4>>2],Df(U,O,ha),f[W>>2]=0|f[U>>2],f[W+4>>2]=0|f[U+4>>2],P=g,f[fa>>2]=0|f[aa>>2],f[fa+4>>2]=0|f[aa+4>>2],f[Y>>2]=0|f[W>>2],f[Y+4>>2]=0|f[W+4>>2],gh(V,P,fa,Y),l=ja,0)}function mj(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0;return A=l,l=l+32|0,(0|l)>=(0|m)&&X(),w=A+24|0,y=A,e=b,g=d,f[w>>2]=0|f[c>>2],f[w+4>>2]=0|f[c+4>>2],o=0|Zi(w),p=o<<24>>24!=0,p&&(q=0|f[c>>2],r=q+12|0,s=0|f[r>>2],x=s,t=x,u=0!=(0|t),u&&(v=e,h=x,i=g,j=0|nj(v,h,i,y),k=255&j,n=0!=(0|k)))?(f[a>>2]=0|f[y>>2],f[a+4>>2]=0|f[y+4>>2],void(l=A)):(oj(a),void(l=A))}function nj(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0;fa=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=a,t=b,E=c,P=d,Y=t,Z=0|f[Y>>2],da=Z;a:for(;;){if($=da,_=0!=(0|$),!_){ea=14;break}for(ba=0;;){if(aa=ba,h=aa>>>0<4,!h)break;if(i=ba,j=da,k=j+(i<<2)|0,n=0|f[k>>2],ca=n,o=da,p=o+48|0,q=0|f[p>>2],r=0!=(0|q),!r&&(s=ba,u=t,v=u+8|0,w=0|f[v>>2],x=s>>>0>=w>>>0)){ea=7;break a}if(y=ca,z=E,A=(0|y)==(0|z)){ea=9;break a}R=ba,S=R+1|0,ba=S}T=da,U=T+48|0,V=0|f[U>>2],da=V}return 7==(0|ea)?(e=0,W=e,l=fa,0|W):9==(0|ea)?(B=t,C=B+4|0,D=0|f[C>>2],F=D+-1|0,f[C>>2]=F,G=ba,H=da,I=H+(G<<2)|0,f[I>>2]=0,J=P,K=0!=(0|J),K&&(L=P,M=ba,N=da,O=N+16|0,Q=O+(M<<3)|0,f[L>>2]=0|f[Q>>2],f[L+4>>2]=0|f[Q+4>>2]),e=1,W=e,l=fa,0|W):14==(0|ea)?(e=0,W=e,l=fa,0|W):0}function oj(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=5,f[c>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function pj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;r=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=r+8|0,e=b,g=c,h=e,i=e,j=i+12|0,k=0|f[j>>2],n=k+4|0,o=0|f[n>>2],p=g,f[d>>2]=0|f[o>>2],f[d+4>>2]=0|f[o+4>>2],Yi(a,h,d,p),l=r}function qj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;s=l,l=l+32|0,(0|l)>=(0|m)&&X(),q=s+16|0,d=s+8|0,e=a,g=b,h=e,i=e,j=i+12|0,k=0|f[j>>2],n=k+4|0,o=0|f[n>>2],p=g,f[d>>2]=0|f[o>>2],f[d+4>>2]=0|f[o+4>>2],f[q>>2]=0|f[c>>2],f[q+4>>2]=0|f[c+4>>2],cj(h,d,p,q),l=s}function rj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,x=0;x=l,l=l+32|0,(0|l)>=(0|m)&&X(),v=x+24|0,u=x+8|0,e=x,d=b,k=d,Mn(e,k),f[u>>2]=0|f[e>>2],f[u+4>>2]=0|f[e+4>>2],f[v>>2]=0|f[c>>2],f[v+4>>2]=0|f[c+4>>2],n=0|Zi(v),o=255&n,p=0!=(0|o),p&&(q=0|f[c>>2],r=q+12|0,s=0|f[r>>2],t=0!=(0|s),t&&(g=d,h=0|f[c>>2],i=h+12|0,j=0|f[i>>2],0|Li(g,j,126,u))),f[a>>2]=0|f[u>>2],f[a+4>>2]=0|f[u+4>>2],l=x}function sj(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0;return J=l,l=l+64|0,(0|l)>=(0|m)&&X(),g=J+48|0,F=J+40|0,E=J+16|0,G=J+8|0,x=J,h=a,i=b,v=e,y=v,f[E>>2]=0|f[y>>2],f[E+4>>2]=0|f[y+4>>2],z=h,A=i,B=0|si(z,A,G),H=B,C=0|f[G>>2],(D=(0|C)>1)?(j=H,k=0|d[j>>0],n=k<<24>>24,(o=64==(0|n))?(p=H,q=p+1|0,r=0|d[q>>0],s=r<<24>>24,(t=64!=(0|s))?(u=h,w=i,tj(x,w),f[F>>2]=0|f[E>>2],f[F+4>>2]=0|f[E+4>>2],f[g>>2]=0|f[x>>2],f[g+4>>2]=0|f[x+4>>2],$n(u,F,g),l=J,0):(l=J,0)):(l=J,0)):(l=J,0)}function tj(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=4,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function uj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0;for(A=l,l=l+32|0,(0|l)>=(0|m)&&X(),x=A+16|0,e=A,d=b,p=d,Mn(e,p),f[x>>2]=0|f[e>>2],f[x+4>>2]=0|f[e+4>>2],q=0|f[c>>2],y=q;;){if(r=y,s=0!=(0|r),!s)break;t=y,u=t+12|0,v=0|f[u>>2],w=0!=(0|v),w&&(g=d,h=y,i=h+12|0,j=0|f[i>>2],0|Li(g,j,127,x)),k=y,n=k+20|0,o=0|f[n>>2],y=o}f[a>>2]=0|f[x>>2],f[a+4>>2]=0|f[x+4>>2],l=A}function vj(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0;return J=l,l=l+64|0,(0|l)>=(0|m)&&X(),g=J+48|0,F=J+40|0,E=J+16|0,G=J+8|0,x=J,h=a,i=b,v=e,y=v,f[E>>2]=0|f[y>>2],f[E+4>>2]=0|f[y+4>>2],z=h,A=i,B=0|si(z,A,G),H=B,C=0|f[G>>2],(D=(0|C)>2)?(j=H,k=0|d[j>>0],n=k<<24>>24,(o=64==(0|n))?(p=H,q=p+1|0,r=0|d[q>>0],s=r<<24>>24,(t=64==(0|s))?(u=h,w=i,tj(x,w),f[F>>2]=0|f[E>>2],f[F+4>>2]=0|f[E+4>>2],f[g>>2]=0|f[x>>2],f[g+4>>2]=0|f[x+4>>2],$n(u,F,g),l=J,0):(l=J,0)):(l=J,0)):(l=J,0)}function wj(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0;for(za=l,l=l+80|0,(0|l)>=(0|m)&&X(),wa=za,va=za+48|0,ta=za+40|0,H=za+32|0,S=za+24|0,ca=za+16|0,i=b,j=c,w=e,na=j,sa=na;;){if(pa=j,qa=0!=(0|pa),!qa)break;if(ra=j,k=ra+12|0,n=0|f[k>>2],o=0!=(0|n),o&&(p=i,q=j,r=q+12|0,s=0|f[r>>2],t=w,u=0|Wi(p,s,t,va),v=255&u,x=0!=(0|v))){ya=5;break}y=j,z=y+20|0,A=0|f[z>>2],j=A}if(5==(0|ya))return f[a>>2]=0|f[va>>2],f[a+4>>2]=0|f[va+4>>2],void(l=za);B=sa,C=0!=(0|B);a:do if(C&&(D=sa,E=0|f[D>>2],F=255&E,G=12==(0|F),G&&(I=i,J=sa,K=i,L=0|ki(K,67899,12),Vi(H,I,J,L),f[ta>>2]=0|f[H>>2],f[ta+4>>2]=0|f[H+4>>2],M=0|f[ta>>2],j=M,N=j,O=0|f[N>>2],P=255&O,Q=9==(0|P),R=j,T=0!=(0|R),ua=Q&T))){for(;;){if(U=j,V=U+12|0,W=0|f[V>>2],Y=0!=(0|W),Y&&(Z=i,$=j,_=$+12|0,aa=0|f[_>>2],ba=w,da=0|Wi(Z,aa,ba,va),ea=255&da,fa=0!=(0|ea)))break;if(ga=j,ha=ga+20|0,ia=0|f[ha>>2],j=ia,g=j,h=0!=(0|g),!h)break a}return f[a>>2]=0|f[va>>2],f[a+4>>2]=0|f[va+4>>2],void(l=za)}while(0);ja=i,ka=w,la=i,ma=w,vi(S,la,ma),oa=sa,kj(ca,oa),d[wa>>0]=0|d[S>>0],d[wa+1>>0]=0|d[S+1>>0],d[wa+2>>0]=0|d[S+2>>0],d[wa+3>>0]=0|d[S+3>>0],d[wa+4>>0]=0|d[S+4>>0],d[wa+5>>0]=0|d[S+5>>0],d[wa+6>>0]=0|d[S+6>>0],d[wa+7>>0]=0|d[S+7>>0],xa=wa+8|0,d[xa>>0]=0|d[ca>>0],d[xa+1>>0]=0|d[ca+1>>0],d[xa+2>>0]=0|d[ca+2>>0],d[xa+3>>0]=0|d[ca+3>>0],d[xa+4>>0]=0|d[ca+4>>0],d[xa+5>>0]=0|d[ca+5>>0],d[xa+6>>0]=0|d[ca+6>>0],d[xa+7>>0]=0|d[ca+7>>0],Fr(ja,ka,56287,wa)}function xj(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=b,g=d,h=e,i=0|f[c>>2],j=g,wj(a,h,i,j),l=n}function yj(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0;for(aa=l,l=l+48|0,(0|l)>=(0|m)&&X(),$=aa+32|0,Z=aa+24|0,e=a,g=b,t=c,E=g,W=E;;){if(P=g,R=0!=(0|P),!R)break;if(S=g,T=S+12|0,U=0|f[T>>2],V=0!=(0|U),V&&(h=g,i=h+12|0,j=0|f[i>>2],Y=j,k=e,n=Y,o=t,p=0|Wi(k,n,o,0),q=p<<24>>24!=0)){_=5;break}x=g,y=x+20|0,z=0|f[y>>2],g=z}return 5==(0|_)?(r=e,s=g,Zc(r,s),u=e,v=Y,w=t,f[Z>>2]=0|f[d>>2],f[Z+4>>2]=0|f[d+4>>2],aj(u,v,w,Z),void(l=aa)):(A=W,B=A+12|0,C=0|f[B>>2],D=0!=(0|C),D||(F=e,G=0|_i(F),H=W,I=H+12|0,f[I>>2]=G),J=e,K=W,Zc(J,K),L=e,M=W,N=M+12|0,O=0|f[N>>2],Q=t,f[$>>2]=0|f[d>>2],f[$+4>>2]=0|f[d+4>>2],aj(L,O,Q,$),void(l=aa))}function zj(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+16|0,(0|l)>=(0|m)&&X(),k=o+8|0,e=a,g=c,h=e,i=0|f[b>>2],j=g,f[k>>2]=0|f[d>>2],f[k+4>>2]=0|f[d+4>>2],yj(h,i,j,k),l=o}function Aj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;for(E=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,s=b,v=c;;){if(w=s,x=0!=(0|w),!x){D=7;break}if(y=s,z=y+12|0,A=0|f[z>>2],B=0!=(0|A),B&&(g=s,h=g+12|0,i=0|f[h>>2],C=i,j=e,k=C,n=v,o=0|Wi(j,k,n,0),p=o<<24>>24!=0)){D=5;break}q=s,r=q+20|0,t=0|f[r>>2],s=t}return 5==(0|D)?(d=1,u=d,l=E,0|u):7==(0|D)?(d=0,u=d,l=E,0|u):0}function Bj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,n=0;return n=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=c,g=d,h=0|f[b>>2],i=e,j=0|Aj(g,h,i),l=n,0|j}function Cj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,F=0;return F=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=c,s=d,w=s+12|0,x=0|f[w>>2],y=x+16|0,z=0|f[y>>2],A=z+4|0,B=0|f[A>>2],C=B+16|0,g=0|f[C>>2],D=g,h=D,(i=0!=(0|h))?(t=d,u=D,v=e,wj(a,t,u,v),void(l=F)):(j=d,k=j+12|0,n=0|f[k>>2],o=n+16|0,p=0|f[o>>2],q=p+44|0,r=0|f[q>>2],D=r,t=d,u=D,v=e,wj(a,t,u,v),void(l=F))}function Dj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0;G=l,l=l+32|0,(0|l)>=(0|m)&&X(),E=G+16|0,d=a,e=b,s=d,w=s+12|0,x=0|f[w>>2],y=x+16|0,z=0|f[y>>2],A=z+4|0,B=0|f[A>>2],C=B+16|0,g=0|f[C>>2],D=g,h=D,i=0!=(0|h),i||(j=d,k=j+12|0,n=0|f[k>>2],o=n+16|0,p=0|f[o>>2],q=p+44|0,r=0|f[q>>2],D=r),t=d,u=D,v=e,f[E>>2]=0|f[c>>2],f[E+4>>2]=0|f[c+4>>2],yj(t,u,v,E),l=G}function Ej(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+16|0,(0|l)>=(0|m)&&X(),n=p+8|0,e=b,g=d,h=e,f[n>>2]=0|f[c>>2],f[n+4>>2]=0|f[c+4>>2],Fj(h,n),i=e,j=0|f[c>>2],k=g,Gj(a,i,j,k),l=p}function Fj(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,k=0;switch(k=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b+4|0,e=0|f[d>>2],0|e){case 12:case 10:case 9:return void(l=k);default:g=c,h=c,i=0|tp(h,68905),Br(g,i,56325)}}function Gj(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0;for(ba=l,l=l+80|0,(0|l)>=(0|m)&&X(),e=ba+56|0,_=ba+32|0,W=ba+16|0,F=ba+8|0,P=ba,g=b,h=c,u=d,Q=h,V=Q,Z=0;;)if(R=V,S=0!=(0|R)){if(T=V,U=T+12|0,i=0|f[U>>2],j=0!=(0|i),j&&(k=V,n=k+12|0,o=0|f[n>>2],$=o,p=g,q=$,r=u,s=0|Wi(p,q,r,_),t=s<<24>>24!=0)){aa=5;break}v=V,w=v+20|0,x=0|f[w>>2],V=x}else{if(y=Z,z=y<<24>>24==0,A=h,B=0!=(0|A),Y=z&B,!Y){aa=10;break}if(C=h,D=0|f[C>>2],E=255&D,G=10==(0|E),!G){aa=10;break}H=g,I=H+32|0,J=0|f[I>>2],V=J,Z=1}return 5==(0|aa)?(f[a>>2]=0|f[_>>2],f[a+4>>2]=0|f[_+4>>2],void(l=ba)):10==(0|aa)?(K=u,tj(F,K),f[W>>2]=0|f[F>>2],f[W+4>>2]=0|f[F+4>>2],L=g,M=h,kj(P,M),N=g,O=0|ki(N,65959,13),f[e>>2]=0|f[P>>2],f[e+4>>2]=0|f[P+4>>2],Zj(a,L,e,O,1,W),void(l=ba)):void 0}function Hj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ca=0;Ca=l,l=l+48|0,(0|l)>=(0|m)&&X(),Aa=Ca+16|0,za=Ca+8|0,s=Ca,d=b,e=c,D=d,O=D+12|0,$=0|f[O>>2],ja=$+16|0,ua=0|f[ja>>2],va=ua+4|0,wa=0|f[va>>2],g=wa+16|0,h=0|f[g>>2],xa=h,i=xa,j=0!=(0|i),j||(k=d,n=k+12|0,o=0|f[n>>2],p=o+16|0,q=0|f[p>>2],r=q+44|0,t=0|f[r>>2],xa=t),u=xa,v=0!=(0|u);a:do if(v){if(w=xa,x=w+12|0,y=0|f[x>>2],z=0!=(0|y),z&&(A=d,B=xa,C=B+12|0,E=0|f[C>>2],F=e,G=0|Wi(A,E,F,Aa),H=255&G,I=0!=(0|H)))return f[a>>2]=0|f[Aa>>2],f[a+4>>2]=0|f[Aa+4>>2],void(l=Ca);for(J=xa,K=0|f[J>>2],L=255&K,M=12==(0|L),M&&(N=d,P=xa,Q=d,R=0|ki(Q,67899,12),Vi(s,N,P,R),f[za>>2]=0|f[s>>2],f[za+4>>2]=0|f[s+4>>2],S=0|f[za>>2],ya=S,T=ya,U=0|f[T>>2],V=255&U,W=9==(0|V),W&&(Y=ya,xa=Y)),Z=xa,ya=Z;;){if(_=d,aa=ya,ba=0|hp(_,aa),ya=ba,ca=ya,da=0!=(0|ca),!da)break a;if(ea=ya,fa=ea+12|0,ga=0|f[fa>>2],ha=0!=(0|ga),ha&&(ia=d,ka=ya,la=ka+12|0,ma=0|f[la>>2],na=e,oa=0|Wi(ia,ma,na,Aa),pa=255&oa,qa=0!=(0|pa)))break}return f[a>>2]=0|f[Aa>>2],f[a+4>>2]=0|f[Aa+4>>2],void(l=Ca)}while(0);ra=d,sa=xa,ta=e,Gj(a,ra,sa,ta),l=Ca}function Ij(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;q=l,l=l+32|0,(0|l)>=(0|m)&&X(),o=q+24|0,n=q+16|0,k=q+8|0,e=a,g=c,h=e,f[k>>2]=0|f[b>>2],f[k+4>>2]=0|f[b+4>>2],Fj(h,k),i=e,j=g,f[n>>2]=0|f[b>>2],f[n+4>>2]=0|f[b+4>>2],f[o>>2]=0|f[d>>2],f[o+4>>2]=0|f[d+4>>2],cj(i,n,j,o),l=q}function Jj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0;G=l,l=l+32|0,(0|l)>=(0|m)&&X(),E=G+16|0,d=a,e=b,s=d,w=s+12|0,x=0|f[w>>2],y=x+16|0,z=0|f[y>>2],A=z+4|0,B=0|f[A>>2],C=B+16|0,g=0|f[C>>2],D=g,h=D,i=0!=(0|h),i||(j=d,k=j+12|0,n=0|f[k>>2],o=n+16|0,p=0|f[o>>2],q=p+44|0,r=0|f[q>>2],D=r),t=d,u=D,v=e,f[E>>2]=0|f[c>>2],f[E+4>>2]=0|f[c+4>>2],$i(t,u,v,E),l=G}function Kj(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;r=l,l=l+32|0,(0|l)>=(0|m)&&X(),p=r+16|0,e=a,g=b,h=c,i=e,j=g,k=e,n=h,o=0|li(k,n),f[p>>2]=0|f[d>>2],f[p+4>>2]=0|f[d+4>>2],$i(i,j,o,p),l=r}function Lj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+16|0,(0|l)>=(0|m)&&X(),n=p+8|0,d=a,e=b,g=d,h=d,i=h+32|0,j=0|f[i>>2],k=e,f[n>>2]=0|f[c>>2],f[n+4>>2]=0|f[c+4>>2],Kj(g,j,k,n),l=p}function Mj(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0;O=l,l=l+48|0,(0|l)>=(0|m)&&X(),M=O,I=O+24|0,K=O+36|0,i=O+8|0,h=b,d[K>>0]=1,v=0|f[c>>2],J=v,B=h,f[M>>2]=K,0|Lp(B,68376,M),C=h,Mn(i,C),f[I>>2]=0|f[i>>2],f[I+4>>2]=0|f[i+4>>2],e=J,g=0!=(0|e);a:do if(g)for(;;){if(D=J,E=D+12|0,F=0|f[E>>2],G=0!=(0|F),G&&(H=h,j=J,k=j+12|0,n=0|f[k>>2],0|Li(H,n,128,I)),o=0|d[K>>0],p=o<<24>>24!=0,!p)break a;if(q=J,r=q+20|0,s=0|f[r>>2],J=s,t=J,u=h,w=u+32|0,x=0|f[w>>2],y=(0|t)!=(0|x),z=J,A=0!=(0|z),L=y&A,!L)break}while(0);f[a>>2]=0|f[I>>2],f[a+4>>2]=0|f[I+4>>2],l=O}function Nj(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,F=0;return F=l,l=l+64|0,(0|l)>=(0|m)&&X(),g=F+48|0,B=F+40|0,A=F+16|0,C=F+8|0,t=F,h=a,i=b,s=e,u=s,f[A>>2]=0|f[u>>2],f[A+4>>2]=0|f[u+4>>2],v=h,w=i,x=0|si(v,w,C),D=x,y=0|f[C>>2],(z=(0|y)>=1)?(j=D,k=0|d[j>>0],n=k<<24>>24,o=n-65|0,(p=o>>>0<26)?(q=h,r=i,tj(t,r),f[B>>2]=0|f[A>>2],f[B+4>>2]=0|f[A+4>>2],f[g>>2]=0|f[t>>2],f[g+4>>2]=0|f[t+4>>2],$n(q,B,g),l=F,0):(l=F,0)):(l=F,0)}function Oj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;return v=l,l=l+16|0,(0|l)>=(0|m)&&X(),t=v,d=b,e=c,j=d,k=j+24|0,n=0|f[k>>2],(o=0!=(0|n))?(p=d,q=d,r=q+24|0,s=0|f[r>>2],g=e,h=0|Wi(p,s,g,t),i=h<<24>>24!=0,i?(f[a>>2]=0|f[t>>2],f[a+4>>2]=0|f[t+4>>2],void(l=v)):(Xi(a),void(l=v))):(Xi(a),void(l=v))}function Pj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0;y=l,l=l+32|0,(0|l)>=(0|m)&&X(),w=y+16|0,d=a,e=b,n=d,o=n+24|0,p=0|f[o>>2],q=0!=(0|p),r=d,q?(g=r+24|0,h=0|f[g>>2],v=h):(s=0|_i(r),t=d,u=t+24|0,f[u>>2]=s,v=s),i=d,j=v,k=e,f[w>>2]=0|f[c>>2],f[w+4>>2]=0|f[c+4>>2],aj(i,j,k,w),l=y}function Qj(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,K=0;for(K=l,l=l+64|0,(0|l)>=(0|m)&&X(),e=K+40|0,F=K+32|0,E=K+16|0,G=K+48|0,h=K,g=b,u=g,x=u+24|0,y=0|f[x>>2],I=y,z=g,Mn(E,z),A=I,B=0!=(0|A),B&&(C=g,D=I,0|Li(C,D,129,E)),d[G>>0]=36,i=G+2|0,d[i>>0]=0,H=1;;){if(j=H,k=j>>>0<=9,!k)break;n=H,o=n+48|0,p=255&o,q=G+1|0,d[q>>0]=p,r=g,s=g,t=0|hi(s,G,2),tj(h,t),f[F>>2]=0|f[E>>2],f[F+4>>2]=0|f[E+4>>2],f[e>>2]=0|f[h>>2],f[e+4>>2]=0|f[h+4>>2],$n(r,F,e),v=H,w=v+1|0,H=w}f[a>>2]=0|f[E>>2],f[a+4>>2]=0|f[E+4>>2],l=K}function Rj(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;return s=l,l=l+48|0,(0|l)>=(0|m)&&X(),e=s+40|0,q=s+32|0,p=s+8|0,j=s,g=a,h=b,i=d,k=i,f[p>>2]=0|f[k>>2],f[p+4>>2]=0|f[k+4>>2],n=g,o=h,tj(j,o),f[q>>2]=0|f[p>>2],f[q+4>>2]=0|f[p+4>>2],f[e>>2]=0|f[j>>2],f[e+4>>2]=0|f[j+4>>2],$n(n,q,e),l=s,0}function Sj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,n=0;return n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n+8|0,d=a,e=c,g=d,h=e,f[j>>2]=0|f[b>>2],f[j+4>>2]=0|f[b+4>>2],i=0|Tj(g,j,h,1,1),l=n,0|i}function Tj(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0;da=l,l=l+32|0,(0|l)>=(0|m)&&X(),h=a,u=c,F=d,Q=e,U=0|f[b>>2],$=U,_=0,V=$,ba=V;a:for(;;){W=ba,Y=0!=(0|W);do if(Y){if(Z=ba,i=Z+12|0,j=0|f[i>>2],k=0!=(0|j),k&&(n=h,o=ba,p=o+12|0,q=0|f[p>>2],r=u,s=0|Wi(n,q,r,0),t=255&s,v=0!=(0|t))){ca=5;break a}if(w=Q,x=w<<24>>24!=0,!x&&(y=$,z=h,A=z+32|0,B=0|f[A>>2],C=(0|y)!=(0|B)))break;D=ba,E=D+20|0,G=0|f[E>>2],ba=G;
+continue a}while(0);if(H=F,I=H<<24>>24!=0,J=_,K=J<<24>>24!=0,aa=I|K){ca=12;break}if(L=$,M=0|f[L>>2],N=255&M,O=10==(0|N),!O){ca=12;break}_=1,P=h,R=P+32|0,S=0|f[R>>2],ba=S}return 5==(0|ca)?(g=1,T=g,l=da,0|T):12==(0|ca)?(g=0,T=g,l=da,0|T):0}function Uj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,n=0;return n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n+8|0,d=a,e=c,g=d,h=e,f[j>>2]=0|f[b>>2],f[j+4>>2]=0|f[b+4>>2],i=0|Tj(g,j,h,1,0),l=n,0|i}function Vj(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n+8|0,e=b,g=d,h=e,i=g,f[j>>2]=0|f[c>>2],f[j+4>>2]=0|f[c+4>>2],Yi(a,h,j,i),l=n}function Wj(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0;return J=l,l=l+48|0,(0|l)>=(0|m)&&X(),H=J+16|0,A=J+8|0,G=J,e=a,s=b,z=c,B=e,C=s,D=e,E=0|ki(D,64571,11),Vi(A,B,C,E),f[H>>2]=0|f[A>>2],f[H+4>>2]=0|f[A+4>>2],F=H+4|0,g=0|f[F>>2],h=0==(0|g),h&&(i=0|f[H>>2],j=0!=(0|i),!j)?(k=z,n=0!=(0|k),n?(o=s,f[G>>2]=o,p=G+4|0,f[p>>2]=0,q=e,r=z,t=r+12|0,u=0|f[t>>2],0|Li(q,u,130,G),v=G+4|0,w=0|f[v>>2],d=w,y=d,l=J,0|y):(d=0,y=d,l=J,0|y)):(x=0|f[H>>2],d=x,y=d,l=J,0|y)}function Xj(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;return E=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=a,t=b,u=d,v=u,B=v,w=B,x=0|f[w>>2],C=x,y=c+4|0,z=0|f[y>>2],A=C,h=0|f[A>>2],i=255&h,j=(0|z)==(0|i),j&&(k=0|f[c>>2],n=C,o=(0|k)==(0|n))?(p=t,q=B,r=q+4|0,f[r>>2]=p,e=1,s=e,l=E,0|s):(e=0,s=e,l=E,0|s)}function Yj(a,b,c,d,e,g){a|=0,b|=0,c|=0,d|=0,e|=0,g|=0;var h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,ba=0;for(ba=l,l=l+112|0,(0|l)>=(0|m)&&X(),_=ba+104|0,S=ba+24|0,P=ba+8|0,o=b,p=d,A=e,I=o,J=p,K=0|li(I,J),$=K,L=A,M=(0|L)>8,M&&(N=o,O=o,q=0|tp(O,68855),Br(N,q,56363)),f[P>>2]=g,Z=0;;){if(r=Z,s=A,t=(0|r)<(0|s),!t)break;u=Z,v=S+(u<<3)|0,Q=0|f[P>>2],w=Q,x=4,W=x,T=W-1|0,y=w+T|0,z=4,V=z,U=V-1|0,Y=U^-1,B=y&Y,C=B,h=+j[C>>2],k=C+4|0,i=0|f[k>>2],R=C+8|0,f[P>>2]=R,j[v>>2]=h,n=v+4|0,f[n>>2]=i,D=Z,E=D+1|0,Z=E}F=o,G=$,H=A,f[_>>2]=0|f[c>>2],f[_+4>>2]=0|f[c+4>>2],Zj(a,F,_,G,H,S),l=ba}function Zj(a,b,c,d,e,g){a|=0,b|=0,c|=0,d|=0,e|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;v=l,l=l+48|0,(0|l)>=(0|m)&&X(),h=v+32|0,t=v+24|0,o=v,i=b,j=d,k=e,n=g,p=i,q=j,r=k,s=n,$j(o),f[t>>2]=0|f[c>>2],f[t+4>>2]=0|f[c+4>>2],f[h>>2]=0|f[o>>2],f[h+4>>2]=0|f[o+4>>2],_j(a,p,t,q,r,s,h),l=v}function $j(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function _j(a,b,c,g,h,i,j){a|=0,b|=0,c|=0,g|=0,h|=0,i|=0,j|=0;var k=0,n=0,o=0,p=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,la=0,qa=0,ra=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0;bf=l,l=l+288|0,(0|l)>=(0|m)&&X(),Xe=bf+272|0,Ue=bf+264|0,Te=bf+256|0,Se=bf+248|0,me=bf+240|0,Re=bf+232|0,Ye=bf,_e=4,$e=0|fw(40),f[$e>>2]=0,We=bf+224|0,oe=bf+64|0,B=bf+56|0,C=bf+48|0,ne=bf+40|0,Qb=bf+32|0,Rc=bf+24|0,ad=bf+16|0,ld=bf+8|0,wd=0|f[b>>2],Hd=0!=(0|wd);do if(Hd){if(td=b+12|0,ud=0|f[td>>2],vd=ud+4|0,xd=0|f[vd>>2],yd=0!=(0|xd),!yd&&(q=0,ma(134,0|b),zd=q,q=0,0!=(0|zd)&0!=(0|r)?(Ad=0|rw(0|f[zd>>2],0|$e,0|_e),0==(0|Ad)&&Aa(0|zd,0|r),F=r):Ad=-1,Bd=F,ue=1==(0|Ad))){k=i,o=h,s=g,A=Bd,Ne=0;break}if(Cd=b+12|0,Dd=0|f[Cd>>2],Ed=Dd+16|0,Fd=0|f[Ed>>2],Gd=Fd+12|0,Id=0|f[Gd>>2],Jd=(0|h)<0){if(q=0,Kd=0|sa(135,0|b,68855),Ld=q,q=0,0!=(0|Ld)&0!=(0|r)?(Md=0|rw(0|f[Ld>>2],0|$e,0|_e),0==(0|Md)&&Aa(0|Ld,0|r),F=r):Md=-1,Nd=F,Ke=1==(0|Md)){k=i,o=h,s=g,A=Nd,Ne=0;break}if(q=0,na(136,0|Qb,0|h),Od=q,q=0,0!=(0|Od)&0!=(0|r)?(Pd=0|rw(0|f[Od>>2],0|$e,0|_e),0==(0|Pd)&&Aa(0|Od,0|r),F=r):Pd=-1,Qd=F,Le=1==(0|Pd)){k=i,o=h,s=g,A=Qd,Ne=0;break}q=0,d[Ye>>0]=0|d[Qb>>0],d[Ye+1>>0]=0|d[Qb+1>>0],d[Ye+2>>0]=0|d[Qb+2>>0],d[Ye+3>>0]=0|d[Qb+3>>0],d[Ye+4>>0]=0|d[Qb+4>>0],d[Ye+5>>0]=0|d[Qb+5>>0],d[Ye+6>>0]=0|d[Qb+6>>0],d[Ye+7>>0]=0|d[Qb+7>>0],ta(137,0|b,0|Kd,56393,0|Ye),Rd=q,q=0,0!=(0|Rd)&0!=(0|r)?(Td=0|rw(0|f[Rd>>2],0|$e,0|_e),0==(0|Td)&&Aa(0|Rd,0|r),F=r):Td=-1,Ud=F,k=i,o=h,s=g,A=Ud,Ne=0;break}if(q=0,f[Se>>2]=0|f[c>>2],f[Se+4>>2]=0|f[c+4>>2],Vd=0|sa(138,0|b,0|Se),Wd=q,q=0,0!=(0|Wd)&0!=(0|r)?(Xd=0|rw(0|f[Wd>>2],0|$e,0|_e),0==(0|Xd)&&Aa(0|Wd,0|r),F=r):Xd=-1,Yd=F,ve=1==(0|Xd))k=i,o=h,s=g,A=Yd,Ne=0;else if(f[ne>>2]=Vd,q=0,Zd=0|ja(139,0|b,0|ne,0|g),$d=q,q=0,0!=(0|$d)&0!=(0|r)?(_d=0|rw(0|f[$d>>2],0|$e,0|_e),0==(0|_d)&&Aa(0|$d,0|r),F=r):_d=-1,ae=F,we=1==(0|_d))k=i,o=h,s=g,A=ae,Ne=0;else{if(ce=0!=(0|Zd))v=h,w=g,Me=Id,Qe=Zd,Ve=0;else{if(q=0,de=0|ja(140,0|b,65322,14),ee=q,q=0,0!=(0|ee)&0!=(0|r)?(fe=0|rw(0|f[ee>>2],0|$e,0|_e),0==(0|fe)&&Aa(0|ee,0|r),F=r):fe=-1,ge=F,xe=1==(0|fe)){k=i,o=h,s=g,A=ge,Ne=0;break}if(q=0,he=0|ja(139,0|b,0|ne,0|de),ie=q,q=0,0!=(0|ie)&0!=(0|r)?(je=0|rw(0|f[ie>>2],0|$e,0|_e),0==(0|je)&&Aa(0|ie,0|r),F=r):je=-1,ke=F,ye=1==(0|je)){k=i,o=h,s=de,A=ke,Ne=0;break}le=Id+1|0,E=h+1|0,v=E,w=de,Me=le,Qe=he,Ve=g}if(q=0,G=0|oa(141,0|b),H=q,q=0,0!=(0|H)&0!=(0|r)?(I=0|rw(0|f[H>>2],0|$e,0|_e),0==(0|I)&&Aa(0|H,0|r),F=r):I=-1,J=F,ze=1==(0|I))k=i,o=v,s=w,A=J,Ne=0;else{if(f[G>>2]=w,K=G+4|0,f[K>>2]=Qe,L=b+12|0,M=0|f[L>>2],N=M+4|0,O=0|f[N>>2],Q=G+8|0,f[Q>>2]=O,R=G+36|0,f[R>>2]=v,S=0|f[ne>>2],T=G+44|0,f[T>>2]=S,U=b+12|0,V=0|f[U>>2],W=V+4|0,Y=0|f[W>>2],Z=Y+(Me<<3)|0,$=b+12|0,aa=0|f[$>>2],ba=aa+4|0,f[ba>>2]=Z,ca=b+12|0,da=0|f[ca>>2],ea=da+8|0,fa=0|f[ea>>2],ga=fa>>>0<=i>>>0,ga?(ha=b+12|0,ia=0|f[ha>>2],la=ia+12|0,ra=0|f[la>>2],ua=i>>>0<ra>>>0,ua?(va=b+12|0,wa=0|f[va>>2],xa=wa+8|0,ya=0|f[xa>>2],za=i,Ba=ya,Ca=za-Ba|0,Da=(0|Ca)/8&-1,Ze=Da):Ze=-1):Ze=-1,Fa=0|f[Qe>>2],Ga=Fa>>>11,Ha=128&Ga,Ia=0!=(0|Ha)){if(Ja=v+2|0,Ka=G+12|0,f[Ka>>2]=Ja,La=G+12|0,Ma=0|f[La>>2],q=0,pa(142,0|b,0|Ma,0),Na=q,q=0,0!=(0|Na)&0!=(0|r)?(Oa=0|rw(0|f[Na>>2],0|$e,0|_e),0==(0|Oa)&&Aa(0|Na,0|r),F=r):Oa=-1,Qa=F,Je=1==(0|Oa)){k=i,o=v,s=w,A=Qa,Ne=0;break}}else if(Ra=Qe+12|0,Sa=0|f[Ra>>2],Ta=Sa+2|0,Ua=0|e[Ta>>1],Va=65535&Ua,Wa=Va+Me|0,Xa=G+12|0,f[Xa>>2]=Wa,Ya=G+12|0,Za=0|f[Ya>>2],_a=v+2|0,q=0,pa(142,0|b,0|Za,0|_a),ab=q,q=0,0!=(0|ab)&0!=(0|r)?(bb=0|rw(0|f[ab>>2],0|$e,0|_e),0==(0|bb)&&Aa(0|ab,0|r),F=r):bb=-1,cb=F,Ae=1==(0|bb)){k=i,o=v,s=w,A=cb,Ne=0;break}if(db=(0|Ze)>=0,db?(eb=b+12|0,fb=0|f[eb>>2],gb=fb+8|0,hb=0|f[gb>>2],ib=hb+(Ze<<3)|0,u=ib):u=i,kb=b+12|0,lb=0|f[kb>>2],mb=lb+4|0,nb=0|f[mb>>2],f[nb>>2]=0|f[c>>2],f[nb+4>>2]=0|f[c+4>>2],ob=0!=(0|Ve)){if(pb=b+12|0,qb=0|f[pb>>2],rb=qb+4|0,sb=0|f[rb>>2],tb=sb+8|0,q=0,na(143,0|Rc,0|Ve),vb=q,q=0,0!=(0|vb)&0!=(0|r)?(wb=0|rw(0|f[vb>>2],0|$e,0|_e),0==(0|wb)&&Aa(0|vb,0|r),F=r):wb=-1,xb=F,He=1==(0|wb)){k=u,o=v,s=w,A=xb,Ne=0;break}if(f[tb>>2]=0|f[Rc>>2],f[tb+4>>2]=0|f[Rc+4>>2],yb=(0|v)>1,yb&&(zb=b+12|0,Ab=0|f[zb>>2],Bb=Ab+4|0,Cb=0|f[Bb>>2],Db=Cb+16|0,Eb=v-1|0,q=0,pa(144,0|Db,0|u,0|Eb),Gb=q,q=0,0!=(0|Gb)&0!=(0|r)?(Hb=0|rw(0|f[Gb>>2],0|$e,0|_e),0==(0|Hb)&&Aa(0|Gb,0|r),F=r):Hb=-1,Ib=F,Ie=1==(0|Hb))){k=u,o=v,s=w,A=Ib,Ne=0;break}}else if(Jb=(0|v)>0,Jb&&(Kb=b+12|0,Lb=0|f[Kb>>2],Mb=Lb+4|0,Nb=0|f[Mb>>2],Ob=Nb+8|0,q=0,pa(144,0|Ob,0|u,0|v),Pb=q,q=0,0!=(0|Pb)&0!=(0|r)?(Sb=0|rw(0|f[Pb>>2],0|$e,0|_e),0==(0|Sb)&&Aa(0|Pb,0|r),F=r):Sb=-1,Tb=F,Ge=1==(0|Sb))){k=u,o=v,s=w,A=Tb,Ne=0;break}if(Ub=v+1|0,Vb=b+12|0,Wb=0|f[Vb>>2],Xb=Wb+4|0,Yb=0|f[Xb>>2],Zb=Yb+(Ub<<3)|0,f[Zb>>2]=0|f[j>>2],f[Zb+4>>2]=0|f[j+4>>2],$b=0|f[Qe>>2],_b=$b>>>11,bc=128&_b,cc=0!=(0|bc),!cc){if(Ec=G+40|0,f[Ec>>2]=-1,q=0,f[Ue>>2]=0|f[c>>2],f[Ue+4>>2]=0|f[c+4>>2],ta(147,0|ld,0|b,0|Qe,0|Ue),Fc=q,q=0,0!=(0|Fc)&0!=(0|r)?(Gc=0|rw(0|f[Fc>>2],0|$e,0|_e),0==(0|Gc)&&Aa(0|Fc,0|r),F=r):Gc=-1,Ic=F,Be=1==(0|Gc)){k=u,o=v,s=w,A=Ic,Ne=0;break}f[We>>2]=0|f[ld>>2],f[We+4>>2]=0|f[ld+4>>2],x=u,y=v,z=w,Pe=0,af=52;break}q=0,dc=0|oa(145,0|b),ec=q,q=0,0!=(0|ec)&0!=(0|r)?(fc=0|rw(0|f[ec>>2],0|$e,0|_e),0==(0|fc)&&Aa(0|ec,0|r),F=r):fc=-1,gc=F,Ce=1==(0|fc),Ce?(k=u,o=v,s=w,A=gc,Ne=0):(hc=G+40|0,f[hc>>2]=-2,ic=Qe+12|0,jc=0|f[ic>>2],q=0,f[Te>>2]=0|f[c>>2],f[Te+4>>2]=0|f[c+4>>2],pa(0|jc,0|ad,0|b,0|Te),kc=q,q=0,0!=(0|kc)&0!=(0|r)?(mc=0|rw(0|f[kc>>2],0|$e,0|_e),0==(0|mc)&&Aa(0|kc,0|r),F=r):mc=-1,nc=F,De=1==(0|mc),De?(k=u,o=v,s=w,A=nc,Ne=0):(f[We>>2]=0|f[ad>>2],f[We+4>>2]=0|f[ad+4>>2],oc=b+12|0,pc=0|f[oc>>2],qc=pc+16|0,rc=0|f[qc>>2],sc=rc+8|0,tc=0|f[sc>>2],uc=b+12|0,vc=0|f[uc>>2],xc=vc+4|0,f[xc>>2]=tc,q=0,ma(132,0|b),yc=q,q=0,0!=(0|yc)&0!=(0|r)?(zc=0|rw(0|f[yc>>2],0|$e,0|_e),0==(0|zc)&&Aa(0|yc,0|r),F=r):zc=-1,Ac=F,Ee=1==(0|zc),Ee?(k=u,o=v,s=w,A=Ac,Ne=0):(q=0,na(146,0|b,0|dc),Bc=q,q=0,0!=(0|Bc)&0!=(0|r)?(Cc=0|rw(0|f[Bc>>2],0|$e,0|_e),0==(0|Cc)&&Aa(0|Bc,0|r),F=r):Cc=-1,Dc=F,Fe=1==(0|Cc),Fe?(k=u,o=v,s=w,A=Dc,Ne=0):(x=u,y=v,z=w,Pe=0,af=52))))}}}else Sd=b+12|0,be=0|f[Sd>>2],D=be+16|0,P=0|f[D>>2],_=b+12|0,qa=0|f[_>>2],Ea=qa+20|0,Pa=0|f[Ea>>2],$a=P,jb=Pa,ub=$a-jb|0,Fb=(0|ub)/48&-1,$e=0|pw(oe,1,0|$e,0|_e),_e=F,q=0,Rb=q,q=0,0!=(0|Rb)&0!=(0|r)?(ac=0|rw(0|f[Rb>>2],0|$e,0|_e),0==(0|ac)&&Aa(0|Rb,0|r),F=r):ac=-1,lc=F,pe=1==(0|ac),pe?(k=i,o=h,s=g,A=lc,Ne=Fb):(k=i,o=h,s=g,A=0,Ne=Fb);while(0);a:for(;;){if(52==(0|af)){if(af=0,q=0,f[Xe>>2]=0|f[We>>2],f[Xe+4>>2]=0|f[We+4>>2],na(148,0|b,0|Xe),Jc=q,q=0,0!=(0|Jc)&0!=(0|r)?(Kc=0|rw(0|f[Jc>>2],0|$e,0|_e),0==(0|Kc)&&Aa(0|Jc,0|r),F=r):Kc=-1,Lc=F,re=1==(0|Kc),!re)break;k=x,o=y,s=z,A=Lc,Ne=Pe}if(wc=0==(0|A)){if(f[b>>2]=oe,q=0,f[Re>>2]=0|f[c>>2],f[Re+4>>2]=0|f[c+4>>2],f[me>>2]=0|f[j>>2],f[me+4>>2]=0|f[j+4>>2],ka(131,0|B,0|b,0|Re,0|s,0|o,0|k,0|me),Hc=q,q=0,0!=(0|Hc)&0!=(0|r)?(Mc=0|rw(0|f[Hc>>2],0|$e,0|_e),0==(0|Mc)&&Aa(0|Hc,0|r),F=r):Mc=-1,Nc=F,te=1==(0|Mc)){Oe=Ne,t=s,p=o,n=k,A=Nc,Ne=Oe,s=t,o=p,k=n;continue}f[We>>2]=0|f[B>>2],f[We+4>>2]=0|f[B+4>>2],f[b>>2]=0,x=k,y=o,z=s,Pe=Ne,af=52}else{for(;;){if(Oc=b+12|0,Pc=0|f[Oc>>2],Qc=Pc+16|0,Sc=0|f[Qc>>2],Tc=b+12|0,Uc=0|f[Tc>>2],Vc=Uc+20|0,Wc=0|f[Vc>>2],Xc=Sc,Yc=Wc,Zc=Xc-Yc|0,$c=(0|Zc)/48&-1,_c=(0|Ne)<(0|$c),!_c)break;if(bd=b+12|0,cd=0|f[bd>>2],dd=cd+16|0,ed=0|f[dd>>2],fd=ed+8|0,gd=0|f[fd>>2],hd=b+12|0,id=0|f[hd>>2],jd=id+4|0,f[jd>>2]=gd,q=0,ma(132,0|b),kd=q,q=0,0!=(0|kd)&0!=(0|r)?(md=0|rw(0|f[kd>>2],0|$e,0|_e),0==(0|md)&&Aa(0|kd,0|r),F=r):md=-1,nd=F,se=1==(0|md)){Oe=Ne,t=s,p=o,n=k,A=nd,Ne=Oe,s=t,o=p,k=n;continue a}}f[b>>2]=0,od=b+20|0,pd=0|f[od>>2],q=0,na(133,0|C,0|pd),qd=q,q=0,0!=(0|qd)&0!=(0|r)?(rd=0|rw(0|f[qd>>2],0|$e,0|_e),0==(0|rd)&&Aa(0|qd,0|r),F=r):rd=-1,sd=F,qe=1==(0|rd),qe?(Oe=Ne,t=s,p=o,n=k,A=sd,Ne=Oe,s=t,o=p,k=n):(f[We>>2]=0|f[C>>2],f[We+4>>2]=0|f[C+4>>2],x=k,y=o,z=s,Pe=Ne,af=52)}}f[a>>2]=0|f[We>>2],f[a+4>>2]=0|f[We+4>>2],gw(0|$e),l=bf}function ak(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,Y=0;return Y=l,l=l+32|0,(0|l)>=(0|m)&&X(),b=a,c=b,q=c+12|0,B=0|f[q>>2],S=B,M=S,N=M+16|0,O=0|f[N>>2],P=O+24|0,Q=0|f[P>>2],(R=0!=(0|Q))?(d=S,e=d+16|0,g=0|f[e>>2],h=g+24|0,i=0|f[h>>2],T=i,j=T,k=0|f[j>>2],n=k>>>11,U=n,o=b,p=U,r=p<<3,s=0|Jc(o,r),V=s,t=T,u=t+20|0,f[u>>2]=-1,v=U,w=v>>>0>0,w&&(x=V,y=T,z=y+12|0,A=0|f[z>>2],C=U,bk(x,A,C)),D=V,E=T,F=E+12|0,f[F>>2]=D,G=b,H=T,Zc(G,H),I=S,J=I+16|0,K=0|f[J>>2],L=K+-48|0,f[J>>2]=L,void(l=Y)):(I=S,J=I+16|0,K=0|f[J>>2],L=K+-48|0,f[J>>2]=L,void(l=Y))}function bk(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;for(r=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,g=c;;){if(h=g,i=h+-1|0,g=i,j=h>>>0>0,!j)break;k=d,n=k+8|0,d=n,o=e,p=o+8|0,e=p,f[k>>2]=0|f[o>>2],f[k+4>>2]=0|f[o+4>>2]}l=r}function ck(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=0|f[d>>2],g=255&e,h=j+4|0,f[h>>2]=g,i=c,f[j>>2]=i,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function dk(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,ba=0;ba=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,q=c+12|0,B=0|f[q>>2],_=B,M=b,V=0|Lc(M,128,8),W=_,Y=W+8|0,f[Y>>2]=V,Z=_,$=Z+8|0,d=0|f[$>>2],e=d+1024|0,g=_,h=g+12|0,f[h>>2]=e,i=_,j=i+8|0,k=0|f[j>>2],n=_,o=n+4|0,f[o>>2]=k,p=b,r=0|Lc(p,32,48),s=_,t=s+20|0,f[t>>2]=r,u=_,v=u+20|0,w=0|f[v>>2],x=w+1536|0,y=_,z=y+24|0,f[z>>2]=x,A=_,C=A+20|0,D=0|f[C>>2],E=_,F=E+16|0,f[F>>2]=D,G=b,H=G+32|0,I=0|f[H>>2],J=_,K=J+16|0,L=0|f[K>>2],N=L+44|0,f[N>>2]=I,O=_,P=O+4|0,Q=0|f[P>>2],R=_,S=R+16|0,T=0|f[S>>2],U=T+8|0,f[U>>2]=Q,l=ba}function ek(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=3,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function fk(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,K=0;K=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,r=b+4|0,C=0|f[r>>2];a:do switch(0|C){case 0:if(D=0|f[b>>2],E=0!=(0|D),F=d,E){G=F+72|0,H=0|f[G>>2],c=H;break a}I=F+76|0,e=0|f[I>>2],c=e;break a;case 2:g=d,h=g+68|0,i=0|f[h>>2],c=i;break;case 4:j=d,k=j+80|0,n=0|f[k>>2],c=n;break;case 3:o=d,p=o+64|0,q=0|f[p>>2],c=q;break;case 6:s=d,t=s+60|0,u=0|f[t>>2],c=u;break;case 7:v=d,w=v+32|0,x=0|f[w>>2],c=x;break;case 20:c=0;break;default:y=0|f[b>>2],z=y+4|0,A=0|f[z>>2],c=A}while(0);return B=c,l=K,0|B}function gk(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ca=0;return Ca=l,l=l+32|0,(0|l)>=(0|m)&&X(),b=a,c=b,q=c+12|0,B=0|f[q>>2],wa=B,M=wa,Y=M+16|0,ha=0|f[Y>>2],xa=ha,sa=xa,ua=sa+20|0,va=0|f[ua>>2],ya=va,d=xa,e=d+16|0,g=0|f[e>>2],za=g,h=xa,i=h+48|0,j=wa,k=j+24|0,n=0|f[k>>2],o=(0|i)==(0|n),o&&(p=xa,r=wa,s=r+20|0,t=0|f[s>>2],u=p,v=t,w=u-v|0,x=(0|w)/48&-1,Aa=x,y=b,z=wa,A=z+20|0,C=0|f[A>>2],D=Aa,E=48*D|0,F=E<<1,G=0|Hc(y,C,F),H=wa,I=H+20|0,f[I>>2]=G,J=wa,K=J+20|0,L=0|f[K>>2],N=Aa,O=L+(48*N|0)|0,P=wa,Q=P+16|0,f[Q>>2]=O,R=wa,S=R+20|0,T=0|f[S>>2],U=Aa,V=U<<1,W=T+(48*V|0)|0,Z=wa,$=Z+24|0,f[$>>2]=W),_=wa,aa=_+16|0,ba=0|f[aa>>2],ca=ba+48|0,f[aa>>2]=ca,xa=ca,da=ya,ea=xa,fa=ea+20|0,f[fa>>2]=da,ga=za,ia=xa,ja=ia+16|0,f[ja>>2]=ga,ka=xa,la=ka+24|0,f[la>>2]=0,ma=xa,na=ma+28|0,f[na>>2]=0,oa=xa,pa=oa+32|0,f[pa>>2]=0,qa=xa,ra=qa+4|0,f[ra>>2]=0,ta=xa,l=Ca,0|ta}function hk(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0;return D=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,v=d,w=v+12|0,x=0|f[w>>2],y=x+4|0,z=0|f[y>>2],A=e,B=z+(A<<3)|0,g=d,h=g+12|0,i=0|f[h>>2],j=i+12|0,k=0|f[j>>2],(n=B>>>0>=k>>>0)?(o=d,p=e,q=s,ik(o,p,q),r=d,t=e,u=s,kk(r,t,u),void(l=D)):(r=d,t=e,u=s,kk(r,t,u),void(l=D))}function ik(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Ya=0;return Ya=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,D=d,O=D+12|0,$=0|f[O>>2],ja=$+8|0,ua=0|f[ja>>2],Va=ua,Fa=d,Qa=Fa+12|0,g=0|f[Qa>>2],h=g+12|0,i=0|f[h>>2],j=d,k=j+12|0,n=0|f[k>>2],o=n+8|0,p=0|f[o>>2],q=i,r=p,t=q-r|0,u=(0|t)/8&-1,Wa=u,v=d,w=v+12|0,x=0|f[w>>2],y=x+4|0,z=0|f[y>>2],A=d,B=A+12|0,C=0|f[B>>2],E=C+8|0,F=0|f[E>>2],G=z,H=F,I=G-H|0,J=(0|I)/8&-1,Ua=J,K=e,L=(0|K)<=128,L?(M=Wa,N=M+128|0,Wa=N):(P=e,Q=Wa,R=Q+P|0,Wa=R),S=d,T=d,U=T+12|0,V=0|f[U>>2],W=V+8|0,Y=0|f[W>>2],Z=Wa,_=Z<<3,aa=0|Hc(S,Y,_),ba=d,ca=ba+12|0,da=0|f[ca>>2],ea=da+8|0,f[ea>>2]=aa,fa=d,ga=fa+12|0,ha=0|f[ga>>2],ia=ha+8|0,ka=0|f[ia>>2],la=Ua,ma=ka+(la<<3)|0,na=d,oa=na+12|0,pa=0|f[oa>>2],qa=pa+4|0,f[qa>>2]=ma,ra=d,sa=ra+12|0,ta=0|f[sa>>2],va=ta+8|0,wa=0|f[va>>2],xa=Wa,ya=wa+(xa<<3)|0,za=d,Aa=za+12|0,Ba=0|f[Aa>>2],Ca=Ba+12|0,f[Ca>>2]=ya,Da=d,Ea=Va,Ga=d,Ha=Ga+12|0,Ia=0|f[Ha>>2],Ja=Ia+8|0,Ka=0|f[Ja>>2],jk(Da,Ea,Ka),La=Wa,(Ma=(0|La)>262016)?(Na=d,Oa=e,Pa=s,kk(Na,Oa,Pa),Ra=d,Sa=d,Ta=0|tp(Sa,67771),Br(Ra,Ta,56424),void 0):void(l=Ya)}function jk(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,la=0;if(la=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,D=d,O=D+12|0,$=0|f[O>>2],da=$+20|0,ea=0|f[da>>2],ha=ea,fa=s,ga=e,g=(0|fa)==(0|ga))return void(l=la);for(;;){if(h=ha,i=d,j=i+12|0,k=0|f[j>>2],n=k+16|0,o=0|f[n>>2],p=h>>>0<=o>>>0,!p)break;q=ha,r=q+24|0,t=0|f[r>>2],ia=t,u=ia,v=0!=(0|u),v&&(w=ia,x=w+20|0,y=0|f[x>>2],z=(0|y)>=0,z&&(A=ia,B=A+12|0,C=0|f[B>>2],E=e,F=C,G=E,H=F-G|0,I=(0|H)/8&-1,ja=I,J=s,K=ja,L=J+(K<<3)|0,M=ia,N=M+12|0,f[N>>2]=L)),P=s,Q=ha,R=Q+8|0,S=0|f[R>>2],T=e,U=S,V=T,W=U-V|0,Y=(0|W)/8&-1,Z=P+(Y<<3)|0,_=ha,aa=_+8|0,f[aa>>2]=Z,ba=ha,ca=ba+48|0,ha=ca}l=la}function kk(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,x=0;return x=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,o=c,p=e,q=o,(r=(0|p)>(0|q))?(s=o,t=d,u=t+12|0,v=0|f[u>>2],g=v+4|0,h=0|f[g>>2],i=h+(s<<3)|0,j=e,k=o,n=j-k|0,lk(i,n),void(l=x)):void(l=x)}function lk(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;for(n=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b;;){if(e=d,g=e+-1|0,d=g,h=e>>>0>0,!h)break;i=c,j=i+8|0,c=j,f[i>>2]=0|f[18288],f[i+4>>2]=0|f[18289]}l=n}function mk(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=4,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function nk(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;v=l,l=l+16|0,(0|l)>=(0|m)&&X(),t=v+8|0,e=b,g=c,j=e,k=g,n=e,o=n+12|0,p=0|f[o>>2],q=p+16|0,r=0|f[q>>2],s=r+36|0,h=0|f[s>>2],i=h+2|0,f[t>>2]=0|f[d>>2],f[t+4>>2]=0|f[d+4>>2],ok(a,j,k,t,i),l=v}function ok(a,b,c,d,g){a|=0,b|=0,c|=0,d|=0,g|=0;var h=0,i=0,k=0,n=0,o=0,p=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ka=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0,wf=0,xf=0,yf=0,zf=0,Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0,Gf=0,Hf=0,If=0,Jf=0,Kf=0,Lf=0,Mf=0,Nf=0,Of=0,Pf=0,Qf=0,Rf=0,Sf=0,Tf=0,Uf=0,Vf=0,Wf=0,Xf=0,Yf=0,Zf=0,$f=0,_f=0,ag=0,bg=0,cg=0,dg=0,eg=0,fg=0,gg=0,hg=0,ig=0,jg=0,kg=0,lg=0,mg=0,ng=0,og=0,pg=0,qg=0,rg=0,sg=0,tg=0,ug=0,vg=0,wg=0,xg=0,yg=0,zg=0,Ag=0,Bg=0,Cg=0,Dg=0,Eg=0,Fg=0,Gg=0,Hg=0,Ig=0,Jg=0,Kg=0,Lg=0,Mg=0,Ng=0,Og=0,Pg=0,Qg=0,Rg=0,Sg=0,Tg=0,Ug=0,Vg=0,Wg=0,Xg=0,Yg=0,Zg=0,$g=0,_g=0,ah=0,bh=0,ch=0,dh=0,eh=0,fh=0,gh=0,hh=0,ih=0,jh=0,kh=0,lh=0,mh=0,nh=0,oh=0,ph=0,qh=0,rh=0,sh=0,th=0,uh=0,vh=0,wh=0,xh=0,yh=0,zh=0,Ah=0,Bh=0,Ch=0,Dh=0,Eh=0,Fh=0,Gh=0,Hh=0,Ih=0,Jh=0,Kh=0,Lh=0,Mh=0,Nh=0,Oh=0,Ph=0,Qh=0,Rh=0,Sh=0,Th=0,Uh=0,Vh=0,Wh=0,Xh=0,Yh=0,Zh=0,$h=0,_h=0,ai=0,bi=0,ci=0,di=0,ei=0,fi=0,gi=0,hi=0,ii=0,ji=0,ki=0,li=0,mi=0,ni=0,oi=0,pi=0,qi=0,ri=0,si=0,ti=0,ui=0,vi=0,wi=0,xi=0,yi=0,zi=0,Ai=0,Bi=0,Ci=0,Di=0,Ei=0,Fi=0,Gi=0,Hi=0,Ii=0,Ji=0,Ki=0,Li=0,Mi=0,Ni=0,Oi=0,Pi=0,Qi=0,Ri=0,Si=0,Ti=0,Ui=0,Vi=0,Wi=0,Xi=0,Yi=0,Zi=0,$i=0,_i=0,aj=0,bj=0,cj=0,dj=0,ej=0,fj=0,gj=0,hj=0,ij=0,jj=0,kj=0,lj=0,mj=0,nj=0,oj=0,pj=0,qj=0,rj=0,sj=0,tj=0,uj=0,vj=0,wj=0,xj=0,yj=0,zj=0,Aj=0,Bj=0,Cj=0,Dj=0,Ej=0,Fj=0,Gj=0,Hj=0,Ij=0,Jj=0,Kj=0,Lj=0,Mj=0,Nj=0,Oj=0,Pj=0,Qj=0,Rj=0,Sj=0,Tj=0,Uj=0,Vj=0,Wj=0,Xj=0,Yj=0,Zj=0,$j=0,_j=0,ak=0,bk=0,ck=0,dk=0,ek=0,fk=0,gk=0,hk=0,ik=0,jk=0,kk=0,lk=0,mk=0,nk=0,ok=0,pk=0,qk=0,rk=0,sk=0,tk=0,uk=0,vk=0,wk=0,xk=0,yk=0,zk=0,Ak=0,Bk=0,Ck=0,Dk=0,Ek=0,Fk=0,Gk=0,Hk=0,Ik=0,Jk=0,Kk=0,Lk=0,Mk=0,Nk=0,Ok=0,Pk=0,Qk=0,Rk=0,Sk=0,Tk=0,Uk=0,Vk=0,Wk=0,Xk=0,Yk=0,Zk=0,$k=0,_k=0,al=0,bl=0,cl=0,dl=0,el=0,fl=0,gl=0,hl=0,il=0,jl=0,kl=0,ll=0,ml=0,nl=0,ol=0,pl=0,ql=0,rl=0,sl=0,tl=0,ul=0,vl=0,wl=0,xl=0,yl=0,zl=0,Al=0,Bl=0,Cl=0,Dl=0,El=0,Fl=0,Gl=0,Hl=0,Il=0,Jl=0,Kl=0,Ll=0,Ml=0,Nl=0,Ol=0,Pl=0,Ql=0,Rl=0,Sl=0,Tl=0,Ul=0,Vl=0,Wl=0,Xl=0,Yl=0,Zl=0,$l=0,_l=0,am=0,bm=0,cm=0,dm=0,em=0,fm=0,gm=0,hm=0,im=0,jm=0,km=0,lm=0,mm=0,nm=0,om=0,pm=0,qm=0,rm=0,sm=0,tm=0,um=0,vm=0,wm=0,xm=0,ym=0,zm=0,Am=0,Bm=0,Cm=0,Dm=0,Em=0,Fm=0,Gm=0,Hm=0,Im=0,Jm=0,Km=0,Lm=0,Mm=0,Nm=0,Om=0,Pm=0,Qm=0,Rm=0,Sm=0,Tm=0,Um=0,Vm=0,Wm=0,Xm=0,Ym=0,Zm=0,$m=0,_m=0,an=0,bn=0,cn=0,dn=0,en=0,fn=0,gn=0,hn=0,jn=0,kn=0,ln=0,mn=0,nn=0,on=0,pn=0,qn=0,rn=0,sn=0,tn=0,un=0,vn=0,wn=0,xn=0,yn=0,zn=0,An=0,Bn=0,Cn=0,Dn=0,En=0,Fn=0,Gn=0,Hn=0,In=0,Jn=0,Kn=0,Ln=0,Mn=0,Nn=0,On=0,Pn=0,Qn=0,Rn=0,Sn=0,Tn=0,Un=0,Vn=0,Wn=0,Xn=0,Yn=0,Zn=0,$n=0,_n=0,ao=0,bo=0,co=0,eo=0,fo=0,go=0,ho=0,io=0,jo=0,ko=0,lo=0,mo=0,no=0,oo=0,po=0,qo=0,ro=0,so=0,to=0,uo=0,vo=0,wo=0,xo=0,yo=0,zo=0,Ao=0,Bo=0,Co=0,Do=0,Eo=0,Fo=0,Go=0,Ho=0,Io=0,Jo=0,Ko=0,Lo=0,Mo=0,No=0,Oo=0,Po=0,Qo=0,Ro=0,So=0,To=0,Uo=0,Vo=0,Wo=0,Xo=0,Yo=0,Zo=0,$o=0,_o=0,ap=0,bp=0,cp=0,dp=0,ep=0,fp=0,gp=0,hp=0,ip=0,jp=0,kp=0,lp=0,mp=0,np=0,op=0,pp=0,qp=0,rp=0,sp=0,tp=0,up=0,vp=0,wp=0,xp=0,yp=0,zp=0,Ap=0,Bp=0,Cp=0,Dp=0,Ep=0,Fp=0,Gp=0,Hp=0,Ip=0,Jp=0,Kp=0,Lp=0,Mp=0,Np=0,Op=0,Pp=0,Qp=0,Rp=0,Sp=0,Tp=0,Up=0,Vp=0,Wp=0,Xp=0,Yp=0,Zp=0,$p=0,_p=0,aq=0,bq=0,cq=0,dq=0,eq=0,fq=0,gq=0,hq=0,iq=0,jq=0,kq=0,lq=0,mq=0,nq=0,oq=0,pq=0,qq=0,rq=0,sq=0,tq=0,uq=0,vq=0,wq=0,xq=0,yq=0,zq=0,Aq=0,Bq=0,Cq=0,Dq=0,Eq=0,Fq=0,Gq=0,Hq=0,Iq=0,Jq=0,Kq=0,Lq=0,Mq=0,Nq=0,Oq=0,Pq=0,Qq=0,Rq=0,Sq=0,Tq=0,Uq=0,Vq=0,Wq=0,Xq=0,Yq=0,Zq=0,$q=0,_q=0,ar=0,br=0,cr=0,dr=0,er=0,fr=0,gr=0,hr=0,ir=0,jr=0,kr=0,lr=0,mr=0,nr=0,or=0,pr=0,qr=0,rr=0,sr=0,tr=0,ur=0,vr=0,wr=0,xr=0,yr=0,zr=0,Ar=0,Br=0,Cr=0,Dr=0,Er=0,Fr=0,Gr=0,Hr=0,Ir=0,Jr=0,Kr=0,Lr=0,Mr=0,Nr=0,Or=0,Pr=0,Qr=0,Rr=0,Sr=0,Tr=0,Ur=0,Vr=0,Wr=0,Xr=0,Yr=0,Zr=0,$r=0,_r=0,as=0,bs=0,cs=0,ds=0,es=0,fs=0,gs=0,hs=0,is=0,js=0,ks=0,ls=0,ms=0,ns=0,os=0,ps=0,qs=0,rs=0,ss=0,ts=0,us=0,vs=0,ws=0,xs=0,ys=0,zs=0,As=0,Bs=0,Cs=0,Ds=0,Es=0,Fs=0,Gs=0,Hs=0,Is=0,Js=0,Ks=0,Ls=0,Ms=0,Ns=0,Os=0,Ps=0,Qs=0,Rs=0,Ss=0,Ts=0,Us=0,Vs=0,Ws=0,Xs=0,Ys=0,Zs=0,$s=0,_s=0,at=0,bt=0,ct=0,dt=0,et=0,ft=0,gt=0,ht=0,it=0,jt=0,kt=0,lt=0,mt=0,nt=0,ot=0,pt=0,qt=0,rt=0,st=0,tt=0,ut=0,vt=0,wt=0,xt=0,yt=0,zt=0,At=0,Bt=0,Ct=0,Dt=0,Et=0,Ft=0,Gt=0,Ht=0,It=0,Jt=0,Kt=0,Lt=0,Mt=0,Nt=0,Ot=0,Pt=0,Qt=0,Rt=0,St=0,Tt=0,Ut=0,Vt=0,Wt=0,Xt=0,Yt=0,Zt=0,$t=0,_t=0,au=0,bu=0,cu=0,du=0,eu=0,fu=0,gu=0,hu=0,iu=0,ju=0,ku=0,lu=0,mu=0,nu=0,ou=0,pu=0,qu=0,ru=0,su=0,tu=0,uu=0,vu=0,wu=0,xu=0,yu=0,zu=0,Au=0,Bu=0,Cu=0,Du=0,Eu=0,Fu=0,Gu=0,Hu=0,Iu=0,Ju=0,Ku=0,Lu=0,Mu=0,Nu=0,Ou=0,Pu=0,Qu=0,Ru=0,Su=0,Tu=0,Uu=0,Vu=0,Wu=0,Xu=0,Yu=0,Zu=0,$u=0,_u=0,av=0,bv=0,cv=0,dv=0,ev=0,fv=0,gv=0,hv=0,iv=0,jv=0,kv=0,lv=0,mv=0,nv=0,ov=0,pv=0,qv=0,rv=0,sv=0,tv=0,uv=0,vv=0,wv=0,xv=0,yv=0,zv=0,Av=0,Bv=0,Cv=0,Dv=0,Ev=0,Fv=0,Gv=0,Hv=0,Iv=0,Jv=0,Kv=0,Lv=0,Mv=0,Nv=0,Ov=0,Pv=0,Qv=0,Rv=0,Sv=0,Tv=0,Uv=0,Vv=0,Wv=0,Xv=0,Yv=0,Zv=0,$v=0,_v=0,aw=0,bw=0,cw=0,dw=0,ew=0,hw=0,iw=0,jw=0,kw=0,lw=0,mw=0,nw=0,ow=0,qw=0,sw=0,tw=0,uw=0,vw=0,ww=0,xw=0,yw=0,zw=0,Aw=0,Bw=0,Cw=0,Dw=0,Ew=0,Fw=0,Gw=0,Hw=0,Iw=0,Jw=0,Kw=0,Lw=0,Mw=0,Nw=0,Ow=0,Pw=0,Qw=0,Rw=0,Sw=0,Tw=0,Uw=0,Vw=0,Ww=0,Xw=0,Yw=0,Zw=0,$w=0,_w=0,ax=0,bx=0,cx=0,dx=0,ex=0,fx=0,gx=0,hx=0,ix=0,jx=0,kx=0,lx=0,mx=0,nx=0,ox=0,px=0,qx=0,rx=0,sx=0,tx=0,ux=0,vx=0,wx=0,xx=0,yx=0,zx=0,Ax=0,Bx=0,Cx=0,Dx=0,Ex=0,Fx=0,Gx=0,Hx=0,Ix=0,Jx=0,Kx=0,Lx=0,Mx=0,Nx=0,Ox=0,Px=0,Qx=0,Rx=0,Sx=0,Tx=0,Ux=0,Vx=0,Wx=0,Xx=0,Yx=0,Zx=0,$x=0,_x=0,ay=0,by=0,cy=0,dy=0,ey=0,fy=0,gy=0,hy=0,iy=0,jy=0,ky=0,ly=0,my=0,ny=0,oy=0,py=0,qy=0,ry=0,sy=0,ty=0,uy=0,vy=0,wy=0,xy=0,yy=0,zy=0,Ay=0,By=0,Cy=0,Dy=0,Ey=0,Fy=0,Gy=0,Hy=0,Iy=0,Jy=0,Ky=0,Ly=0,My=0,Ny=0,Oy=0,Py=0,Qy=0,Ry=0,Sy=0,Ty=0,Uy=0,Vy=0,Wy=0,Xy=0,Yy=0,Zy=0,$y=0,_y=0,az=0,bz=0,cz=0,dz=0,ez=0,fz=0,gz=0,hz=0,iz=0,jz=0,kz=0,lz=0,mz=0,nz=0,oz=0,pz=0,qz=0,rz=0,sz=0,tz=0,uz=0,vz=0,wz=0,xz=0,yz=0,zz=0,Az=0,Bz=0,Cz=0,Dz=0,Ez=0,Fz=0,Gz=0,Hz=0,Iz=0,Jz=0,Kz=0,Lz=0,Mz=0,Nz=0,Oz=0,Pz=0,Qz=0,Rz=0,Sz=0,Tz=0,Uz=0,Vz=0,Wz=0,Xz=0,Yz=0,Zz=0,$z=0,_z=0,aA=0,bA=0,cA=0,dA=0,eA=0,fA=0,gA=0,hA=0,iA=0,jA=0,kA=0,lA=0,mA=0,nA=0,oA=0,pA=0,qA=0,rA=0,sA=0,tA=0,uA=0,vA=0,wA=0,xA=0,yA=0,zA=0,AA=0,BA=0,CA=0,DA=0,EA=0,FA=0,GA=0,HA=0,IA=0,JA=0,KA=0,LA=0,MA=0,NA=0,OA=0,PA=0,QA=0,RA=0,SA=0,TA=0,UA=0,VA=0,WA=0,XA=0,YA=0,ZA=0,$A=0,_A=0,aB=0,bB=0,cB=0,dB=0,eB=0,fB=0,gB=0,hB=0,iB=0,jB=0,kB=0,lB=0,mB=0,nB=0,oB=0,pB=0,qB=0,rB=0,sB=0,tB=0,uB=0,vB=0,wB=0,xB=0,yB=0,zB=0,AB=0,BB=0,CB=0,DB=0,EB=0,FB=0,GB=0,HB=0,IB=0,JB=0,KB=0,LB=0,MB=0,NB=0,OB=0,PB=0,QB=0,RB=0,SB=0,TB=0,UB=0,VB=0,WB=0,XB=0,YB=0,ZB=0,$B=0,_B=0,aC=0,bC=0,cC=0,dC=0,eC=0,fC=0,gC=0,hC=0,iC=0,jC=0,kC=0,lC=0,mC=0,nC=0,oC=0,pC=0,qC=0,rC=0,sC=0,tC=0,uC=0,vC=0,wC=0,xC=0,yC=0,zC=0,AC=0,BC=0,CC=0,DC=0,EC=0,FC=0,GC=0,HC=0,IC=0,JC=0,KC=0,LC=0,MC=0,NC=0,OC=0,PC=0,QC=0,RC=0,SC=0,TC=0,UC=0,VC=0,WC=0,XC=0,YC=0,ZC=0,$C=0,_C=0,aD=0,bD=0,cD=0,dD=0,eD=0,fD=0,gD=0,hD=0,iD=0,jD=0,kD=0,lD=0,mD=0,nD=0,oD=0,pD=0,qD=0,rD=0,sD=0,tD=0,uD=0,vD=0,wD=0,xD=0,yD=0,zD=0,AD=0,BD=0,CD=0,DD=0,ED=0,FD=0,GD=0,HD=0,ID=0,JD=0,KD=0,LD=0,MD=0,ND=0,OD=0,PD=0,QD=0,RD=0,SD=0,TD=0,UD=0,VD=0,WD=0,XD=0,YD=0,ZD=0,$D=0,_D=0,aE=0,bE=0,cE=0,dE=0,eE=0,fE=0,gE=0,hE=0,iE=0,jE=0,kE=0,lE=0,mE=0,nE=0,oE=0,pE=0,qE=0,rE=0,sE=0,tE=0,uE=0,vE=0,wE=0,xE=0,yE=0,zE=0,AE=0,BE=0,CE=0,DE=0,EE=0,FE=0,GE=0,HE=0,IE=0,JE=0,KE=0,LE=0,ME=0,NE=0,OE=0,PE=0,QE=0,RE=0,SE=0,TE=0,UE=0,VE=0,WE=0,XE=0,YE=0,ZE=0,$E=0,_E=0,aF=0,bF=0,cF=0,dF=0,eF=0,fF=0,gF=0,hF=0,iF=0,jF=0,kF=0,lF=0,mF=0,nF=0,oF=0,pF=0,qF=0,rF=0,sF=0,tF=0,uF=0,vF=0,wF=0,xF=0,yF=0,zF=0,AF=0,BF=0,CF=0,DF=0,EF=0,FF=0,GF=0,HF=0,IF=0,JF=0,KF=0,LF=0,MF=0,NF=0,OF=0,PF=0,QF=0,RF=0,SF=0,TF=0,UF=0,VF=0,WF=0,XF=0,YF=0,ZF=0,$F=0,_F=0,aG=0,bG=0,cG=0,dG=0,eG=0,fG=0,gG=0,hG=0,iG=0,jG=0,kG=0,lG=0,mG=0,nG=0,oG=0,pG=0,qG=0,rG=0,sG=0,tG=0,uG=0,vG=0,wG=0,xG=0,yG=0,zG=0,AG=0,BG=0,CG=0,DG=0,EG=0,FG=0,GG=0,HG=0,IG=0,JG=0,KG=0,LG=0,MG=0,NG=0,OG=0,PG=0,QG=0,RG=0,SG=0,TG=0,UG=0,VG=0,WG=0,XG=0,YG=0,ZG=0,$G=0,_G=0,aH=0,bH=0,cH=0,dH=0,eH=0,fH=0,gH=0,hH=0,iH=0,jH=0,kH=0,lH=0,mH=0,nH=0,oH=0,pH=0,qH=0,rH=0,sH=0,tH=0,uH=0,vH=0,wH=0,xH=0,yH=0,zH=0,AH=0,BH=0,CH=0,DH=0,EH=0,FH=0,GH=0,HH=0,IH=0,JH=0,KH=0,LH=0,MH=0,NH=0,OH=0,PH=0,QH=0,RH=0,SH=0,TH=0,UH=0,VH=0,WH=0,XH=0,YH=0,ZH=0,$H=0,_H=0,aI=0,bI=0,cI=0,dI=0,eI=0,fI=0,gI=0,hI=0,iI=0,jI=0,kI=0,lI=0,mI=0,nI=0,oI=0,pI=0,qI=0,rI=0,sI=0,tI=0,uI=0,vI=0,wI=0,xI=0,yI=0,zI=0,AI=0,BI=0,CI=0,DI=0,EI=0,FI=0,GI=0,HI=0,II=0,JI=0,KI=0,LI=0,MI=0,NI=0,OI=0,PI=0,QI=0,RI=0,SI=0,TI=0,UI=0,VI=0,WI=0,XI=0,YI=0,ZI=0,$I=0,_I=0,aJ=0,bJ=0,cJ=0,dJ=0,eJ=0,fJ=0,gJ=0,hJ=0,iJ=0,jJ=0,kJ=0,lJ=0,mJ=0,nJ=0,oJ=0,pJ=0,qJ=0,rJ=0,sJ=0,tJ=0,uJ=0,vJ=0,wJ=0,xJ=0,yJ=0,zJ=0,AJ=0,BJ=0,CJ=0,DJ=0,EJ=0,FJ=0,GJ=0,HJ=0,IJ=0,JJ=0,KJ=0,LJ=0,MJ=0,NJ=0,OJ=0,PJ=0,QJ=0,RJ=0,SJ=0,TJ=0,UJ=0,VJ=0,WJ=0,XJ=0,YJ=0,ZJ=0,$J=0,_J=0,aK=0,bK=0,cK=0,dK=0,eK=0,fK=0,gK=0,hK=0,iK=0,jK=0,kK=0,lK=0,mK=0,nK=0,oK=0,pK=0,qK=0,rK=0,sK=0,tK=0,uK=0,vK=0,wK=0,xK=0,yK=0,zK=0,AK=0,BK=0,CK=0,DK=0,EK=0,FK=0,GK=0,HK=0,IK=0,JK=0,KK=0,LK=0,MK=0,NK=0,OK=0,PK=0,QK=0,RK=0,SK=0,TK=0,UK=0,VK=0,WK=0,XK=0,YK=0,ZK=0,$K=0,_K=0,aL=0,bL=0,cL=0,dL=0,eL=0,fL=0,gL=0,hL=0,iL=0,jL=0,kL=0,lL=0,mL=0,nL=0,oL=0,pL=0,qL=0,rL=0,sL=0,tL=0,uL=0,vL=0,wL=0,xL=0,yL=0,zL=0,AL=0,BL=0,CL=0,DL=0,EL=0,FL=0,GL=0,HL=0,IL=0,JL=0,KL=0,LL=0,ML=0,NL=0,OL=0,PL=0,QL=0,RL=0,SL=0,TL=0,UL=0,VL=0,WL=0,XL=0,YL=0,ZL=0,$L=0,_L=0,aM=0,bM=0,cM=0,dM=0,eM=0,fM=0,gM=0,hM=0,iM=0,jM=0,kM=0,lM=0,mM=0,nM=0,oM=0,pM=0,qM=0,rM=0,sM=0,tM=0,uM=0,vM=0,wM=0,xM=0,yM=0,zM=0,AM=0,BM=0,CM=0,DM=0,EM=0,FM=0,GM=0,HM=0,IM=0,JM=0,KM=0,LM=0,MM=0,NM=0,OM=0,PM=0,QM=0,RM=0,SM=0,TM=0,UM=0,VM=0,WM=0,XM=0,YM=0,ZM=0,$M=0,_M=0,aN=0,bN=0,cN=0,dN=0,eN=0,fN=0,gN=0,hN=0,iN=0,jN=0,kN=0,lN=0,mN=0,nN=0,oN=0,pN=0,qN=0,rN=0,sN=0,tN=0,uN=0,vN=0,wN=0,xN=0,yN=0,zN=0,AN=0,BN=0,CN=0,DN=0,EN=0,FN=0,GN=0,HN=0,IN=0,JN=0,KN=0,LN=0,MN=0,NN=0,ON=0,PN=0,QN=0,RN=0,SN=0,TN=0,UN=0,VN=0,WN=0,XN=0,YN=0,ZN=0,$N=0,_N=0,aO=0,bO=0,cO=0,dO=0,eO=0,fO=0,gO=0,hO=0,iO=0,jO=0,kO=0,lO=0,mO=0,nO=0,oO=0,pO=0,qO=0,rO=0,sO=0,tO=0,uO=0,vO=0,wO=0,xO=0,yO=0,zO=0,AO=0,BO=0,CO=0,DO=0,EO=0,FO=0,GO=0,HO=0,IO=0,JO=0,KO=0,LO=0,MO=0,NO=0,OO=0,PO=0,QO=0,RO=0,SO=0,TO=0,UO=0,VO=0,WO=0,XO=0,YO=0,ZO=0,$O=0,_O=0,aP=0,bP=0,cP=0,dP=0,eP=0,fP=0,gP=0,hP=0,iP=0,jP=0,kP=0,lP=0,mP=0,nP=0,oP=0,pP=0,qP=0,rP=0,sP=0,tP=0,uP=0,vP=0,wP=0,xP=0,yP=0,zP=0,AP=0,BP=0,CP=0,DP=0,EP=0,FP=0,GP=0,HP=0,IP=0,JP=0,KP=0,LP=0,MP=0,NP=0,OP=0,PP=0,QP=0,RP=0,SP=0,TP=0,UP=0,VP=0,WP=0,XP=0,YP=0,ZP=0,$P=0,_P=0,aQ=0,bQ=0,cQ=0,dQ=0,eQ=0,fQ=0,gQ=0,hQ=0,iQ=0,jQ=0,kQ=0,lQ=0,mQ=0,nQ=0,oQ=0,pQ=0,qQ=0,rQ=0,sQ=0,tQ=0,uQ=0,vQ=0,wQ=0,xQ=0,yQ=0,zQ=0,AQ=0,BQ=0,CQ=0,DQ=0,EQ=0,FQ=0,GQ=0,HQ=0,IQ=0,JQ=0,KQ=0,LQ=0,MQ=0,NQ=0,OQ=0,PQ=0,QQ=0,RQ=0,SQ=0,TQ=0,UQ=0,VQ=0,WQ=0,XQ=0,YQ=0,ZQ=0,$Q=0,_Q=0,aR=0,bR=0,cR=0,dR=0,eR=0,fR=0,gR=0,hR=0,iR=0,jR=0,kR=0,lR=0,mR=0,nR=0,oR=0,pR=0,qR=0,rR=0,sR=0,tR=0,uR=0,vR=0,wR=0,xR=0,yR=0,zR=0,AR=0,BR=0,CR=0,DR=0,ER=0,FR=0,GR=0,HR=0,IR=0,JR=0,KR=0,LR=0,MR=0,NR=0,OR=0,PR=0,QR=0,RR=0,SR=0,TR=0,UR=0,VR=0,WR=0,XR=0,YR=0,ZR=0,$R=0,_R=0,aS=0,bS=0,cS=0,dS=0,eS=0,fS=0,gS=0,hS=0,iS=0,jS=0,kS=0,lS=0,mS=0,nS=0,oS=0,pS=0,qS=0,rS=0,sS=0,tS=0,uS=0,vS=0,wS=0,xS=0,yS=0,zS=0,AS=0,BS=0,CS=0,DS=0,ES=0,FS=0,GS=0,HS=0,IS=0,JS=0,KS=0,LS=0,MS=0,NS=0,OS=0,PS=0,QS=0,RS=0,SS=0,TS=0,US=0,VS=0,WS=0,XS=0,YS=0,ZS=0,$S=0,_S=0,aT=0,bT=0,cT=0,dT=0,eT=0,fT=0,gT=0,hT=0,iT=0,jT=0,kT=0,lT=0,mT=0,nT=0,oT=0,pT=0,qT=0,rT=0,sT=0,tT=0,uT=0,vT=0,wT=0,xT=0,yT=0,zT=0,AT=0,BT=0,CT=0,DT=0,ET=0,FT=0,GT=0,HT=0,IT=0,JT=0,KT=0,LT=0,MT=0,NT=0,OT=0,PT=0,QT=0,RT=0,ST=0,TT=0,UT=0,VT=0,WT=0,XT=0,YT=0,ZT=0,$T=0,_T=0,aU=0,bU=0,cU=0,dU=0,eU=0,fU=0,gU=0,hU=0,iU=0,jU=0,kU=0,lU=0,mU=0,nU=0,oU=0,pU=0,qU=0,rU=0,sU=0,tU=0,uU=0,vU=0,wU=0,xU=0,yU=0,zU=0,AU=0,BU=0,CU=0,DU=0,EU=0,FU=0,GU=0,HU=0,IU=0,JU=0,KU=0,LU=0,MU=0,NU=0,OU=0,PU=0,QU=0,RU=0,SU=0,TU=0,UU=0,VU=0,WU=0,XU=0,YU=0,ZU=0,$U=0,_U=0,aV=0,bV=0,cV=0,dV=0,eV=0,fV=0,gV=0,hV=0,iV=0,jV=0,kV=0,lV=0,mV=0,nV=0,oV=0,pV=0,qV=0,rV=0,sV=0,tV=0,uV=0,vV=0,wV=0,xV=0,yV=0,zV=0,AV=0,BV=0,CV=0,DV=0,EV=0,FV=0,GV=0,HV=0,IV=0,JV=0,KV=0,LV=0,MV=0,NV=0,OV=0,PV=0,QV=0,RV=0,SV=0,TV=0,UV=0,VV=0,WV=0,XV=0,YV=0,ZV=0,$V=0,_V=0,aW=0,bW=0,cW=0,dW=0,eW=0,fW=0,gW=0,hW=0,iW=0,jW=0,kW=0,lW=0,mW=0,nW=0,oW=0,pW=0,qW=0,rW=0,sW=0,tW=0,uW=0,vW=0,wW=0,xW=0,yW=0,zW=0,AW=0,BW=0,CW=0,DW=0,EW=0,FW=0,GW=0,HW=0,IW=0,JW=0,KW=0,LW=0,MW=0,NW=0,OW=0,PW=0,QW=0,RW=0,SW=0,TW=0,UW=0,VW=0,WW=0,XW=0,YW=0,ZW=0,$W=0,_W=0,aX=0,bX=0,cX=0,dX=0,eX=0,fX=0,gX=0,hX=0,iX=0,jX=0,kX=0,lX=0,mX=0,nX=0,oX=0,pX=0,qX=0,rX=0,sX=0,tX=0,uX=0,vX=0,wX=0,xX=0,yX=0,zX=0,AX=0,BX=0,CX=0,DX=0,EX=0,FX=0,GX=0,HX=0,IX=0,JX=0,KX=0,LX=0,MX=0,NX=0,OX=0,PX=0,QX=0,RX=0,SX=0,TX=0,UX=0,VX=0,WX=0,XX=0,YX=0,ZX=0,$X=0,_X=0,aY=0,bY=0,cY=0,dY=0,eY=0,fY=0,gY=0,hY=0,iY=0,jY=0,kY=0,lY=0,mY=0,nY=0,oY=0,pY=0,qY=0,rY=0,sY=0,tY=0,uY=0,vY=0,wY=0,xY=0,yY=0,zY=0,AY=0,BY=0,CY=0,DY=0,EY=0,FY=0,GY=0,HY=0,IY=0,JY=0,KY=0,LY=0,MY=0,NY=0,OY=0,PY=0,QY=0,RY=0,SY=0,TY=0,UY=0,VY=0,WY=0,XY=0,YY=0,ZY=0,$Y=0,_Y=0,aZ=0,bZ=0,cZ=0,dZ=0,eZ=0,fZ=0,gZ=0,hZ=0,iZ=0,jZ=0,kZ=0,lZ=0,mZ=0,nZ=0,oZ=0,pZ=0,qZ=0,rZ=0,sZ=0,tZ=0,uZ=0,vZ=0,wZ=0,xZ=0,yZ=0,zZ=0,AZ=0,BZ=0,CZ=0,DZ=0,EZ=0,FZ=0,GZ=0,HZ=0,IZ=0,JZ=0,KZ=0,LZ=0,MZ=0,NZ=0,OZ=0,PZ=0,QZ=0,RZ=0,SZ=0,TZ=0,UZ=0,VZ=0,WZ=0,XZ=0,YZ=0,ZZ=0,$Z=0,_Z=0,a$=0,b$=0,c$=0,d$=0,e$=0,f$=0,g$=0,h$=0,i$=0,j$=0,k$=0,l$=0,m$=0,n$=0,o$=0,p$=0,q$=0,r$=0,s$=0,t$=0,u$=0,v$=0,w$=0,x$=0,y$=0,z$=0,A$=0,B$=0,C$=0,D$=0,E$=0,F$=0,G$=0,H$=0,I$=0,J$=0,K$=0,L$=0,M$=0,N$=0,O$=0,P$=0,Q$=0,R$=0,S$=0,T$=0,U$=0,V$=0,W$=0,X$=0,Y$=0,Z$=0,$$=0,_$=0,a_=0,b_=0,c_=0,d_=0,e_=0,f_=0,g_=0,h_=0,i_=0,j_=0,k_=0,l_=0,m_=0,n_=0,o_=0,p_=0,q_=0,r_=0,s_=0,t_=0,u_=0,v_=0,w_=0,x_=0,y_=0,z_=0,A_=0,B_=0,C_=0,D_=0,E_=0,F_=0,G_=0,H_=0,I_=0,J_=0,K_=0,L_=0,M_=0,N_=0,O_=0,P_=0,Q_=0,R_=0,S_=0,T_=0,U_=0,V_=0,W_=0,X_=0,Y_=0,Z_=0,$_=0,__=0,a0=0,b0=0,c0=0,d0=0,e0=0,f0=0,g0=0,h0=0,i0=0,j0=0,k0=0,l0=0,m0=0,n0=0,o0=0,p0=0,q0=0,r0=0,s0=0,t0=0,u0=0,v0=0,w0=0,x0=0,y0=0,z0=0,A0=0,B0=0,C0=0,D0=0,E0=0,F0=0,G0=0,H0=0,I0=0,J0=0,K0=0,L0=0,M0=0,N0=0,O0=0,P0=0,Q0=0,R0=0,S0=0,T0=0,U0=0,V0=0,W0=0,X0=0,Y0=0,Z0=0,$0=0,_0=0,a1=0,b1=0,c1=0,d1=0,e1=0,f1=0,g1=0,h1=0,i1=0,j1=0,k1=0,l1=0,m1=0,n1=0,o1=0,p1=0,q1=0,r1=0,s1=0,t1=0,u1=0,v1=0,w1=0,x1=0,y1=0,z1=0,A1=0,B1=0,C1=0,D1=0,E1=0,F1=0,G1=0,H1=0,I1=0,J1=0,K1=0,L1=0,M1=0,N1=0,O1=0,P1=0,Q1=0,R1=0,S1=0,T1=0,U1=0,V1=0,W1=0,X1=0,Y1=0,Z1=0,$1=0,_1=0,a2=0,b2=0,c2=0,d2=0,e2=0,f2=0,g2=0,h2=0,i2=0,j2=0,k2=0,l2=0,m2=0,n2=0,o2=0,p2=0,q2=0,r2=0,s2=0,t2=0,u2=0,v2=0,w2=0,x2=0,y2=0,z2=0,A2=0,B2=0,C2=0,D2=0,E2=0,F2=0,G2=0,H2=0,I2=0,J2=0,K2=0,L2=0,M2=0,N2=0,O2=0,P2=0,Q2=0,R2=0,S2=0,T2=0,U2=0,V2=0,W2=0,X2=0,Y2=0,Z2=0,$2=0,_2=0,a3=0,b3=0,c3=0,d3=0,e3=0,f3=0,g3=0,h3=0,i3=0,j3=0,k3=0,l3=0,m3=0,n3=0,o3=0,p3=0,q3=0,r3=0,s3=0,t3=0,u3=0,v3=0,w3=0,x3=0,y3=0,z3=0,A3=0,B3=0,C3=0,D3=0,E3=0,F3=0,G3=0,H3=0,I3=0,J3=0,K3=0,L3=0,M3=0,N3=0,O3=0,P3=0,Q3=0,R3=0,S3=0,T3=0,U3=0,V3=0,W3=0,X3=0,Y3=0,Z3=0,$3=0,_3=0,a4=0,b4=0,c4=0,d4=0,e4=0,f4=0,g4=0,h4=0,i4=0,j4=0,k4=0,l4=0,m4=0,n4=0,o4=0,p4=0,q4=0,r4=0,s4=0,t4=0,u4=0,v4=0,w4=0,x4=0,y4=0,z4=0,A4=0,B4=0,C4=0,D4=0,E4=0,F4=0,G4=0,H4=0,I4=0,J4=0,K4=0,L4=0,M4=0,N4=0,O4=0,P4=0,Q4=0,R4=0,S4=0,T4=0,U4=0,V4=0,W4=0,X4=0,Y4=0,Z4=0,$4=0,_4=0,a5=0,b5=0,c5=0,d5=0,e5=0,f5=0,g5=0,h5=0,i5=0,j5=0,k5=0,l5=0,m5=0,n5=0,o5=0,p5=0,q5=0,r5=0,s5=0,t5=0,u5=0,v5=0,w5=0,x5=0,y5=0,z5=0,A5=0,B5=0,C5=0,D5=0,E5=0,F5=0,G5=0,H5=0,I5=0,J5=0,K5=0,L5=0,M5=0,N5=0,O5=0,P5=0,Q5=0,R5=0,S5=0,T5=0,U5=0,V5=0,W5=0,X5=0,Y5=0,Z5=0,$5=0,_5=0,a6=0,b6=0,c6=0,d6=0,e6=0,f6=0,g6=0,h6=0,i6=0,j6=0,k6=0,l6=0,m6=0,n6=0,o6=0,p6=0,q6=0,r6=0,s6=0,t6=0,u6=0,v6=0,w6=0,x6=0,y6=0,z6=0,A6=0,B6=0,C6=0,D6=0,E6=0,F6=0,G6=0,H6=0,I6=0,J6=0,K6=0,L6=0,M6=0,N6=0,O6=0,P6=0,Q6=0,R6=0,S6=0,T6=0,U6=0,V6=0,W6=0,X6=0,Y6=0,Z6=0,$6=0,_6=0,a7=0,b7=0,c7=0,d7=0,e7=0,f7=0,g7=0,h7=0,i7=0,j7=0,k7=0,l7=0,m7=0,n7=0,o7=0,p7=0,q7=0,r7=0,s7=0,t7=0,u7=0,v7=0,w7=0,x7=0,y7=0,z7=0,A7=0,B7=0,C7=0,D7=0,E7=0,F7=0,G7=0,H7=0,I7=0,J7=0,K7=0,L7=0,M7=0,N7=0,O7=0,P7=0,Q7=0,R7=0,S7=0,T7=0,U7=0,V7=0,W7=0,X7=0,Y7=0,Z7=0,$7=0,_7=0,a8=0,b8=0,c8=0,d8=0,e8=0,f8=0,g8=0,h8=0,i8=0,j8=0,k8=0,l8=0,m8=0,n8=0,o8=0,p8=0,q8=0,r8=0,s8=0,t8=0,u8=0,v8=0,w8=0,x8=0,y8=0,z8=0,A8=0,B8=0,C8=0,D8=0,E8=0,F8=0,G8=0,H8=0,I8=0,J8=0,K8=0,L8=0,M8=0,N8=0,O8=0,P8=0,Q8=0,R8=0,S8=0,T8=0,U8=0,V8=0,W8=0,X8=0,Y8=0,Z8=0,$8=0,_8=0,a9=0,b9=0,c9=0,d9=0,e9=0,f9=0,g9=0,h9=0,i9=0,j9=0,k9=0,l9=0,m9=0,n9=0,o9=0,p9=0,q9=0,r9=0,s9=0,t9=0,u9=0,v9=0,w9=0,x9=0,y9=0,z9=0,A9=0,B9=0,C9=0,D9=0,E9=0,F9=0,G9=0,H9=0,I9=0,J9=0,K9=0,L9=0,M9=0,N9=0,O9=0,P9=0,Q9=0,R9=0,S9=0,T9=0,U9=0,V9=0,W9=0,X9=0,Y9=0,Z9=0,$9=0,_9=0,aaa=0,baa=0,caa=0,daa=0,eaa=0,faa=0,gaa=0,haa=0,iaa=0,jaa=0,kaa=0,laa=0,maa=0,naa=0,oaa=0,paa=0,qaa=0,raa=0,saa=0,taa=0,uaa=0,vaa=0,waa=0,xaa=0,yaa=0,zaa=0,Aaa=0,Baa=0,Caa=0,Daa=0,Eaa=0,Faa=0,Gaa=0,Haa=0,Iaa=0,Jaa=0,Kaa=0,Laa=0,Maa=0,Naa=0,Oaa=0,Paa=0,Qaa=0,Raa=0,Saa=0,Taa=0,Uaa=0,Vaa=0,Waa=0,Xaa=0,Yaa=0,Zaa=0,$aa=0,_aa=0,aba=0,bba=0,cba=0,dba=0,eba=0,fba=0,gba=0,hba=0,iba=0,jba=0,kba=0,lba=0,mba=0,nba=0,oba=0,pba=0,qba=0,rba=0,sba=0,tba=0,uba=0,vba=0,wba=0,xba=0,yba=0,zba=0,Aba=0,Bba=0,Cba=0,Dba=0,Eba=0,Fba=0,Gba=0,Hba=0,Iba=0,Jba=0,Kba=0,Lba=0,Mba=0,Nba=0,Oba=0,Pba=0,Qba=0,Rba=0,Sba=0,Tba=0,Uba=0,Vba=0,Wba=0,Xba=0,Yba=0,Zba=0,$ba=0,_ba=0,aca=0,bca=0,cca=0,dca=0,eca=0,fca=0,gca=0,hca=0,ica=0,jca=0,kca=0,lca=0,mca=0,nca=0,oca=0,pca=0,qca=0,rca=0,sca=0,tca=0,uca=0,vca=0,wca=0,xca=0,yca=0,zca=0,Aca=0,Bca=0,Cca=0,Dca=0,Eca=0,Fca=0,Gca=0,Hca=0,Ica=0,Jca=0,Kca=0,Lca=0,Mca=0,Nca=0,Oca=0,Pca=0,Qca=0,Rca=0,Sca=0,Tca=0,Uca=0,Vca=0,Wca=0,Xca=0,Yca=0,Zca=0,$ca=0,_ca=0,ada=0,bda=0,cda=0,dda=0,eda=0,fda=0,gda=0,hda=0,ida=0,jda=0,kda=0,lda=0,mda=0,nda=0,oda=0,pda=0,qda=0,rda=0,sda=0,tda=0,uda=0,vda=0,wda=0,xda=0,yda=0,zda=0,Ada=0,Bda=0,Cda=0,Dda=0,Eda=0,Fda=0;
+Fda=l,l=l+1328|0,(0|l)>=(0|m)&&X(),Rba=Fda+1312|0,Qba=Fda+1304|0,ya=Fda+1296|0,xa=Fda+1288|0,wa=Fda+1280|0,va=Fda+1272|0,ua=Fda+1264|0,Aca=Fda+1256|0,J7=Fda+1248|0,_ca=Fda+1240|0,H7=Fda+1232|0,ka=Fda+1224|0,ia=Fda+1216|0,oba=Fda+1208|0,ha=Fda+1200|0,ga=Fda+1192|0,fa=Fda+1184|0,ea=Fda+1176|0,da=Fda+1168|0,qda=Fda+1160|0,ca=Fda+1152|0,ba=Fda+1144|0,aa=Fda+1136|0,_=Fda+1128|0,$=Fda+1120|0,Z=Fda+1112|0,Y=Fda+1104|0,W=Fda+1096|0,V=Fda+1088|0,U=Fda+1080|0,T=Fda+1072|0,Hca=Fda+1064|0,dda=Fda+1056|0,S=Fda+1048|0,Gca=Fda+1040|0,R=Fda+1032|0,Q=Fda+1024|0,P=Fda+1016|0,O=Fda+1008|0,N=Fda+1e3|0,M=Fda+992|0,L=Fda+984|0,Eca=Fda+976|0,K=Fda+968|0,J=Fda+960|0,I=Fda+952|0,Cca=Fda+944|0,yca=Fda+936|0,bda=Fda+928|0,H=Fda+920|0,C7=Fda+912|0,xca=Fda+904|0,wca=Fda+896|0,G=Fda+888|0,E=Fda+880|0,D=Fda+872|0,C=Fda+864|0,B=Fda+856|0,A=Fda+848|0,z=Fda+840|0,y=Fda+832|0,uda=Fda,Dda=4,Cda=0|fw(40),f[Cda>>2]=0,N7=Fda+672|0,Ha=Fda+664|0,Ia=Fda+656|0,ov=Fda+648|0,XP=Fda+640|0,sda=Fda+632|0,cX=Fda+624|0,tda=Fda+616|0,fZ=Fda+608|0,i_=Fda+600|0,K7=Fda+592|0,vca=Fda+584|0,Rca=Fda+576|0,ada=Fda+568|0,B7=Fda+560|0,l1=Fda+552|0,o3=Fda+544|0,r5=Fda+536|0,Bca=Fda+528|0,Ja=Fda+520|0,Mc=Fda+512|0,Dca=Fda+504|0,L7=Fda+496|0,_aa=Fda+488|0,Pe=Fda+480|0,Tg=Fda+472|0,Wi=Fda+464|0,Zk=Fda+456|0,an=Fda+448|0,cba=Fda+440|0,fp=Fda+432|0,ir=Fda+424|0,lt=Fda+416|0,pv=Fda+408|0,wx=Fda+400|0,zz=Fda+392|0,CB=Fda+384|0,FD=Fda+376|0,IF=Fda+368|0,oda=Fda+360|0,dba=Fda+352|0,LH=Fda+344|0,M7=Fda+336|0,Fca=Fda+328|0,cda=Fda+320|0,OJ=Fda+312|0,RL=Fda+304|0,xda=Fda+296|0,UN=Fda+288|0,yda=Fda+280|0,zda=Fda+272|0,YP=Fda+264|0,Ada=Fda+260|0,Bda=Fda+256|0,_R=Fda+248|0,cU=Fda+240|0,pda=Fda+232|0,HV=Fda+224|0,rda=Fda+216|0,SV=Fda+208|0,bW=Fda+200|0,mW=Fda+192|0,xW=Fda+184|0,nba=Fda+176|0,IW=Fda+168|0,TW=Fda+160|0,G7=Fda+152|0,$ca=Fda+144|0,dX=Fda+136|0,oX=Fda+128|0,I7=Fda+120|0,zX=Fda+112|0,KX=Fda+104|0,zca=Fda+96|0,VX=Fda+88|0,eY=Fda+80|0,aba=Fda+72|0,pY=Fda+64|0,AY=Fda+56|0,LY=Fda+48|0,Pba=Fda+40|0,bba=Fda+32|0,WY=Fda+24|0,gZ=Fda+16|0,rZ=c+12|0,CZ=0|f[rZ>>2],NZ=CZ+8|0,YZ=0|f[NZ>>2],h$=CZ+12|0,s$=0|f[h$>>2],D$=CZ+16|0,O$=0|f[D$>>2],q=0,Z$=0|oa(145,0|b),j_=q,q=0,0!=(0|j_)&0!=(0|r)?(u_=0|rw(0|f[j_>>2],0|Cda,0|Dda),0==(0|u_)&&Aa(0|j_,0|r),F=r):u_=-1,F_=F,T7=1==(0|u_),T7?(i=c,Ga=F_,x7=0,fba=0,wba=CZ,$ba=YZ,hca=s$,tca=0,Jca=0,fda=O$):(Q_=0|f[b>>2],h=c,w7=Z$,eba=0,vba=CZ,Zba=YZ,gca=s$,sca=Q_,Ica=0,eda=O$,Eda=3);a:for(;;){if(3==(0|Eda)){if(Eda=0,Cda=0|pw(N7,1,0|Cda,0|Dda),Dda=F,q=0,__=q,q=0,0!=(0|__)&0!=(0|r)?(k0=0|rw(0|f[__>>2],0|Cda,0|Dda),0==(0|k0)&&Aa(0|__,0|r),F=r):k0=-1,v0=F,Taa=1==(0|k0)){i=h,Ga=v0,x7=w7,fba=eba,wba=vba,$ba=Zba,hca=gca,tca=sca,Jca=Ica,fda=eda;continue}i=h,Ga=0,x7=w7,fba=eba,wba=vba,$ba=Zba,hca=gca,tca=sca,Jca=Ica,fda=eda}if(G0=0==(0|Ga)){if(R0=fba<<24>>24!=0)s=i,hba=0,Bba=wba,bca=$ba,kca=hca,Lca=Jca,ida=fda,Eda=276;else{if(f[b>>2]=N7,a1=b+12|0,m1=0|f[a1>>2],x1=m1+4|0,I1=0|f[x1>>2],T1=0!=(0|I1),!T1&&(q=0,ma(134,0|b),c2=q,q=0,0!=(0|c2)&0!=(0|r)?(n2=0|rw(0|f[c2>>2],0|Cda,0|Dda),0==(0|n2)&&Aa(0|c2,0|r),F=r):n2=-1,y2=F,U7=1==(0|n2))){gda=fda,Kca=Jca,uca=tca,ica=hca,_ba=$ba,xba=wba,gba=fba,y7=x7,k=i,Ga=y2,fda=gda,Jca=Kca,tca=uca,hca=ica,$ba=_ba,wba=xba,fba=gba,x7=y7,i=k;continue}if(J2=wba+2|0,U2=0|e[J2>>1],d3=65535&U2,q=0,pa(142,0|b,0|d3,0|g),p3=q,q=0,0!=(0|p3)&0!=(0|r)?(A3=0|rw(0|f[p3>>2],0|Cda,0|Dda),0==(0|A3)&&Aa(0|p3,0|r),F=r):A3=-1,L3=F,V7=1==(0|A3)){gda=fda,Kca=Jca,uca=tca,ica=hca,_ba=$ba,xba=wba,gba=fba,y7=x7,k=i,Ga=L3,fda=gda,Jca=Kca,tca=uca,hca=ica,$ba=_ba,wba=xba,fba=gba,x7=y7,i=k;continue}W3=b+12|0,f4=0|f[W3>>2],q4=f4+16|0,B4=0|f[q4>>2],M4=B4+4|0,f[M4>>2]=i,X4=wba+2|0,g5=0|e[X4>>1],s5=65535&g5,D5=b+12|0,O5=0|f[D5>>2],Z5=O5+16|0,i6=0|f[Z5>>2],t6=i6+12|0,f[t6>>2]=s5,E6=b+12|0,P6=0|f[E6>>2],$6=P6+4|0,j7=0|f[$6>>2],f[j7>>2]=0|f[d>>2],f[j7+4>>2]=0|f[d+4>>2],Ka=0|f[$ba>>2],Va=127&Ka,eb=200+(Va<<2)|0,pb=0|f[eb>>2],w=i,za=pb,lba=fba,rba=Ka,Fba=wba,fca=$ba,oca=hca,Pca=j7,mda=fda,Eda=590}b:for(;;){if(276==(0|Eda)){if(Eda=0,hl=b+12|0,il=0|f[hl>>2],kl=il+16|0,ll=0|f[kl>>2],ml=b+20|0,nl=0|f[ml>>2],q=0,ol=0|ja(140,0|b,67980,6),pl=q,q=0,0!=(0|pl)&0!=(0|r)?(ql=0|rw(0|f[pl>>2],0|Cda,0|Dda),0==(0|ql)&&Aa(0|pl,0|r),F=r):ql=-1,rl=F,a8=1==(0|ql)){uca=tca,y7=x7,i=s,Ga=rl,fba=hba,wba=Bba,$ba=bca,hca=kca,Jca=Lca,fda=ida,tca=uca,x7=y7;continue a}if(q=0,pa(176,0|FD,0|b,0|bca),sl=q,q=0,0!=(0|sl)&0!=(0|r)?(tl=0|rw(0|f[sl>>2],0|Cda,0|Dda),0==(0|tl)&&Aa(0|sl,0|r),F=r):tl=-1,vl=F,b8=1==(0|tl)){uca=tca,y7=x7,i=s,Ga=vl,fba=hba,wba=Bba,$ba=bca,hca=kca,Jca=Lca,fda=ida,tca=uca,x7=y7;continue a}if(q=0,f[P>>2]=0|f[FD>>2],f[P+4>>2]=0|f[FD+4>>2],ta(177,0|b,0|nl,0|ol,0|P),wl=q,q=0,0!=(0|wl)&0!=(0|r)?(xl=0|rw(0|f[wl>>2],0|Cda,0|Dda),0==(0|xl)&&Aa(0|wl,0|r),F=r):xl=-1,yl=F,c8=1==(0|xl)){uca=tca,y7=x7,i=s,Ga=yl,fba=hba,wba=Bba,$ba=bca,hca=kca,Jca=Lca,fda=ida,tca=uca,x7=y7;continue a}if(zl=b+20|0,Al=0|f[zl>>2],q=0,Bl=0|ja(140,0|b,67505,5),Cl=q,q=0,0!=(0|Cl)&0!=(0|r)?(Dl=0|rw(0|f[Cl>>2],0|Cda,0|Dda),0==(0|Dl)&&Aa(0|Cl,0|r),F=r):Dl=-1,El=F,d8=1==(0|Dl)){uca=tca,y7=x7,i=s,Ga=El,fba=hba,wba=Bba,$ba=bca,hca=kca,Jca=Lca,fda=ida,tca=uca,x7=y7;continue a}if(Gl=b+12|0,Hl=0|f[Gl>>2],Il=Hl+20|0,Jl=0|f[Il>>2],Kl=ll,Ll=Jl,Ml=Kl-Ll|0,Nl=(0|Ml)/48&-1,q=0,na(136,0|IF,0|Nl),Ol=q,q=0,0!=(0|Ol)&0!=(0|r)?(Pl=0|rw(0|f[Ol>>2],0|Cda,0|Dda),0==(0|Pl)&&Aa(0|Ol,0|r),F=r):Pl=-1,Rl=F,e8=1==(0|Pl)){uca=tca,y7=x7,i=s,Ga=Rl,fba=hba,wba=Bba,$ba=bca,hca=kca,Jca=Lca,fda=ida,tca=uca,x7=y7;continue a}if(q=0,f[Q>>2]=0|f[IF>>2],f[Q+4>>2]=0|f[IF+4>>2],ta(177,0|b,0|Al,0|Bl,0|Q),Sl=q,q=0,0!=(0|Sl)&0!=(0|r)?(Tl=0|rw(0|f[Sl>>2],0|Cda,0|Dda),0==(0|Tl)&&Aa(0|Sl,0|r),F=r):Tl=-1,Ul=F,f8=1==(0|Tl)){uca=tca,y7=x7,i=s,Ga=Ul,fba=hba,wba=Bba,$ba=bca,hca=kca,Jca=Lca,fda=ida,tca=uca,x7=y7;continue a}Vl=ll+20|0,Wl=0|f[Vl>>2],Xl=b+12|0,Yl=0|f[Xl>>2],Zl=Yl+20|0,$l=0|f[Zl>>2],am=(0|ll)==(0|$l);c:do if(am){if(bm=ll+16|0,cm=0|f[bm>>2],dm=0==(0|cm)){v=s,kba=hba,Eba=Bba,eca=bca,nca=kca,Oca=Lca,lda=ida;break b}P7=ll}else{O7=ll,Waa=Wl;d:for(;;){if(em=O7+16|0,fm=0|f[em>>2],gm=O7+-48|0,hm=gm+16|0,im=0|f[hm>>2],jm=(0|fm)==(0|im),!jm){P7=O7;break c}if(q=0,ma(132,0|b),lm=q,q=0,0!=(0|lm)&0!=(0|r)?(mm=0|rw(0|f[lm>>2],0|Cda,0|Dda),0==(0|mm)&&Aa(0|lm,0|r),F=r):mm=-1,nm=F,g8=1==(0|mm)){uca=tca,y7=x7,i=s,Ga=nm,fba=hba,wba=Bba,$ba=bca,hca=kca,Jca=Lca,fda=ida,tca=uca,x7=y7;continue a}if(om=b+12|0,pm=0|f[om>>2],qm=pm+16|0,rm=0|f[qm>>2],sm=rm+48|0,tm=sm+8|0,um=0|f[tm>>2],wm=b+12|0,xm=0|f[wm>>2],ym=xm+4|0,f[ym>>2]=um,zm=rm+48|0,Am=zm+40|0,Bm=0|f[Am>>2],Cm=(0|Bm)==-1,Dm=0!=(0|tca),Xba=Cm&Dm){Eda=287;break b}if(Im=b+12|0,Jm=0|f[Im>>2],Km=Jm+20|0,Lm=0|f[Km>>2],Mm=(0|rm)==(0|Lm)){Yaa=Waa;break}if(ln=rm+16|0,mn=0|f[ln>>2],on=rm+-48|0,pn=on+16|0,qn=0|f[pn>>2],rn=(0|mn)==(0|qn))for(Zaa=Waa;;){if(sn=rm+-48|0,tn=sn+20|0,un=0|f[tn>>2],vn=(0|Zaa)>(0|un),!vn){O7=rm,Waa=Zaa;continue d}if(wn=Zaa+-1|0,q=0,na(166,0|b,0|wn),xn=q,q=0,0!=(0|xn)&0!=(0|r)?(zn=0|rw(0|f[xn>>2],0|Cda,0|Dda),0==(0|zn)&&Aa(0|xn,0|r),F=r):zn=-1,An=F,h8=1==(0|zn)){uca=tca,y7=x7,i=s,Ga=An,fba=hba,wba=Bba,$ba=bca,hca=kca,Jca=Lca,fda=ida,tca=uca,x7=y7;continue a}Zaa=wn}else Xaa=Waa,O7=rm,Waa=Xaa}for(;;){if(Nm=(0|Yaa)>0,!Nm)break;if(Om=Yaa+-1|0,q=0,na(166,0|b,0|Om),Pm=q,q=0,0!=(0|Pm)&0!=(0|r)?(Qm=0|rw(0|f[Pm>>2],0|Cda,0|Dda),0==(0|Qm)&&Aa(0|Pm,0|r),F=r):Qm=-1,Sm=F,i8=1==(0|Qm)){uca=tca,y7=x7,i=s,Ga=Sm,fba=hba,wba=Bba,$ba=bca,hca=kca,Jca=Lca,fda=ida,tca=uca,x7=y7;continue a}Yaa=Om}if(Tm=rm+16|0,Um=0|f[Tm>>2],Vm=0==(0|Um)){if(Wm=b+12|0,Xm=0|f[Wm>>2],Ym=b+16|0,Zm=0|f[Ym>>2],$m=(0|Xm)==(0|Zm),_m=b+12|0,cn=0|f[_m>>2],$m){Eda=294;break b}jn=0|f[cn>>2],kn=b+12|0,f[kn>>2]=jn,f[cn>>2]=0,jda=ida,Mca=Lca,lca=kca,cca=bca,Cba=Bba,iba=hba,t=s,ida=jda,Lca=Mca,kca=lca,bca=cca,Bba=Cba,hba=iba,s=t,Eda=276;continue b}P7=rm}while(0);if(Bn=P7+16|0,Cn=0|f[Bn>>2],Dn=0==(0|Cn)){v=s,kba=hba,Eba=Bba,eca=bca,nca=kca,Oca=Lca,lda=ida;break}En=P7+4|0,Fn=0|f[En>>2],Gn=Fn+12|0,Hn=0|f[Gn>>2],In=Hn+12|0,Kn=0|f[In>>2],Ln=Hn+16|0,Mn=0|f[Ln>>2],Nn=P7+48|0,On=Nn+8|0,Pn=0|f[On>>2],Qn=b+12|0,Rn=0|f[Qn>>2],Sn=Rn+4|0,f[Sn>>2]=Pn,Tn=P7+16|0,Vn=0|f[Tn>>2],Wn=Vn+-1|0,f[Tn>>2]=Wn,Xn=b+12|0,Yn=0|f[Xn>>2],Zn=Yn+28|0,$n=0|f[Zn>>2],_n=$n+(Wn<<2)|0,ao=0|f[_n>>2],u=Fn,jba=hba,Dba=Hn,dca=ao,mca=Kn,Nca=Pn,kda=Mn}else if(590==(0|Eda)){Eda=0,uba=za;c:do switch(0|uba){case 75:v=w,kba=lba,Eba=Fba,eca=fca,nca=oca,Oca=Pca,lda=mda;break b;case 1:Ab=fca+4|0,Lb=0|f[Ab>>2],Wb=127&Lb,fc=200+(Wb<<2)|0,qc=0|f[fc>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=qc,rba=Lb,fca=Ab,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 2:Bc=rba>>>23,Nc=511&Bc,Yc=Pca+(Nc<<3)|0,hd=rba>>>14,sd=511&hd,Dd=Pca+(sd<<3)|0,f[Yc>>2]=0|f[Dd>>2],f[Yc+4>>2]=0|f[Dd+4>>2],Od=fca+4|0,Zd=0|f[Od>>2],ie=127&Zd,te=200+(ie<<2)|0,Ee=0|f[te>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=Ee,rba=Zd,fca=Od,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 3:Qe=rba>>>23,_e=511&Qe,lf=Pca+(_e<<3)|0,wf=rba>>>7,Hf=65535&wf,Sf=oca+(Hf<<3)|0,f[lf>>2]=0|f[Sf>>2],f[lf+4>>2]=0|f[Sf+4>>2],bg=fca+4|0,mg=0|f[bg>>2],xg=127&mg,Ig=200+(xg<<2)|0,Ug=0|f[Ig>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=Ug,rba=mg,fca=bg,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 4:dh=rba>>>23,oh=511&dh,zh=Pca+(oh<<3)|0,Kh=zh+4|0,f[Kh>>2]=3,Vh=rba>>>7,ei=65535&Vh,pi=ei-32767|0,Ai=rba>>>23,Li=511&Ai,Xi=Pca+(Li<<3)|0,f[Xi>>2]=pi,gj=fca+4|0,rj=0|f[gj>>2],Cj=127&rj,Nj=200+(Cj<<2)|0,Yj=0|f[Nj>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=Yj,rba=rj,fca=gj,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 5:hk=rba>>>23,sk=511&hk,Dk=Pca+(sk<<3)|0,Ok=Dk+4|0,f[Ok>>2]=4,$k=rba>>>7,jl=65535&$k,ul=mda+(jl<<2)|0,Fl=0|f[ul>>2],Ql=rba>>>23,_l=511&Ql,km=Pca+(_l<<3)|0,f[km>>2]=Fl,vm=fca+4|0,Gm=0|f[vm>>2],Rm=127&Gm,bn=200+(Rm<<2)|0,nn=0|f[bn>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=nn,rba=Gm,fca=vm,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 6:i1=rba>>>23,j1=511&i1,k1=Pca+(j1<<3)|0,n1=k1+4|0,f[n1>>2]=0,o1=Pca+(j1<<3)|0,f[o1>>2]=0,p1=fca+4|0,q1=0|f[p1>>2],r1=127&q1,s1=200+(r1<<2)|0,t1=0|f[s1>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=t1,rba=q1,fca=p1,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 7:yn=rba>>>23,Jn=511&yn,Un=Pca+(Jn<<3)|0,f[Un>>2]=0|f[Pca>>2],f[Un+4>>2]=0|f[Pca+4>>2],eo=fca+4|0,po=0|f[eo>>2],Ao=127&po,Lo=200+(Ao<<2)|0,Wo=0|f[Lo>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=Wo,rba=po,fca=eo,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 8:gp=rba>>>23,rp=511&gp,Cp=Pca+(rp<<3)|0,Np=Cp+4|0,f[Np>>2]=2,Yp=rba>>>23,hq=511&Yp,sq=Pca+(hq<<3)|0,f[sq>>2]=1,Dq=fca+4|0,Oq=0|f[Dq>>2],Zq=127&Oq,jr=200+(Zq<<2)|0,ur=0|f[jr>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=ur,rba=Oq,fca=Dq,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 9:Fr=rba>>>23,Qr=511&Fr,_r=Pca+(Qr<<3)|0,ks=_r+4|0,f[ks>>2]=0,vs=rba>>>23,Gs=511&vs,Rs=Pca+(Gs<<3)|0,f[Rs>>2]=1,at=fca+4|0,mt=0|f[at>>2],xt=127&mt,It=200+(xt<<2)|0,Tt=0|f[It>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=Tt,rba=mt,fca=at,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 10:if(cu=rba>>>23,nu=511&cu,yu=Pca+(nu<<3)|0,Ju=rba>>>7,Uu=65535&Ju,dv=mda+(Uu<<2)|0,qv=0|f[dv>>2],q=0,pa(149,0|Ha,0|b,0|qv),Bv=q,q=0,0!=(0|Bv)&0!=(0|r)?(Mv=0|rw(0|f[Bv>>2],0|Cda,0|Dda),0==(0|Mv)&&Aa(0|Bv,0|r),F=r):Mv=-1,Xv=F,Saa=1==(0|Mv)){uca=tca,y7=x7,i=w,Ga=Xv,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[yu>>2]=0|f[Ha>>2],f[yu+4>>2]=0|f[Ha+4>>2],iw=fca+4|0,vw=0|f[iw>>2],Gw=127&vw,Rw=200+(Gw<<2)|0,ax=0|f[Rw>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=ax,rba=vw,fca=iw,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 11:if(lx=rba>>>7,xx=65535&lx,Ix=mda+(xx<<2)|0,Tx=0|f[Ix>>2],cy=rba>>>23,ny=511&cy,yy=Pca+(ny<<3)|0,q=0,f[y>>2]=0|f[yy>>2],f[y+4>>2]=0|f[yy+4>>2],pa(150,0|b,0|Tx,0|y),Jy=q,q=0,0!=(0|Jy)&0!=(0|r)?(Uy=0|rw(0|f[Jy>>2],0|Cda,0|Dda),0==(0|Uy)&&Aa(0|Jy,0|r),F=r):Uy=-1,dz=F,Raa=1==(0|Uy)){uca=tca,y7=x7,i=w,Ga=dz,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}oz=fca+4|0,Az=0|f[oz>>2],Lz=127&Az,Wz=200+(Lz<<2)|0,fA=0|f[Wz>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=fA,rba=Az,fca=oz,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 12:if(qA=rba>>>23,BA=511&qA,MA=Pca+(BA<<3)|0,XA=rba>>>7,gB=65535&XA,q=0,pa(151,0|Ia,0|b,0|gB),rB=q,q=0,0!=(0|rB)&0!=(0|r)?(DB=0|rw(0|f[rB>>2],0|Cda,0|Dda),0==(0|DB)&&Aa(0|rB,0|r),F=r):DB=-1,OB=F,Qaa=1==(0|DB)){uca=tca,y7=x7,i=w,Ga=OB,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[MA>>2]=0|f[Ia>>2],f[MA+4>>2]=0|f[Ia+4>>2],ZB=fca+4|0,iC=0|f[ZB>>2],tC=127&iC,EC=200+(tC<<2)|0,PC=0|f[EC>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=PC,rba=iC,fca=ZB,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 13:if($C=rba>>>7,jD=65535&$C,uD=rba>>>23,GD=511&uD,RD=Pca+(GD<<3)|0,q=0,f[z>>2]=0|f[RD>>2],f[z+4>>2]=0|f[RD+4>>2],pa(152,0|b,0|jD,0|z),aE=q,q=0,0!=(0|aE)&0!=(0|r)?(lE=0|rw(0|f[aE>>2],0|Cda,0|Dda),0==(0|lE)&&Aa(0|aE,0|r),F=r):lE=-1,wE=F,Paa=1==(0|lE)){uca=tca,y7=x7,i=w,Ga=wE,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}HE=fca+4|0,SE=0|f[HE>>2],bF=127&SE,mF=200+(bF<<2)|0,xF=0|f[mF>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=xF,rba=SE,fca=HE,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 14:if(JF=rba>>>23,UF=511&JF,dG=Pca+(UF<<3)|0,oG=rba>>>7,zG=65535&oG,KG=mda+(zG<<2)|0,VG=0|f[KG>>2],q=0,pa(153,0|ov,0|b,0|VG),eH=q,q=0,0!=(0|eH)&0!=(0|r)?(pH=0|rw(0|f[eH>>2],0|Cda,0|Dda),0==(0|pH)&&Aa(0|eH,0|r),F=r):pH=-1,AH=F,Oaa=1==(0|pH)){uca=tca,y7=x7,i=w,Ga=AH,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[dG>>2]=0|f[ov>>2],f[dG+4>>2]=0|f[ov+4>>2],MH=fca+4|0,XH=0|f[MH>>2],gI=127&XH,rI=200+(gI<<2)|0,CI=0|f[rI>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=CI,rba=XH,fca=MH,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 15:if(NI=rba>>>7,YI=65535&NI,hJ=mda+(YI<<2)|0,sJ=0|f[hJ>>2],DJ=rba>>>23,PJ=511&DJ,$J=Pca+(PJ<<3)|0,q=0,f[A>>2]=0|f[$J>>2],f[A+4>>2]=0|f[$J+4>>2],pa(154,0|b,0|sJ,0|A),jK=q,q=0,0!=(0|jK)&0!=(0|r)?(uK=0|rw(0|f[jK>>2],0|Cda,0|Dda),0==(0|uK)&&Aa(0|jK,0|r),F=r):uK=-1,FK=F,Naa=1==(0|uK)){uca=tca,y7=x7,i=w,Ga=FK,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}QK=fca+4|0,_K=0|f[QK>>2],kL=127&_K,vL=200+(kL<<2)|0,GL=0|f[vL>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=GL,rba=_K,fca=QK,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 16:if(SL=b+12|0,bM=0|f[SL>>2],mM=bM+16|0,xM=0|f[mM>>2],IM=xM+32|0,f[IM>>2]=fca,TM=rba>>>23,cN=511&TM,nN=Pca+(cN<<3)|0,yN=rba>>>7,JN=65535&yN,VN=mda+(JN<<2)|0,eO=0|f[VN>>2],q=0,pa(155,0|XP,0|b,0|eO),pO=q,q=0,0!=(0|pO)&0!=(0|r)?(AO=0|rw(0|f[pO>>2],0|Cda,0|Dda),0==(0|AO)&&Aa(0|pO,0|r),F=r):AO=-1,LO=F,Maa=1==(0|AO)){uca=tca,y7=x7,i=w,Ga=LO,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[nN>>2]=0|f[XP>>2],f[nN+4>>2]=0|f[XP+4>>2],WO=b+12|0,fP=0|f[WO>>2],qP=fP+16|0,BP=0|f[qP>>2],MP=BP+32|0,f[MP>>2]=0,ZP=fca+4|0,iQ=0|f[ZP>>2],tQ=127&iQ,EQ=200+(tQ<<2)|0,PQ=0|f[EQ>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=PQ,rba=iQ,fca=ZP,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 17:if($Q=rba>>>7,jR=65535&$Q,uR=mda+(jR<<2)|0,FR=0|f[uR>>2],QR=rba>>>23,aS=511&QR,lS=Pca+(aS<<3)|0,q=0,f[B>>2]=0|f[lS>>2],f[B+4>>2]=0|f[lS+4>>2],pa(156,0|b,0|FR,0|B),wS=q,q=0,0!=(0|wS)&0!=(0|r)?(HS=0|rw(0|f[wS>>2],0|Cda,0|Dda),0==(0|HS)&&Aa(0|wS,0|r),F=r):HS=-1,SS=F,Laa=1==(0|HS)){uca=tca,y7=x7,i=w,Ga=SS,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}bT=fca+4|0,mT=0|f[bT>>2],xT=127&mT,IT=200+(xT<<2)|0,TT=0|f[IT>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=TT,rba=mT,fca=bT,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 18:if(dU=b+12|0,oU=0|f[dU>>2],zU=oU+16|0,KU=0|f[zU>>2],VU=KU+32|0,f[VU>>2]=fca,eV=rba>>>7,pV=65535&eV,AV=mda+(pV<<2)|0,FV=0|f[AV>>2],q=0,pa(157,0|cX,0|b,0|FV),GV=q,q=0,0!=(0|GV)&0!=(0|r)?(IV=0|rw(0|f[GV>>2],0|Cda,0|Dda),0==(0|IV)&&Aa(0|GV,0|r),F=r):IV=-1,JV=F,Kaa=1==(0|IV)){uca=tca,y7=x7,i=w,Ga=JV,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[sda>>2]=0|f[cX>>2],f[sda+4>>2]=0|f[cX+4>>2],KV=b+12|0,LV=0|f[KV>>2],MV=LV+16|0,NV=0|f[MV>>2],OV=NV+32|0,f[OV>>2]=0,PV=b+12|0,QV=0|f[PV>>2],RV=QV+4|0,TV=0|f[RV>>2],UV=rba>>>23,VV=511&UV,WV=TV+(VV<<3)|0,f[WV>>2]=0|f[sda>>2],f[WV+4>>2]=0|f[sda+4>>2],XV=fca+4|0,YV=0|f[XV>>2],ZV=127&YV,$V=200+(ZV<<2)|0,_V=0|f[$V>>2],nda=mda,pca=oca,Gba=Fba,mba=lba,x=w,za=_V,rba=YV,fca=XV,Pca=TV,mda=nda,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 19:if(aW=rba>>>7,cW=65535&aW,dW=mda+(cW<<2)|0,eW=0|f[dW>>2],fW=rba>>>23,gW=511&fW,hW=Pca+(gW<<3)|0,q=0,f[C>>2]=0|f[hW>>2],f[C+4>>2]=0|f[hW+4>>2],pa(158,0|b,0|eW,0|C),iW=q,q=0,0!=(0|iW)&0!=(0|r)?(jW=0|rw(0|f[iW>>2],0|Cda,0|Dda),0==(0|jW)&&Aa(0|iW,0|r),F=r):jW=-1,kW=F,Jaa=1==(0|jW)){uca=tca,y7=x7,i=w,Ga=kW,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}lW=fca+4|0,nW=0|f[lW>>2],oW=127&nW,pW=200+(oW<<2)|0,qW=0|f[pW>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=qW,rba=nW,fca=lW,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 20:if(rW=rba>>>23,sW=511&rW,tW=b+12|0,uW=0|f[tW>>2],vW=uW+16|0,wW=0|f[vW>>2],yW=wW+32|0,f[yW>>2]=fca,zW=Pca+(sW<<3)|0,AW=rba>>>7,BW=65535&AW,CW=mda+(BW<<2)|0,DW=0|f[CW>>2],q=0,f[D>>2]=0|f[zW>>2],f[D+4>>2]=0|f[zW+4>>2],ta(159,0|fZ,0|b,0|D,0|DW),EW=q,q=0,0!=(0|EW)&0!=(0|r)?(FW=0|rw(0|f[EW>>2],0|Cda,0|Dda),0==(0|FW)&&Aa(0|EW,0|r),F=r):FW=-1,GW=F,Iaa=1==(0|FW)){uca=tca,y7=x7,i=w,Ga=GW,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[tda>>2]=0|f[fZ>>2],f[tda+4>>2]=0|f[fZ+4>>2],HW=b+12|0,JW=0|f[HW>>2],KW=JW+16|0,LW=0|f[KW>>2],MW=LW+32|0,f[MW>>2]=0,NW=b+12|0,OW=0|f[NW>>2],PW=OW+4|0,QW=0|f[PW>>2],RW=QW+(sW<<3)|0,f[RW>>2]=0|f[tda>>2],f[RW+4>>2]=0|f[tda+4>>2],SW=fca+4|0,UW=0|f[SW>>2],VW=127&UW,WW=200+(VW<<2)|0,XW=0|f[WW>>2],nda=mda,pca=oca,Gba=Fba,mba=lba,x=w,za=XW,rba=UW,fca=SW,Pca=QW,mda=nda,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 21:if(YW=rba>>>23,ZW=511&YW,$W=ZW+1|0,_W=Pca+($W<<3)|0,aX=rba>>>7,bX=65535&aX,eX=mda+(bX<<2)|0,fX=0|f[eX>>2],gX=Pca+(ZW<<3)|0,q=0,f[E>>2]=0|f[_W>>2],f[E+4>>2]=0|f[_W+4>>2],f[G>>2]=0|f[gX>>2],f[G+4>>2]=0|f[gX+4>>2],ta(160,0|b,0|E,0|fX,0|G),hX=q,q=0,0!=(0|hX)&0!=(0|r)?(iX=0|rw(0|f[hX>>2],0|Cda,0|Dda),0==(0|iX)&&Aa(0|hX,0|r),F=r):iX=-1,jX=F,Haa=1==(0|iX)){uca=tca,y7=x7,i=w,Ga=jX,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}kX=fca+4|0,lX=0|f[kX>>2],mX=127&lX,nX=200+(mX<<2)|0,pX=0|f[nX>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=pX,rba=lX,fca=kX,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 22:if(qX=rba>>>23,rX=511&qX,sX=Pca+(rX<<3)|0,tX=rba>>>7,uX=127&tX,q=0,vX=0|sa(161,0|b,0|uX),wX=q,q=0,0!=(0|wX)&0!=(0|r)?(xX=0|rw(0|f[wX>>2],0|Cda,0|Dda),0==(0|xX)&&Aa(0|wX,0|r),F=r):xX=-1,yX=F,Faa=1==(0|xX)){uca=tca,y7=x7,i=w,Ga=yX,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(AX=0!=(0|vX))EX=rba>>>14,FX=511&EX,GX=vX+12|0,HX=0|f[GX>>2],IX=HX+(FX<<3)|0,f[sX>>2]=0|f[IX>>2],f[sX+4>>2]=0|f[IX+4>>2];else{if(q=0,ma(162,0|i_),BX=q,q=0,0!=(0|BX)&0!=(0|r)?(CX=0|rw(0|f[BX>>2],0|Cda,0|Dda),0==(0|CX)&&Aa(0|BX,0|r),F=r):CX=-1,DX=F,Gaa=1==(0|CX)){uca=tca,y7=x7,i=w,Ga=DX,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[sX>>2]=0|f[i_>>2],f[sX+4>>2]=0|f[i_+4>>2]}JX=fca+4|0,LX=0|f[JX>>2],MX=127&LX,NX=200+(MX<<2)|0,OX=0|f[NX>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=OX,rba=LX,fca=JX,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 23:if(PX=rba>>>7,QX=127&PX,q=0,RX=0|sa(161,0|b,0|QX),SX=q,q=0,0!=(0|SX)&0!=(0|r)?(TX=0|rw(0|f[SX>>2],0|Cda,0|Dda),0==(0|TX)&&Aa(0|SX,0|r),F=r):TX=-1,UX=F,Daa=1==(0|TX)){uca=tca,y7=x7,i=w,Ga=UX,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(WX=0!=(0|RX),WX&&(XX=rba>>>23,YX=511&XX,ZX=Pca+(YX<<3)|0,$X=rba>>>14,_X=511&$X,aY=RX+12|0,bY=0|f[aY>>2],cY=bY+(_X<<3)|0,f[cY>>2]=0|f[ZX>>2],f[cY+4>>2]=0|f[ZX+4>>2],q=0,na(163,0|b,0|RX),dY=q,q=0,0!=(0|dY)&0!=(0|r)?(fY=0|rw(0|f[dY>>2],0|Cda,0|Dda),0==(0|fY)&&Aa(0|dY,0|r),F=r):fY=-1,gY=F,Eaa=1==(0|fY))){uca=tca,y7=x7,i=w,Ga=gY,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}hY=fca+4|0,iY=0|f[hY>>2],jY=127&iY,kY=200+(jY<<2)|0,lY=0|f[kY>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=lY,rba=iY,fca=hY,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 24:mY=rba>>>7,nY=65535&mY,oY=nY-32767|0,qY=fca+(oY<<2)|0,rY=0|f[qY>>2],sY=127&rY,tY=200+(sY<<2)|0,uY=0|f[tY>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=uY,rba=rY,fca=qY,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 25:if(vY=rba>>>23,wY=511&vY,xY=Pca+(wY<<3)|0,yY=xY+4|0,zY=0|f[yY>>2],BY=0!=(0|zY)){CY=rba>>>7,DY=65535&CY,EY=DY-32767|0,FY=fca+(EY<<2)|0,GY=0|f[FY>>2],HY=127&GY,IY=200+(HY<<2)|0,JY=0|f[IY>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=JY,rba=GY,fca=FY,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b}KY=fca+4|0,MY=0|f[KY>>2],NY=127&MY,OY=200+(NY<<2)|0,PY=0|f[OY>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=PY,rba=MY,fca=KY,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 26:if(QY=rba>>>23,RY=511&QY,SY=Pca+(RY<<3)|0,TY=SY+4|0,UY=0|f[TY>>2],VY=0!=(0|UY)){dZ=fca+4|0,eZ=0|f[dZ>>2],hZ=127&eZ,iZ=200+(hZ<<2)|0,jZ=0|f[iZ>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=jZ,rba=eZ,fca=dZ,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b}XY=rba>>>7,YY=65535&XY,ZY=YY-32767|0,$Y=fca+(ZY<<2)|0,_Y=0|f[$Y>>2],aZ=127&_Y,bZ=200+(aZ<<2)|0,cZ=0|f[bZ>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=cZ,rba=_Y,fca=$Y,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 27:if(kZ=b+12|0,lZ=0|f[kZ>>2],mZ=lZ+32|0,nZ=0|f[mZ>>2],oZ=b+12|0,pZ=0|f[oZ>>2],qZ=pZ+16|0,sZ=0|f[qZ>>2],tZ=sZ+16|0,uZ=0|f[tZ>>2],vZ=(0|nZ)<=(0|uZ)){if(wZ=b+12|0,xZ=0|f[wZ>>2],yZ=xZ+32|0,zZ=0|f[yZ>>2],AZ=0==(0|zZ),BZ=b+12|0,DZ=0|f[BZ>>2],EZ=DZ+32|0,AZ?f[EZ>>2]=16:(FZ=0|f[EZ>>2],GZ=FZ<<1,f[EZ>>2]=GZ),HZ=b+12|0,IZ=0|f[HZ>>2],JZ=IZ+28|0,KZ=0|f[JZ>>2],LZ=b+12|0,MZ=0|f[LZ>>2],OZ=MZ+32|0,PZ=0|f[OZ>>2],QZ=PZ<<2,q=0,RZ=0|ja(164,0|b,0|KZ,0|QZ),SZ=q,q=0,0!=(0|SZ)&0!=(0|r)?(TZ=0|rw(0|f[SZ>>2],0|Cda,0|Dda),0==(0|TZ)&&Aa(0|SZ,0|r),F=r):TZ=-1,UZ=F,Caa=1==(0|TZ)){uca=tca,y7=x7,i=w,Ga=UZ,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}VZ=b+12|0,WZ=0|f[VZ>>2],XZ=WZ+28|0,f[XZ>>2]=RZ}ZZ=rba>>>7,$Z=65535&ZZ,_Z=$Z-32767|0,a$=fca+(_Z<<2)|0,b$=b+12|0,c$=0|f[b$>>2],d$=c$+16|0,e$=0|f[d$>>2],f$=e$+16|0,g$=0|f[f$>>2],i$=g$+1|0,f[f$>>2]=i$,j$=b+12|0,k$=0|f[j$>>2],l$=k$+28|0,m$=0|f[l$>>2],n$=m$+(g$<<2)|0,f[n$>>2]=a$,o$=fca+4|0,p$=0|f[o$>>2],q$=127&p$,r$=200+(q$<<2)|0,t$=0|f[r$>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=t$,rba=p$,fca=o$,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 28:u$=b+20|0,v$=0|f[u$>>2],w$=0|f[v$>>2],x$=255&w$,y$=rba>>>23,z$=511&y$,A$=Pca+(z$<<3)|0,B$=A$+4|0,f[B$>>2]=x$,C$=b+20|0,E$=0|f[C$>>2],F$=rba>>>23,G$=511&F$,H$=Pca+(G$<<3)|0,f[H$>>2]=E$,I$=b+20|0,f[I$>>2]=0,J$=fca+4|0,K$=0|f[J$>>2],L$=127&K$,M$=200+(L$<<2)|0,N$=0|f[M$>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=N$,rba=K$,fca=J$,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 29:for(P$=rba>>>23,Q$=511&P$,u7=Q$;;){if(R$=u7+-1|0,S$=0!=(0|u7),!S$)break;T$=b+12|0,U$=0|f[T$>>2],V$=U$+16|0,W$=0|f[V$>>2],X$=W$+16|0,Y$=0|f[X$>>2],$$=Y$+-1|0,f[X$>>2]=$$,u7=R$}_$=fca+4|0,a_=0|f[_$>>2],b_=127&a_,c_=200+(b_<<2)|0,d_=0|f[c_>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=d_,rba=a_,fca=_$,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 30:e_=rba>>>23,f_=511&e_,g_=Pca+(f_<<3)|0,h_=0|f[g_>>2],k_=b+20|0,f[k_>>2]=h_,s=w,hba=lba,Bba=Fba,bca=fca,kca=oca,Lca=Pca,ida=mda,Eda=276;continue b;case 31:if(l_=rba>>>7,m_=65535&l_,n_=Fba+20|0,o_=0|f[n_>>2],p_=o_+(m_<<2)|0,q_=0|f[p_>>2],q=0,r_=0|sa(165,0|b,0|q_),s_=q,q=0,0!=(0|s_)&0!=(0|r)?(t_=0|rw(0|f[s_>>2],0|Cda,0|Dda),0==(0|t_)&&Aa(0|s_,0|r),F=r):t_=-1,v_=F,Aaa=1==(0|t_)){uca=tca,y7=x7,i=w,Ga=v_,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(w_=b+12|0,x_=0|f[w_>>2],y_=x_+40|0,z_=0|f[y_>>2],A_=b+12|0,B_=0|f[A_>>2],C_=B_+16|0,D_=0|f[C_>>2],E_=D_+20|0,G_=0|f[E_>>2],H_=(0|z_)<=(0|G_)){if(I_=b+12|0,J_=0|f[I_>>2],K_=J_+40|0,L_=0|f[K_>>2],M_=0==(0|L_),N_=b+12|0,O_=0|f[N_>>2],P_=O_+40|0,M_?f[P_>>2]=16:(R_=0|f[P_>>2],S_=R_<<1,f[P_>>2]=S_),T_=b+12|0,U_=0|f[T_>>2],V_=U_+36|0,W_=0|f[V_>>2],X_=b+12|0,Y_=0|f[X_>>2],Z_=Y_+40|0,$_=0|f[Z_>>2],a0=$_<<2,q=0,b0=0|ja(164,0|b,0|W_,0|a0),c0=q,q=0,0!=(0|c0)&0!=(0|r)?(d0=0|rw(0|f[c0>>2],0|Cda,0|Dda),0==(0|d0)&&Aa(0|c0,0|r),F=r):d0=-1,e0=F,Baa=1==(0|d0)){uca=tca,y7=x7,i=w,Ga=e0,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f0=b+12|0,g0=0|f[f0>>2],h0=g0+36|0,f[h0>>2]=b0}i0=b+12|0,j0=0|f[i0>>2],l0=j0+16|0,m0=0|f[l0>>2],n0=m0+20|0,o0=0|f[n0>>2],p0=o0+1|0,f[n0>>2]=p0,q0=b+12|0,r0=0|f[q0>>2],s0=r0+36|0,t0=0|f[s0>>2],u0=t0+(o0<<2)|0,f[u0>>2]=r_,w0=b+92|0,x0=w0+416|0,f[x0>>2]=x7,y0=fca+4|0,z0=0|f[y0>>2],A0=127&z0,B0=200+(A0<<2)|0,C0=0|f[B0>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=C0,rba=z0,fca=y0,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 32:for(D0=rba>>>23,E0=511&D0,F0=b+12|0,H0=0|f[F0>>2],I0=H0+16|0,J0=0|f[I0>>2],K0=J0+20|0,L0=0|f[K0>>2],Uaa=L0,Sba=0;;){if(M0=(0|Sba)<(0|E0),!M0)break;if(N0=b+12|0,O0=0|f[N0>>2],P0=O0+20|0,Q0=0|f[P0>>2],S0=(0|J0)==(0|Q0),!S0&&(T0=J0+-48|0,U0=T0+20|0,V0=0|f[U0>>2],W0=(0|Uaa)>(0|V0),!W0))break;if(X0=Uaa+-1|0,q=0,na(166,0|b,0|X0),Y0=q,q=0,0!=(0|Y0)&0!=(0|r)?(Z0=0|rw(0|f[Y0>>2],0|Cda,0|Dda),0==(0|Z0)&&Aa(0|Y0,0|r),F=r):Z0=-1,$0=F,zaa=1==(0|Z0)){uca=tca,y7=x7,i=w,Ga=$0,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}_0=b+92|0,b1=_0+416|0,f[b1>>2]=x7,c1=Sba+1|0,Uaa=X0,Sba=c1}d1=fca+4|0,e1=0|f[d1>>2],f1=127&e1,g1=200+(f1<<2)|0,h1=0|f[g1>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=h1,rba=e1,fca=d1,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 33:pba=rba,Eda=92;break;case 34:if(dV=rba>>>7,fV=65535&dV,gV=oca+(fV<<3)|0,q=0,f[ya>>2]=0|f[gV>>2],f[ya+4>>2]=0|f[gV+4>>2],pa(191,0|Pba,0|b,0|ya),hV=q,q=0,0!=(0|hV)&0!=(0|r)?(iV=0|rw(0|f[hV>>2],0|Cda,0|Dda),0==(0|iV)&&Aa(0|hV,0|r),F=r):iV=-1,jV=F,faa=1==(0|iV)){uca=tca,y7=x7,i=w,Ga=jV,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(kV=rba>>>23,lV=511&kV,mV=0==(0|lV)){if(q=0,nV=0|sa(135,0|b,67967),oV=q,q=0,0!=(0|oV)&0!=(0|r)?(qV=0|rw(0|f[oV>>2],0|Cda,0|Dda),0==(0|qV)&&Aa(0|oV,0|r),F=r):qV=-1,rV=F,iaa=1==(0|qV)){uca=tca,y7=x7,i=w,Ga=rV,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(q=0,f[Qba>>2]=0|f[Pba>>2],f[Qba+4>>2]=0|f[Pba+4>>2],ta(172,0|WY,0|b,0|nV,0|Qba),sV=q,q=0,0!=(0|sV)&0!=(0|r)?(tV=0|rw(0|f[sV>>2],0|Cda,0|Dda),0==(0|tV)&&Aa(0|sV,0|r),F=r):tV=-1,uV=F,jaa=1==(0|tV)){uca=tca,y7=x7,i=w,Ga=uV,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[bba>>2]=0|f[WY>>2],f[bba+4>>2]=0|f[WY+4>>2]}else{if(q=0,vV=0|sa(135,0|b,56627),wV=q,q=0,0!=(0|wV)&0!=(0|r)?(xV=0|rw(0|f[wV>>2],0|Cda,0|Dda),0==(0|xV)&&Aa(0|wV,0|r),F=r):xV=-1,yV=F,gaa=1==(0|xV)){uca=tca,y7=x7,i=w,Ga=yV,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(q=0,f[Rba>>2]=0|f[Pba>>2],f[Rba+4>>2]=0|f[Pba+4>>2],ta(172,0|gZ,0|b,0|vV,0|Rba),zV=q,q=0,0!=(0|zV)&0!=(0|r)?(BV=0|rw(0|f[zV>>2],0|Cda,0|Dda),0==(0|BV)&&Aa(0|zV,0|r),F=r):BV=-1,CV=F,haa=1==(0|BV)){uca=tca,y7=x7,i=w,Ga=CV,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[bba>>2]=0|f[gZ>>2],f[bba+4>>2]=0|f[gZ+4>>2]}DV=0|f[bba>>2],EV=b+20|0,f[EV>>2]=DV,s=w,hba=lba,Bba=Fba,bca=fca,kca=oca,Lca=Pca,ida=mda,Eda=276;continue b;case 35:z5=fca+4|0,A5=0|f[z5>>2],B5=127&A5,C5=200+(B5<<2)|0,E5=0|f[C5>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=E5,rba=A5,fca=z5,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 36:if(F5=b+12|0,G5=0|f[F5>>2],H5=G5+4|0,I5=0|f[H5>>2],f[Bca>>2]=0|f[I5>>2],f[Bca+4>>2]=0|f[I5+4>>2],J5=0|f[Bca>>2],K5=b+12|0,L5=0|f[K5>>2],M5=L5+16|0,N5=0|f[M5>>2],P5=J5+16|0,Q5=0|f[P5>>2],R5=N5+44|0,f[R5>>2]=Q5,S5=N5+4|0,f[S5>>2]=J5,T5=J5+20|0,U5=0|f[T5>>2],V5=0!=(0|U5),V5&&(W5=J5+20|0,X5=0|f[W5>>2],Y5=X5+16|0,$5=0|f[Y5>>2],_5=0!=(0|$5),_5&&(a6=J5+20|0,b6=0|f[a6>>2],c6=b6+16|0,d6=0|f[c6>>2],f[N5>>2]=d6),e6=J5+20|0,f6=0|f[e6>>2],g6=f6+12|0,h6=0|f[g6>>2],j6=0!=(0|h6),j6||(k6=b+12|0,l6=0|f[k6>>2],m6=l6+4|0,n6=0|f[m6>>2],o6=J5+20|0,p6=0|f[o6>>2],q6=p6+12|0,f[q6>>2]=n6)),r6=0|f[J5>>2],s6=r6>>>11,u6=128&s6,v6=0!=(0|u6)){if(w6=J5+12|0,x6=0|f[w6>>2],q=0,f[Cca>>2]=0|f[Bca>>2],f[Cca+4>>2]=0|f[Bca+4>>2],pa(0|x6,0|Ja,0|b,0|Cca),y6=q,q=0,0!=(0|y6)&0!=(0|r)?(z6=0|rw(0|f[y6>>2],0|Cda,0|Dda),0==(0|z6)&&Aa(0|y6,0|r),F=r):z6=-1,A6=F,caa=1==(0|z6)){uca=tca,y7=x7,i=w,Ga=A6,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(f[Bca>>2]=0|f[Ja>>2],f[Bca+4>>2]=0|f[Ja+4>>2],q=0,na(146,0|b,0|x7),B6=q,q=0,0!=(0|B6)&0!=(0|r)?(C6=0|rw(0|f[B6>>2],0|Cda,0|Dda),0==(0|C6)&&Aa(0|B6,0|r),F=r):C6=-1,D6=F,daa=1==(0|C6)){uca=tca,y7=x7,i=w,Ga=D6,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(F6=b+20|0,G6=0|f[F6>>2],H6=0!=(0|G6)){s=w,hba=lba,Bba=Fba,bca=fca,kca=oca,Lca=Pca,ida=mda,Eda=276;continue b}if(I6=b+12|0,J6=0|f[I6>>2],K6=J6+16|0,L6=0|f[K6>>2],M6=L6+8|0,N6=0|f[M6>>2],O6=b+12|0,Q6=0|f[O6>>2],R6=Q6+4|0,f[R6>>2]=N6,S6=L6+40|0,T6=0|f[S6>>2],U6=N6+(T6<<3)|0,f[U6>>2]=0|f[Bca>>2],f[U6+4>>2]=0|f[Bca+4>>2],V6=L6+28|0,W6=0|f[V6>>2],q=0,ma(132,0|b),X6=q,q=0,0!=(0|X6)&0!=(0|r)?(Y6=0|rw(0|f[X6>>2],0|Cda,0|Dda),0==(0|Y6)&&Aa(0|X6,0|r),F=r):Y6=-1,Z6=F,eaa=1==(0|Y6)){uca=tca,y7=x7,i=w,Ga=Z6,fba=lba,wba=Fba,$ba=W6,hca=oca,Jca=N6,fda=mda,tca=uca,x7=y7;continue a}_6=b+12|0,a7=0|f[_6>>2],b7=a7+16|0,c7=0|f[b7>>2],d7=c7+4|0,e7=0|f[d7>>2],f7=e7+12|0,g7=0|f[f7>>2],h7=g7+12|0,i7=0|f[h7>>2],k7=g7+16|0,l7=0|f[k7>>2],m7=0|f[W6>>2],n7=127&m7,o7=200+(n7<<2)|0,p7=0|f[o7>>2],mba=lba,x=w,za=p7,rba=m7,Fba=g7,fca=W6,oca=i7,Pca=N6,mda=l7,lba=mba,w=x,Eda=590;continue b}if(q7=J5+12|0,r7=0|f[q7>>2],s7=0!=(0|r7),!s7){if(t7=b+12|0,La=0|f[t7>>2],Ma=La+4|0,Na=0|f[Ma>>2],q=0,ma(162,0|Mc),Oa=q,q=0,0!=(0|Oa)&0!=(0|r)?(Pa=0|rw(0|f[Oa>>2],0|Cda,0|Dda),0==(0|Pa)&&Aa(0|Oa,0|r),F=r):Pa=-1,Qa=F,_9=1==(0|Pa)){uca=tca,y7=x7,i=J5,Ga=Qa,fba=lba,wba=r7,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[Na>>2]=0|f[Mc>>2],f[Na+4>>2]=0|f[Mc+4>>2],o=J5,zba=r7,Eda=274;break c}if(Ra=r7+12|0,Sa=0|f[Ra>>2],Ta=r7+16|0,Ua=0|f[Ta>>2],Wa=r7+2|0,Xa=0|e[Wa>>1],Ya=65535&Xa,Za=N5+12|0,f[Za>>2]=Ya,$a=N5+36|0,_a=0|f[$a>>2],ab=(0|_a)<0,bb=r7+2|0,cb=0|e[bb>>1],db=65535&cb,ab){if(fb=(0|db)<3,fb?Ea=3:(gb=r7+2|0,hb=0|e[gb>>1],ib=65535&hb,Ea=ib),q=0,pa(142,0|b,0|Ea,3),jb=q,q=0,0!=(0|jb)&0!=(0|r)?(kb=0|rw(0|f[jb>>2],0|Cda,0|Dda),0==(0|kb)&&Aa(0|jb,0|r),F=r):kb=-1,lb=F,baa=1==(0|kb)){uca=tca,y7=x7,i=J5,Ga=lb,fba=lba,wba=r7,$ba=fca,hca=Sa,Jca=Pca,fda=Ua,tca=uca,x7=y7;continue a}}else if(mb=N5+36|0,nb=0|f[mb>>2],ob=nb+2|0,q=0,pa(142,0|b,0|db,0|ob),qb=q,q=0,0!=(0|qb)&0!=(0|r)?(rb=0|rw(0|f[qb>>2],0|Cda,0|Dda),0==(0|rb)&&Aa(0|qb,0|r),F=r):rb=-1,sb=F,aaa=1==(0|rb)){uca=tca,y7=x7,i=J5,Ga=sb,fba=lba,wba=r7,$ba=fca,hca=Sa,Jca=Pca,fda=Ua,tca=uca,x7=y7;continue a}tb=b+12|0,ub=0|f[tb>>2],vb=ub+4|0,wb=0|f[vb>>2],xb=J5+20|0,yb=0|f[xb>>2],zb=yb+12|0,Bb=0|f[zb>>2],f[wb>>2]=0|f[Bb>>2],f[wb+4>>2]=0|f[Bb+4>>2],Cb=r7+8|0,Db=0|f[Cb>>2],Eb=0|f[Db>>2],Fb=127&Eb,Gb=200+(Fb<<2)|0,Hb=0|f[Gb>>2],mba=lba,w=J5,za=Hb,rba=Eb,Fba=r7,fca=Db,oca=Sa,Pca=wb,mda=Ua,lba=mba,Eda=590;continue b;case 37:if(Ib=b+12|0,Jb=0|f[Ib>>2],Kb=Jb+16|0,Mb=0|f[Kb>>2],Nb=0|f[Mb>>2],Ob=rba>>>23,Pb=511&Ob,Qb=rba>>>7,Rb=127&Qb,Sb=0==(0|Nb)){if(q=0,Tb=0|sa(135,0|b,67669),Ub=q,q=0,0!=(0|Ub)&0!=(0|r)?(Vb=0|rw(0|f[Ub>>2],0|Cda,0|Dda),0==(0|Vb)&&Aa(0|Ub,0|r),F=r):Vb=-1,Xb=F,Y9=1==(0|Vb)){uca=tca,y7=x7,i=w,Ga=Xb,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(q=0,ta(171,0|Pe,0|b,56470,30),Yb=q,q=0,0!=(0|Yb)&0!=(0|r)?(Zb=0|rw(0|f[Yb>>2],0|Cda,0|Dda),0==(0|Zb)&&Aa(0|Yb,0|r),F=r):Zb=-1,$b=F,Z9=1==(0|Zb)){uca=tca,y7=x7,i=w,Ga=$b,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(q=0,
+f[I>>2]=0|f[Pe>>2],f[I+4>>2]=0|f[Pe+4>>2],ta(172,0|Tg,0|b,0|Tb,0|I),_b=q,q=0,0!=(0|_b)&0!=(0|r)?(ac=0|rw(0|f[_b>>2],0|Cda,0|Dda),0==(0|ac)&&Aa(0|_b,0|r),F=r):ac=-1,bc=F,$9=1==(0|ac)){uca=tca,y7=x7,i=w,Ga=bc,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[_aa>>2]=0|f[Tg>>2],f[_aa+4>>2]=0|f[Tg+4>>2],cc=0|f[_aa>>2],dc=b+20|0,f[dc>>2]=cc,s=w,hba=lba,Bba=Fba,bca=fca,kca=oca,Lca=Pca,ida=mda,Eda=276;continue b}if(f[Dca>>2]=0|f[Pca>>2],f[Dca+4>>2]=0|f[Pca+4>>2],ec=b+12|0,gc=0|f[ec>>2],hc=gc+16|0,ic=0|f[hc>>2],jc=ic+44|0,kc=0|f[jc>>2],lc=kc+20|0,mc=0|f[lc>>2],f[L7>>2]=mc,q=0,nc=0|ja(139,0|b,0|L7,0|Nb),oc=q,q=0,0!=(0|oc)&0!=(0|r)?(pc=0|rw(0|f[oc>>2],0|Cda,0|Dda),0==(0|pc)&&Aa(0|oc,0|r),F=r):pc=-1,rc=F,M9=1==(0|pc)){uca=tca,y7=x7,i=w,Ga=rc,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}sc=0!=(0|nc);do if(sc)Jba=nc,Mba=Nb,Uba=Rb;else{if(q=0,tc=0|ja(140,0|b,65322,14),uc=q,q=0,0!=(0|uc)&0!=(0|r)?(vc=0|rw(0|f[uc>>2],0|Cda,0|Dda),0==(0|vc)&&Aa(0|uc,0|r),F=r):vc=-1,wc=F,N9=1==(0|vc)){uca=tca,y7=x7,i=w,Ga=wc,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(q=0,xc=0|ja(139,0|b,0|L7,0|tc),yc=q,q=0,0!=(0|yc)&0!=(0|r)?(zc=0|rw(0|f[yc>>2],0|Cda,0|Dda),0==(0|zc)&&Aa(0|yc,0|r),F=r):zc=-1,Ac=F,O9=1==(0|zc)){uca=tca,y7=x7,i=w,Ga=Ac,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(Cc=127==(0|Rb),!Cc){if(Oc=Pca+(Pb<<3)|0,Pc=Oc+16|0,Qc=Pca+(Pb<<3)|0,Rc=Qc+8|0,Sc=Rb+1|0,q=0,pa(170,0|Pc,0|Rc,0|Sc),Tc=q,q=0,0!=(0|Tc)&0!=(0|r)?(Uc=0|rw(0|f[Tc>>2],0|Cda,0|Dda),0==(0|Uc)&&Aa(0|Tc,0|r),F=r):Uc=-1,Vc=F,P9=1==(0|Uc)){uca=tca,y7=x7,i=w,Ga=Vc,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}Wc=Pb+1|0,Xc=Pca+(Wc<<3)|0,Zc=Xc+4|0,f[Zc>>2]=4,$c=0|f[Mb>>2],_c=Pb+1|0,ad=Pca+(_c<<3)|0,f[ad>>2]=$c,Jba=xc,Mba=tc,Uba=Sc;break}if(Dc=Pb+1|0,Ec=Pca+(Dc<<3)|0,Fc=0|f[Mb>>2],q=0,na(143,0|Wi,0|Fc),Gc=q,q=0,0!=(0|Gc)&0!=(0|r)?(Hc=0|rw(0|f[Gc>>2],0|Cda,0|Dda),0==(0|Hc)&&Aa(0|Gc,0|r),F=r):Hc=-1,Ic=F,Q9=1==(0|Hc)){uca=tca,y7=x7,i=w,Ga=Ic,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(q=0,f[J>>2]=0|f[Ec>>2],f[J+4>>2]=0|f[Ec+4>>2],f[K>>2]=0|f[Wi>>2],f[K+4>>2]=0|f[Wi+4>>2],ta(169,0|Zk,0|b,0|J,0|K),Jc=q,q=0,0!=(0|Jc)&0!=(0|r)?(Kc=0|rw(0|f[Jc>>2],0|Cda,0|Dda),0==(0|Kc)&&Aa(0|Jc,0|r),F=r):Kc=-1,Lc=F,R9=1==(0|Kc)){uca=tca,y7=x7,i=w,Ga=Lc,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}Jba=xc,Mba=tc,Uba=Rb}while(0);if(q=0,bd=0|oa(141,0|b),cd=q,q=0,0!=(0|cd)&0!=(0|r)?(dd=0|rw(0|f[cd>>2],0|Cda,0|Dda),0==(0|dd)&&Aa(0|cd,0|r),F=r):dd=-1,ed=F,S9=1==(0|dd)){uca=tca,y7=x7,i=w,Ga=ed,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(f[bd>>2]=Mba,fd=bd+4|0,f[fd>>2]=Jba,gd=b+12|0,id=0|f[gd>>2],jd=id+4|0,kd=0|f[jd>>2],ld=bd+8|0,f[ld>>2]=kd,md=127==(0|Uba),md?(nd=bd+36|0,f[nd>>2]=-1):(od=bd+36|0,f[od>>2]=Uba),pd=0|f[L7>>2],qd=bd+44|0,f[qd>>2]=pd,rd=fca+4|0,td=bd+28|0,f[td>>2]=rd,ud=b+12|0,vd=0|f[ud>>2],wd=vd+4|0,xd=0|f[wd>>2],yd=xd+(Pb<<3)|0,f[wd>>2]=yd,zd=b+12|0,Ad=0|f[zd>>2],Bd=Ad+4|0,Cd=0|f[Bd>>2],f[Cd>>2]=0|f[Dca>>2],f[Cd+4>>2]=0|f[Dca+4>>2],Ed=0|f[Jba>>2],Fd=Ed>>>11,Gd=128&Fd,Hd=0!=(0|Gd)){if(Id=127==(0|Uba),Id?(Jd=bd+12|0,f[Jd>>2]=3):(Kd=Uba+2|0,Ld=bd+12|0,f[Ld>>2]=Kd),Md=b+12|0,Nd=0|f[Md>>2],Pd=Nd+4|0,Qd=0|f[Pd>>2],Rd=Jba+12|0,Sd=0|f[Rd>>2],q=0,f[Eca>>2]=0|f[Dca>>2],f[Eca+4>>2]=0|f[Dca+4>>2],pa(0|Sd,0|an,0|b,0|Eca),Td=q,q=0,0!=(0|Td)&0!=(0|r)?(Ud=0|rw(0|f[Td>>2],0|Cda,0|Dda),0==(0|Ud)&&Aa(0|Td,0|r),F=r):Ud=-1,Vd=F,V9=1==(0|Ud)){uca=tca,y7=x7,i=w,Ga=Vd,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(f[Qd>>2]=0|f[an>>2],f[Qd+4>>2]=0|f[an+4>>2],q=0,na(146,0|b,0|x7),Wd=q,q=0,0!=(0|Wd)&0!=(0|r)?(Xd=0|rw(0|f[Wd>>2],0|Cda,0|Dda),0==(0|Xd)&&Aa(0|Wd,0|r),F=r):Xd=-1,Yd=F,W9=1==(0|Xd)){uca=tca,y7=x7,i=w,Ga=Yd,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if($d=b+20|0,_d=0|f[$d>>2],ae=0!=(0|_d)){s=w,hba=lba,Bba=Fba,bca=fca,kca=oca,Lca=Pca,ida=mda,Eda=276;continue b}if(be=b+12|0,ce=0|f[be>>2],de=ce+16|0,ee=0|f[de>>2],fe=ee+8|0,ge=0|f[fe>>2],he=b+12|0,je=0|f[he>>2],ke=je+4|0,f[ke>>2]=ge,q=0,ma(132,0|b),le=q,q=0,0!=(0|le)&0!=(0|r)?(me=0|rw(0|f[le>>2],0|Cda,0|Dda),0==(0|me)&&Aa(0|le,0|r),F=r):me=-1,ne=F,X9=1==(0|me)){uca=tca,y7=x7,i=w,Ga=ne,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=ge,fda=mda,tca=uca,x7=y7;continue a}oe=fca+4|0,pe=0|f[oe>>2],qe=127&pe,re=200+(qe<<2)|0,se=0|f[re>>2],nda=mda,pca=oca,Gba=Fba,mba=lba,x=w,za=se,rba=pe,fca=oe,Pca=ge,mda=nda,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b}if(ue=bd+40|0,f[ue>>2]=Pb,ve=bd+4|0,f[ve>>2]=Jba,we=Jba+12|0,xe=0|f[we>>2],ye=xe+12|0,ze=0|f[ye>>2],Ae=xe+16|0,Be=0|f[Ae>>2],Ce=xe+2|0,De=0|e[Ce>>1],Fe=65535&De,Ge=bd+12|0,f[Ge>>2]=Fe,He=127==(0|Uba),Ie=xe+2|0,Je=0|e[Ie>>1],Ke=65535&Je,He){if(Le=(0|Ke)<3,Le?Da=3:(Me=xe+2|0,Ne=0|e[Me>>1],Oe=65535&Ne,Da=Oe),q=0,pa(142,0|b,0|Da,3),Re=q,q=0,0!=(0|Re)&0!=(0|r)?(Se=0|rw(0|f[Re>>2],0|Cda,0|Dda),0==(0|Se)&&Aa(0|Re,0|r),F=r):Se=-1,Te=F,U9=1==(0|Se)){uca=tca,y7=x7,i=w,Ga=Te,fba=lba,wba=xe,$ba=fca,hca=ze,Jca=Pca,fda=Be,tca=uca,x7=y7;continue a}}else if(Ue=bd+36|0,Ve=0|f[Ue>>2],We=Ve+2|0,q=0,pa(142,0|b,0|Ke,0|We),Xe=q,q=0,0!=(0|Xe)&0!=(0|r)?(Ye=0|rw(0|f[Xe>>2],0|Cda,0|Dda),0==(0|Ye)&&Aa(0|Xe,0|r),F=r):Ye=-1,Ze=F,T9=1==(0|Ye)){uca=tca,y7=x7,i=w,Ga=Ze,fba=lba,wba=xe,$ba=fca,hca=ze,Jca=Pca,fda=Be,tca=uca,x7=y7;continue a}$e=b+12|0,af=0|f[$e>>2],bf=af+4|0,cf=0|f[bf>>2],df=xe+8|0,ef=0|f[df>>2],ff=0|f[ef>>2],gf=127&ff,hf=200+(gf<<2)|0,jf=0|f[hf>>2],mba=lba,x=w,za=jf,rba=ff,Fba=xe,fca=ef,oca=ze,Pca=cf,mda=Be,lba=mba,w=x,Eda=590;continue b;case 38:kf=rba>>>23,mf=511&kf,nf=rba>>>7,of=65535&nf,pf=of>>10,qf=63&pf,rf=of>>9,sf=1&rf,tf=of>>4,uf=31&tf,vf=of>>0,xf=15&vf,yf=0==(0|xf);do{if(!yf){if(Af=xf-1|0,q=0,Bf=0|sa(161,0|b,0|Af),Cf=q,q=0,0!=(0|Cf)&0!=(0|r)?(Df=0|rw(0|f[Cf>>2],0|Cda,0|Dda),0==(0|Df)&&Aa(0|Cf,0|r),F=r):Df=-1,Ef=F,D9=1==(0|Df)){uca=tca,y7=x7,i=w,Ga=Ef,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(Ff=0!=(0|Bf)){Uf=Bf+12|0,Vf=0|f[Uf>>2],Wf=Vf+8|0,Yca=Wf;break}if(q=0,Gf=0|sa(135,0|b,67669),If=q,q=0,0!=(0|If)&0!=(0|r)?(Jf=0|rw(0|f[If>>2],0|Cda,0|Dda),0==(0|Jf)&&Aa(0|If,0|r),F=r):Jf=-1,Kf=F,E9=1==(0|Jf)){uca=tca,y7=x7,i=w,Ga=Kf,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(q=0,ta(171,0|fp,0|b,56470,30),Lf=q,q=0,0!=(0|Lf)&0!=(0|r)?(Mf=0|rw(0|f[Lf>>2],0|Cda,0|Dda),0==(0|Mf)&&Aa(0|Lf,0|r),F=r):Mf=-1,Nf=F,F9=1==(0|Mf)){uca=tca,y7=x7,i=w,Ga=Nf,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(q=0,f[L>>2]=0|f[fp>>2],f[L+4>>2]=0|f[fp+4>>2],ta(172,0|ir,0|b,0|Gf,0|L),Of=q,q=0,0!=(0|Of)&0!=(0|r)?(Pf=0|rw(0|f[Of>>2],0|Cda,0|Dda),0==(0|Pf)&&Aa(0|Of,0|r),F=r):Pf=-1,Qf=F,G9=1==(0|Pf)){uca=tca,y7=x7,i=w,Ga=Qf,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[cba>>2]=0|f[ir>>2],f[cba+4>>2]=0|f[ir+4>>2],Rf=0|f[cba>>2],Tf=b+20|0,f[Tf>>2]=Rf,s=w,hba=lba,Bba=Fba,bca=fca,kca=oca,Lca=Pca,ida=mda,Eda=276;continue b}zf=Pca+8|0,Yca=zf}while(0);if(Xf=0==(0|sf)){if(Yf=Pca+(mf<<3)|0,Zf=qf+uf|0,q=0,ta(167,0|lt,0|b,0|Zf,0|Yca),$f=q,q=0,0!=(0|$f)&0!=(0|r)?(_f=0|rw(0|f[$f>>2],0|Cda,0|Dda),0==(0|_f)&&Aa(0|$f,0|r),F=r):_f=-1,ag=F,L9=1==(0|_f)){uca=tca,y7=x7,i=w,Ga=ag,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[Yf>>2]=0|f[lt>>2],f[Yf+4>>2]=0|f[lt+4>>2]}else{if(cg=Yca+(qf<<3)|0,dg=cg+4|0,eg=0|f[dg>>2],fg=14==(0|eg),fg?(gg=Yca+(qf<<3)|0,hg=0|f[gg>>2],ig=hg+20|0,jg=0|f[ig>>2],kg=hg+12|0,lg=0|f[kg>>2],Hba=lg,rca=jg):(Hba=0,rca=0),ng=Pca+(mf<<3)|0,og=qf+Hba|0,pg=og+uf|0,q=0,pa(173,0|pv,0|b,0|pg),qg=q,q=0,0!=(0|qg)&0!=(0|r)?(rg=0|rw(0|f[qg>>2],0|Cda,0|Dda),0==(0|rg)&&Aa(0|qg,0|r),F=r):rg=-1,sg=F,H9=1==(0|rg)){uca=tca,y7=x7,i=w,Ga=sg,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(f[ng>>2]=0|f[pv>>2],f[ng+4>>2]=0|f[pv+4>>2],tg=Pca+(mf<<3)|0,ug=0|f[tg>>2],vg=(0|qf)>0,vg&&(wg=ug+20|0,yg=0|f[wg>>2],q=0,pa(144,0|yg,0|Yca,0|qf),zg=q,q=0,0!=(0|zg)&0!=(0|r)?(Ag=0|rw(0|f[zg>>2],0|Cda,0|Dda),0==(0|Ag)&&Aa(0|zg,0|r),F=r):Ag=-1,Bg=F,K9=1==(0|Ag))){uca=tca,y7=x7,i=w,Ga=Bg,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(Cg=(0|Hba)>0,Cg&&(Dg=ug+20|0,Eg=0|f[Dg>>2],Fg=Eg+(qf<<3)|0,q=0,pa(144,0|Fg,0|rca,0|Hba),Gg=q,q=0,0!=(0|Gg)&0!=(0|r)?(Hg=0|rw(0|f[Gg>>2],0|Cda,0|Dda),0==(0|Hg)&&Aa(0|Gg,0|r),F=r):Hg=-1,Jg=F,J9=1==(0|Hg))){uca=tca,y7=x7,i=w,Ga=Jg,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(Kg=(0|uf)>0,Kg&&(Lg=ug+20|0,Mg=0|f[Lg>>2],Ng=Mg+(qf<<3)|0,Og=Ng+(Hba<<3)|0,Pg=Yca+(qf<<3)|0,Qg=Pg+8|0,q=0,pa(144,0|Og,0|Qg,0|uf),Rg=q,q=0,0!=(0|Rg)&0!=(0|r)?(Sg=0|rw(0|f[Rg>>2],0|Cda,0|Dda),0==(0|Sg)&&Aa(0|Rg,0|r),F=r):Sg=-1,Vg=F,I9=1==(0|Sg))){uca=tca,y7=x7,i=w,Ga=Vg,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}Wg=qf+Hba|0,Xg=Wg+uf|0,Yg=ug+12|0,f[Yg>>2]=Xg}Zg=mf+1|0,$g=Pca+(Zg<<3)|0,_g=qf+sf|0,ah=_g+uf|0,bh=Yca+(ah<<3)|0,f[$g>>2]=0|f[bh>>2],f[$g+4>>2]=0|f[bh+4>>2],ch=b+92|0,eh=ch+416|0,f[eh>>2]=x7,fh=fca+4|0,gh=0|f[fh>>2],hh=127&gh,ih=200+(hh<<2)|0,jh=0|f[ih>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=jh,rba=gh,fca=fh,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 39:if(kh=rba>>>7,lh=33554431&kh,mh=lh>>>18,nh=31&mh,ph=lh>>>13,qh=31&ph,rh=lh>>>12,sh=1&rh,th=lh>>>7,uh=31&th,vh=b+12|0,wh=0|f[vh>>2],xh=wh+16|0,yh=0|f[xh>>2],Ah=yh+36|0,Bh=0|f[Ah>>2],Ch=Pca+8|0,Dh=nh+qh|0,Eh=Dh+sh|0,Fh=Eh+uh|0,Gh=(0|Bh)<0,Hh=Gh?1:Bh,Ih=Ch+(Hh<<3)|0,Jh=Ih+4|0,Lh=0|f[Jh>>2],Mh=0==(0|Lh),Mh?(Nh=0|f[Ih>>2],Oh=0!=(0|Nh),Oh&&(Eda=222)):Eda=222,222==(0|Eda)&&(Eda=0,Ph=Ih+4|0,Qh=0|f[Ph>>2],Rh=13!=(0|Qh))){if(q=0,f[M>>2]=0|f[Ih>>2],f[M+4>>2]=0|f[Ih+4>>2],ra(174,0|wx,0|b,0|M,13,65315,56501),Sh=q,q=0,0!=(0|Sh)&0!=(0|r)?(Th=0|rw(0|f[Sh>>2],0|Cda,0|Dda),0==(0|Th)&&Aa(0|Sh,0|r),F=r):Th=-1,Uh=F,C9=1==(0|Th)){uca=tca,y7=x7,i=w,Ga=Uh,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[Ih>>2]=0|f[wx>>2],f[Ih+4>>2]=0|f[wx+4>>2]}if(Wh=(0|Bh)<0){if(Xh=Pca+8|0,Yh=0|f[Xh>>2],Zh=Yh+20|0,$h=0|f[Zh>>2],_h=Yh+12|0,ai=0|f[_h>>2],bi=Pca+8|0,q=0,f[N>>2]=0|f[bi>>2],f[N+4>>2]=0|f[bi+4>>2],na(148,0|b,0|N),ci=q,q=0,0!=(0|ci)&0!=(0|r)?(di=0|rw(0|f[ci>>2],0|Cda,0|Dda),0==(0|di)&&Aa(0|ci,0|r),F=r):di=-1,fi=F,B9=1==(0|di)){uca=tca,y7=x7,i=w,Ga=fi,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}z7=ai,D7=$h}else z7=Bh,D7=Ch;gi=b+12|0,hi=0|f[gi>>2],ii=hi+16|0,ji=0|f[ii>>2],ki=ji+4|0,li=0|f[ki>>2],mi=0!=(0|li);do if(mi)if(ni=b+12|0,oi=0|f[ni>>2],qi=oi+16|0,ri=0|f[qi>>2],si=ri+4|0,ti=0|f[si>>2],ui=0|f[ti>>2],vi=ui>>>11,wi=256&vi,xi=0!=(0|wi)){if(yi=(0|z7)>=0){if(zi=nh+uh|0,Bi=(0|z7)<(0|zi),!Bi){if(Ci=0==(0|sh),!Ci){A7=z7,E7=D7;break}if(Di=(0|z7)>(0|Fh),!Di){A7=z7,E7=D7;break}}if(Ei=nh+uh|0,q=0,na(175,0|b,0|Ei),Fi=q,q=0,0!=(0|Fi)&0!=(0|r)?(Gi=0|rw(0|f[Fi>>2],0|Cda,0|Dda),0==(0|Gi)&&Aa(0|Fi,0|r),F=r):Gi=-1,Hi=F,A9=1==(0|Gi)){uca=tca,y7=x7,i=w,Ga=Hi,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}s=w,hba=lba,Bba=Fba,bca=fca,kca=oca,Lca=Pca,ida=mda,Eda=276;continue b}A7=z7,E7=D7}else Eda=236;else Eda=236;while(0);if(236==(0|Eda))if(Eda=0,Ii=(0|Fh)>1,Ji=1==(0|z7),Wba=Ii&Ji)if(Ki=D7+4|0,Mi=0|f[Ki>>2],Ni=14==(0|Mi)){if(q=0,f[O>>2]=0|f[D7>>2],f[O+4>>2]=0|f[D7+4>>2],na(148,0|b,0|O),Oi=q,q=0,0!=(0|Oi)&0!=(0|r)?(Pi=0|rw(0|f[Oi>>2],0|Cda,0|Dda),0==(0|Pi)&&Aa(0|Oi,0|r),F=r):Pi=-1,Qi=F,z9=1==(0|Pi)){uca=tca,y7=x7,i=w,Ga=Qi,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}Ri=0|f[D7>>2],Si=Ri+12|0,Ti=0|f[Si>>2],Ui=0|f[D7>>2],Vi=Ui+20|0,Yi=0|f[Vi>>2],A7=Ti,E7=Yi}else A7=z7,E7=D7;else A7=z7,E7=D7;Zi=b+12|0,$i=0|f[Zi>>2],_i=$i+16|0,aj=0|f[_i>>2],bj=aj+36|0,f[bj>>2]=Fh,cj=(0|A7)<(0|Fh);do if(cj){dj=nh+uh|0,ej=(0|A7)<(0|dj);do{if(ej){if(fj=(0|nh)<(0|A7)){hj=A7-nh|0,Oba=hj;break}Oba=0;break}Oba=uh}while(0);if(ij=Fh+1|0,jj=Pca+(ij<<3)|0,f[jj>>2]=0|f[Ih>>2],f[jj+4>>2]=0|f[Ih+4>>2],kj=A7+1|0,lj=Pca+(kj<<3)|0,mj=lj+4|0,f[mj>>2]=0,nj=A7+1|0,oj=Pca+(nj<<3)|0,f[oj>>2]=0,pj=(0|Ch)!=(0|E7),pj&&(qj=Pca+8|0,sj=A7-Oba|0,q=0,pa(170,0|qj,0|E7,0|sj),tj=q,q=0,0!=(0|tj)&0!=(0|r)?(uj=0|rw(0|f[tj>>2],0|Cda,0|Dda),0==(0|uj)&&Aa(0|tj,0|r),F=r):uj=-1,vj=F,y9=1==(0|uj))){uca=tca,y7=x7,i=w,Ga=vj,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(wj=0!=(0|Oba),wj&&(xj=Fh-uh|0,yj=xj+1|0,zj=Pca+(yj<<3)|0,Aj=A7-Oba|0,Bj=E7+(Aj<<3)|0,q=0,pa(170,0|zj,0|Bj,0|Oba),Dj=q,q=0,0!=(0|Dj)&0!=(0|r)?(Ej=0|rw(0|f[Dj>>2],0|Cda,0|Dda),0==(0|Ej)&&Aa(0|Dj,0|r),F=r):Ej=-1,Fj=F,x9=1==(0|Ej))){uca=tca,y7=x7,i=w,Ga=Fj,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(Gj=0!=(0|sh)){if(Hj=nh+qh|0,Ij=Hj+1|0,Jj=Pca+(Ij<<3)|0,q=0,pa(173,0|zz,0|b,0),Kj=q,q=0,0!=(0|Kj)&0!=(0|r)?(Lj=0|rw(0|f[Kj>>2],0|Cda,0|Dda),0==(0|Lj)&&Aa(0|Kj,0|r),F=r):Lj=-1,Mj=F,w9=1==(0|Lj)){uca=tca,y7=x7,i=w,Ga=Mj,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[Jj>>2]=0|f[zz>>2],f[Jj+4>>2]=0|f[zz+4>>2]}if(Oj=0==(0|qh),!Oj&&(Pj=nh+uh|0,Qj=(0|A7)<(0|Pj),!Qj)){Sj=A7-nh|0,Tj=Sj-uh|0,Uj=Tj+1|0,Vj=fca+(Uj<<2)|0,aca=Vj;break}Rj=fca+4|0,aca=Rj}else{if(Wj=(0|Ch)!=(0|E7),Wj&&(Xj=Fh+1|0,Zj=Pca+(Xj<<3)|0,f[Zj>>2]=0|f[Ih>>2],f[Zj+4>>2]=0|f[Ih+4>>2],$j=Pca+8|0,_j=nh+qh|0,q=0,pa(170,0|$j,0|E7,0|_j),ak=q,q=0,0!=(0|ak)&0!=(0|r)?(bk=0|rw(0|f[ak>>2],0|Cda,0|Dda),0==(0|bk)&&Aa(0|ak,0|r),F=r):bk=-1,ck=F,v9=1==(0|bk))){uca=tca,y7=x7,i=w,Ga=ck,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(dk=0!=(0|sh)){if(ek=A7-nh|0,fk=ek-qh|0,gk=fk-uh|0,ik=nh+qh|0,jk=ik+1|0,kk=Pca+(jk<<3)|0,lk=E7+(nh<<3)|0,mk=lk+(qh<<3)|0,q=0,ta(167,0|CB,0|b,0|gk,0|mk),nk=q,q=0,0!=(0|nk)&0!=(0|r)?(ok=0|rw(0|f[nk>>2],0|Cda,0|Dda),0==(0|ok)&&Aa(0|nk,0|r),F=r):ok=-1,pk=F,u9=1==(0|ok)){uca=tca,y7=x7,i=w,Ga=pk,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[kk>>2]=0|f[CB>>2],f[kk+4>>2]=0|f[CB+4>>2],Xca=gk}else Xca=0;if(qk=0!=(0|uh),qk&&(rk=A7-uh|0,tk=(0|rk)>(0|nh),tk&&(uk=nh+qh|0,vk=uk+sh|0,wk=vk+1|0,xk=Pca+(wk<<3)|0,yk=nh+qh|0,zk=yk+Xca|0,Ak=E7+(zk<<3)|0,q=0,pa(170,0|xk,0|Ak,0|uh),Bk=q,q=0,0!=(0|Bk)&0!=(0|r)?(Ck=0|rw(0|f[Bk>>2],0|Cda,0|Dda),0==(0|Ck)&&Aa(0|Bk,0|r),F=r):Ck=-1,Ek=F,t9=1==(0|Ck)))){uca=tca,y7=x7,i=w,Ga=Ek,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}Fk=(0|Ch)==(0|E7),Fk&&(Gk=Fh+1|0,Hk=Pca+(Gk<<3)|0,f[Hk>>2]=0|f[Ih>>2],f[Hk+4>>2]=0|f[Ih+4>>2]),Ik=qh+1|0,Jk=fca+(Ik<<2)|0,aca=Jk}while(0);Kk=0|f[aca>>2],Lk=127&Kk,Mk=200+(Lk<<2)|0,Nk=0|f[Mk>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=Nk,rba=Kk,fca=aca,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 40:Pk=fca+4|0,Qk=0|f[Pk>>2],Rk=127&Qk,Sk=200+(Rk<<2)|0,Tk=0|f[Sk>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=Tk,rba=Qk,fca=Pk,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 41:Uk=fca+4|0,Vk=0|f[Uk>>2],Wk=127&Vk,Xk=200+(Wk<<2)|0,Yk=0|f[Xk>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=Yk,rba=Vk,fca=Uk,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 42:p=w,qba=rba,Aba=Fba;break;case 43:if(As=rba>>>23,Bs=511&As,Cs=rba>>>7,Ds=127&Cs,Es=rba>>>14,Fs=511&Es,Hs=mda+(Fs<<2)|0,Is=0|f[Hs>>2],Js=Pca+(Bs<<3)|0,f[Fca>>2]=0|f[Js>>2],f[Fca+4>>2]=0|f[Js+4>>2],q=0,f[Gca>>2]=0|f[Fca>>2],f[Gca+4>>2]=0|f[Fca+4>>2],Ks=0|sa(138,0|b,0|Gca),Ls=q,q=0,0!=(0|Ls)&0!=(0|r)?(Ms=0|rw(0|f[Ls>>2],0|Cda,0|Dda),0==(0|Ms)&&Aa(0|Ls,0|r),F=r):Ms=-1,Ns=F,Z8=1==(0|Ms)){uca=tca,y7=x7,i=w,Ga=Ns,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(f[M7>>2]=Ks,q=0,Os=0|ja(139,0|b,0|M7,0|Is),Ps=q,q=0,0!=(0|Ps)&0!=(0|r)?(Qs=0|rw(0|f[Ps>>2],0|Cda,0|Dda),0==(0|Qs)&&Aa(0|Ps,0|r),F=r):Qs=-1,Ss=F,$8=1==(0|Qs)){uca=tca,y7=x7,i=w,Ga=Ss,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}Ts=0!=(0|Os);do{if(!Ts){if(q=0,na(143,0|cda,0|Is),Us=q,q=0,0!=(0|Us)&0!=(0|r)?(Vs=0|rw(0|f[Us>>2],0|Cda,0|Dda),0==(0|Vs)&&Aa(0|Us,0|r),F=r):Vs=-1,Ws=F,_8=1==(0|Vs)){uca=tca,y7=x7,i=w,Ga=Ws,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(q=0,Xs=0|ja(140,0|b,65322,14),Ys=q,q=0,0!=(0|Ys)&0!=(0|r)?(Zs=0|rw(0|f[Ys>>2],0|Cda,0|Dda),0==(0|Zs)&&Aa(0|Ys,0|r),F=r):Zs=-1,$s=F,a9=1==(0|Zs)){uca=tca,y7=x7,i=w,Ga=$s,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(q=0,_s=0|ja(139,0|b,0|M7,0|Xs),bt=q,q=0,0!=(0|bt)&0!=(0|r)?(ct=0|rw(0|f[bt>>2],0|Cda,0|Dda),0==(0|ct)&&Aa(0|bt,0|r),F=r):ct=-1,dt=F,b9=1==(0|ct)){uca=tca,y7=x7,i=w,Ga=dt,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(et=127==(0|Ds)){if(ft=Bs+1|0,gt=Pca+(ft<<3)|0,q=0,f[S>>2]=0|f[gt>>2],f[S+4>>2]=0|f[gt+4>>2],f[dda>>2]=0|f[cda>>2],f[dda+4>>2]=0|f[cda+4>>2],ta(169,0|OJ,0|b,0|S,0|dda),ht=q,q=0,0!=(0|ht)&0!=(0|r)?(it=0|rw(0|f[ht>>2],0|Cda,0|Dda),0==(0|it)&&Aa(0|ht,0|r),F=r):it=-1,jt=F,d9=1==(0|it)){uca=tca,y7=x7,i=w,Ga=jt,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}Kba=_s,Nba=Xs,Vba=Ds;break}if(kt=Pca+(Bs<<3)|0,nt=kt+16|0,ot=Pca+(Bs<<3)|0,pt=ot+8|0,qt=Ds+1|0,q=0,pa(170,0|nt,0|pt,0|qt),rt=q,q=0,0!=(0|rt)&0!=(0|r)?(st=0|rw(0|f[rt>>2],0|Cda,0|Dda),0==(0|st)&&Aa(0|rt,0|r),F=r):st=-1,tt=F,c9=1==(0|st)){uca=tca,y7=x7,i=w,Ga=tt,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}ut=Bs+1|0,vt=Pca+(ut<<3)|0,f[vt>>2]=0|f[cda>>2],f[vt+4>>2]=0|f[cda+4>>2],Kba=_s,Nba=Xs,Vba=qt;break}Kba=Os,Nba=Is,Vba=Ds}while(0);if(wt=b+12|0,yt=0|f[wt>>2],zt=yt+16|0,At=0|f[zt>>2],f[At>>2]=Nba,Bt=0|f[M7>>2],Ct=At+44|0,f[Ct>>2]=Bt,Dt=127==(0|Vba),Dt?(Et=At+36|0,f[Et>>2]=-1):(Ft=At+36|0,f[Ft>>2]=Vba),Gt=b+12|0,Ht=0|f[Gt>>2],Jt=Ht+4|0,Kt=0|f[Jt>>2],Lt=Pca+(Bs<<3)|0,Mt=At+36|0,Nt=0|f[Mt>>2],Ot=Nt+1|0,q=0,pa(170,0|Kt,0|Lt,0|Ot),Pt=q,q=0,0!=(0|Pt)&0!=(0|r)?(Qt=0|rw(0|f[Pt>>2],0|Cda,0|Dda),0==(0|Qt)&&Aa(0|Pt,0|r),F=r):Qt=-1,Rt=F,e9=1==(0|Qt)){uca=tca,y7=x7,i=w,Ga=Rt,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(St=0|f[Kba>>2],Ut=St>>>11,Vt=128&Ut,Wt=0!=(0|Vt)){if(Xt=b+12|0,Yt=0|f[Xt>>2],Zt=Yt+4|0,$t=0|f[Zt>>2],_t=Kba+12|0,au=0|f[_t>>2],q=0,f[Hca>>2]=0|f[Fca>>2],f[Hca+4>>2]=0|f[Fca+4>>2],pa(0|au,0|RL,0|b,0|Hca),bu=q,q=0,0!=(0|bu)&0!=(0|r)?(du=0|rw(0|f[bu>>2],0|Cda,0|Dda),0==(0|du)&&Aa(0|bu,0|r),F=r):du=-1,eu=F,h9=1==(0|du)){uca=tca,y7=x7,i=w,Ga=eu,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(f[$t>>2]=0|f[RL>>2],f[$t+4>>2]=0|f[RL+4>>2],q=0,na(146,0|b,0|x7),fu=q,q=0,0!=(0|fu)&0!=(0|r)?(gu=0|rw(0|f[fu>>2],0|Cda,0|Dda),0==(0|gu)&&Aa(0|fu,0|r),F=r):gu=-1,hu=F,i9=1==(0|gu)){uca=tca,y7=x7,i=w,Ga=hu,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}o=w,zba=Fba,Eda=274;break c}if(iu=Kba+12|0,ju=0|f[iu>>2],ku=ju+12|0,lu=0|f[ku>>2],mu=ju+16|0,ou=0|f[mu>>2],pu=At+36|0,qu=0|f[pu>>2],ru=(0|qu)<0,su=ju+2|0,tu=0|e[su>>1],uu=65535&tu,ru){if(vu=(0|uu)<3,vu?Ca=3:(wu=ju+2|0,xu=0|e[wu>>1],zu=65535&xu,Ca=zu),q=0,pa(142,0|b,0|Ca,3),Au=q,q=0,0!=(0|Au)&0!=(0|r)?(Bu=0|rw(0|f[Au>>2],0|Cda,0|Dda),0==(0|Bu)&&Aa(0|Au,0|r),F=r):Bu=-1,Cu=F,g9=1==(0|Bu)){uca=tca,y7=x7,i=w,Ga=Cu,fba=lba,wba=ju,$ba=fca,hca=lu,Jca=Pca,fda=ou,tca=uca,x7=y7;continue a}}else if(Du=At+36|0,Eu=0|f[Du>>2],Fu=Eu+2|0,q=0,pa(142,0|b,0|uu,0|Fu),Gu=q,q=0,0!=(0|Gu)&0!=(0|r)?(Hu=0|rw(0|f[Gu>>2],0|Cda,0|Dda),0==(0|Hu)&&Aa(0|Gu,0|r),F=r):Hu=-1,Iu=F,f9=1==(0|Hu)){uca=tca,y7=x7,i=w,Ga=Iu,fba=lba,wba=ju,$ba=fca,hca=lu,Jca=Pca,fda=ou,tca=uca,x7=y7;continue a}Ku=b+12|0,Lu=0|f[Ku>>2],Mu=Lu+4|0,Nu=0|f[Mu>>2],Ou=ju+8|0,Pu=0|f[Ou>>2],Qu=0|f[Pu>>2],Ru=127&Qu,Su=200+(Ru<<2)|0,Tu=0|f[Su>>2],mba=lba,x=w,za=Tu,rba=Qu,Fba=ju,fca=Pu,oca=lu,Pca=Nu,mda=ou,lba=mba,w=x,Eda=590;continue b;case 44:Vu=rba>>>23,Wu=511&Vu,Xu=rba>>>7,Yu=65535&Xu,Zu=Yu>>10,$u=63&Zu,_u=Yu>>9,av=1&_u,bv=Yu>>4,cv=31&bv,ev=Yu>>0,fv=15&ev,gv=0==(0|fv);do{if(!gv){if(iv=fv-1|0,q=0,jv=0|sa(161,0|b,0|iv),kv=q,q=0,0!=(0|kv)&0!=(0|r)?(lv=0|rw(0|f[kv>>2],0|Cda,0|Dda),0==(0|lv)&&Aa(0|kv,0|r),F=r):lv=-1,mv=F,X8=1==(0|lv)){uca=tca,y7=x7,i=w,Ga=mv,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(nv=0!=(0|jv)){uv=jv+12|0,vv=0|f[uv>>2],wv=vv+8|0,Zca=wv;break}if(q=0,na(180,0|b,2),rv=q,q=0,0!=(0|rv)&0!=(0|r)?(sv=0|rw(0|f[rv>>2],0|Cda,0|Dda),0==(0|sv)&&Aa(0|rv,0|r),F=r):sv=-1,tv=F,Y8=1==(0|sv)){uca=tca,y7=x7,i=w,Ga=tv,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}s=w,hba=lba,Bba=Fba,bca=fca,kca=oca,Lca=Pca,ida=mda,Eda=276;continue b}hv=Pca+8|0,Zca=hv}while(0);xv=Pca+(Wu<<3)|0,yv=$u+av|0,zv=yv+cv|0,Av=Zca+(zv<<3)|0,f[xv>>2]=0|f[Av>>2],f[xv+4>>2]=0|f[Av+4>>2],Cv=fca+4|0,Dv=0|f[Cv>>2],Ev=127&Dv,Fv=200+(Ev<<2)|0,Gv=0|f[Fv>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=Gv,rba=Dv,fca=Cv,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 45:Hv=rba>>>23,Iv=511&Hv,Jv=Pca+(Iv<<3)|0,Kv=Jv+4|0,Lv=0|f[Kv>>2],Nv=65535&Lv,Ov=65535&Nv,Pv=Ov<<8,Qv=Iv+1|0,Rv=Pca+(Qv<<3)|0,Sv=Rv+4|0,Tv=0|f[Sv>>2],Uv=65535&Tv,Vv=65535&Uv,Wv=255&Vv,Yv=Pv|Wv;d:do switch(0|Yv){case 771:if(Zv=Pca+(Iv<<3)|0,$v=0|f[Zv>>2],_v=Zv+8|0,aw=0|f[_v>>2],q=0,bw=0|ja(181,0|$v,0|aw,0|xda),cw=q,q=0,0!=(0|cw)&0!=(0|r)?(dw=0|rw(0|f[cw>>2],0|Cda,0|Dda),0==(0|dw)&&Aa(0|cw,0|r),F=r):dw=-1,ew=F,W8=1==(0|dw)){uca=tca,y7=x7,i=w,Ga=ew,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(hw=bw<<24>>24!=0){jw=Zv+4|0,f[jw>>2]=6,kw=+(0|$v),lw=+(0|aw),mw=kw+lw,j[Zv>>2]=mw;break d}nw=Pca+(Iv<<3)|0,ow=nw+4|0,f[ow>>2]=3,qw=0|f[xda>>2],sw=Pca+(Iv<<3)|0,f[sw>>2]=qw;break d;case 774:tw=Pca+(Iv<<3)|0,uw=0|f[tw>>2],ww=Iv+1|0,xw=Pca+(ww<<3)|0,yw=+j[xw>>2],zw=Pca+(Iv<<3)|0,Aw=zw+4|0,f[Aw>>2]=6,Bw=+(0|uw),Cw=Bw+yw,Dw=Pca+(Iv<<3)|0,j[Dw>>2]=Cw;break;case 1539:Ew=Pca+(Iv<<3)|0,Fw=+j[Ew>>2],Hw=Iv+1|0,Iw=Pca+(Hw<<3)|0,Jw=0|f[Iw>>2],Kw=+(0|Jw),Lw=Fw+Kw,Mw=Pca+(Iv<<3)|0,j[Mw>>2]=Lw;break;case 1542:Nw=Pca+(Iv<<3)|0,Ow=+j[Nw>>2],Pw=Iv+1|0,Qw=Pca+(Pw<<3)|0,Sw=+j[Qw>>2],Tw=Ow+Sw,Uw=Pca+(Iv<<3)|0,j[Uw>>2]=Tw;break;case 4112:if(Vw=Pca+(Iv<<3)|0,Ww=Pca+(Iv<<3)|0,Xw=Iv+1|0,Yw=Pca+(Xw<<3)|0,q=0,f[T>>2]=0|f[Ww>>2],f[T+4>>2]=0|f[Ww+4>>2],f[U>>2]=0|f[Yw>>2],f[U+4>>2]=0|f[Yw+4>>2],ta(182,0|UN,0|b,0|T,0|U),Zw=q,q=0,0!=(0|Zw)&0!=(0|r)?($w=0|rw(0|f[Zw>>2],0|Cda,0|Dda),0==(0|$w)&&Aa(0|Zw,0|r),F=r):$w=-1,_w=F,V8=1==(0|$w)){uca=tca,y7=x7,i=w,Ga=_w,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[Vw>>2]=0|f[UN>>2],f[Vw+4>>2]=0|f[UN+4>>2];break;default:pba=rba,Eda=92;break c}while(0);bx=b+92|0,cx=bx+416|0,f[cx>>2]=x7,dx=fca+4|0,ex=0|f[dx>>2],fx=127&ex,gx=200+(fx<<2)|0,hx=0|f[gx>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=hx,rba=ex,fca=dx,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 46:YA=rba>>>23,ZA=511&YA,$A=Pca+(ZA<<3)|0,_A=$A+4|0,aB=0|f[_A>>2];d:do switch(0|aB){case 3:if(bB=Pca+(ZA<<3)|0,cB=0|f[bB>>2],dB=rba>>>7,eB=127&dB,q=0,fB=0|ja(181,0|cB,0|eB,0|Ada),hB=q,q=0,0!=(0|hB)&0!=(0|r)?(iB=0|rw(0|f[hB>>2],0|Cda,0|Dda),0==(0|iB)&&Aa(0|hB,0|r),F=r):iB=-1,jB=F,U8=1==(0|iB)){uca=tca,y7=x7,i=w,Ga=jB,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(kB=fB<<24>>24!=0,lB=Pca+(ZA<<3)|0,mB=lB+4|0,kB){f[mB>>2]=6,nB=+(0|cB),oB=+(0|eB),pB=nB+oB,qB=Pca+(ZA<<3)|0,j[qB>>2]=pB;break d}f[mB>>2]=3,sB=0|f[Ada>>2],tB=Pca+(ZA<<3)|0,f[tB>>2]=sB;break d;case 6:uB=rba>>>7,vB=127&uB,wB=+(0|vB),xB=Pca+(ZA<<3)|0,yB=+j[xB>>2],zB=yB+wB,j[xB>>2]=zB;break;default:AB=ZA+1|0,BB=Pca+(AB<<3)|0,EB=BB+4|0,f[EB>>2]=3,FB=rba>>>7,GB=127&FB,HB=ZA+1|0,IB=Pca+(HB<<3)|0,f[IB>>2]=GB,JB=511&ZA,KB=JB<<23,LB=32|KB,MB=rba>>>14,NB=511&MB,PB=511&NB,QB=PB<<14,RB=LB|QB,SB=128|RB,pba=SB,Eda=92;break c}while(0);TB=fca+4|0,UB=0|f[TB>>2],VB=127&UB,WB=200+(VB<<2)|0,XB=0|f[WB>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=XB,rba=UB,fca=TB,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 47:ix=rba>>>23,jx=511&ix,kx=Pca+(jx<<3)|0,mx=kx+4|0,nx=0|f[mx>>2],ox=65535&nx,px=65535&ox,qx=px<<8,rx=jx+1|0,sx=Pca+(rx<<3)|0,tx=sx+4|0,ux=0|f[tx>>2],vx=65535&ux,yx=65535&vx,zx=255&yx,Ax=qx|zx;d:do switch(0|Ax){case 771:if(Bx=Pca+(jx<<3)|0,Cx=0|f[Bx>>2],Dx=jx+1|0,Ex=Pca+(Dx<<3)|0,Fx=0|f[Ex>>2],q=0,Gx=0|ja(183,0|Cx,0|Fx,0|yda),Hx=q,q=0,0!=(0|Hx)&0!=(0|r)?(Jx=0|rw(0|f[Hx>>2],0|Cda,0|Dda),0==(0|Jx)&&Aa(0|Hx,0|r),F=r):Jx=-1,Kx=F,T8=1==(0|Jx)){uca=tca,y7=x7,i=w,Ga=Kx,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(Lx=Gx<<24>>24!=0,Mx=Pca+(jx<<3)|0,Nx=Mx+4|0,Lx){f[Nx>>2]=6,Ox=+(0|Cx),Px=+(0|Fx),Qx=Ox-Px,Rx=Pca+(jx<<3)|0,j[Rx>>2]=Qx;break d}f[Nx>>2]=3,Sx=0|f[yda>>2],Ux=Pca+(jx<<3)|0,f[Ux>>2]=Sx;break d;case 774:Vx=Pca+(jx<<3)|0,Wx=0|f[Vx>>2],Xx=jx+1|0,Yx=Pca+(Xx<<3)|0,Zx=+j[Yx>>2],$x=Pca+(jx<<3)|0,_x=$x+4|0,f[_x>>2]=6,ay=+(0|Wx),by=ay-Zx,dy=Pca+(jx<<3)|0,j[dy>>2]=by;break;case 1539:ey=Pca+(jx<<3)|0,fy=+j[ey>>2],gy=jx+1|0,hy=Pca+(gy<<3)|0,iy=0|f[hy>>2],jy=+(0|iy),ky=fy-jy,ly=Pca+(jx<<3)|0,j[ly>>2]=ky;break;case 1542:my=Pca+(jx<<3)|0,oy=+j[my>>2],py=jx+1|0,qy=Pca+(py<<3)|0,ry=+j[qy>>2],sy=oy-ry,ty=Pca+(jx<<3)|0,j[ty>>2]=sy;break;default:pba=rba,Eda=92;break c}while(0);uy=fca+4|0,vy=0|f[uy>>2],wy=127&vy,xy=200+(wy<<2)|0,zy=0|f[xy>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=zy,rba=vy,fca=uy,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 48:YB=rba>>>23,$B=511&YB,_B=Pca+($B<<3)|0,aC=_B+4|0,bC=0|f[aC>>2];d:do switch(0|bC){case 3:if(cC=0|f[_B>>2],dC=rba>>>7,eC=127&dC,q=0,fC=0|ja(183,0|cC,0|eC,0|Bda),gC=q,q=0,0!=(0|gC)&0!=(0|r)?(hC=0|rw(0|f[gC>>2],0|Cda,0|Dda),0==(0|hC)&&Aa(0|gC,0|r),F=r):hC=-1,jC=F,S8=1==(0|hC)){uca=tca,y7=x7,i=w,Ga=jC,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(kC=fC<<24>>24!=0,lC=_B+4|0,kC){f[lC>>2]=6,mC=+(0|cC),nC=+(0|eC),oC=mC-nC,j[_B>>2]=oC;break d}f[lC>>2]=3,pC=0|f[Bda>>2],f[_B>>2]=pC;break d;case 6:qC=rba>>>7,rC=127&qC,sC=+(0|rC),uC=+j[_B>>2],vC=uC-sC,j[_B>>2]=vC;break;default:wC=_B+8|0,xC=wC+4|0,f[xC>>2]=3,yC=rba>>>7,zC=127&yC,AC=_B+8|0,f[AC>>2]=zC,BC=511&$B,CC=BC<<23,DC=32|CC,FC=rba>>>14,GC=511&FC,HC=511&GC,IC=HC<<14,JC=DC|IC,KC=128|JC,pba=KC,Eda=92;break c}while(0);LC=fca+4|0,MC=0|f[LC>>2],NC=127&MC,OC=200+(NC<<2)|0,QC=0|f[OC>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=QC,rba=MC,fca=LC,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 49:Ay=rba>>>23,By=511&Ay,Cy=Pca+(By<<3)|0,Dy=Cy+4|0,Ey=0|f[Dy>>2],Fy=65535&Ey,Gy=65535&Fy,Hy=Gy<<8,Iy=By+1|0,Ky=Pca+(Iy<<3)|0,Ly=Ky+4|0,My=0|f[Ly>>2],Ny=65535&My,Oy=65535&Ny,Py=255&Oy,Qy=Hy|Py;d:do switch(0|Qy){case 771:if(Ry=Pca+(By<<3)|0,Sy=By+1|0,Ty=Pca+(Sy<<3)|0,q=0,f[V>>2]=0|f[Ry>>2],f[V+4>>2]=0|f[Ry+4>>2],f[W>>2]=0|f[Ty>>2],f[W+4>>2]=0|f[Ty+4>>2],ta(184,0|YP,0|b,0|V,0|W),Vy=q,q=0,0!=(0|Vy)&0!=(0|r)?(Wy=0|rw(0|f[Vy>>2],0|Cda,0|Dda),0==(0|Wy)&&Aa(0|Vy,0|r),F=r):Wy=-1,Xy=F,R8=1==(0|Wy)){uca=tca,y7=x7,i=w,Ga=Xy,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}switch(f[zda>>2]=0|f[YP>>2],f[zda+4>>2]=0|f[YP+4>>2],Yy=zda+4|0,Zy=0|f[Yy>>2],0|Zy){case 3:$y=Pca+(By<<3)|0,_y=$y+4|0,f[_y>>2]=3,az=0|f[zda>>2],bz=Pca+(By<<3)|0,f[bz>>2]=az;break d;case 6:cz=Pca+(By<<3)|0,ez=cz+4|0,f[ez>>2]=6,fz=+j[zda>>2],gz=Pca+(By<<3)|0,j[gz>>2]=fz;break d;default:break d}break;case 774:hz=Pca+(By<<3)|0,iz=0|f[hz>>2],jz=By+1|0,kz=Pca+(jz<<3)|0,lz=+j[kz>>2],mz=Pca+(By<<3)|0,nz=mz+4|0,f[nz>>2]=6,pz=+(0|iz),qz=pz*lz,rz=Pca+(By<<3)|0,j[rz>>2]=qz;break;case 1539:sz=Pca+(By<<3)|0,tz=+j[sz>>2],uz=By+1|0,vz=Pca+(uz<<3)|0,wz=0|f[vz>>2],xz=+(0|wz),yz=tz*xz,Bz=Pca+(By<<3)|0,j[Bz>>2]=yz;break;case 1542:Cz=Pca+(By<<3)|0,Dz=+j[Cz>>2],Ez=By+1|0,Fz=Pca+(Ez<<3)|0,Gz=+j[Fz>>2],Hz=Dz*Gz,Iz=Pca+(By<<3)|0,j[Iz>>2]=Hz;break;default:pba=rba,Eda=92;break c}while(0);Jz=fca+4|0,Kz=0|f[Jz>>2],Mz=127&Kz,Nz=200+(Mz<<2)|0,Oz=0|f[Nz>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=Oz,rba=Kz,fca=Jz,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 50:switch(Pz=rba>>>23,Qz=511&Pz,Rz=Pca+(Qz<<3)|0,Sz=Rz+4|0,Tz=0|f[Sz>>2],Uz=65535&Tz,Vz=65535&Uz,Xz=Vz<<8,Yz=Qz+1|0,Zz=Pca+(Yz<<3)|0,$z=Zz+4|0,_z=0|f[$z>>2],aA=65535&_z,bA=65535&aA,cA=255&bA,dA=Xz|cA,0|dA){case 771:eA=Pca+(Qz<<3)|0,gA=0|f[eA>>2],hA=Qz+1|0,iA=Pca+(hA<<3)|0,jA=0|f[iA>>2],kA=Pca+(Qz<<3)|0,lA=kA+4|0,f[lA>>2]=6,mA=+(0|gA),nA=+(0|jA),oA=mA/nA,pA=Pca+(Qz<<3)|0,j[pA>>2]=oA;break;case 774:rA=Pca+(Qz<<3)|0,sA=0|f[rA>>2],tA=Qz+1|0,uA=Pca+(tA<<3)|0,vA=+j[uA>>2],wA=Pca+(Qz<<3)|0,xA=wA+4|0,f[xA>>2]=6,yA=+(0|sA),zA=yA/vA,AA=Pca+(Qz<<3)|0,j[AA>>2]=zA;break;case 1539:CA=Pca+(Qz<<3)|0,DA=+j[CA>>2],EA=Qz+1|0,FA=Pca+(EA<<3)|0,GA=0|f[FA>>2],HA=+(0|GA),IA=DA/HA,JA=Pca+(Qz<<3)|0,j[JA>>2]=IA;break;case 1542:KA=Pca+(Qz<<3)|0,LA=+j[KA>>2],NA=Qz+1|0,OA=Pca+(NA<<3)|0,PA=+j[OA>>2],QA=LA/PA,RA=Pca+(Qz<<3)|0,j[RA>>2]=QA;break;default:pba=rba,Eda=92;break c}SA=fca+4|0,TA=0|f[SA>>2],UA=127&TA,VA=200+(UA<<2)|0,WA=0|f[VA>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=WA,rba=TA,fca=SA,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 51:if(RC=rba>>>23,SC=511&RC,TC=Pca+(SC<<3)|0,UC=SC+1|0,VC=Pca+(UC<<3)|0,q=0,f[Y>>2]=0|f[TC>>2],f[Y+4>>2]=0|f[TC+4>>2],f[Z>>2]=0|f[VC>>2],f[Z+4>>2]=0|f[VC+4>>2],WC=0|ja(185,0|b,0|Y,0|Z),XC=q,q=0,0!=(0|XC)&0!=(0|r)?(YC=0|rw(0|f[XC>>2],0|Cda,0|Dda),0==(0|YC)&&Aa(0|XC,0|r),F=r):YC=-1,ZC=F,Q8=1==(0|YC)){uca=tca,y7=x7,i=w,Ga=ZC,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}_C=WC<<24>>24!=0,aD=Pca+(SC<<3)|0,bD=aD+4|0;do{if(!_C){switch(dD=0|f[bD>>2],eD=65535&dD,fD=65535&eD,gD=fD<<8,hD=SC+1|0,iD=Pca+(hD<<3)|0,kD=iD+4|0,lD=0|f[kD>>2],mD=65535&lD,nD=65535&mD,oD=255&nD,pD=gD|oD,0|pD){case 771:qD=Pca+(SC<<3)|0,rD=0|f[qD>>2],sD=SC+1|0,tD=Pca+(sD<<3)|0,vD=0|f[tD>>2],wD=(0|rD)==(0|vD),xD=1&wD,Sca=xD;break;case 774:yD=Pca+(SC<<3)|0,zD=0|f[yD>>2],AD=+(0|zD),BD=SC+1|0,CD=Pca+(BD<<3)|0,DD=+j[CD>>2],ED=AD==DD,HD=1&ED,Sca=HD;break;case 1539:ID=Pca+(SC<<3)|0,JD=+j[ID>>2],KD=SC+1|0,LD=Pca+(KD<<3)|0,MD=0|f[LD>>2],ND=+(0|MD),OD=JD==ND,PD=1&OD,Sca=PD;break;case 1542:QD=Pca+(SC<<3)|0,SD=+j[QD>>2],TD=SC+1|0,UD=Pca+(TD<<3)|0,VD=+j[UD>>2],WD=SD==VD,XD=1&WD,Sca=XD;break;default:pba=rba,Eda=92;break c}if(YD=0!=(0|Sca),ZD=Pca+(SC<<3)|0,$D=ZD+4|0,YD){f[$D>>2]=2,_D=Pca+(SC<<3)|0,f[_D>>2]=1;break}f[$D>>2]=0,bE=Pca+(SC<<3)|0,f[bE>>2]=1;break}f[bD>>2]=2,cD=Pca+(SC<<3)|0,f[cD>>2]=1}while(0);cE=fca+4|0,dE=0|f[cE>>2],eE=127&dE,fE=200+(eE<<2)|0,gE=0|f[fE>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=gE,rba=dE,fca=cE,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 52:switch(hE=rba>>>23,iE=511&hE,jE=Pca+(iE<<3)|0,kE=jE+4|0,mE=0|f[kE>>2],nE=65535&mE,oE=65535&nE,pE=oE<<8,qE=iE+1|0,rE=Pca+(qE<<3)|0,sE=rE+4|0,tE=0|f[sE>>2],uE=65535&tE,vE=65535&uE,xE=255&vE,yE=pE|xE,0|yE){case 771:zE=Pca+(iE<<3)|0,AE=0|f[zE>>2],BE=iE+1|0,CE=Pca+(BE<<3)|0,DE=0|f[CE>>2],EE=(0|AE)<(0|DE),FE=1&EE,Tca=FE;break;case 774:GE=Pca+(iE<<3)|0,IE=0|f[GE>>2],JE=+(0|IE),KE=iE+1|0,LE=Pca+(KE<<3)|0,ME=+j[LE>>2],NE=JE<ME,OE=1&NE,Tca=OE;break;case 1539:PE=Pca+(iE<<3)|0,QE=+j[PE>>2],RE=iE+1|0,TE=Pca+(RE<<3)|0,UE=0|f[TE>>2],VE=+(0|UE),WE=QE<VE,XE=1&WE,Tca=XE;break;case 1542:YE=Pca+(iE<<3)|0,ZE=+j[YE>>2],$E=iE+1|0,_E=Pca+($E<<3)|0,aF=+j[_E>>2],cF=ZE<aF,dF=1&cF,Tca=dF;break;default:pba=rba,Eda=92;break c}eF=0!=(0|Tca),fF=Pca+(iE<<3)|0,gF=fF+4|0,eF?(f[gF>>2]=2,hF=Pca+(iE<<3)|0,f[hF>>2]=1):(f[gF>>2]=0,iF=Pca+(iE<<3)|0,f[iF>>2]=1),jF=fca+4|0,kF=0|f[jF>>2],lF=127&kF,nF=200+(lF<<2)|0,oF=0|f[nF>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=oF,rba=kF,fca=jF,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 53:switch(pF=rba>>>23,qF=511&pF,rF=Pca+(qF<<3)|0,sF=rF+4|0,tF=0|f[sF>>2],uF=65535&tF,vF=65535&uF,wF=vF<<8,yF=qF+1|0,zF=Pca+(yF<<3)|0,AF=zF+4|0,BF=0|f[AF>>2],CF=65535&BF,DF=65535&CF,EF=255&DF,FF=wF|EF,0|FF){case 771:GF=Pca+(qF<<3)|0,HF=0|f[GF>>2],KF=qF+1|0,LF=Pca+(KF<<3)|0,MF=0|f[LF>>2],NF=(0|HF)<=(0|MF),OF=1&NF,Uca=OF;break;case 774:PF=Pca+(qF<<3)|0,QF=0|f[PF>>2],RF=+(0|QF),SF=qF+1|0,TF=Pca+(SF<<3)|0,VF=+j[TF>>2],WF=RF<=VF,XF=1&WF,Uca=XF;break;case 1539:YF=Pca+(qF<<3)|0,ZF=+j[YF>>2],$F=qF+1|0,_F=Pca+($F<<3)|0,aG=0|f[_F>>2],bG=+(0|aG),cG=ZF<=bG,eG=1&cG,Uca=eG;break;case 1542:fG=Pca+(qF<<3)|0,gG=+j[fG>>2],hG=qF+1|0,iG=Pca+(hG<<3)|0,jG=+j[iG>>2],kG=gG<=jG,lG=1&kG,Uca=lG;break;default:pba=rba,Eda=92;break c}mG=0!=(0|Uca),nG=Pca+(qF<<3)|0,pG=nG+4|0,mG?(f[pG>>2]=2,qG=Pca+(qF<<3)|0,f[qG>>2]=1):(f[pG>>2]=0,rG=Pca+(qF<<3)|0,f[rG>>2]=1),sG=fca+4|0,tG=0|f[sG>>2],uG=127&tG,vG=200+(uG<<2)|0,wG=0|f[vG>>2],nda=mda,
+Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=wG,rba=tG,fca=sG,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 54:switch(xG=rba>>>23,yG=511&xG,AG=Pca+(yG<<3)|0,BG=AG+4|0,CG=0|f[BG>>2],DG=65535&CG,EG=65535&DG,FG=EG<<8,GG=yG+1|0,HG=Pca+(GG<<3)|0,IG=HG+4|0,JG=0|f[IG>>2],LG=65535&JG,MG=65535&LG,NG=255&MG,OG=FG|NG,0|OG){case 771:PG=Pca+(yG<<3)|0,QG=0|f[PG>>2],RG=yG+1|0,SG=Pca+(RG<<3)|0,TG=0|f[SG>>2],UG=(0|QG)>(0|TG),WG=1&UG,Vca=WG;break;case 774:XG=Pca+(yG<<3)|0,YG=0|f[XG>>2],ZG=+(0|YG),$G=yG+1|0,_G=Pca+($G<<3)|0,aH=+j[_G>>2],bH=ZG>aH,cH=1&bH,Vca=cH;break;case 1539:dH=Pca+(yG<<3)|0,fH=+j[dH>>2],gH=yG+1|0,hH=Pca+(gH<<3)|0,iH=0|f[hH>>2],jH=+(0|iH),kH=fH>jH,lH=1&kH,Vca=lH;break;case 1542:mH=Pca+(yG<<3)|0,nH=+j[mH>>2],oH=yG+1|0,qH=Pca+(oH<<3)|0,rH=+j[qH>>2],sH=nH>rH,tH=1&sH,Vca=tH;break;default:pba=rba,Eda=92;break c}uH=0!=(0|Vca),vH=Pca+(yG<<3)|0,wH=vH+4|0,uH?(f[wH>>2]=2,xH=Pca+(yG<<3)|0,f[xH>>2]=1):(f[wH>>2]=0,yH=Pca+(yG<<3)|0,f[yH>>2]=1),zH=fca+4|0,BH=0|f[zH>>2],CH=127&BH,DH=200+(CH<<2)|0,EH=0|f[DH>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=EH,rba=BH,fca=zH,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 55:switch(FH=rba>>>23,GH=511&FH,HH=Pca+(GH<<3)|0,IH=HH+4|0,JH=0|f[IH>>2],KH=65535&JH,NH=65535&KH,OH=NH<<8,PH=GH+1|0,QH=Pca+(PH<<3)|0,RH=QH+4|0,SH=0|f[RH>>2],TH=65535&SH,UH=65535&TH,VH=255&UH,WH=OH|VH,0|WH){case 771:YH=Pca+(GH<<3)|0,ZH=0|f[YH>>2],$H=GH+1|0,_H=Pca+($H<<3)|0,aI=0|f[_H>>2],bI=(0|ZH)>=(0|aI),cI=1&bI,Wca=cI;break;case 774:dI=Pca+(GH<<3)|0,eI=0|f[dI>>2],fI=+(0|eI),hI=GH+1|0,iI=Pca+(hI<<3)|0,jI=+j[iI>>2],kI=fI>=jI,lI=1&kI,Wca=lI;break;case 1539:mI=Pca+(GH<<3)|0,nI=+j[mI>>2],oI=GH+1|0,pI=Pca+(oI<<3)|0,qI=0|f[pI>>2],sI=+(0|qI),tI=nI>=sI,uI=1&tI,Wca=uI;break;case 1542:vI=Pca+(GH<<3)|0,wI=+j[vI>>2],xI=GH+1|0,yI=Pca+(xI<<3)|0,zI=+j[yI>>2],AI=wI>=zI,BI=1&AI,Wca=BI;break;default:pba=rba,Eda=92;break c}DI=0!=(0|Wca),EI=Pca+(GH<<3)|0,FI=EI+4|0,DI?(f[FI>>2]=2,GI=Pca+(GH<<3)|0,f[GI>>2]=1):(f[FI>>2]=0,HI=Pca+(GH<<3)|0,f[HI>>2]=1),II=fca+4|0,JI=0|f[II>>2],KI=127&JI,LI=200+(KI<<2)|0,MI=0|f[LI>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=MI,rba=JI,fca=II,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 56:if(OI=rba>>>23,PI=511&OI,QI=Pca+(PI<<3)|0,RI=rba>>>7,SI=127&RI,TI=rba>>>14,UI=511&TI,VI=Pca+(UI<<3)|0,q=0,ta(167,0|_R,0|b,0|SI,0|VI),WI=q,q=0,0!=(0|WI)&0!=(0|r)?(XI=0|rw(0|f[WI>>2],0|Cda,0|Dda),0==(0|XI)&&Aa(0|WI,0|r),F=r):XI=-1,ZI=F,P8=1==(0|XI)){uca=tca,y7=x7,i=w,Ga=ZI,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[QI>>2]=0|f[_R>>2],f[QI+4>>2]=0|f[_R+4>>2],$I=b+92|0,_I=$I+416|0,f[_I>>2]=x7,aJ=fca+4|0,bJ=0|f[aJ>>2],cJ=127&bJ,dJ=200+(cJ<<2)|0,eJ=0|f[dJ>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=eJ,rba=bJ,fca=aJ,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 57:if(fJ=rba>>>23,gJ=511&fJ,iJ=Pca+(gJ<<3)|0,jJ=rba>>>14,kJ=511&jJ,lJ=Pca+(kJ<<3)|0,q=0,f[$>>2]=0|f[lJ>>2],f[$+4>>2]=0|f[lJ+4>>2],pa(186,0|cU,0|b,0|$),mJ=q,q=0,0!=(0|mJ)&0!=(0|r)?(nJ=0|rw(0|f[mJ>>2],0|Cda,0|Dda),0==(0|nJ)&&Aa(0|mJ,0|r),F=r):nJ=-1,oJ=F,N8=1==(0|nJ)){uca=tca,y7=x7,i=w,Ga=oJ,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(q=0,f[_>>2]=0|f[iJ>>2],f[_+4>>2]=0|f[iJ+4>>2],f[aa>>2]=0|f[cU>>2],f[aa+4>>2]=0|f[cU+4>>2],pa(187,0|b,0|_,0|aa),pJ=q,q=0,0!=(0|pJ)&0!=(0|r)?(qJ=0|rw(0|f[pJ>>2],0|Cda,0|Dda),0==(0|qJ)&&Aa(0|pJ,0|r),F=r):qJ=-1,rJ=F,O8=1==(0|qJ)){uca=tca,y7=x7,i=w,Ga=rJ,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}tJ=b+92|0,uJ=tJ+416|0,f[uJ>>2]=x7,vJ=fca+4|0,wJ=0|f[vJ>>2],xJ=127&wJ,yJ=200+(xJ<<2)|0,zJ=0|f[yJ>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=zJ,rba=wJ,fca=vJ,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 58:if(AJ=rba>>>23,BJ=511&AJ,CJ=Pca+(BJ<<3)|0,EJ=rba>>>14,FJ=511&EJ,GJ=Pca+(FJ<<3)|0,q=0,f[ba>>2]=0|f[CJ>>2],f[ba+4>>2]=0|f[CJ+4>>2],f[ca>>2]=0|f[GJ>>2],f[ca+4>>2]=0|f[GJ+4>>2],pa(188,0|b,0|ba,0|ca),HJ=q,q=0,0!=(0|HJ)&0!=(0|r)?(IJ=0|rw(0|f[HJ>>2],0|Cda,0|Dda),0==(0|IJ)&&Aa(0|HJ,0|r),F=r):IJ=-1,JJ=F,M8=1==(0|IJ)){uca=tca,y7=x7,i=w,Ga=JJ,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}KJ=fca+4|0,LJ=0|f[KJ>>2],MJ=127&LJ,NJ=200+(MJ<<2)|0,QJ=0|f[NJ>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=QJ,rba=LJ,fca=KJ,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 59:RJ=rba>>>23,SJ=511&RJ,TJ=rba>>>7,UJ=127&TJ,VJ=rba>>>14,WJ=511&VJ,XJ=Pca+(WJ<<3)|0,f[pda>>2]=0|f[XJ>>2],f[pda+4>>2]=0|f[XJ+4>>2],YJ=pda+4|0,ZJ=0|f[YJ>>2],_J=14==(0|ZJ);do{if(!_J){if(aK=0==(0|UJ)){bK=rba>>>23,cK=511&bK,dK=Pca+(cK<<3)|0,f[dK>>2]=0|f[pda>>2],f[dK+4>>2]=0|f[pda+4>>2];break}eK=Pca+(SJ<<3)|0,fK=eK+4|0,f[fK>>2]=0,gK=Pca+(SJ<<3)|0,f[gK>>2]=0;break}if(hK=rba>>>23,iK=511&hK,kK=Pca+(iK<<3)|0,q=0,f[qda>>2]=0|f[pda>>2],f[qda+4>>2]=0|f[pda+4>>2],ta(189,0|HV,0|b,0|qda,0|UJ),lK=q,q=0,0!=(0|lK)&0!=(0|r)?(mK=0|rw(0|f[lK>>2],0|Cda,0|Dda),0==(0|mK)&&Aa(0|lK,0|r),F=r):mK=-1,nK=F,L8=1==(0|mK)){uca=tca,y7=x7,i=w,Ga=nK,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[kK>>2]=0|f[HV>>2],f[kK+4>>2]=0|f[HV+4>>2]}while(0);oK=fca+4|0,pK=0|f[oK>>2],qK=127&pK,rK=200+(qK<<2)|0,sK=0|f[rK>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=sK,rba=pK,fca=oK,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 60:if(tK=rba>>>14,vK=511&tK,wK=Pca+(vK<<3)|0,xK=rba>>>7,yK=127&xK,zK=rba>>>23,AK=511&zK,BK=Pca+(AK<<3)|0,q=0,f[da>>2]=0|f[wK>>2],f[da+4>>2]=0|f[wK+4>>2],f[ea>>2]=0|f[BK>>2],f[ea+4>>2]=0|f[BK+4>>2],ta(190,0|b,0|da,0|yK,0|ea),CK=q,q=0,0!=(0|CK)&0!=(0|r)?(DK=0|rw(0|f[CK>>2],0|Cda,0|Dda),0==(0|DK)&&Aa(0|CK,0|r),F=r):DK=-1,EK=F,K8=1==(0|DK)){uca=tca,y7=x7,i=w,Ga=EK,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}GK=fca+4|0,HK=0|f[GK>>2],IK=127&HK,JK=200+(IK<<2)|0,KK=0|f[JK>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=KK,rba=HK,fca=GK,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 61:if(LK=rba>>>23,MK=511&LK,NK=Pca+(MK<<3)|0,f[rda>>2]=0|f[NK>>2],f[rda+4>>2]=0|f[NK+4>>2],OK=rba>>>14,PK=511&OK,RK=rba>>>7,SK=127&RK,TK=rda+4|0,UK=0|f[TK>>2],VK=14==(0|UK),!VK){if(WK=Pca+(MK<<3)|0,q=0,ta(167,0|SV,0|b,1,0|WK),XK=q,q=0,0!=(0|XK)&0!=(0|r)?(YK=0|rw(0|f[XK>>2],0|Cda,0|Dda),0==(0|YK)&&Aa(0|XK,0|r),F=r):YK=-1,ZK=F,H8=1==(0|YK)){uca=tca,y7=x7,i=w,Ga=ZK,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[rda>>2]=0|f[SV>>2],f[rda+4>>2]=0|f[SV+4>>2]}$K=0|f[rda>>2],aL=$K+12|0,bL=0|f[aL>>2],cL=PK+SK|0,dL=(0|bL)>(0|cL),eL=MK+1|0,fL=Pca+(MK<<3)|0;d:do if(dL){if(gL=bL-PK|0,hL=gL-SK|0,iL=$K+20|0,jL=0|f[iL>>2],lL=jL+(PK<<3)|0,q=0,ta(167,0|bW,0|b,0|hL,0|lL),mL=q,q=0,0!=(0|mL)&0!=(0|r)?(nL=0|rw(0|f[mL>>2],0|Cda,0|Dda),0==(0|nL)&&Aa(0|mL,0|r),F=r):nL=-1,oL=F,J8=1==(0|nL)){uca=tca,y7=x7,i=w,Ga=oL,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}for(f[fL>>2]=0|f[bW>>2],f[fL+4>>2]=0|f[bW+4>>2],v7=eL,qca=SK;;){if(pL=qca+-1|0,qL=0!=(0|qca),!qL)break d;rL=v7+1|0,sL=Pca+(v7<<3)|0,tL=bL-pL|0,uL=tL-1|0,wL=$K+20|0,xL=0|f[wL>>2],yL=xL+(uL<<3)|0,f[sL>>2]=0|f[yL>>2],f[sL+4>>2]=0|f[yL+4>>2],v7=rL,qca=pL}}else{if(q=0,pa(173,0|mW,0|b,0),zL=q,q=0,0!=(0|zL)&0!=(0|r)?(AL=0|rw(0|f[zL>>2],0|Cda,0|Dda),0==(0|AL)&&Aa(0|zL,0|r),F=r):AL=-1,BL=F,I8=1==(0|AL)){uca=tca,y7=x7,i=w,Ga=BL,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}for(f[fL>>2]=0|f[mW>>2],f[fL+4>>2]=0|f[mW+4>>2],sba=0;;){if(CL=sba+PK|0,DL=(0|CL)<(0|bL),!DL){tba=sba;break}EL=eL+sba|0,FL=Pca+(EL<<3)|0,HL=PK+sba|0,IL=$K+20|0,JL=0|f[IL>>2],KL=JL+(HL<<3)|0,f[FL>>2]=0|f[KL>>2],f[FL+4>>2]=0|f[KL+4>>2],LL=sba+1|0,sba=LL}for(;;){if(ML=(0|tba)<(0|SK),!ML)break d;NL=eL+tba|0,OL=Pca+(NL<<3)|0,PL=OL+4|0,f[PL>>2]=0,QL=eL+tba|0,TL=Pca+(QL<<3)|0,f[TL>>2]=0,UL=tba+1|0,tba=UL}}while(0);VL=b+92|0,WL=VL+416|0,f[WL>>2]=x7,XL=fca+4|0,YL=0|f[XL>>2],ZL=127&YL,$L=200+(ZL<<2)|0,_L=0|f[$L>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=_L,rba=YL,fca=XL,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 62:if(aM=rba>>>23,cM=511&aM,dM=Pca+(cM<<3)|0,eM=rba>>>7,fM=65535&eM,gM=oca+(fM<<3)|0,q=0,f[fa>>2]=0|f[gM>>2],f[fa+4>>2]=0|f[gM+4>>2],pa(191,0|xW,0|b,0|fa),hM=q,q=0,0!=(0|hM)&0!=(0|r)?(iM=0|rw(0|f[hM>>2],0|Cda,0|Dda),0==(0|iM)&&Aa(0|hM,0|r),F=r):iM=-1,jM=F,G8=1==(0|iM)){uca=tca,y7=x7,i=w,Ga=jM,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[dM>>2]=0|f[xW>>2],f[dM+4>>2]=0|f[xW+4>>2],kM=b+92|0,lM=kM+416|0,f[lM>>2]=x7,nM=fca+4|0,oM=0|f[nM>>2],pM=127&oM,qM=200+(pM<<2)|0,rM=0|f[qM>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=rM,rba=oM,fca=nM,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 63:if(sM=rba>>>23,tM=511&sM,uM=Pca+(tM<<3)|0,vM=rba>>>14,wM=511&vM,yM=Pca+(wM<<3)|0,q=0,f[ga>>2]=0|f[uM>>2],f[ga+4>>2]=0|f[uM+4>>2],f[ha>>2]=0|f[yM>>2],f[ha+4>>2]=0|f[yM+4>>2],pa(192,0|b,0|ga,0|ha),zM=q,q=0,0!=(0|zM)&0!=(0|r)?(AM=0|rw(0|f[zM>>2],0|Cda,0|Dda),0==(0|AM)&&Aa(0|zM,0|r),F=r):AM=-1,BM=F,F8=1==(0|AM)){uca=tca,y7=x7,i=w,Ga=BM,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}CM=b+12|0,DM=0|f[CM>>2],EM=DM+4|0,FM=0|f[EM>>2],GM=fca+4|0,HM=0|f[GM>>2],JM=127&HM,KM=200+(JM<<2)|0,LM=0|f[KM>>2],nda=mda,pca=oca,Gba=Fba,mba=lba,x=w,za=LM,rba=HM,fca=GM,Pca=FM,mda=nda,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 64:if(MM=rba>>>14,NM=511&MM,OM=rba>>>7,PM=127&OM,QM=PM<<1,RM=NM+QM|0,q=0,pa(193,0|nba,0|b,0|PM),SM=q,q=0,0!=(0|SM)&0!=(0|r)?(UM=0|rw(0|f[SM>>2],0|Cda,0|Dda),0==(0|UM)&&Aa(0|SM,0|r),F=r):UM=-1,VM=F,D8=1==(0|UM)){uca=tca,y7=x7,i=w,Ga=VM,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}for(F7=NM;;){if(WM=(0|F7)<(0|RM),!WM)break;if(XM=Pca+(F7<<3)|0,YM=F7+1|0,ZM=Pca+(YM<<3)|0,q=0,f[oba>>2]=0|f[nba>>2],f[oba+4>>2]=0|f[nba+4>>2],f[ia>>2]=0|f[XM>>2],f[ia+4>>2]=0|f[XM+4>>2],f[ka>>2]=0|f[ZM>>2],f[ka+4>>2]=0|f[ZM+4>>2],ta(194,0|b,0|oba,0|ia,0|ka),$M=q,q=0,0!=(0|$M)&0!=(0|r)?(_M=0|rw(0|f[$M>>2],0|Cda,0|Dda),0==(0|_M)&&Aa(0|$M,0|r),F=r):_M=-1,aN=F,E8=1==(0|_M)){uca=tca,y7=x7,i=w,Ga=aN,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}bN=F7+2|0,F7=bN}dN=rba>>>23,eN=511&dN,fN=Pca+(eN<<3)|0,f[fN>>2]=0|f[nba>>2],f[fN+4>>2]=0|f[nba+4>>2],gN=b+92|0,hN=gN+416|0,f[hN>>2]=x7,iN=fca+4|0,jN=0|f[iN>>2],kN=127&jN,lN=200+(kN<<2)|0,mN=0|f[lN>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=mN,rba=jN,fca=iN,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 65:if(oN=rba>>>7,pN=3&oN,qN=2&pN,rN=0!=(0|qN),sN=rba>>>9,tN=16383&sN,uN=Fba+20|0,vN=0|f[uN>>2],wN=vN+(tN<<2)|0,xN=0|f[wN>>2],rN){if(q=0,zN=0|sa(165,0|b,0|xN),AN=q,q=0,0!=(0|AN)&0!=(0|r)?(BN=0|rw(0|f[AN>>2],0|Cda,0|Dda),0==(0|BN)&&Aa(0|AN,0|r),F=r):BN=-1,CN=F,C8=1==(0|BN)){uca=tca,y7=x7,i=w,Ga=CN,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}Yba=zN}else{if(q=0,DN=0|sa(195,0|b,0|xN),EN=q,q=0,0!=(0|EN)&0!=(0|r)?(FN=0|rw(0|f[EN>>2],0|Cda,0|Dda),0==(0|FN)&&Aa(0|EN,0|r),F=r):FN=-1,GN=F,A8=1==(0|FN)){uca=tca,y7=x7,i=w,Ga=GN,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}Yba=DN}if(HN=1&pN,IN=0!=(0|HN),IN&&(KN=0|f[Yba>>2],LN=KN>>>11,MN=256|LN,NN=0|f[Yba>>2],ON=2097151&MN,PN=ON<<11,QN=2047&NN,RN=QN|PN,f[Yba>>2]=RN),SN=rba>>>23,TN=511&SN,WN=Pca+(TN<<3)|0,q=0,na(133,0|IW,0|Yba),XN=q,q=0,0!=(0|XN)&0!=(0|r)?(YN=0|rw(0|f[XN>>2],0|Cda,0|Dda),0==(0|YN)&&Aa(0|XN,0|r),F=r):YN=-1,ZN=F,B8=1==(0|YN)){uca=tca,y7=x7,i=w,Ga=ZN,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[WN>>2]=0|f[IW>>2],f[WN+4>>2]=0|f[IW+4>>2],$N=b+92|0,_N=$N+416|0,f[_N>>2]=x7,aO=fca+4|0,bO=0|f[aO>>2],cO=127&bO,dO=200+(cO<<2)|0,fO=0|f[dO>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=fO,rba=bO,fca=aO,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 66:if(zT=rba>>>14,AT=511&zT,BT=rba>>>23,CT=511&BT,DT=Pca+(CT<<3)|0,ET=Pca+(AT<<3)|0,FT=AT+1|0,GT=Pca+(FT<<3)|0,HT=rba>>>7,JT=127&HT,KT=255&JT,q=0,f[wa>>2]=0|f[ET>>2],f[wa+4>>2]=0|f[ET+4>>2],f[xa>>2]=0|f[GT>>2],f[xa+4>>2]=0|f[GT+4>>2],la(200,0|LY,0|b,0|wa,0|xa,0|KT),LT=q,q=0,0!=(0|LT)&0!=(0|r)?(MT=0|rw(0|f[LT>>2],0|Cda,0|Dda),0==(0|MT)&&Aa(0|LT,0|r),F=r):MT=-1,NT=F,z8=1==(0|MT)){uca=tca,y7=x7,i=w,Ga=NT,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[DT>>2]=0|f[LY>>2],f[DT+4>>2]=0|f[LY+4>>2],OT=b+92|0,PT=OT+416|0,f[PT>>2]=x7,QT=fca+4|0,RT=0|f[QT>>2],ST=127&RT,UT=200+(ST<<2)|0,VT=0|f[UT>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=VT,rba=RT,fca=QT,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 67:if(gO=rba>>>23,hO=511&gO,iO=Pca+(hO<<3)|0,jO=b+32|0,kO=0|f[jO>>2],q=0,na(133,0|TW,0|kO),lO=q,q=0,0!=(0|lO)&0!=(0|r)?(mO=0|rw(0|f[lO>>2],0|Cda,0|Dda),0==(0|mO)&&Aa(0|lO,0|r),F=r):mO=-1,nO=F,y8=1==(0|mO)){uca=tca,y7=x7,i=w,Ga=nO,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[iO>>2]=0|f[TW>>2],f[iO+4>>2]=0|f[TW+4>>2],oO=fca+4|0,qO=0|f[oO>>2],rO=127&qO,sO=200+(rO<<2)|0,tO=0|f[sO>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=tO,rba=qO,fca=oO,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 68:if(uO=rba>>>23,vO=511&uO,wO=rba>>>14,xO=511&wO,yO=mda+(xO<<2)|0,zO=0|f[yO>>2],BO=Pca+(vO<<3)|0,f[G7>>2]=0|f[BO>>2],f[G7+4>>2]=0|f[BO+4>>2],CO=vO+1|0,DO=Pca+(CO<<3)|0,f[$ca>>2]=0|f[DO>>2],f[$ca+4>>2]=0|f[DO+4>>2],EO=G7+4|0,FO=0|f[EO>>2],GO=0==(0|FO),GO&&(HO=0|f[G7>>2],IO=0!=(0|HO),!IO)){if(JO=b+12|0,KO=0|f[JO>>2],MO=KO+16|0,NO=0|f[MO>>2],OO=NO+44|0,PO=0|f[OO>>2],q=0,na(133,0|dX,0|PO),QO=q,q=0,0!=(0|QO)&0!=(0|r)?(RO=0|rw(0|f[QO>>2],0|Cda,0|Dda),0==(0|RO)&&Aa(0|QO,0|r),F=r):RO=-1,SO=F,x8=1==(0|RO)){uca=tca,y7=x7,i=w,Ga=SO,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[G7>>2]=0|f[dX>>2],f[G7+4>>2]=0|f[dX+4>>2]}if(q=0,f[H7>>2]=0|f[G7>>2],f[H7+4>>2]=0|f[G7+4>>2],f[_ca>>2]=0|f[$ca>>2],f[_ca+4>>2]=0|f[$ca+4>>2],TO=0|qa(196,0|b,0|H7,0|_ca,0|zO),UO=q,q=0,0!=(0|UO)&0!=(0|r)?(VO=0|rw(0|f[UO>>2],0|Cda,0|Dda),0==(0|VO)&&Aa(0|UO,0|r),F=r):VO=-1,XO=F,v8=1==(0|VO)){uca=tca,y7=x7,i=w,Ga=XO,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(YO=Pca+(vO<<3)|0,q=0,na(133,0|oX,0|TO),ZO=q,q=0,0!=(0|ZO)&0!=(0|r)?($O=0|rw(0|f[ZO>>2],0|Cda,0|Dda),0==(0|$O)&&Aa(0|ZO,0|r),F=r):$O=-1,_O=F,w8=1==(0|$O)){uca=tca,y7=x7,i=w,Ga=_O,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[YO>>2]=0|f[oX>>2],f[YO+4>>2]=0|f[oX+4>>2],aP=b+92|0,bP=aP+416|0,f[bP>>2]=x7,cP=fca+4|0,dP=0|f[cP>>2],eP=127&dP,gP=200+(eP<<2)|0,hP=0|f[gP>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=hP,rba=dP,fca=cP,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 69:if(iP=rba>>>23,jP=511&iP,kP=rba>>>14,lP=511&kP,mP=mda+(lP<<2)|0,nP=0|f[mP>>2],oP=Pca+(jP<<3)|0,f[I7>>2]=0|f[oP>>2],f[I7+4>>2]=0|f[oP+4>>2],pP=I7+4|0,rP=0|f[pP>>2],sP=0==(0|rP),sP&&(tP=0|f[I7>>2],uP=0!=(0|tP),!uP)){if(vP=b+12|0,wP=0|f[vP>>2],xP=wP+16|0,yP=0|f[xP>>2],zP=yP+44|0,AP=0|f[zP>>2],q=0,na(133,0|zX,0|AP),CP=q,q=0,0!=(0|CP)&0!=(0|r)?(DP=0|rw(0|f[CP>>2],0|Cda,0|Dda),0==(0|DP)&&Aa(0|CP,0|r),F=r):DP=-1,EP=F,u8=1==(0|DP)){uca=tca,y7=x7,i=w,Ga=EP,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[I7>>2]=0|f[zX>>2],f[I7+4>>2]=0|f[zX+4>>2]}if(q=0,f[J7>>2]=0|f[I7>>2],f[J7+4>>2]=0|f[I7+4>>2],FP=0|ja(197,0|b,0|J7,0|nP),GP=q,q=0,0!=(0|GP)&0!=(0|r)?(HP=0|rw(0|f[GP>>2],0|Cda,0|Dda),0==(0|HP)&&Aa(0|GP,0|r),F=r):HP=-1,IP=F,s8=1==(0|HP)){uca=tca,y7=x7,i=w,Ga=IP,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(JP=Pca+(jP<<3)|0,q=0,na(133,0|KX,0|FP),KP=q,q=0,0!=(0|KP)&0!=(0|r)?(LP=0|rw(0|f[KP>>2],0|Cda,0|Dda),0==(0|LP)&&Aa(0|KP,0|r),F=r):LP=-1,NP=F,t8=1==(0|LP)){uca=tca,y7=x7,i=w,Ga=NP,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[JP>>2]=0|f[KX>>2],f[JP+4>>2]=0|f[KX+4>>2],OP=b+92|0,PP=OP+416|0,f[PP>>2]=x7,QP=fca+4|0,RP=0|f[QP>>2],SP=127&RP,TP=200+(SP<<2)|0,UP=0|f[TP>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=UP,rba=RP,fca=QP,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 70:if(VP=rba>>>23,WP=511&VP,$P=Pca+(WP<<3)|0,f[zca>>2]=0|f[$P>>2],f[zca+4>>2]=0|f[$P+4>>2],q=0,_P=0|oa(141,0|b),aQ=q,q=0,0!=(0|aQ)&0!=(0|r)?(bQ=0|rw(0|f[aQ>>2],0|Cda,0|Dda),0==(0|bQ)&&Aa(0|aQ,0|r),F=r):bQ=-1,cQ=F,m8=1==(0|bQ)){uca=tca,y7=x7,i=w,Ga=cQ,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(dQ=fca+4|0,eQ=_P+28|0,f[eQ>>2]=dQ,fQ=_P+40|0,f[fQ>>2]=WP,f[_P>>2]=0,gQ=b+12|0,hQ=0|f[gQ>>2],jQ=hQ+4|0,kQ=0|f[jQ>>2],lQ=_P+8|0,f[lQ>>2]=kQ,mQ=_P+36|0,f[mQ>>2]=0,nQ=0|f[zca>>2],oQ=_P+44|0,f[oQ>>2]=nQ,pQ=b+12|0,qQ=0|f[pQ>>2],rQ=qQ+4|0,sQ=0|f[rQ>>2],uQ=sQ+(WP<<3)|0,f[rQ>>2]=uQ,vQ=rba>>>7,wQ=65535&vQ,xQ=Fba+20|0,yQ=0|f[xQ>>2],zQ=yQ+(wQ<<2)|0,AQ=0|f[zQ>>2],q=0,BQ=0|sa(195,0|b,0|AQ),CQ=q,q=0,0!=(0|CQ)&0!=(0|r)?(DQ=0|rw(0|f[CQ>>2],0|Cda,0|Dda),0==(0|DQ)&&Aa(0|CQ,0|r),F=r):DQ=-1,FQ=F,n8=1==(0|DQ)){uca=tca,y7=x7,i=w,Ga=FQ,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(GQ=_P+44|0,HQ=0|f[GQ>>2],IQ=BQ+16|0,f[IQ>>2]=HQ,JQ=_P+4|0,f[JQ>>2]=BQ,KQ=0|f[BQ>>2],LQ=KQ>>>11,MQ=128&LQ,NQ=0!=(0|MQ),!NQ){if(xR=BQ+12|0,yR=0|f[xR>>2],zR=yR+12|0,AR=0|f[zR>>2],BR=yR+16|0,CR=0|f[BR>>2],DR=yR+2|0,ER=0|e[DR>>1],GR=65535&ER,q=0,pa(142,0|b,0|GR,1),HR=q,q=0,0!=(0|HR)&0!=(0|r)?(IR=0|rw(0|f[HR>>2],0|Cda,0|Dda),0==(0|IR)&&Aa(0|HR,0|r),F=r):IR=-1,JR=F,o8=1==(0|IR)){uca=tca,y7=x7,i=w,Ga=JR,fba=lba,wba=yR,$ba=fca,hca=AR,Jca=Pca,fda=CR,tca=uca,x7=y7;continue a}KR=yR+2|0,LR=0|e[KR>>1],MR=65535&LR,NR=_P+12|0,f[NR>>2]=MR,OR=b+12|0,PR=0|f[OR>>2],RR=PR+4|0,SR=0|f[RR>>2],TR=yR+8|0,UR=0|f[TR>>2],VR=0|f[UR>>2],WR=127&VR,XR=200+(WR<<2)|0,YR=0|f[XR>>2],mba=lba,x=w,za=YR,rba=VR,Fba=yR,fca=UR,oca=AR,Pca=SR,mda=CR,lba=mba,w=x,Eda=590;continue b}if(OQ=_P+12|0,f[OQ>>2]=0,QQ=b+12|0,RQ=0|f[QQ>>2],SQ=RQ+4|0,TQ=0|f[SQ>>2],UQ=BQ+12|0,VQ=0|f[UQ>>2],q=0,f[Aca>>2]=0|f[zca>>2],f[Aca+4>>2]=0|f[zca+4>>2],pa(0|VQ,0|VX,0|b,0|Aca),WQ=q,q=0,0!=(0|WQ)&0!=(0|r)?(XQ=0|rw(0|f[WQ>>2],0|Cda,0|Dda),0==(0|XQ)&&Aa(0|WQ,0|r),F=r):XQ=-1,YQ=F,p8=1==(0|XQ)){uca=tca,y7=x7,i=w,Ga=YQ,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(f[TQ>>2]=0|f[VX>>2],f[TQ+4>>2]=0|f[VX+4>>2],q=0,na(146,0|b,0|x7),ZQ=q,q=0,0!=(0|ZQ)&0!=(0|r)?(_Q=0|rw(0|f[ZQ>>2],0|Cda,0|Dda),0==(0|_Q)&&Aa(0|ZQ,0|r),F=r):_Q=-1,aR=F,q8=1==(0|_Q)){uca=tca,y7=x7,i=w,Ga=aR,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(bR=b+20|0,cR=0|f[bR>>2],dR=0!=(0|cR)){s=w,hba=lba,Bba=Fba,bca=fca,kca=oca,Lca=Pca,ida=mda,Eda=276;continue b}if(eR=b+12|0,fR=0|f[eR>>2],gR=fR+16|0,hR=0|f[gR>>2],iR=hR+8|0,kR=0|f[iR>>2],lR=b+12|0,mR=0|f[lR>>2],nR=mR+4|0,f[nR>>2]=kR,q=0,ma(132,0|b),oR=q,q=0,0!=(0|oR)&0!=(0|r)?(pR=0|rw(0|f[oR>>2],0|Cda,0|Dda),0==(0|pR)&&Aa(0|oR,0|r),F=r):pR=-1,qR=F,r8=1==(0|pR)){uca=tca,y7=x7,i=w,Ga=qR,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=kR,fda=mda,tca=uca,x7=y7;continue a}rR=fca+4|0,sR=0|f[rR>>2],tR=127&sR,vR=200+(tR<<2)|0,wR=0|f[vR>>2],nda=mda,pca=oca,Gba=Fba,mba=lba,x=w,za=wR,rba=sR,fca=rR,Pca=kR,mda=nda,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 71:if(ZR=rba>>>23,$R=511&ZR,bS=Pca+($R<<3)|0,cS=0|f[bS>>2],dS=$R+1|0,eS=Pca+(dS<<3)|0,fS=0|f[eS>>2],gS=rba>>>14,hS=511&gS,iS=mda+(hS<<2)|0,jS=0|f[iS>>2],q=0,ta(198,0|b,0|cS,0|jS,0|fS),kS=q,q=0,0!=(0|kS)&0!=(0|r)?(mS=0|rw(0|f[kS>>2],0|Cda,0|Dda),0==(0|mS)&&Aa(0|kS,0|r),F=r):mS=-1,nS=F,l8=1==(0|mS)){uca=tca,y7=x7,i=w,Ga=nS,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}oS=b+92|0,pS=oS+416|0,f[pS>>2]=x7,qS=fca+4|0,rS=0|f[qS>>2],sS=127&rS,tS=200+(sS<<2)|0,uS=0|f[tS>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=uS,rba=rS,fca=qS,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 72:if(vS=rba>>>23,xS=511&vS,yS=Pca+(xS<<3)|0,zS=rba>>>14,AS=511&zS,BS=Pca+(AS<<3)|0,q=0,f[ua>>2]=0|f[BS>>2],f[ua+4>>2]=0|f[BS+4>>2],pa(199,0|eY,0|b,0|ua),CS=q,q=0,0!=(0|CS)&0!=(0|r)?(DS=0|rw(0|f[CS>>2],0|Cda,0|Dda),0==(0|DS)&&Aa(0|CS,0|r),F=r):DS=-1,ES=F,k8=1==(0|DS)){uca=tca,y7=x7,i=w,Ga=ES,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[yS>>2]=0|f[eY>>2],f[yS+4>>2]=0|f[eY+4>>2],FS=b+92|0,GS=FS+416|0,f[GS>>2]=x7,IS=fca+4|0,JS=0|f[IS>>2],KS=127&JS,LS=200+(KS<<2)|0,MS=0|f[LS>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=MS,rba=JS,fca=IS,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;case 73:if(NS=b+12|0,OS=0|f[NS>>2],PS=OS+16|0,QS=0|f[PS>>2],RS=QS+44|0,TS=0|f[RS>>2],US=0!=(0|TS)){if(gT=rba>>>23,hT=511&gT,iT=Pca+(hT<<3)|0,jT=b+12|0,kT=0|f[jT>>2],lT=kT+16|0,nT=0|f[lT>>2],oT=nT+44|0,pT=0|f[oT>>2],q=0,na(133,0|AY,0|pT),qT=q,q=0,0!=(0|qT)&0!=(0|r)?(rT=0|rw(0|f[qT>>2],0|Cda,0|Dda),0==(0|rT)&&Aa(0|qT,0|r),F=r):rT=-1,sT=F,j8=1==(0|rT)){uca=tca,y7=x7,i=w,Ga=sT,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[iT>>2]=0|f[AY>>2],f[iT+4>>2]=0|f[AY+4>>2],tT=fca+4|0,uT=0|f[tT>>2],vT=127&uT,wT=200+(vT<<2)|0,yT=0|f[wT>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=yT,rba=uT,fca=tT,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b}if(q=0,VS=0|sa(135,0|b,68905),WS=q,q=0,0!=(0|WS)&0!=(0|r)?(XS=0|rw(0|f[WS>>2],0|Cda,0|Dda),0==(0|XS)&&Aa(0|WS,0|r),F=r):XS=-1,YS=F,Z7=1==(0|XS)){uca=tca,y7=x7,i=w,Ga=YS,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(q=0,ta(171,0|pY,0|b,56667,25),ZS=q,q=0,0!=(0|ZS)&0!=(0|r)?($S=0|rw(0|f[ZS>>2],0|Cda,0|Dda),0==(0|$S)&&Aa(0|ZS,0|r),F=r):$S=-1,_S=F,$7=1==(0|$S)){uca=tca,y7=x7,i=w,Ga=_S,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(q=0,f[va>>2]=0|f[pY>>2],f[va+4>>2]=0|f[pY+4>>2],ta(172,0|aba,0|b,0|VS,0|va),aT=q,q=0,0!=(0|aT)&0!=(0|r)?(cT=0|rw(0|f[aT>>2],0|Cda,0|Dda),0==(0|cT)&&Aa(0|aT,0|r),F=r):cT=-1,dT=F,_7=1==(0|cT)){uca=tca,y7=x7,i=w,Ga=dT,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}eT=0|f[aba>>2],fT=b+20|0,f[fT>>2]=eT,s=w,hba=lba,Bba=Fba,bca=fca,kca=oca,Lca=Pca,ida=mda,Eda=276;continue b;case 74:if(WT=rba>>>23,XT=511&WT,YT=rba>>>14,ZT=511&YT,$T=rba>>>7,_T=127&$T,q=0,f[uda>>2]=XT,vda=uda+4|0,f[vda>>2]=ZT,wda=uda+8|0,f[wda>>2]=_T,0|sa(201,56693,0|uda),aU=q,q=0,0!=(0|aU)&0!=(0|r)?(bU=0|rw(0|f[aU>>2],0|Cda,0|Dda),0==(0|bU)&&Aa(0|aU,0|r),F=r):bU=-1,eU=F,Y7=1==(0|bU)){uca=tca,y7=x7,i=w,Ga=eU,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}fU=fca+4|0,gU=0|f[fU>>2],hU=127&gU,iU=200+(hU<<2)|0,jU=0|f[iU>>2],nda=mda,Qca=Pca,pca=oca,Gba=Fba,mba=lba,x=w,za=jU,rba=gU,fca=fU,mda=nda,Pca=Qca,oca=pca,Fba=Gba,lba=mba,w=x,Eda=590;continue b;default:Eda=591;break a}while(0);if(92==(0|Eda)){Eda=0,u1=pba>>>23,v1=511&u1,w1=pba>>>7,y1=127&w1,z1=pba>>>14,A1=511&z1,B1=mda+(A1<<2)|0,C1=0|f[B1>>2],D1=Pca+(v1<<3)|0,f[vca>>2]=0|f[D1>>2],f[vca+4>>2]=0|f[D1+4>>2],E1=127&pba,F1=33!=(0|E1);do if(F1){if(G1=127==(0|y1)){H1=v1+2|0,J1=Pca+(H1<<3)|0,K1=J1+4|0,f[K1>>2]=0,L1=v1+2|0,M1=Pca+(L1<<3)|0,f[M1>>2]=0;break}N1=v1+y1|0,O1=N1+1|0,P1=Pca+(O1<<3)|0,Q1=P1+4|0,f[Q1>>2]=0,R1=v1+y1|0,S1=R1+1|0,U1=Pca+(S1<<3)|0,f[U1>>2]=0;break}while(0);if(q=0,f[wca>>2]=0|f[vca>>2],f[wca+4>>2]=0|f[vca+4>>2],V1=0|sa(138,0|b,0|wca),W1=q,q=0,0!=(0|W1)&0!=(0|r)?(X1=0|rw(0|f[W1>>2],0|Cda,0|Dda),0==(0|X1)&&Aa(0|W1,0|r),F=r):X1=-1,Y1=F,kaa=1==(0|X1)){uca=tca,y7=x7,i=w,Ga=Y1,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(f[K7>>2]=V1,q=0,Z1=0|ja(139,0|b,0|K7,0|C1),$1=q,q=0,0!=(0|$1)&0!=(0|r)?(_1=0|rw(0|f[$1>>2],0|Cda,0|Dda),0==(0|_1)&&Aa(0|$1,0|r),F=r):_1=-1,a2=F,laa=1==(0|_1)){uca=tca,y7=x7,i=w,Ga=a2,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}b2=0!=(0|Z1);do{if(!b2){if(q=0,na(143,0|ada,0|C1),d2=q,q=0,0!=(0|d2)&0!=(0|r)?(e2=0|rw(0|f[d2>>2],0|Cda,0|Dda),0==(0|e2)&&Aa(0|d2,0|r),F=r):e2=-1,f2=F,maa=1==(0|e2)){uca=tca,y7=x7,i=w,Ga=f2,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(q=0,g2=0|ja(140,0|b,65322,14),h2=q,q=0,0!=(0|h2)&0!=(0|r)?(i2=0|rw(0|f[h2>>2],0|Cda,0|Dda),0==(0|i2)&&Aa(0|h2,0|r),F=r):i2=-1,j2=F,naa=1==(0|i2)){uca=tca,y7=x7,i=w,Ga=j2,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(q=0,k2=0|ja(139,0|b,0|K7,0|g2),l2=q,q=0,0!=(0|l2)&0!=(0|r)?(m2=0|rw(0|f[l2>>2],0|Cda,0|Dda),0==(0|m2)&&Aa(0|l2,0|r),F=r):m2=-1,o2=F,oaa=1==(0|m2)){uca=tca,y7=x7,i=w,Ga=o2,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(p2=0!=(0|k2),!p2){if(q2=127==(0|y1))r2=v1+1|0,s2=Pca+(r2<<3)|0,f[B7>>2]=0|f[s2>>2],f[B7+4>>2]=0|f[s2+4>>2];else{if(t2=Pca+(v1<<3)|0,u2=t2+8|0,q=0,ta(167,0|l1,0|b,0|y1,0|u2),v2=q,q=0,0!=(0|v2)&0!=(0|r)?(w2=0|rw(0|f[v2>>2],0|Cda,0|Dda),0==(0|w2)&&Aa(0|v2,0|r),F=r):w2=-1,x2=F,paa=1==(0|w2)){uca=tca,y7=x7,i=w,Ga=x2,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}f[B7>>2]=0|f[l1>>2],f[B7+4>>2]=0|f[l1+4>>2]}if(q=0,f[xca>>2]=0|f[vca>>2],f[xca+4>>2]=0|f[vca+4>>2],f[C7>>2]=0|f[B7>>2],f[C7+4>>2]=0|f[B7+4>>2],ta(168,0|b,0|C1,0|xca,0|C7),z2=q,q=0,0!=(0|z2)&0!=(0|r)?(A2=0|rw(0|f[z2>>2],0|Cda,0|Dda),0==(0|A2)&&Aa(0|z2,0|r),F=r):A2=-1,B2=F,qaa=1==(0|A2)){uca=tca,y7=x7,i=w,Ga=B2,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}}if(C2=127==(0|y1)){if(D2=v1+1|0,E2=Pca+(D2<<3)|0,q=0,f[H>>2]=0|f[E2>>2],f[H+4>>2]=0|f[E2+4>>2],f[bda>>2]=0|f[ada>>2],f[bda+4>>2]=0|f[ada+4>>2],ta(169,0|o3,0|b,0|H,0|bda),F2=q,q=0,0!=(0|F2)&0!=(0|r)?(G2=0|rw(0|f[F2>>2],0|Cda,0|Dda),0==(0|G2)&&Aa(0|F2,0|r),F=r):G2=-1,H2=F,saa=1==(0|G2)){uca=tca,y7=x7,i=w,Ga=H2,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}Iba=k2,Lba=g2,Tba=y1;break}if(I2=Pca+(v1<<3)|0,K2=I2+16|0,L2=Pca+(v1<<3)|0,M2=L2+8|0,N2=y1+1|0,q=0,pa(170,0|K2,0|M2,0|N2),O2=q,q=0,0!=(0|O2)&0!=(0|r)?(P2=0|rw(0|f[O2>>2],0|Cda,0|Dda),0==(0|P2)&&Aa(0|O2,0|r),F=r):P2=-1,Q2=F,raa=1==(0|P2)){uca=tca,y7=x7,i=w,Ga=Q2,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}R2=v1+1|0,S2=Pca+(R2<<3)|0,f[S2>>2]=0|f[ada>>2],f[S2+4>>2]=0|f[ada+4>>2],Iba=k2,Lba=g2,Tba=N2;break}Iba=Z1,Lba=C1,Tba=y1}while(0);if(q=0,T2=0|oa(141,0|b),V2=q,q=0,0!=(0|V2)&0!=(0|r)?(W2=0|rw(0|f[V2>>2],0|Cda,0|Dda),0==(0|W2)&&Aa(0|V2,0|r),F=r):W2=-1,X2=F,taa=1==(0|W2)){uca=tca,y7=x7,i=w,Ga=X2,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(f[T2>>2]=Lba,Y2=T2+4|0,f[Y2>>2]=Iba,Z2=b+12|0,$2=0|f[Z2>>2],_2=$2+4|0,a3=0|f[_2>>2],b3=T2+8|0,f[b3>>2]=a3,c3=0|f[K7>>2],e3=T2+44|0,f[e3>>2]=c3,f3=fca+4|0,g3=T2+28|0,f[g3>>2]=f3,h3=T2+40|0,f[h3>>2]=v1,i3=b+12|0,j3=0|f[i3>>2],k3=j3+4|0,l3=0|f[k3>>2],m3=l3+(v1<<3)|0,f[k3>>2]=m3,n3=0|f[Iba>>2],q3=n3>>>11,r3=128&q3,s3=0!=(0|r3),!s3){if(D4=b+12|0,E4=0|f[D4>>2],F4=E4+16|0,G4=0|f[F4>>2],H4=G4+4|0,f[H4>>2]=Iba,I4=Iba+12|0,J4=0|f[I4>>2],K4=J4+12|0,L4=0|f[K4>>2],N4=J4+16|0,O4=0|f[N4>>2],P4=J4+2|0,Q4=0|e[P4>>1],R4=65535&Q4,S4=T2+12|0,f[S4>>2]=R4,T4=127==(0|Tba)){if(U4=T2+36|0,f[U4>>2]=-1,V4=J4+2|0,W4=0|e[V4>>1],Y4=65535&W4,Z4=(0|Y4)<3,Z4?Fa=3:($4=J4+2|0,_4=0|e[$4>>1],a5=65535&_4,Fa=a5),q=0,pa(142,0|b,0|Fa,3),b5=q,q=0,0!=(0|b5)&0!=(0|r)?(c5=0|rw(0|f[b5>>2],0|Cda,0|Dda),0==(0|c5)&&Aa(0|b5,0|r),F=r):c5=-1,d5=F,vaa=1==(0|c5)){uca=tca,y7=x7,i=Iba,Ga=d5,fba=lba,wba=J4,$ba=fca,hca=L4,Jca=Pca,fda=O4,tca=uca,x7=y7;continue a}}else if(e5=T2+36|0,f[e5>>2]=Tba,f5=J4+2|0,h5=0|e[f5>>1],i5=65535&h5,j5=Tba+2|0,q=0,pa(142,0|b,0|i5,0|j5),k5=q,q=0,0!=(0|k5)&0!=(0|r)?(l5=0|rw(0|f[k5>>2],0|Cda,0|Dda),0==(0|l5)&&Aa(0|k5,0|r),F=r):l5=-1,m5=F,uaa=1==(0|l5)){uca=tca,y7=x7,i=Iba,Ga=m5,fba=lba,wba=J4,$ba=fca,hca=L4,Jca=Pca,fda=O4,tca=uca,x7=y7;continue a}n5=b+12|0,o5=0|f[n5>>2],p5=o5+4|0,q5=0|f[p5>>2],t5=J4+8|0,u5=0|f[t5>>2],v5=0|f[u5>>2],w5=127&v5,x5=200+(w5<<2)|0,y5=0|f[x5>>2],mba=lba,w=Iba,za=y5,rba=v5,Fba=J4,fca=u5,oca=L4,Pca=q5,mda=O4,lba=mba,Eda=590;continue}if(t3=127==(0|Tba),t3?(u3=T2+36|0,f[u3>>2]=-1,v3=T2+12|0,f[v3>>2]=3):(w3=T2+36|0,f[w3>>2]=Tba,x3=Tba+2|0,y3=T2+12|0,f[y3>>2]=x3),z3=Iba+12|0,B3=0|f[z3>>2],q=0,f[yca>>2]=0|f[vca>>2],f[yca+4>>2]=0|f[vca+4>>2],pa(0|B3,0|r5,0|b,0|yca),C3=q,q=0,0!=(0|C3)&0!=(0|r)?(D3=0|rw(0|f[C3>>2],0|Cda,0|Dda),0==(0|D3)&&Aa(0|C3,0|r),F=r):D3=-1,E3=F,waa=1==(0|D3)){uca=tca,y7=x7,i=w,Ga=E3,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(f[Rca>>2]=0|f[r5>>2],f[Rca+4>>2]=0|f[r5+4>>2],F3=b+12|0,G3=0|f[F3>>2],H3=G3+4|0,I3=0|f[H3>>2],f[I3>>2]=0|f[Rca>>2],f[I3+4>>2]=0|f[Rca+4>>2],q=0,na(146,0|b,0|x7),J3=q,q=0,0!=(0|J3)&0!=(0|r)?(K3=0|rw(0|f[J3>>2],0|Cda,0|Dda),0==(0|K3)&&Aa(0|J3,0|r),F=r):K3=-1,M3=F,xaa=1==(0|K3)){uca=tca,y7=x7,i=w,Ga=M3,fba=lba,wba=Fba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(N3=b+20|0,O3=0|f[N3>>2],P3=0!=(0|O3)){s=w,hba=lba,Bba=Fba,bca=fca,kca=oca,Lca=Pca,ida=mda,Eda=276;continue}if(Q3=b+12|0,R3=0|f[Q3>>2],S3=R3+16|0,T3=0|f[S3>>2],U3=T3+44|0,V3=0|f[U3>>2],X3=0!=(0|V3),X3?(n=w,yba=Fba,jca=oca,hda=mda):(Y3=T3+-48|0,Z3=Y3+4|0,$3=0|f[Z3>>2],_3=0|f[$3>>2],a4=_3>>>11,b4=128&a4,c4=0!=(0|b4),c4?(n=w,yba=Fba,jca=oca,hda=mda):(d4=T3+-48|0,e4=d4+4|0,g4=0|f[e4>>2],h4=g4+12|0,i4=0|f[h4>>2],j4=i4+12|0,k4=0|f[j4>>2],l4=i4+16|0,m4=0|f[l4>>2],n=g4,yba=i4,jca=k4,hda=m4)),n4=T3+8|0,o4=0|f[n4>>2],p4=b+12|0,r4=0|f[p4>>2],s4=r4+4|0,f[s4>>2]=o4,t4=T3+28|0,u4=0|f[t4>>2],q=0,ma(132,0|b),v4=q,q=0,0!=(0|v4)&0!=(0|r)?(w4=0|rw(0|f[v4>>2],0|Cda,0|Dda),0==(0|w4)&&Aa(0|v4,0|r),F=r):w4=-1,x4=F,yaa=1==(0|w4)){uca=tca,y7=x7,i=n,Ga=x4,fba=lba,wba=yba,$ba=u4,hca=jca,Jca=o4,fda=hda,tca=uca,x7=y7;continue a}y4=0|f[u4>>2],z4=127&y4,A4=200+(z4<<2)|0,C4=0|f[A4>>2],mba=lba,w=n,za=C4,rba=y4,Fba=yba,fca=u4,oca=jca,Pca=o4,mda=hda,lba=mba,Eda=590;continue}if(274==(0|Eda)&&(Eda=0,_k=rba>>>23,al=511&_k,bl=511&al,cl=bl<<23,dl=41|cl,p=o,qba=dl,Aba=zba),el=b+20|0,fl=0|f[el>>2],gl=0!=(0|fl)){s=p,hba=lba,Bba=Aba,bca=fca,kca=oca,Lca=Pca,ida=mda,Eda=276;continue}bo=b+12|0,co=0|f[bo>>2],fo=co+16|0,go=0|f[fo>>2],ho=b+12|0,io=0|f[ho>>2],jo=io+16|0,ko=0|f[jo>>2],lo=ko+20|0,mo=0|f[lo>>2],no=qba>>>23,oo=511&no,qo=Pca+(oo<<3)|0,f[oda>>2]=0|f[qo>>2],f[oda+4>>2]=0|f[qo+4>>2],ro=qba>>>14,so=511&ro;c:do switch(0|so){case 2:if(to=p+20|0,uo=0|f[to>>2],vo=0!=(0|uo)){if(wo=0|f[p>>2],xo=wo>>>11,yo=256&xo,zo=0!=(0|yo),!zo){if(q=0,Bo=0|sa(179,0|b,0|p),Co=q,q=0,0!=(0|Co)&0!=(0|r)?(Do=0|rw(0|f[Co>>2],0|Cda,0|Dda),0==(0|Do)&&Aa(0|Co,0|r),F=r):Do=-1,Eo=F,o9=1==(0|Do)){uca=tca,y7=x7,i=p,Ga=Eo,fba=lba,wba=Aba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(Fo=Bo+20|0,Go=0|f[Fo>>2],Ho=(0|Go)>=0,!Ho){if(q=0,na(180,0|b,0),Io=q,q=0,0!=(0|Io)&0!=(0|r)?(Jo=0|rw(0|f[Io>>2],0|Cda,0|Dda),0==(0|Jo)&&Aa(0|Io,0|r),F=r):Jo=-1,Ko=F,p9=1==(0|Jo)){uca=tca,y7=x7,i=p,Ga=Ko,fba=lba,wba=Aba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}s=p,hba=lba,Bba=Aba,bca=fca,kca=oca,Lca=Pca,ida=mda,Eda=276;continue b}if(Mo=b+12|0,No=0|f[Mo>>2],Oo=No+20|0,Po=0|f[Oo>>2],Qo=Bo+20|0,Ro=0|f[Qo>>2],So=Po+(48*Ro|0)|0,To=b+12|0,Uo=0|f[To>>2],Vo=Uo+20|0,Xo=0|f[Vo>>2],Yo=(0|So)==(0|Xo),!Yo){ap=b+12|0,bp=0|f[ap>>2],cp=bp+16|0,dp=0|f[cp>>2],ep=dp+8|0,hp=0|f[ep>>2],ip=b+12|0,jp=0|f[ip>>2],kp=jp+4|0,f[kp>>2]=hp,lp=b+12|0,mp=0|f[lp>>2],np=mp+16|0,f[np>>2]=So,R7=So,$aa=mo;break c}if(q=0,na(180,0|b,0),Zo=q,q=0,0!=(0|Zo)&0!=(0|r)?($o=0|rw(0|f[Zo>>2],0|Cda,0|Dda),0==(0|$o)&&Aa(0|Zo,0|r),F=r):$o=-1,_o=F,q9=1==(0|$o)){uca=tca,y7=x7,i=p,Ga=_o,fba=lba,wba=Aba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}s=p,hba=lba,Bba=Aba,bca=fca,kca=oca,Lca=Pca,ida=mda,Eda=276;continue b}Eda=313}else Eda=313;break;case 0:Eda=313;break;case 1:if(oq=p+20|0,pq=0|f[oq>>2],qq=0!=(0|pq),qq&&(rq=p+20|0,tq=0|f[rq>>2],uq=tq+20|0,vq=0|f[uq>>2],wq=(0|vq)>=0)){for(Aq=b+12|0,Bq=0|f[Aq>>2],Cq=Bq+16|0,Eq=0|f[Cq>>2],Fq=b+12|0,Gq=0|f[Fq>>2],Hq=Gq+20|0,Iq=0|f[Hq>>2],Jq=(0|Eq)==(0|Iq),Jq&&(Kq=b+12|0,Lq=0|f[Kq>>2],Mq=Lq+16|0,Nq=0|f[Mq>>2],Pq=Nq+28|0,Qq=0|f[Pq>>2],Rq=0!=(0|Qq),Rq&&(Sq=b+12|0,Tq=0|f[Sq>>2],Uq=0|f[Tq>>2],Vq=b+12|0,f[Vq>>2]=Uq,f[Tq>>2]=0)),Wq=b+12|0,Xq=0|f[Wq>>2],Yq=Xq+16|0,$q=0|f[Yq>>2],_q=$q+8|0,ar=0|f[_q>>2],br=b+12|0,cr=0|f[br>>2],dr=cr+4|0,f[dr>>2]=ar,er=b+12|0,fr=0|f[er>>2],gr=fr+20|0,hr=0|f[gr>>2],kr=p+20|0,lr=0|f[kr>>2],mr=lr+20|0,nr=0|f[mr>>2],or=hr+(48*nr|0)|0,pr=or+48|0,qr=b+12|0,rr=0|f[qr>>2],sr=rr+16|0,f[sr>>2]=pr,Q7=$q;;){if(tr=b+12|0,vr=0|f[tr>>2],wr=vr+16|0,xr=0|f[wr>>2],yr=Q7>>>0>xr>>>0,!yr){R7=Q7,$aa=mo;break c}if(zr=Q7+-48|0,Ar=zr+40|0,Br=0|f[Ar>>2],Cr=(0|Br)==-1)break;Hr=Q7+-48|0,Q7=Hr}Dr=b+12|0,Er=0|f[Dr>>2],Gr=Er+16|0,f[Gr>>2]=Q7,R7=Q7,$aa=mo;break c}if(q=0,na(180,0|b,1),xq=q,q=0,0!=(0|xq)&0!=(0|r)?(yq=0|rw(0|f[xq>>2],0|Cda,0|Dda),
+0==(0|yq)&&Aa(0|xq,0|r),F=r):yq=-1,zq=F,j9=1==(0|yq)){uca=tca,y7=x7,i=p,Ga=zq,fba=lba,wba=Aba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}s=p,hba=lba,Bba=Aba,bca=fca,kca=oca,Lca=Pca,ida=mda,Eda=276;continue b;default:R7=go,$aa=mo}while(0);if(313==(0|Eda)){Eda=0,op=b+12|0,pp=0|f[op>>2],qp=pp+20|0,sp=0|f[qp>>2],tp=(0|go)==(0|sp);do if(tp){if(up=b+12|0,vp=0|f[up>>2],wp=0|f[vp>>2],xp=0!=(0|wp),!xp){if(q=0,na(180,0|b,0),yp=q,q=0,0!=(0|yp)&0!=(0|r)?(zp=0|rw(0|f[yp>>2],0|Cda,0|Dda),0==(0|zp)&&Aa(0|yp,0|r),F=r):zp=-1,Ap=F,k9=1==(0|zp)){uca=tca,y7=x7,i=p,Ga=Ap,fba=lba,wba=Aba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}s=p,hba=lba,Bba=Aba,bca=fca,kca=oca,Lca=Pca,ida=mda,Eda=276;continue b}if(Bp=b+12|0,Dp=0|f[Bp>>2],Ep=0|f[Dp>>2],Fp=Ep+16|0,Gp=0|f[Fp>>2],Hp=b+12|0,Ip=0|f[Hp>>2],Jp=0|f[Ip>>2],Kp=Jp+20|0,Lp=0|f[Kp>>2],Mp=(0|Gp)==(0|Lp),!Mp){_p=b+12|0,aq=0|f[_p>>2],bq=aq+44|0,f[bq>>2]=5,cq=b+12|0,dq=0|f[cq>>2],eq=0|f[dq>>2],fq=b+12|0,f[fq>>2]=eq,gq=b+12|0,iq=0|f[gq>>2],jq=iq+44|0,f[jq>>2]=1;break}if(q=0,Op=0|sa(135,0|b,56642),Pp=q,q=0,0!=(0|Pp)&0!=(0|r)?(Qp=0|rw(0|f[Pp>>2],0|Cda,0|Dda),0==(0|Qp)&&Aa(0|Pp,0|r),F=r):Qp=-1,Rp=F,l9=1==(0|Qp)){uca=tca,y7=x7,i=p,Ga=Rp,fba=lba,wba=Aba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(q=0,ta(171,0|LH,0|b,56653,13),Sp=q,q=0,0!=(0|Sp)&0!=(0|r)?(Tp=0|rw(0|f[Sp>>2],0|Cda,0|Dda),0==(0|Tp)&&Aa(0|Sp,0|r),F=r):Tp=-1,Up=F,m9=1==(0|Tp)){uca=tca,y7=x7,i=p,Ga=Up,fba=lba,wba=Aba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(q=0,f[R>>2]=0|f[LH>>2],f[R+4>>2]=0|f[LH+4>>2],ta(172,0|dba,0|b,0|Op,0|R),Vp=q,q=0,0!=(0|Vp)&0!=(0|r)?(Wp=0|rw(0|f[Vp>>2],0|Cda,0|Dda),0==(0|Wp)&&Aa(0|Vp,0|r),F=r):Wp=-1,Xp=F,n9=1==(0|Wp)){uca=tca,y7=x7,i=p,Ga=Xp,fba=lba,wba=Aba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}Zp=0|f[dba>>2],$p=b+20|0,f[$p>>2]=Zp,s=p,hba=lba,Bba=Aba,bca=fca,kca=oca,Lca=Pca,ida=mda,Eda=276;continue b}while(0);kq=b+12|0,lq=0|f[kq>>2],mq=lq+16|0,nq=0|f[mq>>2],R7=nq,$aa=mo}for(;;){if(Ir=b+12|0,Jr=0|f[Ir>>2],Kr=Jr+16|0,Lr=0|f[Kr>>2],Mr=Lr+-48|0,Nr=Mr+20|0,Or=0|f[Nr>>2],Pr=(0|$aa)>(0|Or),!Pr)break;if(Rr=$aa+-1|0,q=0,na(166,0|b,0|Rr),Sr=q,q=0,0!=(0|Sr)&0!=(0|r)?(Tr=0|rw(0|f[Sr>>2],0|Cda,0|Dda),0==(0|Tr)&&Aa(0|Sr,0|r),F=r):Tr=-1,Ur=F,s9=1==(0|Tr)){uca=tca,y7=x7,i=p,Ga=Ur,fba=lba,wba=Aba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}S7=R7,$aa=Rr,R7=S7}if(q=0,ma(132,0|b),Vr=q,q=0,0!=(0|Vr)&0!=(0|r)?(Wr=0|rw(0|f[Vr>>2],0|Cda,0|Dda),0==(0|Wr)&&Aa(0|Vr,0|r),F=r):Wr=-1,Xr=F,r9=1==(0|Wr)){uca=tca,y7=x7,i=p,Ga=Xr,fba=lba,wba=Aba,$ba=fca,hca=oca,Jca=Pca,fda=mda,tca=uca,x7=y7;continue a}if(Yr=R7+40|0,Zr=0|f[Yr>>2],$r=R7+28|0,as=0|f[$r>>2],bs=R7+8|0,cs=0|f[bs>>2],ds=b+12|0,es=0|f[ds>>2],fs=es+4|0,f[fs>>2]=cs,gs=(0|Zr)==-1){Eda=341;break a}hs=b+12|0,is=0|f[hs>>2],js=is+16|0,ls=0|f[js>>2],ms=ls+4|0,ns=0|f[ms>>2],os=ns+12|0,ps=0|f[os>>2],qs=ps+12|0,rs=0|f[qs>>2],ss=ps+16|0,ts=0|f[ss>>2],us=cs+(Zr<<3)|0,f[us>>2]=0|f[oda>>2],f[us+4>>2]=0|f[oda+4>>2],u=ns,jba=lba,Dba=ps,dca=as,mca=rs,Nca=cs,kda=ts}ws=0|f[dca>>2],xs=127&ws,ys=200+(xs<<2)|0,zs=0|f[ys>>2],w=u,za=zs,lba=jba,rba=ws,Fba=Dba,fca=dca,oca=mca,Pca=Nca,mda=kda,Eda=590}if(287!=(0|Eda)){for(294==(0|Eda)&&(Eda=0,dn=cn+8|0,en=0|f[dn>>2],fn=b+12|0,gn=0|f[fn>>2],hn=gn+4|0,f[hn>>2]=en,v=s,kba=hba,Eba=Bba,eca=bca,nca=kca,Oca=en,lda=ida),kU=b+12|0,lU=0|f[kU>>2],mU=lU+16|0,nU=0|f[mU>>2],pU=b+12|0,qU=0|f[pU>>2],rU=qU+20|0,sU=0|f[rU>>2],tU=(0|nU)==(0|sU),tU?Ba=0:(uU=b+12|0,vU=0|f[uU>>2],wU=vU+16|0,xU=0|f[wU>>2],yU=xU+-48|0,AU=yU+20|0,BU=0|f[AU>>2],Ba=BU),CU=b+12|0,DU=0|f[CU>>2],EU=DU+16|0,FU=0|f[EU>>2],GU=FU+20|0,HU=0|f[GU>>2],Vaa=HU;;){if(IU=(0|Vaa)>(0|Ba),!IU)break;if(JU=Vaa+-1|0,q=0,na(166,0|b,0|JU),LU=q,q=0,0!=(0|LU)&0!=(0|r)?(MU=0|rw(0|f[LU>>2],0|Cda,0|Dda),0==(0|MU)&&Aa(0|LU,0|r),F=r):MU=-1,NU=F,X7=1==(0|MU)){uca=tca,y7=x7,i=v,Ga=NU,fba=kba,wba=Eba,$ba=eca,hca=nca,Jca=Oca,fda=lda,tca=uca,x7=y7;continue a}Vaa=JU}if(OU=b+12|0,PU=0|f[OU>>2],QU=PU+16|0,RU=0|f[QU>>2],SU=RU+32|0,f[SU>>2]=0,f[b>>2]=tca,TU=b+20|0,UU=0|f[TU>>2],WU=0!=(0|UU),!WU){Eda=578;break}if(XU=b+20|0,YU=0|f[XU>>2],q=0,na(133,0|a,0|YU),ZU=q,q=0,0!=(0|ZU)&0!=(0|r)?($U=0|rw(0|f[ZU>>2],0|Cda,0|Dda),0==(0|$U)&&Aa(0|ZU,0|r),F=r):$U=-1,_U=F,W7=1==(0|$U),!W7){Eda=577;break}uca=tca,y7=x7,i=v,Ga=_U,fba=kba,wba=Eba,$ba=eca,hca=nca,Jca=Oca,fda=lda,tca=uca,x7=y7}else Eda=0,f[b>>2]=tca,q=0,na(178,0|tca,1),Em=q,q=0,0!=(0|Em)&0!=(0|r)?(Fm=0|rw(0|f[Em>>2],0|Cda,0|Dda),0==(0|Fm)&&Aa(0|Em,0|r),F=r):Fm=-1,Hm=F,uca=tca,y7=x7,i=s,Ga=Hm,fba=hba,wba=Bba,$ba=bca,hca=kca,Jca=Lca,fda=ida,tca=uca,x7=y7}else h=i,w7=x7,eba=1,vba=wba,Zba=$ba,gca=hca,sca=tca,Ica=Jca,eda=fda,Eda=3}return 341==(0|Eda)?(f[b>>2]=tca,f[a>>2]=0|f[oda>>2],f[a+4>>2]=0|f[oda+4>>2],gw(0|Cda),void(l=Fda)):577==(0|Eda)?(gw(0|Cda),void(l=Fda)):578==(0|Eda)?(aV=0|e[Eba>>1],bV=65535&aV,cV=Oca+(bV<<3)|0,f[a>>2]=0|f[cV>>2],f[a+4>>2]=0|f[cV+4>>2],gw(0|Cda),void(l=Fda)):void 0}function pk(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;for(C=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,r=b,t=d,u=t+12|0,v=0|f[u>>2],w=v+16|0,x=0|f[w>>2],y=x+4|0,z=0|f[y>>2],e=z+20|0,g=0|f[e>>2],A=g;;){if(h=r,i=h+-1|0,r=i,j=0!=(0|h),k=A,!j){B=6;break}if(n=0!=(0|k),!n){B=4;break}o=A,p=o+4|0,q=0|f[p>>2],A=q}return 4==(0|B)?(c=0,s=c,l=C,0|s):6==(0|B)?(c=k,s=c,l=C,0|s):0}function qk(a,b){a|=0,b|=0;var c=0,d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,kb=0;return kb=l,l=l+48|0,(0|l)>=(0|m)&&X(),c=kb+32|0,y=kb,d=a,g=b,J=d,U=J+12|0,ea=0|f[U>>2],pa=ea+4|0,Aa=0|f[pa>>2],ib=Aa,La=g,(Wa=(0|La)<0)?void(l=kb):(h=g,p=d,q=p+12|0,r=0|f[q>>2],s=r+36|0,t=0|f[s>>2],u=t+(h<<2)|0,v=0|f[u>>2],hb=v,w=hb,(x=0!=(0|w))?(z=d,A=z+12|0,B=0|f[A>>2],C=B+16|0,D=0|f[C>>2],E=D+20|0,F=0|f[E>>2],G=g,H=(0|F)>(0|G),H&&(I=g,K=d,L=K+12|0,M=0|f[L>>2],N=M+16|0,O=0|f[N>>2],P=O+20|0,f[P>>2]=I),Q=d,R=0|gk(Q),fb=R,S=d,T=S+12|0,V=0|f[T>>2],W=V+4|0,Y=0|f[W>>2],Z=fb,$=Z+8|0,f[$>>2]=Y,_=fb,aa=_+-48|0,ba=0|f[aa>>2],ca=fb,f[ca>>2]=ba,da=fb,fa=da+40|0,f[fa>>2]=-1,ga=fb,ha=ga+36|0,f[ha>>2]=0,ia=hb,ja=fb,ka=ja+4|0,f[ka>>2]=ia,la=hb,ma=la+12|0,na=0|f[ma>>2],oa=na+2|0,qa=0|e[oa>>1],ra=65535&qa,sa=fb,ta=sa+12|0,f[ta>>2]=ra,ua=hb,va=ua+16|0,wa=0|f[va>>2],xa=fb,ya=xa+44|0,f[ya>>2]=wa,za=d,Ba=za+12|0,Ca=0|f[Ba>>2],Da=Ca+4|0,Ea=0|f[Da>>2],Fa=fb,Ga=Fa+-48|0,Ha=Ga+12|0,Ia=0|f[Ha>>2],Ja=Ea+(Ia<<3)|0,Ka=d,Ma=Ka+12|0,Na=0|f[Ma>>2],Oa=Na+4|0,f[Oa>>2]=Ja,Pa=d,Qa=Pa+20|0,Ra=0|f[Qa>>2],gb=Ra,Sa=d,Ta=Sa+20|0,f[Ta>>2]=0,Ua=d,Va=hb,Xa=ib,f[c>>2]=0|f[Xa>>2],f[c+4>>2]=0|f[Xa+4>>2],nk(y,Ua,Va,c),Ya=g,Za=d,$a=Za+12|0,_a=0|f[$a>>2],ab=_a+36|0,bb=0|f[ab>>2],cb=bb+(Ya<<2)|0,f[cb>>2]=0,db=d,eb=db+20|0,i=0|f[eb>>2],(j=0!=(0|i))?void(l=kb):(k=gb,n=d,o=n+20|0,f[o>>2]=k,void(l=kb))):void(l=kb))}function rk(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0;if(P=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,D=d,I=e,J=D>>>0>I>>>0,J&&(K=d,L=e,M=s,N=L+(M<<3)|0,g=K>>>0<N>>>0)){for(h=s,i=d,j=i+(h<<3)|0,d=j,k=s,n=e,o=n+(k<<3)|0,e=o;;){if(p=s,q=p+-1|0,s=q,r=p>>>0>0,!r)break;t=d,u=t+-8|0,d=u,v=e,w=v+-8|0,e=w,f[u>>2]=0|f[w>>2],f[u+4>>2]=0|f[w+4>>2]}return void(l=P)}if(x=d,y=e,z=(0|x)!=(0|y),!z)return void(l=P);for(;;){if(A=s,B=A+-1|0,s=B,C=A>>>0>0,!C)break;E=d,F=E+8|0,d=F,G=e,H=G+8|0,e=H,f[E>>2]=0|f[G>>2],f[E+4>>2]=0|f[G+4>>2]}l=P}function sk(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ia=0;return ia=l,l=l+144|0,(0|l)>=(0|m)&&X(),ba=ia+128|0,da=ia+24|0,ca=ia,_=ia+112|0,aa=ia+104|0,s=ia+96|0,D=ia+88|0,O=ia+80|0,V=ia+72|0,W=ia+64|0,Y=ia+56|0,Z=ia+48|0,$=ia+40|0,c=a,e=b,g=c,h=g+12|0,i=0|f[h>>2],j=i+16|0,k=0|f[j>>2],n=0|f[k>>2],o=0!=(0|n),p=c,q=c,o?(r=c,t=r+12|0,u=0|f[t>>2],v=u+16|0,w=0|f[v>>2],x=0|f[w>>2],vi(s,q,x),y=c,z=y+12|0,A=0|f[z>>2],B=A+16|0,C=0|f[B>>2],E=C+36|0,F=0|f[E>>2],ek(D,F),G=e,ek(O,G),d[ca>>0]=0|d[s>>0],d[ca+1>>0]=0|d[s+1>>0],d[ca+2>>0]=0|d[s+2>>0],d[ca+3>>0]=0|d[s+3>>0],d[ca+4>>0]=0|d[s+4>>0],d[ca+5>>0]=0|d[s+5>>0],d[ca+6>>0]=0|d[s+6>>0],d[ca+7>>0]=0|d[s+7>>0],ea=ca+8|0,d[ea>>0]=0|d[D>>0],d[ea+1>>0]=0|d[D+1>>0],d[ea+2>>0]=0|d[D+2>>0],d[ea+3>>0]=0|d[D+3>>0],d[ea+4>>0]=0|d[D+4>>0],d[ea+5>>0]=0|d[D+5>>0],d[ea+6>>0]=0|d[D+6>>0],d[ea+7>>0]=0|d[D+7>>0],fa=ca+16|0,d[fa>>0]=0|d[O>>0],d[fa+1>>0]=0|d[O+1>>0],d[fa+2>>0]=0|d[O+2>>0],d[fa+3>>0]=0|d[O+3>>0],d[fa+4>>0]=0|d[O+4>>0],d[fa+5>>0]=0|d[O+5>>0],d[fa+6>>0]=0|d[O+6>>0],d[fa+7>>0]=0|d[O+7>>0],Dr(V,p,56509,ca),f[aa>>2]=0|f[V>>2],f[aa+4>>2]=0|f[V+4>>2],P=c,Q=c,R=0|tp(Q,68855),f[ba>>2]=0|f[aa>>2],f[ba+4>>2]=0|f[aa+4>>2],xr($,P,R,ba),f[_>>2]=0|f[$>>2],f[_+4>>2]=0|f[$+4>>2],S=0|f[_>>2],T=c,U=T+20|0,f[U>>2]=S,void(l=ia)):(H=q+12|0,I=0|f[H>>2],J=I+16|0,K=0|f[J>>2],L=K+36|0,M=0|f[L>>2],ek(W,M),N=e,ek(Y,N),d[da>>0]=0|d[W>>0],d[da+1>>0]=0|d[W+1>>0],d[da+2>>0]=0|d[W+2>>0],d[da+3>>0]=0|d[W+3>>0],d[da+4>>0]=0|d[W+4>>0],d[da+5>>0]=0|d[W+5>>0],d[da+6>>0]=0|d[W+6>>0],d[da+7>>0]=0|d[W+7>>0],ga=da+8|0,d[ga>>0]=0|d[Y>>0],d[ga+1>>0]=0|d[Y+1>>0],d[ga+2>>0]=0|d[Y+2>>0],d[ga+3>>0]=0|d[Y+3>>0],d[ga+4>>0]=0|d[Y+4>>0],d[ga+5>>0]=0|d[Y+5>>0],d[ga+6>>0]=0|d[Y+6>>0],d[ga+7>>0]=0|d[Y+7>>0],Dr(Z,p,56553,da),f[aa>>2]=0|f[Z>>2],f[aa+4>>2]=0|f[Z+4>>2],P=c,Q=c,R=0|tp(Q,68855),f[ba>>2]=0|f[aa>>2],f[ba+4>>2]=0|f[aa+4>>2],xr($,P,R,ba),f[_>>2]=0|f[$>>2],f[_+4>>2]=0|f[$+4>>2],S=0|f[_>>2],T=c,U=T+20|0,f[U>>2]=S,void(l=ia))}function tk(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0;k=l,l=l+16|0,(0|l)>=(0|m)&&X(),i=k,d=b,e=c,g=i+4|0,f[g>>2]=7,h=e,f[i>>2]=h,f[a>>2]=0|f[i>>2],f[a+4>>2]=0|f[i+4>>2],l=k}function uk(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;if(F=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,r=b,w=r,x=w+20|0,y=0|f[x>>2],D=y,z=d,A=D,B=0|vk(z,A),C=B<<24>>24!=0)return e=D,c=e,v=c,l=F,0|v;for(;;){if(g=D,h=g+4|0,i=0|f[h>>2],j=0!=(0|i),k=D,!j){E=6;break}if(n=k+4|0,o=0|f[n>>2],D=o,p=d,q=D,s=0|vk(p,q),t=s<<24>>24!=0){E=5;break}}return 5==(0|E)?(u=D,c=u,v=c,l=F,0|v):6==(0|E)?(c=k,v=c,l=F,0|v):0}function vk(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0;return P=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,r=b,C=r,H=C+20|0,I=0|f[H>>2],N=I,J=r,K=J+20|0,L=0|f[K>>2],M=(0|L)>=0,M&&(e=N,g=d,h=g+12|0,i=0|f[h>>2],j=i+20|0,k=0|f[j>>2],n=k+(48*e|0)|0,o=n+4|0,p=0|f[o>>2],q=0!=(0|p),q&&(s=N,t=d,u=t+12|0,v=0|f[u>>2],w=v+20|0,x=0|f[w>>2],y=x+(48*s|0)|0,z=y+4|0,A=0|f[z>>2],B=0|f[A>>2],D=B>>>11,E=256&D,F=0!=(0|E)))?(c=1,G=c,l=P,0|G):(c=0,G=c,l=P,0|G)}function wk(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,K=0,L=0,M=0;K=l,l=l+112|0,(0|l)>=(0|m)&&X(),H=K+72|0,G=K+64|0,F=K+56|0,C=K+83|0,D=K+80|0,E=K+40|0,B=K+32|0,s=K+24|0,u=K+16|0,v=K+8|0,w=K,c=a,e=b,I=C,L=56591,M=I+21|0;do d[I>>0]=0|d[L>>0],I=I+1|0,L=L+1|0;while((0|I)<(0|M));d[D>>0]=0|d[56612],d[D+1>>0]=0|d[56613],d[D+2>>0]=0|d[56614],x=c,lg(s,x,19),f[E>>2]=0|f[s>>2],f[E+4>>2]=0|f[s+4>>2],y=c,f[F>>2]=0|f[E>>2],f[F+4>>2]=0|f[E+4>>2],dh(u,y,F,56615,11),z=c,A=e,g=C+(7*A|0)|0,h=e,i=D+h|0,j=0|d[i>>0],k=j<<24>>24,f[G>>2]=0|f[E>>2],f[G+4>>2]=0|f[E+4>>2],dh(v,z,G,g,k),n=c,o=c,p=0|tp(o,56627),f[H>>2]=0|f[E>>2],f[H+4>>2]=0|f[E+4>>2],xr(w,n,p,H),f[B>>2]=0|f[w>>2],f[B+4>>2]=0|f[w+4>>2],q=0|f[B>>2],r=c,t=r+20|0,f[t>>2]=q,l=K}function xk(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0;return G=l,l=l+32|0,(0|l)>=(0|m)&&X(),n=a,o=b,u=c,v=n,w=o,d=v+w|0,j=v+-2147483648|0,h=v+2147483647|0,i=(0|d)<(0|j),g=(0|d)>(0|h),e=(0|v)>=0,k=e?i:g,E=d,x=E,y=(0|x)>2147483647,D=k|y,D?p=1:(z=E,A=(0|z)<-2147483648,p=A),B=1&p,q=255&B,C=q,r=E,s=u,f[s>>2]=r,t=C,l=G,0|t}function yk(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0;return G=l,l=l+32|0,(0|l)>=(0|m)&&X(),n=a,o=b,u=c,v=n,w=o,d=v-w|0,j=v+-2147483647|0,h=v+-2147483648|0,i=(0|d)<(0|j),g=(0|d)>(0|h),e=(0|v)>=0,k=e?i:g,E=d,x=E,y=(0|x)>2147483647,D=k|y,D?p=1:(z=E,A=(0|z)<-2147483648,p=A),B=1&p,q=255&B,C=q,r=E,s=u,f[s>>2]=r,t=C,l=G,0|t}function zk(a,b,c){a|=0,b|=0,c|=0;var d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Nb=0;if(Nb=l,l=l+112|0,(0|l)>=(0|m)&&X(),Hb=Nb+104|0,d=Nb+96|0,xb=Nb+88|0,Gb=Nb+80|0,Fb=Nb+72|0,Ib=Nb,Cb=Nb+64|0,wb=Nb+56|0,vb=Nb+52|0,ub=Nb+44|0,yb=Nb+28|0,h=Nb+16|0,g=b,N=g,f[Ib>>2]=Cb,Jb=Ib+4|0,f[Jb>>2]=vb,Kb=Ib+8|0,f[Kb>>2]=ub,Lb=Ib+12|0,f[Lb>>2]=wb,0|Lp(N,56712,Ib),Z=g,f[Fb>>2]=0|f[c>>2],f[Fb+4>>2]=0|f[c+4>>2],ia=0|fk(Z,Fb),f[yb>>2]=ia,ta=g,Ea=0|f[Cb>>2],Pa=0|Zp(ta,yb,Ea),Db=Pa,$a=Db,jb=0!=(0|$a),i=g,!jb)return v=0|f[Cb>>2],F=0|f[ub>>2],G=0|f[vb>>2],f[Gb>>2]=0|f[c>>2],f[Gb+4>>2]=0|f[c+4>>2],f[xb>>2]=0|f[wb>>2],f[xb+4>>2]=0|f[wb+4>>2],_j(a,i,Gb,v,F,G,xb),void(l=Nb);if(H=i+12|0,I=0|f[H>>2],J=I+16|0,K=0|f[J>>2],zb=K,L=0|f[Cb>>2],M=zb,f[M>>2]=L,O=0|f[yb>>2],P=zb,Q=P+44|0,f[Q>>2]=O,R=Db,S=zb,T=S+4|0,f[T>>2]=R,U=g,V=U+12|0,W=0|f[V>>2],Y=W+4|0,$=0|f[Y>>2],_=$+8|0,Eb=_,aa=zb,ba=aa+36|0,ca=0|f[ba>>2],da=(0|ca)>=0){for(Ab=0,ea=zb,fa=ea+36|0,ga=0|f[fa>>2],Bb=ga;;){if(ha=Ab,ja=Bb,ka=(0|ha)<(0|ja),!ka)break;la=Ab,ma=Eb,na=ma+(la<<3)|0,oa=Ab,pa=oa+1|0,qa=Eb,ra=qa+(pa<<3)|0,f[na>>2]=0|f[ra>>2],f[na+4>>2]=0|f[ra+4>>2],sa=Ab,ua=sa+1|0,Ab=ua}va=zb,wa=va+36|0,xa=0|f[wa>>2],ya=xa+-1|0,f[wa>>2]=ya}else za=g,Aa=Eb,f[d>>2]=0|f[Aa>>2],f[d+4>>2]=0|f[Aa+4>>2],ao(h,za,d);return Ba=Db,Ca=0|f[Ba>>2],Da=Ca>>>11,Fa=128&Da,(Ga=0!=(0|Fa))?(Ha=Db,Ia=Ha+12|0,Ja=0|f[Ia>>2],Ka=g,f[Hb>>2]=0|f[c>>2],f[Hb+4>>2]=0|f[c+4>>2],cx[511&Ja](a,Ka,Hb),void(l=Nb)):(La=zb,Ma=La+36|0,Na=0|f[Ma>>2],Oa=(0|Na)<0,Qa=g,Ra=Db,Sa=Ra+12|0,Ta=0|f[Sa>>2],Ua=Ta+2|0,Va=0|e[Ua>>1],Wa=65535&Va,Oa?(Xa=(0|Wa)<3,Xa?db=3:(Ya=Db,Za=Ya+12|0,_a=0|f[Za>>2],ab=_a+2|0,bb=0|e[ab>>1],cb=65535&bb,db=cb),hk(Qa,db,3)):(eb=zb,fb=eb+36|0,gb=0|f[fb>>2],hb=gb+2|0,hk(Qa,Wa,hb)),ib=Db,kb=ib+12|0,lb=0|f[kb>>2],mb=lb+2|0,nb=0|e[mb>>1],ob=65535&nb,pb=zb,qb=pb+12|0,f[qb>>2]=ob,rb=g,sb=0|gk(rb),zb=sb,tb=zb,j=tb+12|0,f[j>>2]=0,k=zb,n=k+44|0,f[n>>2]=0,o=Db,p=o+12|0,q=0|f[p>>2],r=q+8|0,s=0|f[r>>2],t=zb,u=t+28|0,f[u>>2]=s,w=g,x=w+12|0,y=0|f[x>>2],z=y+4|0,A=0|f[z>>2],B=zb,C=B+8|0,f[C>>2]=A,D=zb,E=D+40|0,f[E>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=Nb))}function Ak(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;return v=l,l=l+48|0,(0|l)>=(0|m)&&X(),q=v+40|0,r=v+32|0,s=v,o=v+16|0,p=v+8|0,d=b,e=d,f[s>>2]=o,t=s+4|0,f[t>>2]=p,g=0|Lp(e,56716,s),h=1==(0|g),i=d,h?(j=d,k=0|tp(j,64809),Br(i,k,56720),void 0):(n=0|f[c>>2],f[r>>2]=0|f[c>>2],f[r+4>>2]=0|f[c+4>>2],f[q>>2]=0|f[p>>2],f[q+4>>2]=0|f[p+4>>2],Bk(a,i,r,q,n),void(l=v))}function Bk(a,b,c,d,g){a|=0,b|=0,c|=0,d|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Ba=0;return Ba=l,l=l+48|0,(0|l)>=(0|m)&&X(),za=Ba+32|0,ya=Ba+24|0,va=Ba+16|0,h=b,i=g,v=d+4|0,G=0|f[v>>2],R=0==(0|G),R&&(ba=0|f[d>>2],ma=0!=(0|ba),ma||(sa=h,ta=h,ua=0|tp(ta,68855),Br(sa,ua,68606))),j=h,k=j+12|0,n=0|f[k>>2],o=n+16|0,p=0|f[o>>2],wa=p,q=wa,r=q+40|0,s=0|f[r>>2],(t=(0|s)==-2)?(u=h,w=i,f[va>>2]=0|f[d>>2],f[va+4>>2]=0|f[d+4>>2],f[ya>>2]=0|f[c>>2],f[ya+4>>2]=0|f[c+4>>2],Ck(a,u,va,0,0,ya,w),void(l=Ba)):(x=i,y=wa,z=y+44|0,f[z>>2]=x,A=0|f[d>>2],xa=A,B=xa,C=wa,D=C+4|0,f[D>>2]=B,E=xa,F=0|f[E>>2],H=F>>>11,I=128&H,J=0!=(0|I),K=xa,L=K+12|0,J?(M=0|f[L>>2],N=h,f[za>>2]=0|f[c>>2],f[za+4>>2]=0|f[c+4>>2],cx[511&M](a,N,za),void(l=Ba)):(O=0|f[L>>2],P=O+2|0,Q=0|e[P>>1],S=65535&Q,T=wa,U=T+12|0,f[U>>2]=S,V=h,W=0|gk(V),wa=W,Y=wa,Z=Y+12|0,f[Z>>2]=0,$=wa,_=$+44|0,f[_>>2]=0,aa=xa,ca=aa+12|0,da=0|f[ca>>2],ea=da+8|0,fa=0|f[ea>>2],ga=wa,ha=ga+28|0,f[ha>>2]=fa,ia=h,ja=ia+12|0,ka=0|f[ja>>2],la=ka+4|0,na=0|f[la>>2],oa=wa,pa=oa+8|0,f[pa>>2]=na,qa=wa,ra=qa+40|0,f[ra>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=Ba)))}function Ck(a,b,c,d,g,h,i){a|=0,b|=0,c|=0,d|=0,g|=0,h|=0,i|=0;var j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Vb=0;return Vb=l,l=l+80|0,(0|l)>=(0|m)&&X(),Sb=Vb+72|0,Rb=Vb+64|0,Tb=Vb+24|0,Ba=Vb+16|0,Ma=Vb+8|0,Xa=Vb,j=b,k=d,fa=g,qa=i,gb=j,rb=gb+12|0,Cb=0|f[rb>>2],n=Cb+16|0,y=0|f[n>>2],J=0|f[y>>2],Ob=J,U=j,_=U+12|0,aa=0|f[_>>2],ba=aa+16|0,ca=0|f[ba>>2],da=ca+12|0,ea=0|f[da>>2],Pb=ea,ga=c+4|0,ha=0|f[ga>>2],ia=0==(0|ha),ia&&(ja=0|f[c>>2],ka=0!=(0|ja),ka||(la=j,ma=j,na=0|tp(ma,68855),Br(la,na,68606))),oa=0|f[c>>2],Qb=oa,pa=j,ra=0|gk(pa),Nb=ra,sa=Ob,ta=Nb,f[ta>>2]=sa,ua=Qb,va=Nb,wa=va+4|0,f[wa>>2]=ua,xa=j,ya=xa+12|0,za=0|f[ya>>2],Aa=za+4|0,Ca=0|f[Aa>>2],Da=Nb,Ea=Da+8|0,f[Ea>>2]=Ca,Fa=k,Ga=Nb,Ha=Ga+36|0,f[Ha>>2]=Fa,Ia=qa,Ja=Nb,Ka=Ja+44|0,f[Ka>>2]=Ia,La=Nb,Na=La+40|0,f[Na>>2]=-1,Oa=j,Pa=Oa+12|0,Qa=0|f[Pa>>2],Ra=Qa+4|0,Sa=0|f[Ra>>2],Ta=Pb,Ua=Sa+(Ta<<3)|0,Va=j,Wa=Va+12|0,Ya=0|f[Wa>>2],Za=Ya+4|0,f[Za>>2]=Ua,$a=Qb,_a=0|f[$a>>2],ab=_a>>>11,bb=128&ab,cb=0!=(0|bb),cb?(db=k,eb=db+2|0,fb=Nb,hb=fb+12|0,f[hb>>2]=eb,ib=j,jb=Nb,kb=jb+12|0,lb=0|f[kb>>2],hk(ib,lb,0)):(mb=Qb,nb=mb+12|0,ob=0|f[nb>>2],pb=ob+2|0,qb=0|e[pb>>1],sb=65535&qb,tb=Nb,ub=tb+12|0,f[ub>>2]=sb,vb=j,wb=Nb,xb=wb+12|0,yb=0|f[xb>>2],zb=k,Ab=zb+2|0,hk(vb,yb,Ab)),Bb=j,Db=Bb+12|0,Eb=0|f[Db>>2],Fb=Eb+4|0,Gb=0|f[Fb>>2],f[Gb>>2]=0|f[h>>2],f[Gb+4>>2]=0|f[h+4>>2],Hb=k,Ib=(0|Hb)>0,Ib&&(Jb=j,Kb=Jb+12|0,Lb=0|f[Kb>>2],Mb=Lb+4|0,o=0|f[Mb>>2],p=o+8|0,q=fa,r=k,bk(p,q,r)),s=k,t=s+1|0,u=j,v=u+12|0,w=0|f[v>>2],x=w+4|0,z=0|f[x>>2],A=z+(t<<3)|0,$j(Ba),f[A>>2]=0|f[Ba>>2],f[A+4>>2]=0|f[Ba+4>>2],B=Qb,C=0|f[B>>2],D=C>>>11,E=128&D,F=0!=(0|E),F?(G=Qb,H=G+12|0,I=0|f[H>>2],K=j,f[Rb>>2]=0|f[h>>2],f[Rb+4>>2]=0|f[h+4>>2],cx[511&I](Ma,K,Rb),f[Tb>>2]=0|f[Ma>>2],f[Tb+4>>2]=0|f[Ma+4>>2],L=j,M=L+12|0,N=0|f[M>>2],O=N+16|0,P=0|f[O>>2],Q=P+8|0,R=0|f[Q>>2],S=j,T=S+12|0,V=0|f[T>>2],W=V+4|0,f[W>>2]=R,Y=j,ak(Y),f[a>>2]=0|f[Tb>>2],f[a+4>>2]=0|f[Tb+4>>2],void(l=Vb)):(Z=j,$=Qb,f[Sb>>2]=0|f[h>>2],f[Sb+4>>2]=0|f[h+4>>2],nk(Xa,Z,$,Sb),f[Tb>>2]=0|f[Xa>>2],f[Tb+4>>2]=0|f[Xa+4>>2],f[a>>2]=0|f[Tb>>2],f[a+4>>2]=0|f[Tb+4>>2],void(l=Vb))}function Dk(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;switch(E=l,l=l+80|0,(0|l)>=(0|m)&&X(),w=E+72|0,A=E+64|0,z=E+56|0,B=E,u=E+40|0,v=E+32|0,y=E+24|0,e=E+8|0,d=b,k=d,f[B>>2]=u,C=B+4|0,f[C>>2]=v,n=0|Lp(k,56716,B),o=1==(0|n),o&&(p=d,q=d,r=0|tp(q,64809),Br(p,r,56771)),s=c+4|0,t=0|f[s>>2],0|t){case 6:case 3:case 4:x=0;break;default:g=d,f[z>>2]=0|f[c>>2],f[z+4>>2]=0|f[c+4>>2],Wp(e,g,z),f[y>>2]=0|f[e>>2],f[y+4>>2]=0|f[e+4>>2],h=0|f[y>>2],x=h}i=d,j=x,f[A>>2]=0|f[c>>2],f[A+4>>2]=0|f[c+4>>2],f[w>>2]=0|f[v>>2],f[w+4>>2]=0|f[v+4>>2],Bk(a,i,A,w,j),l=E}function Ek(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ca=0;return ca=l,l=l+64|0,(0|l)>=(0|m)&&X(),g=ca+56|0,e=ca+48|0,aa=ca+24|0,G=ca+16|0,R=ca+8|0,V=ca,h=b,i=c,v=d,W=h,Y=W+12|0,Z=0|f[Y>>2],$=Z+20|0,j=0|f[$>>2],k=0!=(0|j),k&&(n=h,o=n+12|0,p=0|f[o>>2],q=p+16|0,r=0|f[q>>2],s=h,t=s+12|0,u=0|f[t>>2],w=u+20|0,x=0|f[w>>2],y=(0|r)==(0|x),!y)?(D=h,E=0|gk(D),_=E,F=_,H=F+12|0,f[H>>2]=1,I=_,J=I+40|0,f[J>>2]=-1,K=h,L=K+32|0,M=0|f[L>>2],N=_,O=N+44|0,f[O>>2]=M,P=h,Q=i,S=h,jg(R,S),T=v,f[g>>2]=0|f[R>>2],f[g+4>>2]=0|f[R+4>>2],ok(V,P,Q,g,T),f[aa>>2]=0|f[V>>2],f[aa+4>>2]=0|f[V+4>>2],U=h,ak(U),f[a>>2]=0|f[aa>>2],f[a+4>>2]=0|f[aa+4>>2],void(l=ca)):(z=h,A=i,B=h,jg(G,B),C=v,f[e>>2]=0|f[G>>2],f[e+4>>2]=0|f[G+4>>2],ok(a,z,A,e,C),void(l=ca))}function Fk(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0;for(ya=l,l=l+160|0,(0|l)>=(0|m)&&X(),wa=4,va=0|fw(40),f[va>>2]=0,ka=ya,e=a+1404|0,f[e>>2]=ka,g=a+1404|0,v=0|f[g>>2],va=0|pw(v,1,0|va,0|wa),wa=F,q=0,H=q,q=0,0!=(0|H)&0!=(0|r)?(S=0|rw(0|f[H>>2],0|va,0|wa),0==(0|S)&&Aa(0|H,0|r),F=r):S=-1,ca=F,la=1==(0|S),c=la?ca:0;;){if(ga=0==(0|c),!ga){if(q=0,na(207,0|a,64154),$=q,q=0,0!=(0|$)&0!=(0|r)?(_=0|rw(0|f[$>>2],0|va,0|wa),0==(0|_)&&Aa(0|$,0|r),F=r):_=-1,aa=F,ma=1==(0|_)){c=aa;continue}xa=15;break}if(ha=a+72|0,ia=0|d[ha>>0],ja=ia&-2,h=1|ja,d[ha>>0]=h,i=a+68|0,f[i>>2]=0,j=a+64|0,f[j>>2]=0,k=a+1140|0,f[k>>2]=0,n=a+1136|0,f[n>>2]=0,o=a+44|0,f[o>>2]=0,q=0,na(202,0|a,0|b),p=q,q=0,0!=(0|p)&0!=(0|r)?(s=0|rw(0|f[p>>2],0|va,0|wa),0==(0|s)&&Aa(0|p,0|r),F=r):s=-1,t=F,qa=1==(0|s))c=t;else if(q=0,0|oa(203,0|a),u=q,q=0,0!=(0|u)&0!=(0|r)?(w=0|rw(0|f[u>>2],0|va,0|wa),0==(0|w)&&Aa(0|u,0|r),F=r):w=-1,x=F,ra=1==(0|w))c=x;else{if(y=a+1144|0,z=0|f[y>>2],A=0!=(0|z),!A){if(q=0,B=0|oa(204,0|a),C=q,q=0,0!=(0|C)&0!=(0|r)?(D=0|rw(0|f[C>>2],0|va,0|wa),0==(0|D)&&Aa(0|C,0|r),F=r):D=-1,E=F,sa=1==(0|D)){c=E;continue}G=a+1144|0,f[G>>2]=B}if(q=0,na(205,0|a,0|b),I=q,q=0,0!=(0|I)&0!=(0|r)?(J=0|rw(0|f[I>>2],0|va,0|wa),0==(0|J)&&Aa(0|I,0|r),F=r):J=-1,K=F,ta=1==(0|J))c=K;else{if(L=0!=(0|b),!L){xa=16;break}if(M=b+28|0,N=0|d[M>>0],O=(255&N)>>>1,P=1&O,Q=255&P,R=0!=(0|Q),!R){xa=16;break}if(T=0|f[a>>2],U=a+1144|0,V=0|f[U>>2],q=0,pa(206,0|T,0|V,0),W=q,q=0,0!=(0|W)&0!=(0|r)?(Y=0|rw(0|f[W>>2],0|va,0|wa),0==(0|Y)&&Aa(0|W,0|r),F=r):Y=-1,Z=F,ua=1==(0|Y),!ua){xa=13;break}c=Z}}}return 13==(0|xa)?(gw(0|va),void(l=ya)):15==(0|xa)?(ba=a+1136|0,da=0|f[ba>>2],ea=da+1|0,f[ba>>2]=ea,fa=a+1144|0,f[fa>>2]=0,gw(0|va),void(l=ya)):16==(0|xa)?(gw(0|va),void(l=ya)):void 0}function Gk(a,b){a|=0,b|=0;var c=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Ba=0;if(Ba=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,g=b,t=g,E=0!=(0|t),!E)return void(l=Ba);P=g,_=P+8|0,ka=0|f[_>>2],va=0!=(0|ka),va&&(xa=c,ya=g,h=ya+8|0,i=0|f[h>>2],Hk(xa,i)),j=g,k=j+12|0,n=0|e[k>>1],o=n<<16>>16!=0,o&&(p=g,q=p+12|0,r=0|e[q>>1],s=r<<16>>16,u=c,v=u+32|0,f[v>>2]=s),w=g,x=0|f[w>>2],y=0!=(0|x);a:do if(y)for(z=c,A=0|Jk(z,0,0),B=c,C=B+76|0,f[C>>2]=A,za=0;;){if(D=za,F=g,G=F+4|0,H=0|f[G>>2],I=(0|D)<(0|H),!I)break a;J=c,K=za,L=g,M=0|f[L>>2],N=M+(K<<2)|0,O=0|f[N>>2],Kk(J,O),Q=za,R=Q+1|0,za=R}while(0);return S=g,T=S+28|0,U=0|d[T>>0],V=1&U,W=c,Y=W+1148|0,Z=0|d[Y>>0],$=1&V,aa=$<<1&255,ba=Z&-3,ca=ba|aa,d[Y>>0]=ca,da=g,ea=da+28|0,fa=0|d[ea>>0],ga=(255&fa)>>>4,ha=1&ga,ia=c,ja=ia+1148|0,la=0|d[ja>>0],ma=1&ha,na=la&-2,oa=na|ma,d[ja>>0]=oa,pa=g,qa=pa+16|0,ra=0|f[qa>>2],(sa=0!=(0|ra))?(ta=g,ua=c,wa=ua+24|0,f[wa>>2]=ta,void(l=Ba)):void(l=Ba)}function Hk(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0;for(Ca=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=c,C=0|f[r>>2],N=d,Z=0|li(C,N),Aa=Z,ia=c,ta=0|f[ia>>2],wa=Aa,xa=0|si(ta,wa,0),e=c,g=e+28|0,f[g>>2]=xa,h=c,i=h+1396|0,j=0|f[i>>2],k=j>>>0>0,n=k?0:1,o=c,p=o+32|0,f[p>>2]=n,ya=0;;){if(q=ya,s=c,t=s+1396|0,u=0|f[t>>2],v=q>>>0<u>>>0,!v)break;if(w=ya,x=c,y=x+1392|0,z=0|f[y>>2],A=z+(w<<2)|0,B=0|f[A>>2],D=Aa,E=(0|B)==(0|D),F=ya,E){Ba=4;break}I=F+1|0,ya=I}return 4==(0|Ba)?(G=c,H=G+1400|0,f[H>>2]=F,void(l=Ca)):(J=c,K=J+1396|0,L=0|f[K>>2],M=L+1|0,f[K>>2]=M,O=c,P=O+1400|0,f[P>>2]=L,Q=c,R=c,S=R+1396|0,T=0|f[S>>2],U=T<<2,V=0|Ik(Q,U),za=V,W=c,Y=W+1392|0,$=0|f[Y>>2],_=0!=(0|$),_&&(aa=za,ba=c,ca=ba+1392|0,da=0|f[ca>>2],ea=c,fa=ea+1396|0,ga=0|f[fa>>2],ha=ga<<2,0|yw(0|aa,0|da,0|ha)),ja=za,ka=c,la=ka+1392|0,f[la>>2]=ja,ma=Aa,na=c,oa=na+1396|0,pa=0|f[oa>>2],qa=pa-1|0,ra=c,sa=ra+1392|0,ua=0|f[sa>>2],va=ua+(qa<<2)|0,f[va>>2]=ma,void(l=Ca))}function Ik(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,i=c,j=i+4|0,k=0|f[j>>2],n=d,o=0|gt(k,n),s=o,p=s,(q=0!=(0|p))?(h=s,l=u,0|h):(r=c,e=r+1404|0,g=0|f[e>>2],Aa(0|g,1),0)}function Jk(a,b,c){a|=0,b|=0,c|=0;var d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,T=0;return T=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,g=b,t=c,E=d,L=E+8|0,M=0|f[L>>2],N=0!=(0|M),O=d,N?(P=O+8|0,Q=0|f[P>>2],R=Q,h=d,i=h+8|0,j=0|f[i>>2],k=j+4|0,n=0|f[k>>2],o=d,p=o+8|0,f[p>>2]=n):(q=0|Ik(O,12),R=q),r=g,s=R,f[s>>2]=r,u=t,v=R,w=v+4|0,f[w>>2]=u,x=d,y=x+32|0,z=0|f[y>>2],A=65535&z,B=R,C=B+8|0,e[C>>1]=A,D=d,F=D+1400|0,G=0|f[F>>2],H=65535&G,I=R,J=I+10|0,e[J>>1]=H,K=R,l=T,0|K}function Kk(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,z=0;return z=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,q=c,r=q+76|0,s=0|f[r>>2],(t=0!=(0|s))?(u=c,v=c,w=v+76|0,x=0|f[w>>2],e=0|f[x>>2],g=c,h=d,i=h,j=0|Lk(g,i),k=0|Mk(u,e,j),n=c,o=n+76|0,p=0|f[o>>2],f[p>>2]=k,void(l=z)):void(l=z)}function Lk(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=0|Jk(e,f,0),l=i,0|g}function Mk(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;if(E=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,s=b,v=c,w=s,C=w,x=s,y=0!=(0|x),!y)return z=v,d=z,u=d,l=E,0|u;for(;;){if(A=C,B=A+4|0,g=0|f[B>>2],h=0!=(0|g),!h)break;i=C,j=i+4|0,k=0|f[j>>2],C=k}return n=v,o=0!=(0|n),o&&(p=v,q=C,r=q+4|0,f[r>>2]=p),t=s,d=t,u=d,l=E,0|u}function Nk(a){a|=0;var b=0,c=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0,wf=0,xf=0,yf=0,zf=0,Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0,Gf=0,Hf=0,If=0,Jf=0,Kf=0,Lf=0,Mf=0,Nf=0,Of=0,Pf=0,Qf=0,Rf=0,Sf=0,Tf=0,Uf=0,Vf=0,Wf=0,Xf=0,Yf=0,Zf=0,$f=0,_f=0,ag=0,bg=0,cg=0,dg=0,eg=0,fg=0,gg=0,hg=0,ig=0,jg=0,kg=0,lg=0,mg=0,ng=0,og=0,pg=0,qg=0,rg=0,sg=0,tg=0,ug=0,vg=0,wg=0,xg=0,yg=0,zg=0,Ag=0,Bg=0,Cg=0,Dg=0,Eg=0,Fg=0,Gg=0,Hg=0,Ig=0,Jg=0,Kg=0,Lg=0,Mg=0,Ng=0,Og=0,Pg=0,Qg=0,Rg=0,Sg=0,Tg=0,Ug=0,Vg=0,Wg=0,Xg=0,Yg=0,Zg=0,$g=0,_g=0,ah=0,bh=0,ch=0,dh=0,eh=0,fh=0,gh=0,hh=0,ih=0,jh=0,kh=0,lh=0,mh=0,nh=0,oh=0,ph=0,qh=0,rh=0,sh=0,th=0,uh=0,vh=0,wh=0,xh=0,yh=0,zh=0,Ah=0,Bh=0,Ch=0,Dh=0,Eh=0,Fh=0,Gh=0,Hh=0,Ih=0,Jh=0,Kh=0,Lh=0,Mh=0,Nh=0,Oh=0,Ph=0,Qh=0,Rh=0,Sh=0,Th=0,Uh=0,Vh=0,Wh=0,Xh=0,Yh=0,Zh=0,$h=0,_h=0,ai=0,bi=0,ci=0,di=0,ei=0,fi=0,gi=0,hi=0,ii=0,ji=0,ki=0,li=0,mi=0,ni=0,oi=0,pi=0,qi=0,ri=0,si=0,ti=0,ui=0,vi=0,wi=0,xi=0,yi=0,zi=0,Ai=0,Bi=0,Ci=0,Di=0,Ei=0,Fi=0,Gi=0,Hi=0,Ii=0,Ji=0,Ki=0,Li=0,Mi=0,Ni=0,Oi=0,Pi=0,Qi=0,Ri=0,Si=0,Ti=0,Ui=0,Vi=0,Wi=0,Xi=0,Yi=0,Zi=0,$i=0,_i=0,aj=0,bj=0,cj=0,dj=0,ej=0,fj=0,gj=0,hj=0,ij=0,jj=0,kj=0,lj=0,mj=0,nj=0,oj=0,pj=0,qj=0,rj=0,sj=0,tj=0,uj=0,vj=0,wj=0,xj=0,yj=0,zj=0,Aj=0,Bj=0,Cj=0,Dj=0,Ej=0,Fj=0,Gj=0,Hj=0,Ij=0,Jj=0,Kj=0,Lj=0,Mj=0,Nj=0,Oj=0,Pj=0,Qj=0,Rj=0,Sj=0,Tj=0,Uj=0,Vj=0,Wj=0,Xj=0,Yj=0,Zj=0,$j=0,_j=0,ak=0,bk=0,ck=0,dk=0,ek=0,fk=0,gk=0,hk=0,ik=0,jk=0,kk=0,lk=0,mk=0,nk=0,ok=0,pk=0,qk=0,rk=0,sk=0,tk=0,uk=0,vk=0,wk=0,xk=0,yk=0,zk=0,Ak=0,Bk=0,Ck=0,Dk=0,Ek=0,Fk=0,Gk=0,Hk=0,Ik=0,Nk=0,Pk=0,Qk=0,Sk=0,Tk=0,Uk=0,Vk=0,Wk=0,Xk=0,Zk=0,$k=0,al=0,bl=0,cl=0,dl=0,fl=0,gl=0,hl=0,il=0,jl=0,ml=0,ol=0,pl=0,ql=0,rl=0,sl=0,tl=0,ul=0,wl=0,yl=0,zl=0,Al=0,Bl=0,Cl=0,Dl=0,El=0,Fl=0,Gl=0,Il=0,Ol=0,am=0,tm=0,um=0,Mm=0,Om=0,on=0,pn=0,qn=0,sn=0,tn=0,un=0,vn=0,wn=0,xn=0,yn=0,zn=0,An=0,Bn=0,Cn=0,Dn=0,En=0,Fn=0,Gn=0,Hn=0,In=0,Jn=0,Kn=0,Ln=0,Mn=0,Nn=0,On=0,Pn=0,Qn=0,Rn=0,Sn=0,Tn=0,Un=0,Vn=0,Wn=0,Xn=0,Yn=0,Zn=0,$n=0,_n=0,ao=0,bo=0,co=0,eo=0,fo=0,go=0,ho=0,io=0,jo=0,ko=0,lo=0,mo=0,no=0,oo=0,po=0,qo=0,ro=0,so=0,to=0,uo=0,vo=0,wo=0,xo=0,yo=0,zo=0,Ao=0,Bo=0,Co=0,Do=0,Eo=0,Fo=0,Go=0,Ho=0,Io=0,Jo=0,Ko=0,Lo=0,Mo=0,No=0,Oo=0,Po=0,Qo=0,Ro=0,So=0,To=0,Uo=0,Vo=0,Wo=0,Xo=0,Yo=0,Zo=0,$o=0,_o=0,ap=0,bp=0,cp=0,dp=0,ep=0,fp=0,gp=0,hp=0,ip=0,jp=0,kp=0,lp=0,mp=0,np=0,op=0,pp=0,qp=0,rp=0,sp=0,tp=0,up=0,vp=0,wp=0,xp=0,yp=0,zp=0,Ap=0,Bp=0,Cp=0,Dp=0,Ep=0,Fp=0,Gp=0,Hp=0,Ip=0,Jp=0,Kp=0,Lp=0,Mp=0,Np=0,Op=0,Pp=0,Qp=0,Rp=0,Sp=0,Tp=0,Up=0,Vp=0,Wp=0,Xp=0,Yp=0,Zp=0,$p=0,_p=0,aq=0,bq=0,cq=0,dq=0,eq=0,fq=0,gq=0,hq=0,iq=0,jq=0,kq=0,lq=0,mq=0,nq=0,oq=0,pq=0,qq=0,rq=0,sq=0,tq=0,uq=0,vq=0,wq=0,xq=0,yq=0,zq=0,Aq=0,Bq=0,Cq=0,Dq=0,Eq=0,Fq=0,Gq=0,Hq=0,Iq=0,Jq=0,Kq=0,Lq=0,Mq=0,Nq=0,Oq=0,Pq=0,Qq=0,Rq=0,Sq=0,Tq=0,Uq=0,Vq=0,Wq=0,Xq=0,Yq=0,Zq=0,$q=0,_q=0,ar=0,br=0,cr=0,dr=0,er=0,fr=0,gr=0,hr=0,ir=0,jr=0,kr=0,lr=0,mr=0,nr=0,or=0,pr=0,qr=0,rr=0,sr=0,tr=0,ur=0,vr=0,wr=0,xr=0,yr=0,zr=0,Ar=0,Br=0,Cr=0,Dr=0,Er=0,Fr=0,Gr=0,Hr=0,Ir=0,Jr=0,Kr=0,Lr=0,Mr=0,Nr=0,Or=0,Pr=0,Qr=0,Rr=0,Sr=0,Tr=0,Ur=0,Vr=0,Wr=0,Xr=0,Yr=0,Zr=0,$r=0,_r=0,as=0,bs=0,cs=0,ds=0,es=0,fs=0,gs=0,hs=0,is=0,js=0,ks=0,ls=0,ms=0,ns=0,os=0,ps=0,qs=0,rs=0,ss=0,ts=0,us=0,vs=0,ws=0,xs=0,ys=0,zs=0,As=0,Bs=0,Cs=0,Ds=0,Es=0,Fs=0,Gs=0,Hs=0,Is=0,Js=0,Ks=0,Ls=0,Ms=0,Ns=0,Os=0,Ps=0,Qs=0,Rs=0,Ss=0,Ts=0,Us=0,Vs=0,Ws=0,Xs=0,Ys=0,Zs=0,$s=0,_s=0,at=0,bt=0,ct=0,dt=0,et=0,ft=0,gt=0,ht=0,it=0,jt=0,kt=0,lt=0,mt=0,nt=0,ot=0,pt=0,qt=0,rt=0,st=0,tt=0,ut=0,vt=0,wt=0,xt=0,yt=0,zt=0,At=0,Bt=0,Ct=0,Dt=0,Et=0,Ft=0,Gt=0,Ht=0,It=0,Jt=0,Kt=0,Lt=0,Mt=0,Nt=0,Ot=0,Pt=0,Qt=0,Rt=0,St=0,Tt=0,Ut=0,Vt=0,Wt=0,Xt=0,Yt=0,Zt=0,$t=0,_t=0,au=0,bu=0,cu=0,du=0,eu=0,fu=0,gu=0,hu=0,iu=0,ju=0,ku=0,lu=0,mu=0,nu=0,ou=0,pu=0,qu=0,ru=0,su=0,tu=0,uu=0,vu=0,wu=0,xu=0,yu=0,zu=0,Au=0,Bu=0,Cu=0,Du=0,Eu=0,Fu=0,Gu=0,Hu=0,Iu=0,Ju=0,Ku=0,Lu=0,Mu=0,Nu=0,Ou=0,Pu=0,Qu=0,Ru=0,Su=0,Tu=0,Uu=0,Vu=0,Wu=0,Xu=0,Yu=0,Zu=0,$u=0,_u=0,av=0,bv=0,cv=0,dv=0,ev=0,fv=0,gv=0,hv=0,iv=0,jv=0,kv=0,lv=0,mv=0,nv=0,ov=0,pv=0,qv=0,rv=0,sv=0,tv=0,uv=0,vv=0,wv=0,xv=0,yv=0,zv=0,Av=0,Bv=0,Cv=0,Dv=0,Ev=0,Fv=0,Gv=0,Hv=0,Iv=0,Lv=0,Mv=0,Nv=0,Ov=0,Pv=0,Qv=0,Rv=0,Sv=0,Tv=0,Uv=0,Vv=0,Wv=0,Xv=0,Yv=0,Zv=0,$v=0,_v=0,aw=0,bw=0,cw=0,dw=0,ew=0,fw=0,gw=0,hw=0,iw=0,jw=0,kw=0,lw=0,mw=0,nw=0,ow=0,pw=0,qw=0,rw=0,tw=0,uw=0,vw=0,ww=0,xw=0,yw=0,zw=0,Aw=0,Bw=0,Cw=0,Dw=0,Ew=0,Fw=0,Gw=0,Hw=0,Iw=0,Jw=0,Kw=0,Lw=0,Mw=0,Nw=0,Ow=0,Pw=0,Qw=0,Rw=0,Sw=0,Tw=0,Uw=0,Vw=0,Ww=0,Xw=0,Yw=0,Zw=0,$w=0,_w=0,ax=0,bx=0,cx=0,dx=0,ex=0,fx=0,gx=0,hx=0,ix=0,jx=0,kx=0,lx=0,mx=0,nx=0,ox=0,px=0,qx=0,rx=0,sx=0,tx=0,ux=0,vx=0,wx=0,xx=0,yx=0,zx=0,Ax=0,Bx=0,Cx=0,Dx=0,Ex=0,Fx=0,Gx=0,Hx=0,Ix=0,Jx=0,Kx=0,Lx=0,Mx=0,Nx=0,Ox=0,Px=0,Qx=0,Rx=0,Sx=0,Tx=0,Ux=0,Vx=0,Wx=0,Xx=0,Yx=0,Zx=0,$x=0,_x=0,ay=0,by=0,cy=0,dy=0,ey=0,fy=0,gy=0,hy=0,iy=0,jy=0,ky=0,ly=0,my=0,ny=0,oy=0,py=0,qy=0,ry=0,sy=0,ty=0,uy=0,vy=0,wy=0,xy=0,yy=0,zy=0,Ay=0,By=0,Cy=0,Dy=0,Ey=0,Fy=0,Gy=0,Hy=0,Iy=0,Jy=0,Ky=0,Ly=0,My=0,Ny=0,Oy=0,Py=0,Qy=0,Ry=0,Sy=0,Ty=0,Uy=0,Vy=0,Wy=0,Xy=0,Yy=0,Zy=0,$y=0,_y=0,az=0,bz=0,cz=0,dz=0,ez=0,fz=0,gz=0,hz=0,iz=0,jz=0,kz=0,lz=0,mz=0,nz=0,oz=0,pz=0,qz=0,rz=0,sz=0,tz=0,uz=0,vz=0,wz=0,xz=0,yz=0,zz=0,Az=0,Bz=0,Cz=0,Dz=0,Ez=0,Fz=0,Gz=0,Hz=0,Iz=0,Jz=0,Kz=0,Lz=0,Mz=0,Nz=0,Oz=0,Pz=0,Qz=0,Rz=0,Sz=0,Tz=0,Uz=0,Vz=0,Wz=0,Xz=0,Yz=0,Zz=0,$z=0,_z=0,aA=0,bA=0,cA=0,dA=0,eA=0,fA=0,gA=0,hA=0,iA=0,jA=0,kA=0,lA=0,mA=0,nA=0,oA=0,pA=0,qA=0,rA=0,sA=0,tA=0,uA=0,vA=0,wA=0,xA=0,yA=0,zA=0,AA=0,BA=0,CA=0,DA=0,EA=0,FA=0,GA=0,HA=0,IA=0,JA=0,KA=0,LA=0,MA=0,NA=0,OA=0,PA=0,QA=0,RA=0,SA=0,TA=0,UA=0,VA=0,WA=0,XA=0,YA=0,ZA=0,$A=0,_A=0,aB=0,bB=0,cB=0,dB=0,eB=0,fB=0,gB=0,hB=0,iB=0,jB=0,kB=0,lB=0,mB=0,nB=0,oB=0,pB=0,qB=0,rB=0,sB=0,tB=0,uB=0,vB=0,wB=0,xB=0,yB=0,zB=0,AB=0,BB=0,CB=0,DB=0,EB=0,FB=0,GB=0,HB=0,IB=0,JB=0,KB=0,LB=0,MB=0,NB=0,OB=0,PB=0,QB=0,RB=0,SB=0,TB=0,UB=0,VB=0,WB=0,XB=0,YB=0,ZB=0,$B=0,_B=0,aC=0,bC=0,cC=0,dC=0,eC=0,fC=0,gC=0,hC=0,iC=0,jC=0,kC=0,lC=0,mC=0,nC=0,oC=0,pC=0,qC=0,rC=0,sC=0,tC=0,uC=0,vC=0,wC=0,xC=0,yC=0,zC=0,AC=0,BC=0,CC=0,DC=0,EC=0,FC=0,GC=0,HC=0,IC=0,JC=0,KC=0,LC=0,MC=0,NC=0,OC=0,PC=0,QC=0,RC=0,SC=0,TC=0,UC=0,VC=0,WC=0,XC=0,YC=0,ZC=0,$C=0,_C=0,aD=0,bD=0,cD=0,dD=0,eD=0,fD=0,gD=0,hD=0,iD=0,jD=0,kD=0,lD=0,mD=0,nD=0,oD=0,pD=0,qD=0,rD=0,sD=0,tD=0,uD=0,vD=0,wD=0,xD=0,yD=0,zD=0,AD=0,BD=0,CD=0,DD=0,ED=0,FD=0,GD=0,HD=0,ID=0,JD=0,KD=0,LD=0,MD=0,ND=0,OD=0,PD=0,QD=0,RD=0,SD=0,TD=0,UD=0,VD=0,WD=0,XD=0,YD=0,ZD=0,$D=0,_D=0,aE=0,bE=0,cE=0,dE=0,eE=0,fE=0,gE=0,hE=0,iE=0,jE=0,kE=0,lE=0,mE=0,nE=0,oE=0,pE=0,qE=0,rE=0,sE=0,tE=0,uE=0,vE=0,wE=0,xE=0,yE=0,zE=0,AE=0,BE=0,CE=0,DE=0,EE=0,FE=0,GE=0,HE=0,IE=0,JE=0,KE=0,LE=0,ME=0,NE=0,OE=0,PE=0,QE=0,RE=0,SE=0,TE=0,UE=0,VE=0,WE=0,XE=0,YE=0,ZE=0,$E=0,_E=0,aF=0,bF=0,cF=0,dF=0,eF=0,fF=0,gF=0,hF=0,iF=0,jF=0,kF=0,lF=0,mF=0,nF=0,oF=0,pF=0,qF=0,rF=0,sF=0,tF=0,uF=0,vF=0,wF=0,xF=0,yF=0,zF=0,AF=0,BF=0,CF=0,DF=0,EF=0,FF=0,GF=0,HF=0,IF=0,JF=0,KF=0,LF=0,MF=0,NF=0,OF=0,PF=0,QF=0,RF=0,SF=0,TF=0,UF=0,VF=0,WF=0,XF=0,YF=0,ZF=0,$F=0,_F=0,aG=0,bG=0,cG=0,dG=0,eG=0,fG=0,gG=0,hG=0,iG=0,jG=0,kG=0,lG=0,mG=0,nG=0,oG=0,pG=0,qG=0,rG=0,sG=0,tG=0,uG=0,vG=0,wG=0,xG=0,yG=0,zG=0,AG=0,BG=0,CG=0,DG=0,EG=0,FG=0,GG=0,HG=0,IG=0,JG=0,KG=0,LG=0,MG=0,NG=0,OG=0,PG=0,QG=0,RG=0,SG=0,TG=0,UG=0,VG=0,WG=0,XG=0,YG=0,ZG=0,$G=0,_G=0,aH=0,bH=0,cH=0,dH=0,eH=0,fH=0,gH=0,hH=0,iH=0,jH=0,kH=0,lH=0,mH=0,nH=0,oH=0,pH=0,qH=0,rH=0,sH=0,tH=0,uH=0,vH=0,wH=0,xH=0,yH=0,zH=0,AH=0,BH=0,CH=0,DH=0,EH=0,FH=0,GH=0,HH=0,IH=0,JH=0,KH=0,LH=0,MH=0,NH=0,OH=0,PH=0,QH=0,RH=0,SH=0,TH=0,UH=0,VH=0,WH=0,XH=0,YH=0,ZH=0,$H=0,_H=0,aI=0,bI=0,cI=0,dI=0,eI=0,fI=0,gI=0,hI=0,iI=0,jI=0,kI=0,lI=0,mI=0,nI=0,oI=0,pI=0,qI=0,rI=0,sI=0,tI=0,uI=0,vI=0,wI=0,xI=0,yI=0,zI=0,AI=0,BI=0,CI=0,DI=0,EI=0,FI=0,GI=0,HI=0,II=0,JI=0,KI=0,LI=0,MI=0,NI=0,OI=0,PI=0,QI=0,RI=0,SI=0,TI=0,UI=0,VI=0,WI=0,XI=0,YI=0,ZI=0,$I=0,_I=0,aJ=0,bJ=0,cJ=0,dJ=0,eJ=0,fJ=0,gJ=0,hJ=0,iJ=0,jJ=0,kJ=0,lJ=0,mJ=0,nJ=0,oJ=0,pJ=0,qJ=0,rJ=0,sJ=0,tJ=0,uJ=0,vJ=0,wJ=0,xJ=0,yJ=0,zJ=0,AJ=0,BJ=0,CJ=0,DJ=0,EJ=0,FJ=0,GJ=0,HJ=0,IJ=0,JJ=0,KJ=0,LJ=0,MJ=0,NJ=0,OJ=0,PJ=0,QJ=0,RJ=0,SJ=0,TJ=0,UJ=0,VJ=0,WJ=0,XJ=0,YJ=0,ZJ=0,$J=0,_J=0,aK=0,bK=0,cK=0,dK=0,eK=0,fK=0,gK=0,hK=0,iK=0,jK=0,kK=0,lK=0,mK=0,nK=0,oK=0,pK=0,qK=0,rK=0,sK=0,tK=0,uK=0,vK=0,wK=0,xK=0,yK=0,zK=0,AK=0,BK=0,CK=0,DK=0,EK=0,FK=0,GK=0,HK=0,IK=0,JK=0,KK=0,LK=0,MK=0,NK=0,OK=0,PK=0,QK=0,RK=0,SK=0,TK=0,UK=0,VK=0,WK=0,XK=0,YK=0,ZK=0,$K=0,_K=0,aL=0,bL=0,cL=0,dL=0,eL=0,fL=0,gL=0,hL=0,iL=0,jL=0,kL=0,lL=0,mL=0,nL=0,oL=0,pL=0,qL=0,rL=0,sL=0,tL=0,uL=0,vL=0,wL=0,xL=0,yL=0,zL=0,AL=0,BL=0,CL=0,DL=0,EL=0,FL=0,GL=0,HL=0,IL=0,JL=0,KL=0,LL=0,ML=0,NL=0,OL=0,PL=0,QL=0,RL=0,SL=0,TL=0,UL=0,VL=0,WL=0,XL=0,YL=0,ZL=0,$L=0,_L=0,aM=0,bM=0,cM=0,dM=0,eM=0,fM=0,gM=0,hM=0,iM=0,jM=0,kM=0,lM=0,mM=0,nM=0,oM=0,pM=0,qM=0,rM=0,sM=0,tM=0,uM=0,vM=0,wM=0,xM=0,yM=0,zM=0,AM=0,BM=0,CM=0,DM=0,EM=0,FM=0,GM=0,HM=0,IM=0,JM=0,KM=0,LM=0,MM=0,NM=0,OM=0,PM=0,QM=0,RM=0,SM=0,TM=0,UM=0,VM=0,WM=0,XM=0,YM=0,ZM=0,$M=0,_M=0,aN=0,bN=0,cN=0,dN=0,eN=0,fN=0,gN=0,hN=0,iN=0,jN=0,kN=0,lN=0,mN=0,nN=0,oN=0,pN=0,qN=0,rN=0,sN=0,tN=0,uN=0,vN=0,wN=0,xN=0,yN=0,zN=0,AN=0,BN=0,CN=0,DN=0,EN=0,FN=0,GN=0,HN=0,IN=0,JN=0,KN=0,LN=0,MN=0,NN=0,ON=0,PN=0,QN=0,RN=0,SN=0,TN=0,UN=0,VN=0,WN=0,XN=0,YN=0,ZN=0,$N=0,_N=0,aO=0,bO=0,cO=0,dO=0,eO=0,fO=0,gO=0,hO=0,iO=0,jO=0,kO=0,lO=0,mO=0,nO=0,oO=0,pO=0,qO=0,rO=0,sO=0,tO=0,uO=0,vO=0,wO=0,xO=0,yO=0,zO=0,AO=0,BO=0,CO=0,DO=0,EO=0,FO=0,GO=0,HO=0,IO=0,JO=0,KO=0,LO=0,MO=0,NO=0,OO=0,PO=0,QO=0,RO=0,SO=0,TO=0,UO=0,VO=0,WO=0,XO=0,YO=0,ZO=0,$O=0,_O=0,aP=0,bP=0,cP=0,dP=0,eP=0,fP=0,gP=0,hP=0,iP=0,jP=0,kP=0,lP=0,mP=0,nP=0,oP=0,pP=0,qP=0,rP=0,sP=0,tP=0,uP=0,vP=0,wP=0,xP=0,yP=0,zP=0,AP=0,BP=0,CP=0,DP=0,EP=0,FP=0,GP=0,HP=0,IP=0,JP=0,KP=0,LP=0,MP=0,NP=0,OP=0,PP=0,QP=0,RP=0,SP=0,TP=0,UP=0,VP=0,WP=0,XP=0,YP=0,ZP=0,$P=0,_P=0,aQ=0,bQ=0,cQ=0,dQ=0,eQ=0,fQ=0,gQ=0,hQ=0,iQ=0,jQ=0,kQ=0,lQ=0,mQ=0,nQ=0,oQ=0,pQ=0,qQ=0,rQ=0,sQ=0,tQ=0,uQ=0,vQ=0,wQ=0,xQ=0,yQ=0,zQ=0,AQ=0,BQ=0,CQ=0,DQ=0,EQ=0,FQ=0,GQ=0,HQ=0,IQ=0,JQ=0,KQ=0,LQ=0,MQ=0,NQ=0,OQ=0,PQ=0,QQ=0,RQ=0,SQ=0,TQ=0,UQ=0,VQ=0,WQ=0,XQ=0,YQ=0,ZQ=0,$Q=0,_Q=0,aR=0,bR=0,cR=0,dR=0,eR=0,fR=0,gR=0,hR=0,iR=0,jR=0,kR=0,lR=0,mR=0,nR=0,oR=0,pR=0,qR=0,rR=0,sR=0,tR=0,uR=0,vR=0,wR=0,xR=0,yR=0,zR=0,AR=0,BR=0,CR=0,DR=0,ER=0,FR=0,GR=0,HR=0,IR=0,JR=0,KR=0,LR=0,MR=0,NR=0,OR=0,PR=0,QR=0,RR=0,SR=0,TR=0,UR=0,VR=0,WR=0,XR=0,YR=0,ZR=0,$R=0,_R=0,aS=0,bS=0,cS=0,dS=0,eS=0,fS=0,gS=0,hS=0,iS=0,jS=0,kS=0,lS=0,mS=0,nS=0,oS=0,pS=0,qS=0,rS=0,sS=0,tS=0,uS=0,vS=0,wS=0,xS=0,yS=0,zS=0,AS=0,BS=0,CS=0,DS=0,ES=0,FS=0,GS=0,HS=0,IS=0,JS=0,KS=0,LS=0,MS=0,NS=0,OS=0,PS=0,QS=0,RS=0,SS=0,TS=0,US=0,VS=0,WS=0,XS=0,YS=0,ZS=0,$S=0,_S=0,aT=0,bT=0,cT=0,dT=0,eT=0,fT=0,gT=0,hT=0,iT=0,jT=0,kT=0,lT=0,mT=0,nT=0,oT=0,pT=0,qT=0,rT=0,sT=0,tT=0,uT=0,vT=0,wT=0,xT=0,yT=0,zT=0,AT=0,BT=0,CT=0,DT=0,ET=0,FT=0,GT=0,HT=0,IT=0,JT=0,KT=0,LT=0,MT=0,NT=0,OT=0,PT=0,QT=0,RT=0,ST=0,TT=0,UT=0,VT=0,WT=0,XT=0,YT=0,ZT=0,$T=0,_T=0,aU=0,bU=0,cU=0,dU=0,eU=0,fU=0,gU=0,hU=0,iU=0,jU=0,kU=0,lU=0,mU=0,nU=0,oU=0,pU=0,qU=0,rU=0,sU=0,tU=0,uU=0,vU=0,wU=0,xU=0,yU=0,zU=0,AU=0,BU=0,CU=0,DU=0,EU=0,FU=0,GU=0,HU=0,IU=0,JU=0,KU=0,LU=0,MU=0,NU=0,OU=0,PU=0,QU=0,RU=0,SU=0,TU=0,UU=0,VU=0,WU=0,XU=0,YU=0,ZU=0,$U=0,_U=0,aV=0,bV=0,cV=0,dV=0,eV=0,fV=0,gV=0,hV=0,iV=0,jV=0,kV=0,lV=0,mV=0,nV=0,oV=0,pV=0,qV=0,rV=0,sV=0,tV=0,uV=0,vV=0,wV=0,xV=0,yV=0,zV=0,AV=0,BV=0,CV=0,DV=0,EV=0,FV=0,GV=0,HV=0,IV=0,JV=0,KV=0,LV=0,MV=0,NV=0,OV=0,PV=0,QV=0,RV=0,SV=0,TV=0,UV=0,VV=0,WV=0,XV=0,YV=0,ZV=0,$V=0,_V=0,aW=0,bW=0,cW=0,dW=0,eW=0,fW=0,gW=0,hW=0,iW=0,jW=0,kW=0,lW=0,mW=0,nW=0,oW=0,pW=0,qW=0,rW=0,sW=0,tW=0,uW=0,vW=0,wW=0,xW=0,yW=0,zW=0,AW=0,BW=0,CW=0,DW=0,EW=0,FW=0,GW=0,HW=0,IW=0,JW=0,KW=0,LW=0,MW=0,NW=0,OW=0,PW=0,QW=0,RW=0,SW=0,TW=0,UW=0,VW=0,WW=0,XW=0,YW=0,ZW=0,$W=0,_W=0,aX=0,bX=0,cX=0,dX=0,eX=0,fX=0,gX=0,hX=0,iX=0,jX=0,kX=0,lX=0,mX=0,nX=0,oX=0,pX=0,qX=0,rX=0,sX=0,tX=0,uX=0,vX=0,wX=0,xX=0,yX=0,zX=0,AX=0,BX=0,CX=0,DX=0,EX=0,FX=0,GX=0,HX=0,IX=0,JX=0,KX=0,LX=0,MX=0,NX=0,OX=0,PX=0,QX=0,RX=0,SX=0,TX=0,UX=0,VX=0,WX=0,XX=0,YX=0,ZX=0,$X=0,_X=0,aY=0,bY=0,cY=0,dY=0,eY=0,fY=0,gY=0,hY=0,iY=0,jY=0,kY=0,lY=0,mY=0,nY=0,oY=0,pY=0,qY=0,rY=0,sY=0,tY=0,uY=0,vY=0,wY=0,xY=0,yY=0,zY=0,AY=0,BY=0,CY=0,DY=0,EY=0,FY=0,GY=0,HY=0,IY=0,JY=0,KY=0,LY=0,MY=0,NY=0,OY=0,PY=0,QY=0,RY=0,SY=0,TY=0,UY=0,VY=0,WY=0,XY=0,YY=0,ZY=0,$Y=0,_Y=0,aZ=0,bZ=0,cZ=0,dZ=0,eZ=0,fZ=0,gZ=0,hZ=0,iZ=0,jZ=0,kZ=0,lZ=0,mZ=0,nZ=0,oZ=0,pZ=0,qZ=0,rZ=0,sZ=0,tZ=0,uZ=0,vZ=0,wZ=0,xZ=0,yZ=0,zZ=0,AZ=0,BZ=0,CZ=0,DZ=0,EZ=0,FZ=0,GZ=0,HZ=0,IZ=0,JZ=0,KZ=0,LZ=0,MZ=0,NZ=0,OZ=0,PZ=0,QZ=0,RZ=0,SZ=0,TZ=0,UZ=0,VZ=0,WZ=0,XZ=0,YZ=0,ZZ=0,$Z=0,_Z=0,a$=0,b$=0,c$=0,d$=0,e$=0,f$=0,g$=0,h$=0,i$=0,j$=0,k$=0,l$=0,m$=0,n$=0,o$=0,p$=0,q$=0,r$=0,s$=0,t$=0,u$=0,v$=0,w$=0,x$=0,y$=0,z$=0,A$=0,B$=0,C$=0,D$=0,E$=0,F$=0,G$=0,H$=0,I$=0,J$=0,K$=0,L$=0,M$=0,N$=0,O$=0,P$=0,Q$=0,R$=0,S$=0,T$=0,U$=0,V$=0,W$=0,X$=0,Y$=0,Z$=0,$$=0,_$=0,a_=0,b_=0,c_=0,d_=0,e_=0,f_=0,g_=0,h_=0,i_=0,j_=0,k_=0,l_=0,m_=0,n_=0,o_=0,p_=0,q_=0,r_=0,s_=0,t_=0,u_=0,v_=0,w_=0,x_=0,y_=0,z_=0,A_=0,B_=0,C_=0,D_=0,E_=0,F_=0,G_=0,H_=0,I_=0,J_=0,K_=0,L_=0,M_=0,N_=0,O_=0,P_=0,Q_=0,R_=0,S_=0,T_=0,U_=0,V_=0,W_=0,X_=0,Y_=0,Z_=0,$_=0,__=0,a0=0,b0=0,c0=0,d0=0,e0=0,f0=0,g0=0,h0=0,i0=0,j0=0,k0=0,l0=0,m0=0,n0=0,o0=0,p0=0,q0=0,r0=0,s0=0,t0=0,u0=0,v0=0,w0=0,x0=0,y0=0,z0=0,A0=0,B0=0,C0=0,D0=0,E0=0,F0=0,G0=0,H0=0,I0=0,J0=0,K0=0,L0=0,M0=0,N0=0,O0=0,P0=0,Q0=0,R0=0,S0=0,T0=0,U0=0,V0=0,W0=0,X0=0,Y0=0,Z0=0,$0=0,_0=0,a1=0,b1=0,c1=0,d1=0,e1=0,f1=0,g1=0,h1=0,i1=0,j1=0,k1=0,l1=0,m1=0,n1=0,o1=0,p1=0,q1=0,r1=0,s1=0,t1=0,u1=0,v1=0,w1=0,x1=0,y1=0,z1=0,A1=0,B1=0,C1=0,D1=0,E1=0,F1=0,G1=0,H1=0,I1=0,J1=0,K1=0,L1=0,M1=0,N1=0,O1=0,P1=0,Q1=0,R1=0,S1=0,T1=0,U1=0,V1=0,W1=0,X1=0,Y1=0,Z1=0,$1=0,_1=0,a2=0,b2=0,c2=0,d2=0,e2=0,f2=0,g2=0,h2=0,i2=0,j2=0,k2=0,l2=0,m2=0,n2=0,o2=0,p2=0,q2=0,r2=0,s2=0,t2=0,u2=0,v2=0,w2=0,x2=0,y2=0,z2=0,A2=0,B2=0,C2=0,D2=0,E2=0,F2=0,G2=0,H2=0,I2=0,J2=0,K2=0,L2=0,M2=0,N2=0,O2=0,P2=0,Q2=0,R2=0,S2=0,T2=0,U2=0,V2=0,W2=0,X2=0,Y2=0,Z2=0,$2=0,_2=0,a3=0,b3=0,c3=0,d3=0,e3=0,f3=0,g3=0,h3=0,i3=0,j3=0,k3=0,l3=0,m3=0,n3=0,o3=0,p3=0,q3=0,r3=0,s3=0,t3=0,u3=0,v3=0,w3=0,x3=0,y3=0,z3=0,A3=0,B3=0,C3=0,D3=0,E3=0,F3=0,G3=0,H3=0,I3=0,J3=0,K3=0,L3=0,M3=0,N3=0,O3=0,P3=0,Q3=0,R3=0,S3=0,T3=0,U3=0,V3=0,W3=0,X3=0,Y3=0,Z3=0,$3=0,_3=0,a4=0,b4=0,c4=0,d4=0,e4=0,f4=0,g4=0,h4=0,i4=0,j4=0,k4=0,l4=0,m4=0,n4=0,o4=0,p4=0,q4=0,r4=0,s4=0,t4=0,u4=0,v4=0,w4=0,x4=0,y4=0,z4=0,A4=0,B4=0,C4=0,D4=0,E4=0,F4=0,G4=0,H4=0,I4=0,J4=0,K4=0,L4=0,M4=0,N4=0,O4=0,P4=0,Q4=0,R4=0,S4=0,T4=0,U4=0,V4=0,W4=0,X4=0,Y4=0,Z4=0,$4=0,_4=0,a5=0,b5=0,c5=0,d5=0,e5=0,f5=0,g5=0,h5=0,i5=0,j5=0,k5=0,l5=0,m5=0,n5=0,o5=0,p5=0,q5=0,r5=0,s5=0,t5=0,u5=0,v5=0,w5=0,x5=0,y5=0,z5=0,A5=0,B5=0,C5=0,D5=0,E5=0,F5=0,G5=0,H5=0,I5=0,J5=0,K5=0,L5=0,M5=0,N5=0,O5=0,P5=0,Q5=0,R5=0,S5=0,T5=0,U5=0,V5=0,W5=0,X5=0,Y5=0,Z5=0,$5=0,_5=0,a6=0,b6=0,c6=0,d6=0,e6=0,f6=0,g6=0,h6=0,i6=0,j6=0,k6=0,l6=0,m6=0,n6=0,o6=0,p6=0,q6=0,r6=0,s6=0,t6=0,u6=0,v6=0,w6=0,x6=0,y6=0,z6=0,A6=0,B6=0,C6=0,D6=0,E6=0,F6=0,G6=0,H6=0,I6=0,J6=0,K6=0,L6=0,M6=0,N6=0,O6=0,P6=0,Q6=0,R6=0,S6=0,T6=0,U6=0,V6=0,W6=0,X6=0,Y6=0,Z6=0,$6=0,_6=0,a7=0,b7=0,c7=0,d7=0,e7=0,f7=0,g7=0,h7=0,i7=0,j7=0,k7=0,l7=0,m7=0,n7=0,o7=0,p7=0,q7=0,r7=0,s7=0,t7=0,u7=0,v7=0,w7=0,x7=0,y7=0,z7=0,A7=0,B7=0,C7=0,D7=0,E7=0,F7=0,G7=0,H7=0,I7=0,J7=0,K7=0,L7=0,M7=0,N7=0,O7=0,P7=0,Q7=0,R7=0,S7=0,T7=0,U7=0,V7=0,W7=0,X7=0,Y7=0,Z7=0,$7=0,_7=0,a8=0,b8=0,c8=0,d8=0,e8=0,f8=0,g8=0,h8=0,i8=0,j8=0,k8=0,l8=0,m8=0,n8=0,o8=0,p8=0,q8=0,r8=0,s8=0,t8=0,u8=0,v8=0,w8=0,x8=0,y8=0,z8=0,A8=0,B8=0,C8=0,D8=0,E8=0,F8=0,G8=0,H8=0,I8=0,J8=0,K8=0,L8=0,M8=0,N8=0,O8=0,P8=0,Q8=0,R8=0,S8=0,T8=0,U8=0,V8=0,W8=0,X8=0,Y8=0,Z8=0,$8=0,_8=0,a9=0,b9=0,c9=0,d9=0,e9=0,f9=0,g9=0,h9=0,i9=0,j9=0,k9=0,l9=0,m9=0,n9=0,o9=0,p9=0,q9=0,r9=0,s9=0,t9=0,u9=0,v9=0,w9=0,x9=0,y9=0,z9=0,A9=0,B9=0,C9=0,D9=0,E9=0,F9=0,G9=0,H9=0,I9=0,J9=0,K9=0,L9=0,M9=0,N9=0,O9=0,P9=0,Q9=0,R9=0,S9=0,T9=0,U9=0,V9=0,W9=0,X9=0,Y9=0,Z9=0,$9=0,_9=0,aaa=0,baa=0,caa=0,daa=0,eaa=0,faa=0,gaa=0,haa=0,iaa=0,jaa=0,kaa=0,laa=0,maa=0,naa=0,oaa=0,paa=0,qaa=0,raa=0,saa=0,taa=0,uaa=0,vaa=0,waa=0,xaa=0,yaa=0,zaa=0,Aaa=0,Baa=0,Caa=0,Daa=0,Eaa=0,Faa=0,Gaa=0,Haa=0,Iaa=0,Jaa=0,Kaa=0,Laa=0,Maa=0,Naa=0,Oaa=0,Paa=0,Qaa=0,Raa=0,Saa=0,Taa=0,Uaa=0,Vaa=0,Waa=0,Xaa=0,Yaa=0,Zaa=0,$aa=0,_aa=0,aba=0,bba=0,cba=0,dba=0,eba=0,fba=0,gba=0,hba=0,iba=0,jba=0,kba=0,lba=0,mba=0,nba=0,oba=0,pba=0,qba=0,rba=0,sba=0,tba=0,uba=0,vba=0,wba=0,xba=0,yba=0,zba=0,Aba=0,Bba=0,Cba=0,Dba=0,Eba=0,Fba=0,Gba=0,Hba=0,Iba=0,Jba=0,Kba=0,Lba=0,Mba=0,Nba=0,Oba=0,Pba=0,Qba=0,Rba=0,Sba=0,Tba=0,Uba=0,Vba=0,Wba=0,Xba=0,Yba=0,Zba=0,$ba=0,_ba=0,aca=0,bca=0,cca=0,dca=0,eca=0,fca=0,gca=0,hca=0,ica=0,jca=0,kca=0,lca=0,mca=0,nca=0,oca=0,pca=0,qca=0,rca=0,sca=0,tca=0,uca=0,vca=0,wca=0,xca=0,yca=0,zca=0,Aca=0,Bca=0,Cca=0,Dca=0,Eca=0,Fca=0,Gca=0,Hca=0,Ica=0,Jca=0,Kca=0,Lca=0,Mca=0,Nca=0,Oca=0,Pca=0,Qca=0,Rca=0,Sca=0,Tca=0,Uca=0,Vca=0,Wca=0,Xca=0,Yca=0,Zca=0,$ca=0,_ca=0,ada=0,bda=0,cda=0,dda=0,eda=0,fda=0,gda=0,hda=0,ida=0,jda=0,kda=0,lda=0,mda=0,nda=0,oda=0,pda=0,qda=0,rda=0,sda=0,tda=0,uda=0,vda=0,wda=0,xda=0,yda=0,zda=0;
+zda=l,l=l+1472|0,(0|l)>=(0|m)&&X(),Yca=zda,bda=zda+908|0,pda=zda+920|0,wda=zda+88|0,uda=zda+56|0,eda=zda+1336|0,Oca=zda+1320|0,g=a,cda=eda,dda=128,ada=0,tda=0,nda=pda,vda=wda,rda=200,sda=0,_ca=0,gda=0,$ca=-2,h=nda,qda=h,Iv=vda,xda=Iv;a:for(;;){if(z2=sda,C4=65535&z2,F6=qda,e[F6>>1]=C4,I8=nda,Laa=rda,i=I8+(Laa<<1)|0,ob=i+-2|0,td=qda,xf=ob>>>0<=td>>>0){if(Ah=qda,Dj=nda,vn=Ah,zp=Dj,Cr=vn-zp|0,Ft=(0|Cr)/2&-1,Lv=Ft+1|0,lda=Lv,Px=rda,Sz=1e4<=Px>>>0){yda=535;break}if(VB=rda,YD=VB<<1,rda=YD,_F=rda,cI=1e4<_F>>>0,b=cI?1e4:YD,rda=b,fK=nda,oda=fK,iM=g,lO=0|f[iM>>2],pQ=rda,sS=6*pQ|0,vU=sS+3|0,yW=0|Jc(lO,vU),jda=yW,BY=jda,E$=0!=(0|BY),!E$){yda=535;break}if(G_=jda,R_=nda,a0=lda,l0=a0<<1,0|sw(0|G_,0|R_,0|l0),x0=jda,nda=x0,I0=rda,T0=I0<<1,c1=T0+3|0,hda=c1,n1=hda,y1=(n1>>>0)/4&-1,J1=jda,U1=J1+(y1<<2)|0,jda=U1,d2=jda,o2=vda,A2=lda,L2=A2<<2,0|sw(0|d2,0|o2,0|L2),W2=jda,vda=W2,f3=rda,q3=f3<<2,B3=q3+3|0,ida=B3,M3=ida,X3=(M3>>>0)/4&-1,g4=jda,r4=g4+(X3<<2)|0,jda=r4,D4=oda,O4=(0|D4)!=(0|pda),O4&&(Z4=g,i5=0|f[Z4>>2],t5=oda,Dc(i5,t5)),E5=nda,P5=lda,$5=E5+(P5<<1)|0,j6=$5+-2|0,qda=j6,u6=vda,G6=lda,R6=u6+(G6<<2)|0,a7=R6+-4|0,xda=a7,l7=nda,w7=rda,H7=l7+(w7<<1)|0,S7=H7+-2|0,b8=qda,m8=S7>>>0<=b8>>>0){yda=534;break}}if(x8=sda,J8=3==(0|x8)){yda=533;break}U8=sda,d9=3044+(U8<<1)|0,o9=0|e[d9>>1],z9=o9<<16>>16,fda=z9,K9=fda,V9=(0|K9)==-771;do if(V9)yda=26;else if(eaa=$ca,paa=(0|eaa)==-2,paa&&(Aaa=g,Maa=0|Ok(bda,Aaa),$ca=Maa),Xaa=$ca,gba=(0|Xaa)<=0,gba?(tda=0,$ca=0):(rba=$ca,Cba=rba>>>0<=372,Cba?(Nba=$ca,Yba=58359+Nba|0,hca=0|d[Yba>>0],sca=255&hca,Dca=sca):Dca=2,tda=Dca),j=tda,w=fda,H=w+j|0,fda=H,S=fda,ca=(0|S)<0,na=fda,ya=10639<(0|na),Sca=ca|ya)yda=26;else if(Ja=fda,Ua=4980+(Ja<<1)|0,db=0|e[Ua>>1],pb=db<<16>>16,Ab=tda,Lb=(0|pb)!=(0|Ab))yda=26;else{if(Wb=fda,fc=26260+(Wb<<1)|0,qc=0|e[fc>>1],Bc=qc<<16>>16,fda=Bc,Oc=fda,Zc=(0|Oc)<=0){if(id=fda,ud=0==(0|id),Fd=fda,Qd=(0|Fd)==-556,Uca=ud|Qd){yda=510;break}_d=fda,ke=0-_d|0,fda=ke,yda=27;break}ve=_ca,Ge=0!=(0|ve),Ge&&(Re=_ca,af=Re+-1|0,_ca=af),$ca=-2,mf=fda,sda=mf,yf=xda,Jf=yf+4|0,xda=Jf,f[Jf>>2]=0|f[bda>>2]}while(0);26==(0|yda)&&(yda=0,Uf=sda,dg=47540+(Uf<<1)|0,og=0|e[dg>>1],zg=65535&og,fda=zg,Kg=fda,Vg=0==(0|Kg),yda=Vg?510:27);do if(27==(0|yda)){yda=0,eh=fda,ph=58732+eh|0,Bh=0|d[ph>>0],Mh=255&Bh,ada=Mh,Xh=ada,gi=1-Xh|0,ri=xda,Ci=ri+(gi<<2)|0,f[uda>>2]=0|f[Ci>>2],Ni=fda;b:do switch(0|Ni){case 2:Yi=g,hj=Yi+40|0,f[hj>>2]=0,sj=g,Ej=sj+76|0,Pj=0|f[Ej>>2],$j=0!=(0|Pj),$j||(jk=g,uk=0|Jk(jk,0,0),Fk=g,Wk=Fk+76|0,f[Wk>>2]=uk);break;case 3:il=g,yl=xda,am=0|f[yl>>2],wn=0|Hl(il,am),Hn=g,Sn=Hn+1144|0,f[Sn>>2]=wn,bo=xda,no=0|f[bo>>2],yo=0!=(0|no),yo&&(Jo=xda,Uo=0|f[Jo>>2],dp=Uo+10|0,op=0|e[dp>>1],Ap=g,Lp=Ap+1144|0,Wp=0|f[Lp>>2],fq=Wp+10|0,e[fq>>1]=op,qq=xda,Bq=0|f[qq>>2],Mq=Bq+8|0,Xq=0|e[Mq>>1],gr=g,rr=gr+1144|0,Dr=0|f[rr>>2],Or=Dr+8|0,e[Or>>1]=Xq);break;case 4:Zr=xda,is=Zr+-4|0,ts=0|f[is>>2],f[uda>>2]=ts;break;case 5:Es=g,Ps=0|Jl(Es,0),f[uda>>2]=Ps;break;case 6:$s=g,jt=xda,ut=0|f[jt>>2],Gt=0|Jl($s,ut),f[uda>>2]=Gt,Rt=xda,au=0|f[Rt>>2],lu=0!=(0|au),lu&&(wu=xda,Hu=0|f[wu>>2],Su=Hu+10|0,bv=0|e[Su>>1],mv=0|f[uda>>2],xv=mv+10|0,e[xv>>1]=bv,Mv=xda,Xv=0|f[Mv>>2],gw=Xv+8|0,rw=0|e[gw>>1],Dw=0|f[uda>>2],Ow=Dw+8|0,e[Ow>>1]=rw);break;case 7:Zw=g,ix=xda,tx=ix+-8|0,Ex=0|f[tx>>2],Qx=g,_x=xda,ky=0|f[_x>>2],vy=0|Lk(Qx,ky),Gy=0|Mk(Zw,Ex,vy),f[uda>>2]=Gy;break;case 8:Ry=g,az=0|Jl(Ry,0),f[uda>>2]=az;break;case 10:lz=g,wz=0|Ll(lz),f[uda>>2]=wz;break;case 11:Hz=g,Yk(Hz,59288),Tz=g,cA=xda,nA=cA+-12|0,yA=0|f[nA>>2],Ml(Tz,yA),f[uda>>2]=0;break;case 12:JA=xda,UA=JA+-8|0,dB=0|f[UA>>2],oB=0!=(0|dB);do{if(!oB){if(xH=xda,IH=xH+-4|0,TH=0|f[IH>>2],dI=0!=(0|TH)){oI=g,nl(oI,59308),zI=g,KI=xda,VI=KI+-12|0,eJ=0|f[VI>>2],pJ=g,AJ=xda,LJ=AJ+-4|0,WJ=0|f[LJ>>2],gK=0|Lk(pJ,WJ),rK=0|Mk(zI,eJ,gK),f[uda>>2]=rK;break}CK=xda,NK=CK+-12|0,YK=0|f[NK>>2],f[uda>>2]=YK;break}zB=g,KB=xda,WB=KB+-12|0,fC=0|f[WB>>2],qC=xda,BC=qC+-8|0,MC=0|f[BC>>2],XC=xda,gD=XC+-4|0,rD=0|f[gD>>2],CD=0|Nl(zB,fC,MC,rD),f[uda>>2]=CD,ND=xda,ZD=ND+-12|0,iE=0|f[ZD>>2],tE=0!=(0|iE),tE&&(EE=xda,PE=EE+-12|0,$E=0|f[PE>>2],jF=$E+10|0,uF=0|e[jF>>1],FF=0|f[uda>>2],QF=FF+10|0,e[QF>>1]=uF,aG=xda,lG=aG+-12|0,wG=0|f[lG>>2],HG=wG+8|0,SG=0|e[HG>>1],bH=0|f[uda>>2],mH=bH+8|0,e[mH>>1]=SG)}while(0);if(hL=xda,sL=0|f[hL>>2],DL=0!=(0|sL)){if(OL=0|f[uda>>2],ZL=0!=(0|OL),jM=g,ZL){uM=0|f[uda>>2],FM=xda,QM=0|f[FM>>2],_M=0|Pl(jM,uM,QM),f[uda>>2]=_M;break b}kN=xda,vN=0|f[kN>>2],GN=g,RN=g,aO=0|Ql(RN),mO=0|Lk(GN,aO),xO=0|Mk(jM,vN,mO),f[uda>>2]=xO;break b}break;case 13:IO=xda,TO=IO+-4|0,cP=0|f[TO>>2],f[uda>>2]=cP;break;case 14:nP=g,yP=0|Jl(nP,0),f[uda>>2]=yP;break;case 15:JP=g,UP=xda,dQ=0|f[UP>>2],qQ=0|Jl(JP,dQ),f[uda>>2]=qQ,BQ=xda,MQ=0|f[BQ>>2],XQ=0!=(0|MQ),XQ&&(gR=xda,rR=0|f[gR>>2],CR=rR+10|0,NR=0|e[CR>>1],YR=0|f[uda>>2],hS=YR+10|0,e[hS>>1]=NR,tS=xda,ES=0|f[tS>>2],PS=ES+8|0,$S=0|e[PS>>1],jT=0|f[uda>>2],uT=jT+8|0,e[uT>>1]=$S);break;case 16:FT=g,QT=xda,_T=QT+-8|0,kU=0|f[_T>>2],wU=g,HU=xda,SU=0|f[HU>>2],bV=0|Lk(wU,SU),mV=0|Mk(FT,kU,bV),f[uda>>2]=mV;break;case 17:xV=g,IV=xda,TV=0|f[IV>>2],cW=0|Jl(xV,TV),f[uda>>2]=cW;break;case 18:nW=g,zW=nW+40|0,f[zW>>2]=7;break;case 19:KW=g,VW=xda,eX=VW+-8|0,pX=0|f[eX>>2],AX=xda,LX=0|f[AX>>2],WX=0|Rl(KW,pX,LX),f[uda>>2]=WX;break;case 20:fY=xda,qY=0|f[fY>>2],f[uda>>2]=qY;break;case 21:CY=g,NY=xda,YY=0|f[NY>>2],hZ=0|Sl(YY),sZ=xda,DZ=sZ+-8|0,OZ=0|f[DZ>>2],ZZ=0|Tl(CY,hZ,OZ,0),f[uda>>2]=ZZ;break;case 22:i$=g,t$=xda,F$=0|f[t$>>2],Q$=0|Sl(F$),_$=xda,k_=_$+-8|0,v_=0|f[k_>>2],B_=0|Ul(i$,Q$,v_,0),f[uda>>2]=B_;break;case 23:C_=g,D_=xda,E_=0|f[D_>>2],F_=0|Sl(E_),H_=xda,I_=H_+-8|0,J_=0|f[I_>>2],K_=0|Vl(C_,F_,J_),f[uda>>2]=K_;break;case 24:L_=g,M_=xda,N_=0|f[M_>>2],O_=0|Sl(N_),P_=xda,Q_=P_+-8|0,S_=0|f[Q_>>2],T_=0|Wl(L_,O_,S_),f[uda>>2]=T_;break;case 25:U_=g,V_=xda,W_=V_+-8|0,X_=0|f[W_>>2],Y_=g,Z_=g,$_=xda,__=0|f[$_>>2],b0=0|xl(Z_,0,0,__),c0=0|Lk(Y_,b0),d0=0|Nl(U_,X_,c0,0),f[uda>>2]=d0;break;case 26:e0=g,Yk(e0,59339),f0=g,g0=xda,h0=g0+-4|0,i0=0|f[h0>>2],j0=0|Xl(f0,i0),f[uda>>2]=j0;break;case 28:k0=g,m0=xda,n0=m0+-8|0,o0=0|f[n0>>2],p0=xda,q0=0|f[p0>>2],r0=0|Yl(k0,o0,q0),f[uda>>2]=r0;break;case 29:s0=g,t0=xda,u0=t0+-8|0,v0=0|f[u0>>2],y0=xda,z0=y0+-4|0,A0=0|f[z0>>2],B0=xda,C0=0|f[B0>>2],D0=0|Zl(s0,v0,A0,C0),f[uda>>2]=D0;break;case 30:E0=g,F0=g,G0=xda,H0=G0+-20|0,J0=0|f[H0>>2],K0=g,L0=0|kl(K0,68841,2),M0=xda,N0=M0+-12|0,O0=0|f[N0>>2],P0=0|$l(F0,J0,L0,O0),Q0=xda,R0=Q0+-4|0,S0=0|f[R0>>2],U0=xda,V0=0|f[U0>>2],W0=0|Zl(E0,P0,S0,V0),f[uda>>2]=W0;break;case 31:X0=g,Y0=g,Z0=xda,$0=Z0+-16|0,_0=0|f[$0>>2],a1=xda,b1=a1+-8|0,d1=0|f[b1>>2],e1=0|$l(Y0,_0,d1,0),f1=xda,g1=f1+-4|0,h1=0|f[g1>>2],i1=xda,j1=0|f[i1>>2],k1=0|Zl(X0,e1,h1,j1),f[uda>>2]=k1;break;case 32:l1=g,m1=g,o1=xda,p1=o1+-16|0,q1=0|f[p1>>2],r1=xda,s1=r1+-8|0,t1=0|f[s1>>2],u1=0|$l(m1,q1,t1,0),v1=xda,w1=v1+-4|0,x1=0|f[w1>>2],z1=xda,A1=0|f[z1>>2],B1=0|Zl(l1,u1,x1,A1),f[uda>>2]=B1;break;case 33:C1=g,Yk(C1,59356),f[uda>>2]=0;break;case 34:D1=g,E1=g,F1=xda,G1=F1+-16|0,H1=0|f[G1>>2],I1=xda,K1=I1+-8|0,L1=0|f[K1>>2],M1=0|$l(E1,H1,L1,0),N1=xda,O1=N1+-4|0,P1=0|f[O1>>2],Q1=xda,R1=0|f[Q1>>2],S1=0|Zl(D1,M1,P1,R1),f[uda>>2]=S1;break;case 35:T1=g,V1=xda,W1=V1+-8|0,X1=0|f[W1>>2],_l(T1,X1),Y1=g,Z1=0|Jl(Y1,0),f[uda>>2]=Z1;break;case 36:$1=g,_1=xda,a2=_1+-8|0,b2=0|f[a2>>2],c2=g,e2=xda,f2=0|f[e2>>2],g2=0|bm(c2,f2),h2=0|cm($1,b2,g2),f[uda>>2]=h2;break;case 37:i2=g,j2=xda,k2=j2+-8|0,l2=0|f[k2>>2],m2=xda,n2=0|f[m2>>2],p2=0|Yl(i2,l2,n2),f[uda>>2]=p2;break;case 38:q2=g,r2=xda,s2=r2+-8|0,t2=0|f[s2>>2],u2=g,v2=xda,w2=0|f[v2>>2],x2=0|bm(u2,w2),y2=0|Yl(q2,t2,x2),f[uda>>2]=y2;break;case 40:B2=g,C2=xda,D2=C2+-8|0,E2=0|f[D2>>2],F2=xda,G2=0|f[F2>>2],H2=0|cm(B2,E2,G2),f[uda>>2]=H2;break;case 41:I2=g,J2=xda,K2=J2+-8|0,M2=0|f[K2>>2],N2=xda,O2=0|f[N2>>2],P2=0|cm(I2,M2,O2),f[uda>>2]=P2;break;case 43:Q2=g,R2=xda,S2=R2+-8|0,T2=0|f[S2>>2],U2=xda,V2=0|f[U2>>2],X2=0|dm(Q2,T2,V2),f[uda>>2]=X2;break;case 44:Y2=g,Z2=xda,$2=Z2+-8|0,_2=0|f[$2>>2],a3=xda,b3=0|f[a3>>2],c3=0|em(Y2,_2,b3),f[uda>>2]=c3;break;case 45:d3=g,e3=xda,g3=0|f[e3>>2],h3=0|Sl(g3),i3=0|fm(d3,h3,65320),f[uda>>2]=i3;break;case 46:j3=g,k3=xda,l3=0|f[k3>>2],m3=0|Sl(l3),n3=0|fm(j3,m3,65320),f[uda>>2]=n3;break;case 48:if(o3=xda,p3=0|f[o3>>2],r3=0!=(0|p3)){u3=xda,v3=0|f[u3>>2],f[uda>>2]=v3;break b}s3=g,t3=0|Ql(s3),f[uda>>2]=t3;break b;case 53:w3=g,gm(w3);break;case 54:x3=g,y3=xda,z3=y3+-8|0,A3=0|f[z3>>2],C3=xda,D3=C3+-4|0,E3=0|f[D3>>2],F3=0|hm(x3,A3,E3),f[uda>>2]=F3,G3=g,im(G3);break;case 55:H3=g,I3=xda,J3=I3+-4|0,K3=0|f[J3>>2],L3=xda,N3=0|f[L3>>2],O3=0|jm(H3,K3,N3),f[uda>>2]=O3;break;case 56:P3=g,Q3=xda,R3=Q3+-4|0,S3=0|f[R3>>2],T3=xda,U3=0|f[T3>>2],lm(P3,S3,U3),V3=g,W3=xda,Y3=W3+-8|0,Z3=0|f[Y3>>2],$3=xda,_3=$3+-4|0,a4=0|f[_3>>2],b4=0|jm(V3,Z3,a4),f[uda>>2]=b4;break;case 57:c4=g,d4=xda,e4=d4+-12|0,f4=0|f[e4>>2],h4=xda,i4=h4+-4|0,j4=0|f[i4>>2],k4=xda,l4=0|f[k4>>2],m4=0|$l(c4,f4,j4,l4),f[uda>>2]=m4;break;case 58:n4=g,o4=xda,p4=o4+-4|0,q4=0|f[p4>>2],s4=xda,t4=0|f[s4>>2],lm(n4,q4,t4),u4=g,v4=xda,w4=v4+-16|0,x4=0|f[w4>>2],y4=xda,z4=y4+-8|0,A4=0|f[z4>>2],B4=xda,E4=B4+-4|0,F4=0|f[E4>>2],G4=0|$l(u4,x4,A4,F4),f[uda>>2]=G4;break;case 59:H4=g,I4=xda,J4=I4+-12|0,K4=0|f[J4>>2],L4=xda,M4=L4+-4|0,N4=0|f[M4>>2],P4=xda,Q4=0|f[P4>>2],R4=0|$l(H4,K4,N4,Q4),f[uda>>2]=R4;break;case 60:S4=g,T4=xda,U4=T4+-4|0,V4=0|f[U4>>2],W4=xda,X4=0|f[W4>>2],lm(S4,V4,X4),Y4=g,$4=xda,_4=$4+-16|0,a5=0|f[_4>>2],b5=xda,c5=b5+-8|0,d5=0|f[c5>>2],e5=xda,f5=e5+-4|0,g5=0|f[f5>>2],h5=0|$l(Y4,a5,d5,g5),f[uda>>2]=h5;break;case 61:j5=g,k5=xda,l5=0|f[k5>>2],m5=0|mm(j5,l5),f[uda>>2]=m5;break;case 62:n5=g,o5=xda,p5=0|f[o5>>2],q5=0|nm(n5,p5),f[uda>>2]=q5;break;case 63:r5=g,s5=g,u5=xda,v5=0|f[u5>>2],w5=0|om(s5,v5),x5=0|pm(r5,w5),f[uda>>2]=x5;break;case 64:y5=g,z5=g,A5=xda,B5=0|f[A5>>2],C5=0|om(z5,B5),D5=0|qm(y5,C5),f[uda>>2]=D5;break;case 65:F5=g,G5=g,H5=xda,I5=0|f[H5>>2],J5=0|om(G5,I5),K5=0|rm(F5,J5),f[uda>>2]=K5;break;case 66:L5=xda,M5=0|f[L5>>2],f[uda>>2]=M5;break;case 67:N5=xda,O5=N5+-4|0,Q5=0|f[O5>>2],f[uda>>2]=Q5;break;case 69:R5=xda,S5=R5+-4|0,T5=0|f[S5>>2],f[uda>>2]=T5;break;case 70:U5=g,V5=xda,W5=0|f[V5>>2],X5=0|Lk(U5,W5),f[uda>>2]=X5;break;case 71:Y5=g,Z5=g,_5=xda,a6=_5+-4|0,b6=0|f[a6>>2],c6=g,d6=xda,e6=0|f[d6>>2],f6=0|Lk(c6,e6),g6=0|Mk(Z5,b6,f6),h6=0|Lk(Y5,g6),f[uda>>2]=h6;break;case 72:i6=g,k6=xda,l6=k6+-8|0,m6=0|f[l6>>2],n6=xda,o6=0|f[n6>>2],p6=0|Kl(i6,m6,o6),f[uda>>2]=p6;break;case 73:q6=g,r6=xda,s6=r6+-16|0,t6=0|f[s6>>2],v6=xda,w6=v6+-8|0,x6=0|f[w6>>2],y6=xda,z6=0|f[y6>>2],A6=0|xl(q6,t6,x6,z6),f[uda>>2]=A6;break;case 74:B6=g,C6=xda,D6=C6+-4|0,E6=0|f[D6>>2],H6=g,I6=0|Ql(H6),J6=0|Kl(B6,E6,I6),f[uda>>2]=J6;break;case 75:K6=g,L6=xda,M6=L6+-12|0,N6=0|f[M6>>2],O6=g,P6=0|Ql(O6),Q6=xda,S6=0|f[Q6>>2],T6=0|xl(K6,N6,P6,S6),f[uda>>2]=T6;break;case 76:U6=g,V6=xda,W6=0|f[V6>>2],X6=0|Kl(U6,0,W6),f[uda>>2]=X6;break;case 77:Y6=g,Z6=xda,$6=Z6+-8|0,_6=0|f[$6>>2],b7=xda,c7=0|f[b7>>2],d7=0|xl(Y6,0,_6,c7),f[uda>>2]=d7;break;case 78:e7=g,f7=g,g7=0|Ql(f7),h7=0|Kl(e7,0,g7),f[uda>>2]=h7;break;case 79:i7=g,j7=g,k7=0|Ql(j7),m7=xda,n7=0|f[m7>>2],o7=0|xl(i7,0,k7,n7),f[uda>>2]=o7;break;case 81:p7=g,q7=xda,r7=q7+-4|0,s7=0|f[r7>>2],t7=0|Yl(p7,s7,0),f[uda>>2]=t7;break;case 82:u7=g,v7=xda,x7=v7+-4|0,y7=0|f[x7>>2],z7=0|Lk(u7,y7),f[uda>>2]=z7;break;case 83:A7=g,B7=xda,C7=B7+-8|0,D7=0|f[C7>>2],E7=g,F7=xda,G7=F7+-4|0,I7=0|f[G7>>2],J7=0|Lk(E7,I7),K7=0|Mk(A7,D7,J7),f[uda>>2]=K7;break;case 84:L7=g,M7=xda,N7=0|f[M7>>2],O7=0|Lk(L7,N7),f[uda>>2]=O7;break;case 85:P7=g,Q7=xda,R7=Q7+-4|0,T7=0|f[R7>>2],U7=g,V7=xda,W7=0|f[V7>>2],X7=0|Lk(U7,W7),Y7=0|Mk(P7,T7,X7),f[uda>>2]=Y7;break;case 86:Z7=g,$7=xda,_7=0|f[$7>>2],sm(Z7,_7);break;case 87:a8=g,c8=xda,d8=c8+-12|0,e8=0|f[d8>>2],f8=g,g8=0|kl(f8,68841,2),h8=xda,i8=h8+-4|0,j8=0|f[i8>>2],k8=0|$l(a8,e8,g8,j8),f[uda>>2]=k8;break;case 88:l8=g,n8=xda,o8=n8+-8|0,p8=0|f[o8>>2],q8=xda,r8=0|f[q8>>2],s8=0|$l(l8,p8,r8,0),f[uda>>2]=s8;break;case 89:t8=g,u8=xda,v8=u8+-8|0,w8=0|f[v8>>2],y8=xda,z8=0|f[y8>>2],A8=0|$l(t8,w8,z8,0),f[uda>>2]=A8;break;case 90:B8=g,C8=xda,D8=C8+-8|0,E8=0|f[D8>>2],F8=xda,G8=0|f[F8>>2],H8=0|$l(B8,E8,G8,0),f[uda>>2]=H8;break;case 91:K8=g,L8=K8+64|0,M8=0|f[L8>>2],N8=0!=(0|M8),N8?yda=123:(O8=g,P8=O8+68|0,Q8=0|f[P8>>2],R8=0!=(0|Q8),R8&&(yda=123)),123==(0|yda)&&(yda=0,S8=g,Yk(S8,59547)),T8=g,V8=xda,W8=V8+-8|0,X8=0|f[W8>>2],Y8=xda,Z8=0|f[Y8>>2],$8=0|vm(T8,X8,Z8),f[uda>>2]=$8;break;case 92:_8=g,a9=_8+64|0,b9=0|f[a9>>2],c9=0!=(0|b9),c9?yda=127:(e9=g,f9=e9+68|0,g9=0|f[f9>>2],h9=0!=(0|g9),h9&&(yda=127)),127==(0|yda)&&(yda=0,i9=g,Yk(i9,59547)),j9=g,k9=xda,l9=0|f[k9>>2],m9=0|wm(j9,l9),f[uda>>2]=m9;break;case 93:n9=g,p9=xda,q9=0|f[p9>>2],_l(n9,q9),f[uda>>2]=0;break;case 94:r9=g,s9=xda,t9=0|f[s9>>2],sm(r9,t9);break;case 95:u9=g,v9=xda,w9=v9+-12|0,x9=0|f[w9>>2],y9=g,A9=0|kl(y9,68841,2),B9=xda,C9=B9+-4|0,D9=0|f[C9>>2],E9=0|$l(u9,x9,A9,D9),f[uda>>2]=E9;break;case 96:F9=g,G9=xda,H9=G9+-8|0,I9=0|f[H9>>2],J9=xda,L9=0|f[J9>>2],M9=0|$l(F9,I9,L9,0),f[uda>>2]=M9;break;case 97:N9=g,O9=xda,P9=O9+-8|0,Q9=0|f[P9>>2],R9=xda,S9=0|f[R9>>2],T9=0|$l(N9,Q9,S9,0),f[uda>>2]=T9;break;case 98:U9=g,W9=xda,X9=W9+-8|0,Y9=0|f[X9>>2],Z9=xda,$9=0|f[Z9>>2],_9=0|$l(U9,Y9,$9,0),f[uda>>2]=_9;break;case 99:aaa=g,baa=aaa+64|0,caa=0|f[baa>>2],daa=0!=(0|caa),daa?yda=137:(faa=g,gaa=faa+68|0,haa=0|f[gaa>>2],iaa=0!=(0|haa),iaa&&(yda=137)),137==(0|yda)&&(yda=0,jaa=g,Yk(jaa,59547)),kaa=g,laa=xda,maa=laa+-8|0,naa=0|f[maa>>2],oaa=xda,qaa=0|f[oaa>>2],raa=0|vm(kaa,naa,qaa),f[uda>>2]=raa;break;case 100:saa=g,taa=saa+64|0,uaa=0|f[taa>>2],vaa=0!=(0|uaa),vaa?yda=141:(waa=g,xaa=waa+68|0,yaa=0|f[xaa>>2],zaa=0!=(0|yaa),zaa&&(yda=141)),141==(0|yda)&&(yda=0,Baa=g,Yk(Baa,59547)),Caa=g,Daa=xda,Eaa=0|f[Daa>>2],Faa=0|wm(Caa,Eaa),f[uda>>2]=Faa;break;case 101:Gaa=g,Haa=xda,Iaa=0|f[Haa>>2],_l(Gaa,Iaa),f[uda>>2]=0;break;case 102:Jaa=g,Yk(Jaa,59575);break;case 104:Kaa=g,Naa=xda,Oaa=0|f[Naa>>2],Paa=Oaa,Qaa=0|Jk(Kaa,1,Paa),f[uda>>2]=Qaa;break;case 105:Raa=g,Saa=xda,Taa=0|f[Saa>>2],Uaa=Taa,Vaa=0|Jk(Raa,0,Uaa),f[uda>>2]=Vaa;break;case 106:Waa=g,Yaa=xda,Zaa=Yaa+-8|0,$aa=0|f[Zaa>>2],_aa=xda,aba=0|f[_aa>>2],bba=aba,cba=0|Jk(Waa,$aa,bba),f[uda>>2]=cba;break;case 110:dba=g,eba=dba+40|0,f[eba>>2]=3,fba=xda,hba=0|f[fba>>2],f[uda>>2]=hba;break;case 111:iba=g,jba=iba+40|0,f[jba>>2]=3,kba=xda,lba=0|f[kba>>2],f[uda>>2]=lba;break;case 114:mba=g,nba=xda,oba=0|f[nba>>2],pba=0|xm(mba,oba),f[uda>>2]=pba;break;case 115:qba=g,sba=qba+40|0,f[sba>>2]=7;break;case 116:tba=g,uba=xda,vba=uba+-12|0,wba=0|f[vba>>2],xba=g,yba=xda,zba=0|f[yba>>2],Aba=zba,Bba=0|Lk(xba,Aba),Dba=0|Mk(tba,wba,Bba),f[uda>>2]=Dba;break;case 117:Eba=g,Fba=0|ll(Eba,124),f[uda>>2]=Fba;break;case 118:Gba=g,Hba=0|ll(Gba,94),f[uda>>2]=Hba;break;case 119:Iba=g,Jba=0|ll(Iba,38),f[uda>>2]=Jba;break;case 120:Kba=g,Lba=0|kl(Kba,68851,3),f[uda>>2]=Lba;break;case 121:Mba=g,Oba=0|kl(Mba,68902,2),f[uda>>2]=Oba;break;case 122:Pba=g,Qba=0|kl(Pba,69450,3),f[uda>>2]=Qba;break;case 123:Rba=g,Sba=0|kl(Rba,59610,2),f[uda>>2]=Sba;break;case 124:Tba=g,Uba=0|kl(Tba,59613,2),f[uda>>2]=Uba;break;case 125:Vba=g,Wba=0|ll(Vba,62),f[uda>>2]=Wba;break;case 126:Xba=g,Zba=0|kl(Xba,59616,2),f[uda>>2]=Zba;break;case 127:$ba=g,_ba=0|ll($ba,60),f[uda>>2]=_ba;break;case 128:aca=g,bca=0|kl(aca,59619,2),f[uda>>2]=bca;break;case 129:cca=g,dca=0|kl(cca,68065,2),f[uda>>2]=dca;break;case 130:eca=g,fca=0|kl(eca,64339,2),f[uda>>2]=fca;break;case 131:gca=g,ica=0|kl(gca,57205,2),f[uda>>2]=ica;break;case 132:jca=g,kca=0|ll(jca,43),f[uda>>2]=kca;break;case 133:lca=g,mca=0|ll(lca,45),f[uda>>2]=mca;break;case 134:nca=g,oca=0|ll(nca,42),f[uda>>2]=oca;break;case 135:pca=g,qca=0|ll(pca,42),f[uda>>2]=qca;break;case 136:rca=g,tca=0|ll(rca,47),f[uda>>2]=tca;break;case 137:uca=g,vca=0|ll(uca,37),f[uda>>2]=vca;break;case 138:wca=g,xca=0|kl(wca,57087,2),f[uda>>2]=xca;break;case 139:yca=g,zca=0|ll(yca,33),f[uda>>2]=zca;break;case 140:Aca=g,Bca=0|ll(Aca,126),f[uda>>2]=Bca;break;case 141:Cca=g,Eca=0|kl(Cca,59622,2),f[uda>>2]=Eca;break;case 142:Fca=g,Gca=0|kl(Fca,59625,2),f[uda>>2]=Gca;break;case 143:Hca=g,Ica=0|kl(Hca,68841,2),f[uda>>2]=Ica;break;case 144:Jca=g,Kca=0|kl(Jca,64349,3),f[uda>>2]=Kca;break;case 145:Lca=g,Mca=0|ll(Lca,96),f[uda>>2]=Mca;break;case 186:Nca=g,k=xda,n=k+-8|0,o=0|f[n>>2],p=xda,q=0|f[p>>2],r=0|cm(Nca,o,q),f[uda>>2]=r;break;case 187:s=g,t=xda,u=t+-16|0,v=0|f[u>>2],x=g,y=xda,z=y+-8|0,A=0|f[z>>2],B=g,C=g,D=xda,E=0|f[D>>2],F=0|xl(C,0,0,E),G=0|Lk(B,F),I=0|Nl(x,A,G,0),J=0|cm(s,v,I),f[uda>>2]=J;break;case 188:K=g,L=xda,M=L+-8|0,N=0|f[M>>2],O=xda,P=O+-4|0,Q=0|f[P>>2],R=xda,T=0|f[R>>2],U=0|Zl(K,N,Q,T),f[uda>>2]=U;break;case 189:V=g,W=xda,Y=W+-16|0,Z=0|f[Y>>2],$=xda,_=$+-12|0,aa=0|f[_>>2],ba=g,da=xda,ea=da+-8|0,fa=0|f[ea>>2],ga=g,ha=g,ia=xda,ja=0|f[ia>>2],ka=0|xl(ha,0,0,ja),la=0|Lk(ga,ka),ma=0|Nl(ba,fa,la,0),oa=0|Zl(V,Z,aa,ma),f[uda>>2]=oa;break;case 190:pa=g,qa=g,ra=xda,sa=ra+-20|0,ta=0|f[sa>>2],ua=g,va=0|kl(ua,68841,2),wa=xda,xa=wa+-12|0,za=0|f[xa>>2],Aa=0|$l(qa,ta,va,za),Ba=xda,Ca=Ba+-4|0,Da=0|f[Ca>>2],Ea=xda,Fa=0|f[Ea>>2],Ga=0|Zl(pa,Aa,Da,Fa),f[uda>>2]=Ga;break;case 191:Ha=g,Ia=g,Ka=xda,La=Ka+-16|0,Ma=0|f[La>>2],Na=xda,Oa=Na+-8|0,Pa=0|f[Oa>>2],Qa=0|$l(Ia,Ma,Pa,0),Ra=xda,Sa=Ra+-4|0,Ta=0|f[Sa>>2],Va=xda,Wa=0|f[Va>>2],Xa=0|Zl(Ha,Qa,Ta,Wa),f[uda>>2]=Xa;break;case 192:Ya=g,Za=g,$a=xda,_a=$a+-16|0,ab=0|f[_a>>2],bb=xda,cb=bb+-8|0,eb=0|f[cb>>2],fb=0|$l(Za,ab,eb,0),gb=xda,hb=gb+-4|0,ib=0|f[hb>>2],jb=xda,kb=0|f[jb>>2],lb=0|Zl(Ya,fb,ib,kb),f[uda>>2]=lb;break;case 193:mb=g,nb=g,qb=xda,rb=qb+-16|0,sb=0|f[rb>>2],tb=xda,ub=tb+-8|0,vb=0|f[ub>>2],wb=0|$l(nb,sb,vb,0),xb=xda,yb=xb+-4|0,zb=0|f[yb>>2],Bb=xda,Cb=0|f[Bb>>2],Db=0|Zl(mb,wb,zb,Cb),f[uda>>2]=Db;break;case 194:Eb=g,Yk(Eb,59356),Fb=g,Gb=0|Jl(Fb,0),f[uda>>2]=Gb;break;case 195:Hb=g,Yk(Hb,59356),Ib=g,Jb=0|Jl(Ib,0),f[uda>>2]=Jb;break;case 196:Kb=g,Mb=xda,Nb=Mb+-8|0,Ob=0|f[Nb>>2],_l(Kb,Ob),Pb=g,Qb=0|Jl(Pb,0),f[uda>>2]=Qb;break;case 197:Rb=g,Sb=xda,Tb=Sb+-8|0,Ub=0|f[Tb>>2],Vb=xda,Xb=0|f[Vb>>2],Yb=0|ym(Rb,Ub,Xb),f[uda>>2]=Yb;break;case 198:Zb=g,$b=xda,_b=$b+-8|0,ac=0|f[_b>>2],bc=xda,cc=0|f[bc>>2],dc=0|zm(Zb,ac,cc),f[uda>>2]=dc;break;case 199:ec=g,gc=xda,hc=gc+-8|0,ic=0|f[hc>>2],jc=xda,kc=0|f[jc>>2],lc=0|Am(ec,ic,64315,kc),f[uda>>2]=lc;break;case 200:mc=g,nc=xda,oc=nc+-8|0,pc=0|f[oc>>2],rc=xda,sc=0|f[rc>>2],tc=0|Am(mc,pc,69609,sc),f[uda>>2]=tc;break;case 201:uc=g,vc=xda,wc=vc+-8|0,xc=0|f[wc>>2],yc=xda,zc=0|f[yc>>2],Ac=0|Am(uc,xc,68114,zc),f[uda>>2]=Ac;break;case 202:Cc=g,Ec=xda,Fc=Ec+-8|0,Gc=0|f[Fc>>2],Hc=xda,Ic=0|f[Hc>>2],Kc=0|Am(Cc,Gc,59628,Ic),f[uda>>2]=Kc;break;case 203:Lc=g,Mc=xda,Nc=Mc+-8|0,Pc=0|f[Nc>>2],Qc=xda,Rc=0|f[Qc>>2],Sc=0|Am(Lc,Pc,59630,Rc),f[uda>>2]=Sc;break;case 204:Tc=g,Uc=xda,Vc=Uc+-8|0,Wc=0|f[Vc>>2],Xc=xda,Yc=0|f[Xc>>2],$c=0|Am(Tc,Wc,57087,Yc),f[uda>>2]=$c;break;case 205:_c=g,ad=g,bd=xda,cd=bd+-8|0,dd=0|f[cd>>2],ed=xda,fd=0|f[ed>>2],gd=0|Am(ad,dd,57087,fd),hd=0|fm(_c,gd,59625),f[uda>>2]=hd;break;case 206:jd=g,kd=g,ld=xda,md=ld+-8|0,nd=0|f[md>>2],od=xda,pd=0|f[od>>2],qd=0|Am(kd,nd,57087,pd),rd=0|fm(jd,qd,59625),f[uda>>2]=rd;break;case 207:sd=g,vd=xda,wd=0|f[vd>>2],xd=0|fm(sd,wd,59622),f[uda>>2]=xd;break;case 208:yd=g,zd=xda,Ad=0|f[zd>>2],Bd=0|fm(yd,Ad,59625),f[uda>>2]=Bd;break;case 209:Cd=g,Dd=xda,Ed=Dd+-8|0,Gd=0|f[Ed>>2],Hd=xda,Id=0|f[Hd>>2],Jd=0|Am(Cd,Gd,59632,Id),f[uda>>2]=Jd;break;case 210:Kd=g,Ld=xda,Md=Ld+-8|0,Nd=0|f[Md>>2],Od=xda,Pd=0|f[Od>>2],Rd=0|Am(Kd,Nd,59634,Pd),f[uda>>2]=Rd;break;case 211:Sd=g,Td=xda,Ud=Td+-8|0,Vd=0|f[Ud>>2],Wd=xda,Xd=0|f[Wd>>2],Yd=0|Am(Sd,Vd,68778,Xd),f[uda>>2]=Yd;break;case 212:Zd=g,$d=xda,ae=$d+-8|0,be=0|f[ae>>2],ce=xda,de=0|f[ce>>2],ee=0|Am(Zd,be,68851,de),f[uda>>2]=ee;break;case 213:fe=g,ge=xda,he=ge+-8|0,ie=0|f[he>>2],je=xda,le=0|f[je>>2],me=0|Am(fe,ie,65241,le),f[uda>>2]=me;break;case 214:ne=g,oe=xda,pe=oe+-8|0,qe=0|f[pe>>2],re=xda,se=0|f[re>>2],te=0|Am(ne,qe,59616,se),f[uda>>2]=te;break;case 215:ue=g,we=xda,xe=we+-8|0,ye=0|f[xe>>2],ze=xda,Ae=0|f[ze>>2],Be=0|Am(ue,ye,59636,Ae),f[uda>>2]=Be;break;case 216:Ce=g,De=xda,Ee=De+-8|0,Fe=0|f[Ee>>2],He=xda,Ie=0|f[He>>2],Je=0|Am(Ce,Fe,59619,Ie),f[uda>>2]=Je;break;case 217:Ke=g,Le=xda,Me=Le+-8|0,Ne=0|f[Me>>2],Oe=xda,Pe=0|f[Oe>>2],Qe=0|Am(Ke,Ne,68902,Pe),f[uda>>2]=Qe;break;case 218:Se=g,Te=xda,Ue=Te+-8|0,Ve=0|f[Ue>>2],We=xda,Xe=0|f[We>>2],Ye=0|Am(Se,Ve,69450,Xe),f[uda>>2]=Ye;break;case 219:Ze=g,$e=xda,_e=$e+-8|0,bf=0|f[_e>>2],cf=xda,df=0|f[cf>>2],ef=0|Am(Ze,bf,68065,df),f[uda>>2]=ef;break;case 220:ff=g,gf=xda,hf=gf+-8|0,jf=0|f[hf>>2],kf=xda,lf=0|f[kf>>2],nf=0|Am(ff,jf,59610,lf),f[uda>>2]=nf;break;case 221:of=g,pf=xda,qf=pf+-8|0,rf=0|f[qf>>2],sf=xda,tf=0|f[sf>>2],uf=0|Am(of,rf,59613,tf),f[uda>>2]=uf;break;case 222:vf=g,wf=xda,zf=0|f[wf>>2],Af=0|Sl(zf),Bf=0|fm(vf,Af,65320),f[uda>>2]=Bf;break;case 223:Cf=g,Df=xda,Ef=0|f[Df>>2],Ff=0|Sl(Ef),Gf=0|fm(Cf,Ff,59638),f[uda>>2]=Gf;break;case 224:Hf=g,If=xda,Kf=If+-8|0,Lf=0|f[Kf>>2],Mf=xda,Nf=0|f[Mf>>2],Of=0|Am(Hf,Lf,64339,Nf),f[uda>>2]=Of;break;case 225:Pf=g,Qf=xda,Rf=Qf+-8|0,Sf=0|f[Rf>>2],Tf=xda,Vf=0|f[Tf>>2],Wf=0|Am(Pf,Sf,57205,Vf),f[uda>>2]=Wf;break;case 226:Xf=g,Yf=xda,Zf=Yf+-8|0,$f=0|f[Zf>>2],_f=xda,ag=0|f[_f>>2],bg=0|dm(Xf,$f,ag),f[uda>>2]=bg;break;case 227:cg=g,eg=xda,fg=eg+-8|0,gg=0|f[fg>>2],hg=xda,ig=0|f[hg>>2],jg=0|em(cg,gg,ig),f[uda>>2]=jg;break;case 228:kg=g,lg=xda,mg=lg+-20|0,ng=0|f[mg>>2],pg=0|Sl(ng),qg=xda,rg=qg+-12|0,sg=0|f[rg>>2],tg=xda,ug=0|f[tg>>2],vg=0|Tl(kg,pg,sg,ug),f[uda>>2]=vg;break;case 229:wg=xda,xg=0|f[wg>>2],f[uda>>2]=xg;break;case 230:yg=xda,Ag=0|f[yg>>2],f[uda>>2]=Ag,Bg=0|f[uda>>2],Cg=0!=(0|Bg),Cg||(Dg=g,Eg=0|Ql(Dg),f[uda>>2]=Eg);break;case 232:Fg=xda,Gg=Fg+-4|0,Hg=0|f[Gg>>2],f[uda>>2]=Hg,Ig=xda,Jg=Ig+-4|0,Lg=0|f[Jg>>2],Mg=0!=(0|Lg),Mg&&(Ng=xda,Og=Ng+-4|0,Pg=0|f[Og>>2],Qg=Pg+10|0,Rg=0|e[Qg>>1],Sg=0|f[uda>>2],Tg=Sg+10|0,e[Tg>>1]=Rg,Ug=xda,Wg=Ug+-4|0,Xg=0|f[Wg>>2],Yg=Xg+8|0,Zg=0|e[Yg>>1],$g=0|f[uda>>2],_g=$g+8|0,e[_g>>1]=Zg);break;case 233:ah=g,bh=xda,ch=bh+-12|0,dh=0|f[ch>>2],fh=g,gh=g,hh=xda,ih=hh+-4|0,jh=0|f[ih>>2],kh=0|Bm(gh,jh),lh=0|Lk(fh,kh),mh=0|Mk(ah,dh,lh),f[uda>>2]=mh;break;case 234:nh=g,oh=g,qh=xda,rh=qh+-4|0,sh=0|f[rh>>2],th=0|Bm(oh,sh),uh=0|Jk(nh,th,0),f[uda>>2]=uh,vh=xda,wh=vh+-4|0,xh=0|f[wh>>2],yh=0!=(0|xh),yh&&(zh=xda,Ch=zh+-4|0,Dh=0|f[Ch>>2],Eh=Dh+10|0,Fh=0|e[Eh>>1],Gh=0|f[uda>>2],Hh=Gh+10|0,e[Hh>>1]=Fh,Ih=xda,Jh=Ih+-4|0,Kh=0|f[Jh>>2],Lh=Kh+8|0,Nh=0|e[Lh>>1],Oh=0|f[uda>>2],Ph=Oh+8|0,e[Ph>>1]=Nh);break;case 235:Qh=xda,Rh=Qh+-4|0,Sh=0|f[Rh>>2],f[uda>>2]=Sh;break;case 240:Th=g,Uh=xda,Vh=Uh+-4|0,Wh=0|f[Vh>>2],Yh=0|Jk(Th,Wh,0),f[uda>>2]=Yh,Zh=xda,$h=Zh+-4|0,_h=0|f[$h>>2],ai=0!=(0|_h),ai&&(bi=xda,ci=bi+-4|0,di=0|f[ci>>2],ei=di+10|0,fi=0|e[ei>>1],hi=0|f[uda>>2],ii=hi+10|0,e[ii>>1]=fi,ji=xda,ki=ji+-4|0,li=0|f[ki>>2],mi=li+8|0,ni=0|e[mi>>1],oi=0|f[uda>>2],pi=oi+8|0,e[pi>>1]=ni);break;case 241:qi=g,si=g,ti=xda,ui=ti+-12|0,vi=0|f[ui>>2],wi=g,xi=g,yi=xda,zi=yi+-4|0,Ai=0|f[zi>>2],Bi=0|Bm(xi,Ai),Di=0|Lk(wi,Bi),Ei=0|Mk(si,vi,Di),Fi=0|Jk(qi,Ei,0),f[uda>>2]=Fi,Gi=xda,Hi=Gi+-12|0,Ii=0|f[Hi>>2],Ji=0!=(0|Ii),Ji&&(Ki=xda,Li=Ki+-12|0,Mi=0|f[Li>>2],Oi=Mi+10|0,Pi=0|e[Oi>>1],Qi=0|f[uda>>2],Ri=Qi+10|0,e[Ri>>1]=Pi,Si=xda,Ti=Si+-12|0,Ui=0|f[Ti>>2],Vi=Ui+8|0,Wi=0|e[Vi>>1],Xi=0|f[uda>>2],Zi=Xi+8|0,e[Zi>>1]=Wi);break;case 242:$i=g,_i=g,aj=g,bj=xda,cj=bj+-4|0,dj=0|f[cj>>2],ej=0|Bm(aj,dj),fj=0|Lk(_i,ej),gj=0|Jk($i,fj,0),f[uda>>2]=gj,ij=xda,jj=ij+-4|0,kj=0|f[jj>>2],lj=0!=(0|kj),lj&&(mj=xda,nj=mj+-4|0,oj=0|f[nj>>2],pj=oj+10|0,qj=0|e[pj>>1],rj=0|f[uda>>2],tj=rj+10|0,e[tj>>1]=qj,uj=xda,vj=uj+-4|0,wj=0|f[vj>>2],xj=wj+8|0,yj=0|e[xj>>1],zj=0|f[uda>>2],Aj=zj+8|0,e[Aj>>1]=yj);break;case 243:Bj=g,Cj=g,Fj=xda,Gj=0|f[Fj>>2],Hj=0|Lk(Cj,Gj),Ij=0|Jk(Bj,Hj,0),f[uda>>2]=Ij,Jj=xda,Kj=0|f[Jj>>2],Lj=0!=(0|Kj),Lj&&(Mj=xda,Nj=0|f[Mj>>2],Oj=Nj+10|0,Qj=0|e[Oj>>1],Rj=0|f[uda>>2],Sj=Rj+10|0,e[Sj>>1]=Qj,Tj=xda,Uj=0|f[Tj>>2],Vj=Uj+8|0,Wj=0|e[Vj>>1],Xj=0|f[uda>>2],Yj=Xj+8|0,e[Yj>>1]=Wj);break;case 244:Zj=g,_j=xda,ak=_j+-4|0,bk=0|f[ak>>2],ck=xda,dk=0|f[ck>>2],ek=0|Jk(Zj,bk,dk),f[uda>>2]=ek,fk=xda,gk=fk+-4|0,hk=0|f[gk>>2],ik=0!=(0|hk),ik&&(kk=xda,lk=kk+-4|0,mk=0|f[lk>>2],nk=mk+10|0,ok=0|e[nk>>1],pk=0|f[uda>>2],qk=pk+10|0,e[qk>>1]=ok,rk=xda,sk=rk+-4|0,tk=0|f[sk>>2],vk=tk+8|0,wk=0|e[vk>>1],xk=0|f[uda>>2],yk=xk+8|0,e[yk>>1]=wk);break;case 245:zk=g,Ak=g,Bk=g,Ck=xda,Dk=Ck+-4|0,Ek=0|f[Dk>>2],Gk=0|Bm(Bk,Ek),Hk=0|Lk(Ak,Gk),Ik=xda,Nk=0|f[Ik>>2],Pk=0|Jk(zk,Hk,Nk),f[uda>>2]=Pk,Qk=xda,Sk=Qk+-4|0,Tk=0|f[Sk>>2],Uk=0!=(0|Tk),Uk&&(Vk=xda,Xk=Vk+-4|0,Zk=0|f[Xk>>2],$k=Zk+10|0,al=0|e[$k>>1],bl=0|f[uda>>2],cl=bl+10|0,e[cl>>1]=al,dl=xda,fl=dl+-4|0,gl=0|f[fl>>2],hl=gl+8|0,jl=0|e[hl>>1],ml=0|f[uda>>2],ol=ml+8|0,e[ol>>1]=jl);break;case 246:pl=g,ql=g,rl=xda,sl=rl+-12|0,tl=0|f[sl>>2],ul=g,wl=g,zl=xda,Al=zl+-4|0,Bl=0|f[Al>>2],Cl=0|Bm(wl,Bl),Dl=0|Lk(ul,Cl),El=0|Mk(ql,tl,Dl),Fl=xda,Gl=0|f[Fl>>2],Il=0|Jk(pl,El,Gl),f[uda>>2]=Il,Ol=xda,tm=Ol+-12|0,um=0|f[tm>>2],Mm=0!=(0|um),Mm&&(Om=xda,on=Om+-12|0,pn=0|f[on>>2],qn=pn+10|0,sn=0|e[qn>>1],tn=0|f[uda>>2],un=tn+10|0,e[un>>1]=sn,xn=xda,yn=xn+-12|0,zn=0|f[yn>>2],An=zn+8|0,Bn=0|e[An>>1],Cn=0|f[uda>>2],Dn=Cn+8|0,e[Dn>>1]=Bn);break;case 247:En=g,Fn=xda,Gn=0|f[Fn>>2],In=0|Jk(En,0,Gn),f[uda>>2]=In,Jn=xda,Kn=0|f[Jn>>2],Ln=0!=(0|Kn),Ln&&(Mn=xda,Nn=0|f[Mn>>2],On=Nn+10|0,Pn=0|e[On>>1],Qn=0|f[uda>>2],Rn=Qn+10|0,e[Rn>>1]=Pn,Tn=xda,Un=0|f[Tn>>2],Vn=Un+8|0,Wn=0|e[Vn>>1],Xn=0|f[uda>>2],Yn=Xn+8|0,e[Yn>>1]=Wn);break;case 248:Zn=g,$n=Zn+52|0,_n=0|f[$n>>2],f[uda>>2]=_n,ao=g,co=ao+52|0,eo=0|f[co>>2],fo=eo<<1,go=1|fo,ho=g,io=ho+52|0,f[io>>2]=go;break;case 249:jo=xda,ko=jo+-4|0,lo=0|f[ko>>2],mo=g,oo=mo+52|0,f[oo>>2]=lo,po=xda,qo=0|f[po>>2],f[uda>>2]=qo;break;case 250:ro=g,so=xda,to=0|f[so>>2],uo=0|Cm(ro,to),f[uda>>2]=uo;break;case 251:vo=xda,wo=0|f[vo>>2],f[uda>>2]=wo;break;case 252:f[uda>>2]=0;break;case 253:xo=g,zo=xda,Ao=0|f[zo>>2],Bo=0|Jk(xo,Ao,0),f[uda>>2]=Bo,Co=xda,Do=0|f[Co>>2],Eo=0!=(0|Do),Eo&&(Fo=xda,Go=0|f[Fo>>2],Ho=Go+10|0,Io=0|e[Ho>>1],Ko=0|f[uda>>2],Lo=Ko+10|0,e[Lo>>1]=Io,Mo=xda,No=0|f[Mo>>2],Oo=No+8|0,Po=0|e[Oo>>1],Qo=0|f[uda>>2],Ro=Qo+8|0,e[Ro>>1]=Po);break;case 254:So=g,To=g,Vo=xda,Wo=0|f[Vo>>2],Xo=0|Dm(To,Wo),Yo=0|Jk(So,Xo,0),f[uda>>2]=Yo,Zo=xda,$o=0|f[Zo>>2],_o=0!=(0|$o),_o&&(ap=xda,bp=0|f[ap>>2],cp=bp+10|0,ep=0|e[cp>>1],fp=0|f[uda>>2],gp=fp+10|0,e[gp>>1]=ep,hp=xda,ip=0|f[hp>>2],jp=ip+8|0,kp=0|e[jp>>1],lp=0|f[uda>>2],mp=lp+8|0,e[mp>>1]=kp);break;case 255:np=g,pp=xda,qp=pp+-8|0,rp=0|f[qp>>2],sp=g,tp=xda,up=0|f[tp>>2],vp=0|Lk(sp,up),wp=0|Mk(np,rp,vp),f[uda>>2]=wp;break;case 256:xp=g,yp=xda,Bp=yp+-12|0,Cp=0|f[Bp>>2],Dp=g,Ep=g,Fp=xda,Gp=0|f[Fp>>2],Hp=0|Dm(Ep,Gp),Ip=0|Lk(Dp,Hp),Jp=0|Mk(xp,Cp,Ip),f[uda>>2]=Jp;break;case 257:Kp=g,Mp=xda,Np=Mp+-12|0,Op=0|f[Np>>2],Pp=g,Qp=xda,Rp=0|f[Qp>>2],Sp=0|Lk(Pp,Rp),Tp=0|Mk(Kp,Op,Sp),f[uda>>2]=Tp;break;case 258:Up=g,Vp=xda,Xp=Vp+-16|0,Yp=0|f[Xp>>2],Zp=g,$p=g,_p=xda,aq=0|f[_p>>2],bq=0|Dm($p,aq),cq=0|Lk(Zp,bq),dq=0|Mk(Up,Yp,cq),f[uda>>2]=dq;break;case 259:eq=g,gq=xda,hq=gq+-8|0,iq=0|f[hq>>2],jq=g,kq=xda,lq=0|f[kq>>2],mq=0|Lk(jq,lq),nq=0|Mk(eq,iq,mq),f[uda>>2]=nq;break;case 260:oq=g,pq=xda,rq=pq+-12|0,sq=0|f[rq>>2],tq=g,uq=g,vq=xda,wq=0|f[vq>>2],xq=0|Dm(uq,wq),yq=0|Lk(tq,xq),zq=0|Mk(oq,sq,yq),f[uda>>2]=zq;break;case 261:Aq=g,Cq=g,Dq=xda,Eq=0|f[Dq>>2],Fq=0|Dm(Cq,Eq),Gq=0|Lk(Aq,Fq),f[uda>>2]=Gq;break;case 269:Hq=g,Iq=xda,Jq=0|f[Iq>>2],Kq=0|jm(Hq,Jq,0),f[uda>>2]=Kq;break;case 270:Lq=g,Nq=Lq+52|0,Oq=0|f[Nq>>2],f[uda>>2]=Oq,Pq=g,Qq=Pq+52|0,f[Qq>>2]=0;break;case 271:Rq=xda,Sq=Rq+-8|0,Tq=0|f[Sq>>2],Uq=g,Vq=Uq+52|0,f[Vq>>2]=Tq,Wq=xda,Yq=Wq+-4|0,Zq=0|f[Yq>>2],f[uda>>2]=Zq;break;case 272:$q=g,_q=$q+52|0,ar=0|f[_q>>2],f[uda>>2]=ar,br=g,cr=br+52|0,f[cr>>2]=0;break;case 273:dr=g,er=dr+40|0,f[er>>2]=2;break;case 274:fr=xda,hr=fr+-12|0,ir=0|f[hr>>2],jr=g,kr=jr+52|0,f[kr>>2]=ir,lr=xda,mr=lr+-8|0,nr=0|f[mr>>2],f[uda>>2]=nr;break;case 275:or=g,pr=or+40|0,f[pr>>2]=2;break;case 276:f[uda>>2]=0;break;case 277:qr=xda,sr=qr+-4|0,tr=0|f[sr>>2],f[uda>>2]=tr;break;case 278:ur=g,vr=xda,wr=vr+-8|0,xr=0|f[wr>>2],yr=xda,zr=0|f[yr>>2],Ar=0|vm(ur,xr,zr),f[uda>>2]=Ar;break;case 279:Br=g,Er=xda,Fr=0|f[Er>>2],Gr=0|wm(Br,Fr),f[uda>>2]=Gr;break;case 280:Hr=g,Ir=xda,Jr=Ir+-4|0,Kr=0|f[Jr>>2],Lr=0|bm(Hr,Kr),f[uda>>2]=Lr,Mr=xda,Nr=Mr+-4|0,Pr=0|f[Nr>>2],Qr=0!=(0|Pr),Qr&&(Rr=xda,Sr=Rr+-4|0,Tr=0|f[Sr>>2],Ur=Tr+10|0,Vr=0|e[Ur>>1],Wr=0|f[uda>>2],Xr=Wr+10|0,e[Xr>>1]=Vr,Yr=xda,$r=Yr+-4|0,_r=0|f[$r>>2],as=_r+8|0,bs=0|e[as>>1],cs=0|f[uda>>2],ds=cs+8|0,e[ds>>1]=bs);break;case 281:es=g,fs=xda,gs=fs+-4|0,hs=0|f[gs>>2],js=0|Bm(es,hs),f[uda>>2]=js,ks=xda,ls=ks+-4|0,ms=0|f[ls>>2],ns=0!=(0|ms),ns&&(os=xda,ps=os+-4|0,qs=0|f[ps>>2],rs=qs+10|0,ss=0|e[rs>>1],us=0|f[uda>>2],vs=us+10|0,e[vs>>1]=ss,ws=xda,xs=ws+-4|0,ys=0|f[xs>>2],zs=ys+8|0,As=0|e[zs>>1],Bs=0|f[uda>>2],Cs=Bs+8|0,e[Cs>>1]=As);break;case 282:Ds=g,Fs=0|pm(Ds,0),f[uda>>2]=Fs;break;case 283:Gs=g,Hs=xda,Is=Hs+-4|0,Js=0|f[Is>>2],Ks=0|nm(Gs,Js),f[uda>>2]=Ks;break;case 284:Ls=g,Ms=0|nm(Ls,0),f[uda>>2]=Ms;break;case 285:Ns=g,Os=0|nm(Ns,0),f[uda>>2]=Os;break;case 286:Qs=g,Rs=xda,Ss=Rs+-4|0,Ts=0|f[Ss>>2],Us=0|Sl(Ts),Vs=0|fm(Qs,Us,65320),f[uda>>2]=Vs;break;case 287:Ws=g,Xs=g,Ys=0|Ql(Xs),Zs=0|fm(Ws,Ys,65320),f[uda>>2]=Zs;break;case 288:_s=g,at=xda,bt=at+-4|0,ct=0|f[bt>>2],dt=g,et=xda,ft=0|f[et>>2],gt=0|Jk(dt,0,ft),ht=0|jm(_s,ct,gt),f[uda>>2]=ht;break;case 290:it=g,kt=xda,lt=kt+-4|0,mt=0|f[lt>>2],nt=xda,ot=0|f[nt>>2],Em(it,mt,ot),pt=xda,qt=pt+-4|0,rt=0|f[qt>>2],f[uda>>2]=rt;break;case 291:st=g,gm(st),tt=g,vt=tt+60|0,wt=0|f[vt>>2],f[uda>>2]=wt,xt=g,yt=xt+56|0,zt=0|f[yt>>2],At=zt+1|0,f[yt>>2]=At,Bt=g,Ct=Bt+60|0,f[Ct>>2]=At;break;case 292:Dt=g,Et=Dt+52|0,Ht=0|f[Et>>2],f[uda>>2]=Ht,It=g,Jt=It+52|0,f[Jt>>2]=0;break;case 293:Kt=xda,Lt=Kt+-12|0,Mt=0|f[Lt>>2],Nt=g,Ot=Nt+60|0,f[Ot>>2]=Mt,Pt=g,Qt=xda,St=Qt+-8|0,Tt=0|f[St>>2],Ut=xda,Vt=0|f[Ut>>2],Wt=0|Fm(Pt,Tt,Vt),f[uda>>2]=Wt,Xt=g,im(Xt),Yt=xda,Zt=Yt+-4|0,$t=0|f[Zt>>2],_t=g,bu=_t+52|0,f[bu>>2]=$t,cu=g,du=cu+52|0,eu=0|f[du>>2],fu=eu>>>1,gu=g,hu=gu+52|0,iu=0|f[hu>>2],ju=1&iu,ku=fu|ju,mu=g,nu=mu+52|0,f[nu>>2]=ku;break;case 294:ou=g,pu=xda,qu=pu+-16|0,ru=0|f[qu>>2],su=0|Sl(ru),tu=xda,uu=tu+-8|0,vu=0|f[uu>>2],xu=xda,yu=xu+-4|0,zu=0|f[yu>>2],Au=0|Tl(ou,su,vu,zu),f[uda>>2]=Au,Bu=xda,Cu=Bu+-20|0,Du=0|f[Cu>>2],Eu=65535&Du,Fu=0|f[uda>>2],Gu=Fu+8|0,e[Gu>>1]=Eu;break;case 295:Iu=g,Ju=xda,Ku=Ju+-16|0,Lu=0|f[Ku>>2],Mu=0|Sl(Lu),Nu=xda,Ou=Nu+-8|0,Pu=0|f[Ou>>2],Qu=xda,Ru=Qu+-4|0,Tu=0|f[Ru>>2],Uu=0|Ul(Iu,Mu,Pu,Tu),f[uda>>2]=Uu,Vu=xda,Wu=Vu+-20|0,Xu=0|f[Wu>>2],Yu=65535&Xu,Zu=0|f[uda>>2],$u=Zu+8|0,e[$u>>1]=Yu;break;case 296:_u=g,av=_u+48|0,cv=0|f[av>>2],dv=cv<<1,ev=1|dv,fv=g,gv=fv+48|0,f[gv>>2]=ev;break;case 297:hv=g,iv=hv+48|0,jv=0|f[iv>>2],kv=jv>>>1,lv=g,nv=lv+48|0,f[nv>>2]=kv;break;case 298:ov=g,pv=xda,qv=pv+-16|0,rv=0|f[qv>>2],sv=0|Sl(rv),tv=xda,uv=tv+-4|0,vv=0|f[uv>>2],wv=0|Vl(ov,sv,vv),f[uda>>2]=wv,yv=xda,zv=yv+-24|0,Av=0|f[zv>>2],Bv=65535&Av,Cv=0|f[uda>>2],Dv=Cv+8|0,e[Dv>>1]=Bv;break;case 299:Ev=g,Fv=Ev+48|0,Gv=0|f[Fv>>2],Hv=Gv<<1,Nv=1|Hv,Ov=g,Pv=Ov+48|0,f[Pv>>2]=Nv;break;case 300:Qv=g,Rv=Qv+48|0,Sv=0|f[Rv>>2],Tv=Sv>>>1,Uv=g,Vv=Uv+48|0,f[Vv>>2]=Tv;break;case 301:Wv=g,Yv=xda,Zv=Yv+-16|0,$v=0|f[Zv>>2],_v=0|Sl($v),aw=xda,bw=aw+-4|0,cw=0|f[bw>>2],dw=0|Wl(Wv,_v,cw),f[uda>>2]=dw,ew=xda,fw=ew+-24|0,hw=0|f[fw>>2],iw=65535&hw,jw=0|f[uda>>2],kw=jw+8|0,e[kw>>1]=iw;break;case 302:lw=g,mw=xda,nw=mw+-12|0,ow=0|f[nw>>2],pw=xda,qw=pw+-4|0,tw=0|f[qw>>2],uw=0|Gm(lw,ow,tw),f[uda>>2]=uw;break;case 303:vw=g,ww=xda,xw=ww+-4|0,yw=0|f[xw>>2],zw=0|Gm(vw,0,yw),f[uda>>2]=zw;break;case 304:Aw=g,Bw=Aw+48|0,Cw=0|f[Bw>>2],Ew=Cw<<1,Fw=1|Ew,Gw=g,Hw=Gw+48|0,f[Hw>>2]=Fw;break;case 305:Iw=g,Jw=Iw+48|0,Kw=0|f[Jw>>2],Lw=Kw>>>1,Mw=g,Nw=Mw+48|0,f[Nw>>2]=Lw;break;case 306:Pw=g,Qw=xda,Rw=Qw+-28|0,Sw=0|f[Rw>>2],Tw=xda,Uw=Tw+-16|0,Vw=0|f[Uw>>2],Ww=xda,Xw=Ww+-4|0,Yw=0|f[Xw>>2],$w=0|Hm(Pw,Sw,Vw,Yw),f[uda>>2]=$w,_w=xda,ax=_w+-32|0,bx=0|f[ax>>2],cx=65535&bx,dx=0|f[uda>>2],ex=dx+8|0,e[ex>>1]=cx;break;case 307:fx=g,gx=fx+64|0,hx=0|f[gx>>2],jx=0!=(0|hx),jx?yda=307:(kx=g,lx=kx+68|0,mx=0|f[lx>>2],nx=0!=(0|mx),nx&&(yda=307)),307==(0|yda)&&(yda=0,ox=g,Yk(ox,59640)),px=g,qx=0|Ll(px),f[uda>>2]=qx;break;case 308:rx=g,sx=xda,ux=sx+-16|0,vx=0|f[ux>>2],wx=xda,xx=wx+-12|0,yx=0|f[xx>>2],zx=xda,Ax=zx+-4|0,Bx=0|f[Ax>>2],Cx=0|Im(rx,vx,yx,Bx),f[uda>>2]=Cx,Dx=xda,Fx=Dx+-20|0,Gx=0|f[Fx>>2],Hx=65535&Gx,Ix=0|f[uda>>2],Jx=Ix+8|0,e[Jx>>1]=Hx,Kx=g,Lx=xda,Mx=Lx+-8|0,Nx=0|f[Mx>>2],Ml(Kx,Nx);break;case 309:Ox=g,Rx=Ox+64|0,Sx=0|f[Rx>>2],f[uda>>2]=Sx,Tx=g,Ux=Tx+64|0,f[Ux>>2]=0;break;case 310:Vx=g,Wx=g,Xx=0|Ll(Wx),Yx=g,Zx=Yx+68|0,$x=0|f[Zx>>2],ay=$x,by=0|Jk(Vx,Xx,ay),f[uda>>2]=by,cy=g,dy=cy+68|0,f[dy>>2]=0;break;case 311:
+ey=g,fy=xda,gy=fy+-20|0,hy=0|f[gy>>2],iy=xda,jy=iy+-4|0,ly=0|f[jy>>2],my=0|Jm(ey,hy,ly),f[uda>>2]=my,ny=xda,oy=ny+-28|0,py=0|f[oy>>2],qy=65535&py,ry=0|f[uda>>2],sy=ry+8|0,e[sy>>1]=qy,ty=g,uy=xda,wy=uy+-8|0,xy=0|f[wy>>2],yy=0|f[xy>>2],Ml(ty,yy),zy=xda,Ay=zy+-16|0,By=0|f[Ay>>2],Cy=g,Dy=Cy+64|0,f[Dy>>2]=By,Ey=xda,Fy=Ey+-8|0,Hy=0|f[Fy>>2],Iy=Hy+4|0,Jy=0|f[Iy>>2],Ky=Jy,Ly=g,My=Ly+68|0,f[My>>2]=Ky;break;case 312:Ny=g,Oy=Ny+64|0,Py=0|f[Oy>>2],Qy=0!=(0|Py),Qy?yda=315:(Sy=g,Ty=Sy+68|0,Uy=0|f[Ty>>2],Vy=0!=(0|Uy),Vy&&(yda=315)),315==(0|yda)&&(yda=0,Wy=g,Yk(Wy,59672)),Xy=g,Yy=0|Ll(Xy),f[uda>>2]=Yy;break;case 313:Zy=g,$y=xda,_y=$y+-12|0,bz=0|f[_y>>2],cz=xda,dz=cz+-4|0,ez=0|f[dz>>2],fz=0|Km(Zy,bz,ez),f[uda>>2]=fz,gz=xda,hz=gz+-16|0,iz=0|f[hz>>2],jz=65535&iz,kz=0|f[uda>>2],mz=kz+8|0,e[mz>>1]=jz,nz=g,oz=xda,pz=oz+-8|0,qz=0|f[pz>>2],Ml(nz,qz);break;case 314:rz=g,sz=rz+52|0,tz=0|f[sz>>2],f[uda>>2]=tz,uz=g,vz=uz+52|0,f[vz>>2]=0;break;case 315:xz=g,yz=xz+64|0,zz=0|f[yz>>2],Az=zz+1|0,f[yz>>2]=Az,Bz=g,Cz=0|Ll(Bz),f[uda>>2]=Cz;break;case 316:Dz=g,Ez=xda,Fz=Ez+-20|0,Gz=0|f[Fz>>2],Iz=xda,Jz=Iz+-8|0,Kz=0|f[Jz>>2],Lz=xda,Mz=Lz+-4|0,Nz=0|f[Mz>>2],Oz=0|Lm(Dz,Gz,Kz,Nz),f[uda>>2]=Oz,Pz=xda,Qz=Pz+-24|0,Rz=0|f[Qz>>2],Uz=65535&Rz,Vz=0|f[uda>>2],Wz=Vz+8|0,e[Wz>>1]=Uz,Xz=g,Yz=xda,Zz=Yz+-12|0,$z=0|f[Zz>>2],Ml(Xz,$z),_z=g,aA=_z+64|0,bA=0|f[aA>>2],dA=bA+-1|0,f[aA>>2]=dA,eA=xda,fA=eA+-16|0,gA=0|f[fA>>2],hA=g,iA=hA+52|0,f[iA>>2]=gA;break;case 317:jA=g,kA=jA+40|0,f[kA>>2]=7,lA=g,mA=lA+52|0,oA=0|f[mA>>2],f[uda>>2]=oA,pA=g,qA=pA+52|0,f[qA>>2]=0;break;case 318:rA=g,sA=rA+68|0,tA=0|f[sA>>2],uA=tA+1|0,f[sA>>2]=uA,vA=g,wA=vA+40|0,f[wA>>2]=3,xA=g,zA=0|Ll(xA),f[uda>>2]=zA;break;case 319:AA=g,BA=xda,CA=BA+-28|0,DA=0|f[CA>>2],EA=xda,FA=EA+-16|0,GA=0|f[FA>>2],HA=xda,IA=HA+-8|0,KA=0|f[IA>>2],LA=xda,MA=LA+-4|0,NA=0|f[MA>>2],OA=0|Nm(AA,DA,GA,KA,NA),f[uda>>2]=OA,PA=xda,QA=PA+-32|0,RA=0|f[QA>>2],SA=65535&RA,TA=0|f[uda>>2],VA=TA+8|0,e[VA>>1]=SA,WA=g,XA=xda,YA=XA+-12|0,ZA=0|f[YA>>2],Ml(WA,ZA),$A=g,_A=$A+68|0,aB=0|f[_A>>2],bB=aB+-1|0,f[_A>>2]=bB,cB=xda,eB=cB+-20|0,fB=0|f[eB>>2],gB=g,hB=gB+52|0,f[hB>>2]=fB;break;case 320:iB=g,jB=0|qm(iB,0),f[uda>>2]=jB;break;case 321:kB=g,lB=0|rm(kB,0),f[uda>>2]=lB;break;case 322:mB=g,nB=0|Pm(mB),f[uda>>2]=nB;break;case 323:pB=g,qB=0|Qm(pB),f[uda>>2]=qB;break;case 324:rB=xda,sB=0|f[rB>>2],f[uda>>2]=sB,tB=0|f[uda>>2],uB=0!=(0|tB),uB||(vB=g,wB=0|Ql(vB),f[uda>>2]=wB);break;case 331:xB=g,yB=xda,AB=yB+-12|0,BB=0|f[AB>>2],CB=0|Sl(BB),DB=xda,EB=DB+-4|0,FB=0|f[EB>>2],GB=xda,HB=0|f[GB>>2],IB=0|Tl(xB,CB,FB,HB),f[uda>>2]=IB;break;case 333:JB=xda,LB=0|f[JB>>2],f[uda>>2]=LB;break;case 334:MB=g,NB=g,OB=xda,PB=0|f[OB>>2],QB=0|Lk(NB,PB),RB=0|Lk(MB,QB),f[uda>>2]=RB;break;case 336:SB=g,TB=xda,UB=0|f[TB>>2],XB=0|Rm(SB,UB),f[uda>>2]=XB;break;case 337:YB=g,ZB=xda,$B=ZB+-4|0,_B=0|f[$B>>2],aC=0|Yl(YB,_B,0),f[uda>>2]=aC;break;case 338:bC=g,cC=xda,dC=0|f[cC>>2],eC=0|Lk(bC,dC),f[uda>>2]=eC;break;case 339:gC=g,hC=xda,iC=hC+-8|0,jC=0|f[iC>>2],kC=g,lC=xda,mC=0|f[lC>>2],nC=0|Lk(kC,mC),oC=0|Mk(gC,jC,nC),f[uda>>2]=oC;break;case 340:pC=g,rC=xda,sC=0|f[rC>>2],tC=0|xl(pC,sC,0,0),f[uda>>2]=tC;break;case 341:uC=g,vC=xda,wC=vC+-12|0,xC=0|f[wC>>2],yC=g,zC=xda,AC=0|f[zC>>2],CC=0|Rm(yC,AC),DC=0|xl(uC,xC,CC,0),f[uda>>2]=DC;break;case 342:EC=g,FC=xda,GC=FC+-20|0,HC=0|f[GC>>2],IC=g,JC=xda,KC=JC+-8|0,LC=0|f[KC>>2],NC=0|Rm(IC,LC),OC=xda,PC=0|f[OC>>2],QC=0|xl(EC,HC,NC,PC),f[uda>>2]=QC;break;case 343:RC=g,SC=xda,TC=SC+-8|0,UC=0|f[TC>>2],VC=0|xl(RC,UC,-1,0),f[uda>>2]=VC;break;case 344:WC=g,YC=xda,ZC=YC+-16|0,$C=0|f[ZC>>2],_C=xda,aD=0|f[_C>>2],bD=0|xl(WC,$C,-1,aD),f[uda>>2]=bD;break;case 345:cD=g,dD=g,eD=xda,fD=0|f[eD>>2],hD=0|Rm(dD,fD),iD=0|xl(cD,0,hD,0),f[uda>>2]=iD;break;case 346:jD=g,kD=g,lD=xda,mD=lD+-8|0,nD=0|f[mD>>2],oD=0|Rm(kD,nD),pD=xda,qD=0|f[pD>>2],sD=0|xl(jD,0,oD,qD),f[uda>>2]=sD;break;case 347:tD=g,uD=0|xl(tD,0,-1,0),f[uda>>2]=uD;break;case 348:vD=g,wD=xda,xD=0|f[wD>>2],yD=0|xl(vD,0,-1,xD),f[uda>>2]=yD;break;case 349:zD=g,AD=xda,BD=AD+-20|0,DD=0|f[BD>>2],ED=xda,FD=ED+-12|0,GD=0|f[FD>>2],HD=xda,ID=HD+-4|0,JD=0|f[ID>>2],KD=xda,LD=0|f[KD>>2],MD=0|Sm(zD,DD,GD,JD,0,LD),f[uda>>2]=MD;break;case 350:OD=g,PD=xda,QD=PD+-28|0,RD=0|f[QD>>2],SD=xda,TD=SD+-20|0,UD=0|f[TD>>2],VD=xda,WD=VD+-12|0,XD=0|f[WD>>2],$D=xda,_D=$D+-4|0,aE=0|f[_D>>2],bE=xda,cE=0|f[bE>>2],dE=0|Sm(OD,RD,UD,XD,aE,cE),f[uda>>2]=dE;break;case 351:eE=g,fE=xda,gE=fE+-12|0,hE=0|f[gE>>2],jE=xda,kE=jE+-4|0,lE=0|f[kE>>2],mE=xda,nE=0|f[mE>>2],oE=0|Sm(eE,hE,lE,0,0,nE),f[uda>>2]=oE;break;case 352:pE=g,qE=xda,rE=qE+-20|0,sE=0|f[rE>>2],uE=xda,vE=uE+-12|0,wE=0|f[vE>>2],xE=xda,yE=xE+-4|0,zE=0|f[yE>>2],AE=xda,BE=0|f[AE>>2],CE=0|Sm(pE,sE,wE,0,zE,BE),f[uda>>2]=CE;break;case 353:DE=g,FE=xda,GE=FE+-12|0,HE=0|f[GE>>2],IE=xda,JE=IE+-4|0,KE=0|f[JE>>2],LE=xda,ME=0|f[LE>>2],NE=0|Sm(DE,HE,0,KE,0,ME),f[uda>>2]=NE;break;case 354:OE=g,QE=xda,RE=QE+-4|0,SE=0|f[RE>>2],TE=0|Sm(OE,SE,0,1,0,0),f[uda>>2]=TE;break;case 355:UE=g,VE=xda,WE=VE+-20|0,XE=0|f[WE>>2],YE=xda,ZE=YE+-12|0,_E=0|f[ZE>>2],aF=xda,bF=aF+-4|0,cF=0|f[bF>>2],dF=xda,eF=0|f[dF>>2],fF=0|Sm(UE,XE,0,_E,cF,eF),f[uda>>2]=fF;break;case 356:gF=g,hF=xda,iF=hF+-4|0,kF=0|f[iF>>2],lF=xda,mF=0|f[lF>>2],nF=0|Sm(gF,kF,0,0,0,mF),f[uda>>2]=nF;break;case 357:oF=g,pF=xda,qF=pF+-12|0,rF=0|f[qF>>2],sF=xda,tF=sF+-4|0,vF=0|f[tF>>2],wF=xda,xF=0|f[wF>>2],yF=0|Sm(oF,0,rF,vF,0,xF),f[uda>>2]=yF;break;case 358:zF=g,AF=xda,BF=AF+-20|0,CF=0|f[BF>>2],DF=xda,EF=DF+-12|0,GF=0|f[EF>>2],HF=xda,IF=HF+-4|0,JF=0|f[IF>>2],KF=xda,LF=0|f[KF>>2],MF=0|Sm(zF,0,CF,GF,JF,LF),f[uda>>2]=MF;break;case 359:NF=g,OF=xda,PF=OF+-4|0,RF=0|f[PF>>2],SF=xda,TF=0|f[SF>>2],UF=0|Sm(NF,0,RF,0,0,TF),f[uda>>2]=UF;break;case 360:VF=g,WF=xda,XF=WF+-12|0,YF=0|f[XF>>2],ZF=xda,$F=ZF+-4|0,bG=0|f[$F>>2],cG=xda,dG=0|f[cG>>2],eG=0|Sm(VF,0,YF,0,bG,dG),f[uda>>2]=eG;break;case 361:fG=g,gG=xda,hG=gG+-4|0,iG=0|f[hG>>2],jG=xda,kG=0|f[jG>>2],mG=0|Sm(fG,0,0,iG,0,kG),f[uda>>2]=mG;break;case 362:nG=g,oG=xda,pG=oG+-12|0,qG=0|f[pG>>2],rG=xda,sG=rG+-4|0,tG=0|f[sG>>2],uG=xda,vG=0|f[uG>>2],xG=0|Sm(nG,0,0,qG,tG,vG),f[uda>>2]=xG;break;case 363:yG=g,zG=xda,AG=0|f[zG>>2],BG=0|Sm(yG,0,0,0,0,AG),f[uda>>2]=BG;break;case 365:CG=g,DG=CG+72|0,EG=0|d[DG>>0],FG=EG&-2,GG=1|FG,d[DG>>0]=GG,IG=xda,JG=0|f[IG>>2],f[uda>>2]=JG;break;case 366:f[uda>>2]=0;break;case 367:f[uda>>2]=0;break;case 368:KG=xda,LG=KG+-8|0,MG=0|f[LG>>2],f[uda>>2]=MG;break;case 369:f[uda>>2]=0;break;case 370:f[uda>>2]=0;break;case 373:NG=g,OG=xda,PG=0|f[OG>>2],Kk(NG,PG),QG=g,RG=xda,TG=0|f[RG>>2],Tm(QG,TG);break;case 375:UG=xda,VG=UG+-8|0,WG=0|f[VG>>2],f[uda>>2]=WG;break;case 376:XG=xda,YG=0|f[XG>>2],f[uda>>2]=YG;break;case 377:ZG=xda,$G=ZG+-4|0,_G=0|f[$G>>2],f[uda>>2]=_G;break;case 378:aH=xda,cH=aH+-4|0,dH=0|f[cH>>2],f[uda>>2]=dH;break;case 379:eH=g,gm(eH);break;case 380:fH=g,gH=xda,hH=gH+-8|0,iH=0|f[hH>>2],jH=xda,kH=jH+-4|0,lH=0|f[kH>>2],nH=0|hm(fH,iH,lH),f[uda>>2]=nH,oH=g,im(oH);break;case 381:pH=xda,qH=pH+-4|0,rH=0|f[qH>>2],sH=0|f[rH>>2],tH=38==(0|sH),uH=g,tH?Yk(uH,59705):(vH=xda,wH=vH+-4|0,yH=0|f[wH>>2],zH=xda,AH=0|f[zH>>2],Em(uH,yH,AH)),BH=xda,CH=BH+-4|0,DH=0|f[CH>>2],f[uda>>2]=DH;break;case 382:EH=g,FH=xda,GH=FH+-12|0,HH=0|f[GH>>2],JH=xda,KH=JH+-4|0,LH=0|f[KH>>2],MH=xda,NH=0|f[MH>>2],OH=0|$l(EH,HH,LH,NH),f[uda>>2]=OH;break;case 383:PH=g,QH=xda,RH=QH+-16|0,SH=0|f[RH>>2],UH=xda,VH=UH+-8|0,WH=0|f[VH>>2],XH=xda,YH=XH+-4|0,ZH=0|f[YH>>2],$H=0|$l(PH,SH,WH,ZH),f[uda>>2]=$H,_H=g,aI=0|f[uda>>2],bI=xda,eI=0|f[bI>>2],Em(_H,aI,eI);break;case 384:fI=g,gI=xda,hI=gI+-16|0,iI=0|f[hI>>2],jI=xda,kI=jI+-8|0,lI=0|f[kI>>2],mI=xda,nI=mI+-4|0,pI=0|f[nI>>2],qI=0|$l(fI,iI,lI,pI),f[uda>>2]=qI,rI=g,sI=0|f[uda>>2],tI=xda,uI=0|f[tI>>2],Em(rI,sI,uI);break;case 385:vI=g,wI=xda,xI=wI+-4|0,yI=0|f[xI>>2],AI=xda,BI=0|f[AI>>2],CI=0|jm(vI,yI,BI),f[uda>>2]=CI;break;case 386:DI=g,EI=xda,FI=EI+-12|0,GI=0|f[FI>>2],HI=xda,II=HI+-4|0,JI=0|f[II>>2],LI=xda,MI=0|f[LI>>2],NI=0|$l(DI,GI,JI,MI),f[uda>>2]=NI;break;case 387:OI=g,PI=xda,QI=PI+-12|0,RI=0|f[QI>>2],SI=xda,TI=SI+-4|0,UI=0|f[TI>>2],WI=xda,XI=0|f[WI>>2],YI=0|$l(OI,RI,UI,XI),f[uda>>2]=YI;break;case 388:ZI=g,$I=xda,_I=$I+-8|0,aJ=0|f[_I>>2],bJ=xda,cJ=0|f[bJ>>2],dJ=0|$l(ZI,aJ,cJ,0),f[uda>>2]=dJ;break;case 389:fJ=g,gJ=xda,hJ=gJ+-8|0,iJ=0|f[hJ>>2],jJ=g,kJ=0|kl(jJ,69512,4),lJ=xda,mJ=0|f[lJ>>2],nJ=0|$l(fJ,iJ,kJ,mJ),f[uda>>2]=nJ;break;case 390:oJ=g,qJ=xda,rJ=qJ+-8|0,sJ=0|f[rJ>>2],tJ=g,uJ=0|kl(tJ,69512,4),vJ=xda,wJ=0|f[vJ>>2],xJ=0|$l(oJ,sJ,uJ,wJ),f[uda>>2]=xJ;break;case 391:yJ=g,zJ=xda,BJ=0|f[zJ>>2],CJ=0|mm(yJ,BJ),f[uda>>2]=CJ;break;case 392:DJ=g,EJ=0|Um(DJ),f[uda>>2]=EJ;break;case 393:FJ=g,GJ=xda,HJ=GJ+-12|0,IJ=0|f[HJ>>2],JJ=g,KJ=0|kl(JJ,68841,2),MJ=xda,NJ=MJ+-4|0,OJ=0|f[NJ>>2],PJ=0|$l(FJ,IJ,KJ,OJ),f[uda>>2]=PJ;break;case 394:QJ=g,gm(QJ),RJ=g,SJ=RJ+32|0,TJ=0|f[SJ>>2],f[uda>>2]=TJ;break;case 395:UJ=g,VJ=xda,XJ=VJ+-8|0,YJ=0|f[XJ>>2],ZJ=xda,$J=ZJ+-4|0,_J=0|f[$J>>2],aK=0|hm(UJ,YJ,_J),f[uda>>2]=aK,bK=xda,cK=bK+-12|0,dK=0|f[cK>>2],eK=65535&dK,hK=0|f[uda>>2],iK=hK+8|0,e[iK>>1]=eK,jK=g,im(jK);break;case 396:kK=g,gm(kK),lK=g,mK=lK+32|0,nK=0|f[mK>>2],f[uda>>2]=nK;break;case 397:oK=g,pK=xda,qK=pK+-8|0,sK=0|f[qK>>2],tK=xda,uK=tK+-4|0,vK=0|f[uK>>2],wK=0|hm(oK,sK,vK),f[uda>>2]=wK,xK=xda,yK=xK+-12|0,zK=0|f[yK>>2],AK=65535&zK,BK=0|f[uda>>2],DK=BK+8|0,e[DK>>1]=AK,EK=g,im(EK);break;case 398:FK=g,GK=g,HK=xda,IK=HK+-12|0,JK=0|f[IK>>2],KK=xda,LK=KK+-4|0,MK=0|f[LK>>2],OK=0|Jk(GK,JK,MK),PK=xda,QK=0|f[PK>>2],RK=0|Jk(FK,OK,QK),f[uda>>2]=RK;break;case 399:if(SK=xda,TK=0|f[SK>>2],UK=0!=(0|TK)){VK=g,WK=g,XK=xda,ZK=0|f[XK>>2],$K=0|Jk(WK,0,ZK),_K=0|Jk(VK,$K,0),f[uda>>2]=_K;break b}f[uda>>2]=0;break b;case 401:aL=g,bL=g,cL=xda,dL=cL+-16|0,eL=0|f[dL>>2],fL=xda,gL=fL+-12|0,iL=0|f[gL>>2],jL=xda,kL=jL+-4|0,lL=0|f[kL>>2],mL=0|xl(bL,eL,iL,lL),nL=0|Lk(aL,mL),f[uda>>2]=nL,oL=xda,pL=0|f[oL>>2],qL=0!=(0|pL),qL&&(rL=g,tL=0|f[uda>>2],uL=xda,vL=0|f[uL>>2],wL=0|Mk(rL,tL,vL),f[uda>>2]=wL);break;case 403:xL=g,yL=xda,zL=0|f[yL>>2],AL=0|Lk(xL,zL),f[uda>>2]=AL;break;case 406:BL=xda,CL=0|f[BL>>2],f[uda>>2]=CL;break;case 408:EL=xda,FL=0|f[EL>>2],f[uda>>2]=FL;break;case 416:GL=xda,HL=0|f[GL>>2],f[uda>>2]=HL;break;case 417:IL=g,JL=g,KL=xda,LL=KL+-4|0,ML=0|f[LL>>2],NL=g,PL=xda,QL=0|f[PL>>2],RL=0|Lk(NL,QL),SL=0|Mk(JL,ML,RL),TL=0|Vm(IL,SL),f[uda>>2]=TL;break;case 419:UL=g,VL=xda,WL=VL+-4|0,XL=0|f[WL>>2],YL=xda,$L=0|f[YL>>2],_L=0|Mk(UL,XL,$L),f[uda>>2]=_L;break;case 420:aM=g,bM=xda,cM=0|f[bM>>2],dM=0|Lk(aM,cM),f[uda>>2]=dM;break;case 421:eM=g,fM=eM+44|0,gM=0|f[fM>>2],f[uda>>2]=gM,hM=g,kM=hM+44|0,f[kM>>2]=0;break;case 422:lM=xda,mM=lM+-8|0,nM=0|f[mM>>2],oM=g,pM=oM+44|0,f[pM>>2]=nM,qM=g,rM=xda,sM=rM+-12|0,tM=0|f[sM>>2],vM=xda,wM=vM+-4|0,xM=0|f[wM>>2],yM=0|Kl(qM,tM,xM),f[uda>>2]=yM;break;case 423:zM=g,AM=g,BM=0|Wm(AM),CM=0|Lk(zM,BM),f[uda>>2]=CM;break;case 424:DM=g,EM=g,GM=0|Wm(EM),HM=0|Lk(DM,GM),f[uda>>2]=HM;break;case 425:IM=xda,JM=0|f[IM>>2],f[uda>>2]=JM;break;case 426:KM=g,LM=g,MM=xda,NM=MM+-4|0,OM=0|f[NM>>2],PM=g,RM=xda,SM=0|f[RM>>2],TM=0|Lk(PM,SM),UM=0|Mk(LM,OM,TM),VM=0|Xm(KM,UM),f[uda>>2]=VM;break;case 427:WM=xda,XM=0|f[WM>>2],f[uda>>2]=XM;break;case 428:YM=g,ZM=xda,$M=ZM+-4|0,aN=0|f[$M>>2],bN=xda,cN=0|f[bN>>2],dN=0|Ym(YM,aN,cN),f[uda>>2]=dN;break;case 434:eN=g,fN=0|Rk(eN),Pca=fN,gN=g,hN=Pca,iN=hN+16|0,jN=0|f[iN>>2],lN=g,mN=g,nN=0|_k(mN,75440,0),oN=0|Lk(lN,nN),pN=0|Mk(gN,jN,oN),qN=Pca,rN=qN+16|0,f[rN>>2]=pN,sN=g,Zm(sN);break;case 435:tN=g,Zm(tN);break;case 438:uN=g,wN=0|Rk(uN),Qca=wN,xN=g,yN=Qca,zN=yN+16|0,AN=0|f[zN>>2],BN=g,CN=xda,DN=0|f[CN>>2],EN=0|Lk(BN,DN),FN=0|Mk(xN,AN,EN),HN=Qca,IN=HN+16|0,f[IN>>2]=FN,JN=g,el(JN);break;case 439:KN=g,LN=KN+44|0,MN=0|f[LN>>2],f[uda>>2]=MN,NN=g,ON=NN+44|0,f[ON>>2]=0;break;case 440:PN=g,QN=0|Rk(PN),Rca=QN,SN=xda,TN=SN+-8|0,UN=0|f[TN>>2],VN=g,WN=VN+44|0,f[WN>>2]=UN,XN=g,YN=g,ZN=Rca,$N=ZN+16|0,_N=0|f[$N>>2],bO=g,cO=xda,dO=cO+-12|0,eO=0|f[dO>>2],fO=0|Lk(bO,eO),gO=0|Mk(YN,_N,fO),hO=g,iO=xda,jO=iO+-4|0,kO=0|f[jO>>2],nO=0|Lk(hO,kO),oO=0|Mk(XN,gO,nO),pO=Rca,qO=pO+16|0,f[qO>>2]=oO;break;case 441:rO=g,sO=g,tO=xda,uO=0|f[tO>>2],vO=0|Lk(sO,uO),wO=0|$m(rO,vO),f[uda>>2]=wO;break;case 442:yO=g,zO=g,AO=xda,BO=AO+-4|0,CO=0|f[BO>>2],DO=g,EO=xda,FO=0|f[EO>>2],GO=0|Lk(DO,FO),HO=0|Mk(zO,CO,GO),JO=0|$m(yO,HO),f[uda>>2]=JO;break;case 443:KO=g,LO=xda,MO=0|f[LO>>2],NO=0|_m(KO,MO),f[uda>>2]=NO;break;case 444:OO=g,PO=OO+40|0,f[PO>>2]=1,QO=g,RO=g,SO=xda,UO=SO+-4|0,VO=0|f[UO>>2],WO=g,XO=xda,YO=0|f[XO>>2],ZO=0|Lk(WO,YO),$O=0|Mk(RO,VO,ZO),_O=0|an(QO,$O),f[uda>>2]=_O;break;case 445:aP=g,bP=aP+40|0,f[bP>>2]=1,dP=xda,eP=0|f[dP>>2],f[uda>>2]=eP;break;case 450:fP=g,gP=xda,hP=0|f[gP>>2],iP=0|bn(fP,hP),f[uda>>2]=iP;break;case 451:jP=g,kP=xda,lP=0|f[kP>>2],mP=0|bn(jP,lP),f[uda>>2]=mP;break;case 452:oP=g,pP=g,qP=xda,rP=0|f[qP>>2],sP=0|Lk(pP,rP),tP=0|cn(oP,sP),f[uda>>2]=tP;break;case 453:uP=g,vP=g,wP=xda,xP=wP+-4|0,zP=0|f[xP>>2],AP=g,BP=xda,CP=0|f[BP>>2],DP=0|Lk(AP,CP),EP=0|Mk(vP,zP,DP),FP=0|cn(uP,EP),f[uda>>2]=FP;break;case 456:GP=g,HP=xda,IP=0|f[HP>>2],KP=0|dn(GP,IP),f[uda>>2]=KP;break;case 457:LP=g,MP=xda,NP=0|f[MP>>2],OP=0|dn(LP,NP),f[uda>>2]=OP;break;case 458:PP=g,QP=xda,RP=0|f[QP>>2],SP=0|en(PP,RP),f[uda>>2]=SP;break;case 459:TP=g,VP=xda,WP=0|f[VP>>2],XP=0|fn(TP,WP),f[uda>>2]=XP;break;case 460:YP=g,ZP=xda,$P=0|f[ZP>>2],_P=0|gn(YP,$P),f[uda>>2]=_P;break;case 461:aQ=g,bQ=xda,cQ=0|f[bQ>>2],eQ=0|hn(aQ,cQ),f[uda>>2]=eQ;break;case 462:fQ=g,gQ=xda,hQ=0|f[gQ>>2],iQ=0|jn(fQ,hQ),f[uda>>2]=iQ;break;case 463:jQ=g,kQ=xda,lQ=0|f[kQ>>2],sm(jQ,lQ);break;case 464:mQ=g,nQ=xda,rQ=0|f[nQ>>2],sQ=0|kn(mQ,rQ),f[uda>>2]=sQ;break;case 465:tQ=g,uQ=0|Ql(tQ),f[uda>>2]=uQ;break;case 466:vQ=g,wQ=0|km(vQ),f[uda>>2]=wQ;break;case 467:xQ=g,yQ=0|ln(xQ),f[uda>>2]=yQ;break;case 468:zQ=g,AQ=0|mn(zQ),f[uda>>2]=AQ;break;case 469:CQ=g,DQ=CQ+28|0,EQ=0|f[DQ>>2],FQ=0!=(0|EQ),FQ||(GQ=g,HQ=GQ+28|0,f[HQ>>2]=72338),IQ=g,JQ=g,KQ=JQ+28|0,LQ=0|f[KQ>>2],NQ=g,OQ=NQ+28|0,PQ=0|f[OQ>>2],QQ=0|Jv(PQ),RQ=0|_k(IQ,LQ,QQ),f[uda>>2]=RQ;break;case 470:SQ=g,TQ=SQ+32|0,UQ=0|f[TQ>>2],f[Yca>>2]=UQ,0|Kv(Oca,16,59726,Yca),VQ=g,WQ=0|vl(VQ,Oca,10),f[uda>>2]=WQ;break;case 473:f[uda>>2]=0;break;case 474:YQ=g,ZQ=YQ+40|0,f[ZQ>>2]=0,$Q=g,_Q=$Q+72|0,aR=0|d[_Q>>0],bR=aR&-2,cR=1|bR,d[_Q>>0]=cR;break;case 475:dR=xda,eR=dR+-4|0,fR=0|f[eR>>2],f[uda>>2]=fR;break;case 476:hR=xda,iR=hR+-4|0,jR=0|f[iR>>2],f[uda>>2]=jR,kR=g,lR=kR+40|0,f[lR>>2]=0,mR=g,nR=mR+72|0,oR=0|d[nR>>0],pR=oR&-2,qR=1|pR,d[nR>>0]=qR;break;case 477:sR=xda,tR=sR+-4|0,uR=0|f[tR>>2],f[uda>>2]=uR;break;case 478:vR=g,wR=xda,xR=wR+-20|0,yR=0|f[xR>>2],zR=xda,AR=zR+-12|0,BR=0|f[AR>>2],DR=xda,ER=DR+-4|0,FR=0|f[ER>>2],GR=xda,HR=0|f[GR>>2],IR=0|Sm(vR,yR,BR,FR,0,HR),f[uda>>2]=IR;break;case 479:JR=g,KR=xda,LR=KR+-28|0,MR=0|f[LR>>2],OR=xda,PR=OR+-20|0,QR=0|f[PR>>2],RR=xda,SR=RR+-12|0,TR=0|f[SR>>2],UR=xda,VR=UR+-4|0,WR=0|f[VR>>2],XR=xda,ZR=0|f[XR>>2],$R=0|Sm(JR,MR,QR,TR,WR,ZR),f[uda>>2]=$R;break;case 480:_R=g,aS=xda,bS=aS+-12|0,cS=0|f[bS>>2],dS=xda,eS=dS+-4|0,fS=0|f[eS>>2],gS=xda,iS=0|f[gS>>2],jS=0|Sm(_R,cS,fS,0,0,iS),f[uda>>2]=jS;break;case 481:kS=g,lS=xda,mS=lS+-20|0,nS=0|f[mS>>2],oS=xda,pS=oS+-12|0,qS=0|f[pS>>2],rS=xda,uS=rS+-4|0,vS=0|f[uS>>2],wS=xda,xS=0|f[wS>>2],yS=0|Sm(kS,nS,qS,0,vS,xS),f[uda>>2]=yS;break;case 482:zS=g,AS=xda,BS=AS+-12|0,CS=0|f[BS>>2],DS=xda,FS=DS+-4|0,GS=0|f[FS>>2],HS=xda,IS=0|f[HS>>2],JS=0|Sm(zS,CS,0,GS,0,IS),f[uda>>2]=JS;break;case 483:KS=g,LS=xda,MS=LS+-20|0,NS=0|f[MS>>2],OS=xda,QS=OS+-12|0,RS=0|f[QS>>2],SS=xda,TS=SS+-4|0,US=0|f[TS>>2],VS=xda,WS=0|f[VS>>2],XS=0|Sm(KS,NS,0,RS,US,WS),f[uda>>2]=XS;break;case 484:YS=g,ZS=xda,_S=ZS+-4|0,aT=0|f[_S>>2],bT=xda,cT=0|f[bT>>2],dT=0|Sm(YS,aT,0,0,0,cT),f[uda>>2]=dT;break;case 485:eT=g,fT=xda,gT=fT+-12|0,hT=0|f[gT>>2],iT=xda,kT=iT+-4|0,lT=0|f[kT>>2],mT=xda,nT=0|f[mT>>2],oT=0|Sm(eT,0,hT,lT,0,nT),f[uda>>2]=oT;break;case 486:pT=g,qT=xda,rT=qT+-20|0,sT=0|f[rT>>2],tT=xda,vT=tT+-12|0,wT=0|f[vT>>2],xT=xda,yT=xT+-4|0,zT=0|f[yT>>2],AT=xda,BT=0|f[AT>>2],CT=0|Sm(pT,0,sT,wT,zT,BT),f[uda>>2]=CT;break;case 487:DT=g,ET=xda,GT=ET+-4|0,HT=0|f[GT>>2],IT=xda,JT=0|f[IT>>2],KT=0|Sm(DT,0,HT,0,0,JT),f[uda>>2]=KT;break;case 488:LT=g,MT=xda,NT=MT+-12|0,OT=0|f[NT>>2],PT=xda,RT=PT+-4|0,ST=0|f[RT>>2],TT=xda,UT=0|f[TT>>2],VT=0|Sm(LT,0,OT,0,ST,UT),f[uda>>2]=VT;break;case 489:WT=g,XT=xda,YT=XT+-4|0,ZT=0|f[YT>>2],$T=xda,aU=0|f[$T>>2],bU=0|Sm(WT,0,0,ZT,0,aU),f[uda>>2]=bU;break;case 490:cU=g,dU=xda,eU=dU+-12|0,fU=0|f[eU>>2],gU=xda,hU=gU+-4|0,iU=0|f[hU>>2],jU=xda,lU=0|f[jU>>2],mU=0|Sm(cU,0,0,fU,iU,lU),f[uda>>2]=mU;break;case 491:nU=g,oU=xda,pU=0|f[oU>>2],qU=0|Sm(nU,0,0,0,0,pU),f[uda>>2]=qU;break;case 492:rU=g,Kk(rU,0),sU=g,tU=0|Sm(sU,0,0,0,0,0),f[uda>>2]=tU;break;case 493:uU=g,Yk(uU,59729),f[uda>>2]=0;break;case 494:xU=g,Yk(xU,59766),f[uda>>2]=0;break;case 495:yU=g,Yk(yU,59813),f[uda>>2]=0;break;case 496:zU=g,Yk(zU,59857),f[uda>>2]=0;break;case 497:f[uda>>2]=0;break;case 498:AU=g,BU=xda,CU=0|f[BU>>2],Kk(AU,CU),DU=xda,EU=0|f[DU>>2],f[uda>>2]=EU;break;case 499:FU=g,GU=xda,IU=0|f[GU>>2],JU=0|Rm(FU,IU),f[uda>>2]=JU;break;case 500:KU=g,LU=xda,MU=LU+-4|0,NU=0|f[MU>>2],OU=0|Yl(KU,NU,0),f[uda>>2]=OU;break;case 501:PU=g,QU=xda,RU=0|f[QU>>2],TU=0|Lk(PU,RU),f[uda>>2]=TU;break;case 502:UU=g,VU=xda,WU=VU+-8|0,XU=0|f[WU>>2],YU=g,ZU=xda,$U=0|f[ZU>>2],_U=0|Lk(YU,$U),aV=0|Mk(UU,XU,_U),f[uda>>2]=aV;break;case 503:cV=g,dV=xda,eV=dV+-4|0,fV=0|f[eV>>2],Kk(cV,fV),gV=xda,hV=gV+-4|0,iV=0|f[hV>>2],f[uda>>2]=iV;break;case 504:jV=g,kV=xda,lV=kV+-4|0,nV=0|f[lV>>2],oV=nV,pV=xda,qV=0|f[pV>>2],rV=0|Jk(jV,oV,qV),f[uda>>2]=rV;break;case 505:sV=g,tV=xda,uV=tV+-4|0,vV=0|f[uV>>2],wV=vV,yV=xda,zV=0|f[yV>>2],AV=0|Jk(sV,wV,zV),f[uda>>2]=AV;break;case 506:BV=g,CV=xda,DV=0|f[CV>>2],EV=0|Lk(BV,DV),f[uda>>2]=EV;break;case 507:FV=g,GV=xda,HV=GV+-8|0,JV=0|f[HV>>2],KV=g,LV=xda,MV=0|f[LV>>2],NV=0|Lk(KV,MV),OV=0|Mk(FV,JV,NV),f[uda>>2]=OV;break;case 508:PV=g,QV=xda,RV=0|f[QV>>2],SV=0|Lk(PV,RV),f[uda>>2]=SV;break;case 509:UV=g,VV=xda,WV=VV+-8|0,XV=0|f[WV>>2],YV=g,ZV=xda,$V=0|f[ZV>>2],_V=0|Lk(YV,$V),aW=0|Mk(UV,XV,_V),f[uda>>2]=aW;break;case 512:bW=g,dW=xda,eW=0|f[dW>>2],Kk(bW,eW),fW=xda,gW=0|f[fW>>2],f[uda>>2]=gW;break;case 513:hW=g,Kk(hW,0),f[uda>>2]=-1;break;case 516:iW=g,jW=xda,kW=0|f[jW>>2],Kk(iW,kW),lW=xda,mW=0|f[lW>>2],f[uda>>2]=mW;break;case 517:oW=xda,pW=0|f[oW>>2],f[uda>>2]=pW;break;case 518:qW=g,Kk(qW,0),f[uda>>2]=0;break;case 519:rW=xda,sW=0|f[rW>>2],f[uda>>2]=sW,tW=0|f[uda>>2],uW=0!=(0|tW),uW||(vW=g,wW=0|Ql(vW),f[uda>>2]=wW);break;case 520:xW=g,AW=xW+40|0,f[AW>>2]=0;break;case 521:BW=xda,CW=BW+-4|0,DW=0|f[CW>>2],EW=0==(0|DW);c:do if(EW)FW=g,Yk(FW,59900);else{switch(GW=xda,HW=GW+-4|0,IW=0|f[HW>>2],JW=0|f[IW>>2],LW=JW,0|LW){case 99:case 34:case 51:case 47:case 60:case 58:case 57:case 56:case 55:break;default:break c}MW=g,Yk(MW,59938)}while(0);NW=xda,OW=NW+-4|0,PW=0|f[OW>>2],f[uda>>2]=PW;break;case 523:QW=xda,RW=QW+-4|0,SW=0|f[RW>>2],f[uda>>2]=SW;break;case 524:TW=g,UW=xda,WW=0|f[UW>>2],XW=0|Lk(TW,WW),f[uda>>2]=XW,YW=xda,ZW=0|f[YW>>2],$W=0!=(0|ZW),$W&&(_W=xda,aX=0|f[_W>>2],bX=aX+10|0,cX=0|e[bX>>1],dX=0|f[uda>>2],fX=dX+10|0,e[fX>>1]=cX,gX=xda,hX=0|f[gX>>2],iX=hX+8|0,jX=0|e[iX>>1],kX=0|f[uda>>2],lX=kX+8|0,e[lX>>1]=jX);break;case 525:mX=g,nX=xda,oX=nX+-8|0,qX=0|f[oX>>2],rX=g,sX=xda,tX=0|f[sX>>2],uX=0|Lk(rX,tX),vX=0|Mk(mX,qX,uX),f[uda>>2]=vX;break;case 526:wX=g,xX=xda,yX=xX+-8|0,zX=0|f[yX>>2],BX=xda,CX=0|f[BX>>2],DX=0|Jk(wX,zX,CX),f[uda>>2]=DX;break;case 527:EX=g,FX=g,GX=xda,HX=GX+-4|0,IX=0|f[HX>>2],JX=0|_m(FX,IX),KX=xda,MX=0|f[KX>>2],NX=0|Jk(EX,JX,MX),f[uda>>2]=NX;break;case 549:_ca=0;break;case 551:OX=g,PX=OX+32|0,QX=0|f[PX>>2],RX=QX+1|0,f[PX>>2]=RX,SX=g,TX=SX+36|0,f[TX>>2]=0;break;case 554:_ca=0;break;case 555:f[uda>>2]=0}while(0);if(UX=ada,VX=xda,XX=0-UX|0,YX=VX+(XX<<2)|0,xda=YX,ZX=ada,$X=qda,_X=0-ZX|0,aY=$X+(_X<<1)|0,qda=aY,ada=0,bY=xda,cY=bY+4|0,xda=cY,f[cY>>2]=0|f[uda>>2],dY=fda,eY=49476+(dY<<1)|0,gY=0|e[eY>>1],hY=65535&gY,fda=hY,iY=fda,jY=iY-144|0,kY=50588+(jY<<1)|0,lY=0|e[kY>>1],mY=lY<<16>>16,nY=qda,oY=0|e[nY>>1],pY=oY<<16>>16,rY=mY+pY|0,sda=rY,sY=sda,tY=0<=(0|sY),uY=sda,vY=(0|uY)<=10639,Vca=tY&vY,Vca&&(wY=sda,xY=4980+(wY<<1)|0,yY=0|e[xY>>1],zY=yY<<16>>16,AY=qda,DY=0|e[AY>>1],EY=DY<<16>>16,FY=(0|zY)==(0|EY))){GY=sda,HY=26260+(GY<<1)|0,IY=0|e[HY>>1],JY=IY<<16>>16,sda=JY;break}KY=fda,LY=KY-144|0,MY=50910+(LY<<1)|0,OY=0|e[MY>>1],PY=OY<<16>>16,sda=PY}else if(510==(0|yda)){yda=0,QY=_ca,RY=0!=(0|QY);do if(!RY){SY=gda,TY=SY+1|0,gda=TY,UY=sda,VY=$ca,WY=0|nn(0,UY,VY),mda=WY,XY=dda,ZY=mda,$Y=XY>>>0<ZY>>>0,_Y=dda,aZ=_Y>>>0<4294967295,Wca=$Y&aZ;do if(Wca){if(bZ=mda,cZ=bZ<<1,Zca=cZ,dZ=mda,eZ=Zca,fZ=dZ>>>0<=eZ>>>0,gZ=Zca,iZ=gZ>>>0<=4294967295,Xca=fZ&iZ,c=Xca?cZ:-1,Zca=c,jZ=cda,kZ=(0|jZ)!=(0|eda),kZ&&(lZ=g,mZ=0|f[lZ>>2],nZ=cda,Dc(mZ,nZ)),oZ=g,pZ=0|f[oZ>>2],qZ=Zca,rZ=0|Jc(pZ,qZ),cda=rZ,tZ=cda,uZ=0!=(0|tZ)){vZ=Zca,dda=vZ;break}cda=eda,dda=128;break}while(0);if(wZ=mda,xZ=0<wZ>>>0,xZ&&(yZ=mda,zZ=dda,AZ=yZ>>>0<=zZ>>>0)){BZ=cda,CZ=sda,EZ=$ca,0|nn(BZ,CZ,EZ),FZ=g,GZ=cda,Yk(FZ,GZ);break}if(HZ=g,Yk(HZ,62760),IZ=mda,JZ=0!=(0|IZ)){yda=535;break a}}while(0);KZ=_ca,LZ=3==(0|KZ);do if(LZ){if(MZ=$ca,NZ=(0|MZ)<=0){if(PZ=$ca,QZ=0==(0|PZ)){yda=534;break a}break}RZ=tda,SZ=g,rn(62773,RZ,bda,SZ),$ca=-2;break}while(0);for(_ca=3;;){if(TZ=sda,UZ=3044+(TZ<<1)|0,VZ=0|e[UZ>>1],WZ=VZ<<16>>16,fda=WZ,XZ=fda,YZ=(0|XZ)!=-771,YZ&&($Z=fda,_Z=$Z+1|0,fda=_Z,a$=fda,b$=0<=(0|a$),c$=fda,d$=(0|c$)<=10639,Tca=b$&d$,Tca&&(e$=fda,f$=4980+(e$<<1)|0,g$=0|e[f$>>1],h$=g$<<16>>16,j$=1==(0|h$),j$&&(k$=fda,l$=26260+(k$<<1)|0,m$=0|e[l$>>1],n$=m$<<16>>16,fda=n$,o$=fda,p$=0<(0|o$)))))break;if(q$=qda,r$=nda,s$=(0|q$)==(0|r$)){yda=534;break a}u$=sda,v$=51232+(u$<<1)|0,w$=0|e[v$>>1],x$=65535&w$,y$=xda,z$=g,rn(62800,x$,y$,z$),A$=xda,B$=A$+-4|0,xda=B$,C$=qda,D$=C$+-2|0,qda=D$,G$=qda,H$=0|e[G$>>1],I$=H$<<16>>16,sda=I$}J$=xda,K$=J$+4|0,xda=K$,f[K$>>2]=0|f[bda>>2],L$=fda,sda=L$}while(0);oQ=qda,w0=oQ+2|0,qda=w0}for(533==(0|yda)?kda=0:534==(0|yda)?kda=1:535==(0|yda)&&(M$=g,Yk(M$,62815),kda=2),N$=$ca,O$=(0|N$)!=-2,O$&&(P$=tda,R$=g,rn(62832,P$,bda,R$)),S$=ada,T$=xda,U$=0-S$|0,V$=T$+(U$<<2)|0,xda=V$,W$=ada,X$=qda,Y$=0-W$|0,Z$=X$+(Y$<<1)|0,qda=Z$;;){if($$=qda,a_=nda,b_=(0|$$)!=(0|a_),!b_)break;c_=qda,d_=0|e[c_>>1],e_=d_<<16>>16,f_=51232+(e_<<1)|0,g_=0|e[f_>>1],h_=65535&g_,i_=xda,j_=g,rn(62862,h_,i_,j_),l_=xda,m_=l_+-4|0,xda=m_,n_=qda,o_=n_+-2|0,qda=o_}return p_=nda,q_=(0|p_)!=(0|pda),q_&&(r_=g,s_=0|f[r_>>2],t_=nda,Dc(s_,t_)),u_=cda,(w_=(0|u_)!=(0|eda))?(x_=g,y_=0|f[x_>>2],z_=cda,Dc(y_,z_),A_=kda,l=zda,0|A_):(A_=kda,l=zda,0|A_)}function Ok(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;return n=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,g=d,h=g+1132|0,f[h>>2]=e,i=d,j=0|Pk(i),l=n,0|j}function Pk(a){a|=0;var b=0,c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0,wf=0,xf=0,yf=0,zf=0,Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0,Gf=0,Hf=0,If=0,Jf=0,Kf=0,Lf=0,Mf=0,Nf=0,Of=0,Pf=0,Qf=0,Rf=0,Sf=0,Tf=0,Uf=0,Vf=0,Wf=0,Xf=0,Yf=0,Zf=0,$f=0,_f=0,ag=0,bg=0,cg=0,dg=0,eg=0,fg=0,gg=0,hg=0,ig=0,jg=0,kg=0,lg=0,mg=0,ng=0,og=0,pg=0,qg=0,rg=0,sg=0,tg=0,ug=0,vg=0,wg=0,xg=0,yg=0,zg=0,Ag=0,Bg=0,Cg=0,Dg=0,Eg=0,Fg=0,Gg=0,Hg=0,Ig=0,Jg=0,Kg=0,Lg=0,Mg=0,Ng=0,Og=0,Pg=0,Qg=0,Rg=0,Sg=0,Tg=0,Ug=0,Vg=0,Wg=0,Xg=0,Yg=0,Zg=0,$g=0,_g=0,ah=0,bh=0,ch=0,dh=0,eh=0,fh=0,gh=0,hh=0,ih=0,jh=0,kh=0,lh=0,mh=0,nh=0,oh=0,ph=0,qh=0,rh=0,sh=0,th=0,uh=0,vh=0,wh=0,xh=0,yh=0,zh=0,Ah=0,Bh=0,Ch=0,Dh=0,Eh=0,Fh=0,Gh=0,Hh=0,Ih=0,Jh=0,Kh=0,Lh=0,Mh=0,Nh=0,Oh=0,Ph=0,Qh=0,Rh=0,Sh=0,Th=0,Uh=0,Vh=0,Wh=0,Xh=0,Yh=0,Zh=0,$h=0,_h=0,ai=0,bi=0,ci=0,di=0,ei=0,fi=0,gi=0,hi=0,ii=0,ji=0,ki=0,li=0,mi=0,ni=0,oi=0,pi=0,qi=0,ri=0,si=0,ti=0,ui=0,vi=0,wi=0,xi=0,yi=0,zi=0,Ai=0,Bi=0,Ci=0,Di=0,Ei=0,Fi=0,Gi=0,Hi=0,Ii=0,Ji=0,Ki=0,Li=0,Mi=0,Ni=0,Oi=0,Pi=0,Qi=0,Ri=0,Si=0,Ti=0,Ui=0,Vi=0,Wi=0,Xi=0,Yi=0,Zi=0,$i=0,_i=0,aj=0,bj=0,cj=0,dj=0,ej=0,fj=0,gj=0,hj=0,ij=0,jj=0,kj=0,lj=0,mj=0,nj=0,oj=0,pj=0,qj=0,rj=0,sj=0,tj=0,uj=0,vj=0,wj=0,xj=0,yj=0,zj=0,Aj=0,Bj=0,Cj=0,Dj=0,Ej=0,Fj=0,Gj=0,Hj=0,Ij=0,Jj=0,Kj=0,Lj=0,Mj=0,Nj=0,Oj=0,Pj=0,Qj=0,Rj=0,Sj=0,Tj=0,Uj=0,Vj=0,Wj=0,Xj=0,Yj=0,Zj=0,$j=0,_j=0,ak=0,bk=0,ck=0,dk=0,ek=0,fk=0,gk=0,hk=0,ik=0,jk=0,kk=0,lk=0,mk=0,nk=0,ok=0,pk=0,qk=0,rk=0,sk=0,tk=0,uk=0,vk=0,wk=0,xk=0,yk=0,zk=0,Ak=0,Bk=0,Ck=0,Dk=0,Ek=0,Fk=0,Gk=0,Hk=0,Ik=0,Jk=0,Kk=0,Lk=0,Mk=0,Nk=0,Ok=0,Pk=0,Rk=0,Uk=0,al=0,cl=0,dl=0,gl=0,hl=0,il=0,nl=0,tl=0,wl=0,xl=0,Gl=0,Hl=0,Il=0,Jl=0,Kl=0,Ll=0,Ml=0,Nl=0,Ol=0,Pl=0,Ql=0,Rl=0,Sl=0,Tl=0,Ul=0,Vl=0,Wl=0,Xl=0,Yl=0,Zl=0,$l=0,_l=0,am=0,bm=0,cm=0,dm=0,em=0,fm=0,gm=0,hm=0,im=0,jm=0,km=0,lm=0,mm=0,nm=0,om=0,pm=0,qm=0,rm=0,sm=0,tm=0,um=0,vm=0,wm=0,xm=0,ym=0,zm=0,Am=0,Bm=0,Cm=0,Dm=0,Em=0,Fm=0,Gm=0,Hm=0,Im=0,Jm=0,Km=0,Lm=0,Mm=0,Nm=0,Om=0,Pm=0,Qm=0,Rm=0,Sm=0,Tm=0,Um=0,Vm=0,Wm=0,Xm=0,Ym=0,Zm=0,$m=0,_m=0,an=0,bn=0,cn=0,dn=0,en=0,fn=0,gn=0,hn=0,jn=0,kn=0,ln=0,mn=0,nn=0,on=0,pn=0,qn=0,rn=0,sn=0,tn=0,un=0,vn=0,wn=0,xn=0,yn=0,zn=0,An=0,Bn=0,Cn=0,Dn=0,En=0,Fn=0,Gn=0,Hn=0,In=0,Jn=0,Kn=0,Ln=0,Mn=0,Nn=0,On=0,Pn=0,Qn=0,Rn=0,Sn=0,Tn=0,Un=0,Vn=0,Wn=0,Xn=0,Yn=0,Zn=0,$n=0,_n=0,ao=0,bo=0,co=0,eo=0,fo=0,go=0,ho=0,io=0,jo=0,ko=0,lo=0,mo=0,no=0,oo=0,po=0,qo=0,ro=0,so=0,to=0,uo=0,vo=0,wo=0,xo=0,yo=0,zo=0,Ao=0,Bo=0,Co=0,Do=0,Eo=0,Fo=0,Go=0,Ho=0,Io=0,Jo=0,Ko=0,Lo=0,Mo=0,No=0,Oo=0,Po=0,Qo=0,Ro=0,So=0,To=0,Uo=0,Vo=0,Wo=0,Xo=0,Yo=0,Zo=0,$o=0,_o=0,ap=0,bp=0,cp=0,dp=0,ep=0,fp=0,gp=0,hp=0,ip=0,jp=0,kp=0,lp=0,mp=0,np=0,op=0,pp=0,qp=0,rp=0,sp=0,tp=0,up=0,vp=0,wp=0,xp=0,yp=0,zp=0,Ap=0,Bp=0,Cp=0,Dp=0,Ep=0,Fp=0,Gp=0,Hp=0,Ip=0,Jp=0,Kp=0,Lp=0,Mp=0,Np=0,Op=0,Pp=0,Qp=0,Rp=0,Sp=0,Tp=0,Up=0,Vp=0,Wp=0,Xp=0,Yp=0,Zp=0,$p=0,_p=0,aq=0,bq=0,cq=0,dq=0,eq=0,fq=0,gq=0,hq=0,iq=0,jq=0,kq=0,lq=0,mq=0,nq=0,oq=0,pq=0,qq=0,rq=0,sq=0,tq=0,uq=0,vq=0,wq=0,xq=0,yq=0,zq=0,Aq=0,Bq=0,Cq=0,Dq=0,Eq=0,Fq=0,Gq=0,Hq=0,Iq=0,Jq=0,Kq=0,Lq=0,Mq=0,Nq=0,Oq=0,Pq=0,Qq=0,Rq=0,Sq=0,Tq=0,Uq=0,Vq=0,Wq=0,Xq=0,Yq=0,Zq=0,$q=0,_q=0,ar=0,br=0,cr=0,dr=0,er=0,fr=0,gr=0,hr=0,ir=0,jr=0,kr=0,lr=0,mr=0,nr=0,or=0,pr=0,qr=0,rr=0,sr=0,tr=0,ur=0,vr=0,wr=0,xr=0,yr=0,zr=0,Ar=0,Br=0,Cr=0,Dr=0,Er=0,Fr=0,Gr=0,Hr=0,Ir=0,Jr=0,Kr=0,Lr=0,Mr=0,Nr=0,Or=0,Pr=0,Qr=0,Rr=0,Sr=0,Tr=0,Ur=0,Vr=0,Wr=0,Xr=0,Yr=0,Zr=0,$r=0,_r=0,as=0,bs=0,cs=0,ds=0,es=0,fs=0,gs=0,hs=0,is=0,js=0,ks=0,ls=0,ms=0,ns=0,os=0,ps=0,qs=0,rs=0,ss=0,ts=0,us=0,vs=0,ws=0,xs=0,ys=0,zs=0,As=0,Bs=0,Cs=0,Ds=0,Es=0,Fs=0,Gs=0,Hs=0,Is=0,Js=0,Ks=0,Ls=0,Ms=0,Ns=0,Os=0,Ps=0,Qs=0,Rs=0,Ss=0,Ts=0,Us=0,Vs=0,Ws=0,Xs=0,Ys=0,Zs=0,$s=0,_s=0,at=0,bt=0,ct=0,dt=0,et=0,ft=0,gt=0,ht=0,it=0,jt=0,kt=0,lt=0,mt=0,nt=0,ot=0,pt=0,qt=0,rt=0,st=0,tt=0,ut=0,vt=0,wt=0,xt=0,yt=0,zt=0,At=0,Bt=0,Ct=0,Dt=0,Et=0,Ft=0,Gt=0,Ht=0,It=0,Jt=0,Kt=0,Lt=0,Mt=0,Nt=0,Ot=0,Pt=0,Qt=0,Rt=0,St=0,Tt=0,Ut=0,Vt=0,Wt=0,Xt=0,Yt=0,Zt=0,$t=0,_t=0,au=0,bu=0,cu=0,du=0,eu=0,fu=0,gu=0,hu=0,iu=0,ju=0,ku=0,lu=0,mu=0,nu=0,ou=0,pu=0,qu=0,ru=0,su=0,tu=0,uu=0,vu=0,wu=0,xu=0,yu=0,zu=0,Au=0,Bu=0,Cu=0,Du=0,Eu=0,Fu=0,Gu=0,Hu=0,Iu=0,Ju=0,Ku=0,Lu=0,Mu=0,Nu=0,Ou=0,Qu=0,Ru=0,Su=0,Tu=0,Uu=0,Vu=0,Wu=0,Yu=0,Zu=0,$u=0,_u=0,av=0,bv=0,cv=0,dv=0,fv=0,gv=0,iv=0,jv=0,kv=0,lv=0,mv=0,nv=0,ov=0,pv=0,qv=0,rv=0,sv=0,tv=0,uv=0,vv=0,wv=0,xv=0,yv=0,Av=0,Cv=0,Dv=0,Ev=0,Fv=0,Gv=0,Hv=0,Iv=0,Jv=0,Lv=0,Mv=0,Nv=0,Ov=0,Pv=0,Qv=0,Rv=0,Sv=0,Tv=0,Uv=0,Vv=0,Wv=0,Xv=0,Yv=0,Zv=0,$v=0,_v=0,aw=0,bw=0,dw=0,ew=0,fw=0,gw=0,hw=0,iw=0,jw=0,kw=0,lw=0,mw=0,nw=0,ow=0,pw=0,qw=0,rw=0,sw=0,tw=0,uw=0,vw=0,ww=0,xw=0,yw=0,zw=0,Aw=0,Bw=0,Cw=0,Dw=0,Ew=0,Fw=0,Gw=0,Hw=0,Iw=0,Jw=0,Kw=0,Lw=0,Mw=0,Nw=0,Ow=0,Pw=0,Qw=0,Rw=0,Sw=0,Tw=0,Uw=0,Vw=0,Ww=0,Xw=0,Yw=0,Zw=0,$w=0,_w=0,ax=0,bx=0,cx=0,dx=0,ex=0,fx=0,gx=0,hx=0,ix=0,jx=0,kx=0,lx=0,mx=0,nx=0,ox=0,px=0,qx=0,rx=0,sx=0,tx=0,ux=0,vx=0,wx=0,xx=0,yx=0,zx=0,Ax=0,Bx=0,Cx=0,Dx=0,Ex=0,Fx=0,Gx=0,Hx=0,Ix=0,Jx=0,Kx=0,Lx=0,Mx=0,Nx=0,Ox=0,Px=0,Qx=0,Rx=0,Sx=0,Tx=0,Ux=0,Vx=0,Wx=0,Xx=0,Yx=0,Zx=0,$x=0,_x=0,ay=0,by=0,cy=0,dy=0,ey=0,fy=0,gy=0,hy=0,iy=0,jy=0,ky=0,ly=0,my=0,ny=0,oy=0,py=0,qy=0,ry=0,sy=0,ty=0,uy=0,vy=0,wy=0,xy=0,yy=0,zy=0,Ay=0,By=0,Cy=0,Dy=0,Ey=0,Fy=0,Gy=0,Hy=0,Iy=0,Jy=0,Ky=0,Ly=0,My=0,Ny=0,Oy=0,Py=0,Qy=0,Ry=0,Sy=0,Ty=0,Uy=0,Vy=0,Wy=0,Xy=0,Yy=0,Zy=0,$y=0,_y=0,az=0,bz=0,cz=0,dz=0,ez=0,fz=0,gz=0,hz=0,iz=0,jz=0,kz=0,lz=0,mz=0,nz=0,oz=0,pz=0,qz=0,rz=0,sz=0,tz=0,uz=0,vz=0,wz=0,xz=0,yz=0,zz=0,Az=0,Bz=0,Cz=0,Dz=0,Ez=0,Fz=0,Gz=0,Hz=0,Iz=0,Jz=0,Kz=0,Lz=0,Mz=0,Nz=0,Oz=0,Pz=0,Qz=0,Rz=0,Sz=0,Tz=0,Uz=0,Vz=0,Wz=0,Xz=0,Yz=0,Zz=0,$z=0,_z=0,aA=0,bA=0,cA=0,dA=0,eA=0,fA=0,gA=0,hA=0,iA=0,jA=0,kA=0,lA=0,mA=0,nA=0,oA=0,pA=0,qA=0,rA=0,sA=0,tA=0,uA=0,vA=0,wA=0,xA=0,yA=0,zA=0,AA=0,BA=0,CA=0,DA=0,EA=0,FA=0,GA=0,HA=0,IA=0,JA=0,KA=0,LA=0,MA=0,NA=0,OA=0,PA=0,QA=0,RA=0,SA=0,TA=0,UA=0,VA=0,WA=0,XA=0,YA=0,ZA=0,$A=0,_A=0,aB=0,bB=0,cB=0,dB=0,eB=0,fB=0,gB=0,hB=0,iB=0,jB=0,kB=0,lB=0,mB=0,nB=0,oB=0,pB=0,qB=0,rB=0,sB=0,tB=0,uB=0,vB=0,wB=0,xB=0,yB=0,zB=0,AB=0,BB=0,CB=0,DB=0,EB=0,FB=0,GB=0,HB=0,IB=0,JB=0,KB=0,LB=0,MB=0,NB=0,OB=0,PB=0,QB=0,RB=0,SB=0,TB=0,UB=0,VB=0,WB=0,XB=0,YB=0,ZB=0,$B=0,_B=0,aC=0,bC=0,cC=0,dC=0,eC=0,fC=0,gC=0,hC=0,iC=0,jC=0,kC=0,lC=0,mC=0,nC=0,oC=0,pC=0,qC=0,rC=0,sC=0,tC=0,uC=0,vC=0,wC=0,xC=0,yC=0,zC=0,AC=0,BC=0,CC=0,DC=0,EC=0,FC=0,GC=0,HC=0,IC=0,JC=0,KC=0,LC=0,MC=0,NC=0,OC=0,PC=0,QC=0,RC=0,SC=0,TC=0,UC=0,VC=0,WC=0,XC=0,YC=0,ZC=0,$C=0,_C=0,aD=0,bD=0,cD=0,dD=0,eD=0,fD=0,gD=0,hD=0,iD=0,jD=0,kD=0,lD=0,mD=0,nD=0,oD=0,pD=0,qD=0,rD=0,sD=0,tD=0,uD=0,vD=0,wD=0,xD=0,yD=0,zD=0,AD=0,BD=0,CD=0,DD=0,ED=0,FD=0,GD=0,HD=0,ID=0,JD=0,KD=0,LD=0,MD=0,ND=0,OD=0,PD=0,QD=0,RD=0,SD=0,TD=0,UD=0,VD=0,WD=0,XD=0,YD=0,ZD=0,$D=0,_D=0,aE=0,bE=0,cE=0,dE=0,eE=0,fE=0,gE=0,hE=0,iE=0,jE=0,kE=0,lE=0,mE=0,nE=0,oE=0,pE=0,qE=0,rE=0,sE=0,tE=0,uE=0,vE=0,wE=0,xE=0,yE=0,zE=0,AE=0,BE=0,CE=0,DE=0,EE=0,FE=0,GE=0,HE=0,IE=0,JE=0,KE=0,LE=0,ME=0,NE=0,OE=0,PE=0,QE=0,RE=0,SE=0,TE=0,UE=0,VE=0,WE=0,XE=0,YE=0,ZE=0,$E=0,_E=0,aF=0,bF=0,cF=0,dF=0,eF=0,fF=0,gF=0,hF=0,iF=0,jF=0,kF=0,lF=0,mF=0,nF=0,oF=0,pF=0,qF=0,rF=0,sF=0,tF=0,uF=0,vF=0,wF=0,xF=0,yF=0,zF=0,AF=0,BF=0,CF=0,DF=0,EF=0,FF=0,GF=0,HF=0,IF=0,JF=0,KF=0,LF=0,MF=0,NF=0,OF=0,PF=0,QF=0,RF=0,SF=0,TF=0,UF=0,VF=0,WF=0,XF=0,YF=0,ZF=0,$F=0,_F=0,aG=0,bG=0,cG=0,dG=0,eG=0,fG=0,gG=0,hG=0,iG=0,jG=0,kG=0,lG=0,mG=0,nG=0,oG=0,pG=0,qG=0,rG=0,sG=0,tG=0,uG=0,vG=0,wG=0,xG=0,yG=0,zG=0,AG=0,BG=0,CG=0,DG=0,EG=0,FG=0,GG=0,HG=0,IG=0,JG=0,KG=0,LG=0,MG=0,NG=0,OG=0,PG=0,QG=0,RG=0,SG=0,TG=0,UG=0,VG=0,WG=0,XG=0,YG=0,ZG=0,$G=0,_G=0,aH=0,bH=0,cH=0,dH=0,eH=0,fH=0,gH=0,hH=0,iH=0,jH=0,kH=0,lH=0,mH=0,nH=0,oH=0,pH=0,qH=0,rH=0,sH=0,tH=0,uH=0,vH=0,wH=0,xH=0,yH=0,zH=0,AH=0,BH=0,CH=0,DH=0,EH=0,FH=0,GH=0,HH=0,IH=0,JH=0,KH=0,LH=0,MH=0,NH=0,OH=0,PH=0,QH=0,RH=0,SH=0,TH=0,UH=0,VH=0,WH=0,XH=0,YH=0,ZH=0,$H=0,_H=0,aI=0,bI=0,cI=0,dI=0,eI=0,fI=0,gI=0,hI=0,iI=0,jI=0,kI=0,lI=0,mI=0,nI=0,oI=0,pI=0,qI=0,rI=0,sI=0,tI=0,uI=0,vI=0,wI=0,xI=0,yI=0,zI=0,AI=0,BI=0,CI=0,DI=0,EI=0,FI=0,GI=0,HI=0,II=0,JI=0,KI=0,LI=0,MI=0,NI=0,OI=0,PI=0,QI=0,RI=0,SI=0,TI=0,UI=0,VI=0,WI=0,XI=0,YI=0,ZI=0,$I=0,_I=0,aJ=0,bJ=0,cJ=0,dJ=0,eJ=0,fJ=0,gJ=0,hJ=0,iJ=0,jJ=0,kJ=0,lJ=0,mJ=0,nJ=0,oJ=0,pJ=0,qJ=0,rJ=0,sJ=0,tJ=0,uJ=0,vJ=0,wJ=0,xJ=0,yJ=0,zJ=0,AJ=0,BJ=0,CJ=0,DJ=0,EJ=0,FJ=0,GJ=0,HJ=0,IJ=0,JJ=0,KJ=0,LJ=0,MJ=0,NJ=0,OJ=0,PJ=0,QJ=0,RJ=0,SJ=0,TJ=0,UJ=0,VJ=0,WJ=0,XJ=0,YJ=0,ZJ=0,$J=0,_J=0,aK=0,bK=0,cK=0,dK=0,eK=0,fK=0,gK=0,hK=0,iK=0,jK=0,kK=0,lK=0,mK=0,nK=0,oK=0,pK=0,qK=0,rK=0,sK=0,tK=0,uK=0,vK=0,wK=0,xK=0,yK=0,zK=0,AK=0,BK=0,CK=0,DK=0,EK=0,FK=0,GK=0,HK=0,IK=0,JK=0,KK=0,LK=0,MK=0,NK=0,OK=0,PK=0,QK=0,RK=0,SK=0,TK=0,UK=0,VK=0,WK=0,XK=0,YK=0,ZK=0,$K=0,_K=0,aL=0,bL=0,cL=0,dL=0,eL=0,fL=0,gL=0,hL=0,iL=0,jL=0,kL=0,lL=0,mL=0,nL=0,oL=0,pL=0,qL=0,rL=0,sL=0,tL=0,uL=0,vL=0,wL=0,xL=0,yL=0,zL=0,AL=0,BL=0,CL=0,DL=0,EL=0,FL=0,GL=0,HL=0,IL=0,JL=0,KL=0,LL=0,ML=0,NL=0,OL=0,PL=0,QL=0,RL=0,SL=0,TL=0,UL=0,VL=0,WL=0,XL=0,YL=0,ZL=0,$L=0,_L=0,aM=0,bM=0,cM=0,dM=0,eM=0,fM=0,gM=0,hM=0,iM=0,jM=0,kM=0,lM=0,mM=0,nM=0,oM=0,pM=0,qM=0,rM=0,sM=0,tM=0,uM=0,vM=0,wM=0,xM=0,yM=0,zM=0,AM=0,BM=0,CM=0,DM=0,EM=0,FM=0,GM=0,HM=0,IM=0,JM=0,KM=0,LM=0,MM=0,NM=0,OM=0,PM=0,QM=0,RM=0,SM=0,TM=0,UM=0,VM=0,WM=0,XM=0,YM=0,ZM=0,$M=0,_M=0,aN=0,bN=0,cN=0,dN=0,eN=0,fN=0,gN=0,hN=0,iN=0,jN=0,kN=0,lN=0,mN=0,nN=0,oN=0,pN=0,qN=0,rN=0,sN=0,tN=0,uN=0,vN=0,wN=0,xN=0,yN=0,zN=0,AN=0,BN=0,CN=0,DN=0;
+if(DN=l,l=l+368|0,(0|l)>=(0|m)&&X(),BN=DN+8|0,RL=DN+112|0,YL=DN+40|0,M=a,vN=0,_u=M,wx=_u+44|0,zz=0|f[wx>>2],CB=0!=(0|zz)){if(FD=M,IF=FD+44|0,LH=0|f[IF>>2],OJ=0|f[LH>>2],N=OJ,Rb=64&N,Ud=0!=(0|Rb),Yf=M,!Ud)return Ws=0|Qk(Yf),L=Ws,sv=L,l=DN,0|sv;if(_h=Yf+1120|0,ck=0|f[_h>>2],Lm=0!=(0|ck))return Qo=M,Tq=0|Qk(Qo),L=Tq,sv=L,l=DN,0|sv}av=M,Dv=av+72|0,Pv=0|d[Dv>>0],$v=1&Pv,kw=255&$v,WL=kw,vw=M,Gw=vw+72|0,Rw=0|d[Gw>>0],ax=Rw&-2,d[Gw>>0]=ax;a:for(;;){switch(lx=M,xx=lx+40|0,Ix=0|f[xx>>2],aM=Ix,Tx=M,cy=0|Tk(Tx),SL=cy,0|cy){case 42:CN=25;break a;case 33:CN=47;break a;case 60:CN=82;break a;case 62:CN=107;break a;case 34:CN=118;break a;case 39:CN=119;break a;case 96:CN=120;break a;case 63:CN=128;break a;case 38:CN=155;break a;case 124:CN=177;break a;case 43:CN=188;break a;case 45:CN=209;break a;case 46:CN=232;break a;case 57:case 56:case 55:case 54:case 53:case 52:case 51:case 50:case 49:case 48:CN=240;break a;case 93:case 41:CN=332;break a;case 125:CN=333;break a;case 58:CN=337;break a;case 47:CN=354;break a;case 94:CN=371;break a;case 59:CN=378;break a;case 44:CN=379;break a;case 126:CN=380;break a;case 40:CN=387;break a;case 91:CN=397;break a;case 123:CN=414;break a;case 37:CN=429;break a;case 36:CN=473;break a;case 64:CN=497;break a;case 95:CN=512;break a;case-1:case 0:case 26:case 4:if(ny=M,yy=ny+1116|0,Jy=0|f[yy>>2],Uy=0!=(0|Jy),!Uy){CN=9;break a}break;case 11:case 13:case 12:case 9:case 32:vN=1;continue a;case 35:dz=M,jl(dz,10);break;case 10:case-2:break;case 61:if(wp=M,Hp=wp+36|0,Sp=0|f[Hp>>2],bq=1==(0|Sp),!bq){CN=69;break a}if(mq=M,xq=0|ol(mq,68915),Iq=xq<<24>>24!=0,!Iq){CN=69;break a}if(Uq=M,dr=0|ql(Uq,5),SL=dr,or=SL,zr=(0|or)<0,Kr=SL,Vr=32==(0|Kr),lN=zr|Vr,!lN&&(es=SL,ps=es-9|0,As=ps>>>0<5,!As)){CN=69;break a}for(;;){if(Ls=M,Xs=0|rl(Ls,57125),gt=Xs<<24>>24!=0,rt=M,!gt){CN=62;break a}if(Ct=0|Tk(rt),SL=Ct,Nt=SL,Yt=(0|Nt)<0,hu=SL,su=32==(0|hu),IM=Yt|su,IM?tv=1:(Du=SL,Ou=Du-9|0,bv=Ou>>>0<5,tv=bv),ov=1^tv,!ov)break}uv=SL,vv=10!=(0|uv),vv&&(wv=M,jl(wv,10)),xv=M,yv=xv+32|0,Av=0|f[yv>>2],Cv=Av+1|0,f[yv>>2]=Cv,Ev=M,Fv=Ev+36|0,f[Fv>>2]=0;continue a;case 92:if(qi=M,ri=0|Tk(qi),SL=ri,si=SL,ti=10==(0|si),ui=M,!ti){CN=428;break a}vi=ui+32|0,xi=0|f[vi>>2],yi=xi+1|0,f[vi>>2]=yi,zi=M,Ai=zi+36|0,f[Ai>>2]=0,vN=1;continue a;default:if(gp=SL,hp=32|gp,ip=hp-97|0,jp=ip>>>0<26){CN=516;break a}if(kp=SL,mp=kp-48|0,np=mp>>>0<10,op=SL,pp=95==(0|op),xM=np|pp,yM=1^xM,qp=SL,rp=qp>>>0<=127,zM=yM&rp,!zM){CN=516;break a}sp=M,tp=SL,yl(sp,57851,tp);continue a}switch(oz=M,el(oz),Az=M,Lz=Az+40|0,Wz=0|f[Lz>>2],0|Wz){case 10:case 9:case 8:case 7:case 0:if(fA=M,qA=fA+32|0,BA=0|f[qA>>2],MA=BA+1|0,f[qA>>2]=MA,XA=M,gB=XA+36|0,f[gB>>2]=0,rB=M,DB=rB+1120|0,OB=0|f[DB>>2],ZB=0!=(0|OB),!ZB)continue a;if(iC=M,tC=iC+44|0,EC=0|f[tC>>2],PC=0!=(0|EC)){CN=15;break a}continue a}if(uD=M,GD=uD+1120|0,RD=0|f[GD>>2],aE=0!=(0|RD)){CN=17;break}b:for(;;){if(lE=M,wE=0|Tk(lE),SL=wE,HE=0!=(0|wE),!HE){CN=24;break a}switch(SE=SL,0|SE){case-2:case-1:CN=24;break a;case 46:break b;case 11:case 13:case 12:case 9:case 32:break;default:CN=23;break a}vN=1}if(bF=M,mF=0|Tk(bF),SL=mF,xF=46!=(0|mF),!xF){CN=24;break}JF=M,UF=SL,Vk(JF,UF),dG=M,Vk(dG,46)}a:switch(0|CN){case 9:return L=0,sv=L,l=DN,0|sv;case 15:return $C=M,jD=0|Qk($C),L=jD,sv=L,l=DN,0|sv;case 17:return L=10,sv=L,l=DN,0|sv;case 23:oG=M,zG=SL,Vk(oG,zG),CN=24;break;case 25:gI=M,rI=0|Tk(gI),SL=rI,CI=42==(0|rI);do{if(CI){if(NI=M,YI=0|Tk(NI),SL=YI,hJ=61==(0|YI),sJ=M,!hJ){QK=SL,Vk(sJ,QK),SL=326;break}return DJ=0|kl(sJ,57087,2),PJ=M,$J=PJ+1132|0,jK=0|f[$J>>2],f[jK>>2]=DJ,uK=M,FK=uK+40|0,f[FK>>2]=0,L=345,sv=L,l=DN,0|sv}if(_K=SL,kL=61==(0|_K),vL=M,kL)return GL=0|ll(vL,42),O=M,$=O+1132|0,ja=0|f[$>>2],f[ja>>2]=GL,ua=M,Fa=ua+40|0,f[Fa>>2]=0,L=345,sv=L,l=DN,0|sv;if(Qa=SL,Vk(vL,Qa),_a=M,kb=_a+40|0,vb=0|f[kb>>2],Gb=4==(0|vb),Gb?(b=vN,c=0==(0|b),s=SL,y=32==(0|s),aN=c|y,aN||(CN=34)):(Sb=M,bc=Sb+40|0,mc=0|f[bc>>2],xc=5==(0|mc),Ic=vN,Tc=0!=(0|Ic),dM=xc&Tc,eM=1^dM,cd=SL,nd=32==(0|cd),UM=eM|nd,UM||(CN=34)),34==(0|CN)&&(yd=SL,Jd=yd-9|0,Vd=Jd>>>0<5,!Vd)){ee=M,ml(ee,57090),SL=353;break}if(pe=M,Ae=pe+40|0,Le=0|f[Ae>>2],We=0==(0|Le),!(We||(ff=M,rf=ff+40|0,Cf=0|f[rf>>2],Nf=6==(0|Cf),Nf||(Zf=M,ig=Zf+40|0,tg=0|f[ig>>2],Eg=10==(0|tg),Eg||(Pg=M,$g=Pg+40|0,jh=0|f[$g>>2],uh=9==(0|jh)))))){SL=42;break}SL=353}while(0);return Fh=M,Qh=Fh+40|0,ai=0|f[Qh>>2],li=7==(0|ai),li?CN=44:(wi=M,Hi=wi+40|0,Si=0|f[Hi>>2],bj=8==(0|Si),bj?CN=44:(Ij=M,Tj=Ij+40|0,f[Tj>>2]=0)),44==(0|CN)&&(mj=M,xj=mj+40|0,f[xj>>2]=4),dk=SL,L=dk,sv=L,l=DN,0|sv;case 47:return ok=M,zk=0|Tk(ok),SL=zk,Kk=M,gl=Kk+40|0,Kl=0|f[gl>>2],Vl=7==(0|Kl),Vl?CN=49:(em=M,pm=em+40|0,Am=0|f[pm>>2],Mm=8==(0|Am),Mm?CN=49:(On=M,Zn=On+40|0,f[Zn>>2]=0)),49==(0|CN)&&(Xm=M,gn=Xm+40|0,f[gn>>2]=4,sn=SL,Dn=64==(0|sn))?(L=33,sv=L,l=DN,0|sv):(jo=SL,(uo=61==(0|jo))?(L=330,sv=L,l=DN,0|sv):(Fo=SL,Ro=126==(0|Fo),Ro?(L=336,sv=L,l=DN,0|sv):(ap=M,lp=SL,Vk(ap,lp),L=33,sv=L,l=DN,0|sv)));case 62:return Yk(rt,57131),L=0,sv=L,l=DN,0|sv;case 69:return Gv=M,Hv=Gv+40|0,Iv=0|f[Hv>>2],Jv=7==(0|Iv),Jv?CN=71:(Lv=M,Mv=Lv+40|0,Nv=0|f[Mv>>2],Ov=8==(0|Nv),Ov?CN=71:(Sv=M,Tv=Sv+40|0,f[Tv>>2]=0)),71==(0|CN)&&(Qv=M,Rv=Qv+40|0,f[Rv>>2]=4),Uv=M,Vv=0|Tk(Uv),SL=Vv,(Wv=61==(0|Vv))?(Xv=M,Yv=0|Tk(Xv),SL=Yv,Zv=61==(0|Yv),Zv?(L=329,sv=L,l=DN,0|sv):(_v=M,aw=SL,Vk(_v,aw),L=328,sv=L,l=DN,0|sv)):(bw=SL,(dw=126==(0|bw))?(L=335,sv=L,l=DN,0|sv):(ew=SL,fw=62==(0|ew),fw?(L=346,sv=L,l=DN,0|sv):(gw=M,hw=SL,Vk(gw,hw),L=61,sv=L,l=DN,0|sv)));case 82:iw=M,jw=0|Tk(iw),SL=jw,lw=SL,mw=60==(0|lw);do if(mw&&(nw=M,ow=nw+40|0,pw=0|f[ow>>2],qw=8!=(0|pw),qw&&(rw=M,sw=rw+40|0,tw=0|f[sw>>2],uw=9!=(0|tw),uw&&(ww=M,xw=ww+40|0,yw=0|f[xw>>2],zw=1==(0|yw),!zw&&(Aw=M,Bw=Aw+40|0,Cw=0|f[Bw>>2],Dw=2==(0|Cw),!Dw&&(Ew=M,Fw=Ew+40|0,Hw=0|f[Fw>>2],Iw=3==(0|Hw),!Iw)))))){if(Jw=M,Kw=Jw+40|0,Lw=0|f[Kw>>2],Mw=4==(0|Lw)){if(e=vN,k=0!=(0|e),!k)break}else if(Nw=M,Ow=Nw+40|0,Pw=0|f[Ow>>2],Qw=5!=(0|Pw),Sw=vN,Tw=0!=(0|Sw),nM=Qw|Tw,!nM)break;if(Uw=M,Vw=0|sl(Uw),zN=Vw,Ww=zN,Xw=0!=(0|Ww))return Yw=zN,L=Yw,sv=L,l=DN,0|sv}while(0);return Zw=M,$w=Zw+40|0,_w=0|f[$w>>2],bx=7==(0|_w),bx?CN=95:(cx=M,dx=cx+40|0,ex=0|f[dx>>2],fx=8==(0|ex),fx?CN=95:(ix=M,jx=ix+40|0,f[jx>>2]=0,kx=M,mx=kx+40|0,nx=0|f[mx>>2],ox=9==(0|nx),ox&&(px=M,qx=px+72|0,rx=0|d[qx>>0],sx=rx&-2,tx=1|sx,d[qx>>0]=tx))),95==(0|CN)&&(gx=M,hx=gx+40|0,f[hx>>2]=4),ux=SL,(vx=61==(0|ux))?(yx=M,zx=0|Tk(yx),SL=zx,Ax=62==(0|zx),Ax?(L=327,sv=L,l=DN,0|sv):(Bx=M,Cx=SL,Vk(Bx,Cx),L=332,sv=L,l=DN,0|sv)):(Dx=SL,Ex=60==(0|Dx),Fx=M,Ex?(Gx=0|Tk(Fx),SL=Gx,Hx=61==(0|Gx),Jx=M,Hx?(Kx=0|kl(Jx,64339,2),Lx=M,Mx=Lx+1132|0,Nx=0|f[Mx>>2],f[Nx>>2]=Kx,Ox=M,Px=Ox+40|0,f[Px>>2]=0,L=345,sv=L,l=DN,0|sv):(Qx=SL,Vk(Jx,Qx),L=341,sv=L,l=DN,0|sv)):(Rx=SL,Vk(Fx,Rx),L=60,sv=L,l=DN,0|sv));case 107:return Sx=M,Ux=Sx+40|0,Vx=0|f[Ux>>2],Wx=7==(0|Vx),Wx?CN=109:(Xx=M,Yx=Xx+40|0,Zx=0|f[Yx>>2],$x=8==(0|Zx),$x?CN=109:(by=M,dy=by+40|0,f[dy>>2]=0)),109==(0|CN)&&(_x=M,ay=_x+40|0,f[ay>>2]=4),ey=M,fy=0|Tk(ey),SL=fy,(gy=61==(0|fy))?(L=331,sv=L,l=DN,0|sv):(hy=SL,iy=62==(0|hy),jy=M,iy?(ky=0|Tk(jy),SL=ky,ly=61==(0|ky),my=M,ly?(oy=0|kl(my,57205,2),py=M,qy=py+1132|0,ry=0|f[qy>>2],f[ry>>2]=oy,sy=M,ty=sy+40|0,f[ty>>2]=0,L=345,sv=L,l=DN,0|sv):(uy=SL,Vk(my,uy),L=342,sv=L,l=DN,0|sv)):(vy=SL,Vk(jy,vy),L=62,sv=L,l=DN,0|sv));case 118:return wy=M,xy=0|fl(wy,3,34,0),zy=M,Ay=zy+44|0,f[Ay>>2]=xy,L=360,sv=L,l=DN,0|sv;case 119:return By=M,Cy=0|fl(By,1,39,0),Dy=M,Ey=Dy+44|0,f[Ey>>2]=Cy,Fy=M,Gy=0|Qk(Fy),L=Gy,sv=L,l=DN,0|sv;case 120:return Hy=M,Iy=Hy+40|0,Ky=0|f[Iy>>2],Ly=7==(0|Ky),My=M,Ny=My+40|0,Ly?(f[Ny>>2]=3,L=96,sv=L,l=DN,0|sv):(Oy=0|f[Ny>>2],(Py=8==(0|Oy))?(Qy=WL,Ry=0!=(0|Qy),Sy=M,Ty=Sy+40|0,Ry?f[Ty>>2]=5:f[Ty>>2]=4,L=96,sv=L,l=DN,0|sv):(Vy=M,Wy=0|fl(Vy,131,96,0),Xy=M,Yy=Xy+44|0,f[Yy>>2]=Wy,L=361,sv=L,l=DN,0|sv));case 128:if(Zy=M,$y=Zy+40|0,_y=0|f[$y>>2],az=1==(0|_y),!az&&(bz=M,cz=bz+40|0,ez=0|f[cz>>2],fz=2==(0|ez),!fz&&(gz=M,hz=gz+40|0,iz=0|f[hz>>2],jz=3==(0|iz),!jz))){if(mz=M,nz=0|Tk(mz),SL=nz,pz=SL,qz=(0|pz)<0)return rz=M,Yk(rz,57208),L=0,sv=L,l=DN,0|sv;sz=SL,tz=32==(0|sz);do if(tz)CN=136;else{if(uz=SL,vz=uz-9|0,wz=vz>>>0<5,!wz){if(Rz=M,0|Sk(Rz),Sz=SL,Tz=0|zv(Sz),Uz=0!=(0|Tz),Vz=SL,Xz=95==(0|Vz),BM=Uz|Xz,BM&&(Yz=M,Zz=0|Tk(Yz),VL=Zz,$z=M,_z=VL,Vk($z,_z),aA=VL,bA=0|zv(aA),cA=0!=(0|bA),dA=VL,eA=95==(0|dA),JM=cA|eA))break;return gA=SL,hA=92==(0|gA),iA=M,hA?(jA=0|bl(iA),SL=jA,kA=M,lA=SL,Wk(kA,lA)):(mA=SL,Wk(iA,mA)),nA=M,Xk(nA),oA=M,pA=M,rA=0|Zk(pA),sA=M,tA=0|$k(sA),uA=0|_k(oA,rA,tA),vA=M,wA=vA+1132|0,xA=0|f[wA>>2],f[xA>>2]=uA,yA=M,zA=yA+40|0,f[zA>>2]=1,L=315,sv=L,l=DN,0|sv}CN=136}while(0);if(136==(0|CN)&&(xz=M,yz=xz+40|0,Bz=0|f[yz>>2],Cz=4==(0|Bz),!Cz&&(Dz=M,Ez=Dz+40|0,Fz=0|f[Ez>>2],Gz=5==(0|Fz),!Gz))){switch(Hz=SL,0|Hz){case 32:UL=115;break;case 10:UL=110;break;case 9:UL=116;break;case 11:UL=118;break;case 13:UL=114;break;case 12:UL=102;break;default:UL=0}Iz=UL,Jz=0!=(0|Iz),Jz&&(Kz=UL,f[BN>>2]=Kz,0|Kv(RL,256,57236,BN),Mz=M,Yk(Mz,RL))}return Nz=M,Oz=SL,Vk(Nz,Oz),Pz=M,Qz=Pz+40|0,f[Qz>>2]=10,L=63,sv=L,l=DN,0|sv}return kz=M,lz=kz+40|0,f[lz>>2]=10,L=63,sv=L,l=DN,0|sv;case 155:if(AA=M,CA=0|Tk(AA),SL=CA,DA=38==(0|CA))return EA=M,FA=EA+40|0,f[FA>>2]=0,GA=M,HA=0|Tk(GA),SL=HA,IA=61==(0|HA),JA=M,IA?(KA=0|kl(JA,57271,2),LA=M,NA=LA+1132|0,OA=0|f[NA>>2],f[OA>>2]=KA,PA=M,QA=PA+40|0,f[QA>>2]=0,L=345,sv=L,l=DN,0|sv):(RA=SL,Vk(JA,RA),L=333,sv=L,l=DN,0|sv);if(SA=SL,TA=61==(0|SA),UA=M,TA)return VA=0|ll(UA,38),WA=M,YA=WA+1132|0,ZA=0|f[YA>>2],f[ZA>>2]=VA,$A=M,_A=$A+40|0,f[_A>>2]=0,L=345,sv=L,l=DN,0|sv;aB=SL,Vk(UA,aB),bB=M,cB=bB+40|0,dB=0|f[cB>>2],eB=4==(0|dB),eB?(r=vN,t=0==(0|r),u=SL,v=32==(0|u),NM=t|v,CN=NM?166:164):(fB=M,hB=fB+40|0,iB=0|f[hB>>2],jB=5==(0|iB),kB=vN,lB=0!=(0|kB),KM=jB&lB,LM=1^KM,mB=SL,nB=32==(0|mB),MM=LM|nB,CN=MM?166:164),164==(0|CN)&&(oB=SL,pB=oB-9|0,qB=pB>>>0<5,qB?CN=166:(sB=M,ml(sB,57274),SL=354));do if(166==(0|CN)){if(tB=M,uB=tB+40|0,vB=0|f[uB>>2],wB=0==(0|vB),!(wB||(xB=M,yB=xB+40|0,zB=0|f[yB>>2],AB=6==(0|zB),AB||(BB=M,EB=BB+40|0,FB=0|f[EB>>2],GB=10==(0|FB),GB||(HB=M,IB=HB+40|0,JB=0|f[IB>>2],KB=9==(0|JB)))))){SL=38;break}SL=354}while(0);return LB=M,MB=LB+40|0,NB=0|f[MB>>2],PB=7==(0|NB),PB?CN=174:(QB=M,RB=QB+40|0,SB=0|f[RB>>2],TB=8==(0|SB),TB?CN=174:(WB=M,XB=WB+40|0,f[XB>>2]=0)),174==(0|CN)&&(UB=M,VB=UB+40|0,f[VB>>2]=4),YB=SL,L=YB,sv=L,l=DN,0|sv;case 177:return $B=M,_B=0|Tk($B),SL=_B,(aC=124==(0|_B))?(bC=M,cC=bC+40|0,f[cC>>2]=0,dC=M,eC=0|Tk(dC),SL=eC,fC=61==(0|eC),gC=M,fC?(hC=0|kl(gC,57309,2),jC=M,kC=jC+1132|0,lC=0|f[kC>>2],f[lC>>2]=hC,mC=M,nC=mC+40|0,f[nC>>2]=0,L=345,sv=L,l=DN,0|sv):(oC=SL,Vk(gC,oC),L=334,sv=L,l=DN,0|sv)):(pC=SL,qC=61==(0|pC),rC=M,qC?(sC=0|ll(rC,124),uC=M,vC=uC+1132|0,wC=0|f[vC>>2],f[wC>>2]=sC,xC=M,yC=xC+40|0,f[yC>>2]=0,L=345,sv=L,l=DN,0|sv):(zC=rC+40|0,AC=0|f[zC>>2],BC=7==(0|AC),BC?CN=185:(CC=M,DC=CC+40|0,FC=0|f[DC>>2],GC=8==(0|FC),GC?CN=185:(JC=M,KC=JC+40|0,f[KC>>2]=0)),185==(0|CN)&&(HC=M,IC=HC+40|0,f[IC>>2]=4),LC=M,MC=SL,Vk(LC,MC),L=124,sv=L,l=DN,0|sv));case 188:if(NC=M,OC=0|Tk(NC),SL=OC,QC=M,RC=QC+40|0,SC=0|f[RC>>2],TC=7==(0|SC),!TC&&(UC=M,VC=UC+40|0,WC=0|f[VC>>2],XC=8==(0|WC),!XC)){if(dD=SL,eD=61==(0|dD),fD=M,eD)return gD=0|ll(fD,43),hD=M,iD=hD+1132|0,kD=0|f[iD>>2],f[kD>>2]=gD,lD=M,mD=lD+40|0,f[mD>>2]=0,L=345,sv=L,l=DN,0|sv;nD=fD+40|0,oD=0|f[nD>>2],pD=0==(0|oD);do if(!(pD||(qD=M,rD=qD+40|0,sD=0|f[rD>>2],tD=6==(0|sD),tD||(vD=M,wD=vD+40|0,xD=0|f[wD>>2],yD=10==(0|xD),yD||(zD=M,AD=zD+40|0,BD=0|f[AD>>2],CD=9==(0|BD)))))){if(DD=M,ED=DD+40|0,HD=0|f[ED>>2],ID=4==(0|HD),ID?(w=vN,x=0==(0|w),z=SL,A=32==(0|z),RM=x|A,RM||(CN=202)):(JD=M,KD=JD+40|0,LD=0|f[KD>>2],MD=5==(0|LD),ND=vN,OD=0!=(0|ND),OM=MD&OD,PM=1^OM,PD=SL,QD=32==(0|PD),QM=PM|QD,QM||(CN=202)),202==(0|CN)&&(SD=SL,TD=SD-9|0,UD=TD>>>0<5,!UD&&(VD=M,WD=0|ul(VD),XD=0!=(0|WD))))break;return gE=M,hE=gE+40|0,f[hE>>2]=0,iE=M,jE=SL,Vk(iE,jE),L=43,sv=L,l=DN,0|sv}while(0);if(YD=M,ZD=YD+40|0,f[ZD>>2]=0,$D=M,_D=SL,Vk($D,_D),bE=SL,cE=(0|bE)>=0,cE&&(dE=SL,eE=dE-48|0,fE=eE>>>0<10)){SL=43,CN=240;break}return L=324,sv=L,l=DN,0|sv}return YC=M,ZC=YC+40|0,f[ZC>>2]=4,_C=SL,aD=64==(0|_C),aD?(L=324,sv=L,l=DN,0|sv):(bD=M,cD=SL,Vk(bD,cD),L=43,sv=L,l=DN,0|sv);case 209:if(kE=M,mE=0|Tk(kE),SL=mE,nE=M,oE=nE+40|0,pE=0|f[oE>>2],qE=7==(0|pE),!qE&&(rE=M,sE=rE+40|0,tE=0|f[sE>>2],uE=8==(0|tE),!uE)){if(CE=SL,DE=61==(0|CE))return EE=M,FE=0|ll(EE,45),GE=M,IE=GE+1132|0,JE=0|f[IE>>2],f[JE>>2]=FE,KE=M,LE=KE+40|0,f[LE>>2]=0,L=345,sv=L,l=DN,0|sv;if(ME=SL,NE=62==(0|ME),OE=M,PE=OE+40|0,NE)return f[PE>>2]=3,L=355,sv=L,l=DN,0|sv;QE=0|f[PE>>2],RE=0==(0|QE);do if(!(RE||(TE=M,UE=TE+40|0,VE=0|f[UE>>2],WE=6==(0|VE),WE||(XE=M,YE=XE+40|0,ZE=0|f[YE>>2],$E=10==(0|ZE),$E||(_E=M,aF=_E+40|0,cF=0|f[aF>>2],dF=9==(0|cF)))))){if(eF=M,fF=eF+40|0,gF=0|f[fF>>2],hF=4==(0|gF),hF?(B=vN,C=0==(0|B),D=SL,E=32==(0|D),WM=C|E,WM||(CN=225)):(iF=M,jF=iF+40|0,kF=0|f[jF>>2],lF=5==(0|kF),nF=vN,oF=0!=(0|nF),SM=lF&oF,TM=1^SM,pF=SL,qF=32==(0|pF),VM=TM|qF,VM||(CN=225)),225==(0|CN)&&(rF=SL,sF=rF-9|0,tF=sF>>>0<5,!tF&&(uF=M,vF=0|ul(uF),wF=0!=(0|vF))))break;return HF=M,KF=HF+40|0,f[KF>>2]=0,LF=M,MF=SL,Vk(LF,MF),L=45,sv=L,l=DN,0|sv}while(0);return yF=M,zF=yF+40|0,f[zF>>2]=0,AF=M,BF=SL,Vk(AF,BF),CF=SL,DF=(0|CF)>=0,DF&&(EF=SL,FF=EF-48|0,GF=FF>>>0<10)?(L=371,sv=L,l=DN,0|sv):(L=325,sv=L,l=DN,0|sv)}return vE=M,xE=vE+40|0,f[xE>>2]=4,yE=SL,zE=64==(0|yE),zE?(L=325,sv=L,l=DN,0|sv):(AE=M,BE=SL,Vk(AE,BE),L=45,sv=L,l=DN,0|sv);case 232:return NF=M,OF=NF+40|0,f[OF>>2]=0,PF=M,QF=0|Tk(PF),SL=QF,RF=46==(0|QF),SF=M,RF?(TF=0|Tk(SF),SL=TF,VF=46==(0|TF),VF?(L=338,sv=L,l=DN,0|sv):(WF=M,XF=SL,Vk(WF,XF),L=337,sv=L,l=DN,0|sv)):(YF=SL,Vk(SF,YF),ZF=SL,$F=(0|ZF)>=0,$F&&(_F=SL,aG=_F-48|0,bG=aG>>>0<10,bG&&(cG=M,Yk(cG,57369))),eG=M,fG=eG+40|0,f[fG>>2]=8,L=46,sv=L,l=DN,0|sv);case 332:Ia=M,Ja=Ia+56|0,Ka=0|f[Ja>>2],La=Ka+-1|0,f[Ja>>2]=La,CN=333;break;case 337:if(ob=M,pb=0|Tk(ob),SL=pb,qb=SL,rb=58==(0|qb),sb=M,tb=sb+40|0,ub=0|f[tb>>2],!rb)return dc=1==(0|ub),dc||(ec=M,fc=ec+40|0,gc=0|f[fc>>2],hc=2==(0|gc),hc||(ic=M,jc=ic+40|0,kc=0|f[jc>>2],lc=3==(0|kc),nc=SL,oc=32==(0|nc),nN=lc|oc,nN||(pc=SL,qc=pc-9|0,rc=qc>>>0<5)))?(sc=M,tc=SL,Vk(sc,tc),uc=M,vc=uc+40|0,f[vc>>2]=0,L=58,sv=L,l=DN,0|sv):(wc=M,yc=SL,Vk(wc,yc),zc=M,Ac=zc+40|0,f[Ac>>2]=7,L=356,sv=L,l=DN,0|sv);wb=0==(0|ub);do if(!(wb||(xb=M,yb=xb+40|0,zb=0|f[yb>>2],Ab=6==(0|zb),Ab||(Bb=M,Cb=Bb+40|0,Db=0|f[Cb>>2],Eb=10==(0|Db),Eb||(Fb=M,Hb=Fb+40|0,Ib=0|f[Hb>>2],Jb=9==(0|Ib),Jb||(Kb=M,Lb=Kb+40|0,Mb=0|f[Lb>>2],Nb=9==(0|Mb))))))){if(Ob=M,Pb=Ob+40|0,Qb=0|f[Pb>>2],Tb=4==(0|Qb)){if(F=vN,G=0!=(0|F))break}else if(Ub=M,Vb=Ub+40|0,Wb=0|f[Vb>>2],Xb=5==(0|Wb),Yb=vN,Zb=0!=(0|Yb),mN=Xb&Zb)break;return ac=M,cc=ac+40|0,f[cc>>2]=8,L=343,sv=L,l=DN,0|sv}while(0);return $b=M,_b=$b+40|0,f[_b>>2]=0,L=344,sv=L,l=DN,0|sv;case 354:return Bc=M,Cc=Bc+40|0,Dc=0|f[Cc>>2],Ec=0==(0|Dc),Ec||(Fc=M,Gc=Fc+40|0,Hc=0|f[Gc>>2],Jc=6==(0|Hc),Jc||(Kc=M,Lc=Kc+40|0,Mc=0|f[Lc>>2],Nc=10==(0|Mc),Nc||(Oc=M,Pc=Oc+40|0,Qc=0|f[Pc>>2],Rc=9==(0|Qc))))?(Sc=M,Uc=0|fl(Sc,7,47,0),Vc=M,Wc=Vc+44|0,f[Wc>>2]=Uc,L=357,sv=L,l=DN,0|sv):(Xc=M,Yc=0|Tk(Xc),SL=Yc,Zc=61==(0|Yc),$c=M,Zc?(_c=0|ll($c,47),ad=M,bd=ad+1132|0,dd=0|f[bd>>2],f[dd>>2]=_c,ed=M,fd=ed+40|0,f[fd>>2]=0,L=345,sv=L,l=DN,0|sv):(gd=SL,Vk($c,gd),hd=M,id=hd+40|0,jd=0|f[id>>2],kd=4==(0|jd),kd?(H=vN,I=0==(0|H),J=SL,K=32==(0|J),fM=I|K,fM||(CN=364)):(ld=M,md=ld+40|0,od=0|f[md>>2],pd=5==(0|od),qd=vN,rd=0!=(0|qd),oN=pd&rd,pN=1^oN,sd=SL,td=32==(0|sd),qN=pN|td,qN||(CN=364)),364!=(0|CN)||(ud=SL,vd=ud-9|0,wd=vd>>>0<5)?(Cd=M,Dd=Cd+40|0,Ed=0|f[Dd>>2],Fd=7==(0|Ed),Fd?CN=368:(Gd=M,Hd=Gd+40|0,Id=0|f[Hd>>2],Kd=8==(0|Id),Kd?CN=368:(Nd=M,Od=Nd+40|0,f[Od>>2]=0)),368==(0|CN)&&(Ld=M,Md=Ld+40|0,f[Md>>2]=4),L=47,sv=L,l=DN,0|sv):(xd=M,zd=0|fl(xd,7,47,0),Ad=M,Bd=Ad+44|0,f[Bd>>2]=zd,L=357,sv=L,l=DN,0|sv)));case 371:return Pd=M,Qd=0|Tk(Pd),SL=Qd,Rd=61==(0|Qd),Sd=M,Rd?(Td=0|ll(Sd,94),Wd=M,Xd=Wd+1132|0,Yd=0|f[Xd>>2],f[Yd>>2]=Td,Zd=M,$d=Zd+40|0,f[$d>>2]=0,L=345,sv=L,l=DN,0|sv):(_d=Sd+40|0,ae=0|f[_d>>2],be=7==(0|ae),be?CN=375:(ce=M,de=ce+40|0,fe=0|f[de>>2],ge=8==(0|fe),ge?CN=375:(je=M,ke=je+40|0,f[ke>>2]=0)),375==(0|CN)&&(he=M,ie=he+40|0,f[ie>>2]=4),le=M,me=SL,Vk(le,me),L=94,sv=L,l=DN,0|sv);case 378:return ne=M,oe=ne+40|0,f[oe>>2]=0,L=59,sv=L,l=DN,0|sv;case 379:return qe=M,re=qe+40|0,f[re>>2]=0,L=44,sv=L,l=DN,0|sv;case 380:return se=M,te=se+40|0,ue=0|f[te>>2],ve=7==(0|ue),ve?CN=382:(we=M,xe=we+40|0,ye=0|f[xe>>2],ze=8==(0|ye),ze?CN=382:(Ie=M,Je=Ie+40|0,f[Je>>2]=0)),382==(0|CN)&&(Be=M,Ce=0|Tk(Be),SL=Ce,De=64!=(0|Ce),De&&(Ee=M,Fe=SL,Vk(Ee,Fe)),Ge=M,He=Ge+40|0,f[He>>2]=4),L=126,sv=L,l=DN,0|sv;case 387:Ke=M,Me=Ke+40|0,Ne=0|f[Me>>2],Oe=0==(0|Ne);do if(Oe)CN=391;else if(Pe=M,Qe=Pe+40|0,Re=0|f[Qe>>2],Se=6==(0|Re))CN=391;else if(Te=M,Ue=Te+40|0,Ve=0|f[Ue>>2],Xe=10==(0|Ve))CN=391;else if(Ye=M,Ze=Ye+40|0,$e=0|f[Ze>>2],_e=9==(0|$e))CN=391;else{if(af=M,bf=af+40|0,cf=0|f[bf>>2],df=4==(0|cf)){if(g=vN,h=0!=(0|g),!h)break}else if(ef=M,gf=ef+40|0,hf=0|f[gf>>2],jf=5==(0|hf),kf=vN,lf=0!=(0|kf),gM=jf&lf,!gM)break;SL=348}while(0);return 391==(0|CN)&&(SL=347),mf=M,nf=mf+56|0,of=0|f[nf>>2],pf=of+1|0,f[nf>>2]=pf,qf=M,sf=qf+48|0,tf=0|f[sf>>2],uf=tf<<1,vf=M,wf=vf+48|0,f[wf>>2]=uf,xf=M,yf=xf+52|0,zf=0|f[yf>>2],Af=zf<<1,Bf=M,Df=Bf+52|0,f[Df>>2]=Af,Ef=M,Ff=Ef+40|0,f[Ff>>2]=0,Gf=SL,L=Gf,sv=L,l=DN,0|sv;case 397:if(Hf=M,If=Hf+56|0,Jf=0|f[If>>2],Kf=Jf+1|0,f[If>>2]=Kf,Lf=M,Mf=Lf+40|0,Of=0|f[Mf>>2],Pf=7==(0|Of),!Pf&&(Qf=M,Rf=Qf+40|0,Sf=0|f[Rf>>2],Tf=8==(0|Sf),!Tf)){fg=M,gg=fg+40|0,hg=0|f[gg>>2],jg=0==(0|hg);do if(jg)CN=408;else if(kg=M,lg=kg+40|0,mg=0|f[lg>>2],ng=6==(0|mg))CN=408;else if(og=M,pg=og+40|0,qg=0|f[pg>>2],rg=10==(0|qg))CN=408;else if(sg=M,ug=sg+40|0,vg=0|f[ug>>2],wg=9==(0|vg))CN=408;else{if(xg=M,yg=xg+40|0,zg=0|f[yg>>2],Ag=4==(0|zg)){if(i=vN,j=0!=(0|i),!j)break}else if(Bg=M,Cg=Bg+40|0,Dg=0|f[Cg>>2],Fg=5==(0|Dg),Gg=vN,Hg=0!=(0|Gg),hM=Fg&Hg,!hM)break;SL=350}while(0);return 408==(0|CN)&&(SL=350),Ig=M,Jg=Ig+40|0,f[Jg>>2]=0,Kg=M,Lg=Kg+48|0,Mg=0|f[Lg>>2],Ng=Mg<<1,Og=M,Qg=Og+48|0,f[Qg>>2]=Ng,Rg=M,Sg=Rg+52|0,Tg=0|f[Sg>>2],Ug=Tg<<1,Vg=M,Wg=Vg+52|0,f[Wg>>2]=Ug,Xg=SL,L=Xg,sv=L,l=DN,0|sv}return Uf=M,Vf=Uf+40|0,f[Vf>>2]=4,Wf=M,Xf=0|Tk(Wf),SL=Xf,$f=93==(0|Xf),_f=M,$f?(ag=0|Tk(_f),SL=ag,bg=61==(0|ag),bg?(L=340,sv=L,l=DN,0|sv):(cg=M,dg=SL,Vk(cg,dg),L=339,sv=L,l=DN,0|sv)):(eg=SL,Vk(_f,eg),L=91,sv=L,l=DN,0|sv);case 414:if(Yg=M,Zg=Yg+60|0,_g=0|f[Zg>>2],ah=0!=(0|_g),ah&&(bh=M,ch=bh+60|0,dh=0|f[ch>>2],eh=M,fh=eh+56|0,gh=0|f[fh>>2],hh=(0|dh)==(0|gh)))return ih=M,kh=ih+40|0,f[kh>>2]=0,lh=M,mh=lh+60|0,f[mh>>2]=0,nh=M,oh=nh+56|0,ph=0|f[oh>>2],qh=ph+-1|0,f[oh>>2]=qh,rh=M,sh=rh+48|0,th=0|f[sh>>2],vh=th<<1,wh=M,xh=wh+48|0,f[xh>>2]=vh,yh=M,zh=yh+52|0,Ah=0|f[zh>>2],Bh=Ah<<1,Ch=M,Dh=Ch+52|0,f[Dh>>2]=Bh,L=363,sv=L,l=DN,0|sv;Eh=M,Gh=Eh+40|0,Hh=0|f[Gh>>2],Ih=4==(0|Hh);do if(Ih)CN=421;else if(Jh=M,Kh=Jh+40|0,Lh=0|f[Kh>>2],Mh=5==(0|Lh))CN=421;else if(Nh=M,Oh=Nh+40|0,Ph=0|f[Oh>>2],Rh=1==(0|Ph))CN=421;else{if(Sh=M,Th=Sh+40|0,Uh=0|f[Th>>2],Vh=3==(0|Uh),!Vh){if(Wh=M,Xh=Wh+40|0,Yh=0|f[Xh>>2],Zh=2==(0|Yh)){SL=352;break}SL=351;break}CN=421}while(0);return 421==(0|CN)&&(SL=123),$h=M,bi=$h+48|0,ci=0|f[bi>>2],di=ci<<1,ei=M,fi=ei+48|0,f[fi>>2]=di,gi=M,hi=gi+52|0,ii=0|f[hi>>2],ji=ii<<1,ki=M,mi=ki+52|0,f[mi>>2]=ji,ni=M,oi=ni+40|0,f[oi>>2]=0,pi=SL,L=pi,sv=L,l=DN,0|sv;case 428:return Bi=SL,Vk(ui,Bi),L=92,sv=L,l=DN,0|sv;case 429:Ci=M,Di=Ci+40|0,Ei=0|f[Di>>2],Fi=0==(0|Ei);do if(Fi)CN=433;else if(Gi=M,Ii=Gi+40|0,Ji=0|f[Ii>>2],Ki=6==(0|Ji))CN=433;else if(Li=M,Mi=Li+40|0,Ni=0|f[Mi>>2],Oi=10==(0|Ni))CN=433;else{if(Pi=M,Qi=Pi+40|0,Ri=0|f[Qi>>2],Ti=9==(0|Ri),!Ti){if(Mk=M,Nk=0|Tk(Mk),SL=Nk,Ok=61==(0|Nk),Pk=M,Ok)return Rk=0|ll(Pk,37),Uk=M,al=Uk+1132|0,cl=0|f[al>>2],f[cl>>2]=Rk,dl=M,hl=dl+40|0,f[hl>>2]=0,L=345,sv=L,l=DN,0|sv;if(il=Pk+40|0,nl=0|f[il>>2],tl=4==(0|nl),tl?(n=vN,o=0==(0|n),p=SL,q=32==(0|p),mM=o|q,mM||(CN=467)):(wl=M,xl=wl+40|0,Gl=0|f[xl>>2],Hl=5==(0|Gl),Il=vN,Jl=0!=(0|Il),jM=Hl&Jl,kM=1^jM,Ll=SL,Ml=32==(0|Ll),lM=kM|Ml,lM||(CN=467)),467==(0|CN)&&(Nl=SL,Ol=Nl-9|0,Pl=Ol>>>0<5,!Pl))break;return Ql=M,Rl=Ql+40|0,Sl=0|f[Rl>>2],Tl=7==(0|Sl),Tl?CN=470:(Ul=M,Wl=Ul+40|0,Xl=0|f[Wl>>2],Yl=8==(0|Xl),Yl?CN=470:(_l=M,am=_l+40|0,f[am>>2]=0)),470==(0|CN)&&(Zl=M,$l=Zl+40|0,f[$l>>2]=4),bm=M,cm=SL,Vk(bm,cm),L=37,sv=L,l=DN,0|sv}CN=433}while(0);433==(0|CN)&&(Ui=M,Vi=0|Tk(Ui),SL=Vi),Wi=SL,Xi=(0|Wi)<0;do if(Xi)CN=437;else{if(Yi=SL,Zi=32|Yi,$i=Zi-97|0,_i=$i>>>0<26,!_i&&(aj=SL,cj=aj-48|0,dj=cj>>>0<10,!dj)){CN=437;break}if(fj=M,gj=0|Tk(fj),yN=gj,hj=yN,ij=0|zv(hj),jj=0!=(0|ij))return kj=M,Yk(kj,57548),L=0,sv=L,l=DN,0|sv}while(0);if(437==(0|CN)&&(ej=SL,yN=ej,SL=81),lj=SL,nj=(0|lj)<0,oj=yN,pj=(0|oj)<0,iM=nj|pj)return qj=M,Yk(qj,57572),L=0,sv=L,l=DN,0|sv;rj=yN,rN=rj,sj=yN,tj=40==(0|sj);do{if(!tj){if(uj=yN,vj=91==(0|uj)){yN=93;break}if(wj=yN,yj=123==(0|wj)){yN=125;break}if(zj=yN,Aj=60==(0|zj)){yN=62;break}rN=0;break}yN=41}while(0);Bj=SL;do switch(0|Bj){case 81:return Cj=M,Dj=yN,Ej=rN,Fj=0|fl(Cj,3,Dj,Ej),Gj=M,Hj=Gj+44|0,f[Hj>>2]=Fj,L=360,sv=L,l=DN,0|sv;case 113:return Jj=M,Kj=yN,Lj=rN,Mj=0|fl(Jj,1,Kj,Lj),Nj=M,Oj=Nj+44|0,f[Oj>>2]=Mj,Pj=M,Qj=0|Qk(Pj),L=Qj,sv=L,l=DN,0|sv;case 87:return Rj=M,Sj=yN,Uj=rN,Vj=0|fl(Rj,43,Sj,Uj),Wj=M,Xj=Wj+44|0,f[Xj>>2]=Vj,L=358,sv=L,l=DN,0|sv;case 119:return Yj=M,Zj=yN,$j=rN,_j=0|fl(Yj,41,Zj,$j),ak=M,bk=ak+44|0,f[bk>>2]=_j,L=358,sv=L,l=DN,0|sv;case 120:return ek=M,fk=yN,gk=rN,hk=0|fl(ek,131,fk,gk),ik=M,jk=ik+44|0,f[jk>>2]=hk,L=361,sv=L,l=DN,0|sv;case 114:return kk=M,lk=yN,mk=rN,nk=0|fl(kk,7,lk,mk),pk=M,qk=pk+44|0,f[qk>>2]=nk,L=357,sv=L,l=DN,0|sv;case 115:return rk=M,sk=yN,tk=rN,uk=0|fl(rk,17,sk,tk),vk=M,wk=vk+44|0,f[wk>>2]=uk,L=356,sv=L,l=DN,0|sv;case 73:return xk=M,yk=yN,Ak=rN,Bk=0|fl(xk,51,yk,Ak),Ck=M,Dk=Ck+44|0,f[Dk>>2]=Bk,L=359,sv=L,l=DN,0|sv;case 105:return Ek=M,Fk=yN,Gk=rN,Hk=0|fl(Ek,49,Fk,Gk),Ik=M,Jk=Ik+44|0,f[Jk>>2]=Hk,L=359,sv=L,l=DN,0|sv;default:return Lk=M,Yk(Lk,57548),L=0,sv=L,l=DN,0|sv}while(0);break;case 473:if(dm=M,fm=dm+40|0,f[fm>>2]=1,gm=M,hm=0|Sk(gm),AN=hm,im=M,jm=0|Tk(im),SL=jm,km=SL,lm=(0|km)<0)return mm=M,Yk(mm,57617),L=0,sv=L,l=DN,0|sv;nm=SL;b:do switch(0|nm){case 95:om=M,qm=0|Tk(om),SL=qm,rm=SL,sm=(0|rm)>=0;do if(sm){if(tm=SL,um=32|tm,vm=um-97|0,wm=vm>>>0<26,!wm&&(xm=SL,ym=xm-48|0,zm=ym>>>0<10,Bm=SL,Cm=95==(0|Bm),oM=zm|Cm,pM=1^oM,Dm=SL,Em=Dm>>>0<=127,qM=pM&Em))break;Fm=M,Wk(Fm,36),Gm=M,Hm=SL,Wk(Gm,Hm),CN=517;break a}while(0);Im=M,Jm=SL,Vk(Im,Jm),SL=95,CN=481;break;case 34:case 62:case 60:case 58:case 61:case 46:case 44:case 59:case 92:case 47:case 64:case 33:case 63:case 36:case 42:case 126:CN=481;break;case 45:Ym=M,Wk(Ym,36),Zm=M,$m=SL,Wk(Zm,$m),_m=M,an=0|Tk(_m),SL=an,bn=M,cn=SL,Vk(bn,cn),CN=483;break;case 43:case 39:case 96:case 38:if(nn=aM,on=7==(0|nn),pn=M,on){Wk(pn,36),qn=M,rn=SL,Wk(qn,rn),CN=483;break b}return tn=SL,un=0|Cl(pn,tn),vn=M,wn=vn+1132|0,xn=0|f[wn>>2],f[xn>>2]=un,L=322,sv=L,l=DN,0|sv;case 57:case 56:case 55:case 54:case 53:case 52:case 51:case 50:case 49:for(;;){if(yn=M,zn=SL,Wk(yn,zn),An=M,Bn=0|Tk(An),SL=Bn,Cn=SL,En=(0|Cn)>=0,!En)break;if(Fn=SL,Gn=0|Bv(Fn),Hn=0!=(0|Gn),!Hn)break}if(In=M,Jn=SL,Vk(In,Jn),Kn=aM,Ln=7==(0|Kn),!Ln)return Mn=M,Xk(Mn),Nn=M,Pn=0|Zk(Nn),Qn=0|ev(Pn,0,10),bM=Qn,Rn=bM,Sn=Rn>>>0>2147483647,Tn=M,Sn?(yl(Tn,57651,2147483647),L=0,sv=L,l=DN,0|sv):(Un=bM,Vn=0|Dl(Tn,Un),Wn=M,Xn=Wn+1132|0,Yn=0|f[Xn>>2],f[Yn>>2]=Vn,L=321,sv=L,l=DN,0|sv);CN=483;break;case 48:CN=496;break;default:if($n=SL,_n=32|$n,ao=_n-97|0,bo=ao>>>0<26)CN=496;else{if(co=SL,eo=co-48|0,fo=eo>>>0<10,go=SL,ho=95==(0|go),rM=fo|ho,sM=1^rM,io=SL,ko=io>>>0<=127,tM=sM&ko)return lo=M,mo=SL,Vk(lo,mo),L=36,sv=L,l=DN,0|sv;CN=496}}while(0);if(481==(0|CN))return Km=M,Wk(Km,36),Nm=M,Om=SL,Wk(Nm,Om),Pm=M,Xk(Pm),Qm=M,Rm=M,Sm=0|Zk(Rm),Tm=0|Bl(Qm,Sm),Um=M,Vm=Um+1132|0,Wm=0|f[Vm>>2],f[Wm>>2]=Tm,L=308,sv=L,l=DN,0|sv;if(483==(0|CN))return dn=M,Xk(dn),en=M,fn=M,hn=0|Zk(fn),jn=0|Bl(en,hn),kn=M,ln=kn+1132|0,mn=0|f[ln>>2],f[mn>>2]=jn,L=308,sv=L,l=DN,0|sv;if(496==(0|CN)){no=M,Wk(no,36),CN=517;break}break;case 497:if(oo=M,po=0|Tk(oo),SL=po,qo=M,ro=0|Sk(qo),AN=ro,so=M,Wk(so,64),to=SL,vo=64==(0|to),vo&&(wo=M,Wk(wo,64),xo=M,yo=0|Tk(xo),SL=yo),zo=SL,Ao=(0|zo)<0)return Bo=M,Co=Bo+1108|0,Do=0|f[Co>>2],Eo=1==(0|Do),Go=M,Eo?Yk(Go,57685):Yk(Go,57721),L=0,sv=L,l=DN,0|sv;if(Ho=SL,Io=0|Bv(Ho),Jo=0!=(0|Io),!Jo){if(So=SL,To=32|So,Uo=To-97|0,Vo=Uo>>>0<26){CN=517;break}if(Wo=SL,Xo=Wo-48|0,Yo=Xo>>>0<10,Zo=SL,$o=95==(0|Zo),uM=Yo|$o,vM=1^uM,_o=SL,bp=_o>>>0<=127,wM=vM&bp,!wM){CN=517;break}return cp=M,dp=SL,Vk(cp,dp),L=64,sv=L,l=DN,0|sv}return Ko=M,Lo=Ko+1108|0,Mo=0|f[Lo>>2],No=1==(0|Mo),Oo=M,Po=SL,No?yl(Oo,57754,Po):yl(Oo,57804,Po),L=0,sv=L,l=DN,0|sv;case 512:ep=M,fp=0|Sk(ep),AN=fp,CN=517;break;case 516:up=M,vp=0|Sk(up),AN=vp,CN=517}if(24==(0|CN))return KG=M,VG=KG+72|0,eH=0|d[VG>>0],pH=eH&-2,AH=1|pH,d[VG>>0]=AH,MH=M,XH=MH+40|0,f[XH>>2]=0,L=10,sv=L,l=DN,0|sv;if(240==(0|CN)){cM=0,tN=0,uN=0,$L=0,gG=M,hG=gG+40|0,f[hG>>2]=1,iG=M,0|Sk(iG),jG=SL,kG=45==(0|jG),lG=SL,mG=43==(0|lG),XM=kG|mG,XM&&(nG=M,pG=SL,Wk(nG,pG),qG=M,rG=0|Tk(qG),SL=rG),sG=SL,tG=48==(0|sG);a:do if(tG){if(uG=M,vG=0|$k(uG),wN=vG,wG=M,xG=0|Tk(wG),SL=xG,yG=SL,AG=120==(0|yG),BG=SL,CG=88==(0|BG),YM=AG|CG){DG=M,EG=0|Tk(DG),SL=EG,FG=SL,GG=(0|FG)>=0;b:do if(GG){if(HG=SL,IG=HG-48|0,JG=IG>>>0<10,!JG&&(LG=SL,MG=32|LG,NG=MG-97|0,OG=NG>>>0<6,!OG))break;for(;;){if(PG=SL,QG=95==(0|PG)){if(RG=cM,SG=0!=(0|RG))break b;TG=SL,cM=TG}else{if(UG=SL,WG=UG-48|0,XG=WG>>>0<10,!XG&&(YG=SL,ZG=32|YG,$G=ZG-97|0,_G=$G>>>0<6,!_G))break b;cM=0,aH=M,bH=SL,cH=0|Xu(bH),Wk(aH,cH)}if(dH=M,fH=0|Tk(dH),SL=fH,gH=(0|fH)>=0,!gH)break}}while(0);if(hH=M,iH=SL,Vk(hH,iH),jH=M,Xk(jH),kH=M,lH=0|$k(kH),mH=wN,nH=(0|lH)==(0|mH))return oH=M,Yk(oH,57424),L=0,sv=L,l=DN,0|sv;if(qH=cM,rH=0!=(0|qH)){CN=323;break}return sH=M,tH=M,uH=0|Zk(tH),vH=0|vl(sH,uH,16),wH=M,xH=wH+1132|0,yH=0|f[xH>>2],f[yH>>2]=vH,L=313,sv=L,l=DN,0|sv}if(zH=SL,BH=98==(0|zH),CH=SL,DH=66==(0|CH),ZM=BH|DH){EH=M,FH=0|Tk(EH),SL=FH,GH=SL,HH=48==(0|GH),IH=SL,JH=49==(0|IH),$M=HH|JH;b:do if($M)for(;;){if(KH=SL,NH=95==(0|KH)){if(OH=cM,PH=0!=(0|OH))break b;QH=SL,cM=QH}else{if(RH=SL,SH=48!=(0|RH),TH=SL,UH=49!=(0|TH),_M=SH&UH)break b;cM=0,VH=M,WH=SL,Wk(VH,WH)}if(YH=M,ZH=0|Tk(YH),SL=ZH,$H=(0|ZH)>=0,!$H)break}while(0);if(_H=M,aI=SL,Vk(_H,aI),bI=M,Xk(bI),cI=M,dI=0|$k(cI),eI=wN,fI=(0|dI)==(0|eI))return hI=M,Yk(hI,57424),L=0,sv=L,l=DN,0|sv;if(iI=cM,jI=0!=(0|iI)){CN=323;break}return kI=M,lI=M,mI=0|Zk(lI),nI=0|vl(kI,mI,2),oI=M,pI=oI+1132|0,qI=0|f[pI>>2],f[qI>>2]=nI,L=313,sv=L,l=DN,0|sv}if(sI=SL,tI=100==(0|sI),uI=SL,vI=68==(0|uI),bN=tI|vI){wI=M,xI=0|Tk(wI),SL=xI,yI=SL,zI=(0|yI)>=0;b:do if(zI&&(AI=SL,BI=AI-48|0,DI=BI>>>0<10))for(;;){if(EI=SL,FI=95==(0|EI)){if(GI=cM,HI=0!=(0|GI))break b;II=SL,cM=II}else{if(JI=SL,KI=JI-48|0,LI=KI>>>0<10,!LI)break b;cM=0,MI=M,OI=SL,Wk(MI,OI)}if(PI=M,QI=0|Tk(PI),SL=QI,RI=(0|QI)>=0,!RI)break}while(0);if(SI=M,TI=SL,Vk(SI,TI),UI=M,Xk(UI),VI=M,WI=0|$k(VI),XI=wN,ZI=(0|WI)==(0|XI))return $I=M,Yk($I,57424),L=0,sv=L,l=DN,0|sv;if(_I=cM,aJ=0!=(0|_I)){CN=323;break}return bJ=M,cJ=M,dJ=0|Zk(cJ),eJ=0|vl(bJ,dJ,10),fJ=M,gJ=fJ+1132|0,iJ=0|f[gJ>>2],f[iJ>>2]=eJ,L=313,sv=L,l=DN,0|sv}if(jJ=SL,kJ=95==(0|jJ))CN=289;else{lJ=SL,mJ=111==(0|lJ),nJ=SL,oJ=79==(0|nJ),cN=mJ|oJ;do if(cN){if(pJ=M,qJ=0|Tk(pJ),SL=qJ,rJ=SL,tJ=(0|rJ)<0,uJ=SL,vJ=95==(0|uJ),dN=tJ|vJ,!dN&&(wJ=SL,xJ=wJ-48|0,yJ=xJ>>>0<10))break;return zJ=M,Yk(zJ,57424),L=0,sv=L,l=DN,0|sv}while(0);AJ=SL,BJ=(0|AJ)>=48,CJ=SL,EJ=(0|CJ)<=55,eN=BJ&EJ,CN=eN?289:301}b:do if(289==(0|CN)){for(;;){if(CN=0,FJ=SL,GJ=95==(0|FJ)){if(HJ=cM,IJ=0!=(0|HJ))break;JJ=SL,cM=JJ}else{if(KJ=SL,LJ=(0|KJ)<48,MJ=SL,NJ=(0|MJ)>57,fN=LJ|NJ)break;if(QJ=SL,RJ=(0|QJ)>55)break b;cM=0,SJ=M,TJ=SL,Wk(SJ,TJ)}if(UJ=M,VJ=0|Tk(UJ),SL=VJ,WJ=(0|VJ)>=0,!WJ)break;CN=289}if(XJ=M,YJ=0|$k(XJ),ZJ=wN,_J=(0|YJ)>(0|ZJ),!_J){if(nK=cM,oK=0!=(0|nK),!oK){CN=301;break}pK=M,qK=SL,Vk(pK,qK),CN=323;break a}if(aK=M,bK=SL,Vk(aK,bK),cK=M,Xk(cK),dK=cM,eK=0!=(0|dK)){CN=323;break a}return fK=M,gK=M,hK=0|Zk(gK),iK=0|vl(fK,hK,8),kK=M,lK=kK+1132|0,mK=0|f[lK>>2],f[mK>>2]=iK,L=313,sv=L,l=DN,0|sv}while(0);if(301==(0|CN)&&(rK=SL,sK=(0|rK)>55,tK=SL,vK=(0|tK)<=57,gN=sK&vK,!gN)){if(xK=SL,yK=46==(0|xK),zK=SL,AK=101==(0|zK),hN=yK|AK,BK=SL,CK=69==(0|BK),iN=hN|CK,DK=M,iN){Wk(DK,48),CN=306;break}return EK=SL,Vk(DK,EK),GK=M,HK=0|vl(GK,57475,10),IK=M,JK=IK+1132|0,KK=0|f[JK>>2],f[KK>>2]=HK,L=313,sv=L,l=DN,0|sv}wK=M,Yk(wK,57455),CN=306}else CN=306;while(0);a:do if(306==(0|CN)){b:for(;;){switch(CN=0,LK=SL,0|LK){case 57:case 56:case 55:case 54:case 53:case 52:case 51:case 50:case 49:case 48:cM=0,MK=M,NK=SL,Wk(MK,NK);break;case 46:if(OK=cM,PK=0!=(0|OK)){CN=323;break a}if(RK=uN,SK=0!=(0|RK),TK=tN,UK=0!=(0|TK),jN=SK|UK)break b;if(VK=M,WK=0|Tk(VK),TL=WK,XK=TL,YK=(0|XK)<0){CN=312;break b}if(ZK=TL,$K=ZK-48|0,aL=$K>>>0<10,!aL){CN=312;break b}dL=TL,SL=dL,eL=M,Wk(eL,46),fL=M,gL=SL,Wk(fL,gL),hL=$L,iL=hL+1|0,$L=iL,jL=uN,lL=jL+1|0,uN=lL,cM=0;break;case 69:case 101:if(mL=cM,nL=0!=(0|mL)){CN=315;break b}if(rL=tN,sL=0!=(0|rL))break b;if(tL=M,uL=SL,Wk(tL,uL),wL=tN,xL=wL+1|0,tN=xL,yL=$L,zL=yL+1|0,$L=zL,AL=SL,cM=AL,BL=M,CL=0|Tk(BL),SL=CL,DL=SL,EL=45!=(0|DL),FL=SL,HL=43!=(0|FL),kN=EL&HL){CN=306;continue b}IL=M,JL=SL,Wk(IL,JL),KL=SL,cM=KL;break;case 95:if(LL=cM,ML=0!=(0|LL))break b;NL=SL,cM=NL;break;default:break b}OL=M,PL=0|Tk(OL),SL=PL,CN=306}312==(0|CN)?(bL=M,cL=TL,Vk(bL,cL)):315==(0|CN)&&(oL=M,pL=SL,Vk(oL,pL),qL=cM,SL=qL),QL=M,P=SL,Vk(QL,P),Q=cM,R=0!=(0|Q),R&&(CN=323)}while(0);return 323==(0|CN)&&(S=M,T=cM,yl(S,57477,T)),U=M,Xk(U),V=$L,(W=0!=(0|V))?(Y=0|Pu(),f[Y>>2]=0,Z=M,_=0|Zk(Z),aa=+cw(_,YL),XL=aa,ba=XL,ca=0==ba,ca?(da=0|f[YL>>2],ea=M,fa=0|Zk(ea),ga=(0|da)==(0|fa),ga?(ha=M,ia=M,ka=0|Zk(ia),zl(ha,57501,ka)):CN=328):CN=328,328==(0|CN)&&(la=0|Pu(),ma=0|f[la>>2],na=34==(0|ma),na&&(oa=M,pa=M,qa=0|Zk(pa),zl(oa,57526,qa),ra=0|Pu(),f[ra>>2]=0)),sa=M,ta=M,va=0|Zk(ta),wa=0|Al(sa,va),xa=M,ya=xa+1132|0,za=0|f[ya>>2],f[za>>2]=wa,L=314,sv=L,l=DN,0|sv):(Aa=M,Ba=M,Ca=0|Zk(Ba),Da=0|vl(Aa,Ca,10),Ea=M,Ga=Ea+1132|0,Ha=0|f[Ga>>2],f[Ha>>2]=Da,L=313,sv=L,l=DN,0|sv)}if(333==(0|CN))return Ma=M,Na=Ma+48|0,Oa=0|f[Na>>2],Pa=Oa>>>1,Ra=M,Sa=Ra+48|0,Ta=0|f[Sa>>2],Ua=1&Ta,Va=Pa|Ua,Wa=M,Xa=Wa+48|0,f[Xa>>2]=Va,Ya=M,Za=Ya+52|0,$a=0|f[Za>>2],ab=$a>>>1,bb=M,cb=bb+52|0,db=0|f[cb>>2],eb=1&db,fb=ab|eb,gb=M,hb=gb+52|0,f[hb>>2]=fb,ib=SL,jb=41==(0|ib),lb=M,mb=lb+40|0,jb?f[mb>>2]=3:f[mb>>2]=2,nb=SL,L=nb,sv=L,l=DN,0|sv;if(517==(0|CN)){for(;;){if(CN=0,xp=M,yp=SL,Wk(xp,yp),zp=M,Ap=0|Tk(zp),SL=Ap,Bp=SL,Cp=(0|Bp)<0)break;if(Dp=SL,Ep=32|Dp,Fp=Ep-97|0,Gp=Fp>>>0<26)CN=517;else if(Ip=SL,Jp=Ip-48|0,Kp=Jp>>>0<10,Lp=SL,Mp=95==(0|Lp),AM=Kp|Mp)CN=517;else{if(Np=SL,Op=Np>>>0<=127,Pp=1^Op,!Pp)break;CN=517}}if(Qp=AN,Rp=0==(0|Qp),Rp&&(Tp=M,Up=0|$k(Tp),Vp=7==(0|Up),Vp&&(Wp=SL,Xp=(0|Wp)<0,Yp=SL,Zp=10==(0|Yp),CM=Xp|Zp,CM&&($p=M,_p=0|Zk($p),aq=M,cq=0|$k(aq),dq=0|hv(_p,57887,cq),eq=0==(0|dq)))))return L=-1,sv=L,l=DN,0|sv;fq=M,gq=0|Zk(fq),hq=0|d[gq>>0],iq=hq<<24>>24;a:do switch(0|iq){case 36:case 64:jq=M,kq=SL,Vk(jq,kq);break;default:if(lq=SL,nq=33==(0|lq),oq=SL,pq=63==(0|oq),DM=nq|pq,DM&&(qq=M,rq=0|pl(qq,61,0),sq=rq<<24>>24!=0,!sq)){tq=M,uq=SL,Wk(tq,uq);break a}vq=M,wq=SL,Vk(vq,wq)}while(0);yq=M,Xk(yq),sN=0,zq=M,Aq=0|Zk(zq),Bq=0|d[Aq>>0],Cq=Bq<<24>>24;a:do switch(0|Cq){case 36:Dq=M,Eq=Dq+40|0,f[Eq>>2]=1,sN=308;break;case 64:if(Fq=M,Gq=Fq+40|0,f[Gq>>2]=1,Hq=M,Jq=0|Zk(Hq),Kq=Jq+1|0,Lq=0|d[Kq>>0],Mq=Lq<<24>>24,Nq=64==(0|Mq)){sN=311;break a}sN=309;break a;default:Oq=M,Pq=0|El(Oq),Qq=33==(0|Pq);do if(Qq)CN=539;else if(Rq=M,Sq=0|El(Rq),Vq=63==(0|Sq))CN=539;else{Wq=M,Xq=Wq+40|0,Yq=0|f[Xq>>2],Zq=7==(0|Yq);b:do if(Zq){$q=M,_q=0|Tk($q),SL=_q,ar=61==(0|_q);do if(ar&&(br=M,cr=0|pl(br,126,0),er=cr<<24>>24!=0,!er&&(fr=M,gr=0|pl(fr,62,0),hr=gr<<24>>24!=0,!hr))){if(ir=M,jr=0|pl(ir,61,0),kr=jr<<24>>24!=0,kr&&(lr=M,mr=0|pl(lr,62,1),nr=255&mr,pr=0!=(0|nr),!pr))break;sN=306,qr=M,rr=SL,Wk(qr,rr),sr=M,Xk(sr);break b}while(0);tr=M,ur=SL,Vk(tr,ur)}while(0);if(vr=sN,wr=0==(0|vr),wr&&(xr=M,yr=0|Zk(xr),Ar=0|d[yr>>0],Br=Ar<<24>>24,Cr=Br-65|0,Dr=Cr>>>0<26)){sN=310;break}sN=306}while(0);if(539==(0|CN)&&(sN=307),Er=M,Fr=Er+40|0,Gr=0|f[Fr>>2],Hr=0!=(0|Gr),Ir=WL,Jr=0!=(0|Ir),EM=Hr|Jr,EM?(Lr=M,Mr=Lr+40|0,Nr=0|f[Mr>>2],Or=4==(0|Nr),Or?CN=555:(Pr=M,Qr=Pr+40|0,Rr=0|f[Qr>>2],Sr=5==(0|Rr),Sr&&(CN=555))):CN=555,555==(0|CN)&&(Tr=M,Ur=0|pl(Tr,58,0),Wr=255&Ur,Xr=0!=(0|Wr),Xr&&(Yr=M,Zr=0|pl(Yr,58,1),$r=Zr<<24>>24!=0,!$r)))return _r=M,as=_r+40|0,f[as>>2]=0,bs=M,0|Tk(bs),cs=M,Xk(cs),ds=M,fs=M,gs=0|Zk(fs),hs=0|Bl(ds,gs),is=M,js=is+1132|0,ks=0|f[js>>2],f[ks>>2]=hs,L=312,sv=L,l=DN,0|sv;if(ls=M,ms=ls+40|0,ns=0|f[ms>>2],os=8!=(0|ns),os&&(qs=M,rs=0|Zk(qs),ss=M,ts=0|$k(ss),us=0|Fl(rs,ts),
+_L=us,vs=_L,ws=0!=(0|vs)))return xs=M,ys=xs+40|0,zs=0|f[ys>>2],xN=zs,Bs=M,Cs=Bs+32|0,Ds=0|f[Cs>>2],Es=M,Fs=Es+1132|0,Gs=0|f[Fs>>2],f[Gs>>2]=Ds,Hs=_L,Is=Hs+12|0,Js=0|f[Is>>2],Ks=M,Ms=Ks+40|0,f[Ms>>2]=Js,Ns=xN,Os=7==(0|Ns),Ps=M,Os?(Qs=_L,Rs=0|f[Qs>>2],Ss=0|Bl(Ps,Rs),Ts=M,Us=Ts+1132|0,Vs=0|f[Us>>2],f[Vs>>2]=Ss,Ys=_L,Zs=Ys+4|0,$s=0|f[Zs>>2],L=$s,sv=L,l=DN,0|sv):(_s=Ps+40|0,at=0|f[_s>>2],bt=0==(0|at),bt&&(ct=M,dt=ct+72|0,et=0|d[dt>>0],ft=et&-2,ht=1|ft,d[dt>>0]=ht),it=_L,jt=it+4|0,kt=0|f[jt>>2],(lt=281==(0|kt))?(mt=M,nt=mt+60|0,ot=0|f[nt>>2],pt=0!=(0|ot),pt&&(qt=M,st=qt+60|0,tt=0|f[st>>2],ut=M,vt=ut+56|0,wt=0|f[vt>>2],xt=(0|tt)==(0|wt))?(yt=M,zt=yt+60|0,f[zt>>2]=0,At=M,Bt=At+56|0,Dt=0|f[Bt>>2],Et=Dt+-1|0,f[Bt>>2]=Et,L=284,sv=L,l=DN,0|sv):(Ft=M,Gt=Ft+48|0,Ht=0|f[Gt>>2],It=1&Ht,(Jt=0!=(0|It))?(L=282,sv=L,l=DN,0|sv):(Kt=M,Lt=Kt+52|0,Mt=0|f[Lt>>2],Ot=1&Mt,Pt=0!=(0|Ot),Qt=xN,Rt=5!=(0|Qt),(FM=Pt&Rt)?(L=283,sv=L,l=DN,0|sv):(St=xN,Tt=2==(0|St),Ut=xN,Vt=0==(0|Ut),GM=Tt|Vt,GM?(L=283,sv=L,l=DN,0|sv):(L=281,sv=L,l=DN,0|sv))))):(Wt=xN,Xt=0==(0|Wt),Zt=xN,$t=10==(0|Zt),HM=Xt|$t,_t=_L,au=_t+4|0,bu=0|f[au>>2],HM?(L=bu,sv=L,l=DN,0|sv):(cu=_L,du=cu+4|0,eu=du+4|0,fu=0|f[eu>>2],gu=(0|bu)!=(0|fu),gu&&(iu=M,ju=iu+40|0,f[ju>>2]=0),ku=_L,lu=ku+4|0,mu=lu+4|0,nu=0|f[mu>>2],L=nu,sv=L,l=DN,0|sv)));if(ou=M,pu=ou+40|0,qu=0|f[pu>>2],ru=0==(0|qu),!(ru||(tu=M,uu=tu+40|0,vu=0|f[uu>>2],wu=6==(0|vu),wu||(xu=M,yu=xu+40|0,zu=0|f[yu>>2],Au=10==(0|zu),Au||(Bu=M,Cu=Bu+40|0,Eu=0|f[Cu>>2],Fu=9==(0|Eu),Fu||(Gu=M,Hu=Gu+40|0,Iu=0|f[Hu>>2],Ju=8==(0|Iu),Ju||(Ku=M,Lu=Ku+40|0,Mu=0|f[Lu>>2],Nu=4==(0|Mu),Nu||(Qu=M,Ru=Qu+40|0,Su=0|f[Ru>>2],Tu=5==(0|Su))))))))){if(Zu=M,$u=Zu+40|0,cv=0|f[$u>>2],dv=7==(0|cv),fv=M,gv=fv+40|0,dv){f[gv>>2]=3;break a}f[gv>>2]=1;break a}if(Uu=WL,Vu=0!=(0|Uu),Wu=M,Yu=Wu+40|0,Vu){f[Yu>>2]=5;break a}f[Yu>>2]=4;break a}while(0);return iv=M,jv=M,kv=0|Zk(jv),lv=0|Bl(iv,kv),ZL=lv,mv=ZL,nv=M,pv=nv+1132|0,qv=0|f[pv>>2],f[qv>>2]=mv,rv=sN,L=rv,sv=L,l=DN,0|sv}return 0}function Qk(a){a|=0;var b=0,c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0,wf=0,xf=0,yf=0,zf=0,Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0,Gf=0,Hf=0,If=0,Jf=0,Kf=0,Lf=0,Mf=0,Nf=0,Of=0,Pf=0,Qf=0,Rf=0,Sf=0,Tf=0,Uf=0,Vf=0,Wf=0,Xf=0,Yf=0,Zf=0,$f=0,_f=0,ag=0,bg=0,cg=0,dg=0,eg=0,fg=0,gg=0,hg=0,ig=0,jg=0,kg=0,lg=0,mg=0,ng=0,og=0,pg=0,qg=0,rg=0,sg=0,tg=0,ug=0,vg=0,wg=0,xg=0,yg=0,zg=0,Ag=0,Bg=0,Cg=0,Dg=0,Eg=0,Fg=0,Gg=0,Hg=0,Ig=0,Jg=0,Kg=0,Lg=0,Mg=0,Ng=0,Og=0,Pg=0,Qg=0,Rg=0,Sg=0,Tg=0,Ug=0,Vg=0,Wg=0,Xg=0,Yg=0,Zg=0,$g=0,_g=0,ah=0,bh=0,ch=0,dh=0,eh=0,fh=0,gh=0,hh=0,ih=0,jh=0,kh=0,lh=0,mh=0,nh=0;nh=l,l=l+480|0,(0|l)>=(0|m)&&X(),kh=nh+8|0,jh=nh,Rg=nh+216|0,Zg=nh+209|0,Ug=nh+208|0,bh=nh+80|0,g=a,mb=g,pd=mb+44|0,tf=0|f[pd>>2],Pf=0|f[tf>>2],$f=Pf,ih=$f,jg=g,ug=jg+44|0,Fg=0|f[ug>>2],h=Fg+4|0,u=0|f[h>>2],F=0|f[u>>2],Q=F,ch=Q,aa=g,la=aa+44|0,wa=0|f[la>>2],Ha=wa+4|0,Sa=0|f[Ha>>2],bb=Sa+4|0,nb=0|f[bb>>2],yb=0|f[nb>>2],Jb=yb,Qg=Jb,Ub=g,dc=Ub+44|0,oc=0|f[dc>>2],zc=oc+4|0,Kc=0|f[zc>>2],Vc=Kc+4|0,ed=0|f[Vc>>2],qd=ed+4|0,Bd=0|f[qd>>2],Md=Bd,Wg=Md,Xd=ih,ge=64&Xd,re=0!=(0|ge),re?(Ce=g,Ne=0|Rk(Ce),Ye=Ne):Ye=0,$g=Ye,hf=g,0|Sk(hf);a:for(;;){if(uf=g,Ff=0|Tk(uf),Sg=Ff,Hf=Wg,If=(0|Ff)!=(0|Hf),Jf=ch,Kf=0!=(0|Jf),Lf=If?1:Kf,!Lf){mh=66;break}if(Mf=$g,Nf=0!=(0|Mf),Nf&&(Of=Sg,Qf=10==(0|Of),Rf=Sg,Sf=(0|Rf)<0,dh=Qf|Sf)){mh=7;break}if(J=Sg,K=(0|J)<0){mh=20;break}M=Sg,N=Qg,O=(0|M)==(0|N);do{if(!O){if($=Sg,_=Wg,ba=(0|$)==(0|_)){ca=ch,da=ca+-1|0,ch=da,ea=ch,fa=ea,ga=g,ha=ga+44|0,ia=0|f[ha>>2],ja=ia+4|0,ka=0|f[ja>>2],f[ka>>2]=fa;break}if(ma=Sg,na=92==(0|ma),!na){if(Hb=Sg,Ib=35==(0|Hb),!Ib)break;if(Kb=ih,Lb=2&Kb,Mb=0!=(0|Lb),!Mb)break;if(Nb=g,Ob=0|Tk(Nb),Sg=Ob,Pb=Sg,Qb=123==(0|Pb),Rb=g,Qb){mh=50;break a}Wk(Rb,35),nc=g,pc=Sg,Vk(nc,pc);continue a}if(oa=g,pa=0|Tk(oa),Sg=pa,qa=ih,ra=2&qa,sa=0!=(0|ra),ta=Sg,sa){if(ua=Wg,va=(0|ta)==(0|ua),!va&&(xa=Sg,ya=Qg,za=(0|xa)==(0|ya),!za)){if(Ca=Sg,Da=10==(0|Ca)){if(Ea=g,Fa=Ea+32|0,Ga=0|f[Fa>>2],Ia=Ga+1|0,f[Fa>>2]=Ia,Ja=g,Ka=Ja+36|0,f[Ka>>2]=0,La=ih,Ma=32&La,Na=0!=(0|Ma),!Na)continue a;Oa=g,Wk(Oa,10);continue a}if(Pa=ih,Qa=4&Pa,Ra=0!=(0|Qa),Ta=g,Ra){Wk(Ta,92),Ua=g,Va=Sg,Wk(Ua,Va);continue a}if(Wa=Sg,Vk(Ta,Wa),Xa=g,Ya=g,Za=0|bl(Ya),Wk(Xa,Za),$a=$g,_a=0!=(0|$a),!_a)continue a;ab=$g,cb=0|d[ab>>0],db=cb&-3,d[ab>>0]=db;continue a}Aa=g,Ba=Sg,Wk(Aa,Ba);continue a}eb=Qg,fb=(0|ta)!=(0|eb);do if(fb&&(gb=Sg,hb=Wg,ib=(0|gb)!=(0|hb),ib&&(jb=Sg,kb=10==(0|jb),kb&&(lb=g,ob=lb+32|0,pb=0|f[ob>>2],qb=pb+1|0,f[ob>>2]=qb,rb=g,sb=rb+36|0,f[sb>>2]=0),tb=Sg,ub=92==(0|tb),!ub))){if(vb=ih,wb=32&vb,xb=0!=(0|wb)){if(zb=Sg,Ab=32==(0|zb))break;if(Bb=Sg,Cb=Bb-9|0,Db=Cb>>>0<5)break}Eb=g,Wk(Eb,92)}while(0);Fb=g,Gb=Sg,Wk(Fb,Gb);continue a}P=ch,R=P+1|0,ch=R,S=ch,T=S,U=g,V=U+44|0,W=0|f[V>>2],Y=W+4|0,Z=0|f[Y>>2],f[Z>>2]=T}while(0);if(qc=ih,rc=32&qc,sc=0!=(0|rc)){if(tc=Sg,uc=32==(0|tc)){mh=57;break}if(vc=Sg,wc=vc-9|0,xc=wc>>>0<5){mh=57;break}}ld=g,md=Sg,Wk(ld,md)}if(7==(0|mh)){if(Tf=g,Wk(Tf,10),Uf=g,Xk(Uf),Vf=g,Wf=Vf+32|0,Xf=0|f[Wf>>2],Yf=Xf+1|0,f[Wf>>2]=Yf,Zf=g,_f=Zf+36|0,f[_f>>2]=0,ag=$g,bg=0|d[ag>>0],cg=(255&bg)>>>1,dg=1&cg,ah=dg,eg=$g,fg=0|d[eg>>0],gg=fg&-3,hg=2|gg,d[eg>>0]=hg,ig=ah,kg=ig<<24>>24!=0){lg=g,mg=0|Zk(lg),gh=mg,ng=g,og=0|$k(ng),_g=og,pg=$g,qg=0|d[pg>>0],rg=1&qg,sg=rg<<24>>24!=0;a:do if(sg)for(;;){if(tg=gh,vg=0|d[tg>>0],wg=vg<<24>>24,xg=32==(0|wg)){if(b=_g,c=(0|b)>0,!c)break a}else if(yg=gh,zg=0|d[yg>>0],Ag=zg<<24>>24,Bg=Ag-9|0,Cg=Bg>>>0<5,Dg=_g,Eg=(0|Dg)>0,eh=Cg&Eg,!eh)break a;Gg=gh,Hg=Gg+1|0,gh=Hg,Ig=_g,Jg=Ig+-1|0,_g=Jg}while(0);if(Kg=_g,Lg=Kg-1|0,Mg=$g,Ng=Mg+12|0,Og=0|f[Ng>>2],Pg=(0|Lg)==(0|Og),Pg&&(i=gh,j=$g,k=j+8|0,n=0|f[k>>2],o=_g,p=o-1|0,q=0|hv(i,n,p),r=0==(0|q)))return e=365,Gf=e,l=nh,0|Gf}return s=Sg,t=(0|s)<0,t?(v=$g,w=v+8|0,x=0|f[w>>2],f[jh>>2]=x,0|Kv(Rg,256,56872,jh),y=g,Yk(y,Rg),e=0,Gf=e,l=nh,0|Gf):(z=g,A=g,B=0|Zk(A),C=g,D=0|$k(C),E=0|_k(z,B,D),G=g,H=G+1132|0,I=0|f[H>>2],f[I>>2]=E,e=369,Gf=e,l=nh,0|Gf)}if(20==(0|mh))return L=g,Yk(L,56926),e=0,Gf=e,l=nh,0|Gf;if(50==(0|mh))return Xk(Rb),Sb=g,Tb=Sb+40|0,f[Tb>>2]=0,Vb=g,Wb=Vb+72|0,Xb=0|d[Wb>>0],Yb=Xb&-2,Zb=1|Yb,d[Wb>>0]=Zb,$b=g,_b=g,ac=0|Zk(_b),bc=g,cc=0|$k(bc),ec=0|_k($b,ac,cc),fc=g,gc=fc+1132|0,hc=0|f[gc>>2],f[hc>>2]=ec,ic=$g,jc=0!=(0|ic),jc?(kc=$g,lc=0|d[kc>>0],mc=lc&-3,d[kc>>0]=mc,e=368,Gf=e,l=nh,0|Gf):(e=319,Gf=e,l=nh,0|Gf);if(57==(0|mh)){if(yc=g,Ac=0|$k(yc),Bc=0==(0|Ac),!Bc)return $c=g,_c=Sg,Vk($c,_c),ad=g,Xk(ad),bd=g,cd=g,dd=0|Zk(cd),fd=g,gd=0|$k(fd),hd=0|_k(bd,dd,gd),id=g,jd=id+1132|0,kd=0|f[jd>>2],f[kd>>2]=hd,e=320,Gf=e,l=nh,0|Gf;for(;;){if(Cc=Sg,Dc=10==(0|Cc),Dc&&(Ec=g,Fc=Ec+32|0,Gc=0|f[Fc>>2],Hc=Gc+1|0,f[Fc>>2]=Hc,Ic=g,Jc=Ic+36|0,f[Jc>>2]=0,Lc=g,el(Lc),Mc=g,Nc=Mc+1120|0,Oc=0|f[Nc>>2],Pc=0!=(0|Oc))){mh=60;break}if(Qc=g,Rc=0|Tk(Qc),Sg=Rc,Sc=Sg,Tc=32==(0|Sc),!Tc&&(Uc=Sg,Wc=Uc-9|0,Xc=Wc>>>0<5,!Xc)){mh=63;break}}if(60==(0|mh))return e=367,Gf=e,l=nh,0|Gf;if(63==(0|mh))return Yc=g,Zc=Sg,Vk(Yc,Zc),e=366,Gf=e,l=nh,0|Gf}else if(66==(0|mh)){if(nd=g,Xk(nd),od=g,rd=od+40|0,f[rd>>2]=1,sd=g,gl(sd),td=ih,ud=128&td,vd=0!=(0|ud))return wd=g,xd=g,yd=0|Zk(xd),zd=g,Ad=0|$k(zd),Cd=0|hl(wd,yd,Ad),Dd=g,Ed=Dd+1132|0,Fd=0|f[Ed>>2],f[Fd>>2]=Cd,e=316,Gf=e,l=nh,0|Gf;if(Gd=ih,Hd=4&Gd,Id=0!=(0|Hd),!Id)return wf=g,xf=g,yf=0|Zk(xf),zf=g,Af=0|$k(zf),Bf=0|_k(wf,yf,Af),Cf=g,Df=Cf+1132|0,Ef=0|f[Df>>2],f[Ef>>2]=Bf,e=318,Gf=e,l=nh,0|Gf;Xg=0,Jd=g,Kd=g,Ld=0|Zk(Kd),Nd=g,Od=0|$k(Nd),Pd=0|al(Jd,Ld,Od),hh=Pd,Yg=Zg,d[Ug>>0]=0,Qd=g,0|Sk(Qd);a:for(;;){if(Rd=g,Sd=0|Tk(Rd),fh=Sd,Td=fh,Ud=(0|Td)>=0,!Ud)break;if(Vd=fh,Wd=32|Vd,Yd=Wd-97|0,Zd=Yd>>>0<26,!Zd)break;switch($d=fh,0|$d){case 105:_d=Xg,ae=1|_d,Xg=ae;continue a;case 120:be=Xg,ce=2|be,Xg=ce;continue a;case 109:de=Xg,ee=4|de,Xg=ee;continue a;case 117:fe=Xg,he=16|fe,Xg=he;continue a;case 110:ie=Xg,je=32|ie,Xg=je;continue a;default:ke=g,le=fh,Wk(ke,le);continue a}}return me=g,ne=fh,Vk(me,ne),oe=g,pe=0|$k(oe),qe=0!=(0|pe),qe&&(se=g,Xk(se),te=g,ue=0|$k(te),ve=(0|ue)>1,we=ve?57056:75440,xe=g,ye=0|Zk(xe),f[kh>>2]=we,lh=kh+4|0,f[lh>>2]=ye,0|Kv(bh,128,57058,kh),ze=g,Yk(ze,bh)),Ae=Xg,Be=0!=(0|Ae),Be&&(De=Xg,Ee=1&De,Fe=0!=(0|Ee),Fe&&(Ge=Yg,He=Ge+1|0,Yg=He,d[Ge>>0]=105),Ie=Xg,Je=2&Ie,Ke=0!=(0|Je),Ke&&(Le=Yg,Me=Le+1|0,Yg=Me,d[Le>>0]=120),Oe=Xg,Pe=4&Oe,Qe=0!=(0|Pe),Qe&&(Re=Yg,Se=Re+1|0,Yg=Se,d[Re>>0]=109),Te=Xg,Ue=16&Te,Ve=0!=(0|Ue),Ve&&(d[Ug>>0]=117),We=Xg,Xe=32&We,Ze=0!=(0|Xe),Ze&&(d[Ug>>0]=110)),$e=Yg,_e=$e>>>0>Zg>>>0,_e?(af=g,bf=Yg,cf=bf,df=Zg,ef=cf-df|0,ff=0|al(af,Zg,ef),Tg=ff):Tg=0,gf=0|d[Ug>>0],jf=gf<<24>>24!=0,jf?(kf=g,lf=0|al(kf,Ug,1),Vg=lf):Vg=0,mf=g,nf=hh,of=Tg,pf=Vg,qf=0|il(mf,nf,of,pf),rf=g,sf=rf+1132|0,vf=0|f[sf>>2],f[vf>>2]=qf,e=317,Gf=e,l=nh,0|Gf}return 0}function Rk(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;return s=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,g=c,h=g+1120|0,i=0|f[h>>2],q=i,j=q,k=0==(0|j),k?(b=0,e=b,l=s,0|e):(n=q,o=0|f[n>>2],p=o+4|0,d=0|f[p>>2],b=d,e=b,l=s,0|e)}function Sk(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,k=0;return k=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=c+1108|0,f[d>>2]=0,e=b,g=e+36|0,h=0|f[g>>2],i=h-1|0,l=k,0|i}function Tk(a){a|=0;var b=0,c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,La=0;La=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,r=c,C=r+80|0,N=0|f[C>>2],Z=0!=(0|N),ia=c;do{if(!Z){if(v=ia+20|0,w=0|f[v>>2],x=0!=(0|w),y=c,x){if(z=y+20|0,A=0|f[z>>2],B=0|Uv(A),D=0!=(0|B),!D&&(E=c,F=E+20|0,G=0|f[F>>2],H=0|Yv(G),Ia=H,I=Ia,J=(0|I)==-1,!J))break}else if(K=y+12|0,L=0|f[K>>2],M=0!=(0|L),M&&(O=c,P=O+12|0,Q=0|f[P>>2],R=c,S=R+16|0,T=0|f[S>>2],U=Q>>>0>=T>>>0,!U)){V=c,W=V+12|0,Y=0|f[W>>2],$=Y+1|0,f[W>>2]=$,_=0|d[Y>>0],aa=255&_,Ia=aa;break}return sa=c,ua=sa+24|0,va=0|f[ua>>2],(wa=0!=(0|va))?(xa=c,ya=xa+24|0,za=0|f[ya>>2],Aa=za+16|0,Ba=0|f[Aa>>2],Ca=c,Da=0|bx[255&Ba](Ca),Fa=(0|Da)<0,Fa?(b=-1,Ga=b,l=La,0|Ga):(b=-2,Ga=b,l=La,0|Ga)):(b=-1,Ga=b,l=La,0|Ga)}ta=ia+80|0,Ea=0|f[ta>>2],Ha=0|f[Ea>>2],e=Ha,Ia=e,g=c,h=g+80|0,i=0|f[h>>2],Ja=i,j=c,k=j+80|0,n=0|f[k>>2],o=n+4|0,p=0|f[o>>2],q=c,s=q+80|0,f[s>>2]=p,t=c,u=Ja,Uk(t,u)}while(0);return ba=Ia,ca=(0|ba)>=0,ca&&(da=c,ea=da+36|0,fa=0|f[ea>>2],ga=fa+1|0,f[ea>>2]=ga),ha=Ia,(ja=13==(0|ha))?(ka=c,la=0|Tk(ka),Ia=la,ma=Ia,na=10!=(0|ma),na?(oa=c,pa=Ia,Vk(oa,pa),b=13,Ga=b,l=La,0|Ga):(qa=Ia,b=qa,Ga=b,l=La,0|Ga)):(ra=Ia,b=ra,Ga=b,l=La,0|Ga)}function Uk(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;q=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,g=e+8|0,h=0|f[g>>2],i=d,j=i+4|0,f[j>>2]=h,k=d,n=c,o=n+8|0,f[o>>2]=k,l=q}function Vk(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,x=0;x=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,o=d,p=(0|o)>=0,p&&(q=c,r=q+36|0,s=0|f[r>>2],t=s+-1|0,f[r>>2]=t),u=c,v=d,e=v,g=c,h=g+80|0,i=0|f[h>>2],j=0|Jk(u,e,i),k=c,n=k+80|0,f[n>>2]=j,l=x}function Wk(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ja=0;Ja=l,l=l+32|0,(0|l)>=(0|m)&&X(),Ha=Ja+16|0,c=a,e=b,s=e,D=(0|s)>=0,O=e;do{if(!D){if(ja=0-O|0,e=ja,ua=e,Da=(0|ua)<128,Ea=e,Da){g=255&Ea,d[Ha>>0]=g,Ga=1;break}if(h=(0|Ea)<2048,i=e,h){j=i>>6,k=192|j,n=255&k,d[Ha>>0]=n,o=e,p=63&o,q=128|p,r=255&q,t=Ha+1|0,d[t>>0]=r,Ga=2;break}if(u=(0|i)<65536,v=e,u){w=v>>12,x=224|w,y=255&x,d[Ha>>0]=y,z=e,A=z>>6,B=63&A,C=128|B,E=255&C,F=Ha+1|0,d[F>>0]=E,G=e,H=63&G,I=128|H,J=255&I,K=Ha+2|0,d[K>>0]=J,Ga=3;break}L=v>>18,M=240|L,N=255&M,d[Ha>>0]=N,P=e,Q=P>>12,R=63&Q,S=128|R,T=255&S,U=Ha+1|0,d[U>>0]=T,V=e,W=V>>6,Y=63&W,Z=128|Y,_=255&Z,aa=Ha+2|0,d[aa>>0]=_,ba=e,ca=63&ba,da=128|ca,ea=255&da,fa=Ha+3|0,d[fa>>0]=ea,Ga=4;break}$=255&O,d[Ha>>0]=$,Ga=1}while(0);if(ga=c,ha=ga+1108|0,ia=0|f[ha>>2],ka=Ga,la=ia+ka|0,ma=la>>>0<=1024,!ma)return void(l=Ja);for(Fa=0;;){if(na=Fa,oa=Ga,pa=na>>>0<oa>>>0,!pa)break;qa=Fa,ra=Ha+qa|0,sa=0|d[ra>>0],ta=c,va=ta+1108|0,wa=0|f[va>>2],xa=wa+1|0,f[va>>2]=xa,ya=c,za=ya+84|0,Aa=za+wa|0,d[Aa>>0]=sa,Ba=Fa,Ca=Ba+1|0,Fa=Ca}l=Ja}function Xk(a){a|=0;var b=0,c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;v=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,i=c+1108|0,j=0|f[i>>2],s=j,t=1023,k=s,n=t,o=(0|k)>(0|n),o&&(p=t,s=p,q=b,Yk(q,56813)),r=s,e=b,g=e+84|0,h=g+r|0,d[h>>0]=0,l=v}function Yk(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ka=0;return Ka=l,l=l+48|0,(0|l)>=(0|m)&&X(),Da=Ka+16|0,Ca=Ka,c=a,e=b,s=c,D=s+1148|0,O=0|d[D>>0],$=(255&O)>>>1,ja=1&$,ua=ja<<24>>24!=0,ya=c,ua?(C=ya+1136|0,E=0|f[C>>2],(F=E>>>0<10)?(G=e,H=0|Jv(G),Ba=H,I=c,J=Ba,K=J+1|0,L=0|Ik(I,K),Aa=L,M=Aa,N=e,P=Ba,Q=P+1|0,0|sw(0|M,0|N,0|Q),R=Aa,S=c,T=S+1136|0,U=0|f[T>>2],V=c,W=V+1152|0,Y=W+(12*U|0)|0,Z=Y+8|0,f[Z>>2]=R,_=c,aa=_+32|0,ba=0|f[aa>>2],ca=c,da=ca+1136|0,ea=0|f[da>>2],fa=c,ga=fa+1152|0,ha=ga+(12*ea|0)|0,f[ha>>2]=ba,ia=c,ka=ia+36|0,la=0|f[ka>>2],ma=c,na=ma+1136|0,oa=0|f[na>>2],pa=c,qa=pa+1152|0,ra=qa+(12*oa|0)|0,sa=ra+4|0,f[sa>>2]=la,ta=c,va=ta+1136|0,wa=0|f[va>>2],xa=wa+1|0,f[va>>2]=xa,void(l=Ka)):(ta=c,va=ta+1136|0,wa=0|f[va>>2],xa=wa+1|0,f[va>>2]=xa,void(l=Ka))):(za=ya+28|0,g=0|f[za>>2],h=0!=(0|g),i=0|f[637],j=c,h?(k=j+28|0,n=0|f[k>>2],o=c,p=o+32|0,q=0|f[p>>2],r=c,t=r+36|0,u=0|f[t>>2],v=e,f[Ca>>2]=n,Ea=Ca+4|0,f[Ea>>2]=q,Fa=Ca+8|0,f[Fa>>2]=u,Ga=Ca+12|0,f[Ga>>2]=v,0|Vv(i,56841,Ca),ta=c,va=ta+1136|0,wa=0|f[va>>2],xa=wa+1|0,f[va>>2]=xa,void(l=Ka)):(w=j+32|0,x=0|f[w>>2],y=c,z=y+36|0,A=0|f[z>>2],B=e,f[Da>>2]=x,Ha=Da+4|0,f[Ha>>2]=A,Ia=Da+8|0,f[Ia>>2]=B,0|Vv(i,56856,Da),ta=c,va=ta+1136|0,wa=0|f[va>>2],xa=wa+1|0,f[va>>2]=xa,void(l=Ka)))}function Zk(a){a|=0;var b=0,c=0,d=0,f=0;return f=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=c+84|0,l=f,0|d}function $k(a){a|=0;var b=0,c=0,d=0,e=0,h=0;return h=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=c+1108|0,e=0|f[d>>2],l=h,0|e}function _k(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;return t=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,i=c,j=d,k=d,n=d,o=e,p=i,q=0|al(n,o,p),r=i,f=r,g=0|Jk(k,q,f),h=0|Jk(j,55,g),l=t,0|h}function al(a,b,c){a|=0,b|=0,c|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;return w=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,k=c,n=e,o=k,p=o+1|0,q=0|Ik(n,p),u=q,r=u,s=f,t=k,0|sw(0|r,0|s,0|t),g=k,h=u,i=h+g|0,d[i>>0]=0,j=u,l=w,0|j}function bl(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0;Rc=l,l=l+96|0,(0|l)>=(0|m)&&X(),Ic=Rc+60|0,Mc=Rc+56|0,Jc=Rc+48|0,Nc=Rc+40|0,Kc=Rc+4|0,Oc=Rc,c=a,ab=c,lb=0|Tk(ab),Lc=lb;a:do switch(0|lb){case 92:return wb=Lc,b=wb,_a=b,l=Rc,0|_a;case 110:return b=10,_a=b,l=Rc,0|_a;case 116:return b=9,_a=b,l=Rc,0|_a;case 114:return b=13,_a=b,l=Rc,0|_a;case 102:return b=12,_a=b,l=Rc,0|_a;case 118:return b=11,_a=b,l=Rc,0|_a;case 97:return b=7,_a=b,l=Rc,0|_a;case 101:return b=27,_a=b,l=Rc,0|_a;case 55:case 54:case 53:case 52:case 51:case 50:case 49:case 48:for(Hb=Lc,f[Ic>>2]=Hb,f[Mc>>2]=1;;){if(Sb=0|f[Mc>>2],bc=(0|Sb)<3,!bc)break;if(mc=c,xc=0|Tk(mc),d=0|f[Mc>>2],r=Ic+(d<<2)|0,f[r>>2]=xc,C=0|f[Mc>>2],N=Ic+(C<<2)|0,Z=0|f[N>>2],ia=(0|Z)<0)break a;if(ta=0|f[Mc>>2],Ea=Ic+(ta<<2)|0,Pa=0|f[Ea>>2],$a=(0|Pa)<48){Qc=15;break}if(bb=0|f[Mc>>2],cb=Ic+(bb<<2)|0,db=0|f[cb>>2],eb=55<(0|db)){Qc=15;break}jb=0|f[Mc>>2],kb=jb+1|0,f[Mc>>2]=kb}return 15==(0|Qc)&&(fb=c,gb=0|f[Mc>>2],hb=Ic+(gb<<2)|0,ib=0|f[hb>>2],Vk(fb,ib)),mb=0|f[Mc>>2],nb=0|cl(Ic,mb,Mc),Lc=nb,ob=Lc,b=ob,_a=b,l=Rc,0|_a;case 120:for(f[Nc>>2]=0;;){if(pb=0|f[Nc>>2],qb=(0|pb)<2,!qb)break;if(rb=c,sb=0|Tk(rb),tb=0|f[Nc>>2],ub=Jc+(tb<<2)|0,f[ub>>2]=sb,vb=0|f[Nc>>2],xb=Jc+(vb<<2)|0,yb=0|f[xb>>2],zb=(0|yb)<0)break a;if(Ab=0|f[Nc>>2],Bb=Jc+(Ab<<2)|0,Cb=0|f[Bb>>2],Db=Cb-48|0,Eb=Db>>>0<10,!Eb&&(Fb=0|f[Nc>>2],Gb=Jc+(Fb<<2)|0,Ib=0|f[Gb>>2],Jb=32|Ib,Kb=Jb-97|0,Lb=Kb>>>0<6,!Lb)){Qc=23;break}Qb=0|f[Nc>>2],Rb=Qb+1|0,f[Nc>>2]=Rb}return 23==(0|Qc)&&(Mb=c,Nb=0|f[Nc>>2],Ob=Jc+(Nb<<2)|0,Pb=0|f[Ob>>2],Vk(Mb,Pb)),Tb=0|f[Nc>>2],Ub=0|dl(Jc,Tb,Nc),Lc=Ub,Vb=0|f[Nc>>2],Wb=0==(0|Vb),Wb?(Xb=c,Yk(Xb,56997),b=0,_a=b,l=Rc,0|_a):(Yb=Lc,b=Yb,_a=b,l=Rc,0|_a);case 117:if(f[Oc>>2]=0,Zb=c,$b=0|Tk(Zb),f[Kc>>2]=$b,_b=0|f[Kc>>2],ac=(0|_b)<0,!ac){cc=0|f[Kc>>2],dc=123==(0|cc);b:do{if(dc){for(f[Oc>>2]=0;;){if(ec=0|f[Oc>>2],fc=(0|ec)<9,!fc)break b;if(gc=c,hc=0|Tk(gc),ic=0|f[Oc>>2],jc=Kc+(ic<<2)|0,f[jc>>2]=hc,kc=0|f[Oc>>2],lc=Kc+(kc<<2)|0,nc=0|f[lc>>2],oc=(0|nc)<0)break a;if(pc=0|f[Oc>>2],qc=Kc+(pc<<2)|0,rc=0|f[qc>>2],sc=125==(0|rc))break b;if(tc=0|f[Oc>>2],uc=Kc+(tc<<2)|0,vc=0|f[uc>>2],wc=vc-48|0,yc=wc>>>0<10,!yc&&(zc=0|f[Oc>>2],Ac=Kc+(zc<<2)|0,Bc=0|f[Ac>>2],Cc=32|Bc,Dc=Cc-97|0,Ec=Dc>>>0<6,!Ec))break;h=0|f[Oc>>2],i=h+1|0,f[Oc>>2]=i}return Fc=c,Yk(Fc,56997),Gc=c,Hc=0|f[Oc>>2],e=Kc+(Hc<<2)|0,g=0|f[e>>2],Vk(Gc,g),b=0,_a=b,l=Rc,0|_a}if(j=0|f[Kc>>2],k=j-48|0,n=k>>>0<10,!n&&(o=0|f[Kc>>2],p=32|o,q=p-97|0,s=q>>>0<6,!s)){W=c,Y=0|f[Kc>>2],Vk(W,Y);break}for(f[Oc>>2]=1;;){if(t=0|f[Oc>>2],u=(0|t)<4,!u)break b;if(v=c,w=0|Tk(v),x=0|f[Oc>>2],y=Kc+(x<<2)|0,f[y>>2]=w,z=0|f[Oc>>2],A=Kc+(z<<2)|0,B=0|f[A>>2],D=(0|B)<0)break a;if(E=0|f[Oc>>2],F=Kc+(E<<2)|0,G=0|f[F>>2],H=G-48|0,I=H>>>0<10,!I&&(J=0|f[Oc>>2],K=Kc+(J<<2)|0,L=0|f[K>>2],M=32|L,O=M-97|0,P=O>>>0<6,!P))break;U=0|f[Oc>>2],V=U+1|0,f[Oc>>2]=V}Q=c,R=0|f[Oc>>2],S=Kc+(R<<2)|0,T=0|f[S>>2],Vk(Q,T)}while(0);return $=0|f[Oc>>2],_=0|dl(Kc,$,Oc),Lc=_,aa=0|f[Oc>>2],(ba=0==(0|aa))?(ca=c,Yk(ca,56997),b=0,_a=b,l=Rc,0|_a):(da=Lc,ea=(0|da)<0,fa=Lc,ga=(0|fa)>1114111,Pc=ea|ga,Pc||(ha=Lc,ja=ha&-2048,ka=55296==(0|ja))?(la=c,Yk(la,57029),b=0,_a=b,l=Rc,0|_a):(ma=Lc,na=0-ma|0,b=na,_a=b,l=Rc,0|_a))}break;case 98:return b=8,_a=b,l=Rc,0|_a;case 115:return b=32,_a=b,l=Rc,0|_a;case 77:if(oa=c,pa=0|Tk(oa),Lc=pa,qa=45!=(0|pa),ra=c,qa)return Yk(ra,56997),sa=c,ua=Lc,Vk(sa,ua),b=0,_a=b,l=Rc,0|_a;if(va=0|Tk(ra),Lc=va,wa=92==(0|va))return xa=c,ya=0|bl(xa),za=128|ya,b=za,_a=b,l=Rc,0|_a;if(Aa=Lc,Ba=(0|Aa)<0,!Ba)return Ca=Lc,Da=255&Ca,Fa=128|Da,b=Fa,_a=b,l=Rc,0|_a;break;case 67:if(Ga=c,Ha=0|Tk(Ga),Lc=Ha,Ia=45!=(0|Ha))return Ja=c,Yk(Ja,56997),Ka=c,La=Lc,Vk(Ka,La),b=0,_a=b,l=Rc,0|_a;Qc=64;break;case 99:Qc=64;break;case-2:case-1:break;default:return Za=Lc,b=Za,_a=b,l=Rc,0|_a}while(0);a:do if(64==(0|Qc)){Ma=c,Na=0|Tk(Ma),Lc=Na,Oa=92==(0|Na);do{if(!Oa){if(Sa=Lc,Ta=63==(0|Sa),!Ta){if(Ua=Lc,Va=(0|Ua)<0)break a;break}return b=127,_a=b,l=Rc,0|_a}Qa=c,Ra=0|bl(Qa),Lc=Ra}while(0);return Wa=Lc,Xa=159&Wa,b=Xa,_a=b,l=Rc,0|_a}while(0);return Ya=c,Yk(Ya,56997),b=0,_a=b,l=Rc,0|_a}function cl(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,M=0;for(M=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,C=d,K=C,J=0;;){if(D=e,E=D+-1|0,e=E,F=0!=(0|D),!F)break;if(G=K,H=0|f[G>>2],I=(0|H)>=48,!I)break;if(g=K,h=0|f[g>>2],i=(0|h)<=55,!i)break;j=J,k=j<<3,J=k,n=K,o=n+4|0,K=o,p=0|f[n>>2],q=p-48|0,r=J,t=r|q,J=t}return u=K,v=d,w=u,x=v,y=w-x|0,z=(0|y)/4&-1,A=s,f[A>>2]=z,B=J,l=M,0|B}function dl(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0;for(Q=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,D=d,N=D,M=0;;){if(G=e,H=G+-1|0,e=H,I=0!=(0|G),!I)break;if(J=N,K=0|f[J>>2],L=0!=(0|K),!L)break;if(g=N,h=0|f[g>>2],i=0|Mv(56964,h),O=i,j=0!=(0|i),!j)break;k=M,n=k<<4,M=n,o=O,p=o,q=p-56964|0,r=15&q,t=M,u=t|r,M=u,v=N,w=v+4|0,N=w}return x=N,y=d,z=x,A=y,B=z-A|0,C=(0|B)/4&-1,E=s,f[E>>2]=C,F=M,l=Q,0|F}function el(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,cb=0;if(cb=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,r=c+1116|0,C=0|f[r>>2],N=0==(0|C))return void(l=cb);Z=b,ia=Z+1120|0,ta=0|f[ia>>2],Ea=0==(0|ta),Pa=b,d=Pa+1116|0,g=0|f[d>>2];do if(Ea){if(h=b,i=h+1120|0,f[i>>2]=g,j=b,k=j+44|0,n=0|f[k>>2],o=b,p=o+1124|0,f[p>>2]=n,q=b,s=b,t=0|Rk(s),u=t+4|0,v=0|f[u>>2],w=0|fl(q,v,0,0),x=b,y=x+44|0,f[y>>2]=w,z=b,A=z+1112|0,B=0|f[A>>2],_a=B,D=_a,E=0!=(0|D),!E){S=b,T=S+1120|0,U=0|f[T>>2],V=b,W=V+1112|0,f[W>>2]=U;break}for(;;){if(F=_a,G=F+4|0,H=0|f[G>>2],I=0!=(0|H),!I)break;J=_a,K=J+4|0,L=0|f[K>>2],_a=L}M=b,O=M+1120|0,P=0|f[O>>2],Q=_a,R=Q+4|0,f[R>>2]=P}else{for($a=g;;){if(Y=$a,$=Y+4|0,_=0|f[$>>2],aa=0!=(0|_),!aa)break;ba=$a,ca=ba+4|0,da=0|f[ca>>2],$a=da}if(ea=b,fa=ea+1112|0,ga=0|f[fa>>2],ab=ga,ha=ab,ja=b,ka=ja+1120|0,la=0|f[ka>>2],ma=(0|ha)==(0|la)){na=ab,oa=$a,pa=oa+4|0,f[pa>>2]=na,qa=b,ra=qa+1116|0,sa=0|f[ra>>2],ua=b,va=ua+1112|0,f[va>>2]=sa,wa=b,xa=wa+1116|0,ya=0|f[xa>>2],za=b,Aa=za+1120|0,f[Aa>>2]=ya;break}for(;;){if(Ba=ab,Ca=Ba+4|0,Da=0|f[Ca>>2],Fa=b,Ga=Fa+1120|0,Ha=0|f[Ga>>2],Ia=(0|Da)!=(0|Ha),Ja=ab,Ka=Ja+4|0,La=0|f[Ka>>2],!Ia)break;ab=La}Ma=$a,Na=Ma+4|0,f[Na>>2]=La,Oa=b,Qa=Oa+1116|0,Ra=0|f[Qa>>2],Sa=ab,Ta=Sa+4|0,f[Ta>>2]=Ra,Ua=b,Va=Ua+1116|0,Wa=0|f[Va>>2],Xa=b,Ya=Xa+1120|0,f[Ya>>2]=Wa}while(0);Za=b,e=Za+1116|0,f[e>>2]=0,l=cb}function fl(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,x=0;return x=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,o=c,p=d,q=e,r=f,s=r,t=e,u=e,v=p,g=v,h=o,i=h,j=0|Jk(u,g,i),k=0|Jk(t,0,j),n=0|Jk(q,s,k),l=x,0|n}function gl(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0;A=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,q=b,s=q+44|0,t=0|f[s>>2],u=t+4|0,v=0|f[u>>2],w=v+4|0,x=0|f[w>>2],Uk(c,x),y=b,d=b,e=d+44|0,g=0|f[e>>2],h=g+4|0,i=0|f[h>>2],Uk(y,i),j=b,k=b,n=k+44|0,o=0|f[n>>2],Uk(j,o),p=b,r=p+44|0,f[r>>2]=0,l=A}function hl(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;return t=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,i=c,j=d,k=d,n=d,o=e,p=i,q=0|al(n,o,p),r=i,f=r,g=0|Jk(k,q,f),h=0|Jk(j,57,g),l=t,0|h}function il(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,j=c,k=d,n=e,o=e,p=f,q=e,r=j,s=k,g=0|Jk(q,r,s),h=0|Jk(o,p,g),i=0|Jk(n,59,h),l=u,0|i}function jl(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0;for(q=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b;;){if(e=c,f=0|Tk(e),o=f,g=o,h=(0|g)<0){p=4;break}if(i=o,j=d,k=j<<24>>24,n=(0|i)==(0|k)){p=4;break}}if(4==(0|p))return void(l=q)}function kl(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,g=c,h=d,i=0|f[h>>2],j=e,k=g,n=0|hi(i,j,k),l=p,0|n}function ll(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,k=0;return k=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=k+4|0,c=a,d[e>>0]=b,g=c,h=0|f[g>>2],i=0|hi(h,e,1),l=k,0|i}function ml(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,h=0;h=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,nl(e,f),l=h}function nl(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ka=0;return Ka=l,l=l+48|0,(0|l)>=(0|m)&&X(),Da=Ka+16|0,Ca=Ka,c=a,e=b,s=c,D=s+1148|0,O=0|d[D>>0],$=(255&O)>>>1,ja=1&$,ua=ja<<24>>24!=0,ya=c,ua?(C=ya+1140|0,E=0|f[C>>2],(F=E>>>0<10)?(G=e,H=0|Jv(G),Ba=H,I=c,J=Ba,K=J+1|0,L=0|Ik(I,K),Aa=L,M=Aa,N=e,P=Ba,Q=P+1|0,0|sw(0|M,0|N,0|Q),R=Aa,S=c,T=S+1140|0,U=0|f[T>>2],V=c,W=V+1272|0,Y=W+(12*U|0)|0,Z=Y+8|0,f[Z>>2]=R,_=c,aa=_+32|0,ba=0|f[aa>>2],ca=c,da=ca+1140|0,ea=0|f[da>>2],fa=c,ga=fa+1272|0,ha=ga+(12*ea|0)|0,f[ha>>2]=ba,ia=c,ka=ia+36|0,la=0|f[ka>>2],ma=c,na=ma+1140|0,oa=0|f[na>>2],pa=c,qa=pa+1272|0,ra=qa+(12*oa|0)|0,sa=ra+4|0,f[sa>>2]=la,ta=c,va=ta+1140|0,wa=0|f[va>>2],xa=wa+1|0,f[va>>2]=xa,void(l=Ka)):(ta=c,va=ta+1140|0,wa=0|f[va>>2],xa=wa+1|0,f[va>>2]=xa,void(l=Ka))):(za=ya+28|0,g=0|f[za>>2],h=0!=(0|g),i=0|f[637],j=c,h?(k=j+28|0,n=0|f[k>>2],o=c,p=o+32|0,q=0|f[p>>2],r=c,t=r+36|0,u=0|f[t>>2],v=e,f[Ca>>2]=n,Ea=Ca+4|0,f[Ea>>2]=q,Fa=Ca+8|0,f[Fa>>2]=u,Ga=Ca+12|0,f[Ga>>2]=v,0|Vv(i,56841,Ca),ta=c,va=ta+1140|0,wa=0|f[va>>2],xa=wa+1|0,f[va>>2]=xa,void(l=Ka)):(w=j+32|0,x=0|f[w>>2],y=c,z=y+36|0,A=0|f[z>>2],B=e,f[Da>>2]=x,Ha=Da+4|0,f[Ha>>2]=A,Ia=Da+8|0,f[Ia>>2]=B,0|Vv(i,56856,Da),ta=c,va=ta+1140|0,wa=0|f[va>>2],xa=wa+1|0,f[va>>2]=xa,void(l=Ka)))}function ol(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0;if($=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,s=b,D=s,O=0|Jv(D),W=O,R=e,S=R+20|0,T=0|f[S>>2],U=0!=(0|T),!U)return u=e,v=u+12|0,w=0|f[v>>2],x=0!=(0|w),x&&(y=e,z=y+12|0,A=0|f[z>>2],B=W,C=A+B|0,E=e,F=E+16|0,G=0|f[F>>2],H=C>>>0<=G>>>0,H&&(I=e,J=I+12|0,K=0|f[J>>2],L=s,M=W,N=0|iv(K,L,M),P=0==(0|N)))?(c=1,Q=c,l=$,0|Q):(c=0,Q=c,l=$,0|Q);for(Y=0;;){if(V=s,g=0|d[V>>0],h=g<<24>>24!=0,!h){Z=6;break}if(i=e,j=s,k=j+1|0,s=k,n=0|d[j>>0],o=n<<24>>24,p=Y,q=p+1|0,Y=q,r=0|pl(i,o,p),t=r<<24>>24!=0,!t){Z=5;break}}return 5==(0|Z)?(c=0,Q=c,l=$,0|Q):6==(0|Z)?(c=1,Q=c,l=$,0|Q):0}function pl(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;return t=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,i=c,j=d,k=i,n=0|ql(j,k),o=e,p=(0|n)==(0|o),q=e,r=(0|q)>=0,f=p?r:0,g=1&f,h=255&g,l=t,0|h}function ql(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;for(R=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,r=b,P=0;;){if(C=d,I=0|Tk(C),O=I,J=O,K=(0|J)==-1){Q=3;break}if(M=d,N=P,e=d,g=O,h=g,i=0|Lk(e,h),j=0|Mk(M,N,i),P=j,k=r,n=k+-1|0,r=n,o=0!=(0|k),!o)break}return 3==(0|Q)?(L=O,c=L,H=c,l=R,0|H):(p=d,q=p+80|0,s=0|f[q>>2],t=0!=(0|s),t?(u=d,v=P,w=d,x=w+80|0,y=0|f[x>>2],z=0|Mk(u,v,y),A=d,B=A+80|0,f[B>>2]=z):(D=P,E=d,F=E+80|0,f[F>>2]=D),G=O,c=G,H=c,l=R,0|H)}function rl(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0;for(_=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,s=b;;){if(D=e,O=0|Tk(D),Y=O,S=Y,T=(0|S)<0,U=Y,T){$=3;break}if(W=10==(0|U),W&&(g=e,h=g+32|0,i=0|f[h>>2],j=i+1|0,f[h>>2]=j,k=e,n=k+36|0,f[n>>2]=0),o=Y,p=s,q=0|d[p>>0],r=q<<24>>24,t=(0|o)==(0|r)){if(u=s,v=u+1|0,s=v,w=e,x=s,y=0|ol(w,x),z=y<<24>>24!=0,A=s,z)break;Q=A+-1|0,s=Q}}if(3==(0|$))return V=255&U,c=V,R=c,l=_,0|R;for(B=0|Jv(A),Z=B;;){if(C=Z,E=C+-1|0,Z=E,F=0!=(0|C),!F)break;G=e,H=0|Tk(G),I=10==(0|H),I&&(J=e,K=J+32|0,L=0|f[K>>2],M=L+1|0,f[K>>2]=M,N=e,P=N+36|0,f[P>>2]=0)}return c=1,R=c,l=_,0|R}function sl(a){a|=0;var b=0,c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0;if(Pb=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,Nb=65,Cb=0,Lb=0,U=c,ea=0|Tk(U),Bb=ea,pa=Bb,Aa=32==(0|pa),!Aa&&(La=Bb,Wa=La-9|0,fb=Wa>>>0<5,qb=Bb,e=61==(0|qb),Fb=fb|e,!Fb)){if(N=Bb,O=45==(0|N),O&&(Cb=1,P=c,Q=0|Tk(P),Bb=Q),R=Bb,S=39==(0|R),T=Bb,V=34==(0|T),Gb=S|V,W=Bb,Gb){for(Mb=W,Y=Bb,Z=39==(0|Y),Z&&(Lb=1),$=c,0|Sk($);;){if(_=c,aa=0|Tk(_),Bb=aa,ba=(0|aa)>=0,!ba)break;if(ca=Bb,da=Mb,fa=(0|ca)!=(0|da),!fa)break;if(ga=Bb,ha=10==(0|ga)){Ob=13;break}ia=c,ja=Bb,Wk(ia,ja)}if(13==(0|Ob)&&(Bb=-1),ka=Bb,la=(0|ka)<0)return ma=c,Yk(ma,57167),b=0,M=b,l=Pb,0|M}else{if(na=(0|W)<0)return b=0,M=b,l=Pb,0|M;if(oa=Bb,qa=32|oa,ra=qa-97|0,sa=ra>>>0<26,!sa&&(ta=Bb,ua=ta-48|0,va=ua>>>0<10,wa=Bb,xa=95==(0|wa),Hb=va|xa,Ib=1^Hb,ya=Bb,za=ya>>>0<=127,Jb=Ib&za))return Ba=c,Ca=Bb,Vk(Ba,Ca),Da=Cb,Ea=Da<<24>>24!=0,Ea&&(Fa=c,Vk(Fa,45)),b=0,M=b,l=Pb,0|M;for(Ga=c,0|Sk(Ga);;){if(Ha=c,Ia=Bb,Wk(Ha,Ia),Ja=c,Ka=0|Tk(Ja),Bb=Ka,Ma=(0|Ka)>=0,!Ma)break;if(Na=Bb,Oa=32|Na,Pa=Oa-97|0,Qa=Pa>>>0<26,!Qa&&(Ra=Bb,Sa=Ra-48|0,Ta=Sa>>>0<10,Ua=Bb,Va=95==(0|Ua),Kb=Ta|Va,!Kb&&(Xa=Bb,Ya=Xa>>>0<=127,Za=1^Ya,!Za)))break}$a=c,_a=Bb,Vk($a,_a)}return ab=c,Xk(ab),bb=c,cb=0|tl(bb),Eb=cb,db=Eb,eb=db+4|0,gb=0|f[eb>>2],Db=gb,hb=c,ib=c,jb=0|Zk(ib),kb=c,lb=0|$k(kb),mb=0|al(hb,jb,lb),nb=Db,ob=nb+8|0,f[ob>>2]=mb,pb=c,rb=0|$k(pb),sb=Db,tb=sb+12|0,f[tb>>2]=rb,ub=Lb,vb=ub<<24>>24!=0,vb||(wb=Nb,xb=2|wb,Nb=xb),yb=Nb,zb=Db,Ab=zb+4|0,f[Ab>>2]=yb,g=Cb,h=Db,i=0|d[h>>0],j=1&g,k=i&-2,n=k|j,d[h>>0]=n,o=Db,p=0|d[o>>0],q=p&-3,r=2|q,d[o>>0]=r,t=Db,u=t+16|0,f[u>>2]=0,v=c,w=c,x=w+1116|0,y=0|f[x>>2],z=c,A=Eb,B=0|Lk(z,A),C=0|Mk(v,y,B),E=c,F=E+1116|0,f[F>>2]=C,G=c,H=G+40|0,f[H>>2]=1,I=Eb,J=c,
+K=J+1132|0,L=0|f[K>>2],f[L>>2]=I,b=364,M=b,l=Pb,0|M}return s=c,D=Bb,Vk(s,D),b=0,M=b,l=Pb,0|M}function tl(a){a|=0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0;return j=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=0|Ik(c,20),h=d,e=b,f=h,g=0|Jk(e,99,f),l=j,0|g}function ul(a){a|=0;var b=0,c=0,e=0;return e=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,ml(c,57312),l=e,1}function vl(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=d,i=e,j=0|wl(h,i),k=f,n=k,o=0|xl(g,50,j,n),l=q,0|o}function wl(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0;return k=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=d,h=0|Jv(g),i=0|al(e,f,h),l=k,0|i}function xl(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,j=c,k=d,n=e,o=f,p=e,q=j,r=e,s=k,g=0|Jk(r,s,0),h=0|Jk(p,q,g),i=0|Jk(n,o,h),l=u,0|i}function yl(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+272|0,(0|l)>=(0|m)&&X(),n=p,k=p+16|0,d=a,e=b,g=c,h=e,i=g,f[n>>2]=i,0|Kv(k,256,h,n),j=d,Yk(j,k),l=p}function zl(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+272|0,(0|l)>=(0|m)&&X(),n=p,k=p+16|0,d=a,e=b,g=c,h=e,i=g,f[n>>2]=i,0|Kv(k,256,h,n),j=d,ml(j,k),l=p}function Al(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0;return k=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=c,g=d,h=0|wl(f,g),i=0|Jk(e,51,h),l=k,0|i}function Bl(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,k=0;return k=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,g=0|f[e>>2],h=d,i=0|li(g,h),l=k,0|i}function Cl(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;return j=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=f,h=0|Jk(e,46,g),l=j,0|h}function Dl(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;return j=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=f,h=0|Jk(e,45,g),l=j,0|h}function El(a){a|=0;var b=0,c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,e=c+1108|0,g=0|f[e>>2],h=g-1|0,i=b,j=i+84|0,k=j+h|0,n=0|d[k>>0],o=n<<24>>24,l=q,0|o}function Fl(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0;return S=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,s=b,D=s,H=D>>>0<=12,I=s,J=I>>>0>=2,O=H&J,O&&(K=e,L=s,M=0|Gl(K,L),N=M,g=N,h=(0|g)<=50,i=N,j=(0|i)>=0,P=h&j,P&&(k=N,n=504+(k<<4)|0,o=0|f[n>>2],Q=o,p=e,q=0|d[p>>0],r=q<<24>>24,t=Q,u=0|d[t>>0],v=u<<24>>24,w=(0|r)==(0|v),w&&(x=e,y=x+1|0,z=Q,A=z+1|0,B=0|yv(y,A),C=0!=(0|B),!C)))?(E=N,F=504+(E<<4)|0,c=F,G=c,l=S,0|G):(c=0,G=c,l=S,0|G)}function Gl(a,b){a|=0,b|=0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0;return P=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,s=f,M=s,D=M,c=D+-1|0,N=c>>>0<2,N||(G=e,H=G+2|0,I=0|d[H>>0],J=255&I,K=57895+J|0,L=0|d[K>>0],g=255&L,h=M,i=h+g|0,M=i),j=e,k=0|d[j>>0],n=255&k,o=57895+n|0,p=0|d[o>>0],q=255&p,r=M,t=r+q|0,M=t,u=M,v=f,w=v-1|0,x=e,y=x+w|0,z=0|d[y>>0],A=255&z,B=57895+A|0,C=0|d[B>>0],E=255&C,F=u+E|0,l=P,0|F}function Hl(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,o=0;return o=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=c,g=c,h=0|Il(g),i=d,j=0|Jk(f,h,i),k=0|Jk(e,3,j),l=o,0|k}function Il(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=c+76|0,e=0|f[d>>2],(g=0!=(0|e))?(h=b,i=h+76|0,j=0|f[i>>2],k=0|f[j>>2],n=k,l=p,0|n):(n=0,l=p,0|n)}function Jl(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=e,g=0!=(0|f),h=d,g?(i=e,j=0|Kl(h,17,i),c=j):(k=0|Jk(h,17,0),c=k),n=c,l=p,0|n}function Kl(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=e,i=d,j=f,k=0|Jk(i,j,0),n=0|Jk(g,h,k),l=p,0|n}function Ll(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=c+76|0,e=0|f[d>>2],n=e,g=b,h=0|Jk(g,0,0),i=b,j=i+76|0,f[j>>2]=h,k=n,l=p,0|k}function Ml(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,j=0;j=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=d,g=c,h=g+76|0,f[h>>2]=e,l=j}function Nl(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,g=c,h=d,i=e,j=f,k=g,n=h,o=0|Ol(i,18,j,k,n),l=q,0|o}function Ol(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,z=0;return z=l,l=l+32|0,(0|l)>=(0|m)&&X(),f=a,g=b,q=c,r=d,s=e,t=f,u=g,v=f,w=q,x=f,h=r,i=f,j=s,k=0|Jk(i,j,0),n=0|Jk(x,h,k),o=0|Jk(v,w,n),p=0|Jk(t,u,o),l=z,0|p}function Pl(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;return r=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,g=c,h=d,i=d,j=e,k=d,n=g,o=0|Jk(k,0,n),p=0|Jk(i,j,o),f=0|Jk(h,19,p),l=r,0|f}function Ql(a){a|=0;var b=0,c=0,d=0,f=0;return f=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=0|Lk(c,86),l=f,0|d}function Rl(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;return r=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,g=c,h=d,i=d,j=e,k=j,n=g,o=n,p=0|Jk(i,k,o),f=0|Jk(h,72,p),l=r,0|f}function Sl(a){a|=0;var b=0,c=0,e=0;return e=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,l=e,0|c}function Tl(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,g=c,h=d,i=e,j=f,k=g,n=h,o=0|Ol(i,5,j,k,n),l=q,0|o}function Ul(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,g=c,h=d,i=e,j=f,k=h,n=g,o=0|Ol(i,5,j,k,n),l=q,0|o}function Vl(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=d,i=e,j=f,k=0|Jk(h,i,j),n=0|Jk(g,9,k),l=p,0|n}function Wl(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=d,i=e,j=f,k=0|Jk(h,i,j),n=0|Jk(g,10,k),l=p,0|n}function Xl(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=0|Jk(e,91,f),l=i,0|g}function Yl(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=d,i=e,j=f,k=0|Jk(h,i,j),n=0|Jk(g,23,k),l=p,0|n}function Zl(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;return r=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,g=c,h=d,i=e,j=f,k=g,n=k,o=h,p=0|Ol(i,28,j,n,o),l=r,0|p}function $l(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0;return G=l,l=l+32|0,(0|l)>=(0|m)&&X(),f=a,g=b,t=c,x=d,y=f,z=g,A=t,B=A,C=x,D=0|Ol(y,29,z,B,C),E=D,h=g,(i=0!=(0|h))?(j=g,k=j+10|0,n=0|e[k>>1],o=E,p=o+10|0,e[p>>1]=n,q=g,r=q+8|0,s=0|e[r>>1],u=E,v=u+8|0,e[v>>1]=s,w=E,l=G,0|w):(w=E,l=G,0|w)}function _l(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,F=0;return F=l,l=l+32|0,(0|l)>=(0|m)&&X(),D=F,s=F+8|0,c=a,e=b,v=e,w=0|f[v>>2],x=w,C=x,y=C,(z=45==(0|y))?(A=c,B=e,g=B+4|0,h=0|f[g>>2],i=h,yl(A,59379,i),void(l=F)):(j=C,k=46==(0|j),n=c,k||(t=0|f[n>>2],u=C,am(s,u),d[D>>0]=0|d[s>>0],d[D+1>>0]=0|d[s+1>>0],d[D+2>>0]=0|d[s+2>>0],d[D+3>>0]=0|d[s+3>>0],d[D+4>>0]=0|d[s+4>>0],d[D+5>>0]=0|d[s+5>>0],d[D+6>>0]=0|d[s+6>>0],d[D+7>>0]=0|d[s+7>>0],Ir(t,59425,D)),o=e,p=o+4|0,q=0|f[p>>2],r=q,yl(n,59402,r),void(l=F))}function am(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=3,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function bm(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=0|Jk(e,34,f),l=i,0|g}function cm(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=d,i=e,j=f,k=0|Jk(h,i,j),n=0|Jk(g,24,k),l=p,0|n}function dm(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=d,i=e,j=f,k=0|Jk(h,i,j),n=0|Jk(g,20,k),l=p,0|n}function em(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=d,i=e,j=f,k=0|Jk(h,i,j),n=0|Jk(g,21,k),l=p,0|n}function fm(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=e,i=d,j=f,k=0|Bl(i,j),n=0|$l(g,h,k,0),l=p,0|n}function gm(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=b,e=d+76|0,g=0|f[e>>2],h=0|Jk(c,0,g),i=b,j=i+76|0,f[j>>2]=h,l=n}function hm(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=d,i=0|Il(h),j=e,k=f,n=0|Ol(g,4,i,j,k),l=p,0|n}function im(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;return r=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,g=c+76|0,h=0|f[g>>2],(i=0!=(0|h))?(j=b,k=j+76|0,n=0|f[k>>2],o=n+4|0,p=0|f[o>>2],d=b,e=d+76|0,f[e>>2]=p,void(l=r)):void(l=r)}function jm(a,b,c){a|=0,b|=0,c|=0;var d=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0;return S=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,f=b,s=c,D=d,K=0|km(D),Q=K,L=s,M=0!=(0|L),M&&(N=s,O=N+10|0,P=0|e[O>>1],g=Q,h=g+10|0,e[h>>1]=P,i=s,j=i+8|0,k=0|e[j>>1],n=Q,o=n+8|0,e[o>>1]=k),p=d,q=Q,r=f,t=r,u=s,v=0|Ol(p,30,q,t,u),Q=v,w=s,(x=0!=(0|w))?(y=s,z=y+10|0,A=0|e[z>>1],B=Q,C=B+10|0,e[C>>1]=A,E=s,F=E+8|0,G=0|e[F>>1],H=Q,I=H+8|0,e[I>>1]=G,J=Q,l=S,0|J):(J=Q,l=S,0|J)}function km(a){a|=0;var b=0,c=0,d=0,f=0;return f=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=0|Lk(c,85),l=f,0|d}function lm(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,j=c,k=j,(n=0!=(0|k))?(o=e,p=o+4|0,q=0|f[p>>2],r=0!=(0|q),r&&(s=d,Yk(s,59474)),g=j,h=e,i=h+4|0,f[i>>2]=g,void(l=u)):void(l=u)}function mm(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=0|Jk(e,32,f),l=i,0|g}function nm(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,x=0;return x=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,o=b,p=o,(q=0!=(0|p))?(r=o,s=r+4|0,t=0|f[s>>2],u=0!=(0|t),u&&(v=d,Yk(v,59474)),e=d,g=o,h=0|f[g>>2],i=0|Jk(e,38,h),c=i,n=c,l=x,0|n):(j=d,k=0|Jk(j,38,0),c=k,n=c,l=x,0|n)}function om(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;return B=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,r=b,t=r,u=t+4|0,v=0|f[u>>2],(w=0!=(0|v))?(x=d,Yk(x,59512),c=0,s=c,l=B,0|s):(y=r,z=0|f[y>>2],e=z+4|0,g=0|f[e>>2],h=0!=(0|g),h?(n=d,o=r,p=0|f[o>>2],q=0|bm(n,p),c=q,s=c,l=B,0|s):(i=r,j=0|f[i>>2],k=0|f[j>>2],c=k,s=c,l=B,0|s))}function pm(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=0|Jk(e,37,f),l=i,0|g}function qm(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=0|Jk(e,13,f),l=i,0|g}function rm(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=0|Jk(e,14,f),l=i,0|g}function sm(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;return r=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,g=d,h=0|f[g>>2],i=h,(j=39==(0|i))?(k=c,n=d,o=n+4|0,p=0|f[o>>2],e=p,tm(k,e),void(l=r)):void(l=r)}function tm(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,n=0;return n=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=0|um(e,f),(h=g<<24>>24!=0)?void(l=n):(i=c,j=d,Kk(i,j),void(l=n))}function um(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;G=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,r=b,w=d,x=w+76|0,y=0|f[x>>2],D=y;a:for(;;){if(z=D,A=0!=(0|z),!A){F=9;break}for(B=D,C=0|f[B>>2],E=C;;){if(e=E,g=0!=(0|e),!g)break;if(h=E,i=0|f[h>>2],j=i,k=r,n=(0|j)==(0|k)){F=6;break a}o=E,p=o+4|0,q=0|f[p>>2],E=q}s=D,t=s+4|0,u=0|f[t>>2],D=u}return 6==(0|F)?(c=1,v=c,l=G,0|v):9==(0|F)?(c=0,v=c,l=G,0|v):0}function vm(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=d,i=e,j=f,k=j,n=0|Jk(h,i,k),o=0|Jk(g,77,n),l=q,0|o}function wm(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;return j=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=f,h=0|Jk(e,78,g),l=j,0|h}function xm(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;return j=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=f,h=0|Kl(e,73,g),l=j,0|h}function ym(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=d,i=e,j=f,k=0|Jk(h,i,j),n=0|Jk(g,80,k),l=p,0|n}function zm(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=d,i=e,j=f,k=0|Jk(h,i,j),n=0|Jk(g,81,k),l=p,0|n}function Am(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;return w=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,n=c,o=d,p=e,q=f,r=e,s=n,t=0|Bl(r,s),u=e,g=e,h=o,i=0|Lk(g,h),j=0|Lk(u,i),k=0|$l(p,q,t,j),l=w,0|k}function Bm(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=0|Jk(e,36,f),l=i,0|g}function Cm(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=0|Jk(e,69,f),l=i,0|g}function Dm(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=0|Jk(e,66,f),l=i,0|g}function Em(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,V=0;return V=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,D=e,N=0|f[D>>2],O=32==(0|N),O||(P=e,Q=0|f[P>>2],R=33==(0|Q))?(S=e,g=S+4|0,h=0|f[g>>2],i=0!=(0|h),j=d,i?(q=e,r=q+4|0,t=0|f[r>>2],u=s,lm(j,t,u),void(l=V)):(k=s,n=0|Jk(j,0,k),o=e,p=o+4|0,f[p>>2]=n,void(l=V))):(v=e,w=v+4|0,x=0|f[w>>2],y=x+4|0,z=0|f[y>>2],A=z+4|0,B=0|f[A>>2],T=B,C=T,E=0|f[C>>2],F=0!=(0|E),G=d,F?(K=T,L=0|f[K>>2],M=s,lm(G,L,M),void(l=V)):(H=s,I=0|Jk(G,0,H),J=T,f[J>>2]=I,void(l=V)))}function Fm(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=d,i=0|Il(h),j=e,k=f,n=0|Ol(g,53,i,j,k),l=p,0|n}function Gm(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;for(B=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,e=b,q=c,r=d,s=e,t=0|Kl(r,6,s),y=t,u=y,z=u;;){if(v=z,w=v+4|0,x=0|f[w>>2],g=0!=(0|x),!g)break;h=z,i=h+4|0,j=0|f[i>>2],z=j}return k=q,n=z,o=n+4|0,f[o>>2]=k,p=y,l=B,0|p}function Hm(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,g=c,h=d,i=e,j=f,k=g,n=h,o=0|Ol(i,12,j,k,n),l=q,0|o}function Im(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,j=c,k=d,n=e,o=f,p=j,q=e,r=e,s=0|Il(r),g=k,h=0|Jk(q,s,g),i=0|Ol(n,74,o,p,h),l=u,0|i}function Jm(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;return r=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,g=c,h=d,i=e,j=d,k=d,n=0|Il(k),o=g,p=0|Jk(j,n,o),f=0|xl(h,76,i,p),l=r,0|f}function Km(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;return r=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,g=c,h=d,i=e,j=d,k=d,n=0|Il(k),o=g,p=0|Jk(j,n,o),f=0|xl(h,75,i,p),l=r,0|f}function Lm(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;return t=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,i=c,j=d,k=e,n=f,o=n,p=e,q=0|Il(p),r=i,g=j,h=0|Mm(k,70,o,q,r,g),l=t,0|h}function Mm(a,b,c,d,e,f){a|=0,b|=0,c|=0,d|=0,e|=0,f|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;return E=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=a,h=b,u=c,w=d,x=e,y=f,z=g,A=h,B=g,C=u,i=g,j=w,k=g,n=x,o=g,p=y,q=0|Jk(o,p,0),r=0|Jk(k,n,q),s=0|Jk(i,j,r),t=0|Jk(B,C,s),v=0|Jk(z,A,t),l=E,0|v}function Nm(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;return w=l,l=l+32|0,(0|l)>=(0|m)&&X(),f=a,g=b,n=c,o=d,p=e,q=f,r=g,s=n,t=s,u=f,h=0|Il(u),i=o,j=p,k=0|Om(q,71,r,t,h,i,j),l=w,0|k}function Om(a,b,c,d,e,f,g){a|=0,b|=0,c|=0,d|=0,e|=0,f|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0;return J=l,l=l+32|0,(0|l)>=(0|m)&&X(),h=a,i=b,v=c,B=d,C=e,D=f,E=g,F=h,G=i,H=h,j=v,k=h,n=B,o=h,p=C,q=h,r=D,s=h,t=E,u=0|Jk(s,t,0),w=0|Jk(q,r,u),x=0|Jk(o,p,w),y=0|Jk(k,n,x),z=0|Jk(H,j,y),A=0|Jk(F,G,z),l=J,0|A}function Pm(a){a|=0;var b=0,c=0,d=0,f=0;return f=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=0|Lk(c,15),l=f,0|d}function Qm(a){a|=0;var b=0,c=0,d=0,f=0;return f=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=0|Lk(c,16),l=f,0|d}function Rm(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;return j=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=f,h=0|Jk(e,63,g),l=j,0|h}function Sm(a,b,c,d,e,f){a|=0,b|=0,c|=0,d|=0,e|=0,f|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,I=0;return I=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=a,h=b,u=c,z=d,A=e,B=f,C=g,D=A,E=B,F=E,i=0|Jk(C,D,F),G=i,j=g,k=z,n=k,o=G,p=0|Jk(j,n,o),G=p,q=g,r=u,s=G,t=0|Jk(q,r,s),G=t,v=g,w=h,x=G,y=0|Jk(v,w,x),l=I,0|y}function Tm(a,b){a|=0,b|=0;var c=0,d=0,f=0;f=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,l=f}function Um(a){a|=0;var b=0,c=0,d=0,f=0;return f=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=0|Lk(c,33),l=f,0|d}function Vm(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=0|Jk(e,56,f),l=i,0|g}function Wm(a){a|=0;var b=0,c=0,d=0,f=0;return f=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=0|Jk(c,100,0),l=f,0|d}function Xm(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=0|Jk(e,58,f),l=i,0|g}function Ym(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=d,i=e,j=f,k=0|Jk(h,i,j),n=0|Jk(g,60,k),l=p,0|n}function Zm(a){a|=0;var b=0,c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,T=0;return T=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,r=c+1120|0,C=0|f[r>>2],M=C+4|0,N=0|f[M>>2],O=b,P=O+1120|0,f[P>>2]=N,Q=b,R=Q+1120|0,e=0|f[R>>2],g=0==(0|e),h=b,g?(i=h+40|0,f[i>>2]=0,j=b,k=j+72|0,n=0|d[k>>0],o=n&-2,p=1|o,d[k>>0]=p,q=b,gl(q),s=b,t=s+1124|0,u=0|f[t>>2],v=b,w=v+44|0,f[w>>2]=u,x=b,y=x+1124|0,f[y>>2]=0,z=b,A=z+1128|0,B=0|d[A>>0],D=B&-2,E=1|D,d[A>>0]=E,void(l=T)):(F=0|Rk(h),G=F+4|0,H=0|f[G>>2],I=H,J=b,K=J+44|0,L=0|f[K>>2],f[L>>2]=I,void(l=T))}function $m(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=0|Jk(e,101,f),l=i,0|g}function _m(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;return j=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=f,h=0|Jk(e,54,g),l=j,0|h}function an(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,k=0;return k=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=c,g=d,h=0|Vm(f,g),i=0|Jk(e,97,h),l=k,0|i}function bn(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,z=0;return z=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,o=d,p=o+4|0,q=0|f[p>>2],r=0|f[q>>2],x=r,s=d,t=s+4|0,u=0|f[t>>2],v=u+4|0,e=0|f[v>>2],g=e,w=g,h=c,i=0|f[h>>2],j=x,k=w,n=0|hi(i,j,k),l=z,0|n}function cn(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=0|Jk(e,102,f),l=i,0|g}function dn(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=0|Jk(e,52,f),l=i,0|g}function en(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;return j=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=f,h=0|Jk(e,39,g),l=j,0|h}function fn(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;return j=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=f,h=0|Jk(e,42,g),l=j,0|h}function gn(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;return j=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=f,h=0|Jk(e,41,g),l=j,0|h}function hn(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;return j=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=f,h=0|Jk(e,44,g),l=j,0|h}function jn(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,j=0;return j=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,f=d,g=f,h=0|Jk(e,43,g),l=j,0|h}function kn(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0;return G=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,r=b,x=r,y=0|f[x>>2],z=y,A=39==(0|z),A&&(B=d,C=r,D=C+4|0,e=0|f[D>>2],g=e,h=0|um(B,g),i=h<<24>>24!=0,!i)?(j=d,k=r,n=k+4|0,o=0|f[n>>2],p=o,q=0|jm(j,p,0),E=q,s=d,t=r,Uk(s,t),u=E,c=u,w=c,l=G,0|w):(v=r,c=v,w=c,l=G,0|w)}function ln(a){a|=0;var b=0,c=0,d=0,f=0;return f=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=0|Lk(c,87),l=f,0|d}function mn(a){a|=0;var b=0,c=0,d=0,f=0;return f=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=0|Lk(c,88),l=f,0|d}function nn(a,b,c){a|=0,b|=0,c|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0;if(_b=l,l=l+160|0,(0|l)>=(0|m)&&X(),Ib=_b+40|0,Nb=_b+100|0,h=a,$=b,ja=c,ua=$,Fa=3044+(ua<<1)|0,Qa=0|e[Fa>>1],_a=Qa<<16>>16,Pb=_a,kb=Pb,vb=-771<(0|kb),i=Pb,v=(0|i)<=10639,Gb=vb&v,!Gb)return g=0,S=g,l=_b,0|S;for(G=ja,R=G>>>0<=372,R?(T=ja,U=58359+T|0,V=0|d[U>>0],W=255&V,Y=W):Y=2,Wb=Y,Z=Wb,_=1320+(Z<<2)|0,aa=0|f[_>>2],ba=0|on(0,aa),Tb=ba,ca=Tb,Sb=ca,Vb=0,Rb=62710,da=Pb,ea=(0|da)<0,fa=Pb,ga=0-fa|0,ha=ea?ga:0,Yb=ha,ia=Pb,ka=10639-ia|0,la=ka+1|0,Jb=la,ma=Jb,na=(0|ma)<144,oa=Jb,pa=na?oa:144,Zb=pa,Kb=1,qa=Wb,ra=1320+(qa<<2)|0,sa=0|f[ra>>2],f[Ib>>2]=sa,ta=0|qn(Nb,62725),Mb=ta,va=Yb,Xb=va;;){if(wa=Xb,xa=Zb,ya=(0|wa)<(0|xa),!ya)break;if(za=Xb,Aa=Pb,Ba=za+Aa|0,Ca=4980+(Ba<<1)|0,Da=0|e[Ca>>1],Ea=Da<<16>>16,Ga=Xb,Ha=(0|Ea)==(0|Ga),Ia=Xb,Ja=1!=(0|Ia),Hb=Ha&Ja){if(Ka=Kb,La=5==(0|Ka)){$b=9;break}Oa=Xb,Pa=1320+(Oa<<2)|0,Ra=0|f[Pa>>2],Sa=Kb,Ta=Sa+1|0,Kb=Ta,Ua=Ib+(Sa<<2)|0,f[Ua>>2]=Ra,Va=Sb,Wa=Xb,Xa=1320+(Wa<<2)|0,Ya=0|f[Xa>>2],Za=0|on(0,Ya),$a=Va+Za|0,Ub=$a,ab=Ub,bb=Sb,cb=ab>>>0<bb>>>0,db=1&cb,eb=Vb,fb=eb|db,Vb=fb,gb=Ub,Sb=gb,hb=Mb,ib=Rb,jb=0|qn(hb,ib),Mb=jb,Rb=62753}lb=Xb,mb=lb+1|0,Xb=mb}if(9==(0|$b)&&(Kb=1,Ma=Tb,Sb=Ma,Na=Nb+27|0,d[Na>>0]=0),Lb=Nb,nb=Sb,ob=Lb,pb=0|pn(ob),qb=nb+pb|0,Ub=qb,rb=Ub,sb=Sb,tb=rb>>>0<sb>>>0,ub=1&tb,wb=Vb,xb=wb|ub,Vb=xb,yb=Ub,Sb=yb,zb=Vb,Ab=0!=(0|zb))return g=-1,S=g,l=_b,0|S;Bb=h,Cb=0!=(0|Bb);a:do if(Cb)for(Db=h,Qb=Db,Ob=0;;){if(Eb=Lb,Fb=0|d[Eb>>0],j=Qb,d[j>>0]=Fb,k=Fb<<24>>24,n=0!=(0|k),!n)break a;o=Qb,p=0|d[o>>0],q=p<<24>>24,r=37==(0|q),r&&(s=Lb,t=s+1|0,u=0|d[t>>0],w=u<<24>>24,x=115==(0|w),x&&(y=Ob,z=Kb,A=(0|y)<(0|z)))?(B=Qb,C=Ob,D=C+1|0,Ob=D,E=Ib+(C<<2)|0,F=0|f[E>>2],H=0|on(B,F),I=Qb,J=I+H|0,Qb=J,K=Lb,L=K+2|0,Lb=L):(M=Qb,N=M+1|0,Qb=N,O=Lb,P=O+1|0,Lb=P)}while(0);return Q=Sb,g=Q,S=g,l=_b,0|S}function on(a,b){a|=0,b|=0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0;_=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,r=b,C=r,N=0|d[C>>0],S=N<<24>>24,T=34==(0|S);a:do if(T){Y=0,U=r,Z=U;b:for(;;){switch(V=Z,W=V+1|0,Z=W,f=0|d[W>>0],g=f<<24>>24,0|g){case 44:case 39:break a;case 34:break b;case 92:if(h=Z,i=h+1|0,Z=i,j=0|d[i>>0],k=j<<24>>24,n=92!=(0|k))break a}o=e,p=0!=(0|o),p&&(q=Z,s=0|d[q>>0],t=Y,u=e,v=u+t|0,d[v>>0]=s),w=Y,x=w+1|0,Y=x}return y=e,z=0!=(0|y),z&&(A=Y,B=e,D=B+A|0,d[D>>0]=0),E=Y,c=E,R=c,l=_,0|R}while(0);return F=e,G=0!=(0|F),G?(J=e,K=r,L=0|qn(J,K),M=e,O=L,P=M,Q=O-P|0,c=Q,R=c,l=_,0|R):(H=r,I=0|pn(H),c=I,R=c,l=_,0|R)}function pn(a){a|=0;var b=0,c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,o=0;for(o=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,k=0;;){if(c=k,e=b,f=e+c|0,g=0|d[f>>0],h=g<<24>>24!=0,i=k,!h)break;j=i+1|0,k=j}return l=o,0|i}function qn(a,b){a|=0,b|=0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;for(v=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,e=b,i=c,s=i,j=e,t=j;;)if(k=t,n=k+1|0,t=n,o=0|d[k>>0],p=s,q=p+1|0,s=q,d[p>>0]=o,r=o<<24>>24,f=0!=(0|r),!f)break;return g=s,h=g+-1|0,l=v,0|h}function rn(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,n=0;return n=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,g=c,h=d,i=e,(j=0!=(0|i))?void(l=n):(e=62791,void(l=n))}function sn(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,fa=0;if(fa=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,d=b,ba=0,r=d,C=0!=(0|r),!C)return void(l=fa);if(N=c,Y=N+1144|0,Z=0|f[Y>>2],$=0|f[Z>>2],_=$,aa=3!=(0|_))return void(l=fa);for(e=c,g=e+1144|0,h=0|f[g>>2],i=h+4|0,j=0|f[i>>2],k=0|f[j>>2],ca=k,da=k;;){if(n=ca,o=0!=(0|n),!o)break;p=ba,q=p+1|0,ba=q,s=ca,t=s+4|0,u=0|f[t>>2],ca=u}for(v=c,w=0|f[v>>2],x=d,y=0|f[x>>2],z=ba,A=z<<2,B=0|Hc(w,y,A),D=d,f[D>>2]=B,E=ba,F=d,G=F+4|0,f[G>>2]=E,ba=0,H=da,ca=H;;){if(I=ca,J=0!=(0|I),!J)break;K=ca,L=0|f[K>>2],M=L,O=ba,P=d,Q=0|f[P>>2],R=Q+(O<<2)|0,f[R>>2]=M,S=ba,T=S+1|0,ba=T,U=ca,V=U+4|0,W=0|f[V>>2],ca=W}l=fa}function tn(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0,wf=0,xf=0,yf=0,zf=0,Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0,Gf=0,Hf=0,If=0,Jf=0,Kf=0,Lf=0,Mf=0,Nf=0,Of=0,Pf=0,Qf=0,Rf=0,Sf=0,Tf=0,Uf=0,Vf=0,Wf=0,Xf=0,Yf=0,Zf=0,$f=0,_f=0,ag=0,bg=0,cg=0,dg=0,eg=0,fg=0,gg=0,hg=0,ig=0,jg=0,kg=0,lg=0,mg=0,ng=0,og=0,pg=0,qg=0,rg=0,sg=0,tg=0,ug=0,vg=0,wg=0,xg=0,yg=0,zg=0,Ag=0,Bg=0,Cg=0,Dg=0,Eg=0,Fg=0,Gg=0,Hg=0,Ig=0,Jg=0,Kg=0,Lg=0,Mg=0,Ng=0,Og=0,Pg=0,Qg=0,Rg=0,Sg=0,Tg=0,Ug=0,Vg=0,Wg=0,Xg=0,Yg=0,Zg=0,$g=0,_g=0,ah=0,bh=0,ch=0,dh=0,eh=0,fh=0,gh=0,hh=0,ih=0,jh=0,kh=0,lh=0,mh=0,nh=0,oh=0,ph=0,qh=0,rh=0,sh=0,th=0,uh=0,vh=0,wh=0,xh=0,yh=0,zh=0,Ah=0,Bh=0,Ch=0,Dh=0,Eh=0,Fh=0,Gh=0,Hh=0,Ih=0,Jh=0,Kh=0,Lh=0,Mh=0,Nh=0,Oh=0,Ph=0,Qh=0,Rh=0,Sh=0,Th=0,Uh=0,Vh=0,Wh=0,Xh=0,Yh=0,Zh=0,$h=0,_h=0,ai=0,bi=0,ci=0,di=0,ei=0,fi=0,gi=0,hi=0,ii=0,ji=0,ki=0,li=0,mi=0,ni=0,oi=0,pi=0,qi=0,ri=0,si=0,ti=0,ui=0,vi=0,wi=0,yi=0,zi=0,Ai=0,Bi=0,Ci=0,Di=0,Ei=0,Fi=0,Gi=0,Hi=0,Ii=0,Ji=0,Ki=0,Li=0,Mi=0,Ni=0,Oi=0,Pi=0,Qi=0,Ri=0,Si=0,Ti=0,Ui=0,Vi=0,Wi=0,Xi=0,Yi=0,Zi=0,$i=0,_i=0,aj=0,bj=0,cj=0,dj=0,ej=0,fj=0,gj=0,hj=0,ij=0,jj=0,kj=0,lj=0,mj=0,nj=0,oj=0,pj=0,qj=0,rj=0,sj=0,tj=0,uj=0,vj=0,wj=0,xj=0,yj=0,zj=0,Aj=0,Bj=0,Cj=0,Dj=0,Ej=0,Fj=0,Gj=0,Hj=0,Ij=0,Jj=0,Kj=0,Lj=0,Mj=0,Nj=0,Oj=0,Pj=0,Qj=0,Rj=0,Sj=0,Tj=0,Uj=0,Vj=0,Wj=0,Xj=0,Yj=0,Zj=0,$j=0,_j=0,ak=0,bk=0,ck=0,dk=0,ek=0,fk=0,gk=0,hk=0,ik=0,jk=0,kk=0,lk=0,mk=0,nk=0,ok=0,pk=0,qk=0,rk=0,sk=0,tk=0,uk=0,vk=0,wk=0,xk=0,yk=0,zk=0,Ak=0,Bk=0,Ck=0,Dk=0,Ek=0,Fk=0,Gk=0,Hk=0,Ik=0,Jk=0,Kk=0,Lk=0,Mk=0,Nk=0,Ok=0,Pk=0,Qk=0,Rk=0,Sk=0,Tk=0,Uk=0,Vk=0,Wk=0,Xk=0,Yk=0,Zk=0,$k=0,_k=0,al=0,bl=0,cl=0,dl=0,el=0,fl=0,gl=0,hl=0,il=0,jl=0,kl=0,ll=0,ml=0,nl=0,ol=0,pl=0,ql=0,rl=0,sl=0,tl=0,ul=0,vl=0,wl=0,xl=0,yl=0,zl=0,Al=0,Bl=0,Cl=0,Dl=0,El=0,Fl=0,Gl=0,Hl=0,Il=0,Jl=0,Kl=0,Ll=0,Ml=0,Nl=0,Ol=0,Pl=0,Ql=0,Rl=0,Sl=0,Tl=0,Ul=0,Vl=0,Wl=0,Xl=0,Yl=0,Zl=0,$l=0,_l=0,am=0,bm=0,cm=0,dm=0,em=0,fm=0,gm=0,hm=0,im=0,jm=0,km=0,lm=0,mm=0,nm=0,om=0,pm=0,qm=0,rm=0,sm=0,tm=0,um=0,vm=0,wm=0,xm=0,ym=0,zm=0,Am=0,Bm=0,Cm=0,Dm=0,Em=0,Fm=0,Gm=0,Hm=0,Im=0,Jm=0,Km=0,Lm=0,Mm=0,Nm=0,Om=0,Pm=0,Qm=0,Rm=0,Sm=0,Tm=0,Um=0,Vm=0,Wm=0,Xm=0,Ym=0,Zm=0,$m=0,_m=0,an=0,bn=0,cn=0,dn=0,en=0,fn=0,gn=0,hn=0,jn=0,kn=0,ln=0,mn=0,nn=0,on=0,pn=0,qn=0,rn=0,sn=0,wn=0,xn=0,yn=0,zn=0,An=0,Bn=0,Cn=0,Dn=0,En=0,Fn=0,Gn=0,Hn=0,In=0,Jn=0,Kn=0,Ln=0,Mn=0,Nn=0,On=0,Pn=0,Qn=0,Rn=0,Sn=0,Tn=0,Un=0,Vn=0,Wn=0,Xn=0,Yn=0,Zn=0,$n=0,_n=0,ao=0,bo=0,co=0,eo=0,fo=0,go=0,ho=0,io=0,jo=0,ko=0,lo=0,mo=0,no=0,oo=0,po=0,qo=0,ro=0,so=0,to=0,uo=0,vo=0,wo=0,xo=0,yo=0,zo=0,Ao=0,Bo=0,Co=0,Do=0,Eo=0,Fo=0,Go=0,Ho=0,Io=0,Jo=0,Ko=0,Lo=0,Mo=0,No=0,Oo=0,Po=0,Qo=0,Ro=0,So=0,To=0,Uo=0,Vo=0,Wo=0,Xo=0,Yo=0,Zo=0,$o=0,_o=0,ap=0,bp=0,cp=0,dp=0,ep=0,fp=0,gp=0,hp=0,ip=0,jp=0,kp=0,lp=0,mp=0,np=0,op=0,pp=0,qp=0,rp=0,sp=0,tp=0,up=0,vp=0,wp=0,xp=0,yp=0,zp=0,Ap=0,Bp=0,Cp=0,Dp=0,Ep=0,Fp=0,Gp=0,Hp=0,Ip=0,Jp=0,Kp=0,Lp=0,Mp=0,Np=0,Op=0,Pp=0,Qp=0,Rp=0,Sp=0,Tp=0,Up=0,Vp=0,Wp=0,Xp=0,Yp=0,Zp=0,$p=0,_p=0,aq=0,bq=0,cq=0,dq=0,eq=0,fq=0,gq=0,hq=0,iq=0,jq=0,kq=0,lq=0,mq=0,nq=0,oq=0,pq=0,qq=0,rq=0,sq=0,tq=0,uq=0,vq=0,wq=0,xq=0,yq=0,zq=0,Aq=0,Bq=0,Cq=0,Dq=0,Eq=0,Fq=0,Gq=0,Hq=0,Iq=0,Jq=0,Kq=0,Lq=0,Mq=0,Nq=0,Oq=0,Pq=0,Qq=0,Rq=0,Sq=0,Tq=0,Uq=0,Vq=0,Wq=0,Xq=0,Yq=0,Zq=0,$q=0,_q=0,ar=0,br=0,cr=0,dr=0,er=0,fr=0,gr=0,hr=0,ir=0,jr=0,kr=0,lr=0,mr=0,nr=0,or=0,pr=0,qr=0,rr=0,sr=0,tr=0,ur=0,vr=0,wr=0,xr=0,yr=0,zr=0,Ar=0,Br=0,Cr=0,Dr=0,Er=0,Fr=0,Gr=0,Hr=0,Ir=0,Jr=0,Kr=0,Lr=0,Mr=0,Nr=0,Or=0,Pr=0,Qr=0,Rr=0,Sr=0,Tr=0,Ur=0,Vr=0,Wr=0,Xr=0,Yr=0,Zr=0,$r=0,_r=0,as=0,bs=0,cs=0,ds=0,es=0,fs=0,gs=0,hs=0,is=0,js=0,ks=0,ls=0,ms=0,ns=0,os=0,ps=0,qs=0,rs=0,ss=0,ts=0,us=0,vs=0,ws=0,xs=0,ys=0,zs=0,As=0,Bs=0,Cs=0,Ds=0,Es=0,Fs=0,Gs=0,Hs=0,Is=0,Js=0,Ks=0,Ls=0,Ms=0,Ns=0,Os=0,Ps=0,Qs=0,Rs=0,Ss=0,Ts=0,Us=0,Vs=0,Ws=0,Xs=0,Ys=0,Zs=0,$s=0,_s=0,at=0,bt=0,ct=0,dt=0,et=0,ft=0,gt=0,ht=0,it=0,jt=0,kt=0,lt=0,mt=0,nt=0,ot=0,pt=0,qt=0,rt=0,st=0,tt=0,ut=0,vt=0,wt=0,xt=0,yt=0,zt=0,At=0,Bt=0,Ct=0,Dt=0,Et=0,Ft=0,Gt=0,Ht=0,It=0,Jt=0,Kt=0,Lt=0,Mt=0,Nt=0,Ot=0,Pt=0,Qt=0,Rt=0,St=0,Tt=0,Ut=0,Vt=0,Wt=0,Xt=0,Yt=0,Zt=0,$t=0,_t=0,au=0,bu=0,cu=0,du=0,eu=0,fu=0,gu=0,hu=0,iu=0,ju=0,ku=0,lu=0,mu=0,nu=0,ou=0,pu=0,qu=0,ru=0,su=0,tu=0,uu=0,vu=0,wu=0,xu=0,yu=0,zu=0,Au=0,Bu=0,Cu=0,Du=0,Eu=0,Fu=0,Gu=0,Hu=0,Iu=0,Ju=0,Ku=0,Lu=0,Mu=0,Nu=0,Ou=0,Pu=0,Qu=0,Ru=0,Su=0,Tu=0,Uu=0,Vu=0,Wu=0,Xu=0,Yu=0,Zu=0,$u=0,_u=0,av=0,bv=0,cv=0,dv=0,ev=0,fv=0,gv=0,hv=0,iv=0,jv=0,kv=0,lv=0,mv=0,nv=0,ov=0,pv=0,qv=0,rv=0,sv=0,tv=0,uv=0,vv=0,wv=0,xv=0,yv=0,zv=0,Av=0,Bv=0,Cv=0,Dv=0,Ev=0,Fv=0,Gv=0,Hv=0,Iv=0,Jv=0,Kv=0,Lv=0,Mv=0,Nv=0,Ov=0,Pv=0,Qv=0,Rv=0,Sv=0,Tv=0,Uv=0,Vv=0,Wv=0,Xv=0,Yv=0,Zv=0,$v=0,_v=0,bw=0,cw=0,dw=0,ew=0,fw=0,gw=0,hw=0,iw=0,jw=0,kw=0,lw=0,mw=0,nw=0,ow=0,pw=0,qw=0,rw=0,sw=0,tw=0,uw=0,vw=0,ww=0,xw=0,yw=0,zw=0,Aw=0,Bw=0,Cw=0,Dw=0,Ew=0,Fw=0,Gw=0,Hw=0,Iw=0,Jw=0,Kw=0,Lw=0,Mw=0,Nw=0,Ow=0,Pw=0,Qw=0,Rw=0,Sw=0,Tw=0,Uw=0,Vw=0,Ww=0,Xw=0,Yw=0,Zw=0,$w=0,_w=0,ax=0,bx=0,cx=0,dx=0,ex=0,fx=0,gx=0,hx=0,ix=0,jx=0,kx=0,lx=0,mx=0,nx=0,ox=0,px=0,qx=0,rx=0,sx=0,tx=0,ux=0,vx=0,wx=0,xx=0,yx=0,zx=0,Ax=0,Bx=0,Cx=0,Dx=0,Ex=0,Fx=0,Gx=0,Hx=0,Ix=0,Jx=0,Kx=0,Lx=0,Mx=0,Nx=0,Ox=0,Px=0,Qx=0,Rx=0,Sx=0,Tx=0,Ux=0,Vx=0,Wx=0,Xx=0,Yx=0,Zx=0,$x=0,_x=0,ay=0,by=0,cy=0,dy=0,ey=0,fy=0,gy=0,hy=0,iy=0,jy=0,ky=0,ly=0,my=0,ny=0,oy=0,py=0,qy=0,ry=0,sy=0,ty=0,uy=0,vy=0,wy=0,xy=0,yy=0,zy=0,Ay=0,By=0,Cy=0,Dy=0,Ey=0,Fy=0,Gy=0,Hy=0,Iy=0,Jy=0,Ky=0,Ly=0,My=0,Ny=0,Oy=0,Py=0,Qy=0,Ry=0,Sy=0,Ty=0,Uy=0,Vy=0,Wy=0,Xy=0,Yy=0,Zy=0,$y=0,_y=0,az=0,bz=0,cz=0,dz=0,ez=0,fz=0,gz=0,hz=0,iz=0,jz=0,kz=0,lz=0,mz=0,nz=0,oz=0,pz=0,qz=0,rz=0,sz=0,tz=0,uz=0,vz=0,wz=0,xz=0,yz=0,zz=0,Az=0,Bz=0,Cz=0,Dz=0,Ez=0,Fz=0,Gz=0,Hz=0,Iz=0,Jz=0,Kz=0,Lz=0,Mz=0,Nz=0,Oz=0,Pz=0,Qz=0,Rz=0,Sz=0,Tz=0,Uz=0,Vz=0,Wz=0,Xz=0,Yz=0,Zz=0,$z=0,_z=0,aA=0,bA=0,cA=0,dA=0,eA=0,fA=0,gA=0,hA=0,iA=0;
+if(iA=l,l=l+1296|0,(0|l)>=(0|m)&&X(),sz=iA+1208|0,rz=iA+1200|0,qz=iA+1192|0,pz=iA+1184|0,nz=iA+1176|0,mz=iA+1168|0,lz=iA+1160|0,kz=iA+1152|0,jz=iA+1144|0,iz=iA+1136|0,hz=iA+1128|0,gz=iA+1120|0,fz=iA+1112|0,ez=iA+1104|0,dz=iA+1096|0,cz=iA+1088|0,az=iA+1080|0,_y=iA+1072|0,$y=iA+1064|0,Zy=iA+1056|0,Yy=iA+1048|0,Wy=iA+1040|0,Vy=iA+1032|0,Uy=iA+1024|0,Ty=iA+1016|0,Ry=iA+1008|0,Qy=iA+1e3|0,Py=iA+992|0,Oy=iA+984|0,Ny=iA+976|0,My=iA+968|0,Ly=iA+960|0,Ky=iA+952|0,Iy=iA+944|0,Hy=iA+936|0,Gy=iA+928|0,Fy=iA+920|0,Ey=iA+912|0,Dy=iA+904|0,Cy=iA+896|0,By=iA+888|0,zy=iA+880|0,yy=iA+872|0,xy=iA+864|0,wy=iA+856|0,vy=iA+848|0,uy=iA+840|0,ty=iA+832|0,ry=iA+824|0,qy=iA+816|0,py=iA+808|0,oy=iA+800|0,ny=iA+792|0,my=iA+784|0,ly=iA+776|0,jy=iA+768|0,iy=iA+760|0,hy=iA+752|0,gy=iA+744|0,fy=iA+736|0,ey=iA+728|0,dy=iA+720|0,cy=iA+712|0,ay=iA+704|0,_x=iA+696|0,$x=iA+688|0,Zx=iA+680|0,Yx=iA+672|0,Xx=iA+664|0,Wx=iA+656|0,Vx=iA+648|0,Tx=iA+640|0,Sx=iA+632|0,Rx=iA+624|0,Qx=iA+616|0,Px=iA+608|0,Ox=iA+600|0,Nx=iA+592|0,Mx=iA+584|0,Lx=iA+576|0,Jx=iA+568|0,Ix=iA+560|0,Hx=iA+552|0,Gx=iA+544|0,Fx=iA+536|0,Ex=iA+528|0,Dx=iA+520|0,Cx=iA+512|0,Bx=iA+504|0,Ax=iA+496|0,yx=iA+488|0,xx=iA+480|0,wx=iA+472|0,vx=iA+464|0,ux=iA+456|0,tx=iA+448|0,sx=iA+440|0,rx=iA+432|0,qx=iA+424|0,ox=iA+416|0,nx=iA+408|0,mx=iA+400|0,lx=iA+392|0,$z=iA+384|0,Zz=iA+376|0,Yz=iA+368|0,Xz=iA+360|0,Vz=iA+352|0,Uz=iA+344|0,Tz=iA+336|0,Sz=iA+328|0,Rz=iA+320|0,Qz=iA+312|0,Pz=iA+304|0,Oz=iA+296|0,Nz=iA+288|0,Mz=iA+280|0,Kz=iA+272|0,Jz=iA+264|0,Iz=iA+256|0,Hz=iA+248|0,Gz=iA+240|0,Fz=iA+232|0,Ez=iA+224|0,Dz=iA+216|0,Cz=iA+208|0,Bz=iA+200|0,zz=iA+192|0,yz=iA+184|0,xz=iA+176|0,wz=iA+168|0,vz=iA+160|0,uz=iA+152|0,tz=iA+144|0,oz=iA+136|0,bz=iA+128|0,Sy=iA+120|0,Jy=iA+112|0,Ay=iA+104|0,sy=iA+96|0,ky=iA+88|0,by=iA+80|0,Ux=iA+72|0,Kx=iA+64|0,zx=iA+56|0,px=iA+48|0,Wz=iA+40|0,Lz=iA+32|0,Az=iA+24|0,Xy=iA+16|0,kx=iA+8|0,jx=iA,d=a,e=b,qg=c,ti=e,xk=0!=(0|ti),!xk)return void(l=iA);a:for(;;){switch(Am=e,Io=qg,un(Am,Io),Lq=e,Os=0|f[Lq>>2],Ru=Os,hx=Ru,g=e,mb=g+4|0,pd=0|f[mb>>2],e=pd,Ue=hx,0|Ue){case 17:hA=3;break a;case 18:hA=4;break a;case 19:hA=18;break a;case 53:hA=19;break a;case 4:break a;case 5:hA=34;break a;case 20:hA=36;break a;case 21:hA=37;break a;case 6:hA=38;break a;case 9:hA=43;break a;case 10:hA=44;break a;case 12:hA=45;break a;case 29:case 30:hA=66;break a;case 80:hA=69;break a;case 81:hA=70;break a;case 77:hA=71;break a;case 78:hA=72;break a;case 34:hA=73;break a;case 36:hA=74;break a;case 66:hA=77;break a;case 24:hA=78;break a;case 23:hA=79;break a;case 28:hA=90;break a;case 32:hA=91;break a;case 33:hA=94;break a;case 37:hA=95;break a;case 38:hA=96;break a;case 13:hA=97;break a;case 14:hA=98;break a;case 15:hA=99;break a;case 16:hA=100;break a;case 39:hA=101;break a;case 41:hA=102;break a;case 42:hA=103;break a;case 44:hA=104;break a;case 43:hA=105;break a;case 47:hA=106;break a;case 46:hA=107;break a;case 45:hA=108;break a;case 63:hA=109;break a;case 69:hA=110;break a;case 50:hA=111;break a;case 51:hA=112;break a;case 52:hA=113;break a;case 55:hA=114;break a;case 56:hA=115;break a;case 57:hA=116;break a;case 58:hA=117;break a;case 59:hA=118;break a;case 60:hA=119;break a;case 54:hA=120;break a;case 85:hA=121;break a;case 86:hA=122;break a;case 87:hA=123;break a;case 88:hA=124;break a;case 72:hA=125;break a;case 73:hA=126;break a;case 74:hA=130;break a;case 75:hA=138;break a;case 76:hA=144;break a;case 70:hA=145;break a;case 71:hA=170;break a;case 91:hA=184;break a;case 99:hA=185;break a;case 3:break;default:hA=186;break a}0|aw(63227,Tz),Xk=e,Yk=0|f[Xk>>2],ax=Yk,Vw=1,Zk=ax,$k=0!=(0|Zk);do if($k){if(_k=ax,al=0|f[_k>>2],bl=0!=(0|al),!bl&&(cl=ax,el=cl+4|0,fl=0|f[el>>2],gl=0!=(0|fl),!gl))break;for(hl=ax,il=qg,jl=il+1|0,un(hl,jl),0|aw(63240,Uz),kl=ax,ll=qg,ml=ll+2|0,un(kl,ml);;){if(nl=ax,pl=0!=(0|nl),!pl)break;ql=ax,rl=0|f[ql>>2],sl=0!=(0|rl),sl&&(tl=Vw,ul=tl<<24>>24!=0,ul||0|aw(63258,Vz),vl=d,wl=ax,xl=0|f[wl>>2],yl=xl,Al=0|xi(vl,yl),f[Xz>>2]=Al,0|aw(63261,Xz),Vw=0),Bl=ax,Cl=Bl+4|0,Dl=0|f[Cl>>2],ax=Dl}0|aw(66199,Yz)}while(0);El=e,Fl=El+4|0,Gl=0|f[Fl>>2],e=Gl,Hl=qg,Il=Hl+1|0,qg=Il}switch(0|hA){case 3:return 0|aw(62885,jx),df=d,pf=e,Af=qg,Lf=Af+1|0,vn(df,pf,Lf),void(l=iA);case 4:0|aw(62898,kx),Wf=e,fg=0|f[Wf>>2],rg=0!=(0|fg),rg&&(Cg=e,Ng=qg,Yg=Ng+1|0,un(Cg,Yg),0|aw(62912,Xy),hh=d,sh=e,Dh=0|f[sh>>2],Oh=qg,Zh=Oh+2|0,tn(hh,Dh,Zh)),ii=e,ui=ii+4|0,Gi=0|f[ui>>2],e=Gi,Ri=e,aj=0|f[Ri>>2],lj=0!=(0|aj);a:do if(lj)for(wj=e,Hj=0|f[wj>>2],Yw=Hj,Sj=Yw,bk=qg,mk=bk+1|0,un(Sj,mk),0|aw(62919,Az);;){if(yk=Yw,Jk=0!=(0|yk),!Jk)break a;Uk=Yw,dl=0|f[Uk>>2],ex=dl,ol=ex,zl=0|f[ol>>2],Kl=0!=(0|zl),Kl&&(Vl=Yw,em=qg,pm=em+2|0,un(Vl,pm),0|aw(62928,Lz),Bm=d,Mm=ex,Xm=0|f[Mm>>2],gn=qg,sn=gn+3|0,vn(Bm,Xm,sn)),Gn=ex,Rn=Gn+4|0,ao=0|f[Rn>>2],mo=0|f[ao>>2],xo=0!=(0|mo),xo&&(Jo=ex,Uo=qg,dp=Uo+2|0,un(Jo,dp),0|aw(62945,Wz),op=d,zp=ex,Kp=zp+4|0,Vp=0|f[Kp>>2],eq=0|f[Vp>>2],pq=qg,Aq=pq+3|0,tn(op,eq,Aq)),Mq=ex,Xq=Mq+4|0,gr=0|f[Xq>>2],rr=gr+4|0,Cr=0|f[rr>>2],Nr=0|f[Cr>>2],Yr=0!=(0|Nr),Yr&&(hs=ex,ss=qg,Ds=ss+2|0,un(hs,Ds),0|aw(62955,px),Ps=d,$s=ex,jt=$s+4|0,ut=0|f[jt>>2],Ft=ut+4|0,Qt=0|f[Ft>>2],_t=0|f[Qt>>2],ku=qg,vu=ku+3|0,tn(Ps,_t,vu)),Gu=Yw,Su=Gu+4|0,bv=0|f[Su>>2],Yw=bv}while(0);return mv=e,xv=mv+4|0,Iv=0|f[xv>>2],e=Iv,Tv=e,dw=0|f[Tv>>2],(ow=0!=(0|dw))?(zw=e,Kw=qg,h=Kw+1|0,un(zw,h),0|aw(62969,zx),u=d,F=e,Q=0|f[F>>2],aa=qg,la=aa+2|0,tn(u,Q,la),void(l=iA)):void(l=iA);case 18:return 0|aw(62976,Kx),wa=e,Ha=qg,Sa=Ha+1|0,un(wa,Sa),0|aw(62912,Ux),bb=d,nb=e,yb=0|f[nb>>2],Jb=qg,Ub=Jb+2|0,tn(bb,yb,Ub),dc=e,oc=qg,zc=oc+1|0,un(dc,zc),0|aw(62990,by),Kc=d,Vc=e,ed=Vc+4|0,qd=0|f[ed>>2],Bd=qd+4|0,Md=0|f[Bd>>2],Xd=qg,ge=Xd+2|0,tn(Kc,Md,ge),void(l=iA);case 19:0|aw(62999,ky);break;case 34:return 0|aw(63090,vz),Sg=e,Tg=qg,Ug=Tg+1|0,un(Sg,Ug),0|aw(63100,wz),Vg=d,Wg=e,Xg=0|f[Wg>>2],Zg=qg,$g=Zg+2|0,tn(Vg,Xg,$g),_g=e,ah=qg,bh=ah+1|0,un(_g,bh),0|aw(63107,xz),ch=d,dh=e,eh=dh+4|0,fh=0|f[eh>>2],gh=0|f[fh>>2],ih=qg,jh=ih+2|0,tn(ch,gh,jh),kh=e,lh=kh+4|0,mh=0|f[lh>>2],nh=mh+4|0,oh=0|f[nh>>2],ph=0|f[oh>>2],(qh=0!=(0|ph))?(rh=e,th=qg,uh=th+1|0,un(rh,uh),0|aw(62969,yz),vh=d,wh=e,xh=wh+4|0,yh=0|f[xh>>2],zh=yh+4|0,Ah=0|f[zh>>2],Bh=0|f[Ah>>2],Ch=qg,Eh=Ch+2|0,tn(vh,Bh,Eh),void(l=iA)):void(l=iA);case 36:return 0|aw(63114,zz),Fh=d,Gh=e,Hh=0|f[Gh>>2],Ih=qg,Jh=Ih+1|0,tn(Fh,Hh,Jh),Kh=d,Lh=e,Mh=Lh+4|0,Nh=0|f[Mh>>2],Ph=qg,Qh=Ph+1|0,tn(Kh,Nh,Qh),void(l=iA);case 37:return 0|aw(63125,Bz),Rh=d,Sh=e,Th=0|f[Sh>>2],Uh=qg,Vh=Uh+1|0,tn(Rh,Th,Vh),Wh=d,Xh=e,Yh=Xh+4|0,$h=0|f[Yh>>2],_h=qg,ai=_h+1|0,tn(Wh,$h,ai),void(l=iA);case 38:for(0|aw(63135,Cz),bi=e,ci=0|f[bi>>2],di=0!=(0|ci),di&&(ei=d,fi=e,gi=0|f[fi>>2],hi=qg,ji=hi+1|0,tn(ei,gi,ji)),ki=e,li=ki+4|0,mi=0|f[li>>2],e=mi;;){if(ni=e,oi=0!=(0|ni),!oi)break;pi=e,qi=qg,ri=qi+1|0,un(pi,ri),0|aw(63147,Dz),si=d,vi=e,wi=0|f[vi>>2],yi=0|f[wi>>2],zi=qg,Ai=zi+2|0,vn(si,yi,Ai),Bi=e,Ci=qg,Di=Ci+1|0,un(Bi,Di),0|aw(62912,Ez),Ei=d,Fi=e,Hi=0|f[Fi>>2],Ii=Hi+4|0,Ji=0|f[Ii>>2],Ki=qg,Li=Ki+2|0,tn(Ei,Ji,Li),Mi=e,Ni=Mi+4|0,Oi=0|f[Ni>>2],e=Oi}return void(l=iA);case 43:return 0|aw(63154,Fz),Pi=e,Qi=qg,Si=Qi+1|0,un(Pi,Si),0|aw(63100,Gz),Ti=d,Ui=e,Vi=0|f[Ui>>2],Wi=qg,Xi=Wi+2|0,tn(Ti,Vi,Xi),Yi=e,Zi=qg,$i=Zi+1|0,un(Yi,$i),0|aw(62912,Hz),_i=d,bj=e,cj=bj+4|0,dj=0|f[cj>>2],ej=qg,fj=ej+2|0,tn(_i,dj,fj),void(l=iA);case 44:return 0|aw(63167,Iz),gj=e,hj=qg,ij=hj+1|0,un(gj,ij),0|aw(63100,Jz),jj=d,kj=e,mj=0|f[kj>>2],nj=qg,oj=nj+2|0,tn(jj,mj,oj),pj=e,qj=qg,rj=qj+1|0,un(pj,rj),0|aw(62912,Kz),sj=d,tj=e,uj=tj+4|0,vj=0|f[uj>>2],xj=qg,yj=xj+2|0,tn(sj,vj,yj),void(l=iA);case 45:return 0|aw(63180,Mz),zj=e,Aj=qg,Bj=Aj+1|0,un(zj,Bj),0|aw(63191,Nz),Cj=e,Dj=0|f[Cj>>2],_w=Dj,Ej=_w,Fj=0|f[Ej>>2],Gj=0!=(0|Fj),Gj&&(Ij=_w,Jj=qg,Kj=Jj+2|0,un(Ij,Kj),0|aw(63197,Oz),Lj=d,Mj=_w,Nj=0|f[Mj>>2],Oj=qg,Pj=Oj+3|0,vn(Lj,Nj,Pj)),Qj=_w,Rj=Qj+4|0,Tj=0|f[Rj>>2],_w=Tj,Uj=_w,Vj=0!=(0|Uj),Vj&&(Wj=_w,Xj=0|f[Wj>>2],Yj=0!=(0|Xj),Yj&&(Zj=_w,$j=qg,_j=$j+2|0,un(Zj,_j),0|aw(63203,Pz),ak=d,ck=_w,dk=0|f[ck>>2],ek=qg,fk=ek+3|0,tn(ak,dk,fk)),gk=_w,hk=gk+4|0,ik=0|f[hk>>2],_w=ik,jk=_w,kk=0!=(0|jk),kk&&(lk=_w,nk=0|f[lk>>2],ok=0!=(0|nk),ok&&(pk=_w,qk=qg,rk=qk+2|0,un(pk,rk),0|aw(63210,Qz),sk=d,tk=_w,uk=0|f[tk>>2],vk=qg,wk=vk+3|0,vn(sk,uk,wk)))),zk=e,Ak=zk+4|0,Bk=0|f[Ak>>2],e=Bk,Ck=e,Dk=qg,Ek=Dk+1|0,un(Ck,Ek),0|aw(63217,Rz),Fk=d,Gk=e,Hk=0|f[Gk>>2],Ik=qg,Kk=Ik+2|0,tn(Fk,Hk,Kk),Lk=e,Mk=Lk+4|0,Nk=0|f[Mk>>2],e=Nk,Ok=e,Pk=qg,Qk=Pk+1|0,un(Ok,Qk),0|aw(63222,Sz),Rk=d,Sk=e,Tk=0|f[Sk>>2],Vk=qg,Wk=Vk+2|0,tn(Rk,Tk,Wk),void(l=iA);case 66:return 0|aw(63264,Zz),Jl=d,Ll=e,Ml=0|f[Ll>>2],Nl=qg,Ol=Nl+1|0,tn(Jl,Ml,Ol),Pl=e,Ql=qg,Rl=Ql+1|0,un(Pl,Rl),Sl=d,Tl=e,Ul=Tl+4|0,Wl=0|f[Ul>>2],Xl=0|f[Wl>>2],Yl=Xl,Zl=0|xi(Sl,Yl),$l=e,_l=$l+4|0,am=0|f[_l>>2],bm=0|f[am>>2],cm=bm,f[$z>>2]=Zl,_z=$z+4|0,f[_z>>2]=cm,0|aw(63276,$z),dm=e,fm=dm+4|0,gm=0|f[fm>>2],hm=gm+4|0,im=0|f[hm>>2],jm=0|f[im>>2],e=jm,km=e,(lm=0!=(0|km))?(mm=e,nm=qg,om=nm+1|0,un(mm,om),0|aw(63294,lx),qm=d,rm=e,sm=0|f[rm>>2],tm=qg,um=tm+2|0,vn(qm,sm,um),vm=e,wm=vm+4|0,xm=0|f[wm>>2],(ym=0!=(0|xm))?(zm=e,Cm=qg,Dm=Cm+1|0,un(zm,Dm),0|aw(63301,mx),Em=d,Fm=e,Gm=Fm+4|0,Hm=0|f[Gm>>2],Im=qg,Jm=Im+2|0,tn(Em,Hm,Jm),void(l=iA)):void(l=iA)):void(l=iA);case 69:return 0|aw(63309,nx),Km=d,Lm=e,Nm=0|f[Lm>>2],Om=qg,Pm=Om+1|0,tn(Km,Nm,Pm),Qm=d,Rm=e,Sm=Rm+4|0,Tm=0|f[Sm>>2],Um=qg,Vm=Um+1|0,tn(Qm,Tm,Vm),void(l=iA);case 70:return 0|aw(63321,ox),Wm=d,Ym=e,Zm=0|f[Ym>>2],$m=qg,_m=$m+1|0,tn(Wm,Zm,_m),an=d,bn=e,cn=bn+4|0,dn=0|f[cn>>2],en=qg,fn=en+1|0,tn(an,dn,fn),void(l=iA);case 71:return 0|aw(63333,qx),hn=d,jn=e,kn=0|f[jn>>2],ln=qg,mn=ln+1|0,tn(hn,kn,mn),nn=e,on=qg,pn=on+1|0,un(nn,pn),qn=d,rn=e,wn=rn+4|0,xn=0|f[wn>>2],yn=xn,zn=0|xi(qn,yn),f[rx>>2]=zn,0|aw(63347,rx),void(l=iA);case 72:return An=d,Bn=e,Cn=Bn,Dn=0|xi(An,Cn),f[sx>>2]=Dn,0|aw(63353,sx),void(l=iA);case 73:return 0|aw(63372,tx),En=d,Fn=e,Hn=qg,In=Hn+1|0,vn(En,Fn,In),void(l=iA);case 74:for(0|aw(63385,ux);;){if(Jn=e,Kn=0!=(0|Jn),!Kn)break;Ln=e,Mn=qg,Nn=Mn+1|0,un(Ln,Nn),0|aw(63397,vx),On=d,Pn=e,Qn=0|f[Pn>>2],Sn=0|f[Qn>>2],Tn=qg,Un=Tn+2|0,tn(On,Sn,Un),Vn=e,Wn=qg,Xn=Wn+1|0,un(Vn,Xn),0|aw(63403,wx),Yn=d,Zn=e,$n=0|f[Zn>>2],_n=$n+4|0,bo=0|f[_n>>2],co=qg,eo=co+2|0,tn(Yn,bo,eo),fo=e,go=fo+4|0,ho=0|f[go>>2],e=ho}return void(l=iA);case 77:return 0|aw(63411,xx),io=d,jo=e,ko=qg,lo=ko+1|0,tn(io,jo,lo),void(l=iA);case 78:return 0|aw(63424,yx),no=e,oo=qg,po=oo+1|0,un(no,po),0|aw(63436,Ax),qo=d,ro=e,so=0|f[ro>>2],to=qg,uo=to+2|0,tn(qo,so,uo),vo=e,wo=qg,yo=wo+1|0,un(vo,yo),0|aw(63442,Bx),zo=d,Ao=e,Bo=Ao+4|0,Co=0|f[Bo>>2],Do=qg,Eo=Do+2|0,tn(zo,Co,Eo),void(l=iA);case 79:if(0|aw(63448,Cx),Fo=e,Go=qg,Ho=Go+1|0,un(Fo,Ho),0|aw(63461,Dx),Ko=e,Lo=0|f[Ko>>2],bx=Lo,Mo=bx,No=0|f[Mo>>2],Oo=0!=(0|No),Oo&&(Po=e,Qo=qg,Ro=Qo+2|0,un(Po,Ro),0|aw(63197,Ex),So=d,To=bx,Vo=0|f[To>>2],Wo=qg,Xo=Wo+3|0,vn(So,Vo,Xo)),Yo=bx,Zo=Yo+4|0,$o=0|f[Zo>>2],bx=$o,_o=bx,ap=0!=(0|_o)){bp=bx,cp=0|f[bp>>2],ep=0!=(0|cp);do if(ep){if(fp=bx,gp=qg,hp=gp+2|0,un(fp,hp),0|aw(63203,Fx),ip=bx,jp=0|f[ip>>2],kp=(0|jp)==-1){lp=bx,mp=qg,np=mp+2|0,un(lp,np),0|aw(63468,Gx);break}pp=d,qp=bx,rp=0|f[qp>>2],sp=qg,tp=sp+3|0,tn(pp,rp,tp);break}while(0);up=bx,vp=up+4|0,wp=0|f[vp>>2],bx=wp,xp=bx,yp=0!=(0|xp),yp&&(Ap=bx,Bp=0|f[Ap>>2],Cp=0!=(0|Bp),Cp&&(Dp=bx,Ep=qg,Fp=Ep+2|0,un(Dp,Fp),0|aw(63210,Hx),Gp=d,Hp=bx,Ip=0|f[Hp>>2],Jp=qg,Lp=Jp+3|0,vn(Gp,Ip,Lp)))}return Mp=e,Np=qg,Op=Np+1|0,un(Mp,Op),0|aw(63442,Ix),Pp=d,Qp=e,Rp=Qp+4|0,Sp=0|f[Rp>>2],Tp=qg,Up=Tp+2|0,tn(Pp,Sp,Up),void(l=iA);case 90:return 0|aw(63477,Jx),Wp=e,Xp=qg,Yp=Xp+1|0,un(Wp,Yp),0|aw(63436,Lx),Zp=d,$p=e,_p=0|f[$p>>2],aq=qg,bq=aq+2|0,tn(Zp,_p,bq),cq=e,dq=cq+4|0,fq=0|f[dq>>2],e=fq,gq=e,hq=qg,iq=hq+1|0,un(gq,iq),jq=d,kq=e,lq=0|f[kq>>2],mq=lq,nq=0|xi(jq,mq),oq=e,qq=0|f[oq>>2],rq=qq,f[Mx>>2]=nq,aA=Mx+4|0,f[aA>>2]=rq,0|aw(63492,Mx),sq=e,tq=sq+4|0,uq=0|f[tq>>2],e=uq,vq=d,wq=e,xq=0|f[wq>>2],yq=qg,zq=yq+1|0,tn(vq,xq,zq),void(l=iA);case 91:return 0|aw(63506,Nx),Bq=e,(Cq=0!=(0|Bq))?(Dq=e,Eq=qg,Fq=Eq+1|0,un(Dq,Fq),0|aw(63294,Ox),Gq=d,Hq=e,Iq=0|f[Hq>>2],Jq=qg,Kq=Jq+2|0,vn(Gq,Iq,Kq),Nq=e,Oq=Nq+4|0,Pq=0|f[Oq>>2],(Qq=0!=(0|Pq))?(Rq=e,Sq=qg,Tq=Sq+1|0,un(Rq,Tq),0|aw(63301,Px),Uq=d,Vq=e,Wq=Vq+4|0,Yq=0|f[Wq>>2],Zq=qg,$q=Zq+2|0,tn(Uq,Yq,$q),void(l=iA)):void(l=iA)):void(l=iA);case 94:return 0|aw(63519,Qx),void(l=iA);case 95:return 0|aw(63532,Rx),_q=d,ar=e,br=qg,cr=br+1|0,tn(_q,ar,cr),void(l=iA);case 96:return 0|aw(63546,Sx),dr=d,er=e,fr=qg,hr=fr+1|0,vn(dr,er,hr),void(l=iA);case 97:return 0|aw(63559,Tx),ir=d,jr=e,kr=qg,lr=kr+1|0,tn(ir,jr,lr),void(l=iA);case 98:return 0|aw(63572,Vx),mr=d,nr=e,or=qg,pr=or+1|0,tn(mr,nr,pr),void(l=iA);case 99:return 0|aw(63584,Wx),void(l=iA);case 100:return 0|aw(63595,Xx),void(l=iA);case 101:return qr=d,sr=e,tr=sr,ur=0|xi(qr,tr),f[Yx>>2]=ur,0|aw(63607,Yx),void(l=iA);case 102:return vr=d,wr=e,xr=wr,yr=0|xi(vr,xr),f[Zx>>2]=yr,0|aw(63621,Zx),void(l=iA);case 103:return zr=d,Ar=e,Br=Ar,Dr=0|xi(zr,Br),f[$x>>2]=Dr,0|aw(63635,$x),void(l=iA);case 104:return Er=d,Fr=e,Gr=Fr,Hr=0|xi(Er,Gr),f[_x>>2]=Hr,0|aw(63649,_x),void(l=iA);case 105:return Ir=d,Jr=e,Kr=Jr,Lr=0|xi(Ir,Kr),f[ay>>2]=Lr,0|aw(63663,ay),void(l=iA);case 106:return 0|aw(63678,cy),Mr=e,Or=qg,Pr=Or+1|0,un(Mr,Pr),0|aw(63436,dy),Qr=d,Rr=e,Sr=0|f[Rr>>2],Tr=qg,Ur=Tr+2|0,tn(Qr,Sr,Ur),Vr=e,Wr=qg,Xr=Wr+1|0,un(Vr,Xr),0|aw(63442,ey),Zr=d,$r=e,_r=$r+4|0,as=0|f[_r>>2],bs=qg,cs=bs+2|0,tn(Zr,as,cs),void(l=iA);case 107:return ds=e,es=ds,f[fy>>2]=es,0|aw(63691,fy),void(l=iA);case 108:return fs=e,gs=fs,f[gy>>2]=gs,0|aw(63711,gy),void(l=iA);case 109:return is=d,js=e,ks=js,ls=0|xi(is,ks),f[hy>>2]=ls,0|aw(63730,hy),void(l=iA);case 110:return 0|aw(63743,iy),ms=d,ns=e,os=qg,ps=os+1|0,tn(ms,ns,ps),void(l=iA);case 111:return qs=e,rs=0|f[qs>>2],ts=e,us=ts+4|0,vs=0|f[us>>2],ws=0|f[vs>>2],xs=ws,f[jy>>2]=rs,bA=jy+4|0,f[bA>>2]=xs,0|aw(63760,jy),void(l=iA);case 112:return ys=e,f[ly>>2]=ys,0|aw(63781,ly),void(l=iA);case 113:return 0|aw(63796,my),zs=d,As=e,Bs=qg,Cs=Bs+1|0,tn(zs,As,Cs),void(l=iA);case 114:return Es=e,Fs=0|f[Es>>2],Gs=e,Hs=Gs+4|0,Is=0|f[Hs>>2],Js=Is,f[ny>>2]=Fs,cA=ny+4|0,f[cA>>2]=Js,0|aw(63809,ny),void(l=iA);case 115:return 0|aw(63831,oy),Ks=d,Ls=e,Ms=qg,Ns=Ms+1|0,vn(Ks,Ls,Ns),void(l=iA);case 116:return Qs=e,Rs=0|f[Qs>>2],Ss=e,Ts=Ss+4|0,Us=0|f[Ts>>2],Vs=Us,f[py>>2]=Rs,dA=py+4|0,f[dA>>2]=Vs,0|aw(63842,py),void(l=iA);case 117:return 0|aw(63865,qy),Ws=d,Xs=e,Ys=qg,Zs=Ys+1|0,vn(Ws,Xs,Zs),void(l=iA);case 118:return _s=e,at=0|f[_s>>2],bt=e,ct=bt+4|0,dt=0|f[ct>>2],f[ry>>2]=at,eA=ry+4|0,f[eA>>2]=dt,0|aw(63877,ry),void(l=iA);case 119:return 0|aw(63895,ty),et=d,ft=e,gt=0|f[ft>>2],ht=qg,it=ht+1|0,vn(et,gt,it),kt=e,lt=qg,un(kt,lt),mt=e,nt=mt+4|0,ot=0|f[nt>>2],pt=ot+4|0,qt=0|f[pt>>2],rt=0|f[qt>>2],f[uy>>2]=rt,0|aw(63907,uy),st=e,tt=qg,un(st,tt),vt=e,wt=vt+4|0,xt=0|f[wt>>2],yt=xt+4|0,zt=0|f[yt>>2],At=zt+4|0,Bt=0|f[At>>2],f[vy>>2]=Bt,0|aw(63917,vy),void(l=iA);case 120:return Ct=d,Dt=e,Et=Dt,Gt=0|xi(Ct,Et),f[wy>>2]=Gt,0|aw(63926,wy),void(l=iA);case 121:return 0|aw(63940,xy),void(l=iA);case 122:return 0|aw(63951,yy),void(l=iA);case 123:return 0|aw(63961,zy),void(l=iA);case 124:return 0|aw(63972,By),void(l=iA);case 125:return Ht=d,It=e,Jt=0|f[It>>2],Kt=Jt,Lt=0|xi(Ht,Kt),Mt=d,Nt=e,Ot=Nt+4|0,Pt=0|f[Ot>>2],Rt=Pt,St=0|xi(Mt,Rt),f[Cy>>2]=Lt,fA=Cy+4|0,f[fA>>2]=St,0|aw(63984,Cy),void(l=iA);case 126:for(0|aw(64003,Dy),Tt=e,ix=Tt;;){if(Ut=ix,Vt=0!=(0|Ut),!Vt)break;Wt=d,Xt=ix,Yt=0|f[Xt>>2],Zt=Yt,$t=0|xi(Wt,Zt),f[Ey>>2]=$t,0|aw(64014,Ey),au=ix,bu=au+4|0,cu=0|f[bu>>2],ix=cu}return 0|aw(64018,Fy),void(l=iA);case 130:0|aw(64021,Gy),du=e,eu=0|f[du>>2],fu=0|f[eu>>2],gu=0==(0|fu),hu=e;do{if(!gu){if(su=0|f[hu>>2],tu=0|f[su>>2],uu=1==(0|tu)){wu=e,xu=qg,yu=xu+1|0,un(wu,yu),zu=d,Au=e,Bu=0|f[Au>>2],Cu=Bu+4|0,Du=0|f[Cu>>2],Eu=Du,Fu=0|xi(zu,Eu),f[Iy>>2]=Fu,0|aw(63347,Iy);break}Hu=d,Iu=e,Ju=0|f[Iu>>2],Ku=0|f[Ju>>2],Lu=qg,Mu=Lu+1|0,tn(Hu,Ku,Mu),Nu=e,Ou=qg,Pu=Ou+1|0,un(Nu,Pu),Qu=d,Tu=e,Uu=0|f[Tu>>2],Vu=Uu+4|0,Wu=0|f[Vu>>2],Xu=Wu,Yu=0|xi(Qu,Xu),f[Ky>>2]=Yu,0|aw(63347,Ky);break}iu=qg,ju=iu+1|0,un(hu,ju),lu=d,mu=e,nu=0|f[mu>>2],ou=nu+4|0,pu=0|f[ou>>2],qu=pu,ru=0|xi(lu,qu),f[Hy>>2]=ru,0|aw(64034,Hy)}while(0);return Zu=e,$u=Zu+4|0,_u=0|f[$u>>2],av=0|f[_u>>2],cv=0!=(0|av),cv&&(dv=e,ev=qg,fv=ev+1|0,un(dv,fv),0|aw(64039,Ly),gv=d,hv=e,iv=hv+4|0,jv=0|f[iv>>2],kv=0|f[jv>>2],lv=qg,nv=lv+2|0,tn(gv,kv,nv)),ov=e,pv=qg,qv=pv+1|0,un(ov,qv),0|aw(62912,My),rv=d,sv=e,tv=sv+4|0,uv=0|f[tv>>2],vv=uv+4|0,wv=0|f[vv>>2],yv=0|f[wv>>2],zv=yv+4|0,Av=0|f[zv>>2],Bv=qg,Cv=Bv+2|0,tn(rv,Av,Cv),void(l=iA);case 138:0|aw(64047,Ny),Dv=e,Ev=0|f[Dv>>2],Fv=0|f[Ev>>2],Gv=0==(0|Fv),Hv=e;do{if(!Gv){if(Sv=0|f[Hv>>2],Uv=0|f[Sv>>2],Vv=1==(0|Uv)){Wv=e,Xv=qg,Yv=Xv+1|0,un(Wv,Yv),Zv=d,$v=e,_v=0|f[$v>>2],bw=_v+4|0,cw=0|f[bw>>2],ew=cw,fw=0|xi(Zv,ew),f[Py>>2]=fw,0|aw(63347,Py);break}gw=d,hw=e,iw=0|f[hw>>2],jw=0|f[iw>>2],kw=qg,lw=kw+1|0,tn(gw,jw,lw),mw=e,nw=qg,pw=nw+1|0,un(mw,pw),qw=d,rw=e,sw=0|f[rw>>2],tw=sw+4|0,uw=0|f[tw>>2],vw=uw,ww=0|xi(qw,vw),f[Qy>>2]=ww,0|aw(63347,Qy);break}Jv=qg,Kv=Jv+1|0,un(Hv,Kv),Lv=d,Mv=e,Nv=0|f[Mv>>2],Ov=Nv+4|0,Pv=0|f[Ov>>2],Qv=Pv,Rv=0|xi(Lv,Qv),f[Oy>>2]=Rv,0|aw(64034,Oy)}while(0);return xw=e,yw=qg,Aw=yw+1|0,un(xw,Aw),0|aw(62912,Ry),Bw=d,Cw=e,Dw=Cw+4|0,Ew=0|f[Dw>>2],Fw=0|f[Ew>>2],Gw=Fw+4|0,Hw=0|f[Gw>>2],Iw=qg,Jw=Iw+2|0,tn(Bw,Hw,Jw),void(l=iA);case 144:return 0|aw(64061,Ty),Lw=d,Mw=e,Nw=0|f[Mw>>2],Ow=qg,Pw=Ow+1|0,tn(Lw,Nw,Pw),Qw=e,Rw=qg,Sw=Rw+1|0,un(Qw,Sw),0|aw(62912,Uy),Tw=d,Uw=e,i=Uw+4|0,j=0|f[i>>2],k=0|f[j>>2],n=k+4|0,o=0|f[n>>2],p=qg,q=p+2|0,tn(Tw,o,q),void(l=iA);case 145:0|aw(64075,Vy),r=e,s=qg,t=s+1|0,un(r,t),v=d,w=e,x=0|f[w>>2],y=x,z=0|xi(v,y),f[Wy>>2]=z,0|aw(64086,Wy),A=e,B=A+4|0,C=0|f[B>>2],e=C,D=e,E=0|f[D>>2],cx=E,Ww=1,G=cx,H=0!=(0|G);do if(H){if(I=cx,J=0|f[I>>2],K=0!=(0|J),!K&&(L=cx,M=L+4|0,N=0|f[M>>2],O=0!=(0|N),!O))break;for(P=cx,R=qg,S=R+1|0,un(P,S),0|aw(63240,Yy),T=cx,U=qg,V=U+2|0,un(T,V);;){if(W=cx,Y=0!=(0|W),!Y)break;Z=cx,$=0|f[Z>>2],_=0!=(0|$),_&&(ba=Ww,ca=ba<<24>>24!=0,ca||0|aw(63258,Zy),da=d,ea=cx,fa=0|f[ea>>2],ga=fa,ha=0|xi(da,ga),f[$y>>2]=ha,0|aw(63261,$y),Ww=0),ia=cx,ja=ia+4|0,ka=0|f[ja>>2],cx=ka}0|aw(66199,_y)}while(0);if(ma=e,na=ma+4|0,oa=0|f[na>>2],e=oa,pa=e,qa=0|f[pa>>2],ra=0!=(0|qa)){sa=e,ta=0|f[sa>>2],fx=ta,ua=fx,va=0|f[ua>>2],xa=0!=(0|va),xa&&(ya=fx,za=qg,Aa=za+1|0,un(ya,Aa),0|aw(63012,az),Ba=d,Ca=fx,Da=0|f[Ca>>2],Ea=qg,Fa=Ea+2|0,vn(Ba,Da,Fa)),Ga=fx,Ia=Ga+4|0,Ja=0|f[Ia>>2],fx=Ja,Ka=fx,La=0|f[Ka>>2],Ma=0!=(0|La);a:do if(Ma)for(Na=fx,Oa=qg,Pa=Oa+1|0,un(Na,Pa),0|aw(63029,cz),Qa=fx,Ra=0|f[Qa>>2],dx=Ra;;){if(Ta=dx,Ua=0!=(0|Ta),!Ua)break a;Va=dx,Wa=qg,Xa=Wa+2|0,un(Va,Xa),Ya=d,Za=dx,$a=0|f[Za>>2],_a=0|f[$a>>2],ab=_a,cb=0|xi(Ya,ab),f[dz>>2]=cb,0|aw(63045,dz),db=d,eb=dx,fb=0|f[eb>>2],gb=fb+4|0,hb=0|f[gb>>2],tn(db,hb,0),ib=dx,jb=ib+4|0,kb=0|f[jb>>2],dx=kb}while(0);lb=fx,ob=lb+4|0,pb=0|f[ob>>2],fx=pb,qb=fx,rb=0|f[qb>>2],sb=0!=(0|rb),sb&&(tb=fx,ub=qg,vb=ub+1|0,un(tb,vb),wb=d,xb=fx,zb=0|f[xb>>2],Ab=zb,Bb=0|xi(wb,Ab),f[ez>>2]=Bb,0|aw(63049,ez)),Cb=fx,Db=Cb+4|0,Eb=0|f[Db>>2],fx=Eb,Fb=fx,Gb=0|f[Fb>>2],Hb=0!=(0|Gb),Hb&&(Ib=fx,Kb=qg,Lb=Kb+1|0,un(Ib,Lb),0|aw(63059,fz),Mb=d,Nb=fx,Ob=0|f[Nb>>2],Pb=qg,Qb=Pb+2|0,vn(Mb,Ob,Qb)),Rb=fx,Sb=Rb+4|0,Tb=0|f[Sb>>2],Vb=0!=(0|Tb),Vb&&(Wb=fx,Xb=qg,Yb=Xb+1|0,un(Wb,Yb),Zb=d,$b=fx,_b=$b+4|0,ac=0|f[_b>>2],bc=ac,cc=0|xi(Zb,bc),f[gz>>2]=cc,0|aw(63081,gz))}return ec=d,fc=e,gc=fc+4|0,hc=0|f[gc>>2],ic=0|f[hc>>2],jc=qg,kc=jc+1|0,tn(ec,ic,kc),void(l=iA);case 170:if(0|aw(64090,hz),lc=d,mc=e,nc=0|f[mc>>2],pc=qg,qc=pc+1|0,tn(lc,nc,qc),rc=e,sc=rc+4|0,tc=0|f[sc>>2],e=tc,uc=e,vc=qg,wc=vc+1|0,un(uc,wc),xc=d,yc=e,Ac=0|f[yc>>2],Bc=Ac,Cc=0|xi(xc,Bc),f[iz>>2]=Cc,0|aw(64034,iz),Dc=e,Ec=Dc+4|0,Fc=0|f[Ec>>2],Gc=Fc+4|0,Hc=0|f[Gc>>2],e=Hc,Ic=e,Jc=0|f[Ic>>2],Lc=0!=(0|Jc)){Mc=e,Nc=0|f[Mc>>2],gx=Nc,Oc=gx,Pc=0|f[Oc>>2],Qc=0!=(0|Pc),Qc&&(Rc=gx,Sc=qg,Tc=Sc+1|0,un(Rc,Tc),0|aw(63012,jz),Uc=d,Wc=gx,Xc=0|f[Wc>>2],Yc=qg,Zc=Yc+2|0,vn(Uc,Xc,Zc)),$c=gx,_c=$c+4|0,ad=0|f[_c>>2],gx=ad,bd=gx,cd=0|f[bd>>2],dd=0!=(0|cd);a:do if(dd)for(fd=gx,gd=qg,hd=gd+1|0,un(fd,hd),0|aw(63029,kz),id=gx,jd=0|f[id>>2],$w=jd;;){if(kd=$w,ld=0!=(0|kd),!ld)break a;md=$w,nd=qg,od=nd+2|0,un(md,od),rd=d,sd=$w,td=0|f[sd>>2],ud=0|f[td>>2],vd=ud,wd=0|xi(rd,vd),f[lz>>2]=wd,0|aw(63045,lz),xd=d,yd=$w,zd=0|f[yd>>2],Ad=zd+4|0,Cd=0|f[Ad>>2],tn(xd,Cd,0),Dd=$w,Ed=Dd+4|0,Fd=0|f[Ed>>2],$w=Fd}while(0);Gd=gx,Hd=Gd+4|0,Id=0|f[Hd>>2],gx=Id,Jd=gx,Kd=0|f[Jd>>2],Ld=0!=(0|Kd),Ld&&(Nd=gx,Od=qg,Pd=Od+1|0,un(Nd,Pd),Qd=d,Rd=gx,Sd=0|f[Rd>>2],Td=Sd,Ud=0|xi(Qd,Td),f[mz>>2]=Ud,0|aw(63049,mz)),Vd=gx,Wd=Vd+4|0,Yd=0|f[Wd>>2],gx=Yd,Zd=gx,$d=0|f[Zd>>2],_d=0!=(0|$d),_d&&(ae=gx,be=qg,ce=be+1|0,un(ae,ce),0|aw(63059,nz),de=d,ee=gx,fe=0|f[ee>>2],he=qg,ie=he+2|0,vn(de,fe,ie)),je=gx,ke=je+4|0,le=0|f[ke>>2],gx=le,me=gx,ne=0!=(0|me),ne&&(oe=gx,pe=qg,qe=pe+1|0,un(oe,qe),se=d,te=gx,ue=te,ve=0|xi(se,ue),f[pz>>2]=ve,0|aw(63081,pz))}return we=e,xe=we+4|0,ye=0|f[xe>>2],e=ye,ze=d,Ae=e,Be=0|f[Ae>>2],De=qg,Ee=De+1|0,tn(ze,Be,Ee),void(l=iA);case 184:return 0|aw(64102,qz),Fe=d,Ge=e,He=qg,Ie=He+1|0,tn(Fe,Ge,Ie),void(l=iA);case 185:return 0|aw(64117,rz),Je=d,Ke=e,Le=Ke+16|0,Me=0|f[Le>>2],Oe=qg,Pe=Oe+1|0,tn(Je,Me,Pe),void(l=iA);case 186:return Qe=hx,Re=hx,f[sz>>2]=Qe,gA=sz+4|0,f[gA>>2]=Re,0|aw(64132,sz),void(l=iA)}if(0|aw(62999,sy),re=e,Ce=re+4|0,Ne=0|f[Ce>>2],e=Ne,Se=e,Te=0|f[Se>>2],Ve=0!=(0|Te)){We=e,Xe=0|f[We>>2],Xw=Xe,Ye=Xw,Ze=0|f[Ye>>2],$e=0!=(0|Ze),$e&&(_e=Xw,af=qg,bf=af+1|0,un(_e,bf),0|aw(63012,Ay),cf=d,ef=Xw,ff=0|f[ef>>2],gf=qg,hf=gf+2|0,vn(cf,ff,hf)),jf=Xw,kf=jf+4|0,lf=0|f[kf>>2],Xw=lf,mf=Xw,nf=0|f[mf>>2],of=0!=(0|nf);a:do if(of)for(qf=Xw,rf=qg,sf=rf+1|0,un(qf,sf),0|aw(63029,Jy),tf=Xw,uf=0|f[tf>>2],Zw=uf;;){if(vf=Zw,wf=0!=(0|vf),!wf)break a;xf=Zw,yf=qg,zf=yf+2|0,un(xf,zf),Bf=d,Cf=Zw,Df=0|f[Cf>>2],Ef=0|f[Df>>2],Ff=Ef,Gf=0|xi(Bf,Ff),f[Sy>>2]=Gf,0|aw(63045,Sy),Hf=d,If=Zw,Jf=0|f[If>>2],Kf=Jf+4|0,Mf=0|f[Kf>>2],tn(Hf,Mf,0),Nf=Zw,Of=Nf+4|0,Pf=0|f[Of>>2],Zw=Pf}while(0);Qf=Xw,Rf=Qf+4|0,Sf=0|f[Rf>>2],Xw=Sf,Tf=Xw,Uf=0|f[Tf>>2],Vf=0!=(0|Uf),Vf&&(Xf=Xw,Yf=qg,Zf=Yf+1|0,un(Xf,Zf),$f=d,_f=Xw,ag=0|f[_f>>2],bg=ag,cg=0|xi($f,bg),f[bz>>2]=cg,0|aw(63049,bz)),dg=Xw,eg=dg+4|0,gg=0|f[eg>>2],Xw=gg,hg=Xw,ig=0|f[hg>>2],jg=0!=(0|ig),jg&&(kg=Xw,lg=qg,mg=lg+1|0,un(kg,mg),0|aw(63059,oz),ng=d,og=Xw,pg=0|f[og>>2],sg=qg,tg=sg+2|0,vn(ng,pg,tg)),ug=Xw,vg=ug+4|0,wg=0|f[vg>>2],Xw=wg,xg=Xw,yg=0!=(0|xg),yg&&(zg=Xw,Ag=qg,Bg=Ag+1|0,un(zg,Bg),Dg=d,Eg=Xw,Fg=Eg,Gg=0|xi(Dg,Fg),f[tz>>2]=Gg,0|aw(63081,tz))}Hg=e,Ig=qg,Jg=Ig+1|0,un(Hg,Jg),0|aw(62912,uz),Kg=d,Lg=e,Mg=Lg+4|0,Og=0|f[Mg>>2],Pg=0|f[Og>>2],Qg=qg,Rg=Qg+2|0,tn(Kg,Pg,Rg),l=iA}function un(a,b){a|=0,b|=0;var c=0,d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;for(t=l,l=l+16|0,(0|l)>=(0|m)&&X(),r=t,c=a,d=b,h=c,i=h+8|0,j=0|e[i>>1],k=65535&j,f[r>>2]=k,0|aw(62879,r);;){if(n=d,o=n+-1|0,d=o,p=0!=(0|n),!p)break;q=0|f[695],0|bw(32,q),g=0|f[695],0|bw(32,g)}l=t}function vn(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;for(t=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,i=c;;){if(j=e,k=0!=(0|j),!k)break;n=d,o=e,p=0|f[o>>2],q=i,tn(n,p,q),r=e,g=r+4|0,h=0|f[g>>2],e=h}l=t}function wn(a){a|=0;var b=0,c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ka=0;return ka=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,r=c,C=0|et(r),ia=C,N=ia,(Z=0!=(0|N))?(da=ia,ea=0|gt(da,1408),ha=ea,fa=ha,ga=0!=(0|fa),ga?(e=ha,0|sw(0|e,73160,1408),g=c,h=ha,f[h>>2]=g,i=ia,j=ha,k=j+4|0,f[k>>2]=i,n=ha,o=n+16|0,f[o>>2]=0,p=ha,q=p+12|0,f[q>>2]=0,s=ha,t=s+20|0,f[t>>2]=0,u=ha,v=u+72|0,w=0|d[v>>0],x=w&-2,y=1|x,d[v>>0]=y,z=ha,A=z+68|0,f[A>>2]=0,B=ha,D=B+64|0,f[D>>2]=0,E=ha,F=E+1148|0,G=0|d[F>>0],H=G&-3,d[F>>0]=H,I=ha,J=I+32|0,f[J>>2]=1,K=ha,L=K+36|0,f[L>>2]=0,M=ha,O=M+44|0,f[O>>2]=0,P=ha,Q=P+1120|0,f[Q>>2]=0,R=ha,S=R+1112|0,f[S>>2]=0,T=ha,U=T+1124|0,f[U>>2]=0,V=ha,W=V+1400|0,f[W>>2]=-1,Y=ha,$=Y+1392|0,f[$>>2]=0,_=ha,aa=_+1396|0,f[aa>>2]=0,ba=ha,b=ba,ca=b,l=ka,0|ca):(b=0,ca=b,l=ka,0|ca)):(b=0,ca=b,l=ka,0|ca)}function xn(a){a|=0;var b=0,c=0,d=0,e=0,h=0;h=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=c+4|0,e=0|f[d>>2],ft(e),l=h}function yn(a){a|=0;var b=0,c=0,d=0,f=0;return f=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=0|Lc(c,1,32),l=f,0|d}function zn(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,g=d,h=0|f[g>>2],Dc(e,h),i=c,j=d,Dc(i,j),l=n}function An(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;return E=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,u=s,v=0!=(0|u),v&&(w=s,x=0|Jv(w),B=x,y=d,z=B,A=z+1|0,g=0|Zf(y,A),C=g,h=C,i=s,j=B,k=j+1|0,0|sw(0|h,0|i,0|k),n=C,o=e,p=o+8|0,f[p>>2]=n),q=e,r=q+8|0,t=0|f[r>>2],l=E,0|t}function Bn(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;s=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,g=b,h=c,i=d,j=h,k=g,n=k+16|0,f[n>>2]=j,o=i,p=g,q=p+20|0,f[q>>2]=o,l=s}function Cn(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0;return A=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,r=b,s=r,t=65535&s,u=d,v=u+1396|0,w=0|f[v>>2],x=t>>>0>=w>>>0,x?(c=0,q=c,l=A,0|q):(y=d,e=0|f[y>>2],g=r,h=65535&g,i=d,j=i+1392|0,k=0|f[j>>2],n=k+(h<<2)|0,o=0|f[n>>2],p=0|si(e,o,0),c=p,q=c,l=A,0|q)}function Dn(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;return B=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,r=b,s=c,t=e,u=0|wn(t),z=u,v=z,w=0!=(0|v),w?(x=z,y=x+16|0,f[y>>2]=0,g=z,h=g+12|0,f[h>>2]=0,i=r,j=z,k=j+20|0,f[k>>2]=i,n=z,o=s,Fk(n,o),p=z,d=p,q=d,l=B,0|q):(d=0,q=d,l=B,0|q)}function En(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;q=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=b,f=c,g=d,h=e,i=e,j=f,k=g,n=0|Dn(i,j,k),o=g,Fn(a,h,n,o),l=q}function Fn(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Mb=0;if(Mb=l,l=l+368|0,(0|l)>=(0|m)&&X(),h=Mb+104|0,g=Mb+96|0,Jb=Mb,Ib=Mb+64|0,Db=Mb+112|0,ga=Mb+48|0,ra=Mb+40|0,Ca=Mb+32|0,Na=Mb+24|0,Ya=Mb+16|0,hb=Mb+8|0,i=b,j=c,W=e,sb=i,k=sb+32|0,x=0|f[k>>2],Hb=x,Eb=0,I=j,P=0!=(0|I),!P)return Gn(a),void(l=Mb);if(Q=j,R=Q+1144|0,S=0|f[R>>2],T=0!=(0|S),T&&(U=j,V=U+1136|0,Y=0|f[V>>2],Z=0!=(0|Y),!Z)){if(Fa=i,Ga=j,Ha=0|Xt(Fa,Ga),Gb=Ha,Ia=j,xn(Ia),Ja=Gb,Ka=0==(0|Ja))return La=i,Ma=i,Oa=0|tp(Ma,67747),Pa=i,rg(Na,Pa,64191,13),f[h>>2]=0|f[Na>>2],f[h+4>>2]=0|f[Na+4>>2],xr(Ya,La,Oa,h),Qa=0|f[Ya>>2],Ra=i,Sa=Ra+20|0,f[Sa>>2]=Qa,Gn(a),void(l=Mb);Ta=W,Ua=0!=(0|Ta);do if(Ua){if(Va=W,Wa=Va+28|0,Xa=0|d[Wa>>0],Za=(255&Xa)>>>1,$a=1&Za,_a=$a<<24>>24!=0,_a&&(ab=i,bb=Gb,jr(ab,bb)),cb=W,db=cb+28|0,eb=0|d[db>>0],fb=(255&eb)>>>2,gb=1&fb,ib=gb<<24>>24!=0)return jb=Gb,Hn(a,jb),void(l=Mb);if(kb=W,lb=kb+24|0,mb=0|f[lb>>2],nb=0!=(0|mb),nb&&(ob=W,pb=ob+24|0,qb=0|f[pb>>2],Hb=qb),rb=W,tb=rb+28|0,ub=0|d[tb>>0],vb=(255&ub)>>>3,wb=1&vb,xb=wb<<24>>24!=0,yb=W,xb){zb=yb+4|0,Ab=0|f[zb>>2],Bb=Ab+1|0,Eb=Bb;break}Cb=yb+28|0,n=0|d[Cb>>0],o=n&-9,p=8|o,d[Cb>>0]=p;break}while(0);return q=Hb,r=Gb,s=r+16|0,f[s>>2]=q,t=i,u=t+12|0,v=0|f[u>>2],w=v+16|0,y=0|f[w>>2],z=0!=(0|y),z&&(A=Hb,B=i,C=B+12|0,D=0|f[C>>2],E=D+16|0,F=0|f[E>>2],G=F+44|0,f[G>>2]=A),H=i,J=Gb,K=Eb,Ek(hb,H,J,K),f[Ib>>2]=0|f[hb>>2],f[Ib+4>>2]=0|f[hb+4>>2],L=i,M=L+20|0,N=0|f[M>>2],O=0!=(0|N),O?(In(a),void(l=Mb)):(f[a>>2]=0|f[Ib>>2],f[a+4>>2]=0|f[Ib+4>>2],void(l=Mb))}return $=j,_=$+1148|0,aa=0|d[_>>0],ba=(255&aa)>>>1,ca=1&ba,da=ca<<24>>24!=0,da?(ea=j,fa=ea+1152|0,ha=0|f[fa>>2],ia=j,ja=ia+1152|0,ka=ja+8|0,la=0|f[ka>>2],f[Jb>>2]=ha,Kb=Jb+4|0,f[Kb>>2]=la,ma=0|Kv(Db,256,64178,Jb),Fb=ma,na=i,oa=i,pa=0|tp(oa,67759),qa=Fb,wr(ga,na,pa,Db,qa),sa=0|f[ga>>2],ta=i,ua=ta+20|0,f[ua>>2]=sa,va=j,xn(va),Gn(a),void(l=Mb)):(wa=i,xa=i,ya=0|tp(xa,67759),za=i,rg(ra,za,62760,12),f[g>>2]=0|f[ra>>2],f[g+4>>2]=0|f[ra+4>>2],xr(Ca,wa,ya,g),Aa=0|f[Ca>>2],Ba=i,Da=Ba+20|0,f[Da>>2]=Aa,Ea=j,xn(Ea),Gn(a),void(l=Mb))}function Gn(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=5,f[c>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Hn(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=0|f[d>>2],g=255&e,h=j+4|0,f[h>>2]=g,i=c,f[j>>2]=i,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function In(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Jn(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=c,f=d,g=e,h=0|Kn(f,g),j=h,i=j,Ln(a,i),l=n}function Kn(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,L=0;return L=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=d,B=(0|r)>536870911,B&&(C=c,D=c,E=0|tp(D,68855),Br(C,E,64205)),F=d,G=F<<3,J=G,H=J,e=d,g=(0|H)<(0|e),h=c,i=c,g?(j=0|tp(i,68855),Br(h,j,64205),0):(k=i+52|0,n=0|f[k>>2],o=0|Tc(h,14,n),I=o,p=c,q=J,s=0|Jc(p,q),t=I,u=t+20|0,f[u>>2]=s,v=d,w=I,x=w+16|0,f[x>>2]=v,y=I,z=y+12|0,f[z>>2]=0,A=I,l=L,0|A)}function Ln(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=0|f[d>>2],g=255&e,h=j+4|0,f[h>>2]=g,i=c,f[j>>2]=i,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function Mn(a,b){a|=0,b|=0;var c=0,d=0,f=0;f=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=b,d=c,Jn(a,d,0),l=f}function Nn(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0;y=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=b,g=c,o=d,p=e,q=g,r=0|Kn(p,q),w=r,s=w,t=s+20|0,u=0|f[t>>2],v=o,h=g,On(u,v,h),i=g,j=w,k=j+12|0,f[k>>2]=i,n=w,Ln(a,n),l=y}function On(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;for(w=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,k=c,u=0;;){if(n=u,o=k,p=(0|n)<(0|o),!p)break;q=u,r=d,s=r+(q<<3)|0,t=u,g=e,h=g+(t<<3)|0,f[s>>2]=0|f[h>>2],f[s+4>>2]=0|f[h+4>>2],i=u,j=i+1|0,u=j}l=w}function Pn(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;w=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=b,g=e,k=0|Kn(g,2),u=k,n=u,o=n+20|0,p=0|f[o>>2],f[p>>2]=0|f[c>>2],f[p+4>>2]=0|f[c+4>>2],q=u,r=q+20|0,s=0|f[r>>2],t=s+8|0,f[t>>2]=0|f[d>>2],f[t+4>>2]=0|f[d+4>>2],h=u,i=h+12|0,f[i>>2]=2,j=u,Ln(a,j),l=w}function Qn(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0;return za=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=d,C=0|f[r>>2],N=C>>>11,Z=256&N,(ia=0!=(0|Z))?(ra=d,sa=ra+16|0,ta=0|f[sa>>2],xa=ta,e=xa,g=0|f[e>>2],h=1==(0|g),h?(i=d,j=i+20|0,k=0|f[j>>2],n=xa,o=n+8|0,p=0|f[o>>2],q=(0|k)==(0|p),q?(s=xa,t=s+8|0,u=0|f[t>>2],v=d,w=v+20|0,f[w>>2]=u,x=d,y=x+12|0,z=0|f[y>>2],A=d,B=A+16|0,f[B>>2]=z,D=c,E=xa,Dc(D,E)):ya=5):ya=5,5==(0|ya)&&(F=d,G=F+20|0,H=0|f[G>>2],va=H,I=d,J=I+12|0,K=0|f[J>>2],L=K<<3,ua=L,M=c,O=ua,P=0|Jc(M,O),wa=P,Q=va,R=0!=(0|Q),R&&(S=wa,T=va,U=d,V=U+12|0,W=0|f[V>>2],On(S,T,W)),Y=wa,$=d,_=$+20|0,f[_>>2]=Y,aa=d,ba=aa+12|0,ca=0|f[ba>>2],da=d,ea=da+16|0,f[ea>>2]=ca,fa=c,ga=xa,Rn(fa,ga)),ha=d,ja=0|f[ha>>2],ka=ja>>>11,la=ka&-257,ma=0|f[ha>>2],na=2097151&la,oa=na<<11,pa=2047&ma,qa=pa|oa,f[ha>>2]=qa,void(l=za)):void(l=za)}function Rn(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,j=d,k=0|f[j>>2],n=k+-1|0,f[j>>2]=n,o=d,p=0|f[o>>2],(q=0==(0|p))?(r=c,s=d,e=s+8|0,g=0|f[e>>2],Dc(r,g),h=c,i=d,Dc(h,i),void(l=u)):void(l=u)}function Sn(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0;if(_=l,l=l+16|0,
+(0|l)>=(0|m)&&X(),c=a,d=b,r=d,C=r+16|0,N=0|f[C>>2],Z=N,T=Z,U=(0|T)<8)return void(l=_);if(V=Z,W=d,Y=W+12|0,e=0|f[Y>>2],g=5*e|0,h=(0|V)<=(0|g))return void(l=_);for(;;){if(i=Z,j=(0|i)/2&-1,Z=j,k=Z,n=(0|k)<4){$=4;break}if(o=Z,p=d,q=p+12|0,s=0|f[q>>2],t=5*s|0,u=(0|o)>(0|t),!u)break}return 4==(0|$)&&(Z=4),v=Z,w=d,x=w+12|0,y=0|f[x>>2],(z=(0|v)>(0|y))?(A=Z,B=d,D=B+16|0,E=0|f[D>>2],(F=(0|A)<(0|E))?(G=Z,H=d,I=H+16|0,f[I>>2]=G,J=c,K=d,L=K+20|0,M=0|f[L>>2],O=Z,P=O<<3,Q=0|Hc(J,M,P),R=d,S=R+20|0,f[S>>2]=Q,void(l=_)):void(l=_)):void(l=_)}function Tn(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,U=0;for(U=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,D=e,L=D+16|0,M=0|f[L>>2],R=M,N=s,O=(0|N)>536870911,O&&(P=d,Q=d,g=0|tp(Q,68855),Br(P,g,64205)),h=R,i=0==(0|h),i&&(R=4);;){if(j=R,k=s,n=(0|j)<(0|k),o=R,!n)break;p=o<<1,R=p}return q=(0|o)>536870911,q&&(R=536870911),r=R,t=e,u=t+16|0,v=0|f[u>>2],(w=(0|r)>(0|v))?(x=d,y=e,z=y+20|0,A=0|f[z>>2],B=R,C=B<<3,E=0|Hc(x,A,C),S=E,F=R,G=e,H=G+16|0,f[H>>2]=F,I=S,J=e,K=J+20|0,f[K>>2]=I,void(l=U)):void(l=U)}function Un(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;for(o=l,l=l+16|0,(0|l)>=(0|m)&&X(),k=o,c=a,d=b,Vn(k);;){if(e=d,g=e+-1|0,d=g,h=0!=(0|e),!h)break;i=c,j=i+8|0,c=j,f[i>>2]=0|f[k>>2],f[i+4>>2]=0|f[k+4>>2]}l=o}function Vn(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Wn(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;s=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=0|f[c>>2],q=e,g=d,h=0|f[b>>2],i=q,j=i+20|0,k=0|f[j>>2],n=q,o=n+12|0,p=0|f[o>>2],Xn(g,h,k,p),l=s}function Xn(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0;Q=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,g=b,t=c,E=d,I=g,J=I+12|0,K=0|f[J>>2],L=E,M=K+L|0,O=M,N=e,h=g,Qn(N,h),i=g,j=i+16|0,k=0|f[j>>2],n=O,o=(0|k)<(0|n),o&&(p=e,q=g,r=O,Tn(p,q,r)),s=g,u=s+20|0,v=0|f[u>>2],w=g,x=w+12|0,y=0|f[x>>2],z=v+(y<<3)|0,A=t,B=E,On(z,A,B),C=e,D=g,Zc(C,D),F=O,G=g,H=G+12|0,f[H>>2]=F,l=Q}function Yn(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;s=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=0|f[c>>2],q=e,g=d,h=0|f[b>>2],i=q,j=i+20|0,k=0|f[j>>2],n=q,o=n+12|0,p=0|f[o>>2],Zn(g,h,k,p),l=s}function Zn(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0;G=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,g=b,t=c,y=d,z=e,A=g,Qn(z,A),B=g,C=B+16|0,D=0|f[C>>2],E=y,h=(0|D)<(0|E),h&&(i=e,j=g,k=y,Tn(i,j,k)),n=g,o=n+20|0,p=0|f[o>>2],q=t,r=y,On(p,q,r),s=e,u=g,Zc(s,u),v=y,w=g,x=w+12|0,f[x>>2]=v,l=G}function $n(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,N=0;return N=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=0|f[b>>2],L=e,s=d,D=L,Qn(s,D),F=L,G=F+12|0,H=0|f[G>>2],I=L,J=I+16|0,K=0|f[J>>2],g=(0|H)==(0|K),g&&(h=d,i=L,j=L,k=j+12|0,n=0|f[k>>2],o=n+1|0,Tn(h,i,o)),p=L,q=p+12|0,r=0|f[q>>2],t=r+1|0,f[q>>2]=t,u=L,v=u+20|0,w=0|f[v>>2],x=w+(r<<3)|0,f[x>>2]=0|f[c>>2],f[x+4>>2]=0|f[c+4>>2],y=c+4|0,z=0|f[y>>2],(A=z>>>0<8)?void(l=N):(B=d,C=L,E=0|f[c>>2],Yc(B,C,E),void(l=N))}function _n(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;return w=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=0|f[c>>2],u=e,k=u,n=k+12|0,o=0|f[n>>2],p=0==(0|o),p?(Vn(a),void(l=w)):(q=u,r=q+12|0,s=0|f[r>>2],t=s+-1|0,f[r>>2]=t,g=u,h=g+20|0,i=0|f[h>>2],j=i+(t<<3)|0,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],void(l=w))}function ao(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,fa=0;if(fa=l,l=l+32|0,(0|l)>=(0|m)&&X(),da=fa+8|0,d=b,e=0|f[c>>2],aa=e,s=aa,D=s+12|0,O=0|f[D>>2],W=0==(0|O))return Vn(a),void(l=fa);Y=aa,Z=0|f[Y>>2],$=Z>>>11,_=256&$,g=0!=(0|_);do if(!g){if(v=aa,w=v+12|0,x=0|f[w>>2],y=(0|x)>10){z=d,A=aa,bo(z,A);break}for(B=aa,C=B+20|0,E=0|f[C>>2],ba=E,F=aa,G=F+12|0,H=0|f[G>>2],ca=H,I=ba,f[da>>2]=0|f[I>>2],f[da+4>>2]=0|f[I+4>>2];;){if(J=ca,K=J+-1|0,ca=K,L=0!=(0|K),!L)break;M=ba,N=ba,P=N+8|0,f[M>>2]=0|f[P>>2],f[M+4>>2]=0|f[P+4>>2],Q=ba,R=Q+8|0,ba=R}return S=aa,T=S+12|0,U=0|f[T>>2],V=U+-1|0,f[T>>2]=V,f[a>>2]=0|f[da>>2],f[a+4>>2]=0|f[da+4>>2],void(l=fa)}while(0);h=aa,i=h+20|0,j=0|f[i>>2],f[da>>2]=0|f[j>>2],f[da+4>>2]=0|f[j+4>>2],k=aa,n=k+20|0,o=0|f[n>>2],p=o+8|0,f[n>>2]=p,q=aa,r=q+12|0,t=0|f[r>>2],u=t+-1|0,f[r>>2]=u,f[a>>2]=0|f[da>>2],f[a+4>>2]=0|f[da+4>>2],l=fa}function bo(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ha=0;return ha=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=d,C=0|f[r>>2],N=C>>>11,Z=256&N,(ba=0!=(0|Z))?void(l=ha):(ca=c,da=0|Jc(ca,12),fa=da,ea=fa,f[ea>>2]=1,e=d,g=e+16|0,h=0|f[g>>2],i=d,j=i+12|0,k=0|f[j>>2],n=(0|h)>(0|k),n?(o=c,p=d,q=p+20|0,s=0|f[q>>2],t=d,u=t+12|0,v=0|f[u>>2],w=v<<3,x=w+1|0,y=0|Hc(o,s,x),z=fa,A=z+8|0,f[A>>2]=y,B=d,D=B+20|0,f[D>>2]=y):(E=d,F=E+20|0,G=0|f[F>>2],H=fa,I=H+8|0,f[I>>2]=G),J=d,K=J+12|0,L=0|f[K>>2],M=fa,O=M+4|0,f[O>>2]=L,P=fa,Q=d,R=Q+16|0,f[R>>2]=P,S=d,T=0|f[S>>2],U=T>>>11,V=256|U,W=0|f[S>>2],Y=2097151&V,$=Y<<11,_=2047&W,aa=_|$,f[S>>2]=aa,void(l=ha))}function co(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0;return Ba=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=b,g=0|f[c>>2],za=g,t=za,E=0|f[t>>2],P=E>>>11,_=256&P,ka=0!=(0|_),ka?(va=za,xa=va+16|0,ya=0|f[xa>>2],h=0|f[ya>>2],i=1==(0|h),i?(j=za,k=j+20|0,n=0|f[k>>2],o=za,p=o+16|0,q=0|f[p>>2],r=q+8|0,s=0|f[r>>2],u=n,v=s,w=u-v|0,x=(0|w)/8&-1,y=(0|x)>=1,y?(z=za,A=z+20|0,B=0|f[A>>2],C=B+-8|0,f[A>>2]=C,D=za,F=D+20|0,G=0|f[F>>2],f[G>>2]=0|f[d>>2],f[G+4>>2]=0|f[d+4>>2]):Aa=5):Aa=5):Aa=5,5==(0|Aa)&&(H=e,I=za,Qn(H,I),J=za,K=J+16|0,L=0|f[K>>2],M=za,N=M+12|0,O=0|f[N>>2],Q=O+1|0,R=(0|L)<(0|Q),R&&(S=e,T=za,U=za,V=U+12|0,W=0|f[V>>2],Y=W+1|0,Tn(S,T,Y)),Z=za,$=Z+20|0,aa=0|f[$>>2],ba=aa+8|0,ca=za,da=ca+20|0,ea=0|f[da>>2],fa=za,ga=fa+12|0,ha=0|f[ga>>2],eo(ba,ea,ha),ia=za,ja=ia+20|0,la=0|f[ja>>2],f[la>>2]=0|f[d>>2],f[la+4>>2]=0|f[d+4>>2]),ma=za,na=ma+12|0,oa=0|f[na>>2],pa=oa+1|0,f[na>>2]=pa,qa=d+4|0,ra=0|f[qa>>2],(sa=ra>>>0<8)?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=Ba)):(ta=e,ua=za,wa=0|f[d>>2],Yc(ta,ua,wa),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=Ba))}function eo(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0;if(P=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,D=d,I=e,J=D>>>0>I>>>0,J&&(K=d,L=e,M=s,N=L+(M<<3)|0,g=K>>>0<N>>>0)){for(h=s,i=d,j=i+(h<<3)|0,d=j,k=s,n=e,o=n+(k<<3)|0,e=o;;){if(p=s,q=p+-1|0,s=q,r=p>>>0>0,!r)break;t=d,u=t+-8|0,d=u,v=e,w=v+-8|0,e=w,f[u>>2]=0|f[w>>2],f[u+4>>2]=0|f[w+4>>2]}return void(l=P)}if(x=d,y=e,z=(0|x)!=(0|y),!z)return void(l=P);for(;;){if(A=s,B=A+-1|0,s=B,C=A>>>0>0,!C)break;E=d,F=E+8|0,d=F,G=e,H=G+8|0,e=H,f[E>>2]=0|f[G>>2],f[E+4>>2]=0|f[G+4>>2]}l=P}function fo(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,F=0;return F=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=b,g=d,t=0|f[c>>2],D=t,w=g,x=(0|w)<0,x&&(y=D,z=y+12|0,A=0|f[z>>2],B=g,C=B+A|0,g=C),h=g,i=(0|h)<0,i||(j=D,k=j+12|0,n=0|f[k>>2],o=g,p=(0|n)<=(0|o))?(Vn(a),void(l=F)):(q=g,r=D,s=r+20|0,u=0|f[s>>2],v=u+(q<<3)|0,f[a>>2]=0|f[v>>2],f[a+4>>2]=0|f[v+4>>2],void(l=F))}function go(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,xa=0;return xa=l,l=l+32|0,(0|l)>=(0|m)&&X(),va=xa,u=xa+8|0,g=a,h=c,F=0|f[b>>2],ua=F,Q=g,aa=ua,Qn(Q,aa),la=h,ra=(0|la)<0,ra&&(sa=ua,ta=sa+12|0,i=0|f[ta>>2],j=h,k=j+i|0,h=k,n=h,o=(0|n)<0,o&&(p=g,q=g,r=0|tp(q,68712),s=h,t=ua,v=t+12|0,w=0|f[v>>2],x=s-w|0,ho(u,x),d[va>>0]=0|d[u>>0],d[va+1>>0]=0|d[u+1>>0],d[va+2>>0]=0|d[u+2>>0],d[va+3>>0]=0|d[u+3>>0],d[va+4>>0]=0|d[u+4>>0],d[va+5>>0]=0|d[u+5>>0],d[va+6>>0]=0|d[u+6>>0],d[va+7>>0]=0|d[u+7>>0],Er(p,r,64224,va))),y=ua,z=y+12|0,A=0|f[z>>2],B=h,C=(0|A)<=(0|B),C&&(D=ua,E=D+16|0,G=0|f[E>>2],H=h,I=(0|G)<=(0|H),I&&(J=g,K=ua,L=h,M=L+1|0,Tn(J,K,M)),N=ua,O=N+20|0,P=0|f[O>>2],R=ua,S=R+12|0,T=0|f[S>>2],U=P+(T<<3)|0,V=h,W=V+1|0,Y=ua,Z=Y+12|0,$=0|f[Z>>2],_=W-$|0,Un(U,_),ba=h,ca=ba+1|0,da=ua,ea=da+12|0,f[ea>>2]=ca),fa=h,ga=ua,ha=ga+20|0,ia=0|f[ha>>2],ja=ia+(fa<<3)|0,f[ja>>2]=0|f[e>>2],f[ja+4>>2]=0|f[e+4>>2],ka=e+4|0,ma=0|f[ka>>2],(na=ma>>>0<8)?void(l=xa):(oa=g,pa=ua,qa=0|f[e>>2],Yc(oa,pa,qa),void(l=xa))}function ho(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=3,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function io(a,b,c,e,g,h){a|=0,b|=0,c|=0,e|=0,g|=0,h|=0;var i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0;for(dc=l,l=l+64|0,(0|l)>=(0|m)&&X(),bc=dc,Aa=dc+8|0,i=b,j=e,pa=g,La=0|f[c>>2],Xb=La,Wa=i,fb=Xb,Qn(Wa,fb),qb=pa,Bb=(0|qb)<0,Bb&&(Mb=i,k=i,x=0|tp(k,68712),I=pa,ho(Aa,I),d[bc>>0]=0|d[Aa>>0],d[bc+1>>0]=0|d[Aa+1>>0],d[bc+2>>0]=0|d[Aa+2>>0],d[bc+3>>0]=0|d[Aa+3>>0],d[bc+4>>0]=0|d[Aa+4>>0],d[bc+5>>0]=0|d[Aa+5>>0],d[bc+6>>0]=0|d[Aa+6>>0],d[bc+7>>0]=0|d[Aa+7>>0],Er(Mb,x,64246,bc)),T=j,da=(0|T)<0,da&&(ka=Xb,la=ka+12|0,ma=0|f[la>>2],na=j,oa=na+ma|0,j=oa,qa=j,ra=(0|qa)<0,ra&&(sa=i,ta=i,ua=0|tp(ta,68712),Br(sa,ua,64267))),va=Xb,wa=va+12|0,xa=0|f[wa>>2],ya=pa,za=(0|xa)<(0|ya),za?cc=8:(Ba=Xb,Ca=Ba+12|0,Da=0|f[Ca>>2],Ea=j,Fa=pa,Ga=Ea+Fa|0,Ha=(0|Da)<(0|Ga),Ha&&(cc=8)),8==(0|cc)&&(Ia=Xb,Ja=Ia+12|0,Ka=0|f[Ja>>2],Ma=j,Na=Ka-Ma|0,pa=Na),Oa=j,Pa=pa,Qa=Oa+Pa|0,ac=Qa,Ra=h+4|0,Sa=0|f[Ra>>2],Ta=14==(0|Sa),Ta?(Ua=0|f[h>>2],Va=Ua+12|0,Xa=0|f[Va>>2],Yb=Xa,Ya=0|f[h>>2],Za=Ya+20|0,$a=0|f[Za>>2],Zb=$a):(Yb=1,Zb=h),_a=j,ab=Yb,bb=_a+ab|0,_b=bb,cb=ac,db=Xb,eb=db+12|0,gb=0|f[eb>>2],hb=(0|cb)<(0|gb),hb&&(ib=Xb,jb=ib+12|0,kb=0|f[jb>>2],lb=ac,mb=kb-lb|0,nb=_b,ob=nb+mb|0,_b=ob),pb=_b,rb=Xb,sb=rb+16|0,tb=0|f[sb>>2],ub=(0|pb)>(0|tb),ub&&(vb=i,wb=Xb,xb=_b,Tn(vb,wb,xb)),yb=j,zb=Xb,Ab=zb+12|0,Cb=0|f[Ab>>2],Db=(0|yb)>(0|Cb),Db?(Eb=Xb,Fb=Eb+20|0,Gb=0|f[Fb>>2],Hb=Xb,Ib=Hb+12|0,Jb=0|f[Ib>>2],Kb=Gb+(Jb<<3)|0,Lb=j,Nb=Xb,Ob=Nb+12|0,Pb=0|f[Ob>>2],Qb=Lb-Pb|0,Un(Kb,Qb)):(Rb=j,Sb=Xb,Tb=Sb+12|0,Ub=0|f[Tb>>2],Vb=(0|Rb)<(0|Ub),Vb&&(Wb=Xb,n=Wb+20|0,o=0|f[n>>2],p=j,q=o+(p<<3)|0,r=Yb,s=q+(r<<3)|0,t=Xb,u=t+20|0,v=0|f[u>>2],w=ac,y=v+(w<<3)|0,z=Xb,A=z+12|0,B=0|f[A>>2],C=ac,D=B-C|0,eo(s,y,D))),$b=0;;){if(E=$b,F=Yb,G=(0|E)<(0|F),!G)break;H=Xb,J=H+20|0,K=0|f[J>>2],L=j,M=K+(L<<3)|0,N=$b,O=M+(N<<3)|0,P=Zb,Q=$b,R=P+(Q<<3)|0,f[O>>2]=0|f[R>>2],f[O+4>>2]=0|f[R+4>>2],S=$b,U=Zb,V=U+(S<<3)|0,W=V+4|0,Y=0|f[W>>2],Z=Y>>>0<8,Z||($=i,_=Xb,aa=$b,ba=Zb,ca=ba+(aa<<3)|0,ea=0|f[ca>>2],Yc($,_,ea)),fa=$b,ga=fa+1|0,$b=ga}ha=_b,ia=Xb,ja=ia+12|0,f[ja>>2]=ha,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=dc}function jo(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+32|0,(0|l)>=(0|m)&&X(),r=u+16|0,q=u+8|0,s=u,d=b,e=c+4|0,g=0|f[e>>2],(h=14==(0|g))?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=u)):(i=d,j=d,k=0|ki(j,64289,4),f[q>>2]=0|f[c>>2],f[q+4>>2]=0|f[c+4>>2],n=0|dq(i,q,k),o=n<<24>>24!=0,p=d,o?(f[r>>2]=0|f[c>>2],f[r+4>>2]=0|f[c+4>>2],Yj(a,p,r,64289,0,s),void(l=u)):(Nn(a,p,1,c),void(l=u)))}function ko(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,K=0;K=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=0|f[c>>2],I=e,s=I,B=0|f[s>>2],C=B>>>11,D=256&C,E=0!=(0|D),F=d,G=I,E?(H=G+16|0,g=0|f[H>>2],Rn(F,g),h=I,i=0|f[h>>2],j=i>>>11,k=j&-257,n=0|f[h>>2],o=2097151&k,p=o<<11,q=2047&n,r=q|p,f[h>>2]=r):(t=G+20|0,u=0|f[t>>2],Dc(F,u)),v=I,w=v+12|0,f[w>>2]=0,x=I,y=x+16|0,f[y>>2]=0,z=I,A=z+20|0,f[A>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=K}function lo(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;r=l,l=l+16|0,(0|l)>=(0|m)&&X(),p=r+8|0,d=c,e=d,g=(0|e)<0,g&&(h=0|f[b>>2],i=h+12|0,j=0|f[i>>2],k=d,n=k+j|0,d=n),o=d,f[p>>2]=0|f[b>>2],f[p+4>>2]=0|f[b+4>>2],mo(a,p,o),l=r}function mo(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=c,e=d,j=(0|e)<0,j||(k=0|f[b>>2],n=k+12|0,o=0|f[n>>2],p=d,q=(0|o)<=(0|p))?(Vn(a),void(l=u)):(r=d,s=0|f[b>>2],g=s+20|0,h=0|f[g>>2],i=h+(r<<3)|0,f[a>>2]=0|f[i>>2],f[a+4>>2]=0|f[i+4>>2],void(l=u))}function no(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;s=l,l=l+64|0,(0|l)>=(0|m)&&X(),e=s+48|0,q=s+40|0,o=s+32|0,p=s+24|0,h=s+8|0,i=s,g=b,j=g,f[p>>2]=0|f[d>>2],f[p+4>>2]=0|f[d+4>>2],Vg(h,j,p),f[d>>2]=0|f[h>>2],f[d+4>>2]=0|f[h+4>>2],k=g,n=g,Mn(i,n),f[o>>2]=0|f[c>>2],f[o+4>>2]=0|f[c+4>>2],f[q>>2]=0|f[d>>2],f[q+4>>2]=0|f[d+4>>2],f[e>>2]=0|f[i>>2],f[e+4>>2]=0|f[i+4>>2],oo(a,k,o,q,e),l=s}function oo(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0;for(Pa=l,l=l+224|0,(0|l)>=(0|m)&&X(),Ba=Pa+208|0,Na=Pa+200|0,Ma=Pa+192|0,La=Pa+184|0,Ka=Pa+176|0,Ea=Pa+168|0,Aa=Pa+160|0,Ga=Pa+152|0,Ja=Pa+144|0,Fa=Pa+136|0,Da=Pa+128|0,xa=Pa+120|0,za=Pa+112|0,g=Pa+104|0,wa=Pa+96|0,Ca=Pa+80|0,Ia=Pa+72|0,Ha=Pa+64|0,i=Pa+56|0,v=Pa+48|0,G=Pa+40|0,R=Pa+32|0,ba=Pa+24|0,ma=Pa+16|0,ta=Pa+8|0,ua=Pa,h=b,ya=0;;){if(va=ya,j=0|f[e>>2],k=j+12|0,n=0|f[k>>2],o=(0|va)<(0|n),p=h,!o)break;if(q=ya,r=0|f[e>>2],s=r+20|0,t=0|f[s>>2],u=t+(q<<3)|0,f[wa>>2]=0|f[c>>2],f[wa+4>>2]=0|f[c+4>>2],f[g>>2]=0|f[u>>2],f[g+4>>2]=0|f[u+4>>2],w=0|kf(p,wa,g),x=w<<24>>24!=0){Oa=4;break}B=ya,C=B+1|0,ya=C}for(4==(0|Oa)&&(y=h,z=h,A=0|tp(z,68855),Br(y,A,64294)),f[za>>2]=0|f[e>>2],f[za+4>>2]=0|f[e+4>>2],f[xa>>2]=0|f[c>>2],f[xa+4>>2]=0|f[c+4>>2],$n(p,za,xa),D=h,lg(i,D,64),f[Ca>>2]=0|f[i>>2],f[Ca+4>>2]=0|f[i+4>>2],ya=0;;){if(E=ya,F=0|f[c>>2],H=F+12|0,I=0|f[H>>2],J=(0|E)<(0|I),!J)break;K=ya,L=(0|K)>0;do if(L){if(M=d+4|0,N=0|f[M>>2],O=0==(0|N),O&&(P=0|f[d>>2],Q=0!=(0|P),!Q))break;S=h,f[Da>>2]=0|f[Ca>>2],f[Da+4>>2]=0|f[Ca+4>>2],f[Fa>>2]=0|f[d>>2],f[Fa+4>>2]=0|f[d+4>>2],gh(v,S,Da,Fa)}while(0);T=ya,U=0|f[c>>2],V=U+20|0,W=0|f[V>>2],Y=W+(T<<3)|0,f[Ia>>2]=0|f[Y>>2],f[Ia+4>>2]=0|f[Y+4>>2],Z=Ia+4|0,$=0|f[Z>>2];a:do switch(0|$){case 14:Oa=13;break;case 16:break;default:if(ea=h,f[La>>2]=0|f[Ia>>2],f[La+4>>2]=0|f[Ia+4>>2],Xg(ba,ea,La),f[Ha>>2]=0|f[ba>>2],f[Ha+4>>2]=0|f[ba+4>>2],fa=Ha+4|0,ga=0|f[fa>>2],ha=0==(0|ga),ha&&(ia=0|f[Ha>>2],ja=0!=(0|ia),!ja)){if(ka=h,f[Ma>>2]=0|f[Ia>>2],f[Ma+4>>2]=0|f[Ia+4>>2],Gf(ma,ka,Ma,14,64904,64910),f[Ha>>2]=0|f[ma>>2],f[Ha+4>>2]=0|f[ma+4>>2],la=Ha+4|0,na=0|f[la>>2],oa=0==(0|na),oa&&(pa=0|f[Ha>>2],qa=0!=(0|pa),!qa)){ra=h,f[Na>>2]=0|f[Ia>>2],f[Na+4>>2]=0|f[Ia+4>>2],Vg(ta,ra,Na),f[Ia>>2]=0|f[ta>>2],f[Ia+4>>2]=0|f[ta+4>>2];break a}f[Ia>>2]=0|f[Ha>>2],f[Ia+4>>2]=0|f[Ha+4>>2],Oa=13;break a}f[Ia>>2]=0|f[Ha>>2],f[Ia+4>>2]=0|f[Ha+4>>2]}while(0);13==(0|Oa)&&(Oa=0,_=h,f[Ja>>2]=0|f[Ia>>2],f[Ja+4>>2]=0|f[Ia+4>>2],f[Ga>>2]=0|f[d>>2],f[Ga+4>>2]=0|f[d+4>>2],f[Aa>>2]=0|f[e>>2],f[Aa+4>>2]=0|f[e+4>>2],oo(G,_,Ja,Ga,Aa),f[Ia>>2]=0|f[G>>2],f[Ia+4>>2]=0|f[G+4>>2]),aa=h,f[Ea>>2]=0|f[Ca>>2],f[Ea+4>>2]=0|f[Ca+4>>2],f[Ka>>2]=0|f[Ia>>2],f[Ka+4>>2]=0|f[Ia+4>>2],gh(R,aa,Ea,Ka),ca=ya,da=ca+1|0,ya=da}sa=h,f[Ba>>2]=0|f[e>>2],f[Ba+4>>2]=0|f[e+4>>2],_n(ua,sa,Ba),f[a>>2]=0|f[Ca>>2],f[a+4>>2]=0|f[Ca+4>>2],l=Pa}function po(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Ea=0;Ea=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,q=b,B=q+32|0,M=0|f[B>>2],Y=0|Dp(c,64904,M),Ca=Y,ha=b,sa=ha+52|0,f[sa>>2]=Y,Aa=Ca,Ba=0|f[Aa>>2],d=Ba>>>11,e=d&-256,g=14|e,h=Ca,i=0|f[h>>2],j=2097151&g,k=j<<11,n=2047&i,o=n|k,f[h>>2]=o,p=b,r=Ca,Yp(p,r,68841,208,4096),s=b,t=Ca,Jp(s,t,64315,209,262144),u=b,v=Ca,Jp(u,v,68114,210,262144),w=b,x=Ca,Jp(w,x,64339,211,262144),y=b,z=Ca,Jp(y,z,68841,212,4096),A=b,C=Ca,Jp(A,C,64349,213,4096),D=b,E=Ca,Jp(D,E,64358,214,0),F=b,G=Ca,Jp(F,G,64364,215,262144),H=b,I=Ca,Jp(H,I,64371,216,262144),J=b,K=Ca,Jp(J,K,64381,217,0),L=b,N=Ca,Jp(L,N,68938,218,8192),O=b,P=Ca,Jp(O,P,64411,219,262144),Q=b,R=Ca,Jp(Q,R,68999,220,262144),S=b,T=Ca,Jp(S,T,64419,221,4096),U=b,V=Ca,Jp(U,V,68964,222,4096),W=b,Z=Ca,Jp(W,Z,64428,223,0),$=b,_=Ca,Jp($,_,64435,224,0),aa=b,ba=Ca,Jp(aa,ba,64439,211,4096),ca=b,da=Ca,Jp(ca,da,64444,220,262144),ea=b,fa=Ca,Jp(ea,fa,64452,225,0),ga=b,ia=Ca,Jp(ga,ia,64460,226,0),ja=b,ka=Ca,Jp(ja,ka,64469,227,262144),la=b,ma=Ca,Jp(la,ma,64476,228,0),na=b,oa=Ca,Jp(na,oa,64482,223,0),pa=b,qa=Ca,Jp(pa,qa,64487,212,4096),ra=b,ta=Ca,Jp(ra,ta,64493,229,4096),ua=b,va=Ca,Jp(ua,va,64501,230,262144),wa=b,xa=Ca,Jp(wa,xa,64510,231,262144),ya=b,za=Ca,Jp(ya,za,64520,219,262144),l=Ea}function qo(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;q=l,l=l+32|0,(0|l)>=(0|m)&&X(),n=q,k=q+12|0,j=q+8|0,d=b,e=d,f[n>>2]=k,o=n+4|0,f[o>>2]=j,0|Lp(e,68114,n),g=d,h=0|f[j>>2],i=0|f[k>>2],Nn(a,g,h,i),l=q}function ro(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,ea=0;return ea=l,l=l+32|0,(0|l)>=(0|m)&&X(),ba=ea,aa=ea+12|0,_=ea+8|0,d=b,e=0|f[c>>2],Z=e,s=d,f[ba>>2]=aa,ca=ba+4|0,f[ca>>2]=_,0|Lp(s,64317,ba),D=0|f[_>>2],O=536870911-D|0,T=Z,U=T+12|0,V=0|f[U>>2],W=(0|O)<(0|V),Y=d,W?(g=d,h=0|tp(g,68855),Br(Y,h,64205),void 0):(i=Z,j=i+12|0,k=0|f[j>>2],n=0|f[_>>2],o=k+n|0,p=0|Kn(Y,o),$=p,q=$,r=q+20|0,t=0|f[r>>2],u=Z,v=u+20|0,w=0|f[v>>2],x=Z,y=x+12|0,z=0|f[y>>2],On(t,w,z),A=$,B=A+20|0,C=0|f[B>>2],E=Z,F=E+12|0,G=0|f[F>>2],H=C+(G<<3)|0,I=0|f[aa>>2],J=0|f[_>>2],On(H,I,J),K=Z,L=K+12|0,M=0|f[L>>2],N=0|f[_>>2],P=M+N|0,Q=$,R=Q+12|0,f[R>>2]=P,S=$,Ln(a,S),void(l=ea))}function so(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,ma=0;if(ma=l,l=l+32|0,(0|l)>=(0|m)&&X(),ka=ma,ja=ma+4|0,d=b,e=0|f[c>>2],ga=e,s=d,f[ka>>2]=ja,0|Lp(s,64319,ka),D=0|f[ja>>2],O=(0|D)<0,O&&(_=d,ca=d,da=0|tp(ca,68855),Br(_,da,64321)),ea=0|f[ja>>2],fa=0==(0|ea))return g=d,Mn(a,g),void(l=ma);for(h=0|f[ja>>2],i=536870911/(0|h)&-1,j=ga,k=j+12|0,n=0|f[k>>2],o=(0|i)<(0|n),p=d,o&&(q=d,r=0|tp(q,68855),Br(p,r,64205)),t=ga,u=t+12|0,v=0|f[u>>2],w=0|f[ja>>2],x=0|U(v,w),y=0|Kn(p,x),ha=y,z=ha,A=z+20|0,B=0|f[A>>2],ia=B;;){if(C=0|f[ja>>2],E=C+-1|0,f[ja>>2]=E,F=0!=(0|C),!F)break;G=ia,H=ga,I=H+20|0,J=0|f[I>>2],K=ga,L=K+12|0,M=0|f[L>>2],On(G,J,M),N=ga,P=N+12|0,Q=0|f[P>>2],R=ia,S=R+(Q<<3)|0,ia=S,T=ga,V=T+12|0,W=0|f[V>>2],Y=ha,Z=Y+12|0,$=0|f[Z>>2],aa=$+W|0,f[Z>>2]=aa}ba=ha,Ln(a,ba),l=ma}function to(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;for(v=l,l=l+48|0,(0|l)>=(0|m)&&X(),d=v+32|0,r=v+24|0,s=v,p=v+12|0,q=v+8|0,e=b,g=e,f[s>>2]=p,t=s+4|0,f[t>>2]=q,0|Lp(g,68114,s);;){if(h=0|f[q>>2],i=h+-1|0,f[q>>2]=i,j=0!=(0|h),!j)break;k=e,n=0|f[p>>2],o=n+8|0,f[p>>2]=o,f[r>>2]=0|f[c>>2],f[r+4>>2]=0|f[c+4>>2],f[d>>2]=0|f[n>>2],f[d+4>>2]=0|f[n+4>>2],$n(k,r,d)}f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=v}function uo(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Ba=0;if(Ba=l,l=l+80|0,(0|l)>=(0|m)&&X(),ua=Ba+64|0,xa=Ba+56|0,ta=Ba+48|0,wa=Ba+40|0,sa=Ba+32|0,ya=Ba,qa=Ba+20|0,va=Ba+16|0,ra=Ba+8|0,d=b,e=0|f[c>>2],pa=e,s=d,f[ya>>2]=ra,za=ya+4|0,f[za>>2]=va,D=0|Lp(s,64342,ya),O=1==(0|D))switch($=ra+4|0,ja=0|f[$>>2],0|ja){case 17:return ma=d,na=pa,oa=na+12|0,g=0|f[oa>>2],f[sa>>2]=0|f[ra>>2],f[sa+4>>2]=0|f[ra+4>>2],h=0|Ot(ma,sa,qa,va,g),i=h<<24>>24!=0,i?(j=d,k=pa,n=0|f[qa>>2],o=0|f[va>>2],vo(a,j,k,n,o),void(l=Ba)):(Vn(a),void(l=Ba));case 3:return p=d,q=0|f[ra>>2],f[wa>>2]=0|f[c>>2],f[wa+4>>2]=0|f[c+4>>2],fo(a,p,wa,q),void(l=Ba);default:return r=d,t=d,f[ta>>2]=0|f[ra>>2],f[ta+4>>2]=0|f[ra+4>>2],u=0|wo(t,ta),f[xa>>2]=0|f[c>>2],f[xa+4>>2]=0|f[c+4>>2],fo(a,r,xa,u),void(l=Ba)}return v=d,f[ua>>2]=0|f[ra>>2],f[ua+4>>2]=0|f[ra+4>>2],w=0|wo(v,ua),f[qa>>2]=w,x=0|f[qa>>2],y=(0|x)<0,y&&(z=pa,A=z+12|0,B=0|f[A>>2],C=0|f[qa>>2],E=C+B|0,f[qa>>2]=E),F=0|f[qa>>2],G=(0|F)<0,G||(H=pa,I=H+12|0,J=0|f[I>>2],K=0|f[qa>>2],L=(0|J)<(0|K))?(Vn(a),void(l=Ba)):(M=0|f[va>>2],(N=(0|M)<0)?(Vn(a),void(l=Ba)):(P=pa,Q=P+12|0,R=0|f[Q>>2],S=0|f[qa>>2],(T=(0|R)==(0|S))?(U=d,Mn(a,U),void(l=Ba)):(V=0|f[va>>2],W=pa,Y=W+12|0,Z=0|f[Y>>2],_=0|f[qa>>2],aa=Z-_|0,ba=(0|V)>(0|aa),ba&&(ca=pa,da=ca+12|0,ea=0|f[da>>2],fa=0|f[qa>>2],ga=ea-fa|0,f[va>>2]=ga),ha=d,ia=pa,ka=0|f[qa>>2],la=0|f[va>>2],vo(a,ha,ia,ka,la),void(l=Ba))))}function vo(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,$=0;$=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=b,h=c,u=d,F=e,Q=g,S=h,bo(Q,S),T=g,U=g,V=U+52|0,W=0|f[V>>2],i=0|Tc(T,14,W),Y=i,j=h,k=j+20|0,n=0|f[k>>2],o=u,p=n+(o<<3)|0,q=Y,r=q+20|0,f[r>>2]=p,s=F,t=Y,v=t+12|0,f[v>>2]=s,w=h,x=w+16|0,y=0|f[x>>2],z=Y,A=z+16|0,f[A>>2]=y,B=Y,C=B+16|0,D=0|f[C>>2],E=0|f[D>>2],G=E+1|0,f[D>>2]=G,H=Y,I=0|f[H>>2],J=I>>>11,K=256|J,L=0|f[H>>2],M=2097151&K,N=M<<11,O=2047&L,P=O|N,f[H>>2]=P,R=Y,Ln(a,R),l=$}function wo(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;return B=l,l=l+32|0,(0|l)>=(0|m)&&X(),x=B,w=B+20|0,u=B+16|0,v=B+12|0,d=a,k=b+4|0,n=0|f[k>>2],(o=3==(0|n))?(p=0|f[b>>2],c=p,i=c,l=B,0|i):(q=b+4|0,r=0|f[q>>2],s=6==(0|r),s?(t=+j[b>>2],e=~~t,c=e,i=c,l=B,0|i):(g=d,f[x>>2]=w,y=x+4|0,f[y>>2]=v,z=x+8|0,f[z>>2]=u,0|Lp(g,64346,x),h=0|f[w>>2],c=h,i=c,l=B,0|i))}function xo(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,ba=0;if(ba=l,l=l+176|0,(0|l)>=(0|m)&&X(),Y=ba+160|0,K=ba+152|0,V=ba+144|0,Q=ba+136|0,U=ba+128|0,M=ba+120|0,P=ba+112|0,T=ba+104|0,L=ba+96|0,S=ba+88|0,J=ba+80|0,O=ba+72|0,Z=ba,N=ba+56|0,R=ba+48|0,W=ba+40|0,H=ba+36|0,I=ba+32|0,e=ba+24|0,s=ba+16|0,d=b,A=d,f[Z>>2]=N,$=Z+4|0,f[$>>2]=R,_=Z+8|0,f[_>>2]=W,B=0|Lp(A,64353,Z),C=2==(0|B),!C)return v=d,w=d,f[Q>>2]=0|f[N>>2],f[Q+4>>2]=0|f[N+4>>2],x=0|wo(w,Q),y=d,f[V>>2]=0|f[R>>2],f[V+4>>2]=0|f[R+4>>2],z=0|wo(y,V),f[K>>2]=0|f[c>>2],f[K+4>>2]=0|f[c+4>>2],f[Y>>2]=0|f[W>>2],f[Y+4>>2]=0|f[W+4>>2],io(s,v,K,x,z,Y),f[a>>2]=0|f[W>>2],f[a+4>>2]=0|f[W+4>>2],void(l=ba);switch(D=N+4|0,E=0|f[D>>2],0|E){case 17:F=d,G=0|f[c>>2],g=G+12|0,h=0|f[g>>2],f[O>>2]=0|f[N>>2],f[O+4>>2]=0|f[N+4>>2],i=0|Ot(F,O,H,I,h),j=i<<24>>24!=0,j&&(k=d,n=0|f[H>>2],o=0|f[I>>2],f[J>>2]=0|f[c>>2],f[J+4>>2]=0|f[c+4>>2],f[S>>2]=0|f[R>>2],f[S+4>>2]=0|f[R+4>>2],io(e,k,J,n,o,S));break;case 3:p=d,q=0|f[N>>2],f[L>>2]=0|f[c>>2],f[L+4>>2]=0|f[c+4>>2],f[T>>2]=0|f[R>>2],f[T+4>>2]=0|f[R+4>>2],go(p,L,q,T);break;default:r=d,t=d,f[P>>2]=0|f[N>>2],f[P+4>>2]=0|f[N+4>>2],u=0|wo(t,P),f[M>>2]=0|f[c>>2],f[M+4>>2]=0|f[c+4>>2],f[U>>2]=0|f[R>>2],f[U+4>>2]=0|f[R+4>>2],go(r,M,u,U)}f[a>>2]=0|f[R>>2],f[a+4>>2]=0|f[R+4>>2],l=ba}function yo(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;r=l,l=l+32|0,(0|l)>=(0|m)&&X(),o=r,n=r+12|0,k=r+8|0,d=b,e=d,f[o>>2]=n,p=o+4|0,f[p>>2]=k,0|Lp(e,64317,o),g=d,h=0|f[c>>2],i=0|f[n>>2],j=0|f[k>>2],Xn(g,h,i,j),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=r}function zo(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ia=0;if(ia=l,l=l+48|0,(0|l)>=(0|m)&&X(),ga=ia,ca=ia+24|0,fa=ia+16|0,d=b,e=0|f[c>>2],ba=e,s=d,f[ga>>2]=ca,0|Lp(s,64319,ga),D=0|f[ca>>2],O=(0|D)<0,O&&(Y=ba,Z=Y+12|0,$=0|f[Z>>2],_=0|f[ca>>2],aa=_+$|0,f[ca>>2]=aa),g=0|f[ca>>2],h=(0|g)<0,!h&&(i=ba,j=i+12|0,k=0|f[j>>2],n=0|f[ca>>2],o=(0|k)<=(0|n),!o)){for(p=d,q=ba,Qn(p,q),r=0|f[ca>>2],t=ba,u=t+20|0,v=0|f[u>>2],w=v+(r<<3)|0,f[fa>>2]=0|f[w>>2],f[fa+4>>2]=0|f[w+4>>2],x=ba,y=x+20|0,z=0|f[y>>2],A=0|f[ca>>2],B=z+(A<<3)|0,ea=B,C=ba,E=C+12|0,F=0|f[E>>2],G=0|f[ca>>2],H=F-G|0,da=H;;){if(I=da,J=I+-1|0,da=J,K=0!=(0|J),!K)break;L=ea,M=ea,N=M+8|0,f[L>>2]=0|f[N>>2],f[L+4>>2]=0|f[N+4>>2],P=ea,Q=P+8|0,ea=Q}return R=ba,S=R+12|0,T=0|f[S>>2],U=T+-1|0,f[S>>2]=U,V=d,W=ba,Sn(V,W),f[a>>2]=0|f[fa>>2],f[a+4>>2]=0|f[fa+4>>2],void(l=ia)}Vn(a),l=ia}function Ao(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;q=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=0|f[c>>2],o=e,g=o,h=g+12|0,i=0|f[h>>2],j=0==(0|i),k=1&j,n=255&k,Bo(a,n),l=q}function Bo(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=255&d,g=0!=(0|e),h=g?2:0,i=j+4|0,f[i>>2]=h,f[j>>2]=1,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function Co(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,V=0;return V=l,l=l+16|0,(0|l)>=(0|m)&&X(),T=V,S=V+4|0,d=b,e=0|f[c>>2],R=e,s=d,f[T>>2]=S,D=0|Lp(s,64388,T),(L=0==(0|D))?(M=R,N=M+12|0,O=0|f[N>>2],P=(0|O)>0,P?(Q=R,g=Q+20|0,h=0|f[g>>2],f[a>>2]=0|f[h>>2],f[a+4>>2]=0|f[h+4>>2],void(l=V)):(Vn(a),void(l=V))):(i=0|f[S>>2],j=(0|i)<0,j&&(k=d,n=d,o=0|tp(n,68855),Br(k,o,64391)),p=0|f[S>>2],q=R,r=q+12|0,t=0|f[r>>2],u=(0|p)>(0|t),u&&(v=R,w=v+12|0,x=0|f[w>>2],f[S>>2]=x),y=R,z=0|f[y>>2],A=z>>>11,B=256&A,C=0!=(0|B),E=d,C?(F=R,G=0|f[S>>2],vo(a,E,F,0,G),void(l=V)):(H=0|f[S>>2],I=R,J=I+20|0,K=0|f[J>>2],Nn(a,E,H,K),void(l=V)))}function Do(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;for(D=l,l=l+48|0,(0|l)>=(0|m)&&X(),A=D+32|0,d=D+24|0,B=D,z=D+8|0,e=b,g=e,f[B>>2]=z,0|Lp(g,68900,B),y=0;;){if(q=y,r=0|f[c>>2],s=r+12|0,t=0|f[s>>2],u=(0|q)<(0|t),!u){C=6;break}if(v=e,w=y,x=0|f[c>>2],h=x+20|0,i=0|f[h>>2],j=i+(w<<3)|0,f[d>>2]=0|f[j>>2],f[d+4>>2]=0|f[j+4>>2],f[A>>2]=0|f[z>>2],f[A+4>>2]=0|f[z+4>>2],k=0|lf(v,d,A),n=k<<24>>24!=0,o=y,n){C=4;break}p=o+1|0,y=p}return 4==(0|C)?(ho(a,o),void(l=D)):6==(0|C)?(Vn(a),void(l=D)):void 0}function Eo(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+48|0,(0|l)>=(0|m)&&X(),i=o+32|0,j=o+24|0,k=o,h=o+8|0,d=b,e=d,f[k>>2]=h,0|Lp(e,64417,k),g=d,f[j>>2]=0|f[c>>2],f[j+4>>2]=0|f[c+4>>2],f[i>>2]=0|f[h>>2],f[i+4>>2]=0|f[h+4>>2],Yn(g,j,i),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=o}function Fo(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+48|0,(0|l)>=(0|m)&&X(),j=o+32|0,h=o+24|0,k=o,i=o+8|0,d=b,Vn(i),e=d,f[k>>2]=i,0|Lp(e,64424,k),g=d,f[h>>2]=0|f[c>>2],f[h+4>>2]=0|f[c+4>>2],f[j>>2]=0|f[i>>2],f[j+4>>2]=0|f[i+4>>2],no(a,g,h,j),l=o}function Go(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,oa=0;return oa=l,l=l+16|0,(0|l)>=(0|m)&&X(),ma=oa,la=oa+4|0,d=b,e=0|f[c>>2],ja=e,s=d,f[ma>>2]=la,D=0|Lp(s,64388,ma),(O=0==(0|D))?($=ja,fa=$+12|0,ga=0|f[fa>>2],ha=(0|ga)>0,ha?(ia=ja,g=ia+12|0,h=0|f[g>>2],i=h-1|0,j=ja,k=j+20|0,n=0|f[k>>2],o=n+(i<<3)|0,f[a>>2]=0|f[o>>2],f[a+4>>2]=0|f[o+4>>2],void(l=oa)):(Vn(a),void(l=oa))):(p=0|f[la>>2],q=(0|p)<0,q&&(r=d,t=d,u=0|tp(t,68855),Br(r,u,64391)),v=0|f[la>>2],w=ja,x=w+12|0,y=0|f[x>>2],z=(0|v)>(0|y),z&&(A=ja,B=A+12|0,C=0|f[B>>2],f[la>>2]=C),E=ja,F=0|f[E>>2],G=F>>>11,H=256&G,I=0!=(0|H),J=0|f[la>>2],K=(0|J)>4,ka=I|K,L=d,ka?(M=ja,N=ja,P=N+12|0,Q=0|f[P>>2],R=0|f[la>>2],S=Q-R|0,T=0|f[la>>2],vo(a,L,M,S,T),void(l=oa)):(U=0|f[la>>2],V=ja,W=V+20|0,Y=0|f[W>>2],Z=ja,_=Z+12|0,aa=0|f[_>>2],ba=Y+(aa<<3)|0,ca=0|f[la>>2],da=0-ca|0,ea=ba+(da<<3)|0,Nn(a,L,U,ea),void(l=oa)))}function Ho(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=0|f[c>>2],j=e,g=j,h=g+12|0,i=0|f[h>>2],ho(a,i),l=n}function Io(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0;if(_=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=b,e=0|f[c>>2],U=e,s=d,D=U,O=D+12|0,P=0|f[O>>2],Q=0|Kn(s,P),V=Q,R=U,S=R+12|0,T=0|f[S>>2],g=(0|T)>0,!g)return N=V,Ln(a,N),void(l=_);for(h=U,i=h+20|0,j=0|f[i>>2],Y=j,k=Y,n=U,o=n+12|0,p=0|f[o>>2],q=k+(p<<3)|0,W=q,r=V,t=r+20|0,u=0|f[t>>2],v=U,w=v+12|0,x=0|f[w>>2],y=u+(x<<3)|0,z=y+-8|0,Z=z;;){if(A=Y,B=W,C=A>>>0<B>>>0,!C)break;E=Z,F=E+-8|0,Z=F,G=Y,H=G+8|0,Y=H,f[E>>2]=0|f[G>>2],f[E+4>>2]=0|f[G+4>>2]}I=U,J=I+12|0,K=0|f[J>>2],L=V,M=L+12|0,f[M>>2]=K,N=V,Ln(a,N),l=_}function Jo(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,N=0;if(N=l,l=l+32|0,(0|l)>=(0|m)&&X(),L=N,d=b,e=0|f[c>>2],I=e,s=I,B=s+12|0,C=0|f[B>>2],D=(0|C)>1,!D)return f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=N);for(E=d,F=I,Qn(E,F),G=I,H=G+20|0,g=0|f[H>>2],J=g,h=I,i=h+20|0,j=0|f[i>>2],k=I,n=k+12|0,o=0|f[n>>2],p=j+(o<<3)|0,q=p+-8|0,K=q;;){if(r=J,t=K,u=r>>>0<t>>>0,!u)break;v=J,f[L>>2]=0|f[v>>2],f[L+4>>2]=0|f[v+4>>2],w=J,x=w+8|0,J=x,y=K,f[w>>2]=0|f[y>>2],f[w+4>>2]=0|f[y+4>>2],z=K,A=z+-8|0,K=A,f[z>>2]=0|f[L>>2],f[z+4>>2]=0|f[L+4>>2]}f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=N}function Ko(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;for(E=l,l=l+48|0,(0|l)>=(0|m)&&X(),B=E+32|0,d=E+24|0,C=E,A=E+8|0,e=b,g=e,f[C>>2]=A,0|Lp(g,68900,C),r=0|f[c>>2],s=r+12|0,t=0|f[s>>2],u=t-1|0,z=u;;){if(v=z,w=(0|v)>=0,!w){D=6;break}if(x=e,y=z,h=0|f[c>>2],i=h+20|0,j=0|f[i>>2],k=j+(y<<3)|0,f[d>>2]=0|f[k>>2],f[d+4>>2]=0|f[k+4>>2],f[B>>2]=0|f[A>>2],f[B+4>>2]=0|f[A+4>>2],n=0|lf(x,d,B),o=n<<24>>24!=0,
+p=z,o){D=4;break}q=p+-1|0,z=q}return 4==(0|D)?(ho(a,p),void(l=E)):6==(0|D)?(Vn(a),void(l=E)):void 0}function Lo(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0;if(Wa=l,l=l+32|0,(0|l)>=(0|m)&&X(),Ta=Wa,Sa=Wa+12|0,Ra=Wa+8|0,d=b,e=0|f[c>>2],Qa=e,s=d,f[Ta>>2]=Sa,Ua=Ta+4|0,f[Ua>>2]=Ra,0|Lp(s,68114,Ta),D=Qa,O=0|f[D>>2],$=O>>>11,ja=256&$,ua=0!=(0|ja),ua?(Fa=Qa,Pa=Fa+16|0,g=0|f[Pa>>2],h=0|f[g>>2],i=1==(0|h),i?(j=Qa,k=j+20|0,n=0|f[k>>2],o=Qa,p=o+16|0,q=0|f[p>>2],r=q+8|0,t=0|f[r>>2],u=n,v=t,w=u-v|0,x=(0|w)/8&-1,y=0|f[Ra>>2],z=(0|x)>=(0|y),z?(A=0|f[Ra>>2],B=Qa,C=B+20|0,E=0|f[C>>2],F=0-A|0,G=E+(F<<3)|0,f[C>>2]=G):Va=5):Va=5):Va=5,5==(0|Va)){if(H=d,I=Qa,Qn(H,I),J=0|f[Ra>>2],K=0==(0|J))return f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=Wa);L=Qa,M=L+16|0,N=0|f[M>>2],P=Qa,Q=P+12|0,R=0|f[Q>>2],S=0|f[Ra>>2],T=R+S|0,U=(0|N)<(0|T),U&&(V=d,W=Qa,Y=Qa,Z=Y+12|0,_=0|f[Z>>2],aa=0|f[Ra>>2],ba=_+aa|0,Tn(V,W,ba)),ca=Qa,da=ca+20|0,ea=0|f[da>>2],fa=0|f[Ra>>2],ga=ea+(fa<<3)|0,ha=Qa,ia=ha+20|0,ka=0|f[ia>>2],la=Qa,ma=la+12|0,na=0|f[ma>>2],eo(ga,ka,na)}for(oa=Qa,pa=oa+20|0,qa=0|f[pa>>2],ra=0|f[Sa>>2],sa=0|f[Ra>>2],On(qa,ra,sa),ta=0|f[Ra>>2],va=Qa,wa=va+12|0,xa=0|f[wa>>2],ya=xa+ta|0,f[wa>>2]=ya;;){if(za=0|f[Ra>>2],Aa=za+-1|0,f[Ra>>2]=Aa,Ba=0!=(0|za),!Ba)break;Ca=0|f[Ra>>2],Da=0|f[Sa>>2],Ea=Da+(Ca<<3)|0,Ga=Ea+4|0,Ha=0|f[Ga>>2],Ia=Ha>>>0<8,Ia||(Ja=d,Ka=Qa,La=0|f[Ra>>2],Ma=0|f[Sa>>2],Na=Ma+(La<<3)|0,Oa=0|f[Na>>2],Yc(Ja,Ka,Oa))}f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=Wa}function Mo(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0;return A=l,l=l+48|0,(0|l)>=(0|m)&&X(),x=A+32|0,v=A+24|0,y=A,w=A+8|0,d=b,e=d,f[y>>2]=w,0|Lp(e,68900,y),n=d,f[v>>2]=0|f[c>>2],f[v+4>>2]=0|f[c+4>>2],f[x>>2]=0|f[w>>2],f[x+4>>2]=0|f[w+4>>2],o=0|kf(n,v,x),(p=o<<24>>24!=0)?(No(a),void(l=A)):(q=w+4|0,r=0|f[q>>2],(s=14==(0|r))?(t=0|f[c>>2],u=t+12|0,g=0|f[u>>2],h=0|f[w>>2],i=h+12|0,j=0|f[i>>2],k=(0|g)!=(0|j),k?(Oo(a),void(l=A)):(f[a>>2]=0|f[w>>2],f[a+4>>2]=0|f[w+4>>2],void(l=A))):(Oo(a),void(l=A)))}function No(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=2,f[c>>2]=1,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Oo(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=1,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Po(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;return t=l,l=l+48|0,(0|l)>=(0|m)&&X(),q=t+32|0,o=t+24|0,r=t,p=t+8|0,d=b,e=d,f[r>>2]=p,0|Lp(e,68900,r),g=d,f[o>>2]=0|f[c>>2],f[o+4>>2]=0|f[c+4>>2],f[q>>2]=0|f[p>>2],f[q+4>>2]=0|f[p+4>>2],h=0|kf(g,o,q),(i=h<<24>>24!=0)?(ho(a,0),void(l=t)):(j=p+4|0,k=0|f[j>>2],n=14==(0|k),n?(f[a>>2]=0|f[p>>2],f[a+4>>2]=0|f[p+4>>2],void(l=t)):(Vn(a),void(l=t)))}function Qo(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=0|f[d>>2],g=255&e,h=j+4|0,f[h>>2]=g,i=c,f[j>>2]=i,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function Ro(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;J=l,l=l+48|0,(0|l)>=(0|m)&&X(),H=J+24|0,A=J+8|0,B=J,e=a,g=b,t=c,z=d,C=e,D=g,E=e,F=0|ki(E,67980,6),Vi(A,C,D,F),f[H>>2]=0|f[A>>2],f[H+4>>2]=0|f[A+4>>2],h=H+4|0,i=0|f[h>>2],j=0==(0|i),j?(k=0|f[H>>2],n=0!=(0|k),n?I=4:G=0):I=4,4==(0|I)&&(o=0|f[H>>2],G=o),p=e,q=e,r=g,s=e,u=0|ki(s,67505,5),Vi(B,q,r,u),v=0|f[B>>2],w=G,x=t,y=z,So(p,v,w,x,y),l=J}function So(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Ub=0;for(Ub=l,l=l+64|0,(0|l)>=(0|m)&&X(),Rb=Ub+16|0,g=a,h=b,ga=c,ra=d,Ca=e,Na=h,Ya=g,hb=Ya+12|0,sb=0|f[hb>>2],Db=sb+24|0,i=0|f[Db>>2],v=g,G=v+12|0,R=0|f[G>>2],aa=R+20|0,ba=0|f[aa>>2],ca=i,da=ba,ea=ca-da|0,fa=(0|ea)/48&-1,ha=(0|Na)>=(0|fa),ha&&(h=10),ia=h,Pb=ia;;){if(ja=Pb,ka=(0|ja)>=0,!ka)break;if(la=Pb,ma=g,na=ma+12|0,oa=0|f[na>>2],pa=oa+20|0,qa=0|f[pa>>2],sa=qa+(48*la|0)|0,Ob=sa,ta=Ob,ua=ta+4|0,va=0|f[ua>>2],wa=0!=(0|va),wa&&(xa=Ob,ya=xa+4|0,za=0|f[ya>>2],Aa=0|f[za>>2],Ba=Aa>>>11,Da=128&Ba,Ea=0!=(0|Da),!Ea)){Fa=Ob,Ga=Fa+4|0,Ha=0|f[Ga>>2],Ia=Ha+12|0,Ja=0|f[Ia>>2],Qb=Ja,Ka=Pb,La=g,Ma=La+12|0,Oa=0|f[Ma>>2],Pa=Oa+20|0,Qa=0|f[Pa>>2],Ra=Qa+(48*Ka|0)|0,Sa=Ra+32|0,Ta=0|f[Sa>>2],Ua=0!=(0|Ta),Va=Pb;do{if(!Ua){if(db=Va+1|0,eb=h,fb=(0|db)<=(0|eb)){gb=Pb,ib=gb+1|0,jb=g,kb=jb+12|0,lb=0|f[kb>>2],mb=lb+20|0,nb=0|f[mb>>2],ob=nb+(48*ib|0)|0,pb=ob+28|0,qb=0|f[pb>>2],rb=qb+-4|0,Sb=rb;break}tb=ga,Sb=tb;break}Wa=g,Xa=Wa+12|0,Za=0|f[Xa>>2],$a=Za+20|0,_a=0|f[$a>>2],ab=_a+(48*Va|0)|0,bb=ab+32|0,cb=0|f[bb>>2],Sb=cb}while(0);ub=Qb,vb=Sb,wb=Qb,xb=wb+8|0,yb=0|f[xb>>2],zb=vb,Ab=yb,Bb=zb-Ab|0,Cb=(0|Bb)/4&-1,Eb=0|pr(ub,Cb),Fb=Rb+8|0,f[Fb>>2]=Eb,Gb=Qb,Hb=Sb,Ib=Qb,Jb=Ib+8|0,Kb=0|f[Jb>>2],Lb=Hb,Mb=Kb,Nb=Lb-Mb|0,j=(0|Nb)/4&-1,k=0|rr(Gb,j),n=Rb+4|0,f[n>>2]=k,o=Rb+4|0,p=0|f[o>>2],q=(0|p)==-1,q||(r=Ob,s=r+44|0,t=0|f[s>>2],u=Ob,w=u+4|0,x=0|f[w>>2],y=x+16|0,z=0|f[y>>2],A=(0|t)==(0|z),B=Rb+16|0,A?f[B>>2]=72376:f[B>>2]=64532,C=Rb+8|0,D=0|f[C>>2],E=0!=(0|D),E||(F=Rb+8|0,f[F>>2]=64534),H=g,I=Ob,J=0|f[I>>2],K=0|xi(H,J),L=Rb+12|0,f[L>>2]=K,M=g,N=Ob,O=N+4|0,P=0|f[O>>2],Q=P+16|0,S=0|f[Q>>2],T=0|hq(M,S),U=Rb+20|0,f[U>>2]=T,V=Pb,f[Rb>>2]=V,W=ra,Y=g,Z=Ca,cx[511&W](Y,Rb,Z))}$=Pb,_=$+-1|0,Pb=_}l=Ub}function To(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+32|0,(0|l)>=(0|m)&&X(),k=o+8|0,e=o,d=b,g=d,Mn(e,g),f[k>>2]=0|f[e>>2],f[k+4>>2]=0|f[e+4>>2],h=d,i=0|f[c>>2],j=0|f[k>>2],Ro(h,i,232,j),f[a>>2]=0|f[k>>2],f[a+4>>2]=0|f[k+4>>2],l=o}function Uo(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,qa=0;return qa=l,l=l+192|0,(0|l)>=(0|m)&&X(),oa=qa+184|0,ga=qa+176|0,na=qa+168|0,ma=qa+160|0,la=qa+152|0,ka=qa+144|0,e=qa+136|0,ja=qa+128|0,d=qa+120|0,ia=qa+112|0,fa=qa+88|0,ha=qa+80|0,F=qa+64|0,Q=qa+56|0,_=qa+48|0,aa=qa+40|0,ba=qa+32|0,ca=qa+24|0,da=qa+16|0,i=qa+8|0,j=qa,g=a,h=b,u=c,k=g,n=0|Wc(k),ea=n,o=u,Qo(F,o),f[fa>>2]=0|f[F>>2],f[fa+4>>2]=0|f[F+4>>2],p=g,q=h,r=q+8|0,s=0|f[r>>2],qg(Q,p,s),f[ha>>2]=0|f[Q>>2],f[ha+4>>2]=0|f[Q+4>>2],t=g,f[ia>>2]=0|f[ha>>2],f[ia+4>>2]=0|f[ha+4>>2],dh(_,t,ia,67713,1),v=g,w=g,x=h,y=x+4|0,z=0|f[y>>2],Vo(ba,z),f[d>>2]=0|f[ba>>2],f[d+4>>2]=0|f[ba+4>>2],pe(aa,w,d,10),f[ja>>2]=0|f[ha>>2],f[ja+4>>2]=0|f[ha+4>>2],f[e>>2]=0|f[aa>>2],f[e+4>>2]=0|f[aa+4>>2],yg(v,ja,e),A=h,B=A+12|0,C=0|f[B>>2],(D=0!=(0|C))?(E=g,f[ka>>2]=0|f[ha>>2],f[ka+4>>2]=0|f[ha+4>>2],dh(ca,E,ka,64544,4),G=h,H=G+20|0,I=0|f[H>>2],J=0!=(0|I),J&&(K=g,L=h,M=L+20|0,N=0|f[M>>2],f[la>>2]=0|f[ha>>2],f[la+4>>2]=0|f[ha+4>>2],fh(da,K,la,N),O=g,P=h,R=P+16|0,S=0|f[R>>2],f[ma>>2]=0|f[ha>>2],f[ma+4>>2]=0|f[ha+4>>2],fh(i,O,ma,S)),T=g,U=h,V=U+12|0,W=0|f[V>>2],f[na>>2]=0|f[ha>>2],f[na+4>>2]=0|f[ha+4>>2],fh(j,T,na,W),Y=g,f[ga>>2]=0|f[fa>>2],f[ga+4>>2]=0|f[fa+4>>2],f[oa>>2]=0|f[ha>>2],f[oa+4>>2]=0|f[ha+4>>2],$n(Y,ga,oa),Z=g,$=ea,Xc(Z,$),void(l=qa)):(Y=g,f[ga>>2]=0|f[fa>>2],f[ga+4>>2]=0|f[fa+4>>2],f[oa>>2]=0|f[ha>>2],f[oa+4>>2]=0|f[ha+4>>2],$n(Y,ga,oa),Z=g,$=ea,Xc(Z,$),void(l=qa))}function Vo(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=3,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function Wo(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,W=0;W=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=d,C=0|f[r>>2],T=C,R=8,L=c,M=T,N=M,O=(N>>>0)/4&-1,P=R,Q=T,e=0|U(P,Q),g=O+e|0,h=0|Jc(L,g),S=h,i=d,j=i+8|0,f[j>>2]=0,k=d,n=k+4|0,f[n>>2]=0,o=S,p=d,q=p+16|0,f[q>>2]=o,s=S,t=T,u=t<<2,v=s+u|0,w=d,x=w+20|0,f[x>>2]=v,y=S,z=R,A=T,B=0|U(z,A),D=y+B|0,E=d,F=E+12|0,f[F>>2]=D,G=d,H=G+12|0,I=0|f[H>>2],J=T,K=(J>>>0)/4&-1,Xo(I,-86,K),l=W}function Xo(a,b,c){a|=0,b|=0,c|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;for(q=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,g=c;;){if(h=g,i=h+-1|0,g=i,j=h>>>0>0,!j)break;k=f,n=e,o=n+1|0,e=o,d[n>>0]=k}l=q}function Yo(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0;return Q=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=c,C=0|Lc(r,1,24),O=C,I=d,J=I>>>0<8,J&&(d=8),K=d,L=K+-1|0,d=L,M=d,N=M>>>1,e=d,g=e|N,d=g,h=d,i=h>>>2,j=d,k=j|i,d=k,n=d,o=n>>>4,p=d,q=p|o,d=q,s=d,t=s>>>8,u=d,v=u|t,d=v,w=d,x=w>>>16,y=d,z=y|x,d=z,A=d,B=A+1|0,d=B,D=d,E=O,f[E>>2]=D,F=c,G=O,Wo(F,G),H=O,l=Q,0|H}function Zo(a){a|=0;var b=0,c=0,d=0,f=0;return f=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=0|Yo(c,8),l=f,0|d}function $o(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=d,(g=0!=(0|e))?(h=c,i=d,j=i+16|0,k=0|f[j>>2],Dc(h,k),n=c,o=d,Dc(n,o),void(l=q)):void(l=q)}function _o(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0;for(xa=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=a,t=b,E=c,P=E,_=E,ka=_<<2,ra=P^ka,sa=E,ta=sa>>>2,h=ra^ta,i=t,j=0|f[i>>2],k=j-1|0,n=h&k,ua=n,va=0;;){if(o=ua,p=(o>>>0)/4&-1,q=t,r=q+12|0,s=0|f[r>>2],u=s+p|0,v=0|d[u>>0],w=255&v,x=ua,y=(x>>>0)%4&-1,z=64549+y|0,A=0|d[z>>0],B=255&A,C=w&B,D=0!=(0|C),F=1^D,!F){wa=7;break}if(G=ua,H=(G>>>0)/4&-1,I=t,J=I+12|0,K=0|f[J>>2],L=K+H|0,M=0|d[L>>0],N=255&M,O=ua,Q=(O>>>0)%4&-1,R=64553+Q|0,S=0|d[R>>0],T=255&S,U=N&T,V=0!=(0|U),!V&&(W=ua,Y=t,Z=Y+16|0,$=0|f[Z>>2],aa=$+(W<<2)|0,ba=0|f[aa>>2],ca=E,da=(0|ba)==(0|ca))){wa=5;break}fa=ua,ga=va,ha=ga+1|0,va=ha,ia=fa+ha|0,ja=t,la=0|f[ja>>2],ma=la-1|0,na=ia&ma,ua=na}return 5==(0|wa)?(ea=ua,e=ea,qa=e,l=xa,0|qa):7==(0|wa)?(oa=t,pa=0|f[oa>>2],e=pa,qa=e,l=xa,0|qa):0}function ap(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Oa=0;for(Oa=l,l=l+64|0,(0|l)>=(0|m)&&X(),Ga=Oa+24|0,g=a,h=b,u=c,F=u,Q=F>>>0<8,e=Q?8:c,u=e,aa=u,la=aa+-1|0,u=la,wa=u,Ea=wa>>>1,Fa=u,i=Fa|Ea,u=i,j=u,k=j>>>2,n=u,o=n|k,u=o,p=u,q=p>>>4,r=u,s=r|q,u=s,t=u,v=t>>>8,w=u,x=w|v,u=x,y=u,z=y>>>16,A=u,B=A|z,u=B,C=u,D=C+1|0,u=D,E=h,G=E+12|0,H=0|f[G>>2],Ja=H,I=h,J=I+16|0,K=0|f[J>>2],Ka=K,L=h,M=L+20|0,N=0|f[M>>2],Ma=N,O=h,P=0|f[O>>2],La=P,R=u,f[Ga>>2]=R,S=g,Wo(S,Ga),Ha=0;;){if(T=Ha,U=La,V=T>>>0<U>>>0,!V)break;W=Ha,Y=(W>>>0)/4&-1,Z=Ja,$=Z+Y|0,_=0|d[$>>0],ba=255&_,ca=Ha,da=(ca>>>0)%4&-1,ea=64557+da|0,fa=0|d[ea>>0],ga=255&fa,ha=ba&ga,ia=0!=(0|ha),ia||(ja=g,ka=Ha,ma=Ka,na=ma+(ka<<2)|0,oa=0|f[na>>2],pa=0|bp(ja,Ga,oa,0),Ia=pa,qa=Ha,ra=Ma,sa=ra+(qa<<2)|0,ta=0|f[sa>>2],ua=Ia,va=Ga+20|0,xa=0|f[va>>2],ya=xa+(ua<<2)|0,f[ya>>2]=ta),za=Ha,Aa=za+1|0,Ha=Aa}Ba=h,f[Ba>>2]=0|f[Ga>>2],f[Ba+4>>2]=0|f[Ga+4>>2],f[Ba+8>>2]=0|f[Ga+8>>2],f[Ba+12>>2]=0|f[Ga+12>>2],f[Ba+16>>2]=0|f[Ga+16>>2],f[Ba+20>>2]=0|f[Ga+20>>2],Ca=g,Da=Ka,Dc(Ca,Da),l=Oa}function bp(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0;for(jc=l,l=l+32|0,(0|l)>=(0|m)&&X(),h=a,za=b,Ka=c,Va=e,hc=0,eb=za,pb=eb+8|0,Ab=0|f[pb>>2],Lb=za,Wb=0|f[Lb>>2],i=Wb>>>2,v=za,G=0|f[v>>2],R=G>>>1,ba=i|R,ma=Ab>>>0>=ba>>>0,ma&&(va=h,wa=za,xa=za,ya=0|f[xa>>2],Aa=ya<<1,ap(va,wa,Aa)),Ba=Ka,Ca=Ka,Da=Ca<<2,Ea=Ba^Da,Fa=Ka,Ga=Fa>>>2,Ha=Ea^Ga,Ia=za,Ja=0|f[Ia>>2],La=Ja-1|0,Ma=Ha&La,gc=Ma,Na=za,Oa=0|f[Na>>2],fc=Oa;;){if(Pa=gc,Qa=(Pa>>>0)/4&-1,Ra=za,Sa=Ra+12|0,Ta=0|f[Sa>>2],Ua=Ta+Qa|0,Wa=0|d[Ua>>0],Xa=255&Wa,Ya=gc,Za=(Ya>>>0)%4&-1,$a=64549+Za|0,_a=0|d[$a>>0],ab=255&_a,bb=Xa&ab,cb=0!=(0|bb),db=1^cb,!db)break;if(fb=gc,gb=(fb>>>0)/4&-1,hb=za,ib=hb+12|0,jb=0|f[ib>>2],kb=jb+gb|0,lb=0|d[kb>>0],mb=255&lb,nb=gc,ob=(nb>>>0)%4&-1,qb=64553+ob|0,rb=0|d[qb>>0],sb=255&rb,tb=mb&sb,ub=0!=(0|tb))Ib=fc,Jb=za,Kb=0|f[Jb>>2],Mb=(0|Ib)==(0|Kb),Mb&&(Nb=gc,fc=Nb);else if(vb=gc,wb=za,xb=wb+16|0,yb=0|f[xb>>2],zb=yb+(vb<<2)|0,Bb=0|f[zb>>2],Cb=Ka,Db=(0|Bb)==(0|Cb)){ic=7;break}Ob=gc,Pb=hc,Qb=Pb+1|0,hc=Qb,Rb=Ob+Qb|0,Sb=za,Tb=0|f[Sb>>2],Ub=Tb-1|0,Vb=Rb&Ub,gc=Vb}return 7==(0|ic)?(Eb=Va,Fb=0!=(0|Eb),Fb&&(Gb=Va,f[Gb>>2]=0),Hb=gc,g=Hb,ua=g,l=jc,0|ua):(Xb=fc,Yb=za,Zb=0|f[Yb>>2],$b=(0|Xb)!=(0|Zb),_b=Ka,$b?(ac=fc,bc=za,cc=bc+16|0,dc=0|f[cc>>2],ec=dc+(ac<<2)|0,f[ec>>2]=_b,j=fc,k=(j>>>0)%4&-1,n=64553+k|0,o=0|d[n>>0],p=255&o,q=p^-1,r=fc,s=(r>>>0)/4&-1,t=za,u=t+12|0,w=0|f[u>>2],x=w+s|0,y=0|d[x>>0],z=255&y,A=z&q,B=255&A,d[x>>0]=B,C=za,D=C+4|0,E=0|f[D>>2],F=E+1|0,f[D>>2]=F,H=Va,I=0!=(0|H),I&&(J=Va,f[J>>2]=2),K=fc,g=K,ua=g,l=jc,0|ua):(L=gc,M=za,N=M+16|0,O=0|f[N>>2],P=O+(L<<2)|0,f[P>>2]=_b,Q=gc,S=(Q>>>0)%4&-1,T=64549+S|0,U=0|d[T>>0],V=255&U,W=V^-1,Y=gc,Z=(Y>>>0)/4&-1,$=za,_=$+12|0,aa=0|f[_>>2],ca=aa+Z|0,da=0|d[ca>>0],ea=255&da,fa=ea&W,ga=255&fa,d[ca>>0]=ga,ha=za,ia=ha+4|0,ja=0|f[ia>>2],ka=ja+1|0,f[ia>>2]=ka,la=za,na=la+8|0,oa=0|f[na>>2],pa=oa+1|0,f[na>>2]=pa,qa=Va,ra=0!=(0|qa),ra&&(sa=Va,f[sa>>2]=1),ta=gc,g=ta,ua=g,l=jc,0|ua))}function cp(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;E=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,g=b,t=c,w=t,x=(w>>>0)%4&-1,y=64553+x|0,z=0|d[y>>0],A=255&z,B=t,C=(B>>>0)/4&-1,h=g,i=h+12|0,j=0|f[i>>2],k=j+C|0,n=0|d[k>>0],o=255&n,p=o|A,q=255&p,d[k>>0]=q,r=g,s=r+4|0,u=0|f[s>>2],v=u+-1|0,f[s>>2]=v,l=E}function dp(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,da=0;for(da=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,e=b,s=c,D=0|Zo(s),_=D,aa=0;;){if(O=aa,V=e,W=0|f[V>>2],Y=(0|O)!=(0|W),!Y)break;Z=aa,$=(Z>>>0)/4&-1,g=e,h=g+12|0,i=0|f[h>>2],j=i+$|0,k=0|d[j>>0],n=255&k,o=aa,p=(o>>>0)%4&-1,q=64557+p|0,r=0|d[q>>0],t=255&r,u=n&t,v=0!=(0|u),v||(w=c,x=_,y=aa,z=e,A=z+16|0,B=0|f[A>>2],C=B+(y<<2)|0,E=0|f[C>>2],F=0|bp(w,x,E,0),ba=F,G=aa,H=e,I=H+20|0,J=0|f[I>>2],K=J+(G<<2)|0,L=0|f[K>>2],M=ba,N=_,P=N+20|0,Q=0|f[P>>2],R=Q+(M<<2)|0,f[R>>2]=L),S=aa,T=S+1|0,aa=T}return U=_,l=da,0|U}function ep(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,W=0;if(W=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,e=b,s=e,D=s+16|0,M=0|f[D>>2],S=M,N=S,O=0!=(0|N),!O)return void(l=W);for(T=0;;){if(P=T,Q=S,R=0|f[Q>>2],g=(0|P)!=(0|R),!g)break;h=T,i=(h>>>0)/4&-1,j=S,k=j+12|0,n=0|f[k>>2],o=n+i|0,p=0|d[o>>0],q=255&p,r=T,t=(r>>>0)%4&-1,u=64557+t|0,v=0|d[u>>0],w=255&v,x=q&w,y=0!=(0|x),y||(z=T,A=S,B=A+20|0,C=0|f[B>>2],E=C+(z<<2)|0,F=0|f[E>>2],U=F,G=U,H=0!=(0|G),H&&(I=c,J=U,qc(I,J))),K=T,L=K+1|0,T=L}l=W}function fp(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;return t=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,h=b,i=h,j=i+16|0,k=0|f[j>>2],r=k,n=r,o=0!=(0|n),o?(p=r,q=p+4|0,e=0|f[q>>2],c=e,g=c,l=t,0|g):(c=0,g=c,l=t,0|g)}function gp(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,k=0;k=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,g=d,h=g+16|0,i=0|f[h>>2],$o(e,i),l=k}function hp(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;return w=l,l=l+32|0,(0|l)>=(0|m)&&X(),u=w+8|0,n=w,d=a,k=b,o=d,p=k,q=d,r=0|ki(q,64561,9),Vi(n,o,p,r),f[u>>2]=0|f[n>>2],f[u+4>>2]=0|f[n+4>>2],s=u+4|0,t=0|f[s>>2],e=0==(0|t),e&&(g=0|f[u>>2],h=0!=(0|g),!h)?(c=0,j=c,l=w,0|j):(i=0|f[u>>2],c=i,j=c,l=w,0|j)}function ip(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;return E=l,l=l+48|0,(0|l)>=(0|m)&&X(),d=E+32|0,w=E,g=a,t=b,v=c,x=g,y=v,jp(w,y),z=t,f[d>>2]=0|f[w>>2],f[d+4>>2]=0|f[w+4>>2],A=0|Uj(x,d,z),B=A<<24>>24!=0,h=g,B?(i=v,j=t,k=0|kp(h,i,j),e=k,u=e,l=E,0|u):(n=0|lp(h),C=n,o=g,p=v,q=C,r=t,np(o,p,q,r),s=C,e=s,u=e,l=E,0|u)}function jp(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=0|f[d>>2],g=255&e,h=j+4|0,f[h>>2]=g,i=c,f[j>>2]=i,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function kp(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;return t=l,l=l+48|0,(0|l)>=(0|m)&&X(),r=t+40|0,d=t+32|0,q=t+8|0,i=t,e=a,g=b,h=c,j=e,k=g,jp(i,k),n=h,f[d>>2]=0|f[i>>2],f[d+4>>2]=0|f[i+4>>2],Ej(q,j,d,n),o=e,f[r>>2]=0|f[q>>2],f[r+4>>2]=0|f[q+4>>2],Hf(o,r,10),p=0|f[q>>2],l=t,0|p}function lp(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=b,e=d+40|0,g=0|f[e>>2],h=0|Tc(c,10,g),n=h,i=b,j=n,mp(i,j),k=n,l=p,0|k}function mp(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,k=0;k=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,g=0|Zo(e),h=d,i=h+16|0,f[i>>2]=g,l=k}function np(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,H=0;return H=l,l=l+48|0,(0|l)>=(0|m)&&X(),g=H+40|0,e=H+32|0,A=H+8|0,B=H,h=a,i=b,v=c,z=d,C=h,D=v,E=z,op(C,D,E),F=h,j=i,k=z,n=v,jp(A,n),f[e>>2]=0|f[A>>2],f[e+4>>2]=0|f[A+4>>2],$i(F,j,k,e),o=i,p=h,q=p+32|0,r=0|f[q>>2],(s=(0|o)!=(0|r))?(t=h,u=v,w=h,x=0|ki(w,64561,9),y=i,jp(B,y),f[g>>2]=0|f[B>>2],f[g+4>>2]=0|f[B+4>>2],$i(t,u,x,g),void(l=H)):void(l=H)}function op(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;r=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=r+24|0,i=r,e=a,g=b,h=c,j=e,k=g,n=e,o=0|ki(n,64571,11),p=h,pp(i,p),f[d>>2]=0|f[i>>2],f[d+4>>2]=0|f[i+4>>2],$i(j,k,o,d),l=r}function pp(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=4,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function qp(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,g=c,h=d,i=0|li(g,h),j=c,k=j+32|0,n=0|f[k>>2],o=0|ip(e,i,n),l=q,0|o}function rp(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),n=p+8|0,d=a,e=c,g=d,f[n>>2]=0|f[b>>2],f[n+4>>2]=0|f[b+4>>2],sp(g,n),h=d,i=e,j=0|f[b>>2],k=0|ip(h,i,j),l=p,0|k}function sp(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;switch(r=l,l=l+32|0,(0|l)>=(0|m)&&X(),o=r+24|0,p=r,e=r+8|0,c=a,g=b+4|0,h=0|f[g>>2],0|h){case 10:case 12:case 9:return void(l=r);default:i=c,j=c,k=0|tp(j,68905),n=c,f[o>>2]=0|f[b>>2],f[o+4>>2]=0|f[b+4>>2],Df(e,n,o),d[p>>0]=0|d[e>>0],d[p+1>>0]=0|d[e+1>>0],d[p+2>>0]=0|d[e+2>>0],d[p+3>>0]=0|d[e+3>>0],d[p+4>>0]=0|d[e+4>>0],d[p+5>>0]=0|d[e+5>>0],d[p+6>>0]=0|d[e+6>>0],d[p+7>>0]=0|d[e+7>>0],Er(i,k,64583,p)}}function tp(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;return o=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,g=c,h=g+32|0,i=0|f[h>>2],j=d,k=0|up(e,i,j),l=o,0|k}function up(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=e,i=d,j=f,k=0|li(i,j),n=0|vp(g,h,k),l=p,0|n}function vp(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;return t=l,l=l+48|0,(0|l)>=(0|m)&&X(),r=t+40|0,d=t+32|0,q=t+8|0,i=t,e=a,g=b,h=c,j=e,k=g,jp(i,k),n=h,f[d>>2]=0|f[i>>2],f[d+4>>2]=0|f[i+4>>2],Ej(q,j,d,n),o=e,f[r>>2]=0|f[q>>2],f[r+4>>2]=0|f[q+4>>2],Hf(o,r,9),p=0|f[q>>2],l=t,0|p}function wp(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,z=0;return z=l,l=l+32|0,(0|l)>=(0|m)&&X(),x=z,q=z+8|0,e=a,g=b,p=c,r=p,s=0!=(0|r),s||(t=e,u=e,v=g,vi(q,u,v),d[x>>0]=0|d[q>>0],d[x+1>>0]=0|d[q+1>>0],d[x+2>>0]=0|d[q+2>>0],d[x+3>>0]=0|d[q+3>>0],d[x+4>>0]=0|d[q+4>>0],d[x+5>>0]=0|d[q+5>>0],d[x+6>>0]=0|d[q+6>>0],d[x+7>>0]=0|d[q+7>>0],Hr(t,64608,x)),w=e,h=g,i=p,j=e,k=j+32|0,n=0|f[k>>2],o=0|xp(w,h,i,n),l=z,0|o}function xp(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,wa=0;if(wa=l,l=l+96|0,(0|l)>=(0|m)&&X(),g=wa+80|0,sa=wa,ba=wa+48|0,ma=wa+40|0,oa=wa+32|0,pa=wa+24|0,i=a,v=b,G=c,R=e,qa=i,j=R,jp(ba,j),k=v,f[g>>2]=0|f[ba>>2],f[g+4>>2]=0|f[ba+4>>2],n=0|Uj(qa,g,k),o=n<<24>>24!=0,p=i,!o)return fa=G,ga=0|zp(p,fa),ra=ga,ha=i,ia=R,ja=ra,ka=v,np(ha,ia,ja,ka),la=ra,h=la,na=h,l=wa,0|na;q=R,r=v,s=0|vp(p,q,r),ra=s,t=ra,u=0|f[t>>2],w=u>>>11,x=524288&w,y=0!=(0|x);a:do if(y)for(z=ra,A=z+20|0,B=0|f[A>>2],ra=B;;){if(C=ra,D=0|f[C>>2],E=D>>>11,F=1048576&E,H=0!=(0|F),I=1^H,!I)break a;J=ra,K=J+20|0,L=0|f[K>>2],ra=L}while(0);return M=G,N=0!=(0|M),N&&(O=ra,P=O+20|0,Q=0|f[P>>2],S=0|yp(Q),T=G,U=(0|S)!=(0|T),U&&(V=i,W=i,Y=0|tp(W,68905),Z=i,$=v,vi(ma,Z,$),_=ra,aa=_+20|0,ca=0|f[aa>>2],jp(oa,ca),da=G,jp(pa,da),d[sa>>0]=0|d[ma>>0],d[sa+1>>0]=0|d[ma+1>>0],d[sa+2>>0]=0|d[ma+2>>0],d[sa+3>>0]=0|d[ma+3>>0],d[sa+4>>0]=0|d[ma+4>>0],d[sa+5>>0]=0|d[ma+5>>0],d[sa+6>>0]=0|d[ma+6>>0],d[sa+7>>0]=0|d[ma+7>>0],ta=sa+8|0,d[ta>>0]=0|d[oa>>0],d[ta+1>>0]=0|d[oa+1>>0],d[ta+2>>0]=0|d[oa+2>>0],d[ta+3>>0]=0|d[oa+3>>0],d[ta+4>>0]=0|d[oa+4>>0],d[ta+5>>0]=0|d[oa+5>>0],d[ta+6>>0]=0|d[oa+6>>0],d[ta+7>>0]=0|d[oa+7>>0],ua=sa+16|0,d[ua>>0]=0|d[pa>>0],d[ua+1>>0]=0|d[pa+1>>0],d[ua+2>>0]=0|d[pa+2>>0],d[ua+3>>0]=0|d[pa+3>>0],d[ua+4>>0]=0|d[pa+4>>0],d[ua+5>>0]=0|d[pa+5>>0],d[ua+6>>0]=0|d[pa+6>>0],d[ua+7>>0]=0|d[pa+7>>0],Er(V,Y,64648,sa))),ea=ra,h=ea,na=h,l=wa,0|na}function yp(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;if(w=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,n=c,o=0==(0|n))return b=0,j=b,l=w,0|j;for(;;){if(p=c,q=0|f[p>>2],r=255&q,s=12==(0|r),s?k=1:(t=c,u=0|f[t>>2],d=255&u,e=11==(0|d),k=e),g=c,!k)break;h=g+20|0,i=0|f[h>>2],c=i}return b=g,j=b,l=w,0|j}function zp(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,M=0;return M=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=d,C=0!=(0|r),C&&(E=c,F=d,Ap(E,F)),G=c,H=d,I=0|Bp(G,H),K=I,J=d,(e=0!=(0|J))?(g=K,h=0|f[g>>2],i=h>>>11,j=i&-256,k=d,n=0|f[k>>2],o=n>>>11,p=255&o,q=255&p,s=q<<24>>24,t=j|s,u=K,v=0|f[u>>2],w=2097151&t,x=w<<11,y=2047&v,z=y|x,f[u>>2]=z,A=c,B=K,Cp(A,B),D=K,l=M,0|D):(A=c,B=K,Cp(A,B),D=K,l=M,0|D)}function Ap(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,I=0;return I=l,l=l+32|0,(0|l)>=(0|m)&&X(),G=I,s=I+8|0,c=a,e=b,z=e,A=0|f[z>>2],B=255&A,C=9!=(0|B),C&&(D=c,E=c,F=0|tp(E,68905),g=e,jp(s,g),d[G>>0]=0|d[s>>0],d[G+1>>0]=0|d[s+1>>0],d[G+2>>0]=0|d[s+2>>0],d[G+3>>0]=0|d[s+3>>0],d[G+4>>0]=0|d[s+4>>0],d[G+5>>0]=0|d[s+5>>0],d[G+6>>0]=0|d[s+6>>0],d[G+7>>0]=0|d[s+7>>0],Er(D,F,64693,G)),h=e,i=0|f[h>>2],j=255&i,k=12==(0|j),k&&(n=c,o=c,p=0|tp(o,68905),Br(n,p,64731)),q=e,r=c,t=r+36|0,u=0|f[t>>2],(v=(0|q)==(0|u))?(w=c,x=c,y=0|tp(x,68905),Br(w,y,64770),void 0):void(l=I)}function Bp(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0;return G=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=c,x=c,y=x+36|0,z=0|f[y>>2],A=0|Tc(r,9,z),E=A,B=d,C=0!=(0|B),C?(D=d,e=E,g=e+20|0,f[g>>2]=D,h=c,i=E,j=d,Yc(h,i,j)):(k=c,n=k+32|0,o=0|f[n>>2],p=E,q=p+20|0,f[q>>2]=o),s=c,t=0|Zo(s),u=E,v=u+16|0,f[v>>2]=t,w=E,l=G,0|w}function Cp(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Na=0;if(Na=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=Na+24|0,s=Na,d=a,e=b,D=e,O=D+4|0,$=0|f[O>>2],ja=0|f[$>>2],ua=255&ja,Fa=12==(0|ua))return void(l=Na);Ja=d,g=d,h=g+36|0,i=0|f[h>>2],j=0|Tc(Ja,12,i),La=j,k=d,n=0|Zo(k),o=La,p=o+16|0,f[p>>2]=n,q=La,r=q+12|0,f[r>>2]=0,t=e,u=0|f[t>>2],v=255&u,w=9==(0|v),x=e;do{if(w){if(Ka=x,y=Ka,z=y+20|0,A=0|f[z>>2],B=0!=(0|A)){I=Ka,J=I+20|0,K=0|f[J>>2],L=K+4|0,M=0|f[L>>2],N=La,P=N+20|0,f[P>>2]=M;break}C=d,E=C+36|0,F=0|f[E>>2],G=La,H=G+20|0,f[H>>2]=F;break}if(Q=0|f[x>>2],R=255&Q,S=12==(0|R),T=e,!S){pa=T+4|0,qa=0|f[pa>>2],ra=La,sa=ra+20|0,f[sa>>2]=qa;break}for(Ka=T;;){if(U=Ka,V=U+20|0,W=0|f[V>>2],Y=0|f[W>>2],Z=255&Y,_=11==(0|Z),!_)break;aa=Ka,ba=aa+20|0,ca=0|f[ba>>2],Ka=ca}da=d,ea=Ka,fa=ea+20|0,ga=0|f[fa>>2],Cp(da,ga),ha=Ka,ia=ha+20|0,ka=0|f[ia>>2],la=ka+4|0,ma=0|f[la>>2],na=La,oa=na+20|0,f[oa>>2]=ma}while(0);ta=La,va=e,wa=va+4|0,f[wa>>2]=ta,xa=d,ya=e,za=La,Yc(xa,ya,za),Aa=d,Ba=La,Ca=e,Yc(Aa,Ba,Ca),Da=d,Ea=La,Ga=d,Ha=0|ki(Ga,67899,12),Ia=e,jp(s,Ia),f[c>>2]=0|f[s>>2],f[c+4>>2]=0|f[s+4>>2],$i(Da,Ea,Ha,c),l=Na}function Dp(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=d,i=e,j=0|li(h,i),k=f,n=0|wp(g,j,k),l=p,0|n}function Ep(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;O=l,l=l+32|0,(0|l)>=(0|m)&&X(),K=O+24|0,M=O,g=a,h=e,u=c+4|0,C=0|f[u>>2],D=0==(0|C),D?(E=0|f[c>>2],F=0!=(0|E),F?N=3:L=0):N=3;do if(3==(0|N)){if(G=c+4|0,H=0|f[G>>2],I=9!=(0|H),!I){n=0|f[c>>2],L=n;break}i=g,j=g,k=0|tp(j,68905),d[M>>0]=0|d[c>>0],d[M+1>>0]=0|d[c+1>>0],d[M+2>>0]=0|d[c+2>>0],d[M+3>>0]=0|d[c+3>>0],d[M+4>>0]=0|d[c+4>>0],d[M+5>>0]=0|d[c+5>>0],d[M+6>>0]=0|d[c+6>>0],d[M+7>>0]=0|d[c+7>>0],Er(i,k,64693,M)}while(0);return o=g,f[K>>2]=0|f[b>>2],f[K+4>>2]=0|f[b+4>>2],sp(o,K),p=g,q=h,r=L,s=0|f[b>>2],t=0|xp(p,q,r,s),J=t,v=g,w=J,x=w+20|0,y=0|f[x>>2],z=0|yp(y),A=J,Fp(v,z,A),B=J,l=O,0|B}function Fp(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0;y=l,l=l+64|0,(0|l)>=(0|m)&&X(),e=y+48|0,w=y,p=y+24|0,q=y+16|0,r=y+8|0,g=a,h=b,o=c,s=h,t=0!=(0|s),t||(u=g,v=u+32|0,i=0|f[v>>2],h=i),j=g,k=h,jp(p,k),n=o,jp(q,n),d[w>>0]=0|d[q>>0],d[w+1>>0]=0|d[q+1>>0],d[w+2>>0]=0|d[q+2>>0],d[w+3>>0]=0|d[q+3>>0],d[w+4>>0]=0|d[q+4>>0],d[w+5>>0]=0|d[q+5>>0],d[w+6>>0]=0|d[q+6>>0],d[w+7>>0]=0|d[q+7>>0],f[e>>2]=0|f[p>>2],f[e+4>>2]=0|f[p+4>>2],Yj(r,j,e,64799,1,w),l=y}function Gp(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0;return A=l,l=l+48|0,(0|l)>=(0|m)&&X(),c=A+24|0,y=A+8|0,r=A,e=a,q=b,s=e,t=q,qi(y,s,t),u=y+4|0,v=0|f[u>>2],w=0==(0|v),w&&(x=0|f[y>>2],g=0!=(0|x),!g)?(d=0,p=d,l=A,0|p):(h=e,i=e,j=i+32|0,k=0|f[j>>2],jp(r,k),n=0|f[y>>2],f[c>>2]=0|f[r>>2],f[c+4>>2]=0|f[r+4>>2],o=0|Sj(h,c,n),d=o,p=d,l=A,0|p)}function Hp(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ca=0;ca=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,g=b,t=c,E=d,P=g,V=0|f[P>>2],W=V>>>11,Y=524288&W,Z=0!=(0|Y);a:do if(Z)for($=g,h=$+20|0,i=0|f[h>>2],g=i;;){if(j=g,k=0|f[j>>2],n=k>>>11,o=1048576&n,p=0!=(0|o),q=1^p,!q)break a;r=g,s=r+20|0,u=0|f[s>>2],g=u}while(0);return v=g,w=v+16|0,x=0|f[w>>2],_=x,y=_,z=0!=(0|y),z||(A=e,B=0|Zo(A),C=g,D=C+16|0,f[D>>2]=B,_=B),F=e,G=_,H=t,I=0|bp(F,G,H,0),aa=I,J=E,K=aa,L=_,M=L+20|0,N=0|f[M>>2],O=N+(K<<2)|0,f[O>>2]=J,Q=E,(R=0!=(0|Q))?(S=e,T=g,U=E,Yc(S,T,U),void(l=ca)):void(l=ca)}function Ip(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;E=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=a,h=b,t=c,u=d,v=e,w=g,x=0|Wc(w),B=x,y=g,z=u,A=0|mt(y,z),C=A,i=h,j=C,k=j+16|0,f[k>>2]=i,n=g,o=h,p=t,q=C,Hp(n,o,p,q),r=g,s=B,Xc(r,s),l=E}function Jp(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;u=l,l=l+32|0,(0|l)>=(0|m)&&X(),f=a,g=b,j=c,k=d,n=e,o=f,p=g,q=f,r=j,s=0|li(q,r),h=k,i=n,Ip(o,p,s,h,i),l=u}function Kp(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Lp(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0,wf=0,xf=0,yf=0,zf=0,Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0,Gf=0,Hf=0,If=0,Jf=0,Kf=0,Lf=0,Mf=0,Nf=0,Of=0,Qf=0,Rf=0,Sf=0,Tf=0,Uf=0,Vf=0,Wf=0,Xf=0,Yf=0,Zf=0,$f=0,_f=0,ag=0,bg=0,cg=0,dg=0,eg=0,fg=0,gg=0,hg=0,ig=0,jg=0,kg=0,lg=0,mg=0,og=0,pg=0,qg=0,rg=0,sg=0,tg=0,ug=0,vg=0,wg=0,xg=0,yg=0,zg=0,Ag=0,Bg=0,Cg=0,Dg=0,Eg=0,Fg=0,Gg=0,Hg=0,Ig=0,Jg=0,Kg=0,Lg=0,Mg=0,Ng=0,Og=0,Pg=0,Qg=0,Rg=0,Sg=0,Tg=0,Ug=0,Vg=0,Wg=0,Xg=0,Yg=0,Zg=0,_g=0,ah=0,bh=0,ch=0,dh=0,eh=0,fh=0,gh=0,hh=0,ih=0,jh=0,kh=0,lh=0,mh=0,nh=0,oh=0,ph=0,qh=0,rh=0,sh=0,th=0,uh=0,vh=0,wh=0,xh=0,yh=0,zh=0,Ah=0,Bh=0,Ch=0,Dh=0,Eh=0,Fh=0,Gh=0,Hh=0,Ih=0,Jh=0,Kh=0,Lh=0,Mh=0,Nh=0,Oh=0,Ph=0,Qh=0,Rh=0,Sh=0,Th=0,Uh=0,Vh=0,Wh=0,Xh=0,Yh=0,Zh=0,$h=0,_h=0,ai=0,bi=0,ci=0,di=0,ei=0,fi=0,gi=0,hi=0,ii=0,ji=0,ki=0,li=0,mi=0,ni=0,oi=0,pi=0,qi=0,ri=0,si=0,ti=0,ui=0,vi=0,wi=0,xi=0,yi=0,zi=0,Ai=0,Bi=0,Ci=0,Di=0,Ei=0,Fi=0,Gi=0,Hi=0,Ii=0,Ji=0,Ki=0,Li=0,Mi=0,Ni=0,Oi=0,Pi=0,Qi=0,Ri=0,Si=0,Ti=0,Ui=0,Vi=0,Wi=0,Xi=0,Yi=0,Zi=0,$i=0,_i=0,aj=0,bj=0,cj=0,dj=0,ej=0,fj=0,gj=0,hj=0,ij=0,jj=0,kj=0,lj=0,mj=0,nj=0,oj=0,pj=0,qj=0,rj=0,sj=0,tj=0,uj=0,vj=0,wj=0,xj=0,yj=0,zj=0,Aj=0,Bj=0,Cj=0,Dj=0,Ej=0,Fj=0,Gj=0,Hj=0,Ij=0,Jj=0,Kj=0,Lj=0,Mj=0,Nj=0,Oj=0,Pj=0,Qj=0,Rj=0,Sj=0,Tj=0,Uj=0,Vj=0,Wj=0,Xj=0,Yj=0,Zj=0,$j=0,_j=0,ak=0,bk=0,ck=0,dk=0,ek=0,fk=0,gk=0,hk=0,ik=0,jk=0,kk=0,lk=0,mk=0,nk=0,ok=0,pk=0,qk=0,rk=0,sk=0,tk=0,uk=0,vk=0,wk=0,xk=0,yk=0,zk=0,Ak=0,Bk=0,Ck=0,Dk=0,Ek=0,Fk=0,Gk=0,Hk=0,Ik=0,Jk=0,Kk=0,Lk=0,Mk=0,Nk=0,Ok=0,Pk=0,Qk=0,Rk=0,Sk=0,Tk=0,Uk=0,Vk=0,Wk=0,Xk=0,Yk=0,Zk=0,$k=0,_k=0,al=0,bl=0,cl=0,dl=0,el=0,fl=0,gl=0,hl=0,il=0,jl=0,kl=0,ll=0,ml=0,nl=0,ol=0,pl=0,ql=0,rl=0,sl=0,tl=0,ul=0,vl=0,wl=0,xl=0,yl=0,zl=0,Al=0,Bl=0,Cl=0,Dl=0,El=0,Fl=0,Gl=0,Hl=0,Il=0,Jl=0,Kl=0,Ll=0,Ml=0,Nl=0,Ol=0,Pl=0,Ql=0,Rl=0,Sl=0,Tl=0,Ul=0,Vl=0,Wl=0,Xl=0,Yl=0,Zl=0,$l=0,_l=0,am=0,bm=0,cm=0,dm=0,em=0,fm=0,gm=0,hm=0,im=0,jm=0,km=0,lm=0,mm=0,nm=0,om=0,pm=0,qm=0,rm=0,sm=0,tm=0,um=0,vm=0,wm=0,xm=0,ym=0,zm=0,Am=0,Bm=0,Cm=0,Dm=0,Em=0,Fm=0,Gm=0,Hm=0,Im=0,Jm=0,Km=0,Lm=0,Mm=0,Nm=0,Om=0,Pm=0,Qm=0,Rm=0,Sm=0,Tm=0,Um=0,Vm=0,Wm=0,Xm=0,Ym=0,Zm=0,$m=0,_m=0,an=0,bn=0,cn=0,dn=0,en=0,fn=0,gn=0,hn=0,jn=0,kn=0,ln=0,mn=0,nn=0,on=0,pn=0,qn=0,rn=0,sn=0,tn=0,un=0,vn=0,wn=0,xn=0,yn=0,zn=0,An=0,Bn=0,Cn=0,Dn=0,En=0,Fn=0,Gn=0,Hn=0,In=0,Jn=0;
+Jn=l,l=l+384|0,(0|l)>=(0|m)&&X(),q=Jn+368|0,An=Jn+360|0,p=Jn+352|0,o=Jn+344|0,n=Jn+336|0,k=Jn+328|0,i=Jn+320|0,h=Jn+312|0,g=Jn+304|0,e=Jn+296|0,Hn=Jn+8|0,Gn=Jn,il=Jn+378|0,rk=Jn+264|0,yn=Jn+240|0,wb=Jn+224|0,zd=Jn+208|0,Ef=Jn+192|0,Bn=Jn+184|0,Kh=Jn+168|0,Cn=Jn+160|0,yj=Jn+144|0,qk=Jn+136|0,Jj=Jn+112|0,Uj=Jn+88|0,fl=Jn+72|0,zn=Jn+56|0,dk=Jn+16|0,r=a,s=b,en=0,t=r,E=t+12|0,P=0|f[E>>2],_=P+4|0,ka=0|f[_>>2],va=ka+8|0,xn=va,Ga=r,Ra=Ga+12|0,ab=0|f[Ra>>2],lb=ab+16|0,xb=0|f[lb>>2],Ib=xb+36|0,Tb=0|f[Ib>>2],sk=Tb,fn=0,dn=1,f[rk>>2]=c,cc=sk,nc=(0|cc)<0,nc&&(yc=r,Jc=yc+12|0,Uc=0|f[Jc>>2],dd=Uc+4|0,od=0|f[dd>>2],Ad=od+8|0,Ld=0|f[Ad>>2],ok=Ld,Wd=ok,ge=Wd+12|0,re=0|f[ge>>2],sk=re,Ce=ok,Ne=Ce+20|0,Ye=0|f[Ne>>2],xn=Ye);a:for(;;){if(hf=s,tf=hf+1|0,s=tf,Ff=0|d[hf>>0],d[il>>0]=Ff,Rf=Ff<<24>>24!=0,ag=0|d[il>>0],!Rf){In=98;break}switch(lg=ag<<24>>24,0|lg){case 63:case 38:case 42:case 124:break;default:if(xg=sk,Ig=en,Tg=(0|xg)<=(0|Ig)){if(dh=fn,oh=dh<<24>>24!=0,!oh){In=8;break a}dn=0}}fi=0|d[il>>0],qi=fi<<24>>24;do switch(0|qi){case 111:if(tk=0|f[rk>>2],Bi=tk,Mi=4,ll=Mi,kl=ll-1|0,Xi=Bi+kl|0,gj=4,Rl=gj,Jl=Rl-1|0,Bl=Jl^-1,rj=Xi&Bl,xj=rj,zj=0|f[xj>>2],Nk=xj+4|0,f[rk>>2]=Nk,hn=zj,Aj=en,Bj=sk,Cj=(0|Aj)<(0|Bj),!Cj)continue a;Dj=hn,Ej=xn,Fj=Ej+8|0,xn=Fj,f[Dj>>2]=0|f[Ej>>2],f[Dj+4>>2]=0|f[Ej+4>>2],Gj=en,Hj=Gj+1|0,en=Hj;continue a;case 67:if(Ak=0|f[rk>>2],Ij=Ak,Kj=4,Zl=Kj,Yl=Zl-1|0,Lj=Ij+Yl|0,Mj=4,am=Mj,_l=am-1|0,$l=_l^-1,Nj=Lj&$l,Oj=Nj,Pj=0|f[Oj>>2],Yk=Oj+4|0,f[rk>>2]=Yk,jn=Pj,Qj=en,Rj=sk,Sj=(0|Qj)<(0|Rj),!Sj)continue a;switch(Tj=xn,Vj=Tj+8|0,xn=Vj,f[yn>>2]=0|f[Tj>>2],f[yn+4>>2]=0|f[Tj+4>>2],Wj=yn+4|0,Xj=0|f[Wj>>2],0|Xj){case 12:case 10:case 9:break;default:In=14;break a}_j=jn,f[_j>>2]=0|f[yn>>2],f[_j+4>>2]=0|f[yn+4>>2],ak=en,bk=ak+1|0,en=bk;continue a;case 83:if(Lk=0|f[rk>>2],ck=Lk,ek=4,cm=ek,bm=cm-1|0,fk=ck+bm|0,gk=4,fm=gk,em=fm-1|0,dm=em^-1,hk=fk&dm,ik=hk,jk=0|f[ik>>2],el=ik+4|0,f[rk>>2]=el,on=jk,kk=s,lk=0|d[kk>>0],mk=lk<<24>>24,nk=33==(0|mk),nk&&(u=s,v=u+1|0,s=v,w=en,x=sk,y=(0|w)<(0|x),y&&(z=xn,A=z+4|0,B=0|f[A>>2],C=0==(0|B),C&&(D=xn,F=0|f[D>>2],G=0!=(0|F),!G)))){H=on,I=xn,J=I+8|0,xn=J,f[H>>2]=0|f[I>>2],f[H+4>>2]=0|f[I+4>>2],K=en,L=K+1|0,en=L;continue a}if(M=en,N=sk,O=(0|M)<(0|N),!O)continue a;Q=on,R=r,S=xn,T=S+8|0,xn=T,f[e>>2]=0|f[S>>2],f[e+4>>2]=0|f[S+4>>2],Mp(wb,R,e),f[Q>>2]=0|f[wb>>2],f[Q+4>>2]=0|f[wb+4>>2],U=en,V=U+1|0,en=V;continue a;case 65:if(Mk=0|f[rk>>2],W=Mk,Y=4,hm=Y,gm=hm-1|0,Z=W+gm|0,$=4,km=$,jm=km-1|0,im=jm^-1,aa=Z&im,ba=aa,ca=0|f[ba>>2],Ok=ba+4|0,f[rk>>2]=Ok,pn=ca,da=s,ea=0|d[da>>0],fa=ea<<24>>24,ga=33==(0|fa),ga&&(ha=s,ia=ha+1|0,s=ia,ja=en,la=sk,ma=(0|ja)<(0|la),ma&&(na=xn,oa=na+4|0,pa=0|f[oa>>2],qa=0==(0|pa),qa&&(ra=xn,sa=0|f[ra>>2],ta=0!=(0|sa),!ta)))){ua=pn,wa=xn,xa=wa+8|0,xn=xa,f[ua>>2]=0|f[wa>>2],f[ua+4>>2]=0|f[wa+4>>2],ya=en,za=ya+1|0,en=za;continue a}if(Aa=en,Ba=sk,Ca=(0|Aa)<(0|Ba),!Ca)continue a;Da=pn,Ea=r,Fa=xn,Ha=Fa+8|0,xn=Ha,f[g>>2]=0|f[Fa>>2],f[g+4>>2]=0|f[Fa+4>>2],Op(zd,Ea,g),f[Da>>2]=0|f[zd>>2],f[Da+4>>2]=0|f[zd+4>>2],Ia=en,Ja=Ia+1|0,en=Ja;continue a;case 72:if(uk=0|f[rk>>2],Ka=uk,La=4,mm=La,lm=mm-1|0,Ma=Ka+lm|0,Na=4,pm=Na,om=pm-1|0,nm=om^-1,Oa=Ma&nm,Pa=Oa,Qa=0|f[Pa>>2],Pk=Pa+4|0,f[rk>>2]=Pk,qn=Qa,Sa=s,Ta=0|d[Sa>>0],Ua=Ta<<24>>24,Va=33==(0|Ua),Va&&(Wa=s,Xa=Wa+1|0,s=Xa,Ya=en,Za=sk,$a=(0|Ya)<(0|Za),$a&&(_a=xn,bb=_a+4|0,cb=0|f[bb>>2],db=0==(0|cb),db&&(eb=xn,fb=0|f[eb>>2],gb=0!=(0|fb),!gb)))){hb=qn,ib=xn,jb=ib+8|0,xn=jb,f[hb>>2]=0|f[ib>>2],f[hb+4>>2]=0|f[ib+4>>2],kb=en,mb=kb+1|0,en=mb;continue a}if(nb=en,ob=sk,pb=(0|nb)<(0|ob),!pb)continue a;qb=qn,rb=r,sb=xn,tb=sb+8|0,xn=tb,f[h>>2]=0|f[sb>>2],f[h+4>>2]=0|f[sb+4>>2],Pp(Ef,rb,h),f[qb>>2]=0|f[Ef>>2],f[qb+4>>2]=0|f[Ef+4>>2],ub=en,vb=ub+1|0,en=vb;continue a;case 115:if(vn=0,sn=0,vk=0|f[rk>>2],yb=vk,zb=4,rm=zb,qm=rm-1|0,Ab=yb+qm|0,Bb=4,um=Bb,tm=um-1|0,sm=tm^-1,Cb=Ab&sm,Db=Cb,Eb=0|f[Db>>2],Qk=Db+4|0,f[rk>>2]=Qk,vn=Eb,wk=0|f[rk>>2],Fb=wk,Gb=4,wm=Gb,vm=wm-1|0,Hb=Fb+vm|0,Jb=4,zm=Jb,ym=zm-1|0,xm=ym^-1,Kb=Hb&xm,Lb=Kb,Mb=0|f[Lb>>2],Rk=Lb+4|0,f[rk>>2]=Rk,sn=Mb,Nb=s,Ob=0|d[Nb>>0],Pb=Ob<<24>>24,Qb=33==(0|Pb),Qb&&(Rb=s,Sb=Rb+1|0,s=Sb,Ub=en,Vb=sk,Wb=(0|Ub)<(0|Vb),Wb&&(Xb=xn,Yb=Xb+4|0,Zb=0|f[Yb>>2],$b=0==(0|Zb),$b&&(_b=xn,ac=0|f[_b>>2],bc=0!=(0|ac),!bc)))){dc=vn,f[dc>>2]=0,ec=sn,f[ec>>2]=0,fc=en,gc=fc+1|0,en=gc;continue a}if(hc=en,ic=sk,jc=(0|hc)<(0|ic),!jc)continue a;kc=r,lc=xn,mc=lc+8|0,xn=mc,f[i>>2]=0|f[lc>>2],f[i+4>>2]=0|f[lc+4>>2],Mp(Kh,kc,i),f[Bn>>2]=0|f[Kh>>2],f[Bn+4>>2]=0|f[Kh+4>>2],oc=0|f[Bn>>2],pc=0|f[oc>>2],qc=pc>>>11,rc=8&qc,sc=0!=(0|rc),tc=0|f[Bn>>2],uc=tc+12|0,sc?zc=uc:(vc=uc+8|0,wc=0|f[vc>>2],zc=wc),xc=vn,f[xc>>2]=zc,Ac=0|f[Bn>>2],Bc=0|f[Ac>>2],Cc=Bc>>>11,Dc=8&Cc,Ec=0!=(0|Dc),Fc=0|f[Bn>>2],Ec?(Gc=0|f[Fc>>2],Hc=Gc>>>11,Ic=496&Hc,Kc=Ic>>4,Oc=Kc):(Lc=Fc+12|0,Mc=0|f[Lc>>2],Oc=Mc),Nc=sn,f[Nc>>2]=Oc,Pc=en,Qc=Pc+1|0,en=Qc;continue a;case 122:if(xk=0|f[rk>>2],Rc=xk,Sc=4,Bm=Sc,Am=Bm-1|0,Tc=Rc+Am|0,Vc=4,Em=Vc,Dm=Em-1|0,Cm=Dm^-1,Wc=Tc&Cm,Xc=Wc,Yc=0|f[Xc>>2],Sk=Xc+4|0,f[rk>>2]=Sk,wn=Yc,Zc=s,$c=0|d[Zc>>0],_c=$c<<24>>24,ad=33==(0|_c),ad&&(bd=s,cd=bd+1|0,s=cd,ed=en,fd=sk,gd=(0|ed)<(0|fd),gd&&(hd=xn,id=hd+4|0,jd=0|f[id>>2],kd=0==(0|jd),kd&&(ld=xn,md=0|f[ld>>2],nd=0!=(0|md),!nd)))){pd=wn,f[pd>>2]=0,qd=en,rd=qd+1|0,en=rd,sd=xn,td=sd+8|0,xn=td;continue a}if(ud=en,vd=sk,wd=(0|ud)<(0|vd),!wd)continue a;xd=r,yd=xn,Bd=yd+8|0,xn=Bd,f[k>>2]=0|f[yd>>2],f[k+4>>2]=0|f[yd+4>>2],Mp(yj,xd,k),f[Cn>>2]=0|f[yj>>2],f[Cn+4>>2]=0|f[yj+4>>2],Cd=r,Dd=0|$g(Cd,Cn),Ed=wn,f[Ed>>2]=Dd,Fd=en,Gd=Fd+1|0,en=Gd;continue a;case 97:if(yk=0|f[rk>>2],Hd=yk,Id=4,Gm=Id,Fm=Gm-1|0,Jd=Hd+Fm|0,Kd=4,Jm=Kd,Im=Jm-1|0,Hm=Im^-1,Md=Jd&Hm,Nd=Md,Od=0|f[Nd>>2],Tk=Nd+4|0,f[rk>>2]=Tk,rn=Od,zk=0|f[rk>>2],Pd=zk,Qd=4,Lm=Qd,Km=Lm-1|0,Rd=Pd+Km|0,Sd=4,Om=Sd,Nm=Om-1|0,Mm=Nm^-1,Td=Rd&Mm,Ud=Td,Vd=0|f[Ud>>2],Uk=Ud+4|0,f[rk>>2]=Uk,un=Vd,Xd=s,Yd=0|d[Xd>>0],Zd=Yd<<24>>24,$d=33==(0|Zd),$d&&(_d=s,ae=_d+1|0,s=ae,be=en,ce=sk,de=(0|be)<(0|ce),de&&(fe=xn,he=fe+4|0,ie=0|f[he>>2],je=0==(0|ie),je&&(ke=xn,le=0|f[ke>>2],me=0!=(0|le),!me)))){ne=rn,f[ne>>2]=0,oe=un,f[oe>>2]=0,pe=en,qe=pe+1|0,en=qe,se=xn,te=se+8|0,xn=te;continue a}if(ue=en,ve=sk,we=(0|ue)<(0|ve),!we)continue a;xe=r,ye=xn,ze=ye+8|0,xn=ze,f[n>>2]=0|f[ye>>2],f[n+4>>2]=0|f[ye+4>>2],Op(Jj,xe,n),f[qk>>2]=0|f[Jj>>2],f[qk+4>>2]=0|f[Jj+4>>2],Ae=0|f[qk>>2],pk=Ae,Be=pk,De=Be+20|0,Ee=0|f[De>>2],Fe=rn,f[Fe>>2]=Ee,Ge=pk,He=Ge+12|0,Ie=0|f[He>>2],Je=un,f[Je>>2]=Ie,Ke=en,Le=Ke+1|0,en=Le;continue a;case 102:if(Bk=0|f[rk>>2],Me=Bk,Oe=4,Qm=Oe,Pm=Qm-1|0,Pe=Me+Pm|0,Qe=4,Tm=Qe,Sm=Tm-1|0,Rm=Sm^-1,Re=Pe&Rm,Se=Re,Te=0|f[Se>>2],Vk=Se+4|0,f[rk>>2]=Vk,kn=Te,Ue=en,Ve=sk,We=(0|Ue)<(0|Ve),!We)continue a;Xe=r,Ze=xn,f[o>>2]=0|f[Ze>>2],f[o+4>>2]=0|f[Ze+4>>2],$e=+ee(Xe,o),_e=kn,j[_e>>2]=$e,af=xn,bf=af+8|0,xn=bf,cf=en,df=cf+1|0,en=df;continue a;case 105:if(Ck=0|f[rk>>2],ef=Ck,ff=4,Vm=ff,Um=Vm-1|0,gf=ef+Um|0,jf=4,Ym=jf,Xm=Ym-1|0,Wm=Xm^-1,kf=gf&Wm,lf=kf,mf=0|f[lf>>2],Wk=lf+4|0,f[rk>>2]=Wk,ln=mf,nf=en,of=sk,pf=(0|nf)<(0|of),!pf)continue a;switch(qf=xn,rf=qf+4|0,sf=0|f[rf>>2],0|sf){case 16:In=72;break a;case 3:uf=xn,vf=0|f[uf>>2],wf=ln,f[wf>>2]=vf;break;case 6:if(xf=xn,yf=+j[xf>>2],cn=yf,zf=cn,Af=zf<=2147483648,Bf=cn,Cf=Bf>=-2147483648,gn=Af&Cf,!gn){In=70;break a}If=cn,Jf=~~If,Kf=ln,f[Kf>>2]=Jf;break;default:Of=r,Qf=xn,f[p>>2]=0|f[Qf>>2],f[p+4>>2]=0|f[Qf+4>>2],Pf(Uj,Of,p),Sf=0|f[Uj>>2],Tf=ln,f[Tf>>2]=Sf}Uf=xn,Vf=Uf+8|0,xn=Vf,Wf=en,Xf=Wf+1|0,en=Xf;continue a;case 98:if(Dk=0|f[rk>>2],Yf=Dk,Zf=4,$m=Zf,Zm=$m-1|0,$f=Yf+Zm|0,_f=4,bn=_f,an=bn-1|0,_m=an^-1,bg=$f&_m,cg=bg,dg=0|f[cg>>2],Xk=cg+4|0,f[rk>>2]=Xk,gl=dg,eg=en,fg=sk,gg=(0|eg)<(0|fg),!gg)continue a;hg=xn,ig=hg+8|0,xn=ig,f[fl>>2]=0|f[hg>>2],f[fl+4>>2]=0|f[hg+4>>2],jg=fl+4|0,kg=0|f[jg>>2],mg=0!=(0|kg),og=1&mg,pg=255&og,qg=gl,d[qg>>0]=pg,rg=en,sg=rg+1|0,en=sg;continue a;case 110:if(Ek=0|f[rk>>2],tg=Ek,ug=4,nl=ug,ml=nl-1|0,vg=tg+ml|0,wg=4,ql=wg,pl=ql-1|0,ol=pl^-1,yg=vg&ol,zg=yg,Ag=0|f[zg>>2],Zk=zg+4|0,f[rk>>2]=Zk,Dn=Ag,Bg=en,Cg=sk,Dg=(0|Bg)<(0|Cg),!Dg)continue a;Eg=xn,Fg=Eg+8|0,xn=Fg,f[zn>>2]=0|f[Eg>>2],f[zn+4>>2]=0|f[Eg+4>>2],Gg=r,f[An>>2]=0|f[zn>>2],f[An+4>>2]=0|f[zn+4>>2],Hg=0|Qp(Gg,An),Jg=Dn,f[Jg>>2]=Hg,Kg=en,Lg=Kg+1|0,en=Lg;continue a;case 100:if(Fk=0|f[rk>>2],Mg=Fk,Ng=4,sl=Ng,rl=sl-1|0,Og=Mg+rl|0,Pg=4,vl=Pg,ul=vl-1|0,tl=ul^-1,Qg=Og&tl,Rg=Qg,Sg=0|f[Rg>>2],$k=Rg+4|0,f[rk>>2]=$k,jl=Sg,Gk=0|f[rk>>2],Ug=Gk,Vg=4,xl=Vg,wl=xl-1|0,Wg=Ug+wl|0,Xg=4,Al=Xg,zl=Al-1|0,yl=zl^-1,Yg=Wg&yl,Zg=Yg,_g=0|f[Zg>>2],_k=Zg+4|0,f[rk>>2]=_k,En=_g,ah=s,bh=0|d[ah>>0],ch=bh<<24>>24,eh=33==(0|ch),eh&&(fh=s,gh=fh+1|0,s=gh,hh=en,ih=sk,jh=(0|hh)<(0|ih),jh&&(kh=xn,lh=kh+4|0,mh=0|f[lh>>2],nh=0==(0|mh),nh&&(ph=xn,qh=0|f[ph>>2],rh=0!=(0|qh),!rh)))){sh=jl,f[sh>>2]=0,th=en,uh=th+1|0,en=uh,vh=xn,wh=vh+8|0,xn=wh;continue a}if(xh=en,yh=sk,Ah=(0|xh)<(0|yh),!Ah)continue a;Bh=r,Ch=xn,Dh=Ch+8|0,xn=Dh,Eh=En,f[q>>2]=0|f[Ch>>2],f[q+4>>2]=0|f[Ch+4>>2],Fh=0|Yr(Bh,q,Eh),Gh=jl,f[Gh>>2]=Fh,Hh=en,Ih=Hh+1|0,en=Ih;continue a;case 38:Hk=0|f[rk>>2],Jh=Hk,Mh=4,Dl=Mh,Cl=Dl-1|0,Nh=Jh+Cl|0,Oh=4,Gl=Oh,Fl=Gl-1|0,El=Fl^-1,Ph=Nh&El,Qh=Ph,Rh=0|f[Qh>>2],al=Qh+4|0,f[rk>>2]=al,mn=Rh,Sh=r,Th=Sh+12|0,Uh=0|f[Th>>2],Vh=Uh+16|0,Xh=0|f[Vh>>2],Yh=Xh+36|0,Zh=0|f[Yh>>2],$h=(0|Zh)<0,_h=r,ai=_h+12|0,bi=0|f[ai>>2],ci=bi+4|0,di=0|f[ci>>2],$h?(ei=di+16|0,hl=ei):(gi=r,hi=gi+12|0,ii=0|f[hi>>2],ji=ii+16|0,ki=0|f[ji>>2],li=ki+36|0,mi=0|f[li>>2],ni=di+(mi<<3)|0,oi=ni+8|0,hl=oi),pi=mn,ri=hl,f[pi>>2]=0|f[ri>>2],f[pi+4>>2]=0|f[ri+4>>2];continue a;case 124:fn=1;continue a;case 63:Ik=0|f[rk>>2],si=Ik,ti=4,Il=ti,Hl=Il-1|0,ui=si+Hl|0,vi=4,Ml=vi,Ll=Ml-1|0,Kl=Ll^-1,wi=ui&Kl,xi=wi,yi=0|f[xi>>2],bl=xi+4|0,f[rk>>2]=bl,nn=yi,zi=dn,Ai=nn,d[Ai>>0]=zi;continue a;case 42:if(Jk=0|f[rk>>2],Ci=Jk,Di=4,Ol=Di,Nl=Ol-1|0,Ei=Ci+Nl|0,Fi=4,Sl=Fi,Ql=Sl-1|0,Pl=Ql^-1,Gi=Ei&Pl,Hi=Gi,Ii=0|f[Hi>>2],cl=Hi+4|0,f[rk>>2]=cl,Fn=Ii,Kk=0|f[rk>>2],Ji=Kk,Ki=4,Ul=Ki,Tl=Ul-1|0,Li=Ji+Tl|0,Ni=4,Xl=Ni,Wl=Xl-1|0,Vl=Wl^-1,Oi=Li&Vl,Pi=Oi,Qi=0|f[Pi>>2],dl=Pi+4|0,f[rk>>2]=dl,tn=Qi,Ri=sk,Si=en,Ti=(0|Ri)>(0|Si),!Ti){ij=tn,f[ij>>2]=0,jj=Fn,f[jj>>2]=0;continue a}Ui=sk,Vi=en,Wi=Ui-Vi|0,Yi=tn,f[Yi>>2]=Wi,Zi=tn,$i=0|f[Zi>>2],_i=(0|$i)>0,_i&&(aj=xn,bj=Fn,f[bj>>2]=aj),cj=sk,en=cj,dj=tn,ej=0|f[dj>>2],fj=xn,hj=fj+(ej<<3)|0,xn=hj;continue a;default:In=97;break a}while(0)}if(8==(0|In))zh=r,Lh=r,Wh=0|tp(Lh,68855),Br(zh,Wh,64829);else if(14==(0|In))Yj=r,Zj=r,$j=0|tp(Zj,68905),d[Gn>>0]=0|d[yn>>0],d[Gn+1>>0]=0|d[yn+1>>0],d[Gn+2>>0]=0|d[yn+2>>0],d[Gn+3>>0]=0|d[yn+3>>0],d[Gn+4>>0]=0|d[yn+4>>0],d[Gn+5>>0]=0|d[yn+5>>0],d[Gn+6>>0]=0|d[yn+6>>0],d[Gn+7>>0]=0|d[yn+7>>0],Er(Yj,$j,64855,Gn);else if(70==(0|In))Df=r,Gf=r,Hf=0|tp(Gf,64930),Br(Df,Hf,64941);else if(72==(0|In))Lf=r,Mf=r,Nf=0|tp(Mf,68905),Br(Lf,Nf,64963);else if(97==(0|In))kj=r,lj=r,mj=0|tp(lj,68855),nj=r,ng(dk,nj,il,1),d[Hn>>0]=0|d[dk>>0],d[Hn+1>>0]=0|d[dk+1>>0],d[Hn+2>>0]=0|d[dk+2>>0],d[Hn+3>>0]=0|d[dk+3>>0],d[Hn+4>>0]=0|d[dk+4>>0],d[Hn+5>>0]=0|d[dk+5>>0],d[Hn+6>>0]=0|d[dk+6>>0],d[Hn+7>>0]=0|d[dk+7>>0],Er(kj,mj,65009,Hn);else if(98==(0|In)){if(oj=ag<<24>>24!=0)return wj=en,l=Jn,0|wj;if(pj=sk,qj=en,sj=(0|pj)>(0|qj),!sj)return wj=en,l=Jn,0|wj;tj=r,uj=r,vj=0|tp(uj,68855),Br(tj,vj,64829)}return 0}function Mp(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i+8|0,d=b,e=d,f[g>>2]=0|f[c>>2],f[g+4>>2]=0|f[c+4>>2],Np(a,e,g,16,64878,64885),l=i}function Np(a,b,c,e,g,h){a|=0,b|=0,c|=0,e|=0,g|=0,h|=0;var i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,I=0;return I=l,l=l+64|0,(0|l)>=(0|m)&&X(),F=I+48|0,G=I,E=I+24|0,y=I+16|0,z=I+8|0,i=b,j=e,w=g,x=h,A=i,B=j,C=w,D=x,f[F>>2]=0|f[c>>2],f[F+4>>2]=0|f[c+4>>2],Gf(y,A,F,B,C,D),f[E>>2]=0|f[y>>2],f[E+4>>2]=0|f[y+4>>2],k=E+4|0,n=0|f[k>>2],(o=0==(0|n))?(p=0|f[E>>2],(q=0!=(0|p))?(f[a>>2]=0|f[E>>2],f[a+4>>2]=0|f[E+4>>2],void(l=I)):(r=i,s=i,t=0|tp(s,68905),u=i,v=w,qg(z,u,v),d[G>>0]=0|d[z>>0],d[G+1>>0]=0|d[z+1>>0],d[G+2>>0]=0|d[z+2>>0],d[G+3>>0]=0|d[z+3>>0],d[G+4>>0]=0|d[z+4>>0],d[G+5>>0]=0|d[z+5>>0],d[G+6>>0]=0|d[z+6>>0],d[G+7>>0]=0|d[z+7>>0],Er(r,t,64892,G),void 0)):(f[a>>2]=0|f[E>>2],f[a+4>>2]=0|f[E+4>>2],void(l=I))}function Op(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i+8|0,d=b,e=d,f[g>>2]=0|f[c>>2],f[g+4>>2]=0|f[c+4>>2],Np(a,e,g,14,64904,64910),l=i}function Pp(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i+8|0,d=b,e=d,f[g>>2]=0|f[c>>2],f[g+4>>2]=0|f[c+4>>2],Np(a,e,g,15,64917,64922),l=i}function Qp(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;return E=l,l=l+64|0,(0|l)>=(0|m)&&X(),A=E+56|0,c=E+48|0,z=E+40|0,C=E+8|0,B=E,q=E+24|0,y=E+16|0,g=a,r=b+4|0,s=0|f[r>>2],(t=4==(0|s))?(u=0|f[b>>2],e=u,p=e,l=E,0|p):(v=b+4|0,w=0|f[v>>2],x=16==(0|w),h=g,x||(f[A>>2]=0|f[b>>2],f[A+4>>2]=0|f[b+4>>2],Yj(y,h,A,68986,0,B),k=g,n=g,o=0|tp(n,68905),d[C>>0]=0|d[y>>0],d[C+1>>0]=0|d[y+1>>0],d[C+2>>0]=0|d[y+2>>0],d[C+3>>0]=0|d[y+3>>0],d[C+4>>0]=0|d[y+4>>0],d[C+5>>0]=0|d[y+5>>0],d[C+6>>0]=0|d[y+6>>0],d[C+7>>0]=0|d[y+7>>0],Er(k,o,68517,C)),i=g,f[z>>2]=0|f[b>>2],f[z+4>>2]=0|f[b+4>>2],Mp(q,i,z),f[c>>2]=0|f[q>>2],f[c+4>>2]=0|f[q+4>>2],j=0|mi(h,c),e=j,p=e,l=E,0|p)}function Rp(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;return v=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,j=c,k=d,n=e,o=e,p=0|Sp(o),q=j,r=0|Tp(k,n,p,q,1),t=r,s=t,(f=(0|s)<0)?(g=d,h=d,i=0|tp(h,68855),Br(g,i,65039),void 0):void(l=v)}function Sp(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0;if(y=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,p=0|f[c>>2],q=p>>>11,r=524288&q,s=0!=(0|r),!s)return o=b,l=y,0|o;for(t=b,u=t+20|0,v=0|f[u>>2],b=v;;){if(w=b,d=0|f[w>>2],e=d>>>11,g=1048576&e,h=0!=(0|g),i=1^h,!i)break;j=b,k=j+20|0,n=0|f[k>>2],b=n}return o=b,l=y,0|o}function Tp(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0;Ea=l,l=l+48|0,(0|l)>=(0|m)&&X(),h=a,u=b,F=c,Q=d,aa=e,la=u,wa=0|Sp(la),xa=wa+16|0,ya=0|f[xa>>2],Aa=ya;a:for(;;){if(i=Q,j=0!=(0|i),!j){Da=19;break}Ca=0,k=Q,n=0|f[k>>2],o=n>>>11,p=524288&o,q=0!=(0|p);do if(!q){if(r=Aa,s=0!=(0|r),s&&(t=Aa,v=Q,w=v+16|0,x=0|f[w>>2],y=(0|t)==(0|x))){Da=6;break a}for(z=u,A=z+20|0,B=0|f[A>>2],Ba=B;;){if(C=Ba,D=0!=(0|C),!D){Da=17;break}if(E=Ba,G=0|f[E>>2],H=255&G,I=11==(0|H),J=Ba,I){if(K=J+16|0,L=0|f[K>>2],M=Q,N=M+16|0,O=0|f[N>>2],P=(0|L)==(0|O))break}else if(U=0|f[J>>2],V=255&U,W=9==(0|V)){if(Y=aa,Z=0!=(0|Y),!Z){Da=17;break}Ca=1}$=Ba,_=$+20|0,ba=0|f[_>>2],Ba=ba}if(17==(0|Da)){Da=0,ca=h,da=Q,ea=F,fa=ea+20|0,ga=0|f[fa>>2],ha=0|Up(ca,da,ga),za=ha,ia=za,ja=F,ka=ja+20|0,f[ka>>2]=ia,ma=h,na=F,oa=F,pa=oa+20|0,qa=0|f[pa>>2],Yc(ma,na,qa),ra=za,F=ra;break}R=Ca,S=0!=(0|R),S||(T=Ba,F=T)}while(0);sa=Q,ta=sa+20|0,ua=0|f[ta>>2],Q=ua}return 6==(0|Da)?(g=-1,va=g,l=Ea,0|va):19==(0|Da)?(g=0,va=g,l=Ea,0|va):0}function Up(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,ma=0;ma=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,D=d,O=d,$=O+36|0,ga=0|f[$>>2],ha=0|Tc(D,11,ga),ka=ha,ia=e,ja=0|f[ia>>2],g=255&ja,h=11==(0|g),h&&(i=e,j=i+4|0,k=0|f[j>>2],e=k),n=e,o=0|f[n>>2],p=o>>>11,q=524288&p,r=0!=(0|q);a:do if(r)for(t=e,u=t+20|0,v=0|f[u>>2],e=v;;){if(w=e,x=0|f[w>>2],y=x>>>11,z=1048576&y,A=0!=(0|z),B=1^A,!B)break a;C=e,E=C+20|0,F=0|f[E>>2],e=F}while(0);return G=e,H=G+12|0,I=0|f[H>>2],J=ka,K=J+12|0,f[K>>2]=I,L=e,M=L+16|0,N=0|f[M>>2],P=ka,Q=P+16|0,f[Q>>2]=N,R=s,S=ka,T=S+20|0,f[T>>2]=R,U=e,V=0|f[U>>2],W=255&V,Y=11==(0|W),Z=e,Y?(_=Z+4|0,aa=0|f[_>>2],ba=ka,ca=ba+4|0,f[ca>>2]=aa,fa=ka,l=ma,0|fa):(da=ka,ea=da+4|0,f[ea>>2]=Z,fa=ka,l=ma,0|fa)}function Vp(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,pa=0;return pa=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,ma=0,D=e,O=0|f[D>>2],$=O>>>11,ia=524288&$,ja=0!=(0|ia),ja||(ka=d,la=e,g=0|Tc(ka,11,la),na=g,h=na,i=0|f[h>>2],j=i>>>11,k=1048576|j,n=0|f[h>>2],o=2097151&k,p=o<<11,q=2047&n,r=q|p,f[h>>2]=r,t=e,u=t+20|0,v=0|f[u>>2],w=na,x=w+20|0,f[x>>2]=v,y=na,z=e,A=z+20|0,f[A>>2]=y,B=e,C=B+16|0,E=0|f[C>>2],F=na,G=F+16|0,f[G>>2]=E,H=d,I=0|Zo(H),J=e,K=J+16|0,f[K>>2]=I,L=d,M=e,N=na,Yc(L,M,N),P=e,Q=0|f[P>>2],R=Q>>>11,S=524288|R,T=0|f[P>>2],U=2097151&S,V=U<<11,W=2047&T,Y=W|V,f[P>>2]=Y),Z=d,_=e,aa=e,ba=s,ca=0|Tp(Z,_,aa,ba,0),ma=ca,da=ma,(ea=(0|da)<0)?(fa=d,ga=d,ha=0|tp(ga,68855),Br(fa,ha,65063),void 0):void(l=pa)}function Wp(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,ra=0;switch(ra=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=ra+16|0,g=ra,e=b,t=c+4|0,E=0|f[t>>2],0|E){case 0:return P=c+4|0,_=0|f[P>>2],ka=0==(0|_),ka&&(ma=0|f[c>>2],na=0!=(0|ma),!na)?(oa=e,h=oa+76|0,i=0|f[h>>2],jp(a,i),void(l=ra)):(j=e,k=j+72|0,n=0|f[k>>2],jp(a,n),void(l=ra));case 2:return o=e,p=o+68|0,q=0|f[p>>2],jp(a,q),void(l=ra);case 7:return r=e,s=r+32|0,u=0|f[s>>2],jp(a,u),void(l=ra);case 6:case 3:case 4:v=e,w=e,x=0|tp(w,68905),Br(v,x,65087);break;default:return y=0|f[c>>2],pa=y,z=e,A=pa,Cp(z,A),B=e,C=B+12|0,D=0|f[C>>2],F=0!=(0|D),F&&(G=e,H=G+12|0,I=0|f[H>>2],J=I+16|0,K=0|f[J>>2],L=0!=(0|K),L&&(M=e,N=M+12|0,O=0|f[N>>2],Q=O+16|0,R=0|f[Q>>2],S=R+44|0,T=0|f[S>>2],U=0!=(0|T),U&&(V=e,W=pa,Y=W+4|0,Z=0|f[Y>>2],$=e,aa=0|ki($,64561,9),ba=e,ca=ba+12|0,da=0|f[ca>>2],ea=da+16|0,fa=0|f[ea>>2],ga=fa+44|0,ha=0|f[ga>>2],jp(g,ha),f[d>>2]=0|f[g>>2],f[d+4>>2]=0|f[g+4>>2],$i(V,Z,aa,d)))),ia=pa,ja=ia+4|0,la=0|f[ja>>2],jp(a,la),void(l=ra)}}function Xp(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,z=0;z=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=a,h=b,q=c,r=d,s=e,t=g,u=h,Cp(t,u),v=g,w=h,x=w+4|0,i=0|f[x>>2],j=g,k=q,n=0|li(j,k),o=r,p=s,Ip(v,i,n,o,p),l=z}function Yp(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;s=l,l=l+32|0,(0|l)>=(0|m)&&X(),f=a,g=b,h=c,i=d,j=e,k=f,n=g,o=h,p=i,q=j,Xp(k,n,o,p,q),l=s}function Zp(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;for(V=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,s=b,D=c,K=s,L=0|f[K>>2],Q=L;;){if(M=Q,N=0!=(0|M),!N)break;if(O=Q,P=O+16|0,g=0|f[P>>2],R=g,h=R,i=0!=(0|h),i&&(j=e,k=R,n=D,o=0|_o(j,k,n),S=o,p=S,q=R,r=0|f[q>>2],t=(0|p)!=(0|r))){U=5;break}G=Q,H=G+20|0,I=0|f[H>>2],Q=I}return 5==(0|U)&&(u=S,v=R,w=v+20|0,x=0|f[w>>2],y=x+(u<<2)|0,z=0|f[y>>2],T=z,A=T,B=0!=(0|A))?(C=Q,E=s,f[E>>2]=C,F=T,d=F,J=d,l=V,0|J):(d=0,J=d,l=V,0|J)}function $p(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,aa=0;return aa=l,l=l+96|0,(0|l)>=(0|m)&&X(),g=aa+88|0,e=aa+80|0,Z=aa+8|0,Y=aa,i=aa+72|0,V=aa+56|0,G=aa+48|0,P=aa+40|0,Q=aa+32|0,R=aa+24|0,h=a,f[i>>2]=b,v=c,S=h,T=v,U=0|Zp(S,i,T),W=U,j=W,(k=0!=(0|j))?(O=W,l=aa,0|O):(n=h,o=0|f[i>>2],jp(G,o),f[e>>2]=0|f[G>>2],f[e+4>>2]=0|f[G+4>>2],Yj(V,n,e,68986,0,Y),p=V+4|0,q=0|f[p>>2],r=16==(0|q),r&&(s=0|f[V>>2],t=0|f[s>>2],u=t>>>11,w=8&u,x=0!=(0|w),y=0|f[V>>2],x?(z=0|f[y>>2],A=z>>>11,B=496&A,C=B>>4,F=C):(D=y+12|0,E=0|f[D>>2],F=E),H=(0|F)>64,H&&(I=h,J=0|f[i>>2],jp(P,J),f[g>>2]=0|f[P>>2],f[g+4>>2]=0|f[P+4>>2],Jf(Q,I,g),f[V>>2]=0|f[Q>>2],f[V+4>>2]=0|f[Q+4>>2])),K=h,L=v,M=h,N=v,vi(R,M,N),d[Z>>0]=0|d[R>>0],d[Z+1>>0]=0|d[R+1>>0],d[Z+2>>0]=0|d[R+2>>0],d[Z+3>>0]=0|d[R+3>>0],d[Z+4>>0]=0|d[R+4>>0],d[Z+5>>0]=0|d[R+5>>0],d[Z+6>>0]=0|d[R+6>>0],d[Z+7>>0]=0|d[R+7>>0],$=Z+8|0,d[$>>0]=0|d[V>>0],d[$+1>>0]=0|d[V+1>>0],d[$+2>>0]=0|d[V+2>>0],d[$+3>>0]=0|d[V+3>>0],d[$+4>>0]=0|d[V+4>>0],d[$+5>>0]=0|d[V+5>>0],d[$+6>>0]=0|d[V+6>>0],d[$+7>>0]=0|d[V+7>>0],Fr(K,L,65110,Z),0)}function _p(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;B=l,l=l+96|0,(0|l)>=(0|m)&&X(),t=B+80|0,w=B+72|0,u=B+64|0,x=B,v=B+48|0,s=B+40|0,r=B+36|0,q=B+32|0,e=B+24|0,g=B+16|0,d=b,h=d,f[x>>2]=r,y=x+4|0,f[y>>2]=q,z=x+8|0,f[z>>2]=s,0|Lp(h,65145,x),i=d,f[u>>2]=0|f[c>>2],f[u+4>>2]=0|f[c+4>>2],aq(e,i,u),f[v>>2]=0|f[e>>2],f[v+4>>2]=0|f[e+4>>2],j=d,k=d,n=0|ki(k,68953,10),o=0|f[q>>2],p=0|f[r>>2],f[w>>2]=0|f[v>>2],f[w+4>>2]=0|f[v+4>>2],f[t>>2]=0|f[s>>2],f[t+4>>2]=0|f[s+4>>2],_j(g,j,w,n,o,p,t),f[a>>2]=0|f[v>>2],f[a+4>>2]=0|f[v+4>>2],l=B}function aq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;E=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=0|f[c>>2],A=e,s=A,t=0|f[s>>2],u=t>>>11,v=255&u,C=v,w=A,x=0|f[w>>2],y=255&x,z=12==(0|y),z&&(g=d,h=d,i=0|tp(h,68905),Br(g,i,65148)),j=C,k=0==(0|j),k&&(C=8),n=d,o=C,p=A,q=0|Tc(n,o,p),B=q,r=B,jp(a,r),l=E}function bq(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0;A=l,l=l+64|0,(0|l)>=(0|m)&&X(),y=A+56|0,g=A+48|0,x=A+24|0,r=A+16|0,s=A+8|0,t=A,h=b,i=c,p=d,q=e,u=h,v=i,jp(r,v),f[g>>2]=0|f[r>>2],f[g+4>>2]=0|f[r+4>>2],aq(s,u,g),f[x>>2]=0|f[s>>2],f[x+4>>2]=0|f[s+4>>2],w=h,j=h,k=0|ki(j,68953,10),n=p,o=q,f[y>>2]=0|f[x>>2],f[y+4>>2]=0|f[x+4>>2],Zj(t,w,y,k,n,o),f[a>>2]=0|f[x>>2],f[a+4>>2]=0|f[x+4>>2],l=A}function cq(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0;Pa=l,l=l+128|0,(0|l)>=(0|m)&&X(),Ea=Pa+120|0,La=Pa+112|0,Ka=Pa+104|0,Ja=Pa+96|0,Ia=Pa+88|0,Ha=Pa+80|0,Ma=Pa,Ga=Pa+56|0,u=Pa+48|0,F=Pa+40|0,Q=Pa+32|0,aa=Pa+24|0,la=Pa+16|0,g=a,h=b,wa=g,Ca=0|ki(wa,68986,7),Fa=Ca,Da=g,i=Da+12|0,j=0|f[i>>2],k=j+16|0,n=0|f[k>>2],o=g,p=o+12|0,q=0|f[p>>2],r=q+20|0,s=0|f[r>>2],t=n>>>0>s>>>0,t?(v=g,w=v+12|0,x=0|f[w>>2],y=x+16|0,z=0|f[y>>2],A=z+-48|0,B=0|f[A>>2],C=Fa,D=(0|B)==(0|C),D?(E=g,f[Ha>>2]=0|f[c>>2],f[Ha+4>>2]=0|f[c+4>>2],Jf(u,E,Ha),f[Ga>>2]=0|f[u>>2],f[Ga+4>>2]=0|f[u+4>>2]):Oa=4):Oa=4;do if(4==(0|Oa)){if(G=g,H=Fa,f[Ia>>2]=0|f[c>>2],f[Ia+4>>2]=0|f[c+4>>2],I=0|dq(G,Ia,H),J=255&I,K=0!=(0|J),K&&(L=g,M=L+12|0,N=0|f[M>>2],O=N+16|0,P=0|f[O>>2],R=g,S=R+12|0,T=0|f[S>>2],U=T+20|0,V=0|f[U>>2],W=P,Y=V,Z=W-Y|0,$=(0|Z)/48&-1,_=(0|$)<64)){if(ba=g,ca=Fa,f[Ja>>2]=0|f[c>>2],f[Ja+4>>2]=0|f[c+4>>2],Zj(F,ba,Ja,ca,0,0),f[Ga>>2]=0|f[F>>2],f[Ga+4>>2]=0|f[F+4>>2],da=Ga+4|0,ea=0|f[da>>2],fa=16==(0|ea),!fa)break;if(ga=0|f[Ga>>2],ha=0|f[ga>>2],ia=ha>>>11,ja=8&ia,ka=0!=(0|ja),ma=0|f[Ga>>2],ka?(na=0|f[ma>>2],oa=na>>>11,pa=496&oa,qa=pa>>4,ta=qa):(ra=ma+12|0,sa=0|f[ra>>2],ta=sa),ua=(0|ta)>64,!ua)break;va=g,f[Ka>>2]=0|f[c>>2],f[Ka+4>>2]=0|f[c+4>>2],Jf(Q,va,Ka),f[Ga>>2]=0|f[Q>>2],f[Ga+4>>2]=0|f[Q+4>>2];break}xa=g,f[La>>2]=0|f[c>>2],f[La+4>>2]=0|f[c+4>>2],Jf(aa,xa,La),f[Ga>>2]=0|f[aa>>2],f[Ga+4>>2]=0|f[aa+4>>2]}while(0);ya=g,za=h,Aa=g,Ba=h,vi(la,Aa,Ba),d[Ma>>0]=0|d[la>>0],d[Ma+1>>0]=0|d[la+1>>0],d[Ma+2>>0]=0|d[la+2>>0],d[Ma+3>>0]=0|d[la+3>>0],d[Ma+4>>0]=0|d[la+4>>0],d[Ma+5>>0]=0|d[la+5>>0],d[Ma+6>>0]=0|d[la+6>>0],d[Ma+7>>0]=0|d[la+7>>0],Na=Ma+8|0,d[Na>>0]=0|d[Ga>>0],d[Na+1>>0]=0|d[Ga+1>>0],d[Na+2>>0]=0|d[Ga+2>>0],d[Na+3>>0]=0|d[Ga+3>>0],d[Na+4>>0]=0|d[Ga+4>>0],d[Na+5>>0]=0|d[Ga+5>>0],d[Na+6>>0]=0|d[Ga+6>>0],d[Na+7>>0]=0|d[Ga+7>>0],f[Ea>>2]=0|f[e>>2],f[Ea+4>>2]=0|f[e+4>>2],Or(ya,za,Ea,65189,Ma)}function dq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),n=p+8|0,d=a,e=c,g=d,h=d,f[n>>2]=0|f[b>>2],f[n+4>>2]=0|f[b+4>>2],i=0|eq(h,n),j=e,k=0|fq(g,i,j),l=p,0|k}function eq(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,K=0;K=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,r=b+4|0,C=0|f[r>>2];a:do switch(0|C){case 0:if(D=0|f[b>>2],E=0!=(0|D),F=d,E){G=F+72|0,H=0|f[G>>2],c=H;break a}I=F+76|0,e=0|f[I>>2],c=e;break a;case 2:g=d,h=g+68|0,i=0|f[h>>2],c=i;break;case 4:j=d,k=j+80|0,n=0|f[k>>2],c=n;break;case 3:o=d,p=o+64|0,q=0|f[p>>2],c=q;break;case 6:s=d,t=s+60|0,u=0|f[t>>2],c=u;break;case 7:v=d,w=v+32|0,x=0|f[w>>2],c=x;break;case 20:c=0;break;default:y=0|f[b>>2],z=y+4|0,A=0|f[z>>2],c=A}while(0);return B=c,l=K,0|B}function fq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;for(N=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,s=b,D=c;;){if(E=s,F=0!=(0|E),!F){M=9;break}if(G=s,H=G+16|0,I=0|f[H>>2],K=I,J=K,g=0!=(0|J),g&&(h=e,i=K,j=D,k=0|_o(h,i,j),L=k,n=L,o=K,p=0|f[o>>2],q=(0|n)!=(0|p)))break;z=s,A=z+20|0,B=0|f[A>>2],s=B}return 9==(0|M)?(d=0,C=d,l=N,0|C):(r=L,t=K,u=t+20|0,v=0|f[u>>2],w=v+(r<<2)|0,x=0|f[w>>2],y=0!=(0|x),y?(d=1,C=d,l=N,0|C):(d=0,C=d,l=N,0|C))}function gq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0;if(Ka=l,l=l+192|0,(0|l)>=(0|m)&&X(),Ha=Ka+176|0,Ga=Ka+168|0,Fa=Ka+160|0,va=Ka+152|0,Ea=Ka+144|0,Da=Ka+136|0,d=Ka+128|0,Ca=Ka+120|0,Ba=Ka+112|0,Aa=Ka+96|0,t=Ka+80|0,xa=Ka+64|0,ua=Ka+56|0,E=Ka+48|0,P=Ka+40|0,_=Ka+32|0,ka=Ka+24|0,ra=Ka+16|0,sa=Ka+8|0,ta=Ka,e=b,g=c,h=e,i=0|ki(h,65218,13),wa=i,j=e,k=g,n=wa,Vi(t,j,k,n),f[Aa>>2]=0|f[t>>2],f[Aa+4>>2]=0|f[t+4>>2],o=Aa+4|0,p=0|f[o>>2],q=0==(0|p),q&&(r=0|f[Aa>>2],s=0!=(0|r),!s)){if(u=e,v=g,w=0|hp(u,v),za=w,x=e,y=g,z=za,A=0|Wj(x,y,z),Ia=A,B=Ia,C=0==(0|B))return Kp(a),void(l=Ka);D=za,F=0!=(0|D),F?(G=za,H=e,I=H+32|0,J=0|f[I>>2],K=(0|G)!=(0|J),K?(L=e,M=za,gq(ua,L,M),N=e,lg(E,N,0),f[Aa>>2]=0|f[E>>2],f[Aa+4>>2]=0|f[E+4>>2],O=ua+4|0,Q=0|f[O>>2],R=0==(0|Q),R?(S=0|f[ua>>2],T=0!=(0|S),T?Ja=10:(U=e,f[Ba>>2]=0|f[Aa>>2],f[Ba+4>>2]=0|f[Aa+4>>2],dh(P,U,Ba,65232,8),V=e,W=e,Y=za,Wg(_,W,Y),f[Ca>>2]=0|f[Aa>>2],f[Ca+4>>2]=0|f[Aa+4>>2],f[d>>2]=0|f[_>>2],f[d+4>>2]=0|f[_+4>>2],yg(V,Ca,d),Z=e,f[Da>>2]=0|f[Aa>>2],f[Da+4>>2]=0|f[Aa+4>>2],dh(ka,Z,Da,65241,1))):Ja=10,10==(0|Ja)&&($=e,f[Ea>>2]=0|f[Aa>>2],f[Ea+4>>2]=0|f[Aa+4>>2],f[va>>2]=0|f[ua>>2],f[va+4>>2]=0|f[ua+4>>2],yg($,Ea,va)),aa=e,f[Fa>>2]=0|f[Aa>>2],f[Fa+4>>2]=0|f[Aa+4>>2],dh(ra,aa,Fa,65243,2),ba=e,ca=Ia,da=0|si(ba,ca,xa),ya=da,ea=e,fa=ya,ga=0|f[xa>>2],f[Ga>>2]=0|f[Aa>>2],f[Ga+4>>2]=0|f[Aa+4>>2],dh(sa,ea,Ga,fa,ga)):Ja=12):Ja=12,12==(0|Ja)&&(ha=e,ia=Ia,ja=0|si(ha,ia,xa),ya=ja,la=e,ma=ya,na=0|f[xa>>2],ng(ta,la,ma,na),f[Aa>>2]=0|f[ta>>2],f[Aa+4>>2]=0|f[ta+4>>2]),oa=e,pa=g,qa=wa,f[Ha>>2]=0|f[Aa>>2],f[Ha+4>>2]=0|f[Aa+4>>2],$i(oa,pa,qa,Ha)}f[a>>2]=0|f[Aa>>2],f[a+4>>2]=0|f[Aa+4>>2],l=Ka}function hq(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,L=0;return L=l,l=l+64|0,(0|l)>=(0|m)&&X(),J=L+56|0,c=L+48|0,I=L+40|0,H=L+24|0,s=L+16|0,A=L+8|0,B=L,d=a,e=b,C=d,D=e,gq(H,C,D),E=H+4|0,F=0|f[E>>2],G=0==(0|F),G&&(g=0|f[H>>2],h=0!=(0|g),h||(i=d,rg(s,i,65232,8),f[H>>2]=0|f[s>>2],f[H+4>>2]=0|f[s+4>>2],j=d,k=d,n=e,Wg(A,k,n),f[I>>2]=0|f[H>>2],f[I+4>>2]=0|f[H+4>>2],f[c>>2]=0|f[A>>2],f[c+4>>2]=0|f[A+4>>2],yg(j,I,c),o=d,f[J>>2]=0|f[H>>2],f[J+4>>2]=0|f[H+4>>2],dh(B,o,J,65241,1))),p=0|f[H>>2],q=0|f[p>>2],r=q>>>11,t=8&r,u=0!=(0|t),v=0|f[H>>2],w=v+12|0,u?(z=w,l=L,0|z):(x=w+8|0,y=0|f[x>>2],z=y,l=L,0|z)}function iq(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,k=0;return k=l,l=l+16|0,(0|l)>=(0|m)&&X(),i=k+8|0,c=a,d=c,e=c,f[i>>2]=0|f[b>>2],f[i+4>>2]=0|f[b+4>>2],g=0|jq(e,i),h=0|hq(d,g),l=k,0|h}function jq(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,j=0;return j=l,l=l+16|0,(0|l)>=(0|m)&&X(),h=j+8|0,c=a,d=c,f[h>>2]=0|f[b>>2],f[h+4>>2]=0|f[b+4>>2],e=0|eq(d,h),g=0|yp(e),l=j,0|g}function kq(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;u=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,f=b,i=c,j=d,k=e,n=f,o=j,p=0|$p(k,n,o),s=p,q=e,r=f,g=i,h=s,Hp(q,r,g,h),l=u}function lq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,f=c,g=d,h=e,i=d,j=f,k=0|li(i,j),mq(g,h,k),l=o}function mq(a,b,c){a|=0,b|=0,c|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0;return A=l,l=l+48|0,(0|l)>=(0|m)&&X(),x=A,q=A+24|0,r=A+16|0,e=a,f=b,p=c,s=e,t=f,u=p,v=0|fq(s,t,u),w=v<<24>>24!=0,g=e,w?(n=f,o=p,Hp(g,n,o,0),void(l=A)):(h=p,i=e,j=p,vi(q,i,j),k=f,jp(r,k),d[x>>0]=0|d[q>>0],d[x+1>>0]=0|d[q+1>>0],d[x+2>>0]=0|d[q+2>>0],d[x+3>>0]=0|d[q+3>>0],d[x+4>>0]=0|d[q+4>>0],d[x+5>>0]=0|d[q+5>>0],d[x+6>>0]=0|d[q+6>>0],d[x+7>>0]=0|d[q+7>>0],y=x+8|0,d[y>>0]=0|d[r>>0],d[y+1>>0]=0|d[r+1>>0],d[y+2>>0]=0|d[r+2>>0],d[y+3>>0]=0|d[r+3>>0],d[y+4>>0]=0|d[r+4>>0],d[y+5>>0]=0|d[r+5>>0],d[y+6>>0]=0|d[r+6>>0],d[y+7>>0]=0|d[r+7>>0],Fr(g,h,65246,x),void 0)}function nq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;s=l,l=l+48|0,(0|l)>=(0|m)&&X(),d=s+32|0,i=s+8|0,j=s,e=a,g=b,h=c,k=e,n=e,o=g,jp(i,o),f[d>>2]=0|f[i>>2],f[d+4>>2]=0|f[i+4>>2],Wp(j,n,d),p=0|f[j>>2],q=h,lq(k,p,q),l=s}function oq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,aa=0;if(aa=l,l=l+64|0,(0|l)>=(0|m)&&X(),d=aa+48|0,W=aa+40|0,Z=aa,S=aa+32|0,R=aa+28|0,e=b,g=e,f[W>>2]=0|f[c>>2],f[W+4>>2]=0|f[c+4>>2],Hf(g,W,10),t=e,f[Z>>2]=S,$=Z+4|0,f[$>>2]=R,0|Lp(t,68114,Z),E=0|f[R>>2],K=0==(0|E))return f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=aa);for(T=0;;){if(L=T,M=0|f[R>>2],N=(0|L)<(0|M),!N)break;O=e,P=T,h=0|f[S>>2],i=h+(P<<3)|0,f[d>>2]=0|f[i>>2],f[d+4>>2]=0|f[i+4>>2],Hf(O,d,4),j=T,k=0|f[S>>2],n=k+(j<<3)|0,o=0|f[n>>2],V=o,p=0|f[c>>2],Y=p,q=e,r=Y,s=V,u=0|$p(q,r,s),U=u,v=e,w=Y,Cp(v,w),x=e,y=0|Wc(x),Q=y,z=e,A=Y,B=A+4|0,C=0|f[B>>2],D=V,F=U,Hp(z,C,D,F),G=e,H=Q,Xc(G,H),I=T,J=I+1|0,T=J}f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=aa}function pq(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,vd=0;vd=l,l=l+112|0,(0|l)>=(0|m)&&X(),g=vd+96|0,e=vd+88|0,d=vd+80|0,c=vd+72|0,b=vd+64|0,i=vd+32|0,ob=vd+24|0,Vb=vd+16|0,ec=vd+8|0,pc=vd,h=a,Ac=h,Lc=0|Bp(Ac,0),qd=Lc,Wc=h,fd=qd,j=0|Bp(Wc,fd),td=j,w=td,H=h,S=H+32|0,f[S>>2]=w,ca=h,na=td,ya=0|Bp(ca,na),sd=ya,Ja=sd,Ua=h,db=Ua+40|0,f[db>>2]=Ja,pb=h,Ab=sd,
+Lb=0|Bp(pb,Ab),rd=Lb,Ob=rd,Pb=h,Qb=Pb+36|0,f[Qb>>2]=Ob,Rb=rd,Sb=rd,Tb=Sb+4|0,f[Tb>>2]=Rb,Ub=sd,Wb=Ub+4|0,f[Wb>>2]=Rb,Xb=td,Yb=Xb+4|0,f[Yb>>2]=Rb,Zb=qd,$b=Zb+4|0,f[$b>>2]=Rb,_b=h,ac=qd,Cp(_b,ac),bc=h,cc=td,Cp(bc,cc),dc=h,fc=sd,Cp(dc,fc),gc=h,hc=rd,Cp(gc,hc),ic=h,jc=qd,kc=qd,jp(i,kc),f[b>>2]=0|f[i>>2],f[b+4>>2]=0|f[i+4>>2],Kj(ic,jc,65283,b),lc=h,mc=td,nc=qd,jp(ob,nc),f[c>>2]=0|f[ob>>2],f[c+4>>2]=0|f[ob+4>>2],Kj(lc,mc,65283,c),oc=h,qc=td,rc=td,jp(Vb,rc),f[d>>2]=0|f[Vb>>2],f[d+4>>2]=0|f[Vb+4>>2],Kj(oc,qc,65295,d),sc=h,tc=td,uc=sd,jp(ec,uc),f[e>>2]=0|f[ec>>2],f[e+4>>2]=0|f[ec+4>>2],Kj(sc,tc,65302,e),vc=h,wc=td,xc=rd,jp(pc,xc),f[g>>2]=0|f[pc>>2],f[g+4>>2]=0|f[pc+4>>2],Kj(vc,wc,65309,g),yc=h,zc=qd,Bc=h,Cc=0|ki(Bc,65283,11),op(yc,zc,Cc),Dc=h,Ec=td,Fc=h,Gc=0|ki(Fc,65295,6),op(Dc,Ec,Gc),Hc=h,Ic=sd,Jc=h,Kc=0|ki(Jc,65302,6),op(Hc,Ic,Kc),Mc=h,Nc=rd,Oc=h,Pc=0|ki(Oc,65309,5),op(Mc,Nc,Pc),Qc=h,Rc=h,Sc=Rc+32|0,Tc=0|f[Sc>>2],Uc=0|Dp(Qc,65315,Tc),Vc=h,Xc=Vc+44|0,f[Xc>>2]=Uc,Yc=h,Zc=Yc+44|0,$c=0|f[Zc>>2],_c=0|f[$c>>2],ad=_c>>>11,bd=ad&-256,cd=13|bd,dd=h,ed=dd+44|0,gd=0|f[ed>>2],hd=0|f[gd>>2],id=2097151&cd,jd=id<<11,kd=2047&hd,ld=kd|jd,f[gd>>2]=ld,md=rd,nd=0|f[md>>2],od=nd>>>11,pd=od&-256,k=9|pd,n=rd,o=0|f[n>>2],p=2097151&k,q=p<<11,r=2047&o,s=r|q,f[n>>2]=s,t=h,u=qd,Jp(t,u,68953,233,0),v=h,x=qd,Jp(v,x,65320,234,0),y=h,z=qd,Jp(y,z,65322,235,4096),A=h,B=rd,Yp(A,B,67683,236,8192),C=h,D=rd,Jp(C,D,65344,237,0),E=h,F=rd,Jp(E,F,67683,238,4096),G=h,I=rd,Jp(G,I,68953,239,8192),J=h,K=rd,Jp(J,K,64799,233,262144),L=sd,M=0|f[L>>2],N=M>>>11,O=N&-256,P=10|O,Q=sd,R=0|f[Q>>2],T=2097151&P,U=T<<11,V=2047&R,W=V|U,f[Q>>2]=W,Y=h,Z=sd,Jp(Y,Z,65355,240,262144),$=h,_=sd,Jp($,_,65424,241,262144),aa=h;ba=sd;Jp(aa,ba,65443,242,524288),da=h,ea=sd,Jp(da,ea,68155,243,262144),fa=h,ga=sd,Jp(fa,ga,68169,233,262144),ha=h,ia=sd,Jp(ha,ia,65462,244,4096),ja=h,ka=sd,Jp(ja,ka,65487,233,262144),la=h,ma=sd,Jp(la,ma,65470,245,262144),oa=h,pa=sd,Jp(oa,pa,65497,246,4096),qa=h,ra=sd,Jp(qa,ra,68944,247,262144),sa=h,ta=sd,Jp(sa,ta,65505,248,262144),ua=h,va=sd,Jp(ua,va,65530,249,4096),wa=h,xa=sd,Jp(wa,xa,65521,233,262144),za=h,Aa=sd,Jp(za,Aa,65541,250,0),Ba=h,Ca=sd,Jp(Ba,Ca,68953,251,0),Da=h,Ea=sd,Jp(Da,Ea,65561,252,4096),Fa=h,Ga=sd,Jp(Fa,Ga,65578,253,262144),Ha=h,Ia=sd,Jp(Ha,Ia,65594,249,4096),Ka=h,La=sd,Jp(Ka,La,65606,254,4096),Ma=h,Na=sd,Jp(Ma,Na,65622,255,4096),Oa=h,Pa=sd,Jp(Oa,Pa,65630,255,4096),Qa=h,Ra=sd,Jp(Qa,Ra,65640,255,4096),Sa=h,Ta=sd,Jp(Sa,Ta,65647,256,262144),Va=h,Wa=sd,Jp(Va,Wa,65730,257,4096),Xa=h,Ya=sd,Jp(Xa,Ya,65744,233,262144),Za=h,$a=sd,Jp(Za,$a,65789,258,4096),_a=h,ab=sd,Jp(_a,ab,65803,259,4096),bb=h,cb=sd,Jp(bb,cb,68977,260,0),eb=h,fb=sd,Jp(eb,fb,68986,260,0),gb=h,hb=sd,Jp(gb,hb,69642,261,4096),ib=h,jb=sd,Jp(ib,jb,65840,262,0),kb=h,lb=sd,Jp(kb,lb,69655,263,4096),mb=h,nb=sd,Jp(mb,nb,65850,264,270336),qb=h,rb=sd,Jp(qb,rb,65892,265,262144),sb=h,tb=sd,Jp(sb,tb,65902,266,524288),ub=h,vb=sd,Jp(ub,vb,65912,267,8192),wb=h,xb=sd,Jp(wb,xb,65922,268,262144),yb=h,zb=sd,Jp(yb,zb,65959,269,262144),Bb=h,Cb=sd,Jp(Bb,Cb,66029,270,262144),Db=h,Eb=sd,Jp(Db,Eb,66043,271,0),Fb=h,Gb=sd,Jp(Fb,Gb,69450,272,262144),Hb=h,Ib=sd,Yp(Hb,Ib,65912,273,4096),Jb=h,Kb=rd,lq(Jb,Kb,65505),Mb=h,Nb=rd,lq(Mb,Nb,68155),l=vd}function qq(a,b,c){a|=0,b|=0,c|=0;var d=0,f=0;f=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,Kp(a),l=f}function rq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=c+4|0,g=0|f[e>>2],h=0!=(0|g),i=1^h,j=1&i,k=255&j,sq(a,k),l=o}function sq(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=255&d,g=0!=(0|e),h=g?2:0,i=j+4|0,f[i>>2]=h,f[j>>2]=1,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function tq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,x=0;x=l,l=l+64|0,(0|l)>=(0|m)&&X(),d=x+48|0,r=x+40|0,t=x,s=x+32|0,p=x+28|0,q=x+24|0,g=x+16|0,e=b,h=e,f[t>>2]=s,u=t+4|0,f[u>>2]=p,v=t+8|0,f[v>>2]=q,0|Lp(h,65337,t),i=e,j=0|f[s>>2],k=e,n=0|f[q>>2],o=0|f[p>>2],Nn(g,k,n,o),f[r>>2]=0|f[c>>2],f[r+4>>2]=0|f[c+4>>2],f[d>>2]=0|f[g>>2],f[d+4>>2]=0|f[g+4>>2],cq(i,j,r,d),Kp(a),l=x}function uq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,K=0;K=l,l=l+80|0,(0|l)>=(0|m)&&X(),C=K+72|0,F=K+64|0,H=K,G=K+48|0,B=K+40|0,E=K+32|0,e=K+24|0,s=K+16|0,u=K+8|0,d=b,v=d,f[H>>2]=G,I=H+4|0,f[I>>2]=B,w=0|Lp(v,65340,H),D=w,x=D,y=0==(0|x),y&&(z=d,A=z+32|0,g=0|f[A>>2],jp(e,g),f[G>>2]=0|f[e>>2],f[G+4>>2]=0|f[e+4>>2]),h=d,i=0|f[G>>2],j=0|zp(h,i),jp(s,j),f[E>>2]=0|f[s>>2],f[E+4>>2]=0|f[s+4>>2],k=d,n=d,o=0|ki(n,68953,10),p=D,f[F>>2]=0|f[E>>2],f[F+4>>2]=0|f[E+4>>2],f[C>>2]=0|f[B>>2],f[C+4>>2]=0|f[B+4>>2],_j(u,k,F,o,p,G,C),q=d,r=0|f[G>>2],t=0|f[E>>2],Fp(q,r,t),f[a>>2]=0|f[E>>2],f[a+4>>2]=0|f[E+4>>2],l=K}function vq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;for(B=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=0|f[c>>2],z=e,r=z,s=0|Sp(r),t=s+20|0,u=0|f[t>>2],z=u;;){if(v=z,w=0!=(0|v),w?(x=z,y=0|f[x>>2],g=255&y,h=11==(0|g),q=h):q=0,i=z,!q)break;j=0|Sp(i),k=j+20|0,n=0|f[k>>2],z=n}return o=0!=(0|i),o?(p=z,jp(a,p),void(l=B)):(Kp(a),void(l=B))}function wq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,x=0;return x=l,l=l+64|0,(0|l)>=(0|m)&&X(),t=x+48|0,s=x+40|0,u=x,q=x+24|0,r=x+16|0,e=x+8|0,d=b,g=d,f[u>>2]=q,v=u+4|0,f[v>>2]=r,0|Lp(g,65340,u),h=r+4|0,i=0|f[h>>2],j=0==(0|i),j&&(k=0|f[r>>2],n=0!=(0|k),!n)?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=x)):(o=d,p=0|f[c>>2],f[s>>2]=0|f[r>>2],f[s+4>>2]=0|f[r+4>>2],f[t>>2]=0|f[c>>2],f[t+4>>2]=0|f[c+4>>2],Ck(e,o,s,1,c,t,p),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=x))}function xq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;r=l,l=l+32|0,(0|l)>=(0|m)&&X(),o=r+16|0,p=r,n=r+4|0,d=b,e=d,f[p>>2]=n,0|Lp(e,68285,p),g=d,h=0|f[n>>2],yq(g,h),i=d,j=0|f[n>>2],f[o>>2]=0|f[c>>2],f[o+4>>2]=0|f[c+4>>2],k=0|Bj(i,o,j),sq(a,k),l=r}function yq(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=n+16|0,g=n,d=a,e=b,h=d,i=d,j=e,vi(g,i,j),f[c>>2]=0|f[g>>2],f[c+4>>2]=0|f[g+4>>2],zq(h,c),l=n}function zq(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,Y=0;return Y=l,l=l+32|0,(0|l)>=(0|m)&&X(),U=Y+24|0,V=Y,c=a,e=0|f[b>>2],s=0|f[e>>2],D=s>>>11,M=8&D,N=0!=(0|M),O=0|f[b>>2],P=O+12|0,N?g=P:(Q=P+8|0,R=0|f[Q>>2],g=R),T=g,h=0|f[b>>2],i=0|f[h>>2],j=i>>>11,k=8&j,n=0!=(0|k),o=0|f[b>>2],n?(p=0|f[o>>2],q=p>>>11,r=496&q,t=r>>4,w=t):(u=o+12|0,v=0|f[u>>2],w=v),S=w,x=S,y=(0|x)<3,!y&&(z=T,A=0|d[z>>0],B=A<<24>>24,C=64==(0|B),C&&(E=T,F=E+1|0,G=0|d[F>>0],H=G<<24>>24,I=64==(0|H)))?void(l=Y):(J=c,K=c,f[U>>2]=0|f[b>>2],f[U+4>>2]=0|f[b+4>>2],L=0|mi(K,U),d[V>>0]=0|d[b>>0],d[V+1>>0]=0|d[b+1>>0],d[V+2>>0]=0|d[b+2>>0],d[V+3>>0]=0|d[b+3>>0],d[V+4>>0]=0|d[b+4>>0],d[V+5>>0]=0|d[b+5>>0],d[V+6>>0]=0|d[b+6>>0],d[V+7>>0]=0|d[b+7>>0],void Fr(J,L,65379,V))}function Aq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;q=l,l=l+32|0,(0|l)>=(0|m)&&X(),n=q+16|0,o=q,k=q+4|0,d=b,e=d,f[o>>2]=k,0|Lp(e,68285,o),g=d,h=0|f[k>>2],yq(g,h),i=d,j=0|f[k>>2],f[n>>2]=0|f[c>>2],f[n+4>>2]=0|f[c+4>>2],xj(a,i,n,j),l=q}function Bq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;t=l,l=l+48|0,(0|l)>=(0|m)&&X(),p=t+40|0,n=t+32|0,q=t,o=t+16|0,k=t+8|0,d=b,e=d,f[q>>2]=k,r=q+4|0,f[r>>2]=o,0|Lp(e,68331,q),g=d,h=0|f[k>>2],yq(g,h),i=d,j=0|f[k>>2],f[n>>2]=0|f[c>>2],f[n+4>>2]=0|f[c+4>>2],f[p>>2]=0|f[o>>2],f[p+4>>2]=0|f[o+4>>2],zj(i,n,j,p),f[a>>2]=0|f[o>>2],f[a+4>>2]=0|f[o+4>>2],l=t}function Cq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;t=l,l=l+48|0,(0|l)>=(0|m)&&X(),q=t+40|0,o=t+32|0,r=t,p=t+16|0,e=t+8|0,d=b,g=d,f[o>>2]=0|f[c>>2],f[o+4>>2]=0|f[c+4>>2],Hf(g,o,10),h=d,f[r>>2]=p,0|Lp(h,68900,r),i=d,j=d,f[q>>2]=0|f[p>>2],f[q+4>>2]=0|f[p+4>>2],Wp(e,j,q),k=0|f[e>>2],n=0|f[c>>2],Rp(i,k,n),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=t}function Dq(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0;for(Q=l,l=l+80|0,(0|l)>=(0|m)&&X(),h=Q+72|0,g=Q+64|0,e=Q+56|0,N=Q+16|0,M=Q+8|0,L=Q,J=Q+48|0,I=Q+44|0,j=Q+32|0,w=Q+24|0,i=b,B=i,f[L>>2]=J,O=L+4|0,f[O>>2]=I,0|Lp(B,68114,L),K=0;;){if(C=K,D=0|f[I>>2],E=(0|C)<(0|D),!E)break;F=i,G=K,H=0|f[J>>2],k=H+(G<<3)|0,f[e>>2]=0|f[k>>2],f[e+4>>2]=0|f[k+4>>2],Hf(F,e,10),n=K,o=n+1|0,K=o}for(;;){if(p=0|f[I>>2],q=p+-1|0,f[I>>2]=q,r=0!=(0|p),!r)break;s=i,t=0|f[I>>2],u=0|f[J>>2],v=u+(t<<3)|0,d[M>>0]=0|d[c>>0],d[M+1>>0]=0|d[c+1>>0],d[M+2>>0]=0|d[c+2>>0],d[M+3>>0]=0|d[c+3>>0],d[M+4>>0]=0|d[c+4>>0],d[M+5>>0]=0|d[c+5>>0],d[M+6>>0]=0|d[c+6>>0],d[M+7>>0]=0|d[c+7>>0],f[g>>2]=0|f[v>>2],f[g+4>>2]=0|f[v+4>>2],Yj(j,s,g,65470,1,M),x=i,y=0|f[I>>2],z=0|f[J>>2],A=z+(y<<3)|0,d[N>>0]=0|d[c>>0],d[N+1>>0]=0|d[c+1>>0],d[N+2>>0]=0|d[c+2>>0],d[N+3>>0]=0|d[c+3>>0],d[N+4>>0]=0|d[c+4>>0],d[N+5>>0]=0|d[c+5>>0],d[N+6>>0]=0|d[c+6>>0],d[N+7>>0]=0|d[c+7>>0],f[h>>2]=0|f[A>>2],f[h+4>>2]=0|f[A+4>>2],Yj(w,x,h,65487,1,N)}f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=Q}function Eq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;q=l,l=l+32|0,(0|l)>=(0|m)&&X(),n=q+24|0,o=q,k=q+8|0,d=b,e=d,f[n>>2]=0|f[c>>2],f[n+4>>2]=0|f[c+4>>2],Hf(e,n,10),g=d,f[o>>2]=k,0|Lp(g,68256,o),h=d,i=0|f[k>>2],j=0|f[c>>2],Vp(h,i,j),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=q}function Fq(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0;for(Q=l,l=l+80|0,(0|l)>=(0|m)&&X(),h=Q+72|0,g=Q+64|0,e=Q+56|0,N=Q+16|0,M=Q+8|0,L=Q,J=Q+48|0,I=Q+44|0,j=Q+32|0,w=Q+24|0,i=b,B=i,f[L>>2]=J,O=L+4|0,f[O>>2]=I,0|Lp(B,68114,L),K=0;;){if(C=K,D=0|f[I>>2],E=(0|C)<(0|D),!E)break;F=i,G=K,H=0|f[J>>2],k=H+(G<<3)|0,f[e>>2]=0|f[k>>2],f[e+4>>2]=0|f[k+4>>2],Hf(F,e,10),n=K,o=n+1|0,K=o}for(;;){if(p=0|f[I>>2],q=p+-1|0,f[I>>2]=q,r=0!=(0|p),!r)break;s=i,t=0|f[I>>2],u=0|f[J>>2],v=u+(t<<3)|0,d[M>>0]=0|d[c>>0],d[M+1>>0]=0|d[c+1>>0],d[M+2>>0]=0|d[c+2>>0],d[M+3>>0]=0|d[c+3>>0],d[M+4>>0]=0|d[c+4>>0],d[M+5>>0]=0|d[c+5>>0],d[M+6>>0]=0|d[c+6>>0],d[M+7>>0]=0|d[c+7>>0],f[g>>2]=0|f[v>>2],f[g+4>>2]=0|f[v+4>>2],Yj(j,s,g,65505,1,M),x=i,y=0|f[I>>2],z=0|f[J>>2],A=z+(y<<3)|0,d[N>>0]=0|d[c>>0],d[N+1>>0]=0|d[c+1>>0],d[N+2>>0]=0|d[c+2>>0],d[N+3>>0]=0|d[c+3>>0],d[N+4>>0]=0|d[c+4>>0],d[N+5>>0]=0|d[c+5>>0],d[N+6>>0]=0|d[c+6>>0],d[N+7>>0]=0|d[c+7>>0],f[h>>2]=0|f[A>>2],f[h+4>>2]=0|f[A+4>>2],Yj(w,x,h,65521,1,N)}f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=Q}function Gq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;for(D=l,l=l+32|0,(0|l)>=(0|m)&&X(),A=D+24|0,B=D,z=D+8|0,d=b,e=0|f[c>>2],y=e,q=d,f[B>>2]=z,0|Lp(q,68256,B),r=d,f[A>>2]=0|f[z>>2],f[A+4>>2]=0|f[z+4>>2],Hf(r,A,10);;){if(s=y,t=0!=(0|s),!t){C=7;break}if(u=y,v=0|f[u>>2],w=255&v,x=11==(0|w),x&&(g=y,h=g+4|0,i=0|f[h>>2],j=0|f[z>>2],k=(0|i)==(0|j))){C=5;break}n=y,o=n+20|0,p=0|f[o>>2],y=p}return 5==(0|C)?(Hq(a),void(l=D)):7==(0|C)?(Iq(a),void(l=D)):void 0}function Hq(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=2,f[c>>2]=1,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Iq(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=1,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Jq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;q=l,l=l+32|0,(0|l)>=(0|m)&&X(),n=q+24|0,o=q,k=q+8|0,d=b,e=d,f[n>>2]=0|f[c>>2],f[n+4>>2]=0|f[c+4>>2],Hf(e,n,10),g=d,f[o>>2]=k,0|Lp(g,68256,o),h=d,i=0|f[k>>2],j=0|f[c>>2],Rp(h,i,j),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=q}function Kq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,ea=0;ea=l,l=l+64|0,(0|l)>=(0|m)&&X(),d=ea+48|0,ca=ea+40|0,ba=ea+24|0,g=ea+8|0,t=ea,e=b,E=0|f[c>>2],_=E,P=_,aa=P,V=aa,W=0|f[V>>2],Y=W>>>11,Z=524288&Y,$=0!=(0|Z);a:do if($)for(h=aa,i=h+20|0,j=0|f[i>>2],aa=j;;){if(k=aa,n=0|f[k>>2],o=n>>>11,p=1048576&o,q=0!=(0|p),r=1^q,!r)break a;s=aa,u=s+20|0,v=0|f[u>>2],aa=v}while(0);for(w=e,Mn(g,w),f[ba>>2]=0|f[g>>2],f[ba+4>>2]=0|f[g+4>>2];;){if(x=_,y=0!=(0|x),!y)break;z=_,A=aa,B=(0|z)!=(0|A),B&&(C=_,D=0|f[C>>2],F=255&D,G=11==(0|F),G&&(H=_,I=H+4|0,J=0|f[I>>2],K=0|f[J>>2],L=255&K,M=10==(0|L),M&&(N=e,O=_,Q=O+4|0,R=0|f[Q>>2],jp(t,R),f[ca>>2]=0|f[ba>>2],f[ca+4>>2]=0|f[ba+4>>2],f[d>>2]=0|f[t>>2],f[d+4>>2]=0|f[t+4>>2],$n(N,ca,d)))),S=_,T=S+20|0,U=0|f[T>>2],_=U}f[a>>2]=0|f[ba>>2],f[a+4>>2]=0|f[ba+4>>2],l=ea}function Lq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,z=0;return z=l,l=l+64|0,(0|l)>=(0|m)&&X(),w=z+48|0,u=z+40|0,x=z,t=z+24|0,e=z+8|0,d=b,j=0|f[c>>2],v=j,k=d,n=v,mp(k,n),o=d,f[x>>2]=t,0|Lp(o,65558,x),p=t+4|0,q=0|f[p>>2],r=0==(0|q),r&&(s=0|f[t>>2],g=0!=(0|s),!g)?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=z)):(h=d,i=v,f[u>>2]=0|f[t>>2],f[u+4>>2]=0|f[t+4>>2],f[w>>2]=0|f[c>>2],f[w+4>>2]=0|f[c+4>>2],Ck(e,h,u,1,c,w,i),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=z))}function Mq(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;r=l,l=l+16|0,(0|l)>=(0|m)&&X(),p=r,o=r+12|0,e=b,g=0|f[c>>2],n=g,d[o>>0]=1,h=e,f[p>>2]=o,0|Lp(h,68376,p),i=e,j=0|d[o>>0],k=n,us(a,i,j,k,0),l=r}function Nq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+16|0,(0|l)>=(0|m)&&X(),n=p,k=p+4|0,d=b,e=d,f[n>>2]=k,0|Lp(e,68285,n),g=d,h=0|f[c>>2],i=0|f[k>>2],j=0|fq(g,h,i),sq(a,j),l=p}function Oq(a,b,c){a|=0,b|=0,c|=0;var d=0,g=0;g=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=g}function Pq(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,L=0;return L=l,l=l+112|0,(0|l)>=(0|m)&&X(),D=L+96|0,C=L+88|0,H=L+24|0,G=L+8|0,F=L,E=L+72|0,B=L+64|0,g=L+56|0,t=L+48|0,u=L+40|0,e=b,v=e,f[F>>2]=B,0|Lp(v,68285,F),w=e,x=0|f[B>>2],yq(w,x),y=e,z=0|f[B>>2],f[C>>2]=0|f[c>>2],f[C+4>>2]=0|f[c+4>>2],mj(g,y,C,z),f[E>>2]=0|f[g>>2],f[E+4>>2]=0|f[g+4>>2],A=E+4|0,h=0|f[A>>2],(i=5==(0|h))?(j=e,k=0|f[B>>2],f[D>>2]=0|f[c>>2],f[D+4>>2]=0|f[c+4>>2],n=0|Bj(j,D,k),o=n<<24>>24!=0,p=e,q=0|f[B>>2],r=e,s=0|f[B>>2],void(o?(vi(t,r,s),d[G>>0]=0|d[t>>0],d[G+1>>0]=0|d[t+1>>0],d[G+2>>0]=0|d[t+2>>0],d[G+3>>0]=0|d[t+3>>0],d[G+4>>0]=0|d[t+4>>0],d[G+5>>0]=0|d[t+5>>0],d[G+6>>0]=0|d[t+6>>0],d[G+7>>0]=0|d[t+7>>0],I=G+8|0,d[I>>0]=0|d[c>>0],d[I+1>>0]=0|d[c+1>>0],d[I+2>>0]=0|d[c+2>>0],d[I+3>>0]=0|d[c+3>>0],d[I+4>>0]=0|d[c+4>>0],d[I+5>>0]=0|d[c+5>>0],d[I+6>>0]=0|d[c+6>>0],d[I+7>>0]=0|d[c+7>>0],Fr(p,q,65669,G)):(vi(u,r,s),d[H>>0]=0|d[u>>0],d[H+1>>0]=0|d[u+1>>0],d[H+2>>0]=0|d[u+2>>0],d[H+3>>0]=0|d[u+3>>0],d[H+4>>0]=0|d[u+4>>0],d[H+5>>0]=0|d[u+5>>0],d[H+6>>0]=0|d[u+6>>0],d[H+7>>0]=0|d[u+7>>0],J=H+8|0,d[J>>0]=0|d[c>>0],d[J+1>>0]=0|d[c+1>>0],d[J+2>>0]=0|d[c+2>>0],d[J+3>>0]=0|d[c+3>>0],d[J+4>>0]=0|d[c+4>>0],d[J+5>>0]=0|d[c+5>>0],d[J+6>>0]=0|d[c+6>>0],d[J+7>>0]=0|d[c+7>>0],Fr(p,q,65693,H)))):(f[a>>2]=0|f[E>>2],f[a+4>>2]=0|f[E+4>>2],void(l=L))}function Qq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;for(w=l,l=l+32|0,(0|l)>=(0|m)&&X(),s=w+24|0,t=w,q=w+12|0,r=w+8|0,d=b,e=d,f[t>>2]=r,u=t+4|0,f[u>>2]=q,0|Lp(e,68114,t);;){if(g=0|f[q>>2],h=g+-1|0,f[q>>2]=h,i=0!=(0|g),!i)break;j=d,k=0|f[r>>2],n=0|f[k>>2],f[s>>2]=0|f[c>>2],f[s+4>>2]=0|f[c+4>>2],Rq(j,s,n),o=0|f[r>>2],p=o+8|0,f[r>>2]=p}f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=w}function Rq(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0;return S=l,l=l+80|0,(0|l)>=(0|m)&&X(),N=S+72|0,P=S+8|0,O=S,t=S+40|0,D=S+32|0,E=S+24|0,e=a,g=c,F=0|f[b>>2],K=F,G=K,H=0|Sp(G),I=H+16|0,J=0|f[I>>2],L=J,h=L,i=0!=(0|h),i&&(j=e,k=L,n=g,o=0|_o(j,k,n),M=o,p=M,q=L,r=0|f[q>>2],s=(0|p)!=(0|r))?(u=e,v=L,w=M,cp(u,v,w),x=e,y=g,pp(t,y),d[O>>0]=0|d[t>>0],d[O+1>>0]=0|d[t+1>>0],d[O+2>>0]=0|d[t+2>>0],d[O+3>>0]=0|d[t+3>>0],d[O+4>>0]=0|d[t+4>>0],d[O+5>>0]=0|d[t+5>>0],d[O+6>>0]=0|d[t+6>>0],d[O+7>>0]=0|d[t+7>>0],f[N>>2]=0|f[b>>2],f[N+4>>2]=0|f[b+4>>2],Yj(D,x,N,65744,1,O),void(l=S)):(z=e,A=g,B=e,C=g,vi(E,B,C),d[P>>0]=0|d[E>>0],d[P+1>>0]=0|d[E+1>>0],d[P+2>>0]=0|d[E+2>>0],d[P+3>>0]=0|d[E+3>>0],d[P+4>>0]=0|d[E+4>>0],d[P+5>>0]=0|d[E+5>>0],d[P+6>>0]=0|d[E+6>>0],d[P+7>>0]=0|d[E+7>>0],Q=P+8|0,d[Q>>0]=0|d[b>>0],d[Q+1>>0]=0|d[b+1>>0],d[Q+2>>0]=0|d[b+2>>0],d[Q+3>>0]=0|d[b+3>>0],d[Q+4>>0]=0|d[b+4>>0],d[Q+5>>0]=0|d[b+5>>0],d[Q+6>>0]=0|d[b+6>>0],d[Q+7>>0]=0|d[b+7>>0],void Fr(z,A,65759,P))}function Sq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,va=0;for(va=l,l=l+144|0,(0|l)>=(0|m)&&X(),qa=va+128|0,ma=va+120|0,pa=va+112|0,oa=va+104|0,d=va+96|0,sa=va,ha=va+84|0,ga=va+80|0,la=va+64|0,na=va+56|0,g=va+40|0,t=va+32|0,E=va+24|0,P=va+16|0,_=va+8|0,e=b,ba=0|f[c>>2],ia=ba,ca=e,f[sa>>2]=ha,ta=sa+4|0,f[ta>>2]=ga,0|Lp(ca,68114,sa),da=e,ea=0|Wc(da),fa=ea,ja=0;;){if(h=ja,i=0|f[ga>>2],j=(0|h)<(0|i),!j)break;k=e,n=ja,o=0|f[ha>>2],p=o+(n<<3)|0,f[d>>2]=0|f[p>>2],f[d+4>>2]=0|f[p+4>>2],q=0|Qp(k,d),ka=q,r=e,s=ka,vi(g,r,s),f[la>>2]=0|f[g>>2],f[la+4>>2]=0|f[g+4>>2],u=e,v=0|f[la>>2],w=0|f[v>>2],x=w>>>11,y=8&x,z=0!=(0|y),A=0|f[la>>2],z?(B=0|f[A>>2],C=B>>>11,D=496&C,F=D>>4,J=F):(G=A+12|0,H=0|f[G>>2],J=H),I=J+1|0,lg(t,u,I),f[na>>2]=0|f[t>>2],f[na+4>>2]=0|f[t+4>>2],K=e,f[oa>>2]=0|f[na>>2],f[oa+4>>2]=0|f[na+4>>2],dh(E,K,oa,65801,1),L=e,f[pa>>2]=0|f[na>>2],f[pa+4>>2]=0|f[na+4>>2],f[ma>>2]=0|f[la>>2],f[ma+4>>2]=0|f[la+4>>2],gh(P,L,pa,ma),M=e,f[qa>>2]=0|f[na>>2],f[qa+4>>2]=0|f[na+4>>2],N=0|mi(M,qa),ra=N,O=e,Q=ra,gj(O,Q),R=ra,pp(_,R),f[la>>2]=0|f[_>>2],f[la+4>>2]=0|f[_+4>>2],S=e,T=ia,U=ka,V=e,W=0|nt(V,274,1,la),Hp(S,T,U,W),Y=e,Z=fa,Xc(Y,Z),$=ja,aa=$+1|0,ja=aa}Kp(a),l=va}function Tq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+32|0,(0|l)>=(0|m)&&X(),n=p+24|0,k=p+16|0,j=p,d=b,e=d,ot(j,e,0),g=d,h=d,f[k>>2]=0|f[j>>2],f[k+4>>2]=0|f[j+4>>2],i=0|Qp(h,k),f[n>>2]=0|f[c>>2],f[n+4>>2]=0|f[c+4>>2],Yi(a,g,n,i),l=p}function Uq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Va=0;for(Va=l,l=l+208|0,(0|l)>=(0|m)&&X(),Qa=Va+192|0,Pa=Va+184|0,Ja=Va+176|0,Oa=Va+168|0,Na=Va+160|0,Ia=Va+152|0,Ma=Va+144|0,La=Va+136|0,d=Va+128|0,Sa=Va,Ca=Va+116|0,Ba=Va+112|0,Ha=Va+96|0,Ka=Va+88|0,Da=Va+80|0,g=Va+64|0,t=Va+56|0,E=Va+48|0,P=Va+40|0,_=Va+32|0,ka=Va+24|0,va=Va+16|0,ya=Va+8|0,e=b,za=0|f[c>>2],Ea=za,h=e,f[Sa>>2]=Ca,Ta=Sa+4|0,f[Ta>>2]=Ba,0|Lp(h,68114,Sa),i=e,j=0|Wc(i),Aa=j,Fa=0;;){if(k=Fa,n=0|f[Ba>>2],o=(0|k)<(0|n),!o)break;p=e,q=Fa,r=0|f[Ca>>2],s=r+(q<<3)|0,f[d>>2]=0|f[s>>2],f[d+4>>2]=0|f[s+4>>2],u=0|Qp(p,d),Ga=u,v=e,w=Ga,vi(g,v,w),f[Ha>>2]=0|f[g>>2],f[Ha+4>>2]=0|f[g+4>>2],x=e,y=0|f[Ha>>2],z=0|f[y>>2],A=z>>>11,B=8&A,C=0!=(0|B),D=0|f[Ha>>2],C?(F=0|f[D>>2],G=F>>>11,H=496&G,I=H>>4,M=I):(J=D+12|0,K=0|f[J>>2],M=K),L=M+1|0,lg(t,x,L),f[Ka>>2]=0|f[t>>2],f[Ka+4>>2]=0|f[t+4>>2],N=e,f[La>>2]=0|f[Ka>>2],f[La+4>>2]=0|f[Ka+4>>2],dh(E,N,La,65801,1),O=e,f[Ma>>2]=0|f[Ka>>2],f[Ma+4>>2]=0|f[Ka+4>>2],f[Ia>>2]=0|f[Ha>>2],f[Ia+4>>2]=0|f[Ha+4>>2],gh(P,O,Ma,Ia),Q=e,f[Na>>2]=0|f[Ka>>2],f[Na+4>>2]=0|f[Ka+4>>2],R=0|mi(Q,Na),Ra=R,S=e,T=Ra,gj(S,T),U=Ra,pp(_,U),f[Da>>2]=0|f[_>>2],f[Da+4>>2]=0|f[_+4>>2],V=e,W=0|f[Ka>>2],Y=0|f[W>>2],Z=Y>>>11,$=8&Z,aa=0!=(0|$),ba=0|f[Ka>>2],aa?(ca=0|f[ba>>2],da=ca>>>11,ea=496&da,fa=ea>>4,ia=fa):(ga=ba+12|0,ha=0|f[ga>>2],ia=ha),lg(ka,V,ia),f[Ka>>2]=0|f[ka>>2],f[Ka+4>>2]=0|f[ka+4>>2],ja=e,f[Oa>>2]=0|f[Ka>>2],f[Oa+4>>2]=0|f[Ka+4>>2],f[Ja>>2]=0|f[Ha>>2],f[Ja+4>>2]=0|f[Ha+4>>2],gh(va,ja,Oa,Ja),la=e,f[Pa>>2]=0|f[Ka>>2],f[Pa+4>>2]=0|f[Ka+4>>2],dh(ya,la,Pa,65815,1),ma=e,f[Qa>>2]=0|f[Ka>>2],f[Qa+4>>2]=0|f[Ka+4>>2],na=0|mi(ma,Qa),Ga=na,oa=e,pa=Ea,qa=Ga,ra=e,sa=0|nt(ra,275,1,Da),Hp(oa,pa,qa,sa),ta=e,ua=Aa,Xc(ta,ua),wa=Fa,xa=wa+1|0,Fa=xa}Kp(a),l=Va}function Vq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;t=l,l=l+64|0,(0|l)>=(0|m)&&X(),q=t+48|0,o=t+40|0,n=t+32|0,r=t,k=t+16|0,p=t+8|0,d=b,e=d,ot(k,e,0),g=d,f[r>>2]=p,0|Lp(g,68900,r),h=d,i=d,f[n>>2]=0|f[k>>2],f[n+4>>2]=0|f[k+4>>2],j=0|Qp(i,n),f[o>>2]=0|f[c>>2],f[o+4>>2]=0|f[c+4>>2],f[q>>2]=0|f[p>>2],f[q+4>>2]=0|f[p+4>>2],cj(h,o,j,q),f[a>>2]=0|f[p>>2],f[a+4>>2]=0|f[p+4>>2],l=t}function Wq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,pa=0;if(pa=l,l=l+240|0,(0|l)>=(0|m)&&X(),ea=pa+232|0,g=pa+224|0,ka=pa+216|0,ja=pa+208|0,ia=pa+200|0,ha=pa+192|0,ga=pa+184|0,e=pa+176|0,fa=pa+168|0,na=pa+160|0,d=pa+152|0,da=pa+144|0,ma=pa+136|0,aa=pa+128|0,ca=pa+112|0,la=pa+104|0,i=pa+96|0,v=pa+88|0,G=pa+80|0,R=pa+72|0,V=pa+64|0,ba=pa+48|0,W=pa+40|0,Y=pa+32|0,Z=pa+24|0,$=pa+16|0,j=pa+8|0,k=pa,h=b,n=c+4|0,o=0|f[n>>2],p=12==(0|o),q=h,p){switch(r=h,s=0|ki(r,67899,12),f[aa>>2]=0|f[c>>2],f[aa+4>>2]=0|f[c+4>>2],Yi(la,q,aa,s),t=h,rg(i,t,65232,8),f[ca>>2]=0|f[i>>2],f[ca+4>>2]=0|f[i+4>>2],u=la+4|0,w=0|f[u>>2],0|w){case 12:case 10:case 9:x=h,y=h,f[ma>>2]=0|f[la>>2],f[ma+4>>2]=0|f[la+4>>2],Df(v,y,ma),f[da>>2]=0|f[ca>>2],f[da+4>>2]=0|f[ca+4>>2],f[d>>2]=0|f[v>>2],f[d+4>>2]=0|f[v+4>>2],gh(G,x,da,d);break;default:z=h,A=h,f[na>>2]=0|f[la>>2],f[na+4>>2]=0|f[la+4>>2],Jf(R,A,na),f[fa>>2]=0|f[ca>>2],f[fa+4>>2]=0|f[ca+4>>2],f[e>>2]=0|f[R>>2],f[e+4>>2]=0|f[R+4>>2],gh(V,z,fa,e)}return B=h,f[ga>>2]=0|f[ca>>2],f[ga+4>>2]=0|f[ca+4>>2],dh(a,B,ga,65241,1),void(l=pa)}if(lg(W,q,32),f[ca>>2]=0|f[W>>2],f[ca+4>>2]=0|f[W+4>>2],C=0|f[c>>2],_=C,D=h,E=_,gq(Y,D,E),f[ba>>2]=0|f[Y>>2],f[ba+4>>2]=0|f[Y+4>>2],F=ba+4|0,H=0|f[F>>2],I=0==(0|H),I&&(J=0|f[ba>>2],K=0!=(0|J),!K)){switch(L=c+4|0,M=0|f[L>>2],0|M){case 9:N=h,f[ha>>2]=0|f[ca>>2],f[ha+4>>2]=0|f[ca+4>>2],dh(Z,N,ha,65232,8);break;case 10:O=h,f[ia>>2]=0|f[ca>>2],f[ia+4>>2]=0|f[ca+4>>2],dh($,O,ia,65817,9);break;default:P=h,f[ja>>2]=0|f[ca>>2],f[ja+4>>2]=0|f[ca+4>>2],dh(j,P,ja,65827,9)}return Q=h,S=h,T=_,Wg(k,S,T),f[ka>>2]=0|f[ca>>2],f[ka+4>>2]=0|f[ca+4>>2],f[g>>2]=0|f[k>>2],f[g+4>>2]=0|f[k+4>>2],yg(Q,ka,g),U=h,f[ea>>2]=0|f[ca>>2],f[ea+4>>2]=0|f[ca+4>>2],dh(a,U,ea,65241,1),void(l=pa)}f[a>>2]=0|f[ba>>2],f[a+4>>2]=0|f[ba+4>>2],l=pa}function Xq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;t=l,l=l+32|0,(0|l)>=(0|m)&&X(),q=t,o=t+12|0,p=t+8|0,d=b,e=0|f[c>>2],n=e,g=d,f[q>>2]=o,r=q+4|0,f[r>>2]=p,0|Lp(g,65837,q),h=d,i=n,j=0|f[o>>2],k=0|f[p>>2],kq(h,i,j,k),Kp(a),l=t}function Yq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,N=0;for(N=l,l=l+80|0,(0|l)>=(0|m)&&X(),e=N+72|0,L=N+64|0,d=N+56|0,K=N+48|0,J=N+32|0,h=N+16|0,u=N+8|0,B=N,g=b,C=0|f[c>>2],I=C,D=g,Mn(h,D),f[J>>2]=0|f[h>>2],f[J+4>>2]=0|f[h+4>>2];;){if(E=I,F=0!=(0|E),!F)break;G=I,H=0|f[G>>2],i=255&H,j=11==(0|i),j?(k=g,n=I,o=n+4|0,p=0|f[o>>2],jp(u,p),f[K>>2]=0|f[J>>2],f[K+4>>2]=0|f[J+4>>2],f[d>>2]=0|f[u>>2],f[d+4>>2]=0|f[u+4>>2],$n(k,K,d)):(q=I,r=0|f[q>>2],s=r>>>11,t=524288&s,v=0!=(0|t),v||(w=g,x=I,jp(B,x),f[L>>2]=0|f[J>>2],f[L+4>>2]=0|f[J+4>>2],f[e>>2]=0|f[B>>2],f[e+4>>2]=0|f[B+4>>2],$n(w,L,e))),y=I,z=y+20|0,A=0|f[z>>2],I=A}f[a>>2]=0|f[J>>2],f[a+4>>2]=0|f[J+4>>2],l=N}function Zq(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0;for(y=l,l=l+32|0,(0|l)>=(0|m)&&X(),v=y,s=y+12|0,t=y+8|0,d=b,e=0|f[c>>2],u=e,i=d,f[v>>2]=t,w=v+4|0,f[w>>2]=s,0|Lp(i,68114,v);;){if(j=0|f[s>>2],k=j+-1|0,f[s>>2]=k,n=0!=(0|j),!n)break;o=d,p=u,q=0|f[t>>2],r=0|f[q>>2],mq(o,p,r),g=0|f[t>>2],h=g+8|0,f[t>>2]=h}Kp(a),l=y}function $q(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;u=l,l=l+32|0,(0|l)>=(0|m)&&X(),q=u+16|0,r=u,o=u+8|0,p=u+24|0,e=b,d[p>>0]=1,g=e,f[r>>2]=o,s=r+4|0,f[s>>2]=p,0|Lp(g,65865,r),h=e,i=0|f[o>>2],_q(h,i),j=e,k=0|f[o>>2],n=0|d[p>>0],f[q>>2]=0|f[c>>2],f[q+4>>2]=0|f[c+4>>2],br(a,j,q,k,n),l=u}function _q(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=n+16|0,g=n,d=a,e=b,h=d,i=d,j=e,vi(g,i,j),f[c>>2]=0|f[g>>2],f[c+4>>2]=0|f[g+4>>2],ar(h,c),l=n}function ar(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0;return P=l,l=l+32|0,(0|l)>=(0|m)&&X(),M=P+16|0,N=P,c=a,e=0|f[b>>2],s=0|f[e>>2],D=s>>>11,G=8&D,H=0!=(0|G),I=0|f[b>>2],H?(J=0|f[I>>2],K=J>>>11,L=496&K,g=L>>4,j=g):(h=I+12|0,i=0|f[h>>2],j=i),k=(0|j)<1,!k&&(n=0|f[b>>2],o=0|f[n>>2],p=o>>>11,q=8&p,r=0!=(0|q),t=0|f[b>>2],u=t+12|0,r?y=u:(v=u+8|0,w=0|f[v>>2],y=w),x=0|d[y>>0],z=x<<24>>24,A=z-65|0,B=A>>>0<26)?void(l=P):(C=c,E=c,f[M>>2]=0|f[b>>2],f[M+4>>2]=0|f[b+4>>2],F=0|mi(E,M),d[N>>0]=0|d[b>>0],d[N+1>>0]=0|d[b+1>>0],d[N+2>>0]=0|d[b+2>>0],d[N+3>>0]=0|d[b+3>>0],d[N+4>>0]=0|d[b+4>>0],d[N+5>>0]=0|d[b+5>>0],d[N+6>>0]=0|d[b+6>>0],d[N+7>>0]=0|d[b+7>>0],void Fr(C,F,65869,N))}function br(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+32|0,(0|l)>=(0|m)&&X(),s=u+16|0,r=u+8|0,g=b,h=d,i=e,j=i,k=j<<24>>24!=0,n=g,o=h,k?(f[r>>2]=0|f[c>>2],f[r+4>>2]=0|f[c+4>>2],p=0|Sj(n,r,o),sq(a,p),void(l=u)):(f[s>>2]=0|f[c>>2],f[s+4>>2]=0|f[c+4>>2],q=0|Uj(n,s,o),sq(a,q),void(l=u))}function cr(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;q=l,l=l+32|0,(0|l)>=(0|m)&&X(),n=q+16|0,o=q,k=q+4|0,d=b,e=d,f[o>>2]=k,0|Lp(e,68285,o),g=d,h=0|f[k>>2],_q(g,h),i=d,j=0|f[k>>2],f[n>>2]=0|f[c>>2],f[n+4>>2]=0|f[c+4>>2],Ej(a,i,n,j),l=q}function dr(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;t=l,l=l+48|0,(0|l)>=(0|m)&&X(),p=t+32|0,n=t+24|0,q=t,k=t+16|0,o=t+8|0,d=b,e=d,f[q>>2]=k,r=q+4|0,f[r>>2]=o,0|Lp(e,68331,q),g=d,h=0|f[k>>2],_q(g,h),i=d,j=0|f[k>>2],f[n>>2]=0|f[c>>2],f[n+4>>2]=0|f[c+4>>2],f[p>>2]=0|f[o>>2],f[p+4>>2]=0|f[o+4>>2],Ij(i,n,j,p),f[a>>2]=0|f[o>>2],f[a+4>>2]=0|f[o+4>>2],l=t}function er(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,C=0;return C=l,l=l+64|0,(0|l)>=(0|m)&&X(),x=C+48|0,A=C+8|0,z=C,w=C+40|0,y=C+32|0,g=C+24|0,o=C+16|0,e=b,p=e,f[z>>2]=w,0|Lp(p,68285,z),q=e,r=0|f[w>>2],_q(q,r),s=e,t=0|f[w>>2],f[x>>2]=0|f[c>>2],f[x+4>>2]=0|f[c+4>>2],mj(g,s,x,t),f[y>>2]=0|f[g>>2],f[y+4>>2]=0|f[g+4>>2],u=y+4|0,v=0|f[u>>2],(h=5==(0|v))?(i=e,j=0|f[w>>2],k=e,n=0|f[w>>2],vi(o,k,n),d[A>>0]=0|d[o>>0],d[A+1>>0]=0|d[o+1>>0],d[A+2>>0]=0|d[o+2>>0],d[A+3>>0]=0|d[o+3>>0],d[A+4>>0]=0|d[o+4>>0],d[A+5>>0]=0|d[o+5>>0],d[A+6>>0]=0|d[o+6>>0],d[A+7>>0]=0|d[o+7>>0],Fr(i,j,65935,A),void 0):(f[a>>2]=0|f[y>>2],f[a+4>>2]=0|f[y+4>>2],void(l=C))}function fr(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;B=l,l=l+64|0,(0|l)>=(0|m)&&X(),y=B+24|0,x=B+8|0,w=B,v=B+48|0,g=B+40|0,n=B+32|0,e=b,o=e,f[w>>2]=v,0|Lp(o,68285,w),p=0|f[c>>2],q=0|yp(p),r=e,s=r+32|0,t=0|f[s>>2],u=(0|q)!=(0|t),h=e,i=0|f[v>>2],j=e,k=0|f[v>>2],u?(vi(g,j,k),d[x>>0]=0|d[c>>0],d[x+1>>0]=0|d[c+1>>0],d[x+2>>0]=0|d[c+2>>0],d[x+3>>0]=0|d[c+3>>0],d[x+4>>0]=0|d[c+4>>0],d[x+5>>0]=0|d[c+5>>0],d[x+6>>0]=0|d[c+6>>0],d[x+7>>0]=0|d[c+7>>0],z=x+8|0,d[z>>0]=0|d[g>>0],d[z+1>>0]=0|d[g+1>>0],d[z+2>>0]=0|d[g+2>>0],d[z+3>>0]=0|d[g+3>>0],d[z+4>>0]=0|d[g+4>>0],d[z+5>>0]=0|d[g+5>>0],d[z+6>>0]=0|d[g+6>>0],d[z+7>>0]=0|d[g+7>>0],Fr(h,i,65973,x)):(vi(n,j,k),d[y>>0]=0|d[n>>0],d[y+1>>0]=0|d[n+1>>0],d[y+2>>0]=0|d[n+2>>0],d[y+3>>0]=0|d[n+3>>0],d[y+4>>0]=0|d[n+4>>0],d[y+5>>0]=0|d[n+5>>0],d[y+6>>0]=0|d[n+6>>0],d[y+7>>0]=0|d[n+7>>0],Fr(h,i,66003,y))}function gr(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,T=0;T=l,l=l+32|0,(0|l)>=(0|m)&&X(),Q=T,O=T+16|0,M=T+8|0,d=b,e=0|f[c>>2],N=e,s=d,f[Q>>2]=O,R=Q+4|0,f[R>>2]=M,0|Lp(s,68603,Q),D=M+4|0,G=0|f[D>>2],H=0==(0|G),H&&(I=0|f[M>>2],J=0!=(0|I),J||(K=d,L=d,g=0|tp(L,68855),Br(K,g,68606))),h=d,i=d,j=i+44|0,k=0|f[j>>2],n=0|Tc(h,13,k),P=n,o=P,p=0|f[M>>2],qt(o,p),q=P,r=0|f[q>>2],t=r>>>11,u=256|t,v=0|f[q>>2],w=2097151&u,x=w<<11,y=2047&v,z=y|x,f[q>>2]=z,A=d,B=N,C=0|f[O>>2],E=P,Hp(A,B,C,E),F=0|f[O>>2],pp(a,F),l=T}function hr(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;r=l,l=l+48|0,(0|l)>=(0|m)&&X(),o=r+24|0,p=r,n=r+8|0,d=b,e=d,f[p>>2]=n,0|Lp(e,68900,p),g=d,h=0|f[c>>2],f[o>>2]=0|f[n>>2],f[o+4>>2]=0|f[n+4>>2],i=0|Kf(g,o,h),k=i,j=k,sq(a,j),l=r}function ir(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,f=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=d,f=d,g=0|tp(f,64809),Br(e,g,66059)}function jr(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,k=0;k=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,g=d,h=g+12|0,i=0|f[h>>2],kr(e,i),l=k}function kr(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,z=0;for(z=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,p=c,q=d,lr(p,q),x=0;;){if(r=x,s=d,t=s+52|0,u=0|f[t>>2],v=r>>>0<u>>>0,!v)break;w=c,e=x,g=d,h=g+20|0,i=0|f[h>>2],j=i+(e<<2)|0,k=0|f[j>>2],kr(w,k),n=x,o=n+1|0,x=o}l=z}function lr(a,b){a|=0,b|=0;var c=0,d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0,wf=0,xf=0,yf=0,zf=0,Af=0,Bf=0,Cf=0,Ef=0,Ff=0,Gf=0,Hf=0,If=0,Jf=0,Kf=0,Lf=0,Mf=0,Nf=0,Of=0,Pf=0,Qf=0,Rf=0,Sf=0,Tf=0,Uf=0,Vf=0,Wf=0,Xf=0,Yf=0,Zf=0,$f=0,_f=0,ag=0,bg=0,cg=0,dg=0,eg=0,fg=0,gg=0,hg=0,ig=0,jg=0,kg=0,lg=0,mg=0,og=0,pg=0,qg=0,rg=0,sg=0,tg=0,ug=0,vg=0,wg=0,xg=0,yg=0,zg=0,Ag=0,Bg=0,Cg=0,Dg=0,Eg=0,Fg=0,Gg=0,Hg=0,Ig=0,Jg=0,Kg=0,Lg=0,Mg=0,Ng=0,Og=0,Pg=0,Qg=0,Rg=0,Sg=0,Tg=0,Ug=0,Vg=0,Wg=0,Xg=0,Yg=0,Zg=0,$g=0,_g=0,ah=0,bh=0,dh=0,eh=0,fh=0,gh=0,hh=0,ih=0,jh=0,kh=0,lh=0,mh=0,nh=0,oh=0,ph=0,qh=0,rh=0,sh=0,th=0,uh=0,vh=0,wh=0,xh=0,yh=0,zh=0,Ah=0,Bh=0,Ch=0,Dh=0,Eh=0,Fh=0,Gh=0,Hh=0,Ih=0,Jh=0,Kh=0,Lh=0,Mh=0,Nh=0,Oh=0,Ph=0,Qh=0,Rh=0,Sh=0,Th=0,Uh=0,Vh=0,Wh=0,Xh=0,Yh=0,Zh=0,$h=0,_h=0,ai=0,bi=0,ci=0,di=0,ei=0,fi=0,gi=0,hi=0,ii=0,ji=0,ki=0,li=0,mi=0,ni=0,oi=0,pi=0,qi=0,ri=0,si=0,ti=0,ui=0,vi=0,wi=0,yi=0,zi=0,Ai=0,Bi=0,Ci=0,Di=0,Ei=0,Fi=0,Gi=0,Hi=0,Ii=0,Ji=0,Ki=0,Li=0,Mi=0,Ni=0,Oi=0,Pi=0,Qi=0,Ri=0,Si=0,Ti=0,Ui=0,Vi=0,Wi=0,Xi=0,Yi=0,Zi=0,$i=0,_i=0,aj=0,bj=0,cj=0,dj=0,ej=0,fj=0,gj=0,hj=0,ij=0,jj=0,kj=0,lj=0,mj=0,nj=0,oj=0,pj=0,qj=0,rj=0,sj=0,tj=0,uj=0,vj=0,wj=0,xj=0,yj=0,zj=0,Aj=0,Bj=0,Cj=0,Dj=0,Ej=0,Fj=0,Gj=0,Hj=0,Ij=0,Jj=0,Kj=0,Lj=0,Mj=0,Nj=0,Oj=0,Pj=0,Qj=0,Rj=0,Sj=0,Tj=0,Uj=0,Vj=0,Wj=0,Xj=0,Yj=0,Zj=0,$j=0,_j=0,ak=0,bk=0,ck=0,dk=0,ek=0,fk=0,gk=0,hk=0,ik=0,jk=0,kk=0,lk=0,mk=0,nk=0,ok=0,pk=0,qk=0,rk=0,sk=0,tk=0,uk=0,vk=0,wk=0,xk=0,yk=0,zk=0,Ak=0,Bk=0,Ck=0,Dk=0,Ek=0,Fk=0,Gk=0,Hk=0,Ik=0,Jk=0,Kk=0,Lk=0,Mk=0,Nk=0,Ok=0,Pk=0,Qk=0,Rk=0,Sk=0,Tk=0,Uk=0,Vk=0,Wk=0,Xk=0,Yk=0,Zk=0,$k=0,_k=0,al=0,bl=0,cl=0,dl=0,el=0,fl=0,gl=0,hl=0,il=0,jl=0,kl=0,ll=0,ml=0,nl=0,ol=0,pl=0,ql=0,rl=0,sl=0,tl=0,ul=0,vl=0,wl=0,xl=0,yl=0,zl=0,Al=0,Bl=0,Cl=0,Dl=0,El=0,Fl=0,Gl=0,Hl=0,Il=0,Jl=0,Kl=0,Ll=0,Ml=0,Nl=0,Ol=0,Pl=0,Ql=0,Rl=0,Sl=0,Tl=0,Ul=0,Vl=0,Wl=0,Xl=0,Yl=0,Zl=0,$l=0,_l=0,am=0,bm=0,cm=0,dm=0,em=0,fm=0,gm=0,hm=0,im=0,jm=0,km=0,lm=0,mm=0,nm=0,om=0,pm=0,qm=0,rm=0,sm=0,tm=0,um=0,vm=0,wm=0,xm=0,ym=0,zm=0,Am=0,Bm=0,Cm=0,Dm=0,Em=0,Fm=0,Gm=0,Hm=0,Im=0,Jm=0,Km=0,Lm=0,Mm=0,Nm=0,Om=0,Pm=0,Qm=0,Rm=0,Sm=0,Tm=0,Um=0,Vm=0,Wm=0,Xm=0,Ym=0,Zm=0,$m=0,_m=0,an=0,bn=0,cn=0,dn=0,en=0,fn=0,gn=0,hn=0,jn=0,kn=0,ln=0,mn=0,nn=0,on=0,pn=0,qn=0,rn=0,sn=0,tn=0,un=0,vn=0,wn=0,xn=0,yn=0,zn=0,An=0,Bn=0,Cn=0,Dn=0,En=0,Fn=0,Gn=0,Hn=0,In=0,Jn=0,Kn=0,Ln=0,Mn=0,Nn=0,On=0,Pn=0,Qn=0,Rn=0,Sn=0,Tn=0,Un=0,Vn=0,Wn=0,Xn=0,Yn=0,Zn=0,$n=0,_n=0,ao=0,bo=0,co=0,eo=0,fo=0,go=0,ho=0,io=0,jo=0,ko=0,lo=0,mo=0,no=0,oo=0,po=0,qo=0,ro=0,so=0,to=0,uo=0,vo=0,wo=0,xo=0,yo=0,zo=0,Ao=0,Bo=0,Co=0,Do=0,Eo=0,Fo=0,Go=0,Ho=0,Io=0,Jo=0,Ko=0,Lo=0,Mo=0,No=0,Oo=0,Po=0,Qo=0,Ro=0,So=0,To=0,Uo=0,Vo=0,Wo=0,Xo=0,Yo=0,Zo=0,$o=0,_o=0,ap=0,bp=0,cp=0,dp=0,ep=0,fp=0,gp=0,hp=0,ip=0,jp=0,kp=0,lp=0,mp=0,np=0,op=0,pp=0,qp=0,rp=0,sp=0,tp=0,up=0,vp=0,wp=0,xp=0,yp=0,zp=0,Ap=0,Bp=0,Cp=0,Dp=0,Ep=0,Fp=0,Gp=0,Hp=0,Ip=0,Jp=0,Kp=0,Lp=0,Mp=0,Np=0,Op=0,Pp=0,Qp=0,Rp=0,Sp=0,Tp=0,Up=0,Vp=0,Wp=0,Xp=0,Yp=0,Zp=0,$p=0,_p=0,aq=0,bq=0,cq=0,dq=0,eq=0,fq=0,gq=0,hq=0,iq=0,jq=0,kq=0,lq=0,mq=0,nq=0,oq=0,pq=0,qq=0,rq=0,sq=0,tq=0,uq=0,vq=0,wq=0,xq=0,yq=0,zq=0,Aq=0,Bq=0,Cq=0,Dq=0,Eq=0,Fq=0,Gq=0,Hq=0,Iq=0,Jq=0,Kq=0,Lq=0,Mq=0,Nq=0,Oq=0,Pq=0,Qq=0,Rq=0,Sq=0,Tq=0,Uq=0,Vq=0,Wq=0,Xq=0,Yq=0,Zq=0,$q=0,_q=0,ar=0,br=0,cr=0,dr=0,er=0,fr=0,gr=0,hr=0,ir=0,jr=0,kr=0,lr=0,nr=0,or=0,qr=0,sr=0,tr=0,ur=0,vr=0,wr=0,xr=0,yr=0,zr=0,Ar=0,Br=0,Cr=0,Dr=0,Er=0,Fr=0,Gr=0,Hr=0,Ir=0,Jr=0,Kr=0,Lr=0,Mr=0,Nr=0,Or=0,Pr=0,Qr=0,Rr=0,Sr=0,Tr=0,Ur=0,Vr=0,Wr=0,Xr=0,Yr=0,Zr=0,$r=0,_r=0,as=0,bs=0,cs=0,ds=0,es=0,fs=0,gs=0,hs=0,is=0,js=0,ks=0,ls=0,ms=0,ns=0,os=0,ps=0,qs=0,rs=0,ss=0,ts=0,us=0,vs=0,ws=0,xs=0,ys=0,zs=0,As=0,Bs=0,Cs=0,Ds=0,Es=0,Fs=0,Gs=0,Hs=0,Is=0,Js=0,Ks=0,Ls=0,Ms=0,Ns=0,Os=0,Ps=0,Qs=0,Rs=0,Ss=0,Ts=0,Us=0,Vs=0,Ws=0,Xs=0,Ys=0,Zs=0,$s=0,_s=0,at=0,bt=0,ct=0,dt=0,et=0,ft=0,gt=0,ht=0,it=0,jt=0,kt=0,lt=0,mt=0,nt=0,ot=0,pt=0,qt=0,rt=0,st=0,tt=0,ut=0,vt=0,wt=0,xt=0,yt=0,zt=0,At=0,Bt=0,Ct=0,Dt=0,Et=0,Ft=0,Gt=0,Ht=0,It=0,Jt=0,Kt=0,Lt=0,Mt=0,Nt=0,Ot=0,Pt=0,Qt=0,Rt=0,St=0,Tt=0,Ut=0,Vt=0,Wt=0,Xt=0,Yt=0,Zt=0,$t=0,_t=0,au=0,bu=0,cu=0,du=0,eu=0,fu=0,gu=0,hu=0,iu=0,ju=0,ku=0,lu=0,mu=0,nu=0,ou=0,pu=0,qu=0,ru=0,su=0,tu=0,uu=0,vu=0,wu=0,xu=0,yu=0,zu=0,Au=0,Bu=0,Cu=0,Du=0,Eu=0,Fu=0,Gu=0,Hu=0,Iu=0,Ju=0,Ku=0,Lu=0,Mu=0,Nu=0,Ou=0,Pu=0,Qu=0,Ru=0,Su=0,Tu=0,Uu=0,Vu=0,Wu=0,Xu=0,Yu=0,Zu=0,$u=0,_u=0,av=0,bv=0,cv=0,dv=0,ev=0,fv=0,gv=0,hv=0,iv=0,jv=0,kv=0,lv=0,mv=0,nv=0,ov=0,pv=0,qv=0,rv=0,sv=0,uv=0;
+if(uv=l,l=l+1040|0,(0|l)>=(0|m)&&X(),d=uv+1024|0,c=uv+1016|0,es=uv+1008|0,lt=uv+904|0,kt=uv+888|0,jt=uv+880|0,it=uv+872|0,ht=uv+864|0,gt=uv+856|0,ft=uv+848|0,et=uv+840|0,dt=uv+832|0,ct=uv+824|0,bt=uv+816|0,at=uv+808|0,$s=uv+800|0,Zs=uv+792|0,Ys=uv+784|0,Xs=uv+768|0,Ws=uv+760|0,Vs=uv+744|0,Us=uv+728|0,Ts=uv+712|0,Ss=uv+704|0,Rs=uv+696|0,Qs=uv+680|0,Ps=uv+672|0,Ns=uv+656|0,Ms=uv+640|0,Ls=uv+624|0,Ks=uv+608|0,Js=uv+592|0,Is=uv+576|0,Hs=uv+560|0,Gs=uv+544|0,Es=uv+528|0,Ds=uv+512|0,Cs=uv+496|0,Bs=uv+488|0,zs=uv+472|0,ys=uv+456|0,xs=uv+432|0,ws=uv+424|0,vs=uv+416|0,us=uv+408|0,ts=uv+400|0,rs=uv+368|0,qs=uv+344|0,ps=uv+336|0,os=uv+320|0,ns=uv+304|0,ms=uv+288|0,ks=uv+280|0,js=uv+272|0,is=uv+264|0,Et=uv+256|0,Dt=uv+248|0,Bt=uv+232|0,At=uv+216|0,zt=uv+208|0,yt=uv+200|0,xt=uv+184|0,wt=uv+168|0,vt=uv+160|0,tt=uv+152|0,st=uv+144|0,rt=uv+136|0,qt=uv+128|0,pt=uv+120|0,ot=uv+112|0,nt=uv+104|0,mt=uv+96|0,_s=uv+88|0,Os=uv+72|0,Fs=uv+64|0,As=uv+56|0,ss=uv+48|0,ls=uv+40|0,Ct=uv+32|0,ut=uv+24|0,hs=uv,ds=uv+968|0,as=uv+960|0,fs=uv+952|0,bs=uv+944|0,nb=uv+936|0,gs=uv+928|0,cs=uv+920|0,sd=uv+912|0,g=a,h=b,Yr=0,wf=h,Ch=0!=(0|wf),!Ch)return void(l=uv);for(Gj=h,Jl=h,Nn=Jl+2|0,Rp=0|e[Nn>>1],i=65535&Rp,v=h,G=0|e[v>>1],R=65535&G,ba=h,ma=ba+44|0,xa=0|f[ma>>2],Ia=h,Ta=Ia+48|0,cb=0|f[Ta>>2],ob=h,zb=ob+52|0,Kb=0|f[zb>>2],f[hs>>2]=Gj,Ft=hs+4|0,f[Ft>>2]=i,pu=hs+8|0,f[pu>>2]=R,Xu=hs+12|0,f[Xu>>2]=xa,bv=hs+16|0,f[bv>>2]=cb,cv=hs+20|0,f[cv>>2]=Kb,0|aw(66092,hs),Zr=0;;){if(Vb=Zr,ec=h,pc=ec+40|0,Ac=0|f[pc>>2],Lc=(0|Vb)<(0|Ac),!Lc)break;Yc=g,hd=0|Wc(Yc),Wr=hd,td=h,Ed=Zr,Pd=0|pr(td,Ed),_r=Pd,$d=_r,je=0!=(0|$d),je&&(ue=Yr,Fe=_r,Qe=(0|ue)!=(0|Fe),Qe&&(_e=_r,f[ut>>2]=_e,0|aw(66146,ut),lf=_r,Yr=lf)),xf=h,Jf=Zr,Uf=0|rr(xf,Jf),$r=Uf,dg=$r,pg=(0|dg)<0,pg?0|aw(66156,Ct):(Ag=$r,f[ls>>2]=Ag,0|aw(66163,ls)),Lg=Zr,f[ss>>2]=Lg,0|aw(66168,ss),Wg=Zr,gh=h,rh=gh+8|0,Dh=0|f[rh>>2],Oh=Dh+(Wg<<2)|0,Zh=0|f[Oh>>2],Xr=Zh,ii=Xr,ti=127&ii;do switch(0|ti){case 0:0|aw(66174,As);break;case 1:Fi=Xr,Qi=Fi>>>23,_i=511&Qi,kj=Xr,vj=kj>>>14,Hj=511&vj,f[Fs>>2]=_i,yu=Fs+4|0,f[yu>>2]=Hj,0|aw(66182,Fs),Sj=g,bk=h,mk=Xr,mr(Sj,bk,mk,3);break;case 2:xk=Xr,Ik=xk>>>7,Tk=65535&Ik,cl=h,nl=cl+12|0,yl=0|f[nl>>2],Kl=yl+(Tk<<3)|0,f[ds>>2]=0|f[Kl>>2],f[ds+4>>2]=0|f[Kl+4>>2],Vl=g,f[es>>2]=0|f[ds>>2],f[es+4>>2]=0|f[ds+4>>2],Df(as,Vl,es),em=Xr,pm=em>>>23,Am=511&pm,Lm=Xr,Wm=Lm>>>7,fn=65535&Wm,rn=0|f[as>>2],Cn=0|f[rn>>2],On=Cn>>>11,Zn=8&On,jo=0!=(0|Zn),uo=0|f[as>>2],Fo=uo+12|0,jo?kp=Fo:(Qo=Fo+8|0,_o=0|f[Qo>>2],kp=_o),f[Os>>2]=Am,Nu=Os+4|0,f[Nu>>2]=fn,Su=Os+8|0,f[Su>>2]=kp,0|aw(66214,Os),vp=g,Gp=h,Sp=Xr,mr(vp,Gp,Sp,1);break;case 3:bq=Xr,mq=bq>>>23,xq=511&mq,Iq=Xr,Tq=Iq>>>7,cr=65535&Tq,or=cr-32767|0,f[_s>>2]=xq,Yu=_s+4|0,f[Yu>>2]=or,0|aw(66238,_s),Br=g,Mr=h,j=Xr,mr(Br,Mr,j,1);break;case 4:k=Xr,n=k>>>23,o=511&n,p=g,q=Xr,r=q>>>7,s=65535&r,t=h,u=t+16|0,w=0|f[u>>2],x=w+(s<<2)|0,y=0|f[x>>2],z=0|xi(p,y),f[mt>>2]=o,av=mt+4|0,f[av>>2]=z,0|aw(66255,mt),A=g,B=h,C=Xr,mr(A,B,C,1);break;case 5:D=Xr,E=D>>>23,F=511&E,f[nt>>2]=F,0|aw(66274,nt),H=g,I=h,J=Xr,mr(H,I,J,1);break;case 6:K=Xr,L=K>>>23,M=511&L,f[ot>>2]=M,0|aw(66291,ot),N=g,O=h,P=Xr,mr(N,O,P,1);break;case 7:Q=Xr,S=Q>>>23,T=511&S,f[pt>>2]=T,0|aw(66309,pt),U=g,V=h,W=Xr,mr(U,V,W,1);break;case 8:Y=Xr,Z=Y>>>23,$=511&Z,f[qt>>2]=$,0|aw(66324,qt),_=g,aa=h,ca=Xr,mr(_,aa,ca,1);break;case 9:da=Xr,ea=da>>>23,fa=511&ea,ga=g,ha=Xr,ia=ha>>>7,ja=65535&ia,ka=h,la=ka+16|0,na=0|f[la>>2],oa=na+(ja<<2)|0,pa=0|f[oa>>2],qa=0|xi(ga,pa),f[rt>>2]=fa,dv=rt+4|0,f[dv>>2]=qa,0|aw(66339,rt),ra=g,sa=h,ta=Xr,mr(ra,sa,ta,1);break;case 10:ua=g,va=Xr,wa=va>>>7,ya=65535&wa,za=h,Aa=za+16|0,Ba=0|f[Aa>>2],Ca=Ba+(ya<<2)|0,Da=0|f[Ca>>2],Ea=0|xi(ua,Da),Fa=Xr,Ga=Fa>>>23,Ha=511&Ga,f[st>>2]=Ea,ev=st+4|0,f[ev>>2]=Ha,0|aw(66360,st),Ja=g,Ka=h,La=Xr,mr(Ja,Ka,La,1);break;case 17:Ma=Xr,Na=Ma>>>23,Oa=511&Na,Pa=g,Qa=Xr,Ra=Qa>>>7,Sa=65535&Ra,Ua=h,Va=Ua+16|0,Wa=0|f[Va>>2],Xa=Wa+(Sa<<2)|0,Ya=0|f[Xa>>2],Za=0|xi(Pa,Ya),f[tt>>2]=Oa,fv=tt+4|0,f[fv>>2]=Za,0|aw(66382,tt),$a=g,_a=h,ab=Xr,mr($a,_a,ab,1);break;case 18:bb=g,db=Xr,eb=db>>>7,fb=65535&eb,gb=h,hb=gb+16|0,ib=0|f[hb>>2],jb=ib+(fb<<2)|0,kb=0|f[jb>>2],lb=0|xi(bb,kb),mb=Xr,pb=mb>>>23,qb=511&pb,f[vt>>2]=lb,gv=vt+4|0,f[gv>>2]=qb,0|aw(66402,vt),rb=g,sb=h,tb=Xr,mr(rb,sb,tb,1);break;case 19:ub=Xr,vb=ub>>>23,wb=511&vb,xb=Xr,yb=xb>>>23,Ab=511&yb,Bb=g,Cb=Xr,Db=Cb>>>7,Eb=65535&Db,Fb=h,Gb=Fb+16|0,Hb=0|f[Gb>>2],Ib=Hb+(Eb<<2)|0,Jb=0|f[Ib>>2],Lb=0|xi(Bb,Jb),f[wt>>2]=wb,hv=wt+4|0,f[hv>>2]=Ab,iv=wt+8|0,f[iv>>2]=Lb,0|aw(66423,wt),Mb=g,Nb=h,Ob=Xr,mr(Mb,Nb,Ob,3);break;case 20:Pb=Xr,Qb=Pb>>>23,Rb=511&Qb,Sb=Rb+1|0,Tb=g,Ub=Xr,Wb=Ub>>>7,Xb=65535&Wb,Yb=h,Zb=Yb+16|0,$b=0|f[Zb>>2],_b=$b+(Xb<<2)|0,ac=0|f[_b>>2],bc=0|xi(Tb,ac),cc=Xr,dc=cc>>>23,fc=511&dc,f[xt>>2]=Sb,jv=xt+4|0,f[jv>>2]=bc,kv=xt+8|0,f[kv>>2]=fc,0|aw(66447,xt),gc=g,hc=h,ic=Xr,mr(gc,hc,ic,1);break;case 13:jc=Xr,kc=jc>>>23,lc=511&kc,mc=g,nc=Xr,oc=nc>>>7,qc=65535&oc,rc=h,sc=rc+16|0,tc=0|f[sc>>2],uc=tc+(qc<<2)|0,vc=0|f[uc>>2],wc=0|xi(mc,vc),f[yt>>2]=lc,lv=yt+4|0,f[lv>>2]=wc,0|aw(66471,yt),xc=g,yc=h,zc=Xr,mr(xc,yc,zc,1);break;case 14:Bc=g,Cc=Xr,Dc=Cc>>>7,Ec=65535&Dc,Fc=h,Gc=Fc+16|0,Hc=0|f[Gc>>2],Ic=Hc+(Ec<<2)|0,Jc=0|f[Ic>>2],Kc=0|xi(Bc,Jc),Mc=Xr,Nc=Mc>>>23,Oc=511&Nc,f[zt>>2]=Kc,mv=zt+4|0,f[mv>>2]=Oc,0|aw(66487,zt),Pc=g,Qc=h,Rc=Xr,mr(Pc,Qc,Rc,1);break;case 21:Sc=Xr,Tc=Sc>>>23,Uc=511&Tc,Vc=Xr,Zc=Vc>>>14,$c=511&Zc,_c=Xr,ad=_c>>>7,bd=127&ad,f[At>>2]=Uc,nv=At+4|0,f[nv>>2]=$c,ov=At+8|0,f[ov>>2]=bd,0|aw(66503,At),cd=g,dd=h,ed=Xr,mr(cd,dd,ed,1);break;case 22:fd=Xr,gd=fd>>>23,id=511&gd,jd=Xr,kd=jd>>>14,ld=511&kd,md=Xr,nd=md>>>7,od=127&nd,f[Bt>>2]=id,pv=Bt+4|0,f[pv>>2]=ld,qv=Bt+8|0,f[qv>>2]=od,0|aw(66525,Bt),pd=g,qd=h,rd=Xr,mr(pd,qd,rd,1);break;case 15:ud=Xr,vd=ud>>>23,wd=511&vd,xd=g,yd=Xr,zd=yd>>>7,Ad=65535&zd,Bd=h,Cd=Bd+16|0,Dd=0|f[Cd>>2],Fd=Dd+(Ad<<2)|0,Gd=0|f[Fd>>2],Hd=0|xi(xd,Gd),f[Dt>>2]=wd,rv=Dt+4|0,f[rv>>2]=Hd,0|aw(66547,Dt),Id=g,Jd=h,Kd=Xr,mr(Id,Jd,Kd,1);break;case 16:Ld=g,Md=Xr,Nd=Md>>>7,Od=65535&Nd,Qd=h,Rd=Qd+16|0,Sd=0|f[Rd>>2],Td=Sd+(Od<<2)|0,Ud=0|f[Td>>2],Vd=0|xi(Ld,Ud),Wd=Xr,Xd=Wd>>>23,Yd=511&Xd,f[Et>>2]=Vd,sv=Et+4|0,f[sv>>2]=Yd,0|aw(66563,Et),Zd=g,_d=h,ae=Xr,mr(Zd,_d,ae,1);break;case 23:be=Zr,ce=Xr,de=ce>>>7,ee=65535&de,fe=ee-32767|0,ge=be+fe|0,f[is>>2]=ge,0|aw(66579,is);break;case 24:he=Xr,ie=he>>>23,ke=511&ie,le=Zr,me=Xr,ne=me>>>7,oe=65535&ne,pe=oe-32767|0,qe=le+pe|0,f[js>>2]=ke,Gt=js+4|0,f[Gt>>2]=qe,0|aw(66592,js);break;case 25:re=Xr,se=re>>>23,te=511&se,ve=Zr,we=Xr,xe=we>>>7,ye=65535&xe,ze=ye-32767|0,Ae=ve+ze|0,f[ks>>2]=te,Ht=ks+4|0,f[Ht>>2]=Ae,0|aw(66611,ks);break;case 32:Be=Xr,Ce=Be>>>23,De=511&Ce,Ee=g,Ge=Xr,He=Ge>>>14,Ie=511&He,Je=h,Ke=Je+16|0,Le=0|f[Ke>>2],Me=Le+(Ie<<2)|0,Ne=0|f[Me>>2],Oe=0|xi(Ee,Ne),Pe=Xr,Re=Pe>>>7,Se=127&Re,f[ms>>2]=De,It=ms+4|0,f[It>>2]=Oe,Jt=ms+8|0,f[Jt>>2]=Se,0|aw(66631,ms);break;case 33:Te=Xr,Ue=Te>>>23,Ve=511&Ue,We=g,Xe=Xr,Ye=Xe>>>14,Ze=511&Ye,$e=h,af=$e+16|0,bf=0|f[af>>2],cf=bf+(Ze<<2)|0,df=0|f[cf>>2],ef=0|xi(We,df),ff=Xr,gf=ff>>>7,hf=127&gf,f[ns>>2]=Ve,Kt=ns+4|0,f[Kt>>2]=ef,Lt=ns+8|0,f[Lt>>2]=hf,0|aw(66651,ns);break;case 42:jf=Xr,kf=jf>>>23,mf=511&kf,nf=g,of=Xr,pf=of>>>14,qf=511&pf,rf=h,sf=rf+16|0,tf=0|f[sf>>2],uf=tf+(qf<<2)|0,vf=0|f[uf>>2],yf=0|xi(nf,vf),zf=Xr,Af=zf>>>7,Bf=127&Af,f[os>>2]=mf,Mt=os+4|0,f[Mt>>2]=yf,Nt=os+8|0,f[Nt>>2]=Bf,0|aw(66672,os);break;case 36:Cf=Xr,Ef=Cf>>>23,Ff=511&Ef,Gf=Xr,Hf=Gf>>>7,If=127&Hf,f[ps>>2]=Ff,Ot=ps+4|0,f[Ot>>2]=If,0|aw(66696,ps);break;case 37:Kf=Xr,Lf=Kf>>>23,Mf=511&Lf,Nf=Xr,Of=Nf>>>7,Pf=65535&Of,Qf=Pf>>10,Rf=63&Qf,Sf=Xr,Tf=Sf>>>7,Vf=65535&Tf,Wf=Vf>>9,Xf=1&Wf,Yf=Xr,Zf=Yf>>>7,$f=65535&Zf,_f=$f>>4,ag=31&_f,bg=Xr,cg=bg>>>7,eg=65535&cg,fg=eg>>0,gg=15&fg,f[qs>>2]=Mf,Pt=qs+4|0,f[Pt>>2]=Rf,Qt=qs+8|0,f[Qt>>2]=Xf,Rt=qs+12|0,f[Rt>>2]=ag,St=qs+16|0,f[St>>2]=gg,0|aw(66713,qs),hg=g,ig=h,jg=Xr,mr(hg,ig,jg,1);break;case 38:kg=Xr,lg=kg>>>7,mg=33554431&lg,og=mg>>18,qg=31&og,rg=Xr,sg=rg>>>7,tg=33554431&sg,ug=tg>>13,vg=31&ug,wg=Xr,xg=wg>>>7,yg=33554431&xg,zg=yg>>12,Bg=1&zg,Cg=Xr,Dg=Cg>>>7,Eg=33554431&Dg,Fg=Eg>>7,Gg=31&Fg,Hg=Xr,Ig=Hg>>>7,Jg=33554431&Ig,Kg=Jg>>2,Mg=31&Kg,Ng=Xr,Og=Ng>>>7,Pg=33554431&Og,Qg=Pg>>1,Rg=1&Qg,Sg=Xr,Tg=Sg>>>7,Ug=33554431&Tg,Vg=1&Ug,f[rs>>2]=qg,Tt=rs+4|0,f[Tt>>2]=vg,Ut=rs+8|0,f[Ut>>2]=Bg,Vt=rs+12|0,f[Vt>>2]=Gg,Wt=rs+16|0,f[Wt>>2]=Mg,Xt=rs+20|0,f[Xt>>2]=Rg,Yt=rs+24|0,f[Yt>>2]=Vg,0|aw(66739,rs);break;case 41:switch(Xg=Xr,Yg=Xg>>>23,Zg=511&Yg,f[ts>>2]=Zg,0|aw(66770,ts),$g=Xr,_g=$g>>>14,ah=511&_g,0|ah){case 2:case 0:0|aw(66784,us);break;case 1:0|aw(66793,vs);break;default:0|aw(66801,ws)}bh=g,dh=h,eh=Xr,mr(bh,dh,eh,1);break;case 43:fh=Xr,hh=fh>>>23,ih=511&hh,jh=Xr,kh=jh>>>7,lh=65535&kh,mh=lh>>10,nh=63&mh,oh=Xr,ph=oh>>>7,qh=65535&ph,sh=qh>>9,th=1&sh,uh=Xr,vh=uh>>>7,wh=65535&vh,xh=wh>>4,yh=31&xh,zh=Xr,Ah=zh>>>7,Bh=65535&Ah,Eh=Bh>>0,Fh=15&Eh,f[xs>>2]=ih,Zt=xs+4|0,f[Zt>>2]=nh,$t=xs+8|0,f[$t>>2]=th,_t=xs+12|0,f[_t>>2]=yh,au=xs+16|0,f[au>>2]=Fh,0|aw(66810,xs),Gh=g,Hh=h,Ih=Xr,mr(Gh,Hh,Ih,1);break;case 64:Jh=Xr,Kh=Jh>>>23,Lh=511&Kh,Mh=Xr,Nh=Mh>>>9,Ph=16383&Nh,Qh=Ph+1|0,Rh=Xr,Sh=Rh>>>7,Th=3&Sh,f[ys>>2]=Lh,bu=ys+4|0,f[bu>>2]=Qh,cu=ys+8|0,f[cu>>2]=Th,0|aw(66837,ys),Uh=g,Vh=h,Wh=Xr,mr(Uh,Vh,Wh,1);break;case 65:Xh=Xr,Yh=Xh>>>23,$h=511&Yh,_h=Xr,ai=_h>>>14,bi=511&ai,ci=Xr,di=ci>>>7,ei=127&di,f[zs>>2]=$h,du=zs+4|0,f[du>>2]=bi,eu=zs+8|0,f[eu>>2]=ei,0|aw(66861,zs),fi=g,gi=h,hi=Xr,mr(fi,gi,hi,3);break;case 70:ji=Xr,ki=ji>>>23,li=511&ki,mi=g,ni=Xr,oi=ni>>>14,pi=511&oi,qi=h,ri=qi+16|0,si=0|f[ri>>2],ui=si+(pi<<2)|0,vi=0|f[ui>>2],wi=0|xi(mi,vi),f[Bs>>2]=li,fu=Bs+4|0,f[fu>>2]=wi,0|aw(66881,Bs),yi=g,zi=h,Ai=Xr,mr(yi,zi,Ai,1);break;case 44:Bi=Xr,Ci=Bi>>>23,Di=511&Ci,Ei=g,Gi=Xr,Hi=Gi>>>14,Ii=511&Hi,Ji=h,Ki=Ji+16|0,Li=0|f[Ki>>2],Mi=Li+(Ii<<2)|0,Ni=0|f[Mi>>2],Oi=0|xi(Ei,Ni),Pi=Xr,Ri=Pi>>>7,Si=127&Ri,f[Cs>>2]=Di,gu=Cs+4|0,f[gu>>2]=Oi,hu=Cs+8|0,f[hu>>2]=Si,0|aw(66899,Cs);break;case 45:Ti=Xr,Ui=Ti>>>23,Vi=511&Ui,Wi=g,Xi=Xr,Yi=Xi>>>14,Zi=511&Yi,$i=h,aj=$i+16|0,bj=0|f[aj>>2],cj=bj+(Zi<<2)|0,dj=0|f[cj>>2],ej=0|xi(Wi,dj),fj=Xr,gj=fj>>>7,hj=127&gj,f[Ds>>2]=Vi,iu=Ds+4|0,f[iu>>2]=ej,ju=Ds+8|0,f[ju>>2]=hj,0|aw(66918,Ds);break;case 46:ij=Xr,jj=ij>>>23,lj=511&jj,mj=g,nj=Xr,oj=nj>>>14,pj=511&oj,qj=h,rj=qj+16|0,sj=0|f[rj>>2],tj=sj+(pj<<2)|0,uj=0|f[tj>>2],wj=0|xi(mj,uj),xj=Xr,yj=xj>>>7,zj=127&yj,f[Es>>2]=lj,ku=Es+4|0,f[ku>>2]=wj,lu=Es+8|0,f[lu>>2]=zj,0|aw(66938,Es);break;case 47:Aj=Xr,Bj=Aj>>>23,Cj=511&Bj,Dj=g,Ej=Xr,Fj=Ej>>>14,Ij=511&Fj,Jj=h,Kj=Jj+16|0,Lj=0|f[Kj>>2],Mj=Lj+(Ij<<2)|0,Nj=0|f[Mj>>2],Oj=0|xi(Dj,Nj),Pj=Xr,Qj=Pj>>>7,Rj=127&Qj,f[Gs>>2]=Cj,mu=Gs+4|0,f[mu>>2]=Oj,nu=Gs+8|0,f[nu>>2]=Rj,0|aw(66957,Gs);break;case 48:Tj=Xr,Uj=Tj>>>23,Vj=511&Uj,Wj=g,Xj=Xr,Yj=Xj>>>14,Zj=511&Yj,$j=h,_j=$j+16|0,ak=0|f[_j>>2],ck=ak+(Zj<<2)|0,dk=0|f[ck>>2],ek=0|xi(Wj,dk),fk=Xr,gk=fk>>>7,hk=127&gk,f[Hs>>2]=Vj,ou=Hs+4|0,f[ou>>2]=ek,qu=Hs+8|0,f[qu>>2]=hk,0|aw(66977,Hs);break;case 49:ik=Xr,jk=ik>>>23,kk=511&jk,lk=g,nk=Xr,ok=nk>>>14,pk=511&ok,qk=h,rk=qk+16|0,sk=0|f[rk>>2],tk=sk+(pk<<2)|0,uk=0|f[tk>>2],vk=0|xi(lk,uk),wk=Xr,yk=wk>>>7,zk=127&yk,f[Is>>2]=kk,ru=Is+4|0,f[ru>>2]=vk,su=Is+8|0,f[su>>2]=zk,0|aw(66996,Is);break;case 51:Ak=Xr,Bk=Ak>>>23,Ck=511&Bk,Dk=g,Ek=Xr,Fk=Ek>>>14,Gk=511&Fk,Hk=h,Jk=Hk+16|0,Kk=0|f[Jk>>2],Lk=Kk+(Gk<<2)|0,Mk=0|f[Lk>>2],Nk=0|xi(Dk,Mk),Ok=Xr,Pk=Ok>>>7,Qk=127&Pk,f[Js>>2]=Ck,tu=Js+4|0,f[tu>>2]=Nk,uu=Js+8|0,f[uu>>2]=Qk,0|aw(67015,Js);break;case 52:Rk=Xr,Sk=Rk>>>23,Uk=511&Sk,Vk=g,Wk=Xr,Xk=Wk>>>14,Yk=511&Xk,Zk=h,$k=Zk+16|0,_k=0|f[$k>>2],al=_k+(Yk<<2)|0,bl=0|f[al>>2],dl=0|xi(Vk,bl),el=Xr,fl=el>>>7,gl=127&fl,f[Ks>>2]=Uk,vu=Ks+4|0,f[vu>>2]=dl,wu=Ks+8|0,f[wu>>2]=gl,0|aw(67033,Ks);break;case 53:hl=Xr,il=hl>>>23,jl=511&il,kl=g,ll=Xr,ml=ll>>>14,ol=511&ml,pl=h,ql=pl+16|0,rl=0|f[ql>>2],sl=rl+(ol<<2)|0,tl=0|f[sl>>2],ul=0|xi(kl,tl),vl=Xr,wl=vl>>>7,xl=127&wl,f[Ls>>2]=jl,xu=Ls+4|0,f[xu>>2]=ul,zu=Ls+8|0,f[zu>>2]=xl,0|aw(67051,Ls);break;case 54:zl=Xr,Al=zl>>>23,Bl=511&Al,Cl=g,Dl=Xr,El=Dl>>>14,Fl=511&El,Gl=h,Hl=Gl+16|0,Il=0|f[Hl>>2],Ll=Il+(Fl<<2)|0,Ml=0|f[Ll>>2],Nl=0|xi(Cl,Ml),Ol=Xr,Pl=Ol>>>7,Ql=127&Pl,f[Ms>>2]=Bl,Au=Ms+4|0,f[Au>>2]=Nl,Bu=Ms+8|0,f[Bu>>2]=Ql,0|aw(67069,Ms);break;case 50:Rl=Xr,Sl=Rl>>>23,Tl=511&Sl,Ul=g,Wl=Xr,Xl=Wl>>>14,Yl=511&Xl,Zl=h,$l=Zl+16|0,_l=0|f[$l>>2],am=_l+(Yl<<2)|0,bm=0|f[am>>2],cm=0|xi(Ul,bm),dm=Xr,fm=dm>>>7,gm=127&fm,f[Ns>>2]=Tl,Cu=Ns+4|0,f[Cu>>2]=cm,Du=Ns+8|0,f[Du>>2]=gm,0|aw(67087,Ns);break;case 74:0|aw(67105,Ps);break;case 55:hm=Xr,im=hm>>>23,jm=511&im,km=Xr,lm=km>>>14,mm=511&lm,nm=Xr,om=nm>>>7,qm=127&om,f[Qs>>2]=jm,Eu=Qs+4|0,f[Eu>>2]=mm,Fu=Qs+8|0,f[Fu>>2]=qm,0|aw(67114,Qs),rm=g,sm=h,tm=Xr,mr(rm,sm,tm,3);break;case 56:um=Xr,vm=um>>>23,wm=511&vm,xm=Xr,ym=xm>>>14,zm=511&ym,f[Rs>>2]=wm,Gu=Rs+4|0,f[Gu>>2]=zm,0|aw(67134,Rs),Bm=g,Cm=h,Dm=Xr,mr(Bm,Cm,Dm,3);break;case 57:Em=Xr,Fm=Em>>>23,Gm=511&Fm,Hm=Xr,Im=Hm>>>14,Jm=511&Im,f[Ss>>2]=Gm,Hu=Ss+4|0,f[Hu>>2]=Jm,0|aw(67153,Ss),Km=g,Mm=h,Nm=Xr,mr(Km,Mm,Nm,3);break;case 58:Om=Xr,Pm=Om>>>23,Qm=511&Pm,Rm=Xr,Sm=Rm>>>14,Tm=511&Sm,Um=Xr,Vm=Um>>>7,Xm=127&Vm,f[Ts>>2]=Qm,Iu=Ts+4|0,f[Iu>>2]=Tm,Ju=Ts+8|0,f[Ju>>2]=Xm,0|aw(67173,Ts),Ym=g,Zm=h,$m=Xr,mr(Ym,Zm,$m,3);break;case 60:_m=Xr,an=_m>>>23,bn=511&an,cn=Xr,dn=cn>>>14,en=511&dn,gn=Xr,hn=gn>>>7,jn=127&hn,f[Us>>2]=bn,Ku=Us+4|0,f[Ku>>2]=en,Lu=Us+8|0,f[Lu>>2]=jn,0|aw(67192,Us),kn=g,ln=h,mn=Xr,mr(kn,ln,mn,1);break;case 61:nn=Xr,on=nn>>>7,pn=65535&on,qn=h,sn=qn+12|0,tn=0|f[sn>>2],un=tn+(pn<<3)|0,f[fs>>2]=0|f[un>>2],f[fs+4>>2]=0|f[un+4>>2],vn=g,wn=g,xn=0|f[fs>>2],yn=0|f[xn>>2],zn=yn>>>11,An=8&zn,Bn=0!=(0|An),Dn=0|f[fs>>2],En=Dn+12|0,Bn?Vn=En:(Fn=En+8|0,Gn=0|f[Fn>>2],Vn=Gn),Hn=0|f[fs>>2],In=0|f[Hn>>2],Jn=In>>>11,Kn=8&Jn,Ln=0!=(0|Kn),Mn=0|f[fs>>2],Ln?(Pn=0|f[Mn>>2],Qn=Pn>>>11,Rn=496&Qn,Sn=Rn>>4,Wn=Sn):(Tn=Mn+12|0,Un=0|f[Tn>>2],Wn=Un),ng(nb,wn,Vn,Wn),f[c>>2]=0|f[nb>>2],f[c+4>>2]=0|f[nb+4>>2],ch(bs,vn,c),Xn=Xr,Yn=Xn>>>23,$n=511&Yn,_n=Xr,ao=_n>>>7,bo=65535&ao,co=0|f[bs>>2],eo=0|f[co>>2],fo=eo>>>11,go=8&fo,ho=0!=(0|go),io=0|f[bs>>2],ko=io+12|0,ho?no=ko:(lo=ko+8|0,mo=0|f[lo>>2],no=mo),f[Vs>>2]=$n,Mu=Vs+4|0,f[Mu>>2]=bo,Ou=Vs+8|0,f[Ou>>2]=no,0|aw(67211,Vs),oo=g,po=h,qo=Xr,mr(oo,po,qo,1);break;case 62:ro=Xr,so=ro>>>23,to=511&so,vo=Xr,wo=vo>>>14,xo=511&wo,f[Ws>>2]=to,Pu=Ws+4|0,f[Pu>>2]=xo,0|aw(67236,Ws),yo=g,zo=h,Ao=Xr,mr(yo,zo,Ao,3);break;case 63:Bo=Xr,Co=Bo>>>23,Do=511&Co,Eo=Xr,Go=Eo>>>14,Ho=511&Go,Io=Xr,Jo=Io>>>7,Ko=127&Jo,f[Xs>>2]=Do,Qu=Xs+4|0,f[Qu>>2]=Ho,Ru=Xs+8|0,f[Ru>>2]=Ko,0|aw(67255,Xs),Lo=g,Mo=h,No=Xr,mr(Lo,Mo,No,3);break;case 66:Oo=Xr,Po=Oo>>>23,Ro=511&Po,f[Ys>>2]=Ro,0|aw(67274,Ys),So=g,To=h,Uo=Xr,mr(So,To,Uo,1);break;case 67:Vo=Xr,Wo=Vo>>>23,Xo=511&Wo,Yo=g,Zo=Xr,$o=Zo>>>14,ap=511&$o,bp=h,cp=bp+16|0,dp=0|f[cp>>2],ep=dp+(ap<<2)|0,fp=0|f[ep>>2],gp=0|xi(Yo,fp),f[Zs>>2]=Xo,Tu=Zs+4|0,f[Tu>>2]=gp,0|aw(67290,Zs),hp=g,ip=h,jp=Xr,mr(hp,ip,jp,1);break;case 68:lp=Xr,mp=lp>>>23,np=511&mp,op=g,pp=Xr,qp=pp>>>14,rp=511&qp,sp=h,tp=sp+16|0,up=0|f[tp>>2],wp=up+(rp<<2)|0,xp=0|f[wp>>2],yp=0|xi(op,xp),f[$s>>2]=np,Uu=$s+4|0,f[Uu>>2]=yp,0|aw(67307,$s),zp=g,Ap=h,Bp=Xr,mr(zp,Ap,Bp,1);break;case 69:Cp=Xr,Dp=Cp>>>23,Ep=511&Dp,Fp=Xr,Hp=Fp>>>7,Ip=65535&Hp,Jp=Ip+1|0,f[at>>2]=Ep,Vu=at+4|0,f[Vu>>2]=Jp,0|aw(67325,at),Kp=g,Lp=h,Mp=Xr,mr(Kp,Lp,Mp,1);break;case 71:Np=Xr,Op=Np>>>23,Pp=511&Op,Qp=Xr,Tp=Qp>>>14,Up=511&Tp,f[bt>>2]=Pp,Wu=bt+4|0,f[Wu>>2]=Up,0|aw(67344,bt),Vp=g,Wp=h,Xp=Xr,mr(Vp,Wp,Xp,3);break;case 72:Yp=Xr,Zp=Yp>>>23,$p=511&Zp,f[ct>>2]=$p,0|aw(67363,ct),_p=g,aq=h,cq=Xr,mr(_p,aq,cq,1);break;case 75:dq=Xr,eq=dq>>>7,fq=65535&eq,gq=h,hq=gq+12|0,iq=0|f[hq>>2],jq=iq+(fq<<3)|0,f[gs>>2]=0|f[jq>>2],f[gs+4>>2]=0|f[jq+4>>2],kq=g,lq=g,nq=0|f[gs>>2],oq=0|f[nq>>2],pq=oq>>>11,qq=8&pq,rq=0!=(0|qq),sq=0|f[gs>>2],tq=sq+12|0,rq?Kq=tq:(uq=tq+8|0,vq=0|f[uq>>2],Kq=vq),wq=0|f[gs>>2],yq=0|f[wq>>2],zq=yq>>>11,Aq=8&zq,Bq=0!=(0|Aq),Cq=0|f[gs>>2],Bq?(Dq=0|f[Cq>>2],Eq=Dq>>>11,Fq=496&Eq,Gq=Fq>>4,Lq=Gq):(Hq=Cq+12|0,Jq=0|f[Hq>>2],Lq=Jq),ng(sd,lq,Kq,Lq),f[d>>2]=0|f[sd>>2],f[d+4>>2]=0|f[sd+4>>2],ch(cs,kq,d),Mq=0|f[cs>>2],Nq=0|f[Mq>>2],Oq=Nq>>>11,Pq=8&Oq,Qq=0!=(0|Pq),Rq=0|f[cs>>2],Sq=Rq+12|0,Qq?Wq=Sq:(Uq=Sq+8|0,Vq=0|f[Uq>>2],Wq=Vq),f[dt>>2]=Wq,0|aw(67379,dt);break;case 30:Xq=Xr,Yq=Xq>>>7,Zq=65535&Yq,$q=Zq+1|0,f[et>>2]=$q,0|aw(67390,et);break;case 26:_q=Zr,ar=Xr,br=ar>>>7,dr=65535&br,er=dr-32767|0,fr=_q+er|0,f[ft>>2]=fr,0|aw(67408,ft);break;case 27:gr=Xr,hr=gr>>>23,ir=511&hr,f[gt>>2]=ir,0|aw(67423,gt),jr=g,kr=h,lr=Xr,mr(jr,kr,lr,1);break;case 29:nr=Xr,qr=nr>>>23,sr=511&qr,f[ht>>2]=sr,0|aw(67439,ht),tr=g,ur=h,vr=Xr,mr(tr,ur,vr,1);break;case 28:wr=Xr,xr=wr>>>23,yr=511&xr,f[it>>2]=yr,0|aw(67454,it),zr=g,Ar=h,Cr=Xr,mr(zr,Ar,Cr,1);break;case 31:Dr=Xr,Er=Dr>>>23,Fr=511&Er,f[jt>>2]=Fr,0|aw(67469,jt);break;default:Gr=Xr,Hr=127&Gr,Ir=Xr,Jr=Ir>>>23,Kr=511&Jr,Lr=Xr,Nr=Lr>>>14,Or=511&Nr,Pr=Xr,Qr=Pr>>>7,Rr=127&Qr,f[kt>>2]=Hr,Zu=kt+4|0,f[Zu>>2]=Kr,$u=kt+8|0,f[$u>>2]=Or,_u=kt+12|0,f[_u>>2]=Rr,0|aw(67481,kt)}while(0);Sr=g,Tr=Wr,Xc(Sr,Tr),Ur=Zr,Vr=Ur+1|0,Zr=Vr}0|aw(66199,lt),l=uv}function mr(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0;ga=l,l=l+48|0,(0|l)>=(0|m)&&X(),ea=ga+16|0,da=ga+8|0,ca=ga,g=a,h=b,u=c,F=d,ba=0,Q=h,Y=Q+24|0,Z=0|f[Y>>2],$=0!=(0|Z);do if($){if(_=F,aa=1&_,i=0!=(0|aa),i?(j=u,k=j>>>23,n=511&k,o=h,p=0|e[o>>1],q=65535&p,r=(0|n)>=(0|q),r&&(fa=4)):fa=4,4==(0|fa)){if(s=F,t=2&s,v=0!=(0|t),!v)break;if(w=u,x=w>>>14,y=511&x,z=h,A=0|e[z>>1],B=65535&A,C=(0|y)>=(0|B))break}return 0|aw(66201,da),D=F,E=1&D,G=0!=(0|E),G&&(H=g,I=h,J=u,K=J>>>23,L=511&K,M=0|nr(H,I,L,0),ba=M),N=F,O=2&N,P=0!=(0|O),P&&(R=g,S=h,T=u,U=T>>>14,V=511&U,W=ba,0|nr(R,S,V,W)),0|aw(66199,ea),void(l=ga)}while(0);0|aw(66199,ca),l=ga}function nr(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0;if($=l,l=l+48|0,(0|l)>=(0|m)&&X(),W=$+8|0,V=$,h=a,u=b,F=c,N=d,O=F,P=0==(0|O))return g=0,M=g,l=$,0|M;for(T=0;;){if(Q=T,R=Q+1|0,S=u,i=0|e[S>>1],j=65535&i,k=R>>>0<j>>>0,!k){Z=10;break}if(n=T,o=u,p=o+24|0,q=0|f[p>>2],r=q+(n<<3)|0,s=r+4|0,t=0|e[s>>1],v=65535&t,w=F,x=(0|v)==(0|w),y=T,x)break;L=y+1|0,T=L}return 10==(0|Z)?(g=0,M=g,l=$,0|M):(z=u,A=z+24|0,B=0|f[A>>2],C=B+(y<<3)|0,D=0|f[C>>2],U=D,E=N,G=0!=(0|E),G&&0|aw(66205,V),H=F,I=h,J=U,K=0|xi(I,J),f[W>>2]=H,Y=W+4|0,f[Y>>2]=K,0|aw(66207,W),g=1,M=g,l=$,0|M)}function or(a,b,c){a|=0,b|=0,c|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0;for(P=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,f=b,s=c,D=s,F=65535&D,G=F<<8,L=G,N=0;;){if(H=N,I=f,J=H>>>0<I>>>0,!J)break;for(K=e,g=K+1|0,e=g,h=0|d[K>>0],i=255&h,j=L,k=j|i,L=k,M=0;;){if(n=M,o=n>>>0<8,!o)break;p=L,q=p<<1,L=q,r=L,t=16777216&r,u=0!=(0|t),u&&(v=L,w=17834240^v,L=w),x=M,y=x+1|0,M=y}z=N,A=z+1|0,N=A}return B=L,C=B>>>8,E=65535&C,l=P,0|E}function pr(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,H=0;if(H=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,r=b,y=d,z=0!=(0|y),z&&(A=r,B=d,C=B+40|0,D=0|f[C>>2],E=A>>>0<D>>>0)){if(F=0,e=d,g=e+36|0,h=0|f[g>>2],i=0!=(0|h),j=d,!i)return k=j+28|0,n=0|f[k>>2],c=n,x=c,l=H,0|x;if(o=j+36|0,p=0|f[o>>2],q=r,s=0|qr(p,q),F=s,t=0!=(0|s))return u=F,v=u+4|0,w=0|f[v>>2],c=w,x=c,l=H,0|x}return c=0,x=c,l=H,0|x}function qr(a,b){a|=0,b|=0;var c=0,d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,Y=0;if(Y=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,s=b,D=s,M=d,N=0|f[M>>2],O=D>>>0>=N>>>0)return c=0,L=c,l=Y,0|L;for(P=d,Q=P+8|0,R=0|f[Q>>2],U=R,g=d,h=g+4|0,i=0|e[h>>1],j=65535&i,S=j;;){if(k=S,n=(0|k)>0,!n)break;o=S,p=(0|o)/2&-1,V=p,q=U,r=V,t=q+(r<<2)|0,T=t,u=s,v=T,w=0|f[v>>2],x=0|f[w>>2],y=u>>>0<x>>>0,y?(G=V,S=G):(z=T,A=z+4|0,U=A,B=V,C=B+1|0,E=S,F=E-C|0,S=F)}return H=U,I=H+-4|0,U=I,J=U,K=0|f[J>>2],c=K,L=c,l=Y,0|L}function rr(a,b){a|=0,b|=0;var c=0,d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ia=0;Ia=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,s=b,D=d,O=0!=(0|D);a:do if(O&&($=s,ja=d,ua=ja+40|0,Aa=0|f[ua>>2],Ba=$>>>0<Aa>>>0)){if(Da=0,g=d,h=g+36|0,i=0|f[h>>2],j=0!=(0|i),k=d,!j)return n=k+32|0,o=0|f[n>>2],p=0!=(0|o),p?(q=s,r=d,t=r+32|0,u=0|f[t>>2],v=u+(q<<1)|0,w=0|e[v>>1],x=65535&w,y=x):y=-1,c=y,za=c,l=Ia,0|za;if(z=k+36|0,A=0|f[z>>2],B=s,C=0|qr(A,B),Da=C,E=0!=(0|C)){switch(F=Da,G=F+16|0,H=0|f[G>>2],0|H){case 0:return I=s,J=Da,K=0|f[J>>2],L=I-K|0,M=Da,N=M+20|0,P=0|f[N>>2],Q=P+(L<<1)|0,R=0|e[Q>>1],S=65535&R,c=S,za=c,l=Ia,0|za;case 1:break;default:break a}for(T=Da,U=T+20|0,V=0|f[U>>2],Fa=V,W=Da,Y=W+12|0,Z=0|f[Y>>2],Ca=Z;;){if(_=Ca,aa=_>>>0>0,!aa)break;ba=Ca,ca=(ba>>>0)/2&-1,Ga=ca,da=Fa,ea=Ga,fa=da+(ea<<3)|0,Ea=fa,ga=s,ha=Ea,ia=0|f[ha>>2],ka=ga>>>0<ia>>>0,ka?(ra=Ga,Ca=ra):(la=Ea,ma=la+8|0,Fa=ma,na=Ga,oa=na+1|0,pa=Ca,qa=pa-oa|0,Ca=qa)}return sa=Fa,ta=sa+-8|0,Fa=ta,va=Fa,wa=va+4|0,xa=0|e[wa>>1],ya=65535&xa,c=ya,za=c,l=Ia,0|za}}while(0);return c=-1,za=c,l=Ia,0|za}function sr(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,g=0|Jc(e,12),o=g,h=o,f[h>>2]=0|f[18642],f[h+4>>2]=0|f[18643],f[h+8>>2]=0|f[18644],i=o,j=d,k=j+36|0,f[k>>2]=i,n=o,l=q,0|n}function tr(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Ic=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,gd=0;if(gd=l,l=l+64|0,(0|l)>=(0|m)&&X(),bd=gd+12|0,cd=gd,h=a,nb=b,Ab=c,Lb=d,Wb=nb,fc=Wb+36|0,qc=0|f[fc>>2],Bc=0!=(0|qc),!Bc)return g=0,qb=g,l=gd,0|qb;if(Oc=nb,i=Oc+36|0,v=0|f[i>>2],ad=v,G=ad,R=G+4|0,ba=0|e[R>>1],ma=65535&ba,xa=(0|ma)>0,xa&&(Ia=nb,Ta=Ia+28|0,cb=0|f[Ta>>2],ob=ad,rb=ob+4|0,sb=0|e[rb>>1],tb=65535&sb,ub=tb-1|0,vb=ad,wb=vb+8|0,xb=0|f[wb>>2],yb=xb+(ub<<2)|0,zb=0|f[yb>>2],Bb=zb+4|0,Cb=0|f[Bb>>2],Db=0|yv(cb,Cb),Eb=0==(0|Db)))return g=0,qb=g,l=gd,0|qb;Fb=h,Gb=0|Jc(Fb,24),ed=Gb,Hb=ad,Ib=Hb+8|0,Jb=0|f[Ib>>2],Kb=0!=(0|Jb),Mb=h,Kb?(Nb=ad,Ob=Nb+8|0,Pb=0|f[Ob>>2],Qb=ad,Rb=Qb+4|0,Sb=0|e[Rb>>1],Tb=65535&Sb,Ub=Tb+1|0,Vb=Ub<<2,Xb=0|Hc(Mb,Pb,Vb),_b=Xb):(Yb=0|Jc(Mb,4),_b=Yb),Zb=ad,$b=Zb+8|0,f[$b>>2]=_b,ac=ed,bc=ad,cc=bc+4|0,dc=0|e[cc>>1],ec=dc+1<<16>>16,e[cc>>1]=ec,gc=65535&dc,hc=ad,ic=hc+8|0,jc=0|f[ic>>2],kc=jc+(gc<<2)|0,f[kc>>2]=ac,lc=Lb,mc=Ab,nc=lc-mc|0,Zc=nc,oc=Ab,pc=ed,f[pc>>2]=oc,rc=Lb,sc=ad,f[sc>>2]=rc,tc=nb,uc=tc+28|0,vc=0|f[uc>>2],wc=0|Jv(vc),$c=wc,xc=h,yc=nb,zc=yc+28|0,Ac=0|f[zc>>2],Cc=$c,Dc=0|hi(xc,Ac,Cc),Ec=ed,Fc=Ec+8|0,f[Fc>>2]=Dc,f[bd>>2]=0,Gc=h,Ic=ed,Kc=Ic+8|0,Lc=0|f[Kc>>2],Mc=0|si(Gc,Lc,bd),Nc=ed,Pc=Nc+4|0,f[Pc>>2]=Mc,Qc=nb,Rc=Qc+32|0,Sc=0|f[Rc>>2],Tc=Ab,Uc=Sc+(Tc<<1)|0,Vc=Lb,Wc=Ab,Xc=Vc-Wc|0,Yc=0|ur(Uc,Xc),j=ed,k=j+16|0,f[k>>2]=Yc,n=ed,o=n+20|0,f[o>>2]=0,p=ed,q=p+16|0,r=0|f[q>>2];a:do switch(0|r){case 0:for(s=Zc,t=ed,u=t+12|0,f[u>>2]=s,w=h,x=Zc,y=x<<1,z=0|Jc(w,y),A=ed,B=A+20|0,f[B>>2]=z,_c=0;;){if(C=_c,D=Zc,E=C>>>0<D>>>0,!E)break a;F=Ab,H=_c,I=F+H|0,J=nb,K=J+32|0,L=0|f[K>>2],M=L+(I<<1)|0,N=0|e[M>>1],O=_c,P=ed,Q=P+20|0,S=0|f[Q>>2],T=S+(O<<1)|0,e[T>>1]=N,U=_c,V=U+1|0,_c=V}break;case 1:for(dd=0,W=h,Y=0|Jc(W,8),Z=ed,$=Z+20|0,f[$>>2]=Y,_=ed,aa=_+12|0,f[aa>>2]=0,_c=0;;){if(ca=_c,da=Zc,ea=ca>>>0<da>>>0,!ea)break a;fa=Ab,ga=_c,ha=fa+ga|0,ia=nb,ja=ia+32|0,ka=0|f[ja>>2],la=ka+(ha<<1)|0,na=0|e[la>>1],oa=65535&na,pa=dd,qa=65535&pa,ra=(0|oa)==(0|qa),ra||(sa=h,ta=ed,ua=ta+20|0,va=0|f[ua>>2],wa=ed,ya=wa+12|0,za=0|f[ya>>2],Aa=za+1|0,Ba=Aa<<3,Ca=0|Hc(sa,va,Ba),Da=ed,Ea=Da+20|0,f[Ea>>2]=Ca,Fa=Ab,Ga=_c,Ha=Fa+Ga|0,f[cd>>2]=Ha,Ja=Ab,Ka=_c,La=Ja+Ka|0,Ma=nb,Na=Ma+32|0,Oa=0|f[Na>>2],Pa=Oa+(La<<1)|0,Qa=0|e[Pa>>1],Ra=cd+4|0,e[Ra>>1]=Qa,Sa=ed,Ua=Sa+12|0,Va=0|f[Ua>>2],Wa=ed,Xa=Wa+20|0,Ya=0|f[Xa>>2],Za=Ya+(Va<<3)|0,f[Za>>2]=0|f[cd>>2],f[Za+4>>2]=0|f[cd+4>>2],$a=ed,_a=$a+12|0,ab=0|f[_a>>2],bb=ab+1|0,f[_a>>2]=bb,db=Ab,eb=_c,fb=db+eb|0,gb=nb,hb=gb+32|0,ib=0|f[hb>>2],jb=ib+(fb<<1)|0,kb=0|e[jb>>1],dd=kb),lb=_c,mb=lb+1|0,_c=mb}}while(0);return pb=ed,g=pb,qb=g,l=gd,0|qb}function ur(a,b){a|=0,b|=0;var c=0,d=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,F=0;for(F=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,d=b,C=0,D=-1,B=0;;){if(r=B,u=d,v=r>>>0<u>>>0,!v)break;w=B,x=c,y=x+(w<<1)|0,z=0|e[y>>1],A=65535&z,f=D,g=(0|A)!=(0|f),g&&(h=C,i=h+1|0,C=i),j=B,k=j+1|0,B=k}return n=d,o=n<<1,p=C,q=p<<3,s=o>>>0<=q>>>0,t=s?0:1,l=F,0|t}function vr(a,b){a|=0,b|=0;var c=0,d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0;if(P=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,s=d,D=0!=(0|s),!D)return void(l=P);for(N=0;;){if(H=N,I=d,J=I+4|0,K=0|e[J>>1],L=65535&K,M=H>>>0<L>>>0,g=c,!M)break;h=N,i=d,j=i+8|0,k=0|f[j>>2],n=k+(h<<2)|0,o=0|f[n>>2],p=o+20|0,q=0|f[p>>2],Dc(g,q),r=c,t=N,u=d,v=u+8|0,w=0|f[v>>2],x=w+(t<<2)|0,y=0|f[x>>2],Dc(r,y),z=N,A=z+1|0,N=A}B=d,C=B+8|0,E=0|f[C>>2],Dc(g,E),F=c,G=d,Dc(F,G),l=P}function wr(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;s=l,l=l+32|0,(0|l)>=(0|m)&&X(),q=s,f=b,g=c,h=d,i=e,j=f,k=h,n=i,ng(q,j,k,n),o=f,p=g,bq(a,o,p,1,q),l=s}function xr(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+32|0,(0|l)>=(0|m)&&X(),n=p+16|0,h=p,e=b,g=c,i=e,f[n>>2]=0|f[d>>2],f[n+4>>2]=0|f[d+4>>2],zg(h,i,n),f[d>>2]=0|f[h>>2],f[d+4>>2]=0|f[h+4>>2],j=e,k=g,bq(a,j,k,1,d),l=p}function yr(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,P=0;P=l,l=l+16|0,(0|l)>=(0|m)&&X(),L=P+8|0,c=a,e=0|f[b>>2],s=c,D=s+20|0,f[D>>2]=e,F=c,G=F+92|0,H=G+452|0,I=0|d[H>>0],J=(255&I)>>>3,K=1&J,g=K<<24>>24!=0,h=0|f[18645],i=0!=(0|h),M=g|i,M||(f[18645]=1,j=c,k=c,n=k+20|0,o=0|f[n>>2],zr(j,o)),p=c,q=0|f[p>>2],r=0!=(0|q),t=c,r&&(E=0|f[t>>2],Aa(0|E,1)),u=t+92|0,v=u+452|0,w=0|d[v>>0],x=(255&w)>>>3,y=1&x,z=y<<24>>24!=0,A=0|f[18645],B=0!=(0|A),N=z|B,N&&xa(),f[18645]=1,C=c,f[L>>2]=0|f[b>>2],f[L+4>>2]=0|f[b+4>>2],Rf(C,L),xa()}function zr(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0;for(lb=l,l=l+80|0,(0|l)>=(0|m)&&X(),e=lb+72|0,d=lb+64|0,c=lb+56|0,v=lb+32|0,G=lb+8|0,R=lb,g=a,h=b,ba=g,ma=ba+12|0,xa=0|f[ma>>2],Ia=xa+16|0,Ta=0|f[Ia>>2],cb=Ta,i=cb,k=i+28|0,n=0|f[k>>2],jb=n,o=g,p=h,q=g,r=0|ki(q,67505,5),s=cb,t=g,u=t+12|0,w=0|f[u>>2],x=w+20|0,y=0|f[x>>2],z=s,A=y,B=z-A|0,C=(0|B)/48&-1,Ar(v,C),f[c>>2]=0|f[v>>2],f[c+4>>2]=0|f[v+4>>2],$i(o,p,r,c);;){if(D=cb,E=g,F=E+12|0,H=0|f[F>>2],I=H+20|0,J=0|f[I>>2],K=D>>>0>=J>>>0,!K){kb=11;break}if(L=cb,M=L+32|0,N=0|f[M>>2],db=N,O=db,P=0==(0|O),Q=jb,S=0!=(0|Q),hb=P&S,hb&&(T=jb,U=T+-4|0,db=U),V=db,W=0!=(0|V),W&&(Y=cb,Z=Y+4|0,$=0|f[Z>>2],_=0!=(0|$),_&&(aa=cb,ca=aa+4|0,da=0|f[ca>>2],ea=0|f[da>>2],fa=ea>>>11,ga=128&fa,ha=0!=(0|ga),!ha&&(ia=cb,ja=ia+4|0,ka=0|f[ja>>2],la=ka+12|0,na=0|f[la>>2],fb=na,oa=fb,pa=db,qa=fb,ra=qa+8|0,sa=0|f[ra>>2],ta=pa,ua=sa,va=ta-ua|0,wa=(0|va)/4&-1,ya=0|rr(oa,wa),gb=ya,za=fb,Aa=db,Ba=fb,Ca=Ba+8|0,Da=0|f[Ca>>2],Ea=Aa,Fa=Da,Ga=Ea-Fa|0,Ha=(0|Ga)/4&-1,Ja=0|pr(za,Ha),eb=Ja,Ka=gb,La=(0|Ka)!=-1,Ma=eb,Na=0!=(0|Ma),ib=La&Na))))break;$a=cb,_a=$a+28|0,ab=0|f[_a>>2],jb=ab,bb=cb,j=bb+-48|0,cb=j}return 11==(0|kb)?void(l=lb):(Oa=g,Pa=h,Qa=g,Ra=0|ki(Qa,67511,4),Sa=g,Ua=eb,qg(G,Sa,Ua),f[d>>2]=0|f[G>>2],f[d+4>>2]=0|f[G+4>>2],$i(Oa,Pa,Ra,d),Va=g,Wa=h,Xa=g,Ya=0|ki(Xa,67516,4),Za=gb,Ar(R,Za),f[e>>2]=0|f[R>>2],f[e+4>>2]=0|f[R+4>>2],$i(Va,Wa,Ya,e),void(l=lb))}function Ar(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=3,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function Br(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;u=l,l=l+64|0,(0|l)>=(0|m)&&X(),d=u+48|0,s=u+40|0,r=u+16|0,i=u+8|0,j=u,e=a,g=b,h=c,k=e,n=h,qg(i,k,n),f[r>>2]=0|f[i>>2],f[r+4>>2]=0|f[i+4>>2],o=e,p=e,q=g,f[s>>2]=0|f[r>>2],f[s+4>>2]=0|f[r+4>>2],xr(j,p,q,s),f[d>>2]=0|f[j>>2],f[d+4>>2]=0|f[j+4>>2],yr(o,d)}function Cr(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,nb=0;for(nb=l,l=l+192|0,(0|l)>=(0|m)&&X(),k=nb+168|0,ab=nb+160|0,i=nb+152|0,_a=nb+144|0,h=nb+136|0,$a=nb+128|0,o=nb+120|0,cb=nb+112|0,n=nb+104|0,bb=nb+96|0,g=nb+88|0,Za=nb+80|0,Ya=nb+48|0,Q=nb+40|0,aa=nb+32|0,la=nb+24|0,wa=nb+16|0,Ha=nb+8|0,Sa=nb,t=b,u=c,F=e,Va=u,kb=Va,v=kb,db=v,w=t,Jn(Ya,w,4);;){if(x=kb,y=0|d[x>>0],z=y<<24>>24!=0,!z)break;if(A=kb,B=A+1|0,kb=B,C=0|d[A>>0],eb=C,D=eb,E=D<<24>>24,G=37==(0|E)){if(H=kb,I=0|d[H>>0],J=I<<24>>24,K=83==(0|J),!K)continue;L=kb,M=db,N=L,O=M,P=N-O|0,R=P-1|0,lb=R,S=t,T=t,U=db,V=lb,ng(Q,T,U,V),f[Za>>2]=0|f[Ya>>2],f[Za+4>>2]=0|f[Ya+4>>2],f[g>>2]=0|f[Q>>2],f[g+4>>2]=0|f[Q+4>>2],$n(S,Za,g),W=t,Y=F,Wa=0|f[Y>>2],Z=Wa,$=4,gb=$,fb=gb-1|0,_=Z+fb|0,ba=4,jb=ba,ib=jb-1|0,hb=ib^-1,ca=_&hb,da=ca,p=+j[da>>2],r=da+4|0,q=0|f[r>>2],Xa=da+8|0,f[Y>>2]=Xa,j[aa>>2]=p,s=aa+4|0,f[s>>2]=q,f[bb>>2]=0|f[Ya>>2],f[bb+4>>2]=0|f[Ya+4>>2],f[n>>2]=0|f[aa>>2],f[n+4>>2]=0|f[aa+4>>2],$n(W,bb,n),ea=kb,fa=ea+1|0,db=fa}else if(ga=eb,ha=ga<<24>>24,ia=92==(0|ha)){if(ja=kb,ka=0|d[ja>>0],ma=ka<<24>>24!=0,!ma)break;na=kb,oa=db,pa=na,qa=oa,ra=pa-qa|0,sa=ra-1|0,lb=sa,ta=t,ua=t,va=db,xa=lb,ng(la,ua,va,xa),f[cb>>2]=0|f[Ya>>2],f[cb+4>>2]=0|f[Ya+4>>2],f[o>>2]=0|f[la>>2],f[o+4>>2]=0|f[la+4>>2],$n(ta,cb,o),ya=t,za=t,Aa=kb,ng(wa,za,Aa,1),f[$a>>2]=0|f[Ya>>2],f[$a+4>>2]=0|f[Ya+4>>2],f[h>>2]=0|f[wa>>2],f[h+4>>2]=0|f[wa+4>>2],$n(ya,$a,h),Ba=kb,Ca=Ba+1|0,kb=Ca,db=Ca}}return Da=db,Ea=u,Fa=(0|Da)==(0|Ea),Fa?(Ga=t,Ia=u,qg(a,Ga,Ia),void(l=nb)):(Ja=kb,Ka=db,La=Ja,Ma=Ka,Na=La-Ma|0,lb=Na,Oa=t,Pa=t,Qa=db,Ra=lb,ng(Ha,Pa,Qa,Ra),f[_a>>2]=0|f[Ya>>2],f[_a+4>>2]=0|f[Ya+4>>2],f[i>>2]=0|f[Ha>>2],f[i+4>>2]=0|f[Ha+4>>2],$n(Oa,_a,i),Ta=t,Ua=t,ng(Sa,Ua,0,0),f[ab>>2]=0|f[Ya>>2],f[ab+4>>2]=0|f[Ya+4>>2],f[k>>2]=0|f[Sa>>2],f[k+4>>2]=0|f[Sa+4>>2],no(a,Ta,ab,k),void(l=nb))}function Dr(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+48|0,(0|l)>=(0|m)&&X(),k=p+16|0,n=p+8|0,h=p,e=b,g=c,f[k>>2]=d,i=e,j=g,Cr(h,i,j,k),f[n>>2]=0|f[h>>2],f[n+4>>2]=0|f[h+4>>2],f[a>>2]=0|f[n>>2],f[a+4>>2]=0|f[n+4>>2],l=p}function Er(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;w=l,l=l+80|0,(0|l)>=(0|m)&&X(),e=w+64|0,u=w+56|0,s=w+24|0,
+t=w+16|0,j=w+8|0,k=w,g=a,h=b,i=c,f[s>>2]=d,n=g,o=i,Cr(j,n,o,s),f[t>>2]=0|f[j>>2],f[t+4>>2]=0|f[j+4>>2],p=g,q=g,r=h,f[u>>2]=0|f[t>>2],f[u+4>>2]=0|f[t+4>>2],xr(k,q,r,u),f[e>>2]=0|f[k>>2],f[e+4>>2]=0|f[k+4>>2],yr(p,e)}function Fr(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0;A=l,l=l+96|0,(0|l)>=(0|m)&&X(),y=A+80|0,x=A+56|0,w=A+40|0,v=A+24|0,o=A+16|0,p=A+8|0,q=A,e=a,g=b,n=c,f[v>>2]=d,r=e,s=n,Cr(o,r,s,v),f[w>>2]=0|f[o>>2],f[w+4>>2]=0|f[o+4>>2],t=w+8|0,u=g,Gr(p,u),f[t>>2]=0|f[p>>2],f[t+4>>2]=0|f[p+4>>2],h=e,i=e,j=0|tp(i,67521),bq(q,h,j,2,w),f[x>>2]=0|f[q>>2],f[x+4>>2]=0|f[q+4>>2],k=e,f[y>>2]=0|f[x>>2],f[y+4>>2]=0|f[x+4>>2],yr(k,y)}function Gr(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=4,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function Hr(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,N=0;return N=l,l=l+48|0,(0|l)>=(0|m)&&X(),K=N+16|0,L=N+8|0,s=N,d=a,e=b,f[K>>2]=c,D=d,E=e,Cr(s,D,E,K),f[L>>2]=0|f[s>>2],f[L+4>>2]=0|f[s+4>>2],F=0|f[637],0|$v(67531,F),G=0|f[L>>2],H=0|f[G>>2],I=H>>>11,J=8&I,g=0!=(0|J),h=0|f[L>>2],i=h+12|0,g?B=i:(j=i+8|0,k=0|f[j>>2],B=k),n=0|f[L>>2],o=0|f[n>>2],p=o>>>11,q=8&p,r=0!=(0|q),t=0|f[L>>2],r?(u=0|f[t>>2],v=u>>>11,w=496&v,x=w>>4,C=x,A=0|f[637],0|_v(B,C,1,A),void(l=N)):(y=t+12|0,z=0|f[y>>2],C=z,A=0|f[637],0|_v(B,C,1,A),void(l=N))}function Ir(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,N=0;N=l,l=l+48|0,(0|l)>=(0|m)&&X(),K=N+16|0,L=N+8|0,s=N,d=a,e=b,f[K>>2]=c,D=d,E=e,Cr(s,D,E,K),f[L>>2]=0|f[s>>2],f[L+4>>2]=0|f[s+4>>2],F=0|f[637],0|$v(67541,F),G=0|f[L>>2],H=0|f[G>>2],I=H>>>11,J=8&I,g=0!=(0|J),h=0|f[L>>2],i=h+12|0,g?B=i:(j=i+8|0,k=0|f[j>>2],B=k),n=0|f[L>>2],o=0|f[n>>2],p=o>>>11,q=8&p,r=0!=(0|q),t=0|f[L>>2],r?(u=0|f[t>>2],v=u>>>11,w=496&v,x=w>>4,C=x,A=0|f[637],0|_v(B,C,1,A),Qa(1)):(y=t+12|0,z=0|f[y>>2],C=z,A=0|f[637],0|_v(B,C,1,A),Qa(1))}function Jr(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=b,f=c,g=d,h=e,i=f,j=g,Kr(a,h,i,j,1),l=n}function Kr(a,b,c,e,g){a|=0,b|=0,c|=0,e|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0;Ga=l,l=l+160|0,(0|l)>=(0|m)&&X(),k=Ga+136|0,Ca=Ga+128|0,Ba=Ga+120|0,j=Ga+112|0,i=Ga+104|0,Aa=Ga+96|0,h=Ga+88|0,Ea=Ga,za=Ga+64|0,V=Ga+48|0,fa=Ga+40|0,qa=Ga+32|0,va=Ga+16|0,wa=Ga+8|0,n=b,o=c,z=e,K=g,Lr(V),f[za>>2]=0|f[V>>2],f[za+4>>2]=0|f[V+4>>2],xa=o;a:do switch(0|xa){case 0:break;case 1:if(p=z,q=p+4|0,r=0|f[q>>2],s=0==(0|r),s&&(t=z,u=0|f[t>>2],v=0!=(0|u),!v))break a;w=K,x=w<<24>>24!=0;do if(x){if(y=n,A=z,f[h>>2]=0|f[A>>2],f[h+4>>2]=0|f[A+4>>2],Xg(fa,y,h),f[za>>2]=0|f[fa>>2],f[za+4>>2]=0|f[fa+4>>2],B=za+4|0,C=0|f[B>>2],D=0==(0|C),D&&(E=0|f[za>>2],F=0!=(0|E),!F))break;G=n,H=n,I=0|tp(H,67967),f[Aa>>2]=0|f[za>>2],f[Aa+4>>2]=0|f[za+4>>2],xr(qa,G,I,Aa),f[za>>2]=0|f[qa>>2],f[za+4>>2]=0|f[qa+4>>2];break a}while(0);Da=0,Fa=10;break;case 3:case 2:Da=1,Fa=10;break;default:_=n,aa=n,ba=0|tp(aa,68855),ca=o,Ar(wa,ca),d[Ea>>0]=0|d[wa>>0],d[Ea+1>>0]=0|d[wa+1>>0],d[Ea+2>>0]=0|d[wa+2>>0],d[Ea+3>>0]=0|d[wa+3>>0],d[Ea+4>>0]=0|d[wa+4>>0],d[Ea+5>>0]=0|d[wa+5>>0],d[Ea+6>>0]=0|d[wa+6>>0],d[Ea+7>>0]=0|d[wa+7>>0],Er(_,ba,67589,Ea)}while(0);do if(10==(0|Fa)){if(J=n,L=0|ki(J,67547,9),ya=L,M=n,N=z,O=ya,f[i>>2]=0|f[N>>2],f[i+4>>2]=0|f[N+4>>2],P=0|dq(M,i,O),Q=P<<24>>24!=0,R=n,Q){S=z,T=ya,U=Da,W=z,Y=W+8|0,f[j>>2]=0|f[S>>2],f[j+4>>2]=0|f[S+4>>2],Zj(va,R,j,T,U,Y),f[za>>2]=0|f[va>>2],f[za+4>>2]=0|f[va+4>>2];break}Z=n,$=0|tp(Z,68905),Br(R,$,67557)}while(0);return da=o,(ea=(0|da)>0)?(ga=n,ha=n,ia=ha+568|0,ja=0|f[ia>>2],f[Ba>>2]=0|f[za>>2],f[Ba+4>>2]=0|f[za+4>>2],ka=0|Kf(ga,Ba,ja),la=ka<<24>>24!=0,la||(ma=n,na=n,oa=0|tp(na,68905),Br(ma,oa,67629)),pa=o,(ra=(0|pa)>2)?(sa=n,ta=z,ua=ta+16|0,f[Ca>>2]=0|f[za>>2],f[Ca+4>>2]=0|f[za+4>>2],f[k>>2]=0|f[ua>>2],f[k+4>>2]=0|f[ua+4>>2],Mr(sa,Ca,k),f[a>>2]=0|f[za>>2],f[a+4>>2]=0|f[za+4>>2],void(l=Ga)):(f[a>>2]=0|f[za>>2],f[a+4>>2]=0|f[za+4>>2],void(l=Ga))):(f[a>>2]=0|f[za>>2],f[a+4>>2]=0|f[za+4>>2],void(l=Ga))}function Lr(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Mr(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+32|0,(0|l)>=(0|m)&&X(),i=n+24|0,j=n,g=n+8|0,e=a,h=e,d[j>>0]=0|d[c>>0],d[j+1>>0]=0|d[c+1>>0],d[j+2>>0]=0|d[c+2>>0],d[j+3>>0]=0|d[c+3>>0],d[j+4>>0]=0|d[c+4>>0],d[j+5>>0]=0|d[c+5>>0],d[j+6>>0]=0|d[c+6>>0],d[j+7>>0]=0|d[c+7>>0],f[i>>2]=0|f[b>>2],f[i+4>>2]=0|f[b+4>>2],Yj(g,h,i,67655,1,j),l=n}function Nr(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=0|f[d>>2],g=255&e,h=j+4|0,f[h>>2]=g,i=c,f[j>>2]=i,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function Or(a,b,c,e,g){a|=0,b|=0,c|=0,e|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,F=0;F=l,l=l+112|0,(0|l)>=(0|m)&&X(),A=F+104|0,h=F+96|0,B=F,z=F+72|0,y=F+56|0,r=F+48|0,s=F+40|0,t=F+32|0,u=F+24|0,i=a,j=b,q=e,f[y>>2]=g,v=i,w=i,x=0|tp(w,67669),Nr(r,x),k=i,n=q,Cr(s,k,n,y),o=j,Gr(t,o),d[B>>0]=0|d[s>>0],d[B+1>>0]=0|d[s+1>>0],d[B+2>>0]=0|d[s+2>>0],d[B+3>>0]=0|d[s+3>>0],d[B+4>>0]=0|d[s+4>>0],d[B+5>>0]=0|d[s+5>>0],d[B+6>>0]=0|d[s+6>>0],d[B+7>>0]=0|d[s+7>>0],C=B+8|0,d[C>>0]=0|d[t>>0],d[C+1>>0]=0|d[t+1>>0],d[C+2>>0]=0|d[t+2>>0],d[C+3>>0]=0|d[t+3>>0],d[C+4>>0]=0|d[t+4>>0],d[C+5>>0]=0|d[t+5>>0],d[C+6>>0]=0|d[t+6>>0],d[C+7>>0]=0|d[t+7>>0],D=B+16|0,d[D>>0]=0|d[c>>0],d[D+1>>0]=0|d[c+1>>0],d[D+2>>0]=0|d[c+2>>0],d[D+3>>0]=0|d[c+3>>0],d[D+4>>0]=0|d[c+4>>0],d[D+5>>0]=0|d[c+5>>0],d[D+6>>0]=0|d[c+6>>0],d[D+7>>0]=0|d[c+7>>0],f[h>>2]=0|f[r>>2],f[h+4>>2]=0|f[r+4>>2],Yj(u,v,h,67683,3,B),f[z>>2]=0|f[u>>2],f[z+4>>2]=0|f[u+4>>2],p=i,f[A>>2]=0|f[z>>2],f[A+4>>2]=0|f[z+4>>2],yr(p,A)}function Pr(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,sa=0;sa=l,l=l+48|0,(0|l)>=(0|m)&&X(),b=sa+32|0,d=sa+8|0,r=sa,c=a,C=c,N=c,Z=N+32|0,ia=0|f[Z>>2],la=0|Dp(C,67687,ia),oa=la,ma=c,na=ma+568|0,f[na>>2]=la,e=oa,g=0|f[e>>2],h=g>>>11,i=h&-256,j=18|i,k=oa,n=0|f[k>>2],o=2097151&j,p=o<<11,q=2047&n,s=q|p,f[k>>2]=s,t=c,u=oa,Yp(t,u,67547,238,4096),v=c,w=oa,Jp(v,w,67547,276,4096),x=c,y=oa,Jp(x,y,68953,277,4096),z=c,A=oa,Jp(z,A,68977,278,0),B=c,D=oa,Jp(B,D,67705,279,0),E=c,F=oa,Jp(E,F,68986,280,0),G=c,H=oa,Jp(G,H,67723,281,0),I=c,J=c,K=J+568|0,L=0|f[K>>2],M=0|Dp(I,69398,L),O=c,P=O+572|0,f[P>>2]=M,Q=c,R=c,S=R+572|0,T=0|f[S>>2],U=0|Dp(Q,67967,T),pa=U,V=c,W=pa,Y=c,rg(d,Y,67733,13),f[b>>2]=0|f[d>>2],f[b+4>>2]=0|f[d+4>>2],xr(r,V,W,b),$=0|f[r>>2],_=c,aa=_+576|0,f[aa>>2]=$,ba=c,ca=c,da=ca+568|0,ea=0|f[da>>2],fa=0|Dp(ba,67747,ea),qa=fa,ga=c,ha=qa,0|Dp(ga,67759,ha),ja=c,ka=oa,0|Dp(ja,67771,ka),l=sa}function Qr(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0;return D=l,l=l+96|0,(0|l)>=(0|m)&&X(),v=D+80|0,y=D+72|0,A=D+64|0,u=D+56|0,z=D+48|0,B=D,x=D+32|0,t=D+24|0,e=D+8|0,d=b,j=d,f[B>>2]=t,k=0|Lp(j,67697,B),w=k,n=w,(o=0==(0|n))?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=D)):(p=d,f[z>>2]=0|f[c>>2],f[z+4>>2]=0|f[c+4>>2],f[u>>2]=0|f[t>>2],f[u+4>>2]=0|f[t+4>>2],q=0|kf(p,z,u),r=q<<24>>24!=0,r?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=D)):(s=d,f[A>>2]=0|f[c>>2],f[A+4>>2]=0|f[c+4>>2],es(e,s,A),f[x>>2]=0|f[e>>2],f[x+4>>2]=0|f[e+4>>2],g=d,h=d,i=0|ki(h,67700,4),f[y>>2]=0|f[x>>2],f[y+4>>2]=0|f[x+4>>2],f[v>>2]=0|f[t>>2],f[v+4>>2]=0|f[t+4>>2],cj(g,y,i,v),f[a>>2]=0|f[x>>2],f[a+4>>2]=0|f[x+4>>2],void(l=D)))}function Rr(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;return s=l,l=l+48|0,(0|l)>=(0|m)&&X(),p=s+32|0,n=s+24|0,q=s,o=s+8|0,d=b,e=d,f[q>>2]=o,g=0|Lp(e,67697,q),(h=1==(0|g))?(i=d,j=d,k=0|ki(j,67700,4),f[n>>2]=0|f[c>>2],f[n+4>>2]=0|f[c+4>>2],f[p>>2]=0|f[o>>2],f[p+4>>2]=0|f[o+4>>2],cj(i,n,k,p),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=s)):(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=s))}function Sr(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,F=0;return F=l,l=l+48|0,(0|l)>=(0|m)&&X(),B=F+32|0,A=F+24|0,C=F+8|0,d=b,e=d,s=d,t=0|ki(s,67700,4),f[A>>2]=0|f[c>>2],f[A+4>>2]=0|f[c+4>>2],Vj(C,e,A,t),u=C+4|0,v=0|f[u>>2],(w=16==(0|v))?(g=0|f[C>>2],D=g,h=D,i=h+4|0,j=0|f[i>>2],k=0!=(0|j),k||(n=d,o=n+48|0,p=0|f[o>>2],q=D,r=q+4|0,f[r>>2]=p),f[a>>2]=0|f[C>>2],f[a+4>>2]=0|f[C+4>>2],void(l=F)):(x=d,y=d,f[B>>2]=0|f[c>>2],f[B+4>>2]=0|f[c+4>>2],z=0|iq(y,B),qg(a,x,z),void(l=F))}function Tr(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,j=0;j=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=j+8|0,h=j,d=b,e=d,f[g>>2]=0|f[c>>2],f[g+4>>2]=0|f[c+4>>2],Yj(a,e,g,68977,0,h),l=j}function Ur(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0;ob=l,l=l+352|0,(0|l)>=(0|m)&&X(),hb=ob+328|0,ab=ob+320|0,gb=ob+312|0,fb=ob+304|0,Ta=ob+296|0,eb=ob+288|0,mb=ob+280|0,Va=ob+272|0,lb=ob+264|0,bb=ob+256|0,kb=ob+248|0,jb=ob+240|0,Za=ob+232|0,ib=ob+224|0,db=ob+216|0,Xa=ob+208|0,_a=ob+200|0,Ua=ob+192|0,Sa=ob+184|0,Ra=ob+176|0,cb=ob+160|0,$a=ob+152|0,Wa=ob+144|0,Ya=ob+136|0,e=ob+128|0,s=ob+120|0,D=ob+112|0,O=ob+104|0,$=ob+96|0,ja=ob+88|0,ua=ob+80|0,Fa=ob+72|0,Oa=ob+64|0,g=ob+56|0,h=ob+48|0,i=ob+40|0,j=ob+24|0,k=ob+16|0,n=ob+8|0,o=ob,d=b,p=d,q=d,r=0|ki(q,67700,4),f[Ra>>2]=0|f[c>>2],f[Ra+4>>2]=0|f[c+4>>2],Vj(e,p,Ra,r),f[$a>>2]=0|f[e>>2],f[$a+4>>2]=0|f[e+4>>2],t=d,u=d,v=0|ki(u,67511,4),f[Sa>>2]=0|f[c>>2],f[Sa+4>>2]=0|f[c+4>>2],Vj(s,t,Sa,v),f[Wa>>2]=0|f[s>>2],f[Wa+4>>2]=0|f[s+4>>2],w=d,x=d,y=0|ki(x,67516,4),f[Ua>>2]=0|f[c>>2],f[Ua+4>>2]=0|f[c+4>>2],Vj(D,w,Ua,y),f[Ya>>2]=0|f[D>>2],f[Ya+4>>2]=0|f[D+4>>2],z=$a+4|0,A=0|f[z>>2],B=0==(0|A),B?(C=0|f[$a>>2],E=0!=(0|C),F=1^E,H=F):H=0,G=1^H,I=1&G,J=255&I,Pa=J,K=Pa,L=K<<24>>24!=0,L&&(M=d,f[_a>>2]=0|f[$a>>2],f[_a+4>>2]=0|f[$a+4>>2],Vg(O,M,_a),f[$a>>2]=0|f[O>>2],f[$a+4>>2]=0|f[O+4>>2],N=0|f[$a>>2],P=0|f[N>>2],Q=P>>>11,R=8&Q,S=0!=(0|R),T=0|f[$a>>2],S?(U=0|f[T>>2],V=U>>>11,W=496&V,Y=W>>4,aa=Y):(Z=T+12|0,_=0|f[Z>>2],aa=_),ba=(0|aa)>0,ca=1&ba,da=255&ca,Pa=da),ea=Wa+4|0,fa=0|f[ea>>2],ga=0==(0|fa),ga?(ha=0|f[Wa>>2],ia=0!=(0|ha),ia&&(nb=10)):nb=10;do if(10==(0|nb)){if(ka=Ya+4|0,la=0|f[ka>>2],ma=0==(0|la),ma&&(na=0|f[Ya>>2],oa=0!=(0|na),!oa))break;return pa=d,f[Xa>>2]=0|f[Wa>>2],f[Xa+4>>2]=0|f[Wa+4>>2],Hg($,pa,Xa),f[cb>>2]=0|f[$>>2],f[cb+4>>2]=0|f[$+4>>2],qa=d,f[db>>2]=0|f[cb>>2],f[db+4>>2]=0|f[cb+4>>2],dh(ja,qa,db,67713,1),ra=d,f[ib>>2]=0|f[cb>>2],f[ib+4>>2]=0|f[cb+4>>2],f[Za>>2]=0|f[Ya>>2],f[Za+4>>2]=0|f[Ya+4>>2],hh(ua,ra,ib,Za),sa=d,f[jb>>2]=0|f[cb>>2],f[jb+4>>2]=0|f[cb+4>>2],dh(Fa,sa,jb,67715,2),ta=Pa,va=ta<<24>>24!=0,va&&(wa=d,f[kb>>2]=0|f[cb>>2],f[kb+4>>2]=0|f[cb+4>>2],f[bb>>2]=0|f[$a>>2],f[bb+4>>2]=0|f[$a+4>>2],gh(Oa,wa,kb,bb),xa=d,f[lb>>2]=0|f[cb>>2],f[lb+4>>2]=0|f[cb+4>>2],dh(g,xa,lb,67718,2)),ya=d,za=d,f[Va>>2]=0|f[c>>2],f[Va+4>>2]=0|f[c+4>>2],Aa=0|iq(za,Va),f[mb>>2]=0|f[cb>>2],f[mb+4>>2]=0|f[cb+4>>2],fh(h,ya,mb,Aa),Ba=Pa,(Ca=Ba<<24>>24!=0)?(Da=d,f[eb>>2]=0|f[cb>>2],f[eb+4>>2]=0|f[cb+4>>2],dh(i,Da,eb,67721,1),f[a>>2]=0|f[cb>>2],f[a+4>>2]=0|f[cb+4>>2],void(l=ob)):(f[a>>2]=0|f[cb>>2],f[a+4>>2]=0|f[cb+4>>2],void(l=ob))}while(0);return Ea=d,f[Ta>>2]=0|f[c>>2],f[Ta+4>>2]=0|f[c+4>>2],Ga=0|iq(Ea,Ta),Qa=Ga,Ha=d,Ia=Qa,qg(j,Ha,Ia),f[cb>>2]=0|f[j>>2],f[cb+4>>2]=0|f[j+4>>2],Ja=d,f[fb>>2]=0|f[cb>>2],f[fb+4>>2]=0|f[cb+4>>2],dh(k,Ja,fb,67715,2),Ka=Pa,La=Ka<<24>>24!=0,Ma=d,La?(f[gb>>2]=0|f[cb>>2],f[gb+4>>2]=0|f[cb+4>>2],f[ab>>2]=0|f[$a>>2],f[ab+4>>2]=0|f[$a+4>>2],gh(n,Ma,gb,ab),f[a>>2]=0|f[cb>>2],f[a+4>>2]=0|f[cb+4>>2],void(l=ob)):(Na=Qa,f[hb>>2]=0|f[cb>>2],f[hb+4>>2]=0|f[cb+4>>2],fh(o,Ma,hb,Na),f[a>>2]=0|f[cb>>2],f[a+4>>2]=0|f[cb+4>>2],void(l=ob))}function Vr(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,aa=0;return aa=l,l=l+112|0,(0|l)>=(0|m)&&X(),U=aa+96|0,T=aa+88|0,Y=aa+16|0,W=aa,t=aa+64|0,E=aa+56|0,M=aa+40|0,N=aa+32|0,e=a,g=c,O=b+4|0,P=0|f[O>>2],Q=21!=(0|P),Q&&(R=e,f[T>>2]=0|f[b>>2],f[T+4>>2]=0|f[b+4>>2],Hf(R,T,21)),h=0|f[b>>2],i=h+16|0,j=0|f[i>>2],k=g,(n=(0|j)!=(0|k))?(o=0|f[b>>2],p=o+16|0,q=0|f[p>>2],V=q,r=V,s=0!=(0|r),u=e,void(s?(v=e,w=0|tp(v,68905),x=e,y=V,z=0|f[y>>2],qg(t,x,z),A=e,B=g,C=0|f[B>>2],qg(E,A,C),d[W>>0]=0|d[t>>0],d[W+1>>0]=0|d[t+1>>0],d[W+2>>0]=0|d[t+2>>0],d[W+3>>0]=0|d[t+3>>0],d[W+4>>0]=0|d[t+4>>0],d[W+5>>0]=0|d[t+5>>0],d[W+6>>0]=0|d[t+6>>0],d[W+7>>0]=0|d[t+7>>0],Z=W+8|0,d[Z>>0]=0|d[E>>0],d[Z+1>>0]=0|d[E+1>>0],d[Z+2>>0]=0|d[E+2>>0],d[Z+3>>0]=0|d[E+3>>0],d[Z+4>>0]=0|d[E+4>>0],d[Z+5>>0]=0|d[E+5>>0],d[Z+6>>0]=0|d[E+6>>0],d[Z+7>>0]=0|d[E+7>>0],Er(u,w,67788,W)):(f[U>>2]=0|f[b>>2],f[U+4>>2]=0|f[b+4>>2],D=0|Wr(u,U),S=D,F=e,G=e,H=0|tp(G,68905),I=S,Xr(M,I),J=e,K=g,L=0|f[K>>2],qg(N,J,L),d[Y>>0]=0|d[M>>0],d[Y+1>>0]=0|d[M+1>>0],d[Y+2>>0]=0|d[M+2>>0],d[Y+3>>0]=0|d[M+3>>0],d[Y+4>>0]=0|d[M+4>>0],d[Y+5>>0]=0|d[M+5>>0],d[Y+6>>0]=0|d[M+6>>0],d[Y+7>>0]=0|d[M+7>>0],$=Y+8|0,d[$>>0]=0|d[N>>0],d[$+1>>0]=0|d[N+1>>0],d[$+2>>0]=0|d[N+2>>0],d[$+3>>0]=0|d[N+3>>0],d[$+4>>0]=0|d[N+4>>0],d[$+5>>0]=0|d[N+5>>0],d[$+6>>0]=0|d[N+6>>0],d[$+7>>0]=0|d[N+7>>0],Er(F,H,67825,Y)))):void(l=aa)}function Wr(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,K=0;K=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,r=b+4|0,C=0|f[r>>2];a:do switch(0|C){case 0:if(D=0|f[b>>2],E=0!=(0|D),F=d,E){G=F+72|0,H=0|f[G>>2],c=H;break a}I=F+76|0,e=0|f[I>>2],c=e;break a;case 2:g=d,h=g+68|0,i=0|f[h>>2],c=i;break;case 4:j=d,k=j+80|0,n=0|f[k>>2],c=n;break;case 3:o=d,p=o+64|0,q=0|f[p>>2],c=q;break;case 6:s=d,t=s+60|0,u=0|f[t>>2],c=u;break;case 7:v=d,w=v+32|0,x=0|f[w>>2],c=x;break;case 20:c=0;break;default:y=0|f[b>>2],z=y+4|0,A=0|f[z>>2],c=A}while(0);return B=c,l=K,0|B}function Xr(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=0|f[d>>2],g=255&e,h=j+4|0,f[h>>2]=g,i=c,f[j>>2]=i,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function Yr(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+16|0,(0|l)>=(0|m)&&X(),n=p+8|0,d=a,e=c,g=d,h=e,f[n>>2]=0|f[b>>2],f[n+4>>2]=0|f[b+4>>2],Vr(g,n,h),i=0|f[b>>2],j=i+20|0,k=0|f[j>>2],l=p,0|k}function Zr(a){a=+a;var b=0,c=0,e=0,f=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,z=0;for(z=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=z+12|0,j[b>>2]=a,x=b,w=4,v=0;;){if(c=w,n=c+-1|0,w=n,o=0!=(0|c),p=v,!o)break;q=65599*p|0,r=x,s=0|d[r>>0],t=s<<24>>24,u=q+t|0,v=u,e=x,f=e+1|0,x=f}return g=v,h=g>>5,i=p+h|0,v=i,k=v,l=z,0|k}function $r(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0;O=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a+4|0,r=0|f[c>>2],M=r,C=M;a:do switch(0|C){case 5:case 1:G=M,H=0^G,b=H;break;case 0:if(I=a+4|0,J=0|f[I>>2],K=0==(0|J),K&&(L=0|f[a>>2],d=0!=(0|L),!d)){e=M,g=1^e,b=g;break a}h=M,i=0^h,b=i;break;case 2:k=M,n=1^k,b=n;break;case 4:o=0|f[a>>2],p=M,q=o^p,b=q;break;case 3:s=0|f[a>>2],t=+(0|s),u=0|Zr(t),v=6^u,b=v;break;case 6:w=+j[a>>2],x=0|Zr(w),y=M,z=x^y,b=z;break;default:A=0|f[a>>2],B=A,D=M,E=B^D,b=E}while(0);return F=b,l=O,0|F}function _r(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;return v=l,l=l+16|0,(0|l)>=(0|m)&&X(),t=v+8|0,c=a,d=c,j=0|Gp(d,69627),k=255&j,(n=0!=(0|k))?(o=c,p=c,q=0|tp(p,69627),f[t>>2]=0|f[b>>2],f[t+4>>2]=0|f[b+4>>2],r=0|Kf(o,t,q),s=255&r,e=0!=(0|s),h=e,g=1&h,i=255&g,l=v,0|i):(h=0,g=1&h,i=255&g,l=v,0|i)}function as(a){a|=0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,N=0;N=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,ui(c),p=b,Xc(p,0),A=b,pq(A),G=b,Xc(G,0),H=b,mf(H),I=b,Xc(I,0),J=b,zs(J),K=b,Xc(K,0),L=b,Lu(L),d=b,Xc(d,0),e=b,Mu(e),f=b,Xc(f,0),g=b,Ai(g),h=b,Xc(h,0),i=b,Pr(i),j=b,Xc(j,0),k=b,st(k),n=b,Xc(n,0),o=b,jh(o),q=b,Xc(q,0),r=b,po(r),s=b,Xc(s,0),t=b,Od(t),u=b,Xc(u,0),v=b,qe(v),w=b,Xc(w,0),x=b,Qt(x),y=b,Xc(y,0),z=b,$c(z),B=b,Xc(B,0),C=b,Vt(C),D=b,Xc(D,0),E=b,gb(E),F=b,Xc(F,0),l=N}function bs(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+32|0,(0|l)>=(0|m)&&X(),s=u+16|0,r=u+8|0,d=b,e=c+4|0,h=0|f[e>>2],i=8==(0|h),i&&(j=d,f[r>>2]=0|f[c>>2],f[r+4>>2]=0|f[c+4>>2],k=0|cs(j,r),n=255&k,o=0!=(0|n))?(p=d,q=0|f[c>>2],jj(a,p,q),void(l=u)):(g=d,f[s>>2]=0|f[c>>2],f[s+4>>2]=0|f[c+4>>2],Jf(a,g,s),void(l=u))}function cs(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0;return A=l,l=l+32|0,(0|l)>=(0|m)&&X(),y=A+8|0,d=a,p=d,q=d,f[y>>2]=0|f[b>>2],f[y+4>>2]=0|f[b+4>>2],r=0|ds(q,y),s=d,t=0|ki(s,68977,4),u=0|$p(p,r,t),x=u,v=x,w=0|f[v>>2],e=w>>>11,g=128&e,h=0!=(0|g),h&&(i=x,j=i+12|0,k=0|f[j>>2],n=282==(0|k))?(c=1,o=c,l=A,0|o):(c=0,o=c,l=A,0|o)}function ds(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,K=0;K=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,r=b+4|0,C=0|f[r>>2];a:do switch(0|C){case 0:if(D=0|f[b>>2],E=0!=(0|D),F=d,E){G=F+72|0,H=0|f[G>>2],c=H;break a}I=F+76|0,e=0|f[I>>2],c=e;break a;case 2:g=d,h=g+68|0,i=0|f[h>>2],c=i;break;case 4:j=d,k=j+80|0,n=0|f[k>>2],c=n;break;case 3:o=d,p=o+64|0,q=0|f[p>>2],c=q;break;case 6:s=d,t=s+60|0,u=0|f[t>>2],c=u;break;case 7:v=d,w=v+32|0,x=0|f[w>>2],c=x;break;case 20:c=0;break;default:y=0|f[b>>2],z=y+4|0,A=0|f[z>>2],c=A}while(0);return B=c,l=K,0|B}function es(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0;return O=l,l=l+64|0,(0|l)>=(0|m)&&X(),L=O+56|0,H=O+48|0,K=O+40|0,J=O+32|0,M=O,G=O+16|0,g=O+8|0,e=b,t=c+4|0,z=0|f[t>>2],A=z>>>0<8,A&&(B=e,C=e,D=0|tp(C,68905),d[M>>0]=0|d[c>>0],d[M+1>>0]=0|d[c+1>>0],d[M+2>>0]=0|d[c+2>>0],d[M+3>>0]=0|d[c+3>>0],d[M+4>>0]=0|d[c+4>>0],d[M+5>>0]=0|d[c+5>>0],d[M+6>>0]=0|d[c+6>>0],d[M+7>>0]=0|d[c+7>>0],Er(B,D,67856,M)),E=c+4|0,F=0|f[E>>2],h=12==(0|F),i=e,h?(j=e,k=0|tp(j,68905),Br(i,k,67871),void 0):(n=c+4|0,o=0|f[n>>2],p=e,f[J>>2]=0|f[c>>2],f[J+4>>2]=0|f[c+4>>2],q=0|jq(p,J),r=0|Tc(i,o,q),I=r,s=e,f[K>>2]=0|f[c>>2],f[K+4>>2]=0|f[c+4>>2],u=0|fs(s,K),v=I,w=v+4|0,f[w>>2]=u,x=I,gs(g,x),f[G>>2]=0|f[g>>2],f[G+4>>2]=0|f[g+4>>2],y=e,f[H>>2]=0|f[G>>2],f[H+4>>2]=0|f[G+4>>2],f[L>>2]=0|f[c>>2],f[L+4>>2]=0|f[c+4>>2],hs(y,H,L),f[a>>2]=0|f[G>>2],f[a+4>>2]=0|f[G+4>>2],void(l=O))}function fs(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0;return Ea=l,l=l+80|0,(0|l)>=(0|m)&&X(),Ca=Ea+64|0,e=Ea+56|0,d=Ea+48|0,c=Ea+40|0,u=Ea+16|0,F=Ea+8|0,Q=Ea,h=a,aa=0|f[b>>2],la=aa+4|0,wa=0|f[la>>2],Ba=wa,ya=Ba,za=0|f[ya>>2],i=255&za,(j=12!=(0|i))?(k=Ba,g=k,xa=g,l=Ea,0|xa):(n=h,o=Ba,p=0|f[o>>2],q=255&p,r=h,s=r+36|0,t=0|f[s>>2],v=0|Tc(n,q,t),Aa=v,w=b+4|0,x=0|f[w>>2],y=9==(0|x),y?Da=5:(z=b+4|0,A=0|f[z>>2],B=12==(0|A),B?Da=5:(G=h,H=Ba,gs(u,H),f[c>>2]=0|f[u>>2],f[c+4>>2]=0|f[u+4>>2],I=0|fs(G,c),J=Aa,K=J+4|0,f[K>>2]=I)),5==(0|Da)&&(C=Aa,D=Aa,E=D+4|0,f[E>>2]=C),L=Ba,M=L+20|0,N=0|f[M>>2],O=Aa,P=O+20|0,f[P>>2]=N,R=Ba,S=R+12|0,T=0|f[S>>2],U=0!=(0|T),U&&(V=h,W=Aa,gs(F,W),Y=Ba,gs(Q,Y),f[d>>2]=0|f[F>>2],f[d+4>>2]=0|f[F+4>>2],f[e>>2]=0|f[Q>>2],f[e+4>>2]=0|f[Q+4>>2],hj(V,d,e),Z=h,$=Aa,_=h,ba=0|ki(_,67899,12),f[Ca>>2]=0|f[b>>2],f[Ca+4>>2]=0|f[b+4>>2],$i(Z,$,ba,Ca)),ca=Ba,da=ca+16|0,ea=0|f[da>>2],fa=0!=(0|ea),ga=h,fa?(ha=Ba,ia=ha+16|0,ja=0|f[ia>>2],ka=0|dp(ga,ja),ma=Aa,na=ma+16|0,f[na>>2]=ka):(oa=0|Zo(ga),pa=Aa,qa=pa+16|0,f[qa>>2]=oa),ra=Aa,sa=0|f[ra>>2],ta=sa&-256,ua=12|ta,f[ra>>2]=ua,va=Aa,g=va,xa=g,l=Ea,0|xa)}function gs(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=0|f[d>>2],g=255&e,h=j+4|0,f[h>>2]=g,i=c,f[j>>2]=i,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function hs(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;switch(v=l,l=l+64|0,(0|l)>=(0|m)&&X(),q=v+56|0,s=v+48|0,p=v+40|0,r=v+32|0,o=v+24|0,t=v,g=v+8|0,e=a,h=c+4|0,i=0|f[h>>2],0|i){case 10:case 9:j=e,f[o>>2]=0|f[b>>2],f[o+4>>2]=0|f[b+4>>2],f[r>>2]=0|f[c>>2],f[r+4>>2]=0|f[c+4>>2],is(j,o,r),u=3;break;case 18:case 21:case 15:case 12:case 8:u=3}3==(0|u)&&(k=e,f[p>>2]=0|f[b>>2],f[p+4>>2]=0|f[b+4>>2],f[s>>2]=0|f[c>>2],f[s+4>>2]=0|f[c+4>>2],hj(k,p,s)),n=e,d[t>>0]=0|d[c>>0],d[t+1>>0]=0|d[c+1>>0],d[t+2>>0]=0|d[c+2>>0],d[t+3>>0]=0|d[c+3>>0],d[t+4>>0]=0|d[c+4>>0],d[t+5>>0]=0|d[c+5>>0],d[t+6>>0]=0|d[c+6>>0],d[t+7>>0]=0|d[c+7>>0],f[q>>2]=0|f[b>>2],f[q+4>>2]=0|f[b+4>>2],Yj(g,n,q,68999,1,t),l=v}function is(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,ta=0;if(ta=l,l=l+80|0,(0|l)>=(0|m)&&X(),e=ta+64|0,d=ta+56|0,h=ta+24|0,u=ta+16|0,F=ta+8|0,Q=ta,g=a,aa=0|f[b>>2],qa=aa,ka=0|f[c>>2],ra=ka,la=ra,ma=0|f[la>>2],na=ma>>>11,i=524288&na,j=0!=(0|i),!j)return Z=g,$=ra,_=$+16|0,ba=0|f[_>>2],ca=0|dp(Z,ba),da=qa,ea=da+16|0,f[ea>>2]=ca,fa=ra,ga=fa+20|0,ha=0|f[ga>>2],ia=qa,ja=ia+20|0,f[ja>>2]=ha,void(l=ta);for(k=ra,n=k+20|0,o=0|f[n>>2],oa=o,p=qa,pa=p;;){if(q=oa,r=0|f[q>>2],s=r>>>11,t=1048576&s,v=0!=(0|t),w=1^v,x=g,y=oa,!w)break;gs(h,y),f[d>>2]=0|f[h>>2],f[d+4>>2]=0|f[h+4>>2],js(u,x,d),z=0|f[u>>2],A=pa,B=A+20|0,f[B>>2]=z,C=pa,D=C+20|0,E=0|f[D>>2],pa=E,G=oa,H=G+20|0,I=0|f[H>>2],oa=I}gs(F,y),f[e>>2]=0|f[F>>2],f[e+4>>2]=0|f[F+4>>2],js(Q,x,e),J=0|f[Q>>2],K=pa,L=K+20|0,f[L>>2]=J,M=pa,N=M+20|0,O=0|f[N>>2],P=0|f[O>>2],R=P>>>11,S=1048576|R,T=0|f[O>>2],U=2097151&S,V=U<<11,W=2047&T,Y=W|V,f[O>>2]=Y,Z=g,$=ra,_=$+16|0,ba=0|f[_>>2],ca=0|dp(Z,ba),da=qa,ea=da+16|0,f[ea>>2]=ca,fa=ra,ga=fa+20|0,ha=0|f[ga>>2],ia=qa,ja=ia+20|0,f[ja>>2]=ha,l=ta}function js(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0;return J=l,l=l+64|0,(0|l)>=(0|m)&&X(),F=J+48|0,D=J+40|0,E=J+32|0,H=J,C=J+16|0,g=J+8|0,e=b,t=c+4|0,v=0|f[t>>2],w=v>>>0<8,w&&(x=e,y=e,z=0|tp(y,68905),d[H>>0]=0|d[c>>0],d[H+1>>0]=0|d[c+1>>0],d[H+2>>0]=0|d[c+2>>0],d[H+3>>0]=0|d[c+3>>0],d[H+4>>0]=0|d[c+4>>0],d[H+5>>0]=0|d[c+5>>0],d[H+6>>0]=0|d[c+6>>0],d[H+7>>0]=0|d[c+7>>0],Er(x,z,67912,H)),A=c+4|0,B=0|f[A>>2],h=12==(0|B),i=e,h?(j=e,k=0|tp(j,68905),Br(i,k,67925),void 0):(n=c+4|0,o=0|f[n>>2],p=e,f[E>>2]=0|f[c>>2],f[E+4>>2]=0|f[c+4>>2],q=0|jq(p,E),r=0|Tc(i,o,q),G=r,s=G,gs(g,s),f[C>>2]=0|f[g>>2],f[C+4>>2]=0|f[g+4>>2],u=e,f[D>>2]=0|f[C>>2],f[D+4>>2]=0|f[C+4>>2],f[F>>2]=0|f[c>>2],f[F+4>>2]=0|f[c+4>>2],hs(u,D,F),f[a>>2]=0|f[C>>2],f[a+4>>2]=0|f[C+4>>2],void(l=J))}function ks(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i+8|0,d=b,f[g>>2]=0|f[c>>2],f[g+4>>2]=0|f[c+4>>2],e=0|$r(g),ls(a,e),l=i}function ls(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=3,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function ms(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+32|0,(0|l)>=(0|m)&&X(),o=q+8|0,e=a,g=c,h=e,f[o>>2]=0|f[b>>2],f[o+4>>2]=0|f[b+4>>2],i=0|jq(h,o),j=g,k=(0|i)==(0|j),k?(d=1,n=d,l=q,0|n):(d=0,n=d,l=q,0|n)}function ns(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,R=0;R=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=d,C=0|f[r>>2],P=C,N=4,H=c,I=P,J=I,K=(J>>>0)/4&-1,L=N,M=P,e=0|U(L,M),g=K+e|0,h=0|Jc(H,g),O=h,i=d,j=i+8|0,f[j>>2]=0,k=d,n=k+4|0,f[n>>2]=0,o=O,p=d,q=p+16|0,f[q>>2]=o,s=d,t=s+20|0,f[t>>2]=0,u=O,v=N,w=P,x=0|U(v,w),y=u+x|0,z=d,A=z+12|0,f[A>>2]=y,B=d,D=B+12|0,E=0|f[D>>2],F=P,G=(F>>>0)/4&-1,os(E,-86,G),l=R}function os(a,b,c){a|=0,b|=0,c|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;for(q=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=a,f=b,g=c;;){if(h=g,i=h+-1|0,g=i,j=h>>>0>0,!j)break;k=f,n=e,o=n+1|0,e=o,d[n>>0]=k}l=q}function ps(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0;return Q=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=c,C=0|Lc(r,1,24),O=C,I=d,J=I>>>0<8,J&&(d=8),K=d,L=K+-1|0,d=L,M=d,N=M>>>1,e=d,g=e|N,d=g,h=d,i=h>>>2,j=d,k=j|i,d=k,n=d,o=n>>>4,p=d,q=p|o,d=q,s=d,t=s>>>8,u=d,v=u|t,d=v,w=d,x=w>>>16,y=d,z=y|x,d=z,A=d,B=A+1|0,d=B,D=d,E=O,f[E>>2]=D,F=c,G=O,ns(F,G),H=O,l=Q,0|H}function qs(a){a|=0;var b=0,c=0,d=0,f=0;return f=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=0|ps(c,8),l=f,0|d}function rs(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=d,(g=0!=(0|e))?(h=c,i=d,j=i+16|0,k=0|f[j>>2],Dc(h,k),n=c,o=d,Dc(n,o),void(l=q)):void(l=q)}function ss(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Ga=0;for(Ga=l,l=l+64|0,(0|l)>=(0|m)&&X(),ya=Ga+24|0,g=a,h=b,u=c,F=u,Q=F>>>0<8,e=Q?8:c,u=e,aa=u,la=aa+-1|0,u=la,va=u,wa=va>>>1,xa=u,i=xa|wa,u=i,j=u,k=j>>>2,n=u,o=n|k,u=o,p=u,q=p>>>4,r=u,s=r|q,u=s,t=u,v=t>>>8,w=u,x=w|v,u=x,y=u,z=y>>>16,A=u,B=A|z,u=B,C=u,D=C+1|0,u=D,E=h,G=E+12|0,H=0|f[G>>2],Ba=H,I=h,J=I+16|0,K=0|f[J>>2],Ca=K,L=h,M=L+20|0,N=0|f[M>>2],Ea=N,O=h,P=0|f[O>>2],Da=P,R=u,f[ya>>2]=R,S=g,ns(S,ya),za=0;;){if(T=za,U=Da,V=T>>>0<U>>>0,!V)break;W=za,Y=(W>>>0)/4&-1,Z=Ba,$=Z+Y|0,_=0|d[$>>0],ba=255&_,ca=za,da=(ca>>>0)%4&-1,ea=67959+da|0,fa=0|d[ea>>0],ga=255&fa,ha=ba&ga,ia=0!=(0|ha),ia||(ja=g,ka=za,ma=Ca,na=ma+(ka<<2)|0,oa=0|f[na>>2],pa=0|ts(ja,ya,oa,0),Aa=pa),qa=za,ra=qa+1|0,za=ra}sa=h,f[sa>>2]=0|f[ya>>2],f[sa+4>>2]=0|f[ya+4>>2],f[sa+8>>2]=0|f[ya+8>>2],f[sa+12>>2]=0|f[ya+12>>2],f[sa+16>>2]=0|f[ya+16>>2],f[sa+20>>2]=0|f[ya+20>>2],ta=g,ua=Ca,Dc(ta,ua),l=Ga}function ts(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0;for(jc=l,l=l+32|0,(0|l)>=(0|m)&&X(),h=a,za=b,Ka=c,Va=e,hc=0,eb=za,pb=eb+8|0,Ab=0|f[pb>>2],Lb=za,Wb=0|f[Lb>>2],i=Wb>>>2,v=za,G=0|f[v>>2],R=G>>>1,ba=i|R,ma=Ab>>>0>=ba>>>0,ma&&(va=h,wa=za,xa=za,ya=0|f[xa>>2],Aa=ya<<1,ss(va,wa,Aa)),Ba=Ka,Ca=Ka,Da=Ca<<2,Ea=Ba^Da,Fa=Ka,Ga=Fa>>>2,Ha=Ea^Ga,Ia=za,Ja=0|f[Ia>>2],La=Ja-1|0,Ma=Ha&La,gc=Ma,Na=za,Oa=0|f[Na>>2],fc=Oa;;){if(Pa=gc,Qa=(Pa>>>0)/4&-1,Ra=za,Sa=Ra+12|0,Ta=0|f[Sa>>2],Ua=Ta+Qa|0,Wa=0|d[Ua>>0],Xa=255&Wa,Ya=gc,Za=(Ya>>>0)%4&-1,$a=67951+Za|0,_a=0|d[$a>>0],ab=255&_a,bb=Xa&ab,cb=0!=(0|bb),db=1^cb,!db)break;if(fb=gc,gb=(fb>>>0)/4&-1,hb=za,ib=hb+12|0,jb=0|f[ib>>2],kb=jb+gb|0,lb=0|d[kb>>0],mb=255&lb,nb=gc,ob=(nb>>>0)%4&-1,qb=67955+ob|0,rb=0|d[qb>>0],sb=255&rb,tb=mb&sb,ub=0!=(0|tb))Ib=fc,Jb=za,Kb=0|f[Jb>>2],Mb=(0|Ib)==(0|Kb),Mb&&(Nb=gc,fc=Nb);else if(vb=gc,wb=za,xb=wb+16|0,yb=0|f[xb>>2],zb=yb+(vb<<2)|0,Bb=0|f[zb>>2],Cb=Ka,Db=(0|Bb)==(0|Cb)){ic=7;break}Ob=gc,Pb=hc,Qb=Pb+1|0,hc=Qb,Rb=Ob+Qb|0,Sb=za,Tb=0|f[Sb>>2],Ub=Tb-1|0,Vb=Rb&Ub,gc=Vb}return 7==(0|ic)?(Eb=Va,Fb=0!=(0|Eb),Fb&&(Gb=Va,f[Gb>>2]=0),Hb=gc,g=Hb,ua=g,l=jc,0|ua):(Xb=fc,Yb=za,Zb=0|f[Yb>>2],$b=(0|Xb)!=(0|Zb),_b=Ka,$b?(ac=fc,bc=za,cc=bc+16|0,dc=0|f[cc>>2],ec=dc+(ac<<2)|0,f[ec>>2]=_b,j=fc,k=(j>>>0)%4&-1,n=67955+k|0,o=0|d[n>>0],p=255&o,q=p^-1,r=fc,s=(r>>>0)/4&-1,t=za,u=t+12|0,w=0|f[u>>2],x=w+s|0,y=0|d[x>>0],z=255&y,A=z&q,B=255&A,d[x>>0]=B,C=za,D=C+4|0,E=0|f[D>>2],F=E+1|0,f[D>>2]=F,H=Va,I=0!=(0|H),I&&(J=Va,f[J>>2]=2),K=fc,g=K,ua=g,l=jc,0|ua):(L=gc,M=za,N=M+16|0,O=0|f[N>>2],P=O+(L<<2)|0,f[P>>2]=_b,Q=gc,S=(Q>>>0)%4&-1,T=67951+S|0,U=0|d[T>>0],V=255&U,W=V^-1,Y=gc,Z=(Y>>>0)/4&-1,$=za,_=$+12|0,aa=0|f[_>>2],ca=aa+Z|0,da=0|d[ca>>0],ea=255&da,fa=ea&W,ga=255&fa,d[ca>>0]=ga,ha=za,ia=ha+4|0,ja=0|f[ia>>2],ka=ja+1|0,f[ia>>2]=ka,la=za,na=la+8|0,oa=0|f[na>>2],pa=oa+1|0,f[na>>2]=pa,qa=Va,ra=0!=(0|qa),ra&&(sa=Va,f[sa>>2]=1),ta=gc,g=ta,ua=g,l=jc,0|ua))}function us(a,b,c,e,g){a|=0,b|=0,c|=0,e|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0;if(_a=l,l=l+80|0,(0|l)>=(0|m)&&X(),h=_a+56|0,Ta=_a+48|0,Sa=_a+24|0,S=_a+8|0,ca=_a,i=b,j=c,w=e,H=g,Ya=0,na=i,ya=0|qs(na),Za=ya,Ja=j,Ra=Ja<<24>>24!=0,!Ra&&(k=w,n=0|f[k>>2],o=n>>>11,p=524288&o,q=0!=(0|p))){r=w,s=0|f[r>>2],t=s>>>11,u=524288&t,v=0!=(0|u);a:do if(v)for(x=w,y=x+20|0,z=0|f[y>>2],w=z;;){if(A=w,B=0|f[A>>2],C=B>>>11,D=1048576&C,E=0!=(0|D),F=1^E,!F)break a;G=w,I=G+20|0,J=0|f[I>>2],w=J}while(0);Ya=1}for(Va=0;;){if(K=w,L=0!=(0|K),!L)break;if(M=w,N=Va,O=(0|M)!=(0|N),!O)break;if(P=i,Q=w,R=Za,vs(P,Q,R),T=w,U=0|f[T>>2],V=255&U,W=11!=(0|V),Y=Ya,Z=Y<<24>>24!=0,Wa=W|Z,Wa&&($=w,_=0|f[$>>2],aa=255&_,ba=12==(0|aa),da=j,ea=da<<24>>24!=0,Xa=ba|ea,!Xa))break;fa=w,Va=fa,ga=w,ha=ga+20|0,ia=0|f[ha>>2],w=ia}for(ja=i,Mn(S,ja),f[Sa>>2]=0|f[S>>2],f[Sa+4>>2]=0|f[S+4>>2],Ua=0;;){if(ka=Ua,la=Za,ma=0|f[la>>2],oa=ka>>>0<ma>>>0,!oa)break;pa=Ua,qa=(pa>>>0)/4&-1,ra=Za,sa=ra+12|0,ta=0|f[sa>>2],ua=ta+qa|0,va=0|d[ua>>0],wa=255&va,xa=Ua,za=(xa>>>0)%4&-1,Aa=67959+za|0,Ba=0|d[Aa>>0],Ca=255&Ba,Da=wa&Ca,Ea=0!=(0|Da),Ea||(Fa=i,Ga=Ua,Ha=Za,Ia=Ha+16|0,Ka=0|f[Ia>>2],La=Ka+(Ga<<2)|0,Ma=0|f[La>>2],ws(ca,Ma),f[Ta>>2]=0|f[Sa>>2],f[Ta+4>>2]=0|f[Sa+4>>2],f[h>>2]=0|f[ca>>2],f[h+4>>2]=0|f[ca+4>>2],$n(Fa,Ta,h)),Na=Ua,Oa=Na+1|0,Ua=Oa}Pa=i,Qa=Za,rs(Pa,Qa),f[a>>2]=0|f[Sa>>2],f[a+4>>2]=0|f[Sa+4>>2],l=_a}function vs(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,ba=0;
+if(ba=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,g=b,t=c,E=g,P=E+16|0,U=0|f[P>>2],$=U,V=$,W=0!=(0|V),!W)return void(l=ba);for(_=0;;){if(Y=_,Z=$,h=0|f[Z>>2],i=Y>>>0<h>>>0,!i)break;j=_,k=(j>>>0)/4&-1,n=$,o=n+12|0,p=0|f[o>>2],q=p+k|0,r=0|d[q>>0],s=255&r,u=_,v=(u>>>0)%4&-1,w=67959+v|0,x=0|d[w>>0],y=255&x,z=s&y,A=0!=(0|z),A||(B=_,C=$,D=C+20|0,F=0|f[D>>2],G=F+(B<<2)|0,H=0|f[G>>2],I=0!=(0|H),I&&(J=e,K=t,L=_,M=$,N=M+16|0,O=0|f[N>>2],Q=O+(L<<2)|0,R=0|f[Q>>2],0|ts(J,K,R,0))),S=_,T=S+1|0,_=T}l=ba}function ws(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=4,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function xs(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0;switch(aa=l,l=l+112|0,(0|l)>=(0|m)&&X(),Y=aa+96|0,e=aa+88|0,d=aa+80|0,Z=aa,U=aa+56|0,W=aa+48|0,h=aa+32|0,u=aa+24|0,F=aa+16|0,O=aa+8|0,g=b,P=g,Q=U+8|0,f[Z>>2]=U,$=Z+4|0,f[$>>2]=Q,R=0|Lp(P,67963,Z),V=R,S=V,0|S){case 0:T=g,i=g,j=0|tp(i,67967),Br(T,j,75440);break;case 1:_=3}do if(3==(0|_)){if(k=U+8|0,n=g,f[d>>2]=0|f[U>>2],f[d+4>>2]=0|f[U+4>>2],Xg(h,n,d),f[k>>2]=0|f[h>>2],f[k+4>>2]=0|f[h+4>>2],o=U+8|0,p=o+4|0,q=0|f[p>>2],r=0==(0|q),r&&(s=U+8|0,t=0|f[s>>2],v=0!=(0|t),!v))break;V=2,w=g,x=0|tp(w,67967),gs(u,x),f[U>>2]=0|f[u>>2],f[U+4>>2]=0|f[u+4>>2]}while(0);y=g,z=V,Jr(F,y,z,U),f[W>>2]=0|f[F>>2],f[W+4>>2]=0|f[F+4>>2],A=g,B=0|f[W>>2],C=g,D=0|ki(C,67980,6),E=g,G=g,H=G+12|0,I=0|f[H>>2],J=I+16|0,K=0|f[J>>2],L=K+28|0,M=0|f[L>>2],ys(O,E,M),f[e>>2]=0|f[O>>2],f[e+4>>2]=0|f[O+4>>2],$i(A,B,D,e),N=g,f[Y>>2]=0|f[W>>2],f[Y+4>>2]=0|f[W+4>>2],yr(N,Y)}function ys(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,k=0;k=l,l=l+16|0,(0|l)>=(0|m)&&X(),i=k,d=b,e=c,g=i+4|0,f[g>>2]=7,h=e,f[i>>2]=h,f[a>>2]=0|f[i>>2],f[a+4>>2]=0|f[i+4>>2],l=k}function zs(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,lb=0;lb=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,C=0|qp(c,69618),jb=C,N=b,Z=N+84|0,f[Z>>2]=C,ia=b,ta=jb,Yp(ia,ta,67987,283,0),Ea=b,Pa=jb,Yp(Ea,Pa,68e3,284,0),$a=b,d=jb,Yp($a,d,68017,283,0),r=b,u=jb,Yp(r,u,68027,285,0),v=b,w=jb,Yp(v,w,68043,286,16384),x=b,y=jb,Jp(x,y,68049,199,0),z=b,A=jb,Jp(z,A,68902,287,262144),B=b,D=jb,Jp(B,D,68065,288,262144),E=b,F=jb,Jp(E,F,69450,289,262144),G=b,H=jb,Jp(G,H,68068,290,0),I=b,J=jb,Jp(I,J,68075,291,4096),K=b,L=jb,Jp(K,L,67987,283,0),M=b,O=jb,Jp(M,O,68084,292,0),P=b,Q=jb,Jp(P,Q,68090,293,0),R=b,S=jb,Jp(R,S,68096,294,0),T=b,U=jb,Jp(T,U,68994,287,262144),V=b,W=jb,Jp(V,W,68100,287,262144),Y=b,$=jb,Jp(Y,$,68107,295,4096),_=b,aa=jb,Jp(_,aa,68e3,284,0),ba=b,ca=jb,Jp(ba,ca,68178,296,0),da=b,ea=jb,Jp(da,ea,68999,297,262144),fa=b,ga=jb,Jp(fa,ga,68986,298,0),ha=b,ja=jb,Jp(ha,ja,68229,299,4096),ka=b,la=jb,Jp(ka,la,68243,300,262144),ma=b,na=jb,Jp(ma,na,68258,301,262144),oa=b,pa=jb,Jp(oa,pa,68287,302,262144),qa=b,ra=jb,Jp(qa,ra,68309,303,524288),sa=b,ua=jb,Jp(sa,ua,68334,304,0),va=b,wa=jb,Jp(va,wa,68353,305,262144),xa=b,ya=jb,Jp(xa,ya,68017,283,0),za=b,Aa=jb,Jp(za,Aa,68359,305,262144),Ba=b,Ca=jb,Jp(Ba,Ca,68027,285,0),Da=b,Fa=jb,Jp(Da,Fa,68368,306,8192),Ga=b,Ha=jb,Jp(Ga,Ha,68379,307,0),Ia=b,Ja=jb,Jp(Ia,Ja,68384,290,0),Ka=b,La=jb,Jp(Ka,La,68394,308,8192),Ma=b,Na=jb,Jp(Ma,Na,68410,309,8192),Oa=b,Qa=jb,Jp(Oa,Qa,68428,310,8192),Ra=b,Sa=jb,Jp(Ra,Sa,68043,286,4096),Ta=b,Ua=jb,Jp(Ta,Ua,68443,311,262144),Va=b,Wa=jb,Jp(Va,Wa,68501,312,4096),Xa=b,Ya=jb,Jp(Xa,Ya,68556,291,4096),Za=b,_a=jb,Jp(Za,_a,68561,313,8192),ab=b,bb=jb,Jp(ab,bb,68579,314,4096),cb=b,db=jb,Jp(cb,db,68977,282,0),eb=b,fb=jb,Jp(eb,fb,69439,315,262144),gb=b,hb=b,ib=hb+32|0,e=0|f[ib>>2],g=b,h=g+84|0,i=0|f[h>>2],Rp(gb,e,i),j=b,k=b,n=k+40|0,o=0|f[n>>2],p=b,q=0|ki(p,68096,3),s=b,t=0|ki(s,68090,5),kq(j,o,q,t),l=lb}function As(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Ra=0;if(Ra=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=b,e=d,s=e+12|0,D=0|f[s>>2],O=D+16|0,$=0|f[O>>2],Ma=$,ja=Ma,ua=ja+8|0,Fa=0|f[ua>>2],Ka=Fa+8|0,La=Ka,g=Ma,h=g+-48|0,Ma=h,i=Ma,j=d,k=j+12|0,n=0|f[k>>2],o=n+20|0,p=0|f[o>>2],q=i>>>0<=p>>>0)Oa=0;else{r=Ma,t=r+4|0,u=0|f[t>>2],v=u+20|0,w=0|f[v>>2],x=0!=(0|w);do if(x){for(y=Ma,z=y+4|0,A=0|f[z>>2],B=A+20|0,C=0|f[B>>2],Na=C;;){if(E=Na,F=E+4|0,G=0|f[F>>2],H=0!=(0|G),I=Na,!H)break;J=I+4|0,K=0|f[J>>2],Na=K}if(L=I+12|0,M=0|f[L>>2],Pa=M,N=Pa,P=0!=(0|N)){if(Q=Pa,R=d,S=R+12|0,T=0|f[S>>2],U=T+8|0,V=0|f[U>>2],W=(0|Q)==(0|V),!W){Y=d,Z=Y+12|0,_=0|f[Z>>2],aa=_+20|0,ba=0|f[aa>>2],ca=Na,da=ca+20|0,ea=0|f[da>>2],fa=ba+(48*ea|0)|0,Ma=fa,ga=Ma,ha=ga+48|0,ia=ha+8|0,ka=0|f[ia>>2],la=ka+8|0,La=la;break}return Bs(a),void(l=Ra)}}while(0);ma=Ma,na=ma+36|0,oa=0|f[na>>2],pa=(0|oa)>0,pa&&(qa=Ma,ra=qa+36|0,sa=0|f[ra>>2],ta=La,va=ta+(sa<<3)|0,La=va),wa=La,xa=wa+4|0,ya=0|f[xa>>2],za=0==(0|ya),za?(Aa=La,Ba=0|f[Aa>>2],Ca=0!=(0|Ba),Da=1^Ca,Ga=Da):Ga=0,Ea=1^Ga,Ha=1&Ea,Ia=255&Ha,Oa=Ia}Ja=Oa,Cs(a,Ja),l=Ra}function Bs(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=1,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Cs(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=255&d,g=0!=(0|e),h=g?2:0,i=j+4|0,f[i>>2]=h,f[j>>2]=1,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function Ds(a,b,c){a|=0,b|=0,c|=0;var d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Cb=0;if(Cb=l,l=l+96|0,(0|l)>=(0|m)&&X(),g=Cb+88|0,Ab=Cb+80|0,d=Cb+72|0,zb=Cb+64|0,yb=Cb+48|0,i=Cb+24|0,N=Cb+16|0,Z=Cb,h=b,ia=h,ta=ia+12|0,Ea=0|f[ta>>2],Pa=Ea+16|0,$a=0|f[Pa>>2],jb=$a+-48|0,j=jb+4|0,w=0|f[j>>2],xb=w,F=xb,G=0|f[F>>2],H=G>>>11,I=128&H,J=0!=(0|I))return K=h,Mn(a,K),void(l=Cb);if(L=xb,M=L+12|0,O=0|f[M>>2],wb=O,P=wb,Q=P+24|0,R=0|f[Q>>2],S=0!=(0|R),T=h,!S)return Mn(a,T),void(l=Cb);for(U=wb,V=0|e[U>>1],W=65535&V,Y=W-1|0,Jn(i,T,Y),f[yb>>2]=0|f[i>>2],f[yb+4>>2]=0|f[i+4>>2],vb=0;;){if($=vb,_=$+1|0,aa=wb,ba=0|e[aa>>1],ca=65535&ba,da=_>>>0<ca>>>0,!da)break;ea=vb,fa=wb,ga=fa+24|0,ha=0|f[ga>>2],ja=ha+(ea<<3)|0,ka=0|f[ja>>2],la=0!=(0|ka),la&&(ma=h,na=vb,oa=wb,pa=oa+24|0,qa=0|f[pa>>2],ra=qa+(na<<3)|0,sa=0|f[ra>>2],ws(N,sa),f[zb>>2]=0|f[yb>>2],f[zb+4>>2]=0|f[yb+4>>2],f[d>>2]=0|f[N>>2],f[d+4>>2]=0|f[N+4>>2],$n(ma,zb,d)),ua=vb,va=ua+1|0,vb=va}wa=xb,xa=wa+20|0,ya=0|f[xa>>2],za=0!=(0|ya);a:do if(za)for(Aa=xb,Ba=Aa+20|0,Ca=0|f[Ba>>2],ub=Ca;;){if(Da=ub,Fa=0!=(0|Da),!Fa)break a;Ga=ub,Ha=Ga+20|0,Ia=0|f[Ha>>2],Ja=h,Ka=Ja+12|0,La=0|f[Ka>>2],Ma=La+20|0,Na=0|f[Ma>>2],Oa=Na+(48*Ia|0)|0,Qa=Oa+4|0,Ra=0|f[Qa>>2],Sa=0|f[Ra>>2],Ta=Sa>>>11,Ua=128&Ta,Va=0!=(0|Ua);b:do if(!Va&&(Wa=ub,Xa=Wa+20|0,Ya=0|f[Xa>>2],Za=h,_a=Za+12|0,ab=0|f[_a>>2],bb=ab+20|0,cb=0|f[bb>>2],db=cb+(48*Ya|0)|0,eb=db+4|0,fb=0|f[eb>>2],gb=fb+12|0,hb=0|f[gb>>2],wb=hb,ib=wb,kb=ib+24|0,lb=0|f[kb>>2],mb=0!=(0|lb)))for(vb=0;;){if(nb=vb,ob=nb+1|0,pb=wb,qb=0|e[pb>>1],rb=65535&qb,sb=ob>>>0<rb>>>0,!sb)break b;tb=vb,k=wb,n=k+24|0,o=0|f[n>>2],p=o+(tb<<3)|0,q=0|f[p>>2],r=0!=(0|q),r&&(s=h,t=vb,u=wb,v=u+24|0,x=0|f[v>>2],y=x+(t<<3)|0,z=0|f[y>>2],ws(Z,z),f[Ab>>2]=0|f[yb>>2],f[Ab+4>>2]=0|f[yb+4>>2],f[g>>2]=0|f[Z>>2],f[g+4>>2]=0|f[Z+4>>2],$n(s,Ab,g)),A=vb,B=A+1|0,vb=B}while(0);C=ub,D=C+4|0,E=0|f[D>>2],ub=E}while(0);f[a>>2]=0|f[yb>>2],f[a+4>>2]=0|f[yb+4>>2],l=Cb}function Es(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+48|0,(0|l)>=(0|m)&&X(),j=p+32|0,k=p+24|0,n=p,i=p+8|0,d=b,e=d,f[n>>2]=i,0|Lp(e,68900,n),g=d,f[k>>2]=0|f[c>>2],f[k+4>>2]=0|f[c+4>>2],f[j>>2]=0|f[i>>2],f[j+4>>2]=0|f[i+4>>2],h=0|kf(g,k,j),Cs(a,h),l=p}function Fs(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;t=l,l=l+48|0,(0|l)>=(0|m)&&X(),p=t+32|0,q=t+24|0,r=t,o=t+8|0,d=b,e=d,f[r>>2]=o,0|Lp(e,68900,r),g=d,f[q>>2]=0|f[c>>2],f[q+4>>2]=0|f[c+4>>2],f[p>>2]=0|f[o>>2],f[p+4>>2]=0|f[o+4>>2],h=0|lf(g,q,p),i=h<<24>>24!=0,j=1^i,k=1&j,n=255&k,Cs(a,n),l=t}function Gs(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+48|0,(0|l)>=(0|m)&&X(),j=p+32|0,k=p+24|0,n=p,i=p+8|0,d=b,e=d,f[n>>2]=i,0|Lp(e,68900,n),g=d,f[k>>2]=0|f[c>>2],f[k+4>>2]=0|f[c+4>>2],f[j>>2]=0|f[i>>2],f[j+4>>2]=0|f[i+4>>2],h=0|lf(g,k,j),Cs(a,h),l=p}function Hs(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i+8|0,d=b,f[g>>2]=0|f[c>>2],f[g+4>>2]=0|f[c+4>>2],e=0|$r(g),ls(a,e),l=i}function Is(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,j=0;j=l,l=l+16|0,(0|l)>=(0|m)&&X(),h=j+8|0,d=b,e=d,f[h>>2]=0|f[c>>2],f[h+4>>2]=0|f[c+4>>2],g=0|jq(e,h),gs(a,g),l=j}function Js(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;r=l,l=l+32|0,(0|l)>=(0|m)&&X(),n=r+24|0,o=r,k=r+12|0,j=r+8|0,d=b,e=d,f[o>>2]=k,p=o+4|0,f[p>>2]=j,0|Lp(e,68114,o),g=d,h=0|f[j>>2],i=0|f[k>>2],f[n>>2]=0|f[c>>2],f[n+4>>2]=0|f[c+4>>2],Ks(a,g,h,i,n),l=r}function Ks(a,b,c,e,g){a|=0,b|=0,c|=0,e|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,U=0;for(U=l,l=l+80|0,(0|l)>=(0|m)&&X(),j=U+64|0,i=U+56|0,h=U+48|0,S=U+8|0,R=U,J=U+24|0,K=U+16|0,k=b,n=c,y=e,L=n,M=0==(0|L),M&&(N=k,O=k,P=0|tp(O,68855),Br(N,P,68116)),Q=0;;){if(o=Q,p=n,q=(0|o)<(0|p),!q)break;r=k,s=Q,t=y,u=t+(s<<3)|0,f[h>>2]=0|f[u>>2],f[h+4>>2]=0|f[u+4>>2],Hf(r,h,10),v=Q,w=v+1|0,Q=w}for(;;){if(x=n,z=x+-1|0,n=z,A=0!=(0|x),!A)break;B=k,C=n,D=y,E=D+(C<<3)|0,d[R>>0]=0|d[g>>0],d[R+1>>0]=0|d[g+1>>0],d[R+2>>0]=0|d[g+2>>0],d[R+3>>0]=0|d[g+3>>0],d[R+4>>0]=0|d[g+4>>0],d[R+5>>0]=0|d[g+5>>0],d[R+6>>0]=0|d[g+6>>0],d[R+7>>0]=0|d[g+7>>0],f[i>>2]=0|f[E>>2],f[i+4>>2]=0|f[E+4>>2],Yj(J,B,i,68155,1,R),F=k,G=n,H=y,I=H+(G<<3)|0,d[S>>0]=0|d[g>>0],d[S+1>>0]=0|d[g+1>>0],d[S+2>>0]=0|d[g+2>>0],d[S+3>>0]=0|d[g+3>>0],d[S+4>>0]=0|d[g+4>>0],d[S+5>>0]=0|d[g+5>>0],d[S+6>>0]=0|d[g+6>>0],d[S+7>>0]=0|d[g+7>>0],f[j>>2]=0|f[I>>2],f[j+4>>2]=0|f[I+4>>2],Yj(K,F,j,68169,1,S)}f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=U}function Ls(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,F=0;return F=l,l=l+64|0,(0|l)>=(0|m)&&X(),A=F+48|0,C=F+40|0,z=F+32|0,B=F+24|0,D=F,y=F+8|0,d=b,e=d,f[D>>2]=y,0|Lp(e,68900,D),q=d,f[B>>2]=0|f[c>>2],f[B+4>>2]=0|f[c+4>>2],f[z>>2]=0|f[y>>2],f[z+4>>2]=0|f[y+4>>2],r=0|kf(q,B,z),(s=r<<24>>24!=0)?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=F)):(t=c+4|0,u=0|f[t>>2],v=y+4|0,w=0|f[v>>2],x=(0|u)!=(0|w),x&&(n=d,o=d,p=0|tp(o,68905),Br(n,p,68183)),g=d,f[C>>2]=0|f[c>>2],f[C+4>>2]=0|f[c+4>>2],h=0|jq(g,C),i=d,f[A>>2]=0|f[y>>2],f[A+4>>2]=0|f[y+4>>2],j=0|jq(i,A),k=(0|h)!=(0|j),k&&(n=d,o=d,p=0|tp(o,68905),Br(n,p,68183)),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=F))}function Ms(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+32|0,(0|l)>=(0|m)&&X(),k=p+24|0,n=p,j=p+8|0,d=b,e=d,f[n>>2]=j,0|Lp(e,68256,n),g=d,h=0|f[j>>2],f[k>>2]=0|f[c>>2],f[k+4>>2]=0|f[c+4>>2],i=0|ms(g,k,h),Cs(a,i),l=p}function Ns(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;r=l,l=l+32|0,(0|l)>=(0|m)&&X(),n=r+16|0,p=r,o=r+4|0,d=b,e=d,f[p>>2]=o,0|Lp(e,68285,p),g=d,h=0|f[o>>2],gj(g,h),i=d,j=0|f[o>>2],f[n>>2]=0|f[c>>2],f[n+4>>2]=0|f[c+4>>2],k=0|ej(i,n,j),Cs(a,k),l=r}function Os(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;q=l,l=l+32|0,(0|l)>=(0|m)&&X(),n=q+16|0,o=q,k=q+4|0,d=b,e=d,f[o>>2]=k,0|Lp(e,68285,o),g=d,h=0|f[k>>2],gj(g,h),i=d,j=0|f[k>>2],f[n>>2]=0|f[c>>2],f[n+4>>2]=0|f[c+4>>2],Yi(a,i,n,j),l=q}function Ps(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;t=l,l=l+48|0,(0|l)>=(0|m)&&X(),p=t+32|0,n=t+24|0,q=t,k=t+16|0,o=t+8|0,d=b,e=d,f[q>>2]=k,r=q+4|0,f[r>>2]=o,0|Lp(e,68331,q),g=d,h=0|f[k>>2],gj(g,h),i=d,j=0|f[k>>2],f[n>>2]=0|f[c>>2],f[n+4>>2]=0|f[c+4>>2],f[p>>2]=0|f[o>>2],f[p+4>>2]=0|f[o+4>>2],cj(i,n,j,p),f[a>>2]=0|f[o>>2],f[a+4>>2]=0|f[o+4>>2],l=t}function Qs(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+32|0,(0|l)>=(0|m)&&X(),k=p+24|0,n=p,j=p+8|0,d=b,e=d,f[n>>2]=j,0|Lp(e,68256,n),g=d,h=0|f[j>>2],f[k>>2]=0|f[c>>2],f[k+4>>2]=0|f[c+4>>2],i=0|Kf(g,k,h),Cs(a,i),l=p}function Rs(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+32|0,(0|l)>=(0|m)&&X(),k=p+8|0,n=p,j=p+16|0,e=b,d[j>>0]=1,g=e,f[n>>2]=j,0|Lp(g,68376,n),h=e,i=0|d[j>>0],f[k>>2]=0|f[c>>2],f[k+4>>2]=0|f[c+4>>2],Ss(a,h,i,k,0),l=p}function Ss(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+32|0,(0|l)>=(0|m)&&X(),s=u+16|0,r=u+8|0,g=b,h=c,i=e,j=h,k=j<<24>>24!=0,n=g,o=h,k?(p=g,f[r>>2]=0|f[d>>2],f[r+4>>2]=0|f[d+4>>2],q=0|ds(p,r),us(a,n,o,q,0),void(l=u)):(f[s>>2]=0|f[d>>2],f[s+4>>2]=0|f[d+4>>2],Ts(a,n,o,s),void(l=u))}function Ts(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ja=0;Ja=l,l=l+80|0,(0|l)>=(0|m)&&X(),g=Ja+56|0,Ca=Ja+48|0,Fa=Ja+40|0,Ba=Ja+24|0,x=Ja+8|0,I=Ja,j=b,k=c,T=j,da=0|qs(T),Ha=da,oa=j,f[Fa>>2]=0|f[e>>2],f[Fa+4>>2]=0|f[e+4>>2],ya=0|ds(oa,Fa),Ea=ya,za=Ea,Aa=0!=(0|za),Aa&&(n=Ea,o=0|f[n>>2],p=255&o,q=12==(0|p),q&&(r=j,s=Ea,t=Ha,vs(r,s,t),u=Ea,v=u+20|0,w=0|f[v>>2],Ea=w)),y=k,z=y<<24>>24!=0,A=Ea,B=0!=(0|A),Ga=z&B;a:do if(Ga)for(;;){if(C=Ea,D=0|f[C>>2],E=255&D,F=12==(0|E),!F&&(G=Ea,H=0|f[G>>2],J=255&H,K=11==(0|J),!K))break a;if(L=j,M=Ea,N=Ha,vs(L,M,N),O=Ea,P=O+20|0,Q=0|f[P>>2],Ea=Q,h=Ea,i=0!=(0|h),!i)break}while(0);for(R=j,Mn(x,R),f[Ba>>2]=0|f[x>>2],f[Ba+4>>2]=0|f[x+4>>2],Da=0;;){if(S=Da,U=Ha,V=0|f[U>>2],W=S>>>0<V>>>0,!W)break;Y=Da,Z=(Y>>>0)/4&-1,$=Ha,_=$+12|0,aa=0|f[_>>2],ba=aa+Z|0,ca=0|d[ba>>0],ea=255&ca,fa=Da,ga=(fa>>>0)%4&-1,ha=67959+ga|0,ia=0|d[ha>>0],ja=255&ia,ka=ea&ja,la=0!=(0|ka),la||(ma=j,na=Da,pa=Ha,qa=pa+16|0,ra=0|f[qa>>2],sa=ra+(na<<2)|0,ta=0|f[sa>>2],ws(I,ta),f[Ca>>2]=0|f[Ba>>2],f[Ca+4>>2]=0|f[Ba+4>>2],f[g>>2]=0|f[I>>2],f[g+4>>2]=0|f[I+4>>2],$n(ma,Ca,g)),ua=Da,va=ua+1|0,Da=va}wa=j,xa=Ha,rs(wa,xa),f[a>>2]=0|f[Ba>>2],f[a+4>>2]=0|f[Ba+4>>2],l=Ja}function Us(a,b,c){a|=0,b|=0,c|=0;var d=0,f=0;f=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,Bs(a),l=f}function Vs(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+32|0,(0|l)>=(0|m)&&X(),k=p+8|0,n=p,j=p+16|0,e=b,d[j>>0]=1,g=e,f[n>>2]=j,0|Lp(g,68376,n),h=e,i=0|d[j>>0],f[k>>2]=0|f[c>>2],f[k+4>>2]=0|f[c+4>>2],Ss(a,h,i,k,2),l=p}function Ws(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+32|0,(0|l)>=(0|m)&&X(),k=p+8|0,n=p,j=p+16|0,e=b,d[j>>0]=1,g=e,f[n>>2]=j,0|Lp(g,68376,n),h=e,i=0|d[j>>0],f[k>>2]=0|f[c>>2],f[k+4>>2]=0|f[c+4>>2],Ss(a,h,i,k,4),l=p}function Xs(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+32|0,(0|l)>=(0|m)&&X(),k=p+8|0,n=p,j=p+16|0,e=b,d[j>>0]=1,g=e,f[n>>2]=j,0|Lp(g,68376,n),h=e,i=0|d[j>>0],f[k>>2]=0|f[c>>2],f[k+4>>2]=0|f[c+4>>2],Ss(a,h,i,k,0),l=p}function Ys(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,C=0;return C=l,l=l+64|0,(0|l)>=(0|m)&&X(),w=C+48|0,A=C+8|0,z=C,x=C+40|0,y=C+32|0,g=C+24|0,o=C+16|0,e=b,p=e,f[z>>2]=x,0|Lp(p,68285,z),q=e,r=0|f[x>>2],gj(q,r),s=e,t=0|f[x>>2],f[w>>2]=0|f[c>>2],f[w+4>>2]=0|f[c+4>>2],mj(g,s,w,t),f[y>>2]=0|f[g>>2],f[y+4>>2]=0|f[g+4>>2],u=y+4|0,v=0|f[u>>2],(h=5==(0|v))?(i=e,j=0|f[x>>2],k=e,n=0|f[x>>2],vi(o,k,n),d[A>>0]=0|d[o>>0],d[A+1>>0]=0|d[o+1>>0],d[A+2>>0]=0|d[o+2>>0],d[A+3>>0]=0|d[o+3>>0],d[A+4>>0]=0|d[o+4>>0],d[A+5>>0]=0|d[o+5>>0],d[A+6>>0]=0|d[o+6>>0],d[A+7>>0]=0|d[o+7>>0],Fr(i,j,68468,A),void 0):(f[a>>2]=0|f[y>>2],f[a+4>>2]=0|f[y+4>>2],void(l=C))}function Zs(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Ba=0;Ba=l,l=l+160|0,(0|l)>=(0|m)&&X(),va=Ba+136|0,ua=Ba+128|0,ta=Ba+120|0,pa=Ba+112|0,oa=Ba+104|0,na=Ba+96|0,ya=Ba+8|0,xa=Ba,ma=Ba+80|0,qa=Ba+145|0,wa=Ba+64|0,g=Ba+56|0,t=Ba+48|0,E=Ba+40|0,ka=Ba+24|0,P=Ba+16|0,e=b,d[qa>>0]=0,ra=1,_=e,f[xa>>2]=ma,za=xa+4|0,f[za>>2]=qa,0|Lp(_,68513,xa),ga=ma+4|0,ha=0|f[ga>>2],ia=4==(0|ha);do if(ia)ja=0|f[ma>>2],la=ja;else{if(h=ma+4|0,i=0|f[h>>2],j=16==(0|i),j||(k=e,f[na>>2]=0|f[ma>>2],f[na+4>>2]=0|f[ma+4>>2],Xg(g,k,na),f[wa>>2]=0|f[g>>2],f[wa+4>>2]=0|f[g+4>>2],n=wa+4|0,o=0|f[n>>2],p=0==(0|o),p&&(q=0|f[wa>>2],r=0!=(0|q),r||(s=e,f[oa>>2]=0|f[ma>>2],f[oa+4>>2]=0|f[ma+4>>2],Df(t,s,oa),f[wa>>2]=0|f[t>>2],f[wa+4>>2]=0|f[t+4>>2],u=e,v=e,w=0|tp(v,68905),d[ya>>0]=0|d[wa>>0],d[ya+1>>0]=0|d[wa+1>>0],d[ya+2>>0]=0|d[wa+2>>0],d[ya+3>>0]=0|d[wa+3>>0],d[ya+4>>0]=0|d[wa+4>>0],d[ya+5>>0]=0|d[wa+5>>0],d[ya+6>>0]=0|d[wa+6>>0],d[ya+7>>0]=0|d[wa+7>>0],Er(u,w,68517,ya)))),x=e,f[pa>>2]=0|f[ma>>2],f[pa+4>>2]=0|f[ma+4>>2],ri(E,x,pa),f[wa>>2]=0|f[E>>2],f[wa+4>>2]=0|f[E+4>>2],y=wa+4|0,z=0|f[y>>2],A=0==(0|z),A&&(B=0|f[wa>>2],C=0!=(0|B),!C)){ra=0;break}D=0|f[wa>>2],la=D}while(0);return F=ra,G=F<<24>>24!=0,G&&(H=e,I=la,J=0|d[qa>>0],K=J<<24>>24!=0,L=1^K,M=1&L,f[ta>>2]=0|f[c>>2],f[ta+4>>2]=0|f[c+4>>2],N=0|$s(H,ta,I,M),ra=N),O=ra,Q=O<<24>>24!=0,!Q&&(R=e,S=0|ki(R,68536,19),sa=S,T=e,U=sa,V=0|d[qa>>0],W=V<<24>>24!=0,Y=1^W,Z=1&Y,f[ua>>2]=0|f[c>>2],f[ua+4>>2]=0|f[c+4>>2],$=0|$s(T,ua,U,Z),aa=$<<24>>24!=0)?(f[ka>>2]=0|f[ma>>2],f[ka+4>>2]=0|f[ma+4>>2],ba=ka+8|0,ca=0|d[qa>>0],Cs(P,ca),f[ba>>2]=0|f[P>>2],f[ba+4>>2]=0|f[P+4>>2],da=e,ea=sa,f[va>>2]=0|f[c>>2],f[va+4>>2]=0|f[c+4>>2],Zj(a,da,va,ea,2,ka),void(l=Ba)):(fa=ra,Cs(a,fa),void(l=Ba))}function $s(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;return p=l,l=l+32|0,(0|l)>=(0|m)&&X(),n=p+16|0,e=a,g=c,h=d,i=e,j=g,f[n>>2]=0|f[b>>2],f[n+4>>2]=0|f[b+4>>2],k=0|dq(i,n,j),l=p,0|k}function _s(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+32|0,(0|l)>=(0|m)&&X(),k=p+8|0,n=p,j=p+16|0,e=b,d[j>>0]=1,g=e,f[n>>2]=j,0|Lp(g,68376,n),h=e,i=0|d[j>>0],f[k>>2]=0|f[c>>2],f[k+4>>2]=0|f[c+4>>2],Ts(a,h,i,k),l=p}function at(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,U=0;U=l,l=l+48|0,(0|l)>=(0|m)&&X(),Q=U+40|0,R=U,O=U+24|0,N=U+16|0,e=U+8|0,d=b,bt(N),s=d,f[R>>2]=O,S=R+4|0,f[S>>2]=N,0|Lp(s,68603,R),D=N+4|0,H=0|f[D>>2],I=0==(0|H),I&&(J=0|f[N>>2],K=0!=(0|J),K||(L=d,M=d,g=0|tp(M,68855),Br(L,g,68606))),h=d,i=d,j=i+44|0,k=0|f[j>>2],n=0|Tc(h,13,k),P=n,o=P,p=0|f[N>>2],qt(o,p),q=P,r=0|f[q>>2],t=r>>>11,u=256|t,v=0|f[q>>2],w=2097151&u,x=w<<11,y=2047&v,z=y|x,f[q>>2]=z,A=d,B=d,f[Q>>2]=0|f[c>>2],f[Q+4>>2]=0|f[c+4>>2],Wp(e,B,Q),C=0|f[e>>2],E=0|f[O>>2],F=P,Hp(A,C,E,F),G=0|f[O>>2],ws(a,G),l=U}function bt(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=0,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function ct(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;for(L=l,l=l+96|0,(0|l)>=(0|m)&&X(),d=L+80|0,C=L+72|0,H=L+64|0,J=L,I=L+48|0,B=L+24|0,D=L+16|0,g=L+8|0,e=b,t=e,u=0|ki(t,69450,3),E=u,v=e,f[H>>2]=0|f[c>>2],f[H+4>>2]=0|f[c+4>>2],jo(B,v,H),w=e,f[J>>2]=I,0|Lp(w,68900,J),x=0|f[B>>2],y=x+12|0,z=0|f[y>>2],G=z,F=0;;){if(A=F,h=G,i=(0|A)<(0|h),!i){K=6;break}if(j=e,k=F,f[C>>2]=0|f[B>>2],f[C+4>>2]=0|f[B+4>>2],lo(g,C,k),n=E,f[d>>2]=0|f[g>>2],f[d+4>>2]=0|f[g+4>>2],Zj(D,j,d,n,1,I),o=D+4|0,p=0|f[o>>2],q=0!=(0|p)){K=4;break}r=F,s=r+1|0,F=s}return 4==(0|K)?(dt(a),void(l=L)):6==(0|K)?(Bs(a),void(l=L)):void 0}function dt(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=2,f[c>>2]=1,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function et(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,q=0;return q=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=0|Kc(c,8),o=d,e=o,(g=0!=(0|e))?(h=b,i=o,f[i>>2]=h,j=o,k=j+4|0,f[k>>2]=0,n=o,l=q,0|n):(n=o,l=q,0|n)}function ft(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0;if(y=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,n=0!=(0|c),!n)return void(l=y);for(o=b,p=o+4|0,q=0|f[p>>2],v=q;;){if(r=v,s=0!=(0|r),!s)break;t=v,w=t,u=v,d=0|f[u>>2],v=d,e=b,g=0|f[e>>2],h=w,Dc(g,h)}i=b,j=0|f[i>>2],k=b,Dc(j,k),l=y}function gt(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0;if(va=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,r=b,C=d,N=0!=(0|C),!N)return c=0,oa=c,l=va,0|oa;for(Z=r,ia=-1-Z|0,pa=ia+1|0,qa=3&pa,ra=r,e=ra+qa|0,r=e,g=d,h=g+4|0,i=0|f[h>>2],ta=i;;){if(j=ta,k=0!=(0|j),!k)break;if(n=ta,o=n+4|0,p=0|f[o>>2],q=r,s=p+q|0,t=ta,u=t+8|0,v=0|f[u>>2],w=s>>>0<=v>>>0,x=ta,w){ua=6;break}Q=0|f[x>>2],ta=Q}return 6==(0|ua)?(y=x+4|0,z=0|f[y>>2],sa=z,A=r,B=ta,D=B+4|0,E=0|f[D>>2],F=E+A|0,f[D>>2]=F,G=ta,H=G+16|0,I=sa,J=H+I|0,K=ta,L=K+12|0,f[L>>2]=J,M=ta,O=M+12|0,P=0|f[O>>2],c=P,oa=c,l=va,0|oa):(R=d,S=r,T=0|ht(R,S),ta=T,U=ta,V=0!=(0|U),V?(W=r,Y=ta,$=Y+4|0,f[$>>2]=W,_=d,aa=_+4|0,ba=0|f[aa>>2],ca=ta,f[ca>>2]=ba,da=ta,ea=d,fa=ea+4|0,f[fa>>2]=da,ga=ta,ha=ga+16|0,ja=ta,ka=ja+12|0,f[ka>>2]=ha,la=ta,ma=la+12|0,na=0|f[ma>>2],c=na,oa=c,l=va,0|oa):(c=0,oa=c,l=va,0|oa))}function ht(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,z=0;return z=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,p=e,q=p>>>0<4096,c=q?4096:b,e=c,r=d,s=0|f[r>>2],t=e,u=20+t|0,v=0|Kc(s,u),x=v,w=x,(g=0!=(0|w))?(h=x,i=h+4|0,f[i>>2]=0,j=e,k=x,n=k+8|0,f[n>>2]=j,o=x,l=z,0|o):(o=x,l=z,0|o)}function it(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0;return _=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=c,C=r+12|0,N=0|f[C>>2],S=N+16|0,T=0|f[S>>2],Y=T,U=c,V=c,W=V+44|0,e=0|f[W>>2],g=0|Tc(U,13,e),Z=g,h=Z,i=h+16|0,f[i>>2]=0,j=Y,k=0!=(0|j),k&&(n=Y,o=n+4|0,p=0|f[o>>2],q=0!=(0|p),q&&(s=Y,t=s+4|0,u=0|f[t>>2],v=u+16|0,w=0|f[v>>2],x=Z,y=x+16|0,f[y>>2]=w),z=Z,A=z+16|0,B=0|f[A>>2],D=0!=(0|B),D||(E=Y,F=E+44|0,G=0|f[F>>2],H=Z,I=H+16|0,f[I>>2]=G)),J=d,K=Z,L=K+12|0,f[L>>2]=J,M=Z,O=M+20|0,f[O>>2]=0,P=c,Q=d,ag(P,Q),R=Z,l=_,0|R}function jt(a,b){a|=0,b|=0;var c=0,d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;return B=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=c,s=d,t=0|it(r,s),z=t,u=c,v=z,w=c,x=w+12|0,y=0|f[x>>2],g=y+16|0,h=0|f[g>>2],i=h+4|0,j=0|f[i>>2],k=j+12|0,n=0|f[k>>2],o=0|e[n>>1],p=65535&o,kt(u,v,p),q=z,l=B,0|q}function kt(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,M=0;return M=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,s=c,D=d,E=D+12|0,F=0|f[E>>2],G=F+16|0,H=0|f[G>>2],I=H+24|0,J=0|f[I>>2],g=0!=(0|J),h=d,g?(u=h+12|0,v=0|f[u>>2],w=v+16|0,x=0|f[w>>2],y=x+24|0,z=0|f[y>>2],K=z,A=K,B=e,C=B+20|0,f[C>>2]=A,void(l=M)):(i=s,j=0|lt(h,i),K=j,k=K,n=d,o=n+12|0,p=0|f[o>>2],q=p+16|0,r=0|f[q>>2],t=r+24|0,f[t>>2]=k,A=K,B=e,C=B+20|0,f[C>>2]=A,void(l=M))}function lt(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,ga=0;return ga=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=c,C=c,N=C+12|0,Z=0|f[N>>2],aa=Z+16|0,ba=0|f[aa>>2],ca=ba+4|0,da=0|f[ca>>2],e=da+20|0,g=0|f[e>>2],h=0|Tc(r,20,g),ea=h,i=d,j=ea,k=0|f[j>>2],n=2097151&i,o=n<<11,p=2047&k,q=p|o,f[j>>2]=q,s=c,t=s+12|0,u=0|f[t>>2],v=u+16|0,w=0|f[v>>2],x=0|f[w>>2],y=ea,z=y+16|0,f[z>>2]=x,A=c,B=A+12|0,D=0|f[B>>2],E=D+16|0,F=0|f[E>>2],G=c,H=G+12|0,I=0|f[H>>2],J=I+20|0,K=0|f[J>>2],L=F,M=K,O=L-M|0,P=(0|O)/48&-1,Q=ea,R=Q+20|0,f[R>>2]=P,S=c,T=S+12|0,U=0|f[T>>2],V=U+4|0,W=0|f[V>>2],Y=ea,$=Y+12|0,f[$>>2]=W,_=ea,l=ga,0|_}function mt(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0;return D=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=c,u=c,v=u+44|0,w=0|f[v>>2],x=0|Tc(r,13,w),B=x,y=d,z=B,A=z+12|0,f[A>>2]=y,e=B,g=0|f[e>>2],h=g>>>11,i=128|h,j=0|f[e>>2],k=2097151&i,n=k<<11,o=2047&j,p=o|n,f[e>>2]=p,q=B,s=q+20|0,f[s>>2]=0,t=B,l=D,0|t}function nt(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,pa=0;if(pa=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,g=b,t=c,E=d,P=e,_=g,ha=0|mt(P,_),na=ha,ia=e,ja=t,ka=0|lt(ia,ja),la=ka,h=na,i=h+20|0,f[i>>2]=ka,j=e,k=na,n=na,o=n+20|0,p=0|f[o>>2],Yc(j,k,p),q=la,r=q+20|0,f[r>>2]=-1,s=e,u=t,v=u<<3,w=0|Jc(s,v),x=la,y=x+12|0,f[y>>2]=w,z=E,A=0!=(0|z),ma=0,A){for(;;){if(B=ma,C=t,D=(0|B)<(0|C),!D)break;F=ma,G=la,H=G+12|0,I=0|f[H>>2],J=I+(F<<3)|0,K=ma,L=E,M=L+(K<<3)|0,f[J>>2]=0|f[M>>2],f[J+4>>2]=0|f[M+4>>2],N=ma,O=N+1|0,ma=O}return ga=na,l=pa,0|ga}for(;;){if(Q=ma,R=t,S=(0|Q)<(0|R),!S)break;T=ma,U=la,V=U+12|0,W=0|f[V>>2],Y=W+(T<<3)|0,Z=Y+4|0,f[Z>>2]=0,$=ma,aa=la,ba=aa+12|0,ca=0|f[ba>>2],da=ca+($<<3)|0,f[da>>2]=0,ea=ma,fa=ea+1|0,ma=fa}return ga=na,l=pa,0|ga}function ot(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,fa=0;return fa=l,l=l+48|0,(0|l)>=(0|m)&&X(),ca=fa,t=fa+24|0,E=fa+16|0,e=b,g=c,P=e,W=P+12|0,Y=0|f[W>>2],Z=Y+16|0,$=0|f[Z>>2],_=$+4|0,h=0|f[_>>2],ba=h,i=ba,j=i+20|0,k=0|f[j>>2],aa=k,n=ba,o=0|f[n>>2],p=o>>>11,q=128&p,r=0!=(0|q),r||(s=e,u=e,v=0|tp(u,68905),Br(s,v,68621)),w=aa,x=0!=(0|w),x||(y=e,z=e,A=0|tp(z,68905),Br(y,A,68662)),B=g,C=(0|B)<0,C||(D=aa,F=0|f[D>>2],G=F>>>11,H=g,I=(0|G)<=(0|H))?(J=e,K=e,L=0|tp(K,68712),M=g,pt(t,M),N=aa,O=0|f[N>>2],Q=O>>>11,pt(E,Q),d[ca>>0]=0|d[t>>0],d[ca+1>>0]=0|d[t+1>>0],d[ca+2>>0]=0|d[t+2>>0],d[ca+3>>0]=0|d[t+3>>0],d[ca+4>>0]=0|d[t+4>>0],d[ca+5>>0]=0|d[t+5>>0],d[ca+6>>0]=0|d[t+6>>0],d[ca+7>>0]=0|d[t+7>>0],da=ca+8|0,d[da>>0]=0|d[E>>0],d[da+1>>0]=0|d[E+1>>0],d[da+2>>0]=0|d[E+2>>0],d[da+3>>0]=0|d[E+3>>0],d[da+4>>0]=0|d[E+4>>0],d[da+5>>0]=0|d[E+5>>0],d[da+6>>0]=0|d[E+6>>0],d[da+7>>0]=0|d[E+7>>0],void Er(J,L,68723,ca)):(R=g,S=aa,T=S+12|0,U=0|f[T>>2],V=U+(R<<3)|0,f[a>>2]=0|f[V>>2],f[a+4>>2]=0|f[V+4>>2],void(l=fa))}function pt(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=3,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function qt(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0;Q=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=d,C=0|f[r>>2],J=C>>>11,K=c,L=0|f[K>>2],M=2097151&J,N=M<<11,O=2047&L,e=O|N,f[K>>2]=e,g=c,h=g+12|0,i=d,j=i+12|0,f[h>>2]=0|f[j>>2],k=c,n=0|f[k>>2],o=n>>>11,p=128&o,q=0!=(0|p),q||(s=c,t=s+12|0,u=0|f[t>>2],v=u+56|0,w=0|f[v>>2],x=w+1|0,f[v>>2]=x),y=d,z=y+16|0,A=0|f[z>>2],B=c,D=B+16|0,f[D>>2]=A,E=d,F=E+20|0,G=0|f[F>>2],H=c,I=H+20|0,f[I>>2]=G,l=Q}function rt(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;return n=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=d,g=e+12|0,h=0|f[g>>2],i=h+8|0,j=0|f[i>>2],l=n,0|j}function st(a){a|=0;var b=0,c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,da=0,ea=0,fa=0;da=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,r=0|Jc(c,60),_=r,C=_,ba=C,ea=74584,fa=ba+60|0;do f[ba>>2]=0|f[ea>>2],ba=ba+4|0,ea=ea+4|0;while((0|ba)<(0|fa));N=_,V=N+4|0,d[V>>0]=1,W=_,Y=W+8|0,f[Y>>2]=2544,Z=_,$=Z+40|0,f[$>>2]=1,e=b,g=b,h=g+44|0,i=0|f[h>>2],Jp(e,i,68953,316,0),j=b,k=b,n=k+44|0,o=0|f[n>>2],Jp(j,o,68999,317,262144),p=b,q=b,s=q+44|0,t=0|f[s>>2],Jp(p,t,68835,318,0),u=b,v=_,w=0|it(u,v),aa=w,x=b,y=b,z=y+44|0,A=0|f[z>>2],B=b,D=0|ki(B,69512,4),E=aa,Hp(x,A,D,E),F=b,G=b,H=G+44|0,I=0|f[H>>2],J=b,K=0|ki(J,68841,2),L=aa,Hp(F,I,K,L),M=b,O=b,P=O+84|0,Q=0|f[P>>2],Yp(M,Q,68844,319,0),R=b,S=b,T=S+84|0,U=0|f[T>>2],Jp(R,U,68844,319,0),l=da}function tt(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;v=l,l=l+32|0,(0|l)>=(0|m)&&X(),t=v,s=v+8|0,d=b,e=d,f[t>>2]=s,0|Lp(e,68778,t),i=s+4|0,j=0|f[i>>2],k=0==(0|j),k&&(n=0|f[s>>2],o=0!=(0|n),o||(p=d,q=d,r=0|tp(q,68855),Br(p,r,68780))),g=0|f[c>>2],h=0|f[s>>2],qt(g,h),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=v}function ut(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;return t=l,l=l+32|0,(0|l)>=(0|m)&&X(),r=t,q=t+8|0,d=b,e=d,f[r>>2]=q,0|Lp(e,68900,r),g=q+4|0,h=0|f[g>>2],(i=13!=(0|h))?(j=d,k=d,n=0|tp(k,68855),Br(j,n,68824),void 0):(o=0|f[c>>2],p=0|f[q>>2],qt(o,p),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=t))}function vt(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0;return ma=l,l=l+48|0,(0|l)>=(0|m)&&X(),d=b,e=0|f[c>>2],ia=e,s=d,D=ia,O=0|rt(s,D),ea=O,Z=ia,$=0|f[Z>>2],_=$>>>11,aa=128&_,(ba=0!=(0|aa))?(pt(a,-1),void(l=ma)):(g=ea,h=0|f[g>>2],i=127&h,(j=38!=(0|i))?(pt(a,0),void(l=ma)):(k=ea,n=0|f[k>>2],o=n>>>7,p=33554431&o,da=p,q=da,r=q>>>18,t=31&r,fa=t,u=da,v=u>>>13,w=31&v,ga=w,x=da,y=x>>>12,z=1&y,ka=z,A=da,B=A>>>7,C=31&B,ja=C,E=ka,F=0!=(0|E),F?la=7:(G=ia,H=0|f[G>>2],I=H>>>11,J=256&I,K=0!=(0|J),L=ga,M=0!=(0|L),ha=K&M,ha?la=7:(T=fa,U=ja,V=T+U|0,W=V)),7==(0|la)&&(N=fa,P=ja,Q=N+P|0,R=Q+1|0,S=0-R|0,W=S),ca=W,Y=ca,pt(a,Y),void(l=ma)))}function wt(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Z=0;return Z=l,l=l+32|0,(0|l)>=(0|m)&&X(),W=Z,T=Z+16|0,d=b,e=d,f[W>>2]=T,0|Lp(e,68778,W),s=T+4|0,D=0|f[s>>2],N=0==(0|D),N&&(O=0|f[T>>2],P=0!=(0|O),P||(Q=d,R=d,S=0|tp(R,68855),Br(Q,S,68780))),g=T+4|0,h=0|f[g>>2],i=13!=(0|h),i&&(j=d,k=d,n=0|tp(k,68855),Br(j,n,68824)),o=0|f[T>>2],U=o,p=U,q=0|f[p>>2],r=q>>>11,t=256&r,u=0!=(0|t),u?(f[a>>2]=0|f[T>>2],f[a+4>>2]=0|f[T+4>>2],void(l=Z)):(v=d,w=U,x=w+4|0,y=0|f[x>>2],z=0|Tc(v,13,y),V=z,A=V,B=U,qt(A,B),C=V,E=0|f[C>>2],F=E>>>11,G=256|F,H=0|f[C>>2],I=2097151&G,J=I<<11,K=2047&H,L=K|J,f[C>>2]=L,M=V,xt(a,M),void(l=Z))}function xt(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;
+n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=0|f[d>>2],g=255&e,h=j+4|0,f[h>>2]=g,i=c,f[j>>2]=i,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function yt(a,b,c,e,g){a|=0,b|=0,c|=0,e|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,N=0;N=l,l=l+32|0,(0|l)>=(0|m)&&X(),K=N+16|0,J=N+8|0,h=b,i=g,v=h,f[J>>2]=0|f[c>>2],f[J+4>>2]=0|f[c+4>>2],f[K>>2]=0|f[e>>2],f[K+4>>2]=0|f[e+4>>2],zt(v,J,K),C=h,D=h,E=0|tp(D,68889),F=0|Tc(C,17,E),L=F,G=h,H=0|Jc(G,16),I=L,j=I+12|0,f[j>>2]=H,k=L,n=k+12|0,o=0|f[n>>2],f[o>>2]=0|f[c>>2],f[o+4>>2]=0|f[c+4>>2],p=L,q=p+12|0,r=0|f[q>>2],s=r+8|0,f[s>>2]=0|f[e>>2],f[s+4>>2]=0|f[e+4>>2],t=i,u=L,w=u+16|0,x=0|d[w>>0],y=1&t,z=x&-2,A=z|y,d[w>>0]=A,B=L,At(a,B),l=N}function zt(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,M=0;return M=l,l=l+48|0,(0|l)>=(0|m)&&X(),E=M+40|0,K=M,F=M+24|0,g=M+8|0,e=a,t=b+4|0,x=0|f[t>>2],I=x,y=c+4|0,z=0|f[y>>2],J=z,A=I,B=3==(0|A),C=I,D=6==(0|C),G=B|D,G&&(h=J,i=3==(0|h),j=J,k=6==(0|j),H=i|k)?void(l=M):(n=e,d[K>>0]=0|d[c>>0],d[K+1>>0]=0|d[c+1>>0],d[K+2>>0]=0|d[c+2>>0],d[K+3>>0]=0|d[c+3>>0],d[K+4>>0]=0|d[c+4>>0],d[K+5>>0]=0|d[c+5>>0],d[K+6>>0]=0|d[c+6>>0],d[K+7>>0]=0|d[c+7>>0],f[E>>2]=0|f[b>>2],f[E+4>>2]=0|f[b+4>>2],Yj(g,n,E,68851,1,K),f[F>>2]=0|f[g>>2],f[F+4>>2]=0|f[g+4>>2],o=F+4|0,p=0|f[o>>2],(q=0==(0|p))?(r=0|f[F>>2],(s=0!=(0|r))?void(l=M):(u=e,v=e,w=0|tp(v,68855),Br(u,w,68869),void 0)):void(l=M))}function At(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=0|f[d>>2],g=255&e,h=j+4|0,f[h>>2]=g,i=c,f[j>>2]=i,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function Bt(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=0|f[c>>2],j=e,g=j,h=g+12|0,i=0|f[h>>2],f[a>>2]=0|f[i>>2],f[a+4>>2]=0|f[i+4>>2],l=n}function Ct(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;o=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=b,e=0|f[c>>2],k=e,g=k,h=g+12|0,i=0|f[h>>2],j=i+8|0,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=o}function Dt(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,p=0;p=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=b,g=0|f[c>>2],n=g,h=n,i=h+16|0,j=0|d[i>>0],k=1&j,Et(a,k),l=p}function Et(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),j=n,c=b,d=c,e=255&d,g=0!=(0|e),h=g?2:0,i=j+4|0,f[i>>2]=h,f[j>>2]=1,f[a>>2]=0|f[j>>2],f[a+4>>2]=0|f[j+4>>2],l=n}function Ft(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,z=0;z=l,l=l+80|0,(0|l)>=(0|m)&&X(),r=z+56|0,p=z+48|0,u=z+40|0,v=z,o=z+24|0,q=z+16|0,s=z+64|0,e=b,g=e,f[v>>2]=o,w=v+4|0,f[w>>2]=q,x=v+8|0,f[x>>2]=s,h=0|Lp(g,68895,v),t=h,i=t,j=3!=(0|i),j&&(d[s>>0]=0),k=e,n=0|d[s>>0],f[u>>2]=0|f[c>>2],f[u+4>>2]=0|f[c+4>>2],f[p>>2]=0|f[o>>2],f[p+4>>2]=0|f[o+4>>2],f[r>>2]=0|f[q>>2],f[r+4>>2]=0|f[q+4>>2],Gt(k,u,p,r,n),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=z}function Gt(a,b,c,e,g){a|=0,b|=0,c|=0,e|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,N=0;N=l,l=l+32|0,(0|l)>=(0|m)&&X(),K=N+16|0,J=N+8|0,h=a,i=g,v=0|f[b>>2],L=v,C=h,f[J>>2]=0|f[c>>2],f[J+4>>2]=0|f[c+4>>2],f[K>>2]=0|f[e>>2],f[K+4>>2]=0|f[e+4>>2],zt(C,J,K),D=i,E=L,F=E+16|0,G=0|d[F>>0],H=1&D,I=G&-2,j=I|H,d[F>>0]=j,k=L,n=k+12|0,o=0|f[n>>2],p=0!=(0|o),p||(q=h,r=0|Jc(q,16),s=L,t=s+12|0,f[t>>2]=r),u=L,w=u+12|0,x=0|f[w>>2],f[x>>2]=0|f[c>>2],f[x+4>>2]=0|f[c+4>>2],y=L,z=y+12|0,A=0|f[z>>2],B=A+8|0,f[B>>2]=0|f[e>>2],f[B+4>>2]=0|f[e+4>>2],l=N}function Ht(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,oa=0;return oa=l,l=l+112|0,(0|l)>=(0|m)&&X(),g=oa+104|0,e=oa+96|0,fa=oa+88|0,ha=oa+80|0,ea=oa+72|0,ga=oa+64|0,ma=oa+16|0,la=oa+8|0,ka=oa,da=oa+40|0,i=oa+32|0,v=oa+24|0,h=b,G=h,f[ka>>2]=da,0|Lp(G,68900,ka),R=h,f[ga>>2]=0|f[c>>2],f[ga+4>>2]=0|f[c+4>>2],f[ea>>2]=0|f[da>>2],f[ea+4>>2]=0|f[da+4>>2],$=0|kf(R,ga,ea),(_=$<<24>>24!=0)?(It(a),void(l=oa)):(aa=h,ba=h,f[ha>>2]=0|f[c>>2],f[ha+4>>2]=0|f[c+4>>2],ca=0|jq(ba,ha),f[fa>>2]=0|f[da>>2],f[fa+4>>2]=0|f[da+4>>2],j=0|ms(aa,fa,ca),(k=j<<24>>24!=0)?(n=0|f[c>>2],ja=n,o=0|f[da>>2],ia=o,p=h,q=ja,r=q+12|0,s=0|f[r>>2],t=ia,u=t+12|0,w=0|f[u>>2],d[la>>0]=0|d[w>>0],d[la+1>>0]=0|d[w+1>>0],d[la+2>>0]=0|d[w+2>>0],d[la+3>>0]=0|d[w+3>>0],d[la+4>>0]=0|d[w+4>>0],d[la+5>>0]=0|d[w+5>>0],d[la+6>>0]=0|d[w+6>>0],d[la+7>>0]=0|d[w+7>>0],f[e>>2]=0|f[s>>2],f[e+4>>2]=0|f[s+4>>2],Yj(i,p,e,68902,1,la),x=i+4|0,y=0|f[x>>2],z=0!=(0|y),z&&(A=h,B=ja,C=B+12|0,D=0|f[C>>2],E=D+8|0,F=ia,H=F+12|0,I=0|f[H>>2],J=I+8|0,d[ma>>0]=0|d[J>>0],d[ma+1>>0]=0|d[J+1>>0],d[ma+2>>0]=0|d[J+2>>0],d[ma+3>>0]=0|d[J+3>>0],d[ma+4>>0]=0|d[J+4>>0],d[ma+5>>0]=0|d[J+5>>0],d[ma+6>>0]=0|d[J+6>>0],d[ma+7>>0]=0|d[J+7>>0],f[g>>2]=0|f[E>>2],f[g+4>>2]=0|f[E+4>>2],Yj(v,A,g,68902,1,ma),K=v+4|0,L=0|f[K>>2],M=0!=(0|L),M&&(N=ja,O=N+16|0,P=0|d[O>>0],Q=1&P,S=255&Q,T=ia,U=T+16|0,V=0|d[U>>0],W=1&V,Y=255&W,Z=(0|S)!=(0|Y),!Z))?(It(a),void(l=oa)):(Jt(a),void(l=oa))):(Jt(a),void(l=oa)))}function It(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=2,f[c>>2]=1,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Jt(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=e,b=c+4|0,f[b>>2]=0,f[c>>2]=1,f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],l=e}function Kt(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0;return _=l,l=l+112|0,(0|l)>=(0|m)&&X(),Y=_+88|0,R=_+80|0,W=_+72|0,Q=_+64|0,V=_+56|0,O=_+48|0,Z=_,U=_+32|0,N=_+16|0,P=_+8|0,e=b,g=0|f[c>>2],T=g,t=e,f[Z>>2]=U,0|Lp(t,68900,Z),E=T,H=E+12|0,I=0|f[H>>2],f[N>>2]=0|f[I>>2],f[N+4>>2]=0|f[I+4>>2],J=T,K=J+12|0,L=0|f[K>>2],M=L+8|0,f[P>>2]=0|f[M>>2],f[P+4>>2]=0|f[M+4>>2],h=e,f[O>>2]=0|f[N>>2],f[O+4>>2]=0|f[N+4>>2],f[V>>2]=0|f[U>>2],f[V+4>>2]=0|f[U+4>>2],i=0|Lt(h,O,V),j=255&i,(k=0!=(0|j))?(n=T,o=n+16|0,p=0|d[o>>0],q=1&p,r=255&q,s=0!=(0|r),s&&(u=e,f[Q>>2]=0|f[P>>2],f[Q+4>>2]=0|f[P+4>>2],f[W>>2]=0|f[U>>2],f[W+4>>2]=0|f[U+4>>2],v=0|Mt(u,Q,W),w=255&v,x=0!=(0|w))?(D=1,C=1&D,F=255&C,S=F,G=S,Et(a,G),void(l=_)):(y=e,f[R>>2]=0|f[P>>2],f[R+4>>2]=0|f[P+4>>2],f[Y>>2]=0|f[U>>2],f[Y+4>>2]=0|f[U+4>>2],z=0|Nt(y,R,Y),A=255&z,B=0!=(0|A),D=B,C=1&D,F=255&C,S=F,G=S,Et(a,G),void(l=_))):(D=0,C=1&D,F=255&C,S=F,G=S,Et(a,G),void(l=_))}function Lt(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,z=0;return z=l,l=l+48|0,(0|l)>=(0|m)&&X(),t=z+32|0,x=z,w=z+16|0,g=a,j=g,d[x>>0]=0|d[c>>0],d[x+1>>0]=0|d[c+1>>0],d[x+2>>0]=0|d[c+2>>0],d[x+3>>0]=0|d[c+3>>0],d[x+4>>0]=0|d[c+4>>0],d[x+5>>0]=0|d[c+5>>0],d[x+6>>0]=0|d[c+6>>0],d[x+7>>0]=0|d[c+7>>0],f[t>>2]=0|f[b>>2],f[t+4>>2]=0|f[b+4>>2],Yj(w,j,t,68851,1,x),k=w+4|0,n=0|f[k>>2],o=3==(0|n),o&&(p=0|f[w>>2],u=p,q=u,r=0==(0|q),s=u,h=(0|s)==-1,v=r|h)?(e=1,i=e,l=z,0|i):(e=0,i=e,l=z,0|i)}function Mt(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;return v=l,l=l+32|0,(0|l)>=(0|m)&&X(),r=v+24|0,t=v,s=v+8|0,e=a,g=e,d[t>>0]=0|d[c>>0],d[t+1>>0]=0|d[c+1>>0],d[t+2>>0]=0|d[c+2>>0],d[t+3>>0]=0|d[c+3>>0],d[t+4>>0]=0|d[c+4>>0],d[t+5>>0]=0|d[c+5>>0],d[t+6>>0]=0|d[c+6>>0],d[t+7>>0]=0|d[c+7>>0],f[r>>2]=0|f[b>>2],f[r+4>>2]=0|f[b+4>>2],Yj(s,g,r,68851,1,t),h=s+4|0,i=0|f[h>>2],j=3==(0|i),k=0|f[s>>2],n=1==(0|k),o=j?n:0,p=1&o,q=255&p,l=v,0|q}function Nt(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,z=0;return z=l,l=l+48|0,(0|l)>=(0|m)&&X(),t=z+32|0,x=z,w=z+16|0,g=a,j=g,d[x>>0]=0|d[c>>0],d[x+1>>0]=0|d[c+1>>0],d[x+2>>0]=0|d[c+2>>0],d[x+3>>0]=0|d[c+3>>0],d[x+4>>0]=0|d[c+4>>0],d[x+5>>0]=0|d[c+5>>0],d[x+6>>0]=0|d[c+6>>0],d[x+7>>0]=0|d[c+7>>0],f[t>>2]=0|f[b>>2],f[t+4>>2]=0|f[b+4>>2],Yj(w,j,t,68851,1,x),k=w+4|0,n=0|f[k>>2],o=3==(0|n),o&&(p=0|f[w>>2],u=p,q=u,r=0==(0|q),s=u,h=1==(0|s),v=r|h)?(e=1,i=e,l=z,0|i):(e=0,i=e,l=z,0|i)}function Ot(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,t=0;return t=l,l=l+32|0,(0|l)>=(0|m)&&X(),r=t+16|0,g=a,h=c,i=d,j=e,k=g,n=h,o=i,p=j,f[r>>2]=0|f[b>>2],f[r+4>>2]=0|f[b+4>>2],q=0|Pt(k,r,n,o,p,1),l=t,0|q}function Pt(a,b,c,e,g,h){a|=0,b|=0,c|=0,e|=0,g|=0,h|=0;var i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Ea=0;if(Ea=l,l=l+80|0,(0|l)>=(0|m)&&X(),k=Ea+56|0,j=Ea+48|0,qa=Ea+8|0,xa=Ea,o=a,z=c,K=e,V=g,fa=h,ya=0|f[b>>2],Ca=ya,za=b+4|0,p=0|f[za>>2],q=17!=(0|p))return n=0,wa=n,l=Ea,0|wa;if(r=o,s=Ca,t=s+12|0,u=0|f[t>>2],f[j>>2]=0|f[u>>2],f[j+4>>2]=0|f[u+4>>2],Mf(qa,r,j),v=0|f[qa>>2],Aa=v,w=o,x=Ca,y=x+12|0,A=0|f[y>>2],B=A+8|0,f[k>>2]=0|f[B>>2],f[k+4>>2]=0|f[B+4>>2],Mf(xa,w,k),C=0|f[xa>>2],Ba=C,D=Aa,E=(0|D)<0,E&&(F=V,G=Aa,H=G+F|0,Aa=H,I=Aa,J=(0|I)<0))return n=0,wa=n,l=Ea,0|wa;L=fa,M=L<<24>>24!=0;do if(M){if(N=Aa,O=V,P=(0|N)>(0|O))return n=0,wa=n,l=Ea,0|wa;if(Q=Ba,R=V,S=(0|Q)>(0|R),!S)break;T=V,Ba=T;break}while(0);U=Ba,W=(0|U)<0,W&&(Y=V,Z=Ba,$=Z+Y|0,Ba=$),_=Ca,aa=_+16|0,ba=0|d[aa>>0],ca=1&ba,da=ca<<24>>24!=0;do if(!da){if(ea=fa,ga=ea<<24>>24!=0,ga&&(ha=Ba,ia=V,ja=(0|ha)<(0|ia),!ja))break;ka=Ba,la=ka+1|0,Ba=la}while(0);return ma=Ba,na=Aa,oa=ma-na|0,V=oa,pa=V,ra=(0|pa)<0,i=ra?0:oa,V=i,sa=Aa,ta=z,f[ta>>2]=sa,ua=V,va=K,f[va>>2]=ua,n=1,wa=n,l=Ea,0|wa}function Qt(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,$=0;$=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,q=b,B=q+32|0,M=0|f[B>>2],S=0|Dp(c,68889,M),Y=S,T=Y,U=0|f[T>>2],V=U>>>11,W=V&-256,d=17|W,e=Y,g=0|f[e>>2],h=2097151&d,i=h<<11,j=2047&g,k=j|i,f[e>>2]=k,n=b,o=Y,Jp(n,o,68915,320,0),p=b,r=Y,Jp(p,r,68921,321,0),s=b,t=Y,Jp(s,t,68902,322,262144),u=b,v=Y,Jp(u,v,69450,323,262144),w=b,x=Y,Jp(w,x,68925,324,0),y=b,z=Y,Jp(y,z,68938,320,0),A=b,C=Y,Jp(A,C,68944,323,262144),D=b,E=Y,Jp(D,E,68953,325,4096),F=b,G=Y,Jp(F,G,68964,321,0),H=b,I=Y,Jp(H,I,68969,323,262144),J=b,K=Y,Jp(J,K,68977,326,0),L=b,N=Y,Jp(L,N,68986,327,0),O=b,P=Y,Jp(O,P,68994,328,262144),Q=b,R=Y,Jp(Q,R,68999,329,262144),l=$}function Rt(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,R=0;R=l,l=l+128|0,(0|l)>=(0|m)&&X(),P=R+112|0,N=R+104|0,M=R+96|0,L=R+88|0,g=R+80|0,e=R+72|0,K=R+56|0,O=R+48|0,i=R+32|0,v=R+24|0,C=R+16|0,D=R+8|0,E=R,h=b,F=0|f[c>>2],J=F,G=h,H=J,I=H+12|0,j=0|f[I>>2],f[e>>2]=0|f[j>>2],f[e+4>>2]=0|f[j+4>>2],Vg(i,G,e),f[K>>2]=0|f[i>>2],f[K+4>>2]=0|f[i+4>>2],k=h,n=J,o=n+12|0,p=0|f[o>>2],q=p+8|0,f[g>>2]=0|f[q>>2],f[g+4>>2]=0|f[q+4>>2],Vg(v,k,g),f[O>>2]=0|f[v>>2],f[O+4>>2]=0|f[v+4>>2],r=h,f[L>>2]=0|f[K>>2],f[L+4>>2]=0|f[K+4>>2],Hg(C,r,L),f[K>>2]=0|f[C>>2],f[K+4>>2]=0|f[C+4>>2],s=h,t=J,u=t+16|0,w=0|d[u>>0],x=1&w,y=255&x,z=0!=(0|y),A=z?3:2,f[M>>2]=0|f[K>>2],f[M+4>>2]=0|f[K+4>>2],dh(D,s,M,68982,A),B=h,f[N>>2]=0|f[K>>2],f[N+4>>2]=0|f[K+4>>2],f[P>>2]=0|f[O>>2],f[P+4>>2]=0|f[O+4>>2],gh(E,B,N,P),f[a>>2]=0|f[K>>2],f[a+4>>2]=0|f[K+4>>2],l=R}function St(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,R=0;R=l,l=l+128|0,(0|l)>=(0|m)&&X(),P=R+112|0,N=R+104|0,M=R+96|0,L=R+88|0,g=R+80|0,e=R+72|0,K=R+56|0,O=R+48|0,i=R+32|0,v=R+24|0,C=R+16|0,D=R+8|0,E=R,h=b,F=0|f[c>>2],J=F,G=h,H=J,I=H+12|0,j=0|f[I>>2],f[e>>2]=0|f[j>>2],f[e+4>>2]=0|f[j+4>>2],Df(i,G,e),f[K>>2]=0|f[i>>2],f[K+4>>2]=0|f[i+4>>2],k=h,n=J,o=n+12|0,p=0|f[o>>2],q=p+8|0,f[g>>2]=0|f[q>>2],f[g+4>>2]=0|f[q+4>>2],Df(v,k,g),f[O>>2]=0|f[v>>2],f[O+4>>2]=0|f[v+4>>2],r=h,f[L>>2]=0|f[K>>2],f[L+4>>2]=0|f[K+4>>2],Hg(C,r,L),f[K>>2]=0|f[C>>2],f[K+4>>2]=0|f[C+4>>2],s=h,t=J,u=t+16|0,w=0|d[u>>0],x=1&w,y=255&x,z=0!=(0|y),A=z?3:2,f[M>>2]=0|f[K>>2],f[M+4>>2]=0|f[K+4>>2],dh(D,s,M,68982,A),B=h,f[N>>2]=0|f[K>>2],f[N+4>>2]=0|f[K+4>>2],f[P>>2]=0|f[O>>2],f[P+4>>2]=0|f[O+4>>2],gh(E,B,N,P),f[a>>2]=0|f[K>>2],f[a+4>>2]=0|f[K+4>>2],l=R}function Tt(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,ma=0;return ma=l,l=l+96|0,(0|l)>=(0|m)&&X(),i=ma+80|0,h=ma+72|0,g=ma+64|0,e=ma+56|0,ha=ma+48|0,ga=ma+40|0,ja=ma+32|0,ka=ma,fa=ma+16|0,j=b,k=j,f[ka>>2]=fa,0|Lp(k,68900,ka),x=j,f[ja>>2]=0|f[c>>2],f[ja+4>>2]=0|f[c+4>>2],f[ga>>2]=0|f[fa>>2],f[ga+4>>2]=0|f[fa+4>>2],I=0|kf(x,ja,ga),(T=I<<24>>24!=0)?(It(a),void(l=ma)):(_=j,aa=j,ba=0|tp(aa,68889),f[ha>>2]=0|f[fa>>2],f[ha+4>>2]=0|f[fa+4>>2],ca=0|Kf(_,ha,ba),(da=ca<<24>>24!=0)?(n=fa+4|0,o=0|f[n>>2],(p=17!=(0|o))?(Jt(a),void(l=ma)):(q=0|f[c>>2],ia=q,r=0|f[fa>>2],ea=r,s=j,t=ia,u=t+12|0,v=0|f[u>>2],w=ea,y=w+12|0,z=0|f[y>>2],f[e>>2]=0|f[v>>2],f[e+4>>2]=0|f[v+4>>2],f[g>>2]=0|f[z>>2],f[g+4>>2]=0|f[z+4>>2],A=0|Qf(s,e,g),B=A<<24>>24!=0,B&&(C=j,D=ia,E=D+12|0,F=0|f[E>>2],G=F+8|0,H=ea,J=H+12|0,K=0|f[J>>2],L=K+8|0,f[h>>2]=0|f[G>>2],f[h+4>>2]=0|f[G+4>>2],f[i>>2]=0|f[L>>2],f[i+4>>2]=0|f[L+4>>2],M=0|Qf(C,h,i),N=M<<24>>24!=0,N&&(O=ia,P=O+16|0,Q=0|d[P>>0],R=1&Q,S=255&R,U=ea,V=U+16|0,W=0|d[V>>0],Y=1&W,Z=255&Y,$=(0|S)!=(0|Z),!$))?(It(a),void(l=ma)):(Jt(a),void(l=ma)))):(Jt(a),void(l=ma)))}function Ut(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0;return S=l,l=l+80|0,(0|l)>=(0|m)&&X(),g=S+72|0,e=S+64|0,L=S+56|0,P=S+48|0,K=S+40|0,O=S+32|0,J=S+24|0,Q=S,N=S+8|0,h=b,i=h,f[Q>>2]=N,0|Lp(i,68900,Q),v=h,f[J>>2]=0|f[c>>2],f[J+4>>2]=0|f[c+4>>2],f[O>>2]=0|f[N>>2],f[O+4>>2]=0|f[N+4>>2],C=0|kf(v,J,O),(D=C<<24>>24!=0)?(f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=S)):(E=h,F=h,f[K>>2]=0|f[c>>2],f[K+4>>2]=0|f[c+4>>2],G=0|jq(F,K),f[P>>2]=0|f[N>>2],f[P+4>>2]=0|f[N+4>>2],H=0|ms(E,P,G),I=H<<24>>24!=0,I||(j=h,k=h,n=0|tp(k,68905),Br(j,n,69015)),o=0|f[N>>2],M=o,p=h,q=M,r=q+12|0,s=0|f[r>>2],t=M,u=t+12|0,w=0|f[u>>2],x=w+8|0,y=M,z=y+16|0,A=0|d[z>>0],B=1&A,f[L>>2]=0|f[c>>2],f[L+4>>2]=0|f[c+4>>2],f[e>>2]=0|f[s>>2],f[e+4>>2]=0|f[s+4>>2],f[g>>2]=0|f[x>>2],f[g+4>>2]=0|f[x+4>>2],Gt(p,L,e,g,B),f[a>>2]=0|f[c>>2],f[a+4>>2]=0|f[c+4>>2],void(l=S))}function Vt(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,L=0;L=l,l=l+144|0,(0|l)>=(0|m)&&X(),i=L+128|0,h=L+120|0,g=L+112|0,e=L+104|0,d=L+96|0,J=L+88|0,c=L+80|0,b=L+72|0,I=L+56|0,k=L+48|0,x=L+40|0,B=L+32|0,C=L+24|0,D=L+16|0,E=L+8|0,F=L,j=a,G=j,rg(I,G,69036,5),H=j,n=j,rg(k,n,69042,3),f[b>>2]=0|f[k>>2],f[b+4>>2]=0|f[k+4>>2],Lj(H,69046,b),o=j,p=j,rg(x,p,69059,5),f[c>>2]=0|f[x>>2],f[c+4>>2]=0|f[x+4>>2],Lj(o,69065,c),q=j,f[J>>2]=0|f[I>>2],f[J+4>>2]=0|f[I+4>>2],Lj(q,69077,J),r=j,s=j,rg(B,s,69036,5),f[d>>2]=0|f[B>>2],f[d+4>>2]=0|f[B+4>>2],Lj(r,69097,d),t=j,Wt(C,10200),f[e>>2]=0|f[C>>2],f[e+4>>2]=0|f[C+4>>2],Lj(t,69111,e),u=j,v=j,rg(D,v,69128,10),f[g>>2]=0|f[D>>2],f[g+4>>2]=0|f[D+4>>2],Lj(u,69139,g),w=j,y=j,rg(E,y,69158,25),f[h>>2]=0|f[E>>2],f[h+4>>2]=0|f[E+4>>2],Lj(w,69184,h),z=j,A=j,rg(F,A,69202,48),f[i>>2]=0|f[F>>2],f[i+4>>2]=0|f[F+4>>2],Lj(z,69251,i),l=L}function Wt(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=3,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function Xt(a,b){a|=0,b|=0;var c=0,d=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ka=0,la=0,oa=0,qa=0,ra=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0;Ga=l,Ea=4,Da=0|fw(40),f[Da>>2]=0,q=0,g=0|ja(330,0|a,0,0),h=q,q=0,0!=(0|h)&0!=(0|r)?(v=0|rw(0|f[h>>2],0|Da,0|Ea),0==(0|v)&&Aa(0|h,0|r),F=r):v=-1,H=F,ua=1==(0|v);do{if(!ua){if(S=0!=(0|g)){if(f[g>>2]=a,ba=g+248|0,f[ba>>2]=b,oa=b+28|0,qa=0|f[oa>>2],ra=g+196|0,f[ra>>2]=qa,ta=b+1400|0,i=0|f[ta>>2],j=65535&i,k=g+244|0,e[k>>1]=j,m=g+8|0,Da=0|pw(m,1,0|Da,0|Ea),Ea=F,q=0,n=q,q=0,0!=(0|n)&0!=(0|r)?(o=0|rw(0|f[n>>2],0|Da,0|Ea),0==(0|o)&&Aa(0|n,0|r),F=r):o=-1,p=F,va=1==(0|o)){d=p;break}d=0;break}return c=0,gw(0|Da),0|c}d=H}while(0);for(;;){if(s=0==(0|d)){if(t=b+1144|0,u=0|f[t>>2],q=0,pa(331,0|g,0|u,0),w=q,q=0,0!=(0|w)&0!=(0|r)?(x=0|rw(0|f[w>>2],0|Da,0|Ea),0==(0|x)&&Aa(0|w,0|r),F=r):x=-1,y=F,ya=1==(0|x)){d=y;continue}if(z=g+216|0,A=0|f[z>>2],q=0,B=0|sa(195,0|a,0|A),C=q,q=0,0!=(0|C)&0!=(0|r)?(D=0|rw(0|f[C>>2],0|Da,0|Ea),0==(0|D)&&Aa(0|C,0|r),F=r):D=-1,E=F,za=1==(0|D)){d=E;continue}if(G=g+216|0,I=0|f[G>>2],q=0,na(332,0|a,0|I),J=q,q=0,0!=(0|J)&0!=(0|r)?(K=0|rw(0|f[J>>2],0|Da,0|Ea),0==(0|K)&&Aa(0|J,0|r),F=r):K=-1,L=F,Ba=1==(0|K)){d=L;continue}if(M=g+4|0,N=0|f[M>>2],q=0,ma(333,0|N),O=q,q=0,0!=(0|O)&0!=(0|r)?(P=0|rw(0|f[O>>2],0|Da,0|Ea),0==(0|P)&&Aa(0|O,0|r),F=r):P=-1,Q=F,Ca=1==(0|P)){d=Q;continue}Fa=11;break}if(R=g+196|0,T=0|f[R>>2],U=g+216|0,V=0|f[U>>2],W=V+28|0,X=0|f[W>>2],Y=(0|T)==(0|X),Y&&(Z=g+216|0,$=0|f[Z>>2],_=$+28|0,f[_>>2]=0),aa=g+216|0,ca=0|f[aa>>2],q=0,na(332,0|a,0|ca),da=q,q=0,0!=(0|da)&0!=(0|r)?(ea=0|rw(0|f[da>>2],0|Da,0|Ea),0==(0|ea)&&Aa(0|da,0|r),F=r):ea=-1,fa=F,wa=1==(0|ea))d=fa;else{if(ga=g+4|0,ha=0|f[ga>>2],q=0,ma(333,0|ha),ia=q,q=0,0!=(0|ia)&0!=(0|r)?(ka=0|rw(0|f[ia>>2],0|Da,0|Ea),0==(0|ka)&&Aa(0|ia,0|r),F=r):ka=-1,la=F,!(xa=1==(0|ka))){Fa=16;break}d=la}}return 11==(0|Fa)?(c=B,gw(0|Da),0|c):16==(0|Fa)?(c=0,gw(0|Da),0|c):0}function Yt(a,b,c){a|=0,b|=0,c|=0;var d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Od=0;if(Od=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=a,mb=b,kc=c,vc=g,Gc=0|et(vc),Md=Gc,Sc=Md,cd=0|gt(Sc,252),Ld=cd,nd=Ld,yd=0!=(0|nd),!yd)return d=0,ec=d,l=Od,0|ec;if(h=Ld,0|sw(0|h,74644,252),u=g,F=Ld,f[F>>2]=u,Q=Md,aa=Ld,la=aa+4|0,f[la>>2]=Q,wa=mb,Ha=0!=(0|wa),!Ha)return Sa=Ld,d=Sa,ec=d,l=Od,0|ec;bb=mb,nb=Ld,yb=nb+164|0,f[yb>>2]=bb,Jb=Ld,Ub=Jb+184|0,dc=0|e[Ub>>1],fc=dc&-32768,gc=32767|fc,e[Ub>>1]=gc,hc=Ld,ic=hc+184|0,jc=0|e[ic>>1],lc=32767&jc,e[ic>>1]=lc,mc=g,nc=0|ig(mc),oc=Ld,pc=oc+216|0,f[pc>>2]=nc,qc=mb,rc=Ld,sc=rc+216|0,tc=0|f[sc>>2],Zt(qc,tc),uc=Ld,wc=uc+228|0,f[wc>>2]=8,xc=g,yc=Ld,zc=yc+228|0,Ac=0|f[zc>>2],Bc=Ac<<2,Cc=0|Jc(xc,Bc),Dc=Ld,Ec=Dc+216|0,Fc=0|f[Ec>>2],Hc=Fc+20|0,f[Hc>>2]=Cc,Ic=Ld,Kc=Ic+212|0,f[Kc>>2]=1024,Lc=g,Mc=Ld,Nc=Mc+212|0,Oc=0|f[Nc>>2],Pc=Oc<<2,Qc=0|Jc(Lc,Pc),Rc=Ld,Tc=Rc+204|0,f[Tc>>2]=Qc,Uc=Ld,Vc=Uc+204|0,Xc=0|f[Vc>>2],Yc=Ld,Zc=Yc+216|0,$c=0|f[Zc>>2],_c=$c+8|0,f[_c>>2]=Xc,ad=Ld,bd=ad+220|0,f[bd>>2]=32,dd=g,ed=Ld,fd=ed+220|0,gd=0|f[fd>>2],hd=gd<<3,id=0|Jc(dd,hd),jd=Ld,kd=jd+216|0,ld=0|f[kd>>2],md=ld+12|0,f[md>>2]=id,od=Ld,pd=od+216|0,qd=0|f[pd>>2],rd=qd+44|0,f[rd>>2]=0,sd=Ld,td=sd+224|0,f[td>>2]=256,ud=g,vd=Ld,wd=vd+224|0,xd=0|f[wd>>2],zd=xd<<2,Ad=0|Jc(ud,zd),Bd=Ld,Cd=Bd+216|0,Dd=0|f[Cd>>2],Ed=Dd+16|0,f[Ed>>2]=Ad,Fd=Ld,Gd=Fd+216|0,Hd=0|f[Gd>>2],Id=Hd+48|0,f[Id>>2]=0,i=kc,j=Ld,k=j+168|0,f[k>>2]=i,n=kc,o=0|au(n),p=o+1|0,q=Ld,r=q+172|0,s=0|f[r>>2],t=s+p|0,f[r>>2]=t,v=Ld,w=v+172|0,x=0|f[w>>2],y=65535&x,z=Ld,A=z+232|0,e[A>>1]=y,B=kc,C=0!=(0|B);a:do if(C)for(D=kc,Kd=D,Jd=0,E=g,G=Ld,H=G+232|0,I=0|e[H>>1],J=65535&I,K=J-1|0,L=K<<3,M=0|Jc(E,L),N=Ld,O=N+216|0,P=0|f[O>>2],R=P+24|0,f[R>>2]=M,Jd=0,S=kc,Kd=S;;){if(T=Kd,U=0!=(0|T),!U)break a;V=Kd,W=0|f[V>>2],Y=W,Z=Jd,$=Ld,_=$+216|0,ba=0|f[_>>2],ca=ba+24|0,da=0|f[ca>>2],ea=da+(Z<<3)|0,f[ea>>2]=Y,fa=Kd,ga=0|f[fa>>2],ha=ga,ia=0!=(0|ha),ia?(ja=Ld,ka=Kd,ma=0|f[ka>>2],na=ma,oa=0|bu(ja,na),pa=65535&oa,qa=Jd,ra=Ld,sa=ra+216|0,ta=0|f[sa>>2],ua=ta+24|0,va=0|f[ua>>2],xa=va+(qa<<3)|0,ya=xa+4|0,e[ya>>1]=pa):(za=Jd,Aa=Ld,Ba=Aa+216|0,Ca=0|f[Ba>>2],Da=Ca+24|0,Ea=0|f[Da>>2],Fa=Ea+(za<<3)|0,Ga=Fa+4|0,e[Ga>>1]=0),Ia=Jd,Ja=Ia+1|0,Jd=Ja,Ka=Kd,La=Ka+4|0,Ma=0|f[La>>2],Kd=Ma}while(0);return Na=g,Oa=0|Wc(Na),Pa=Ld,Qa=Pa+236|0,f[Qa>>2]=Oa,Ra=mb,Ta=Ra+196|0,Ua=0|f[Ta>>2],Va=Ld,Wa=Va+196|0,f[Wa>>2]=Ua,Xa=Ld,Ya=Xa+196|0,Za=0|f[Ya>>2],$a=0!=(0|Za),$a&&(_a=g,ab=Ld,cb=ab+212|0,db=0|f[cb>>2],eb=db<<1,fb=0|Jc(_a,eb),gb=Ld,hb=gb+208|0,f[hb>>2]=fb),ib=mb,jb=ib+200|0,kb=0|e[jb>>1],lb=Ld,ob=lb+200|0,e[ob>>1]=kb,pb=Ld,qb=pb+240|0,f[qb>>2]=0,rb=Ld,sb=rb+196|0,tb=0|f[sb>>2],ub=0!=(0|tb),ub?(vb=g,wb=Ld,xb=wb+216|0,zb=0|f[xb>>2],0|sr(vb,zb),Ab=Ld,Bb=Ab+196|0,Cb=0|f[Bb>>2],Db=Ld,Eb=Db+216|0,Fb=0|f[Eb>>2],Gb=Fb+28|0,f[Gb>>2]=Cb,Hb=Ld,Ib=Hb+208|0,Kb=0|f[Ib>>2],Lb=Ld,Mb=Lb+216|0,Nb=0|f[Mb>>2],Ob=Nb+32|0,f[Ob>>2]=Kb):(Pb=Ld,Qb=Pb+216|0,Rb=0|f[Qb>>2],Sb=Rb+36|0,f[Sb>>2]=0),Tb=mb,Vb=Tb+248|0,Wb=0|f[Vb>>2],Xb=Ld,Yb=Xb+248|0,f[Yb>>2]=Wb,Zb=mb,$b=Zb+244|0,_b=0|e[$b>>1],ac=Ld,bc=ac+244|0,e[bc>>1]=_b,cc=Ld,d=cc,ec=d,l=Od,0|ec}function Zt(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ia=0;return ia=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=c,C=r+216|0,N=0|f[C>>2],(Z=0==(0|N))?(da=d,ea=c,fa=ea+216|0,f[fa>>2]=da,void(l=ia)):(ga=c,e=ga+216|0,g=0|f[e>>2],h=g+52|0,i=0|f[h>>2],j=c,k=j+228|0,n=0|f[k>>2],o=(0|i)==(0|n),o&&(p=c,q=p+228|0,s=0|f[q>>2],t=s<<1,f[q>>2]=t,u=c,v=c,w=v+216|0,x=0|f[w>>2],y=x+20|0,z=0|f[y>>2],A=c,B=A+228|0,D=0|f[B>>2],E=D<<2,F=0|$t(u,z,E),G=c,H=G+216|0,I=0|f[H>>2],J=I+20|0,f[J>>2]=F),K=d,L=c,M=L+216|0,O=0|f[M>>2],P=O+52|0,Q=0|f[P>>2],R=c,S=R+216|0,T=0|f[S>>2],U=T+20|0,V=0|f[U>>2],W=V+(Q<<2)|0,f[W>>2]=K,Y=c,$=Y+216|0,_=0|f[$>>2],aa=_+52|0,ba=0|f[aa>>2],ca=ba+1|0,f[aa>>2]=ca,void(l=ia))}function $t(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;return w=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,e=b,k=c,n=d,o=0|f[n>>2],p=e,q=k,r=0|kc(o,p,q),e=r,s=e,t=0==(0|s),g=k,h=g>>>0>0,(u=t&h)?(i=d,_t(i,69267),j=e,l=w,0|j):(j=e,l=w,0|j)}function _t(a,b){a|=0,b|=0;var c=0,d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,W=0;if(W=l,l=l+32|0,(0|l)>=(0|m)&&X(),S=W+16|0,R=W,c=a,d=b,s=c,D=0!=(0|s),!D)return void(l=W);for(;;){if(K=c,L=K+164|0,M=0|f[L>>2],N=0!=(0|M),O=c,!N)break;P=O+164|0,g=0|f[P>>2],Q=g,h=c,i=h+4|0,j=0|f[i>>2],ft(j),k=Q,c=k}n=O+196|0,o=0|f[n>>2],p=0!=(0|o),p&&(q=c,r=q+200|0,t=0|e[r>>1],u=65535&t,v=0!=(0|u),v&&(w=0|f[637],x=c,y=x+196|0,z=0|f[y>>2],A=c,B=A+200|0,C=0|e[B>>1],E=65535&C,F=d,f[R>>2]=z,T=R+4|0,f[T>>2]=E,U=R+8|0,f[U>>2]=F,0|Vv(w,69279,R),I=c,J=I+8|0,Aa(0|J,1))),G=0|f[637],H=d,f[S>>2]=H,0|Vv(G,69304,S),I=c,J=I+8|0,Aa(0|J,1)}function au(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;for(o=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,k=0;;){if(c=b,d=0!=(0|c),e=k,!d)break;g=e+1|0,k=g,h=b,i=h+4|0,j=0|f[i>>2],b=j}return l=o,0|e}function bu(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;for(B=l,l=l+32|0,(0|l)>=(0|m)&&X(),d=a,q=b,r=d,s=r+168|0,t=0|f[s>>2],y=t,z=1;;){if(u=y,v=0!=(0|u),!v){A=6;break}if(w=y,x=0|f[w>>2],e=x,g=q,h=(0|e)==(0|g),i=z,h){A=4;break}j=i+1|0,z=j,k=y,n=k+4|0,o=0|f[n>>2],y=o}return 4==(0|A)?(c=i,p=c,l=B,0|p):6==(0|A)?(c=0,p=c,l=B,0|p):0}function cu(a,b,c){a|=0,b|=0,c|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0,wf=0,xf=0,yf=0,zf=0,Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0,Gf=0,Hf=0,If=0,Jf=0,Kf=0,Lf=0,Mf=0,Nf=0,Of=0,Pf=0,Qf=0,Rf=0,Sf=0,Tf=0,Uf=0,Vf=0,Wf=0,Xf=0,Yf=0,Zf=0,$f=0,_f=0,ag=0,bg=0,cg=0,dg=0,eg=0,fg=0,gg=0,hg=0,ig=0,jg=0,kg=0,mg=0,og=0,pg=0,rg=0,sg=0,tg=0,ug=0,vg=0,wg=0,xg=0,yg=0,zg=0,Ag=0,Bg=0,Cg=0,Dg=0,Eg=0,Fg=0,Gg=0,Hg=0,Ig=0,Jg=0,Kg=0,Lg=0,Mg=0,Ng=0,Og=0,Pg=0,Qg=0,Rg=0,Sg=0,Tg=0,Ug=0,Vg=0,Wg=0,Xg=0,Yg=0,Zg=0,$g=0,_g=0,ah=0,bh=0,ch=0,eh=0,fh=0,hh=0,ih=0,jh=0,kh=0,lh=0,mh=0,nh=0,oh=0,ph=0,qh=0,rh=0,sh=0,th=0,uh=0,vh=0,wh=0,xh=0,yh=0,zh=0,Ah=0,Bh=0,Ch=0,Dh=0,Eh=0,Fh=0,Gh=0,Hh=0,Ih=0,Jh=0,Kh=0,Lh=0,Mh=0,Nh=0,Oh=0,Ph=0,Qh=0,Rh=0,Sh=0,Th=0,Uh=0,Vh=0,Wh=0,Xh=0,Yh=0,Zh=0,$h=0,_h=0,ai=0,bi=0,ci=0,di=0,ei=0,fi=0,gi=0,hi=0,ii=0,ji=0,li=0,ni=0,oi=0,pi=0,qi=0,ri=0,ti=0,ui=0,vi=0,wi=0,xi=0,yi=0,zi=0,Ai=0,Bi=0,Ci=0,Di=0,Ei=0,Fi=0,Gi=0,Hi=0,Ii=0,Ji=0,Ki=0,Li=0,Mi=0,Ni=0,Oi=0,Pi=0,Qi=0,Ri=0,Si=0,Ti=0,Ui=0,Vi=0,Wi=0,Xi=0,Yi=0,Zi=0,$i=0,_i=0,aj=0,bj=0,cj=0,dj=0,ej=0,fj=0,gj=0,hj=0,ij=0,jj=0,kj=0,lj=0,mj=0,nj=0,oj=0,pj=0,qj=0,rj=0,sj=0,tj=0,uj=0,vj=0,wj=0,xj=0,yj=0,zj=0,Aj=0,Bj=0,Cj=0,Dj=0,Ej=0,Fj=0,Gj=0,Hj=0,Ij=0,Jj=0,Kj=0,Lj=0,Mj=0,Nj=0,Oj=0,Pj=0,Qj=0,Rj=0,Sj=0,Tj=0,Uj=0,Vj=0,Wj=0,Xj=0,Yj=0,Zj=0,$j=0,_j=0,ak=0,bk=0,ck=0,dk=0,ek=0,fk=0,gk=0,hk=0,ik=0,jk=0,kk=0,lk=0,mk=0,nk=0,ok=0,pk=0,qk=0,rk=0,sk=0,tk=0,uk=0,vk=0,wk=0,xk=0,yk=0,zk=0,Ak=0,Bk=0,Ck=0,Dk=0,Ek=0,Fk=0,Gk=0,Hk=0,Ik=0,Jk=0,Kk=0,Lk=0,Mk=0,Nk=0,Ok=0,Pk=0,Qk=0,Rk=0,Sk=0,Tk=0,Uk=0,Vk=0,Wk=0,Xk=0,Yk=0,Zk=0,$k=0,_k=0,al=0,bl=0,cl=0,dl=0,el=0,fl=0,gl=0,hl=0,il=0,jl=0,kl=0,ll=0,ml=0,nl=0,ol=0,pl=0,ql=0,rl=0,sl=0,tl=0,ul=0,vl=0,wl=0,xl=0,yl=0,zl=0,Al=0,Bl=0,Cl=0,Dl=0,El=0,Fl=0,Gl=0,Hl=0,Il=0,Jl=0,Kl=0,Ll=0,Ml=0,Nl=0,Ol=0,Pl=0,Ql=0,Rl=0,Sl=0,Tl=0,Ul=0,Vl=0,Wl=0,Xl=0,Yl=0,Zl=0,$l=0,_l=0,am=0,bm=0,cm=0,dm=0,em=0,fm=0,gm=0,hm=0,im=0,jm=0,km=0,lm=0,mm=0,nm=0,om=0,pm=0,qm=0,rm=0,sm=0,tm=0,um=0,vm=0,wm=0,xm=0,ym=0,zm=0,Am=0,Bm=0,Cm=0,Dm=0,Em=0,Fm=0,Gm=0,Hm=0,Im=0,Jm=0,Km=0,Lm=0,Mm=0,Nm=0,Om=0,Pm=0,Qm=0,Rm=0,Sm=0,Tm=0,Um=0,Vm=0,Wm=0,Xm=0,Ym=0,Zm=0,$m=0,_m=0,an=0,bn=0,cn=0,dn=0,en=0,fn=0,gn=0,hn=0,jn=0,kn=0,ln=0,mn=0,nn=0,on=0,pn=0,qn=0,rn=0,sn=0,tn=0,un=0,vn=0,wn=0,xn=0,yn=0,zn=0,An=0,Bn=0,Dn=0,En=0,Fn=0,Gn=0,Hn=0,In=0,Jn=0,Kn=0,Ln=0,Mn=0,Nn=0,On=0,Pn=0,Qn=0,Rn=0,Sn=0,Tn=0,Un=0,Vn=0,Wn=0,Xn=0,Yn=0,Zn=0,$n=0,_n=0,ao=0,bo=0,co=0,eo=0,fo=0,go=0,ho=0,io=0,jo=0,ko=0,lo=0,mo=0,no=0,oo=0,po=0,qo=0,ro=0,so=0,to=0,uo=0,vo=0,wo=0,xo=0,yo=0,zo=0,Ao=0,Bo=0,Co=0,Do=0,Eo=0,Fo=0,Go=0,Ho=0,Io=0,Jo=0,Ko=0,Lo=0,Mo=0,No=0,Oo=0,Po=0,Qo=0,Ro=0,So=0,To=0,Uo=0,Vo=0,Wo=0,Xo=0,Yo=0,Zo=0,$o=0,_o=0,ap=0,bp=0,cp=0,dp=0,ep=0,fp=0,gp=0,hp=0,ip=0,jp=0,kp=0,lp=0,mp=0,np=0,op=0,pp=0,qp=0,rp=0,sp=0,tp=0,up=0,vp=0,wp=0,xp=0,yp=0,zp=0,Ap=0,Bp=0,Cp=0,Dp=0,Ep=0,Fp=0,Gp=0,Hp=0,Ip=0,Jp=0,Kp=0,Lp=0,Mp=0,Np=0,Op=0,Pp=0,Qp=0,Rp=0,Sp=0,Tp=0,Up=0,Vp=0,Wp=0,Xp=0,Yp=0,Zp=0,$p=0,_p=0,aq=0,bq=0,cq=0,dq=0,eq=0,fq=0,gq=0,hq=0,iq=0,jq=0,kq=0,lq=0,mq=0,nq=0,oq=0,pq=0,qq=0,rq=0,sq=0,tq=0,uq=0,vq=0,wq=0,xq=0,yq=0,zq=0,Aq=0,Bq=0,Cq=0,Dq=0,Eq=0,Fq=0,Gq=0,Hq=0,Iq=0,Jq=0,Kq=0,Lq=0,Mq=0,Nq=0,Oq=0,Pq=0,Qq=0,Rq=0,Sq=0,Tq=0,Uq=0,Vq=0,Wq=0,Xq=0,Yq=0,Zq=0,$q=0,_q=0,ar=0,br=0,cr=0,dr=0,er=0,fr=0,gr=0,hr=0,ir=0,jr=0,kr=0,lr=0,mr=0,nr=0,or=0,pr=0,qr=0,rr=0,sr=0,ur=0,vr=0,wr=0,xr=0,yr=0,zr=0,Ar=0,Br=0,Cr=0,Dr=0,Er=0,Fr=0,Gr=0,Hr=0,Ir=0,Jr=0,Kr=0,Lr=0,Mr=0,Nr=0,Or=0,Pr=0,Qr=0,Rr=0,Sr=0,Tr=0,Ur=0,Vr=0,Wr=0,Xr=0,Yr=0,Zr=0,$r=0,_r=0,as=0,bs=0,cs=0,ds=0,es=0,fs=0,gs=0,hs=0,is=0,js=0,ks=0,ls=0,ms=0,ns=0,os=0,ps=0,qs=0,rs=0,ss=0,ts=0,us=0,vs=0,ws=0,xs=0,ys=0,zs=0,As=0,Bs=0,Cs=0,Ds=0,Es=0,Fs=0,Gs=0,Hs=0,Is=0,Js=0,Ks=0,Ls=0,Ms=0,Ns=0,Os=0,Ps=0,Qs=0,Rs=0,Ss=0,Ts=0,Us=0,Vs=0,Ws=0,Xs=0,Ys=0,Zs=0,$s=0,_s=0,at=0,bt=0,ct=0,dt=0,et=0,ft=0,gt=0,ht=0,it=0,jt=0,kt=0,lt=0,mt=0,nt=0,ot=0,pt=0,qt=0,rt=0,st=0,tt=0,ut=0,vt=0,wt=0,xt=0,yt=0,zt=0,At=0,Bt=0,Ct=0,Dt=0,Et=0,Ft=0,Gt=0,Ht=0,It=0,Jt=0,Kt=0,Lt=0,Mt=0,Nt=0,Ot=0,Pt=0,Qt=0,Rt=0,St=0,Tt=0,Ut=0,Vt=0,Wt=0,Xt=0,Yt=0,Zt=0,$t=0,_t=0,au=0,gu=0,iu=0,ou=0,pu=0,tu=0,yu=0,zu=0,Lu=0,Mu=0,Nu=0,Ou=0,Pu=0,Qu=0,Ru=0,Su=0,Tu=0,Uu=0,Vu=0,Wu=0,Xu=0,Yu=0,Zu=0,$u=0,_u=0,av=0,bv=0,cv=0,dv=0,ev=0,fv=0,gv=0,hv=0,iv=0,jv=0,kv=0,lv=0,mv=0,nv=0,ov=0,pv=0,qv=0,rv=0,sv=0,tv=0,uv=0,vv=0,wv=0,xv=0,yv=0,zv=0,Av=0,Bv=0,Cv=0,Dv=0,Ev=0,Fv=0,Gv=0,Hv=0,Iv=0,Jv=0,Kv=0,Lv=0,Mv=0,Nv=0,Ov=0,Pv=0,Qv=0,Rv=0,Sv=0,Tv=0,Uv=0,Vv=0,Wv=0,Xv=0,Yv=0,Zv=0,$v=0,_v=0,aw=0,bw=0,cw=0,dw=0,fw=0,gw=0,hw=0,iw=0,jw=0,kw=0,lw=0,mw=0,nw=0,ow=0,pw=0,qw=0,rw=0,sw=0,tw=0,uw=0,vw=0,ww=0,xw=0,yw=0,zw=0,Aw=0,Bw=0,Cw=0,Dw=0,Ew=0,Fw=0,Gw=0,Hw=0,Iw=0,Jw=0,Kw=0,Lw=0,Mw=0,Nw=0,Ow=0,Pw=0,Qw=0,Rw=0,Sw=0,Tw=0,Uw=0,Vw=0,Ww=0,Xw=0,Yw=0,Zw=0,$w=0,_w=0,ax=0,bx=0,cx=0,dx=0,ex=0,fx=0,gx=0,hx=0,ix=0,jx=0,kx=0,lx=0,mx=0,nx=0,ox=0,px=0,qx=0,rx=0,sx=0,tx=0,ux=0,vx=0,wx=0,xx=0,yx=0,zx=0,Ax=0,Bx=0,Cx=0,Dx=0,Ex=0,Fx=0,Gx=0,Hx=0,Ix=0,Jx=0,Kx=0,Lx=0,Mx=0,Nx=0,Ox=0,Px=0,Qx=0,Rx=0,Sx=0,Tx=0,Ux=0,Vx=0,Wx=0,Xx=0,Yx=0,Zx=0,$x=0,_x=0,ay=0,by=0,cy=0,dy=0,ey=0,fy=0,gy=0,hy=0,iy=0,jy=0,ky=0,ly=0,my=0,ny=0,oy=0,py=0,qy=0,ry=0,sy=0,ty=0,uy=0,vy=0,wy=0,xy=0,yy=0,zy=0,Ay=0,By=0,Cy=0,Dy=0,Ey=0,Fy=0,Gy=0,Hy=0,Iy=0,Jy=0,Ky=0,Ly=0,My=0,Ny=0,Oy=0,Py=0,Qy=0,Ry=0,Sy=0,Ty=0,Uy=0,Vy=0,Wy=0,Xy=0,Yy=0,Zy=0,$y=0,_y=0,az=0,bz=0,cz=0,dz=0,ez=0,fz=0,gz=0,hz=0,iz=0,jz=0,kz=0,lz=0,mz=0,nz=0,oz=0,pz=0,qz=0,rz=0,sz=0,tz=0,uz=0,vz=0,wz=0,xz=0,yz=0,zz=0,Az=0,Bz=0,Cz=0,Dz=0,Ez=0,Fz=0,Gz=0,Hz=0,Iz=0,Jz=0,Kz=0,Lz=0,Mz=0,Nz=0,Oz=0,Pz=0,Qz=0,Rz=0,Sz=0,Tz=0,Uz=0,Vz=0,Wz=0,Xz=0,Yz=0,Zz=0,$z=0,_z=0,aA=0,bA=0,cA=0,dA=0,eA=0,fA=0,gA=0,hA=0,iA=0,jA=0,kA=0,lA=0,mA=0,nA=0,oA=0,pA=0,qA=0,rA=0,sA=0,tA=0,uA=0,vA=0,wA=0,xA=0,yA=0,zA=0,AA=0,BA=0,CA=0,DA=0,EA=0,FA=0,GA=0,HA=0,IA=0,JA=0,KA=0,LA=0,MA=0,NA=0,OA=0,PA=0,QA=0,RA=0,SA=0,TA=0,UA=0,VA=0,WA=0,XA=0,YA=0,ZA=0,$A=0,_A=0,aB=0,bB=0,cB=0,dB=0,eB=0,fB=0,gB=0,hB=0,iB=0,jB=0,kB=0,lB=0,mB=0,nB=0,oB=0,pB=0,qB=0,rB=0,sB=0,tB=0,uB=0,vB=0,wB=0,xB=0,yB=0,zB=0,AB=0,BB=0,CB=0,DB=0,EB=0,FB=0,GB=0,HB=0,IB=0,JB=0,KB=0,LB=0,MB=0,NB=0,OB=0,PB=0,QB=0,RB=0,SB=0,TB=0,UB=0,VB=0,WB=0,XB=0,YB=0,ZB=0,$B=0,_B=0,aC=0,bC=0,cC=0,dC=0,eC=0,fC=0,gC=0,hC=0,iC=0,jC=0,kC=0,lC=0,mC=0,nC=0,oC=0,pC=0,qC=0,rC=0,sC=0,tC=0,uC=0,vC=0,wC=0,xC=0,yC=0,zC=0,AC=0,BC=0,CC=0,DC=0,EC=0,FC=0,GC=0,HC=0,IC=0,JC=0,KC=0,LC=0,MC=0,NC=0,OC=0,PC=0,QC=0,RC=0,SC=0,TC=0,UC=0,VC=0,WC=0,XC=0,YC=0,ZC=0,$C=0,_C=0,aD=0,bD=0,cD=0,dD=0,eD=0,fD=0,gD=0,hD=0,iD=0,jD=0,kD=0,lD=0,mD=0,nD=0,oD=0,pD=0,qD=0,rD=0,sD=0,tD=0,uD=0,vD=0,wD=0,xD=0,yD=0,zD=0,AD=0,BD=0,CD=0,DD=0,ED=0,FD=0,GD=0,HD=0,ID=0,JD=0,KD=0,LD=0,MD=0,ND=0,OD=0,PD=0,QD=0,RD=0,SD=0,TD=0,UD=0,VD=0,WD=0,XD=0,YD=0,ZD=0,$D=0,_D=0,aE=0,bE=0,cE=0,dE=0,eE=0,fE=0,gE=0,hE=0,iE=0,jE=0,kE=0,lE=0,mE=0,nE=0,oE=0,pE=0,qE=0,rE=0,sE=0,tE=0,uE=0,vE=0,wE=0,xE=0,yE=0,zE=0,AE=0,BE=0,CE=0,DE=0,EE=0,FE=0,GE=0,HE=0,IE=0,JE=0,KE=0,LE=0,ME=0,NE=0,OE=0,PE=0,QE=0,RE=0,SE=0,TE=0,UE=0,VE=0,WE=0,XE=0,YE=0,ZE=0,$E=0,_E=0,aF=0,bF=0,cF=0,dF=0,eF=0,fF=0,gF=0,hF=0,iF=0,jF=0,kF=0,lF=0,mF=0,nF=0,oF=0,pF=0,qF=0,rF=0,sF=0,tF=0,uF=0,vF=0,wF=0,xF=0,yF=0,zF=0,AF=0,BF=0,CF=0,DF=0,EF=0,FF=0,GF=0,HF=0,IF=0,JF=0,KF=0,LF=0,MF=0,NF=0,OF=0,PF=0,QF=0,RF=0,SF=0,TF=0,UF=0,VF=0,WF=0,XF=0,YF=0,ZF=0,$F=0,_F=0,aG=0,bG=0,cG=0,dG=0,eG=0,fG=0,gG=0,hG=0,iG=0,jG=0,kG=0,lG=0,mG=0,nG=0,oG=0,pG=0,qG=0,rG=0,sG=0,tG=0,uG=0,vG=0,wG=0,xG=0,yG=0,zG=0,AG=0,BG=0,CG=0,DG=0,EG=0,FG=0,GG=0,HG=0,IG=0,JG=0,KG=0,LG=0,MG=0,NG=0,OG=0,PG=0,QG=0,RG=0,SG=0,TG=0,UG=0,VG=0,WG=0,XG=0,YG=0,ZG=0,$G=0,_G=0,aH=0,bH=0,cH=0,dH=0,eH=0,fH=0,gH=0,hH=0,iH=0,jH=0,kH=0,lH=0,mH=0,nH=0,oH=0,pH=0,qH=0,rH=0,sH=0,tH=0,uH=0,vH=0,wH=0,xH=0,yH=0,zH=0,AH=0,BH=0,CH=0,DH=0,EH=0,FH=0,GH=0,HH=0,IH=0,JH=0,KH=0,LH=0,MH=0,NH=0,OH=0,PH=0,QH=0,RH=0,SH=0,TH=0,UH=0,VH=0,WH=0,XH=0,YH=0,ZH=0,$H=0,_H=0,aI=0,bI=0,cI=0,dI=0,eI=0,fI=0,gI=0,hI=0,iI=0,jI=0,kI=0,lI=0,mI=0,nI=0,oI=0,pI=0,qI=0,rI=0,sI=0,tI=0,uI=0,vI=0,wI=0,xI=0,yI=0,zI=0,AI=0,BI=0,CI=0,DI=0,EI=0,FI=0,GI=0,HI=0,II=0,JI=0,KI=0,LI=0,MI=0,NI=0,OI=0,PI=0,QI=0,RI=0,SI=0,TI=0,UI=0,VI=0,WI=0,XI=0,YI=0,ZI=0,$I=0,_I=0,aJ=0,bJ=0,cJ=0,dJ=0,eJ=0,fJ=0,gJ=0,hJ=0,iJ=0,jJ=0,kJ=0,lJ=0,mJ=0,nJ=0,oJ=0,pJ=0,qJ=0,rJ=0,sJ=0,tJ=0,uJ=0,vJ=0,wJ=0,xJ=0,yJ=0,zJ=0,AJ=0,BJ=0,CJ=0,DJ=0,EJ=0,FJ=0,GJ=0,HJ=0,IJ=0,JJ=0,KJ=0,LJ=0,MJ=0,NJ=0,OJ=0,PJ=0,QJ=0,RJ=0,SJ=0,TJ=0,UJ=0,VJ=0,WJ=0,XJ=0,YJ=0,ZJ=0,$J=0,_J=0,aK=0,bK=0,cK=0,dK=0,eK=0,fK=0,gK=0,hK=0,iK=0,jK=0,kK=0,lK=0,mK=0,nK=0,oK=0,pK=0,qK=0,rK=0,sK=0,tK=0,uK=0,vK=0,wK=0,xK=0,yK=0,zK=0,AK=0,BK=0,CK=0,DK=0,EK=0,FK=0,GK=0,HK=0,IK=0,JK=0,KK=0,LK=0,MK=0,NK=0,OK=0,PK=0,QK=0,RK=0,SK=0,TK=0,UK=0,VK=0,WK=0,XK=0,YK=0,ZK=0,$K=0,_K=0,aL=0,bL=0,cL=0,dL=0,eL=0,fL=0,gL=0,hL=0,iL=0,jL=0,kL=0,lL=0,mL=0,nL=0,oL=0,pL=0,qL=0,rL=0,sL=0,tL=0,uL=0,vL=0,wL=0,xL=0,yL=0,zL=0,AL=0,BL=0,CL=0,DL=0,EL=0,FL=0,GL=0,HL=0,IL=0,JL=0,KL=0,LL=0,ML=0,NL=0,OL=0,PL=0,QL=0,RL=0,SL=0,TL=0,UL=0,VL=0,WL=0,XL=0,YL=0,ZL=0,$L=0,_L=0,aM=0,bM=0,cM=0,dM=0,eM=0,fM=0,gM=0,hM=0,iM=0,jM=0,kM=0,lM=0,mM=0,nM=0,oM=0,pM=0,qM=0,rM=0,sM=0,tM=0,uM=0,vM=0,wM=0,xM=0,yM=0,zM=0,AM=0,BM=0,CM=0,DM=0,EM=0,FM=0,GM=0,HM=0,IM=0,JM=0,KM=0,LM=0,MM=0,NM=0,OM=0,PM=0,QM=0,RM=0,SM=0,TM=0,UM=0,VM=0,WM=0,XM=0,YM=0,ZM=0,$M=0,_M=0,aN=0,bN=0,cN=0,dN=0,eN=0,fN=0,gN=0,hN=0,iN=0,jN=0,kN=0,lN=0,mN=0,nN=0,oN=0,pN=0,qN=0,rN=0,sN=0,tN=0,uN=0,vN=0,wN=0,xN=0,yN=0,zN=0,AN=0,BN=0,CN=0,DN=0,EN=0,FN=0,GN=0,HN=0,IN=0,JN=0,KN=0,LN=0,MN=0,NN=0,ON=0,PN=0,QN=0,RN=0,SN=0,TN=0,UN=0,VN=0,WN=0,XN=0,YN=0,ZN=0,$N=0,_N=0,aO=0,bO=0,cO=0,dO=0,eO=0,fO=0,gO=0,hO=0,iO=0,jO=0,kO=0,lO=0,mO=0,nO=0,oO=0,pO=0,qO=0,rO=0,sO=0,tO=0,uO=0,vO=0,wO=0,xO=0,yO=0,zO=0,AO=0,BO=0,CO=0,DO=0,EO=0,FO=0,GO=0,HO=0,IO=0,JO=0,KO=0,LO=0,MO=0,NO=0,OO=0,PO=0,QO=0,RO=0,SO=0,TO=0,UO=0,VO=0,WO=0,XO=0,YO=0,ZO=0,$O=0,_O=0,aP=0,bP=0,cP=0,dP=0,eP=0,fP=0,gP=0,hP=0,iP=0,jP=0,kP=0,lP=0,mP=0,nP=0,oP=0,pP=0,qP=0,rP=0,sP=0,tP=0,uP=0,vP=0,wP=0,xP=0,yP=0,zP=0,AP=0,BP=0,CP=0,DP=0,EP=0,FP=0,GP=0,HP=0,IP=0,JP=0,KP=0,LP=0,MP=0,NP=0,OP=0,PP=0,QP=0,RP=0,SP=0,TP=0,UP=0,VP=0,WP=0,XP=0,YP=0,ZP=0,$P=0,_P=0,aQ=0,bQ=0,cQ=0,dQ=0,eQ=0,fQ=0,gQ=0,hQ=0,iQ=0,jQ=0,kQ=0,lQ=0,mQ=0,nQ=0,oQ=0,pQ=0,qQ=0,rQ=0,sQ=0,tQ=0,uQ=0,vQ=0,wQ=0,xQ=0,yQ=0,zQ=0,AQ=0,BQ=0,CQ=0,DQ=0,EQ=0,FQ=0,GQ=0,HQ=0,IQ=0,JQ=0,KQ=0,LQ=0,MQ=0,NQ=0,OQ=0,PQ=0,QQ=0,RQ=0,SQ=0,TQ=0,UQ=0,VQ=0,WQ=0,XQ=0,YQ=0,ZQ=0,$Q=0,_Q=0,aR=0,bR=0,cR=0,dR=0,eR=0,fR=0,gR=0,hR=0,iR=0,jR=0,kR=0,lR=0,mR=0,nR=0,oR=0,pR=0,qR=0,rR=0,sR=0,tR=0,uR=0,vR=0,wR=0,xR=0,yR=0,zR=0,AR=0,BR=0,CR=0,DR=0,ER=0,FR=0,GR=0,HR=0,IR=0,JR=0,KR=0,LR=0,MR=0,NR=0,OR=0,PR=0,QR=0,RR=0,SR=0,TR=0,UR=0,VR=0,WR=0,XR=0,YR=0,ZR=0,$R=0,_R=0,aS=0,bS=0,cS=0,dS=0,eS=0,fS=0,gS=0,hS=0,iS=0,jS=0,kS=0,lS=0,mS=0,nS=0,oS=0,pS=0,qS=0,rS=0,sS=0,tS=0,uS=0,vS=0,wS=0,xS=0,yS=0,zS=0,AS=0,BS=0,CS=0,DS=0,ES=0,FS=0,GS=0,HS=0,IS=0,JS=0,KS=0,LS=0,MS=0,NS=0,OS=0,PS=0,QS=0,RS=0,SS=0,TS=0,US=0,VS=0,WS=0,XS=0,YS=0,ZS=0,$S=0,_S=0,aT=0,bT=0,cT=0,dT=0,eT=0,fT=0,gT=0,hT=0,iT=0,jT=0,kT=0,lT=0,mT=0,nT=0,oT=0,pT=0,qT=0,rT=0,sT=0,tT=0,uT=0,vT=0,wT=0,xT=0,yT=0,zT=0,AT=0,BT=0,CT=0,DT=0,ET=0,FT=0,GT=0,HT=0,IT=0,JT=0,KT=0,LT=0,MT=0,NT=0,OT=0,PT=0,QT=0,RT=0,ST=0,TT=0,UT=0,VT=0,WT=0,XT=0,YT=0,ZT=0,$T=0,_T=0,aU=0,bU=0,cU=0,dU=0,eU=0,fU=0,gU=0,hU=0,iU=0,jU=0,kU=0,lU=0,mU=0,nU=0,oU=0,pU=0,qU=0,rU=0,sU=0,tU=0,uU=0,vU=0,wU=0,xU=0,yU=0,zU=0,AU=0,BU=0,CU=0,DU=0,EU=0,FU=0,GU=0,HU=0,IU=0,JU=0,KU=0,LU=0,MU=0,NU=0,OU=0,PU=0,QU=0,RU=0,SU=0,TU=0,UU=0,VU=0,WU=0,XU=0,YU=0,ZU=0,$U=0,_U=0,aV=0,bV=0,cV=0,dV=0,eV=0,fV=0,gV=0,hV=0,iV=0,jV=0,kV=0,lV=0,mV=0,nV=0,oV=0,pV=0,qV=0,rV=0,sV=0,tV=0,uV=0,vV=0,wV=0,xV=0,yV=0,zV=0,AV=0,BV=0,CV=0,DV=0,EV=0,FV=0,GV=0,HV=0,IV=0,JV=0,KV=0,LV=0,MV=0,NV=0,OV=0,PV=0,QV=0,RV=0,SV=0,TV=0,UV=0,VV=0,WV=0,XV=0,YV=0,ZV=0,$V=0,_V=0,aW=0,bW=0,cW=0,dW=0,eW=0,fW=0,gW=0,hW=0,iW=0,jW=0,kW=0,lW=0,mW=0,nW=0,oW=0,pW=0,qW=0,rW=0,sW=0,tW=0,uW=0,vW=0,wW=0,xW=0,yW=0,zW=0,AW=0,BW=0,CW=0,DW=0,EW=0,FW=0,GW=0,HW=0,IW=0,JW=0,KW=0,LW=0,MW=0,NW=0,OW=0,PW=0,QW=0,RW=0,SW=0,TW=0,UW=0,VW=0,WW=0,XW=0,YW=0,ZW=0,$W=0,_W=0,aX=0,bX=0,cX=0,dX=0,eX=0,fX=0,gX=0,hX=0,iX=0,jX=0,kX=0,lX=0,mX=0,nX=0,oX=0,pX=0,qX=0,rX=0,sX=0,tX=0,uX=0,vX=0,wX=0,xX=0,yX=0,zX=0,AX=0,BX=0,CX=0,DX=0,EX=0,FX=0,GX=0,HX=0,IX=0,JX=0,KX=0,LX=0,MX=0,NX=0,OX=0,PX=0,QX=0,RX=0,SX=0,TX=0,UX=0,VX=0,WX=0,XX=0,YX=0,ZX=0,$X=0,_X=0,aY=0,bY=0,cY=0,dY=0,eY=0,fY=0,gY=0,hY=0,iY=0,jY=0,kY=0,lY=0,mY=0,nY=0,oY=0,pY=0,qY=0,rY=0,sY=0,tY=0,uY=0,vY=0,wY=0,xY=0,yY=0,zY=0,AY=0,BY=0,CY=0,DY=0,EY=0,FY=0,GY=0,HY=0,IY=0,JY=0,KY=0,LY=0,MY=0,NY=0,OY=0,PY=0,QY=0,RY=0,SY=0,TY=0,UY=0,VY=0,WY=0,XY=0,YY=0,ZY=0,$Y=0,_Y=0,aZ=0,bZ=0,cZ=0,dZ=0,eZ=0,fZ=0,gZ=0,hZ=0,iZ=0,jZ=0,kZ=0,lZ=0,mZ=0,nZ=0,oZ=0,pZ=0,qZ=0,rZ=0,sZ=0,tZ=0,uZ=0,vZ=0,wZ=0,xZ=0,yZ=0,zZ=0,AZ=0,BZ=0,CZ=0,DZ=0,EZ=0,FZ=0,GZ=0,HZ=0,IZ=0,JZ=0,KZ=0,LZ=0,MZ=0,NZ=0,OZ=0,PZ=0,QZ=0,RZ=0,SZ=0,TZ=0,UZ=0,VZ=0,WZ=0,XZ=0,YZ=0,ZZ=0,$Z=0,_Z=0,a$=0,b$=0,c$=0,d$=0,e$=0,f$=0,g$=0,h$=0,i$=0,j$=0,k$=0,l$=0,m$=0,n$=0,o$=0,p$=0,q$=0,r$=0,s$=0,t$=0,u$=0,v$=0,w$=0,x$=0,y$=0,z$=0,A$=0,B$=0,C$=0,D$=0,E$=0,F$=0,G$=0,H$=0,I$=0,J$=0,K$=0,L$=0,M$=0,N$=0,O$=0,P$=0,Q$=0,R$=0,S$=0,T$=0,U$=0,V$=0,W$=0,X$=0,Y$=0,Z$=0,$$=0,_$=0,a_=0,b_=0,c_=0,d_=0,e_=0,f_=0,g_=0,h_=0,i_=0,j_=0,k_=0,l_=0,m_=0,n_=0,o_=0,p_=0,q_=0,r_=0,s_=0,t_=0,u_=0,v_=0,w_=0,x_=0,y_=0,z_=0,A_=0,B_=0,C_=0,D_=0,E_=0,F_=0,G_=0,H_=0,I_=0,J_=0,K_=0,L_=0,M_=0,N_=0,O_=0,P_=0,Q_=0,R_=0,S_=0,T_=0,U_=0,V_=0,W_=0,X_=0,Y_=0,Z_=0,$_=0,__=0,a0=0,b0=0,c0=0,d0=0,e0=0,f0=0,g0=0,h0=0,i0=0,j0=0,k0=0,l0=0,m0=0,n0=0,o0=0,p0=0,q0=0,r0=0,s0=0,t0=0,u0=0,v0=0,w0=0,x0=0,y0=0,z0=0,A0=0,B0=0,C0=0,D0=0,E0=0,F0=0,G0=0,H0=0,I0=0,J0=0,K0=0,L0=0,M0=0,N0=0,O0=0,P0=0,Q0=0,R0=0,S0=0,T0=0,U0=0,V0=0,W0=0,X0=0,Y0=0,Z0=0,$0=0,_0=0,a1=0,b1=0,c1=0,d1=0,e1=0,f1=0,g1=0,h1=0,i1=0,j1=0,k1=0,l1=0,m1=0,n1=0,o1=0,p1=0,q1=0,r1=0,s1=0,t1=0,u1=0,v1=0,w1=0,x1=0,y1=0,z1=0,A1=0,B1=0,C1=0,D1=0,E1=0,F1=0,G1=0,H1=0,I1=0,J1=0,K1=0,L1=0,M1=0,N1=0,O1=0,P1=0,Q1=0,R1=0,S1=0,T1=0,U1=0,V1=0,W1=0,X1=0,Y1=0,Z1=0,$1=0,_1=0,a2=0,b2=0,c2=0,d2=0,e2=0,f2=0,g2=0,h2=0,i2=0,j2=0,k2=0,l2=0,m2=0,n2=0,o2=0,p2=0,q2=0,r2=0,s2=0,t2=0,u2=0,v2=0,w2=0,x2=0,y2=0,z2=0,A2=0,B2=0,C2=0,D2=0,E2=0,F2=0,G2=0,H2=0,I2=0,J2=0,K2=0,L2=0,M2=0,N2=0,O2=0,P2=0,Q2=0,R2=0,S2=0,T2=0,U2=0,V2=0,W2=0,X2=0,Y2=0,Z2=0,$2=0,_2=0,a3=0,b3=0,c3=0,d3=0,e3=0,f3=0,g3=0,h3=0,i3=0,j3=0,k3=0,l3=0,m3=0,n3=0,o3=0,p3=0,q3=0,r3=0,s3=0,t3=0,u3=0,v3=0,w3=0,x3=0,y3=0,z3=0,A3=0,B3=0,C3=0,D3=0,E3=0,F3=0,G3=0,H3=0,I3=0,J3=0,K3=0,L3=0,M3=0,N3=0,O3=0,P3=0,Q3=0,R3=0,S3=0,T3=0,U3=0,V3=0,W3=0,X3=0,Y3=0,Z3=0,$3=0,_3=0,a4=0,b4=0,c4=0,d4=0,e4=0,f4=0,g4=0,h4=0,i4=0,j4=0,k4=0,l4=0,m4=0,n4=0,o4=0,p4=0,q4=0,r4=0,s4=0,t4=0,u4=0,v4=0,w4=0,x4=0,y4=0,z4=0,A4=0,B4=0,C4=0,D4=0,E4=0,F4=0,G4=0,H4=0,I4=0,J4=0,K4=0,L4=0,M4=0,N4=0,O4=0,P4=0,Q4=0,R4=0,S4=0,T4=0,U4=0,V4=0,W4=0,X4=0,Y4=0,Z4=0,$4=0,_4=0,a5=0,b5=0,c5=0,d5=0,e5=0,f5=0,g5=0,h5=0,i5=0,j5=0,k5=0,l5=0,m5=0,n5=0,o5=0,p5=0,q5=0,r5=0,s5=0,t5=0,u5=0,v5=0,w5=0,x5=0,y5=0,z5=0,A5=0,B5=0,C5=0,D5=0,E5=0,F5=0,G5=0,H5=0,I5=0,J5=0,K5=0,L5=0,M5=0,N5=0,O5=0,P5=0,Q5=0,R5=0,S5=0,T5=0,U5=0,V5=0,W5=0,X5=0,Y5=0,Z5=0,$5=0,_5=0,a6=0,b6=0,c6=0,d6=0,e6=0,f6=0,g6=0,h6=0,i6=0,j6=0,k6=0,l6=0,m6=0,n6=0,o6=0,p6=0,q6=0,r6=0,s6=0,t6=0,u6=0,v6=0,w6=0,x6=0,y6=0,z6=0,A6=0,B6=0,C6=0,D6=0,E6=0,F6=0,G6=0,H6=0,I6=0,J6=0,K6=0,L6=0,M6=0,N6=0,O6=0,P6=0,Q6=0,R6=0,S6=0,T6=0,U6=0,V6=0,W6=0,X6=0,Y6=0,Z6=0,$6=0,_6=0,a7=0,b7=0,c7=0,d7=0,e7=0,f7=0,g7=0,h7=0,i7=0,j7=0,k7=0,l7=0,m7=0,n7=0,o7=0,p7=0,q7=0,r7=0,s7=0,t7=0,u7=0,v7=0,w7=0,x7=0,y7=0,z7=0,A7=0,B7=0,C7=0,D7=0,E7=0,F7=0,G7=0,H7=0,I7=0,J7=0,K7=0,L7=0,M7=0,N7=0,O7=0,P7=0,Q7=0,R7=0,S7=0,T7=0,U7=0,V7=0,W7=0,X7=0,Y7=0,Z7=0,$7=0,_7=0,a8=0,b8=0,c8=0,d8=0,e8=0,f8=0,g8=0,h8=0,i8=0,j8=0,k8=0,l8=0,m8=0,n8=0,o8=0,p8=0,q8=0,r8=0,s8=0,t8=0,u8=0,v8=0,w8=0,x8=0,y8=0,z8=0,A8=0,B8=0,C8=0,D8=0,E8=0,F8=0,G8=0,H8=0,I8=0,J8=0,K8=0,L8=0,M8=0,N8=0,O8=0,P8=0,Q8=0,R8=0,S8=0,T8=0,U8=0,V8=0,W8=0,X8=0,Y8=0,Z8=0,$8=0,_8=0,a9=0,b9=0,c9=0,d9=0,e9=0,f9=0,g9=0,h9=0,i9=0,j9=0,k9=0,l9=0,m9=0,n9=0,o9=0,p9=0,q9=0,r9=0,s9=0,t9=0,u9=0,v9=0,w9=0,x9=0,y9=0,z9=0,A9=0,B9=0,C9=0,D9=0,E9=0,F9=0,G9=0,H9=0,I9=0,J9=0,K9=0,L9=0,M9=0,N9=0,O9=0,P9=0,Q9=0,R9=0,S9=0,T9=0,U9=0,V9=0,W9=0,X9=0,Y9=0,Z9=0,$9=0,_9=0,aaa=0,baa=0,caa=0,daa=0,eaa=0,faa=0,gaa=0,haa=0,iaa=0,jaa=0,kaa=0,laa=0,maa=0,naa=0,oaa=0,paa=0,qaa=0,raa=0,saa=0,taa=0,uaa=0,vaa=0,waa=0,xaa=0,yaa=0,zaa=0,Aaa=0,Baa=0,Caa=0,Daa=0,Eaa=0,Faa=0,Gaa=0,Haa=0,Iaa=0,Jaa=0,Kaa=0,Laa=0,Maa=0,Naa=0,Oaa=0,Paa=0,Qaa=0,Raa=0,Saa=0,Taa=0,Uaa=0,Vaa=0,Waa=0,Xaa=0,Yaa=0,Zaa=0,$aa=0,_aa=0,aba=0,bba=0,cba=0,dba=0,eba=0,fba=0,gba=0,hba=0,iba=0,jba=0,kba=0,lba=0,mba=0,nba=0,oba=0,pba=0,qba=0,rba=0,sba=0,tba=0,uba=0,vba=0,wba=0,xba=0,yba=0,zba=0,Aba=0,Bba=0,Cba=0,Dba=0,Eba=0,Fba=0,Gba=0,Hba=0,Iba=0,Jba=0,Kba=0,Lba=0,Mba=0,Nba=0,Oba=0,Pba=0,Qba=0,Rba=0,Sba=0,Tba=0,Uba=0,Vba=0,Wba=0,Xba=0,Yba=0,Zba=0,$ba=0,_ba=0,aca=0,bca=0,cca=0,dca=0,eca=0,fca=0,gca=0,hca=0,ica=0,jca=0,kca=0,lca=0,mca=0,nca=0,oca=0,pca=0,qca=0,rca=0,sca=0,tca=0,uca=0,vca=0,wca=0,xca=0,yca=0,zca=0,Aca=0,Bca=0,Cca=0,Dca=0,Eca=0,Fca=0,Gca=0,Hca=0,Ica=0,Jca=0,Kca=0,Lca=0,Mca=0,Nca=0,Oca=0,Pca=0,Qca=0,Rca=0,Sca=0,Tca=0,Uca=0,Vca=0,Wca=0,Xca=0,Yca=0,Zca=0,$ca=0,_ca=0,ada=0,bda=0,cda=0,dda=0,eda=0,fda=0,gda=0,hda=0,ida=0,jda=0,kda=0,lda=0,mda=0,nda=0,oda=0,pda=0,qda=0,rda=0,sda=0,tda=0,uda=0,vda=0,wda=0,xda=0,yda=0,zda=0,Ada=0,Bda=0,Cda=0,Dda=0,Eda=0,Fda=0,Gda=0,Hda=0,Ida=0,Jda=0,Kda=0,Lda=0,Mda=0,Nda=0,Oda=0,Pda=0,Qda=0,Rda=0,Sda=0,Tda=0,Uda=0,Vda=0,Wda=0,Xda=0,Yda=0,Zda=0,$da=0,_da=0,aea=0,bea=0,cea=0,dea=0,eea=0,fea=0,gea=0,hea=0,iea=0,jea=0,kea=0,lea=0,mea=0,nea=0;
+if(nea=l,l=l+944|0,(0|l)>=(0|m)&&X(),v=nea+920|0,u=nea+912|0,t=nea+904|0,s=nea+896|0,r=nea+888|0,q=nea+880|0,p=nea+872|0,o=nea+864|0,n=nea+856|0,k=nea+848|0,j=nea+840|0,i=nea+832|0,h=nea+824|0,Oda=nea+816|0,g=nea+808|0,Nda=nea+800|0,Vba=nea+792|0,Mda=nea+784|0,Kda=nea+776|0,jca=nea+588|0,Iba=nea+930|0,Jda=nea+480|0,yP=nea+464|0,Uba=nea+448|0,Lda=nea+440|0,c_=nea+432|0,f1=nea+424|0,i3=nea+416|0,cda=nea+929|0,l5=nea+384|0,o7=nea+368|0,r9=nea+344|0,y=nea+320|0,dda=nea+928|0,Cb=nea+288|0,Hd=nea+272|0,Mf=nea+240|0,Uh=nea+192|0,$j=nea+160|0,bm=nea+144|0,ho=nea+136|0,kq=nea+104|0,os=nea+88|0,w=a,x=b,Uu=c,Vu=x,Zw=0!=(0|Vu),!Zw)return void(l=nea);az=w,dB=az+216|0,gD=0|f[dB>>2],jF=0!=(0|gD),jF&&(mH=w,pJ=mH+244|0,sL=0|e[pJ>>1],vN=65535&sL,zP=x,CR=zP+10|0,FT=0|e[CR>>1],IV=65535&FT,LX=(0|vN)!=(0|IV),LX&&(OZ=w,m$=OZ+248|0,x$=0|f[m$>>2],I$=w,T$=I$+244|0,d_=0|e[T$>>1],o_=0|Cn(x$,d_),z_=w,K_=z_+216|0,V_=0|f[K_>>2],e0=V_+28|0,f[e0>>2]=o_,p0=w,A0=0|f[p0>>2],L0=w,W0=L0+216|0,g1=0|f[W0>>2],r1=w,C1=r1+240|0,N1=0|f[C1>>2],Y1=w,h2=Y1+176|0,s2=0|f[h2>>2],0|tr(A0,g1,N1,s2),D2=w,O2=D2+176|0,Z2=0|f[O2>>2],j3=w,u3=j3+240|0,f[u3>>2]=Z2,F3=x,Q3=F3+10|0,_3=0|e[Q3>>1],k4=w,v4=k4+244|0,e[v4>>1]=_3,G4=w,R4=G4+248|0,a5=0|f[R4>>2],m5=x,x5=m5+10|0,I5=0|e[x5>>1],T5=0|Cn(a5,I5),c6=w,n6=c6+196|0,f[n6>>2]=T5)),y6=x,J6=0|f[y6>>2],U6=J6,Mca=U6,d7=x,p7=d7+8|0,A7=0|e[p7>>1],L7=w,W7=L7+200|0,e[W7>>1]=A7,f8=x,q8=f8+4|0,B8=0|f[q8>>2],x=B8,M8=Mca;do switch(0|M8){case 17:for(X8=Uu,g9=0==(0|X8),s9=x,D9=0!=(0|s9),Zca=g9|D9,Zca||(O9=w,Z9=w,iaa=Z9+172|0,taa=0|f[iaa>>2],Eaa=511&taa,Paa=Eaa<<23,$aa=5|Paa,0|du(O9,$aa),jba=w,eu(jba));;){if(z=x,K=0!=(0|z),!K)break;V=w,fa=x,qa=0|f[fa>>2],Ba=x,Ma=Ba+4|0,Xa=0|f[Ma>>2],gb=0!=(0|Xa),rb=Uu,Db=gb?0:rb,cu(V,qa,Db),Ob=x,Zb=Ob+4|0,ic=0|f[Zb>>2],x=ic}return void(l=nea);case 18:if(tc=w,Ec=0|du(tc,26),Yca=Ec,Pc=w,ad=0|fu(Pc,3),mca=ad,ld=Yca,wd=mca,Id=wd+4|0,f[Id>>2]=ld,Td=x,ce=0|f[Td>>2],ne=0!=(0|ce),ne&&(ze=w,Ke=x,Ve=0|f[Ke>>2],ef=Uu,cu(ze,Ve,ef),qf=Uu,Bf=0!=(0|qf),Bf&&(Nf=w,Yf=Nf+172|0,hg=0|f[Yf>>2],vg=hg+-1|0,f[Yf>>2]=vg)),Gg=mca,f[Gg>>2]=4,Rg=w,ah=0|du(Rg,23),Kca=ah,nh=w,yh=Yca,hu(nh,yh),Jh=x,Vh=Jh+4|0,ei=0|f[Vh>>2],x=ei,Pba=0,rda=0,ri=x,Di=0|f[ri>>2],Oi=0!=(0|Di)){for(Zi=x,ij=0|f[Zi>>2],yca=ij,tj=w,Ej=tj+172|0,Pj=0|f[Ej>>2],Oba=Pj,_j=w,kk=Oba,vk=511&kk,Gk=vk<<23,Rk=27|Gk,0|du(_j,Rk),al=w,eu(al);;){if(ll=yca,wl=0!=(0|ll),!wl)break;for(Hl=yca,Sl=0|f[Hl>>2],Cca=Sl,cm=Cca,nm=0|f[cm>>2],Dca=nm,ym=rda,Jm=0!=(0|ym),Jm&&(Um=w,dn=rda,hu(Um,dn)),wda=0;;)if(pn=Dca,An=0!=(0|pn),Mn=w,An?(Xn=Dca,io=0|f[Xn>>2],cu(Mn,io,1)):(to=w,Eo=to+172|0,Po=0|f[Eo>>2],$o=511&Po,jp=$o<<23,up=17|jp,Fp=w,Qp=w,_p=0|f[Qp>>2],lq=0|ki(_p,69398,13),wq=0|ju(Fp,lq),Hq=65535&wq,Sq=Hq<<7,br=up|Sq,0|du(Mn,br),mr=w,eu(mr)),yr=w,Jr=w,Ur=Jr+172|0,ds=0|f[Ur>>2],ps=511&ds,As=ps<<23,Ls=1|As,Ws=Oba,ft=511&Ws,qt=ft<<14,Bt=Ls|qt,0|du(yr,Bt),Mt=w,Xt=Mt+172|0,yu=0|f[Xt>>2],Wu=yu+-1|0,f[Xt>>2]=Wu,fv=Dca,qv=0!=(0|fv),qv?(Bv=Dca,Mv=0|f[Bv>>2],Xv=0!=(0|Mv),Xv?(hw=Dca,sw=0|f[hw>>2],Dw=0|f[sw>>2],Ow=Dw,$w=66==(0|Ow),$w?(jx=w,ux=w,Fx=ux+172|0,Qx=0|f[Fx>>2],_x=511&Qx,ky=_x<<23,vy=32|ky,Gy=w,Ry=w,bz=0|f[Ry>>2],mz=0|ki(bz,69439,10),xz=0|ju(Gy,mz),Iz=511&xz,Tz=Iz<<14,cA=vy|Tz,nA=128|cA,0|du(jx,nA)):mea=26):mea=26):mea=26,26==(0|mea)&&(mea=0,yA=w,JA=w,UA=JA+172|0,eB=0|f[UA>>2],pB=511&eB,AB=pB<<23,LB=32|AB,WB=w,fC=w,qC=0|f[fC>>2],BC=0|ki(qC,69450,3),MC=0|ju(WB,BC),XC=511&MC,hD=XC<<14,sD=LB|hD,DD=128|sD,0|du(yA,DD)),OD=w,ZD=w,iE=ZD+172|0,tE=0|f[iE>>2],EE=511&tE,PE=EE<<23,$E=24|PE,kF=wda,vF=kF+32767|0,GF=65535&vF,RF=GF<<7,aG=$E|RF,lG=0|du(OD,aG),hea=lG,wG=hea,wda=wG,HG=Dca,SG=0!=(0|HG),SG&&(bH=Dca,nH=bH+4|0,yH=0|f[nH>>2],Dca=yH),JH=Dca,UH=0!=(0|JH),!UH)break;dI=w,oI=0|du(dI,4194199),rda=oI,zI=w,KI=wda,ku(zI,KI),VI=w,eJ=VI+172|0,qJ=0|f[eJ>>2],BJ=qJ+-1|0,f[eJ>>2]=BJ,MJ=Cca,XJ=MJ+4|0,gK=0|f[XJ>>2],rK=0|f[gK>>2],CK=0!=(0|rK),CK&&(NK=w,YK=Cca,hL=YK+4|0,tL=0|f[hL>>2],EL=0|f[tL>>2],PL=Oba,lu(NK,EL,PL,0)),$L=Cca,jM=$L+4|0,uM=0|f[jM>>2],FM=uM+4|0,QM=0|f[FM>>2],_M=0|f[QM>>2],kN=0!=(0|_M),kN&&(wN=w,HN=Cca,SN=HN+4|0,bO=0|f[SN>>2],mO=bO+4|0,xO=0|f[mO>>2],IO=0|f[xO>>2],TO=Uu,cu(wN,IO,TO),cP=Uu,nP=0!=(0|cP),nP&&(AP=w,LP=AP+172|0,WP=0|f[LP>>2],fQ=WP+-1|0,f[LP>>2]=fQ)),qQ=w,BQ=Pba,MQ=BQ+32767|0,XQ=65535&MQ,gR=XQ<<7,rR=23|gR,DR=0|du(qQ,rR),hea=DR,OR=hea,Pba=OR,ZR=yca,iS=ZR+4|0,tS=0|f[iS>>2],yca=tS,ES=w,eu(ES)}PS=rda,$S=0!=(0|PS),$S&&(jT=w,uT=rda,hu(jT,uT),GT=w,RT=Oba,aU=511&RT,lU=aU<<23,wU=29|lU,0|du(GT,wU))}return HU=w,SU=HU+172|0,bV=0|f[SU>>2],mV=bV+-1|0,f[SU>>2]=mV,xV=x,JV=xV+4|0,UV=0|f[JV>>2],x=UV,dW=w,oW=Kca,hu(dW,oW),zW=w,0|du(zW,8388636),KW=x,VW=0|f[KW>>2],eX=0!=(0|VW),eX?(pX=w,AX=x,MX=0|f[AX>>2],XX=Uu,cu(pX,MX,XX)):(gY=Uu,rY=0!=(0|gY),rY&&(CY=w,eu(CY))),NY=w,YY=Pba,ku(NY,YY),hZ=w,uu(hZ,0),void(l=nea);case 19:return sZ=w,DZ=sZ+176|0,PZ=0|f[DZ>>2],Nba=PZ,$Z=w,0|du($Z,30),e$=w,f$=e$+192|0,g$=0|f[f$>>2],h$=g$+1|0,f[f$>>2]=h$,i$=w,j$=x,k$=0|f[j$>>2],l$=Uu,cu(i$,k$,l$),n$=w,o$=x,p$=o$+4|0,q$=0|f[p$>>2],r$=0|vu(n$,q$,0),Zba=r$,s$=Zba,t$=65535&s$,u$=t$<<7,v$=30|u$,w$=Nba,y$=w,z$=y$+204|0,A$=0|f[z$>>2],B$=A$+(w$<<2)|0,f[B$>>2]=v$,C$=w,D$=C$+192|0,E$=0|f[D$>>2],F$=E$+-1|0,f[D$>>2]=F$,G$=w,0|nu(G$,8388639,0),void(l=nea);case 53:return H$=w,J$=x,K$=0|Au(H$,J$,1),$ba=K$,L$=w,M$=w,N$=M$+172|0,O$=0|f[N$>>2],P$=511&O$,Q$=P$<<23,R$=64|Q$,S$=$ba,U$=16383&S$,V$=U$<<9,W$=384|V$,X$=R$|W$,0|du(L$,X$),Y$=w,eu(Y$),void(l=nea);case 4:return Z$=w,$$=x,_$=0|Au(Z$,$$,1),aca=_$,a_=w,b_=w,e_=b_+172|0,f_=0|f[e_>>2],g_=511&f_,h_=g_<<23,i_=64|h_,j_=aca,k_=16383&j_,l_=k_<<9,m_=256|l_,n_=i_|m_,0|du(a_,n_),p_=w,eu(p_),void(l=nea);case 5:switch(q_=x,r_=q_+4|0,s_=0|f[r_>>2],t_=s_+4|0,u_=0|f[t_>>2],v_=0|f[u_>>2],Mba=v_,w_=x,x_=0|f[w_>>2],y_=0|f[x_>>2],A_=y_,0|A_){case 55:case 50:case 87:return B_=w,C_=x,D_=C_+4|0,E_=0|f[D_>>2],F_=0|f[E_>>2],G_=Uu,cu(B_,F_,G_),void(l=nea);case 86:case 88:return H_=w,I_=Mba,J_=Uu,cu(H_,I_,J_),void(l=nea);default:return L_=w,M_=x,N_=0|f[M_>>2],cu(L_,N_,1),O_=w,P_=O_+172|0,Q_=0|f[P_>>2],R_=Q_+-1|0,f[P_>>2]=R_,S_=w,T_=w,U_=T_+172|0,W_=0|f[U_>>2],X_=511&W_,Y_=X_<<23,Z_=25|Y_,$_=4194176|Z_,__=0|nu(S_,$_,0),tda=__,a0=w,b0=x,c0=b0+4|0,d0=0|f[c0>>2],f0=0|f[d0>>2],g0=Uu,cu(a0,f0,g0),h0=Uu,i0=0!=(0|h0),i0&&(j0=x,k0=j0+4|0,l0=0|f[k0>>2],m0=0|f[l0>>2],n0=0!=(0|m0),n0||(o0=w,q0=w,r0=q0+172|0,s0=0|f[r0>>2],t0=511&s0,u0=t0<<23,v0=5|u0,0|du(o0,v0),w0=w,eu(w0))),x0=Mba,y0=0!=(0|x0),z0=Uu,B0=0!=(0|z0),y0?(B0&&(C0=w,D0=C0+172|0,E0=0|f[D0>>2],F0=E0+-1|0,f[D0>>2]=F0),G0=w,H0=0|du(G0,4194199),xda=H0,I0=w,J0=tda,hu(I0,J0),K0=w,M0=Mba,N0=Uu,cu(K0,M0,N0),O0=w,P0=xda,hu(O0,P0),void(l=nea)):(Q0=w,B0?(R0=Q0+172|0,S0=0|f[R0>>2],T0=S0+-1|0,f[R0>>2]=T0,U0=w,V0=0|du(U0,4194199),xda=V0,X0=w,Y0=tda,hu(X0,Y0),Z0=w,$0=w,_0=$0+172|0,a1=0|f[_0>>2],b1=511&a1,c1=b1<<23,d1=5|c1,0|du(Z0,d1),e1=w,h1=xda,hu(e1,h1),i1=w,eu(i1),void(l=nea)):(j1=tda,hu(Q0,j1),void(l=nea)))}break;case 20:return k1=w,l1=x,m1=0|f[l1>>2],cu(k1,m1,1),n1=w,o1=n1+172|0,p1=0|f[o1>>2],q1=p1+-1|0,f[o1>>2]=q1,s1=w,t1=w,u1=t1+172|0,v1=0|f[u1>>2],w1=511&v1,x1=w1<<23,y1=25|x1,z1=4194176|y1,A1=0|du(s1,z1),qda=A1,B1=w,D1=x,E1=D1+4|0,F1=0|f[E1>>2],G1=Uu,cu(B1,F1,G1),H1=w,I1=qda,hu(H1,I1),void(l=nea);case 21:return J1=w,K1=x,L1=0|f[K1>>2],cu(J1,L1,1),M1=w,O1=M1+172|0,P1=0|f[O1>>2],Q1=P1+-1|0,f[O1>>2]=Q1,R1=w,S1=w,T1=S1+172|0,U1=0|f[T1>>2],V1=511&U1,W1=V1<<23,X1=24|W1,Z1=4194176|X1,$1=0|du(R1,Z1),Ada=$1,_1=w,a2=x,b2=a2+4|0,c2=0|f[b2>>2],d2=Uu,cu(_1,c2,d2),e2=w,f2=Ada,hu(e2,f2),void(l=nea);case 9:return g2=w,i2=0|fu(g2,0),oca=i2,j2=w,k2=0|du(j2,4194199),l2=oca,m2=l2+4|0,f[m2>>2]=k2,n2=w,o2=0|Bu(n2),p2=oca,q2=p2+8|0,f[q2>>2]=o2,r2=w,t2=x,u2=t2+4|0,v2=0|f[u2>>2],cu(r2,v2,0),w2=w,x2=oca,y2=x2+4|0,z2=0|f[y2>>2],hu(w2,z2),A2=w,B2=x,C2=0|f[B2>>2],cu(A2,C2,1),E2=w,F2=E2+172|0,G2=0|f[F2>>2],H2=G2+-1|0,f[F2>>2]=H2,I2=w,J2=w,K2=J2+172|0,L2=0|f[K2>>2],M2=511&L2,N2=M2<<23,P2=24|N2,Q2=oca,R2=Q2+8|0,S2=0|f[R2>>2],T2=w,U2=T2+176|0,V2=0|f[U2>>2],W2=S2-V2|0,X2=W2+32767|0,Y2=65535&X2,$2=Y2<<7,_2=P2|$2,0|du(I2,_2),a3=w,b3=Uu,uu(a3,b3),void(l=nea);case 10:return c3=w,d3=0|fu(c3,0),pca=d3,e3=w,f3=0|du(e3,4194199),g3=pca,h3=g3+4|0,f[h3>>2]=f3,k3=w,l3=0|Bu(k3),m3=pca,n3=m3+8|0,f[n3>>2]=l3,o3=w,p3=x,q3=p3+4|0,r3=0|f[q3>>2],cu(o3,r3,0),s3=w,t3=pca,v3=t3+4|0,w3=0|f[v3>>2],hu(s3,w3),x3=w,y3=x,z3=0|f[y3>>2],cu(x3,z3,1),A3=w,B3=A3+172|0,C3=0|f[B3>>2],D3=C3+-1|0,f[B3>>2]=D3,E3=w,G3=w,H3=G3+172|0,I3=0|f[H3>>2],J3=511&I3,K3=J3<<23,L3=25|K3,M3=pca,N3=M3+8|0,O3=0|f[N3>>2],P3=w,R3=P3+176|0,S3=0|f[R3>>2],T3=O3-S3|0,U3=T3+32767|0,V3=65535&U3,W3=V3<<7,X3=L3|W3,0|du(E3,X3),Y3=w,Z3=Uu,uu(Y3,Z3),void(l=nea);case 12:return $3=w,a4=x,Cu($3,a4),b4=Uu,(c4=0!=(0|b4))?(d4=w,eu(d4),void(l=nea)):void(l=nea);case 6:for(Wba=0,zda=0,e4=x,f4=0|f[e4>>2],g4=0!=(0|f4),g4&&(h4=w,i4=h4+172|0,j4=0|f[i4>>2],Wba=j4,l4=w,m4=x,n4=0|f[m4>>2],cu(l4,n4,1)),o4=x,p4=o4+4|0,q4=0|f[p4>>2],x=q4;;){if(r4=x,s4=0!=(0|r4),!s4)break;for(t4=x,u4=0|f[t4>>2],w4=0|f[u4>>2],vca=w4,yda=0,uda=0;;){if(x4=vca,y4=0!=(0|x4),!y4)break;z4=w,A4=vca,B4=0|f[A4>>2],cu(z4,B4,1),C4=Wba,D4=0!=(0|C4),E4=w;do{if(D4){if(F4=w,H4=F4+172|0,I4=0|f[H4>>2],J4=511&I4,K4=J4<<23,L4=1|K4,M4=Wba,N4=511&M4,O4=N4<<14,P4=L4|O4,0|du(E4,P4),Q4=w,S4=Q4+172|0,T4=0|f[S4>>2],U4=T4+-1|0,f[S4>>2]=U4,V4=vca,W4=0|f[V4>>2],X4=0|f[W4>>2],Y4=X4,Z4=66==(0|Y4),$4=w,_4=w,b5=_4+172|0,c5=0|f[b5>>2],d5=511&c5,e5=d5<<23,f5=32|e5,g5=w,h5=w,i5=0|f[h5>>2],Z4){j5=0|ki(i5,69439,10),k5=0|ju(g5,j5),n5=511&k5,o5=n5<<14,p5=f5|o5,q5=128|p5,0|du($4,q5);break}r5=0|ki(i5,69450,3),s5=0|ju(g5,r5),t5=511&s5,u5=t5<<14,v5=f5|u5,w5=128|v5,0|du($4,w5);break}y5=E4+172|0,z5=0|f[y5>>2],A5=z5+-1|0,f[y5>>2]=A5}while(0);B5=w,C5=w,D5=C5+172|0,E5=0|f[D5>>2],F5=511&E5,G5=F5<<23,H5=24|G5,J5=yda,K5=J5+32767|0,L5=65535&K5,M5=L5<<7,N5=H5|M5,O5=0|du(B5,N5),iea=O5,P5=iea,yda=P5,Q5=vca,R5=Q5+4|0,S5=0|f[R5>>2],vca=S5}U5=x,V5=0|f[U5>>2],W5=0|f[V5>>2],X5=0!=(0|W5),X5&&(Y5=w,Z5=0|du(Y5,4194199),uda=Z5,$5=w,_5=yda,ku($5,_5)),a6=w,b6=x,d6=0|f[b6>>2],e6=d6+4|0,f6=0|f[e6>>2],g6=Uu,cu(a6,f6,g6),h6=Uu,i6=0!=(0|h6),i6&&(j6=w,k6=j6+172|0,l6=0|f[k6>>2],m6=l6+-1|0,f[k6>>2]=m6),o6=w,p6=zda,q6=p6+32767|0,r6=65535&q6,s6=r6<<7,t6=23|s6,u6=0|du(o6,t6),iea=u6,v6=iea,zda=v6,w6=uda,x6=0!=(0|w6),x6&&(z6=w,A6=uda,hu(z6,A6)),B6=x,C6=B6+4|0,D6=0|f[C6>>2],x=D6}return E6=Uu,F6=0!=(0|E6),F6?(G6=w,H6=G6+172|0,I6=0|f[H6>>2],sda=I6,K6=w,L6=w,M6=L6+172|0,N6=0|f[M6>>2],O6=511&N6,P6=O6<<23,Q6=5|P6,0|du(K6,Q6),R6=zda,S6=0!=(0|R6),S6&&(T6=w,V6=zda,ku(T6,V6)),W6=Wba,X6=0!=(0|W6),X6&&(Y6=w,Z6=Y6+172|0,$6=0|f[Z6>>2],_6=$6+-1|0,f[Z6>>2]=_6),a7=w,b7=w,c7=b7+172|0,e7=0|f[c7>>2],f7=511&e7,g7=f7<<23,h7=1|g7,i7=sda,j7=511&i7,k7=j7<<14,l7=h7|k7,0|du(a7,l7),m7=w,eu(m7),void(l=nea)):(n7=zda,q7=0!=(0|n7),q7&&(r7=w,s7=zda,ku(r7,s7)),t7=Wba,(u7=0!=(0|t7))?(v7=w,w7=v7+172|0,x7=0|f[w7>>2],y7=x7+-1|0,f[w7>>2]=y7,void(l=nea)):void(l=nea));case 3:return z7=w,B7=x,0|vu(z7,B7,0),void(l=nea);case 29:case 30:return C7=w,D7=x,E7=Uu,qu(C7,D7,0,0,E7),void(l=nea);case 80:return F7=w,G7=x,H7=0|f[G7>>2],I7=Uu,cu(F7,H7,I7),J7=w,K7=x,M7=K7+4|0,N7=0|f[M7>>2],O7=Uu,cu(J7,N7,O7),P7=Uu,(Q7=0!=(0|P7))?(R7=w,S7=R7+172|0,T7=0|f[S7>>2],U7=T7+-1|0,f[S7>>2]=U7,V7=w,X7=V7+172|0,Y7=0|f[X7>>2],Z7=Y7+-1|0,f[X7>>2]=Z7,$7=w,_7=w,a8=_7+172|0,b8=0|f[a8>>2],c8=511&b8,d8=c8<<23,e8=65|d8,g8=w,h8=g8+172|0,i8=0|f[h8>>2],j8=511&i8,k8=j8<<14,l8=e8|k8,0|du($7,l8),m8=w,eu(m8),void(l=nea)):void(l=nea);case 81:return n8=w,o8=x,p8=0|f[o8>>2],r8=Uu,cu(n8,p8,r8),s8=w,t8=x,u8=t8+4|0,v8=0|f[u8>>2],w8=Uu,cu(s8,v8,w8),x8=Uu,(y8=0!=(0|x8))?(z8=w,A8=z8+172|0,C8=0|f[A8>>2],D8=C8+-1|0,f[A8>>2]=D8,E8=w,F8=E8+172|0,G8=0|f[F8>>2],H8=G8+-1|0,f[F8>>2]=H8,I8=w,J8=w,K8=J8+172|0,L8=0|f[K8>>2],N8=511&L8,O8=N8<<23,P8=65|O8,Q8=w,R8=Q8+172|0,S8=0|f[R8>>2],T8=511&S8,U8=T8<<14,V8=P8|U8,W8=128|V8,0|du(I8,W8),Y8=w,eu(Y8),void(l=nea)):void(l=nea);case 77:return Z8=w,$8=x,_8=$8+4|0,a9=0|f[_8>>2],b9=a9,c9=0|mu(Z8,b9),Pda=c9,d9=w,e9=x,f9=0|f[e9>>2],cu(d9,f9,1),h9=w,i9=h9+172|0,j9=0|f[i9>>2],k9=j9+-1|0,f[i9>>2]=k9,l9=w,m9=w,n9=m9+172|0,o9=0|f[n9>>2],p9=511&o9,q9=p9<<23,t9=19|q9,u9=Pda,v9=65535&u9,w9=v9<<7,x9=t9|w9,0|du(l9,x9),y9=Uu,(z9=0!=(0|y9))?(A9=w,eu(A9),void(l=nea)):void(l=nea);case 78:return B9=w,C9=x,E9=C9,F9=0|mu(B9,E9),Qda=F9,G9=w,H9=w,I9=H9+172|0,J9=0|f[I9>>2],K9=511&J9,L9=K9<<23,M9=66|L9,0|du(G9,M9),N9=w,P9=w,Q9=P9+172|0,R9=0|f[Q9>>2],S9=511&R9,T9=S9<<23,U9=19|T9,V9=Qda,W9=65535&V9,X9=W9<<7,Y9=U9|X9,0|du(N9,Y9),$9=Uu,(_9=0!=(0|$9))?(aaa=w,eu(aaa),void(l=nea)):void(l=nea);case 34:return baa=w,caa=x,daa=Uu,eaa=0|ru(baa,caa,daa),wca=eaa,faa=wca,gaa=(0|faa)>=0,haa=Uu,jaa=0!=(0|haa),gaa?jaa?(kaa=wca,laa=w,maa=laa+172|0,naa=0|f[maa>>2],oaa=naa-kaa|0,f[maa>>2]=oaa,paa=w,qaa=w,raa=qaa+172|0,saa=0|f[raa>>2],uaa=511&saa,vaa=uaa<<23,waa=55|vaa,xaa=w,yaa=xaa+172|0,zaa=0|f[yaa>>2],Aaa=511&zaa,Baa=Aaa<<14,Caa=waa|Baa,Daa=wca,Faa=127&Daa,Gaa=Faa<<7,Haa=Caa|Gaa,0|du(paa,Haa),Iaa=w,eu(Iaa),void(l=nea)):void(l=nea):jaa?(Jaa=w,eu(Jaa),void(l=nea)):void(l=nea);case 36:for(hca=0,lea=0;;){if(Kaa=x,Laa=0!=(0|Kaa),!Laa)break;Maa=w,Naa=x,Oaa=0|f[Naa>>2],Qaa=0|f[Oaa>>2],Raa=Uu,cu(Maa,Qaa,Raa),Saa=w,Taa=x,Uaa=0|f[Taa>>2],Vaa=Uaa+4|0,Waa=0|f[Vaa>>2],Xaa=Uu,cu(Saa,Waa,Xaa),Yaa=hca,Zaa=Yaa+1|0,hca=Zaa,_aa=x,aba=_aa+4|0,bba=0|f[aba>>2],x=bba,cba=Uu,dba=0!=(0|cba),eba=hca,fba=126==(0|eba),$ca=dba&fba,$ca&&(gba=hca,hba=gba<<1,iba=w,kba=iba+172|0,lba=0|f[kba>>2],mba=lba-hba|0,f[kba>>2]=mba,nba=w,oba=w,pba=oba+172|0,qba=0|f[pba>>2],rba=511&qba,sba=rba<<23,tba=63|sba,A=w,B=A+172|0,C=0|f[B>>2],D=511&C,E=D<<14,F=tba|E,G=hca,H=127&G,I=H<<7,J=F|I,0|du(nba,J),L=lea,M=L<<24>>24!=0,M&&(N=w,O=N+172|0,P=0|f[O>>2],Q=P+-1|0,f[O>>2]=Q,R=w,S=w,T=S+172|0,U=0|f[T>>2],W=511&U,Y=W<<23,Z=32|Y,$=w,_=w,aa=0|f[_>>2],ba=0|ki(aa,69503,8),ca=0|ju($,ba),da=511&ca,ea=da<<14,ga=Z|ea,ha=128|ga,0|du(R,ha)),ia=w,eu(ia),lea=1,hca=0)}return ja=Uu,(ka=0!=(0|ja))?(la=hca,ma=la<<1,na=w,oa=na+172|0,pa=0|f[oa>>2],ra=pa-ma|0,f[oa>>2]=ra,sa=w,ta=w,ua=ta+172|0,va=0|f[ua>>2],wa=511&va,xa=wa<<23,ya=63|xa,za=w,Aa=za+172|0,Ca=0|f[Aa>>2],Da=511&Ca,Ea=Da<<14,Fa=ya|Ea,Ga=hca,Ha=127&Ga,Ia=Ha<<7,Ja=Fa|Ia,0|du(sa,Ja),Ka=lea,La=Ka<<24>>24!=0,La&&(Na=w,Oa=Na+172|0,Pa=0|f[Oa>>2],Qa=Pa+-1|0,f[Oa>>2]=Qa,Ra=w,Sa=w,Ta=Sa+172|0,Ua=0|f[Ta>>2],Va=511&Ua,Wa=Va<<23,Ya=32|Wa,Za=w,$a=w,_a=0|f[$a>>2],ab=0|ki(_a,69503,8),bb=0|ju(Za,ab),cb=511&bb,db=cb<<14,eb=Ya|db,fb=128|eb,0|du(Ra,fb)),hb=w,eu(hb),void(l=nea)):void(l=nea);case 66:return ib=w,jb=x,cu(ib,jb,1),void(l=nea);case 24:return kb=w,lb=x,mb=lb+4|0,nb=0|f[mb>>2],cu(kb,nb,1),ob=w,pb=ob+172|0,qb=0|f[pb>>2],sb=qb+-1|0,f[pb>>2]=sb,tb=w,ub=x,vb=0|f[ub>>2],wb=w,xb=wb+172|0,yb=0|f[xb>>2],zb=Uu,lu(tb,vb,yb,zb),void(l=nea);case 23:if(ica=0,xca=0,Bda=0,Ab=x,Bb=Ab+4|0,Eb=0|f[Bb>>2],fea=Eb,Fb=w,Gb=Fb+172|0,Hb=0|f[Gb>>2],Dda=Hb,Ib=fea,Jb=0|f[Ib>>2],Kb=Jb,Lb=34==(0|Kb),Lb&&(Mb=fea,Nb=Mb+4|0,Pb=0|f[Nb>>2],Qb=0|Du(Pb),Rb=255&Qb,Sb=0!=(0|Rb))){for(Tb=fea,Ub=Tb+4|0,Vb=0|f[Ub>>2],fea=Vb;;){if(Wb=fea,Xb=0!=(0|Wb),!Xb)break;Yb=w,$b=fea,_b=0|f[$b>>2],cu(Yb,_b,1),ac=ica,bc=ac+1|0,ica=bc,cc=fea,dc=cc+4|0,ec=0|f[dc>>2],fea=ec}fc=x,gc=0|f[fc>>2],x=gc,hc=x,jc=0|f[hc>>2],kc=0!=(0|jc);a:do if(kc)for(lc=x,mc=0|f[lc>>2],fea=mc,xca=0;;){if(nc=fea,oc=0!=(0|nc),!oc)break a;pc=w,qc=fea,rc=0|f[qc>>2],sc=Dda,uc=xca,vc=sc+uc|0,lu(pc,rc,vc,0),wc=xca,xc=wc+1|0,xca=xc,yc=fea,zc=yc+4|0,Ac=0|f[zc>>2],fea=Ac}while(0);Bc=x,Cc=Bc+4|0,Dc=0|f[Cc>>2],fea=Dc,Fc=fea,Gc=0!=(0|Fc);a:do if(Gc){Hc=fea,Ic=Hc+4|0,Jc=0|f[Ic>>2],Kc=0!=(0|Jc);b:do if(Kc)for(Lc=fea,Mc=Lc+4|0,Nc=0|f[Mc>>2],Oc=0|f[Nc>>2],eda=Oc;;){if(Qc=eda,Rc=0!=(0|Qc),!Rc)break b;Sc=Bda,Tc=Sc+1|0,Bda=Tc,Uc=eda,Vc=Uc+4|0,Yc=0|f[Vc>>2],eda=Yc}while(0);if(Zc=fea,$c=0|f[Zc>>2],_c=0!=(0|$c),_c&&(bd=ica,cd=Bda,dd=xca,ed=cd+dd|0,fd=(0|bd)<(0|ed),fd?Eda=0:(gd=ica,hd=Bda,id=gd-hd|0,jd=xca,kd=id-jd|0,Eda=kd),md=w,nd=w,od=nd+172|0,pd=0|f[od>>2],qd=511&pd,rd=qd<<23,sd=55|rd,td=Dda,ud=xca,vd=td+ud|0,xd=511&vd,yd=xd<<14,zd=sd|yd,Ad=Eda,Bd=127&Ad,Cd=Bd<<7,Dd=zd|Cd,0|du(md,Dd),Ed=w,Fd=fea,Gd=0|f[Fd>>2],Jd=w,Kd=Jd+172|0,Ld=0|f[Kd>>2],lu(Ed,Gd,Ld,0),Md=Eda,Nd=xca,Od=Nd+Md|0,xca=Od),Pd=fea,Qd=Pd+4|0,Rd=0|f[Qd>>2],Sd=0!=(0|Rd),Sd&&(Ud=fea,Vd=Ud+4|0,Wd=0|f[Vd>>2],Xd=0|f[Wd>>2],Yd=0!=(0|Xd)))for(Zd=fea,$d=Zd+4|0,_d=0|f[$d>>2],ae=0|f[_d>>2],fea=ae;;){if(be=xca,de=ica,ee=(0|be)<(0|de),!ee)break a;fe=w,ge=fea,he=0|f[ge>>2],ie=Dda,je=xca,ke=ie+je|0,lu(fe,he,ke,0),le=fea,me=le+4|0,oe=0|f[me>>2],fea=oe,qe=xca,re=qe+1|0,xca=re}}while(0);return se=ica,te=w,ue=te+172|0,ve=0|f[ue>>2],we=ve-se|0,f[ue>>2]=we,xe=Uu,(ye=0!=(0|xe))?(Ae=w,Be=Dda,Ce=511&Be,De=Ce<<23,Ee=55|De,Fe=Dda,Ge=511&Fe,He=Ge<<14,Ie=Ee|He,Je=ica,Le=127&Je,Me=Le<<7,Ne=Ie|Me,0|du(Ae,Ne),Oe=w,eu(Oe),void(l=nea)):void(l=nea)}return Pe=w,Qe=fea,cu(Pe,Qe,1),Re=w,Se=x,Te=0|f[Se>>2],Ue=Dda,We=Uu,su(Re,Te,Ue,We),Xe=Uu,(Ye=0!=(0|Xe))?void(l=nea):(Ze=w,$e=Ze+172|0,_e=0|f[$e>>2],af=_e+-1|0,f[$e>>2]=af,void(l=nea));case 28:bf=x,cf=bf+4|0,df=0|f[cf>>2],ff=0|f[df>>2],gf=ff,Rda=gf,hf=w,jf=0|f[hf>>2],kf=Rda,lf=0|si(jf,kf,jca),Jca=lf,mf=w,nf=x,of=0|f[nf>>2],cu(mf,of,1),pf=0|f[jca>>2],rf=2==(0|pf);do if(rf){if(sf=Jca,tf=0|d[sf>>0],uf=tf<<24>>24,vf=124==(0|uf),vf?(wf=Jca,xf=wf+1|0,yf=0|d[xf>>0],zf=yf<<24>>24,Af=124==(0|zf),Af||(mea=152)):mea=152,152==(0|mea)){if(Cf=Jca,Df=0|d[Cf>>0],Ef=Df<<24>>24,Ff=38==(0|Ef),!Ff)break;if(Gf=Jca,Hf=Gf+1|0,If=0|d[Hf>>0],Jf=If<<24>>24,Kf=38==(0|Jf),!Kf)break}return Lf=w,Of=Lf+172|0,Pf=0|f[Of>>2],Qf=Pf+-1|0,f[Of>>2]=Qf,Rf=w,Sf=Jca,Tf=0|d[Sf>>0],Uf=Tf<<24>>24,Vf=124==(0|Uf),Wf=Vf?24:25,Xf=127&Wf,Zf=w,$f=Zf+172|0,_f=0|f[$f>>2],ag=511&_f,bg=ag<<23,cg=Xf|bg,dg=4194176|cg,eg=0|nu(Rf,dg,0),vda=eg,fg=w,gg=x,ig=gg+4|0,jg=0|f[ig>>2],kg=jg+4|0,mg=0|f[kg>>2],og=0|f[mg>>2],cu(fg,og,1),pg=w,rg=pg+172|0,sg=0|f[rg>>2],tg=sg+-1|0,f[rg>>2]=tg,ug=w,wg=x,xg=0|f[wg>>2],yg=w,zg=yg+172|0,Ag=0|f[zg>>2],Bg=Uu,lu(ug,xg,Ag,Bg),Cg=w,Dg=vda,hu(Cg,Dg),void(l=nea)}while(0);Eg=w,Fg=x,Hg=Fg+4|0,Ig=0|f[Hg>>2],Jg=Ig+4|0,Kg=0|f[Jg>>2],Lg=0|f[Kg>>2],cu(Eg,Lg,1),Mg=w,eu(Mg),Ng=w,Og=Ng+172|0,Pg=0|f[Og>>2],Qg=Pg+-1|0,f[Og>>2]=Qg,Sg=w,Tg=Sg+172|0,Ug=0|f[Tg>>2],Vg=Ug+-1|0,f[Tg>>2]=Vg,Wg=w,Xg=Wg+172|0,Yg=0|f[Xg>>2],Zg=Yg+-1|0,f[Xg>>2]=Zg,$g=w,_g=Rda,bh=0|ju($g,_g),_ba=bh,ch=0|f[jca>>2],eh=1==(0|ch),eh?(fh=Jca,hh=0|d[fh>>0],ih=hh<<24>>24,jh=43==(0|ih),jh?(kh=w,lh=w,mh=lh+172|0,oh=0|f[mh>>2],ph=511&oh,qh=ph<<23,rh=44|qh,sh=_ba,th=511&sh,uh=th<<14,vh=rh|uh,wh=128|vh,xh=Uu,0|nu(kh,wh,xh)):mea=158):mea=158;do if(158==(0|mea)){if(zh=0|f[jca>>2],Ah=1==(0|zh),Ah&&(Bh=Jca,Ch=0|d[Bh>>0],Dh=Ch<<24>>24,Eh=45==(0|Dh))){Fh=w,Gh=w,Hh=Gh+172|0,Ih=0|f[Hh>>2],Kh=511&Ih,Lh=Kh<<23,Mh=46|Lh,Nh=_ba,Oh=511&Nh,Ph=Oh<<14,Qh=Mh|Ph,Rh=128|Qh,Sh=Uu,0|nu(Fh,Rh,Sh);break}if(Th=0|f[jca>>2],Wh=1==(0|Th),Wh&&(Xh=Jca,Yh=0|d[Xh>>0],Zh=Yh<<24>>24,$h=42==(0|Zh))){_h=w,ai=w,bi=ai+172|0,ci=0|f[bi>>2],di=511&ci,fi=di<<23,gi=48|fi,hi=_ba,ii=511&hi,ji=ii<<14,li=gi|ji,ni=128|li,0|du(_h,ni);break}if(oi=0|f[jca>>2],pi=1==(0|oi),pi&&(qi=Jca,ti=0|d[qi>>0],ui=ti<<24>>24,vi=47==(0|ui))){wi=w,xi=w,yi=xi+172|0,zi=0|f[yi>>2],Ai=511&zi,Bi=Ai<<23,Ci=49|Bi,Ei=_ba,Fi=511&Ei,Gi=Fi<<14,Hi=Ci|Gi,Ii=128|Hi,0|du(wi,Ii);break}if(Ji=0|f[jca>>2],Ki=1==(0|Ji),Ki&&(Li=Jca,Mi=0|d[Li>>0],Ni=Mi<<24>>24,Pi=60==(0|Ni))){Qi=w,Ri=w,Si=Ri+172|0,Ti=0|f[Si>>2],Ui=511&Ti,Vi=Ui<<23,Wi=51|Vi,Xi=_ba,Yi=511&Xi,$i=Yi<<14,_i=Wi|$i,aj=128|_i,0|du(Qi,aj);break}if(bj=0|f[jca>>2],cj=2==(0|bj),cj&&(dj=Jca,ej=0|d[dj>>0],fj=ej<<24>>24,gj=60==(0|fj),gj&&(hj=Jca,jj=hj+1|0,kj=0|d[jj>>0],lj=kj<<24>>24,mj=61==(0|lj)))){nj=w,oj=w,pj=oj+172|0,qj=0|f[pj>>2],rj=511&qj,sj=rj<<23,uj=52|sj,vj=_ba,wj=511&vj,xj=wj<<14,yj=uj|xj,zj=128|yj,0|du(nj,zj);break}if(Aj=0|f[jca>>2],Bj=1==(0|Aj),Bj&&(Cj=Jca,Dj=0|d[Cj>>0],Fj=Dj<<24>>24,Gj=62==(0|Fj))){Hj=w,Ij=w,Jj=Ij+172|0,Kj=0|f[Jj>>2],Lj=511&Kj,Mj=Lj<<23,Nj=53|Mj,Oj=_ba,Qj=511&Oj,Rj=Qj<<14,Sj=Nj|Rj,Tj=128|Sj,0|du(Hj,Tj);break}if(Uj=0|f[jca>>2],Vj=2==(0|Uj),Vj&&(Wj=Jca,Xj=0|d[Wj>>0],Yj=Xj<<24>>24,Zj=62==(0|Yj),Zj&&(ak=Jca,bk=ak+1|0,ck=0|d[bk>>0],dk=ck<<24>>24,ek=61==(0|dk)))){fk=w,gk=w,hk=gk+172|0,ik=0|f[hk>>2],jk=511&ik,lk=jk<<23,mk=54|lk,nk=_ba,ok=511&nk,pk=ok<<14,qk=mk|pk,rk=128|qk,0|du(fk,rk);break}sk=w,tk=w,uk=tk+172|0,wk=0|f[uk>>2],xk=511&wk,yk=xk<<23,zk=32|yk,Ak=_ba,Bk=511&Ak,Ck=Bk<<14,Dk=zk|Ck,Ek=128|Dk,0|du(sk,Ek)}while(0);return Fk=w,Hk=x,Ik=0|f[Hk>>2],Jk=w,Kk=Jk+172|0,Lk=0|f[Kk>>2],Mk=Uu,lu(Fk,Ik,Lk,Mk),void(l=nea);case 32:return zca=0,Lca=0,Hda=0,Nk=w,eu(Nk),Ok=x,Pk=0!=(0|Ok),Pk&&(Qk=x,Sk=0|f[Qk>>2],Eba=Sk,Tk=Eba,Uk=0!=(0|Tk),Uk&&(Vk=w,Wk=Eba,Xk=0|ru(Vk,Wk,1),zca=Xk,Yk=zca,Zk=(0|Yk)<0,Zk&&(Hda=1,Lca=1,zca=1,$k=w,eu($k)))),_k=x,bl=0!=(0|_k),bl?(cl=x,dl=cl+4|0,el=0|f[dl>>2],fl=0!=(0|el),fl?(gl=w,hl=x,il=hl+4|0,jl=0|f[il>>2],cu(gl,jl,1),kl=w,ml=kl+172|0,nl=0|f[ml>>2],ol=nl+-1|0,f[ml>>2]=ol):mea=190):mea=190,190==(0|mea)&&(pl=w,ql=w,rl=ql+172|0,sl=0|f[rl>>2],tl=511&sl,ul=tl<<23,vl=5|ul,0|du(pl,vl),xl=w,eu(xl),yl=w,zl=yl+172|0,Al=0|f[zl>>2],Bl=Al+-1|0,f[zl>>2]=Bl),Cl=zca,Dl=Cl+1|0,El=w,Fl=El+172|0,Gl=0|f[Fl>>2],Il=Gl-Dl|0,f[Fl>>2]=Il,Jl=Hda,Kl=0!=(0|Jl),Kl&&(zca=127),Ll=w,Ml=w,Nl=Ml+172|0,Ol=0|f[Nl>>2],Pl=511&Ol,Ql=Pl<<23,Rl=36|Ql,Tl=zca,Ul=127&Tl,Vl=Ul<<7,Wl=Rl|Vl,0|du(Ll,Wl),Xl=Uu,(Yl=0!=(0|Xl))?(Zl=w,eu(Zl),void(l=nea)):void(l=nea);case 33:for($l=w,Fda=$l,qca=0,Aba=0,_l=w,eu(_l);;){if(am=Fda,dm=am+184|0,em=0|e[dm>>1],fm=(65535&em)>>>15,gm=255&fm,hm=gm<<24>>24!=0,im=1^hm,!im)break;if(jm=qca,km=jm+1|0,qca=km,lm=Fda,mm=lm+164|0,om=0|f[mm>>2],Fda=om,pm=Fda,qm=0!=(0|pm),!qm)break}return rm=Fda,sm=0!=(0|rm),sm&&(tm=Fda,um=tm+184|0,vm=0|e[um>>1],wm=vm<<1&65535,xm=wm<<16>>16>>1,zm=xm<<16>>16,Aba=zm),Am=w,Bm=w,Cm=Bm+172|0,Dm=0|f[Cm>>2],Em=511&Dm,Fm=Em<<23,Gm=37|Fm,Hm=Aba,Im=Hm<<4,Km=qca,Lm=15&Km,Mm=Im|Lm,Nm=65535&Mm,Om=Nm<<7,Pm=Gm|Om,0|du(Am,Pm),Qm=w,eu(Qm),Rm=w,eu(Rm),Sm=w,Tm=Sm+172|0,Vm=0|f[Tm>>2],Wm=Vm+-1|0,f[Tm>>2]=Wm,Xm=x,Ym=0!=(0|Xm),Ym&&(Zm=x,$m=Zm+4|0,_m=0|f[$m>>2],an=0!=(0|_m),an&&(bn=w,cn=x,en=cn+4|0,fn=0|f[en>>2],cu(bn,fn,1),gn=w,hn=gn+172|0,jn=0|f[hn>>2],kn=jn+-1|0,f[hn>>2]=kn)),ln=w,mn=ln+172|0,nn=0|f[mn>>2],on=nn+-1|0,f[mn>>2]=on,qn=w,rn=qn+172|0,sn=0|f[rn>>2],tn=sn+-1|0,f[rn>>2]=tn,un=w,vn=w,wn=vn+172|0,xn=0|f[wn>>2],yn=511&xn,zn=yn<<23,Bn=36|zn,Dn=16256|Bn,0|du(un,Dn),En=Uu,(Fn=0!=(0|En))?(Gn=w,eu(Gn),void(l=nea)):void(l=nea);case 37:return Hn=x,In=0!=(0|Hn),Jn=w,In?(Kn=x,cu(Jn,Kn,1),Ln=w,Nn=Ln+172|0,On=0|f[Nn>>2],Pn=On+-1|0,f[Nn>>2]=Pn):(Qn=w,Rn=Qn+172|0,Sn=0|f[Rn>>2],Tn=511&Sn,Un=Tn<<23,Vn=5|Un,0|du(Jn,Vn)),Wn=w,Yn=Wn+188|0,Zn=0|f[Yn>>2],$n=0!=(0|Zn),_n=w,ao=w,bo=ao+172|0,co=0|f[bo>>2],eo=511&co,fo=eo<<23,go=41|fo,$n?(jo=32768|go,0|du(_n,jo)):0|nu(_n,go,0),ko=Uu,(lo=0!=(0|ko))?(mo=w,eu(mo),void(l=nea)):void(l=nea);case 38:for(no=w,Gda=no,rca=0,Bba=0,Aca=0,Ida=0;;){if(oo=Gda,po=oo+184|0,qo=0|e[po>>1],ro=(65535&qo)>>>15,so=255&ro,uo=so<<24>>24!=0,vo=1^uo,!vo)break;if(wo=rca,xo=wo+1|0,rca=xo,yo=Gda,zo=yo+164|0,Ao=0|f[zo>>2],Gda=Ao,Bo=Gda,Co=0!=(0|Bo),!Co)break}return Do=Gda,Fo=0!=(0|Do),Fo&&(Go=Gda,Ho=Go+184|0,Io=0|e[Ho>>1],Jo=Io<<1&65535,Ko=Jo<<16>>16>>1,Lo=Ko<<16>>16,Bba=Lo),Mo=w,No=w,Oo=No+172|0,Qo=0|f[Oo>>2],Ro=511&Qo,So=Ro<<23,To=43|So,Uo=Bba,Vo=Uo<<4,Wo=rca,Xo=15&Wo,Yo=Vo|Xo,Zo=65535&Yo,_o=Zo<<7,ap=To|_o,0|du(Mo,ap),bp=w,eu(bp),cp=x,dp=0!=(0|cp),dp&&(ep=w,fp=x,gp=0|ru(ep,fp,1),Aca=gp,hp=Aca,ip=(0|hp)<0,ip&&(Ida=1,Aca=1,kp=w,eu(kp))),lp=Aca,mp=lp+1|0,np=w,op=np+172|0,pp=0|f[op>>2],qp=pp-mp|0,f[op>>2]=qp,rp=Ida,sp=0!=(0|rp),sp&&(Aca=127),tp=w,vp=w,wp=vp+172|0,xp=0|f[wp>>2],yp=511&xp,zp=yp<<23,Ap=32|zp,Bp=w,Cp=w,Dp=0|f[Cp>>2],Ep=0|ki(Dp,69512,4),Gp=0|ju(Bp,Ep),Hp=511&Gp,Ip=Hp<<14,Jp=Ap|Ip,Kp=Aca,Lp=127&Kp,Mp=Lp<<7,Np=Jp|Mp,0|du(tp,Np),Op=Uu,(Pp=0!=(0|Op))?(Rp=w,eu(Rp),void(l=nea)):void(l=nea);case 13:return Sp=w,Tp=x,Eu(Sp,Tp),Up=Uu,(Vp=0!=(0|Up))?(Wp=w,eu(Wp),void(l=nea)):void(l=nea);case 14:Xp=w,Yp=Xp+188|0,Zp=0|f[Yp>>2],$p=0!=(0|Zp),aq=w;do if($p){if(bq=aq+188|0,cq=0|f[bq>>2],dq=0|f[cq>>2],eq=0==(0|dq)){fq=w,gq=fq+192|0,hq=0|f[gq>>2],iq=w,jq=iq+188|0,mq=0|f[jq>>2],nq=mq+20|0,oq=0|f[nq>>2],pq=(0|hq)>(0|oq),pq&&(qq=w,rq=w,sq=rq+192|0,tq=0|f[sq>>2],uq=w,vq=uq+188|0,xq=0|f[vq>>2],yq=xq+20|0,zq=0|f[yq>>2],Aq=tq-zq|0,Bq=511&Aq,Cq=Bq<<23,Dq=31|Cq,0|nu(qq,Dq,0)),Eq=w,Fq=x,cu(Eq,Fq,0),Gq=w,Iq=w,Jq=Iq+188|0,Kq=0|f[Jq>>2],Lq=Kq+4|0,Mq=0|f[Lq>>2],Nq=w,Oq=Nq+176|0,Pq=0|f[Oq>>2],Qq=Mq-Pq|0,Rq=Qq+32767|0,Tq=65535&Rq,Uq=Tq<<7,Vq=23|Uq,0|du(Gq,Vq);break}Wq=x,Xq=0!=(0|Wq),Yq=w,Xq?(Zq=x,cu(Yq,Zq,1),$q=w,_q=$q+172|0,ar=0|f[_q>>2],cr=ar+-1|0,f[_q>>2]=cr):(dr=w,er=dr+172|0,fr=0|f[er>>2],gr=511&fr,hr=gr<<23,ir=5|hr,0|du(Yq,ir)),jr=w,kr=w,lr=kr+172|0,nr=0|f[lr>>2],or=511&nr,pr=or<<23,qr=41|pr,0|nu(jr,qr,0)}else wu(aq,69534);while(0);return rr=Uu,(sr=0!=(0|rr))?(ur=w,eu(ur),void(l=nea)):void(l=nea);case 15:return vr=w,wr=vr+188|0,xr=0|f[wr>>2],zr=0!=(0|xr),Ar=w,zr?(Br=Ar+192|0,Cr=0|f[Br>>2],Dr=w,Er=Dr+188|0,Fr=0|f[Er>>2],Gr=Fr+20|0,Hr=0|f[Gr>>2],Ir=(0|Cr)>(0|Hr),Ir&&(Kr=w,Lr=w,Mr=Lr+192|0,Nr=0|f[Mr>>2],Or=w,Pr=Or+188|0,Qr=0|f[Pr>>2],Rr=Qr+20|0,Sr=0|f[Rr>>2],Tr=Nr-Sr|0,Vr=511&Tr,Wr=Vr<<23,Xr=31|Wr,0|nu(Kr,Xr,0)),Yr=w,Zr=w,$r=Zr+188|0,_r=0|f[$r>>2],as=_r+8|0,bs=0|f[as>>2],cs=w,es=cs+176|0,fs=0|f[es>>2],gs=bs-fs|0,hs=gs+32767|0,is=65535&hs,js=is<<7,ks=23|js,0|du(Yr,ks),void(l=nea)):(wu(Ar,69550),void(l=nea));case 16:if(uca=69566,ls=w,ms=ls+188|0,ns=0|f[ms>>2],qs=0!=(0|ns),rs=w,!qs)return ss=uca,wu(rs,ss),void(l=nea);for(ts=rs+188|0,us=0|f[ts>>2],nca=us,Bca=0;;){if(vs=nca,ws=0!=(0|vs),ws?(xs=nca,ys=0|f[xs>>2],zs=4!=(0|ys),d$=zs):d$=0,Bs=nca,!d$)break;Cs=0|f[Bs>>2],Ds=3==(0|Cs),Ds&&(Es=Bca,Fs=Es+1|0,Bca=Fs),Gs=nca,Hs=Gs+24|0,Is=0|f[Hs>>2],nca=Is}if(Js=0!=(0|Bs),!Js)return Ks=w,Ms=uca,wu(Ks,Ms),void(l=nea);Ns=Bca,Os=(0|Ns)>0;a:do if(Os)for(;;){if(Ps=Bca,Qs=Ps+-1|0,Bca=Qs,Rs=0!=(0|Ps),!Rs)break a;Ss=w,0|nu(Ss,8388636,0)}while(0);return Ts=w,Us=Ts+192|0,Vs=0|f[Us>>2],Xs=nca,Ys=Xs+20|0,Zs=0|f[Ys>>2],$s=(0|Vs)>(0|Zs),$s&&(_s=w,at=w,bt=at+192|0,ct=0|f[bt>>2],dt=nca,et=dt+20|0,gt=0|f[et>>2],ht=ct-gt|0,it=511&ht,jt=it<<23,kt=31|jt,0|nu(_s,kt,0)),lt=w,mt=nca,nt=mt+4|0,ot=0|f[nt>>2],pt=w,rt=pt+176|0,st=0|f[rt>>2],tt=ot-st|0,ut=tt+32767|0,vt=65535&ut,wt=vt<<7,xt=23|wt,0|du(lt,xt),void(l=nea);case 39:if(yt=Uu,zt=0!=(0|yt),!zt)return void(l=nea);At=w,Ct=x,Dt=Ct,Et=0|bu(At,Dt),bca=Et,Ft=bca,Gt=(0|Ft)>0;a:do if(Gt)Ht=w,It=w,Jt=It+172|0,Kt=0|f[Jt>>2],Lt=511&Kt,Nt=Lt<<23,Ot=1|Nt,Pt=bca,Qt=511&Pt,Rt=Qt<<14,St=Ot|Rt,0|nu(Ht,St,0);else{for(sca=0,Tt=w,Ut=Tt+164|0,Vt=0|f[Ut>>2],kea=Vt;;){if(Wt=kea,Yt=0!=(0|Wt),!Yt)break a;if(Zt=kea,$t=x,_t=$t,au=0|bu(Zt,_t),bca=au,gu=bca,iu=(0|gu)>0)break;Zu=sca,$u=Zu+1|0,sca=$u,_u=kea,av=_u+164|0,bv=0|f[av>>2],kea=bv}ou=w,pu=w,tu=pu+172|0,zu=0|f[tu>>2],Lu=511&zu,Mu=Lu<<23,Nu=21|Mu,Ou=bca,Pu=511&Ou,Qu=Pu<<14,Ru=Nu|Qu,Su=sca,Tu=127&Su,Xu=Tu<<7,Yu=Ru|Xu,0|du(ou,Yu)}while(0);return cv=w,eu(cv),void(l=nea);case 41:return dv=Uu,(ev=0!=(0|dv))?(gv=w,hv=x,iv=hv,jv=0|mu(gv,iv),Sda=jv,kv=w,lv=w,mv=lv+172|0,nv=0|f[mv>>2],ov=511&nv,pv=ov<<23,rv=9|pv,sv=Sda,tv=65535&sv,uv=tv<<7,vv=rv|uv,0|du(kv,vv),wv=w,eu(wv),void(l=nea)):void(l=nea);case 42:return xv=Uu,(yv=0!=(0|xv))?(zv=w,Av=x,Cv=Av,Dv=0|mu(zv,Cv),Tda=Dv,Ev=w,Fv=w,Gv=Fv+172|0,Hv=0|f[Gv>>2],Iv=511&Hv,Jv=Iv<<23,Kv=13|Jv,Lv=Tda,Nv=65535&Lv,Ov=Nv<<7,Pv=Kv|Ov,0|du(Ev,Pv),Qv=w,eu(Qv),void(l=nea)):void(l=nea);case 44:return Rv=Uu,(Sv=0!=(0|Rv))?(Tv=w,Uv=x,Vv=Uv,Wv=0|mu(Tv,Vv),Uda=Wv,Yv=w,Zv=w,$v=Zv+172|0,_v=0|f[$v>>2],aw=511&_v,bw=aw<<23,cw=15|bw,dw=Uda,fw=65535&dw,gw=fw<<7,iw=cw|gw,0|du(Yv,iw),jw=w,eu(jw),void(l=nea)):void(l=nea);case 43:return kw=w,lw=x,mw=lw,nw=0|mu(kw,mw),Vda=nw,ow=w,pw=w,qw=pw+172|0,rw=0|f[qw>>2],tw=511&rw,uw=tw<<23,vw=17|uw,ww=Vda,xw=65535&ww,yw=xw<<7,zw=vw|yw,0|du(ow,zw),Aw=Uu,(Bw=0!=(0|Aw))?(Cw=w,eu(Cw),void(l=nea)):void(l=nea);case 89:return Ew=w,Fw=x,cu(Ew,Fw,1),void(l=nea);case 46:return Gw=Uu,(Hw=0!=(0|Gw))?(d[Iba>>0]=0|d[69583],d[Iba+1>>0]=0|d[69584],Iw=x,Jw=Iw,Kw=255&Jw,Lw=Iba+1|0,d[Lw>>0]=Kw,Mw=w,Nw=0|f[Mw>>2],ng(yP,Nw,Iba,2),f[Jda>>2]=0|f[yP>>2],f[Jda+4>>2]=0|f[yP+4>>2],Pw=w,Qw=w,Rw=0|f[Qw>>2],f[Kda>>2]=0|f[Jda>>2],f[Kda+4>>2]=0|f[Jda+4>>2],Sw=0|mi(Rw,Kda),Tw=0|mu(Pw,Sw),Wda=Tw,Uw=w,Vw=w,Ww=Vw+172|0,Xw=0|f[Ww>>2],Yw=511&Xw,_w=Yw<<23,ax=9|_w,bx=Wda,cx=65535&bx,dx=cx<<7,ex=ax|dx,0|du(Uw,ex),fx=w,eu(fx),void(l=nea)):void(l=nea);case 45:return gx=Uu,(hx=0!=(0|gx))?(ix=w,kx=0|f[ix>>2],tca=kx,lx=x,mx=lx,Fu(Uba,mx),nx=tca,lg(Lda,nx,4),ox=tca,f[Mda>>2]=0|f[Lda>>2],f[Mda+4>>2]=0|f[Lda+4>>2],dh(c_,ox,Mda,69583,1),px=tca,qx=tca,f[Vba>>2]=0|f[Uba>>2],f[Vba+4>>2]=0|f[Uba+4>>2],pe(f1,qx,Vba,10),f[Nda>>2]=0|f[Lda>>2],f[Nda+4>>2]=0|f[Lda+4>>2],f[g>>2]=0|f[f1>>2],f[g+4>>2]=0|f[f1+4>>2],gh(i3,px,Nda,g),rx=w,sx=tca,f[Oda>>2]=0|f[Lda>>2],f[Oda+4>>2]=0|f[Lda+4>>2],tx=0|mi(sx,Oda),vx=0|mu(rx,tx),Xda=vx,wx=w,xx=w,yx=xx+172|0,zx=0|f[yx>>2],Ax=511&zx,Bx=Ax<<23,Cx=9|Bx,Dx=Xda,Ex=65535&Dx,Gx=Ex<<7,Hx=Cx|Gx,0|du(wx,Hx),Ix=w,eu(Ix),void(l=nea)):void(l=nea);case 91:return b$=w,c$=x,cu(b$,c$,0),void(l=nea);case 69:return Jx=w,Kx=x,cu(Jx,Kx,1),void(l=nea);case 50:return Lx=Uu,(Mx=0!=(0|Lx))?(Nx=x,Ox=0|f[Nx>>2],jda=Ox,Px=x,Rx=Px+4|0,Sx=0|f[Rx>>2],Tx=0|f[Sx>>2],Ux=Tx,Gba=Ux,Vx=w,Wx=jda,Xx=Gba,Yx=0|Gu(Vx,Wx,Xx,0,cda),Xba=Yx,Zx=0|d[cda>>0],$x=Zx<<24>>24!=0,$x?(ay=w,by=jda,cy=Gba,dy=+Hu(ay,by,cy),Qba=dy,ey=w,fy=w,gy=0|f[fy>>2],hy=Qba,iy=hy,Iu(l5,gy,iy),f[h>>2]=0|f[l5>>2],f[h+4>>2]=0|f[l5+4>>2],jy=0|xu(ey,h),Oca=jy,ly=w,my=w,ny=my+172|0,oy=0|f[ny>>2],py=511&oy,qy=py<<23,ry=2|qy,sy=Oca,ty=65535&sy,uy=ty<<7,wy=ry|uy,0|du(ly,wy)):(xy=Xba,yy=(0|xy)<32767,zy=Xba,Ay=(0|zy)>-32767,_ca=yy&Ay,By=w,_ca?(Cy=By+172|0,Dy=0|f[Cy>>2],Ey=511&Dy,Fy=Ey<<23,Hy=3|Fy,Iy=Xba,Jy=Iy+32767|0,Ky=65535&Jy,Ly=Ky<<7,My=Hy|Ly,Kba=My):(Ny=Xba,Fu(o7,Ny),f[i>>2]=0|f[o7>>2],f[i+4>>2]=0|f[o7+4>>2],Oy=0|xu(By,i),Pca=Oy,Py=w,Qy=Py+172|0,Sy=0|f[Qy>>2],Ty=511&Sy,Uy=Ty<<23,Vy=2|Uy,Wy=Pca,Xy=65535&Wy,Yy=Xy<<7,Zy=Vy|Yy,Kba=Zy),$y=w,_y=Kba,0|du($y,_y)),cz=w,eu(cz),void(l=nea)):void(l=nea);case 51:return dz=Uu,(ez=0!=(0|dz))?(fz=x,kda=fz,gz=kda,hz=+ew(gz,0),Rba=hz,iz=w,jz=w,kz=0|f[jz>>2],lz=Rba,Iu(r9,kz,lz),f[j>>2]=0|f[r9>>2],f[j+4>>2]=0|f[r9+4>>2],nz=0|xu(iz,j),Qca=nz,oz=w,pz=w,qz=pz+172|0,rz=0|f[qz>>2],sz=511&rz,tz=sz<<23,uz=2|tz,vz=Qca,wz=65535&vz,yz=wz<<7,zz=uz|yz,0|du(oz,zz),Az=w,eu(Az),void(l=nea)):void(l=nea);case 52:switch(Bz=x,Cz=0|f[Bz>>2],Dz=Cz,Mca=Dz,Ez=x,Fz=Ez+4|0,Gz=0|f[Fz>>2],x=Gz,Hz=Mca,0|Hz){case 51:return Jz=x,lda=Jz,Kz=lda,Lz=+ew(Kz,0),Sba=Lz,Mz=w,Nz=w,Oz=0|f[Nz>>2],Pz=Sba,Qz=-Pz,Iu(y,Oz,Qz),f[k>>2]=0|f[y>>2],f[k+4>>2]=0|f[y+4>>2],Rz=0|xu(Mz,k),Rca=Rz,Sz=w,Uz=w,Vz=Uz+172|0,Wz=0|f[Vz>>2],Xz=511&Wz,Yz=Xz<<23,Zz=2|Yz,$z=Rca,_z=65535&$z,aA=_z<<7,bA=Zz|aA,0|du(Sz,bA),dA=w,eu(dA),void(l=nea);case 50:return eA=x,fA=0|f[eA>>2],mda=fA,gA=x,hA=gA+4|0,iA=0|f[hA>>2],jA=0|f[iA>>2],kA=jA,Hba=kA,lA=w,mA=mda,oA=Hba,pA=0|Gu(lA,mA,oA,1,dda),Yba=pA,qA=0|d[dda>>0],rA=qA<<24>>24!=0,rA?(sA=w,tA=mda,uA=Hba,vA=+Hu(sA,tA,uA),Tba=vA,wA=w,xA=w,zA=0|f[xA>>2],AA=Tba,BA=-AA,CA=BA,Iu(Cb,zA,CA),f[n>>2]=0|f[Cb>>2],f[n+4>>2]=0|f[Cb+4>>2],DA=0|xu(wA,n),Sca=DA,EA=w,FA=w,GA=FA+172|0,HA=0|f[GA>>2],IA=511&HA,KA=IA<<23,LA=2|KA,MA=Sca,NA=65535&MA,OA=NA<<7,PA=LA|OA,0|du(EA,PA)):(QA=Yba,RA=(0|QA)<32767,SA=Yba,TA=(0|SA)>-32767,ada=RA&TA,VA=w,ada?(WA=VA+172|0,XA=0|f[WA>>2],YA=511&XA,ZA=YA<<23,$A=3|ZA,_A=Yba,aB=_A+32767|0,bB=65535&aB,cB=bB<<7,fB=$A|cB,Lba=fB):(gB=Yba,Fu(Hd,gB),f[o>>2]=0|f[Hd>>2],f[o+4>>2]=0|f[Hd+4>>2],hB=0|xu(VA,o),Tca=hB,iB=w,jB=iB+172|0,kB=0|f[jB>>2],lB=511&kB,mB=lB<<23,nB=2|mB,oB=Tca,qB=65535&oB,rB=qB<<7,sB=nB|rB,Lba=sB),tB=w,uB=Lba,0|du(tB,uB)),vB=w,eu(vB),void(l=nea);default:return wB=w,xB=w,yB=0|f[xB>>2],zB=0|ki(yB,69609,1),BB=0|ju(wB,zB),Yda=BB,CB=w,DB=w,EB=DB+172|0,FB=0|f[EB>>2],GB=511&FB,HB=GB<<23,IB=3|HB,0|du(CB,IB),JB=w,eu(JB),KB=w,MB=x,cu(KB,MB,1),NB=w,OB=NB+172|0,PB=0|f[OB>>2],QB=PB+-1|0,f[OB>>2]=QB,RB=w,SB=RB+172|0,TB=0|f[SB>>2],UB=TB+-1|0,f[SB>>2]=UB,VB=w,XB=w,YB=XB+172|0,ZB=0|f[YB>>2],$B=511&ZB,_B=$B<<23,aC=46|_B,bC=Yda,cC=511&bC,dC=cC<<14,eC=aC|dC,gC=256|eC,0|du(VB,gC),void(l=nea)}break;case 55:return hC=Uu,(iC=0!=(0|hC))?(jC=x,kC=0|f[jC>>2],nda=kC,lC=x,mC=lC+4|0,nC=0|f[mC>>2],oC=nC,kca=oC,pC=w,rC=0|f[pC>>2],sC=0|Wc(rC),vba=sC,tC=w,uC=w,vC=0|f[uC>>2],wC=nda,xC=kca,ng(Mf,vC,wC,xC),f[p>>2]=0|f[Mf>>2],f[p+4>>2]=0|f[Mf+4>>2],yC=0|xu(tC,p),Uca=yC,zC=w,AC=0|f[zC>>2],CC=vba,Xc(AC,CC),DC=w,EC=w,FC=EC+172|0,GC=0|f[FC>>2],HC=511&GC,IC=HC<<23,JC=61|IC,KC=Uca,LC=65535&KC,NC=LC<<7,OC=JC|NC,0|du(DC,OC),PC=w,eu(PC),void(l=nea)):void(l=nea);case 99:QC=x,RC=QC+16|0,SC=0|f[RC>>2],x=SC;break;case 56:break;case 101:return _D=w,aE=x,bE=Uu,Ju(_D,aE,0,bE),void(l=nea);case 102:return cE=w,dE=x,eE=Uu,Ju(cE,dE,1,eE),void(l=nea);case 58:for(fE=w,gE=0|f[fE>>2],hE=0|Wc(gE),
+wba=hE,jE=w,kE=w,lE=0|f[kE>>2],mE=0|ki(lE,69618,6),nE=0|mu(jE,mE),Zda=nE,oE=Uu,pE=0==(0|oE),pE&&(qE=w,eu(qE)),rE=w,sE=w,uE=sE+172|0,vE=0|f[uE>>2],wE=511&vE,xE=wE<<23,yE=66|xE,0|du(rE,yE),zE=w,AE=w,BE=AE+172|0,CE=0|f[BE>>2],DE=511&CE,FE=DE<<23,GE=19|FE,HE=Zda,IE=65535&HE,JE=IE<<7,KE=GE|JE,0|du(zE,KE),LE=w,eu(LE),ME=w,NE=x,OE=0|f[NE>>2],cu(ME,OE,1),QE=x,RE=QE+4|0,SE=0|f[RE>>2],Gca=SE;;){if(TE=Gca,UE=0!=(0|TE),!UE)break;VE=Gca,WE=0|f[VE>>2],XE=0|f[WE>>2],YE=XE,ZE=57==(0|YE),ZE&&(_E=Gca,aF=0|f[_E>>2],f[aF>>2]=55),bF=w,cF=Gca,dF=0|f[cF>>2],cu(bF,dF,1),eF=w,fF=eF+172|0,gF=0|f[fF>>2],hF=gF+-1|0,f[fF>>2]=hF,iF=w,lF=iF+172|0,mF=0|f[lF>>2],nF=mF+-1|0,f[lF>>2]=nF,oF=w,pF=w,qF=pF+172|0,rF=0|f[qF>>2],sF=511&rF,tF=sF<<23,uF=62|tF,wF=w,xF=wF+172|0,yF=0|f[xF>>2],zF=yF+1|0,AF=511&zF,BF=AF<<14,CF=uF|BF,0|nu(oF,CF,1),DF=w,eu(DF),EF=Gca,FF=EF+4|0,HF=0|f[FF>>2],Gca=HF}return IF=w,JF=IF+172|0,KF=0|f[JF>>2],LF=KF+-1|0,f[JF>>2]=LF,MF=w,NF=MF+172|0,OF=0|f[NF>>2],PF=OF+-1|0,f[NF>>2]=PF,QF=w,SF=w,TF=0|f[SF>>2],UF=0|ki(TF,69625,1),VF=0|mu(QF,UF),Zda=VF,WF=w,XF=w,YF=XF+172|0,ZF=0|f[YF>>2],$F=511&ZF,_F=$F<<23,bG=32|_F,cG=Zda,dG=511&cG,eG=dG<<14,fG=bG|eG,gG=128|fG,0|du(WF,gG),hG=Uu,iG=0==(0|hG),jG=w,iG?(kG=jG+172|0,mG=0|f[kG>>2],nG=mG+-1|0,f[kG>>2]=nG):eu(jG),oG=w,pG=0|f[oG>>2],qG=wba,Xc(pG,qG),void(l=nea);case 57:return rG=x,sG=0|f[rG>>2],oda=sG,tG=x,uG=tG+4|0,vG=0|f[uG>>2],xG=vG,lca=xG,yG=w,zG=0|f[yG>>2],AG=0|Wc(zG),xba=AG,BG=w,CG=w,DG=0|f[CG>>2],EG=0|ki(DG,69618,6),FG=0|mu(BG,EG),$da=FG,GG=w,IG=w,JG=0|f[IG>>2],KG=oda,LG=lca,ng(Uh,JG,KG,LG),f[q>>2]=0|f[Uh>>2],f[q+4>>2]=0|f[Uh+4>>2],MG=0|xu(GG,q),Vca=MG,NG=Uu,OG=0==(0|NG),OG&&(PG=w,eu(PG)),QG=w,RG=w,TG=RG+172|0,UG=0|f[TG>>2],VG=511&UG,WG=VG<<23,XG=66|WG,0|du(QG,XG),YG=w,ZG=w,$G=ZG+172|0,_G=0|f[$G>>2],aH=511&_G,cH=aH<<23,dH=19|cH,eH=$da,fH=65535&eH,gH=fH<<7,hH=dH|gH,0|du(YG,hH),iH=w,eu(iH),jH=w,kH=w,lH=kH+172|0,oH=0|f[lH>>2],pH=511&oH,qH=pH<<23,rH=61|qH,sH=Vca,tH=65535&sH,uH=tH<<7,vH=rH|uH,0|du(jH,vH),wH=w,xH=wH+172|0,zH=0|f[xH>>2],AH=zH+-1|0,f[xH>>2]=AH,BH=w,CH=w,DH=0|f[CH>>2],EH=0|ki(DH,69625,1),FH=0|mu(BH,EH),$da=FH,GH=w,HH=w,IH=HH+172|0,KH=0|f[IH>>2],LH=511&KH,MH=LH<<23,NH=32|MH,OH=$da,PH=511&OH,QH=PH<<14,RH=NH|QH,SH=128|RH,0|du(GH,SH),TH=Uu,VH=0==(0|TH),WH=w,VH?(XH=WH+172|0,YH=0|f[XH>>2],ZH=YH+-1|0,f[XH>>2]=ZH):eu(WH),$H=w,_H=0|f[$H>>2],aI=xba,Xc(_H,aI),void(l=nea);case 59:return bI=Uu,(cI=0!=(0|bI))?(eI=x,fI=0|f[eI>>2],fda=fI,gI=x,hI=gI+4|0,iI=0|f[hI>>2],jI=0|f[iI>>2],gda=jI,kI=x,lI=kI+4|0,mI=0|f[lI>>2],nI=mI+4|0,pI=0|f[nI>>2],ida=pI,qI=w,rI=0|f[qI>>2],sI=0|Wc(rI),yba=sI,tI=w,uI=w,vI=0|f[uI>>2],wI=0|ki(vI,69627,6),xI=0|mu(tI,wI),_da=xI,yI=w,AI=w,BI=0|f[AI>>2],CI=fda,qg($j,BI,CI),f[r>>2]=0|f[$j>>2],f[r+4>>2]=0|f[$j+4>>2],DI=0|xu(yI,r),Wca=DI,Cba=1,EI=w,FI=w,GI=FI+172|0,HI=0|f[GI>>2],II=511&HI,JI=II<<23,LI=66|JI,0|du(EI,LI),MI=w,NI=w,OI=NI+172|0,PI=0|f[OI>>2],QI=511&PI,RI=QI<<23,SI=19|RI,TI=_da,UI=65535&TI,WI=UI<<7,XI=SI|WI,0|du(MI,XI),YI=w,eu(YI),ZI=w,$I=w,_I=$I+172|0,aJ=0|f[_I>>2],bJ=511&aJ,cJ=bJ<<23,dJ=61|cJ,fJ=Wca,gJ=65535&fJ,hJ=gJ<<7,iJ=dJ|hJ,0|du(ZI,iJ),jJ=gda,kJ=0!=(0|jJ),lJ=ida,mJ=0!=(0|lJ),bda=kJ|mJ,bda&&(nJ=w,eu(nJ),oJ=gda,rJ=0!=(0|oJ),sJ=w,tJ=w,rJ?(uJ=0|f[tJ>>2],vJ=gda,qg(bm,uJ,vJ),f[s>>2]=0|f[bm>>2],f[s+4>>2]=0|f[bm+4>>2],wJ=0|xu(sJ,s),Wca=wJ,xJ=w,yJ=w,zJ=yJ+172|0,AJ=0|f[zJ>>2],CJ=511&AJ,DJ=CJ<<23,EJ=61|DJ,FJ=Wca,GJ=65535&FJ,HJ=GJ<<7,IJ=EJ|HJ,0|du(xJ,IJ)):(JJ=tJ+172|0,KJ=0|f[JJ>>2],LJ=511&KJ,NJ=LJ<<23,OJ=5|NJ,0|du(sJ,OJ)),PJ=Cba,QJ=PJ+1|0,Cba=QJ,RJ=ida,SJ=0!=(0|RJ),SJ&&(TJ=w,eu(TJ),UJ=w,VJ=w,WJ=0|f[VJ>>2],YJ=ida,ng(ho,WJ,YJ,1),f[t>>2]=0|f[ho>>2],f[t+4>>2]=0|f[ho+4>>2],ZJ=0|xu(UJ,t),Wca=ZJ,$J=w,_J=w,aK=_J+172|0,bK=0|f[aK>>2],cK=511&bK,dK=cK<<23,eK=61|dK,fK=Wca,hK=65535&fK,iK=hK<<7,jK=eK|iK,0|du($J,jK),kK=Cba,lK=kK+1|0,Cba=lK,mK=w,nK=mK+172|0,oK=0|f[nK>>2],pK=oK+-1|0,f[nK>>2]=pK),qK=w,sK=qK+172|0,tK=0|f[sK>>2],uK=tK+-1|0,f[sK>>2]=uK),vK=w,wK=vK+172|0,xK=0|f[wK>>2],yK=xK+-1|0,f[wK>>2]=yK,zK=w,AK=w,BK=0|f[AK>>2],DK=0|ki(BK,69634,7),EK=0|mu(zK,DK),_da=EK,FK=w,GK=w,HK=GK+172|0,IK=0|f[HK>>2],JK=511&IK,KK=JK<<23,LK=32|KK,MK=_da,OK=511&MK,PK=OK<<14,QK=LK|PK,RK=Cba,SK=127&RK,TK=SK<<7,UK=QK|TK,0|du(FK,UK),VK=w,WK=0|f[VK>>2],XK=yba,Xc(WK,XK),ZK=w,eu(ZK),void(l=nea)):void(l=nea);case 60:if($K=Uu,_K=0!=(0|$K),aL=x,bL=0|f[aL>>2],!_K){for(Ica=bL;;){if(CO=Ica,DO=0!=(0|CO),!DO)break;EO=Ica,FO=0|f[EO>>2],GO=0|f[FO>>2],HO=GO,JO=55!=(0|HO),JO&&(KO=w,LO=Ica,MO=0|f[LO>>2],cu(KO,MO,0)),NO=Ica,OO=NO+4|0,PO=0|f[OO>>2],Ica=PO}return void(l=nea)}for(Hca=bL,cL=w,dL=0|f[cL>>2],eL=0|Wc(dL),zba=eL,fL=w,gL=w,iL=0|f[gL>>2],jL=0|ki(iL,69627,6),kL=0|mu(fL,jL),aea=kL,Dba=1,lL=w,mL=w,nL=mL+172|0,oL=0|f[nL>>2],pL=511&oL,qL=pL<<23,rL=66|qL,0|du(lL,rL),uL=w,vL=w,wL=vL+172|0,xL=0|f[wL>>2],yL=511&xL,zL=yL<<23,AL=19|zL,BL=aea,CL=65535&BL,DL=CL<<7,FL=AL|DL,0|du(uL,FL),GL=w,eu(GL),HL=w,IL=Hca,JL=0|f[IL>>2],cu(HL,JL,1),KL=Hca,LL=KL+4|0,ML=0|f[LL>>2],Hca=ML;;){if(NL=Hca,OL=0!=(0|NL),!OL)break;QL=w,RL=Hca,SL=0|f[RL>>2],cu(QL,SL,1),TL=w,UL=TL+172|0,VL=0|f[UL>>2],WL=VL+-1|0,f[UL>>2]=WL,XL=w,YL=XL+172|0,ZL=0|f[YL>>2],_L=ZL+-1|0,f[YL>>2]=_L,aM=w,bM=w,cM=bM+172|0,dM=0|f[cM>>2],eM=511&dM,fM=eM<<23,gM=62|fM,hM=w,iM=hM+172|0,kM=0|f[iM>>2],lM=kM+1|0,mM=511&lM,nM=mM<<14,oM=gM|nM,0|nu(aM,oM,1),pM=w,eu(pM),qM=Hca,rM=qM+4|0,sM=0|f[rM>>2],Hca=sM}return tM=x,vM=tM+4|0,wM=0|f[vM>>2],xM=wM+4|0,yM=0|f[xM>>2],Hca=yM,zM=Hca,AM=0|f[zM>>2],BM=0!=(0|AM),BM&&(CM=Hca,DM=0|f[CM>>2],pda=DM,EM=w,GM=w,HM=0|f[GM>>2],IM=pda,qg(kq,HM,IM),f[u>>2]=0|f[kq>>2],f[u+4>>2]=0|f[kq+4>>2],JM=0|xu(EM,u),Xca=JM,KM=w,LM=x,MM=0|f[LM>>2],cu(KM,MM,1),NM=w,OM=w,PM=OM+172|0,RM=0|f[PM>>2],SM=511&RM,TM=SM<<23,UM=61|TM,VM=Xca,WM=65535&VM,XM=WM<<7,YM=UM|XM,0|du(NM,YM),ZM=w,$M=ZM+172|0,aN=0|f[$M>>2],bN=aN+-1|0,f[$M>>2]=bN,cN=w,dN=w,eN=dN+172|0,fN=0|f[eN>>2],gN=511&fN,hN=gN<<23,iN=62|hN,jN=w,lN=jN+172|0,mN=0|f[lN>>2],nN=mN+1|0,oN=511&nN,pN=oN<<14,qN=iN|pN,0|nu(cN,qN,1)),rN=Hca,sN=rN+4|0,tN=0|f[sN>>2],uN=0!=(0|tN),uN&&(xN=Hca,yN=xN+4|0,zN=0|f[yN>>2],hda=zN,AN=w,eu(AN),BN=w,CN=w,DN=0|f[CN>>2],EN=hda,qg(os,DN,EN),f[v>>2]=0|f[os>>2],f[v+4>>2]=0|f[os+4>>2],FN=0|xu(BN,v),Xca=FN,GN=w,IN=w,JN=IN+172|0,KN=0|f[JN>>2],LN=511&KN,MN=LN<<23,NN=61|MN,ON=Xca,PN=65535&ON,QN=PN<<7,RN=NN|QN,0|du(GN,RN),TN=Dba,UN=TN+1|0,Dba=UN,VN=w,WN=VN+172|0,XN=0|f[WN>>2],YN=XN+-1|0,f[WN>>2]=YN),ZN=w,$N=ZN+172|0,_N=0|f[$N>>2],aO=_N+-1|0,f[$N>>2]=aO,cO=w,dO=w,eO=0|f[dO>>2],fO=0|ki(eO,69634,7),gO=0|mu(cO,fO),aea=gO,hO=w,iO=w,jO=iO+172|0,kO=0|f[jO>>2],lO=511&kO,nO=lO<<23,oO=32|nO,pO=aea,qO=511&pO,rO=qO<<14,sO=oO|rO,tO=Dba,uO=127&tO,vO=uO<<7,wO=sO|vO,0|du(hO,wO),yO=w,zO=0|f[yO>>2],AO=zba,Xc(zO,AO),BO=w,eu(BO),void(l=nea);case 54:return QO=Uu,(RO=0!=(0|QO))?(SO=w,UO=x,VO=UO,WO=0|mu(SO,VO),bea=WO,XO=w,YO=w,ZO=YO+172|0,$O=0|f[ZO>>2],_O=511&$O,aP=_O<<23,bP=4|aP,dP=bea,eP=65535&dP,fP=eP<<7,gP=bP|fP,0|du(XO,gP),hP=w,eu(hP),void(l=nea)):void(l=nea);case 97:return iP=w,jP=x,kP=Uu,cu(iP,jP,kP),lP=Uu,(mP=0!=(0|lP))?(oP=w,Ku(oP),void(l=nea)):void(l=nea);case 85:return pP=Uu,(qP=0!=(0|pP))?(rP=w,sP=w,tP=sP+172|0,uP=0|f[tP>>2],vP=511&uP,wP=vP<<23,xP=6|wP,0|du(rP,xP),BP=w,eu(BP),void(l=nea)):void(l=nea);case 86:return CP=Uu,(DP=0!=(0|CP))?(EP=w,FP=w,GP=FP+172|0,HP=0|f[GP>>2],IP=511&HP,JP=IP<<23,KP=5|JP,0|du(EP,KP),MP=w,eu(MP),void(l=nea)):void(l=nea);case 87:return NP=Uu,(OP=0!=(0|NP))?(PP=w,QP=w,RP=QP+172|0,SP=0|f[RP>>2],TP=511&SP,UP=TP<<23,VP=7|UP,0|du(PP,VP),XP=w,eu(XP),void(l=nea)):void(l=nea);case 88:return YP=Uu,(ZP=0!=(0|YP))?($P=w,_P=w,aQ=_P+172|0,bQ=0|f[aQ>>2],cQ=511&bQ,dQ=cQ<<23,eQ=8|dQ,0|du($P,eQ),gQ=w,eu(gQ),void(l=nea)):void(l=nea);case 72:return hQ=w,iQ=x,jQ=0|f[iQ>>2],kQ=jQ,lQ=0|ju(hQ,kQ),uba=lQ,mQ=w,nQ=x,oQ=nQ+4|0,pQ=0|f[oQ>>2],rQ=pQ,sQ=0|ju(mQ,rQ),Fba=sQ,tQ=w,uQ=w,vQ=0|f[uQ>>2],wQ=0|ki(vQ,69642,12),xQ=0|ju(tQ,wQ),Jba=xQ,yQ=w,zQ=w,AQ=zQ+172|0,CQ=0|f[AQ>>2],DQ=511&CQ,EQ=DQ<<23,FQ=72|EQ,0|du(yQ,FQ),GQ=w,eu(GQ),HQ=w,IQ=w,JQ=IQ+172|0,KQ=0|f[JQ>>2],LQ=511&KQ,NQ=LQ<<23,OQ=4|NQ,PQ=uba,QQ=65535&PQ,RQ=QQ<<7,SQ=OQ|RQ,0|du(HQ,SQ),TQ=w,eu(TQ),UQ=w,VQ=w,WQ=VQ+172|0,YQ=0|f[WQ>>2],ZQ=511&YQ,$Q=ZQ<<23,_Q=4|$Q,aR=Fba,bR=65535&aR,cR=bR<<7,dR=_Q|cR,0|du(UQ,dR),eR=w,eu(eR),fR=w,hR=w,iR=hR+172|0,jR=0|f[iR>>2],kR=511&jR,lR=kR<<23,mR=5|lR,0|du(fR,mR),nR=w,oR=nR+172|0,pR=0|f[oR>>2],qR=pR-3|0,f[oR>>2]=qR,sR=w,tR=w,uR=tR+172|0,vR=0|f[uR>>2],wR=511&vR,xR=wR<<23,yR=32|xR,zR=Jba,AR=511&zR,BR=AR<<14,ER=yR|BR,FR=256|ER,0|du(sR,FR),GR=Uu,(HR=0!=(0|GR))?(IR=w,eu(IR),void(l=nea)):void(l=nea);case 73:for(JR=w,KR=w,LR=0|f[KR>>2],MR=0|ki(LR,69655,12),NR=0|ju(JR,MR),jea=NR,Nca=0,PR=x,gea=PR,QR=w,RR=w,SR=RR+172|0,TR=0|f[SR>>2],UR=511&TR,VR=UR<<23,WR=72|VR,0|du(QR,WR),XR=w,eu(XR);;){if(YR=gea,$R=0!=(0|YR),!$R)break;_R=w,aS=gea,bS=0|f[aS>>2],cS=bS,dS=0|ju(_R,cS),eea=dS,eS=w,fS=w,gS=fS+172|0,hS=0|f[gS>>2],jS=511&hS,kS=jS<<23,lS=4|kS,mS=eea,nS=65535&mS,oS=nS<<7,pS=lS|oS,0|du(eS,pS),qS=w,eu(qS),rS=gea,sS=rS+4|0,uS=0|f[sS>>2],gea=uS,vS=Nca,wS=vS+1|0,Nca=wS}return xS=Nca,yS=xS+1|0,zS=w,AS=zS+172|0,BS=0|f[AS>>2],CS=BS-yS|0,f[AS>>2]=CS,DS=w,FS=w,GS=FS+172|0,HS=0|f[GS>>2],IS=511&HS,JS=IS<<23,KS=32|JS,LS=jea,MS=511&LS,NS=MS<<14,OS=KS|NS,QS=Nca,RS=127&QS,SS=RS<<7,TS=OS|SS,0|du(DS,TS),US=Uu,(VS=0!=(0|US))?(WS=w,eu(WS),void(l=nea)):void(l=nea);case 74:XS=x,YS=0|f[XS>>2],ZS=0|f[YS>>2],_S=0==(0|ZS);do{if(!_S){if(iT=x,kT=0|f[iT>>2],lT=0|f[kT>>2],mT=1==(0|lT),nT=w,mT){oT=w,pT=oT+172|0,qT=0|f[pT>>2],rT=511&qT,sT=rT<<23,tT=66|sT,0|du(nT,tT),vT=w,eu(vT);break}wT=x,xT=0|f[wT>>2],yT=0|f[xT>>2],cu(nT,yT,1);break}aT=w,bT=w,cT=bT+172|0,dT=0|f[cT>>2],eT=511&dT,fT=eT<<23,gT=5|fT,0|du(aT,gT),hT=w,eu(hT)}while(0);return zT=x,AT=zT+4|0,BT=0|f[AT>>2],CT=0|f[BT>>2],DT=0!=(0|CT),ET=w,DT?(HT=x,IT=HT+4|0,JT=0|f[IT>>2],KT=0|f[JT>>2],cu(ET,KT,1)):(LT=w,MT=LT+172|0,NT=0|f[MT>>2],OT=511&NT,PT=OT<<23,QT=5|PT,0|du(ET,QT),ST=w,eu(ST)),TT=w,UT=TT+172|0,VT=0|f[UT>>2],WT=VT+-1|0,f[UT>>2]=WT,XT=w,YT=XT+172|0,ZT=0|f[YT>>2],$T=ZT+-1|0,f[YT>>2]=$T,_T=w,bU=x,cU=0|f[bU>>2],dU=cU+4|0,eU=0|f[dU>>2],fU=eU,gU=0|ju(_T,fU),cca=gU,hU=w,iU=w,jU=iU+172|0,kU=0|f[jU>>2],mU=511&kU,nU=mU<<23,oU=67|nU,pU=cca,qU=511&pU,rU=qU<<14,sU=oU|rU,0|du(hU,sU),tU=w,uU=x,vU=uU+4|0,xU=0|f[vU>>2],yU=xU+4|0,zU=0|f[yU>>2],AU=0|f[zU>>2],BU=Uu,CU=0|vu(tU,AU,BU),cca=CU,DU=w,EU=w,FU=EU+172|0,GU=0|f[FU>>2],IU=511&GU,JU=IU<<23,KU=69|JU,LU=cca,MU=65535&LU,NU=MU<<7,OU=KU|NU,0|du(DU,OU),PU=Uu,(QU=0!=(0|PU))?(RU=w,eu(RU),void(l=nea)):void(l=nea);case 75:TU=x,UU=0|f[TU>>2],VU=0|f[UU>>2],WU=0==(0|VU);do{if(!WU){if(eV=x,fV=0|f[eV>>2],gV=0|f[fV>>2],hV=1==(0|gV),iV=w,hV){jV=w,kV=jV+172|0,lV=0|f[kV>>2],nV=511&lV,oV=nV<<23,pV=66|oV,0|du(iV,pV),qV=w,eu(qV);break}rV=x,sV=0|f[rV>>2],tV=0|f[sV>>2],cu(iV,tV,1);break}XU=w,YU=w,ZU=YU+172|0,$U=0|f[ZU>>2],_U=511&$U,aV=_U<<23,cV=5|aV,0|du(XU,cV),dV=w,eu(dV)}while(0);return uV=w,vV=uV+172|0,wV=0|f[vV>>2],yV=wV+-1|0,f[vV>>2]=yV,zV=w,AV=x,BV=0|f[AV>>2],CV=BV+4|0,DV=0|f[CV>>2],EV=DV,FV=0|ju(zV,EV),dca=FV,GV=w,HV=w,KV=HV+172|0,LV=0|f[KV>>2],MV=511&LV,NV=MV<<23,OV=68|NV,PV=dca,QV=511&PV,RV=QV<<14,SV=OV|RV,0|du(GV,SV),TV=w,VV=x,WV=VV+4|0,XV=0|f[WV>>2],YV=0|f[XV>>2],ZV=Uu,$V=0|vu(TV,YV,ZV),dca=$V,_V=w,aW=w,bW=aW+172|0,cW=0|f[bW>>2],eW=511&cW,fW=eW<<23,gW=69|fW,hW=dca,iW=65535&hW,jW=iW<<7,kW=gW|jW,0|du(_V,kW),lW=Uu,(mW=0!=(0|lW))?(nW=w,eu(nW),void(l=nea)):void(l=nea);case 76:return pW=w,qW=x,rW=0|f[qW>>2],cu(pW,rW,1),sW=w,tW=sW+172|0,uW=0|f[tW>>2],vW=uW+-1|0,f[tW>>2]=vW,wW=w,xW=w,yW=xW+172|0,AW=0|f[yW>>2],BW=511&AW,CW=BW<<23,DW=71|CW,EW=w,FW=EW+172|0,GW=0|f[FW>>2],HW=511&GW,IW=HW<<14,JW=DW|IW,0|du(wW,JW),LW=w,MW=x,NW=MW+4|0,OW=0|f[NW>>2],PW=0|f[OW>>2],QW=Uu,RW=0|vu(LW,PW,QW),eca=RW,SW=w,TW=w,UW=TW+172|0,WW=0|f[UW>>2],XW=511&WW,YW=XW<<23,ZW=69|YW,$W=eca,_W=65535&$W,aX=_W<<7,bX=ZW|aX,0|du(SW,bX),cX=Uu,(dX=0!=(0|cX))?(fX=w,eu(fX),void(l=nea)):void(l=nea);case 70:return gX=w,hX=x,iX=0|f[hX>>2],jX=iX,kX=0|ju(gX,jX),cea=kX,lX=w,mX=x,nX=mX+4|0,oX=0|f[nX>>2],qX=0|Au(lX,oX,0),fca=qX,rX=w,sX=w,tX=sX+172|0,uX=0|f[tX>>2],vX=511&uX,wX=vX<<23,xX=72|wX,0|du(rX,xX),yX=w,eu(yX),zX=w,BX=w,CX=BX+172|0,DX=0|f[CX>>2],EX=511&DX,FX=EX<<23,GX=64|FX,HX=fca,IX=16383&HX,JX=IX<<9,KX=128|JX,NX=GX|KX,0|du(zX,NX),OX=w,eu(OX),PX=w,QX=PX+172|0,RX=0|f[QX>>2],SX=RX+-1|0,f[QX>>2]=SX,TX=w,UX=TX+172|0,VX=0|f[UX>>2],WX=VX+-1|0,f[UX>>2]=WX,YX=w,ZX=w,$X=ZX+172|0,_X=0|f[$X>>2],aY=511&_X,bY=aY<<23,cY=70|bY,dY=cea,eY=511&dY,fY=eY<<14,hY=cY|fY,0|du(YX,hY),iY=Uu,(jY=0!=(0|iY))?(kY=w,lY=w,mY=lY+172|0,nY=0|f[mY>>2],oY=511&nY,pY=oY<<23,qY=4|pY,sY=cea,tY=65535&sY,uY=tY<<7,vY=qY|uY,0|du(kY,vY),wY=w,eu(wY),void(l=nea)):void(l=nea);case 71:return xY=x,yY=0|f[xY>>2],Cda=yY,zY=w,AY=x,BY=AY+4|0,DY=0|f[BY>>2],EY=0|f[DY>>2],FY=EY,GY=0|ju(zY,FY),dea=GY,HY=w,IY=x,JY=IY+4|0,KY=0|f[JY>>2],LY=KY+4|0,MY=0|f[LY>>2],OY=0|Au(HY,MY,0),gca=OY,PY=w,QY=Cda,cu(PY,QY,1),RY=w,SY=RY+172|0,TY=0|f[SY>>2],UY=TY+-1|0,f[SY>>2]=UY,VY=w,WY=w,XY=WY+172|0,ZY=0|f[XY>>2],$Y=511&ZY,_Y=$Y<<23,aZ=71|_Y,bZ=w,cZ=bZ+172|0,dZ=0|f[cZ>>2],eZ=511&dZ,fZ=eZ<<14,gZ=aZ|fZ,0|du(VY,gZ),iZ=w,eu(iZ),jZ=w,kZ=w,lZ=kZ+172|0,mZ=0|f[lZ>>2],nZ=511&mZ,oZ=nZ<<23,pZ=64|oZ,qZ=gca,rZ=16383&qZ,tZ=rZ<<9,uZ=128|tZ,vZ=pZ|uZ,0|du(jZ,vZ),wZ=w,xZ=wZ+172|0,yZ=0|f[xZ>>2],zZ=yZ+-1|0,f[xZ>>2]=zZ,AZ=w,BZ=w,CZ=BZ+172|0,EZ=0|f[CZ>>2],FZ=511&EZ,GZ=FZ<<23,HZ=70|GZ,IZ=dea,JZ=511&IZ,KZ=JZ<<14,LZ=HZ|KZ,0|du(AZ,LZ),MZ=Uu,(NZ=0!=(0|MZ))?(QZ=w,RZ=w,SZ=RZ+172|0,TZ=0|f[SZ>>2],UZ=511&TZ,VZ=UZ<<23,WZ=4|VZ,XZ=dea,YZ=65535&XZ,ZZ=YZ<<7,_Z=WZ|ZZ,0|du(QZ,_Z),a$=w,eu(a$),void(l=nea)):void(l=nea);default:return void(l=nea)}while(0);if(TC=Uu,UC=0!=(0|TC),VC=x,UC){if(Eca=VC,WC=Eca,YC=0!=(0|WC),!YC)return void(l=nea);for(ZC=w,$C=Eca,_C=0|f[$C>>2],cu(ZC,_C,1),aD=Eca,bD=aD+4|0,cD=0|f[bD>>2],Eca=cD;;){if(dD=Eca,eD=0!=(0|dD),!eD)break;fD=w,iD=Eca,jD=0|f[iD>>2],cu(fD,jD,1),kD=w,lD=kD+172|0,mD=0|f[lD>>2],nD=mD+-1|0,f[lD>>2]=nD,oD=w,pD=oD+172|0,qD=0|f[pD>>2],rD=qD+-1|0,f[pD>>2]=rD,tD=w,uD=w,vD=uD+172|0,wD=0|f[vD>>2],xD=511&wD,yD=xD<<23,zD=62|yD,AD=w,BD=AD+172|0,CD=0|f[BD>>2],ED=CD+1|0,FD=511&ED,GD=FD<<14,HD=zD|GD,0|nu(tD,HD,1),ID=w,eu(ID),JD=Eca,KD=JD+4|0,LD=0|f[KD>>2],Eca=LD}return void(l=nea)}for(Fca=VC;;){if(MD=Fca,ND=0!=(0|MD),!ND)break;PD=Fca,QD=0|f[PD>>2],RD=0|f[QD>>2],SD=RD,TD=55!=(0|SD),TD&&(UD=w,VD=Fca,WD=0|f[VD>>2],cu(UD,WD,0)),XD=Fca,YD=XD+4|0,$D=0|f[YD>>2],Fca=$D}return void(l=nea)}function du(a,b){a|=0,b|=0;var c=0,d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,Aa=0;return Aa=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,s=c,D=s+176|0,O=0|f[D>>2],$=c,ja=$+212|0,ua=0|f[ja>>2],xa=(0|O)==(0|ua),xa&&(ya=c,g=ya+212|0,h=0|f[g>>2],i=h<<1,f[g>>2]=i,j=c,k=c,n=k+204|0,o=0|f[n>>2],p=c,q=p+212|0,r=0|f[q>>2],t=r<<2,u=0|$t(j,o,t),v=c,w=v+204|0,f[w>>2]=u,x=c,y=x+208|0,z=0|f[y>>2],A=0!=(0|z),A&&(B=c,C=c,E=C+208|0,F=0|f[E>>2],G=c,H=G+212|0,I=0|f[H>>2],J=I<<1,K=0|$t(B,F,J),L=c,M=L+208|0,f[M>>2]=K,N=c,P=N+208|0,Q=0|f[P>>2],R=c,S=R+216|0,T=0|f[S>>2],U=T+32|0,f[U>>2]=Q)),V=d,W=c,Y=W+176|0,Z=0|f[Y>>2],_=c,aa=_+204|0,ba=0|f[aa>>2],ca=ba+(Z<<2)|0,f[ca>>2]=V,da=c,ea=da+208|0,fa=0|f[ea>>2],(ga=0!=(0|fa))?(ha=c,ia=ha+200|0,ka=0|e[ia>>1],la=c,ma=la+176|0,na=0|f[ma>>2],oa=c,pa=oa+208|0,qa=0|f[pa>>2],ra=qa+(na<<1)|0,e[ra>>1]=ka,sa=c,ta=sa+176|0,va=0|f[ta>>2],wa=va+1|0,f[ta>>2]=wa,l=Aa,0|va):(sa=c,ta=sa+176|0,va=0|f[ta>>2],wa=va+1|0,f[ta>>2]=wa,l=Aa,0|va)}function eu(a){a|=0;var b=0,c=0,d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;return E=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,r=c+172|0,w=0|f[r>>2],x=(0|w)>511,x&&(y=b,_t(y,69323)),z=b,A=z+172|0,B=0|f[A>>2],C=B+1|0,f[A>>2]=C,d=b,g=d+172|0,h=0|f[g>>2],i=b,j=i+234|0,k=0|e[j>>1],n=65535&k,(o=(0|h)>(0|n))?(p=b,q=p+172|0,s=0|f[q>>2],t=65535&s,u=b,v=u+234|0,e[v>>1]=t,void(l=E)):void(l=E)}function fu(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,M=0;return M=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=c,C=0|gu(r,28),K=C,E=d,F=K,f[F>>2]=E,G=K,H=G+12|0,f[H>>2]=0,I=K,J=I+8|0,f[J>>2]=0,e=K,g=e+4|0,f[g>>2]=0,h=c,i=h+188|0,j=0|f[i>>2],k=K,n=k+24|0,f[n>>2]=j,o=c,p=o+192|0,q=0|f[p>>2],s=K,t=s+20|0,f[t>>2]=q,u=c,v=u+172|0,w=0|f[v>>2],x=K,y=x+16|0,f[y>>2]=w,z=K,A=c,B=A+188|0,f[B>>2]=z,D=K,l=M,0|D}function gu(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,s=0;return s=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,g=c,h=g+4|0,i=0|f[h>>2],j=d,k=0|gt(i,j),q=k,n=q,(o=0!=(0|n))?(e=q,l=s,0|e):(p=c,_t(p,69346),e=q,l=s,0|e)}function hu(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,aa=0;aa=l,l=l+32|0,(0|l)>=(0|m)&&X(),$=aa,d=a,e=b,s=d,D=s+176|0,O=0|f[D>>2],Q=e,R=O-Q|0,W=R,S=e,T=d,U=T+204|0,g=0|f[U>>2],h=g+(S<<2)|0,i=0|f[h>>2],Y=i,j=Y,k=127&j,V=k,n=d,o=n+176|0,p=0|f[o>>2],q=d,r=q+180|0,f[r>>2]=p,t=V,c=t+-23|0,Z=c>>>0<4,Z||(u=0|f[637],0|Vv(u,69369,$),v=d,iu(v)),w=V,x=127&w,y=Y,z=y>>>23,A=511&z,B=511&A,C=B<<23,E=x|C,F=W,G=F+32767|0,H=65535&G,I=H<<7,J=E|I,K=e,L=d,M=L+204|0,N=0|f[M>>2],P=N+(K<<2)|0,f[P>>2]=J,l=aa}function iu(a){a|=0;var b=0,d=0;d=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,Qa(1)}function ju(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0;for(qa=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,s=b,D=e,O=D+216|0,$=0|f[O>>2],ja=$+48|0,ka=0|f[ja>>2],oa=ka,la=oa,ma=la>>>0>256,c=ma?256:ka,oa=c,na=0;;){if(g=na,h=oa,i=g>>>0<h>>>0,!i)break;if(j=na,k=e,n=k+216|0,o=0|f[n>>2],p=o+16|0,q=0|f[p>>2],r=q+(j<<2)|0,t=0|f[r>>2],u=s,v=(0|t)==(0|u),w=na,v){pa=4;break}if(x=e,y=x+216|0,z=0|f[y>>2],A=z+16|0,B=0|f[A>>2],C=B+(w<<2)|0,E=0|f[C>>2],F=0==(0|E))break;G=na,H=G+1|0,na=H}return 4==(0|pa)?(d=w,ia=d,l=qa,0|ia):(I=na,J=256==(0|I),J&&(K=e,_t(K,69412)),L=s,M=na,N=e,P=N+216|0,Q=0|f[P>>2],R=Q+16|0,S=0|f[R>>2],T=S+(M<<2)|0,f[T>>2]=L,U=na,V=e,W=V+216|0,Y=0|f[W>>2],Z=Y+48|0,_=0|f[Z>>2],aa=(0|U)==(0|_),aa&&(ba=e,ca=ba+216|0,da=0|f[ca>>2],ea=da+48|0,fa=0|f[ea>>2],ga=fa+1|0,f[ea>>2]=ga),ha=na,d=ha,ia=d,l=qa,0|ia)}function ku(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;if(B=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,q=d,r=0!=(0|q),!r)return void(l=B);for(;;){if(s=d,t=c,u=t+204|0,v=0|f[u>>2],w=v+(s<<2)|0,x=0|f[w>>2],y=x,e=y,g=e>>>7,h=65535&g,i=h-32767|0,z=i,j=c,k=d,hu(j,k),n=z,o=0!=(0|n),!o)break;p=z,d=p}l=B}function lu(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Rc=0;Rc=l,l=l+48|0,(0|l)>=(0|m)&&X(),Pc=Rc,e=a,g=b,db=c,ob=d,zb=g,Kb=0|f[zb>>2],Vb=Kb,Nc=Vb,ec=g,pc=ec+4|0,Ac=0|f[pc>>2],g=Ac,h=Nc;a:do switch(0|h){case 41:u=e,F=g,Q=F,aa=0|mu(u,Q),Lc=aa,la=e,wa=db,Ha=511&wa,Sa=Ha<<23,bb=10|Sa,eb=Lc,fb=65535&eb,gb=fb<<7,hb=bb|gb,ib=ob,0|nu(la,hb,ib);break;case 39:if(jb=e,kb=g,lb=kb,mb=0|bu(jb,lb),Lc=mb,nb=Lc,pb=(0|nb)>0){if(qb=Lc,rb=db,sb=(0|qb)!=(0|rb),!sb)break a;tb=e,ub=Lc,vb=511&ub,wb=vb<<23,xb=1|wb,yb=db,Ab=511&yb,Bb=Ab<<14,Cb=xb|Bb,Db=ob,0|nu(tb,Cb,Db);break a}for(Mc=0,Eb=e,Fb=Eb+164|0,Gb=0|f[Fb>>2],Oc=Gb;;){if(Hb=Oc,Ib=0!=(0|Hb),!Ib)break a;if(Jb=Oc,Lb=g,Mb=Lb,Nb=0|bu(Jb,Mb),Lc=Nb,Ob=Lc,Pb=(0|Ob)>0)break;dc=Mc,fc=dc+1|0,Mc=fc,gc=Oc,hc=gc+164|0,ic=0|f[hc>>2],Oc=ic}Qb=e,Rb=db,Sb=511&Rb,Tb=Sb<<23,Ub=22|Tb,Wb=Lc,Xb=511&Wb,Yb=Xb<<14,Zb=Ub|Yb,$b=Mc,_b=127&$b,ac=_b<<7,bc=Zb|ac,cc=ob,0|nu(Qb,bc,cc);break;case 42:jc=e,kc=g,lc=kc,mc=0|mu(jc,lc),Lc=mc,nc=e,oc=db,qc=511&oc,rc=qc<<23,sc=14|rc,tc=Lc,uc=65535&tc,vc=uc<<7,wc=sc|vc,xc=ob,0|nu(nc,wc,xc);break;case 44:yc=e,zc=g,Bc=zc,Cc=0|mu(yc,Bc),Lc=Cc,Dc=e,Ec=db,Fc=511&Ec,Gc=Fc<<23,Hc=16|Gc,Ic=Lc,Jc=65535&Ic,Kc=Jc<<7,i=Hc|Kc,j=ob,0|nu(Dc,i,j);break;case 43:k=e,n=g,o=n,p=0|mu(k,o),Lc=p,q=e,r=db,s=511&r,t=s<<23,v=18|t,w=Lc,x=65535&w,y=x<<7,z=v|y,A=ob,0|nu(q,z,A);break;case 77:B=e,C=g,D=C+4|0,E=0|f[D>>2],G=E,H=0|mu(B,G),Lc=H,I=e,J=e,K=J+172|0,L=0|f[K>>2],M=511&L,N=M<<23,O=1|N,P=db,R=511&P,S=R<<14,T=O|S,0|nu(I,T,0),U=e,eu(U),V=e,W=g,Y=0|f[W>>2],cu(V,Y,1),Z=e,$=Z+172|0,_=0|f[$>>2],ba=_-2|0,f[$>>2]=ba,ca=e,da=e,ea=da+172|0,fa=0|f[ea>>2],ga=511&fa,ha=ga<<23,ia=20|ha,ja=Lc,ka=65535&ja,ma=ka<<7,na=ia|ma,oa=ob,0|nu(ca,na,oa);break;case 29:pa=e,eu(pa),qa=e,ra=g,sa=e,ta=g,ua=ta+4|0,va=0|f[ua>>2],xa=0|f[va>>2],ya=xa,za=0|pu(sa,ya),Aa=db,qu(qa,ra,za,Aa,0),Ba=e,Ca=Ba+172|0,Da=0|f[Ca>>2],Ea=Da+-1|0,f[Ca>>2]=Ea,Fa=ob,Ga=0!=(0|Fa),Ga&&(Ia=e,Ja=e,Ka=Ja+172|0,La=0|f[Ka>>2],Ma=511&La,Na=Ma<<23,Oa=1|Na,Pa=db,Qa=511&Pa,Ra=Qa<<14,Ta=Oa|Ra,Ua=ob,0|nu(Ia,Ta,Ua));break;case 23:Va=e,Wa=g,Xa=0|f[Wa>>2],Ya=db,Za=ob,su(Va,Xa,Ya,Za);break;case 86:break;default:$a=Nc,f[Pc>>2]=$a,0|aw(69454,Pc)}while(0);return _a=ob,(ab=0!=(0|_a))?(cb=e,eu(cb),void(l=Rc)):void(l=Rc)}function mu(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0;for(Ta=l,l=l+16|0,(0|l)>=(0|m)&&X(),d=a,r=b,Ra=0;;){if(C=Ra,N=d,Z=N+216|0,ia=0|f[Z>>2],ta=ia+48|0,Ea=0|f[ta>>2],Pa=C>>>0<Ea>>>0,!Pa)break;if(e=Ra,g=d,h=g+216|0,i=0|f[h>>2],j=i+16|0,k=0|f[j>>2],n=k+(e<<2)|0,o=0|f[n>>2],p=r,q=(0|o)==(0|p),s=Ra,q){Sa=4;break}t=s+1|0,Ra=t}if(4==(0|Sa))return c=s,Qa=c,l=Ta,0|Qa;if(u=d,v=u+216|0,w=0|f[v>>2],x=w+48|0,y=0|f[x>>2],z=y>>>0>125,z&&(A=d,B=A+216|0,D=0|f[B>>2],E=D+48|0,F=0|f[E>>2],G=F>>>0<256)){for(H=d,I=d,J=I+216|0,K=0|f[J>>2],L=K+16|0,M=0|f[L>>2],O=0|$t(H,M,262144),P=d,Q=P+216|0,R=0|f[Q>>2],S=R+16|0,f[S>>2]=O,Ra=0;;){if(T=Ra,U=d,V=U+216|0,W=0|f[V>>2],Y=W+48|0,$=0|f[Y>>2],_=256-$|0,aa=T>>>0<_>>>0,!aa)break;ba=Ra,ca=d,da=ca+216|0,ea=0|f[da>>2],fa=ea+48|0,ga=0|f[fa>>2],ha=ba+ga|0,ja=d,ka=ja+216|0,la=0|f[ka>>2],ma=la+16|0,na=0|f[ma>>2],oa=na+(ha<<2)|0,f[oa>>2]=0,pa=Ra,qa=pa+1|0,Ra=qa}ra=d,sa=ra+216|0,ua=0|f[sa>>2],va=ua+48|0,f[va>>2]=256}return wa=r,xa=d,ya=xa+216|0,za=0|f[ya>>2],Aa=za+48|0,Ba=0|f[Aa>>2],Ca=d,Da=Ca+216|0,Fa=0|f[Da>>2],Ga=Fa+16|0,Ha=0|f[Ga>>2],Ia=Ha+(Ba<<2)|0,f[Ia>>2]=wa,Ja=d,Ka=Ja+216|0,La=0|f[Ka>>2],Ma=La+48|0,Na=0|f[Ma>>2],Oa=Na+1|0,f[Ma>>2]=Oa,c=Na,Qa=c,l=Ta,0|Qa}function nu(a,b,c){a|=0,b|=0,c|=0;var d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0,wf=0,xf=0,yf=0,zf=0,Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0,Gf=0,Hf=0,If=0,Jf=0,Kf=0,Lf=0,Mf=0,Nf=0,Of=0,Pf=0,Qf=0,Rf=0,Sf=0,Tf=0,Uf=0,Vf=0,Wf=0,Xf=0,Yf=0,Zf=0,$f=0,_f=0,ag=0,bg=0,cg=0,dg=0,eg=0,fg=0,gg=0,hg=0,ig=0,jg=0,kg=0,lg=0,mg=0,ng=0,og=0,pg=0,qg=0,rg=0,sg=0,tg=0,ug=0,vg=0,wg=0,xg=0,yg=0,zg=0,Ag=0,Bg=0,Cg=0,Dg=0,Eg=0,Fg=0,Gg=0,Hg=0,Ig=0,Jg=0,Kg=0,Lg=0,Mg=0,Ng=0,Og=0,Pg=0,Qg=0,Rg=0,Sg=0,Tg=0,Ug=0,Vg=0,Wg=0,Xg=0,Yg=0,Zg=0,$g=0,_g=0,ah=0,bh=0,ch=0,dh=0,eh=0,fh=0,gh=0,hh=0,ih=0,jh=0,kh=0,lh=0,mh=0,nh=0,oh=0,ph=0,qh=0,rh=0,sh=0,th=0,uh=0,vh=0,wh=0,xh=0,yh=0,zh=0,Ah=0,Bh=0,Ch=0,Dh=0,Eh=0,Fh=0,Gh=0,Hh=0,Ih=0,Jh=0,Kh=0,Lh=0,Mh=0,Nh=0,Oh=0,Ph=0,Qh=0,Rh=0,Sh=0,Th=0,Uh=0,Vh=0,Wh=0,Xh=0,Yh=0,Zh=0,$h=0,_h=0,ai=0,bi=0,ci=0,di=0,ei=0,fi=0,gi=0,hi=0,ii=0,ji=0,ki=0,li=0,mi=0,ni=0,oi=0,pi=0,qi=0,ri=0,si=0,ti=0,ui=0,vi=0,wi=0,xi=0,yi=0,zi=0,Ai=0,Bi=0,Ci=0,Di=0,Ei=0,Fi=0,Gi=0,Hi=0,Ii=0,Ji=0,Ki=0,Li=0,Mi=0,Ni=0,Oi=0,Pi=0,Qi=0,Ri=0,Si=0,Ti=0,Ui=0,Vi=0,Wi=0,Xi=0,Yi=0,Zi=0,$i=0,_i=0,aj=0,bj=0,cj=0,dj=0,ej=0,fj=0,gj=0,hj=0,ij=0,jj=0,kj=0,lj=0,mj=0,nj=0,oj=0,pj=0,qj=0,rj=0,sj=0,tj=0,uj=0,vj=0,wj=0,xj=0,yj=0,zj=0,Aj=0,Bj=0,Cj=0,Dj=0,Ej=0,Fj=0,Gj=0,Hj=0,Ij=0,Jj=0,Kj=0,Lj=0,Mj=0,Nj=0,Oj=0,Pj=0,Qj=0,Rj=0,Sj=0,Tj=0,Uj=0,Vj=0,Wj=0,Xj=0,Yj=0,Zj=0,$j=0,_j=0,ak=0,bk=0,ck=0,dk=0,ek=0,fk=0,gk=0,hk=0,jk=0;jk=l,l=l+48|0,(0|l)>=(0|m)&&X(),hk=jk,g=a,mb=b,pd=c,tf=g,wh=0|ou(tf),kj=wh<<24>>24!=0;a:do if(!kj&&(vj=g,Gj=vj+180|0,Rj=0|f[Gj>>2],h=g,u=h+176|0,F=0|f[u>>2],Q=(0|Rj)!=(0|F),Q&&(aa=g,la=aa+176|0,wa=0|f[la>>2],Ha=(0|wa)>0))){switch(Sa=g,bb=Sa+176|0,nb=0|f[bb>>2],yb=nb-1|0,Jb=g,Ub=Jb+204|0,dc=0|f[Ub>>2],oc=dc+(yb<<2)|0,zc=0|f[oc>>2],dk=zc,Kc=mb,Vc=127&Kc,ck=Vc,ed=dk,qd=127&ed,bk=qd,Bd=ck,0|Bd){case 1:if(Md=mb,Xd=Md>>>23,ge=511&Xd,re=mb,Ce=re>>>14,Ne=511&Ce,Ye=(0|ge)==(0|Ne))return d=0,ij=d,l=jk,0|ij;if(hf=pd,uf=0!=(0|hf))break a;switch(Ff=bk,0|Ff){case 1:if(Qf=mb,_f=Qf>>>23,kg=511&_f,vg=dk,Gg=vg>>>23,Rg=511&Gg,ah=(0|kg)==(0|Rg),ah&&(lh=g,xh=lh+176|0,Ih=0|f[xh>>2],Th=Ih+-1|0,f[xh>>2]=Th,ci=mb,ni=g,yi=ni+176|0,Ji=0|f[yi>>2],Ui=g,dj=Ui+204|0,jj=0|f[dj>>2],lj=jj+(Ji<<2)|0,f[lj>>2]=ci),mj=mb,nj=mj>>>14,oj=511&nj,pj=dk,qj=pj>>>23,rj=511&qj,sj=(0|oj)==(0|rj),sj&&(tj=mb,uj=tj>>>23,wj=511&uj,xj=dk,yj=xj>>>14,zj=511&yj,Aj=(0|wj)==(0|zj)))return d=0,ij=d,l=jk,0|ij;if(Bj=mb,Cj=Bj>>>14,Dj=511&Cj,Ej=dk,Fj=Ej>>>23,Hj=511&Fj,Ij=(0|Dj)==(0|Hj),!Ij)break a;if(Jj=dk,Kj=Jj>>>23,Lj=511&Kj,Mj=g,Nj=Mj+232|0,Oj=0|e[Nj>>1],Pj=65535&Oj,Qj=(0|Lj)>=(0|Pj),!Qj)break a;return Sj=g,Tj=Sj+176|0,Uj=0|f[Tj>>2],Vj=Uj+-1|0,f[Tj>>2]=Vj,Wj=g,Xj=mb,Yj=Xj>>>23,Zj=511&Yj,$j=511&Zj,_j=$j<<23,i=1|_j,j=dk,k=j>>>14,n=511&k,o=511&n,p=o<<14,q=i|p,r=pd,s=0|nu(Wj,q,r),d=s,ij=d,l=jk,0|ij;case 3:if(t=mb,v=t>>>14,w=511&v,x=dk,y=x>>>23,z=511&y,A=(0|w)==(0|z),!A)break a;if(B=dk,C=B>>>23,D=511&C,E=g,G=E+232|0,H=0|e[G>>1],I=65535&H,J=(0|D)>=(0|I),!J)break a;return K=mb,L=K>>>23,M=511&L,N=511&M,O=N<<23,P=3|O,R=dk,S=R>>>7,T=65535&S,U=T-32767|0,V=U+32767|0,W=65535&V,Y=W<<7,Z=P|Y,$=g,_=$+176|0,ba=0|f[_>>2],ca=ba-1|0,da=g,ea=da+204|0,fa=0|f[ea>>2],ga=fa+(ca<<2)|0,f[ga>>2]=Z,d=0,ij=d,l=jk,0|ij;case 21:case 58:case 65:case 63:case 55:if(ha=mb,ia=ha>>>14,ja=511&ia,ka=dk,ma=ka>>>23,na=511&ma,oa=(0|ja)==(0|na),!oa)break a;if(pa=dk,qa=pa>>>23,ra=511&qa,sa=g,ta=sa+232|0,ua=0|e[ta>>1],va=65535&ua,xa=(0|ra)>=(0|va),!xa)break a;return ya=bk,za=127&ya,Aa=mb,Ba=Aa>>>23,Ca=511&Ba,Da=511&Ca,Ea=Da<<23,Fa=za|Ea,Ga=dk,Ia=Ga>>>14,Ja=511&Ia,Ka=511&Ja,La=Ka<<14,Ma=Fa|La,Na=dk,Oa=Na>>>7,Pa=127&Oa,Qa=127&Pa,Ra=Qa<<7,Ta=Ma|Ra,Ua=g,Va=Ua+176|0,Wa=0|f[Va>>2],Xa=Wa-1|0,Ya=g,Za=Ya+204|0,$a=0|f[Za>>2],_a=$a+(Xa<<2)|0,f[_a>>2]=Ta,d=0,ij=d,l=jk,0|ij;case 61:case 2:case 11:case 17:case 15:case 13:case 9:case 4:if(ab=mb,cb=ab>>>14,db=511&cb,eb=dk,fb=eb>>>23,gb=511&fb,hb=(0|db)==(0|gb),!hb)break a;if(ib=dk,jb=ib>>>23,kb=511&jb,lb=g,ob=lb+232|0,pb=0|e[ob>>1],qb=65535&pb,rb=(0|kb)>=(0|qb),!rb)break a;return sb=bk,tb=127&sb,ub=mb,vb=ub>>>23,wb=511&vb,xb=511&wb,zb=xb<<23,Ab=tb|zb,Bb=dk,Cb=Bb>>>7,Db=65535&Cb,Eb=65535&Db,Fb=Eb<<7,Gb=Ab|Fb,Hb=g,Ib=Hb+176|0,Kb=0|f[Ib>>2],Lb=Kb-1|0,Mb=g,Nb=Mb+204|0,Ob=0|f[Nb>>2],Pb=Ob+(Lb<<2)|0,f[Pb>>2]=Gb,d=0,ij=d,l=jk,0|ij;case 71:if(Qb=mb,Rb=Qb>>>14,Sb=511&Rb,Tb=dk,Vb=Tb>>>23,Wb=511&Vb,Xb=(0|Sb)==(0|Wb),!Xb)break a;if(Yb=dk,Zb=Yb>>>23,$b=511&Zb,_b=g,ac=_b+232|0,bc=0|e[ac>>1],cc=65535&bc,ec=(0|$b)>=(0|cc),!ec)break a;return fc=bk,gc=127&fc,hc=mb,ic=hc>>>23,jc=511&ic,kc=511&jc,lc=kc<<23,mc=gc|lc,nc=dk,pc=nc>>>14,qc=511&pc,rc=511&qc,sc=rc<<14,tc=mc|sc,uc=g,vc=uc+176|0,wc=0|f[vc>>2],xc=wc-1|0,yc=g,Ac=yc+204|0,Bc=0|f[Ac>>2],Cc=Bc+(xc<<2)|0,f[Cc>>2]=tc,d=0,ij=d,l=jk,0|ij;case 66:case 8:case 7:case 6:case 5:if(Dc=mb,Ec=Dc>>>14,Fc=511&Ec,Gc=dk,Hc=Gc>>>23,Ic=511&Hc,Jc=(0|Fc)==(0|Ic),!Jc)break a;if(Lc=dk,Mc=Lc>>>23,Nc=511&Mc,Oc=g,Pc=Oc+232|0,Qc=0|e[Pc>>1],Rc=65535&Qc,Sc=(0|Nc)>=(0|Rc),!Sc)break a;return Tc=bk,Uc=127&Tc,Wc=mb,Xc=Wc>>>23,Yc=511&Xc,Zc=511&Yc,$c=Zc<<23,_c=Uc|$c,ad=g,bd=ad+176|0,cd=0|f[bd>>2],dd=cd-1|0,fd=g,gd=fd+204|0,hd=0|f[gd>>2],id=hd+(dd<<2)|0,f[id>>2]=_c,d=0,ij=d,l=jk,0|ij;default:break a}break;case 10:case 20:case 18:case 16:case 14:if(jd=pd,kd=0==(0|jd),ld=bk,md=1==(0|ld),fk=kd&md,!fk)break a;if(nd=mb,od=nd>>>23,rd=511&od,sd=dk,td=sd>>>23,ud=511&td,vd=(0|rd)==(0|ud),!vd)break a;return wd=ck,xd=127&wd,yd=dk,zd=yd>>>14,Ad=511&zd,Cd=511&Ad,Dd=Cd<<23,Ed=xd|Dd,Fd=mb,Gd=Fd>>>7,Hd=65535&Gd,Id=65535&Hd,Jd=Id<<7,Kd=Ed|Jd,Ld=g,Nd=Ld+176|0,Od=0|f[Nd>>2],Pd=Od-1|0,Qd=g,Rd=Qd+204|0,Sd=0|f[Rd>>2],Td=Sd+(Pd<<2)|0,f[Td>>2]=Kd,d=0,ij=d,l=jk,0|ij;case 22:if(Ud=pd,Vd=0==(0|Ud),Wd=bk,Yd=1==(0|Wd),gk=Vd&Yd,!gk)break a;if(Zd=mb,$d=Zd>>>23,_d=511&$d,ae=dk,be=ae>>>23,ce=511&be,de=(0|_d)==(0|ce),!de)break a;return ee=ck,fe=127&ee,he=dk,ie=he>>>14,je=511&ie,ke=511&je,le=ke<<23,me=fe|le,ne=mb,oe=ne>>>14,pe=511&oe,qe=511&pe,se=qe<<14,te=me|se,ue=mb,ve=ue>>>7,we=127&ve,xe=127&we,ye=xe<<7,ze=te|ye,Ae=g,Be=Ae+176|0,De=0|f[Be>>2],Ee=De-1|0,Fe=g,Ge=Fe+204|0,He=0|f[Ge>>2],Ie=He+(Ee<<2)|0,f[Ie>>2]=ze,d=0,ij=d,l=jk,0|ij;case 31:if(Je=bk,Ke=31==(0|Je),!Ke)break a;return Le=dk,Me=Le>>>23,Oe=511&Me,Pe=mb,Qe=Pe>>>23,Re=511&Qe,Se=Oe+Re|0,Te=511&Se,Ue=Te<<23,Ve=31|Ue,We=g,Xe=We+176|0,Ze=0|f[Xe>>2],$e=Ze-1|0,_e=g,af=_e+204|0,bf=0|f[af>>2],cf=bf+($e<<2)|0,f[cf>>2]=Ve,d=0,ij=d,l=jk,0|ij;case 28:if(df=bk,ef=28==(0|df),!ef)break a;return ff=dk,gf=ff>>>23,jf=511&gf,kf=mb,lf=kf>>>23,mf=511&lf,nf=jf+mf|0,of=511&nf,pf=of<<23,qf=28|pf,rf=g,sf=rf+176|0,vf=0|f[sf>>2],wf=vf-1|0,xf=g,yf=xf+204|0,zf=0|f[yf>>2],Af=zf+(wf<<2)|0,f[Af>>2]=qf,d=0,ij=d,l=jk,0|ij;case 41:switch(Bf=bk,0|Bf){case 41:return d=0,ij=d,l=jk,0|ij;case 1:if(Cf=dk,Df=Cf>>>23,Ef=511&Df,Gf=g,Hf=Gf+232|0,If=0|e[Hf>>1],Jf=65535&If,Kf=(0|Ef)>=(0|Jf),!Kf)break a;return Lf=dk,Mf=Lf>>>14,Nf=511&Mf,Of=511&Nf,Pf=Of<<23,Rf=41|Pf,Sf=g,Tf=Sf+176|0,Uf=0|f[Tf>>2],Vf=Uf-1|0,Wf=g,Xf=Wf+204|0,Yf=0|f[Xf>>2],Zf=Yf+(Vf<<2)|0,f[Zf>>2]=Rf,d=0,ij=d,l=jk,0|ij;case 10:case 22:case 20:case 18:case 16:case 14:return $f=g,ag=$f+176|0,bg=0|f[ag>>2],cg=bg+-1|0,f[ag>>2]=cg,dg=g,eg=dk,0|nu(dg,eg,0),fg=g,gg=fg+176|0,hg=0|f[gg>>2],ig=hg-1|0,jg=g,lg=jg+204|0,mg=0|f[lg>>2],ng=mg+(ig<<2)|0,og=0|f[ng>>2],dk=og,pg=g,qg=dk,rg=qg>>>23,sg=511&rg,tg=511&sg,ug=tg<<23,wg=41|ug,xg=0|du(pg,wg),
+d=xg,ij=d,l=jk,0|ij;default:break a}break;case 46:case 44:if(yg=bk,zg=3==(0|yg)){if(Ag=dk,Bg=Ag>>>7,Cg=65535&Bg,Dg=Cg-32767|0,ak=Dg,Eg=ck,Fg=46==(0|Eg),Fg&&(Hg=ak,Ig=0-Hg|0,ak=Ig),Jg=ak,Kg=(0|Jg)>127,Lg=ak,Mg=(0|Lg)<-127,ek=Kg|Mg)break a;return Ng=ak,Og=0<=(0|Ng),Pg=mb,Qg=Pg>>>23,Sg=511&Qg,Tg=511&Sg,Ug=Tg<<23,Og?(Vg=45|Ug,Wg=mb,Xg=Wg>>>14,Yg=511&Xg,Zg=511&Yg,$g=Zg<<14,_g=Vg|$g,bh=ak,ch=127&bh,dh=ch<<7,eh=_g|dh,fh=g,gh=fh+176|0,hh=0|f[gh>>2],ih=hh-1|0,jh=g,kh=jh+204|0,mh=0|f[kh>>2],nh=mh+(ih<<2)|0,f[nh>>2]=eh):(oh=47|Ug,ph=mb,qh=ph>>>14,rh=511&qh,sh=511&rh,th=sh<<14,uh=oh|th,vh=ak,yh=0-vh|0,zh=127&yh,Ah=zh<<7,Bh=uh|Ah,Ch=g,Dh=Ch+176|0,Eh=0|f[Dh>>2],Fh=Eh-1|0,Gh=g,Hh=Gh+204|0,Jh=0|f[Hh>>2],Kh=Jh+(Fh<<2)|0,f[Kh>>2]=Bh),d=0,ij=d,l=jk,0|ij}break;case 62:break;case 25:case 24:if(si=bk,ti=1==(0|si),!ti)break a;if(ui=mb,vi=ui>>>23,wi=511&vi,xi=dk,zi=xi>>>23,Ai=511&zi,Bi=(0|wi)==(0|Ai),!Bi)break a;return Ci=ck,Di=127&Ci,Ei=dk,Fi=Ei>>>14,Gi=511&Fi,Hi=511&Gi,Ii=Hi<<23,Ki=Di|Ii,Li=mb,Mi=Li>>>7,Ni=65535&Mi,Oi=Ni-32767|0,Pi=Oi+32767|0,Qi=65535&Pi,Ri=Qi<<7,Si=Ki|Ri,Ti=g,Vi=Ti+176|0,Wi=0|f[Vi>>2],Xi=Wi-1|0,Yi=g,Zi=Yi+204|0,$i=0|f[Zi>>2],_i=$i+(Xi<<2)|0,f[_i>>2]=Si,aj=g,bj=aj+176|0,cj=0|f[bj>>2],ej=cj-1|0,d=ej,ij=d,l=jk,0|ij;default:break a}if(Lh=bk,Mh=61==(0|Lh),Mh&&(Nh=dk,Oh=Nh>>>7,Ph=65535&Oh,Qh=g,Rh=Qh+216|0,Sh=0|f[Rh>>2],Uh=Sh+12|0,Vh=0|f[Uh>>2],Wh=Vh+(Ph<<3)|0,f[hk>>2]=0|f[Wh>>2],f[hk+4>>2]=0|f[Wh+4>>2],Xh=hk+4|0,Yh=0|f[Xh>>2],Zh=16==(0|Yh),Zh&&($h=0|f[hk>>2],_h=0|f[$h>>2],ai=_h>>>11,bi=8&ai,di=0!=(0|bi),ei=0|f[hk>>2],di?(fi=0|f[ei>>2],gi=fi>>>11,hi=496&gi,ii=hi>>4,li=ii):(ji=ei+12|0,ki=0|f[ji>>2],li=ki),mi=0==(0|li))))return oi=g,pi=oi+176|0,qi=0|f[pi>>2],ri=qi+-1|0,f[pi>>2]=ri,d=0,ij=d,l=jk,0|ij}while(0);return fj=g,gj=mb,hj=0|du(fj,gj),d=hj,ij=d,l=jk,0|ij}function ou(a){a|=0;var b=0,c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,x=0;return x=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,o=c,p=0!=(0|o),p&&(q=c,r=q+248|0,s=0|f[r>>2],t=0!=(0|s),t&&(u=c,v=u+248|0,e=0|f[v>>2],g=e+1148|0,h=0|d[g>>0],i=1&h,j=255&i,k=0!=(0|j)))?(b=1,n=b,l=x,0|n):(b=0,n=b,l=x,0|n)}function pu(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,L=0;return L=l,l=l+32|0,(0|l)>=(0|m)&&X(),H=L+4|0,c=a,e=b,s=c,A=0|f[s>>2],B=e,C=0|si(A,B,H),I=C,D=c,E=0|f[H>>2],F=E+1|0,G=F+1|0,g=0|gu(D,G),J=g,h=J,i=I,j=0|f[H>>2],0|sw(0|h,0|i,0|j),k=0|f[H>>2],n=J,o=n+k|0,d[o>>0]=61,p=0|f[H>>2],q=p+1|0,r=J,t=r+q|0,d[t>>0]=0,u=c,v=0|f[u>>2],w=J,x=0|f[H>>2],y=x+1|0,z=0|hi(v,w,y),l=L,0|z}function qu(a,b,c,e,g){a|=0,b|=0,c|=0,e|=0,g|=0;var h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0,wf=0,xf=0,yf=0,zf=0,Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0,Gf=0,Hf=0,If=0,Jf=0,Kf=0,Lf=0,Mf=0,Nf=0,Of=0,Pf=0,Qf=0,Rf=0,Sf=0,Tf=0,Uf=0,Vf=0,Wf=0,Xf=0,Yf=0,Zf=0,$f=0,_f=0,ag=0,bg=0,cg=0,dg=0,eg=0,fg=0,gg=0;gg=l,l=l+64|0,(0|l)>=(0|m)&&X(),dg=gg+4|0,h=a,i=b,ob=c,rd=e,De=g,Oe=ob,Ze=0!=(0|Oe),Ze?(jf=ob,S=jf):(uf=i,Ff=uf+4|0,j=0|f[Ff>>2],w=0|f[j>>2],H=w,S=H),cg=S,Sf=0,Tf=0,bg=0,Qf=0,ca=h,na=i,ya=0|f[na>>2],cu(ca,ya,1),Ja=h,Ua=cg,db=0|ju(Ja,Ua),Rf=db,pb=i,Ab=pb+4|0,Lb=0|f[Ab>>2],Wb=Lb+4|0,fc=0|f[Wb>>2],qc=0|f[fc>>2],i=qc,Bc=i,Mc=0!=(0|Bc),Mc&&(Xc=h,gd=i,sd=0|f[gd>>2],Dd=0|ru(Xc,sd,1),Sf=Dd,Od=Sf,Zd=(0|Od)<0,Zd&&(bg=1,Tf=1,Sf=1,ie=h,eu(ie))),te=rd,ze=0!=(0|te);do if(ze){if(Ae=bg,Be=0!=(0|Ae),Ce=h,Be){Ee=Ce+172|0,Fe=0|f[Ee>>2],Ge=Fe+-1|0,f[Ee>>2]=Ge,He=h,Ie=h,Je=Ie+172|0,Ke=0|f[Je>>2],Le=511&Ke,Me=Le<<23,Ne=57|Me,Pe=rd,Qe=511&Pe,Re=Qe<<14,Se=Ne|Re,0|du(He,Se),Te=h,eu(Te);break}Ue=h,Ve=Ue+172|0,We=0|f[Ve>>2],Xe=511&We,Ye=Xe<<23,$e=1|Ye,_e=rd,af=511&_e,bf=af<<14,cf=$e|bf,0|du(Ce,cf),df=h,eu(df),ef=Sf,ff=ef+1|0,Sf=ff;break}while(0);gf=i,hf=0!=(0|gf),hf?(kf=i,lf=kf+4|0,mf=0|f[lf>>2],nf=0!=(0|mf),nf?(Tf=1,of=h,pf=i,qf=pf+4|0,rf=0|f[qf>>2],cu(of,rf,1),sf=h,tf=sf+172|0,vf=0|f[tf>>2],wf=vf+-1|0,f[tf>>2]=wf):fg=14):fg=14,14==(0|fg)&&(xf=h,yf=xf+172|0,zf=0|f[yf>>2],Qf=zf),Af=h,eu(Af),Bf=h,Cf=Bf+172|0,Df=0|f[Cf>>2],Ef=Df+-1|0,f[Cf>>2]=Ef,Gf=Sf,Hf=Gf+1|0,If=h,Jf=If+172|0,Kf=0|f[Jf>>2],Lf=Kf-Hf|0,f[Jf>>2]=Lf,Mf=h,Nf=0|f[Mf>>2],Of=cg,Pf=0|si(Nf,Of,dg),eg=Pf,k=Tf,n=0==(0|k),o=0|f[dg>>2],p=1==(0|o),Uf=n&p,Uf?(q=eg,r=0|d[q>>0],s=r<<24>>24,t=43==(0|s),t?(u=h,v=h,x=v+172|0,y=0|f[x>>2],z=511&y,A=z<<23,B=44|A,C=Rf,D=511&C,E=D<<14,F=B|E,G=Sf,I=127&G,J=I<<7,K=F|J,L=De,0|nu(u,K,L)):fg=18):fg=18;do if(18==(0|fg)){if(M=Tf,N=0==(0|M),O=0|f[dg>>2],P=1==(0|O),Zf=N&P,Zf&&(Q=eg,R=0|d[Q>>0],T=R<<24>>24,U=45==(0|T))){V=h,W=h,Y=W+172|0,Z=0|f[Y>>2],$=511&Z,_=$<<23,aa=46|_,ba=Rf,da=511&ba,ea=da<<14,fa=aa|ea,ga=Sf,ha=127&ga,ia=ha<<7,ja=fa|ia,ka=De,0|nu(V,ja,ka);break}if(la=Tf,ma=0==(0|la),oa=0|f[dg>>2],pa=1==(0|oa),$f=ma&pa,$f&&(qa=eg,ra=0|d[qa>>0],sa=ra<<24>>24,ta=42==(0|sa))){ua=h,va=h,wa=va+172|0,xa=0|f[wa>>2],za=511&xa,Aa=za<<23,Ba=48|Aa,Ca=Rf,Da=511&Ca,Ea=Da<<14,Fa=Ba|Ea,Ga=Sf,Ha=127&Ga,Ia=Ha<<7,Ka=Fa|Ia,0|du(ua,Ka);break}if(La=Tf,Ma=0==(0|La),Na=0|f[dg>>2],Oa=1==(0|Na),_f=Ma&Oa,_f&&(Pa=eg,Qa=0|d[Pa>>0],Ra=Qa<<24>>24,Sa=47==(0|Ra))){Ta=h,Va=h,Wa=Va+172|0,Xa=0|f[Wa>>2],Ya=511&Xa,Za=Ya<<23,$a=49|Za,_a=Rf,ab=511&_a,bb=ab<<14,cb=$a|bb,eb=Sf,fb=127&eb,gb=fb<<7,hb=cb|gb,0|du(Ta,hb);break}if(ib=Tf,jb=0==(0|ib),kb=0|f[dg>>2],lb=1==(0|kb),ag=jb&lb,ag&&(mb=eg,nb=0|d[mb>>0],qb=nb<<24>>24,rb=60==(0|qb))){sb=h,tb=h,ub=tb+172|0,vb=0|f[ub>>2],wb=511&vb,xb=wb<<23,yb=51|xb,zb=Rf,Bb=511&zb,Cb=Bb<<14,Db=yb|Cb,Eb=Sf,Fb=127&Eb,Gb=Fb<<7,Hb=Db|Gb,0|du(sb,Hb);break}if(Ib=Tf,Jb=0==(0|Ib),Kb=0|f[dg>>2],Mb=2==(0|Kb),Vf=Jb&Mb,Vf&&(Nb=eg,Ob=0|d[Nb>>0],Pb=Ob<<24>>24,Qb=60==(0|Pb),Qb&&(Rb=eg,Sb=Rb+1|0,Tb=0|d[Sb>>0],Ub=Tb<<24>>24,Vb=61==(0|Ub)))){Xb=h,Yb=h,Zb=Yb+172|0,$b=0|f[Zb>>2],_b=511&$b,ac=_b<<23,bc=52|ac,cc=Rf,dc=511&cc,ec=dc<<14,gc=bc|ec,hc=Sf,ic=127&hc,jc=ic<<7,kc=gc|jc,0|du(Xb,kc);break}if(lc=Tf,mc=0==(0|lc),nc=0|f[dg>>2],oc=1==(0|nc),Wf=mc&oc,Wf&&(pc=eg,rc=0|d[pc>>0],sc=rc<<24>>24,tc=62==(0|sc))){uc=h,vc=h,wc=vc+172|0,xc=0|f[wc>>2],yc=511&xc,zc=yc<<23,Ac=53|zc,Cc=Rf,Dc=511&Cc,Ec=Dc<<14,Fc=Ac|Ec,Gc=Sf,Hc=127&Gc,Ic=Hc<<7,Jc=Fc|Ic,0|du(uc,Jc);break}if(Kc=Tf,Lc=0==(0|Kc),Nc=0|f[dg>>2],Oc=2==(0|Nc),Xf=Lc&Oc,Xf&&(Pc=eg,Qc=0|d[Pc>>0],Rc=Qc<<24>>24,Sc=62==(0|Rc),Sc&&(Tc=eg,Uc=Tc+1|0,Vc=0|d[Uc>>0],Wc=Vc<<24>>24,Yc=61==(0|Wc)))){Zc=h,$c=h,_c=$c+172|0,ad=0|f[_c>>2],bd=511&ad,cd=bd<<23,dd=54|cd,ed=Rf,fd=511&ed,hd=fd<<14,id=dd|hd,jd=Sf,kd=127&jd,ld=kd<<7,md=id|ld,0|du(Zc,md);break}if(nd=Tf,od=0==(0|nd),pd=0|f[dg>>2],qd=2==(0|pd),Yf=od&qd,Yf&&(td=eg,ud=0|d[td>>0],vd=ud<<24>>24,wd=61==(0|vd),wd&&(xd=eg,yd=xd+1|0,zd=0|d[yd>>0],Ad=zd<<24>>24,Bd=61==(0|Ad)))){Cd=h,Ed=h,Fd=Ed+172|0,Gd=0|f[Fd>>2],Hd=511&Gd,Id=Hd<<23,Jd=50|Id,Kd=Rf,Ld=511&Kd,Md=Ld<<14,Nd=Jd|Md,Pd=Sf,Qd=127&Pd,Rd=Qd<<7,Sd=Nd|Rd,0|du(Cd,Sd);break}if(Td=bg,Ud=0!=(0|Td),Ud&&(Sf=127),Vd=Qf,Wd=(0|Vd)>0,Xd=h,Yd=h,$d=Yd+172|0,_d=0|f[$d>>2],ae=511&_d,be=ae<<23,Wd){ce=32|be,de=Rf,ee=511&de,fe=ee<<14,ge=ce|fe,he=Sf,je=127&he,ke=je<<7,le=ge|ke,0|du(Xd,le);break}me=33|be,ne=Rf,oe=511&ne,pe=oe<<14,qe=me|pe,re=Sf,se=127&re,ue=se<<7,ve=qe|ue,0|du(Xd,ve);break}while(0);return we=De,(xe=0!=(0|we))?(ye=h,eu(ye),void(l=gg)):void(l=gg)}function ru(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0;for(_b=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,pa=b,Aa=c,Yb=0;;){if(La=pa,Wa=0!=(0|La),!Wa){$b=19;break}if(fb=pa,qb=0|f[fb>>2],Bb=0|f[qb>>2],Mb=Bb,g=66==(0|Mb),t=1&g,Xb=t,E=Yb,P=(0|E)>=127,_=Xb,ka=0!=(0|_),Zb=P|ka)break;$=e,aa=pa,ba=0|f[aa>>2],ca=Aa,cu($,ba,ca),da=Yb,ea=da+1|0,Yb=ea,fa=pa,ga=fa+4|0,ha=0|f[ga>>2],pa=ha}if(19==(0|$b))return ia=Yb,d=ia,ja=d,l=_b,0|ja;la=Aa,ma=0!=(0|la);a:do if(ma)for(na=Yb,oa=e,qa=oa+172|0,ra=0|f[qa>>2],sa=ra-na|0,f[qa>>2]=sa,ta=e,ua=e,va=ua+172|0,wa=0|f[va>>2],xa=511&wa,ya=xa<<23,za=55|ya,Ba=e,Ca=Ba+172|0,Da=0|f[Ca>>2],Ea=511&Da,Fa=Ea<<14,Ga=za|Fa,Ha=Yb,Ia=127&Ha,Ja=Ia<<7,Ka=Ga|Ja,0|du(ta,Ka),Ma=e,eu(Ma),Na=e,Oa=pa,Pa=0|f[Oa>>2],cu(Na,Pa,1),Qa=e,Ra=Qa+172|0,Sa=0|f[Ra>>2],Ta=Sa+-1|0,f[Ra>>2]=Ta,Ua=e,Va=Ua+172|0,Xa=0|f[Va>>2],Ya=Xa+-1|0,f[Va>>2]=Ya,Za=Xb,$a=0!=(0|Za),_a=e,ab=e,bb=ab+172|0,cb=0|f[bb>>2],db=511&cb,eb=db<<23,$a?(gb=56|eb,hb=e,ib=hb+172|0,jb=0|f[ib>>2],kb=jb+1|0,lb=511&kb,mb=lb<<14,nb=gb|mb,0|du(_a,nb)):(ob=57|eb,pb=e,rb=pb+172|0,sb=0|f[rb>>2],tb=sb+1|0,ub=511&tb,vb=ub<<14,wb=ob|vb,0|du(_a,wb)),xb=pa,yb=xb+4|0,zb=0|f[yb>>2],pa=zb;;){if(Ab=pa,Cb=0!=(0|Ab),!Cb)break a;Db=e,eu(Db),Eb=e,Fb=pa,Gb=0|f[Fb>>2],cu(Eb,Gb,1),Hb=e,Ib=Hb+172|0,Jb=0|f[Ib>>2],Kb=Jb+-1|0,f[Ib>>2]=Kb,Lb=e,Nb=Lb+172|0,Ob=0|f[Nb>>2],Pb=Ob+-1|0,f[Nb>>2]=Pb,Qb=pa,Rb=0|f[Qb>>2],Sb=0|f[Rb>>2],Tb=Sb,Ub=66==(0|Tb),Vb=e,Wb=e,h=Wb+172|0,i=0|f[h>>2],j=511&i,k=j<<23,Ub?(n=56|k,o=e,p=o+172|0,q=0|f[p>>2],r=q+1|0,s=511&r,u=s<<14,v=n|u,0|du(Vb,v)):(w=57|k,x=e,y=x+172|0,z=0|f[y>>2],A=z+1|0,B=511&A,C=B<<14,D=w|C,0|du(Vb,D)),F=pa,G=F+4|0,H=0|f[G>>2],pa=H}else for(I=e,J=pa,K=0|f[J>>2],L=K+4|0,M=0|f[L>>2],cu(I,M,0),N=pa,O=N+4|0,Q=0|f[O>>2],pa=Q;;){if(R=pa,S=0!=(0|R),!S)break a;T=e,U=pa,V=0|f[U>>2],cu(T,V,0),W=pa,Y=W+4|0,Z=0|f[Y>>2],pa=Z}while(0);return d=-1,ja=d,l=_b,0|ja}function su(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Mb=0;Mb=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,g=b,_=c,ka=d,Hb=0,Jb=0,va=g,Ga=0|f[va>>2],Ra=0!=(0|Ga);a:do if(Ra)for(ab=g,lb=0|f[ab>>2],Kb=lb,Hb=0;;){if(wb=Kb,h=0!=(0|wb),!h)break a;u=e,F=e,Q=F+172|0,U=0|f[Q>>2],V=511&U,W=V<<23,Y=58|W,Z=_,$=511&Z,aa=$<<14,ba=Y|aa,ca=Hb,da=127&ca,ea=da<<7,fa=ba|ea,0|du(u,fa),ga=e,ha=Kb,ia=0|f[ha>>2],ja=e,la=ja+172|0,ma=0|f[la>>2],lu(ga,ia,ma,0),na=Hb,oa=na+1|0,Hb=oa,pa=Kb,qa=pa+4|0,ra=0|f[qa>>2],Kb=ra}while(0);if(sa=g,ta=sa+4|0,ua=0|f[ta>>2],Kb=ua,wa=Kb,xa=0!=(0|wa),!xa)return void(l=Mb);ya=Kb,za=ya+4|0,Aa=0|f[za>>2],Ba=0!=(0|Aa);a:do if(Ba)for(Ca=Kb,Da=Ca+4|0,Ea=0|f[Da>>2],Fa=0|f[Ea>>2],Ib=Fa;;){if(Ha=Ib,Ia=0!=(0|Ha),!Ia)break a;Ja=Jb,Ka=Ja+1|0,Jb=Ka,La=Ib,Ma=La+4|0,Na=0|f[Ma>>2],Ib=Na}while(0);Oa=ka,Pa=0!=(0|Oa),Qa=e,Pa?(Sa=e,Ta=Sa+172|0,Ua=0|f[Ta>>2],Va=511&Ua,Wa=Va<<23,Xa=1|Wa,Ya=_,Za=511&Ya,$a=Za<<14,_a=Xa|$a,0|du(Qa,_a)):(bb=Qa+172|0,cb=0|f[bb>>2],db=cb+-1|0,f[bb>>2]=db),eb=e,fb=Jb,tu(eb,fb),gb=Jb,hb=e,ib=hb+172|0,jb=0|f[ib>>2],kb=jb-gb|0,f[ib>>2]=kb,mb=e,nb=e,ob=nb+172|0,pb=0|f[ob>>2],qb=511&pb,rb=qb<<23,sb=60|rb,tb=Hb,ub=511&tb,vb=ub<<14,xb=sb|vb,yb=Jb,zb=127&yb,Ab=zb<<7,Bb=xb|Ab,0|du(mb,Bb),Hb=1,Cb=Kb,Db=0|f[Cb>>2],Eb=0!=(0|Db),Eb&&(Fb=e,Gb=Kb,i=0|f[Gb>>2],j=e,k=j+172|0,n=0|f[k>>2],lu(Fb,i,n,0)),o=Kb,p=o+4|0,q=0|f[p>>2],r=0!=(0|q);a:do if(r&&(s=Kb,t=s+4|0,v=0|f[t>>2],w=0|f[v>>2],x=0!=(0|w)))for(y=Kb,z=y+4|0,A=0|f[z>>2],B=0|f[A>>2],Kb=B;;){if(C=Kb,D=0!=(0|C),!D)break a;E=e,G=Kb,H=0|f[G>>2],I=e,J=I+172|0,K=0|f[J>>2],L=Hb,M=K+L|0,lu(E,H,M,0),N=Kb,O=N+4|0,P=0|f[O>>2],Kb=P,R=Hb,S=R+1|0,Hb=S}while(0);T=e,eu(T),l=Mb}function tu(a,b){a|=0,b|=0;var c=0,d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0;return J=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,s=c,B=s+172|0,C=0|f[B>>2],D=d,E=C+D|0,F=E>>>0>511,F&&(G=c,_t(G,69323)),H=d,g=c,h=g+172|0,i=0|f[h>>2],j=i+H|0,f[h>>2]=j,k=c,n=k+172|0,o=0|f[n>>2],p=c,q=p+234|0,r=0|e[q>>1],t=65535&r,(u=(0|o)>(0|t))?(v=c,w=v+172|0,x=0|f[w>>2],y=65535&x,z=c,A=z+234|0,e[A>>1]=y,void(l=J)):void(l=J)}function uu(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,H=0;return H=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=d,z=0!=(0|r),z&&(A=c,B=c,C=B+172|0,D=0|f[C>>2],E=511&D,F=E<<23,e=5|F,0|du(A,e)),g=c,h=c,i=h+188|0,j=0|f[i>>2],k=j+12|0,n=0|f[k>>2],ku(g,n),o=c,p=o+188|0,q=0|f[p>>2],s=q+24|0,t=0|f[s>>2],u=c,v=u+188|0,f[v>>2]=t,w=d,(x=0!=(0|w))?(y=c,eu(y),void(l=H)):void(l=H)}function vu(a,b,c){a|=0,b|=0,c|=0;var d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,ga=0;ga=l,l=l+32|0,(0|l)>=(0|m)&&X(),g=a,t=b,E=c,P=g,_=0|f[P>>2],aa=g,ba=t,ca=0|f[ba>>2],da=0|Yt(_,aa,ca),ea=da,h=ea,i=0==(0|h),i&&(j=g,wu(j,69470)),k=ea,n=t,o=n+4|0,p=0|f[o>>2],cu(k,p,1),q=g,r=q+204|0,s=0|f[r>>2],u=0!=(0|s);do{if(u){if(w=E,x=0!=(0|w),y=ea,!x){0|du(y,41);break}if(z=y+234|0,A=0|e[z>>1],B=65535&A,C=0==(0|B),D=ea,C){0|du(D,5),F=ea,0|du(F,41);break}G=ea,H=G+172|0,I=0|f[H>>2],J=I-1|0,K=511&J,L=K<<23,M=41|L,0|nu(D,M,0);break}v=ea,0|du(v,74)}while(0);return N=ea,yu(N),O=g,Q=O+216|0,R=0|f[Q>>2],S=0!=(0|R),S?(T=g,U=T+216|0,V=0|f[U>>2],W=V+52|0,Y=0|f[W>>2],Z=Y-1|0,d=Z,$=d,l=ga,0|$):(d=0,$=d,l=ga,0|$)}function wu(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;v=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=v+24|0,j=v,d=a,e=b,k=d,n=d,o=0|f[n>>2],p=e,qg(j,o,p),f[c>>2]=0|f[j>>2],f[c+4>>2]=0|f[j+4>>2],q=0|xu(k,c),t=q,r=d,s=t,g=65535&s,h=g<<7,i=8388683|h,0|du(r,i),l=v}function xu(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Hc=0;Hc=l,l=l+48|0,(0|l)>=(0|m)&&X(),Fc=Hc+32|0,Wa=Hc,d=a,fb=b+4|0,qb=0|f[fb>>2];a:do switch(0|qb){case 16:for(Cc=0;;){if(Bb=Cc,Mb=d,Xb=Mb+216|0,gc=0|f[Xb>>2],rc=gc+44|0,e=0|f[rc>>2],t=Bb>>>0<e>>>0,!t)break a;if(E=Cc,P=d,_=P+216|0,ka=0|f[_>>2],va=ka+12|0,Ga=0|f[va>>2],Ra=Ga+(E<<3)|0,Ec=Ra,Va=Ec,Xa=Va+4|0,Ya=0|f[Xa>>2],Za=16!=(0|Ya),!Za&&($a=Ec,_a=0|f[$a>>2],ab=0|f[_a>>2],bb=ab>>>11,cb=8&bb,db=0!=(0|cb),eb=Ec,gb=0|f[eb>>2],db?(hb=0|f[gb>>2],ib=hb>>>11,jb=496&ib,kb=jb>>4,nb=kb):(lb=gb+12|0,mb=0|f[lb>>2],nb=mb),Dc=nb,ob=0|f[b>>2],pb=0|f[ob>>2],rb=pb>>>11,sb=8&rb,tb=0!=(0|sb),ub=0|f[b>>2],tb?(vb=0|f[ub>>2],wb=vb>>>11,xb=496&wb,yb=xb>>4,Db=yb):(zb=ub+12|0,Ab=0|f[zb>>2],Db=Ab),Cb=(0|nb)!=(0|Db),!Cb&&(Eb=Ec,Fb=0|f[Eb>>2],Gb=0|f[Fb>>2],Hb=Gb>>>11,Ib=8&Hb,Jb=0!=(0|Ib),Kb=Ec,Lb=0|f[Kb>>2],Nb=Lb+12|0,Jb?_b=Nb:(Ob=Nb+8|0,Pb=0|f[Ob>>2],_b=Pb),Qb=0|f[b>>2],Rb=0|f[Qb>>2],Sb=Rb>>>11,Tb=8&Sb,Ub=0!=(0|Tb),Vb=0|f[b>>2],Wb=Vb+12|0,Ub?ac=Wb:(Yb=Wb+8|0,Zb=0|f[Yb>>2],ac=Zb),$b=Dc,bc=0|iv(_b,ac,$b),cc=0==(0|bc))))break;ec=Cc,fc=ec+1|0,Cc=fc}return dc=Cc,c=dc,Ua=c,l=Hc,0|Ua;case 6:for(Cc=0;;){if(hc=Cc,ic=d,jc=ic+216|0,kc=0|f[jc>>2],lc=kc+44|0,mc=0|f[lc>>2],nc=hc>>>0<mc>>>0,!nc)break a;if(oc=Cc,pc=d,qc=pc+216|0,sc=0|f[qc>>2],tc=sc+12|0,uc=0|f[tc>>2],vc=uc+(oc<<3)|0,Ec=vc,wc=Ec,xc=wc+4|0,yc=0|f[xc>>2],zc=6!=(0|yc),!zc&&(Ac=Ec,Bc=+j[Ac>>2],g=+j[b>>2],h=Bc==g))break;k=Cc,n=k+1|0,Cc=n}return i=Cc,c=i,Ua=c,l=Hc,0|Ua;case 3:for(Cc=0;;){if(o=Cc,p=d,q=p+216|0,r=0|f[q>>2],s=r+44|0,u=0|f[s>>2],v=o>>>0<u>>>0,!v)break a;if(w=Cc,x=d,y=x+216|0,z=0|f[y>>2],A=z+12|0,B=0|f[A>>2],C=B+(w<<3)|0,Ec=C,D=Ec,F=D+4|0,G=0|f[F>>2],H=3==(0|G),H&&(I=Ec,J=0|f[I>>2],K=0|f[b>>2],L=(0|J)==(0|K)))break;N=Cc,O=N+1|0,Cc=O}return M=Cc,c=M,Ua=c,l=Hc,0|Ua;default:return c=0,Ua=c,l=Hc,0|Ua}while(0);switch(Q=d,R=Q+216|0,S=0|f[R>>2],T=S+44|0,U=0|f[T>>2],V=d,W=V+220|0,Y=0|f[W>>2],Z=(0|U)==(0|Y),Z&&($=d,aa=$+220|0,ba=0|f[aa>>2],ca=ba<<1,f[aa>>2]=ca,da=d,ea=d,fa=ea+216|0,ga=0|f[fa>>2],ha=ga+12|0,ia=0|f[ha>>2],ja=d,la=ja+220|0,ma=0|f[la>>2],na=ma<<3,oa=0|$t(da,ia,na),pa=d,qa=pa+216|0,ra=0|f[qa>>2],sa=ra+12|0,f[sa>>2]=oa),ta=d,ua=ta+216|0,wa=0|f[ua>>2],xa=wa+44|0,ya=0|f[xa>>2],za=d,Aa=za+216|0,Ba=0|f[Aa>>2],Ca=Ba+12|0,Da=0|f[Ca>>2],Ea=Da+(ya<<3)|0,Ec=Ea,Fa=d,Ha=Fa+216|0,Ia=0|f[Ha>>2],Ja=Ia+44|0,Ka=0|f[Ja>>2],La=Ka+1|0,f[Ja>>2]=La,Cc=Ka,Ma=b+4|0,Na=0|f[Ma>>2],0|Na){case 16:Oa=Ec,Pa=d,Qa=0|f[Pa>>2],f[Fc>>2]=0|f[b>>2],f[Fc+4>>2]=0|f[b+4>>2],dg(Wa,Qa,Fc),f[Oa>>2]=0|f[Wa>>2],f[Oa+4>>2]=0|f[Wa+4>>2];break;case 3:case 6:Sa=Ec,f[Sa>>2]=0|f[b>>2],f[Sa+4>>2]=0|f[b+4>>2]}return Ta=Cc,c=Ta,Ua=c,l=Hc,0|Ua}function yu(a){a|=0;var b=0,c=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Qb=0;Qb=l,l=l+32|0,(0|l)>=(0|m)&&X(),b=a,c=b,da=0|f[c>>2],Ob=da,oa=b,za=oa+216|0,Ka=0|f[za>>2],Nb=Ka,Va=Nb,eb=Va+4|0,d[eb>>0]=0,pb=b,Ab=pb+204|0,g=0|f[Ab>>2],t=0!=(0|g);do if(t){if(E=b,P=b,Z=P+204|0,$=0|f[Z>>2],_=b,aa=_+176|0,ba=0|f[aa>>2],ca=ba<<2,ea=0|$t(E,$,ca),fa=Nb,ga=fa+8|0,f[ga>>2]=ea,ha=b,ia=ha+176|0,ja=0|f[ia>>2],ka=Nb,la=ka+40|0,f[la>>2]=ja,ma=b,na=ma+208|0,pa=0|f[na>>2],qa=0!=(0|pa)){ra=b,sa=b,ta=sa+208|0,ua=0|f[ta>>2],va=b,wa=va+176|0,xa=0|f[wa>>2],ya=xa<<1,Aa=0|$t(ra,ua,ya),Ba=Nb,Ca=Ba+32|0,f[Ca>>2]=Aa;break}Da=Nb,Ea=Da+32|0,f[Ea>>2]=0;break}while(0);return Fa=b,Ga=Nb,Ha=Ga+12|0,Ia=0|f[Ha>>2],Ja=Nb,La=Ja+44|0,Ma=0|f[La>>2],Na=Ma<<3,Oa=0|$t(Fa,Ia,Na),Pa=Nb,Qa=Pa+12|0,f[Qa>>2]=Oa,Ra=b,Sa=Nb,Ta=Sa+16|0,Ua=0|f[Ta>>2],Wa=Nb,Xa=Wa+48|0,Ya=0|f[Xa>>2],Za=Ya<<2,$a=0|$t(Ra,Ua,Za),_a=Nb,ab=_a+16|0,f[ab>>2]=$a,bb=b,cb=Nb,db=cb+20|0,fb=0|f[db>>2],gb=Nb,hb=gb+52|0,ib=0|f[hb>>2],jb=ib<<2,kb=0|$t(bb,fb,jb),lb=Nb,mb=lb+20|0,f[mb>>2]=kb,nb=b,ob=nb+196|0,qb=0|f[ob>>2],(rb=0!=(0|qb))?(sb=b,tb=sb+248|0,ub=0|f[tb>>2],vb=b,wb=vb+244|0,xb=0|e[wb>>1],yb=0|Cn(ub,xb),zb=b,Bb=zb+216|0,Cb=0|f[Bb>>2],Db=Cb+28|0,f[Db>>2]=yb,Eb=Ob,Fb=b,Gb=Fb+216|0,Hb=0|f[Gb>>2],Ib=b,Jb=Ib+240|0,Kb=0|f[Jb>>2],h=b,i=h+176|0,j=0|f[i>>2],0|tr(Eb,Hb,Kb,j),k=b,n=k+196|0,o=0|f[n>>2],p=0|Jv(o),Mb=p,q=b,r=Mb,s=r+1|0,u=0|zu(q,s),Lb=u,v=Lb,w=b,x=w+196|0,y=0|f[x>>2],z=Mb,0|sw(0|v,0|y,0|z),A=Mb,B=Lb,C=B+A|0,d[C>>0]=0,D=Lb,F=Nb,G=F+28|0,f[G>>2]=D,H=b,I=H+232|0,J=0|e[I>>1],K=Nb,e[K>>1]=J,L=b,M=L+234|0,N=0|e[M>>1],O=Nb,Q=O+2|0,e[Q>>1]=N,R=Ob,S=b,T=S+236|0,U=0|f[T>>2],Xc(R,U),V=b,W=V+4|0,Y=0|f[W>>2],ft(Y),void(l=Qb)):(H=b,I=H+232|0,J=0|e[I>>1],K=Nb,e[K>>1]=J,L=b,M=L+234|0,N=0|e[M>>1],O=Nb,Q=O+2|0,e[Q>>1]=N,R=Ob,S=b,T=S+236|0,U=0|f[T>>2],Xc(R,U),V=b,W=V+4|0,Y=0|f[W>>2],ft(Y),void(l=Qb))}function zu(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,r=0;return r=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,e=c,g=0|f[e>>2],h=d,i=0|Kc(g,h),p=i,j=p,(k=0!=(0|j))?(o=p,l=r,0|o):(n=c,_t(n,69487),o=p,l=r,0|o)}function Au(a,b,c){a|=0,b|=0,c|=0;var d=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,ne=0;if(ne=l,l=l+80|0,(0|l)>=(0|m)&&X(),d=a,g=b,mb=c,Bc=d,je=Bc,Mc=d,Xc=0|f[Mc>>2],gd=d,rd=g,Cd=0|f[rd>>2],Nd=0|Yt(Xc,gd,Cd),d=Nd,h=d,u=0==(0|h),u&&(F=je,wu(F,69470)),Q=mb,aa=0!=(0|Q),la=1^aa,wa=1&la,Ha=255&wa,Sa=d,bb=Sa+184|0,nb=255&Ha,yb=0|e[bb>>1],Jb=1&nb,Ub=Jb<<15&65535,dc=32767&yb,oc=dc|Ub,e[bb>>1]=oc,xc=mb,yc=0!=(0|xc),yc&&(zc=d,Ac=0|fu(zc,1),de=Ac,Cc=d,Dc=0|Bu(Cc),Ec=de,Fc=Ec+4|0,f[Fc>>2]=Dc),Gc=g,Hc=Gc+4|0,Ic=0|f[Hc>>2],g=Ic,Jc=g,Kc=0|f[Jc>>2],Lc=0!=(0|Kc)){for(Nc=g,Oc=0|f[Nc>>2],Pc=0|f[Oc>>2],Qc=0|au(Pc),ee=Qc,Rc=g,Sc=0|f[Rc>>2],Tc=0|f[Sc>>2],fe=Tc;;){if(Uc=fe,Vc=0!=(0|Uc),!Vc)break;Wc=fe,Yc=Wc+4|0,Zc=0|f[Yc>>2],fe=Zc}for($c=g,_c=0|f[$c>>2],ad=_c+4|0,bd=0|f[ad>>2],cd=0|f[bd>>2],dd=0|au(cd),ge=dd,ed=g,fd=0|f[ed>>2],hd=fd+4|0,id=0|f[hd>>2],jd=id+4|0,kd=0|f[jd>>2],ld=0|f[kd>>2],md=0!=(0|ld),nd=md?1:0,le=nd,od=g,pd=0|f[od>>2],qd=pd+4|0,sd=0|f[qd>>2],td=sd+4|0,ud=0|f[td>>2],vd=ud+4|0,wd=0|f[vd>>2],xd=0|f[wd>>2],yd=0|au(xd),ie=yd,ce=0,be=0,zd=g,Ad=0|f[zd>>2],Bd=Ad+4|0,Dd=0|f[Bd>>2],Ed=Dd+4|0,Fd=0|f[Ed>>2],Gd=Fd+4|0,Hd=0|f[Gd>>2],Id=Hd+4|0,Jd=0|f[Id>>2],Kd=0!=(0|Jd),Ld=Kd?1:0,Zd=Ld,Md=ee,Od=31&Md,Pd=Od<<18,Qd=ge,Rd=31&Qd,Sd=Rd<<13,Td=Pd|Sd,Ud=le,Vd=1&Ud,Wd=Vd<<12,Xd=Td|Wd,i=ie,j=31&i,k=j<<7,n=Xd|k,o=be,p=31&o,q=p<<2,r=n|q,s=ce,t=1&s,v=t<<1,w=r|v,x=Zd,y=1&x,z=w|y,Yd=z,A=ee,B=ge,C=A+B|0,D=63&C,E=D<<6,G=le,H=1&G,I=H<<5,J=E|I,K=ie,L=31&K,M=J|L,N=d,O=N+184|0,P=65535&M,R=0|e[O>>1],S=32767&P,T=R&-32768,U=T|S,e[O>>1]=U,V=d,W=Yd,Y=33554431&W,Z=Y<<7,$=38|Z,0|du(V,$),_=d,ba=0|Bu(_),ke=ba,_d=0;;){if(ca=_d,da=ge,ea=(0|ca)<(0|da),!ea)break;fa=d,0|Bu(fa),ga=d,0|du(ga,4194199),ha=_d,ia=ha+1|0,_d=ia}for(ja=ge,ka=(0|ja)>0,ka&&(ma=d,0|du(ma,4194199)),na=g,oa=0|f[na>>2],pa=oa+4|0,qa=0|f[pa>>2],ra=0|f[qa>>2],he=ra,_d=0;;){if(sa=he,ta=0!=(0|sa),!ta)break;ua=d,va=ke,xa=_d,ya=va+xa|0,hu(ua,ya),za=d,Aa=he,Ba=0|f[Aa>>2],Ca=Ba+4|0,Da=0|f[Ca>>2],cu(za,Da,1),Ea=d,Fa=he,Ga=0|f[Fa>>2],Ia=0|f[Ga>>2],Ja=Ia,Ka=0|bu(Ea,Ja),ae=Ka,La=d,Ma=La+172|0,Na=0|f[Ma>>2],Oa=Na+-1|0,f[Ma>>2]=Oa,Pa=d,Qa=ae,Ra=511&Qa,Ta=Ra<<23,Ua=1|Ta,Va=d,Wa=Va+172|0,Xa=0|f[Wa>>2],Ya=511&Xa,Za=Ya<<14,$a=Ua|Za,0|nu(Pa,$a,0),_a=_d,ab=_a+1|0,_d=ab,cb=he,db=cb+4|0,eb=0|f[db>>2],he=eb}fb=ge,gb=(0|fb)>0,gb&&(hb=d,ib=ke,jb=_d,kb=ib+jb|0,hu(hb,kb))}lb=d,ob=g,pb=ob+4|0,qb=0|f[pb>>2],rb=0|f[qb>>2],cu(lb,rb,1),sb=d,tb=sb+172|0,ub=0|f[tb>>2],vb=ub+-1|0,f[tb>>2]=vb,wb=d,xb=wb+176|0,zb=0|f[xb>>2],Ab=(0|zb)>0;do if(Ab){if(Bb=d,Cb=Bb+176|0,Db=0|f[Cb>>2],Eb=Db-1|0,Fb=d,Gb=Fb+204|0,Hb=0|f[Gb>>2],Ib=Hb+(Eb<<2)|0,Kb=0|f[Ib>>2],$d=Kb,Lb=$d,Mb=127&Lb,Nb=41!=(0|Mb),!Nb&&(Ob=$d,Pb=Ob>>>14,Qb=511&Pb,Rb=0!=(0|Qb),!Rb&&(Sb=d,Tb=Sb+176|0,Vb=0|f[Tb>>2],Wb=d,Xb=Wb+180|0,Yb=0|f[Xb>>2],Zb=(0|Vb)==(0|Yb),!Zb)))break;if($b=d,_b=$b+234|0,ac=0|e[_b>>1],bc=65535&ac,cc=0==(0|bc),ec=d,cc){0|du(ec,5),fc=d,0|du(fc,41);break}gc=d,hc=gc+172|0,ic=0|f[hc>>2],jc=511&ic,kc=jc<<23,lc=41|kc,0|nu(ec,lc,0);break}while(0);return mc=mb,(nc=0!=(0|mc))?(pc=d,uu(pc,0),qc=d,yu(qc),rc=je,sc=rc+216|0,tc=0|f[sc>>2],uc=tc+52|0,vc=0|f[uc>>2],wc=vc-1|0,l=ne,0|wc):(qc=d,yu(qc),rc=je,sc=rc+216|0,tc=0|f[sc>>2],uc=tc+52|0,vc=0|f[uc>>2],wc=vc-1|0,l=ne,0|wc)}function Bu(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,o=0;return o=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,d=c+176|0,e=0|f[d>>2],g=b,h=g+180|0,f[h>>2]=e,i=b,j=i+176|0,k=0|f[j>>2],l=o,0|k}function Cu(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0;Gb=l,l=l+32|0,(0|l)>=(0|m)&&X(),c=a,d=b,T=c,Eb=T,da=c,oa=d,za=oa+4|0,Ka=0|f[za>>2],Va=0|f[Ka>>2],cu(da,Va,1),eb=c,pb=0|f[eb>>2],e=c,s=0|Yt(pb,e,0),c=s,D=c,M=0==(0|D),M&&(N=Eb,wu(N,69470)),O=c,eu(O),P=c,Q=0|fu(P,2),Cb=Q,R=c,S=0|Bu(R),U=Cb,V=U+4|0,f[V>>2]=S,W=d,Y=0|f[W>>2],Db=Y,Z=c,0|du(Z,33554470),$=Db,_=0|f[$>>2],aa=0!=(0|_),aa?(ba=Db,ca=0|f[ba>>2],ea=ca+4|0,fa=0|f[ea>>2],ga=0!=(0|fa),ga?Fb=7:(ha=Db,ia=ha+4|0,ja=0|f[ia>>2],ka=0!=(0|ja),ka?Fb=7:(la=c,ma=Db,na=0|f[ma>>2],pa=0|f[na>>2],lu(la,pa,1,0)))):Fb=7,7==(0|Fb)&&(qa=c,ra=Db,su(qa,ra,1,1)),sa=c,ta=d,ua=ta+4|0,va=0|f[ua>>2],wa=va+4|0,xa=0|f[wa>>2],ya=0|f[xa>>2],cu(sa,ya,1),Aa=c,Ba=Aa+172|0,Ca=0|f[Ba>>2],Da=Ca+-1|0,f[Ba>>2]=Da,Ea=c,Fa=Ea+176|0,Ga=0|f[Fa>>2],Ha=(0|Ga)>0;do if(Ha){if(Ia=c,Ja=Ia+176|0,La=0|f[Ja>>2],Ma=La-1|0,Na=c,Oa=Na+204|0,Pa=0|f[Oa>>2],Qa=Pa+(Ma<<2)|0,Ra=0|f[Qa>>2],Ab=Ra,Sa=Ab,Ta=127&Sa,Ua=41!=(0|Ta),!Ua&&(Wa=Ab,Xa=Wa>>>14,Ya=511&Xa,Za=0!=(0|Ya),!Za&&($a=c,_a=$a+176|0,ab=0|f[_a>>2],bb=c,cb=bb+180|0,db=0|f[cb>>2],fb=(0|ab)==(0|db),!fb)))break;gb=c,hb=c,ib=hb+172|0,jb=0|f[ib>>2],kb=511&jb,lb=kb<<23,mb=41|lb,0|nu(gb,mb,0)}while(0);nb=c,uu(nb,0),ob=c,yu(ob),qb=Eb,c=qb,rb=c,sb=c,tb=sb+172|0,ub=0|f[tb>>2],vb=511&ub,wb=vb<<23,xb=64|wb,yb=c,zb=yb+216|0,g=0|f[zb>>2],h=g+52|0,i=0|f[h>>2],j=i-1|0,k=16383&j,n=k<<9,o=256|n,p=xb|o,0|du(rb,p),q=c,r=q+172|0,t=0|f[r>>2],u=t+-1|0,f[r>>2]=u,v=c,w=c,x=0|f[w>>2],y=0|ki(x,69498,4),z=0|ju(v,y),Bb=z,A=c,B=c,C=B+172|0,E=0|f[C>>2],F=511&E,G=F<<23,H=33|G,I=Bb,J=511&I,K=J<<14,L=H|K,0|du(A,L),l=Gb}function Du(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0;for(s=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a;;){if(h=c,i=0!=(0|h),!i){r=6;break}if(j=c,k=0|f[j>>2],n=0|f[k>>2],o=n,p=66==(0|o)){r=4;break}q=c,d=q+4|0,e=0|f[d>>2],c=e}return 4==(0|r)?(b=0,g=b,l=s,0|g):6==(0|r)?(b=1,g=b,l=s,0|g):0}function Eu(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,ab=0;if(ab=l,l=l+16|0,(0|l)>=(0|m)&&X(),c=a,d=b,r=c,C=r+188|0,N=0|f[C>>2],Z=0!=(0|N),!Z)return ia=c,ta=d,cu(ia,ta,0),Ea=c,wu(Ea,69517),void(l=ab);for(Pa=d,e=0!=(0|Pa),e&&(g=c,h=d,cu(g,h,1),i=c,j=i+172|0,k=0|f[j>>2],n=k+-1|0,f[j>>2]=n),o=c,p=o+188|0,q=0|f[p>>2],Za=q;;){if(s=Za,t=0!=(0|s),!t)break;if(u=Za,v=0|f[u>>2],w=3==(0|v),!w)break;x=c,0|nu(x,8388636,0),y=Za,z=y+24|0,A=0|f[z>>2],Za=A}for(;;){if(B=Za,D=0!=(0|B),D?(E=Za,F=0|f[E>>2],G=4==(0|F),Ya=G):Ya=0,H=Za,!Ya)break;I=H+24|0,J=0|f[I>>2],Za=J}return K=0!=(0|H),K||(L=c,_t(L,69517)),M=Za,O=0|f[M>>2],P=0==(0|O),Q=c,P?(R=Q+192|0,S=0|f[R>>2],T=c,U=T+188|0,V=0|f[U>>2],W=V+20|0,Y=0|f[W>>2],$=(0|S)>(0|Y),$&&(_=c,aa=c,ba=aa+192|0,ca=0|f[ba>>2],da=c,ea=da+188|0,fa=0|f[ea>>2],ga=fa+20|0,ha=0|f[ga>>2],ja=ca-ha|0,ka=511&ja,la=ka<<23,ma=31|la,0|nu(_,ma,0)),na=d,oa=0!=(0|na),oa&&(pa=c,qa=Za,ra=qa+16|0,sa=0|f[ra>>2],ua=511&sa,va=ua<<23,wa=1|va,xa=c,ya=xa+172|0,za=0|f[ya>>2],Aa=511&za,Ba=Aa<<14,Ca=wa|Ba,0|nu(pa,Ca,0)),Da=c,Fa=Za,Ga=Fa+12|0,Ha=0|f[Ga>>2],Ia=Ha+32767|0,Ja=65535&Ia,Ka=Ja<<7,La=23|Ka,Ma=0|du(Da,La),$a=Ma,Na=$a,Oa=Za,Qa=Oa+12|0,f[Qa>>2]=Na,void(l=ab)):(Ra=c,Sa=Ra+172|0,Ta=0|f[Sa>>2],Ua=511&Ta,Va=Ua<<23,Wa=41|Va,Xa=16384|Wa,0|du(Q,Xa),void(l=ab))}function Fu(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,i=0;i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,c=b,d=g+4|0,f[d>>2]=3,e=c,f[g>>2]=e,f[a>>2]=0|f[g>>2],f[a+4>>2]=0|f[g+4>>2],l=i}function Gu(a,b,c,e,f){a|=0,b|=0,c|=0,e|=0,f|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0;for(Ia=l,l=l+48|0,(0|l)>=(0|m)&&X(),h=a,u=b,F=c,Q=e,ba=f,ma=u,xa=u,Ba=0|Jv(xa),Ca=ma+Ba|0,Ea=Ca,Ga=0,i=u,j=0|d[i>>0],k=j<<24>>24,n=43==(0|k),n&&(o=u,p=o+1|0,u=p);;){if(q=u,r=Ea,s=q>>>0<r>>>0,!s){Ha=18;break}for(t=u,v=0|d[t>>0],Da=v,w=Da,x=255&w,y=0|Xu(x),z=255&y,Da=z,Fa=0;;){if(A=Fa,B=F,C=(0|A)<(0|B),!C)break;if(D=Fa,E=55345+D|0,G=0|d[E>>0],H=G<<24>>24,I=Da,J=I<<24>>24,K=(0|H)==(0|J))break;L=Fa,M=L+1|0,Fa=M}if(N=Fa,O=F,P=(0|N)==(0|O),P&&(R=h,_t(R,69585)),S=Q,T=S<<24>>24!=0,V=Fa,T){if(W=-2147483648+V|0,Y=F,Z=(0|W)/(0|Y)&-1,$=Ga,_=(0|Z)>(0|$)){Ha=12;break}ca=F,da=Ga,ea=0|U(da,ca),Ga=ea,fa=Fa,ga=Ga,ha=ga-fa|0,Ga=ha}else{if(ia=2147483647-V|0,ja=F,ka=(0|ia)/(0|ja)&-1,la=Ga,na=(0|ka)<(0|la)){Ha=15;break}pa=F,qa=Ga,ra=0|U(qa,pa),Ga=ra,sa=Fa,ta=Ga,ua=ta+sa|0,Ga=ua}va=u,wa=va+1|0,u=wa}return 12==(0|Ha)?(aa=ba,d[aa>>0]=1,g=0,Aa=g,l=Ia,0|Aa):15==(0|Ha)?(oa=ba,d[oa>>0]=1,g=0,Aa=g,l=Ia,0|Aa):18==(0|Ha)?(ya=ba,d[ya>>0]=0,za=Ga,g=za,Aa=g,l=Ia,0|Aa):0}function Hu(a,b,c){a|=0,
+b|=0,c|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0;for(ha=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,f=b,s=c,D=f,O=f,Z=0|Jv(O),$=D+Z|0,da=$,ea=0,_=f,aa=0|d[_>>0],ba=aa<<24>>24,g=43==(0|ba),g&&(h=f,i=h+1|0,f=i);;){if(j=f,k=da,n=j>>>0<k>>>0,!n)break;for(o=f,p=0|d[o>>0],ca=p,q=ca,r=255&q,t=0|Xu(r),u=255&t,ca=u,fa=0;;){if(v=fa,w=s,x=(0|v)<(0|w),!x)break;if(y=fa,z=55345+y|0,A=0|d[z>>0],B=A<<24>>24,C=ca,E=C<<24>>24,F=(0|B)==(0|E)){ga=7;break}P=fa,Q=P+1|0,fa=Q}7==(0|ga)&&(ga=0,G=s,H=+(0|G),I=ea,J=I*H,ea=J,K=fa,L=+(0|K),M=ea,N=M+L,ea=N),R=fa,S=s,T=(0|R)==(0|S),T&&(U=e,_t(U,69585)),V=f,W=V+1|0,f=W}return Y=ea,l=ha,+Y}function Iu(a,b,c){a|=0,b|=0,c=+c;var d=0,e=0,g=0,h=0,i=0,n=0;n=l,l=l+16|0,(0|l)>=(0|m)&&X(),i=n,d=b,e=c,g=i+4|0,f[g>>2]=6,h=e,j[i>>2]=h,f[a>>2]=0|f[i>>2],f[a+4>>2]=0|f[i+4>>2],l=n}function Ju(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0;if(jb=l,l=l+32|0,(0|l)>=(0|m)&&X(),e=a,g=b,z=c,K=d,V=K,fa=0!=(0|V),!fa){for(;;){if(ab=g,bb=0!=(0|ab),!bb)break;switch(cb=g,db=0|f[cb>>2],eb=0|f[db>>2],fb=eb,0|fb){case 4:case 17:i=e,j=g,k=0|f[j>>2],cu(i,k,0)}n=g,o=n+4|0,p=0|f[o>>2],g=p}return void(l=jb)}for(gb=0,hb=0;;){if(qa=g,Ba=0!=(0|qa),!Ba)break;switch(Ma=g,Xa=0|f[Ma>>2],h=0|f[Xa>>2],q=h,0|q){case 55:r=g,s=r+4|0,t=0|f[s>>2],u=0==(0|t),u?(v=g,w=0|f[v>>2],x=w+4|0,y=0|f[x>>2],A=y+4|0,B=0|f[A>>2],C=B,D=0==(0|C),D||(ib=7)):ib=7;break;case 17:ib=7;break;case 100:J=hb,L=(0|J)>0,L&&(hb=0,M=gb,N=M+1|0,gb=N,O=z,P=O<<24>>24!=0,P&&(Q=e,Ku(Q)))}7==(0|ib)&&(ib=0,E=e,F=g,G=0|f[F>>2],cu(E,G,1),H=hb,I=H+1|0,hb=I),R=hb,S=(0|R)>=2,S&&(T=e,U=T+172|0,W=0|f[U>>2],Y=W+-1|0,f[U>>2]=Y,Z=e,$=Z+172|0,_=0|f[$>>2],aa=_+-1|0,f[$>>2]=aa,ba=e,ca=e,da=ca+172|0,ea=0|f[da>>2],ga=511&ea,ha=ga<<23,ia=62|ha,ja=e,ka=ja+172|0,la=0|f[ka>>2],ma=la+1|0,na=511&ma,oa=na<<14,pa=ia|oa,0|nu(ba,pa,1),ra=e,eu(ra),hb=1),sa=g,ta=sa+4|0,ua=0|f[ta>>2],g=ua}va=hb,wa=(0|va)>0,wa&&(xa=gb,ya=xa+1|0,gb=ya,za=z,Aa=za<<24>>24!=0,Aa&&(Ca=e,Ku(Ca))),Da=gb,Ea=e,Fa=Ea+172|0,Ga=0|f[Fa>>2],Ha=Ga-Da|0,f[Fa>>2]=Ha,Ia=e,Ja=e,Ka=Ja+172|0,La=0|f[Ka>>2],Na=511&La,Oa=Na<<23,Pa=55|Oa,Qa=e,Ra=Qa+172|0,Sa=0|f[Ra>>2],Ta=511&Sa,Ua=Ta<<14,Va=Pa|Ua,Wa=gb,Ya=127&Wa,Za=Ya<<7,$a=Va|Za,0|du(Ia,$a),_a=e,eu(_a),l=jb}function Ku(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0;A=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,q=c+172|0,s=0|f[q>>2],t=s+-1|0,f[q>>2]=t,u=b,v=b,w=v+172|0,x=0|f[w>>2],y=511&x,d=y<<23,e=32|d,g=b,h=b,i=0|f[h>>2],j=0|ki(i,69611,6),k=0|ju(g,j),n=511&k,o=n<<14,p=e|o,0|du(u,p),r=b,eu(r),l=A}function Lu(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,0|qp(c,69668),l=e}function Mu(a){a|=0;var b=0,c=0,e=0;e=l,l=l+16|0,(0|l)>=(0|m)&&X(),b=a,c=b,0|qp(c,69679),l=e}function Nu(a){a|=0;var b=0,c=0,d=0,e=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,b=a+60|0,c=0|f[b>>2],f[g>>2]=c,d=0|Ma(6,0|g),e=0|Ou(d),l=i,0|e}function Ou(a){a|=0;var b=0,c=0,d=0,e=0,h=0;return h=l,c=a>>>0>4294963200,c?(d=0-a|0,e=0|Pu(),f[e>>2]=d,b=-1):b=a,0|b}function Pu(){var a=0,b=0,c=0,d=0,e=0,g=0,i=0;return i=l,b=0|f[18724],c=0==(0|b),c?a=74940:(d=0|Aw(),e=d+64|0,g=0|f[e>>2],a=g),0|a}function Qu(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,va=0,wa=0,xa=0,ya=0;for(ya=l,l=l+48|0,(0|l)>=(0|m)&&X(),ra=ya+16|0,qa=ya,oa=ya+32|0,h=a+28|0,i=0|f[h>>2],f[oa>>2]=i,v=oa+4|0,G=a+20|0,R=0|f[G>>2],ba=R-i|0,f[v>>2]=ba,ca=oa+8|0,f[ca>>2]=b,da=oa+12|0,f[da>>2]=c,ea=ba+c|0,fa=a+60|0,j=a+44|0,ia=oa,la=2,pa=ea;;){if(k=0|f[18724],n=0==(0|k),n?(r=0|f[fa>>2],f[ra>>2]=r,va=ra+4|0,f[va>>2]=ia,wa=ra+8|0,f[wa>>2]=la,s=0|Sa(146,0|ra),t=0|Ou(s),ga=t):(za(334,0|a),o=0|f[fa>>2],f[qa>>2]=o,sa=qa+4|0,f[sa>>2]=ia,ta=qa+8|0,f[ta>>2]=la,p=0|Sa(146,0|qa),q=0|Ou(p),ua(0),ga=q),u=(0|pa)==(0|ga)){xa=6;break}if(C=(0|ga)<0){ja=ia,ma=la,xa=8;break}L=pa-ga|0,M=ia+4|0,N=0|f[M>>2],O=ga>>>0>N>>>0,O?(P=0|f[j>>2],f[h>>2]=P,f[G>>2]=P,Q=ga-N|0,S=ia+8|0,T=la+-1|0,e=ia+12|0,g=0|f[e>>2],aa=g,ha=Q,ka=S,na=T):(U=2==(0|la),U?(V=0|f[h>>2],W=V+ga|0,f[h>>2]=W,aa=N,ha=ga,ka=ia,na=2):(aa=N,ha=ga,ka=ia,na=la)),Y=0|f[ka>>2],Z=Y+ha|0,f[ka>>2]=Z,$=ka+4|0,_=aa-ha|0,f[$>>2]=_,ia=ka,la=na,pa=L}return 6==(0|xa)?(w=0|f[j>>2],x=a+48|0,y=0|f[x>>2],z=w+y|0,A=a+16|0,f[A>>2]=z,B=w,f[h>>2]=B,f[G>>2]=B,d=c):8==(0|xa)&&(D=a+16|0,f[D>>2]=0,f[h>>2]=0,f[G>>2]=0,E=0|f[a>>2],F=32|E,f[a>>2]=F,H=2==(0|ma),H?d=0:(I=ja+4|0,J=0|f[I>>2],K=c-J|0,d=K)),l=ya,0|d}function Ru(a){a|=0;var b=0,c=0,d=0,g=0;g=l,b=a+68|0,c=0|f[b>>2],d=0==(0|c),d&&Su(a)}function Su(a){a|=0;var c=0;c=l}function Tu(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,u=0;return u=l,l=l+32|0,(0|l)>=(0|m)&&X(),o=u,n=u+20|0,e=a+60|0,g=0|f[e>>2],f[o>>2]=g,p=o+4|0,f[p>>2]=0,q=o+8|0,f[q>>2]=b,r=o+12|0,f[r>>2]=n,s=o+16|0,f[s>>2]=c,h=0|Pa(140,0|o),i=0|Ou(h),j=(0|i)<0,j?(f[n>>2]=-1,k=-1):(d=0|f[n>>2],k=d),l=u,0|k}function Uu(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,fa=0;return fa=l,l=l+48|0,(0|l)>=(0|m)&&X(),_=fa+16|0,$=fa,Z=fa+32|0,f[Z>>2]=b,h=Z+4|0,i=a+48|0,v=0|f[i>>2],G=0!=(0|v),R=1&G,S=c-R|0,f[h>>2]=S,T=Z+8|0,U=a+44|0,V=0|f[U>>2],f[T>>2]=V,W=Z+12|0,f[W>>2]=v,j=0|f[18724],k=0==(0|j),k?(r=a+60|0,s=0|f[r>>2],f[_>>2]=s,ca=_+4|0,f[ca>>2]=Z,da=_+8|0,f[da>>2]=2,t=0|Ra(145,0|_),u=0|Ou(t),Y=u):(za(335,0|a),n=a+60|0,o=0|f[n>>2],f[$>>2]=o,aa=$+4|0,f[aa>>2]=Z,ba=$+8|0,f[ba>>2]=2,p=0|Ra(145,0|$),q=0|Ou(p),ua(0),Y=q),w=(0|Y)<1,w?(x=48&Y,y=16^x,z=0|f[a>>2],A=z|y,f[a>>2]=A,B=a+8|0,f[B>>2]=0,C=a+4|0,f[C>>2]=0,e=Y):(D=0|f[h>>2],E=Y>>>0>D>>>0,E?(F=Y-D|0,H=0|f[U>>2],I=a+4|0,f[I>>2]=H,g=H,J=g+F|0,K=a+8|0,f[K>>2]=J,L=0|f[i>>2],M=0==(0|L),M?e=c:(N=g+1|0,f[I>>2]=N,O=0|d[g>>0],P=c+-1|0,Q=b+P|0,d[Q>>0]=O,e=c)):e=Y),l=fa,0|e}function Vu(a){a|=0;var b=0,c=0,d=0,g=0;g=l,b=a+68|0,c=0|f[b>>2],d=0==(0|c),d&&Su(a)}function Wu(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;return w=l,l=l+80|0,(0|l)>=(0|m)&&X(),s=w,r=w+12|0,e=a+36|0,f[e>>2]=2,g=0|f[a>>2],h=64&g,i=0==(0|h),i&&(j=a+60|0,k=0|f[j>>2],f[s>>2]=k,t=s+4|0,f[t>>2]=21505,u=s+8|0,f[u>>2]=r,n=0|Ha(54,0|s),o=0==(0|n),o||(p=a+75|0,d[p>>0]=-1)),q=0|Qu(a,b,c),l=w,0|q}function Xu(a){a|=0;var b=0,c=0,d=0,e=0,g=0;return g=l,c=0|Yu(a),d=0==(0|c),e=32|a,b=d?a:e,0|b}function Yu(a){a|=0;var b=0,c=0,d=0,f=0;return f=l,b=a+-65|0,c=b>>>0<26,d=1&c,0|d}function Zu(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;return B=l,l=l+112|0,(0|l)>=(0|m)&&X(),z=B,f[z>>2]=0,r=z+4|0,f[r>>2]=a,s=z+44|0,f[s>>2]=a,t=(0|a)<0,u=a+2147483647|0,g=t?-1:u,v=z+8|0,f[v>>2]=g,w=z+76|0,f[w>>2]=-1,$u(z,0),x=0|_u(z,c,1,d,e),y=F,h=0==(0|b),h||(i=z+108|0,j=0|f[i>>2],k=0|f[r>>2],n=0|f[v>>2],o=k+j|0,p=o-n|0,q=a+p|0,f[b>>2]=q),F=y,l=B,0|x}function $u(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,t=0;t=l,c=a+104|0,f[c>>2]=b,d=a+8|0,i=0|f[d>>2],j=a+4|0,k=0|f[j>>2],m=i-k|0,n=a+108|0,f[n>>2]=m,o=0!=(0|b),p=(0|m)>(0|b),r=o&p,r?(q=k,e=q+b|0,g=a+100|0,f[g>>2]=e):(h=a+100|0,f[h>>2]=i)}function _u(a,b,c,e,g){a|=0,b|=0,c|=0,e|=0,g|=0;var h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,V=0,W=0,X=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0,wf=0,xf=0,yf=0;yf=l,xb=b>>>0>36;a:do if(xb)Sd=0|Pu(),f[Sd>>2]=22,ld=0,md=0;else{for(wd=a+4|0,Hd=a+100|0;;)if(be=0|f[wd>>2],me=0|f[Hd>>2],xe=be>>>0<me>>>0,xe?(Ie=be+1|0,f[wd>>2]=Ie,t=0|d[be>>0],E=255&t,aa=E):(Q=0|av(a),aa=Q),la=0|dv(aa),wa=0==(0|la)){s=aa;break}Ha=45==(0|s);b:do switch(0|s){case 43:case 45:if(Sa=Ha<<31>>31,bb=0|f[wd>>2],mb=0|f[Hd>>2],yb=bb>>>0<mb>>>0){Jb=bb+1|0,f[wd>>2]=Jb,Ub=0|d[bb>>0],dc=255&Ub,Te=dc,mf=Sa;break b}oc=0|av(a),Te=oc,mf=Sa;break b;default:Te=s,mf=0}while(0);zc=0==(0|b),Kc=16|b,Vc=16==(0|Kc),ed=48==(0|Te),sf=Vc&ed;do if(sf){if(pd=0|f[wd>>2],xd=0|f[Hd>>2],yd=pd>>>0<xd>>>0,yd?(zd=pd+1|0,f[wd>>2]=zd,Ad=0|d[pd>>0],Bd=255&Ad,Ed=Bd):(Cd=0|av(a),Ed=Cd),Dd=32|Ed,Fd=120==(0|Dd),!Fd){if(zc){j=8,Ve=Ed,xf=46;break}h=b,Ue=Ed,xf=32;break}if(Gd=0|f[wd>>2],Id=0|f[Hd>>2],Jd=Gd>>>0<Id>>>0,Jd?(Kd=Gd+1|0,f[wd>>2]=Kd,Ld=0|d[Gd>>0],Md=255&Ld,Pd=Md):(Nd=0|av(a),Pd=Nd),Od=69691+Pd|0,Qd=0|d[Od>>0],Rd=(255&Qd)>15){if(Td=0|f[Hd>>2],Ud=0==(0|Td),Ud||(Vd=0|f[wd>>2],Wd=Vd+-1|0,f[wd>>2]=Wd),Xd=0==(0|c)){$u(a,0),ld=0,md=0;break a}if(Ud){ld=0,md=0;break a}Yd=0|f[wd>>2],Zd=Yd+-1|0,f[wd>>2]=Zd,ld=0,md=0;break a}j=16,Ve=Pd,xf=46}else{if(k=zc?10:b,$d=69691+Te|0,_d=0|d[$d>>0],ae=255&_d,ce=ae>>>0<k>>>0,!ce){de=0|f[Hd>>2],ee=0==(0|de),ee||(fe=0|f[wd>>2],ge=fe+-1|0,f[wd>>2]=ge),$u(a,0),he=0|Pu(),f[he>>2]=22,ld=0,md=0;break a}h=k,Ue=Te,xf=32}while(0);if(32==(0|xf))if(ie=10==(0|h)){if(je=Ue+-48|0,ke=je>>>0<10){for(oe=je,uf=0;;){if(le=10*uf|0,ne=le+oe|0,pe=0|f[wd>>2],qe=0|f[Hd>>2],re=pe>>>0<qe>>>0,re?(se=pe+1|0,f[wd>>2]=se,te=0|d[pe>>0],ue=255&te,We=ue):(ve=0|av(a),We=ve),we=We+-48|0,ye=we>>>0<10,ze=ne>>>0<429496729,Ae=ye&ze,!Ae){r=ne,Xe=We;break}oe=we,uf=ne}nd=r,od=0,Ye=Xe}else nd=0,od=0,Ye=Ue;if(Be=Ye+-48|0,Ce=Be>>>0<10){for(De=nd,Ee=od,He=Be,_e=Ye;;){if(Fe=0|xw(0|De,0|Ee,10,0),Ge=F,Je=(0|He)<0,Ke=Je<<31>>31,Le=He^-1,Me=Ke^-1,Ne=Ge>>>0>Me>>>0,Oe=Fe>>>0>Le>>>0,Pe=(0|Ge)==(0|Me),Qe=Pe&Oe,Re=Ne|Qe){m=He,qd=De,rd=Ee,$e=_e;break}if(Se=0|mw(0|Fe,0|Ge,0|He,0|Ke),u=F,v=0|f[wd>>2],w=0|f[Hd>>2],x=v>>>0<w>>>0,x?(y=v+1|0,f[wd>>2]=y,z=0|d[v>>0],A=255&z,Ze=A):(B=0|av(a),Ze=B),C=Ze+-48|0,D=C>>>0<10,G=u>>>0<429496729,H=Se>>>0<2576980378,I=429496729==(0|u),J=I&H,K=G|J,tf=D&K,!tf){m=C,qd=Se,rd=u,$e=Ze;break}De=Se,Ee=u,He=C,_e=Ze}L=m>>>0>9,L?(Jc=rd,Mc=qd,of=mf):(i=10,sd=qd,td=rd,kf=$e,xf=72)}else Jc=od,Mc=nd,of=mf}else j=h,Ve=Ue,xf=46;b:do if(46==(0|xf)){if(M=j+-1|0,N=M&j,O=0==(0|N)){if(V=23*j|0,W=V>>>5,X=7&W,Y=69947+X|0,Z=0|d[Y>>0],$=Z<<24>>24,_=69691+Ve|0,ba=0|d[_>>0],ca=255&ba,da=ca>>>0<j>>>0){for(ga=ca,vf=0;;){if(ea=vf<<$,fa=ga|ea,ha=0|f[wd>>2],ia=0|f[Hd>>2],ja=ha>>>0<ia>>>0,ja?(ka=ha+1|0,f[wd>>2]=ka,ma=0|d[ha>>0],na=255&ma,af=na):(oa=0|av(a),af=oa),pa=69691+af|0,qa=0|d[pa>>0],ra=255&qa,sa=ra>>>0<j>>>0,ta=fa>>>0<134217728,ua=ta&sa,!ua){n=fa,o=qa,bf=af;break}ga=ra,vf=fa}za=o,Ba=0,Da=n,cf=bf}else za=ba,Ba=0,Da=0,cf=Ve;if(va=0|qw(-1,-1,0|$),xa=F,ya=255&za,Aa=ya>>>0>=j>>>0,Ca=Ba>>>0>xa>>>0,Ea=Da>>>0>va>>>0,Fa=(0|Ba)==(0|xa),Ga=Fa&Ea,Ia=Ca|Ga,rf=Aa|Ia){i=j,sd=Da,td=Ba,kf=cf,xf=72;break}for(Ja=Da,Ka=Ba,Oa=za;;){if(La=0|ow(0|Ja,0|Ka,0|$),Ma=F,Na=255&Oa,Pa=Na|La,Qa=0|f[wd>>2],Ra=0|f[Hd>>2],Ta=Qa>>>0<Ra>>>0,Ta?(Ua=Qa+1|0,f[wd>>2]=Ua,Va=0|d[Qa>>0],Wa=255&Va,df=Wa):(Xa=0|av(a),df=Xa),Ya=69691+df|0,Za=0|d[Ya>>0],$a=255&Za,_a=$a>>>0>=j>>>0,ab=Ma>>>0>xa>>>0,cb=Pa>>>0>va>>>0,db=(0|Ma)==(0|xa),eb=db&cb,fb=ab|eb,pf=_a|fb){i=j,sd=Pa,td=Ma,kf=df,xf=72;break b}Ja=Pa,Ka=Ma,Oa=Za}}if(P=69691+Ve|0,R=0|d[P>>0],S=255&R,T=S>>>0<j>>>0){for(ib=S,wf=0;;){if(gb=0|U(wf,j),hb=ib+gb|0,jb=0|f[wd>>2],kb=0|f[Hd>>2],lb=jb>>>0<kb>>>0,lb?(nb=jb+1|0,f[wd>>2]=nb,ob=0|d[jb>>0],pb=255&ob,ef=pb):(qb=0|av(a),ef=qb),rb=69691+ef|0,sb=0|d[rb>>0],tb=255&sb,ub=tb>>>0<j>>>0,vb=hb>>>0<119304647,wb=vb&ub,!wb){p=hb,q=sb,ff=ef;break}ib=tb,wf=hb}Ab=q,ud=p,vd=0,gf=ff}else Ab=R,ud=0,vd=0,gf=Ve;if(zb=255&Ab,Bb=zb>>>0<j>>>0)for(Cb=0|vw(-1,-1,0|j,0),Db=F,Eb=vd,Gb=ud,Pb=Ab,jf=gf;;){if(Fb=Eb>>>0>Db>>>0,Hb=Gb>>>0>Cb>>>0,Ib=(0|Eb)==(0|Db),Kb=Ib&Hb,Lb=Fb|Kb){i=j,sd=Gb,td=Eb,kf=jf,xf=72;break b}if(Mb=0|xw(0|Gb,0|Eb,0|j,0),Nb=F,Ob=255&Pb,Qb=Ob^-1,Rb=Nb>>>0>4294967295,Sb=Mb>>>0>Qb>>>0,Tb=(0|Nb)==-1,Vb=Tb&Sb,Wb=Rb|Vb){i=j,sd=Gb,td=Eb,kf=jf,xf=72;break b}if(Xb=0|mw(0|Ob,0,0|Mb,0|Nb),Yb=F,Zb=0|f[wd>>2],$b=0|f[Hd>>2],_b=Zb>>>0<$b>>>0,_b?(ac=Zb+1|0,f[wd>>2]=ac,bc=0|d[Zb>>0],cc=255&bc,hf=cc):(ec=0|av(a),hf=ec),fc=69691+hf|0,gc=0|d[fc>>0],hc=255&gc,ic=hc>>>0<j>>>0,!ic){i=j,sd=Xb,td=Yb,kf=hf,xf=72;break}Eb=Yb,Gb=Xb,Pb=gc,jf=hf}else i=j,sd=ud,td=vd,kf=gf,xf=72}while(0);if(72==(0|xf))if(jc=69691+kf|0,kc=0|d[jc>>0],lc=255&kc,mc=lc>>>0<i>>>0){for(;;)if(nc=0|f[wd>>2],pc=0|f[Hd>>2],qc=nc>>>0<pc>>>0,qc?(rc=nc+1|0,f[wd>>2]=rc,sc=0|d[nc>>0],tc=255&sc,lf=tc):(uc=0|av(a),lf=uc),vc=69691+lf|0,wc=0|d[vc>>0],xc=255&wc,yc=xc>>>0<i>>>0,!yc)break;Ac=0|Pu(),f[Ac>>2]=34,Bc=1&e,Cc=0==(0|Bc),Dc=!0,Ec=Cc&Dc,nf=Ec?mf:0,Jc=g,Mc=e,of=nf}else Jc=td,Mc=sd,of=mf;if(Fc=0|f[Hd>>2],Gc=0==(0|Fc),Gc||(Hc=0|f[wd>>2],Ic=Hc+-1|0,f[wd>>2]=Ic),Lc=Jc>>>0<g>>>0,Nc=Mc>>>0<e>>>0,Oc=(0|Jc)==(0|g),Pc=Oc&Nc,Qc=Lc|Pc,!Qc){if(Rc=1&e,Sc=0!=(0|Rc),Tc=!1,Uc=Sc|Tc,Wc=0!=(0|of),qf=Uc|Wc,!qf){Xc=0|Pu(),f[Xc>>2]=34,Yc=0|mw(0|e,0|g,-1,-1),Zc=F,ld=Zc,md=Yc;break}if($c=Jc>>>0>g>>>0,_c=Mc>>>0>e>>>0,ad=(0|Jc)==(0|g),bd=ad&_c,cd=$c|bd){dd=0|Pu(),f[dd>>2]=34,ld=g,md=e;break}}fd=(0|of)<0,gd=fd<<31>>31,hd=Mc^of,id=Jc^gd,jd=0|lw(0|hd,0|id,0|of,0|gd),kd=F,ld=kd,md=jd}while(0);return F=ld,0|md}function av(a){a|=0;var b=0,c=0,e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0;return $=l,i=a+104|0,j=0|f[i>>2],v=0==(0|j),v?Z=3:(G=a+108|0,R=0|f[G>>2],U=(0|R)<(0|j),Z=U?3:4),3==(0|Z)&&(V=0|bv(a),W=(0|V)<0,W?Z=4:(Y=0|f[i>>2],k=0==(0|Y),c=a+8|0,g=0|f[c>>2],k?(m=g,T=m,Z=9):(n=a+4|0,o=0|f[n>>2],p=o,q=g-p|0,r=a+108|0,s=0|f[r>>2],t=Y-s|0,u=(0|q)<(0|t),w=g,u?(T=w,Z=9):(x=t+-1|0,y=o+x|0,z=a+100|0,f[z>>2]=y,B=w)),9==(0|Z)&&(A=a+100|0,f[A>>2]=g,B=T),C=0==(0|B),e=a+4|0,C?(h=0|f[e>>2],N=h):(D=0|f[e>>2],E=B,F=a+108|0,H=0|f[F>>2],I=E+1|0,J=I-D|0,K=J+H|0,f[F>>2]=K,L=D,N=L),M=N+-1|0,O=0|d[M>>0],P=255&O,Q=(0|P)==(0|V),Q?b=V:(S=255&V,d[M>>0]=S,b=V))),4==(0|Z)&&(X=a+100|0,f[X>>2]=0,b=-1),0|b}function bv(a){a|=0;var b=0,c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;return t=l,l=l+16|0,(0|l)>=(0|m)&&X(),r=t,c=a+8|0,e=0|f[c>>2],h=0==(0|e),h?(i=0|cv(a),j=0==(0|i),j?s=3:b=-1):s=3,3==(0|s)&&(k=a+32|0,n=0|f[k>>2],o=0|Yw[511&n](a,r,1),p=1==(0|o),p?(q=0|d[r>>0],g=255&q,b=g):b=-1),l=t,0|b}function cv(a){a|=0;var b=0,c=0,e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;return E=l,c=a+74|0,e=0|d[c>>0],r=e<<24>>24,w=r+255|0,x=w|r,y=255&x,d[c>>0]=y,z=a+20|0,A=0|f[z>>2],B=a+44|0,C=0|f[B>>2],g=A>>>0>C>>>0,g&&(h=a+36|0,i=0|f[h>>2],0|Yw[511&i](a,0,0)),j=a+16|0,f[j>>2]=0,k=a+28|0,f[k>>2]=0,f[z>>2]=0,m=0|f[a>>2],n=20&m,o=0==(0|n),o?(t=0|f[B>>2],u=a+8|0,f[u>>2]=t,v=a+4|0,f[v>>2]=t,b=0):(p=4&m,q=0==(0|p),q?b=-1:(s=32|m,f[a>>2]=s,b=-1)),0|b}function dv(a){a|=0;var b=0,c=0,d=0,e=0,f=0,h=0;return h=l,b=32==(0|a),c=a+-9|0,d=c>>>0<5,e=b|d,f=1&e,0|f}function ev(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0;return g=l,d=0|Zu(a,b,c,-1,0),e=F,0|d}function fv(a,b){a=+a,b=+b;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,m=0,p=0;return p=l,k[n>>3]=b,c=0|f[n>>2],d=0|f[n+4>>2],m=+H(+a),k[n>>3]=m,e=0|f[n>>2],g=0|f[n+4>>2],h=d&-2147483648,i=h|g,f[n>>2]=e,f[n+4>>2]=i,j=+k[n>>3],+j}function gv(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,V=0,W=0,X=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0;ka=l,p=255&b,q=a,B=3&q,M=0!=(0|B),V=0!=(0|c),aa=V&M;a:do if(aa)for(W=255&b,h=c,da=a;;){if(X=0|d[da>>0],Y=X<<24>>24==W<<24>>24){g=h,ca=da,ja=6;break a}if(Z=da+1|0,$=h+-1|0,r=Z,s=3&r,t=0!=(0|s),u=0!=(0|$),_=u&t,!_){e=$,o=u,ba=Z,ja=5;break}h=$,da=Z}else e=c,o=V,ba=a,ja=5;while(0);5==(0|ja)&&(o?(g=e,ca=ba,ja=6):(n=0,fa=ba));a:do if(6==(0|ja))if(v=0|d[ca>>0],w=255&b,x=v<<24>>24==w<<24>>24)n=g,fa=ca;else{y=0|U(p,16843009),z=g>>>0>3;b:do if(z){for(j=g,ha=ca;;){if(A=0|f[ha>>2],C=A^y,D=C+-16843009|0,E=C&-2139062144,F=E^-2139062144,G=F&D,H=0==(0|G),!H){k=j,ia=ha;break}if(I=ha+4|0,J=j+-4|0,K=J>>>0>3,!K){i=J,ga=I,ja=11;break b}j=J,ha=I}m=k,ea=ia}else i=g,ga=ca,ja=11;while(0);if(11==(0|ja)){if(L=0==(0|i)){n=0,fa=ga;break}m=i,ea=ga}for(;;){if(N=0|d[ea>>0],O=N<<24>>24==w<<24>>24){n=m,fa=ea;break a}if(P=ea+1|0,Q=m+-1|0,R=0==(0|Q)){n=0,fa=P;break}m=Q,ea=P}}while(0);return S=0!=(0|n),T=S?fa:0,0|T}function hv(a,b,c){a|=0,b|=0,c|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,F=0;if(F=l,h=0==(0|c))e=0;else{i=0|d[a>>0],r=i<<24>>24==0;a:do if(r)n=0,C=b;else for(g=c,v=i,z=a,D=b;;){if(f=g+-1|0,s=0|d[D>>0],t=s<<24>>24!=0,u=0!=(0|f),A=u&t,w=v<<24>>24==s<<24>>24,B=w&A,!B){n=v,C=D;break a}if(x=z+1|0,y=D+1|0,j=0|d[x>>0],k=j<<24>>24==0){n=0,C=y;break}g=f,v=j,z=x,D=y}while(0);m=255&n,o=0|d[C>>0],p=255&o,q=m-p|0,e=q}return 0|e}function iv(a,b,c){a|=0,b|=0,c|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,x=0;x=l,h=0==(0|c);a:do if(h)k=0;else{for(e=c,u=a,v=b;;){if(i=0|d[u>>0],m=0|d[v>>0],n=i<<24>>24==m<<24>>24,!n){f=i,g=m;break}if(o=e+-1|0,p=u+1|0,q=v+1|0,r=0==(0|o)){k=0;break a}e=o,u=p,v=q}s=255&f,t=255&g,j=s-t|0,k=j}while(0);return 0|k}function jv(a,b,c,e){a|=0,b|=0,c|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;K=l,l=l+128|0,(0|l)>=(0|m)&&X(),G=K+112|0,H=K,I=H,L=2900,M=I+112|0;do f[I>>2]=0|f[L>>2],I=I+4|0,L=L+4|0;while((0|I)<(0|M));return k=b+-1|0,n=k>>>0>2147483646,n?(y=0==(0|b),y?(i=G,j=1,J=4):(z=0|Pu(),f[z>>2]=75,h=-1)):(i=a,j=b,J=4),4==(0|J)&&(A=i,B=-2-A|0,C=j>>>0>B>>>0,g=C?B:j,D=H+48|0,f[D>>2]=g,E=H+20|0,f[E>>2]=i,F=H+44|0,f[F>>2]=i,o=i+g|0,p=H+16|0,f[p>>2]=o,q=H+28|0,f[q>>2]=o,r=0|lv(H,c,e),s=0==(0|g),s?h=r:(t=0|f[E>>2],u=0|f[p>>2],v=(0|t)==(0|u),w=v<<31>>31,x=t+w|0,d[x>>0]=0,h=r)),l=K,0|h}function kv(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,q=0;return q=l,e=a+16|0,g=0|f[e>>2],h=a+20|0,i=0|f[h>>2],j=g-i|0,k=j>>>0>c>>>0,o=k?c:j,d=i,0|sw(0|d,0|b,0|o),m=0|f[h>>2],n=m+o|0,f[h>>2]=n,0|c}function lv(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0,aa=0;_=l,l=l+224|0,(0|l)>=(0|m)&&X(),R=_+120|0,U=_+80|0,T=_,S=_+136|0,Z=U,aa=Z+40|0;do f[Z>>2]=0,Z=Z+4|0;while((0|Z)<(0|aa));return Y=0|f[c>>2],f[R>>2]=Y,h=0|mv(0,b,R,T,U),i=(0|h)<0,i?g=-1:(v=a+76|0,G=0|f[v>>2],L=(0|G)>-1,L?(M=0|xv(a),J=M):J=0,N=0|f[a>>2],O=32&N,P=a+74|0,Q=0|d[P>>0],j=Q<<24>>24<1,j&&(k=N&-33,f[a>>2]=k),n=a+48|0,o=0|f[n>>2],p=0==(0|o),p?(r=a+44|0,s=0|f[r>>2],f[r>>2]=S,t=a+28|0,f[t>>2]=S,u=a+20|0,f[u>>2]=S,f[n>>2]=80,w=S+80|0,x=a+16|0,f[x>>2]=w,y=0|mv(a,b,R,T,U),z=0==(0|s),z?V=y:(A=a+36|0,B=0|f[A>>2],0|Yw[511&B](a,0,0),C=0|f[u>>2],D=0==(0|C),e=D?-1:y,f[r>>2]=s,f[n>>2]=0,f[x>>2]=0,f[t>>2]=0,f[u>>2]=0,V=e)):(q=0|mv(a,b,R,T,U),V=q),E=0|f[a>>2],F=32&E,H=0==(0|F),W=H?V:-1,I=E|O,f[a>>2]=I,K=0==(0|J),K||Su(a),g=W),l=_,0|g}function mv(a,b,c,g,h){a|=0,b|=0,c|=0,g|=0,h|=0;var i=0,j=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0,wf=0,xf=0,yf=0,zf=0,Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0,Gf=0,Hf=0,If=0,Jf=0,Kf=0,Lf=0,Mf=0,Nf=0,Of=0,Pf=0,Qf=0,Rf=0,Sf=0,Tf=0,Uf=0,Vf=0,Wf=0,Xf=0,Yf=0,Zf=0,$f=0,_f=0,ag=0,bg=0,cg=0,dg=0,eg=0,fg=0,gg=0,hg=0,ig=0,jg=0,kg=0,lg=0,mg=0,ng=0,og=0,pg=0,qg=0,rg=0,sg=0,tg=0,ug=0,vg=0,wg=0,xg=0,yg=0,zg=0,Ag=0,Bg=0,Cg=0,Dg=0,Eg=0,Fg=0,Gg=0,Hg=0,Ig=0,Jg=0,Kg=0,Lg=0,Mg=0,Ng=0,Og=0,Pg=0,Qg=0,Rg=0,Sg=0,Tg=0,Ug=0,Vg=0,Wg=0,Xg=0,Yg=0,Zg=0,$g=0,_g=0,ah=0,bh=0,ch=0,dh=0,eh=0,fh=0,gh=0,hh=0,ih=0,jh=0,kh=0,lh=0,mh=0,nh=0,oh=0,ph=0,qh=0,rh=0,sh=0,th=0,uh=0,vh=0,wh=0,xh=0,yh=0,zh=0,Ah=0,Bh=0,Ch=0,Dh=0,Eh=0,Fh=0,Gh=0,Hh=0,Ih=0,Jh=0,Kh=0,Lh=0,Mh=0,Nh=0,Oh=0,Ph=0,Qh=0,Rh=0,Sh=0,Th=0,Uh=0,Vh=0,Wh=0,Xh=0,Yh=0,Zh=0,$h=0,_h=0,ai=0,bi=0,ci=0,di=0,ei=0,fi=0,gi=0,hi=0,ii=0,ji=0,ki=0,li=0,mi=0,ni=0,oi=0,pi=0,qi=0,ri=0,si=0,ti=0,ui=0,vi=0,wi=0,xi=0,yi=0,zi=0,Ai=0,Bi=0,Ci=0,Di=0,Ei=0,Fi=0,Gi=0,Hi=0,Ii=0,Ji=0,Ki=0,Li=0,Mi=0,Ni=0,Oi=0,Pi=0,Qi=0,Ri=0,Si=0,Ti=0,Ui=0,Vi=0,Wi=0,Xi=0,Yi=0,Zi=0,$i=0,_i=0,aj=0,bj=0,cj=0,dj=0,ej=0,fj=0,gj=0,hj=0,ij=0,jj=0,kj=0,lj=0,mj=0,nj=0,oj=0,pj=0,qj=0,rj=0,sj=0,tj=0,uj=0,vj=0,wj=0,xj=0,yj=0,zj=0,Aj=0,Bj=0,Cj=0,Dj=0,Ej=0,Fj=0,Gj=0,Hj=0,Ij=0,Jj=0,Kj=0,Lj=0,Mj=0,Nj=0,Oj=0,Pj=0,Qj=0,Rj=0,Sj=0,Tj=0,Uj=0,Vj=0,Wj=0,Xj=0,Yj=0,Zj=0,$j=0,_j=0,ak=0,bk=0,ck=0,dk=0,ek=0,fk=0,gk=0,hk=0,ik=0,jk=0,kk=0,lk=0,mk=0,nk=0,ok=0,pk=0,qk=0,rk=0,sk=0,tk=0,uk=0,vk=0,wk=0,xk=0,yk=0,zk=0,Ak=0,Bk=0,Ck=0,Dk=0,Ek=0,Fk=0,Gk=0,Hk=0,Ik=0,Jk=0,Kk=0,Lk=0,Mk=0,Nk=0,Ok=0,Pk=0,Qk=0,Rk=0,Sk=0,Tk=0,Uk=0,Vk=0,Wk=0,Xk=0,Yk=0,Zk=0,$k=0,_k=0,al=0,bl=0,cl=0,dl=0,el=0,fl=0,gl=0,hl=0,il=0,jl=0,kl=0,ll=0,ml=0,nl=0,ol=0,pl=0,ql=0,rl=0,sl=0,tl=0,ul=0,vl=0,wl=0,xl=0,yl=0,zl=0,Al=0,Bl=0,Cl=0,Dl=0,El=0,Fl=0,Gl=0,Hl=0,Il=0,Jl=0,Kl=0,Ll=0,Ml=0,Nl=0,Ol=0,Pl=0,Ql=0,Rl=0,Sl=0,Tl=0,Ul=0,Vl=0,Wl=0,Xl=0,Yl=0,Zl=0,$l=0,_l=0,am=0,bm=0,cm=0,dm=0,em=0,fm=0,gm=0,hm=0,im=0,jm=0,km=0,lm=0,mm=0,nm=0,om=0,pm=0,qm=0,rm=0,sm=0,tm=0,um=0,vm=0,wm=0,xm=0,ym=0,zm=0,Am=0,Bm=0,Cm=0,Dm=0,Em=0,Fm=0,Gm=0,Hm=0,Im=0,Jm=0,Km=0,Lm=0,Mm=0,Nm=0,Om=0,Pm=0,Qm=0,Rm=0,Sm=0,Tm=0,Um=0,Vm=0,Wm=0,Xm=0,Ym=0,Zm=0,$m=0,_m=0,an=0,bn=0,cn=0,dn=0,en=0,fn=0,gn=0,hn=0,jn=0,kn=0,ln=0,mn=0,nn=0,on=0,pn=0,qn=0,rn=0,sn=0,tn=0,un=0,vn=0,wn=0,xn=0,yn=0,zn=0,An=0,Bn=0,Cn=0,Dn=0,En=0,Fn=0,Gn=0,Hn=0,In=0,Jn=0,Kn=0,Ln=0,Mn=0,Nn=0,On=0,Pn=0,Qn=0,Rn=0,Sn=0,Tn=0,Un=0,Vn=0,Wn=0,Xn=0,Yn=0,Zn=0,$n=0,_n=0,ao=0,bo=0,co=0,eo=0,fo=0,go=0,ho=0,io=0,jo=0,ko=0,lo=0,mo=0,no=0,oo=0,po=0,qo=0,ro=0,so=0,to=0,uo=0,vo=0,wo=0,xo=0,yo=0,zo=0,Ao=0,Bo=0,Co=0,Do=0,Eo=0,Fo=0,Go=0,Ho=0,Io=0,Jo=0,Ko=0,Lo=0,Mo=0,No=0,Oo=0,Po=0,Qo=0,Ro=0,So=0,To=0,Uo=0,Vo=0,Wo=0,Xo=0,Yo=0,Zo=0,$o=0,_o=0,ap=0,bp=0,cp=0,dp=0,ep=0,fp=0,gp=0,hp=0,ip=0,jp=0,kp=0,lp=0,mp=0,np=0,op=0,pp=0,qp=0,rp=0,sp=0,tp=0,up=0,vp=0,wp=0,xp=0,yp=0,zp=0,Ap=0,Bp=0,Cp=0,Dp=0,Ep=0,Fp=0,Gp=0,Hp=0,Ip=0,Jp=0,Kp=0,Lp=0,Mp=0,Np=0,Op=0,Pp=0,Qp=0,Rp=0,Sp=0,Tp=0,Up=0,Vp=0,Wp=0,Xp=0,Yp=0,Zp=0,$p=0,_p=0,aq=0,bq=0,cq=0,dq=0,eq=0,fq=0,gq=0,hq=0,iq=0,jq=0,kq=0,lq=0,mq=0,nq=0,oq=0,pq=0,qq=0,rq=0,sq=0,tq=0,uq=0,vq=0,wq=0,xq=0,yq=0,zq=0,Aq=0,Bq=0,Cq=0,Dq=0,Eq=0,Fq=0,Gq=0,Hq=0,Iq=0,Jq=0,Kq=0,Lq=0,Mq=0,Nq=0,Oq=0,Pq=0,Qq=0,Rq=0,Sq=0,Tq=0,Uq=0,Vq=0,Wq=0,Xq=0,Yq=0,Zq=0,$q=0,_q=0,ar=0,br=0,cr=0,dr=0,er=0,fr=0,gr=0,hr=0,ir=0,jr=0,kr=0,lr=0,mr=0,nr=0,or=0,pr=0,qr=0,rr=0,sr=0,tr=0,ur=0,vr=0,wr=0,xr=0,yr=0,zr=0,Ar=0,Br=0,Cr=0,Dr=0,Er=0,Fr=0,Gr=0,Hr=0,Ir=0,Jr=0,Kr=0,Lr=0,Mr=0,Nr=0,Or=0,Pr=0,Qr=0,Rr=0,Sr=0,Tr=0,Ur=0,Vr=0,Wr=0,Xr=0,Yr=0,Zr=0,$r=0,_r=0,as=0,bs=0,cs=0,ds=0,es=0,fs=0,gs=0,hs=0,is=0,js=0,ks=0,ls=0,ms=0,ns=0,os=0,ps=0,qs=0,rs=0,ss=0,ts=0,us=0,vs=0,ws=0,xs=0,ys=0,zs=0,As=0,Bs=0,Cs=0,Ds=0,Es=0,Fs=0,Gs=0,Hs=0,Is=0,Js=0,Ks=0,Ls=0,Ms=0,Ns=0,Os=0,Ps=0,Qs=0,Rs=0,Ss=0,Ts=0,Us=0,Vs=0,Ws=0,Xs=0,Ys=0,Zs=0,$s=0,_s=0,at=0,bt=0,ct=0,dt=0,et=0,ft=0,gt=0;gt=l,l=l+624|0,(0|l)>=(0|m)&&X(),Jp=gt+24|0,eq=gt+16|0,Lp=gt+588|0,fq=gt+576|0,Dp=gt,Kp=gt+536|0,Os=gt+8|0,vr=gt+528|0,ya=0!=(0|a),za=Kp+40|0,Cc=za,Fe=Kp+39|0,Jg=Os+4|0,Mi=Lp,Pk=0-Mi|0,Sm=fq+12|0,Wo=fq+11|0,fp=Sm,Aa=fp-Mi|0,La=-2-Mi|0,Wa=fp+2|0,fb=Jp+288|0,qb=Lp+9|0,Bb=qb,Mb=Lp+8|0,Op=0,kr=0,pr=0,ds=b;a:for(;;){Xb=(0|Op)>-1;do{if(Xb){if(gc=2147483647-Op|0,rc=(0|kr)>(0|gc)){Dc=0|Pu(),f[Dc>>2]=75,Pp=-1;break}Oc=kr+Op|0,Pp=Oc;break}Pp=Op}while(0);if(Zc=0|d[ds>>0],id=Zc<<24>>24==0){Qp=Pp,qr=pr,ft=244;break}td=Zc,fs=ds;b:for(;;){switch(td<<24>>24){case 37:js=fs,Ts=fs,ft=9;break b;case 0:is=fs,Ss=fs;break b}Ed=fs+1|0,oa=0|d[Ed>>0],td=oa,fs=Ed}b:do if(9==(0|ft))for(;;){if(ft=0,Pd=js+1|0,$d=0|d[Pd>>0],je=$d<<24>>24==37,!je){is=js,Ss=Ts;break b}if(ue=Ts+1|0,Ge=js+2|0,Re=0|d[Ge>>0],af=Re<<24>>24==37,!af){is=Ge,Ss=ue;break}js=Ge,Ts=ue,ft=9}while(0);if(mf=Ss,xf=ds,If=mf-xf|0,ya&&(Tf=0|f[a>>2],cg=32&Tf,ng=0==(0|cg),ng&&0|nv(ds,If,a)),yg=(0|Ss)==(0|ds)){Kg=is+1|0,Vg=0|d[Kg>>0],eh=Vg<<24>>24,Xq=eh+-48|0,Qq=Xq>>>0<10,Qq?(ph=is+2|0,Ah=0|d[ph>>0],Lh=Ah<<24>>24==36,Wh=is+3|0,M=Lh?Wh:Kg,T=Lh?1:pr,Yq=Lh?Xq:-1,ra=0|d[M>>0],qi=ra,Ip=Yq,sr=T,Cs=M):(qi=Vg,Ip=-1,sr=pr,Cs=Kg),fi=qi<<24>>24,Bi=fi&-32,Ni=32==(0|Bi);b:do if(Ni)for(hj=fi,ik=qi,vq=0,Fs=Cs;;){if(Yi=hj+-32|0,sj=1<<Yi,Dj=75913&sj,Oj=0==(0|Dj)){am=ik,wq=vq,Es=Fs;break b}if(Zj=ik<<24>>24,tk=Zj+-32|0,Ek=1<<tk,Qk=Ek|vq,_k=Fs+1|0,kl=0|d[_k>>0],vl=kl<<24>>24,Gl=vl&-32,Rl=32==(0|Gl),!Rl){am=kl,wq=Qk,Es=_k;break}hj=vl,ik=kl,vq=Qk,Fs=_k}else am=qi,wq=0,Es=Cs;while(0);lm=am<<24>>24==42;do if(lm){if(wm=Es+1|0,Hm=0|d[wm>>0],Tm=Hm<<24>>24,br=Tm+-48|0,Uq=br>>>0<10,Uq?(cn=Es+2|0,on=0|d[cn>>0],zn=on<<24>>24==36,zn?(Kn=h+(br<<2)|0,f[Kn>>2]=10,Vn=0|d[wm>>0],fo=Vn<<24>>24,qo=fo+-48|0,Bo=g+(qo<<3)|0,Mo=Bo,Xo=Mo,Yo=0|f[Xo>>2],Zo=Mo+4|0,$o=Zo,_o=0|f[$o>>2],ap=Es+3|0,tr=1,Ds=ap,Ks=Yo):ft=24):ft=24,24==(0|ft)){if(ft=0,bp=0==(0|sr),!bp){o=-1;break a}if(!ya){xq=wq,ur=0,ks=wm,Ls=0;break}Ep=0|f[c>>2],cp=Ep,dp=4,rq=dp,lq=rq-1|0,ep=cp+lq|0,gp=4,uq=gp,tq=uq-1|0,sq=tq^-1,hp=ep&sq,ip=hp,jp=0|f[ip>>2],Gp=ip+4|0,f[c>>2]=Gp,tr=0,Ds=wm,Ks=jp}kp=(0|Ks)<0,kp?(lp=8192|wq,mp=0-Ks|0,xq=lp,ur=tr,ks=Ds,Ls=mp):(xq=wq,ur=tr,ks=Ds,Ls=Ks)}else if(np=am<<24>>24,_q=np+-48|0,Vq=_q>>>0<10){for(Ca=Es,Gq=0,cr=_q;;){if(op=10*Gq|0,pp=op+cr|0,Ba=Ca+1|0,Da=0|d[Ba>>0],Ea=Da<<24>>24,Zq=Ea+-48|0,Rq=Zq>>>0<10,!Rq){V=pp,Y=Ba;break}Ca=Ba,Gq=pp,cr=Zq}if(Fa=(0|V)<0){o=-1;break a}xq=wq,ur=sr,ks=Y,Ls=V}else xq=wq,ur=sr,ks=Es,Ls=0;while(0);Ga=0|d[ks>>0],Ha=Ga<<24>>24==46;b:do if(Ha){if(Ia=ks+1|0,Ja=0|d[Ia>>0],Ka=Ja<<24>>24==42,!Ka){if(mb=Ja<<24>>24,ar=mb+-48|0,Wq=ar>>>0<10,!Wq){Jr=0,ls=Ia;break}for(rb=Ia,Hq=0,dr=ar;;){if(nb=10*Hq|0,ob=nb+dr|0,pb=rb+1|0,sb=0|d[pb>>0],tb=sb<<24>>24,$q=tb+-48|0,Sq=$q>>>0<10,!Sq){Jr=ob,ls=pb;break b}rb=pb,Hq=ob,dr=$q}}if(Ma=ks+2|0,Na=0|d[Ma>>0],Oa=Na<<24>>24,er=Oa+-48|0,Tq=er>>>0<10,Tq&&(Pa=ks+3|0,Qa=0|d[Pa>>0],Ra=Qa<<24>>24==36)){Sa=h+(er<<2)|0,f[Sa>>2]=10,Ta=0|d[Ma>>0],Ua=Ta<<24>>24,Va=Ua+-48|0,Xa=g+(Va<<3)|0,Ya=Xa,Za=Ya,$a=0|f[Za>>2],_a=Ya+4|0,ab=_a,bb=0|f[ab>>2],cb=ks+4|0,Jr=$a,ls=cb;break}if(db=0==(0|ur),!db){o=-1;break a}ya?(Fp=0|f[c>>2],eb=Fp,gb=4,nq=gb,mq=nq-1|0,hb=eb+mq|0,ib=4,qq=ib,pq=qq-1|0,oq=pq^-1,jb=hb&oq,kb=jb,lb=0|f[kb>>2],Hp=kb+4|0,f[c>>2]=Hp,Jr=lb,ls=Ma):(Jr=0,ls=Ma)}else Jr=-1,ls=ks;while(0);for(ms=ls,As=0;;){if(ub=0|d[ms>>0],vb=ub<<24>>24,wb=vb+-65|0,xb=wb>>>0>57){o=-1;break a}if(yb=ms+1|0,zb=(69956+(58*As|0)|0)+wb|0,Ab=0|d[zb>>0],Cb=255&Ab,Db=Cb+-1|0,Eb=Db>>>0<8,!Eb){Z=yb,$=Ab,_=Cb,ns=ms,Bs=As;break}ms=yb,As=Cb}if(Fb=$<<24>>24==0){o=-1;break}Gb=$<<24>>24==19,Hb=(0|Ip)>-1;do if(Gb){if(Hb){o=-1;break a}ft=52}else{if(Hb){Ib=h+(Ip<<2)|0,f[Ib>>2]=_,Jb=g+(Ip<<3)|0,Kb=Jb,Lb=Kb,Nb=0|f[Lb>>2],Ob=Kb+4|0,Pb=Ob,Qb=0|f[Pb>>2],Rb=Dp,Sb=Rb,f[Sb>>2]=Nb,Tb=Rb+4|0,Ub=Tb,f[Ub>>2]=Qb,ft=52;break}if(!ya){o=0;break a}pv(Dp,_,c)}while(0);if(52!=(0|ft)||(ft=0,ya)){Vb=0|d[ns>>0],Wb=Vb<<24>>24,Yb=0!=(0|Bs),Zb=15&Wb,$b=3==(0|Zb),Br=Yb&$b,_b=Wb&-33,Hs=Br?_b:Wb,ac=8192&xq,bc=0==(0|ac),cc=xq&-65537,yq=bc?xq:cc;b:do switch(0|Hs){case 110:switch(0|Bs){case 0:kc=0|f[Dp>>2],f[kc>>2]=Pp,Op=Pp,kr=If,pr=ur,ds=Z;continue a;case 1:lc=0|f[Dp>>2],f[lc>>2]=Pp,Op=Pp,kr=If,pr=ur,ds=Z;continue a;case 2:mc=(0|Pp)<0,nc=mc<<31>>31,oc=0|f[Dp>>2],pc=oc,qc=pc,f[qc>>2]=Pp,sc=pc+4|0,tc=sc,f[tc>>2]=nc,Op=Pp,kr=If,pr=ur,ds=Z;continue a;case 3:uc=65535&Pp,vc=0|f[Dp>>2],e[vc>>1]=uc,Op=Pp,kr=If,pr=ur,ds=Z;continue a;case 4:wc=255&Pp,xc=0|f[Dp>>2],d[xc>>0]=wc,Op=Pp,kr=If,pr=ur,ds=Z;continue a;case 6:yc=0|f[Dp>>2],f[yc>>2]=Pp,Op=Pp,kr=If,pr=ur,ds=Z;continue a;case 7:zc=(0|Pp)<0,Ac=zc<<31>>31,Bc=0|f[Dp>>2],Ec=Bc,Fc=Ec,f[Fc>>2]=Pp,Gc=Ec+4|0,Hc=Gc,f[Hc>>2]=Ac,Op=Pp,kr=If,pr=ur,ds=Z;continue a;default:Op=Pp,kr=If,pr=ur,ds=Z;continue a}break;case 112:Ic=Jr>>>0>8,Jc=Ic?Jr:8,Kc=8|yq,zq=Kc,Lr=Jc,Is=120,ft=64;break;case 88:case 120:zq=yq,Lr=Jr,Is=Hs,ft=64;break;case 111:if(yd=Dp,zd=yd,Ad=0|f[zd>>2],Bd=yd+4|0,Cd=Bd,Dd=0|f[Cd>>2],Fd=0==(0|Ad),Gd=0==(0|Dd),Hd=Fd&Gd)q=za;else for(t=za,Jd=Ad,Nd=Dd;;){if(Id=7&Jd,Kd=48|Id,Ld=255&Kd,Md=t+-1|0,d[Md>>0]=Ld,Od=0|qw(0|Jd,0|Nd,3),Qd=F,Rd=0==(0|Od),Sd=0==(0|Qd),Td=Rd&Sd){q=Md;break}t=Md,Jd=Od,Nd=Qd}Ud=8&yq,Vd=0==(0|Ud),Vd?(qp=q,Aq=yq,Mr=Jr,Tr=0,Zr=70436,ft=77):(Wd=q,Xd=Cc-Wd|0,Yd=(0|Jr)>(0|Xd),Zd=Xd+1|0,Kr=Yd?Jr:Zd,qp=q,Aq=yq,Mr=Kr,Tr=0,Zr=70436,ft=77);break;case 105:case 100:if(_d=Dp,ae=_d,be=0|f[ae>>2],ce=_d+4|0,de=ce,ee=0|f[de>>2],fe=(0|ee)<0){ge=0|lw(0,0,0|be,0|ee),he=F,ie=Dp,ke=ie,f[ke>>2]=ge,le=ie+4|0,me=le,f[me>>2]=he,re=ge,se=he,Rr=1,Wr=70436,ft=76;break b}ne=2048&yq,oe=0==(0|ne),oe?(pe=1&yq,qe=0==(0|pe),i=qe?70436:70438,re=be,se=ee,Rr=pe,Wr=i,ft=76):(re=be,se=ee,Rr=1,Wr=70437,ft=76);break;case 117:dc=Dp,ec=dc,fc=0|f[ec>>2],hc=dc+4|0,ic=hc,jc=0|f[ic>>2],re=fc,se=jc,Rr=0,Wr=70436,ft=76;break;case 99:Pe=Dp,Qe=Pe,Se=0|f[Qe>>2],Te=Pe+4|0,Ue=Te,Ve=0|f[Ue>>2],We=255&Se,
+d[Fe>>0]=We,up=Fe,Bq=cc,Qr=1,Vr=0,$r=70436,Xs=za;break;case 109:Xe=0|Pu(),Ye=0|f[Xe>>2],Ze=0|rv(Ye),rp=Ze,ft=82;break;case 115:$e=0|f[Dp>>2],_e=0!=(0|$e),bf=_e?$e:72338,rp=bf,ft=82;break;case 67:jf=Dp,kf=jf,lf=0|f[kf>>2],nf=jf+4|0,of=nf,pf=0|f[of>>2],f[Os>>2]=lf,f[Jg>>2]=0,f[Dp>>2]=Os,Vo=Os,Pr=-1,ft=86;break;case 83:sa=0|f[Dp>>2],qf=0==(0|Jr),qf?(sv(a,32,Ls,0,yq),Dq=0,ft=97):(Vo=sa,Pr=Jr,ft=86);break;case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:Rf=+k[Dp>>3],f[eq>>2]=0,k[n>>3]=Rf,Sf=0|f[n>>2],Uf=0|f[n+4>>2],Vf=(0|Uf)<0,Vf?(Wf=-Rf,u=Wf,Sr=1,Yr=72345):(Xf=2048&yq,Yf=0==(0|Xf),Yf?(Zf=1&yq,$f=0==(0|Zf),j=$f?72346:72351,u=Rf,Sr=Zf,Yr=j):(u=Rf,Sr=1,Yr=72348)),k[n>>3]=u,_f=0|f[n>>2],ag=0|f[n+4>>2],bg=2146435072&ag,dg=bg>>>0<2146435072,eg=!1,fg=2146435072==(0|bg),gg=fg&eg,hg=dg|gg;do if(hg){if(zg=+vv(u,eq),Ag=2*zg,Bg=0!=Ag,Bg&&(Cg=0|f[eq>>2],Dg=Cg+-1|0,f[eq>>2]=Dg),Eg=32|Hs,Fg=97==(0|Eg)){Gg=32&Hs,Hg=0==(0|Gg),Ig=Yr+9|0,Xr=Hg?Yr:Ig,Lg=2|Sr,Mg=Jr>>>0>11,Ng=12-Jr|0,Og=0==(0|Ng),Pg=Mg|Og;do{if(!Pg){for(as=Ng,bs=8;;){if(Qg=as+-1|0,Rg=16*bs,Sg=0==(0|Qg)){ea=Rg;break}as=Qg,bs=Rg}if(Tg=0|d[Xr>>0],Ug=Tg<<24>>24==45){Wg=-Ag,Xg=Wg-ea,Yg=ea+Xg,Zg=-Yg,v=Zg;break}$g=Ag+ea,_g=$g-ea,v=_g;break}v=Ag}while(0);for(ah=0|f[eq>>2],bh=(0|ah)<0,ch=0-ah|0,dh=bh?ch:ah,fh=(0|dh)<0,gh=fh<<31>>31,hh=0|qv(dh,gh,Sm),ih=(0|hh)==(0|Sm),ih?(d[Wo>>0]=48,gq=Wo):gq=hh,jh=ah>>31,kh=2&jh,lh=kh+43|0,mh=255&lh,nh=gq+-1|0,d[nh>>0]=mh,oh=Hs+15|0,qh=255&oh,rh=gq+-2|0,d[rh>>0]=qh,xr=(0|Jr)<1,sh=8&yq,th=0==(0|sh),x=v,es=Lp;;){uh=~~x,vh=70420+uh|0,wh=0|d[vh>>0],xh=255&wh,yh=xh|Gg,zh=255&yh,Bh=es+1|0,d[es>>0]=zh,Ch=+(0|uh),Dh=x-Ch,Eh=16*Dh,Fh=Bh,Gh=Fh-Mi|0,Hh=1==(0|Gh);do if(Hh){if(wr=0==Eh,Gr=xr&wr,zr=th&Gr){gs=Bh;break}Ih=es+2|0,d[Bh>>0]=46,gs=Ih}else gs=Bh;while(0);if(Jh=0!=Eh,!Jh){hs=gs;break}x=Eh,es=gs}Kh=0!=(0|Jr),ua=hs,Mh=La+ua|0,Nh=(0|Mh)<(0|Jr),Ar=Kh&Nh,Oh=rh,Ph=Wa+Jr|0,Qh=Ph-Oh|0,Rh=Aa-Oh|0,Sh=Rh+ua|0,lr=Ar?Qh:Sh,Th=lr+Lg|0,sv(a,32,Ls,Th,yq),Uh=0|f[a>>2],Vh=32&Uh,Xh=0==(0|Vh),Xh&&0|nv(Xr,Lg,a),Yh=65536^yq,sv(a,48,Ls,Th,Yh),Zh=ua-Mi|0,$h=0|f[a>>2],_h=32&$h,ai=0==(0|_h),ai&&0|nv(Lp,Zh,a),bi=fp-Oh|0,Gs=Zh+bi|0,ci=lr-Gs|0,sv(a,48,ci,0,0),di=0|f[a>>2],ei=32&di,gi=0==(0|ei),gi&&0|nv(rh,bi,a),hi=8192^yq,sv(a,32,Ls,Th,hi),ii=(0|Th)<(0|Ls),Js=ii?Ls:Th,p=Js;break}for(ji=(0|Jr)<0,ka=ji?6:Jr,Bg?(ki=268435456*Ag,li=0|f[eq>>2],mi=li+-28|0,f[eq>>2]=mi,E=ki,ni=mi):(ta=0|f[eq>>2],E=Ag,ni=ta),oi=(0|ni)<0,H=oi?Jp:fb,pi=H,J=E,Rs=H;;){if(ri=~~J>>>0,f[Rs>>2]=ri,si=Rs+4|0,ti=+(ri>>>0),ui=J-ti,vi=1e9*ui,wi=0!=vi,!wi){aa=si;break}J=vi,Rs=si}if(ma=0|f[eq>>2],xi=(0|ma)>0)for(yi=ma,tp=H,Ws=aa;;){zi=(0|yi)>29,Ai=zi?29:yi,Sp=Ws+-4|0,Ci=Sp>>>0<tp>>>0;do if(Ci)vp=tp;else{for(Mp=0,Tp=Sp;;){if(Di=0|f[Tp>>2],Ei=0|ow(0|Di,0,0|Ai),Fi=F,Gi=0|mw(0|Ei,0|Fi,0|Mp,0),Hi=F,Ii=0|zw(0|Gi,0|Hi,1e9,0),Ji=F,f[Tp>>2]=Ii,Ki=0|vw(0|Gi,0|Hi,1e9,0),Li=F,Rp=Tp+-4|0,Oi=Rp>>>0<tp>>>0){ba=Ki;break}Mp=Ki,Tp=Rp}if(Pi=0==(0|ba)){vp=tp;break}Qi=tp+-4|0,f[Qi>>2]=ba,vp=Qi}while(0);for(Ys=Ws;;){if(Ri=Ys>>>0>vp>>>0,!Ri){Zs=Ys;break}if(Si=Ys+-4|0,Ti=0|f[Si>>2],Ui=0==(0|Ti),!Ui){Zs=Ys;break}Ys=Si}if(Vi=0|f[eq>>2],Wi=Vi-Ai|0,f[eq>>2]=Wi,Xi=(0|Wi)>0,!Xi){na=Wi,sp=vp,Vs=Zs;break}yi=Wi,tp=vp,Ws=Zs}else na=ma,sp=H,Vs=aa;if(Zi=(0|na)<0)for($i=ka+25|0,_i=(0|$i)/9&-1,aj=_i+1|0,bj=102==(0|Eg),dj=na,xp=sp,_s=Vs;;){cj=0-dj|0,ej=(0|cj)>9,fj=ej?9:cj,gj=xp>>>0<_s>>>0;do if(gj){for(lj=1<<fj,mj=lj+-1|0,nj=1e9>>>fj,Np=0,Up=xp;;){if(oj=0|f[Up>>2],pj=oj&mj,qj=oj>>>fj,rj=qj+Np|0,f[Up>>2]=rj,tj=0|U(pj,nj),uj=Up+4|0,vj=uj>>>0<_s>>>0,!vj){ca=tj;break}Np=tj,Up=uj}if(wj=0|f[xp>>2],xj=0==(0|wj),yj=xp+4|0,P=xj?yj:xp,zj=0==(0|ca)){R=P,at=_s;break}Aj=_s+4|0,f[_s>>2]=ca,R=P,at=Aj}else ij=0|f[xp>>2],jj=0==(0|ij),kj=xp+4|0,Q=jj?kj:xp,R=Q,at=_s;while(0);if(Bj=bj?H:R,Cj=at,Ej=Bj,Fj=Cj-Ej|0,Gj=Fj>>2,Hj=(0|Gj)>(0|aj),Ij=Bj+(aj<<2)|0,xa=Hj?Ij:at,Jj=0|f[eq>>2],Kj=Jj+fj|0,f[eq>>2]=Kj,Lj=(0|Kj)<0,!Lj){wp=R,$s=xa;break}dj=Kj,xp=R,_s=xa}else wp=sp,$s=Vs;Mj=wp>>>0<$s>>>0;do if(Mj){if(Nj=wp,Pj=pi-Nj|0,Qj=Pj>>2,Rj=9*Qj|0,Sj=0|f[wp>>2],Tj=Sj>>>0<10){aq=Rj;break}for(_p=Rj,Fq=10;;){if(Uj=10*Fq|0,Vj=_p+1|0,Wj=Sj>>>0<Uj>>>0){aq=Vj;break}_p=Vj,Fq=Uj}}else aq=0;while(0);if(Xj=102!=(0|Eg),Yj=Xj?aq:0,$j=ka-Yj|0,_j=103==(0|Eg),ak=0!=(0|ka),bk=ak&_j,ga=bk<<31>>31,ck=$j+ga|0,dk=$s,ek=dk-pi|0,fk=ek>>2,gk=9*fk|0,hk=gk+-9|0,jk=(0|ck)<(0|hk)){if(kk=H+4|0,lk=ck+9216|0,mk=(0|lk)/9&-1,nk=mk+-1024|0,ok=kk+(nk<<2)|0,pk=(0|lk)%9&-1,gr=pk+1|0,qk=(0|gr)<9)for(Kq=10,hr=gr;;){if(rk=10*Kq|0,fr=hr+1|0,kq=9==(0|fr)){Iq=rk;break}Kq=rk,hr=fr}else Iq=10;sk=0|f[ok>>2],uk=(sk>>>0)%(Iq>>>0)&-1,vk=0==(0|uk),wk=ok+4|0,xk=(0|wk)==(0|$s),Dr=xk&vk;do if(Dr)Bp=wp,Xp=ok,cq=aq;else{yk=(sk>>>0)/(Iq>>>0)&-1,zk=1&yk,Ak=0==(0|zk),y=Ak?9007199254740992:9007199254740994,Bk=(0|Iq)/2&-1,Ck=uk>>>0<Bk>>>0,Ck?ys=.5:(Dk=(0|uk)==(0|Bk),Fr=xk&Dk,I=Fr?1:1.5,ys=I),Fk=0==(0|Sr);do if(Fk)cs=y,zs=ys;else{if(Gk=0|d[Yr>>0],Hk=Gk<<24>>24==45,!Hk){cs=y,zs=ys;break}Ik=-y,Jk=-ys,cs=Ik,zs=Jk}while(0);if(Kk=sk-uk|0,f[ok>>2]=Kk,Lk=cs+zs,Mk=Lk!=cs,!Mk){Bp=wp,Xp=ok,cq=aq;break}if(Nk=Kk+Iq|0,f[ok>>2]=Nk,Ok=Nk>>>0>999999999)for(zp=wp,Wp=ok;;){if(Rk=Wp+-4|0,f[Wp>>2]=0,Sk=Rk>>>0<zp>>>0,Sk?(Tk=zp+-4|0,f[Tk>>2]=0,Ap=Tk):Ap=zp,Uk=0|f[Rk>>2],Vk=Uk+1|0,f[Rk>>2]=Vk,Wk=Vk>>>0>999999999,!Wk){yp=Ap,Vp=Rk;break}zp=Ap,Wp=Rk}else yp=wp,Vp=ok;if(Xk=yp,Yk=pi-Xk|0,Zk=Yk>>2,$k=9*Zk|0,al=0|f[yp>>2],bl=al>>>0<10){Bp=yp,Xp=Vp,cq=$k;break}for(bq=$k,Lq=10;;){if(cl=10*Lq|0,dl=bq+1|0,el=al>>>0<cl>>>0){Bp=yp,Xp=Vp,cq=dl;break}bq=dl,Lq=cl}}while(0);fl=Xp+4|0,gl=$s>>>0>fl>>>0,wa=gl?fl:$s,Cp=Bp,dq=cq,et=wa}else Cp=wp,dq=aq,et=$s;for(hl=0-dq|0,ct=et;;){if(il=ct>>>0>Cp>>>0,!il){W=0,dt=ct;break}if(jl=ct+-4|0,ll=0|f[jl>>2],ml=0==(0|ll),!ml){W=1,dt=ct;break}ct=jl}do{if(_j){if(nl=1&ak,ol=1^nl,ia=ol+ka|0,pl=(0|ia)>(0|dq),ql=(0|dq)>-5,Ir=pl&ql,Ir?(rl=Hs+-1|0,ha=ia+-1|0,sl=ha-dq|0,s=rl,B=sl):(tl=Hs+-2|0,ul=ia+-1|0,s=tl,B=ul),wl=8&yq,xl=0==(0|wl),!xl){w=s,G=B,qa=wl;break}do if(W){if(yl=dt+-4|0,zl=0|f[yl>>2],Al=0==(0|zl)){jr=9;break}if(Bl=(zl>>>0)%10&-1,Cl=0==(0|Bl),!Cl){jr=0;break}for(Oq=10,ir=0;;){if(Dl=10*Oq|0,El=ir+1|0,Fl=(zl>>>0)%(Dl>>>0)&-1,Hl=0==(0|Fl),!Hl){jr=El;break}Oq=Dl,ir=El}}else jr=9;while(0);if(Il=32|s,Jl=102==(0|Il),Kl=dt,Ll=Kl-pi|0,Ml=Ll>>2,Nl=9*Ml|0,Ol=Nl+-9|0,Jl){Pl=Ol-jr|0,Ql=(0|Pl)<0,C=Ql?0:Pl,Sl=(0|B)<(0|C),z=Sl?B:C,w=s,G=z,qa=0;break}Tl=Ol+dq|0,Ul=Tl-jr|0,Vl=(0|Ul)<0,D=Vl?0:Ul,Wl=(0|B)<(0|D),A=Wl?B:D,w=s,G=A,qa=0;break}va=8&yq,w=Hs,G=ka,qa=va}while(0);if(Xl=G|qa,Yl=0!=(0|Xl),Zl=1&Yl,$l=32|w,_l=102==(0|$l))bm=(0|dq)>0,cm=bm?dq:0,la=cm,jq=0;else{if(dm=(0|dq)<0,em=dm?hl:dq,fm=(0|em)<0,gm=fm<<31>>31,hm=0|qv(em,gm,Sm),im=hm,jm=fp-im|0,km=(0|jm)<2)for(iq=hm;;){if(mm=iq+-1|0,d[mm>>0]=48,nm=mm,om=fp-nm|0,pm=(0|om)<2,!pm){hq=mm;break}iq=mm}else hq=hm;qm=dq>>31,rm=2&qm,sm=rm+43|0,tm=255&sm,um=hq+-1|0,d[um>>0]=tm,vm=255&w,xm=hq+-2|0,d[xm>>0]=vm,ym=xm,zm=fp-ym|0,la=zm,jq=xm}Am=Sr+1|0,Bm=Am+G|0,mr=Bm+Zl|0,Cm=mr+la|0,sv(a,32,Ls,Cm,yq),Dm=0|f[a>>2],Em=32&Dm,Fm=0==(0|Em),Fm&&0|nv(Yr,Sr,a),Gm=65536^yq,sv(a,48,Ls,Cm,Gm);do if(_l){for(Im=Cp>>>0>H>>>0,_r=Im?H:Cp,Yp=_r;;){Jm=0|f[Yp>>2],Km=0|qv(Jm,0,qb),Lm=(0|Yp)==(0|_r);do if(Lm){if(Rm=(0|Km)==(0|qb),!Rm){qs=Km;break}d[Mb>>0]=48,qs=Mb}else{if(Mm=Km>>>0>Lp>>>0,!Mm){qs=Km;break}for(Nm=Km,Om=Nm-Mi|0,0|nw(0|Lp,48,0|Om),ps=Km;;){if(Pm=ps+-1|0,Qm=Pm>>>0>Lp>>>0,!Qm){qs=Pm;break}ps=Pm}}while(0);if(Um=0|f[a>>2],Vm=32&Um,Wm=0==(0|Vm),Wm&&(Xm=qs,Ym=Bb-Xm|0,0|nv(qs,Ym,a)),Zm=Yp+4|0,$m=Zm>>>0>H>>>0){da=Zm;break}Yp=Zm}_m=0==(0|Xl);do if(!_m){if(an=0|f[a>>2],bn=32&an,dn=0==(0|bn),!dn)break;0|nv(72376,1,a)}while(0);if(en=da>>>0<dt>>>0,fn=(0|G)>0,gn=fn&en)for(L=G,Zp=da;;){if(hn=0|f[Zp>>2],jn=0|qv(hn,0,qb),kn=jn>>>0>Lp>>>0)for(ln=jn,mn=ln-Mi|0,0|nw(0|Lp,48,0|mn),ss=jn;;){if(nn=ss+-1|0,pn=nn>>>0>Lp>>>0,!pn){rs=nn;break}ss=nn}else rs=jn;if(qn=0|f[a>>2],rn=32&qn,sn=0==(0|rn),sn&&(tn=(0|L)>9,un=tn?9:L,0|nv(rs,un,a)),vn=Zp+4|0,wn=L+-9|0,xn=vn>>>0<dt>>>0,yn=(0|L)>9,An=yn&xn,!An){K=wn;break}L=wn,Zp=vn}else K=G;Bn=K+9|0,sv(a,48,Bn,9,0)}else{if(Cn=Cp+4|0,bt=W?dt:Cn,Dn=(0|G)>-1)for(En=0==(0|qa),O=G,$p=Cp;;){Fn=0|f[$p>>2],Gn=0|qv(Fn,0,qb),Hn=(0|Gn)==(0|qb),Hn?(d[Mb>>0]=48,ts=Mb):ts=Gn,In=(0|$p)==(0|Cp);do if(In){if(Nn=ts+1|0,On=0|f[a>>2],Pn=32&On,Qn=0==(0|Pn),Qn&&0|nv(ts,1,a),Rn=(0|O)<1,Hr=En&Rn){vs=Nn;break}if(Sn=0|f[a>>2],Tn=32&Sn,Un=0==(0|Tn),!Un){vs=Nn;break}0|nv(72376,1,a),vs=Nn}else{if(Jn=ts>>>0>Lp>>>0,!Jn){vs=ts;break}for(ws=ts+Pk|0,xs=ws,0|nw(0|Lp,48,0|xs),us=ts;;){if(Ln=us+-1|0,Mn=Ln>>>0>Lp>>>0,!Mn){vs=Ln;break}us=Ln}}while(0);if(Wn=vs,Xn=Bb-Wn|0,Yn=0|f[a>>2],Zn=32&Yn,$n=0==(0|Zn),$n&&(_n=(0|O)>(0|Xn),ao=_n?Xn:O,0|nv(vs,ao,a)),bo=O-Xn|0,co=$p+4|0,eo=co>>>0<bt>>>0,go=(0|bo)>-1,ho=eo&go,!ho){N=bo;break}O=bo,$p=co}else N=G;if(io=N+18|0,sv(a,48,io,18,0),jo=0|f[a>>2],ko=32&jo,lo=0==(0|ko),!lo)break;mo=jq,no=fp-mo|0,0|nv(jq,no,a)}while(0);oo=8192^yq,sv(a,32,Ls,Cm,oo),po=(0|Cm)<(0|Ls),Ns=po?Ls:Cm,p=Ns}else ig=32&Hs,jg=0!=(0|ig),kg=jg?72364:72368,lg=u!=u|!1,mg=jg?72387:72372,Ur=lg?0:Sr,os=lg?mg:kg,og=Ur+3|0,sv(a,32,Ls,og,cc),pg=0|f[a>>2],qg=32&pg,rg=0==(0|qg),rg?(0|nv(Yr,Ur,a),pa=0|f[a>>2],tg=pa):tg=pg,sg=32&tg,ug=0==(0|sg),ug&&0|nv(os,3,a),vg=8192^yq,sv(a,32,Ls,og,vg),wg=(0|og)<(0|Ls),xg=wg?Ls:og,p=xg;while(0);Op=Pp,kr=p,pr=ur,ds=Z;continue a;default:up=ds,Bq=yq,Qr=Jr,Vr=0,$r=70436,Xs=za}while(0);b:do if(64==(0|ft))if(ft=0,Lc=Dp,Mc=Lc,Nc=0|f[Mc>>2],Pc=Lc+4|0,Qc=Pc,Rc=0|f[Qc>>2],Sc=32&Is,Tc=0==(0|Nc),Uc=0==(0|Rc),Vc=Tc&Uc)qp=za,Aq=zq,Mr=Lr,Tr=0,Zr=70436,ft=77;else{for(r=za,Xc=Nc,dd=Rc;;){if(Wc=15&Xc,Yc=70420+Wc|0,$c=0|d[Yc>>0],_c=255&$c,ad=_c|Sc,bd=255&ad,cd=r+-1|0,d[cd>>0]=bd,ed=0|qw(0|Xc,0|dd,4),fd=F,gd=0==(0|ed),hd=0==(0|fd),jd=gd&hd){fa=cd;break}r=cd,Xc=ed,dd=fd}kd=Dp,ld=kd,md=0|f[ld>>2],nd=kd+4|0,od=nd,pd=0|f[od>>2],qd=0==(0|md),rd=0==(0|pd),sd=qd&rd,ud=8&zq,vd=0==(0|ud),Cr=vd|sd,Cr?(qp=fa,Aq=zq,Mr=Lr,Tr=0,Zr=70436,ft=77):(wd=Is>>4,xd=70436+wd|0,qp=fa,Aq=zq,Mr=Lr,Tr=2,Zr=xd,ft=77)}else if(76==(0|ft))ft=0,te=0|qv(re,se,za),qp=te,Aq=yq,Mr=Jr,Tr=Rr,Zr=Wr,ft=77;else if(82==(0|ft))ft=0,cf=0|gv(rp,0,Jr),df=0==(0|cf),ef=cf,ff=rp,gf=ef-ff|0,hf=rp+Jr|0,Us=df?hf:cf,Or=df?Jr:gf,up=rp,Bq=cc,Qr=Or,Vr=0,$r=70436,Xs=Us;else if(86==(0|ft)){for(ft=0,Eq=0,nr=0,Ps=Vo;;){if(rf=0|f[Ps>>2],sf=0==(0|rf)){Cq=Eq,or=nr;break}if(tf=0|tv(vr,rf),uf=(0|tf)<0,vf=Pr-Eq|0,wf=tf>>>0>vf>>>0,Er=uf|wf){Cq=Eq,or=tf;break}if(yf=Ps+4|0,zf=tf+Eq|0,Af=Pr>>>0>zf>>>0,!Af){Cq=zf,or=tf;break}Eq=zf,nr=tf,Ps=yf}if(Bf=(0|or)<0){o=-1;break a}if(sv(a,32,Ls,Cq,yq),Cf=0==(0|Cq))Dq=0,ft=97;else for(Jq=0,Qs=Vo;;){if(Df=0|f[Qs>>2],Ef=0==(0|Df)){Dq=Cq,ft=97;break b}if(Ff=Qs+4|0,Gf=0|tv(vr,Df),Hf=Gf+Jq|0,Jf=(0|Hf)>(0|Cq)){Dq=Cq,ft=97;break b}if(Kf=0|f[a>>2],Lf=32&Kf,Mf=0==(0|Lf),Mf&&0|nv(vr,Gf,a),Nf=Hf>>>0<Cq>>>0,!Nf){Dq=Cq,ft=97;break}Jq=Hf,Qs=Ff}}while(0);97!=(0|ft)?(77==(0|ft)&&(ft=0,ve=(0|Mr)>-1,we=Aq&-65537,S=ve?we:Aq,xe=Dp,ye=xe,ze=0|f[ye>>2],Ae=xe+4|0,Be=Ae,Ce=0|f[Be>>2],De=0!=(0|ze),Ee=0!=(0|Ce),He=De|Ee,Ie=0!=(0|Mr),yr=Ie|He,yr?(Je=qp,Ke=Cc-Je|0,Le=1&He,Me=1^Le,Ne=Me+Ke|0,Oe=(0|Mr)>(0|Ne),Nr=Oe?Mr:Ne,up=qp,Bq=S,Qr=Nr,Vr=Tr,$r=Zr,Xs=za):(up=za,Bq=S,Qr=0,Vr=Tr,$r=Zr,Xs=za)),ro=Xs,so=up,to=ro-so|0,uo=(0|Qr)<(0|to),ja=uo?to:Qr,vo=Vr+ja|0,wo=(0|Ls)<(0|vo),Ms=wo?vo:Ls,sv(a,32,Ms,vo,Bq),xo=0|f[a>>2],yo=32&xo,zo=0==(0|yo),zo&&0|nv($r,Vr,a),Ao=65536^Bq,sv(a,48,Ms,vo,Ao),sv(a,48,ja,to,0),Co=0|f[a>>2],Do=32&Co,Eo=0==(0|Do),Eo&&0|nv(up,to,a),Fo=8192^Bq,sv(a,32,Ms,vo,Fo),Op=Pp,kr=Ms,pr=ur,ds=Z):(ft=0,Of=8192^yq,sv(a,32,Ls,Dq,Of),Pf=(0|Ls)>(0|Dq),Qf=Pf?Ls:Dq,Op=Pp,kr=Qf,pr=ur,ds=Z)}else Op=Pp,kr=If,pr=ur,ds=Z}else rr=pr,Op=Pp,kr=If,ds=is,pr=rr}a:do if(244==(0|ft))if(Go=0==(0|a))if(Ho=0==(0|qr))o=0;else{for(Mq=1;;){if(Io=h+(Mq<<2)|0,Jo=0|f[Io>>2],Ko=0==(0|Jo)){Nq=Mq;break}if(No=g+(Mq<<3)|0,pv(No,Jo,c),Oo=Mq+1|0,Po=(0|Oo)<10,!Po){o=1;break a}Mq=Oo}if(Lo=(0|Nq)<10)for(Pq=Nq;;){if(So=h+(Pq<<2)|0,To=0|f[So>>2],Uo=0==(0|To),Qo=Pq+1|0,!Uo){o=-1;break a}if(Ro=(0|Qo)<10,!Ro){o=1;break}Pq=Qo}else o=1}else o=Qp;while(0);return l=gt,0|o}function nv(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0;W=l,k=c+16|0,m=0|f[k>>2],x=0==(0|m),x?(M=0|ov(c),N=0==(0|M),N?(i=0|f[k>>2],R=i,V=5):e=0):(I=m,R=I,V=5);a:do if(5==(0|V)){if(O=c+20|0,P=0|f[O>>2],Q=R-P|0,n=Q>>>0<b>>>0,o=P,n){p=c+36|0,q=0|f[p>>2],r=0|Yw[511&q](c,a,b),e=r;break}s=c+75|0,t=0|d[s>>0],u=t<<24>>24>-1;b:do if(u){for(S=b;;){if(v=0==(0|S)){g=b,h=a,H=o,U=0;break b}if(w=S+-1|0,y=a+w|0,z=0|d[y>>0],A=z<<24>>24==10){T=S;break}S=w}if(B=c+36|0,C=0|f[B>>2],D=0|Yw[511&C](c,a,T),E=D>>>0<T>>>0){e=T;break a}F=a+T|0,G=b-T|0,j=0|f[O>>2],g=G,h=F,H=j,U=T}else g=b,h=a,H=o,U=0;while(0);0|sw(0|H,0|h,0|g),J=0|f[O>>2],K=J+g|0,f[O>>2]=K,L=U+g|0,e=L}while(0);return 0|e}function ov(a){a|=0;var b=0,c=0,e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;return B=l,c=a+74|0,e=0|d[c>>0],r=e<<24>>24,t=r+255|0,u=t|r,v=255&u,d[c>>0]=v,w=0|f[a>>2],x=8&w,y=0==(0|x),y?(g=a+8|0,f[g>>2]=0,h=a+4|0,f[h>>2]=0,i=a+44|0,j=0|f[i>>2],k=a+28|0,f[k>>2]=j,m=a+20|0,f[m>>2]=j,n=j,o=a+48|0,p=0|f[o>>2],q=n+p|0,s=a+16|0,f[s>>2]=q,b=0):(z=32|w,f[a>>2]=z,b=-1),0|b}function pv(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Fc=0;Fc=l,g=b>>>0>20;a:do if(!g)do switch(0|b){case 9:ob=0|f[c>>2],h=ob,I=4,Jb=I,Ib=Jb-1|0,T=h+Ib|0,ca=4,Mb=ca,Lb=Mb-1|0,Kb=Lb^-1,na=T&Kb,ya=na,Ja=0|f[ya>>2],yb=ya+4|0,f[c>>2]=yb,f[a>>2]=Ja;break a;case 10:sb=0|f[c>>2],Ua=sb,db=4,Ob=db,Nb=Ob-1|0,i=Ua+Nb|0,v=4,Rb=v,Qb=Rb-1|0,Pb=Qb^-1,A=i&Pb,B=A,C=0|f[B>>2],Fb=B+4|0,f[c>>2]=Fb,D=(0|C)<0,E=D<<31>>31,F=a,G=F,f[G>>2]=C,H=F+4|0,J=H,f[J>>2]=E;break a;case 11:wb=0|f[c>>2],K=wb,L=4,Tb=L,Sb=Tb-1|0,M=K+Sb|0,N=4,Wb=N,Vb=Wb-1|0,Ub=Vb^-1,O=M&Ub,P=O,Q=0|f[P>>2],Gb=P+4|0,f[c>>2]=Gb,R=a,S=R,f[S>>2]=Q,U=R+4|0,V=U,f[V>>2]=0;break a;case 12:xb=0|f[c>>2],W=xb,X=8,Yb=X,Xb=Yb-1|0,Y=W+Xb|0,Z=8,_b=Z,$b=_b-1|0,Zb=$b^-1,$=Y&Zb,_=$,aa=_,ba=aa,da=0|f[ba>>2],ea=aa+4|0,fa=ea,ga=0|f[fa>>2],Hb=_+8|0,f[c>>2]=Hb,ha=a,ia=ha,f[ia>>2]=da,ja=ha+4|0,ka=ja,f[ka>>2]=ga;break a;case 13:pb=0|f[c>>2],la=pb,ma=4,bc=ma,ac=bc-1|0,oa=la+ac|0,pa=4,ec=pa,dc=ec-1|0,cc=dc^-1,qa=oa&cc,ra=qa,sa=0|f[ra>>2],zb=ra+4|0,f[c>>2]=zb,ta=65535&sa,ua=ta<<16>>16,va=(0|ua)<0,wa=va<<31>>31,xa=a,za=xa,f[za>>2]=ua,Aa=xa+4|0,Ba=Aa,f[Ba>>2]=wa;break a;case 14:qb=0|f[c>>2],Ca=qb,Da=4,gc=Da,fc=gc-1|0,Ea=Ca+fc|0,Fa=4,jc=Fa,ic=jc-1|0,hc=ic^-1,Ga=Ea&hc,Ha=Ga,Ia=0|f[Ha>>2],Ab=Ha+4|0,f[c>>2]=Ab,e=65535&Ia,Ka=a,La=Ka,f[La>>2]=e,Ma=Ka+4|0,Na=Ma,f[Na>>2]=0;break a;case 15:rb=0|f[c>>2],Oa=rb,Pa=4,lc=Pa,kc=lc-1|0,Qa=Oa+kc|0,Ra=4,oc=Ra,nc=oc-1|0,mc=nc^-1,Sa=Qa&mc,Ta=Sa,Va=0|f[Ta>>2],Bb=Ta+4|0,f[c>>2]=Bb,Wa=255&Va,Xa=Wa<<24>>24,Ya=(0|Xa)<0,Za=Ya<<31>>31,$a=a,_a=$a,f[_a>>2]=Xa,ab=$a+4|0,bb=ab,f[bb>>2]=Za;break a;case 16:tb=0|f[c>>2],cb=tb,eb=4,qc=eb,pc=qc-1|0,fb=cb+pc|0,gb=4,tc=gb,sc=tc-1|0,rc=sc^-1,hb=fb&rc,ib=hb,jb=0|f[ib>>2],Cb=ib+4|0,f[c>>2]=Cb,d=255&jb,kb=a,lb=kb,f[lb>>2]=d,mb=kb+4|0,nb=mb,f[nb>>2]=0;break a;case 17:ub=0|f[c>>2],j=ub,m=8,vc=m,uc=vc-1|0,n=j+uc|0,o=8,yc=o,xc=yc-1|0,wc=xc^-1,p=n&wc,q=p,r=+k[q>>3],Db=q+8|0,f[c>>2]=Db,k[a>>3]=r;break a;case 18:vb=0|f[c>>2],s=vb,t=8,Ac=t,zc=Ac-1|0,u=s+zc|0,w=8,Dc=w,Cc=Dc-1|0,Bc=Cc^-1,x=u&Bc,y=x,z=+k[y>>3],Eb=y+8|0,f[c>>2]=Eb,k[a>>3]=z;break a;default:break a}while(0);while(0)}function qv(a,b,c){a|=0,b|=0,c|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,Q=0;if(Q=l,v=b>>>0>0,H=a>>>0>4294967295,I=0==(0|b),J=I&H,K=v|J){for(g=c,L=a,M=b;;){if(N=0|zw(0|L,0|M,10,0),k=F,m=48|N,n=255&m,o=g+-1|0,d[o>>0]=n,p=0|vw(0|L,0|M,10,0),q=F,r=M>>>0>9,s=L>>>0>4294967295,t=9==(0|M),u=t&s,w=r|u,!w){j=o,E=p,G=q;break}g=o,L=p,M=q}e=j,f=E}else e=c,f=a;if(x=0==(0|f))h=e;else for(i=e,O=f;;){if(y=(O>>>0)%10&-1,z=48|y,A=255&z,B=i+-1|0,d[B>>0]=A,C=(O>>>0)/10&-1,D=O>>>0<10){h=B;break}i=B,O=C}return 0|h}function rv(a){a|=0;var b=0,c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;for(x=l,q=0;;){if(e=70446+q|0,h=0|d[e>>0],i=255&h,j=(0|i)==(0|a)){r=q,w=2;break}if(k=q+1|0,m=87==(0|k)){s=87,u=70534,w=5;break}q=k}if(2==(0|w)&&(c=0==(0|r),c?t=70534:(s=r,u=70534,w=5)),5==(0|w))for(;;){for(w=0,v=u;;){if(n=0|d[v>>0],o=n<<24>>24==0,p=v+1|0,o){b=p;break}v=p}if(f=s+-1|0,g=0==(0|f)){t=b;break}s=f,u=b,w=5}return 0|t}function sv(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,H=0;H=l,l=l+256|0,(0|l)>=(0|m)&&X(),F=H,j=73728&e,k=0==(0|j),w=(0|c)>(0|d),E=w&k;do if(E){if(x=c-d|0,y=x>>>0>256,z=y?256:x,0|nw(0|F,0|b,0|z),A=x>>>0>255,B=0|f[a>>2],C=32&B,D=0==(0|C),A){for(n=c-d|0,h=x,u=B,v=D;;){if(v?(0|nv(F,256,a),i=0|f[a>>2],r=i):r=u,o=h+-256|0,p=o>>>0>255,q=32&r,s=0==(0|q),!p)break;h=o,u=r,v=s}if(t=255&n,!s)break;g=t}else{if(!D)break;g=x}0|nv(F,g,a)}while(0);l=H}function tv(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0;return g=l,d=0==(0|a),d?c=0:(e=0|uv(a,b,0),c=e),0|c}function uv(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,_=0,ba=0;ba=l,g=0==(0|a);do{if(!g){if(h=b>>>0<128){t=255&b,d[a>>0]=t,e=1;break}if(E=b>>>0<2048){P=b>>>6,W=192|P,X=255&W,Y=a+1|0,d[a>>0]=X,Z=63&b,$=128|Z,i=255&$,d[Y>>0]=i,e=2;break}if(j=b>>>0<55296,k=b&-8192,m=57344==(0|k),_=j|m){n=b>>>12,o=224|n,p=255&o,q=a+1|0,d[a>>0]=p,r=b>>>6,s=63&r,u=128|s,v=255&u,w=a+2|0,d[q>>0]=v,x=63&b,y=128|x,z=255&y,d[w>>0]=z,e=3;break}if(A=b+-65536|0,B=A>>>0<1048576){C=b>>>18,D=240|C,F=255&D,G=a+1|0,d[a>>0]=F,H=b>>>12,I=63&H,J=128|I,K=255&J,L=a+2|0,d[G>>0]=K,M=b>>>6,N=63&M,O=128|N,Q=255&O,R=a+3|0,d[L>>0]=Q,S=63&b,T=128|S,U=255&T,d[R>>0]=U,e=4;break}V=0|Pu(),f[V>>2]=84,e=-1;break}e=1}while(0);return 0|e}function vv(a,b){a=+a,b|=0;var c=0,e=0;return e=l,c=+wv(a,b),+c}function wv(a,b){a=+a,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0;switch(y=l,k[n>>3]=a,e=0|f[n>>2],g=0|f[n+4>>2],o=0|qw(0|e,0|g,52),p=F,q=2047&o,0|q){case 0:r=0!=a,r?(s=0x10000000000000000*a,t=+wv(s,b),u=0|f[b>>2],v=u+-64|0,d=t,w=v):(d=a,w=0),f[b>>2]=w,c=d;break;case 2047:c=a;break;default:h=q+-1022|0,f[b>>2]=h,i=g&-2146435073,j=1071644672|i,f[n>>2]=e,f[n+4>>2]=j,m=+k[n>>3],c=m}return+c}function xv(a){a|=0;var c=0;return c=l,0}function yv(a,b){a|=0,b|=0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0;if(y=l,h=0|d[a>>0],i=0|d[b>>0],n=h<<24>>24!=i<<24>>24,o=h<<24>>24==0,w=o|n)f=h,g=i;else for(c=a,e=b;;){if(p=c+1|0,q=e+1|0,r=0|d[p>>0],s=0|d[q>>0],t=r<<24>>24!=s<<24>>24,u=r<<24>>24==0,v=u|t){f=r,g=s;break}c=p,e=q}return j=255&f,k=255&g,m=j-k|0,0|m}function zv(a){a|=0;var b=0,c=0,d=0,e=0,f=0,g=0,i=0;return i=l,b=0|Av(a),f=a+-48|0,e=f>>>0<10,g=0!=(0|b),c=e|g,d=1&c,0|d}function Av(a){a|=0;var b=0,c=0,d=0,e=0,g=0;return g=l,b=32|a,c=b+-97|0,d=c>>>0<26,e=1&d,0|e}function Bv(a){a|=0;var b=0,c=0,d=0,f=0;return f=l,b=a+-48|0,c=b>>>0<10,d=1&c,0|d}function Cv(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0,wf=0,xf=0,yf=0,zf=0,Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0,Gf=0,Hf=0,If=0,Jf=0,Kf=0,Lf=0,Mf=0,Nf=0,Of=0,Pf=0,Qf=0,Rf=0,Sf=0,Tf=0,Uf=0,Vf=0,Wf=0,Xf=0,Yf=0,Zf=0,$f=0,_f=0,ag=0,bg=0,cg=0,dg=0,eg=0,fg=0,gg=0,hg=0,ig=0,jg=0,kg=0,lg=0,mg=0,ng=0,og=0,pg=0,qg=0,rg=0,sg=0,tg=0,ug=0,vg=0,wg=0,xg=0,yg=0,zg=0,Ag=0,Bg=0,Cg=0,Dg=0,Eg=0,Fg=0,Gg=0,Hg=0,Ig=0,Jg=0,Kg=0,Lg=0,Mg=0,Ng=0,Og=0,Pg=0,Qg=0,Rg=0,Sg=0,Tg=0,Ug=0,Vg=0,Wg=0,Xg=0,Yg=0,Zg=0,$g=0,_g=0,ah=0,bh=0,ch=0,dh=0,eh=0,fh=0,gh=0,hh=0,ih=0,jh=0,kh=0,lh=0,mh=0,nh=0,oh=0,ph=0,qh=0,rh=0,sh=0,th=0,uh=0,vh=0,wh=0,xh=0,yh=0,zh=0,Ah=0,Bh=0,Ch=0,Dh=0,Eh=0,Fh=0,Gh=0,Hh=0,Ih=0,Jh=0,Kh=0,Lh=0,Mh=0,Nh=0,Oh=0,Ph=0,Qh=0,Rh=0,Sh=0,Th=0,Uh=0,Vh=0,Wh=0,Xh=0,Yh=0,Zh=0,$h=0,_h=0,ai=0,bi=0,ci=0,di=0,ei=0,fi=0,gi=0,hi=0,ii=0,ji=0,ki=0,li=0,mi=0,ni=0,oi=0,pi=0,qi=0,ri=0,si=0,ti=0,ui=0,vi=0,wi=0,xi=0,yi=0,zi=0,Ai=0,Bi=0,Ci=0,Di=0,Ei=0,Fi=0,Gi=0,Hi=0,Ii=0,Ji=0,Ki=0,Li=0,Mi=0,Ni=0,Oi=0,Pi=0,Qi=0,Ri=0,Si=0,Ti=0,Ui=0,Vi=0,Wi=0,Xi=0,Yi=0,Zi=0,$i=0,_i=0,aj=0,bj=0,cj=0,dj=0,ej=0,fj=0,gj=0,hj=0,ij=0,jj=0,kj=0,lj=0,mj=0,nj=0,oj=0,pj=0,qj=0,rj=0,sj=0,tj=0,uj=0,vj=0,wj=0,xj=0,yj=0,zj=0,Aj=0,Bj=0,Cj=0,Dj=0,Ej=0,Fj=0,Gj=0,Hj=0,Ij=0,Jj=0,Kj=0,Lj=0,Mj=0,Nj=0,Oj=0,Pj=0,Qj=0,Rj=0,Sj=0,Tj=0,Uj=0,Vj=0,Wj=0,Xj=0,Yj=0,Zj=0,$j=0,_j=0,ak=0,bk=0,ck=0,dk=0,ek=0,fk=0,gk=0,hk=0,ik=0,jk=0,kk=0,lk=0,mk=0,nk=0,ok=0,pk=0,qk=0,rk=0,sk=0,tk=0,uk=0,vk=0,wk=0,xk=0,yk=0,zk=0,Ak=0,Bk=0,Ck=0,Dk=0,Ek=0,Fk=0,Gk=0,Hk=0,Ik=0,Jk=0,Kk=0,Lk=0,Mk=0,Nk=0,Ok=0,Pk=0,Qk=0,Rk=0,Sk=0,Tk=0,Uk=0,Vk=0,Wk=0,Xk=0,Yk=0,Zk=0,$k=0,_k=0,al=0,bl=0,cl=0,dl=0,el=0,fl=0,gl=0,hl=0,il=0,jl=0,kl=0,ll=0,ml=0,nl=0,ol=0,pl=0,ql=0,rl=0,sl=0,tl=0,ul=0,vl=0,wl=0,xl=0,yl=0,zl=0,Al=0,Bl=0,Cl=0,Dl=0,El=0,Fl=0,Gl=0,Hl=0,Il=0,Jl=0,Kl=0,Ll=0,Ml=0,Nl=0,Ol=0,Pl=0,Ql=0,Rl=0,Sl=0,Tl=0,Ul=0,Vl=0,Wl=0,Xl=0,Yl=0,Zl=0,$l=0,_l=0,am=0,bm=0,cm=0,dm=0,em=0,fm=0,gm=0,hm=0,im=0,jm=0,km=0,lm=0,mm=0,nm=0,om=0,pm=0,qm=0,rm=0,sm=0,tm=0,um=0,vm=0,wm=0,xm=0,ym=0,zm=0,Am=0,Bm=0,Cm=0,Dm=0,Em=0,Fm=0,Gm=0,Hm=0,Im=0,Jm=0,Km=0,Lm=0,Mm=0,Nm=0,Om=0,Pm=0,Qm=0,Rm=0,Sm=0,Tm=0,Um=0,Vm=0,Wm=0,Xm=0,Ym=0,Zm=0,$m=0,_m=0,an=0,bn=0,cn=0,dn=0,en=0,fn=0,gn=0,hn=0,jn=0,kn=0,ln=0,mn=0,nn=0,on=0,pn=0,qn=0,rn=0,sn=0,tn=0,un=0,vn=0,wn=0,xn=0,yn=0,zn=0,An=0,Bn=0,Cn=0,Dn=0,En=0,Fn=0,Gn=0,Hn=0,In=0,Jn=0,Kn=0,Ln=0,Mn=0,Nn=0,On=0,Pn=0,Qn=0,Rn=0,Sn=0,Tn=0,Un=0,Vn=0,Wn=0,Xn=0,Yn=0,Zn=0,$n=0,_n=0,ao=0,bo=0,co=0,eo=0,fo=0,go=0,ho=0,io=0,jo=0,ko=0,lo=0,mo=0,no=0,oo=0,po=0,qo=0,ro=0,so=0,to=0,uo=0,vo=0,wo=0,xo=0,yo=0,zo=0,Ao=0,Bo=0,Co=0,Do=0,Eo=0,Fo=0,Go=0,Ho=0,Io=0,Jo=0,Ko=0,Lo=0,Mo=0,No=0,Oo=0,Po=0,Qo=0,Ro=0,So=0,To=0,Uo=0,Vo=0,Wo=0,Xo=0,Yo=0,Zo=0,$o=0,_o=0,ap=0,bp=0,cp=0,dp=0,ep=0,fp=0,gp=0,hp=0,ip=0,jp=0,kp=0,lp=0,mp=0,np=0,op=0,pp=0,qp=0,rp=0,sp=0,tp=0,up=0,vp=0,wp=0,xp=0,yp=0,zp=0,Ap=0,Bp=0,Cp=0,Dp=0,Ep=0,Fp=0,Gp=0,Hp=0,Ip=0,Jp=0,Kp=0,Lp=0,Mp=0,Np=0,Op=0,Pp=0,Qp=0,Rp=0,Sp=0,Tp=0,Up=0,Vp=0,Wp=0,Xp=0,Yp=0,Zp=0,$p=0,_p=0,aq=0,bq=0,cq=0,dq=0,eq=0,fq=0,gq=0,hq=0,iq=0,jq=0,kq=0,lq=0,mq=0,nq=0,oq=0,pq=0,qq=0,rq=0,sq=0,tq=0,uq=0,vq=0,wq=0,xq=0,yq=0,zq=0,Aq=0,Bq=0,Cq=0,Dq=0,Eq=0,Fq=0,Gq=0,Hq=0,Iq=0,Jq=0,Kq=0,Lq=0,Mq=0,Nq=0,Oq=0;switch(Oq=l,l=l+512|0,(0|l)>=(0|m)&&X(),qq=Oq,0|b){case 0:Ln=24,ro=-149,Nq=4;break;case 1:Ln=53,ro=-1074,Nq=4;break;case 2:Ln=53,ro=-1074,Nq=4;break;default:g=0}a:do if(4==(0|Nq)){for($=a+4|0,_=a+100|0;;)if(cc=0|f[$>>2],fe=0|f[_>>2],jg=cc>>>0<fe>>>0,jg?(mi=cc+1|0,f[$>>2]=mi,pk=0|d[cc>>0],sm=255&pk,kn=sm):($m=0|av(a),kn=$m),aa=0|dv(kn),la=0==(0|aa)){L=kn;break}wa=45==(0|L);b:do switch(0|L){case 43:case 45:if(Ha=1&wa,Sa=Ha<<1,bb=1-Sa|0,mb=0|f[$>>2],xb=0|f[_>>2],Ib=mb>>>0<xb>>>0){Tb=mb+1|0,f[$>>2]=Tb,dc=0|d[mb>>0],oc=255&dc,Nn=oc,dq=bb;break b}zc=0|av(a),Nn=zc,dq=bb;break b;default:Nn=L,dq=1}while(0);for(Rn=Nn,To=0;;){if(Kc=32|Rn,Vc=72378+To|0,ed=0|d[Vc>>0],pd=ed<<24>>24,Ad=(0|Kc)==(0|pd),!Ad){Pn=Rn,So=To;break}Ld=To>>>0<7;do{if(Ld){if(Wd=0|f[$>>2],ge=0|f[_>>2],re=Wd>>>0<ge>>>0){Ce=Wd+1|0,f[$>>2]=Ce,Ne=0|d[Wd>>0],Ye=255&Ne,Sn=Ye;break}hf=0|av(a),Sn=hf;break}Sn=Rn}while(0);if(tf=To+1|0,Ef=tf>>>0<8,!Ef){Pn=Sn,So=tf;break}Rn=Sn,To=tf}b:do switch(0|So){case 8:break;case 3:Nq=23;break;default:if(Pf=So>>>0>3,$f=0!=(0|c),Lp=$f&Pf){if(kg=8==(0|So))break b;Nq=23;break b}Ui=0==(0|So);c:do if(Ui)for(Vn=Pn,Vo=0;;){if(dj=32|Vn,oj=72387+Vo|0,zj=0|d[oj>>0],Kj=zj<<24>>24,Vj=(0|dj)==(0|Kj),!Vj){Xn=Vn,Wo=Vo;break c}ek=Vo>>>0<2;do{if(ek){if(qk=0|f[$>>2],Bk=0|f[_>>2],Mk=qk>>>0<Bk>>>0){Xk=qk+1|0,f[$>>2]=Xk,gl=0|d[qk>>0],rl=255&gl,Wn=rl;break}Cl=0|av(a),Wn=Cl;break}Wn=Vn}while(0);if(Nl=Vo+1|0,Yl=Nl>>>0<3,!Yl){Xn=Wn,Wo=Nl;break}Vn=Wn,Vo=Nl}else Xn=Pn,Wo=So;while(0);switch(0|Wo){case 3:if(hm=0|f[$>>2],tm=0|f[_>>2],Em=hm>>>0<tm>>>0,Em?(Pm=hm+1|0,f[$>>2]=Pm,Tm=0|d[hm>>0],Um=255&Tm,Wm=Um):(Vm=0|av(a),Wm=Vm),Xm=40==(0|Wm),!Xm){if(Ym=0|f[_>>2],Zm=0==(0|Ym)){g=u;break a}_m=0|f[$>>2],an=_m+-1|0,f[$>>2]=an,g=u;break a}for(Xo=1;;){if(bn=0|f[$>>2],cn=0|f[_>>2],dn=bn>>>0<cn>>>0,dn?(en=bn+1|0,f[$>>2]=en,fn=0|d[bn>>0],gn=255&fn,ln=gn):(hn=0|av(a),ln=hn),jn=ln+-48|0,mn=jn>>>0<10,nn=ln+-65|0,on=nn>>>0<26,zp=mn|on,!zp&&(pn=ln+-97|0,qn=pn>>>0<26,rn=95==(0|ln),Np=rn|qn,!Np)){B=ln,Yo=Xo;break}ja=Xo+1|0,Xo=ja}if(sn=41==(0|B)){g=u;break a}if(tn=0|f[_>>2],un=0==(0|tn),un||(ba=0|f[$>>2],ca=ba+-1|0,f[$>>2]=ca),!$f){ea=0|Pu(),f[ea>>2]=22,$u(a,0),g=0;break a}if(da=0==(0|Yo)){g=u;break a}for(z=Yo;;){if(fa=z+-1|0,un||(ga=0|f[$>>2],ha=ga+-1|0,f[$>>2]=ha),ia=0==(0|fa)){g=u;break a}z=fa}break;case 0:qa=48==(0|Xn);do{if(qa){if(ra=0|f[$>>2],sa=0|f[_>>2],ta=ra>>>0<sa>>>0,ta?(ua=ra+1|0,f[$>>2]=ua,va=0|d[ra>>0],xa=255&va,Aa=xa):(ya=0|av(a),Aa=ya),za=32|Aa,Ba=120==(0|za),!Ba){if(Je=0|f[_>>2],Ke=0==(0|Je)){Yn=48;break}Le=0|f[$>>2],Me=Le+-1|0,f[$>>2]=Me,Yn=48;break}Ca=0|f[$>>2],Da=0|f[_>>2],Ea=Ca>>>0<Da>>>0,Ea?(Fa=Ca+1|0,f[$>>2]=Fa,Ga=0|d[Ca>>0],Ia=255&Ga,On=Ia,wo=0):(Ja=0|av(a),On=Ja,wo=0);c:for(;;){switch(0|On){case 46:xo=wo,Nq=74;break c;case 48:break;default:vb=0,yb=0,lm=0,mm=0,Tn=On,Ao=wo,Io=0,Po=0,aq=1,gq=0,rq=0;break c}Ka=0|f[$>>2],La=0|f[_>>2],Ma=Ka>>>0<La>>>0,Ma?(Na=Ka+1|0,f[$>>2]=Na,Oa=0|d[Ka>>0],Pa=255&Oa,On=Pa,wo=1):(Qa=0|av(a),On=Qa,wo=1)}if(74==(0|Nq))if(Ra=0|f[$>>2],Ta=0|f[_>>2],Ua=Ra>>>0<Ta>>>0,Ua?(Va=Ra+1|0,f[$>>2]=Va,Wa=0|d[Ra>>0],Xa=255&Wa,Qn=Xa):(Ya=0|av(a),Qn=Ya),Za=48==(0|Qn))for(gb=0,hb=0;;){if($a=0|f[$>>2],_a=0|f[_>>2],ab=$a>>>0<_a>>>0,ab?(cb=$a+1|0,f[$>>2]=cb,db=0|d[$a>>0],eb=255&db,kb=eb):(fb=0|av(a),kb=fb),ib=0|mw(0|gb,0|hb,-1,-1),jb=F,lb=48==(0|kb),!lb){vb=0,yb=0,lm=ib,mm=jb,Tn=kb,Ao=1,Io=1,Po=0,aq=1,gq=0,rq=0;break}gb=ib,hb=jb}else vb=0,yb=0,lm=0,mm=0,Tn=Qn,Ao=xo,Io=1,Po=0,aq=1,gq=0,rq=0;for(;;){if(nb=Tn+-48|0,ob=nb>>>0<10,S=32|Tn,ob)Nq=86;else{if(pb=S+-97|0,qb=pb>>>0<6,rb=46==(0|Tn),Mp=rb|qb,!Mp){rc=lm,sc=yb,uc=mm,vc=vb,Un=Tn,Bo=Ao,Jo=Io,hq=gq,sq=rq;break}if(rb){if(sb=0==(0|Io),!sb){rc=lm,sc=yb,uc=mm,vc=vb,Un=46,Bo=Ao,Jo=Io,hq=gq,sq=rq;break}nm=yb,om=vb,pm=yb,qm=vb,Do=Ao,Lo=1,Ro=Po,cq=aq,jq=gq,vq=rq}else Nq=86}if(86==(0|Nq)){Nq=0,tb=(0|Tn)>57,ub=S+-87|0,fo=tb?ub:nb,wb=(0|vb)<0,zb=yb>>>0<8,Ab=0==(0|vb),Bb=Ab&zb,Cb=wb|Bb;do if(Cb)Db=gq<<4,Eb=fo+Db|0,Qo=Po,bq=aq,iq=Eb,tq=rq;else{if(Fb=(0|vb)<0,Gb=yb>>>0<14,Hb=0==(0|vb),Jb=Hb&Gb,Kb=Fb|Jb){Lb=+(0|fo),Mb=.0625*aq,Nb=Mb*Lb,Ob=rq+Nb,Qo=Po,bq=Mb,iq=gq,tq=Ob;break}Pb=0==(0|fo),Qb=0!=(0|Po),Ap=Qb|Pb,Ap?(Qo=Po,bq=aq,iq=gq,tq=rq):(Rb=.5*aq,Sb=rq+Rb,Qo=1,bq=aq,iq=gq,tq=Sb)}while(0);Ub=0|mw(0|yb,0|vb,1,0),Vb=F,nm=lm,om=mm,pm=Ub,qm=Vb,Do=1,Lo=Io,Ro=Qo,cq=bq,jq=iq,vq=tq}Wb=0|f[$>>2],Xb=0|f[_>>2],Yb=Wb>>>0<Xb>>>0,Yb?(Zb=Wb+1|0,f[$>>2]=Zb,$b=0|d[Wb>>0],_b=255&$b,vb=qm,yb=pm,lm=nm,mm=om,Tn=_b,Ao=Do,Io=Lo,Po=Ro,aq=cq,gq=jq,rq=vq):(ac=0|av(a),vb=qm,yb=pm,lm=nm,mm=om,Tn=ac,Ao=Do,Io=Lo,Po=Ro,aq=cq,gq=jq,rq=vq)}if(bc=0==(0|Bo)){ec=0|f[_>>2],fc=0==(0|ec),fc||(gc=0|f[$>>2],hc=gc+-1|0,f[$>>2]=hc),ic=0==(0|c),ic?$u(a,0):fc||(jc=0|f[$>>2],kc=jc+-1|0,f[$>>2]=kc,lc=0==(0|Jo),lc||(mc=jc+-2|0,f[$>>2]=mc)),nc=+(0|dq),pc=0*nc,g=pc;break a}if(qc=0==(0|Jo),tc=qc?sc:rc,wc=qc?vc:uc,xc=(0|vc)<0,yc=sc>>>0<8,Ac=0==(0|vc),Bc=Ac&yc,Cc=xc|Bc)for(Ec=sc,Fc=vc,lq=hq;;){if(Dc=lq<<4,Gc=0|mw(0|Ec,0|Fc,1,0),Hc=F,Ic=(0|Hc)<0,Jc=Gc>>>0<8,Lc=0==(0|Hc),Mc=Lc&Jc,Nc=Ic|Mc,!Nc){kq=Dc;break}Ec=Gc,Fc=Hc,lq=Dc}else kq=hq;if(Oc=32|Un,Pc=112==(0|Oc))if(Qc=0|Dv(a,c),Rc=F,Sc=0==(0|Qc),Tc=(0|Rc)==-2147483648,Uc=Sc&Tc){if(Wc=0==(0|c)){$u(a,0),g=0;break a}Xc=0|f[_>>2],Yc=0==(0|Xc),Yc?(id=0,jd=0):(Zc=0|f[$>>2],$c=Zc+-1|0,f[$>>2]=$c,id=0,jd=0)}else id=Qc,jd=Rc;else _c=0|f[_>>2],ad=0==(0|_c),ad?(id=0,jd=0):(bd=0|f[$>>2],cd=bd+-1|0,f[$>>2]=cd,id=0,jd=0);if(dd=0|ow(0|tc,0|wc,2),fd=F,gd=0|mw(0|dd,0|fd,-32,-1),hd=F,kd=0|mw(0|gd,0|hd,0|id,0|jd),ld=F,md=0==(0|kq)){nd=+(0|dq),od=0*nd,g=od;break a}if(qd=0-ro|0,rd=(0|ld)>0,sd=kd>>>0>qd>>>0,td=0==(0|ld),ud=td&sd,vd=rd|ud){wd=0|Pu(),f[wd>>2]=34,xd=+(0|dq),yd=1.7976931348623157e308*xd,zd=1.7976931348623157e308*yd,g=zd;break a}if(Bd=ro+-106|0,Cd=(0|Bd)<0,Dd=Cd<<31>>31,Ed=(0|ld)<(0|Dd),Fd=kd>>>0<Bd>>>0,Gd=(0|ld)==(0|Dd),Hd=Gd&Fd,Id=Ed|Hd){Kd=0|Pu(),f[Kd>>2]=34,Md=+(0|dq),Nd=2.2250738585072014e-308*Md,Od=2.2250738585072014e-308*Nd,g=Od;break a}if(Jd=(0|kq)>-1)for(Ud=kd,Vd=ld,nq=kq,zq=sq;;){if(Pd=!(zq>=.5),Qd=nq<<1,Rd=zq+-1,Sd=1&Pd,Td=Sd|Qd,oq=1^Td,R=Pd?zq:Rd,Aq=zq+R,Xd=0|mw(0|Ud,0|Vd,-1,-1),Yd=F,Zd=(0|Td)>-1,!Zd){ce=Xd,de=Yd,mq=oq,yq=Aq;break}Ud=Xd,Vd=Yd,nq=oq,zq=Aq}else ce=kd,de=ld,mq=kq,yq=sq;$d=(0|ro)<0,_d=$d<<31>>31,ae=0|lw(32,0,0|ro,0|_d),be=F,ee=0|mw(0|ce,0|de,0|ae,0|be),he=F,ie=0>(0|he),je=Ln>>>0>ee>>>0,ke=0==(0|he),le=ke&je,me=ie|le,me?(ne=(0|ee)<0,ne?(k=0,Nq=127):(j=ee,Nq=125)):(j=Ln,Nq=125),125==(0|Nq)&&(oe=(0|j)<53,oe?(k=j,Nq=127):(W=+(0|dq),n=j,V=W,Jn=0)),127==(0|Nq)&&(pe=84-k|0,qe=+Ev(1,pe),se=+(0|dq),te=+Fv(qe,se),n=k,V=se,Jn=te),ue=(0|n)<32,ve=0!=yq,Kp=ve&ue,we=1&mq,xe=0==(0|we),Pp=xe&Kp,ye=1&Pp,pq=ye+mq|0,Bq=Pp?0:yq,ze=+(pq>>>0),Ae=V*ze,Be=Jn+Ae,De=V*Bq,Ee=De+Be,Fe=Ee-Jn,Ge=0!=Fe,Ge||(He=0|Pu(),f[He>>2]=34),Ie=+Gv(Fe,ce),g=Ie;break a}Yn=Xn}while(0);fq=ro+Ln|0,Oe=0-fq|0,h=Yn,yo=0;c:for(;;){switch(0|h){case 46:zo=yo,Nq=138;break c;case 48:break;default:s=h,rm=0,um=0,Co=yo,Ko=0;break c}Pe=0|f[$>>2],Qe=0|f[_>>2],Re=Pe>>>0<Qe>>>0,Re?(Se=Pe+1|0,f[$>>2]=Se,Te=0|d[Pe>>0],Ue=255&Te,h=Ue,yo=1):(Ve=0|av(a),h=Ve,yo=1)}if(138==(0|Nq))if(We=0|f[$>>2],Xe=0|f[_>>2],Ze=We>>>0<Xe>>>0,Ze?($e=We+1|0,f[$>>2]=$e,_e=0|d[We>>0],af=255&_e,q=af):(bf=0|av(a),q=bf),cf=48==(0|q))for(df=0,ef=0;;){if(ff=0|mw(0|df,0|ef,-1,-1),gf=F,jf=0|f[$>>2],kf=0|f[_>>2],lf=jf>>>0<kf>>>0,lf?(mf=jf+1|0,f[$>>2]=mf,nf=0|d[jf>>0],of=255&nf,p=of):(pf=0|av(a),p=pf),qf=48==(0|p),!qf){s=p,rm=ff,um=gf,Co=1,Ko=1;break}df=ff,ef=gf}else s=q,rm=0,um=0,Co=zo,Ko=1;f[qq>>2]=0,rf=s+-48|0,sf=rf>>>0<10,uf=46==(0|s),vf=uf|sf;c:do if(vf){wf=qq+496|0,y=s,zf=0,Af=0,vm=uf,wm=rf,xm=rm,ym=um,Fo=Co,No=Ko,$o=0,gp=0,tp=0;d:for(;;){do if(vm){if(eo=0==(0|No),!eo){Dm=xm,Fm=ym,Gm=zf,Hm=Af,Go=Fo,_o=$o,hp=gp,up=tp;break d}zm=zf,Am=Af,Bm=zf,Cm=Af,Ho=Fo,Oo=1,dp=$o,
+lp=gp,yp=tp}else{if(yf=(0|gp)<125,Bf=0|mw(0|zf,0|Af,1,0),Cf=F,Df=48!=(0|y),!yf){if(!Df){zm=xm,Am=ym,Bm=Bf,Cm=Cf,Ho=Fo,Oo=No,dp=$o,lp=gp,yp=tp;break}Of=0|f[wf>>2],Qf=1|Of,f[wf>>2]=Qf,zm=xm,Am=ym,Bm=Bf,Cm=Cf,Ho=Fo,Oo=No,dp=$o,lp=gp,yp=tp;break}M=Df?Bf:tp,Ff=0==(0|$o),Gf=qq+(gp<<2)|0,Ff?eq=wm:(Hf=0|f[Gf>>2],If=10*Hf|0,Jf=y+-48|0,Kf=Jf+If|0,eq=Kf),f[Gf>>2]=eq,Lf=$o+1|0,Mf=9==(0|Lf),Nf=1&Mf,A=Nf+gp|0,r=Mf?0:Lf,zm=xm,Am=ym,Bm=Bf,Cm=Cf,Ho=1,Oo=No,dp=r,lp=A,yp=M}while(0);if(Rf=0|f[$>>2],Sf=0|f[_>>2],Tf=Rf>>>0<Sf>>>0,Tf?(Uf=Rf+1|0,f[$>>2]=Uf,Vf=0|d[Rf>>0],Wf=255&Vf,w=Wf):(Xf=0|av(a),w=Xf),Yf=w+-48|0,Zf=Yf>>>0<10,_f=46==(0|w),ag=_f|Zf,!ag){x=w,cg=zm,dg=Bm,fg=Am,gg=Cm,Eo=Ho,Mo=Oo,Zo=dp,fp=lp,sp=yp,Nq=161;break c}y=w,zf=Bm,Af=Cm,vm=_f,wm=Yf,xm=zm,ym=Am,Fo=Ho,No=Oo,$o=dp,gp=lp,tp=yp}xf=0!=(0|Go),Im=Gm,Jm=Hm,Km=Dm,Lm=Fm,Mm=xf,cp=_o,kp=hp,xp=up,Nq=169}else x=s,cg=rm,dg=0,fg=um,gg=0,Eo=Co,Mo=Ko,Zo=0,fp=0,sp=0,Nq=161;while(0);do if(161==(0|Nq)){if(bg=0==(0|Mo),eg=bg?dg:cg,hg=bg?gg:fg,ig=0!=(0|Eo),lg=32|x,mg=101==(0|lg),Cp=mg&ig,!Cp){if(Cg=(0|x)>-1){Im=dg,Jm=gg,Km=eg,Lm=hg,Mm=ig,cp=Zo,kp=fp,xp=sp,Nq=169;break}Nm=dg,Om=gg,Qm=ig,Rm=eg,Sm=hg,bp=Zo,jp=fp,wp=sp,Nq=171;break}if(ng=0|Dv(a,c),og=F,pg=0==(0|ng),qg=(0|og)==-2147483648,rg=pg&qg){if(sg=0==(0|c)){$u(a,0),o=0;break}tg=0|f[_>>2],ug=0==(0|tg),ug?(yg=0,zg=0):(wg=0|f[$>>2],xg=wg+-1|0,f[$>>2]=xg,yg=0,zg=0)}else yg=ng,zg=og;Ag=0|mw(0|yg,0|zg,0|eg,0|hg),Bg=F,Ng=Ag,Pg=dg,Qg=Bg,Tg=gg,ap=Zo,ip=fp,vp=sp,Nq=173}while(0);169==(0|Nq)&&(Dg=0|f[_>>2],Eg=0==(0|Dg),Eg?(Nm=Im,Om=Jm,Qm=Mm,Rm=Km,Sm=Lm,bp=cp,jp=kp,wp=xp,Nq=171):(Fg=0|f[$>>2],Hg=Fg+-1|0,f[$>>2]=Hg,Mm?(Ng=Km,Pg=Im,Qg=Lm,Tg=Jm,ap=cp,ip=kp,vp=xp,Nq=173):Nq=172)),171==(0|Nq)&&(Qm?(Ng=Rm,Pg=Nm,Qg=Sm,Tg=Om,ap=bp,ip=jp,vp=wp,Nq=173):Nq=172);do if(172==(0|Nq))Ig=0|Pu(),f[Ig>>2]=22,$u(a,0),o=0;else if(173==(0|Nq)){if(Jg=0|f[qq>>2],Kg=0==(0|Jg)){Lg=+(0|dq),Mg=0*Lg,o=Mg;break}if(Og=(0|Ng)==(0|Pg),Sg=(0|Qg)==(0|Tg),Ug=Og&Sg,Vg=(0|Tg)<0,Wg=Pg>>>0<10,Xg=0==(0|Tg),Yg=Xg&Wg,Zg=Vg|Yg,Bp=Zg&Ug,Bp&&($g=Ln>>>0>30,_g=Jg>>>Ln,bh=0==(0|_g),Ep=$g|bh)){ch=+(0|dq),dh=+(Jg>>>0),eh=ch*dh,o=eh;break}if(fh=(0|ro)/-2&-1,gh=(0|fh)<0,hh=gh<<31>>31,ih=(0|Qg)>(0|hh),jh=Ng>>>0>fh>>>0,kh=(0|Qg)==(0|hh),mh=kh&jh,nh=ih|mh){oh=0|Pu(),f[oh>>2]=34,ph=+(0|dq),qh=1.7976931348623157e308*ph,rh=1.7976931348623157e308*qh,o=rh;break}if(sh=ro+-106|0,th=(0|sh)<0,uh=th<<31>>31,vh=(0|Qg)<(0|uh),xh=Ng>>>0<sh>>>0,yh=(0|Qg)==(0|uh),zh=yh&xh,Ah=vh|zh){Bh=0|Pu(),f[Bh>>2]=34,Ch=+(0|dq),Dh=2.2250738585072014e-308*Ch,Eh=2.2250738585072014e-308*Dh,o=Eh;break}if(Fh=0==(0|ap))mp=ip;else{if(Gh=(0|ap)<9){for(Ih=qq+(ip<<2)|0,Y=0|f[Ih>>2],Kh=Y,ep=ap;;){if(Jh=10*Kh|0,Lh=ep+1|0,so=9==(0|Lh)){K=Jh;break}Kh=Jh,ep=Lh}f[Ih>>2]=K}Mh=ip+1|0,mp=Mh}if(Nh=(0|vp)<9,Nh&&(Oh=(0|vp)<=(0|Ng),Ph=(0|Ng)<18,Jp=Oh&Ph)){if(Qh=9==(0|Ng)){Rh=+(0|dq),Th=0|f[qq>>2],Uh=+(Th>>>0),Vh=Rh*Uh,o=Vh;break}if(Wh=(0|Ng)<9){Xh=+(0|dq),Yh=0|f[qq>>2],Zh=+(Yh>>>0),$h=Xh*Zh,_h=8-Ng|0,ai=3012+(_h<<2)|0,ci=0|f[ai>>2],di=+(0|ci),ei=$h/di,o=ei;break}if(N=0|U(Ng,-3),O=Ln+27|0,fi=O+N|0,gi=(0|fi)>30,T=0|f[qq>>2],hi=T>>>fi,ii=0==(0|hi),Dp=gi|ii){ji=+(0|dq),ki=+(T>>>0),li=ji*ki,oi=Ng+-10|0,pi=3012+(oi<<2)|0,qi=0|f[pi>>2],ri=+(0|qi),si=li*ri,o=si;break}}if(ti=(0|Ng)%9&-1,ui=0==(0|ti))zn=0,ko=0,Vp=Ng,Eq=mp;else{if(vi=(0|Ng)>-1,wi=ti+9|0,xi=vi?ti:wi,zi=8-xi|0,Ai=3012+(zi<<2)|0,Bi=0|f[Ai>>2],Ci=0==(0|mp))vn=0,Rp=Ng,Cq=0;else{for(Di=1e9/(0|Bi)&-1,wn=0,Zn=0,np=0,Sp=Ng;;){if(Ei=qq+(np<<2)|0,Fi=0|f[Ei>>2],Gi=(Fi>>>0)%(Bi>>>0)&-1,Hi=(Fi>>>0)/(Bi>>>0)&-1,Ii=Hi+Zn|0,f[Ei>>2]=Ii,Ki=0|U(Gi,Di),Li=(0|np)==(0|wn),Mi=0==(0|Ii),Fp=Li&Mi,Ni=np+1|0,Oi=127&Ni,Pi=Sp+-9|0,Tp=Fp?Pi:Sp,xn=Fp?Oi:wn,Qi=(0|Ni)==(0|mp)){J=Ki,yn=xn,Up=Tp;break}wn=xn,Zn=Ki,np=Ni,Sp=Tp}Ri=0==(0|J),Ri?(vn=yn,Rp=Up,Cq=mp):(Si=mp+1|0,Ti=qq+(mp<<2)|0,f[Ti>>2]=J,vn=yn,Rp=Up,Cq=Si)}Vi=9-xi|0,Wi=Vi+Rp|0,zn=vn,ko=0,Vp=Wi,Eq=Cq}c:for(;;){for(Xi=(0|Vp)<18,Yi=18==(0|Vp),Zi=qq+(zn<<2)|0,jo=ko,Dq=Eq;;){if(!Xi){if(!Yi){Dn=zn,no=jo,Xp=Vp,Mq=Dq;break c}if($i=0|f[Zi>>2],_i=$i>>>0<9007199,!_i){Dn=zn,no=jo,Xp=18,Mq=Dq;break c}}for(aj=Dq+127|0,$n=0,pp=aj,Hq=Dq;;){if(op=127&pp,bj=qq+(op<<2)|0,cj=0|f[bj>>2],ej=0|ow(0|cj,0,29),fj=F,gj=0|mw(0|ej,0|fj,0|$n,0),hj=F,ij=hj>>>0>0,jj=gj>>>0>1e9,kj=0==(0|hj),lj=kj&jj,mj=ij|lj,mj?(nj=0|vw(0|gj,0|hj,1e9,0),pj=F,qj=0|zw(0|gj,0|hj,1e9,0),rj=F,Z=qj,_n=nj):(Z=gj,_n=0),f[bj>>2]=Z,sj=Hq+127|0,tj=127&sj,uj=(0|op)!=(0|tj),vj=(0|op)==(0|zn),Gp=uj|vj,wj=0==(0|Z),qp=wj?op:Hq,Iq=Gp?Hq:qp,xj=op+-1|0,vj){ao=_n,Jq=Iq;break}$n=_n,pp=xj,Hq=Iq}if(yj=jo+-29|0,Aj=0==(0|ao),!Aj){I=yj,bo=ao,Kq=Jq;break}jo=yj,Dq=Jq}Bj=Vp+9|0,Cj=zn+127|0,Dj=127&Cj,Ej=(0|Dj)==(0|Kq),Ej?(Fj=Kq+127|0,Gj=127&Fj,Hj=qq+(Gj<<2)|0,Ij=0|f[Hj>>2],Jj=Kq+126|0,Lj=127&Jj,Mj=qq+(Lj<<2)|0,Nj=0|f[Mj>>2],Oj=Nj|Ij,f[Mj>>2]=Oj,Lq=Gj):Lq=Kq,Pj=qq+(Dj<<2)|0,f[Pj>>2]=bo,zn=Dj,ko=I,Vp=Bj,Eq=Lq}c:for(;;){for(wk=Mq+1|0,tk=127&wk,xk=Mq+127|0,yk=127&xk,zk=qq+(yk<<2)|0,En=Dn,oo=no,Wp=Xp;;){for(Ak=18==(0|Wp),Ck=(0|Wp)>27,t=Ck?9:1,P=1^Ak,An=En,lo=oo;;){Qj=127&An,Rj=(0|Qj)==(0|Mq);do if(Rj)Nq=219;else{if(Sj=qq+(Qj<<2)|0,Tj=0|f[Sj>>2],Uj=Tj>>>0<9007199){Nq=219;break}if(Wj=Tj>>>0>9007199)break;if(Xj=An+1|0,Yj=127&Xj,Zj=(0|Yj)==(0|Mq)){Nq=219;break}if(gm=qq+(Yj<<2)|0,im=0|f[gm>>2],jm=im>>>0<254740991){Nq=219;break}if(km=im>>>0>254740991,Mn=km|P,!Mn){Ik=Qj,Cn=An,mo=lo,Gq=Mq;break c}}while(0);if(219==(0|Nq)&&(Nq=0,Ak)){Nq=220;break c}if($j=lo+t|0,_j=(0|An)==(0|Mq),!_j){C=$j,Bn=An;break}An=Mq,lo=$j}for(ak=1<<t,bk=ak+-1|0,ck=1e9>>>t,Fn=Bn,co=0,rp=Bn,Yp=Wp;;){if(dk=qq+(rp<<2)|0,fk=0|f[dk>>2],gk=fk&bk,hk=fk>>>t,ik=hk+co|0,f[dk>>2]=ik,jk=0|U(gk,ck),kk=(0|rp)==(0|Fn),lk=0==(0|ik),Hp=kk&lk,mk=rp+1|0,nk=127&mk,ok=Yp+-9|0,Zp=Hp?ok:Yp,Gn=Hp?nk:Fn,rk=(0|nk)==(0|Mq)){E=jk,Hn=Gn,$p=Zp;break}Fn=Gn,co=jk,rp=nk,Yp=Zp}if(sk=0==(0|E))En=Hn,oo=C,Wp=$p;else{if(uk=(0|tk)==(0|Hn),!uk){D=C,G=E,In=Hn,_p=$p;break}Dk=0|f[zk>>2],Ek=1|Dk,f[zk>>2]=Ek,En=Hn,oo=C,Wp=$p}}vk=qq+(Mq<<2)|0,f[vk>>2]=G,Dn=In,no=D,Xp=_p,Mq=tk}220==(0|Nq)&&(Rj?(Fk=tk+-1|0,Gk=qq+(Fk<<2)|0,f[Gk>>2]=0,Ik=Mq,Cn=An,mo=lo,Gq=tk):(Ik=Qj,Cn=An,mo=lo,Gq=Mq)),Hk=qq+(Ik<<2)|0,Jk=0|f[Hk>>2],Kk=+(Jk>>>0),Lk=Cn+1|0,Nk=127&Lk,Ok=(0|Nk)==(0|Gq),Ok?(Wl=Cn+2|0,Xl=127&Wl,Zl=Xl+-1|0,$l=qq+(Zl<<2)|0,f[$l>>2]=0,Fq=Xl):Fq=Gq,_l=1e9*Kk,am=qq+(Nk<<2)|0,bm=0|f[am>>2],cm=+(bm>>>0),dm=_l+cm,jl=+(0|dq),Rk=jl*dm,Fl=mo+53|0,Ll=Fl-ro|0,Ml=(0|Ll)<(0|Ln),em=(0|Ll)<0,e=em?0:Ll,go=1&Ml,i=Ml?e:Ln,fm=(0|i)<53,fm?(Pk=105-i|0,Qk=+Ev(1,Pk),Sk=+Fv(Qk,Rk),Tk=53-i|0,Uk=+Ev(1,Tk),Vk=+Hv(Rk,Uk),Wk=Rk-Vk,Yk=Sk+Wk,Kn=Sk,to=Vk,uq=Yk):(Kn=0,to=0,uq=Rk),Zk=Cn+2|0,$k=127&Zk,_k=(0|$k)==(0|Fq);do if(_k)vo=to;else{al=qq+($k<<2)|0,bl=0|f[al>>2],cl=bl>>>0<5e8;do{if(!cl){if(ll=bl>>>0>5e8){ml=.75*jl,nl=ml+to,uo=nl;break}if(ol=Cn+3|0,pl=127&ol,ql=(0|pl)==(0|Fq)){sl=.5*jl,tl=sl+to,uo=tl;break}ul=.75*jl,vl=ul+to,uo=vl;break}if(dl=0==(0|bl),dl&&(el=Cn+3|0,fl=127&el,hl=(0|fl)==(0|Fq))){uo=to;break}il=.25*jl,kl=il+to,uo=kl}while(0);if(wl=53-i|0,xl=(0|wl)>1,!xl){vo=uo;break}if(yl=+Hv(uo,1),zl=0!=yl){vo=uo;break}Al=uo+1,vo=Al}while(0);Bl=uq+vo,Dl=Bl-Kn,El=2147483647&Fl,Gl=-2-fq|0,Hl=(0|El)>(0|Gl);do if(Hl){if(Il=+H(+Dl),Jl=!(Il>=9007199254740992),Jl?(io=go,po=mo,wq=Dl):(Kl=(0|i)==(0|Ll),Ip=Ml&Kl,ho=Ip?0:go,Ol=.5*Dl,Pl=mo+1|0,io=ho,po=Pl,wq=Ol),Ql=po+50|0,Rl=(0|Ql)>(0|Oe),!Rl&&(Sl=0!=(0|io),Tl=0!=vo,Qp=Tl&Sl,!Qp)){qo=po,xq=wq;break}Ul=0|Pu(),f[Ul>>2]=34,qo=po,xq=wq}else qo=mo,xq=Dl;while(0);Vl=+Gv(xq,qo),o=Vl}while(0);g=o;break a;default:ka=0|f[_>>2],ma=0==(0|ka),ma||(na=0|f[$>>2],oa=na+-1|0,f[$>>2]=oa),pa=0|Pu(),f[pa>>2]=22,$u(a,0),g=0;break a}}while(0);if(23==(0|Nq)&&(vg=0|f[_>>2],Gg=0==(0|vg),Gg||(Rg=0|f[$>>2],ah=Rg+-1|0,f[$>>2]=ah),lh=0!=(0|c),wh=So>>>0>3,Op=lh&wh))for(Uo=So;;){if(Gg||(Hh=0|f[$>>2],Sh=Hh+-1|0,f[$>>2]=Sh),bi=Uo+-1|0,Q=bi>>>0>3,!Q)break;Uo=bi}ni=+(0|dq),yi=ni*v,Ji=yi,g=Ji}while(0);return l=Oq,+g}function Dv(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,lb=0;switch(lb=l,e=a+4|0,g=0|f[e>>2],s=a+100|0,D=0|f[s>>2],P=g>>>0<D>>>0,P?($=g+1|0,f[e>>2]=$,ja=0|d[g>>0],ua=255&ja,Qa=ua):(Fa=0|av(a),Qa=Fa),h=45==(0|Qa),0|Qa){case 43:case 45:i=1&h,j=0|f[e>>2],k=0|f[s>>2],m=j>>>0<k>>>0,m?(n=j+1|0,f[e>>2]=n,o=0|d[j>>0],p=255&o,t=p):(q=0|av(a),t=q),r=t+-48|0,u=r>>>0>9,v=0!=(0|b),ib=v&u,ib?(w=0|f[s>>2],x=0==(0|w),x?(_a=t,hb=i):(y=0|f[e>>2],z=y+-1|0,f[e>>2]=z,_a=t,hb=i)):(_a=t,hb=i);break;default:_a=Qa,hb=0}if(A=_a+-48|0,B=A>>>0>9)C=0|f[s>>2],E=0==(0|C),E?(Za=-2147483648,$a=0):(G=0|f[e>>2],H=G+-1|0,f[e>>2]=H,Za=-2147483648,$a=0);else{for(cb=_a,jb=0;;){if(I=10*jb|0,J=cb+-48|0,K=J+I|0,L=0|f[e>>2],M=0|f[s>>2],N=L>>>0<M>>>0,N?(O=L+1|0,f[e>>2]=O,Q=0|d[L>>0],R=255&Q,ab=R):(S=0|av(a),ab=S),T=ab+-48|0,U=T>>>0<10,V=(0|K)<214748364,W=U&V,!W){c=K,bb=ab;break}cb=ab,jb=K}if(X=(0|c)<0,Y=X<<31>>31,Z=bb+-48|0,_=Z>>>0<10)for(ca=c,da=Y,fb=bb;;){if(ea=0|xw(0|ca,0|da,10,0),fa=F,ga=(0|fb)<0,ha=ga<<31>>31,ia=0|mw(0|fb,0|ha,-48,-1),ka=F,la=0|mw(0|ia,0|ka,0|ea,0|fa),ma=F,na=0|f[e>>2],oa=0|f[s>>2],pa=na>>>0<oa>>>0,pa?(qa=na+1|0,f[e>>2]=qa,ra=0|d[na>>0],sa=255&ra,db=sa):(ta=0|av(a),db=ta),va=db+-48|0,wa=va>>>0<10,xa=(0|ma)<21474836,ya=la>>>0<2061584302,za=21474836==(0|ma),Aa=za&ya,Ba=xa|Aa,Ca=wa&Ba,!Ca){Ta=la,Ua=ma,eb=db;break}ca=la,da=ma,fb=db}else Ta=c,Ua=Y,eb=bb;if(aa=eb+-48|0,ba=aa>>>0<10)for(;;)if(Da=0|f[e>>2],Ea=0|f[s>>2],Ga=Da>>>0<Ea>>>0,Ga?(Ha=Da+1|0,f[e>>2]=Ha,Ia=0|d[Da>>0],Ja=255&Ia,gb=Ja):(Ka=0|av(a),gb=Ka),La=gb+-48|0,Ma=La>>>0<10,!Ma)break;Na=0|f[s>>2],Oa=0==(0|Na),Oa||(Pa=0|f[e>>2],Ra=Pa+-1|0,f[e>>2]=Ra),Sa=0!=(0|hb),Va=0|lw(0,0,0|Ta,0|Ua),Wa=F,Xa=Sa?Va:Ta,Ya=Sa?Wa:Ua,Za=Ya,$a=Xa}return F=Za,0|$a}function Ev(a,b){a=+a,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0;return E=l,g=(0|b)>1023,g?(h=8.98846567431158e307*a,u=b+-1023|0,v=(0|u)>1023,v?(w=8.98846567431158e307*h,x=b+-2046|0,y=(0|x)>1023,c=y?1023:x,d=c,C=w):(d=u,C=h)):(z=(0|b)<-1022,z?(A=2.2250738585072014e-308*a,B=b+1022|0,i=(0|B)<-1022,i?(j=2.2250738585072014e-308*A,m=b+2044|0,o=(0|m)<-1022,e=o?-1022:m,d=e,C=j):(d=B,C=A)):(d=b,C=a)),p=d+1023|0,q=0|ow(0|p,0,52),r=F,f[n>>2]=q,f[n+4>>2]=r,s=+k[n>>3],t=C*s,+t}function Fv(a,b){a=+a,b=+b;var c=0,e=0;return e=l,c=+fv(a,b),+c}function Gv(a,b){a=+a,b|=0;var c=0,e=0;return e=l,c=+Ev(a,b),+c}function Hv(a,b){a=+a,b=+b;var c=0,e=0;return e=l,c=+Iv(a,b),+c}function Iv(a,b){a=+a,b=+b;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0;uc=l,k[n>>3]=a,g=0|f[n>>2],h=0|f[n+4>>2],k[n>>3]=b,Ba=0|f[n>>2],Ma=0|f[n+4>>2],Xa=0|qw(0|g,0|h,52),gb=F,rb=2047&Xa,Cb=0|qw(0|Ba,0|Ma,52),Nb=F,Yb=2047&Cb,i=h&-2147483648,w=0|ow(0|Ba,0|Ma,1),J=F,U=0==(0|w),da=0==(0|J),oa=U&da;a:do if(oa)tc=3;else if(rc=+H(+b),k[n>>3]=rc,xa=0|f[n>>2],ya=0|f[n+4>>2],za=ya>>>0>2146435072,Aa=xa>>>0>0,Ca=2146435072==(0|ya),Da=Ca&Aa,Ea=za|Da,Fa=2047==(0|rb),sc=Ea|Fa)tc=3;else{if(Ia=0|ow(0|g,0|h,1),Ja=F,Ka=Ja>>>0>J>>>0,La=Ia>>>0>w>>>0,Na=(0|Ja)==(0|J),Oa=Na&La,Pa=Ka|Oa,!Pa)return Qa=(0|Ia)==(0|w),Ra=(0|Ja)==(0|J),Sa=Qa&Ra,Ta=0*a,e=Sa?Ta:a,+e;if(Ua=0==(0|rb)){if(Va=0|ow(0|g,0|h,12),Wa=F,Ya=(0|Wa)>-1,Za=Va>>>0>4294967295,$a=(0|Wa)==-1,_a=$a&Za,ab=Ya|_a)for(cb=Va,db=Wa,ic=0;;){if(bb=ic+-1|0,eb=0|ow(0|cb,0|db,1),fb=F,hb=(0|fb)>-1,ib=eb>>>0>4294967295,jb=(0|fb)==-1,kb=jb&ib,lb=hb|kb,!lb){hc=bb;break}cb=eb,db=fb,ic=bb}else hc=0;mb=1-hc|0,nb=0|ow(0|g,0|h,0|mb),ob=F,Sb=nb,Tb=ob,jc=hc}else pb=1048575&h,qb=1048576|pb,Sb=g,Tb=qb,jc=rb;if(sb=0==(0|Yb)){if(tb=0|ow(0|Ba,0|Ma,12),ub=F,vb=(0|ub)>-1,wb=tb>>>0>4294967295,xb=(0|ub)==-1,yb=xb&wb,zb=vb|yb)for(Bb=tb,Db=ub,pc=0;;){if(Ab=pc+-1|0,Eb=0|ow(0|Bb,0|Db,1),Fb=F,Gb=(0|Fb)>-1,Hb=Eb>>>0>4294967295,Ib=(0|Fb)==-1,Jb=Ib&Hb,Kb=Gb|Jb,!Kb){oc=Ab;break}Bb=Eb,Db=Fb,pc=Ab}else oc=0;Lb=1-oc|0,Mb=0|ow(0|Ba,0|Ma,0|Lb),Ob=F,Ub=Mb,Vb=Ob,qc=oc}else Pb=1048575&Ma,Qb=1048576|Pb,Ub=Ba,Vb=Qb,qc=Yb;Rb=(0|jc)>(0|qc),Wb=0|lw(0|Sb,0|Tb,0|Ub,0|Vb),Xb=F,Zb=(0|Xb)>-1,$b=Wb>>>0>4294967295,_b=(0|Xb)==-1,ac=_b&$b,bc=Zb|ac;b:do{if(Rb){for(sa=bc,ta=Wb,ua=Xb,cc=Sb,ec=Tb,lc=jc;;){if(sa){if(dc=(0|cc)==(0|Ub),fc=(0|ec)==(0|Vb),gc=dc&fc)break;m=ta,o=ua}else m=cc,o=ec;if(p=0|ow(0|m,0|o,1),q=F,r=lc+-1|0,s=(0|r)>(0|qc),t=0|lw(0|p,0|q,0|Ub,0|Vb),u=F,v=(0|u)>-1,x=t>>>0>4294967295,y=(0|u)==-1,z=y&x,A=v|z,!s){d=A,B=p,D=q,va=t,wa=u,kc=r;break b}sa=A,ta=t,ua=u,cc=p,ec=q,lc=r}j=0*a,c=j;break a}d=bc,B=Sb,D=Tb,va=Wb,wa=Xb,kc=jc}while(0);if(d){if(C=(0|B)==(0|Ub),E=(0|D)==(0|Vb),G=C&E){Q=0*a,c=Q;break}I=wa,L=va}else I=D,L=B;if(K=I>>>0<1048576,M=L>>>0<0,N=1048576==(0|I),O=N&M,P=K|O)for(R=L,S=I,nc=kc;;){if(T=0|ow(0|R,0|S,1),V=F,W=nc+-1|0,X=V>>>0<1048576,Y=T>>>0<0,Z=1048576==(0|V),$=Z&Y,_=X|$,!_){ba=T,ca=V,mc=W;break}R=T,S=V,nc=W}else ba=L,ca=I,mc=kc;aa=(0|mc)>0,aa?(ea=0|mw(0|ba,0|ca,0,-1048576),fa=F,ga=0|ow(0|mc,0,52),ha=F,ia=ea|ga,ja=fa|ha,pa=ja,qa=ia):(ka=1-mc|0,la=0|qw(0|ba,0|ca,0|ka),ma=F,pa=ma,qa=la),na=pa|i,f[n>>2]=qa,f[n+4>>2]=na,ra=+k[n>>3],c=ra}while(0);return 3==(0|tc)&&(Ga=a*b,Ha=Ga/Ga,c=Ha),+c}function Jv(a){a|=0;var b=0,c=0,e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;L=l,m=a,n=3&m,y=0==(0|n);a:do if(y)c=a,K=4;else for(e=a,A=m;;){if(B=0|d[e>>0],C=B<<24>>24==0){i=A;break a}if(D=e+1|0,E=D,F=3&E,G=0==(0|F)){c=D,K=4;break}e=D,A=E}while(0);if(4==(0|K)){for(I=c;;){if(H=0|f[I>>2],o=H+-16843009|0,p=H&-2139062144,q=p^-2139062144,r=q&o,s=0==(0|r),t=I+4|0,!s){h=H,J=I;break}I=t}if(u=255&h,v=u<<24>>24==0)g=J;else for(j=J;;){if(w=j+1|0,k=0|d[w>>0],x=k<<24>>24==0){g=w;break}j=w}z=g,i=z}return b=i-m|0,0|b}function Kv(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,i=0;return i=l,l=l+16|0,(0|l)>=(0|m)&&X(),g=i,f[g>>2]=d,e=0|jv(a,b,c,g),l=i,0|e}function Lv(a,b){a=+a,b=+b;var c=0,d=0,e=0,g=0,h=0,i=0,k=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0;Ta=l,j[n>>2]=a,h=0|f[n>>2],j[n>>2]=b,i=0|f[n>>2],w=h>>>23,I=255&w,T=i>>>23,ca=255&T,na=h&-2147483648,sa=i<<1,ta=0==(0|sa);a:do if(ta)Sa=3;else if(Fa=+H(+b),j[n>>2]=Fa,ua=0|f[n>>2],k=ua>>>0>2139095040,m=255==(0|I),Ia=k|m)Sa=3;else{if(q=h<<1,r=q>>>0>sa>>>0,!r)return s=(0|q)==(0|sa),t=0*a,g=s?t:a,+g;if(u=0==(0|I)){if(v=h<<9,x=(0|v)>-1)for(wa=0,Ga=v;;){if(y=wa+-1|0,z=Ga<<1,A=(0|z)>-1,!A){va=y;break}wa=y,Ga=z}else va=0;B=1-va|0,C=h<<B,xa=va,Ja=C}else D=8388607&h,E=8388608|D,xa=I,Ja=E;if(F=0==(0|ca)){if(G=i<<9,J=(0|G)>-1)for(Da=0,Ha=G;;){if(K=Da+-1|0,L=Ha<<1,M=(0|L)>-1,!M){Ca=K;break}Da=K,Ha=L}else Ca=0;N=1-Ca|0,O=i<<N,Ea=Ca,Ra=O}else P=8388607&i,Q=8388608|P,Ea=ca,Ra=Q;R=(0|xa)>(0|Ea),S=Ja-Ra|0,U=(0|S)>-1;b:do{if(R){for(qa=U,ra=S,za=xa,La=Ja;;){if(qa){if(V=(0|La)==(0|Ra))break;Ma=ra}else Ma=La;if(X=Ma<<1,Y=za+-1|0,Z=(0|Y)>(0|Ea),$=X-Ra|0,_=(0|$)>-1,!Z){d=$,e=_,ya=Y,Ka=X;break b}qa=_,ra=$,za=Y,La=X}W=0*a,c=W;break a}d=S,e=U,ya=xa,Ka=Ja}while(0);if(e){if(aa=(0|Ka)==(0|Ra)){da=0*a,c=da;break}Oa=d}else Oa=Ka;if(ba=Oa>>>0<8388608)for(Ba=ya,Pa=Oa;;){if(ea=Pa<<1,fa=Ba+-1|0,ga=ea>>>0<8388608,!ga){Aa=fa,Na=ea;break}Ba=fa,Pa=ea}else Aa=ya,Na=Oa;ha=(0|Aa)>0,ha?(ia=Na+-8388608|0,ja=Aa<<23,ka=ia|ja,Qa=ka):(la=1-Aa|0,ma=Na>>>la,Qa=ma),oa=Qa|na,f[n>>2]=oa,pa=+j[n>>2],c=pa}while(0);return 3==(0|Sa)&&(o=a*b,p=o/o,c=p),+c}function Mv(a,b){a|=0,b|=0;var c=0,e=0,f=0,g=0,h=0,j=0;return j=l,c=0|Nv(a,b),e=0|d[c>>0],f=255&b,g=e<<24>>24==f<<24>>24,h=g?c:0,0|h}function Nv(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,V=0,W=0,X=0,Y=0,Z=0,$=0,_=0,aa=0,ca=0;ca=l,i=255&b,j=0==(0|i);a:do if(j)V=0|Jv(a),W=a+V|0,c=W;else{if(v=a,G=3&v,R=0==(0|G))e=a;else for(T=255&b,g=a;;){if(X=0|d[g>>0],Y=X<<24>>24==0,k=X<<24>>24==T<<24>>24,Z=Y|k){c=g;break a}if(m=g+1|0,n=m,o=3&n,p=0==(0|o)){e=m;break}g=m}q=0|U(i,16843009),r=0|f[e>>2],s=r+-16843009|0,t=r&-2139062144,u=t^-2139062144,w=u&s,x=0==(0|w);b:do if(x)for(z=r,aa=e;;){if(y=z^q,A=y+-16843009|0,B=y&-2139062144,C=B^-2139062144,D=C&A,E=0==(0|D),!E){_=aa;break b}if(F=aa+4|0,H=0|f[F>>2],I=H+-16843009|0,J=H&-2139062144,K=J^-2139062144,L=K&I,M=0==(0|L),!M){_=F;break}z=H,aa=F}else _=e;while(0);for(N=255&b,h=_;;){if(O=0|d[h>>0],P=O<<24>>24==0,Q=O<<24>>24==N<<24>>24,$=P|Q,S=h+1|0,$){c=h;break}h=S}}while(0);return 0|c}function Ov(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0;return y=l,l=l+32|0,(0|l)>=(0|m)&&X(),u=y+16|0,t=y,e=0|d[b>>0],g=e<<24>>24,s=0|gv(72391,g,4),i=0==(0|s),i?(j=0|Pu(),f[j>>2]=22,c=0):(k=0|Pv(b),n=32768|k,f[t>>2]=a,v=t+4|0,f[v>>2]=n,w=t+8|0,f[w>>2]=438,o=0|Na(5,0|t),p=0|Ou(o),q=(0|p)<0,q?c=0:(r=0|Qv(p,b),h=0==(0|r),h?(f[u>>2]=p,0|Ma(6,0|u),c=0):c=r)),l=y,0|c}function Pv(a){a|=0;var b=0,c=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;return B=l,e=0|Mv(a,43),f=0==(0|e),m=0|d[a>>0],z=m<<24>>24!=114,b=1&z,u=f?b:2,n=0|Mv(a,120),o=0==(0|n),p=128|u,v=o?u:p,q=0|Mv(a,101),r=0==(0|q),s=524288|v,w=r?v:s,t=m<<24>>24==114,g=64|w,x=t?w:g,h=m<<24>>24==119,i=512|x,y=h?i:x,j=m<<24>>24==97,k=1024|y,c=j?k:y,0|c}function Qv(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,na=0,oa=0;if(na=l,l=l+112|0,(0|l)>=(0|m)&&X(),ba=na+40|0,da=na+24|0,ca=na+16|0,aa=na,_=na+52|0,i=0|d[b>>0],j=i<<24>>24,$=0|gv(72391,j,4),w=0==(0|$))H=0|Pu(),f[H>>2]=22,c=0;else if(S=0|fw(1144),U=0==(0|S))c=0;else{la=S,oa=la+112|0;do f[la>>2]=0,la=la+4|0;while((0|la)<(0|oa));V=0|Mv(b,43),W=0==(0|V),W&&(Y=i<<24>>24==114,Z=Y?8:4,f[S>>2]=Z),k=0|Mv(b,101),n=0==(0|k),n?o=i:(f[aa>>2]=a,ea=aa+4|0,f[ea>>2]=2,ja=aa+8|0,f[ja>>2]=1,0|va(221,0|aa),g=0|d[b>>0],o=g),p=o<<24>>24==97,p?(f[ca>>2]=a,ka=ca+4|0,f[ka>>2]=3,q=0|va(221,0|ca),r=1024&q,s=0==(0|r),s&&(t=1024|q,f[da>>2]=a,fa=da+4|0,f[fa>>2]=4,ga=da+8|0,f[ga>>2]=t,0|va(221,0|da)),u=0|f[S>>2],v=128|u,f[S>>2]=v,D=v):(h=0|f[S>>2],D=h),x=S+60|0,f[x>>2]=a,y=S+120|0,z=S+44|0,f[z>>2]=y,A=S+48|0,f[A>>2]=1024,B=S+75|0,d[B>>0]=-1,C=8&D,E=0==(0|C),E&&(f[ba>>2]=a,ha=ba+4|0,f[ha>>2]=21505,ia=ba+8|0,f[ia>>2]=_,F=0|Ha(54,0|ba),G=0==(0|F),G&&(d[B>>0]=10)),I=S+32|0,f[I>>2]=4,J=S+36|0,f[J>>2]=2,K=S+40|0,f[K>>2]=3,L=S+12|0,f[L>>2]=1,M=0|f[18725],N=0==(0|M),N&&(O=S+76|0,f[O>>2]=-1),La(74924),P=0|f[18730],Q=S+56|0,f[Q>>2]=P,R=0==(0|P),R||(e=P,T=e+52|0,f[T>>2]=S),f[18730]=S,Ia(74924),c=S}return l=na,0|c}function Rv(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,F=0;return F=l,c=a+76|0,d=0|f[c>>2],q=(0|d)>-1,q&&0|xv(a),x=0|f[a>>2],y=1&x,z=0!=(0|y),z||(La(74924),A=a+52|0,B=0|f[A>>2],C=0==(0|B),D=B,b=a+56|0,C||(e=0|f[b>>2],g=B+56|0,f[g>>2]=e),h=0|f[b>>2],i=0==(0|h),j=h,i||(k=h+52|0,f[k>>2]=D),m=0|f[18730],n=(0|m)==(0|a),n&&(f[18730]=j),Ia(74924)),o=0|Sv(a),p=a+12|0,r=0|f[p>>2],s=0|bx[255&r](a),t=s|o,u=a+92|0,v=0|f[u>>2],w=0==(0|v),w||gw(v),z||gw(a),0|t}function Sv(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,O=0;O=l,g=0==(0|a);do if(g){if(G=0|f[724],H=0==(0|G),H?B=0:(I=0|f[724],i=0|Sv(I),B=i),La(74924),d=0|f[18730],j=0==(0|d))K=B;else for(e=d,L=B;;){if(k=e+76|0,m=0|f[k>>2],n=(0|m)>-1,n?(o=0|xv(e),x=o):x=0,p=e+20|0,q=0|f[p>>2],r=e+28|0,s=0|f[r>>2],u=q>>>0>s>>>0,u?(v=0|Tv(e),w=v|L,M=w):M=L,y=0==(0|x),y||Su(e),z=e+56|0,c=0|f[z>>2],A=0==(0|c)){K=M;break}e=c,L=M}Ia(74924),b=K}else{if(h=a+76|0,t=0|f[h>>2],C=(0|t)>-1,!C){D=0|Tv(a),b=D;break}E=0|xv(a),J=0==(0|E),F=0|Tv(a),J?b=F:(Su(a),b=F)}while(0);return 0|b}function Tv(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;return z=l,c=a+20|0,d=0|f[c>>2],q=a+28|0,r=0|f[q>>2],s=d>>>0>r>>>0,s?(t=a+36|0,u=0|f[t>>2],0|Yw[511&u](a,0,0),v=0|f[c>>2],w=0==(0|v),w?b=-1:y=3):y=3,3==(0|y)&&(x=a+4|0,e=0|f[x>>2],g=a+8|0,h=0|f[g>>2],i=e>>>0<h>>>0,i&&(j=a+40|0,k=0|f[j>>2],m=e,n=h,o=m-n|0,0|Yw[511&k](a,o,1)),p=a+16|0,f[p>>2]=0,f[q>>2]=0,f[c>>2]=0,f[g>>2]=0,f[x>>2]=0,b=0),0|b}function Uv(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,q=0;return q=l,e=a+76|0,g=0|f[e>>2],h=(0|g)>-1,h?(k=0|xv(a),o=0==(0|k),m=0|f[a>>2],n=m>>>4,b=1&n,o?d=b:(Su(a),d=b)):(i=0|f[a>>2],j=i>>>4,c=1&j,d=c),0|d}function Vv(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,h=0;return h=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=h,f[e>>2]=c,d=0|lv(a,b,e),l=h,0|d}function Wv(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0;return g=l,c=0|Jv(a),d=c+1|0,e=0|Xv(a,b,d),0|e}function Xv(a,b,c){a|=0,b|=0,c|=0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,m=0,o=0;for(o=l,g=255&b,f=c;;){if(h=f+-1|0,i=0==(0|f)){e=0;break}if(j=a+h|0,k=0|d[j>>0],m=k<<24>>24==g<<24>>24){e=j;break}f=h}return 0|e}function Yv(a){a|=0;var b=0,c=0,e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;E=l,c=a+76|0,e=0|f[c>>2],r=(0|e)<0,r?D=3:(w=0|xv(a),x=0==(0|w),x?D=3:(k=a+4|0,m=0|f[k>>2],n=a+8|0,o=0|f[n>>2],p=m>>>0<o>>>0,p?(q=m+1|0,f[k>>2]=q,s=0|d[m>>0],t=255&s,v=t):(u=0|bv(a),v=u),Su(a),b=v));do if(3==(0|D)){if(y=a+4|0,z=0|f[y>>2],A=a+8|0,B=0|f[A>>2],C=z>>>0<B>>>0){g=z+1|0,f[y>>2]=g,h=0|d[z>>0],i=255&h,b=i;break}j=0|bv(a),b=j;break}while(0);return 0|b}function Zv(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;G=l,l=l+16|0,(0|l)>=(0|m)&&X(),E=G,g=255&b,d[E>>0]=g,h=a+16|0,u=0|f[h>>2],x=0==(0|u),x?(y=0|ov(a),z=0==(0|y),z?(e=0|f[h>>2],D=e,F=4):c=-1):(D=u,F=4);do if(4==(0|F)){if(A=a+20|0,B=0|f[A>>2],C=B>>>0<D>>>0,C&&(i=255&b,j=a+75|0,k=0|d[j>>0],n=k<<24>>24,o=(0|i)==(0|n),!o)){p=B+1|0,f[A>>2]=p,d[B>>0]=g,c=i;break}q=a+36|0,r=0|f[q>>2],s=0|Yw[511&r](a,E,1),t=1==(0|s),t?(v=0|d[E>>0],w=255&v,c=w):c=-1}while(0);return l=G,0|c}function $v(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0;return g=l,c=0|Jv(a),d=0|_v(a,c,1,b),e=d+-1|0,0|e}function _v(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,t=0;return t=l,e=0|U(c,b),g=d+76|0,i=0|f[g>>2],j=(0|i)>-1,j?(m=0|xv(d),r=0==(0|m),n=0|nv(a,e,d),r?o=n:(Su(d),o=n)):(k=0|nv(a,e,d),o=k),p=(0|o)==(0|e),p?h=c:(q=(o>>>0)/(b>>>0)&-1,h=q),0|h}function aw(a,b){a|=0,b|=0;var c=0,d=0,e=0,h=0;return h=l,l=l+16|0,(0|l)>=(0|m)&&X(),e=h,f[e>>2]=b,c=0|f[695],d=0|lv(c,a,e),l=h,0|d}function bw(a,b){a|=0,b|=0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;N=l,e=b+76|0,g=0|f[e>>2],s=(0|g)<0,s?M=3:(D=0|xv(b),G=0==(0|D),G?M=3:(q=b+75|0,r=0|d[q>>0],t=r<<24>>24,u=(0|t)==(0|a),u?M=10:(v=b+20|0,w=0|f[v>>2],x=b+16|0,y=0|f[x>>2],z=w>>>0<y>>>0,z?(A=255&a,B=w+1|0,f[v>>2]=B,d[w>>0]=A,C=255&a,F=C):M=10),10==(0|M)&&(E=0|Zv(b,a),F=E),Su(b),c=F));do if(3==(0|M)){if(H=b+75|0,I=0|d[H>>0],J=I<<24>>24,K=(0|J)==(0|a),!K&&(L=b+20|0,h=0|f[L>>2],i=b+16|0,j=0|f[i>>2],k=h>>>0<j>>>0)){m=255&a,n=h+1|0,f[L>>2]=n,d[h>>0]=m,o=255&a,c=o;break}p=0|Zv(b,a),c=p}while(0);return 0|c}function cw(a,b){a|=0,b|=0;var c=0,e=0;return e=l,c=+dw(a,b,1),+c}function dw(a,b,c){a|=0,b|=0,c|=0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,y=0,z=0;y=l,l=l+112|0,(0|l)>=(0|m)&&X(),v=y,w=v,z=w+112|0;do f[w>>2]=0,w=w+4|0;while((0|w)<(0|z));return d=v+4|0,f[d>>2]=a,e=v+8|0,f[e>>2]=-1,n=v+44|0,f[n>>2]=a,o=v+76|0,f[o>>2]=-1,$u(v,0),p=+Cv(v,c,1),q=v+108|0,r=0|f[q>>2],s=0|f[d>>2],t=0|f[e>>2],u=s-t|0,g=u+r|0,h=0==(0|b),h||(i=0!=(0|g),j=a+g|0,k=i?j:a,f[b>>2]=k),l=y,+p}function ew(a,b){a|=0,b|=0;var c=0,d=0,f=0;return f=l,c=+dw(a,b,0),d=c,+d}function fw(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,ya=0,za=0,Aa=0,Ba=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0,wf=0,xf=0,yf=0,zf=0,Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0,Gf=0,Hf=0,If=0,Jf=0,Kf=0,Lf=0,Mf=0,Nf=0,Of=0,Pf=0,Qf=0,Rf=0,Sf=0,Tf=0,Uf=0,Vf=0,Wf=0,Xf=0,Yf=0,Zf=0,$f=0,_f=0,ag=0,bg=0,cg=0,dg=0,eg=0,fg=0,gg=0,hg=0,ig=0,jg=0,kg=0,lg=0,mg=0,ng=0,og=0,pg=0,qg=0,rg=0,sg=0,tg=0,ug=0,vg=0,wg=0,xg=0,yg=0,zg=0,Ag=0,Bg=0,Cg=0,Dg=0,Eg=0,Fg=0,Gg=0,Hg=0,Ig=0,Jg=0,Kg=0,Lg=0,Mg=0,Ng=0,Og=0,Pg=0,Qg=0,Rg=0,Sg=0,Tg=0,Ug=0,Vg=0,Wg=0,Xg=0,Yg=0,Zg=0,$g=0,_g=0,ah=0,bh=0,ch=0,dh=0,eh=0,fh=0,gh=0,hh=0,ih=0,jh=0,kh=0,lh=0,mh=0,nh=0,oh=0,ph=0,qh=0,rh=0,sh=0,th=0,uh=0,vh=0,wh=0,xh=0,yh=0,zh=0,Ah=0,Bh=0,Ch=0,Dh=0,Eh=0,Fh=0,Gh=0,Hh=0,Ih=0,Jh=0,Kh=0,Lh=0,Mh=0,Nh=0,Oh=0,Ph=0,Qh=0,Rh=0,Sh=0,Th=0,Uh=0,Vh=0,Wh=0,Xh=0,Yh=0,Zh=0,$h=0,_h=0,ai=0,bi=0,ci=0,di=0,ei=0,fi=0,gi=0,hi=0,ii=0,ji=0,ki=0,li=0,mi=0,ni=0,oi=0,pi=0,qi=0,ri=0,si=0,ti=0,ui=0,vi=0,wi=0,xi=0,yi=0,zi=0,Ai=0,Bi=0,Ci=0,Di=0,Ei=0,Fi=0,Gi=0,Hi=0,Ii=0,Ji=0,Ki=0,Li=0,Mi=0,Ni=0,Oi=0,Pi=0,Qi=0,Ri=0,Si=0,Ti=0,Ui=0,Vi=0,Wi=0,Xi=0,Yi=0,Zi=0,$i=0,_i=0,aj=0,bj=0,cj=0,dj=0,ej=0,fj=0,gj=0,hj=0,ij=0,jj=0,kj=0,lj=0,mj=0,nj=0,oj=0,pj=0,qj=0,rj=0,sj=0,tj=0,uj=0,vj=0,wj=0,xj=0,yj=0,zj=0,Aj=0,Bj=0,Cj=0,Dj=0,Ej=0,Fj=0,Gj=0,Hj=0,Ij=0,Jj=0,Kj=0,Lj=0,Mj=0,Nj=0,Oj=0,Pj=0,Qj=0,Rj=0,Sj=0,Tj=0,Uj=0,Vj=0,Wj=0,Xj=0,Yj=0,Zj=0,$j=0,_j=0,ak=0,bk=0,ck=0,dk=0,ek=0,fk=0,gk=0,hk=0,ik=0,jk=0,kk=0,lk=0,mk=0,nk=0,ok=0,pk=0,qk=0,rk=0,sk=0,tk=0,uk=0,vk=0,wk=0,xk=0,yk=0,zk=0,Ak=0,Bk=0,Ck=0,Dk=0,Ek=0,Fk=0,Gk=0,Hk=0,Ik=0,Jk=0,Kk=0,Lk=0,Mk=0,Nk=0,Ok=0,Pk=0,Qk=0,Rk=0,Sk=0,Tk=0,Uk=0,Vk=0,Wk=0,Xk=0,Yk=0,Zk=0,$k=0,_k=0,al=0,bl=0,cl=0,dl=0,el=0,fl=0,gl=0,hl=0,il=0,jl=0,kl=0,ll=0,ml=0,nl=0,ol=0,pl=0,ql=0,rl=0,sl=0,tl=0,ul=0,vl=0,wl=0,xl=0,yl=0,zl=0,Al=0,Bl=0,Cl=0,Dl=0,El=0,Fl=0,Gl=0,Hl=0,Il=0,Jl=0,Kl=0,Ll=0,Ml=0,Nl=0,Ol=0,Pl=0,Ql=0,Rl=0,Sl=0,Tl=0,Ul=0,Vl=0,Wl=0,Xl=0,Yl=0,Zl=0,$l=0,_l=0,am=0,bm=0,cm=0,dm=0,em=0,fm=0,gm=0,hm=0,im=0,jm=0,km=0,lm=0,mm=0,nm=0,om=0,pm=0,qm=0,rm=0,sm=0,tm=0,um=0,vm=0,wm=0,xm=0,ym=0,zm=0,Am=0,Bm=0,Cm=0,Dm=0,Em=0,Fm=0,Gm=0,Hm=0,Im=0,Jm=0,Km=0,Lm=0,Mm=0,Nm=0,Om=0,Pm=0,Qm=0,Rm=0,Sm=0,Tm=0,Um=0,Vm=0,Wm=0,Xm=0,Ym=0,Zm=0,$m=0,_m=0,an=0,bn=0,cn=0,dn=0,en=0,fn=0,gn=0,hn=0,jn=0,kn=0,ln=0,mn=0,nn=0,on=0,pn=0,qn=0,rn=0,sn=0,tn=0,un=0,vn=0,wn=0,xn=0,yn=0,zn=0,An=0,Bn=0,Cn=0,Dn=0,En=0,Fn=0,Gn=0,Hn=0,In=0,Jn=0,Kn=0,Ln=0,Mn=0,Nn=0,On=0,Pn=0,Qn=0,Rn=0,Sn=0,Tn=0,Un=0,Vn=0,Wn=0,Xn=0,Yn=0,Zn=0,$n=0,_n=0,ao=0,bo=0,co=0,eo=0,fo=0,go=0,ho=0,io=0,jo=0,ko=0,lo=0,mo=0,no=0,oo=0,po=0,qo=0,ro=0,so=0,to=0,uo=0,vo=0,wo=0,xo=0,yo=0,zo=0,Ao=0,Bo=0,Co=0,Do=0,Eo=0,Fo=0,Go=0,Ho=0,Io=0,Jo=0,Ko=0,Lo=0,Mo=0,No=0,Oo=0,Po=0,Qo=0,Ro=0,So=0,To=0,Uo=0,Vo=0,Wo=0,Xo=0,Yo=0,Zo=0,$o=0,_o=0,ap=0,bp=0,cp=0,dp=0,ep=0,fp=0,gp=0,hp=0,ip=0,jp=0,kp=0,lp=0,mp=0,np=0,op=0,pp=0,qp=0,rp=0,sp=0,tp=0,up=0,vp=0,wp=0,xp=0,yp=0,zp=0,Ap=0,Bp=0,Cp=0,Dp=0,Ep=0,Fp=0,Gp=0,Hp=0,Ip=0,Jp=0,Kp=0,Lp=0,Mp=0,Np=0,Op=0,Pp=0,Qp=0,Rp=0,Sp=0,Tp=0,Up=0,Vp=0,Wp=0,Xp=0,Yp=0,Zp=0,$p=0,_p=0,aq=0,bq=0,cq=0,dq=0,eq=0,fq=0,gq=0,hq=0,iq=0,jq=0,kq=0,lq=0,mq=0,nq=0,oq=0,pq=0,qq=0,rq=0,sq=0,tq=0,uq=0,vq=0,wq=0,xq=0,yq=0,zq=0,Aq=0,Bq=0,Cq=0,Dq=0,Eq=0,Fq=0,Gq=0,Hq=0,Iq=0,Jq=0,Kq=0,Lq=0,Mq=0,Nq=0,Oq=0,Pq=0,Qq=0,Rq=0,Sq=0,Tq=0,Uq=0,Vq=0,Wq=0,Xq=0,Yq=0,Zq=0,$q=0,_q=0,ar=0,br=0,cr=0,dr=0,er=0,fr=0,gr=0,hr=0,ir=0,jr=0,kr=0,lr=0,mr=0,nr=0,or=0,pr=0,qr=0,rr=0,sr=0,tr=0,ur=0,vr=0,wr=0,xr=0,yr=0,zr=0,Ar=0,Br=0,Cr=0,Dr=0,Er=0,Fr=0,Gr=0,Hr=0,Ir=0,Jr=0,Kr=0,Lr=0,Mr=0,Nr=0,Or=0,Pr=0,Qr=0,Rr=0,Sr=0,Tr=0,Ur=0,Vr=0,Wr=0,Xr=0,Yr=0,Zr=0,$r=0,_r=0,as=0,bs=0,cs=0,ds=0,es=0,fs=0,gs=0,hs=0,is=0,js=0,ks=0,ls=0,ms=0,ns=0,os=0,ps=0,qs=0,rs=0,ss=0,ts=0,us=0,vs=0,ws=0,xs=0,ys=0,zs=0,As=0,Bs=0,Cs=0,Ds=0,Es=0,Fs=0,Gs=0,Hs=0,Is=0,Js=0,Ks=0,Ls=0,Ms=0,Ns=0,Os=0,Ps=0,Qs=0,Rs=0,Ss=0,Ts=0,Us=0,Vs=0,Ws=0,Xs=0,Ys=0,Zs=0,$s=0,_s=0,at=0,bt=0,ct=0,dt=0,et=0,ft=0,gt=0,ht=0,it=0,jt=0,kt=0,lt=0,mt=0,nt=0,ot=0,pt=0,qt=0,rt=0,st=0,tt=0,ut=0,vt=0,wt=0,xt=0,yt=0,zt=0,At=0,Bt=0,Ct=0,Dt=0,Et=0,Ft=0,Gt=0,Ht=0,It=0,Jt=0,Kt=0,Lt=0,Mt=0,Nt=0,Ot=0,Pt=0,Qt=0,Rt=0,St=0,Tt=0,Ut=0,Vt=0,Wt=0,Xt=0,Yt=0,Zt=0,$t=0,_t=0,au=0,bu=0,cu=0,du=0,eu=0,fu=0,gu=0,hu=0,iu=0,ju=0,ku=0,lu=0,mu=0,nu=0,ou=0,pu=0,qu=0,ru=0,su=0,tu=0,uu=0,vu=0,wu=0,xu=0,yu=0,zu=0,Au=0,Bu=0,Cu=0,Du=0,Eu=0,Fu=0,Gu=0,Hu=0,Iu=0,Ju=0,Ku=0,Lu=0,Mu=0,Nu=0,Ou=0,Qu=0,Ru=0,Su=0,Tu=0,Uu=0,Vu=0,Wu=0,Xu=0,Yu=0,Zu=0,$u=0,_u=0,av=0,bv=0,cv=0,dv=0,ev=0,fv=0,gv=0,hv=0,iv=0;iv=l,l=l+16|0,(0|l)>=(0|m)&&X(),gu=iv,G=a>>>0<245;do if(G){if(H=a>>>0<11,Tc=a+11|0,We=Tc&-8,$g=H?16:We,bj=$g>>>3,el=0|f[18736],hn=el>>>bj,mp=3&hn,pr=0==(0|mp),!pr){I=1&hn,ab=1^I,lb=ab+bj|0,wb=lb<<1,Hb=74984+(wb<<2)|0,Sb=Hb+8|0,bc=0|f[Sb>>2],mc=bc+8|0,xc=0|f[mc>>2],Ic=(0|Hb)==(0|xc);do if(Ic)Uc=1<<lb,dd=Uc^-1,od=el&dd,f[18736]=od;else{if(zd=0|f[18740],Kd=xc>>>0<zd>>>0,Kd&&xa(),Vd=xc+12|0,ee=0|f[Vd>>2],pe=(0|ee)==(0|bc)){f[Vd>>2]=Hb,f[Sb>>2]=xc;break}xa()}while(0);return Ae=lb<<3,Le=3|Ae,Xe=bc+4|0,f[Xe>>2]=Le,gf=bc+Ae|0,sf=gf+4|0,Df=0|f[sf>>2],Of=1|Df,f[sf>>2]=Of,b=mc,l=iv,0|b}if(Zf=0|f[18738],ig=$g>>>0>Zf>>>0){if(tg=0==(0|hn),!tg){Eg=hn<<bj,Pg=2<<bj,_g=0-Pg|0,kh=Pg|_g,vh=Eg&kh,Gh=0-vh|0,Rh=vh&Gh,ai=Rh+-1|0,li=ai>>>12,wi=16&li,Hi=ai>>>wi,Si=Hi>>>5,cj=8&Si,nj=cj|wi,yj=Hi>>>cj,Jj=yj>>>2,Uj=4&Jj,dk=nj|Uj,ok=yj>>>Uj,zk=ok>>>1,Kk=2&zk,Vk=dk|Kk,fl=ok>>>Kk,ql=fl>>>1,Bl=1&ql,Ml=Vk|Bl,Xl=fl>>>Bl,gm=Ml+Xl|0,rm=gm<<1,Cm=74984+(rm<<2)|0,Nm=Cm+8|0,Ym=0|f[Nm>>2],jn=Ym+8|0,un=0|f[jn>>2],Fn=(0|Cm)==(0|un);do if(Fn)Qn=1<<gm,_n=Qn^-1,lo=el&_n,f[18736]=lo,er=Zf;else{if(wo=0|f[18740],Ho=un>>>0<wo>>>0,Ho&&xa(),So=un+12|0,bp=0|f[So>>2],np=(0|bp)==(0|Ym)){f[So>>2]=Cm,f[Nm>>2]=un,q=0|f[18738],er=q;break}xa()}while(0);return yp=gm<<3,Jp=yp-$g|0,Up=3|$g,dq=Ym+4|0,f[dq>>2]=Up,oq=Ym+$g|0,zq=1|Jp,Kq=oq+4|0,f[Kq>>2]=zq,
+Vq=oq+Jp|0,f[Vq>>2]=Jp,qr=0==(0|er),qr||(Br=0|f[18741],Mr=er>>>3,Xr=Mr<<1,gs=74984+(Xr<<2)|0,rs=0|f[18736],Cs=1<<Mr,Ns=rs&Cs,Ys=0==(0|Ns),Ys?(ht=rs|Cs,f[18736]=ht,B=gs+8|0,A=B,ut=gs):(J=gs+8|0,U=0|f[J>>2],ea=0|f[18740],pa=U>>>0<ea>>>0,pa?xa():(A=J,ut=U)),f[A>>2]=Br,Ba=ut+12|0,f[Ba>>2]=Br,Na=Br+8|0,f[Na>>2]=ut,Ya=Br+12|0,f[Ya>>2]=gs),f[18738]=Jp,f[18741]=oq,b=jn,l=iv,0|b}if(Za=0|f[18737],$a=0==(0|Za),!$a){for(_a=0-Za|0,bb=Za&_a,cb=bb+-1|0,db=cb>>>12,eb=16&db,fb=cb>>>eb,gb=fb>>>5,hb=8&gb,ib=hb|eb,jb=fb>>>hb,kb=jb>>>2,mb=4&kb,nb=ib|mb,ob=jb>>>mb,pb=ob>>>1,qb=2&pb,rb=nb|qb,sb=ob>>>qb,tb=sb>>>1,ub=1&tb,vb=rb|ub,xb=sb>>>ub,yb=vb+xb|0,zb=75248+(yb<<2)|0,Ab=0|f[zb>>2],Bb=Ab+4|0,Cb=0|f[Bb>>2],Db=Cb&-8,Eb=Db-$g|0,zu=Eb,Uu=Ab,av=Ab;;){if(Fb=Uu+16|0,Gb=0|f[Fb>>2],Ib=0==(0|Gb)){if(Jb=Uu+20|0,Kb=0|f[Jb>>2],Lb=0==(0|Kb)){Au=zu,bv=av;break}Nb=Kb}else Nb=Gb;Mb=Nb+4|0,Ob=0|f[Mb>>2],Pb=Ob&-8,Qb=Pb-$g|0,Rb=Qb>>>0<zu>>>0,D=Rb?Qb:zu,F=Rb?Nb:av,zu=D,Uu=Nb,av=F}Tb=0|f[18740],Ub=bv>>>0<Tb>>>0,Ub&&xa(),Vb=bv+$g|0,Wb=bv>>>0<Vb>>>0,Wb||xa(),Xb=bv+24|0,Yb=0|f[Xb>>2],Zb=bv+12|0,$b=0|f[Zb>>2],_b=(0|$b)==(0|bv);do if(_b){if(kc=bv+20|0,lc=0|f[kc>>2],nc=0==(0|lc)){if(oc=bv+16|0,pc=0|f[oc>>2],qc=0==(0|pc)){Jt=0;break}Dt=pc,Mt=oc}else Dt=lc,Mt=kc;for(;;)if(rc=Dt+20|0,sc=0|f[rc>>2],tc=0==(0|sc)){if(uc=Dt+16|0,vc=0|f[uc>>2],wc=0==(0|vc)){Gt=Dt,Pt=Mt;break}Dt=vc,Mt=uc}else Dt=sc,Mt=rc;if(yc=Pt>>>0<Tb>>>0,!yc){f[Pt>>2]=0,Jt=Gt;break}xa()}else{if(ac=bv+8|0,cc=0|f[ac>>2],dc=cc>>>0<Tb>>>0,dc&&xa(),ec=cc+12|0,fc=0|f[ec>>2],gc=(0|fc)==(0|bv),gc||xa(),hc=$b+8|0,ic=0|f[hc>>2],jc=(0|ic)==(0|bv)){f[ec>>2]=$b,f[hc>>2]=cc,Jt=$b;break}xa()}while(0);zc=0==(0|Yb);do if(!zc){if(Ac=bv+28|0,Bc=0|f[Ac>>2],Cc=75248+(Bc<<2)|0,Dc=0|f[Cc>>2],Ec=(0|bv)==(0|Dc)){if(f[Cc>>2]=Jt,au=0==(0|Jt)){Fc=1<<Bc,Gc=Fc^-1,Hc=0|f[18737],Jc=Hc&Gc,f[18737]=Jc;break}}else if(Kc=0|f[18740],Lc=Yb>>>0<Kc>>>0,Lc&&xa(),Mc=Yb+16|0,Nc=0|f[Mc>>2],Oc=(0|Nc)==(0|bv),Oc?f[Mc>>2]=Jt:(Pc=Yb+20|0,f[Pc>>2]=Jt),Qc=0==(0|Jt))break;Rc=0|f[18740],Sc=Jt>>>0<Rc>>>0,Sc&&xa(),Vc=Jt+24|0,f[Vc>>2]=Yb,Wc=bv+16|0,Xc=0|f[Wc>>2],Yc=0==(0|Xc);do if(!Yc){if(Zc=Xc>>>0<Rc>>>0,!Zc){$c=Jt+16|0,f[$c>>2]=Xc,_c=Xc+24|0,f[_c>>2]=Jt;break}xa()}while(0);if(ad=bv+20|0,bd=0|f[ad>>2],cd=0==(0|bd),!cd){if(ed=0|f[18740],fd=bd>>>0<ed>>>0,!fd){gd=Jt+20|0,f[gd>>2]=bd,hd=bd+24|0,f[hd>>2]=Jt;break}xa()}}while(0);return id=Au>>>0<16,id?(jd=Au+$g|0,kd=3|jd,ld=bv+4|0,f[ld>>2]=kd,md=bv+jd|0,nd=md+4|0,pd=0|f[nd>>2],qd=1|pd,f[nd>>2]=qd):(rd=3|$g,sd=bv+4|0,f[sd>>2]=rd,td=1|Au,ud=Vb+4|0,f[ud>>2]=td,vd=Vb+Au|0,f[vd>>2]=Au,wd=0|f[18738],xd=0==(0|wd),xd||(yd=0|f[18741],Ad=wd>>>3,Bd=Ad<<1,Cd=74984+(Bd<<2)|0,Dd=0|f[18736],Ed=1<<Ad,Fd=Dd&Ed,Gd=0==(0|Fd),Gd?(Hd=Dd|Ed,f[18736]=Hd,r=Cd+8|0,y=r,tt=Cd):(Id=Cd+8|0,Jd=0|f[Id>>2],Ld=0|f[18740],Md=Jd>>>0<Ld>>>0,Md?xa():(y=Id,tt=Jd)),f[y>>2]=yd,Nd=tt+12|0,f[Nd>>2]=yd,Od=yd+8|0,f[Od>>2]=tt,Pd=yd+12|0,f[Pd>>2]=Cd),f[18738]=Au,f[18741]=Vb),Qd=bv+8|0,b=Qd,l=iv,0|b}hu=$g}else hu=$g}else if(Rd=a>>>0>4294967231)hu=-1;else if(Sd=a+11|0,Td=Sd&-8,Ud=0|f[18737],Wd=0==(0|Ud))hu=Td;else{Xd=0-Td|0,Yd=Sd>>>8,Zd=0==(0|Yd),Zd?fu=0:($d=Td>>>0>16777215,$d?fu=31:(_d=Yd+1048320|0,ae=_d>>>16,be=8&ae,ce=Yd<<be,de=ce+520192|0,fe=de>>>16,ge=4&fe,he=ge|be,ie=ce<<ge,je=ie+245760|0,ke=je>>>16,le=2&ke,me=he|le,ne=14-me|0,oe=ie<<le,qe=oe>>>15,re=ne+qe|0,se=re<<1,te=re+7|0,ue=Td>>>te,ve=1&ue,we=ve|se,fu=we)),xe=75248+(fu<<2)|0,ye=0|f[xe>>2],ze=0==(0|ye);a:do if(ze)Du=Xd,Wu=0,ev=0,hv=86;else for(Be=31==(0|fu),Ce=fu>>>1,De=25-Ce|0,Ee=Be?0:De,Fe=Td<<Ee,Bu=Xd,Gu=0,Ju=Fe,Vu=ye,cv=0;;){if(Ge=Vu+4|0,He=0|f[Ge>>2],Ie=He&-8,Je=Ie-Td|0,Ke=Je>>>0<Bu>>>0){if(Me=(0|Ie)==(0|Td)){Fu=Je,Zu=Vu,gv=Vu,hv=90;break a}Cu=Je,dv=Vu}else Cu=Bu,dv=cv;if(Ne=Vu+20|0,Oe=0|f[Ne>>2],Pe=Ju>>>31,Qe=(Vu+16|0)+(Pe<<2)|0,Re=0|f[Qe>>2],Se=0==(0|Oe),Te=(0|Oe)==(0|Re),ou=Se|Te,Hu=ou?Gu:Oe,Ue=0==(0|Re),Ve=1&Ue,Ye=1^Ve,Iu=Ju<<Ye,Ue){Du=Cu,Wu=Hu,ev=dv,hv=86;break}Bu=Cu,Gu=Hu,Ju=Iu,Vu=Re,cv=dv}while(0);if(86==(0|hv)){if(Ze=0==(0|Wu),$e=0==(0|ev),mu=Ze&$e){if(_e=2<<fu,af=0-_e|0,bf=_e|af,cf=Ud&bf,df=0==(0|cf)){hu=Td;break}ef=0-cf|0,ff=cf&ef,hf=ff+-1|0,jf=hf>>>12,kf=16&jf,lf=hf>>>kf,mf=lf>>>5,nf=8&mf,of=nf|kf,pf=lf>>>nf,qf=pf>>>2,rf=4&qf,tf=of|rf,uf=pf>>>rf,vf=uf>>>1,wf=2&vf,xf=tf|wf,yf=uf>>>wf,zf=yf>>>1,Af=1&zf,Bf=xf|Af,Cf=yf>>>Af,Ef=Bf+Cf|0,Ff=75248+(Ef<<2)|0,Gf=0|f[Ff>>2],Xu=Gf}else Xu=Wu;Hf=0==(0|Xu),Hf?(Eu=Du,fv=ev):(Fu=Du,Zu=Xu,gv=ev,hv=90)}if(90==(0|hv))for(;;)if(hv=0,If=Zu+4|0,Jf=0|f[If>>2],Kf=Jf&-8,Lf=Kf-Td|0,Mf=Lf>>>0<Fu>>>0,E=Mf?Lf:Fu,Yu=Mf?Zu:gv,Nf=Zu+16|0,Pf=0|f[Nf>>2],Qf=0==(0|Pf)){if(Rf=Zu+20|0,Sf=0|f[Rf>>2],Tf=0==(0|Sf)){Eu=E,fv=Yu;break}Fu=E,Zu=Sf,gv=Yu,hv=90}else Fu=E,Zu=Pf,gv=Yu,hv=90;if(Uf=0==(0|fv))hu=Td;else{if(Vf=0|f[18738],Wf=Vf-Td|0,Xf=Eu>>>0<Wf>>>0){Yf=0|f[18740],$f=fv>>>0<Yf>>>0,$f&&xa(),_f=fv+Td|0,ag=fv>>>0<_f>>>0,ag||xa(),bg=fv+24|0,cg=0|f[bg>>2],dg=fv+12|0,eg=0|f[dg>>2],fg=(0|eg)==(0|fv);do if(fg){if(qg=fv+20|0,rg=0|f[qg>>2],sg=0==(0|rg)){if(ug=fv+16|0,vg=0|f[ug>>2],wg=0==(0|vg)){Lt=0;break}Ht=vg,Qt=ug}else Ht=rg,Qt=qg;for(;;)if(xg=Ht+20|0,yg=0|f[xg>>2],zg=0==(0|yg)){if(Ag=Ht+16|0,Bg=0|f[Ag>>2],Cg=0==(0|Bg)){It=Ht,Rt=Qt;break}Ht=Bg,Qt=Ag}else Ht=yg,Qt=xg;if(Dg=Rt>>>0<Yf>>>0,!Dg){f[Rt>>2]=0,Lt=It;break}xa()}else{if(gg=fv+8|0,hg=0|f[gg>>2],jg=hg>>>0<Yf>>>0,jg&&xa(),kg=hg+12|0,lg=0|f[kg>>2],mg=(0|lg)==(0|fv),mg||xa(),ng=eg+8|0,og=0|f[ng>>2],pg=(0|og)==(0|fv)){f[kg>>2]=eg,f[ng>>2]=hg,Lt=eg;break}xa()}while(0);Fg=0==(0|cg);do if(!Fg){if(Gg=fv+28|0,Hg=0|f[Gg>>2],Ig=75248+(Hg<<2)|0,Jg=0|f[Ig>>2],Kg=(0|fv)==(0|Jg)){if(f[Ig>>2]=Lt,cu=0==(0|Lt)){Lg=1<<Hg,Mg=Lg^-1,Ng=0|f[18737],Og=Ng&Mg,f[18737]=Og;break}}else if(Qg=0|f[18740],Rg=cg>>>0<Qg>>>0,Rg&&xa(),Sg=cg+16|0,Tg=0|f[Sg>>2],Ug=(0|Tg)==(0|fv),Ug?f[Sg>>2]=Lt:(Vg=cg+20|0,f[Vg>>2]=Lt),Wg=0==(0|Lt))break;Xg=0|f[18740],Yg=Lt>>>0<Xg>>>0,Yg&&xa(),Zg=Lt+24|0,f[Zg>>2]=cg,ah=fv+16|0,bh=0|f[ah>>2],ch=0==(0|bh);do if(!ch){if(dh=bh>>>0<Xg>>>0,!dh){eh=Lt+16|0,f[eh>>2]=bh,fh=bh+24|0,f[fh>>2]=Lt;break}xa()}while(0);if(gh=fv+20|0,hh=0|f[gh>>2],ih=0==(0|hh),!ih){if(jh=0|f[18740],lh=hh>>>0<jh>>>0,!lh){mh=Lt+20|0,f[mh>>2]=hh,nh=hh+24|0,f[nh>>2]=Lt;break}xa()}}while(0);oh=Eu>>>0<16;do if(oh)ph=Eu+Td|0,qh=3|ph,rh=fv+4|0,f[rh>>2]=qh,sh=fv+ph|0,th=sh+4|0,uh=0|f[th>>2],wh=1|uh,f[th>>2]=wh;else{if(xh=3|Td,yh=fv+4|0,f[yh>>2]=xh,zh=1|Eu,Ah=_f+4|0,f[Ah>>2]=zh,Bh=_f+Eu|0,f[Bh>>2]=Eu,Ch=Eu>>>3,Dh=Eu>>>0<256){Eh=Ch<<1,Fh=74984+(Eh<<2)|0,Hh=0|f[18736],Ih=1<<Ch,Jh=Hh&Ih,Kh=0==(0|Jh),Kh?(Lh=Hh|Ih,f[18736]=Lh,t=Fh+8|0,w=t,wt=Fh):(Mh=Fh+8|0,Nh=0|f[Mh>>2],Oh=0|f[18740],Ph=Nh>>>0<Oh>>>0,Ph?xa():(w=Mh,wt=Nh)),f[w>>2]=_f,Qh=wt+12|0,f[Qh>>2]=_f,Sh=_f+8|0,f[Sh>>2]=wt,Th=_f+12|0,f[Th>>2]=Fh;break}if(Uh=Eu>>>8,Vh=0==(0|Uh),Vh?yt=0:(Wh=Eu>>>0>16777215,Wh?yt=31:(Xh=Uh+1048320|0,Yh=Xh>>>16,Zh=8&Yh,$h=Uh<<Zh,_h=$h+520192|0,bi=_h>>>16,ci=4&bi,di=ci|Zh,ei=$h<<ci,fi=ei+245760|0,gi=fi>>>16,hi=2&gi,ii=di|hi,ji=14-ii|0,ki=ei<<hi,mi=ki>>>15,ni=ji+mi|0,oi=ni<<1,pi=ni+7|0,qi=Eu>>>pi,ri=1&qi,si=ri|oi,yt=si)),ti=75248+(yt<<2)|0,ui=_f+28|0,f[ui>>2]=yt,vi=_f+16|0,xi=vi+4|0,f[xi>>2]=0,f[vi>>2]=0,yi=0|f[18737],zi=1<<yt,Ai=yi&zi,Bi=0==(0|Ai)){Ci=yi|zi,f[18737]=Ci,f[ti>>2]=_f,Di=_f+24|0,f[Di>>2]=ti,Ei=_f+12|0,f[Ei>>2]=_f,Fi=_f+8|0,f[Fi>>2]=_f;break}for(Gi=0|f[ti>>2],Ii=31==(0|yt),Ji=yt>>>1,Ki=25-Ji|0,Li=Ii?0:Ki,Mi=Eu<<Li,At=Mi,St=Gi;;){if(Ni=St+4|0,Oi=0|f[Ni>>2],Pi=Oi&-8,Qi=(0|Pi)==(0|Eu)){Wt=St,hv=148;break}if(Ri=At>>>31,Ti=(St+16|0)+(Ri<<2)|0,Ui=At<<1,Vi=0|f[Ti>>2],Wi=0==(0|Vi)){o=Ti,Xt=St,hv=145;break}At=Ui,St=Vi}if(145==(0|hv)){if(Xi=0|f[18740],Yi=o>>>0<Xi>>>0,!Yi){f[o>>2]=_f,Zi=_f+24|0,f[Zi>>2]=Xt,$i=_f+12|0,f[$i>>2]=_f,_i=_f+8|0,f[_i>>2]=_f;break}xa()}else if(148==(0|hv)){if(aj=Wt+8|0,dj=0|f[aj>>2],ej=0|f[18740],fj=dj>>>0>=ej>>>0,ku=Wt>>>0>=ej>>>0,gj=fj&ku){hj=dj+12|0,f[hj>>2]=_f,f[aj>>2]=_f,ij=_f+8|0,f[ij>>2]=dj,jj=_f+12|0,f[jj>>2]=Wt,kj=_f+24|0,f[kj>>2]=0;break}xa()}}while(0);return lj=fv+8|0,b=lj,l=iv,0|b}hu=Td}}while(0);if(mj=0|f[18738],oj=mj>>>0<hu>>>0,!oj)return pj=mj-hu|0,qj=0|f[18741],rj=pj>>>0>15,rj?(sj=qj+hu|0,f[18741]=sj,f[18738]=pj,tj=1|pj,uj=sj+4|0,f[uj>>2]=tj,vj=sj+pj|0,f[vj>>2]=pj,wj=3|hu,xj=qj+4|0,f[xj>>2]=wj):(f[18738]=0,f[18741]=0,zj=3|mj,Aj=qj+4|0,f[Aj>>2]=zj,Bj=qj+mj|0,Cj=Bj+4|0,Dj=0|f[Cj>>2],Ej=1|Dj,f[Cj>>2]=Ej),Fj=qj+8|0,b=Fj,l=iv,0|b;if(Gj=0|f[18739],Hj=Gj>>>0>hu>>>0)return Ij=Gj-hu|0,f[18739]=Ij,Kj=0|f[18742],Lj=Kj+hu|0,f[18742]=Lj,Mj=1|Ij,Nj=Lj+4|0,f[Nj>>2]=Mj,Oj=3|hu,Pj=Kj+4|0,f[Pj>>2]=Oj,Qj=Kj+8|0,b=Qj,l=iv,0|b;if(Rj=0|f[18854],Sj=0==(0|Rj),Sj&&(f[18856]=4096,f[18855]=4096,f[18857]=-1,f[18858]=-1,f[18859]=0,f[18847]=0,Tj=gu,Vj=Tj&-16,Wj=1431655768^Vj,f[gu>>2]=Wj,f[18854]=Wj),Xj=hu+48|0,Yj=0|f[18856],Zj=hu+47|0,$j=Yj+Zj|0,_j=0-Yj|0,ak=$j&_j,bk=ak>>>0>hu>>>0,!bk)return b=0,l=iv,0|b;if(ck=0|f[18846],ek=0==(0|ck),!ek&&(fk=0|f[18844],gk=fk+ak|0,hk=gk>>>0<=fk>>>0,ik=gk>>>0>ck>>>0,pu=hk|ik))return b=0,l=iv,0|b;jk=0|f[18847],kk=4&jk,lk=0==(0|kk);a:do if(lk){mk=0|f[18742],nk=0==(0|mk);b:do if(nk)hv=171;else{for(Ku=75392;;){if(pk=0|f[Ku>>2],qk=pk>>>0>mk>>>0,!qk&&(rk=Ku+4|0,sk=0|f[rk>>2],tk=pk+sk|0,uk=tk>>>0>mk>>>0)){k=Ku,n=rk;break}if(vk=Ku+8|0,wk=0|f[vk>>2],xk=0==(0|wk)){hv=171;break b}Ku=wk}if(Xk=0|f[18739],Yk=$j-Xk|0,Zk=Yk&_j,$k=Zk>>>0<2147483647)if(_k=0|Ca(0|Zk),al=0|f[k>>2],bl=0|f[n>>2],cl=al+bl|0,dl=(0|_k)==(0|cl)){if(gl=(0|_k)==-1,!gl){$u=_k,_u=Zk,hv=191;break a}}else _t=_k,Su=Zk,hv=181}while(0);do if(171==(0|hv)&&(yk=0|Ca(0),Ak=(0|yk)==-1,!Ak&&(Bk=yk,Ck=0|f[18855],Dk=Ck+-1|0,Ek=Dk&Bk,Fk=0==(0|Ek),Fk?Ru=ak:(Gk=Dk+Bk|0,Hk=0-Ck|0,Ik=Gk&Hk,Jk=ak-Bk|0,Lk=Jk+Ik|0,Ru=Lk),Mk=0|f[18844],Nk=Mk+Ru|0,Ok=Ru>>>0>hu>>>0,Pk=Ru>>>0<2147483647,nu=Ok&Pk))){if(Qk=0|f[18846],Rk=0==(0|Qk),!Rk&&(Sk=Nk>>>0<=Mk>>>0,Tk=Nk>>>0>Qk>>>0,su=Sk|Tk))break;if(Uk=0|Ca(0|Ru),Wk=(0|Uk)==(0|yk)){$u=yk,_u=Ru,hv=191;break a}_t=Uk,Su=Ru,hv=181}while(0);b:do if(181==(0|hv)){hl=0-Su|0,il=(0|_t)!=-1,jl=Su>>>0<2147483647,vu=jl&il,kl=Xj>>>0>Su>>>0,wu=kl&vu;do if(wu){if(ll=0|f[18856],ml=Zj-Su|0,nl=ml+ll|0,ol=0-ll|0,pl=nl&ol,rl=pl>>>0<2147483647){if(sl=0|Ca(0|pl),tl=(0|sl)==-1){0|Ca(0|hl);break b}ul=pl+Su|0,Tu=ul;break}Tu=Su}else Tu=Su;while(0);if(vl=(0|_t)==-1,!vl){$u=_t,_u=Tu,hv=191;break a}}while(0);wl=0|f[18847],xl=4|wl,f[18847]=xl,hv=188}else hv=188;while(0);if(188==(0|hv)&&(yl=ak>>>0<2147483647,yl&&(zl=0|Ca(0|ak),Al=0|Ca(0),Cl=(0|zl)!=-1,Dl=(0|Al)!=-1,uu=Cl&Dl,El=zl>>>0<Al>>>0,qu=El&uu,qu&&(Fl=Al,Gl=zl,Hl=Fl-Gl|0,Il=hu+40|0,p=Hl>>>0>Il>>>0,p&&($u=zl,_u=Hl,hv=191)))),191==(0|hv)){Jl=0|f[18844],Kl=Jl+_u|0,f[18844]=Kl,Ll=0|f[18845],Nl=Kl>>>0>Ll>>>0,Nl&&(f[18845]=Kl),Ol=0|f[18742],Pl=0==(0|Ol);do if(Pl){for(Ql=0|f[18740],Rl=0==(0|Ql),Sl=$u>>>0<Ql>>>0,ru=Rl|Sl,ru&&(f[18740]=$u),f[18848]=$u,f[18849]=_u,f[18851]=0,Tl=0|f[18854],f[18745]=Tl,f[18744]=-1,eu=0;;){if(Ul=eu<<1,Vl=74984+(Ul<<2)|0,Wl=Vl+12|0,f[Wl>>2]=Vl,Yl=Vl+8|0,f[Yl>>2]=Vl,Zl=eu+1|0,du=32==(0|Zl))break;eu=Zl}$l=_u+-40|0,_l=$u+8|0,am=_l,bm=7&am,cm=0==(0|bm),dm=0-am|0,em=7&dm,fm=cm?0:em,hm=$u+fm|0,im=$l-fm|0,f[18742]=hm,f[18739]=im,jm=1|im,km=hm+4|0,f[km>>2]=jm,lm=hm+im|0,mm=lm+4|0,f[mm>>2]=40,nm=0|f[18858],f[18743]=nm}else{for(Mu=75392;;){if(om=0|f[Mu>>2],pm=Mu+4|0,qm=0|f[pm>>2],sm=om+qm|0,tm=(0|$u)==(0|sm)){h=om,i=pm,j=qm,Nu=Mu,hv=201;break}if(um=Mu+8|0,vm=0|f[um>>2],wm=0==(0|vm))break;Mu=vm}if(201==(0|hv)&&(xm=Nu+12|0,ym=0|f[xm>>2],zm=8&ym,Am=0==(0|zm),Am&&(Bm=Ol>>>0>=h>>>0,Dm=Ol>>>0<$u>>>0,tu=Dm&Bm))){Em=j+_u|0,f[i>>2]=Em,Fm=0|f[18739],Gm=Ol+8|0,Hm=Gm,Im=7&Hm,Jm=0==(0|Im),Km=0-Hm|0,Lm=7&Km,Mm=Jm?0:Lm,Om=Ol+Mm|0,Pm=_u-Mm|0,Qm=Pm+Fm|0,f[18742]=Om,f[18739]=Qm,Rm=1|Qm,Sm=Om+4|0,f[Sm>>2]=Rm,Tm=Om+Qm|0,Um=Tm+4|0,f[Um>>2]=40,Vm=0|f[18858],f[18743]=Vm;break}for(Wm=0|f[18740],Xm=$u>>>0<Wm>>>0,Xm?(f[18740]=$u,po=$u):po=Wm,Zm=$u+_u|0,Ou=75392;;){if($m=0|f[Ou>>2],_m=(0|$m)==(0|Zm)){g=Ou,Qu=Ou,hv=209;break}if(an=Ou+8|0,bn=0|f[an>>2],cn=0==(0|bn)){Lu=75392;break}Ou=bn}if(209==(0|hv)){if(dn=Qu+12|0,en=0|f[dn>>2],fn=8&en,gn=0==(0|fn)){f[g>>2]=$u,kn=Qu+4|0,ln=0|f[kn>>2],mn=ln+_u|0,f[kn>>2]=mn,nn=$u+8|0,on=nn,pn=7&on,qn=0==(0|pn),rn=0-on|0,sn=7&rn,tn=qn?0:sn,vn=$u+tn|0,wn=Zm+8|0,xn=wn,yn=7&xn,zn=0==(0|yn),An=0-xn|0,Bn=7&An,Cn=zn?0:Bn,Dn=Zm+Cn|0,En=Dn,Gn=vn,Hn=En-Gn|0,In=vn+hu|0,Jn=Hn-hu|0,Kn=3|hu,Ln=vn+4|0,f[Ln>>2]=Kn,Mn=(0|Dn)==(0|Ol);do if(Mn)Nn=0|f[18739],On=Nn+Jn|0,f[18739]=On,f[18742]=In,Pn=1|On,Rn=In+4|0,f[Rn>>2]=Pn;else{if(Sn=0|f[18741],Tn=(0|Dn)==(0|Sn)){Un=0|f[18738],Vn=Un+Jn|0,f[18738]=Vn,f[18741]=In,Wn=1|Vn,Xn=In+4|0,f[Xn>>2]=Wn,Yn=In+Vn|0,f[Yn>>2]=Vn;break}if(Zn=Dn+4|0,$n=0|f[Zn>>2],ao=3&$n,bo=1==(0|ao)){co=$n&-8,eo=$n>>>3,fo=$n>>>0<256;a:do if(fo){go=Dn+8|0,ho=0|f[go>>2],io=Dn+12|0,jo=0|f[io>>2],ko=eo<<1,mo=74984+(ko<<2)|0,no=(0|ho)==(0|mo);do if(!no){if(oo=ho>>>0<po>>>0,oo&&xa(),qo=ho+12|0,ro=0|f[qo>>2],so=(0|ro)==(0|Dn))break;xa()}while(0);if(to=(0|jo)==(0|ho)){uo=1<<eo,vo=uo^-1,xo=0|f[18736],yo=xo&vo,f[18736]=yo;break}zo=(0|jo)==(0|mo);do if(zo)C=jo+8|0,z=C;else{if(Ao=jo>>>0<po>>>0,Ao&&xa(),Bo=jo+8|0,Co=0|f[Bo>>2],Do=(0|Co)==(0|Dn)){z=Bo;break}xa()}while(0);Eo=ho+12|0,f[Eo>>2]=jo,f[z>>2]=ho}else{Fo=Dn+24|0,Go=0|f[Fo>>2],Io=Dn+12|0,Jo=0|f[Io>>2],Ko=(0|Jo)==(0|Dn);do if(Ko){if(Vo=Dn+16|0,Wo=Vo+4|0,Xo=0|f[Wo>>2],Yo=0==(0|Xo)){if(Zo=0|f[Vo>>2],$o=0==(0|Zo)){Kt=0;break}Et=Zo,Nt=Vo}else Et=Xo,Nt=Wo;for(;;)if(_o=Et+20|0,ap=0|f[_o>>2],cp=0==(0|ap)){if(dp=Et+16|0,ep=0|f[dp>>2],fp=0==(0|ep)){Ft=Et,Ot=Nt;break}Et=ep,Nt=dp}else Et=ap,Nt=_o;if(gp=Ot>>>0<po>>>0,!gp){f[Ot>>2]=0,Kt=Ft;break}xa()}else{if(Lo=Dn+8|0,Mo=0|f[Lo>>2],No=Mo>>>0<po>>>0,No&&xa(),Oo=Mo+12|0,Po=0|f[Oo>>2],Qo=(0|Po)==(0|Dn),Qo||xa(),Ro=Jo+8|0,To=0|f[Ro>>2],Uo=(0|To)==(0|Dn)){f[Oo>>2]=Jo,f[Ro>>2]=Mo,Kt=Jo;break}xa()}while(0);if(hp=0==(0|Go))break;ip=Dn+28|0,jp=0|f[ip>>2],kp=75248+(jp<<2)|0,lp=0|f[kp>>2],op=(0|Dn)==(0|lp);do{if(op){if(f[kp>>2]=Kt,bu=0==(0|Kt),!bu)break;pp=1<<jp,qp=pp^-1,rp=0|f[18737],sp=rp&qp,f[18737]=sp;break a}if(tp=0|f[18740],up=Go>>>0<tp>>>0,up&&xa(),vp=Go+16|0,wp=0|f[vp>>2],xp=(0|wp)==(0|Dn),xp?f[vp>>2]=Kt:(zp=Go+20|0,f[zp>>2]=Kt),Ap=0==(0|Kt))break a}while(0);Bp=0|f[18740],Cp=Kt>>>0<Bp>>>0,Cp&&xa(),Dp=Kt+24|0,f[Dp>>2]=Go,Ep=Dn+16|0,Fp=0|f[Ep>>2],Gp=0==(0|Fp);do if(!Gp){if(Hp=Fp>>>0<Bp>>>0,!Hp){Ip=Kt+16|0,f[Ip>>2]=Fp,Kp=Fp+24|0,f[Kp>>2]=Kt;break}xa()}while(0);if(Lp=Ep+4|0,Mp=0|f[Lp>>2],Np=0==(0|Mp))break;if(Op=0|f[18740],Pp=Mp>>>0<Op>>>0,!Pp){Qp=Kt+20|0,f[Qp>>2]=Mp,Rp=Mp+24|0,f[Rp>>2]=Kt;break}xa()}while(0);Sp=Dn+co|0,Tp=co+Jn|0,lu=Sp,yu=Tp}else lu=Dn,yu=Jn;if(Vp=lu+4|0,Wp=0|f[Vp>>2],Xp=Wp&-2,f[Vp>>2]=Xp,Yp=1|yu,Zp=In+4|0,f[Zp>>2]=Yp,$p=In+yu|0,f[$p>>2]=yu,_p=yu>>>3,aq=yu>>>0<256){bq=_p<<1,cq=74984+(bq<<2)|0,eq=0|f[18736],fq=1<<_p,gq=eq&fq,hq=0==(0|gq);do if(hq)iq=eq|fq,f[18736]=iq,u=cq+8|0,x=u,vt=cq;else{if(jq=cq+8|0,kq=0|f[jq>>2],lq=0|f[18740],mq=kq>>>0<lq>>>0,!mq){x=jq,vt=kq;break}xa()}while(0);f[x>>2]=In,nq=vt+12|0,f[nq>>2]=In,pq=In+8|0,f[pq>>2]=vt,qq=In+12|0,f[qq>>2]=cq;break}rq=yu>>>8,sq=0==(0|rq);do if(sq)zt=0;else{if(tq=yu>>>0>16777215){zt=31;break}uq=rq+1048320|0,vq=uq>>>16,wq=8&vq,xq=rq<<wq,yq=xq+520192|0,Aq=yq>>>16,Bq=4&Aq,Cq=Bq|wq,Dq=xq<<Bq,Eq=Dq+245760|0,Fq=Eq>>>16,Gq=2&Fq,Hq=Cq|Gq,Iq=14-Hq|0,Jq=Dq<<Gq,Lq=Jq>>>15,Mq=Iq+Lq|0,Nq=Mq<<1,Oq=Mq+7|0,Pq=yu>>>Oq,Qq=1&Pq,Rq=Qq|Nq,zt=Rq}while(0);if(Sq=75248+(zt<<2)|0,Tq=In+28|0,f[Tq>>2]=zt,Uq=In+16|0,Wq=Uq+4|0,f[Wq>>2]=0,f[Uq>>2]=0,Xq=0|f[18737],Yq=1<<zt,Zq=Xq&Yq,$q=0==(0|Zq)){_q=Xq|Yq,f[18737]=_q,f[Sq>>2]=In,ar=In+24|0,f[ar>>2]=Sq,br=In+12|0,f[br>>2]=In,cr=In+8|0,f[cr>>2]=In;break}for(dr=0|f[Sq>>2],fr=31==(0|zt),gr=zt>>>1,hr=25-gr|0,ir=fr?0:hr,jr=yu<<ir,Ct=jr,Yt=dr;;){if(kr=Yt+4|0,lr=0|f[kr>>2],mr=lr&-8,nr=(0|mr)==(0|yu)){Zt=Yt,hv=279;break}if(or=Ct>>>31,rr=(Yt+16|0)+(or<<2)|0,sr=Ct<<1,tr=0|f[rr>>2],ur=0==(0|tr)){c=rr,$t=Yt,hv=276;break}Ct=sr,Yt=tr}if(276==(0|hv)){if(vr=0|f[18740],wr=c>>>0<vr>>>0,!wr){f[c>>2]=In,xr=In+24|0,f[xr>>2]=$t,yr=In+12|0,f[yr>>2]=In,zr=In+8|0,f[zr>>2]=In;break}xa()}else if(279==(0|hv)){if(Ar=Zt+8|0,Cr=0|f[Ar>>2],Dr=0|f[18740],Er=Cr>>>0>=Dr>>>0,ju=Zt>>>0>=Dr>>>0,Fr=Er&ju){Gr=Cr+12|0,f[Gr>>2]=In,f[Ar>>2]=In,Hr=In+8|0,f[Hr>>2]=Cr,Ir=In+12|0,f[Ir>>2]=Zt,Jr=In+24|0,f[Jr>>2]=0;break}xa()}}while(0);return La=vn+8|0,b=La,l=iv,0|b}Lu=75392}for(;;){if(Kr=0|f[Lu>>2],Lr=Kr>>>0>Ol>>>0,!Lr&&(Nr=Lu+4|0,Or=0|f[Nr>>2],Pr=Kr+Or|0,Qr=Pr>>>0>Ol>>>0)){e=Pr;break}Rr=Lu+8|0,Sr=0|f[Rr>>2],Lu=Sr}for(Tr=e+-47|0,Ur=Tr+8|0,Vr=Ur,Wr=7&Vr,Yr=0==(0|Wr),Zr=0-Vr|0,$r=7&Zr,_r=Yr?0:$r,as=Tr+_r|0,bs=Ol+16|0,cs=as>>>0<bs>>>0,ds=cs?Ol:as,es=ds+8|0,fs=ds+24|0,hs=_u+-40|0,is=$u+8|0,js=is,ks=7&js,ls=0==(0|ks),ms=0-js|0,ns=7&ms,os=ls?0:ns,ps=$u+os|0,qs=hs-os|0,f[18742]=ps,f[18739]=qs,ss=1|qs,ts=ps+4|0,f[ts>>2]=ss,us=ps+qs|0,vs=us+4|0,f[vs>>2]=40,ws=0|f[18858],f[18743]=ws,xs=ds+4|0,f[xs>>2]=27,f[es>>2]=0|f[18848],f[es+4>>2]=0|f[18849],f[es+8>>2]=0|f[18850],f[es+12>>2]=0|f[18851],f[18848]=$u,f[18849]=_u,f[18851]=0,f[18850]=es,xu=fs;;){if(ys=xu+4|0,f[ys>>2]=7,zs=ys+4|0,As=zs>>>0<e>>>0,!As)break;xu=ys}if(Bs=(0|ds)==(0|Ol),!Bs){if(Ds=ds,Es=Ol,Fs=Ds-Es|0,Gs=0|f[xs>>2],Hs=Gs&-2,f[xs>>2]=Hs,Is=1|Fs,Js=Ol+4|0,f[Js>>2]=Is,f[ds>>2]=Fs,Ks=Fs>>>3,Ls=Fs>>>0<256){Ms=Ks<<1,Os=74984+(Ms<<2)|0,Ps=0|f[18736],Qs=1<<Ks,Rs=Ps&Qs,Ss=0==(0|Rs),Ss?(Ts=Ps|Qs,f[18736]=Ts,s=Os+8|0,v=s,st=Os):(Us=Os+8|0,Vs=0|f[Us>>2],Ws=0|f[18740],Xs=Vs>>>0<Ws>>>0,Xs?xa():(v=Us,st=Vs)),f[v>>2]=Ol,Zs=st+12|0,f[Zs>>2]=Ol,$s=Ol+8|0,f[$s>>2]=st,_s=Ol+12|0,f[_s>>2]=Os;break}if(at=Fs>>>8,bt=0==(0|at),bt?xt=0:(ct=Fs>>>0>16777215,ct?xt=31:(dt=at+1048320|0,et=dt>>>16,ft=8&et,gt=at<<ft,it=gt+520192|0,jt=it>>>16,kt=4&jt,lt=kt|ft,mt=gt<<kt,nt=mt+245760|0,ot=nt>>>16,pt=2&ot,qt=lt|pt,rt=14-qt|0,K=mt<<pt,L=K>>>15,M=rt+L|0,N=M<<1,O=M+7|0,P=Fs>>>O,Q=1&P,R=Q|N,xt=R)),S=75248+(xt<<2)|0,T=Ol+28|0,f[T>>2]=xt,V=Ol+20|0,f[V>>2]=0,f[bs>>2]=0,W=0|f[18737],Y=1<<xt,Z=W&Y,$=0==(0|Z)){_=W|Y,f[18737]=_,f[S>>2]=Ol,aa=Ol+24|0,f[aa>>2]=S,ba=Ol+12|0,f[ba>>2]=Ol,ca=Ol+8|0,f[ca>>2]=Ol;break}for(da=0|f[S>>2],fa=31==(0|xt),ga=xt>>>1,ha=25-ga|0,ia=fa?0:ha,ja=Fs<<ia,Bt=ja,Tt=da;;){if(ka=Tt+4|0,la=0|f[ka>>2],ma=la&-8,na=(0|ma)==(0|Fs)){Ut=Tt,hv=305;break}if(oa=Bt>>>31,qa=(Tt+16|0)+(oa<<2)|0,ra=Bt<<1,sa=0|f[qa>>2],ta=0==(0|sa)){d=qa,Vt=Tt,hv=302;break}Bt=ra,Tt=sa}if(302==(0|hv)){if(ua=0|f[18740],va=d>>>0<ua>>>0,!va){f[d>>2]=Ol,wa=Ol+24|0,f[wa>>2]=Vt,ya=Ol+12|0,f[ya>>2]=Ol,za=Ol+8|0,f[za>>2]=Ol;break}xa()}else if(305==(0|hv)){if(Aa=Ut+8|0,Da=0|f[Aa>>2],Ea=0|f[18740],Fa=Da>>>0>=Ea>>>0,iu=Ut>>>0>=Ea>>>0,Ga=Fa&iu){Ha=Da+12|0,f[Ha>>2]=Ol,f[Aa>>2]=Ol,Ia=Ol+8|0,f[Ia>>2]=Da,Ja=Ol+12|0,f[Ja>>2]=Ut,Ka=Ol+24|0,f[Ka>>2]=0;break}xa()}}}while(0);if(Ma=0|f[18739],Oa=Ma>>>0>hu>>>0)return Pa=Ma-hu|0,f[18739]=Pa,Qa=0|f[18742],Ra=Qa+hu|0,f[18742]=Ra,Sa=1|Pa,Ta=Ra+4|0,f[Ta>>2]=Sa,Ua=3|hu,Va=Qa+4|0,f[Va>>2]=Ua,Wa=Qa+8|0,b=Wa,l=iv,0|b}return Xa=0|Pu(),f[Xa>>2]=12,b=0,l=iv,0|b}function gw(a){a|=0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0,wf=0,xf=0,yf=0,zf=0,Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0,Gf=0,Hf=0;if(Hf=l,j=0==(0|a),!j){k=a+-8|0,pb=0|f[18740],sd=k>>>0<pb>>>0,sd&&xa(),Xd=a+-4|0,ge=0|f[Xd>>2],re=3&ge,Ce=1==(0|re),Ce&&xa(),Ne=ge&-8,Ye=k+Ne|0,m=1&ge,x=0==(0|m);do if(x){if(I=0|f[k>>2],T=0==(0|re))return;if(ca=0-I|0,na=k+ca|0,za=I+Ne|0,Ka=na>>>0<pb>>>0,Ka&&xa(),Va=0|f[18741],eb=(0|na)==(0|Va)){if(r=Ye+4|0,s=0|f[r>>2],t=3&s,u=3==(0|t),!u){Bf=na,Cf=za;break}return f[18738]=za,v=s&-2,f[r>>2]=v,w=1|za,y=na+4|0,f[y>>2]=w,z=na+za|0,void(f[z>>2]=za)}if(qb=I>>>3,Bb=I>>>0<256){if(Mb=na+8|0,Xb=0|f[Mb>>2],gc=na+12|0,rc=0|f[gc>>2],Cc=qb<<1,Nc=74984+(Cc<<2)|0,Yc=(0|Xb)==(0|Nc),Yc||(hd=Xb>>>0<pb>>>0,hd&&xa(),td=Xb+12|0,Ed=0|f[td>>2],Pd=(0|Ed)==(0|na),Pd||xa()),Qd=(0|rc)==(0|Xb)){Rd=1<<qb,Sd=Rd^-1,Td=0|f[18736],Ud=Td&Sd,f[18736]=Ud,Bf=na,Cf=za;break}Vd=(0|rc)==(0|Nc),Vd?(i=rc+8|0,e=i):(Wd=rc>>>0<pb>>>0,Wd&&xa(),Yd=rc+8|0,Zd=0|f[Yd>>2],$d=(0|Zd)==(0|na),$d?e=Yd:xa()),_d=Xb+12|0,f[_d>>2]=rc,f[e>>2]=Xb,Bf=na,Cf=za;break}ae=na+24|0,be=0|f[ae>>2],ce=na+12|0,de=0|f[ce>>2],ee=(0|de)==(0|na);do if(ee){if(pe=na+16|0,qe=pe+4|0,se=0|f[qe>>2],te=0==(0|se)){if(ue=0|f[pe>>2],ve=0==(0|ue)){nf=0;break}lf=ue,rf=pe}else lf=se,rf=qe;for(;;)if(we=lf+20|0,xe=0|f[we>>2],ye=0==(0|xe)){if(ze=lf+16|0,Ae=0|f[ze>>2],Be=0==(0|Ae)){mf=lf,sf=rf;break}lf=Ae,rf=ze}else lf=xe,rf=we;if(De=sf>>>0<pb>>>0,!De){f[sf>>2]=0,nf=mf;break}xa()}else{if(fe=na+8|0,he=0|f[fe>>2],ie=he>>>0<pb>>>0,ie&&xa(),je=he+12|0,ke=0|f[je>>2],le=(0|ke)==(0|na),le||xa(),me=de+8|0,ne=0|f[me>>2],oe=(0|ne)==(0|na)){f[je>>2]=de,f[me>>2]=he,nf=de;break}xa()}while(0);if(Ee=0==(0|be))Bf=na,Cf=za;else{if(Fe=na+28|0,Ge=0|f[Fe>>2],He=75248+(Ge<<2)|0,Ie=0|f[He>>2],Je=(0|na)==(0|Ie)){if(f[He>>2]=nf,yf=0==(0|nf)){Ke=1<<Ge,Le=Ke^-1,Me=0|f[18737],Oe=Me&Le,f[18737]=Oe,Bf=na,Cf=za;break}}else if(Pe=0|f[18740],Qe=be>>>0<Pe>>>0,Qe&&xa(),Re=be+16|0,Se=0|f[Re>>2],Te=(0|Se)==(0|na),Te?f[Re>>2]=nf:(Ue=be+20|0,f[Ue>>2]=nf),Ve=0==(0|nf)){Bf=na,Cf=za;break}We=0|f[18740],Xe=nf>>>0<We>>>0,Xe&&xa(),Ze=nf+24|0,f[Ze>>2]=be,$e=na+16|0,_e=0|f[$e>>2],af=0==(0|_e);do if(!af){if(bf=_e>>>0<We>>>0,!bf){cf=nf+16|0,f[cf>>2]=_e,df=_e+24|0,f[df>>2]=nf;break}xa()}while(0);if(ef=$e+4|0,ff=0|f[ef>>2],gf=0==(0|ff))Bf=na,Cf=za;else{if(n=0|f[18740],o=ff>>>0<n>>>0,!o){p=nf+20|0,f[p>>2]=ff,q=ff+24|0,f[q>>2]=nf,Bf=na,Cf=za;break}xa()}}}else Bf=k,Cf=Ne;while(0);if(A=Bf>>>0<Ye>>>0,A||xa(),B=Ye+4|0,C=0|f[B>>2],D=1&C,E=0==(0|D),E&&xa(),F=2&C,G=0==(0|F)){if(H=0|f[18742],J=(0|Ye)==(0|H)){if(K=0|f[18739],L=K+Cf|0,f[18739]=L,f[18742]=Bf,M=1|L,N=Bf+4|0,f[N>>2]=M,O=0|f[18741],P=(0|Bf)==(0|O),!P)return;return f[18741]=0,void(f[18738]=0)}if(Q=0|f[18741],R=(0|Ye)==(0|Q))return S=0|f[18738],U=S+Cf|0,f[18738]=U,f[18741]=Bf,V=1|U,W=Bf+4|0,f[W>>2]=V,X=Bf+U|0,void(f[X>>2]=U);Y=C&-8,Z=Y+Cf|0,$=C>>>3,_=C>>>0<256;do if(_){if(aa=Ye+8|0,ba=0|f[aa>>2],da=Ye+12|0,ea=0|f[da>>2],fa=$<<1,ga=74984+(fa<<2)|0,ha=(0|ba)==(0|ga),ha||(ia=0|f[18740],ja=ba>>>0<ia>>>0,ja&&xa(),ka=ba+12|0,la=0|f[ka>>2],ma=(0|la)==(0|Ye),ma||xa()),oa=(0|ea)==(0|ba)){pa=1<<$,qa=pa^-1,ra=0|f[18736],sa=ra&qa,f[18736]=sa;break}ta=(0|ea)==(0|ga),ta?(h=ea+8|0,d=h):(ua=0|f[18740],va=ea>>>0<ua>>>0,va&&xa(),wa=ea+8|0,ya=0|f[wa>>2],Aa=(0|ya)==(0|Ye),Aa?d=wa:xa()),Ba=ba+12|0,f[Ba>>2]=ea,f[d>>2]=ba}else{Ca=Ye+24|0,Da=0|f[Ca>>2],Ea=Ye+12|0,Fa=0|f[Ea>>2],Ga=(0|Fa)==(0|Ye);do if(Ga){if(Sa=Ye+16|0,Ta=Sa+4|0,Ua=0|f[Ta>>2],Wa=0==(0|Ua)){if(Xa=0|f[Sa>>2],Ya=0==(0|Xa)){qf=0;break}of=Xa,tf=Sa}else of=Ua,tf=Ta;for(;;)if(Za=of+20|0,$a=0|f[Za>>2],_a=0==(0|$a)){if(ab=of+16|0,bb=0|f[ab>>2],cb=0==(0|bb)){pf=of,uf=tf;break}of=bb,tf=ab}else of=$a,tf=Za;if(db=0|f[18740],fb=uf>>>0<db>>>0,!fb){f[uf>>2]=0,qf=pf;break}xa()}else{if(Ha=Ye+8|0,Ia=0|f[Ha>>2],Ja=0|f[18740],La=Ia>>>0<Ja>>>0,La&&xa(),Ma=Ia+12|0,Na=0|f[Ma>>2],Oa=(0|Na)==(0|Ye),Oa||xa(),Pa=Fa+8|0,Qa=0|f[Pa>>2],Ra=(0|Qa)==(0|Ye)){f[Ma>>2]=Fa,f[Pa>>2]=Ia,qf=Fa;break}xa()}while(0);if(gb=0==(0|Da),!gb){if(hb=Ye+28|0,ib=0|f[hb>>2],jb=75248+(ib<<2)|0,kb=0|f[jb>>2],lb=(0|Ye)==(0|kb)){if(f[jb>>2]=qf,zf=0==(0|qf)){mb=1<<ib,nb=mb^-1,ob=0|f[18737],rb=ob&nb,f[18737]=rb;break}}else if(sb=0|f[18740],tb=Da>>>0<sb>>>0,tb&&xa(),ub=Da+16|0,vb=0|f[ub>>2],wb=(0|vb)==(0|Ye),wb?f[ub>>2]=qf:(xb=Da+20|0,f[xb>>2]=qf),yb=0==(0|qf))break;zb=0|f[18740],Ab=qf>>>0<zb>>>0,Ab&&xa(),Cb=qf+24|0,f[Cb>>2]=Da,Db=Ye+16|0,Eb=0|f[Db>>2],Fb=0==(0|Eb);do if(!Fb){if(Gb=Eb>>>0<zb>>>0,!Gb){Hb=qf+16|0,f[Hb>>2]=Eb,Ib=Eb+24|0,f[Ib>>2]=qf;break}xa()}while(0);if(Jb=Db+4|0,Kb=0|f[Jb>>2],Lb=0==(0|Kb),!Lb){if(Nb=0|f[18740],Ob=Kb>>>0<Nb>>>0,!Ob){Pb=qf+20|0,f[Pb>>2]=Kb,Qb=Kb+24|0,f[Qb>>2]=qf;break}xa()}}}while(0);if(Rb=1|Z,Sb=Bf+4|0,f[Sb>>2]=Rb,Tb=Bf+Z|0,f[Tb>>2]=Z,Ub=0|f[18741],Vb=(0|Bf)==(0|Ub))return void(f[18738]=Z);Df=Z}else Wb=C&-2,f[B>>2]=Wb,Yb=1|Cf,Zb=Bf+4|0,f[Zb>>2]=Yb,$b=Bf+Cf|0,f[$b>>2]=Cf,Df=Cf;if(_b=Df>>>3,ac=Df>>>0<256)return bc=_b<<1,cc=74984+(bc<<2)|0,dc=0|f[18736],ec=1<<_b,fc=dc&ec,hc=0==(0|fc),hc?(ic=dc|ec,f[18736]=ic,c=cc+8|0,g=c,hf=cc):(jc=cc+8|0,kc=0|f[jc>>2],lc=0|f[18740],mc=kc>>>0<lc>>>0,mc?xa():(g=jc,hf=kc)),f[g>>2]=Bf,nc=hf+12|0,f[nc>>2]=Bf,oc=Bf+8|0,f[oc>>2]=hf,pc=Bf+12|0,void(f[pc>>2]=cc);qc=Df>>>8,sc=0==(0|qc),sc?jf=0:(tc=Df>>>0>16777215,tc?jf=31:(uc=qc+1048320|0,vc=uc>>>16,wc=8&vc,xc=qc<<wc,yc=xc+520192|0,zc=yc>>>16,Ac=4&zc,Bc=Ac|wc,Dc=xc<<Ac,Ec=Dc+245760|0,Fc=Ec>>>16,Gc=2&Fc,Hc=Bc|Gc,Ic=14-Hc|0,Jc=Dc<<Gc,Kc=Jc>>>15,Lc=Ic+Kc|0,Mc=Lc<<1,Oc=Lc+7|0,Pc=Df>>>Oc,Qc=1&Pc,Rc=Qc|Mc,jf=Rc)),Sc=75248+(jf<<2)|0,Tc=Bf+28|0,f[Tc>>2]=jf,Uc=Bf+16|0,Vc=Bf+20|0,f[Vc>>2]=0,f[Uc>>2]=0,Wc=0|f[18737],Xc=1<<jf,Zc=Wc&Xc,$c=0==(0|Zc);do if($c)_c=Wc|Xc,f[18737]=_c,f[Sc>>2]=Bf,ad=Bf+24|0,f[ad>>2]=Sc,bd=Bf+12|0,f[bd>>2]=Bf,cd=Bf+8|0,f[cd>>2]=Bf;else{for(dd=0|f[Sc>>2],ed=31==(0|jf),fd=jf>>>1,gd=25-fd|0,id=ed?0:gd,jd=Df<<id,kf=jd,vf=dd;;){if(kd=vf+4|0,ld=0|f[kd>>2],md=ld&-8,nd=(0|md)==(0|Df)){wf=vf,Gf=130;break}if(od=kf>>>31,pd=(vf+16|0)+(od<<2)|0,qd=kf<<1,rd=0|f[pd>>2],ud=0==(0|rd)){b=pd,xf=vf,Gf=127;break}kf=qd,vf=rd}if(127==(0|Gf)){if(vd=0|f[18740],wd=b>>>0<vd>>>0,!wd){f[b>>2]=Bf,xd=Bf+24|0,f[xd>>2]=xf,yd=Bf+12|0,f[yd>>2]=Bf,zd=Bf+8|0,f[zd>>2]=Bf;break}xa()}else if(130==(0|Gf)){if(Ad=wf+8|0,Bd=0|f[Ad>>2],Cd=0|f[18740],Dd=Bd>>>0>=Cd>>>0,Af=wf>>>0>=Cd>>>0,Fd=Dd&Af){Gd=Bd+12|0,f[Gd>>2]=Bf,f[Ad>>2]=Bf,Hd=Bf+8|0,f[Hd>>2]=Bd,Id=Bf+12|0,f[Id>>2]=wf,Jd=Bf+24|0,f[Jd>>2]=0;break}xa()}}while(0);if(Kd=0|f[18744],Ld=Kd+-1|0,f[18744]=Ld,Md=0==(0|Ld)){for(Ff=75400;;){if(Ef=0|f[Ff>>2],Nd=0==(0|Ef),Od=Ef+8|0,Nd)break;Ff=Od}f[18744]=-1}}}function hw(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0;return D=l,(c=0==(0|a))?(d=0|fw(b),B=d,0|B):(q=b>>>0>4294967231)?(u=0|Pu(),f[u>>2]=12,B=0,0|B):(v=b>>>0<11,w=b+11|0,x=w&-8,y=v?16:x,z=a+-8|0,A=0|iw(z,y),(e=0==(0|A))?(h=0|fw(b),(i=0==(0|h))?(B=0,0|B):(j=a+-4|0,k=0|f[j>>2],m=k&-8,n=3&k,o=0==(0|n),p=o?8:4,r=m-p|0,s=r>>>0<b>>>0,t=s?r:b,0|sw(0|h,0|a,0|t),gw(a),B=h,0|B)):(g=A+8|0,B=g,0|B))}function iw(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Jc=0;if(Jc=l,e=a+4|0,g=0|f[e>>2],Pa=g&-8,$a=a+Pa|0,jb=0|f[18740],ub=3&g,Cc=a>>>0>=jb>>>0,Dc=1!=(0|ub),Ec=Dc&Cc,Fb=a>>>0<$a>>>0,Fc=Ec&Fb,Fc||xa(),Qb=$a+4|0,_b=0|f[Qb>>2],kc=1&_b,h=0==(0|kc),h&&xa(),t=0==(0|ub))return(E=b>>>0<256)?(Bc=0,0|Bc):(P=b+4|0,$=Pa>>>0<P>>>0,$||(ja=Pa-b|0,ua=0|f[18856],Ga=ua<<1,Na=ja>>>0>Ga>>>0)?(Bc=0,0|Bc):(Bc=a,0|Bc));if(Oa=Pa>>>0<b>>>0,!Oa)return Qa=Pa-b|0,(Ra=Qa>>>0>15)?(Sa=a+b|0,Ta=1&g,Ua=Ta|b,Va=2|Ua,f[e>>2]=Va,Wa=Sa+4|0,Xa=3|Qa,f[Wa>>2]=Xa,Ya=Sa+Qa|0,Za=Ya+4|0,_a=0|f[Za>>2],ab=1|_a,f[Za>>2]=ab,jw(Sa,Qa),Bc=a,0|Bc):(Bc=a,0|Bc);if(bb=0|f[18742],cb=(0|$a)==(0|bb))return db=0|f[18739],eb=db+Pa|0,(fb=eb>>>0>b>>>0)?(gb=eb-b|0,hb=a+b|0,ib=1&g,kb=ib|b,lb=2|kb,f[e>>2]=lb,mb=hb+4|0,nb=1|gb,f[mb>>2]=nb,f[18742]=hb,f[18739]=gb,Bc=a,0|Bc):(Bc=0,0|Bc);if(ob=0|f[18741],pb=(0|$a)==(0|ob))return qb=0|f[18738],rb=qb+Pa|0,(sb=rb>>>0<b>>>0)?(Bc=0,0|Bc):(tb=rb-b|0,vb=tb>>>0>15,vb?(wb=a+b|0,xb=wb+tb|0,yb=1&g,zb=yb|b,Ab=2|zb,f[e>>2]=Ab,Bb=wb+4|0,Cb=1|tb,f[Bb>>2]=Cb,f[xb>>2]=tb,Db=xb+4|0,Eb=0|f[Db>>2],Gb=Eb&-2,f[Db>>2]=Gb,Gc=wb,Hc=tb):(Hb=1&g,Ib=Hb|rb,Jb=2|Ib,f[e>>2]=Jb,Kb=a+rb|0,Lb=Kb+4|0,Mb=0|f[Lb>>2],Nb=1|Mb,f[Lb>>2]=Nb,Gc=0,Hc=0),f[18738]=Hc,f[18741]=Gc,Bc=a,0|Bc);if(Ob=2&_b,Pb=0==(0|Ob),!Pb)return Bc=0,0|Bc;if(Rb=_b&-8,Sb=Rb+Pa|0,Tb=Sb>>>0<b>>>0)return Bc=0,0|Bc;Ub=Sb-b|0,Vb=_b>>>3,Wb=_b>>>0<256;do if(Wb){if(Xb=$a+8|0,Yb=0|f[Xb>>2],Zb=$a+12|0,$b=0|f[Zb>>2],ac=Vb<<1,bc=74984+(ac<<2)|0,cc=(0|Yb)==(0|bc),cc||(dc=Yb>>>0<jb>>>0,dc&&xa(),ec=Yb+12|0,fc=0|f[ec>>2],gc=(0|fc)==(0|$a),gc||xa()),hc=(0|$b)==(0|Yb)){ic=1<<Vb,jc=ic^-1,lc=0|f[18736],mc=lc&jc,f[18736]=mc;break}nc=(0|$b)==(0|bc),nc?(c=$b+8|0,d=c):(oc=$b>>>0<jb>>>0,oc&&xa(),pc=$b+8|0,qc=0|f[pc>>2],rc=(0|qc)==(0|$a),rc?d=pc:xa()),sc=Yb+12|0,f[sc>>2]=$b,f[d>>2]=Yb}else{tc=$a+24|0,uc=0|f[tc>>2],i=$a+12|0,j=0|f[i>>2],k=(0|j)==(0|$a);do if(k){if(w=$a+16|0,x=w+4|0,y=0|f[x>>2],z=0==(0|y)){if(A=0|f[w>>2],B=0==(0|A)){xc=0;break}vc=A,yc=w}else vc=y,yc=x;for(;;)if(C=vc+20|0,D=0|f[C>>2],F=0==(0|D)){if(G=vc+16|0,H=0|f[G>>2],I=0==(0|H)){wc=vc,zc=yc;break}vc=H,yc=G}else vc=D,yc=C;if(J=zc>>>0<jb>>>0,!J){f[zc>>2]=0,xc=wc;break}xa()}else{if(m=$a+8|0,n=0|f[m>>2],o=n>>>0<jb>>>0,o&&xa(),p=n+12|0,q=0|f[p>>2],r=(0|q)==(0|$a),r||xa(),s=j+8|0,u=0|f[s>>2],v=(0|u)==(0|$a)){f[p>>2]=j,f[s>>2]=n,xc=j;break}xa()}while(0);if(K=0==(0|uc),!K){if(L=$a+28|0,M=0|f[L>>2],N=75248+(M<<2)|0,O=0|f[N>>2],Q=(0|$a)==(0|O)){if(f[N>>2]=xc,Ac=0==(0|xc)){R=1<<M,S=R^-1,T=0|f[18737],U=T&S,f[18737]=U;break}}else if(V=0|f[18740],W=uc>>>0<V>>>0,W&&xa(),X=uc+16|0,Y=0|f[X>>2],Z=(0|Y)==(0|$a),Z?f[X>>2]=xc:(_=uc+20|0,f[_>>2]=xc),aa=0==(0|xc))break;ba=0|f[18740],ca=xc>>>0<ba>>>0,ca&&xa(),da=xc+24|0,f[da>>2]=uc,ea=$a+16|0,fa=0|f[ea>>2],ga=0==(0|fa);do if(!ga){if(ha=fa>>>0<ba>>>0,!ha){ia=xc+16|0,f[ia>>2]=fa,ka=fa+24|0,f[ka>>2]=xc;break}xa()}while(0);if(la=ea+4|0,ma=0|f[la>>2],na=0==(0|ma),!na){if(oa=0|f[18740],pa=ma>>>0<oa>>>0,!pa){qa=xc+20|0,f[qa>>2]=ma,ra=ma+24|0,f[ra>>2]=xc;break}xa()}}}while(0);return sa=Ub>>>0<16,sa?(ta=1&g,va=Sb|ta,wa=2|va,f[e>>2]=wa,ya=a+Sb|0,za=ya+4|0,Aa=0|f[za>>2],Ba=1|Aa,f[za>>2]=Ba,Bc=a,0|Bc):(Ca=a+b|0,Da=1&g,Ea=Da|b,Fa=2|Ea,f[e>>2]=Fa,Ha=Ca+4|0,Ia=3|Ub,f[Ha>>2]=Ia,Ja=Ca+Ub|0,Ka=Ja+4|0,La=0|f[Ka>>2],Ma=1|La,f[Ka>>2]=Ma,jw(Ca,Ub),Bc=a,0|Bc)}function jw(a,b){a|=0,b|=0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,$a=0,_a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,$b=0,_b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,$c=0,_c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,$d=0,_d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0,Le=0,Me=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,$e=0,_e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0,gf=0,hf=0,jf=0,kf=0,lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0;
+rf=l,o=a+b|0,p=a+4|0,tb=0|f[p>>2],wd=1&tb,Md=0==(0|wd);do if(Md){if(Xd=0|f[a>>2],ge=3&tb,re=0==(0|ge))return;if(Ce=0-Xd|0,Ne=a+Ce|0,q=Xd+b|0,B=0|f[18740],M=Ne>>>0<B>>>0,M&&xa(),X=0|f[18741],ga=(0|Ne)==(0|X)){if(Xe=o+4|0,r=0|f[Xe>>2],s=3&r,t=3==(0|s),!t){c=Ne,d=q;break}return f[18738]=q,u=r&-2,f[Xe>>2]=u,v=1|q,w=Ne+4|0,f[w>>2]=v,x=Ne+q|0,void(f[x>>2]=q)}if(ra=Xd>>>3,Da=Xd>>>0<256){if(Oa=Ne+8|0,Za=0|f[Oa>>2],ib=Ne+12|0,ub=0|f[ib>>2],Fb=ra<<1,Qb=74984+(Fb<<2)|0,_b=(0|Za)==(0|Qb),_b||(kc=Za>>>0<B>>>0,kc&&xa(),vc=Za+12|0,Gc=0|f[vc>>2],Rc=(0|Gc)==(0|Ne),Rc||xa()),ad=(0|ub)==(0|Za)){ld=1<<ra,xd=ld^-1,Dd=0|f[18736],Ed=Dd&xd,f[18736]=Ed,c=Ne,d=q;break}Fd=(0|ub)==(0|Qb),Fd?(n=ub+8|0,j=n):(Gd=ub>>>0<B>>>0,Gd&&xa(),Hd=ub+8|0,Id=0|f[Hd>>2],Jd=(0|Id)==(0|Ne),Jd?j=Hd:xa()),Kd=Za+12|0,f[Kd>>2]=ub,f[j>>2]=Za,c=Ne,d=q;break}Ld=Ne+24|0,Nd=0|f[Ld>>2],Od=Ne+12|0,Pd=0|f[Od>>2],Qd=(0|Pd)==(0|Ne);do if(Qd){if(_d=Ne+16|0,ae=_d+4|0,be=0|f[ae>>2],ce=0==(0|be)){if(de=0|f[_d>>2],ee=0==(0|de)){bf=0;break}_e=de,ff=_d}else _e=be,ff=ae;for(;;)if(fe=_e+20|0,he=0|f[fe>>2],ie=0==(0|he)){if(je=_e+16|0,ke=0|f[je>>2],le=0==(0|ke)){af=_e,gf=ff;break}_e=ke,ff=je}else _e=he,ff=fe;if(me=gf>>>0<B>>>0,!me){f[gf>>2]=0,bf=af;break}xa()}else{if(Rd=Ne+8|0,Sd=0|f[Rd>>2],Td=Sd>>>0<B>>>0,Td&&xa(),Ud=Sd+12|0,Vd=0|f[Ud>>2],Wd=(0|Vd)==(0|Ne),Wd||xa(),Yd=Pd+8|0,Zd=0|f[Yd>>2],$d=(0|Zd)==(0|Ne)){f[Ud>>2]=Pd,f[Yd>>2]=Sd,bf=Pd;break}xa()}while(0);if(ne=0==(0|Nd))c=Ne,d=q;else{if(oe=Ne+28|0,pe=0|f[oe>>2],qe=75248+(pe<<2)|0,se=0|f[qe>>2],te=(0|Ne)==(0|se)){if(f[qe>>2]=bf,nf=0==(0|bf)){ue=1<<pe,ve=ue^-1,we=0|f[18737],xe=we&ve,f[18737]=xe,c=Ne,d=q;break}}else if(ye=0|f[18740],ze=Nd>>>0<ye>>>0,ze&&xa(),Ae=Nd+16|0,Be=0|f[Ae>>2],De=(0|Be)==(0|Ne),De?f[Ae>>2]=bf:(Ee=Nd+20|0,f[Ee>>2]=bf),Fe=0==(0|bf)){c=Ne,d=q;break}Ge=0|f[18740],He=bf>>>0<Ge>>>0,He&&xa(),Ie=bf+24|0,f[Ie>>2]=Nd,Je=Ne+16|0,Ke=0|f[Je>>2],Le=0==(0|Ke);do if(!Le){if(Me=Ke>>>0<Ge>>>0,!Me){Oe=bf+16|0,f[Oe>>2]=Ke,Pe=Ke+24|0,f[Pe>>2]=bf;break}xa()}while(0);if(Qe=Je+4|0,Re=0|f[Qe>>2],Se=0==(0|Re))c=Ne,d=q;else{if(Te=0|f[18740],Ue=Re>>>0<Te>>>0,!Ue){Ve=bf+20|0,f[Ve>>2]=Re,We=Re+24|0,f[We>>2]=bf,c=Ne,d=q;break}xa()}}}else c=a,d=b;while(0);if(y=0|f[18740],z=o>>>0<y>>>0,z&&xa(),A=o+4|0,C=0|f[A>>2],D=2&C,E=0==(0|D)){if(F=0|f[18742],G=(0|o)==(0|F)){if(H=0|f[18739],I=H+d|0,f[18739]=I,f[18742]=c,J=1|I,K=c+4|0,f[K>>2]=J,L=0|f[18741],N=(0|c)==(0|L),!N)return;return f[18741]=0,void(f[18738]=0)}if(O=0|f[18741],P=(0|o)==(0|O))return Q=0|f[18738],R=Q+d|0,f[18738]=R,f[18741]=c,S=1|R,T=c+4|0,f[T>>2]=S,U=c+R|0,void(f[U>>2]=R);V=C&-8,W=V+d|0,Y=C>>>3,Z=C>>>0<256;do if(Z){if($=o+8|0,_=0|f[$>>2],aa=o+12|0,ba=0|f[aa>>2],ca=Y<<1,da=74984+(ca<<2)|0,ea=(0|_)==(0|da),ea||(fa=_>>>0<y>>>0,fa&&xa(),ha=_+12|0,ia=0|f[ha>>2],ja=(0|ia)==(0|o),ja||xa()),ka=(0|ba)==(0|_)){la=1<<Y,ma=la^-1,na=0|f[18736],oa=na&ma,f[18736]=oa;break}pa=(0|ba)==(0|da),pa?(m=ba+8|0,i=m):(qa=ba>>>0<y>>>0,qa&&xa(),sa=ba+8|0,ta=0|f[sa>>2],ua=(0|ta)==(0|o),ua?i=sa:xa()),va=_+12|0,f[va>>2]=ba,f[i>>2]=_}else{wa=o+24|0,ya=0|f[wa>>2],za=o+12|0,Aa=0|f[za>>2],Ba=(0|Aa)==(0|o);do if(Ba){if(Ma=o+16|0,Na=Ma+4|0,Pa=0|f[Na>>2],Qa=0==(0|Pa)){if(Ra=0|f[Ma>>2],Sa=0==(0|Ra)){ef=0;break}cf=Ra,hf=Ma}else cf=Pa,hf=Na;for(;;)if(Ta=cf+20|0,Ua=0|f[Ta>>2],Va=0==(0|Ua)){if(Wa=cf+16|0,Xa=0|f[Wa>>2],Ya=0==(0|Xa)){df=cf,jf=hf;break}cf=Xa,hf=Wa}else cf=Ua,hf=Ta;if($a=jf>>>0<y>>>0,!$a){f[jf>>2]=0,ef=df;break}xa()}else{if(Ca=o+8|0,Ea=0|f[Ca>>2],Fa=Ea>>>0<y>>>0,Fa&&xa(),Ga=Ea+12|0,Ha=0|f[Ga>>2],Ia=(0|Ha)==(0|o),Ia||xa(),Ja=Aa+8|0,Ka=0|f[Ja>>2],La=(0|Ka)==(0|o)){f[Ga>>2]=Aa,f[Ja>>2]=Ea,ef=Aa;break}xa()}while(0);if(_a=0==(0|ya),!_a){if(ab=o+28|0,bb=0|f[ab>>2],cb=75248+(bb<<2)|0,db=0|f[cb>>2],eb=(0|o)==(0|db)){if(f[cb>>2]=ef,of=0==(0|ef)){fb=1<<bb,gb=fb^-1,hb=0|f[18737],jb=hb&gb,f[18737]=jb;break}}else if(kb=0|f[18740],lb=ya>>>0<kb>>>0,lb&&xa(),mb=ya+16|0,nb=0|f[mb>>2],ob=(0|nb)==(0|o),ob?f[mb>>2]=ef:(pb=ya+20|0,f[pb>>2]=ef),qb=0==(0|ef))break;rb=0|f[18740],sb=ef>>>0<rb>>>0,sb&&xa(),vb=ef+24|0,f[vb>>2]=ya,wb=o+16|0,xb=0|f[wb>>2],yb=0==(0|xb);do if(!yb){if(zb=xb>>>0<rb>>>0,!zb){Ab=ef+16|0,f[Ab>>2]=xb,Bb=xb+24|0,f[Bb>>2]=ef;break}xa()}while(0);if(Cb=wb+4|0,Db=0|f[Cb>>2],Eb=0==(0|Db),!Eb){if(Gb=0|f[18740],Hb=Db>>>0<Gb>>>0,!Hb){Ib=ef+20|0,f[Ib>>2]=Db,Jb=Db+24|0,f[Jb>>2]=ef;break}xa()}}}while(0);if(Kb=1|W,Lb=c+4|0,f[Lb>>2]=Kb,Mb=c+W|0,f[Mb>>2]=W,Nb=0|f[18741],Ob=(0|c)==(0|Nb))return void(f[18738]=W);e=W}else Pb=C&-2,f[A>>2]=Pb,Rb=1|d,Sb=c+4|0,f[Sb>>2]=Rb,Tb=c+d|0,f[Tb>>2]=d,e=d;if(Ub=e>>>3,Vb=e>>>0<256)return Wb=Ub<<1,Xb=74984+(Wb<<2)|0,Yb=0|f[18736],Zb=1<<Ub,$b=Yb&Zb,ac=0==(0|$b),ac?(bc=Yb|Zb,f[18736]=bc,h=Xb+8|0,k=h,Ye=Xb):(cc=Xb+8|0,dc=0|f[cc>>2],ec=0|f[18740],fc=dc>>>0<ec>>>0,fc?xa():(k=cc,Ye=dc)),f[k>>2]=c,gc=Ye+12|0,f[gc>>2]=c,hc=c+8|0,f[hc>>2]=Ye,ic=c+12|0,void(f[ic>>2]=Xb);if(jc=e>>>8,lc=0==(0|jc),lc?Ze=0:(mc=e>>>0>16777215,mc?Ze=31:(nc=jc+1048320|0,oc=nc>>>16,pc=8&oc,qc=jc<<pc,rc=qc+520192|0,sc=rc>>>16,tc=4&sc,uc=tc|pc,wc=qc<<tc,xc=wc+245760|0,yc=xc>>>16,zc=2&yc,Ac=uc|zc,Bc=14-Ac|0,Cc=wc<<zc,Dc=Cc>>>15,Ec=Bc+Dc|0,Fc=Ec<<1,Hc=Ec+7|0,Ic=e>>>Hc,Jc=1&Ic,Kc=Jc|Fc,Ze=Kc)),Lc=75248+(Ze<<2)|0,Mc=c+28|0,f[Mc>>2]=Ze,Nc=c+16|0,Oc=c+20|0,f[Oc>>2]=0,f[Nc>>2]=0,Pc=0|f[18737],Qc=1<<Ze,Sc=Pc&Qc,Tc=0==(0|Sc))return Uc=Pc|Qc,f[18737]=Uc,f[Lc>>2]=c,Vc=c+24|0,f[Vc>>2]=Lc,Wc=c+12|0,f[Wc>>2]=c,Xc=c+8|0,void(f[Xc>>2]=c);for(Yc=0|f[Lc>>2],Zc=31==(0|Ze),$c=Ze>>>1,_c=25-$c|0,bd=Zc?0:_c,cd=e<<bd,$e=cd,kf=Yc;;){if(dd=kf+4|0,ed=0|f[dd>>2],fd=ed&-8,gd=(0|fd)==(0|e)){lf=kf,qf=127;break}if(hd=$e>>>31,id=(kf+16|0)+(hd<<2)|0,jd=$e<<1,kd=0|f[id>>2],md=0==(0|kd)){g=id,mf=kf,qf=124;break}$e=jd,kf=kd}return 124==(0|qf)?(nd=0|f[18740],od=g>>>0<nd>>>0,od&&xa(),f[g>>2]=c,pd=c+24|0,f[pd>>2]=mf,qd=c+12|0,f[qd>>2]=c,rd=c+8|0,void(f[rd>>2]=c)):127==(0|qf)?(sd=lf+8|0,td=0|f[sd>>2],ud=0|f[18740],vd=td>>>0>=ud>>>0,pf=lf>>>0>=ud>>>0,yd=vd&pf,yd||xa(),zd=td+12|0,f[zd>>2]=c,f[sd>>2]=c,Ad=c+8|0,f[Ad>>2]=td,Bd=c+12|0,f[Bd>>2]=lf,Cd=c+24|0,void(f[Cd>>2]=0)):void 0}function kw(){}function lw(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0;return e=a-c>>>0,f=b-d>>>0,f=b-d-(c>>>0>a>>>0|0)>>>0,0|(F=f,0|e)}function mw(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0;return e=a+c>>>0,f=b+d+(e>>>0<a>>>0|0)>>>0,0|(F=f,0|e)}function nw(a,b,c){a|=0,b|=0,c|=0;var e=0,g=0,h=0,i=0;if(e=a+c|0,(0|c)>=20){if(b&=255,i=3&a,g=b|b<<8|b<<16|b<<24,h=e&-4,i)for(i=a+4-i|0;(0|a)<(0|i);)d[a>>0]=b,a=a+1|0;for(;(0|a)<(0|h);)f[a>>2]=g,a=a+4|0}for(;(0|a)<(0|e);)d[a>>0]=b,a=a+1|0;return a-c|0}function ow(a,b,c){a|=0,b|=0,c|=0;var d=0;return(0|c)<32?(d=(1<<c)-1|0,F=b<<c|(a&d<<32-c)>>>32-c,a<<c):(F=a<<c-32,0)}function pw(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0;for(s=s+1|0,f[a>>2]=s;(0|e)<(0|d);){if(0==(0|f[c+(e<<3)>>2]))return f[c+(e<<3)>>2]=s,f[c+((e<<3)+4)>>2]=b,f[c+((e<<3)+8)>>2]=0,F=d,0|c;e=e+1|0}return d=2*d|0,c=0|hw(0|c,8*(d+1|0)|0),c=0|pw(0|a,0|b,0|c,0|d),F=d,0|c}function qw(a,b,c){a|=0,b|=0,c|=0;var d=0;return(0|c)<32?(d=(1<<c)-1|0,F=b>>>c,a>>>c|(b&d)<<32-c):(F=0,b>>>c-32|0)}function rw(a,b,c){a|=0,b|=0,c|=0;for(var d=0,e=0;(0|d)<(0|c)&&(e=0|f[b+(d<<3)>>2],0!=(0|e));){if((0|e)==(0|a))return 0|f[b+((d<<3)+4)>>2];d=d+1|0}return 0}function sw(a,b,c){a|=0,b|=0,c|=0;var e=0;if((0|c)>=4096)return 0|Da(0|a,0|b,0|c);if(e=0|a,(3&a)==(3&b)){for(;3&a;){if(0==(0|c))return 0|e;d[a>>0]=0|d[b>>0],a=a+1|0,b=b+1|0,c=c-1|0}for(;(0|c)>=4;)f[a>>2]=0|f[b>>2],a=a+4|0,b=b+4|0,c=c-4|0}for(;(0|c)>0;)d[a>>0]=0|d[b>>0],a=a+1|0,b=b+1|0,c=c-1|0;return 0|e}function tw(a){a|=0;var b=0;return b=0|d[p+(255&a)>>0],(0|b)<8?0|b:(b=0|d[p+(a>>8&255)>>0],(0|b)<8?b+8|0:(b=0|d[p+(a>>16&255)>>0],(0|b)<8?b+16|0:(0|d[p+(a>>>24)>>0])+24|0))}function uw(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,X=0,Y=0,Z=0,$=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0;if(g=a,h=b,i=h,j=c,k=d,l=k,0==(0|i))return m=0!=(0|e),0==(0|l)?(m&&(f[e>>2]=(g>>>0)%(j>>>0),f[e+4>>2]=0),ra=0,qa=(g>>>0)/(j>>>0)>>>0,0|(F=ra,qa)):m?(f[e>>2]=a&-1,f[e+4>>2]=0&b,ra=0,qa=0,0|(F=ra,qa)):(ra=0,qa=0,0|(F=ra,qa));n=0==(0|l);do{if(0==(0|j)){if(n)return 0!=(0|e)&&(f[e>>2]=(i>>>0)%(j>>>0),f[e+4>>2]=0),ra=0,qa=(i>>>0)/(j>>>0)>>>0,0|(F=ra,qa);if(0==(0|g))return 0!=(0|e)&&(f[e>>2]=0,f[e+4>>2]=(i>>>0)%(l>>>0)),ra=0,qa=(i>>>0)/(l>>>0)>>>0,0|(F=ra,qa);if(o=l-1|0,0==(o&l|0))return 0!=(0|e)&&(f[e>>2]=0|a&-1,f[e+4>>2]=o&i|0&b),ra=0,qa=i>>>((0|tw(0|l))>>>0),0|(F=ra,qa);if(p=0|W(0|l),q=p-(0|W(0|i))|0,q>>>0<=30){r=q+1|0,s=31-q|0,M=r,L=i<<s|g>>>(r>>>0),K=i>>>(r>>>0),J=0,I=g<<s;break}return 0==(0|e)?(ra=0,qa=0,0|(F=ra,qa)):(f[e>>2]=0|a&-1,f[e+4>>2]=h|0&b,ra=0,qa=0,0|(F=ra,qa))}if(!n){if(C=0|W(0|l),D=C-(0|W(0|i))|0,D>>>0<=31){E=D+1|0,G=31-D|0,H=D-31>>31,M=E,L=g>>>(E>>>0)&H|i<<G,K=i>>>(E>>>0)&H,J=0,I=g<<G;break}return 0==(0|e)?(ra=0,qa=0,0|(F=ra,qa)):(f[e>>2]=0|a&-1,f[e+4>>2]=h|0&b,ra=0,qa=0,0|(F=ra,qa))}if(t=j-1|0,0!=(t&j|0)){v=(0|W(0|j))+33|0,w=v-(0|W(0|i))|0,x=64-w|0,y=32-w|0,z=y>>31,A=w-32|0,B=A>>31,M=w,L=y-1>>31&i>>>(A>>>0)|(i<<y|g>>>(w>>>0))&B,K=B&i>>>(w>>>0),J=g<<x&z,I=(i<<x|g>>>(A>>>0))&z|g<<y&w-33>>31;break}return 0!=(0|e)&&(f[e>>2]=t&g,f[e+4>>2]=0),1==(0|j)?(ra=h|0&b,qa=0|a&-1,0|(F=ra,qa)):(u=0|tw(0|j),ra=0|i>>>(u>>>0),qa=i<<32-u|g>>>(u>>>0)|0,0|(F=ra,qa))}while(0);if(0==(0|M))ma=I,la=J,ka=K,ja=L,ia=0,ha=0;else{for(N=0|c&-1,O=k|0&d,P=0|mw(0|N,0|O,-1,-1),Q=F,X=I,V=J,U=K,T=L,S=M,R=0;;){if(Y=V>>>31|X<<1,Z=R|V<<1,$=0|(T<<1|X>>>31),_=T>>>31|U<<1|0,0|lw(0|P,0|Q,0|$,0|_),aa=F,ba=aa>>31|((0|aa)<0?-1:0)<<1,ca=1&ba,da=0|lw(0|$,0|_,ba&N|0,(((0|aa)<0?-1:0)>>31|((0|aa)<0?-1:0)<<1)&O|0),ea=da,fa=F,ga=S-1|0,0==(0|ga))break;X=Y,V=Z,U=fa,T=ea,S=ga,R=ca}ma=Y,la=Z,ka=fa,ja=ea,ia=0,ha=ca}return na=la,oa=0,pa=ma|oa,0!=(0|e)&&(f[e>>2]=0|ja,f[e+4>>2]=0|ka),ra=(0|na)>>>31|pa<<1|0&(oa<<1|na>>>31)|ia,qa=(na<<1|0)&-2|ha,0|(F=ra,qa)}function vw(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0;return e=0|uw(a,b,c,d,0),0|e}function ww(a,b){a|=0,b|=0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;return c=65535&a,d=65535&b,e=0|U(d,c),f=a>>>16,g=(e>>>16)+(0|U(d,f))|0,h=b>>>16,i=0|U(h,c),0|(F=((g>>>16)+(0|U(h,f))|0)+(((65535&g)+i|0)>>>16)|0,0|(g+i<<16|65535&e))}function xw(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,f=0,g=0,h=0,i=0;return e=a,f=c,g=0|ww(e,f),h=F,i=0|U(b,f),0|(F=((0|U(d,e))+i|0)+h|0&h,0|g&-1)}function yw(a,b,c){a|=0,b|=0,c|=0;var e=0;if((0|b)<(0|a)&(0|a)<(b+c|0)){for(e=a,b=b+c|0,a=a+c|0;(0|c)>0;)a=a-1|0,b=b-1|0,c=c-1|0,d[a>>0]=0|d[b>>0];a=e}else 0|sw(a,b,c);return 0|a}function zw(a,b,c,d){a|=0,b|=0,c|=0,d|=0;var e=0,g=0;return g=l,l=l+16|0,e=0|g,0|uw(a,b,c,d,e),l=g,0|(F=0|f[e+4>>2],0|f[e>>2])}function Aw(){return 0}function Bw(a,b,c,d){return a|=0,b|=0,c|=0,d|=0,0|Yw[511&a](0|b,0|c,0|d)}function Cw(a,b,c,d,e,f,g,h){a|=0,b|=0,c|=0,d|=0,e|=0,f|=0,g|=0,h|=0,Zw[255&a](0|b,0|c,0|d,0|e,0|f,0|g,0|h)}function Dw(a,b,c,d,e,f){a|=0,b|=0,c|=0,d|=0,e|=0,f|=0,$w[255&a](0|b,0|c,0|d,0|e,0|f)}function Ew(a,b){a|=0,b|=0,_w[511&a](0|b)}function Fw(a,b,c){a|=0,b|=0,c|=0,ax[511&a](0|b,0|c)}function Gw(a,b){return a|=0,b|=0,0|bx[255&a](0|b)}function Hw(a,b,c,d){a|=0,b|=0,c|=0,d|=0,cx[511&a](0|b,0|c,0|d)}function Iw(a,b,c,d,e){return a|=0,b|=0,c|=0,d|=0,e|=0,0|dx[255&a](0|b,0|c,0|d,0|e)}function Jw(a,b,c,d,e,f,g){a|=0,b|=0,c|=0,d|=0,e|=0,f|=0,g|=0,ex[255&a](0|b,0|c,0|d,0|e,0|f,0|g)}function Kw(a,b,c){return a|=0,b|=0,c|=0,0|fx[255&a](0|b,0|c)}function Lw(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0,gx[255&a](0|b,0|c,0|d,0|e)}function Mw(a,b,c){return a|=0,b|=0,c|=0,$(0),0}function Nw(a,b,c,d,e,f,g){a|=0,b|=0,c|=0,d|=0,e|=0,f|=0,g|=0,_(1)}function Ow(a,b,c,d,e){a|=0,b|=0,c|=0,d|=0,e|=0,aa(2)}function Pw(a){a|=0,ba(3)}function Qw(a,b){a|=0,b|=0,ca(4)}function Rw(a,b){a|=0,b|=0,Oa(0|a,0|b)}function Sw(a){return a|=0,da(5),0}function Tw(a,b,c){a|=0,b|=0,c|=0,ea(6)}function Uw(a,b,c,d){return a|=0,b|=0,c|=0,d|=0,fa(7),0}function Vw(a,b,c,d,e,f){a|=0,b|=0,c|=0,d|=0,e|=0,f|=0,ga(8)}function Ww(a,b){return a|=0,b|=0,ha(9),0}function Xw(a,b,c,d){a|=0,b|=0,c|=0,d|=0,ia(10)}var d=new a.Int8Array(c),e=new a.Int16Array(c),f=new a.Int32Array(c),g=new a.Uint8Array(c),j=(new a.Uint16Array(c),new a.Uint32Array(c),new a.Float32Array(c)),k=new a.Float64Array(c),l=0|b.STACKTOP,m=0|b.STACK_MAX,n=0|b.tempDoublePtr,p=(0|b.ABORT,0|b.cttz_i8),q=0,r=0,s=0,u=a.NaN,v=a.Infinity,F=0,G=a.Math.floor,H=a.Math.abs,J=(a.Math.sqrt,a.Math.pow),T=(a.Math.cos,a.Math.sin,a.Math.tan,a.Math.acos,a.Math.asin,a.Math.atan,a.Math.atan2,a.Math.exp,a.Math.log,a.Math.ceil),U=a.Math.imul,W=(a.Math.min,a.Math.clz32),X=b.abort,Z=(b.assert,b.abortStackOverflow),$=b.nullFunc_iiii,_=b.nullFunc_viiiiiii,aa=b.nullFunc_viiiii,ba=b.nullFunc_vi,ca=b.nullFunc_vii,da=b.nullFunc_ii,ea=b.nullFunc_viii,fa=b.nullFunc_iiiii,ga=b.nullFunc_viiiiii,ha=b.nullFunc_iii,ia=b.nullFunc_viiii,ja=b.invoke_iiii,ka=b.invoke_viiiiiii,la=b.invoke_viiiii,ma=b.invoke_vi,na=b.invoke_vii,oa=b.invoke_ii,pa=b.invoke_viii,qa=b.invoke_iiiii,ra=b.invoke_viiiiii,sa=b.invoke_iii,ta=b.invoke_viiii,ua=b._pthread_cleanup_pop,va=b.___syscall221,xa=(b._llvm_pow_f64,b._abort),za=(b._llvm_fabs_f64,b._pthread_cleanup_push),Aa=b._longjmp,Ca=(b._emscripten_set_main_loop_timing,b._sbrk),Da=b._emscripten_memcpy_big,Ha=(b.__exit,b.___setErrNo,b._llvm_fabs_f32,b.___syscall54),Ia=b.___unlock,La=(b._emscripten_set_main_loop,b._emscripten_get_now,b.___lock),Ma=b.___syscall6,Na=b.___syscall5,Oa=b._emscripten_longjmp,Pa=b.___syscall140,Qa=b._exit,Ra=b.___syscall145,Sa=b.___syscall146,Yw=[Mw,Mw,Qu,Tu,Uu,Wu,kv,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Zp,ki,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Hc,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,xk,Mw,yk,Mw,jf,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,rp,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Yt,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw,Mw],Zw=[Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,_j,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw,Nw],$w=[Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,yt,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow,Ow],_w=[Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,ak,Pw,dk,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,$j,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,ft,Ru,Vu,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw,Pw],ax=[Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,ck,Qw,Qw,ek,Qw,Qw,Qw,Qw,Qw,Qw,mk,Qw,Qw,Xc,Qw,Rc,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Zc,Qw,Qw,qk,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,sk,Qw,Qw,Rw,Qw,wk,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Gk,Qw,Qw,sn,Qw,Yk,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,bg,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw,Qw],bx=[Sw,Nu,Sw,Sw,Sw,Sw,Sw,kb,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,gk,Sw,Sw,Sw,Wc,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Nk,Ql,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw,Sw],cx=[Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,_c,ad,cd,dd,fd,gd,hd,id,kd,Pd,Qd,Jd,Rd,Sd,Td,Ud,Vd,Kd,Wd,Yd,Zd,Nd,$d,ae,be,ce,de,re,se,te,ve,we,xe,ye,ze,Ce,Fe,Ge,Ie,Je,Ke,Oe,Pe,Qe,Re,Se,Te,Ue,Ve,We,Xe,Ye,Ze,$e,_e,af,bf,cf,df,ef,ff,gf,hf,nf,pf,rf,sf,uf,vf,wf,xf,yf,zf,Af,Tw,kg,kh,lh,mh,oh,ph,qh,vh,wh,xh,yh,zh,Ah,Bh,Ch,Dh,Eh,Fh,Gh,Hh,Jh,Kh,Tg,Lh,Mh,Nh,Oh,Qh,Sh,Uh,Vh,Wh,Xh,ih,Yh,Zh,Bi,Di,Ei,Fi,Gi,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,hk,Tw,bk,Tw,Tw,Tw,Tw,Oj,Pj,Si,Ui,pj,qj,Cj,Dj,Hj,Jj,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,rk,Tw,Tw,Jn,Tw,Tw,tk,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,jo,Wn,$n,Tw,Tw,Hg,yg,Ad,Tw,Tw,Tw,Tw,Tw,Wp,Tw,Tw,Tw,Tw,Tw,Tw,tn,Tw,qo,ro,so,to,uo,xo,ko,yo,zo,Ao,Co,Do,Eo,Fo,Go,Ho,_n,Io,Jo,Ko,ao,Lo,Mo,Po,Uo,qq,rq,tq,uq,vq,_p,wq,xq,Aq,Bq,Cq,Dq,Eq,Fq,Gq,Jq,Ak,Kq,Lq,Mq,Nq,oq,Oq,Pq,Qq,Sq,Uq,Wq,Xq,Yq,Zq,$q,cr,dr,Mj,er,fr,gr,uj,hr,ir,Tq,Vq,Qr,Rr,Sr,Tr,Ur,To,Jf,As,Qj,Ds,xs,Es,Fs,Gs,Hs,zk,Is,es,js,Js,ks,Ls,bs,Dk,Ms,Ns,Os,Ps,rj,Qs,Rs,Us,Vs,Ws,Xs,Ys,Zs,_s,at,ct,tt,ut,vt,wt,Bt,Ct,Ht,Kt,Dt,Ft,Rt,St,Tt,Ut,Tw,cu,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw,Tw],dx=[Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Yf,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Ki,lj,sj,vj,Nj,Rj,Xj,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Ep,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw,Uw],ex=[Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Ff,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw,Vw],fx=[Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,tp,Ww,Ww,fk,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,pk,Ww,Ww,Ww,jt,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,uk,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,it,Ww,Ww,Ww,Ww,Ww,aw,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww,Ww],gx=[Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Er,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,nk,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Ej,Ij,Xw,Xw,Xw,Xw,Xw,Xw,Nn,cq,co,Xw,rg,xr,Xw,Xw,Xw,Xw,bj,Xw,Xw,Xw,Xw,Ag,Xw,ge,Xw,Xw,Xw,Xw,fo,go,Xw,Xw,Xw,Dd,Xw,Xw,Xw,Hp,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw,Xw];return{_main:_a,_llvm_cttz_i32:tw,_bitshift64Lshr:qw,_bitshift64Shl:ow,_fflush:Sv,_memset:nw,_memcpy:sw,___muldi3:xw,___uremdi3:zw,_i64Subtract:lw,___udivmoddi4:uw,_realloc:hw,_i64Add:mw,_pthread_self:Aw,___udivdi3:vw,___errno_location:Pu,___muldsi3:ww,_testSetjmp:rw,_saveSetjmp:pw,_free:gw,_memmove:yw,_malloc:fw,runPostSets:kw,stackAlloc:Ua,stackSave:Va,stackRestore:Wa,establishStackSpace:Xa,setThrew:Ya,setTempRet0:Za,getTempRet0:$a,dynCall_iiii:Bw,dynCall_viiiiiii:Cw,dynCall_viiiii:Dw,dynCall_vi:Ew,dynCall_vii:Fw,dynCall_ii:Gw,dynCall_viii:Hw,dynCall_iiiii:Iw,dynCall_viiiiii:Jw,dynCall_iii:Kw,dynCall_viiii:Lw}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),real__main=asm._main;asm._main=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real__main.apply(null,arguments)};var real__llvm_cttz_i32=asm._llvm_cttz_i32;asm._llvm_cttz_i32=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real__llvm_cttz_i32.apply(null,arguments)};var real__bitshift64Lshr=asm._bitshift64Lshr;asm._bitshift64Lshr=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real__bitshift64Lshr.apply(null,arguments)};var real__bitshift64Shl=asm._bitshift64Shl;asm._bitshift64Shl=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real__bitshift64Shl.apply(null,arguments)};var real__fflush=asm._fflush;asm._fflush=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real__fflush.apply(null,arguments)};var real____muldi3=asm.___muldi3;asm.___muldi3=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real____muldi3.apply(null,arguments)};var real____uremdi3=asm.___uremdi3;asm.___uremdi3=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real____uremdi3.apply(null,arguments)};var real__i64Subtract=asm._i64Subtract;asm._i64Subtract=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real__i64Subtract.apply(null,arguments)};var real____udivmoddi4=asm.___udivmoddi4;asm.___udivmoddi4=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real____udivmoddi4.apply(null,arguments)};var real__realloc=asm._realloc;asm._realloc=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real__realloc.apply(null,arguments)};var real__i64Add=asm._i64Add;asm._i64Add=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real__i64Add.apply(null,arguments)};var real__pthread_self=asm._pthread_self;asm._pthread_self=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real__pthread_self.apply(null,arguments)};var real____udivdi3=asm.___udivdi3;asm.___udivdi3=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real____udivdi3.apply(null,arguments)};var real____errno_location=asm.___errno_location;asm.___errno_location=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real____errno_location.apply(null,arguments)};var real____muldsi3=asm.___muldsi3;asm.___muldsi3=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real____muldsi3.apply(null,arguments)};var real__testSetjmp=asm._testSetjmp;asm._testSetjmp=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real__testSetjmp.apply(null,arguments)};var real__saveSetjmp=asm._saveSetjmp;asm._saveSetjmp=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real__saveSetjmp.apply(null,arguments)};var real__free=asm._free;asm._free=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real__free.apply(null,arguments)};var real__memmove=asm._memmove;asm._memmove=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),real__memmove.apply(null,arguments)};var real__malloc=asm._malloc;asm._malloc=function(){return assert(runtimeInitialized,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),assert(!runtimeExited,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),
+real__malloc.apply(null,arguments)};var _main=Module._main=asm._main,_llvm_cttz_i32=Module._llvm_cttz_i32=asm._llvm_cttz_i32,_bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl,_fflush=Module._fflush=asm._fflush,_memset=Module._memset=asm._memset,_memcpy=Module._memcpy=asm._memcpy,___muldi3=Module.___muldi3=asm.___muldi3,___uremdi3=Module.___uremdi3=asm.___uremdi3,_i64Subtract=Module._i64Subtract=asm._i64Subtract,___udivmoddi4=Module.___udivmoddi4=asm.___udivmoddi4,_realloc=Module._realloc=asm._realloc,_i64Add=Module._i64Add=asm._i64Add,_pthread_self=Module._pthread_self=asm._pthread_self,___udivdi3=Module.___udivdi3=asm.___udivdi3,___errno_location=Module.___errno_location=asm.___errno_location,___muldsi3=Module.___muldsi3=asm.___muldsi3,_testSetjmp=Module._testSetjmp=asm._testSetjmp,_saveSetjmp=Module._saveSetjmp=asm._saveSetjmp,_free=Module._free=asm._free,runPostSets=Module.runPostSets=asm.runPostSets,_memmove=Module._memmove=asm._memmove,_malloc=Module._malloc=asm._malloc,dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii,dynCall_viiiiiii=Module.dynCall_viiiiiii=asm.dynCall_viiiiiii,dynCall_viiiii=Module.dynCall_viiiii=asm.dynCall_viiiii,dynCall_vi=Module.dynCall_vi=asm.dynCall_vi,dynCall_vii=Module.dynCall_vii=asm.dynCall_vii,dynCall_ii=Module.dynCall_ii=asm.dynCall_ii,dynCall_viii=Module.dynCall_viii=asm.dynCall_viii,dynCall_iiiii=Module.dynCall_iiiii=asm.dynCall_iiiii,dynCall_viiiiii=Module.dynCall_viiiiii=asm.dynCall_viiiiii,dynCall_iii=Module.dynCall_iii=asm.dynCall_iii,dynCall_viiii=Module.dynCall_viiii=asm.dynCall_viiii;Runtime.stackAlloc=asm.stackAlloc,Runtime.stackSave=asm.stackSave,Runtime.stackRestore=asm.stackRestore,Runtime.establishStackSpace=asm.establishStackSpace,Runtime.setTempRet0=asm.setTempRet0,Runtime.getTempRet0=asm.getTempRet0,ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop,preloadStartTime=null,calledMain=!1;dependenciesFulfilled=function a(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=a)},Module.callMain=Module.callMain=function(b){function d(){for(var a=0;a<3;a++)e.push(0)}assert(0==runDependencies,"cannot call main when async dependencies remain! (listen on __ATMAIN__)"),assert(0==__ATPRERUN__.length,"cannot call main when preRun functions remain to be called"),b=b||[],ensureInitRuntime();var c=b.length+1,e=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];d();for(var f=0;f<c-1;f+=1)e.push(allocate(intArrayFromString(b[f]),"i8",ALLOC_NORMAL)),d();e.push(0),e=allocate(e,"i32",ALLOC_NORMAL);try{var g=Module._main(c,e,0);exit(g,!0)}catch(a){if(a instanceof ExitStatus)return;if("SimulateInfiniteLoop"==a)return void(Module.noExitRuntime=!0);throw a&&"object"==typeof a&&a.stack&&Module.printErr("exception thrown: "+[a,a.stack]),a}finally{calledMain=!0}},Module.run=Module.run=run,Module.exit=Module.exit=exit;var abortDecorators=[];if(Module.abort=Module.abort=abort,Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()};
Index: EcnlProtoTool/trunk/webapp/webmrbc/packages.config
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/packages.config	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/packages.config	(revision 270)
@@ -0,0 +1,10 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="Bridge" version="15.7.0" targetFramework="net45" />
+  <package id="Bridge.Bootstrap" version="3.9.4" targetFramework="net45" />
+  <package id="Bridge.Core" version="15.7.0" targetFramework="net45" />
+  <package id="Bridge.Html5" version="15.7.0" targetFramework="net45" />
+  <package id="Bridge.jQuery" version="2.9.3" targetFramework="net45" />
+  <package id="Bridge.Min" version="15.7.0" targetFramework="net45" />
+  <package id="Bridge.WebGL" version="1.8.3" targetFramework="net45" />
+</packages>
Index: EcnlProtoTool/trunk/webapp/webmrbc/post.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/post.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/post.js	(revision 270)
@@ -0,0 +1,1 @@
+};
Index: EcnlProtoTool/trunk/webapp/webmrbc/pre.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/pre.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/pre.js	(revision 270)
@@ -0,0 +1,4 @@
+var mrbc = function(Module) {
+  Module['preRun'].push(function () {
+    Module['FS'] = FS;
+  });
Index: EcnlProtoTool/trunk/webapp/webmrbc/skeleton.cs
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/skeleton.cs	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/skeleton.cs	(revision 270)
@@ -0,0 +1,378 @@
+# jay skeleton for C#
+#
+# character in column 1 determines outcome...
+# # is a comment
+# . is copied
+# t is copied as //t unless -t is set
+# other lines are interpreted to call jay procedures
+#
+ 	version	c# 1.1.0 (c) 2002-2006 ats@cs.rit.edu
+.
+ 	prolog		## %{ ... %} prior to the first %%
+.
+.		// %token constants
+ 	tokens	
+ 	local		## %{ ... %} after the first %%
+.
+.		/// <summary>
+.		///   final state of parser.
+.		/// </summary>
+ 	yyFinal	protected const int yyFinal =
+.
+.		/// <summary>
+.		///   parser tables.
+.		///   Order is mandated by jay.
+.		/// </summary>
+.		protected static readonly short[] yyLhs = new short[] {
+ 	yyLhs
+.		}, yyLen = new short[] {
+ 	yyLen
+.		}, yyDefRed = new short[] {
+ 	yyDefRed
+.		}, yyDgoto = new short[] {
+ 	yyDgoto
+.		}, yySindex = new short[] {
+ 	yySindex
+.		}, yyRindex = new short[] {
+ 	yyRindex
+.		}, yyGindex = new short[] {
+ 	yyGindex
+.		}, yyTable = new short[] {
+ 	yyTable
+.		}, yyCheck = new short[] {
+ 	yyCheck
+.		};
+.
+.		/// <summary>
+.		///   maps symbol value to printable name.
+.		///   see <c>yyExpecting</c>
+.		/// </summary>
+.		protected static readonly string[] yyNames = {
+ 	yyNames-strings
+.		};
+.
+t		/// <summary>
+t		///   printable rules for debugging.
+t		/// </summary>
+t		protected static readonly string[] yyRule = {
+ 	yyRule-strings
+t		};
+t
+t		/// <summary>
+t		///   debugging support, requires <c>yyDebug</c>.
+t		///   Set to <c>null</c> to suppress debugging messages.
+t		/// </summary>
+t		protected yyDebugOut yyDebug;
+t
+t		/// <summary>
+t		///   index-checked interface to <c>yyNames[]</c>.
+t		/// </summary>
+t		/// <param name='token'>single character or <c>%token</c> value</param>
+t		/// <returns>token name or <c>[illegal]</c> or <c>[unknown]</c></returns>
+t		public static string yyName(int token)
+t		{
+t			if ((token < 0) || (token > yyNames.Length)) return "[illegal]";
+t			string name;
+t			if ((name = yyNames[token]) != null) return name;
+t			return "[unknown]";
+t		}
+t
+.		public static int yyToken(string name)
+.		{
+.			int token = 0;
+.			foreach (var n in yyNames) {
+.				if (n == name)
+.					return token;
+.				token++;
+.			}
+.			return yyErrorCode;
+.		}
+.
+.		/// <summary>
+.		///   thrown for irrecoverable syntax errors and stack overflow.
+.		/// </summary>
+.		/// <remarks>
+.		///   Nested for convenience, does not depend on parser class.
+.		/// </remarks>
+.		public class yyException : System.Exception
+.		{
+.			public yyException(string message) : base(message)
+.			{
+.			}
+.		}
+.
+.		/// <summary>
+.		///   must be implemented by a scanner object to supply input to the parser.
+.		/// </summary>
+.		/// <remarks>
+.		///   Nested for convenience, does not depend on parser class.
+.		/// </remarks>
+.		public interface yyInput
+.		{
+.			/// <summary>
+.			///   move on to next token.
+.			/// </summary>
+.			/// <returns><c>false</c> if positioned beyond tokens</returns>
+.			/// <exception><c>IOException</c> on input error</exception>
+.			bool Advance();
+.
+.			/// <summary>
+.			///   classifies current token by <c>%token</c> value or single character.
+.			/// </summary>
+.			/// <remarks>
+.			///   Should not be called if <c>Advance()</c> returned false.
+.			/// </remarks>
+.			int Token { get; }
+.
+.			/// <summary>
+.			///   value associated with current token.
+.			/// </summary>
+.			/// <remarks>
+.			///   Should not be called if <c>Advance()</c> returned false.
+.			/// </remarks>
+.			object Value { get; }
+.		}
+.
+.		public interface yyDebugOut
+.		{
+.			void push(int state, object value);
+.			void lex(int state, int token, string name, object value);
+.			void shift(int from, int to, int errorFlag);
+.			void pop(int state);
+.			void discard(int state, int token, string name, object value);
+.			void reduce(int from, int to, int rule, string text, int len);
+.			void shift(int from, int to);
+.			void accept(object value);
+.			void error(string message);
+.			void reject();
+.		}
+.
+.		public interface yyConsoleOut
+.		{
+.			void yyWarning(string message, object[] expected);
+.			void yyError(string message, object[] expected);
+.		}
+.
+.		public yyConsoleOut yyConsole;
+.
+.		/// <summary>
+.		///   (syntax) warning message.
+.		///   Can be overwritten to control message format.
+.		/// </summary>
+.		/// <param name='message'>text to be displayed</param>
+.		/// <param name='expected'>list of acceptable tokens, if available</param>
+.		public void yyWarning(string message, params object[] expected)
+.		{
+.			if (yyConsole == null)
+.				return;
+.			yyConsole.yyWarning(message, expected);
+.		}
+.
+.		/// <summary>
+.		///   (syntax) error message.
+.		///   Can be overwritten to control message format.
+.		/// </summary>
+.		/// <param name='message'>text to be displayed</param>
+.		/// <param name='expected'>list of acceptable tokens, if available</param>
+.		public void yyError(string message, params object[] expected)
+.		{
+.			if (yyConsole == null)
+.				return;
+.			yyConsole.yyError(message, expected);
+.		}
+.
+.		/// <summary>
+.		///   computes list of expected tokens on error by tracing the tables.
+.		/// </summary>
+.		/// <param name='state'>for which to compute the list</param>
+.		/// <returns>list of token names</returns>
+.		protected string[] yyExpecting(int state)
+.		{
+.			int token, n, len = 0;
+.			bool[] ok = new bool[yyNames.Length];
+.
+.			if ((n = yySindex[state]) != 0)
+.				for (token = n < 0 ? -n : 0;
+.					 (token < yyNames.Length) && (n + token < yyTable.Length); ++token)
+.					if (yyCheck[n + token] == token && !ok[token] && yyNames[token] != null) {
+.						++len;
+.						ok[token] = true;
+.					}
+.			if ((n = yyRindex[state]) != 0)
+.				for (token = n < 0 ? -n : 0;
+.					 (token < yyNames.Length) && (n + token < yyTable.Length); ++token)
+.					if (yyCheck[n + token] == token && !ok[token] && yyNames[token] != null) {
+.						++len;
+.						ok[token] = true;
+.					}
+.
+.			string[] result = new string[len];
+.			for (n = token = 0; n < len; ++token)
+.				if (ok[token]) result[n++] = yyNames[token];
+.			return result;
+.		}
+.
+.		/// <summary>
+.		///   the generated parser, with debugging messages.
+.		///   Maintains a dynamic state and value stack.
+.		/// </summary>
+.		/// <param name='yyLex'>scanner</param>
+.		/// <param name='yyDebug'>debug message writer implementing <c>yyDebug</c>,
+.		///   or <c>null</c></param>
+.		/// <returns>result of the last reduction, if any</returns>
+.		/// <exceptions><c>yyException</c> on irrecoverable parse error</exceptions>
+.		public object yyParse(yyInput yyLex, yyDebugOut yyDebug)
+.		{
+t			this.yyDebug = yyDebug;
+.			return yyParse(yyLex);
+.		}
+.
+.		/// <summary>
+.		///   initial size and increment of the state/value stack [default 256].
+.		///    This is not final so that it can be overwritten outside of invocations
+.		///    of <c>yyParse()</c>.
+.		/// </summary>
+.		protected int yyMax;
+.
+.		protected int yyNest;
+.
+.		/// <summary>
+.		///   executed at the beginning of a reduce action.
+.		///   Used as <c>$$ = yyDefault($1)</c>, prior to the user-specified action, if any.
+.		///   Can be overwritten to provide deep copy, etc.
+.		/// </summary>
+.		/// <param first value for $1, or null.
+.		/// <return first.
+.		protected object yyDefault(object first)
+.		{
+.			return first;
+.		}
+.
+.		/// <summary>
+.		///   the generated parser, with debugging messages.
+.		///   Maintains a dynamic state and value stack.
+.		/// </summary>
+.		/// <param name='yyLex'>scanner</param>
+.		/// <returns>result of the last reduction, if any</returns>
+.		/// <exceptions><c>yyException</c> on irrecoverable parse error</exceptions>
+.		public object yyParse(yyInput yyLex)
+.		{
+.			yyNest++;
+.			if (yyMax <= 0) yyMax = 256;                // initial size
+.			int yyState = 0;                            // state stack ptr
+.			int[] yyStates = new int[0];                // state stack 
+.			object yyVal = null;
+.			object[] yyVals = new object[0];            // value stack
+.			int yyToken = -1;                           // current input
+.			int yyErrorFlag = 0;                        // #tokens to shift
+.
+.			for (int yyTop = 0; ; ++yyTop) {
+.				while (yyTop >= yyStates.Length) {         // dynamically increase
+.					yyStates.Push(0);
+.					yyVals.Push(null);
+.				}
+.				yyStates[yyTop] = yyState;
+.				yyVals[yyTop] = yyVal;
+t				if (yyDebug != null) yyDebug.push(yyState, yyVal);
+.
+.				for (bool yyLoop = true; yyLoop;) { // discarding a token does not change stack
+.					int yyN;
+.					if ((yyN = yyDefRed[yyState]) == 0) {   // else [default] reduce (yyN)
+.						if (yyToken < 0) {
+.							yyToken = yyLex.Advance() ? yyLex.Token : 0;
+t							if (yyDebug != null)
+t								yyDebug.lex(yyState, yyToken, yyName(yyToken), yyLex.Value);
+.						}
+.						if ((yyN = yySindex[yyState]) != 0 && ((yyN += yyToken) >= 0)
+.							&& (yyN < yyTable.Length) && (yyCheck[yyN] == yyToken)) {
+t							if (yyDebug != null)
+t								yyDebug.shift(yyState, yyTable[yyN], yyErrorFlag > 0 ? yyErrorFlag - 1 : 0);
+.							yyState = yyTable[yyN];     // shift to yyN
+.							yyVal = yyLex.Value;
+.							yyToken = -1;
+.							if (yyErrorFlag > 0) --yyErrorFlag;
+.							break;
+.						}
+.						if ((yyN = yyRindex[yyState]) != 0 && (yyN += yyToken) >= 0
+.							&& yyN < yyTable.Length && yyCheck[yyN] == yyToken)
+.							yyN = yyTable[yyN];         // reduce (yyN)
+.						else
+.							switch (yyErrorFlag) {
+.							case 0:
+.							case 1:
+.							case 2:
+.								if (yyErrorFlag == 0) {
+.									yyError("syntax error, expecting {0}", String.Join(",", yyExpecting(yyState)));
+t									if (yyDebug != null) yyDebug.error("syntax error");
+.								}
+.								yyErrorFlag = 3;
+.								do {
+.									if ((yyN = yySindex[yyStates[yyTop]]) != 0
+.										&& (yyN += yyErrorCode) >= 0 && yyN < yyTable.Length
+.										&& yyCheck[yyN] == yyErrorCode) {
+t										if (yyDebug != null)
+t											yyDebug.shift(yyStates[yyTop], yyTable[yyN], 3);
+.										yyState = yyTable[yyN];
+.										yyVal = yyLex.Value;
+.										yyLoop = false;
+.										break;
+.									}
+t									if (yyDebug != null) yyDebug.pop(yyStates[yyTop]);
+.								} while (--yyTop >= 0);
+.								if (!yyLoop)
+.									continue;
+t								if (yyDebug != null) yyDebug.reject();
+.								throw new yyException("irrecoverable syntax error");
+.							case 3:
+.								if (yyToken == 0) {
+.									yyNest--;
+.									if (yyNest <= 0)
+.										return yyVal;
+t									if (yyDebug != null) yyDebug.reject();
+.									throw new yyException("irrecoverable syntax error at end-of-file");
+.								}
+t								if (yyDebug != null)
+t									yyDebug.discard(yyState, yyToken, yyName(yyToken),
+t									  yyLex.Value);
+.								yyToken = -1;
+.								continue;			// leave stack alone
+.							}
+.					}
+.					int yyV = yyTop + 1 - yyLen[yyN];
+t					if (yyDebug != null)
+t						yyDebug.reduce(yyState, yyStates[yyV - 1], yyN, yyRule[yyN], yyLen[yyN]);
+.					yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
+.					switch (yyN) {
+
+ 	actions		## code from the actions within the grammar
+
+.					}
+.					yyTop -= yyLen[yyN];
+.					yyState = yyStates[yyTop];
+.					int yyM = yyLhs[yyN];
+.					if (yyState == 0 && yyM == 0) {
+t						if (yyDebug != null) yyDebug.shift(0, yyFinal);
+.						yyState = yyFinal;
+.						if (yyToken < 0) {
+.							yyToken = yyLex.Advance() ? yyLex.Token : 0;
+t							if (yyDebug != null)
+t								yyDebug.lex(yyState, yyToken, yyName(yyToken), yyLex.Value);
+.						}
+.						if (yyToken == 0) {
+t							if (yyDebug != null) yyDebug.accept(yyVal);
+.							yyNest--;
+.							return yyVal;
+.						}
+.						break;
+.					}
+.					if (((yyN = yyGindex[yyM]) != 0) && ((yyN += yyState) >= 0)
+.						&& (yyN < yyTable.Length) && (yyCheck[yyN] == yyState))
+.						yyState = yyTable[yyN];
+.					else
+.						yyState = yyDgoto[yyM];
+t					if (yyDebug != null) yyDebug.shift(yyStates[yyTop], yyState);
+.					break;
+.				}
+.			}
+.		}
+ 	epilog			## text following second %%
Index: EcnlProtoTool/trunk/webapp/webmrbc/src/main.rb
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/src/main.rb	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/src/main.rb	(revision 270)
@@ -0,0 +1,416 @@
+# TOPPERSãã­ã¸ã§ã¯ã
+$MAKER_CODE = "\x00\x00\xB3"
+
+# ãã¼ããã­ãã¡ã¤ã«ãªãã¸ã§ã¯ã
+class LocalNode < ECNL::ENode
+	def initialize(eojx3)
+		# åä½ç¶æ
+
+		@operation_status = "\x30"
+		# ï¼¶ï½
+ï½ï½ï½ï½ï½æ
+å ±
+		@version_information = "\x01\x0A\x01\x00"
+		# è­å¥çªå·
+		@identification_number = 
+			# ä¸ä½éä¿¡å±¤IDãã£ã¼ã«ã
+			"\xFE" +
+			# ã¡ã¼ã«ã¼ã³ã¼ã
+			$MAKER_CODE +
+			# ã¦ãã¼ã¯IDé¨(ã¡ã¼ã«ã¼ç¬èª)
+			"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+		# ç°å¸¸å
+å®¹
+		@fault_content = "\x00\x00"
+		# ã¡ã¼ã«ã¼ã³ã¼ã
+		@manufacturer_code = $MAKER_CODE
+
+		# ã¤ã³ã¹ã¿ã³ã¹æ°
+		@inst_count = "\x00\x00\x01"
+		# ã¯ã©ã¹æ°
+		@class_count = "\x00\x02"
+		# ã¤ã³ã¹ã¿ã³ã¹ãªã¹ã
+		@inst_list = "\x01\x05\xff\x01"
+		# ã¯ã©ã¹ãªã¹ã
+		@class_list = "\x01\x05\xff"
+		# ã¢ãã¦ã³ã¹ãã­ããã£ããã
+		@anno_prpmap = "\x01\xd5"
+		# SETãã­ããã£ããã
+		@set_prpmap = "\x01\x80"
+		# GETãã­ããã£ããã
+		@get_prpmap = "\x0c\x80\x82\x83\x89\x8a\x9d\x9e\x9f\xd3\xd4\xd6\xd7"
+		# ãã­ããã£å®ç¾©
+		eprpinib_table = [
+			ECNL::EProperty.new(0x80, (ECNL::EPC_RULE_SET | ECNL::EPC_RULE_GET), @operation_status.length, :@operation_status, :onoff_prop_set, :data_prop_get),
+			ECNL::EProperty.new(0x82, (ECNL::EPC_RULE_GET), @version_information.length, :@version_information, :data_prop_set, :data_prop_get),
+			ECNL::EProperty.new(0x83, (ECNL::EPC_RULE_GET), @identification_number.length, :@identification_number, :data_prop_set, :data_prop_get),
+			ECNL::EProperty.new(0x89, (ECNL::EPC_RULE_GET), @fault_content.length, :fault_content, :@node_profile_object_fault_content_set, :data_prop_get),
+			ECNL::EProperty.new(0x8A, (ECNL::EPC_RULE_GET), @manufacturer_code.length, :@manufacturer_code, :data_prop_set, :data_prop_get),
+			ECNL::EProperty.new(0x9D, (ECNL::EPC_RULE_GET), @anno_prpmap.length, :@anno_prpmap, nil, :data_prop_get),
+			ECNL::EProperty.new(0x9E, (ECNL::EPC_RULE_GET), @set_prpmap.length, :@set_prpmap, nil, :data_prop_get),
+			ECNL::EProperty.new(0x9F, (ECNL::EPC_RULE_GET), @get_prpmap.length, :@get_prpmap, nil, :data_prop_get),
+			ECNL::EProperty.new(0xD3, (ECNL::EPC_RULE_GET), @inst_count.length, :@inst_count, nil, :data_prop_get),
+			ECNL::EProperty.new(0xD4, (ECNL::EPC_RULE_GET), @class_count.length, :@class_count, nil, :data_prop_get),
+			ECNL::EProperty.new(0xD5, (ECNL::EPC_RULE_ANNO), @inst_list.length, :@inst_list, nil, :data_prop_get),
+			ECNL::EProperty.new(0xD6, (ECNL::EPC_RULE_GET), @inst_list.length, :@inst_list, nil, :data_prop_get),
+			ECNL::EProperty.new(0xD7, (ECNL::EPC_RULE_GET), @class_list.length, :@class_list, nil, :data_prop_get)
+		]
+
+		super(eojx3, eprpinib_table)
+	end
+
+	# ç°å¸¸å
+å®¹è¨­å®é¢æ°
+	def node_profile_object_fault_content_set(prop, src)
+		# ãµã¤ãºã2ä»¥å¤ã¯åãä»ããªã
+		if (src.bytesize != 2) then
+			return 0
+		end
+
+		if (prop.anno) then
+			prop.set_anno(prop.exinf != src)
+		end
+
+		val = src.getbyte(0) << 8 | src.getbyte(1)
+
+		if ((val >= 0x0) && (val <= 0x3ec)) then
+			prop.set_exinf(val)
+			# TODO: ãã®ã®å ´åã®å¦ç
+		# ä¸è¨ä»¥å¤ã¯åãä»ããªã
+		else
+			return 0
+		end
+
+		return 2
+	end
+
+	# åä½ç¶æ
+ON/OFFè¨­å®é¢æ°ï¼0x30, 0x31ã®ã¿åãä»ãï¼
+	def onoff_prop_set(prop, src)
+		return 0
+	end
+end
+
+# ã³ã³ãã­ã¼ã©ã¼ã¯ã©ã¹
+class ControllerObj < ECNL::EObject
+	def initialize(eojx3, enod)
+		# åä½ç¶æ
+
+		@operation_status = "\x30"
+		# è¨­ç½®å ´æ
+		@installation_location = "\x01\x0A\x01\x00"
+		# è¦æ ¼ï¼¶ï½
+ï½ï½ï½ï½ï½æ
+å ±
+		@standard_version_information = "\x00\x00C\x00"
+		# ç°å¸¸çºçç¶æ
+
+		@fault_status = "\x41"
+		# ã¡ã¼ã«ã¼ã³ã¼ã
+		@manufacturer_code = $MAKER_CODE
+
+		# ã¢ãã¦ã³ã¹ãã­ããã£ããã
+		@anno_prpmap = "\x03\x80\x81\x88"
+		# SETãã­ããã£ããã
+		@set_prpmap = "\x04\x80\x81\x97\x98"
+		# GETãã­ããã£ããã
+		@get_prpmap = "\x0a\x80\x81\x82\x88\x8a\x97\x98\x9d\x9e\x9f"
+		# ãã­ããã£å®ç¾©
+		eprpinib_table = [
+			ECNL::EProperty.new(0x80, (ECNL::EPC_RULE_SET | ECNL::EPC_RULE_GET | ECNL::EPC_ANNOUNCE), @operation_status.length, :@operation_status, :onoff_prop_set, :data_prop_get),
+			ECNL::EProperty.new(0x81, (ECNL::EPC_RULE_SET | ECNL::EPC_RULE_GET | ECNL::EPC_ANNOUNCE), @installation_location.length, :@installation_location, :data_prop_set, :data_prop_get),
+			ECNL::EProperty.new(0x82, (ECNL::EPC_RULE_GET), @standard_version_information.length, :@standard_version_information, :data_prop_set, :data_prop_get),
+			ECNL::EProperty.new(0x88, (ECNL::EPC_RULE_GET | ECNL::EPC_ANNOUNCE), @fault_status.length, :@fault_status, :alarm_prop_set, :data_prop_get),
+			ECNL::EProperty.new(0x8A, (ECNL::EPC_RULE_GET), @manufacturer_code.length, :@manufacturer_code, :data_prop_set, :data_prop_get),
+			ECNL::EProperty.new(0x97, (ECNL::EPC_RULE_SET | ECNL::EPC_RULE_GET), (2), nil, :time_prop_set, :time_prop_get),
+			ECNL::EProperty.new(0x98, (ECNL::EPC_RULE_SET | ECNL::EPC_RULE_GET), (4), nil, :date_prop_set, :date_prop_get),
+			ECNL::EProperty.new(0x9D, (ECNL::EPC_RULE_GET), @anno_prpmap.length, :@anno_prpmap, nil, :data_prop_get),
+			ECNL::EProperty.new(0x9E, (ECNL::EPC_RULE_GET), @set_prpmap.length, :@set_prpmap, nil, :data_prop_get),
+			ECNL::EProperty.new(0x9F, (ECNL::EPC_RULE_GET), @get_prpmap.length, :@get_prpmap, nil, :data_prop_get)
+		]
+
+		super(0x05, 0xFF, eojx3, enod, eprpinib_table)
+	end
+
+	# åä½ç¶æ
+ON/OFFè¨­å®é¢æ°ï¼0x30, 0x31ã®ã¿åãä»ãï¼
+	def onoff_prop_set(prop, src)
+		# ãµã¤ãºãï¼ä»¥å¤ã¯åãä»ããªã
+		if (src.bytesize != 1) then
+			return 0
+		end
+
+		if (prop.anno) then
+			prop.set_anno(prop.exinf != src)
+		end
+
+		case (src.getbyte(0))
+		# ONã®å ´å
+		when 0x30 then
+			prop.set_exinf(src)
+			# LEDã®"."ãON
+			digitalWrite(1, 1)
+		# OFFã®å ´å
+		when 0x31 then
+			prop.set_exinf(src)
+			# LEDã®"."ãOFF
+			digitalWrite(1, 0)
+		# 0x30ã0x31ä»¥å¤ã¯åãä»ããªã
+		else
+			return 0
+		end
+
+		return 1
+	end
+
+	# ç°å¸¸çºçç¶æ
+è¨­å®é¢æ°ï¼0x41, 0x42ã®ã¿åãä»ãï¼
+	def alarm_prop_set(prop, src)
+		# ãµã¤ãºãï¼ä»¥å¤ã¯åãä»ããªã
+		if (src.bytesize != 1) then
+			return 0
+		end
+
+		if (prop.anno) then
+			prop.set_anno(prop.exinf != src)
+		end
+
+		case (src.getbyte(0))
+		# ç°å¸¸çºçãã/ãªãã®å ´å
+		when 0x41,0x42 then
+			prop.set_exinf(src)
+		# 0x41ã0x42ä»¥å¤ã¯åãä»ããªã
+		else
+			return 0
+		end
+
+		return 1
+	end
+
+	# ç¾å¨å¹´ææ¥åå¾é¢æ°
+	def date_prop_get(prop, size)
+		# ãµã¤ãºãï¼ä»¥å¤ã¯åãä»ããªã
+		if (size != 4) then
+			return 0
+		end
+
+		time = Rtc.getTime
+
+		return ((time[0] & 0xFF00) >> 8).chr + (time[0] & 0xFF).chr + time[1].chr + time[2].chr
+	end
+
+	# ç¾å¨å¹´ææ¥è¨­å®é¢æ°
+	def date_prop_set(prop, src)
+		# ãµã¤ãºãï¼ä»¥å¤ã¯åãä»ããªã
+		if (src.bytesize != 4) then
+			return 0
+		end
+
+		time = Rtc.getTime
+		time[0] = (src.getbyte(0) << 8) | src.getbyte(1)
+		time[1] = src.getbyte(2)
+		time[2] = src.getbyte(3)
+		Rtc.setTime time
+
+		return 4
+	end
+
+	# ç¾å¨æå»åå¾é¢æ°
+	def time_prop_get(prop, size)
+		# ãµã¤ãºãï¼ä»¥å¤ã¯åãä»ããªã
+		if (size != 2) then
+			return 0
+		end
+
+		time = Rtc.getTime
+
+		return time[3].chr + time[4].chr
+	end
+
+	# ç¾å¨æå»è¨­å®é¢æ°
+	def time_prop_set(prop, src)
+		# ãµã¤ãºãï¼ä»¥å¤ã¯åãä»ããªã
+		if (src.bytesize != 2) then
+			return 0
+		end
+
+		time = Rtc.getTime
+		time[3] = src.getbyte(0)
+		time[4] = src.getbyte(1)
+		Rtc.setTime time
+
+		return 2
+	end
+end
+
+class Controller < ECNL::SvcTask
+	def initialize()
+		@profile = LocalNode.new(0x01)
+		@devices = [ ControllerObj.new(0x01, @profile) ]
+		@enodadrb_table = []
+
+		super()
+
+		# LEDãOFF
+		digitalWrite(2, 0)
+
+		set_timer(1000)
+	end
+
+	def recv_esv(esv)
+		if (esv.esv != ECNL::ESV_GET_RES) && (esv.esv != ECNL::ESV_GET_SNA) then
+			return
+		end
+
+		itr = esv.itr_ini()
+		itr.itr_nxt()
+		until itr.is_eof do
+			if itr.epc == 0xD6 then
+				# LEDãON
+				digitalWrite(2, 1)
+			end
+			itr.itr_nxt()
+		end
+	end
+
+	def break_wait(data)
+	end
+
+	def timeout()
+		esv = esv_get(nil, 0xD6)
+		snd_esv(esv)
+
+		set_timer(10000)
+	end
+
+	def snd_msg(ep, data)
+		# éä¿¡ã¬ã¤ã¤ã¼ã¸éä¿¡
+		TargetBoard::snd_msg(ep, data)
+	end
+
+	def is_local_addr(ep)
+		TargetBoard::is_local_addr(ep)
+	end
+
+	def is_multicast_addr(ep)
+		TargetBoard::is_multicast_addr(ep)
+	end
+
+	def is_valid_addrid(id)
+		(id >= 0) && ((id - ECNL::ENOD_REMOTE_ID) < @enodadrb_table.length)
+	end
+
+	def get_local_addr()
+		TargetBoard::get_local_addr()
+	end
+
+	def get_multicast_addr()
+		TargetBoard::get_multicast_addr()
+	end
+
+	def get_remote_addr(id)
+		index = id - ECNL::ENOD_REMOTE_ID
+		if (index < 0) || (index >= @enodadrb_table.length)
+			nil
+		else
+			@enodadrb_table[index]
+		end
+	end
+
+	# éä¿¡ã¬ã¤ã¤ã¼ã¢ãã¬ã¹ã®åããã®ãæ¤ç´¢
+	def get_remote_id(ep)
+		id = ECNL::ENOD_REMOTE_ID - 1
+		for ea in @enodadrb_table do
+			id += 1
+			if !ea then
+				next
+			end
+			if !TargetBoard::equals_addr(ea, ep) then
+				next
+			end
+
+			return id
+		end
+
+		return ECNL::ENOD_NOT_MATCH_ID
+	end
+
+	# å¯¾å¿ãããªã¢ã¼ããã¼ããæ¤ç´¢
+	def set_remote_addr(edata, ep)
+		id = ECNL::ENOD_REMOTE_ID - 1
+		for ea in @enodadrb_table do
+			id += 1
+			if !ea then
+				next
+			end
+			if !is_match(svc, edata, ep) then
+				next
+			end
+
+			# å¯¾å¿ãããªã¢ã¼ããã¼ããããã°éä¿¡ã¬ã¤ã¤ã¼ã¢ãã¬ã¹ãè¨­å®
+			@enodadrb_table[id - ECNL::ENOD_REMOTE_ID] = ep
+
+			return id
+		end
+
+		return ECNL::ENOD_NOT_MATCH_ID
+	end
+
+	# ç©ºãé åãæ¢ãã¦èªåç»é²
+	def add_remote_addr(edata, ep)
+		id = ECNL::ENOD_REMOTE_ID - 1
+		for ea in @enodadrb_table do
+			id += 1
+			if ea then
+				next
+			end
+
+			@enodadrb_table[id - ECNL::ENOD_REMOTE_ID] = ep
+
+			return id
+		end
+
+		if @enodadrb_table.length >= 100 then
+			return ECNL::ENOD_NOT_MATCH_ID
+		end
+
+		id = @enodadrb_table.length;
+		@enodadrb_table[id] = ep
+
+		return id + ECNL::ENOD_REMOTE_ID
+	end
+end
+
+ctrl = Controller.new()
+
+# ã¡ã¤ã³ã«ã¼ã
+while (true) do
+	# ã¡ãã»ã¼ã¸å¾
+ã¡
+	ret = TargetBoard::wait_msg(ctrl.timer)
+	if !ret then
+		break;
+	end
+
+	# çµéæéã®è¨ç®
+	ctrl.progress ret[0]
+
+	# æ»ãå¤ãï¼ã¤ãªã
+	if ret.length == 2 then
+		# å
+é¨ã¤ãã³ã
+		case (ret[1])
+		when 1 then
+			TargetBoard::restart
+		when 2 then
+			ctrl.ntf_inl
+		end
+	# æ»ãå¤ãï¼ã¤ãªã
+	elsif ret.length == 3 then
+		# éä¿¡ã¬ã¤ã¤ã¼ããã®ã¡ãã»ã¼ã¸ï¼éä¿¡ç«¯ç¹ã¨é»æï¼
+		ctrl.recv_msg(ret[1], ret[2])
+	end
+
+	# ã¿ã¤ã ã¢ã¦ãã®å¦çãããã°è¡ã
+	ctrl.call_timeout
+end
Index: EcnlProtoTool/trunk/webapp/webmrbc/webmrbc.csproj
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/webmrbc.csproj	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/webmrbc.csproj	(revision 270)
@@ -0,0 +1,212 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>
+    </ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{7E71D3E4-F61A-4423-994A-EB307D7618E0}</ProjectGuid>
+    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>WebMrbc</RootNamespace>
+    <AssemblyName>WebMrbc</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <UseIISExpress>true</UseIISExpress>
+    <IISExpressSSLPort />
+    <IISExpressAnonymousAuthentication />
+    <IISExpressWindowsAuthentication />
+    <IISExpressUseClassicPipelineMode />
+    <UseGlobalApplicationHostFile />
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <NoStdLib>true</NoStdLib>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <NoStdLib>true</NoStdLib>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Bridge, Version=15.7.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\packages\Bridge.Core.15.7.0\lib\net40\Bridge.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="Bridge.Bootstrap3, Version=3.9.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\packages\Bridge.Bootstrap.3.9.4\lib\net40\Bridge.Bootstrap3.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="Bridge.Html5, Version=15.7.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\packages\Bridge.Html5.15.7.0\lib\net40\Bridge.Html5.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="Bridge.jQuery2, Version=2.9.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\packages\Bridge.jQuery.2.9.3\lib\net40\Bridge.jQuery2.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="Bridge.WebGL, Version=1.8.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\packages\Bridge.WebGL.1.8.3\lib\net40\Bridge.WebGL.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="ace\ace.js" />
+    <Content Include="ace\mode-ruby.js" />
+    <Content Include="ace\theme-twilight.js" />
+    <Content Include="arduino_toolbox.xml" />
+    <Content Include="bootstrap\css\bootstrap-theme.css" />
+    <Content Include="bootstrap\css\bootstrap.css" />
+    <Content Include="bootstrap\fonts\glyphicons-halflings-regular.svg" />
+    <Content Include="bootstrap\js\bootstrap.js" />
+    <Content Include="css\webmrbc.css" />
+    <Content Include="ecnl_toolbox.xml" />
+    <Content Include="img\banner.svg" />
+    <Content Include="img\no_image.png" />
+    <Content Include="js\blockly.js" />
+    <Content Include="js\bridge.js" />
+    <Content Include="js\FileSaver.js" />
+    <Content Include="js\jquery-3.1.0.js" />
+    <Content Include="js\jszip.js" />
+    <Content Include="js\webmrbc.js" />
+    <Content Include="src\main.rb" />
+    <Content Include="xterm\addons\fit\fit.js" />
+    <Content Include="xterm\src\xterm.css" />
+    <Content Include="xterm\src\xterm.js" />
+    <Content Include="packages.config" />
+    <Content Include="Bridge\bridge.json" />
+    <Content Include="bootstrap\fonts\glyphicons-halflings-regular.eot" />
+    <Content Include="bootstrap\fonts\glyphicons-halflings-regular.ttf" />
+    <Content Include="bootstrap\fonts\glyphicons-halflings-regular.woff" />
+    <Content Include="bootstrap\fonts\glyphicons-halflings-regular.woff2" />
+    <Content Include="echonet_objects.json" />
+    <None Include="Web.Debug.config">
+      <DependentUpon>Web.config</DependentUpon>
+      <SubType>Designer</SubType>
+    </None>
+    <None Include="Web.Release.config">
+      <DependentUpon>Web.config</DependentUpon>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="mrbc.js" />
+    <Content Include="index.html" />
+    <Content Include="Web.config">
+      <SubType>Designer</SubType>
+    </Content>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Ace.cs" />
+    <Compile Include="App.cs" />
+    <Compile Include="Arduino\GrPeach.cs" />
+    <Compile Include="Arduino\I2cBlock.cs" />
+    <Compile Include="Arduino\KernelBlock.cs" />
+    <Compile Include="Arduino\MemFileBlock.cs" />
+    <Compile Include="Arduino\RtcBlock.cs" />
+    <Compile Include="Arduino\SdBlock.cs" />
+    <Compile Include="Arduino\SerialBlock.cs" />
+    <Compile Include="Arduino\ServoBlock.cs" />
+    <Compile Include="Arduino\SystemBlock.cs" />
+    <Compile Include="Block.cs" />
+    <Compile Include="Blockly.cs" />
+    <Compile Include="BlocklyView.cs" />
+    <Compile Include="Blocks\Colour.cs" />
+    <Compile Include="Blocks\Lists.cs" />
+    <Compile Include="Blocks\Logic.cs" />
+    <Compile Include="Blocks\Loops.cs" />
+    <Compile Include="Blocks\Math.cs" />
+    <Compile Include="Blocks\Procedures.cs" />
+    <Compile Include="Blocks\Text.cs" />
+    <Compile Include="Blocks\Variables.cs" />
+    <Compile Include="Collection.cs" />
+    <Compile Include="Ecnl\CodeGenerator.cs" />
+    <Compile Include="Ecnl\EcnlAPIBlock.cs" />
+    <Compile Include="Ecnl\EcnlTaskBlock.cs" />
+    <Compile Include="Ecnl\EObjectBlock.cs" />
+    <Compile Include="Ecnl\EObjectWorkspace.cs" />
+    <Compile Include="Ecnl\JsonData.cs" />
+    <Compile Include="Ecnl\ValueRange.cs" />
+    <Compile Include="Emscripten.cs" />
+    <Compile Include="EObjectModalView.cs" />
+    <Compile Include="ClassSelectorView.cs" />
+    <Compile Include="MainLoopBlock.cs" />
+    <Compile Include="Generator.cs" />
+    <Compile Include="MrbParser.cs" />
+    <Compile Include="MrbAstNodes.cs" />
+    <Compile Include="Mruby.cs" />
+    <Compile Include="Names.cs" />
+    <Compile Include="Procedures.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="MainMenuView.cs" />
+    <Compile Include="Ruby.cs" />
+    <Compile Include="Ruby\Colour.cs" />
+    <Compile Include="Ruby\Lists.cs" />
+    <Compile Include="Ruby\Logic.cs" />
+    <Compile Include="Ruby\Loops.cs" />
+    <Compile Include="Ruby\Math.cs" />
+    <Compile Include="Ruby\Procedures.cs" />
+    <Compile Include="Ruby\Text.cs" />
+    <Compile Include="Ruby\Variables.cs" />
+    <Compile Include="MrbScanner.cs" />
+    <Compile Include="SwitchCaseBlock.cs" />
+    <Compile Include="Variables.cs" />
+    <Compile Include="XTerm.cs" />
+  </ItemGroup>
+  <PropertyGroup>
+    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
+    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+  </PropertyGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
+  <ProjectExtensions>
+    <VisualStudio>
+      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
+        <WebProjectProperties>
+          <UseIIS>True</UseIIS>
+          <AutoAssignPort>True</AutoAssignPort>
+          <DevelopmentServerPort>49565</DevelopmentServerPort>
+          <DevelopmentServerVPath>/</DevelopmentServerVPath>
+          <IISUrl>http://localhost:49565/</IISUrl>
+          <NTLMAuthentication>False</NTLMAuthentication>
+          <UseCustomServer>False</UseCustomServer>
+          <CustomServerUrl>
+          </CustomServerUrl>
+          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
+        </WebProjectProperties>
+      </FlavorProperties>
+    </VisualStudio>
+  </ProjectExtensions>
+  <Import Project="..\packages\Bridge.Min.15.7.0\build\Bridge.Min.targets" Condition="Exists('..\packages\Bridge.Min.15.7.0\build\Bridge.Min.targets')" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>このプロジェクトは、このコンピューター上にない NuGet パッケージを参照しています。それらのパッケージをダウンロードするには、[NuGet パッケージの復元] を使用します。詳細については、http://go.microsoft.com/fwlink/?LinkID=322105 を参照してください。見つからないファイルは {0} です。</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\packages\Bridge.Min.15.7.0\build\Bridge.Min.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Bridge.Min.15.7.0\build\Bridge.Min.targets'))" />
+  </Target>
+  <PropertyGroup>
+    <PostBuildEvent>cd $(ProjectDir)
+call copy.bat</PostBuildEvent>
+  </PropertyGroup>
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: EcnlProtoTool/trunk/webapp/webmrbc/xterm/AUTHORS
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/xterm/AUTHORS	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/xterm/AUTHORS	(revision 270)
@@ -0,0 +1,19 @@
+List of xterm.js contributors. Updated before every release.
+
+Alexander Olsson <noseglid@gmail.com>
+Antonis Kalipetis <akalipetis@sourcelair.com>
+Austin Robertson <austinrobertson@gmail.com>
+Benjamin Fischer <benjamin.fischer@rwth-aachen.de>
+Carson Anderson <carson@betterservers.com>
+Christopher Jeffrey <chjjeffrey@gmail.com>
+Daniel Imms <daimms@microsoft.com>
+Daniel Risacher <drisacher@gmail.com>
+Dan Kaplun <dbkaplun@twitch.tv>
+Darin Morrison <freebroccolo@users.noreply.github.com>
+Jean Bruenn <himself@jeanbruenn.info>
+J旦rg Breitbart <jerch@rockborn.de>
+Paris Kasidiaris <pariskasidiaris@gmail.com>
+Paris Kasidiaris <paris@sourcelair.com>
+runarberg <runar@greenqloud.com>
+Steven Silvester <steven.silvester@ieee.org>
+Thanasis Daglis <thanasis@sourcelair.com>
Index: EcnlProtoTool/trunk/webapp/webmrbc/xterm/LICENSE
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/xterm/LICENSE	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/xterm/LICENSE	(revision 270)
@@ -0,0 +1,20 @@
+Copyright (c) 2014, sourceLair Limited (https://github.com/sourcelair/)
+Copyright (c) 2012-2013, Christopher Jeffrey (https://github.com/chjj/)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
Index: EcnlProtoTool/trunk/webapp/webmrbc/xterm/README.md
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/xterm/README.md	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/xterm/README.md	(revision 270)
@@ -0,0 +1,76 @@
+# xterm.js
+
+![xterm.js build status](https://api.travis-ci.org/sourcelair/xterm.js.svg)
+
+Xterm.js is a full xterm clone, written in JavaScript.
+
+It is used at [SourceLair](https://www.sourcelair.com/home) to help people develop their applications in their browsers.
+
+Xterm.js supplies a modular, event-based interface that lets developers build addons and themes on top of it.
+
+![xterm.js screenshot](xtermjs.png)
+
+## Browser Support
+
+Since xterm.js is typically implemented as a developer tool, only modern browsers are supported officially. Here is a list of the versions we aim to support: 
+
+- Chrome 48+
+- Edge 13+
+- Firefox 44+
+- Internet Explorer 11+
+- Opera 35+
+- Safari 8+
+
+xterm.js may work on earlier versions of the browsers but these are the browsers we strive to keep working.
+
+## Demo
+
+To launch the demo simply run:
+
+```
+npm install
+npm start
+```
+
+Then open http://0.0.0.0:3000 in a web browser (use http://127.0.0.1:3000 is running under Windows).
+
+## Addons
+
+Addons are JavaScript modules that attach functions to the `Terminal` prototype to extend its functionality. There are a handful available in the main repository in the `addons` directory, you can even write your own (though they may break when the internals of xterm.js change across versions).
+
+To use an addon, just include the JavaScript file after xterm.js and before the `Terminal` object has been instantiated. The function should then be exposed on the `Terminal` object:
+
+```html
+<script src="node_modules/src/xterm.js"></script>
+<script src="node_modules/addons/fit/fit.js"></script>
+```
+
+```js
+var xterm = new Terminal();
+// init code...
+xterm.fit();
+```
+
+## Development and Contribution
+
+To contribute either code, documentation or issues to xterm.js please read the [Contributing document](CONTRIBUTING.md) before.
+
+The development of xterm.js does not require any special tool. All you need is an editor that supports JavaScript and a browser (if you would like to run the demo you will need Node.js to get all features).
+
+It is recommended though to use a development tool that uses xterm.js internally, to develop for xterm.js. [Eating our own dogfood](https://en.wikipedia.org/wiki/Eating_your_own_dog_food) has been proved extremely beneficial for this project. Known tools that use xterm.js internally are:
+
+#### [SourceLair](https://www.sourcelair.com)
+
+Visit https://lair.io/sourcelair/xterm and follow the instructions. All development will happen in your browser.
+
+#### [Visual Studio Code](http://code.visualstudio.com/)
+
+[Download Visual Studio Code](http://code.visualstudio.com/Download), clone xterm.js and you are all set.
+
+## License Agreement
+
+If you contribute code to this project, you are implicitly allowing your code to be distributed under the MIT license. You are also implicitly verifying that all code is your original work.
+
+Copyright (c) 2014-2016, SourceLair, Private Company ([www.sourcelair.com](https://www.sourcelair.com/home)) (MIT License)
+
+Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
Index: EcnlProtoTool/trunk/webapp/webmrbc/xterm/addons/fit/fit.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/xterm/addons/fit/fit.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/xterm/addons/fit/fit.js	(revision 270)
@@ -0,0 +1,86 @@
+/*
+ *  Fit terminal columns and rows to the dimensions of its
+ *  DOM element.
+ *
+ *  Approach:
+ *    - Rows: Truncate the division of the terminal parent element height
+ *            by the terminal row height
+ *
+ *    - Columns: Truncate the division of the terminal parent element width by
+ *               the terminal character width (apply display: inline at the
+ *               terminal row and truncate its width with the current number
+ *               of columns)
+ */
+(function (fit) {
+  if (typeof exports === 'object' && typeof module === 'object') {
+    /*
+     * CommonJS environment
+     */
+    module.exports = fit(require('../../src/xterm'));
+  } else if (typeof define == 'function') {
+    /*
+     * Require.js is available
+     */
+    define(['../../src/xterm'], fit);
+  } else {
+    /*
+     * Plain browser environment
+     */
+    fit(this.Xterm);
+  }
+})(function (Xterm) {
+  /**
+   * This module provides methods for fitting a terminal's size to a parent container.
+   *
+   * @module xterm/addons/fit/fit
+   */
+  var exports = {};
+
+  exports.proposeGeometry = function (term) {
+    var parentElementStyle = window.getComputedStyle(term.element.parentElement),
+        parentElementHeight = parseInt(parentElementStyle.getPropertyValue('height')),
+        parentElementWidth = parseInt(parentElementStyle.getPropertyValue('width')),
+        elementStyle = window.getComputedStyle(term.element),
+        elementPaddingVer = parseInt(elementStyle.getPropertyValue('padding-top')) + parseInt(elementStyle.getPropertyValue('padding-bottom')),
+        elementPaddingHor = parseInt(elementStyle.getPropertyValue('padding-right')) + parseInt(elementStyle.getPropertyValue('padding-left')),
+        availableHeight = parentElementHeight - elementPaddingVer,
+        availableWidth = parentElementWidth - elementPaddingHor,
+        container = term.rowContainer,
+        subjectRow = term.rowContainer.firstElementChild,
+        contentBuffer = subjectRow.innerHTML,
+        characterHeight,
+        rows,
+        characterWidth,
+        cols,
+        geometry;
+
+    subjectRow.style.display = 'inline';
+    subjectRow.innerHTML = 'W'; // Common character for measuring width, although on monospace
+    characterWidth = subjectRow.getBoundingClientRect().width;
+    subjectRow.style.display = ''; // Revert style before calculating height, since they differ.
+    characterHeight = parseInt(subjectRow.offsetHeight);
+    subjectRow.innerHTML = contentBuffer;
+
+    rows = parseInt(availableHeight / characterHeight);
+    cols = parseInt(availableWidth / characterWidth) - 1;
+
+    geometry = {cols: cols, rows: rows};
+    return geometry;
+  };
+
+  exports.fit = function (term) {
+    var geometry = exports.proposeGeometry(term);
+
+    term.resize(geometry.cols, geometry.rows);
+  };
+
+  Xterm.prototype.proposeGeometry = function () {
+    return exports.proposeGeometry(this);
+  };
+
+  Xterm.prototype.fit = function () {
+    return exports.fit(this);
+  };
+
+  return exports;
+});
Index: EcnlProtoTool/trunk/webapp/webmrbc/xterm/src/xterm.css
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/xterm/src/xterm.css	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/xterm/src/xterm.css	(revision 270)
@@ -0,0 +1,2179 @@
+/**
+ * xterm.js: xterm, in the browser
+ * Copyright (c) 2014, sourceLair Limited (www.sourcelair.com (MIT License)
+ * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
+ * https://github.com/chjj/term.js
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * Originally forked from (with the author's permission):
+ *   Fabrice Bellard's javascript vt100 for jslinux:
+ *   http://bellard.org/jslinux/
+ *   Copyright (c) 2011 Fabrice Bellard
+ *   The original design remains. The terminal itself
+ *   has been extended to include xterm CSI codes, among
+ *   other features.
+ */
+
+/*
+ *  Default style for xterm.js
+ */
+
+.terminal {
+    background-color: #000;
+    color: #fff;
+    font-family: courier-new, courier, monospace;
+    font-feature-settings: "liga" 0;
+    position: relative;
+}
+
+.terminal.focus {
+    outline: none;
+}
+
+.terminal .xterm-helpers {
+    position: absolute;
+    top: 0;
+}
+
+.terminal .xterm-helper-textarea {
+    position: absolute;
+    /*
+     * HACK: to fix IE's blinking cursor
+     * Move textarea out of the screen to the far left, so that the cursor is not visible.
+     */
+    left: -9999em;
+    opacity: 0;
+    width: 0;
+    height: 0;
+    z-index: -10;
+}
+
+.terminal .terminal-cursor {
+    background-color: #fff;
+    color: #000;
+}
+
+.terminal:not(.focus) .terminal-cursor {
+    outline: 1px solid #fff;
+    outline-offset: -1px;
+    background-color: transparent;
+}
+
+.terminal.focus .terminal-cursor.blinking {
+    animation: blink-cursor 1.2s infinite step-end;
+}
+
+@keyframes blink-cursor {
+    0% {
+        background-color: #fff;
+        color: #000;
+    }
+    50% {
+        background-color: transparent;
+        color: #FFF;
+    }
+}
+
+.terminal .composition-view {
+    background: #000;
+    color: #FFF;
+    display: none;
+    position: absolute;
+    white-space: nowrap;
+}
+
+.terminal .composition-view.active {
+    display: block;
+}
+
+/*
+ *  Determine default colors for xterm.js
+ */
+.terminal .xterm-bold {
+    font-weight: bold;
+}
+
+.terminal .xterm-underline {
+    text-decoration: underline;
+}
+
+.terminal .xterm-blink {
+    text-decoration: blink;
+}
+
+.terminal .xterm-hidden {
+    visibility: hidden;
+}
+
+.terminal .xterm-color-0 {
+    color: #2e3436;
+}
+
+.terminal .xterm-bg-color-0 {
+    background-color: #2e3436;
+}
+
+.terminal .xterm-color-1 {
+    color: #cc0000;
+}
+
+.terminal .xterm-bg-color-1 {
+    background-color: #cc0000;
+}
+
+.terminal .xterm-color-2 {
+    color: #4e9a06;
+}
+
+.terminal .xterm-bg-color-2 {
+    background-color: #4e9a06;
+}
+
+.terminal .xterm-color-3 {
+    color: #c4a000;
+}
+
+.terminal .xterm-bg-color-3 {
+    background-color: #c4a000;
+}
+
+.terminal .xterm-color-4 {
+    color: #3465a4;
+}
+
+.terminal .xterm-bg-color-4 {
+    background-color: #3465a4;
+}
+
+.terminal .xterm-color-5 {
+    color: #75507b;
+}
+
+.terminal .xterm-bg-color-5 {
+    background-color: #75507b;
+}
+
+.terminal .xterm-color-6 {
+    color: #06989a;
+}
+
+.terminal .xterm-bg-color-6 {
+    background-color: #06989a;
+}
+
+.terminal .xterm-color-7 {
+    color: #d3d7cf;
+}
+
+.terminal .xterm-bg-color-7 {
+    background-color: #d3d7cf;
+}
+
+.terminal .xterm-color-8 {
+    color: #555753;
+}
+
+.terminal .xterm-bg-color-8 {
+    background-color: #555753;
+}
+
+.terminal .xterm-color-9 {
+    color: #ef2929;
+}
+
+.terminal .xterm-bg-color-9 {
+    background-color: #ef2929;
+}
+
+.terminal .xterm-color-10 {
+    color: #8ae234;
+}
+
+.terminal .xterm-bg-color-10 {
+    background-color: #8ae234;
+}
+
+.terminal .xterm-color-11 {
+    color: #fce94f;
+}
+
+.terminal .xterm-bg-color-11 {
+    background-color: #fce94f;
+}
+
+.terminal .xterm-color-12 {
+    color: #729fcf;
+}
+
+.terminal .xterm-bg-color-12 {
+    background-color: #729fcf;
+}
+
+.terminal .xterm-color-13 {
+    color: #ad7fa8;
+}
+
+.terminal .xterm-bg-color-13 {
+    background-color: #ad7fa8;
+}
+
+.terminal .xterm-color-14 {
+    color: #34e2e2;
+}
+
+.terminal .xterm-bg-color-14 {
+    background-color: #34e2e2;
+}
+
+.terminal .xterm-color-15 {
+    color: #eeeeec;
+}
+
+.terminal .xterm-bg-color-15 {
+    background-color: #eeeeec;
+}
+
+.terminal .xterm-color-16 {
+    color: #000000;
+}
+
+.terminal .xterm-bg-color-16 {
+    background-color: #000000;
+}
+
+.terminal .xterm-color-17 {
+    color: #00005f;
+}
+
+.terminal .xterm-bg-color-17 {
+    background-color: #00005f;
+}
+
+.terminal .xterm-color-18 {
+    color: #000087;
+}
+
+.terminal .xterm-bg-color-18 {
+    background-color: #000087;
+}
+
+.terminal .xterm-color-19 {
+    color: #0000af;
+}
+
+.terminal .xterm-bg-color-19 {
+    background-color: #0000af;
+}
+
+.terminal .xterm-color-20 {
+    color: #0000d7;
+}
+
+.terminal .xterm-bg-color-20 {
+    background-color: #0000d7;
+}
+
+.terminal .xterm-color-21 {
+    color: #0000ff;
+}
+
+.terminal .xterm-bg-color-21 {
+    background-color: #0000ff;
+}
+
+.terminal .xterm-color-22 {
+    color: #005f00;
+}
+
+.terminal .xterm-bg-color-22 {
+    background-color: #005f00;
+}
+
+.terminal .xterm-color-23 {
+    color: #005f5f;
+}
+
+.terminal .xterm-bg-color-23 {
+    background-color: #005f5f;
+}
+
+.terminal .xterm-color-24 {
+    color: #005f87;
+}
+
+.terminal .xterm-bg-color-24 {
+    background-color: #005f87;
+}
+
+.terminal .xterm-color-25 {
+    color: #005faf;
+}
+
+.terminal .xterm-bg-color-25 {
+    background-color: #005faf;
+}
+
+.terminal .xterm-color-26 {
+    color: #005fd7;
+}
+
+.terminal .xterm-bg-color-26 {
+    background-color: #005fd7;
+}
+
+.terminal .xterm-color-27 {
+    color: #005fff;
+}
+
+.terminal .xterm-bg-color-27 {
+    background-color: #005fff;
+}
+
+.terminal .xterm-color-28 {
+    color: #008700;
+}
+
+.terminal .xterm-bg-color-28 {
+    background-color: #008700;
+}
+
+.terminal .xterm-color-29 {
+    color: #00875f;
+}
+
+.terminal .xterm-bg-color-29 {
+    background-color: #00875f;
+}
+
+.terminal .xterm-color-30 {
+    color: #008787;
+}
+
+.terminal .xterm-bg-color-30 {
+    background-color: #008787;
+}
+
+.terminal .xterm-color-31 {
+    color: #0087af;
+}
+
+.terminal .xterm-bg-color-31 {
+    background-color: #0087af;
+}
+
+.terminal .xterm-color-32 {
+    color: #0087d7;
+}
+
+.terminal .xterm-bg-color-32 {
+    background-color: #0087d7;
+}
+
+.terminal .xterm-color-33 {
+    color: #0087ff;
+}
+
+.terminal .xterm-bg-color-33 {
+    background-color: #0087ff;
+}
+
+.terminal .xterm-color-34 {
+    color: #00af00;
+}
+
+.terminal .xterm-bg-color-34 {
+    background-color: #00af00;
+}
+
+.terminal .xterm-color-35 {
+    color: #00af5f;
+}
+
+.terminal .xterm-bg-color-35 {
+    background-color: #00af5f;
+}
+
+.terminal .xterm-color-36 {
+    color: #00af87;
+}
+
+.terminal .xterm-bg-color-36 {
+    background-color: #00af87;
+}
+
+.terminal .xterm-color-37 {
+    color: #00afaf;
+}
+
+.terminal .xterm-bg-color-37 {
+    background-color: #00afaf;
+}
+
+.terminal .xterm-color-38 {
+    color: #00afd7;
+}
+
+.terminal .xterm-bg-color-38 {
+    background-color: #00afd7;
+}
+
+.terminal .xterm-color-39 {
+    color: #00afff;
+}
+
+.terminal .xterm-bg-color-39 {
+    background-color: #00afff;
+}
+
+.terminal .xterm-color-40 {
+    color: #00d700;
+}
+
+.terminal .xterm-bg-color-40 {
+    background-color: #00d700;
+}
+
+.terminal .xterm-color-41 {
+    color: #00d75f;
+}
+
+.terminal .xterm-bg-color-41 {
+    background-color: #00d75f;
+}
+
+.terminal .xterm-color-42 {
+    color: #00d787;
+}
+
+.terminal .xterm-bg-color-42 {
+    background-color: #00d787;
+}
+
+.terminal .xterm-color-43 {
+    color: #00d7af;
+}
+
+.terminal .xterm-bg-color-43 {
+    background-color: #00d7af;
+}
+
+.terminal .xterm-color-44 {
+    color: #00d7d7;
+}
+
+.terminal .xterm-bg-color-44 {
+    background-color: #00d7d7;
+}
+
+.terminal .xterm-color-45 {
+    color: #00d7ff;
+}
+
+.terminal .xterm-bg-color-45 {
+    background-color: #00d7ff;
+}
+
+.terminal .xterm-color-46 {
+    color: #00ff00;
+}
+
+.terminal .xterm-bg-color-46 {
+    background-color: #00ff00;
+}
+
+.terminal .xterm-color-47 {
+    color: #00ff5f;
+}
+
+.terminal .xterm-bg-color-47 {
+    background-color: #00ff5f;
+}
+
+.terminal .xterm-color-48 {
+    color: #00ff87;
+}
+
+.terminal .xterm-bg-color-48 {
+    background-color: #00ff87;
+}
+
+.terminal .xterm-color-49 {
+    color: #00ffaf;
+}
+
+.terminal .xterm-bg-color-49 {
+    background-color: #00ffaf;
+}
+
+.terminal .xterm-color-50 {
+    color: #00ffd7;
+}
+
+.terminal .xterm-bg-color-50 {
+    background-color: #00ffd7;
+}
+
+.terminal .xterm-color-51 {
+    color: #00ffff;
+}
+
+.terminal .xterm-bg-color-51 {
+    background-color: #00ffff;
+}
+
+.terminal .xterm-color-52 {
+    color: #5f0000;
+}
+
+.terminal .xterm-bg-color-52 {
+    background-color: #5f0000;
+}
+
+.terminal .xterm-color-53 {
+    color: #5f005f;
+}
+
+.terminal .xterm-bg-color-53 {
+    background-color: #5f005f;
+}
+
+.terminal .xterm-color-54 {
+    color: #5f0087;
+}
+
+.terminal .xterm-bg-color-54 {
+    background-color: #5f0087;
+}
+
+.terminal .xterm-color-55 {
+    color: #5f00af;
+}
+
+.terminal .xterm-bg-color-55 {
+    background-color: #5f00af;
+}
+
+.terminal .xterm-color-56 {
+    color: #5f00d7;
+}
+
+.terminal .xterm-bg-color-56 {
+    background-color: #5f00d7;
+}
+
+.terminal .xterm-color-57 {
+    color: #5f00ff;
+}
+
+.terminal .xterm-bg-color-57 {
+    background-color: #5f00ff;
+}
+
+.terminal .xterm-color-58 {
+    color: #5f5f00;
+}
+
+.terminal .xterm-bg-color-58 {
+    background-color: #5f5f00;
+}
+
+.terminal .xterm-color-59 {
+    color: #5f5f5f;
+}
+
+.terminal .xterm-bg-color-59 {
+    background-color: #5f5f5f;
+}
+
+.terminal .xterm-color-60 {
+    color: #5f5f87;
+}
+
+.terminal .xterm-bg-color-60 {
+    background-color: #5f5f87;
+}
+
+.terminal .xterm-color-61 {
+    color: #5f5faf;
+}
+
+.terminal .xterm-bg-color-61 {
+    background-color: #5f5faf;
+}
+
+.terminal .xterm-color-62 {
+    color: #5f5fd7;
+}
+
+.terminal .xterm-bg-color-62 {
+    background-color: #5f5fd7;
+}
+
+.terminal .xterm-color-63 {
+    color: #5f5fff;
+}
+
+.terminal .xterm-bg-color-63 {
+    background-color: #5f5fff;
+}
+
+.terminal .xterm-color-64 {
+    color: #5f8700;
+}
+
+.terminal .xterm-bg-color-64 {
+    background-color: #5f8700;
+}
+
+.terminal .xterm-color-65 {
+    color: #5f875f;
+}
+
+.terminal .xterm-bg-color-65 {
+    background-color: #5f875f;
+}
+
+.terminal .xterm-color-66 {
+    color: #5f8787;
+}
+
+.terminal .xterm-bg-color-66 {
+    background-color: #5f8787;
+}
+
+.terminal .xterm-color-67 {
+    color: #5f87af;
+}
+
+.terminal .xterm-bg-color-67 {
+    background-color: #5f87af;
+}
+
+.terminal .xterm-color-68 {
+    color: #5f87d7;
+}
+
+.terminal .xterm-bg-color-68 {
+    background-color: #5f87d7;
+}
+
+.terminal .xterm-color-69 {
+    color: #5f87ff;
+}
+
+.terminal .xterm-bg-color-69 {
+    background-color: #5f87ff;
+}
+
+.terminal .xterm-color-70 {
+    color: #5faf00;
+}
+
+.terminal .xterm-bg-color-70 {
+    background-color: #5faf00;
+}
+
+.terminal .xterm-color-71 {
+    color: #5faf5f;
+}
+
+.terminal .xterm-bg-color-71 {
+    background-color: #5faf5f;
+}
+
+.terminal .xterm-color-72 {
+    color: #5faf87;
+}
+
+.terminal .xterm-bg-color-72 {
+    background-color: #5faf87;
+}
+
+.terminal .xterm-color-73 {
+    color: #5fafaf;
+}
+
+.terminal .xterm-bg-color-73 {
+    background-color: #5fafaf;
+}
+
+.terminal .xterm-color-74 {
+    color: #5fafd7;
+}
+
+.terminal .xterm-bg-color-74 {
+    background-color: #5fafd7;
+}
+
+.terminal .xterm-color-75 {
+    color: #5fafff;
+}
+
+.terminal .xterm-bg-color-75 {
+    background-color: #5fafff;
+}
+
+.terminal .xterm-color-76 {
+    color: #5fd700;
+}
+
+.terminal .xterm-bg-color-76 {
+    background-color: #5fd700;
+}
+
+.terminal .xterm-color-77 {
+    color: #5fd75f;
+}
+
+.terminal .xterm-bg-color-77 {
+    background-color: #5fd75f;
+}
+
+.terminal .xterm-color-78 {
+    color: #5fd787;
+}
+
+.terminal .xterm-bg-color-78 {
+    background-color: #5fd787;
+}
+
+.terminal .xterm-color-79 {
+    color: #5fd7af;
+}
+
+.terminal .xterm-bg-color-79 {
+    background-color: #5fd7af;
+}
+
+.terminal .xterm-color-80 {
+    color: #5fd7d7;
+}
+
+.terminal .xterm-bg-color-80 {
+    background-color: #5fd7d7;
+}
+
+.terminal .xterm-color-81 {
+    color: #5fd7ff;
+}
+
+.terminal .xterm-bg-color-81 {
+    background-color: #5fd7ff;
+}
+
+.terminal .xterm-color-82 {
+    color: #5fff00;
+}
+
+.terminal .xterm-bg-color-82 {
+    background-color: #5fff00;
+}
+
+.terminal .xterm-color-83 {
+    color: #5fff5f;
+}
+
+.terminal .xterm-bg-color-83 {
+    background-color: #5fff5f;
+}
+
+.terminal .xterm-color-84 {
+    color: #5fff87;
+}
+
+.terminal .xterm-bg-color-84 {
+    background-color: #5fff87;
+}
+
+.terminal .xterm-color-85 {
+    color: #5fffaf;
+}
+
+.terminal .xterm-bg-color-85 {
+    background-color: #5fffaf;
+}
+
+.terminal .xterm-color-86 {
+    color: #5fffd7;
+}
+
+.terminal .xterm-bg-color-86 {
+    background-color: #5fffd7;
+}
+
+.terminal .xterm-color-87 {
+    color: #5fffff;
+}
+
+.terminal .xterm-bg-color-87 {
+    background-color: #5fffff;
+}
+
+.terminal .xterm-color-88 {
+    color: #870000;
+}
+
+.terminal .xterm-bg-color-88 {
+    background-color: #870000;
+}
+
+.terminal .xterm-color-89 {
+    color: #87005f;
+}
+
+.terminal .xterm-bg-color-89 {
+    background-color: #87005f;
+}
+
+.terminal .xterm-color-90 {
+    color: #870087;
+}
+
+.terminal .xterm-bg-color-90 {
+    background-color: #870087;
+}
+
+.terminal .xterm-color-91 {
+    color: #8700af;
+}
+
+.terminal .xterm-bg-color-91 {
+    background-color: #8700af;
+}
+
+.terminal .xterm-color-92 {
+    color: #8700d7;
+}
+
+.terminal .xterm-bg-color-92 {
+    background-color: #8700d7;
+}
+
+.terminal .xterm-color-93 {
+    color: #8700ff;
+}
+
+.terminal .xterm-bg-color-93 {
+    background-color: #8700ff;
+}
+
+.terminal .xterm-color-94 {
+    color: #875f00;
+}
+
+.terminal .xterm-bg-color-94 {
+    background-color: #875f00;
+}
+
+.terminal .xterm-color-95 {
+    color: #875f5f;
+}
+
+.terminal .xterm-bg-color-95 {
+    background-color: #875f5f;
+}
+
+.terminal .xterm-color-96 {
+    color: #875f87;
+}
+
+.terminal .xterm-bg-color-96 {
+    background-color: #875f87;
+}
+
+.terminal .xterm-color-97 {
+    color: #875faf;
+}
+
+.terminal .xterm-bg-color-97 {
+    background-color: #875faf;
+}
+
+.terminal .xterm-color-98 {
+    color: #875fd7;
+}
+
+.terminal .xterm-bg-color-98 {
+    background-color: #875fd7;
+}
+
+.terminal .xterm-color-99 {
+    color: #875fff;
+}
+
+.terminal .xterm-bg-color-99 {
+    background-color: #875fff;
+}
+
+.terminal .xterm-color-100 {
+    color: #878700;
+}
+
+.terminal .xterm-bg-color-100 {
+    background-color: #878700;
+}
+
+.terminal .xterm-color-101 {
+    color: #87875f;
+}
+
+.terminal .xterm-bg-color-101 {
+    background-color: #87875f;
+}
+
+.terminal .xterm-color-102 {
+    color: #878787;
+}
+
+.terminal .xterm-bg-color-102 {
+    background-color: #878787;
+}
+
+.terminal .xterm-color-103 {
+    color: #8787af;
+}
+
+.terminal .xterm-bg-color-103 {
+    background-color: #8787af;
+}
+
+.terminal .xterm-color-104 {
+    color: #8787d7;
+}
+
+.terminal .xterm-bg-color-104 {
+    background-color: #8787d7;
+}
+
+.terminal .xterm-color-105 {
+    color: #8787ff;
+}
+
+.terminal .xterm-bg-color-105 {
+    background-color: #8787ff;
+}
+
+.terminal .xterm-color-106 {
+    color: #87af00;
+}
+
+.terminal .xterm-bg-color-106 {
+    background-color: #87af00;
+}
+
+.terminal .xterm-color-107 {
+    color: #87af5f;
+}
+
+.terminal .xterm-bg-color-107 {
+    background-color: #87af5f;
+}
+
+.terminal .xterm-color-108 {
+    color: #87af87;
+}
+
+.terminal .xterm-bg-color-108 {
+    background-color: #87af87;
+}
+
+.terminal .xterm-color-109 {
+    color: #87afaf;
+}
+
+.terminal .xterm-bg-color-109 {
+    background-color: #87afaf;
+}
+
+.terminal .xterm-color-110 {
+    color: #87afd7;
+}
+
+.terminal .xterm-bg-color-110 {
+    background-color: #87afd7;
+}
+
+.terminal .xterm-color-111 {
+    color: #87afff;
+}
+
+.terminal .xterm-bg-color-111 {
+    background-color: #87afff;
+}
+
+.terminal .xterm-color-112 {
+    color: #87d700;
+}
+
+.terminal .xterm-bg-color-112 {
+    background-color: #87d700;
+}
+
+.terminal .xterm-color-113 {
+    color: #87d75f;
+}
+
+.terminal .xterm-bg-color-113 {
+    background-color: #87d75f;
+}
+
+.terminal .xterm-color-114 {
+    color: #87d787;
+}
+
+.terminal .xterm-bg-color-114 {
+    background-color: #87d787;
+}
+
+.terminal .xterm-color-115 {
+    color: #87d7af;
+}
+
+.terminal .xterm-bg-color-115 {
+    background-color: #87d7af;
+}
+
+.terminal .xterm-color-116 {
+    color: #87d7d7;
+}
+
+.terminal .xterm-bg-color-116 {
+    background-color: #87d7d7;
+}
+
+.terminal .xterm-color-117 {
+    color: #87d7ff;
+}
+
+.terminal .xterm-bg-color-117 {
+    background-color: #87d7ff;
+}
+
+.terminal .xterm-color-118 {
+    color: #87ff00;
+}
+
+.terminal .xterm-bg-color-118 {
+    background-color: #87ff00;
+}
+
+.terminal .xterm-color-119 {
+    color: #87ff5f;
+}
+
+.terminal .xterm-bg-color-119 {
+    background-color: #87ff5f;
+}
+
+.terminal .xterm-color-120 {
+    color: #87ff87;
+}
+
+.terminal .xterm-bg-color-120 {
+    background-color: #87ff87;
+}
+
+.terminal .xterm-color-121 {
+    color: #87ffaf;
+}
+
+.terminal .xterm-bg-color-121 {
+    background-color: #87ffaf;
+}
+
+.terminal .xterm-color-122 {
+    color: #87ffd7;
+}
+
+.terminal .xterm-bg-color-122 {
+    background-color: #87ffd7;
+}
+
+.terminal .xterm-color-123 {
+    color: #87ffff;
+}
+
+.terminal .xterm-bg-color-123 {
+    background-color: #87ffff;
+}
+
+.terminal .xterm-color-124 {
+    color: #af0000;
+}
+
+.terminal .xterm-bg-color-124 {
+    background-color: #af0000;
+}
+
+.terminal .xterm-color-125 {
+    color: #af005f;
+}
+
+.terminal .xterm-bg-color-125 {
+    background-color: #af005f;
+}
+
+.terminal .xterm-color-126 {
+    color: #af0087;
+}
+
+.terminal .xterm-bg-color-126 {
+    background-color: #af0087;
+}
+
+.terminal .xterm-color-127 {
+    color: #af00af;
+}
+
+.terminal .xterm-bg-color-127 {
+    background-color: #af00af;
+}
+
+.terminal .xterm-color-128 {
+    color: #af00d7;
+}
+
+.terminal .xterm-bg-color-128 {
+    background-color: #af00d7;
+}
+
+.terminal .xterm-color-129 {
+    color: #af00ff;
+}
+
+.terminal .xterm-bg-color-129 {
+    background-color: #af00ff;
+}
+
+.terminal .xterm-color-130 {
+    color: #af5f00;
+}
+
+.terminal .xterm-bg-color-130 {
+    background-color: #af5f00;
+}
+
+.terminal .xterm-color-131 {
+    color: #af5f5f;
+}
+
+.terminal .xterm-bg-color-131 {
+    background-color: #af5f5f;
+}
+
+.terminal .xterm-color-132 {
+    color: #af5f87;
+}
+
+.terminal .xterm-bg-color-132 {
+    background-color: #af5f87;
+}
+
+.terminal .xterm-color-133 {
+    color: #af5faf;
+}
+
+.terminal .xterm-bg-color-133 {
+    background-color: #af5faf;
+}
+
+.terminal .xterm-color-134 {
+    color: #af5fd7;
+}
+
+.terminal .xterm-bg-color-134 {
+    background-color: #af5fd7;
+}
+
+.terminal .xterm-color-135 {
+    color: #af5fff;
+}
+
+.terminal .xterm-bg-color-135 {
+    background-color: #af5fff;
+}
+
+.terminal .xterm-color-136 {
+    color: #af8700;
+}
+
+.terminal .xterm-bg-color-136 {
+    background-color: #af8700;
+}
+
+.terminal .xterm-color-137 {
+    color: #af875f;
+}
+
+.terminal .xterm-bg-color-137 {
+    background-color: #af875f;
+}
+
+.terminal .xterm-color-138 {
+    color: #af8787;
+}
+
+.terminal .xterm-bg-color-138 {
+    background-color: #af8787;
+}
+
+.terminal .xterm-color-139 {
+    color: #af87af;
+}
+
+.terminal .xterm-bg-color-139 {
+    background-color: #af87af;
+}
+
+.terminal .xterm-color-140 {
+    color: #af87d7;
+}
+
+.terminal .xterm-bg-color-140 {
+    background-color: #af87d7;
+}
+
+.terminal .xterm-color-141 {
+    color: #af87ff;
+}
+
+.terminal .xterm-bg-color-141 {
+    background-color: #af87ff;
+}
+
+.terminal .xterm-color-142 {
+    color: #afaf00;
+}
+
+.terminal .xterm-bg-color-142 {
+    background-color: #afaf00;
+}
+
+.terminal .xterm-color-143 {
+    color: #afaf5f;
+}
+
+.terminal .xterm-bg-color-143 {
+    background-color: #afaf5f;
+}
+
+.terminal .xterm-color-144 {
+    color: #afaf87;
+}
+
+.terminal .xterm-bg-color-144 {
+    background-color: #afaf87;
+}
+
+.terminal .xterm-color-145 {
+    color: #afafaf;
+}
+
+.terminal .xterm-bg-color-145 {
+    background-color: #afafaf;
+}
+
+.terminal .xterm-color-146 {
+    color: #afafd7;
+}
+
+.terminal .xterm-bg-color-146 {
+    background-color: #afafd7;
+}
+
+.terminal .xterm-color-147 {
+    color: #afafff;
+}
+
+.terminal .xterm-bg-color-147 {
+    background-color: #afafff;
+}
+
+.terminal .xterm-color-148 {
+    color: #afd700;
+}
+
+.terminal .xterm-bg-color-148 {
+    background-color: #afd700;
+}
+
+.terminal .xterm-color-149 {
+    color: #afd75f;
+}
+
+.terminal .xterm-bg-color-149 {
+    background-color: #afd75f;
+}
+
+.terminal .xterm-color-150 {
+    color: #afd787;
+}
+
+.terminal .xterm-bg-color-150 {
+    background-color: #afd787;
+}
+
+.terminal .xterm-color-151 {
+    color: #afd7af;
+}
+
+.terminal .xterm-bg-color-151 {
+    background-color: #afd7af;
+}
+
+.terminal .xterm-color-152 {
+    color: #afd7d7;
+}
+
+.terminal .xterm-bg-color-152 {
+    background-color: #afd7d7;
+}
+
+.terminal .xterm-color-153 {
+    color: #afd7ff;
+}
+
+.terminal .xterm-bg-color-153 {
+    background-color: #afd7ff;
+}
+
+.terminal .xterm-color-154 {
+    color: #afff00;
+}
+
+.terminal .xterm-bg-color-154 {
+    background-color: #afff00;
+}
+
+.terminal .xterm-color-155 {
+    color: #afff5f;
+}
+
+.terminal .xterm-bg-color-155 {
+    background-color: #afff5f;
+}
+
+.terminal .xterm-color-156 {
+    color: #afff87;
+}
+
+.terminal .xterm-bg-color-156 {
+    background-color: #afff87;
+}
+
+.terminal .xterm-color-157 {
+    color: #afffaf;
+}
+
+.terminal .xterm-bg-color-157 {
+    background-color: #afffaf;
+}
+
+.terminal .xterm-color-158 {
+    color: #afffd7;
+}
+
+.terminal .xterm-bg-color-158 {
+    background-color: #afffd7;
+}
+
+.terminal .xterm-color-159 {
+    color: #afffff;
+}
+
+.terminal .xterm-bg-color-159 {
+    background-color: #afffff;
+}
+
+.terminal .xterm-color-160 {
+    color: #d70000;
+}
+
+.terminal .xterm-bg-color-160 {
+    background-color: #d70000;
+}
+
+.terminal .xterm-color-161 {
+    color: #d7005f;
+}
+
+.terminal .xterm-bg-color-161 {
+    background-color: #d7005f;
+}
+
+.terminal .xterm-color-162 {
+    color: #d70087;
+}
+
+.terminal .xterm-bg-color-162 {
+    background-color: #d70087;
+}
+
+.terminal .xterm-color-163 {
+    color: #d700af;
+}
+
+.terminal .xterm-bg-color-163 {
+    background-color: #d700af;
+}
+
+.terminal .xterm-color-164 {
+    color: #d700d7;
+}
+
+.terminal .xterm-bg-color-164 {
+    background-color: #d700d7;
+}
+
+.terminal .xterm-color-165 {
+    color: #d700ff;
+}
+
+.terminal .xterm-bg-color-165 {
+    background-color: #d700ff;
+}
+
+.terminal .xterm-color-166 {
+    color: #d75f00;
+}
+
+.terminal .xterm-bg-color-166 {
+    background-color: #d75f00;
+}
+
+.terminal .xterm-color-167 {
+    color: #d75f5f;
+}
+
+.terminal .xterm-bg-color-167 {
+    background-color: #d75f5f;
+}
+
+.terminal .xterm-color-168 {
+    color: #d75f87;
+}
+
+.terminal .xterm-bg-color-168 {
+    background-color: #d75f87;
+}
+
+.terminal .xterm-color-169 {
+    color: #d75faf;
+}
+
+.terminal .xterm-bg-color-169 {
+    background-color: #d75faf;
+}
+
+.terminal .xterm-color-170 {
+    color: #d75fd7;
+}
+
+.terminal .xterm-bg-color-170 {
+    background-color: #d75fd7;
+}
+
+.terminal .xterm-color-171 {
+    color: #d75fff;
+}
+
+.terminal .xterm-bg-color-171 {
+    background-color: #d75fff;
+}
+
+.terminal .xterm-color-172 {
+    color: #d78700;
+}
+
+.terminal .xterm-bg-color-172 {
+    background-color: #d78700;
+}
+
+.terminal .xterm-color-173 {
+    color: #d7875f;
+}
+
+.terminal .xterm-bg-color-173 {
+    background-color: #d7875f;
+}
+
+.terminal .xterm-color-174 {
+    color: #d78787;
+}
+
+.terminal .xterm-bg-color-174 {
+    background-color: #d78787;
+}
+
+.terminal .xterm-color-175 {
+    color: #d787af;
+}
+
+.terminal .xterm-bg-color-175 {
+    background-color: #d787af;
+}
+
+.terminal .xterm-color-176 {
+    color: #d787d7;
+}
+
+.terminal .xterm-bg-color-176 {
+    background-color: #d787d7;
+}
+
+.terminal .xterm-color-177 {
+    color: #d787ff;
+}
+
+.terminal .xterm-bg-color-177 {
+    background-color: #d787ff;
+}
+
+.terminal .xterm-color-178 {
+    color: #d7af00;
+}
+
+.terminal .xterm-bg-color-178 {
+    background-color: #d7af00;
+}
+
+.terminal .xterm-color-179 {
+    color: #d7af5f;
+}
+
+.terminal .xterm-bg-color-179 {
+    background-color: #d7af5f;
+}
+
+.terminal .xterm-color-180 {
+    color: #d7af87;
+}
+
+.terminal .xterm-bg-color-180 {
+    background-color: #d7af87;
+}
+
+.terminal .xterm-color-181 {
+    color: #d7afaf;
+}
+
+.terminal .xterm-bg-color-181 {
+    background-color: #d7afaf;
+}
+
+.terminal .xterm-color-182 {
+    color: #d7afd7;
+}
+
+.terminal .xterm-bg-color-182 {
+    background-color: #d7afd7;
+}
+
+.terminal .xterm-color-183 {
+    color: #d7afff;
+}
+
+.terminal .xterm-bg-color-183 {
+    background-color: #d7afff;
+}
+
+.terminal .xterm-color-184 {
+    color: #d7d700;
+}
+
+.terminal .xterm-bg-color-184 {
+    background-color: #d7d700;
+}
+
+.terminal .xterm-color-185 {
+    color: #d7d75f;
+}
+
+.terminal .xterm-bg-color-185 {
+    background-color: #d7d75f;
+}
+
+.terminal .xterm-color-186 {
+    color: #d7d787;
+}
+
+.terminal .xterm-bg-color-186 {
+    background-color: #d7d787;
+}
+
+.terminal .xterm-color-187 {
+    color: #d7d7af;
+}
+
+.terminal .xterm-bg-color-187 {
+    background-color: #d7d7af;
+}
+
+.terminal .xterm-color-188 {
+    color: #d7d7d7;
+}
+
+.terminal .xterm-bg-color-188 {
+    background-color: #d7d7d7;
+}
+
+.terminal .xterm-color-189 {
+    color: #d7d7ff;
+}
+
+.terminal .xterm-bg-color-189 {
+    background-color: #d7d7ff;
+}
+
+.terminal .xterm-color-190 {
+    color: #d7ff00;
+}
+
+.terminal .xterm-bg-color-190 {
+    background-color: #d7ff00;
+}
+
+.terminal .xterm-color-191 {
+    color: #d7ff5f;
+}
+
+.terminal .xterm-bg-color-191 {
+    background-color: #d7ff5f;
+}
+
+.terminal .xterm-color-192 {
+    color: #d7ff87;
+}
+
+.terminal .xterm-bg-color-192 {
+    background-color: #d7ff87;
+}
+
+.terminal .xterm-color-193 {
+    color: #d7ffaf;
+}
+
+.terminal .xterm-bg-color-193 {
+    background-color: #d7ffaf;
+}
+
+.terminal .xterm-color-194 {
+    color: #d7ffd7;
+}
+
+.terminal .xterm-bg-color-194 {
+    background-color: #d7ffd7;
+}
+
+.terminal .xterm-color-195 {
+    color: #d7ffff;
+}
+
+.terminal .xterm-bg-color-195 {
+    background-color: #d7ffff;
+}
+
+.terminal .xterm-color-196 {
+    color: #ff0000;
+}
+
+.terminal .xterm-bg-color-196 {
+    background-color: #ff0000;
+}
+
+.terminal .xterm-color-197 {
+    color: #ff005f;
+}
+
+.terminal .xterm-bg-color-197 {
+    background-color: #ff005f;
+}
+
+.terminal .xterm-color-198 {
+    color: #ff0087;
+}
+
+.terminal .xterm-bg-color-198 {
+    background-color: #ff0087;
+}
+
+.terminal .xterm-color-199 {
+    color: #ff00af;
+}
+
+.terminal .xterm-bg-color-199 {
+    background-color: #ff00af;
+}
+
+.terminal .xterm-color-200 {
+    color: #ff00d7;
+}
+
+.terminal .xterm-bg-color-200 {
+    background-color: #ff00d7;
+}
+
+.terminal .xterm-color-201 {
+    color: #ff00ff;
+}
+
+.terminal .xterm-bg-color-201 {
+    background-color: #ff00ff;
+}
+
+.terminal .xterm-color-202 {
+    color: #ff5f00;
+}
+
+.terminal .xterm-bg-color-202 {
+    background-color: #ff5f00;
+}
+
+.terminal .xterm-color-203 {
+    color: #ff5f5f;
+}
+
+.terminal .xterm-bg-color-203 {
+    background-color: #ff5f5f;
+}
+
+.terminal .xterm-color-204 {
+    color: #ff5f87;
+}
+
+.terminal .xterm-bg-color-204 {
+    background-color: #ff5f87;
+}
+
+.terminal .xterm-color-205 {
+    color: #ff5faf;
+}
+
+.terminal .xterm-bg-color-205 {
+    background-color: #ff5faf;
+}
+
+.terminal .xterm-color-206 {
+    color: #ff5fd7;
+}
+
+.terminal .xterm-bg-color-206 {
+    background-color: #ff5fd7;
+}
+
+.terminal .xterm-color-207 {
+    color: #ff5fff;
+}
+
+.terminal .xterm-bg-color-207 {
+    background-color: #ff5fff;
+}
+
+.terminal .xterm-color-208 {
+    color: #ff8700;
+}
+
+.terminal .xterm-bg-color-208 {
+    background-color: #ff8700;
+}
+
+.terminal .xterm-color-209 {
+    color: #ff875f;
+}
+
+.terminal .xterm-bg-color-209 {
+    background-color: #ff875f;
+}
+
+.terminal .xterm-color-210 {
+    color: #ff8787;
+}
+
+.terminal .xterm-bg-color-210 {
+    background-color: #ff8787;
+}
+
+.terminal .xterm-color-211 {
+    color: #ff87af;
+}
+
+.terminal .xterm-bg-color-211 {
+    background-color: #ff87af;
+}
+
+.terminal .xterm-color-212 {
+    color: #ff87d7;
+}
+
+.terminal .xterm-bg-color-212 {
+    background-color: #ff87d7;
+}
+
+.terminal .xterm-color-213 {
+    color: #ff87ff;
+}
+
+.terminal .xterm-bg-color-213 {
+    background-color: #ff87ff;
+}
+
+.terminal .xterm-color-214 {
+    color: #ffaf00;
+}
+
+.terminal .xterm-bg-color-214 {
+    background-color: #ffaf00;
+}
+
+.terminal .xterm-color-215 {
+    color: #ffaf5f;
+}
+
+.terminal .xterm-bg-color-215 {
+    background-color: #ffaf5f;
+}
+
+.terminal .xterm-color-216 {
+    color: #ffaf87;
+}
+
+.terminal .xterm-bg-color-216 {
+    background-color: #ffaf87;
+}
+
+.terminal .xterm-color-217 {
+    color: #ffafaf;
+}
+
+.terminal .xterm-bg-color-217 {
+    background-color: #ffafaf;
+}
+
+.terminal .xterm-color-218 {
+    color: #ffafd7;
+}
+
+.terminal .xterm-bg-color-218 {
+    background-color: #ffafd7;
+}
+
+.terminal .xterm-color-219 {
+    color: #ffafff;
+}
+
+.terminal .xterm-bg-color-219 {
+    background-color: #ffafff;
+}
+
+.terminal .xterm-color-220 {
+    color: #ffd700;
+}
+
+.terminal .xterm-bg-color-220 {
+    background-color: #ffd700;
+}
+
+.terminal .xterm-color-221 {
+    color: #ffd75f;
+}
+
+.terminal .xterm-bg-color-221 {
+    background-color: #ffd75f;
+}
+
+.terminal .xterm-color-222 {
+    color: #ffd787;
+}
+
+.terminal .xterm-bg-color-222 {
+    background-color: #ffd787;
+}
+
+.terminal .xterm-color-223 {
+    color: #ffd7af;
+}
+
+.terminal .xterm-bg-color-223 {
+    background-color: #ffd7af;
+}
+
+.terminal .xterm-color-224 {
+    color: #ffd7d7;
+}
+
+.terminal .xterm-bg-color-224 {
+    background-color: #ffd7d7;
+}
+
+.terminal .xterm-color-225 {
+    color: #ffd7ff;
+}
+
+.terminal .xterm-bg-color-225 {
+    background-color: #ffd7ff;
+}
+
+.terminal .xterm-color-226 {
+    color: #ffff00;
+}
+
+.terminal .xterm-bg-color-226 {
+    background-color: #ffff00;
+}
+
+.terminal .xterm-color-227 {
+    color: #ffff5f;
+}
+
+.terminal .xterm-bg-color-227 {
+    background-color: #ffff5f;
+}
+
+.terminal .xterm-color-228 {
+    color: #ffff87;
+}
+
+.terminal .xterm-bg-color-228 {
+    background-color: #ffff87;
+}
+
+.terminal .xterm-color-229 {
+    color: #ffffaf;
+}
+
+.terminal .xterm-bg-color-229 {
+    background-color: #ffffaf;
+}
+
+.terminal .xterm-color-230 {
+    color: #ffffd7;
+}
+
+.terminal .xterm-bg-color-230 {
+    background-color: #ffffd7;
+}
+
+.terminal .xterm-color-231 {
+    color: #ffffff;
+}
+
+.terminal .xterm-bg-color-231 {
+    background-color: #ffffff;
+}
+
+.terminal .xterm-color-232 {
+    color: #080808;
+}
+
+.terminal .xterm-bg-color-232 {
+    background-color: #080808;
+}
+
+.terminal .xterm-color-233 {
+    color: #121212;
+}
+
+.terminal .xterm-bg-color-233 {
+    background-color: #121212;
+}
+
+.terminal .xterm-color-234 {
+    color: #1c1c1c;
+}
+
+.terminal .xterm-bg-color-234 {
+    background-color: #1c1c1c;
+}
+
+.terminal .xterm-color-235 {
+    color: #262626;
+}
+
+.terminal .xterm-bg-color-235 {
+    background-color: #262626;
+}
+
+.terminal .xterm-color-236 {
+    color: #303030;
+}
+
+.terminal .xterm-bg-color-236 {
+    background-color: #303030;
+}
+
+.terminal .xterm-color-237 {
+    color: #3a3a3a;
+}
+
+.terminal .xterm-bg-color-237 {
+    background-color: #3a3a3a;
+}
+
+.terminal .xterm-color-238 {
+    color: #444444;
+}
+
+.terminal .xterm-bg-color-238 {
+    background-color: #444444;
+}
+
+.terminal .xterm-color-239 {
+    color: #4e4e4e;
+}
+
+.terminal .xterm-bg-color-239 {
+    background-color: #4e4e4e;
+}
+
+.terminal .xterm-color-240 {
+    color: #585858;
+}
+
+.terminal .xterm-bg-color-240 {
+    background-color: #585858;
+}
+
+.terminal .xterm-color-241 {
+    color: #626262;
+}
+
+.terminal .xterm-bg-color-241 {
+    background-color: #626262;
+}
+
+.terminal .xterm-color-242 {
+    color: #6c6c6c;
+}
+
+.terminal .xterm-bg-color-242 {
+    background-color: #6c6c6c;
+}
+
+.terminal .xterm-color-243 {
+    color: #767676;
+}
+
+.terminal .xterm-bg-color-243 {
+    background-color: #767676;
+}
+
+.terminal .xterm-color-244 {
+    color: #808080;
+}
+
+.terminal .xterm-bg-color-244 {
+    background-color: #808080;
+}
+
+.terminal .xterm-color-245 {
+    color: #8a8a8a;
+}
+
+.terminal .xterm-bg-color-245 {
+    background-color: #8a8a8a;
+}
+
+.terminal .xterm-color-246 {
+    color: #949494;
+}
+
+.terminal .xterm-bg-color-246 {
+    background-color: #949494;
+}
+
+.terminal .xterm-color-247 {
+    color: #9e9e9e;
+}
+
+.terminal .xterm-bg-color-247 {
+    background-color: #9e9e9e;
+}
+
+.terminal .xterm-color-248 {
+    color: #a8a8a8;
+}
+
+.terminal .xterm-bg-color-248 {
+    background-color: #a8a8a8;
+}
+
+.terminal .xterm-color-249 {
+    color: #b2b2b2;
+}
+
+.terminal .xterm-bg-color-249 {
+    background-color: #b2b2b2;
+}
+
+.terminal .xterm-color-250 {
+    color: #bcbcbc;
+}
+
+.terminal .xterm-bg-color-250 {
+    background-color: #bcbcbc;
+}
+
+.terminal .xterm-color-251 {
+    color: #c6c6c6;
+}
+
+.terminal .xterm-bg-color-251 {
+    background-color: #c6c6c6;
+}
+
+.terminal .xterm-color-252 {
+    color: #d0d0d0;
+}
+
+.terminal .xterm-bg-color-252 {
+    background-color: #d0d0d0;
+}
+
+.terminal .xterm-color-253 {
+    color: #dadada;
+}
+
+.terminal .xterm-bg-color-253 {
+    background-color: #dadada;
+}
+
+.terminal .xterm-color-254 {
+    color: #e4e4e4;
+}
+
+.terminal .xterm-bg-color-254 {
+    background-color: #e4e4e4;
+}
+
+.terminal .xterm-color-255 {
+    color: #eeeeee;
+}
+
+.terminal .xterm-bg-color-255 {
+    background-color: #eeeeee;
+}
+
+/**
+ * All terminal rows should have explicitly declared height,
+ * in order to allow child elements to adjust.
+ */
+.terminal .xterm-rows > div {
+    line-height: normal;
+}
Index: EcnlProtoTool/trunk/webapp/webmrbc/xterm/src/xterm.js
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/xterm/src/xterm.js	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/xterm/src/xterm.js	(revision 270)
@@ -0,0 +1,5266 @@
+/**
+ * xterm.js: xterm, in the browser
+ * Copyright (c) 2014, sourceLair Limited (www.sourcelair.com (MIT License)
+ * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
+ * https://github.com/chjj/term.js
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * Originally forked from (with the author's permission):
+ *   Fabrice Bellard's javascript vt100 for jslinux:
+ *   http://bellard.org/jslinux/
+ *   Copyright (c) 2011 Fabrice Bellard
+ *   The original design remains. The terminal itself
+ *   has been extended to include xterm CSI codes, among
+ *   other features.
+ */
+
+(function (xterm) {
+    if (typeof exports === 'object' && typeof module === 'object') {
+        /*
+         * CommonJS environment
+         */
+        module.exports = xterm.call(this);
+    } else if (typeof define == 'function') {
+        /*
+         * Require.js is available
+         */
+        define([], xterm.bind(window));
+    } else {
+        /*
+         * Plain browser environment
+         */
+        this.Xterm = xterm.call(this);
+        this.Terminal = this.Xterm; /* Backwards compatibility with term.js */
+    }
+})(function() {
+    /**
+     * Terminal Emulation References:
+     *   http://vt100.net/
+     *   http://invisible-island.net/xterm/ctlseqs/ctlseqs.txt
+     *   http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
+     *   http://invisible-island.net/vttest/
+     *   http://www.inwap.com/pdp10/ansicode.txt
+     *   http://linux.die.net/man/4/console_codes
+     *   http://linux.die.net/man/7/urxvt
+     */
+
+    'use strict';
+
+    /**
+     * Shared
+     */
+
+    var window = this, document = this.document;
+
+    /**
+     * EventEmitter
+     */
+
+    function EventEmitter() {
+      this._events = this._events || {};
+    }
+
+    EventEmitter.prototype.addListener = function(type, listener) {
+      this._events[type] = this._events[type] || [];
+      this._events[type].push(listener);
+    };
+
+    EventEmitter.prototype.on = EventEmitter.prototype.addListener;
+
+    EventEmitter.prototype.removeListener = function(type, listener) {
+      if (!this._events[type]) return;
+
+      var obj = this._events[type]
+        , i = obj.length;
+
+      while (i--) {
+        if (obj[i] === listener || obj[i].listener === listener) {
+          obj.splice(i, 1);
+          return;
+        }
+      }
+    };
+
+    EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
+
+    EventEmitter.prototype.removeAllListeners = function(type) {
+      if (this._events[type]) delete this._events[type];
+    };
+
+    EventEmitter.prototype.once = function(type, listener) {
+      var self = this;
+      function on() {
+        var args = Array.prototype.slice.call(arguments);
+        this.removeListener(type, on);
+        return listener.apply(this, args);
+      }
+      on.listener = listener;
+      return this.on(type, on);
+    };
+
+    EventEmitter.prototype.emit = function(type) {
+      if (!this._events[type]) return;
+
+      var args = Array.prototype.slice.call(arguments, 1)
+        , obj = this._events[type]
+        , l = obj.length
+        , i = 0;
+
+      for (; i < l; i++) {
+        obj[i].apply(this, args);
+      }
+    };
+
+    EventEmitter.prototype.listeners = function(type) {
+      return this._events[type] = this._events[type] || [];
+    };
+
+
+    /**
+     * Encapsulates the logic for handling compositionstart, compositionupdate and compositionend
+     * events, displaying the in-progress composition to the UI and forwarding the final composition
+     * to the handler.
+     * @param {HTMLTextAreaElement} textarea The textarea that xterm uses for input.
+     * @param {HTMLElement} compositionView The element to display the in-progress composition in.
+     * @param {Terminal} terminal The Terminal to forward the finished composition to.
+     */
+    function CompositionHelper(textarea, compositionView, terminal) {
+      this.textarea = textarea;
+      this.compositionView = compositionView;
+      this.terminal = terminal;
+
+      // Whether input composition is currently happening, eg. via a mobile keyboard, speech input
+      // or IME. This variable determines whether the compositionText should be displayed on the UI.
+      this.isComposing = false;
+
+      // The input currently being composed, eg. via a mobile keyboard, speech input or IME.
+      this.compositionText = null;
+
+      // The position within the input textarea's value of the current composition.
+      this.compositionPosition = { start: null, end: null };
+
+      // Whether a composition is in the process of being sent, setting this to false will cancel
+      // any in-progress composition.
+      this.isSendingComposition = false;
+    }
+
+    /**
+     * Handles the compositionstart event, activating the composition view.
+     */
+    CompositionHelper.prototype.compositionstart = function() {
+      this.isComposing = true;
+      this.compositionPosition.start = this.textarea.value.length;
+      this.compositionView.textContent = '';
+      this.compositionView.classList.add('active');
+    };
+
+    /**
+     * Handles the compositionupdate event, updating the composition view.
+     * @param {CompositionEvent} ev The event.
+     */
+    CompositionHelper.prototype.compositionupdate = function(ev) {
+      this.compositionView.textContent = ev.data;
+      this.updateCompositionElements();
+      var self = this;
+      setTimeout(function() {
+        self.compositionPosition.end = self.textarea.value.length;
+      }, 0);
+    };
+
+    /**
+     * Handles the compositionend event, hiding the composition view and sending the composition to
+     * the handler.
+     */
+    CompositionHelper.prototype.compositionend = function() {
+      this.finalizeComposition(true);
+    };
+
+    /**
+     * Handles the keydown event, routing any necessary events to the CompositionHelper functions.
+     * @return Whether the Terminal should continue processing the keydown event.
+     */
+    CompositionHelper.prototype.keydown = function(ev) {
+      if (this.isComposing || this.isSendingComposition) {
+        if (ev.keyCode === 229) {
+          // Continue composing if the keyCode is the "composition character"
+          return false;
+        } else if (ev.keyCode === 16 || ev.keyCode === 17 || ev.keyCode === 18) {
+          // Continue composing if the keyCode is a modifier key
+          return false;
+        } else {
+          // Finish composition immediately. This is mainly here for the case where enter is
+          // pressed and the handler needs to be triggered before the command is executed.
+          this.finalizeComposition(false);
+        }
+      }
+
+      if (ev.keyCode === 229) {
+        // If the "composition character" is used but gets to this point it means a non-composition
+        // character (eg. numbers and punctuation) was pressed when the IME was active.
+        this.handleAnyTextareaChanges();
+        return false;
+      }
+
+      return true;
+    }
+
+    /**
+     * Finalizes the composition, resuming regular input actions. This is called when a composition
+     * is ending.
+     * @param {boolean} waitForPropogation Whether to wait for events to propogate before sending
+     *   the input. This should be false if a non-composition keystroke is entered before the
+     *   compositionend event is triggered, such as enter, so that the composition is send before
+     *   the command is executed.
+     */
+    CompositionHelper.prototype.finalizeComposition = function(waitForPropogation) {
+      this.compositionView.classList.remove('active');
+      this.isComposing = false;
+      this.clearTextareaPosition();
+
+      if (!waitForPropogation) {
+        // Cancel any delayed composition send requests and send the input immediately.
+        this.isSendingComposition = false;
+        var input = this.textarea.value.substring(this.compositionPosition.start, this.compositionPosition.end);
+        this.terminal.handler(input);
+      } else {
+        // Make a deep copy of the composition position here as a new compositionstart event may
+        // fire before the setTimeout executes.
+        var currentCompositionPosition = {
+          start: this.compositionPosition.start,
+          end: this.compositionPosition.end,
+        }
+
+        // Since composition* events happen before the changes take place in the textarea on most
+        // browsers, use a setTimeout with 0ms time to allow the native compositionend event to
+        // complete. This ensures the correct character is retrieved, this solution was used
+        // because:
+        // - The compositionend event's data property is unreliable, at least on Chromium
+        // - The last compositionupdate event's data property does not always accurately describe
+        //   the character, a counter example being Korean where an ending consonsant can move to
+        //   the following character if the following input is a vowel.
+        var self = this;
+        this.isSendingComposition = true;
+        setTimeout(function () {
+          // Ensure that the input has not already been sent
+          if (self.isSendingComposition) {
+            self.isSendingComposition = false;
+            var input;
+            if (self.isComposing) {
+              // Use the end position to get the string if a new composition has started.
+              input = self.textarea.value.substring(currentCompositionPosition.start, currentCompositionPosition.end);
+            } else {
+              // Don't use the end position here in order to pick up any characters after the
+              // composition has finished, for example when typing a non-composition character
+              // (eg. 2) after a composition character.
+              input = self.textarea.value.substring(currentCompositionPosition.start);
+            }
+            self.terminal.handler(input);
+          }
+        }, 0);
+      }
+    }
+
+    /**
+     * Apply any changes made to the textarea after the current event chain is allowed to complete.
+     * This should be called when not currently composing but a keydown event with the "composition
+     * character" (229) is triggered, in order to allow non-composition text to be entered when an
+     * IME is active.
+     */
+    CompositionHelper.prototype.handleAnyTextareaChanges = function() {
+      var oldValue = this.textarea.value;
+      var self = this;
+      setTimeout(function() {
+        // Ignore if a composition has started since the timeout
+        if (!self.isComposing) {
+          var newValue = self.textarea.value;
+          var diff = newValue.replace(oldValue, '');
+          if (diff.length > 0) {
+            self.terminal.handler(diff);
+          }
+        }
+      }, 0);
+    }
+
+    /**
+     * Positions the composition view on top of the cursor and the textarea just below it (so the
+     * IME helper dialog is positioned correctly).
+     */
+    CompositionHelper.prototype.updateCompositionElements = function() {
+      var cursor = this.terminal.element.querySelector('.terminal-cursor');
+      if (cursor) {
+        this.compositionView.style.left = cursor.offsetLeft + 'px';
+        this.compositionView.style.top = cursor.offsetTop + 'px';
+        this.textarea.style.left = cursor.offsetLeft + 'px';
+        this.textarea.style.top = (cursor.offsetTop + cursor.offsetHeight) + 'px';
+      }
+    };
+
+    /**
+     * Clears the textarea's position so that the cursor does not blink on IE.
+     * @private
+     */
+    CompositionHelper.prototype.clearTextareaPosition = function() {
+      this.textarea.style.left = undefined;
+      this.textarea.style.top = undefined;
+    }
+
+
+    /**
+     * States
+     */
+    var normal = 0, escaped = 1, csi = 2, osc = 3, charset = 4, dcs = 5, ignore = 6;
+
+    /**
+     * Terminal
+     */
+
+    /**
+     * Creates a new `Terminal` object.
+     *
+     * @param {object} options An object containing a set of options, the available options are:
+     *   - cursorBlink (boolean): Whether the terminal cursor blinks
+     *
+     * @public
+     * @class Xterm Xterm
+     * @alias module:xterm/src/xterm
+     */
+    function Terminal(options) {
+      var self = this;
+
+      if (!(this instanceof Terminal)) {
+        return new Terminal(arguments[0], arguments[1], arguments[2]);
+      }
+
+      self.cancel = Terminal.cancel;
+
+      EventEmitter.call(this);
+
+      if (typeof options === 'number') {
+        options = {
+          cols: arguments[0],
+          rows: arguments[1],
+          handler: arguments[2]
+        };
+      }
+
+      options = options || {};
+
+
+      Object.keys(Terminal.defaults).forEach(function(key) {
+        if (options[key] == null) {
+          options[key] = Terminal.options[key];
+
+          if (Terminal[key] !== Terminal.defaults[key]) {
+            options[key] = Terminal[key];
+          }
+        }
+        self[key] = options[key];
+      });
+
+      if (options.colors.length === 8) {
+        options.colors = options.colors.concat(Terminal._colors.slice(8));
+      } else if (options.colors.length === 16) {
+        options.colors = options.colors.concat(Terminal._colors.slice(16));
+      } else if (options.colors.length === 10) {
+        options.colors = options.colors.slice(0, -2).concat(
+          Terminal._colors.slice(8, -2), options.colors.slice(-2));
+      } else if (options.colors.length === 18) {
+        options.colors = options.colors.concat(
+          Terminal._colors.slice(16, -2), options.colors.slice(-2));
+      }
+      this.colors = options.colors;
+
+      this.options = options;
+
+      // this.context = options.context || window;
+      // this.document = options.document || document;
+      this.parent = options.body || options.parent
+        || (document ? document.getElementsByTagName('body')[0] : null);
+
+      this.cols = options.cols || options.geometry[0];
+      this.rows = options.rows || options.geometry[1];
+
+      if (options.handler) {
+        this.on('data', options.handler);
+      }
+
+      /**
+       * The scroll position of the y cursor, ie. ybase + y = the y position within the entire
+       * buffer
+       */
+      this.ybase = 0;
+
+      /**
+       * The scroll position of the viewport
+       */
+      this.ydisp = 0;
+
+      /**
+       * The cursor's x position after ybase
+       */
+      this.x = 0;
+
+      /**
+       * The cursor's y position after ybase
+       */
+      this.y = 0;
+
+      /**
+       * Used to debounce the refresh function
+       */
+      this.isRefreshing = false;
+
+      /**
+       * Whether there is a full terminal refresh queued
+       */
+
+      this.cursorState = 0;
+      this.cursorHidden = false;
+      this.convertEol;
+      this.state = 0;
+      this.queue = '';
+      this.scrollTop = 0;
+      this.scrollBottom = this.rows - 1;
+      this.customKeydownHandler = null;
+
+      // modes
+      this.applicationKeypad = false;
+      this.applicationCursor = false;
+      this.originMode = false;
+      this.insertMode = false;
+      this.wraparoundMode = true; // defaults: xterm - true, vt100 - false
+      this.normal = null;
+
+      // charset
+      this.charset = null;
+      this.gcharset = null;
+      this.glevel = 0;
+      this.charsets = [null];
+
+      // mouse properties
+      this.decLocator;
+      this.x10Mouse;
+      this.vt200Mouse;
+      this.vt300Mouse;
+      this.normalMouse;
+      this.mouseEvents;
+      this.sendFocus;
+      this.utfMouse;
+      this.sgrMouse;
+      this.urxvtMouse;
+
+      // misc
+      this.element;
+      this.children;
+      this.refreshStart;
+      this.refreshEnd;
+      this.savedX;
+      this.savedY;
+      this.savedCols;
+
+      // stream
+      this.readable = true;
+      this.writable = true;
+
+      this.defAttr = (0 << 18) | (257 << 9) | (256 << 0);
+      this.curAttr = this.defAttr;
+
+      this.params = [];
+      this.currentParam = 0;
+      this.prefix = '';
+      this.postfix = '';
+
+      // leftover surrogate high from previous write invocation
+      this.surrogate_high = '';
+
+      /**
+       * An array of all lines in the entire buffer, including the prompt. The lines are array of
+       * characters which are 2-length arrays where [0] is an attribute and [1] is the character.
+       */
+      this.lines = [];
+      var i = this.rows;
+      while (i--) {
+        this.lines.push(this.blankLine());
+      }
+
+      this.tabs;
+      this.setupStops();
+    }
+
+    inherits(Terminal, EventEmitter);
+
+		/**
+		 * back_color_erase feature for xterm.
+		 */
+    Terminal.prototype.eraseAttr = function() {
+      // if (this.is('screen')) return this.defAttr;
+      return (this.defAttr & ~0x1ff) | (this.curAttr & 0x1ff);
+    };
+
+    /**
+     * Colors
+     */
+
+    // Colors 0-15
+    Terminal.tangoColors = [
+      // dark:
+      '#2e3436',
+      '#cc0000',
+      '#4e9a06',
+      '#c4a000',
+      '#3465a4',
+      '#75507b',
+      '#06989a',
+      '#d3d7cf',
+      // bright:
+      '#555753',
+      '#ef2929',
+      '#8ae234',
+      '#fce94f',
+      '#729fcf',
+      '#ad7fa8',
+      '#34e2e2',
+      '#eeeeec'
+    ];
+
+    // Colors 0-15 + 16-255
+    // Much thanks to TooTallNate for writing this.
+    Terminal.colors = (function() {
+      var colors = Terminal.tangoColors.slice()
+        , r = [0x00, 0x5f, 0x87, 0xaf, 0xd7, 0xff]
+        , i;
+
+      // 16-231
+      i = 0;
+      for (; i < 216; i++) {
+        out(r[(i / 36) % 6 | 0], r[(i / 6) % 6 | 0], r[i % 6]);
+      }
+
+      // 232-255 (grey)
+      i = 0;
+      for (; i < 24; i++) {
+        r = 8 + i * 10;
+        out(r, r, r);
+      }
+
+      function out(r, g, b) {
+        colors.push('#' + hex(r) + hex(g) + hex(b));
+      }
+
+      function hex(c) {
+        c = c.toString(16);
+        return c.length < 2 ? '0' + c : c;
+      }
+
+      return colors;
+    })();
+
+    Terminal._colors = Terminal.colors.slice();
+
+    Terminal.vcolors = (function() {
+      var out = []
+        , colors = Terminal.colors
+        , i = 0
+        , color;
+
+      for (; i < 256; i++) {
+        color = parseInt(colors[i].substring(1), 16);
+        out.push([
+          (color >> 16) & 0xff,
+          (color >> 8) & 0xff,
+          color & 0xff
+        ]);
+      }
+
+      return out;
+    })();
+
+    /**
+     * Options
+     */
+
+    Terminal.defaults = {
+      colors: Terminal.colors,
+      theme: 'default',
+      convertEol: false,
+      termName: 'xterm',
+      geometry: [80, 24],
+      cursorBlink: false,
+      visualBell: false,
+      popOnBell: false,
+      scrollback: 1000,
+      screenKeys: false,
+      debug: false,
+      cancelEvents: false
+      // programFeatures: false,
+      // focusKeys: false,
+    };
+
+    Terminal.options = {};
+
+    Terminal.focus = null;
+
+    each(keys(Terminal.defaults), function(key) {
+      Terminal[key] = Terminal.defaults[key];
+      Terminal.options[key] = Terminal.defaults[key];
+    });
+
+    /**
+     * Focus the terminal. Delegates focus handling to the terminal's DOM element.
+     */
+    Terminal.prototype.focus = function() {
+      return this.textarea.focus();
+    };
+
+    /**
+     * Binds the desired focus behavior on a given terminal object.
+     *
+     * @static
+     */
+    Terminal.bindFocus = function (term) {
+      on(term.textarea, 'focus', function (ev) {
+        if (term.sendFocus) {
+          term.send('\x1b[I');
+        }
+        term.element.classList.add('focus');
+        term.showCursor();
+        Terminal.focus = term;
+        term.emit('focus', {terminal: term});
+      });
+    };
+
+    /**
+     * Blur the terminal. Delegates blur handling to the terminal's DOM element.
+     */
+    Terminal.prototype.blur = function() {
+      return this.textarea.blur();
+    };
+
+    /**
+     * Binds the desired blur behavior on a given terminal object.
+     *
+     * @static
+     */
+    Terminal.bindBlur = function (term) {
+      on(term.textarea, 'blur', function (ev) {
+        term.refresh(term.y, term.y);
+        if (term.sendFocus) {
+          term.send('\x1b[O');
+        }
+        term.element.classList.remove('focus');
+        Terminal.focus = null;
+        term.emit('blur', {terminal: term});
+      });
+    };
+
+    /**
+     * Initialize default behavior
+     */
+    Terminal.prototype.initGlobal = function() {
+      Terminal.bindPaste(this);
+      Terminal.bindKeys(this);
+      Terminal.bindCopy(this);
+      Terminal.bindFocus(this);
+      Terminal.bindBlur(this);
+    };
+
+    /**
+     * Bind to paste event and allow both keyboard and right-click pasting, without having the
+     * contentEditable value set to true.
+     */
+    Terminal.bindPaste = function(term) {
+      on([term.textarea, term.element], 'paste', function(ev) {
+        ev.stopPropagation();
+        if (ev.clipboardData) {
+          var text = ev.clipboardData.getData('text/plain');
+          term.handler(text);
+          term.textarea.value = '';
+          return term.cancel(ev);
+        }
+      });
+    };
+
+    /**
+     * Prepares text copied from terminal selection, to be saved in the clipboard by:
+     *   1. stripping all trailing white spaces
+     *   2. converting all non-breaking spaces to regular spaces
+     * @param {string} text The copied text that needs processing for storing in clipboard
+     * @returns {string}
+     * @static
+     */
+    Terminal.prepareCopiedTextForClipboard = function (text) {
+      var space = String.fromCharCode(32),
+          nonBreakingSpace = String.fromCharCode(160),
+          allNonBreakingSpaces = new RegExp(nonBreakingSpace, 'g'),
+          processedText = text.split('\n').map(function (line) {
+            /**
+             * Strip all trailing white spaces and convert all non-breaking spaces to regular
+             * spaces.
+             */
+            var processedLine = line.replace(/\s+$/g, '').replace(allNonBreakingSpaces, space);
+
+            return processedLine;
+          }).join('\n');
+
+      return processedText;
+    };
+
+    /**
+     * Apply key handling to the terminal
+     */
+    Terminal.bindKeys = function(term) {
+      on(term.element, 'keydown', function(ev) {
+        if (document.activeElement != this) {
+          return;
+         }
+         term.keyDown(ev);
+      }, true);
+
+      on(term.element, 'keypress', function(ev) {
+        if (document.activeElement != this) {
+          return;
+        }
+        term.keyPress(ev);
+      }, true);
+
+      on(term.element, 'keyup', term.focus.bind(term));
+
+      on(term.textarea, 'keydown', function(ev) {
+        term.keyDown(ev);
+      }, true);
+
+      on(term.textarea, 'keypress', function(ev) {
+        term.keyPress(ev);
+        // Truncate the textarea's value, since it is not needed
+        this.value = '';
+      }, true);
+
+      on(term.textarea, 'compositionstart', term.compositionHelper.compositionstart.bind(term.compositionHelper));
+      on(term.textarea, 'compositionupdate', term.compositionHelper.compositionupdate.bind(term.compositionHelper));
+      on(term.textarea, 'compositionend', term.compositionHelper.compositionend.bind(term.compositionHelper));
+      term.on('refresh', term.compositionHelper.updateCompositionElements.bind(term.compositionHelper));
+    };
+
+    /**
+     * Binds copy functionality to the given terminal.
+     * @static
+     */
+    Terminal.bindCopy = function(term) {
+      on(term.element, 'copy', function(ev) {
+        return; // temporary
+      });
+    };
+
+
+    /**
+     * Insert the given row to the terminal or produce a new one
+     * if no row argument is passed. Return the inserted row.
+     * @param {HTMLElement} row (optional) The row to append to the terminal.
+     */
+    Terminal.prototype.insertRow = function (row) {
+      if (typeof row != 'object') {
+        row = document.createElement('div');
+      }
+
+      this.rowContainer.appendChild(row);
+      this.children.push(row);
+
+      return row;
+    };
+
+
+    /**
+     * Opens the terminal within an element.
+     *
+     * @param {HTMLElement} parent The element to create the terminal within.
+     */
+    Terminal.prototype.open = function(parent) {
+      var self=this, i=0, div;
+
+      this.parent = parent || this.parent;
+
+      if (!this.parent) {
+        throw new Error('Terminal requires a parent element.');
+      }
+
+      /*
+      * Grab global elements
+      */
+      this.context = this.parent.ownerDocument.defaultView;
+      this.document = this.parent.ownerDocument;
+      this.body = this.document.getElementsByTagName('body')[0];
+
+      /*
+      * Parse User-Agent
+      */
+      if (this.context.navigator && this.context.navigator.userAgent) {
+        this.isMSIE = !!~this.context.navigator.userAgent.indexOf('MSIE');
+      }
+
+      /*
+      * Find the users platform. We use this to interpret the meta key
+      * and ISO third level shifts.
+      * http://stackoverflow.com/questions/19877924/what-is-the-list-of-possible-values-for-navigator-platform-as-of-today
+      */
+      if (this.context.navigator && this.context.navigator.platform) {
+        this.isMac = contains(
+          this.context.navigator.platform,
+          ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K']
+        );
+        this.isIpad = this.context.navigator.platform === 'iPad';
+        this.isIphone = this.context.navigator.platform === 'iPhone';
+        this.isMSWindows = contains(
+          this.context.navigator.platform,
+          ['Windows', 'Win16', 'Win32', 'WinCE']
+        );
+      }
+
+      /*
+      * Create main element container
+      */
+      this.element = this.document.createElement('div');
+      this.element.classList.add('terminal');
+      this.element.classList.add('xterm');
+      this.element.classList.add('xterm-theme-' + this.theme);
+      this.element.setAttribute('tabindex', 0);
+
+      /*
+      * Create the container that will hold the lines of the terminal and then
+      * produce the lines the lines.
+      */
+      this.rowContainer = document.createElement('div');
+      this.rowContainer.classList.add('xterm-rows');
+      this.element.appendChild(this.rowContainer);
+      this.children = [];
+
+      /*
+      * Create the container that will hold helpers like the textarea for
+      * capturing DOM Events. Then produce the helpers.
+      */
+      this.helperContainer = document.createElement('div');
+      this.helperContainer.classList.add('xterm-helpers');
+      // TODO: This should probably be inserted once it's filled to prevent an additional layout
+      this.element.appendChild(this.helperContainer);
+      this.textarea = document.createElement('textarea');
+      this.textarea.classList.add('xterm-helper-textarea');
+      this.textarea.setAttribute('autocorrect', 'off');
+      this.textarea.setAttribute('autocapitalize', 'off');
+      this.textarea.setAttribute('spellcheck', 'false');
+      this.textarea.tabIndex = 0;
+      this.textarea.addEventListener('focus', function() {
+        self.emit('focus', {terminal: self});
+      });
+      this.textarea.addEventListener('blur', function() {
+        self.emit('blur', {terminal: self});
+      });
+      this.helperContainer.appendChild(this.textarea);
+
+      this.compositionView = document.createElement('div');
+      this.compositionView.classList.add('composition-view');
+      this.compositionHelper = new CompositionHelper(this.textarea, this.compositionView, this);
+      this.helperContainer.appendChild(this.compositionView);
+
+      for (; i < this.rows; i++) {
+        this.insertRow();
+      }
+      this.parent.appendChild(this.element);
+
+
+      // Draw the screen.
+      this.refresh(0, this.rows - 1);
+
+      // Initialize global actions that
+      // need to be taken on the document.
+      this.initGlobal();
+
+      // Ensure there is a Terminal.focus.
+      this.focus();
+
+      on(this.element, 'mouseup', function() {
+        var selection = document.getSelection(),
+            collapsed = selection.isCollapsed,
+            isRange = typeof collapsed == 'boolean' ? !collapsed : selection.type == 'Range';
+        if (!isRange) {
+          self.focus();
+        }
+      });
+
+      // Listen for mouse events and translate
+      // them into terminal mouse protocols.
+      this.bindMouse();
+
+      // Figure out whether boldness affects
+      // the character width of monospace fonts.
+      if (Terminal.brokenBold == null) {
+        Terminal.brokenBold = isBoldBroken(this.document);
+      }
+
+      this.emit('open');
+    };
+
+
+    /**
+     * Attempts to load an add-on using CommonJS or RequireJS (whichever is available).
+     * @param {string} addon The name of the addon to load
+     * @static
+     */
+    Terminal.loadAddon = function(addon, callback) {
+      if (typeof exports === 'object' && typeof module === 'object') {
+        // CommonJS
+        return require(__dirname + '/../addons/' + addon);
+      } else if (typeof define == 'function') {
+        // RequireJS
+        return require(['../addons/' + addon + '/' + addon], callback);
+      } else {
+        console.error('Cannot load a module without a CommonJS or RequireJS environment.');
+        return false;
+      }
+    };
+
+
+    /**
+     * XTerm mouse events
+     * http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#Mouse%20Tracking
+     * To better understand these
+     * the xterm code is very helpful:
+     * Relevant files:
+     *   button.c, charproc.c, misc.c
+     * Relevant functions in xterm/button.c:
+     *   BtnCode, EmitButtonCode, EditorButton, SendMousePosition
+     */
+    Terminal.prototype.bindMouse = function() {
+      var el = this.element, self = this, pressed = 32;
+      var wheelEvent = ('onmousewheel' in this.context) ? 'mousewheel' : 'DOMMouseScroll';
+
+      // mouseup, mousedown, mousewheel
+      // left click: ^[[M 3<^[[M#3<
+      // mousewheel up: ^[[M`3>
+      function sendButton(ev) {
+        var button
+          , pos;
+
+        // get the xterm-style button
+        button = getButton(ev);
+
+        // get mouse coordinates
+        pos = getCoords(ev);
+        if (!pos) return;
+
+        sendEvent(button, pos);
+
+        switch (ev.overrideType || ev.type) {
+          case 'mousedown':
+            pressed = button;
+            break;
+          case 'mouseup':
+            // keep it at the left
+            // button, just in case.
+            pressed = 32;
+            break;
+          case wheelEvent:
+            // nothing. don't
+            // interfere with
+            // `pressed`.
+            break;
+        }
+      }
+
+      // motion example of a left click:
+      // ^[[M 3<^[[M@4<^[[M@5<^[[M@6<^[[M@7<^[[M#7<
+      function sendMove(ev) {
+        var button = pressed
+          , pos;
+
+        pos = getCoords(ev);
+        if (!pos) return;
+
+        // buttons marked as motions
+        // are incremented by 32
+        button += 32;
+
+        sendEvent(button, pos);
+      }
+
+      // encode button and
+      // position to characters
+      function encode(data, ch) {
+        if (!self.utfMouse) {
+          if (ch === 255) return data.push(0);
+          if (ch > 127) ch = 127;
+          data.push(ch);
+        } else {
+          if (ch === 2047) return data.push(0);
+          if (ch < 127) {
+            data.push(ch);
+          } else {
+            if (ch > 2047) ch = 2047;
+            data.push(0xC0 | (ch >> 6));
+            data.push(0x80 | (ch & 0x3F));
+          }
+        }
+      }
+
+      // send a mouse event:
+      // regular/utf8: ^[[M Cb Cx Cy
+      // urxvt: ^[[ Cb ; Cx ; Cy M
+      // sgr: ^[[ Cb ; Cx ; Cy M/m
+      // vt300: ^[[ 24(1/3/5)~ [ Cx , Cy ] \r
+      // locator: CSI P e ; P b ; P r ; P c ; P p & w
+      function sendEvent(button, pos) {
+        // self.emit('mouse', {
+        //   x: pos.x - 32,
+        //   y: pos.x - 32,
+        //   button: button
+        // });
+
+        if (self.vt300Mouse) {
+          // NOTE: Unstable.
+          // http://www.vt100.net/docs/vt3xx-gp/chapter15.html
+          button &= 3;
+          pos.x -= 32;
+          pos.y -= 32;
+          var data = '\x1b[24';
+          if (button === 0) data += '1';
+          else if (button === 1) data += '3';
+          else if (button === 2) data += '5';
+          else if (button === 3) return;
+          else data += '0';
+          data += '~[' + pos.x + ',' + pos.y + ']\r';
+          self.send(data);
+          return;
+        }
+
+        if (self.decLocator) {
+          // NOTE: Unstable.
+          button &= 3;
+          pos.x -= 32;
+          pos.y -= 32;
+          if (button === 0) button = 2;
+          else if (button === 1) button = 4;
+          else if (button === 2) button = 6;
+          else if (button === 3) button = 3;
+          self.send('\x1b['
+            + button
+            + ';'
+            + (button === 3 ? 4 : 0)
+            + ';'
+            + pos.y
+            + ';'
+            + pos.x
+            + ';'
+            + (pos.page || 0)
+            + '&w');
+          return;
+        }
+
+        if (self.urxvtMouse) {
+          pos.x -= 32;
+          pos.y -= 32;
+          pos.x++;
+          pos.y++;
+          self.send('\x1b[' + button + ';' + pos.x + ';' + pos.y + 'M');
+          return;
+        }
+
+        if (self.sgrMouse) {
+          pos.x -= 32;
+          pos.y -= 32;
+          self.send('\x1b[<'
+            + ((button & 3) === 3 ? button & ~3 : button)
+            + ';'
+            + pos.x
+            + ';'
+            + pos.y
+            + ((button & 3) === 3 ? 'm' : 'M'));
+          return;
+        }
+
+        var data = [];
+
+        encode(data, button);
+        encode(data, pos.x);
+        encode(data, pos.y);
+
+        self.send('\x1b[M' + String.fromCharCode.apply(String, data));
+      }
+
+      function getButton(ev) {
+        var button
+          , shift
+          , meta
+          , ctrl
+          , mod;
+
+        // two low bits:
+        // 0 = left
+        // 1 = middle
+        // 2 = right
+        // 3 = release
+        // wheel up/down:
+        // 1, and 2 - with 64 added
+        switch (ev.overrideType || ev.type) {
+          case 'mousedown':
+            button = ev.button != null
+              ? +ev.button
+              : ev.which != null
+                ? ev.which - 1
+                : null;
+
+            if (self.isMSIE) {
+              button = button === 1 ? 0 : button === 4 ? 1 : button;
+            }
+            break;
+          case 'mouseup':
+            button = 3;
+            break;
+          case 'DOMMouseScroll':
+            button = ev.detail < 0
+              ? 64
+              : 65;
+            break;
+          case 'mousewheel':
+            button = ev.wheelDeltaY > 0
+              ? 64
+              : 65;
+            break;
+        }
+
+        // next three bits are the modifiers:
+        // 4 = shift, 8 = meta, 16 = control
+        shift = ev.shiftKey ? 4 : 0;
+        meta = ev.metaKey ? 8 : 0;
+        ctrl = ev.ctrlKey ? 16 : 0;
+        mod = shift | meta | ctrl;
+
+        // no mods
+        if (self.vt200Mouse) {
+          // ctrl only
+          mod &= ctrl;
+        } else if (!self.normalMouse) {
+          mod = 0;
+        }
+
+        // increment to SP
+        button = (32 + (mod << 2)) + button;
+
+        return button;
+      }
+
+      // mouse coordinates measured in cols/rows
+      function getCoords(ev) {
+        var x, y, w, h, el;
+
+        // ignore browsers without pageX for now
+        if (ev.pageX == null) return;
+
+        x = ev.pageX;
+        y = ev.pageY;
+        el = self.element;
+
+        // should probably check offsetParent
+        // but this is more portable
+        while (el && el !== self.document.documentElement) {
+          x -= el.offsetLeft;
+          y -= el.offsetTop;
+          el = 'offsetParent' in el
+            ? el.offsetParent
+            : el.parentNode;
+        }
+
+        // convert to cols/rows
+        w = self.element.clientWidth;
+        h = self.element.clientHeight;
+        x = Math.round((x / w) * self.cols);
+        y = Math.round((y / h) * self.rows);
+
+        // be sure to avoid sending
+        // bad positions to the program
+        if (x < 0) x = 0;
+        if (x > self.cols) x = self.cols;
+        if (y < 0) y = 0;
+        if (y > self.rows) y = self.rows;
+
+        // xterm sends raw bytes and
+        // starts at 32 (SP) for each.
+        x += 32;
+        y += 32;
+
+        return {
+          x: x,
+          y: y,
+          type: (ev.overrideType || ev.type) === wheelEvent
+            ? 'mousewheel'
+            : (ev.overrideType || ev.type)
+        };
+      }
+
+      on(el, 'mousedown', function(ev) {
+        if (!self.mouseEvents) return;
+
+        // send the button
+        sendButton(ev);
+
+        // ensure focus
+        self.focus();
+
+        // fix for odd bug
+        //if (self.vt200Mouse && !self.normalMouse) {
+        if (self.vt200Mouse) {
+          ev.overrideType = 'mouseup';
+          sendButton(ev);
+          return self.cancel(ev);
+        }
+
+        // bind events
+        if (self.normalMouse) on(self.document, 'mousemove', sendMove);
+
+        // x10 compatibility mode can't send button releases
+        if (!self.x10Mouse) {
+          on(self.document, 'mouseup', function up(ev) {
+            sendButton(ev);
+            if (self.normalMouse) off(self.document, 'mousemove', sendMove);
+            off(self.document, 'mouseup', up);
+            return self.cancel(ev);
+          });
+        }
+
+        return self.cancel(ev);
+      });
+
+      //if (self.normalMouse) {
+      //  on(self.document, 'mousemove', sendMove);
+      //}
+
+      on(el, wheelEvent, function(ev) {
+        if (!self.mouseEvents) return;
+        if (self.x10Mouse
+            || self.vt300Mouse
+            || self.decLocator) return;
+        sendButton(ev);
+        return self.cancel(ev);
+      });
+
+      // allow mousewheel scrolling in
+      // the shell for example
+      on(el, wheelEvent, function(ev) {
+        if (self.mouseEvents) return;
+        if (self.applicationKeypad) return;
+        if (ev.type === 'DOMMouseScroll') {
+          self.scrollDisp(ev.detail < 0 ? -1 : 1);
+        } else {
+          self.scrollDisp(ev.wheelDeltaY > 0 ? -1 : 1);
+        }
+        return self.cancel(ev);
+      });
+    };
+
+    /**
+     * Destroys the terminal.
+     */
+    Terminal.prototype.destroy = function() {
+      this.readable = false;
+      this.writable = false;
+      this._events = {};
+      this.handler = function() {};
+      this.write = function() {};
+      if (this.element.parentNode) {
+        this.element.parentNode.removeChild(this.element);
+      }
+      //this.emit('close');
+    };
+
+
+    /**
+     * Flags used to render terminal text properly
+     */
+    Terminal.flags = {
+      BOLD: 1,
+      UNDERLINE: 2,
+      BLINK: 4,
+      INVERSE: 8,
+      INVISIBLE: 16
+    }
+
+    /**
+     * Refreshes (re-renders) terminal content within two rows (inclusive)
+     *
+     * Rendering Engine:
+     *
+     * In the screen buffer, each character is stored as a an array with a character
+     * and a 32-bit integer:
+     *   - First value: a utf-16 character.
+     *   - Second value:
+     *   - Next 9 bits: background color (0-511).
+     *   - Next 9 bits: foreground color (0-511).
+     *   - Next 14 bits: a mask for misc. flags:
+     *     - 1=bold
+     *     - 2=underline
+     *     - 4=blink
+     *     - 8=inverse
+     *     - 16=invisible
+     *
+     * @param {number} start The row to start from (between 0 and terminal's height terminal - 1)
+     * @param {number} end The row to end at (between fromRow and terminal's height terminal - 1)
+     * @param {boolean} queue Whether the refresh should ran right now or be queued
+     */
+    Terminal.prototype.refresh = function(start, end, queue) {
+      var self = this;
+
+      // queue defaults to true
+      queue = (typeof queue == 'undefined') ? true : queue;
+
+      /**
+       * The refresh queue allows refresh to execute only approximately 30 times a second. For
+       * commands that pass a significant amount of output to the write function, this prevents the
+       * terminal from maxing out the CPU and making the UI unresponsive. While commands can still
+       * run beyond what they do on the terminal, it is far better with a debounce in place as
+       * every single terminal manipulation does not need to be constructed in the DOM.
+       *
+       * A side-effect of this is that it makes ^C to interrupt a process seem more responsive.
+       */
+      if (queue) {
+        // If refresh should be queued, order the refresh and return.
+        if (this._refreshIsQueued) {
+          // If a refresh has already been queued, just order a full refresh next
+          this._fullRefreshNext = true;
+        } else {
+          setTimeout(function () {
+            self.refresh(start, end, false);
+          }, 34)
+          this._refreshIsQueued = true;
+        }
+        return;
+      }
+
+      // If refresh should be run right now (not be queued), release the lock
+      this._refreshIsQueued = false;
+
+      // If multiple refreshes were requested, make a full refresh.
+      if (this._fullRefreshNext) {
+        start = 0;
+        end = this.rows - 1;
+        this._fullRefreshNext = false // reset lock
+      }
+
+      var x, y, i, line, out, ch, ch_width, width, data, attr, bg, fg, flags, row, parent, focused = document.activeElement;
+
+      // If this is a big refresh, remove the terminal rows from the DOM for faster calculations
+      if (end - start >= this.rows / 2) {
+        parent = this.element.parentNode;
+        if (parent) {
+          this.element.removeChild(this.rowContainer);
+        }
+      }
+
+      width = this.cols;
+      y = start;
+
+      if (end >= this.rows.length) {
+        this.log('`end` is too large. Most likely a bad CSR.');
+        end = this.rows.length - 1;
+      }
+
+      for (; y <= end; y++) {
+        row = y + this.ydisp;
+
+        line = this.lines[row];
+        out = '';
+
+        if (this.y === y - (this.ybase - this.ydisp)
+            && this.cursorState
+            && !this.cursorHidden) {
+          x = this.x;
+        } else {
+          x = -1;
+        }
+
+        attr = this.defAttr;
+        i = 0;
+
+        for (; i < width; i++) {
+          data = line[i][0];
+          ch = line[i][1];
+          ch_width = line[i][2];
+          if (!ch_width)
+            continue;
+
+          if (i === x) data = -1;
+
+          if (data !== attr) {
+            if (attr !== this.defAttr) {
+              out += '</span>';
+            }
+            if (data !== this.defAttr) {
+              if (data === -1) {
+                out += '<span class="reverse-video terminal-cursor';
+                if (this.cursorBlink) {
+                  out += ' blinking';
+                }
+                out += '">';
+              } else {
+                var classNames = [];
+
+                bg = data & 0x1ff;
+                fg = (data >> 9) & 0x1ff;
+                flags = data >> 18;
+
+                if (flags & Terminal.flags.BOLD) {
+                  if (!Terminal.brokenBold) {
+                    classNames.push('xterm-bold');
+                  }
+                  // See: XTerm*boldColors
+                  if (fg < 8) fg += 8;
+                }
+
+                if (flags & Terminal.flags.UNDERLINE) {
+                  classNames.push('xterm-underline');
+                }
+
+                if (flags & Terminal.flags.BLINK) {
+                  classNames.push('xterm-blink');
+                }
+
+                /**
+                 * If inverse flag is on, then swap the foreground and background variables.
+                 */
+                if (flags & Terminal.flags.INVERSE) {
+                    /* One-line variable swap in JavaScript: http://stackoverflow.com/a/16201730 */
+                    bg = [fg, fg = bg][0];
+                    // Should inverse just be before the
+                    // above boldColors effect instead?
+                    if ((flags & 1) && fg < 8) fg += 8;
+                }
+
+                if (flags & Terminal.flags.INVISIBLE) {
+                  classNames.push('xterm-hidden');
+                }
+
+                /**
+                 * Weird situation: Invert flag used black foreground and white background results
+                 * in invalid background color, positioned at the 256 index of the 256 terminal
+                 * color map. Pin the colors manually in such a case.
+                 *
+                 * Source: https://github.com/sourcelair/xterm.js/issues/57
+                 */
+                if (flags & Terminal.flags.INVERSE) {
+                  if (bg == 257) {
+                    bg = 15;
+                  }
+                  if (fg == 256) {
+                    fg = 0;
+                  }
+                }
+
+                if (bg < 256) {
+                  classNames.push('xterm-bg-color-' + bg);
+                }
+
+                if (fg < 256) {
+                  classNames.push('xterm-color-' + fg);
+                }
+
+                out += '<span';
+                if (classNames.length) {
+                  out += ' class="' + classNames.join(' ') + '"';
+                }
+                out += '>';
+              }
+            }
+          }
+
+          switch (ch) {
+            case '&':
+              out += '&amp;';
+              break;
+            case '<':
+              out += '&lt;';
+              break;
+            case '>':
+              out += '&gt;';
+              break;
+            default:
+              if (ch <= ' ') {
+                out += '&nbsp;';
+              } else {
+                out += ch;
+              }
+              break;
+          }
+
+          attr = data;
+        }
+
+        if (attr !== this.defAttr) {
+          out += '</span>';
+        }
+
+        this.children[y].innerHTML = out;
+      }
+
+      if (parent) {
+        this.element.appendChild(this.rowContainer);
+      }
+
+      this.emit('refresh', {element: this.element, start: start, end: end});
+    };
+
+    /**
+     * Display the cursor element
+     */
+    Terminal.prototype.showCursor = function() {
+      if (!this.cursorState) {
+        this.cursorState = 1;
+        this.refresh(this.y, this.y);
+      }
+    };
+
+    /**
+     * Scroll the terminal
+     */
+    Terminal.prototype.scroll = function() {
+      var row;
+
+      if (++this.ybase === this.scrollback) {
+        this.ybase = this.ybase / 2 | 0;
+        this.lines = this.lines.slice(-(this.ybase + this.rows) + 1);
+      }
+
+      this.ydisp = this.ybase;
+
+      // last line
+      row = this.ybase + this.rows - 1;
+
+      // subtract the bottom scroll region
+      row -= this.rows - 1 - this.scrollBottom;
+
+      if (row === this.lines.length) {
+        // potential optimization:
+        // pushing is faster than splicing
+        // when they amount to the same
+        // behavior.
+        this.lines.push(this.blankLine());
+      } else {
+        // add our new line
+        this.lines.splice(row, 0, this.blankLine());
+      }
+
+      if (this.scrollTop !== 0) {
+        if (this.ybase !== 0) {
+          this.ybase--;
+          this.ydisp = this.ybase;
+        }
+        this.lines.splice(this.ybase + this.scrollTop, 1);
+      }
+
+      // this.maxRange();
+      this.updateRange(this.scrollTop);
+      this.updateRange(this.scrollBottom);
+    };
+
+    /**
+     * Scroll the display of the terminal
+     * @param {number} disp The number of lines to scroll down (negatives scroll up).
+     */
+    Terminal.prototype.scrollDisp = function(disp) {
+      this.ydisp += disp;
+
+      if (this.ydisp > this.ybase) {
+        this.ydisp = this.ybase;
+      } else if (this.ydisp < 0) {
+        this.ydisp = 0;
+      }
+
+      this.refresh(0, this.rows - 1);
+    };
+
+    /**
+     * Writes text to the terminal.
+     * @param {string} text The text to write to the terminal.
+     */
+    Terminal.prototype.write = function(data) {
+      var l = data.length, i = 0, j, cs, ch, code, low, ch_width, row;
+
+      this.refreshStart = this.y;
+      this.refreshEnd = this.y;
+
+      if (this.ybase !== this.ydisp) {
+        this.ydisp = this.ybase;
+        this.maxRange();
+      }
+
+      // apply leftover surrogate high from last write
+      if (this.surrogate_high) {
+        data = this.surrogate_high + data;
+        this.surrogate_high = '';
+      }
+
+      for (; i < l; i++) {
+        ch = data[i];
+
+        // FIXME: higher chars than 0xa0 are not allowed in escape sequences
+        //        --> maybe move to default
+        code = data.charCodeAt(i);
+        if (0xD800 <= code && code <= 0xDBFF) {
+          // we got a surrogate high
+          // get surrogate low (next 2 bytes)
+          low = data.charCodeAt(i+1);
+          if (isNaN(low)) {
+            // end of data stream, save surrogate high
+            this.surrogate_high = ch;
+            continue;
+          }
+          code = ((code - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;
+          ch += data.charAt(i+1);
+        }
+        // surrogate low - already handled above
+        if (0xDC00 <= code && code <= 0xDFFF)
+          continue;
+
+        switch (this.state) {
+          case normal:
+            switch (ch) {
+              case '\x07':
+                this.bell();
+                break;
+
+              // '\n', '\v', '\f'
+              case '\n':
+              case '\x0b':
+              case '\x0c':
+                if (this.convertEol) {
+                  this.x = 0;
+                }
+                this.y++;
+                if (this.y > this.scrollBottom) {
+                  this.y--;
+                  this.scroll();
+                }
+                break;
+
+              // '\r'
+              case '\r':
+                this.x = 0;
+                break;
+
+              // '\b'
+              case '\x08':
+                if (this.x > 0) {
+                  this.x--;
+                }
+                break;
+
+              // '\t'
+              case '\t':
+                this.x = this.nextStop();
+                break;
+
+              // shift out
+              case '\x0e':
+                this.setgLevel(1);
+                break;
+
+              // shift in
+              case '\x0f':
+                this.setgLevel(0);
+                break;
+
+              // '\e'
+              case '\x1b':
+                this.state = escaped;
+                break;
+
+              default:
+                // ' '
+                // calculate print space
+                // expensive call, therefore we save width in line buffer
+                ch_width = wcwidth(code);
+
+                if (ch >= ' ') {
+                  if (this.charset && this.charset[ch]) {
+                    ch = this.charset[ch];
+                  }
+
+                  row = this.y + this.ybase;
+
+                  // insert combining char in last cell
+                  // FIXME: needs handling after cursor jumps
+                  if (!ch_width && this.x) {
+
+                    // dont overflow left
+                    if (this.lines[row][this.x-1]) {
+                      if (!this.lines[row][this.x-1][2]) {
+
+                        // found empty cell after fullwidth, need to go 2 cells back
+                        if (this.lines[row][this.x-2])
+                          this.lines[row][this.x-2][1] += ch;
+
+                      } else {
+                        this.lines[row][this.x-1][1] += ch;
+                      }
+                      this.updateRange(this.y);
+                    }
+                    break;
+                  }
+
+                  // goto next line if ch would overflow
+                  // TODO: needs a global min terminal width of 2
+                  if (this.x+ch_width-1 >= this.cols) {
+                    // autowrap - DECAWM
+                    if (this.wraparoundMode) {
+                      this.x = 0;
+                      this.y++;
+                      if (this.y > this.scrollBottom) {
+                        this.y--;
+                        this.scroll();
+                      }
+                    } else {
+                      this.x = this.cols-1;
+                      if(ch_width===2)  // FIXME: check for xterm behavior
+                        continue;
+                    }
+                  }
+                  row = this.y + this.ybase;
+
+                  // insert mode: move characters to right
+                  if (this.insertMode) {
+                    // do this twice for a fullwidth char
+                    for (var moves=0; moves<ch_width; ++moves) {
+                      // remove last cell, if it's width is 0
+                      // we have to adjust the second last cell as well
+                      var removed = this.lines[this.y + this.ybase].pop();
+                      if (removed[2]===0
+                          && this.lines[row][this.cols-2]
+                          && this.lines[row][this.cols-2][2]===2)
+                        this.lines[row][this.cols-2] = [this.curAttr, ' ', 1];
+
+                      // insert empty cell at cursor
+                      this.lines[row].splice(this.x, 0, [this.curAttr, ' ', 1]);
+                    }
+                  }
+
+                  this.lines[row][this.x] = [this.curAttr, ch, ch_width];
+                  this.x++;
+                  this.updateRange(this.y);
+
+                  // fullwidth char - set next cell width to zero and advance cursor
+                  if (ch_width===2) {
+                    this.lines[row][this.x] = [this.curAttr, '', 0];
+                    this.x++;
+                  }
+                }
+                break;
+            }
+            break;
+          case escaped:
+            switch (ch) {
+              // ESC [ Control Sequence Introducer ( CSI is 0x9b).
+              case '[':
+                this.params = [];
+                this.currentParam = 0;
+                this.state = csi;
+                break;
+
+              // ESC ] Operating System Command ( OSC is 0x9d).
+              case ']':
+                this.params = [];
+                this.currentParam = 0;
+                this.state = osc;
+                break;
+
+              // ESC P Device Control String ( DCS is 0x90).
+              case 'P':
+                this.params = [];
+                this.currentParam = 0;
+                this.state = dcs;
+                break;
+
+              // ESC _ Application Program Command ( APC is 0x9f).
+              case '_':
+                this.state = ignore;
+                break;
+
+              // ESC ^ Privacy Message ( PM is 0x9e).
+              case '^':
+                this.state = ignore;
+                break;
+
+              // ESC c Full Reset (RIS).
+              case 'c':
+                this.reset();
+                break;
+
+              // ESC E Next Line ( NEL is 0x85).
+              // ESC D Index ( IND is 0x84).
+              case 'E':
+                this.x = 0;
+                ;
+              case 'D':
+                this.index();
+                break;
+
+              // ESC M Reverse Index ( RI is 0x8d).
+              case 'M':
+                this.reverseIndex();
+                break;
+
+              // ESC % Select default/utf-8 character set.
+              // @ = default, G = utf-8
+              case '%':
+                //this.charset = null;
+                this.setgLevel(0);
+                this.setgCharset(0, Terminal.charsets.US);
+                this.state = normal;
+                i++;
+                break;
+
+              // ESC (,),*,+,-,. Designate G0-G2 Character Set.
+              case '(': // <-- this seems to get all the attention
+              case ')':
+              case '*':
+              case '+':
+              case '-':
+              case '.':
+                switch (ch) {
+                  case '(':
+                    this.gcharset = 0;
+                    break;
+                  case ')':
+                    this.gcharset = 1;
+                    break;
+                  case '*':
+                    this.gcharset = 2;
+                    break;
+                  case '+':
+                    this.gcharset = 3;
+                    break;
+                  case '-':
+                    this.gcharset = 1;
+                    break;
+                  case '.':
+                    this.gcharset = 2;
+                    break;
+                }
+                this.state = charset;
+                break;
+
+              // Designate G3 Character Set (VT300).
+              // A = ISO Latin-1 Supplemental.
+              // Not implemented.
+              case '/':
+                this.gcharset = 3;
+                this.state = charset;
+                i--;
+                break;
+
+              // ESC N
+              // Single Shift Select of G2 Character Set
+              // ( SS2 is 0x8e). This affects next character only.
+              case 'N':
+                break;
+              // ESC O
+              // Single Shift Select of G3 Character Set
+              // ( SS3 is 0x8f). This affects next character only.
+              case 'O':
+                break;
+              // ESC n
+              // Invoke the G2 Character Set as GL (LS2).
+              case 'n':
+                this.setgLevel(2);
+                break;
+              // ESC o
+              // Invoke the G3 Character Set as GL (LS3).
+              case 'o':
+                this.setgLevel(3);
+                break;
+              // ESC |
+              // Invoke the G3 Character Set as GR (LS3R).
+              case '|':
+                this.setgLevel(3);
+                break;
+              // ESC }
+              // Invoke the G2 Character Set as GR (LS2R).
+              case '}':
+                this.setgLevel(2);
+                break;
+              // ESC ~
+              // Invoke the G1 Character Set as GR (LS1R).
+              case '~':
+                this.setgLevel(1);
+                break;
+
+              // ESC 7 Save Cursor (DECSC).
+              case '7':
+                this.saveCursor();
+                this.state = normal;
+                break;
+
+              // ESC 8 Restore Cursor (DECRC).
+              case '8':
+                this.restoreCursor();
+                this.state = normal;
+                break;
+
+              // ESC # 3 DEC line height/width
+              case '#':
+                this.state = normal;
+                i++;
+                break;
+
+              // ESC H Tab Set (HTS is 0x88).
+              case 'H':
+                this.tabSet();
+                break;
+
+              // ESC = Application Keypad (DECPAM).
+              case '=':
+                this.log('Serial port requested application keypad.');
+                this.applicationKeypad = true;
+                this.state = normal;
+                break;
+
+              // ESC > Normal Keypad (DECPNM).
+              case '>':
+                this.log('Switching back to normal keypad.');
+                this.applicationKeypad = false;
+                this.state = normal;
+                break;
+
+              default:
+                this.state = normal;
+                this.error('Unknown ESC control: %s.', ch);
+                break;
+            }
+            break;
+
+          case charset:
+            switch (ch) {
+              case '0': // DEC Special Character and Line Drawing Set.
+                cs = Terminal.charsets.SCLD;
+                break;
+              case 'A': // UK
+                cs = Terminal.charsets.UK;
+                break;
+              case 'B': // United States (USASCII).
+                cs = Terminal.charsets.US;
+                break;
+              case '4': // Dutch
+                cs = Terminal.charsets.Dutch;
+                break;
+              case 'C': // Finnish
+              case '5':
+                cs = Terminal.charsets.Finnish;
+                break;
+              case 'R': // French
+                cs = Terminal.charsets.French;
+                break;
+              case 'Q': // FrenchCanadian
+                cs = Terminal.charsets.FrenchCanadian;
+                break;
+              case 'K': // German
+                cs = Terminal.charsets.German;
+                break;
+              case 'Y': // Italian
+                cs = Terminal.charsets.Italian;
+                break;
+              case 'E': // NorwegianDanish
+              case '6':
+                cs = Terminal.charsets.NorwegianDanish;
+                break;
+              case 'Z': // Spanish
+                cs = Terminal.charsets.Spanish;
+                break;
+              case 'H': // Swedish
+              case '7':
+                cs = Terminal.charsets.Swedish;
+                break;
+              case '=': // Swiss
+                cs = Terminal.charsets.Swiss;
+                break;
+              case '/': // ISOLatin (actually /A)
+                cs = Terminal.charsets.ISOLatin;
+                i++;
+                break;
+              default: // Default
+                cs = Terminal.charsets.US;
+                break;
+            }
+            this.setgCharset(this.gcharset, cs);
+            this.gcharset = null;
+            this.state = normal;
+            break;
+
+          case osc:
+            // OSC Ps ; Pt ST
+            // OSC Ps ; Pt BEL
+            //   Set Text Parameters.
+            if (ch === '\x1b' || ch === '\x07') {
+              if (ch === '\x1b') i++;
+
+              this.params.push(this.currentParam);
+
+              switch (this.params[0]) {
+                case 0:
+                case 1:
+                case 2:
+                  if (this.params[1]) {
+                    this.title = this.params[1];
+                    this.handleTitle(this.title);
+                  }
+                  break;
+                case 3:
+                  // set X property
+                  break;
+                case 4:
+                case 5:
+                  // change dynamic colors
+                  break;
+                case 10:
+                case 11:
+                case 12:
+                case 13:
+                case 14:
+                case 15:
+                case 16:
+                case 17:
+                case 18:
+                case 19:
+                  // change dynamic ui colors
+                  break;
+                case 46:
+                  // change log file
+                  break;
+                case 50:
+                  // dynamic font
+                  break;
+                case 51:
+                  // emacs shell
+                  break;
+                case 52:
+                  // manipulate selection data
+                  break;
+                case 104:
+                case 105:
+                case 110:
+                case 111:
+                case 112:
+                case 113:
+                case 114:
+                case 115:
+                case 116:
+                case 117:
+                case 118:
+                  // reset colors
+                  break;
+              }
+
+              this.params = [];
+              this.currentParam = 0;
+              this.state = normal;
+            } else {
+              if (!this.params.length) {
+                if (ch >= '0' && ch <= '9') {
+                  this.currentParam =
+                    this.currentParam * 10 + ch.charCodeAt(0) - 48;
+                } else if (ch === ';') {
+                  this.params.push(this.currentParam);
+                  this.currentParam = '';
+                }
+              } else {
+                this.currentParam += ch;
+              }
+            }
+            break;
+
+          case csi:
+            // '?', '>', '!'
+            if (ch === '?' || ch === '>' || ch === '!') {
+              this.prefix = ch;
+              break;
+            }
+
+            // 0 - 9
+            if (ch >= '0' && ch <= '9') {
+              this.currentParam = this.currentParam * 10 + ch.charCodeAt(0) - 48;
+              break;
+            }
+
+            // '$', '"', ' ', '\''
+            if (ch === '$' || ch === '"' || ch === ' ' || ch === '\'') {
+              this.postfix = ch;
+              break;
+            }
+
+            this.params.push(this.currentParam);
+            this.currentParam = 0;
+
+            // ';'
+            if (ch === ';') break;
+
+            this.state = normal;
+
+            switch (ch) {
+              // CSI Ps A
+              // Cursor Up Ps Times (default = 1) (CUU).
+              case 'A':
+                this.cursorUp(this.params);
+                break;
+
+              // CSI Ps B
+              // Cursor Down Ps Times (default = 1) (CUD).
+              case 'B':
+                this.cursorDown(this.params);
+                break;
+
+              // CSI Ps C
+              // Cursor Forward Ps Times (default = 1) (CUF).
+              case 'C':
+                this.cursorForward(this.params);
+                break;
+
+              // CSI Ps D
+              // Cursor Backward Ps Times (default = 1) (CUB).
+              case 'D':
+                this.cursorBackward(this.params);
+                break;
+
+              // CSI Ps ; Ps H
+              // Cursor Position [row;column] (default = [1,1]) (CUP).
+              case 'H':
+                this.cursorPos(this.params);
+                break;
+
+              // CSI Ps J  Erase in Display (ED).
+              case 'J':
+                this.eraseInDisplay(this.params);
+                break;
+
+              // CSI Ps K  Erase in Line (EL).
+              case 'K':
+                this.eraseInLine(this.params);
+                break;
+
+              // CSI Pm m  Character Attributes (SGR).
+              case 'm':
+                if (!this.prefix) {
+                  this.charAttributes(this.params);
+                }
+                break;
+
+              // CSI Ps n  Device Status Report (DSR).
+              case 'n':
+                if (!this.prefix) {
+                  this.deviceStatus(this.params);
+                }
+                break;
+
+              /**
+               * Additions
+               */
+
+              // CSI Ps @
+              // Insert Ps (Blank) Character(s) (default = 1) (ICH).
+              case '@':
+                this.insertChars(this.params);
+                break;
+
+              // CSI Ps E
+              // Cursor Next Line Ps Times (default = 1) (CNL).
+              case 'E':
+                this.cursorNextLine(this.params);
+                break;
+
+              // CSI Ps F
+              // Cursor Preceding Line Ps Times (default = 1) (CNL).
+              case 'F':
+                this.cursorPrecedingLine(this.params);
+                break;
+
+              // CSI Ps G
+              // Cursor Character Absolute  [column] (default = [row,1]) (CHA).
+              case 'G':
+                this.cursorCharAbsolute(this.params);
+                break;
+
+              // CSI Ps L
+              // Insert Ps Line(s) (default = 1) (IL).
+              case 'L':
+                this.insertLines(this.params);
+                break;
+
+              // CSI Ps M
+              // Delete Ps Line(s) (default = 1) (DL).
+              case 'M':
+                this.deleteLines(this.params);
+                break;
+
+              // CSI Ps P
+              // Delete Ps Character(s) (default = 1) (DCH).
+              case 'P':
+                this.deleteChars(this.params);
+                break;
+
+              // CSI Ps X
+              // Erase Ps Character(s) (default = 1) (ECH).
+              case 'X':
+                this.eraseChars(this.params);
+                break;
+
+              // CSI Pm `  Character Position Absolute
+              //   [column] (default = [row,1]) (HPA).
+              case '`':
+                this.charPosAbsolute(this.params);
+                break;
+
+              // 141 61 a * HPR -
+              // Horizontal Position Relative
+              case 'a':
+                this.HPositionRelative(this.params);
+                break;
+
+              // CSI P s c
+              // Send Device Attributes (Primary DA).
+              // CSI > P s c
+              // Send Device Attributes (Secondary DA)
+              case 'c':
+                this.sendDeviceAttributes(this.params);
+                break;
+
+              // CSI Pm d
+              // Line Position Absolute  [row] (default = [1,column]) (VPA).
+              case 'd':
+                this.linePosAbsolute(this.params);
+                break;
+
+              // 145 65 e * VPR - Vertical Position Relative
+              case 'e':
+                this.VPositionRelative(this.params);
+                break;
+
+              // CSI Ps ; Ps f
+              //   Horizontal and Vertical Position [row;column] (default =
+              //   [1,1]) (HVP).
+              case 'f':
+                this.HVPosition(this.params);
+                break;
+
+              // CSI Pm h  Set Mode (SM).
+              // CSI ? Pm h - mouse escape codes, cursor escape codes
+              case 'h':
+                this.setMode(this.params);
+                break;
+
+              // CSI Pm l  Reset Mode (RM).
+              // CSI ? Pm l
+              case 'l':
+                this.resetMode(this.params);
+                break;
+
+              // CSI Ps ; Ps r
+              //   Set Scrolling Region [top;bottom] (default = full size of win-
+              //   dow) (DECSTBM).
+              // CSI ? Pm r
+              case 'r':
+                this.setScrollRegion(this.params);
+                break;
+
+              // CSI s
+              //   Save cursor (ANSI.SYS).
+              case 's':
+                this.saveCursor(this.params);
+                break;
+
+              // CSI u
+              //   Restore cursor (ANSI.SYS).
+              case 'u':
+                this.restoreCursor(this.params);
+                break;
+
+              /**
+               * Lesser Used
+               */
+
+              // CSI Ps I
+              // Cursor Forward Tabulation Ps tab stops (default = 1) (CHT).
+              case 'I':
+                this.cursorForwardTab(this.params);
+                break;
+
+              // CSI Ps S  Scroll up Ps lines (default = 1) (SU).
+              case 'S':
+                this.scrollUp(this.params);
+                break;
+
+              // CSI Ps T  Scroll down Ps lines (default = 1) (SD).
+              // CSI Ps ; Ps ; Ps ; Ps ; Ps T
+              // CSI > Ps; Ps T
+              case 'T':
+                // if (this.prefix === '>') {
+                //   this.resetTitleModes(this.params);
+                //   break;
+                // }
+                // if (this.params.length > 2) {
+                //   this.initMouseTracking(this.params);
+                //   break;
+                // }
+                if (this.params.length < 2 && !this.prefix) {
+                  this.scrollDown(this.params);
+                }
+                break;
+
+              // CSI Ps Z
+              // Cursor Backward Tabulation Ps tab stops (default = 1) (CBT).
+              case 'Z':
+                this.cursorBackwardTab(this.params);
+                break;
+
+              // CSI Ps b  Repeat the preceding graphic character Ps times (REP).
+              case 'b':
+                this.repeatPrecedingCharacter(this.params);
+                break;
+
+              // CSI Ps g  Tab Clear (TBC).
+              case 'g':
+                this.tabClear(this.params);
+                break;
+
+              // CSI Pm i  Media Copy (MC).
+              // CSI ? Pm i
+              // case 'i':
+              //   this.mediaCopy(this.params);
+              //   break;
+
+              // CSI Pm m  Character Attributes (SGR).
+              // CSI > Ps; Ps m
+              // case 'm': // duplicate
+              //   if (this.prefix === '>') {
+              //     this.setResources(this.params);
+              //   } else {
+              //     this.charAttributes(this.params);
+              //   }
+              //   break;
+
+              // CSI Ps n  Device Status Report (DSR).
+              // CSI > Ps n
+              // case 'n': // duplicate
+              //   if (this.prefix === '>') {
+              //     this.disableModifiers(this.params);
+              //   } else {
+              //     this.deviceStatus(this.params);
+              //   }
+              //   break;
+
+              // CSI > Ps p  Set pointer mode.
+              // CSI ! p   Soft terminal reset (DECSTR).
+              // CSI Ps$ p
+              //   Request ANSI mode (DECRQM).
+              // CSI ? Ps$ p
+              //   Request DEC private mode (DECRQM).
+              // CSI Ps ; Ps " p
+              case 'p':
+                switch (this.prefix) {
+                  // case '>':
+                  //   this.setPointerMode(this.params);
+                  //   break;
+                  case '!':
+                    this.softReset(this.params);
+                    break;
+                  // case '?':
+                  //   if (this.postfix === '$') {
+                  //     this.requestPrivateMode(this.params);
+                  //   }
+                  //   break;
+                  // default:
+                  //   if (this.postfix === '"') {
+                  //     this.setConformanceLevel(this.params);
+                  //   } else if (this.postfix === '$') {
+                  //     this.requestAnsiMode(this.params);
+                  //   }
+                  //   break;
+                }
+                break;
+
+              // CSI Ps q  Load LEDs (DECLL).
+              // CSI Ps SP q
+              // CSI Ps " q
+              // case 'q':
+              //   if (this.postfix === ' ') {
+              //     this.setCursorStyle(this.params);
+              //     break;
+              //   }
+              //   if (this.postfix === '"') {
+              //     this.setCharProtectionAttr(this.params);
+              //     break;
+              //   }
+              //   this.loadLEDs(this.params);
+              //   break;
+
+              // CSI Ps ; Ps r
+              //   Set Scrolling Region [top;bottom] (default = full size of win-
+              //   dow) (DECSTBM).
+              // CSI ? Pm r
+              // CSI Pt; Pl; Pb; Pr; Ps$ r
+              // case 'r': // duplicate
+              //   if (this.prefix === '?') {
+              //     this.restorePrivateValues(this.params);
+              //   } else if (this.postfix === '$') {
+              //     this.setAttrInRectangle(this.params);
+              //   } else {
+              //     this.setScrollRegion(this.params);
+              //   }
+              //   break;
+
+              // CSI s     Save cursor (ANSI.SYS).
+              // CSI ? Pm s
+              // case 's': // duplicate
+              //   if (this.prefix === '?') {
+              //     this.savePrivateValues(this.params);
+              //   } else {
+              //     this.saveCursor(this.params);
+              //   }
+              //   break;
+
+              // CSI Ps ; Ps ; Ps t
+              // CSI Pt; Pl; Pb; Pr; Ps$ t
+              // CSI > Ps; Ps t
+              // CSI Ps SP t
+              // case 't':
+              //   if (this.postfix === '$') {
+              //     this.reverseAttrInRectangle(this.params);
+              //   } else if (this.postfix === ' ') {
+              //     this.setWarningBellVolume(this.params);
+              //   } else {
+              //     if (this.prefix === '>') {
+              //       this.setTitleModeFeature(this.params);
+              //     } else {
+              //       this.manipulateWindow(this.params);
+              //     }
+              //   }
+              //   break;
+
+              // CSI u     Restore cursor (ANSI.SYS).
+              // CSI Ps SP u
+              // case 'u': // duplicate
+              //   if (this.postfix === ' ') {
+              //     this.setMarginBellVolume(this.params);
+              //   } else {
+              //     this.restoreCursor(this.params);
+              //   }
+              //   break;
+
+              // CSI Pt; Pl; Pb; Pr; Pp; Pt; Pl; Pp$ v
+              // case 'v':
+              //   if (this.postfix === '$') {
+              //     this.copyRectagle(this.params);
+              //   }
+              //   break;
+
+              // CSI Pt ; Pl ; Pb ; Pr ' w
+              // case 'w':
+              //   if (this.postfix === '\'') {
+              //     this.enableFilterRectangle(this.params);
+              //   }
+              //   break;
+
+              // CSI Ps x  Request Terminal Parameters (DECREQTPARM).
+              // CSI Ps x  Select Attribute Change Extent (DECSACE).
+              // CSI Pc; Pt; Pl; Pb; Pr$ x
+              // case 'x':
+              //   if (this.postfix === '$') {
+              //     this.fillRectangle(this.params);
+              //   } else {
+              //     this.requestParameters(this.params);
+              //     //this.__(this.params);
+              //   }
+              //   break;
+
+              // CSI Ps ; Pu ' z
+              // CSI Pt; Pl; Pb; Pr$ z
+              // case 'z':
+              //   if (this.postfix === '\'') {
+              //     this.enableLocatorReporting(this.params);
+              //   } else if (this.postfix === '$') {
+              //     this.eraseRectangle(this.params);
+              //   }
+              //   break;
+
+              // CSI Pm ' {
+              // CSI Pt; Pl; Pb; Pr$ {
+              // case '{':
+              //   if (this.postfix === '\'') {
+              //     this.setLocatorEvents(this.params);
+              //   } else if (this.postfix === '$') {
+              //     this.selectiveEraseRectangle(this.params);
+              //   }
+              //   break;
+
+              // CSI Ps ' |
+              // case '|':
+              //   if (this.postfix === '\'') {
+              //     this.requestLocatorPosition(this.params);
+              //   }
+              //   break;
+
+              // CSI P m SP }
+              // Insert P s Column(s) (default = 1) (DECIC), VT420 and up.
+              // case '}':
+              //   if (this.postfix === ' ') {
+              //     this.insertColumns(this.params);
+              //   }
+              //   break;
+
+              // CSI P m SP ~
+              // Delete P s Column(s) (default = 1) (DECDC), VT420 and up
+              // case '~':
+              //   if (this.postfix === ' ') {
+              //     this.deleteColumns(this.params);
+              //   }
+              //   break;
+
+              default:
+                this.error('Unknown CSI code: %s.', ch);
+                break;
+            }
+
+            this.prefix = '';
+            this.postfix = '';
+            break;
+
+          case dcs:
+            if (ch === '\x1b' || ch === '\x07') {
+              if (ch === '\x1b') i++;
+
+              switch (this.prefix) {
+                // User-Defined Keys (DECUDK).
+                case '':
+                  break;
+
+                // Request Status String (DECRQSS).
+                // test: echo -e '\eP$q"p\e\\'
+                case '$q':
+                  var pt = this.currentParam
+                    , valid = false;
+
+                  switch (pt) {
+                    // DECSCA
+                    case '"q':
+                      pt = '0"q';
+                      break;
+
+                    // DECSCL
+                    case '"p':
+                      pt = '61"p';
+                      break;
+
+                    // DECSTBM
+                    case 'r':
+                      pt = ''
+                        + (this.scrollTop + 1)
+                        + ';'
+                        + (this.scrollBottom + 1)
+                        + 'r';
+                      break;
+
+                    // SGR
+                    case 'm':
+                      pt = '0m';
+                      break;
+
+                    default:
+                      this.error('Unknown DCS Pt: %s.', pt);
+                      pt = '';
+                      break;
+                  }
+
+                  this.send('\x1bP' + +valid + '$r' + pt + '\x1b\\');
+                  break;
+
+                // Set Termcap/Terminfo Data (xterm, experimental).
+                case '+p':
+                  break;
+
+                // Request Termcap/Terminfo String (xterm, experimental)
+                // Regular xterm does not even respond to this sequence.
+                // This can cause a small glitch in vim.
+                // test: echo -ne '\eP+q6b64\e\\'
+                case '+q':
+                  var pt = this.currentParam
+                    , valid = false;
+
+                  this.send('\x1bP' + +valid + '+r' + pt + '\x1b\\');
+                  break;
+
+                default:
+                  this.error('Unknown DCS prefix: %s.', this.prefix);
+                  break;
+              }
+
+              this.currentParam = 0;
+              this.prefix = '';
+              this.state = normal;
+            } else if (!this.currentParam) {
+              if (!this.prefix && ch !== '$' && ch !== '+') {
+                this.currentParam = ch;
+              } else if (this.prefix.length === 2) {
+                this.currentParam = ch;
+              } else {
+                this.prefix += ch;
+              }
+            } else {
+              this.currentParam += ch;
+            }
+            break;
+
+          case ignore:
+            // For PM and APC.
+            if (ch === '\x1b' || ch === '\x07') {
+              if (ch === '\x1b') i++;
+              this.state = normal;
+            }
+            break;
+        }
+      }
+
+      this.updateRange(this.y);
+      this.refresh(this.refreshStart, this.refreshEnd);
+    };
+
+    /**
+     * Writes text to the terminal, followed by a break line character (\n).
+     * @param {string} text The text to write to the terminal.
+     */
+    Terminal.prototype.writeln = function(data) {
+      this.write(data + '\r\n');
+    };
+
+    /**
+     * Attaches a custom keydown handler which is run before keys are processed, giving consumers of
+     * xterm.js ultimate control as to what keys should be processed by the terminal and what keys
+     * should not.
+     * @param {function} customKeydownHandler The custom KeyboardEvent handler to attach. This is a
+     *   function that takes a KeyboardEvent, allowing consumers to stop propogation and/or prevent
+     *   the default action. The function returns whether the event should be processed by xterm.js.
+     */
+    Terminal.prototype.attachCustomKeydownHandler = function(customKeydownHandler) {
+      this.customKeydownHandler = customKeydownHandler;
+    }
+
+    /**
+     * Handle a keydown event
+     * Key Resources:
+     *   - https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent
+     * @param {KeyboardEvent} ev The keydown event to be handled.
+     */
+    Terminal.prototype.keyDown = function(ev) {
+      if (this.customKeydownHandler && this.customKeydownHandler(ev) === false) {
+        return false;
+      }
+
+      if (!this.compositionHelper.keydown.bind(this.compositionHelper)(ev)) {
+        return false;
+      }
+
+      var self = this;
+      var result = this.evaluateKeyEscapeSequence(ev);
+
+      if (result.scrollDisp) {
+        this.scrollDisp(result.scrollDisp);
+        return this.cancel(ev);
+      }
+
+      if (isThirdLevelShift(this, ev)) {
+        return true;
+      }
+
+      if (result.cancel ) {
+        // The event is canceled at the end already, is this necessary?
+        this.cancel(ev, true);
+      }
+
+      if (!result.key) {
+        return true;
+      }
+
+      this.emit('keydown', ev);
+      this.emit('key', result.key, ev);
+      this.showCursor();
+      this.handler(result.key);
+
+      return this.cancel(ev, true);
+    };
+
+    /**
+     * Returns an object that determines how a KeyboardEvent should be handled. The key of the
+     * returned value is the new key code to pass to the PTY.
+     *
+     * Reference: http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
+     * @param {KeyboardEvent} ev The keyboard event to be translated to key escape sequence.
+     */
+    Terminal.prototype.evaluateKeyEscapeSequence = function(ev) {
+      var result = {
+        // Whether to cancel event propogation (NOTE: this may not be needed since the event is
+        // canceled at the end of keyDown
+        cancel: false,
+        // The new key even to emit
+        key: undefined,
+        // The number of characters to scroll, if this is defined it will cancel the event
+        scrollDisp: undefined
+      };
+      var modifiers = ev.shiftKey << 0 | ev.altKey << 1 | ev.ctrlKey << 2 | ev.metaKey << 3;
+      switch (ev.keyCode) {
+        // backspace
+        case 8:
+          if (ev.shiftKey) {
+            result.key = '\x08'; // ^H
+            break;
+          }
+          result.key = '\x7f'; // ^?
+          break;
+        // tab
+        case 9:
+          if (ev.shiftKey) {
+            result.key = '\x1b[Z';
+            break;
+          }
+          result.key = '\t';
+          result.cancel = true;
+          break;
+        // return/enter
+        case 13:
+          result.key = '\r';
+          result.cancel = true;
+          break;
+        // escape
+        case 27:
+          result.key = '\x1b';
+          result.cancel = true;
+          break;
+        // left-arrow
+        case 37:
+          if (modifiers)
+            result.key = '\x1b[1;' + (modifiers + 1) + 'D';
+          else if (this.applicationCursor)
+            result.key = '\x1bOD';
+          else
+            result.key = '\x1b[D';
+          break;
+        // right-arrow
+        case 39:
+          if (modifiers)
+            result.key = '\x1b[1;' + (modifiers + 1) + 'C';
+          else if (this.applicationCursor)
+            result.key = '\x1bOC';
+          else
+            result.key = '\x1b[C';
+          break;
+        // up-arrow
+        case 38:
+          if (modifiers)
+            result.key = '\x1b[1;' + (modifiers + 1) + 'A';
+          else if (this.applicationCursor)
+            result.key = '\x1bOA';
+          else
+            result.key = '\x1b[A';
+          break;
+        // down-arrow
+        case 40:
+          if (modifiers)
+            result.key = '\x1b[1;' + (modifiers + 1) + 'B';
+          else if (this.applicationCursor)
+            result.key = '\x1bOB';
+          else
+            result.key = '\x1b[B';
+          break;
+        // insert
+        case 45:
+          if (!ev.shiftKey && !ev.ctrlKey) {
+            // <Ctrl> or <Shift> + <Insert> are used to
+            // copy-paste on some systems.
+            result.key = '\x1b[2~';
+          }
+          break;
+        // delete
+        case 46: result.key = '\x1b[3~'; break;
+        // home
+        case 36:
+          if (modifiers)
+            result.key = '\x1b[1;' + (modifiers + 1) + 'H';
+          else if (this.applicationCursor)
+            result.key = '\x1bOH';
+          else
+            result.key = '\x1b[H';
+          break;
+        // end
+        case 35:
+          if (modifiers)
+            result.key = '\x1b[1;' + (modifiers + 1) + 'F';
+          else if (this.applicationCursor)
+            result.key = '\x1bOF';
+          else
+            result.key = '\x1b[F';
+          break;
+        // page up
+        case 33:
+          if (ev.shiftKey) {
+            result.scrollDisp = -(this.rows - 1);
+          } else {
+            result.key = '\x1b[5~';
+          }
+          break;
+        // page down
+        case 34:
+          if (ev.shiftKey) {
+            result.scrollDisp = this.rows - 1;
+          } else {
+            result.key = '\x1b[6~';
+          }
+          break;
+        // F1-F12
+        case 112: result.key = '\x1bOP'; break;
+        case 113: result.key = '\x1bOQ'; break;
+        case 114: result.key = '\x1bOR'; break;
+        case 115: result.key = '\x1bOS'; break;
+        case 116: result.key = '\x1b[15~'; break;
+        case 117: result.key = '\x1b[17~'; break;
+        case 118: result.key = '\x1b[18~'; break;
+        case 119: result.key = '\x1b[19~'; break;
+        case 120: result.key = '\x1b[20~'; break;
+        case 121: result.key = '\x1b[21~'; break;
+        case 122: result.key = '\x1b[23~'; break;
+        case 123: result.key = '\x1b[24~'; break;
+        default:
+          // a-z and space
+          if (ev.ctrlKey && !ev.shiftKey && !ev.altKey && !ev.metaKey) {
+            if (ev.keyCode >= 65 && ev.keyCode <= 90) {
+              result.key = String.fromCharCode(ev.keyCode - 64);
+            } else if (ev.keyCode === 32) {
+              // NUL
+              result.key = String.fromCharCode(0);
+            } else if (ev.keyCode >= 51 && ev.keyCode <= 55) {
+              // escape, file sep, group sep, record sep, unit sep
+              result.key = String.fromCharCode(ev.keyCode - 51 + 27);
+            } else if (ev.keyCode === 56) {
+              // delete
+              result.key = String.fromCharCode(127);
+            } else if (ev.keyCode === 219) {
+              // ^[ - escape
+              result.key = String.fromCharCode(27);
+            } else if (ev.keyCode === 221) {
+              // ^] - group sep
+              result.key = String.fromCharCode(29);
+            }
+          } else if (!this.isMac && ev.altKey && !ev.ctrlKey && !ev.metaKey) {
+            // On Mac this is a third level shift. Use <Esc> instead.
+            if (ev.keyCode >= 65 && ev.keyCode <= 90) {
+              result.key = '\x1b' + String.fromCharCode(ev.keyCode + 32);
+            } else if (ev.keyCode === 192) {
+              result.key = '\x1b`';
+            } else if (ev.keyCode >= 48 && ev.keyCode <= 57) {
+              result.key = '\x1b' + (ev.keyCode - 48);
+            }
+          }
+          break;
+      }
+      return result;
+    };
+
+    /**
+     * Set the G level of the terminal
+     * @param g
+     */
+    Terminal.prototype.setgLevel = function(g) {
+      this.glevel = g;
+      this.charset = this.charsets[g];
+    };
+
+    /**
+     * Set the charset for the given G level of the terminal
+     * @param g
+     * @param charset
+     */
+    Terminal.prototype.setgCharset = function(g, charset) {
+      this.charsets[g] = charset;
+      if (this.glevel === g) {
+        this.charset = charset;
+      }
+    };
+
+    /**
+     * Handle a keypress event.
+     * Key Resources:
+     *   - https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent
+     * @param {KeyboardEvent} ev The keypress event to be handled.
+     */
+    Terminal.prototype.keyPress = function(ev) {
+      var key;
+
+      this.cancel(ev);
+
+      if (ev.charCode) {
+        key = ev.charCode;
+      } else if (ev.which == null) {
+        key = ev.keyCode;
+      } else if (ev.which !== 0 && ev.charCode !== 0) {
+        key = ev.which;
+      } else {
+        return false;
+      }
+
+      if (!key || (
+        (ev.altKey || ev.ctrlKey || ev.metaKey) && !isThirdLevelShift(this, ev)
+      )) {
+        return false;
+      }
+
+      key = String.fromCharCode(key);
+
+      this.emit('keypress', key, ev);
+      this.emit('key', key, ev);
+      this.showCursor();
+      this.handler(key);
+
+      return false;
+    };
+
+    /**
+     * Send data for handling to the terminal
+     * @param {string} data
+     */
+    Terminal.prototype.send = function(data) {
+      var self = this;
+
+      if (!this.queue) {
+        setTimeout(function() {
+          self.handler(self.queue);
+          self.queue = '';
+        }, 1);
+      }
+
+      this.queue += data;
+    };
+
+    /**
+     * Ring the bell.
+     * Note: We could do sweet things with webaudio here
+     */
+    Terminal.prototype.bell = function() {
+      if (!this.visualBell) return;
+      var self = this;
+      this.element.style.borderColor = 'white';
+      setTimeout(function() {
+        self.element.style.borderColor = '';
+      }, 10);
+      if (this.popOnBell) this.focus();
+    };
+
+    /**
+     * Log the current state to the console.
+     */
+    Terminal.prototype.log = function() {
+      if (!this.debug) return;
+      if (!this.context.console || !this.context.console.log) return;
+      var args = Array.prototype.slice.call(arguments);
+      this.context.console.log.apply(this.context.console, args);
+    };
+
+    /**
+     * Log the current state as error to the console.
+     */
+    Terminal.prototype.error = function() {
+      if (!this.debug) return;
+      if (!this.context.console || !this.context.console.error) return;
+      var args = Array.prototype.slice.call(arguments);
+      this.context.console.error.apply(this.context.console, args);
+    };
+
+    /**
+     * Resizes the terminal.
+     *
+     * @param {number} x The number of columns to resize to.
+     * @param {number} y The number of rows to resize to.
+     */
+    Terminal.prototype.resize = function(x, y) {
+      var line
+        , el
+        , i
+        , j
+        , ch
+        , addToY;
+
+      if (x === this.cols && y === this.rows) {
+        return;
+      }
+
+      if (x < 1) x = 1;
+      if (y < 1) y = 1;
+
+      // resize cols
+      j = this.cols;
+      if (j < x) {
+        ch = [this.defAttr, ' ', 1]; // does xterm use the default attr?
+        i = this.lines.length;
+        while (i--) {
+          while (this.lines[i].length < x) {
+            this.lines[i].push(ch);
+          }
+        }
+      } else { // (j > x)
+        i = this.lines.length;
+        while (i--) {
+          while (this.lines[i].length > x) {
+            this.lines[i].pop();
+          }
+        }
+      }
+      this.setupStops(j);
+      this.cols = x;
+
+      // resize rows
+      j = this.rows;
+      addToY = 0;
+      if (j < y) {
+        el = this.element;
+        while (j++ < y) {
+          // y is rows, not this.y
+          if (this.lines.length < y + this.ybase) {
+            if (this.ybase > 0 && this.lines.length <= this.ybase + this.y + addToY + 1) {
+              // There is room above the buffer and there are no empty elements below the line,
+              // scroll up
+              this.ybase--;
+              addToY++
+              if (this.ydisp > 0) {
+                // Viewport is at the top of the buffer, must increase downwards
+                this.ydisp--;
+              }
+            } else {
+              // Add a blank line if there is no buffer left at the top to scroll to, or if there
+              // are blank lines after the cursor
+              this.lines.push(this.blankLine());
+            }
+          }
+          if (this.children.length < y) {
+            this.insertRow();
+          }
+        }
+      } else { // (j > y)
+        while (j-- > y) {
+          if (this.lines.length > y + this.ybase) {
+            if (this.lines.length > this.ybase + this.y + 1) {
+              // The line is a blank line below the cursor, remove it
+              this.lines.pop();
+            } else {
+              // The line is the cursor, scroll down
+              this.ybase++;
+              this.ydisp++;
+            }
+          }
+          if (this.children.length > y) {
+            el = this.children.shift();
+            if (!el) continue;
+            el.parentNode.removeChild(el);
+          }
+        }
+      }
+      this.rows = y;
+
+      /*
+      *  Make sure that the cursor stays on screen
+      */
+      if (this.y >= y) {
+        this.y = y - 1;
+      }
+      if (addToY) {
+        this.y += addToY;
+      }
+
+      if (this.x >= x) {
+        this.x = x - 1;
+      }
+
+      this.scrollTop = 0;
+      this.scrollBottom = y - 1;
+
+      this.refresh(0, this.rows - 1);
+
+      this.normal = null;
+
+      this.emit('resize', {terminal: this, cols: x, rows: y});
+    };
+
+    /**
+     * Updates the range of rows to refresh
+     * @param {number} y The number of rows to refresh next.
+     */
+    Terminal.prototype.updateRange = function(y) {
+      if (y < this.refreshStart) this.refreshStart = y;
+      if (y > this.refreshEnd) this.refreshEnd = y;
+      // if (y > this.refreshEnd) {
+      //   this.refreshEnd = y;
+      //   if (y > this.rows - 1) {
+      //     this.refreshEnd = this.rows - 1;
+      //   }
+      // }
+    };
+
+    /**
+     * Set the range of refreshing to the maximyum value
+     */
+    Terminal.prototype.maxRange = function() {
+      this.refreshStart = 0;
+      this.refreshEnd = this.rows - 1;
+    };
+
+
+
+    /**
+     * Setup the tab stops.
+     * @param {number} i
+     */
+    Terminal.prototype.setupStops = function(i) {
+      if (i != null) {
+        if (!this.tabs[i]) {
+          i = this.prevStop(i);
+        }
+      } else {
+        this.tabs = {};
+        i = 0;
+      }
+
+      for (; i < this.cols; i += 8) {
+        this.tabs[i] = true;
+      }
+    };
+
+
+    /**
+     * Move the cursor to the previous tab stop from the given position (default is current).
+     * @param {number} x The position to move the cursor to the previous tab stop.
+     */
+    Terminal.prototype.prevStop = function(x) {
+      if (x == null) x = this.x;
+      while (!this.tabs[--x] && x > 0);
+      return x >= this.cols
+        ? this.cols - 1
+        : x < 0 ? 0 : x;
+    };
+
+
+    /**
+     * Move the cursor one tab stop forward from the given position (default is current).
+     * @param {number} x The position to move the cursor one tab stop forward.
+     */
+    Terminal.prototype.nextStop = function(x) {
+      if (x == null) x = this.x;
+      while (!this.tabs[++x] && x < this.cols);
+      return x >= this.cols
+        ? this.cols - 1
+        : x < 0 ? 0 : x;
+    };
+
+
+    /**
+     * Erase in the identified line everything from "x" to the end of the line (right).
+     * @param {number} x The column from which to start erasing to the end of the line.
+     * @param {number} y The line in which to operate.
+     */
+    Terminal.prototype.eraseRight = function(x, y) {
+      var line = this.lines[this.ybase + y]
+        , ch = [this.eraseAttr(), ' ', 1]; // xterm
+
+
+      for (; x < this.cols; x++) {
+        line[x] = ch;
+      }
+
+      this.updateRange(y);
+    };
+
+
+
+    /**
+     * Erase in the identified line everything from "x" to the start of the line (left).
+     * @param {number} x The column from which to start erasing to the start of the line.
+     * @param {number} y The line in which to operate.
+     */
+    Terminal.prototype.eraseLeft = function(x, y) {
+      var line = this.lines[this.ybase + y]
+        , ch = [this.eraseAttr(), ' ', 1]; // xterm
+
+      x++;
+      while (x--) line[x] = ch;
+
+      this.updateRange(y);
+    };
+
+
+    /**
+     * Erase all content in the given line
+     * @param {number} y The line to erase all of its contents.
+     */
+    Terminal.prototype.eraseLine = function(y) {
+      this.eraseRight(0, y);
+    };
+
+
+    /**
+     * Return the data array of a blank line/
+     * @param {number} cur First bunch of data for each "blank" character.
+     */
+    Terminal.prototype.blankLine = function(cur) {
+      var attr = cur
+        ? this.eraseAttr()
+        : this.defAttr;
+
+      var ch = [attr, ' ', 1]  // width defaults to 1 halfwidth character
+        , line = []
+        , i = 0;
+
+      for (; i < this.cols; i++) {
+        line[i] = ch;
+      }
+
+      return line;
+    };
+
+
+    /**
+     * If cur return the back color xterm feature attribute. Else return defAttr.
+     * @param {object} cur
+     */
+    Terminal.prototype.ch = function(cur) {
+      return cur
+        ? [this.eraseAttr(), ' ', 1]
+        : [this.defAttr, ' ', 1];
+    };
+
+
+    /**
+     * Evaluate if the current erminal is the given argument.
+     * @param {object} term The terminal to evaluate
+     */
+    Terminal.prototype.is = function(term) {
+      var name = this.termName;
+      return (name + '').indexOf(term) === 0;
+    };
+
+
+    /**
+     * Emit the 'data' event and populate the given data.
+     * @param {string} data The data to populate in the event.
+     */
+    Terminal.prototype.handler = function(data) {
+      this.emit('data', data);
+    };
+
+
+    /**
+     * Emit the 'title' event and populate the given title.
+     * @param {string} title The title to populate in the event.
+     */
+    Terminal.prototype.handleTitle = function(title) {
+      this.emit('title', title);
+    };
+
+
+    /**
+     * ESC
+     */
+
+    /**
+     * ESC D Index (IND is 0x84).
+     */
+    Terminal.prototype.index = function() {
+      this.y++;
+      if (this.y > this.scrollBottom) {
+        this.y--;
+        this.scroll();
+      }
+      this.state = normal;
+    };
+
+
+    /**
+     * ESC M Reverse Index (RI is 0x8d).
+     */
+    Terminal.prototype.reverseIndex = function() {
+      var j;
+      this.y--;
+      if (this.y < this.scrollTop) {
+        this.y++;
+        // possibly move the code below to term.reverseScroll();
+        // test: echo -ne '\e[1;1H\e[44m\eM\e[0m'
+        // blankLine(true) is xterm/linux behavior
+        this.lines.splice(this.y + this.ybase, 0, this.blankLine(true));
+        j = this.rows - 1 - this.scrollBottom;
+        this.lines.splice(this.rows - 1 + this.ybase - j + 1, 1);
+        // this.maxRange();
+        this.updateRange(this.scrollTop);
+        this.updateRange(this.scrollBottom);
+      }
+      this.state = normal;
+    };
+
+
+    /**
+     * ESC c Full Reset (RIS).
+     */
+    Terminal.prototype.reset = function() {
+      this.options.rows = this.rows;
+      this.options.cols = this.cols;
+      Terminal.call(this, this.options);
+      this.refresh(0, this.rows - 1);
+    };
+
+
+    /**
+     * ESC H Tab Set (HTS is 0x88).
+     */
+    Terminal.prototype.tabSet = function() {
+      this.tabs[this.x] = true;
+      this.state = normal;
+    };
+
+
+    /**
+     * CSI
+     */
+
+    /**
+     * CSI Ps A
+     * Cursor Up Ps Times (default = 1) (CUU).
+     */
+    Terminal.prototype.cursorUp = function(params) {
+      var param = params[0];
+      if (param < 1) param = 1;
+      this.y -= param;
+      if (this.y < 0) this.y = 0;
+    };
+
+
+    /**
+     * CSI Ps B
+     * Cursor Down Ps Times (default = 1) (CUD).
+     */
+    Terminal.prototype.cursorDown = function(params) {
+      var param = params[0];
+      if (param < 1) param = 1;
+      this.y += param;
+      if (this.y >= this.rows) {
+        this.y = this.rows - 1;
+      }
+    };
+
+
+    /**
+     * CSI Ps C
+     * Cursor Forward Ps Times (default = 1) (CUF).
+     */
+    Terminal.prototype.cursorForward = function(params) {
+      var param = params[0];
+      if (param < 1) param = 1;
+      this.x += param;
+      if (this.x >= this.cols) {
+        this.x = this.cols - 1;
+      }
+    };
+
+
+    /**
+     * CSI Ps D
+     * Cursor Backward Ps Times (default = 1) (CUB).
+     */
+    Terminal.prototype.cursorBackward = function(params) {
+      var param = params[0];
+      if (param < 1) param = 1;
+      this.x -= param;
+      if (this.x < 0) this.x = 0;
+    };
+
+
+    /**
+     * CSI Ps ; Ps H
+     * Cursor Position [row;column] (default = [1,1]) (CUP).
+     */
+    Terminal.prototype.cursorPos = function(params) {
+      var row, col;
+
+      row = params[0] - 1;
+
+      if (params.length >= 2) {
+        col = params[1] - 1;
+      } else {
+        col = 0;
+      }
+
+      if (row < 0) {
+        row = 0;
+      } else if (row >= this.rows) {
+        row = this.rows - 1;
+      }
+
+      if (col < 0) {
+        col = 0;
+      } else if (col >= this.cols) {
+        col = this.cols - 1;
+      }
+
+      this.x = col;
+      this.y = row;
+    };
+
+
+    /**
+     * CSI Ps J  Erase in Display (ED).
+     *     Ps = 0  -> Erase Below (default).
+     *     Ps = 1  -> Erase Above.
+     *     Ps = 2  -> Erase All.
+     *     Ps = 3  -> Erase Saved Lines (xterm).
+     * CSI ? Ps J
+     *   Erase in Display (DECSED).
+     *     Ps = 0  -> Selective Erase Below (default).
+     *     Ps = 1  -> Selective Erase Above.
+     *     Ps = 2  -> Selective Erase All.
+     */
+    Terminal.prototype.eraseInDisplay = function(params) {
+      var j;
+      switch (params[0]) {
+        case 0:
+          this.eraseRight(this.x, this.y);
+          j = this.y + 1;
+          for (; j < this.rows; j++) {
+            this.eraseLine(j);
+          }
+          break;
+        case 1:
+          this.eraseLeft(this.x, this.y);
+          j = this.y;
+          while (j--) {
+            this.eraseLine(j);
+          }
+          break;
+        case 2:
+          j = this.rows;
+          while (j--) this.eraseLine(j);
+          break;
+        case 3:
+          ; // no saved lines
+          break;
+      }
+    };
+
+
+    /**
+     * CSI Ps K  Erase in Line (EL).
+     *     Ps = 0  -> Erase to Right (default).
+     *     Ps = 1  -> Erase to Left.
+     *     Ps = 2  -> Erase All.
+     * CSI ? Ps K
+     *   Erase in Line (DECSEL).
+     *     Ps = 0  -> Selective Erase to Right (default).
+     *     Ps = 1  -> Selective Erase to Left.
+     *     Ps = 2  -> Selective Erase All.
+     */
+    Terminal.prototype.eraseInLine = function(params) {
+      switch (params[0]) {
+        case 0:
+          this.eraseRight(this.x, this.y);
+          break;
+        case 1:
+          this.eraseLeft(this.x, this.y);
+          break;
+        case 2:
+          this.eraseLine(this.y);
+          break;
+      }
+    };
+
+
+   	/**
+     * CSI Pm m  Character Attributes (SGR).
+     *     Ps = 0  -> Normal (default).
+     *     Ps = 1  -> Bold.
+     *     Ps = 4  -> Underlined.
+     *     Ps = 5  -> Blink (appears as Bold).
+     *     Ps = 7  -> Inverse.
+     *     Ps = 8  -> Invisible, i.e., hidden (VT300).
+     *     Ps = 2 2  -> Normal (neither bold nor faint).
+     *     Ps = 2 4  -> Not underlined.
+     *     Ps = 2 5  -> Steady (not blinking).
+     *     Ps = 2 7  -> Positive (not inverse).
+     *     Ps = 2 8  -> Visible, i.e., not hidden (VT300).
+     *     Ps = 3 0  -> Set foreground color to Black.
+     *     Ps = 3 1  -> Set foreground color to Red.
+     *     Ps = 3 2  -> Set foreground color to Green.
+     *     Ps = 3 3  -> Set foreground color to Yellow.
+     *     Ps = 3 4  -> Set foreground color to Blue.
+     *     Ps = 3 5  -> Set foreground color to Magenta.
+     *     Ps = 3 6  -> Set foreground color to Cyan.
+     *     Ps = 3 7  -> Set foreground color to White.
+     *     Ps = 3 9  -> Set foreground color to default (original).
+     *     Ps = 4 0  -> Set background color to Black.
+     *     Ps = 4 1  -> Set background color to Red.
+     *     Ps = 4 2  -> Set background color to Green.
+     *     Ps = 4 3  -> Set background color to Yellow.
+     *     Ps = 4 4  -> Set background color to Blue.
+     *     Ps = 4 5  -> Set background color to Magenta.
+     *     Ps = 4 6  -> Set background color to Cyan.
+     *     Ps = 4 7  -> Set background color to White.
+     *     Ps = 4 9  -> Set background color to default (original).
+		 *
+     *   If 16-color support is compiled, the following apply.  Assume
+     *   that xterm's resources are set so that the ISO color codes are
+     *   the first 8 of a set of 16.  Then the aixterm colors are the
+     *   bright versions of the ISO colors:
+     *     Ps = 9 0  -> Set foreground color to Black.
+     *     Ps = 9 1  -> Set foreground color to Red.
+     *     Ps = 9 2  -> Set foreground color to Green.
+     *     Ps = 9 3  -> Set foreground color to Yellow.
+     *     Ps = 9 4  -> Set foreground color to Blue.
+     *     Ps = 9 5  -> Set foreground color to Magenta.
+     *     Ps = 9 6  -> Set foreground color to Cyan.
+     *     Ps = 9 7  -> Set foreground color to White.
+     *     Ps = 1 0 0  -> Set background color to Black.
+     *     Ps = 1 0 1  -> Set background color to Red.
+     *     Ps = 1 0 2  -> Set background color to Green.
+     *     Ps = 1 0 3  -> Set background color to Yellow.
+     *     Ps = 1 0 4  -> Set background color to Blue.
+     *     Ps = 1 0 5  -> Set background color to Magenta.
+     *     Ps = 1 0 6  -> Set background color to Cyan.
+     *     Ps = 1 0 7  -> Set background color to White.
+		 *
+     *   If xterm is compiled with the 16-color support disabled, it
+     *   supports the following, from rxvt:
+     *     Ps = 1 0 0  -> Set foreground and background color to
+     *     default.
+		 *
+     *   If 88- or 256-color support is compiled, the following apply.
+     *     Ps = 3 8  ; 5  ; Ps -> Set foreground color to the second
+     *     Ps.
+     *     Ps = 4 8  ; 5  ; Ps -> Set background color to the second
+     *     Ps.
+     */
+    Terminal.prototype.charAttributes = function(params) {
+      // Optimize a single SGR0.
+      if (params.length === 1 && params[0] === 0) {
+        this.curAttr = this.defAttr;
+        return;
+      }
+
+      var l = params.length
+        , i = 0
+        , flags = this.curAttr >> 18
+        , fg = (this.curAttr >> 9) & 0x1ff
+        , bg = this.curAttr & 0x1ff
+        , p;
+
+      for (; i < l; i++) {
+        p = params[i];
+        if (p >= 30 && p <= 37) {
+          // fg color 8
+          fg = p - 30;
+        } else if (p >= 40 && p <= 47) {
+          // bg color 8
+          bg = p - 40;
+        } else if (p >= 90 && p <= 97) {
+          // fg color 16
+          p += 8;
+          fg = p - 90;
+        } else if (p >= 100 && p <= 107) {
+          // bg color 16
+          p += 8;
+          bg = p - 100;
+        } else if (p === 0) {
+          // default
+          flags = this.defAttr >> 18;
+          fg = (this.defAttr >> 9) & 0x1ff;
+          bg = this.defAttr & 0x1ff;
+          // flags = 0;
+          // fg = 0x1ff;
+          // bg = 0x1ff;
+        } else if (p === 1) {
+          // bold text
+          flags |= 1;
+        } else if (p === 4) {
+          // underlined text
+          flags |= 2;
+        } else if (p === 5) {
+          // blink
+          flags |= 4;
+        } else if (p === 7) {
+          // inverse and positive
+          // test with: echo -e '\e[31m\e[42mhello\e[7mworld\e[27mhi\e[m'
+          flags |= 8;
+        } else if (p === 8) {
+          // invisible
+          flags |= 16;
+        } else if (p === 22) {
+          // not bold
+          flags &= ~1;
+        } else if (p === 24) {
+          // not underlined
+          flags &= ~2;
+        } else if (p === 25) {
+          // not blink
+          flags &= ~4;
+        } else if (p === 27) {
+          // not inverse
+          flags &= ~8;
+        } else if (p === 28) {
+          // not invisible
+          flags &= ~16;
+        } else if (p === 39) {
+          // reset fg
+          fg = (this.defAttr >> 9) & 0x1ff;
+        } else if (p === 49) {
+          // reset bg
+          bg = this.defAttr & 0x1ff;
+        } else if (p === 38) {
+          // fg color 256
+          if (params[i + 1] === 2) {
+            i += 2;
+            fg = matchColor(
+              params[i] & 0xff,
+              params[i + 1] & 0xff,
+              params[i + 2] & 0xff);
+            if (fg === -1) fg = 0x1ff;
+            i += 2;
+          } else if (params[i + 1] === 5) {
+            i += 2;
+            p = params[i] & 0xff;
+            fg = p;
+          }
+        } else if (p === 48) {
+          // bg color 256
+          if (params[i + 1] === 2) {
+            i += 2;
+            bg = matchColor(
+              params[i] & 0xff,
+              params[i + 1] & 0xff,
+              params[i + 2] & 0xff);
+            if (bg === -1) bg = 0x1ff;
+            i += 2;
+          } else if (params[i + 1] === 5) {
+            i += 2;
+            p = params[i] & 0xff;
+            bg = p;
+          }
+        } else if (p === 100) {
+          // reset fg/bg
+          fg = (this.defAttr >> 9) & 0x1ff;
+          bg = this.defAttr & 0x1ff;
+        } else {
+          this.error('Unknown SGR attribute: %d.', p);
+        }
+      }
+
+      this.curAttr = (flags << 18) | (fg << 9) | bg;
+    };
+
+
+   	/**
+     * CSI Ps n  Device Status Report (DSR).
+     *     Ps = 5  -> Status Report.  Result (``OK'') is
+     *   CSI 0 n
+     *     Ps = 6  -> Report Cursor Position (CPR) [row;column].
+     *   Result is
+     *   CSI r ; c R
+     * CSI ? Ps n
+     *   Device Status Report (DSR, DEC-specific).
+     *     Ps = 6  -> Report Cursor Position (CPR) [row;column] as CSI
+     *     ? r ; c R (assumes page is zero).
+     *     Ps = 1 5  -> Report Printer status as CSI ? 1 0  n  (ready).
+     *     or CSI ? 1 1  n  (not ready).
+     *     Ps = 2 5  -> Report UDK status as CSI ? 2 0  n  (unlocked)
+     *     or CSI ? 2 1  n  (locked).
+     *     Ps = 2 6  -> Report Keyboard status as
+     *   CSI ? 2 7  ;  1  ;  0  ;  0  n  (North American).
+     *   The last two parameters apply to VT400 & up, and denote key-
+     *   board ready and LK01 respectively.
+     *     Ps = 5 3  -> Report Locator status as
+     *   CSI ? 5 3  n  Locator available, if compiled-in, or
+     *   CSI ? 5 0  n  No Locator, if not.
+     */
+    Terminal.prototype.deviceStatus = function(params) {
+      if (!this.prefix) {
+        switch (params[0]) {
+          case 5:
+            // status report
+            this.send('\x1b[0n');
+            break;
+          case 6:
+            // cursor position
+            this.send('\x1b['
+              + (this.y + 1)
+              + ';'
+              + (this.x + 1)
+              + 'R');
+            break;
+        }
+      } else if (this.prefix === '?') {
+        // modern xterm doesnt seem to
+        // respond to any of these except ?6, 6, and 5
+        switch (params[0]) {
+          case 6:
+            // cursor position
+            this.send('\x1b[?'
+              + (this.y + 1)
+              + ';'
+              + (this.x + 1)
+              + 'R');
+            break;
+          case 15:
+            // no printer
+            // this.send('\x1b[?11n');
+            break;
+          case 25:
+            // dont support user defined keys
+            // this.send('\x1b[?21n');
+            break;
+          case 26:
+            // north american keyboard
+            // this.send('\x1b[?27;1;0;0n');
+            break;
+          case 53:
+            // no dec locator/mouse
+            // this.send('\x1b[?50n');
+            break;
+        }
+      }
+    };
+
+
+    /**
+     * Additions
+     */
+
+   	/**
+     * CSI Ps @
+     * Insert Ps (Blank) Character(s) (default = 1) (ICH).
+     */
+    Terminal.prototype.insertChars = function(params) {
+      var param, row, j, ch;
+
+      param = params[0];
+      if (param < 1) param = 1;
+
+      row = this.y + this.ybase;
+      j = this.x;
+      ch = [this.eraseAttr(), ' ', 1]; // xterm
+
+      while (param-- && j < this.cols) {
+        this.lines[row].splice(j++, 0, ch);
+        this.lines[row].pop();
+      }
+    };
+
+   	/**
+     * CSI Ps E
+     * Cursor Next Line Ps Times (default = 1) (CNL).
+     * same as CSI Ps B ?
+     */
+    Terminal.prototype.cursorNextLine = function(params) {
+      var param = params[0];
+      if (param < 1) param = 1;
+      this.y += param;
+      if (this.y >= this.rows) {
+        this.y = this.rows - 1;
+      }
+      this.x = 0;
+    };
+
+
+    /**
+     * CSI Ps F
+     * Cursor Preceding Line Ps Times (default = 1) (CNL).
+     * reuse CSI Ps A ?
+     */
+    Terminal.prototype.cursorPrecedingLine = function(params) {
+      var param = params[0];
+      if (param < 1) param = 1;
+      this.y -= param;
+      if (this.y < 0) this.y = 0;
+      this.x = 0;
+    };
+
+
+    /**
+     * CSI Ps G
+     * Cursor Character Absolute  [column] (default = [row,1]) (CHA).
+     */
+    Terminal.prototype.cursorCharAbsolute = function(params) {
+      var param = params[0];
+      if (param < 1) param = 1;
+      this.x = param - 1;
+    };
+
+
+    /**
+     * CSI Ps L
+     * Insert Ps Line(s) (default = 1) (IL).
+     */
+    Terminal.prototype.insertLines = function(params) {
+      var param, row, j;
+
+      param = params[0];
+      if (param < 1) param = 1;
+      row = this.y + this.ybase;
+
+      j = this.rows - 1 - this.scrollBottom;
+      j = this.rows - 1 + this.ybase - j + 1;
+
+      while (param--) {
+        // test: echo -e '\e[44m\e[1L\e[0m'
+        // blankLine(true) - xterm/linux behavior
+        this.lines.splice(row, 0, this.blankLine(true));
+        this.lines.splice(j, 1);
+      }
+
+      // this.maxRange();
+      this.updateRange(this.y);
+      this.updateRange(this.scrollBottom);
+    };
+
+
+    /**
+     * CSI Ps M
+     * Delete Ps Line(s) (default = 1) (DL).
+     */
+    Terminal.prototype.deleteLines = function(params) {
+      var param, row, j;
+
+      param = params[0];
+      if (param < 1) param = 1;
+      row = this.y + this.ybase;
+
+      j = this.rows - 1 - this.scrollBottom;
+      j = this.rows - 1 + this.ybase - j;
+
+      while (param--) {
+        // test: echo -e '\e[44m\e[1M\e[0m'
+        // blankLine(true) - xterm/linux behavior
+        this.lines.splice(j + 1, 0, this.blankLine(true));
+        this.lines.splice(row, 1);
+      }
+
+      // this.maxRange();
+      this.updateRange(this.y);
+      this.updateRange(this.scrollBottom);
+    };
+
+
+    /**
+     * CSI Ps P
+     * Delete Ps Character(s) (default = 1) (DCH).
+     */
+    Terminal.prototype.deleteChars = function(params) {
+      var param, row, ch;
+
+      param = params[0];
+      if (param < 1) param = 1;
+
+      row = this.y + this.ybase;
+      ch = [this.eraseAttr(), ' ', 1]; // xterm
+
+      while (param--) {
+        this.lines[row].splice(this.x, 1);
+        this.lines[row].push(ch);
+      }
+    };
+
+    /**
+     * CSI Ps X
+     * Erase Ps Character(s) (default = 1) (ECH).
+     */
+    Terminal.prototype.eraseChars = function(params) {
+      var param, row, j, ch;
+
+      param = params[0];
+      if (param < 1) param = 1;
+
+      row = this.y + this.ybase;
+      j = this.x;
+      ch = [this.eraseAttr(), ' ', 1]; // xterm
+
+      while (param-- && j < this.cols) {
+        this.lines[row][j++] = ch;
+      }
+    };
+
+    /**
+     * CSI Pm `  Character Position Absolute
+     *   [column] (default = [row,1]) (HPA).
+     */
+    Terminal.prototype.charPosAbsolute = function(params) {
+      var param = params[0];
+      if (param < 1) param = 1;
+      this.x = param - 1;
+      if (this.x >= this.cols) {
+        this.x = this.cols - 1;
+      }
+    };
+
+
+    /**
+     * 141 61 a * HPR -
+     * Horizontal Position Relative
+     * reuse CSI Ps C ?
+     */
+    Terminal.prototype.HPositionRelative = function(params) {
+      var param = params[0];
+      if (param < 1) param = 1;
+      this.x += param;
+      if (this.x >= this.cols) {
+        this.x = this.cols - 1;
+      }
+    };
+
+
+    /**
+     * CSI Ps c  Send Device Attributes (Primary DA).
+     *     Ps = 0  or omitted -> request attributes from terminal.  The
+     *     response depends on the decTerminalID resource setting.
+     *     -> CSI ? 1 ; 2 c  (``VT100 with Advanced Video Option'')
+     *     -> CSI ? 1 ; 0 c  (``VT101 with No Options'')
+     *     -> CSI ? 6 c  (``VT102'')
+     *     -> CSI ? 6 0 ; 1 ; 2 ; 6 ; 8 ; 9 ; 1 5 ; c  (``VT220'')
+     *   The VT100-style response parameters do not mean anything by
+     *   themselves.  VT220 parameters do, telling the host what fea-
+     *   tures the terminal supports:
+     *     Ps = 1  -> 132-columns.
+     *     Ps = 2  -> Printer.
+     *     Ps = 6  -> Selective erase.
+     *     Ps = 8  -> User-defined keys.
+     *     Ps = 9  -> National replacement character sets.
+     *     Ps = 1 5  -> Technical characters.
+     *     Ps = 2 2  -> ANSI color, e.g., VT525.
+     *     Ps = 2 9  -> ANSI text locator (i.e., DEC Locator mode).
+     * CSI > Ps c
+     *   Send Device Attributes (Secondary DA).
+     *     Ps = 0  or omitted -> request the terminal's identification
+     *     code.  The response depends on the decTerminalID resource set-
+     *     ting.  It should apply only to VT220 and up, but xterm extends
+     *     this to VT100.
+     *     -> CSI  > Pp ; Pv ; Pc c
+     *   where Pp denotes the terminal type
+     *     Pp = 0  -> ``VT100''.
+     *     Pp = 1  -> ``VT220''.
+     *   and Pv is the firmware version (for xterm, this was originally
+     *   the XFree86 patch number, starting with 95).  In a DEC termi-
+     *   nal, Pc indicates the ROM cartridge registration number and is
+     *   always zero.
+     * More information:
+     *   xterm/charproc.c - line 2012, for more information.
+     *   vim responds with ^[[?0c or ^[[?1c after the terminal's response (?)
+		 */
+    Terminal.prototype.sendDeviceAttributes = function(params) {
+      if (params[0] > 0) return;
+
+      if (!this.prefix) {
+        if (this.is('xterm')
+            || this.is('rxvt-unicode')
+            || this.is('screen')) {
+          this.send('\x1b[?1;2c');
+        } else if (this.is('linux')) {
+          this.send('\x1b[?6c');
+        }
+      } else if (this.prefix === '>') {
+        // xterm and urxvt
+        // seem to spit this
+        // out around ~370 times (?).
+        if (this.is('xterm')) {
+          this.send('\x1b[>0;276;0c');
+        } else if (this.is('rxvt-unicode')) {
+          this.send('\x1b[>85;95;0c');
+        } else if (this.is('linux')) {
+          // not supported by linux console.
+          // linux console echoes parameters.
+          this.send(params[0] + 'c');
+        } else if (this.is('screen')) {
+          this.send('\x1b[>83;40003;0c');
+        }
+      }
+    };
+
+
+    /**
+     * CSI Pm d
+     * Line Position Absolute  [row] (default = [1,column]) (VPA).
+     */
+    Terminal.prototype.linePosAbsolute = function(params) {
+      var param = params[0];
+      if (param < 1) param = 1;
+      this.y = param - 1;
+      if (this.y >= this.rows) {
+        this.y = this.rows - 1;
+      }
+    };
+
+
+    /**
+     * 145 65 e * VPR - Vertical Position Relative
+     * reuse CSI Ps B ?
+     */
+    Terminal.prototype.VPositionRelative = function(params) {
+      var param = params[0];
+      if (param < 1) param = 1;
+      this.y += param;
+      if (this.y >= this.rows) {
+        this.y = this.rows - 1;
+      }
+    };
+
+
+    /**
+     * CSI Ps ; Ps f
+     *   Horizontal and Vertical Position [row;column] (default =
+     *   [1,1]) (HVP).
+     */
+    Terminal.prototype.HVPosition = function(params) {
+      if (params[0] < 1) params[0] = 1;
+      if (params[1] < 1) params[1] = 1;
+
+      this.y = params[0] - 1;
+      if (this.y >= this.rows) {
+        this.y = this.rows - 1;
+      }
+
+      this.x = params[1] - 1;
+      if (this.x >= this.cols) {
+        this.x = this.cols - 1;
+      }
+    };
+
+
+    /**
+     * CSI Pm h  Set Mode (SM).
+     *     Ps = 2  -> Keyboard Action Mode (AM).
+     *     Ps = 4  -> Insert Mode (IRM).
+     *     Ps = 1 2  -> Send/receive (SRM).
+     *     Ps = 2 0  -> Automatic Newline (LNM).
+     * CSI ? Pm h
+     *   DEC Private Mode Set (DECSET).
+     *     Ps = 1  -> Application Cursor Keys (DECCKM).
+     *     Ps = 2  -> Designate USASCII for character sets G0-G3
+     *     (DECANM), and set VT100 mode.
+     *     Ps = 3  -> 132 Column Mode (DECCOLM).
+     *     Ps = 4  -> Smooth (Slow) Scroll (DECSCLM).
+     *     Ps = 5  -> Reverse Video (DECSCNM).
+     *     Ps = 6  -> Origin Mode (DECOM).
+     *     Ps = 7  -> Wraparound Mode (DECAWM).
+     *     Ps = 8  -> Auto-repeat Keys (DECARM).
+     *     Ps = 9  -> Send Mouse X & Y on button press.  See the sec-
+     *     tion Mouse Tracking.
+     *     Ps = 1 0  -> Show toolbar (rxvt).
+     *     Ps = 1 2  -> Start Blinking Cursor (att610).
+     *     Ps = 1 8  -> Print form feed (DECPFF).
+     *     Ps = 1 9  -> Set print extent to full screen (DECPEX).
+     *     Ps = 2 5  -> Show Cursor (DECTCEM).
+     *     Ps = 3 0  -> Show scrollbar (rxvt).
+     *     Ps = 3 5  -> Enable font-shifting functions (rxvt).
+     *     Ps = 3 8  -> Enter Tektronix Mode (DECTEK).
+     *     Ps = 4 0  -> Allow 80 -> 132 Mode.
+     *     Ps = 4 1  -> more(1) fix (see curses resource).
+     *     Ps = 4 2  -> Enable Nation Replacement Character sets (DECN-
+     *     RCM).
+     *     Ps = 4 4  -> Turn On Margin Bell.
+     *     Ps = 4 5  -> Reverse-wraparound Mode.
+     *     Ps = 4 6  -> Start Logging.  This is normally disabled by a
+     *     compile-time option.
+     *     Ps = 4 7  -> Use Alternate Screen Buffer.  (This may be dis-
+     *     abled by the titeInhibit resource).
+     *     Ps = 6 6  -> Application keypad (DECNKM).
+     *     Ps = 6 7  -> Backarrow key sends backspace (DECBKM).
+     *     Ps = 1 0 0 0  -> Send Mouse X & Y on button press and
+     *     release.  See the section Mouse Tracking.
+     *     Ps = 1 0 0 1  -> Use Hilite Mouse Tracking.
+     *     Ps = 1 0 0 2  -> Use Cell Motion Mouse Tracking.
+     *     Ps = 1 0 0 3  -> Use All Motion Mouse Tracking.
+     *     Ps = 1 0 0 4  -> Send FocusIn/FocusOut events.
+     *     Ps = 1 0 0 5  -> Enable Extended Mouse Mode.
+     *     Ps = 1 0 1 0  -> Scroll to bottom on tty output (rxvt).
+     *     Ps = 1 0 1 1  -> Scroll to bottom on key press (rxvt).
+     *     Ps = 1 0 3 4  -> Interpret "meta" key, sets eighth bit.
+     *     (enables the eightBitInput resource).
+     *     Ps = 1 0 3 5  -> Enable special modifiers for Alt and Num-
+     *     Lock keys.  (This enables the numLock resource).
+     *     Ps = 1 0 3 6  -> Send ESC   when Meta modifies a key.  (This
+     *     enables the metaSendsEscape resource).
+     *     Ps = 1 0 3 7  -> Send DEL from the editing-keypad Delete
+     *     key.
+     *     Ps = 1 0 3 9  -> Send ESC  when Alt modifies a key.  (This
+     *     enables the altSendsEscape resource).
+     *     Ps = 1 0 4 0  -> Keep selection even if not highlighted.
+     *     (This enables the keepSelection resource).
+     *     Ps = 1 0 4 1  -> Use the CLIPBOARD selection.  (This enables
+     *     the selectToClipboard resource).
+     *     Ps = 1 0 4 2  -> Enable Urgency window manager hint when
+     *     Control-G is received.  (This enables the bellIsUrgent
+     *     resource).
+     *     Ps = 1 0 4 3  -> Enable raising of the window when Control-G
+     *     is received.  (enables the popOnBell resource).
+     *     Ps = 1 0 4 7  -> Use Alternate Screen Buffer.  (This may be
+     *     disabled by the titeInhibit resource).
+     *     Ps = 1 0 4 8  -> Save cursor as in DECSC.  (This may be dis-
+     *     abled by the titeInhibit resource).
+     *     Ps = 1 0 4 9  -> Save cursor as in DECSC and use Alternate
+     *     Screen Buffer, clearing it first.  (This may be disabled by
+     *     the titeInhibit resource).  This combines the effects of the 1
+     *     0 4 7  and 1 0 4 8  modes.  Use this with terminfo-based
+     *     applications rather than the 4 7  mode.
+     *     Ps = 1 0 5 0  -> Set terminfo/termcap function-key mode.
+     *     Ps = 1 0 5 1  -> Set Sun function-key mode.
+     *     Ps = 1 0 5 2  -> Set HP function-key mode.
+     *     Ps = 1 0 5 3  -> Set SCO function-key mode.
+     *     Ps = 1 0 6 0  -> Set legacy keyboard emulation (X11R6).
+     *     Ps = 1 0 6 1  -> Set VT220 keyboard emulation.
+     *     Ps = 2 0 0 4  -> Set bracketed paste mode.
+     * Modes:
+     *   http: *vt100.net/docs/vt220-rm/chapter4.html
+     */
+    Terminal.prototype.setMode = function(params) {
+      if (typeof params === 'object') {
+        var l = params.length
+          , i = 0;
+
+        for (; i < l; i++) {
+          this.setMode(params[i]);
+        }
+
+        return;
+      }
+
+      if (!this.prefix) {
+        switch (params) {
+          case 4:
+            this.insertMode = true;
+            break;
+          case 20:
+            //this.convertEol = true;
+            break;
+        }
+      } else if (this.prefix === '?') {
+        switch (params) {
+          case 1:
+            this.applicationCursor = true;
+            break;
+          case 2:
+            this.setgCharset(0, Terminal.charsets.US);
+            this.setgCharset(1, Terminal.charsets.US);
+            this.setgCharset(2, Terminal.charsets.US);
+            this.setgCharset(3, Terminal.charsets.US);
+            // set VT100 mode here
+            break;
+          case 3: // 132 col mode
+            this.savedCols = this.cols;
+            this.resize(132, this.rows);
+            break;
+          case 6:
+            this.originMode = true;
+            break;
+          case 7:
+            this.wraparoundMode = true;
+            break;
+          case 12:
+            // this.cursorBlink = true;
+            break;
+          case 66:
+            this.log('Serial port requested application keypad.');
+            this.applicationKeypad = true;
+            break;
+          case 9: // X10 Mouse
+            // no release, no motion, no wheel, no modifiers.
+          case 1000: // vt200 mouse
+            // no motion.
+            // no modifiers, except control on the wheel.
+          case 1002: // button event mouse
+          case 1003: // any event mouse
+            // any event - sends motion events,
+            // even if there is no button held down.
+            this.x10Mouse = params === 9;
+            this.vt200Mouse = params === 1000;
+            this.normalMouse = params > 1000;
+            this.mouseEvents = true;
+            this.element.style.cursor = 'default';
+            this.log('Binding to mouse events.');
+            break;
+          case 1004: // send focusin/focusout events
+            // focusin: ^[[I
+            // focusout: ^[[O
+            this.sendFocus = true;
+            break;
+          case 1005: // utf8 ext mode mouse
+            this.utfMouse = true;
+            // for wide terminals
+            // simply encodes large values as utf8 characters
+            break;
+          case 1006: // sgr ext mode mouse
+            this.sgrMouse = true;
+            // for wide terminals
+            // does not add 32 to fields
+            // press: ^[[<b;x;yM
+            // release: ^[[<b;x;ym
+            break;
+          case 1015: // urxvt ext mode mouse
+            this.urxvtMouse = true;
+            // for wide terminals
+            // numbers for fields
+            // press: ^[[b;x;yM
+            // motion: ^[[b;x;yT
+            break;
+          case 25: // show cursor
+            this.cursorHidden = false;
+            break;
+          case 1049: // alt screen buffer cursor
+            //this.saveCursor();
+            ; // FALL-THROUGH
+          case 47: // alt screen buffer
+          case 1047: // alt screen buffer
+            if (!this.normal) {
+              var normal = {
+                lines: this.lines,
+                ybase: this.ybase,
+                ydisp: this.ydisp,
+                x: this.x,
+                y: this.y,
+                scrollTop: this.scrollTop,
+                scrollBottom: this.scrollBottom,
+                tabs: this.tabs
+                // XXX save charset(s) here?
+                // charset: this.charset,
+                // glevel: this.glevel,
+                // charsets: this.charsets
+              };
+              this.reset();
+              this.normal = normal;
+              this.showCursor();
+            }
+            break;
+        }
+      }
+    };
+
+    /**
+     * CSI Pm l  Reset Mode (RM).
+     *     Ps = 2  -> Keyboard Action Mode (AM).
+     *     Ps = 4  -> Replace Mode (IRM).
+     *     Ps = 1 2  -> Send/receive (SRM).
+     *     Ps = 2 0  -> Normal Linefeed (LNM).
+     * CSI ? Pm l
+     *   DEC Private Mode Reset (DECRST).
+     *     Ps = 1  -> Normal Cursor Keys (DECCKM).
+     *     Ps = 2  -> Designate VT52 mode (DECANM).
+     *     Ps = 3  -> 80 Column Mode (DECCOLM).
+     *     Ps = 4  -> Jump (Fast) Scroll (DECSCLM).
+     *     Ps = 5  -> Normal Video (DECSCNM).
+     *     Ps = 6  -> Normal Cursor Mode (DECOM).
+     *     Ps = 7  -> No Wraparound Mode (DECAWM).
+     *     Ps = 8  -> No Auto-repeat Keys (DECARM).
+     *     Ps = 9  -> Don't send Mouse X & Y on button press.
+     *     Ps = 1 0  -> Hide toolbar (rxvt).
+     *     Ps = 1 2  -> Stop Blinking Cursor (att610).
+     *     Ps = 1 8  -> Don't print form feed (DECPFF).
+     *     Ps = 1 9  -> Limit print to scrolling region (DECPEX).
+     *     Ps = 2 5  -> Hide Cursor (DECTCEM).
+     *     Ps = 3 0  -> Don't show scrollbar (rxvt).
+     *     Ps = 3 5  -> Disable font-shifting functions (rxvt).
+     *     Ps = 4 0  -> Disallow 80 -> 132 Mode.
+     *     Ps = 4 1  -> No more(1) fix (see curses resource).
+     *     Ps = 4 2  -> Disable Nation Replacement Character sets (DEC-
+     *     NRCM).
+     *     Ps = 4 4  -> Turn Off Margin Bell.
+     *     Ps = 4 5  -> No Reverse-wraparound Mode.
+     *     Ps = 4 6  -> Stop Logging.  (This is normally disabled by a
+     *     compile-time option).
+     *     Ps = 4 7  -> Use Normal Screen Buffer.
+     *     Ps = 6 6  -> Numeric keypad (DECNKM).
+     *     Ps = 6 7  -> Backarrow key sends delete (DECBKM).
+     *     Ps = 1 0 0 0  -> Don't send Mouse X & Y on button press and
+     *     release.  See the section Mouse Tracking.
+     *     Ps = 1 0 0 1  -> Don't use Hilite Mouse Tracking.
+     *     Ps = 1 0 0 2  -> Don't use Cell Motion Mouse Tracking.
+     *     Ps = 1 0 0 3  -> Don't use All Motion Mouse Tracking.
+     *     Ps = 1 0 0 4  -> Don't send FocusIn/FocusOut events.
+     *     Ps = 1 0 0 5  -> Disable Extended Mouse Mode.
+     *     Ps = 1 0 1 0  -> Don't scroll to bottom on tty output
+     *     (rxvt).
+     *     Ps = 1 0 1 1  -> Don't scroll to bottom on key press (rxvt).
+     *     Ps = 1 0 3 4  -> Don't interpret "meta" key.  (This disables
+     *     the eightBitInput resource).
+     *     Ps = 1 0 3 5  -> Disable special modifiers for Alt and Num-
+     *     Lock keys.  (This disables the numLock resource).
+     *     Ps = 1 0 3 6  -> Don't send ESC  when Meta modifies a key.
+     *     (This disables the metaSendsEscape resource).
+     *     Ps = 1 0 3 7  -> Send VT220 Remove from the editing-keypad
+     *     Delete key.
+     *     Ps = 1 0 3 9  -> Don't send ESC  when Alt modifies a key.
+     *     (This disables the altSendsEscape resource).
+     *     Ps = 1 0 4 0  -> Do not keep selection when not highlighted.
+     *     (This disables the keepSelection resource).
+     *     Ps = 1 0 4 1  -> Use the PRIMARY selection.  (This disables
+     *     the selectToClipboard resource).
+     *     Ps = 1 0 4 2  -> Disable Urgency window manager hint when
+     *     Control-G is received.  (This disables the bellIsUrgent
+     *     resource).
+     *     Ps = 1 0 4 3  -> Disable raising of the window when Control-
+     *     G is received.  (This disables the popOnBell resource).
+     *     Ps = 1 0 4 7  -> Use Normal Screen Buffer, clearing screen
+     *     first if in the Alternate Screen.  (This may be disabled by
+     *     the titeInhibit resource).
+     *     Ps = 1 0 4 8  -> Restore cursor as in DECRC.  (This may be
+     *     disabled by the titeInhibit resource).
+     *     Ps = 1 0 4 9  -> Use Normal Screen Buffer and restore cursor
+     *     as in DECRC.  (This may be disabled by the titeInhibit
+     *     resource).  This combines the effects of the 1 0 4 7  and 1 0
+     *     4 8  modes.  Use this with terminfo-based applications rather
+     *     than the 4 7  mode.
+     *     Ps = 1 0 5 0  -> Reset terminfo/termcap function-key mode.
+     *     Ps = 1 0 5 1  -> Reset Sun function-key mode.
+     *     Ps = 1 0 5 2  -> Reset HP function-key mode.
+     *     Ps = 1 0 5 3  -> Reset SCO function-key mode.
+     *     Ps = 1 0 6 0  -> Reset legacy keyboard emulation (X11R6).
+     *     Ps = 1 0 6 1  -> Reset keyboard emulation to Sun/PC style.
+     *     Ps = 2 0 0 4  -> Reset bracketed paste mode.
+     */
+    Terminal.prototype.resetMode = function(params) {
+      if (typeof params === 'object') {
+        var l = params.length
+          , i = 0;
+
+        for (; i < l; i++) {
+          this.resetMode(params[i]);
+        }
+
+        return;
+      }
+
+      if (!this.prefix) {
+        switch (params) {
+          case 4:
+            this.insertMode = false;
+            break;
+          case 20:
+            //this.convertEol = false;
+            break;
+        }
+      } else if (this.prefix === '?') {
+        switch (params) {
+          case 1:
+            this.applicationCursor = false;
+            break;
+          case 3:
+            if (this.cols === 132 && this.savedCols) {
+              this.resize(this.savedCols, this.rows);
+            }
+            delete this.savedCols;
+            break;
+          case 6:
+            this.originMode = false;
+            break;
+          case 7:
+            this.wraparoundMode = false;
+            break;
+          case 12:
+            // this.cursorBlink = false;
+            break;
+          case 66:
+            this.log('Switching back to normal keypad.');
+            this.applicationKeypad = false;
+            break;
+          case 9: // X10 Mouse
+          case 1000: // vt200 mouse
+          case 1002: // button event mouse
+          case 1003: // any event mouse
+            this.x10Mouse = false;
+            this.vt200Mouse = false;
+            this.normalMouse = false;
+            this.mouseEvents = false;
+            this.element.style.cursor = '';
+            break;
+          case 1004: // send focusin/focusout events
+            this.sendFocus = false;
+            break;
+          case 1005: // utf8 ext mode mouse
+            this.utfMouse = false;
+            break;
+          case 1006: // sgr ext mode mouse
+            this.sgrMouse = false;
+            break;
+          case 1015: // urxvt ext mode mouse
+            this.urxvtMouse = false;
+            break;
+          case 25: // hide cursor
+            this.cursorHidden = true;
+            break;
+          case 1049: // alt screen buffer cursor
+            ; // FALL-THROUGH
+          case 47: // normal screen buffer
+          case 1047: // normal screen buffer - clearing it first
+            if (this.normal) {
+              this.lines = this.normal.lines;
+              this.ybase = this.normal.ybase;
+              this.ydisp = this.normal.ydisp;
+              this.x = this.normal.x;
+              this.y = this.normal.y;
+              this.scrollTop = this.normal.scrollTop;
+              this.scrollBottom = this.normal.scrollBottom;
+              this.tabs = this.normal.tabs;
+              this.normal = null;
+              // if (params === 1049) {
+              //   this.x = this.savedX;
+              //   this.y = this.savedY;
+              // }
+              this.refresh(0, this.rows - 1);
+              this.showCursor();
+            }
+            break;
+        }
+      }
+    };
+
+
+    /**
+     * CSI Ps ; Ps r
+     *   Set Scrolling Region [top;bottom] (default = full size of win-
+     *   dow) (DECSTBM).
+     * CSI ? Pm r
+     */
+    Terminal.prototype.setScrollRegion = function(params) {
+      if (this.prefix) return;
+      this.scrollTop = (params[0] || 1) - 1;
+      this.scrollBottom = (params[1] || this.rows) - 1;
+      this.x = 0;
+      this.y = 0;
+    };
+
+
+    /**
+     * CSI s
+     *   Save cursor (ANSI.SYS).
+     */
+    Terminal.prototype.saveCursor = function(params) {
+      this.savedX = this.x;
+      this.savedY = this.y;
+    };
+
+
+    /**
+     * CSI u
+     *   Restore cursor (ANSI.SYS).
+     */
+    Terminal.prototype.restoreCursor = function(params) {
+      this.x = this.savedX || 0;
+      this.y = this.savedY || 0;
+    };
+
+
+    /**
+     * Lesser Used
+     */
+
+    /**
+     * CSI Ps I
+     *   Cursor Forward Tabulation Ps tab stops (default = 1) (CHT).
+     */
+    Terminal.prototype.cursorForwardTab = function(params) {
+      var param = params[0] || 1;
+      while (param--) {
+        this.x = this.nextStop();
+      }
+    };
+
+
+    /**
+     * CSI Ps S  Scroll up Ps lines (default = 1) (SU).
+     */
+    Terminal.prototype.scrollUp = function(params) {
+      var param = params[0] || 1;
+      while (param--) {
+        this.lines.splice(this.ybase + this.scrollTop, 1);
+        this.lines.splice(this.ybase + this.scrollBottom, 0, this.blankLine());
+      }
+      // this.maxRange();
+      this.updateRange(this.scrollTop);
+      this.updateRange(this.scrollBottom);
+    };
+
+
+    /**
+     * CSI Ps T  Scroll down Ps lines (default = 1) (SD).
+     */
+    Terminal.prototype.scrollDown = function(params) {
+      var param = params[0] || 1;
+      while (param--) {
+        this.lines.splice(this.ybase + this.scrollBottom, 1);
+        this.lines.splice(this.ybase + this.scrollTop, 0, this.blankLine());
+      }
+      // this.maxRange();
+      this.updateRange(this.scrollTop);
+      this.updateRange(this.scrollBottom);
+    };
+
+
+    /**
+     * CSI Ps ; Ps ; Ps ; Ps ; Ps T
+     *   Initiate highlight mouse tracking.  Parameters are
+     *   [func;startx;starty;firstrow;lastrow].  See the section Mouse
+     *   Tracking.
+     */
+    Terminal.prototype.initMouseTracking = function(params) {
+      // Relevant: DECSET 1001
+    };
+
+
+    /**
+     * CSI > Ps; Ps T
+     *   Reset one or more features of the title modes to the default
+     *   value.  Normally, "reset" disables the feature.  It is possi-
+     *   ble to disable the ability to reset features by compiling a
+     *   different default for the title modes into xterm.
+     *     Ps = 0  -> Do not set window/icon labels using hexadecimal.
+     *     Ps = 1  -> Do not query window/icon labels using hexadeci-
+     *     mal.
+     *     Ps = 2  -> Do not set window/icon labels using UTF-8.
+     *     Ps = 3  -> Do not query window/icon labels using UTF-8.
+     *   (See discussion of "Title Modes").
+     */
+    Terminal.prototype.resetTitleModes = function(params) {
+      ;
+    };
+
+
+    /**
+     * CSI Ps Z  Cursor Backward Tabulation Ps tab stops (default = 1) (CBT).
+     */
+    Terminal.prototype.cursorBackwardTab = function(params) {
+      var param = params[0] || 1;
+      while (param--) {
+        this.x = this.prevStop();
+      }
+    };
+
+
+    /**
+     * CSI Ps b  Repeat the preceding graphic character Ps times (REP).
+     */
+    Terminal.prototype.repeatPrecedingCharacter = function(params) {
+      var param = params[0] || 1
+        , line = this.lines[this.ybase + this.y]
+        , ch = line[this.x - 1] || [this.defAttr, ' ', 1];
+
+      while (param--) line[this.x++] = ch;
+    };
+
+
+    /**
+     * CSI Ps g  Tab Clear (TBC).
+     *     Ps = 0  -> Clear Current Column (default).
+     *     Ps = 3  -> Clear All.
+     * Potentially:
+     *   Ps = 2  -> Clear Stops on Line.
+     *   http://vt100.net/annarbor/aaa-ug/section6.html
+     */
+    Terminal.prototype.tabClear = function(params) {
+      var param = params[0];
+      if (param <= 0) {
+        delete this.tabs[this.x];
+      } else if (param === 3) {
+        this.tabs = {};
+      }
+    };
+
+
+    /**
+     * CSI Pm i  Media Copy (MC).
+     *     Ps = 0  -> Print screen (default).
+     *     Ps = 4  -> Turn off printer controller mode.
+     *     Ps = 5  -> Turn on printer controller mode.
+     * CSI ? Pm i
+     *   Media Copy (MC, DEC-specific).
+     *     Ps = 1  -> Print line containing cursor.
+     *     Ps = 4  -> Turn off autoprint mode.
+     *     Ps = 5  -> Turn on autoprint mode.
+     *     Ps = 1  0  -> Print composed display, ignores DECPEX.
+     *     Ps = 1  1  -> Print all pages.
+     */
+    Terminal.prototype.mediaCopy = function(params) {
+      ;
+    };
+
+
+    /**
+     * CSI > Ps; Ps m
+     *   Set or reset resource-values used by xterm to decide whether
+     *   to construct escape sequences holding information about the
+     *   modifiers pressed with a given key.  The first parameter iden-
+     *   tifies the resource to set/reset.  The second parameter is the
+     *   value to assign to the resource.  If the second parameter is
+     *   omitted, the resource is reset to its initial value.
+     *     Ps = 1  -> modifyCursorKeys.
+     *     Ps = 2  -> modifyFunctionKeys.
+     *     Ps = 4  -> modifyOtherKeys.
+     *   If no parameters are given, all resources are reset to their
+     *   initial values.
+     */
+    Terminal.prototype.setResources = function(params) {
+      ;
+    };
+
+
+    /**
+     * CSI > Ps n
+     *   Disable modifiers which may be enabled via the CSI > Ps; Ps m
+     *   sequence.  This corresponds to a resource value of "-1", which
+     *   cannot be set with the other sequence.  The parameter identi-
+     *   fies the resource to be disabled:
+     *     Ps = 1  -> modifyCursorKeys.
+     *     Ps = 2  -> modifyFunctionKeys.
+     *     Ps = 4  -> modifyOtherKeys.
+     *   If the parameter is omitted, modifyFunctionKeys is disabled.
+     *   When modifyFunctionKeys is disabled, xterm uses the modifier
+     *   keys to make an extended sequence of functions rather than
+     *   adding a parameter to each function key to denote the modi-
+     *   fiers.
+     */
+    Terminal.prototype.disableModifiers = function(params) {
+      ;
+    };
+
+
+    /**
+     * CSI > Ps p
+     *   Set resource value pointerMode.  This is used by xterm to
+     *   decide whether to hide the pointer cursor as the user types.
+     *   Valid values for the parameter:
+     *     Ps = 0  -> never hide the pointer.
+     *     Ps = 1  -> hide if the mouse tracking mode is not enabled.
+     *     Ps = 2  -> always hide the pointer.  If no parameter is
+     *     given, xterm uses the default, which is 1 .
+     */
+    Terminal.prototype.setPointerMode = function(params) {
+      ;
+    };
+
+
+		/**
+     * CSI ! p   Soft terminal reset (DECSTR).
+     * http://vt100.net/docs/vt220-rm/table4-10.html
+     */
+    Terminal.prototype.softReset = function(params) {
+      this.cursorHidden = false;
+      this.insertMode = false;
+      this.originMode = false;
+      this.wraparoundMode = false; // autowrap
+      this.applicationKeypad = false; // ?
+      this.applicationCursor = false;
+      this.scrollTop = 0;
+      this.scrollBottom = this.rows - 1;
+      this.curAttr = this.defAttr;
+      this.x = this.y = 0; // ?
+      this.charset = null;
+      this.glevel = 0; // ??
+      this.charsets = [null]; // ??
+    };
+
+
+    /**
+     * CSI Ps$ p
+     *   Request ANSI mode (DECRQM).  For VT300 and up, reply is
+     *     CSI Ps; Pm$ y
+     *   where Ps is the mode number as in RM, and Pm is the mode
+     *   value:
+     *     0 - not recognized
+     *     1 - set
+     *     2 - reset
+     *     3 - permanently set
+     *     4 - permanently reset
+     */
+    Terminal.prototype.requestAnsiMode = function(params) {
+      ;
+    };
+
+
+    /**
+     * CSI ? Ps$ p
+     *   Request DEC private mode (DECRQM).  For VT300 and up, reply is
+     *     CSI ? Ps; Pm$ p
+     *   where Ps is the mode number as in DECSET, Pm is the mode value
+     *   as in the ANSI DECRQM.
+     */
+    Terminal.prototype.requestPrivateMode = function(params) {
+      ;
+    };
+
+
+    /**
+     * CSI Ps ; Ps " p
+     *   Set conformance level (DECSCL).  Valid values for the first
+     *   parameter:
+     *     Ps = 6 1  -> VT100.
+     *     Ps = 6 2  -> VT200.
+     *     Ps = 6 3  -> VT300.
+     *   Valid values for the second parameter:
+     *     Ps = 0  -> 8-bit controls.
+     *     Ps = 1  -> 7-bit controls (always set for VT100).
+     *     Ps = 2  -> 8-bit controls.
+     */
+    Terminal.prototype.setConformanceLevel = function(params) {
+      ;
+    };
+
+
+    /**
+     * CSI Ps q  Load LEDs (DECLL).
+     *     Ps = 0  -> Clear all LEDS (default).
+     *     Ps = 1  -> Light Num Lock.
+     *     Ps = 2  -> Light Caps Lock.
+     *     Ps = 3  -> Light Scroll Lock.
+     *     Ps = 2  1  -> Extinguish Num Lock.
+     *     Ps = 2  2  -> Extinguish Caps Lock.
+     *     Ps = 2  3  -> Extinguish Scroll Lock.
+     */
+    Terminal.prototype.loadLEDs = function(params) {
+      ;
+    };
+
+
+    /**
+     * CSI Ps SP q
+     *   Set cursor style (DECSCUSR, VT520).
+     *     Ps = 0  -> blinking block.
+     *     Ps = 1  -> blinking block (default).
+     *     Ps = 2  -> steady block.
+     *     Ps = 3  -> blinking underline.
+     *     Ps = 4  -> steady underline.
+     */
+    Terminal.prototype.setCursorStyle = function(params) {
+      ;
+    };
+
+
+    /**
+     * CSI Ps " q
+     *   Select character protection attribute (DECSCA).  Valid values
+     *   for the parameter:
+     *     Ps = 0  -> DECSED and DECSEL can erase (default).
+     *     Ps = 1  -> DECSED and DECSEL cannot erase.
+     *     Ps = 2  -> DECSED and DECSEL can erase.
+     */
+    Terminal.prototype.setCharProtectionAttr = function(params) {
+      ;
+    };
+
+
+    /**
+     * CSI ? Pm r
+     *   Restore DEC Private Mode Values.  The value of Ps previously
+     *   saved is restored.  Ps values are the same as for DECSET.
+     */
+    Terminal.prototype.restorePrivateValues = function(params) {
+      ;
+    };
+
+
+    /**
+     * CSI Pt; Pl; Pb; Pr; Ps$ r
+     *   Change Attributes in Rectangular Area (DECCARA), VT400 and up.
+     *     Pt; Pl; Pb; Pr denotes the rectangle.
+     *     Ps denotes the SGR attributes to change: 0, 1, 4, 5, 7.
+     * NOTE: xterm doesn't enable this code by default.
+     */
+    Terminal.prototype.setAttrInRectangle = function(params) {
+      var t = params[0]
+        , l = params[1]
+        , b = params[2]
+        , r = params[3]
+        , attr = params[4];
+
+      var line
+        , i;
+
+      for (; t < b + 1; t++) {
+        line = this.lines[this.ybase + t];
+        for (i = l; i < r; i++) {
+          line[i] = [attr, line[i][1]];
+        }
+      }
+
+      // this.maxRange();
+      this.updateRange(params[0]);
+      this.updateRange(params[2]);
+    };
+
+
+    /**
+     * CSI Pc; Pt; Pl; Pb; Pr$ x
+     *   Fill Rectangular Area (DECFRA), VT420 and up.
+     *     Pc is the character to use.
+     *     Pt; Pl; Pb; Pr denotes the rectangle.
+     * NOTE: xterm doesn't enable this code by default.
+     */
+    Terminal.prototype.fillRectangle = function(params) {
+      var ch = params[0]
+        , t = params[1]
+        , l = params[2]
+        , b = params[3]
+        , r = params[4];
+
+      var line
+        , i;
+
+      for (; t < b + 1; t++) {
+        line = this.lines[this.ybase + t];
+        for (i = l; i < r; i++) {
+          line[i] = [line[i][0], String.fromCharCode(ch)];
+        }
+      }
+
+      // this.maxRange();
+      this.updateRange(params[1]);
+      this.updateRange(params[3]);
+    };
+
+
+    /**
+     * CSI Ps ; Pu ' z
+     *   Enable Locator Reporting (DECELR).
+     *   Valid values for the first parameter:
+     *     Ps = 0  -> Locator disabled (default).
+     *     Ps = 1  -> Locator enabled.
+     *     Ps = 2  -> Locator enabled for one report, then disabled.
+     *   The second parameter specifies the coordinate unit for locator
+     *   reports.
+     *   Valid values for the second parameter:
+     *     Pu = 0  <- or omitted -> default to character cells.
+     *     Pu = 1  <- device physical pixels.
+     *     Pu = 2  <- character cells.
+     */
+    Terminal.prototype.enableLocatorReporting = function(params) {
+      var val = params[0] > 0;
+      //this.mouseEvents = val;
+      //this.decLocator = val;
+    };
+
+
+    /**
+     * CSI Pt; Pl; Pb; Pr$ z
+     *   Erase Rectangular Area (DECERA), VT400 and up.
+     *     Pt; Pl; Pb; Pr denotes the rectangle.
+     * NOTE: xterm doesn't enable this code by default.
+     */
+    Terminal.prototype.eraseRectangle = function(params) {
+      var t = params[0]
+        , l = params[1]
+        , b = params[2]
+        , r = params[3];
+
+      var line
+        , i
+        , ch;
+
+      ch = [this.eraseAttr(), ' ', 1]; // xterm?
+
+      for (; t < b + 1; t++) {
+        line = this.lines[this.ybase + t];
+        for (i = l; i < r; i++) {
+          line[i] = ch;
+        }
+      }
+
+      // this.maxRange();
+      this.updateRange(params[0]);
+      this.updateRange(params[2]);
+    };
+
+
+    /**
+     * CSI P m SP }
+     * Insert P s Column(s) (default = 1) (DECIC), VT420 and up.
+     * NOTE: xterm doesn't enable this code by default.
+     */
+    Terminal.prototype.insertColumns = function() {
+      var param = params[0]
+        , l = this.ybase + this.rows
+        , ch = [this.eraseAttr(), ' ', 1] // xterm?
+        , i;
+
+      while (param--) {
+        for (i = this.ybase; i < l; i++) {
+          this.lines[i].splice(this.x + 1, 0, ch);
+          this.lines[i].pop();
+        }
+      }
+
+      this.maxRange();
+    };
+
+
+    /**
+     * CSI P m SP ~
+     * Delete P s Column(s) (default = 1) (DECDC), VT420 and up
+     * NOTE: xterm doesn't enable this code by default.
+     */
+    Terminal.prototype.deleteColumns = function() {
+      var param = params[0]
+        , l = this.ybase + this.rows
+        , ch = [this.eraseAttr(), ' ', 1] // xterm?
+        , i;
+
+      while (param--) {
+        for (i = this.ybase; i < l; i++) {
+          this.lines[i].splice(this.x, 1);
+          this.lines[i].push(ch);
+        }
+      }
+
+      this.maxRange();
+    };
+
+    /**
+     * Character Sets
+     */
+
+    Terminal.charsets = {};
+
+    // DEC Special Character and Line Drawing Set.
+    // http://vt100.net/docs/vt102-ug/table5-13.html
+    // A lot of curses apps use this if they see TERM=xterm.
+    // testing: echo -e '\e(0a\e(B'
+    // The xterm output sometimes seems to conflict with the
+    // reference above. xterm seems in line with the reference
+    // when running vttest however.
+    // The table below now uses xterm's output from vttest.
+    Terminal.charsets.SCLD = { // (0
+      '`': '\u25c6', // 'â'
+      'a': '\u2592', // 'â'
+      'b': '\u0009', // '\t'
+      'c': '\u000c', // '\f'
+      'd': '\u000d', // '\r'
+      'e': '\u000a', // '\n'
+      'f': '\u00b0', // 'Â°'
+      'g': '\u00b1', // 'Â±'
+      'h': '\u2424', // '\u2424' (NL)
+      'i': '\u000b', // '\v'
+      'j': '\u2518', // 'â'
+      'k': '\u2510', // 'â'
+      'l': '\u250c', // 'â'
+      'm': '\u2514', // 'â'
+      'n': '\u253c', // 'â¼'
+      'o': '\u23ba', // 'âº'
+      'p': '\u23bb', // 'â»'
+      'q': '\u2500', // 'â'
+      'r': '\u23bc', // 'â¼'
+      's': '\u23bd', // 'â½'
+      't': '\u251c', // 'â'
+      'u': '\u2524', // 'â¤'
+      'v': '\u2534', // 'â´'
+      'w': '\u252c', // 'â¬'
+      'x': '\u2502', // 'â'
+      'y': '\u2264', // 'â¤'
+      'z': '\u2265', // 'â¥'
+      '{': '\u03c0', // 'Ï'
+      '|': '\u2260', // 'â '
+      '}': '\u00a3', // 'Â£'
+      '~': '\u00b7'  // 'Â·'
+    };
+
+    Terminal.charsets.UK = null; // (A
+    Terminal.charsets.US = null; // (B (USASCII)
+    Terminal.charsets.Dutch = null; // (4
+    Terminal.charsets.Finnish = null; // (C or (5
+    Terminal.charsets.French = null; // (R
+    Terminal.charsets.FrenchCanadian = null; // (Q
+    Terminal.charsets.German = null; // (K
+    Terminal.charsets.Italian = null; // (Y
+    Terminal.charsets.NorwegianDanish = null; // (E or (6
+    Terminal.charsets.Spanish = null; // (Z
+    Terminal.charsets.Swedish = null; // (H or (7
+    Terminal.charsets.Swiss = null; // (=
+    Terminal.charsets.ISOLatin = null; // /A
+
+    /**
+     * Helpers
+     */
+
+    function contains(el, arr) {
+      for (var i = 0; i < arr.length; i += 1) {
+        if (el === arr[i]) {
+          return true;
+        }
+      }
+      return false;
+    }
+
+    function on(el, type, handler, capture) {
+      if (!Array.isArray(el)) {
+        el = [el];
+      }
+      el.forEach(function (element) {
+        element.addEventListener(type, handler, capture || false);
+      });
+    }
+
+    function off(el, type, handler, capture) {
+      el.removeEventListener(type, handler, capture || false);
+    }
+
+    function cancel(ev, force) {
+      if (!this.cancelEvents && !force) {
+        return;
+      }
+      ev.preventDefault();
+      ev.stopPropagation();
+      return false;
+    }
+
+    function inherits(child, parent) {
+      function f() {
+        this.constructor = child;
+      }
+      f.prototype = parent.prototype;
+      child.prototype = new f;
+    }
+
+    // if bold is broken, we can't
+    // use it in the terminal.
+    function isBoldBroken(document) {
+      var body = document.getElementsByTagName('body')[0];
+      var el = document.createElement('span');
+      el.innerHTML = 'hello world';
+      body.appendChild(el);
+      var w1 = el.scrollWidth;
+      el.style.fontWeight = 'bold';
+      var w2 = el.scrollWidth;
+      body.removeChild(el);
+      return w1 !== w2;
+    }
+
+    var String = this.String;
+    var setTimeout = this.setTimeout;
+    var setInterval = this.setInterval;
+
+    function indexOf(obj, el) {
+      var i = obj.length;
+      while (i--) {
+        if (obj[i] === el) return i;
+      }
+      return -1;
+    }
+
+  function isThirdLevelShift(term, ev) {
+      var thirdLevelKey =
+          (term.isMac && ev.altKey && !ev.ctrlKey && !ev.metaKey) ||
+          (term.isMSWindows && ev.altKey && ev.ctrlKey && !ev.metaKey);
+
+    	if (ev.type == 'keypress') {
+        return thirdLevelKey;
+      }
+
+      // Don't invoke for arrows, pageDown, home, backspace, etc. (on non-keypress events)
+      return thirdLevelKey && (!ev.keyCode || ev.keyCode > 47);
+    }
+
+    function matchColor(r1, g1, b1) {
+      var hash = (r1 << 16) | (g1 << 8) | b1;
+
+      if (matchColor._cache[hash] != null) {
+        return matchColor._cache[hash];
+      }
+
+      var ldiff = Infinity
+        , li = -1
+        , i = 0
+        , c
+        , r2
+        , g2
+        , b2
+        , diff;
+
+      for (; i < Terminal.vcolors.length; i++) {
+        c = Terminal.vcolors[i];
+        r2 = c[0];
+        g2 = c[1];
+        b2 = c[2];
+
+        diff = matchColor.distance(r1, g1, b1, r2, g2, b2);
+
+        if (diff === 0) {
+          li = i;
+          break;
+        }
+
+        if (diff < ldiff) {
+          ldiff = diff;
+          li = i;
+        }
+      }
+
+      return matchColor._cache[hash] = li;
+    }
+
+    matchColor._cache = {};
+
+    // http://stackoverflow.com/questions/1633828
+    matchColor.distance = function(r1, g1, b1, r2, g2, b2) {
+      return Math.pow(30 * (r1 - r2), 2)
+        + Math.pow(59 * (g1 - g2), 2)
+        + Math.pow(11 * (b1 - b2), 2);
+    };
+
+    function each(obj, iter, con) {
+      if (obj.forEach) return obj.forEach(iter, con);
+      for (var i = 0; i < obj.length; i++) {
+        iter.call(con, obj[i], i, obj);
+      }
+    }
+
+    function keys(obj) {
+      if (Object.keys) return Object.keys(obj);
+      var key, keys = [];
+      for (key in obj) {
+        if (Object.prototype.hasOwnProperty.call(obj, key)) {
+          keys.push(key);
+        }
+      }
+      return keys;
+    }
+
+    var wcwidth = (function(opts) {
+      // extracted from https://www.cl.cam.ac.uk/%7Emgk25/ucs/wcwidth.c
+      // combining characters
+      var COMBINING = [
+        [0x0300, 0x036F], [0x0483, 0x0486], [0x0488, 0x0489],
+        [0x0591, 0x05BD], [0x05BF, 0x05BF], [0x05C1, 0x05C2],
+        [0x05C4, 0x05C5], [0x05C7, 0x05C7], [0x0600, 0x0603],
+        [0x0610, 0x0615], [0x064B, 0x065E], [0x0670, 0x0670],
+        [0x06D6, 0x06E4], [0x06E7, 0x06E8], [0x06EA, 0x06ED],
+        [0x070F, 0x070F], [0x0711, 0x0711], [0x0730, 0x074A],
+        [0x07A6, 0x07B0], [0x07EB, 0x07F3], [0x0901, 0x0902],
+        [0x093C, 0x093C], [0x0941, 0x0948], [0x094D, 0x094D],
+        [0x0951, 0x0954], [0x0962, 0x0963], [0x0981, 0x0981],
+        [0x09BC, 0x09BC], [0x09C1, 0x09C4], [0x09CD, 0x09CD],
+        [0x09E2, 0x09E3], [0x0A01, 0x0A02], [0x0A3C, 0x0A3C],
+        [0x0A41, 0x0A42], [0x0A47, 0x0A48], [0x0A4B, 0x0A4D],
+        [0x0A70, 0x0A71], [0x0A81, 0x0A82], [0x0ABC, 0x0ABC],
+        [0x0AC1, 0x0AC5], [0x0AC7, 0x0AC8], [0x0ACD, 0x0ACD],
+        [0x0AE2, 0x0AE3], [0x0B01, 0x0B01], [0x0B3C, 0x0B3C],
+        [0x0B3F, 0x0B3F], [0x0B41, 0x0B43], [0x0B4D, 0x0B4D],
+        [0x0B56, 0x0B56], [0x0B82, 0x0B82], [0x0BC0, 0x0BC0],
+        [0x0BCD, 0x0BCD], [0x0C3E, 0x0C40], [0x0C46, 0x0C48],
+        [0x0C4A, 0x0C4D], [0x0C55, 0x0C56], [0x0CBC, 0x0CBC],
+        [0x0CBF, 0x0CBF], [0x0CC6, 0x0CC6], [0x0CCC, 0x0CCD],
+        [0x0CE2, 0x0CE3], [0x0D41, 0x0D43], [0x0D4D, 0x0D4D],
+        [0x0DCA, 0x0DCA], [0x0DD2, 0x0DD4], [0x0DD6, 0x0DD6],
+        [0x0E31, 0x0E31], [0x0E34, 0x0E3A], [0x0E47, 0x0E4E],
+        [0x0EB1, 0x0EB1], [0x0EB4, 0x0EB9], [0x0EBB, 0x0EBC],
+        [0x0EC8, 0x0ECD], [0x0F18, 0x0F19], [0x0F35, 0x0F35],
+        [0x0F37, 0x0F37], [0x0F39, 0x0F39], [0x0F71, 0x0F7E],
+        [0x0F80, 0x0F84], [0x0F86, 0x0F87], [0x0F90, 0x0F97],
+        [0x0F99, 0x0FBC], [0x0FC6, 0x0FC6], [0x102D, 0x1030],
+        [0x1032, 0x1032], [0x1036, 0x1037], [0x1039, 0x1039],
+        [0x1058, 0x1059], [0x1160, 0x11FF], [0x135F, 0x135F],
+        [0x1712, 0x1714], [0x1732, 0x1734], [0x1752, 0x1753],
+        [0x1772, 0x1773], [0x17B4, 0x17B5], [0x17B7, 0x17BD],
+        [0x17C6, 0x17C6], [0x17C9, 0x17D3], [0x17DD, 0x17DD],
+        [0x180B, 0x180D], [0x18A9, 0x18A9], [0x1920, 0x1922],
+        [0x1927, 0x1928], [0x1932, 0x1932], [0x1939, 0x193B],
+        [0x1A17, 0x1A18], [0x1B00, 0x1B03], [0x1B34, 0x1B34],
+        [0x1B36, 0x1B3A], [0x1B3C, 0x1B3C], [0x1B42, 0x1B42],
+        [0x1B6B, 0x1B73], [0x1DC0, 0x1DCA], [0x1DFE, 0x1DFF],
+        [0x200B, 0x200F], [0x202A, 0x202E], [0x2060, 0x2063],
+        [0x206A, 0x206F], [0x20D0, 0x20EF], [0x302A, 0x302F],
+        [0x3099, 0x309A], [0xA806, 0xA806], [0xA80B, 0xA80B],
+        [0xA825, 0xA826], [0xFB1E, 0xFB1E], [0xFE00, 0xFE0F],
+        [0xFE20, 0xFE23], [0xFEFF, 0xFEFF], [0xFFF9, 0xFFFB],
+        [0x10A01, 0x10A03], [0x10A05, 0x10A06], [0x10A0C, 0x10A0F],
+        [0x10A38, 0x10A3A], [0x10A3F, 0x10A3F], [0x1D167, 0x1D169],
+        [0x1D173, 0x1D182], [0x1D185, 0x1D18B], [0x1D1AA, 0x1D1AD],
+        [0x1D242, 0x1D244], [0xE0001, 0xE0001], [0xE0020, 0xE007F],
+        [0xE0100, 0xE01EF]
+      ];
+      // binary search
+      function bisearch(ucs) {
+        var min = 0;
+        var max = COMBINING.length - 1;
+        var mid;
+        if (ucs < COMBINING[0][0] || ucs > COMBINING[max][1])
+          return false;
+        while (max >= min) {
+          mid = Math.floor((min + max) / 2);
+          if (ucs > COMBINING[mid][1])
+            min = mid + 1;
+          else if (ucs < COMBINING[mid][0])
+            max = mid - 1;
+          else
+            return true;
+        }
+        return false;
+      }
+      function wcwidth(ucs) {
+        // test for 8-bit control characters
+        if (ucs === 0)
+          return opts.nul;
+        if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0))
+          return opts.control;
+        // binary search in table of non-spacing characters
+        if (bisearch(ucs))
+          return 0;
+        // if we arrive here, ucs is not a combining or C0/C1 control character
+        return 1 +
+          (
+            ucs >= 0x1100 &&
+            (
+              ucs <= 0x115f ||                // Hangul Jamo init. consonants
+              ucs == 0x2329 ||
+              ucs == 0x232a ||
+              (ucs >= 0x2e80 && ucs <= 0xa4cf && ucs != 0x303f) ||  // CJK..Yi
+              (ucs >= 0xac00 && ucs <= 0xd7a3) ||    // Hangul Syllables
+              (ucs >= 0xf900 && ucs <= 0xfaff) ||    // CJK Compat Ideographs
+              (ucs >= 0xfe10 && ucs <= 0xfe19) ||    // Vertical forms
+              (ucs >= 0xfe30 && ucs <= 0xfe6f) ||    // CJK Compat Forms
+              (ucs >= 0xff00 && ucs <= 0xff60) ||    // Fullwidth Forms
+              (ucs >= 0xffe0 && ucs <= 0xffe6) ||
+              (ucs >= 0x20000 && ucs <= 0x2fffd) ||
+              (ucs >= 0x30000 && ucs <= 0x3fffd)
+            )
+          );
+      }
+      return wcwidth;
+    })({nul: 0, control: 0});  // configurable options
+
+    /**
+     * Expose
+     */
+
+    Terminal.EventEmitter = EventEmitter;
+    Terminal.CompositionHelper = CompositionHelper;
+    Terminal.inherits = inherits;
+
+    /**
+     * Adds an event listener to the terminal.
+     *
+     * @param {string} event The name of the event. TODO: Document all event types
+     * @param {function} callback The function to call when the event is triggered.
+     */
+    Terminal.on = on;
+    Terminal.off = off;
+    Terminal.cancel = cancel;
+
+
+    return Terminal;
+});
Index: EcnlProtoTool/trunk/webapp/webmrbc/yacc.bat
===================================================================
--- EcnlProtoTool/trunk/webapp/webmrbc/yacc.bat	(revision 270)
+++ EcnlProtoTool/trunk/webapp/webmrbc/yacc.bat	(revision 270)
@@ -0,0 +1,8 @@
+del MrbParser.output
+del MrbParser.trace
+
+..\..\tools\CSYacc -c -t -v mrb_parse.jay skeleton.cs > MrbParser.cs
+rem ..\..\tools\CSYacc -t -v mrb_parse.jay skeleton.cs > MrbParser.cs
+ren y.output MrbParser.output
+ren y.trace MrbParser.trace
+
